From 36b71ca2de3a02673210d1ed7ea686d92a086090 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Sun, 9 Feb 2025 22:42:39 +0100 Subject: [PATCH 01/15] Update csdis.py (#2459) * csdis: move filemap import to main() as it is only needed there * csdis: fix CS_TIME macro * csdis: make `disassemble_cutscene` return cutscene size in words * add comment on why total_entries+1 --- tools/csdis.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/tools/csdis.py b/tools/csdis.py index 1d96c48e4f..f83efd3aa1 100755 --- a/tools/csdis.py +++ b/tools/csdis.py @@ -2,8 +2,6 @@ # Disassemble a cutscene script -from overlayhelpers import filemap - import argparse, os, struct import math @@ -506,7 +504,7 @@ cutscene_command_macros = { "CS_RUMBLE_CONTROLLER(%h2:1:x, %h1:1:s, %h2:2:s, %b2:2:x, %b1:2:x, %b4:3:x, %b3:3:x, %h1:3:x)", 3), 140: ("CS_TIME_LIST(%w1:1:s)", 2, None, 0, - "CS_TIME(%h2:1:x, %h1:1:s, %h2:2:s, %b2:2:x, %b1:2:x, %w1:3:x)", 3), + "CS_TIME(%h2:1:x, %h1:1:s, %h2:2:s, %b2:2:x, %b1:2:x)", 3), 10: ("CS_PLAYER_CUE_LIST(%w1:1:s)", 2, None, 0, "CS_PLAYER_CUE(%h2:1:e6, %h1:1:s, %h2:2:s, %h1:2:x, %h2:3:x, %h1:3:x, %w1:4:s, %w1:5:s, %w1:6:s, %w1:7:s, %w1:8:s, %w1:9:s, %w1:10:f, %w1:11:f, %w1:12:f)", 12), @@ -711,7 +709,12 @@ Note that this isn't protected against indexing errors since a cutscene should a end before the end of the file it's in. """ -def disassemble_cutscene(cs_in): +def disassemble_cutscene(cs_in) -> tuple[int, str]: + """ + Takes a sequence of words cs_in + + Returns a tuple (cutscene_size_in_words, cutscene_macros_source) + """ i = 0 total_entries = cs_in[i] i+=1 @@ -720,12 +723,14 @@ def disassemble_cutscene(cs_in): if (total_entries < 0 or cutscene_end_frame < 0): print("This cutscene would abort if played in-engine") if total_entries < 0: - return "Could not disassemble cutscene: Number of commands is negative" + raise Exception("Could not disassemble cutscene: Number of commands is negative") macros = format_cmd(begin_cutscene_entry[0], [total_entries, cutscene_end_frame])+line_end + # iterate total_entries+1 times to also parse the CS_END_OF_SCRIPT command, + # which is not included in the count for k in range(0,total_entries+1): cmd_type = cs_in[i] if (cmd_type == 0xFFFFFFFF): - return macros + multi_key(-1)[0]+line_end + return (i+2), (macros + multi_key(-1)[0]+line_end) entry = multi_key(cmd_type) if entry is None: entry = unk_data_entry @@ -758,12 +763,14 @@ def disassemble_cutscene(cs_in): else: i += n_words print("Warning: cutscene reached maximum entries without encountering a CS_END_SCRIPT command") - return macros + return i, macros def hex_parse(s): return int(s, 16) def main(): + from overlayhelpers import filemap + parser = argparse.ArgumentParser(description="Disassembles cutscenes for OoT") parser.add_argument('address', help="VRAM or ROM address to disassemble at", type=hex_parse) args = parser.parse_args() @@ -785,7 +792,7 @@ def main(): ovl_file.seek(file_result.offset) cs_data = [i[0] for i in struct.iter_unpack(">I", bytearray(ovl_file.read()))] if cs_data is not None: - print("static CutsceneData D_" + hex(args.address).replace("0x","").upper() + "[] = {\n" + indent+disassemble_cutscene(cs_data).replace(linesep,linesep+indent).rstrip()+"\n};") + print("static CutsceneData D_" + hex(args.address).replace("0x","").upper() + "[] = {\n" + indent+disassemble_cutscene(cs_data)[1].replace(linesep,linesep+indent).rstrip()+"\n};") if __name__ == "__main__": main() From be1f9e75f028d0180a57081b719dc61d425f7824 Mon Sep 17 00:00:00 2001 From: cadmic Date: Sun, 9 Feb 2025 15:16:18 -0800 Subject: [PATCH 02/15] Read static symbols from .mdebug in sym_info.py (#2460) * Patch .mdebug for data_with_rodata objects * Read static symbols from .mdebug in sym_info.py * Add ability to print all symbols * Add license * Fix bug when missing .mdebug section * /patch_data_with_rodata_mdebug.py license + nitpicks --- Makefile | 3 + sym_info.py | 335 +++++++++++++++++++++++-- tools/patch_data_with_rodata_mdebug.py | 67 +++++ 3 files changed, 384 insertions(+), 21 deletions(-) create mode 100755 tools/patch_data_with_rodata_mdebug.py diff --git a/Makefile b/Makefile index fb3252e4a2..37128eaf9a 100644 --- a/Makefile +++ b/Makefile @@ -937,6 +937,7 @@ endif # Incremental link to move z_message and z_game_over data into rodata $(BUILD_DIR)/src/code/z_message_z_game_over.o: $(BUILD_DIR)/src/code/z_message.o $(BUILD_DIR)/src/code/z_game_over.o $(LD) -r -G 0 -T linker_scripts/data_with_rodata.ld -o $@ $^ + $(PYTHON) tools/patch_data_with_rodata_mdebug.py $@ $(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt: $(BUILD_DIR)/spec $(MKDMADATA) $< $(BUILD_DIR)/dmadata_table_spec.h $(BUILD_DIR)/compress_ranges.txt @@ -971,6 +972,7 @@ ifneq ($(RUN_CC_CHECK),0) endif $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $(@:.o=.tmp) $< $(LD) -r -T linker_scripts/data_with_rodata.ld -o $@ $(@:.o=.tmp) + $(PYTHON) tools/patch_data_with_rodata_mdebug.py $@ @$(OBJDUMP) $(OBJDUMP_FLAGS) $@ > $(@:.o=.s) ifeq ($(PLATFORM),IQUE) @@ -1136,6 +1138,7 @@ ifneq ($(RUN_CC_CHECK),0) endif $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $(@:.o=.tmp) $< $(LD) -r -T linker_scripts/data_with_rodata.ld $(@:.o=.tmp) -o $@ + $(PYTHON) tools/patch_data_with_rodata_mdebug.py $@ @$(RM) $(@:.o=.tmp) $(BUILD_DIR)/assets/audio/sequence_font_table.o: $(BUILD_DIR)/assets/audio/sequence_font_table.s diff --git a/sym_info.py b/sym_info.py index 9fec30b581..301e80110f 100755 --- a/sym_info.py +++ b/sym_info.py @@ -1,42 +1,335 @@ #!/usr/bin/env python3 -import argparse -from pathlib import Path +# SPDX-FileCopyrightText: © 2025 ZeldaRET +# SPDX-License-Identifier: CC0-1.0 +import argparse +import bisect +from dataclasses import dataclass +from pathlib import Path +from typing import Optional +import struct +import sys + +import elftools.elf.elffile import mapfile_parser -def symInfoMain(): - parser = argparse.ArgumentParser(description="Display various information about a symbol or address.") - parser.add_argument("symname", help="symbol name or VROM/VRAM address to lookup") - parser.add_argument("-v", "--version", dest="oot_version", help="Which version should be processed", default="gc-eu-mq-dbg") - parser.add_argument("-e", "--expected", dest="use_expected", action="store_true", help="use the map file in expected/build/ instead of build/") +@dataclass +class MdebugSymbolicHeader: + magic: int + vstamp: int + ilineMax: int + cbLine: int + cbLineOffset: int + idnMax: int + cbDnOffset: int + ipdMax: int + cbPdOffset: int + isymMax: int + cbSymOffset: int + ioptMax: int + cbOptOffset: int + iauxMax: int + cbAuxOffset: int + issMax: int + cbSsOffset: int + issExtMax: int + cbSsExtOffset: int + ifdMax: int + cbFdOffset: int + crfd: int + cbRfdOffset: int + iextMax: int + cbExtOffset: int + + +@dataclass +class MdebugFileDescriptor: + adr: int + rss: int + issBase: int + cbSs: int + isymBase: int + csym: int + ilineBase: int + cline: int + ioptBase: int + copt: int + ipdFirst: int + cpd: int + iauxBase: int + caux: int + rfdBase: int + crfd: int + bitfield: int + cbLineOffset: int + cbLine: int + + +@dataclass +class MdebugSymbol: + iss: int + value: int + st: int + sc: int + index: int + + +@dataclass +class LocalSymbol: + name: str + address: int + + +def read_mdebug_symbolic_header(f, offset: int) -> MdebugSymbolicHeader: + f.seek(offset) + data = f.read(96) + return MdebugSymbolicHeader(*struct.unpack(">2H23I", data)) + + +def read_mdebug_file_descriptor(f, offset: int) -> MdebugFileDescriptor: + f.seek(offset) + data = f.read(72) + return MdebugFileDescriptor(*struct.unpack(">I2iI6iHh4iI2I", data)) + + +def read_mdebug_symbol(f, offset: int) -> MdebugSymbol: + f.seek(offset) + data = f.read(12) + word0, word1, word2 = struct.unpack(">III", data) + return MdebugSymbol( + word0, word1, (word2 >> 26) & 0x3F, (word2 >> 21) & 0x1F, word2 & 0xFFFFF + ) + + +def read_mdebug_string(f, offset: int) -> str: + f.seek(offset) + data = bytearray() + while True: + char = f.read(1)[0] + if char == 0: + break + data.append(char) + return data.decode("ascii") + + +def read_local_symbols_from_mdebug(elf_path: Path) -> list[LocalSymbol]: + local_symbols = [] + + with open(elf_path, "r+b") as f: + elf = elftools.elf.elffile.ELFFile(f) + + mdebug_offset = 0 + for section in elf.iter_sections(): + if section.name == ".mdebug": + mdebug_offset = section["sh_offset"] + break + + if mdebug_offset == 0: + print(f"No .mdebug section found in '{elf_path}'") + return [] + + symbolic_header = read_mdebug_symbolic_header(f, mdebug_offset) + + for fd_num in range(symbolic_header.ifdMax): + fd = read_mdebug_file_descriptor( + f, symbolic_header.cbFdOffset + fd_num * 72 + ) + + for sym_num in range(fd.isymBase, fd.isymBase + fd.csym): + sym = read_mdebug_symbol(f, symbolic_header.cbSymOffset + sym_num * 12) + if sym.st == 2: # stStatic + if not ( + sym.sc == 2 or sym.sc == 3 or sym.sc == 15 + ): # scData, scBss, scRData + continue + + sym_name = read_mdebug_string( + f, symbolic_header.cbSsOffset + fd.issBase + sym.iss + ) + + # EGCS mangles names of internal variables, and seemingly ":V" is for in-function static variables + if "." in sym_name: + continue + if ":" in sym_name: + sym_name, rest = sym_name.split(":", 1) + if not rest.startswith("V"): + continue + + local_symbols.append(LocalSymbol(sym_name, sym.value)) + elif sym.st == 14: # stStaticProc + sym_name = read_mdebug_string( + f, symbolic_header.cbSsOffset + fd.issBase + sym.iss + ) + local_symbols.append(LocalSymbol(sym_name, sym.value)) + + return local_symbols + + +def merge_local_symbols( + map_file: mapfile_parser.mapfile.MapFile, local_symbols: list[LocalSymbol] +): + local_symbols.sort(key=lambda s: s.address) + + for segment in map_file: + for file in segment: + # TODO: handle segmented addresses? + if file.vram < 0x80000000: + continue + + start_address = file.vram + end_address = file.vram + file.size + + start_index = bisect.bisect_left( + local_symbols, start_address, key=lambda s: s.address + ) + end_index = bisect.bisect_left( + local_symbols, end_address, key=lambda s: s.address + ) + if start_index == end_index: + continue + + symbols = file.copySymbolList() + for sym in local_symbols[start_index:end_index]: + if file.vrom is None: + vrom = None + else: + vrom = sym.address - start_address + file.vrom + symbols.append( + mapfile_parser.mapfile.Symbol( + sym.name, sym.address, None, vrom, None + ) + ) + + symbols.sort(key=lambda s: s.vram) + + # Recompute symbol sizes + for i in range(len(symbols)): + if i == len(symbols) - 1: + symbols[i].size = end_address - symbols[i].vram + else: + symbols[i].size = symbols[i + 1].vram - symbols[i].vram + + file.setSymbolList(symbols) + + +def find_symbols_by_name( + map_file: mapfile_parser.mapfile.MapFile, sym_name: str +) -> list[mapfile_parser.mapfile.FoundSymbolInfo]: + infos = [] + + for segment in map_file: + for file in segment: + for sym in file: + if sym.name == sym_name: + infos.append(mapfile_parser.mapfile.FoundSymbolInfo(file, sym)) + + return infos + + +def print_map_file(map_file: mapfile_parser.mapfile.MapFile): + for segment in map_file: + print(f"{segment.name}") + for file in segment: + # Ignore debug sections + if ( + file.sectionType in (".pdr", ".line", ".gnu.attributes") + or file.sectionType.startswith(".debug") + or file.sectionType.startswith(".mdebug") + ): + continue + print(f" {file.asStr()}") + for sym in file: + vram_str = f"{sym.vram:08X}" + if sym.vrom is None: + vrom_str = " " + else: + vrom_str = f"{sym.vrom:06X}" + print(f" {vram_str} {vrom_str} {sym.name}") + + +def sym_info_main(): + parser = argparse.ArgumentParser( + description="Display various information about symbol or addresses." + ) + parser.add_argument( + "symname", + nargs="?", + help="symbol name or VROM/VRAM address to lookup. If not given, all symbols will be printed.", + ) + parser.add_argument( + "-e", + "--expected", + dest="use_expected", + action="store_true", + help="use the map file and elf in expected/build/ instead of build/", + ) + parser.add_argument( + "-v", + "--version", + dest="oot_version", + help="which version should be processed (default: gc-eu-mq-dbg)", + default="gc-eu-mq-dbg", + ) args = parser.parse_args() BUILTMAP = Path("build") / args.oot_version / f"oot-{args.oot_version}.map" + BUILTELF = Path("build") / args.oot_version / f"oot-{args.oot_version}.elf" - mapPath = BUILTMAP + map_path = BUILTMAP + elf_path = BUILTELF if args.use_expected: - mapPath = "expected" / BUILTMAP + map_path = "expected" / BUILTMAP + elf_path = "expected" / BUILTELF - # Guess if the input is an VROM/VRAM or a symbol name - as_vram = False - as_vrom = False - as_name = False + if not map_path.exists(): + print(f"Could not find map_file at '{map_path}'") + sys.exit(1) + + map_file = mapfile_parser.mapfile.MapFile() + map_file.readMapFile(map_path) + + if elf_path.exists(): + local_symbols = read_local_symbols_from_mdebug(elf_path) + merge_local_symbols(map_file, local_symbols) + else: + print( + f"Could not find ELF file at '{elf_path}', local symbols will not be available" + ) + + sym_name = args.symname + if sym_name is None: + print_map_file(map_file) + sys.exit(0) + + infos: list[mapfile_parser.mapfile.FoundSymbolInfo] = [] + possible_files: list[mapfile_parser.mapfile.File] = [] try: - address = int(args.symname, 0) + address = int(sym_name, 0) if address >= 0x01000000: - as_vram = True + info, possible_files = map_file.findSymbolByVram(address) + if info is not None: + infos = [info] else: - as_vrom = True + info, possible_files = map_file.findSymbolByVrom(address) + if info is not None: + infos = [info] except ValueError: - as_name = True + infos = find_symbols_by_name(map_file, sym_name) - mapfile_parser.frontends.sym_info.doSymInfo( - mapPath, args.symname, as_vram=as_vram, as_vrom=as_vrom, as_name=as_name - ) + if not infos: + print(f"'{sym_name}' not found in map file '{map_path}'") + if len(possible_files) > 0: + print("But it may be a local symbol of either of the following files:") + for f in possible_files: + print(f" {f.asStr()})") + sys.exit(1) + + for info in infos: + print(info.getAsStrPlusOffset(sym_name)) if __name__ == "__main__": - symInfoMain() + sym_info_main() diff --git a/tools/patch_data_with_rodata_mdebug.py b/tools/patch_data_with_rodata_mdebug.py new file mode 100755 index 0000000000..48059c51e1 --- /dev/null +++ b/tools/patch_data_with_rodata_mdebug.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 + +# SPDX-FileCopyrightText: © 2025 ZeldaRET +# SPDX-License-Identifier: CC0-1.0 + +import argparse +import struct + +import elftools.elf.elffile + +# Patches mdebug for files linked with data_with_rodata.ld by replacing storage +# class stData with stRData, since .data symbols are now in the .rodata section + +SC_MASK = 0x03E00000 +SC_SHIFT = 21 + + +def read_u32(f, offset): + f.seek(offset) + return struct.unpack(">I", f.read(4))[0] + + +def write_u32(f, offset, value): + f.seek(offset) + f.write(struct.pack(">I", value)) + + +def patch_sc(f, offset): + value = read_u32(f, offset) + sc = (value & SC_MASK) >> SC_SHIFT + if sc == 2: # scData + value = (value & ~SC_MASK) | (15 << SC_SHIFT) # scRData + write_u32(f, offset, value) + + +def main(): + parser = argparse.ArgumentParser() + + parser.add_argument("file", help="input file") + args = parser.parse_args() + + with open(args.file, "r+b") as f: + elf = elftools.elf.elffile.ELFFile(f) + + mdebug_offset = 0 + for section in elf.iter_sections(): + if section.name == ".mdebug": + mdebug_offset = section["sh_offset"] + break + + if mdebug_offset == 0: + return + + isymMax = read_u32(f, mdebug_offset + 0x20) + cbSymOffset = read_u32(f, mdebug_offset + 0x24) + iextMax = read_u32(f, mdebug_offset + 0x58) + cbExtOffset = read_u32(f, mdebug_offset + 0x5C) + + for i in range(isymMax): + patch_sc(f, cbSymOffset + i * 0xC + 0x8) + + for i in range(iextMax): + patch_sc(f, cbExtOffset + i * 0x10 + 0xC) + + +if __name__ == "__main__": + main() From 3dd893c2100c6eab8e405ebd1556db5e20ffa744 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Tue, 11 Feb 2025 02:02:56 +0100 Subject: [PATCH 03/15] Cleanup colliders struct members 1 (#2462) * Standardize some ColliderJntSphElement buffer members on `colliderElements` * Standardize some ColliderTrisElement buffer members on `colliderElements` * format --- .../actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c | 2 +- .../actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h | 2 +- src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c | 2 +- src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.h | 2 +- .../actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c | 2 +- .../actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.h | 2 +- .../ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c | 2 +- .../ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.h | 2 +- .../actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c | 2 +- .../actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.h | 2 +- .../z_bg_hidan_kowarerukabe.c | 2 +- .../z_bg_hidan_kowarerukabe.h | 2 +- .../ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c | 6 +++--- .../ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.h | 2 +- .../ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c | 6 +++--- .../ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.h | 2 +- .../actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c | 2 +- .../actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.h | 2 +- .../actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c | 2 +- .../actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.h | 2 +- .../ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c | 2 +- .../ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.h | 2 +- .../actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c | 2 +- .../actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.h | 2 +- .../actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c | 13 ++++++++----- .../actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.h | 2 +- .../actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c | 2 +- .../actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h | 2 +- src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c | 2 +- src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.h | 2 +- .../ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c | 2 +- .../ovl_Bg_Spot06_Objects/z_bg_spot06_objects.h | 2 +- .../z_bg_spot08_bakudankabe.c | 2 +- .../z_bg_spot08_bakudankabe.h | 2 +- .../actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c | 2 +- .../actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.h | 2 +- .../actors/ovl_Boss_Dodongo/z_boss_dodongo.c | 2 +- .../actors/ovl_Boss_Dodongo/z_boss_dodongo.h | 2 +- src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c | 2 +- src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h | 2 +- src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c | 4 ++-- src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h | 2 +- src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c | 2 +- src/overlays/actors/ovl_Boss_Goma/z_boss_goma.h | 2 +- src/overlays/actors/ovl_En_Ba/z_en_ba.c | 2 +- src/overlays/actors/ovl_En_Ba/z_en_ba.h | 2 +- src/overlays/actors/ovl_En_Bb/z_en_bb.c | 2 +- src/overlays/actors/ovl_En_Bb/z_en_bb.h | 2 +- src/overlays/actors/ovl_En_Butte/z_en_butte.c | 2 +- src/overlays/actors/ovl_En_Butte/z_en_butte.h | 2 +- src/overlays/actors/ovl_En_Crow/z_en_crow.c | 2 +- src/overlays/actors/ovl_En_Crow/z_en_crow.h | 2 +- src/overlays/actors/ovl_En_Dha/z_en_dha.c | 2 +- src/overlays/actors/ovl_En_Dha/z_en_dha.h | 2 +- src/overlays/actors/ovl_En_Fd/z_en_fd.c | 2 +- src/overlays/actors/ovl_En_Fd/z_en_fd.h | 2 +- src/overlays/actors/ovl_En_Firefly/z_en_firefly.c | 2 +- src/overlays/actors/ovl_En_Firefly/z_en_firefly.h | 2 +- src/overlays/actors/ovl_En_Fish/z_en_fish.c | 2 +- src/overlays/actors/ovl_En_Fish/z_en_fish.h | 2 +- src/overlays/actors/ovl_En_Fw/z_en_fw.c | 2 +- src/overlays/actors/ovl_En_Fw/z_en_fw.h | 2 +- src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c | 2 +- src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.h | 2 +- src/overlays/actors/ovl_En_Ny/z_en_ny.c | 2 +- src/overlays/actors/ovl_En_Ny/z_en_ny.h | 2 +- src/overlays/actors/ovl_En_Skb/z_en_skb.c | 2 +- src/overlays/actors/ovl_En_Skb/z_en_skb.h | 2 +- src/overlays/actors/ovl_En_Sw/z_en_sw.c | 2 +- src/overlays/actors/ovl_En_Sw/z_en_sw.h | 2 +- src/overlays/actors/ovl_En_Tp/z_en_tp.c | 2 +- src/overlays/actors/ovl_En_Tp/z_en_tp.h | 2 +- src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c | 2 +- src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h | 2 +- .../actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c | 2 +- .../actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h | 2 +- src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c | 4 ++-- src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h | 4 ++-- 78 files changed, 92 insertions(+), 89 deletions(-) diff --git a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c index a28786d50f..4fdf0d7dea 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c +++ b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c @@ -120,7 +120,7 @@ void BgBdanSwitch_InitDynaPoly(BgBdanSwitch* this, PlayState* play, CollisionHea void BgBdanSwitch_InitCollision(BgBdanSwitch* this, PlayState* play) { Actor* actor = &this->dyna.actor; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, actor, &sJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, actor, &sJntSphInit, this->colliderElements); } void func_8086D0EC(BgBdanSwitch* this) { diff --git a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h index e47a98e6c8..f86ef79e3e 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h +++ b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.h @@ -20,7 +20,7 @@ typedef struct BgBdanSwitch { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ BgBdanSwitchActionFunc actionFunc; /* 0x0168 */ ColliderJntSph collider; - /* 0x0188 */ ColliderJntSphElement colliderItems[1]; + /* 0x0188 */ ColliderJntSphElement colliderElements[1]; /* 0x01C8 */ f32 unk_1C8; /* 0x01CC */ s16 unk_1CC; /* 0x01CE */ char unk_1CE[0x2]; diff --git a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c index 0e5db9b283..b97d4c80bc 100644 --- a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c @@ -134,7 +134,7 @@ void BgBombwall_Init(Actor* thisx, PlayState* play) { BgBombwall_InitDynapoly(this, play); this->unk_2A2 |= 2; Collider_InitTris(play, &this->collider); - Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInit, this->colliderItems); + Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInit, this->colliderElements); for (i = 0; i <= 2; i++) { for (j = 0; j <= 2; j++) { diff --git a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.h b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.h index 4c58b38788..8cd1bb879f 100644 --- a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.h +++ b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.h @@ -11,7 +11,7 @@ typedef void (*BgBombwallActionFunc)(struct BgBombwall*, struct PlayState*); typedef struct BgBombwall { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ ColliderTris collider; - /* 0x0184 */ ColliderTrisElement colliderItems[3]; + /* 0x0184 */ ColliderTrisElement colliderElements[3]; /* 0x0298 */ BgBombwallActionFunc actionFunc; /* 0x029C */ Gfx* dList; /* 0x02A0 */ s16 unk_2A0; diff --git a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c index b64979766c..885967c2bb 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c @@ -114,7 +114,7 @@ void BgHidanDalm_Init(Actor* thisx, PlayState* play) { CollisionHeader_GetVirtual(&gFireTempleHammerableTotemCol, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader); Collider_InitTris(play, &this->collider); - Collider_SetTris(play, &this->collider, thisx, &sTrisInit, this->colliderItems); + Collider_SetTris(play, &this->collider, thisx, &sTrisInit, this->colliderElements); this->switchFlag = PARAMS_GET_U(thisx->params, 8, 8); thisx->params &= 0xFF; diff --git a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.h b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.h index 39a5d64c99..83cabfaab4 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.h +++ b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.h @@ -13,7 +13,7 @@ typedef struct BgHidanDalm { /* 0x0164 */ BgHidanDalmActionFunc actionFunc; /* 0x0168 */ u8 switchFlag; /* 0x016C */ ColliderTris collider; - /* 0x018C */ ColliderTrisElement colliderItems[4]; + /* 0x018C */ ColliderTrisElement colliderElements[4]; } BgHidanDalm; // size = 0x02FC #endif diff --git a/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c b/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c index f882203bd5..92ba5dd5b0 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c @@ -153,7 +153,7 @@ void BgHidanHamstep_Init(Actor* thisx, PlayState* play) { if (PARAMS_GET_U(this->dyna.actor.params, 0, 8) == 0) { Collider_InitTris(play, &this->collider); - Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInit, this->colliderItems); + Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInit, this->colliderElements); for (i = 0; i < 2; i++) { for (i2 = 0; i2 < 3; i2++) { diff --git a/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.h b/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.h index 34c2537203..faf1db7577 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.h +++ b/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.h @@ -11,7 +11,7 @@ typedef void (*BgHidanHamstepActionFunc)(struct BgHidanHamstep*, struct PlayStat typedef struct BgHidanHamstep { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ ColliderTris collider; - /* 0x0184 */ ColliderTrisElement colliderItems[2]; + /* 0x0184 */ ColliderTrisElement colliderElements[2]; /* 0x023C */ BgHidanHamstepActionFunc actionFunc; /* 0x0240 */ s32 action; /* 0x0244 */ s32 unk_244; diff --git a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c index 2fae07b984..a4fd5fab33 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c @@ -95,7 +95,7 @@ void BgHidanHrock_Init(Actor* thisx, PlayState* play) { this->unk_16A = PARAMS_GET_U(thisx->params, 0, 6); thisx->params = PARAMS_GET_U(thisx->params, 8, 8); Collider_InitTris(play, &this->collider); - Collider_SetTris(play, &this->collider, thisx, &sTrisInit, this->colliderItems); + Collider_SetTris(play, &this->collider, thisx, &sTrisInit, this->colliderElements); DynaPolyActor_Init(&this->dyna, 0); sinRotY = Math_SinS(thisx->shape.rot.y); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.h b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.h index 892e44865b..955ddd5dfc 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.h +++ b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.h @@ -14,7 +14,7 @@ typedef struct BgHidanHrock { /* 0x0168 */ s16 unk_168; /* 0x016A */ u8 unk_16A; /* 0x016C */ ColliderTris collider; - /* 0x018C */ ColliderTrisElement colliderItems[2]; + /* 0x018C */ ColliderTrisElement colliderElements[2]; } BgHidanHrock; // size = 0x0244 #endif diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c b/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c index 25263fd571..27312b4fae 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c @@ -103,7 +103,7 @@ void BgHidanKowarerukabe_InitColliderSphere(BgHidanKowarerukabe* this, PlayState s32 pad; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements); this->collider.elements[0].dim.modelSphere.radius = sphereRadii[PARAMS_GET_U(this->dyna.actor.params, 0, 8)]; this->collider.elements[0].dim.modelSphere.center.y = sphereYPositions[PARAMS_GET_U(this->dyna.actor.params, 0, 8)]; diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.h b/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.h index 4fc6befab2..7257a210f1 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.h +++ b/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.h @@ -9,7 +9,7 @@ struct BgHidanKowarerukabe; typedef struct BgHidanKowarerukabe { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ ColliderJntSph collider; - /* 0x0184 */ ColliderJntSphElement colliderItems[1]; + /* 0x0184 */ ColliderJntSphElement colliderElements[1]; } BgHidanKowarerukabe; // size = 0x01C4 #endif diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c index d0ea75d091..715ecc5fba 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c @@ -141,8 +141,8 @@ void BgHidanRsekizou_Init(Actor* thisx, PlayState* play) { CollisionHeader_GetVirtual(&gFireTempleSpinningFlamethrowerCol, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderItems); - for (i = 0; i < ARRAY_COUNT(this->colliderItems); i++) { + Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements); + for (i = 0; i < ARRAY_COUNT(this->colliderElements); i++) { this->collider.elements[i].dim.worldSphere.radius = this->collider.elements[i].dim.modelSphere.radius; } this->burnFrame = 0; @@ -178,7 +178,7 @@ void BgHidanRsekizou_Update(Actor* thisx, PlayState* play) { yawSine = Math_SinS(this->dyna.actor.shape.rot.y); yawCosine = Math_CosS(this->dyna.actor.shape.rot.y); - for (i = 0; i < ARRAY_COUNT(this->colliderItems); i++) { + for (i = 0; i < ARRAY_COUNT(this->colliderElements); i++) { sphere = &this->collider.elements[i]; sphere->dim.worldSphere.center.x = this->dyna.actor.home.pos.x + yawCosine * sphere->dim.modelSphere.center.x + yawSine * sphere->dim.modelSphere.center.z; diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.h b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.h index 13ce01a7f5..82725e4fc1 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.h +++ b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.h @@ -11,7 +11,7 @@ typedef struct BgHidanRsekizou { /* 0x0164 */ s16 bendFrame; /* 0x0166 */ s16 burnFrame; /* 0x0168 */ ColliderJntSph collider; - /* 0x0188 */ ColliderJntSphElement colliderItems[6]; + /* 0x0188 */ ColliderJntSphElement colliderElements[6]; } BgHidanRsekizou; // size = 0x0308 #endif diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c index 840fbeb959..1c86d7d851 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c @@ -165,8 +165,8 @@ void BgHidanSekizou_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->dyna.actor, sInitChain); DynaPolyActor_Init(&this->dyna, 0); Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->elements); - for (i = 0; i < ARRAY_COUNT(this->elements); i++) { + Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements); + for (i = 0; i < ARRAY_COUNT(this->colliderElements); i++) { this->collider.elements[i].dim.worldSphere.radius = this->collider.elements[i].dim.modelSphere.radius; } if (this->dyna.actor.params == 0) { @@ -221,7 +221,7 @@ void func_8088D434(BgHidanSekizou* this, PlayState* play) { } } } - for (i = 3 * phi_s4; i < ARRAY_COUNT(this->elements); i++) { + for (i = 3 * phi_s4; i < ARRAY_COUNT(this->colliderElements); i++) { this->collider.elements[i].base.atElemFlags &= ~ATELEM_ON; this->collider.elements[i].base.ocElemFlags &= ~OCELEM_ON; } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.h b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.h index 45aef4e922..c898f9d934 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.h +++ b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.h @@ -14,7 +14,7 @@ typedef struct BgHidanSekizou { /* 0x0168 */ s16 unk_168[4]; /* 0x0170 */ s16 unk_170; /* 0x0174 */ ColliderJntSph collider; - /* 0x0194 */ ColliderJntSphElement elements[6]; + /* 0x0194 */ ColliderJntSphElement colliderElements[6]; } BgHidanSekizou; // size = 0x0314 #endif diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c index 66f15cd166..20b3717087 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c @@ -107,7 +107,7 @@ void BgHidanSima_Init(Actor* thisx, PlayState* play) { } this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader); Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->elements); + Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements); for (i = 0; i < ARRAY_COUNT(sJntSphElementsInit); i++) { this->collider.elements[i].dim.worldSphere.radius = this->collider.elements[i].dim.modelSphere.radius; } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.h b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.h index a4f5175c8d..dd64b556b0 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.h +++ b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.h @@ -13,7 +13,7 @@ typedef struct BgHidanSima { /* 0x0164 */ BgHidanSimaActionFunc actionFunc; /* 0x0168 */ s16 timer; /* 0x016C */ ColliderJntSph collider; - /* 0x018C */ ColliderJntSphElement elements[2]; + /* 0x018C */ ColliderJntSphElement colliderElements[2]; } BgHidanSima; // size = 0x020C #endif diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c index c7d6fb3d9b..ea2dd59eb2 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c +++ b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c @@ -92,7 +92,7 @@ void BgJyaBombiwa_InitCollider(BgJyaBombiwa* this, PlayState* play) { s32 pad; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements); } void BgJyaBombiwa_Init(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.h b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.h index ed0e29f1e9..6593e49037 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.h +++ b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.h @@ -11,7 +11,7 @@ typedef struct BgJyaBombiwa { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ s32 unk_164; /* 0x0168 */ ColliderJntSph collider; - /* 0x0188 */ ColliderJntSphElement colliderItems[1]; + /* 0x0188 */ ColliderJntSphElement colliderElements[1]; } BgJyaBombiwa; // size = 0x01C8 #endif diff --git a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c index 7226d1a821..f19f5f9baf 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c +++ b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c @@ -87,7 +87,7 @@ void BgJyaHaheniron_ColliderInit(BgJyaHaheniron* this, PlayState* play) { s32 pad; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); } void BgJyaHaheniron_SpawnFragments(PlayState* play, Vec3f* vec1, Vec3f* vec2) { diff --git a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.h b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.h index e8ef33d5d0..2da7d3673f 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.h +++ b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.h @@ -12,7 +12,7 @@ typedef struct BgJyaHaheniron { /* 0x0000 */ Actor actor; /* 0x014C */ BgJyaHahenironActionFunc actionFunc; /* 0x0150 */ ColliderJntSph collider; - /* 0x0170 */ ColliderJntSphElement colliderItems[1]; + /* 0x0170 */ ColliderJntSphElement colliderElements[1]; /* 0x01B0 */ s16 timer; } BgJyaHaheniron; // size = 0x01B4 diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c index 2a2740349e..79102a7c12 100644 --- a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c +++ b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c @@ -74,7 +74,7 @@ void BgMenkuriEye_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChain); Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); this->collider.elements[0].dim.worldSphere.center.x = this->actor.world.pos.x; this->collider.elements[0].dim.worldSphere.center.y = this->actor.world.pos.y; this->collider.elements[0].dim.worldSphere.center.z = this->actor.world.pos.z; diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.h b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.h index 7ed3004edd..69f1e32eab 100644 --- a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.h +++ b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.h @@ -10,7 +10,7 @@ typedef struct BgMenkuriEye { /* 0x0000 */ Actor actor; /* 0x014C */ s16 framesUntilDisable; /* 0x0150 */ ColliderJntSph collider; - /* 0x0170 */ ColliderJntSphElement colliderItems[1]; + /* 0x0170 */ ColliderJntSphElement colliderElements[1]; } BgMenkuriEye; // size = 0x01B0 #endif diff --git a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c index 156a44aa20..787739822f 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c @@ -206,7 +206,8 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) { this->actionFunc = BgMizuBwall_DoNothing; } else { Collider_InitTris(play, &this->collider); - if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitFloor, this->elements)) { + if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitFloor, + this->colliderElements)) { PRINTF("Error : コリジョンデータセット失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_mizu_bwall.c", 484, this->dyna.actor.params); Actor_Kill(&this->dyna.actor); @@ -245,7 +246,8 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) { this->actionFunc = BgMizuBwall_DoNothing; } else { Collider_InitTris(play, &this->collider); - if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitRutoWall, this->elements)) { + if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitRutoWall, + this->colliderElements)) { PRINTF("Error : コリジョンデータセット失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_mizu_bwall.c", 558, this->dyna.actor.params); Actor_Kill(&this->dyna.actor); @@ -284,7 +286,8 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) { this->actionFunc = BgMizuBwall_DoNothing; } else { Collider_InitTris(play, &this->collider); - if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitUnusedWall, this->elements)) { + if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitUnusedWall, + this->colliderElements)) { PRINTF("Error : コリジョンデータセット失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_mizu_bwall.c", 638, this->dyna.actor.params); Actor_Kill(&this->dyna.actor); @@ -326,7 +329,7 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) { } else { Collider_InitTris(play, &this->collider); if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitStingerWall, - this->elements)) { + this->colliderElements)) { PRINTF("Error : コリジョンデータセット失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_mizu_bwall.c", 724, this->dyna.actor.params); Actor_Kill(&this->dyna.actor); @@ -368,7 +371,7 @@ void BgMizuBwall_Init(Actor* thisx, PlayState* play) { } else { Collider_InitTris(play, &this->collider); if (!Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInitStingerWall, - this->elements)) { + this->colliderElements)) { PRINTF("Error : コリジョンデータセット失敗(%s %d)(arg_data 0x%04x)\n", "../z_bg_mizu_bwall.c", 798, this->dyna.actor.params); Actor_Kill(&this->dyna.actor); diff --git a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.h b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.h index 4a23306a39..aacbf321a5 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.h +++ b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.h @@ -11,7 +11,7 @@ typedef void (*BgMizuBwallActionFunc)(struct BgMizuBwall*, struct PlayState*); typedef struct BgMizuBwall { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ ColliderTris collider; - /* 0x0184 */ ColliderTrisElement elements[3]; // only ever uses 2 + /* 0x0184 */ ColliderTrisElement colliderElements[3]; // only ever uses 2 /* 0x0298 */ BgMizuBwallActionFunc actionFunc; /* 0x029C */ f32 yRot; /* 0x02A0 */ s32 scrollAlpha1; diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c index 53bc3b6b47..211f06d3bb 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c @@ -102,7 +102,7 @@ void BgMoriHashigo_InitCollider(BgMoriHashigo* this, PlayState* play) { s32 pad; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements); this->collider.elements[0].dim.worldSphere.center.x = (s16)this->dyna.actor.world.pos.x; this->collider.elements[0].dim.worldSphere.center.y = (s16)this->dyna.actor.world.pos.y + 21; diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h index 4e6e93a5de..d667f933e7 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h +++ b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h @@ -11,7 +11,7 @@ typedef void (*BgMoriHashigoActionFunc)(struct BgMoriHashigo*, PlayState*); typedef struct BgMoriHashigo { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ ColliderJntSph collider; - /* 0x0184 */ ColliderJntSphElement colliderItems[1]; + /* 0x0184 */ ColliderJntSphElement colliderElements[1]; /* 0x01C4 */ BgMoriHashigoActionFunc actionFunc; /* 0x01C8 */ s16 hitTimer; /* 0x01CA */ s16 bounceCounter; diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index 64d7bb9f46..1c5ce99ec1 100644 --- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -216,7 +216,7 @@ void BgPoEvent_Init(Actor* thisx, PlayState* play) { if (this->type >= 2) { Collider_InitTris(play, &this->collider); - Collider_SetTris(play, &this->collider, thisx, &sTrisInit, this->colliderItems); + Collider_SetTris(play, &this->collider, thisx, &sTrisInit, this->colliderElements); if (Flags_GetSwitch(play, thisx->params)) { Actor_Kill(thisx); } else { diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.h b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.h index e279513666..78fe7fc966 100644 --- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.h +++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.h @@ -16,7 +16,7 @@ typedef struct BgPoEvent { /* 0x016A */ s8 direction; /* 0x016C */ s16 timer; /* 0x0170 */ ColliderTris collider; - /* 0x0190 */ ColliderTrisElement colliderItems[2]; + /* 0x0190 */ ColliderTrisElement colliderElements[2]; } BgPoEvent; // size = 0x0248 #endif diff --git a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index d06e292e12..f7576aef8d 100644 --- a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -121,7 +121,7 @@ void BgSpot06Objects_Init(Actor* thisx, PlayState* play) { case LHO_WATER_TEMPLE_ENTRANCE_LOCK: Actor_ProcessInitChain(thisx, sInitChain); Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, thisx, &sJntSphInit, this->colliderItem); + Collider_SetJntSph(play, &this->collider, thisx, &sJntSphInit, this->colliderElements); if (LINK_IS_ADULT && Flags_GetSwitch(play, this->switchFlag)) { if (!GET_EVENTCHKINF(EVENTCHKINF_RESTORED_LAKE_HYLIA)) { diff --git a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.h b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.h index 08fdf1e9af..5b4281d014 100644 --- a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.h +++ b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.h @@ -15,7 +15,7 @@ typedef struct BgSpot06Objects { /* 0x016A */ s16 timer; /* 0x016C */ f32 lakeHyliaWaterLevel; /* 0x0170 */ ColliderJntSph collider; - /* 0x0190 */ ColliderJntSphElement colliderItem[1]; + /* 0x0190 */ ColliderJntSphElement colliderElements[1]; } BgSpot06Objects; // size = 0x01D0 #endif diff --git a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c index 7d44d616d2..e3803b9f4d 100644 --- a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c @@ -97,7 +97,7 @@ void func_808B02D0(BgSpot08Bakudankabe* this, PlayState* play) { s32 pad; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements); } void func_808B0324(BgSpot08Bakudankabe* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.h b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.h index 3be139505d..33c18e1b2f 100644 --- a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.h +++ b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.h @@ -9,7 +9,7 @@ struct BgSpot08Bakudankabe; typedef struct BgSpot08Bakudankabe { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ ColliderJntSph collider; - /* 0x0184 */ ColliderJntSphElement colliderItems[3]; + /* 0x0184 */ ColliderJntSphElement colliderElements[3]; } BgSpot08Bakudankabe; // size = 0x0244 #endif diff --git a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c index 2b799465ce..ea045b8ebb 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c @@ -86,7 +86,7 @@ void BgYdanMaruta_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->dyna.actor, sInitChain); Collider_InitTris(play, &this->collider); - Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInit, this->elements); + Collider_SetTris(play, &this->collider, &this->dyna.actor, &sTrisInit, this->colliderElements); this->switchFlag = PARAMS_GET_U(this->dyna.actor.params, 0, 16); thisx->params = PARAMS_GET_U(thisx->params, 8, 8); // thisx is required to match here diff --git a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.h b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.h index 72b753b83e..ff857fe1a6 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.h +++ b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.h @@ -14,7 +14,7 @@ typedef struct BgYdanMaruta { /* 0x0168 */ u8 switchFlag; /* 0x016A */ s16 unk_16A; /* 0x016C */ ColliderTris collider; - /* 0x018C */ ColliderTrisElement elements[2]; + /* 0x018C */ ColliderTrisElement colliderElements[2]; } BgYdanMaruta; // size = 0x0244 #endif diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index ee1142b45a..d28f674f5c 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -200,7 +200,7 @@ void BossDodongo_Init(Actor* thisx, PlayState* play) { this->unk_224 = 2.0f; this->unk_228 = 9200.0f; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->items); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); if (Flags_GetClear(play, play->roomCtx.curRoom.num)) { // KD is dead u16* temp_s1_3 = SEGMENTED_TO_VIRTUAL(gDodongosCavernBossLavaFloorTex); diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h index dc5398598d..098deb9306 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h @@ -96,7 +96,7 @@ typedef struct BossDodongo { /* 0x0428 */ Vec3f subCamEye; /* 0x0434 */ Vec3f subCamAt; /* 0x0440 */ ColliderJntSph collider; - /* 0x0460 */ ColliderJntSphElement items[19]; + /* 0x0460 */ ColliderJntSphElement colliderElements[19]; /* 0x0920 */ BossDodongoEffect effects[BOSS_DODONGO_EFFECT_COUNT]; } BossDodongo; // size = 0x1820 diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index 1dfc472a45..50fe691b89 100644 --- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -193,7 +193,7 @@ void BossFd_Init(Actor* thisx, PlayState* play) { this->actor.world.pos.x = this->actor.world.pos.z = 0.0f; this->actor.world.pos.y = -200.0f; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->elements); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); for (i = 0; i < 100; i++) { this->bodySegsPos[i].x = this->actor.world.pos.x; diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h index dd1cbc8f0a..eb2a1e0ca9 100644 --- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h +++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h @@ -175,7 +175,7 @@ typedef struct BossFd { /* 0x1488 */ f32 subCamAtYOffset; /* 0x148C */ f32 subCamShake; /* 0x1490 */ ColliderJntSph collider; - /* 0x14B0 */ ColliderJntSphElement elements[19]; + /* 0x14B0 */ ColliderJntSphElement colliderElements[19]; /* 0x1970 */ BossFdEffect effects[BOSSFD_EFFECT_COUNT]; } BossFd; // size = 0x43A0 diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index bf270508c4..065f5ce03a 100644 --- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -185,7 +185,7 @@ void BossFd2_Init(Actor* thisx, PlayState* play) { this->actionFunc = BossFd2_Wait; } Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->elements); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); } void BossFd2_Destroy(Actor* thisx, PlayState* play) { @@ -816,7 +816,7 @@ void BossFd2_CollisionCheck(BossFd2* this, PlayState* play) { if (this->actionFunc == BossFd2_ClawSwipe) { Player* player = GET_PLAYER(play); - for (i = 0; i < ARRAY_COUNT(this->elements); i++) { + for (i = 0; i < ARRAY_COUNT(this->colliderElements); i++) { if (this->collider.elements[i].base.atElemFlags & ATELEM_HIT) { this->collider.elements[i].base.atElemFlags &= ~ATELEM_HIT; Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT); diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h index f2d3ff45ad..15bb14c0ce 100644 --- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h +++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h @@ -83,7 +83,7 @@ typedef struct BossFd2 { /* 0x1414 */ f32 subCamAtYOffset; /* 0x1418 */ f32 subCamShake; /* 0x141C */ ColliderJntSph collider; - /* 0x143C */ ColliderJntSphElement elements[9]; + /* 0x143C */ ColliderJntSphElement colliderElements[9]; } BossFd2; // size = 0x167C #endif diff --git a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c index 1b6f70f93f..5f24de4dfb 100644 --- a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -385,7 +385,7 @@ void BossGoma_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.health = 10; this->actor.colChkInfo.mass = MASS_IMMOVABLE; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderJntSphInit, this->colliderElements); if (Flags_GetClear(play, play->roomCtx.curRoom.num)) { Actor_Kill(&this->actor); diff --git a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.h b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.h index 1f66092ce9..4e4c8ea955 100644 --- a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.h +++ b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.h @@ -150,7 +150,7 @@ typedef struct BossGoma { /* 0x02A8 */ Vec3f defeatedLimbPositions[100]; // only 85/86 first indices actually used /* 0x0758 */ u8 deadLimbsState[100]; // only 85/90 first indices actually used /* 0x07BC */ ColliderJntSph collider; - /* 0x07DC */ ColliderJntSphElement colliderItems[13]; + /* 0x07DC */ ColliderJntSphElement colliderElements[13]; } BossGoma; // size = 0x0B1C #endif diff --git a/src/overlays/actors/ovl_En_Ba/z_en_ba.c b/src/overlays/actors/ovl_En_Ba/z_en_ba.c index 098980836e..829fe5b34d 100644 --- a/src/overlays/actors/ovl_En_Ba/z_en_ba.c +++ b/src/overlays/actors/ovl_En_Ba/z_en_ba.c @@ -118,7 +118,7 @@ void EnBa_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.health = 4; this->actor.colChkInfo.mass = MASS_HEAVY; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); } else { Actor_SetScale(&this->actor, 0.021f); EnBa_SetupFallAsBlob(this); diff --git a/src/overlays/actors/ovl_En_Ba/z_en_ba.h b/src/overlays/actors/ovl_En_Ba/z_en_ba.h index f39fa33995..35f383726e 100644 --- a/src/overlays/actors/ovl_En_Ba/z_en_ba.h +++ b/src/overlays/actors/ovl_En_Ba/z_en_ba.h @@ -31,7 +31,7 @@ typedef struct EnBa { /* 0x031A */ s16 unk_31A; /* 0x031C */ s16 unk_31C; /* 0x0320 */ ColliderJntSph collider; - /* 0x0340 */ ColliderJntSphElement colliderItems[2]; + /* 0x0340 */ ColliderJntSphElement colliderElements[2]; } EnBa; // size = 0x03C0 #endif diff --git a/src/overlays/actors/ovl_En_Bb/z_en_bb.c b/src/overlays/actors/ovl_En_Bb/z_en_bb.c index d93676f337..4076b77fdf 100644 --- a/src/overlays/actors/ovl_En_Bb/z_en_bb.c +++ b/src/overlays/actors/ovl_En_Bb/z_en_bb.c @@ -335,7 +335,7 @@ void EnBb_Init(Actor* thisx, PlayState* play) { this->unk_254 = 0; thisx->colChkInfo.health = 4; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, thisx, &sJntSphInit, this->elements); + Collider_SetJntSph(play, &this->collider, thisx, &sJntSphInit, this->colliderElements); this->actionState = PARAMS_GET_NOMASK(thisx->params, 8); diff --git a/src/overlays/actors/ovl_En_Bb/z_en_bb.h b/src/overlays/actors/ovl_En_Bb/z_en_bb.h index 2ffe375713..0b7e85c461 100644 --- a/src/overlays/actors/ovl_En_Bb/z_en_bb.h +++ b/src/overlays/actors/ovl_En_Bb/z_en_bb.h @@ -41,7 +41,7 @@ typedef struct EnBb { /* 0x02A8 */ s16 fireIceTimer; /* 0x02AA */ u8 dmgEffect; /* 0x02AC */ ColliderJntSph collider; - /* 0x02CC */ ColliderJntSphElement elements[1]; + /* 0x02CC */ ColliderJntSphElement colliderElements[1]; /* 0x030C */ BodyBreak bodyBreak; /* 0x0324 */ Actor* targetActor; } EnBb; // size = 0x0328 diff --git a/src/overlays/actors/ovl_En_Butte/z_en_butte.c b/src/overlays/actors/ovl_En_Butte/z_en_butte.c index b3deb35f9e..3d721c28ff 100644 --- a/src/overlays/actors/ovl_En_Butte/z_en_butte.c +++ b/src/overlays/actors/ovl_En_Butte/z_en_butte.c @@ -159,7 +159,7 @@ void EnButte_Init(Actor* thisx, PlayState* play) { SkelAnime_Init(play, &this->skelAnime, &gButterflySkel, &gButterflyAnim, this->jointTable, this->morphTable, 8); Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderInit, this->colliderElements); this->actor.colChkInfo.mass = 0; this->unk_25C = Rand_ZeroOne() * 0xFFFF; this->unk_25E = Rand_ZeroOne() * 0xFFFF; diff --git a/src/overlays/actors/ovl_En_Butte/z_en_butte.h b/src/overlays/actors/ovl_En_Butte/z_en_butte.h index 1a34747dbd..345a41dc11 100644 --- a/src/overlays/actors/ovl_En_Butte/z_en_butte.h +++ b/src/overlays/actors/ovl_En_Butte/z_en_butte.h @@ -11,7 +11,7 @@ typedef void (*EnButteActionFunc)(struct EnButte*, PlayState*); typedef struct EnButte { /* 0x0000 */ Actor actor; /* 0x014C */ ColliderJntSph collider; - /* 0x016C */ ColliderJntSphElement colliderItems[1]; + /* 0x016C */ ColliderJntSphElement colliderElements[1]; /* 0x01AC */ SkelAnime skelAnime; /* 0x01F0 */ Vec3s jointTable[8]; /* 0x0220 */ Vec3s morphTable[8]; diff --git a/src/overlays/actors/ovl_En_Crow/z_en_crow.c b/src/overlays/actors/ovl_En_Crow/z_en_crow.c index 977d0a5e29..3ce86ff9d3 100644 --- a/src/overlays/actors/ovl_En_Crow/z_en_crow.c +++ b/src/overlays/actors/ovl_En_Crow/z_en_crow.c @@ -124,7 +124,7 @@ void EnCrow_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChain); SkelAnime_InitFlex(play, &this->skelAnime, &gGuaySkel, &gGuayFlyAnim, this->jointTable, this->morphTable, 9); Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); this->collider.elements[0].dim.worldSphere.radius = sJntSphInit.elements[0].dim.modelSphere.radius; CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); ActorShape_Init(&this->actor.shape, 2000.0f, ActorShadow_DrawCircle, 20.0f); diff --git a/src/overlays/actors/ovl_En_Crow/z_en_crow.h b/src/overlays/actors/ovl_En_Crow/z_en_crow.h index 153634818b..fb13e7bca6 100644 --- a/src/overlays/actors/ovl_En_Crow/z_en_crow.h +++ b/src/overlays/actors/ovl_En_Crow/z_en_crow.h @@ -19,7 +19,7 @@ typedef struct EnCrow { /* 0x01CA */ Vec3s jointTable[9]; /* 0x0200 */ Vec3s morphTable[9]; /* 0x0238 */ ColliderJntSph collider; - /* 0x0258 */ ColliderJntSphElement colliderItems[1]; + /* 0x0258 */ ColliderJntSphElement colliderElements[1]; } EnCrow; // size = 0x0298 #endif diff --git a/src/overlays/actors/ovl_En_Dha/z_en_dha.c b/src/overlays/actors/ovl_En_Dha/z_en_dha.c index 9da4c1b8b0..599c175696 100644 --- a/src/overlays/actors/ovl_En_Dha/z_en_dha.c +++ b/src/overlays/actors/ovl_En_Dha/z_en_dha.c @@ -178,7 +178,7 @@ void EnDha_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.health = 8; this->limbAngleX[0] = -0x4000; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItem); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; EnDha_SetupWait(this); diff --git a/src/overlays/actors/ovl_En_Dha/z_en_dha.h b/src/overlays/actors/ovl_En_Dha/z_en_dha.h index 0f4e072c09..f7cbd78d7b 100644 --- a/src/overlays/actors/ovl_En_Dha/z_en_dha.h +++ b/src/overlays/actors/ovl_En_Dha/z_en_dha.h @@ -24,7 +24,7 @@ typedef struct EnDha { /* 0x01DC */ Vec3f handPos[2]; /* 0x01F4 */ Vec3f armPos; /* 0x0200 */ ColliderJntSph collider; - /* 0x0220 */ ColliderJntSphElement colliderItem[5]; + /* 0x0220 */ ColliderJntSphElement colliderElements[5]; } EnDha; // size = 0x0360 #endif diff --git a/src/overlays/actors/ovl_En_Fd/z_en_fd.c b/src/overlays/actors/ovl_En_Fd/z_en_fd.c index 785b4937aa..8f6bb89253 100644 --- a/src/overlays/actors/ovl_En_Fd/z_en_fd.c +++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.c @@ -460,7 +460,7 @@ void EnFd_Init(Actor* thisx, PlayState* play) { SkelAnime_InitFlex(play, &this->skelAnime, &gFlareDancerSkel, NULL, this->jointTable, this->morphTable, 27); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 32.0f); Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colSphs); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0xF), &sColChkInit); this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT; diff --git a/src/overlays/actors/ovl_En_Fd/z_en_fd.h b/src/overlays/actors/ovl_En_Fd/z_en_fd.h index 3559410526..e68ac87880 100644 --- a/src/overlays/actors/ovl_En_Fd/z_en_fd.h +++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.h @@ -34,7 +34,7 @@ typedef struct EnFd { /* 0x014C */ SkelAnime skelAnime; /* 0x0190 */ EnFdActionFunc actionFunc; /* 0x0194 */ ColliderJntSph collider; - /* 0x01B4 */ ColliderJntSphElement colSphs[12]; + /* 0x01B4 */ ColliderJntSphElement colliderElements[12]; /* 0x04B4 */ u8 coreActive; /* 0x04B6 */ s16 initYawToInitPos; /* 0x04B8 */ s16 curYawToInitPos; diff --git a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c index 23f7a29776..e674ee9bf5 100644 --- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c +++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c @@ -159,7 +159,7 @@ void EnFirefly_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); SkelAnime_Init(play, &this->skelAnime, &gKeeseSkeleton, &gKeeseFlyAnim, this->jointTable, this->morphTable, 28); Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); if (PARAMS_GET_NOSHIFT(this->actor.params, 15, 1) != 0) { diff --git a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.h b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.h index 529815b7f7..7638036a82 100644 --- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.h +++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.h @@ -21,7 +21,7 @@ typedef struct EnFirefly { /* 0x0266 */ Vec3s morphTable[28]; /* 0x0310 */ f32 maxAltitude; /* 0x0314 */ ColliderJntSph collider; - /* 0x0344 */ ColliderJntSphElement colliderItems[1]; + /* 0x0344 */ ColliderJntSphElement colliderElements[1]; } EnFirefly; // size = 0x0374 typedef enum KeeseType { diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/src/overlays/actors/ovl_En_Fish/z_en_fish.c index 8ef16187f3..f2f9185a72 100644 --- a/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -135,7 +135,7 @@ void EnFish_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChain); SkelAnime_InitFlex(play, &this->skelAnime, &gFishSkel, &gFishInWaterAnim, this->jointTable, this->morphTable, 7); Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); this->actor.colChkInfo.mass = 50; this->slowPhase = Rand_ZeroOne() * (0xFFFF + 0.5f); this->fastPhase = Rand_ZeroOne() * (0xFFFF + 0.5f); diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.h b/src/overlays/actors/ovl_En_Fish/z_en_fish.h index 01cdbd0b36..d75de5b0a5 100644 --- a/src/overlays/actors/ovl_En_Fish/z_en_fish.h +++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.h @@ -11,7 +11,7 @@ typedef void (*EnFishActionFunc)(struct EnFish*, struct PlayState*); typedef struct EnFish { /* 0x0000 */ Actor actor; /* 0x014C */ ColliderJntSph collider; - /* 0x016C */ ColliderJntSphElement colliderItems[1]; + /* 0x016C */ ColliderJntSphElement colliderElements[1]; /* 0x01AC */ SkelAnime skelAnime; /* 0x01F0 */ Vec3s jointTable[7]; /* 0x021A */ Vec3s morphTable[7]; diff --git a/src/overlays/actors/ovl_En_Fw/z_en_fw.c b/src/overlays/actors/ovl_En_Fw/z_en_fw.c index 7332f89eaa..b9a678d699 100644 --- a/src/overlays/actors/ovl_En_Fw/z_en_fw.c +++ b/src/overlays/actors/ovl_En_Fw/z_en_fw.c @@ -206,7 +206,7 @@ void EnFw_Init(Actor* thisx, PlayState* play) { Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENFW_ANIM_0); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->sphs); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0x10), &D_80A1FB94); Actor_SetScale(&this->actor, 0.01f); this->runDirection = -this->actor.params; diff --git a/src/overlays/actors/ovl_En_Fw/z_en_fw.h b/src/overlays/actors/ovl_En_Fw/z_en_fw.h index 7342d1f606..b19f967111 100644 --- a/src/overlays/actors/ovl_En_Fw/z_en_fw.h +++ b/src/overlays/actors/ovl_En_Fw/z_en_fw.h @@ -28,7 +28,7 @@ typedef struct EnFw { /* 0x014C */ SkelAnime skelAnime; /* 0x0190 */ EnFwActionFunc actionFunc; /* 0x0194 */ ColliderJntSph collider; - /* 0x01B4 */ ColliderJntSphElement sphs[1]; + /* 0x01B4 */ ColliderJntSphElement colliderElements[1]; /* 0x01F4 */ Vec3f bompPos; /* 0x0200 */ u8 lastDmgHook; /* 0x0202 */ s16 runDirection; diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c index 56f7b6d975..944add8533 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -105,7 +105,7 @@ void EnGoroiwa_InitCollider(EnGoroiwa* this, PlayState* play) { s32 pad; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); EnGoroiwa_UpdateCollider(this); this->collider.elements[0].dim.worldSphere.radius = 58; } diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.h b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.h index 6285432936..311ee5f94d 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.h +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.h @@ -12,7 +12,7 @@ typedef struct EnGoroiwa { /* 0x0000 */ Actor actor; /* 0x014C */ EnGoroiwaActionFunc actionFunc; /* 0x0150 */ ColliderJntSph collider; - /* 0x0170 */ ColliderJntSphElement colliderItems[1]; + /* 0x0170 */ ColliderJntSphElement colliderElements[1]; /* 0x01B0 */ Vec3f prevUnitRollAxis; /* 0x01BC */ f32 prevRollAngleDiff; /* 0x01C0 */ f32 rollRotSpeed; diff --git a/src/overlays/actors/ovl_En_Ny/z_en_ny.c b/src/overlays/actors/ovl_En_Ny/z_en_ny.c index 37bc973c1c..bf71620dc3 100644 --- a/src/overlays/actors/ovl_En_Ny/z_en_ny.c +++ b/src/overlays/actors/ovl_En_Ny/z_en_ny.c @@ -124,7 +124,7 @@ void EnNy_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.damageTable = &sDamageTable; this->actor.colChkInfo.health = 2; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderInit, this->elements); + Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderInit, this->colliderElements); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); this->unk_1CA = 0; this->unk_1D0 = 0; diff --git a/src/overlays/actors/ovl_En_Ny/z_en_ny.h b/src/overlays/actors/ovl_En_Ny/z_en_ny.h index 477fcf7b5c..03cace42fb 100644 --- a/src/overlays/actors/ovl_En_Ny/z_en_ny.h +++ b/src/overlays/actors/ovl_En_Ny/z_en_ny.h @@ -12,7 +12,7 @@ typedef struct EnNy { /* 0x0000 */ Actor actor; /* 0x014C */ EnNyActionFunc actionFunc; /* 0x0150 */ ColliderJntSph collider; - /* 0x0170 */ ColliderJntSphElement elements[1]; + /* 0x0170 */ ColliderJntSphElement colliderElements[1]; /* 0x01B0 */ char unk_1B0[0x18]; /* 0x01C8 */ s16 timer; /* 0x01CA */ s16 unk_1CA; diff --git a/src/overlays/actors/ovl_En_Skb/z_en_skb.c b/src/overlays/actors/ovl_En_Skb/z_en_skb.c index b6a7ef4398..f7b41eb316 100644 --- a/src/overlays/actors/ovl_En_Skb/z_en_skb.c +++ b/src/overlays/actors/ovl_En_Skb/z_en_skb.c @@ -182,7 +182,7 @@ void EnSkb_Init(Actor* thisx, PlayState* play) { this->actor.naviEnemyId = NAVI_ENEMY_STALCHILD; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItem); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); Actor_SetScale(&this->actor, ((this->actor.params * 0.1f) + 1.0f) * 0.01f); this->collider.elements[0].dim.modelSphere.radius = this->collider.elements[0].dim.worldSphere.radius = diff --git a/src/overlays/actors/ovl_En_Skb/z_en_skb.h b/src/overlays/actors/ovl_En_Skb/z_en_skb.h index dc5f15f9c0..dd96d9e16e 100644 --- a/src/overlays/actors/ovl_En_Skb/z_en_skb.h +++ b/src/overlays/actors/ovl_En_Skb/z_en_skb.h @@ -21,7 +21,7 @@ typedef struct EnSkb { /* 0x0288 */ s16 headlessYawOffset; /* 0x028C */ BodyBreak bodyBreak; /* 0x02A4 */ ColliderJntSph collider; - /* 0x02C4 */ ColliderJntSphElement colliderItem[2]; + /* 0x02C4 */ ColliderJntSphElement colliderElements[2]; } EnSkb; // size = 0x0344 #endif diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/src/overlays/actors/ovl_En_Sw/z_en_sw.c index bb80c4bfcf..bce08a0853 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -255,7 +255,7 @@ void EnSw_Init(Actor* thisx, PlayState* play) { Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENSW_ANIM_0); ActorShape_Init(&thisx->shape, 0.0f, NULL, 0.0f); Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->sphs); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0xE), &D_80B0F074); this->actor.scale.x = 0.02f; diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.h b/src/overlays/actors/ovl_En_Sw/z_en_sw.h index 20e1888e55..fe68092667 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.h +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.h @@ -13,7 +13,7 @@ typedef struct EnSw { /* 0x014C */ SkelAnime skelAnime; /* 0x0190 */ EnSwActionFunc actionFunc; /* 0x0194 */ ColliderJntSph collider; - /* 0x01B4 */ ColliderJntSphElement sphs[1]; + /* 0x01B4 */ ColliderJntSphElement colliderElements[1]; /* 0x01F4 */ Color_RGBA8 unk_1F4; /* 0x01F8 */ Vec3s jointTable[30]; /* 0x02AC */ Vec3s morphTable[30]; diff --git a/src/overlays/actors/ovl_En_Tp/z_en_tp.c b/src/overlays/actors/ovl_En_Tp/z_en_tp.c index e18621b19e..a1ce22995c 100644 --- a/src/overlays/actors/ovl_En_Tp/z_en_tp.c +++ b/src/overlays/actors/ovl_En_Tp/z_en_tp.c @@ -161,7 +161,7 @@ void EnTp_Init(Actor* thisx, PlayState* play2) { now = this; this->alpha = 255; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); if (this->actor.params <= TAILPASARAN_HEAD) { this->actor.naviEnemyId = NAVI_ENEMY_TAILPASARAN; diff --git a/src/overlays/actors/ovl_En_Tp/z_en_tp.h b/src/overlays/actors/ovl_En_Tp/z_en_tp.h index 5b0645b50a..71fdca8188 100644 --- a/src/overlays/actors/ovl_En_Tp/z_en_tp.h +++ b/src/overlays/actors/ovl_En_Tp/z_en_tp.h @@ -24,7 +24,7 @@ typedef struct EnTp { /* 0x016C */ f32 horizontalVariation; /* 0x0170 */ f32 extraHeightVariation; /* 0x0174 */ ColliderJntSph collider; - /* 0x0194 */ ColliderJntSphElement colliderItems[1]; + /* 0x0194 */ ColliderJntSphElement colliderElements[1]; /* 0x01D4 */ struct EnTp* head; } EnTp; // size = 0x01D8 diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c index 495ca93b33..d3affc90a9 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -162,7 +162,7 @@ void ObjComb_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChain); Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); ObjComb_SetupWait(this); } diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h index 331648ed33..acda97f16d 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h @@ -12,7 +12,7 @@ typedef struct ObjComb { /* 0x0000 */ Actor actor; /* 0x014C */ ObjCombActionFunc actionFunc; /* 0x0150 */ ColliderJntSph collider; - /* 0x0170 */ ColliderJntSphElement colliderItems[1]; + /* 0x0170 */ ColliderJntSphElement colliderElements[1]; /* 0x01B0 */ s16 unk_1B0; /* 0x01B2 */ s16 unk_1B2; } ObjComb; // size = 0x01B4 diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c index adecf7e08b..24bcb06a6a 100644 --- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c +++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c @@ -92,7 +92,7 @@ void ObjLightswitch_InitCollider(ObjLightswitch* this, PlayState* play) { s32 pad; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderJntSphInit, this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderJntSphInit, this->colliderElements); Matrix_SetTranslateRotateYXZ(this->actor.world.pos.x, this->actor.world.pos.y + (this->actor.shape.yOffset * this->actor.scale.y), this->actor.world.pos.z, &this->actor.shape.rot); diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h index 78af71ed99..54b7e162f7 100644 --- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h +++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h @@ -19,7 +19,7 @@ typedef struct ObjLightswitch { /* 0x0000 */ Actor actor; /* 0x014C */ ObjLightswitchActionFunc actionFunc; /* 0x0150 */ ColliderJntSph collider; - /* 0x0170 */ ColliderJntSphElement colliderItems[1]; + /* 0x0170 */ ColliderJntSphElement colliderElements[1]; /* 0x01B0 */ s16 timer; // collision-related threshold and controls animation/logic when turning on/off /* 0x01B2 */ s16 toggleDelay; // timer ticking down used for delaying tuning on/off or disappearing, can be bypassed /* 0x01B4 */ s16 faceTextureIndex; // texture used by the center part of the sun diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index e791de6297..e04c33a59b 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -213,7 +213,7 @@ void ObjSwitch_InitJntSphCollider(ObjSwitch* this, PlayState* play, ColliderJntS ColliderJntSph* colliderJntSph = &this->jntSph.col; Collider_InitJntSph(play, colliderJntSph); - Collider_SetJntSph(play, colliderJntSph, &this->dyna.actor, colliderJntSphInit, this->jntSph.items); + Collider_SetJntSph(play, colliderJntSph, &this->dyna.actor, colliderJntSphInit, this->jntSph.elements); Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y + this->dyna.actor.shape.yOffset * this->dyna.actor.scale.y, @@ -229,7 +229,7 @@ void ObjSwitch_InitTrisCollider(ObjSwitch* this, PlayState* play, ColliderTrisIn Vec3f pos[3]; Collider_InitTris(play, colliderTris); - Collider_SetTris(play, colliderTris, &this->dyna.actor, colliderTrisInit, this->tris.items); + Collider_SetTris(play, colliderTris, &this->dyna.actor, colliderTrisInit, this->tris.elements); for (i = 0; i < 2; i++) { for (j = 0; j < 3; j++) { diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h index b6fb243f70..9e6475eb2b 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h @@ -27,12 +27,12 @@ typedef enum ObjSwitchSubType { typedef struct ObjSwitchJntSph { /* 0x00 */ ColliderJntSph col; - /* 0x20 */ ColliderJntSphElement items[1]; + /* 0x20 */ ColliderJntSphElement elements[1]; } ObjSwitchJntSph; typedef struct ObjSwitchTris { /* 0x00 */ ColliderTris col; - /* 0x20 */ ColliderTrisElement items[2]; + /* 0x20 */ ColliderTrisElement elements[2]; } ObjSwitchTris; typedef struct ObjSwitch { From ae89a8e47b977728407b20423a4472023f94e65b Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Tue, 11 Feb 2025 15:02:05 +0100 Subject: [PATCH 04/15] Polish up docs on EnDaiku and EnDaikuKakariko (#2463) --- src/overlays/actors/ovl_En_Daiku/z_en_daiku.c | 46 +++++++++---------- .../z_en_daiku_kakariko.c | 44 ++++++++++-------- 2 files changed, 48 insertions(+), 42 deletions(-) diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index 64b3cc1088..9cd69ab649 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -5,6 +5,8 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) #define ENDAIKU_GET_TYPE(thisx) PARAMS_GET_U((thisx)->params, 0, 2) +#define ENDAIKU_GET_PATH_INDEX(thisx) PARAMS_GET_U((thisx)->params, 4, 4) +#define ENDAIKU_GET_DOOR_SWITCH_FLAG(thisx) PARAMS_GET_U((thisx)->params, 8, 6) typedef struct EnDaikuEscapeSubCamParam { Vec3f eyePosDeltaLocal; @@ -13,10 +15,10 @@ typedef struct EnDaikuEscapeSubCamParam { // state flags -// probably related to animating torso and head to look towards the player -#define ENDAIKU_STATEFLAG_1 (1 << 1) -// same -#define ENDAIKU_STATEFLAG_2 (1 << 2) +// the carpenter tracks the player position +#define ENDAIKU_STATEFLAG_TRACK_PLAYER (1 << 1) +// if tracking the player, track with the carpenter's full body +#define ENDAIKU_STATEFLAG_TRACK_WITH_FULL_BODY (1 << 2) // the gerudo guard appeared (after talking to the carpenter) #define ENDAIKU_STATEFLAG_GERUDOFIGHTING (1 << 3) // the gerudo guard was defeated @@ -121,9 +123,9 @@ typedef enum EnDaikuAnimation { } EnDaikuAnimation; static AnimationFrameCountInfo sAnimationInfo[] = { - { &object_daiku_Anim_001AB0, 1.0f, 0, 0 }, { &object_daiku_Anim_007DE0, 1.0f, 0, 0 }, - { &object_daiku_Anim_00885C, 1.0f, 0, 0 }, { &object_daiku_Anim_000C44, 1.0f, 0, 0 }, - { &object_daiku_Anim_008164, 1.0f, 0, 0 }, + { &object_daiku_Anim_001AB0, 1.0f, ANIMMODE_LOOP, 0 }, { &object_daiku_Anim_007DE0, 1.0f, ANIMMODE_LOOP, 0 }, + { &object_daiku_Anim_00885C, 1.0f, ANIMMODE_LOOP, 0 }, { &object_daiku_Anim_000C44, 1.0f, ANIMMODE_LOOP, 0 }, + { &object_daiku_Anim_008164, 1.0f, ANIMMODE_LOOP, 0 }, }; static EnDaikuEscapeSubCamParam sEscapeSubCamParams[] = { @@ -199,15 +201,15 @@ void EnDaiku_Init(Actor* thisx, PlayState* play) { if (play->sceneId == SCENE_THIEVES_HIDEOUT) { EnDaiku_ChangeAnim(this, ENDAIKU_ANIM_STAND, &this->currentAnimIndex); - this->stateFlags |= ENDAIKU_STATEFLAG_1 | ENDAIKU_STATEFLAG_2; + this->stateFlags |= ENDAIKU_STATEFLAG_TRACK_PLAYER | ENDAIKU_STATEFLAG_TRACK_WITH_FULL_BODY; this->actionFunc = EnDaiku_Jailed; } else { if (ENDAIKU_GET_TYPE(&this->actor) == ENDAIKU_TYPE1 || ENDAIKU_GET_TYPE(&this->actor) == ENDAIKU_TYPE3) { EnDaiku_ChangeAnim(this, ENDAIKU_ANIM_SIT, &this->currentAnimIndex); - this->stateFlags |= ENDAIKU_STATEFLAG_1; + this->stateFlags |= ENDAIKU_STATEFLAG_TRACK_PLAYER; } else { EnDaiku_ChangeAnim(this, ENDAIKU_ANIM_SHOUT, &this->currentAnimIndex); - this->stateFlags |= ENDAIKU_STATEFLAG_1 | ENDAIKU_STATEFLAG_2; + this->stateFlags |= ENDAIKU_STATEFLAG_TRACK_PLAYER | ENDAIKU_STATEFLAG_TRACK_WITH_FULL_BODY; } this->skelAnime.curFrame = (s32)(Rand_ZeroOne() * this->skelAnime.endFrame); @@ -257,17 +259,17 @@ s32 EnDaiku_UpdateTalking(EnDaiku* this, PlayState* play) { void EnDaiku_UpdateText(EnDaiku* this, PlayState* play) { s32 carpenterType; s32 rescuedCount; - s16 sp2E; - s16 sp2C; + s16 screenX; + s16 screenY; if (this->talkState == ENDAIKU_STATE_TALKING) { this->talkState = EnDaiku_UpdateTalking(this, play); } else if (Actor_TalkOfferAccepted(&this->actor, play)) { this->talkState = ENDAIKU_STATE_TALKING; } else { - Actor_GetScreenPos(play, &this->actor, &sp2E, &sp2C); - if (sp2E >= 0 && sp2E <= 320 && sp2C >= 0 && sp2C <= 240 && this->talkState == ENDAIKU_STATE_CAN_TALK && - Actor_OfferTalk(&this->actor, play, 100.0f) == 1) { + Actor_GetScreenPos(play, &this->actor, &screenX, &screenY); + if ((screenX >= 0) && (screenX <= SCREEN_WIDTH) && (screenY >= 0) && (screenY <= SCREEN_HEIGHT) && + (this->talkState == ENDAIKU_STATE_CAN_TALK) && (Actor_OfferTalk(&this->actor, play, 100.0f) == true)) { if (play->sceneId == SCENE_THIEVES_HIDEOUT) { if (this->stateFlags & ENDAIKU_STATEFLAG_GERUDODEFEATED) { rescuedCount = 0; @@ -352,8 +354,6 @@ void EnDaiku_TentIdle(EnDaiku* this, PlayState* play) { */ void EnDaiku_Jailed(EnDaiku* this, PlayState* play) { EnGeldB* gerudo; - s32 temp_t9; - s32 temp_v1; if (!(this->stateFlags & ENDAIKU_STATEFLAG_GERUDOFIGHTING)) { EnDaiku_UpdateText(this, play); @@ -379,7 +379,7 @@ void EnDaiku_Jailed(EnDaiku* this, PlayState* play) { void EnDaiku_WaitFreedom(EnDaiku* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (Flags_GetSwitch(play, PARAMS_GET_U(this->actor.params, 8, 6))) { + if (Flags_GetSwitch(play, ENDAIKU_GET_DOOR_SWITCH_FLAG(&this->actor))) { this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY; EnDaiku_UpdateText(this, play); } @@ -398,7 +398,7 @@ void EnDaiku_InitEscape(EnDaiku* this, PlayState* play) { Audio_PlayFanfare(NA_BGM_APPEAR); EnDaiku_ChangeAnim(this, ENDAIKU_ANIM_RUN, &this->currentAnimIndex); - this->stateFlags &= ~(ENDAIKU_STATEFLAG_1 | ENDAIKU_STATEFLAG_2); + this->stateFlags &= ~(ENDAIKU_STATEFLAG_TRACK_PLAYER | ENDAIKU_STATEFLAG_TRACK_WITH_FULL_BODY); ENDAIKU_SET_CARPENTER_RESCUED(ENDAIKU_GET_TYPE(&this->actor)); @@ -407,7 +407,7 @@ void EnDaiku_InitEscape(EnDaiku* this, PlayState* play) { EnDaiku_InitSubCamera(this, play); exitLoop = false; - path = &play->pathList[PARAMS_GET_U(this->actor.params, 4, 4)]; + path = &play->pathList[ENDAIKU_GET_PATH_INDEX(&this->actor)]; while (!exitLoop) { pointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->waypoint; dx = pointPos->x - this->actor.world.pos.x; @@ -524,7 +524,7 @@ void EnDaiku_EscapeRun(EnDaiku* this, PlayState* play) { f32 dxz; Vec3s* pointPos; - path = &play->pathList[PARAMS_GET_U(this->actor.params, 4, 4)]; + path = &play->pathList[ENDAIKU_GET_PATH_INDEX(&this->actor)]; pointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->waypoint; dx = pointPos->x - this->actor.world.pos.x; dz = pointPos->z - this->actor.world.pos.z; @@ -574,12 +574,12 @@ void EnDaiku_Update(Actor* thisx, PlayState* play) { this->actionFunc(this, play); - if (this->stateFlags & ENDAIKU_STATEFLAG_1) { + if (this->stateFlags & ENDAIKU_STATEFLAG_TRACK_PLAYER) { this->interactInfo.trackPos.x = player->actor.focus.pos.x; this->interactInfo.trackPos.y = player->actor.focus.pos.y; this->interactInfo.trackPos.z = player->actor.focus.pos.z; - if (this->stateFlags & ENDAIKU_STATEFLAG_2) { + if (this->stateFlags & ENDAIKU_STATEFLAG_TRACK_WITH_FULL_BODY) { Npc_TrackPoint(&this->actor, &this->interactInfo, 0, NPC_TRACKING_FULL_BODY); } else { Npc_TrackPoint(&this->actor, &this->interactInfo, 0, NPC_TRACKING_HEAD_AND_TORSO); diff --git a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c index 6b27191f79..982de2b697 100644 --- a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c +++ b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c @@ -9,6 +9,9 @@ #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) +#define ENDAIKUKAKARIKO_GET_TYPE(thisx) PARAMS_GET_U((thisx)->params, 0, 2) +#define ENDAIKUKAKARIKO_GET_PATH_INDEX(thisx) PARAMS_GET_U((thisx)->params, 8, 8) + typedef enum KakarikoCarpenterType { /* 0x0 */ CARPENTER_ICHIRO, // Red and purple pants, normal hair /* 0x1 */ CARPENTER_SABOORO, // Light blue pants @@ -103,9 +106,12 @@ typedef enum EnDaikuKakarikoAnimation { } EnDaikuKakarikoAnimation; static AnimationFrameCountInfo sAnimationInfo[] = { - { &object_daiku_Anim_001AB0, 1.0f, 2, -7.0f }, { &object_daiku_Anim_007DE0, 1.0f, 0, -7.0f }, - { &object_daiku_Anim_00885C, 1.0f, 0, -7.0f }, { &object_daiku_Anim_000C44, 1.0f, 0, -7.0f }, - { &object_daiku_Anim_000600, 1.0f, 0, -7.0f }, { &object_daiku_Anim_008164, 1.0f, 0, -7.0f }, + { &object_daiku_Anim_001AB0, 1.0f, ANIMMODE_ONCE, -7.0f }, + { &object_daiku_Anim_007DE0, 1.0f, ANIMMODE_LOOP, -7.0f }, + { &object_daiku_Anim_00885C, 1.0f, ANIMMODE_LOOP, -7.0f }, + { &object_daiku_Anim_000C44, 1.0f, ANIMMODE_LOOP, -7.0f }, + { &object_daiku_Anim_000600, 1.0f, ANIMMODE_LOOP, -7.0f }, + { &object_daiku_Anim_008164, 1.0f, ANIMMODE_LOOP, -7.0f }, }; void EnDaikuKakariko_ChangeAnim(EnDaikuKakariko* this, s32 index, s32* currentIndex) { @@ -133,7 +139,7 @@ void EnDaikuKakariko_Init(Actor* thisx, PlayState* play) { case SCENE_KAKARIKO_VILLAGE: if (IS_DAY) { this->flags |= 1; - this->flags |= initFlags[PARAMS_GET_U(this->actor.params, 0, 2)]; + this->flags |= initFlags[ENDAIKUKAKARIKO_GET_TYPE(&this->actor)]; } break; case SCENE_KAKARIKO_CENTER_GUEST_HOUSE: @@ -184,8 +190,8 @@ void EnDaikuKakariko_Init(Actor* thisx, PlayState* play) { this->actionFunc = EnDaikuKakariko_Run; } else { if (this->flags & 8) { - if ((PARAMS_GET_U(this->actor.params, 0, 2) == CARPENTER_SABOORO) || - (PARAMS_GET_U(this->actor.params, 0, 2) == CARPENTER_SHIRO)) { + if ((ENDAIKUKAKARIKO_GET_TYPE(&this->actor) == CARPENTER_SABOORO) || + (ENDAIKUKAKARIKO_GET_TYPE(&this->actor) == CARPENTER_SHIRO)) { EnDaikuKakariko_ChangeAnim(this, ENDAIKUKAKARIKO_ANIM_5, &this->currentAnimIndex); this->flags |= 0x800; } else { @@ -233,23 +239,23 @@ void EnDaikuKakariko_HandleTalking(EnDaikuKakariko* this, PlayState* play) { MASK_REACTION_SET_CARPENTER_3, MASK_REACTION_SET_CARPENTER_4, }; - s16 sp26; - s16 sp24; + s16 screenX; + s16 screenY; if (this->talkState == 2) { this->talkState = EnDaikuKakariko_GetTalkState(this, play); } else if (Actor_TalkOfferAccepted(&this->actor, play)) { this->talkState = 2; } else { - Actor_GetScreenPos(play, &this->actor, &sp26, &sp24); + Actor_GetScreenPos(play, &this->actor, &screenX, &screenY); - if ((sp26 >= 0) && (sp26 <= 320) && (sp24 >= 0) && (sp24 <= 240) && (this->talkState == 0) && - (Actor_OfferTalk(&this->actor, play, 100.0f) == 1)) { + if ((screenX >= 0) && (screenX <= SCREEN_WIDTH) && (screenY >= 0) && (screenY <= SCREEN_HEIGHT) && + (this->talkState == 0) && (Actor_OfferTalk(&this->actor, play, 100.0f) == true)) { this->actor.textId = - MaskReaction_GetTextId(play, sMaskReactionSets[PARAMS_GET_U(this->actor.params, 0, 2)]); + MaskReaction_GetTextId(play, sMaskReactionSets[ENDAIKUKAKARIKO_GET_TYPE(&this->actor)]); if (this->actor.textId == 0) { - switch (PARAMS_GET_U(this->actor.params, 0, 2)) { + switch (ENDAIKUKAKARIKO_GET_TYPE(&this->actor)) { case 0: if (this->flags & 8) { this->actor.textId = 0x5076; @@ -366,7 +372,7 @@ void EnDaikuKakariko_Run(EnDaikuKakariko* this, PlayState* play) { s32 run; do { - path = &play->pathList[PARAMS_GET_U(this->actor.params, 8, 8)]; + path = &play->pathList[ENDAIKUKAKARIKO_GET_PATH_INDEX(&this->actor)]; pathPos = &((Vec3s*)SEGMENTED_TO_VIRTUAL(path->points))[this->waypoint]; xDist = pathPos->x - this->actor.world.pos.x; zDist = pathPos->z - this->actor.world.pos.z; @@ -538,7 +544,7 @@ void EnDaikuKakariko_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, V if (limbIndex == 15) { Matrix_MultVec3f(&unkVec, &this->actor.focus.pos); - gSPDisplayList(POLY_OPA_DISP++, carpenterHeadDLists[PARAMS_GET_U(this->actor.params, 0, 2)]); + gSPDisplayList(POLY_OPA_DISP++, carpenterHeadDLists[ENDAIKUKAKARIKO_GET_TYPE(&this->actor)]); } CLOSE_DISPS(play->state.gfxCtx, "../z_en_daiku_kakariko.c", 1113); @@ -551,13 +557,13 @@ void EnDaikuKakariko_Draw(Actor* thisx, PlayState* play) { Gfx_SetupDL_25Opa(play->state.gfxCtx); - if (PARAMS_GET_U(thisx->params, 0, 2) == CARPENTER_ICHIRO) { + if (ENDAIKUKAKARIKO_GET_TYPE(thisx) == CARPENTER_ICHIRO) { gDPSetEnvColor(POLY_OPA_DISP++, 170, 10, 70, 255); - } else if (PARAMS_GET_U(thisx->params, 0, 2) == CARPENTER_SABOORO) { + } else if (ENDAIKUKAKARIKO_GET_TYPE(thisx) == CARPENTER_SABOORO) { gDPSetEnvColor(POLY_OPA_DISP++, 170, 200, 255, 255); - } else if (PARAMS_GET_U(thisx->params, 0, 2) == CARPENTER_JIRO) { + } else if (ENDAIKUKAKARIKO_GET_TYPE(thisx) == CARPENTER_JIRO) { gDPSetEnvColor(POLY_OPA_DISP++, 0, 230, 70, 255); - } else if (PARAMS_GET_U(thisx->params, 0, 2) == CARPENTER_SHIRO) { + } else if (ENDAIKUKAKARIKO_GET_TYPE(thisx) == CARPENTER_SHIRO) { gDPSetEnvColor(POLY_OPA_DISP++, 200, 0, 150, 255); } From 96e13149eac8e9b3d47111c582cdd75a731f52e4 Mon Sep 17 00:00:00 2001 From: fig02 Date: Tue, 11 Feb 2025 17:33:09 -0500 Subject: [PATCH 05/15] Name Actor_DrawAll (#2464) --- include/z64actor.h | 2 +- src/code/z_actor.c | 15 ++++++++++++++- src/code/z_play.c | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/include/z64actor.h b/include/z64actor.h index 38132540ab..40cafd9440 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -850,7 +850,7 @@ void Actor_DisableLens(struct PlayState* play); void Actor_InitContext(struct PlayState* play, ActorContext* actorCtx, struct ActorEntry* playerEntry); void Actor_UpdateAll(struct PlayState* play, ActorContext* actorCtx); s32 Actor_CullingVolumeTest(struct PlayState* play, Actor* actor, Vec3f* projPos, f32 projW); -void func_800315AC(struct PlayState* play, ActorContext* actorCtx); +void Actor_DrawAll(struct PlayState* play, ActorContext* actorCtx); void Actor_KillAllWithMissingObject(struct PlayState* play, ActorContext* actorCtx); void func_80031B14(struct PlayState* play, ActorContext* actorCtx); void func_80031C3C(ActorContext* actorCtx, struct PlayState* play); diff --git a/src/code/z_actor.c b/src/code/z_actor.c index f13360af6c..d8e1c2ae9c 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -2835,7 +2835,20 @@ s32 Actor_CullingVolumeTest(PlayState* play, Actor* actor, Vec3f* projPos, f32 p return false; } -void func_800315AC(PlayState* play, ActorContext* actorCtx) { +/** + * Iterates through all category lists to draw every actor. + * + * In addition to actors, this function also draws: + * - Effects + * - EffectSs + * - Title Cards + * - Farores Wind Pointer + * - Light glow + * - Actor Collision (debug only) + * + * Note: If an actor is made visible by Lens of Truth, it will be drawn by `Actor_DrawLensActors` instead. + */ +void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) { s32 invisibleActorCounter; Actor* invisibleActors[INVISIBLE_ACTOR_MAX]; ActorListEntry* actorListEntry; diff --git a/src/code/z_play.c b/src/code/z_play.c index d531a79110..ac271a93e8 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -1294,7 +1294,7 @@ void Play_Draw(PlayState* this) { } if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_ACTORS) { - func_800315AC(this, &this->actorCtx); + Actor_DrawAll(this, &this->actorCtx); } if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_LENS_FLARES) { From e3831947b01d63649102fc4a4882f4712fe1fcd7 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Wed, 12 Feb 2025 18:56:04 +0100 Subject: [PATCH 06/15] Assets fixups 2 (#2461) --- assets/xml/objects/object_fd.xml | 7 +- assets/xml/objects/object_fd2.xml | 7 +- assets/xml/objects/object_fd_pal.xml | 7 +- assets/xml/objects/object_zl4.xml | 24 ++-- assets/xml/textures/map_48x85_static.xml | 138 ++++++++++++----------- 5 files changed, 95 insertions(+), 88 deletions(-) diff --git a/assets/xml/objects/object_fd.xml b/assets/xml/objects/object_fd.xml index a28919d8e8..4a5ce9fafa 100644 --- a/assets/xml/objects/object_fd.xml +++ b/assets/xml/objects/object_fd.xml @@ -19,9 +19,10 @@ - - - + + + + diff --git a/assets/xml/objects/object_fd2.xml b/assets/xml/objects/object_fd2.xml index b3fbdcb216..8d2b3dcdb6 100644 --- a/assets/xml/objects/object_fd2.xml +++ b/assets/xml/objects/object_fd2.xml @@ -21,9 +21,10 @@ - - - + + + + diff --git a/assets/xml/objects/object_fd_pal.xml b/assets/xml/objects/object_fd_pal.xml index 776a2ee494..be375399f6 100644 --- a/assets/xml/objects/object_fd_pal.xml +++ b/assets/xml/objects/object_fd_pal.xml @@ -19,9 +19,10 @@ - - - + + + + diff --git a/assets/xml/objects/object_zl4.xml b/assets/xml/objects/object_zl4.xml index e87a654656..99cc12ea2a 100644 --- a/assets/xml/objects/object_zl4.xml +++ b/assets/xml/objects/object_zl4.xml @@ -39,19 +39,21 @@ - - - - + + + + + - - - - - - - + + + + + + + + diff --git a/assets/xml/textures/map_48x85_static.xml b/assets/xml/textures/map_48x85_static.xml index 2788498a84..b8795bd07d 100644 --- a/assets/xml/textures/map_48x85_static.xml +++ b/assets/xml/textures/map_48x85_static.xml @@ -1,72 +1,74 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 1d2c912fbb3eb3363eaf56bd8e4c96203c99ceaa Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Wed, 12 Feb 2025 19:37:05 +0100 Subject: [PATCH 07/15] Cleanup colliders struct members 2 (#2465) * Cleanup colliders 2 * format * fixes & review --- .../z_bg_jya_bombchuiwa.c | 2 +- .../z_bg_jya_bombchuiwa.h | 2 +- .../ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c | 2 +- .../ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.h | 2 +- .../ovl_Bg_Jya_Megami/z_bg_jya_megami.c | 2 +- .../ovl_Bg_Jya_Megami/z_bg_jya_megami.h | 2 +- .../z_bg_spot16_bombstone.c | 2 +- .../z_bg_spot16_bombstone.h | 2 +- .../ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c | 2 +- .../ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h | 2 +- src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 4 +- src/overlays/actors/ovl_Boss_Mo/z_boss_mo.h | 2 +- src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 4 +- src/overlays/actors/ovl_Boss_Sst/z_boss_sst.h | 2 +- src/overlays/actors/ovl_Boss_Va/z_boss_va.c | 66 +++++------ src/overlays/actors/ovl_Boss_Va/z_boss_va.h | 4 +- .../actors/ovl_Door_Killer/z_door_killer.c | 2 +- .../actors/ovl_Door_Killer/z_door_killer.h | 2 +- .../actors/ovl_En_Bigokuta/z_en_bigokuta.c | 2 +- .../actors/ovl_En_Bigokuta/z_en_bigokuta.h | 2 +- src/overlays/actors/ovl_En_Bom/z_en_bom.c | 4 +- src/overlays/actors/ovl_En_Bom/z_en_bom.h | 2 +- src/overlays/actors/ovl_En_Bombf/z_en_bombf.c | 2 +- src/overlays/actors/ovl_En_Bombf/z_en_bombf.h | 2 +- .../actors/ovl_En_Bubble/z_en_bubble.c | 42 +++---- .../actors/ovl_En_Bubble/z_en_bubble.h | 4 +- src/overlays/actors/ovl_En_Dh/z_en_dh.c | 56 ++++----- src/overlays/actors/ovl_En_Dh/z_en_dh.h | 4 +- .../actors/ovl_En_Dodongo/z_en_dodongo.c | 69 +++++------ .../actors/ovl_En_Dodongo/z_en_dodongo.h | 4 +- src/overlays/actors/ovl_En_Horse/z_en_horse.c | 44 +++---- src/overlays/actors/ovl_En_Horse/z_en_horse.h | 4 +- .../ovl_En_Horse_Ganon/z_en_horse_ganon.c | 38 +++--- .../ovl_En_Horse_Ganon/z_en_horse_ganon.h | 6 +- .../z_en_horse_link_child.c | 2 +- .../z_en_horse_link_child.h | 2 +- .../ovl_En_Horse_Normal/z_en_horse_normal.c | 2 +- .../ovl_En_Horse_Normal/z_en_horse_normal.h | 2 +- .../ovl_En_Horse_Zelda/z_en_horse_zelda.c | 28 ++--- .../ovl_En_Horse_Zelda/z_en_horse_zelda.h | 4 +- .../actors/ovl_En_Insect/z_en_insect.c | 2 +- .../actors/ovl_En_Insect/z_en_insect.h | 2 +- .../actors/ovl_En_Peehat/z_en_peehat.c | 108 +++++++++--------- .../actors/ovl_En_Peehat/z_en_peehat.h | 8 +- src/overlays/actors/ovl_En_Poh/z_en_poh.c | 88 +++++++------- src/overlays/actors/ovl_En_Poh/z_en_poh.h | 6 +- src/overlays/actors/ovl_En_Ssh/z_en_ssh.c | 90 +++++++-------- src/overlays/actors/ovl_En_Ssh/z_en_ssh.h | 6 +- src/overlays/actors/ovl_En_St/z_en_st.c | 84 +++++++------- src/overlays/actors/ovl_En_St/z_en_st.h | 6 +- src/overlays/actors/ovl_En_Tite/z_en_tite.c | 2 +- src/overlays/actors/ovl_En_Tite/z_en_tite.h | 2 +- src/overlays/actors/ovl_En_Wf/z_en_wf.c | 68 +++++------ src/overlays/actors/ovl_En_Wf/z_en_wf.h | 8 +- src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c | 17 +-- src/overlays/actors/ovl_Mir_Ray/z_mir_ray.h | 4 +- .../actors/ovl_Obj_Switch/z_obj_switch.c | 44 +++---- .../actors/ovl_Obj_Switch/z_obj_switch.h | 8 +- 58 files changed, 497 insertions(+), 487 deletions(-) diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c index cd7d83e0f1..5b1c869eac 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c +++ b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c @@ -77,7 +77,7 @@ void BgJyaBombchuiwa_SetupCollider(BgJyaBombchuiwa* this, PlayState* play) { s32 pad; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, &this->colliderItems); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); } void BgJyaBombchuiwa_SetDrawFlags(BgJyaBombchuiwa* this, u8 drawFlags) { diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.h b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.h index 650a95ce74..ad9b9c33db 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.h +++ b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.h @@ -12,7 +12,7 @@ typedef struct BgJyaBombchuiwa { /* 0x0000 */ Actor actor; /* 0x014C */ BgJyaBombchuiwaActionFunc actionFunc; /* 0x0150 */ ColliderJntSph collider; - /* 0x0170 */ ColliderJntSphElement colliderItems; + /* 0x0170 */ ColliderJntSphElement colliderElements[1]; /* 0x01B0 */ f32 lightRayIntensity; /* 0x01B4 */ s16 timer; /* 0x01B6 */ u8 drawFlags; // Used to determine how the actor is drawn. diff --git a/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c b/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c index e46dbfa345..6d6b13efb8 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c +++ b/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c @@ -90,7 +90,7 @@ void BgJyaGoroiwa_InitCollider(BgJyaGoroiwa* this, PlayState* play) { s32 pad; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, &this->colliderItem); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); BgJyaGoroiwa_UpdateCollider(this); this->collider.elements[0].dim.worldSphere.radius = 58; } diff --git a/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.h b/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.h index 299f9a65f9..35f4c971c9 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.h +++ b/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.h @@ -12,7 +12,7 @@ typedef struct BgJyaGoroiwa { /* 0x0000 */ Actor actor; /* 0x014C */ BgJyaGoroiwaFunc actionFunc; /* 0x0150 */ ColliderJntSph collider; - /* 0x0170 */ ColliderJntSphElement colliderItem; + /* 0x0170 */ ColliderJntSphElement colliderElements[1]; /* 0x01B0 */ f32 speedFactor; /* 0x01B4 */ s16 hasHit; /* 0x01B6 */ s16 waitTimer; diff --git a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c index 364e095969..4e9d88d7ce 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c +++ b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c @@ -136,7 +136,7 @@ void BgJyaMegami_InitCollider(BgJyaMegami* this, PlayState* play) { s32 pad; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, &this->colliderItem); + Collider_SetJntSph(play, &this->collider, &this->dyna.actor, &sJntSphInit, this->colliderElements); } void BgJyaMegami_SpawnEffect(PlayState* play, Vec3f* pos, Vec3f* velocity, s32 num, s32 arg4) { diff --git a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.h b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.h index df3451f9d8..e297ebb63a 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.h +++ b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.h @@ -19,7 +19,7 @@ typedef struct BgJyaMegami { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ BgJyaMegamiActionFunc actionFunc; /* 0x0168 */ ColliderJntSph collider; - /* 0x0188 */ ColliderJntSphElement colliderItem; + /* 0x0188 */ ColliderJntSphElement colliderElements[1]; /* 0x01C8 */ s16 lightTimer; /* 0x01CA */ s16 explosionTimer; /* 0x01CC */ s16 crumbleIndex; diff --git a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c index f7ba17ed02..ecd9d87dbb 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c @@ -152,7 +152,7 @@ void func_808B4C4C(BgSpot16Bombstone* this, PlayState* play) { s32 pad; Collider_InitJntSph(play, &this->colliderJntSph); - Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderElements); + Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements); this->colliderJntSph.elements[0].dim.worldSphere.center.x = this->actor.world.pos.x; this->colliderJntSph.elements[0].dim.worldSphere.center.y = this->actor.world.pos.y + 50.0f; this->colliderJntSph.elements[0].dim.worldSphere.center.z = this->actor.world.pos.z; diff --git a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.h b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.h index 01fb4cc3e0..73c04ee18d 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.h +++ b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.h @@ -18,7 +18,7 @@ typedef struct BgSpot16Bombstone { /* 0x015C */ f32 sinRotation; /* 0x0160 */ f32 cosRotation; /* 0x0164 */ ColliderJntSph colliderJntSph; - /* 0x0184 */ ColliderJntSphElement colliderElements[1]; + /* 0x0184 */ ColliderJntSphElement colliderJntSphElements[1]; /* 0x01C4 */ ColliderCylinder colliderCylinder; /* 0x0210 */ s16 unk_210; /* 0x0212 */ s16 unk_212; diff --git a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c index 75763a8c7c..2f36cd5034 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c @@ -90,7 +90,7 @@ void func_808B7710(Actor* thisx, PlayState* play) { BgSpot18Basket* this = (BgSpot18Basket*)thisx; Collider_InitJntSph(play, &this->colliderJntSph); - Collider_SetJntSph(play, &this->colliderJntSph, &this->dyna.actor, &sJntSphInit, this->ColliderJntSphElements); + Collider_SetJntSph(play, &this->colliderJntSph, &this->dyna.actor, &sJntSphInit, this->colliderJntSphElements); this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE; } diff --git a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h index eb198e09a0..460a56fb12 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h +++ b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h @@ -11,7 +11,7 @@ typedef void (*BgSpot18BasketActionFunc)(struct BgSpot18Basket*, struct PlayStat typedef struct BgSpot18Basket { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ ColliderJntSph colliderJntSph; - /* 0x0184 */ ColliderJntSphElement ColliderJntSphElements[2]; + /* 0x0184 */ ColliderJntSphElement colliderJntSphElements[2]; /* 0x0204 */ BgSpot18BasketActionFunc actionFunc; /* 0x0208 */ f32 unk_208; /* 0x020C */ s16 unk_20C; diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index fc82d8000e..e0685592f1 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -389,7 +389,7 @@ void BossMo_Init(Actor* thisx, PlayState* play2) { this->actor.world.pos.y = MO_WATER_LEVEL(play); this->actor.prevPos = this->targetPos = this->actor.world.pos; Collider_InitJntSph(play, &this->tentCollider); - Collider_SetJntSph(play, &this->tentCollider, &this->actor, &sJntSphInit, this->tentElements); + Collider_SetJntSph(play, &this->tentCollider, &this->actor, &sJntSphInit, this->tentColliderElements); this->tentMaxAngle = 1.0f; } } @@ -1151,7 +1151,7 @@ void BossMo_TentCollisionCheck(BossMo* this, PlayState* play) { s16 i2; ColliderElement* acHitElem; - for (i1 = 0; i1 < ARRAY_COUNT(this->tentElements); i1++) { + for (i1 = 0; i1 < ARRAY_COUNT(this->tentColliderElements); i1++) { if (this->tentCollider.elements[i1].base.acElemFlags & ACELEM_HIT) { for (i2 = 0; i2 < 19; i2++) { diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.h b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.h index 1b7641817e..08a41f132b 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.h +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.h @@ -124,7 +124,7 @@ typedef struct BossMo { /* 0x100C */ f32 subCamYawShake; /* 0x1010 */ Vec3f tentTipPos; /* 0x101C */ ColliderJntSph tentCollider; - /* 0x103C */ ColliderJntSphElement tentElements[19]; + /* 0x103C */ ColliderJntSphElement tentColliderElements[19]; /* 0x14FC */ ColliderCylinder coreCollider; /* 0x1548 */ char unk_1548[0x44]; } BossMo; // size = 0x158C diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 2e7a467c22..26870e2b8d 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -306,7 +306,7 @@ void BossSst_Init(Actor* thisx, PlayState* play2) { SkelAnime_InitFlex(play, &this->skelAnime, &gBongoHeadSkel, &gBongoHeadEyeOpenIdleAnim, this->jointTable, this->morphTable, 45); ActorShape_Init(&this->actor.shape, 70000.0f, ActorShadow_DrawCircle, 95.0f); - Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInitHead, this->colliderItems); + Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInitHead, this->colliderJntSphElements); Collider_SetCylinder(play, &this->colliderCyl, &this->actor, &sCylinderInitHead); sHead = this; this->actor.world.pos.x = ROOM_CENTER_X + 50.0f; @@ -339,7 +339,7 @@ void BossSst_Init(Actor* thisx, PlayState* play2) { Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_BOSS); } } else { - Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInitHand, this->colliderItems); + Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInitHand, this->colliderJntSphElements); Collider_SetCylinder(play, &this->colliderCyl, &this->actor, &sCylinderInitHand); if (this->actor.params == BONGO_LEFT_HAND) { SkelAnime_InitFlex(play, &this->skelAnime, &gBongoLeftHandSkel, &gBongoLeftHandIdleAnim, this->jointTable, diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.h b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.h index af358d2dcf..1aab0e84c3 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.h +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.h @@ -46,7 +46,7 @@ typedef struct BossSst { /* 0x03C4 */ f32 radius; /* 0x03C8 */ Vec3f center; /* 0x03D4 */ ColliderJntSph colliderJntSph; - /* 0x03F4 */ ColliderJntSphElement colliderItems[11]; + /* 0x03F4 */ ColliderJntSphElement colliderJntSphElements[11]; /* 0x06B4 */ ColliderCylinder colliderCyl; /* 0x0700 */ BossSstEffect effects[BOSS_SST_EFFECT_COUNT]; /* 0x09D0 */ s16 trailIndex; diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index e6ac36d486..549770bcd3 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -702,8 +702,9 @@ void BossVa_Init(Actor* thisx, PlayState* play2) { case BOSSVA_SUPPORT_1: case BOSSVA_SUPPORT_2: case BOSSVA_SUPPORT_3: - Collider_InitJntSph(play, &this->colliderSph); - Collider_SetJntSph(play, &this->colliderSph, &this->actor, &sJntSphInitSupport, this->elements); + Collider_InitJntSph(play, &this->colliderJntSph); + Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInitSupport, + this->colliderJntSphElements); if (sCsState < BOSSVA_BATTLE) { BossVa_SetupSupportIntro(this, play); } else { @@ -731,8 +732,9 @@ void BossVa_Init(Actor* thisx, PlayState* play2) { BossVa_SetupDoor(this, play); break; default: - Collider_InitJntSph(play, &this->colliderSph); - Collider_SetJntSph(play, &this->colliderSph, &this->actor, &sJntSphInitBari, this->elements); + Collider_InitJntSph(play, &this->colliderJntSph); + Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInitBari, + this->colliderJntSphElements); Collider_InitQuad(play, &this->colliderLightning); Collider_SetQuad(play, &this->colliderLightning, &this->actor, &sQuadInit); this->unk_1D8.x = 1.0f; @@ -752,7 +754,7 @@ void BossVa_Destroy(Actor* thisx, PlayState* play) { BossVa* this = (BossVa*)thisx; SkelAnime_Free(&this->skelAnime, play); - Collider_DestroyJntSph(play, &this->colliderSph); + Collider_DestroyJntSph(play, &this->colliderJntSph); Collider_DestroyCylinder(play, &this->colliderBody); } @@ -1745,11 +1747,11 @@ void BossVa_SupportAttached(BossVa* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_BALINADE_BL_SPARK - SFX_FLAG); } - if (this->colliderSph.base.acFlags & AC_HIT) { + if (this->colliderJntSph.base.acFlags & AC_HIT) { BossVa_SetupSupportCut(this, play); } else { if (this->actor.colorFilterTimer == 0) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSph.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base); } if ((this->timer % 2) == 0) { @@ -2548,23 +2550,23 @@ void BossVa_BariPhase3Attack(BossVa* this, PlayState* play) { Math_SmoothStepToS(&this->vaBariUnused.z, this->vaBariUnused.x, 1, 0x1E, 0); this->vaBariUnused.y += this->vaBariUnused.z; - if ((this->colliderLightning.base.atFlags & AT_HIT) || (this->colliderSph.base.atFlags & AT_HIT)) { - if ((this->colliderLightning.base.at == &player->actor) || (this->colliderSph.base.at == &player->actor)) { + if ((this->colliderLightning.base.atFlags & AT_HIT) || (this->colliderJntSph.base.atFlags & AT_HIT)) { + if ((this->colliderLightning.base.at == &player->actor) || (this->colliderJntSph.base.at == &player->actor)) { Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, GET_BODY(this)->actor.yawTowardsPlayer, 8.0f); Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT); - this->colliderSph.base.at = NULL; + this->colliderJntSph.base.at = NULL; this->colliderLightning.base.at = NULL; } this->colliderLightning.base.atFlags &= ~AT_HIT; - this->colliderSph.base.atFlags &= ~AT_HIT; + this->colliderJntSph.base.atFlags &= ~AT_HIT; } - if (this->colliderSph.base.acFlags & AC_HIT) { - this->colliderSph.base.acFlags &= ~AC_HIT; - if ((this->colliderSph.base.ac->id == ACTOR_EN_BOOM) && (sp52 >= 128)) { - boomerang = (EnBoom*)this->colliderSph.base.ac; + if (this->colliderJntSph.base.acFlags & AC_HIT) { + this->colliderJntSph.base.acFlags &= ~AC_HIT; + if ((this->colliderJntSph.base.ac->id == ACTOR_EN_BOOM) && (sp52 >= 128)) { + boomerang = (EnBoom*)this->colliderJntSph.base.ac; boomerang->returnTimer = 0; boomerang->moveTo = &player->actor; boomerang->actor.world.rot.y = boomerang->actor.yawTowardsPlayer; @@ -2587,14 +2589,14 @@ void BossVa_BariPhase3Attack(BossVa* this, PlayState* play) { if (sp52 >= 128) { BossVa_Spark(play, this, 1, 75, 15.0f, 7.0f, SPARK_TETHER, 1.0f, true); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSph.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base); sPhase3StopMoving = false; } else { sPhase3StopMoving = true; } CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderLightning.base); - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSph.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base); if ((play->gameplayFrames % 4) == 0) { Math_SmoothStepToS(&this->unk_1F0, 0x78, 1, 0xA, 0); } @@ -2644,17 +2646,17 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) { return; } - if ((this->colliderLightning.base.atFlags & AT_HIT) || (this->colliderSph.base.atFlags & AT_HIT)) { - if ((this->colliderLightning.base.at == &player->actor) || (this->colliderSph.base.at == &player->actor)) { + if ((this->colliderLightning.base.atFlags & AT_HIT) || (this->colliderJntSph.base.atFlags & AT_HIT)) { + if ((this->colliderLightning.base.at == &player->actor) || (this->colliderJntSph.base.at == &player->actor)) { Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, GET_BODY(this)->actor.yawTowardsPlayer, 8.0f); Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT); - this->colliderSph.base.at = NULL; + this->colliderJntSph.base.at = NULL; this->colliderLightning.base.at = NULL; } this->colliderLightning.base.atFlags &= ~AT_HIT; - this->colliderSph.base.atFlags &= ~AT_HIT; + this->colliderJntSph.base.atFlags &= ~AT_HIT; } Math_SmoothStepToF(&this->actor.world.pos.y, 4.0f, 1.0f, 2.0f, 0.0f); @@ -2675,11 +2677,11 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) { Math_SmoothStepToF(&this->unk_1A0, (Math_SinS(sPhase2Timer * 0x190) * sp4C) + 320.0f, 1.0f, 10.0f, 0.0f); Math_SmoothStepToS(&this->unk_1AC, sp50 + 0x1F4, 1, 0x3C, 0); this->actor.world.pos.y += 2.0f * Math_SinF(this->unk_1A4); - if (this->colliderSph.base.acFlags & AC_HIT) { - this->colliderSph.base.acFlags &= ~AC_HIT; + if (this->colliderJntSph.base.acFlags & AC_HIT) { + this->colliderJntSph.base.acFlags &= ~AC_HIT; - if ((this->colliderSph.base.ac->id == ACTOR_EN_BOOM) && (sp52 >= 64)) { - boomerang = (EnBoom*)this->colliderSph.base.ac; + if ((this->colliderJntSph.base.ac->id == ACTOR_EN_BOOM) && (sp52 >= 64)) { + boomerang = (EnBoom*)this->colliderJntSph.base.ac; boomerang->returnTimer = 0; boomerang->moveTo = &player->actor; boomerang->actor.world.rot.y = boomerang->actor.yawTowardsPlayer; @@ -2688,7 +2690,7 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) { } CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderLightning.base); - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSph.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base); } else { this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED; Math_SmoothStepToS(&this->unk_1AC, sp50 + 150, 1, 0x3C, 0); @@ -2703,13 +2705,13 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) { } this->actor.world.pos.y += Math_SinF(this->unk_1A4) * 4.0f; - if (this->colliderSph.base.acFlags & AC_HIT) { + if (this->colliderJntSph.base.acFlags & AC_HIT) { BossVa_KillBari(this, play); } } Math_SmoothStepToS(&this->actor.shape.rot.x, 0, 1, 0x5DC, 0); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSph.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base); if ((play->gameplayFrames % 4) == 0) { Math_SmoothStepToS(&this->unk_1F0, 0x78, 1, 0xA, 0); } @@ -2742,7 +2744,7 @@ void BossVa_BariPhase3Stunned(BossVa* this, PlayState* play) { Vec3f sp40 = GET_BODY(this)->unk_1D8; this->actor.world.rot.x = Math_Vec3f_Pitch(&GET_BODY(this)->actor.world.pos, &this->actor.world.pos); - if (this->colliderSph.base.acFlags & AC_HIT) { + if (this->colliderJntSph.base.acFlags & AC_HIT) { BossVa_KillBari(this, play); return; } @@ -2750,7 +2752,7 @@ void BossVa_BariPhase3Stunned(BossVa* this, PlayState* play) { this->unk_1A4 += Rand_ZeroOne() * 0.5f; Math_SmoothStepToF(&this->actor.world.pos.y, 4.0f, 1.0f, 2.0f, 0.0f); this->actor.world.pos.y += Math_SinF(this->unk_1A4) * 3.0f; - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSph.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base); if ((play->gameplayFrames % 4) == 0) { Math_SmoothStepToS(&this->unk_1F0, 0x28, 1, 0xA, 0); BossVa_Spark(play, this, 1, this->unk_1F0, 25.0f, 20.0f, SPARK_BARI, 2.0f, true); @@ -2972,7 +2974,7 @@ void BossVa_SupportPostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec switch (limbIndex) { case 4: Matrix_MultVec3f(&sZeroVec, &this->actor.focus.pos); - Collider_UpdateSpheres(0, &this->colliderSph); + Collider_UpdateSpheres(0, &this->colliderJntSph); break; case 7: Matrix_MultVec3f(&sZeroVec, &this->armTip); @@ -3228,7 +3230,7 @@ void BossVa_Draw(Actor* thisx, PlayState* play) { if (!this->isDead) { SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, BossVa_BariOverrideLimbDraw, BossVa_BariPostLimbDraw, this); - Collider_UpdateSpheres(0, &this->colliderSph); + Collider_UpdateSpheres(0, &this->colliderJntSph); if (sCsState < BOSSVA_BATTLE) { spBC = GET_BODY(this)->actor.world.pos; } else { diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.h b/src/overlays/actors/ovl_Boss_Va/z_boss_va.h index f5e6c8a896..a9198626e3 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.h +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.h @@ -42,8 +42,8 @@ typedef struct BossVa { /* 0x0274 */ Vec3f unk_274; // Unused body position /* 0x0280 */ Vec3f unk_280; // Unused body position /* 0x028C */ ColliderCylinder colliderBody; - /* 0x02D8 */ ColliderJntSph colliderSph; - /* 0x02F8 */ ColliderJntSphElement elements[1]; + /* 0x02D8 */ ColliderJntSph colliderJntSph; + /* 0x02F8 */ ColliderJntSphElement colliderJntSphElements[1]; /* 0x0338 */ ColliderQuad colliderLightning; } BossVa; // size = 0x03B8 diff --git a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c index 0f2d3163ec..61ae86d800 100644 --- a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c +++ b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c @@ -137,7 +137,7 @@ void DoorKiller_Init(Actor* thisx, PlayState* play2) { Collider_InitCylinder(play, &this->colliderCylinder); Collider_SetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInit); Collider_InitJntSph(play, &this->colliderJntSph); - Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphItems); + Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements); this->colliderJntSph.elements[0].dim.worldSphere.radius = 80; this->colliderJntSph.elements[0].dim.worldSphere.center.x = (s16)this->actor.world.pos.x; this->colliderJntSph.elements[0].dim.worldSphere.center.y = (s16)this->actor.world.pos.y + 50; diff --git a/src/overlays/actors/ovl_Door_Killer/z_door_killer.h b/src/overlays/actors/ovl_Door_Killer/z_door_killer.h index 597624df1e..9003f27ede 100644 --- a/src/overlays/actors/ovl_Door_Killer/z_door_killer.h +++ b/src/overlays/actors/ovl_Door_Killer/z_door_killer.h @@ -28,7 +28,7 @@ typedef struct DoorKiller { /* 0x021C */ u8 requiredObjectSlot; /* 0x021D */ u8 textureEntryIndex; /* 0x0220 */ ColliderJntSph colliderJntSph; - /* 0x0240 */ ColliderJntSphElement colliderJntSphItems[1]; + /* 0x0240 */ ColliderJntSphElement colliderJntSphElements[1]; /* 0x0280 */ DoorKillerActionFunc actionFunc; } DoorKiller; // size = 0x0284 diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c index f25ea12904..ea86855810 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -184,7 +184,7 @@ void EnBigokuta_Init(Actor* thisx, PlayState* play) { this->jointTable, this->morphTable, 20); Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, &this->element); + Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); this->collider.elements[0].dim.worldSphere.radius = this->collider.elements[0].dim.modelSphere.radius; diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.h b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.h index 1380afeedd..5f74f31a31 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.h +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.h @@ -20,7 +20,7 @@ typedef struct EnBigokuta { /* 0x019C */ Vec3s jointTable[20]; /* 0x0214 */ Vec3s morphTable[20]; /* 0x028C */ ColliderJntSph collider; - /* 0x02AC */ ColliderJntSphElement element; + /* 0x02AC */ ColliderJntSphElement colliderElements[1]; /* 0x02EC */ ColliderCylinder cylinder[2]; } EnBigokuta; // size = 0x0384 diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index 7fefe03243..31acad8cec 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -112,8 +112,8 @@ void EnBom_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->bombCollider); Collider_InitJntSph(play, &this->explosionCollider); Collider_SetCylinder(play, &this->bombCollider, thisx, &sCylinderInit); - Collider_SetJntSph(play, &this->explosionCollider, thisx, &sJntSphInit, &this->explosionColliderItems[0]); - this->explosionColliderItems[0].base.atDmgInfo.damage += (thisx->shape.rot.z & 0xFF00) >> 8; + Collider_SetJntSph(play, &this->explosionCollider, thisx, &sJntSphInit, &this->explosionColliderElements[0]); + this->explosionColliderElements[0].base.atDmgInfo.damage += (thisx->shape.rot.z & 0xFF00) >> 8; thisx->shape.rot.z &= 0xFF; if (thisx->shape.rot.z & 0x80) { diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.h b/src/overlays/actors/ovl_En_Bom/z_en_bom.h index 9fcb0fe029..88c8feef5c 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.h +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.h @@ -12,7 +12,7 @@ typedef struct EnBom { /* 0x0000 */ Actor actor; /* 0x014C */ ColliderCylinder bombCollider; /* 0x0198 */ ColliderJntSph explosionCollider; - /* 0x01B8 */ ColliderJntSphElement explosionColliderItems[1]; + /* 0x01B8 */ ColliderJntSphElement explosionColliderElements[1]; /* 0x01F8 */ s16 timer; /* 0x01FA */ s16 flashSpeedScale; /* 0x01FC */ f32 flashIntensity; diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index 7148ebe495..ed1d7eed79 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -107,7 +107,7 @@ void EnBombf_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->bombCollider); Collider_InitJntSph(play, &this->explosionCollider); Collider_SetCylinder(play, &this->bombCollider, thisx, &sCylinderInit); - Collider_SetJntSph(play, &this->explosionCollider, thisx, &sJntSphInit, &this->explosionColliderItems[0]); + Collider_SetJntSph(play, &this->explosionCollider, thisx, &sJntSphInit, &this->explosionColliderElements[0]); if (thisx->params == BOMBFLOWER_BODY) { shapeUnk10 = 1000.0f; diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.h b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.h index 2c1cd88afc..840da79c19 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.h +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.h @@ -12,7 +12,7 @@ typedef struct EnBombf { /* 0x0000 */ Actor actor; /* 0x014C */ ColliderCylinder bombCollider; /* 0x0198 */ ColliderJntSph explosionCollider; - /* 0x01B8 */ ColliderJntSphElement explosionColliderItems[1]; + /* 0x01B8 */ ColliderJntSphElement explosionColliderElements[1]; /* 0x01F8 */ s16 timer; /* 0x01FC */ EnBombfActionFunc actionFunc; /* 0x0200 */ s32 isFuseEnabled; // enables the ability to ignite and tick down to explode diff --git a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c index dae945bb88..79860d7f7f 100644 --- a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c +++ b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c @@ -107,7 +107,7 @@ void EnBubble_SetDimensions(EnBubble* this, f32 dim) { } u32 func_809CBCBC(EnBubble* this) { - ColliderElement* elem = &this->colliderSphere.elements[0].base; + ColliderElement* elem = &this->colliderJntSph.elements[0].base; elem->atDmgInfo.dmgFlags = DMG_EXPLOSIVE; elem->atDmgInfo.effect = 0; @@ -124,7 +124,7 @@ u32 func_809CBCEC(EnBubble* this) { } void EnBubble_DamagePlayer(EnBubble* this, PlayState* play) { - s32 damage = -this->colliderSphere.elements[0].base.atDmgInfo.damage; + s32 damage = -this->colliderJntSph.elements[0].base.atDmgInfo.damage; play->damagePlayer(play, damage); Actor_SetPlayerKnockbackSmallNoDamage(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f); @@ -218,8 +218,8 @@ void EnBubble_Fly(EnBubble* this, PlayState* play) { s32 bgId; u8 bounceCount; - if (this->colliderSphere.elements[1].base.acElemFlags & ACELEM_HIT) { - attackerActor = this->colliderSphere.base.ac; + if (this->colliderJntSph.elements[1].base.acElemFlags & ACELEM_HIT) { + attackerActor = this->colliderJntSph.base.ac; this->normalizedAttackerVelocity = attackerActor->velocity; EnBubble_Vec3fNormalize(&this->normalizedAttackerVelocity); this->velocityFromAttack.x += (this->normalizedAttackerVelocity.x * 3.0f); @@ -292,14 +292,14 @@ void EnBubble_Fly(EnBubble* this, PlayState* play) { } u32 func_809CC648(EnBubble* this) { - if (((this->colliderSphere.base.acFlags & AC_HIT) != 0) == false) { + if (((this->colliderJntSph.base.acFlags & AC_HIT) != 0) == false) { return false; } - this->colliderSphere.base.acFlags &= ~AC_HIT; - if (this->colliderSphere.elements[1].base.acElemFlags & ACELEM_HIT) { - this->unk_1F0.x = this->colliderSphere.base.ac->velocity.x / 10.0f; - this->unk_1F0.y = this->colliderSphere.base.ac->velocity.y / 10.0f; - this->unk_1F0.z = this->colliderSphere.base.ac->velocity.z / 10.0f; + this->colliderJntSph.base.acFlags &= ~AC_HIT; + if (this->colliderJntSph.elements[1].base.acElemFlags & ACELEM_HIT) { + this->unk_1F0.x = this->colliderJntSph.base.ac->velocity.x / 10.0f; + this->unk_1F0.y = this->colliderJntSph.base.ac->velocity.y / 10.0f; + this->unk_1F0.z = this->colliderJntSph.base.ac->velocity.z / 10.0f; this->graphicRotSpeed = 128.0f; this->graphicEccentricity = 0.48f; return false; @@ -312,8 +312,8 @@ u32 EnBubble_DetectPop(EnBubble* this, PlayState* play) { if (DECR(this->unk_208) != 0 || this->actionFunc == EnBubble_Pop) { return false; } - if (this->colliderSphere.base.ocFlags2 & OC2_HIT_PLAYER) { - this->colliderSphere.base.ocFlags2 &= ~OC2_HIT_PLAYER; + if (this->colliderJntSph.base.ocFlags2 & OC2_HIT_PLAYER) { + this->colliderJntSph.base.ocFlags2 &= ~OC2_HIT_PLAYER; EnBubble_DamagePlayer(this, play); this->unk_208 = 8; return true; @@ -326,7 +326,7 @@ void func_809CC774(EnBubble* this) { Vec3f src; Vec3f dest; - dim = &this->colliderSphere.elements[0].dim; + dim = &this->colliderJntSph.elements[0].dim; src.x = dim->modelSphere.center.x; src.y = dim->modelSphere.center.y; src.z = dim->modelSphere.center.z; @@ -336,7 +336,7 @@ void func_809CC774(EnBubble* this) { dim->worldSphere.center.y = dest.y; dim->worldSphere.center.z = dest.z; dim->worldSphere.radius = dim->modelSphere.radius * (1.0f + this->expansionWidth); - this->colliderSphere.elements[1].dim = *dim; + this->colliderJntSph.elements[1].dim = *dim; } void EnBubble_Init(Actor* thisx, PlayState* play) { @@ -344,8 +344,8 @@ void EnBubble_Init(Actor* thisx, PlayState* play) { u32 pad; ActorShape_Init(&this->actor.shape, 16.0f, ActorShadow_DrawCircle, 0.2f); - Collider_InitJntSph(play, &this->colliderSphere); - Collider_SetJntSph(play, &this->colliderSphere, &this->actor, &sJntSphInit, this->colliderSphereItems); + Collider_InitJntSph(play, &this->colliderJntSph); + Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements); CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(9), &sColChkInfoInit2); this->actor.naviEnemyId = NAVI_ENEMY_SHABOM; this->bounceDirection.x = Rand_ZeroOne(); @@ -362,7 +362,7 @@ void EnBubble_Init(Actor* thisx, PlayState* play) { void EnBubble_Destroy(Actor* thisx, PlayState* play) { EnBubble* this = (EnBubble*)thisx; - Collider_DestroyJntSph(play, &this->colliderSphere); + Collider_DestroyJntSph(play, &this->colliderJntSph); } void EnBubble_Wait(EnBubble* this, PlayState* play) { @@ -372,8 +372,8 @@ void EnBubble_Wait(EnBubble* this, PlayState* play) { } else { EnBubble_Fly(this, play); this->actor.shape.yOffset = ((this->expansionHeight + 1.0f) * 16.0f); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSphere.base); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderSphere.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base); } } @@ -401,8 +401,8 @@ void EnBubble_Regrow(EnBubble* this, PlayState* play) { if (func_809CC020(this)) { this->actionFunc = EnBubble_Wait; } - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSphere.base); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderSphere.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base); } void EnBubble_Update(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.h b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.h index 6c7e01d84b..9b183ae2bc 100644 --- a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.h +++ b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.h @@ -11,8 +11,8 @@ typedef void (*EnBubbleActionFunc)(struct EnBubble*, struct PlayState*); typedef struct EnBubble { /* 0x0000 */ Actor actor; /* 0x014C */ EnBubbleActionFunc actionFunc; - /* 0x0150 */ ColliderJntSph colliderSphere; - /* 0x0170 */ ColliderJntSphElement colliderSphereItems[2]; + /* 0x0150 */ ColliderJntSph colliderJntSph; + /* 0x0170 */ ColliderJntSphElement colliderJntSphElements[2]; /* 0x01F0 */ Vec3f unk_1F0; // set but never used /* 0x01FC */ Vec3f unk_1FC; // randomly generated, set but never used /* 0x0208 */ s16 unk_208; // set to 8 when about to pop diff --git a/src/overlays/actors/ovl_En_Dh/z_en_dh.c b/src/overlays/actors/ovl_En_Dh/z_en_dh.c index a97808faab..f52a81bf6c 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -179,8 +179,8 @@ void EnDh_Init(Actor* thisx, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; Collider_InitCylinder(play, &this->collider1); Collider_SetCylinder(play, &this->collider1, &this->actor, &sCylinderInit); - Collider_InitJntSph(play, &this->collider2); - Collider_SetJntSph(play, &this->collider2, &this->actor, &sJntSphInit, this->elements); + Collider_InitJntSph(play, &this->colliderJntSph); + Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements); EnDh_SetupWait(this); } @@ -190,7 +190,7 @@ void EnDh_Destroy(Actor* thisx, PlayState* play) { func_800F5B58(); Collider_DestroyCylinder(play, &this->collider1); - Collider_DestroyJntSph(play, &this->collider2); + Collider_DestroyJntSph(play, &this->colliderJntSph); } void EnDh_SpawnDebris(PlayState* play, EnDh* this, Vec3f* spawnPos, f32 spread, s32 arg4, f32 accelXZ, f32 scale) { @@ -330,8 +330,10 @@ void EnDh_Attack(EnDh* this, PlayState* play) { Animation_Change(&this->skelAnime, &object_dh_Anim_004658, -1.0f, this->skelAnime.curFrame, 0.0f, ANIMMODE_ONCE, -4.0f); this->actionState = 4; - this->collider2.base.atFlags = this->collider2.elements[0].base.atElemFlags = AT_NONE; // also ATELEM_NONE - this->collider2.elements[0].base.atDmgInfo.dmgFlags = this->collider2.elements[0].base.atDmgInfo.damage = 0; + this->colliderJntSph.base.atFlags = this->colliderJntSph.elements[0].base.atElemFlags = + AT_NONE; // also ATELEM_NONE + this->colliderJntSph.elements[0].base.atDmgInfo.dmgFlags = + this->colliderJntSph.elements[0].base.atDmgInfo.damage = 0; } switch (this->actionState) { case 1: @@ -344,20 +346,20 @@ void EnDh_Attack(EnDh* this, PlayState* play) { break; case 2: if (this->skelAnime.curFrame >= 4.0f) { - this->collider2.base.atFlags = this->collider2.elements[0].base.atElemFlags = + this->colliderJntSph.base.atFlags = this->colliderJntSph.elements[0].base.atElemFlags = AT_ON | AT_TYPE_ENEMY; // also ATELEM_ON | ATELEM_SFX_WOOD - this->collider2.elements[0].base.atDmgInfo.dmgFlags = DMG_DEFAULT; - this->collider2.elements[0].base.atDmgInfo.damage = 8; + this->colliderJntSph.elements[0].base.atDmgInfo.dmgFlags = DMG_DEFAULT; + this->colliderJntSph.elements[0].base.atDmgInfo.damage = 8; } - if (this->collider2.base.atFlags & AT_BOUNCED) { - this->collider2.base.atFlags &= ~(AT_HIT | AT_BOUNCED); - this->collider2.base.atFlags = this->collider2.elements[0].base.atElemFlags = + if (this->colliderJntSph.base.atFlags & AT_BOUNCED) { + this->colliderJntSph.base.atFlags &= ~(AT_HIT | AT_BOUNCED); + this->colliderJntSph.base.atFlags = this->colliderJntSph.elements[0].base.atElemFlags = AT_NONE; // also ATELEM_NONE - this->collider2.elements[0].base.atDmgInfo.dmgFlags = - this->collider2.elements[0].base.atDmgInfo.damage = 0; + this->colliderJntSph.elements[0].base.atDmgInfo.dmgFlags = + this->colliderJntSph.elements[0].base.atDmgInfo.damage = 0; this->actionState++; - } else if (this->collider2.base.atFlags & AT_HIT) { - this->collider2.base.atFlags &= ~AT_HIT; + } else if (this->colliderJntSph.base.atFlags & AT_HIT) { + this->colliderJntSph.base.atFlags &= ~AT_HIT; Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.shape.rot.y, 8.0f); } break; @@ -372,10 +374,10 @@ void EnDh_Attack(EnDh* this, PlayState* play) { Animation_Change(&this->skelAnime, &object_dh_Anim_004658, -1.0f, Animation_GetLastFrame(&object_dh_Anim_004658), 0.0f, ANIMMODE_ONCE, -4.0f); this->actionState++; - this->collider2.base.atFlags = this->collider2.elements[0].base.atElemFlags = + this->colliderJntSph.base.atFlags = this->colliderJntSph.elements[0].base.atElemFlags = AT_NONE; // also ATELEM_NONE - this->collider2.elements[0].base.atDmgInfo.dmgFlags = - this->collider2.elements[0].base.atDmgInfo.damage = 0; + this->colliderJntSph.elements[0].base.atDmgInfo.dmgFlags = + this->colliderJntSph.elements[0].base.atDmgInfo.damage = 0; } break; case 5: @@ -504,11 +506,13 @@ void EnDh_CollisionCheck(EnDh* this, PlayState* play) { Player* player = GET_PLAYER(play); s32 lastHealth; - if ((this->collider2.base.acFlags & AC_HIT) && !this->retreat) { - this->collider2.base.acFlags &= ~AC_HIT; + if ((this->colliderJntSph.base.acFlags & AC_HIT) && !this->retreat) { + this->colliderJntSph.base.acFlags &= ~AC_HIT; if ((this->actor.colChkInfo.damageEffect != 0) && (this->actor.colChkInfo.damageEffect != 6)) { - this->collider2.base.atFlags = this->collider2.elements[0].base.atElemFlags = AT_NONE; // also ATELEM_NONE - this->collider2.elements[0].base.atDmgInfo.dmgFlags = this->collider2.elements[0].base.atDmgInfo.damage = 0; + this->colliderJntSph.base.atFlags = this->colliderJntSph.elements[0].base.atElemFlags = + AT_NONE; // also ATELEM_NONE + this->colliderJntSph.elements[0].base.atDmgInfo.dmgFlags = + this->colliderJntSph.elements[0].base.atDmgInfo.damage = 0; if (player->unk_844 != 0) { this->unk_258 = player->unk_845; } @@ -553,13 +557,13 @@ void EnDh_Update(Actor* thisx, PlayState* play) { if (((this->curAction != DH_DAMAGE) && (this->actor.shape.yOffset == 0.0f)) || ((player->unk_844 != 0) && (player->unk_845 != this->unk_258))) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider2.base); - CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider2.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base); CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider1.base); } } else { CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider1.base); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider2.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base); } } @@ -571,7 +575,7 @@ void EnDh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Matrix_MultVec3f(&headOffset, &this->headPos); Matrix_Push(); Matrix_Translate(headOffset.x, headOffset.y, headOffset.z, MTXMODE_APPLY); - Collider_UpdateSpheres(1, &this->collider2); + Collider_UpdateSpheres(1, &this->colliderJntSph); Matrix_Pop(); } } diff --git a/src/overlays/actors/ovl_En_Dh/z_en_dh.h b/src/overlays/actors/ovl_En_Dh/z_en_dh.h index a7b356e9f6..0feb3069b5 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.h +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.h @@ -24,8 +24,8 @@ typedef struct EnDh { /* 0x025C */ s16 timer; /* 0x025E */ s16 dirtWavePhase; /* 0x0260 */ ColliderCylinder collider1; - /* 0x02AC */ ColliderJntSph collider2; - /* 0x02CC */ ColliderJntSphElement elements[1]; + /* 0x02AC */ ColliderJntSph colliderJntSph; + /* 0x02CC */ ColliderJntSphElement colliderJntSphElements[1]; /* 0x030C */ Vec3f headPos; /* 0x0318 */ f32 dirtWaveSpread; /* 0x031C */ f32 dirtWaveHeight; diff --git a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c index c29dd72198..5d013911eb 100644 --- a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c +++ b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c @@ -337,10 +337,10 @@ void EnDodongo_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.damageTable = &sDamageTable; Collider_InitQuad(play, &this->colliderAT); Collider_InitTris(play, &this->colliderHard); - Collider_InitJntSph(play, &this->colliderBody); + Collider_InitJntSph(play, &this->bodyCollider); Collider_SetQuad(play, &this->colliderAT, &this->actor, &sAttackQuadInit); Collider_SetTris(play, &this->colliderHard, &this->actor, &sHardTrisInit, this->trisElements); - Collider_SetJntSph(play, &this->colliderBody, &this->actor, &sBodyJntSphInit, this->sphElements); + Collider_SetJntSph(play, &this->bodyCollider, &this->actor, &sBodyJntSphInit, this->bodyColliderElements); blureInit.p1StartColor[0] = blureInit.p1StartColor[1] = blureInit.p1StartColor[2] = blureInit.p1StartColor[3] = blureInit.p2StartColor[0] = blureInit.p2StartColor[1] = blureInit.p2StartColor[2] = blureInit.p1EndColor[0] = @@ -366,7 +366,7 @@ void EnDodongo_Destroy(Actor* thisx, PlayState* play) { Effect_Delete(play, this->blureIdx); Collider_DestroyTris(play, &this->colliderHard); - Collider_DestroyJntSph(play, &this->colliderBody); + Collider_DestroyJntSph(play, &this->bodyCollider); Collider_DestroyQuad(play, &this->colliderAT); } @@ -505,9 +505,9 @@ void EnDodongo_SwallowBomb(EnDodongo* this, PlayState* play) { deathFireAccel.x = deathFireVel.x * -0.1f; deathFireAccel.y = deathFireVel.y * -0.1f; deathFireAccel.z = deathFireVel.z * -0.1f; - pos.x = this->sphElements[0].dim.worldSphere.center.x + deathFireVel.x; - pos.y = this->sphElements[0].dim.worldSphere.center.y + deathFireVel.y; - pos.z = this->sphElements[0].dim.worldSphere.center.z + deathFireVel.z; + pos.x = this->bodyColliderElements[0].dim.worldSphere.center.x + deathFireVel.x; + pos.y = this->bodyColliderElements[0].dim.worldSphere.center.y + deathFireVel.y; + pos.z = this->bodyColliderElements[0].dim.worldSphere.center.z + deathFireVel.z; func_8002836C(play, &pos, &deathFireVel, &deathFireAccel, &this->bombSmokePrimColor, &this->bombSmokeEnvColor, 400, 10, 10); } @@ -620,13 +620,13 @@ void EnDodongo_SweepTail(EnDodongo* this, PlayState* play) { if (SkelAnime_Update(&this->skelAnime)) { if ((this->timer != 0) || (ABS(yawDiff1) < 0x4000)) { - this->sphElements[2].base.atElemFlags = ATELEM_NONE; - this->sphElements[1].base.atElemFlags = ATELEM_NONE; - this->colliderBody.base.atFlags = AT_NONE; - this->sphElements[2].base.atDmgInfo.dmgFlags = 0; - this->sphElements[1].base.atDmgInfo.dmgFlags = 0; - this->sphElements[2].base.atDmgInfo.damage = 0; - this->sphElements[1].base.atDmgInfo.damage = 0; + this->bodyColliderElements[2].base.atElemFlags = ATELEM_NONE; + this->bodyColliderElements[1].base.atElemFlags = ATELEM_NONE; + this->bodyCollider.base.atFlags = AT_NONE; + this->bodyColliderElements[2].base.atDmgInfo.dmgFlags = 0; + this->bodyColliderElements[1].base.atDmgInfo.dmgFlags = 0; + this->bodyColliderElements[2].base.atDmgInfo.damage = 0; + this->bodyColliderElements[1].base.atDmgInfo.damage = 0; EnDodongo_SetupBreatheFire(this); this->timer = Rand_S16Offset(5, 10); } else { @@ -643,33 +643,36 @@ void EnDodongo_SweepTail(EnDodongo* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_J_TAIL); Animation_PlayOnceSetSpeed(&this->skelAnime, animation, 2.0f); this->timer = 18; - this->colliderBody.base.atFlags = this->sphElements[1].base.atElemFlags = - this->sphElements[2].base.atElemFlags = AT_ON | AT_TYPE_ENEMY; // also ATELEM_ON | ATELEM_SFX_WOOD - this->sphElements[1].base.atDmgInfo.dmgFlags = this->sphElements[2].base.atDmgInfo.dmgFlags = DMG_DEFAULT; - this->sphElements[1].base.atDmgInfo.damage = this->sphElements[2].base.atDmgInfo.damage = 8; + this->bodyCollider.base.atFlags = this->bodyColliderElements[1].base.atElemFlags = + this->bodyColliderElements[2].base.atElemFlags = + AT_ON | AT_TYPE_ENEMY; // also ATELEM_ON | ATELEM_SFX_WOOD + this->bodyColliderElements[1].base.atDmgInfo.dmgFlags = + this->bodyColliderElements[2].base.atDmgInfo.dmgFlags = DMG_DEFAULT; + this->bodyColliderElements[1].base.atDmgInfo.damage = this->bodyColliderElements[2].base.atDmgInfo.damage = + 8; } } else if (this->timer > 1) { Vec3f tailPos; this->timer--; this->actor.shape.rot.y = this->actor.world.rot.y += this->tailSwipeSpeed; - tailPos.x = this->sphElements[1].dim.worldSphere.center.x; - tailPos.y = this->sphElements[1].dim.worldSphere.center.y; - tailPos.z = this->sphElements[1].dim.worldSphere.center.z; + tailPos.x = this->bodyColliderElements[1].dim.worldSphere.center.x; + tailPos.y = this->bodyColliderElements[1].dim.worldSphere.center.y; + tailPos.z = this->bodyColliderElements[1].dim.worldSphere.center.z; Actor_SpawnFloorDustRing(play, &this->actor, &tailPos, 5.0f, 2, 2.0f, 100, 15, false); - tailPos.x = this->sphElements[2].dim.worldSphere.center.x; - tailPos.y = this->sphElements[2].dim.worldSphere.center.y; - tailPos.z = this->sphElements[2].dim.worldSphere.center.z; + tailPos.x = this->bodyColliderElements[2].dim.worldSphere.center.x; + tailPos.y = this->bodyColliderElements[2].dim.worldSphere.center.y; + tailPos.z = this->bodyColliderElements[2].dim.worldSphere.center.z; Actor_SpawnFloorDustRing(play, &this->actor, &tailPos, 5.0f, 2, 2.0f, 100, 15, false); - if (this->colliderBody.base.atFlags & AT_HIT) { + if (this->bodyCollider.base.atFlags & AT_HIT) { Player* player = GET_PLAYER(play); - if (this->colliderBody.base.at == &player->actor) { + if (this->bodyCollider.base.at == &player->actor) { Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT); } } - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderBody.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->bodyCollider.base); } } @@ -726,10 +729,10 @@ void EnDodongo_Stunned(EnDodongo* this, PlayState* play) { void EnDodongo_CollisionCheck(EnDodongo* this, PlayState* play) { if (this->colliderHard.base.acFlags & AC_BOUNCED) { this->colliderHard.base.acFlags &= ~AC_BOUNCED; - this->colliderBody.base.acFlags &= ~AC_HIT; - } else if ((this->colliderBody.base.acFlags & AC_HIT) && (this->actionState > DODONGO_DEATH)) { - this->colliderBody.base.acFlags &= ~AC_HIT; - Actor_SetDropFlagJntSph(&this->actor, &this->colliderBody, false); + this->bodyCollider.base.acFlags &= ~AC_HIT; + } else if ((this->bodyCollider.base.acFlags & AC_HIT) && (this->actionState > DODONGO_DEATH)) { + this->bodyCollider.base.acFlags &= ~AC_HIT; + Actor_SetDropFlagJntSph(&this->actor, &this->bodyCollider, false); if (this->actor.colChkInfo.damageEffect != 0xE) { this->damageEffect = this->actor.colChkInfo.damageEffect; if ((this->actor.colChkInfo.damageEffect == 1) || (this->actor.colChkInfo.damageEffect == 0xF)) { @@ -790,12 +793,12 @@ void EnDodongo_Update(Actor* thisx, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_RIZA_DOWN); } } - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderBody.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCollider.base); if (this->actionState != DODONGO_DEATH) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderHard.base); } if (this->actionState > DODONGO_DEATH) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base); } if ((this->actionState >= DODONGO_IDLE) && EnDodongo_AteBomb(this, play)) { EnDodongo_SetupSwallowBomb(this); @@ -852,7 +855,7 @@ void EnDodongo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* Vec3f mouthOffset = { 1800.0f, 1200.0f, 0.0f }; Vec3f headOffset = { 1500.0f, 300.0f, 0.0f }; - Collider_UpdateSpheres(limbIndex, &this->colliderBody); + Collider_UpdateSpheres(limbIndex, &this->bodyCollider); switch (limbIndex) { case 2: diff --git a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.h b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.h index 14bb2a524f..7785030d49 100644 --- a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.h +++ b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.h @@ -35,8 +35,8 @@ typedef struct EnDodongo { /* 0x03D4 */ ColliderQuad colliderAT; /* 0x0454 */ ColliderTris colliderHard; /* 0x0474 */ ColliderTrisElement trisElements[3]; - /* 0x0588 */ ColliderJntSph colliderBody; - /* 0x05A8 */ ColliderJntSphElement sphElements[6]; + /* 0x0588 */ ColliderJntSph bodyCollider; + /* 0x05A8 */ ColliderJntSphElement bodyColliderElements[6]; } EnDodongo; // size = 0x0728 typedef enum EnDodongoParam { diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index 5429024c74..a2d4bc5f28 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -583,7 +583,7 @@ void EnHorse_UpdateIngoRaceInfo(EnHorse* this, PlayState* play, RaceInfo* raceIn EnHorse_RotateToPoint(this, play, &curWaypointPos, 400); if (distSq < SQ(300.0f)) { - if (this->actor.xzDistToPlayer < 130.0f || this->jntSph.elements[0].base.ocElemFlags & OCELEM_HIT) { + if (this->actor.xzDistToPlayer < 130.0f || this->colliderJntSph.elements[0].base.ocElemFlags & OCELEM_HIT) { s32 pad; if (Math_SinS(this->actor.yawTowardsPlayer - this->actor.world.rot.y) > 0.0f) { @@ -844,8 +844,8 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { Collider_SetCylinder(play, &this->cyl1, &this->actor, &sCylinderInit1); Collider_InitCylinder(play, &this->cyl2); Collider_SetCylinder(play, &this->cyl2, &this->actor, &sCylinderInit2); - Collider_InitJntSph(play, &this->jntSph); - Collider_SetJntSph(play, &this->jntSph, &this->actor, &sJntSphInit, &this->jntSphList); + Collider_InitJntSph(play, &this->colliderJntSph); + Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements); CollisionCheck_SetInfo(&this->actor.colChkInfo, DamageTable_Get(0xB), &D_80A65F38); this->actor.focus.pos = this->actor.world.pos; this->actor.focus.pos.y += 70.0f; @@ -930,7 +930,7 @@ void EnHorse_Destroy(Actor* thisx, PlayState* play) { Skin_Free(play, &this->skin); Collider_DestroyCylinder(play, &this->cyl1); Collider_DestroyCylinder(play, &this->cyl2); - Collider_DestroyJntSph(play, &this->jntSph); + Collider_DestroyJntSph(play, &this->colliderJntSph); } void EnHorse_RotateToPlayer(EnHorse* this, PlayState* play) { @@ -951,7 +951,7 @@ void EnHorse_Freeze(EnHorse* this) { this->action = ENHORSE_ACT_FROZEN; this->cyl1.base.ocFlags1 &= ~OC1_ON; this->cyl2.base.ocFlags1 &= ~OC1_ON; - this->jntSph.base.ocFlags1 &= ~OC1_ON; + this->colliderJntSph.base.ocFlags1 &= ~OC1_ON; this->animationIdx = ENHORSE_ANIM_IDLE; } } @@ -967,7 +967,7 @@ void EnHorse_Frozen(EnHorse* this, PlayState* play) { if (this->noInputTimer < 0) { this->cyl1.base.ocFlags1 |= OC1_ON; this->cyl2.base.ocFlags1 |= OC1_ON; - this->jntSph.base.ocFlags1 |= OC1_ON; + this->colliderJntSph.base.ocFlags1 |= OC1_ON; if (this->playerControlled == true) { this->stateFlags &= ~ENHORSE_FLAG_7; if (this->actor.params == HORSE_PTYPE_4) { @@ -1752,7 +1752,7 @@ void EnHorse_HighJump(EnHorse* this, PlayState* play) { void EnHorse_InitInactive(EnHorse* this) { this->cyl1.base.ocFlags1 &= ~OC1_ON; this->cyl2.base.ocFlags1 &= ~OC1_ON; - this->jntSph.base.ocFlags1 &= ~OC1_ON; + this->colliderJntSph.base.ocFlags1 &= ~OC1_ON; this->action = ENHORSE_ACT_INACTIVE; this->animationIdx = ENHORSE_ANIM_WALK; this->stateFlags |= ENHORSE_INACTIVE; @@ -1786,7 +1786,7 @@ void EnHorse_Inactive(EnHorse* this, PlayState* play2) { this->actor.params = HORSE_PTYPE_0; this->cyl1.base.ocFlags1 |= OC1_ON; this->cyl2.base.ocFlags1 |= OC1_ON; - this->jntSph.base.ocFlags1 |= OC1_ON; + this->colliderJntSph.base.ocFlags1 |= OC1_ON; } } @@ -3570,12 +3570,12 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) { this->rider->shape.rot.y = thisx->shape.rot.y; } } - if (this->jntSph.elements[0].base.ocElemFlags & OCELEM_HIT) { + if (this->colliderJntSph.elements[0].base.ocElemFlags & OCELEM_HIT) { if (thisx->speed > 6.0f) { thisx->speed -= 1.0f; } } - if (this->jntSph.base.acFlags & AC_HIT) { + if (this->colliderJntSph.base.acFlags & AC_HIT) { this->unk_21C = this->unk_228; if (this->stateFlags & ENHORSE_DRAW) { Audio_PlaySfxGeneral(NA_SE_EV_HORSE_NEIGH, &this->unk_21C, 4, &gSfxDefaultFreqAndVolScale, @@ -3836,17 +3836,17 @@ void EnHorse_PostDraw(Actor* thisx, PlayState* play, Skin* skin) { } } - for (i = 0; i < this->jntSph.count; i++) { - center.x = this->jntSph.elements[i].dim.modelSphere.center.x; - center.y = this->jntSph.elements[i].dim.modelSphere.center.y; - center.z = this->jntSph.elements[i].dim.modelSphere.center.z; + for (i = 0; i < this->colliderJntSph.count; i++) { + center.x = this->colliderJntSph.elements[i].dim.modelSphere.center.x; + center.y = this->colliderJntSph.elements[i].dim.modelSphere.center.y; + center.z = this->colliderJntSph.elements[i].dim.modelSphere.center.z; - Skin_GetLimbPos(skin, this->jntSph.elements[i].dim.limb, ¢er, &newCenter); - this->jntSph.elements[i].dim.worldSphere.center.x = newCenter.x; - this->jntSph.elements[i].dim.worldSphere.center.y = newCenter.y; - this->jntSph.elements[i].dim.worldSphere.center.z = newCenter.z; - this->jntSph.elements[i].dim.worldSphere.radius = - this->jntSph.elements[i].dim.modelSphere.radius * this->jntSph.elements[i].dim.scale; + Skin_GetLimbPos(skin, this->colliderJntSph.elements[i].dim.limb, ¢er, &newCenter); + this->colliderJntSph.elements[i].dim.worldSphere.center.x = newCenter.x; + this->colliderJntSph.elements[i].dim.worldSphere.center.y = newCenter.y; + this->colliderJntSph.elements[i].dim.worldSphere.center.z = newCenter.z; + this->colliderJntSph.elements[i].dim.worldSphere.radius = + this->colliderJntSph.elements[i].dim.modelSphere.radius * this->colliderJntSph.elements[i].dim.scale; } //! @bug Setting colliders in a draw function allows for duplicate entries to be added to their respective lists @@ -3854,8 +3854,8 @@ void EnHorse_PostDraw(Actor* thisx, PlayState* play, Skin* skin) { //! Actors will draw for a couple of frames between the pauses, but some important logic updates will not occur. //! In the case of OC, this can cause unwanted effects such as a very large amount of displacement being applied to //! a colliding actor. - CollisionCheck_SetOC(play, &play->colChkCtx, &this->jntSph.base); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->jntSph.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base); } // unused diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.h b/src/overlays/actors/ovl_En_Horse/z_en_horse.h index 059cf67682..2acf638395 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.h +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.h @@ -142,8 +142,8 @@ typedef struct EnHorse { /* 0x0274 */ f32 jumpStartY; /* 0x0278 */ ColliderCylinder cyl1; /* 0x02C4 */ ColliderCylinder cyl2; - /* 0x0310 */ ColliderJntSph jntSph; - /* 0x0330 */ ColliderJntSphElement jntSphList; + /* 0x0310 */ ColliderJntSph colliderJntSph; + /* 0x0330 */ ColliderJntSphElement colliderJntSphElements[1]; /* 0x0370 */ u32 playerDir; /* 0x0374 */ s16 unk_374; /* 0x0376 */ s16 angleToPlayer; diff --git a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c index 0ce01f2d6e..2d79d7b09a 100644 --- a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c +++ b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c @@ -181,10 +181,10 @@ void EnHorseGanon_Init(Actor* thisx, PlayState* play) { this->currentAnimation = 0; Animation_PlayOnce(&this->skin.skelAnime, sAnimations[0]); - Collider_InitCylinder(play, &this->colliderBody); - Collider_SetCylinder(play, &this->colliderBody, &this->actor, &sCylinderInit); - Collider_InitJntSph(play, &this->colliderHead); - Collider_SetJntSph(play, &this->colliderHead, &this->actor, &sJntSphInit, this->headElements); + Collider_InitCylinder(play, &this->bodyCollider); + Collider_SetCylinder(play, &this->bodyCollider, &this->actor, &sCylinderInit); + Collider_InitJntSph(play, &this->headCollider); + Collider_SetJntSph(play, &this->headCollider, &this->actor, &sJntSphInit, this->headColliderElements); CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit); func_80A68AC4(this); @@ -194,8 +194,8 @@ void EnHorseGanon_Destroy(Actor* thisx, PlayState* play) { EnHorseGanon* this = (EnHorseGanon*)thisx; Skin_Free(play, &this->skin); - Collider_DestroyCylinder(play, &this->colliderBody); - Collider_DestroyJntSph(play, &this->colliderHead); + Collider_DestroyCylinder(play, &this->bodyCollider); + Collider_DestroyJntSph(play, &this->headCollider); } void func_80A68AC4(EnHorseGanon* this) { @@ -293,8 +293,8 @@ void EnHorseGanon_Update(Actor* thisx, PlayState* play) { UPDBGCHECKINFO_FLAG_4); this->actor.focus.pos = this->actor.world.pos; this->actor.focus.pos.y += 70.0f; - Collider_UpdateCylinder(&this->actor, &this->colliderBody); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderBody.base); + Collider_UpdateCylinder(&this->actor, &this->bodyCollider); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCollider.base); } void EnHorseGanon_PostDraw(Actor* thisx, PlayState* play, Skin* skin) { @@ -303,23 +303,23 @@ void EnHorseGanon_PostDraw(Actor* thisx, PlayState* play, Skin* skin) { EnHorseGanon* this = (EnHorseGanon*)thisx; s32 index; - for (index = 0; index < this->colliderHead.count; index++) { - sp4C.x = this->colliderHead.elements[index].dim.modelSphere.center.x; - sp4C.y = this->colliderHead.elements[index].dim.modelSphere.center.y; - sp4C.z = this->colliderHead.elements[index].dim.modelSphere.center.z; + for (index = 0; index < this->headCollider.count; index++) { + sp4C.x = this->headCollider.elements[index].dim.modelSphere.center.x; + sp4C.y = this->headCollider.elements[index].dim.modelSphere.center.y; + sp4C.z = this->headCollider.elements[index].dim.modelSphere.center.z; - Skin_GetLimbPos(skin, this->colliderHead.elements[index].dim.limb, &sp4C, &sp40); + Skin_GetLimbPos(skin, this->headCollider.elements[index].dim.limb, &sp4C, &sp40); - this->colliderHead.elements[index].dim.worldSphere.center.x = sp40.x; - this->colliderHead.elements[index].dim.worldSphere.center.y = sp40.y; - this->colliderHead.elements[index].dim.worldSphere.center.z = sp40.z; + this->headCollider.elements[index].dim.worldSphere.center.x = sp40.x; + this->headCollider.elements[index].dim.worldSphere.center.y = sp40.y; + this->headCollider.elements[index].dim.worldSphere.center.z = sp40.z; - this->colliderHead.elements[index].dim.worldSphere.radius = - this->colliderHead.elements[index].dim.modelSphere.radius * this->colliderHead.elements[index].dim.scale; + this->headCollider.elements[index].dim.worldSphere.radius = + this->headCollider.elements[index].dim.modelSphere.radius * this->headCollider.elements[index].dim.scale; } //! @bug see relevant comment in `EnHorse_SkinCallback1` - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderHead.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->headCollider.base); } void EnHorseGanon_Draw(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.h b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.h index 8083adeee6..7e4694e295 100644 --- a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.h +++ b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.h @@ -19,9 +19,9 @@ typedef struct EnHorseGanon { /* 0x01F0 */ u8 unk_1F0[0x04]; /* 0x01F4 */ f32 unk_1F4; /* 0x01F8 */ u8 unk_1F8[0x04]; - /* 0x01FC */ ColliderCylinder colliderBody; - /* 0x0248 */ ColliderJntSph colliderHead; - /* 0x0268 */ ColliderJntSphElement headElements[1]; + /* 0x01FC */ ColliderCylinder bodyCollider; + /* 0x0248 */ ColliderJntSph headCollider; + /* 0x0268 */ ColliderJntSphElement headColliderElements[1]; } EnHorseGanon; // size = 0x02A8 #endif diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c index 755916a390..d88cf92eeb 100644 --- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c +++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c @@ -168,7 +168,7 @@ void EnHorseLinkChild_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->bodyCollider); Collider_SetCylinderType1(play, &this->bodyCollider, &this->actor, &sCylinderInit); Collider_InitJntSph(play, &this->headCollider); - Collider_SetJntSph(play, &this->headCollider, &this->actor, &sJntSphInit, this->headElements); + Collider_SetJntSph(play, &this->headCollider, &this->actor, &sJntSphInit, this->headColliderElements); CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColCheckInfoInit); this->unk_1F0 = 0; this->eyeTexIndex = 0; diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.h b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.h index 3ad5a449af..a4e9b512d7 100644 --- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.h +++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.h @@ -20,7 +20,7 @@ typedef struct EnHorseLinkChild { /* 0x01F0 */ s32 unk_1F0; /* 0x01F4 */ ColliderCylinder bodyCollider; /* 0x0240 */ ColliderJntSph headCollider; - /* 0x0260 */ ColliderJntSphElement headElements[1]; + /* 0x0260 */ ColliderJntSphElement headColliderElements[1]; /* 0x02A0 */ s32 unk_2A0; } EnHorseLinkChild; // size = 0x02A4 diff --git a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c index 7764f3d020..b186fc2958 100644 --- a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c +++ b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c @@ -197,7 +197,7 @@ void EnHorseNormal_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->bodyCollider); Collider_SetCylinder(play, &this->bodyCollider, &this->actor, &sCylinderInit1); Collider_InitJntSph(play, &this->headCollider); - Collider_SetJntSph(play, &this->headCollider, &this->actor, &sJntSphInit, this->headElements); + Collider_SetJntSph(play, &this->headCollider, &this->actor, &sJntSphInit, this->headColliderElements); Collider_InitCylinder(play, &this->cloneCollider); Collider_SetCylinder(play, &this->cloneCollider, &this->actor, &sCylinderInit2); CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit); diff --git a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.h b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.h index f9445eb186..d4cb165941 100644 --- a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.h +++ b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.h @@ -26,7 +26,7 @@ typedef struct EnHorseNormal { /* 0x0224 */ char unk_224[0x04]; /* 0x0228 */ ColliderCylinder bodyCollider; /* 0x0274 */ ColliderJntSph headCollider; - /* 0x0294 */ ColliderJntSphElement headElements[1]; + /* 0x0294 */ ColliderJntSphElement headColliderElements[1]; /* 0x02D4 */ ColliderCylinder cloneCollider; /* 0x0320 */ char unk_320[0x04]; /* 0x0324 */ s32 waypoint; diff --git a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c index 04b7b19336..bb4469ff1e 100644 --- a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c +++ b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c @@ -163,8 +163,8 @@ void EnHorseZelda_Init(Actor* thisx, PlayState* play) { Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[0]); Collider_InitCylinder(play, &this->colliderCylinder); Collider_SetCylinderType1(play, &this->colliderCylinder, &this->actor, &sCylinderInit); - Collider_InitJntSph(play, &this->colliderSphere); - Collider_SetJntSph(play, &this->colliderSphere, &this->actor, &sJntSphInit, &this->colliderSphereItem); + Collider_InitJntSph(play, &this->colliderJntSph); + Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements); CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit); this->animationIndex = 0; EnHorseZelda_SetupStop(this); @@ -174,7 +174,7 @@ void EnHorseZelda_Destroy(Actor* thisx, PlayState* play) { EnHorseZelda* this = (EnHorseZelda*)thisx; Collider_DestroyCylinder(play, &this->colliderCylinder); - Collider_DestroyJntSph(play, &this->colliderSphere); + Collider_DestroyJntSph(play, &this->colliderJntSph); Skin_Free(play, &this->skin); } @@ -250,23 +250,23 @@ void EnHorseZelda_PostDraw(Actor* thisx, PlayState* play, Skin* skin) { EnHorseZelda* this = (EnHorseZelda*)thisx; s32 i; - for (i = 0; i < this->colliderSphere.count; i++) { - offset.x = this->colliderSphere.elements[i].dim.modelSphere.center.x; - offset.y = this->colliderSphere.elements[i].dim.modelSphere.center.y; - offset.z = this->colliderSphere.elements[i].dim.modelSphere.center.z; + for (i = 0; i < this->colliderJntSph.count; i++) { + offset.x = this->colliderJntSph.elements[i].dim.modelSphere.center.x; + offset.y = this->colliderJntSph.elements[i].dim.modelSphere.center.y; + offset.z = this->colliderJntSph.elements[i].dim.modelSphere.center.z; - Skin_GetLimbPos(skin, this->colliderSphere.elements[i].dim.limb, &offset, &dst); + Skin_GetLimbPos(skin, this->colliderJntSph.elements[i].dim.limb, &offset, &dst); - this->colliderSphere.elements[i].dim.worldSphere.center.x = dst.x; - this->colliderSphere.elements[i].dim.worldSphere.center.y = dst.y; - this->colliderSphere.elements[i].dim.worldSphere.center.z = dst.z; + this->colliderJntSph.elements[i].dim.worldSphere.center.x = dst.x; + this->colliderJntSph.elements[i].dim.worldSphere.center.y = dst.y; + this->colliderJntSph.elements[i].dim.worldSphere.center.z = dst.z; - this->colliderSphere.elements[i].dim.worldSphere.radius = - this->colliderSphere.elements[i].dim.modelSphere.radius * this->colliderSphere.elements[i].dim.scale; + this->colliderJntSph.elements[i].dim.worldSphere.radius = + this->colliderJntSph.elements[i].dim.modelSphere.radius * this->colliderJntSph.elements[i].dim.scale; } //! @bug see relevant comment in `EnHorse_SkinCallback1` - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderSphere.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base); } void EnHorseZelda_Draw(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h index 7ce6cace3a..db63df4032 100644 --- a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h +++ b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h @@ -19,8 +19,8 @@ typedef struct EnHorseZelda { /* 0x01F4 */ f32 floorYForwards; /* 0x01F8 */ char unk_1F8[0x4]; /* 0x01FC */ ColliderCylinder colliderCylinder; - /* 0x0248 */ ColliderJntSph colliderSphere; - /* 0x0268 */ ColliderJntSphElement colliderSphereItem; + /* 0x0248 */ ColliderJntSph colliderJntSph; + /* 0x0268 */ ColliderJntSphElement colliderJntSphElements[1]; } EnHorseZelda; // size = 0x02A8 #endif diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/src/overlays/actors/ovl_En_Insect/z_en_insect.c index 51ad0b9b32..2175769fbe 100644 --- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -204,7 +204,7 @@ void EnInsect_Init(Actor* thisx, PlayState* play2) { SkelAnime_Init(play, &this->skelAnime, &gBugSkel, &gBugCrawlAnim, this->jointTable, this->morphTable, 24); Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderInit, &this->colliderItem); + Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderInit, this->colliderElements); this->actor.colChkInfo.mass = 30; diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.h b/src/overlays/actors/ovl_En_Insect/z_en_insect.h index 733758935d..7bf443a2ea 100644 --- a/src/overlays/actors/ovl_En_Insect/z_en_insect.h +++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.h @@ -21,7 +21,7 @@ typedef void (*EnInsectActionFunc)(struct EnInsect*, struct PlayState*); typedef struct EnInsect { /* 0x0000 */ Actor actor; /* 0x014C */ ColliderJntSph collider; - /* 0x016C */ ColliderJntSphElement colliderItem; + /* 0x016C */ ColliderJntSphElement colliderElements[1]; /* 0x01AC */ SkelAnime skelAnime; /* 0x01F0 */ Vec3s jointTable[24]; /* 0x0280 */ Vec3s morphTable[24]; diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c index adaf5e84d8..b78715e962 100644 --- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c +++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c @@ -218,12 +218,12 @@ void EnPeehat_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.health = 6; this->actor.colChkInfo.damageTable = &sDamageTable; this->actor.floorHeight = this->actor.world.pos.y; - Collider_InitCylinder(play, &this->colCylinder); - Collider_SetCylinder(play, &this->colCylinder, &this->actor, &sCylinderInit); - Collider_InitQuad(play, &this->colQuad); - Collider_SetQuad(play, &this->colQuad, &this->actor, &sQuadInit); - Collider_InitJntSph(play, &this->colJntSph); - Collider_SetJntSph(play, &this->colJntSph, &this->actor, &sJntSphInit, this->colJntSphItemList); + Collider_InitCylinder(play, &this->colliderCylinder); + Collider_SetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInit); + Collider_InitQuad(play, &this->colliderQuad); + Collider_SetQuad(play, &this->colliderQuad, &this->actor, &sQuadInit); + Collider_InitJntSph(play, &this->colliderJntSph); + Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements); this->actor.naviEnemyId = NAVI_ENEMY_PEAHAT; this->xzDistToRise = 740.0f; @@ -245,12 +245,12 @@ void EnPeehat_Init(Actor* thisx, PlayState* play) { case PEAHAT_TYPE_LARVA: this->actor.scale.x = this->actor.scale.z = 0.006f; this->actor.scale.y = 0.003f; - this->colCylinder.dim.radius = 25; - this->colCylinder.dim.height = 15; - this->colCylinder.dim.yShift = -5; - this->colCylinder.elem.acDmgInfo.dmgFlags = DMG_ARROW | DMG_SLINGSHOT; - this->colQuad.base.atFlags = AT_ON | AT_TYPE_ENEMY; - this->colQuad.base.acFlags = AC_ON | AC_TYPE_PLAYER; + this->colliderCylinder.dim.radius = 25; + this->colliderCylinder.dim.height = 15; + this->colliderCylinder.dim.yShift = -5; + this->colliderCylinder.elem.acDmgInfo.dmgFlags = DMG_ARROW | DMG_SLINGSHOT; + this->colliderQuad.base.atFlags = AT_ON | AT_TYPE_ENEMY; + this->colliderQuad.base.acFlags = AC_ON | AC_TYPE_PLAYER; this->actor.naviEnemyId = NAVI_ENEMY_PEAHAT_LARVA; EnPeehat_Larva_SetStateSeekPlayer(this); break; @@ -261,8 +261,8 @@ void EnPeehat_Destroy(Actor* thisx, PlayState* play) { EnPeehat* this = (EnPeehat*)thisx; EnPeehat* parent; - Collider_DestroyCylinder(play, &this->colCylinder); - Collider_DestroyJntSph(play, &this->colJntSph); + Collider_DestroyCylinder(play, &this->colliderCylinder); + Collider_DestroyJntSph(play, &this->colliderJntSph); // If PEAHAT_TYPE_LARVA, decrement total larva spawned if (this->actor.params > 0) { @@ -295,7 +295,7 @@ void EnPeehat_SpawnDust(PlayState* play, EnPeehat* this, Vec3f* pos, f32 arg3, s * Handles being hit when on the ground */ void EnPeehat_HitWhenGrounded(EnPeehat* this, PlayState* play) { - this->colCylinder.base.acFlags &= ~AC_HIT; + this->colliderCylinder.base.acFlags &= ~AC_HIT; if ((play->gameplayFrames & 0xF) == 0) { Vec3f itemDropPos = this->actor.world.pos; @@ -307,7 +307,7 @@ void EnPeehat_HitWhenGrounded(EnPeehat* this, PlayState* play) { } else { s32 i; - this->colCylinder.base.acFlags &= ~AC_HIT; + this->colliderCylinder.base.acFlags &= ~AC_HIT; for (i = MAX_LARVA - this->unk_2FA; i > 0; i--) { Actor* larva = Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_PEEHAT, @@ -333,7 +333,7 @@ void EnPeehat_Ground_SetStateGround(EnPeehat* this) { this->unk_2D4 = 0; this->unk_2FA = 0; this->state = PEAHAT_STATE_3; - this->colCylinder.base.acFlags &= ~AC_HIT; + this->colliderCylinder.base.acFlags &= ~AC_HIT; EnPeehat_SetupAction(this, EnPeehat_Ground_StateGround); } @@ -358,7 +358,7 @@ void EnPeehat_Ground_StateGround(EnPeehat* this, PlayState* play) { } else { Math_SmoothStepToF(&this->scaleShift, 0.0f, 1.0f, 0.005f, 0.0f); } - } else if (this->colCylinder.base.acFlags & AC_HIT) { + } else if (this->colliderCylinder.base.acFlags & AC_HIT) { EnPeehat_HitWhenGrounded(this, play); } } @@ -388,7 +388,7 @@ void EnPeehat_Flying_StateGrounded(EnPeehat* this, PlayState* play) { } else { Math_SmoothStepToF(&this->scaleShift, 0.0f, 1.0f, 0.005f, 0.0f); } - } else if (this->colCylinder.base.acFlags & AC_HIT) { + } else if (this->colliderCylinder.base.acFlags & AC_HIT) { EnPeehat_HitWhenGrounded(this, play); } } @@ -575,22 +575,22 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* this, PlayState* play) { this->bladeRot += this->bladeRotVel; Math_SmoothStepToF(&this->scaleShift, 0.075f, 1.0f, 0.005f, 0.0f); Actor_PlaySfx(&this->actor, NA_SE_EN_PIHAT_SM_FLY - SFX_FLAG); - if (this->colQuad.base.atFlags & AT_BOUNCED) { + if (this->colliderQuad.base.atFlags & AT_BOUNCED) { this->actor.colChkInfo.health = 0; - this->colQuad.base.acFlags &= ~AC_BOUNCED; + this->colliderQuad.base.acFlags &= ~AC_BOUNCED; EnPeehat_SetStateAttackRecoil(this); - } else if ((this->colQuad.base.atFlags & AT_HIT) || (this->colCylinder.base.acFlags & AC_HIT) || + } else if ((this->colliderQuad.base.atFlags & AT_HIT) || (this->colliderCylinder.base.acFlags & AC_HIT) || (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) { Player* player = GET_PLAYER(play); - this->colQuad.base.atFlags &= ~AT_HIT; - if (!(this->colCylinder.base.acFlags & AC_HIT) && &player->actor == this->colQuad.base.at) { + this->colliderQuad.base.atFlags &= ~AT_HIT; + if (!(this->colliderCylinder.base.acFlags & AC_HIT) && &player->actor == this->colliderQuad.base.at) { if (Rand_ZeroOne() > 0.5f) { this->actor.world.rot.y += 0x2000; } else { this->actor.world.rot.y -= 0x2000; } this->unk_2D4 = 40; - } else if (this->colCylinder.base.acFlags & AC_HIT || this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { + } else if (this->colliderCylinder.base.acFlags & AC_HIT || this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { Vec3f zeroVec = { 0, 0, 0 }; s32 i; for (i = 4; i >= 0; i--) { @@ -601,7 +601,7 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* this, PlayState* play) { EffectSsDeadDb_Spawn(play, &pos, &zeroVec, &zeroVec, 40, 7, 255, 255, 255, 255, 255, 0, 0, 1, 9, 1); } } - if (&player->actor != this->colQuad.base.at || this->colCylinder.base.acFlags & AC_HIT) { + if (&player->actor != this->colliderQuad.base.at || this->colliderCylinder.base.acFlags & AC_HIT) { if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) { EffectSsDeadSound_SpawnStationary(play, &this->actor.projectedPos, NA_SE_EN_PIHAT_SM_DEAD, 1, 1, 40); } @@ -894,13 +894,13 @@ void EnPeehat_StateExplode(EnPeehat* this, PlayState* play) { } void EnPeehat_Adult_CollisionCheck(EnPeehat* this, PlayState* play) { - if ((this->colCylinder.base.acFlags & AC_BOUNCED) || (this->colQuad.base.acFlags & AC_BOUNCED)) { - this->colQuad.base.acFlags &= ~AC_BOUNCED; - this->colCylinder.base.acFlags &= ~AC_BOUNCED; - this->colJntSph.base.acFlags &= ~AC_HIT; - } else if (this->colJntSph.base.acFlags & AC_HIT) { - this->colJntSph.base.acFlags &= ~AC_HIT; - Actor_SetDropFlagJntSph(&this->actor, &this->colJntSph, true); + if ((this->colliderCylinder.base.acFlags & AC_BOUNCED) || (this->colliderQuad.base.acFlags & AC_BOUNCED)) { + this->colliderQuad.base.acFlags &= ~AC_BOUNCED; + this->colliderCylinder.base.acFlags &= ~AC_BOUNCED; + this->colliderJntSph.base.acFlags &= ~AC_HIT; + } else if (this->colliderJntSph.base.acFlags & AC_HIT) { + this->colliderJntSph.base.acFlags &= ~AC_HIT; + Actor_SetDropFlagJntSph(&this->actor, &this->colliderJntSph, true); if (this->actor.colChkInfo.damageEffect == PEAHAT_DMG_EFF_NUT || this->actor.colChkInfo.damageEffect == PEAHAT_DMG_EFF_LIGHT_ICE_ARROW) { return; @@ -963,9 +963,9 @@ void EnPeehat_Update(Actor* thisx, PlayState* play) { // if PEAHAT_TYPE_GROUNDED if (thisx->params < 0) { // Set the Z-Target point on the Peahat's weak point - thisx->focus.pos.x = this->colJntSph.elements[0].dim.worldSphere.center.x; - thisx->focus.pos.y = this->colJntSph.elements[0].dim.worldSphere.center.y; - thisx->focus.pos.z = this->colJntSph.elements[0].dim.worldSphere.center.z; + thisx->focus.pos.x = this->colliderJntSph.elements[0].dim.worldSphere.center.x; + thisx->focus.pos.y = this->colliderJntSph.elements[0].dim.worldSphere.center.y; + thisx->focus.pos.z = this->colliderJntSph.elements[0].dim.worldSphere.center.z; if (this->state == PEAHAT_STATE_SEEK_PLAYER) { Math_SmoothStepToS(&thisx->shape.rot.x, 6000, 1, 300, 0); } else { @@ -974,21 +974,21 @@ void EnPeehat_Update(Actor* thisx, PlayState* play) { } else { thisx->focus.pos = thisx->world.pos; } - Collider_UpdateCylinder(thisx, &this->colCylinder); + Collider_UpdateCylinder(thisx, &this->colliderCylinder); if (thisx->colChkInfo.health > 0) { // If Adult Peahat if (thisx->params <= 0) { - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colCylinder.base); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colJntSph.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base); if (thisx->colorFilterTimer == 0 || !(thisx->colorFilterParams & 0x4000)) { if (this->state != PEAHAT_STATE_EXPLODE) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colJntSph.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base); } } } - if (thisx->params != PEAHAT_TYPE_FLYING && this->colQuad.base.atFlags & AT_HIT) { - this->colQuad.base.atFlags &= ~AT_HIT; - if (&player->actor == this->colQuad.base.at) { + if (thisx->params != PEAHAT_TYPE_FLYING && this->colliderQuad.base.atFlags & AT_HIT) { + this->colliderQuad.base.atFlags &= ~AT_HIT; + if (&player->actor == this->colliderQuad.base.at) { EnPeehat_SetStateAttackRecoil(this); } } @@ -996,8 +996,8 @@ void EnPeehat_Update(Actor* thisx, PlayState* play) { if (this->state == PEAHAT_STATE_15 || this->state == PEAHAT_STATE_SEEK_PLAYER || this->state == PEAHAT_STATE_FLY || this->state == PEAHAT_STATE_RETURN_HOME || this->state == PEAHAT_STATE_EXPLODE) { if (thisx->params != PEAHAT_TYPE_FLYING) { - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colQuad.base); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colQuad.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderQuad.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderQuad.base); } // if PEAHAT_TYPE_GROUNDED if (thisx->params < 0 && (thisx->flags & ACTOR_FLAG_INSIDE_CULLING_VOLUME)) { @@ -1012,10 +1012,10 @@ void EnPeehat_Update(Actor* thisx, PlayState* play) { } } } else if (thisx->params != PEAHAT_TYPE_FLYING) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder.base); } } else { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder.base); } Math_SmoothStepToF(&this->scaleShift, 0.0f, 1.0f, 0.001f, 0.0f); } @@ -1064,7 +1064,7 @@ void EnPeehat_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* r OPEN_DISPS(play->state.gfxCtx, "../z_en_peehat.c", 1981); Matrix_Push(); Matrix_Translate(-1000.0f, 0.0f, 0.0f, MTXMODE_APPLY); - Collider_UpdateSpheres(0, &this->colJntSph); + Collider_UpdateSpheres(0, &this->colliderJntSph); Matrix_Translate(500.0f, 0.0f, 0.0f, MTXMODE_APPLY); if (this->actor.colorFilterTimer != 0 && (this->actor.colorFilterParams & 0x4000)) { damageYRot = Math_SinS(this->actor.colorFilterTimer * 0x4E20) * 0.35f; @@ -1088,11 +1088,11 @@ void EnPeehat_Draw(Actor* thisx, PlayState* play) { SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnPeehat_OverrideLimbDraw, EnPeehat_PostLimbDraw, this); if (this->actor.speed != 0.0f || this->actor.velocity.y != 0.0f) { - Matrix_MultVec3f(&D_80AD285C[0], &this->colQuad.dim.quad[1]); - Matrix_MultVec3f(&D_80AD285C[1], &this->colQuad.dim.quad[0]); - Matrix_MultVec3f(&D_80AD285C[2], &this->colQuad.dim.quad[3]); - Matrix_MultVec3f(&D_80AD285C[3], &this->colQuad.dim.quad[2]); - Collider_SetQuadVertices(&this->colQuad, &this->colQuad.dim.quad[0], &this->colQuad.dim.quad[1], - &this->colQuad.dim.quad[2], &this->colQuad.dim.quad[3]); + Matrix_MultVec3f(&D_80AD285C[0], &this->colliderQuad.dim.quad[1]); + Matrix_MultVec3f(&D_80AD285C[1], &this->colliderQuad.dim.quad[0]); + Matrix_MultVec3f(&D_80AD285C[2], &this->colliderQuad.dim.quad[3]); + Matrix_MultVec3f(&D_80AD285C[3], &this->colliderQuad.dim.quad[2]); + Collider_SetQuadVertices(&this->colliderQuad, &this->colliderQuad.dim.quad[0], &this->colliderQuad.dim.quad[1], + &this->colliderQuad.dim.quad[2], &this->colliderQuad.dim.quad[3]); } } diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.h b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.h index a10bff420a..deb24089f6 100644 --- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.h +++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.h @@ -38,10 +38,10 @@ typedef struct EnPeehat { /* 0x02FA */ s16 unk_2FA; // larva count (PEAHAT_TYPE_FLYING, PEAHAT_TYPE_GROUNDED), // shape rotation direction (PEAHAT_TYPE_GROUNDED) /* 0x02FC */ s16 animTimer; - /* 0x0300 */ ColliderCylinder colCylinder; - /* 0x034C */ ColliderJntSph colJntSph; - /* 0x036C */ ColliderJntSphElement colJntSphItemList[1]; - /* 0x03AC */ ColliderQuad colQuad; + /* 0x0300 */ ColliderCylinder colliderCylinder; + /* 0x034C */ ColliderJntSph colliderJntSph; + /* 0x036C */ ColliderJntSphElement colliderJntSphElements[1]; + /* 0x03AC */ ColliderQuad colliderQuad; } EnPeehat; // size = 0x042C #endif diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index 2deead5141..969260e5a1 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -205,14 +205,14 @@ void EnPoh_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); - Collider_InitJntSph(play, &this->colliderSph); - Collider_SetJntSph(play, &this->colliderSph, &this->actor, &sJntSphInit, &this->colliderSphItem); - this->colliderSph.elements[0].dim.worldSphere.radius = 0; - this->colliderSph.elements[0].dim.worldSphere.center.x = this->actor.world.pos.x; - this->colliderSph.elements[0].dim.worldSphere.center.y = this->actor.world.pos.y; - this->colliderSph.elements[0].dim.worldSphere.center.z = this->actor.world.pos.z; - Collider_InitCylinder(play, &this->colliderCyl); - Collider_SetCylinder(play, &this->colliderCyl, &this->actor, &sCylinderInit); + Collider_InitJntSph(play, &this->colliderJntSph); + Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements); + this->colliderJntSph.elements[0].dim.worldSphere.radius = 0; + this->colliderJntSph.elements[0].dim.worldSphere.center.x = this->actor.world.pos.x; + this->colliderJntSph.elements[0].dim.worldSphere.center.y = this->actor.world.pos.y; + this->colliderJntSph.elements[0].dim.worldSphere.center.z = this->actor.world.pos.z; + Collider_InitCylinder(play, &this->colliderCylinder); + Collider_SetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInit); CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); this->unk_194 = 0; this->unk_195 = 32; @@ -265,8 +265,8 @@ void EnPoh_Destroy(Actor* thisx, PlayState* play) { EnPoh* this = (EnPoh*)thisx; LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); - Collider_DestroyJntSph(play, &this->colliderSph); - Collider_DestroyCylinder(play, &this->colliderCyl); + Collider_DestroyJntSph(play, &this->colliderJntSph); + Collider_DestroyCylinder(play, &this->colliderCylinder); if (this->actor.params == EN_POH_RUPEE) { D_80AE1A50--; } @@ -310,12 +310,12 @@ void func_80ADE28C(EnPoh* this) { } else { Animation_PlayOnce(&this->skelAnime, &gPoeComposerDamagedAnim); } - if (this->colliderCyl.elem.acHitElem->atDmgInfo.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) { - this->actor.world.rot.y = this->colliderCyl.base.ac->world.rot.y; + if (this->colliderCylinder.elem.acHitElem->atDmgInfo.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) { + this->actor.world.rot.y = this->colliderCylinder.base.ac->world.rot.y; } else { - this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->colliderCyl.base.ac) + 0x8000; + this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->colliderCylinder.base.ac) + 0x8000; } - this->colliderCyl.base.acFlags &= ~AC_ON; + this->colliderCylinder.base.acFlags &= ~AC_ON; this->actor.speed = 5.0f; Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 16); this->actionFunc = func_80ADEECC; @@ -325,7 +325,7 @@ void func_80ADE368(EnPoh* this) { Animation_MorphToLoop(&this->skelAnime, this->info->fleeAnim, -5.0f); this->actor.speed = 5.0f; this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000; - this->colliderCyl.base.acFlags |= AC_ON; + this->colliderCylinder.base.acFlags |= AC_ON; this->unk_198 = 200; this->actionFunc = func_80ADF894; } @@ -429,13 +429,13 @@ void func_80ADE6D4(EnPoh* this) { void EnPoh_Talk(EnPoh* this, PlayState* play) { this->actor.home.pos.y = this->actor.world.pos.y; Actor_SetFocus(&this->actor, -10.0f); - this->colliderCyl.dim.radius = 13; - this->colliderCyl.dim.height = 30; - this->colliderCyl.dim.yShift = 0; - this->colliderCyl.dim.pos.x = this->actor.world.pos.x; - this->colliderCyl.dim.pos.y = this->actor.world.pos.y - 20.0f; - this->colliderCyl.dim.pos.z = this->actor.world.pos.z; - this->colliderCyl.base.ocFlags1 = OC1_ON | OC1_TYPE_PLAYER; + this->colliderCylinder.dim.radius = 13; + this->colliderCylinder.dim.height = 30; + this->colliderCylinder.dim.yShift = 0; + this->colliderCylinder.dim.pos.x = this->actor.world.pos.x; + this->colliderCylinder.dim.pos.y = this->actor.world.pos.y - 20.0f; + this->colliderCylinder.dim.pos.z = this->actor.world.pos.z; + this->colliderCylinder.base.ocFlags1 = OC1_ON | OC1_TYPE_PLAYER; if (this->actor.params == EN_POH_FLAT || this->actor.params == EN_POH_SHARP) { if (CHECK_QUEST_ITEM(QUEST_SONG_SUN)) { this->actor.textId = 0x5000; @@ -793,12 +793,12 @@ void func_80ADFE80(EnPoh* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED; return; } - if (this->colliderCyl.base.ocFlags1 & OC1_HIT) { + if (this->colliderCylinder.base.ocFlags1 & OC1_HIT) { this->actor.flags |= ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED; Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } else { this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED; - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCyl.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder.base); } this->actor.world.pos.y = Math_SinS(this->unk_195 * 0x800) * 5.0f + this->actor.home.pos.y; if (this->unk_195 != 0) { @@ -807,7 +807,7 @@ void func_80ADFE80(EnPoh* this, PlayState* play) { if (this->unk_195 == 0) { this->unk_195 = 32; } - this->colliderCyl.dim.pos.y = this->actor.world.pos.y - 20.0f; + this->colliderCylinder.dim.pos.y = this->actor.world.pos.y - 20.0f; Actor_SetFocus(&this->actor, -10.0f); Lights_PointNoGlowSetInfo(&this->lightInfo, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, this->info->lightColor.r, this->info->lightColor.g, @@ -879,8 +879,8 @@ void EnPoh_TalkComposer(EnPoh* this, PlayState* play) { } void func_80AE032C(EnPoh* this, PlayState* play) { - if (this->colliderCyl.base.acFlags & AC_HIT) { - this->colliderCyl.base.acFlags &= ~AC_HIT; + if (this->colliderCylinder.base.acFlags & AC_HIT) { + this->colliderCylinder.base.acFlags &= ~AC_HIT; if (this->actor.colChkInfo.damageEffect != 0 || this->actor.colChkInfo.damage != 0) { if (Actor_ApplyDamage(&this->actor) == 0) { Enemy_StartFinishingBlow(play, &this->actor); @@ -934,12 +934,12 @@ void EnPoh_Update(Actor* thisx, PlayState* play) { SkelAnime_InitFlex(play, &this->skelAnime, &gPoeComposerSkel, &gPoeComposerFloatAnim, this->jointTable, this->morphTable, 12); this->actor.draw = EnPoh_DrawComposer; - this->colliderSph.elements[0].dim.limb = 9; - this->colliderSph.elements[0].dim.modelSphere.center.y *= -1; + this->colliderJntSph.elements[0].dim.limb = 9; + this->colliderJntSph.elements[0].dim.modelSphere.center.y *= -1; this->actor.shape.rot.y = this->actor.world.rot.y = -0x4000; - this->colliderCyl.dim.radius = 20; - this->colliderCyl.dim.height = 55; - this->colliderCyl.dim.yShift = 15; + this->colliderCylinder.dim.radius = 20; + this->colliderCylinder.dim.height = 55; + this->colliderCylinder.dim.yShift = 15; } this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED; EnPoh_SetupInitialAction(this); @@ -1004,8 +1004,8 @@ void EnPoh_UpdateLiving(Actor* thisx, PlayState* play) { Vec3f checkPos; s32 bgId; - if (this->colliderSph.base.atFlags & AT_HIT) { - this->colliderSph.base.atFlags &= ~AT_HIT; + if (this->colliderJntSph.base.atFlags & AT_HIT) { + this->colliderJntSph.base.atFlags &= ~AT_HIT; func_80ADE4C8(this); } func_80AE032C(this, play); @@ -1014,14 +1014,14 @@ void EnPoh_UpdateLiving(Actor* thisx, PlayState* play) { Actor_MoveXZGravity(&this->actor); if (this->actionFunc == EnPoh_Attack && this->unk_198 < 10) { this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT; - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSph.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base); } - Collider_UpdateCylinder(&this->actor, &this->colliderCyl); - if ((this->colliderCyl.base.acFlags & AC_ON) && this->lightColor.a == 255) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCyl.base); + Collider_UpdateCylinder(&this->actor, &this->colliderCylinder); + if ((this->colliderCylinder.base.acFlags & AC_ON) && this->lightColor.a == 255) { + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder.base); } - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCyl.base); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderSph.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base); Actor_SetFocus(&this->actor, 42.0f); if (this->actionFunc != func_80ADEECC && this->actionFunc != func_80ADF574) { if (this->actionFunc == func_80ADF894) { @@ -1060,7 +1060,7 @@ s32 EnPoh_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p void EnPoh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfxP) { EnPoh* this = (EnPoh*)thisx; - Collider_UpdateSpheres(limbIndex, &this->colliderSph); + Collider_UpdateSpheres(limbIndex, &this->colliderJntSph); if (this->actionFunc == func_80ADF15C && this->unk_198 >= 2 && limbIndex == this->info->unk_7) { MATRIX_FINALIZE_AND_LOAD((*gfxP)++, play->state.gfxCtx, "../z_en_poh.c", 2460); gSPDisplayList((*gfxP)++, this->info->burnDisplayList); @@ -1076,9 +1076,9 @@ void EnPoh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, this->actor.world.pos.y = this->unk_368.yw; this->actor.world.pos.z = this->unk_368.zw; } - Lights_PointGlowSetInfo(&this->lightInfo, this->colliderSph.elements[0].dim.worldSphere.center.x, - this->colliderSph.elements[0].dim.worldSphere.center.y, - this->colliderSph.elements[0].dim.worldSphere.center.z, this->envColor.r, + Lights_PointGlowSetInfo(&this->lightInfo, this->colliderJntSph.elements[0].dim.worldSphere.center.x, + this->colliderJntSph.elements[0].dim.worldSphere.center.y, + this->colliderJntSph.elements[0].dim.worldSphere.center.z, this->envColor.r, this->envColor.g, this->envColor.b, this->envColor.a * (200.0f / 255)); } } diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.h b/src/overlays/actors/ovl_En_Poh/z_en_poh.h index 93dd40e176..7e7db7d997 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.h +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.h @@ -54,9 +54,9 @@ typedef struct EnPoh { /* 0x02A4 */ EnPohInfo* info; /* 0x02A8 */ LightNode* lightNode; /* 0x02AC */ LightInfo lightInfo; - /* 0x02BC */ ColliderCylinder colliderCyl; - /* 0x0308 */ ColliderJntSph colliderSph; - /* 0x0328 */ ColliderJntSphElement colliderSphItem; + /* 0x02BC */ ColliderCylinder colliderCylinder; + /* 0x0308 */ ColliderJntSph colliderJntSph; + /* 0x0328 */ ColliderJntSphElement colliderJntSphElements[1]; /* 0x0368 */ MtxF unk_368; } EnPoh; // size = 0x03A8 diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index 09b9df91c1..5216d606a2 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -198,25 +198,25 @@ void EnSsh_InitColliders(EnSsh* this, PlayState* play) { s32 pad; for (i = 0; i < ARRAY_COUNT(cylinders); i++) { - Collider_InitCylinder(play, &this->colCylinder[i]); - Collider_SetCylinder(play, &this->colCylinder[i], &this->actor, cylinders[i]); + Collider_InitCylinder(play, &this->collidersCylinder[i]); + Collider_SetCylinder(play, &this->collidersCylinder[i], &this->actor, cylinders[i]); } - this->colCylinder[0].elem.acDmgInfo.dmgFlags = + this->collidersCylinder[0].elem.acDmgInfo.dmgFlags = DMG_ARROW | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_EXPLOSIVE | DMG_DEKU_NUT; - this->colCylinder[1].elem.acDmgInfo.dmgFlags = + this->collidersCylinder[1].elem.acDmgInfo.dmgFlags = DMG_DEFAULT & ~(DMG_ARROW | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_EXPLOSIVE | DMG_DEKU_NUT) & ~(DMG_MAGIC_LIGHT | DMG_MAGIC_ICE); - this->colCylinder[2].base.colMaterial = COL_MATERIAL_METAL; - this->colCylinder[2].elem.acElemFlags = ACELEM_ON | ACELEM_HOOKABLE | ACELEM_NO_AT_INFO; - this->colCylinder[2].elem.elemMaterial = ELEM_MATERIAL_UNK2; - this->colCylinder[2].elem.acDmgInfo.dmgFlags = + this->collidersCylinder[2].base.colMaterial = COL_MATERIAL_METAL; + this->collidersCylinder[2].elem.acElemFlags = ACELEM_ON | ACELEM_HOOKABLE | ACELEM_NO_AT_INFO; + this->collidersCylinder[2].elem.elemMaterial = ELEM_MATERIAL_UNK2; + this->collidersCylinder[2].elem.acDmgInfo.dmgFlags = DMG_DEFAULT & ~(DMG_ARROW | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_EXPLOSIVE | DMG_DEKU_NUT); CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(2), &sColChkInfoInit); - Collider_InitJntSph(play, &this->colSph); - Collider_SetJntSph(play, &this->colSph, &this->actor, &sJntSphInit, this->colSphElements); + Collider_InitJntSph(play, &this->colliderJntSph); + Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements); } f32 EnSsh_SetAnimation(EnSsh* this, s32 animIndex) { @@ -270,21 +270,21 @@ void EnSsh_SetColliderScale(EnSsh* this, f32 scale, f32 radiusMod) { f32 yShift; s32 i; - radius = this->colSph.elements[0].dim.modelSphere.radius; + radius = this->colliderJntSph.elements[0].dim.modelSphere.radius; radius *= scale; - this->colSph.elements[0].dim.modelSphere.radius = radius; + this->colliderJntSph.elements[0].dim.modelSphere.radius = radius; for (i = 0; i < 6; i++) { - yShift = this->colCylinder[i].dim.yShift; - radius = this->colCylinder[i].dim.radius; - height = this->colCylinder[i].dim.height; + yShift = this->collidersCylinder[i].dim.yShift; + radius = this->collidersCylinder[i].dim.radius; + height = this->collidersCylinder[i].dim.height; yShift *= scale; radius *= scale * radiusMod; height *= scale; - this->colCylinder[i].dim.yShift = yShift; - this->colCylinder[i].dim.radius = radius; - this->colCylinder[i].dim.height = height; + this->collidersCylinder[i].dim.yShift = yShift; + this->collidersCylinder[i].dim.radius = radius; + this->collidersCylinder[i].dim.height = height; } Actor_SetScale(&this->actor, 0.04f * scale); this->floorHeightOffset = 40.0f * scale; @@ -436,17 +436,17 @@ void EnSsh_Sway(EnSsh* this) { } void EnSsh_CheckBodyStickHit(EnSsh* this, PlayState* play) { - ColliderElement* elem = &this->colCylinder[0].elem; + ColliderElement* elem = &this->collidersCylinder[0].elem; Player* player = GET_PLAYER(play); if (player->unk_860 != 0) { elem->acDmgInfo.dmgFlags |= DMG_DEKU_STICK; - this->colCylinder[1].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; - this->colCylinder[2].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; + this->collidersCylinder[1].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; + this->collidersCylinder[2].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; } else { elem->acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; - this->colCylinder[1].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; - this->colCylinder[2].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; + this->collidersCylinder[1].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; + this->collidersCylinder[2].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; } } @@ -458,8 +458,8 @@ s32 EnSsh_CheckHitPlayer(EnSsh* this, PlayState* play) { return false; } for (i = 0; i < 3; i++) { - if (this->colCylinder[i + 3].base.ocFlags2 & OC2_HIT_PLAYER) { - this->colCylinder[i + 3].base.ocFlags2 &= ~OC2_HIT_PLAYER; + if (this->collidersCylinder[i + 3].base.ocFlags2 & OC2_HIT_PLAYER) { + this->collidersCylinder[i + 3].base.ocFlags2 &= ~OC2_HIT_PLAYER; hit = true; } } @@ -481,13 +481,13 @@ s32 EnSsh_CheckHitPlayer(EnSsh* this, PlayState* play) { s32 EnSsh_CheckHitFront(EnSsh* this) { u32 acFlags; - if (this->colCylinder[2].base.acFlags) {} // Needed for matching - acFlags = this->colCylinder[2].base.acFlags; + if (this->collidersCylinder[2].base.acFlags) {} // Needed for matching + acFlags = this->collidersCylinder[2].base.acFlags; if (!!(acFlags & AC_HIT) == 0) { return 0; } else { - this->colCylinder[2].base.acFlags &= ~AC_HIT; + this->collidersCylinder[2].base.acFlags &= ~AC_HIT; this->invincibilityTimer = 8; if ((this->swayTimer == 0) && (this->hitTimer == 0) && (this->stunTimer == 0)) { this->swayTimer = 60; @@ -497,14 +497,14 @@ s32 EnSsh_CheckHitFront(EnSsh* this) { } s32 EnSsh_CheckHitBack(EnSsh* this, PlayState* play) { - ColliderCylinder* cyl = &this->colCylinder[0]; + ColliderCylinder* cyl = &this->collidersCylinder[0]; s32 hit = false; if (cyl->base.acFlags & AC_HIT) { cyl->base.acFlags &= ~AC_HIT; hit = true; } - cyl = &this->colCylinder[1]; + cyl = &this->collidersCylinder[1]; if (cyl->base.acFlags & AC_HIT) { cyl->base.acFlags &= ~AC_HIT; hit = true; @@ -547,19 +547,19 @@ s32 EnSsh_CollisionCheck(EnSsh* this, PlayState* play) { } void EnSsh_SetBodyCylinderAC(EnSsh* this, PlayState* play) { - Collider_UpdateCylinder(&this->actor, &this->colCylinder[0]); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder[0].base); + Collider_UpdateCylinder(&this->actor, &this->collidersCylinder[0]); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->collidersCylinder[0].base); } void EnSsh_SetLegsCylinderAC(EnSsh* this, PlayState* play) { s16 angleTowardsLink = ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)); if (angleTowardsLink < 90 * (0x10000 / 360)) { - Collider_UpdateCylinder(&this->actor, &this->colCylinder[2]); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder[2].base); + Collider_UpdateCylinder(&this->actor, &this->collidersCylinder[2]); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->collidersCylinder[2].base); } else { - Collider_UpdateCylinder(&this->actor, &this->colCylinder[1]); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder[1].base); + Collider_UpdateCylinder(&this->actor, &this->collidersCylinder[1]); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->collidersCylinder[1].base); } } @@ -582,18 +582,18 @@ s32 EnSsh_SetCylinderOC(EnSsh* this, PlayState* play) { Matrix_RotateY(BINANG_TO_RAD_ALT(this->initialYaw), MTXMODE_APPLY); Matrix_MultVec3f(&cyloffsets[i], &cylPos); Matrix_Pop(); - this->colCylinder[i + 3].dim.pos.x = cylPos.x; - this->colCylinder[i + 3].dim.pos.y = cylPos.y; - this->colCylinder[i + 3].dim.pos.z = cylPos.z; - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colCylinder[i + 3].base); + this->collidersCylinder[i + 3].dim.pos.x = cylPos.x; + this->collidersCylinder[i + 3].dim.pos.y = cylPos.y; + this->collidersCylinder[i + 3].dim.pos.z = cylPos.z; + CollisionCheck_SetOC(play, &play->colChkCtx, &this->collidersCylinder[i + 3].base); } return 1; } void EnSsh_SetColliders(EnSsh* this, PlayState* play) { if (this->actor.colChkInfo.health == 0) { - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colSph.base); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colSph.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base); } else { if (this->hitTimer == 0) { EnSsh_SetCylinderOC(this, play); @@ -645,9 +645,9 @@ void EnSsh_Destroy(Actor* thisx, PlayState* play) { Effect_Delete(play, this->blureIdx); for (i = 0; i < 6; i++) { - Collider_DestroyCylinder(play, &this->colCylinder[i]); + Collider_DestroyCylinder(play, &this->collidersCylinder[i]); } - Collider_DestroyJntSph(play, &this->colSph); + Collider_DestroyJntSph(play, &this->colliderJntSph); } void EnSsh_Wait(EnSsh* this, PlayState* play) { @@ -869,7 +869,7 @@ s32 EnSsh_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p void EnSsh_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { EnSsh* this = (EnSsh*)thisx; - Collider_UpdateSpheres(limbIndex, &this->colSph); + Collider_UpdateSpheres(limbIndex, &this->colliderJntSph); } void EnSsh_Draw(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h index 3060fb6fb7..3d1de2c6c3 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h @@ -14,9 +14,9 @@ typedef struct EnSsh { /* 0x0190 */ Vec3s jointTable[30]; /* 0x0244 */ Vec3s morphTable[30]; /* 0x02F8 */ EnSshActionFunc actionFunc; - /* 0x02FC */ ColliderCylinder colCylinder[6]; - /* 0x04C4 */ ColliderJntSph colSph; - /* 0x04E4 */ ColliderJntSphElement colSphElements[1]; + /* 0x02FC */ ColliderCylinder collidersCylinder[6]; + /* 0x04C4 */ ColliderJntSph colliderJntSph; + /* 0x04E4 */ ColliderJntSphElement colliderJntSphElements[1]; /* 0x0524 */ s16 initialYaw; /* 0x0526 */ s16 maxTurnRate; /* 0x0528 */ s16 unkTimer; diff --git a/src/overlays/actors/ovl_En_St/z_en_st.c b/src/overlays/actors/ovl_En_St/z_en_st.c index 347680b3f7..d4f4ebf183 100644 --- a/src/overlays/actors/ovl_En_St/z_en_st.c +++ b/src/overlays/actors/ovl_En_St/z_en_st.c @@ -295,58 +295,58 @@ void EnSt_InitColliders(EnSt* this, PlayState* play) { s32 pad; for (i = 0; i < ARRAY_COUNT(cylinders); i++) { - Collider_InitCylinder(play, &this->colCylinder[i]); - Collider_SetCylinder(play, &this->colCylinder[i], &this->actor, cylinders[i]); + Collider_InitCylinder(play, &this->colliderCylinder[i]); + Collider_SetCylinder(play, &this->colliderCylinder[i], &this->actor, cylinders[i]); } - this->colCylinder[0].elem.acDmgInfo.dmgFlags = + this->colliderCylinder[0].elem.acDmgInfo.dmgFlags = DMG_MAGIC_FIRE | DMG_ARROW | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT; - this->colCylinder[1].elem.acDmgInfo.dmgFlags = + this->colliderCylinder[1].elem.acDmgInfo.dmgFlags = DMG_DEFAULT & ~(DMG_MAGIC_FIRE | DMG_ARROW | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT) & ~(DMG_MAGIC_LIGHT | DMG_MAGIC_ICE); - this->colCylinder[2].base.colMaterial = COL_MATERIAL_METAL; - this->colCylinder[2].elem.acElemFlags = ACELEM_ON | ACELEM_HOOKABLE | ACELEM_NO_AT_INFO; - this->colCylinder[2].elem.elemMaterial = ELEM_MATERIAL_UNK2; - this->colCylinder[2].elem.acDmgInfo.dmgFlags = + this->colliderCylinder[2].base.colMaterial = COL_MATERIAL_METAL; + this->colliderCylinder[2].elem.acElemFlags = ACELEM_ON | ACELEM_HOOKABLE | ACELEM_NO_AT_INFO; + this->colliderCylinder[2].elem.elemMaterial = ELEM_MATERIAL_UNK2; + this->colliderCylinder[2].elem.acDmgInfo.dmgFlags = DMG_DEFAULT & ~(DMG_MAGIC_FIRE | DMG_ARROW | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT); CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(2), &sColChkInit); - Collider_InitJntSph(play, &this->colSph); - Collider_SetJntSph(play, &this->colSph, &this->actor, &sJntSphInit, this->colSphItems); + Collider_InitJntSph(play, &this->colliderJntSph); + Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements); } void EnSt_CheckBodyStickHit(EnSt* this, PlayState* play) { - ColliderElement* bodyElem = &this->colCylinder[0].elem; + ColliderElement* bodyElem = &this->colliderCylinder[0].elem; Player* player = GET_PLAYER(play); if (player->unk_860 != 0) { bodyElem->acDmgInfo.dmgFlags |= DMG_DEKU_STICK; - this->colCylinder[1].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; - this->colCylinder[2].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; + this->colliderCylinder[1].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; + this->colliderCylinder[2].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; } else { bodyElem->acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; - this->colCylinder[1].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; - this->colCylinder[2].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; + this->colliderCylinder[1].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; + this->colliderCylinder[2].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; } } void EnSt_SetBodyCylinderAC(EnSt* this, PlayState* play) { - Collider_UpdateCylinder(&this->actor, &this->colCylinder[0]); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder[0].base); + Collider_UpdateCylinder(&this->actor, &this->colliderCylinder[0]); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder[0].base); } void EnSt_SetLegsCylinderAC(EnSt* this, PlayState* play) { s16 angleTowardsLink = ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)); if (angleTowardsLink < 0x3FFC) { - Collider_UpdateCylinder(&this->actor, &this->colCylinder[2]); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder[2].base); + Collider_UpdateCylinder(&this->actor, &this->colliderCylinder[2]); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder[2].base); } else { - Collider_UpdateCylinder(&this->actor, &this->colCylinder[1]); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder[1].base); + Collider_UpdateCylinder(&this->actor, &this->colliderCylinder[1]); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder[1].base); } } @@ -369,10 +369,10 @@ s32 EnSt_SetCylinderOC(EnSt* this, PlayState* play) { Matrix_RotateY(BINANG_TO_RAD_ALT(this->initialYaw), MTXMODE_APPLY); Matrix_MultVec3f(&cyloffsets[i], &cylPos); Matrix_Pop(); - this->colCylinder[i + 3].dim.pos.x = cylPos.x; - this->colCylinder[i + 3].dim.pos.y = cylPos.y; - this->colCylinder[i + 3].dim.pos.z = cylPos.z; - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colCylinder[i + 3].base); + this->colliderCylinder[i + 3].dim.pos.x = cylPos.x; + this->colliderCylinder[i + 3].dim.pos.y = cylPos.y; + this->colliderCylinder[i + 3].dim.pos.z = cylPos.z; + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder[i + 3].base); } return true; @@ -400,10 +400,10 @@ s32 EnSt_CheckHitPlayer(EnSt* this, PlayState* play) { s32 i; for (i = 0, hit = 0; i < 3; i++) { - if (((this->colCylinder[i + 3].base.ocFlags2 & OC2_HIT_PLAYER) != 0) == 0) { + if (((this->colliderCylinder[i + 3].base.ocFlags2 & OC2_HIT_PLAYER) != 0) == 0) { continue; } - this->colCylinder[i + 3].base.ocFlags2 &= ~OC2_HIT_PLAYER; + this->colliderCylinder[i + 3].base.ocFlags2 &= ~OC2_HIT_PLAYER; hit = true; } @@ -423,13 +423,13 @@ s32 EnSt_CheckHitPlayer(EnSt* this, PlayState* play) { } s32 EnSt_CheckHitFrontside(EnSt* this) { - u8 acFlags = this->colCylinder[2].base.acFlags; + u8 acFlags = this->colliderCylinder[2].base.acFlags; if (!!(acFlags & AC_HIT) == 0) { // not hit return false; } else { - this->colCylinder[2].base.acFlags &= ~AC_HIT; + this->colliderCylinder[2].base.acFlags &= ~AC_HIT; this->invulnerableTimer = 8; this->playSwayFlag = 0; this->swayTimer = 60; @@ -438,7 +438,7 @@ s32 EnSt_CheckHitFrontside(EnSt* this) { } s32 EnSt_CheckHitBackside(EnSt* this, PlayState* play) { - ColliderCylinder* cyl = &this->colCylinder[0]; + ColliderCylinder* cyl = &this->colliderCylinder[0]; s32 flags = 0; // damage flags from colliders 0 and 1 s32 hit = false; @@ -448,7 +448,7 @@ s32 EnSt_CheckHitBackside(EnSt* this, PlayState* play) { flags |= cyl->elem.acHitElem->atDmgInfo.dmgFlags; } - cyl = &this->colCylinder[1]; + cyl = &this->colliderCylinder[1]; if (cyl->base.acFlags & AC_HIT) { cyl->base.acFlags &= ~AC_HIT; hit = true; @@ -533,21 +533,21 @@ void EnSt_SetColliderScale(EnSt* this) { scaleAmount = 1.4f; } - radius = this->colSph.elements[0].dim.modelSphere.radius; + radius = this->colliderJntSph.elements[0].dim.modelSphere.radius; radius *= scaleAmount; - this->colSph.elements[0].dim.modelSphere.radius = radius; + this->colliderJntSph.elements[0].dim.modelSphere.radius = radius; for (i = 0; i < 6; i++) { - yShift = this->colCylinder[i].dim.yShift; - radius = this->colCylinder[i].dim.radius; - height = this->colCylinder[i].dim.height; + yShift = this->colliderCylinder[i].dim.yShift; + radius = this->colliderCylinder[i].dim.radius; + height = this->colliderCylinder[i].dim.height; yShift *= scaleAmount; radius *= scaleAmount; height *= scaleAmount; - this->colCylinder[i].dim.yShift = yShift; - this->colCylinder[i].dim.radius = radius; - this->colCylinder[i].dim.height = height; + this->colliderCylinder[i].dim.yShift = yShift; + this->colliderCylinder[i].dim.radius = radius; + this->colliderCylinder[i].dim.height = height; } Actor_SetScale(&this->actor, 0.04f * scaleAmount); this->colliderScale = scaleAmount; @@ -828,9 +828,9 @@ void EnSt_Destroy(Actor* thisx, PlayState* play) { Effect_Delete(play, this->blureIdx); for (i = 0; i < 6; i++) { - Collider_DestroyCylinder(play, &this->colCylinder[i]); + Collider_DestroyCylinder(play, &this->colliderCylinder[i]); } - Collider_DestroyJntSph(play, &this->colSph); + Collider_DestroyJntSph(play, &this->colliderJntSph); } void EnSt_WaitOnCeiling(EnSt* this, PlayState* play) { @@ -1097,7 +1097,7 @@ s32 EnSt_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dListP, Vec3f* p void EnSt_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dListP, Vec3s* rot, void* thisx) { EnSt* this = (EnSt*)thisx; - Collider_UpdateSpheres(limbIndex, &this->colSph); + Collider_UpdateSpheres(limbIndex, &this->colliderJntSph); } void EnSt_Draw(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_St/z_en_st.h b/src/overlays/actors/ovl_En_St/z_en_st.h index f2c070ab84..a36dfded6e 100644 --- a/src/overlays/actors/ovl_En_St/z_en_st.h +++ b/src/overlays/actors/ovl_En_St/z_en_st.h @@ -12,9 +12,9 @@ typedef struct EnSt { /* 0x0000 */ Actor actor; /* 0x014C */ SkelAnime skelAnime; /* 0x0190 */ EnStActionFunc actionFunc; - /* 0x0194 */ ColliderCylinder colCylinder[6]; - /* 0x035C */ ColliderJntSph colSph; - /* 0x037C */ ColliderJntSphElement colSphItems[1]; + /* 0x0194 */ ColliderCylinder colliderCylinder[6]; + /* 0x035C */ ColliderJntSph colliderJntSph; + /* 0x037C */ ColliderJntSphElement colliderJntSphElements[1]; /* 0x03BC */ s16 initialYaw; /* 0x03BE */ s16 deathYawTarget; /* 0x03C0 */ s16 groundBounces; diff --git a/src/overlays/actors/ovl_En_Tite/z_en_tite.c b/src/overlays/actors/ovl_En_Tite/z_en_tite.c index ede13c3e71..e2f39597b5 100644 --- a/src/overlays/actors/ovl_En_Tite/z_en_tite.c +++ b/src/overlays/actors/ovl_En_Tite/z_en_tite.c @@ -205,7 +205,7 @@ void EnTite_Init(Actor* thisx, PlayState* play) { thisx->colChkInfo.health = 2; thisx->colChkInfo.mass = MASS_HEAVY; Collider_InitJntSph(play, &this->collider); - Collider_SetJntSph(play, &this->collider, thisx, &sJntSphInit, &this->colliderItem); + Collider_SetJntSph(play, &this->collider, thisx, &sJntSphInit, this->colliderElements); this->unk_2DC = UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 | UPDBGCHECKINFO_FLAG_4; if (this->actor.params == TEKTITE_BLUE) { this->unk_2DC |= UPDBGCHECKINFO_FLAG_6; // Don't use the actor engine's ripple spawning code diff --git a/src/overlays/actors/ovl_En_Tite/z_en_tite.h b/src/overlays/actors/ovl_En_Tite/z_en_tite.h index a383e4d11e..d4ec9ab8dd 100755 --- a/src/overlays/actors/ovl_En_Tite/z_en_tite.h +++ b/src/overlays/actors/ovl_En_Tite/z_en_tite.h @@ -28,7 +28,7 @@ typedef struct EnTite { /* 0x02E3 */ u8 spawnIceTimer; /* 0x02E4 */ u8 damageEffect; /* 0x02E8 */ ColliderJntSph collider; - /* 0x0308 */ ColliderJntSphElement colliderItem; + /* 0x0308 */ ColliderJntSphElement colliderElements[1]; /* 0x0348 */ Vec3f frontLeftFootPos; /* 0x0354 */ Vec3f frontRightFootPos; /* 0x0360 */ Vec3f backRightFootPos; diff --git a/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/src/overlays/actors/ovl_En_Wf/z_en_wf.c index e68242cdf9..f65c2b0844 100644 --- a/src/overlays/actors/ovl_En_Wf/z_en_wf.c +++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.c @@ -242,12 +242,12 @@ void EnWf_Init(Actor* thisx, PlayState* play) { this->eyeIndex = 0; this->unk_2F4 = 10.0f; // Set and not used - Collider_InitJntSph(play, &this->colliderSpheres); - Collider_SetJntSph(play, &this->colliderSpheres, thisx, &sJntSphInit, this->colliderSpheresElements); - Collider_InitCylinder(play, &this->colliderCylinderBody); - Collider_SetCylinder(play, &this->colliderCylinderBody, thisx, &sBodyCylinderInit); - Collider_InitCylinder(play, &this->colliderCylinderTail); - Collider_SetCylinder(play, &this->colliderCylinderTail, thisx, &sTailCylinderInit); + Collider_InitJntSph(play, &this->colliderJntSph); + Collider_SetJntSph(play, &this->colliderJntSph, thisx, &sJntSphInit, this->colliderJntSphElements); + Collider_InitCylinder(play, &this->bodyColliderCylinder); + Collider_SetCylinder(play, &this->bodyColliderCylinder, thisx, &sBodyCylinderInit); + Collider_InitCylinder(play, &this->tailColliderCylinder); + Collider_SetCylinder(play, &this->tailColliderCylinder, thisx, &sTailCylinderInit); if (thisx->params == WOLFOS_NORMAL) { SkelAnime_InitFlex(play, &this->skelAnime, &gWolfosNormalSkel, &gWolfosWaitingAnim, this->jointTable, @@ -258,8 +258,8 @@ void EnWf_Init(Actor* thisx, PlayState* play) { SkelAnime_InitFlex(play, &this->skelAnime, &gWolfosWhiteSkel, &gWolfosWaitingAnim, this->jointTable, this->morphTable, WOLFOS_LIMB_MAX); Actor_SetScale(thisx, 0.01f); - this->colliderSpheres.elements[0].base.atDmgInfo.damage = - this->colliderSpheres.elements[1].base.atDmgInfo.damage = 8; + this->colliderJntSph.elements[0].base.atDmgInfo.damage = + this->colliderJntSph.elements[1].base.atDmgInfo.damage = 8; thisx->naviEnemyId = NAVI_ENEMY_WHITE_WOLFOS; } @@ -273,9 +273,9 @@ void EnWf_Init(Actor* thisx, PlayState* play) { void EnWf_Destroy(Actor* thisx, PlayState* play) { EnWf* this = (EnWf*)thisx; - Collider_DestroyJntSph(play, &this->colliderSpheres); - Collider_DestroyCylinder(play, &this->colliderCylinderBody); - Collider_DestroyCylinder(play, &this->colliderCylinderTail); + Collider_DestroyJntSph(play, &this->colliderJntSph); + Collider_DestroyCylinder(play, &this->bodyColliderCylinder); + Collider_DestroyCylinder(play, &this->tailColliderCylinder); if ((this->actor.params != WOLFOS_NORMAL) && (this->switchFlag != 0xFF)) { func_800F5B58(); @@ -733,7 +733,7 @@ void EnWf_RunAroundPlayer(EnWf* this, PlayState* play) { void EnWf_SetupSlash(EnWf* this) { Animation_PlayOnce(&this->skelAnime, &gWolfosSlashingAnim); - this->colliderSpheres.base.atFlags &= ~AT_BOUNCED; + this->colliderJntSph.base.atFlags &= ~AT_BOUNCED; this->actor.shape.rot.y = this->actor.yawTowardsPlayer; this->action = WOLFOS_ACTION_SLASH; this->unk_2FA = 0; // Set and not used @@ -1263,27 +1263,27 @@ void func_80B36F40(EnWf* this, PlayState* play) { } void EnWf_UpdateDamage(EnWf* this, PlayState* play) { - if (this->colliderSpheres.base.acFlags & AC_BOUNCED) { - this->colliderSpheres.base.acFlags &= ~(AC_HIT | AC_BOUNCED); - this->colliderCylinderBody.base.acFlags &= ~AC_HIT; - this->colliderCylinderTail.base.acFlags &= ~AC_HIT; - } else if ((this->colliderCylinderBody.base.acFlags & AC_HIT) || - (this->colliderCylinderTail.base.acFlags & AC_HIT)) { + if (this->colliderJntSph.base.acFlags & AC_BOUNCED) { + this->colliderJntSph.base.acFlags &= ~(AC_HIT | AC_BOUNCED); + this->bodyColliderCylinder.base.acFlags &= ~AC_HIT; + this->tailColliderCylinder.base.acFlags &= ~AC_HIT; + } else if ((this->bodyColliderCylinder.base.acFlags & AC_HIT) || + (this->tailColliderCylinder.base.acFlags & AC_HIT)) { if (this->action >= WOLFOS_ACTION_WAIT) { s16 yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; - if ((!(this->colliderCylinderBody.base.acFlags & AC_HIT) && - (this->colliderCylinderTail.base.acFlags & AC_HIT)) || + if ((!(this->bodyColliderCylinder.base.acFlags & AC_HIT) && + (this->tailColliderCylinder.base.acFlags & AC_HIT)) || (ABS(yawDiff) > 19000)) { this->actor.colChkInfo.damage *= 4; } - this->colliderCylinderBody.base.acFlags &= ~AC_HIT; - this->colliderCylinderTail.base.acFlags &= ~AC_HIT; + this->bodyColliderCylinder.base.acFlags &= ~AC_HIT; + this->tailColliderCylinder.base.acFlags &= ~AC_HIT; if (this->actor.colChkInfo.damageEffect != ENWF_DMGEFF_ICE_MAGIC) { this->damageEffect = this->actor.colChkInfo.damageEffect; - Actor_SetDropFlag(&this->actor, &this->colliderCylinderBody.elem, true); + Actor_SetDropFlag(&this->actor, &this->bodyColliderCylinder.elem, true); #if OOT_VERSION >= PAL_1_0 this->slashStatus = 0; #endif @@ -1337,23 +1337,23 @@ void EnWf_Update(Actor* thisx, PlayState* play) { Math_SmoothStepToS(&this->actor.shape.rot.z, 0, 1, 1000, 0); } - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderSpheres.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base); if (this->action >= WOLFOS_ACTION_WAIT) { if ((this->actor.colorFilterTimer == 0) || !(this->actor.colorFilterParams & 0x4000)) { - Collider_UpdateCylinder(&this->actor, &this->colliderCylinderBody); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinderTail.base); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinderBody.base); + Collider_UpdateCylinder(&this->actor, &this->bodyColliderCylinder); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->tailColliderCylinder.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyColliderCylinder.base); } } if (this->action == WOLFOS_ACTION_BLOCKING) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderSpheres.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base); } if (this->slashStatus > 0) { - if (!(this->colliderSpheres.base.atFlags & AT_BOUNCED)) { - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSpheres.base); + if (!(this->colliderJntSph.base.atFlags & AT_BOUNCED)) { + CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base); } else { EnWf_SetupRecoilFromBlockedSlash(this); } @@ -1387,16 +1387,16 @@ void EnWf_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, EnWf* this = (EnWf*)thisx; s32 bodyPartIndex = -1; - Collider_UpdateSpheres(limbIndex, &this->colliderSpheres); + Collider_UpdateSpheres(limbIndex, &this->colliderJntSph); if (limbIndex == WOLFOS_LIMB_TAIL) { Vec3f colliderPos; bodyPartIndex = -1; Matrix_MultVec3f(&colliderVec, &colliderPos); - this->colliderCylinderTail.dim.pos.x = colliderPos.x; - this->colliderCylinderTail.dim.pos.y = colliderPos.y; - this->colliderCylinderTail.dim.pos.z = colliderPos.z; + this->tailColliderCylinder.dim.pos.x = colliderPos.x; + this->tailColliderCylinder.dim.pos.y = colliderPos.y; + this->tailColliderCylinder.dim.pos.z = colliderPos.z; } if ((this->fireTimer != 0) || ((this->actor.colorFilterTimer != 0) && (this->actor.colorFilterParams & 0x4000))) { diff --git a/src/overlays/actors/ovl_En_Wf/z_en_wf.h b/src/overlays/actors/ovl_En_Wf/z_en_wf.h index 7f38a95495..afc18f7d01 100644 --- a/src/overlays/actors/ovl_En_Wf/z_en_wf.h +++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.h @@ -74,10 +74,10 @@ typedef struct EnWf { /* 0x02FE */ s16 runAngle; /* 0x0300 */ s16 unk_300; // Set, but ineffectual (see comment in Draw) /* 0x0302 */ u8 eyeIndex; - /* 0x0304 */ ColliderJntSph colliderSpheres; - /* 0x0324 */ ColliderJntSphElement colliderSpheresElements[4]; - /* 0x0424 */ ColliderCylinder colliderCylinderBody; - /* 0x0470 */ ColliderCylinder colliderCylinderTail; + /* 0x0304 */ ColliderJntSph colliderJntSph; + /* 0x0324 */ ColliderJntSphElement colliderJntSphElements[4]; + /* 0x0424 */ ColliderCylinder bodyColliderCylinder; + /* 0x0470 */ ColliderCylinder tailColliderCylinder; /* 0x04BC */ Vec3f unk_4BC; /* 0x04C8 */ Vec3f unk_4C8; /* 0x04D4 */ Vec3s unk_4D4; diff --git a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c index 8fd7f63d0b..1dc67c448f 100644 --- a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c +++ b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c @@ -131,10 +131,11 @@ void MirRay_SetupCollider(MirRay* this) { colliderOffset.x = (this->poolPt.x - this->sourcePt.x) * dataEntry->unk_10; colliderOffset.y = (this->poolPt.y - this->sourcePt.y) * dataEntry->unk_10; colliderOffset.z = (this->poolPt.z - this->sourcePt.z) * dataEntry->unk_10; - this->colliderSph.elements[0].dim.worldSphere.center.x = colliderOffset.x + this->sourcePt.x; - this->colliderSph.elements[0].dim.worldSphere.center.y = colliderOffset.y + this->sourcePt.y; - this->colliderSph.elements[0].dim.worldSphere.center.z = colliderOffset.z + this->sourcePt.z; - this->colliderSph.elements[0].dim.worldSphere.radius = dataEntry->unk_14 * this->colliderSph.elements->dim.scale; + this->colliderJntSph.elements[0].dim.worldSphere.center.x = colliderOffset.x + this->sourcePt.x; + this->colliderJntSph.elements[0].dim.worldSphere.center.y = colliderOffset.y + this->sourcePt.y; + this->colliderJntSph.elements[0].dim.worldSphere.center.z = colliderOffset.z + this->sourcePt.z; + this->colliderJntSph.elements[0].dim.worldSphere.radius = + dataEntry->unk_14 * this->colliderJntSph.elements->dim.scale; } // Set up a light point between source point and reflection point. Reflection point is the pool point (for windows) or @@ -221,8 +222,8 @@ void MirRay_Init(Actor* thisx, PlayState* play) { this->shieldCorners[5].y = -800.0f; if (PARAMS_GET_NOSHIFT(dataEntry->params, 1, 1)) { - Collider_InitJntSph(play, &this->colliderSph); - Collider_SetJntSph(play, &this->colliderSph, &this->actor, &sJntSphInit, &this->colliderSphItem); + Collider_InitJntSph(play, &this->colliderJntSph); + Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements); if (!PARAMS_GET_NOSHIFT(dataEntry->params, 2, 1)) { // Beams not from mirrors MirRay_SetupCollider(this); } @@ -243,7 +244,7 @@ void MirRay_Destroy(Actor* thisx, PlayState* play) { LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); if (sMirRayData[this->actor.params].params & 2) { - Collider_DestroyJntSph(play, &this->colliderSph); + Collider_DestroyJntSph(play, &this->colliderJntSph); } Collider_DestroyQuad(play, &this->shieldRay); @@ -261,7 +262,7 @@ void MirRay_Update(Actor* thisx, PlayState* play) { if (sMirRayData[this->actor.params].params & 4) { // Beams from mirrors MirRay_SetupCollider(this); } - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSph.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderJntSph.base); } if (this->reflectIntensity > 0.0f) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->shieldRay.base); diff --git a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.h b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.h index 652516ec11..245cf1007b 100644 --- a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.h +++ b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.h @@ -29,8 +29,8 @@ typedef struct MirRayShieldReflection { typedef struct MirRay { /* 0x0000 */ Actor actor; - /* 0x014C */ ColliderJntSph colliderSph; - /* 0x016C */ ColliderJntSphElement colliderSphItem; + /* 0x014C */ ColliderJntSph colliderJntSph; + /* 0x016C */ ColliderJntSphElement colliderJntSphElements[1]; /* 0x01AC */ ColliderQuad shieldRay; /* 0x022C */ f32 reflectIntensity; // Reflection occurs if it is positive, brightness depends on it /* 0x0230 */ Vec3f shieldCorners[6]; diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index e04c33a59b..83d714077f 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -210,10 +210,10 @@ void ObjSwitch_InitDynaPoly(ObjSwitch* this, PlayState* play, CollisionHeader* c } void ObjSwitch_InitJntSphCollider(ObjSwitch* this, PlayState* play, ColliderJntSphInit* colliderJntSphInit) { - ColliderJntSph* colliderJntSph = &this->jntSph.col; + ColliderJntSph* colliderJntSph = &this->jntSph.collider; Collider_InitJntSph(play, colliderJntSph); - Collider_SetJntSph(play, colliderJntSph, &this->dyna.actor, colliderJntSphInit, this->jntSph.elements); + Collider_SetJntSph(play, colliderJntSph, &this->dyna.actor, colliderJntSphInit, this->jntSph.colliderElements); Matrix_SetTranslateRotateYXZ(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y + this->dyna.actor.shape.yOffset * this->dyna.actor.scale.y, @@ -223,13 +223,13 @@ void ObjSwitch_InitJntSphCollider(ObjSwitch* this, PlayState* play, ColliderJntS } void ObjSwitch_InitTrisCollider(ObjSwitch* this, PlayState* play, ColliderTrisInit* colliderTrisInit) { - ColliderTris* colliderTris = &this->tris.col; + ColliderTris* colliderTris = &this->tris.collider; s32 i; s32 j; Vec3f pos[3]; Collider_InitTris(play, colliderTris); - Collider_SetTris(play, colliderTris, &this->dyna.actor, colliderTrisInit, this->tris.elements); + Collider_SetTris(play, colliderTris, &this->dyna.actor, colliderTrisInit, this->tris.colliderElements); for (i = 0; i < 2; i++) { for (j = 0; j < 3; j++) { @@ -368,12 +368,12 @@ void ObjSwitch_Destroy(Actor* thisx, PlayState* play) { switch (OBJSWITCH_TYPE(&this->dyna.actor)) { case OBJSWITCH_TYPE_FLOOR_RUSTY: case OBJSWITCH_TYPE_EYE: - Collider_DestroyTris(play, &this->tris.col); + Collider_DestroyTris(play, &this->tris.collider); break; case OBJSWITCH_TYPE_CRYSTAL: case OBJSWITCH_TYPE_CRYSTAL_TARGETABLE: - Collider_DestroyJntSph(play, &this->jntSph.col); + Collider_DestroyJntSph(play, &this->jntSph.collider); break; } } @@ -385,12 +385,12 @@ void ObjSwitch_FloorUpInit(ObjSwitch* this) { void ObjSwitch_FloorUp(ObjSwitch* this, PlayState* play) { if (OBJSWITCH_TYPE(&this->dyna.actor) == OBJSWITCH_TYPE_FLOOR_RUSTY) { - if (this->tris.col.base.acFlags & AC_HIT) { + if (this->tris.collider.base.acFlags & AC_HIT) { ObjSwitch_FloorPressInit(this); ObjSwitch_SetOn(this, play); - this->tris.col.base.acFlags &= ~AC_HIT; + this->tris.collider.base.acFlags &= ~AC_HIT; } else { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->tris.col.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->tris.collider.base); } } else { switch (OBJSWITCH_SUBTYPE(&this->dyna.actor)) { @@ -509,8 +509,8 @@ s32 ObjSwitch_EyeIsHit(ObjSwitch* this) { Actor* collidingActor; s16 yawDiff; - if ((this->tris.col.base.acFlags & AC_HIT) && !(this->prevColFlags & AC_HIT)) { - collidingActor = this->tris.col.base.ac; + if ((this->tris.collider.base.acFlags & AC_HIT) && !(this->prevColFlags & AC_HIT)) { + collidingActor = this->tris.collider.base.ac; if (collidingActor != NULL) { yawDiff = collidingActor->world.rot.y - this->dyna.actor.shape.rot.y; if (ABS(yawDiff) > 0x5000) { @@ -613,7 +613,7 @@ void ObjSwitch_CrystalOffInit(ObjSwitch* this) { void ObjSwitch_CrystalOff(ObjSwitch* this, PlayState* play) { switch (OBJSWITCH_SUBTYPE(&this->dyna.actor)) { case OBJSWITCH_SUBTYPE_ONCE: - if ((this->jntSph.col.base.acFlags & AC_HIT) && this->disableAcTimer <= 0) { + if ((this->jntSph.collider.base.acFlags & AC_HIT) && this->disableAcTimer <= 0) { this->disableAcTimer = 10; ObjSwitch_SetOn(this, play); ObjSwitch_CrystalTurnOnInit(this); @@ -621,7 +621,7 @@ void ObjSwitch_CrystalOff(ObjSwitch* this, PlayState* play) { break; case OBJSWITCH_SUBTYPE_SYNC: - if (((this->jntSph.col.base.acFlags & AC_HIT) && this->disableAcTimer <= 0) || + if (((this->jntSph.collider.base.acFlags & AC_HIT) && this->disableAcTimer <= 0) || Flags_GetSwitch(play, OBJSWITCH_SWITCH_FLAG(&this->dyna.actor))) { this->disableAcTimer = 10; @@ -631,7 +631,7 @@ void ObjSwitch_CrystalOff(ObjSwitch* this, PlayState* play) { break; case OBJSWITCH_SUBTYPE_TOGGLE: - if ((this->jntSph.col.base.acFlags & AC_HIT) && !(this->prevColFlags & AC_HIT) && + if ((this->jntSph.collider.base.acFlags & AC_HIT) && !(this->prevColFlags & AC_HIT) && this->disableAcTimer <= 0) { this->disableAcTimer = 10; ObjSwitch_SetOn(this, play); @@ -675,7 +675,7 @@ void ObjSwitch_CrystalOn(ObjSwitch* this, PlayState* play) { break; case OBJSWITCH_SUBTYPE_TOGGLE: - if ((this->jntSph.col.base.acFlags & AC_HIT) && !(this->prevColFlags & AC_HIT) && + if ((this->jntSph.collider.base.acFlags & AC_HIT) && !(this->prevColFlags & AC_HIT) && this->disableAcTimer <= 0) { this->disableAcTimer = 10; ObjSwitch_CrystalTurnOffInit(this); @@ -719,9 +719,9 @@ void ObjSwitch_Update(Actor* thisx, PlayState* play) { break; case OBJSWITCH_TYPE_EYE: - this->prevColFlags = this->tris.col.base.acFlags; - this->tris.col.base.acFlags &= ~AC_HIT; - CollisionCheck_SetAC(play, &play->colChkCtx, &this->tris.col.base); + this->prevColFlags = this->tris.collider.base.acFlags; + this->tris.collider.base.acFlags &= ~AC_HIT; + CollisionCheck_SetAC(play, &play->colChkCtx, &this->tris.collider.base); break; case OBJSWITCH_TYPE_CRYSTAL: @@ -729,12 +729,12 @@ void ObjSwitch_Update(Actor* thisx, PlayState* play) { if (!Player_InCsMode(play) && this->disableAcTimer > 0) { this->disableAcTimer--; } - this->prevColFlags = this->jntSph.col.base.acFlags; - this->jntSph.col.base.acFlags &= ~AC_HIT; + this->prevColFlags = this->jntSph.collider.base.acFlags; + this->jntSph.collider.base.acFlags &= ~AC_HIT; if (this->disableAcTimer <= 0) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->jntSph.col.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->jntSph.collider.base); } - CollisionCheck_SetOC(play, &play->colChkCtx, &this->jntSph.col.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->jntSph.collider.base); break; } } diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h index 9e6475eb2b..67a9d66356 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h @@ -26,13 +26,13 @@ typedef enum ObjSwitchSubType { } ObjSwitchSubType; typedef struct ObjSwitchJntSph { - /* 0x00 */ ColliderJntSph col; - /* 0x20 */ ColliderJntSphElement elements[1]; + /* 0x00 */ ColliderJntSph collider; + /* 0x20 */ ColliderJntSphElement colliderElements[1]; } ObjSwitchJntSph; typedef struct ObjSwitchTris { - /* 0x00 */ ColliderTris col; - /* 0x20 */ ColliderTrisElement elements[2]; + /* 0x00 */ ColliderTris collider; + /* 0x20 */ ColliderTrisElement colliderElements[2]; } ObjSwitchTris; typedef struct ObjSwitch { From 494aecc9fcb258675aa2f92979d673049f67ac2f Mon Sep 17 00:00:00 2001 From: mzxrules Date: Wed, 12 Feb 2025 15:50:46 -0500 Subject: [PATCH 08/15] Reduce overlay dependencies on global.h (5) (#2466) * remove global.h dependency from all actors * fix compiler error * fix another build issue * fix bss --- include/z64.h | 1 - include/z64actor.h | 2 ++ src/code/db_camera.c | 1 + src/code/main.c | 2 +- src/code/z_camera.c | 1 + src/code/z_kankyo.c | 2 +- src/code/z_onepointdemo.c | 1 + src/code/z_path.c | 5 +++- src/code/z_quake.c | 6 +++- .../ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.h | 1 - .../ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c | 8 +++++ .../ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h | 4 +-- .../ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c | 10 +++++++ .../ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.h | 4 +-- .../ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c | 12 ++++++++ .../ovl_Bg_Mori_Hineri/z_bg_mori_hineri.h | 4 +-- .../ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c | 9 ++++++ .../ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.h | 4 +-- .../z_bg_mori_kaitenkabe.c | 10 +++++++ .../z_bg_mori_kaitenkabe.h | 4 +-- .../z_bg_mori_rakkatenjo.c | 13 +++++++- .../z_bg_mori_rakkatenjo.h | 4 +-- .../ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c | 10 +++++++ .../ovl_Bg_Po_Syokudai/z_bg_po_syokudai.h | 3 +- .../actors/ovl_Bg_Pushbox/z_bg_pushbox.c | 8 +++++ .../actors/ovl_Bg_Pushbox/z_bg_pushbox.h | 4 +-- .../ovl_Bg_Relay_Objects/z_bg_relay_objects.c | 11 +++++++ .../ovl_Bg_Relay_Objects/z_bg_relay_objects.h | 4 +-- .../ovl_Bg_Spot00_Break/z_bg_spot00_break.c | 4 +++ .../ovl_Bg_Spot00_Break/z_bg_spot00_break.h | 2 +- .../z_bg_spot00_hanebasi.c | 16 +++++++++- .../z_bg_spot00_hanebasi.h | 5 ++-- .../ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c | 9 ++++++ .../ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.h | 4 +-- .../z_bg_spot01_idohashira.c | 13 +++++++- .../z_bg_spot01_idohashira.h | 6 ++-- .../z_bg_spot01_idomizu.c | 9 ++++++ .../z_bg_spot01_idomizu.h | 4 +-- .../z_bg_spot01_idosoko.c | 7 +++++ .../z_bg_spot01_idosoko.h | 4 +-- .../z_bg_spot01_objects2.c | 5 ++++ .../z_bg_spot01_objects2.h | 4 +-- .../z_bg_spot02_objects.c | 13 ++++++++ .../z_bg_spot02_objects.h | 4 +-- .../ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c | 10 +++++++ .../ovl_Bg_Spot03_Taki/z_bg_spot03_taki.h | 4 +-- .../ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c | 7 +++++ .../ovl_Bg_Spot05_Soko/z_bg_spot05_soko.h | 4 +-- .../z_bg_spot06_objects.c | 12 ++++++++ .../z_bg_spot06_objects.h | 4 +-- .../ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c | 7 +++++ .../ovl_Bg_Spot07_Taki/z_bg_spot07_taki.h | 4 +-- .../z_bg_spot08_bakudankabe.c | 10 ++++++- .../z_bg_spot08_bakudankabe.h | 2 +- .../ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c | 7 +++++ .../ovl_Bg_Spot09_Obj/z_bg_spot09_obj.h | 2 +- .../z_bg_spot11_bakudankabe.c | 7 +++++ .../z_bg_spot11_bakudankabe.h | 2 +- .../ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c | 16 ++++++++++ .../ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.h | 4 +-- .../ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c | 9 +++++- .../ovl_Bg_Spot12_Gate/z_bg_spot12_gate.h | 4 +-- .../ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c | 7 +++++ .../ovl_Bg_Spot12_Saku/z_bg_spot12_saku.h | 4 +-- .../ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c | 8 +++++ .../ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.h | 4 +-- .../ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c | 7 +++++ .../ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h | 4 +-- .../z_bg_spot16_bombstone.c | 19 ++++++++++-- .../z_bg_spot16_bombstone.h | 4 +-- .../z_bg_spot16_doughnut.c | 9 +++++- .../z_bg_spot16_doughnut.h | 2 +- .../z_bg_spot17_bakudankabe.c | 11 +++++++ .../z_bg_spot17_bakudankabe.h | 2 +- .../ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c | 7 +++++ .../ovl_Bg_Spot17_Funen/z_bg_spot17_funen.h | 2 +- .../ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c | 5 ++++ .../ovl_Bg_Spot18_Futa/z_bg_spot18_futa.h | 2 +- .../ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c | 8 +++++ .../ovl_Bg_Spot18_Obj/z_bg_spot18_obj.h | 6 ++-- .../z_bg_spot18_shutter.c | 7 +++++ .../z_bg_spot18_shutter.h | 4 +-- .../ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c | 7 +++++ .../ovl_Bg_Toki_Hikari/z_bg_toki_hikari.h | 4 +-- .../actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c | 13 ++++++++ .../actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.h | 4 +-- .../z_bg_toki_swd_cutscene_data_1.c | 2 +- .../z_bg_toki_swd_cutscene_data_2.c | 2 +- .../z_bg_toki_swd_cutscene_data_3.c | 2 +- .../actors/ovl_Bg_Treemouth/z_bg_treemouth.c | 17 +++++++++-- .../actors/ovl_Bg_Treemouth/z_bg_treemouth.h | 4 +-- .../z_bg_treemouth_cutscene_data.c | 3 +- .../actors/ovl_Bg_Umajump/z_bg_umajump.c | 5 ++++ .../actors/ovl_Bg_Umajump/z_bg_umajump.h | 2 +- .../actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c | 14 ++++++++- .../actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.h | 2 +- .../actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c | 10 +++++++ .../actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.h | 4 +-- .../ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c | 7 +++++ .../ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.h | 4 +-- .../actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c | 15 ++++++++++ .../actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.h | 4 +-- src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c | 11 ++++++- src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h | 6 ++-- .../actors/ovl_Boss_Dodongo/z_boss_dodongo.c | 23 +++++++++++++- .../actors/ovl_Boss_Dodongo/z_boss_dodongo.h | 4 +-- .../z_boss_dodongo_data.inc.c | 4 +-- src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c | 20 ++++++++++++- src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h | 4 +-- src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c | 18 ++++++++++- src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h | 4 +-- .../ovl_Boss_Ganondrof/z_boss_ganondrof.c | 21 ++++++++++++- .../ovl_Boss_Ganondrof/z_boss_ganondrof.h | 5 ++-- src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 30 +++++++++++++++++-- src/overlays/actors/ovl_Boss_Mo/z_boss_mo.h | 4 +-- src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c | 22 +++++++++++++- src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h | 4 +-- src/overlays/actors/ovl_Boss_Va/z_boss_va.c | 22 ++++++++++++-- src/overlays/actors/ovl_Boss_Va/z_boss_va.h | 4 +-- src/overlays/actors/ovl_Demo_6K/z_demo_6k.c | 19 +++++++++++- src/overlays/actors/ovl_Demo_6K/z_demo_6k.h | 5 ++-- src/overlays/actors/ovl_Demo_Du/z_demo_du.c | 14 ++++++++- src/overlays/actors/ovl_Demo_Du/z_demo_du.h | 2 +- .../ovl_Demo_Du/z_demo_du_cutscene_data.inc.c | 3 +- src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c | 7 +++++ src/overlays/actors/ovl_Demo_Ec/z_demo_ec.h | 8 ++--- src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c | 9 ++++++ src/overlays/actors/ovl_Demo_Ext/z_demo_ext.h | 6 ++-- src/overlays/actors/ovl_Demo_Go/z_demo_go.c | 12 +++++++- src/overlays/actors/ovl_Demo_Go/z_demo_go.h | 6 ++-- src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c | 8 +++++ src/overlays/actors/ovl_Demo_Ik/z_demo_ik.h | 6 ++-- src/overlays/actors/ovl_Demo_Im/z_demo_im.c | 13 +++++++- src/overlays/actors/ovl_Demo_Im/z_demo_im.h | 6 ++-- .../ovl_Demo_Im/z_demo_im_cutscene_data.inc.c | 2 +- .../actors/ovl_Demo_Kankyo/z_demo_kankyo.c | 16 +++++++++- .../z_demo_kankyo_cutscene_data1.c | 1 - .../actors/ovl_Demo_Kekkai/z_demo_kekkai.c | 14 +++++++++ .../actors/ovl_Demo_Kekkai/z_demo_kekkai.h | 4 +-- src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c | 12 +++++++- src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h | 6 ++-- src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c | 7 +++++ src/overlays/actors/ovl_Demo_Shd/z_demo_shd.h | 4 +-- .../actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c | 7 +++++ .../actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.h | 5 ++-- src/overlays/actors/ovl_Door_Ana/z_door_ana.c | 11 +++++++ src/overlays/actors/ovl_Door_Ana/z_door_ana.h | 4 +-- .../actors/ovl_Door_Gerudo/z_door_gerudo.c | 10 +++++++ .../actors/ovl_Door_Gerudo/z_door_gerudo.h | 4 +-- .../actors/ovl_Door_Killer/z_door_killer.c | 11 +++++++ .../actors/ovl_Door_Killer/z_door_killer.h | 4 +-- .../actors/ovl_Door_Toki/z_door_toki.c | 4 +++ .../actors/ovl_Door_Toki/z_door_toki.h | 2 +- .../actors/ovl_Efc_Erupc/z_efc_erupc.c | 11 +++++++ .../actors/ovl_Efc_Erupc/z_efc_erupc.h | 4 +-- src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c | 12 ++++++++ src/overlays/actors/ovl_Eff_Dust/z_eff_dust.h | 6 ++-- src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c | 8 +++++ src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.h | 4 +-- src/overlays/actors/ovl_En_Ani/z_en_ani.c | 12 ++++++++ src/overlays/actors/ovl_En_Ani/z_en_ani.h | 4 +-- .../ovl_En_Anubice_Fire/z_en_anubice_fire.c | 13 ++++++++ .../ovl_En_Anubice_Fire/z_en_anubice_fire.h | 4 +-- .../actors/ovl_En_Arow_Trap/z_en_arow_trap.c | 3 ++ .../actors/ovl_En_Arow_Trap/z_en_arow_trap.h | 3 +- src/overlays/actors/ovl_En_Ba/z_en_ba.c | 14 +++++++++ src/overlays/actors/ovl_En_Ba/z_en_ba.h | 4 +-- .../actors/ovl_En_Bdfire/z_en_bdfire.c | 13 ++++++++ .../actors/ovl_En_Bdfire/z_en_bdfire.h | 8 ++--- src/overlays/actors/ovl_En_Bird/z_en_bird.c | 5 ++++ src/overlays/actors/ovl_En_Bird/z_en_bird.h | 4 +-- .../actors/ovl_En_Blkobj/z_en_blkobj.c | 8 +++++ .../actors/ovl_En_Blkobj/z_en_blkobj.h | 4 +-- src/overlays/actors/ovl_En_Brob/z_en_brob.c | 9 ++++++ src/overlays/actors/ovl_En_Brob/z_en_brob.h | 4 +-- src/overlays/actors/ovl_En_Butte/z_en_butte.c | 13 ++++++++ src/overlays/actors/ovl_En_Butte/z_en_butte.h | 4 +-- src/overlays/actors/ovl_En_Bx/z_en_bx.c | 13 ++++++++ src/overlays/actors/ovl_En_Bx/z_en_bx.h | 2 +- .../actors/ovl_En_Clear_Tag/z_en_clear_tag.c | 12 ++++++++ .../actors/ovl_En_Clear_Tag/z_en_clear_tag.h | 2 +- src/overlays/actors/ovl_En_Cow/z_en_cow.c | 11 +++++++ src/overlays/actors/ovl_En_Cow/z_en_cow.h | 4 +-- src/overlays/actors/ovl_En_Cs/z_en_cs.c | 14 +++++++++ src/overlays/actors/ovl_En_Cs/z_en_cs.h | 4 +-- src/overlays/actors/ovl_En_Daiku/z_en_daiku.c | 16 ++++++++++ src/overlays/actors/ovl_En_Daiku/z_en_daiku.h | 4 +-- .../z_en_daiku_kakariko.c | 14 +++++++++ .../z_en_daiku_kakariko.h | 4 +-- src/overlays/actors/ovl_En_Dog/z_en_dog.c | 9 ++++++ src/overlays/actors/ovl_En_Dog/z_en_dog.h | 6 ++-- src/overlays/actors/ovl_En_Ds/z_en_ds.c | 9 ++++++ src/overlays/actors/ovl_En_Ds/z_en_ds.h | 4 +-- src/overlays/actors/ovl_En_Du/z_en_du.c | 15 ++++++++++ src/overlays/actors/ovl_En_Du/z_en_du.h | 4 +-- src/overlays/actors/ovl_En_Eg/z_en_eg.c | 7 +++++ src/overlays/actors/ovl_En_Eg/z_en_eg.h | 4 +-- src/overlays/actors/ovl_En_Fd/z_en_fd.c | 14 +++++++++ src/overlays/actors/ovl_En_Fd/z_en_fd.h | 4 +-- .../actors/ovl_En_Fd_Fire/z_en_fd_fire.c | 9 ++++++ .../actors/ovl_En_Fd_Fire/z_en_fd_fire.h | 4 +-- .../actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c | 22 ++++++++++++-- .../actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h | 5 ++-- src/overlays/actors/ovl_En_Fu/z_en_fu.c | 13 ++++++++ src/overlays/actors/ovl_En_Fu/z_en_fu.h | 4 +-- .../ovl_En_Ganon_Organ/z_en_ganon_organ.c | 6 ++++ .../ovl_En_Ganon_Organ/z_en_ganon_organ.h | 2 +- src/overlays/actors/ovl_En_Gb/z_en_gb.c | 14 +++++++++ src/overlays/actors/ovl_En_Gb/z_en_gb.h | 5 ++-- src/overlays/actors/ovl_En_Ge1/z_en_ge1.c | 15 +++++++++- src/overlays/actors/ovl_En_Ge1/z_en_ge1.h | 4 +-- src/overlays/actors/ovl_En_Ge2/z_en_ge2.c | 13 +++++++- src/overlays/actors/ovl_En_Ge2/z_en_ge2.h | 4 +-- src/overlays/actors/ovl_En_Ge3/z_en_ge3.c | 12 +++++++- src/overlays/actors/ovl_En_Ge3/z_en_ge3.h | 4 +-- src/overlays/actors/ovl_En_Gm/z_en_gm.c | 13 +++++++- src/overlays/actors/ovl_En_Gm/z_en_gm.h | 6 ++-- src/overlays/actors/ovl_En_Go/z_en_go.c | 14 +++++++++ src/overlays/actors/ovl_En_Go/z_en_go.h | 8 ++--- src/overlays/actors/ovl_En_Go2/z_en_go2.c | 21 +++++++++++-- src/overlays/actors/ovl_En_Go2/z_en_go2.h | 6 ++-- .../actors/ovl_En_Goroiwa/z_en_goroiwa.c | 17 +++++++++-- .../actors/ovl_En_Goroiwa/z_en_goroiwa.h | 4 +-- src/overlays/actors/ovl_En_Gs/z_en_gs.c | 18 ++++++++++- src/overlays/actors/ovl_En_Gs/z_en_gs.h | 4 +-- src/overlays/actors/ovl_En_Guest/z_en_guest.c | 13 +++++++- src/overlays/actors/ovl_En_Guest/z_en_guest.h | 4 +-- src/overlays/actors/ovl_En_Hata/z_en_hata.c | 9 ++++++ src/overlays/actors/ovl_En_Hata/z_en_hata.h | 2 +- .../actors/ovl_En_Heishi2/z_en_heishi2.c | 20 ++++++++++--- .../actors/ovl_En_Heishi2/z_en_heishi2.h | 4 +-- .../actors/ovl_En_Heishi3/z_en_heishi3.c | 10 ++++++- .../actors/ovl_En_Heishi3/z_en_heishi3.h | 4 +-- .../actors/ovl_En_Heishi4/z_en_heishi4.c | 10 ++++++- .../actors/ovl_En_Heishi4/z_en_heishi4.h | 4 +-- .../actors/ovl_En_Hintnuts/z_en_hintnuts.c | 7 +++++ .../actors/ovl_En_Hintnuts/z_en_hintnuts.h | 4 +-- src/overlays/actors/ovl_En_Holl/z_en_holl.c | 10 +++++++ src/overlays/actors/ovl_En_Holl/z_en_holl.h | 4 +-- .../z_en_horse_game_check.c | 9 ++++++ .../z_en_horse_game_check.h | 4 +-- .../ovl_En_Horse_Ganon/z_en_horse_ganon.c | 14 +++++++++ .../ovl_En_Horse_Ganon/z_en_horse_ganon.h | 5 ++-- .../ovl_En_Horse_Normal/z_en_horse_normal.c | 17 +++++++++++ .../ovl_En_Horse_Normal/z_en_horse_normal.h | 5 ++-- .../ovl_En_Horse_Zelda/z_en_horse_zelda.c | 13 ++++++++ .../ovl_En_Horse_Zelda/z_en_horse_zelda.h | 5 ++-- src/overlays/actors/ovl_En_Hs/z_en_hs.c | 9 ++++++ src/overlays/actors/ovl_En_Hs/z_en_hs.h | 4 +-- src/overlays/actors/ovl_En_Hs2/z_en_hs2.c | 9 ++++++ src/overlays/actors/ovl_En_Hs2/z_en_hs2.h | 4 +-- src/overlays/actors/ovl_En_Hy/z_en_hy.c | 15 ++++++++++ src/overlays/actors/ovl_En_Hy/z_en_hy.h | 6 ++-- .../actors/ovl_En_Ice_Hono/z_en_ice_hono.c | 12 ++++++++ .../actors/ovl_En_Ice_Hono/z_en_ice_hono.h | 5 ++-- src/overlays/actors/ovl_En_It/z_en_it.c | 2 ++ src/overlays/actors/ovl_En_It/z_en_it.h | 2 +- src/overlays/actors/ovl_En_Jj/z_en_jj.c | 13 +++++++- src/overlays/actors/ovl_En_Jj/z_en_jj.h | 4 +-- src/overlays/actors/ovl_En_Js/z_en_js.c | 8 +++++ src/overlays/actors/ovl_En_Js/z_en_js.h | 4 +-- .../actors/ovl_En_Jsjutan/z_en_jsjutan.c | 9 ++++++ .../actors/ovl_En_Jsjutan/z_en_jsjutan.h | 2 +- .../actors/ovl_En_Kakasi/z_en_kakasi.c | 12 ++++++++ .../actors/ovl_En_Kakasi/z_en_kakasi.h | 4 +-- .../actors/ovl_En_Kakasi3/z_en_kakasi3.c | 12 ++++++++ .../actors/ovl_En_Kakasi3/z_en_kakasi3.h | 4 +-- .../actors/ovl_En_Karebaba/z_en_karebaba.c | 13 +++++++- .../actors/ovl_En_Karebaba/z_en_karebaba.h | 6 ++-- src/overlays/actors/ovl_En_Ko/z_en_ko.c | 16 ++++++++-- src/overlays/actors/ovl_En_Ko/z_en_ko.h | 6 ++-- src/overlays/actors/ovl_En_Kz/z_en_kz.c | 13 ++++++++ src/overlays/actors/ovl_En_Kz/z_en_kz.h | 4 +-- src/overlays/actors/ovl_En_Light/z_en_light.c | 10 +++++++ src/overlays/actors/ovl_En_Light/z_en_light.h | 3 +- .../actors/ovl_En_Lightbox/z_en_lightbox.c | 6 ++++ .../actors/ovl_En_Lightbox/z_en_lightbox.h | 2 +- .../actors/ovl_En_M_Fire1/z_en_m_fire1.c | 3 ++ .../actors/ovl_En_M_Fire1/z_en_m_fire1.h | 2 +- .../actors/ovl_En_M_Thunder/z_en_m_thunder.c | 12 ++++++++ .../actors/ovl_En_M_Thunder/z_en_m_thunder.h | 5 ++-- src/overlays/actors/ovl_En_Ma1/z_en_ma1.c | 14 +++++++++ src/overlays/actors/ovl_En_Ma1/z_en_ma1.h | 4 +-- src/overlays/actors/ovl_En_Ma2/z_en_ma2.c | 15 ++++++++++ src/overlays/actors/ovl_En_Ma2/z_en_ma2.h | 4 +-- src/overlays/actors/ovl_En_Ma3/z_en_ma3.c | 16 +++++++++- src/overlays/actors/ovl_En_Ma3/z_en_ma3.h | 4 +-- src/overlays/actors/ovl_En_Mag/z_en_mag.c | 15 ++++++++-- src/overlays/actors/ovl_En_Mag/z_en_mag.h | 3 +- src/overlays/actors/ovl_En_Md/z_en_md.c | 16 +++++++++- src/overlays/actors/ovl_En_Md/z_en_md.h | 4 +-- src/overlays/actors/ovl_En_Mk/z_en_mk.c | 11 +++++++ src/overlays/actors/ovl_En_Mk/z_en_mk.h | 4 +-- src/overlays/actors/ovl_En_Mm/z_en_mm.c | 14 +++++++++ src/overlays/actors/ovl_En_Mm/z_en_mm.h | 4 +-- src/overlays/actors/ovl_En_Mm2/z_en_mm2.c | 10 +++++++ src/overlays/actors/ovl_En_Mm2/z_en_mm2.h | 4 +-- src/overlays/actors/ovl_En_Ms/z_en_ms.c | 8 +++++ src/overlays/actors/ovl_En_Ms/z_en_ms.h | 4 +-- src/overlays/actors/ovl_En_Mu/z_en_mu.c | 9 ++++++ src/overlays/actors/ovl_En_Mu/z_en_mu.h | 2 +- src/overlays/actors/ovl_En_Nb/z_en_nb.c | 20 +++++++++++-- src/overlays/actors/ovl_En_Nb/z_en_nb.h | 6 ++-- .../actors/ovl_En_Niw_Lady/z_en_niw_lady.c | 18 +++++++++-- .../actors/ovl_En_Niw_Lady/z_en_niw_lady.h | 4 +-- src/overlays/actors/ovl_En_Nwc/z_en_nwc.c | 8 +++++ src/overlays/actors/ovl_En_Nwc/z_en_nwc.h | 10 +++---- src/overlays/actors/ovl_En_OE2/z_en_oe2.c | 2 ++ src/overlays/actors/ovl_En_OE2/z_en_oe2.h | 4 +-- src/overlays/actors/ovl_En_Owl/z_en_owl.c | 20 ++++++++++++- src/overlays/actors/ovl_En_Owl/z_en_owl.h | 4 +-- .../actors/ovl_En_Po_Desert/z_en_po_desert.c | 12 ++++++++ .../actors/ovl_En_Po_Desert/z_en_po_desert.h | 5 ++-- .../actors/ovl_En_Po_Field/z_en_po_field.c | 14 +++++++++ .../actors/ovl_En_Po_Field/z_en_po_field.h | 5 ++-- .../actors/ovl_En_Pu_box/z_en_pu_box.c | 5 ++++ .../actors/ovl_En_Pu_box/z_en_pu_box.h | 2 +- .../ovl_En_River_Sound/z_en_river_sound.c | 8 +++++ .../ovl_En_River_Sound/z_en_river_sound.h | 2 +- src/overlays/actors/ovl_En_Rl/z_en_rl.c | 9 ++++++ src/overlays/actors/ovl_En_Rl/z_en_rl.h | 6 ++-- src/overlays/actors/ovl_En_Ru1/z_en_ru1.c | 21 +++++++++++-- src/overlays/actors/ovl_En_Ru1/z_en_ru1.h | 8 ++--- src/overlays/actors/ovl_En_Ru2/z_en_ru2.c | 15 +++++++++- src/overlays/actors/ovl_En_Ru2/z_en_ru2.h | 6 ++-- src/overlays/actors/ovl_En_Sa/z_en_sa.c | 12 ++++++++ src/overlays/actors/ovl_En_Sa/z_en_sa.h | 4 +-- .../ovl_En_Scene_Change/z_en_scene_change.c | 4 +++ .../ovl_En_Scene_Change/z_en_scene_change.h | 4 +-- src/overlays/actors/ovl_En_Sda/z_en_sda.c | 7 +++++ src/overlays/actors/ovl_En_Sda/z_en_sda.h | 2 +- src/overlays/actors/ovl_En_Si/z_en_si.c | 6 ++++ src/overlays/actors/ovl_En_Si/z_en_si.h | 4 +-- .../actors/ovl_En_Siofuki/z_en_siofuki.c | 14 +++++++++ .../actors/ovl_En_Siofuki/z_en_siofuki.h | 4 +-- src/overlays/actors/ovl_En_Ssh/z_en_ssh.c | 12 ++++++++ src/overlays/actors/ovl_En_Ssh/z_en_ssh.h | 4 +-- src/overlays/actors/ovl_En_Sth/z_en_sth.c | 10 ++++++- src/overlays/actors/ovl_En_Sth/z_en_sth.h | 4 +-- .../actors/ovl_En_Stream/z_en_stream.c | 11 +++++++ .../actors/ovl_En_Stream/z_en_stream.h | 4 +-- src/overlays/actors/ovl_En_Ta/z_en_ta.c | 19 ++++++++++++ src/overlays/actors/ovl_En_Ta/z_en_ta.h | 8 ++--- .../ovl_En_Takara_Man/z_en_takara_man.c | 7 +++++ .../ovl_En_Takara_Man/z_en_takara_man.h | 4 +-- src/overlays/actors/ovl_En_Tg/z_en_tg.c | 7 +++++ src/overlays/actors/ovl_En_Tg/z_en_tg.h | 4 +-- src/overlays/actors/ovl_En_Torch/z_en_torch.c | 5 +++- src/overlays/actors/ovl_En_Torch/z_en_torch.h | 2 +- src/overlays/actors/ovl_En_Toryo/z_en_toryo.c | 11 +++++++ src/overlays/actors/ovl_En_Toryo/z_en_toryo.h | 4 +-- src/overlays/actors/ovl_En_Tr/z_en_tr.c | 11 +++++++ src/overlays/actors/ovl_En_Tr/z_en_tr.h | 4 +-- src/overlays/actors/ovl_En_Trap/z_en_trap.c | 6 ++++ src/overlays/actors/ovl_En_Trap/z_en_trap.h | 2 +- src/overlays/actors/ovl_En_Vase/z_en_vase.c | 3 ++ src/overlays/actors/ovl_En_Vase/z_en_vase.h | 2 +- .../actors/ovl_En_Vb_Ball/z_en_vb_ball.c | 14 ++++++++- .../actors/ovl_En_Vb_Ball/z_en_vb_ball.h | 2 +- .../actors/ovl_En_Viewer/z_en_viewer.c | 18 +++++++++++ .../actors/ovl_En_Viewer/z_en_viewer.h | 9 +++--- src/overlays/actors/ovl_En_Xc/z_en_xc.c | 19 ++++++++++-- src/overlays/actors/ovl_En_Xc/z_en_xc.h | 6 ++-- .../actors/ovl_En_Yukabyun/z_en_yukabyun.c | 11 +++++++ .../actors/ovl_En_Yukabyun/z_en_yukabyun.h | 4 +-- src/overlays/actors/ovl_En_Zl1/z_en_zl1.c | 13 ++++++++ src/overlays/actors/ovl_En_Zl1/z_en_zl1.h | 4 +-- .../ovl_En_Zl1/z_en_zl1_camera_data.inc.c | 1 - .../ovl_En_Zl1/z_en_zl1_cutscene_data.c | 3 +- src/overlays/actors/ovl_En_Zl2/z_en_zl2.c | 22 +++++++++++--- src/overlays/actors/ovl_En_Zl2/z_en_zl2.h | 6 ++-- src/overlays/actors/ovl_En_Zl4/z_en_zl4.c | 17 +++++++++++ src/overlays/actors/ovl_En_Zl4/z_en_zl4.h | 6 ++-- .../ovl_En_Zl4/z_en_zl4_cutscene_data.inc.c | 2 +- src/overlays/actors/ovl_En_Zo/z_en_zo.c | 13 ++++++++ src/overlays/actors/ovl_En_Zo/z_en_zo.h | 4 +-- src/overlays/actors/ovl_En_fHG/z_en_fhg.c | 19 +++++++++++- src/overlays/actors/ovl_En_fHG/z_en_fhg.h | 5 ++-- .../actors/ovl_End_Title/z_end_title.c | 6 ++++ .../actors/ovl_End_Title/z_end_title.h | 2 +- .../actors/ovl_Item_B_Heart/z_item_b_heart.c | 8 +++++ .../actors/ovl_Item_B_Heart/z_item_b_heart.h | 2 +- .../actors/ovl_Item_Shield/z_item_shield.c | 14 ++++++++- .../actors/ovl_Item_Shield/z_item_shield.h | 4 +-- .../actors/ovl_Magic_Dark/z_magic_dark.c | 9 ++++++ .../actors/ovl_Magic_Dark/z_magic_dark.h | 2 +- .../actors/ovl_Magic_Fire/z_magic_fire.c | 9 ++++++ .../actors/ovl_Magic_Fire/z_magic_fire.h | 2 +- .../actors/ovl_Magic_Wind/z_magic_wind.c | 8 +++++ .../actors/ovl_Magic_Wind/z_magic_wind.h | 5 ++-- .../ovl_Obj_Blockstop/z_obj_blockstop.c | 4 +++ .../ovl_Obj_Blockstop/z_obj_blockstop.h | 2 +- .../actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c | 9 ++++++ .../actors/ovl_Obj_Bombiwa/z_obj_bombiwa.h | 2 +- .../actors/ovl_Obj_Dekujr/z_obj_dekujr.c | 7 +++++ .../actors/ovl_Obj_Dekujr/z_obj_dekujr.h | 2 +- .../actors/ovl_Obj_Elevator/z_obj_elevator.c | 6 ++++ .../actors/ovl_Obj_Elevator/z_obj_elevator.h | 4 +-- .../actors/ovl_Obj_Hamishi/z_obj_hamishi.c | 12 ++++++++ .../actors/ovl_Obj_Hamishi/z_obj_hamishi.h | 2 +- src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c | 4 +++ src/overlays/actors/ovl_Obj_Hana/z_obj_hana.h | 2 +- .../actors/ovl_Obj_Hsblock/z_obj_hsblock.c | 9 ++++++ .../actors/ovl_Obj_Hsblock/z_obj_hsblock.h | 4 +-- .../actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c | 11 +++++++ .../actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h | 4 +-- src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c | 10 ++++++- src/overlays/actors/ovl_Obj_Lift/z_obj_lift.h | 4 +-- .../ovl_Obj_Lightswitch/z_obj_lightswitch.c | 15 +++++++++- .../ovl_Obj_Lightswitch/z_obj_lightswitch.h | 4 +-- .../ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c | 6 ++++ .../ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.h | 2 +- .../actors/ovl_Obj_Mure2/z_obj_mure2.c | 5 ++++ .../actors/ovl_Obj_Mure2/z_obj_mure2.h | 4 +-- .../actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c | 12 ++++++++ .../actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h | 6 ++-- .../ovl_Obj_Roomtimer/z_obj_roomtimer.c | 4 +++ .../ovl_Obj_Roomtimer/z_obj_roomtimer.h | 5 ++-- .../actors/ovl_Obj_Switch/z_obj_switch.c | 15 +++++++++- .../actors/ovl_Obj_Switch/z_obj_switch.h | 6 ++-- .../ovl_Obj_Timeblock/z_obj_timeblock.c | 12 ++++++++ .../ovl_Obj_Timeblock/z_obj_timeblock.h | 6 ++-- .../ovl_Obj_Warp2block/z_obj_warp2block.c | 15 +++++++++- .../ovl_Obj_Warp2block/z_obj_warp2block.h | 6 ++-- .../ovl_Object_Kankyo/z_object_kankyo.c | 16 ++++++++++ .../ovl_Object_Kankyo/z_object_kankyo.h | 4 +-- .../actors/ovl_Oceff_Spot/z_oceff_spot.c | 11 +++++++ .../actors/ovl_Oceff_Spot/z_oceff_spot.h | 5 ++-- .../actors/ovl_Oceff_Wipe/z_oceff_wipe.c | 7 +++++ .../actors/ovl_Oceff_Wipe/z_oceff_wipe.h | 2 +- .../actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c | 7 +++++ .../actors/ovl_Oceff_Wipe2/z_oceff_wipe2.h | 2 +- .../actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c | 7 +++++ .../actors/ovl_Oceff_Wipe3/z_oceff_wipe3.h | 2 +- .../actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c | 6 ++++ .../actors/ovl_Oceff_Wipe4/z_oceff_wipe4.h | 2 +- .../z_eff_ss_fhg_flash.c | 12 ++++++++ 437 files changed, 2743 insertions(+), 506 deletions(-) diff --git a/include/z64.h b/include/z64.h index 3da9ad2de1..f53bac0e88 100644 --- a/include/z64.h +++ b/include/z64.h @@ -32,7 +32,6 @@ #include "z64math.h" #include "z64map_mark.h" #include "z64message.h" -#include "z64olib.h" #include "one_point_cutscene.h" #include "z64pause.h" #include "z64play.h" diff --git a/include/z64actor.h b/include/z64actor.h index 40cafd9440..0cd73a8310 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -732,6 +732,8 @@ typedef struct NpcInteractInfo { #define TRANSITION_ACTOR_PARAMS_INDEX_SHIFT 10 #define GET_TRANSITION_ACTOR_INDEX(actor) PARAMS_GET_NOMASK((u16)(actor)->params, 10) +extern Gfx D_80116280[]; + void ActorShape_Init(ActorShape* shape, f32 yOffset, ActorShadowFunc shadowDraw, f32 shadowScale); void ActorShadow_DrawCircle(Actor* actor, struct Lights* lights, struct PlayState* play); void ActorShadow_DrawWhiteCircle(Actor* actor, struct Lights* lights, struct PlayState* play); diff --git a/src/code/db_camera.c b/src/code/db_camera.c index eb0a0d8059..5da144096a 100644 --- a/src/code/db_camera.c +++ b/src/code/db_camera.c @@ -1,5 +1,6 @@ #include "global.h" #include "z64debug_display.h" +#include "z64olib.h" #define DEBUG_CAM_CONTROLLER_PORT 2 diff --git a/src/code/main.c b/src/code/main.c index e654bb05cf..73d9f796ae 100644 --- a/src/code/main.c +++ b/src/code/main.c @@ -24,7 +24,7 @@ extern struct IrqMgr gIrqMgr; #endif #pragma increment_block_number "gc-eu:144 gc-eu-mq:144 gc-jp:144 gc-jp-ce:144 gc-jp-mq:144 gc-us:144 gc-us-mq:144" \ - "ique-cn:160 ntsc-1.0:136 ntsc-1.1:136 ntsc-1.2:136 pal-1.0:134 pal-1.1:134" + "ique-cn:160 ntsc-1.0:137 ntsc-1.1:137 ntsc-1.2:137 pal-1.0:135 pal-1.1:135" extern u8 _buffersSegmentEnd[]; diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 9fb0365735..2f768f35f3 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -2,6 +2,7 @@ #include "global.h" #include "quake.h" #include "terminal.h" +#include "z64olib.h" #include "overlays/actors/ovl_En_Horse/z_en_horse.h" #pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \ diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c index 6d3518aae5..012ecdb742 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -1,5 +1,5 @@ #pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-jp:208 gc-jp-ce:208 gc-jp-mq:208 gc-us:208 gc-us-mq:208" \ - "ique-cn:208 ntsc-1.0:208 ntsc-1.1:208 ntsc-1.2:208 pal-1.0:232 pal-1.1:232" + "ique-cn:208 ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:232 pal-1.1:232" #include "global.h" #include "ultra64.h" diff --git a/src/code/z_onepointdemo.c b/src/code/z_onepointdemo.c index 04ffc2f463..344d3aee29 100644 --- a/src/code/z_onepointdemo.c +++ b/src/code/z_onepointdemo.c @@ -2,6 +2,7 @@ #include "quake.h" #include "terminal.h" #include "versions.h" +#include "z64olib.h" #include "overlays/actors/ovl_En_Sw/z_en_sw.h" static s16 sDisableAttention = false; diff --git a/src/code/z_path.c b/src/code/z_path.c index d27530eb3a..7afe07aab8 100644 --- a/src/code/z_path.c +++ b/src/code/z_path.c @@ -1,4 +1,7 @@ -#include "global.h" +#include "ultra64.h" +#include "libc64/math64.h" +#include "segmented_address.h" +#include "z64play.h" Path* Path_GetByIndex(PlayState* play, s16 index, s16 max) { Path* path; diff --git a/src/code/z_quake.c b/src/code/z_quake.c index 4c318b9386..2e83a7c10e 100644 --- a/src/code/z_quake.c +++ b/src/code/z_quake.c @@ -1,6 +1,10 @@ -#include "global.h" +#include "libc64/qrand.h" +#include "macros.h" #include "quake.h" #include "terminal.h" +#include "z_lib.h" +#include "z64olib.h" +#include "z64play.h" typedef struct QuakeRequest { /* 0x00 */ s16 index; diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.h b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.h index 6593e49037..9f06d9a1d6 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.h +++ b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.h @@ -4,7 +4,6 @@ #include "ultra64.h" #include "z64actor.h" - struct BgJyaBombiwa; typedef struct BgJyaBombiwa { diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c index 211f06d3bb..b75117adca 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c @@ -5,6 +5,14 @@ */ #include "z_bg_mori_hashigo.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_mori_objects/object_mori_objects.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h index d667f933e7..e14aec45e1 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h +++ b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.h @@ -2,11 +2,11 @@ #define Z_BG_MORI_HASHIGO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgMoriHashigo; -typedef void (*BgMoriHashigoActionFunc)(struct BgMoriHashigo*, PlayState*); +typedef void (*BgMoriHashigoActionFunc)(struct BgMoriHashigo*, struct PlayState*); typedef struct BgMoriHashigo { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c index c5f634640e..9f3b50dadb 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c @@ -5,6 +5,16 @@ */ #include "z_bg_mori_hashira4.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_mori_objects/object_mori_objects.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.h b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.h index a36a6ef36b..e4ab5a2d85 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.h +++ b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.h @@ -2,11 +2,11 @@ #define Z_BG_MORI_HASHIRA4_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgMoriHashira4; -typedef void (*BgMoriHashira4ActionFunc)(struct BgMoriHashira4*, PlayState*); +typedef void (*BgMoriHashira4ActionFunc)(struct BgMoriHashira4*, struct PlayState*); typedef struct BgMoriHashira4 { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c index 70e60eacf4..92fc3c57a8 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c @@ -5,7 +5,19 @@ */ #include "z_bg_mori_hineri.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "sfx.h" +#include "sys_matrix.h" #include "versions.h" +#include "z_lib.h" +#include "z64curve.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_box/object_box.h" #include "assets/objects/object_mori_hineri1/object_mori_hineri1.h" diff --git a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.h b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.h index 468bb29656..b9a29df504 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.h +++ b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.h @@ -2,14 +2,14 @@ #define Z_BG_MORI_HINERI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgMoriHineri; // Due to a unique access pattern, this param cannot use the generic "PARAMS_GET_U" macros #define TWISTED_HALLWAY_GET_PARAM_15(thisx) (((thisx)->params & (NBITS_TO_MASK(1) << (15))) >> ((15) - (1))) -typedef void (*BgMoriHineriActionFunc)(struct BgMoriHineri*, PlayState*); +typedef void (*BgMoriHineriActionFunc)(struct BgMoriHineri*, struct PlayState*); typedef struct BgMoriHineri { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c index 9af9f14f2f..051e7c6874 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c +++ b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c @@ -5,6 +5,15 @@ */ #include "z_bg_mori_idomizu.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "one_point_cutscene.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_mori_objects/object_mori_objects.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.h b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.h index 3e7036ec4b..4348622425 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.h +++ b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.h @@ -2,11 +2,11 @@ #define Z_BG_MORI_IDOMIZU_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgMoriIdomizu; -typedef void (*BgMoriIdomizuActionFunc)(struct BgMoriIdomizu*, PlayState*); +typedef void (*BgMoriIdomizuActionFunc)(struct BgMoriIdomizu*, struct PlayState*); typedef struct BgMoriIdomizu { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c index 910a2bd285..8bf43c9a18 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c +++ b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c @@ -5,6 +5,16 @@ */ #include "z_bg_mori_kaitenkabe.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_mori_objects/object_mori_objects.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.h b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.h index 7bd6939d3f..91c0d65a80 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.h +++ b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.h @@ -2,11 +2,11 @@ #define Z_BG_MORI_KAITENKABE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgMoriKaitenkabe; -typedef void (*BgMoriKaitenkabeActionFunc)(struct BgMoriKaitenkabe*, PlayState*); +typedef void (*BgMoriKaitenkabeActionFunc)(struct BgMoriKaitenkabe*, struct PlayState*); typedef struct BgMoriKaitenkabe { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c index 61bbf6b9ef..b331b15b27 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c +++ b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c @@ -5,8 +5,19 @@ */ #include "z_bg_mori_rakkatenjo.h" -#include "assets/objects/object_mori_objects/object_mori_objects.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" #include "quake.h" +#include "rumble.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "assets/objects/object_mori_objects/object_mori_objects.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.h b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.h index 97bdbc0bfd..657baefc53 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.h +++ b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.h @@ -2,11 +2,11 @@ #define Z_BG_MORI_RAKKATENJO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgMoriRakkatenjo; -typedef void (*BgMoriRakkatenjoActionFunction)(struct BgMoriRakkatenjo*, PlayState*); +typedef void (*BgMoriRakkatenjoActionFunction)(struct BgMoriRakkatenjo*, struct PlayState*); typedef struct BgMoriRakkatenjo { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c index 9dae9b2a5d..e5b8edea9d 100644 --- a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c +++ b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c @@ -5,6 +5,16 @@ */ #include "z_bg_po_syokudai.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z64light.h" +#include "z64play.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_syokudai/object_syokudai.h" diff --git a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.h b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.h index 8bb84f0fe5..a6186dcbe7 100644 --- a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.h +++ b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.h @@ -2,7 +2,8 @@ #define Z_BG_PO_SYOKUDAI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64light.h" struct BgPoSyokudai; diff --git a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c index 7d9ef63e60..3392a15f60 100644 --- a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c +++ b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c @@ -5,6 +5,14 @@ */ #include "z_bg_pushbox.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_pu_box/object_pu_box.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.h b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.h index 577ebaabb6..38cd6857d9 100644 --- a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.h +++ b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.h @@ -2,11 +2,11 @@ #define Z_BG_PUSHBOX_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgPushbox; -typedef void (*BgPushboxActionFunc)(struct BgPushbox*, PlayState*); +typedef void (*BgPushboxActionFunc)(struct BgPushbox*, struct PlayState*); typedef struct BgPushbox { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c index f6dfcc3d37..953a6c372b 100644 --- a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c +++ b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c @@ -5,6 +5,17 @@ */ #include "z_bg_relay_objects.h" + +#include "ichain.h" +#include "rumble.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_relay_objects/object_relay_objects.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.h b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.h index 802d840649..25db5cc5f6 100644 --- a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.h +++ b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.h @@ -2,11 +2,11 @@ #define Z_BG_RELAY_OBJECTS_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgRelayObjects; -typedef void (*BgRelayObjectsActionFunc)(struct BgRelayObjects*, PlayState*); +typedef void (*BgRelayObjectsActionFunc)(struct BgRelayObjects*, struct PlayState*); typedef struct BgRelayObjects { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c b/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c index 3eb461a52f..e493207d0f 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c @@ -5,6 +5,10 @@ */ #include "z_bg_spot00_break.h" + +#include "ichain.h" +#include "z64play.h" + #include "assets/objects/object_spot00_break/object_spot00_break.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.h b/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.h index de282476d9..17e45aa918 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.h +++ b/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.h @@ -2,7 +2,7 @@ #define Z_BG_SPOT00_BREAK_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot00Break; diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c index c60865af16..fb801f1704 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c @@ -5,8 +5,22 @@ */ #include "z_bg_spot00_hanebasi.h" -#include "assets/objects/object_spot00_objects/object_spot00_objects.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64light.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" +#include "assets/objects/object_spot00_objects/object_spot00_objects.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.h b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.h index fc6427ae82..7780bea692 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.h +++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.h @@ -2,11 +2,12 @@ #define Z_BG_SPOT00_HANEBASI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64light.h" struct BgSpot00Hanebasi; -typedef void (*BgSpot00HanebasiActionFunc)(struct BgSpot00Hanebasi*, PlayState*); +typedef void (*BgSpot00HanebasiActionFunc)(struct BgSpot00Hanebasi*, struct PlayState*); typedef struct BgSpot00Hanebasi { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c index d8b3cfaba7..ada2d26420 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c @@ -5,6 +5,15 @@ */ #include "z_bg_spot01_fusya.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" + #include "assets/objects/object_spot01_objects/object_spot01_objects.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.h b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.h index 1e7a831316..e232c6a907 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.h +++ b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.h @@ -2,11 +2,11 @@ #define Z_BG_SPOT01_FUSYA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot01Fusya; -typedef void (*BgSpot01FusyaActionFunc)(struct BgSpot01Fusya*, PlayState*); +typedef void (*BgSpot01FusyaActionFunc)(struct BgSpot01Fusya*, struct PlayState*); typedef struct BgSpot01Fusya { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c index ba1ff57d87..0aefb899f9 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c @@ -5,8 +5,19 @@ */ #include "z_bg_spot01_idohashira.h" -#include "assets/objects/object_spot01_objects/object_spot01_objects.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "regs.h" +#include "sfx.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + +#include "assets/objects/object_spot01_objects/object_spot01_objects.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.h b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.h index ae456de8fb..8d177d3317 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.h +++ b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.h @@ -2,12 +2,12 @@ #define Z_BG_SPOT01_IDOHASHIRA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot01Idohashira; -typedef void (*BgSpot01IdohashiraActionFunc)(struct BgSpot01Idohashira*, PlayState*); -typedef void (*BgSpot01IdohashiraDrawFunc)(struct BgSpot01Idohashira*, PlayState*); +typedef void (*BgSpot01IdohashiraActionFunc)(struct BgSpot01Idohashira*, struct PlayState*); +typedef void (*BgSpot01IdohashiraDrawFunc)(struct BgSpot01Idohashira*, struct PlayState*); typedef struct BgSpot01Idohashira { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c index f2c89a41de..3b81adc378 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c @@ -5,6 +5,15 @@ */ #include "z_bg_spot01_idomizu.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_spot01_objects/object_spot01_objects.h" #define FLAGS ACTOR_FLAG_DRAW_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.h b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.h index 3c5929714a..3d4ff68a6f 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.h +++ b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.h @@ -2,11 +2,11 @@ #define Z_BG_SPOT01_IDOMIZU_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot01Idomizu; -typedef void (*BgSpot01IdomizuActionFunc)(struct BgSpot01Idomizu*, PlayState*); +typedef void (*BgSpot01IdomizuActionFunc)(struct BgSpot01Idomizu*, struct PlayState*); typedef struct BgSpot01Idomizu { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c index 1bad86dd46..2dc1d7b30d 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c @@ -5,6 +5,13 @@ */ #include "z_bg_spot01_idosoko.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sys_matrix.h" +#include "z64play.h" + #include "assets/objects/object_spot01_matoya/object_spot01_matoya.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.h b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.h index c17b0a43ed..44981abc07 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.h +++ b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.h @@ -2,11 +2,11 @@ #define Z_BG_SPOT01_IDOSOKO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot01Idosoko; -typedef void (*BgSpot01IdosokoActionFunc)(struct BgSpot01Idosoko*, PlayState*); +typedef void (*BgSpot01IdosokoActionFunc)(struct BgSpot01Idosoko*, struct PlayState*); typedef struct BgSpot01Idosoko { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c index 2ee4c58283..08b0c14f70 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c @@ -5,6 +5,11 @@ */ #include "z_bg_spot01_objects2.h" + +#include "ichain.h" +#include "segmented_address.h" +#include "z64play.h" + #include "assets/objects/object_spot01_matoya/object_spot01_matoya.h" #include "assets/objects/object_spot01_matoyab/object_spot01_matoyab.h" diff --git a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.h b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.h index d1d96d045b..7ffc3094fe 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.h +++ b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.h @@ -2,11 +2,11 @@ #define Z_BG_SPOT01_OBJECTS2_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot01Objects2; -typedef void (*BgSpot01Objects2ActionFunc)(struct BgSpot01Objects2*, PlayState*); +typedef void (*BgSpot01Objects2ActionFunc)(struct BgSpot01Objects2*, struct PlayState*); typedef struct BgSpot01Objects2 { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c index a0d74b4eda..9c66c77648 100644 --- a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c @@ -5,6 +5,19 @@ */ #include "z_bg_spot02_objects.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_spot02_objects/object_spot02_objects.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.h b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.h index 873fe15a52..42d4e45b08 100644 --- a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.h +++ b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.h @@ -2,11 +2,11 @@ #define Z_BG_SPOT02_OBJECTS_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot02Objects; -typedef void (*BgSpot02ObjectsActionFunc)(struct BgSpot02Objects*, PlayState*); +typedef void (*BgSpot02ObjectsActionFunc)(struct BgSpot02Objects*, struct PlayState*); typedef struct BgSpot02Objects { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c index fccae09ba4..501a677359 100644 --- a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c +++ b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c @@ -5,6 +5,16 @@ */ #include "z_bg_spot03_taki.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "segmented_address.h" +#include "sys_matrix.h" +#include "z64audio.h" +#include "z64play.h" + #include "assets/objects/object_spot03_object/object_spot03_object.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.h b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.h index f6e3daab16..45ad4de4f2 100644 --- a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.h +++ b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.h @@ -2,7 +2,7 @@ #define Z_BG_SPOT03_TAKI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" typedef enum BgSpot03TakiState { WATERFALL_CLOSED, @@ -14,7 +14,7 @@ typedef enum BgSpot03TakiState { struct BgSpot03Taki; -typedef void (*BgSpot03TakiActionFunc)(struct BgSpot03Taki*, PlayState*); +typedef void (*BgSpot03TakiActionFunc)(struct BgSpot03Taki*, struct PlayState*); typedef struct BgSpot03Taki { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c b/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c index 93c30e65af..8df3a7830e 100644 --- a/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c +++ b/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c @@ -5,6 +5,13 @@ */ #include "z_bg_spot05_soko.h" + +#include "ichain.h" +#include "one_point_cutscene.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_spot05_objects/object_spot05_objects.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.h b/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.h index 849e5b2263..1aae818797 100644 --- a/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.h +++ b/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.h @@ -2,11 +2,11 @@ #define Z_BG_SPOT05_SOKO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot05Soko; -typedef void (*BgSpot05SokoActionFunc)(struct BgSpot05Soko*, PlayState*); +typedef void (*BgSpot05SokoActionFunc)(struct BgSpot05Soko*, struct PlayState*); typedef struct BgSpot05Soko { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index f7576aef8d..2a2e8bae0c 100644 --- a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -5,6 +5,18 @@ */ #include "z_bg_spot06_objects.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "rand.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/object_spot06_objects/object_spot06_objects.h" #define FLAGS ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR diff --git a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.h b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.h index 5b4281d014..cbdc1054f8 100644 --- a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.h +++ b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.h @@ -2,11 +2,11 @@ #define Z_BG_SPOT06_OBJECTS_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot06Objects; -typedef void (*BgSpot06ObjectsActionFunc)(struct BgSpot06Objects*, PlayState*); +typedef void (*BgSpot06ObjectsActionFunc)(struct BgSpot06Objects*, struct PlayState*); typedef struct BgSpot06Objects { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c index 04d06a57a5..e131bf40f8 100644 --- a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c +++ b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c @@ -5,7 +5,14 @@ */ #include "z_bg_spot07_taki.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sys_matrix.h" #include "versions.h" +#include "z64play.h" + #include "assets/objects/object_spot07_object/object_spot07_object.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.h b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.h index dcf6ef8edc..30872233ad 100644 --- a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.h +++ b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.h @@ -2,11 +2,11 @@ #define Z_BG_SPOT07_TAKI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot07Taki; -typedef void (*BgSpot07TakiActionFunc)(struct BgSpot07Taki*, PlayState*); +typedef void (*BgSpot07TakiActionFunc)(struct BgSpot07Taki*, struct PlayState*); typedef struct BgSpot07Taki { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c index e3803b9f4d..b54226cec8 100644 --- a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c @@ -5,9 +5,17 @@ */ #include "z_bg_spot08_bakudankabe.h" -#include "assets/objects/object_spot08_obj/object_spot08_obj.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" + +#include "libc64/qrand.h" +#include "ichain.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/gameplay_field_keep/gameplay_field_keep.h" +#include "assets/objects/object_spot08_obj/object_spot08_obj.h" #define FLAGS ACTOR_FLAG_IGNORE_POINT_LIGHTS diff --git a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.h b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.h index 33c18e1b2f..a0436ea9ea 100644 --- a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.h +++ b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.h @@ -2,7 +2,7 @@ #define Z_BG_SPOT08_BAKUDANKABE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot08Bakudankabe; diff --git a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c index 00ca47644f..a157fc5d61 100644 --- a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c @@ -5,6 +5,13 @@ */ #include "z_bg_spot09_obj.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sys_matrix.h" +#include "z64play.h" + #include "assets/objects/object_spot09_obj/object_spot09_obj.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.h b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.h index a09ce32eda..491d7380c2 100644 --- a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.h +++ b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.h @@ -2,7 +2,7 @@ #define Z_BG_SPOT09_OBJ_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot09Obj; diff --git a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c index d0568c23c8..1aafed8831 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c @@ -6,6 +6,13 @@ #include "z_bg_spot11_bakudankabe.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" + +#include "libc64/qrand.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/object_spot11_obj/object_spot11_obj.h" #include "assets/objects/gameplay_field_keep/gameplay_field_keep.h" diff --git a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h index b18f5c084b..5dedab77d5 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h +++ b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h @@ -2,7 +2,7 @@ #define Z_BG_SPOT11_BAKUDANKABE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot11Bakudankabe; diff --git a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c index 05987f0921..5042c86d35 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c +++ b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c @@ -6,6 +6,22 @@ #include "z_bg_spot11_oasis.h" #include "overlays/actors/ovl_En_Elf/z_en_elf.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "sfx.h" +#include "sys_math3d.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_spot11_obj/object_spot11_obj.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.h b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.h index cae716a00a..0f0ed97e6e 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.h +++ b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.h @@ -2,11 +2,11 @@ #define Z_BG_SPOT11_OASIS_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot11Oasis; -typedef void (*BgSpot11OasisActionFunc)(struct BgSpot11Oasis*, PlayState*); +typedef void (*BgSpot11OasisActionFunc)(struct BgSpot11Oasis*, struct PlayState*); typedef struct BgSpot11Oasis { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c index b01eb98174..9a36eb287d 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c +++ b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c @@ -5,8 +5,15 @@ */ #include "z_bg_spot12_gate.h" -#include "assets/objects/object_spot12_obj/object_spot12_obj.h" + +#include "ichain.h" +#include "one_point_cutscene.h" #include "quake.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64play.h" + +#include "assets/objects/object_spot12_obj/object_spot12_obj.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.h b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.h index 2e9989fc21..bb9ef25cf5 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.h +++ b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.h @@ -2,11 +2,11 @@ #define Z_BG_SPOT12_GATE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot12Gate; -typedef void (*BgSpot12GateActionFunc)(struct BgSpot12Gate*, PlayState*); +typedef void (*BgSpot12GateActionFunc)(struct BgSpot12Gate*, struct PlayState*); typedef struct BgSpot12Gate { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c index 7fc67b38df..1edeb59461 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c +++ b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c @@ -5,6 +5,13 @@ */ #include "z_bg_spot12_saku.h" + +#include "ichain.h" +#include "one_point_cutscene.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_spot12_obj/object_spot12_obj.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.h b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.h index d96967300c..7ed7751ede 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.h +++ b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.h @@ -2,11 +2,11 @@ #define Z_BG_SPOT12_SAKU_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot12Saku; -typedef void (*BgSpot12SakuActionFunc)(struct BgSpot12Saku*, PlayState*); +typedef void (*BgSpot12SakuActionFunc)(struct BgSpot12Saku*, struct PlayState*); typedef struct BgSpot12Saku { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c index b2c8f61b80..5770d45f9c 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c +++ b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c @@ -5,6 +5,14 @@ */ #include "z_bg_spot15_rrbox.h" + +#include "ichain.h" +#include "sfx.h" +#include "sys_math3d.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_spot15_obj/object_spot15_obj.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.h b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.h index 745c65629f..d0534e1e73 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.h +++ b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.h @@ -2,11 +2,11 @@ #define Z_BG_SPOT15_RRBOX_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot15Rrbox; -typedef void (*BgSpot15RrboxActionFunc)(struct BgSpot15Rrbox*, PlayState*); +typedef void (*BgSpot15RrboxActionFunc)(struct BgSpot15Rrbox*, struct PlayState*); typedef struct BgSpot15Rrbox { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c index ca52b057bb..1fe57be526 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c +++ b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c @@ -5,6 +5,13 @@ */ #include "z_bg_spot15_saku.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z64play.h" + #include "assets/objects/object_spot15_obj/object_spot15_obj.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h index f7ac8d09ca..35fcbee90e 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h +++ b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h @@ -2,11 +2,11 @@ #define Z_BG_SPOT15_SAKU_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot15Saku; -typedef void (*BgSpot15SakuActionFunc)(struct BgSpot15Saku*, PlayState*); +typedef void (*BgSpot15SakuActionFunc)(struct BgSpot15Saku*, struct PlayState*); typedef struct BgSpot15Saku { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c index ecd9d87dbb..6bbf058f79 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c @@ -1,9 +1,24 @@ #include "z_bg_spot16_bombstone.h" -#include "assets/objects/object_spot16_obj/object_spot16_obj.h" -#include "assets/objects/object_bombiwa/object_bombiwa.h" #include "overlays/actors/ovl_En_Bombf/z_en_bombf.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "regs.h" +#include "sfx.h" +#include "sys_math3d.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + +#include "assets/objects/object_spot16_obj/object_spot16_obj.h" +#include "assets/objects/object_bombiwa/object_bombiwa.h" + #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED void BgSpot16Bombstone_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.h b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.h index 73c04ee18d..577bd3863b 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.h +++ b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.h @@ -2,11 +2,11 @@ #define Z_BG_SPOT16_BOMBSTONE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot16Bombstone; -typedef void (*BgSpot16BombstoneActionFunc)(struct BgSpot16Bombstone*, PlayState*); +typedef void (*BgSpot16BombstoneActionFunc)(struct BgSpot16Bombstone*, struct PlayState*); typedef struct BgSpot16Bombstone { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c index b71c0fd137..d99e751628 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c @@ -5,8 +5,15 @@ */ #include "z_bg_spot16_doughnut.h" -#include "assets/objects/object_efc_doughnut/object_efc_doughnut.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z64play.h" + +#include "assets/objects/object_efc_doughnut/object_efc_doughnut.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.h b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.h index 051e45cf58..3b7008ef2d 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.h +++ b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.h @@ -2,7 +2,7 @@ #define Z_BG_SPOT16_DOUGHNUT_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot16Doughnut; diff --git a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c index c6eafbdd47..03f7b4514b 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c @@ -6,6 +6,17 @@ #include "z_bg_spot17_bakudankabe.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/object_spot17_obj/object_spot17_obj.h" #include "assets/objects/gameplay_field_keep/gameplay_field_keep.h" diff --git a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.h b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.h index 8928435408..fd88416ddf 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.h +++ b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.h @@ -2,7 +2,7 @@ #define Z_BG_SPOT17_BAKUDANKABE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot17Bakudankabe; diff --git a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c index 8ee2e9dadf..84973d0b11 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c +++ b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c @@ -5,6 +5,13 @@ */ #include "z_bg_spot17_funen.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sys_matrix.h" +#include "z64play.h" + #include "assets/objects/object_spot17_obj/object_spot17_obj.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.h b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.h index 6a44fa14cf..737719ea28 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.h +++ b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.h @@ -2,7 +2,7 @@ #define Z_BG_SPOT17_FUNEN_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot17Funen; diff --git a/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c b/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c index cec6266a2e..21bc50671c 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c @@ -5,6 +5,11 @@ */ #include "z_bg_spot18_futa.h" + +#include "ichain.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_spot18_obj/object_spot18_obj.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.h b/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.h index 1150611cd2..ff0c2cf8ac 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.h +++ b/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.h @@ -2,7 +2,7 @@ #define Z_BG_SPOT18_FUTA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot18Futa; diff --git a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c index 505797f7e9..eb60ebe2ff 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c @@ -6,6 +6,14 @@ */ #include "z_bg_spot18_obj.h" + +#include "ichain.h" +#include "sfx.h" +#include "sys_math3d.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_spot18_obj/object_spot18_obj.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.h b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.h index 5e000f646d..bfa758afd7 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.h +++ b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.h @@ -2,12 +2,12 @@ #define Z_BG_SPOT18_OBJ_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot18Obj; -typedef void (*BgSpot18ObjActionFunc)(struct BgSpot18Obj*, PlayState*); -typedef s32 (*BgSpot18ObjInitFunc)(struct BgSpot18Obj*, PlayState*); +typedef void (*BgSpot18ObjActionFunc)(struct BgSpot18Obj*, struct PlayState*); +typedef s32 (*BgSpot18ObjInitFunc)(struct BgSpot18Obj*, struct PlayState*); typedef struct BgSpot18Obj { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c index a078991b46..4a8c72d6ee 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c @@ -5,6 +5,13 @@ */ #include "z_bg_spot18_shutter.h" + +#include "ichain.h" +#include "one_point_cutscene.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_spot18_obj/object_spot18_obj.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.h b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.h index 161fa9bc97..737d30bdbb 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.h +++ b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.h @@ -2,11 +2,11 @@ #define Z_BG_SPOT18_SHUTTER_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgSpot18Shutter; -typedef void (*BgSpot18ShutterActionFunc)(struct BgSpot18Shutter*, PlayState*); +typedef void (*BgSpot18ShutterActionFunc)(struct BgSpot18Shutter*, struct PlayState*); typedef struct BgSpot18Shutter { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c index 4ed9f8854c..fd12de168b 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c +++ b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c @@ -5,6 +5,13 @@ */ #include "z_bg_toki_hikari.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sys_matrix.h" +#include "z64play.h" + #include "assets/objects/object_toki_objects/object_toki_objects.h" #define FLAGS ACTOR_FLAG_DRAW_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.h b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.h index b4c62dba99..3c49b61cca 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.h +++ b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.h @@ -2,11 +2,11 @@ #define Z_BG_TOKI_HIKARI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgTokiHikari; -typedef void (*BgTokiHikariActionFunc)(struct BgTokiHikari*, PlayState*); +typedef void (*BgTokiHikariActionFunc)(struct BgTokiHikari*, struct PlayState*); typedef struct BgTokiHikari { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c index 8dcc00db30..8c79e8fdbe 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c @@ -5,6 +5,19 @@ */ #include "z_bg_toki_swd.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_toki_objects/object_toki_objects.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.h b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.h index 0a16201e60..5fdb9e0692 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.h +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.h @@ -2,11 +2,11 @@ #define Z_BG_TOKI_SWD_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgTokiSwd; -typedef void (*BgTokiSwdActionFunc)(struct BgTokiSwd*, PlayState*); +typedef void (*BgTokiSwdActionFunc)(struct BgTokiSwd*, struct PlayState*); typedef struct BgTokiSwd { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.c index f11a8a551a..123a797a73 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_1.c @@ -1,5 +1,5 @@ -#include "z_bg_toki_swd.h" #include "z64cutscene_commands.h" +#include "z64player.h" // clang-format off CutsceneData gPullMasterSwordCs[] = { diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.c index de138790da..3e27901701 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_2.c @@ -1,5 +1,5 @@ -#include "z_bg_toki_swd.h" #include "z64cutscene_commands.h" +#include "z64player.h" // clang-format off CutsceneData gPlaceMasterSwordCs[] = { diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.c index c6c5e4eb60..3e5ccb4ea6 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd_cutscene_data_3.c @@ -1,5 +1,5 @@ -#include "z_bg_toki_swd.h" #include "z64cutscene_commands.h" +#include "z64player.h" // clang-format off CutsceneData gRevealMasterSwordCs[] = { diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c index d245fce7cd..f5fb1eabca 100644 --- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c +++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c @@ -5,10 +5,23 @@ */ #include "z_bg_treemouth.h" -#include "versions.h" -#include "assets/objects/object_spot04_objects/object_spot04_objects.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "versions.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + +#include "assets/objects/object_spot04_objects/object_spot04_objects.h" + #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) void BgTreemouth_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.h b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.h index dc5a5f545f..7fea6f8e77 100644 --- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.h +++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.h @@ -2,11 +2,11 @@ #define Z_BG_TREEMOUTH_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgTreemouth; -typedef void (*BgTreemouthActionFunc)(struct BgTreemouth*, PlayState*); +typedef void (*BgTreemouthActionFunc)(struct BgTreemouth*, struct PlayState*); typedef struct BgTreemouth { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c index 020b2972b1..c254318d42 100644 --- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c +++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c @@ -1,5 +1,6 @@ -#include "z_bg_treemouth.h" +#include "sequence.h" #include "z64cutscene_commands.h" +#include "z64player.h" // clang-format off CutsceneData gDekuTreeMeetingCs[] = { diff --git a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c index dbd5148b74..9d5e94d044 100644 --- a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c +++ b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c @@ -5,6 +5,11 @@ */ #include "z_bg_umajump.h" + +#include "ichain.h" +#include "regs.h" +#include "z64play.h" + #include "assets/objects/object_umajump/object_umajump.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.h b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.h index 19142ec4c8..067b5195c8 100644 --- a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.h +++ b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.h @@ -2,7 +2,7 @@ #define Z_BG_UMAJUMP_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgUmaJump; diff --git a/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c b/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c index 87e6c54ed4..679519f1be 100644 --- a/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c +++ b/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c @@ -5,9 +5,21 @@ */ #include "z_bg_vb_sima.h" -#include "assets/objects/object_fd/object_fd.h" #include "overlays/actors/ovl_Boss_Fd/z_boss_fd.h" +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rand.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + +#include "assets/objects/object_fd/object_fd.h" + #define FLAGS 0 void BgVbSima_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.h b/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.h index c279ae393c..1dcee1b596 100644 --- a/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.h +++ b/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.h @@ -2,7 +2,7 @@ #define Z_BG_VB_SIMA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgVbSima; diff --git a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c index df6e12f851..f759a98148 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c @@ -5,6 +5,16 @@ */ #include "z_bg_ydan_hasi.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_ydan_objects/object_ydan_objects.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.h b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.h index 616cd4250a..a308c6ebc0 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.h +++ b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.h @@ -2,11 +2,11 @@ #define Z_BG_YDAN_HASI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgYdanHasi; -typedef void (*BgYdanHasiActionFunc)(struct BgYdanHasi*, PlayState*); +typedef void (*BgYdanHasiActionFunc)(struct BgYdanHasi*, struct PlayState*); typedef struct BgYdanHasi { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c index ea045b8ebb..becd2a11cc 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c @@ -5,6 +5,13 @@ */ #include "z_bg_ydan_maruta.h" + +#include "ichain.h" +#include "one_point_cutscene.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_ydan_objects/object_ydan_objects.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.h b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.h index ff857fe1a6..450c550b3a 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.h +++ b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.h @@ -2,11 +2,11 @@ #define Z_BG_YDAN_MARUTA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgYdanMaruta; -typedef void (*BgYdanMarutaActionFunc)(struct BgYdanMaruta*, PlayState*); +typedef void (*BgYdanMarutaActionFunc)(struct BgYdanMaruta*, struct PlayState*); typedef struct BgYdanMaruta { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c index 2d9b6f9296..0034cfb4ca 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c @@ -5,6 +5,21 @@ */ #include "z_bg_ydan_sp.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "rand.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_ydan_objects/object_ydan_objects.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.h b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.h index e134ac6f2c..b2138e23a5 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.h +++ b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.h @@ -2,11 +2,11 @@ #define Z_BG_YDAN_SP_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgYdanSp; -typedef void (*BgYdanSpActionFunc)(struct BgYdanSp*, PlayState*); +typedef void (*BgYdanSpActionFunc)(struct BgYdanSp*, struct PlayState*); typedef struct BgYdanSp { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c index 958e3c3f4f..68bacc26c8 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c @@ -5,8 +5,17 @@ */ #include "z_bg_zg.h" -#include "assets/objects/object_zg/object_zg.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "regs.h" +#include "sfx.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z64play.h" + +#include "assets/objects/object_zg/object_zg.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h index a5355defd5..c7f1add3a5 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.h @@ -2,12 +2,12 @@ #define Z_BG_ZG_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BgZg; -typedef void (*BgZgActionFunc)(struct BgZg*, PlayState*); -typedef void (*BgZgDrawFunc)(struct BgZg*, PlayState*); +typedef void (*BgZgActionFunc)(struct BgZg*, struct PlayState*); +typedef void (*BgZgDrawFunc)(struct BgZg*, struct PlayState*); typedef struct BgZg { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index d28f674f5c..4adab87599 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -1,6 +1,26 @@ #include "z_boss_dodongo.h" -#include "assets/objects/object_kingdodongo/object_kingdodongo.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" + +#include "libc64/math64.h" +#include "libc64/qrand.h" +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rand.h" +#include "regs.h" +#include "rumble.h" +#include "segmented_address.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + +#include "assets/objects/object_kingdodongo/object_kingdodongo.h" #include "assets/scenes/dungeons/ddan_boss/ddan_boss_room_1.h" #define FLAGS \ @@ -48,6 +68,7 @@ ActorProfile Boss_Dodongo_Profile = { }; #include "z_boss_dodongo_data.inc.c" +#include "assets/overlays/ovl_Boss_Dodongo/ovl_Boss_Dodongo.c" static InitChainEntry sInitChain[] = { ICHAIN_U8(attentionRangeType, ATTENTION_RANGE_5, ICHAIN_CONTINUE), diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h index 098deb9306..191487f13f 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h @@ -2,11 +2,11 @@ #define Z_BOSS_DODONGO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BossDodongo; -typedef void (*BossDodongoActionFunc)(struct BossDodongo*, PlayState*); +typedef void (*BossDodongoActionFunc)(struct BossDodongo*, struct PlayState*); #define BOSS_DODONGO_EFFECT_COUNT 80 diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo_data.inc.c b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo_data.inc.c index d4ac8f7f03..3d0061bb35 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo_data.inc.c +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo_data.inc.c @@ -1,4 +1,4 @@ -#include "z_boss_dodongo.h" +#include "z64collision_check.h" static u8 D_808C7000[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, @@ -236,5 +236,3 @@ static ColliderJntSphInit sJntSphInit = { }; static Vec3f sUnkZeroVec = { 0.0f, 0.0f, 0.0f }; - -#include "assets/overlays/ovl_Boss_Dodongo/ovl_Boss_Dodongo.c" diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index 50fe691b89..4b0f869e02 100644 --- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -5,12 +5,30 @@ */ #include "z_boss_fd.h" -#include "assets/objects/object_fd/object_fd.h" #include "overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.h" #include "overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.h" #include "overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" + +#include "libc64/math64.h" +#include "libc64/qrand.h" +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rand.h" +#include "segmented_address.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" +#include "assets/objects/object_fd/object_fd.h" #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \ diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h index eb2a1e0ca9..1ec72040c9 100644 --- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h +++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.h @@ -2,11 +2,11 @@ #define Z_BOSS_FD_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BossFd; -typedef void (*BossFdActionFunc)(struct BossFd*, PlayState*); +typedef void (*BossFdActionFunc)(struct BossFd*, struct PlayState*); typedef enum BossFdActionState { /* -1 */ BOSSFD_WAIT_INTRO = -1, diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index 065f5ce03a..27c5d82e96 100644 --- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -5,10 +5,26 @@ */ #include "z_boss_fd2.h" -#include "assets/objects/object_fd2/object_fd2.h" #include "overlays/actors/ovl_Boss_Fd/z_boss_fd.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" + +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rand.h" +#include "segmented_address.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_math.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "assets/objects/object_fd2/object_fd2.h" #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \ diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h index 15bb14c0ce..d9fbde0ada 100644 --- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h +++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.h @@ -2,11 +2,11 @@ #define Z_BOSS_FD2_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BossFd2; -typedef void (*BossFd2ActionFunc)(struct BossFd2*, PlayState*); +typedef void (*BossFd2ActionFunc)(struct BossFd2*, struct PlayState*); typedef enum BossFd2Signal { /* 0 */ FD2_SIGNAL_NONE, diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index 7473f8d2d8..f257cd3b96 100644 --- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -5,13 +5,32 @@ */ #include "z_boss_ganondrof.h" -#include "assets/objects/object_gnd/object_gnd.h" #include "overlays/actors/ovl_En_fHG/z_en_fhg.h" #include "overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h" #include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" +#include "libc64/math64.h" +#include "libc64/qrand.h" +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rand.h" +#include "segmented_address.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64light.h" +#include "z64play.h" +#include "z64player.h" + +#include "assets/objects/object_gnd/object_gnd.h" + #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \ ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h index 142aea02b6..5b5bd846fe 100644 --- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h +++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h @@ -2,11 +2,12 @@ #define Z_BOSS_GANONDROF_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64light.h" struct BossGanondrof; -typedef void (*BossGanondrofActionFunc)(struct BossGanondrof*, PlayState*); +typedef void (*BossGanondrofActionFunc)(struct BossGanondrof*, struct PlayState*); #define GND_REAL_BOSS 1 #define GND_FAKE_BOSS 10 diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index e0685592f1..9d28223bdc 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -5,10 +5,36 @@ */ #include "z_boss_mo.h" -#include "assets/objects/object_mo/object_mo.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" -#include "assets/objects/gameplay_keep/gameplay_keep.h" + +#include "libc64/math64.h" +#include "libc64/qrand.h" +#include "attributes.h" +#include "controller.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "letterbox.h" +#include "rand.h" +#include "regs.h" +#include "rumble.h" +#include "segmented_address.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" +#include "z64skin_matrix.h" + +#include "global.h" + +#include "assets/objects/gameplay_keep/gameplay_keep.h" +#include "assets/objects/object_mo/object_mo.h" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ "pal-1.0:128 pal-1.1:128" diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.h b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.h index 08a41f132b..88867ceeda 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.h +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.h @@ -2,11 +2,11 @@ #define Z_BOSS_MO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BossMo; -typedef void (*BossMoActionFunc)(struct BossMo*, PlayState*); +typedef void (*BossMoActionFunc)(struct BossMo*, struct PlayState*); typedef enum BossMoTentS16Var { /* 0 */ MO_TENT_ACTION_STATE, diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index 110c3325e9..baff7c26c0 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -1,7 +1,27 @@ #include "z_boss_tw.h" +#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" + +#include "libc64/math64.h" +#include "libc64/qrand.h" +#include "attributes.h" +#include "controller.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rand.h" +#include "rumble.h" +#include "segmented_address.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" +#include "z64skin_matrix.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_tw/object_tw.h" -#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \ diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h index eb2a4ef74c..df62aeff37 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.h @@ -2,11 +2,11 @@ #define Z_BOSS_TW_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BossTw; -typedef void (*BossTwActionFunc)(struct BossTw* this, PlayState* play); +typedef void (*BossTwActionFunc)(struct BossTw* this, struct PlayState* play); typedef enum TwWork { /* 0 */ CS_TIMER_1, diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 549770bcd3..77a338f090 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -5,12 +5,30 @@ */ #include "z_boss_va.h" -#include "assets/objects/object_bv/object_bv.h" #include "overlays/actors/ovl_En_Boom/z_en_boom.h" + +#include "libc64/qrand.h" +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "regs.h" +#include "segmented_address.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_math.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" +#include "assets/objects/object_bv/object_bv.h" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.2:128 pal-1.0:128 pal-1.1:128" + "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128" #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \ diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.h b/src/overlays/actors/ovl_Boss_Va/z_boss_va.h index a9198626e3..9ce6cb970c 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.h +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.h @@ -2,11 +2,11 @@ #define Z_BOSS_VA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct BossVa; -typedef void (*BossVaActionFunc)(struct BossVa*, PlayState*); +typedef void (*BossVaActionFunc)(struct BossVa*, struct PlayState*); typedef struct BossVa { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c index 7657cf7432..9bf558e641 100644 --- a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c +++ b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c @@ -5,11 +5,28 @@ */ #include "z_demo_6k.h" +#include "overlays/actors/ovl_Eff_Dust/z_eff_dust.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64effect.h" +#include "z64light.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_demo_6k/object_demo_6k.h" #include "assets/objects/object_gnd_magic/object_gnd_magic.h" -#include "overlays/actors/ovl_Eff_Dust/z_eff_dust.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.h b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.h index 09d9c175fb..5849ccc236 100644 --- a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.h +++ b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.h @@ -2,11 +2,12 @@ #define Z_DEMO_6K_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64light.h" struct Demo6K; -typedef void (*Demo6KActionFunc)(struct Demo6K*, PlayState*); +typedef void (*Demo6KActionFunc)(struct Demo6K*, struct PlayState*); typedef struct Demo6K { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c index a5e7139f07..b66d9edede 100644 --- a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c +++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c @@ -1,8 +1,20 @@ #include "z_demo_du.h" -#include "assets/objects/object_du/object_du.h" #include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "regs.h" +#include "segmented_address.h" +#include "sfx.h" #include "terminal.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + +#include "assets/objects/object_du/object_du.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Demo_Du/z_demo_du.h b/src/overlays/actors/ovl_Demo_Du/z_demo_du.h index d46f03145e..ede2756e05 100644 --- a/src/overlays/actors/ovl_Demo_Du/z_demo_du.h +++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du.h @@ -2,7 +2,7 @@ #define Z_DEMO_DU_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct DemoDu; diff --git a/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.inc.c b/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.inc.c index 06dbb35c11..ad83a24185 100644 --- a/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.inc.c +++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.inc.c @@ -1,5 +1,6 @@ -#include "z_demo_du.h" +#include "sequence.h" #include "z64cutscene_commands.h" +#include "z64player.h" // clang-format off static CutsceneData gFireMedallionCs[] = { diff --git a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c index 3f19529df0..f7e652fa2f 100644 --- a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c +++ b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c @@ -5,7 +5,14 @@ */ #include "z_demo_ec.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_zo/object_zo.h" #include "assets/objects/object_ec/object_ec.h" #include "assets/objects/object_ma2/object_ma2.h" diff --git a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.h b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.h index fe71483505..494338b27d 100644 --- a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.h +++ b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.h @@ -2,13 +2,13 @@ #define Z_DEMO_EC_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct DemoEc; -typedef void (*DemoEcInitFunc)(struct DemoEc*, PlayState*); -typedef void (*DemoEcUpdateFunc)(struct DemoEc*, PlayState*); -typedef void (*DemoEcDrawFunc)(struct DemoEc*, PlayState*); +typedef void (*DemoEcInitFunc)(struct DemoEc*, struct PlayState*); +typedef void (*DemoEcUpdateFunc)(struct DemoEc*, struct PlayState*); +typedef void (*DemoEcDrawFunc)(struct DemoEc*, struct PlayState*); typedef struct DemoEc { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c index caae4cff14..55713d4134 100644 --- a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c +++ b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c @@ -5,7 +5,16 @@ */ #include "z_demo_ext.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "regs.h" +#include "sfx.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z64play.h" +#include "z64skin.h" + #include "assets/objects/object_fhg/object_fhg.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.h b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.h index dbed1bf1f9..2eadc4af69 100644 --- a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.h +++ b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.h @@ -2,12 +2,12 @@ #define Z_DEMO_EXT_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct DemoExt; -typedef void (*DemoExtActionFunc)(struct DemoExt*, PlayState*); -typedef void (*DemoExtDrawFunc)(Actor*, PlayState*); +typedef void (*DemoExtActionFunc)(struct DemoExt*, struct PlayState*); +typedef void (*DemoExtDrawFunc)(Actor*, struct PlayState*); typedef struct DemoExt { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c index 01c173dcc4..139e38a45f 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -5,8 +5,18 @@ */ #include "z_demo_go.h" -#include "assets/objects/object_oF1d_map/object_oF1d_map.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "regs.h" +#include "segmented_address.h" +#include "sfx.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64skin_matrix.h" + +#include "assets/objects/object_oF1d_map/object_oF1d_map.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.h b/src/overlays/actors/ovl_Demo_Go/z_demo_go.h index 969fdd8e07..9abd5ed41c 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.h +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.h @@ -2,12 +2,12 @@ #define Z_DEMO_GO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct DemoGo; -typedef void (*DemoGoActionFunc)(struct DemoGo*, PlayState*); -typedef void (*DemoGoDrawFunc)(struct DemoGo*, PlayState*); +typedef void (*DemoGoActionFunc)(struct DemoGo*, struct PlayState*); +typedef void (*DemoGoDrawFunc)(struct DemoGo*, struct PlayState*); typedef struct DemoGo { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c index 82db3d7fa6..51237a88e5 100644 --- a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c +++ b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c @@ -1,5 +1,13 @@ #include "z_demo_ik.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/object_ik/object_ik.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.h b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.h index 3b21af5665..b4f2ca74ea 100644 --- a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.h +++ b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.h @@ -2,12 +2,12 @@ #define Z_DEMO_IK_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct DemoIk; -typedef void (*DemoIkActionFunc)(struct DemoIk* this, PlayState* play); -typedef void (*DemoIkDrawFunc)(struct DemoIk* this, PlayState* play); +typedef void (*DemoIkActionFunc)(struct DemoIk* this, struct PlayState* play); +typedef void (*DemoIkDrawFunc)(struct DemoIk* this, struct PlayState* play); typedef struct DemoIk { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index 7e359f6625..eed9b32d36 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -7,9 +7,20 @@ #include "z_demo_im.h" #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "regs.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/scenes/indoors/nakaniwa/nakaniwa_scene.h" #include "assets/objects/object_im/object_im.h" -#include "terminal.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.h b/src/overlays/actors/ovl_Demo_Im/z_demo_im.h index 94744969be..9477c21d8f 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.h +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.h @@ -2,12 +2,12 @@ #define Z_DEMO_IM_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct DemoIm; -typedef void (*DemoImActionFunc)(struct DemoIm*, PlayState*); -typedef void (*DemoImDrawFunc)(struct DemoIm*, PlayState*); +typedef void (*DemoImActionFunc)(struct DemoIm*, struct PlayState*); +typedef void (*DemoImDrawFunc)(struct DemoIm*, struct PlayState*); typedef enum ImpaLimb { /* 0x00 */ IMPA_LIMB_NONE, diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.inc.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.inc.c index f56097680c..7a9a0dde84 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.inc.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.inc.c @@ -1,4 +1,4 @@ -#include "z_demo_im.h" +#include "sequence.h" #include "z64cutscene_commands.h" // clang-format off diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c index 50ae630b5b..ab25e8756e 100644 --- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c +++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c @@ -1,7 +1,21 @@ #include "z_demo_kankyo.h" -#include "global.h" + +#include "libc64/qrand.h" +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" #include "versions.h" +#include "z_lib.h" #include "z64cutscene_commands.h" +#include "z64olib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_efc_star_field/object_efc_star_field.h" #include "assets/objects/object_toki_objects/object_toki_objects.h" diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.c index 3a0a95a907..4e17a4a53c 100644 --- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.c +++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.c @@ -1,4 +1,3 @@ -#include "z_demo_kankyo.h" #include "z64cutscene_commands.h" // clang-format off diff --git a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c index 8c6ded1651..f1941c2616 100644 --- a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c +++ b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c @@ -5,6 +5,20 @@ */ #include "z_demo_kekkai.h" + +#include "libu64/debug.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/object_demo_kekkai/object_demo_kekkai.h" #include "assets/scenes/dungeons/ganontika/ganontika_scene.h" diff --git a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.h b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.h index 8e396c4ec6..182b1d587c 100644 --- a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.h +++ b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.h @@ -2,11 +2,11 @@ #define Z_DEMO_KEKKAI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct DemoKekkai; -typedef void (*DemoKekkaiUpdateFunc)(struct DemoKekkai* this, PlayState* play); +typedef void (*DemoKekkaiUpdateFunc)(struct DemoKekkai* this, struct PlayState* play); typedef struct DemoKekkai { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c index 36e521701b..74260383d0 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c @@ -7,9 +7,19 @@ #include "z_demo_sa.h" #include "overlays/actors/ovl_En_Elf/z_en_elf.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" -#include "assets/objects/object_sa/object_sa.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "regs.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sequence.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "assets/objects/object_sa/object_sa.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h index 1f66c4fec3..639d50a634 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.h @@ -2,12 +2,12 @@ #define Z_DEMO_SA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct DemoSa; -typedef void (*DemoSaActionFunc)(struct DemoSa*, PlayState*); -typedef void (*DemoSaDrawFunc)(struct DemoSa*, PlayState*); +typedef void (*DemoSaActionFunc)(struct DemoSa*, struct PlayState*); +typedef void (*DemoSaDrawFunc)(struct DemoSa*, struct PlayState*); typedef struct DemoSa { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c index d5cb025e46..549daf0db7 100644 --- a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c +++ b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c @@ -6,6 +6,13 @@ #include "z_demo_shd.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sequence.h" +#include "sys_matrix.h" +#include "z64audio.h" +#include "z64play.h" + #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) void DemoShd_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.h b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.h index fe9198f624..eb62a3983f 100644 --- a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.h +++ b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.h @@ -2,11 +2,11 @@ #define Z_DEMO_SHD_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct DemoShd; -typedef void (*DemoShdActionFunc)(struct DemoShd*, PlayState*); +typedef void (*DemoShdActionFunc)(struct DemoShd*, struct PlayState*); typedef struct DemoShd { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c index 67adb46e78..2da168e120 100644 --- a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c +++ b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c @@ -1,5 +1,12 @@ #include "z_demo_tre_lgt.h" #include "overlays/actors/ovl_En_Box/z_en_box.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" +#include "z64curve.h" +#include "z64play.h" + #include "assets/objects/object_box/object_box.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.h b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.h index 0cad6996d9..47f6c35642 100644 --- a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.h +++ b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.h @@ -2,11 +2,12 @@ #define Z_DEMO_TRE_LGT_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64curve.h" struct DemoTreLgt; -typedef void (*DemoTreLgtActionFunc)(struct DemoTreLgt*, PlayState*); +typedef void (*DemoTreLgtActionFunc)(struct DemoTreLgt*, struct PlayState*); typedef struct DemoTreLgt { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c index 40f4878831..323bad3d2b 100644 --- a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c +++ b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c @@ -5,6 +5,17 @@ */ #include "z_door_ana.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/gameplay_field_keep/gameplay_field_keep.h" #define FLAGS ACTOR_FLAG_UPDATE_DURING_OCARINA diff --git a/src/overlays/actors/ovl_Door_Ana/z_door_ana.h b/src/overlays/actors/ovl_Door_Ana/z_door_ana.h index 51c24b84af..0092bd8f1a 100644 --- a/src/overlays/actors/ovl_Door_Ana/z_door_ana.h +++ b/src/overlays/actors/ovl_Door_Ana/z_door_ana.h @@ -2,11 +2,11 @@ #define Z_DOOR_ANA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct DoorAna; -typedef void (*DoorAnaActionFunc)(struct DoorAna*, PlayState*); +typedef void (*DoorAnaActionFunc)(struct DoorAna*, struct PlayState*); typedef struct DoorAna { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c index 360f4aedec..ae4aa71911 100644 --- a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c +++ b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c @@ -5,6 +5,16 @@ */ #include "z_door_gerudo.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_door_gerudo/object_door_gerudo.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.h b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.h index c00a0fa669..efd2959767 100644 --- a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.h +++ b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.h @@ -2,11 +2,11 @@ #define Z_DOOR_GERUDO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct DoorGerudo; -typedef void (*DoorGerudoActionFunc)(struct DoorGerudo*, PlayState*); +typedef void (*DoorGerudoActionFunc)(struct DoorGerudo*, struct PlayState*); typedef struct DoorGerudo { /* 0x0000 */ SLIDING_DOOR_ACTOR_BASE; diff --git a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c index 61ae86d800..5d2fc11486 100644 --- a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c +++ b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c @@ -5,6 +5,17 @@ */ #include "z_door_killer.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "segmented_address.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_hidan_objects/object_hidan_objects.h" #include "assets/objects/object_mizu_objects/object_mizu_objects.h" diff --git a/src/overlays/actors/ovl_Door_Killer/z_door_killer.h b/src/overlays/actors/ovl_Door_Killer/z_door_killer.h index 9003f27ede..32eaaeb014 100644 --- a/src/overlays/actors/ovl_Door_Killer/z_door_killer.h +++ b/src/overlays/actors/ovl_Door_Killer/z_door_killer.h @@ -2,7 +2,7 @@ #define Z_DOOR_KILLER_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" /* * Associated switch flag: (params >> 8) & 0x3F @@ -16,7 +16,7 @@ typedef struct DoorKillerTextureEntry { struct DoorKiller; -typedef void (*DoorKillerActionFunc)(struct DoorKiller*, PlayState*); +typedef void (*DoorKillerActionFunc)(struct DoorKiller*, struct PlayState*); typedef struct DoorKiller { /* 0x0000 */ DOOR_ACTOR_BASE; diff --git a/src/overlays/actors/ovl_Door_Toki/z_door_toki.c b/src/overlays/actors/ovl_Door_Toki/z_door_toki.c index bf423a09b5..9bd37b6813 100644 --- a/src/overlays/actors/ovl_Door_Toki/z_door_toki.c +++ b/src/overlays/actors/ovl_Door_Toki/z_door_toki.c @@ -5,6 +5,10 @@ */ #include "z_door_toki.h" + +#include "ichain.h" +#include "z64play.h" + #include "assets/objects/object_toki_objects/object_toki_objects.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Door_Toki/z_door_toki.h b/src/overlays/actors/ovl_Door_Toki/z_door_toki.h index 35d4d4f91c..8e276c56bd 100644 --- a/src/overlays/actors/ovl_Door_Toki/z_door_toki.h +++ b/src/overlays/actors/ovl_Door_Toki/z_door_toki.h @@ -2,7 +2,7 @@ #define Z_DOOR_TOKI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct DoorToki; diff --git a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c index ae7c4a807a..46d5fa68d7 100644 --- a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c +++ b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c @@ -1,4 +1,15 @@ #include "z_efc_erupc.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "sfx.h" +#include "sequence.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" + #include "assets/objects/object_efc_erupc/object_efc_erupc.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.h b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.h index 6d14c32d76..888d9580ef 100644 --- a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.h +++ b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.h @@ -2,11 +2,11 @@ #define Z_EFC_ERUPC_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EfcErupc; -typedef void (*EfcErupcActionFunc)(struct EfcErupc*, PlayState*); +typedef void (*EfcErupcActionFunc)(struct EfcErupc*, struct PlayState*); #define EFC_ERUPC_EFFECT_COUNT 100 diff --git a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c index f23a974a32..e8f9f26841 100644 --- a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c +++ b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c @@ -5,6 +5,18 @@ */ #include "z_eff_dust.h" + +#include "libc64/malloc.h" +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "segmented_address.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.h b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.h index e77a8e0223..153b6d4e2a 100644 --- a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.h +++ b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.h @@ -2,12 +2,12 @@ #define Z_EFF_DUST_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EffDust; -typedef void (*EffDustActionFunc)(struct EffDust*, PlayState*); -typedef void (*EffDustDrawFunc)(Actor*, PlayState*); +typedef void (*EffDustActionFunc)(struct EffDust*, struct PlayState*); +typedef void (*EffDustDrawFunc)(Actor*, struct PlayState*); typedef struct EffDust { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c index 0f0edc34e5..562eef8a42 100644 --- a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c +++ b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c @@ -5,7 +5,15 @@ */ #include "z_elf_msg2.h" + +#include "libu64/debug.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "regs.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z64play.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.h b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.h index 802769f2b7..5a0a693415 100644 --- a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.h +++ b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.h @@ -2,11 +2,11 @@ #define Z_ELF_MSG2_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ElfMsg2; -typedef void (*ElfMsg2ActionFunc)(struct ElfMsg2*, PlayState*); +typedef void (*ElfMsg2ActionFunc)(struct ElfMsg2*, struct PlayState*); typedef struct ElfMsg2 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/src/overlays/actors/ovl_En_Ani/z_en_ani.c index 242afc095f..74cc512104 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c @@ -5,6 +5,18 @@ */ #include "z_en_ani.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" + +#include "global.h" + #include "assets/objects/object_ani/object_ani.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.h b/src/overlays/actors/ovl_En_Ani/z_en_ani.h index 99bad6e1cc..454a7bd8d2 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.h +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.h @@ -2,11 +2,11 @@ #define Z_EN_ANI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnAni; -typedef void (*EnAniActionFunc)(struct EnAni*, PlayState*); +typedef void (*EnAniActionFunc)(struct EnAni*, struct PlayState*); typedef struct EnAni { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c index 9e408a3350..3bb23a85ae 100644 --- a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c +++ b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c @@ -5,6 +5,19 @@ */ #include "z_en_anubice_fire.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_anubice/object_anubice.h" diff --git a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.h b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.h index 8119efa7a5..0cafde4391 100644 --- a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.h +++ b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.h @@ -2,11 +2,11 @@ #define Z_EN_ANUBICE_FIRE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnAnubiceFire; -typedef void (*EnAnubiceFireActionFunc)(struct EnAnubiceFire*, PlayState*); +typedef void (*EnAnubiceFireActionFunc)(struct EnAnubiceFire*, struct PlayState*); typedef struct EnAnubiceFire { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c b/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c index d44d380430..d4de5191ef 100644 --- a/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c +++ b/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c @@ -6,6 +6,9 @@ #include "z_en_arow_trap.h" #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" + +#include "z64play.h" + #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED void EnArowTrap_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.h b/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.h index e29f84d2b2..ba91505088 100644 --- a/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.h +++ b/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.h @@ -2,8 +2,7 @@ #define Z_EN_AROW_TRAP_H #include "ultra64.h" -#include "global.h" -#include "z64.h" +#include "z64actor.h" struct EnArowTrap; diff --git a/src/overlays/actors/ovl_En_Ba/z_en_ba.c b/src/overlays/actors/ovl_En_Ba/z_en_ba.c index 829fe5b34d..ddbaf4785c 100644 --- a/src/overlays/actors/ovl_En_Ba/z_en_ba.c +++ b/src/overlays/actors/ovl_En_Ba/z_en_ba.c @@ -5,6 +5,20 @@ */ #include "z_en_ba.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rand.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_math.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_bxa/object_bxa.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Ba/z_en_ba.h b/src/overlays/actors/ovl_En_Ba/z_en_ba.h index 35f383726e..dc3b8cb3f6 100644 --- a/src/overlays/actors/ovl_En_Ba/z_en_ba.h +++ b/src/overlays/actors/ovl_En_Ba/z_en_ba.h @@ -2,11 +2,11 @@ #define Z_EN_BA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnBa; -typedef void (*EnBaActionFunc)(struct EnBa*, PlayState*); +typedef void (*EnBaActionFunc)(struct EnBa*, struct PlayState*); typedef enum EnBaType { /* 0x00 */ EN_BA_TENTACLE_RED, diff --git a/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c b/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c index 58fcf61505..d5c951d346 100644 --- a/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c +++ b/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c @@ -5,6 +5,19 @@ */ #include "z_en_bdfire.h" +#include "overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64light.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_kingdodongo/object_kingdodongo.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.h b/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.h index 93b37e3b1a..876a790d71 100644 --- a/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.h +++ b/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.h @@ -2,13 +2,13 @@ #define Z_EN_BDFIRE_H #include "ultra64.h" -#include "global.h" -#include "overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.h" +#include "z64actor.h" +#include "z64light.h" struct EnBdfire; -typedef void (*EnBdfireActionFunc)(struct EnBdfire*, PlayState*); -typedef void (*EnBdfireDrawFunc)(struct EnBdfire*, PlayState*); +typedef void (*EnBdfireActionFunc)(struct EnBdfire*, struct PlayState*); +typedef void (*EnBdfireDrawFunc)(struct EnBdfire*, struct PlayState*); typedef struct EnBdfire { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Bird/z_en_bird.c b/src/overlays/actors/ovl_En_Bird/z_en_bird.c index 6ca50edeeb..c93d682ee1 100644 --- a/src/overlays/actors/ovl_En_Bird/z_en_bird.c +++ b/src/overlays/actors/ovl_En_Bird/z_en_bird.c @@ -5,6 +5,11 @@ */ #include "z_en_bird.h" + +#include "ichain.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_bird/object_bird.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_En_Bird/z_en_bird.h b/src/overlays/actors/ovl_En_Bird/z_en_bird.h index 1cc9858b13..beaf60a3d4 100644 --- a/src/overlays/actors/ovl_En_Bird/z_en_bird.h +++ b/src/overlays/actors/ovl_En_Bird/z_en_bird.h @@ -2,11 +2,11 @@ #define Z_EN_BIRD_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnBird; -typedef void (*EnBirdActionFunc)(struct EnBird*, PlayState*); +typedef void (*EnBirdActionFunc)(struct EnBird*, struct PlayState*); typedef struct EnBird { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c index 2e1141ffea..1d8d606cf3 100644 --- a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c +++ b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c @@ -5,6 +5,14 @@ */ #include "z_en_blkobj.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sys_matrix.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_blkobj/object_blkobj.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.h b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.h index 4218c64664..babddb4e5d 100644 --- a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.h +++ b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.h @@ -2,11 +2,11 @@ #define Z_EN_BLKOBJ_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnBlkobj; -typedef void (*EnBlkobjActionFunc)(struct EnBlkobj*, PlayState*); +typedef void (*EnBlkobjActionFunc)(struct EnBlkobj*, struct PlayState*); typedef struct EnBlkobj { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_En_Brob/z_en_brob.c b/src/overlays/actors/ovl_En_Brob/z_en_brob.c index 89edf9c5f6..436f4740c5 100644 --- a/src/overlays/actors/ovl_En_Brob/z_en_brob.c +++ b/src/overlays/actors/ovl_En_Brob/z_en_brob.c @@ -5,6 +5,15 @@ */ #include "z_en_brob.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/object_brob/object_brob.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) diff --git a/src/overlays/actors/ovl_En_Brob/z_en_brob.h b/src/overlays/actors/ovl_En_Brob/z_en_brob.h index a3dd0c8f8a..02516f4e9b 100644 --- a/src/overlays/actors/ovl_En_Brob/z_en_brob.h +++ b/src/overlays/actors/ovl_En_Brob/z_en_brob.h @@ -2,11 +2,11 @@ #define Z_EN_BROB_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnBrob; -typedef void (*EnBrobActionFunc)(struct EnBrob* this, PlayState* play); +typedef void (*EnBrobActionFunc)(struct EnBrob* this, struct PlayState* play); typedef struct EnBrob { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_En_Butte/z_en_butte.c b/src/overlays/actors/ovl_En_Butte/z_en_butte.c index 3d721c28ff..cd9776b988 100644 --- a/src/overlays/actors/ovl_En_Butte/z_en_butte.c +++ b/src/overlays/actors/ovl_En_Butte/z_en_butte.c @@ -6,6 +6,19 @@ #include "z_en_butte.h" #include "overlays/actors/ovl_En_Elf/z_en_elf.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_math3d.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/gameplay_field_keep/gameplay_field_keep.h" diff --git a/src/overlays/actors/ovl_En_Butte/z_en_butte.h b/src/overlays/actors/ovl_En_Butte/z_en_butte.h index 345a41dc11..1a1764520c 100644 --- a/src/overlays/actors/ovl_En_Butte/z_en_butte.h +++ b/src/overlays/actors/ovl_En_Butte/z_en_butte.h @@ -2,11 +2,11 @@ #define Z_EN_BUTTE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnButte; -typedef void (*EnButteActionFunc)(struct EnButte*, PlayState*); +typedef void (*EnButteActionFunc)(struct EnButte*, struct PlayState*); typedef struct EnButte { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Bx/z_en_bx.c b/src/overlays/actors/ovl_En_Bx/z_en_bx.c index efc4d4f5cf..51896cbb7d 100644 --- a/src/overlays/actors/ovl_En_Bx/z_en_bx.c +++ b/src/overlays/actors/ovl_En_Bx/z_en_bx.c @@ -5,6 +5,19 @@ */ #include "z_en_bx.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rand.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_bxa/object_bxa.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Bx/z_en_bx.h b/src/overlays/actors/ovl_En_Bx/z_en_bx.h index 189349a0f1..077def413d 100644 --- a/src/overlays/actors/ovl_En_Bx/z_en_bx.h +++ b/src/overlays/actors/ovl_En_Bx/z_en_bx.h @@ -2,7 +2,7 @@ #define Z_EN_BX_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnBx; diff --git a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c index c6cf2c7ad3..619630cf7b 100644 --- a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c +++ b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c @@ -1,5 +1,17 @@ #include "z_en_clear_tag.h" +#include "libc64/math64.h" +#include "libc64/qrand.h" +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \ ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h index 945a5462d6..6978941868 100644 --- a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h +++ b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h @@ -2,7 +2,7 @@ #define Z_EN_CLEAR_TAG_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnClearTag; diff --git a/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/src/overlays/actors/ovl_En_Cow/z_en_cow.c index 30d16077f5..be0438ce77 100644 --- a/src/overlays/actors/ovl_En_Cow/z_en_cow.c +++ b/src/overlays/actors/ovl_En_Cow/z_en_cow.c @@ -6,6 +6,17 @@ #include "z_en_cow.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "regs.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64ocarina.h" +#include "z64play.h" +#include "z64player.h" + #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) void EnCow_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Cow/z_en_cow.h b/src/overlays/actors/ovl_En_Cow/z_en_cow.h index cdec79fca8..e5602967e1 100644 --- a/src/overlays/actors/ovl_En_Cow/z_en_cow.h +++ b/src/overlays/actors/ovl_En_Cow/z_en_cow.h @@ -2,7 +2,7 @@ #define Z_EN_COW_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" #include "assets/objects/object_cow/object_cow.h" #define COW_FLAG_PLAYER_NEARBY (1 << 1) @@ -23,7 +23,7 @@ typedef enum CowCollider { struct EnCow; -typedef void (*EnCowActionFunc)(struct EnCow*, PlayState*); +typedef void (*EnCowActionFunc)(struct EnCow*, struct PlayState*); typedef struct EnCow { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Cs/z_en_cs.c b/src/overlays/actors/ovl_En_Cs/z_en_cs.c index 807abac5ec..b4f01197d4 100644 --- a/src/overlays/actors/ovl_En_Cs/z_en_cs.c +++ b/src/overlays/actors/ovl_En_Cs/z_en_cs.c @@ -1,4 +1,18 @@ #include "z_en_cs.h" + +#include "libc64/math64.h" +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h"s +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_cs/object_cs.h" #include "assets/objects/object_link_child/object_link_child.h" diff --git a/src/overlays/actors/ovl_En_Cs/z_en_cs.h b/src/overlays/actors/ovl_En_Cs/z_en_cs.h index 843c8ad510..8e1d665f54 100644 --- a/src/overlays/actors/ovl_En_Cs/z_en_cs.h +++ b/src/overlays/actors/ovl_En_Cs/z_en_cs.h @@ -2,11 +2,11 @@ #define Z_EN_CS_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnCs; -typedef void (*EnCsActionFunc)(struct EnCs*, PlayState*); +typedef void (*EnCsActionFunc)(struct EnCs*, struct PlayState*); typedef struct EnCs { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index 9cd69ab649..20b927ec46 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -1,5 +1,21 @@ #include "z_en_daiku.h" #include "overlays/actors/ovl_En_GeldB/z_en_geldb.h" + +#include "libc64/math64.h" +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_daiku/object_daiku.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.h b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.h index 69136f6a92..b191c1d79f 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.h +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.h @@ -2,11 +2,11 @@ #define Z_EN_DAIKU_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnDaiku; -typedef void (*EnDaikuActionFunc)(struct EnDaiku*, PlayState*); +typedef void (*EnDaikuActionFunc)(struct EnDaiku*, struct PlayState*); typedef enum EnDaikuType { ENDAIKU_TYPE0, diff --git a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c index 982de2b697..3071006ba9 100644 --- a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c +++ b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c @@ -5,6 +5,20 @@ */ #include "z_en_daiku_kakariko.h" + +#include "libc64/math64.h" +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_daiku/object_daiku.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.h b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.h index 5d3596d58f..1395b6e259 100644 --- a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.h +++ b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.h @@ -2,11 +2,11 @@ #define Z_EN_DAIKU_KAKARIKO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnDaikuKakariko; -typedef void (*EnDaikuKakarikoActionFunc)(struct EnDaikuKakariko*, PlayState*); +typedef void (*EnDaikuKakarikoActionFunc)(struct EnDaikuKakariko*, struct PlayState*); typedef struct EnDaikuKakariko { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index 49b8c83ba3..b86280fad0 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -5,6 +5,15 @@ */ #include "z_en_dog.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64play.h" + +#include "global.h" + #include "assets/objects/object_dog/object_dog.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.h b/src/overlays/actors/ovl_En_Dog/z_en_dog.h index dec2b5c180..c3cdfd913b 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.h +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.h @@ -2,18 +2,18 @@ #define Z_EN_DOG_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnDog; -typedef void (*EnDogActionFunc)(struct EnDog*, PlayState*); +typedef void (*EnDogActionFunc)(struct EnDog*, struct PlayState*); typedef struct EnDog { /* 0x0000 */ Actor actor; /* 0x014C */ SkelAnime skelAnime; /* 0x0190 */ EnDogActionFunc actionFunc; /* 0x0194 */ ColliderCylinder collider; - /* 0x01E0 */ Path* path; + /* 0x01E0 */ struct Path* path; /* 0x01E4 */ u8 reverse; /* 0x01E6 */ s16 waypoint; /* 0x01E8 */ s16 unusedAngle; diff --git a/src/overlays/actors/ovl_En_Ds/z_en_ds.c b/src/overlays/actors/ovl_En_Ds/z_en_ds.c index c76713a756..662f7b3858 100644 --- a/src/overlays/actors/ovl_En_Ds/z_en_ds.c +++ b/src/overlays/actors/ovl_En_Ds/z_en_ds.c @@ -5,6 +5,15 @@ */ #include "z_en_ds.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_ds/object_ds.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Ds/z_en_ds.h b/src/overlays/actors/ovl_En_Ds/z_en_ds.h index 8f10ce8285..9c7df969c6 100644 --- a/src/overlays/actors/ovl_En_Ds/z_en_ds.h +++ b/src/overlays/actors/ovl_En_Ds/z_en_ds.h @@ -2,11 +2,11 @@ #define Z_EN_DS_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnDs; -typedef void (*EnDsActionFunc)(struct EnDs*, PlayState*); +typedef void (*EnDsActionFunc)(struct EnDs*, struct PlayState*); typedef struct EnDs { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c index f77bec5a85..a4addc76c1 100644 --- a/src/overlays/actors/ovl_En_Du/z_en_du.c +++ b/src/overlays/actors/ovl_En_Du/z_en_du.c @@ -1,4 +1,19 @@ #include "z_en_du.h" + +#include "gfx.h" +#include "one_point_cutscene.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64ocarina.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_du/object_du.h" #include "assets/scenes/overworld/spot18/spot18_scene.h" diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.h b/src/overlays/actors/ovl_En_Du/z_en_du.h index 541b4368e8..9e3ecb8805 100644 --- a/src/overlays/actors/ovl_En_Du/z_en_du.h +++ b/src/overlays/actors/ovl_En_Du/z_en_du.h @@ -2,11 +2,11 @@ #define Z_EN_DU_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnDu; -typedef void (*EnDuActionFunc)(struct EnDu*, PlayState*); +typedef void (*EnDuActionFunc)(struct EnDu*, struct PlayState*); typedef struct EnDu { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Eg/z_en_eg.c b/src/overlays/actors/ovl_En_Eg/z_en_eg.c index c646cdf249..cebab64506 100644 --- a/src/overlays/actors/ovl_En_Eg/z_en_eg.c +++ b/src/overlays/actors/ovl_En_Eg/z_en_eg.c @@ -5,7 +5,14 @@ */ #include "z_en_eg.h" + +#include "regs.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sfx.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Eg/z_en_eg.h b/src/overlays/actors/ovl_En_Eg/z_en_eg.h index ad02d8a6b7..c42994f61c 100644 --- a/src/overlays/actors/ovl_En_Eg/z_en_eg.h +++ b/src/overlays/actors/ovl_En_Eg/z_en_eg.h @@ -2,11 +2,11 @@ #define Z_EN_EG_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnEg; -typedef void (*EnEgActionFunc)(struct EnEg*, PlayState*); +typedef void (*EnEgActionFunc)(struct EnEg*, struct PlayState*); typedef struct EnEg { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Fd/z_en_fd.c b/src/overlays/actors/ovl_En_Fd/z_en_fd.c index 8f6bb89253..26848dd956 100644 --- a/src/overlays/actors/ovl_En_Fd/z_en_fd.c +++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.c @@ -5,7 +5,21 @@ */ #include "z_en_fd.h" + +#include "libc64/math64.h" +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" #include "versions.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_fw/object_fw.h" diff --git a/src/overlays/actors/ovl_En_Fd/z_en_fd.h b/src/overlays/actors/ovl_En_Fd/z_en_fd.h index e68ac87880..3fc40a54cf 100644 --- a/src/overlays/actors/ovl_En_Fd/z_en_fd.h +++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.h @@ -2,11 +2,11 @@ #define Z_EN_FD_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnFd; -typedef void (*EnFdActionFunc)(struct EnFd* this, PlayState* play); +typedef void (*EnFdActionFunc)(struct EnFd* this, struct PlayState* play); typedef enum FDEffectType { FD_EFFECT_NONE, diff --git a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c index d408b7b9ac..815d8c654d 100644 --- a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c +++ b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c @@ -1,4 +1,13 @@ #include "z_en_fd_fire.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.h b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.h index 414fdf997a..d027a07972 100644 --- a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.h +++ b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.h @@ -2,11 +2,11 @@ #define Z_EN_FD_FIRE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnFdFire; -typedef void (*EnFdFireActionFunc)(struct EnFdFire* this, PlayState* play); +typedef void (*EnFdFireActionFunc)(struct EnFdFire* this, struct PlayState* play); typedef struct EnFdFire { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c index aa3f190cee..5c619e6e48 100644 --- a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c +++ b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c @@ -5,12 +5,30 @@ */ #include "z_en_fhg_fire.h" -#include "assets/objects/object_fhg/object_fhg.h" -#include "assets/objects/gameplay_keep/gameplay_keep.h" #include "overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h" #include "overlays/actors/ovl_En_fHG/z_en_fhg.h" #include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h" +#include "libc64/math64.h" +#include "libc64/qrand.h" +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "rumble.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + +#include "assets/objects/gameplay_keep/gameplay_keep.h" +#include "assets/objects/object_fhg/object_fhg.h" + #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) typedef enum StrikeMode { diff --git a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h index ac2682aaf1..59136f7dfd 100644 --- a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h +++ b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h @@ -2,11 +2,12 @@ #define Z_EN_FHG_FIRE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64light.h" struct EnFhgFire; -typedef void (*EnFhgFireUpdateFunc)(struct EnFhgFire*, PlayState*); +typedef void (*EnFhgFireUpdateFunc)(struct EnFhgFire*, struct PlayState*); typedef enum FhgFireParam { /* 1 */ FHGFIRE_LIGHTNING_STRIKE = 1, diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/src/overlays/actors/ovl_En_Fu/z_en_fu.c index 8069e6cb26..71c392851f 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -5,6 +5,19 @@ */ #include "z_en_fu.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64ocarina.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_fu/object_fu.h" #include "assets/scenes/indoors/hakasitarelay/hakasitarelay_scene.h" diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.h b/src/overlays/actors/ovl_En_Fu/z_en_fu.h index dbbcacfc54..af90b2cf05 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.h +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.h @@ -2,11 +2,11 @@ #define Z_EN_FU_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnFu; -typedef void (*EnFuActionFunc)(struct EnFu*, PlayState*); +typedef void (*EnFuActionFunc)(struct EnFu*, struct PlayState*); typedef enum EnFuLimb { /* 0x00 */ FU_LIMB_ROOT, diff --git a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c index d64111fb9d..30f18393a0 100644 --- a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c +++ b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c @@ -5,6 +5,12 @@ */ #include "z_en_ganon_organ.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sys_matrix.h" +#include "z64play.h" + #include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.h b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.h index 0c301bddca..8d20bee4d3 100644 --- a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.h +++ b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.h @@ -2,7 +2,7 @@ #define Z_EN_GANON_ORGAN_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnGanonOrgan; diff --git a/src/overlays/actors/ovl_En_Gb/z_en_gb.c b/src/overlays/actors/ovl_En_Gb/z_en_gb.c index 388a11cc30..3a2f8d2711 100644 --- a/src/overlays/actors/ovl_En_Gb/z_en_gb.c +++ b/src/overlays/actors/ovl_En_Gb/z_en_gb.c @@ -5,6 +5,20 @@ */ #include "z_en_gb.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rand.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64light.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_ps/object_ps.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Gb/z_en_gb.h b/src/overlays/actors/ovl_En_Gb/z_en_gb.h index 4005075c4c..24b7d30560 100644 --- a/src/overlays/actors/ovl_En_Gb/z_en_gb.h +++ b/src/overlays/actors/ovl_En_Gb/z_en_gb.h @@ -2,11 +2,12 @@ #define Z_EN_GB_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64light.h" struct EnGb; -typedef void (*EnGbActionFunc)(struct EnGb*, PlayState*); +typedef void (*EnGbActionFunc)(struct EnGb*, struct PlayState*); typedef struct EnGbCagedSoulInfo { /* 0x00 */ Color_RGBA8 prim; diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index 8082c7d87c..0345bfbac6 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -5,8 +5,21 @@ */ #include "z_en_ge1.h" -#include "z64horse.h" + +#include "libu64/debug.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64horse.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_ge1/object_ge1.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.h b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.h index 7fb1692f62..6aaaf2ab37 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.h +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.h @@ -2,12 +2,12 @@ #define Z_EN_GE1_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnGe1; typedef void (*EnGe1AnimFunc)(struct EnGe1*); -typedef void (*EnGe1ActionFunc)(struct EnGe1*, PlayState*); +typedef void (*EnGe1ActionFunc)(struct EnGe1*, struct PlayState*); typedef enum EnGe1Type { /* 0x00 */ GE1_TYPE_GATE_GUARD, diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index 0df133fe4f..b460fe5753 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -5,8 +5,19 @@ */ #include "z_en_ge2.h" -#include "z64horse.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64horse.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_gla/object_gla.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.h b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.h index 7c78ad91a6..b453531040 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.h +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.h @@ -2,11 +2,11 @@ #define Z_EN_GE2_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnGe2; -typedef void (*EnGe2ActionFunc)(struct EnGe2*, PlayState*); +typedef void (*EnGe2ActionFunc)(struct EnGe2*, struct PlayState*); typedef struct EnGe2 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c index 614936d3bc..c07dbc101f 100644 --- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c +++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c @@ -5,8 +5,18 @@ */ #include "z_en_ge3.h" -#include "assets/objects/object_geldb/object_geldb.h" + +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sys_matrix.h" #include "versions.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "assets/objects/object_geldb/object_geldb.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.h b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.h index 4bb5c7b3fc..d767ba6d9a 100644 --- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.h +++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.h @@ -2,12 +2,12 @@ #define Z_EN_GE3_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" #include "overlays/actors/ovl_En_GeldB/z_en_geldb.h" struct EnGe3; -typedef void (*EnGe3ActionFunc)(struct EnGe3*, PlayState*); +typedef void (*EnGe3ActionFunc)(struct EnGe3*, struct PlayState*); typedef struct EnGe3 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/src/overlays/actors/ovl_En_Gm/z_en_gm.c index 3ed42e5119..0a85fc37c2 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -5,9 +5,20 @@ */ #include "z_en_gm.h" + +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rand.h" +#include "segmented_address.h" +#include "sys_matrix.h" +#include "terminal.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_oF1d_map/object_oF1d_map.h" #include "assets/objects/object_gm/object_gm.h" -#include "terminal.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.h b/src/overlays/actors/ovl_En_Gm/z_en_gm.h index 3cfedca015..d5234bde14 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.h +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.h @@ -2,12 +2,12 @@ #define Z_EN_GM_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnGm; -typedef void (*EnGmUpdateFunc)(struct EnGm*, PlayState*); -typedef void (*EnGmActionFunc)(struct EnGm*, PlayState*); +typedef void (*EnGmUpdateFunc)(struct EnGm*, struct PlayState*); +typedef void (*EnGmActionFunc)(struct EnGm*, struct PlayState*); typedef struct EnGm { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c index 7a50157de5..20c3cb0782 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -1,5 +1,19 @@ #include "z_en_go.h" #include "overlays/actors/ovl_En_Bom/z_en_bom.h" + +#include "libc64/math64.h" +#include "libc64/qrand.h" +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "one_point_cutscene.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_oF1d_map/object_oF1d_map.h" diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.h b/src/overlays/actors/ovl_En_Go/z_en_go.h index bd673c9521..691472aef6 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.h +++ b/src/overlays/actors/ovl_En_Go/z_en_go.h @@ -2,13 +2,13 @@ #define Z_EN_GO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnGo; -typedef void (*EnGoActionFunc)(struct EnGo*, PlayState*); -typedef u16 (*callback1_80A3ED24)(PlayState*, struct EnGo*); -typedef s16 (*callback2_80A3ED24)(PlayState*, struct EnGo*); +typedef void (*EnGoActionFunc)(struct EnGo*, struct PlayState*); +typedef u16 (*callback1_80A3ED24)(struct PlayState*, struct EnGo*); +typedef s16 (*callback2_80A3ED24)(struct PlayState*, struct EnGo*); // WIP type docs // /* 0x00 */ GORON1_CITY_LINK, diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c index 50680850d0..c66cf7b849 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -1,9 +1,26 @@ #include "z_en_go2.h" #include "overlays/actors/ovl_En_Bom/z_en_bom.h" + +#include "libc64/qrand.h" +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "one_point_cutscene.h" +#include "quake.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "versions.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_oF1d_map/object_oF1d_map.h" -#include "quake.h" -#include "versions.h" #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \ diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.h b/src/overlays/actors/ovl_En_Go2/z_en_go2.h index 6fb6229355..0c49a30363 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.h +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.h @@ -2,12 +2,12 @@ #define Z_EN_GO2_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" #include "overlays/actors/ovl_En_Go/z_en_go.h" struct EnGo2; -typedef void (*EnGo2ActionFunc)(struct EnGo2*, PlayState*); +typedef void (*EnGo2ActionFunc)(struct EnGo2*, struct PlayState*); typedef enum GoronType { /* 0x00 */ GORON_CITY_ROLLING_BIG, @@ -73,7 +73,7 @@ typedef struct EnGo2 { /* 0x0190 */ EnGo2ActionFunc actionFunc; /* 0x0194 */ NpcInteractInfo interactInfo; /* 0x01BC */ ColliderCylinder collider; - /* 0x0208 */ Path* path; + /* 0x0208 */ struct Path* path; /* 0x020C */ u8 unk_20C; // counter for GORON_CITY_LINK animation /* 0x020D */ u8 dialogState; /* 0x020E */ u8 reverse; diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c index 944add8533..bf25b3bc5d 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -6,10 +6,23 @@ #include "z_en_goroiwa.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" + +#include "libc64/qrand.h" +#include "ichain.h" +#include "quake.h" +#include "regs.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_math3d.h" +#include "sys_matrix.h" +#include "terminal.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_goroiwa/object_goroiwa.h" -#include "quake.h" -#include "terminal.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.h b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.h index 311ee5f94d..26a5810a2d 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.h +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.h @@ -2,11 +2,11 @@ #define Z_EN_GOROIWA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnGoroiwa; -typedef void (*EnGoroiwaActionFunc)(struct EnGoroiwa*, PlayState*); +typedef void (*EnGoroiwaActionFunc)(struct EnGoroiwa*, struct PlayState*); typedef struct EnGoroiwa { /* 0x0000 */ Actor actor; 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 46d470c330..2e9c354579 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -5,9 +5,25 @@ */ #include "z_en_gs.h" -#include "assets/objects/object_gs/object_gs.h" #include "overlays/actors/ovl_En_Elf/z_en_elf.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rand.h" +#include "regs.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64ocarina.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" +#include "assets/objects/object_gs/object_gs.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_DURING_OCARINA) diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.h b/src/overlays/actors/ovl_En_Gs/z_en_gs.h index 47edd278db..d7abdc676f 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.h +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.h @@ -2,11 +2,11 @@ #define Z_EN_GS_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnGs; -typedef void (*EnGsActionFunc)(struct EnGs*, PlayState*); +typedef void (*EnGsActionFunc)(struct EnGs*, struct PlayState*); typedef struct EnGs { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Guest/z_en_guest.c b/src/overlays/actors/ovl_En_Guest/z_en_guest.c index 5c0a14f9d0..09fec8ccfc 100644 --- a/src/overlays/actors/ovl_En_Guest/z_en_guest.c +++ b/src/overlays/actors/ovl_En_Guest/z_en_guest.c @@ -5,9 +5,20 @@ */ #include "z_en_guest.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rand.h" +#include "segmented_address.h" +#include "sys_matrix.h" +#include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_os_anime/object_os_anime.h" #include "assets/objects/object_boj/object_boj.h" -#include "terminal.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Guest/z_en_guest.h b/src/overlays/actors/ovl_En_Guest/z_en_guest.h index 2130ebc74e..92dbc72d5c 100644 --- a/src/overlays/actors/ovl_En_Guest/z_en_guest.h +++ b/src/overlays/actors/ovl_En_Guest/z_en_guest.h @@ -2,11 +2,11 @@ #define Z_EN_GUEST_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnGuest; -typedef void (*EnGuestActionFunc)(struct EnGuest* this, PlayState* play); +typedef void (*EnGuestActionFunc)(struct EnGuest* this, struct PlayState* play); typedef struct EnGuest { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Hata/z_en_hata.c b/src/overlays/actors/ovl_En_Hata/z_en_hata.c index 6cdb51f59b..27cd1341ce 100644 --- a/src/overlays/actors/ovl_En_Hata/z_en_hata.c +++ b/src/overlays/actors/ovl_En_Hata/z_en_hata.c @@ -5,6 +5,15 @@ */ #include "z_en_hata.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_hata/object_hata.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_En_Hata/z_en_hata.h b/src/overlays/actors/ovl_En_Hata/z_en_hata.h index e098bcaab3..82f6ba1a8b 100644 --- a/src/overlays/actors/ovl_En_Hata/z_en_hata.h +++ b/src/overlays/actors/ovl_En_Hata/z_en_hata.h @@ -2,7 +2,7 @@ #define Z_EN_HATA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" typedef enum EnHataLimb { diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index b31974f3b3..de71e48682 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -4,13 +4,25 @@ * Description: Hyrulian Guards */ -#include "terminal.h" #include "z_en_heishi2.h" +#include "overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.h" +#include "overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h" +#include "overlays/actors/ovl_En_Bom/z_en_bom.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_sd/object_sd.h" #include "assets/objects/object_link_child/object_link_child.h" -#include "overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.h" -#include "overlays/actors/ovl_En_Bom/z_en_bom.h" -#include "overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h index b4f6ea5e7b..3753012bee 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.h @@ -2,12 +2,12 @@ #define Z_EN_HEISHI2_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnHeishi2; -typedef void (*EnHeishi2ActionFunc)(struct EnHeishi2*, PlayState*); +typedef void (*EnHeishi2ActionFunc)(struct EnHeishi2*, struct PlayState*); typedef struct EnHeishi2 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c index 8a10e8f96e..76031fb746 100644 --- a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c +++ b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c @@ -5,9 +5,17 @@ */ #include "z_en_heishi3.h" -#include "assets/objects/object_sd/object_sd.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" #include "terminal.h" #include "versions.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "assets/objects/object_sd/object_sd.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.h b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.h index 63b4311393..57eb11c61c 100644 --- a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.h +++ b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.h @@ -2,11 +2,11 @@ #define Z_EN_HEISHI3_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnHeishi3; -typedef void (*EnHeishi3ActionFunc)(struct EnHeishi3*, PlayState*); +typedef void (*EnHeishi3ActionFunc)(struct EnHeishi3*, struct PlayState*); typedef struct EnHeishi3 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c index 51588714c8..fd9498982f 100644 --- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c +++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c @@ -1,6 +1,14 @@ #include "z_en_heishi4.h" -#include "assets/objects/object_sd/object_sd.h" + +#include "gfx.h" +#include "gfx_setupdl.h" #include "terminal.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + +#include "assets/objects/object_sd/object_sd.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h index 48e09ca458..9ab928fe3e 100644 --- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h +++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h @@ -2,7 +2,7 @@ #define Z_EN_HEISHI4_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" typedef enum Heishi4Type { /* 0x00 */ HEISHI4_AT_KAKARIKO_ENTRANCE, @@ -13,7 +13,7 @@ typedef enum Heishi4Type { struct EnHeishi4; -typedef void (*EnHeishi4ActionFunc)(struct EnHeishi4*, PlayState*); +typedef void (*EnHeishi4ActionFunc)(struct EnHeishi4*, struct PlayState*); typedef struct EnHeishi4 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c index 541e8b8519..94db22bdbe 100644 --- a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c +++ b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c @@ -5,6 +5,13 @@ */ #include "z_en_hintnuts.h" + +#include "ichain.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_hintnuts/object_hintnuts.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) diff --git a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.h b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.h index fcc0201659..a24b387fe1 100644 --- a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.h +++ b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.h @@ -2,11 +2,11 @@ #define Z_EN_HINTNUTS_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnHintnuts; -typedef void (*EnHintnutsActionFunc)(struct EnHintnuts*, PlayState*); +typedef void (*EnHintnutsActionFunc)(struct EnHintnuts*, struct PlayState*); typedef struct EnHintnuts { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Holl/z_en_holl.c b/src/overlays/actors/ovl_En_Holl/z_en_holl.c index c17ff7e58f..d75585e91d 100644 --- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c +++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c @@ -1,5 +1,15 @@ #include "z_en_holl.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED /* diff --git a/src/overlays/actors/ovl_En_Holl/z_en_holl.h b/src/overlays/actors/ovl_En_Holl/z_en_holl.h index 2c87dc346b..4a9409373a 100644 --- a/src/overlays/actors/ovl_En_Holl/z_en_holl.h +++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.h @@ -2,7 +2,7 @@ #define Z_EN_HOLL_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" #define ENHOLL_GET_TYPE(thisx) PARAMS_GET_U((thisx)->params, 6, 3) #define ENHOLL_GET_SWITCH_FLAG(thisx) PARAMS_GET_U((thisx)->params, 0, 6) @@ -35,7 +35,7 @@ typedef enum EnHollType { struct EnHoll; -typedef void (*EnHollActionFunc)(struct EnHoll*, PlayState*); +typedef void (*EnHollActionFunc)(struct EnHoll*, struct PlayState*); typedef struct EnHoll { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c index 9675ab1218..5d23213a52 100644 --- a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c +++ b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c @@ -6,8 +6,17 @@ #include "z_en_horse_game_check.h" #include "overlays/actors/ovl_En_Horse/z_en_horse.h" + #include "libu64/debug.h" #include "line_numbers.h" +#include "regs.h" +#include "sfx.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sys_math3d.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.h b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.h index 96834860e3..84ab117216 100644 --- a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.h +++ b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.h @@ -2,11 +2,11 @@ #define Z_EN_HORSE_GAME_CHECK_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnHorseGameCheckBase; -typedef s32 (*EnHorseGameCheckFunc)(struct EnHorseGameCheckBase* this, PlayState* play); +typedef s32 (*EnHorseGameCheckFunc)(struct EnHorseGameCheckBase* this, struct PlayState* play); typedef struct EnHorseGameCheckBase { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c index 2d79d7b09a..8078eac3c1 100644 --- a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c +++ b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c @@ -5,6 +5,20 @@ */ #include "z_en_horse_ganon.h" + +#include "libc64/math64.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" +#include "sys_math3d.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" +#include "z64skin.h" + +#include "global.h" + #include "assets/objects/object_horse_ganon/object_horse_ganon.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.h b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.h index 7e4694e295..473f6cecb4 100644 --- a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.h +++ b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.h @@ -2,11 +2,12 @@ #define Z_EN_HORSE_GANON_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64skin.h" struct EnHorseGanon; -typedef void (*EnHorseGanonActionFunc)(struct EnHorseGanon*, PlayState*); +typedef void (*EnHorseGanonActionFunc)(struct EnHorseGanon*, struct PlayState*); typedef struct EnHorseGanon { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c index b186fc2958..08646b8a83 100644 --- a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c +++ b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c @@ -5,6 +5,23 @@ */ #include "z_en_horse_normal.h" + +#include "libc64/math64.h" +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "regs.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64skin.h" +#include "z64skin_matrix.h" + +#include "global.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_horse_normal/object_horse_normal.h" diff --git a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.h b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.h index d4cb165941..01ddd44608 100644 --- a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.h +++ b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.h @@ -2,11 +2,12 @@ #define Z_EN_HORSE_NORMAL_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64skin.h" struct EnHorseNormal; -typedef void (*EnHorseNormalActionFunc)(struct EnHorseNormal*, PlayState*); +typedef void (*EnHorseNormalActionFunc)(struct EnHorseNormal*, struct PlayState*); typedef struct EnHorseNormal { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c index bb4469ff1e..6e513ff5cb 100644 --- a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c +++ b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c @@ -5,6 +5,19 @@ */ #include "z_en_horse_zelda.h" + +#include "libc64/math64.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" +#include "sys_math3d.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_horse_zelda/object_horse_zelda.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h index db63df4032..86b851c77b 100644 --- a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h +++ b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.h @@ -2,11 +2,12 @@ #define Z_EN_HORSE_ZELDA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64skin.h" struct EnHorseZelda; -typedef void (*EnHorseZeldaActionFunc)(struct EnHorseZelda*, PlayState*); +typedef void (*EnHorseZeldaActionFunc)(struct EnHorseZelda*, struct PlayState*); typedef struct EnHorseZelda { /* 0x0000 */ Actor actor; 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 66d12bafb2..21d5113235 100644 --- a/src/overlays/actors/ovl_En_Hs/z_en_hs.c +++ b/src/overlays/actors/ovl_En_Hs/z_en_hs.c @@ -5,7 +5,16 @@ */ #include "z_en_hs.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_hs/object_hs.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Hs/z_en_hs.h b/src/overlays/actors/ovl_En_Hs/z_en_hs.h index f4b89ce153..f938b51518 100644 --- a/src/overlays/actors/ovl_En_Hs/z_en_hs.h +++ b/src/overlays/actors/ovl_En_Hs/z_en_hs.h @@ -2,11 +2,11 @@ #define Z_EN_HS_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnHs; -typedef void (*EnHsActionFunc)(struct EnHs*, PlayState*); +typedef void (*EnHsActionFunc)(struct EnHs*, struct PlayState*); typedef struct EnHs { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c index b1b04107f0..005e63258c 100644 --- a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c +++ b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c @@ -5,7 +5,16 @@ */ #include "z_en_hs2.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" + +#include "global.h" + #include "assets/objects/object_hs/object_hs.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.h b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.h index e2f66f79c3..dec1533f89 100644 --- a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.h +++ b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.h @@ -2,11 +2,11 @@ #define Z_EN_HS2_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnHs2; -typedef void (*EnHs2ActionFunc)(struct EnHs2*, PlayState*); +typedef void (*EnHs2ActionFunc)(struct EnHs2*, struct PlayState*); typedef struct EnHs2 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Hy/z_en_hy.c b/src/overlays/actors/ovl_En_Hy/z_en_hy.c index 2aa163d0fb..d7b4962c9f 100644 --- a/src/overlays/actors/ovl_En_Hy/z_en_hy.c +++ b/src/overlays/actors/ovl_En_Hy/z_en_hy.c @@ -5,7 +5,22 @@ */ #include "z_en_hy.h" + +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" #include "versions.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_aob/object_aob.h" #include "assets/objects/object_ahg/object_ahg.h" #include "assets/objects/object_bob/object_bob.h" diff --git a/src/overlays/actors/ovl_En_Hy/z_en_hy.h b/src/overlays/actors/ovl_En_Hy/z_en_hy.h index a5c04ed3ab..50bdc90933 100644 --- a/src/overlays/actors/ovl_En_Hy/z_en_hy.h +++ b/src/overlays/actors/ovl_En_Hy/z_en_hy.h @@ -2,7 +2,7 @@ #define Z_EN_HY_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" #define ENHY_GET_TYPE(thisx) PARAMS_GET_S((thisx)->params, 0, 7) #define ENHY_GET_PATH_INDEX(thisx) PARAMS_GET_S((thisx)->params, 7, 4) @@ -54,7 +54,7 @@ typedef enum EnHyLimb { struct EnHy; -typedef void (*EnHyActionFunc)(struct EnHy*, PlayState*); +typedef void (*EnHyActionFunc)(struct EnHy*, struct PlayState*); typedef struct EnHy { /* 0x0000 */ Actor actor; @@ -68,7 +68,7 @@ typedef struct EnHy { /* 0x0199 */ s8 objectSlotOsAnime; /* 0x019C */ ColliderCylinder collider; /* 0x01E8 */ NpcInteractInfo interactInfo; - /* 0x0210 */ Path* path; + /* 0x0210 */ struct Path* path; /* 0x0214 */ s8 waypoint; /* 0x0215 */ s8 playedSfx; /* 0x0216 */ char unk_216[2]; // unused diff --git a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c index a0fc6e7bde..1e0bbf5362 100644 --- a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c +++ b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c @@ -5,6 +5,18 @@ */ #include "z_en_ice_hono.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64light.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.h b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.h index e5ad5fd1cf..ea975199aa 100644 --- a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.h +++ b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.h @@ -2,11 +2,12 @@ #define Z_EN_ICE_HONO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64light.h" struct EnIceHono; -typedef void (*EnIceHonoActionFunc)(struct EnIceHono*, PlayState*); +typedef void (*EnIceHonoActionFunc)(struct EnIceHono*, struct PlayState*); typedef struct EnIceHono { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_It/z_en_it.c b/src/overlays/actors/ovl_En_It/z_en_it.c index 312ceec96e..975fe8411f 100644 --- a/src/overlays/actors/ovl_En_It/z_en_it.c +++ b/src/overlays/actors/ovl_En_It/z_en_it.c @@ -6,6 +6,8 @@ #include "z_en_it.h" +#include "z64play.h" + #define FLAGS 0 void EnIt_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_It/z_en_it.h b/src/overlays/actors/ovl_En_It/z_en_it.h index fb150fcb0d..9f1f794e4f 100644 --- a/src/overlays/actors/ovl_En_It/z_en_it.h +++ b/src/overlays/actors/ovl_En_It/z_en_it.h @@ -2,7 +2,7 @@ #define Z_EN_IT_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnIt; diff --git a/src/overlays/actors/ovl_En_Jj/z_en_jj.c b/src/overlays/actors/ovl_En_Jj/z_en_jj.c index a03c20c9ea..e6be5deb13 100644 --- a/src/overlays/actors/ovl_En_Jj/z_en_jj.c +++ b/src/overlays/actors/ovl_En_Jj/z_en_jj.c @@ -5,9 +5,20 @@ */ #include "z_en_jj.h" -#include "assets/objects/object_jj/object_jj.h" #include "overlays/actors/ovl_Eff_Dust/z_eff_dust.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "assets/objects/object_jj/object_jj.h" + #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) typedef enum EnJjEyeState { diff --git a/src/overlays/actors/ovl_En_Jj/z_en_jj.h b/src/overlays/actors/ovl_En_Jj/z_en_jj.h index c5d6241204..9ac2df8bb4 100644 --- a/src/overlays/actors/ovl_En_Jj/z_en_jj.h +++ b/src/overlays/actors/ovl_En_Jj/z_en_jj.h @@ -2,11 +2,11 @@ #define Z_EN_JJ_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnJj; -typedef void (*EnJjActionFunc)(struct EnJj*, PlayState*); +typedef void (*EnJjActionFunc)(struct EnJj*, struct PlayState*); typedef struct EnJj { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_En_Js/z_en_js.c b/src/overlays/actors/ovl_En_Js/z_en_js.c index 6cd5163aec..73ccde6e95 100644 --- a/src/overlays/actors/ovl_En_Js/z_en_js.c +++ b/src/overlays/actors/ovl_En_Js/z_en_js.c @@ -5,6 +5,14 @@ */ #include "z_en_js.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "regs.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_js/object_js.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Js/z_en_js.h b/src/overlays/actors/ovl_En_Js/z_en_js.h index f1e356b2c1..e1e22f547d 100644 --- a/src/overlays/actors/ovl_En_Js/z_en_js.h +++ b/src/overlays/actors/ovl_En_Js/z_en_js.h @@ -2,11 +2,11 @@ #define Z_EN_JS_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnJs; -typedef void (*EnJsActionFunc)(struct EnJs*, PlayState*); +typedef void (*EnJsActionFunc)(struct EnJs*, struct PlayState*); typedef struct EnJs { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c index 6650e31715..9147125c12 100644 --- a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c +++ b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c @@ -7,6 +7,15 @@ #include "z_en_jsjutan.h" #include "overlays/actors/ovl_En_Bom/z_en_bom.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sys_math.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) void EnJsjutan_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.h b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.h index 63a694bad6..b6c4b07591 100644 --- a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.h +++ b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.h @@ -2,7 +2,7 @@ #define Z_EN_JSJUTAN_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnJsjutan; diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c index d5ada18305..177a648b54 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -5,7 +5,19 @@ */ #include "z_en_kakasi.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "one_point_cutscene.h" +#include "rand.h" +#include "regs.h" +#include "sfx.h" #include "terminal.h" +#include "z_lib.h" +#include "z64ocarina.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_ka/object_ka.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_DURING_OCARINA) diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.h b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.h index ceef6afe9c..c2eff368ca 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.h +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.h @@ -2,11 +2,11 @@ #define Z_EN_KAKASI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnKakasi; -typedef void (*EnKakasiFunc)(struct EnKakasi*, PlayState*); +typedef void (*EnKakasiFunc)(struct EnKakasi*, struct PlayState*); typedef struct EnKakasi { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c index c670a19efb..0bf909a234 100644 --- a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c +++ b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c @@ -5,7 +5,19 @@ */ #include "z_en_kakasi3.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "one_point_cutscene.h" +#include "rand.h" +#include "regs.h" +#include "sfx.h" #include "terminal.h" +#include "z_lib.h" +#include "z64ocarina.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_ka/object_ka.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_DURING_OCARINA) diff --git a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.h b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.h index f402ab5ded..e09b98a9fb 100644 --- a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.h +++ b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.h @@ -2,11 +2,11 @@ #define Z_EN_KAKASI3_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnKakasi3; -typedef void (*EnKakasi3ActionFunc)(struct EnKakasi3*, PlayState*); +typedef void (*EnKakasi3ActionFunc)(struct EnKakasi3*, struct PlayState*); typedef struct EnKakasi3 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c index cdba59e661..b8f5309620 100644 --- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c +++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c @@ -5,9 +5,20 @@ */ #include "z_en_karebaba.h" +#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_dekubaba/object_dekubaba.h" #include "assets/objects/gameplay_keep/gameplay_keep.h" -#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) diff --git a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.h b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.h index 0687ade588..97b04f1a7f 100644 --- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.h +++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.h @@ -2,11 +2,11 @@ #define Z_EN_KAREBABA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnKarebaba; -typedef void (*EnKarebabaActionFunc)(struct EnKarebaba*, PlayState*); +typedef void (*EnKarebabaActionFunc)(struct EnKarebaba*, struct PlayState*); typedef struct EnKarebaba { /* 0x0000 */ Actor actor; @@ -14,7 +14,7 @@ typedef struct EnKarebaba { /* 0x0190 */ EnKarebabaActionFunc actionFunc; /* 0x0194 */ Vec3s jointTable[8]; /* 0x01C4 */ Vec3s morphTable[8]; - /* 0x01F4 */ CollisionPoly* boundFloor; + /* 0x01F4 */ struct CollisionPoly* boundFloor; /* 0x01F8 */ ColliderCylinder headCollider; /* 0x0244 */ ColliderCylinder bodyCollider; } EnKarebaba; // size = 0x0290 diff --git a/src/overlays/actors/ovl_En_Ko/z_en_ko.c b/src/overlays/actors/ovl_En_Ko/z_en_ko.c index 32f3829721..54fee8f4ed 100644 --- a/src/overlays/actors/ovl_En_Ko/z_en_ko.c +++ b/src/overlays/actors/ovl_En_Ko/z_en_ko.c @@ -5,12 +5,24 @@ */ #include "z_en_ko.h" + +#include "attributes.h" +#include "gfx.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "terminal.h" +#include "versions.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_fa/object_fa.h" #include "assets/objects/object_os_anime/object_os_anime.h" #include "assets/objects/object_km1/object_km1.h" #include "assets/objects/object_kw1/object_kw1.h" -#include "terminal.h" -#include "versions.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Ko/z_en_ko.h b/src/overlays/actors/ovl_En_Ko/z_en_ko.h index 085e9aca54..d9531e57e6 100644 --- a/src/overlays/actors/ovl_En_Ko/z_en_ko.h +++ b/src/overlays/actors/ovl_En_Ko/z_en_ko.h @@ -2,11 +2,11 @@ #define Z_EN_KO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnKo; -typedef void (*EnKoActionFunc)(struct EnKo*, PlayState*); +typedef void (*EnKoActionFunc)(struct EnKo*, struct PlayState*); typedef struct EnKo { /* 0x0000 */ Actor actor; @@ -17,7 +17,7 @@ typedef struct EnKo { /* 0x0196 */ s8 legsObjectSlot; /* 0x0197 */ s8 osAnimeObjectSlot; /* 0x0198 */ ColliderCylinder collider; - /* 0x01E4 */ Path* path; + /* 0x01E4 */ struct Path* path; /* 0x01E8 */ NpcInteractInfo interactInfo; /* 0x0210 */ u8 unk_210; // block trade quest sfx /* 0x0212 */ s16 forestQuestState; diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/src/overlays/actors/ovl_En_Kz/z_en_kz.c index a4aaf4e1ca..03e8524ffc 100644 --- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -5,7 +5,20 @@ */ #include "z_en_kz.h" + +#include "libc64/math64.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" #include "versions.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_kz/object_kz.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.h b/src/overlays/actors/ovl_En_Kz/z_en_kz.h index b5cd380791..933fbe2617 100644 --- a/src/overlays/actors/ovl_En_Kz/z_en_kz.h +++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.h @@ -2,11 +2,11 @@ #define Z_EN_KZ_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnKz; -typedef void (*EnKzActionFunc)(struct EnKz*, PlayState*); +typedef void (*EnKzActionFunc)(struct EnKz*, struct PlayState*); typedef struct EnKz { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Light/z_en_light.c b/src/overlays/actors/ovl_En_Light/z_en_light.c index 33d671a95f..da45fa132a 100644 --- a/src/overlays/actors/ovl_En_Light/z_en_light.c +++ b/src/overlays/actors/ovl_En_Light/z_en_light.c @@ -5,6 +5,16 @@ */ #include "z_en_light.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64light.h" +#include "z64play.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" diff --git a/src/overlays/actors/ovl_En_Light/z_en_light.h b/src/overlays/actors/ovl_En_Light/z_en_light.h index 1cbf786b00..035471f47d 100644 --- a/src/overlays/actors/ovl_En_Light/z_en_light.h +++ b/src/overlays/actors/ovl_En_Light/z_en_light.h @@ -2,7 +2,8 @@ #define Z_EN_LIGHT_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64light.h" struct EnLight; diff --git a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c index c2b6ca1d6c..b4bd3af91b 100644 --- a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c +++ b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c @@ -5,6 +5,12 @@ */ #include "z_en_lightbox.h" + +#include "regs.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_lightbox/object_lightbox.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.h b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.h index e24afd44e1..c09c77f850 100644 --- a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.h +++ b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.h @@ -2,7 +2,7 @@ #define Z_EN_LIGHTBOX_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnLightbox; diff --git a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c index 9acedc1552..2097bb9d26 100644 --- a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c +++ b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c @@ -6,6 +6,9 @@ #include "z_en_m_fire1.h" +#include "z_lib.h" +#include "z64play.h" + #define FLAGS 0 void EnMFire1_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.h b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.h index 10d3e3fef7..59ebb44318 100644 --- a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.h +++ b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.h @@ -2,7 +2,7 @@ #define Z_EN_M_FIRE1_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnMFire1; diff --git a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c index eb7745aa86..bd02c66244 100644 --- a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c +++ b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c @@ -1,4 +1,16 @@ #include "z_en_m_thunder.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rumble.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64light.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.h b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.h index 4cb7ad215c..8c7cdd7a1f 100644 --- a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.h +++ b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.h @@ -2,11 +2,12 @@ #define Z_EN_M_THUNDER_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64light.h" struct EnMThunder; -typedef void (*EnMThunderActionFunc)(struct EnMThunder*, PlayState*); +typedef void (*EnMThunderActionFunc)(struct EnMThunder*, struct PlayState*); typedef struct EnMThunder { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c index d0c16c3a72..1cf964b5b6 100644 --- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c +++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c @@ -5,6 +5,20 @@ */ #include "z_en_ma1.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64ocarina.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_ma1/object_ma1.h" #define FLAGS \ diff --git a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h index ef69c0c8e4..3664fc98a8 100644 --- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h +++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.h @@ -2,11 +2,11 @@ #define Z_EN_MA1_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnMa1; -typedef void (*EnMa1ActionFunc)(struct EnMa1*, PlayState*); +typedef void (*EnMa1ActionFunc)(struct EnMa1*, struct PlayState*); typedef struct EnMa1 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c index a4a4a17049..9e8dad5401 100644 --- a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c +++ b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c @@ -1,4 +1,19 @@ #include "z_en_ma2.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64ocarina.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_ma2/object_ma2.h" #define FLAGS \ diff --git a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h index 390c61da21..81fddf7672 100644 --- a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h +++ b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h @@ -2,11 +2,11 @@ #define Z_EN_MA2_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnMa2; -typedef void (*EnMa2ActionFunc)(struct EnMa2*, PlayState*); +typedef void (*EnMa2ActionFunc)(struct EnMa2*, struct PlayState*); typedef enum AdultMalonLimb { /* 0x00 */ MALON_ADULT_LIMB_NONE, diff --git a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c index 69dc0d907a..d0ce7b077a 100644 --- a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c +++ b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c @@ -5,8 +5,22 @@ */ #include "z_en_ma3.h" -#include "assets/objects/object_ma2/object_ma2.h" + +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sys_matrix.h" +#include "z_lib.h" #include "versions.h" +#include "z64audio.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + +#include "assets/objects/object_ma2/object_ma2.h" #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \ diff --git a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h index 2b9dea812d..ecf637561e 100644 --- a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h +++ b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h @@ -2,11 +2,11 @@ #define Z_EN_MA3_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnMa3; -typedef void (*EnMa3ActionFunc)(struct EnMa3*, PlayState*); +typedef void (*EnMa3ActionFunc)(struct EnMa3*, struct PlayState*); typedef enum AdultMalonLimb { /* 0x00 */ MALON_ADULT_LIMB_NONE, diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/src/overlays/actors/ovl_En_Mag/z_en_mag.c index 41562a5c97..82ff36b3a4 100644 --- a/src/overlays/actors/ovl_En_Mag/z_en_mag.c +++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.c @@ -5,12 +5,23 @@ */ #include "z_en_mag.h" -#include "versions.h" -#include "assets/objects/object_mag/object_mag.h" + +#include "controller.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "gfxalloc.h" #if PLATFORM_N64 #include "n64dd.h" #endif +#include "regs.h" +#include "sfx.h" #include "versions.h" +#include "z64audio.h" +#include "z64play.h" + +#include "global.h" + +#include "assets/objects/object_mag/object_mag.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.h b/src/overlays/actors/ovl_En_Mag/z_en_mag.h index e7c516c629..ace8427278 100644 --- a/src/overlays/actors/ovl_En_Mag/z_en_mag.h +++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.h @@ -2,7 +2,8 @@ #define Z_EN_MAG_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64message.h" struct EnMag; diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.c b/src/overlays/actors/ovl_En_Md/z_en_md.c index 93ba4f894c..d2ea74a84a 100644 --- a/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -5,9 +5,23 @@ */ #include "z_en_md.h" -#include "assets/objects/object_md/object_md.h" #include "overlays/actors/ovl_En_Elf/z_en_elf.h" +#include "libc64/math64.h" +#include "attributes.h" +#include "gfx.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64ocarina.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + +#include "assets/objects/object_md/object_md.h" + #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \ ACTOR_FLAG_UPDATE_DURING_OCARINA) diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.h b/src/overlays/actors/ovl_En_Md/z_en_md.h index 6a78a24904..bfd9b0450a 100644 --- a/src/overlays/actors/ovl_En_Md/z_en_md.h +++ b/src/overlays/actors/ovl_En_Md/z_en_md.h @@ -2,7 +2,7 @@ #define Z_EN_MD_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnMd; @@ -27,7 +27,7 @@ typedef enum EnMdLimb { ENMD_LIMB_MAX } EnMdLimb; -typedef void (*EnMdActionFunc)(struct EnMd*, PlayState*); +typedef void (*EnMdActionFunc)(struct EnMd*, struct PlayState*); #define ENMD_GET_PATH_INDEX(this) PARAMS_GET_S(this->actor.params, 8, 8) #define ENMD_GET_PATH_INDEX_NOSHIFT(this) PARAMS_GET_NOSHIFT(this->actor.params, 8, 8) diff --git a/src/overlays/actors/ovl_En_Mk/z_en_mk.c b/src/overlays/actors/ovl_En_Mk/z_en_mk.c index df7708a699..ec76d05029 100644 --- a/src/overlays/actors/ovl_En_Mk/z_en_mk.c +++ b/src/overlays/actors/ovl_En_Mk/z_en_mk.c @@ -5,6 +5,17 @@ */ #include "z_en_mk.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_mk/object_mk.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Mk/z_en_mk.h b/src/overlays/actors/ovl_En_Mk/z_en_mk.h index 5b8a438a00..53df56b76a 100644 --- a/src/overlays/actors/ovl_En_Mk/z_en_mk.h +++ b/src/overlays/actors/ovl_En_Mk/z_en_mk.h @@ -2,11 +2,11 @@ #define Z_EN_MK_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnMk; -typedef void (*EnMkActionFunc)(struct EnMk*, PlayState*); +typedef void (*EnMkActionFunc)(struct EnMk*, struct PlayState*); typedef struct EnMk { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Mm/z_en_mm.c b/src/overlays/actors/ovl_En_Mm/z_en_mm.c index b081f8304c..cd3f037148 100644 --- a/src/overlays/actors/ovl_En_Mm/z_en_mm.c +++ b/src/overlays/actors/ovl_En_Mm/z_en_mm.c @@ -5,6 +5,20 @@ */ #include "z_en_mm.h" + +#include "libc64/math64.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_mm/object_mm.h" #include "assets/objects/object_link_child/object_link_child.h" diff --git a/src/overlays/actors/ovl_En_Mm/z_en_mm.h b/src/overlays/actors/ovl_En_Mm/z_en_mm.h index 7646e1f044..555073753f 100644 --- a/src/overlays/actors/ovl_En_Mm/z_en_mm.h +++ b/src/overlays/actors/ovl_En_Mm/z_en_mm.h @@ -2,11 +2,11 @@ #define Z_EN_MM_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnMm; -typedef void (*EnMmActionFunc)(struct EnMm*, PlayState*); +typedef void (*EnMmActionFunc)(struct EnMm*, struct PlayState*); typedef struct EnMm { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c index 3082b5c35d..3a590285a5 100644 --- a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c +++ b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c @@ -5,7 +5,17 @@ */ #include "z_en_mm2.h" + +#include "libu64/debug.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "segmented_address.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_mm/object_mm.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.h b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.h index a5edeb9cb5..8e48261d7c 100644 --- a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.h +++ b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.h @@ -2,11 +2,11 @@ #define Z_EN_MM2_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnMm2; -typedef void (*EnMm2ActionFunc)(struct EnMm2*, PlayState*); +typedef void (*EnMm2ActionFunc)(struct EnMm2*, struct PlayState*); typedef struct EnMm2 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index 35796e1eb7..33f645d2b6 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -5,6 +5,14 @@ */ #include "z_en_ms.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "z64play.h" + +#include "global.h" + #include "assets/objects/object_ms/object_ms.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.h b/src/overlays/actors/ovl_En_Ms/z_en_ms.h index 53c6bbeaca..9ace7bc2d0 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.h +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.h @@ -2,11 +2,11 @@ #define Z_EN_MS_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnMs; -typedef void (*EnMsActionFunc)(struct EnMs*, PlayState*); +typedef void (*EnMsActionFunc)(struct EnMs*, struct PlayState*); typedef struct EnMs { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Mu/z_en_mu.c b/src/overlays/actors/ovl_En_Mu/z_en_mu.c index 4f4221820f..1a48487d26 100644 --- a/src/overlays/actors/ovl_En_Mu/z_en_mu.c +++ b/src/overlays/actors/ovl_En_Mu/z_en_mu.c @@ -5,6 +5,15 @@ */ #include "z_en_mu.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" + +#include "global.h" + #include "assets/objects/object_mu/object_mu.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Mu/z_en_mu.h b/src/overlays/actors/ovl_En_Mu/z_en_mu.h index 1b098eb417..417ce242b1 100644 --- a/src/overlays/actors/ovl_En_Mu/z_en_mu.h +++ b/src/overlays/actors/ovl_En_Mu/z_en_mu.h @@ -2,7 +2,7 @@ #define Z_EN_MU_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnMu; diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/src/overlays/actors/ovl_En_Nb/z_en_nb.c index 983af06780..e3ff7ac013 100644 --- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -5,10 +5,26 @@ */ #include "z_en_nb.h" -#include "terminal.h" -#include "assets/objects/object_nb/object_nb.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" +#include "libc64/math64.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "regs.h" +#include "segmented_address.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + +#include "assets/objects/object_nb/object_nb.h" + #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED typedef enum EnNbAction { diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.h b/src/overlays/actors/ovl_En_Nb/z_en_nb.h index 997af0f573..3ed08cbf8e 100644 --- a/src/overlays/actors/ovl_En_Nb/z_en_nb.h +++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.h @@ -2,7 +2,7 @@ #define Z_EN_NB_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnNb; @@ -29,8 +29,8 @@ typedef enum EnNbLimb { /* 0x13 */ NB_LIMB_MAX } EnNbLimb; -typedef void (*EnNbActionFunc)(struct EnNb*, PlayState*); -typedef void (*EnNbDrawFunc)(struct EnNb*, PlayState*); +typedef void (*EnNbActionFunc)(struct EnNb*, struct PlayState*); +typedef void (*EnNbDrawFunc)(struct EnNb*, struct PlayState*); typedef struct EnNb { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c index 0415f95bb9..f1b15076ca 100644 --- a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c +++ b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c @@ -1,9 +1,23 @@ #include "z_en_niw_lady.h" -#include "assets/objects/object_ane/object_ane.h" -#include "assets/objects/object_os_anime/object_os_anime.h" #include "overlays/actors/ovl_En_Niw/z_en_niw.h" + +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "regs.h" +#include "segmented_address.h" +#include "sfx.h" #include "terminal.h" #include "versions.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + +#include "assets/objects/object_ane/object_ane.h" +#include "assets/objects/object_os_anime/object_os_anime.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.h b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.h index 7ecb165cca..a6167454da 100644 --- a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.h +++ b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.h @@ -2,11 +2,11 @@ #define Z_EN_NIW_LADY_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnNiwLady; -typedef void (*EnNiwLadyActionFunc)(struct EnNiwLady*, PlayState*); +typedef void (*EnNiwLadyActionFunc)(struct EnNiwLady*, struct PlayState*); typedef struct EnNiwLady { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c index a990438adb..a5f322def6 100644 --- a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c +++ b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c @@ -5,6 +5,14 @@ */ #include "z_en_nwc.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_nwc/object_nwc.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.h b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.h index e927cb3b66..fbb64d1ca2 100644 --- a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.h +++ b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.h @@ -2,13 +2,13 @@ #define Z_EN_NWC_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnNwc; struct EnNwcChick; -typedef void (*EnNwcUpdateFunc)(struct EnNwc*, PlayState*); -typedef void (*EnNwcChickFunc)(struct EnNwcChick*, struct EnNwc*, PlayState*); +typedef void (*EnNwcUpdateFunc)(struct EnNwc*, struct PlayState*); +typedef void (*EnNwcChickFunc)(struct EnNwcChick*, struct EnNwc*, struct PlayState*); typedef struct EnNwcChick { /* 0x00 */ s8 type; @@ -21,8 +21,8 @@ typedef struct EnNwcChick { /* 0x2C */ f32 velY; /* 0x30 */ Vec3s rot; /* 0x36 */ u16 height; - /* 0x38 */ CollisionPoly* floorPoly; - /* 0x44 */ char unk_3C[0x20]; + /* 0x38 */ struct CollisionPoly* floorPoly; + /* 0x3C */ char unk_3C[0x20]; } EnNwcChick; // size = 0x5C typedef struct EnNwc { diff --git a/src/overlays/actors/ovl_En_OE2/z_en_oe2.c b/src/overlays/actors/ovl_En_OE2/z_en_oe2.c index f89eb3ce99..f568d1812b 100644 --- a/src/overlays/actors/ovl_En_OE2/z_en_oe2.c +++ b/src/overlays/actors/ovl_En_OE2/z_en_oe2.c @@ -6,6 +6,8 @@ #include "z_en_oe2.h" +#include "z64play.h" + #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) void EnOE2_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_OE2/z_en_oe2.h b/src/overlays/actors/ovl_En_OE2/z_en_oe2.h index 635495bb7d..062e103819 100644 --- a/src/overlays/actors/ovl_En_OE2/z_en_oe2.h +++ b/src/overlays/actors/ovl_En_OE2/z_en_oe2.h @@ -2,11 +2,11 @@ #define Z_EN_OE2_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnOE2; -typedef void (*EnOE2ActionFunc)(struct EnOE2*, PlayState*); +typedef void (*EnOE2ActionFunc)(struct EnOE2*, struct PlayState*); typedef struct EnOE2 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index 46696027f4..bec1168274 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -5,10 +5,28 @@ */ #include "z_en_owl.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "rand.h" +#include "segmented_address.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_math3d.h" +#include "sys_matrix.h" +#include "terminal.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_owl/object_owl.h" #include "assets/scenes/overworld/spot06/spot06_scene.h" #include "assets/scenes/overworld/spot16/spot16_scene.h" -#include "terminal.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.h b/src/overlays/actors/ovl_En_Owl/z_en_owl.h index 4f92ef1b41..2f9e0939f8 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.h +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.h @@ -2,11 +2,11 @@ #define Z_EN_OWL_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnOwl; -typedef void (*EnOwlActionFunc)(struct EnOwl*, PlayState*); +typedef void (*EnOwlActionFunc)(struct EnOwl*, struct PlayState*); typedef void (*OwlFunc)(struct EnOwl*); typedef struct EnOwl { diff --git a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c index fefa80aecc..57ef9a85b6 100644 --- a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c +++ b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c @@ -5,6 +5,18 @@ */ #include "z_en_po_desert.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64light.h" +#include "z64play.h" + #include "assets/objects/object_po_field/object_po_field.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_REACT_TO_LENS | ACTOR_FLAG_IGNORE_QUAKE) diff --git a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.h b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.h index aeb2503edc..3f93eeb01d 100644 --- a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.h +++ b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.h @@ -2,11 +2,12 @@ #define Z_EN_PO_DESERT_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64light.h" struct EnPoDesert; -typedef void (*EnPoDesertActionFunc)(struct EnPoDesert*, PlayState*); +typedef void (*EnPoDesertActionFunc)(struct EnPoDesert*, struct PlayState*); typedef struct EnPoDesert { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c index 00eff4a39f..451c825ecf 100644 --- a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c +++ b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c @@ -5,6 +5,20 @@ */ #include "z_en_po_field.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64light.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_po_field/object_po_field.h" diff --git a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h index f07a9233d7..17e08ee999 100644 --- a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h +++ b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.h @@ -2,11 +2,12 @@ #define Z_EN_PO_FIELD_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64light.h" struct EnPoField; -typedef void (*EnPoFieldActionFunc)(struct EnPoField*, PlayState*); +typedef void (*EnPoFieldActionFunc)(struct EnPoField*, struct PlayState*); typedef enum EnPoFieldSize { EN_PO_FIELD_SMALL, diff --git a/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c b/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c index 495046f95d..e984f316f7 100644 --- a/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c +++ b/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c @@ -5,6 +5,11 @@ */ #include "z_en_pu_box.h" + +#include "sfx.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_pu_box/object_pu_box.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.h b/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.h index 0aa0aaaf4b..cd15c66c18 100644 --- a/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.h +++ b/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.h @@ -2,7 +2,7 @@ #define Z_EN_PU_BOX_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnPubox; diff --git a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c index a3861adec4..ba7f8fe2f1 100644 --- a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c +++ b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c @@ -6,6 +6,14 @@ #include "z_en_river_sound.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" +#include "z64player.h" + #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) void EnRiverSound_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.h b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.h index c647185217..4332af6021 100644 --- a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.h +++ b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.h @@ -2,7 +2,7 @@ #define Z_EN_RIVER_SOUND_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnRiverSound; diff --git a/src/overlays/actors/ovl_En_Rl/z_en_rl.c b/src/overlays/actors/ovl_En_Rl/z_en_rl.c index 6d79ef6288..96a03298f3 100644 --- a/src/overlays/actors/ovl_En_Rl/z_en_rl.c +++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.c @@ -5,7 +5,16 @@ */ #include "z_en_rl.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "regs.h" +#include "segmented_address.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_rl/object_rl.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Rl/z_en_rl.h b/src/overlays/actors/ovl_En_Rl/z_en_rl.h index 9aa6b9ae6c..9ce9949aa6 100644 --- a/src/overlays/actors/ovl_En_Rl/z_en_rl.h +++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.h @@ -2,12 +2,12 @@ #define Z_EN_RL_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnRl; -typedef void (*EnRlActionFunc)(struct EnRl*, PlayState*); -typedef void (*EnRlDrawFunc)(struct EnRl*, PlayState*); +typedef void (*EnRlActionFunc)(struct EnRl*, struct PlayState*); +typedef void (*EnRlDrawFunc)(struct EnRl*, struct PlayState*); typedef struct EnRl { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index 3586ed73d7..fcf2652175 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -5,10 +5,27 @@ */ #include "z_en_ru1.h" -#include "assets/objects/object_ru1/object_ru1.h" +#include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h" + +#include "libc64/math64.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "regs.h" +#include "segmented_address.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" #include "terminal.h" #include "versions.h" -#include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + +#include "assets/objects/object_ru1/object_ru1.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_CAN_PRESS_SWITCHES) diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h index 8223bfda43..8778174ef5 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.h @@ -2,16 +2,16 @@ #define Z_EN_RU1_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" #include "overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" struct EnRu1; -typedef void (*EnRu1ActionFunc)(struct EnRu1*, PlayState*); -typedef void (*EnRu1DrawFunc)(struct EnRu1*, PlayState*); -typedef void (*EnRu1PreLimbDrawFunc)(struct EnRu1*, PlayState*, s32, Vec3s*); +typedef void (*EnRu1ActionFunc)(struct EnRu1*, struct PlayState*); +typedef void (*EnRu1DrawFunc)(struct EnRu1*, struct PlayState*); +typedef void (*EnRu1PreLimbDrawFunc)(struct EnRu1*, struct PlayState*, s32, Vec3s*); typedef struct EnRu1 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c index eff82bc1ec..b6633a6858 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c @@ -5,9 +5,22 @@ */ #include "z_en_ru2.h" -#include "assets/objects/object_ru2/object_ru2.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "one_point_cutscene.h" +#include "regs.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sfx.h" #include "terminal.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" +#include "z64player.h" + +#include "assets/objects/object_ru2/object_ru2.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h index 12333051b6..ca051d1800 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.h @@ -2,15 +2,15 @@ #define Z_EN_RU2_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" #define ENRU2_GET_SWITCH_FLAG(thisx) PARAMS_GET_U(thisx->actor.params, 8, 8) #define ENRU2_GET_TYPE(thisx) PARAMS_GET_U(thisx->actor.params, 0, 8) struct EnRu2; -typedef void (*EnRu2ActionFunc)(struct EnRu2*, PlayState*); -typedef void (*EnRu2DrawFunc)(struct EnRu2*, PlayState*); +typedef void (*EnRu2ActionFunc)(struct EnRu2*, struct PlayState*); +typedef void (*EnRu2DrawFunc)(struct EnRu2*, struct PlayState*); typedef struct EnRu2 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Sa/z_en_sa.c b/src/overlays/actors/ovl_En_Sa/z_en_sa.c index b2543c317e..90e63fc1d7 100644 --- a/src/overlays/actors/ovl_En_Sa/z_en_sa.c +++ b/src/overlays/actors/ovl_En_Sa/z_en_sa.c @@ -1,5 +1,17 @@ #include "z_en_sa.h" #include "overlays/actors/ovl_En_Elf/z_en_elf.h" + +#include "attributes.h" +#include "gfx.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_sa/object_sa.h" #include "assets/scenes/overworld/spot04/spot04_scene.h" #include "assets/scenes/overworld/spot05/spot05_scene.h" diff --git a/src/overlays/actors/ovl_En_Sa/z_en_sa.h b/src/overlays/actors/ovl_En_Sa/z_en_sa.h index 27c2c740f0..0132877731 100644 --- a/src/overlays/actors/ovl_En_Sa/z_en_sa.h +++ b/src/overlays/actors/ovl_En_Sa/z_en_sa.h @@ -2,11 +2,11 @@ #define Z_EN_SA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnSa; -typedef void (*EnSaActionFunc)(struct EnSa*, PlayState*); +typedef void (*EnSaActionFunc)(struct EnSa*, struct PlayState*); typedef struct EnSa { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c index 26d322f9b5..425b30b8f4 100644 --- a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c +++ b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c @@ -6,6 +6,10 @@ #include "z_en_scene_change.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "z64play.h" + #define FLAGS 0 void EnSceneChange_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.h b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.h index 4add7d11ee..d1fcb16d90 100644 --- a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.h +++ b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.h @@ -2,11 +2,11 @@ #define Z_ITEM_SCENE_CHANGE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnSceneChange; -typedef void (*EnSceneChangeActionFunc)(struct EnSceneChange*, PlayState*); +typedef void (*EnSceneChangeActionFunc)(struct EnSceneChange*, struct PlayState*); typedef struct EnSceneChange { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Sda/z_en_sda.c b/src/overlays/actors/ovl_En_Sda/z_en_sda.c index 62bd38cc11..95a1f773e6 100644 --- a/src/overlays/actors/ovl_En_Sda/z_en_sda.c +++ b/src/overlays/actors/ovl_En_Sda/z_en_sda.c @@ -6,6 +6,13 @@ #include "z_en_sda.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "regs.h" +#include "sys_matrix.h" +#include "z64play.h" +#include "z64player.h" + #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) void EnSda_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Sda/z_en_sda.h b/src/overlays/actors/ovl_En_Sda/z_en_sda.h index 4dd2abd3a6..27cba99665 100644 --- a/src/overlays/actors/ovl_En_Sda/z_en_sda.h +++ b/src/overlays/actors/ovl_En_Sda/z_en_sda.h @@ -2,7 +2,7 @@ #define Z_EN_SDA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnSda; diff --git a/src/overlays/actors/ovl_En_Si/z_en_si.c b/src/overlays/actors/ovl_En_Si/z_en_si.c index 38735ea340..d630596d8f 100644 --- a/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -5,7 +5,13 @@ */ #include "z_en_si.h" + +#include "sequence.h" +#include "z_lib.h" +#include "z64audio.h" #include "z64draw.h" +#include "z64play.h" +#include "z64player.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOOKSHOT_PULLS_ACTOR) diff --git a/src/overlays/actors/ovl_En_Si/z_en_si.h b/src/overlays/actors/ovl_En_Si/z_en_si.h index b52e831a30..a4ec863028 100644 --- a/src/overlays/actors/ovl_En_Si/z_en_si.h +++ b/src/overlays/actors/ovl_En_Si/z_en_si.h @@ -2,11 +2,11 @@ #define Z_EN_SI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnSi; -typedef void (*EnSiActionFunc)(struct EnSi*, PlayState*); +typedef void (*EnSiActionFunc)(struct EnSi*, struct PlayState*); typedef struct EnSi { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c index 1a1093f229..ecdab8d5b2 100644 --- a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c +++ b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c @@ -5,6 +5,20 @@ */ #include "z_en_siofuki.h" + +#include "libc64/math64.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_siofuki/object_siofuki.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.h b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.h index 23074bfac1..56a08bff6f 100644 --- a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.h +++ b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.h @@ -2,7 +2,7 @@ #define Z_EN_SIOFUKI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" typedef enum EnSiofukiType { /* 0x00 */ EN_SIOFUKI_RAISING, @@ -11,7 +11,7 @@ typedef enum EnSiofukiType { struct EnSiofuki; -typedef void (*EnSiofukiActionFunc)(struct EnSiofuki*, PlayState*); +typedef void (*EnSiofukiActionFunc)(struct EnSiofuki*, struct PlayState*); typedef struct EnSiofuki { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index 5216d606a2..f90bee0dcf 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -1,4 +1,16 @@ #include "z_en_ssh.h" + +#include "gfx.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_ssh/object_ssh.h" #define FLAGS \ diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h index 3d1de2c6c3..4c0e3e275b 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h @@ -2,11 +2,11 @@ #define Z_EN_SSH_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnSsh; -typedef void (*EnSshActionFunc)(struct EnSsh*, PlayState*); +typedef void (*EnSshActionFunc)(struct EnSsh*, struct PlayState*); typedef struct EnSsh { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Sth/z_en_sth.c b/src/overlays/actors/ovl_En_Sth/z_en_sth.c index ac10651812..4cd282026b 100644 --- a/src/overlays/actors/ovl_En_Sth/z_en_sth.c +++ b/src/overlays/actors/ovl_En_Sth/z_en_sth.c @@ -4,8 +4,16 @@ * Description: Uncursed House of Skulltula People */ -#include "terminal.h" #include "z_en_sth.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sys_matrix.h" +#include "terminal.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_ahg/object_ahg.h" #include "assets/objects/object_boj/object_boj.h" diff --git a/src/overlays/actors/ovl_En_Sth/z_en_sth.h b/src/overlays/actors/ovl_En_Sth/z_en_sth.h index 9408c542dd..a135fea2aa 100644 --- a/src/overlays/actors/ovl_En_Sth/z_en_sth.h +++ b/src/overlays/actors/ovl_En_Sth/z_en_sth.h @@ -2,11 +2,11 @@ #define Z_EN_STH_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnSth; -typedef void (*EnSthActionFunc)(struct EnSth*, PlayState*); +typedef void (*EnSthActionFunc)(struct EnSth*, struct PlayState*); typedef struct EnSth { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Stream/z_en_stream.c b/src/overlays/actors/ovl_En_Stream/z_en_stream.c index dc73048393..118328e793 100644 --- a/src/overlays/actors/ovl_En_Stream/z_en_stream.c +++ b/src/overlays/actors/ovl_En_Stream/z_en_stream.c @@ -5,6 +5,17 @@ */ #include "z_en_stream.h" + +#include "libc64/math64.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_stream/object_stream.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Stream/z_en_stream.h b/src/overlays/actors/ovl_En_Stream/z_en_stream.h index 199d1c6797..0a21d54d84 100644 --- a/src/overlays/actors/ovl_En_Stream/z_en_stream.h +++ b/src/overlays/actors/ovl_En_Stream/z_en_stream.h @@ -2,11 +2,11 @@ #define Z_EN_STREAM_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnStream; -typedef void (*EnStreamActionFunc)(struct EnStream*, PlayState*); +typedef void (*EnStreamActionFunc)(struct EnStream*, struct PlayState*); typedef struct EnStream { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/src/overlays/actors/ovl_En_Ta/z_en_ta.c index bea60cf889..2cf923df0b 100644 --- a/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -5,7 +5,26 @@ */ #include "z_en_ta.h" +#include "overlays/actors/ovl_En_Niw/z_en_niw.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "one_point_cutscene.h" +#include "rand.h" +#include "segmented_address.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_ta/object_ta.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Ta/z_en_ta.h b/src/overlays/actors/ovl_En_Ta/z_en_ta.h index eeab7dc775..d230c2b757 100644 --- a/src/overlays/actors/ovl_En_Ta/z_en_ta.h +++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.h @@ -2,13 +2,11 @@ #define Z_EN_TA_H #include "ultra64.h" -#include "global.h" - -#include "overlays/actors/ovl_En_Niw/z_en_niw.h" +#include "z64actor.h" struct EnTa; -typedef void (*EnTaActionFunc)(struct EnTa*, PlayState*); +typedef void (*EnTaActionFunc)(struct EnTa*, struct PlayState*); typedef void (*EnTaBlinkFunc)(struct EnTa*); typedef void (*EnTaAnimFunc)(struct EnTa*); @@ -50,7 +48,7 @@ typedef struct EnTa { /* 0x02B0 */ EnTaBlinkFunc blinkFunc; /* 0x02B4 */ s16 eyeIndex; /* 0x02B6 */ s16 blinkTimer; - /* 0x02B8 */ EnNiw* superCuccos[3]; + /* 0x02B8 */ struct EnNiw* superCuccos[3]; /* 0x02C4 */ s16 superCuccoTimers[3]; // This is used to time animations and actions for super-cuccos /* 0x02CA */ u8 lastFoundSuperCuccoIdx; /* 0x02CC */ s16 timer; diff --git a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c index bcc60b5f1a..427eae8494 100644 --- a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c +++ b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c @@ -5,8 +5,15 @@ */ #include "z_en_takara_man.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "segmented_address.h" #include "terminal.h" #include "versions.h" +#include "z64play.h" + #include "assets/objects/object_ts/object_ts.h" #define FLAGS \ diff --git a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.h b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.h index 48898909bc..e7d51c4b07 100644 --- a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.h +++ b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.h @@ -2,11 +2,11 @@ #define Z_EN_TAKARA_MAN_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnTakaraMan; -typedef void (*EnTakaraManActionFunc)(struct EnTakaraMan*, PlayState*); +typedef void (*EnTakaraManActionFunc)(struct EnTakaraMan*, struct PlayState*); typedef struct EnTakaraMan { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Tg/z_en_tg.c b/src/overlays/actors/ovl_En_Tg/z_en_tg.c index 42f32f0eb7..2bd2a378d3 100644 --- a/src/overlays/actors/ovl_En_Tg/z_en_tg.c +++ b/src/overlays/actors/ovl_En_Tg/z_en_tg.c @@ -5,6 +5,13 @@ */ #include "z_en_tg.h" + +#include "gfx.h" +#include "sys_matrix.h" +#include "z64play.h" + +#include "global.h" + #include "assets/objects/object_mu/object_mu.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Tg/z_en_tg.h b/src/overlays/actors/ovl_En_Tg/z_en_tg.h index 4571638d77..b4d9bfe063 100644 --- a/src/overlays/actors/ovl_En_Tg/z_en_tg.h +++ b/src/overlays/actors/ovl_En_Tg/z_en_tg.h @@ -2,11 +2,11 @@ #define Z_EN_TG_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnTg; -typedef void (*EnTgActionFunc)(struct EnTg*, PlayState*); +typedef void (*EnTgActionFunc)(struct EnTg*, struct PlayState*); typedef struct EnTg { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Torch/z_en_torch.c b/src/overlays/actors/ovl_En_Torch/z_en_torch.c index e60e16c0de..dd8f18ed10 100644 --- a/src/overlays/actors/ovl_En_Torch/z_en_torch.c +++ b/src/overlays/actors/ovl_En_Torch/z_en_torch.c @@ -1,10 +1,13 @@ /* * File: z_en_torch.c * Overlay: ovl_En_Torch - * Description: Spawns a chest with the appropriate contents then unloads. Used in grottos. + * Description: Spawns a chest with the appropriate contents then dies. Used in grottos. */ #include "z_en_torch.h" +#include "overlays/actors/ovl_En_Box/z_en_box.h" + +#include "z64play.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_En_Torch/z_en_torch.h b/src/overlays/actors/ovl_En_Torch/z_en_torch.h index 78be1fb2dd..fc3e2dabac 100644 --- a/src/overlays/actors/ovl_En_Torch/z_en_torch.h +++ b/src/overlays/actors/ovl_En_Torch/z_en_torch.h @@ -2,7 +2,7 @@ #define Z_EN_TORCH_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnTorch; diff --git a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c index 5b31c32f84..301e3336bd 100644 --- a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c +++ b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c @@ -5,6 +5,17 @@ */ #include "z_en_toryo.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_toryo/object_toryo.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.h b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.h index 769ea637b9..f8d04e74ac 100644 --- a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.h +++ b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.h @@ -2,11 +2,11 @@ #define Z_EN_TORYO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnToryo; -typedef void (*EnToryoActionFunc)(struct EnToryo* this, PlayState* play); +typedef void (*EnToryoActionFunc)(struct EnToryo* this, struct PlayState* play); typedef struct EnToryo { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Tr/z_en_tr.c b/src/overlays/actors/ovl_En_Tr/z_en_tr.c index 6cd63e00f8..1ccdb8e409 100644 --- a/src/overlays/actors/ovl_En_Tr/z_en_tr.c +++ b/src/overlays/actors/ovl_En_Tr/z_en_tr.c @@ -5,6 +5,17 @@ */ #include "z_en_tr.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_math.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/object_tr/object_tr.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Tr/z_en_tr.h b/src/overlays/actors/ovl_En_Tr/z_en_tr.h index faf45d7400..091aa5c52f 100644 --- a/src/overlays/actors/ovl_En_Tr/z_en_tr.h +++ b/src/overlays/actors/ovl_En_Tr/z_en_tr.h @@ -2,11 +2,11 @@ #define Z_EN_TR_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnTr; -typedef void (*EnTrActionFunc)(struct EnTr*, PlayState*); +typedef void (*EnTrActionFunc)(struct EnTr*, struct PlayState*); typedef enum KotakeKoumeLimb { /* 0 */ KOTAKE_KOUME_LIMB_NONE, diff --git a/src/overlays/actors/ovl_En_Trap/z_en_trap.c b/src/overlays/actors/ovl_En_Trap/z_en_trap.c index 640332ecba..848e6701b0 100644 --- a/src/overlays/actors/ovl_En_Trap/z_en_trap.c +++ b/src/overlays/actors/ovl_En_Trap/z_en_trap.c @@ -5,6 +5,12 @@ */ #include "z_en_trap.h" + +#include "sfx.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/object_trap/object_trap.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Trap/z_en_trap.h b/src/overlays/actors/ovl_En_Trap/z_en_trap.h index 6f69707aca..fcd62dd170 100644 --- a/src/overlays/actors/ovl_En_Trap/z_en_trap.h +++ b/src/overlays/actors/ovl_En_Trap/z_en_trap.h @@ -2,7 +2,7 @@ #define Z_EN_TRAP_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" // Different movement modes (set in params): #define SPIKETRAP_MODE_LINEAR 0x10 diff --git a/src/overlays/actors/ovl_En_Vase/z_en_vase.c b/src/overlays/actors/ovl_En_Vase/z_en_vase.c index 9861413414..30f8b32b18 100644 --- a/src/overlays/actors/ovl_En_Vase/z_en_vase.c +++ b/src/overlays/actors/ovl_En_Vase/z_en_vase.c @@ -5,6 +5,9 @@ */ #include "z_en_vase.h" + +#include "z64play.h" + #include "assets/objects/object_vase/object_vase.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Vase/z_en_vase.h b/src/overlays/actors/ovl_En_Vase/z_en_vase.h index 57ee0d5779..04a8381e29 100644 --- a/src/overlays/actors/ovl_En_Vase/z_en_vase.h +++ b/src/overlays/actors/ovl_En_Vase/z_en_vase.h @@ -2,7 +2,7 @@ #define Z_EN_VASE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnVase; diff --git a/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c b/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c index e31e9ca9a7..8791409d01 100644 --- a/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c +++ b/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c @@ -5,9 +5,21 @@ */ #include "z_en_vb_ball.h" +#include "overlays/actors/ovl_Boss_Fd/z_boss_fd.h" + +#include "libc64/math64.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_fd/object_fd.h" #include "assets/objects/gameplay_keep/gameplay_keep.h" -#include "overlays/actors/ovl_Boss_Fd/z_boss_fd.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.h b/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.h index 8675b440c4..e81bc1ac25 100644 --- a/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.h +++ b/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.h @@ -2,7 +2,7 @@ #define Z_EN_VB_BALL_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnVbBall; diff --git a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c index c7a231c0a2..8d5de64124 100644 --- a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c +++ b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c @@ -7,6 +7,24 @@ #include "z_en_viewer.h" #include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h" #include "overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "regs.h" +#include "segmented_address.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" +#include "z64skin.h" + +#include "global.h" + #include "assets/objects/object_zl4/object_zl4.h" #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_horse_zelda/object_horse_zelda.h" diff --git a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.h b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.h index de2bf8ba27..a06435d553 100644 --- a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.h +++ b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.h @@ -2,13 +2,14 @@ #define Z_EN_VIEWER_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64skin.h" struct EnViewer; -typedef void (*EnViewerActionFunc)(struct EnViewer*, PlayState*); -typedef void (*EnViewerDrawFunc)(struct EnViewer*, PlayState*); -typedef void (*EnViewerInitAnimFunc)(struct EnViewer*, PlayState*, void*, AnimationHeader*); +typedef void (*EnViewerActionFunc)(struct EnViewer*, struct PlayState*); +typedef void (*EnViewerDrawFunc)(struct EnViewer*, struct PlayState*); +typedef void (*EnViewerInitAnimFunc)(struct EnViewer*, struct PlayState*, void*, AnimationHeader*); typedef enum EnViewerType { /* 0 */ ENVIEWER_TYPE_0_HORSE_ZELDA, diff --git a/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/src/overlays/actors/ovl_En_Xc/z_en_xc.c index f9c4cfb632..f8c534ee5a 100644 --- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -7,14 +7,29 @@ #include "z_en_xc.h" #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "regs.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_math3d.h" +#include "sys_matrix.h" +#include "terminal.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64skin_matrix.h" + #include "assets/objects/object_xc/object_xc.h" #include "assets/scenes/overworld/spot05/spot05_scene.h" #include "assets/scenes/overworld/spot17/spot17_scene.h" #include "assets/scenes/indoors/tokinoma/tokinoma_scene.h" #include "assets/scenes/dungeons/ice_doukutu/ice_doukutu_scene.h" -#include "terminal.h" -#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ique-cn:128" \ +#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ique-cn:0" \ "ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Xc/z_en_xc.h b/src/overlays/actors/ovl_En_Xc/z_en_xc.h index c01b98a842..1cc56f68e6 100644 --- a/src/overlays/actors/ovl_En_Xc/z_en_xc.h +++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.h @@ -2,12 +2,12 @@ #define Z_EN_XC_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnXc; -typedef void (*EnXcActionFunc)(struct EnXc*, PlayState*); -typedef void (*EnXcDrawFunc)(struct Actor*, PlayState*); +typedef void (*EnXcActionFunc)(struct EnXc*, struct PlayState*); +typedef void (*EnXcDrawFunc)(struct Actor*, struct PlayState*); typedef enum EnXcType { /* 0 */ SHEIK_TYPE_0, diff --git a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c index 4a6d3bc397..22d454fb61 100644 --- a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c +++ b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c @@ -5,6 +5,17 @@ */ #include "z_en_yukabyun.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/object_yukabyun/object_yukabyun.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.h b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.h index 773237fbce..a695fb4c1f 100644 --- a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.h +++ b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.h @@ -2,11 +2,11 @@ #define Z_EN_YUKABYUN_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnYukabyun; -typedef void (*EnYukabyunActionFunc)(struct EnYukabyun*, PlayState*); +typedef void (*EnYukabyunActionFunc)(struct EnYukabyun*, struct PlayState*); typedef struct EnYukabyun { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index 8a01936fff..9b6cdbe105 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -5,6 +5,19 @@ */ #include "z_en_zl1.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "letterbox.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_zl1/object_zl1.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.h b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.h index 4b9f2984e0..ada1335819 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.h +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.h @@ -2,11 +2,11 @@ #define Z_EN_ZL1_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnZl1; -typedef void (*EnZl1ActionFunc)(struct EnZl1*, PlayState*); +typedef void (*EnZl1ActionFunc)(struct EnZl1*, struct PlayState*); typedef struct EnZl1 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1_camera_data.inc.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1_camera_data.inc.c index fb4776673e..f6fac8940a 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1_camera_data.inc.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1_camera_data.inc.c @@ -1,4 +1,3 @@ -#include "z_en_zl1.h" #include "z64cutscene_commands.h" static CutsceneCameraDirection D_80B4D5C0[] = { diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c index 6c268600ec..4a8622cbba 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c @@ -1,5 +1,6 @@ -#include "z_en_zl1.h" +#include "sequence.h" #include "z64cutscene_commands.h" +#include "z64player.h" // clang-format off CutsceneData gTriforceCreationStartCs[] = { diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c index dbc45b62c6..eb72b09639 100644 --- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -5,11 +5,25 @@ */ #include "z_en_zl2.h" -#include "terminal.h" - -#include "z64frame_advance.h" - #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" + +#include "libc64/math64.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "regs.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "terminal.h" +#include "z_lib.h" +#include "z64frame_advance.h" +#include "z64play.h" +#include "z64player.h" + +#if PLATFORM_N64 +#include "global.h" +#endif + #include "assets/objects/object_zl2/object_zl2.h" #include "assets/objects/object_zl2_anime1/object_zl2_anime1.h" diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h index c477ea57e1..4bd0730de7 100644 --- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h +++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.h @@ -2,12 +2,12 @@ #define Z_EN_ZL2_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnZl2; -typedef void (*EnZl2ActionFunc)(struct EnZl2*, PlayState*); -typedef void (*EnZl2DrawFunc)(struct EnZl2*, PlayState*); +typedef void (*EnZl2ActionFunc)(struct EnZl2*, struct PlayState*); +typedef void (*EnZl2DrawFunc)(struct EnZl2*, struct PlayState*); typedef struct EnZl2 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c index e3b8a51af3..0a66fff1f3 100644 --- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c +++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c @@ -5,6 +5,23 @@ */ #include "z_en_zl4.h" + +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "letterbox.h" +#include "rumble.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_zl4/object_zl4.h" #include "assets/scenes/indoors/nakaniwa/nakaniwa_scene.h" diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.h b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.h index 8710cc9cf9..b371092e08 100644 --- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.h +++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.h @@ -2,12 +2,12 @@ #define Z_EN_ZL4_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnZl4; -typedef void (*EnZl4ActionFunc)(struct EnZl4*, PlayState*); -typedef void (*EnZl4DrawFunc)(struct EnZl4*, PlayState*); +typedef void (*EnZl4ActionFunc)(struct EnZl4*, struct PlayState*); +typedef void (*EnZl4DrawFunc)(struct EnZl4*, struct PlayState*); typedef struct EnZl4 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4_cutscene_data.inc.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4_cutscene_data.inc.c index 3ad3b996be..933f7e0aaa 100644 --- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4_cutscene_data.inc.c +++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4_cutscene_data.inc.c @@ -1,4 +1,4 @@ -#include "z_en_zl4.h" +#include "z64cutscene_commands.h" static CutsceneCameraDirection sCamDirections[] = { { { -490.0f, 120.0f, 0.0f }, { -440.0f, 117.0f, 0.0f }, 0, 45 }, diff --git a/src/overlays/actors/ovl_En_Zo/z_en_zo.c b/src/overlays/actors/ovl_En_Zo/z_en_zo.c index 6eb051e47a..9ab90f08ff 100644 --- a/src/overlays/actors/ovl_En_Zo/z_en_zo.c +++ b/src/overlays/actors/ovl_En_Zo/z_en_zo.c @@ -5,6 +5,19 @@ */ #include "z_en_zo.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_zo/object_zo.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Zo/z_en_zo.h b/src/overlays/actors/ovl_En_Zo/z_en_zo.h index 4d7a02ddf0..5f26a20230 100644 --- a/src/overlays/actors/ovl_En_Zo/z_en_zo.h +++ b/src/overlays/actors/ovl_En_Zo/z_en_zo.h @@ -2,7 +2,7 @@ #define Z_EN_ZO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EnZo; @@ -19,7 +19,7 @@ typedef struct EnZoEffect { /* 0x2C */ Vec3f vec; // Usage specific } EnZoEffect; // size = 0x38 -typedef void (*EnZoActionFunc)(struct EnZo*, PlayState*); +typedef void (*EnZoActionFunc)(struct EnZo*, struct PlayState*); typedef struct EnZo { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c index bce528552b..513dce9afd 100644 --- a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c +++ b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c @@ -5,11 +5,28 @@ */ #include "z_en_fhg.h" -#include "assets/objects/object_fhg/object_fhg.h" #include "overlays/actors/ovl_Door_Shutter/z_door_shutter.h" #include "overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h" #include "overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h" +#include "libc64/qrand.h" +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "segmented_address.h" +#include "seqcmd.h" +#include "sequence.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" +#include "z64skin.h" + +#include "global.h" + +#include "assets/objects/object_fhg/object_fhg.h" + #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED typedef struct EnfHGPainting { diff --git a/src/overlays/actors/ovl_En_fHG/z_en_fhg.h b/src/overlays/actors/ovl_En_fHG/z_en_fhg.h index 5432f82341..dca6eeb82a 100644 --- a/src/overlays/actors/ovl_En_fHG/z_en_fhg.h +++ b/src/overlays/actors/ovl_En_fHG/z_en_fhg.h @@ -2,11 +2,12 @@ #define Z_EN_FHG_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64skin.h" struct EnfHG; -typedef void (*EnfHGActionFunc)(struct EnfHG*, PlayState*); +typedef void (*EnfHGActionFunc)(struct EnfHG*, struct PlayState*); typedef enum EnfHGSignal { /* 0 */ FHG_NO_SIGNAL, diff --git a/src/overlays/actors/ovl_End_Title/z_end_title.c b/src/overlays/actors/ovl_End_Title/z_end_title.c index 961f96f64f..3e2d26e509 100644 --- a/src/overlays/actors/ovl_End_Title/z_end_title.c +++ b/src/overlays/actors/ovl_End_Title/z_end_title.c @@ -5,7 +5,13 @@ */ #include "z_end_title.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sys_matrix.h" #include "versions.h" +#include "z64play.h" +#include "z64player.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_End_Title/z_end_title.h b/src/overlays/actors/ovl_End_Title/z_end_title.h index 9897c0fbf2..cd29ff507c 100644 --- a/src/overlays/actors/ovl_End_Title/z_end_title.h +++ b/src/overlays/actors/ovl_End_Title/z_end_title.h @@ -2,7 +2,7 @@ #define Z_END_TITLE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct EndTitle; diff --git a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c index da8ddad524..3912841eb4 100644 --- a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c +++ b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c @@ -5,6 +5,14 @@ */ #include "z_item_b_heart.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_gi_hearts/object_gi_hearts.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.h b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.h index 432a7ef499..ef92f86b86 100644 --- a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.h +++ b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.h @@ -2,7 +2,7 @@ #define Z_ITEM_B_HEART_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ItemBHeart; diff --git a/src/overlays/actors/ovl_Item_Shield/z_item_shield.c b/src/overlays/actors/ovl_Item_Shield/z_item_shield.c index 0307862327..da65558db1 100644 --- a/src/overlays/actors/ovl_Item_Shield/z_item_shield.c +++ b/src/overlays/actors/ovl_Item_Shield/z_item_shield.c @@ -4,8 +4,20 @@ * Description: Deku Shield */ -#include "terminal.h" #include "z_item_shield.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "segmented_address.h" +#include "sys_math.h" +#include "sys_matrix.h" +#include "terminal.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_link_child/object_link_child.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Item_Shield/z_item_shield.h b/src/overlays/actors/ovl_Item_Shield/z_item_shield.h index c7984f4a4d..564170e465 100644 --- a/src/overlays/actors/ovl_Item_Shield/z_item_shield.h +++ b/src/overlays/actors/ovl_Item_Shield/z_item_shield.h @@ -2,11 +2,11 @@ #define Z_ITEM_SHIELD_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ItemShield; -typedef void (*ItemShieldActionFunc)(struct ItemShield*, PlayState*); +typedef void (*ItemShieldActionFunc)(struct ItemShield*, struct PlayState*); typedef struct ItemShield { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c index d809a82ebe..8b5ef7c199 100644 --- a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c +++ b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c @@ -5,6 +5,15 @@ */ #include "z_magic_dark.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) diff --git a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.h b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.h index 3d7ef82298..59344baff1 100644 --- a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.h +++ b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.h @@ -2,7 +2,7 @@ #define Z_MAGIC_DARK_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct MagicDark; diff --git a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c index ede5f3691c..f93ded2f02 100644 --- a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c +++ b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c @@ -6,6 +6,15 @@ #include "z_magic_fire.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) void MagicFire_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.h b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.h index 4a9cb5188c..ae953c0d3c 100644 --- a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.h +++ b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.h @@ -2,7 +2,7 @@ #define Z_MAGIC_FIRE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct MagicFire; diff --git a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c index 0694e07128..2872bdc70c 100644 --- a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c +++ b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c @@ -6,6 +6,14 @@ #include "z_magic_wind.h" +#include "libu64/debug.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" +#include "z64curve.h" +#include "z64play.h" +#include "z64player.h" + #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) void MagicWind_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.h b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.h index e9521f7002..b7ba93c264 100644 --- a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.h +++ b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.h @@ -2,11 +2,12 @@ #define Z_MAGIC_WIND_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64curve.h" struct MagicWind; -typedef void (*MagicWindFunc)(struct MagicWind* this, PlayState* play); +typedef void (*MagicWindFunc)(struct MagicWind* this, struct PlayState* play); typedef struct MagicWind { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c index cb7cba62c0..8f24b7e647 100644 --- a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c +++ b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c @@ -7,6 +7,10 @@ #include "z_obj_blockstop.h" #include "overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64play.h" + #define FLAGS 0 void ObjBlockstop_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.h b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.h index f6ff149e9d..e0159e0f97 100644 --- a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.h +++ b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.h @@ -2,7 +2,7 @@ #define Z_OBJ_BLOCKSTOP_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjBlockstop; diff --git a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c index 68e1687aa8..9563d5d2b4 100644 --- a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c +++ b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c @@ -6,6 +6,15 @@ #include "z_obj_bombiwa.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" + +#include "libc64/qrand.h" +#include "ichain.h" +#include "rand.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/object_bombiwa/object_bombiwa.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.h b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.h index 33597276b0..9c5c38d127 100644 --- a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.h +++ b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.h @@ -2,7 +2,7 @@ #define Z_OBJ_BOMBIWA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjBombiwa; diff --git a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c index 3a0d603aae..46024753d9 100644 --- a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c +++ b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c @@ -5,6 +5,13 @@ */ #include "z_obj_dekujr.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z64play.h" + #include "assets/objects/object_dekujr/object_dekujr.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.h b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.h index 88818776a2..68b483f8dc 100644 --- a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.h +++ b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.h @@ -2,7 +2,7 @@ #define Z_OBJ_DEKUJR_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjDekujr; diff --git a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c index 411d3e2ad9..fd9d335b65 100644 --- a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c +++ b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c @@ -5,6 +5,12 @@ */ #include "z_obj_elevator.h" + +#include "ichain.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_d_elevator/object_d_elevator.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.h b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.h index e77d04a9ae..e6b8d4b6d8 100644 --- a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.h +++ b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.h @@ -2,11 +2,11 @@ #define Z_OBJ_ELEVATOR_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjElevator; -typedef void (*ObjElevatorActionFunc)(struct ObjElevator*, PlayState*); +typedef void (*ObjElevatorActionFunc)(struct ObjElevator*, struct PlayState*); typedef struct ObjElevator { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c index 3f45341e30..f7ec91ca08 100644 --- a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c +++ b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c @@ -5,6 +5,18 @@ */ #include "z_obj_hamishi.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "rand.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/gameplay_field_keep/gameplay_field_keep.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.h b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.h index a897177f64..8a2256bf04 100644 --- a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.h +++ b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.h @@ -2,7 +2,7 @@ #define Z_OBJ_HAMISHI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjHamishi; diff --git a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c index badd99186d..a70b4a4a43 100644 --- a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c +++ b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c @@ -5,6 +5,10 @@ */ #include "z_obj_hana.h" + +#include "ichain.h" +#include "z64play.h" + #include "assets/objects/gameplay_field_keep/gameplay_field_keep.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.h b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.h index 7fdd3bfa89..69c08b4cb6 100644 --- a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.h +++ b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.h @@ -2,7 +2,7 @@ #define Z_OBJ_HANA_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjHana; diff --git a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c index d946077670..e76c104657 100644 --- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c +++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c @@ -5,6 +5,15 @@ */ #include "z_obj_hsblock.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "regs.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" + #include "assets/objects/object_d_hsblock/object_d_hsblock.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.h b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.h index 6548ca9b97..299ba7d3d6 100644 --- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.h +++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.h @@ -2,11 +2,11 @@ #define Z_OBJ_HSBLOCK_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjHsblock; -typedef void (*ObjHsblockActionFunc)(struct ObjHsblock*, PlayState*); +typedef void (*ObjHsblockActionFunc)(struct ObjHsblock*, struct PlayState*); typedef struct ObjHsblock { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c index 23b1728fcc..bdbecf5a74 100644 --- a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c +++ b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c @@ -5,6 +5,17 @@ */ #include "z_obj_ice_poly.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "one_point_cutscene.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h index 8ebbe8d128..22bdf34d95 100644 --- a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h +++ b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h @@ -2,11 +2,11 @@ #define Z_OBJ_ICE_POLY_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjIcePoly; -typedef void (*ObjIcePolyActionFunc)(struct ObjIcePoly*, PlayState*); +typedef void (*ObjIcePolyActionFunc)(struct ObjIcePoly*, struct PlayState*); typedef struct ObjIcePoly { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c index e13352a5a3..1545430f1a 100644 --- a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c +++ b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c @@ -5,9 +5,17 @@ */ #include "z_obj_lift.h" -#include "assets/objects/object_d_lift/object_d_lift.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" + +#include "libc64/qrand.h" +#include "ichain.h" #include "quake.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + +#include "assets/objects/object_d_lift/object_d_lift.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.h b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.h index 6ca27dddac..e3f217b930 100644 --- a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.h +++ b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.h @@ -2,11 +2,11 @@ #define Z_OBJ_LIFT_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjLift; -typedef void (*ObjLiftActionFunc)(struct ObjLift*, PlayState*); +typedef void (*ObjLiftActionFunc)(struct ObjLift*, struct PlayState*); typedef struct ObjLift { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c index 24bcb06a6a..8d0447bfb2 100644 --- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c +++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c @@ -5,8 +5,21 @@ */ #include "z_obj_lightswitch.h" -#include "terminal.h" #include "overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "terminal.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/object_lightswitch/object_lightswitch.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h index 54b7e162f7..7f0834a240 100644 --- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h +++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h @@ -2,11 +2,11 @@ #define Z_OBJ_LIGHTSWITCH_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjLightswitch; -typedef void (*ObjLightswitchActionFunc)(struct ObjLightswitch*, PlayState*); +typedef void (*ObjLightswitchActionFunc)(struct ObjLightswitch*, struct PlayState*); typedef enum ObjLightswitch_Type { /* 0 */ OBJLIGHTSWITCH_TYPE_STAY_ON, // doesn't turn off unless the switch flag is cleared some other way diff --git a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c index 3ea20567ef..5004472a56 100644 --- a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c +++ b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c @@ -6,7 +6,13 @@ #include "z_obj_makeoshihiki.h" #include "overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h" + +#include "sfx.h" +#include "sys_math3d.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" #define FLAGS ACTOR_FLAG_DRAW_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.h b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.h index 16dc3ba470..84938f578a 100644 --- a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.h +++ b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.h @@ -2,7 +2,7 @@ #define Z_OBJ_MAKEOSHIHIKI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjMakeoshihiki; diff --git a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c index bcdb0558e7..ecffdfbe7c 100644 --- a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c +++ b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c @@ -6,6 +6,11 @@ #include "z_obj_mure2.h" +#include "ichain.h" +#include "sys_math3d.h" +#include "z_lib.h" +#include "z64play.h" + #define FLAGS 0 typedef void (*ObjMure2SetPosFunc)(Vec3f* vec, ObjMure2* this); diff --git a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.h b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.h index a197e9f7b0..8643d477e1 100644 --- a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.h +++ b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.h @@ -2,11 +2,11 @@ #define Z_OBJ_MURE2_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjMure2; -typedef void (*ObjMure2ActionFunc)(struct ObjMure2*, PlayState*); +typedef void (*ObjMure2ActionFunc)(struct ObjMure2*, struct PlayState*); typedef struct ObjMure2 { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index 2d4457d3e8..2817c14f2a 100644 --- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -6,6 +6,18 @@ #include "z_obj_oshihiki.h" #include "overlays/actors/ovl_Obj_Switch/z_obj_switch.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "regs.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h index 90dce5ca45..265ba4691c 100644 --- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h +++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h @@ -2,7 +2,7 @@ #define Z_OBJ_OSHIHIKI_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjOshihiki; @@ -27,7 +27,7 @@ typedef enum PushBlockType { #define PUSHBLOCK_SETUP_FALL (1 << 7) #define PUSHBLOCK_MOVE_UNDER (1 << 8) -typedef void (*ObjOshihikiActionFunc)(struct ObjOshihiki*, PlayState*); +typedef void (*ObjOshihikiActionFunc)(struct ObjOshihiki*, struct PlayState*); typedef struct ObjOshihiki { /* 0x0000 */ DynaPolyActor dyna; @@ -40,7 +40,7 @@ typedef struct ObjOshihiki { /* 0x0178 */ f32 pushDist; /* 0x017C */ f32 direction; /* 0x0180 */ s32 floorBgIds[5]; - /* 0x0194 */ CollisionPoly* floorPolys[5]; + /* 0x0194 */ struct CollisionPoly* floorPolys[5]; /* 0x01A8 */ f32 floorHeights[5]; /* 0x01BC */ s16 highestFloor; /* 0x01BE */ u8 cantMove; diff --git a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c index 8ed5e8558e..8ea4ba33f7 100644 --- a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c +++ b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c @@ -6,6 +6,10 @@ #include "z_obj_roomtimer.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64play.h" + #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED void ObjRoomtimer_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.h b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.h index 2f1b08d9c9..ee8e74eaa2 100644 --- a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.h +++ b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.h @@ -2,12 +2,11 @@ #define Z_OBJ_ROOMTIMER_H #include "ultra64.h" -#include "global.h" -#include "z64.h" +#include "z64actor.h" struct ObjRoomtimer; -typedef void (*ObjRoomtimerActionFunc)(struct ObjRoomtimer*, PlayState*); +typedef void (*ObjRoomtimerActionFunc)(struct ObjRoomtimer*, struct PlayState*); typedef struct ObjRoomtimer { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index 83d714077f..c238b3d9da 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -5,8 +5,21 @@ */ #include "z_obj_switch.h" -#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "rumble.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h index 67a9d66356..b4d3ae8b20 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h @@ -2,12 +2,12 @@ #define Z_OBJ_SWITCH_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjSwitch; -typedef void (*ObjSwitchActionFunc)(struct ObjSwitch*, PlayState*); -typedef void (*ObjSwitchDrawFunc)(Actor*, PlayState*); +typedef void (*ObjSwitchActionFunc)(struct ObjSwitch*, struct PlayState*); +typedef void (*ObjSwitchDrawFunc)(Actor*, struct PlayState*); typedef enum ObjSwitchType { /* 0 */ OBJSWITCH_TYPE_FLOOR, diff --git a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c index bc231076ce..0beebfd17d 100644 --- a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c +++ b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c @@ -5,6 +5,18 @@ */ #include "z_obj_timeblock.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64ocarina.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_timeblock/object_timeblock.h" #define FLAGS \ diff --git a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.h b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.h index 9bd393b194..966f474496 100644 --- a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.h +++ b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.h @@ -2,12 +2,12 @@ #define Z_OBJ_TIMEBLOCK_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjTimeblock; -typedef s32 (*ObjTimeblockSongObserverFunc)(struct ObjTimeblock*, PlayState*); -typedef void (*ObjTimeblockActionFunc)(struct ObjTimeblock*, PlayState*); +typedef s32 (*ObjTimeblockSongObserverFunc)(struct ObjTimeblock*, struct PlayState*); +typedef void (*ObjTimeblockActionFunc)(struct ObjTimeblock*, struct PlayState*); typedef struct ObjTimeblock { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c index 94c6618470..aed6b65e70 100644 --- a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c +++ b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c @@ -5,8 +5,21 @@ */ #include "z_obj_warp2block.h" -#include "assets/objects/object_timeblock/object_timeblock.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "sfx.h" +#include "sys_math3d.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64ocarina.h" +#include "z64play.h" +#include "z64player.h" + +#include "assets/objects/object_timeblock/object_timeblock.h" #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA | \ diff --git a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.h b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.h index 3e09d976c2..8f22398db7 100644 --- a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.h +++ b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.h @@ -2,12 +2,12 @@ #define Z_OBJ_WARP2BLOCK_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjWarp2block; -typedef void (*ObjWarp2blockActionFunc)(struct ObjWarp2block*, PlayState*); -typedef s32 (*ObjWarp2blockFunc168)(struct ObjWarp2block*, PlayState*); +typedef void (*ObjWarp2blockActionFunc)(struct ObjWarp2block*, struct PlayState*); +typedef s32 (*ObjWarp2blockFunc168)(struct ObjWarp2block*, struct PlayState*); typedef struct ObjWarp2block { /* 0x0000 */ DynaPolyActor dyna; diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c index 25048f5349..d76ccb548d 100644 --- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -5,6 +5,22 @@ */ #include "z_object_kankyo.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_math3d.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64play.h" +#include "z64player.h" + +#include "global.h" + #include "assets/objects/object_demo_kekkai/object_demo_kekkai.h" #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_spot02_objects/object_spot02_objects.h" diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.h b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.h index 4449fa013c..40307f5e91 100644 --- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.h +++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.h @@ -2,11 +2,11 @@ #define Z_OBJECT_KANKYO_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct ObjectKankyo; -typedef void (*ObjectKankyoActionFunc)(struct ObjectKankyo*, PlayState*); +typedef void (*ObjectKankyoActionFunc)(struct ObjectKankyo*, struct PlayState*); typedef struct ObjectKankyoEffect { /* 0x00 */ u8 state; diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c index 5aeb61031a..2276e833ff 100644 --- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c +++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c @@ -5,7 +5,18 @@ */ #include "z_oceff_spot.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "regs.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64light.h" +#include "z64ocarina.h" +#include "z64play.h" +#include "z64player.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.h b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.h index a96f1878af..222c977fc2 100644 --- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.h +++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.h @@ -2,11 +2,12 @@ #define Z_OCEFF_SPOT_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" +#include "z64light.h" struct OceffSpot; -typedef void (*OceffSpotActionFunc)(struct OceffSpot*, PlayState*); +typedef void (*OceffSpotActionFunc)(struct OceffSpot*, struct PlayState*); typedef struct OceffSpot { /* 0x0000 */ Actor actor; diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c index f9b14bc7de..e44f6d145f 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -5,7 +5,14 @@ */ #include "z_oceff_wipe.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.h b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.h index 9e5131737c..65a18468a3 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.h +++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.h @@ -2,7 +2,7 @@ #define Z_OCEFF_WIPE_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" typedef enum OceffWipeType { /* 0x00 */ OCEFF_WIPE_ZL, diff --git a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c index 9e3b03a8f9..e01d79aa70 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c +++ b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c @@ -5,7 +5,14 @@ */ #include "z_oceff_wipe2.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) diff --git a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.h b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.h index c7f9c7b870..6276bb33c4 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.h +++ b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.h @@ -2,7 +2,7 @@ #define Z_OCEFF_WIPE2_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct OceffWipe2; diff --git a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c index 757e9b116d..881d2fbe70 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c +++ b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c @@ -5,7 +5,14 @@ */ #include "z_oceff_wipe3.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) diff --git a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.h b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.h index a5bc2bbe4c..5e6abb0456 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.h +++ b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.h @@ -2,7 +2,7 @@ #define Z_OCEFF_WIPE3_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" struct OceffWipe3; diff --git a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c index 9ad0dbf68e..7263cd16f4 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c +++ b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c @@ -5,7 +5,13 @@ */ #include "z_oceff_wipe4.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "sys_matrix.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) diff --git a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.h b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.h index 3986c1fce5..bd82ddc7c4 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.h +++ b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.h @@ -2,7 +2,7 @@ #define Z_OCEFF_WIPE4_H #include "ultra64.h" -#include "global.h" +#include "z64actor.h" typedef enum OceffWipe4Type { /* 0x00 */ OCEFF_WIPE4_SCARECROWS, diff --git a/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c b/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c index c4ab534692..3bdadb99f7 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c +++ b/src/overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.c @@ -6,6 +6,18 @@ #include "z_eff_ss_fhg_flash.h" #include "overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "segmented_address.h" +#include "sys_matrix.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" +#include "z64skin.h" + #include "assets/objects/object_fhg/object_fhg.h" #define rAlpha regs[0] From 46399145833eb2367946c72c1ed2088897658f4d Mon Sep 17 00:00:00 2001 From: mzxrules Date: Thu, 13 Feb 2025 18:15:14 -0500 Subject: [PATCH 09/15] Reduce overlay dependencies on global.h (6) (#2468) * add some headers, split some of z64.h * MtxClear -> IdentityMtx * more misc cleanups * move D_80116280 to header, fix build issue * remove z64.h * Revert "MtxClear -> IdentityMtx" This reverts commit 8fc74c0672f72b91ae4068e73228fc46fe9465d4. * split z64path.h and z64skin.h functions * z64face_reaction.h * cleanup overlay global references * trim padding * bss --- include/fault.h | 2 +- include/functions.h | 38 ---------- include/libu64/mtxuty-cvt.h | 9 +++ include/macros.h | 5 +- include/sys_ucode.h | 11 +++ include/variables.h | 1 - include/z64.h | 30 -------- include/z64face_reaction.h | 74 +++++++++++++++++++ include/z64game.h | 15 ++++ include/z64inventory.h | 1 - include/z64message.h | 64 ---------------- include/z64path.h | 19 +++++ include/z64play.h | 2 +- include/z64scene.h | 6 +- include/z64skin.h | 19 +++++ include/z64thread.h | 33 +++++++++ src/boot/boot_main.c | 1 + src/boot/idle.c | 1 + src/boot/z_std_dma.c | 3 +- src/code/fault_gc.c | 3 +- src/code/fault_n64.c | 1 + src/code/graph.c | 1 + src/code/irqmgr.c | 1 + src/code/main.c | 3 +- src/code/padmgr.c | 1 + src/code/sched.c | 1 + src/code/sys_matrix.c | 12 ++- src/code/sys_ucode.c | 2 +- src/code/ucode_disas.c | 7 +- src/code/z_actor.c | 19 ++++- src/code/z_camera.c | 2 +- src/code/z_face_reaction.c | 6 +- src/code/z_frame_advance.c | 2 +- src/code/z_jpeg.c | 6 ++ src/code/z_kankyo.c | 4 +- src/code/z_nulltask.c | 3 +- src/code/z_path.c | 2 + src/code/z_room.c | 1 + src/code/z_skin.c | 8 +- src/code/z_skin_awb.c | 7 +- src/libu64/mtxuty-cvt.c | 6 +- src/n64dd/z_n64dd.c | 1 + .../actors/ovl_Arrow_Fire/z_arrow_fire.c | 2 - .../actors/ovl_Arrow_Ice/z_arrow_ice.c | 2 - .../actors/ovl_Arrow_Light/z_arrow_light.c | 2 - src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 2 - src/overlays/actors/ovl_Demo_6K/z_demo_6k.c | 2 - src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c | 10 ++- src/overlays/actors/ovl_En_Ani/z_en_ani.c | 3 +- src/overlays/actors/ovl_En_Arrow/z_en_arrow.c | 16 +++- .../ovl_En_Attack_Niw/z_en_attack_niw.c | 2 - .../actors/ovl_En_Bigokuta/z_en_bigokuta.c | 2 - src/overlays/actors/ovl_En_Boom/z_en_boom.c | 11 ++- src/overlays/actors/ovl_En_Box/z_en_box.c | 19 ++++- src/overlays/actors/ovl_En_Bw/z_en_bw.c | 2 - src/overlays/actors/ovl_En_Cs/z_en_cs.c | 5 +- src/overlays/actors/ovl_En_Daiku/z_en_daiku.c | 2 - .../z_en_daiku_kakariko.c | 3 +- src/overlays/actors/ovl_En_Dh/z_en_dh.c | 2 - .../ovl_En_Diving_Game/z_en_diving_game.c | 3 +- src/overlays/actors/ovl_En_Dog/z_en_dog.c | 2 - src/overlays/actors/ovl_En_Door/z_en_door.c | 12 ++- src/overlays/actors/ovl_En_Du/z_en_du.c | 3 +- src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c | 2 - src/overlays/actors/ovl_En_Fish/z_en_fish.c | 13 +++- src/overlays/actors/ovl_En_Fu/z_en_fu.c | 3 +- src/overlays/actors/ovl_En_Ge1/z_en_ge1.c | 3 +- src/overlays/actors/ovl_En_Go2/z_en_go2.c | 3 +- src/overlays/actors/ovl_En_Gs/z_en_gs.c | 2 - .../actors/ovl_En_Heishi2/z_en_heishi2.c | 3 +- .../actors/ovl_En_Heishi4/z_en_heishi4.c | 3 +- src/overlays/actors/ovl_En_Horse/z_en_horse.c | 2 - .../ovl_En_Horse_Ganon/z_en_horse_ganon.c | 2 - .../z_en_horse_link_child.c | 9 ++- .../ovl_En_Horse_Normal/z_en_horse_normal.c | 2 - .../ovl_En_Horse_Zelda/z_en_horse_zelda.c | 2 - src/overlays/actors/ovl_En_Hs2/z_en_hs2.c | 3 +- src/overlays/actors/ovl_En_Hy/z_en_hy.c | 3 +- src/overlays/actors/ovl_En_In/z_en_in.c | 3 +- .../actors/ovl_En_Kanban/z_en_kanban.c | 19 ++++- .../ovl_En_Kanban/z_en_kanban_gfx.inc.c | 2 +- src/overlays/actors/ovl_En_Ko/z_en_ko.c | 1 + src/overlays/actors/ovl_En_Kz/z_en_kz.c | 4 +- src/overlays/actors/ovl_En_Ma1/z_en_ma1.c | 3 +- src/overlays/actors/ovl_En_Ma2/z_en_ma2.c | 3 +- src/overlays/actors/ovl_En_Ma3/z_en_ma3.c | 2 - src/overlays/actors/ovl_En_Md/z_en_md.c | 1 + src/overlays/actors/ovl_En_Mk/z_en_mk.c | 3 +- src/overlays/actors/ovl_En_Mm/z_en_mm.c | 3 +- src/overlays/actors/ovl_En_Ms/z_en_ms.c | 3 +- src/overlays/actors/ovl_En_Mu/z_en_mu.c | 3 +- src/overlays/actors/ovl_En_Nb/z_en_nb.c | 3 +- .../actors/ovl_En_Niw_Lady/z_en_niw_lady.c | 3 +- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 2 - src/overlays/actors/ovl_En_Poh/z_en_poh.c | 2 - src/overlays/actors/ovl_En_Rd/z_en_rd.c | 2 - src/overlays/actors/ovl_En_Ru1/z_en_ru1.c | 3 +- src/overlays/actors/ovl_En_Sa/z_en_sa.c | 3 +- src/overlays/actors/ovl_En_Skj/z_en_skj.c | 3 +- src/overlays/actors/ovl_En_Ssh/z_en_ssh.c | 3 +- .../ovl_En_Syateki_Niw/z_en_syateki_niw.c | 1 - src/overlays/actors/ovl_En_Ta/z_en_ta.c | 3 +- src/overlays/actors/ovl_En_Tg/z_en_tg.c | 3 +- src/overlays/actors/ovl_En_Tk/z_en_tk.c | 3 +- .../actors/ovl_En_Torch2/z_en_torch2.c | 2 - src/overlays/actors/ovl_En_Toryo/z_en_toryo.c | 3 +- .../actors/ovl_En_Weiyer/z_en_weiyer.c | 2 - src/overlays/actors/ovl_En_Zf/z_en_zf.c | 2 - src/overlays/actors/ovl_En_Zl3/z_en_zl3.c | 2 - src/overlays/actors/ovl_En_Zl4/z_en_zl4.c | 3 +- src/overlays/actors/ovl_En_Zo/z_en_zo.c | 3 +- src/overlays/actors/ovl_En_fHG/z_en_fhg.c | 2 - .../ovl_Obj_Makekinsuta/z_obj_makekinsuta.c | 4 +- .../actors/ovl_Oceff_Storm/z_oceff_storm.c | 2 - .../ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c | 10 ++- .../misc/ovl_kaleido_scope/z_kaleido_map.c | 2 + 116 files changed, 419 insertions(+), 297 deletions(-) create mode 100644 include/libu64/mtxuty-cvt.h create mode 100644 include/sys_ucode.h create mode 100644 include/z64face_reaction.h create mode 100644 include/z64path.h create mode 100644 include/z64thread.h diff --git a/include/fault.h b/include/fault.h index 8f1979520f..7418246f46 100644 --- a/include/fault.h +++ b/include/fault.h @@ -3,7 +3,7 @@ #include "ultra64.h" #include "attributes.h" -#include "padmgr.h" +#include "libu64/pad.h" #if !PLATFORM_N64 // These are the same as the 3-bit ansi color codes diff --git a/include/functions.h b/include/functions.h index 4a949a2af5..445e7783ff 100644 --- a/include/functions.h +++ b/include/functions.h @@ -49,7 +49,6 @@ void* MemCpy(void* dest, const void* src, s32 len); u16 QuestHint_GetSariaTextId(PlayState* play); u16 QuestHint_GetNaviTextId(PlayState* play); -u16 MaskReaction_GetTextId(PlayState* play, u32 maskReactionSet); void CutsceneFlags_UnsetAll(PlayState* play); void CutsceneFlags_Set(PlayState* play, s16 flag); void CutsceneFlags_Unset(PlayState* play, s16 flag); @@ -78,10 +77,6 @@ void PreNmiBuff_SetReset(PreNmiBuff* this); u32 PreNmiBuff_IsResetting(PreNmiBuff* this); void Sched_FlushTaskQueue(void); -Path* Path_GetByIndex(PlayState* play, s16 index, s16 max); -f32 Path_OrientAndGetDistSq(Actor* actor, Path* path, s16 waypoint, s16* yaw); -void Path_CopyLastPoint(Path* path, Vec3f* dest); - void PreNMI_Init(GameState* thisx); void func_80095AA0(PlayState* play, Room* room, Input* input, s32 arg3); @@ -96,21 +91,6 @@ void Room_FinishRoomChange(PlayState* play, RoomContext* roomCtx); void Sample_Destroy(GameState* thisx); void Sample_Init(GameState* thisx); -void Skin_UpdateVertices(MtxF* mtx, SkinVertex* skinVertices, SkinLimbModif* modifEntry, Vtx* vtxBuf, Vec3f* pos); -void Skin_DrawAnimatedLimb(GraphicsContext* gfxCtx, Skin* skin, s32 limbIndex, s32 arg3, s32 drawFlags); -void Skin_DrawLimb(GraphicsContext* gfxCtx, Skin* skin, s32 limbIndex, Gfx* dlistOverride, s32 drawFlags); -void func_800A6330(Actor* actor, PlayState* play, Skin* skin, SkinPostDraw postDraw, s32 setTranslation); -void func_800A6360(Actor* actor, PlayState* play, Skin* skin, SkinPostDraw postDraw, - SkinOverrideLimbDraw overrideLimbDraw, s32 setTranslation); -void func_800A6394(Actor* actor, PlayState* play, Skin* skin, SkinPostDraw postDraw, - SkinOverrideLimbDraw overrideLimbDraw, s32 setTranslation, s32 arg6); -void func_800A63CC(Actor* actor, PlayState* play, Skin* skin, SkinPostDraw postDraw, - SkinOverrideLimbDraw overrideLimbDraw, s32 setTranslation, s32 arg6, s32 drawFlags); -void Skin_GetLimbPos(Skin* skin, s32 limbIndex, Vec3f* offset, Vec3f* dst); -void Skin_Init(PlayState* play, Skin* skin, SkeletonHeader* skeletonHeader, AnimationHeader* animationHeader); -void Skin_Free(PlayState* play, Skin* skin); -s32 Skin_ApplyAnimTransformations(Skin* skin, MtxF* limbMatrices, Actor* actor, s32 setTranslation); - void Sram_InitNewSave(void); void Sram_InitDebugSave(void); void Sram_OpenSave(SramContext* sramCtx); @@ -197,19 +177,7 @@ void func_800C213C(PreRender* this, Gfx** gfxP); void PreRender_RestoreFramebuffer(PreRender* this, Gfx** gfxP); void PreRender_CopyImageRegion(PreRender* this, Gfx** gfxP); void PreRender_ApplyFilters(PreRender* this); -void GameState_SetFBFilter(Gfx** gfxP); -void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx); -void GameState_SetFrameBuffer(GraphicsContext* gfxCtx); -void GameState_ReqPadData(GameState* gameState); -void GameState_Update(GameState* gameState); -void GameState_InitArena(GameState* gameState, size_t size); -void GameState_Realloc(GameState* gameState, size_t size); -void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* gfxCtx); -void GameState_Destroy(GameState* gameState); -GameStateFunc GameState_GetInit(GameState* gameState); -u32 GameState_IsRunning(GameState* gameState); #if DEBUG_FEATURES -void* GameState_Alloc(GameState* gameState, size_t size, const char* file, int line); void* GameAlloc_MallocDebug(GameAlloc* this, u32 size, const char* file, int line); #endif void* GameAlloc_Malloc(GameAlloc* this, u32 size); @@ -233,10 +201,6 @@ void SysCfb_Init(s32 n64dd); void* SysCfb_GetFbPtr(s32 idx); void* SysCfb_GetFbEnd(void); -u64* SysUcode_GetUCodeBoot(void); -size_t SysUcode_GetUCodeBootSize(void); -u64* SysUcode_GetUCode(void); -u64* SysUcode_GetUCodeData(void); NORETURN void func_800D31A0(void); void func_800D31F0(void); void func_800D3210(void); @@ -262,8 +226,6 @@ void DebugArena_Display(void); void RcpUtils_PrintRegisterStatus(void); void RcpUtils_Reset(void); void* Overlay_AllocateAndLoad(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, void* vramEnd); -void MtxConv_F2L(Mtx* m1, MtxF* m2); -void MtxConv_L2F(MtxF* m1, Mtx* m2); void Overlay_Relocate(void* allocatedRamAddr, OverlayRelocationSection* ovlRelocs, void* vramStart); size_t Overlay_Load(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, void* vramEnd, void* allocatedRamAddr); // ? func_800FC800(?); diff --git a/include/libu64/mtxuty-cvt.h b/include/libu64/mtxuty-cvt.h new file mode 100644 index 0000000000..636978bb6f --- /dev/null +++ b/include/libu64/mtxuty-cvt.h @@ -0,0 +1,9 @@ +#ifndef LIBU64_MTXUTY_CVT_H +#define LIBU64_MTXUTY_CVT_H + +#include "ultra64.h" + +void MtxConv_F2L(Mtx* m1, MtxF* m2); +void MtxConv_L2F(MtxF* m1, Mtx* m2); + +#endif diff --git a/include/macros.h b/include/macros.h index 343484028d..45cdf6935a 100644 --- a/include/macros.h +++ b/include/macros.h @@ -4,6 +4,9 @@ #include "terminal.h" #include "versions.h" +#define SCREEN_WIDTH 320 +#define SCREEN_HEIGHT 240 + #ifndef AVOID_UB #define BAD_RETURN(type) type #else @@ -116,7 +119,6 @@ #define DMA_REQUEST_SYNC(ram, vrom, size, file, line) DmaMgr_RequestSyncDebug(ram, vrom, size, file, line) #define DMA_REQUEST_ASYNC(req, ram, vrom, size, unk5, queue, msg, file, line) DmaMgr_RequestAsyncDebug(req, ram, vrom, size, unk5, queue, msg, file, line) -#define GAME_STATE_ALLOC(gameState, size, file, line) GameState_Alloc(gameState, size, file, line) #define DEBUG_ARENA_MALLOC(size, file, line) DebugArena_MallocDebug(size, file, line) #define DEBUG_ARENA_MALLOC_R(size, file, line) DebugArena_MallocRDebug(size, file, line) #define DEBUG_ARENA_FREE(size, file, line) DebugArena_FreeDebug(size, file, line) @@ -131,7 +133,6 @@ #define DMA_REQUEST_SYNC(ram, vrom, size, file, line) DmaMgr_RequestSync(ram, vrom, size) #define DMA_REQUEST_ASYNC(req, ram, vrom, size, unk5, queue, msg, file, line) DmaMgr_RequestAsync(req, ram, vrom, size, unk5, queue, msg) -#define GAME_STATE_ALLOC(gameState, size, file, line) THA_AllocTailAlign16(&(gameState)->tha, size) #define DEBUG_ARENA_MALLOC(size, file, line) DebugArena_Malloc(size) #define DEBUG_ARENA_MALLOC_R(size, file, line) DebugArena_MallocR(size) #define DEBUG_ARENA_FREE(size, file, line) DebugArena_Free(size) diff --git a/include/sys_ucode.h b/include/sys_ucode.h new file mode 100644 index 0000000000..fa690d4784 --- /dev/null +++ b/include/sys_ucode.h @@ -0,0 +1,11 @@ +#ifndef SYS_UCODE_H +#define SYS_UCODE_H + +#include "ultra64.h" + +u64* SysUcode_GetUCodeBoot(void); +size_t SysUcode_GetUCodeBootSize(void); +u64* SysUcode_GetUCode(void); +u64* SysUcode_GetUCodeData(void); + +#endif diff --git a/include/variables.h b/include/variables.h index f5f4599e7a..39c73df77b 100644 --- a/include/variables.h +++ b/include/variables.h @@ -68,7 +68,6 @@ extern u32 __osBaseCounter; extern u32 __osViIntrCount; extern u32 __osTimerCounter; extern EffectSsOverlay gEffectSsOverlayTable[EFFECT_SS_TYPE_MAX]; -extern Gfx D_80116280[]; extern ActorOverlay gActorOverlayTable[ACTOR_ID_MAX]; // original name: "actor_dlftbls" 801162A0 extern s32 gMaxActorId; // original name: "MaxProfile" extern s32 gDebugCamEnabled; diff --git a/include/z64.h b/include/z64.h index f53bac0e88..e59a8caa0c 100644 --- a/include/z64.h +++ b/include/z64.h @@ -87,36 +87,6 @@ #include "libc64/sprintf.h" #include "libu64/debug.h" -#define SCREEN_WIDTH 320 -#define SCREEN_HEIGHT 240 - -#define THREAD_PRI_IDLE_INIT 10 -#define THREAD_PRI_MAIN_INIT 10 -#define THREAD_PRI_DMAMGR_LOW 10 // Used when decompressing files -#define THREAD_PRI_GRAPH 11 -#define THREAD_PRI_AUDIOMGR 12 -#define THREAD_PRI_N64DD 13 -#define THREAD_PRI_DDMSG 13 -#define THREAD_PRI_PADMGR 14 -#define THREAD_PRI_MAIN 15 -#define THREAD_PRI_SCHED 15 -#define THREAD_PRI_DMAMGR 16 -#define THREAD_PRI_IRQMGR 17 -#define THREAD_PRI_FAULT_CLIENT (OS_PRIORITY_APPMAX - 1) -#define THREAD_PRI_FAULT OS_PRIORITY_APPMAX - -#define THREAD_ID_IDLE 1 -#define THREAD_ID_FAULT 2 -#define THREAD_ID_MAIN 3 -#define THREAD_ID_GRAPH 4 -#define THREAD_ID_SCHED 5 -#define THREAD_ID_PADMGR 7 -#define THREAD_ID_N64DD 8 -#define THREAD_ID_DDMSG 9 -#define THREAD_ID_AUDIOMGR 10 -#define THREAD_ID_DMAMGR 18 -#define THREAD_ID_IRQMGR 19 - typedef enum LensMode { /* 0 */ LENS_MODE_SHOW_ACTORS, // lens actors are invisible by default, and shown by using lens (for example, invisible enemies) /* 1 */ LENS_MODE_HIDE_ACTORS // lens actors are visible by default, and hidden by using lens (for example, fake walls) diff --git a/include/z64face_reaction.h b/include/z64face_reaction.h new file mode 100644 index 0000000000..274340ebcb --- /dev/null +++ b/include/z64face_reaction.h @@ -0,0 +1,74 @@ +#ifndef Z64FACE_REACTION_H +#define Z64FACE_REACTION_H + +#include "ultra64.h" + +struct PlayState; + +typedef enum MaskReactionSet { + /* 0x00 */ MASK_REACTION_SET_CARPENTER_BOSS, + /* 0x01 */ MASK_REACTION_SET_CARPENTER_1, + /* 0x02 */ MASK_REACTION_SET_CARPENTER_2, + /* 0x03 */ MASK_REACTION_SET_CARPENTER_3, + /* 0x04 */ MASK_REACTION_SET_CARPENTER_4, + /* 0x05 */ MASK_REACTION_SET_HYRULIAN_GUARD, + /* 0x06 */ MASK_REACTION_SET_HEISHI4_1, + /* 0x07 */ MASK_REACTION_SET_HEISHI4_2, + /* 0x08 */ MASK_REACTION_SET_CUCCO_LADY, + /* 0x09 */ MASK_REACTION_SET_CARPENTERS_SON, + /* 0x0A */ MASK_REACTION_SET_KAKARIKO_ROOF_MAN, + /* 0x0B */ MASK_REACTION_SET_WINDMILL_MAN, + /* 0x0C */ MASK_REACTION_SET_12, // Unused + /* 0x0D */ MASK_REACTION_SET_CURSED_SKULLTULA_MAN, + /* 0x0E */ MASK_REACTION_SET_DAMPE, + /* 0x0F */ MASK_REACTION_SET_GRAVEYARD_KID, + /* 0x10 */ MASK_REACTION_SET_SARIA, + /* 0x11 */ MASK_REACTION_SET_MIDO, + /* 0x12 */ MASK_REACTION_SET_FADO, + /* 0x13 */ MASK_REACTION_SET_KOKIRI_1, + /* 0x14 */ MASK_REACTION_SET_KOKIRI_2, + /* 0x15 */ MASK_REACTION_SET_SKULL_KID, + /* 0x16 */ MASK_REACTION_SET_ZELDA, + /* 0x17 */ MASK_REACTION_SET_MALON, + /* 0x18 */ MASK_REACTION_SET_TALON, + /* 0x19 */ MASK_REACTION_SET_INGO, + /* 0x1A */ MASK_REACTION_SET_LAKESIDE_PROFESSOR, + /* 0x1B */ MASK_REACTION_SET_MAGIC_BEAN_SALESMAN, + /* 0x1C */ MASK_REACTION_SET_RUNNING_MAN, + /* 0x1D */ MASK_REACTION_SET_ZORA, + /* 0x1E */ MASK_REACTION_SET_KING_ZORA, + /* 0x1F */ MASK_REACTION_SET_RUTO, + /* 0x20 */ MASK_REACTION_SET_GORON, + /* 0x21 */ MASK_REACTION_SET_DARUNIA, + /* 0x22 */ MASK_REACTION_SET_GERUDO_WHITE, + /* 0x23 */ MASK_REACTION_SET_NABOORU, + /* 0x24 */ MASK_REACTION_SET_DANCING_COUPLE, + /* 0x25 */ MASK_REACTION_SET_DOG_LADY, + /* 0x26 */ MASK_REACTION_SET_WOMAN_3, + /* 0x27 */ MASK_REACTION_SET_MAN_1_BEARD, + /* 0x28 */ MASK_REACTION_SET_MAN_2_BALD, + /* 0x29 */ MASK_REACTION_SET_MAN_1_SHAVED_BLACK_SHIRT, + /* 0x2A */ MASK_REACTION_SET_BEGGAR, + /* 0x2B */ MASK_REACTION_SET_OLD_WOMAN, + /* 0x2C */ MASK_REACTION_SET_OLD_MAN, + /* 0x2D */ MASK_REACTION_SET_YOUNG_WOMAN_BROWN_HAIR, + /* 0x2E */ MASK_REACTION_SET_MAN_2_MUSTACHE_RED_SHIRT, + /* 0x2F */ MASK_REACTION_SET_MAN_2_MUSTACHE_BLUE_SHIRT, + /* 0x30 */ MASK_REACTION_SET_YOUNG_WOMAN_ORANGE_HAIR, + /* 0x31 */ MASK_REACTION_SET_MAN_2_ALT_MUSTACHE, + /* 0x32 */ MASK_REACTION_SET_MAN_1_BOWL_CUT_PURPLE_SHIRT, + /* 0x33 */ MASK_REACTION_SET_MAN_2_BEARD, + /* 0x34 */ MASK_REACTION_SET_OLD_MAN_BALD_BROWN_ROBE, + /* 0x35 */ MASK_REACTION_SET_MAN_2_MUSTACHE_WHITE_SHIRT, + /* 0x36 */ MASK_REACTION_SET_MAN_1_SHAVED_GREEN_SHIRT, + /* 0x37 */ MASK_REACTION_SET_WOMAN_2, + /* 0x38 */ MASK_REACTION_SET_OLD_MAN_BALD_PURPLE_ROBE, + /* 0x39 */ MASK_REACTION_SET_MAN_1_BOWL_CUT_GREEN_SHIRT, + /* 0x3A */ MASK_REACTION_SET_HAGGLING_TOWNSPEOPLE_1, + /* 0x3B */ MASK_REACTION_SET_HAGGLING_TOWNSPEOPLE_2, + /* 0x3C */ MASK_REACTION_SET_MAX +} MaskReactionSet; + +u16 MaskReaction_GetTextId(struct PlayState* play, u32 maskReactionSet); + +#endif diff --git a/include/z64game.h b/include/z64game.h index e41c0dd8d3..918f73fb3d 100644 --- a/include/z64game.h +++ b/include/z64game.h @@ -48,4 +48,19 @@ typedef struct GameState { /* 0xA0 */ u32 inPreNMIState; } GameState; // size = 0xA4 +void GameState_ReqPadData(GameState* gameState); +void GameState_Update(GameState* gameState); +void GameState_InitArena(GameState* gameState, size_t size); +void GameState_Realloc(GameState* gameState, size_t size); +void GameState_Init(GameState* gameState, GameStateFunc init, struct GraphicsContext* gfxCtx); +void GameState_Destroy(GameState* gameState); +GameStateFunc GameState_GetInit(GameState* gameState); +u32 GameState_IsRunning(GameState* gameState); +#if DEBUG_FEATURES +void* GameState_Alloc(GameState* gameState, size_t size, const char* file, int line); +#define GAME_STATE_ALLOC(gameState, size, file, line) GameState_Alloc(gameState, size, file, line) +#else +#define GAME_STATE_ALLOC(gameState, size, file, line) THA_AllocTailAlign16(&(gameState)->tha, size) +#endif + #endif diff --git a/include/z64inventory.h b/include/z64inventory.h index 9a8133b3da..8c1a5a90d8 100644 --- a/include/z64inventory.h +++ b/include/z64inventory.h @@ -3,7 +3,6 @@ #include "ultra64.h" #include "z64item.h" -#include "z64save.h" struct PlayState; diff --git a/include/z64message.h b/include/z64message.h index 415ab80ac7..d332ac4549 100644 --- a/include/z64message.h +++ b/include/z64message.h @@ -115,70 +115,6 @@ typedef enum MessageMode { /* 0x37 */ MSGMODE_PAUSED // Causes the message system to do nothing until external code sets a new message mode or calls a public function } MessageMode; -typedef enum MaskReactionSet { - /* 0x00 */ MASK_REACTION_SET_CARPENTER_BOSS, - /* 0x01 */ MASK_REACTION_SET_CARPENTER_1, - /* 0x02 */ MASK_REACTION_SET_CARPENTER_2, - /* 0x03 */ MASK_REACTION_SET_CARPENTER_3, - /* 0x04 */ MASK_REACTION_SET_CARPENTER_4, - /* 0x05 */ MASK_REACTION_SET_HYRULIAN_GUARD, - /* 0x06 */ MASK_REACTION_SET_HEISHI4_1, - /* 0x07 */ MASK_REACTION_SET_HEISHI4_2, - /* 0x08 */ MASK_REACTION_SET_CUCCO_LADY, - /* 0x09 */ MASK_REACTION_SET_CARPENTERS_SON, - /* 0x0A */ MASK_REACTION_SET_KAKARIKO_ROOF_MAN, - /* 0x0B */ MASK_REACTION_SET_WINDMILL_MAN, - /* 0x0C */ MASK_REACTION_SET_12, // Unused - /* 0x0D */ MASK_REACTION_SET_CURSED_SKULLTULA_MAN, - /* 0x0E */ MASK_REACTION_SET_DAMPE, - /* 0x0F */ MASK_REACTION_SET_GRAVEYARD_KID, - /* 0x10 */ MASK_REACTION_SET_SARIA, - /* 0x11 */ MASK_REACTION_SET_MIDO, - /* 0x12 */ MASK_REACTION_SET_FADO, - /* 0x13 */ MASK_REACTION_SET_KOKIRI_1, - /* 0x14 */ MASK_REACTION_SET_KOKIRI_2, - /* 0x15 */ MASK_REACTION_SET_SKULL_KID, - /* 0x16 */ MASK_REACTION_SET_ZELDA, - /* 0x17 */ MASK_REACTION_SET_MALON, - /* 0x18 */ MASK_REACTION_SET_TALON, - /* 0x19 */ MASK_REACTION_SET_INGO, - /* 0x1A */ MASK_REACTION_SET_LAKESIDE_PROFESSOR, - /* 0x1B */ MASK_REACTION_SET_MAGIC_BEAN_SALESMAN, - /* 0x1C */ MASK_REACTION_SET_RUNNING_MAN, - /* 0x1D */ MASK_REACTION_SET_ZORA, - /* 0x1E */ MASK_REACTION_SET_KING_ZORA, - /* 0x1F */ MASK_REACTION_SET_RUTO, - /* 0x20 */ MASK_REACTION_SET_GORON, - /* 0x21 */ MASK_REACTION_SET_DARUNIA, - /* 0x22 */ MASK_REACTION_SET_GERUDO_WHITE, - /* 0x23 */ MASK_REACTION_SET_NABOORU, - /* 0x24 */ MASK_REACTION_SET_DANCING_COUPLE, - /* 0x25 */ MASK_REACTION_SET_DOG_LADY, - /* 0x26 */ MASK_REACTION_SET_WOMAN_3, - /* 0x27 */ MASK_REACTION_SET_MAN_1_BEARD, - /* 0x28 */ MASK_REACTION_SET_MAN_2_BALD, - /* 0x29 */ MASK_REACTION_SET_MAN_1_SHAVED_BLACK_SHIRT, - /* 0x2A */ MASK_REACTION_SET_BEGGAR, - /* 0x2B */ MASK_REACTION_SET_OLD_WOMAN, - /* 0x2C */ MASK_REACTION_SET_OLD_MAN, - /* 0x2D */ MASK_REACTION_SET_YOUNG_WOMAN_BROWN_HAIR, - /* 0x2E */ MASK_REACTION_SET_MAN_2_MUSTACHE_RED_SHIRT, - /* 0x2F */ MASK_REACTION_SET_MAN_2_MUSTACHE_BLUE_SHIRT, - /* 0x30 */ MASK_REACTION_SET_YOUNG_WOMAN_ORANGE_HAIR, - /* 0x31 */ MASK_REACTION_SET_MAN_2_ALT_MUSTACHE, - /* 0x32 */ MASK_REACTION_SET_MAN_1_BOWL_CUT_PURPLE_SHIRT, - /* 0x33 */ MASK_REACTION_SET_MAN_2_BEARD, - /* 0x34 */ MASK_REACTION_SET_OLD_MAN_BALD_BROWN_ROBE, - /* 0x35 */ MASK_REACTION_SET_MAN_2_MUSTACHE_WHITE_SHIRT, - /* 0x36 */ MASK_REACTION_SET_MAN_1_SHAVED_GREEN_SHIRT, - /* 0x37 */ MASK_REACTION_SET_WOMAN_2, - /* 0x38 */ MASK_REACTION_SET_OLD_MAN_BALD_PURPLE_ROBE, - /* 0x39 */ MASK_REACTION_SET_MAN_1_BOWL_CUT_GREEN_SHIRT, - /* 0x3A */ MASK_REACTION_SET_HAGGLING_TOWNSPEOPLE_1, - /* 0x3B */ MASK_REACTION_SET_HAGGLING_TOWNSPEOPLE_2, - /* 0x3C */ MASK_REACTION_SET_MAX -} MaskReactionSet; - typedef enum TextState { /* 0 */ TEXT_STATE_NONE, /* 1 */ TEXT_STATE_DONE_HAS_NEXT, diff --git a/include/z64path.h b/include/z64path.h new file mode 100644 index 0000000000..0f9243974a --- /dev/null +++ b/include/z64path.h @@ -0,0 +1,19 @@ +#ifndef Z64PATH_H +#define Z64PATH_H + +#include "ultra64.h" +#include "z64math.h" + +struct PlayState; +struct Actor; + +typedef struct Path { + /* 0x00 */ u8 count; // number of points in the path + /* 0x04 */ Vec3s* points; // Segment Address to the array of points +} Path; // size = 0x8 + +Path* Path_GetByIndex(struct PlayState* play, s16 index, s16 max); +f32 Path_OrientAndGetDistSq(struct Actor* actor, Path* path, s16 waypoint, s16* yaw); +void Path_CopyLastPoint(Path* path, Vec3f* dest); + +#endif diff --git a/include/z64play.h b/include/z64play.h index 4fab4283fc..106c4fed00 100644 --- a/include/z64play.h +++ b/include/z64play.h @@ -88,7 +88,7 @@ typedef struct PlayState { /* 0x11DFC */ void* unk_11DFC; /* 0x11E00 */ Spawn* spawnList; /* 0x11E04 */ s16* exitList; - /* 0x11E08 */ Path* pathList; + /* 0x11E08 */ struct Path* pathList; /* 0x11E0C */ struct QuestHintCmd* naviQuestHints; /* 0x11E10 */ void* specialEffects; /* 0x11E14 */ u8 skyboxId; diff --git a/include/z64scene.h b/include/z64scene.h index 4acf9df16a..c22dd95e8e 100644 --- a/include/z64scene.h +++ b/include/z64scene.h @@ -8,6 +8,7 @@ #include "z64environment.h" #include "z64light.h" #include "z64math.h" +#include "z64path.h" #include "command_macros_base.h" @@ -51,11 +52,6 @@ typedef struct Spawn { /* 0x01 */ u8 room; } Spawn; -typedef struct Path { - /* 0x00 */ u8 count; // number of points in the path - /* 0x04 */ Vec3s* points; // Segment Address to the array of points -} Path; // size = 0x8 - // Room shapes typedef enum RoomShapeType { diff --git a/include/z64skin.h b/include/z64skin.h index d29c7c7482..641a980925 100644 --- a/include/z64skin.h +++ b/include/z64skin.h @@ -3,6 +3,10 @@ #include "z64animation.h" +struct Actor; +struct GraphicsContext; +struct PlayState; + /** * Holds a compact version of a vertex used in the Skin system * It is used to initialise the Vtx used by an animated limb @@ -75,4 +79,19 @@ typedef s32 (*SkinOverrideLimbDraw)(struct Actor*, struct PlayState*, s32, Skin* #define SKIN_TRANSFORM_IS_FHG 0x23 +void Skin_UpdateVertices(MtxF* mtx, SkinVertex* skinVertices, SkinLimbModif* modifEntry, Vtx* vtxBuf, Vec3f* pos); +void Skin_DrawAnimatedLimb(struct GraphicsContext* gfxCtx, Skin* skin, s32 limbIndex, s32 arg3, s32 drawFlags); +void Skin_DrawLimb(struct GraphicsContext* gfxCtx, Skin* skin, s32 limbIndex, Gfx* dlistOverride, s32 drawFlags); +void func_800A6330(struct Actor* actor, struct PlayState* play, Skin* skin, SkinPostDraw postDraw, s32 setTranslation); +void func_800A6360(struct Actor* actor, struct PlayState* play, Skin* skin, SkinPostDraw postDraw, + SkinOverrideLimbDraw overrideLimbDraw, s32 setTranslation); +void func_800A6394(struct Actor* actor, struct PlayState* play, Skin* skin, SkinPostDraw postDraw, + SkinOverrideLimbDraw overrideLimbDraw, s32 setTranslation, s32 arg6); +void func_800A63CC(struct Actor* actor, struct PlayState* play, Skin* skin, SkinPostDraw postDraw, + SkinOverrideLimbDraw overrideLimbDraw, s32 setTranslation, s32 arg6, s32 drawFlags); +void Skin_GetLimbPos(Skin* skin, s32 limbIndex, Vec3f* offset, Vec3f* dst); +void Skin_Init(struct PlayState* play, Skin* skin, SkeletonHeader* skeletonHeader, AnimationHeader* animationHeader); +void Skin_Free(struct PlayState* play, Skin* skin); +s32 Skin_ApplyAnimTransformations(Skin* skin, MtxF* limbMatrices, struct Actor* actor, s32 setTranslation); + #endif diff --git a/include/z64thread.h b/include/z64thread.h new file mode 100644 index 0000000000..c4ab827b42 --- /dev/null +++ b/include/z64thread.h @@ -0,0 +1,33 @@ +#ifndef Z64THREAD_H +#define Z64THREAD_H + +#include "ultra64.h" + +#define THREAD_ID_IDLE 1 +#define THREAD_ID_FAULT 2 +#define THREAD_ID_MAIN 3 +#define THREAD_ID_GRAPH 4 +#define THREAD_ID_SCHED 5 +#define THREAD_ID_PADMGR 7 +#define THREAD_ID_N64DD 8 +#define THREAD_ID_DDMSG 9 +#define THREAD_ID_AUDIOMGR 10 +#define THREAD_ID_DMAMGR 18 +#define THREAD_ID_IRQMGR 19 + +#define THREAD_PRI_IDLE_INIT 10 +#define THREAD_PRI_MAIN_INIT 10 +#define THREAD_PRI_DMAMGR_LOW 10 // Used when decompressing files +#define THREAD_PRI_GRAPH 11 +#define THREAD_PRI_AUDIOMGR 12 +#define THREAD_PRI_N64DD 13 +#define THREAD_PRI_DDMSG 13 +#define THREAD_PRI_PADMGR 14 +#define THREAD_PRI_MAIN 15 +#define THREAD_PRI_SCHED 15 +#define THREAD_PRI_DMAMGR 16 +#define THREAD_PRI_IRQMGR 17 +#define THREAD_PRI_FAULT_CLIENT (OS_PRIORITY_APPMAX - 1) +#define THREAD_PRI_FAULT OS_PRIORITY_APPMAX + +#endif diff --git a/src/boot/boot_main.c b/src/boot/boot_main.c index 0c1eeea49e..409f97e530 100644 --- a/src/boot/boot_main.c +++ b/src/boot/boot_main.c @@ -4,6 +4,7 @@ #if PLATFORM_N64 #include "cic6105.h" #endif +#include "z64thread.h" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ "ntsc-1.2:128" diff --git a/src/boot/idle.c b/src/boot/idle.c index 508fd16c4e..b1a6dd2c3b 100644 --- a/src/boot/idle.c +++ b/src/boot/idle.c @@ -2,6 +2,7 @@ #include "stack.h" #include "terminal.h" #include "versions.h" +#include "z64thread.h" #pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64 ntsc-1.2:64" diff --git a/src/boot/z_std_dma.c b/src/boot/z_std_dma.c index 9efa427881..36930fda5f 100644 --- a/src/boot/z_std_dma.c +++ b/src/boot/z_std_dma.c @@ -26,9 +26,10 @@ #if PLATFORM_N64 #include "n64dd.h" #endif +#include "z64thread.h" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.2:76 pal-1.0:74 pal-1.1:74" + "ntsc-1.2:78 pal-1.0:76 pal-1.1:76" StackEntry sDmaMgrStackInfo; OSMesgQueue sDmaMgrMsgQueue; diff --git a/src/code/fault_gc.c b/src/code/fault_gc.c index 5a85d03ebb..3bd75ed5c8 100644 --- a/src/code/fault_gc.c +++ b/src/code/fault_gc.c @@ -40,7 +40,7 @@ * DPad-Up may be pressed to enable sending fault pages over osSyncPrintf as well as displaying them on-screen. * DPad-Down disables sending fault pages over osSyncPrintf. */ -#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-eu-mq-dbg:144 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160" \ +#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-eu-mq-dbg:160 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160" \ "gc-us-mq:160 ique-cn:160" #include "global.h" @@ -48,6 +48,7 @@ #include "fault.h" #include "stack.h" #include "terminal.h" +#include "z64thread.h" void Fault_Init(void); void Fault_SetOsSyncPrintfEnabled(u32 enabled); diff --git a/src/code/fault_n64.c b/src/code/fault_n64.c index 720307c0a1..373c20ef97 100644 --- a/src/code/fault_n64.c +++ b/src/code/fault_n64.c @@ -5,6 +5,7 @@ #include "libc64/os_malloc.h" #include "stack.h" #include "terminal.h" +#include "z64thread.h" #pragma increment_block_number "ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192" diff --git a/src/code/graph.c b/src/code/graph.c index 046e04d374..c77ef71087 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -1,5 +1,6 @@ #include "global.h" #include "fault.h" +#include "sys_ucode.h" #include "terminal.h" #include "ucode_disas.h" #include "versions.h" diff --git a/src/code/irqmgr.c b/src/code/irqmgr.c index 59d7a41cfa..b90d5df7b7 100644 --- a/src/code/irqmgr.c +++ b/src/code/irqmgr.c @@ -35,6 +35,7 @@ #include "global.h" #include "terminal.h" #include "versions.h" +#include "z64thread.h" vu32 gIrqMgrResetStatus = IRQ_RESET_STATUS_IDLE; volatile OSTime sIrqMgrResetTime = 0; diff --git a/src/code/main.c b/src/code/main.c index 73d9f796ae..00fb9c896b 100644 --- a/src/code/main.c +++ b/src/code/main.c @@ -22,9 +22,10 @@ extern struct IrqMgr gIrqMgr; #include "cic6105.h" #include "n64dd.h" #endif +#include "z64thread.h" #pragma increment_block_number "gc-eu:144 gc-eu-mq:144 gc-jp:144 gc-jp-ce:144 gc-jp-mq:144 gc-us:144 gc-us-mq:144" \ - "ique-cn:160 ntsc-1.0:137 ntsc-1.1:137 ntsc-1.2:137 pal-1.0:135 pal-1.1:135" + "ique-cn:160 ntsc-1.0:139 ntsc-1.1:139 ntsc-1.2:139 pal-1.0:137 pal-1.1:137" extern u8 _buffersSegmentEnd[]; diff --git a/src/code/padmgr.c b/src/code/padmgr.c index 740f15b29a..9e6d1ae14a 100644 --- a/src/code/padmgr.c +++ b/src/code/padmgr.c @@ -31,6 +31,7 @@ #include "libu64/debug.h" #include "libu64/padsetup.h" #include "macros.h" +#include "padmgr.h" #include "fault.h" #include "terminal.h" #include "line_numbers.h" diff --git a/src/code/sched.c b/src/code/sched.c index b22f38b402..3c4199aefe 100644 --- a/src/code/sched.c +++ b/src/code/sched.c @@ -42,6 +42,7 @@ #include "global.h" #include "fault.h" #include "versions.h" +#include "z64thread.h" #define RSP_DONE_MSG 667 #define RDP_DONE_MSG 668 diff --git a/src/code/sys_matrix.c b/src/code/sys_matrix.c index 9e56d4088a..081a292765 100644 --- a/src/code/sys_matrix.c +++ b/src/code/sys_matrix.c @@ -1,7 +1,14 @@ -#include "global.h" +#include "libc64/math64.h" +#include "gfx.h" #if DEBUG_FEATURES #include "fault.h" #endif +#include "macros.h" +#include "sys_matrix.h" +#include "ultra64.h" +#include "z_lib.h" +#include "z64game.h" +#include "z64skin_matrix.h" // clang-format off Mtx gIdentityMtx = gdSPDefMtx( @@ -19,9 +26,6 @@ MtxF gIdentityMtxF = { }; // clang-format on -#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "pal-1.1:128" - MtxF* sMatrixStack; // "Matrix_stack" MtxF* sCurrentMatrix; // "Matrix_now" diff --git a/src/code/sys_ucode.c b/src/code/sys_ucode.c index 2be2566e84..3e4ad8cbf6 100644 --- a/src/code/sys_ucode.c +++ b/src/code/sys_ucode.c @@ -1,4 +1,4 @@ -#include "global.h" +#include "ultra64.h" u64* sDefaultGSPUCodeText = gspF3DZEX2_NoN_PosLight_fifoTextStart; u64* sDefaultGSPUCodeData = gspF3DZEX2_NoN_PosLight_fifoDataStart; diff --git a/src/code/ucode_disas.c b/src/code/ucode_disas.c index ecfc7d7ac4..0684dcd5dc 100644 --- a/src/code/ucode_disas.c +++ b/src/code/ucode_disas.c @@ -1,5 +1,10 @@ -#include "global.h" #include "ucode_disas.h" +#include "ultra64.h" +#include "ultra64/gs2dex.h" +#include "libu64/mtxuty-cvt.h" +#include "segmented_address.h" + +#include "macros.h" #if DEBUG_FEATURES diff --git a/src/code/z_actor.c b/src/code/z_actor.c index d8e1c2ae9c..b6a5c49564 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1,13 +1,30 @@ -#include "global.h" +#include "libc64/math64.h" #include "fault.h" +#include "gfx.h" +#include "gfx_setupdl.h" #include "quake.h" #include "rand.h" +#include "regs.h" +#include "rumble.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_math.h" +#include "sys_matrix.h" #include "terminal.h" #include "versions.h" +#include "z_lib.h" +#include "zelda_arena.h" +#include "z64effect.h" +#include "z64light.h" #include "z64horse.h" +#include "z64play.h" +#include "z64skin_matrix.h" + +#include "global.h" #include "overlays/actors/ovl_Arms_Hook/z_arms_hook.h" #include "overlays/actors/ovl_En_Part/z_en_part.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #include "assets/objects/object_bdoor/object_bdoor.h" diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 2f768f35f3..dce9b5b089 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -3640,7 +3640,7 @@ s32 Camera_KeepOn3(Camera* camera) { } #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ique-cn:128 ntsc-1.0:138 ntsc-1.1:138 ntsc-1.2:138 pal-1.0:136 pal-1.1:136" + "ique-cn:128 ntsc-1.0:140 ntsc-1.1:140 ntsc-1.2:140 pal-1.0:138 pal-1.1:138" s32 Camera_KeepOn4(Camera* camera) { static Vec3f D_8015BD50; diff --git a/src/code/z_face_reaction.c b/src/code/z_face_reaction.c index 9864944b1c..ea6313a762 100644 --- a/src/code/z_face_reaction.c +++ b/src/code/z_face_reaction.c @@ -1,4 +1,6 @@ -#include "global.h" +#include "ultra64.h" +#include "z64face_reaction.h" +#include "z64player.h" u16 sMaskReactionSetTextIds[MASK_REACTION_SET_MAX][PLAYER_MASK_MAX] = { // MASK_REACTION_SET_CARPENTER_BOSS @@ -182,7 +184,7 @@ u16 sMaskReactionSetTextIds[MASK_REACTION_SET_MAX][PLAYER_MASK_MAX] = { { 0x0000, 0x7104, 0x7105, 0x7107, 0x7105, 0x710C, 0x7105, 0x7107, 0x7107 }, }; -u16 MaskReaction_GetTextId(PlayState* play, u32 maskReactionSet) { +u16 MaskReaction_GetTextId(struct PlayState* play, u32 maskReactionSet) { u8 currentMask = Player_GetMask(play); return sMaskReactionSetTextIds[maskReactionSet][currentMask]; diff --git a/src/code/z_frame_advance.c b/src/code/z_frame_advance.c index 486717a50f..5c8f685f22 100644 --- a/src/code/z_frame_advance.c +++ b/src/code/z_frame_advance.c @@ -3,7 +3,7 @@ #include "stdbool.h" #include "controller.h" -#include "padmgr.h" +#include "libu64/pad.h" #include "macros.h" void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx) { diff --git a/src/code/z_jpeg.c b/src/code/z_jpeg.c index 86a97183aa..81e2999462 100644 --- a/src/code/z_jpeg.c +++ b/src/code/z_jpeg.c @@ -1,6 +1,12 @@ #include "global.h" +#include "ultra64.h" +#include "attributes.h" +#include "jpeg.h" +#include "sys_ucode.h" #include "terminal.h" +#include "macros.h" + #define MARKER_ESCAPE 0x00 #define MARKER_SOI 0xD8 #define MARKER_SOF 0xC0 diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c index 012ecdb742..ab0ceaecc9 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -1,5 +1,5 @@ -#pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-jp:208 gc-jp-ce:208 gc-jp-mq:208 gc-us:208 gc-us-mq:208" \ - "ique-cn:208 ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:232 pal-1.1:232" +#pragma increment_block_number "gc-eu:228 gc-eu-mq:228 gc-jp:208 gc-jp-ce:208 gc-jp-mq:208 gc-us:208 gc-us-mq:208" \ + "ique-cn:208 ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:236 pal-1.1:236" #include "global.h" #include "ultra64.h" diff --git a/src/code/z_nulltask.c b/src/code/z_nulltask.c index 1f7dae689e..42ba3d86f9 100644 --- a/src/code/z_nulltask.c +++ b/src/code/z_nulltask.c @@ -1,4 +1,5 @@ -#include "global.h" +#include "ultra64.h" +#include "sched.h" /** * Blocks the current thread until all queued scheduler tasks have completed. diff --git a/src/code/z_path.c b/src/code/z_path.c index 7afe07aab8..29b51a8f17 100644 --- a/src/code/z_path.c +++ b/src/code/z_path.c @@ -1,6 +1,8 @@ #include "ultra64.h" #include "libc64/math64.h" #include "segmented_address.h" +#include "z64actor.h" +#include "z64path.h" #include "z64play.h" Path* Path_GetByIndex(PlayState* play, s16 index, s16 max) { diff --git a/src/code/z_room.c b/src/code/z_room.c index f03ac7881a..4050248b3b 100644 --- a/src/code/z_room.c +++ b/src/code/z_room.c @@ -1,5 +1,6 @@ #include "global.h" #include "fault.h" +#include "sys_ucode.h" #include "terminal.h" #include "versions.h" #include "line_numbers.h" diff --git a/src/code/z_skin.c b/src/code/z_skin.c index 4ba0f6cb47..508943cdd9 100644 --- a/src/code/z_skin.c +++ b/src/code/z_skin.c @@ -1,4 +1,10 @@ -#include "global.h" +#include "gfx.h" +#include "segmented_address.h" +#include "sys_matrix.h" +#include "z64math.h" +#include "z64play.h" +#include "z64skin.h" +#include "z64skin_matrix.h" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ "pal-1.1:128" diff --git a/src/code/z_skin_awb.c b/src/code/z_skin_awb.c index 55633bc872..8a175ed15f 100644 --- a/src/code/z_skin_awb.c +++ b/src/code/z_skin_awb.c @@ -1,5 +1,10 @@ -#include "global.h" #include "overlays/actors/ovl_En_fHG/z_en_fhg.h" +#include "segmented_address.h" +#include "zelda_arena.h" +#include "z64actor.h" +#include "z64play.h" +#include "z64skin.h" +#include "z64skin_matrix.h" /** * Initialises the Vtx buffers used for limb at index `limbIndex` diff --git a/src/libu64/mtxuty-cvt.c b/src/libu64/mtxuty-cvt.c index 10f88f7827..6fa038be13 100644 --- a/src/libu64/mtxuty-cvt.c +++ b/src/libu64/mtxuty-cvt.c @@ -1,4 +1,8 @@ -#include "global.h" +#include "ultra64.h" +#include "libu64/debug.h" +#include "libu64/mtxuty-cvt.h" + +#include "macros.h" void MtxConv_F2L(Mtx* m1, MtxF* m2) { s32 i; diff --git a/src/n64dd/z_n64dd.c b/src/n64dd/z_n64dd.c index 3524cd348e..1b6934f502 100644 --- a/src/n64dd/z_n64dd.c +++ b/src/n64dd/z_n64dd.c @@ -6,6 +6,7 @@ #include "stack.h" #include "versions.h" #include "line_numbers.h" +#include "z64thread.h" #pragma increment_block_number "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128" diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index 67268e9e8a..a92c226117 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -16,8 +16,6 @@ #include "z_lib.h" #include "z64play.h" -#include "z64.h" - #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) void ArrowFire_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index e84af1d7b7..953e0a333c 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -16,8 +16,6 @@ #include "z_lib.h" #include "z64play.h" -#include "z64.h" - #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) void ArrowIce_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index 4f3f5572e1..100b8c20c1 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -16,8 +16,6 @@ #include "z_lib.h" #include "z64play.h" -#include "z64.h" - #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) void ArrowLight_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 26870e2b8d..435ff81ac8 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -28,8 +28,6 @@ #include "z64player.h" #include "z64skin_matrix.h" -#include "global.h" - #include "assets/objects/object_sst/object_sst.h" #include "assets/objects/gameplay_keep/gameplay_keep.h" diff --git a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c index 9bf558e641..d61720cdf6 100644 --- a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c +++ b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c @@ -22,8 +22,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_demo_6k/object_demo_6k.h" #include "assets/objects/object_gnd_magic/object_gnd_magic.h" diff --git a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c index a4ebdfb131..9e9510f2da 100644 --- a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c +++ b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c @@ -5,8 +5,16 @@ */ #include "z_elf_msg.h" -#include "global.h" + +#include "libu64/debug.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "regs.h" #include "terminal.h" +#include "z64play.h" +#include "z64player.h" + #include "overlays/actors/ovl_En_Elf/z_en_elf.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/src/overlays/actors/ovl_En_Ani/z_en_ani.c index 74cc512104..752fe96004 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c @@ -13,10 +13,9 @@ #include "sfx.h" #include "sys_matrix.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" -#include "global.h" - #include "assets/objects/object_ani/object_ani.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c index 669e5ed1fb..9000417a23 100644 --- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -5,7 +5,21 @@ */ #include "z_en_arrow.h" -#include "global.h" + +#include "libc64/qrand.h" +#include "libu64/debug.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "regs.h" +#include "sfx.h" +#include "sys_math.h" +#include "sys_math3d.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c index f20feeefea..4a3a32663a 100644 --- a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c +++ b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c @@ -19,8 +19,6 @@ #include "z64play.h" #include "z64player.h" -#include "z64.h" - #include "assets/objects/object_niw/object_niw.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED 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 ea86855810..c20520908a 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -16,8 +16,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_bigokuta/object_bigokuta.h" #define FLAGS \ diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.c b/src/overlays/actors/ovl_En_Boom/z_en_boom.c index 982df71a03..b9dcbacb76 100644 --- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c +++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c @@ -5,7 +5,16 @@ */ #include "z_en_boom.h" -#include "global.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) 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 2d7c748b47..1e1e2271f7 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -1,6 +1,23 @@ #include "z_en_box.h" -#include "global.h" #include "overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "one_point_cutscene.h" +#include "sequence.h" +#include "sfx.h" +#include "sys_math3d.h" +#include "sys_matrix.h" +#include "z_lib.h" +#include "z64audio.h" +#include "z64curve.h" +#include "z64effect.h" +#include "z64ocarina.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/object_box/object_box.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_En_Bw/z_en_bw.c b/src/overlays/actors/ovl_En_Bw/z_en_bw.c index 61d7cc36d4..0aad9cccae 100644 --- a/src/overlays/actors/ovl_En_Bw/z_en_bw.c +++ b/src/overlays/actors/ovl_En_Bw/z_en_bw.c @@ -23,8 +23,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_bw/object_bw.h" diff --git a/src/overlays/actors/ovl_En_Cs/z_en_cs.c b/src/overlays/actors/ovl_En_Cs/z_en_cs.c index b4f01197d4..877db78157 100644 --- a/src/overlays/actors/ovl_En_Cs/z_en_cs.c +++ b/src/overlays/actors/ovl_En_Cs/z_en_cs.c @@ -4,15 +4,14 @@ #include "libc64/qrand.h" #include "gfx.h" #include "gfx_setupdl.h" -#include "segmented_address.h"s +#include "segmented_address.h" #include "sfx.h" #include "sys_matrix.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_cs/object_cs.h" #include "assets/objects/object_link_child/object_link_child.h" diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index 20b927ec46..d2897a0098 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -14,8 +14,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_daiku/object_daiku.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c index 3071006ba9..2a77645647 100644 --- a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c +++ b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c @@ -14,11 +14,10 @@ #include "sfx.h" #include "sys_matrix.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_daiku/object_daiku.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Dh/z_en_dh.c b/src/overlays/actors/ovl_En_Dh/z_en_dh.c index f52a81bf6c..71792bab7f 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -23,8 +23,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_dh/object_dh.h" #define FLAGS \ diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c index 98ae6c9af6..e1016ad67e 100644 --- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c +++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c @@ -19,11 +19,10 @@ #include "z_lib.h" #include "z64audio.h" #include "z64effect.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_zo/object_zo.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index b86280fad0..8b69ed6278 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -12,8 +12,6 @@ #include "z_lib.h" #include "z64play.h" -#include "global.h" - #include "assets/objects/object_dog/object_dog.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_En_Door/z_en_door.c b/src/overlays/actors/ovl_En_Door/z_en_door.c index 4d650f0a1b..9b25aebe06 100644 --- a/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -5,7 +5,17 @@ */ #include "z_en_door.h" -#include "global.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/gameplay_field_keep/gameplay_field_keep.h" #include "assets/objects/object_hidan_objects/object_hidan_objects.h" diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c index a4addc76c1..5aad8c5b5e 100644 --- a/src/overlays/actors/ovl_En_Du/z_en_du.c +++ b/src/overlays/actors/ovl_En_Du/z_en_du.c @@ -8,12 +8,11 @@ #include "sys_matrix.h" #include "z_lib.h" #include "z64audio.h" +#include "z64face_reaction.h" #include "z64ocarina.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_du/object_du.h" #include "assets/scenes/overworld/spot18/spot18_scene.h" diff --git a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c index d804326890..d60d91c222 100644 --- a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c +++ b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c @@ -11,8 +11,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_ei/object_ei.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/src/overlays/actors/ovl_En_Fish/z_en_fish.c index f2f9185a72..2ca4187542 100644 --- a/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -5,9 +5,18 @@ */ #include "z_en_fish.h" -#include "global.h" -#include "assets/objects/gameplay_keep/gameplay_keep.h" + +#include "libc64/qrand.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "ichain.h" +#include "sfx.h" #include "terminal.h" +#include "z_lib.h" +#include "z64play.h" +#include "z64player.h" + +#include "assets/objects/gameplay_keep/gameplay_keep.h" #define FLAGS 0 diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/src/overlays/actors/ovl_En_Fu/z_en_fu.c index 71c392851f..0f8969734c 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -12,12 +12,11 @@ #include "sfx.h" #include "sys_matrix.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64ocarina.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_fu/object_fu.h" #include "assets/scenes/indoors/hakasitarelay/hakasitarelay_scene.h" diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index 0345bfbac6..c96f1fa5f8 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -14,12 +14,11 @@ #include "sys_matrix.h" #include "terminal.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64horse.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_ge1/object_ge1.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c index c66cf7b849..e99a3d1498 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -14,11 +14,10 @@ #include "versions.h" #include "z_lib.h" #include "z64audio.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_oF1d_map/object_oF1d_map.h" 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 2e9c354579..4e590217f0 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -20,8 +20,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_gs/object_gs.h" diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index de71e48682..034e211d0a 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -16,11 +16,10 @@ #include "sys_matrix.h" #include "terminal.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_sd/object_sd.h" #include "assets/objects/object_link_child/object_link_child.h" diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c index fd9498982f..7a88e66ebe 100644 --- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c +++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c @@ -3,11 +3,10 @@ #include "gfx.h" #include "gfx_setupdl.h" #include "terminal.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_sd/object_sd.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index a2d4bc5f28..284d175bfe 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -29,8 +29,6 @@ #include "z64player.h" #include "z64skin_matrix.h" -#include "global.h" - #include "assets/objects/object_horse/object_horse.h" #include "assets/objects/object_hni/object_hni.h" #include "assets/scenes/overworld/spot09/spot09_scene.h" diff --git a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c index 8078eac3c1..e1991688a1 100644 --- a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c +++ b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c @@ -17,8 +17,6 @@ #include "z64player.h" #include "z64skin.h" -#include "global.h" - #include "assets/objects/object_horse_ganon/object_horse_ganon.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c index d88cf92eeb..9d82204298 100644 --- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c +++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c @@ -4,18 +4,23 @@ * Description: Young Epona */ -#include "global.h" +#include "z_en_horse_link_child.h" + #include "gfx.h" #include "gfx_setupdl.h" #include "ichain.h" #include "rand.h" #include "regs.h" +#include "segmented_address.h" #include "sfx.h" +#include "sys_math3d.h" +#include "z_lib.h" #include "z64actor.h" #include "z64horse.h" #include "z64player.h" #include "z64play.h" -#include "z_en_horse_link_child.h" +#include "z64skin.h" + #include "assets/objects/object_horse_link_child/object_horse_link_child.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) diff --git a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c index 08646b8a83..bd4e01cf89 100644 --- a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c +++ b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c @@ -20,8 +20,6 @@ #include "z64skin.h" #include "z64skin_matrix.h" -#include "global.h" - #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_horse_normal/object_horse_normal.h" diff --git a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c index 6e513ff5cb..059f88c3ae 100644 --- a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c +++ b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c @@ -16,8 +16,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_horse_zelda/object_horse_zelda.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c index 005e63258c..4914be17ed 100644 --- a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c +++ b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c @@ -11,10 +11,9 @@ #include "sys_matrix.h" #include "terminal.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" -#include "global.h" - #include "assets/objects/object_hs/object_hs.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Hy/z_en_hy.c b/src/overlays/actors/ovl_En_Hy/z_en_hy.c index d7b4962c9f..ca004db5f0 100644 --- a/src/overlays/actors/ovl_En_Hy/z_en_hy.c +++ b/src/overlays/actors/ovl_En_Hy/z_en_hy.c @@ -16,11 +16,10 @@ #include "versions.h" #include "z_lib.h" #include "z64audio.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_aob/object_aob.h" #include "assets/objects/object_ahg/object_ahg.h" #include "assets/objects/object_bob/object_bob.h" diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index 333550942f..1910466d10 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -13,11 +13,10 @@ #include "versions.h" #include "z_lib.h" #include "z64audio.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_in/object_in.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c index 03242220e0..f1099edf2b 100644 --- a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c +++ b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c @@ -5,10 +5,25 @@ */ #include "z_en_kanban.h" -#include "global.h" + +#include "libc64/math64.h" +#include "libc64/qrand.h" +#include "attributes.h" +#include "gfx.h" +#include "gfx_setupdl.h" +#include "rand.h" +#include "segmented_address.h" +#include "sfx.h" +#include "sys_matrix.h" +#include "terminal.h" +#include "z_lib.h" +#include "z64effect.h" +#include "z64ocarina.h" +#include "z64play.h" +#include "z64player.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_kanban/object_kanban.h" -#include "terminal.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Kanban/z_en_kanban_gfx.inc.c b/src/overlays/actors/ovl_En_Kanban/z_en_kanban_gfx.inc.c index c38e9df942..3dca1d6259 100644 --- a/src/overlays/actors/ovl_En_Kanban/z_en_kanban_gfx.inc.c +++ b/src/overlays/actors/ovl_En_Kanban/z_en_kanban_gfx.inc.c @@ -1,4 +1,4 @@ -#include "z_en_kanban.h" +#include "ultra64.h" static u16 sShadowTexFlags[] = { 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x100, diff --git a/src/overlays/actors/ovl_En_Ko/z_en_ko.c b/src/overlays/actors/ovl_En_Ko/z_en_ko.c index 54fee8f4ed..1f0d1f30fe 100644 --- a/src/overlays/actors/ovl_En_Ko/z_en_ko.c +++ b/src/overlays/actors/ovl_En_Ko/z_en_ko.c @@ -14,6 +14,7 @@ #include "terminal.h" #include "versions.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/src/overlays/actors/ovl_En_Kz/z_en_kz.c index 03e8524ffc..7e4c7543e4 100644 --- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -7,6 +7,7 @@ #include "z_en_kz.h" #include "libc64/math64.h" +#include "attributes.h" #include "gfx.h" #include "gfx_setupdl.h" #include "segmented_address.h" @@ -14,11 +15,10 @@ #include "sys_matrix.h" #include "versions.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_kz/object_kz.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c index 1cf964b5b6..22ae984333 100644 --- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c +++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c @@ -13,12 +13,11 @@ #include "sys_matrix.h" #include "z_lib.h" #include "z64audio.h" +#include "z64face_reaction.h" #include "z64ocarina.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_ma1/object_ma1.h" #define FLAGS \ diff --git a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c index 9e8dad5401..5e2482df77 100644 --- a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c +++ b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c @@ -8,12 +8,11 @@ #include "sys_matrix.h" #include "z_lib.h" #include "z64audio.h" +#include "z64face_reaction.h" #include "z64ocarina.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_ma2/object_ma2.h" #define FLAGS \ diff --git a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c index d0ce7b077a..ddf065f837 100644 --- a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c +++ b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c @@ -18,8 +18,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_ma2/object_ma2.h" #define FLAGS \ diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.c b/src/overlays/actors/ovl_En_Md/z_en_md.c index d2ea74a84a..9bf24e4acb 100644 --- a/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -14,6 +14,7 @@ #include "sfx.h" #include "sys_matrix.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64ocarina.h" #include "z64play.h" #include "z64player.h" diff --git a/src/overlays/actors/ovl_En_Mk/z_en_mk.c b/src/overlays/actors/ovl_En_Mk/z_en_mk.c index ec76d05029..42b68d1fb7 100644 --- a/src/overlays/actors/ovl_En_Mk/z_en_mk.c +++ b/src/overlays/actors/ovl_En_Mk/z_en_mk.c @@ -11,11 +11,10 @@ #include "sfx.h" #include "sys_matrix.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_mk/object_mk.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Mm/z_en_mm.c b/src/overlays/actors/ovl_En_Mm/z_en_mm.c index cd3f037148..c640ef74a6 100644 --- a/src/overlays/actors/ovl_En_Mm/z_en_mm.c +++ b/src/overlays/actors/ovl_En_Mm/z_en_mm.c @@ -14,11 +14,10 @@ #include "sfx.h" #include "sys_matrix.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_mm/object_mm.h" #include "assets/objects/object_link_child/object_link_child.h" diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index 33f645d2b6..2debeaf16a 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -9,10 +9,9 @@ #include "gfx.h" #include "gfx_setupdl.h" #include "ichain.h" +#include "z64face_reaction.h" #include "z64play.h" -#include "global.h" - #include "assets/objects/object_ms/object_ms.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Mu/z_en_mu.c b/src/overlays/actors/ovl_En_Mu/z_en_mu.c index 1a48487d26..24f9bf22f9 100644 --- a/src/overlays/actors/ovl_En_Mu/z_en_mu.c +++ b/src/overlays/actors/ovl_En_Mu/z_en_mu.c @@ -10,10 +10,9 @@ #include "gfx.h" #include "sys_matrix.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" -#include "global.h" - #include "assets/objects/object_mu/object_mu.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/src/overlays/actors/ovl_En_Nb/z_en_nb.c index e3ff7ac013..d765c7caae 100644 --- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -18,11 +18,10 @@ #include "sys_matrix.h" #include "terminal.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_nb/object_nb.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c index f1b15076ca..892b1e8396 100644 --- a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c +++ b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c @@ -11,11 +11,10 @@ #include "terminal.h" #include "versions.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_ane/object_ane.h" #include "assets/objects/object_os_anime/object_os_anime.h" diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 1b549f772d..0f24ad4d0d 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -22,8 +22,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_po_sisters/object_po_sisters.h" diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index 969260e5a1..d2f3dbe179 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -19,8 +19,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_poh/object_poh.h" #include "assets/objects/object_po_composer/object_po_composer.h" 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 b735514051..3026636de5 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -20,8 +20,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_rd/object_rd.h" #define FLAGS \ diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index fcf2652175..9f5db67aa6 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -20,11 +20,10 @@ #include "versions.h" #include "z_lib.h" #include "z64effect.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_ru1/object_ru1.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_CAN_PRESS_SWITCHES) diff --git a/src/overlays/actors/ovl_En_Sa/z_en_sa.c b/src/overlays/actors/ovl_En_Sa/z_en_sa.c index 90e63fc1d7..c7a42e059d 100644 --- a/src/overlays/actors/ovl_En_Sa/z_en_sa.c +++ b/src/overlays/actors/ovl_En_Sa/z_en_sa.c @@ -7,11 +7,10 @@ #include "sfx.h" #include "sys_matrix.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_sa/object_sa.h" #include "assets/scenes/overworld/spot04/spot04_scene.h" #include "assets/scenes/overworld/spot05/spot05_scene.h" diff --git a/src/overlays/actors/ovl_En_Skj/z_en_skj.c b/src/overlays/actors/ovl_En_Skj/z_en_skj.c index 9d8ff555ca..3b976750e3 100644 --- a/src/overlays/actors/ovl_En_Skj/z_en_skj.c +++ b/src/overlays/actors/ovl_En_Skj/z_en_skj.c @@ -13,13 +13,12 @@ #include "z_lib.h" #include "z64audio.h" #include "z64debug_display.h" +#include "z64face_reaction.h" #include "z64ocarina.h" #include "z64effect.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_skj/object_skj.h" #define FLAGS \ diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index f90bee0dcf..18d7fc3c32 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -6,11 +6,10 @@ #include "sys_matrix.h" #include "z_lib.h" #include "z64effect.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_ssh/object_ssh.h" #define FLAGS \ diff --git a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c index a55d234477..7e4de74153 100644 --- a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c +++ b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c @@ -19,7 +19,6 @@ #include "z64play.h" #include "z64player.h" -#include "z64.h" #include "assets/objects/object_niw/object_niw.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/src/overlays/actors/ovl_En_Ta/z_en_ta.c index 2cf923df0b..146ab6a0a9 100644 --- a/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -20,11 +20,10 @@ #include "terminal.h" #include "z_lib.h" #include "z64audio.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_ta/object_ta.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Tg/z_en_tg.c b/src/overlays/actors/ovl_En_Tg/z_en_tg.c index 2bd2a378d3..1fc830181b 100644 --- a/src/overlays/actors/ovl_En_Tg/z_en_tg.c +++ b/src/overlays/actors/ovl_En_Tg/z_en_tg.c @@ -8,10 +8,9 @@ #include "gfx.h" #include "sys_matrix.h" +#include "z64face_reaction.h" #include "z64play.h" -#include "global.h" - #include "assets/objects/object_mu/object_mu.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index a19b7ecc13..4187b915dd 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -16,10 +16,9 @@ #include "sys_matrix.h" #include "z_en_item00.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" -#include "global.h" - #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/object_tk/object_tk.h" diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index 3764145d20..3fe0ef7df4 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -22,8 +22,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_torch2/object_torch2.h" #define FLAGS \ diff --git a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c index 301e3336bd..dd2e469def 100644 --- a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c +++ b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c @@ -11,11 +11,10 @@ #include "sfx.h" #include "sys_matrix.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_toryo/object_toryo.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c b/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c index b312e0fd6a..2e19328961 100644 --- a/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c +++ b/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c @@ -17,8 +17,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_ei/object_ei.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) diff --git a/src/overlays/actors/ovl_En_Zf/z_en_zf.c b/src/overlays/actors/ovl_En_Zf/z_en_zf.c index 41e4055fb2..843669b4ec 100644 --- a/src/overlays/actors/ovl_En_Zf/z_en_zf.c +++ b/src/overlays/actors/ovl_En_Zf/z_en_zf.c @@ -22,8 +22,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_zf/object_zf.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED) diff --git a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c index 0aec93dbcb..b4acd1077c 100644 --- a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c +++ b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c @@ -26,8 +26,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "overlays/actors/ovl_En_Encount2/z_en_encount2.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" #include "assets/objects/object_zl2/object_zl2.h" diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c index 0a66fff1f3..91ec0e5810 100644 --- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c +++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c @@ -17,11 +17,10 @@ #include "sys_matrix.h" #include "z_lib.h" #include "z64audio.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_zl4/object_zl4.h" #include "assets/scenes/indoors/nakaniwa/nakaniwa_scene.h" diff --git a/src/overlays/actors/ovl_En_Zo/z_en_zo.c b/src/overlays/actors/ovl_En_Zo/z_en_zo.c index 9ab90f08ff..7023c96136 100644 --- a/src/overlays/actors/ovl_En_Zo/z_en_zo.c +++ b/src/overlays/actors/ovl_En_Zo/z_en_zo.c @@ -13,11 +13,10 @@ #include "sfx.h" #include "sys_matrix.h" #include "z_lib.h" +#include "z64face_reaction.h" #include "z64play.h" #include "z64player.h" -#include "global.h" - #include "assets/objects/object_zo/object_zo.h" #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY) diff --git a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c index 513dce9afd..7f34e8e7fd 100644 --- a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c +++ b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c @@ -23,8 +23,6 @@ #include "z64player.h" #include "z64skin.h" -#include "global.h" - #include "assets/objects/object_fhg/object_fhg.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED 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 7ac997ae62..93c4b9cdf3 100644 --- a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c +++ b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c @@ -5,8 +5,10 @@ */ #include "z_obj_makekinsuta.h" -#include "global.h" + #include "terminal.h" +#include "z64play.h" +#include "z64player.h" #define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED diff --git a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c index 18ea2231d5..a78c2e1306 100644 --- a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c +++ b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c @@ -12,8 +12,6 @@ #include "z64play.h" #include "z64player.h" -#include "global.h" - #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_OCARINA) void OceffStorm_Init(Actor* thisx, PlayState* play); diff --git a/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c b/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c index 5271fc1616..9be42db8d9 100644 --- a/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c +++ b/src/overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.c @@ -5,7 +5,15 @@ */ #include "z_eff_ss_hitmark.h" -#include "global.h" + +#include "gfx.h" +#include "gfx_setupdl.h" +#include "segmented_address.h" +#include "sys_matrix.h" +#include "z64effect.h" +#include "z64play.h" +#include "z64skin_matrix.h" + #include "assets/objects/gameplay_keep/gameplay_keep.h" #define rTexIndex regs[0] diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c index 232e7ae3fe..63b08448b3 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c @@ -1,5 +1,7 @@ #include "z_kaleido_scope.h" +#include "sys_ucode.h" #include "versions.h" + #include "assets/textures/icon_item_24_static/icon_item_24_static.h" #if OOT_NTSC #include "assets/textures/icon_item_jpn_static/icon_item_jpn_static.h" From bbcdf22647a37bc29e0671149b2fb35c9e7745d8 Mon Sep 17 00:00:00 2001 From: cadmic Date: Thu, 13 Feb 2025 23:06:49 -0800 Subject: [PATCH 10/15] Identify some unaccounted and blob asset data (#1953) * Identify some unaccounted and blob asset data * Add bug comments for flex skeleton weirdness * Use (SkeletonHeader*) cast instead of .sh * Fix vtx counts --- assets/xml/objects/object_am.xml | 1 + assets/xml/objects/object_ani.xml | 2 ++ assets/xml/objects/object_box.xml | 8 +++----- assets/xml/objects/object_bv.xml | 2 +- assets/xml/objects/object_bv_pal.xml | 2 +- assets/xml/objects/object_door_killer.xml | 2 +- assets/xml/objects/object_gi_medal.xml | 15 +++++++++++++++ assets/xml/objects/object_hintnuts.xml | 2 +- assets/xml/objects/object_hni.xml | 2 +- assets/xml/objects/object_ik.xml | 9 ++++++--- assets/xml/objects/object_kingdodongo.xml | 10 +++++++++- assets/xml/objects/object_kingdodongo_pal.xml | 10 +++++++++- assets/xml/objects/object_lightbox.xml | 9 ++++----- assets/xml/objects/object_link_child.xml | 5 ++++- assets/xml/objects/object_medal.xml | 2 +- assets/xml/objects/object_oA3.xml | 3 +-- assets/xml/objects/object_oE1.xml | 3 ++- assets/xml/objects/object_oE11.xml | 3 ++- assets/xml/objects/object_oE12.xml | 3 ++- assets/xml/objects/object_oE2.xml | 3 ++- assets/xml/objects/object_oE3.xml | 7 ++++--- assets/xml/objects/object_oE5.xml | 6 +++--- assets/xml/objects/object_oE6.xml | 3 ++- assets/xml/objects/object_oE7.xml | 3 ++- assets/xml/objects/object_oE8.xml | 3 ++- assets/xml/objects/object_oE9.xml | 3 ++- assets/xml/objects/object_ossan.xml | 3 +++ assets/xml/objects/object_rl.xml | 5 +---- assets/xml/objects/object_sa.xml | 2 +- assets/xml/objects/object_sb.xml | 5 +++-- assets/xml/objects/object_skb.xml | 13 +++++++++---- assets/xml/objects/object_skj.xml | 16 +++++++--------- assets/xml/objects/object_spot02_objects.xml | 1 - assets/xml/objects/object_st.xml | 4 +++- assets/xml/objects/object_ta.xml | 3 +-- assets/xml/objects/object_tk.xml | 3 ++- assets/xml/objects/object_toki_objects.xml | 3 ++- assets/xml/objects/object_tr.xml | 8 ++++++-- assets/xml/objects/object_tw.xml | 12 ++++++++---- assets/xml/objects/object_wf.xml | 1 + assets/xml/objects/object_wood02.xml | 2 +- assets/xml/scenes/indoors/tokinoma.xml | 2 +- assets/xml/scenes/indoors/tokinoma_pal_n64.xml | 1 + assets/xml/scenes/overworld/spot20.xml | 1 + assets/xml/scenes/overworld/spot20_pal.xml | 1 + src/overlays/actors/ovl_Boss_Va/z_boss_va.c | 4 +++- src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c | 5 +++-- src/overlays/actors/ovl_En_Box/z_en_box.c | 4 +++- .../actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c | 5 +++-- .../actors/ovl_En_Hintnuts/z_en_hintnuts.c | 5 +++-- 50 files changed, 150 insertions(+), 80 deletions(-) diff --git a/assets/xml/objects/object_am.xml b/assets/xml/objects/object_am.xml index 0a4b88ddf8..2467baf6ab 100644 --- a/assets/xml/objects/object_am.xml +++ b/assets/xml/objects/object_am.xml @@ -5,5 +5,6 @@ + diff --git a/assets/xml/objects/object_ani.xml b/assets/xml/objects/object_ani.xml index 25ad7af354..d83aa7656a 100644 --- a/assets/xml/objects/object_ani.xml +++ b/assets/xml/objects/object_ani.xml @@ -51,6 +51,8 @@ + + diff --git a/assets/xml/objects/object_box.xml b/assets/xml/objects/object_box.xml index 34162fc94f..7ab9d9e7f4 100644 --- a/assets/xml/objects/object_box.xml +++ b/assets/xml/objects/object_box.xml @@ -5,7 +5,9 @@ + + @@ -19,11 +21,7 @@ - + - - - - diff --git a/assets/xml/objects/object_bv.xml b/assets/xml/objects/object_bv.xml index e2c2ce9202..5a8e6c594d 100644 --- a/assets/xml/objects/object_bv.xml +++ b/assets/xml/objects/object_bv.xml @@ -7,7 +7,7 @@ - + diff --git a/assets/xml/objects/object_bv_pal.xml b/assets/xml/objects/object_bv_pal.xml index 204273fc01..8de7492663 100644 --- a/assets/xml/objects/object_bv_pal.xml +++ b/assets/xml/objects/object_bv_pal.xml @@ -7,7 +7,7 @@ - + diff --git a/assets/xml/objects/object_door_killer.xml b/assets/xml/objects/object_door_killer.xml index a37f590d60..fbee0e5f70 100644 --- a/assets/xml/objects/object_door_killer.xml +++ b/assets/xml/objects/object_door_killer.xml @@ -12,6 +12,6 @@ - + diff --git a/assets/xml/objects/object_gi_medal.xml b/assets/xml/objects/object_gi_medal.xml index 28e5b1e683..d2cb6191d9 100644 --- a/assets/xml/objects/object_gi_medal.xml +++ b/assets/xml/objects/object_gi_medal.xml @@ -2,10 +2,25 @@ + + + + + + + + + + + + + + + diff --git a/assets/xml/objects/object_hintnuts.xml b/assets/xml/objects/object_hintnuts.xml index f7da2e8f5c..d3595d85e8 100644 --- a/assets/xml/objects/object_hintnuts.xml +++ b/assets/xml/objects/object_hintnuts.xml @@ -1,7 +1,7 @@ - + diff --git a/assets/xml/objects/object_hni.xml b/assets/xml/objects/object_hni.xml index 6b317eb7a6..763f6892c0 100644 --- a/assets/xml/objects/object_hni.xml +++ b/assets/xml/objects/object_hni.xml @@ -16,7 +16,7 @@ - + diff --git a/assets/xml/objects/object_ik.xml b/assets/xml/objects/object_ik.xml index 5d86e1075a..50f47e9d7c 100644 --- a/assets/xml/objects/object_ik.xml +++ b/assets/xml/objects/object_ik.xml @@ -1,8 +1,8 @@  - - - + + + @@ -29,7 +29,10 @@ + + + diff --git a/assets/xml/objects/object_kingdodongo.xml b/assets/xml/objects/object_kingdodongo.xml index 32c28766b2..3ada2822c9 100644 --- a/assets/xml/objects/object_kingdodongo.xml +++ b/assets/xml/objects/object_kingdodongo.xml @@ -101,7 +101,15 @@ - + + + + + + + + + diff --git a/assets/xml/objects/object_kingdodongo_pal.xml b/assets/xml/objects/object_kingdodongo_pal.xml index 1aa1735cbe..a0790a6db5 100644 --- a/assets/xml/objects/object_kingdodongo_pal.xml +++ b/assets/xml/objects/object_kingdodongo_pal.xml @@ -101,7 +101,15 @@ - + + + + + + + + + diff --git a/assets/xml/objects/object_lightbox.xml b/assets/xml/objects/object_lightbox.xml index 552a79d7c7..c67059b89d 100644 --- a/assets/xml/objects/object_lightbox.xml +++ b/assets/xml/objects/object_lightbox.xml @@ -1,12 +1,11 @@ - - - + + - + - + diff --git a/assets/xml/objects/object_link_child.xml b/assets/xml/objects/object_link_child.xml index 640228441a..c6bfd2df8c 100644 --- a/assets/xml/objects/object_link_child.xml +++ b/assets/xml/objects/object_link_child.xml @@ -123,6 +123,8 @@ + + @@ -175,11 +177,12 @@ + + - diff --git a/assets/xml/objects/object_medal.xml b/assets/xml/objects/object_medal.xml index 533872a551..eeb433c400 100644 --- a/assets/xml/objects/object_medal.xml +++ b/assets/xml/objects/object_medal.xml @@ -6,7 +6,7 @@ - + diff --git a/assets/xml/objects/object_oA3.xml b/assets/xml/objects/object_oA3.xml index a492bd8751..176ad09315 100644 --- a/assets/xml/objects/object_oA3.xml +++ b/assets/xml/objects/object_oA3.xml @@ -1,7 +1,6 @@ - - + diff --git a/assets/xml/objects/object_oE1.xml b/assets/xml/objects/object_oE1.xml index 4d5b1663fe..5b3234893e 100644 --- a/assets/xml/objects/object_oE1.xml +++ b/assets/xml/objects/object_oE1.xml @@ -56,7 +56,8 @@ - + + diff --git a/assets/xml/objects/object_oE11.xml b/assets/xml/objects/object_oE11.xml index 04f6f186da..26ff739cd0 100644 --- a/assets/xml/objects/object_oE11.xml +++ b/assets/xml/objects/object_oE11.xml @@ -3,7 +3,8 @@ - + + diff --git a/assets/xml/objects/object_oE12.xml b/assets/xml/objects/object_oE12.xml index a5fa39fd25..4b89954e0d 100644 --- a/assets/xml/objects/object_oE12.xml +++ b/assets/xml/objects/object_oE12.xml @@ -3,7 +3,8 @@ - + + diff --git a/assets/xml/objects/object_oE2.xml b/assets/xml/objects/object_oE2.xml index af62ad6d11..ea3ba91fc6 100644 --- a/assets/xml/objects/object_oE2.xml +++ b/assets/xml/objects/object_oE2.xml @@ -56,7 +56,8 @@ - + + diff --git a/assets/xml/objects/object_oE3.xml b/assets/xml/objects/object_oE3.xml index 95227da384..4a6cb3d926 100644 --- a/assets/xml/objects/object_oE3.xml +++ b/assets/xml/objects/object_oE3.xml @@ -56,13 +56,14 @@ - + + - + - + diff --git a/assets/xml/objects/object_oE5.xml b/assets/xml/objects/object_oE5.xml index 040fb8d733..c05917dc9a 100644 --- a/assets/xml/objects/object_oE5.xml +++ b/assets/xml/objects/object_oE5.xml @@ -52,9 +52,9 @@ - - - + + + diff --git a/assets/xml/objects/object_oE6.xml b/assets/xml/objects/object_oE6.xml index 95bb602b6b..d253130af1 100644 --- a/assets/xml/objects/object_oE6.xml +++ b/assets/xml/objects/object_oE6.xml @@ -3,7 +3,8 @@ - + + diff --git a/assets/xml/objects/object_oE7.xml b/assets/xml/objects/object_oE7.xml index b3e588d4c2..2b6b5cf316 100644 --- a/assets/xml/objects/object_oE7.xml +++ b/assets/xml/objects/object_oE7.xml @@ -7,7 +7,8 @@ - + + diff --git a/assets/xml/objects/object_oE8.xml b/assets/xml/objects/object_oE8.xml index be5de24947..8b1333fa9c 100644 --- a/assets/xml/objects/object_oE8.xml +++ b/assets/xml/objects/object_oE8.xml @@ -3,7 +3,8 @@ - + + diff --git a/assets/xml/objects/object_oE9.xml b/assets/xml/objects/object_oE9.xml index 8ea7ee18c7..e43cee426b 100644 --- a/assets/xml/objects/object_oE9.xml +++ b/assets/xml/objects/object_oE9.xml @@ -3,7 +3,8 @@ - + + diff --git a/assets/xml/objects/object_ossan.xml b/assets/xml/objects/object_ossan.xml index 963053f3f4..7e51c33bce 100644 --- a/assets/xml/objects/object_ossan.xml +++ b/assets/xml/objects/object_ossan.xml @@ -1,6 +1,9 @@ + + + diff --git a/assets/xml/objects/object_rl.xml b/assets/xml/objects/object_rl.xml index bbe0246ac8..8453935b1f 100644 --- a/assets/xml/objects/object_rl.xml +++ b/assets/xml/objects/object_rl.xml @@ -12,8 +12,6 @@ - - @@ -22,13 +20,12 @@ - - + diff --git a/assets/xml/objects/object_sa.xml b/assets/xml/objects/object_sa.xml index 8a63840409..e87cd793dd 100644 --- a/assets/xml/objects/object_sa.xml +++ b/assets/xml/objects/object_sa.xml @@ -66,7 +66,7 @@ - + diff --git a/assets/xml/objects/object_sb.xml b/assets/xml/objects/object_sb.xml index 64d3bb005a..3adf2c17ee 100644 --- a/assets/xml/objects/object_sb.xml +++ b/assets/xml/objects/object_sb.xml @@ -4,8 +4,9 @@ - - + + + diff --git a/assets/xml/objects/object_skb.xml b/assets/xml/objects/object_skb.xml index 5b5efb4848..1220ddf6d9 100644 --- a/assets/xml/objects/object_skb.xml +++ b/assets/xml/objects/object_skb.xml @@ -55,10 +55,15 @@ - - - - + + + + + + + + + diff --git a/assets/xml/objects/object_skj.xml b/assets/xml/objects/object_skj.xml index 38636256fe..958301d2e8 100644 --- a/assets/xml/objects/object_skj.xml +++ b/assets/xml/objects/object_skj.xml @@ -41,27 +41,25 @@ + + + + + + + - - - - - - - - - diff --git a/assets/xml/objects/object_spot02_objects.xml b/assets/xml/objects/object_spot02_objects.xml index 65f45ff515..3dfaf227d3 100644 --- a/assets/xml/objects/object_spot02_objects.xml +++ b/assets/xml/objects/object_spot02_objects.xml @@ -3,7 +3,6 @@ - diff --git a/assets/xml/objects/object_st.xml b/assets/xml/objects/object_st.xml index 983b9e2eab..9556f081d0 100644 --- a/assets/xml/objects/object_st.xml +++ b/assets/xml/objects/object_st.xml @@ -22,7 +22,9 @@ - + + + diff --git a/assets/xml/objects/object_ta.xml b/assets/xml/objects/object_ta.xml index 5e446bf5c9..4f339fc951 100644 --- a/assets/xml/objects/object_ta.xml +++ b/assets/xml/objects/object_ta.xml @@ -66,7 +66,6 @@ - - + diff --git a/assets/xml/objects/object_tk.xml b/assets/xml/objects/object_tk.xml index ffa44c5485..5c9d0a0a6f 100644 --- a/assets/xml/objects/object_tk.xml +++ b/assets/xml/objects/object_tk.xml @@ -8,7 +8,8 @@ - + + diff --git a/assets/xml/objects/object_toki_objects.xml b/assets/xml/objects/object_toki_objects.xml index cd07e60d2b..3cada31f89 100644 --- a/assets/xml/objects/object_toki_objects.xml +++ b/assets/xml/objects/object_toki_objects.xml @@ -12,7 +12,8 @@ - + + diff --git a/assets/xml/objects/object_tr.xml b/assets/xml/objects/object_tr.xml index 986a88cc5c..827b85bfe6 100644 --- a/assets/xml/objects/object_tr.xml +++ b/assets/xml/objects/object_tr.xml @@ -9,7 +9,9 @@ - + + + @@ -97,7 +99,9 @@ - + + + diff --git a/assets/xml/objects/object_tw.xml b/assets/xml/objects/object_tw.xml index c6b9ec6099..c528fb4518 100644 --- a/assets/xml/objects/object_tw.xml +++ b/assets/xml/objects/object_tw.xml @@ -106,9 +106,11 @@ - - + + + + @@ -130,9 +132,11 @@ - - + + + + diff --git a/assets/xml/objects/object_wf.xml b/assets/xml/objects/object_wf.xml index 96ea841032..d5d70639d7 100644 --- a/assets/xml/objects/object_wf.xml +++ b/assets/xml/objects/object_wf.xml @@ -122,6 +122,7 @@ + diff --git a/assets/xml/objects/object_wood02.xml b/assets/xml/objects/object_wood02.xml index 5dd80a17b6..bdcc2d2e38 100644 --- a/assets/xml/objects/object_wood02.xml +++ b/assets/xml/objects/object_wood02.xml @@ -20,7 +20,7 @@ - + diff --git a/assets/xml/scenes/indoors/tokinoma.xml b/assets/xml/scenes/indoors/tokinoma.xml index 4d83fe3908..fb62d9c2cc 100644 --- a/assets/xml/scenes/indoors/tokinoma.xml +++ b/assets/xml/scenes/indoors/tokinoma.xml @@ -1,5 +1,6 @@ + @@ -12,7 +13,6 @@ - diff --git a/assets/xml/scenes/indoors/tokinoma_pal_n64.xml b/assets/xml/scenes/indoors/tokinoma_pal_n64.xml index eb98a321af..9c0a970998 100644 --- a/assets/xml/scenes/indoors/tokinoma_pal_n64.xml +++ b/assets/xml/scenes/indoors/tokinoma_pal_n64.xml @@ -1,5 +1,6 @@ + diff --git a/assets/xml/scenes/overworld/spot20.xml b/assets/xml/scenes/overworld/spot20.xml index 3d305508ad..d3dd77a41e 100644 --- a/assets/xml/scenes/overworld/spot20.xml +++ b/assets/xml/scenes/overworld/spot20.xml @@ -1,5 +1,6 @@ + diff --git a/assets/xml/scenes/overworld/spot20_pal.xml b/assets/xml/scenes/overworld/spot20_pal.xml index 0ba9380e13..297b1c316e 100644 --- a/assets/xml/scenes/overworld/spot20_pal.xml +++ b/assets/xml/scenes/overworld/spot20_pal.xml @@ -1,5 +1,6 @@ + diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 77a338f090..01e764b516 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -630,7 +630,9 @@ void BossVa_Init(Actor* thisx, PlayState* play2) { break; default: this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT; - SkelAnime_Init(play, &this->skelAnime, &gBarinadeBariSkel, &gBarinadeBariAnim, NULL, NULL, 0); + //! @bug Flex skeleton is used as normal skeleton + SkelAnime_Init(play, &this->skelAnime, (SkeletonHeader*)&gBarinadeBariSkel, &gBarinadeBariAnim, NULL, NULL, + 0); this->actor.shape.yOffset = 400.0f; break; case BOSSVA_DOOR: diff --git a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c index 51237a88e5..cab53df6ac 100644 --- a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c +++ b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c @@ -167,7 +167,7 @@ void DemoIk_MoveToStartPos(DemoIk* this, PlayState* play, s32 cueChannel) { void DemoIk_Type1Init(DemoIk* this, PlayState* play) { s32 pad[3]; - SkeletonHeader* skeleton; + FlexSkeletonHeader* skeleton; AnimationHeader* animation; f32 phi_f0; @@ -189,7 +189,8 @@ void DemoIk_Type1Init(DemoIk* this, PlayState* play) { // No break is required for matching } ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, phi_f0); - SkelAnime_Init(play, &this->skelAnime, skeleton, NULL, this->jointTable, this->morphTable, 2); + //! @bug Flex skeleton is used as normal skeleton + SkelAnime_Init(play, &this->skelAnime, (SkeletonHeader*)skeleton, NULL, this->jointTable, this->morphTable, 2); Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE, 0.0f); } 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 1e1e2271f7..1ecc771939 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -188,7 +188,9 @@ void EnBox_Init(Actor* thisx, PlayState* play2) { this->dyna.actor.world.rot.y += 0x8000; this->dyna.actor.home.rot.z = this->dyna.actor.world.rot.z = this->dyna.actor.shape.rot.z = 0; - SkelAnime_Init(play, &this->skelanime, &gTreasureChestSkel, anim, this->jointTable, this->morphTable, 5); + //! @bug Flex skeleton is used as normal skeleton + SkelAnime_Init(play, &this->skelanime, (SkeletonHeader*)&gTreasureChestSkel, anim, this->jointTable, + this->morphTable, 5); Animation_Change(&this->skelanime, anim, 1.5f, animFrameStart, endFrame, ANIMMODE_ONCE, 0.0f); switch (this->type) { diff --git a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c index 6228b1c2fd..5c18294fb8 100644 --- a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c +++ b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c @@ -196,8 +196,9 @@ void EnDntNomal_WaitForObject(EnDntNomal* this, PlayState* play) { this->actor.gravity = -2.0f; Actor_SetScale(&this->actor, 0.01f); if (this->type == ENDNTNOMAL_TARGET) { - SkelAnime_Init(play, &this->skelAnime, &gHintNutsSkel, &gHintNutsBurrowAnim, this->jointTable, - this->morphTable, 10); + //! @bug Flex skeleton is used as normal skeleton + SkelAnime_Init(play, &this->skelAnime, (SkeletonHeader*)&gHintNutsSkel, &gHintNutsBurrowAnim, + this->jointTable, this->morphTable, 10); this->actor.draw = EnDntNomal_DrawTargetScrub; } else { SkelAnime_Init(play, &this->skelAnime, &gDntStageSkel, &gDntStageHideAnim, this->jointTable, diff --git a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c index 94db22bdbe..454f83c2d0 100644 --- a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c +++ b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c @@ -85,8 +85,9 @@ void EnHintnuts_Init(Actor* thisx, PlayState* play) { this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE); } else { ActorShape_Init(&this->actor.shape, 0x0, ActorShadow_DrawCircle, 35.0f); - SkelAnime_Init(play, &this->skelAnime, &gHintNutsSkel, &gHintNutsStandAnim, this->jointTable, this->morphTable, - 10); + //! @bug Flex skeleton is used as normal skeleton + SkelAnime_Init(play, &this->skelAnime, (SkeletonHeader*)&gHintNutsSkel, &gHintNutsStandAnim, this->jointTable, + this->morphTable, 10); Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit); From c859678d5fc79b315cff3b5de10078c50e4b0bc8 Mon Sep 17 00:00:00 2001 From: fig02 Date: Fri, 14 Feb 2025 13:55:11 -0500 Subject: [PATCH 11/15] Document `sSceneInitLetterboxTimer` (#2469) * document scene init letterbox timer * reword --- src/code/z_camera.c | 6 +++--- src/code/z_camera_data.inc.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/code/z_camera.c b/src/code/z_camera.c index dce9b5b089..6b0f4c24f4 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -7533,7 +7533,7 @@ void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, PlayState #if DEBUG_FEATURES sDbgModeIdx = -1; #endif - D_8011D3F0 = 3; + sSceneInitLetterboxTimer = 3; // show letterbox for 3 frames at the start of a new scene PRINTF(VT_FGCOL(BLUE) "camera: initialize --- " VT_RST " UID %d\n", camera->uid); } @@ -8142,8 +8142,8 @@ Vec3s Camera_Update(Camera* camera) { if ((gSaveContext.gameMode != GAMEMODE_NORMAL) && (gSaveContext.gameMode != GAMEMODE_END_CREDITS)) { sCameraInterfaceField = CAM_INTERFACE_FIELD(CAM_LETTERBOX_NONE, CAM_HUD_VISIBILITY_ALL, 0); Camera_UpdateInterface(sCameraInterfaceField); - } else if ((D_8011D3F0 != 0) && (camera->camId == CAM_ID_MAIN)) { - D_8011D3F0--; + } else if ((sSceneInitLetterboxTimer != 0) && (camera->camId == CAM_ID_MAIN)) { + sSceneInitLetterboxTimer--; sCameraInterfaceField = CAM_INTERFACE_FIELD(CAM_LETTERBOX_LARGE, CAM_HUD_VISIBILITY_NOTHING_ALT, 0); Camera_UpdateInterface(sCameraInterfaceField); } else if (camera->play->transitionMode != TRANS_MODE_OFF) { diff --git a/src/code/z_camera_data.inc.c b/src/code/z_camera_data.inc.c index fece55ea3d..07a527afe8 100644 --- a/src/code/z_camera_data.inc.c +++ b/src/code/z_camera_data.inc.c @@ -2584,7 +2584,7 @@ s16 D_8011D3CC[] = { s32 sUpdateCameraDirection = 0; s32 D_8011D3EC = 0; -s32 D_8011D3F0 = 0; +s32 sSceneInitLetterboxTimer = 0; s32 sDemo5PrevAction12Frame = -16; From 6f8b4d82d55a31957740a49f29ab6908f64e64ab Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Sat, 15 Feb 2025 04:41:32 +0100 Subject: [PATCH 12/15] Cleanup colliders 3 (#2467) * standardize s[Name][Collider]JntSphElementsInit[Name] * standardize ColliderCylinder struct members names on `[name]collider[s][Cylinder]` * format * fix * fix2 * fix3 * collidersCylinder -> colliderCylinders --- .../actors/ovl_Bg_Dodoago/z_bg_dodoago.c | 54 +++++------ .../actors/ovl_Bg_Dodoago/z_bg_dodoago.h | 6 +- .../ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c | 18 ++-- .../ovl_Bg_Haka_Sgami/z_bg_haka_sgami.h | 2 +- .../ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c | 16 ++-- .../ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.h | 2 +- .../z_bg_spot06_objects.c | 4 +- .../actors/ovl_Boss_Fd/z_boss_fd_colchk.inc.c | 4 +- .../actors/ovl_Boss_Ganon2/z_boss_ganon2.c | 12 +-- .../ovl_Boss_Ganondrof/z_boss_ganondrof.c | 50 +++++----- .../ovl_Boss_Ganondrof/z_boss_ganondrof.h | 4 +- .../actors/ovl_Boss_Goma/z_boss_goma.c | 4 +- src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 66 ++++++------- src/overlays/actors/ovl_Boss_Sst/z_boss_sst.h | 2 +- .../ovl_Boss_Sst/z_boss_sst_colchk.inc.c | 8 +- src/overlays/actors/ovl_Boss_Va/z_boss_va.c | 96 +++++++++---------- src/overlays/actors/ovl_Boss_Va/z_boss_va.h | 2 +- src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c | 66 ++++++------- src/overlays/actors/ovl_Demo_Gj/z_demo_gj.h | 2 +- .../actors/ovl_Door_Killer/z_door_killer.c | 4 +- .../ovl_En_Anubice_Fire/z_en_anubice_fire.c | 26 ++--- .../ovl_En_Anubice_Fire/z_en_anubice_fire.h | 2 +- src/overlays/actors/ovl_En_Ba/z_en_ba.c | 4 +- src/overlays/actors/ovl_En_Bb/z_en_bb.c | 4 +- .../actors/ovl_En_Bigokuta/z_en_bigokuta.c | 60 ++++++------ .../actors/ovl_En_Bigokuta/z_en_bigokuta.h | 2 +- .../actors/ovl_En_Bom_Chu/z_en_bom_chu.c | 6 +- .../actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c | 34 +++---- .../actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.h | 4 +- src/overlays/actors/ovl_En_Goma/z_en_goma.c | 42 ++++---- src/overlays/actors/ovl_En_Goma/z_en_goma.h | 4 +- src/overlays/actors/ovl_En_Horse/z_en_horse.c | 58 +++++------ src/overlays/actors/ovl_En_Horse/z_en_horse.h | 4 +- .../z_en_horse_link_child.c | 4 +- .../actors/ovl_En_Insect/z_en_insect.c | 4 +- .../actors/ovl_En_Peehat/z_en_peehat.c | 4 +- src/overlays/actors/ovl_En_Poh/z_en_poh.c | 4 +- src/overlays/actors/ovl_En_Ssh/z_en_ssh.c | 74 +++++++------- src/overlays/actors/ovl_En_Ssh/z_en_ssh.h | 2 +- src/overlays/actors/ovl_En_St/z_en_st.c | 72 +++++++------- src/overlays/actors/ovl_En_St/z_en_st.h | 2 +- src/overlays/actors/ovl_En_Sw/z_en_sw.c | 4 +- src/overlays/actors/ovl_En_Wf/z_en_wf.c | 6 +- .../actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c | 36 +++---- .../actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h | 4 +- .../ovl_Obj_Lightswitch/z_obj_lightswitch.c | 4 +- .../actors/ovl_Obj_Switch/z_obj_switch.c | 6 +- .../actors/ovl_Obj_Syokudai/z_obj_syokudai.c | 30 +++--- .../actors/ovl_Obj_Syokudai/z_obj_syokudai.h | 4 +- 49 files changed, 468 insertions(+), 464 deletions(-) diff --git a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c index d202bd9abd..7153161f34 100644 --- a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c +++ b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c @@ -140,12 +140,12 @@ void BgDodoago_Init(Actor* thisx, PlayState* play) { return; } - Collider_InitCylinder(play, &this->colliderMain); - Collider_InitCylinder(play, &this->colliderLeft); - Collider_InitCylinder(play, &this->colliderRight); - Collider_SetCylinder(play, &this->colliderMain, &this->dyna.actor, &sColCylinderInitMain); - Collider_SetCylinder(play, &this->colliderLeft, &this->dyna.actor, &sColCylinderInitLeftRight); - Collider_SetCylinder(play, &this->colliderRight, &this->dyna.actor, &sColCylinderInitLeftRight); + Collider_InitCylinder(play, &this->mainCollider); + Collider_InitCylinder(play, &this->leftCollider); + Collider_InitCylinder(play, &this->rightCollider); + Collider_SetCylinder(play, &this->mainCollider, &this->dyna.actor, &sColCylinderInitMain); + Collider_SetCylinder(play, &this->leftCollider, &this->dyna.actor, &sColCylinderInitLeftRight); + Collider_SetCylinder(play, &this->rightCollider, &this->dyna.actor, &sColCylinderInitLeftRight); BgDodoago_SetupAction(this, BgDodoago_WaitExplosives); sDisableBombCatcher = false; @@ -155,13 +155,13 @@ void BgDodoago_Destroy(Actor* thisx, PlayState* play) { BgDodoago* this = (BgDodoago*)thisx; DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); - Collider_DestroyCylinder(play, &this->colliderMain); - Collider_DestroyCylinder(play, &this->colliderLeft); - Collider_DestroyCylinder(play, &this->colliderRight); + Collider_DestroyCylinder(play, &this->mainCollider); + Collider_DestroyCylinder(play, &this->leftCollider); + Collider_DestroyCylinder(play, &this->rightCollider); } void BgDodoago_WaitExplosives(BgDodoago* this, PlayState* play) { - Actor* explosive = Actor_GetCollidedExplosive(play, &this->colliderMain.base); + Actor* explosive = Actor_GetCollidedExplosive(play, &this->mainCollider.base); if (explosive != NULL) { this->state = @@ -198,21 +198,21 @@ void BgDodoago_WaitExplosives(BgDodoago* this, PlayState* play) { sTimer = 50; } } else if (Flags_GetEventChkInf(EVENTCHKINF_B0)) { - Collider_UpdateCylinder(&this->dyna.actor, &this->colliderMain); - Collider_UpdateCylinder(&this->dyna.actor, &this->colliderLeft); - Collider_UpdateCylinder(&this->dyna.actor, &this->colliderRight); + Collider_UpdateCylinder(&this->dyna.actor, &this->mainCollider); + Collider_UpdateCylinder(&this->dyna.actor, &this->leftCollider); + Collider_UpdateCylinder(&this->dyna.actor, &this->rightCollider); - this->colliderMain.dim.pos.z += 200; + this->mainCollider.dim.pos.z += 200; - this->colliderLeft.dim.pos.z += 215; - this->colliderLeft.dim.pos.x += 90; + this->leftCollider.dim.pos.z += 215; + this->leftCollider.dim.pos.x += 90; - this->colliderRight.dim.pos.z += 215; - this->colliderRight.dim.pos.x -= 90; + this->rightCollider.dim.pos.z += 215; + this->rightCollider.dim.pos.x -= 90; - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderMain.base); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderLeft.base); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderRight.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->mainCollider.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->leftCollider.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->rightCollider.base); } } @@ -290,15 +290,15 @@ void BgDodoago_Update(Actor* thisx, PlayState* play) { if (this->dyna.actor.parent == NULL) { // this is a "bomb catcher", it kills the XZ speed and sets the timer for bombs that are dropped through the // holes in the bridge above the skull - if ((this->colliderLeft.base.ocFlags1 & OC1_HIT) || (this->colliderRight.base.ocFlags1 & OC1_HIT)) { + if ((this->leftCollider.base.ocFlags1 & OC1_HIT) || (this->rightCollider.base.ocFlags1 & OC1_HIT)) { - if (this->colliderLeft.base.ocFlags1 & OC1_HIT) { - actor = this->colliderLeft.base.oc; + if (this->leftCollider.base.ocFlags1 & OC1_HIT) { + actor = this->leftCollider.base.oc; } else { - actor = this->colliderRight.base.oc; + actor = this->rightCollider.base.oc; } - this->colliderLeft.base.ocFlags1 &= ~OC1_HIT; - this->colliderRight.base.ocFlags1 &= ~OC1_HIT; + this->leftCollider.base.ocFlags1 &= ~OC1_HIT; + this->rightCollider.base.ocFlags1 &= ~OC1_HIT; if (actor->category == ACTORCAT_EXPLOSIVE && actor->id == ACTOR_EN_BOM && actor->params == 0) { bomb = (EnBom*)actor; diff --git a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.h b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.h index c767ed5003..9f361a3ccb 100644 --- a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.h +++ b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.h @@ -16,9 +16,9 @@ typedef void (*BgDodoagoActionFunc)(struct BgDodoago*, struct PlayState*); typedef struct BgDodoago { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ s16 state; // BgDodoagoEye or a timer-like value - /* 0x0168 */ ColliderCylinder colliderMain; // Used to detect explosions for lighting the eyes - /* 0x01B4 */ ColliderCylinder colliderLeft; // OC-colliding bombs have their xz speed cleared and timer set - /* 0x0200 */ ColliderCylinder colliderRight; // same as colliderLeft + /* 0x0168 */ ColliderCylinder mainCollider; // Used to detect explosions for lighting the eyes + /* 0x01B4 */ ColliderCylinder leftCollider; // OC-colliding bombs have their xz speed cleared and timer set + /* 0x0200 */ ColliderCylinder rightCollider; // same as colliderLeft /* 0x024C */ BgDodoagoActionFunc actionFunc; } BgDodoago; // size = 0x0250 diff --git a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c index ce4da2a2ea..f11973a86f 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c +++ b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c @@ -155,12 +155,12 @@ void BgHakaSgami_Init(Actor* thisx, PlayState* play) { Collider_InitTris(play, colliderScythe); Collider_SetTris(play, colliderScythe, thisx, &sTrisInit, this->colliderScytheItems); - Collider_InitCylinder(play, &this->colliderScytheCenter); - Collider_SetCylinder(play, &this->colliderScytheCenter, thisx, &sCylinderInit); + Collider_InitCylinder(play, &this->scytheCenterCollider); + Collider_SetCylinder(play, &this->scytheCenterCollider, thisx, &sCylinderInit); - this->colliderScytheCenter.dim.pos.x = thisx->world.pos.x; - this->colliderScytheCenter.dim.pos.y = thisx->world.pos.y; - this->colliderScytheCenter.dim.pos.z = thisx->world.pos.z; + this->scytheCenterCollider.dim.pos.x = thisx->world.pos.x; + this->scytheCenterCollider.dim.pos.y = thisx->world.pos.y; + this->scytheCenterCollider.dim.pos.z = thisx->world.pos.z; CollisionCheck_SetInfo(&thisx->colChkInfo, NULL, &sColChkInfoInit); @@ -181,8 +181,8 @@ void BgHakaSgami_Init(Actor* thisx, PlayState* play) { thisx->flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; } else { this->requiredObjectSlot = Object_GetSlot(&play->objectCtx, OBJECT_ICE_OBJECTS); - this->colliderScytheCenter.dim.radius = 30; - this->colliderScytheCenter.dim.height = 70; + this->scytheCenterCollider.dim.radius = 30; + this->scytheCenterCollider.dim.height = 70; Actor_SetFocus(thisx, 40.0f); } @@ -200,7 +200,7 @@ void BgHakaSgami_Destroy(Actor* thisx, PlayState* play) { Effect_Delete(play, this->blureEffectIndex[0]); Effect_Delete(play, this->blureEffectIndex[1]); Collider_DestroyTris(play, &this->colliderScythe); - Collider_DestroyCylinder(play, &this->colliderScytheCenter); + Collider_DestroyCylinder(play, &this->scytheCenterCollider); } void BgHakaSgami_SetupSpin(BgHakaSgami* this, PlayState* play) { @@ -289,7 +289,7 @@ void BgHakaSgami_Spin(BgHakaSgami* this, PlayState* play) { } CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderScythe.base); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderScytheCenter.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->scytheCenterCollider.base); Actor_PlaySfx_Flagged(&this->actor, NA_SE_EV_ROLLCUTTER_MOTOR - SFX_FLAG); } diff --git a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.h b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.h index 2bbcd2dc0d..53c0b63400 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.h +++ b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.h @@ -15,7 +15,7 @@ typedef struct BgHakaSgami { /* 0x0151 */ s8 unk_151; /* 0x0152 */ s16 timer; /* 0x0154 */ s32 blureEffectIndex[2]; - /* 0x015C */ ColliderCylinder colliderScytheCenter; + /* 0x015C */ ColliderCylinder scytheCenterCollider; /* 0x01A8 */ ColliderTris colliderScythe; /* 0x01C8 */ ColliderTrisElement colliderScytheItems[4]; } BgHakaSgami; // size = 0x0338 diff --git a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c index e953b653c1..3ecb0cb2f8 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c +++ b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c @@ -89,13 +89,13 @@ static InitChainEntry sInitChain[] = { static CollisionHeader* sCollisionHeaders[] = { &gPillarCol, &gThroneCol }; void BgJyaIronobj_InitCylinder(BgJyaIronobj* this, PlayState* play) { - ColliderCylinder* colCylinder = &this->colCylinder; + ColliderCylinder* colCylinder = &this->colliderCylinder; Collider_InitCylinder(play, colCylinder); Collider_SetCylinder(play, colCylinder, &this->dyna.actor, &sCylinderInit); if (PARAMS_GET_U(this->dyna.actor.params, 0, 1) == 1) { - this->colCylinder.dim.radius = 40; - this->colCylinder.dim.height = 100; + this->colliderCylinder.dim.radius = 40; + this->colliderCylinder.dim.height = 100; } Collider_UpdateCylinder(&this->dyna.actor, colCylinder); } @@ -244,7 +244,7 @@ void BgJyaIronobj_Init(Actor* thisx, PlayState* play) { void BgJyaIronobj_Destroy(Actor* thisx, PlayState* play) { BgJyaIronobj* this = (BgJyaIronobj*)thisx; - Collider_DestroyCylinder(play, &this->colCylinder); + Collider_DestroyCylinder(play, &this->colliderCylinder); DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); } @@ -258,9 +258,9 @@ void func_808992E8(BgJyaIronobj* this, PlayState* play) { Vec3f dropPos; s32 i; - if (this->colCylinder.base.acFlags & AC_HIT) { - actor = this->colCylinder.base.ac; - this->colCylinder.base.acFlags &= ~AC_HIT; + if (this->colliderCylinder.base.acFlags & AC_HIT) { + actor = this->colliderCylinder.base.ac; + this->colliderCylinder.base.acFlags &= ~AC_HIT; if (actor != NULL && actor->id == ACTOR_EN_IK) { particleFunc[PARAMS_GET_U(this->dyna.actor.params, 0, 1)](this, play, (EnIk*)actor); SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 80, NA_SE_EN_IRONNACK_BREAK_PILLAR); @@ -275,7 +275,7 @@ void func_808992E8(BgJyaIronobj* this, PlayState* play) { return; } } else { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCylinder.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder.base); } } diff --git a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.h b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.h index e31894172e..9768aec2a5 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.h +++ b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.h @@ -11,7 +11,7 @@ typedef void (*BgJyaIronobjActionFunc)(struct BgJyaIronobj*, struct PlayState*); typedef struct BgJyaIronobj { /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ BgJyaIronobjActionFunc actionFunc; - /* 0x0168 */ ColliderCylinder colCylinder; + /* 0x0168 */ ColliderCylinder colliderCylinder; } BgJyaIronobj; // size = 0x01B4 #endif diff --git a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index 2a2e8bae0c..a713bb557c 100644 --- a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -68,7 +68,7 @@ ActorProfile Bg_Spot06_Objects_Profile = { /**/ BgSpot06Objects_Draw, }; -static ColliderJntSphElementInit sJntSphItemsInit[1] = { +static ColliderJntSphElementInit sJntSphElementsInit[1] = { { { ELEM_MATERIAL_UNK0, @@ -92,7 +92,7 @@ static ColliderJntSphInit sJntSphInit = { COLSHAPE_JNTSPH, }, 1, - sJntSphItemsInit, + sJntSphElementsInit, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd_colchk.inc.c b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd_colchk.inc.c index 78dda01d3e..1012117e52 100644 --- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd_colchk.inc.c +++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd_colchk.inc.c @@ -1,6 +1,6 @@ #include "z64collision_check.h" -static ColliderJntSphElementInit sJntSphItemsInit[19] = { +static ColliderJntSphElementInit sJntSphElementsInit[19] = { { { ELEM_MATERIAL_UNK3, @@ -222,5 +222,5 @@ static ColliderJntSphInit sJntSphInit = { COLSHAPE_JNTSPH, }, 19, - sJntSphItemsInit, + sJntSphElementsInit, }; diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 8d73bf78c3..368c3fdb21 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -87,7 +87,7 @@ static Vec3f D_80906D6C = { 0.0f, 0.0f, 500.0f }; static u8 D_80906D78 = 0; -static ColliderJntSphElementInit sJntSphItemsInit1[] = { +static ColliderJntSphElementInit sJntSphElementsInit1[] = { { { ELEM_MATERIAL_UNK0, @@ -275,11 +275,11 @@ static ColliderJntSphInit sJntSphInit1 = { OC2_FIRST_ONLY | OC2_TYPE_1, COLSHAPE_JNTSPH, }, - ARRAY_COUNT(sJntSphItemsInit1), - sJntSphItemsInit1, + ARRAY_COUNT(sJntSphElementsInit1), + sJntSphElementsInit1, }; -static ColliderJntSphElementInit sJntSphItemsInit2[] = { +static ColliderJntSphElementInit sJntSphElementsInit2[] = { { { ELEM_MATERIAL_UNK2, @@ -313,8 +313,8 @@ static ColliderJntSphInit sJntSphInit2 = { OC2_TYPE_1, COLSHAPE_JNTSPH, }, - ARRAY_COUNT(sJntSphItemsInit2), - sJntSphItemsInit2, + ARRAY_COUNT(sJntSphElementsInit2), + sJntSphElementsInit2, }; static Vec3f D_8090EB20; diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index f257cd3b96..cc30350bc4 100644 --- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -313,10 +313,10 @@ void BossGanondrof_Init(Actor* thisx, PlayState* play) { BossGanondrof_SetupPaintings(this); } - Collider_InitCylinder(play, &this->colliderBody); - Collider_InitCylinder(play, &this->colliderSpear); - Collider_SetCylinder(play, &this->colliderBody, &this->actor, &sCylinderInitBody); - Collider_SetCylinder(play, &this->colliderSpear, &this->actor, &sCylinderInitSpear); + Collider_InitCylinder(play, &this->bodyCollider); + Collider_InitCylinder(play, &this->spearCollider); + Collider_SetCylinder(play, &this->bodyCollider, &this->actor, &sCylinderInitBody); + Collider_SetCylinder(play, &this->spearCollider, &this->actor, &sCylinderInitSpear); this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; if (Flags_GetClear(play, play->roomCtx.curRoom.num)) { Actor_Kill(&this->actor); @@ -336,8 +336,8 @@ void BossGanondrof_Destroy(Actor* thisx, PlayState* play) { PRINTF("DT1\n"); SkelAnime_Free(&this->skelAnime, play); - Collider_DestroyCylinder(play, &this->colliderBody); - Collider_DestroyCylinder(play, &this->colliderSpear); + Collider_DestroyCylinder(play, &this->bodyCollider); + Collider_DestroyCylinder(play, &this->spearCollider); if (this->actor.params == GND_REAL_BOSS) { LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); } @@ -480,9 +480,9 @@ void BossGanondrof_Paintings(BossGanondrof* this, PlayState* play) { if (this->flyMode != GND_FLY_PAINTING) { BossGanondrof_SetupNeutral(this, -20.0f); this->timers[0] = 100; - this->colliderBody.dim.radius = 20; - this->colliderBody.dim.height = 60; - this->colliderBody.dim.yShift = -33; + this->bodyCollider.dim.radius = 20; + this->bodyCollider.dim.height = 60; + this->bodyCollider.dim.yShift = -33; Actor_PlaySfx(&this->actor, NA_SE_EN_FANTOM_LAUGH); this->actor.naviEnemyId = NAVI_ENEMY_PHANTOM_GANON_PHASE_2; } else { @@ -794,7 +794,7 @@ void BossGanondrof_SetupBlock(BossGanondrof* this, PlayState* play) { } void BossGanondrof_Block(BossGanondrof* this, PlayState* play) { - this->colliderBody.base.colMaterial = COL_MATERIAL_METAL; + this->bodyCollider.base.colMaterial = COL_MATERIAL_METAL; SkelAnime_Update(&this->skelAnime); this->actor.world.pos.x += this->actor.velocity.x; this->actor.world.pos.z += this->actor.velocity.z; @@ -823,7 +823,7 @@ void BossGanondrof_Charge(BossGanondrof* this, PlayState* play) { f32 dxCenter = thisx->world.pos.x - GND_BOSSROOM_CENTER_X; f32 dzCenter = thisx->world.pos.z - GND_BOSSROOM_CENTER_Z; - this->colliderBody.base.colMaterial = COL_MATERIAL_METAL; + this->bodyCollider.base.colMaterial = COL_MATERIAL_METAL; SkelAnime_Update(&this->skelAnime); switch (this->work[GND_ACTION_STATE]) { case CHARGE_WINDUP: @@ -1250,13 +1250,13 @@ void BossGanondrof_CollisionCheck(BossGanondrof* this, PlayState* play) { if (this->work[GND_INVINC_TIMER] != 0) { this->work[GND_INVINC_TIMER]--; this->returnCount = 0; - this->colliderBody.base.acFlags &= ~AC_HIT; + this->bodyCollider.base.acFlags &= ~AC_HIT; } else { - acHit = this->colliderBody.base.acFlags & AC_HIT; + acHit = this->bodyCollider.base.acFlags & AC_HIT; if ((acHit && ((s8)this->actor.colChkInfo.health > 0)) || (this->returnCount != 0)) { if (acHit) { - this->colliderBody.base.acFlags &= ~AC_HIT; - acHitElem = this->colliderBody.elem.acHitElem; + this->bodyCollider.base.acFlags &= ~AC_HIT; + acHitElem = this->bodyCollider.elem.acHitElem; } if (this->flyMode != GND_FLY_PAINTING) { if (acHit && (this->actionFunc != BossGanondrof_Stunned) && @@ -1319,7 +1319,7 @@ void BossGanondrof_Update(Actor* thisx, PlayState* play) { PRINTF("MOVE START %d\n", this->actor.params); this->actor.flags &= ~ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER; - this->colliderBody.base.colMaterial = COL_MATERIAL_HIT3; + this->bodyCollider.base.colMaterial = COL_MATERIAL_HIT3; if (this->killActor) { Actor_Kill(&this->actor); return; @@ -1347,20 +1347,20 @@ void BossGanondrof_Update(Actor* thisx, PlayState* play) { } PRINTF("MOVE END\n"); - BossGanondrof_SetColliderPos(&this->targetPos, &this->colliderBody); - BossGanondrof_SetColliderPos(&this->spearTip, &this->colliderSpear); + BossGanondrof_SetColliderPos(&this->targetPos, &this->bodyCollider); + BossGanondrof_SetColliderPos(&this->spearTip, &this->spearCollider); if ((this->flyMode == GND_FLY_PAINTING) && !horse->bossGndInPainting) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base); } if ((this->actionFunc == BossGanondrof_Stunned) && (this->timers[0] > 1)) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderBody.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCollider.base); } else if (this->actionFunc == BossGanondrof_Block) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base); } else if (this->actionFunc == BossGanondrof_Charge) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base); - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderBody.base); - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSpear.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->bodyCollider.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->spearCollider.base); } this->actor.focus.pos = this->targetPos; diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h index 5b5bd846fe..1fed43e428 100644 --- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h +++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h @@ -98,8 +98,8 @@ typedef struct BossGanondrof { /* 0x0454 */ f32 rideRotY[30]; // possibly only 25 used /* 0x04CC */ LightNode* lightNode; /* 0x04D0 */ LightInfo lightInfo; - /* 0x04E0 */ ColliderCylinder colliderBody; - /* 0x052C */ ColliderCylinder colliderSpear; + /* 0x04E0 */ ColliderCylinder bodyCollider; + /* 0x052C */ ColliderCylinder spearCollider; } BossGanondrof; // size = 0x0578 #endif diff --git a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c index 5f24de4dfb..2b14470128 100644 --- a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -89,7 +89,7 @@ ActorProfile Boss_Goma_Profile = { /**/ BossGoma_Draw, }; -static ColliderJntSphElementInit sColliderJntSphElementInit[13] = { +static ColliderJntSphElementInit sColliderJntSphElementsInit[13] = { { { ELEM_MATERIAL_UNK3, @@ -245,7 +245,7 @@ static ColliderJntSphInit sColliderJntSphInit = { COLSHAPE_JNTSPH, }, 13, - sColliderJntSphElementInit, + sColliderJntSphElementsInit, }; static u8 sClearPixelTableFirstPass[16 * 16] = { diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 435ff81ac8..588dec91a4 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -294,7 +294,7 @@ void BossSst_Init(Actor* thisx, PlayState* play2) { BossSst* this = (BossSst*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); - Collider_InitCylinder(play, &this->colliderCyl); + Collider_InitCylinder(play, &this->colliderCylinder); Collider_InitJntSph(play, &this->colliderJntSph); CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); Flags_SetSwitch(play, 0x14); @@ -305,7 +305,7 @@ void BossSst_Init(Actor* thisx, PlayState* play2) { this->morphTable, 45); ActorShape_Init(&this->actor.shape, 70000.0f, ActorShadow_DrawCircle, 95.0f); Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInitHead, this->colliderJntSphElements); - Collider_SetCylinder(play, &this->colliderCyl, &this->actor, &sCylinderInitHead); + Collider_SetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInitHead); sHead = this; this->actor.world.pos.x = ROOM_CENTER_X + 50.0f; this->actor.world.pos.y = ROOM_CENTER_Y + 0.0f; @@ -338,7 +338,7 @@ void BossSst_Init(Actor* thisx, PlayState* play2) { } } else { Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInitHand, this->colliderJntSphElements); - Collider_SetCylinder(play, &this->colliderCyl, &this->actor, &sCylinderInitHand); + Collider_SetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInitHand); if (this->actor.params == BONGO_LEFT_HAND) { SkelAnime_InitFlex(play, &this->skelAnime, &gBongoLeftHandSkel, &gBongoLeftHandIdleAnim, this->jointTable, this->morphTable, 27); @@ -363,7 +363,7 @@ void BossSst_Destroy(Actor* thisx, PlayState* play) { BossSst* this = (BossSst*)thisx; Collider_DestroyJntSph(play, &this->colliderJntSph); - Collider_DestroyCylinder(play, &this->colliderCyl); + Collider_DestroyCylinder(play, &this->colliderCylinder); Audio_StopSfxByPos(&this->center); } @@ -725,7 +725,7 @@ void BossSst_HeadDamagedHand(BossSst* this, PlayState* play) { void BossSst_HeadSetupReadyCharge(BossSst* this) { Animation_MorphToLoop(&this->skelAnime, &gBongoHeadEyeOpenIdleAnim, -5.0f); this->actor.speed = 0.0f; - this->colliderCyl.base.acFlags |= AC_ON; + this->colliderCylinder.base.acFlags |= AC_ON; this->actionFunc = BossSst_HeadReadyCharge; } @@ -801,7 +801,7 @@ void BossSst_HeadSetupEndCharge(BossSst* this) { Animation_MorphToLoop(&this->skelAnime, &gBongoHeadEyeCloseIdleAnim, -20.0f); this->targetYaw = Actor_WorldYawTowardPoint(&this->actor, &sRoomCenter); this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT); - this->colliderCyl.base.acFlags &= ~AC_ON; + this->colliderCylinder.base.acFlags &= ~AC_ON; this->radius *= -1.0f; this->actionFunc = BossSst_HeadEndCharge; } @@ -818,7 +818,7 @@ void BossSst_HeadEndCharge(BossSst* this, PlayState* play) { void BossSst_HeadSetupFrozenHand(BossSst* this) { Animation_MorphToLoop(&this->skelAnime, &gBongoHeadEyeOpenIdleAnim, -5.0f); this->ready = false; - this->colliderCyl.base.acFlags |= AC_ON; + this->colliderCylinder.base.acFlags |= AC_ON; this->actionFunc = BossSst_HeadFrozenHand; } @@ -831,7 +831,7 @@ void BossSst_HeadFrozenHand(BossSst* this, PlayState* play) { void BossSst_HeadSetupUnfreezeHand(BossSst* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gBongoHeadEyeCloseAnim, -5.0f); - this->colliderCyl.base.acFlags &= ~AC_ON; + this->colliderCylinder.base.acFlags &= ~AC_ON; this->actionFunc = BossSst_HeadUnfreezeHand; } @@ -846,7 +846,7 @@ void BossSst_HeadSetupStunned(BossSst* this) { Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, Animation_GetLastFrame(&gBongoHeadKnockoutAnim)); this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT); - this->colliderCyl.base.acFlags &= ~AC_ON; + this->colliderCylinder.base.acFlags &= ~AC_ON; this->vVanish = false; this->actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS; BossSst_HeadSfx(this, NA_SE_EN_SHADEST_FREEZE); @@ -898,8 +898,8 @@ void BossSst_HeadStunned(BossSst* this, PlayState* play) { void BossSst_HeadSetupVulnerable(BossSst* this) { Animation_MorphToLoop(&this->skelAnime, &gBongoHeadStunnedAnim, -5.0f); - this->colliderCyl.base.acFlags |= AC_ON; - this->colliderCyl.elem.acDmgInfo.dmgFlags = DMG_SWORD | DMG_DEKU_STICK; + this->colliderCylinder.base.acFlags |= AC_ON; + this->colliderCylinder.elem.acDmgInfo.dmgFlags = DMG_SWORD | DMG_DEKU_STICK; this->actor.speed = 0.0f; this->colliderJntSph.elements[10].base.acElemFlags |= (ACELEM_ON | ACELEM_HOOKABLE); this->colliderJntSph.elements[0].base.acElemFlags &= ~ACELEM_ON; @@ -940,7 +940,7 @@ void BossSst_HeadSetupDamage(BossSst* this) { Animation_GetLastFrame(&gBongoHeadDamageAnim)); Actor_SetColorFilter(&sHands[RIGHT]->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, Animation_GetLastFrame(&gBongoHeadDamageAnim)); - this->colliderCyl.base.acFlags &= ~AC_ON; + this->colliderCylinder.base.acFlags &= ~AC_ON; BossSst_HeadSfx(this, NA_SE_EN_SHADEST_DAMAGE); this->actionFunc = BossSst_HeadDamage; } @@ -957,8 +957,8 @@ void BossSst_HeadDamage(BossSst* this, PlayState* play) { void BossSst_HeadSetupRecover(BossSst* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gBongoHeadRecoverAnim, -5.0f); - this->colliderCyl.base.acFlags &= ~AC_ON; - this->colliderCyl.elem.acDmgInfo.dmgFlags = DMG_DEFAULT; + this->colliderCylinder.base.acFlags &= ~AC_ON; + this->colliderCylinder.elem.acDmgInfo.dmgFlags = DMG_DEFAULT; this->colliderJntSph.elements[10].base.acElemFlags &= ~(ACELEM_ON | ACELEM_HOOKABLE); this->colliderJntSph.elements[0].base.acElemFlags |= ACELEM_ON; this->vVanish = true; @@ -1044,7 +1044,7 @@ void BossSst_HeadSetupDeath(BossSst* this, PlayState* play) { Actor_SetColorFilter(&sHands[LEFT]->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 60); Actor_SetColorFilter(&sHands[RIGHT]->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 60); this->timer = 60; - this->colliderCyl.base.acFlags &= ~AC_ON; + this->colliderCylinder.base.acFlags &= ~AC_ON; this->colliderJntSph.base.ocFlags1 &= ~OC1_ON; sHands[LEFT]->colliderJntSph.base.ocFlags1 &= ~OC1_ON; sHands[RIGHT]->colliderJntSph.base.ocFlags1 &= ~OC1_ON; @@ -1534,9 +1534,9 @@ void BossSst_HandSlam(BossSst* this, PlayState* play) { this->ready = true; Actor_PlaySfx(&this->actor, NA_SE_EN_SHADEST_TAIKO_LOW); BossSst_SpawnShockwave(this); - this->colliderCyl.base.atFlags |= AT_ON; - Collider_UpdateCylinder(&this->actor, &this->colliderCyl); - this->colliderCyl.dim.radius = sCylinderInitHand.dim.radius; + this->colliderCylinder.base.atFlags |= AT_ON; + Collider_UpdateCylinder(&this->actor, &this->colliderCylinder); + this->colliderCylinder.dim.radius = sCylinderInitHand.dim.radius; } } @@ -2580,8 +2580,8 @@ void BossSst_HandCollisionCheck(BossSst* this, PlayState* play) { } void BossSst_HeadCollisionCheck(BossSst* this, PlayState* play) { - if (this->colliderCyl.base.acFlags & AC_HIT) { - this->colliderCyl.base.acFlags &= ~AC_HIT; + if (this->colliderCylinder.base.acFlags & AC_HIT) { + this->colliderCylinder.base.acFlags &= ~AC_HIT; if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) { if (this->actionFunc == BossSst_HeadVulnerable) { if (Actor_ApplyDamage(&this->actor) == 0) { @@ -2613,13 +2613,13 @@ void BossSst_UpdateHand(Actor* thisx, PlayState* play) { BossSst* this = (BossSst*)thisx; BossSstHandTrail* trail; - if (this->colliderCyl.base.atFlags & AT_ON) { + if (this->colliderCylinder.base.atFlags & AT_ON) { if ((this->effects[0].move < 5) || (this->actor.xzDistToPlayer < ((this->effects[2].scale * 0.01f) * sCylinderInitHand.dim.radius)) || - (this->colliderCyl.base.atFlags & AT_HIT)) { - this->colliderCyl.base.atFlags &= ~(AT_ON | AT_HIT); + (this->colliderCylinder.base.atFlags & AT_HIT)) { + this->colliderCylinder.base.atFlags &= ~(AT_ON | AT_HIT); } else { - this->colliderCyl.dim.radius = (this->effects[0].scale * 0.01f) * sCylinderInitHand.dim.radius; + this->colliderCylinder.dim.radius = (this->effects[0].scale * 0.01f) * sCylinderInitHand.dim.radius; } } @@ -2646,8 +2646,8 @@ void BossSst_UpdateHand(Actor* thisx, PlayState* play) { CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderJntSph.base); } - if (this->colliderCyl.base.atFlags & AT_ON) { - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderCyl.base); + if (this->colliderCylinder.base.atFlags & AT_ON) { + CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderCylinder.base); } if ((HAND_STATE(this) != HAND_DEATH) && (HAND_STATE(this) != HAND_WAIT) && (HAND_STATE(this) != HAND_BEAT) && @@ -2694,14 +2694,14 @@ void BossSst_UpdateHead(Actor* thisx, PlayState* play2) { } #if OOT_VERSION < NTSC_1_2 - if (this->colliderCyl.base.acFlags & AC_ON) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCyl.base); + if (this->colliderCylinder.base.acFlags & AC_ON) { + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder.base); } CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base); #else if ((this->actionFunc != BossSst_HeadLurk) && (this->actionFunc != BossSst_HeadIntro)) { - if (this->colliderCyl.base.acFlags & AC_ON) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCyl.base); + if (this->colliderCylinder.base.acFlags & AC_ON) { + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder.base); } CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderJntSph.base); } @@ -2882,9 +2882,9 @@ void BossSst_PostHeadDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro if (limbIndex == 8) { Matrix_MultVec3f(&zeroVec, &this->actor.focus.pos); Matrix_MultVec3f(&headVec, &headPos); - this->colliderCyl.dim.pos.x = headPos.x; - this->colliderCyl.dim.pos.y = headPos.y; - this->colliderCyl.dim.pos.z = headPos.z; + this->colliderCylinder.dim.pos.x = headPos.x; + this->colliderCylinder.dim.pos.y = headPos.y; + this->colliderCylinder.dim.pos.z = headPos.z; } Collider_UpdateSpheres(limbIndex, &this->colliderJntSph); diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.h b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.h index 1aab0e84c3..caf4891ccb 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.h +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.h @@ -47,7 +47,7 @@ typedef struct BossSst { /* 0x03C8 */ Vec3f center; /* 0x03D4 */ ColliderJntSph colliderJntSph; /* 0x03F4 */ ColliderJntSphElement colliderJntSphElements[11]; - /* 0x06B4 */ ColliderCylinder colliderCyl; + /* 0x06B4 */ ColliderCylinder colliderCylinder; /* 0x0700 */ BossSstEffect effects[BOSS_SST_EFFECT_COUNT]; /* 0x09D0 */ s16 trailIndex; /* 0x09D2 */ s16 trailCount; diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst_colchk.inc.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst_colchk.inc.c index 4cbb650d7e..0016ff93d5 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst_colchk.inc.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst_colchk.inc.c @@ -1,6 +1,6 @@ #include "z64collision_check.h" -static ColliderJntSphElementInit sJntSphItemsInitHand[11] = { +static ColliderJntSphElementInit sJntSphElementsInitHand[11] = { { { ELEM_MATERIAL_UNK1, @@ -134,10 +134,10 @@ static ColliderJntSphInit sJntSphInitHand = { COLSHAPE_JNTSPH, }, 11, - sJntSphItemsInitHand, + sJntSphElementsInitHand, }; -static ColliderJntSphElementInit sJntSphItemsInitHead[11] = { +static ColliderJntSphElementInit sJntSphElementsInitHead[11] = { { { ELEM_MATERIAL_UNK1, @@ -271,7 +271,7 @@ static ColliderJntSphInit sJntSphInitHead = { COLSHAPE_JNTSPH, }, 11, - sJntSphItemsInitHead, + sJntSphElementsInitHead, }; static ColliderCylinderInit sCylinderInitHead = { diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 01e764b516..076a1d68c6 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -700,8 +700,8 @@ void BossVa_Init(Actor* thisx, PlayState* play2) { } this->zapHeadPos.x = 1.0f; - Collider_InitCylinder(play, &this->colliderBody); - Collider_SetCylinder(play, &this->colliderBody, &this->actor, &sCylinderInit); + Collider_InitCylinder(play, &this->bodyCollider); + Collider_SetCylinder(play, &this->bodyCollider, &this->actor, &sCylinderInit); for (i = BOSSVA_ZAPPER_3; i >= BOSSVA_SUPPORT_1; i--) { Actor_SpawnAsChild( @@ -775,7 +775,7 @@ void BossVa_Destroy(Actor* thisx, PlayState* play) { SkelAnime_Free(&this->skelAnime, play); Collider_DestroyJntSph(play, &this->colliderJntSph); - Collider_DestroyCylinder(play, &this->colliderBody); + Collider_DestroyCylinder(play, &this->bodyCollider); } void BossVa_SetupIntro(BossVa* this) { @@ -1093,9 +1093,9 @@ void BossVa_BodyPhase1(BossVa* this, PlayState* play) { } } - if (this->colliderBody.base.atFlags & AT_HIT) { - this->colliderBody.base.atFlags &= ~AT_HIT; - if (this->colliderBody.base.at == &player->actor) { + if (this->bodyCollider.base.atFlags & AT_HIT) { + this->bodyCollider.base.atFlags &= ~AT_HIT; + if (this->bodyCollider.base.at == &player->actor) { Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f); } } @@ -1123,9 +1123,9 @@ void BossVa_BodyPhase1(BossVa* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_BALINADE_BL_SPARK - SFX_FLAG); } - Collider_UpdateCylinder(&this->actor, &this->colliderBody); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderBody.base); - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderBody.base); + Collider_UpdateCylinder(&this->actor, &this->bodyCollider); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCollider.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->bodyCollider.base); func_800F436C(&this->actor.projectedPos, NA_SE_EN_BALINADE_LEVEL - SFX_FLAG, 1.0f); } @@ -1155,17 +1155,17 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) { Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 160); this->actor.colorFilterTimer = this->invincibilityTimer; } else { - this->colliderBody.elem.acDmgInfo.dmgFlags = DMG_BOOMERANG; + this->bodyCollider.elem.acDmgInfo.dmgFlags = DMG_BOOMERANG; } } - if (this->colliderBody.base.acFlags & AC_HIT) { - this->colliderBody.base.acFlags &= ~AC_HIT; + if (this->bodyCollider.base.acFlags & AC_HIT) { + this->bodyCollider.base.acFlags &= ~AC_HIT; - if (this->colliderBody.base.ac->id == ACTOR_EN_BOOM) { + if (this->bodyCollider.base.ac->id == ACTOR_EN_BOOM) { sPhase2Timer &= 0xFE00; Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 160); - this->colliderBody.elem.acDmgInfo.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK; + this->bodyCollider.elem.acDmgInfo.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK; } else { sKillBari++; if ((this->actor.colorFilterTimer != 0) && !(this->actor.colorFilterParams & 0x4000)) { @@ -1183,11 +1183,11 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_BALINADE_FAINT); } - if (this->colliderBody.base.atFlags & AT_HIT) { - this->colliderBody.base.atFlags &= ~AT_HIT; + if (this->bodyCollider.base.atFlags & AT_HIT) { + this->bodyCollider.base.atFlags &= ~AT_HIT; sPhase2Timer = (sPhase2Timer + 0x18) & 0xFFF0; - if (this->colliderBody.base.at == &player->actor) { + if (this->bodyCollider.base.at == &player->actor) { Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f); Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT); } @@ -1231,14 +1231,14 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) { this->actor.focus.pos = this->actor.world.pos; this->actor.focus.pos.y += 45.0f; - Collider_UpdateCylinder(&this->actor, &this->colliderBody); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderBody.base); + Collider_UpdateCylinder(&this->actor, &this->bodyCollider); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCollider.base); if (this->actor.colorFilterTimer == 0) { - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderBody.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->bodyCollider.base); } if ((this->actor.colorFilterTimer == 0) || !(this->actor.colorFilterParams & 0x4000)) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base); } func_800F436C(&this->actor.projectedPos, NA_SE_EN_BALINADE_LEVEL - SFX_FLAG, @@ -1246,7 +1246,7 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) { } void BossVa_SetupBodyPhase3(BossVa* this) { - this->colliderBody.elem.acDmgInfo.dmgFlags = DMG_BOOMERANG; + this->bodyCollider.elem.acDmgInfo.dmgFlags = DMG_BOOMERANG; this->actor.speed = 0.0f; sPhase3StopMoving = false; BossVa_SetupAction(this, BossVa_BodyPhase3); @@ -1261,16 +1261,16 @@ void BossVa_BodyPhase3(BossVa* this, PlayState* play) { sp62 = Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos); this->unk_1B0 += 0xCE4; this->bodyGlow = (s16)(Math_SinS(this->unk_1B0) * 50.0f) + 150; - if (this->colliderBody.base.atFlags & AT_HIT) { - this->colliderBody.base.atFlags &= ~AT_HIT; - if (this->colliderBody.base.at == &player->actor) { + if (this->bodyCollider.base.atFlags & AT_HIT) { + this->bodyCollider.base.atFlags &= ~AT_HIT; + if (this->bodyCollider.base.at == &player->actor) { Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f); this->actor.world.rot.y += (s16)Rand_CenteredFloat(0x2EE0) + 0x8000; Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT); } } - if (this->colliderBody.base.acFlags & AC_HIT) { + if (this->bodyCollider.base.acFlags & AC_HIT) { this->skelAnime.curFrame = 0.0f; Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 12); Actor_PlaySfx(&this->actor, NA_SE_EN_BALINADE_FAINT); @@ -1348,11 +1348,11 @@ void BossVa_BodyPhase3(BossVa* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_BALINADE_BL_SPARK - SFX_FLAG); } - Collider_UpdateCylinder(&this->actor, &this->colliderBody); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderBody.base); - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderBody.base); + Collider_UpdateCylinder(&this->actor, &this->bodyCollider); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCollider.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->bodyCollider.base); if (this->timer == 0) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base); } func_800F436C(&this->actor.projectedPos, NA_SE_EN_BALINADE_LEVEL - SFX_FLAG, @@ -1371,7 +1371,7 @@ void BossVa_SetupBodyPhase4(BossVa* this, PlayState* play) { this->timer = -30; } - this->colliderBody.dim.radius = 55; + this->bodyCollider.dim.radius = 55; BossVa_SetupAction(this, BossVa_BodyPhase4); } @@ -1382,9 +1382,9 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) { this->unk_1B0 = (this->unk_1B0 + (s16)((sFightPhase - PHASE_4 + 1) * 1000.0f)) + 0xCE4; this->bodyGlow = (s16)(Math_SinS(this->unk_1B0) * 50.0f) + 150; - if (this->colliderBody.base.atFlags & AT_HIT) { - this->colliderBody.base.atFlags &= ~AT_HIT; - if (this->colliderBody.base.at == &player->actor) { + if (this->bodyCollider.base.atFlags & AT_HIT) { + this->bodyCollider.base.atFlags &= ~AT_HIT; + if (this->bodyCollider.base.at == &player->actor) { Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f); this->actor.world.rot.y += (s16)Rand_CenteredFloat(0x2EE0) + 0x8000; Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT); @@ -1394,8 +1394,8 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_BALINADE_BL_SPARK - SFX_FLAG); } - if (this->colliderBody.base.acFlags & AC_HIT) { - this->colliderBody.base.acFlags &= ~AC_HIT; + if (this->bodyCollider.base.acFlags & AC_HIT) { + this->bodyCollider.base.acFlags &= ~AC_HIT; this->skelAnime.curFrame = 0.0f; if (this->timer >= 0) { if (this->invincibilityTimer == 0) { @@ -1425,8 +1425,8 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_BALINADE_FAINT); } } - } else if (this->colliderBody.base.ac->id == ACTOR_EN_BOOM) { - boomerang = (EnBoom*)this->colliderBody.base.ac; + } else if (this->bodyCollider.base.ac->id == ACTOR_EN_BOOM) { + boomerang = (EnBoom*)this->bodyCollider.base.ac; boomerang->returnTimer = 0; boomerang->moveTo = &player->actor; boomerang->actor.world.rot.y = boomerang->actor.yawTowardsPlayer; @@ -1450,7 +1450,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) { } Math_SmoothStepToF(&this->actor.speed, ((sFightPhase - PHASE_4 + 1) * 1.5f) + 4.0f, 1.0f, 0.25f, 0.0f); } - this->colliderBody.elem.acDmgInfo.dmgFlags = DMG_BOOMERANG; + this->bodyCollider.elem.acDmgInfo.dmgFlags = DMG_BOOMERANG; } else { Math_SmoothStepToS(&this->vaBodySpinRate, 0, 1, 0x96, 0); if (this->timer > 0) { @@ -1458,7 +1458,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) { this->timer = 35; } Math_SmoothStepToF(&this->actor.shape.yOffset, -480.0f, 1.0f, 30.0f, 0.0f); - this->colliderBody.elem.acDmgInfo.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK; + this->bodyCollider.elem.acDmgInfo.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK; this->timer--; } else { if ((player->stateFlags1 & PLAYER_STATE1_26) && (this->timer < -60)) { @@ -1520,13 +1520,13 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) { } Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 70.0f, 0.0f, UPDBGCHECKINFO_FLAG_0); - Collider_UpdateCylinder(&this->actor, &this->colliderBody); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderBody.base); + Collider_UpdateCylinder(&this->actor, &this->bodyCollider); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCollider.base); if (this->invincibilityTimer == 0) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderBody.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->bodyCollider.base); } if ((this->vaBodySpinRate > 0x3E8) || (this->actor.shape.yOffset < -1200.0f)) { - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderBody.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->bodyCollider.base); } func_800F436C(&this->actor.projectedPos, NA_SE_EN_BALINADE_LEVEL - SFX_FLAG, (this->vaBodySpinRate * 0.00025f) + 1.0f); @@ -2841,10 +2841,10 @@ void BossVa_Update(Actor* thisx, PlayState* play2) { switch (this->actor.params) { case BOSSVA_BODY: - if (this->colliderBody.base.acFlags & AC_HIT) { - this->colliderBody.base.acFlags &= ~AC_HIT; - if (this->colliderBody.base.ac->id == ACTOR_EN_BOOM) { - boomerang = (EnBoom*)this->colliderBody.base.ac; + if (this->bodyCollider.base.acFlags & AC_HIT) { + this->bodyCollider.base.acFlags &= ~AC_HIT; + if (this->bodyCollider.base.ac->id == ACTOR_EN_BOOM) { + boomerang = (EnBoom*)this->bodyCollider.base.ac; boomerang->returnTimer = 0; } } diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.h b/src/overlays/actors/ovl_Boss_Va/z_boss_va.h index 9ce6cb970c..628831ad2f 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.h +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.h @@ -41,7 +41,7 @@ typedef struct BossVa { /* 0x01FC */ Vec3f effectPos[10]; /* 0x0274 */ Vec3f unk_274; // Unused body position /* 0x0280 */ Vec3f unk_280; // Unused body position - /* 0x028C */ ColliderCylinder colliderBody; + /* 0x028C */ ColliderCylinder bodyCollider; /* 0x02D8 */ ColliderJntSph colliderJntSph; /* 0x02F8 */ ColliderJntSphElement colliderJntSphElements[1]; /* 0x0338 */ ColliderQuad colliderLightning; diff --git a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c index 307cc9bf00..4af78a9b65 100644 --- a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c +++ b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c @@ -128,19 +128,19 @@ s32 DemoGj_HitByExplosion(DemoGj* this, PlayState* play, ColliderCylinder* cylin void DemoGj_DestroyCylinder(DemoGj* this, PlayState* play) { switch (DemoGj_GetType(this)) { case DEMOGJ_TYPE_DESTRUCTABLE_RUBBLE_1: - Collider_DestroyCylinder(play, &this->cylinders[0]); - Collider_DestroyCylinder(play, &this->cylinders[1]); - Collider_DestroyCylinder(play, &this->cylinders[2]); + Collider_DestroyCylinder(play, &this->colliderCylinders[0]); + Collider_DestroyCylinder(play, &this->colliderCylinders[1]); + Collider_DestroyCylinder(play, &this->colliderCylinders[2]); break; case DEMOGJ_TYPE_DESTRUCTABLE_RUBBLE_2: - Collider_DestroyCylinder(play, &this->cylinders[0]); - Collider_DestroyCylinder(play, &this->cylinders[1]); - Collider_DestroyCylinder(play, &this->cylinders[2]); + Collider_DestroyCylinder(play, &this->colliderCylinders[0]); + Collider_DestroyCylinder(play, &this->colliderCylinders[1]); + Collider_DestroyCylinder(play, &this->colliderCylinders[2]); break; case DEMOGJ_TYPE_DESTRUCTABLE_RUBBLE_TALL: - Collider_DestroyCylinder(play, &this->cylinders[0]); + Collider_DestroyCylinder(play, &this->colliderCylinders[0]); break; } } @@ -987,9 +987,9 @@ void DemoGj_DrawRubbleAroundArena(DemoGj* this, PlayState* play) { // Inits the three cylinders with `sCylinderInit1` void DemoGj_InitDestructableRubble1(DemoGj* this, PlayState* play) { DemoGj_InitSetIndices(this, play, 15, 0, NULL); - DemoGj_InitCylinder(this, play, &this->cylinders[0], &sCylinderInit1); - DemoGj_InitCylinder(this, play, &this->cylinders[1], &sCylinderInit1); - DemoGj_InitCylinder(this, play, &this->cylinders[2], &sCylinderInit1); + DemoGj_InitCylinder(this, play, &this->colliderCylinders[0], &sCylinderInit1); + DemoGj_InitCylinder(this, play, &this->colliderCylinders[1], &sCylinderInit1); + DemoGj_InitCylinder(this, play, &this->colliderCylinders[2], &sCylinderInit1); } #if DEBUG_FEATURES @@ -1002,9 +1002,9 @@ void DemoGj_DoNothing1(DemoGj* this, PlayState* play) { * Used by DEMOGJ_TYPE_DESTRUCTABLE_RUBBLE_1 */ void func_8097AEE8(DemoGj* this, PlayState* play) { - ColliderCylinder* cylinder0 = &this->cylinders[0]; - ColliderCylinder* cylinder1 = &this->cylinders[1]; - ColliderCylinder* cylinder2 = &this->cylinders[2]; + ColliderCylinder* cylinder0 = &this->colliderCylinders[0]; + ColliderCylinder* cylinder1 = &this->colliderCylinders[1]; + ColliderCylinder* cylinder2 = &this->colliderCylinders[2]; Vec3f* actorPos = &this->dyna.actor.world.pos; s32 pad; s16 theta = this->dyna.actor.world.rot.y; @@ -1026,9 +1026,9 @@ void func_8097AEE8(DemoGj* this, PlayState* play) { void DemoGj_SetCylindersAsAC(DemoGj* this, PlayState* play) { s32 pad[2]; - Collider* cylinder0 = &this->cylinders[0].base; - Collider* cylinder1 = &this->cylinders[1].base; - Collider* cylinder2 = &this->cylinders[2].base; + Collider* cylinder0 = &this->colliderCylinders[0].base; + Collider* cylinder1 = &this->colliderCylinders[1].base; + Collider* cylinder2 = &this->colliderCylinders[2].base; s32 pad2[3]; CollisionCheck_SetAC(play, &play->colChkCtx, cylinder0); @@ -1060,13 +1060,13 @@ void func_8097B128(DemoGj* this, PlayState* play) { } s32 DemoGj_HasCylinderAnyExploded(DemoGj* this, PlayState* play) { - if (DemoGj_HitByExplosion(this, play, &this->cylinders[0])) { + if (DemoGj_HitByExplosion(this, play, &this->colliderCylinders[0])) { return true; } - if (DemoGj_HitByExplosion(this, play, &this->cylinders[1])) { + if (DemoGj_HitByExplosion(this, play, &this->colliderCylinders[1])) { return true; } - if (DemoGj_HitByExplosion(this, play, &this->cylinders[2])) { + if (DemoGj_HitByExplosion(this, play, &this->colliderCylinders[2])) { return true; } return false; @@ -1124,9 +1124,9 @@ void DemoGj_DrawDestructableRubble1(DemoGj* this, PlayState* play) { // Inits the three cylinders with `sCylinderInit2` void DemoGj_InitDestructableRubble2(DemoGj* this, PlayState* play) { DemoGj_InitSetIndices(this, play, 16, 0, NULL); - DemoGj_InitCylinder(this, play, &this->cylinders[0], &sCylinderInit2); - DemoGj_InitCylinder(this, play, &this->cylinders[1], &sCylinderInit2); - DemoGj_InitCylinder(this, play, &this->cylinders[2], &sCylinderInit2); + DemoGj_InitCylinder(this, play, &this->colliderCylinders[0], &sCylinderInit2); + DemoGj_InitCylinder(this, play, &this->colliderCylinders[1], &sCylinderInit2); + DemoGj_InitCylinder(this, play, &this->colliderCylinders[2], &sCylinderInit2); } #if DEBUG_FEATURES @@ -1136,9 +1136,9 @@ void DemoGj_DoNothing2(DemoGj* this, PlayState* play) { // Moves the ColliderCylinder's relative to the actor's position. void func_8097B450(DemoGj* this, PlayState* play) { - ColliderCylinder* cylinder0 = &this->cylinders[0]; - ColliderCylinder* cylinder1 = &this->cylinders[1]; - ColliderCylinder* cylinder2 = &this->cylinders[2]; + ColliderCylinder* cylinder0 = &this->colliderCylinders[0]; + ColliderCylinder* cylinder1 = &this->colliderCylinders[1]; + ColliderCylinder* cylinder2 = &this->colliderCylinders[2]; Vec3f* actorPos = &this->dyna.actor.world.pos; s32 pad; s16 theta = this->dyna.actor.world.rot.y; @@ -1160,9 +1160,9 @@ void func_8097B450(DemoGj* this, PlayState* play) { void DemoGj_SetCylindersAsAC2(DemoGj* this, PlayState* play) { s32 pad[2]; - Collider* cylinder0 = &this->cylinders[0].base; - Collider* cylinder1 = &this->cylinders[1].base; - Collider* cylinder2 = &this->cylinders[2].base; + Collider* cylinder0 = &this->colliderCylinders[0].base; + Collider* cylinder1 = &this->colliderCylinders[1].base; + Collider* cylinder2 = &this->colliderCylinders[2].base; s32 pad2[3]; CollisionCheck_SetAC(play, &play->colChkCtx, cylinder0); @@ -1172,13 +1172,13 @@ void DemoGj_SetCylindersAsAC2(DemoGj* this, PlayState* play) { // Does the same as `DemoGj_HasCylinderAnyExploded` s32 DemoGj_HasCylinderAnyExploded2(DemoGj* this, PlayState* play) { - if (DemoGj_HitByExplosion(this, play, &this->cylinders[0])) { + if (DemoGj_HitByExplosion(this, play, &this->colliderCylinders[0])) { return true; } - if (DemoGj_HitByExplosion(this, play, &this->cylinders[1])) { + if (DemoGj_HitByExplosion(this, play, &this->colliderCylinders[1])) { return true; } - if (DemoGj_HitByExplosion(this, play, &this->cylinders[2])) { + if (DemoGj_HitByExplosion(this, play, &this->colliderCylinders[2])) { return true; } return false; @@ -1259,7 +1259,7 @@ void DemoGj_DemoGj_InitDestructableRubble2(DemoGj* this, PlayState* play) { // Inits the first cylinder (only that one) with `sCylinderInit3` void DemoGj_InitDestructableRubbleTall(DemoGj* this, PlayState* play) { DemoGj_InitSetIndices(this, play, 17, 0, NULL); - DemoGj_InitCylinder(this, play, &this->cylinders[0], &sCylinderInit3); + DemoGj_InitCylinder(this, play, &this->colliderCylinders[0], &sCylinderInit3); } #if DEBUG_FEATURES @@ -1301,7 +1301,7 @@ void func_8097B9BC(DemoGj* this, PlayState* play) { */ void func_8097BA48(DemoGj* this, PlayState* play) { Actor* thisx = &this->dyna.actor; - ColliderCylinder* cylinder = &this->cylinders[0]; + ColliderCylinder* cylinder = &this->colliderCylinders[0]; s32 pad[2]; if (func_809797E4(this, 4)) { diff --git a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.h b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.h index 01a829f4fc..313788893f 100644 --- a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.h +++ b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.h @@ -17,7 +17,7 @@ typedef struct DemoGj { /* 0x0178 */ BossGanon2* ganon; /* 0x017C */ s32 isTransformedIntoGanon; // flag /* 0x0180 */ s32 isRotated; // flag - /* 0x0184 */ ColliderCylinder cylinders[3]; + /* 0x0184 */ ColliderCylinder colliderCylinders[3]; /* 0x0268 */ s32 killFlag; // This actor never sets this flag, but it reads it. If set to `true` and the actor type is DEMOGJ_TYPE_DESTRUCTABLE_RUBBLE_1, DEMOGJ_TYPE_DESTRUCTABLE_RUBBLE_2 or DEMOGJ_TYPE_DESTRUCTABLE_RUBBLE_TALL, then the actor will be killed and will drop the specified amount of collectibles. /* 0x026C */ Vec3f unk_26C; // This actor never sets this. Specifies which direction will this actor explode when killed using `killFlag`. } DemoGj; // size = 0x0278 diff --git a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c index 5d2fc11486..7c00f0118c 100644 --- a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c +++ b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c @@ -72,7 +72,7 @@ static ColliderCylinderInit sCylinderInit = { { 20, 100, 0, { 0, 0, 0 } }, }; -static ColliderJntSphElementInit sJntSphItemsInit[1] = { +static ColliderJntSphElementInit sJntSphElementsInit[1] = { { { ELEM_MATERIAL_UNK0, @@ -96,7 +96,7 @@ static ColliderJntSphInit sJntSphInit = { COLSHAPE_JNTSPH, }, 1, - sJntSphItemsInit, + sJntSphElementsInit, }; static DoorKillerTextureEntry sDoorTextures[4] = { diff --git a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c index 3bb23a85ae..480940dc44 100644 --- a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c +++ b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c @@ -68,8 +68,8 @@ void EnAnubiceFire_Init(Actor* thisx, PlayState* play) { EnAnubiceFire* this = (EnAnubiceFire*)thisx; s32 i; - Collider_InitCylinder(play, &this->cylinder); - Collider_SetCylinder(play, &this->cylinder, &this->actor, &sCylinderInit); + Collider_InitCylinder(play, &this->colliderCylinder); + Collider_SetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInit); this->unk_15A = 30; this->unk_154 = 2.0f; @@ -86,7 +86,7 @@ void EnAnubiceFire_Init(Actor* thisx, PlayState* play) { void EnAnubiceFire_Destroy(Actor* thisx, PlayState* play) { EnAnubiceFire* this = (EnAnubiceFire*)thisx; - Collider_DestroyCylinder(play, &this->cylinder); + Collider_DestroyCylinder(play, &this->colliderCylinder); } void func_809B26EC(EnAnubiceFire* this, PlayState* play) { @@ -121,12 +121,12 @@ void func_809B27D8(EnAnubiceFire* this, PlayState* play) { Math_ApproachF(&this->scale, this->unk_154, 0.2f, 0.4f); if ((this->unk_15A == 0) && (this->scale < 0.1f)) { Actor_Kill(&this->actor); - } else if ((this->actor.params == 0) && (this->cylinder.base.atFlags & AT_BOUNCED)) { + } else if ((this->actor.params == 0) && (this->colliderCylinder.base.atFlags & AT_BOUNCED)) { if (Player_HasMirrorShieldEquipped(play)) { Actor_PlaySfx(&this->actor, NA_SE_IT_SHIELD_REFLECT_SW); - this->cylinder.base.atFlags &= ~(AT_HIT | AT_BOUNCED | AT_TYPE_ENEMY); - this->cylinder.base.atFlags |= AT_TYPE_PLAYER; - this->cylinder.elem.atDmgInfo.dmgFlags = DMG_DEKU_STICK; + this->colliderCylinder.base.atFlags &= ~(AT_HIT | AT_BOUNCED | AT_TYPE_ENEMY); + this->colliderCylinder.base.atFlags |= AT_TYPE_PLAYER; + this->colliderCylinder.elem.atDmgInfo.dmgFlags = DMG_DEKU_STICK; this->unk_15A = 30; this->actor.params = 1; this->actor.velocity.x *= -1.0f; @@ -208,14 +208,14 @@ void EnAnubiceFire_Update(Actor* thisx, PlayState* play) { UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 | UPDBGCHECKINFO_FLAG_4); if (!(this->scale < 0.6f || this->actionFunc == func_809B2B48)) { - this->cylinder.dim.radius = this->scale * 15.0f + 5.0f; - this->cylinder.dim.height = this->scale * 15.0f + 5.0f; - this->cylinder.dim.yShift = this->scale * -0.75f + -15.0f; + this->colliderCylinder.dim.radius = this->scale * 15.0f + 5.0f; + this->colliderCylinder.dim.height = this->scale * 15.0f + 5.0f; + this->colliderCylinder.dim.yShift = this->scale * -0.75f + -15.0f; if (this->unk_15A != 0) { - Collider_UpdateCylinder(&this->actor, &this->cylinder); - CollisionCheck_SetAT(play, &play->colChkCtx, &this->cylinder.base); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->cylinder.base); + Collider_UpdateCylinder(&this->actor, &this->colliderCylinder); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderCylinder.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder.base); } if (BgCheck_SphVsFirstPoly(&play->colCtx, &this->actor.world.pos, 30.0f)) { diff --git a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.h b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.h index 0cafde4391..34072a43b5 100644 --- a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.h +++ b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.h @@ -18,7 +18,7 @@ typedef struct EnAnubiceFire { /* 0x015C */ s16 unk_15C; /* 0x015E */ s16 unk_15E; /* 0x0178 */ Vec3f unk_160[6]; - /* 0x01A8 */ ColliderCylinder cylinder; + /* 0x01A8 */ ColliderCylinder colliderCylinder; } EnAnubiceFire; // size = 0x01F4 #endif diff --git a/src/overlays/actors/ovl_En_Ba/z_en_ba.c b/src/overlays/actors/ovl_En_Ba/z_en_ba.c index ddbaf4785c..a149d3c63d 100644 --- a/src/overlays/actors/ovl_En_Ba/z_en_ba.c +++ b/src/overlays/actors/ovl_En_Ba/z_en_ba.c @@ -51,7 +51,7 @@ ActorProfile En_Ba_Profile = { static Vec3f D_809B8080 = { 0.0f, 0.0f, 32.0f }; -static ColliderJntSphElementInit sJntSphElementInit[2] = { +static ColliderJntSphElementInit sJntSphElementsInit[2] = { { { ELEM_MATERIAL_UNK0, @@ -86,7 +86,7 @@ static ColliderJntSphInit sJntSphInit = { COLSHAPE_JNTSPH, }, 2, - sJntSphElementInit, + sJntSphElementsInit, }; void EnBa_SetupAction(EnBa* this, EnBaActionFunc actionFunc) { diff --git a/src/overlays/actors/ovl_En_Bb/z_en_bb.c b/src/overlays/actors/ovl_En_Bb/z_en_bb.c index 4076b77fdf..18dad81519 100644 --- a/src/overlays/actors/ovl_En_Bb/z_en_bb.c +++ b/src/overlays/actors/ovl_En_Bb/z_en_bb.c @@ -225,7 +225,7 @@ ActorProfile En_Bb_Profile = { /**/ EnBb_Draw, }; -static ColliderJntSphElementInit sJntSphElementInit[1] = { +static ColliderJntSphElementInit sJntSphElementsInit[1] = { { { ELEM_MATERIAL_UNK0, @@ -249,7 +249,7 @@ static ColliderJntSphInit sJntSphInit = { COLSHAPE_JNTSPH, }, 1, - sJntSphElementInit, + sJntSphElementsInit, }; static InitChainEntry sInitChain[] = { 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 c20520908a..a321a43a0e 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -61,7 +61,7 @@ ActorProfile En_Bigokuta_Profile = { /**/ EnBigokuta_Draw, }; -static ColliderJntSphElementInit sJntSphElementInit[1] = { +static ColliderJntSphElementInit sJntSphElementsInit[1] = { { { ELEM_MATERIAL_UNK1, @@ -84,8 +84,8 @@ static ColliderJntSphInit sJntSphInit = { OC2_TYPE_1, COLSHAPE_JNTSPH, }, - ARRAY_COUNT(sJntSphElementInit), - sJntSphElementInit, + ARRAY_COUNT(sJntSphElementsInit), + sJntSphElementsInit, }; static ColliderCylinderInit sCylinderInit[] = { @@ -187,8 +187,8 @@ void EnBigokuta_Init(Actor* thisx, PlayState* play) { this->collider.elements[0].dim.worldSphere.radius = this->collider.elements[0].dim.modelSphere.radius; for (i = 0; i < ARRAY_COUNT(sCylinderInit); i++) { - Collider_InitCylinder(play, &this->cylinder[i]); - Collider_SetCylinder(play, &this->cylinder[i], &this->actor, &sCylinderInit[i]); + Collider_InitCylinder(play, &this->colliderCylinders[i]); + Collider_SetCylinder(play, &this->colliderCylinders[i], &this->actor, &sCylinderInit[i]); } CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, sColChkInfoInit); @@ -211,8 +211,8 @@ void EnBigokuta_Destroy(Actor* thisx, PlayState* play) { s32 i; Collider_DestroyJntSph(play, &this->collider); - for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) { - Collider_DestroyCylinder(play, &this->cylinder[i]); + for (i = 0; i < ARRAY_COUNT(this->colliderCylinders); i++) { + Collider_DestroyCylinder(play, &this->colliderCylinders[i]); } } @@ -324,7 +324,7 @@ void func_809BD3F8(EnBigokuta* this) { this->unk_198 = 80; this->unk_19A = this->unk_194 * -0x200; func_809BCE3C(this); - this->cylinder[0].base.atFlags |= AT_ON; + this->colliderCylinders[0].base.atFlags |= AT_ON; this->collider.base.acFlags |= AC_ON; this->actionFunc = func_809BDC08; } @@ -342,7 +342,7 @@ void func_809BD4A4(EnBigokuta* this) { this->actor.world.rot.x = this->actor.shape.rot.y + 0x8000; this->unk_19A = this->unk_194 * 0x200; this->collider.base.acFlags &= ~AC_ON; - this->cylinder[0].base.atFlags |= AT_ON; + this->colliderCylinders[0].base.atFlags |= AT_ON; this->actionFunc = func_809BDFC8; } @@ -350,7 +350,7 @@ void func_809BD524(EnBigokuta* this) { Animation_MorphToPlayOnce(&this->skelAnime, &object_bigokuta_Anim_000D1C, -5.0f); this->unk_196 = 80; this->unk_19A = 0; - this->cylinder[0].base.atFlags |= AT_ON; + this->colliderCylinders[0].base.atFlags |= AT_ON; Actor_PlaySfx(&this->actor, NA_SE_EN_DAIOCTA_MAHI); if (this->collider.elements[0].base.acHitElem->atDmgInfo.dmgFlags & DMG_DEKU_NUT) { this->unk_195 = true; @@ -367,7 +367,7 @@ void func_809BD5E0(EnBigokuta* this) { Animation_MorphToPlayOnce(&this->skelAnime, &object_bigokuta_Anim_000444, -5.0f); this->unk_196 = 24; this->unk_19A = 0; - this->cylinder[0].base.atFlags &= ~AT_ON; + this->colliderCylinders[0].base.atFlags &= ~AT_ON; Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 24); this->actionFunc = func_809BE180; } @@ -403,7 +403,7 @@ void func_809BD768(EnBigokuta* this) { this->unk_194 = Rand_ZeroOne() < 0.5f ? -1 : 1; this->unk_19A = 0; this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; - this->cylinder[0].base.atFlags &= ~AT_ON; + this->colliderCylinders[0].base.atFlags &= ~AT_ON; Actor_PlaySfx(&this->actor, NA_SE_EN_DAIOCTA_SINK); this->actionFunc = func_809BE4A4; } @@ -599,12 +599,12 @@ void func_809BE058(EnBigokuta* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if ((this->collider.base.ocFlags1 & OC1_HIT) || (this->cylinder[0].base.ocFlags1 & OC1_HIT) || - (this->cylinder[1].base.ocFlags1 & OC1_HIT)) { + if ((this->collider.base.ocFlags1 & OC1_HIT) || (this->colliderCylinders[0].base.ocFlags1 & OC1_HIT) || + (this->colliderCylinders[1].base.ocFlags1 & OC1_HIT)) { speedXZ = CLAMP_MIN(player->actor.speed, 1.0f); if (!(this->collider.base.ocFlags1 & OC1_HIT)) { - this->cylinder[0].base.ocFlags1 &= ~OC1_HIT; - this->cylinder[1].base.ocFlags1 &= ~OC1_HIT; + this->colliderCylinders[0].base.ocFlags1 &= ~OC1_HIT; + this->colliderCylinders[1].base.ocFlags1 &= ~OC1_HIT; speedXZ *= -1.0f; } player->actor.world.pos.x -= speedXZ * Math_SinS(this->actor.shape.rot.y); @@ -722,12 +722,12 @@ void func_809BE568(EnBigokuta* this) { this->collider.elements[0].dim.worldSphere.center.y = this->actor.world.pos.y + this->collider.elements[0].dim.modelSphere.center.y; - for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) { - this->cylinder[i].dim.pos.x = + for (i = 0; i < ARRAY_COUNT(this->colliderCylinders); i++) { + this->colliderCylinders[i].dim.pos.x = this->actor.world.pos.x + sCylinderInit[i].dim.pos.z * sin + sCylinderInit[i].dim.pos.x * cos; - this->cylinder[i].dim.pos.z = + this->colliderCylinders[i].dim.pos.z = this->actor.world.pos.z + sCylinderInit[i].dim.pos.z * cos - sCylinderInit[i].dim.pos.x * sin; - this->cylinder[i].dim.pos.y = this->actor.world.pos.y; + this->colliderCylinders[i].dim.pos.y = this->actor.world.pos.y; } } @@ -735,10 +735,10 @@ void func_809BE798(EnBigokuta* this, PlayState* play) { s16 effectRot; s16 yawDiff; - if ((this->cylinder[0].base.atFlags & AT_HIT) || (this->cylinder[1].base.atFlags & AT_HIT) || + if ((this->colliderCylinders[0].base.atFlags & AT_HIT) || (this->colliderCylinders[1].base.atFlags & AT_HIT) || (this->collider.base.atFlags & AT_HIT)) { - this->cylinder[0].base.atFlags &= ~AT_HIT; - this->cylinder[1].base.atFlags &= ~AT_HIT; + this->colliderCylinders[0].base.atFlags &= ~AT_HIT; + this->colliderCylinders[1].base.atFlags &= ~AT_HIT; this->collider.base.atFlags &= ~AT_HIT; yawDiff = this->actor.yawTowardsPlayer - this->actor.world.rot.y; if (yawDiff > 0x4000) { @@ -799,19 +799,19 @@ void EnBigokuta_Update(Actor* thisx, PlayState* play2) { Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BIG_OCTO); Camera_UnsetStateFlag(play->cameraPtrs[CAM_ID_MAIN], CAM_STATE_CHECK_BG); - if (this->cylinder[0].base.atFlags & AT_ON) { + if (this->colliderCylinders[0].base.atFlags & AT_ON) { if (this->actionFunc != func_809BE058) { - for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) { - CollisionCheck_SetAT(play, &play->colChkCtx, &this->cylinder[i].base); + for (i = 0; i < ARRAY_COUNT(this->colliderCylinders); i++) { + CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderCylinders[i].base); } this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT; } else { - for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) { - CollisionCheck_SetOC(play, &play->colChkCtx, &this->cylinder[i].base); + for (i = 0; i < ARRAY_COUNT(this->colliderCylinders); i++) { + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinders[i].base); } } - for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) { - CollisionCheck_SetAC(play, &play->colChkCtx, &this->cylinder[i].base); + for (i = 0; i < ARRAY_COUNT(this->colliderCylinders); i++) { + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinders[i].base); } if (this->collider.base.acFlags & AC_ON) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.h b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.h index 5f74f31a31..c04da49c86 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.h +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.h @@ -21,7 +21,7 @@ typedef struct EnBigokuta { /* 0x0214 */ Vec3s morphTable[20]; /* 0x028C */ ColliderJntSph collider; /* 0x02AC */ ColliderJntSphElement colliderElements[1]; - /* 0x02EC */ ColliderCylinder cylinder[2]; + /* 0x02EC */ ColliderCylinder colliderCylinders[2]; } EnBigokuta; // size = 0x0384 #endif diff --git a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c index 8d1df99a4d..3af6e87eca 100644 --- a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c +++ b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c @@ -41,7 +41,7 @@ ActorProfile En_Bom_Chu_Profile = { /**/ EnBomChu_Draw, }; -static ColliderJntSphElementInit sJntSphElemInit[] = { +static ColliderJntSphElementInit sJntSphElementsInit[] = { { { ELEM_MATERIAL_UNK0, @@ -64,8 +64,8 @@ static ColliderJntSphInit sJntSphInit = { OC2_TYPE_2, COLSHAPE_JNTSPH, }, - ARRAY_COUNT(sJntSphElemInit), - sJntSphElemInit, + ARRAY_COUNT(sJntSphElementsInit), + sJntSphElementsInit, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c index 5c18294fb8..95665267e2 100644 --- a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c +++ b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c @@ -149,16 +149,16 @@ void EnDntNomal_Init(Actor* thisx, PlayState* play) { PRINTF("\n\n"); // "Deku Scrub target" PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ デグナッツ的当て ☆☆☆☆☆ \n" VT_RST); - Collider_InitQuad(play, &this->targetQuad); - Collider_SetQuad(play, &this->targetQuad, &this->actor, &sTargetQuadInit); + Collider_InitQuad(play, &this->targetColliderQuad); + Collider_SetQuad(play, &this->targetColliderQuad, &this->actor, &sTargetQuadInit); this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer; this->objectId = OBJECT_HINTNUTS; } else { PRINTF("\n\n"); // "Deku Scrub mask show audience" PRINTF(VT_FGCOL(GREEN) "☆☆☆☆☆ デグナッツお面品評会一般人 ☆☆☆☆☆ \n" VT_RST); - Collider_InitCylinder(play, &this->bodyCyl); - Collider_SetCylinder(play, &this->bodyCyl, &this->actor, &sBodyCylinderInit); + Collider_InitCylinder(play, &this->bodyColliderCylinder); + Collider_SetCylinder(play, &this->bodyColliderCylinder, &this->actor, &sBodyCylinderInit); this->objectId = OBJECT_DNK; } if (this->objectId >= 0) { @@ -182,9 +182,9 @@ void EnDntNomal_Destroy(Actor* thisx, PlayState* play) { EnDntNomal* this = (EnDntNomal*)thisx; if (this->type == ENDNTNOMAL_TARGET) { - Collider_DestroyQuad(play, &this->targetQuad); + Collider_DestroyQuad(play, &this->targetColliderQuad); } else { - Collider_DestroyCylinder(play, &this->bodyCyl); + Collider_DestroyCylinder(play, &this->bodyColliderCylinder); } } @@ -257,16 +257,16 @@ void EnDntNomal_TargetWait(EnDntNomal* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); #if OOT_VERSION < PAL_1_0 - if (this->targetQuad.base.acFlags & AC_HIT) + if (this->targetColliderQuad.base.acFlags & AC_HIT) #else - if ((this->targetQuad.base.acFlags & AC_HIT) || BREG(0)) + if ((this->targetColliderQuad.base.acFlags & AC_HIT) || BREG(0)) #endif { - this->targetQuad.base.acFlags &= ~AC_HIT; + this->targetColliderQuad.base.acFlags &= ~AC_HIT; - dx = fabsf(targetX - this->targetQuad.elem.acDmgInfo.hitPos.x); - dy = fabsf(targetY - this->targetQuad.elem.acDmgInfo.hitPos.y); - dz = fabsf(targetZ - this->targetQuad.elem.acDmgInfo.hitPos.z); + dx = fabsf(targetX - this->targetColliderQuad.elem.acDmgInfo.hitPos.x); + dy = fabsf(targetY - this->targetColliderQuad.elem.acDmgInfo.hitPos.y); + dz = fabsf(targetZ - this->targetColliderQuad.elem.acDmgInfo.hitPos.z); scoreVel.y = 5.0f; @@ -855,13 +855,13 @@ void EnDntNomal_Update(Actor* thisx, PlayState* play) { UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 | UPDBGCHECKINFO_FLAG_4); if (this->type == ENDNTNOMAL_TARGET) { - Collider_SetQuadVertices(&this->targetQuad, &this->targetVtx[0], &this->targetVtx[1], &this->targetVtx[2], - &this->targetVtx[3]); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->targetQuad.base); + Collider_SetQuadVertices(&this->targetColliderQuad, &this->targetVtx[0], &this->targetVtx[1], + &this->targetVtx[2], &this->targetVtx[3]); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->targetColliderQuad.base); } else { - Collider_UpdateCylinder(&this->actor, &this->bodyCyl); + Collider_UpdateCylinder(&this->actor, &this->bodyColliderCylinder); if (this->isSolid) { - CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyCyl.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->bodyColliderCylinder.base); } } } diff --git a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.h b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.h index f0bcab6ed1..21f77798a0 100644 --- a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.h +++ b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.h @@ -38,8 +38,8 @@ typedef struct EnDntNomal { /* 0x0279 */ s8 requiredObjectSlot; /* 0x027C */ Vec3f mouthPos; /* 0x0288 */ Vec3f targetPos; - /* 0x0294 */ ColliderQuad targetQuad; - /* 0x0314 */ ColliderCylinder bodyCyl; + /* 0x0294 */ ColliderQuad targetColliderQuad; + /* 0x0314 */ ColliderCylinder bodyColliderCylinder; } EnDntNomal; // size = 0x0360 #define ENDNTNOMAL_TARGET 0 diff --git a/src/overlays/actors/ovl_En_Goma/z_en_goma.c b/src/overlays/actors/ovl_En_Goma/z_en_goma.c index f2e02c709c..82175795bd 100644 --- a/src/overlays/actors/ovl_En_Goma/z_en_goma.c +++ b/src/overlays/actors/ovl_En_Goma/z_en_goma.c @@ -185,10 +185,10 @@ void EnGoma_Init(Actor* thisx, PlayState* play) { this->eggScale = 1.0f; this->eggSquishAngle = Rand_ZeroOne() * 1000.0f; this->actionTimer = 50; - Collider_InitCylinder(play, &this->colCyl1); - Collider_SetCylinder(play, &this->colCyl1, &this->actor, &D_80A4B7A0); - Collider_InitCylinder(play, &this->colCyl2); - Collider_SetCylinder(play, &this->colCyl2, &this->actor, &D_80A4B7CC); + Collider_InitCylinder(play, &this->colliderCylinder1); + Collider_SetCylinder(play, &this->colliderCylinder1, &this->actor, &D_80A4B7A0); + Collider_InitCylinder(play, &this->colliderCylinder2); + Collider_SetCylinder(play, &this->colliderCylinder2, &this->actor, &D_80A4B7CC); } } @@ -196,8 +196,8 @@ void EnGoma_Destroy(Actor* thisx, PlayState* play) { EnGoma* this = (EnGoma*)thisx; if (this->actor.params < 10) { - Collider_DestroyCylinder(play, &this->colCyl1); - Collider_DestroyCylinder(play, &this->colCyl2); + Collider_DestroyCylinder(play, &this->colliderCylinder1); + Collider_DestroyCylinder(play, &this->colliderCylinder2); } } @@ -635,15 +635,15 @@ void EnGoma_UpdateHit(EnGoma* this, PlayState* play) { ColliderElement* acHitElem; u8 swordDamage; - if ((this->colCyl1.base.atFlags & AT_HIT) && this->actionFunc == EnGoma_Jump) { + if ((this->colliderCylinder1.base.atFlags & AT_HIT) && this->actionFunc == EnGoma_Jump) { EnGoma_SetupLand(this); this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; } - if ((this->colCyl2.base.acFlags & AC_HIT) && (s8)this->actor.colChkInfo.health > 0) { - acHitElem = this->colCyl2.elem.acHitElem; - this->colCyl2.base.acFlags &= ~AC_HIT; + if ((this->colliderCylinder2.base.acFlags & AC_HIT) && (s8)this->actor.colChkInfo.health > 0) { + acHitElem = this->colliderCylinder2.elem.acHitElem; + this->colliderCylinder2.base.acFlags &= ~AC_HIT; if (this->gomaType == ENGOMA_NORMAL) { u32 dmgFlags = acHitElem->atDmgInfo.dmgFlags; @@ -753,20 +753,20 @@ void EnGoma_Update(Actor* thisx, PlayState* play) { EnGoma_UpdateEyeEnvColor(this); this->visualState = 1; if (player->meleeWeaponState != 0) { - this->colCyl2.dim.radius = 35; - this->colCyl2.dim.height = 35; - this->colCyl2.dim.yShift = 0; + this->colliderCylinder2.dim.radius = 35; + this->colliderCylinder2.dim.height = 35; + this->colliderCylinder2.dim.yShift = 0; } else { - this->colCyl2.dim.radius = 15; - this->colCyl2.dim.height = 30; - this->colCyl2.dim.yShift = 10; + this->colliderCylinder2.dim.radius = 15; + this->colliderCylinder2.dim.height = 30; + this->colliderCylinder2.dim.yShift = 10; } if (this->invincibilityTimer == 0) { - Collider_UpdateCylinder(&this->actor, &this->colCyl1); - Collider_UpdateCylinder(&this->actor, &this->colCyl2); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colCyl1.base); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colCyl2.base); - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colCyl1.base); + Collider_UpdateCylinder(&this->actor, &this->colliderCylinder1); + Collider_UpdateCylinder(&this->actor, &this->colliderCylinder2); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder1.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder2.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderCylinder1.base); } } } diff --git a/src/overlays/actors/ovl_En_Goma/z_en_goma.h b/src/overlays/actors/ovl_En_Goma/z_en_goma.h index c901cc937c..6b2f7cf309 100644 --- a/src/overlays/actors/ovl_En_Goma/z_en_goma.h +++ b/src/overlays/actors/ovl_En_Goma/z_en_goma.h @@ -73,8 +73,8 @@ typedef struct EnGoma { /* 0x2F8 */ s16 stunTimer; /* 0x2FC */ Vec3f shieldKnockbackVel; /* 0x308 */ Gfx* bossLimbDL; // set by z_boss_goma - /* 0x30C */ ColliderCylinder colCyl1; - /* 0x358 */ ColliderCylinder colCyl2; + /* 0x30C */ ColliderCylinder colliderCylinder1; + /* 0x358 */ ColliderCylinder colliderCylinder2; } EnGoma; // size = 0x03A4 #endif diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index 284d175bfe..2919bb2527 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -141,7 +141,7 @@ static ColliderCylinderInit sCylinderInit2 = { { 20, 70, 0, { 0, 0, 0 } }, }; -static ColliderJntSphElementInit sJntSphItemsInit[1] = { +static ColliderJntSphElementInit sJntSphElementsInit[1] = { { { ELEM_MATERIAL_UNK0, @@ -165,7 +165,7 @@ static ColliderJntSphInit sJntSphInit = { COLSHAPE_JNTSPH, }, 1, - sJntSphItemsInit, + sJntSphElementsInit, }; static CollisionCheckInfoInit D_80A65F38 = { 10, 35, 100, MASS_HEAVY }; @@ -838,10 +838,10 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawHorse, 20.0f); this->action = ENHORSE_ACT_IDLE; this->actor.speed = 0.0f; - Collider_InitCylinder(play, &this->cyl1); - Collider_SetCylinder(play, &this->cyl1, &this->actor, &sCylinderInit1); - Collider_InitCylinder(play, &this->cyl2); - Collider_SetCylinder(play, &this->cyl2, &this->actor, &sCylinderInit2); + Collider_InitCylinder(play, &this->colliderCylinder1); + Collider_SetCylinder(play, &this->colliderCylinder1, &this->actor, &sCylinderInit1); + Collider_InitCylinder(play, &this->colliderCylinder2); + Collider_SetCylinder(play, &this->colliderCylinder2, &this->actor, &sCylinderInit2); Collider_InitJntSph(play, &this->colliderJntSph); Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInit, this->colliderJntSphElements); CollisionCheck_SetInfo(&this->actor.colChkInfo, DamageTable_Get(0xB), &D_80A65F38); @@ -926,8 +926,8 @@ void EnHorse_Destroy(Actor* thisx, PlayState* play) { Audio_StopSfxByPos(&this->unk_21C); } Skin_Free(play, &this->skin); - Collider_DestroyCylinder(play, &this->cyl1); - Collider_DestroyCylinder(play, &this->cyl2); + Collider_DestroyCylinder(play, &this->colliderCylinder1); + Collider_DestroyCylinder(play, &this->colliderCylinder2); Collider_DestroyJntSph(play, &this->colliderJntSph); } @@ -947,8 +947,8 @@ void EnHorse_Freeze(EnHorse* this) { } this->prevAction = this->action; this->action = ENHORSE_ACT_FROZEN; - this->cyl1.base.ocFlags1 &= ~OC1_ON; - this->cyl2.base.ocFlags1 &= ~OC1_ON; + this->colliderCylinder1.base.ocFlags1 &= ~OC1_ON; + this->colliderCylinder2.base.ocFlags1 &= ~OC1_ON; this->colliderJntSph.base.ocFlags1 &= ~OC1_ON; this->animationIdx = ENHORSE_ANIM_IDLE; } @@ -963,8 +963,8 @@ void EnHorse_Frozen(EnHorse* this, PlayState* play) { this->actor.speed = 0.0f; this->noInputTimer--; if (this->noInputTimer < 0) { - this->cyl1.base.ocFlags1 |= OC1_ON; - this->cyl2.base.ocFlags1 |= OC1_ON; + this->colliderCylinder1.base.ocFlags1 |= OC1_ON; + this->colliderCylinder2.base.ocFlags1 |= OC1_ON; this->colliderJntSph.base.ocFlags1 |= OC1_ON; if (this->playerControlled == true) { this->stateFlags &= ~ENHORSE_FLAG_7; @@ -1748,8 +1748,8 @@ void EnHorse_HighJump(EnHorse* this, PlayState* play) { } void EnHorse_InitInactive(EnHorse* this) { - this->cyl1.base.ocFlags1 &= ~OC1_ON; - this->cyl2.base.ocFlags1 &= ~OC1_ON; + this->colliderCylinder1.base.ocFlags1 &= ~OC1_ON; + this->colliderCylinder2.base.ocFlags1 &= ~OC1_ON; this->colliderJntSph.base.ocFlags1 &= ~OC1_ON; this->action = ENHORSE_ACT_INACTIVE; this->animationIdx = ENHORSE_ANIM_WALK; @@ -1782,8 +1782,8 @@ void EnHorse_Inactive(EnHorse* this, PlayState* play2) { this->followTimer = 0; EnHorse_SetFollowAnimation(this, play); this->actor.params = HORSE_PTYPE_0; - this->cyl1.base.ocFlags1 |= OC1_ON; - this->cyl2.base.ocFlags1 |= OC1_ON; + this->colliderCylinder1.base.ocFlags1 |= OC1_ON; + this->colliderCylinder2.base.ocFlags1 |= OC1_ON; this->colliderJntSph.base.ocFlags1 |= OC1_ON; } } @@ -3583,17 +3583,21 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) { if (this->action != ENHORSE_ACT_INGO_RACE) { EnHorse_TiltBody(this, play); } - Collider_UpdateCylinder(thisx, &this->cyl1); - Collider_UpdateCylinder(thisx, &this->cyl2); + Collider_UpdateCylinder(thisx, &this->colliderCylinder1); + Collider_UpdateCylinder(thisx, &this->colliderCylinder2); // Required to match - this->cyl1.dim.pos.x = this->cyl1.dim.pos.x + (s16)(Math_SinS(thisx->shape.rot.y) * 11.0f); - this->cyl1.dim.pos.z = this->cyl1.dim.pos.z + (s16)(Math_CosS(thisx->shape.rot.y) * 11.0f); - this->cyl2.dim.pos.x = this->cyl2.dim.pos.x + (s16)(Math_SinS(thisx->shape.rot.y) * -18.0f); - this->cyl2.dim.pos.z = this->cyl2.dim.pos.z + (s16)(Math_CosS(thisx->shape.rot.y) * -18.0f); - CollisionCheck_SetAT(play, &play->colChkCtx, &this->cyl1.base); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->cyl1.base); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->cyl2.base); + this->colliderCylinder1.dim.pos.x = + this->colliderCylinder1.dim.pos.x + (s16)(Math_SinS(thisx->shape.rot.y) * 11.0f); + this->colliderCylinder1.dim.pos.z = + this->colliderCylinder1.dim.pos.z + (s16)(Math_CosS(thisx->shape.rot.y) * 11.0f); + this->colliderCylinder2.dim.pos.x = + this->colliderCylinder2.dim.pos.x + (s16)(Math_SinS(thisx->shape.rot.y) * -18.0f); + this->colliderCylinder2.dim.pos.z = + this->colliderCylinder2.dim.pos.z + (s16)(Math_CosS(thisx->shape.rot.y) * -18.0f); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderCylinder1.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder1.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder2.base); if ((player->stateFlags1 & PLAYER_STATE1_0) && player->rideActor != NULL) { if (play->sceneId != SCENE_LON_LON_RANCH || (play->sceneId == SCENE_LON_LON_RANCH && (thisx->world.pos.z < -2400.0f))) { @@ -3637,9 +3641,9 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) { } if (thisx->speed >= 5.0f) { - this->cyl1.base.atFlags |= AT_ON; + this->colliderCylinder1.base.atFlags |= AT_ON; } else { - this->cyl1.base.atFlags &= ~AT_ON; + this->colliderCylinder1.base.atFlags &= ~AT_ON; } if (gSaveContext.save.entranceIndex != ENTR_LON_LON_RANCH_0 || gSaveContext.sceneLayer != 9) { diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.h b/src/overlays/actors/ovl_En_Horse/z_en_horse.h index 2acf638395..0eed5c001c 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.h +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.h @@ -140,8 +140,8 @@ typedef struct EnHorse { /* 0x0264 */ Vec2f curStick; /* 0x026C */ Vec2f lastStick; /* 0x0274 */ f32 jumpStartY; - /* 0x0278 */ ColliderCylinder cyl1; - /* 0x02C4 */ ColliderCylinder cyl2; + /* 0x0278 */ ColliderCylinder colliderCylinder1; + /* 0x02C4 */ ColliderCylinder colliderCylinder2; /* 0x0310 */ ColliderJntSph colliderJntSph; /* 0x0330 */ ColliderJntSphElement colliderJntSphElements[1]; /* 0x0370 */ u32 playerDir; diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c index 9d82204298..b8df4e79cd 100644 --- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c +++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c @@ -71,7 +71,7 @@ static ColliderCylinderInitType1 sCylinderInit = { { 20, 100, 0, { 0, 0, 0 } }, }; -static ColliderJntSphElementInit sJntSphElementInit[1] = { +static ColliderJntSphElementInit sJntSphElementsInit[1] = { { { ELEM_MATERIAL_UNK0, @@ -95,7 +95,7 @@ static ColliderJntSphInit sJntSphInit = { COLSHAPE_JNTSPH, }, 1, - sJntSphElementInit, + sJntSphElementsInit, }; static CollisionCheckInfoInit sColCheckInfoInit = { 10, 35, 100, MASS_HEAVY }; diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/src/overlays/actors/ovl_En_Insect/z_en_insect.c index 2175769fbe..09e4c8d401 100644 --- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -67,7 +67,7 @@ ActorProfile En_Insect_Profile = { /**/ EnInsect_Draw, }; -static ColliderJntSphElementInit sColliderItemInit[1] = { +static ColliderJntSphElementInit sColliderElementsInit[1] = { { { ELEM_MATERIAL_UNK0, @@ -91,7 +91,7 @@ static ColliderJntSphInit sColliderInit = { COLSHAPE_JNTSPH, }, 1, - sColliderItemInit, + sColliderElementsInit, }; /** diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c index b78715e962..9572cf393b 100644 --- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c +++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c @@ -89,7 +89,7 @@ static ColliderCylinderInit sCylinderInit = { { 50, 160, -70, { 0, 0, 0 } }, }; -static ColliderJntSphElementInit sJntSphElemInit[1] = { +static ColliderJntSphElementInit sJntSphElementsInit[1] = { { { ELEM_MATERIAL_UNK0, @@ -113,7 +113,7 @@ static ColliderJntSphInit sJntSphInit = { COLSHAPE_JNTSPH, }, 1, - sJntSphElemInit, + sJntSphElementsInit, }; static ColliderQuadInit sQuadInit = { diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index d2f3dbe179..7b4ebbeb9e 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -89,7 +89,7 @@ static ColliderCylinderInit sCylinderInit = { { 20, 40, 20, { 0, 0, 0 } }, }; -static ColliderJntSphElementInit D_80AE1AA0[1] = { +static ColliderJntSphElementInit sJntSphElementsInit[1] = { { { ELEM_MATERIAL_UNK0, @@ -113,7 +113,7 @@ static ColliderJntSphInit sJntSphInit = { COLSHAPE_JNTSPH, }, 1, - D_80AE1AA0, + sJntSphElementsInit, }; static CollisionCheckInfoInit sColChkInfoInit = { 4, 25, 50, 40 }; diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index 18d7fc3c32..b006acf538 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -209,19 +209,19 @@ void EnSsh_InitColliders(EnSsh* this, PlayState* play) { s32 pad; for (i = 0; i < ARRAY_COUNT(cylinders); i++) { - Collider_InitCylinder(play, &this->collidersCylinder[i]); - Collider_SetCylinder(play, &this->collidersCylinder[i], &this->actor, cylinders[i]); + Collider_InitCylinder(play, &this->colliderCylinders[i]); + Collider_SetCylinder(play, &this->colliderCylinders[i], &this->actor, cylinders[i]); } - this->collidersCylinder[0].elem.acDmgInfo.dmgFlags = + this->colliderCylinders[0].elem.acDmgInfo.dmgFlags = DMG_ARROW | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_EXPLOSIVE | DMG_DEKU_NUT; - this->collidersCylinder[1].elem.acDmgInfo.dmgFlags = + this->colliderCylinders[1].elem.acDmgInfo.dmgFlags = DMG_DEFAULT & ~(DMG_ARROW | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_EXPLOSIVE | DMG_DEKU_NUT) & ~(DMG_MAGIC_LIGHT | DMG_MAGIC_ICE); - this->collidersCylinder[2].base.colMaterial = COL_MATERIAL_METAL; - this->collidersCylinder[2].elem.acElemFlags = ACELEM_ON | ACELEM_HOOKABLE | ACELEM_NO_AT_INFO; - this->collidersCylinder[2].elem.elemMaterial = ELEM_MATERIAL_UNK2; - this->collidersCylinder[2].elem.acDmgInfo.dmgFlags = + this->colliderCylinders[2].base.colMaterial = COL_MATERIAL_METAL; + this->colliderCylinders[2].elem.acElemFlags = ACELEM_ON | ACELEM_HOOKABLE | ACELEM_NO_AT_INFO; + this->colliderCylinders[2].elem.elemMaterial = ELEM_MATERIAL_UNK2; + this->colliderCylinders[2].elem.acDmgInfo.dmgFlags = DMG_DEFAULT & ~(DMG_ARROW | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_EXPLOSIVE | DMG_DEKU_NUT); CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(2), &sColChkInfoInit); @@ -286,16 +286,16 @@ void EnSsh_SetColliderScale(EnSsh* this, f32 scale, f32 radiusMod) { this->colliderJntSph.elements[0].dim.modelSphere.radius = radius; for (i = 0; i < 6; i++) { - yShift = this->collidersCylinder[i].dim.yShift; - radius = this->collidersCylinder[i].dim.radius; - height = this->collidersCylinder[i].dim.height; + yShift = this->colliderCylinders[i].dim.yShift; + radius = this->colliderCylinders[i].dim.radius; + height = this->colliderCylinders[i].dim.height; yShift *= scale; radius *= scale * radiusMod; height *= scale; - this->collidersCylinder[i].dim.yShift = yShift; - this->collidersCylinder[i].dim.radius = radius; - this->collidersCylinder[i].dim.height = height; + this->colliderCylinders[i].dim.yShift = yShift; + this->colliderCylinders[i].dim.radius = radius; + this->colliderCylinders[i].dim.height = height; } Actor_SetScale(&this->actor, 0.04f * scale); this->floorHeightOffset = 40.0f * scale; @@ -447,17 +447,17 @@ void EnSsh_Sway(EnSsh* this) { } void EnSsh_CheckBodyStickHit(EnSsh* this, PlayState* play) { - ColliderElement* elem = &this->collidersCylinder[0].elem; + ColliderElement* elem = &this->colliderCylinders[0].elem; Player* player = GET_PLAYER(play); if (player->unk_860 != 0) { elem->acDmgInfo.dmgFlags |= DMG_DEKU_STICK; - this->collidersCylinder[1].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; - this->collidersCylinder[2].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; + this->colliderCylinders[1].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; + this->colliderCylinders[2].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; } else { elem->acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; - this->collidersCylinder[1].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; - this->collidersCylinder[2].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; + this->colliderCylinders[1].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; + this->colliderCylinders[2].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; } } @@ -469,8 +469,8 @@ s32 EnSsh_CheckHitPlayer(EnSsh* this, PlayState* play) { return false; } for (i = 0; i < 3; i++) { - if (this->collidersCylinder[i + 3].base.ocFlags2 & OC2_HIT_PLAYER) { - this->collidersCylinder[i + 3].base.ocFlags2 &= ~OC2_HIT_PLAYER; + if (this->colliderCylinders[i + 3].base.ocFlags2 & OC2_HIT_PLAYER) { + this->colliderCylinders[i + 3].base.ocFlags2 &= ~OC2_HIT_PLAYER; hit = true; } } @@ -492,13 +492,13 @@ s32 EnSsh_CheckHitPlayer(EnSsh* this, PlayState* play) { s32 EnSsh_CheckHitFront(EnSsh* this) { u32 acFlags; - if (this->collidersCylinder[2].base.acFlags) {} // Needed for matching - acFlags = this->collidersCylinder[2].base.acFlags; + if (this->colliderCylinders[2].base.acFlags) {} // Needed for matching + acFlags = this->colliderCylinders[2].base.acFlags; if (!!(acFlags & AC_HIT) == 0) { return 0; } else { - this->collidersCylinder[2].base.acFlags &= ~AC_HIT; + this->colliderCylinders[2].base.acFlags &= ~AC_HIT; this->invincibilityTimer = 8; if ((this->swayTimer == 0) && (this->hitTimer == 0) && (this->stunTimer == 0)) { this->swayTimer = 60; @@ -508,14 +508,14 @@ s32 EnSsh_CheckHitFront(EnSsh* this) { } s32 EnSsh_CheckHitBack(EnSsh* this, PlayState* play) { - ColliderCylinder* cyl = &this->collidersCylinder[0]; + ColliderCylinder* cyl = &this->colliderCylinders[0]; s32 hit = false; if (cyl->base.acFlags & AC_HIT) { cyl->base.acFlags &= ~AC_HIT; hit = true; } - cyl = &this->collidersCylinder[1]; + cyl = &this->colliderCylinders[1]; if (cyl->base.acFlags & AC_HIT) { cyl->base.acFlags &= ~AC_HIT; hit = true; @@ -558,19 +558,19 @@ s32 EnSsh_CollisionCheck(EnSsh* this, PlayState* play) { } void EnSsh_SetBodyCylinderAC(EnSsh* this, PlayState* play) { - Collider_UpdateCylinder(&this->actor, &this->collidersCylinder[0]); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->collidersCylinder[0].base); + Collider_UpdateCylinder(&this->actor, &this->colliderCylinders[0]); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinders[0].base); } void EnSsh_SetLegsCylinderAC(EnSsh* this, PlayState* play) { s16 angleTowardsLink = ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)); if (angleTowardsLink < 90 * (0x10000 / 360)) { - Collider_UpdateCylinder(&this->actor, &this->collidersCylinder[2]); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->collidersCylinder[2].base); + Collider_UpdateCylinder(&this->actor, &this->colliderCylinders[2]); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinders[2].base); } else { - Collider_UpdateCylinder(&this->actor, &this->collidersCylinder[1]); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->collidersCylinder[1].base); + Collider_UpdateCylinder(&this->actor, &this->colliderCylinders[1]); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinders[1].base); } } @@ -593,10 +593,10 @@ s32 EnSsh_SetCylinderOC(EnSsh* this, PlayState* play) { Matrix_RotateY(BINANG_TO_RAD_ALT(this->initialYaw), MTXMODE_APPLY); Matrix_MultVec3f(&cyloffsets[i], &cylPos); Matrix_Pop(); - this->collidersCylinder[i + 3].dim.pos.x = cylPos.x; - this->collidersCylinder[i + 3].dim.pos.y = cylPos.y; - this->collidersCylinder[i + 3].dim.pos.z = cylPos.z; - CollisionCheck_SetOC(play, &play->colChkCtx, &this->collidersCylinder[i + 3].base); + this->colliderCylinders[i + 3].dim.pos.x = cylPos.x; + this->colliderCylinders[i + 3].dim.pos.y = cylPos.y; + this->colliderCylinders[i + 3].dim.pos.z = cylPos.z; + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinders[i + 3].base); } return 1; } @@ -656,7 +656,7 @@ void EnSsh_Destroy(Actor* thisx, PlayState* play) { Effect_Delete(play, this->blureIdx); for (i = 0; i < 6; i++) { - Collider_DestroyCylinder(play, &this->collidersCylinder[i]); + Collider_DestroyCylinder(play, &this->colliderCylinders[i]); } Collider_DestroyJntSph(play, &this->colliderJntSph); } diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h index 4c0e3e275b..741770cec5 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.h @@ -14,7 +14,7 @@ typedef struct EnSsh { /* 0x0190 */ Vec3s jointTable[30]; /* 0x0244 */ Vec3s morphTable[30]; /* 0x02F8 */ EnSshActionFunc actionFunc; - /* 0x02FC */ ColliderCylinder collidersCylinder[6]; + /* 0x02FC */ ColliderCylinder colliderCylinders[6]; /* 0x04C4 */ ColliderJntSph colliderJntSph; /* 0x04E4 */ ColliderJntSphElement colliderJntSphElements[1]; /* 0x0524 */ s16 initialYaw; diff --git a/src/overlays/actors/ovl_En_St/z_en_st.c b/src/overlays/actors/ovl_En_St/z_en_st.c index d4f4ebf183..3b36545dba 100644 --- a/src/overlays/actors/ovl_En_St/z_en_st.c +++ b/src/overlays/actors/ovl_En_St/z_en_st.c @@ -295,20 +295,20 @@ void EnSt_InitColliders(EnSt* this, PlayState* play) { s32 pad; for (i = 0; i < ARRAY_COUNT(cylinders); i++) { - Collider_InitCylinder(play, &this->colliderCylinder[i]); - Collider_SetCylinder(play, &this->colliderCylinder[i], &this->actor, cylinders[i]); + Collider_InitCylinder(play, &this->colliderCylinders[i]); + Collider_SetCylinder(play, &this->colliderCylinders[i], &this->actor, cylinders[i]); } - this->colliderCylinder[0].elem.acDmgInfo.dmgFlags = + this->colliderCylinders[0].elem.acDmgInfo.dmgFlags = DMG_MAGIC_FIRE | DMG_ARROW | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT; - this->colliderCylinder[1].elem.acDmgInfo.dmgFlags = + this->colliderCylinders[1].elem.acDmgInfo.dmgFlags = DMG_DEFAULT & ~(DMG_MAGIC_FIRE | DMG_ARROW | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT) & ~(DMG_MAGIC_LIGHT | DMG_MAGIC_ICE); - this->colliderCylinder[2].base.colMaterial = COL_MATERIAL_METAL; - this->colliderCylinder[2].elem.acElemFlags = ACELEM_ON | ACELEM_HOOKABLE | ACELEM_NO_AT_INFO; - this->colliderCylinder[2].elem.elemMaterial = ELEM_MATERIAL_UNK2; - this->colliderCylinder[2].elem.acDmgInfo.dmgFlags = + this->colliderCylinders[2].base.colMaterial = COL_MATERIAL_METAL; + this->colliderCylinders[2].elem.acElemFlags = ACELEM_ON | ACELEM_HOOKABLE | ACELEM_NO_AT_INFO; + this->colliderCylinders[2].elem.elemMaterial = ELEM_MATERIAL_UNK2; + this->colliderCylinders[2].elem.acDmgInfo.dmgFlags = DMG_DEFAULT & ~(DMG_MAGIC_FIRE | DMG_ARROW | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT); @@ -319,34 +319,34 @@ void EnSt_InitColliders(EnSt* this, PlayState* play) { } void EnSt_CheckBodyStickHit(EnSt* this, PlayState* play) { - ColliderElement* bodyElem = &this->colliderCylinder[0].elem; + ColliderElement* bodyElem = &this->colliderCylinders[0].elem; Player* player = GET_PLAYER(play); if (player->unk_860 != 0) { bodyElem->acDmgInfo.dmgFlags |= DMG_DEKU_STICK; - this->colliderCylinder[1].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; - this->colliderCylinder[2].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; + this->colliderCylinders[1].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; + this->colliderCylinders[2].elem.acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; } else { bodyElem->acDmgInfo.dmgFlags &= ~DMG_DEKU_STICK; - this->colliderCylinder[1].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; - this->colliderCylinder[2].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; + this->colliderCylinders[1].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; + this->colliderCylinders[2].elem.acDmgInfo.dmgFlags |= DMG_DEKU_STICK; } } void EnSt_SetBodyCylinderAC(EnSt* this, PlayState* play) { - Collider_UpdateCylinder(&this->actor, &this->colliderCylinder[0]); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder[0].base); + Collider_UpdateCylinder(&this->actor, &this->colliderCylinders[0]); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinders[0].base); } void EnSt_SetLegsCylinderAC(EnSt* this, PlayState* play) { s16 angleTowardsLink = ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)); if (angleTowardsLink < 0x3FFC) { - Collider_UpdateCylinder(&this->actor, &this->colliderCylinder[2]); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder[2].base); + Collider_UpdateCylinder(&this->actor, &this->colliderCylinders[2]); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinders[2].base); } else { - Collider_UpdateCylinder(&this->actor, &this->colliderCylinder[1]); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder[1].base); + Collider_UpdateCylinder(&this->actor, &this->colliderCylinders[1]); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinders[1].base); } } @@ -369,10 +369,10 @@ s32 EnSt_SetCylinderOC(EnSt* this, PlayState* play) { Matrix_RotateY(BINANG_TO_RAD_ALT(this->initialYaw), MTXMODE_APPLY); Matrix_MultVec3f(&cyloffsets[i], &cylPos); Matrix_Pop(); - this->colliderCylinder[i + 3].dim.pos.x = cylPos.x; - this->colliderCylinder[i + 3].dim.pos.y = cylPos.y; - this->colliderCylinder[i + 3].dim.pos.z = cylPos.z; - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinder[i + 3].base); + this->colliderCylinders[i + 3].dim.pos.x = cylPos.x; + this->colliderCylinders[i + 3].dim.pos.y = cylPos.y; + this->colliderCylinders[i + 3].dim.pos.z = cylPos.z; + CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCylinders[i + 3].base); } return true; @@ -400,10 +400,10 @@ s32 EnSt_CheckHitPlayer(EnSt* this, PlayState* play) { s32 i; for (i = 0, hit = 0; i < 3; i++) { - if (((this->colliderCylinder[i + 3].base.ocFlags2 & OC2_HIT_PLAYER) != 0) == 0) { + if (((this->colliderCylinders[i + 3].base.ocFlags2 & OC2_HIT_PLAYER) != 0) == 0) { continue; } - this->colliderCylinder[i + 3].base.ocFlags2 &= ~OC2_HIT_PLAYER; + this->colliderCylinders[i + 3].base.ocFlags2 &= ~OC2_HIT_PLAYER; hit = true; } @@ -423,13 +423,13 @@ s32 EnSt_CheckHitPlayer(EnSt* this, PlayState* play) { } s32 EnSt_CheckHitFrontside(EnSt* this) { - u8 acFlags = this->colliderCylinder[2].base.acFlags; + u8 acFlags = this->colliderCylinders[2].base.acFlags; if (!!(acFlags & AC_HIT) == 0) { // not hit return false; } else { - this->colliderCylinder[2].base.acFlags &= ~AC_HIT; + this->colliderCylinders[2].base.acFlags &= ~AC_HIT; this->invulnerableTimer = 8; this->playSwayFlag = 0; this->swayTimer = 60; @@ -438,7 +438,7 @@ s32 EnSt_CheckHitFrontside(EnSt* this) { } s32 EnSt_CheckHitBackside(EnSt* this, PlayState* play) { - ColliderCylinder* cyl = &this->colliderCylinder[0]; + ColliderCylinder* cyl = &this->colliderCylinders[0]; s32 flags = 0; // damage flags from colliders 0 and 1 s32 hit = false; @@ -448,7 +448,7 @@ s32 EnSt_CheckHitBackside(EnSt* this, PlayState* play) { flags |= cyl->elem.acHitElem->atDmgInfo.dmgFlags; } - cyl = &this->colliderCylinder[1]; + cyl = &this->colliderCylinders[1]; if (cyl->base.acFlags & AC_HIT) { cyl->base.acFlags &= ~AC_HIT; hit = true; @@ -538,16 +538,16 @@ void EnSt_SetColliderScale(EnSt* this) { this->colliderJntSph.elements[0].dim.modelSphere.radius = radius; for (i = 0; i < 6; i++) { - yShift = this->colliderCylinder[i].dim.yShift; - radius = this->colliderCylinder[i].dim.radius; - height = this->colliderCylinder[i].dim.height; + yShift = this->colliderCylinders[i].dim.yShift; + radius = this->colliderCylinders[i].dim.radius; + height = this->colliderCylinders[i].dim.height; yShift *= scaleAmount; radius *= scaleAmount; height *= scaleAmount; - this->colliderCylinder[i].dim.yShift = yShift; - this->colliderCylinder[i].dim.radius = radius; - this->colliderCylinder[i].dim.height = height; + this->colliderCylinders[i].dim.yShift = yShift; + this->colliderCylinders[i].dim.radius = radius; + this->colliderCylinders[i].dim.height = height; } Actor_SetScale(&this->actor, 0.04f * scaleAmount); this->colliderScale = scaleAmount; @@ -828,7 +828,7 @@ void EnSt_Destroy(Actor* thisx, PlayState* play) { Effect_Delete(play, this->blureIdx); for (i = 0; i < 6; i++) { - Collider_DestroyCylinder(play, &this->colliderCylinder[i]); + Collider_DestroyCylinder(play, &this->colliderCylinders[i]); } Collider_DestroyJntSph(play, &this->colliderJntSph); } diff --git a/src/overlays/actors/ovl_En_St/z_en_st.h b/src/overlays/actors/ovl_En_St/z_en_st.h index a36dfded6e..08e9e8bd8d 100644 --- a/src/overlays/actors/ovl_En_St/z_en_st.h +++ b/src/overlays/actors/ovl_En_St/z_en_st.h @@ -12,7 +12,7 @@ typedef struct EnSt { /* 0x0000 */ Actor actor; /* 0x014C */ SkelAnime skelAnime; /* 0x0190 */ EnStActionFunc actionFunc; - /* 0x0194 */ ColliderCylinder colliderCylinder[6]; + /* 0x0194 */ ColliderCylinder colliderCylinders[6]; /* 0x035C */ ColliderJntSph colliderJntSph; /* 0x037C */ ColliderJntSphElement colliderJntSphElements[1]; /* 0x03BC */ s16 initialYaw; diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/src/overlays/actors/ovl_En_Sw/z_en_sw.c index bce08a0853..3a6da425ca 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -47,7 +47,7 @@ ActorProfile En_Sw_Profile = { /**/ EnSw_Draw, }; -static ColliderJntSphElementInit sJntSphItemsInit[1] = { +static ColliderJntSphElementInit sJntSphElementsInit[1] = { { { ELEM_MATERIAL_UNK0, { 0xFFCFFFFF, 0x00, 0x08 }, { 0xFFC3FFFE, 0x00, 0x00 }, 0x01, 0x05, 0x01 }, { 2, { { 0, -300, 0 }, 21 }, 100 }, @@ -57,7 +57,7 @@ static ColliderJntSphElementInit sJntSphItemsInit[1] = { static ColliderJntSphInit sJntSphInit = { { COL_MATERIAL_HIT6, 0x11, 0x09, 0x39, 0x10, COLSHAPE_JNTSPH }, 1, - sJntSphItemsInit, + sJntSphElementsInit, }; static CollisionCheckInfoInit2 D_80B0F074 = { 1, 2, 25, 25, MASS_IMMOVABLE }; diff --git a/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/src/overlays/actors/ovl_En_Wf/z_en_wf.c index f65c2b0844..95f1061d62 100644 --- a/src/overlays/actors/ovl_En_Wf/z_en_wf.c +++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.c @@ -60,7 +60,7 @@ void EnWf_SetupDie(EnWf* this); void EnWf_Die(EnWf* this, PlayState* play); s32 EnWf_DodgeRanged(PlayState* play, EnWf* this); -static ColliderJntSphElementInit sJntSphItemsInit[4] = { +static ColliderJntSphElementInit sJntSphElementsInit[4] = { { { ELEM_MATERIAL_UNK0, @@ -116,8 +116,8 @@ static ColliderJntSphInit sJntSphInit = { OC2_TYPE_1, COLSHAPE_JNTSPH, }, - ARRAY_COUNT(sJntSphItemsInit), - sJntSphItemsInit, + ARRAY_COUNT(sJntSphElementsInit), + sJntSphElementsInit, }; static ColliderCylinderInit sBodyCylinderInit = { diff --git a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c index bdbecf5a74..71ff43d277 100644 --- a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c +++ b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c @@ -96,18 +96,18 @@ void ObjIcePoly_Init(Actor* thisx, PlayState* play) { } Actor_SetScale(thisx, sScale[thisx->params]); thisx->world.pos.y = sOffsetY[thisx->params] + thisx->home.pos.y; - Collider_InitCylinder(play, &this->colliderIce); - Collider_SetCylinder(play, &this->colliderIce, thisx, &sCylinderInitIce); - Collider_InitCylinder(play, &this->colliderHard); - Collider_SetCylinder(play, &this->colliderHard, thisx, &sCylinderInitHard); - Collider_UpdateCylinder(thisx, &this->colliderIce); - Collider_UpdateCylinder(thisx, &this->colliderHard); + Collider_InitCylinder(play, &this->iceCollider); + Collider_SetCylinder(play, &this->iceCollider, thisx, &sCylinderInitIce); + Collider_InitCylinder(play, &this->hardCollider); + Collider_SetCylinder(play, &this->hardCollider, thisx, &sCylinderInitHard); + Collider_UpdateCylinder(thisx, &this->iceCollider); + Collider_UpdateCylinder(thisx, &this->hardCollider); thisx->colChkInfo.mass = MASS_IMMOVABLE; this->alpha = 255; - this->colliderIce.dim.radius *= thisx->scale.x; - this->colliderIce.dim.height *= thisx->scale.y; - this->colliderHard.dim.radius *= thisx->scale.x; - this->colliderHard.dim.height *= thisx->scale.y; + this->iceCollider.dim.radius *= thisx->scale.x; + this->iceCollider.dim.height *= thisx->scale.y; + this->hardCollider.dim.radius *= thisx->scale.x; + this->hardCollider.dim.height *= thisx->scale.y; Actor_SetFocus(thisx, thisx->scale.y * 30.0f); this->actionFunc = ObjIcePoly_Idle; } @@ -117,8 +117,8 @@ void ObjIcePoly_Destroy(Actor* thisx, PlayState* play) { ObjIcePoly* this = (ObjIcePoly*)thisx; if ((this->actor.params >= 0) && (this->actor.params < 3)) { - Collider_DestroyCylinder(play, &this->colliderIce); - Collider_DestroyCylinder(play, &this->colliderHard); + Collider_DestroyCylinder(play, &this->iceCollider); + Collider_DestroyCylinder(play, &this->hardCollider); } } @@ -127,17 +127,17 @@ void ObjIcePoly_Idle(ObjIcePoly* this, PlayState* play) { s32 pad; Vec3f pos; - if (this->colliderIce.base.acFlags & AC_HIT) { - this->meltTimer = -this->colliderIce.elem.acHitElem->atDmgInfo.damage; + if (this->iceCollider.base.acFlags & AC_HIT) { + this->meltTimer = -this->iceCollider.elem.acHitElem->atDmgInfo.damage; this->actor.focus.rot.y = this->actor.yawTowardsPlayer; OnePointCutscene_Init(play, 5120, 40, &this->actor, CAM_ID_MAIN); this->actionFunc = ObjIcePoly_Melt; } else if (this->actor.parent != NULL) { this->actor.parent->freezeTimer = 40; - CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderIce.base); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderIce.base); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderIce.base); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderHard.base); + CollisionCheck_SetAT(play, &play->colChkCtx, &this->iceCollider.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->iceCollider.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->iceCollider.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->hardCollider.base); } else { Actor_Kill(&this->actor); } diff --git a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h index 22bdf34d95..c6a56d16f1 100644 --- a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h +++ b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h @@ -14,8 +14,8 @@ typedef struct ObjIcePoly { /* 0x0150 */ u8 alpha; /* 0x0151 */ u8 unk_151; // Unused. Probably intended to be a switch flag. /* 0x0152 */ s16 meltTimer; - /* 0x0154 */ ColliderCylinder colliderIce; - /* 0x01A0 */ ColliderCylinder colliderHard; + /* 0x0154 */ ColliderCylinder iceCollider; + /* 0x01A0 */ ColliderCylinder hardCollider; } ObjIcePoly; // size = 0x01EC #endif diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c index 8d0447bfb2..a433834d66 100644 --- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c +++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c @@ -60,7 +60,7 @@ ActorProfile Obj_Lightswitch_Profile = { /**/ ObjLightswitch_Draw, }; -static ColliderJntSphElementInit sColliderJntSphElementInit[] = { +static ColliderJntSphElementInit sColliderJntSphElementsInit[] = { { { ELEM_MATERIAL_UNK0, @@ -83,7 +83,7 @@ static ColliderJntSphInit sColliderJntSphInit = { COLSHAPE_JNTSPH, }, 1, - sColliderJntSphElementInit, + sColliderJntSphElementsInit, }; static CollisionCheckInfoInit sColChkInfoInit = { 0, 12, 60, MASS_IMMOVABLE }; diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index c238b3d9da..45c8594c6e 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -160,7 +160,7 @@ static ColliderTrisInit sEyeTrisInit = { sEyeTrisElementsInit, }; -static ColliderJntSphElementInit sCrystalJntSphElementInit[1] = { +static ColliderJntSphElementInit sCrystalJntSphElementsInit[1] = { { { ELEM_MATERIAL_UNK0, @@ -183,8 +183,8 @@ static ColliderJntSphInit sCrystalJntSphInit = { OC2_TYPE_2, COLSHAPE_JNTSPH, }, - ARRAY_COUNT(sCrystalJntSphElementInit), - sCrystalJntSphElementInit, + ARRAY_COUNT(sCrystalJntSphElementsInit), + sCrystalJntSphElementsInit, }; static InitChainEntry sInitChain[] = { diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index acdf87414d..a189fe4345 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -97,12 +97,12 @@ void ObjSyokudai_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); - Collider_InitCylinder(play, &this->colliderStand); - Collider_SetCylinder(play, &this->colliderStand, &this->actor, &sCylInitStand); - this->colliderStand.base.colMaterial = sColMaterialsStand[PARAMS_GET_NOMASK(this->actor.params, 12)]; + Collider_InitCylinder(play, &this->standCollider); + Collider_SetCylinder(play, &this->standCollider, &this->actor, &sCylInitStand); + this->standCollider.base.colMaterial = sColMaterialsStand[PARAMS_GET_NOMASK(this->actor.params, 12)]; - Collider_InitCylinder(play, &this->colliderFlame); - Collider_SetCylinder(play, &this->colliderFlame, &this->actor, &sCylInitFlame); + Collider_InitCylinder(play, &this->flameCollider); + Collider_SetCylinder(play, &this->flameCollider, &this->actor, &sCylInitFlame); this->actor.colChkInfo.mass = MASS_IMMOVABLE; @@ -124,8 +124,8 @@ void ObjSyokudai_Destroy(Actor* thisx, PlayState* play) { s32 pad; ObjSyokudai* this = (ObjSyokudai*)thisx; - Collider_DestroyCylinder(play, &this->colliderStand); - Collider_DestroyCylinder(play, &this->colliderFlame); + Collider_DestroyCylinder(play, &this->standCollider); + Collider_DestroyCylinder(play, &this->flameCollider); LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); } @@ -182,8 +182,8 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) { this->litTimer = 20; } } - if (this->colliderFlame.base.acFlags & AC_HIT) { - dmgFlags = this->colliderFlame.elem.acHitElem->atDmgInfo.dmgFlags; + if (this->flameCollider.base.acFlags & AC_HIT) { + dmgFlags = this->flameCollider.elem.acHitElem->atDmgInfo.dmgFlags; if (dmgFlags & (DMG_FIRE | DMG_ARROW_NORMAL)) { interactionType = 1; } @@ -206,7 +206,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) { player->unk_860 = 200; } } else if (dmgFlags & DMG_ARROW_NORMAL) { - arrow = (EnArrow*)this->colliderFlame.base.ac; + arrow = (EnArrow*)this->flameCollider.base.ac; if ((arrow->actor.update != NULL) && (arrow->actor.id == ACTOR_EN_ARROW)) { arrow->actor.params = 0; arrow->collider.elem.atDmgInfo.dmgFlags = DMG_ARROW_FIRE; @@ -243,12 +243,12 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) { } } - Collider_UpdateCylinder(&this->actor, &this->colliderStand); - CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderStand.base); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderStand.base); + Collider_UpdateCylinder(&this->actor, &this->standCollider); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->standCollider.base); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->standCollider.base); - Collider_UpdateCylinder(&this->actor, &this->colliderFlame); - CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderFlame.base); + Collider_UpdateCylinder(&this->actor, &this->flameCollider); + CollisionCheck_SetAC(play, &play->colChkCtx, &this->flameCollider.base); if (this->litTimer > 0) { this->litTimer--; diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h index 795e855ae8..4dee2ba671 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h @@ -9,8 +9,8 @@ struct ObjSyokudai; typedef struct ObjSyokudai { /* 0x0000 */ Actor actor; - /* 0x014C */ ColliderCylinder colliderStand; - /* 0x0198 */ ColliderCylinder colliderFlame; + /* 0x014C */ ColliderCylinder standCollider; + /* 0x0198 */ ColliderCylinder flameCollider; /* 0x01E4 */ s16 litTimer; /* 0x01E6 */ u8 flameTexScroll; /* 0x01E8 */ LightNode* lightNode; From a64fd8dea8724afef8ecd0e88fabeabda810e3a1 Mon Sep 17 00:00:00 2001 From: cadmic Date: Sat, 15 Feb 2025 13:24:25 -0800 Subject: [PATCH 13/15] fix_bss.py: Try to handle one-past-the-end pointers (#2471) * fix_bss.py: Try to handle one-past-the-end pointers * Proofread --- tools/fix_bss.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/fix_bss.py b/tools/fix_bss.py index 2a775765af..61cb4985d8 100755 --- a/tools/fix_bss.py +++ b/tools/fix_bss.py @@ -170,9 +170,9 @@ def get_file_pointers( # For relocations against a global symbol, subtract the addend so that the pointer # is for the start of the symbol. This can help deal with things like STACK_TOP - # (where the pointer is past the end of the symbol) or negative addends. If the - # relocation is against a section however, it's not useful to subtract the addend, - # so we keep it as-is and hope for the best. + # (where the pointer is past the end of the symbol) or negative addends. We can't + # do this for relocations against a section though, since we need the addend to + # distinguish between different static variables. if reloc.name.startswith("."): # section addend = reloc.addend else: # symbol @@ -446,13 +446,13 @@ def determine_base_bss_ordering( new_symbol = None new_offset = 0 for symbol in build_bss_symbols: - if ( - symbol.offset <= build_offset - and build_offset < symbol.offset + symbol.size - ): + # To handle one-past-the-end pointers, we check <= instead of < for the symbol end. + # This won't work if there is another symbol right after this one, since we'll + # attribute this pointer to that symbol instead. This could prevent us from solving + # BSS ordering, but often the two symbols are adjacent in the baserom too so it works anyway. + if symbol.offset <= build_offset <= symbol.offset + symbol.size: new_symbol = symbol new_offset = base_offset - (build_offset - symbol.offset) - break if new_symbol is None: if p.addend > 0: From aba3720d62f4282d2403324ed0cafa240c4dbb03 Mon Sep 17 00:00:00 2001 From: cadmic Date: Sat, 15 Feb 2025 16:36:19 -0800 Subject: [PATCH 14/15] Use enums for settings in SRAM header (#2429) * Use enums for settings in SRAM header * Fix bss * Uglify z_en_mag to match ique --- include/z64audio.h | 9 ++++++- include/z64save.h | 11 ++++++--- include/z64sram.h | 2 +- src/audio/debug.inc.c | 2 +- src/audio/general.c | 12 +++++----- src/boot/z_std_dma.c | 2 +- src/code/main.c | 2 +- src/code/z_camera.c | 6 ++--- src/code/z_common_data.c | 2 +- src/code/z_kankyo.c | 4 ++-- src/code/z_sram.c | 23 ++++++++++-------- src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 2 +- src/overlays/actors/ovl_En_Mag/z_en_mag.c | 4 ++-- src/overlays/actors/ovl_En_Xc/z_en_xc.c | 4 ++-- .../gamestates/ovl_file_choose/file_select.h | 7 ------ .../ovl_file_choose/z_file_choose.c | 12 +++++----- .../ovl_file_choose/z_file_nameset.c | 24 +++++++++---------- 17 files changed, 68 insertions(+), 60 deletions(-) diff --git a/include/z64audio.h b/include/z64audio.h index d60a6aaeb7..3673811ac9 100644 --- a/include/z64audio.h +++ b/include/z64audio.h @@ -68,6 +68,13 @@ typedef void (*AudioCustomUpdateFunction)(void); #define AUDIO_RELOCATED_ADDRESS_START K0BASE +typedef enum SoundSetting { + /* 0 */ SOUND_SETTING_STEREO, + /* 1 */ SOUND_SETTING_MONO, + /* 2 */ SOUND_SETTING_HEADSET, + /* 3 */ SOUND_SETTING_SURROUND +} SoundSetting; + typedef enum SoundMode { /* 0 */ SOUNDMODE_STEREO, /* 1 */ SOUNDMODE_HEADSET, @@ -1197,7 +1204,7 @@ void func_800F64E0(u8 arg0); void Audio_ToggleMalonSinging(u8 malonSingingDisabled); void Audio_SetEnvReverb(s8 reverb); void Audio_SetCodeReverb(s8 reverb); -void func_800F6700(s8 audioSetting); +void Audio_SetSoundMode(s8 soundSetting); void Audio_SetBaseFilter(u8); void Audio_SetExtraFilter(u8); void Audio_SetCutsceneFlag(s8 flag); diff --git a/include/z64save.h b/include/z64save.h index 62107df5ed..5edfc35d92 100644 --- a/include/z64save.h +++ b/include/z64save.h @@ -6,6 +6,11 @@ #include "z64inventory.h" #include "z64math.h" +typedef enum ZTargetSetting { + /* 0 */ Z_TARGET_SETTING_SWITCH, + /* 1 */ Z_TARGET_SETTING_HOLD +} ZTargetSetting; + typedef enum Language { #if OOT_NTSC /* 0 */ LANGUAGE_JPN, @@ -315,10 +320,10 @@ typedef struct SaveContext { /* 0x1404 */ u16 minigameState; /* 0x1406 */ u16 minigameScore; // "yabusame_total" /* 0x1408 */ char unk_1408[0x0001]; - /* 0x1409 */ u8 language; // NTSC 0: Japanese; 1: English | PAL 0: English; 1: German; 2: French - /* 0x140A */ u8 audioSetting; + /* 0x1409 */ u8 language; // NTSC 0: Japanese; 1: English | PAL 0: English; 1: German; 2: French (see enum `Language`) + /* 0x140A */ u8 soundSetting; // 0: Stereo; 1: Mono; 2: Headset; 3: Surround (see enum `SoundSetting`) /* 0x140B */ char unk_140B[0x0001]; - /* 0x140C */ u8 zTargetSetting; // 0: Switch; 1: Hold + /* 0x140C */ u8 zTargetSetting; // 0: Switch; 1: Hold (see enum `ZTargetSetting`) /* 0x140E */ u16 forcedSeqId; // immediately start playing the sequence if set /* 0x1410 */ u8 cutsceneTransitionControl; // context dependent usage: can either trigger a delayed fade or control fill alpha /* 0x1411 */ char unk_1411[0x0001]; diff --git a/include/z64sram.h b/include/z64sram.h index 3769f4419d..475b9fc5b9 100644 --- a/include/z64sram.h +++ b/include/z64sram.h @@ -12,7 +12,7 @@ typedef struct SramContext { typedef enum SramHeaderField { /* 0x00 */ SRAM_HEADER_SOUND, - /* 0x01 */ SRAM_HEADER_ZTARGET, + /* 0x01 */ SRAM_HEADER_Z_TARGET, /* 0x02 */ SRAM_HEADER_LANGUAGE, /* 0x03 */ SRAM_HEADER_MAGIC // must be the value in `sSramDefaultHeader` for save to be considered valid } SramHeaderField; diff --git a/src/audio/debug.inc.c b/src/audio/debug.inc.c index 29fbd50a3c..a41254001e 100644 --- a/src/audio/debug.inc.c +++ b/src/audio/debug.inc.c @@ -847,7 +847,7 @@ void AudioDebug_ProcessInput_SndCont(void) { &gSfxDefaultReverb); break; case 4: - func_800F6700(sAudioSndContWork[sAudioSndContSel]); + Audio_SetSoundMode(sAudioSndContWork[sAudioSndContSel]); break; case 5: SEQCMD_DISABLE_PLAY_SEQUENCES(sAudioSndContWork[sAudioSndContSel]); diff --git a/src/audio/general.c b/src/audio/general.c index 2a639275bb..8fc6a451f1 100644 --- a/src/audio/general.c +++ b/src/audio/general.c @@ -3766,26 +3766,26 @@ void Audio_SetCodeReverb(s8 reverb) { } } -void func_800F6700(s8 audioSetting) { +void Audio_SetSoundMode(s8 soundSetting) { s8 soundModeIndex; - switch (audioSetting) { - case 0: + switch (soundSetting) { + case SOUND_SETTING_STEREO: soundModeIndex = SOUNDMODE_STEREO; sSoundMode = SOUNDMODE_STEREO; break; - case 1: + case SOUND_SETTING_MONO: soundModeIndex = SOUNDMODE_MONO; sSoundMode = SOUNDMODE_MONO; break; - case 2: + case SOUND_SETTING_HEADSET: soundModeIndex = SOUNDMODE_HEADSET; sSoundMode = SOUNDMODE_HEADSET; break; - case 3: + case SOUND_SETTING_SURROUND: soundModeIndex = SOUNDMODE_STEREO; sSoundMode = SOUNDMODE_SURROUND; break; diff --git a/src/boot/z_std_dma.c b/src/boot/z_std_dma.c index 36930fda5f..2b9fc12d7e 100644 --- a/src/boot/z_std_dma.c +++ b/src/boot/z_std_dma.c @@ -29,7 +29,7 @@ #include "z64thread.h" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.2:78 pal-1.0:76 pal-1.1:76" + "ntsc-1.2:72 pal-1.0:70 pal-1.1:70" StackEntry sDmaMgrStackInfo; OSMesgQueue sDmaMgrMsgQueue; diff --git a/src/code/main.c b/src/code/main.c index 00fb9c896b..1699a3c07f 100644 --- a/src/code/main.c +++ b/src/code/main.c @@ -25,7 +25,7 @@ extern struct IrqMgr gIrqMgr; #include "z64thread.h" #pragma increment_block_number "gc-eu:144 gc-eu-mq:144 gc-jp:144 gc-jp-ce:144 gc-jp-mq:144 gc-us:144 gc-us-mq:144" \ - "ique-cn:160 ntsc-1.0:139 ntsc-1.1:139 ntsc-1.2:139 pal-1.0:137 pal-1.1:137" + "ique-cn:160 ntsc-1.0:133 ntsc-1.1:133 ntsc-1.2:133 pal-1.0:131 pal-1.1:131" extern u8 _buffersSegmentEnd[]; diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 6b0f4c24f4..6b0f502ae0 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -5,8 +5,8 @@ #include "z64olib.h" #include "overlays/actors/ovl_En_Horse/z_en_horse.h" -#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \ - "ique-cn:192 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128" +#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ + "ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128" s16 Camera_RequestSettingImpl(Camera* camera, s16 requestedSetting, s16 flags); s32 Camera_RequestModeImpl(Camera* camera, s16 requestedMode, u8 forceModeChange); @@ -3640,7 +3640,7 @@ s32 Camera_KeepOn3(Camera* camera) { } #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ique-cn:128 ntsc-1.0:140 ntsc-1.1:140 ntsc-1.2:140 pal-1.0:138 pal-1.1:138" + "ique-cn:128 ntsc-1.0:134 ntsc-1.1:134 ntsc-1.2:134 pal-1.0:132 pal-1.1:132" s32 Camera_KeepOn4(Camera* camera) { static Vec3f D_8015BD50; diff --git a/src/code/z_common_data.c b/src/code/z_common_data.c index ced17dc089..7671ba1c0c 100644 --- a/src/code/z_common_data.c +++ b/src/code/z_common_data.c @@ -3,7 +3,7 @@ #include "versions.h" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.0:176 ntsc-1.1:176 ntsc-1.2:176 pal-1.0:192 pal-1.1:192" + "ntsc-1.0:176 ntsc-1.1:176 ntsc-1.2:176 pal-1.0:176 pal-1.1:176" ALIGNED(16) SaveContext gSaveContext; #if PLATFORM_IQUE diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c index ab0ceaecc9..012ecdb742 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -1,5 +1,5 @@ -#pragma increment_block_number "gc-eu:228 gc-eu-mq:228 gc-jp:208 gc-jp-ce:208 gc-jp-mq:208 gc-us:208 gc-us-mq:208" \ - "ique-cn:208 ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:236 pal-1.1:236" +#pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-jp:208 gc-jp-ce:208 gc-jp-mq:208 gc-us:208 gc-us-mq:208" \ + "ique-cn:208 ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:232 pal-1.1:232" #include "global.h" #include "ultra64.h" diff --git a/src/code/z_sram.c b/src/code/z_sram.c index 0531e29952..da453d46cf 100644 --- a/src/code/z_sram.c +++ b/src/code/z_sram.c @@ -52,10 +52,13 @@ u16 gSramSlotOffsets[] = { }; static u8 sSramDefaultHeader[] = { - // TODO: use enums for these - 0, // SRAM_HEADER_SOUND - 0, // SRAM_HEADER_ZTARGET - 0, // SRAM_HEADER_LANGUAGE + SOUND_SETTING_STEREO, // SRAM_HEADER_SOUND + Z_TARGET_SETTING_SWITCH, // SRAM_HEADER_Z_TARGET +#if OOT_NTSC + LANGUAGE_JPN, // SRAM_HEADER_LANGUAGE +#else + LANGUAGE_ENG, // SRAM_HEADER_LANGUAGE +#endif // SRAM_HEADER_MAGIC 0x98, @@ -1016,8 +1019,8 @@ void Sram_InitSram(GameState* gameState, SramContext* sramCtx) { } } - gSaveContext.audioSetting = sramCtx->readBuff[SRAM_HEADER_SOUND] & 3; - gSaveContext.zTargetSetting = sramCtx->readBuff[SRAM_HEADER_ZTARGET] & 1; + gSaveContext.soundSetting = sramCtx->readBuff[SRAM_HEADER_SOUND] & 3; + gSaveContext.zTargetSetting = sramCtx->readBuff[SRAM_HEADER_Z_TARGET] & 1; #if OOT_PAL gSaveContext.language = sramCtx->readBuff[SRAM_HEADER_LANGUAGE]; @@ -1042,11 +1045,11 @@ void Sram_InitSram(GameState* gameState, SramContext* sramCtx) { PRINTF(T("GOOD!GOOD! サイズ=%d + %d = %d\n", "GOOD! GOOD! Size = %d + %d = %d\n"), sizeof(SaveInfo), 4, sizeof(SaveInfo) + 4); PRINTF_COLOR_BLUE(); - PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting); - PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting); - PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting); + PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.soundSetting); + PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.soundSetting); + PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.soundSetting); PRINTF_RST(); - func_800F6700(gSaveContext.audioSetting); + Audio_SetSoundMode(gSaveContext.soundSetting); } void Sram_Alloc(GameState* gameState, SramContext* sramCtx) { diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 588dec91a4..ce3be2b754 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -31,7 +31,7 @@ #include "assets/objects/object_sst/object_sst.h" #include "assets/objects/gameplay_keep/gameplay_keep.h" -#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ +#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ "pal-1.0:128 pal-1.1:128" #define FLAGS \ diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/src/overlays/actors/ovl_En_Mag/z_en_mag.c index 82ff36b3a4..0dd03dff1f 100644 --- a/src/overlays/actors/ovl_En_Mag/z_en_mag.c +++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.c @@ -69,8 +69,8 @@ void EnMag_ResetSram(void) { SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8007000), buffer, 0x800, 1); SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8007800), buffer, 0x800, 1); - gSaveContext.audioSetting = gSaveContext.zTargetSetting = 0; - func_800F6700(gSaveContext.audioSetting); + gSaveContext.soundSetting = gSaveContext.zTargetSetting = 0; // SOUND_SETTING_STEREO/Z_TARGET_SETTING_SWITCH + Audio_SetSoundMode(gSaveContext.soundSetting); } #endif diff --git a/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/src/overlays/actors/ovl_En_Xc/z_en_xc.c index f8c534ee5a..1df5897bda 100644 --- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -1411,8 +1411,8 @@ void func_80B3F3D8(void) { Sfx_PlaySfxCentered2(NA_SE_PL_SKIP); } -#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64" \ - "ique-cn:128 ntsc-1.0:64 ntsc-1.1:64 ntsc-1.2:64 pal-1.0:64 pal-1.1:64" +#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64 ique-cn:64" \ + "ntsc-1.0:64 ntsc-1.1:64 ntsc-1.2:64 pal-1.0:64 pal-1.1:64" void EnXc_PlayDiveSFX(Vec3f* src, PlayState* play) { static Vec3f D_80B42DA0; diff --git a/src/overlays/gamestates/ovl_file_choose/file_select.h b/src/overlays/gamestates/ovl_file_choose/file_select.h index 2946a39357..ae41c4dced 100644 --- a/src/overlays/gamestates/ovl_file_choose/file_select.h +++ b/src/overlays/gamestates/ovl_file_choose/file_select.h @@ -155,13 +155,6 @@ typedef enum SettingIndex { /* */ FS_SETTING_MAX } SettingIndex; -typedef enum AudioOption { - /* 0 */ FS_AUDIO_STEREO, - /* 1 */ FS_AUDIO_MONO, - /* 2 */ FS_AUDIO_HEADSET, - /* 3 */ FS_AUDIO_SURROUND -} AudioOption; - typedef enum CharPage { /* 0 */ FS_CHAR_PAGE_HIRA, /* 1 */ FS_CHAR_PAGE_KATA, diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index 306d2e1923..1486c3ce7b 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -741,12 +741,12 @@ void FileSelect_PulsateCursor(GameState* thisx) { SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, 3, OS_WRITE); PRINTF("1:read_buff[]=%x, %x, %x, %x\n", sramCtx->readBuff[SRAM_HEADER_SOUND], - sramCtx->readBuff[SRAM_HEADER_ZTARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE], + sramCtx->readBuff[SRAM_HEADER_Z_TARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE], sramCtx->readBuff[SRAM_HEADER_MAGIC]); SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_READ); PRINTF("read_buff[]=%x, %x, %x, %x\n", sramCtx->readBuff[SRAM_HEADER_SOUND], - sramCtx->readBuff[SRAM_HEADER_ZTARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE], + sramCtx->readBuff[SRAM_HEADER_Z_TARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE], sramCtx->readBuff[SRAM_HEADER_MAGIC]); } else if (CHECK_BTN_ALL(debugInput->press.button, BTN_DUP)) { sramCtx->readBuff[SRAM_HEADER_LANGUAGE] = gSaveContext.language = LANGUAGE_GER; @@ -754,11 +754,11 @@ void FileSelect_PulsateCursor(GameState* thisx) { SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, 3, OS_WRITE); PRINTF("1:read_buff[]=%x, %x, %x, %x\n", sramCtx->readBuff[SRAM_HEADER_SOUND], - sramCtx->readBuff[SRAM_HEADER_ZTARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE], + sramCtx->readBuff[SRAM_HEADER_Z_TARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE], sramCtx->readBuff[SRAM_HEADER_MAGIC]); SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_READ); PRINTF("read_buff[]=%x, %x, %x, %x\n", sramCtx->readBuff[SRAM_HEADER_SOUND], - sramCtx->readBuff[SRAM_HEADER_ZTARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE], + sramCtx->readBuff[SRAM_HEADER_Z_TARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE], sramCtx->readBuff[SRAM_HEADER_MAGIC]); } else if (CHECK_BTN_ALL(debugInput->press.button, BTN_DRIGHT)) { sramCtx->readBuff[SRAM_HEADER_LANGUAGE] = gSaveContext.language = LANGUAGE_FRA; @@ -766,12 +766,12 @@ void FileSelect_PulsateCursor(GameState* thisx) { SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, 3, OS_WRITE); PRINTF("1:read_buff[]=%x, %x, %x, %x\n", sramCtx->readBuff[SRAM_HEADER_SOUND], - sramCtx->readBuff[SRAM_HEADER_ZTARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE], + sramCtx->readBuff[SRAM_HEADER_Z_TARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE], sramCtx->readBuff[SRAM_HEADER_MAGIC]); SsSram_ReadWrite(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_SIZE, OS_READ); PRINTF("read_buff[]=%x, %x, %x, %x\n", sramCtx->readBuff[SRAM_HEADER_SOUND], - sramCtx->readBuff[SRAM_HEADER_ZTARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE], + sramCtx->readBuff[SRAM_HEADER_Z_TARGET], sramCtx->readBuff[SRAM_HEADER_LANGUAGE], sramCtx->readBuff[SRAM_HEADER_MAGIC]); } #endif diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_nameset.c b/src/overlays/gamestates/ovl_file_choose/z_file_nameset.c index c22f822cd5..b1b22c074e 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_nameset.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_nameset.c @@ -1353,7 +1353,7 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) { Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); this->configMode = CM_OPTIONS_TO_MAIN; - sramCtx->readBuff[0] = gSaveContext.audioSetting; + sramCtx->readBuff[0] = gSaveContext.soundSetting; sramCtx->readBuff[1] = gSaveContext.zTargetSetting; #if OOT_PAL_N64 sramCtx->readBuff[2] = gSaveContext.language; @@ -1363,11 +1363,11 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) { PRINTF_COLOR_YELLOW(); PRINTF("sram->read_buff[2] = J_N = %x\n", sramCtx->readBuff[2]); PRINTF("sram->read_buff[2] = J_N = %x\n", &sramCtx->readBuff[2]); - PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting); - PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting); - PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting); + PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.soundSetting); + PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.soundSetting); + PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.soundSetting); PRINTF_RST(); - func_800F6700(gSaveContext.audioSetting); + Audio_SetSoundMode(gSaveContext.soundSetting); PRINTF("終了\n"); return; } @@ -1377,11 +1377,11 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) { &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (sSelectedSetting == FS_SETTING_AUDIO) { - gSaveContext.audioSetting--; + gSaveContext.soundSetting--; // because audio setting is unsigned, can't check for < 0 - if (gSaveContext.audioSetting > 0xF0) { - gSaveContext.audioSetting = FS_AUDIO_SURROUND; + if (gSaveContext.soundSetting > 0xF0) { + gSaveContext.soundSetting = SOUND_SETTING_SURROUND; } } else { #if !OOT_PAL_N64 @@ -1402,10 +1402,10 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) { &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (sSelectedSetting == FS_SETTING_AUDIO) { - gSaveContext.audioSetting++; + gSaveContext.soundSetting++; - if (gSaveContext.audioSetting > FS_AUDIO_SURROUND) { - gSaveContext.audioSetting = FS_AUDIO_STEREO; + if (gSaveContext.soundSetting > SOUND_SETTING_SURROUND) { + gSaveContext.soundSetting = SOUND_SETTING_STEREO; } } else { #if !OOT_PAL_N64 @@ -1719,7 +1719,7 @@ void FileSelect_DrawOptionsImpl(GameState* thisx) { for (i = 0, vtx = 0; i < 4; i++, vtx += 4) { gDPPipeSync(POLY_OPA_DISP++); - if (i == gSaveContext.audioSetting) { + if (i == gSaveContext.soundSetting) { if (sSelectedSetting == FS_SETTING_AUDIO) { gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, cursorPrimRed, cursorPrimGreen, cursorPrimBlue, this->titleAlpha[0]); From 137e178790051e2988f93c62bc0ed4811b403ea2 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Sun, 16 Feb 2025 03:21:07 +0100 Subject: [PATCH 15/15] fix assembly warning in normalize.s (#2473) --- src/libultra/mgu/normalize.s | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libultra/mgu/normalize.s b/src/libultra/mgu/normalize.s index 8174527f2c..d94748bced 100644 --- a/src/libultra/mgu/normalize.s +++ b/src/libultra/mgu/normalize.s @@ -8,20 +8,24 @@ LEAF(guNormalize) lwc1 ft0, (a0) lwc1 ft1, (a1) lwc1 ft2, (a2) +.set noreorder mul.s ft3, ft0, ft0 li.s t0, 1.0 mul.s ft4, ft1, ft1 add.s ft5, ft3, ft4 mul.s ft4, ft2, ft2 +.set reorder add.s ft3, ft4, ft5 mtc1 t0, ft5 sqrt.s ft4, ft3 div.s ft3, ft5, ft4 +.set noreorder mul.s ft4, ft0, ft3 nop mul.s ft5, ft1, ft3 nop mul.s ft0, ft2, ft3 +.set reorder swc1 ft4, (a0) swc1 ft5, (a1) swc1 ft0, (a2)