mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-10 03:05:14 -04:00
merge master
This commit is contained in:
@@ -33,6 +33,7 @@ tools/ido_recomp/* binary
|
||||
ctx.c
|
||||
graphs/
|
||||
*.c.m2c
|
||||
tools/**/*dSYM/
|
||||
tools/decomp-permuter/
|
||||
tools/mips_to_c/
|
||||
|
||||
|
||||
@@ -8,8 +8,12 @@ COMPARE ?= 1
|
||||
NON_MATCHING ?= 0
|
||||
# If ORIG_COMPILER is 1, compile with QEMU_IRIX and the original compiler
|
||||
ORIG_COMPILER ?= 0
|
||||
# if WERROR is 1, pass -Werror to CC_CHECK, so warnings would be treated as errors
|
||||
WERROR ?= 0
|
||||
# Keep .mdebug section in build
|
||||
KEEP_MDEBUG ?= 0
|
||||
# Disassembles all asm from the ROM instead of skipping files which are entirely in C
|
||||
FULL_DISASM ?= 0
|
||||
|
||||
ifeq ($(NON_MATCHING),1)
|
||||
CFLAGS := -DNON_MATCHING
|
||||
@@ -17,6 +21,10 @@ ifeq ($(NON_MATCHING),1)
|
||||
COMPARE := 0
|
||||
endif
|
||||
|
||||
ifneq ($(FULL_DISASM), 0)
|
||||
DISASM_FLAGS += --full
|
||||
endif
|
||||
|
||||
PROJECT_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
MAKE = make
|
||||
@@ -36,12 +44,7 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
# Threads to compress and extract assets with, TODO improve later
|
||||
ifeq ($(DETECTED_OS),linux)
|
||||
N_THREADS ?= $(shell nproc)
|
||||
else
|
||||
N_THREADS ?= 1
|
||||
endif
|
||||
N_THREADS ?= $(shell nproc)
|
||||
|
||||
#### Tools ####
|
||||
ifeq ($(shell type mips-linux-gnu-ld >/dev/null 2>/dev/null; echo $$?), 0)
|
||||
@@ -109,6 +112,10 @@ ifneq ($(NON_MATCHING),1)
|
||||
COMPFLAGS += --matching
|
||||
endif
|
||||
|
||||
ifneq ($(WERROR), 0)
|
||||
CC_CHECK += -Werror
|
||||
endif
|
||||
|
||||
#### Files ####
|
||||
|
||||
# ROM image
|
||||
@@ -140,9 +147,10 @@ TEXTURE_FILES_OUT := $(foreach f,$(TEXTURE_FILES_PNG:.png=.inc.c),build/$f) \
|
||||
C_FILES := $(foreach dir,$(SRC_DIRS) $(ASSET_BIN_DIRS),$(wildcard $(dir)/*.c))
|
||||
S_FILES := $(shell grep -F "build/asm" spec | sed 's/.*build\/// ; s/\.o\".*/.s/') \
|
||||
$(shell grep -F "build/data" spec | sed 's/.*build\/// ; s/\.o\".*/.s/')
|
||||
BASEROM_FILES := $(shell grep -F "build/baserom" spec | sed 's/.*build\/// ; s/\.o\".*//')
|
||||
O_FILES := $(foreach f,$(S_FILES:.s=.o),build/$f) \
|
||||
$(foreach f,$(C_FILES:.c=.o),build/$f) \
|
||||
$(foreach f,$(wildcard baserom/*),build/$f.o)
|
||||
$(foreach f,$(BASEROM_FILES),build/$f.o)
|
||||
|
||||
# Automatic dependency files
|
||||
# (Only asm_processor dependencies are handled for now)
|
||||
@@ -166,6 +174,8 @@ build/src/libultra/flash/%.o: MIPS_VERSION := -mips1
|
||||
|
||||
build/src/code/audio/%.o: OPTFLAGS := -O2
|
||||
|
||||
build/assets/%.o: OPTFLAGS :=
|
||||
|
||||
# file flags
|
||||
build/src/boot_O2_g3/fault.o: CFLAGS += -trapuv
|
||||
build/src/boot_O2_g3/fault_drawer.o: CFLAGS += -trapuv
|
||||
@@ -243,12 +253,12 @@ setup:
|
||||
$(MAKE) -C tools
|
||||
python3 tools/fixbaserom.py
|
||||
python3 tools/extract_baserom.py
|
||||
python3 extract_assets.py -t $(N_THREADS)
|
||||
python3 extract_assets.py -j $(N_THREADS)
|
||||
|
||||
## Assembly generation
|
||||
disasm:
|
||||
$(RM) -rf asm data
|
||||
python3 tools/disasm/disasm.py -j $(N_THREADS)
|
||||
python3 tools/disasm/disasm.py -j $(N_THREADS) $(DISASM_FLAGS)
|
||||
|
||||
diff-init: uncompressed
|
||||
$(RM) -rf expected/
|
||||
@@ -283,11 +293,11 @@ build/baserom/%.o: baserom/%
|
||||
$(OBJCOPY) -I binary -O elf32-big $< $@
|
||||
|
||||
build/data/%.o: data/%.s
|
||||
iconv --from UTF-8 --to EUC-JP $< | $(AS) $(ASFLAGS) -o $@
|
||||
$(AS) $(ASFLAGS) $< -o $@
|
||||
|
||||
build/src/overlays/%.o: src/overlays/%.c
|
||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||
$(CC_CHECK) $<
|
||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||
@$(OBJDUMP) -d $@ > $(@:.o=.s)
|
||||
# TODO: `() || true` is currently necessary to suppress `Error 1 (ignored)` make warnings caused by `test`, but this will go away if
|
||||
# the following is moved to a separate rule that is only run once when all the required objects have been compiled.
|
||||
@@ -296,21 +306,21 @@ build/src/overlays/%.o: src/overlays/%.c
|
||||
$(RM_MDEBUG)
|
||||
|
||||
build/src/%.o: src/%.c
|
||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||
$(CC_CHECK) $<
|
||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||
@$(OBJDUMP) -d $@ > $(@:.o=.s)
|
||||
$(RM_MDEBUG)
|
||||
|
||||
build/src/libultra/libc/ll.o: src/libultra/libc/ll.c
|
||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||
$(CC_CHECK) $<
|
||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||
python3 tools/set_o32abi_bit.py $@
|
||||
@$(OBJDUMP) -d $@ > $(@:.o=.s)
|
||||
$(RM_MDEBUG)
|
||||
|
||||
build/src/libultra/libc/llcvt.o: src/libultra/libc/llcvt.c
|
||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||
$(CC_CHECK) $<
|
||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||
python3 tools/set_o32abi_bit.py $@
|
||||
@$(OBJDUMP) -d $@ > $(@:.o=.s)
|
||||
$(RM_MDEBUG)
|
||||
|
||||
@@ -23,26 +23,35 @@ in an experimental and research phase and cannot currently be used traditionally
|
||||
source code base for general changes.
|
||||
```
|
||||
|
||||
**This repo does not include any assets or code necessary for compiling the ROM. A prior copy of the game is required to extract the required assets.**
|
||||
This is a WIP **decompilation** of ***The Legend of Zelda: Majora's Mask***. The purpose of the project is to recreate a source code base for the game from scratch, using information found inside the game along with static and/or dynamic analysis. **It is not producing a PC port.** For more information you can get in touch with the team on our [Discord server](https://discord.zelda64.dev).
|
||||
|
||||
This is a decompilation of Legend of Zelda: Majora's Mask (US) 1.0
|
||||
The only build currently supported is N64 US, but other versions are planned to be supported.
|
||||
|
||||
It builds the following ROM:
|
||||
It currently builds the following ROM:
|
||||
* mm.us.rev1.rom.z64 `md5: 2a0a8acb61538235bc1094d297fb6556`
|
||||
|
||||
**This repo does not include any assets or assembly code necessary for compiling the ROM. A prior copy of the game is required to extract the required assets.**
|
||||
|
||||
Please refer to the following for more information:
|
||||
|
||||
- [Website](https://zelda64.dev/)
|
||||
- [Discord](https://discord.zelda64.dev/)
|
||||
- [How to Contribute](CONTRIBUTING.md)
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
### Windows
|
||||
|
||||
For Windows 10, install WSL and a distribution by following this
|
||||
[Windows Subsystem for Linux Installation Guide](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
|
||||
We recommend using Debian or Ubuntu 18.04 Linux distributions.
|
||||
We recommend using Debian or Ubuntu 20.04 Linux distributions.
|
||||
|
||||
|
||||
### MacOS
|
||||
|
||||
Preparation is covered in a [separate document](docsBUILDING_MACOS.md).
|
||||
|
||||
|
||||
### Linux (Native or under WSL / VM)
|
||||
|
||||
@@ -110,30 +119,23 @@ This means that something is wrong with the ROM's contents. Either the baserom f
|
||||
|
||||
Running `make init` will also make the `./expected` directory and copy all of the files there, which will be useful when running the diff script. The diff script is useful in decompiling functions and can be ran with this command: `./tools/asm-differ/diff.py -wmo3 <insert_function_here>`
|
||||
|
||||
**Note**: to speed up the build, you can either:
|
||||
* Pass `-jN` to `make setup` and `make`, where N is the number of threads to use in the build, e.g. `make -j4`. The generally-accepted wisdom is to use the number of virtual cores your computer has.
|
||||
* Pass `-j` to `make setup` and `make`, to use as many threads as possible, but beware that this can use too much memory on lower-end systems.
|
||||
Both of these have the disadvantage that the ordering of the terminal output is scrambled, so for debugging it is best to stick to one thread (i.e. not pass `-j` or `-jN`).
|
||||
**Note**: to speed up the build, you can pass `-jN` to `make setup` and `make`, where N is the number of threads to use in the build, e.g. `make -j4`. The generally-accepted wisdom is to use the number of virtual cores your computer has, which is the output of `nproc` (which should be installed as part of `coreutils`).
|
||||
The disadvantage that the ordering of the terminal output is scrambled, so for debugging it is best to stick to one thread (i.e. not pass `-jN`).
|
||||
(`-j` also exists, which uses unlimited jobs, but is generally slower.)
|
||||
|
||||
**Note**: if you rename symbols, it is recommended that you use the `tools/rename_sym.sh` to ensure that you cover all instances, including the tables which are used to generate the `asm/` directory.
|
||||
|
||||
Usage: `tools/rename_sym.sh old_name new_name`. Example:
|
||||
|
||||
```bash
|
||||
tools/rename_sym.sh func_808A3428 EnTorch2_UpdateIdle
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
All contributions are welcome. This is a group effort, and even small contributions can make a difference.
|
||||
Some tasks also don't require much knowledge to get started.
|
||||
|
||||
Anyone who wishes to contribute to the OOT or MM projects **must not have accessed leaked source code at any point in time** for Nintendo 64 SDK, iQue player SDK, libultra, Ocarina of Time, Majora's Mask, Animal Crossing/Animal Forest, or any other game that shares the same game engine or significant portions of code to a Zelda 64 game or any other console similar to the Nintendo 64.
|
||||
Please note that is is our strict policy that *Anyone who wishes to contribute to the OOT or MM projects **must not have accessed leaked source code at any point in time** for Nintendo 64 SDK, iQue player SDK, libultra, Ocarina of Time, Majora's Mask, Animal Crossing/Animal Forest, or any other game that shares the same game engine or significant portions of code to a Zelda 64 game or any other console similar to the Nintendo 64.*
|
||||
|
||||
Most discussions happen on our [Discord Server](https://discord.zelda64.dev), where you are welcome to ask if you need help getting started, or if you have any questions regarding this project and other decompilation projects.
|
||||
|
||||
For more information on getting started, see our [Contributing Guide](CONTRIBUTING.md) and our [Code Review Guidelines](REVIEWING.md) to see what code quality guidelines we follow.
|
||||
|
||||
|
||||
## FAQ
|
||||
|
||||
### Q: Why does MM use transient assembly?
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<Root>
|
||||
<File Name="code" BaseAddress="0x800A5AC0" RangeStart="0x108830" RangeEnd="0x108870" OutName="eff_shield_particle">
|
||||
<Array Name="sEffShieldParticleVtx" Count="4" Offset="0x108830">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
</File>
|
||||
</Root>
|
||||
@@ -1,7 +1,7 @@
|
||||
<Root>
|
||||
<File Name="gameplay_dangeon_keep" Segment="5">
|
||||
<DList Name="gameplay_dangeon_keep_DL_000140" Offset="0x140" />
|
||||
<DList Name="gameplay_dangeon_keep_DL_000230" Offset="0x230" />
|
||||
<DList Name="gDoorLockDL" Offset="0x140" />
|
||||
<DList Name="gDoorChainsDL" Offset="0x230" />
|
||||
<Texture Name="gameplay_dangeon_keep_Tex_0002C0" OutName="tex_0002C0" Format="rgba16" Width="32" Height="32" Offset="0x2C0" />
|
||||
<Texture Name="gameplay_dangeon_keep_Tex_000AC0" OutName="tex_000AC0" Format="rgba16" Width="32" Height="32" Offset="0xAC0" />
|
||||
<Texture Name="gameplay_dangeon_keep_Tex_0012C0" OutName="tex_0012C0" Format="rgba16" Width="16" Height="128" Offset="0x12C0" />
|
||||
|
||||
@@ -766,59 +766,62 @@
|
||||
<PlayerAnimation Name="gameplay_keep_Linkanim_00E4E8" Offset="0xE4E8" />
|
||||
<PlayerAnimation Name="gameplay_keep_Linkanim_00E4F0" Offset="0xE4F0" />
|
||||
<DList Name="gameplay_keep_DL_00E5C0" Offset="0xE5C0" />
|
||||
<Collision Name="gameplay_keep_Colheader_00E710" Offset="0xE710" />
|
||||
<Animation Name="gameplay_keep_Anim_00EB7C" Offset="0xEB7C" />
|
||||
<DList Name="gameplay_keep_DL_00ED80" Offset="0xED80" />
|
||||
<DList Name="gameplay_keep_DL_00F2B8" Offset="0xF2B8" />
|
||||
<DList Name="gameplay_keep_DL_00F350" Offset="0xF350" />
|
||||
<DList Name="gameplay_keep_DL_00F438" Offset="0xF438" />
|
||||
<DList Name="gameplay_keep_DL_00F4C0" Offset="0xF4C0" />
|
||||
<DList Name="gameplay_keep_DL_00F548" Offset="0xF548" />
|
||||
<DList Name="gameplay_keep_DL_00F5D0" Offset="0xF5D0" />
|
||||
<DList Name="gameplay_keep_DL_00F658" Offset="0xF658" />
|
||||
<DList Name="gameplay_keep_DL_00F6E0" Offset="0xF6E0" />
|
||||
<DList Name="gameplay_keep_DL_00F768" Offset="0xF768" />
|
||||
<DList Name="gameplay_keep_DL_00F7F0" Offset="0xF7F0" />
|
||||
<Texture Name="gameplay_keep_Tex_00F878" OutName="tex_00F878" Format="rgba16" Width="16" Height="32" Offset="0xF878" />
|
||||
<Texture Name="gameplay_keep_Tex_00FC78" OutName="tex_00FC78" Format="rgba16" Width="16" Height="32" Offset="0xFC78" />
|
||||
<Texture Name="gameplay_keep_Tex_010078" OutName="tex_010078" Format="rgba16" Width="32" Height="32" Offset="0x10078" />
|
||||
<Texture Name="gameplay_keep_Tex_010878" OutName="tex_010878" Format="rgba16" Width="16" Height="32" Offset="0x10878" />
|
||||
<Texture Name="gameplay_keep_Tex_010C78" OutName="tex_010C78" Format="rgba16" Width="32" Height="32" Offset="0x10C78" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_011478" Type="Standard" Offset="0x11478" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_011484" Type="Standard" Offset="0x11484" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_011490" Type="Standard" Offset="0x11490" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_01149C" Type="Standard" Offset="0x1149C" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_0114A8" Type="Standard" Offset="0x114A8" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_0114B4" Type="Standard" Offset="0x114B4" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_0114C0" Type="Standard" Offset="0x114C0" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_0114CC" Type="Standard" Offset="0x114CC" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_0114D8" Type="Standard" Offset="0x114D8" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_0114E4" Type="Standard" Offset="0x114E4" />
|
||||
<Skeleton Name="gameplay_keep_Skel_011518" Type="Normal" LimbType="Standard" Offset="0x11518" />
|
||||
<Animation Name="gameplay_keep_Anim_0117A8" Offset="0x117A8" />
|
||||
<Collision Name="gameplay_keep_Colheader_0118D8" Offset="0x118D8" />
|
||||
<DList Name="gameplay_keep_DL_011BD0" Offset="0x11BD0" />
|
||||
<DList Name="gameplay_keep_DL_0121B0" Offset="0x121B0" />
|
||||
<DList Name="gameplay_keep_DL_012260" Offset="0x12260" />
|
||||
<DList Name="gameplay_keep_DL_012308" Offset="0x12308" />
|
||||
<DList Name="gameplay_keep_DL_012390" Offset="0x12390" />
|
||||
<DList Name="gameplay_keep_DL_012418" Offset="0x12418" />
|
||||
<DList Name="gameplay_keep_DL_0124A0" Offset="0x124A0" />
|
||||
<DList Name="gameplay_keep_DL_012528" Offset="0x12528" />
|
||||
<DList Name="gameplay_keep_DL_0125B0" Offset="0x125B0" />
|
||||
<DList Name="gameplay_keep_DL_012638" Offset="0x12638" />
|
||||
<DList Name="gameplay_keep_DL_0126C0" Offset="0x126C0" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_012748" Type="Standard" Offset="0x12748" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_012754" Type="Standard" Offset="0x12754" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_012760" Type="Standard" Offset="0x12760" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_01276C" Type="Standard" Offset="0x1276C" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_012778" Type="Standard" Offset="0x12778" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_012784" Type="Standard" Offset="0x12784" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_012790" Type="Standard" Offset="0x12790" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_01279C" Type="Standard" Offset="0x1279C" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_0127A8" Type="Standard" Offset="0x127A8" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_0127B4" Type="Standard" Offset="0x127B4" />
|
||||
<Skeleton Name="gameplay_keep_Skel_0127E8" Type="Flex" LimbType="Standard" Offset="0x127E8" />
|
||||
|
||||
<!-- Deku Flower -->
|
||||
<Collision Name="gPinkDekuFlowerCol" Offset="0xE710" />
|
||||
<Animation Name="gDekuFlowerBounceAnim" Offset="0xEB7C" /> <!-- Original name is "dnp_boyoyon" ("bounce") -->
|
||||
<DList Name="gPinkDekuFlowerIdleDL" Offset="0xED80" />
|
||||
<DList Name="gPinkDekuFlowerBaseDL" Offset="0xF2B8" />
|
||||
<DList Name="gPinkDekuFlowerCenterDL" Offset="0xF350" />
|
||||
<DList Name="gPinkDekuFlowerBackLeftPetalDL" Offset="0xF438" />
|
||||
<DList Name="gPinkDekuFlowerLeftLeafDL" Offset="0xF4C0" />
|
||||
<DList Name="gPinkDekuFlowerFrontLeftPetalDL" Offset="0xF548" />
|
||||
<DList Name="gPinkDekuFlowerRightLeafDL" Offset="0xF5D0" />
|
||||
<DList Name="gPinkDekuFlowerBackRightPetalDL" Offset="0xF658" />
|
||||
<DList Name="gPinkDekuFlowerFrontRightPetalDL" Offset="0xF6E0" />
|
||||
<DList Name="gPinkDekuFlowerFrontLeafDL" Offset="0xF768" />
|
||||
<DList Name="gPinkDekuFlowerBackLeafDL" Offset="0xF7F0" />
|
||||
<Texture Name="gPinkDekuFlowerPetalAndCenterTex" OutName="pink_deku_flower_petal_and_center" Format="rgba16" Width="16" Height="32" Offset="0xF878" />
|
||||
<Texture Name="gPinkDekuFlowerLeafAndCenterTex" OutName="pink_deku_flower_leaf_and_center" Format="rgba16" Width="16" Height="32" Offset="0xFC78" />
|
||||
<Texture Name="gPinkDekuFlowerBaseLeafTex" OutName="pink_deku_flower_base_leaf" Format="rgba16" Width="32" Height="32" Offset="0x10078" />
|
||||
<Texture Name="gGoldDekuFlowerPetalAndCenterTex" OutName="gold_deku_flower_petal_and_center" Format="rgba16" Width="16" Height="32" Offset="0x10878" />
|
||||
<Texture Name="gGoldDekuFlowerBaseLeafTex" OutName="gold_deku_flower_base_leaf" Format="rgba16" Width="32" Height="32" Offset="0x10C78" />
|
||||
<Limb Name="gPinkDekuFlowerBaseLimb" Type="Standard" Offset="0x11478" />
|
||||
<Limb Name="gPinkDekuFlowerCenterLimb" Type="Standard" Offset="0x11484" />
|
||||
<Limb Name="gPinkDekuFlowerBackLeafLimb" Type="Standard" Offset="0x11490" />
|
||||
<Limb Name="gPinkDekuFlowerFrontLeafLimb" Type="Standard" Offset="0x1149C" />
|
||||
<Limb Name="gPinkDekuFlowerFrontRightPetalLimb" Type="Standard" Offset="0x114A8" />
|
||||
<Limb Name="gPinkDekuFlowerBackRightPetalLimb" Type="Standard" Offset="0x114B4" />
|
||||
<Limb Name="gPinkDekuFlowerRightLeafLimb" Type="Standard" Offset="0x114C0" />
|
||||
<Limb Name="gPinkDekuFlowerFrontLeftPetalLimb" Type="Standard" Offset="0x114CC" />
|
||||
<Limb Name="gPinkDekuFlowerLeftLeafLimb" Type="Standard" Offset="0x114D8" />
|
||||
<Limb Name="gPinkDekuFlowerBackLeftPetalLimb" Type="Standard" Offset="0x114E4" />
|
||||
<Skeleton Name="gPinkDekuFlowerSkel" Type="Normal" LimbType="Standard" Offset="0x11518" />
|
||||
<Animation Name="gDekuFlowerRustleAnim" Offset="0x117A8" /> <!-- Original name is "dnp_zawa" ("rustling") -->
|
||||
<Collision Name="gGoldDekuFlowerCol" Offset="0x118D8" />
|
||||
<DList Name="gGoldDekuFlowerIdleDL" Offset="0x11BD0" />
|
||||
<DList Name="gGoldDekuFlowerBaseDL" Offset="0x121B0" />
|
||||
<DList Name="gGoldDekuFlowerCenterDL" Offset="0x12260" />
|
||||
<DList Name="gGoldDekuFlowerBackLeftPetalDL" Offset="0x12308" />
|
||||
<DList Name="gGoldDekuFlowerLeftPetalDL" Offset="0x12390" />
|
||||
<DList Name="gGoldDekuFlowerFrontLeftPetalDL" Offset="0x12418" />
|
||||
<DList Name="gGoldDekuFlowerRightPetalDL" Offset="0x124A0" />
|
||||
<DList Name="gGoldDekuFlowerBackRightPetalDL" Offset="0x12528" />
|
||||
<DList Name="gGoldDekuFlowerFrontRightPetalDL" Offset="0x125B0" />
|
||||
<DList Name="gGoldDekuFlowerFrontPetalDL" Offset="0x12638" />
|
||||
<DList Name="gGoldDekuFlowerBackPetalDL" Offset="0x126C0" />
|
||||
<Limb Name="gGoldDekuFlowerBaseLimb" Type="Standard" Offset="0x12748" />
|
||||
<Limb Name="gGoldDekuFlowerCenterLimb" Type="Standard" Offset="0x12754" />
|
||||
<Limb Name="gGoldDekuFlowerBackPetalLimb" Type="Standard" Offset="0x12760" />
|
||||
<Limb Name="gGoldDekuFlowerFrontPetalLimb" Type="Standard" Offset="0x1276C" />
|
||||
<Limb Name="gGoldDekuFlowerFrontRightPetalLimb" Type="Standard" Offset="0x12778" />
|
||||
<Limb Name="gGoldDekuFlowerBackRightPetalLimb" Type="Standard" Offset="0x12784" />
|
||||
<Limb Name="gGoldDekuFlowerRightPetalLimb" Type="Standard" Offset="0x12790" />
|
||||
<Limb Name="gGoldDekuFlowerFrontLeftPetalLimb" Type="Standard" Offset="0x1279C" />
|
||||
<Limb Name="gGoldDekuFlowerLeftPetalLimb" Type="Standard" Offset="0x127A8" />
|
||||
<Limb Name="gGoldDekuFlowerBackLeftPetalLimb" Type="Standard" Offset="0x127B4" />
|
||||
<Skeleton Name="gGoldDekuFlowerSkel" Type="Flex" LimbType="Standard" Offset="0x127E8" />
|
||||
|
||||
<Animation Name="gameplay_keep_Anim_012860" Offset="0x12860" />
|
||||
<Animation Name="gameplay_keep_Anim_0128BC" Offset="0x128BC" />
|
||||
<Texture Name="gameplay_keep_Tex_0128D0" OutName="tex_0128D0" Format="rgba16" Width="16" Height="128" Offset="0x128D0" />
|
||||
@@ -863,7 +866,7 @@
|
||||
<Texture Name="gameplay_keep_Tex_01EAF8" OutName="tex_01EAF8" Format="rgba16" Width="16" Height="16" Offset="0x1EAF8" />
|
||||
<DList Name="gameplay_keep_DL_01ED00" Offset="0x1ED00" />
|
||||
<DList Name="gameplay_keep_DL_01ED90" Offset="0x1ED90" />
|
||||
<DList Name="gameplay_keep_DL_01F0F0" Offset="0x1F0F0" />
|
||||
<DList Name="gZTargetArrowDL" Offset="0x1F0F0" />
|
||||
<Texture Name="gameplay_keep_Tex_01F200" OutName="tex_01F200" Format="i8" Width="8" Height="8" Offset="0x1F200" />
|
||||
<DList Name="gameplay_keep_DL_01F300" Offset="0x1F300" />
|
||||
<Texture Name="gameplay_keep_Tex_01F340" OutName="tex_01F340" Format="ia8" Width="32" Height="32" Offset="0x1F340" />
|
||||
@@ -939,36 +942,39 @@
|
||||
<Limb Name="gameplay_keep_Standardlimb_02AF34" Type="Standard" Offset="0x2AF34" />
|
||||
<Skeleton Name="gameplay_keep_Skel_02AF58" Type="Flex" LimbType="Standard" Offset="0x2AF58" />
|
||||
<Animation Name="gameplay_keep_Anim_02B2E8" Offset="0x2B2E8" />
|
||||
<Animation Name="gameplay_keep_Anim_02B494" Offset="0x2B494" />
|
||||
<DList Name="gameplay_keep_DL_02B6B0" Offset="0x2B6B0" />
|
||||
<DList Name="gameplay_keep_DL_02B748" Offset="0x2B748" />
|
||||
<DList Name="gameplay_keep_DL_02B7E0" Offset="0x2B7E0" />
|
||||
<DList Name="gameplay_keep_DL_02B888" Offset="0x2B888" />
|
||||
<DList Name="gameplay_keep_DL_02B920" Offset="0x2B920" />
|
||||
<DList Name="gameplay_keep_DL_02B9B8" Offset="0x2B9B8" />
|
||||
<DList Name="gameplay_keep_DL_02BA68" Offset="0x2BA68" />
|
||||
<DList Name="gameplay_keep_DL_02BB00" Offset="0x2BB00" />
|
||||
<DList Name="gameplay_keep_DL_02BB98" Offset="0x2BB98" />
|
||||
<Texture Name="gameplay_keep_Tex_02BC30" OutName="tex_02BC30" Format="ia8" Width="32" Height="32" Offset="0x2BC30" />
|
||||
<Texture Name="gameplay_keep_Tex_02C030" OutName="tex_02C030" Format="ia8" Width="16" Height="32" Offset="0x2C030" />
|
||||
<Texture Name="gameplay_keep_Tex_02C230" OutName="tex_02C230" Format="ia8" Width="32" Height="32" Offset="0x2C230" />
|
||||
<Texture Name="gameplay_keep_Tex_02C630" OutName="tex_02C630" Format="ia8" Width="16" Height="16" Offset="0x2C630" />
|
||||
<Texture Name="gameplay_keep_Tex_02C730" OutName="tex_02C730" Format="i4" Width="16" Height="16" Offset="0x2C730" />
|
||||
<TextureAnimation Name="gameplay_keep_Matanimheader_02C818" Offset="0x2C818" />
|
||||
<TextureAnimation Name="gameplay_keep_Matanimheader_02C890" Offset="0x2C890" />
|
||||
<TextureAnimation Name="gameplay_keep_Matanimheader_02C908" Offset="0x2C908" />
|
||||
<TextureAnimation Name="gameplay_keep_Matanimheader_02C980" Offset="0x2C980" />
|
||||
<TextureAnimation Name="gameplay_keep_Matanimheader_02C9F8" Offset="0x2C9F8" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_02CA08" Type="Standard" Offset="0x2CA08" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_02CA14" Type="Standard" Offset="0x2CA14" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_02CA20" Type="Standard" Offset="0x2CA20" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_02CA2C" Type="Standard" Offset="0x2CA2C" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_02CA38" Type="Standard" Offset="0x2CA38" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_02CA44" Type="Standard" Offset="0x2CA44" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_02CA50" Type="Standard" Offset="0x2CA50" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_02CA5C" Type="Standard" Offset="0x2CA5C" />
|
||||
<Limb Name="gameplay_keep_Standardlimb_02CA68" Type="Standard" Offset="0x2CA68" />
|
||||
<Skeleton Name="gameplay_keep_Skel_02CA98" Type="Flex" LimbType="Standard" Offset="0x2CA98" />
|
||||
|
||||
<!-- Stray Fairy -->
|
||||
<Animation Name="gStrayFairyFlyingAnim" Offset="0x2B494" /> <!-- Original name is "ys_fly01" -->
|
||||
<DList Name="gStrayFairyRightFacingHeadDL" Offset="0x2B6B0" />
|
||||
<DList Name="gStrayFairyLeftFacingHeadDL" Offset="0x2B748" />
|
||||
<DList Name="gStrayFairyGlowDL" Offset="0x2B7E0" />
|
||||
<DList Name="gStrayFairyTorsoDL" Offset="0x2B888" />
|
||||
<DList Name="gStrayFairyLeftArmDL" Offset="0x2B920" />
|
||||
<DList Name="gStrayFairyPelvisAndLegsDL" Offset="0x2B9B8" />
|
||||
<DList Name="gStrayFairyRightArmDL" Offset="0x2BA68" />
|
||||
<DList Name="gStrayFairyRightWingDL" Offset="0x2BB00" />
|
||||
<DList Name="gStrayFairyLeftWingDL" Offset="0x2BB98" />
|
||||
<Texture Name="gStrayFairyRightFacingHeadTex" OutName="stray_fairy_right_facing_head" Format="ia8" Width="32" Height="32" Offset="0x2BC30" />
|
||||
<Texture Name="gStrayFairyBodyTex" OutName="stray_fairy_body" Format="ia8" Width="16" Height="32" Offset="0x2C030" />
|
||||
<Texture Name="gStrayFairyLeftFacingHeadTex" OutName="stray_fairy_left_facing_head" Format="ia8" Width="32" Height="32" Offset="0x2C230" />
|
||||
<Texture Name="gStrayFairyWingTex" OutName="stray_fairy_wing" Format="ia8" Width="16" Height="16" Offset="0x2C630" />
|
||||
<Texture Name="gStrayFairyGlowTex" OutName="stray_fairy_glow" Format="i4" Width="16" Height="16" Offset="0x2C730" />
|
||||
<TextureAnimation Name="gStrayFairyClockTownTexAnim" Offset="0x2C818" />
|
||||
<TextureAnimation Name="gStrayFairySnowheadTexAnim" Offset="0x2C890" />
|
||||
<TextureAnimation Name="gStrayFairyWoodfallTexAnim" Offset="0x2C908" />
|
||||
<TextureAnimation Name="gStrayFairyGreatBayTexAnim" Offset="0x2C980" />
|
||||
<TextureAnimation Name="gStrayFairyStoneTowerTexAnim" Offset="0x2C9F8" />
|
||||
<Limb Name="gStrayFairyRightFacingHeadLimb" Type="Standard" Offset="0x2CA08" />
|
||||
<Limb Name="gStrayFairyLeftWingLimb" Type="Standard" Offset="0x2CA14" />
|
||||
<Limb Name="gStrayFairyRightWingLimb" Type="Standard" Offset="0x2CA20" />
|
||||
<Limb Name="gStrayFairyGlowLimb" Type="Standard" Offset="0x2CA2C" />
|
||||
<Limb Name="gStrayFairyTorsoLimb" Type="Standard" Offset="0x2CA38" />
|
||||
<Limb Name="gStrayFairyRightArmLimb" Type="Standard" Offset="0x2CA44" />
|
||||
<Limb Name="gStrayFairyPelvisAndLegsLimb" Type="Standard" Offset="0x2CA50" />
|
||||
<Limb Name="gStrayFairyLeftArmLimb" Type="Standard" Offset="0x2CA5C" />
|
||||
<Limb Name="gStrayFairyLeftFacingHeadLimb" Type="Standard" Offset="0x2CA68" />
|
||||
<Skeleton Name="gStrayFairySkel" Type="Flex" LimbType="Standard" Offset="0x2CA98" />
|
||||
|
||||
<Texture Name="gameplay_keep_Tex_02CAA8" OutName="tex_02CAA8" Format="i4" Width="16" Height="16" Offset="0x2CAA8" />
|
||||
<Texture Name="gameplay_keep_Tex_02CB30" OutName="tex_02CB30" Format="i8" Width="16" Height="16" Offset="0x2CB30" />
|
||||
<Texture Name="gameplay_keep_Tex_02CC30" OutName="tex_02CC30" Format="rgba16" Width="32" Height="32" Offset="0x2CC30" />
|
||||
@@ -1295,13 +1301,13 @@
|
||||
<Texture Name="gameplay_keep_Tex_075000" OutName="tex_075000" Format="i4" Width="32" Height="64" Offset="0x75000" />
|
||||
<Texture Name="gameplay_keep_Tex_075400" OutName="tex_075400" Format="i4" Width="32" Height="64" Offset="0x75400" />
|
||||
<Texture Name="gameplay_keep_Tex_075800" OutName="tex_075800" Format="i4" Width="32" Height="32" Offset="0x75800" />
|
||||
<DList Name="gameplay_keep_DL_075A40" Offset="0x75A40" />
|
||||
<DList Name="gSquareShadowDL" Offset="0x75A40" />
|
||||
<Texture Name="gameplay_keep_Tex_075AA8" OutName="tex_075AA8" Format="i4" Width="16" Height="16" Offset="0x75AA8" />
|
||||
<DList Name="gameplay_keep_DL_075B30" Offset="0x75B30" />
|
||||
<DList Name="gFootShadowDL" Offset="0x75B30" />
|
||||
<Texture Name="gameplay_keep_Tex_075BC0" OutName="tex_075BC0" Format="ia16" Width="32" Height="64" Offset="0x75BC0" />
|
||||
<DList Name="gameplay_keep_DL_076BC0" Offset="0x76BC0" />
|
||||
<DList Name="gCircleShadowDL" Offset="0x76BC0" />
|
||||
<Texture Name="gameplay_keep_Tex_076C40" OutName="tex_076C40" Format="ia16" Width="32" Height="32" Offset="0x76C40" />
|
||||
<DList Name="gameplay_keep_DL_077480" Offset="0x77480" />
|
||||
<DList Name="gHorseShadowDL" Offset="0x77480" />
|
||||
<Texture Name="gameplay_keep_Tex_0774D0" OutName="tex_0774D0" Format="i8" Width="16" Height="64" Offset="0x774D0" />
|
||||
<DList Name="gameplay_keep_DL_077990" Offset="0x77990" />
|
||||
<Texture Name="gameplay_keep_Tex_077A40" OutName="tex_077A40" Format="ia8" Width="32" Height="128" Offset="0x77A40" />
|
||||
@@ -1316,7 +1322,7 @@
|
||||
<DList Name="gameplay_keep_DL_07AB10" Offset="0x7AB10" />
|
||||
<DList Name="gameplay_keep_DL_07AB58" Offset="0x7AB58" />
|
||||
<DList Name="gameplay_keep_DL_07AB70" Offset="0x7AB70" />
|
||||
<DList Name="gameplay_keep_DL_07AE00" Offset="0x7AE00" />
|
||||
<DList Name="gZTargetLockOnTriangleDL" Offset="0x7AE00" />
|
||||
<DList Name="gameplay_keep_DL_07AFB0" Offset="0x7AFB0" />
|
||||
<DList Name="gameplay_keep_DL_07B0B8" Offset="0x7B0B8" />
|
||||
<Texture Name="gameplay_keep_Tex_07B0C0" OutName="tex_07B0C0" Format="i8" Width="64" Height="64" Offset="0x7B0C0" />
|
||||
@@ -1324,11 +1330,11 @@
|
||||
<DList Name="gameplay_keep_DL_07D260" Offset="0x7D260" />
|
||||
<DList Name="gameplay_keep_DL_07D348" Offset="0x7D348" />
|
||||
<Texture Name="gameplay_keep_Tex_07D350" OutName="tex_07D350" Format="i8" Width="16" Height="32" Offset="0x7D350" />
|
||||
<DList Name="gameplay_keep_DL_07D590" Offset="0x7D590" />
|
||||
<DList Name="gGameplayKeepDrawFlameDL" Offset="0x7D590" />
|
||||
<DList Name="gameplay_keep_DL_07D650" Offset="0x7D650" />
|
||||
<Texture Name="gameplay_keep_Tex_07D710" OutName="tex_07D710" Format="i4" Width="32" Height="64" Offset="0x7D710" />
|
||||
<Texture Name="gGameplayKeepFlameRippleTex" OutName="gameplay_keep_flame_ripple" Format="i4" Width="32" Height="64" Offset="0x7D710" />
|
||||
<Texture Name="gameplay_keep_Tex_07DB10" OutName="tex_07DB10" Format="i4" Width="32" Height="64" Offset="0x7DB10" />
|
||||
<Texture Name="gameplay_keep_Tex_07DF10" OutName="tex_07DF10" Format="i8" Width="32" Height="64" Offset="0x7DF10" />
|
||||
<Texture Name="gGameplayKeepFlameOutlineTex" OutName="gameplay_keep_flame_outline" Format="i8" Width="32" Height="64" Offset="0x7DF10" />
|
||||
<DList Name="gameplay_keep_DL_07E8C0" Offset="0x7E8C0" />
|
||||
<Texture Name="gameplay_keep_Tex_07EA08" OutName="tex_07EA08" Format="i8" Width="32" Height="64" Offset="0x7EA08" />
|
||||
<TextureAnimation Name="gameplay_keep_Matanimheader_07F218" Offset="0x7F218" />
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
<Texture Name="object_aob_Tex_0004D8" OutName="tex_0004D8" Format="ci8" Width="16" Height="16" Offset="0x4D8" />
|
||||
<Texture Name="object_aob_Tex_0005D8" OutName="tex_0005D8" Format="ci8" Width="8" Height="8" Offset="0x5D8" />
|
||||
<Texture Name="object_aob_Tex_000618" OutName="tex_000618" Format="ci8" Width="8" Height="8" Offset="0x618" />
|
||||
<Texture Name="object_aob_TEx_000658" OutName="tex_000658" Format="rgba16" Width="32" Height="32" Offset="0x658" />
|
||||
<Texture Name="object_aob_TEx_000E58" OutName="tex_000E58" Format="rgba16" Width="32" Height="32" Offset="0xE58" />
|
||||
<Texture Name="object_aob_TEx_001658" OutName="tex_001658" Format="rgba16" Width="32" Height="32" Offset="0x1658" />
|
||||
<Texture Name="object_aob_Tex_000658" OutName="tex_000658" Format="rgba16" Width="32" Height="32" Offset="0x658" />
|
||||
<Texture Name="object_aob_Tex_000E58" OutName="tex_000E58" Format="rgba16" Width="32" Height="32" Offset="0xE58" />
|
||||
<Texture Name="object_aob_Tex_001658" OutName="tex_001658" Format="rgba16" Width="32" Height="32" Offset="0x1658" />
|
||||
<Texture Name="object_aob_Tex_001E58" OutName="tex_001E58" Format="ci8" Width="16" Height="16" Offset="0x1E58" />
|
||||
<Texture Name="object_aob_Tex_001F58" OutName="tex_001F58" Format="ci8" Width="8" Height="8" Offset="0x1F58" />
|
||||
<Texture Name="object_aob_Tex_001F98" OutName="tex_001F98" Format="ci8" Width="8" Height="8" Offset="0x1F98" />
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
<Root>
|
||||
<File Name="object_bigpo" Segment="6">
|
||||
<Animation Name="object_bigpo_Anim_000158" Offset="0x158" />
|
||||
<Animation Name="object_bigpo_Anim_000454" Offset="0x454" />
|
||||
<Animation Name="object_bigpo_Anim_000608" Offset="0x608" />
|
||||
<Animation Name="object_bigpo_Anim_000924" Offset="0x924" />
|
||||
<Animation Name="object_bigpo_Anim_000F9C" Offset="0xF9C" />
|
||||
<Animation Name="object_bigpo_Anim_001360" Offset="0x1360" />
|
||||
<Texture Name="object_bigpo_Tex_001370" OutName="tex_001370" Format="i8" Width="32" Height="64" Offset="0x1370" />
|
||||
<DList Name="object_bigpo_DL_001BB0" Offset="0x1BB0" />
|
||||
<Texture Name="object_bigpo_Tex_001C70" OutName="tex_001C70" Format="rgba16" Width="16" Height="16" Offset="0x1C70" />
|
||||
<Texture Name="object_bigpo_Tex_001E70" OutName="tex_001E70" Format="rgba16" Width="16" Height="16" Offset="0x1E70" />
|
||||
<Texture Name="object_bigpo_Tex_002070" OutName="tex_002070" Format="rgba16" Width="32" Height="32" Offset="0x2070" />
|
||||
<Texture Name="object_bigpo_Tex_002870" OutName="tex_002870" Format="rgba16" Width="16" Height="16" Offset="0x2870" />
|
||||
<Texture Name="object_bigpo_Tex_002A70" OutName="tex_002A70" Format="rgba16" Width="8" Height="8" Offset="0x2A70" />
|
||||
<Texture Name="object_bigpo_Tex_002AF0" OutName="tex_002AF0" Format="rgba16" Width="16" Height="8" Offset="0x2AF0" />
|
||||
<Texture Name="object_bigpo_Tex_002BF0" OutName="tex_002BF0" Format="rgba16" Width="16" Height="16" Offset="0x2BF0" />
|
||||
<Texture Name="object_bigpo_Tex_002DF0" OutName="tex_002DF0" Format="rgba16" Width="16" Height="16" Offset="0x2DF0" />
|
||||
<Animation Name="gBigpoSwingLampAttackAnim" Offset="0x158" />
|
||||
<Animation Name="gBigpoShockAnim" Offset="0x454" />
|
||||
<Animation Name="gBigpoBackpeddleAnim" Offset="0x608" />
|
||||
<Animation Name="gBigpoFloatAnim" Offset="0x924" />
|
||||
<Animation Name="gBigpoAwakenSpawnAnim" Offset="0xF9C" />
|
||||
<Animation Name="gBigpoAwakenStretchAnim" Offset="0x1360" />
|
||||
<Texture Name="gBigpoSoulFace" OutName="bigpo_soul_face" Format="i8" Width="32" Height="64" Offset="0x1370" />
|
||||
<DList Name="gBigpoDrawSoulDL" Offset="0x1BB0" />
|
||||
<Texture Name="gBigpoNecklaceSkullHalfTex" OutName="bigpo_skull_necklace" Format="rgba16" Width="16" Height="16" Offset="0x1C70" />
|
||||
<Texture Name="gBigpoLanternGlassTex" OutName="bigpo_lantern_glass" Format="rgba16" Width="16" Height="16" Offset="0x1E70" />
|
||||
<Texture Name="gBigpoTornRobeTex" OutName="bigpo_torn_robe" Format="rgba16" Width="32" Height="32" Offset="0x2070" />
|
||||
<Texture Name="gBigpoArmSectionTex" OutName="bigpo_arm_section" Format="rgba16" Width="16" Height="16" Offset="0x2870" />
|
||||
<Texture Name="gBigpoHoodEdge" OutName="bigpo_hood_edge" Format="rgba16" Width="8" Height="8" Offset="0x2A70" />
|
||||
<Texture Name="gBigpoNecklaceBeadsTex" OutName="bigpo_necklace_beads" Format="rgba16" Width="16" Height="8" Offset="0x2AF0" />
|
||||
<Texture Name="gBigpoShawlTex" OutName="bigpo_shawl" Format="rgba16" Width="16" Height="16" Offset="0x2BF0" />
|
||||
<Texture Name="gBigpoGlowingEyeTex" OutName="bigpo_glowing_eye" Format="rgba16" Width="16" Height="16" Offset="0x2DF0" />
|
||||
<!-- <Blob Name="object_bigpo_Blob_003200" Size="0x350" Offset="0x3200" /> -->
|
||||
<!-- <Blob Name="object_bigpo_Blob_003790" Size="0x370" Offset="0x3790" /> -->
|
||||
<DList Name="object_bigpo_DL_0041A0" Offset="0x41A0" />
|
||||
<DList Name="object_bigpo_DL_0042C8" Offset="0x42C8" />
|
||||
<DList Name="object_bigpo_DL_0043F8" Offset="0x43F8" />
|
||||
<DList Name="object_bigpo_DL_004488" Offset="0x4488" />
|
||||
<DList Name="object_bigpo_DL_004538" Offset="0x4538" />
|
||||
<DList Name="object_bigpo_DL_0045D8" Offset="0x45D8" />
|
||||
<DList Name="object_bigpo_DL_004680" Offset="0x4680" />
|
||||
<DList Name="object_bigpo_DL_004768" Offset="0x4768" />
|
||||
<DList Name="object_bigpo_DL_004808" Offset="0x4808" />
|
||||
<DList Name="object_bigpo_DL_004AE8" Offset="0x4AE8" />
|
||||
<DList Name="object_bigpo_DL_004BD8" Offset="0x4BD8" />
|
||||
<Texture Name="object_bigpo_Tex_004C98" OutName="tex_004C98" Format="rgba16" Width="16" Height="16" Offset="0x4C98" />
|
||||
<Texture Name="object_bigpo_Tex_004E98" OutName="tex_004E98" Format="rgba16" Width="8" Height="8" Offset="0x4E98" />
|
||||
<DList Name="object_bigpo_DL_0058B8" Offset="0x58B8" />
|
||||
<Limb Name="object_bigpo_Standardlimb_005B88" Type="Standard" Offset="0x5B88" />
|
||||
<Limb Name="object_bigpo_Standardlimb_005B94" Type="Standard" Offset="0x5B94" />
|
||||
<Limb Name="object_bigpo_Standardlimb_005BA0" Type="Standard" Offset="0x5BA0" />
|
||||
<Limb Name="object_bigpo_Standardlimb_005BAC" Type="Standard" Offset="0x5BAC" />
|
||||
<Limb Name="object_bigpo_Standardlimb_005BB8" Type="Standard" Offset="0x5BB8" />
|
||||
<Limb Name="object_bigpo_Standardlimb_005BC4" Type="Standard" Offset="0x5BC4" />
|
||||
<Limb Name="object_bigpo_Standardlimb_005BD0" Type="Standard" Offset="0x5BD0" />
|
||||
<Limb Name="object_bigpo_Standardlimb_005BDC" Type="Standard" Offset="0x5BDC" />
|
||||
<Limb Name="object_bigpo_Standardlimb_005BE8" Type="Standard" Offset="0x5BE8" />
|
||||
<Skeleton Name="object_bigpo_Skel_005C18" Type="Normal" LimbType="Standard" Offset="0x5C18" />
|
||||
<DList Name="gBigpoDrawLanternFallingDL" Offset="0x41A0" />
|
||||
<DList Name="gBigpoDrawLanternMainDL" Offset="0x42C8" />
|
||||
<DList Name="gBigpoDrawLanternPurpleTopDL" Offset="0x43F8" />
|
||||
<DList Name="gBigpoDrawHandDL" Offset="0x4488" />
|
||||
<DList Name="gBigpoDrawSmallArmDL" Offset="0x4538" />
|
||||
<DList Name="gBigpoDrawBigArmDL" Offset="0x45D8" />
|
||||
<DList Name="gBigpoDrawArmAndGrowthDL" Offset="0x4680" />
|
||||
<DList Name="gBigpoDrawMediumArmDL" Offset="0x4768" />
|
||||
<DList Name="gBigpoDrawNecklaceHoodShawlDL" Offset="0x4808" />
|
||||
<DList Name="gBigpoDrawFaceDL" Offset="0x4AE8" />
|
||||
<DList Name="gBigpoDrawLowerRobeDL" Offset="0x4BD8" />
|
||||
<Texture Name="gBigpoCrispyPiecesTex" OutName="bigpo_crispy_pieces" Format="rgba16" Width="16" Height="16" Offset="0x4C98" />
|
||||
<Texture Name="gBigpoCrispyEyesTex" OutName="bigpo_crispy_eyes" Format="rgba16" Width="8" Height="8" Offset="0x4E98" />
|
||||
<DList Name="gBigpoDrawCrispyBodyDL" Offset="0x58B8" />
|
||||
<Limb Name="gBigpoFaceLimb" Type="Standard" Offset="0x5B88" />
|
||||
<Limb Name="gBigpoLeftArmUpperLimb" Type="Standard" Offset="0x5B94" />
|
||||
<Limb Name="gBigpoLeftForarmLimb" Type="Standard" Offset="0x5BA0" />
|
||||
<Limb Name="gBigpoRightArmUpperLimb" Type="Standard" Offset="0x5BAC" />
|
||||
<Limb Name="gBigpoRightForarmLimb" Type="Standard" Offset="0x5BB8" />
|
||||
<Limb Name="gBigpoRightHandLimb" Type="Standard" Offset="0x5BC4" />
|
||||
<Limb Name="gBigpoLanternLimb" Type="Standard" Offset="0x5BD0" />
|
||||
<Limb Name="gBigpoHatAndCloakLimb" Type="Standard" Offset="0x5BDC" />
|
||||
<Limb Name="gBigpoLowerRobe" Type="Standard" Offset="0x5BE8" />
|
||||
<Skeleton Name="gBigpoSkeleton" Type="Normal" LimbType="Standard" Offset="0x5C18" />
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -1,114 +1,130 @@
|
||||
<Root>
|
||||
<File Name="object_bigslime" Segment="6">
|
||||
<Animation Name="object_bigslime_Anim_000994" Offset="0x994" />
|
||||
<Animation Name="object_bigslime_Anim_0010F4" Offset="0x10F4" />
|
||||
<Animation Name="object_bigslime_Anim_001B08" Offset="0x1B08" />
|
||||
<Animation Name="object_bigslime_Anim_001E14" Offset="0x1E14" />
|
||||
<Animation Name="object_bigslime_Anim_001F20" Offset="0x1F20" />
|
||||
<Animation Name="object_bigslime_Anim_00225C" Offset="0x225C" />
|
||||
<Animation Name="object_bigslime_Anim_00276C" Offset="0x276C" />
|
||||
<Animation Name="object_bigslime_Anim_002E0C" Offset="0x2E0C" />
|
||||
<Animation Name="object_bigslime_Anim_0030E4" Offset="0x30E4" />
|
||||
<Animation Name="object_bigslime_Anim_00347C" Offset="0x347C" />
|
||||
<Animation Name="object_bigslime_Anim_0039C4" Offset="0x39C4" />
|
||||
<Animation Name="object_bigslime_Anim_003F28" Offset="0x3F28" />
|
||||
<Animation Name="object_bigslime_Anim_004298" Offset="0x4298" />
|
||||
<Animation Name="object_bigslime_Anim_004680" Offset="0x4680" />
|
||||
<Animation Name="object_bigslime_Anim_004894" Offset="0x4894" />
|
||||
<Animation Name="object_bigslime_Anim_004D50" Offset="0x4D50" />
|
||||
<Animation Name="object_bigslime_Anim_0050B8" Offset="0x50B8" />
|
||||
<Animation Name="object_bigslime_Anim_0052EC" Offset="0x52EC" />
|
||||
<Animation Name="object_bigslime_Anim_005694" Offset="0x5694" />
|
||||
<Animation Name="object_bigslime_Anim_005D54" Offset="0x5D54" />
|
||||
<Animation Name="object_bigslime_Anim_0066B4" Offset="0x66B4" />
|
||||
<Animation Name="object_bigslime_Anim_0069FC" Offset="0x69FC" />
|
||||
<Animation Name="object_bigslime_Anim_0070C4" Offset="0x70C4" />
|
||||
<Animation Name="object_bigslime_Anim_007790" Offset="0x7790" />
|
||||
<DList Name="object_bigslime_DL_009D90" Offset="0x9D90" />
|
||||
<DList Name="object_bigslime_DL_009FF0" Offset="0x9FF0" />
|
||||
<DList Name="object_bigslime_DL_00A250" Offset="0xA250" />
|
||||
<DList Name="object_bigslime_DL_00A510" Offset="0xA510" />
|
||||
<DList Name="object_bigslime_DL_00AAF8" Offset="0xAAF8" />
|
||||
<DList Name="object_bigslime_DL_00ABB0" Offset="0xABB0" />
|
||||
<DList Name="object_bigslime_DL_00AC78" Offset="0xAC78" />
|
||||
<DList Name="object_bigslime_DL_00AD88" Offset="0xAD88" />
|
||||
<DList Name="object_bigslime_DL_00AE98" Offset="0xAE98" />
|
||||
<DList Name="object_bigslime_DL_00AF50" Offset="0xAF50" />
|
||||
<DList Name="object_bigslime_DL_00B030" Offset="0xB030" />
|
||||
<DList Name="object_bigslime_DL_00B140" Offset="0xB140" />
|
||||
<DList Name="object_bigslime_DL_00B250" Offset="0xB250" />
|
||||
<DList Name="object_bigslime_DL_00B4D8" Offset="0xB4D8" />
|
||||
<DList Name="object_bigslime_DL_00B660" Offset="0xB660" />
|
||||
<DList Name="object_bigslime_DL_00B770" Offset="0xB770" />
|
||||
<DList Name="object_bigslime_DL_00B880" Offset="0xB880" />
|
||||
<DList Name="object_bigslime_DL_00B9A8" Offset="0xB9A8" />
|
||||
<DList Name="object_bigslime_DL_00BB30" Offset="0xBB30" />
|
||||
<DList Name="object_bigslime_DL_00BC40" Offset="0xBC40" />
|
||||
<DList Name="object_bigslime_DL_00BD50" Offset="0xBD50" />
|
||||
<DList Name="object_bigslime_DL_00BE78" Offset="0xBE78" />
|
||||
<Texture Name="object_bigslime_TLUT_00C028" OutName="tlut_00C028" Format="rgba16" Width="16" Height="16" Offset="0xC028" />
|
||||
<Texture Name="object_bigslime_TLUT_00C228" OutName="tlut_00C228" Format="rgba16" Width="16" Height="16" Offset="0xC228" />
|
||||
<Texture Name="object_bigslime_TLUT_00C428" OutName="tlut_00C428" Format="rgba16" Width="16" Height="16" Offset="0xC428" />
|
||||
<Texture Name="object_bigslime_Tex_00C628" OutName="tex_00C628" Format="rgba16" Width="8" Height="8" Offset="0xC628" />
|
||||
<Texture Name="object_bigslime_Tex_00C6A8" OutName="tex_00C6A8" Format="rgba16" Width="16" Height="16" Offset="0xC6A8" />
|
||||
<Texture Name="object_bigslime_Tex_00C8A8" OutName="tex_00C8A8" Format="rgba16" Width="16" Height="16" Offset="0xC8A8" />
|
||||
<Texture Name="object_bigslime_Tex_00CAA8" OutName="tex_00CAA8" Format="rgba16" Width="16" Height="32" Offset="0xCAA8" />
|
||||
<Texture Name="object_bigslime_Tex_00CEA8" OutName="tex_00CEA8" Format="ci8" Width="16" Height="32" Offset="0xCEA8" />
|
||||
<Texture Name="object_bigslime_Tex_00D0A8" OutName="tex_00D0A8" Format="rgba16" Width="16" Height="16" Offset="0xD0A8" />
|
||||
<Texture Name="object_bigslime_Tex_00D2A8" OutName="tex_00D2A8" Format="rgba16" Width="16" Height="8" Offset="0xD2A8" />
|
||||
<Texture Name="object_bigslime_Tex_00D3A8" OutName="tex_00D3A8" Format="rgba16" Width="8" Height="8" Offset="0xD3A8" />
|
||||
<Texture Name="object_bigslime_Tex_00D428" OutName="tex_00D428" Format="rgba16" Width="32" Height="16" Offset="0xD428" />
|
||||
<Texture Name="object_bigslime_Tex_00D828" OutName="tex_00D828" Format="ci8" Width="32" Height="32" Offset="0xD828" />
|
||||
<Texture Name="object_bigslime_Tex_00DC28" OutName="tex_00DC28" Format="ci8" Width="16" Height="32" Offset="0xDC28" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DE28" Type="Standard" Offset="0xDE28" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DE34" Type="Standard" Offset="0xDE34" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DE40" Type="Standard" Offset="0xDE40" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DE4C" Type="Standard" Offset="0xDE4C" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DE58" Type="Standard" Offset="0xDE58" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DE64" Type="Standard" Offset="0xDE64" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DE70" Type="Standard" Offset="0xDE70" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DE7C" Type="Standard" Offset="0xDE7C" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DE88" Type="Standard" Offset="0xDE88" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DE94" Type="Standard" Offset="0xDE94" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DEA0" Type="Standard" Offset="0xDEA0" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DEAC" Type="Standard" Offset="0xDEAC" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DEB8" Type="Standard" Offset="0xDEB8" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DEC4" Type="Standard" Offset="0xDEC4" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DED0" Type="Standard" Offset="0xDED0" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DEDC" Type="Standard" Offset="0xDEDC" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DEE8" Type="Standard" Offset="0xDEE8" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DEF4" Type="Standard" Offset="0xDEF4" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DF00" Type="Standard" Offset="0xDF00" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DF0C" Type="Standard" Offset="0xDF0C" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DF18" Type="Standard" Offset="0xDF18" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DF24" Type="Standard" Offset="0xDF24" />
|
||||
<Limb Name="object_bigslime_Standardlimb_00DF30" Type="Standard" Offset="0xDF30" />
|
||||
<Skeleton Name="object_bigslime_Skel_00DF98" Type="Flex" LimbType="Standard" Offset="0xDF98" />
|
||||
<Animation Name="object_bigslime_Anim_00F048" Offset="0xF048" />
|
||||
<Animation Name="object_bigslime_Anim_00F3F0" Offset="0xF3F0" />
|
||||
<Animation Name="object_bigslime_Anim_00F990" Offset="0xF990" />
|
||||
<DList Name="object_bigslime_DL_00F9D0" Offset="0xF9D0" />
|
||||
<DList Name="object_bigslime_DL_00FB40" Offset="0xFB40" />
|
||||
<Texture Name="object_bigslime_Tex_00FC28" OutName="tex_00FC28" Format="i4" Width="32" Height="64" Offset="0xFC28" />
|
||||
<!-- <Blob Name="object_bigslime_zeroes_unk_00010028" Size="0x400" Offset="0x10028" /> -->
|
||||
<Texture Name="object_bigslime_Tex_010428" OutName="tex_010428" Format="i4" Width="16" Height="16" Offset="0x10428" />
|
||||
<!-- <Blob Name="object_bigslime_zeroes_unk_000104A8" Size="0x88" Offset="0x104A8" /> -->
|
||||
<DList Name="object_bigslime_DL_010530" Offset="0x10530" />
|
||||
<DList Name="object_bigslime_DL_0105E8" Offset="0x105E8" />
|
||||
<DList Name="object_bigslime_DL_010B80" Offset="0x10B80" />
|
||||
<TextureAnimation Name="object_bigslime_Matanimheader_010C48" Offset="0x10C48" />
|
||||
<DList Name="object_bigslime_DL_010DB0" Offset="0x10DB0" />
|
||||
<TextureAnimation Name="object_bigslime_Matanimheader_010EC8" Offset="0x10EC8" />
|
||||
<DList Name="object_bigslime_DL_010F20" Offset="0x10F20" />
|
||||
<DList Name="object_bigslime_DL_010FE0" Offset="0x10FE0" />
|
||||
<TextureAnimation Name="object_bigslime_Matanimheader_011008" Offset="0x11008" />
|
||||
<DList Name="object_bigslime_DL_011050" Offset="0x11050" />
|
||||
<DList Name="object_bigslime_DL_0113B0" Offset="0x113B0" />
|
||||
<Texture Name="object_bigslime_Tex_011580" OutName="tex_011580" Format="i4" Width="16" Height="16" Offset="0x11580" />
|
||||
<Texture Name="object_bigslime_Tex_011600" OutName="tex_011600" Format="i8" Width="32" Height="32" Offset="0x11600" />
|
||||
<Texture Name="object_bigslime_Tex_011A00" OutName="tex_011A00" Format="rgba16" Width="32" Height="32" Offset="0x11A00" />
|
||||
<Texture Name="object_bigslime_Tex_012200" OutName="tex_012200" Format="i4" Width="64" Height="64" Offset="0x12200" />
|
||||
<Texture Name="object_bigslime_Tex_012A00" OutName="tex_012A00" Format="i4" Width="64" Height="64" Offset="0x12A00" />
|
||||
<Texture Name="object_bigslime_Tex_013200" OutName="tex_013200" Format="i4" Width="32" Height="32" Offset="0x13200" />
|
||||
<Animation Name="gGekkoFullFistPumpAnim" Offset="0x994" />
|
||||
<Animation Name="gGekkoSurpriseJumpAnim" Offset="0x10F4" />
|
||||
<Animation Name="gGekkoCallAnim" Offset="0x1B08" />
|
||||
<Animation Name="gGekkoCrawlAnim" Offset="0x1E14" />
|
||||
<Animation Name="gGekkoFallInAirAnim" Offset="0x1F20" />
|
||||
<Animation Name="gGekkoFloorIdleAnim" Offset="0x225C" />
|
||||
<Animation Name="gGekkoDamagedAnim" Offset="0x276C" />
|
||||
<Animation Name="gGekkoJumpUpAnim" Offset="0x2E0C" />
|
||||
<Animation Name="gGekkoRecoverAnim" Offset="0x30E4" />
|
||||
<Animation Name="gGekkoJabPunchAnim" Offset="0x347C" />
|
||||
<Animation Name="gGekkoJumpForwardAnim" Offset="0x39C4" />
|
||||
<Animation Name="gGekkoKickAnim" Offset="0x3F28" />
|
||||
<Animation Name="gGekkoFallOnGroundAnim" Offset="0x4298" />
|
||||
<Animation Name="gGekkoStandingIdleAnim" Offset="0x4680" />
|
||||
<Animation Name="gGekkoJumpOnSnapperAnim" Offset="0x4894" />
|
||||
<Animation Name="gGekkoQuickFistPumpAnim" Offset="0x4D50" />
|
||||
<Animation Name="gGekkoSqueezeAnim" Offset="0x50B8" />
|
||||
<Animation Name="gGekkoLandOnSnapperAnim" Offset="0x52EC" />
|
||||
<Animation Name="gGekkoWiggleAnim" Offset="0x5694" />
|
||||
<Animation Name="gGekkoKnockbackAnim" Offset="0x5D54" />
|
||||
<Animation Name="gGekkoLookAroundAnim" Offset="0x66B4" />
|
||||
<Animation Name="gGekkoNervousIdleAnim" Offset="0x69FC" />
|
||||
<Animation Name="gGekkoHookPunchAnim" Offset="0x70C4" />
|
||||
<Animation Name="gGekkoSwimForwardAnim" Offset="0x7790" />
|
||||
|
||||
<DList Name="gGekkoRightEyeDL" Offset="0x9D90" />
|
||||
<DList Name="gGekkoLeftEyeDL" Offset="0x9FF0" />
|
||||
<DList Name="gGekkoJawDL" Offset="0xA250" />
|
||||
<DList Name="gGekkoHeadDL" Offset="0xA510" />
|
||||
<DList Name="gGekkoRightHandDL" Offset="0xAAF8" />
|
||||
<DList Name="gGekkoRightWristDL" Offset="0xABB0" />
|
||||
<DList Name="gGekkoRightForearmDL" Offset="0xAC78" />
|
||||
<DList Name="gGekkoRightUpperArmDL" Offset="0xAD88" />
|
||||
<DList Name="gGekkoLeftHandDL" Offset="0xAE98" />
|
||||
<DList Name="gGekkoLeftWristDL" Offset="0xAF50" />
|
||||
<DList Name="gGekkoLeftForearmDL" Offset="0xB030" />
|
||||
<DList Name="gGekkoLeftUpperArmDL" Offset="0xB140" />
|
||||
<DList Name="gGekkoTorsoDL" Offset="0xB250" />
|
||||
<DList Name="gGekkoRightFootDL" Offset="0xB4D8" />
|
||||
<DList Name="gGekkoRightAnkleDL" Offset="0xB660" />
|
||||
<DList Name="gGekkoRightShinDL" Offset="0xB770" />
|
||||
<DList Name="gGekkoRightThighDL" Offset="0xB880" />
|
||||
<DList Name="gGekkoLeftFootDL" Offset="0xB9A8" />
|
||||
<DList Name="gGekkoLeftAnkleDL" Offset="0xBB30" />
|
||||
<DList Name="gGekkoLeftShinDL" Offset="0xBC40" />
|
||||
<DList Name="gGekkoLeftThighDL" Offset="0xBD50" />
|
||||
<DList Name="gGekkoWaistDL" Offset="0xBE78" />
|
||||
|
||||
<Texture Name="gGekkoArmLegTLUT" OutName="gekko_arm_leg_tlut" Format="rgba16" Width="16" Height="16" Offset="0xC028" />
|
||||
<Texture Name="gGekkoBodyTLUT" OutName="gekko_body_tlut" Format="rgba16" Width="16" Height="16" Offset="0xC228" />
|
||||
<Texture Name="gGekkoHeadTLUT" OutName="gekko_head_tlut" Format="rgba16" Width="16" Height="16" Offset="0xC428" />
|
||||
|
||||
<Texture Name="gGekkoNostrilTex" OutName="gekko_nostril" Format="rgba16" Width="8" Height="8" Offset="0xC628" />
|
||||
<Texture Name="gGekkoEyeTex" OutName="gekko_eye" Format="rgba16" Width="16" Height="16" Offset="0xC6A8" />
|
||||
<Texture Name="gGekkoSpots1Tex" OutName="gekko_spots_1" Format="rgba16" Width="16" Height="16" Offset="0xC8A8" />
|
||||
<Texture Name="gGekkoBellyTex" OutName="gekko_belly" Format="rgba16" Width="16" Height="32" Offset="0xCAA8" />
|
||||
<Texture Name="gGekkoSpots2Tex" OutName="gekko_spots_2" Format="ci8" Width="16" Height="32" Offset="0xCEA8" />
|
||||
<Texture Name="gGekkoToothTex" OutName="gekko_tooth" Format="rgba16" Width="16" Height="16" Offset="0xD0A8" />
|
||||
<Texture Name="gGekkoMouthTex" OutName="gekko_mouth" Format="rgba16" Width="16" Height="8" Offset="0xD2A8" />
|
||||
<Texture Name="gGekkoEyebrowTex" OutName="gekko_eyebrow" Format="rgba16" Width="8" Height="8" Offset="0xD3A8" />
|
||||
<Texture Name="gGekkoFinTex" OutName="gekko_fin" Format="rgba16" Width="32" Height="16" Offset="0xD428" />
|
||||
<Texture Name="gGekkoSpots3Tex" OutName="gekko_spots_3" Format="ci8" Width="32" Height="32" Offset="0xD828" />
|
||||
<Texture Name="gGekkoSwirlTex" OutName="gekko_swirl" Format="ci8" Width="16" Height="32" Offset="0xDC28" />
|
||||
|
||||
<Limb Name="gGekkoRootLimb" Type="Standard" Offset="0xDE28" />
|
||||
<Limb Name="gGekkoWaistLimb" Type="Standard" Offset="0xDE34" />
|
||||
<Limb Name="gGekkoLeftThighLimb" Type="Standard" Offset="0xDE40" />
|
||||
<Limb Name="gGekkoLeftShinLimb" Type="Standard" Offset="0xDE4C" />
|
||||
<Limb Name="gGekkoLeftAnkleLimb" Type="Standard" Offset="0xDE58" />
|
||||
<Limb Name="gGekkoLeftFootLimb" Type="Standard" Offset="0xDE64" />
|
||||
<Limb Name="gGekkoRightThighLimb" Type="Standard" Offset="0xDE70" />
|
||||
<Limb Name="gGekkoRightShinLimb" Type="Standard" Offset="0xDE7C" />
|
||||
<Limb Name="gGekkoRightAnkleLimb" Type="Standard" Offset="0xDE88" />
|
||||
<Limb Name="gGekkoRightFootLimb" Type="Standard" Offset="0xDE94" />
|
||||
<Limb Name="gGekkoTorsoLimb" Type="Standard" Offset="0xDEA0" />
|
||||
<Limb Name="gGekkoLeftUpperArmLimb" Type="Standard" Offset="0xDEAC" />
|
||||
<Limb Name="gGekkoLeftForearmLimb" Type="Standard" Offset="0xDEB8" />
|
||||
<Limb Name="gGekkoLeftWristLimb" Type="Standard" Offset="0xDEC4" />
|
||||
<Limb Name="gGekkoLeftHandLimb" Type="Standard" Offset="0xDED0" />
|
||||
<Limb Name="gGekkoRightUpperArmLimb" Type="Standard" Offset="0xDEDC" />
|
||||
<Limb Name="gGekkoRightForearmLimb" Type="Standard" Offset="0xDEE8" />
|
||||
<Limb Name="gGekkoRightWristLimb" Type="Standard" Offset="0xDEF4" />
|
||||
<Limb Name="gGekkoRightHandLimb" Type="Standard" Offset="0xDF00" />
|
||||
<Limb Name="gGekkoHeadLimb" Type="Standard" Offset="0xDF0C" />
|
||||
<Limb Name="gGekkoJawLimb" Type="Standard" Offset="0xDF18" />
|
||||
<Limb Name="gGekkoLeftEyeLimb" Type="Standard" Offset="0xDF24" />
|
||||
<Limb Name="gGekkoRightEyeLimb" Type="Standard" Offset="0xDF30" />
|
||||
<Skeleton Name="gGekkoSkel" Type="Flex" LimbType="Standard" Offset="0xDF98" />
|
||||
|
||||
<Animation Name="gGekkoWindupPunchAnim" Offset="0xF048" />
|
||||
<Animation Name="gGekkoSwimUpAnim" Offset="0xF3F0" />
|
||||
<Animation Name="gGekkoBoxingStanceAnim" Offset="0xF990" />
|
||||
|
||||
<DList Name="gBigslimeBubbleDL" Offset="0xF9D0" />
|
||||
<DList Name="gBigslimeShockwaveDL" Offset="0xFB40" />
|
||||
<Texture Name="gBigslimeShockwave1Tex" OutName="bigslime_shockwave_1" Format="i4" Width="32" Height="64" Offset="0xFC28" />
|
||||
<Blob Name="object_bigslime_zeroes_Blob_010028" Size="0x400" Offset="0x10028" />
|
||||
<Texture Name="gBigslimeShockwave2Tex" OutName="bigslime_shockwave_2" Format="i4" Width="16" Height="16" Offset="0x10428" />
|
||||
<Blob Name="object_bigslime_zeroes_Blob_0104A8" Size="0x88" Offset="0x104A8" />
|
||||
|
||||
<DList Name="gBigslimeNormalDL" Offset="0x10530" />
|
||||
|
||||
<!-- Reads vtx from segment 9 set by sBigslimeDynamicVtx -->
|
||||
<DList Name="gBigslimeVtxDL" Offset="0x105E8" />
|
||||
<!-- Reads vtx from segment 9 set by sBigslimeTargetVtx -->
|
||||
<DList Name="gBigslimeFrozenVtxDL" Offset="0x10B80" />
|
||||
|
||||
<TextureAnimation Name="gBigslimeFrozenTexAnim" Offset="0x10C48" />
|
||||
<DList Name="gMinislimeFrozenDL" Offset="0x10DB0" />
|
||||
<TextureAnimation Name="gMinislimeFrozenTexAnim" Offset="0x10EC8" />
|
||||
|
||||
<DList Name="gBigslimeIceShardDL" Offset="0x10F20" />
|
||||
<DList Name="gBigslimeIceShardVtxDL" Offset="0x10FE0" />
|
||||
<TextureAnimation Name="gBigslimeIceShardTexAnim" Offset="0x11008" />
|
||||
|
||||
<DList Name="gBigslimeShadowDL" Offset="0x11050" />
|
||||
<DList Name="gMinislimeNormalDL" Offset="0x113B0" />
|
||||
|
||||
<Texture Name="gBigslimeBubbleTex" OutName="bigslime_bubble" Format="i4" Width="16" Height="16" Offset="0x11580" />
|
||||
<Texture Name="gBigslimeShadowTex" OutName="bigslime_shadow" Format="i8" Width="32" Height="32" Offset="0x11600" />
|
||||
|
||||
<!-- Used also for minislime -->
|
||||
<Texture Name="gBigslimeNormal1Tex" OutName="bigslime_normal_1" Format="rgba16" Width="32" Height="32" Offset="0x11A00" />
|
||||
<Texture Name="gBigslimeNormal2Tex" OutName="bigslime_normal_2" Format="i4" Width="64" Height="64" Offset="0x12200" />
|
||||
<Texture Name="gBigslimeFrozen1Tex" OutName="bigslime_frozen_1" Format="i4" Width="64" Height="64" Offset="0x12A00" />
|
||||
<Texture Name="gBigslimeFrozen2Tex" OutName="bigslime_frozen_2" Format="i4" Width="32" Height="32" Offset="0x13200" />
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -49,18 +49,25 @@
|
||||
<Texture Name="object_cs_Tex_00B9A0" OutName="tex_00B9A0" Format="ci8" Width="8" Height="8" Offset="0xB9A0" />
|
||||
<Texture Name="object_cs_Tex_00B9E0" OutName="tex_00B9E0" Format="ci8" Width="16" Height="16" Offset="0xB9E0" />
|
||||
<Texture Name="object_cs_Tex_00BAE0" OutName="tex_00BAE0" Format="ci8" Width="16" Height="16" Offset="0xBAE0" />
|
||||
<!-- <Blob Name="object_cs_Blob_00BBE0" Size="0x400" Offset="0xBBE0" /> -->
|
||||
<Blob Name="object_cs_Blob_00BBE0" Size="0x400" Offset="0xBBE0" />
|
||||
<Texture Name="object_cs_Tex_00BFE0" OutName="tex_00BFE0" Format="ci8" Width="8" Height="8" Offset="0xBFE0" />
|
||||
<Texture Name="object_cs_Tex_00C020" OutName="tex_00C020" Format="ci8" Width="8" Height="8" Offset="0xC020" />
|
||||
<Texture Name="object_cs_Tex_00C060" OutName="tex_00C060" Format="ci8" Width="8" Height="8" Offset="0xC060" />
|
||||
<Texture Name="object_cs_Tex_00C0A0" OutName="tex_00C0A0" Format="ci8" Width="8" Height="16" Offset="0xC0A0" />
|
||||
<Texture Name="object_cs_Tex_00C120" OutName="tex_00C120" Format="i8" Width="16" Height="16" Offset="0xC120" />
|
||||
<Texture Name="object_cs_Tex_00C220" OutName="tex_00C220" Format="ci8" Width="16" Height="16" Offset="0xC220" />
|
||||
<!-- <Blob Name="object_cs_Blob_00C320" Size="0x1E00" Offset="0xC320" /> -->
|
||||
<Blob Name="object_cs_Blob_00C320" Size="0x200" Offset="0xC320" />
|
||||
<Texture Name="object_cs_Tex_00C520" OutName="tex_00C520" Format="rgba16" Width="32" Height="32" Offset="0xC520" />
|
||||
<Texture Name="object_cs_Tex_00CD20" OutName="tex_00CD20" Format="rgba16" Width="32" Height="32" Offset="0xCD20" />
|
||||
<Texture Name="object_cs_Tex_00D520" OutName="tex_00D520" Format="rgba16" Width="32" Height="32" Offset="0xD520" />
|
||||
<Texture Name="object_cs_Tex_00DD20" OutName="tex_00DD20" Format="i8" Width="32" Height="32" Offset="0xDD20" />
|
||||
<Texture Name="object_cs_Tex_00E120" OutName="tex_00E120" Format="i8" Width="16" Height="16" Offset="0xE120" />
|
||||
<!-- <Blob Name="object_cs_Blob_00E220" Size="0x1400" Offset="0xE220" /> -->
|
||||
<Blob Name="object_cs_Blob_00E220" Size="0x400" Offset="0xE220" />
|
||||
<Texture Name="object_cs_Tex_00E620" OutName="tex_00E620" Format="i8" Width="32" Height="32" Offset="0xE620" />
|
||||
<Texture Name="object_cs_Tex_00EA20" OutName="tex_00EA20" Format="i8" Width="32" Height="32" Offset="0xEA20" />
|
||||
<Texture Name="object_cs_Tex_00EE20" OutName="tex_00EE20" Format="i8" Width="32" Height="32" Offset="0xEE20" />
|
||||
<Texture Name="object_cs_Tex_00F220" OutName="tex_00F220" Format="i8" Width="32" Height="32" Offset="0xF220" />
|
||||
<Texture Name="object_cs_Tex_00F620" OutName="tex_00F620" Format="i8" Width="8" Height="8" Offset="0xF620" />
|
||||
<!-- <Blob Name="object_cs_Blob_00E220" Size="0x1400" Offset="0xE220" /> -->
|
||||
<TextureAnimation Name="object_cs_Matanimheader_00F6E4" Offset="0xF6E4" />
|
||||
<Limb Name="object_cs_Standardlimb_00F6EC" Type="Standard" Offset="0xF6EC" />
|
||||
<Limb Name="object_cs_Standardlimb_00F6F8" Type="Standard" Offset="0xF6F8" />
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<Animation Name="object_dnt_Anim_003438" Offset="0x3438" />
|
||||
<Animation Name="object_dnt_Anim_0038CC" Offset="0x38CC" />
|
||||
<Animation Name="object_dnt_Anim_003CC0" Offset="0x3CC0" />
|
||||
<!-- <Blob Name="object_dnt_Blob_003CD0" Size="0x10" Offset="0x3CD0" /> -->
|
||||
<Blob Name="object_dnt_Blob_003CD0" Size="0x10" Offset="0x3CD0" />
|
||||
<Animation Name="object_dnt_Anim_004700" Offset="0x4700" />
|
||||
<Animation Name="object_dnt_Anim_004AA0" Offset="0x4AA0" />
|
||||
<Animation Name="object_dnt_Anim_004E38" Offset="0x4E38" />
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
<DList Name="object_fall_DL_000428" Offset="0x428" />
|
||||
<DList Name="object_fall_DL_000490" Offset="0x490" />
|
||||
<DList Name="object_fall_DL_000498" Offset="0x498" />
|
||||
<Array Name="object_fall_Vtx_0004C0" Count="209" Offset="0x4C0">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
<DList Name="object_fall_DL_0011D0" Offset="0x11D0" />
|
||||
<Texture Name="object_fall_Tex_001688" OutName="tex_001688" Format="i8" Width="64" Height="64" Offset="0x1688" />
|
||||
<Texture Name="object_fall_Tex_002688" OutName="tex_002688" Format="i4" Width="64" Height="64" Offset="0x2688" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Root>
|
||||
<File Name="object_fish" Segment="6">
|
||||
<Animation Name="object_fish_Anim_00007C" Offset="0x7C" />
|
||||
<Animation Name="gFishingFishAnim" Offset="0x7C" />
|
||||
<DList Name="object_fish_DL_000940" Offset="0x940" />
|
||||
<DList Name="object_fish_DL_0009E8" Offset="0x9E8" />
|
||||
<DList Name="object_fish_DL_000B00" Offset="0xB00" />
|
||||
@@ -35,29 +35,29 @@
|
||||
<Limb Name="object_fish_Standardlimb_002960" Type="Standard" Offset="0x2960" />
|
||||
<Limb Name="object_fish_Standardlimb_00296C" Type="Standard" Offset="0x296C" />
|
||||
<Limb Name="object_fish_Standardlimb_002978" Type="Standard" Offset="0x2978" />
|
||||
<Skeleton Name="object_fish_Skel_0029C0" Type="Flex" LimbType="Standard" Offset="0x29C0" />
|
||||
<Skeleton Name="gFishingFishSkel" Type="Flex" LimbType="Standard" Offset="0x29C0" />
|
||||
<Texture Name="object_fish_Tex_0029D0" OutName="tex_0029D0" Format="rgba16" Width="8" Height="16" Offset="0x29D0" />
|
||||
<Texture Name="object_fish_Tex_002AD0" OutName="tex_002AD0" Format="rgba16" Width="8" Height="8" Offset="0x2AD0" />
|
||||
<DList Name="object_fish_DL_002BD0" Offset="0x2BD0" />
|
||||
<Texture Name="object_fish_Tex_002CE0" OutName="tex_002CE0" Format="i4" Width="32" Height="64" Offset="0x2CE0" />
|
||||
<Texture Name="object_fish_Tex_0030E0" OutName="tex_0030E0" Format="i4" Width="16" Height="16" Offset="0x30E0" />
|
||||
<DList Name="object_fish_DL_003230" Offset="0x3230" />
|
||||
<DList Name="gFishingStreamSplashDL" Offset="0x3230" />
|
||||
<Texture Name="object_fish_Tex_003320" OutName="tex_003320" Format="ia8" Width="16" Height="16" Offset="0x3320" />
|
||||
<DList Name="object_fish_DL_003460" Offset="0x3460" />
|
||||
<DList Name="object_fish_DL_0034C0" Offset="0x34C0" />
|
||||
<DList Name="gFishingBubbleSetupDL" Offset="0x3460" />
|
||||
<DList Name="gFishingBubbleVtxDL" Offset="0x34C0" />
|
||||
<Texture Name="object_fish_Tex_0034E0" OutName="tex_0034E0" Format="i8" Width="16" Height="16" Offset="0x34E0" />
|
||||
<DList Name="object_fish_DL_003610" Offset="0x3610" />
|
||||
<DList Name="object_fish_DL_003680" Offset="0x3680" />
|
||||
<DList Name="gFishingDustSplashSetupDL" Offset="0x3610" />
|
||||
<DList Name="gFishingDustSplashVtxDL" Offset="0x3680" />
|
||||
<DList Name="object_fish_DL_0036E0" Offset="0x36E0" />
|
||||
<DList Name="object_fish_DL_003710" Offset="0x3710" />
|
||||
<DList Name="object_fish_DL_003760" Offset="0x3760" />
|
||||
<DList Name="gFishingLineVtxDL" Offset="0x3710" />
|
||||
<DList Name="gFishingRainDropVtxDL" Offset="0x3760" />
|
||||
<Texture Name="object_fish_Tex_003778" OutName="tex_003778" Format="rgba16" Width="16" Height="16" Offset="0x3778" />
|
||||
<DList Name="object_fish_DL_0039A8" Offset="0x39A8" />
|
||||
<DList Name="object_fish_DL_003A18" Offset="0x3A18" />
|
||||
<Animation Name="object_fish_Anim_00453C" Offset="0x453C" />
|
||||
<DList Name="gFishingRainSplashSetupDL" Offset="0x39A8" />
|
||||
<DList Name="gFishingRainSplashVtxDL" Offset="0x3A18" />
|
||||
<Animation Name="gFishingOwnerAnim" Offset="0x453C" />
|
||||
<DList Name="object_fish_DL_006F60" Offset="0x6F60" />
|
||||
<DList Name="object_fish_DL_007350" Offset="0x7350" />
|
||||
<DList Name="object_fish_DL_0074C8" Offset="0x74C8" />
|
||||
<DList Name="gFishingOwnerHairDL" Offset="0x7350" />
|
||||
<DList Name="gFishingOwnerHatDL" Offset="0x74C8" />
|
||||
<DList Name="object_fish_DL_0076B8" Offset="0x76B8" />
|
||||
<DList Name="object_fish_DL_007CF8" Offset="0x7CF8" />
|
||||
<DList Name="object_fish_DL_007E48" Offset="0x7E48" />
|
||||
@@ -73,12 +73,12 @@
|
||||
<Limb Name="object_fish_Standardlimb_0085B4" Type="Standard" Offset="0x85B4" />
|
||||
<Limb Name="object_fish_Standardlimb_0085C0" Type="Standard" Offset="0x85C0" />
|
||||
<Limb Name="object_fish_Standardlimb_0085CC" Type="Standard" Offset="0x85CC" />
|
||||
<Skeleton Name="object_fish_Skel_0085F8" Type="Flex" LimbType="Standard" Offset="0x85F8" />
|
||||
<DList Name="object_fish_DL_008610" Offset="0x8610" />
|
||||
<DList Name="object_fish_DL_008678" Offset="0x8678" />
|
||||
<Skeleton Name="gFishingOwnerSkel" Type="Flex" LimbType="Standard" Offset="0x85F8" />
|
||||
<DList Name="gFishingRippleSetupDL" Offset="0x8610" />
|
||||
<DList Name="gFishingRippleVtxDL" Offset="0x8678" />
|
||||
<Texture Name="object_fish_Tex_008690" OutName="tex_008690" Format="i4" Width="32" Height="32" Offset="0x8690" />
|
||||
<DList Name="object_fish_DL_0088C0" Offset="0x88C0" />
|
||||
<DList Name="object_fish_DL_008970" Offset="0x8970" />
|
||||
<DList Name="gFishingWaterDustSetupDL" Offset="0x88C0" />
|
||||
<DList Name="gFishingWaterDustVtxDL" Offset="0x8970" />
|
||||
<Texture Name="object_fish_TLUT_008990" OutName="tlut_008990" Format="rgba16" Width="16" Height="16" Offset="0x8990" />
|
||||
<Texture Name="object_fish_Tex_008B90" OutName="tex_008B90" Format="ci8" Width="8" Height="8" Offset="0x8B90" />
|
||||
<Texture Name="object_fish_Tex_008BD0" OutName="tex_008BD0" Format="ci8" Width="16" Height="16" Offset="0x8BD0" />
|
||||
@@ -86,21 +86,23 @@
|
||||
<Texture Name="object_fish_Tex_008DD0" OutName="tex_008DD0" Format="ci8" Width="8" Height="8" Offset="0x8DD0" />
|
||||
<Texture Name="object_fish_Tex_008E10" OutName="tex_008E10" Format="ci8" Width="32" Height="32" Offset="0x8E10" />
|
||||
<Texture Name="object_fish_Tex_009210" OutName="tex_009210" Format="ci8" Width="8" Height="8" Offset="0x9210" />
|
||||
<!-- <Blob Name="object_fish_Blob_009250" Size="0xC00" Offset="0x9250" /> -->
|
||||
<Texture Name="gFishingOwnerEyeOpenTex" OutName="tex_009250" Format="ci8" Width="32" Height="32" Offset="0x9250" />
|
||||
<Texture Name="gFishingOwnerEyeHalfTex" OutName="tex_009650" Format="ci8" Width="32" Height="32" Offset="0x9650" />
|
||||
<Texture Name="gFishingOwnerEyeClosedTex" OutName="tex_009A50" Format="ci8" Width="32" Height="32" Offset="0x9A50" />
|
||||
<Texture Name="object_fish_Tex_009E50" OutName="tex_009E50" Format="ci8" Width="64" Height="32" Offset="0x9E50" />
|
||||
<Texture Name="object_fish_Tex_00A650" OutName="tex_00A650" Format="ci8" Width="8" Height="8" Offset="0xA650" />
|
||||
<Texture Name="object_fish_Tex_00A690" OutName="tex_00A690" Format="ci8" Width="16" Height="16" Offset="0xA690" />
|
||||
<Texture Name="object_fish_Tex_00A790" OutName="tex_00A790" Format="ci8" Width="8" Height="16" Offset="0xA790" />
|
||||
<Texture Name="object_fish_Tex_00A810" OutName="tex_00A810" Format="ci8" Width="16" Height="16" Offset="0xA810" />
|
||||
<Texture Name="object_fish_Tex_00A910" OutName="tex_00A910" Format="ia8" Width="64" Height="64" Offset="0xA910" />
|
||||
<DList Name="object_fish_DL_00B950" Offset="0xB950" />
|
||||
<DList Name="object_fish_DL_00B9C0" Offset="0xB9C0" />
|
||||
<DList Name="gFishingSinkingLureSegmentSetupDL" Offset="0xB950" />
|
||||
<DList Name="gFishingSinkingLureSegmentVtxDL" Offset="0xB9C0" />
|
||||
<Texture Name="object_fish_Tex_00B9E0" OutName="tex_00B9E0" Format="rgba16" Width="64" Height="16" Offset="0xB9E0" />
|
||||
<DList Name="object_fish_DL_00C220" Offset="0xC220" />
|
||||
<DList Name="object_fish_DL_00C298" Offset="0xC298" />
|
||||
<DList Name="gFishingGroupFishSetupDL" Offset="0xC220" />
|
||||
<DList Name="gFishingGroupFishVtxDL" Offset="0xC298" />
|
||||
<DList Name="object_fish_DL_00C650" Offset="0xC650" />
|
||||
<Texture Name="object_fish_Tex_00C780" OutName="tex_00C780" Format="rgba16" Width="32" Height="32" Offset="0xC780" />
|
||||
<Animation Name="object_fish_Anim_00CFE0" Offset="0xCFE0" />
|
||||
<Animation Name="gFishingLoachAnim" Offset="0xCFE0" />
|
||||
<DList Name="object_fish_DL_00DED0" Offset="0xDED0" />
|
||||
<DList Name="object_fish_DL_00DFA8" Offset="0xDFA8" />
|
||||
<DList Name="object_fish_DL_00E048" Offset="0xE048" />
|
||||
@@ -129,29 +131,32 @@
|
||||
<Limb Name="object_fish_Standardlimb_011008" Type="Standard" Offset="0x11008" />
|
||||
<Limb Name="object_fish_Standardlimb_011014" Type="Standard" Offset="0x11014" />
|
||||
<Limb Name="object_fish_Standardlimb_011020" Type="Standard" Offset="0x11020" />
|
||||
<Skeleton Name="object_fish_Skel_011058" Type="Flex" LimbType="Standard" Offset="0x11058" />
|
||||
<!-- <Blob Name="object_fish_Blob_011064" Size="0x30C" Offset="0x11064" /> -->
|
||||
<DList Name="object_fish_DL_0113D0" Offset="0x113D0" />
|
||||
<DList Name="object_fish_DL_011410" Offset="0x11410" />
|
||||
<Skeleton Name="gFishingLoachSkel" Type="Flex" LimbType="Standard" Offset="0x11058" />
|
||||
<Blob Name="object_fish_Blob_011064" Size="0xC" Offset="0x11064" />
|
||||
<Texture Name="gFishingRodSegmentStripTex" OutName="tex_011070" Format="rgba16" Width="16" Height="8" Offset="0x11070" />
|
||||
<Texture Name="gFishingRodSegmentBlackTex" OutName="tex_011170" Format="rgba16" Width="16" Height="8" Offset="0x11170" />
|
||||
<Texture Name="gFishingRodSegmentWhiteTex" OutName="tex_011270" Format="rgba16" Width="16" Height="8" Offset="0x11270" />
|
||||
<DList Name="gFishingRodSetupDL" Offset="0x113D0" />
|
||||
<DList Name="gFishingRodSegmentDL" Offset="0x11410" />
|
||||
<Texture Name="object_fish_Tex_011440" OutName="tex_011440" Format="rgba16" Width="32" Height="32" Offset="0x11440" />
|
||||
<Texture Name="object_fish_Tex_011C40" OutName="tex_011C40" Format="rgba16" Width="32" Height="16" Offset="0x11C40" />
|
||||
<DList Name="object_fish_DL_012160" Offset="0x12160" />
|
||||
<DList Name="object_fish_DL_0121F0" Offset="0x121F0" />
|
||||
<DList Name="gFishingLureHookDL" Offset="0x12160" />
|
||||
<DList Name="gFishingLureFloatDL" Offset="0x121F0" />
|
||||
<Texture Name="object_fish_Tex_0122E0" OutName="tex_0122E0" Format="rgba16" Width="32" Height="32" Offset="0x122E0" />
|
||||
<Texture Name="object_fish_Tex_012AE0" OutName="tex_012AE0" Format="rgba16" Width="32" Height="32" Offset="0x12AE0" />
|
||||
<DList Name="object_fish_DL_013330" Offset="0x13330" />
|
||||
<DList Name="object_fish_DL_0133B0" Offset="0x133B0" />
|
||||
<DList Name="object_fish_DL_013590" Offset="0x13590" />
|
||||
<DList Name="object_fish_DL_013610" Offset="0x13610" />
|
||||
<DList Name="gFishingLilyPadSetupDL" Offset="0x13330" />
|
||||
<DList Name="gFishingLilyPadVtxDL" Offset="0x133B0" />
|
||||
<DList Name="gFishingRockSetupDL" Offset="0x13590" />
|
||||
<DList Name="gFishingRockVtxDL" Offset="0x13610" />
|
||||
<Texture Name="object_fish_Tex_013660" OutName="tex_013660" Format="rgba16" Width="32" Height="32" Offset="0x13660" />
|
||||
<DList Name="object_fish_DL_013F50" Offset="0x13F50" />
|
||||
<DList Name="object_fish_DL_013FD0" Offset="0x13FD0" />
|
||||
<DList Name="object_fish_DL_014030" Offset="0x14030" />
|
||||
<DList Name="object_fish_DL_0140B0" Offset="0x140B0" />
|
||||
<DList Name="gFishingWoodPostSetupDL" Offset="0x13F50" />
|
||||
<DList Name="gFishingWoodPostVtxDL" Offset="0x13FD0" />
|
||||
<DList Name="gFishingReedSetupDL" Offset="0x14030" />
|
||||
<DList Name="gFishingReedVtxDL" Offset="0x140B0" />
|
||||
<Texture Name="object_fish_Tex_0140D0" OutName="tex_0140D0" Format="rgba16" Width="16" Height="16" Offset="0x140D0" />
|
||||
<Texture Name="object_fish_Tex_0142D0" OutName="tex_0142D0" Format="rgba16" Width="32" Height="32" Offset="0x142D0" />
|
||||
<Texture Name="object_fish_Tex_014AD0" OutName="tex_014AD0" Format="i8" Width="32" Height="32" Offset="0x14AD0" />
|
||||
<DList Name="object_fish_DL_0153D0" Offset="0x153D0" />
|
||||
<DList Name="object_fish_DL_015470" Offset="0x15470" />
|
||||
<DList Name="gFishingAquariumBottomDL" Offset="0x153D0" />
|
||||
<DList Name="gFishingAquariumContainerDL" Offset="0x15470" />
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -1,63 +1,90 @@
|
||||
<Root>
|
||||
<!-- Object for the Four Giants -->
|
||||
<File Name="object_giant" Segment="6">
|
||||
<Animation Name="object_giant_Anim_002168" Offset="0x2168" />
|
||||
<!-- <Blob Name="object_giant_Blob_003D40" Size="0x90" Offset="0x3D40" /> -->
|
||||
<DList Name="object_giant_DL_003DD0" Offset="0x3DD0" />
|
||||
<DList Name="object_giant_DL_0040C0" Offset="0x40C0" />
|
||||
<DList Name="object_giant_DL_004200" Offset="0x4200" />
|
||||
<DList Name="object_giant_DL_004438" Offset="0x4438" />
|
||||
<DList Name="object_giant_DL_004560" Offset="0x4560" />
|
||||
<DList Name="object_giant_DL_0046A0" Offset="0x46A0" />
|
||||
<DList Name="object_giant_DL_0048D8" Offset="0x48D8" />
|
||||
<DList Name="object_giant_DL_004A00" Offset="0x4A00" />
|
||||
<DList Name="object_giant_DL_004B10" Offset="0x4B10" />
|
||||
<DList Name="object_giant_DL_004C38" Offset="0x4C38" />
|
||||
<DList Name="object_giant_DL_004D58" Offset="0x4D58" />
|
||||
<DList Name="object_giant_DL_004EC0" Offset="0x4EC0" />
|
||||
<DList Name="object_giant_DL_004FD0" Offset="0x4FD0" />
|
||||
<DList Name="object_giant_DL_0050F8" Offset="0x50F8" />
|
||||
<DList Name="object_giant_DL_005218" Offset="0x5218" />
|
||||
<Texture Name="object_giant_TLUT_005380" OutName="tlut_005380" Format="rgba16" Width="16" Height="16" Offset="0x5380" />
|
||||
<Texture Name="object_giant_Tex_005580" OutName="tex_005580" Format="ci8" Width="16" Height="16" Offset="0x5580" />
|
||||
<Texture Name="object_giant_Tex_005680" OutName="tex_005680" Format="ci8" Width="16" Height="16" Offset="0x5680" />
|
||||
<Texture Name="object_giant_Tex_005780" OutName="tex_005780" Format="ci8" Width="16" Height="16" Offset="0x5780" />
|
||||
<Texture Name="object_giant_Tex_005880" OutName="tex_005880" Format="ci8" Width="16" Height="16" Offset="0x5880" />
|
||||
<Texture Name="object_giant_Tex_005980" OutName="tex_005980" Format="ci8" Width="16" Height="16" Offset="0x5980" />
|
||||
<!-- <Blob Name="object_giant_Blob_005A80" Size="0x1800" Offset="0x5A80" /> -->
|
||||
<Texture Name="object_giant_Tex_007280" OutName="tex_007280" Format="ci8" Width="16" Height="16" Offset="0x7280" />
|
||||
<Texture Name="object_giant_Tex_007380" OutName="tex_007380" Format="ci8" Width="16" Height="32" Offset="0x7380" />
|
||||
<DList Name="object_giant_DL_007610" Offset="0x7610" />
|
||||
<Texture Name="object_giant_Tex_0076C0" OutName="tex_0076C0" Format="rgba16" Width="16" Height="16" Offset="0x76C0" />
|
||||
<Limb Name="object_giant_Standardlimb_0078C0" Type="Standard" Offset="0x78C0" />
|
||||
<Limb Name="object_giant_Standardlimb_0078CC" Type="Standard" Offset="0x78CC" />
|
||||
<Limb Name="object_giant_Standardlimb_0078D8" Type="Standard" Offset="0x78D8" />
|
||||
<Limb Name="object_giant_Standardlimb_0078E4" Type="Standard" Offset="0x78E4" />
|
||||
<Limb Name="object_giant_Standardlimb_0078F0" Type="Standard" Offset="0x78F0" />
|
||||
<Limb Name="object_giant_Standardlimb_0078FC" Type="Standard" Offset="0x78FC" />
|
||||
<Limb Name="object_giant_Standardlimb_007908" Type="Standard" Offset="0x7908" />
|
||||
<Limb Name="object_giant_Standardlimb_007914" Type="Standard" Offset="0x7914" />
|
||||
<Limb Name="object_giant_Standardlimb_007920" Type="Standard" Offset="0x7920" />
|
||||
<Limb Name="object_giant_Standardlimb_00792C" Type="Standard" Offset="0x792C" />
|
||||
<Limb Name="object_giant_Standardlimb_007938" Type="Standard" Offset="0x7938" />
|
||||
<Limb Name="object_giant_Standardlimb_007944" Type="Standard" Offset="0x7944" />
|
||||
<Limb Name="object_giant_Standardlimb_007950" Type="Standard" Offset="0x7950" />
|
||||
<Limb Name="object_giant_Standardlimb_00795C" Type="Standard" Offset="0x795C" />
|
||||
<Limb Name="object_giant_Standardlimb_007968" Type="Standard" Offset="0x7968" />
|
||||
<Skeleton Name="object_giant_Skel_0079B0" Type="Flex" LimbType="Standard" Offset="0x79B0" />
|
||||
<Animation Name="object_giant_Anim_008394" Offset="0x8394" />
|
||||
<Animation Name="object_giant_Anim_0096E4" Offset="0x96E4" />
|
||||
<Animation Name="object_giant_Anim_00A1C4" Offset="0xA1C4" />
|
||||
<Animation Name="object_giant_Anim_00ACA4" Offset="0xACA4" />
|
||||
<Animation Name="object_giant_Anim_00B784" Offset="0xB784" />
|
||||
<Animation Name="object_giant_Anim_00C5D4" Offset="0xC5D4" />
|
||||
<Animation Name="object_giant_Anim_00D040" Offset="0xD040" />
|
||||
<Animation Name="object_giant_Anim_00DE84" Offset="0xDE84" />
|
||||
<Animation Name="object_giant_Anim_0102A4" Offset="0x102A4" />
|
||||
<Animation Name="object_giant_Anim_0116E4" Offset="0x116E4" />
|
||||
<Animation Name="object_giant_Anim_012A38" Offset="0x12A38" />
|
||||
<Animation Name="object_giant_Anim_013004" Offset="0x13004" />
|
||||
<Animation Name="object_giant_Anim_013FE8" Offset="0x13FE8" />
|
||||
<Animation Name="object_giant_Anim_015334" Offset="0x15334" />
|
||||
<Animation Name="object_giant_Anim_017944" Offset="0x17944" />
|
||||
<Animation Name="gGiantLargeStrideAnim" Offset="0x2168" /> <!-- Original name is "kya_testwalk" -->
|
||||
|
||||
<!-- Giant Body Vertices. Contains everything but the beard. -->
|
||||
<Array Name="gGiantBodyVtx" Count="444" Offset="0x2180">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
|
||||
<!-- Giant Unused Beard Vertices. An exact duplicate of the beard vertices that are actually used. -->
|
||||
<Array Name="gGiantUnusedBeardVtx" Count="9" Offset="0x3D40">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
|
||||
<!-- Giant Limb DisplayLists -->
|
||||
<DList Name="gGiantHeadDL" Offset="0x3DD0" />
|
||||
<DList Name="gGiantRightThighDL" Offset="0x40C0" />
|
||||
<DList Name="gGiantRightShinDL" Offset="0x4200" />
|
||||
<DList Name="gGiantRightFootDL" Offset="0x4438" />
|
||||
<DList Name="gGiantLeftThighDL" Offset="0x4560" />
|
||||
<DList Name="gGiantLeftShinDL" Offset="0x46A0" />
|
||||
<DList Name="gGiantLeftFootDL" Offset="0x48D8" />
|
||||
<DList Name="gGiantRightShoulderDL" Offset="0x4A00" />
|
||||
<DList Name="gGiantRightUpperArmDL" Offset="0x4B10" />
|
||||
<DList Name="gGiantRightForearmDL" Offset="0x4C38" />
|
||||
<DList Name="gGiantRightHandDL" Offset="0x4D58" />
|
||||
<DList Name="gGiantLeftShoulderDL" Offset="0x4EC0" />
|
||||
<DList Name="gGiantLeftUpperArmDL" Offset="0x4FD0" />
|
||||
<DList Name="gGiantLeftForearmDL" Offset="0x50F8" />
|
||||
<DList Name="gGiantLeftHandDL" Offset="0x5218" />
|
||||
|
||||
<!-- Giant Textures -->
|
||||
<Texture Name="gGiantTLUT" OutName="giant_tlut" Format="rgba16" Width="16" Height="16" Offset="0x5380" />
|
||||
<Texture Name="gGiantFootTex" OutName="giant_foot" Format="ci8" Width="16" Height="16" Offset="0x5580" />
|
||||
<Texture Name="gGiantShinTex" OutName="giant_shin" Format="ci8" Width="16" Height="16" Offset="0x5680" />
|
||||
<Texture Name="gGiantForearmAndKneeTex" OutName="giant_forearm_and_knee" Format="ci8" Width="16" Height="16" Offset="0x5780" />
|
||||
<Texture Name="gGiantUpperArmAndThighTex" OutName="giant_upper_arm_and_thigh" Format="ci8" Width="16" Height="16" Offset="0x5880" />
|
||||
<Texture Name="gGiantHandTex" OutName="giant_hand" Format="ci8" Width="16" Height="16" Offset="0x5980" />
|
||||
<Texture Name="gGiantFaceEyeOpenTex" OutName="giant_face_eye_open" Format="ci8" Width="32" Height="64" Offset="0x5A80" TlutOffset="0x5380" />
|
||||
<Texture Name="gGiantFaceEyeHalfTex" OutName="giant_face_eye_half" Format="ci8" Width="32" Height="64" Offset="0x6280" TlutOffset="0x5380" />
|
||||
<Texture Name="gGiantFaceEyeClosedTex" OutName="giant_face_eye_closed" Format="ci8" Width="32" Height="64" Offset="0x6A80" TlutOffset="0x5380" />
|
||||
<Texture Name="gGiantGroinTex" OutName="giant_groin" Format="ci8" Width="16" Height="16" Offset="0x7280" />
|
||||
<Texture Name="gGiantHairTex" OutName="giant_hair" Format="ci8" Width="16" Height="32" Offset="0x7380" />
|
||||
|
||||
<!-- Giant Beard Vertices, DisplayList, and Texture -->
|
||||
<Array Name="gGiantBeardVtx" Count="9" Offset="0x7580">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
<DList Name="gGiantBeardDL" Offset="0x7610" />
|
||||
<Texture Name="gGiantBeardTex" OutName="giant_beard" Format="rgba16" Width="16" Height="16" Offset="0x76C0" />
|
||||
|
||||
<!-- Giant Limbs -->
|
||||
<Limb Name="gGiantHeadLimb" Type="Standard" Offset="0x78C0" />
|
||||
<Limb Name="gGiantLeftThighLimb" Type="Standard" Offset="0x78CC" />
|
||||
<Limb Name="gGiantLeftShinLimb" Type="Standard" Offset="0x78D8" />
|
||||
<Limb Name="gGiantLeftFootLimb" Type="Standard" Offset="0x78E4" />
|
||||
<Limb Name="gGiantRightThighLimb" Type="Standard" Offset="0x78F0" />
|
||||
<Limb Name="gGiantRightShinLimb" Type="Standard" Offset="0x78FC" />
|
||||
<Limb Name="gGiantRightFootLimb" Type="Standard" Offset="0x7908" />
|
||||
<Limb Name="gGiantLeftShoulderLimb" Type="Standard" Offset="0x7914" />
|
||||
<Limb Name="gGiantLeftUpperArmLimb" Type="Standard" Offset="0x7920" />
|
||||
<Limb Name="gGiantLeftForearmLimb" Type="Standard" Offset="0x792C" />
|
||||
<Limb Name="gGiantLeftHandLimb" Type="Standard" Offset="0x7938" />
|
||||
<Limb Name="gGiantRightShoulderLimb" Type="Standard" Offset="0x7944" />
|
||||
<Limb Name="gGiantRightUpperArmLimb" Type="Standard" Offset="0x7950" />
|
||||
<Limb Name="gGiantRightForearmLimb" Type="Standard" Offset="0x795C" />
|
||||
<Limb Name="gGiantRightHandLimb" Type="Standard" Offset="0x7968" />
|
||||
|
||||
<!-- Giant Skeleton -->
|
||||
<Skeleton Name="gGiantSkel" Type="Flex" LimbType="Standard" Offset="0x79B0" />
|
||||
|
||||
<!-- Giant Animations -->
|
||||
<Animation Name="gGiantLookUpStartAnim" Offset="0x8394" /> <!-- Original name is "kyo_kaoage" ("raising face") -->
|
||||
<Animation Name="gGiantLookUpLoopAnim" Offset="0x96E4" /> <!-- Original name is "kyo_kaoage_loop" -->
|
||||
<Animation Name="gGiantBigCallStartAnim" Offset="0xA1C4" /> <!-- Original name is "kyo_sakebi" ("cry"). Stretches his arms outward -->
|
||||
<Animation Name="gGiantSmallCallStartAnim" Offset="0xACA4" /> <!-- Original name is "kyo_sakebi2" ("cry2"). Places his hands over his mouth -->
|
||||
<Animation Name="gGiantSmallCallLoopAnim" Offset="0xB784" /> <!-- Original name is "kyo_sakebi2_loop" -->
|
||||
<Animation Name="gGiantSmallCallEndAnim" Offset="0xC5D4" /> <!-- Original name is "kyo_sakebi2_modori" ("cry2 return") -->
|
||||
<Animation Name="gGiantBigCallLoopAnim" Offset="0xD040" /> <!-- Original name is "kyo_sakebi_loop" -->
|
||||
<Animation Name="gGiantBigCallEndAnim" Offset="0xDE84" /> <!-- Original name is "kyo_sakebi_modori" ("cry return") -->
|
||||
<Animation Name="gGiantFallingOverAnim" Offset="0x102A4" /> <!-- Original name is "kyo_taoreru" ("falling over") -->
|
||||
<Animation Name="gGiantRaisedArmsStartAnim" Offset="0x116E4" /> <!-- Original name is "kyo_teage" ("raising arm") -->
|
||||
<Animation Name="gGiantRaisedArmsLoopAnim" Offset="0x12A38" /> <!-- Original name is "kyo_teage_loop" -->
|
||||
<Animation Name="gGiantStruggleStartAnim" Offset="0x13004" /> <!-- Original name is "kyo_tukisasae" ("holding up the moon") -->
|
||||
<Animation Name="gGiantStruggleLoopAnim" Offset="0x13FE8" /> <!-- Original name is "kyo_tukisasae_loop" -->
|
||||
<Animation Name="gGiantIdleAnim" Offset="0x15334" /> <!-- Original name is "kyo_wait" -->
|
||||
<Animation Name="gGiantWalkingAnim" Offset="0x17944" /> <!-- Original name is "kyo_walk" -->
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
<Root>
|
||||
<File Name="object_gmo" Segment="6">
|
||||
<Animation Name="object_gmo_Anim_000018" Offset="0x18" />
|
||||
<DList Name="object_gmo_DL_000B70" Offset="0xB70" />
|
||||
<DList Name="object_gmo_DL_000E38" Offset="0xE38" />
|
||||
<Texture Name="object_gmo_TLUT_000EC8" OutName="tlut_000EC8" Format="rgba16" Width="16" Height="16" Offset="0xEC8" />
|
||||
<Texture Name="object_gmo_Tex_0010C8" OutName="tex_0010C8" Format="ci8" Width="32" Height="32" Offset="0x10C8" />
|
||||
<!-- <Blob Name="object_gmo_Blob_0014C8" Size="0xC00" Offset="0x14C8" /> -->
|
||||
<Limb Name="object_gmo_Standardlimb_0020C8" Type="Standard" Offset="0x20C8" />
|
||||
<Limb Name="object_gmo_Standardlimb_0020D4" Type="Standard" Offset="0x20D4" />
|
||||
<Skeleton Name="object_gmo_Skel_0020E8" Type="Normal" LimbType="Standard" Offset="0x20E8" />
|
||||
<Animation Name="gNejironIdleAnim" Offset="0x18" /> <!-- Original name might be "gm_default" -->
|
||||
<DList Name="gNejironBodyDL" Offset="0xB70" />
|
||||
<DList Name="gNejironEyesDL" Offset="0xE38" />
|
||||
<Texture Name="gNejironBodyTLUT" OutName="nejiron_body_palette" Format="rgba16" Width="16" Height="16" Offset="0xEC8" />
|
||||
<Texture Name="gNejironBodyTex" OutName="nejiron_body" Format="ci8" Width="32" Height="32" Offset="0x10C8" />
|
||||
<Texture Name="gNejironEyeOpenTex" OutName="nejiron_eye_open" Format="rgba16" Width="16" Height="32" Offset="0x14C8" />
|
||||
<Texture Name="gNejironEyeHalfTex" OutName="nejiron_eye_half" Format="rgba16" Width="16" Height="32" Offset="0x18C8" />
|
||||
<Texture Name="gNejironEyeClosedTex" OutName="nejiron_eye_closed" Format="rgba16" Width="16" Height="32" Offset="0x1CC8" />
|
||||
<Limb Name="gNejironBodyLimb" Type="Standard" Offset="0x20C8" />
|
||||
<Limb Name="gNejironEyeLimb" Type="Standard" Offset="0x20D4" />
|
||||
<Skeleton Name="gNejironSkel" Type="Normal" LimbType="Standard" Offset="0x20E8" />
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<Root>
|
||||
<!-- Object for small wooden crate -->
|
||||
<File Name="object_kibako" Segment="6">
|
||||
<Texture Name="object_kibako_Tex_000000" OutName="tex_000000" Format="rgba16" Width="32" Height="64" Offset="0x0" />
|
||||
<DList Name="object_kibako_DL_001180" Offset="0x1180" />
|
||||
<Texture Name="object_kibako_Tex_001240" OutName="tex_001240" Format="rgba16" Width="64" Height="16" Offset="0x1240" />
|
||||
<DList Name="object_kibako_DL_001A70" Offset="0x1A70" />
|
||||
<Texture Name="gSmallCrateTex" OutName="small_crate" Format="rgba16" Width="32" Height="64" Offset="0x0" />
|
||||
<DList Name="gSmallCrateDL" Offset="0x1180" />
|
||||
<Texture Name="gSmallCrateFragmentTex" OutName="small_crate_fragment" Format="rgba16" Width="64" Height="16" Offset="0x1240" />
|
||||
<DList Name="gSmallCrateFragmentDL" Offset="0x1A70" />
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<Root>
|
||||
<!-- Object for large wooden crate -->
|
||||
<File Name="object_kibako2" Segment="6">
|
||||
<Texture Name="object_kibako2_TLUT_000000" OutName="tlut_000000" Format="rgba16" Width="4" Height="4" Offset="0x0" />
|
||||
<Texture Name="object_kibako2_Tex_000020" OutName="tex_000020" Format="ci4" Width="32" Height="64" Offset="0x20" />
|
||||
<Texture Name="object_kibako2_Tex_000420" OutName="tex_000420" Format="ci4" Width="32" Height="64" Offset="0x420" />
|
||||
<DList Name="object_kibako2_DL_000960" Offset="0x960" />
|
||||
<Collision Name="object_kibako2_Colheader_000B70" Offset="0xB70" />
|
||||
<Texture Name="object_kibako2_TLUT_000BA0" OutName="tlut_000BA0" Format="rgba16" Width="4" Height="4" Offset="0xBA0" />
|
||||
<Texture Name="object_kibako2_Tex_000BC0" OutName="tex_000BC0" Format="ci4" Width="32" Height="64" Offset="0xBC0" />
|
||||
<DList Name="object_kibako2_DL_001040" Offset="0x1040" />
|
||||
<DList Name="object_kibako2_DL_001100" Offset="0x1100" />
|
||||
<Texture Name="gLargeCrateTLUT" OutName="large_crate_tlut" Format="rgba16" Width="4" Height="4" Offset="0x0" />
|
||||
<Texture Name="gLargeCrateTopTex" OutName="large_crate_top" Format="ci4" Width="32" Height="64" Offset="0x20" />
|
||||
<Texture Name="gLargeCrateSidesTex" OutName="large_crate_sides" Format="ci4" Width="32" Height="64" Offset="0x420" />
|
||||
<DList Name="gLargeCrateDL" Offset="0x960" />
|
||||
<Collision Name="gLargeCrateCol" Offset="0xB70" />
|
||||
<Texture Name="gLargeCrateFragmentTLUT" OutName="large_crate_fragment_tlut" Format="rgba16" Width="4" Height="4" Offset="0xBA0" />
|
||||
<Texture Name="gLargeCrateFragmentTex" OutName="large_crate_fragment" Format="ci4" Width="32" Height="64" Offset="0xBC0" />
|
||||
<DList Name="gLargeCrateFragment1DL" Offset="0x1040" />
|
||||
<DList Name="gLargeCrateFragment2DL" Offset="0x1100" />
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -1,28 +1,30 @@
|
||||
<Root>
|
||||
<File Name="object_mag" Segment="6">
|
||||
<Texture Name="object_mag_Tex_000000" OutName="tex_000000" Format="rgba32" Width="144" Height="64" Offset="0x0" />
|
||||
<Texture Name="object_mag_Tex_009000" OutName="tex_009000" Format="i8" Width="104" Height="16" Offset="0x9000" />
|
||||
<Texture Name="object_mag_Tex_009680" OutName="tex_009680" Format="i8" Width="104" Height="16" Offset="0x9680" />
|
||||
<Texture Name="object_mag_Tex_009D00" OutName="tex_009D00" Format="i8" Width="72" Height="8" Offset="0x9D00" />
|
||||
<Texture Name="object_mag_Tex_009F40" OutName="tex_009F40" Format="i4" Width="64" Height="64" Offset="0x9F40" />
|
||||
<Texture Name="object_mag_Tex_00A740" OutName="tex_00A740" Format="i4" Width="64" Height="64" Offset="0xA740" />
|
||||
<Texture Name="object_mag_Tex_00AF40" OutName="tex_00AF40" Format="i4" Width="64" Height="64" Offset="0xAF40" />
|
||||
<Texture Name="object_mag_Tex_00B740" OutName="tex_00B740" Format="i4" Width="64" Height="64" Offset="0xB740" />
|
||||
<Texture Name="object_mag_Tex_00BF40" OutName="tex_00BF40" Format="i4" Width="64" Height="64" Offset="0xBF40" />
|
||||
<Texture Name="object_mag_Tex_00C740" OutName="tex_00C740" Format="i4" Width="64" Height="64" Offset="0xC740" />
|
||||
<Texture Name="object_mag_Tex_00CF40" OutName="tex_00CF40" Format="i4" Width="64" Height="64" Offset="0xCF40" />
|
||||
<Texture Name="object_mag_Tex_00D740" OutName="tex_00D740" Format="i4" Width="64" Height="64" Offset="0xD740" />
|
||||
<Texture Name="object_mag_Tex_00DF40" OutName="tex_00DF40" Format="i4" Width="64" Height="64" Offset="0xDF40" />
|
||||
<Texture Name="object_mag_Tex_00E740" OutName="tex_00E740" Format="i4" Width="64" Height="64" Offset="0xE740" />
|
||||
<Texture Name="object_mag_Tex_00EF40" OutName="tex_00EF40" Format="i4" Width="64" Height="64" Offset="0xEF40" />
|
||||
<Texture Name="object_mag_Tex_00F740" OutName="tex_00F740" Format="i4" Width="64" Height="64" Offset="0xF740" />
|
||||
<Texture Name="object_mag_Tex_00FF40" OutName="tex_00FF40" Format="i8" Width="32" Height="32" Offset="0xFF40" />
|
||||
<Texture Name="object_mag_Tex_010340" OutName="tex_010340" Format="i8" Width="32" Height="32" Offset="0x10340" />
|
||||
<Texture Name="object_mag_Tex_010740" OutName="tex_010740" Format="i8" Width="32" Height="32" Offset="0x10740" />
|
||||
<Texture Name="object_mag_Tex_010B40" OutName="tex_010B40" Format="i8" Width="32" Height="32" Offset="0x10B40" />
|
||||
<Texture Name="object_mag_Tex_010F40" OutName="tex_010F40" Format="ia8" Width="128" Height="16" Offset="0x10F40" />
|
||||
<Texture Name="object_mag_Tex_011740" OutName="tex_011740" Format="i4" Width="256" Height="9" Offset="0x11740" />
|
||||
<Texture Name="object_mag_Tex_011BC0" OutName="tex_011BC0" Format="i4" Width="144" Height="9" Offset="0x11BC0" />
|
||||
<Texture Name="object_mag_Tex_011E48" OutName="tex_011E48" Format="rgba32" Width="128" Height="112" Offset="0x11E48" />
|
||||
<Texture Name="gTitleScreenZeldaLogoTex" OutName="title_screen_zelda_logo" Format="rgba32" Width="144" Height="64" Offset="0x0"/>
|
||||
<Texture Name="gTitleScreenMajorasMaskSubtitleTex" OutName="title_screen_majoras_mask_subtitle" Format="i8" Width="104" Height="16" Offset="0x9000"/>
|
||||
<Texture Name="gTitleScreenMajorasMaskSubtitleMaskTex" OutName="title_screen_majoras_mask_subtitle_mask" Format="i8" Width="104" Height="16" Offset="0x9680"/><!-- Masking the flame effect -->
|
||||
<Texture Name="gTitleScreenTheLegendOfTextTex" OutName="title_screen_the_legend_of_text" Format="i8" Width="72" Height="8" Offset="0x9D00"/>
|
||||
|
||||
<Texture Name="gTitleScreenMaskGlowDim00Tex" OutName="title_screen_mask_glow_dim_0_0" Format="i4" Width="64" Height="64" Offset="0x9F40"/>
|
||||
<Texture Name="gTitleScreenMaskGlowDim01Tex" OutName="title_screen_mask_glow_dim_0_1" Format="i4" Width="64" Height="64" Offset="0xA740"/>
|
||||
<Texture Name="gTitleScreenMaskGlowDim10Tex" OutName="title_screen_mask_glow_dim_1_0" Format="i4" Width="64" Height="64" Offset="0xAF40"/>
|
||||
<Texture Name="gTitleScreenMaskGlowDim11Tex" OutName="title_screen_mask_glow_dim_1_1" Format="i4" Width="64" Height="64" Offset="0xB740"/>
|
||||
<Texture Name="gTitleScreenZeldaGlow0Tex" OutName="title_screen_zelda_glow_0" Format="i4" Width="64" Height="64" Offset="0xBF40"/>
|
||||
<Texture Name="gTitleScreenZeldaGlow1Tex" OutName="title_screen_zelda_glow_1" Format="i4" Width="64" Height="64" Offset="0xC740"/>
|
||||
<Texture Name="gTitleScreenMaskGlowBright00Tex" OutName="title_screen_mask_glow_bright_0_0" Format="i4" Width="64" Height="64" Offset="0xCF40"/>
|
||||
<Texture Name="gTitleScreenMaskGlowBright01Tex" OutName="title_screen_mask_glow_bright_0_1" Format="i4" Width="64" Height="64" Offset="0xD740"/>
|
||||
<Texture Name="gTitleScreenMaskGlowBright10Tex" OutName="title_screen_mask_glow_bright_1_0" Format="i4" Width="64" Height="64" Offset="0xDF40"/>
|
||||
<Texture Name="gTitleScreenMaskGlowBright11Tex" OutName="title_screen_mask_glow_bright_1_1" Format="i4" Width="64" Height="64" Offset="0xE740"/>
|
||||
<Texture Name="gTitleScreenGlowRight0Tex" OutName="title_screen_glow_right_0" Format="i4" Width="64" Height="64" Offset="0xEF40"/>
|
||||
<Texture Name="gTitleScreenGlowRight1Tex" OutName="title_screen_glow_right_1" Format="i4" Width="64" Height="64" Offset="0xF740"/>
|
||||
<Texture Name="gTitleScreenFlame0Tex" OutName="title_screen_flame_0" Format="i8" Width="32" Height="32" Offset="0xFF40"/>
|
||||
<Texture Name="gTitleScreenFlame1Tex" OutName="title_screen_flame_1" Format="i8" Width="32" Height="32" Offset="0x10340"/>
|
||||
<Texture Name="gTitleScreenFlame2Tex" OutName="title_screen_flame_2" Format="i8" Width="32" Height="32" Offset="0x10740"/>
|
||||
<Texture Name="gTitleScreenFlame3Tex" OutName="title_screen_flame_3" Format="i8" Width="32" Height="32" Offset="0x10B40"/>
|
||||
|
||||
<Texture Name="gTitleScreenCopyright2000NintendoTex" OutName="title_screen_copyright_2000_nintendo_text" Format="i8" Width="128" Height="16" Offset="0x10F40"/>
|
||||
<Texture Name="gTitleScreenControllerNotConnectedTextTex" OutName="title_screen_controller_not_connected_text" Format="i4" Width="256" Height="9" Offset="0x11740"/>
|
||||
<Texture Name="gTitleScreenInsertControllerTextTex" OutName="title_screen_insert_controller_text" Format="i4" Width="144" Height="9" Offset="0x11BC0"/>
|
||||
<Texture Name="gTitleScreenMajorasMaskTex" OutName="title_screen_majoras_mask" Format="rgba32" Width="128" Height="112" Offset="0x11E48"/>
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
<DList Name="object_oF1d_map_DL_000D50" Offset="0xD50" />
|
||||
<DList Name="object_oF1d_map_DL_000DD8" Offset="0xDD8" />
|
||||
<DList Name="object_oF1d_map_DL_001560" Offset="0x1560" />
|
||||
<!-- <Blob Name="object_oF1d_map_Blob_001750" Size="0x20" Offset="0x1750" /> -->
|
||||
<Blob Name="object_oF1d_map_Blob_001750" Size="0x20" Offset="0x1750" />
|
||||
<Texture Name="object_oF1d_map_Tex_001770" OutName="tex_001770" Format="rgba16" Width="32" Height="64" Offset="0x1770" />
|
||||
<!-- <Blob Name="object_oF1d_map_Blob_002770" Size="0x800" Offset="0x2770" /> -->
|
||||
<Blob Name="object_oF1d_map_Blob_002770" Size="0x800" Offset="0x2770" />
|
||||
<Texture Name="object_oF1d_map_Tex_002F70" OutName="tex_002F70" Format="i4" Width="32" Height="32" Offset="0x2F70" />
|
||||
<DList Name="object_oF1d_map_DL_0031A0" Offset="0x31A0" />
|
||||
<DList Name="object_oF1d_map_DL_003258" Offset="0x3258" />
|
||||
@@ -71,7 +71,10 @@
|
||||
<Texture Name="object_oF1d_map_Tex_00FAB8" OutName="tex_00FAB8" Format="ci8" Width="8" Height="16" Offset="0xFAB8" />
|
||||
<Texture Name="object_oF1d_map_Tex_00FB38" OutName="tex_00FB38" Format="ci8" Width="32" Height="64" Offset="0xFB38" />
|
||||
<Texture Name="object_oF1d_map_Tex_010338" OutName="tex_010338" Format="ci8" Width="16" Height="16" Offset="0x10338" />
|
||||
<!-- <Blob Name="object_oF1d_map_Blob_010438" Size="0x1000" Offset="0x10438" /> -->
|
||||
<Texture Name="object_oF1d_map_Tex_010438" OutName="tex_010438" Format="ci8" Width="32" Height="32" Offset="0x10438" />
|
||||
<Texture Name="object_oF1d_map_Tex_010838" OutName="tex_010838" Format="ci8" Width="32" Height="32" Offset="0x10838" />
|
||||
<Texture Name="object_oF1d_map_Tex_010C38" OutName="tex_010C38" Format="ci8" Width="32" Height="32" Offset="0x10C38" />
|
||||
<Texture Name="object_oF1d_map_Tex_011038" OutName="tex_011038" Format="ci8" Width="32" Height="32" Offset="0x11038" />
|
||||
<Texture Name="object_oF1d_map_Tex_011438" OutName="tex_011438" Format="rgba16" Width="8" Height="8" Offset="0x11438" />
|
||||
<Texture Name="object_oF1d_map_Tex_0114B8" OutName="tex_0114B8" Format="ci8" Width="16" Height="16" Offset="0x114B8" />
|
||||
<Texture Name="object_oF1d_map_Tex_0115B8" OutName="tex_0115B8" Format="rgba16" Width="32" Height="16" Offset="0x115B8" />
|
||||
@@ -98,7 +101,7 @@
|
||||
<Animation Name="object_oF1d_map_Anim_0135E8" Offset="0x135E8" />
|
||||
<Animation Name="object_oF1d_map_Anim_013DB0" Offset="0x13DB0" />
|
||||
<Animation Name="object_oF1d_map_Anim_0143AC" Offset="0x143AC" />
|
||||
<Blob Name="object_oF1d_map_Blob_0143C0" Size="0x930" Offset="0x143C0" /> <!-- ZAPD erroneously generates an extra pad variable if this is commented out -->
|
||||
<Animation Name="object_oF1d_map_Anim_014CE0" Offset="0x14CE0" />
|
||||
<DList Name="object_oF1d_map_DL_014CF0" Offset="0x14CF0" />
|
||||
<DList Name="object_oF1d_map_DL_014D00" Offset="0x14D00" />
|
||||
</File>
|
||||
|
||||
@@ -11,9 +11,11 @@
|
||||
<Texture Name="object_ssh_Tex_0017B0" OutName="tex_0017B0" Format="i8" Width="16" Height="16" Offset="0x17B0" />
|
||||
<Texture Name="object_ssh_Tex_0018B0" OutName="tex_0018B0" Format="ci8" Width="8" Height="16" Offset="0x18B0" />
|
||||
<Texture Name="object_ssh_Tex_001930" OutName="tex_001930" Format="ci8" Width="8" Height="8" Offset="0x1930" />
|
||||
<!-- <Blob Name="object_ssh_Blob_001970" Size="0x400" Offset="0x1970" /> -->
|
||||
<Texture Name="object_ssh_Tex_001970" OutName="tex_001970" Format="ci8" Width="32" Height="32" Offset="0x1970" />
|
||||
<Texture Name="object_ssh_Tex_001D70" OutName="tex_001D70" Format="ci8" Width="8" Height="16" Offset="0x1D70" />
|
||||
<!-- <Blob Name="object_ssh_Blob_001DF0" Size="0x800" Offset="0x1DF0" /> -->
|
||||
<Texture Name="object_ssh_Tex_001DF0" OutName="tex_001DF0" Format="ci8" Width="32" Height="32" Offset="0x1DF0" />
|
||||
<Texture Name="object_ssh_Tex_0021F0" OutName="tex_0021F0" Format="ci8" Width="32" Height="32" Offset="0x21F0" />
|
||||
<Blob Name="object_ssh_Blob_0025F0" Size="0x2870" Offset="0x25F0" />
|
||||
<DList Name="object_ssh_DL_004E60" Offset="0x4E60" />
|
||||
<DList Name="object_ssh_DL_005210" Offset="0x5210" />
|
||||
<DList Name="object_ssh_DL_0056A0" Offset="0x56A0" />
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<Root>
|
||||
<!-- Used for the unused water vortex actor. -->
|
||||
<File Name="object_stream" Segment="6">
|
||||
<Texture Name="object_stream_Tex_000000" OutName="tex_000000" Format="i4" Width="64" Height="64" Offset="0x0" />
|
||||
<DList Name="object_stream_DL_000950" Offset="0x950" />
|
||||
<Texture Name="gWaterVortexTex" OutName="water_vortex" Format="i4" Width="64" Height="64" Offset="0x0" />
|
||||
<DList Name="gWaterVortexDL" Offset="0x950" />
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<Root>
|
||||
<File Name="object_tokei_step" Segment="6">
|
||||
<DList Name="object_tokei_step_DL_000080" Offset="0x80" />
|
||||
<DList Name="object_tokei_step_DL_000088" Offset="0x88" />
|
||||
<Texture Name="object_tokei_step_Tex_000120" OutName="tex_000120" Format="rgba16" Width="32" Height="32" Offset="0x120" />
|
||||
<Collision Name="object_tokei_step_Colheader_000968" Offset="0x968" />
|
||||
<DList Name="gClocktowerPanelEmptyDL" Offset="0x80" />
|
||||
<DList Name="gClocktowerPanelDL" Offset="0x88" />
|
||||
<Texture Name="gClocktowerPanelTex" OutName="clocktower_panel" Format="rgba16" Width="32" Height="32" Offset="0x120" />
|
||||
<Collision Name="gClocktowerPanelCol" Offset="0x968" />
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -54,6 +54,6 @@
|
||||
<Texture Name="object_warp1_TLUT_0078C0" OutName="tlut_0078C0" Format="rgba16" Width="4" Height="4" Offset="0x78C0" />
|
||||
<Texture Name="object_warp1_Tex_0078E0" OutName="tex_0078E0" Format="ci4" Width="64" Height="64" Offset="0x78E0" />
|
||||
<Texture Name="object_warp1_Tex_0080E0" OutName="tex_0080E0" Format="ci4" Width="64" Height="64" Offset="0x80E0" />
|
||||
<!-- <Blob Name="object_warp1_Blob_0088E0" Size="0x320" Offset="0x88E0" /> -->
|
||||
<Collision Name="object_warp1_Colheader_008BD4" Offset="0x8BD4" />
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<Animation Name="object_wiz_Anim_0007B0" Offset="0x7B0" />
|
||||
<Texture Name="object_wiz_Tex_0007C0" OutName="tex_0007C0" Format="i4" Width="32" Height="64" Offset="0x7C0" />
|
||||
<Texture Name="object_wiz_Tex_000BC0" OutName="tex_000BC0" Format="i4" Width="32" Height="32" Offset="0xBC0" />
|
||||
<!-- <Blob Name="object_wiz_Blob_000DC0" Size="0x80" Offset="0xDC0" /> -->
|
||||
<Texture Name="object_wiz_Tex_000DC0" OutName="tex_000DC0" Format="i4" Width="16" Height="16" Offset="0xDC0" />
|
||||
<DList Name="object_wiz_DL_000E70" Offset="0xE70" />
|
||||
<DList Name="object_wiz_DL_000F28" Offset="0xF28" />
|
||||
<DList Name="object_wiz_DL_000FD8" Offset="0xFD8" />
|
||||
|
||||
@@ -74,7 +74,12 @@
|
||||
<Texture Name="object_zog_Tex_024150" OutName="tex_024150" Format="rgba16" Width="16" Height="16" Offset="0x24150" />
|
||||
<Texture Name="object_zog_Tex_024350" OutName="tex_024350" Format="ci8" Width="16" Height="32" Offset="0x24350" />
|
||||
<Texture Name="object_zog_Tex_024550" OutName="tex_024550" Format="ci8" Width="16" Height="32" Offset="0x24550" />
|
||||
<!-- <Blob Name="object_zog_Blob_024750" Size="0x2800" Offset="0x24750" /> -->
|
||||
<Texture Name="object_zog_Tex_024750" OutName="tex_024750" Format="rgba16" Width="32" Height="32" Offset="0x24750" />
|
||||
<Texture Name="object_zog_Tex_024F50" OutName="tex_024F50" Format="rgba16" Width="32" Height="32" Offset="0x24F50" />
|
||||
<Texture Name="object_zog_Tex_025750" OutName="tex_025750" Format="rgba16" Width="32" Height="32" Offset="0x25750" />
|
||||
<Texture Name="object_zog_Tex_025F50" OutName="tex_025F50" Format="rgba16" Width="32" Height="32" Offset="0x25F50" />
|
||||
<Texture Name="object_zog_Tex_026750" OutName="tex_026750" Format="rgba16" Width="32" Height="32" Offset="0x26750" />
|
||||
<Blob Name="object_zog_Blob_026F50" Size="0x1150" Offset="0x26F50" />
|
||||
<DList Name="object_zog_DL_0280A0" Offset="0x280A0" />
|
||||
<DList Name="object_zog_DL_0280A8" Offset="0x280A8" />
|
||||
<Texture Name="object_zog_Tex_028610" OutName="tex_028610" Format="rgba16" Width="16" Height="16" Offset="0x28610" />
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<Root>
|
||||
<File Name="ovl_En_Bigslime" OutName="gBigslimeStaticVtx" BaseAddress="0x808E4FC0" RangeStart="0x8680" RangeEnd="0xAF00">
|
||||
<Array Name="sBigslimeStaticVtx" Count="162" Offset="0x8680">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
</File>
|
||||
<File Name="ovl_En_Bigslime" OutName="gBigslimeDynamicState0Vtx" BaseAddress="0x808E4FC0" RangeStart="0x8680" RangeEnd="0xAF00">
|
||||
<Array Name="sBigslimeDynamicState0Vtx" Count="162" Offset="0x90A0">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
</File>
|
||||
<File Name="ovl_En_Bigslime" OutName="gBigslimeDynamicState1Vtx" BaseAddress="0x808E4FC0" RangeStart="0x8680" RangeEnd="0xAF00">
|
||||
<Array Name="sBigslimeDynamicState1Vtx" Count="162" Offset="0x9AC0">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
</File>
|
||||
<File Name="ovl_En_Bigslime" OutName="gBigslimeTargetVtx" BaseAddress="0x808E4FC0" RangeStart="0x8680" RangeEnd="0xAF00">
|
||||
<Array Name="sBigslimeTargetVtx" Count="162" Offset="0xA4E0">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
</File>
|
||||
</Root>
|
||||
@@ -0,0 +1,6 @@
|
||||
<Root>
|
||||
<File Name="ovl_En_Bomjima" BaseAddress="0x80BFE170" RangeStart="0x2998" RangeEnd="0x29B8">
|
||||
<DList Name="gEnBomjima_D_80C00B08" Offset="0x2998"/>
|
||||
<DList Name="gEnBomjima_D_80C00B18" Offset="0x29A8"/>
|
||||
</File>
|
||||
</Root>
|
||||
@@ -0,0 +1,6 @@
|
||||
<Root>
|
||||
<File Name="ovl_En_Bomjimb" BaseAddress="0x80C00EA0" RangeStart="0x23A0" RangeEnd="0x23C0">
|
||||
<DList Name="gEnBomjimb_D_80C03240" Offset="0x23A0"/>
|
||||
<DList Name="gEnBomjimb_D_80C03250" Offset="0x23B0"/>
|
||||
</File>
|
||||
</Root>
|
||||
@@ -0,0 +1,9 @@
|
||||
<Root>
|
||||
<File Name="ovl_En_Kanban" BaseAddress="0x80954960" RangeStart="0x3440" RangeEnd="0x3500">
|
||||
<Array Name="gEnKanban_D_80957DA0" Count="4" Offset="0x3440">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
|
||||
<DList Name="gEnKanban_D_80957DE0" Offset="0x3480"/>
|
||||
</File>
|
||||
</Root>
|
||||
@@ -0,0 +1,14 @@
|
||||
<Root>
|
||||
<File Name="ovl_En_Mm2" BaseAddress="0x809A2030" RangeStart="0x240" RangeEnd="0xAD0">
|
||||
<Texture Name="sEnMm2EnvelopeTex" OutName="mm2_envelope" Format="i8" Width="32" Height="32" Offset="0x240"/>
|
||||
<Texture Name="sEnMm2LetterTex" OutName="mm2_letter" Format="i8" Width="16" Height="16" Offset="0x640"/>
|
||||
<Array Name="sEnMm21Vtx" Count="10" Offset="0x840">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
<Array Name="sEnMm22Vtx" Count="12" Offset="0x8E0">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
<DList Name="sEnMm2DL" Offset="0x9A8"/>
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
# Building on macOS
|
||||
|
||||
**N.B. C++17 is required to build the asset processing program that we use (ZAPD), so check your OS version can support this before proceeding**
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
For macOS, use Homebrew to install the following dependencies:
|
||||
|
||||
* coreutils
|
||||
* make
|
||||
* python3
|
||||
* libpng
|
||||
* bash
|
||||
* clang-format 11
|
||||
|
||||
You can install them with the following commands:
|
||||
|
||||
```bash
|
||||
brew update
|
||||
brew install coreutils make python3 libpng bash clang-format@11
|
||||
```
|
||||
|
||||
(The repository expects Homebrew-installed programs to be either linked correctly in `$PATH` etc. or in their default locations.)
|
||||
|
||||
|
||||
## Building mips-linux-binutils
|
||||
|
||||
The following instructions are written for MacOS users but should apply to any Unix-like system, with maybe some modifications at the end regarding the bash_profile.
|
||||
|
||||
Create destination dir for binutils
|
||||
```bash
|
||||
sudo mkdir -p /opt/cross
|
||||
```
|
||||
|
||||
Create and enter local working dir
|
||||
```bash
|
||||
mkdir ~/binutils-tmp
|
||||
cd ~/binutils-tmp
|
||||
```
|
||||
|
||||
Get and extract binutils source
|
||||
```bash
|
||||
wget https://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.bz2
|
||||
tar xjf binutils-2.35.tar.bz2
|
||||
```
|
||||
(You may find this command does not work: if so, just access the URL in a browser and save it to `~/binutils-tmp`.)
|
||||
|
||||
Create and enter a build directory
|
||||
```bash
|
||||
mkdir build-binutils
|
||||
cd build-binutils
|
||||
```
|
||||
|
||||
Configure the build
|
||||
```bash
|
||||
../binutils-2.35/configure --target=mips-linux-gnu --prefix=/opt/cross --disable-gprof --disable-gdb --disable-werror
|
||||
```
|
||||
|
||||
Make and install binutils
|
||||
```bash
|
||||
make -j
|
||||
sudo make install
|
||||
```
|
||||
|
||||
Edit your `~/.bash_profile`/`~/.zsh_profile` (or whichever shell you use) to add the new binutils binaries to the system PATH
|
||||
```bash
|
||||
echo "export PATH=$PATH:/opt/cross/bin" >> ~/.bash_profile
|
||||
```
|
||||
|
||||
Reload ~/.bash_profile (or just launch a new terminal tab)
|
||||
```bash
|
||||
source ~/.bash_profile
|
||||
```
|
||||
|
||||
If this worked, you can now delete the temporary directory `~/binutils-tmp`.
|
||||
|
||||
|
||||
## Final note
|
||||
|
||||
Apple's version of `make` is very out-of-date, so you should use the brew-installed `gmake` in place of `make` in this repo from now on.
|
||||
|
||||
You should now be able to continue from [step 2](README.md#2-clone-the-repository) of the Linux instructions.
|
||||
@@ -63,7 +63,7 @@ void EnMs_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06003DC0, &D_060005EC, this->jointTable, this->morphTable, 9);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinderType1(globalCtx, &this->collider, &this->actor, &D_80952BA0);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, func_800B3FC0, 35.0f);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
|
||||
Actor_SetScale(&this->actor, 0.015f);
|
||||
this->actor.colChkInfo.mass = 0xFF;
|
||||
this->actionFunc = func_80952734;
|
||||
@@ -87,7 +87,7 @@ void func_80952734(EnMs* this, GlobalContext* globalCtx) {
|
||||
this->actor.textId = 0x932;
|
||||
}
|
||||
|
||||
if (func_800B84D0(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) != 0) {
|
||||
this->actionFunc = func_809527F8;
|
||||
return;
|
||||
}
|
||||
@@ -107,12 +107,12 @@ void func_809529AC(EnMs *this, GlobalContext *globalCtx) {
|
||||
func_800B8500(&this->actor, globalCtx, this->actor.xzDistToPlayer, this->actor.playerHeightRel, 0);
|
||||
this->actionFunc = func_80952A1C;
|
||||
} else {
|
||||
func_800B8A1C(&this->actor, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_PickUp(&this->actor, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80952A1C(EnMs *this, GlobalContext *globalCtx) {
|
||||
if (func_800B84D0(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
|
||||
func_80151938(globalCtx, 0x936U);
|
||||
this->actionFunc = func_809527F8;
|
||||
} else {
|
||||
@@ -124,7 +124,7 @@ void EnMs_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
EnMs* this = THIS;
|
||||
|
||||
Actor_SetHeight(&this->actor, 20.0f);
|
||||
Actor_SetFocus(&this->actor, 20.0f);
|
||||
this->actor.targetArrowOffset = 500.0f;
|
||||
Actor_SetScale(&this->actor, 0.015f);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
@@ -156,7 +156,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
u8 temp_v0;
|
||||
u8 temp_v0_2;
|
||||
|
||||
temp_v0 = func_80152498(&globalCtx->msgCtx);
|
||||
temp_v0 = Message_GetState(&globalCtx->msgCtx);
|
||||
if (temp_v0 != 4) {
|
||||
if (temp_v0 != 5) {
|
||||
if ((temp_v0 == 6) && (func_80147624(globalCtx) != 0)) {
|
||||
@@ -168,7 +168,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
}
|
||||
if (func_80147624(globalCtx) != 0) {
|
||||
func_801477B4(globalCtx);
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
}
|
||||
@@ -198,7 +198,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
return;
|
||||
}
|
||||
func_8019F208();
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
func_801159EC(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
}
|
||||
@@ -208,7 +208,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
which is long, messy, and contains some rather nasty-looking control flow, including horrors like
|
||||
|
||||
```C
|
||||
temp_v0 = func_80152498(&globalCtx->msgCtx);
|
||||
temp_v0 = Message_GetState(&globalCtx->msgCtx);
|
||||
if (temp_v0 != 4) {
|
||||
if (temp_v0 != 5) {
|
||||
if ((temp_v0 == 6) && (func_80147624(globalCtx) != 0)) {
|
||||
@@ -238,7 +238,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
u8 temp_v0;
|
||||
u8 temp_v0_2;
|
||||
|
||||
temp_v0 = func_80152498(&globalCtx->msgCtx);
|
||||
temp_v0 = Message_GetState(&globalCtx->msgCtx);
|
||||
if (temp_v0 == 4) {
|
||||
goto block_7;
|
||||
}
|
||||
@@ -258,7 +258,7 @@ block_5:
|
||||
goto block_17;
|
||||
}
|
||||
func_801477B4(globalCtx);
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
block_7:
|
||||
@@ -290,7 +290,7 @@ block_13:
|
||||
return;
|
||||
block_15:
|
||||
func_8019F208();
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
func_801159EC(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
@@ -340,7 +340,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
u8 temp_v0;
|
||||
u8 temp_v0_2;
|
||||
|
||||
temp_v0 = func_80152498(&globalCtx->msgCtx);
|
||||
temp_v0 = Message_GetState(&globalCtx->msgCtx);
|
||||
if (temp_v0 == 4) {
|
||||
goto block_7;
|
||||
}
|
||||
@@ -360,7 +360,7 @@ block_5:
|
||||
goto block_17;
|
||||
}
|
||||
func_801477B4(globalCtx);
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
block_7:
|
||||
@@ -390,7 +390,7 @@ block_11:
|
||||
}
|
||||
|
||||
func_8019F208();
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
func_801159EC(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
@@ -410,7 +410,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
u8 temp_v0;
|
||||
u8 temp_v0_2;
|
||||
|
||||
temp_v0 = func_80152498(&globalCtx->msgCtx);
|
||||
temp_v0 = Message_GetState(&globalCtx->msgCtx);
|
||||
if (temp_v0 == 4) {
|
||||
goto block_7;
|
||||
}
|
||||
@@ -430,7 +430,7 @@ block_5:
|
||||
return;
|
||||
}
|
||||
func_801477B4(globalCtx);
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
block_7:
|
||||
@@ -460,7 +460,7 @@ block_11:
|
||||
}
|
||||
|
||||
func_8019F208();
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
func_801159EC(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
@@ -509,7 +509,7 @@ So let us rewrite the entire second half as a switch:
|
||||
}
|
||||
|
||||
func_8019F208();
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
func_801159EC(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
@@ -540,7 +540,7 @@ There's a couple of other obvious things here:
|
||||
func_80151938(globalCtx, 0x937U);
|
||||
} else {
|
||||
func_8019F208();
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
func_801159EC(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
}
|
||||
@@ -568,7 +568,7 @@ can be swapped round and made to wrap the switch. This leaves us with
|
||||
void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
u8 temp_v0;
|
||||
|
||||
temp_v0 = func_80152498(&globalCtx->msgCtx);
|
||||
temp_v0 = Message_GetState(&globalCtx->msgCtx);
|
||||
if (temp_v0 == 4) {
|
||||
goto block_7;
|
||||
}
|
||||
@@ -588,7 +588,7 @@ block_5:
|
||||
return;
|
||||
}
|
||||
func_801477B4(globalCtx);
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809529AC;
|
||||
return;
|
||||
block_7:
|
||||
@@ -605,7 +605,7 @@ block_7:
|
||||
func_80151938(globalCtx, 0x937U);
|
||||
} else {
|
||||
func_8019F208();
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
func_801159EC(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
}
|
||||
@@ -623,7 +623,7 @@ block_7:
|
||||
|
||||
Now, the top of the function also looks like a switch:
|
||||
```C
|
||||
temp_v0 = func_80152498(&globalCtx->msgCtx);
|
||||
temp_v0 = Message_GetState(&globalCtx->msgCtx);
|
||||
if (temp_v0 == 4) {
|
||||
goto block_7;
|
||||
}
|
||||
@@ -641,7 +641,7 @@ Putting all this together, we write down a function with no gotos in it:
|
||||
|
||||
```C
|
||||
void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
switch (func_80152498(&globalCtx->msgCtx)) {
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case 6:
|
||||
this->actionFunc = func_80952734;
|
||||
break;
|
||||
@@ -651,7 +651,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
return;
|
||||
}
|
||||
func_801477B4(globalCtx);
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809529AC;
|
||||
break;
|
||||
|
||||
@@ -660,7 +660,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
func_801477B4(globalCtx);
|
||||
|
||||
|
||||
if (gSaveContext.rupees < 0xA) {
|
||||
play_sound(0x4806U);
|
||||
func_80151938(globalCtx, 0x935U);
|
||||
@@ -669,7 +669,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
func_80151938(globalCtx, 0x937U);
|
||||
} else {
|
||||
func_8019F208();
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
func_801159EC(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
}
|
||||
@@ -694,7 +694,7 @@ Lastly, we can simplify `case 5` to replace the return in the if by the rest of
|
||||
|
||||
```C
|
||||
void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
switch (func_80152498(&globalCtx->msgCtx)) {
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
case 6:
|
||||
this->actionFunc = func_80952734;
|
||||
break;
|
||||
@@ -702,7 +702,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
case 5:
|
||||
if (func_80147624(globalCtx) != 0) {
|
||||
func_801477B4(globalCtx);
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
this->actionFunc = func_809529AC;
|
||||
}
|
||||
break;
|
||||
@@ -712,7 +712,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
switch (globalCtx->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
func_801477B4(globalCtx);
|
||||
|
||||
|
||||
if (gSaveContext.rupees < 0xA) {
|
||||
play_sound(0x4806U);
|
||||
func_80151938(globalCtx, 0x935U);
|
||||
@@ -721,7 +721,7 @@ void func_809527F8(EnMs *this, GlobalContext *globalCtx) {
|
||||
func_80151938(globalCtx, 0x937U);
|
||||
} else {
|
||||
func_8019F208();
|
||||
func_800B8A1C((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
Actor_PickUp((Actor *) this, globalCtx, 0x35, 90.0f, 10.0f);
|
||||
func_801159EC(-0xA);
|
||||
this->actionFunc = func_809529AC;
|
||||
}
|
||||
|
||||
@@ -148,9 +148,9 @@ void func_80C1019C(EnRecepgirl* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
if (func_800B84D0(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) != 0) {
|
||||
func_80C10290(this);
|
||||
} else if (Actor_IsActorFacingLink(&this->actor, 0x2000)) {
|
||||
} else if (Actor_IsFacingPlayer(&this->actor, 0x2000)) {
|
||||
func_800B8614(&this->actor, globalCtx, 60.0f);
|
||||
if (Player_GetMask(globalCtx) == 2) {
|
||||
this->actor.textId = 0x2367;
|
||||
@@ -188,7 +188,7 @@ void func_80C102D4(EnRecepgirl *this, GlobalContext *globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
temp_v0_2 = func_80152498(&globalCtx->msgCtx);
|
||||
temp_v0_2 = Message_GetState(&globalCtx->msgCtx);
|
||||
if (temp_v0_2 == 2) {
|
||||
this->actor.textId = 0x2ADC;
|
||||
func_80C10148(this);
|
||||
@@ -197,7 +197,7 @@ void func_80C102D4(EnRecepgirl *this, GlobalContext *globalCtx) {
|
||||
|
||||
if ((temp_v0_2 == 5) && (func_80147624(globalCtx) != 0)) {
|
||||
if (this->actor.textId == 0x2AD9) {
|
||||
Actor_SetSwitchFlag(globalCtx, this->actor.params);
|
||||
Flags_SetSwitch(globalCtx, this->actor.params);
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &D_0600AD98, 10.0f);
|
||||
if ((gSaveContext.weekEventReg[63] & 0x80)) {
|
||||
this->actor.textId = 0x2ADF;
|
||||
@@ -476,9 +476,9 @@ void func_80C1019C(EnRecepgirl* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
if (func_800B84D0(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) != 0) {
|
||||
func_80C10290(this);
|
||||
} else if (Actor_IsActorFacingLink(&this->actor, 0x2000)) {
|
||||
} else if (Actor_IsFacingPlayer(&this->actor, 0x2000)) {
|
||||
func_800B8614(&this->actor, globalCtx, 60.0f);
|
||||
if (Player_GetMask(globalCtx) == PLAYER_MASK_KAFEIS_MASK) {
|
||||
this->actor.textId = 0x2367; // "... doesn't Kafei want to break off his engagement ... ?"
|
||||
@@ -514,13 +514,13 @@ void func_80C102D4(EnRecepgirl* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
temp_v0_2 = func_80152498(&globalCtx->msgCtx);
|
||||
temp_v0_2 = Message_GetState(&globalCtx->msgCtx);
|
||||
if (temp_v0_2 == 2) {
|
||||
this->actor.textId = 0x2ADC; // hear directions again?
|
||||
func_80C10148(this);
|
||||
} else if ((temp_v0_2 == 5) && (func_80147624(globalCtx) != 0)) {
|
||||
if (this->actor.textId == 0x2AD9) { // "Welcome..."
|
||||
Actor_SetSwitchFlag(globalCtx, this->actor.params);
|
||||
Flags_SetSwitch(globalCtx, this->actor.params);
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &D_0600AD98, 10.0f);
|
||||
if (gSaveContext.weekEventReg[63] & 0x80) { // showed Couple's Mask to meeting
|
||||
this->actor.textId = 0x2ADF; // Mayor's office is on the left (meeting ended)
|
||||
@@ -546,7 +546,7 @@ void func_80C102D4(EnRecepgirl* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
```
|
||||
All this branching is to make the conversation look more diverse and interesting. Notably, though, `func_80C1019C` is set to start with, and is only changed when `func_800B84D0(&this->actor, globalCtx) != 0`. This is something to do with talking. The other function handles the rest of the conversation, and hands back to the first if `func_80152498(&globalCtx->msgCtx) == 2`. This function is *something* to do with the text state, which will require `z_message` to be decomped. However, observation in-game will reveal this is something to do with ending dialogue. So we can conclude that the action functions are `EnRecepgirl_Wait` and `EnRecepgirl_Talk`. The setup functions are thus `EnRecepgirl_SetupWait` and `EnRecepgirl_SetupTalk`.
|
||||
All this branching is to make the conversation look more diverse and interesting. Notably, though, `func_80C1019C` is set to start with, and is only changed when `Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) != 0`. This is something to do with talking. The other function handles the rest of the conversation, and hands back to the first if `Message_GetState(&globalCtx->msgCtx) == 2`. This function is *something* to do with the text state, which will require `z_message` to be decomped. However, observation in-game will reveal this is something to do with ending dialogue. So we can conclude that the action functions are `EnRecepgirl_Wait` and `EnRecepgirl_Talk`. The setup functions are thus `EnRecepgirl_SetupWait` and `EnRecepgirl_SetupTalk`.
|
||||
|
||||
For more complex actors, we have a tool called `graphovl.py` that can produce function flow graphs for actors: running
|
||||
```
|
||||
|
||||
@@ -27,7 +27,7 @@ glabel func_809529AC
|
||||
/* 0003D8 809529F8 C484009C */ lwc1 $f4, 0x9c($a0)
|
||||
/* 0003DC 809529FC 8C870098 */ lw $a3, 0x98($a0)
|
||||
/* 0003E0 80952A00 24060035 */ addiu $a2, $zero, 0x35
|
||||
/* 0003E4 80952A04 0C02E287 */ jal func_800B8A1C
|
||||
/* 0003E4 80952A04 0C02E287 */ jal Actor_PickUp
|
||||
/* 0003E8 80952A08 E7A40010 */ swc1 $f4, 0x10($sp)
|
||||
.L80952A0C:
|
||||
/* 0003EC 80952A0C 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
@@ -46,7 +46,7 @@ void func_809529AC(EnMs *this, GlobalContext *globalCtx) {
|
||||
func_800B8500(&this->actor, globalCtx, this->actor.xzDistToPlayer, this->actor.playerHeightRel, 0);
|
||||
this->actionFunc = func_80952A1C;
|
||||
} else {
|
||||
func_800B8A1C(&this->actor, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
Actor_PickUp(&this->actor, globalCtx, 0x35, this->actor.xzDistToPlayer, this->actor.playerHeightRel);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -116,11 +116,11 @@ void func_80C1019C(EnRecepgirl *this, GlobalContext *globalCtx) {
|
||||
Animation_ChangeTransitionRepeat(temp_a0, &D_06009890, -4.0f);
|
||||
}
|
||||
}
|
||||
if (func_800B84D0((Actor *) this, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest((Actor *) this, globalCtx) != 0) {
|
||||
func_80C10290(this);
|
||||
return;
|
||||
}
|
||||
if (Actor_IsActorFacingLink((Actor *) this, 0x2000) != 0) {
|
||||
if (Actor_IsFacingPlayer((Actor *) this, 0x2000) != 0) {
|
||||
func_800B8614((Actor *) this, globalCtx, 60.0f);
|
||||
if (Player_GetMask(globalCtx) == 2) {
|
||||
this->actor.textId = 0x2367;
|
||||
@@ -168,11 +168,11 @@ void func_80C1019C(EnRecepgirl *this, GlobalContext *globalCtx) {
|
||||
Animation_ChangeTransitionRepeat(&this->skelAnime, &D_06009890, -4.0f);
|
||||
}
|
||||
}
|
||||
if (func_800B84D0(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) != 0) {
|
||||
func_80C10290(this);
|
||||
return;
|
||||
}
|
||||
if (Actor_IsActorFacingLink(&this->actor, 0x2000) != 0) {
|
||||
if (Actor_IsFacingPlayer(&this->actor, 0x2000) != 0) {
|
||||
func_800B8614(&this->actor, globalCtx, 60.0f);
|
||||
if (Player_GetMask(globalCtx) == 2) {
|
||||
this->actor.textId = 0x2367;
|
||||
@@ -203,9 +203,9 @@ void func_80C1019C(EnRecepgirl* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
if (func_800B84D0(&this->actor, globalCtx) != 0) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state) != 0) {
|
||||
func_80C10290(this);
|
||||
} else if (Actor_IsActorFacingLink(&this->actor, 0x2000)) {
|
||||
} else if (Actor_IsFacingPlayer(&this->actor, 0x2000)) {
|
||||
func_800B8614(&this->actor, globalCtx, 60.0f);
|
||||
if (Player_GetMask(globalCtx) == 2) {
|
||||
this->actor.textId = 0x2367;
|
||||
@@ -282,7 +282,7 @@ void func_80C102D4(EnRecepgirl *this, GlobalContext *globalCtx) {
|
||||
Animation_MorphToPlayOnce(sp20, &D_0600A280, -4.0f);
|
||||
}
|
||||
}
|
||||
temp_v0_2 = func_80152498(&globalCtx->msgCtx);
|
||||
temp_v0_2 = Message_GetState(&globalCtx->msgCtx);
|
||||
if (temp_v0_2 == 2) {
|
||||
this->actor.textId = 0x2ADC;
|
||||
func_80C10148(this);
|
||||
@@ -291,7 +291,7 @@ void func_80C102D4(EnRecepgirl *this, GlobalContext *globalCtx) {
|
||||
if (((temp_v0_2 & 0xFF) == 5) && (func_80147624(globalCtx) != 0)) {
|
||||
temp_v0_3 = this->actor.textId;
|
||||
if (temp_v0_3 == 0x2AD9) {
|
||||
Actor_SetSwitchFlag(globalCtx, (s32) this->actor.params);
|
||||
Flags_SetSwitch(globalCtx, (s32) this->actor.params);
|
||||
Animation_MorphToPlayOnce(sp20, &D_0600AD98, 10.0f);
|
||||
if ((*(&gSaveContext + 0xF37) & 0x80) != 0) {
|
||||
this->actor.textId = 0x2ADF;
|
||||
@@ -340,7 +340,7 @@ void func_80C102D4(EnRecepgirl *this, GlobalContext *globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
temp_v0_2 = func_80152498(&globalCtx->msgCtx);
|
||||
temp_v0_2 = Message_GetState(&globalCtx->msgCtx);
|
||||
if (temp_v0_2 == 2) {
|
||||
this->actor.textId = 0x2ADC;
|
||||
func_80C10148(this);
|
||||
@@ -349,7 +349,7 @@ void func_80C102D4(EnRecepgirl *this, GlobalContext *globalCtx) {
|
||||
|
||||
if (((temp_v0_2 & 0xFF) == 5) && (func_80147624(globalCtx) != 0)) {
|
||||
if (this->actor.textId == 0x2AD9) {
|
||||
Actor_SetSwitchFlag(globalCtx, this->actor.params);
|
||||
Flags_SetSwitch(globalCtx, this->actor.params);
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &D_0600AD98, 10.0f);
|
||||
if ((*(&gSaveContext + 0xF37) & 0x80) != 0) {
|
||||
this->actor.textId = 0x2ADF;
|
||||
@@ -390,7 +390,7 @@ The yellow shows registers that don't match, the different colours on the regist
|
||||
```
|
||||
somehow we skipped over `t0`. Where is this in the code? The `153` in the middle is the line number in the C file (the `3f0`s are the offsets into the assembly file), we have `--source` if you want to see the code explicitly, or you can do it the old-fashioned way, and work it out from nearby function calls. In this case, `func_80C10148` is run straight after, and the only place that is called is
|
||||
```C
|
||||
temp_v0_2 = func_80152498(&globalCtx->msgCtx);
|
||||
temp_v0_2 = Message_GetState(&globalCtx->msgCtx);
|
||||
if (temp_v0_2 == 2) {
|
||||
this->actor.textId = 0x2ADC;
|
||||
func_80C10148(this);
|
||||
|
||||
+28
-21
@@ -1,9 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse, json, os, signal, time, colorama
|
||||
from multiprocessing import Pool, Event, Manager
|
||||
import argparse, json, os, signal, time, colorama, multiprocessing
|
||||
|
||||
colorama.init();
|
||||
colorama.init()
|
||||
|
||||
EXTRACTED_ASSETS_NAMEFILE = ".extracted-assets.json"
|
||||
|
||||
@@ -71,33 +70,33 @@ def initializeWorker(abort, unaccounted: bool, extractedAssetsTracker: dict, man
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="baserom asset extractor")
|
||||
parser.add_argument("-s", "--single", help="asset path relative to assets/, e.g. objects/gameplay_keep")
|
||||
parser.add_argument("-t", "--threads", help="Number of cpu cores to extract with.")
|
||||
parser.add_argument("-f", "--force", help="Force the extraction of every xml instead of checking the touched ones.", action="store_true")
|
||||
parser.add_argument("-j", "--jobs", help="Number of cpu cores to extract with.")
|
||||
parser.add_argument("-u", "--unaccounted", help="Enables ZAPD unaccounted detector warning system.", action="store_true")
|
||||
parser.add_argument("-Z", help="Pass the argument on to ZAPD, e.g. `-ZWunaccounted` to warn about unaccounted blocks in XMLs. Each argument should be passed separately, *without* the leading dash.", metavar="ZAPD_ARG", action="append")
|
||||
args = parser.parse_args()
|
||||
|
||||
global ZAPDArgs;
|
||||
ZAPDArgs = "";
|
||||
global ZAPDArgs
|
||||
ZAPDArgs = ""
|
||||
if args.Z is not None:
|
||||
badZAPDArg = False;
|
||||
badZAPDArg = False
|
||||
for i in range(len(args.Z)):
|
||||
z = args.Z[i]
|
||||
if z[0] == '-':
|
||||
print(f"{colorama.Fore.LIGHTRED_EX}error{colorama.Fore.RESET}: argument \"{z}\" starts with \"-\", which is not supported.", file=os.sys.stderr);
|
||||
badZAPDArg = True;
|
||||
print(f"{colorama.Fore.LIGHTRED_EX}error{colorama.Fore.RESET}: argument \"{z}\" starts with \"-\", which is not supported.", file=os.sys.stderr)
|
||||
badZAPDArg = True
|
||||
else:
|
||||
args.Z[i] = "-" + z;
|
||||
args.Z[i] = "-" + z
|
||||
|
||||
if badZAPDArg:
|
||||
exit(1);
|
||||
exit(1)
|
||||
|
||||
ZAPDArgs = " ".join(args.Z);
|
||||
print("Using extra ZAPD arguments: " + ZAPDArgs);
|
||||
ZAPDArgs = " ".join(args.Z)
|
||||
print("Using extra ZAPD arguments: " + ZAPDArgs)
|
||||
|
||||
global mainAbort
|
||||
mainAbort = Event()
|
||||
manager = Manager()
|
||||
mainAbort = multiprocessing.Event()
|
||||
manager = multiprocessing.Manager()
|
||||
signal.signal(signal.SIGINT, SignalHandler)
|
||||
|
||||
extractedAssetsTracker = manager.dict()
|
||||
@@ -125,12 +124,20 @@ def main():
|
||||
if file.endswith(".xml"):
|
||||
xmlFiles.append(fullPath)
|
||||
|
||||
numCores = int(args.threads or 0)
|
||||
if numCores <= 0:
|
||||
numCores = 1
|
||||
print("Extracting assets with " + str(numCores) + " CPU core" + ("s" if numCores > 1 else "") + ".")
|
||||
with Pool(numCores, initializer=initializeWorker, initargs=(mainAbort, args.unaccounted, extractedAssetsTracker, manager)) as p:
|
||||
p.map(ExtractFunc, xmlFiles)
|
||||
try:
|
||||
numCores = int(args.jobs or 0)
|
||||
if numCores <= 0:
|
||||
numCores = 1
|
||||
print("Extracting assets with " + str(numCores) + " CPU core" + ("s" if numCores > 1 else "") + ".")
|
||||
with multiprocessing.get_context("fork").Pool(numCores, initializer=initializeWorker, initargs=(mainAbort, args.unaccounted, extractedAssetsTracker, manager)) as p:
|
||||
p.map(ExtractFunc, xmlFiles)
|
||||
except (multiprocessing.ProcessError, TypeError):
|
||||
print("Warning: Multiprocessing exception ocurred.", file=os.sys.stderr)
|
||||
print("Disabling mutliprocessing.", file=os.sys.stderr)
|
||||
|
||||
initializeWorker(mainAbort, args.unaccounted, extractedAssetsTracker, manager)
|
||||
for singlePath in xmlFiles:
|
||||
ExtractFunc(singlePath)
|
||||
|
||||
with open(EXTRACTED_ASSETS_NAMEFILE, 'w', encoding='utf-8') as f:
|
||||
serializableDict = dict()
|
||||
|
||||
@@ -5,6 +5,16 @@ FORMAT_OPTS="-i -style=file"
|
||||
TIDY_OPTS="-p . --fix --fix-errors"
|
||||
COMPILER_OPTS="-fno-builtin -std=gnu90 -Iinclude -Isrc -D_LANGUAGE_C -DNON_MATCHING"
|
||||
|
||||
# https://backreference.org/2010/05/23/sanitizing-files-with-no-trailing-newline/index.html
|
||||
# "gets the last character of the file pipes it into read, which will exit with a nonzero exit code if it encounters EOF before newline (so, if the last character of the file isn't a newline). If read exits nonzero, then append a newline onto the file using echo (if read exits 0, that satisfies the ||, so the echo command isn't run)." (https://stackoverflow.com/a/34865616)
|
||||
function add_final_newline () {
|
||||
for file in "$@"
|
||||
do
|
||||
tail -c1 $file | read -r _ || echo >> $file
|
||||
done
|
||||
}
|
||||
export -f add_final_newline
|
||||
|
||||
shopt -s globstar
|
||||
|
||||
if [ -z `command -v clang-format-${FORMAT_VER}` ]
|
||||
@@ -20,7 +30,7 @@ if (( $# > 0 )); then
|
||||
echo "Running clang-tidy..."
|
||||
clang-tidy ${TIDY_OPTS} "$@" -- ${COMPILER_OPTS} &> /dev/null
|
||||
echo "Adding missing final new lines..."
|
||||
sed -i -e '$a\' "$@"
|
||||
add_final_newline "$@"
|
||||
echo "Done formatting file(s) $*"
|
||||
exit
|
||||
fi
|
||||
@@ -31,6 +41,6 @@ clang-format-${FORMAT_VER} ${FORMAT_OPTS} src/**/*.c
|
||||
echo "Running clang-tidy..."
|
||||
clang-tidy ${TIDY_OPTS} src/**/*.c -- ${COMPILER_OPTS} &> /dev/null
|
||||
echo "Adding missing final new lines..."
|
||||
find src/ -type f -name "*.c" -exec sed -i -e '$a\' {} \;
|
||||
find assets/xml/ -type f -name "*.xml" -exec sed -i -e '$a\' {} \;
|
||||
find src/ -type f -name "*.c" -exec bash -c 'add_final_newline "$@"' bash {} +
|
||||
find assets/xml/ -type f -name "*.xml" -exec bash -c 'add_final_newline "$@"' bash {} +
|
||||
echo "Done formatting all files."
|
||||
|
||||
+302
-433
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,39 @@
|
||||
#ifndef _INITVARS_H_
|
||||
#define _INITVARS_H_
|
||||
|
||||
extern EffectSsInit Effect_Ss_Dust_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Kirakira_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Bomb2_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Blast_InitVars;
|
||||
extern EffectSsInit Effect_Ss_G_Spk_InitVars;
|
||||
extern EffectSsInit Effect_Ss_D_Fire_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Bubble_InitVars;
|
||||
extern EffectSsInit Effect_Ss_G_Ripple_InitVars;
|
||||
extern EffectSsInit Effect_Ss_G_Splash_InitVars;
|
||||
extern EffectSsInit Effect_Ss_G_Fire_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Lightning_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Dt_Bubble_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Hahen_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Stick_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Sibuki_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Stone1_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Hitmark_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Fhg_Flash_InitVars;
|
||||
extern EffectSsInit Effect_Ss_K_Fire_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Solder_Srch_Ball_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Kakera_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Ice_Piece_InitVars;
|
||||
extern EffectSsInit Effect_Ss_En_Ice_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Fire_Tail_InitVars;
|
||||
extern EffectSsInit Effect_Ss_En_Fire_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Extra_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Dead_Db_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Dead_Dd_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Dead_Ds_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Ice_Smoke_InitVars;
|
||||
extern EffectSsInit Effect_En_Ice_Block_InitVars;
|
||||
extern EffectSsInit Effect_Ss_Sbn_InitVars;
|
||||
|
||||
extern ActorInit Arms_Hook_InitVars;
|
||||
extern ActorInit Arrow_Fire_InitVars;
|
||||
extern ActorInit Arrow_Ice_InitVars;
|
||||
|
||||
@@ -99,8 +99,8 @@
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 ramarray[15];
|
||||
/* 0x3C */ u32 pifstatus;
|
||||
} OSPifRam;
|
||||
/* 0x3C */ u32 status;
|
||||
} OSPifRam; // size = 0x40
|
||||
|
||||
|
||||
typedef struct {
|
||||
@@ -153,4 +153,11 @@ extern u8 __osMaxControllers;
|
||||
// extern OSMesgQueue D_8009CF38;
|
||||
// extern OSMesg D_8009CF50;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ OSContPad cur;
|
||||
/* 0x06 */ OSContPad prev;
|
||||
/* 0x0C */ OSContPad press; // X/Y store delta from last frame
|
||||
/* 0x12 */ OSContPad rel; // X/Y store adjusted
|
||||
} Input; // size = 0x18
|
||||
|
||||
#endif
|
||||
|
||||
+11
-4
@@ -2,7 +2,7 @@
|
||||
#define _MACROS_H_
|
||||
|
||||
#include "libc/stdint.h"
|
||||
#include "convert.h"
|
||||
#include "ultra64/convert.h"
|
||||
#include "z64.h"
|
||||
|
||||
#define SCREEN_WIDTH 320
|
||||
@@ -39,13 +39,13 @@
|
||||
} \
|
||||
(void)0
|
||||
|
||||
#define GET_PLAYER(globalCtx) ((Player*)(globalCtx)->actorCtx.actorList[ACTORCAT_PLAYER].first)
|
||||
#define GET_PLAYER(globalCtx) ((Player*)(globalCtx)->actorCtx.actorLists[ACTORCAT_PLAYER].first)
|
||||
|
||||
#define GET_FIRST_ENEMY(globalCtx) ((Actor*)(globalCtx)->actorCtx.actorList[ACTORCAT_ENEMY].first)
|
||||
#define GET_FIRST_ENEMY(globalCtx) ((Actor*)(globalCtx)->actorCtx.actorLists[ACTORCAT_ENEMY].first)
|
||||
|
||||
// linkAge still exists in MM, but is always set to 0 (always adult)
|
||||
// There are remnants of these macros from OOT, but they are essentially useless
|
||||
//#define LINK_IS_CHILD (gSaveContext.linkAge != 0)
|
||||
#define LINK_IS_CHILD (gSaveContext.linkAge == 1)
|
||||
#define LINK_IS_ADULT (gSaveContext.linkAge == 0)
|
||||
|
||||
#define CURRENT_DAY (((void)0, gSaveContext.day) % 5)
|
||||
@@ -63,6 +63,7 @@
|
||||
((((void)0, gSaveContext.equips.equipment) & gEquipMasks[equip]) >> gEquipShifts[equip])
|
||||
#define CUR_UPG_VALUE_VOID(upg) \
|
||||
((((void)0, gSaveContext.inventory.upgrades) & gUpgradeMasks[upg]) >> gUpgradeShifts[upg])
|
||||
#define INV_CONTENT_VOID(item) ((void)0, gSaveContext.inventory.items)[SLOT(item)]
|
||||
|
||||
#define CUR_FORM ((gSaveContext.playerForm == PLAYER_FORM_HUMAN) ? 0 : gSaveContext.playerForm)
|
||||
|
||||
@@ -85,6 +86,8 @@
|
||||
#define CHECK_BTN_ALL(state, combo) (~((state) | ~(combo)) == 0)
|
||||
#define CHECK_BTN_ANY(state, combo) (((state) & (combo)) != 0)
|
||||
|
||||
#define CHECK_FLAG_ALL(flags, mask) (((flags) & (mask)) == (mask))
|
||||
|
||||
extern GraphicsContext* __gfxCtx;
|
||||
|
||||
#define WORK_DISP __gfxCtx->work.p
|
||||
@@ -101,6 +104,7 @@ extern GraphicsContext* __gfxCtx;
|
||||
s32 __dispPad
|
||||
|
||||
#define CLOSE_DISPS(gfxCtx) \
|
||||
(void)0; \
|
||||
} \
|
||||
(void)0
|
||||
|
||||
@@ -145,6 +149,9 @@ extern GraphicsContext* __gfxCtx;
|
||||
(b) = _temp; \
|
||||
}
|
||||
|
||||
#define OVERLAY_RELOCATION_OFFSET(overlayEntry) ((uintptr_t)((overlayEntry)->vramStart) - (uintptr_t)((overlayEntry)->loadedRamAddr))
|
||||
#define VRAM_PTR_SIZE(entry) ((uintptr_t)((entry)->vramEnd) - (uintptr_t)((entry)->vramStart))
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define ALIGNED8 __attribute__ ((aligned (8)))
|
||||
#else
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef OS_MALLOC
|
||||
#define OS_MALLOC
|
||||
|
||||
#include "PR/ultratypes.h"
|
||||
#include "ultra64/message.h"
|
||||
#include "libc/stddef.h"
|
||||
|
||||
typedef struct ArenaNode {
|
||||
/* 0x0 */ s16 magic; // Should always be 0x7373
|
||||
/* 0x2 */ s16 isFree;
|
||||
/* 0x4 */ size_t size;
|
||||
/* 0x8 */ struct ArenaNode* next;
|
||||
/* 0xC */ struct ArenaNode* prev;
|
||||
} ArenaNode; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ArenaNode* head;
|
||||
/* 0x04 */ void* start;
|
||||
/* 0x08 */ OSMesgQueue lock;
|
||||
/* 0x20 */ u8 unk20;
|
||||
/* 0x21 */ u8 isInit;
|
||||
/* 0x22 */ u8 flag;
|
||||
} Arena; // size = 0x24
|
||||
|
||||
void __osMallocInit(Arena* arena, void* heap, size_t size);
|
||||
void __osMallocCleanup(Arena* arena);
|
||||
u8 __osMallocIsInitalized(Arena* arena);
|
||||
void* __osMalloc(Arena* arena, size_t size);
|
||||
void* __osMallocR(Arena* arena, size_t size);
|
||||
void __osFree(Arena* arena, void* ptr);
|
||||
void* __osRealloc(Arena* arena, void* ptr, size_t newSize);
|
||||
void __osGetSizes(Arena* arena, size_t* maxFreeBlock, size_t* bytesFree, size_t* bytesAllocated);
|
||||
s32 __osCheckArena(Arena* arena);
|
||||
|
||||
#endif
|
||||
@@ -73,7 +73,7 @@ DECLARE_OVERLAY_SEGMENT(opening)
|
||||
DECLARE_OVERLAY_SEGMENT(file_choose)
|
||||
DECLARE_OVERLAY_SEGMENT(daytelop)
|
||||
DECLARE_OVERLAY_SEGMENT(kaleido_scope)
|
||||
DECLARE_OVERLAY_SEGMENT(Player_Actor)
|
||||
DECLARE_OVERLAY_SEGMENT(player_actor)
|
||||
|
||||
DECLARE_OVERLAY_SEGMENT(En_Test)
|
||||
DECLARE_OVERLAY_SEGMENT(En_GirlA)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef SYSTEM_MALLOC
|
||||
#define SYSTEM_MALLOC
|
||||
|
||||
#include "PR/ultratypes.h"
|
||||
#include "os_malloc.h"
|
||||
|
||||
void* SystemArena_Malloc(size_t size);
|
||||
void* SystemArena_MallocR(size_t size);
|
||||
void* SystemArena_Realloc(void* oldPtr, size_t newSize);
|
||||
void SystemArena_Free(void* ptr);
|
||||
void* SystemArena_Calloc(u32 elements, size_t size);
|
||||
void SystemArena_GetSizes(size_t* maxFreeBlock, size_t* bytesFree, size_t* bytesAllocated);
|
||||
u32 SystemArena_CheckArena(void);
|
||||
void SystemArena_InitArena(void* start, size_t size);
|
||||
void SystemArena_Cleanup(void);
|
||||
u8 SystemArena_IsInitialized(void);
|
||||
|
||||
extern Arena gSystemArena;
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef _ULTRA64_CONVERT_H_
|
||||
#define _ULTRA64_CONVERT_H_
|
||||
#ifndef ULTRA64_CONVERT_H
|
||||
#define ULTRA64_CONVERT_H
|
||||
|
||||
#include "libc/stdint.h"
|
||||
|
||||
@@ -53,6 +53,8 @@
|
||||
#define SP_DMEM_START 0x04000000
|
||||
#define SP_DMEM_SIZE 0x1000
|
||||
|
||||
#define TMEM_SIZE 0x1000
|
||||
|
||||
#define SP_MEM_ADDR_REG 0x04040000
|
||||
#define SP_DRAM_ADDR_REG 0x04040004
|
||||
#define SP_RD_LEN_REG 0x04040008
|
||||
|
||||
+48
-77
@@ -322,7 +322,6 @@ extern StackEntry sFaultThreadInfo;
|
||||
extern FaultThreadStruct gFaultStruct;
|
||||
extern FaultDrawer sFaultDrawerStruct;
|
||||
// extern UNK_TYPE4 D_8009CD10;
|
||||
// extern Arena gSystemArena;
|
||||
extern u32 sRandFloat;
|
||||
// extern UNK_TYPE4 sArenaLockMsg;
|
||||
extern OSTask tmp_task;
|
||||
@@ -374,7 +373,6 @@ extern u8 D_801AE214[32];
|
||||
// extern UNK_TYPE4 D_801AE240;
|
||||
// extern UNK_TYPE4 D_801AE250;
|
||||
extern UNK_PTR D_801AE260[3];
|
||||
// extern UNK_TYPE4 D_801AE26C;
|
||||
// extern UNK_TYPE4 D_801AE27C;
|
||||
// extern UNK_TYPE4 D_801AE28C;
|
||||
// extern UNK_TYPE4 D_801AE29C;
|
||||
@@ -382,9 +380,7 @@ extern UNK_PTR D_801AE260[3];
|
||||
// extern UNK_TYPE4 D_801AE2BC;
|
||||
// extern UNK_TYPE4 D_801AE2CC;
|
||||
// extern UNK_TYPE4 D_801AE2DC;
|
||||
extern F3DVertex sEffectShieldParticleVertices[4];
|
||||
extern EffInfo sEffInfoTable[5];
|
||||
extern EffectSsInfo EffectSS2Info;
|
||||
// extern EffectSsInfo sEffectSsInfo;
|
||||
// extern UNK_TYPE1 D_801AE3B0;
|
||||
// extern UNK_TYPE1 D_801AE3B4;
|
||||
// extern UNK_TYPE4 D_801AE3B8;
|
||||
@@ -412,16 +408,13 @@ extern EffectSsInfo EffectSS2Info;
|
||||
// extern UNK_TYPE1 D_801AE48A;
|
||||
// extern UNK_TYPE1 D_801AE48C;
|
||||
// extern UNK_TYPE1 D_801AE490;
|
||||
extern EffectSsOverlay particleOverlayTable[39];
|
||||
extern EffectSsOverlay gParticleOverlayTable[39];
|
||||
// extern FlagSetEntry sFlagEntries[];
|
||||
// extern s32 sEntryIndex;
|
||||
// extern u32 sCurrentBit;
|
||||
// extern s32 sTimer;
|
||||
extern Color_RGBA8 D_801AEC80;
|
||||
extern s801AEC84 D_801AEC84[13];
|
||||
extern f32 actorMovementScale;
|
||||
extern f32 D_801AECF0;
|
||||
extern f32 D_801AECF4;
|
||||
extern TargetRangeParams gTargetRanges[];
|
||||
extern s16 D_801AED48[8];
|
||||
// extern UNK_TYPE4 D_801AED58;
|
||||
extern Color_RGBA8 actorDefaultHitColor;
|
||||
@@ -870,8 +863,8 @@ extern ColChkVsFunc sOCVsFuncs[COLSHAPE_MAX][COLSHAPE_MAX];
|
||||
extern CollisionCheckInfo defaultColChkInfo;
|
||||
extern ColChkApplyFunc sApplyDamageFuncs[COLSHAPE_MAX];
|
||||
extern ColChkLineFunc sOCLineCheckFuncs[COLSHAPE_MAX];
|
||||
extern EffShieldParticleInit shieldParticleInitMetal;
|
||||
extern EffShieldParticleInit shieldParticleInitWood;
|
||||
extern EffectShieldParticleInit shieldParticleInitMetal;
|
||||
extern EffectShieldParticleInit shieldParticleInitWood;
|
||||
// extern UNK_TYPE4 D_801BB090;
|
||||
// extern UNK_TYPE1 D_801BB094;
|
||||
// extern UNK_TYPE1 D_801BB0DC;
|
||||
@@ -1262,7 +1255,7 @@ extern UNK_PTR D_801C02F8;
|
||||
// extern UNK_TYPE1 D_801C07F0;
|
||||
// extern UNK_TYPE1 D_801C0820;
|
||||
// extern UNK_TYPE1 D_801C0838;
|
||||
// extern UNK_TYPE1 D_801C0850;
|
||||
extern Gfx D_801C0850[];
|
||||
// extern UNK_TYPE1 D_801C0860;
|
||||
extern UNK_PTR D_801C0870;
|
||||
// extern UNK_TYPE1 D_801C0890;
|
||||
@@ -1552,10 +1545,9 @@ extern char D_801D0714[];
|
||||
// extern UNK_TYPE1 D_801D08E8;
|
||||
// extern UNK_TYPE1 D_801D0900;
|
||||
extern ActorInit Player_InitVars;
|
||||
// extern UNK_TYPE1 D_801D0B70;
|
||||
extern KaleidoMgrOverlay gKaleidoMgrOverlayTable[2];
|
||||
// extern UNK_TYPE1 D_801D0B8C;
|
||||
// extern UNK_TYPE4 D_801D0BA8;
|
||||
// extern UNK_TYPE4 D_801D0BAC;
|
||||
extern KaleidoMgrOverlay* gKaleidoMgrCurOvl;
|
||||
// extern UNK_TYPE4 D_801D0BB0;
|
||||
// extern UNK_TYPE1 D_801D0C80;
|
||||
// extern UNK_TYPE1 D_801D0CB0;
|
||||
@@ -1631,10 +1623,10 @@ extern PadMgr* padmgrContext;
|
||||
// extern UNK_TYPE4 D_801D1538;
|
||||
extern UNK_PTR D_801D1540;
|
||||
// extern f32 sFactorialTbl[13];
|
||||
extern Vec3f D_801D15B0;
|
||||
extern Vec3s D_801D15BC;
|
||||
extern Mtx D_801D1DE0;
|
||||
extern MtxF D_801D1E20;
|
||||
extern Vec3f gZeroVec3f;
|
||||
extern Vec3s gZeroVec3s;
|
||||
extern Mtx gIdentityMtx;
|
||||
extern MtxF gIdentityMtxF;
|
||||
// extern u64* initialgspUcodeText;
|
||||
// extern u64* initialgspUcodeData;
|
||||
// extern UNK_TYPE1 D_801D1E70;
|
||||
@@ -2841,7 +2833,7 @@ extern f32 D_801DE860;
|
||||
extern f32 D_801DE864;
|
||||
extern f32 D_801DE868;
|
||||
extern f32 D_801DE884;
|
||||
// extern UNK_TYPE1 D_801DE890;
|
||||
extern TexturePtr D_801DE890[];
|
||||
extern f32 D_801DF090;
|
||||
extern f32 D_801DF094;
|
||||
extern f32 D_801DF0A0;
|
||||
@@ -3104,24 +3096,16 @@ extern u64 gJpegUCodeData[];
|
||||
// extern UNK_TYPE1 D_801E3FA0;
|
||||
|
||||
// bss
|
||||
extern EffTables sEffTable;
|
||||
// extern UNK_TYPE1 D_801E4514;
|
||||
// extern UNK_TYPE1 D_801E4E08;
|
||||
// extern UNK_TYPE1 D_801E531C;
|
||||
// extern UNK_TYPE1 D_801E69E0;
|
||||
// extern UNK_TYPE1 D_801E9AA0;
|
||||
// extern UNK_TYPE1 D_801ED4C0;
|
||||
// extern UNK_TYPE1 D_801ED890;
|
||||
// extern UNK_TYPE1 D_801ED894;
|
||||
// extern UNK_TYPE1 D_801ED8A0;
|
||||
// extern UNK_TYPE1 D_801ED8B0;
|
||||
// extern UNK_TYPE1 D_801ED8B4;
|
||||
extern CollisionPoly* D_801ED8B0;
|
||||
extern s32 D_801ED8B4;
|
||||
// extern UNK_TYPE1 D_801ED8B8;
|
||||
// extern UNK_TYPE1 D_801ED8BC;
|
||||
// extern UNK_TYPE1 D_801ED8C0;
|
||||
// extern UNK_TYPE1 D_801ED8C4;
|
||||
extern f32 D_801ED8C8;
|
||||
extern f32 D_801ED8CC;
|
||||
extern f32 sBgmEnemyDistSq;
|
||||
extern f32 D_801ED8D0;
|
||||
// extern UNK_TYPE1 D_801ED8D4;
|
||||
// extern UNK_TYPE1 D_801ED8D8;
|
||||
@@ -3197,12 +3181,12 @@ extern Vec3f D_801EE1E0;
|
||||
extern Vec3f D_801EE1F0;
|
||||
// extern UNK_TYPE1 D_801EE1F4;
|
||||
// extern UNK_TYPE1 D_801EE1F8;
|
||||
extern EffSparkParams D_801EE200;
|
||||
extern EffectSparkInit D_801EE200;
|
||||
extern TriNorm D_801EE6C8;
|
||||
extern TriNorm D_801EE700;
|
||||
extern EffSparkParams D_801EE738;
|
||||
extern EffSparkParams D_801EEC00;
|
||||
extern EffSparkParams D_801EF0C8;
|
||||
extern EffectSparkInit D_801EE738;
|
||||
extern EffectSparkInit D_801EEC00;
|
||||
extern EffectSparkInit D_801EF0C8;
|
||||
extern TriNorm D_801EF590;
|
||||
extern TriNorm D_801EF5C8;
|
||||
extern TriNorm D_801EF600;
|
||||
@@ -3227,7 +3211,7 @@ extern GameInfo* gGameInfo;
|
||||
// extern UNK_TYPE2 D_801F4DCC[8];
|
||||
// extern UNK_TYPE1 D_801F4DDC;
|
||||
// extern UNK_TYPE1 D_801F4DE0;
|
||||
// extern UNK_TYPE2 D_801F4DE2;
|
||||
extern s16 D_801F4DE2;
|
||||
extern ActorCutscene* actorCutscenes;
|
||||
extern s16 actorCutsceneCount;
|
||||
extern u8 actorCutsceneWaiting[16];
|
||||
@@ -3286,7 +3270,6 @@ extern s16 D_801F4E7A;
|
||||
// extern UNK_TYPE1 D_801F4F68;
|
||||
// extern UNK_TYPE1 D_801F4F6A;
|
||||
extern LightsBuffer sLightsBuffer;
|
||||
extern Arena sZeldaArena;
|
||||
// extern UNK_TYPE1 D_801F5130;
|
||||
// extern UNK_TYPE1 D_801F5270;
|
||||
// extern UNK_TYPE1 D_801F528E;
|
||||
@@ -3342,9 +3325,9 @@ extern ShrinkWindowContext gShrinkWindowContext;
|
||||
extern ShrinkWindowContext* gShrinkWindowContextPtr;
|
||||
// extern UNK_TYPE4 D_801F6B50;
|
||||
// extern UNK_TYPE1 D_801F6B58;
|
||||
// extern UNK_TYPE1 D_801F6BF0;
|
||||
// extern UNK_TYPE1 D_801F6C00;
|
||||
// extern UNK_TYPE1 D_801F6C04;
|
||||
extern FaultAddrConvClient sKaleidoAreaFaultClient;
|
||||
extern void (*sKaleidoScopeUpdateFunc)(GlobalContext* globalCtx);
|
||||
extern void (*sKaleidoScopeDrawFunc)(GlobalContext* globalCtx);
|
||||
// extern UNK_TYPE1 D_801F6C10;
|
||||
extern Input D_801F6C18;
|
||||
// extern UNK_TYPE1 D_801F6C30;
|
||||
@@ -3784,7 +3767,7 @@ extern u16 gFramebuffer0[SCREEN_HEIGHT][SCREEN_WIDTH];
|
||||
// keep objects
|
||||
|
||||
extern Gfx D_040008D0[];
|
||||
extern UNK_TYPE D_040032B0;
|
||||
extern Gfx D_040032B0[];
|
||||
extern UNK_TYPE D_0400CF58;
|
||||
extern UNK_TYPE D_0400CF88;
|
||||
extern UNK_TYPE D_0400CF98;
|
||||
@@ -3877,16 +3860,9 @@ extern UNK_TYPE D_0400E3D8;
|
||||
extern UNK_TYPE D_0400E408;
|
||||
extern UNK_TYPE D_0400E410;
|
||||
extern UNK_TYPE D_0400E418;
|
||||
extern CollisionHeader D_0400E710; // Pink Deku Flower collision
|
||||
extern AnimationHeader D_0400EB7C; // Deku Flower intense flutter animation
|
||||
extern Gfx D_0400ED80; // Pink Deku Flower display list
|
||||
extern SkeletonHeader D_04011518; // Pink Deku Flower skeleton
|
||||
extern AnimationHeader D_040117A8; // Deku Flower small flutter animation
|
||||
extern CollisionHeader D_040118D8; // Gold Deku Flower collision
|
||||
extern Gfx D_04011BD0; // Gold Deku Flower display list
|
||||
extern SkeletonHeader D_040127E8; // Gold Deku Flower skeleton
|
||||
extern UNK_TYPE D_04012860;
|
||||
extern UNK_TYPE D_040128BC;
|
||||
extern u64 D_04014570[];
|
||||
extern UNK_TYPE D_04015FA0;
|
||||
extern UNK_TYPE D_04016360;
|
||||
extern UNK_TYPE D_0401A4D0;
|
||||
@@ -3905,24 +3881,16 @@ extern Gfx D_04023210[];
|
||||
extern UNK_TYPE D_04023288;
|
||||
extern Gfx D_04023348[];
|
||||
extern Gfx D_04023428[];
|
||||
extern UNK_TYPE D_04025850;
|
||||
extern UNK_TYPE D_04025DD0;
|
||||
extern UNK_TYPE D_040281DC;
|
||||
extern UNK_TYPE D_04028FEC;
|
||||
extern UNK_TYPE D_04029140;
|
||||
extern AnimationHeader D_04029140;
|
||||
extern Gfx D_04029CB0[];
|
||||
extern Gfx D_04029CF0[];
|
||||
extern UNK_TYPE D_04029D20;
|
||||
extern AnimationHeader D_0402B494;
|
||||
extern AnimatedMaterial D_0402C818;
|
||||
extern AnimatedMaterial D_0402C890;
|
||||
extern AnimatedMaterial D_0402C908;
|
||||
extern AnimatedMaterial D_0402C980;
|
||||
extern AnimatedMaterial D_0402C9F8;
|
||||
extern FlexSkeletonHeader D_0402CA98;
|
||||
extern Gfx D_0402E510[];
|
||||
extern UNK_TYPE D_0402E65C;
|
||||
extern UNK_TYPE D_0402F0EC;
|
||||
extern AnimationHeader D_0402E65C;
|
||||
extern AnimationHeader D_0402F0EC;
|
||||
extern Gfx D_04030100[]; // Floor shockwave ring
|
||||
extern Gfx D_040301B0[];
|
||||
extern UNK_TYPE D_04032270;
|
||||
@@ -3944,12 +3912,13 @@ extern UNK_TYPE D_0403F230;
|
||||
extern UNK_TYPE D_04044300;
|
||||
extern Gfx D_04048DF0[];
|
||||
extern UNK_TYPE D_04050D10;
|
||||
extern UNK_TYPE D_04051180;
|
||||
extern UNK_TYPE D_04051238;
|
||||
extern Gfx D_04051180[];
|
||||
extern Gfx D_04051238[];
|
||||
extern AnimationHeader D_0405140C;
|
||||
extern UNK_TYPE D_040527F0;
|
||||
extern UNK_TYPE D_040528B0;
|
||||
extern Gfx D_040527F0[];
|
||||
extern Gfx D_040528B0[];
|
||||
extern Gfx D_04054A90[];
|
||||
extern u64 D_04054F20[];
|
||||
extern UNK_TYPE D_04055628;
|
||||
extern Gfx D_04057B10[];
|
||||
extern Gfx D_04058BA0[];
|
||||
@@ -3963,7 +3932,8 @@ extern TexturePtr D_0408EFE0[]; // gDust6Tex
|
||||
extern TexturePtr D_0408F3E0[]; // gDust7Tex
|
||||
extern TexturePtr D_0408F7E0[]; // gDust8Tex
|
||||
extern UNK_TYPE D_04050550;
|
||||
extern UNK_TYPE D_04050648;
|
||||
extern Gfx D_04050648[];
|
||||
extern Gfx D_040506E0[];
|
||||
extern UNK_TYPE D_040510B0;
|
||||
extern UNK_TYPE D_04054940;
|
||||
extern Gfx D_0405AAB0[];
|
||||
@@ -3985,21 +3955,18 @@ extern UNK_TYPE D_04062020;
|
||||
extern UNK_TYPE D_04062040;
|
||||
extern UNK_TYPE D_04062060;
|
||||
extern Gfx D_040622C0[];
|
||||
extern UNK_TYPE D_0406AB30;
|
||||
extern Gfx D_0406AB30[];
|
||||
extern UNK_TYPE D_0406B730;
|
||||
extern UNK_TYPE D_0406BB0C;
|
||||
extern UNK_TYPE D_0406F380;
|
||||
extern Gfx D_040706E0[];
|
||||
extern UNK_TYPE D_04073F00;
|
||||
extern UNK_TYPE D_04075400;
|
||||
extern Gfx D_04075A40[];
|
||||
extern Gfx D_04075B30[];
|
||||
extern Gfx D_04076BC0[];
|
||||
extern Gfx D_04077480[];
|
||||
extern UNK_TYPE D_04079B10;
|
||||
extern Gfx D_0407AB10[]; // sun (sparkles when small) displaylist
|
||||
extern Gfx D_0407AB58[];
|
||||
extern UNK_TYPE D_0407AFB0;
|
||||
extern Gfx D_0407D590[];
|
||||
extern UNK_TYPE D_0407D650;
|
||||
extern UNK_TYPE D_0407F218;
|
||||
extern UNK_TYPE D_040815D0;
|
||||
@@ -4007,16 +3974,20 @@ extern UNK_TYPE D_04081628;
|
||||
extern UNK_TYPE D_04083534;
|
||||
extern UNK_TYPE D_04091BE0;
|
||||
extern UNK_TYPE D_04091CE0;
|
||||
extern TexturePtr D_04091DE0[];
|
||||
extern TexturePtr D_04091FE0[];
|
||||
extern TexturePtr D_040921E0[];
|
||||
extern TexturePtr D_040923E0[];
|
||||
|
||||
extern Gfx D_05000C40[];
|
||||
extern UNK_TYPE D_05001D20;
|
||||
extern UNK_TYPE D_050061E8;
|
||||
extern UNK_TYPE D_05006420;
|
||||
extern UNK_TYPE D_050066B0;
|
||||
extern Gfx D_050061E8[];
|
||||
extern Gfx D_05006420[];
|
||||
extern Gfx D_050066B0[];
|
||||
extern UNK_TYPE D_05007498;
|
||||
extern Gfx D_05007890[];
|
||||
extern UNK_TYPE D_050078A0;
|
||||
extern UNK_TYPE D_05007938;
|
||||
extern Gfx D_050078A0[];
|
||||
extern Gfx D_05007938[];
|
||||
extern Gfx D_05007980[];
|
||||
extern UNK_TYPE D_05007E00;
|
||||
extern UNK_TYPE D_05008018;
|
||||
@@ -4033,7 +4004,7 @@ extern UNK_TYPE D_0502324C;
|
||||
|
||||
// other segments
|
||||
extern GfxMasterList D_0E000000;
|
||||
|
||||
extern Mtx D_01000000;
|
||||
extern UNK_TYPE D_0F000000;
|
||||
|
||||
|
||||
|
||||
+55
-144
@@ -334,26 +334,6 @@ typedef struct {
|
||||
/* 0x24 */ s16 unk_24;
|
||||
} SramContext; // size = 0x28
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ UNK_TYPE4 unk0;
|
||||
/* 0x04 */ UNK_TYPE4 unk4;
|
||||
/* 0x08 */ UNK_TYPE4 unk8;
|
||||
/* 0x0C */ f32 unkC;
|
||||
/* 0x10 */ Color_RGBA8 unk10;
|
||||
} TargetContextEntry; // size = 0x14
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u32 texture;
|
||||
/* 0x4 */ s16 unk4;
|
||||
/* 0x6 */ s16 unk6;
|
||||
/* 0x8 */ u8 unk8;
|
||||
/* 0x9 */ u8 unk9;
|
||||
/* 0xA */ u8 fadeOutDelay;
|
||||
/* 0xB */ u8 fadeInDelay;
|
||||
/* 0xC */ s16 alpha;
|
||||
/* 0xE */ s16 color;
|
||||
} TitleCardContext; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s32 topY;
|
||||
/* 0x4 */ s32 bottomY;
|
||||
@@ -392,15 +372,27 @@ typedef struct {
|
||||
} s80185D40; // size = 0x2C
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 unk0;
|
||||
/* 0x1 */ u8 unk1;
|
||||
/* 0x2 */ u8 unk2;
|
||||
/* 0x3 */ u8 unk3;
|
||||
/* 0x4 */ u8 unk4;
|
||||
/* 0x5 */ u8 unk5;
|
||||
/* 0x6 */ u8 unk6;
|
||||
/* 0x7 */ u8 unk7;
|
||||
} s801AEC84; // size = 0x8
|
||||
/* 0x00 */ u32 unk0;
|
||||
/* 0x04 */ u8 unk4;
|
||||
/* 0x05 */ u8 unk5;
|
||||
/* 0x06 */ u8 unk6;
|
||||
/* 0x07 */ UNK_TYPE1 pad7[0x2];
|
||||
/* 0x09 */ u8 unk9;
|
||||
/* 0x0A */ UNK_TYPE1 padA[0x2];
|
||||
/* 0x0C */ u32 unkC;
|
||||
/* 0x10 */ u16 unk10;
|
||||
/* 0x12 */ u16 unk12;
|
||||
/* 0x14 */ u16 unk14;
|
||||
/* 0x16 */ UNK_TYPE1 pad16[0x2];
|
||||
/* 0x18 */ u32 unk18;
|
||||
/* 0x1C */ u32 unk1C;
|
||||
/* 0x20 */ u32 unk20;
|
||||
/* 0x24 */ u32 unk24;
|
||||
/* 0x28 */ u32 unk28;
|
||||
/* 0x2C */ u32 unk2C;
|
||||
/* 0x30 */ u32 unk30;
|
||||
/* 0x34 */ u32 unk34;
|
||||
} s8018CFAC; // size = 0x38
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f unk0;
|
||||
@@ -475,18 +467,13 @@ typedef enum {
|
||||
} GfxPrintFlag;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 countdown;
|
||||
/* 0x04 */ Vec3f originPos;
|
||||
/* 0x10 */ Vec3f relativePos;
|
||||
/* 0x00 */ u8 countdown;
|
||||
/* 0x01 */ u8 playSfxEachFrame;
|
||||
/* 0x02 */ u16 sfxId;
|
||||
/* 0x04 */ Vec3f worldPos;
|
||||
/* 0x10 */ Vec3f projectedPos;
|
||||
} SoundSource; // size = 0x1C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ OSContPad cur;
|
||||
/* 0x06 */ OSContPad prev;
|
||||
/* 0x0C */ OSContPad press; // X/Y store delta from last frame
|
||||
/* 0x12 */ OSContPad rel; // X/Y store adjusted
|
||||
} Input; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ u32 magic;
|
||||
/* 0x004 */ GraphicsContext* gfxCtx;
|
||||
@@ -702,6 +689,22 @@ typedef struct {
|
||||
/* 0x344 */ u32 unk_344;
|
||||
} InterfaceContext; // size = 0x348
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ void* loadedRamAddr;
|
||||
/* 0x04 */ uintptr_t vromStart;
|
||||
/* 0x08 */ uintptr_t vromEnd;
|
||||
/* 0x0C */ void* vramStart;
|
||||
/* 0x10 */ void* vramEnd;
|
||||
/* 0x14 */ uintptr_t offset; // loadedRamAddr - vramStart
|
||||
/* 0x18 */ const char* name;
|
||||
} KaleidoMgrOverlay; // size = 0x1C
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ KALEIDO_OVL_KALEIDO_SCOPE,
|
||||
/* 0x01 */ KALEIDO_OVL_PLAYER_ACTOR,
|
||||
/* 0x02 */ KALEID_OVL_MAX
|
||||
} KaleidoMgrOverlayType;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 unk_0;
|
||||
/* 0x02 */ u16 unk_2;
|
||||
@@ -727,7 +730,7 @@ typedef struct {
|
||||
/* 0x22 */ u16 unk_22;
|
||||
/* 0x24 */ u16 unk_24;
|
||||
/* 0x26 */ u8 unk_26;
|
||||
/* 0x28 */ LightInfo unk_28; // sun 1
|
||||
/* 0x28 */ LightInfo dirLight1; // sun 1
|
||||
/* 0x36 */ LightInfo unk_36; // sun 2
|
||||
/* 0x44 */ s8 unk_44;
|
||||
/* 0x48 */ DmaRequest unk_48;
|
||||
@@ -861,7 +864,9 @@ typedef struct {
|
||||
/* 0x1202A */ u16 unk1202A;
|
||||
/* 0x1202C */ UNK_TYPE1 pad1202C[0x2];
|
||||
/* 0x1202E */ u16 unk1202E;
|
||||
/* 0x12030 */ UNK_TYPE1 pad12030[0x14];
|
||||
/* 0x12030 */ s16 unk_12030;
|
||||
/* 0x12032 */ UNK_TYPE1 unk_12032[0x2];
|
||||
/* 0x12034 */ UNK_TYPE1 pad12034[0x10];
|
||||
/* 0x12044 */ s16 unk12044;
|
||||
/* 0x12046 */ UNK_TYPE1 pad12046[0x2];
|
||||
/* 0x12048 */ u8 unk12048; // EnKakasi
|
||||
@@ -879,23 +884,6 @@ typedef struct {
|
||||
/* 0x120D8 */ UNK_TYPE1 pad120D8[0x8];
|
||||
} MessageContext; // size = 0x120E0
|
||||
|
||||
typedef struct ArenaNode {
|
||||
/* 0x0 */ s16 magic; // Should always be 0x7373
|
||||
/* 0x2 */ s16 isFree;
|
||||
/* 0x4 */ size_t size;
|
||||
/* 0x8 */ struct ArenaNode* next;
|
||||
/* 0xC */ struct ArenaNode* prev;
|
||||
} ArenaNode; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ArenaNode* head;
|
||||
/* 0x04 */ void* start;
|
||||
/* 0x08 */ OSMesgQueue lock;
|
||||
/* 0x20 */ u8 unk20;
|
||||
/* 0x21 */ u8 isInit;
|
||||
/* 0x22 */ u8 flag;
|
||||
} Arena; // size = 0x24
|
||||
|
||||
typedef struct FaultAddrConvClient {
|
||||
/* 0x0 */ struct FaultAddrConvClient* next;
|
||||
/* 0x4 */ void* (*callback)(void*, void*);
|
||||
@@ -1181,24 +1169,12 @@ typedef enum {
|
||||
STACK_STATUS_OVERFLOW = 2
|
||||
} StackStatus;
|
||||
|
||||
typedef struct TargetContext TargetContext;
|
||||
|
||||
typedef struct ActorContext ActorContext;
|
||||
|
||||
typedef struct s800B948C s800B948C;
|
||||
|
||||
struct FireObjLight {
|
||||
/* 0x00 */ LightNode* light;
|
||||
/* 0x04 */ LightInfoPositional lightInfo;
|
||||
/* 0x12 */ u8 unk12;
|
||||
}; // size = 0x13
|
||||
|
||||
typedef struct ActorListEntry {
|
||||
/* 0x0 */ s32 length; // number of actors loaded of this type
|
||||
/* 0x4 */ Actor* first; // pointer to first actor of this type
|
||||
/* 0x8 */ UNK_TYPE1 pad8[0x4];
|
||||
} ActorListEntry; // size = 0xC
|
||||
|
||||
#define OS_SC_RETRACE_MSG 1
|
||||
#define OS_SC_DONE_MSG 2
|
||||
#define OS_SC_NMI_MSG 3 // name is made up, 3 is OS_SC_RDP_DONE_MSG in the original sched.c
|
||||
@@ -1255,78 +1231,6 @@ struct FireObj {
|
||||
/* 0x78 */ FireObjLight light;
|
||||
}; // size = 0x8B
|
||||
|
||||
struct TargetContext {
|
||||
/* 0x00 */ Vec3f unk0;
|
||||
/* 0x0C */ Vec3f unkC;
|
||||
/* 0x18 */ f32 unk18;
|
||||
/* 0x1C */ f32 unk1C;
|
||||
/* 0x20 */ f32 unk20;
|
||||
/* 0x24 */ f32 unk24;
|
||||
/* 0x28 */ f32 unk28;
|
||||
/* 0x2C */ f32 unk2C;
|
||||
/* 0x30 */ f32 unk30;
|
||||
/* 0x34 */ f32 unk34;
|
||||
/* 0x38 */ Actor* unk38;
|
||||
/* 0x3C */ Actor* unk3C;
|
||||
/* 0x40 */ f32 unk40;
|
||||
/* 0x44 */ f32 unk44;
|
||||
/* 0x48 */ s16 unk48;
|
||||
/* 0x4A */ u8 unk4A;
|
||||
/* 0x4B */ u8 unk4B;
|
||||
/* 0x4C */ s8 unk4C;
|
||||
/* 0x4D */ UNK_TYPE1 pad4D[0x3];
|
||||
/* 0x50 */ TargetContextEntry unk50[3];
|
||||
/* 0x8C */ Actor* unk8C;
|
||||
/* 0x90 */ Actor* unk90;
|
||||
/* 0x94 */ Actor* unk_94;
|
||||
}; // size = 0x98
|
||||
|
||||
struct s800B948C {
|
||||
/* 0x00 */ GlobalContext* globalCtx;
|
||||
/* 0x04 */ Actor* actor;
|
||||
/* 0x08 */ u32 updateActorIfSet;
|
||||
/* 0x0C */ u32 unkC;
|
||||
/* 0x10 */ Actor* unk10;
|
||||
/* 0x14 */ Player* player;
|
||||
/* 0x18 */ u32 runMainIfSet; // Bitmask of actor flags. The actor will only have main called if it has at least 1 flag set that matches this bitmask
|
||||
}; // size = 0x1C
|
||||
|
||||
struct ActorContext {
|
||||
/* 0x000 */ UNK_TYPE1 pad0[0x2];
|
||||
/* 0x002 */ u8 unk2;
|
||||
/* 0x003 */ u8 unk3;
|
||||
/* 0x004 */ s8 unk4;
|
||||
/* 0x005 */ u8 unk5;
|
||||
/* 0x006 */ UNK_TYPE1 pad6[0x5];
|
||||
/* 0x00B */ s8 unkB;
|
||||
/* 0x00C */ s16 unkC;
|
||||
/* 0x00E */ u8 totalLoadedActors;
|
||||
/* 0x00F */ u8 undrawnActorCount;
|
||||
/* 0x010 */ ActorListEntry actorList[12];
|
||||
/* 0x0A0 */ Actor* undrawnActors[32]; // Records the first 32 actors drawn each frame
|
||||
/* 0x120 */ TargetContext targetContext;
|
||||
/* 0x1B8 */ u32 switchFlags[4]; // First 0x40 are permanent, second 0x40 are temporary
|
||||
/* 0x1C8 */ u32 chestFlags;
|
||||
/* 0x1CC */ u32 clearedRooms;
|
||||
/* 0x1D0 */ u32 clearedRoomsTemp;
|
||||
/* 0x1D4 */ u32 collectibleFlags[4]; // bitfield of 128 bits
|
||||
/* 0x1E4 */ TitleCardContext titleCtxt;
|
||||
/* 0x1F4 */ u8 unk1F4;
|
||||
/* 0x1F5 */ u8 unk1F5;
|
||||
/* 0x1F6 */ UNK_TYPE1 pad1F6[0x2];
|
||||
/* 0x1F8 */ f32 unk1F8;
|
||||
/* 0x1FC */ Vec3f unk1FC;
|
||||
/* 0x208 */ UNK_TYPE1 pad208[0x48];
|
||||
/* 0x250 */ void* unk250; // allocation of 0x20f0 bytes?
|
||||
/* 0x254 */ u32 unk254[5];
|
||||
/* 0x268 */ u8 unk268;
|
||||
/* 0x269 */ UNK_TYPE1 pad269[0x3];
|
||||
/* 0x26C */ UNK_TYPE1 pad26C[0xC];
|
||||
/* 0x278 */ u16 unk278;
|
||||
/* 0x27A */ UNK_TYPE1 pad27A[0x2];
|
||||
/* 0x27C */ UNK_TYPE1 pad27C[0x8];
|
||||
}; // size = 0x284
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 seqIndex;
|
||||
/* 0x01 */ u8 nightSeqIndex;
|
||||
@@ -1438,7 +1342,9 @@ struct GlobalContext {
|
||||
/* 0x18B4C */ PreRender pauseBgPreRender;
|
||||
/* 0x18B9C */ char unk_18B9C[0x2B8];
|
||||
/* 0x18E54 */ SceneTableEntry* loadedScene;
|
||||
/* 0x18E58 */ char unk_18E58[0x400];
|
||||
/* 0x18E58 */ char unk_18E58[0x10];
|
||||
/* 0x18E68 */ s32 unk_18E68;
|
||||
/* 0x18E6C */ char unk_18E6C[0x3EC];
|
||||
}; // size = 0x19258
|
||||
|
||||
typedef struct {
|
||||
@@ -1494,7 +1400,7 @@ typedef struct {
|
||||
|
||||
typedef s32 (*func_8013E748_arg6)(struct GlobalContext*, Actor*, Vec3s*);
|
||||
|
||||
typedef s32 (*func_8013E640_arg6)(struct GlobalContext*, Actor*, Actor*, void*);
|
||||
typedef s32 (*VerifyActor)(struct GlobalContext*, Actor*, Actor*, void*);
|
||||
|
||||
struct struct_8013DF3C_arg1;
|
||||
typedef void (*struct_8013DF3C_arg1_unk_func1)(struct GlobalContext*, struct struct_8013DF3C_arg1*);
|
||||
@@ -1567,6 +1473,11 @@ typedef struct DebugDispObject {
|
||||
/* 0x2C */ s32 pad; //Padding not in the OOT version
|
||||
} DebugDispObject; // size = 0x30
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ f32 rangeSq;
|
||||
/* 0x4 */ f32 leashScale;
|
||||
} TargetRangeParams; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8* value;
|
||||
/* 0x04 */ const char* name;
|
||||
|
||||
+176
-8
@@ -1,5 +1,5 @@
|
||||
#ifndef _Z64ACTOR_H_
|
||||
#define _Z64ACTOR_H_
|
||||
#ifndef Z64ACTOR_H
|
||||
#define Z64ACTOR_H
|
||||
|
||||
#include "PR/ultratypes.h"
|
||||
#include "z64math.h"
|
||||
@@ -7,6 +7,8 @@
|
||||
#include "z64collision_check.h"
|
||||
#include "unk.h"
|
||||
|
||||
// This value is hardcoded to be the size of ovl_Arrow_Fire which currently is the biggest actor that uses the AM_FIELD.
|
||||
#define AM_FIELD_SIZE SEGMENT_SIZE(ovl_Arrow_Fire)
|
||||
#define MASS_IMMOVABLE 0xFF // Cannot be pushed by OC collisions
|
||||
#define MASS_HEAVY 0xFE // Can only be pushed by OC collisions with IMMOVABLE and HEAVY objects.
|
||||
|
||||
@@ -15,6 +17,9 @@ struct GlobalContext;
|
||||
struct Lights;
|
||||
struct CollisionPoly;
|
||||
|
||||
struct EnBox;
|
||||
struct EnDoor;
|
||||
|
||||
typedef void(*ActorFunc)(struct Actor* this, struct GlobalContext* globalCtx);
|
||||
|
||||
typedef struct {
|
||||
@@ -116,6 +121,8 @@ typedef struct {
|
||||
/* 0x10 */ f32 shadowScale; // Changes the size of the shadow
|
||||
/* 0x14 */ u8 shadowAlpha; // Default is 255
|
||||
/* 0x15 */ u8 feetFloorFlags; // Set if the actor's foot is clipped under the floor. & 1 is right foot, & 2 is left
|
||||
/* 0x16 */ u8 unk_16;
|
||||
/* 0x17 */ u8 unk_17;
|
||||
/* 0x18 */ Vec3f feetPos[2]; // Update by using `Actor_SetFeetPos` in PostLimbDrawOpa
|
||||
} ActorShape; // size = 0x30
|
||||
|
||||
@@ -131,15 +138,15 @@ typedef struct Actor {
|
||||
/* 0x020 */ s16 unk20;
|
||||
/* 0x024 */ PosRot world; // Position/rotation in the world
|
||||
/* 0x038 */ s8 cutscene;
|
||||
/* 0x039 */ s8 unk39;
|
||||
/* 0x039 */ u8 audioFlags; // Another set of flags? Seems related to sfx or bgm
|
||||
/* 0x03C */ PosRot focus; // Target reticle focuses on this position. For player this represents head pos and rot
|
||||
/* 0x050 */ u16 sfx; // SFX ID to play. Sound plays when value is set, then is cleared the following update cycle
|
||||
/* 0x050 */ u16 sfxId; // Id of sound effect to play. Plays when value is set, then is cleared the following update cycle
|
||||
/* 0x054 */ f32 targetArrowOffset; // Height offset of the target arrow relative to `focus` position
|
||||
/* 0x058 */ Vec3f scale; // Scale of the actor in each axis
|
||||
/* 0x064 */ Vec3f velocity; // Velocity of the actor in each axis
|
||||
/* 0x070 */ f32 speedXZ; // How fast the actor is traveling along the XZ plane
|
||||
/* 0x074 */ f32 gravity; // Acceleration due to gravity. Value is added to Y velocity every frame
|
||||
/* 0x078 */ f32 minVelocityY; // Sets the lower bounds cap on velocity along the Y axis
|
||||
/* 0x078 */ f32 terminalVelocity; // Sets the lower bounds cap on velocity along the Y axis
|
||||
/* 0x07C */ struct CollisionPoly* wallPoly; // Wall polygon the actor is touching
|
||||
/* 0x080 */ struct CollisionPoly* floorPoly; // Floor polygon directly below the actor
|
||||
/* 0x084 */ u8 wallBgId; // Bg ID of the wall polygon the actor is touching
|
||||
@@ -168,12 +175,12 @@ typedef struct Actor {
|
||||
/* 0x11C */ u8 colorFilterTimer; // A non-zero value enables the color filter. Decrements automatically
|
||||
/* 0x11D */ u8 isDrawn; // Set to true if the actor is currently being drawn. Always stays false for lens actors
|
||||
/* 0x11E */ u8 dropFlag; // Configures what item is dropped by the actor from `Item_DropCollectibleRandom`
|
||||
/* 0x11F */ u8 hintId; // Sets what 0600 dialog to display when talking to navi. Default 0xFF
|
||||
/* 0x11F */ u8 hintId; // Sets what 0600 dialog to display when talking to Tatl. Default 0xFF
|
||||
/* 0x120 */ struct Actor* parent; // Usage is actor specific. Set if actor is spawned via `Actor_SpawnAsChild`
|
||||
/* 0x124 */ struct Actor* child; // Usage is actor specific. Set if actor is spawned via `Actor_SpawnAsChild`
|
||||
/* 0x128 */ struct Actor* prev; // Previous actor of this category
|
||||
/* 0x12C */ struct Actor* next; // Next actor of this category
|
||||
/* 0x130 */ ActorFunc init; // Initialization Routine. Called by `Actor_Init` or `Actor_UpdateAll`
|
||||
/* 0x130 */ ActorFunc init; // Initialization Routine. Called by `Actor_InitContext` or `Actor_UpdateAll`
|
||||
/* 0x134 */ ActorFunc destroy; // Destruction Routine. Called by `Actor_Destroy`
|
||||
/* 0x138 */ ActorFunc update; // Update Routine. Called by `Actor_UpdateAll`
|
||||
/* 0x13C */ ActorFunc draw; // Draw Routine. Called by `Actor_Draw`
|
||||
@@ -287,7 +294,8 @@ typedef enum {
|
||||
/* 0x08 */ ACTORCAT_MISC,
|
||||
/* 0x09 */ ACTORCAT_BOSS,
|
||||
/* 0x0A */ ACTORCAT_DOOR,
|
||||
/* 0x0B */ ACTORCAT_CHEST
|
||||
/* 0x0B */ ACTORCAT_CHEST,
|
||||
/* 0x0C */ ACTORCAT_MAX
|
||||
} ActorType;
|
||||
|
||||
typedef struct {
|
||||
@@ -308,6 +316,96 @@ typedef struct {
|
||||
/* 0x0E */ s16 transitionRate;
|
||||
} ActorAnimationEntryS; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ f32 unkC;
|
||||
/* 0x10 */ Color_RGBA8 color;
|
||||
} TargetContextEntry; // size = 0x14
|
||||
|
||||
typedef struct TargetContext {
|
||||
/* 0x00 */ Vec3f unk0;
|
||||
/* 0x0C */ Vec3f targetCenterPos;
|
||||
/* 0x18 */ Color_RGBAf fairyInner;
|
||||
/* 0x28 */ Color_RGBAf fairyOuter;
|
||||
/* 0x38 */ Actor* arrowPointedActor;
|
||||
/* 0x3C */ Actor* targetedActor;
|
||||
/* 0x40 */ f32 unk40;
|
||||
/* 0x44 */ f32 unk44;
|
||||
/* 0x48 */ s16 unk48; // alpha
|
||||
/* 0x4A */ u8 unk4A;
|
||||
/* 0x4B */ u8 unk4B;
|
||||
/* 0x4C */ s8 unk4C;
|
||||
/* 0x4D */ UNK_TYPE1 pad4D[0x3];
|
||||
/* 0x50 */ TargetContextEntry unk50[3];
|
||||
/* 0x8C */ Actor* unk8C;
|
||||
/* 0x90 */ Actor* bgmEnemy;
|
||||
/* 0x94 */ Actor* unk_94;
|
||||
} TargetContext; // size = 0x98
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ TexturePtr texture;
|
||||
/* 0x4 */ s16 x;
|
||||
/* 0x6 */ s16 y;
|
||||
/* 0x8 */ u8 width;
|
||||
/* 0x9 */ u8 height;
|
||||
/* 0xA */ u8 durationTimer; // how long the title card appears for before fading
|
||||
/* 0xB */ u8 delayTimer; // how long the title card waits to appear
|
||||
/* 0xC */ s16 alpha;
|
||||
/* 0xE */ s16 intensity;
|
||||
} TitleCardContext; // size = 0x10
|
||||
|
||||
typedef struct ActorContext_unk_20C {
|
||||
/* 0x0 */ s16 id;
|
||||
/* 0x2 */ s8 isDynamicallyInitialised;
|
||||
/* 0x4 */ void* ptr;
|
||||
} ActorContext_unk_20C; // size = 0x8
|
||||
|
||||
typedef struct ActorContextFlags {
|
||||
/* 0x00 */ u32 switches[4]; // First 0x40 are permanent, second 0x40 are temporary
|
||||
/* 0x10 */ u32 chest;
|
||||
/* 0x14 */ u32 clearedRoom;
|
||||
/* 0x18 */ u32 clearedRoomTemp;
|
||||
/* 0x1C */ u32 collectible[4]; // bitfield of 128 bits
|
||||
} ActorContextFlags; // size = 0x2C
|
||||
|
||||
typedef struct ActorListEntry {
|
||||
/* 0x0 */ s32 length; // number of actors loaded of this type
|
||||
/* 0x4 */ Actor* first; // pointer to first actor of this type
|
||||
/* 0x8 */ s32 unk_08;
|
||||
} ActorListEntry; // size = 0xC
|
||||
|
||||
typedef struct ActorContext {
|
||||
/* 0x000 */ u8 freezeFlashTimer;
|
||||
/* 0x001 */ UNK_TYPE1 pad1;
|
||||
/* 0x002 */ u8 unk2;
|
||||
/* 0x003 */ u8 unk3;
|
||||
/* 0x004 */ s8 unk4;
|
||||
/* 0x005 */ u8 unk5;
|
||||
/* 0x006 */ UNK_TYPE1 pad6[0x5];
|
||||
/* 0x00B */ s8 unkB;
|
||||
/* 0x00C */ s16 unkC;
|
||||
/* 0x00E */ u8 totalLoadedActors;
|
||||
/* 0x00F */ u8 undrawnActorCount;
|
||||
/* 0x010 */ ActorListEntry actorLists[ACTORCAT_MAX];
|
||||
/* 0x0A0 */ Actor* undrawnActors[32]; // Records the first 32 actors drawn each frame
|
||||
/* 0x120 */ TargetContext targetContext;
|
||||
/* 0x1B8 */ ActorContextFlags flags;
|
||||
/* 0x1E4 */ TitleCardContext titleCtxt;
|
||||
/* 0x1F4 */ u8 unk1F4;
|
||||
/* 0x1F5 */ u8 unk1F5;
|
||||
/* 0x1F6 */ UNK_TYPE1 pad1F6[0x2];
|
||||
/* 0x1F8 */ f32 unk1F8;
|
||||
/* 0x1FC */ Vec3f unk1FC;
|
||||
/* 0x208 */ UNK_TYPE1 unk_208[0x4];
|
||||
/* 0x20C */ ActorContext_unk_20C unk_20C[8];
|
||||
/* 0x24C */ UNK_TYPE1 unk_24C[0x4];
|
||||
/* 0x250 */ void* absoluteSpace; // Space used to allocate actor overlays of alloc type ALLOCTYPE_ABSOLUTE
|
||||
/* 0x254 */ u32 unk254[5];
|
||||
/* 0x268 */ u8 unk268;
|
||||
/* 0x269 */ UNK_TYPE1 pad269[0x3];
|
||||
/* 0x26C */ Input unk_26C;
|
||||
} ActorContext; // size = 0x284
|
||||
|
||||
typedef enum {
|
||||
/* 0x000 */ ACTOR_PLAYER,
|
||||
/* 0x001 */ ACTOR_EN_TEST,
|
||||
@@ -1002,6 +1100,76 @@ typedef enum {
|
||||
/* 0x2B2 */ ACTOR_ID_MAX // originally "ACTOR_DLF_MAX"
|
||||
} ActorID;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ DOORLOCK_NORMAL,
|
||||
/* 1 */ DOORLOCK_BOSS,
|
||||
/* 2 */ DOORLOCK_2, // DOORLOCK_NORMAL_SPIRIT on OoT
|
||||
/* 3 */ DOORLOCK_MAX
|
||||
} DoorLockType;
|
||||
|
||||
// Targetability / ACTOR_FLAG_TARGETABLE?
|
||||
#define ACTOR_FLAG_1 (1 << 0)
|
||||
//
|
||||
#define ACTOR_FLAG_2 (1 << 1)
|
||||
//
|
||||
#define ACTOR_FLAG_4 (1 << 2)
|
||||
//
|
||||
#define ACTOR_FLAG_8 (1 << 3)
|
||||
//
|
||||
#define ACTOR_FLAG_10 (1 << 4)
|
||||
//
|
||||
#define ACTOR_FLAG_20 (1 << 5)
|
||||
//
|
||||
#define ACTOR_FLAG_40 (1 << 6)
|
||||
// Invisible
|
||||
#define ACTOR_FLAG_80 (1 << 7)
|
||||
// Related to talk
|
||||
#define ACTOR_FLAG_100 (1 << 8)
|
||||
//
|
||||
#define ACTOR_FLAG_200 (1 << 9)
|
||||
//
|
||||
#define ACTOR_FLAG_400 (1 << 10)
|
||||
//
|
||||
#define ACTOR_FLAG_800 (1 << 11)
|
||||
//
|
||||
#define ACTOR_FLAG_1000 (1 << 12)
|
||||
//
|
||||
#define ACTOR_FLAG_2000 (1 << 13)
|
||||
//
|
||||
#define ACTOR_FLAG_4000 (1 << 14)
|
||||
//
|
||||
#define ACTOR_FLAG_8000 (1 << 15)
|
||||
//
|
||||
#define ACTOR_FLAG_10000 (1 << 16)
|
||||
//
|
||||
#define ACTOR_FLAG_20000 (1 << 17)
|
||||
//
|
||||
#define ACTOR_FLAG_40000 (1 << 18)
|
||||
//
|
||||
#define ACTOR_FLAG_80000 (1 << 19)
|
||||
//
|
||||
#define ACTOR_FLAG_100000 (1 << 20)
|
||||
//
|
||||
#define ACTOR_FLAG_200000 (1 << 21)
|
||||
//
|
||||
#define ACTOR_FLAG_400000 (1 << 22)
|
||||
//
|
||||
#define ACTOR_FLAG_800000 (1 << 23)
|
||||
//
|
||||
#define ACTOR_FLAG_1000000 (1 << 24)
|
||||
//
|
||||
#define ACTOR_FLAG_2000000 (1 << 25)
|
||||
//
|
||||
#define ACTOR_FLAG_4000000 (1 << 26)
|
||||
//
|
||||
#define ACTOR_FLAG_8000000 (1 << 27)
|
||||
//
|
||||
#define ACTOR_FLAG_10000000 (1 << 28)
|
||||
//
|
||||
#define ACTOR_FLAG_20000000 (1 << 29)
|
||||
//
|
||||
#define ACTOR_FLAG_40000000 (1 << 30)
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ CLEAR_TAG_SMALL_EXPLOSION,
|
||||
/* 0x01 */ CLEAR_TAG_LARGE_EXPLOSION,
|
||||
|
||||
@@ -29,11 +29,11 @@ typedef struct {
|
||||
/* 0x00 */ u16 unk0; // action; // "dousa"
|
||||
/* 0x02 */ u16 startFrame;
|
||||
/* 0x04 */ u16 endFrame;
|
||||
/* 0x06 */ UNK_TYPE1 pad6[0xA];
|
||||
/* 0x10 */ s32 unk10;
|
||||
/* 0x14 */ UNK_TYPE1 pad14[0x8];
|
||||
/* 0x1C */ s32 unk1C;
|
||||
/* 0x20 */ UNK_TYPE1 pad20[0x10];
|
||||
/* 0x06 */ u16 unk6;
|
||||
/* 0x08 */ u16 unk8;
|
||||
/* 0x0C */ Vec3i unk0C;
|
||||
/* 0x18 */ Vec3i unk18;
|
||||
/* 0x24 */ UNK_TYPE1 unk24[0xC];
|
||||
} CsCmdActorAction; // size = 0x30
|
||||
|
||||
typedef struct {
|
||||
|
||||
+100
-116
@@ -10,14 +10,6 @@
|
||||
struct GraphicsContext;
|
||||
struct GlobalContext;
|
||||
|
||||
typedef void(*eff_destroy_func)(void* params);
|
||||
|
||||
typedef void(*eff_draw_func)(void* params, struct GraphicsContext* gfxCtx);
|
||||
|
||||
typedef void(*eff_init_func)(void* params, void* init);
|
||||
|
||||
typedef s32(*eff_update_func)(void* params);
|
||||
|
||||
#define SPARK_COUNT 3
|
||||
#define BLURE_COUNT 25
|
||||
#define SHIELD_PARTICLE_COUNT 3
|
||||
@@ -41,37 +33,45 @@ typedef s32(*eff_update_func)(void* params);
|
||||
#define rgObjBankIdx regs[11]
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 active;
|
||||
/* 0x1 */ u8 unk1;
|
||||
/* 0x2 */ u8 unk2;
|
||||
/* 0x3 */ UNK_TYPE1 pad3[0x1];
|
||||
} EffCommon; // size = 0x4
|
||||
/* 0x00 */ u8 active;
|
||||
/* 0x01 */ u8 unk1;
|
||||
/* 0x02 */ u8 unk2;
|
||||
} EffectStatus; // size = 0x03
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f velocity;
|
||||
/* 0x0C */ Vec3f position;
|
||||
/* 0x18 */ Vec3s unk18;
|
||||
/* 0x1E */ Vec3s unk1E;
|
||||
} EffSparkParticle; // size = 0x24
|
||||
/* 0x18 */ Vec3s unkVelocity;
|
||||
/* 0x1E */ Vec3s unkPosition;
|
||||
} EffectSparkElement; // size = 0x24
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ Vec3s position;
|
||||
/* 0x008 */ s32 numParticles; // Will be calculated as particleFactor1 * particleFactor2 + 2
|
||||
/* 0x00C */ EffSparkParticle particles[32];
|
||||
/* 0x48C */ f32 velocity;
|
||||
/* 0x008 */ s32 numElements; // "table_size"; calculated as uDiv * vDiv + 2
|
||||
/* 0x00C */ EffectSparkElement elements[32];
|
||||
/* 0x48C */ f32 speed;
|
||||
/* 0x490 */ f32 gravity;
|
||||
/* 0x494 */ u32 particleFactor1;
|
||||
/* 0x498 */ u32 particleFactor2;
|
||||
/* 0x494 */ u32 uDiv; // "u_div"
|
||||
/* 0x498 */ u32 vDiv; // "v_div"
|
||||
/* 0x49C */ Color_RGBA8 colorStart[4];
|
||||
/* 0x4AC */ Color_RGBA8 colorEnd[4];
|
||||
/* 0x4BC */ s32 age;
|
||||
/* 0x4BC */ s32 timer;
|
||||
/* 0x4C0 */ s32 duration;
|
||||
} EffSparkParams; // size = 0x4C4
|
||||
} EffectSparkInit; // size = 0x4C4
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ EffCommon base;
|
||||
/* 0x004 */ EffSparkParams params;
|
||||
} EffSpark; // size = 0x4C8
|
||||
/* 0x000 */ Vec3s position;
|
||||
/* 0x008 */ s32 numElements; // "table_size"; calculated as uDiv * vDiv + 2
|
||||
/* 0x00C */ EffectSparkElement elements[32];
|
||||
/* 0x48C */ f32 speed;
|
||||
/* 0x490 */ f32 gravity;
|
||||
/* 0x494 */ u32 uDiv; // "u_div"
|
||||
/* 0x498 */ u32 vDiv; // "v_div"
|
||||
/* 0x49C */ Color_RGBA8 colorStart[4];
|
||||
/* 0x4AC */ Color_RGBA8 colorEnd[4];
|
||||
/* 0x4BC */ s32 timer;
|
||||
/* 0x4C0 */ s32 duration;
|
||||
} EffectSpark; // size = 0x4C4
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 state;
|
||||
@@ -82,13 +82,15 @@ typedef struct {
|
||||
} EffectBlureElement; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ UNK_TYPE1 pad0[0x184];
|
||||
/* 0x184 */ Color_RGBA8 unk184;
|
||||
/* 0x188 */ Color_RGBA8 unk188;
|
||||
/* 0x18C */ Color_RGBA8 unk18C;
|
||||
/* 0x190 */ Color_RGBA8 unk190;
|
||||
/* 0x194 */ UNK_TYPE1 pad194[0xC];
|
||||
} EffBlureInit1; // size = 0x1A0
|
||||
/* 0x000 */ char unk_00[0x184];
|
||||
/* 0x184 */ u8 p1StartColor[4];
|
||||
/* 0x188 */ u8 p2StartColor[4];
|
||||
/* 0x18C */ u8 p1EndColor[4];
|
||||
/* 0x190 */ u8 p2EndColor[4];
|
||||
/* 0x194 */ s32 elemDuration;
|
||||
/* 0x198 */ s32 unkFlag;
|
||||
/* 0x19C */ s32 calcMode;
|
||||
} EffectBlureInit1; // size = 0x1A0
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 calcMode;
|
||||
@@ -104,7 +106,7 @@ typedef struct {
|
||||
/* 0x1B */ u8 mode4Param;
|
||||
/* 0x1C */ Color_RGBA8 altPrimColor; // used with drawMode 1
|
||||
/* 0x20 */ Color_RGBA8 altEnvColor; // used with drawMode 1
|
||||
} EffBlureInit2; // size = 0x24
|
||||
} EffectBlureInit2; // size = 0x24
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ EffectBlureElement elements[16];
|
||||
@@ -117,31 +119,26 @@ typedef struct {
|
||||
/* 0x192 */ Color_RGBA8 p2StartColor;
|
||||
/* 0x196 */ Color_RGBA8 p1EndColor;
|
||||
/* 0x19A */ Color_RGBA8 p2EndColor;
|
||||
/* 0x19E */ u8 numElements;
|
||||
/* 0x19E */ u8 numElements; // "now_edge_num"
|
||||
/* 0x19F */ u8 elemDuration;
|
||||
/* 0x1A0 */ u8 unkFlag;
|
||||
/* 0x1A1 */ u8 drawMode; // 0: simple; 1: simple with alt colors; 2+: smooth
|
||||
/* 0x1A2 */ Color_RGBA8 altPrimColor;
|
||||
/* 0x1A6 */ Color_RGBA8 altEnvColor;
|
||||
/* 0x1A2 */ Color_RGBA8 altPrimColor; // used with drawMode 1
|
||||
/* 0x1A6 */ Color_RGBA8 altEnvColor; // used with drawMode 1
|
||||
} EffectBlure; // size = 0x1AC
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ EffCommon base;
|
||||
/* 0x004 */ EffectBlure params;
|
||||
} EffBlure; // size = 0x1B0
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ f32 startSpeed;
|
||||
/* 0x00 */ f32 initialSpeed;
|
||||
/* 0x04 */ f32 endXChange;
|
||||
/* 0x08 */ f32 endX;
|
||||
/* 0x0C */ f32 startXChange;
|
||||
/* 0x10 */ f32 startX;
|
||||
/* 0x14 */ s16 rotationY;
|
||||
/* 0x16 */ s16 rotationZ;
|
||||
} EffShieldParticleParticle; // size = 0x18
|
||||
/* 0x14 */ s16 yaw;
|
||||
/* 0x16 */ s16 pitch;
|
||||
} EffectShieldParticleElement; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 numParticles;
|
||||
/* 0x00 */ u8 numElements;
|
||||
/* 0x02 */ Vec3s position;
|
||||
/* 0x08 */ Color_RGBA8 primColorStart;
|
||||
/* 0x0C */ Color_RGBA8 envColorStart;
|
||||
@@ -149,18 +146,17 @@ typedef struct {
|
||||
/* 0x14 */ Color_RGBA8 envColorMid;
|
||||
/* 0x18 */ Color_RGBA8 primColorEnd;
|
||||
/* 0x1C */ Color_RGBA8 envColorEnd;
|
||||
/* 0x20 */ f32 acceleration;
|
||||
/* 0x20 */ f32 deceleration;
|
||||
/* 0x24 */ f32 maxInitialSpeed;
|
||||
/* 0x28 */ f32 lengthCutoff;
|
||||
/* 0x2C */ u8 duration;
|
||||
/* 0x2E */ LightPoint lightPoint;
|
||||
/* 0x3C */ s32 hasLight;
|
||||
} EffShieldParticleInit; // size = 0x40
|
||||
/* 0x3C */ s32 lightDecay; // halves light radius every frame when set to 1
|
||||
} EffectShieldParticleInit; // size = 0x40
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ EffShieldParticleParticle particles[16];
|
||||
/* 0x180 */ u8 numParticles;
|
||||
/* 0x181 */ UNK_TYPE1 pad181[0x1];
|
||||
/* 0x000 */ EffectShieldParticleElement elements[16];
|
||||
/* 0x180 */ u8 numElements;
|
||||
/* 0x182 */ Vec3s position;
|
||||
/* 0x188 */ Color_RGBA8 primColorStart;
|
||||
/* 0x18C */ Color_RGBA8 envColorStart;
|
||||
@@ -168,66 +164,75 @@ typedef struct {
|
||||
/* 0x194 */ Color_RGBA8 envColorMid;
|
||||
/* 0x198 */ Color_RGBA8 primColorEnd;
|
||||
/* 0x19C */ Color_RGBA8 envColorEnd;
|
||||
/* 0x1A0 */ f32 acceleration;
|
||||
/* 0x1A4 */ UNK_TYPE1 pad1A4[0x4];
|
||||
/* 0x1A0 */ f32 deceleration;
|
||||
/* 0x1A4 */ char unk_1A4[0x04];
|
||||
/* 0x1A8 */ f32 maxInitialSpeed;
|
||||
/* 0x1AC */ f32 lengthCutoff;
|
||||
/* 0x1B0 */ u8 duration;
|
||||
/* 0x1B1 */ u8 age;
|
||||
/* 0x1B1 */ u8 timer;
|
||||
/* 0x1B2 */ LightInfo lightInfo;
|
||||
/* 0x1C0 */ LightNode* light;
|
||||
/* 0x1C4 */ s32 hasLight;
|
||||
} EffShieldParticleParams; // size = 0x1C8
|
||||
/* 0x1C0 */ LightNode* lightNode;
|
||||
/* 0x1C4 */ s32 lightDecay; // halves light radius every frame when set to 1
|
||||
} EffectShieldParticle; // size = 0x1C8
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ EffCommon base;
|
||||
/* 0x004 */ EffShieldParticleParams params;
|
||||
} EffShieldParticle; // size = 0x1CC
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ UNK_TYPE2 active;
|
||||
/* 0x02 */ Vec3s position1;
|
||||
/* 0x08 */ Vec3s position2;
|
||||
/* 0x00 */ u16 flags;
|
||||
/* 0x02 */ Vec3s p1;
|
||||
/* 0x08 */ Vec3s p2;
|
||||
/* 0x0E */ s16 life;
|
||||
/* 0x10 */ UNK_TYPE1 pad10[0x4];
|
||||
/* 0x14 */ UNK_TYPE4 unk14;
|
||||
} EffTireMarkParticle; // size = 0x18
|
||||
/* 0x14 */ CollisionPoly* colPoly;
|
||||
} EffectTireMarkElement; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 unk0;
|
||||
/* 0x2 */ s16 maxLife;
|
||||
/* 0x2 */ s16 elemDuration;
|
||||
/* 0x4 */ Color_RGBA8 color;
|
||||
} EffTireMarkInit; // size = 0x8
|
||||
} EffectTireMarkInit; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ EffTireMarkParticle particles[64];
|
||||
/* 0x000 */ EffectTireMarkElement elements[64];
|
||||
/* 0x600 */ s16 unk600;
|
||||
/* 0x602 */ s16 numParticles;
|
||||
/* 0x604 */ s16 maxLife;
|
||||
/* 0x602 */ s16 numElements;
|
||||
/* 0x604 */ s16 elemDuration;
|
||||
/* 0x606 */ Color_RGBA8 color;
|
||||
/* 0x60A */ UNK_TYPE1 pad60A[0x2];
|
||||
} EffTireMarkParams; // size = 0x60C
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ EffCommon base;
|
||||
/* 0x004 */ EffTireMarkParams params;
|
||||
} EffTireMark; // size = 0x610
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 paramsSize;
|
||||
/* 0x04 */ eff_init_func init;
|
||||
/* 0x08 */ eff_destroy_func destroy;
|
||||
/* 0x0C */ eff_update_func update;
|
||||
/* 0x10 */ eff_draw_func draw;
|
||||
} EffInfo; // size = 0x14
|
||||
} EffectTireMark; // size = 0x60C
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ struct GlobalContext* globalCtx;
|
||||
/* 0x0004 */ EffSpark sparks[SPARK_COUNT];
|
||||
/* 0x0E5C */ EffBlure blures[BLURE_COUNT];
|
||||
/* 0x388C */ EffShieldParticle shieldParticles[SHIELD_PARTICLE_COUNT];
|
||||
/* 0x3DF0 */ EffTireMark tireMarks[TIRE_MARK_COUNT];
|
||||
} EffTables; // size = 0x98E0
|
||||
struct {
|
||||
EffectStatus status;
|
||||
EffectSpark effect;
|
||||
} /* 0x0004 */ sparks[SPARK_COUNT];
|
||||
struct {
|
||||
EffectStatus status;
|
||||
EffectBlure effect;
|
||||
} /* 0x0E5C */ blures[BLURE_COUNT];
|
||||
struct {
|
||||
EffectStatus status;
|
||||
EffectShieldParticle effect;
|
||||
} /* 0x388C */ shieldParticles[SHIELD_PARTICLE_COUNT];
|
||||
struct {
|
||||
EffectStatus status;
|
||||
EffectTireMark effect;
|
||||
} /* 0x3DF0 */ tireMarks[TIRE_MARK_COUNT];
|
||||
} EffectContext; // size = 0x98E0
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 size;
|
||||
/* 0x04 */ void (*init)(void* effect, void* initParams);
|
||||
/* 0x08 */ void (*destroy)(void* effect);
|
||||
/* 0x0C */ s32 (*update)(void* effect);
|
||||
/* 0x10 */ void (*draw)(void* effect, struct GraphicsContext* gfxCtx);
|
||||
} EffectInfo; // size = 0x14
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ EFFECT_SPARK,
|
||||
/* 0x01 */ EFFECT_BLURE1,
|
||||
/* 0x02 */ EFFECT_BLURE2,
|
||||
/* 0x03 */ EFFECT_SHIELD_PARTICLE,
|
||||
/* 0x04 */ EFFECT_TIRE_MARK
|
||||
} EffectType;
|
||||
|
||||
/* Effect Soft Sprites */
|
||||
|
||||
@@ -249,7 +254,7 @@ typedef struct {
|
||||
/* 0x0C */ void* vramEnd;
|
||||
/* 0x10 */ void* loadedRamAddr;
|
||||
/* 0x14 */ EffectSsInit* initInfo;
|
||||
/* 0x18 */ u32 unk18; // Always 0x01000000?
|
||||
/* 0x18 */ u8 unk18; // Always 1?
|
||||
} EffectSsOverlay; // size = 0x1C
|
||||
|
||||
typedef struct EffectSs {
|
||||
@@ -274,27 +279,6 @@ typedef struct {
|
||||
/* 0x8 */ s32 size;
|
||||
} EffectSsInfo; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ EffectSs* data_table; // Name from debug assert
|
||||
/* 0x4 */ s32 searchIndex;
|
||||
/* 0x8 */ s32 size;
|
||||
} EffectTableInfo; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ UNK_TYPE4 unk0;
|
||||
/* 0x4 */ EffectSsInitFunc init;
|
||||
} ParticleOverlayInfo; // size = 0x8
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 vromStart;
|
||||
/* 0x04 */ u32 vromEnd;
|
||||
/* 0x08 */ void* vramStart;
|
||||
/* 0x0C */ void* vramEnd;
|
||||
/* 0x10 */ void* loadedRamAddr;
|
||||
/* 0x14 */ ParticleOverlayInfo* overlayInfo;
|
||||
/* 0x18 */ u32 unk18; // Always 0x01000000?
|
||||
} ParticleOverlay; // size = 0x1C
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ EFFECT_SS_DUST,
|
||||
/* 0x01 */ EFFECT_SS_KIRAKIRA,
|
||||
|
||||
+11
-1
@@ -275,7 +275,7 @@ typedef enum {
|
||||
/* 0x07 */ GI_RUPEE_HUGE,
|
||||
/* 0x08 */ GI_WALLET_ADULT,
|
||||
/* 0x09 */ GI_WALLET_GIANT,
|
||||
/* 0x0A */ GI_0A, //Recovery Heart / Blue Rupee?
|
||||
/* 0x0A */ GI_RECOVERY_HEART,
|
||||
/* 0x0C */ GI_HEART_PIECE = 0x0C,
|
||||
/* 0x0D */ GI_HEART_CONTAINER,
|
||||
/* 0x16 */ GI_BOMBS_10 = 0x16,
|
||||
@@ -299,6 +299,7 @@ typedef enum {
|
||||
/* 0x3C */ GI_KEY_SMALL = 0x3C,
|
||||
/* 0x3E */ GI_MAP = 0x3E,
|
||||
/* 0x3F */ GI_COMPASS,
|
||||
/* 0x52 */ GI_SCALE_GOLD = 0x52, // Assumed, used in En_Fishing
|
||||
/* 0x59 */ GI_BOTTLE_POTION_RED = 0x59,
|
||||
/* 0x5A */ GI_5A,
|
||||
/* 0x5B */ GI_POTION_RED = 0x5B,
|
||||
@@ -343,6 +344,7 @@ typedef enum {
|
||||
/* 0x9F */ GI_SHIELD_HERO_2, // Code that treats this as hero's shield is unused, so take with a grain of salt
|
||||
/* 0xA1 */ GI_LETTER_TO_MAMA = 0xA1,
|
||||
/* 0xA9 */ GI_BOTTLE = 0xA9,
|
||||
/* 0xAB */ GI_PENDANT_OF_MEMORIES = 0xAB,
|
||||
/* 0xBA */ GI_MAX = 0xBA
|
||||
} GetItemID;
|
||||
|
||||
@@ -373,4 +375,12 @@ typedef enum {
|
||||
/* 0x68 */ GID_SWORD_GREAT_FAIRY
|
||||
} GetItemDrawID;
|
||||
|
||||
// TODO: fill
|
||||
typedef enum {
|
||||
/* -1 */ EXCH_ITEM_MINUS1 = -1, // Unknown usage or function
|
||||
/* 0x00 */ EXCH_ITEM_NONE,
|
||||
/* 0x1E */ EXCH_ITEM_1E = 0x1E, // BOTTLE_MUSHROOM
|
||||
/* 0x2A */ EXCH_ITEM_2A = 0x2A // MOON_TEAR?
|
||||
} ExchangeItemID;
|
||||
|
||||
#endif
|
||||
|
||||
+4
-3
@@ -85,9 +85,10 @@ typedef struct {
|
||||
/* 0x06 */ s16 yaw; // azimuthal angle
|
||||
} VecSph; // size = 0x08
|
||||
|
||||
#define F32_LERP(v0,v1,t) ((1.0f - (t)) * (v0) + (t) * (v1))
|
||||
#define F32_LERPIMP(v0, v1, t) (v0 + ((v1 - v0) * t))
|
||||
#define F32_LERPIMPINV(v0, v1, t) ((v0) + (((v1) - (v0)) / (t)))
|
||||
#define LERPIMP(v0, v1, t) ((v0) + (((v1) - (v0)) * (t)))
|
||||
#define F32_LERP(v0, v1, t) ((1.0f - (t)) * (f32)(v0) + (t) * (f32)(v1))
|
||||
#define F32_LERPIMP(v0, v1, t) ((f32)(v0) + (((f32)(v1) - (f32)(v0)) * (t)))
|
||||
#define F32_LERPIMPINV(v0, v1, t) ((f32)(v0) + (((f32)(v1) - (f32)(v0)) / (t)))
|
||||
#define BINANG_LERPIMP(v0, v1, t) ((v0) + (s16)(BINANG_SUB((v1), (v0)) * (t)))
|
||||
#define BINANG_LERPIMPINV(v0, v1, t) ((v0) + BINANG_SUB((v1), (v0)) / (t))
|
||||
|
||||
|
||||
+11
-10
@@ -1,5 +1,5 @@
|
||||
#ifndef _Z64PLAYER_H_
|
||||
#define _Z64PLAYER_H_
|
||||
#ifndef Z64PLAYER_H
|
||||
#define Z64PLAYER_H
|
||||
|
||||
#include "z64actor.h"
|
||||
#include "os.h"
|
||||
@@ -252,7 +252,7 @@ typedef struct Player {
|
||||
/* 0x32A */ Vec3s morphTable[5];
|
||||
/* 0x348 */ s16 eyeTexId;
|
||||
/* 0x34A */ s16 eyeAnimTimer;
|
||||
/* 0x34C */ Actor* leftHandActor;
|
||||
/* 0x34C */ Actor* heldActor;
|
||||
/* 0x350 */ PosRot leftHandWorld;
|
||||
/* 0x364 */ Actor* rightHandActor;
|
||||
/* 0x368 */ PosRot rightHandWorld;
|
||||
@@ -261,12 +261,12 @@ typedef struct Player {
|
||||
/* 0x37E */ s8 doorTimer;
|
||||
/* 0x37F */ s8 doorNext; // used with spiral staircase
|
||||
/* 0x380 */ Actor* doorActor;
|
||||
/* 0x384 */ s16 unk_384;
|
||||
/* 0x386 */ u16 unk_386;
|
||||
/* 0x388 */ Actor* unk_388;
|
||||
/* 0x38C */ s16 unk_38C;
|
||||
/* 0x384 */ s16 getItemId;
|
||||
/* 0x386 */ u16 getItemDirection;
|
||||
/* 0x388 */ Actor* interactRangeActor;
|
||||
/* 0x38C */ s8 mountSide;
|
||||
/* 0x390 */ Actor* rideActor;
|
||||
/* 0x394 */ u8 unk_394;
|
||||
/* 0x394 */ u8 csMode;
|
||||
/* 0x395 */ u8 unk_395;
|
||||
/* 0x396 */ u8 unk_396;
|
||||
/* 0x397 */ u8 unk_397;
|
||||
@@ -289,7 +289,8 @@ typedef struct Player {
|
||||
/* 0x664 */ ColliderQuad shieldQuad;
|
||||
/* 0x6E4 */ ColliderCylinder shieldCylinder;
|
||||
/* 0x730 */ Actor* unk_730;
|
||||
/* 0x734 */ char unk_734[8];
|
||||
/* 0x734 */ char unk_734[4];
|
||||
/* 0x738 */ s32 unk_738;
|
||||
/* 0x73C */ s32 blureEffectIndex[3];
|
||||
/* 0x748 */ char unk_748[0x320];
|
||||
/* 0xA68 */ PlayerAgeProperties* ageProperties; // repurposed as "transformation properties"?
|
||||
@@ -301,7 +302,7 @@ typedef struct Player {
|
||||
/* 0xA80 */ Actor* tatlActor;
|
||||
/* 0xA84 */ s16 tatlTextId;
|
||||
/* 0xA86 */ s8 unk_A86;
|
||||
/* 0xA87 */ s8 unk_A87;
|
||||
/* 0xA87 */ s8 exchangeItemId;
|
||||
/* 0xA88 */ Actor* targetActor;
|
||||
/* 0xA8C */ f32 targetActorDistance;
|
||||
/* 0xA90 */ Actor* unk_A90;
|
||||
|
||||
+2
-2
@@ -67,7 +67,7 @@ typedef struct {
|
||||
/* 0x0039 */ s8 magic; // "magic_now"
|
||||
/* 0x003A */ s16 rupees; // "lupy_count"
|
||||
/* 0x003C */ u16 swordHealth; // "long_sword_hp"
|
||||
/* 0x003E */ u16 naviTimer; // "navi_timer"
|
||||
/* 0x003E */ u16 tatlTimer; // "navi_timer"
|
||||
/* 0x0040 */ u8 magicAcquired; // "magic_mode"
|
||||
/* 0x0041 */ u8 doubleMagic; // "magic_ability"
|
||||
/* 0x0042 */ u8 doubleDefense; // "life_ability"
|
||||
@@ -174,7 +174,7 @@ typedef struct {
|
||||
/* 0x3F5C */ s32 unk_3F5C; // "bet_rupees"
|
||||
/* 0x3F60 */ u8 unk_3F60; // "framescale_flag"
|
||||
/* 0x3F64 */ f32 unk_3F64; // "framescale_scale"
|
||||
/* 0x3F68 */ u32 unk_3F68[5][120];
|
||||
/* 0x3F68 */ u32 cycleSceneFlags[120][5];
|
||||
/* 0x48C8 */ u16 unk_48C8; // "scene_id_mix"
|
||||
/* 0x48CA */ u8 maskMaskBit[3]; // masks given away on the Moon
|
||||
/* 0x48CD */ char unk_48CD[24];
|
||||
|
||||
+1
-1
@@ -295,7 +295,7 @@ typedef struct {
|
||||
/* 0x04 */ s16 id;
|
||||
/* 0x06 */ Vec3s pos;
|
||||
/* 0x0C */ s16 rotY;
|
||||
/* 0x0E */ s16 params;
|
||||
/* 0x0E */ u16 params;
|
||||
} TransitionActorEntry; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -46,7 +46,6 @@ beginseg
|
||||
include "build/src/boot_O2/system_malloc.o"
|
||||
include "build/src/boot_O2/rand.o"
|
||||
include "build/src/boot_O2/__osMalloc.o"
|
||||
include "build/data/boot/__osMalloc.bss.o"
|
||||
include "build/src/libultra/rmon/sprintf.o"
|
||||
include "build/src/boot_O2/printutils.o"
|
||||
include "build/src/boot_O2/sleep.o"
|
||||
@@ -120,8 +119,6 @@ beginseg
|
||||
include "build/src/libultra/io/devmgr.o"
|
||||
include "build/src/libultra/io/pirawdma.o"
|
||||
include "build/src/libultra/io/contpfs.o"
|
||||
include "build/data/boot/contpfs.data.o"
|
||||
include "build/data/boot/contpfs.bss.o"
|
||||
include "build/asm/boot/getcount.text.o"
|
||||
pad_text
|
||||
include "build/asm/boot/guMtxL2F.text.o"
|
||||
@@ -430,23 +427,19 @@ beginseg
|
||||
include "build/data/code/code_801E3FA0.bss.o"
|
||||
include "build/src/code/z_en_item00.o"
|
||||
include "build/src/code/z_eff_blure.o"
|
||||
include "build/data/code/z_eff_blure.data.o"
|
||||
include "build/src/code/z_eff_shield_particle.o"
|
||||
include "build/data/code/z_eff_shield_particle.data.o"
|
||||
include "build/src/code/z_eff_spark.o"
|
||||
include "build/src/code/z_eff_ss_dead.o"
|
||||
include "build/src/code/z_eff_tire_mark.o"
|
||||
include "build/src/code/z_effect.o"
|
||||
include "build/data/code/z_effect.bss.o"
|
||||
include "build/src/code/z_effect_soft_sprite.o"
|
||||
include "build/data/code/z_effect_soft_sprite.data.o"
|
||||
include "build/src/code/z_effect_soft_sprite_old_init.o"
|
||||
include "build/data/code/z_effect_soft_sprite_old_init.data.o"
|
||||
include "build/src/code/z_effect_soft_sprite_dlftbls.o"
|
||||
include "build/src/code/flg_set.o"
|
||||
include "build/data/code/flg_set.bss.o"
|
||||
include "build/src/code/pad_801DC9C0.o"
|
||||
include "build/src/code/z_DLF.o"
|
||||
include "build/src/code/z_actor.o"
|
||||
include "build/data/code/z_actor.data.o"
|
||||
include "build/data/code/z_actor.bss.o"
|
||||
include "build/src/code/z_actor_dlftbls.o"
|
||||
include "build/src/code/z_bgcheck.o"
|
||||
@@ -471,7 +464,7 @@ beginseg
|
||||
include "build/data/code/z_draw.data.o"
|
||||
include "build/src/code/z_eff_footmark.o"
|
||||
include "build/data/code/z_eff_footmark.data.o"
|
||||
include "build/src/code/code_800F0390.o"
|
||||
include "build/src/code/z_sound_source.o"
|
||||
include "build/src/code/z_elf_message.o"
|
||||
include "build/src/code/z_en_hy.o"
|
||||
include "build/src/code/z_face_reaction.o"
|
||||
@@ -497,7 +490,6 @@ beginseg
|
||||
include "build/src/code/z_lights.o"
|
||||
include "build/data/code/z_lights.bss.o"
|
||||
include "build/src/code/z_malloc.o"
|
||||
include "build/data/code/z_malloc.bss.o"
|
||||
include "build/src/code/z_map_disp.o"
|
||||
include "build/data/code/z_map_disp.data.o"
|
||||
include "build/data/code/z_map_disp.bss.o"
|
||||
@@ -567,10 +559,7 @@ beginseg
|
||||
include "build/data/code/db_camera.bss.o"
|
||||
include "build/data/code/code_801D0B50.data.o"
|
||||
include "build/src/code/z_kaleido_manager.o"
|
||||
include "build/data/code/z_kaleido_manager.data.o"
|
||||
include "build/data/code/z_kaleido_manager.bss.o"
|
||||
include "build/src/code/z_kaleido_scope_call.o"
|
||||
include "build/data/code/z_kaleido_scope_call.bss.o"
|
||||
include "build/src/code/z_fbdemo_dlftbls.o"
|
||||
include "build/data/code/code_801D0BB0.data.o"
|
||||
include "build/src/code/z_fbdemo.o"
|
||||
@@ -641,7 +630,7 @@ beginseg
|
||||
include "build/data/code/audio_load.bss.o"
|
||||
include "build/src/code/audio/code_80192BE0.o"
|
||||
include "build/data/code/code_80192BE0.data.o"
|
||||
include "build/src/code/audio/code_80194710.o"
|
||||
include "build/src/code/audio/audio_dcache.o"
|
||||
include "build/src/code/audio/code_80194790.o"
|
||||
include "build/data/code/code_80194790.data.o"
|
||||
include "build/src/code/audio/audio_playback.o"
|
||||
@@ -741,12 +730,12 @@ beginseg
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
name "ovl_Player_Actor"
|
||||
name "ovl_player_actor"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Player_Actor/z_player.o"
|
||||
include "build/data/ovl_Player_Actor/ovl_Player_Actor.data.o"
|
||||
include "build/data/ovl_Player_Actor/ovl_Player_Actor.bss.o"
|
||||
include "build/data/ovl_Player_Actor/ovl_Player_Actor.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_player_actor/z_player.o"
|
||||
include "build/data/ovl_player_actor/ovl_player_actor.data.o"
|
||||
include "build/data/ovl_player_actor/ovl_player_actor.bss.o"
|
||||
include "build/data/ovl_player_actor/ovl_player_actor.reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -862,8 +851,7 @@ beginseg
|
||||
name "ovl_En_Elf"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Elf/z_en_elf.o"
|
||||
include "build/data/ovl_En_Elf/ovl_En_Elf.data.o"
|
||||
include "build/data/ovl_En_Elf/ovl_En_Elf.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Elf/ovl_En_Elf_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -884,8 +872,7 @@ beginseg
|
||||
name "ovl_En_Peehat"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Peehat/z_en_peehat.o"
|
||||
include "build/data/ovl_En_Peehat/ovl_En_Peehat.data.o"
|
||||
include "build/data/ovl_En_Peehat/ovl_En_Peehat.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Peehat/ovl_En_Peehat_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -968,8 +955,7 @@ beginseg
|
||||
name "ovl_En_St"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_St/z_en_st.o"
|
||||
include "build/data/ovl_En_St/ovl_En_St.data.o"
|
||||
include "build/data/ovl_En_St/ovl_En_St.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_St/ovl_En_St_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -1054,9 +1040,11 @@ beginseg
|
||||
name "ovl_Door_Warp1"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.o"
|
||||
include "build/data/ovl_Door_Warp1/ovl_Door_Warp1.data.o"
|
||||
include "build/data/ovl_Door_Warp1/ovl_Door_Warp1.bss.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_Door_Warp1/ovl_Door_Warp1_reloc.o"
|
||||
#else
|
||||
include "build/data/ovl_Door_Warp1/ovl_Door_Warp1.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -1203,9 +1191,11 @@ beginseg
|
||||
name "ovl_Object_Kankyo"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.o"
|
||||
include "build/data/ovl_Object_Kankyo/ovl_Object_Kankyo.data.o"
|
||||
include "build/data/ovl_Object_Kankyo/ovl_Object_Kankyo.bss.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_Object_Kankyo/ovl_Object_Kankyo_reloc.o"
|
||||
#else
|
||||
include "build/data/ovl_Object_Kankyo/ovl_Object_Kankyo.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -1279,8 +1269,7 @@ beginseg
|
||||
name "ovl_En_Bigslime"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.o"
|
||||
include "build/data/ovl_En_Bigslime/ovl_En_Bigslime.data.o"
|
||||
include "build/data/ovl_En_Bigslime/ovl_En_Bigslime.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Bigslime/ovl_En_Bigslime_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -1332,9 +1321,11 @@ beginseg
|
||||
name "ovl_En_Fishing"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Fishing/z_en_fishing.o"
|
||||
include "build/data/ovl_En_Fishing/ovl_En_Fishing.data.o"
|
||||
include "build/data/ovl_En_Fishing/ovl_En_Fishing.bss.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_En_Fishing/ovl_En_Fishing_reloc.o"
|
||||
#else
|
||||
include "build/data/ovl_En_Fishing/ovl_En_Fishing.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -1380,8 +1371,7 @@ beginseg
|
||||
name "ovl_En_Fish"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Fish/z_en_fish.o"
|
||||
include "build/data/ovl_En_Fish/ovl_En_Fish.data.o"
|
||||
include "build/data/ovl_En_Fish/ovl_En_Fish.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Fish/ovl_En_Fish_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -1489,8 +1479,7 @@ beginseg
|
||||
name "ovl_En_Fz"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Fz/z_en_fz.o"
|
||||
include "build/data/ovl_En_Fz/ovl_En_Fz.data.o"
|
||||
include "build/data/ovl_En_Fz/ovl_En_Fz.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Fz/ovl_En_Fz_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -1650,8 +1639,11 @@ beginseg
|
||||
name "ovl_En_Kanban"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Kanban/z_en_kanban.o"
|
||||
include "build/data/ovl_En_Kanban/ovl_En_Kanban.data.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_En_Kanban/ovl_En_Kanban_reloc.o"
|
||||
#else
|
||||
include "build/data/ovl_En_Kanban/ovl_En_Kanban.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -1681,8 +1673,7 @@ beginseg
|
||||
name "ovl_En_Ishi"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Ishi/z_en_ishi.o"
|
||||
include "build/data/ovl_En_Ishi/ovl_En_Ishi.data.o"
|
||||
include "build/data/ovl_En_Ishi/ovl_En_Ishi.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Ishi/ovl_En_Ishi_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -1824,16 +1815,14 @@ beginseg
|
||||
name "ovl_Obj_Roomtimer"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.o"
|
||||
include "build/data/ovl_Obj_Roomtimer/ovl_Obj_Roomtimer.data.o"
|
||||
include "build/data/ovl_Obj_Roomtimer/ovl_Obj_Roomtimer.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Obj_Roomtimer/ovl_Obj_Roomtimer_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
name "ovl_En_Ssh"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Ssh/z_en_ssh.o"
|
||||
include "build/data/ovl_En_Ssh/ovl_En_Ssh.data.o"
|
||||
include "build/data/ovl_En_Ssh/ovl_En_Ssh.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Ssh/ovl_En_Ssh_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -1953,8 +1942,7 @@ beginseg
|
||||
name "ovl_Effect_Ss_Stick"
|
||||
compress
|
||||
include "build/src/overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.o"
|
||||
include "build/data/ovl_Effect_Ss_Stick/ovl_Effect_Ss_Stick.data.o"
|
||||
include "build/data/ovl_Effect_Ss_Stick/ovl_Effect_Ss_Stick.reloc.o"
|
||||
include "build/src/overlays/effects/ovl_Effect_Ss_Stick/ovl_Effect_Ss_Stick_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -2282,8 +2270,7 @@ beginseg
|
||||
name "ovl_En_Mm2"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Mm2/z_en_mm2.o"
|
||||
include "build/data/ovl_En_Mm2/ovl_En_Mm2.data.o"
|
||||
include "build/data/ovl_En_Mm2/ovl_En_Mm2.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Mm2/ovl_En_Mm2_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -2417,8 +2404,7 @@ beginseg
|
||||
name "ovl_En_Aob_01"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.o"
|
||||
include "build/data/ovl_En_Aob_01/ovl_En_Aob_01.data.o"
|
||||
include "build/data/ovl_En_Aob_01/ovl_En_Aob_01.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Aob_01/ovl_En_Aob_01_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -2559,9 +2545,7 @@ beginseg
|
||||
name "ovl_Boss_04"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Boss_04/z_boss_04.o"
|
||||
include "build/data/ovl_Boss_04/ovl_Boss_04.data.o"
|
||||
include "build/data/ovl_Boss_04/ovl_Boss_04.bss.o"
|
||||
include "build/data/ovl_Boss_04/ovl_Boss_04.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Boss_04/ovl_Boss_04_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -2617,8 +2601,11 @@ beginseg
|
||||
name "ovl_En_Go"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Go/z_en_go.o"
|
||||
include "build/data/ovl_En_Go/ovl_En_Go.data.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_En_Go/ovl_En_Go_reloc.o"
|
||||
#else
|
||||
include "build/data/ovl_En_Go/ovl_En_Go.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -2655,9 +2642,7 @@ beginseg
|
||||
name "ovl_Obj_Flowerpot"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.o"
|
||||
include "build/data/ovl_Obj_Flowerpot/ovl_Obj_Flowerpot.data.o"
|
||||
include "build/data/ovl_Obj_Flowerpot/ovl_Obj_Flowerpot.bss.o"
|
||||
include "build/data/ovl_Obj_Flowerpot/ovl_Obj_Flowerpot.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Obj_Flowerpot/ovl_Obj_Flowerpot_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -2704,8 +2689,11 @@ beginseg
|
||||
name "ovl_Obj_Iceblock"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.o"
|
||||
include "build/data/ovl_Obj_Iceblock/ovl_Obj_Iceblock.data.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_Obj_Iceblock/ovl_Obj_Iceblock_reloc.o"
|
||||
#else
|
||||
include "build/data/ovl_Obj_Iceblock/ovl_Obj_Iceblock.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -2934,8 +2922,7 @@ beginseg
|
||||
name "ovl_En_Wiz_Fire"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Wiz_Fire/z_en_wiz_fire.o"
|
||||
include "build/data/ovl_En_Wiz_Fire/ovl_En_Wiz_Fire.data.o"
|
||||
include "build/data/ovl_En_Wiz_Fire/ovl_En_Wiz_Fire.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Wiz_Fire/ovl_En_Wiz_Fire_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -3025,8 +3012,7 @@ beginseg
|
||||
name "ovl_Obj_Hugebombiwa"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Obj_Hugebombiwa/z_obj_hugebombiwa.o"
|
||||
include "build/data/ovl_Obj_Hugebombiwa/ovl_Obj_Hugebombiwa.data.o"
|
||||
include "build/data/ovl_Obj_Hugebombiwa/ovl_Obj_Hugebombiwa.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Obj_Hugebombiwa/ovl_Obj_Hugebombiwa_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -3048,17 +3034,14 @@ beginseg
|
||||
name "ovl_En_Water_Effect"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Water_Effect/z_en_water_effect.o"
|
||||
include "build/data/ovl_En_Water_Effect/ovl_En_Water_Effect.data.o"
|
||||
include "build/data/ovl_En_Water_Effect/ovl_En_Water_Effect.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Water_Effect/ovl_En_Water_Effect_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
name "ovl_En_Kusa2"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.o"
|
||||
include "build/data/ovl_En_Kusa2/ovl_En_Kusa2.data.o"
|
||||
include "build/data/ovl_En_Kusa2/ovl_En_Kusa2.bss.o"
|
||||
include "build/data/ovl_En_Kusa2/ovl_En_Kusa2.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Kusa2/ovl_En_Kusa2_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -3125,9 +3108,7 @@ beginseg
|
||||
name "ovl_En_Fall"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Fall/z_en_fall.o"
|
||||
include "build/data/ovl_En_Fall/ovl_En_Fall.data.o"
|
||||
include "build/data/ovl_En_Fall/ovl_En_Fall.bss.o"
|
||||
include "build/data/ovl_En_Fall/ovl_En_Fall.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Fall/ovl_En_Fall_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -3367,8 +3348,7 @@ beginseg
|
||||
name "ovl_Obj_Tokeidai"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.o"
|
||||
include "build/data/ovl_Obj_Tokeidai/ovl_Obj_Tokeidai.data.o"
|
||||
include "build/data/ovl_Obj_Tokeidai/ovl_Obj_Tokeidai.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Obj_Tokeidai/ovl_Obj_Tokeidai_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -3632,8 +3612,7 @@ beginseg
|
||||
name "ovl_En_Kame"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Kame/z_en_kame.o"
|
||||
include "build/data/ovl_En_Kame/ovl_En_Kame.data.o"
|
||||
include "build/data/ovl_En_Kame/ovl_En_Kame.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Kame/ovl_En_Kame_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -3851,16 +3830,14 @@ beginseg
|
||||
name "ovl_En_Col_Man"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.o"
|
||||
include "build/data/ovl_En_Col_Man/ovl_En_Col_Man.data.o"
|
||||
include "build/data/ovl_En_Col_Man/ovl_En_Col_Man.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Col_Man/ovl_En_Col_Man_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
name "ovl_En_Talk_Gibud"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.o"
|
||||
include "build/data/ovl_En_Talk_Gibud/ovl_En_Talk_Gibud.data.o"
|
||||
include "build/data/ovl_En_Talk_Gibud/ovl_En_Talk_Gibud.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Talk_Gibud/ovl_En_Talk_Gibud_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -3874,8 +3851,11 @@ beginseg
|
||||
name "ovl_Obj_Snowball"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Obj_Snowball/z_obj_snowball.o"
|
||||
include "build/data/ovl_Obj_Snowball/ovl_Obj_Snowball.data.o"
|
||||
#ifdef NON_MATCHING
|
||||
include "build/src/overlays/actors/ovl_Obj_Snowball/ovl_obj_Snowball_reloc.o"
|
||||
#else
|
||||
include "build/data/ovl_Obj_Snowball/ovl_Obj_Snowball.reloc.o"
|
||||
#endif
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -3890,8 +3870,7 @@ beginseg
|
||||
name "ovl_En_Gb2"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Gb2/z_en_gb2.o"
|
||||
include "build/data/ovl_En_Gb2/ovl_En_Gb2.data.o"
|
||||
include "build/data/ovl_En_Gb2/ovl_En_Gb2.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Gb2/ovl_En_Gb2_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -3990,8 +3969,7 @@ beginseg
|
||||
name "ovl_Obj_Dowsing"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Obj_Dowsing/z_obj_dowsing.o"
|
||||
include "build/data/ovl_Obj_Dowsing/ovl_Obj_Dowsing.data.o"
|
||||
include "build/data/ovl_Obj_Dowsing/ovl_Obj_Dowsing.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Obj_Dowsing/ovl_Obj_Dowsing_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -4274,8 +4252,7 @@ beginseg
|
||||
name "ovl_En_Rail_Skb"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.o"
|
||||
include "build/data/ovl_En_Rail_Skb/ovl_En_Rail_Skb.data.o"
|
||||
include "build/data/ovl_En_Rail_Skb/ovl_En_Rail_Skb.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Rail_Skb/ovl_En_Rail_Skb_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -4415,9 +4392,7 @@ beginseg
|
||||
name "ovl_En_Zog"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Zog/z_en_zog.o"
|
||||
include "build/data/ovl_En_Zog/ovl_En_Zog.data.o"
|
||||
include "build/data/ovl_En_Zog/ovl_En_Zog.bss.o"
|
||||
include "build/data/ovl_En_Zog/ovl_En_Zog.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Zog/ovl_En_Zog_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -4432,16 +4407,14 @@ beginseg
|
||||
name "ovl_Obj_Jg_Gakki"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Obj_Jg_Gakki/z_obj_jg_gakki.o"
|
||||
include "build/data/ovl_Obj_Jg_Gakki/ovl_Obj_Jg_Gakki.data.o"
|
||||
include "build/data/ovl_Obj_Jg_Gakki/ovl_Obj_Jg_Gakki.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Obj_Jg_Gakki/ovl_Obj_Jg_Gakki_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
name "ovl_Bg_Inibs_Movebg"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Bg_Inibs_Movebg/z_bg_inibs_movebg.o"
|
||||
include "build/data/ovl_Bg_Inibs_Movebg/ovl_Bg_Inibs_Movebg.data.o"
|
||||
include "build/data/ovl_Bg_Inibs_Movebg/ovl_Bg_Inibs_Movebg.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Bg_Inibs_Movebg/ovl_Bg_Inibs_Movebg_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -4588,8 +4561,7 @@ beginseg
|
||||
name "ovl_En_Geg"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Geg/z_en_geg.o"
|
||||
include "build/data/ovl_En_Geg/ovl_En_Geg.data.o"
|
||||
include "build/data/ovl_En_Geg/ovl_En_Geg.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Geg/ovl_En_Geg_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -4896,8 +4868,7 @@ beginseg
|
||||
name "ovl_En_Talk"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Talk/z_en_talk.o"
|
||||
include "build/data/ovl_En_Talk/ovl_En_Talk.data.o"
|
||||
include "build/data/ovl_En_Talk/ovl_En_Talk.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Talk/ovl_En_Talk_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -4935,8 +4906,7 @@ beginseg
|
||||
name "ovl_En_Ruppecrow"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.o"
|
||||
include "build/data/ovl_En_Ruppecrow/ovl_En_Ruppecrow.data.o"
|
||||
include "build/data/ovl_En_Ruppecrow/ovl_En_Ruppecrow.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Ruppecrow/ovl_En_Ruppecrow_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -5042,8 +5012,7 @@ beginseg
|
||||
name "ovl_En_Akindonuts"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.o"
|
||||
include "build/data/ovl_En_Akindonuts/ovl_En_Akindonuts.data.o"
|
||||
include "build/data/ovl_En_Akindonuts/ovl_En_Akindonuts.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Akindonuts/ovl_En_Akindonuts_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -5122,7 +5091,6 @@ beginseg
|
||||
name "ovl_En_Bomjima"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.o"
|
||||
include "build/data/ovl_En_Bomjima/ovl_En_Bomjima.data.o"
|
||||
include "build/data/ovl_En_Bomjima/ovl_En_Bomjima.reloc.o"
|
||||
endseg
|
||||
|
||||
@@ -5130,8 +5098,7 @@ beginseg
|
||||
name "ovl_En_Bomjimb"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.o"
|
||||
include "build/data/ovl_En_Bomjimb/ovl_En_Bomjimb.data.o"
|
||||
include "build/data/ovl_En_Bomjimb/ovl_En_Bomjimb.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Bomjimb/ovl_En_Bomjimb_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
||||
+284
-74
@@ -1,4 +1,8 @@
|
||||
#include "global.h"
|
||||
#include "os_malloc.h"
|
||||
#include "libc/stdbool.h"
|
||||
#include "libc/stdint.h"
|
||||
#include "macros.h"
|
||||
#include "functions.h"
|
||||
|
||||
#define FILL_ALLOCBLOCK (1 << 0)
|
||||
#define FILL_FREEBLOCK (1 << 1)
|
||||
@@ -13,9 +17,9 @@
|
||||
#define BLOCK_FREE_MAGIC (0xEF)
|
||||
#define BLOCK_FREE_MAGIC_32 (0xEFEFEFEF)
|
||||
|
||||
extern OSMesg sArenaLockMsg[1];
|
||||
OSMesg sArenaLockMsg[1];
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/__osMalloc/D_80099110.s")
|
||||
void __osMallocAddHeap(Arena* arena, void* heap, size_t size);
|
||||
|
||||
void ArenaImpl_LockInit(Arena* arena) {
|
||||
osCreateMesgQueue(&arena->lock, sArenaLockMsg, ARRAY_COUNT(sArenaLockMsg));
|
||||
@@ -45,111 +49,184 @@ ArenaNode* ArenaImpl_GetLastBlock(Arena* arena) {
|
||||
return last;
|
||||
}
|
||||
|
||||
void __osMallocInit(Arena* arena, void* start, size_t size) {
|
||||
bzero(arena, sizeof(*arena));
|
||||
/**
|
||||
* Initializes \p arena to manage the memory region \p heap.
|
||||
*
|
||||
* @param arena The Arena to initialize.
|
||||
* @param heap The memory region to use as heap space.
|
||||
* @param size The size of the heap.
|
||||
*/
|
||||
void __osMallocInit(Arena* arena, void* heap, size_t size) {
|
||||
bzero(arena, sizeof(Arena));
|
||||
|
||||
ArenaImpl_LockInit(arena);
|
||||
__osMallocAddBlock(arena, start, size);
|
||||
arena->isInit = 1;
|
||||
|
||||
__osMallocAddHeap(arena, heap, size);
|
||||
arena->isInit = true;
|
||||
}
|
||||
|
||||
void __osMallocAddBlock(Arena* arena, void* start, s32 size) {
|
||||
s32 diff;
|
||||
s32 size2;
|
||||
// Original name: __osMallocAddBlock
|
||||
void __osMallocAddHeap(Arena* arena, void* heap, size_t size) {
|
||||
ptrdiff_t diff;
|
||||
s32 alignedSize;
|
||||
ArenaNode* firstNode;
|
||||
ArenaNode* lastNode;
|
||||
|
||||
if (start != NULL) {
|
||||
firstNode = (ArenaNode*)ALIGN16((u32)start);
|
||||
diff = (s32)firstNode - (s32)start;
|
||||
size2 = (size - diff) & ~0xF;
|
||||
if (heap == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (size2 > (s32)sizeof(ArenaNode)) {
|
||||
firstNode->next = NULL;
|
||||
firstNode->prev = NULL;
|
||||
firstNode->size = size2 - sizeof(ArenaNode);
|
||||
firstNode->isFree = 1;
|
||||
firstNode->magic = NODE_MAGIC;
|
||||
ArenaImpl_Lock(arena);
|
||||
lastNode = ArenaImpl_GetLastBlock(arena);
|
||||
if (lastNode == NULL) {
|
||||
arena->head = firstNode;
|
||||
arena->start = start;
|
||||
} else {
|
||||
firstNode->prev = lastNode;
|
||||
lastNode->next = firstNode;
|
||||
}
|
||||
ArenaImpl_Unlock(arena);
|
||||
firstNode = (ArenaNode*)ALIGN16((uintptr_t)heap);
|
||||
diff = (uintptr_t)firstNode - (uintptr_t)heap;
|
||||
alignedSize = ((s32)size - diff) & ~0xF;
|
||||
|
||||
// If the size of the heap is smaller than sizeof(ArenaNode), then the initialization will silently fail
|
||||
if (alignedSize > (s32)sizeof(ArenaNode)) {
|
||||
firstNode->next = NULL;
|
||||
firstNode->prev = NULL;
|
||||
firstNode->size = alignedSize - sizeof(ArenaNode);
|
||||
firstNode->isFree = true;
|
||||
firstNode->magic = NODE_MAGIC;
|
||||
|
||||
ArenaImpl_Lock(arena);
|
||||
|
||||
lastNode = ArenaImpl_GetLastBlock(arena);
|
||||
|
||||
// Checks if there's already a block
|
||||
if (lastNode == NULL) {
|
||||
arena->head = firstNode;
|
||||
arena->start = heap;
|
||||
} else {
|
||||
// Chain the existing block with the new one
|
||||
firstNode->prev = lastNode;
|
||||
lastNode->next = firstNode;
|
||||
}
|
||||
|
||||
ArenaImpl_Unlock(arena);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the whole \p arena, invalidating every allocated pointer to it.
|
||||
*
|
||||
* @param arena The Arena to clear.
|
||||
*/
|
||||
void __osMallocCleanup(Arena* arena) {
|
||||
bzero(arena, sizeof(*arena));
|
||||
bzero(arena, sizeof(Arena));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not the \p arena has been initialized.
|
||||
*
|
||||
* @param arena The Arena to check.
|
||||
* @return u8 `true` if the \p arena has been initialized. `false` otherwise.
|
||||
*/
|
||||
u8 __osMallocIsInitalized(Arena* arena) {
|
||||
return arena->isInit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocates at least \p size bytes of memory using the given \p arena.
|
||||
* The block of memory will be allocated at the start of the first sufficiently large free block.
|
||||
*
|
||||
* - If there's not enough space in the given \p arena, this function will fail, returning `NULL`.
|
||||
* - If \p size is zero, then an empty region of memory is returned.
|
||||
*
|
||||
* To avoid memory leaks, the returned pointer should be eventually deallocated using either `__osFree` or
|
||||
* `__osRealloc`.
|
||||
*
|
||||
* @param[in, out] arena The specific Arena to be used for the allocation.
|
||||
* @param[in] size The size in bytes that will be allocated.
|
||||
* @return void* On success, the allocated area of the \p arena memory. Otherwise, `NULL`.
|
||||
*/
|
||||
void* __osMalloc(Arena* arena, size_t size) {
|
||||
ArenaNode* iter;
|
||||
ArenaNode* newNode;
|
||||
void* alloc;
|
||||
u32 blockSize;
|
||||
alloc = NULL;
|
||||
void* alloc = NULL;
|
||||
|
||||
size = ALIGN16(size);
|
||||
|
||||
ArenaImpl_Lock(arena);
|
||||
|
||||
// Start iterating from the head of the arena.
|
||||
iter = arena->head;
|
||||
|
||||
// Iterate over the arena looking for a big enough space of memory.
|
||||
while (iter != NULL) {
|
||||
if (iter->isFree && iter->size >= size) {
|
||||
ArenaNode* next;
|
||||
blockSize = ALIGN16(size) + sizeof(ArenaNode);
|
||||
size_t blockSize = ALIGN16(size) + sizeof(ArenaNode);
|
||||
|
||||
// If the block is larger than the requested size, then split it and just use the required size of the
|
||||
// current block.
|
||||
if (blockSize < iter->size) {
|
||||
newNode = (ArenaNode*)((u32)iter + blockSize);
|
||||
ArenaNode* next;
|
||||
|
||||
newNode = (ArenaNode*)((uintptr_t)iter + blockSize);
|
||||
newNode->next = iter->next;
|
||||
newNode->prev = iter;
|
||||
newNode->size = iter->size - blockSize;
|
||||
newNode->isFree = 1;
|
||||
newNode->isFree = true;
|
||||
newNode->magic = NODE_MAGIC;
|
||||
|
||||
iter->next = newNode;
|
||||
iter->size = size;
|
||||
|
||||
next = newNode->next;
|
||||
if (next) {
|
||||
if (next != NULL) {
|
||||
next->prev = newNode;
|
||||
}
|
||||
}
|
||||
|
||||
iter->isFree = 0;
|
||||
alloc = (void*)((u32)iter + sizeof(ArenaNode));
|
||||
iter->isFree = false;
|
||||
alloc = (void*)((uintptr_t)iter + sizeof(ArenaNode));
|
||||
break;
|
||||
}
|
||||
|
||||
iter = iter->next;
|
||||
}
|
||||
|
||||
ArenaImpl_Unlock(arena);
|
||||
|
||||
return alloc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocates at least \p size bytes of memory using the given \p arena.
|
||||
* Unlike __osMalloc, the block of memory will be allocated from the end of the \p arena.
|
||||
*
|
||||
* - If there's not enough space in the given \p arena, this function will fail, returning `NULL`.
|
||||
* - If \p size is zero, then an empty region of memory is returned.
|
||||
*
|
||||
* To avoid memory leaks, the returned pointer should be eventually deallocated using `__osFree` or `__osRealloc`.
|
||||
*
|
||||
* @param[in, out] arena The specific Arena to be used for the allocation.
|
||||
* @param[in] size The size in bytes that will be allocated.
|
||||
* @return void* On success, the allocated area of the \p arena memory. Otherwise, `NULL`.
|
||||
*/
|
||||
void* __osMallocR(Arena* arena, size_t size) {
|
||||
ArenaNode* iter;
|
||||
ArenaNode* newNode;
|
||||
u32 blockSize;
|
||||
size_t blockSize;
|
||||
void* alloc = NULL;
|
||||
|
||||
size = ALIGN16(size);
|
||||
|
||||
ArenaImpl_Lock(arena);
|
||||
|
||||
// Start iterating from the last block of the arena.
|
||||
iter = ArenaImpl_GetLastBlock(arena);
|
||||
|
||||
// Iterate in reverse the arena looking for a big enough space of memory.
|
||||
while (iter != NULL) {
|
||||
if (iter->isFree && iter->size >= size) {
|
||||
ArenaNode* next;
|
||||
blockSize = ALIGN16(size) + sizeof(ArenaNode);
|
||||
|
||||
// If the block is larger than the requested size, then split it and just use the required size of the
|
||||
// current block.
|
||||
if (blockSize < iter->size) {
|
||||
newNode = (ArenaNode*)((u32)iter + (iter->size - size));
|
||||
ArenaNode* next;
|
||||
|
||||
newNode = (ArenaNode*)((uintptr_t)iter + (iter->size - size));
|
||||
newNode->next = iter->next;
|
||||
newNode->prev = iter;
|
||||
newNode->size = size;
|
||||
@@ -157,69 +234,171 @@ void* __osMallocR(Arena* arena, size_t size) {
|
||||
|
||||
iter->next = newNode;
|
||||
iter->size -= blockSize;
|
||||
|
||||
next = newNode->next;
|
||||
if (next) {
|
||||
if (next != NULL) {
|
||||
next->prev = newNode;
|
||||
}
|
||||
iter = newNode;
|
||||
}
|
||||
|
||||
iter->isFree = 0;
|
||||
alloc = (void*)((u32)iter + sizeof(ArenaNode));
|
||||
iter->isFree = false;
|
||||
alloc = (void*)((uintptr_t)iter + sizeof(ArenaNode));
|
||||
break;
|
||||
}
|
||||
iter = iter->prev;
|
||||
}
|
||||
|
||||
ArenaImpl_Unlock(arena);
|
||||
|
||||
return alloc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deallocates the pointer \p ptr previously allocated by `__osMalloc`, `__osMallocR` or `__osRealloc`.
|
||||
* If \p ptr is `NULL` or it has been already been freed, then this function does nothing.
|
||||
*
|
||||
* - The behaviour is undefined if \p ptr is not a memory region returned by one of the cited allocating
|
||||
* functions.
|
||||
* - The behaviour is undefined if \p ptr doesn't correspond to the given \p arena.
|
||||
* - Any access to the freed pointer is undefined behaviour.
|
||||
*
|
||||
* @param[in, out] arena The specific Arena to be used for the allocation.
|
||||
* @param[in, out] ptr The allocated memory block to deallocate.
|
||||
*/
|
||||
void __osFree(Arena* arena, void* ptr) {
|
||||
ArenaNode* node;
|
||||
ArenaNode* next;
|
||||
ArenaNode* prev;
|
||||
ArenaNode* newNext;
|
||||
|
||||
ArenaImpl_Lock(arena);
|
||||
node = (ArenaNode*)((u32)ptr - sizeof(ArenaNode));
|
||||
|
||||
if (ptr == NULL || (node->magic != NODE_MAGIC) || node->isFree) {
|
||||
goto end;
|
||||
}
|
||||
node = (ArenaNode*)((uintptr_t)ptr - sizeof(ArenaNode));
|
||||
|
||||
next = node->next;
|
||||
prev = node->prev;
|
||||
node->isFree = 1;
|
||||
if (ptr != NULL && node->magic == NODE_MAGIC && !node->isFree) {
|
||||
next = node->next;
|
||||
prev = node->prev;
|
||||
node->isFree = true;
|
||||
|
||||
newNext = next;
|
||||
if ((u32)next == (u32)node + sizeof(ArenaNode) + node->size && next->isFree) {
|
||||
newNext = next->next;
|
||||
if (newNext != NULL) {
|
||||
newNext->prev = node;
|
||||
// Checks if the next node is contiguous to the current node and if it isn't currently allocated. Then merge the
|
||||
// two nodes into one.
|
||||
if ((uintptr_t)next == (uintptr_t)node + sizeof(ArenaNode) + node->size && next->isFree) {
|
||||
ArenaNode* newNext = next->next;
|
||||
|
||||
if (newNext != NULL) {
|
||||
newNext->prev = node;
|
||||
}
|
||||
|
||||
node->size += next->size + sizeof(ArenaNode);
|
||||
|
||||
node->next = newNext;
|
||||
next = newNext;
|
||||
}
|
||||
|
||||
node->size += next->size + sizeof(ArenaNode);
|
||||
// Checks if the previous node is contiguous to the current node and if it isn't currently allocated. Then merge
|
||||
// the two nodes into one.
|
||||
if (prev != NULL && prev->isFree && (uintptr_t)node == (uintptr_t)prev + sizeof(ArenaNode) + prev->size) {
|
||||
if (next != NULL) {
|
||||
next->prev = prev;
|
||||
}
|
||||
|
||||
node->next = newNext;
|
||||
next = newNext;
|
||||
}
|
||||
|
||||
if (prev != NULL && prev->isFree && (u32)node == (u32)prev + sizeof(ArenaNode) + prev->size) {
|
||||
if (next) {
|
||||
next->prev = prev;
|
||||
prev->next = next;
|
||||
prev->size += node->size + sizeof(ArenaNode);
|
||||
}
|
||||
prev->next = next;
|
||||
prev->size += node->size + sizeof(ArenaNode);
|
||||
}
|
||||
|
||||
end:
|
||||
ArenaImpl_Unlock(arena);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/__osMalloc/__osRealloc.s")
|
||||
/**
|
||||
* Reallocates the pointer \p ptr.
|
||||
* \p ptr must be either a pointer previously allocated by `__osMalloc`, `__osMallocR` or `__osRealloc` and
|
||||
* not freed yet, or a `NULL` pointer.
|
||||
*
|
||||
* - If \p ptr is `NULL` a new pointer is allocated. See `__osMalloc` for more details.
|
||||
* - If \p newSize is 0, then the given pointer is freed and `NULL` is returned. See `__osFree` for more details.
|
||||
* - If \p newSize is bigger than the currently allocated allocated pointer, then the area of memory is expanded to a
|
||||
* size big enough to fit the requested size.
|
||||
*
|
||||
* - The behaviour is undefined if \p ptr is not a memory region returned by one of the cited allocating
|
||||
* functions.
|
||||
* - The behaviour is undefined if \p ptr doesn't correspond to the given \p arena.
|
||||
* - If the pointer is freed, then any access to the original freed pointer is undefined behaviour.
|
||||
*
|
||||
* @param[in, out] arena The specific Arena to be used for the allocation.
|
||||
* @param[in, out] ptr The allocated memory block to deallocate.
|
||||
* @param[in] newSize The new requested size.
|
||||
* @return void* On success, the pointer to the reallocated area of memory. On failure, `NULL` is returned,
|
||||
* and the original parameter \p ptr remains valid.
|
||||
*/
|
||||
void* __osRealloc(Arena* arena, void* ptr, size_t newSize) {
|
||||
ArenaImpl_Lock(arena);
|
||||
|
||||
void __osAnalyzeArena(Arena* arena, size_t* outMaxFree, size_t* outFree, size_t* outAlloc) {
|
||||
(void)"__osRealloc(%08x, %d)\n";
|
||||
|
||||
if (ptr == NULL) {
|
||||
// if the `ptr` is NULL, then allocate a new pointer with the specified size
|
||||
// if newSize is 0, then __osMalloc would return a NULL pointer
|
||||
ptr = __osMalloc(arena, newSize);
|
||||
} else if (newSize == 0) {
|
||||
// if the requested size is zero, then free the pointer
|
||||
__osFree(arena, ptr);
|
||||
ptr = NULL;
|
||||
} else {
|
||||
size_t diff;
|
||||
void* newPtr;
|
||||
// Gets the start of the ArenaNode pointer embedded
|
||||
ArenaNode* node = (void*)((uintptr_t)ptr - sizeof(ArenaNode));
|
||||
|
||||
newSize = ALIGN16(newSize);
|
||||
|
||||
// Only reallocate the memory if the new size isn't smaller than the actual node size
|
||||
if ((newSize != node->size) && (node->size < newSize)) {
|
||||
ArenaNode* next = node->next;
|
||||
|
||||
diff = newSize - node->size;
|
||||
// Checks if the next node is contiguous to the current allocated node and it has enough space to fit the
|
||||
// new requested size
|
||||
if (((uintptr_t)next == (uintptr_t)node + node->size + sizeof(ArenaNode)) && (next->isFree) &&
|
||||
(next->size >= diff)) {
|
||||
ArenaNode* next2 = next->next;
|
||||
|
||||
next->size = (next->size - diff);
|
||||
if (next2 != NULL) {
|
||||
// Update the previous element of the linked list
|
||||
next2->prev = (void*)((uintptr_t)next + diff);
|
||||
}
|
||||
|
||||
next2 = (void*)((uintptr_t)next + diff);
|
||||
node->next = next2;
|
||||
node->size = newSize;
|
||||
__osMemcpy(next2, next, sizeof(ArenaNode));
|
||||
} else {
|
||||
// Create a new pointer and manually copy the data from the old pointer to the new one
|
||||
newPtr = __osMalloc(arena, newSize);
|
||||
if (newPtr != NULL) {
|
||||
bcopy(newPtr, ptr, node->size);
|
||||
__osFree(arena, ptr);
|
||||
}
|
||||
ptr = newPtr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ArenaImpl_Unlock(arena);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the size of the largest free block, the total free space and the total allocated space.
|
||||
*
|
||||
* @param[in, out] arena The Arena which will be used to get the values from.
|
||||
* @param[out] outMaxFree The size of the largest free block.
|
||||
* @param[out] outFree The total free space.
|
||||
* @param[out] outAlloc The total allocated space.
|
||||
*/
|
||||
void __osGetSizes(Arena* arena, size_t* outMaxFree, size_t* outFree, size_t* outAlloc) {
|
||||
ArenaNode* iter;
|
||||
|
||||
ArenaImpl_Lock(arena);
|
||||
@@ -245,4 +424,35 @@ void __osAnalyzeArena(Arena* arena, size_t* outMaxFree, size_t* outFree, size_t*
|
||||
ArenaImpl_Unlock(arena);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/__osMalloc/__osCheckArena.s")
|
||||
/**
|
||||
* Checks the validity of every node of the \p arena.
|
||||
*
|
||||
* @param arena The Arena to check.
|
||||
* @return s32 0 if every pointer is valid. 1 otherwise.
|
||||
*/
|
||||
s32 __osCheckArena(Arena* arena) {
|
||||
ArenaNode* iter;
|
||||
s32 err = 0;
|
||||
|
||||
ArenaImpl_Lock(arena);
|
||||
|
||||
// "Checking the contents of the arena..."
|
||||
(void)"アリーナの内容をチェックしています... (%08x)\n";
|
||||
|
||||
for (iter = arena->head; iter != NULL; iter = iter->next) {
|
||||
if (iter->magic != NODE_MAGIC) {
|
||||
// "Oops!!"
|
||||
(void)"おおっと!! (%08x %08x)\n";
|
||||
|
||||
err = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// "The arena still looks good"
|
||||
(void)"アリーナはまだ、いけそうです\n";
|
||||
|
||||
ArenaImpl_Unlock(arena);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "os_malloc.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/boot_800862E0/SystemArena_MallocMin1.s")
|
||||
|
||||
|
||||
@@ -24,30 +24,30 @@ f32 func_80086760(f32 x) {
|
||||
// Unused
|
||||
// Math_FFloorF
|
||||
f32 func_80086794(f32 x) {
|
||||
func_80086C70(x);
|
||||
return func_80086C70(x);
|
||||
}
|
||||
|
||||
// Unused
|
||||
// Math_FCeilF
|
||||
f32 func_800867B4(f32 x) {
|
||||
func_80086CA8(x);
|
||||
return func_80086CA8(x);
|
||||
}
|
||||
|
||||
// Unused
|
||||
// Math_FRoundF
|
||||
f32 func_800867D4(f32 x) {
|
||||
func_80086D50(x);
|
||||
return func_80086D50(x);
|
||||
}
|
||||
|
||||
// Unused
|
||||
// Math_FTruncF
|
||||
f32 func_800867F4(f32 x) {
|
||||
func_80086CE0(x);
|
||||
return func_80086CE0(x);
|
||||
}
|
||||
|
||||
// Math_FNearbyIntF
|
||||
f32 func_80086814(f32 x) {
|
||||
func_80086D18(x);
|
||||
return func_80086D18(x);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "system_malloc.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/loadfragment/Load_Relocate.s")
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "system_malloc.h"
|
||||
|
||||
UNK_TYPE4 D_80096C30 = 2;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "os_malloc.h"
|
||||
|
||||
Arena gSystemArena;
|
||||
|
||||
@@ -29,8 +30,8 @@ void* SystemArena_Calloc(u32 elements, size_t size) {
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void SystemArena_AnalyzeArena(size_t* maxFreeBlock, size_t* bytesFree, size_t* bytesAllocated) {
|
||||
__osAnalyzeArena(&gSystemArena, maxFreeBlock, bytesFree, bytesAllocated);
|
||||
void SystemArena_GetSizes(size_t* maxFreeBlock, size_t* bytesFree, size_t* bytesAllocated) {
|
||||
__osGetSizes(&gSystemArena, maxFreeBlock, bytesFree, bytesAllocated);
|
||||
}
|
||||
|
||||
u32 SystemArena_CheckArena(void) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
|
||||
u8 sYaz0DataBuffer[0x400];
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
|
||||
u32 sDmaMgrDmaBuffSize = 0x2000;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
|
||||
u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE];
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#include "global.h"
|
||||
|
||||
void Audio_InvalDCache(void* buf, size_t size) {
|
||||
OSIntMask prevMask = osSetIntMask(1);
|
||||
|
||||
osInvalDCache(buf, size);
|
||||
osSetIntMask(prevMask);
|
||||
}
|
||||
|
||||
void Audio_WritebackDCache(void* buf, size_t size) {
|
||||
OSIntMask prevMask = osSetIntMask(1);
|
||||
|
||||
osWritebackDCache(buf, size);
|
||||
osSetIntMask(prevMask);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194710/func_80194710.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194710/func_80194750.s")
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F170.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F1C0.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/Audio_PlaySfxAtPos.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F208.s")
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A5C8C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A5CFC.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/Audio_PlaySfxGeneral.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A5DDC.s")
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A7284.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A72CC.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/Audio_StopSfxByPos.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A7328.s")
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F0390/func_800F0390.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F0390/func_800F03C0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F0390/func_800F048C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F0390/Audio_PlaySoundAtPosition.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800F0390/func_800F0590.s")
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "system_malloc.h"
|
||||
|
||||
s32 gFramerateDivisor = 1;
|
||||
f32 gFramerateDivisorF = 1.0f;
|
||||
@@ -174,7 +175,7 @@ void GameState_Realloc(GameState* gameState, size_t size) {
|
||||
alloc = &gameState->alloc;
|
||||
THA_Dt(&gameState->heap);
|
||||
GameAlloc_Free(alloc, heapStart);
|
||||
SystemArena_AnalyzeArena(&systemMaxFree, &bytesFree, &bytesAllocated);
|
||||
SystemArena_GetSizes(&systemMaxFree, &bytesFree, &bytesAllocated);
|
||||
size = ((systemMaxFree - (sizeof(ArenaNode))) < size) ? (0) : (size);
|
||||
if (size == 0) {
|
||||
size = systemMaxFree - (sizeof(ArenaNode));
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "system_malloc.h"
|
||||
|
||||
void GameAlloc_Log(GameAlloc* this) {
|
||||
GameAllocEntry* iter;
|
||||
|
||||
+11
-16
@@ -1,5 +1,6 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "system_malloc.h"
|
||||
#include "overlays/gamestates/ovl_daytelop/z_daytelop.h"
|
||||
#include "overlays/gamestates/ovl_file_choose/z_file_choose.h"
|
||||
#include "overlays/gamestates/ovl_opening/z_opening.h"
|
||||
@@ -88,33 +89,27 @@ GameStateOverlay* Graph_GetNextGameState(GameState* gameState) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Regalloc differences
|
||||
void* Graph_FaultAddrConvFunc(void* address, void* param) {
|
||||
u32 addr = address;
|
||||
GameStateOverlay* gamestateOvl;
|
||||
u32 ramConv;
|
||||
u32 ramStart;
|
||||
u32 diff;
|
||||
uintptr_t addr = address;
|
||||
GameStateOverlay* gamestateOvl = &gGameStateOverlayTable[0];
|
||||
uintptr_t ramConv;
|
||||
void* ramStart;
|
||||
uintptr_t diff;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < graphNumGameStates; i++) {
|
||||
gamestateOvl = &gGameStateOverlayTable[i];
|
||||
for (i = 0; i < graphNumGameStates; i++, gamestateOvl++) {
|
||||
diff = VRAM_PTR_SIZE(gamestateOvl);
|
||||
ramStart = gamestateOvl->loadedRamAddr;
|
||||
diff = (u32)gamestateOvl->vramEnd - (u32)gamestateOvl->vramStart;
|
||||
ramConv = (u32)gamestateOvl->vramStart - ramStart;
|
||||
ramConv = (uintptr_t)gamestateOvl->vramStart - (uintptr_t)ramStart;
|
||||
|
||||
if (gamestateOvl->loadedRamAddr != NULL) {
|
||||
if (addr >= ramStart && addr < ramStart + diff) {
|
||||
if (ramStart != NULL) {
|
||||
if (addr >= (uintptr_t)ramStart && addr < (uintptr_t)ramStart + diff) {
|
||||
return addr + ramConv;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/graph/Graph_FaultAddrConvFunc.s")
|
||||
#endif
|
||||
|
||||
void Graph_Init(GraphicsContext* gfxCtx) {
|
||||
bzero(gfxCtx, sizeof(GraphicsContext));
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "system_malloc.h"
|
||||
|
||||
ListAlloc* ListAlloc_Init(ListAlloc* this) {
|
||||
this->prev = NULL;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
|
||||
#define RSP_DONE_MSG 667
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "system_malloc.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/speed_meter/func_80177390.s")
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "system_malloc.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_cmpdma/func_80178750.s")
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "system_malloc.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_flashrom/func_801857C0.s")
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_IsPointInSphere.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017D668.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_PointDistToLine2D.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017D7C0.s")
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "system_malloc.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_DLF/Overlay_LoadGameState.s")
|
||||
|
||||
|
||||
+4297
-452
File diff suppressed because it is too large
Load Diff
@@ -722,7 +722,7 @@ void ActorOverlayTable_FaultPrint(void* arg0, void* arg1) {
|
||||
FaultDrawer_Printf("No. RamStart- RamEnd cn Name\n");
|
||||
|
||||
for (i = 0, overlayEntry = &gActorOverlayTable[0]; i < gMaxActorId; i++, overlayEntry++) {
|
||||
overlaySize = (u32)overlayEntry->vramEnd - (u32)overlayEntry->vramStart;
|
||||
overlaySize = VRAM_PTR_SIZE(overlayEntry);
|
||||
if (overlayEntry->loadedRamAddr != NULL) {
|
||||
FaultDrawer_Printf("%3d %08x-%08x %3d %s\n", i, overlayEntry->loadedRamAddr,
|
||||
(u32)overlayEntry->loadedRamAddr + overlaySize, overlayEntry->numLoaded, "");
|
||||
@@ -740,7 +740,7 @@ void* ActorOverlayTable_FaultAddrConv(void* arg0, void* arg1) {
|
||||
u32 offset;
|
||||
|
||||
for (i = 0; i < gMaxActorId; i++, overlayEntry++) {
|
||||
size = (u8*)overlayEntry->vramEnd - (u8*)overlayEntry->vramStart;
|
||||
size = VRAM_PTR_SIZE(overlayEntry);
|
||||
ramStart = overlayEntry->loadedRamAddr;
|
||||
ramEnd = ramStart + size;
|
||||
offset = (u8*)overlayEntry->vramStart - ramStart;
|
||||
|
||||
+43
-80
@@ -68,10 +68,12 @@ BgSpecialSceneMaxObjects sCustomDynapolyMem[] = {
|
||||
{ SCENE_21MITURINMAE, 1000, 600, 512 },
|
||||
};
|
||||
|
||||
// TODO: All these bss variables are localized to one function and can
|
||||
// likely be made into in-function static bss variables in the future
|
||||
char D_801ED950[80];
|
||||
char D_801ED9A0[80];
|
||||
Vec3f D_801ED9F0[3]; // polyVerts
|
||||
Vec3f D_801EDA18[3]; // polyVerts //not ok, needs to be inlined to match
|
||||
Vec3f D_801EDA18[3]; // polyVerts
|
||||
MtxF D_801EDA40;
|
||||
Vec3f D_801EDA80[3]; // polyVerts
|
||||
char D_801EDAA8[80];
|
||||
@@ -79,8 +81,6 @@ char D_801EDAF8[80];
|
||||
Vec3f D_801EDB48[3]; // polyVerts
|
||||
Vec3f D_801EDB70[3];
|
||||
Plane D_801EDB98;
|
||||
Sphere16 D_801EDBA8;
|
||||
TriNorm D_801EDBB0;
|
||||
|
||||
void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector);
|
||||
f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast);
|
||||
@@ -322,40 +322,34 @@ s32 CollisionPoly_CheckYIntersectApprox1(CollisionPoly* poly, Vec3s* vtxList, f3
|
||||
* Checks if point (`x`,`z`) is within `checkDist` of `poly`, computing `yIntersect` if true
|
||||
* Determinant max 0.0f (checks if on or within poly)
|
||||
*/
|
||||
#ifdef NON_MATCHING
|
||||
s32 CollisionPoly_CheckYIntersect(CollisionPoly* poly, Vec3s* vtxList, f32 x, f32 z, f32* yIntersect, f32 checkDist) {
|
||||
static Vec3f polyVerts[3]; // D_801EDA18
|
||||
Vec3s* sVerts;
|
||||
f32 nx;
|
||||
f32 ny;
|
||||
f32 nz;
|
||||
|
||||
sVerts = &vtxList[COLPOLY_VTX_INDEX(poly->flags_vIA)];
|
||||
polyVerts[0].x = sVerts->x;
|
||||
polyVerts[0].y = sVerts->y;
|
||||
polyVerts[0].z = sVerts->z;
|
||||
D_801EDA18[0].x = sVerts->x;
|
||||
D_801EDA18[0].y = sVerts->y;
|
||||
D_801EDA18[0].z = sVerts->z;
|
||||
sVerts = &vtxList[COLPOLY_VTX_INDEX(poly->flags_vIB)];
|
||||
polyVerts[1].x = sVerts->x;
|
||||
polyVerts[1].y = sVerts->y;
|
||||
polyVerts[1].z = sVerts->z;
|
||||
sVerts = &vtxList[poly->vIC];
|
||||
polyVerts[2].x = sVerts->x;
|
||||
polyVerts[2].y = sVerts->y;
|
||||
polyVerts[2].z = sVerts->z;
|
||||
D_801EDA18[1].x = sVerts->x;
|
||||
D_801EDA18[1].y = sVerts->y;
|
||||
D_801EDA18[1].z = sVerts->z;
|
||||
sVerts = &vtxList[(s32)poly->vIC];
|
||||
D_801EDA18[2].x = sVerts->x;
|
||||
D_801EDA18[2].y = sVerts->y;
|
||||
D_801EDA18[2].z = sVerts->z;
|
||||
|
||||
if (!func_8017A304(&polyVerts[0], &polyVerts[1], &polyVerts[2], z, x, checkDist)) {
|
||||
if (!func_8017A304(&D_801EDA18[0], &D_801EDA18[1], &D_801EDA18[2], z, x, checkDist)) {
|
||||
return 0;
|
||||
}
|
||||
nx = COLPOLY_GET_NORMAL(poly->normal.x);
|
||||
ny = COLPOLY_GET_NORMAL(poly->normal.y);
|
||||
nz = COLPOLY_GET_NORMAL(poly->normal.z);
|
||||
return Math3D_TriChkPointParaYIntersectInsideTri2(&polyVerts[0], &polyVerts[1], &polyVerts[2], nx, ny, nz,
|
||||
return Math3D_TriChkPointParaYIntersectInsideTri2(&D_801EDA18[0], &D_801EDA18[1], &D_801EDA18[2], nx, ny, nz,
|
||||
poly->dist, z, x, yIntersect, checkDist);
|
||||
}
|
||||
#else
|
||||
s32 CollisionPoly_CheckYIntersect(CollisionPoly* poly, Vec3s* vtxList, f32 x, f32 z, f32* yIntersect, f32 checkDist);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/CollisionPoly_CheckYIntersect.s")
|
||||
#endif
|
||||
|
||||
s32 CollisionPoly_CheckYIntersectApprox2(CollisionPoly* poly, Vec3s* vtxList, f32 x, f32 z, f32* yIntersect) {
|
||||
return CollisionPoly_CheckYIntersectApprox1(poly, vtxList, x, z, yIntersect, 1.0f);
|
||||
@@ -427,8 +421,6 @@ s32 CollisionPoly_LineVsPoly(BgLineVsPolyTest* a0);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/CollisionPoly_LineVsPoly.s")
|
||||
#endif
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// OK but .bss order issues
|
||||
s32 CollisionPoly_SphVsPoly(CollisionPoly* poly, Vec3s* vtxList, Vec3f* center, f32 radius) {
|
||||
static Sphere16 sphere; // D_801EDBA8
|
||||
static TriNorm tri; // D_801EDBB0
|
||||
@@ -443,12 +435,7 @@ s32 CollisionPoly_SphVsPoly(CollisionPoly* poly, Vec3s* vtxList, Vec3f* center,
|
||||
sphere.radius = radius;
|
||||
return Math3D_ColSphereTri(&sphere, &tri, &intersect);
|
||||
}
|
||||
#else
|
||||
s32 CollisionPoly_SphVsPoly(CollisionPoly* poly, Vec3s* vtxList, Vec3f* center, f32 radius);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/CollisionPoly_SphVsPoly.s")
|
||||
#endif
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
/**
|
||||
* Add poly to StaticLookup table
|
||||
* Table is sorted by poly's smallest y vertex component
|
||||
@@ -486,6 +473,8 @@ void StaticLookup_AddPolyToSSList(CollisionContext* colCtx, SSList* ssList, Coll
|
||||
while (true) {
|
||||
// if at the end of the list
|
||||
if (curNode->next == SS_NULL) {
|
||||
s32 pad;
|
||||
|
||||
newNodeId = SSNodeList_GetNextNodeIdx(&colCtx->polyNodes);
|
||||
SSNode_SetValue(&colCtx->polyNodes.tbl[newNodeId], &polyId, SS_NULL);
|
||||
curNode->next = newNodeId;
|
||||
@@ -507,9 +496,6 @@ void StaticLookup_AddPolyToSSList(CollisionContext* colCtx, SSList* ssList, Coll
|
||||
curNode = nextNode;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/StaticLookup_AddPolyToSSList.s")
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Add CollisionPoly to StaticLookup list
|
||||
@@ -871,28 +857,29 @@ s32 BgCheck_SphVsStaticWall(StaticLookup* lookup, CollisionContext* colCtx, u16
|
||||
* `outPoly` returns the poly collided with
|
||||
* `outY` returns the y coordinate needed to not collide with `outPoly`
|
||||
*/
|
||||
#ifdef NON_MATCHING
|
||||
s32 BgCheck_CheckStaticCeiling(StaticLookup* lookup, u16 xpFlags, CollisionContext* colCtx, f32* outY, Vec3f* pos,
|
||||
f32 checkHeight, CollisionPoly** outPoly, Actor* actor) {
|
||||
s32 result = false;
|
||||
// u16 nextId;
|
||||
CollisionPoly* curPoly;
|
||||
CollisionPoly* polyList;
|
||||
f32 ceilingY;
|
||||
Vec3s* vtxList;
|
||||
SSNode* curNode;
|
||||
s32 curPolyId;
|
||||
f32 ceilingY;
|
||||
SSNode* curNode;
|
||||
Vec3s* vtxList;
|
||||
|
||||
if (lookup->ceiling.head == SS_NULL) {
|
||||
return result;
|
||||
}
|
||||
curNode = &colCtx->polyNodes.tbl[lookup->ceiling.head];
|
||||
polyList = colCtx->colHeader->polyList;
|
||||
vtxList = colCtx->colHeader->vtxList;
|
||||
curNode = &colCtx->polyNodes.tbl[lookup->ceiling.head];
|
||||
|
||||
*outY = pos->y;
|
||||
|
||||
while (true) {
|
||||
f32 intersectDist;
|
||||
f32 ny;
|
||||
|
||||
curPolyId = curNode->polyId;
|
||||
curPoly = &polyList[curPolyId];
|
||||
if (COLPOLY_VIA_FLAG_TEST(colCtx->colHeader->polyList[curPolyId].flags_vIA, xpFlags) ||
|
||||
@@ -908,8 +895,8 @@ s32 BgCheck_CheckStaticCeiling(StaticLookup* lookup, u16 xpFlags, CollisionConte
|
||||
}
|
||||
|
||||
if (CollisionPoly_CheckYIntersectApprox2(curPoly, vtxList, pos->x, pos->z, &ceilingY)) {
|
||||
f32 intersectDist = ceilingY - *outY;
|
||||
f32 ny = COLPOLY_GET_NORMAL(curPoly->normal.y);
|
||||
intersectDist = ceilingY - *outY;
|
||||
ny = COLPOLY_GET_NORMAL(curPoly->normal.y);
|
||||
|
||||
if (intersectDist > 0 && intersectDist < checkHeight && intersectDist * ny <= 0) {
|
||||
*outY = ceilingY - checkHeight;
|
||||
@@ -926,11 +913,6 @@ s32 BgCheck_CheckStaticCeiling(StaticLookup* lookup, u16 xpFlags, CollisionConte
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#else
|
||||
s32 BgCheck_CheckStaticCeiling(StaticLookup* lookup, u16 xpFlags, CollisionContext* colCtx, f32* outY, Vec3f* pos,
|
||||
f32 checkHeight, CollisionPoly** outPoly, Actor* actor);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/BgCheck_CheckStaticCeiling.s")
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Tests if line `posA` to `posB` intersects with a static poly in list `ssList`. Uses polyCheckTbl
|
||||
@@ -1049,7 +1031,6 @@ s32 BgCheck_CheckLineInSubdivision(StaticLineTest* arg0) {
|
||||
* returns true if any poly intersects the sphere, else returns false
|
||||
* `outPoly` returns the pointer of the first poly found that intersects
|
||||
*/
|
||||
#ifdef NON_MATCHING
|
||||
s32 BgCheck_SphVsFirstStaticPolyList(SSNode* node, u16 xpFlags, CollisionContext* colCtx, Vec3f* center, f32 radius,
|
||||
CollisionPoly** outPoly, Actor* actor) {
|
||||
Vec3s* vtxList;
|
||||
@@ -1057,7 +1038,6 @@ s32 BgCheck_SphVsFirstStaticPolyList(SSNode* node, u16 xpFlags, CollisionContext
|
||||
CollisionPoly* curPoly;
|
||||
u16 nextId;
|
||||
s16 curPolyId;
|
||||
s32 pad;
|
||||
|
||||
polyList = colCtx->colHeader->polyList;
|
||||
vtxList = colCtx->colHeader->vtxList;
|
||||
@@ -1088,17 +1068,14 @@ s32 BgCheck_SphVsFirstStaticPolyList(SSNode* node, u16 xpFlags, CollisionContext
|
||||
}
|
||||
if (node->next != SS_NULL) {
|
||||
node = &colCtx->polyNodes.tbl[node->next];
|
||||
{ s32 pad; }
|
||||
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
s32 BgCheck_SphVsFirstStaticPolyList(SSNode* node, u16 xpFlags, CollisionContext* colCtx, Vec3f* center, f32 radius,
|
||||
CollisionPoly** outPoly, Actor* actor);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/BgCheck_SphVsFirstStaticPolyList.s")
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Get first static poly intersecting sphere `center` `radius` within `lookup`
|
||||
@@ -1539,16 +1516,12 @@ s32 BgCheck_GetSpecialSceneMaxObjects(GlobalContext* globalCtx, s32* maxNodes, s
|
||||
/**
|
||||
* Allocate CollisionContext
|
||||
*/
|
||||
#ifdef NON_MATCHING
|
||||
void BgCheck_Allocate(CollisionContext* colCtx, GlobalContext* globalCtx, CollisionHeader* colHeader) {
|
||||
u32 tblMax;
|
||||
u32 memSize;
|
||||
u32 lookupTblMemSize;
|
||||
SSNodeList* nodeList;
|
||||
s32 useCustomSubdivisions;
|
||||
u32 customMemSize;
|
||||
s32 customNodeListMax;
|
||||
s32 i;
|
||||
|
||||
customNodeListMax = -1;
|
||||
colCtx->colHeader = colHeader;
|
||||
@@ -1563,6 +1536,10 @@ void BgCheck_Allocate(CollisionContext* colCtx, GlobalContext* globalCtx, Collis
|
||||
colCtx->subdivAmount.y = 4;
|
||||
colCtx->subdivAmount.z = 16;
|
||||
} else {
|
||||
u32 customMemSize;
|
||||
s32 useCustomSubdivisions;
|
||||
s32 i;
|
||||
|
||||
if (BgCheck_TryGetCustomMemsize(globalCtx->sceneNum, &customMemSize)) {
|
||||
colCtx->memSize = customMemSize;
|
||||
} else {
|
||||
@@ -1631,10 +1608,6 @@ void BgCheck_Allocate(CollisionContext* colCtx, GlobalContext* globalCtx, Collis
|
||||
DynaPoly_Init(globalCtx, &colCtx->dyna);
|
||||
DynaPoly_Alloc(globalCtx, &colCtx->dyna);
|
||||
}
|
||||
#else
|
||||
void BgCheck_Allocate(CollisionContext* colCtx, GlobalContext* globalCtx, CollisionHeader* colHeader);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/BgCheck_Allocate.s")
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enables CollisionContext wide flags
|
||||
@@ -2182,7 +2155,6 @@ s32 BgCheck_EntityCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos,
|
||||
return BgCheck_CheckCeilingImpl(colCtx, COLPOLY_IGNORE_ENTITY, outY, pos, checkHeight, outPoly, outBgId, actor);
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
/**
|
||||
* Tests if a line from `posA` to `posB` intersects with a poly
|
||||
* returns true if it does, else false
|
||||
@@ -2202,12 +2174,9 @@ s32 BgCheck_CheckLineImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2,
|
||||
StaticLineTest checkLine;
|
||||
Vec3f sectorMin;
|
||||
Vec3f sectorMax;
|
||||
s32 k;
|
||||
s32 temp_lo;
|
||||
StaticLookup* lookup;
|
||||
s32 j;
|
||||
StaticLookup* jLookup;
|
||||
s32 temp_lo;
|
||||
s32 pad[2];
|
||||
|
||||
lookupTbl = colCtx->lookupTbl;
|
||||
posBTemp = *posB;
|
||||
@@ -2247,11 +2216,15 @@ s32 BgCheck_CheckLineImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2,
|
||||
sectorMax.z = colCtx->subdivLength.z + sectorMin.z;
|
||||
|
||||
for (i = subdivMin[2]; i < subdivMax[2] + 1; i++) {
|
||||
jLookup = iLookup + subdivMin[1] * colCtx->subdivAmount.x;
|
||||
StaticLookup* jLookup = iLookup + subdivMin[1] * colCtx->subdivAmount.x;
|
||||
s32 pad;
|
||||
|
||||
sectorMin.y = subdivMin[1] * colCtx->subdivLength.y + colCtx->minBounds.y;
|
||||
sectorMax.y = colCtx->subdivLength.y + sectorMin.y;
|
||||
|
||||
for (j = subdivMin[1]; j < subdivMax[1] + 1; j++) {
|
||||
s32 k;
|
||||
|
||||
lookup = jLookup + subdivMin[0];
|
||||
sectorMin.x = subdivMin[0] * colCtx->subdivLength.x + colCtx->minBounds.x;
|
||||
sectorMax.x = colCtx->subdivLength.x + sectorMin.x;
|
||||
@@ -2292,9 +2265,6 @@ s32 BgCheck_CheckLineImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2,
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/BgCheck_CheckLineImpl.s")
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Get bccFlags
|
||||
@@ -3373,8 +3343,6 @@ f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast) {
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/BgCheck_RaycastFloorDyna.s")
|
||||
#endif
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// regalloc, minor instruction ordering
|
||||
/**
|
||||
* Performs collision detection on a BgActor's wall polys on sphere `pos`, `radius`
|
||||
* returns true if a collision was detected
|
||||
@@ -3401,8 +3369,6 @@ s32 BgCheck_SphVsDynaWallInBgActor(CollisionContext* colCtx, u16 xpFlags, DynaCo
|
||||
f32 invNormalXZ;
|
||||
f32 planeDist;
|
||||
f32 temp_f18;
|
||||
f32 zIntersectDist;
|
||||
f32 xIntersectDist;
|
||||
f32 zMin;
|
||||
f32 zMax;
|
||||
f32 xMin;
|
||||
@@ -3472,6 +3438,8 @@ s32 BgCheck_SphVsDynaWallInBgActor(CollisionContext* colCtx, u16 xpFlags, DynaCo
|
||||
}
|
||||
}
|
||||
if (CollisionPoly_CheckZIntersectApprox(poly, dyna->vtxList, resultPos.x, pos->y, &intersect)) {
|
||||
s32 pad;
|
||||
|
||||
if (fabsf(intersect - resultPos.z) <= radius / temp_f18) {
|
||||
if ((intersect - resultPos.z) * nz <= 4.0f) {
|
||||
if (BgCheck_ComputeWallDisplacement(colCtx, poly, &resultPos.x, &resultPos.z, nx, ny, nz,
|
||||
@@ -3547,7 +3515,8 @@ s32 BgCheck_SphVsDynaWallInBgActor(CollisionContext* colCtx, u16 xpFlags, DynaCo
|
||||
}
|
||||
|
||||
if (CollisionPoly_CheckXIntersectApprox(poly, dyna->vtxList, pos->y, resultPos.z, &intersect)) {
|
||||
xIntersectDist = intersect - resultPos.x;
|
||||
f32 xIntersectDist = intersect - resultPos.x;
|
||||
|
||||
if (fabsf(xIntersectDist) <= radius / temp_f18) {
|
||||
if (xIntersectDist * nx <= 4.0f) {
|
||||
if (BgCheck_ComputeWallDisplacement(colCtx, poly, &resultPos.x, &resultPos.z, nx, ny, nz,
|
||||
@@ -3567,12 +3536,6 @@ s32 BgCheck_SphVsDynaWallInBgActor(CollisionContext* colCtx, u16 xpFlags, DynaCo
|
||||
*outZ = resultPos.z;
|
||||
return result;
|
||||
}
|
||||
#else
|
||||
s32 BgCheck_SphVsDynaWallInBgActor(CollisionContext* colCtx, u16 xpFlags, DynaCollisionContext* dyna, SSList* ssList,
|
||||
f32* outX, f32* outZ, CollisionPoly** outPoly, s32* outBgId, Vec3f* pos, f32 radius,
|
||||
s32 bgId, Actor* actor);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_bgcheck/BgCheck_SphVsDynaWallInBgActor.s")
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Performs collision detection on all dyna poly walls using sphere `pos`, `radius`
|
||||
@@ -4028,7 +3991,7 @@ void BgCheck_InitCollisionHeaders(CollisionContext* colCtx, GlobalContext* globa
|
||||
for (i = 0; i < BG_ACTOR_MAX; i++) {
|
||||
flag = dyna->bgActorFlags[i];
|
||||
if ((flag & 1) && !(flag & 2)) {
|
||||
Actor_SetObjectSegment(globalCtx, dyna->bgActors[i].actor);
|
||||
Actor_SetObjectDependency(globalCtx, dyna->bgActors[i].actor);
|
||||
CollisionHeader_SegmentedToVirtual(dyna->bgActors[i].colHeader);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -312,7 +312,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_SetMode.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DF840.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_ChangeMode.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800DF86C.s")
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
#include "global.h"
|
||||
|
||||
/**
|
||||
* Draws a display list to the opaque display buffer
|
||||
*/
|
||||
void Gfx_DrawDListOpa(GlobalContext* globalCtx, Gfx* dlist) {
|
||||
Gfx* dl;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
dl = POLY_OPA_DISP;
|
||||
|
||||
gSPDisplayList(&dl[0], &sSetupDL[6 * 0x19]);
|
||||
gSPMatrix(&dl[1], Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(&dl[2], dlist);
|
||||
|
||||
POLY_OPA_DISP = &dl[3];
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws a display list to the translucent display buffer
|
||||
*/
|
||||
void Gfx_DrawDListXlu(GlobalContext* globalCtx, Gfx* dlist) {
|
||||
Gfx* dl;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
dl = POLY_XLU_DISP;
|
||||
|
||||
gSPDisplayList(&dl[0], &sSetupDL[6 * 0x19]);
|
||||
gSPMatrix(&dl[1], Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(&dl[2], dlist);
|
||||
|
||||
POLY_XLU_DISP = &dl[3];
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
@@ -27,12 +27,12 @@ Vec3f D_801EE1C0;
|
||||
Vec3f D_801EE1D0;
|
||||
Vec3f D_801EE1E0;
|
||||
Vec3f D_801EE1F0;
|
||||
EffSparkParams D_801EE200;
|
||||
EffectSparkInit D_801EE200;
|
||||
TriNorm D_801EE6C8;
|
||||
TriNorm D_801EE700;
|
||||
EffSparkParams D_801EE738;
|
||||
EffSparkParams D_801EEC00;
|
||||
EffSparkParams D_801EF0C8;
|
||||
EffectSparkInit D_801EE738;
|
||||
EffectSparkInit D_801EEC00;
|
||||
EffectSparkInit D_801EF0C8;
|
||||
TriNorm D_801EF590;
|
||||
TriNorm D_801EF5C8;
|
||||
TriNorm D_801EF600;
|
||||
@@ -1382,14 +1382,14 @@ void CollisionCheck_NoBlood(GlobalContext* globalCtx, Collider* collider, Vec3f*
|
||||
#ifdef NON_MATCHING
|
||||
// needs in-function static bss
|
||||
void CollisionCheck_BlueBlood(GlobalContext* globalCtx, Collider* collider, Vec3f* v) {
|
||||
static EffSparkParams D_801EEC00;
|
||||
static EffectSparkInit D_801EEC00;
|
||||
s32 effectIndex;
|
||||
|
||||
D_801EEC00.position.x = v->x;
|
||||
D_801EEC00.position.x = v->y;
|
||||
D_801EEC00.position.x = v->z;
|
||||
D_801EEC00.particleFactor1 = 5;
|
||||
D_801EEC00.particleFactor2 = 5;
|
||||
D_801EEC00.uDiv = 5;
|
||||
D_801EEC00.vDiv = 5;
|
||||
D_801EEC00.colorStart[0].r = 10;
|
||||
D_801EEC00.colorStart[0].g = 10;
|
||||
D_801EEC00.colorStart[0].b = 200;
|
||||
@@ -1422,12 +1422,12 @@ void CollisionCheck_BlueBlood(GlobalContext* globalCtx, Collider* collider, Vec3
|
||||
D_801EEC00.colorEnd[3].g = 0;
|
||||
D_801EEC00.colorEnd[3].b = 64;
|
||||
D_801EEC00.colorEnd[3].a = 0;
|
||||
D_801EEC00.age = 0;
|
||||
D_801EEC00.timer = 0;
|
||||
D_801EEC00.duration = 16;
|
||||
D_801EEC00.velocity = 8.0f;
|
||||
D_801EEC00.speed = 8.0f;
|
||||
D_801EEC00.gravity = -1.0f;
|
||||
|
||||
Effect_Add(globalCtx, &effectIndex, 0, 0, 1, &D_801EEC00);
|
||||
Effect_Add(globalCtx, &effectIndex, EFFECT_SPARK, 0, 1, &D_801EEC00);
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_collision_check/CollisionCheck_BlueBlood.s")
|
||||
@@ -1440,14 +1440,14 @@ void CollisionCheck_BlueBlood(GlobalContext* globalCtx, Collider* collider, Vec3
|
||||
#ifdef NON_MATCHING
|
||||
// needs in-function static bss
|
||||
void CollisionCheck_GreenBlood(GlobalContext* globalCtx, Collider* collider, Vec3f* v) {
|
||||
static EffSparkParams D_801EF0C8;
|
||||
static EffectSparkInit D_801EF0C8;
|
||||
s32 effectIndex;
|
||||
|
||||
D_801EF0C8.position.x = v->x;
|
||||
D_801EF0C8.position.x = v->y;
|
||||
D_801EF0C8.position.x = v->z;
|
||||
D_801EF0C8.particleFactor1 = 5;
|
||||
D_801EF0C8.particleFactor2 = 5;
|
||||
D_801EF0C8.uDiv = 5;
|
||||
D_801EF0C8.vDiv = 5;
|
||||
D_801EF0C8.colorStart[0].r = 10;
|
||||
D_801EF0C8.colorStart[0].g = 200;
|
||||
D_801EF0C8.colorStart[0].b = 10;
|
||||
@@ -1480,11 +1480,11 @@ void CollisionCheck_GreenBlood(GlobalContext* globalCtx, Collider* collider, Vec
|
||||
D_801EF0C8.colorEnd[3].g = 64;
|
||||
D_801EF0C8.colorEnd[3].b = 0;
|
||||
D_801EF0C8.colorEnd[3].a = 0;
|
||||
D_801EF0C8.age = 0;
|
||||
D_801EF0C8.timer = 0;
|
||||
D_801EF0C8.duration = 16;
|
||||
D_801EF0C8.velocity = 8.0f;
|
||||
D_801EF0C8.speed = 8.0f;
|
||||
D_801EF0C8.gravity = -1.0f;
|
||||
Effect_Add(globalCtx, &effectIndex, 0, 0, 1, &D_801EF0C8);
|
||||
Effect_Add(globalCtx, &effectIndex, EFFECT_SPARK, 0, 1, &D_801EF0C8);
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_collision_check/CollisionCheck_GreenBlood.s")
|
||||
@@ -1525,7 +1525,7 @@ void CollisionCheck_HitSolid(GlobalContext* globalCtx, ColliderInfo* info, Colli
|
||||
if (collider->actor == NULL) {
|
||||
play_sound(NA_SE_IT_SHIELD_BOUND);
|
||||
} else {
|
||||
func_8019F1C0(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
|
||||
Audio_PlaySfxAtPos(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
|
||||
}
|
||||
} else if (flags == TOUCH_SFX_NORMAL) {
|
||||
EffectSsHitMark_SpawnFixedScale(globalCtx, 3, hitPos);
|
||||
@@ -1539,14 +1539,14 @@ void CollisionCheck_HitSolid(GlobalContext* globalCtx, ColliderInfo* info, Colli
|
||||
if (collider->actor == NULL) {
|
||||
play_sound(NA_SE_IT_SHIELD_BOUND);
|
||||
} else {
|
||||
func_8019F1C0(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
|
||||
Audio_PlaySfxAtPos(&collider->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
|
||||
}
|
||||
} else if (flags == TOUCH_SFX_WOOD) {
|
||||
EffectSsHitMark_SpawnFixedScale(globalCtx, 1, hitPos);
|
||||
if (collider->actor == NULL) {
|
||||
play_sound(NA_SE_IT_REFLECTION_WOOD);
|
||||
} else {
|
||||
func_8019F1C0(&collider->actor->projectedPos, NA_SE_IT_REFLECTION_WOOD);
|
||||
Audio_PlaySfxAtPos(&collider->actor->projectedPos, NA_SE_IT_REFLECTION_WOOD);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1557,13 +1557,13 @@ void CollisionCheck_HitSolid(GlobalContext* globalCtx, ColliderInfo* info, Colli
|
||||
s32 CollisionCheck_SwordHitAudio(Collider* at, ColliderInfo* acInfo) {
|
||||
if (at->actor != NULL && at->actor->category == ACTORCAT_PLAYER) {
|
||||
if (acInfo->elemType == ELEMTYPE_UNK0) {
|
||||
func_8019F1C0(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE);
|
||||
Audio_PlaySfxAtPos(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE);
|
||||
} else if (acInfo->elemType == ELEMTYPE_UNK1) {
|
||||
func_8019F1C0(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE_HARD);
|
||||
Audio_PlaySfxAtPos(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE_HARD);
|
||||
} else if (acInfo->elemType == ELEMTYPE_UNK2) {
|
||||
func_8019F1C0(&at->actor->projectedPos, 0);
|
||||
Audio_PlaySfxAtPos(&at->actor->projectedPos, 0);
|
||||
} else if (acInfo->elemType == ELEMTYPE_UNK3) {
|
||||
func_8019F1C0(&at->actor->projectedPos, 0);
|
||||
Audio_PlaySfxAtPos(&at->actor->projectedPos, 0);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
@@ -1618,7 +1618,7 @@ void CollisionCheck_HitEffects(GlobalContext* globalCtx, Collider* at, ColliderI
|
||||
if (ac->actor == NULL) {
|
||||
play_sound(NA_SE_IT_SHIELD_BOUND);
|
||||
} else {
|
||||
func_8019F1C0(&ac->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
|
||||
Audio_PlaySfxAtPos(&ac->actor->projectedPos, NA_SE_IT_SHIELD_BOUND);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3751,14 +3751,14 @@ void Collider_UpdateSphere(s32 limb, ColliderSphere* collider) {
|
||||
#ifdef NON_MATCHING
|
||||
// needs in-function static bss
|
||||
void CollisionCheck_SpawnRedBlood(GlobalContext* globalCtx, Vec3f* v) {
|
||||
static EffSparkParams D_801EE200;
|
||||
static EffectSparkInit D_801EE200;
|
||||
s32 effectIndex;
|
||||
|
||||
D_801EE200.position.x = v->x;
|
||||
D_801EE200.position.x = v->y;
|
||||
D_801EE200.position.x = v->z;
|
||||
D_801EE200.particleFactor1 = 5;
|
||||
D_801EE200.particleFactor2 = 5;
|
||||
D_801EE200.uDiv = 5;
|
||||
D_801EE200.vDiv = 5;
|
||||
D_801EE200.colorStart[0].r = 128;
|
||||
D_801EE200.colorStart[0].g = 0;
|
||||
D_801EE200.colorStart[0].b = 64;
|
||||
@@ -3791,12 +3791,12 @@ void CollisionCheck_SpawnRedBlood(GlobalContext* globalCtx, Vec3f* v) {
|
||||
D_801EE200.colorEnd[3].g = 0;
|
||||
D_801EE200.colorEnd[3].b = 64;
|
||||
D_801EE200.colorEnd[3].a = 0;
|
||||
D_801EE200.age = 0;
|
||||
D_801EE200.timer = 0;
|
||||
D_801EE200.duration = 16;
|
||||
D_801EE200.velocity = 8.0f;
|
||||
D_801EE200.speed = 8.0f;
|
||||
D_801EE200.gravity = -1.0f;
|
||||
|
||||
Effect_Add(globalCtx, &effectIndex, 0, 0, 1, &D_801EE200);
|
||||
Effect_Add(globalCtx, &effectIndex, EFFECT_SPARK, 0, 1, &D_801EE200);
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_collision_check/CollisionCheck_SpawnRedBlood.s")
|
||||
@@ -3809,14 +3809,14 @@ void CollisionCheck_SpawnRedBlood(GlobalContext* globalCtx, Vec3f* v) {
|
||||
#ifdef NON_MATCHING
|
||||
// needs in-function static bss
|
||||
void CollisionCheck_SpawnWaterDroplets(GlobalContext* globalCtx, Vec3f* v) {
|
||||
static EffSparkParams D_801EE738;
|
||||
static EffectSparkInit D_801EE738;
|
||||
s32 effectIndex;
|
||||
|
||||
D_801EE738.position.x = v->x;
|
||||
D_801EE738.position.x = v->y;
|
||||
D_801EE738.position.x = v->z;
|
||||
D_801EE738.particleFactor1 = 5;
|
||||
D_801EE738.particleFactor2 = 5;
|
||||
D_801EE738.uDiv = 5;
|
||||
D_801EE738.vDiv = 5;
|
||||
D_801EE738.colorStart[0].r = 255;
|
||||
D_801EE738.colorStart[0].g = 255;
|
||||
D_801EE738.colorStart[0].b = 255;
|
||||
@@ -3849,12 +3849,12 @@ void CollisionCheck_SpawnWaterDroplets(GlobalContext* globalCtx, Vec3f* v) {
|
||||
D_801EE738.colorEnd[3].g = 0;
|
||||
D_801EE738.colorEnd[3].b = 0;
|
||||
D_801EE738.colorEnd[3].a = 0;
|
||||
D_801EE738.age = 0;
|
||||
D_801EE738.timer = 0;
|
||||
D_801EE738.duration = 16;
|
||||
D_801EE738.velocity = 8.0f;
|
||||
D_801EE738.speed = 8.0f;
|
||||
D_801EE738.gravity = -1.0f;
|
||||
|
||||
Effect_Add(globalCtx, &effectIndex, 0, 0, 1, &D_801EE738);
|
||||
Effect_Add(globalCtx, &effectIndex, EFFECT_SPARK, 0, 1, &D_801EE738);
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_collision_check/CollisionCheck_SpawnWaterDroplets.s")
|
||||
@@ -3864,7 +3864,7 @@ void CollisionCheck_SpawnWaterDroplets(GlobalContext* globalCtx, Vec3f* v) {
|
||||
* Spawns streaks of light from hits against solid objects
|
||||
*/
|
||||
void CollisionCheck_SpawnShieldParticles(GlobalContext* globalCtx, Vec3f* v) {
|
||||
static EffShieldParticleInit shieldParticleInitMetal = {
|
||||
static EffectShieldParticleInit shieldParticleInitMetal = {
|
||||
16,
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 200, 255, 255 },
|
||||
@@ -3889,7 +3889,7 @@ void CollisionCheck_SpawnShieldParticles(GlobalContext* globalCtx, Vec3f* v) {
|
||||
shieldParticleInitMetal.lightPoint.y = shieldParticleInitMetal.position.y;
|
||||
shieldParticleInitMetal.lightPoint.z = shieldParticleInitMetal.position.z;
|
||||
|
||||
Effect_Add(globalCtx, &effectIndex, 3, 0, 1, &shieldParticleInitMetal);
|
||||
Effect_Add(globalCtx, &effectIndex, EFFECT_SHIELD_PARTICLE, 0, 1, &shieldParticleInitMetal);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3905,7 +3905,7 @@ void CollisionCheck_SpawnShieldParticlesMetal(GlobalContext* globalCtx, Vec3f* v
|
||||
*/
|
||||
void CollisionCheck_SpawnShieldParticlesMetalSound(GlobalContext* globalCtx, Vec3f* v, Vec3f* pos) {
|
||||
CollisionCheck_SpawnShieldParticles(globalCtx, v);
|
||||
func_8019F1C0(pos, NA_SE_IT_SHIELD_REFLECT_SW);
|
||||
Audio_PlaySfxAtPos(pos, NA_SE_IT_SHIELD_REFLECT_SW);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3919,7 +3919,7 @@ void CollisionCheck_SpawnShieldParticlesMetal2(GlobalContext* globalCtx, Vec3f*
|
||||
* Spawns streaks of light and makes a wooden sound
|
||||
*/
|
||||
void CollisionCheck_SpawnShieldParticlesWood(GlobalContext* globalCtx, Vec3f* v, Vec3f* pos) {
|
||||
static EffShieldParticleInit shieldParticleInitWood = {
|
||||
static EffectShieldParticleInit shieldParticleInitWood = {
|
||||
16,
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 200, 255, 255 },
|
||||
@@ -3944,8 +3944,8 @@ void CollisionCheck_SpawnShieldParticlesWood(GlobalContext* globalCtx, Vec3f* v,
|
||||
shieldParticleInitWood.lightPoint.y = shieldParticleInitWood.position.y;
|
||||
shieldParticleInitWood.lightPoint.z = shieldParticleInitWood.position.z;
|
||||
|
||||
Effect_Add(globalCtx, &effectIndex, 3, 0, 1, &shieldParticleInitWood);
|
||||
func_8019F1C0(pos, NA_SE_IT_REFLECTION_WOOD);
|
||||
Effect_Add(globalCtx, &effectIndex, EFFECT_SHIELD_PARTICLE, 0, 1, &shieldParticleInitWood);
|
||||
Audio_PlaySfxAtPos(pos, NA_SE_IT_REFLECTION_WOOD);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-1
@@ -1,11 +1,12 @@
|
||||
#include "global.h"
|
||||
#include "system_malloc.h"
|
||||
|
||||
GameInfo* gGameInfo;
|
||||
|
||||
void GameInfo_Init(void) {
|
||||
s32 i;
|
||||
|
||||
gGameInfo = (GameInfo*)SystemArena_Malloc(sizeof(GameInfo));
|
||||
gGameInfo = SystemArena_Malloc(sizeof(GameInfo));
|
||||
if (1) {}
|
||||
gGameInfo->unk_00 = 0;
|
||||
gGameInfo->unk_01 = 0;
|
||||
|
||||
@@ -116,7 +116,7 @@ void func_800E992C(GlobalContext* globalCtx, s32 arg1) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C560(globalCtx->state.gfxCtx);
|
||||
gSPMatrix(POLY_XLU_DISP++, &D_801D1DE0, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, func_800E99B0(globalCtx->state.gfxCtx, arg1));
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
+975
-36
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,207 @@
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_shield_particle/EffectShieldParticle_Init.s")
|
||||
#include "assets/code/eff_shield_particle/eff_shield_particle.c"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_shield_particle/EffectShieldParticle_Destroy.s")
|
||||
void EffectShieldParticle_Init(void* thisx, void* initParamsx) {
|
||||
EffectShieldParticle* this = (EffectShieldParticle*)thisx;
|
||||
EffectShieldParticleInit* initParams = (EffectShieldParticleInit*)initParamsx;
|
||||
EffectShieldParticleElement* elem;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_shield_particle/EffectShieldParticle_Update.s")
|
||||
if ((this != NULL) && (initParams != NULL)) {
|
||||
this->numElements = initParams->numElements;
|
||||
if (this->numElements > ARRAY_COUNT(this->elements)) {
|
||||
return;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_shield_particle/EffectShieldParticle_CalculateColors.s")
|
||||
this->position = initParams->position;
|
||||
this->primColorStart = initParams->primColorStart;
|
||||
this->envColorStart = initParams->envColorStart;
|
||||
this->primColorMid = initParams->primColorMid;
|
||||
this->envColorMid = initParams->envColorMid;
|
||||
this->primColorEnd = initParams->primColorEnd;
|
||||
this->envColorEnd = initParams->envColorEnd;
|
||||
this->deceleration = initParams->deceleration;
|
||||
this->maxInitialSpeed = initParams->maxInitialSpeed;
|
||||
this->lengthCutoff = initParams->lengthCutoff;
|
||||
this->duration = initParams->duration;
|
||||
this->timer = 0;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_shield_particle/EffectShieldParticle_Draw.s")
|
||||
for (elem = &this->elements[0]; elem < &this->elements[this->numElements]; elem++) {
|
||||
elem->initialSpeed = (Rand_ZeroOne() * (this->maxInitialSpeed * 0.5f)) + (this->maxInitialSpeed * 0.5f);
|
||||
elem->endX = 0.0f;
|
||||
elem->startXChange = 0.0f;
|
||||
elem->startX = 0.0f;
|
||||
elem->endXChange = elem->initialSpeed;
|
||||
elem->yaw = Rand_ZeroOne() * 65534.0f;
|
||||
elem->pitch = Rand_ZeroOne() * 65534.0f;
|
||||
}
|
||||
|
||||
this->lightDecay = initParams->lightDecay;
|
||||
if (this->lightDecay == true) {
|
||||
this->lightInfo.type = LIGHT_POINT_NOGLOW;
|
||||
this->lightInfo.params.point = initParams->lightPoint;
|
||||
this->lightNode =
|
||||
LightContext_InsertLight(Effect_GetGlobalCtx(), &Effect_GetGlobalCtx()->lightCtx, &this->lightInfo);
|
||||
} else {
|
||||
this->lightNode = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EffectShieldParticle_Destroy(void* thisx) {
|
||||
EffectShieldParticle* this = (EffectShieldParticle*)thisx;
|
||||
|
||||
if ((this != NULL) && (this->lightDecay == true)) {
|
||||
if (this->lightNode == Effect_GetGlobalCtx()->lightCtx.listHead) {
|
||||
Effect_GetGlobalCtx()->lightCtx.listHead = this->lightNode->next;
|
||||
}
|
||||
LightContext_RemoveLight(Effect_GetGlobalCtx(), &Effect_GetGlobalCtx()->lightCtx, this->lightNode);
|
||||
}
|
||||
}
|
||||
|
||||
s32 EffectShieldParticle_Update(void* thisx) {
|
||||
EffectShieldParticle* this = (EffectShieldParticle*)thisx;
|
||||
EffectShieldParticleElement* elem;
|
||||
|
||||
if (this == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (elem = &this->elements[0]; elem < &this->elements[this->numElements]; elem++) {
|
||||
elem->endXChange -= this->deceleration;
|
||||
if (elem->endXChange < 0.0f) {
|
||||
elem->endXChange = 0.0f;
|
||||
}
|
||||
|
||||
if (elem->startXChange > 0.0f) {
|
||||
elem->startXChange -= this->deceleration;
|
||||
if (elem->startXChange < 0.0f) {
|
||||
elem->startXChange = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
elem->endX += elem->endXChange;
|
||||
elem->startX += elem->startXChange;
|
||||
|
||||
if ((elem->startXChange == 0.0f) && (this->lengthCutoff < (elem->endX - elem->startX))) {
|
||||
elem->startXChange = elem->initialSpeed;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->lightDecay == true) {
|
||||
this->lightInfo.params.point.radius /= 2;
|
||||
}
|
||||
|
||||
this->timer++;
|
||||
|
||||
if (this->duration < this->timer) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void EffectShieldParticle_GetColors(EffectShieldParticle* this, Color_RGBA8* primColor, Color_RGBA8* envColor) {
|
||||
s32 halfDuration = this->duration * 0.5f;
|
||||
|
||||
if (halfDuration == 0) {
|
||||
primColor->r = this->primColorStart.r;
|
||||
primColor->g = this->primColorStart.g;
|
||||
primColor->b = this->primColorStart.b;
|
||||
primColor->a = this->primColorStart.a;
|
||||
envColor->r = this->envColorStart.r;
|
||||
envColor->g = this->envColorStart.g;
|
||||
envColor->b = this->envColorStart.b;
|
||||
envColor->a = this->envColorStart.a;
|
||||
} else if (this->timer < halfDuration) {
|
||||
f32 ratio = this->timer / (f32)halfDuration;
|
||||
|
||||
primColor->r = LERPIMP(this->primColorStart.r, this->primColorMid.r, ratio);
|
||||
primColor->g = LERPIMP(this->primColorStart.g, this->primColorMid.g, ratio);
|
||||
primColor->b = LERPIMP(this->primColorStart.b, this->primColorMid.b, ratio);
|
||||
primColor->a = LERPIMP(this->primColorStart.a, this->primColorMid.a, ratio);
|
||||
envColor->r = LERPIMP(this->envColorStart.r, this->envColorMid.r, ratio);
|
||||
envColor->g = LERPIMP(this->envColorStart.g, this->envColorMid.g, ratio);
|
||||
envColor->b = LERPIMP(this->envColorStart.b, this->envColorMid.b, ratio);
|
||||
envColor->a = LERPIMP(this->envColorStart.a, this->envColorMid.a, ratio);
|
||||
} else {
|
||||
f32 ratio = (this->timer - halfDuration) / (f32)halfDuration;
|
||||
|
||||
primColor->r = LERPIMP(this->primColorMid.r, this->primColorEnd.r, ratio);
|
||||
primColor->g = LERPIMP(this->primColorMid.g, this->primColorEnd.g, ratio);
|
||||
primColor->b = LERPIMP(this->primColorMid.b, this->primColorEnd.b, ratio);
|
||||
primColor->a = LERPIMP(this->primColorMid.a, this->primColorEnd.a, ratio);
|
||||
envColor->r = LERPIMP(this->envColorMid.r, this->envColorEnd.r, ratio);
|
||||
envColor->g = LERPIMP(this->envColorMid.g, this->envColorEnd.g, ratio);
|
||||
envColor->b = LERPIMP(this->envColorMid.b, this->envColorEnd.b, ratio);
|
||||
envColor->a = LERPIMP(this->envColorMid.a, this->envColorEnd.a, ratio);
|
||||
}
|
||||
}
|
||||
|
||||
void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx) {
|
||||
EffectShieldParticle* this = (EffectShieldParticle*)thisx;
|
||||
EffectShieldParticleElement* elem;
|
||||
Color_RGBA8 primColor;
|
||||
Color_RGBA8 envColor;
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
if (this != NULL) {
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26);
|
||||
|
||||
gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gSPTexture(POLY_XLU_DISP++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
|
||||
gDPLoadTextureBlock(POLY_XLU_DISP++, D_04054F20, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
gDPSetCombineLERP(POLY_XLU_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, 0, 0,
|
||||
0, COMBINED, 0, 0, 0, COMBINED);
|
||||
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_ZB_CLD_SURF2);
|
||||
gSPClearGeometryMode(POLY_XLU_DISP++, G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR);
|
||||
gSPSetGeometryMode(POLY_XLU_DISP++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH);
|
||||
|
||||
EffectShieldParticle_GetColors(this, &primColor, &envColor);
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, primColor.r, primColor.g, primColor.b, primColor.a);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, envColor.r, envColor.g, envColor.b, envColor.a);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
|
||||
for (elem = &this->elements[0]; elem < &this->elements[this->numElements]; elem++) {
|
||||
Mtx* mtx;
|
||||
MtxF sp104;
|
||||
MtxF spC4;
|
||||
MtxF sp84;
|
||||
f32 temp1 = (elem->endX + elem->startX) * 0.5f;
|
||||
f32 temp2 = elem->endX - elem->startX;
|
||||
f32 temp3 = (temp2 * (1.0f / 64.0f)) / 0.02f;
|
||||
|
||||
if (temp3 < 1.0f) {
|
||||
temp3 = 1.0f;
|
||||
}
|
||||
|
||||
SkinMatrix_SetTranslate(&spC4, this->position.x, this->position.y, this->position.z);
|
||||
SkinMatrix_SetRotateRPY(&sp104, 0, elem->yaw, 0);
|
||||
SkinMatrix_MtxFMtxFMult(&spC4, &sp104, &sp84);
|
||||
SkinMatrix_SetRotateRPY(&sp104, 0, 0, elem->pitch);
|
||||
SkinMatrix_MtxFMtxFMult(&sp84, &sp104, &spC4);
|
||||
SkinMatrix_SetTranslate(&sp104, temp1, 0.0f, 0.0f);
|
||||
SkinMatrix_MtxFMtxFMult(&spC4, &sp104, &sp84);
|
||||
SkinMatrix_SetScale(&sp104, temp3 * 0.02f, 0.02f, 0.02f);
|
||||
SkinMatrix_MtxFMtxFMult(&sp84, &sp104, &spC4);
|
||||
|
||||
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &spC4);
|
||||
if (mtx == NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPVertex(POLY_XLU_DISP++, sEffShieldParticleVtx, 4, 0);
|
||||
gSP2Triangles(POLY_XLU_DISP++, 0, 1, 2, 0, 0, 3, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
+260
-4
@@ -1,9 +1,265 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_spark/EffectSpark_Init.s")
|
||||
void EffectSpark_Init(void* thisx, void* initParamsx) {
|
||||
EffectSpark* this = (EffectSpark*)thisx;
|
||||
EffectSparkInit* initParams = (EffectSparkInit*)initParamsx;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_spark/EffectSpark_Destroy.s")
|
||||
f32 velocityNorm;
|
||||
s32 i;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_spark/EffectSpark_Update.s")
|
||||
if ((this != NULL) && (initParams != NULL)) {
|
||||
if ((initParams->uDiv == 0) || (initParams->vDiv == 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_spark/EffectSpark_Draw.s")
|
||||
this->position = initParams->position;
|
||||
this->speed = initParams->speed;
|
||||
this->gravity = initParams->gravity;
|
||||
this->uDiv = initParams->uDiv;
|
||||
this->vDiv = initParams->vDiv;
|
||||
this->colorStart[0].r = initParams->colorStart[0].r;
|
||||
this->colorStart[0].g = initParams->colorStart[0].g;
|
||||
this->colorStart[0].b = initParams->colorStart[0].b;
|
||||
this->colorStart[0].a = initParams->colorStart[0].a;
|
||||
this->colorStart[1].r = initParams->colorStart[1].r;
|
||||
this->colorStart[1].g = initParams->colorStart[1].g;
|
||||
this->colorStart[1].b = initParams->colorStart[1].b;
|
||||
this->colorStart[1].a = initParams->colorStart[1].a;
|
||||
this->colorStart[2].r = initParams->colorStart[2].r;
|
||||
this->colorStart[2].g = initParams->colorStart[2].g;
|
||||
this->colorStart[2].b = initParams->colorStart[2].b;
|
||||
this->colorStart[2].a = initParams->colorStart[2].a;
|
||||
this->colorStart[3].r = initParams->colorStart[3].r;
|
||||
this->colorStart[3].g = initParams->colorStart[3].g;
|
||||
this->colorStart[3].b = initParams->colorStart[3].b;
|
||||
this->colorStart[3].a = initParams->colorStart[3].a;
|
||||
this->colorEnd[0].r = initParams->colorEnd[0].r;
|
||||
this->colorEnd[0].g = initParams->colorEnd[0].g;
|
||||
this->colorEnd[0].b = initParams->colorEnd[0].b;
|
||||
this->colorEnd[0].a = initParams->colorEnd[0].a;
|
||||
this->colorEnd[1].r = initParams->colorEnd[1].r;
|
||||
this->colorEnd[1].g = initParams->colorEnd[1].g;
|
||||
this->colorEnd[1].b = initParams->colorEnd[1].b;
|
||||
this->colorEnd[1].a = initParams->colorEnd[1].a;
|
||||
this->colorEnd[2].r = initParams->colorEnd[2].r;
|
||||
this->colorEnd[2].g = initParams->colorEnd[2].g;
|
||||
this->colorEnd[2].b = initParams->colorEnd[2].b;
|
||||
this->colorEnd[2].a = initParams->colorEnd[2].a;
|
||||
this->colorEnd[3].r = initParams->colorEnd[3].r;
|
||||
this->colorEnd[3].g = initParams->colorEnd[3].g;
|
||||
this->colorEnd[3].b = initParams->colorEnd[3].b;
|
||||
this->colorEnd[3].a = initParams->colorEnd[3].a;
|
||||
this->duration = initParams->duration;
|
||||
|
||||
this->numElements = (this->uDiv * this->vDiv) + 2;
|
||||
if (this->numElements > ARRAY_COUNT(this->elements)) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < this->numElements; i++) {
|
||||
EffectSparkElement* elem = &this->elements[i];
|
||||
|
||||
elem->position.x = this->position.x;
|
||||
elem->position.y = this->position.y;
|
||||
elem->position.z = this->position.z;
|
||||
elem->velocity.x = Rand_ZeroOne() - 0.5f;
|
||||
elem->velocity.y = Rand_ZeroOne() - 0.5f;
|
||||
elem->velocity.z = Rand_ZeroOne() - 0.5f;
|
||||
|
||||
velocityNorm = sqrtf(SQXYZ(elem->velocity));
|
||||
|
||||
if (!(fabsf(velocityNorm) < 0.008f)) {
|
||||
elem->velocity.x *= this->speed * (1.0f / velocityNorm);
|
||||
elem->velocity.y *= this->speed * (1.0f / velocityNorm);
|
||||
elem->velocity.z *= this->speed * (1.0f / velocityNorm);
|
||||
} else {
|
||||
elem->velocity.x = elem->velocity.z = 0.0f;
|
||||
elem->velocity.y = this->speed;
|
||||
}
|
||||
|
||||
elem->unkVelocity.x = 30000.0f - Rand_ZeroOne() * 15000.0f;
|
||||
elem->unkVelocity.y = 30000.0f - Rand_ZeroOne() * 15000.0f;
|
||||
elem->unkVelocity.z = 30000.0f - Rand_ZeroOne() * 15000.0f;
|
||||
elem->unkPosition.x = Rand_ZeroOne() * 65534.0f;
|
||||
elem->unkPosition.y = Rand_ZeroOne() * 65534.0f;
|
||||
elem->unkPosition.z = Rand_ZeroOne() * 65534.0f;
|
||||
}
|
||||
|
||||
this->timer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void EffectSpark_Destroy(void* thisx) {
|
||||
}
|
||||
|
||||
s32 EffectSpark_Update(void* thisx) {
|
||||
EffectSpark* this = (EffectSpark*)thisx;
|
||||
EffectSparkElement* elem;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < this->numElements; i++) {
|
||||
elem = &this->elements[i];
|
||||
|
||||
elem->position.x += elem->velocity.x;
|
||||
elem->position.y += elem->velocity.y;
|
||||
elem->position.z += elem->velocity.z;
|
||||
elem->velocity.y += this->gravity;
|
||||
elem->unkPosition.x += elem->unkVelocity.x;
|
||||
elem->unkPosition.y += elem->unkVelocity.y;
|
||||
elem->unkPosition.z += elem->unkVelocity.z;
|
||||
}
|
||||
|
||||
this->timer++;
|
||||
|
||||
if (this->duration < this->timer) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) {
|
||||
Vtx* vertices;
|
||||
EffectSpark* this = (EffectSpark*)thisx;
|
||||
GlobalContext* globalCtx = Effect_GetGlobalCtx();
|
||||
s32 i;
|
||||
s32 j;
|
||||
u8 sp1D3;
|
||||
u8 sp1D2;
|
||||
u8 sp1D1;
|
||||
u8 sp1D0;
|
||||
u8 sp1CF;
|
||||
u8 sp1CE;
|
||||
u8 sp1CD;
|
||||
u8 sp1CC;
|
||||
u8 sp1CB;
|
||||
u8 sp1CA;
|
||||
u8 sp1C9;
|
||||
u8 sp1C8;
|
||||
u8 sp1C7;
|
||||
u8 sp1C6;
|
||||
u8 sp1C5;
|
||||
u8 sp1C4;
|
||||
f32 ratio;
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
if (this != NULL) {
|
||||
gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26);
|
||||
gDPSetCycleType(POLY_XLU_DISP++, G_CYC_2CYCLE);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
|
||||
gSPTexture(POLY_XLU_DISP++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gDPLoadTextureBlock(POLY_XLU_DISP++, D_04054F20, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
gDPSetCombineMode(POLY_XLU_DISP++, G_CC_SHADEDECALA, G_CC_PASS2);
|
||||
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_ZB_CLD_SURF2);
|
||||
gSPClearGeometryMode(POLY_XLU_DISP++, G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR);
|
||||
gSPSetGeometryMode(POLY_XLU_DISP++, G_ZBUFFER | G_SHADE | G_SHADING_SMOOTH);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
|
||||
vertices = GRAPH_ALLOC(gfxCtx, ALIGN16(this->numElements * sizeof(Vtx[4])));
|
||||
if (vertices == NULL) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
j = 0;
|
||||
|
||||
ratio = (f32)this->timer / (f32)this->duration;
|
||||
sp1D3 = F32_LERPIMP(this->colorStart[0].r, this->colorEnd[0].r, ratio);
|
||||
sp1D2 = F32_LERPIMP(this->colorStart[0].g, this->colorEnd[0].g, ratio);
|
||||
sp1D1 = F32_LERPIMP(this->colorStart[0].b, this->colorEnd[0].b, ratio);
|
||||
sp1D0 = F32_LERPIMP(this->colorStart[0].a, this->colorEnd[0].a, ratio);
|
||||
sp1CF = F32_LERPIMP(this->colorStart[1].r, this->colorEnd[1].r, ratio);
|
||||
sp1CE = F32_LERPIMP(this->colorStart[1].g, this->colorEnd[1].g, ratio);
|
||||
sp1CD = F32_LERPIMP(this->colorStart[1].b, this->colorEnd[1].b, ratio);
|
||||
sp1CC = F32_LERPIMP(this->colorStart[1].a, this->colorEnd[1].a, ratio);
|
||||
sp1CB = F32_LERPIMP(this->colorStart[2].r, this->colorEnd[2].r, ratio);
|
||||
sp1CA = F32_LERPIMP(this->colorStart[2].g, this->colorEnd[2].g, ratio);
|
||||
sp1C9 = F32_LERPIMP(this->colorStart[2].b, this->colorEnd[2].b, ratio);
|
||||
sp1C8 = F32_LERPIMP(this->colorStart[2].a, this->colorEnd[2].a, ratio);
|
||||
sp1C7 = F32_LERPIMP(this->colorStart[3].r, this->colorEnd[3].r, ratio);
|
||||
sp1C6 = F32_LERPIMP(this->colorStart[3].g, this->colorEnd[3].g, ratio);
|
||||
sp1C5 = F32_LERPIMP(this->colorStart[3].b, this->colorEnd[3].b, ratio);
|
||||
sp1C4 = F32_LERPIMP(this->colorStart[3].a, this->colorEnd[3].a, ratio);
|
||||
|
||||
for (i = 0; i < this->numElements; i++) {
|
||||
MtxF sp12C;
|
||||
MtxF spEC;
|
||||
MtxF spAC;
|
||||
MtxF sp6C;
|
||||
EffectSparkElement* elem = &this->elements[i];
|
||||
Mtx* mtx;
|
||||
f32 temp;
|
||||
|
||||
SkinMatrix_SetTranslate(&spEC, elem->position.x, elem->position.y, elem->position.z);
|
||||
temp = ((Rand_ZeroOne() * 2.5f) + 1.5f) / 64.0f;
|
||||
SkinMatrix_SetScale(&spAC, temp, temp, 1.0f);
|
||||
SkinMatrix_MtxFMtxFMult(&spEC, &globalCtx->billboardMtxF, &sp6C);
|
||||
SkinMatrix_MtxFMtxFMult(&sp6C, &spAC, &sp12C);
|
||||
|
||||
vertices[j].v.ob[0] = -32;
|
||||
vertices[j].v.ob[1] = -32;
|
||||
vertices[j].v.ob[2] = 0;
|
||||
vertices[j].v.cn[0] = sp1D3;
|
||||
vertices[j].v.cn[1] = sp1D2;
|
||||
vertices[j].v.cn[2] = sp1D1;
|
||||
vertices[j].v.cn[3] = sp1D0;
|
||||
vertices[j].v.tc[0] = 0;
|
||||
vertices[j].v.tc[1] = 1024;
|
||||
vertices[j].v.flag = 0;
|
||||
|
||||
vertices[j + 1].v.ob[0] = 32;
|
||||
vertices[j + 1].v.ob[1] = 32;
|
||||
vertices[j + 1].v.ob[2] = 0;
|
||||
vertices[j + 1].v.cn[0] = sp1CF;
|
||||
vertices[j + 1].v.cn[1] = sp1CE;
|
||||
vertices[j + 1].v.cn[2] = sp1CD;
|
||||
vertices[j + 1].v.cn[3] = sp1CC;
|
||||
vertices[j + 1].v.tc[0] = 1024;
|
||||
vertices[j + 1].v.tc[1] = 0;
|
||||
vertices[j + 1].v.flag = 0;
|
||||
|
||||
vertices[j + 2].v.ob[0] = -32;
|
||||
vertices[j + 2].v.ob[1] = 32;
|
||||
vertices[j + 2].v.ob[2] = 0;
|
||||
vertices[j + 2].v.cn[0] = sp1CB;
|
||||
vertices[j + 2].v.cn[1] = sp1CA;
|
||||
vertices[j + 2].v.cn[2] = sp1C9;
|
||||
vertices[j + 2].v.cn[3] = sp1C8;
|
||||
vertices[j + 2].v.tc[0] = 0;
|
||||
vertices[j + 2].v.tc[1] = 0;
|
||||
vertices[j + 2].v.flag = 0;
|
||||
|
||||
vertices[j + 3].v.ob[0] = 32;
|
||||
vertices[j + 3].v.ob[1] = -32;
|
||||
vertices[j + 3].v.ob[2] = 0;
|
||||
vertices[j + 3].v.cn[0] = sp1C7;
|
||||
vertices[j + 3].v.cn[1] = sp1C6;
|
||||
vertices[j + 3].v.cn[2] = sp1C5;
|
||||
vertices[j + 3].v.cn[3] = sp1C4;
|
||||
vertices[j + 3].v.tc[0] = 1024;
|
||||
vertices[j + 3].v.tc[1] = 1024;
|
||||
vertices[j + 3].v.flag = 0;
|
||||
|
||||
j += 4;
|
||||
|
||||
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &sp12C);
|
||||
if (mtx == NULL) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPVertex(POLY_XLU_DISP++, &vertices[4 * i], 4, 0);
|
||||
gSP2Triangles(POLY_XLU_DISP++, 2, 0, 3, 0, 2, 3, 1, 0);
|
||||
}
|
||||
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
}
|
||||
|
||||
end:
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
+104
-6
@@ -1,13 +1,111 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_ss_dead/func_800AE2A0.s")
|
||||
void func_800AE2A0(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
||||
f32 cos;
|
||||
Gfx* displayListHead;
|
||||
f32 absCos;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_ss_dead/func_800AE434.s")
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_ss_dead/func_800AE5A0.s")
|
||||
displayListHead = POLY_OPA_DISP;
|
||||
cos = Math_CosS((0x8000 / arg3) * arg2);
|
||||
absCos = fabsf(cos);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_ss_dead/func_800AE5E4.s")
|
||||
gDPPipeSync(displayListHead++);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_ss_dead/func_800AE778.s")
|
||||
if (color == NULL) {
|
||||
gDPSetFogColor(displayListHead++, 255, 0, 0, 0);
|
||||
} else {
|
||||
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_ss_dead/func_800AE8EC.s")
|
||||
gSPFogPosition(displayListHead++, 0, (s16)(absCos * 3000.0f) + 1500);
|
||||
|
||||
POLY_OPA_DISP = displayListHead;
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
void func_800AE434(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
||||
Gfx* displayListHead;
|
||||
f32 cos;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
cos = Math_CosS((0x4000 / arg3) * arg2);
|
||||
displayListHead = POLY_OPA_DISP;
|
||||
|
||||
gDPPipeSync(displayListHead++);
|
||||
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
|
||||
gSPFogPosition(displayListHead++, 0, (s16)(2800.0f * fabsf(cos)) + 1700);
|
||||
|
||||
POLY_OPA_DISP = displayListHead;
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
void func_800AE5A0(GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
POLY_OPA_DISP = func_801660B8(globalCtx, POLY_OPA_DISP);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
void func_800AE5E4(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
||||
f32 cos;
|
||||
Gfx* displayListHead;
|
||||
f32 absCos;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
displayListHead = POLY_XLU_DISP;
|
||||
cos = Math_CosS((0x8000 / arg3) * arg2);
|
||||
absCos = fabsf(cos);
|
||||
|
||||
gDPPipeSync(displayListHead++);
|
||||
|
||||
if (color == NULL) {
|
||||
gDPSetFogColor(displayListHead++, 255, 0, 0, 0);
|
||||
} else {
|
||||
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
|
||||
}
|
||||
|
||||
gSPFogPosition(displayListHead++, 0, (s16)(absCos * 3000.0f) + 1500);
|
||||
|
||||
POLY_XLU_DISP = displayListHead;
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
void func_800AE778(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
||||
f32 cos;
|
||||
Gfx* displayListHead;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
displayListHead = POLY_XLU_DISP;
|
||||
cos = Math_CosS((0x4000 / arg3) * arg2);
|
||||
|
||||
gDPPipeSync(displayListHead++);
|
||||
gDPSetFogColor(displayListHead++, color->r, color->g, color->b, color->a);
|
||||
gSPFogPosition(displayListHead++, 0, (s16)(2800.0f * fabsf(cos)) + 1700);
|
||||
|
||||
POLY_XLU_DISP = displayListHead;
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
void func_800AE8EC(GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
POLY_XLU_DISP = func_801660B8(globalCtx, POLY_XLU_DISP);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
+278
-8
@@ -1,17 +1,287 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_tire_mark/func_800AE930.s")
|
||||
void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f32 arg3, s16 arg4,
|
||||
CollisionPoly* colPoly, s32 arg6) {
|
||||
Vec3s spB8;
|
||||
Vec3s spB0;
|
||||
EffectTireMarkElement* spAC;
|
||||
EffectTireMarkElement* spA8;
|
||||
u32 spA4;
|
||||
u32 spA0;
|
||||
Vec3s* vtxList = colCtx->colHeader->vtxList;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_tire_mark/func_800AEF44.s")
|
||||
if ((arg6 != 50) || (this->numElements >= (ARRAY_COUNT(this->elements) - 1)) || (colPoly == NULL)) {
|
||||
func_800AEF44(this);
|
||||
return;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_tire_mark/EffectTireMark_InitParticle.s")
|
||||
spB8.x = (Math_SinS(arg4 - 0x4000) * arg3) + pos->x;
|
||||
spB8.z = (Math_CosS(arg4 - 0x4000) * arg3) + pos->z;
|
||||
spB8.y = func_800BFD84(colPoly, spB8.x, spB8.z) + 2.0f;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_tire_mark/EffectTireMark_Init.s")
|
||||
spB0.x = (Math_SinS(arg4 + 0x4000) * arg3) + pos->x;
|
||||
spB0.z = (Math_CosS(arg4 + 0x4000) * arg3) + pos->z;
|
||||
spB0.y = func_800BFD84(colPoly, spB0.x, spB0.z) + 2.0f;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_tire_mark/EffectTireMark_Destroy.s")
|
||||
spAC = &this->elements[this->numElements - 1];
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_tire_mark/EffectTireMark_Update.s")
|
||||
if ((this->numElements != 0) && (spAC->colPoly != NULL) && (colPoly != spAC->colPoly) &&
|
||||
(func_800BFDEC(spAC->colPoly, colPoly, &spA4, &spA0) == 2)) {
|
||||
Vec3f sp90;
|
||||
Vec3f sp84;
|
||||
Vec3f sp78;
|
||||
Vec3f sp6C;
|
||||
Vec3f sp60;
|
||||
Vec3f sp54;
|
||||
Vec3f sp48;
|
||||
Vec3f sp3C;
|
||||
Vec3f sp30;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_tire_mark/EffectTireMark_InitVertices.s")
|
||||
sp84.x = vtxList[spA4].x;
|
||||
sp84.y = vtxList[spA4].y;
|
||||
sp84.z = vtxList[spA4].z;
|
||||
sp90.x = vtxList[spA0].x;
|
||||
sp90.y = vtxList[spA0].y;
|
||||
sp90.z = vtxList[spA0].z;
|
||||
sp54.x = spAC->p1.x;
|
||||
sp54.y = spAC->p1.y;
|
||||
sp54.z = spAC->p1.z;
|
||||
sp60.x = spB0.x;
|
||||
sp60.y = spB0.y;
|
||||
sp60.z = spB0.z;
|
||||
sp3C.x = spAC->p2.x;
|
||||
sp3C.y = spAC->p2.y;
|
||||
sp3C.z = spAC->p2.z;
|
||||
sp48.x = spB8.x;
|
||||
sp48.y = spB8.y;
|
||||
sp48.z = spB8.z;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eff_tire_mark/EffectTireMark_Draw.s")
|
||||
if ((func_80179798(&sp84, &sp90, &sp54, &sp60, &sp6C, &sp30) != 0) &&
|
||||
(func_80179798(&sp84, &sp90, &sp3C, &sp48, &sp78, &sp30) != 0)) {
|
||||
if (!(spAC->flags & 2)) {
|
||||
spAC->flags |= 1;
|
||||
}
|
||||
|
||||
spA8 = &this->elements[this->numElements];
|
||||
spA8->flags = 0;
|
||||
spA8->p1.x = sp6C.x;
|
||||
spA8->p1.y = sp6C.y;
|
||||
spA8->p1.z = sp6C.z;
|
||||
spA8->p2.x = sp78.x;
|
||||
spA8->p2.y = sp78.y;
|
||||
spA8->p2.z = sp78.z;
|
||||
spA8->life = this->elemDuration;
|
||||
spA8->colPoly = NULL;
|
||||
this->numElements++;
|
||||
|
||||
spAC = &this->elements[this->numElements - 1];
|
||||
if (!(spAC->flags & 2)) {
|
||||
spAC->flags |= 1;
|
||||
}
|
||||
|
||||
if (spA8) {} // Necessary to match
|
||||
|
||||
spA8 = &this->elements[this->numElements];
|
||||
spA8->flags = 0;
|
||||
spA8->p1 = spB0;
|
||||
spA8->p2 = spB8;
|
||||
spA8->life = this->elemDuration;
|
||||
spA8->colPoly = colPoly;
|
||||
this->numElements++;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(spAC->flags & 2)) {
|
||||
spAC->flags |= 1;
|
||||
}
|
||||
|
||||
spA8 = &this->elements[this->numElements];
|
||||
spA8->flags = 0;
|
||||
spA8->p1 = spB0;
|
||||
spA8->p2 = spB8;
|
||||
spA8->life = this->elemDuration;
|
||||
spA8->colPoly = colPoly;
|
||||
|
||||
this->numElements++;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(spAC->flags & 2)) {
|
||||
spAC->flags |= 1;
|
||||
}
|
||||
|
||||
spA8 = &this->elements[this->numElements];
|
||||
spA8->flags = 0;
|
||||
spA8->p1 = spB0;
|
||||
spA8->p2 = spB8;
|
||||
spA8->life = this->elemDuration;
|
||||
spA8->colPoly = colPoly;
|
||||
|
||||
this->numElements++;
|
||||
}
|
||||
|
||||
void func_800AEF44(EffectTireMark* this) {
|
||||
EffectTireMarkElement* elem = &this->elements[this->numElements - 1];
|
||||
|
||||
elem->flags |= 2;
|
||||
}
|
||||
|
||||
void EffectTireMark_InitElement(EffectTireMarkElement* elem) {
|
||||
elem->flags = 0;
|
||||
elem->life = 0;
|
||||
elem->colPoly = NULL;
|
||||
elem->p1.x = elem->p1.y = elem->p1.z = elem->p2.x = elem->p2.y = elem->p2.z = 0;
|
||||
}
|
||||
|
||||
void EffectTireMark_Init(void* thisx, void* initParamsx) {
|
||||
EffectTireMark* this = (EffectTireMark*)thisx;
|
||||
EffectTireMarkInit* initParams = (EffectTireMarkInit*)initParamsx;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->elements); i++) {
|
||||
EffectTireMark_InitElement(&this->elements[i]);
|
||||
}
|
||||
|
||||
this->unk600 = initParams->unk0;
|
||||
this->numElements = 0;
|
||||
|
||||
if (initParams->elemDuration > 62) {
|
||||
this->elemDuration = 62;
|
||||
} else {
|
||||
this->elemDuration = initParams->elemDuration;
|
||||
}
|
||||
|
||||
this->color = initParams->color;
|
||||
}
|
||||
|
||||
void EffectTireMark_Destroy(void* thisx) {
|
||||
}
|
||||
|
||||
s32 EffectTireMark_Update(void* thisx) {
|
||||
EffectTireMark* this = (EffectTireMark*)thisx;
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
if (this->numElements == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < this->numElements; i++) {
|
||||
this->elements[i].life--;
|
||||
}
|
||||
|
||||
if (this->elements[0].life <= 0) {
|
||||
for (j = 0; j < ARRAY_COUNT(this->elements) - 1; j++) {
|
||||
this->elements[j] = this->elements[j + 1];
|
||||
}
|
||||
|
||||
EffectTireMark_InitElement(&this->elements[j]);
|
||||
|
||||
this->numElements--;
|
||||
if (this->numElements < 0) {
|
||||
this->numElements = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void EffectTireMark_SetVertices(Vtx* vtx, EffectTireMarkElement* elem, s32 i, s32 alpha) {
|
||||
s32 i1 = i * 2;
|
||||
s32 i2 = i * 2 + 1;
|
||||
|
||||
vtx[i1].v.ob[0] = elem->p1.x;
|
||||
vtx[i1].v.ob[1] = elem->p1.y;
|
||||
vtx[i1].v.ob[2] = elem->p1.z;
|
||||
vtx[i1].v.tc[0] = 2048;
|
||||
vtx[i1].v.tc[1] = 0;
|
||||
vtx[i1].v.cn[0] = 255;
|
||||
vtx[i1].v.cn[1] = 255;
|
||||
vtx[i1].v.cn[2] = 255;
|
||||
vtx[i1].v.cn[3] = alpha;
|
||||
|
||||
vtx[i2].v.ob[0] = elem->p2.x;
|
||||
vtx[i2].v.ob[1] = elem->p2.y;
|
||||
vtx[i2].v.ob[2] = elem->p2.z;
|
||||
vtx[i2].v.tc[0] = 2048;
|
||||
vtx[i2].v.tc[1] = 1024;
|
||||
vtx[i2].v.cn[0] = 255;
|
||||
vtx[i2].v.cn[1] = 255;
|
||||
vtx[i2].v.cn[2] = 255;
|
||||
vtx[i2].v.cn[3] = alpha;
|
||||
}
|
||||
|
||||
void EffectTireMark_Draw(void* thisx, GraphicsContext* gfxCtx) {
|
||||
EffectTireMark* this = (EffectTireMark*)thisx;
|
||||
EffectTireMarkElement* elem;
|
||||
Vtx* vtx;
|
||||
s32 pad;
|
||||
f32 sp34;
|
||||
s32 i;
|
||||
|
||||
sp34 = 1.0f / this->elemDuration;
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
if (this->numElements >= 2) {
|
||||
vtx = GRAPH_ALLOC(gfxCtx, ALIGN16(this->numElements * sizeof(Vtx[2])));
|
||||
|
||||
if (vtx != NULL) {
|
||||
gSPMatrix(POLY_OPA_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP++, 0x2C);
|
||||
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_PASS, G_RM_ZB_CLD_SURF2);
|
||||
|
||||
gDPLoadTextureBlock(POLY_OPA_DISP++, D_04014570, G_IM_FMT_I, G_IM_SIZ_8b, 64, 32, 0,
|
||||
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
gDPSetCombineLERP(POLY_OPA_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0,
|
||||
COMBINED);
|
||||
gSPSetGeometryMode(POLY_OPA_DISP++, G_SHADE | G_SHADING_SMOOTH);
|
||||
gSPClearGeometryMode(POLY_OPA_DISP++, G_CULL_BACK | G_LIGHTING);
|
||||
|
||||
EffectTireMark_SetVertices(vtx, &this->elements[0], 0, 255);
|
||||
|
||||
vtx[0].v.tc[0] = 0;
|
||||
vtx[0].v.tc[1] = 0;
|
||||
vtx[1].v.tc[0] = 0;
|
||||
vtx[1].v.tc[1] = 1024;
|
||||
|
||||
for (i = 1; i < this->numElements; i++) {
|
||||
elem = &this->elements[i];
|
||||
|
||||
EffectTireMark_SetVertices(vtx, elem, i, 255);
|
||||
|
||||
if ((elem - 1)->flags & 1) {
|
||||
if (!(elem->flags & 1)) {
|
||||
vtx[i * 2 + 0].v.tc[0] = 0;
|
||||
vtx[i * 2 + 0].v.tc[1] = 0;
|
||||
vtx[i * 2 + 1].v.tc[0] = 0;
|
||||
vtx[i * 2 + 1].v.tc[1] = 1024;
|
||||
dummy_label:;
|
||||
} else if ((i >= 2) && !((elem - 2)->flags & 1)) {
|
||||
vtx[i * 2 - 2].v.tc[0] = 0;
|
||||
vtx[i * 2 - 2].v.tc[1] = 0;
|
||||
vtx[i * 2 - 1].v.tc[0] = 0;
|
||||
vtx[i * 2 - 1].v.tc[1] = 1024;
|
||||
}
|
||||
|
||||
if (i == (this->numElements - 1)) {
|
||||
vtx[i * 2 + 0].v.tc[0] = 0;
|
||||
vtx[i * 2 + 0].v.tc[1] = 0;
|
||||
vtx[i * 2 + 1].v.tc[0] = 0;
|
||||
vtx[i * 2 + 1].v.tc[1] = 1024;
|
||||
}
|
||||
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->color.r, this->color.g, this->color.b,
|
||||
(s32)((f32)this->color.a * (f32)elem->life * sp34));
|
||||
gSPVertex(POLY_OPA_DISP++, &vtx[i * 2 - 2], 4, 0);
|
||||
gSP2Triangles(POLY_OPA_DISP++, 0, 1, 3, 0, 0, 3, 2, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
+116
-116
@@ -1,55 +1,57 @@
|
||||
#include "global.h"
|
||||
|
||||
EffInfo sEffInfoTable[] = {
|
||||
EffectContext sEffectContext;
|
||||
|
||||
EffectInfo sEffectInfoTable[] = {
|
||||
{
|
||||
sizeof(EffSparkParams),
|
||||
(eff_init_func)EffectSpark_Init,
|
||||
(eff_destroy_func)EffectSpark_Destroy,
|
||||
(eff_update_func)EffectSpark_Update,
|
||||
(eff_draw_func)EffectSpark_Draw,
|
||||
sizeof(EffectSpark),
|
||||
EffectSpark_Init,
|
||||
EffectSpark_Destroy,
|
||||
EffectSpark_Update,
|
||||
EffectSpark_Draw,
|
||||
},
|
||||
{
|
||||
sizeof(EffectBlure),
|
||||
(eff_init_func)EffectBlure_Init1,
|
||||
(eff_destroy_func)EffectBlure_Destroy,
|
||||
(eff_update_func)EffectBlure_Update,
|
||||
(eff_draw_func)EffectBlure_Draw,
|
||||
EffectBlure_Init1,
|
||||
EffectBlure_Destroy,
|
||||
EffectBlure_Update,
|
||||
EffectBlure_Draw,
|
||||
},
|
||||
{
|
||||
sizeof(EffectBlure),
|
||||
(eff_init_func)EffectBlure_Init2,
|
||||
(eff_destroy_func)EffectBlure_Destroy,
|
||||
(eff_update_func)EffectBlure_Update,
|
||||
(eff_draw_func)EffectBlure_Draw,
|
||||
EffectBlure_Init2,
|
||||
EffectBlure_Destroy,
|
||||
EffectBlure_Update,
|
||||
EffectBlure_Draw,
|
||||
},
|
||||
{
|
||||
sizeof(EffShieldParticleParams),
|
||||
(eff_init_func)EffectShieldParticle_Init,
|
||||
(eff_destroy_func)EffectShieldParticle_Destroy,
|
||||
(eff_update_func)EffectShieldParticle_Update,
|
||||
(eff_draw_func)EffectShieldParticle_Draw,
|
||||
sizeof(EffectShieldParticle),
|
||||
EffectShieldParticle_Init,
|
||||
EffectShieldParticle_Destroy,
|
||||
EffectShieldParticle_Update,
|
||||
EffectShieldParticle_Draw,
|
||||
},
|
||||
{
|
||||
sizeof(EffTireMarkParams),
|
||||
(eff_init_func)EffectTireMark_Init,
|
||||
(eff_destroy_func)EffectTireMark_Destroy,
|
||||
(eff_update_func)EffectTireMark_Update,
|
||||
(eff_draw_func)EffectTireMark_Draw,
|
||||
sizeof(EffectTireMark),
|
||||
EffectTireMark_Init,
|
||||
EffectTireMark_Destroy,
|
||||
EffectTireMark_Update,
|
||||
EffectTireMark_Draw,
|
||||
},
|
||||
};
|
||||
|
||||
GlobalContext* Effect_GetContext(void) {
|
||||
return sEffTable.globalCtx;
|
||||
GlobalContext* Effect_GetGlobalCtx(void) {
|
||||
return sEffectContext.globalCtx;
|
||||
}
|
||||
|
||||
void* Effect_GetParams(s32 index) {
|
||||
void* Effect_GetByIndex(s32 index) {
|
||||
if (index == TOTAL_EFFECT_COUNT) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (index < SPARK_COUNT) {
|
||||
if (sEffTable.sparks[index].base.active == 1) {
|
||||
return &sEffTable.sparks[index].params;
|
||||
if (sEffectContext.sparks[index].status.active == true) {
|
||||
return &sEffectContext.sparks[index].effect;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
@@ -57,8 +59,8 @@ void* Effect_GetParams(s32 index) {
|
||||
|
||||
index -= SPARK_COUNT;
|
||||
if (index < BLURE_COUNT) {
|
||||
if (sEffTable.blures[index].base.active == 1) {
|
||||
return &sEffTable.blures[index].params;
|
||||
if (sEffectContext.blures[index].status.active == true) {
|
||||
return &sEffectContext.blures[index].effect;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
@@ -66,8 +68,8 @@ void* Effect_GetParams(s32 index) {
|
||||
|
||||
index -= BLURE_COUNT;
|
||||
if (index < SHIELD_PARTICLE_COUNT) {
|
||||
if (sEffTable.shieldParticles[index].base.active == 1) {
|
||||
return &sEffTable.shieldParticles[index].params;
|
||||
if (sEffectContext.shieldParticles[index].status.active == true) {
|
||||
return &sEffectContext.shieldParticles[index].effect;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
@@ -75,8 +77,8 @@ void* Effect_GetParams(s32 index) {
|
||||
|
||||
index -= SHIELD_PARTICLE_COUNT;
|
||||
if (index < TIRE_MARK_COUNT) {
|
||||
if (sEffTable.tireMarks[index].base.active == 1) {
|
||||
return &sEffTable.tireMarks[index].params;
|
||||
if (sEffectContext.tireMarks[index].status.active == true) {
|
||||
return &sEffectContext.tireMarks[index].effect;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
@@ -85,89 +87,87 @@ void* Effect_GetParams(s32 index) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Effect_InitCommon(EffCommon* common) {
|
||||
common->active = 0;
|
||||
common->unk1 = 0;
|
||||
common->unk2 = 0;
|
||||
void Effect_InitStatus(EffectStatus* status) {
|
||||
status->active = false;
|
||||
status->unk1 = 0;
|
||||
status->unk2 = 0;
|
||||
}
|
||||
|
||||
void Effect_Init(GlobalContext* globalCtx) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < SPARK_COUNT; i++) {
|
||||
Effect_InitCommon(&sEffTable.sparks[i].base);
|
||||
Effect_InitStatus(&sEffectContext.sparks[i].status);
|
||||
}
|
||||
|
||||
for (i = 0; i < BLURE_COUNT; i++) {
|
||||
Effect_InitCommon(&sEffTable.blures[i].base);
|
||||
Effect_InitStatus(&sEffectContext.blures[i].status);
|
||||
}
|
||||
|
||||
//! @bug This is probably supposed to loop over shieldParticles, not blures again
|
||||
for (i = 0; i < SHIELD_PARTICLE_COUNT; i++) {
|
||||
Effect_InitCommon(&sEffTable.blures[i].base);
|
||||
//! @bug This is probably supposed to initialize shieldParticles, not blures again
|
||||
Effect_InitStatus(&sEffectContext.blures[i].status);
|
||||
}
|
||||
|
||||
for (i = 0; i < TIRE_MARK_COUNT; i++) {
|
||||
Effect_InitCommon(&sEffTable.tireMarks[i].base);
|
||||
Effect_InitStatus(&sEffectContext.tireMarks[i].status);
|
||||
}
|
||||
|
||||
sEffTable.globalCtx = globalCtx;
|
||||
sEffectContext.globalCtx = globalCtx;
|
||||
}
|
||||
|
||||
void Effect_Add(GlobalContext* globalCtx, s32* index, s32 type, u8 param_4, u8 param_5, void* initParams) {
|
||||
void Effect_Add(GlobalContext* globalCtx, s32* pIndex, s32 type, u8 arg3, u8 arg4, void* initParams) {
|
||||
u32 slotFound;
|
||||
s32 i;
|
||||
void* params;
|
||||
EffCommon* common;
|
||||
void* effect = NULL;
|
||||
EffectStatus* status = NULL;
|
||||
|
||||
params = NULL;
|
||||
*index = TOTAL_EFFECT_COUNT;
|
||||
common = NULL;
|
||||
*pIndex = TOTAL_EFFECT_COUNT;
|
||||
|
||||
if (FrameAdvance_IsEnabled(globalCtx) != true) {
|
||||
slotFound = 0;
|
||||
slotFound = false;
|
||||
switch (type) {
|
||||
case 0:
|
||||
case EFFECT_SPARK:
|
||||
for (i = 0; i < SPARK_COUNT; i++) {
|
||||
if (sEffTable.sparks[i].base.active == 0) {
|
||||
slotFound = 1;
|
||||
*index = i;
|
||||
params = &sEffTable.sparks[i].params;
|
||||
common = &sEffTable.sparks[i].base;
|
||||
if (sEffectContext.sparks[i].status.active == false) {
|
||||
slotFound = true;
|
||||
*pIndex = i;
|
||||
effect = &sEffectContext.sparks[i].effect;
|
||||
status = &sEffectContext.sparks[i].status;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
case EFFECT_BLURE1:
|
||||
case EFFECT_BLURE2:
|
||||
for (i = 0; i < BLURE_COUNT; i++) {
|
||||
if (sEffTable.blures[i].base.active == 0) {
|
||||
slotFound = 1;
|
||||
*index = i + 3;
|
||||
params = &sEffTable.blures[i].params;
|
||||
common = &sEffTable.blures[i].base;
|
||||
if (sEffectContext.blures[i].status.active == false) {
|
||||
slotFound = true;
|
||||
*pIndex = i + SPARK_COUNT;
|
||||
effect = &sEffectContext.blures[i].effect;
|
||||
status = &sEffectContext.blures[i].status;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
case EFFECT_SHIELD_PARTICLE:
|
||||
for (i = 0; i < SHIELD_PARTICLE_COUNT; i++) {
|
||||
if (sEffTable.shieldParticles[i].base.active == 0) {
|
||||
slotFound = 1;
|
||||
*index = i + 28;
|
||||
params = &sEffTable.shieldParticles[i].params;
|
||||
common = &sEffTable.shieldParticles[i].base;
|
||||
if (sEffectContext.shieldParticles[i].status.active == false) {
|
||||
slotFound = true;
|
||||
*pIndex = i + SPARK_COUNT + BLURE_COUNT;
|
||||
effect = &sEffectContext.shieldParticles[i].effect;
|
||||
status = &sEffectContext.shieldParticles[i].status;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
case EFFECT_TIRE_MARK:
|
||||
for (i = 0; i < TIRE_MARK_COUNT; i++) {
|
||||
if (sEffTable.tireMarks[i].base.active == 0) {
|
||||
slotFound = 1;
|
||||
*index = i + 31;
|
||||
params = &sEffTable.tireMarks[i].params;
|
||||
common = &sEffTable.tireMarks[i].base;
|
||||
if (sEffectContext.tireMarks[i].status.active == false) {
|
||||
slotFound = true;
|
||||
*pIndex = i + SPARK_COUNT + BLURE_COUNT + SHIELD_PARTICLE_COUNT;
|
||||
effect = &sEffectContext.tireMarks[i].effect;
|
||||
status = &sEffectContext.tireMarks[i].status;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -175,10 +175,10 @@ void Effect_Add(GlobalContext* globalCtx, s32* index, s32 type, u8 param_4, u8 p
|
||||
}
|
||||
|
||||
if (slotFound) {
|
||||
sEffInfoTable[type].init(params, initParams);
|
||||
common->unk2 = param_4;
|
||||
common->unk1 = param_5;
|
||||
common->active = 1;
|
||||
sEffectInfoTable[type].init(effect, initParams);
|
||||
status->unk2 = arg3;
|
||||
status->unk1 = arg4;
|
||||
status->active = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -188,8 +188,8 @@ void Effect_DrawAll(GraphicsContext* gfxCtx) {
|
||||
|
||||
for (i = 0; i < SPARK_COUNT; i++) {
|
||||
if (1) {} // necessary to match
|
||||
if (sEffTable.sparks[i].base.active) {
|
||||
sEffInfoTable[0].draw(&sEffTable.sparks[i].params, gfxCtx);
|
||||
if (sEffectContext.sparks[i].status.active) {
|
||||
sEffectInfoTable[EFFECT_SPARK].draw(&sEffectContext.sparks[i].effect, gfxCtx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,22 +197,22 @@ void Effect_DrawAll(GraphicsContext* gfxCtx) {
|
||||
if (1) {
|
||||
if (gfxCtx) {}
|
||||
} // necessary to match
|
||||
if (sEffTable.blures[i].base.active) {
|
||||
sEffInfoTable[1].draw(&sEffTable.blures[i].params, gfxCtx);
|
||||
if (sEffectContext.blures[i].status.active) {
|
||||
sEffectInfoTable[EFFECT_BLURE1].draw(&sEffectContext.blures[i].effect, gfxCtx);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < SHIELD_PARTICLE_COUNT; i++) {
|
||||
if (1) {} // necessary to match
|
||||
if (sEffTable.shieldParticles[i].base.active) {
|
||||
sEffInfoTable[3].draw(&sEffTable.shieldParticles[i].params, gfxCtx);
|
||||
if (sEffectContext.shieldParticles[i].status.active) {
|
||||
sEffectInfoTable[EFFECT_SHIELD_PARTICLE].draw(&sEffectContext.shieldParticles[i].effect, gfxCtx);
|
||||
}
|
||||
}
|
||||
|
||||
if (1) {} // necessary to match
|
||||
for (i = 0; i < TIRE_MARK_COUNT; i++) {
|
||||
if (sEffTable.tireMarks[i].base.active) {
|
||||
sEffInfoTable[4].draw(&sEffTable.tireMarks[i].params, gfxCtx);
|
||||
if (sEffectContext.tireMarks[i].status.active) {
|
||||
sEffectInfoTable[EFFECT_TIRE_MARK].draw(&sEffectContext.tireMarks[i].effect, gfxCtx);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -222,8 +222,8 @@ void Effect_UpdateAll(GlobalContext* globalCtx) {
|
||||
|
||||
for (i = 0; i < SPARK_COUNT; i++) {
|
||||
if (1) {} // necessary to match
|
||||
if (sEffTable.sparks[i].base.active) {
|
||||
if (sEffInfoTable[0].update(&sEffTable.sparks[i].params) == 1) {
|
||||
if (sEffectContext.sparks[i].status.active) {
|
||||
if (sEffectInfoTable[EFFECT_SPARK].update(&sEffectContext.sparks[i].effect) == 1) {
|
||||
Effect_Destroy(globalCtx, i);
|
||||
}
|
||||
}
|
||||
@@ -231,27 +231,27 @@ void Effect_UpdateAll(GlobalContext* globalCtx) {
|
||||
|
||||
for (i = 0; i < BLURE_COUNT; i++) {
|
||||
if (1) {} // necessary to match
|
||||
if (sEffTable.blures[i].base.active) {
|
||||
if (sEffInfoTable[1].update(&sEffTable.blures[i].params) == 1) {
|
||||
Effect_Destroy(globalCtx, i + 3);
|
||||
if (sEffectContext.blures[i].status.active) {
|
||||
if (sEffectInfoTable[EFFECT_BLURE1].update(&sEffectContext.blures[i].effect) == 1) {
|
||||
Effect_Destroy(globalCtx, i + SPARK_COUNT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < SHIELD_PARTICLE_COUNT; i++) {
|
||||
if (1) {} // necessary to match
|
||||
if (sEffTable.shieldParticles[i].base.active) {
|
||||
if (sEffInfoTable[3].update(&sEffTable.shieldParticles[i].params) == 1) {
|
||||
Effect_Destroy(globalCtx, i + 28);
|
||||
if (sEffectContext.shieldParticles[i].status.active) {
|
||||
if (sEffectInfoTable[EFFECT_SHIELD_PARTICLE].update(&sEffectContext.shieldParticles[i].effect) == 1) {
|
||||
Effect_Destroy(globalCtx, i + SPARK_COUNT + BLURE_COUNT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < TIRE_MARK_COUNT; i++) {
|
||||
if (1) {} // necessary to match
|
||||
if (sEffTable.tireMarks[i].base.active) {
|
||||
if (sEffInfoTable[4].update(&sEffTable.tireMarks[i].params) == 1) {
|
||||
Effect_Destroy(globalCtx, i + 31);
|
||||
if (sEffectContext.tireMarks[i].status.active) {
|
||||
if (sEffectInfoTable[EFFECT_TIRE_MARK].update(&sEffectContext.tireMarks[i].effect) == 1) {
|
||||
Effect_Destroy(globalCtx, i + SPARK_COUNT + BLURE_COUNT + SHIELD_PARTICLE_COUNT);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -263,29 +263,29 @@ void Effect_Destroy(GlobalContext* globalCtx, s32 index) {
|
||||
}
|
||||
|
||||
if (index < SPARK_COUNT) {
|
||||
sEffTable.sparks[index].base.active = 0;
|
||||
sEffInfoTable[0].destroy(&sEffTable.sparks[index].params);
|
||||
sEffectContext.sparks[index].status.active = false;
|
||||
sEffectInfoTable[EFFECT_SPARK].destroy(&sEffectContext.sparks[index].effect);
|
||||
return;
|
||||
}
|
||||
|
||||
index -= SPARK_COUNT;
|
||||
if (index < BLURE_COUNT) {
|
||||
sEffTable.blures[index].base.active = 0;
|
||||
sEffInfoTable[1].destroy(&sEffTable.blures[index].params);
|
||||
sEffectContext.blures[index].status.active = false;
|
||||
sEffectInfoTable[EFFECT_BLURE1].destroy(&sEffectContext.blures[index].effect);
|
||||
return;
|
||||
}
|
||||
|
||||
index -= BLURE_COUNT;
|
||||
if (index < SHIELD_PARTICLE_COUNT) {
|
||||
sEffTable.shieldParticles[index].base.active = 0;
|
||||
sEffInfoTable[3].destroy(&sEffTable.shieldParticles[index].params);
|
||||
sEffectContext.shieldParticles[index].status.active = false;
|
||||
sEffectInfoTable[EFFECT_SHIELD_PARTICLE].destroy(&sEffectContext.shieldParticles[index].effect);
|
||||
return;
|
||||
}
|
||||
|
||||
index -= SHIELD_PARTICLE_COUNT;
|
||||
if (index < TIRE_MARK_COUNT) {
|
||||
sEffTable.tireMarks[index].base.active = 0;
|
||||
sEffInfoTable[4].destroy(&sEffTable.tireMarks[index].params);
|
||||
sEffectContext.tireMarks[index].status.active = false;
|
||||
sEffectInfoTable[EFFECT_TIRE_MARK].destroy(&sEffectContext.tireMarks[index].effect);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -294,22 +294,22 @@ void Effect_DestroyAll(GlobalContext* globalCtx) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < SPARK_COUNT; i++) {
|
||||
sEffTable.sparks[i].base.active = 0;
|
||||
sEffInfoTable[0].destroy(&sEffTable.sparks[i].params);
|
||||
sEffectContext.sparks[i].status.active = false;
|
||||
sEffectInfoTable[EFFECT_SPARK].destroy(&sEffectContext.sparks[i].effect);
|
||||
}
|
||||
|
||||
for (i = 0; i < BLURE_COUNT; i++) {
|
||||
sEffTable.blures[i].base.active = 0;
|
||||
sEffInfoTable[1].destroy(&sEffTable.blures[i].params);
|
||||
sEffectContext.blures[i].status.active = false;
|
||||
sEffectInfoTable[EFFECT_BLURE1].destroy(&sEffectContext.blures[i].effect);
|
||||
}
|
||||
|
||||
for (i = 0; i < SHIELD_PARTICLE_COUNT; i++) {
|
||||
sEffTable.shieldParticles[i].base.active = 0;
|
||||
sEffInfoTable[3].destroy(&sEffTable.shieldParticles[i].params);
|
||||
sEffectContext.shieldParticles[i].status.active = false;
|
||||
sEffectInfoTable[EFFECT_SHIELD_PARTICLE].destroy(&sEffectContext.shieldParticles[i].effect);
|
||||
}
|
||||
|
||||
for (i = 0; i < TIRE_MARK_COUNT; i++) {
|
||||
sEffTable.tireMarks[i].base.active = 0;
|
||||
sEffInfoTable[4].destroy(&sEffTable.tireMarks[i].params);
|
||||
sEffectContext.tireMarks[i].status.active = false;
|
||||
sEffectInfoTable[EFFECT_TIRE_MARK].destroy(&sEffectContext.tireMarks[i].effect);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
#include "global.h"
|
||||
|
||||
EffectSsInfo sEffectSsInfo = { NULL, 0, 0 };
|
||||
|
||||
void EffectSS_Init(GlobalContext* globalCtx, s32 numEntries) {
|
||||
u32 i;
|
||||
EffectSs* effectsSs;
|
||||
EffectSsOverlay* overlay;
|
||||
|
||||
EffectSS2Info.data_table = (EffectSs*)THA_AllocEndAlign16(&globalCtx->state.heap, numEntries * sizeof(EffectSs));
|
||||
EffectSS2Info.searchIndex = 0;
|
||||
EffectSS2Info.size = numEntries;
|
||||
sEffectSsInfo.data_table = (EffectSs*)THA_AllocEndAlign16(&globalCtx->state.heap, numEntries * sizeof(EffectSs));
|
||||
sEffectSsInfo.searchIndex = 0;
|
||||
sEffectSsInfo.size = numEntries;
|
||||
|
||||
for (effectsSs = &EffectSS2Info.data_table[0]; effectsSs < &EffectSS2Info.data_table[EffectSS2Info.size];
|
||||
for (effectsSs = &sEffectSsInfo.data_table[0]; effectsSs < &sEffectSsInfo.data_table[sEffectSsInfo.size];
|
||||
effectsSs++) {
|
||||
EffectSS_ResetEntry(effectsSs);
|
||||
}
|
||||
|
||||
overlay = &particleOverlayTable[0];
|
||||
overlay = &gParticleOverlayTable[0];
|
||||
for (i = 0; i < EFFECT_SS_MAX; i++) {
|
||||
overlay->loadedRamAddr = NULL;
|
||||
overlay++;
|
||||
@@ -27,39 +29,40 @@ void EffectSS_Clear(GlobalContext* globalCtx) {
|
||||
EffectSsOverlay* overlay;
|
||||
void* addr;
|
||||
|
||||
EffectSS2Info.data_table = NULL;
|
||||
EffectSS2Info.searchIndex = 0;
|
||||
EffectSS2Info.size = 0;
|
||||
sEffectSsInfo.data_table = NULL;
|
||||
sEffectSsInfo.searchIndex = 0;
|
||||
sEffectSsInfo.size = 0;
|
||||
|
||||
// This code is completely useless, as data_table was just set to NULL and size to 0
|
||||
for (effectsSs = EffectSS2Info.data_table; effectsSs < EffectSS2Info.data_table + EffectSS2Info.size; effectsSs++) {
|
||||
//! @bug: Effects left in the table are not properly deleted, as data_table was just set to NULL and size to 0
|
||||
for (effectsSs = &sEffectSsInfo.data_table[0]; effectsSs < &sEffectSsInfo.data_table[sEffectSsInfo.size];
|
||||
effectsSs++) {
|
||||
EffectSS_Delete(effectsSs);
|
||||
}
|
||||
|
||||
// Free memory from loaded particle overlays
|
||||
overlay = &particleOverlayTable[0];
|
||||
overlay = &gParticleOverlayTable[0];
|
||||
for (i = 0; i < EFFECT_SS_MAX; i++) {
|
||||
addr = overlay->loadedRamAddr;
|
||||
if (addr != NULL) {
|
||||
ZeldaArena_Free(addr);
|
||||
}
|
||||
|
||||
overlay->loadedRamAddr = 0;
|
||||
overlay->loadedRamAddr = NULL;
|
||||
overlay++;
|
||||
}
|
||||
}
|
||||
|
||||
EffectSs* EffectSS_GetTable() {
|
||||
return EffectSS2Info.data_table;
|
||||
return sEffectSsInfo.data_table;
|
||||
}
|
||||
|
||||
void EffectSS_Delete(EffectSs* effectSs) {
|
||||
if (effectSs->flags & 2) {
|
||||
func_801A72CC(&effectSs->pos);
|
||||
Audio_StopSfxByPos(&effectSs->pos);
|
||||
}
|
||||
|
||||
if (effectSs->flags & 4) {
|
||||
func_801A72CC(&effectSs->vec);
|
||||
Audio_StopSfxByPos(&effectSs->vec);
|
||||
}
|
||||
|
||||
EffectSS_ResetEntry(effectSs);
|
||||
@@ -90,27 +93,27 @@ s32 EffectSS_FindFreeSpace(s32 priority, s32* tableEntry) {
|
||||
s32 foundFree;
|
||||
s32 i;
|
||||
|
||||
if (EffectSS2Info.searchIndex >= EffectSS2Info.size) {
|
||||
EffectSS2Info.searchIndex = 0;
|
||||
if (sEffectSsInfo.searchIndex >= sEffectSsInfo.size) {
|
||||
sEffectSsInfo.searchIndex = 0;
|
||||
}
|
||||
|
||||
// Search for a unused entry
|
||||
i = EffectSS2Info.searchIndex;
|
||||
i = sEffectSsInfo.searchIndex;
|
||||
foundFree = false;
|
||||
while (true) {
|
||||
if (EffectSS2Info.data_table[i].life == -1) {
|
||||
if (sEffectSsInfo.data_table[i].life == -1) {
|
||||
foundFree = true;
|
||||
break;
|
||||
}
|
||||
|
||||
i++;
|
||||
|
||||
if (i >= EffectSS2Info.size) {
|
||||
if (i >= sEffectSsInfo.size) {
|
||||
i = 0; // Loop around the whole table
|
||||
}
|
||||
|
||||
// After a full loop, break out
|
||||
if (i == EffectSS2Info.searchIndex) {
|
||||
if (i == sEffectSsInfo.searchIndex) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -122,22 +125,22 @@ s32 EffectSS_FindFreeSpace(s32 priority, s32* tableEntry) {
|
||||
|
||||
// If all slots are in use, search for a slot with a lower priority
|
||||
// Note that a lower priority is representend by a higher value
|
||||
i = EffectSS2Info.searchIndex;
|
||||
i = sEffectSsInfo.searchIndex;
|
||||
while (true) {
|
||||
// Equal priority should only be considered "lower" if flag 0 is set
|
||||
if ((priority <= EffectSS2Info.data_table[i].priority) &&
|
||||
!((priority == EffectSS2Info.data_table[i].priority) && (EffectSS2Info.data_table[i].flags & 1))) {
|
||||
if ((priority <= sEffectSsInfo.data_table[i].priority) &&
|
||||
!((priority == sEffectSsInfo.data_table[i].priority) && (sEffectSsInfo.data_table[i].flags & 1))) {
|
||||
break;
|
||||
}
|
||||
|
||||
i++;
|
||||
|
||||
if (i >= EffectSS2Info.size) {
|
||||
if (i >= sEffectSsInfo.size) {
|
||||
i = 0; // Loop around the whole table
|
||||
}
|
||||
|
||||
// After a full loop, return 1 to indicate that we failed to find a suitable slot
|
||||
if (i == EffectSS2Info.searchIndex) {
|
||||
if (i == sEffectSsInfo.searchIndex) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -151,8 +154,8 @@ void EffectSS_Copy(GlobalContext* globalCtx, EffectSs* effectsSs) {
|
||||
|
||||
if (FrameAdvance_IsEnabled(globalCtx) != true) {
|
||||
if (EffectSS_FindFreeSpace(effectsSs->priority, &index) == 0) {
|
||||
EffectSS2Info.searchIndex = index + 1;
|
||||
EffectSS2Info.data_table[index] = *effectsSs;
|
||||
sEffectSsInfo.searchIndex = index + 1;
|
||||
sEffectSsInfo.data_table[index] = *effectsSs;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -160,7 +163,7 @@ void EffectSS_Copy(GlobalContext* globalCtx, EffectSs* effectsSs) {
|
||||
void EffectSs_Spawn(GlobalContext* globalCtx, s32 type, s32 priority, void* initData) {
|
||||
s32 index;
|
||||
u32 overlaySize;
|
||||
EffectSsOverlay* entry = &particleOverlayTable[type];
|
||||
EffectSsOverlay* entry = &gParticleOverlayTable[type];
|
||||
EffectSsInit* initInfo;
|
||||
|
||||
if (EffectSS_FindFreeSpace(priority, &index) != 0) {
|
||||
@@ -168,8 +171,8 @@ void EffectSs_Spawn(GlobalContext* globalCtx, s32 type, s32 priority, void* init
|
||||
return;
|
||||
}
|
||||
|
||||
EffectSS2Info.searchIndex = index + 1;
|
||||
overlaySize = (u32)entry->vramEnd - (u32)entry->vramStart;
|
||||
sEffectSsInfo.searchIndex = index + 1;
|
||||
overlaySize = VRAM_PTR_SIZE(entry);
|
||||
|
||||
if (entry->vramStart == NULL) {
|
||||
initInfo = entry->initInfo;
|
||||
@@ -184,27 +187,25 @@ void EffectSs_Spawn(GlobalContext* globalCtx, s32 type, s32 priority, void* init
|
||||
Load2_LoadOverlay(entry->vromStart, entry->vromEnd, entry->vramStart, entry->vramEnd, entry->loadedRamAddr);
|
||||
}
|
||||
|
||||
initInfo = (void*)(u32)(
|
||||
entry->initInfo != NULL
|
||||
? (EffectSsInit*)(-((u32)entry->vramStart - (u32)entry->loadedRamAddr) + (u32)entry->initInfo)
|
||||
: NULL);
|
||||
initInfo = (uintptr_t)(
|
||||
(entry->initInfo != NULL) ? (void*)(-OVERLAY_RELOCATION_OFFSET(entry) + (uintptr_t)entry->initInfo) : NULL);
|
||||
}
|
||||
|
||||
if (initInfo->init != NULL) {
|
||||
// Delete the previous effect in the slot, in case the slot wasn't free
|
||||
EffectSS_Delete(&EffectSS2Info.data_table[index]);
|
||||
EffectSS_Delete(&sEffectSsInfo.data_table[index]);
|
||||
|
||||
EffectSS2Info.data_table[index].type = type;
|
||||
EffectSS2Info.data_table[index].priority = priority;
|
||||
sEffectSsInfo.data_table[index].type = type;
|
||||
sEffectSsInfo.data_table[index].priority = priority;
|
||||
|
||||
if (initInfo->init(globalCtx, index, &EffectSS2Info.data_table[index], initData) == 0) {
|
||||
EffectSS_ResetEntry(&EffectSS2Info.data_table[index]);
|
||||
if (initInfo->init(globalCtx, index, &sEffectSsInfo.data_table[index], initData) == 0) {
|
||||
EffectSS_ResetEntry(&sEffectSsInfo.data_table[index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EffectSS_UpdateParticle(GlobalContext* globalCtx, s32 index) {
|
||||
EffectSs* particle = &EffectSS2Info.data_table[index];
|
||||
EffectSs* particle = &sEffectSsInfo.data_table[index];
|
||||
|
||||
if (particle->update != NULL) {
|
||||
particle->velocity.x += particle->accel.x;
|
||||
@@ -222,23 +223,23 @@ void EffectSS_UpdateParticle(GlobalContext* globalCtx, s32 index) {
|
||||
void EffectSS_UpdateAllParticles(GlobalContext* globalCtx) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < EffectSS2Info.size; i++) {
|
||||
if (EffectSS2Info.data_table[i].life > -1) {
|
||||
EffectSS2Info.data_table[i].life--;
|
||||
for (i = 0; i < sEffectSsInfo.size; i++) {
|
||||
if (sEffectSsInfo.data_table[i].life > -1) {
|
||||
sEffectSsInfo.data_table[i].life--;
|
||||
|
||||
if (EffectSS2Info.data_table[i].life < 0) {
|
||||
EffectSS_Delete(&EffectSS2Info.data_table[i]);
|
||||
if (sEffectSsInfo.data_table[i].life < 0) {
|
||||
EffectSS_Delete(&sEffectSsInfo.data_table[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (EffectSS2Info.data_table[i].life > -1) {
|
||||
if (sEffectSsInfo.data_table[i].life > -1) {
|
||||
EffectSS_UpdateParticle(globalCtx, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EffectSS_DrawParticle(GlobalContext* globalCtx, s32 index) {
|
||||
EffectSs* entry = &EffectSS2Info.data_table[index];
|
||||
EffectSs* entry = &sEffectSsInfo.data_table[index];
|
||||
|
||||
if (entry->draw != NULL) {
|
||||
entry->draw(globalCtx, index, entry);
|
||||
@@ -252,12 +253,12 @@ void EffectSS_DrawAllParticles(GlobalContext* globalCtx) {
|
||||
Lights_BindAll(lights, globalCtx->lightCtx.listHead, NULL, globalCtx);
|
||||
Lights_Draw(lights, globalCtx->state.gfxCtx);
|
||||
|
||||
for (i = 0; i < EffectSS2Info.size; i++) {
|
||||
if (EffectSS2Info.data_table[i].life > -1) {
|
||||
if ((EffectSS2Info.data_table[i].pos.x > 32000.0f) || (EffectSS2Info.data_table[i].pos.x < -32000.0f) ||
|
||||
(EffectSS2Info.data_table[i].pos.y > 32000.0f) || (EffectSS2Info.data_table[i].pos.y < -32000.0f) ||
|
||||
(EffectSS2Info.data_table[i].pos.z > 32000.0f) || (EffectSS2Info.data_table[i].pos.z < -32000.0f)) {
|
||||
EffectSS_Delete(&EffectSS2Info.data_table[i]);
|
||||
for (i = 0; i < sEffectSsInfo.size; i++) {
|
||||
if (sEffectSsInfo.data_table[i].life > -1) {
|
||||
if ((sEffectSsInfo.data_table[i].pos.x > 32000.0f) || (sEffectSsInfo.data_table[i].pos.x < -32000.0f) ||
|
||||
(sEffectSsInfo.data_table[i].pos.y > 32000.0f) || (sEffectSsInfo.data_table[i].pos.y < -32000.0f) ||
|
||||
(sEffectSsInfo.data_table[i].pos.z > 32000.0f) || (sEffectSsInfo.data_table[i].pos.z < -32000.0f)) {
|
||||
EffectSS_Delete(&sEffectSsInfo.data_table[i]);
|
||||
} else {
|
||||
EffectSS_DrawParticle(globalCtx, i);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
#include "global.h"
|
||||
#include "initvars.h"
|
||||
|
||||
#define EFFECT_SS_OVERLAY(name) \
|
||||
{ \
|
||||
SEGMENT_ROM_START(ovl_##name), SEGMENT_ROM_END(ovl_##name), SEGMENT_START(ovl_##name), \
|
||||
SEGMENT_END(ovl_##name), NULL, &name##_InitVars, 1, \
|
||||
}
|
||||
|
||||
#define EFFECT_SS_OVERLAY_INTERNAL(name) \
|
||||
{ 0, 0, NULL, NULL, NULL, &name##_InitVars, 1 }
|
||||
|
||||
#define EFFECT_SS_OVERLAY_UNSET \
|
||||
{ 0 }
|
||||
|
||||
EffectSsOverlay gParticleOverlayTable[] = {
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Dust),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Kirakira),
|
||||
EFFECT_SS_OVERLAY_UNSET,
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Bomb2),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Blast),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_G_Spk),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_D_Fire),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Bubble),
|
||||
EFFECT_SS_OVERLAY_UNSET,
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_G_Ripple),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_G_Splash),
|
||||
EFFECT_SS_OVERLAY_UNSET,
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_G_Fire),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Lightning),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Dt_Bubble),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Hahen),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Stick),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Sibuki),
|
||||
EFFECT_SS_OVERLAY_UNSET,
|
||||
EFFECT_SS_OVERLAY_UNSET,
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Stone1),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Hitmark),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Fhg_Flash),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_K_Fire),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Solder_Srch_Ball),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Kakera),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Ice_Piece),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_En_Ice),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Fire_Tail),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_En_Fire),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Extra),
|
||||
EFFECT_SS_OVERLAY_UNSET,
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Dead_Db),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Dead_Dd),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Dead_Ds),
|
||||
EFFECT_SS_OVERLAY_UNSET,
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Ice_Smoke),
|
||||
EFFECT_SS_OVERLAY(Effect_En_Ice_Block),
|
||||
EFFECT_SS_OVERLAY(Effect_Ss_Sbn),
|
||||
};
|
||||
@@ -124,32 +124,32 @@ void func_800B1054(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f*
|
||||
EffectSsDust_Spawn(globalCtx, 1, pos, velocity, accel, primColor, envColor, scale, scaleStep, 10, 1);
|
||||
}
|
||||
|
||||
extern Color_RGBA8 D_801AE3B0;
|
||||
extern Color_RGBA8 D_801AE3B4;
|
||||
static Color_RGBA8 sDustBrownPrim = { 170, 130, 90, 255 };
|
||||
static Color_RGBA8 sDustBrownEnv = { 100, 60, 20, 255 };
|
||||
|
||||
void func_800B10C0(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
|
||||
EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &D_801AE3B0, &D_801AE3B4, 100, 5, 10, 0);
|
||||
EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, 100, 5, 10, 0);
|
||||
}
|
||||
|
||||
void func_800B1130(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
|
||||
EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &D_801AE3B0, &D_801AE3B4, 100, 5, 10, 0);
|
||||
EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, 100, 5, 10, 0);
|
||||
}
|
||||
|
||||
void func_800B11A0(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep) {
|
||||
EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &D_801AE3B0, &D_801AE3B4, scale, scaleStep, 10, 0);
|
||||
EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, scale, scaleStep, 10, 0);
|
||||
}
|
||||
|
||||
void func_800B1210(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep) {
|
||||
EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &D_801AE3B0, &D_801AE3B4, scale, scaleStep, 10, 0);
|
||||
EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, scale, scaleStep, 10, 0);
|
||||
}
|
||||
|
||||
void func_800B1280(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
|
||||
s16 life) {
|
||||
EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &D_801AE3B0, &D_801AE3B4, scale, scaleStep, life, 0);
|
||||
EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, scale, scaleStep, life, 0);
|
||||
}
|
||||
void func_800B12F0(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
|
||||
s16 life) {
|
||||
EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &D_801AE3B0, &D_801AE3B4, scale, scaleStep, life, 0);
|
||||
EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, scale, scaleStep, life, 0);
|
||||
}
|
||||
|
||||
void func_800B1360(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
|
||||
@@ -206,12 +206,9 @@ void func_800B1598(GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos) {
|
||||
}
|
||||
}
|
||||
|
||||
extern Color_RGBA8 D_801AE3B8;
|
||||
extern Color_RGBA8 D_801AE3BC;
|
||||
|
||||
void EffectSsKiraKira_SpawnSmallYellow(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
|
||||
Color_RGBA8 primColor = D_801AE3B8;
|
||||
Color_RGBA8 envColor = D_801AE3BC;
|
||||
Color_RGBA8 primColor = { 255, 255, 200, 255 };
|
||||
Color_RGBA8 envColor = { 255, 200, 0, 0 };
|
||||
|
||||
EffectSsKiraKira_SpawnDispersed(globalCtx, pos, velocity, accel, &primColor, &envColor, 1000, 16);
|
||||
}
|
||||
@@ -307,12 +304,12 @@ void EffectSsBlast_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity,
|
||||
EffectSs_Spawn(globalCtx, EFFECT_SS_BLAST, 128, &initParams);
|
||||
}
|
||||
|
||||
extern Color_RGBA8 D_801AE3C0;
|
||||
extern Color_RGBA8 D_801AE3C4;
|
||||
|
||||
void EffectSsBlast_SpawnWhiteCustomScale(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
|
||||
s16 scaleStep, s16 life) {
|
||||
EffectSsBlast_Spawn(globalCtx, pos, velocity, accel, &D_801AE3C0, &D_801AE3C4, scale, scaleStep, 35, life);
|
||||
static Color_RGBA8 primColor = { 255, 255, 255, 255 };
|
||||
static Color_RGBA8 envColor = { 200, 200, 200, 0 };
|
||||
|
||||
EffectSsBlast_Spawn(globalCtx, pos, velocity, accel, &primColor, &envColor, scale, scaleStep, 35, life);
|
||||
}
|
||||
|
||||
void EffectSsBlast_SpawnShockwave(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
|
||||
@@ -320,11 +317,11 @@ void EffectSsBlast_SpawnShockwave(GlobalContext* globalCtx, Vec3f* pos, Vec3f* v
|
||||
EffectSsBlast_Spawn(globalCtx, pos, velocity, accel, primColor, envColor, 100, 375, 35, life);
|
||||
}
|
||||
|
||||
extern Color_RGBA8 D_801AE3C8;
|
||||
extern Color_RGBA8 D_801AE3CC;
|
||||
|
||||
void EffectSsBlast_SpawnWhiteShockwave(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
|
||||
EffectSsBlast_SpawnShockwave(globalCtx, pos, velocity, accel, &D_801AE3C8, &D_801AE3CC, 10);
|
||||
static Color_RGBA8 primColor = { 255, 255, 255, 255 };
|
||||
static Color_RGBA8 envColor = { 200, 200, 200, 0 };
|
||||
|
||||
EffectSsBlast_SpawnShockwave(globalCtx, pos, velocity, accel, &primColor, &envColor, 10);
|
||||
}
|
||||
|
||||
// EffectSsGSpk Spawn Functions
|
||||
@@ -364,24 +361,18 @@ void EffectSsGSpk_SpawnNoAccel(GlobalContext* globalCtx, Actor* actor, Vec3f* po
|
||||
EffectSs_Spawn(globalCtx, EFFECT_SS_G_SPK, 128, &initParams);
|
||||
}
|
||||
|
||||
extern Color_RGBA8 D_801AE3D0;
|
||||
extern Color_RGBA8 D_801AE3D4;
|
||||
|
||||
void EffectSsGSpk_SpawnFuse(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
|
||||
Color_RGBA8 primColor = D_801AE3D0;
|
||||
Color_RGBA8 envColor = D_801AE3D4;
|
||||
Color_RGBA8 primColor = { 255, 255, 150, 255 };
|
||||
Color_RGBA8 envColor = { 255, 0, 0, 0 };
|
||||
|
||||
EffectSsGSpk_SpawnSmall(globalCtx, actor, pos, velocity, accel, &primColor, &envColor);
|
||||
}
|
||||
|
||||
extern Color_RGBA8 D_801AE3D8;
|
||||
extern Color_RGBA8 D_801AE3DC;
|
||||
|
||||
// unused
|
||||
void EffectSsGSpk_SpawnRandColor(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
|
||||
s16 scale, s16 scaleStep) {
|
||||
Color_RGBA8 primColor = D_801AE3D8;
|
||||
Color_RGBA8 envColor = D_801AE3DC;
|
||||
Color_RGBA8 primColor = { 255, 255, 150, 255 };
|
||||
Color_RGBA8 envColor = { 255, 0, 0, 0 };
|
||||
s32 randOffset = (Rand_ZeroOne() * 20.0f) - 10.0f;
|
||||
|
||||
primColor.r += randOffset;
|
||||
@@ -585,12 +576,10 @@ void EffectSsHahen_SpawnBurst(GlobalContext* globalCtx, Vec3f* pos, f32 burstSca
|
||||
}
|
||||
}
|
||||
|
||||
extern Vec3f D_801AE3E0;
|
||||
|
||||
void func_800B2364(GlobalContext* globalCtx, Vec3f* pos, Gfx* dList) {
|
||||
Vec3f posVec = D_801AE3E0;
|
||||
Vec3f accel = { 0.0f, -2.0f, 0.0f };
|
||||
|
||||
EffectSsHahen_Spawn(globalCtx, pos, &D_801D15B0, &posVec, 1, 5, 1, 10, dList);
|
||||
EffectSsHahen_Spawn(globalCtx, pos, &gZeroVec3f, &accel, 1, 5, 1, 10, dList);
|
||||
}
|
||||
|
||||
// EffectSsStick Spawn Functions
|
||||
@@ -624,12 +613,9 @@ void EffectSsSibuki_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity,
|
||||
EffectSs_Spawn(globalCtx, EFFECT_SS_SIBUKI, 128, &initParams);
|
||||
}
|
||||
|
||||
extern Vec3f D_801AE3EC;
|
||||
extern Vec3f D_801AE3F8;
|
||||
|
||||
void EffectSsSibuki_SpawnBurst(GlobalContext* globalCtx, Vec3f* pos) {
|
||||
s16 i;
|
||||
Vec3f zeroVec = D_801AE3EC;
|
||||
Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
|
||||
s16 randDirection = Rand_ZeroOne() * 1.99f;
|
||||
|
||||
for (i = 0; i < KREG(19) + 30; i++) {
|
||||
@@ -759,11 +745,6 @@ void EffectSsIcePiece_Spawn(GlobalContext* globalCtx, Vec3f* pos, f32 scale, Vec
|
||||
EffectSs_Spawn(globalCtx, EFFECT_SS_ICE_PIECE, 128, &initParams);
|
||||
}
|
||||
|
||||
extern Vec3f D_801AE3F8;
|
||||
extern Vec3f D_801AE404[10];
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
/* needs data migration to match */
|
||||
void EffectSsIcePiece_SpawnBurst(GlobalContext* globalCtx, Vec3f* refPos, f32 scale) {
|
||||
static Vec3f accel = { 0.0f, 0.0f, 0.0f };
|
||||
static Vec3f vecScales[] = {
|
||||
@@ -799,15 +780,11 @@ void EffectSsIcePiece_SpawnBurst(GlobalContext* globalCtx, Vec3f* refPos, f32 sc
|
||||
&accel, 25);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsIcePiece_SpawnBurst.s")
|
||||
#endif
|
||||
|
||||
// EffectSsEnIce Spawn Functions
|
||||
|
||||
void EffectSsEnIce_SpawnFlyingVec3f(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Color_RGBA8* prim,
|
||||
Color_RGBA8* env, f32 scale) {
|
||||
|
||||
EffectSsEnIceInitParams initParams;
|
||||
|
||||
initParams.actor = actor;
|
||||
@@ -818,17 +795,17 @@ void EffectSsEnIce_SpawnFlyingVec3f(GlobalContext* globalCtx, Actor* actor, Vec3
|
||||
initParams.scale = scale;
|
||||
|
||||
if (actor != NULL) {
|
||||
Audio_PlayActorSound2(actor, NA_SE_PL_FREEZE_S);
|
||||
Actor_PlaySfxAtPos(actor, NA_SE_PL_FREEZE_S);
|
||||
}
|
||||
|
||||
EffectSs_Spawn(globalCtx, EFFECT_SS_EN_ICE, 80, &initParams);
|
||||
}
|
||||
|
||||
extern Color_RGBA8 D_801AE47C;
|
||||
extern Color_RGBA8 D_801AE480;
|
||||
|
||||
void func_800B2B44(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, f32 scale) {
|
||||
EffectSsEnIce_SpawnFlyingVec3f(globalCtx, actor, pos, &D_801AE47C, &D_801AE480, scale);
|
||||
static Color_RGBA8 primColor = { 150, 150, 150, 250 };
|
||||
static Color_RGBA8 envColor = { 235, 245, 255, 255 };
|
||||
|
||||
EffectSsEnIce_SpawnFlyingVec3f(globalCtx, actor, pos, &primColor, &envColor, scale);
|
||||
}
|
||||
|
||||
void func_800B2B7C(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, f32 scale) {
|
||||
@@ -874,29 +851,21 @@ void EffectSsFireTail_Spawn(GlobalContext* globalCtx, Actor* actor, Vec3f* pos,
|
||||
EffectSs_Spawn(globalCtx, EFFECT_SS_FIRE_TAIL, 128, &initParams);
|
||||
}
|
||||
|
||||
extern Color_RGBA8 D_801AE484;
|
||||
extern Color_RGBA8 D_801AE488;
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// needs data migration to match
|
||||
void EffectSsFireTail_SpawnFlame(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, f32 arg3, s16 bodyPart,
|
||||
f32 colorIntensity) {
|
||||
static Color_RGBA8 primColor = { 255, 255, 0, 255 };
|
||||
static Color_RGBA8 envColor = { 255, 0, 0, 255 };
|
||||
|
||||
D_801AE484.g = (s32)(255.0f * colorIntensity);
|
||||
D_801AE484.b = 0;
|
||||
primColor.g = (s32)(255.0f * colorIntensity);
|
||||
primColor.b = 0;
|
||||
|
||||
D_801AE488.g = 0;
|
||||
D_801AE488.b = 0;
|
||||
D_801AE484.r = D_801AE488.r = (s32)(255.0f * colorIntensity);
|
||||
envColor.g = 0;
|
||||
envColor.b = 0;
|
||||
primColor.r = envColor.r = (s32)(255.0f * colorIntensity);
|
||||
|
||||
EffectSsFireTail_Spawn(globalCtx, actor, pos, arg3, &actor->velocity, 15, &D_801AE484, &D_801AE488,
|
||||
EffectSsFireTail_Spawn(globalCtx, actor, pos, arg3, &actor->velocity, 15, &primColor, &envColor,
|
||||
(colorIntensity == 1.0f) ? 0 : 1, bodyPart, 1);
|
||||
}
|
||||
#else
|
||||
void EffectSsFireTail_SpawnFlame(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, f32 arg3, s16 bodyPart,
|
||||
f32 colorIntensity);
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsFireTail_SpawnFlame.s")
|
||||
#endif
|
||||
|
||||
void EffectSsFireTail_SpawnFlameOnPlayer(GlobalContext* globalCtx, f32 scale, s16 bodyPart, f32 colorIntensity) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
@@ -919,7 +888,7 @@ void EffectSsEnFire_SpawnVec3f(GlobalContext* globalCtx, Actor* actor, Vec3f* po
|
||||
initParams.bodyPart = bodyPart;
|
||||
|
||||
if (actor != NULL) {
|
||||
Audio_PlayActorSound2(actor, NA_SE_EV_FLAME_IGNITION);
|
||||
Actor_PlaySfxAtPos(actor, NA_SE_EV_FLAME_IGNITION);
|
||||
}
|
||||
|
||||
EffectSs_Spawn(globalCtx, EFFECT_SS_EN_FIRE, 128, &initParams);
|
||||
@@ -939,7 +908,7 @@ void EffectSsEnFire_SpawnVec3s(GlobalContext* globalCtx, Actor* actor, Vec3s* po
|
||||
initParams.bodyPart = bodyPart;
|
||||
|
||||
if (actor != NULL) {
|
||||
Audio_PlayActorSound2(actor, NA_SE_EV_FLAME_IGNITION);
|
||||
Actor_PlaySfxAtPos(actor, NA_SE_EV_FLAME_IGNITION);
|
||||
}
|
||||
|
||||
EffectSs_Spawn(globalCtx, EFFECT_SS_EN_FIRE, 128, &initParams);
|
||||
@@ -982,12 +951,17 @@ void EffectSsDeadDb_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity,
|
||||
EffectSs_Spawn(globalCtx, EFFECT_SS_DEAD_DB, 120, &initParams);
|
||||
}
|
||||
|
||||
extern Color_RGBA8 D_801AE48C;
|
||||
extern Color_RGBA8 D_801AE490[4];
|
||||
|
||||
void func_800B3030(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
|
||||
s32 colorIndex) {
|
||||
EffectSsDeadDb_Spawn(globalCtx, pos, velocity, accel, &D_801AE48C, &D_801AE490[colorIndex], scale, scaleStep, 9);
|
||||
static Color_RGBA8 primColor = { 255, 255, 255, 255 };
|
||||
static Color_RGBA8 envColors[] = {
|
||||
{ 255, 0, 0, 255 },
|
||||
{ 0, 255, 0, 255 },
|
||||
{ 0, 0, 255, 255 },
|
||||
{ 150, 150, 150, 255 },
|
||||
};
|
||||
|
||||
EffectSsDeadDb_Spawn(globalCtx, pos, velocity, accel, &primColor, &envColors[colorIndex], scale, scaleStep, 9);
|
||||
}
|
||||
|
||||
// EffectSsDeadDd Spawn Functions
|
||||
@@ -1032,7 +1006,7 @@ void EffectSsDeadDs_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity,
|
||||
}
|
||||
|
||||
void func_800B31BC(GlobalContext* globalCtx, Vec3f* pos, s16 scale, s16 scaleStep, s16 alpha, s32 life) {
|
||||
EffectSsDeadDs_Spawn(globalCtx, pos, &D_801D15B0, &D_801D15B0, scale, scaleStep, alpha, life);
|
||||
EffectSsDeadDs_Spawn(globalCtx, pos, &gZeroVec3f, &gZeroVec3f, scale, scaleStep, alpha, life);
|
||||
}
|
||||
|
||||
// EffectSsIceSmoke Spawn Functions
|
||||
|
||||
@@ -11,10 +11,10 @@ void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->actor.textId = ((this->actor.params >> 8) & 0xFF) | 0x300;
|
||||
this->actor.params = (this->actor.params & 0xFF) - 9;
|
||||
Actor_ProcessInitChain(&this->actor, &enAObjInitVar);
|
||||
ActorShape_Init(&this->actor.shape, 0, func_800B3FC0, 12);
|
||||
ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawCircle, 12);
|
||||
Collider_InitAndSetCylinder(globalCtx, &this->collision, &this->actor, &enAObjCylinderInit);
|
||||
Collider_UpdateCylinder(&this->actor, &this->collision);
|
||||
this->actor.colChkInfo.mass = 255;
|
||||
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
this->actionFunc = EnAObj_Update1;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ void EnAObj_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EnAObj_Update1(EnAObj* this, GlobalContext* globalCtx) {
|
||||
s32 yawDiff;
|
||||
|
||||
if (func_800B84D0(&this->actor, globalCtx)) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &globalCtx->state)) {
|
||||
this->actionFunc = EnAObj_Update2;
|
||||
} else {
|
||||
yawDiff = ABS_ALT((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y));
|
||||
@@ -39,7 +39,7 @@ void EnAObj_Update1(EnAObj* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void EnAObj_Update2(EnAObj* this, GlobalContext* globalCtx) {
|
||||
if (func_800B867C(&this->actor, globalCtx)) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
||||
this->actionFunc = EnAObj_Update1;
|
||||
}
|
||||
}
|
||||
@@ -48,10 +48,10 @@ void EnAObj_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnAObj* this = THIS;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
Actor_SetHeight(&this->actor, 45.0f);
|
||||
Actor_SetFocus(&this->actor, 45.0f);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collision.base);
|
||||
}
|
||||
|
||||
void EnAObj_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
func_800BDFC0(globalCtx, enAObjDisplayLists[thisx->params]);
|
||||
Gfx_DrawDListOpa(globalCtx, enAObjDisplayLists[thisx->params]);
|
||||
}
|
||||
|
||||
+4
-4
@@ -66,7 +66,7 @@ Actor* EnHy_FindNearestDoor(Actor* actor, GlobalContext* globalCtx) {
|
||||
f32 minDist = 0.0f;
|
||||
|
||||
do {
|
||||
doorIter = func_ActorCategoryIterateById(globalCtx, doorIter, ACTORCAT_DOOR, ACTOR_EN_DOOR);
|
||||
doorIter = SubS_FindActor(globalCtx, doorIter, ACTORCAT_DOOR, ACTOR_EN_DOOR);
|
||||
door = doorIter;
|
||||
dist = Actor_DistanceBetweenActors(actor, door);
|
||||
if (!isSetup || (dist < minDist)) {
|
||||
@@ -131,7 +131,7 @@ void func_800F0BB4(EnHy* enHy, GlobalContext* globalCtx, Actor* door, s16 arg3,
|
||||
Vec3f offset;
|
||||
f32 phi_f0;
|
||||
|
||||
Actor_CalcOffsetOrientedToDrawRotation(door, &offset, &enHy->actor.world.pos);
|
||||
Actor_OffsetOfPointInActorCoords(door, &offset, &enHy->actor.world.pos);
|
||||
phi_f0 = (offset.z >= 0.0f) ? 1.0f : -1.0f;
|
||||
sp3B = ((s8)phi_f0 < 0) ? 0 : 2;
|
||||
EnHy_ChangeObjectAndAnim(enHy, globalCtx, (sp3B == 0) ? arg3 : arg4);
|
||||
@@ -260,12 +260,12 @@ s32 EnHy_PlayWalkingSound(EnHy* enHy, GlobalContext* globalCtx, f32 distAboveThr
|
||||
|
||||
enHy->isLeftFootOnGround = isFootOnGround = func_8013DB90(globalCtx, &enHy->leftFootPos, distAboveThreshold);
|
||||
if (enHy->isLeftFootOnGround && !wasLeftFootOnGround && isFootOnGround) {
|
||||
Audio_PlayActorSound2(&enHy->actor, sfxId);
|
||||
Actor_PlaySfxAtPos(&enHy->actor, sfxId);
|
||||
}
|
||||
|
||||
enHy->isRightFootOnGround = isFootOnGround = func_8013DB90(globalCtx, &enHy->rightFootPos, distAboveThreshold);
|
||||
if (enHy->isRightFootOnGround && !wasRightFootOnGround && isFootOnGround) {
|
||||
Audio_PlayActorSound2(&enHy->actor, sfxId);
|
||||
Actor_PlaySfxAtPos(&enHy->actor, sfxId);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user