From c45aa301bb07a14eb1b1ebc9e73b8fed60817292 Mon Sep 17 00:00:00 2001 From: n64 Date: Fri, 3 Apr 2020 14:57:26 -0400 Subject: [PATCH] Refresh 8 --- CHANGES | 42 + Makefile | 48 +- README.md | 2 +- asm/boot.s | 450 +-- asm/decompress.s | 46 +- .../eu/audio/synthesis_process_note.s | 657 ---- .../synthesis_process_notes_jp.s | 738 ---- .../synthesis_process_notes_us.s | 733 ---- asm/rom_header.s | 7 +- assets.json | 3068 ++++++++--------- data/behavior_data.c | 449 +-- diff.py | 2 +- diff_settings.py | 2 + enhancements/debug_box.patch | 7 +- enhancements/fps.patch | 18 +- enhancements/mem_error_screen.patch | 30 +- enhancements/record_demo.patch | 20 +- extract_assets.py | 2 +- first-diff.py | 6 +- include/behavior_data.h | 30 +- include/config.h | 8 +- include/geo_commands.h | 1 - include/macro_presets.h | 2 +- include/macros.h | 4 + include/make_const_nonconst.h | 5 +- include/object_constants.h | 32 +- include/object_fields.h | 4 +- include/sm64.h | 34 +- include/types.h | 11 +- levels/bbh/geo.c | 2 + levels/bitdw/geo.c | 2 + levels/bitdw/script.c | 2 +- levels/bitfs/geo.c | 2 + levels/bitfs/script.c | 2 +- levels/bits/geo.c | 2 + levels/bits/script.c | 2 +- levels/bob/geo.c | 2 + levels/bowser_1/geo.c | 2 + levels/bowser_2/geo.c | 2 + levels/bowser_3/geo.c | 2 + levels/castle_courtyard/geo.c | 2 + levels/castle_grounds/geo.c | 2 + levels/castle_grounds/script.c | 2 +- levels/castle_inside/geo.c | 2 + levels/castle_inside/script.c | 30 +- levels/ccm/geo.c | 2 + levels/cotmc/geo.c | 2 + levels/ddd/geo.c | 2 + levels/ending/geo.c | 2 + levels/hmc/geo.c | 2 + levels/intro/geo.c | 12 +- levels/intro/script.c | 8 +- levels/jrb/geo.c | 2 + levels/lll/geo.c | 2 + levels/menu/geo.c | 2 + levels/pss/geo.c | 2 + levels/rr/geo.c | 2 + levels/sa/geo.c | 2 + levels/scripts.c | 2 + levels/sl/geo.c | 2 + levels/ssl/geo.c | 2 + levels/thi/geo.c | 2 + levels/totwc/geo.c | 2 + levels/ttc/geo.c | 2 + levels/ttm/geo.c | 2 + levels/vcutm/geo.c | 2 + levels/wdw/geo.c | 2 + levels/wf/geo.c | 2 + levels/wmotr/geo.c | 2 + lib/asm/__osExceptionPreamble.s | 152 +- lib/asm/llmuldiv_gcc.s | 100 + lib/src/__osDequeueThread.c | 6 +- lib/src/__osGetCurrFaultedThread.c | 2 +- lib/src/func_802F4A20.c | 21 +- lib/src/func_802F71A0.c | 8 +- lib/src/func_802F71F0.c | 2 - lib/src/libultra_internal.h | 44 + lib/src/osContInit.c | 1 - lib/src/osContInternal.h | 10 + lib/src/osContStartReadData.c | 6 + lib/src/osCreateMesgQueue.c | 2 - lib/src/osCreateThread.c | 1 - lib/src/osDestroyThread.c | 3 - lib/src/osEepromRead.c | 2 - lib/src/osEepromWrite.c | 8 +- lib/src/osGetThreadPri.c | 2 - lib/src/osJamMesg.c | 2 - lib/src/osRecvMesg.c | 2 - lib/src/osSendMesg.c | 2 - lib/src/osSetThreadPri.c | 3 - lib/src/osStartThread.c | 3 +- sm64.ld | 21 +- sound/sequences/00_sound_player.s | 6 +- src/audio/external.c | 230 +- src/audio/external.h | 4 + src/audio/internal.h | 6 + src/audio/synthesis.c | 406 +-- src/buffers/buffers.c | 5 +- src/buffers/buffers.h | 5 +- src/engine/behavior_script.c | 1071 +++--- src/engine/behavior_script.h | 37 +- src/engine/level_script.c | 2 +- src/engine/surface_collision.c | 5 +- src/engine/surface_load.c | 45 +- src/game/area.c | 35 +- src/game/behavior_actions.c | 5 +- src/game/behaviors/amp.inc.c | 2 +- src/game/behaviors/beta_chest.inc.c | 2 +- src/game/behaviors/bird.inc.c | 4 +- src/game/behaviors/blue_fish.inc.c | 8 +- src/game/behaviors/bobomb.inc.c | 23 +- src/game/behaviors/bomp.inc.c | 4 +- src/game/behaviors/boo.inc.c | 6 +- src/game/behaviors/boulder.inc.c | 4 +- src/game/behaviors/bouncing_fireball.inc.c | 4 +- src/game/behaviors/bowling_ball.inc.c | 8 +- src/game/behaviors/bowser.inc.c | 64 +- src/game/behaviors/bowser_bomb.inc.c | 10 +- src/game/behaviors/break_particles.inc.c | 6 +- src/game/behaviors/breakable_box_small.inc.c | 12 +- src/game/behaviors/bub.inc.c | 8 +- src/game/behaviors/bubba.inc.c | 2 +- src/game/behaviors/bubble.inc.c | 6 +- src/game/behaviors/bullet_bill.inc.c | 4 +- src/game/behaviors/bully.inc.c | 6 +- src/game/behaviors/butterfly.inc.c | 4 +- src/game/behaviors/camera_lakitu.inc.c | 2 +- src/game/behaviors/cap.inc.c | 12 +- src/game/behaviors/capswitch.inc.c | 3 + src/game/behaviors/castle_flag.inc.c | 2 +- src/game/behaviors/castle_floor_trap.inc.c | 6 +- src/game/behaviors/chain_chomp.inc.c | 2 +- src/game/behaviors/chuckya.inc.c | 2 +- src/game/behaviors/clam.inc.c | 4 +- src/game/behaviors/coin.inc.c | 14 +- .../behaviors/controllable_platform.inc.c | 2 +- src/game/behaviors/corkbox.inc.c | 8 +- src/game/behaviors/door.inc.c | 4 +- src/game/behaviors/dorrie.inc.c | 2 +- src/game/behaviors/end_birds_1.inc.c | 2 +- src/game/behaviors/end_birds_2.inc.c | 4 +- src/game/behaviors/enemy_lakitu.inc.c | 4 +- src/game/behaviors/exclamation_box.inc.c | 3 + src/game/behaviors/eyerok.inc.c | 32 +- src/game/behaviors/fire_piranha_plant.inc.c | 2 +- src/game/behaviors/fish.inc.c | 20 +- src/game/behaviors/flame.inc.c | 4 +- src/game/behaviors/flame_mario.inc.c | 8 +- src/game/behaviors/flamethrower.inc.c | 2 +- src/game/behaviors/fly_guy.inc.c | 6 +- .../behaviors/flying_bookend_switch.inc.c | 4 +- src/game/behaviors/goomba.inc.c | 4 +- src/game/behaviors/haunted_chair.inc.c | 2 +- src/game/behaviors/hoot.inc.c | 6 +- src/game/behaviors/intro_lakitu.inc.c | 2 +- src/game/behaviors/intro_scene.inc.c | 2 +- src/game/behaviors/jumping_box.inc.c | 6 +- src/game/behaviors/king_bobomb.inc.c | 2 +- src/game/behaviors/klepto.inc.c | 22 +- src/game/behaviors/koopa.inc.c | 26 +- src/game/behaviors/koopa_shell.inc.c | 8 +- src/game/behaviors/lll_hexagonal_ring.inc.c | 10 +- src/game/behaviors/mad_piano.inc.c | 2 +- src/game/behaviors/mips.inc.c | 5 +- src/game/behaviors/moneybag.inc.c | 2 +- src/game/behaviors/monty_mole.inc.c | 159 +- src/game/behaviors/moving_coin.inc.c | 6 +- src/game/behaviors/mr_blizzard.inc.c | 129 +- src/game/behaviors/mr_i.inc.c | 14 +- src/game/behaviors/mushroom_1up.inc.c | 8 +- src/game/behaviors/piranha_bubbles.inc.c | 6 +- src/game/behaviors/purple_switch.inc.c | 3 + src/game/behaviors/pyramid_top.inc.c | 14 +- src/game/behaviors/racing_penguin.inc.c | 2 +- src/game/behaviors/seaweed.inc.c | 8 +- src/game/behaviors/skeeter.inc.c | 6 +- src/game/behaviors/sliding_platform.inc.c | 2 +- src/game/behaviors/spawn_star.inc.c | 2 +- src/game/behaviors/spiny.inc.c | 2 +- src/game/behaviors/star_door.inc.c | 12 +- src/game/behaviors/thwomp.inc.c | 4 +- src/game/behaviors/tower_platform.inc.c | 4 +- src/game/behaviors/tree_particles.inc.c | 32 +- src/game/behaviors/triplet_butterfly.inc.c | 2 +- src/game/behaviors/ttc_2d_rotator.inc.c | 2 +- src/game/behaviors/ttc_cog.inc.c | 2 +- src/game/behaviors/ttc_elevator.inc.c | 2 +- src/game/behaviors/ttc_moving_bar.inc.c | 6 +- src/game/behaviors/ttc_pendulum.inc.c | 4 +- src/game/behaviors/ttc_spinner.inc.c | 2 +- src/game/behaviors/ttc_treadmill.inc.c | 2 +- src/game/behaviors/tumbling_bridge.inc.c | 2 +- src/game/behaviors/tuxie.inc.c | 6 +- src/game/behaviors/tweester.inc.c | 6 +- src/game/behaviors/ukiki.inc.c | 10 +- src/game/behaviors/unagi.inc.c | 2 +- src/game/behaviors/water_bomb.inc.c | 77 +- src/game/behaviors/water_bomb_cannon.inc.c | 4 +- src/game/behaviors/water_mist.inc.c | 2 +- src/game/behaviors/water_objs.inc.c | 20 +- src/game/behaviors/water_pillar.inc.c | 3 + src/game/behaviors/water_ring.inc.c | 6 +- .../behaviors/water_splashes_and_waves.inc.c | 10 +- src/game/behaviors/wdw_water_level.inc.c | 3 + src/game/behaviors/whirlpool.inc.c | 4 +- src/game/behaviors/whomp.inc.c | 2 +- src/game/behaviors/wiggler.inc.c | 6 +- src/game/behaviors/wind.inc.c | 10 +- src/game/behaviors/yoshi.inc.c | 2 +- src/game/camera.c | 44 +- src/game/crash_screen.c | 53 +- src/game/debug.c | 14 +- src/game/display.c | 289 -- src/game/display.h | 31 - src/game/envfx_bubbles.c | 26 +- src/game/envfx_snow.c | 28 +- src/game/{game.c => game_init.c} | 306 +- src/game/{game.h => game_init.h} | 29 +- src/game/hud.c | 17 +- src/game/ingame_menu.c | 92 +- src/game/interaction.c | 90 +- src/game/interaction.h | 6 +- src/game/level_update.c | 41 +- src/game/level_update.h | 38 +- src/game/macro_special_objects.c | 6 +- src/game/main.c | 27 +- src/game/main.h | 35 + src/game/mario.c | 40 +- src/game/mario_actions_airborne.c | 118 +- src/game/mario_actions_automatic.c | 33 +- src/game/mario_actions_cutscene.c | 86 +- src/game/mario_actions_moving.c | 53 +- src/game/mario_actions_object.c | 36 +- src/game/mario_actions_stationary.c | 141 +- src/game/mario_actions_stationary.h | 8 +- src/game/mario_actions_submerged.c | 22 +- src/game/mario_misc.c | 3 +- src/game/mario_step.c | 2 +- src/game/memory.c | 4 +- src/game/obj_behaviors.c | 23 +- src/game/obj_behaviors.h | 2 +- src/game/obj_behaviors_2.c | 31 +- src/game/object_helpers.c | 154 +- src/game/object_helpers.h | 87 +- src/game/object_helpers2.h | 94 - src/game/object_list_processor.c | 36 +- src/game/object_list_processor.h | 2 +- src/game/paintings.c | 2 +- src/game/platform_displacement.c | 1 - src/game/print.c | 2 +- src/game/profiler.c | 2 +- src/game/rendering_graph_node.c | 7 +- src/game/save_file.c | 26 +- src/game/screen_transition.c | 2 +- src/game/sound_init.c | 21 +- src/game/spawn_object.c | 20 +- src/game/spawn_object.h | 2 +- src/game/spawn_sound.c | 17 +- src/game/thread6.c | 288 ++ src/game/thread6.h | 23 + src/goddard/draw_objects.c | 16 +- src/goddard/dynlist_proc.c | 40 +- src/goddard/gd_math.c | 834 +++-- src/goddard/gd_math.h | 60 +- src/goddard/joints.c | 78 +- src/goddard/objects.c | 108 +- src/goddard/particles.c | 8 +- src/goddard/renderer.c | 20 +- src/goddard/shape_helper.c | 14 +- src/goddard/skin.c | 30 +- src/goddard/skin_movement.c | 12 +- src/menu/file_select.c | 2 +- src/menu/intro_geo.c | 8 +- src/menu/intro_geo.h | 8 +- src/menu/level_select_menu.c | 17 +- src/menu/level_select_menu.h | 2 +- src/menu/star_select.c | 3 +- tools/gen_asset_list.cpp | 2 +- undefined_syms.txt | 76 +- 279 files changed, 6522 insertions(+), 7273 deletions(-) delete mode 100644 asm/non_matchings/eu/audio/synthesis_process_note.s delete mode 100644 asm/non_matchings/synthesis_process_notes_jp.s delete mode 100644 asm/non_matchings/synthesis_process_notes_us.s create mode 100644 lib/asm/llmuldiv_gcc.s delete mode 100644 src/game/display.c delete mode 100644 src/game/display.h rename src/game/{game.c => game_init.c} (55%) rename src/game/{game.h => game_init.h} (68%) delete mode 100644 src/game/object_helpers2.h create mode 100644 src/game/thread6.c create mode 100644 src/game/thread6.h diff --git a/CHANGES b/CHANGES index b0bad032..2feccbba 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,45 @@ +Refresh #8 +1.) Use INT_STATUS_ macros for oInteractStatus (#911) +2.) Update bullet_bill.inc.c (#912) +3.) Make geo.c in levels nonconst to reduce diffs with gcc enhancement patch in future (#913) +4.) Improve process_level_music_dynamics (#915) +5.) add AVOID_UB define for fixing libultra aliasing. (#916) +6.) const hack to TARGET_N64 and tweak ld script (#918) +7.) Replace raw level/course numbers with defines (#919) +8.) Label all graph node flags. (#920) +9.) readme.md capitalization +10.) The Big Function PR (Part 5) (#910) +11.) Label hardware registers (#922) +12.) Match EU synthesis_process_note (#923) +13.) Some quick value changes (#909) +14.) Added sequence player defines (#926) +15.) Shindou diffs 2 [merge game.c and display.c, required for SH] (#927) +16.) Match synthesis_process_notes and use -sopt for synthesis.c (#928) +17.) Fix mips64-binutils for Fedora 31 and similar Linux distros (#931) +18.) Update first-diff.py to work with Shindou (#933) +19.) Labelled behavior_script.c (#929) +20.) shindou diffs up to level_update (#932) +21.) Update diff.py and diff_settings.py to work with SH (#936) +22.) Add some Shindou resources to extract_assets.py (#939) +23.) Label and document gd_math.c (#930) +24.) Label all of Mario's actions. (#941) +25.) Label all particles. (#940) +26.) Renamed death related warpBhvs (#942) +27.) Small Shindou differences (#945) +28.) match player_performed_grab_escape_action in all versions (#943) +29.) add main alignment (aglab2, #947) +30.) Match a bunch of fake EU matchings (#944) +31.) Shindou diffs round 4 (#937) +32.) Easy PAL fake matchings (#946) +33.) Merge object_helpers and object_helpers2 headers (#948) +34.) match cap_check_quicksand (#950) +35.) Shindou crash screen diffs (#938) +36.) Thread6 (#951) +37.) Correct IPL3 function and label addresses (#952) +38.) Add COMPILER flag for Makefile and add official mips gcc support. (#953) +39.) add align to sequence_00 (fixes gcc build) (#957) +40.) Fixed itty bitty typo (#959) + Refresh #7 1.) update README.md (#861) 2.) [eu] fix decompilation bugs in synthesis_process_note (#862) diff --git a/Makefile b/Makefile index 8bd1bd91..2c7ca6ce 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,12 @@ COMPARE ?= 1 NON_MATCHING ?= 0 # Build for the N64 (turn this off for ports) TARGET_N64 ?= 1 +# Compiler to use (ido or gcc) +COMPILER ?= ido + +ifeq ($(COMPILER),gcc) + NON_MATCHING := 1 +endif # Release @@ -51,7 +57,7 @@ ifeq ($(VERSION),sh) GRUCODE_ASFLAGS := --defsym F3D_NEW=1 TARGET := sm64.sh # TODO: GET RID OF THIS!!! We should mandate assets for Shindou like EU but we dont have the addresses extracted yet so we'll just pretend you have everything extracted for now. - NOEXTRACT := 1 + NOEXTRACT := 1 else $(error unknown version "$(VERSION)") endif @@ -96,6 +102,7 @@ endif ifeq ($(NON_MATCHING),1) VERSION_CFLAGS := $(VERSION_CFLAGS) -DNON_MATCHING -DAVOID_UB + VERSION_ASFLAGS := --defsym AVOID_UB=1 COMPARE := 0 endif @@ -153,8 +160,12 @@ ULTRA_BIN_DIRS := lib/bin GODDARD_SRC_DIRS := src/goddard src/goddard/dynlists +MIPSISET := -mips2 +MIPSBIT := -32 -MIPSISET := -mips2 -32 +ifeq ($(COMPILER),gcc) + MIPSISET := -mips3 +endif ifeq ($(VERSION),eu) OPT_FLAGS := -O2 @@ -166,6 +177,11 @@ else endif endif +# Use a default opt flag for gcc +ifeq ($(COMPILER),gcc) + OPT_FLAGS := -O2 +endif + # File dependencies and variables for specific files include Makefile.split @@ -228,6 +244,8 @@ IRIX_ROOT := tools/ido5.3_compiler ifeq ($(shell type mips-linux-gnu-ld >/dev/null 2>/dev/null; echo $$?), 0) CROSS := mips-linux-gnu- +else ifeq ($(shell type mips64-linux-gnu-ld >/dev/null 2>/dev/null; echo $$?), 0) + CROSS := mips64-linux-gnu- else CROSS := mips64-elf- endif @@ -249,6 +267,11 @@ OBJDUMP := $(CROSS)objdump OBJCOPY := $(CROSS)objcopy PYTHON := python3 +# change the compiler to gcc, to use the default, install the gcc-mips-linux-gnu package +ifeq ($(COMPILER),gcc) + CC := $(CROSS)gcc +endif + ifeq ($(TARGET_N64),1) TARGET_CFLAGS := -nostdinc -I include/libc -DTARGET_N64 CC_CFLAGS := -fno-builtin @@ -259,13 +282,19 @@ INCLUDE_CFLAGS := -I include -I $(BUILD_DIR) -I $(BUILD_DIR)/include -I src -I . # Check code syntax with host compiler CC_CHECK := gcc -fsyntax-only -fsigned-char $(CC_CFLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) -std=gnu90 -Wall -Wextra -Wno-format-security -Wno-main -DNON_MATCHING -DAVOID_UB $(VERSION_CFLAGS) $(GRUCODE_CFLAGS) +COMMON_CFLAGS = $(OPT_FLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) $(VERSION_CFLAGS) $(MIPSISET) $(GRUCODE_CFLAGS) + ASFLAGS := -march=vr4300 -mabi=32 -I include -I $(BUILD_DIR) $(VERSION_ASFLAGS) $(GRUCODE_ASFLAGS) -CFLAGS = -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm -Xfullwarn -signed $(OPT_FLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) $(VERSION_CFLAGS) $(MIPSISET) $(GRUCODE_CFLAGS) +CFLAGS = -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm -Xfullwarn -signed $(COMMON_CFLAGS) $(MIPSBIT) OBJCOPYFLAGS := --pad-to=0x800000 --gap-fill=0xFF SYMBOL_LINKING_FLAGS := $(addprefix -R ,$(SEG_FILES)) LDFLAGS := -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(SYMBOL_LINKING_FLAGS) ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth +ifeq ($(COMPILER),gcc) + CFLAGS := -march=vr4300 -mfix4300 -mno-shared -G 0 -mhard-float -fno-stack-protector -fno-common -I include -I src/ -I $(BUILD_DIR)/include -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra $(COMMON_CFLAGS) +endif + ifeq ($(shell getconf LONG_BIT), 32) # Work around memory allocation bug in QEMU export QEMU_GUEST_BASE := 1 @@ -297,6 +326,11 @@ LOADER = loader64 LOADER_FLAGS = -vwf SHA1SUM = sha1sum +# Use Objcopy instead of extract_data_for_mio +ifeq ($(COMPILER),gcc) +EXTRACT_DATA_FOR_MIO := $(OBJCOPY) -O binary --only-section=.data +endif + ###################### Dependency Check ##################### BINUTILS_VER_MAJOR := $(shell $(LD) --version | grep ^GNU | sed 's/^.* //; s/\..*//g') @@ -339,6 +373,10 @@ $(BUILD_DIR)/include/text_strings.h: include/text_strings.h.in $(BUILD_DIR)/include/text_menu_strings.h: include/text_menu_strings.h.in $(TEXTCONV) charmap_menu.txt $< $@ +ifeq ($(COMPILER),gcc) +$(BUILD_DIR)/lib/src/math/%.o: CFLAGS += -fno-builtin +endif + ifeq ($(VERSION),eu) TEXT_DIRS := text/de text/us text/fr @@ -486,7 +524,7 @@ $(BUILD_DIR)/assets/mario_anim_data.c: $(wildcard assets/anims/*.inc.c) $(BUILD_DIR)/assets/demo_data.c: assets/demo_data.json $(wildcard assets/demos/*.bin) $(PYTHON) tools/demo_data_converter.py assets/demo_data.json $(VERSION_CFLAGS) > $@ - +ifeq ($(COMPILER),ido) # Source code $(BUILD_DIR)/levels/%/leveldata.o: OPT_FLAGS := -g $(BUILD_DIR)/actors/%.o: OPT_FLAGS := -g @@ -520,6 +558,7 @@ else # The source-to-source optimizer copt is enabled for audio. This makes it use # acpp, which needs -Wp,-+ to handle C++-style comments. $(BUILD_DIR)/src/audio/effects.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0 -sopt,-inline=sequence_channel_process_sound,-scalaroptimize=1 -Wp,-+ +$(BUILD_DIR)/src/audio/synthesis.o: OPT_FLAGS := -O2 -sopt,-scalaroptimize=1 -Wp,-+ # Add a target for build/eu/src/audio/*.copt to make it easier to see debug $(BUILD_DIR)/src/audio/%.acpp: src/audio/%.c @@ -527,6 +566,7 @@ $(BUILD_DIR)/src/audio/%.acpp: src/audio/%.c $(BUILD_DIR)/src/audio/%.copt: $(BUILD_DIR)/src/audio/%.acpp $(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/lib/copt -signed -I=$< -CMP=$@ -cp=i -scalaroptimize=1 endif +endif ifeq ($(NON_MATCHING),0) $(GLOBAL_ASM_O_FILES): CC := $(PYTHON) tools/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) -- diff --git a/README.md b/README.md index 6754e1c8..463b76a9 100644 --- a/README.md +++ b/README.md @@ -113,4 +113,4 @@ discuss what you would like to change. Run clang-format on your code to ensure it meets the project's coding standards. -Official discord: https://discord.gg/27JtCWs +Official Discord: https://discord.gg/27JtCWs diff --git a/asm/boot.s b/asm/boot.s index c187e813..bfe6b4e4 100644 --- a/asm/boot.s +++ b/asm/boot.s @@ -5,15 +5,24 @@ .include "macros.inc" +# 0xA0000000-0xBFFFFFFF: KSEG1 direct map non-cache mirror of 0x00000000 +# 0xA4000000-0xA4000FFF: RSP DMEM + +# 0xA4000000-0xA400003F: ROM header .section .text, "ax" + +# 0xA4000040-0xA4000B6F: IPL3 + +# IPL3 entry point jumped to from IPL2 +glabel ipl3_entry # 0xA4000040 mtc0 $zero, $13 mtc0 $zero, $9 mtc0 $zero, $11 - lui $t0, %hi(D_A4700000) - addiu $t0, %lo(D_A4700000) + lui $t0, %hi(RI_MODE_REG) + addiu $t0, %lo(RI_MODE_REG) lw $t1, 0xc($t0) - bnez $t1, .L000003D0 + bnez $t1, .LA4000410 nop addiu $sp, $sp, -0x18 sw $s3, ($sp) @@ -21,47 +30,47 @@ sw $s5, 8($sp) sw $s6, 0xc($sp) sw $s7, 0x10($sp) - lui $t0, %hi(D_A4700000) - addiu $t0, %lo(D_A4700000) - lui $t2, (0xa3f80000 >> 16) # $t2, 0xa3f8 - lui $t3, (0xa3f00000 >> 16) # $t3, 0xa3f0 - lui $t4, %hi(D_A4300000) - addiu $t4, %lo(D_A4300000) + lui $t0, %hi(RI_MODE_REG) + addiu $t0, %lo(RI_MODE_REG) + lui $t2, (0xa3f80000 >> 16) + lui $t3, (0xa3f00000 >> 16) + lui $t4, %hi(MI_MODE_REG) + addiu $t4, %lo(MI_MODE_REG) ori $t1, $zero, 64 sw $t1, 4($t0) li $s1, 8000 -.L0000005C: +.LA400009C: nop addi $s1, $s1, -1 - bnez $s1, .L0000005C + bnez $s1, .LA400009C nop sw $zero, 8($t0) ori $t1, $zero, 20 sw $t1, 0xc($t0) sw $zero, ($t0) li $s1, 4 -.L00000080: +.LA40000C0: nop addi $s1, $s1, -1 - bnez $s1, .L00000080 + bnez $s1, .LA40000C0 nop ori $t1, $zero, 14 sw $t1, ($t0) li $s1, 32 -.L0000009C: +.LA40000DC: addi $s1, $s1, -1 - bnez $s1, .L0000009C + bnez $s1, .LA40000DC ori $t1, $zero, 271 sw $t1, ($t4) - lui $t1, (0x18082838 >> 16) # lui $t1, 0x1808 - ori $t1, (0x18082838 & 0xFFFF) # ori $t1, $t1, 0x2838 + lui $t1, (0x18082838 >> 16) + ori $t1, (0x18082838 & 0xFFFF) sw $t1, 0x8($t2) sw $zero, 0x14($t2) lui $t1, 0x8000 sw $t1, 0x4($t2) move $t5, $zero move $t6, $zero - lui $t7, (0xA3F00000 >> 16) # $t7, 0xa3f0 + lui $t7, (0xA3F00000 >> 16) move $t8, $zero lui $t9, (0xA3F00000 >> 16) lui $s6, (0xA0000000 >> 16) @@ -72,25 +81,25 @@ lui $s4, (0xA0000000 >> 16) addiu $sp, $sp, -0x48 move $fp, $sp - lui $s0, %hi(D_A4300004) # $s0, 0xa430 - lw $s0, %lo(D_A4300004)($s0) - lui $s1, 0x0101 # $s1, 0x101 - addiu $s1, 0x0101 # addiu $s1, $s1, 0x101 - bne $s0, $s1, .L00000120 + lui $s0, %hi(MI_VERSION_REG) + lw $s0, %lo(MI_VERSION_REG)($s0) + lui $s1, (0x01010101 >> 16) + addiu $s1, (0x01010101 & 0xFFFF) + bne $s0, $s1, .LA4000160 nop li $s0, 512 ori $s1, $t3, 0x4000 - b .L00000128 + b .LA4000168 nop -.L00000120: +.LA4000160: li $s0, 1024 ori $s1, $t3, 0x8000 -.L00000128: +.LA4000168: sw $t6, 4($s1) addiu $s5, $t7, 0xc - jal func_04000778 + jal func_A4000778 nop - beqz $v0, .L0000021C + beqz $v0, .LA400025C nop sw $v0, ($sp) li $t1, 8192 @@ -103,7 +112,7 @@ li $t1, 4096 sw $t1, ($t4) lui $t0, 0xb019 - bne $t3, $t0, .L000001A0 + bne $t3, $t0, .LA40001E0 nop lui $t0, 0x800 add $t8, $t8, $t0 @@ -114,12 +123,12 @@ add $s4, $s4, $t0 sll $s2, $s2, 1 addi $s2, $s2, 1 - b .L000001A8 + b .LA40001E8 nop -.L000001A0: +.LA40001E0: lui $t0, 0x10 add $s4, $s4, $t0 -.L000001A8: +.LA40001E8: li $t0, 8192 sw $t0, ($t4) lw $t1, 0x24($t7) @@ -128,47 +137,47 @@ sw $t0, ($t4) andi $t1, $t1, 0xffff li $t0, 1280 - bne $t1, $t0, .L000001F0 + bne $t1, $t0, .LA4000230 nop lui $k1, 0x100 and $k0, $k0, $k1 - bnez $k0, .L000001F0 + bnez $k0, .LA4000230 nop - lui $t0, (0x101C0A04 >> 16) # lui $t0, 0x101c - ori $t0, (0x101C0A04 & 0xFFFF) # ori $t0, $t0, 0xa04 + lui $t0, (0x101C0A04 >> 16) + ori $t0, (0x101C0A04 & 0xFFFF) sw $t0, 0x18($t7) - b .L000001FC -.L000001F0: - lui $t0, (0x080C1204 >> 16) # lui $t0, 0x80c - ori $t0, (0x080C1204 & 0xFFFF) # ori $t0, $t0, 0x1204 + b .LA400023C +.LA4000230: + lui $t0, (0x080C1204 >> 16) + ori $t0, (0x080C1204 & 0xFFFF) sw $t0, 0x18($t7) -.L000001FC: +.LA400023C: lui $t0, 0x800 add $t6, $t6, $t0 add $t7, $t7, $s0 add $t7, $t7, $s0 addiu $t5, $t5, 1 sltiu $t0, $t5, 8 - bnez $t0, .L00000128 + bnez $t0, .LA4000168 nop -.L0000021C: +.LA400025C: li $t0, 0xc4000000 sw $t0, 0xc($t2) li $t0, 0x80000000 sw $t0, 0x4($t2) move $sp, $fp move $v1, $zero -.L00000234: +.LA4000274: lw $t1, 4($sp) lui $t0, 0xb009 - bne $t1, $t0, .L00000298 + bne $t1, $t0, .LA40002D8 nop sw $t8, 4($s1) addiu $s5, $t9, 0xc lw $a0, ($sp) addi $sp, $sp, 8 li $a1, 1 - jal func_04000A40 + jal func_A4000A40 nop lw $t0, ($s6) lui $t0, 8 @@ -183,14 +192,14 @@ add $t9, $t9, $s0 lui $t0, 0x10 add $s6, $s6, $t0 - b .L0000031C -.L00000298: + b .LA400035C +.LA40002D8: sw $s7, 4($s1) addiu $s5, $a2, 0xc lw $a0, ($sp) addi $sp, $sp, 8 li $a1, 1 - jal func_04000A40 + jal func_A4000A40 nop lw $t0, ($a3) lui $t0, 8 @@ -218,22 +227,22 @@ add $a2, $a2, $s0 lui $t0, 0x20 add $a3, $a3, $t0 -.L0000031C: +.LA400035C: addiu $v1, $v1, 1 slt $t0, $v1, $t5 - bnez $t0, .L00000234 + bnez $t0, .LA4000274 nop - lui $t2, %hi(D_A4700010) # $t2, 0xa470 + lui $t2, %hi(RI_REFRESH_REG) sll $s2, $s2, 0x13 - lui $t1, (0x00063634 >> 16) # lui $t1, 6 - ori $t1, (0x00063634 & 0xFFFF) # ori $t1, $t1, 0x3634 + lui $t1, (0x00063634 >> 16) + ori $t1, (0x00063634 & 0xFFFF) or $t1, $t1, $s2 - sw $t1, %lo(D_A4700010)($t2) - lw $t1, %lo(D_A4700010)($t2) - lui $t0, (0xA0000300 >> 16) # $t0, 0xa000 - ori $t0, (0xA0000300 & 0xFFFF) # ori $t0, $t0, 0x300 - lui $t1, (0x0FFFFFFF >> 16) # lui $t1, 0xfff - ori $t1, (0x0FFFFFFF & 0xFFFF) # ori $t1, $t1, 0xffff + sw $t1, %lo(RI_REFRESH_REG)($t2) + lw $t1, %lo(RI_REFRESH_REG)($t2) + lui $t0, (0xA0000300 >> 16) + ori $t0, (0xA0000300 & 0xFFFF) + lui $t1, (0x0FFFFFFF >> 16) + ori $t1, (0x0FFFFFFF & 0xFFFF) and $s6, $s6, $t1 sw $s6, 0x18($t0) move $sp, $fp @@ -244,101 +253,101 @@ lw $s6, 0xc($sp) lw $s7, 0x10($sp) addiu $sp, $sp, 0x18 - lui $t0, %hi(D_80000000) - addiu $t0, $t0, %lo(D_80000000) + lui $t0, %hi(EXCEPTION_TLB_MISS) + addiu $t0, $t0, %lo(EXCEPTION_TLB_MISS) addiu $t1, $t0, 0x4000 addiu $t1, $t1, -0x20 mtc0 $zero, $28 mtc0 $zero, $29 -.L00000398: +.LA40003D8: cache 8, ($t0) sltu $at, $t0, $t1 - bnez $at, .L00000398 + bnez $at, .LA40003D8 addiu $t0, $t0, 0x20 - lui $t0, %hi(D_80000000) - addiu $t0, %lo(D_80000000) + lui $t0, %hi(EXCEPTION_TLB_MISS) + addiu $t0, %lo(EXCEPTION_TLB_MISS) addiu $t1, $t0, 0x2000 addiu $t1, $t1, -0x10 -.L000003B8: +.LA40003F8: cache 9, ($t0) sltu $at, $t0, $t1 - bnez $at, .L000003B8 + bnez $at, .LA40003F8 addiu $t0, $t0, 0x10 - b .L00000418 + b .LA4000458 nop -.L000003D0: - lui $t0, %hi(D_80000000) - addiu $t0, %lo(D_80000000) +.LA4000410: + lui $t0, %hi(EXCEPTION_TLB_MISS) + addiu $t0, %lo(EXCEPTION_TLB_MISS) addiu $t1, $t0, 0x4000 addiu $t1, $t1, -0x20 mtc0 $zero, $28 mtc0 $zero, $29 -.L000003E8: +.LA4000428: cache 8, ($t0) sltu $at, $t0, $t1 - bnez $at, .L000003E8 + bnez $at, .LA4000428 addiu $t0, $t0, 0x20 - lui $t0, %hi(D_80000000) - addiu $t0, %lo(D_80000000) + lui $t0, %hi(EXCEPTION_TLB_MISS) + addiu $t0, %lo(EXCEPTION_TLB_MISS) addiu $t1, $t0, 0x2000 addiu $t1, $t1, -0x10 -.L00000408: +.LA4000448: cache 1, ($t0) sltu $at, $t0, $t1 - bnez $at, .L00000408 + bnez $at, .LA4000448 addiu $t0, $t0, 0x10 -.L00000418: - lui $t2, %hi(D_A4000000) - addiu $t2, $t2, %lo(D_A4000000) +.LA4000458: + lui $t2, %hi(SP_DMEM) + addiu $t2, $t2, %lo(SP_DMEM) lui $t3, 0xfff0 - lui $t1, 0x0010 # $t1, 0x10 + lui $t1, 0x0010 and $t2, $t2, $t3 - lui $t0, %hi(D_A40004C0) # $t0, 0xa400 - addiu $t1, -1 # addiu $t1, $t1, -1 - lui $t3, %hi(D_A4000774) # $t3, 0xa400 - addiu $t0, %lo(D_A40004C0) # addiu $t0, $t0, 0x4c0 - addiu $t3, %lo(D_A4000774) # addiu $t3, $t3, 0x774 + lui $t0, %hi(SP_DMEM_UNK0) + addiu $t1, -1 + lui $t3, %hi(SP_DMEM_UNK1) + addiu $t0, %lo(SP_DMEM_UNK0) + addiu $t3, %lo(SP_DMEM_UNK1) and $t0, $t0, $t1 and $t3, $t3, $t1 lui $t1, 0xa000 or $t0, $t0, $t2 or $t3, $t3, $t2 addiu $t1, $t1, 0 -.L00000458: +.LA4000498: lw $t5, ($t0) addiu $t0, $t0, 4 sltu $at, $t0, $t3 addiu $t1, $t1, 4 - bnez $at, .L00000458 + bnez $at, .LA4000498 sw $t5, -4($t1) - lui $t4, %hi(D_80000000) - addiu $t4, %lo(D_80000000) + lui $t4, %hi(EXCEPTION_TLB_MISS) + addiu $t4, %lo(EXCEPTION_TLB_MISS) jr $t4 nop - lui $t3, %hi(D_B0000008) # $t3, 0xb000 + lui $t3, %hi(D_B0000008) lw $t1, %lo(D_B0000008)($t3) - lui $t2, (0x1FFFFFFF >> 16) # lui $t2, 0x1fff - ori $t2, (0x1FFFFFFF & 0xFFFF) # ori $t2, $t2, 0xffff - lui $at, %hi(D_A4600000) + lui $t2, (0x1FFFFFFF >> 16) + ori $t2, (0x1FFFFFFF & 0xFFFF) + lui $at, %hi(PI_DRAM_ADDR_REG) and $t1, $t1, $t2 - sw $t1, %lo(D_A4600000)($at) - lui $t0, %hi(D_A4600010) # $t0, 0xa460 -.L000004A0: - lw $t0, %lo(D_A4600010)($t0) + sw $t1, %lo(PI_DRAM_ADDR_REG)($at) + lui $t0, %hi(PI_STATUS_REG) +.LA40004D0: + lw $t0, %lo(PI_STATUS_REG)($t0) andi $t0, $t0, 2 - bnezl $t0, .L000004A0 - lui $t0, %hi(D_A4600010) + bnezl $t0, .LA40004D0 + lui $t0, %hi(PI_STATUS_REG) li $t0, 0x1000 add $t0, $t0, $t3 and $t0, $t0, $t2 - lui $at, %hi(D_A4600004) # $at, 0xa460 - sw $t0, %lo(D_A4600004)($at) - lui $t2, 0x0010 # $t2, 0x10 - addiu $t2, 0xFFFF # addiu $t2, $t2, -1 - lui $at, %hi(D_A460000C) # $at, 0xa460 - sw $t2, %lo(D_A460000C)($at) + lui $at, %hi(PI_CART_ADDR_REG) + sw $t0, %lo(PI_CART_ADDR_REG)($at) + lui $t2, 0x0010 + addiu $t2, 0xFFFF + lui $at, %hi(PI_WR_LEN_REG) + sw $t2, %lo(PI_WR_LEN_REG)($at) -.L000004D4: +.LA4000514: nop nop nop @@ -367,16 +376,16 @@ nop nop nop - lui $t3, %hi(D_A4600010) # $t3, 0xa460 - lw $t3, %lo(D_A4600010)($t3) - andi $t3, $t3, 1 - bnez $t3, .L000004D4 + lui $t3, %hi(PI_STATUS_REG) + lw $t3, %lo(PI_STATUS_REG)($t3) + andi $t3, $t3, 0x1 + bnez $t3, .LA4000514 nop - lui $t3, %hi(D_B0000008) # $t3, 0xb000 + lui $t3, %hi(D_B0000008) lw $a0, %lo(D_B0000008)($t3) move $a1, $s6 - lui $at, (0x5D588B65 >> 16) # lui $at, 0x5d58 - ori $at, (0x5D588B65 & 0xFFFF) # ori $at, $at, 0x8b65 + lui $at, (0x5D588B65 >> 16) + ori $at, (0x5D588B65 & 0xFFFF) multu $a1, $at addiu $sp, $sp, -0x20 sw $ra, 0x1c($sp) @@ -394,14 +403,14 @@ move $s0, $v0 move $a2, $v0 move $t4, $v0 -.L000005B0: +.LA40005F0: lw $v0, ($t1) addu $v1, $a3, $v0 sltu $at, $v1, $a3 - beqz $at, .L000005C8 + beqz $at, .LA4000608 move $a1, $v1 addiu $t2, $t2, 1 -.L000005C8: +.LA4000608: andi $v1, $v0, 0x1f subu $t7, $t5, $v1 srlv $t8, $v0, $t7 @@ -410,104 +419,103 @@ sltu $at, $a2, $v0 move $a3, $a1 xor $t3, $t3, $v0 - beqz $at, .L000005FC + beqz $at, .LA400063C addu $s0, $s0, $a0 xor $t9, $a3, $v0 - b .L00000600 + b .LA4000640 xor $a2, $t9, $a2 -.L000005FC: +.LA400063C: xor $a2, $a2, $a0 -.L00000600: +.LA4000640: addiu $t0, $t0, 4 xor $t7, $v0, $s0 addiu $t1, $t1, 4 - bne $t0, $ra, .L000005B0 + bne $t0, $ra, .LA40005F0 addu $t4, $t7, $t4 xor $t6, $a3, $t2 xor $a3, $t6, $t3 xor $t8, $s0, $a2 xor $s0, $t8, $t4 - lui $t3, %hi(D_B0000010) # $t3, 0xb000 + lui $t3, %hi(D_B0000010) lw $t0, %lo(D_B0000010)($t3) - bne $a3, $t0, .L00000648 + bne $a3, $t0, halt nop lw $t0, %lo(D_B0000014)($t3) - bne $s0, $t0, .L00000648 + bne $s0, $t0, halt nop - bal func_00000650 + bal func_A4000690 nop -func_00000648: -.L00000648: - bal func_00000648 +halt: + bal halt nop -func_00000650: - lui $t1, %hi(D_A4080000) - lw $t1, %lo(D_A4080000)($t1) +func_A4000690: + lui $t1, %hi(SP_PC) + lw $t1, %lo(SP_PC)($t1) lw $s0, 0x14($sp) lw $ra, 0x1c($sp) - beqz $t1, .L0000067C + beqz $t1, .LA40006BC addiu $sp, $sp, 0x20 li $t2, 65 - lui $at, %hi(D_A4040010) # $at, 0xa404 - sw $t2, %lo(D_A4040010)($at) - lui $at, %hi(D_A4080000) - sw $zero, %lo(D_A4080000)($at) -.L0000067C: - lui $t3, (0x00AAAAAE >> 16) # lui $t3, 0xaa - ori $t3, (0x00AAAAAE & 0xFFFF) # ori $t3, $t3, 0xaaae - lui $at, %hi(D_A4040010) # $at, 0xa404 - sw $t3, %lo(D_A4040010)($at) - lui $at, %hi(D_A430000C) # $at, 0xa430 + lui $at, %hi(SP_STATUS_REG) + sw $t2, %lo(SP_STATUS_REG)($at) + lui $at, %hi(SP_PC) + sw $zero, %lo(SP_PC)($at) +.LA40006BC: + lui $t3, (0x00AAAAAE >> 16) + ori $t3, (0x00AAAAAE & 0xFFFF) + lui $at, %hi(SP_STATUS_REG) + sw $t3, %lo(SP_STATUS_REG)($at) + lui $at, %hi(MI_INTR_MASK_REG) li $t0, 1365 - sw $t0, %lo(D_A430000C)($at) - lui $at, %hi(D_A4800018) # $at, 0xa480 - sw $zero, %lo(D_A4800018)($at) - lui $at, %hi(D_A450000C) # $at, 0xa450 - sw $zero, %lo(D_A450000C)($at) - lui $at, %hi(D_A4300000) + sw $t0, %lo(MI_INTR_MASK_REG)($at) + lui $at, %hi(SI_STATUS_REG) + sw $zero, %lo(SI_STATUS_REG)($at) + lui $at, %hi(AI_STATUS_REG) + sw $zero, %lo(AI_STATUS_REG)($at) + lui $at, %hi(MI_MODE_REG) li $t1, 2048 - sw $t1, %lo(D_A4300000)($at) + sw $t1, %lo(MI_MODE_REG)($at) li $t1, 2 - lui $at, %hi(D_A4600010) # $at, 0xa460 - lui $t0, (0xA0000300 >> 16) # $t0, 0xa000 - ori $t0, (0xA0000300 & 0xFFFF) # ori $t0, $t0, 0x300 - sw $t1, %lo(D_A4600010)($at) + lui $at, %hi(PI_STATUS_REG) + lui $t0, (0xA0000300 >> 16) + ori $t0, (0xA0000300 & 0xFFFF) + sw $t1, %lo(PI_STATUS_REG)($at) sw $s7, 0x14($t0) sw $s5, 0xc($t0) sw $s3, 0x4($t0) - beqz $s3, .L000006E8 + beqz $s3, .LA4000728 sw $s4, ($t0) lui $t1, 0xa600 - b .L000006F0 + b .LA4000730 addiu $t1, $t1, 0 -.L000006E8: +.LA4000728: lui $t1, 0xb000 addiu $t1, $t1, 0 -.L000006F0: +.LA4000730: sw $t1, 0x8($t0) - lui $t0, %hi(D_A4000000) - addiu $t0, %lo(D_A4000000) + lui $t0, %hi(SP_DMEM) + addiu $t0, %lo(SP_DMEM) addi $t1, $t0, 0x1000 -.L00000700: +.LA4000740: addiu $t0, $t0, 4 - bne $t0, $t1, .L00000700 + bne $t0, $t1, .LA4000740 sw $zero, -4($t0) - lui $t0, %hi(D_A4001000) # $t0, 0xa400 - addiu $t0, %lo(D_A4001000) # addiu $t0, $t0, 0x1000 + lui $t0, %hi(SP_IMEM) + addiu $t0, %lo(SP_IMEM) addi $t1, $t0, 0x1000 -.L00000718: +.LA4000758: addiu $t0, $t0, 4 - bne $t0, $t1, .L00000718 + bne $t0, $t1, .LA4000758 sw $zero, -4($t0) - lui $t3, %hi(D_B0000008) # $t3, 0xb000 + lui $t3, %hi(D_B0000008) lw $t1, %lo(D_B0000008)($t3) jr $t1 nop nop -func_04000778: +func_A4000778: addiu $sp, $sp, -0xa0 sw $s0, 0x40($sp) sw $s1, 0x44($sp) @@ -537,15 +545,15 @@ func_04000778: sw $s7, 0x5c($sp) sw $fp, 0x60($sp) sw $ra, 0x64($sp) -.L000007AC: - jal func_04000880 +.LA40007EC: + jal func_A4000880 nop addiu $s0, $s0, 1 slti $t1, $s0, 4 - bnez $t1, .L000007AC + bnez $t1, .LA40007EC addu $s1, $s1, $v0 srl $a0, $s1, 2 - jal func_04000A40 + jal func_A4000A40 li $a1, 1 lw $ra, 0x64($sp) srl $v0, $s1, 2 @@ -576,19 +584,19 @@ func_04000778: jr $ra addiu $sp, $sp, 0xa0 -func_04000880: +func_A4000880: addiu $sp, $sp, -0x20 sw $ra, 0x1c($sp) move $t1, $zero move $t3, $zero move $t4, $zero -.L00000854: +.LA4000894: slti $k0, $t4, 0x40 - beql $k0, $zero, .L000008BC + beql $k0, $zero, .LA40008FC move $v0, $zero - jal func_0400090C + jal func_A400090C move $a0, $t4 - blezl $v0, .L0000088C + blezl $v0, .LA40008CC slti $k0, $t1, 0x50 subu $k0, $v0, $t1 multu $k0, $t4 @@ -597,61 +605,61 @@ func_04000880: addu $t3, $t3, $k0 nop slti $k0, $t1, 0x50 -.L0000088C: - bnez $k0, .L00000854 +.LA40008CC: + bnez $k0, .LA4000894 addiu $t4, $t4, 1 sll $a0, $t3, 2 subu $a0, $a0, $t3 sll $a0, $a0, 2 subu $a0, $a0, $t3 sll $a0, $a0, 1 - jal func_04000980 - addiu $a0, $a0, -0x370 # compute (t3 - 40) * 22 - b .L000008C0 + jal func_A4000980 + addiu $a0, $a0, -0x370 + b .LA4000900 lw $ra, 0x1c($sp) move $v0, $zero -.L000008BC: +.LA40008FC: lw $ra, 0x1c($sp) -.L000008C0: +.LA4000900: addiu $sp, $sp, 0x20 jr $ra nop -func_0400090C: +func_A400090C: addiu $sp, $sp, -0x28 sw $ra, 0x1c($sp) move $v0, $zero - jal func_04000A40 + jal func_A4000A40 li $a1, 2 move $fp, $zero li $k0, -1 -.L000008E8: +.LA4000928: sw $k0, 4($s4) lw $v1, 4($s4) sw $k0, ($s4) sw $k0, ($s4) move $gp, $zero srl $v1, $v1, 0x10 -.L00000900: +.LA4000940: andi $k0, $v1, 1 - beql $k0, $zero, .L00000914 + beql $k0, $zero, .LA4000954 addiu $gp, $gp, 1 addiu $v0, $v0, 1 addiu $gp, $gp, 1 -.L00000914: +.LA4000954: slti $k0, $gp, 8 - bnez $k0, .L00000900 + bnez $k0, .LA4000940 srl $v1, $v1, 1 addiu $fp, $fp, 1 slti $k0, $fp, 0xa - bnezl $k0, .L000008E8 + bnezl $k0, .LA4000928 li $k0, -1 lw $ra, 0x1c($sp) addiu $sp, $sp, 0x28 jr $ra nop -func_04000980: +func_A4000980: addiu $sp, $sp, -0x28 sw $ra, 0x1c($sp) sw $a0, 0x20($sp) @@ -661,18 +669,18 @@ func_04000980: li $t5, 51200 move $t6, $zero slti $k0, $t6, 0x40 -.L00000964: - bnezl $k0, .L00000978 +.LA40009A4: + bnezl $k0, .LA40009B8 move $a0, $t6 - b .L000009F0 + b .LA4000A30 move $v0, $zero move $a0, $t6 -.L00000978: - jal func_04000A40 +.LA40009B8: + jal func_A4000A40 li $a1, 1 - jal func_04000AD0 + jal func_A4000AD0 addiu $a0, $sp, 0x27 - jal func_04000AD0 + jal func_A4000AD0 addiu $a0, $sp, 0x27 lbu $k0, 0x27($sp) li $k1, 800 @@ -680,44 +688,44 @@ func_04000980: multu $k0, $k1 mflo $t0 subu $k0, $t0, $a0 - bgezl $k0, .L000009B8 + bgezl $k0, .LA40009F8 slt $k1, $k0, $t5 subu $k0, $a0, $t0 slt $k1, $k0, $t5 -.L000009B8: - beql $k1, $zero, .L000009CC +.LA40009F8: + beql $k1, $zero, .LA4000A0C lw $a0, 0x20($sp) move $t5, $k0 move $t2, $t6 lw $a0, 0x20($sp) -.L000009CC: +.LA4000A0C: slt $k1, $t0, $a0 - beql $k1, $zero, .L000009EC + beql $k1, $zero, .LA4000A2C addu $v0, $t2, $t6 addiu $t6, $t6, 1 slti $k1, $t6, 0x41 - bnezl $k1, .L00000964 + bnezl $k1, .LA40009A4 slti $k0, $t6, 0x40 addu $v0, $t2, $t6 -.L000009EC: +.LA4000A2C: srl $v0, $v0, 1 -.L000009F0: +.LA4000A30: lw $ra, 0x1c($sp) addiu $sp, $sp, 0x28 jr $ra nop -func_04000A40: +func_A4000A40: addiu $sp, $sp, -0x28 andi $a0, $a0, 0xff li $k1, 1 xori $a0, $a0, 0x3f sw $ra, 0x1c($sp) - bne $a1, $k1, .L00000A24 + bne $a1, $k1, .LA4000A64 lui $t7, 0x4600 lui $k0, 0x8000 or $t7, $t7, $k0 -.L00000A24: +.LA4000A64: andi $k0, $a0, 1 sll $k0, $k0, 6 or $t7, $t7, $k0 @@ -737,26 +745,26 @@ func_04000A40: sll $k0, $k0, 0x12 or $t7, $t7, $k0 li $k1, 1 - bne $a1, $k1, .L00000A80 + bne $a1, $k1, .LA4000AC0 sw $t7, ($s5) - lui $k0, %hi(D_A4300000) - sw $zero, %lo(D_A4300000)($k0) -.L00000A80: + lui $k0, %hi(MI_MODE_REG) + sw $zero, %lo(MI_MODE_REG)($k0) +.LA4000AC0: lw $ra, 0x1c($sp) addiu $sp, $sp, 0x28 jr $ra nop -func_04000AD0: +func_A4000AD0: addiu $sp, $sp, -0x28 sw $ra, 0x1c($sp) li $k0, 0x2000 - lui $k1, %hi(D_A4300000) - sw $k0, %lo(D_A4300000)($k1) + lui $k1, %hi(MI_MODE_REG) + sw $k0, %lo(MI_MODE_REG)($k1) move $fp, $zero lw $fp, ($s5) li $k0, 0x1000 - sw $k0, %lo(D_A4300000)($k1) + sw $k0, %lo(MI_MODE_REG)($k1) li $k1, 0x40 and $k1, $k1, $fp srl $k1, $k1, 6 @@ -789,4 +797,6 @@ func_04000AD0: nop nop +# 0xA4000B70-0xA4000FFF: IPL3 Font +glabel ipl3_font .incbin "lib/bin/ipl3_font.bin" diff --git a/asm/decompress.s b/asm/decompress.s index cdf5d60c..1399179d 100644 --- a/asm/decompress.s +++ b/asm/decompress.s @@ -11,7 +11,51 @@ # This file is handwritten. glabel decompress -.ifdef VERSION_EU +.if VERSION_SH == 1 + lw $a3, 8($a0) + lw $t9, 0xc($a0) + lw $t8, 4($a0) + add $a3, $a3, $a0 + add $t9, $t9, $a0 + move $a2, $zero + addi $a0, $a0, 0x10 + add $t8, $t8, $a1 +.L802772C0: + bnel $a2, $zero, .L802772D8 + slt $t1, $t0, $zero + lw $t0, ($a0) + li $a2, 32 + addi $a0, $a0, 4 + slt $t1, $t0, $zero +.L802772D8: + beql $t1, $zero, .L802772F8 + lhu $t2, ($a3) + lb $t2, ($t9) + addi $t9, $t9, 1 + addi $a1, $a1, 1 + b .L80277324 + sb $t2, -1($a1) + lhu $t2, ($a3) +.L802772F8: + addi $a3, $a3, 2 + srl $t3, $t2, 0xc + andi $t2, $t2, 0xfff + sub $t1, $a1, $t2 + addi $t3, $t3, 3 +.L8027730C: + lb $t2, -1($t1) + addi $t3, $t3, -1 + addi $t1, $t1, 1 + addi $a1, $a1, 1 + bnez $t3, .L8027730C + sb $t2, -1($a1) +.L80277324: + sll $t0, $t0, 1 + bne $a1, $t8, .L802772C0 + addi $a2, $a2, -1 + jr $ra + nop +.elseif VERSION_EU == 1 lw $a3, 8($a0) lw $t9, 0xc($a0) lw $t8, 4($a0) diff --git a/asm/non_matchings/eu/audio/synthesis_process_note.s b/asm/non_matchings/eu/audio/synthesis_process_note.s deleted file mode 100644 index 11415a3f..00000000 --- a/asm/non_matchings/eu/audio/synthesis_process_note.s +++ /dev/null @@ -1,657 +0,0 @@ -glabel synthesis_process_note -/* 09FEF0 802E06F0 27BDFEB8 */ addiu $sp, $sp, -0x148 -/* 09FEF4 802E06F4 AFBF004C */ sw $ra, 0x4c($sp) -/* 09FEF8 802E06F8 AFBE0048 */ sw $fp, 0x48($sp) -/* 09FEFC 802E06FC AFB70044 */ sw $s7, 0x44($sp) -/* 09FF00 802E0700 AFB60040 */ sw $s6, 0x40($sp) -/* 09FF04 802E0704 AFB5003C */ sw $s5, 0x3c($sp) -/* 09FF08 802E0708 AFB40038 */ sw $s4, 0x38($sp) -/* 09FF0C 802E070C AFB30034 */ sw $s3, 0x34($sp) -/* 09FF10 802E0710 AFB20030 */ sw $s2, 0x30($sp) -/* 09FF14 802E0714 AFB1002C */ sw $s1, 0x2c($sp) -/* 09FF18 802E0718 AFB00028 */ sw $s0, 0x28($sp) -/* 09FF1C 802E071C AFA40148 */ sw $a0, 0x148($sp) -/* 09FF20 802E0720 AFA70154 */ sw $a3, 0x154($sp) -/* 09FF24 802E0724 AFA00130 */ sw $zero, 0x130($sp) -/* 09FF28 802E0728 8C8F00B0 */ lw $t7, 0xb0($a0) -/* 09FF2C 802E072C 00A08825 */ move $s1, $a1 -/* 09FF30 802E0730 00C0B825 */ move $s7, $a2 -/* 09FF34 802E0734 000FC7C2 */ srl $t8, $t7, 0x1f -/* 09FF38 802E0738 57000004 */ bnezl $t8, .L802010FC -/* 09FF3C 802E073C 8E390000 */ lw $t9, ($s1) -/* 09FF40 802E0740 1000023E */ b .L802019EC -/* 09FF44 802E0744 8FA2015C */ lw $v0, 0x15c($sp) -/* 09FF48 802E0748 8E390000 */ lw $t9, ($s1) -.L802010FC: -/* 09FF4C 802E074C 24130001 */ li $s3, 1 -/* 09FF50 802E0750 00001825 */ move $v1, $zero -/* 09FF54 802E0754 00197040 */ sll $t6, $t9, 1 -/* 09FF58 802E0758 000E7FC2 */ srl $t7, $t6, 0x1f -/* 09FF5C 802E075C 166F0009 */ bne $s3, $t7, .L80201134 -/* 09FF60 802E0760 02202825 */ move $a1, $s1 -/* 09FF64 802E0764 02601825 */ move $v1, $s3 -/* 09FF68 802E0768 A2E00000 */ sb $zero, ($s7) -/* 09FF6C 802E076C AEE00008 */ sw $zero, 8($s7) -/* 09FF70 802E0770 A6E00004 */ sh $zero, 4($s7) -/* 09FF74 802E0774 A6F30010 */ sh $s3, 0x10($s7) -/* 09FF78 802E0778 A6F30012 */ sh $s3, 0x12($s7) -/* 09FF7C 802E077C A2E00002 */ sb $zero, 2($s7) -/* 09FF80 802E0780 A2E00003 */ sb $zero, 3($s7) -.L80201134: -/* 09FF84 802E0784 9638000A */ lhu $t8, 0xa($s1) -/* 09FF88 802E0788 02E03025 */ move $a2, $s7 -/* 09FF8C 802E078C A7B8011A */ sh $t8, 0x11a($sp) -/* 09FF90 802E0790 96390000 */ lhu $t9, ($s1) -/* 09FF94 802E0794 3318FFFF */ andi $t8, $t8, 0xffff -/* 09FF98 802E0798 332E0001 */ andi $t6, $t9, 1 -/* 09FF9C 802E079C 8FB90158 */ lw $t9, 0x158($sp) -/* 09FFA0 802E07A0 25CF0001 */ addiu $t7, $t6, 1 -/* 09FFA4 802E07A4 AFAF00BC */ sw $t7, 0xbc($sp) -/* 09FFA8 802E07A8 03190019 */ multu $t8, $t9 -/* 09FFAC 802E07AC 96F80004 */ lhu $t8, 4($s7) -/* 09FFB0 802E07B0 00007012 */ mflo $t6 -/* 09FFB4 802E07B4 000E7840 */ sll $t7, $t6, 1 -/* 09FFB8 802E07B8 01F81021 */ addu $v0, $t7, $t8 -/* 09FFBC 802E07BC A6E20004 */ sh $v0, 4($s7) -/* 09FFC0 802E07C0 8E270000 */ lw $a3, ($s1) -/* 09FFC4 802E07C4 8FA4015C */ lw $a0, 0x15c($sp) -/* 09FFC8 802E07C8 00028402 */ srl $s0, $v0, 0x10 -/* 09FFCC 802E07CC 00077B80 */ sll $t7, $a3, 0xe -/* 09FFD0 802E07D0 05E3000D */ bgezl $t7, .L802011B8 -/* 09FFD4 802E07D4 8E2F000C */ lw $t7, 0xc($s1) -/* 09FFD8 802E07D8 0C0B841B */ jal load_wave_samples -/* 09FFDC 802E07DC 02003825 */ move $a3, $s0 -/* 09FFE0 802E07E0 8EE60008 */ lw $a2, 8($s7) -/* 09FFE4 802E07E4 0006C040 */ sll $t8, $a2, 1 -/* 09FFE8 802E07E8 27190180 */ addiu $t9, $t8, 0x180 -/* 09FFEC 802E07EC A7B900AA */ sh $t9, 0xaa($sp) -/* 09FFF0 802E07F0 00D07021 */ addu $t6, $a2, $s0 -/* 09FFF4 802E07F4 AEEE0008 */ sw $t6, 8($s7) -/* 09FFF8 802E07F8 8E270000 */ lw $a3, ($s1) -/* 09FFFC 802E07FC 100001D4 */ b .L80201900 -/* 0A0000 802E0800 AFA2015C */ sw $v0, 0x15c($sp) -/* 0A0004 802E0804 8E2F000C */ lw $t7, 0xc($s1) -.L802011B8: -/* 0A0008 802E0808 241F0009 */ li $ra, 9 -/* 0A000C 802E080C 3C0D8000 */ lui $t5, 0x8000 -/* 0A0010 802E0810 8DF80000 */ lw $t8, ($t7) -/* 0A0014 802E0814 AFB80138 */ sw $t8, 0x138($sp) -/* 0A0018 802E0818 8F0E0008 */ lw $t6, 8($t8) -/* 0A001C 802E081C AFAE0134 */ sw $t6, 0x134($sp) -/* 0A0020 802E0820 8DCF0004 */ lw $t7, 4($t6) -/* 0A0024 802E0824 8FAE00BC */ lw $t6, 0xbc($sp) -/* 0A0028 802E0828 AFAF00E4 */ sw $t7, 0xe4($sp) -/* 0A002C 802E082C 8F180004 */ lw $t8, 4($t8) -/* 0A0030 802E0830 AFA000AC */ sw $zero, 0xac($sp) -/* 0A0034 802E0834 AFA000B8 */ sw $zero, 0xb8($sp) -/* 0A0038 802E0838 19C001C5 */ blez $t6, .L80201900 -/* 0A003C 802E083C AFB800F4 */ sw $t8, 0xf4($sp) -/* 0A0040 802E0840 00027C02 */ srl $t7, $v0, 0x10 -/* 0A0044 802E0844 AFAF0050 */ sw $t7, 0x50($sp) -/* 0A0048 802E0848 AFA3011C */ sw $v1, 0x11c($sp) -/* 0A004C 802E084C AFB1014C */ sw $s1, 0x14c($sp) -/* 0A0050 802E0850 8FB2015C */ lw $s2, 0x15c($sp) -.L80201204: -/* 0A0054 802E0854 8FB90138 */ lw $t9, 0x138($sp) -/* 0A0058 802E0858 8FB800BC */ lw $t8, 0xbc($sp) -/* 0A005C 802E085C 24010001 */ li $at, 1 -/* 0A0060 802E0860 8F24000C */ lw $a0, 0xc($t9) -/* 0A0064 802E0864 0000F025 */ move $fp, $zero -/* 0A0068 802E0868 0000A025 */ move $s4, $zero -/* 0A006C 802E086C 17010003 */ bne $t8, $at, .L8020122C -/* 0A0070 802E0870 24850008 */ addiu $a1, $a0, 8 -/* 0A0074 802E0874 1000000B */ b .L80201254 -/* 0A0078 802E0878 8FAC0050 */ lw $t4, 0x50($sp) -.L8020122C: -/* 0A007C 802E087C 8FAE0050 */ lw $t6, 0x50($sp) -/* 0A0080 802E0880 8FB800B8 */ lw $t8, 0xb8($sp) -/* 0A0084 802E0884 8FAC0050 */ lw $t4, 0x50($sp) -/* 0A0088 802E0888 31CF0001 */ andi $t7, $t6, 1 -/* 0A008C 802E088C 11E00005 */ beqz $t7, .L80201254 -/* 0A0090 802E0890 2401FFFE */ li $at, -2 -/* 0A0094 802E0894 01C1C824 */ and $t9, $t6, $at -/* 0A0098 802E0898 00187840 */ sll $t7, $t8, 1 -/* 0A009C 802E089C 10000001 */ b .L80201254 -/* 0A00A0 802E08A0 032F6021 */ addu $t4, $t9, $t7 -.L80201254: -/* 0A00A4 802E08A4 8FAE0130 */ lw $t6, 0x130($sp) -/* 0A00A8 802E08A8 51C5001A */ beql $t6, $a1, .L802012C4 -/* 0A00AC 802E08AC 0007C2C0 */ sll $t8, $a3, 0xb -/* 0A00B0 802E08B0 AFA50130 */ sw $a1, 0x130($sp) -/* 0A00B4 802E08B4 8C980000 */ lw $t8, ($a0) -/* 0A00B8 802E08B8 8C8F0004 */ lw $t7, 4($a0) -/* 0A00BC 802E08BC 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* 0A00C0 802E08C0 0018C900 */ sll $t9, $t8, 4 -/* 0A00C4 802E08C4 032F0019 */ multu $t9, $t7 -/* 0A00C8 802E08C8 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0A00CC 802E08CC 8FA6014C */ lw $a2, 0x14c($sp) -/* 0A00D0 802E08D0 02401025 */ move $v0, $s2 -/* 0A00D4 802E08D4 26520008 */ addiu $s2, $s2, 8 -/* 0A00D8 802E08D8 00001812 */ mflo $v1 -/* 0A00DC 802E08DC 00617024 */ and $t6, $v1, $at -/* 0A00E0 802E08E0 3C010B00 */ lui $at, 0xb00 -/* 0A00E4 802E08E4 01C1C025 */ or $t8, $t6, $at -/* 0A00E8 802E08E8 AC580000 */ sw $t8, ($v0) -/* 0A00EC 802E08EC 8CD90000 */ lw $t9, ($a2) -/* 0A00F0 802E08F0 00197AC0 */ sll $t7, $t9, 0xb -/* 0A00F4 802E08F4 8FB90130 */ lw $t9, 0x130($sp) -/* 0A00F8 802E08F8 000F7742 */ srl $t6, $t7, 0x1d -/* 0A00FC 802E08FC 000EC040 */ sll $t8, $t6, 1 -/* 0A0100 802E0900 03197821 */ addu $t7, $t8, $t9 -/* 0A0104 802E0904 01ED7021 */ addu $t6, $t7, $t5 -/* 0A0108 802E0908 AC4E0004 */ sw $t6, 4($v0) -/* 0A010C 802E090C 8CC70000 */ lw $a3, ($a2) -/* 0A0110 802E0910 0007C2C0 */ sll $t8, $a3, 0xb -.L802012C4: -/* 0A0114 802E0914 0018CF42 */ srl $t9, $t8, 0x1d -/* 0A0118 802E0918 13200003 */ beqz $t9, .L802012D8 -/* 0A011C 802E091C 3C0F8030 */ lui $t7, %hi(euUnknownData_80301950) # $t7, 0x8030 -/* 0A0120 802E0920 25EF1970 */ addiu $t7, %lo(euUnknownData_80301950) # addiu $t7, $t7, 0x1970 -/* 0A0124 802E0924 AFAF0130 */ sw $t7, 0x130($sp) -.L802012D8: -/* 0A0128 802E0928 51800108 */ beql $t4, $zero, .L802016FC -/* 0A012C 802E092C 8FA400BC */ lw $a0, 0xbc($sp) -/* 0A0130 802E0930 8EE60008 */ lw $a2, 8($s7) -.L802012E4: -/* 0A0134 802E0934 8FAE00E4 */ lw $t6, 0xe4($sp) -/* 0A0138 802E0938 019E2023 */ subu $a0, $t4, $fp -/* 0A013C 802E093C 30D3000F */ andi $s3, $a2, 0xf -/* 0A0140 802E0940 00004825 */ move $t1, $zero -/* 0A0144 802E0944 00005025 */ move $t2, $zero -/* 0A0148 802E0948 00805825 */ move $t3, $a0 -/* 0A014C 802E094C 16600005 */ bnez $s3, .L80201314 -/* 0A0150 802E0950 01C61823 */ subu $v1, $t6, $a2 -/* 0A0154 802E0954 92F80000 */ lbu $t8, ($s7) -/* 0A0158 802E0958 57000003 */ bnezl $t8, .L80201318 -/* 0A015C 802E095C 24190010 */ li $t9, 16 -/* 0A0160 802E0960 24130010 */ li $s3, 16 -.L80201314: -/* 0A0164 802E0964 24190010 */ li $t9, 16 -.L80201318: -/* 0A0168 802E0968 03332823 */ subu $a1, $t9, $s3 -/* 0A016C 802E096C 0083082A */ slt $at, $a0, $v1 -/* 0A0170 802E0970 1020000C */ beqz $at, .L80201354 -/* 0A0174 802E0974 00A0A825 */ move $s5, $a1 -/* 0A0178 802E0978 00851023 */ subu $v0, $a0, $a1 -/* 0A017C 802E097C 2442000F */ addiu $v0, $v0, 0xf -/* 0A0180 802E0980 04410003 */ bgez $v0, .L80201340 -/* 0A0184 802E0984 00027903 */ sra $t7, $v0, 4 -/* 0A0188 802E0988 2441000F */ addiu $at, $v0, 0xf -/* 0A018C 802E098C 00017903 */ sra $t7, $at, 4 -.L80201340: -/* 0A0190 802E0990 000F8900 */ sll $s1, $t7, 4 -/* 0A0194 802E0994 00B17021 */ addu $t6, $a1, $s1 -/* 0A0198 802E0998 01E04025 */ move $t0, $t7 -/* 0A019C 802E099C 10000013 */ b .L8020139C -/* 0A01A0 802E09A0 01C4B023 */ subu $s6, $t6, $a0 -.L80201354: -/* 0A01A4 802E09A4 00658823 */ subu $s1, $v1, $a1 -/* 0A01A8 802E09A8 1E200003 */ bgtz $s1, .L80201368 -/* 0A01AC 802E09AC 0000B025 */ move $s6, $zero -/* 0A01B0 802E09B0 00008825 */ move $s1, $zero -/* 0A01B4 802E09B4 0060A825 */ move $s5, $v1 -.L80201368: -/* 0A01B8 802E09B8 8FB90134 */ lw $t9, 0x134($sp) -/* 0A01BC 802E09BC 2628000F */ addiu $t0, $s1, 0xf -/* 0A01C0 802E09C0 05010003 */ bgez $t0, .L80201380 -/* 0A01C4 802E09C4 0008C103 */ sra $t8, $t0, 4 -/* 0A01C8 802E09C8 2501000F */ addiu $at, $t0, 0xf -/* 0A01CC 802E09CC 0001C103 */ sra $t8, $at, 4 -.L80201380: -/* 0A01D0 802E09D0 8F2F0008 */ lw $t7, 8($t9) -/* 0A01D4 802E09D4 03004025 */ move $t0, $t8 -/* 0A01D8 802E09D8 51E00004 */ beql $t7, $zero, .L8020139C -/* 0A01DC 802E09DC 24090001 */ li $t1, 1 -/* 0A01E0 802E09E0 10000002 */ b .L8020139C -/* 0A01E4 802E09E4 240A0001 */ li $t2, 1 -/* 0A01E8 802E09E8 24090001 */ li $t1, 1 -.L8020139C: -/* 0A01EC 802E09EC 1100003C */ beqz $t0, .L80201490 -/* 0A01F0 802E09F0 8FB80138 */ lw $t8, 0x138($sp) -/* 0A01F4 802E09F4 00D31023 */ subu $v0, $a2, $s3 -/* 0A01F8 802E09F8 24420010 */ addiu $v0, $v0, 0x10 -/* 0A01FC 802E09FC 93190001 */ lbu $t9, 1($t8) -/* 0A0200 802E0A00 04410003 */ bgez $v0, .L802013C0 -/* 0A0204 802E0A04 00027103 */ sra $t6, $v0, 4 -/* 0A0208 802E0A08 2441000F */ addiu $at, $v0, 0xf -/* 0A020C 802E0A0C 00017103 */ sra $t6, $at, 4 -.L802013C0: -/* 0A0210 802E0A10 24010081 */ li $at, 129 -/* 0A0214 802E0A14 17210009 */ bne $t9, $at, .L802013EC -/* 0A0218 802E0A18 01C01025 */ move $v0, $t6 -/* 0A021C 802E0A1C 01DF0019 */ multu $t6, $ra -/* 0A0220 802E0A20 8FAE00F4 */ lw $t6, 0xf4($sp) -/* 0A0224 802E0A24 000880C0 */ sll $s0, $t0, 3 -/* 0A0228 802E0A28 02088021 */ addu $s0, $s0, $t0 -/* 0A022C 802E0A2C 00007812 */ mflo $t7 -/* 0A0230 802E0A30 01EE2821 */ addu $a1, $t7, $t6 -/* 0A0234 802E0A34 10000019 */ b .L8020144C -/* 0A0238 802E0A38 30A8000F */ andi $t0, $a1, 0xf -.L802013EC: -/* 0A023C 802E0A3C 005F0019 */ multu $v0, $ra -/* 0A0240 802E0A40 8FB900F4 */ lw $t9, 0xf4($sp) -/* 0A0244 802E0A44 8FA6011C */ lw $a2, 0x11c($sp) -/* 0A0248 802E0A48 26E70001 */ addiu $a3, $s7, 1 -/* 0A024C 802E0A4C AFA90124 */ sw $t1, 0x124($sp) -/* 0A0250 802E0A50 AFAA0120 */ sw $t2, 0x120($sp) -/* 0A0254 802E0A54 AFAB00E0 */ sw $t3, 0xe0($sp) -/* 0A0258 802E0A58 AFAC00EC */ sw $t4, 0xec($sp) -/* 0A025C 802E0A5C 0000C012 */ mflo $t8 -/* 0A0260 802E0A60 03192021 */ addu $a0, $t8, $t9 -/* 0A0264 802E0A64 00000000 */ nop -/* 0A0268 802E0A68 011F0019 */ multu $t0, $ra -/* 0A026C 802E0A6C 00008012 */ mflo $s0 -/* 0A0270 802E0A70 02002825 */ move $a1, $s0 -/* 0A0274 802E0A74 0C0B8D57 */ jal dma_sample_data -/* 0A0278 802E0A78 00000000 */ nop -/* 0A027C 802E0A7C 8FA90124 */ lw $t1, 0x124($sp) -/* 0A0280 802E0A80 8FAA0120 */ lw $t2, 0x120($sp) -/* 0A0284 802E0A84 8FAB00E0 */ lw $t3, 0xe0($sp) -/* 0A0288 802E0A88 8FAC00EC */ lw $t4, 0xec($sp) -/* 0A028C 802E0A8C 3C0D8000 */ lui $t5, 0x8000 -/* 0A0290 802E0A90 241F0009 */ li $ra, 9 -/* 0A0294 802E0A94 00402825 */ move $a1, $v0 -/* 0A0298 802E0A98 30A8000F */ andi $t0, $a1, 0xf -.L8020144C: -/* 0A029C 802E0A9C 02401825 */ move $v1, $s2 -/* 0A02A0 802E0AA0 3C0F0800 */ lui $t7, (0x080003F0 >> 16) # lui $t7, 0x800 -/* 0A02A4 802E0AA4 35EF03F0 */ ori $t7, (0x080003F0 & 0xFFFF) # ori $t7, $t7, 0x3f0 -/* 0A02A8 802E0AA8 02087021 */ addu $t6, $s0, $t0 -/* 0A02AC 802E0AAC 31D8FFFF */ andi $t8, $t6, 0xffff -/* 0A02B0 802E0AB0 AC6F0000 */ sw $t7, ($v1) -/* 0A02B4 802E0AB4 26520008 */ addiu $s2, $s2, 8 -/* 0A02B8 802E0AB8 AC780004 */ sw $t8, 4($v1) -/* 0A02BC 802E0ABC 02402025 */ move $a0, $s2 -/* 0A02C0 802E0AC0 00A87823 */ subu $t7, $a1, $t0 -/* 0A02C4 802E0AC4 01ED7021 */ addu $t6, $t7, $t5 -/* 0A02C8 802E0AC8 3C190400 */ lui $t9, 0x400 -/* 0A02CC 802E0ACC AC990000 */ sw $t9, ($a0) -/* 0A02D0 802E0AD0 AC8E0004 */ sw $t6, 4($a0) -/* 0A02D4 802E0AD4 92E60000 */ lbu $a2, ($s7) -/* 0A02D8 802E0AD8 10000004 */ b .L8020149C -/* 0A02DC 802E0ADC 26520008 */ addiu $s2, $s2, 8 -.L80201490: -/* 0A02E0 802E0AE0 00008825 */ move $s1, $zero -/* 0A02E4 802E0AE4 00004025 */ move $t0, $zero -/* 0A02E8 802E0AE8 92E60000 */ lbu $a2, ($s7) -.L8020149C: -/* 0A02EC 802E0AEC 10C0000D */ beqz $a2, .L802014D4 -/* 0A02F0 802E0AF0 02401025 */ move $v0, $s2 -/* 0A02F4 802E0AF4 3C180F00 */ lui $t8, 0xf00 -/* 0A02F8 802E0AF8 AC580000 */ sw $t8, ($v0) -/* 0A02FC 802E0AFC 8FB90138 */ lw $t9, 0x138($sp) -/* 0A0300 802E0B00 3C018000 */ lui $at, (0x80000010 >> 16) # lui $at, 0x8000 -/* 0A0304 802E0B04 34210010 */ ori $at, (0x80000010 & 0xFFFF) # ori $at, $at, 0x10 -/* 0A0308 802E0B08 8F2F0008 */ lw $t7, 8($t9) -/* 0A030C 802E0B0C 24180002 */ li $t8, 2 -/* 0A0310 802E0B10 26520008 */ addiu $s2, $s2, 8 -/* 0A0314 802E0B14 01E17021 */ addu $t6, $t7, $at -/* 0A0318 802E0B18 AC4E0004 */ sw $t6, 4($v0) -/* 0A031C 802E0B1C AFB8011C */ sw $t8, 0x11c($sp) -/* 0A0320 802E0B20 A2E00000 */ sb $zero, ($s7) -.L802014D4: -/* 0A0324 802E0B24 17C0001D */ bnez $fp, .L8020154C -/* 0A0328 802E0B28 02401825 */ move $v1, $s2 -/* 0A032C 802E0B2C 251903F0 */ addiu $t9, $t0, 0x3f0 -/* 0A0330 802E0B30 332FFFFF */ andi $t7, $t9, 0xffff -/* 0A0334 802E0B34 3C010800 */ lui $at, 0x800 -/* 0A0338 802E0B38 01E17025 */ or $t6, $t7, $at -/* 0A033C 802E0B3C 00113040 */ sll $a2, $s1, 1 -/* 0A0340 802E0B40 30D8FFFF */ andi $t8, $a2, 0xffff -/* 0A0344 802E0B44 3C010180 */ lui $at, 0x180 -/* 0A0348 802E0B48 02401025 */ move $v0, $s2 -/* 0A034C 802E0B4C 0301C825 */ or $t9, $t8, $at -/* 0A0350 802E0B50 AC590004 */ sw $t9, 4($v0) -/* 0A0354 802E0B54 AC4E0000 */ sw $t6, ($v0) -/* 0A0358 802E0B58 8FAF011C */ lw $t7, 0x11c($sp) -/* 0A035C 802E0B5C 26520008 */ addiu $s2, $s2, 8 -/* 0A0360 802E0B60 3C010100 */ lui $at, 0x100 -/* 0A0364 802E0B64 31EE00FF */ andi $t6, $t7, 0xff -/* 0A0368 802E0B68 000EC400 */ sll $t8, $t6, 0x10 -/* 0A036C 802E0B6C 0301C825 */ or $t9, $t8, $at -/* 0A0370 802E0B70 02401825 */ move $v1, $s2 -/* 0A0374 802E0B74 AC790000 */ sw $t9, ($v1) -/* 0A0378 802E0B78 8EEF000C */ lw $t7, 0xc($s7) -/* 0A037C 802E0B7C 0235C821 */ addu $t9, $s1, $s5 -/* 0A0380 802E0B80 0013C040 */ sll $t8, $s3, 1 -/* 0A0384 802E0B84 01ED7021 */ addu $t6, $t7, $t5 -/* 0A0388 802E0B88 AC6E0004 */ sw $t6, 4($v1) -/* 0A038C 802E0B8C 26520008 */ addiu $s2, $s2, 8 -/* 0A0390 802E0B90 AFB80104 */ sw $t8, 0x104($sp) -/* 0A0394 802E0B94 1000002F */ b .L80201604 -/* 0A0398 802E0B98 03363823 */ subu $a3, $t9, $s6 -.L8020154C: -/* 0A039C 802E0B9C 250F03F0 */ addiu $t7, $t0, 0x3f0 -/* 0A03A0 802E0BA0 31EEFFFF */ andi $t6, $t7, 0xffff -/* 0A03A4 802E0BA4 3C010800 */ lui $at, 0x800 -/* 0A03A8 802E0BA8 01C1C025 */ or $t8, $t6, $at -/* 0A03AC 802E0BAC 2401FFE0 */ li $at, -32 -/* 0A03B0 802E0BB0 2682001F */ addiu $v0, $s4, 0x1f -/* 0A03B4 802E0BB4 0041C824 */ and $t9, $v0, $at -/* 0A03B8 802E0BB8 272E0180 */ addiu $t6, $t9, 0x180 -/* 0A03BC 802E0BBC 03201025 */ move $v0, $t9 -/* 0A03C0 802E0BC0 AC780000 */ sw $t8, ($v1) -/* 0A03C4 802E0BC4 00113040 */ sll $a2, $s1, 1 -/* 0A03C8 802E0BC8 30D9FFFF */ andi $t9, $a2, 0xffff -/* 0A03CC 802E0BCC 000EC400 */ sll $t8, $t6, 0x10 -/* 0A03D0 802E0BD0 03197825 */ or $t7, $t8, $t9 -/* 0A03D4 802E0BD4 AC6F0004 */ sw $t7, 4($v1) -/* 0A03D8 802E0BD8 8FAE011C */ lw $t6, 0x11c($sp) -/* 0A03DC 802E0BDC 26520008 */ addiu $s2, $s2, 8 -/* 0A03E0 802E0BE0 3C010100 */ lui $at, 0x100 -/* 0A03E4 802E0BE4 31D800FF */ andi $t8, $t6, 0xff -/* 0A03E8 802E0BE8 0018CC00 */ sll $t9, $t8, 0x10 -/* 0A03EC 802E0BEC 03217825 */ or $t7, $t9, $at -/* 0A03F0 802E0BF0 02402025 */ move $a0, $s2 -/* 0A03F4 802E0BF4 AC8F0000 */ sw $t7, ($a0) -/* 0A03F8 802E0BF8 8EEE000C */ lw $t6, 0xc($s7) -/* 0A03FC 802E0BFC 0013C840 */ sll $t9, $s3, 1 -/* 0A0400 802E0C00 00597821 */ addu $t7, $v0, $t9 -/* 0A0404 802E0C04 01CDC021 */ addu $t8, $t6, $t5 -/* 0A0408 802E0C08 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* 0A040C 802E0C0C AC980004 */ sw $t8, 4($a0) -/* 0A0410 802E0C10 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0A0414 802E0C14 25EE0180 */ addiu $t6, $t7, 0x180 -/* 0A0418 802E0C18 01C1C024 */ and $t8, $t6, $at -/* 0A041C 802E0C1C 3C010A00 */ lui $at, 0xa00 -/* 0A0420 802E0C20 26520008 */ addiu $s2, $s2, 8 -/* 0A0424 802E0C24 0301C825 */ or $t9, $t8, $at -/* 0A0428 802E0C28 02357821 */ addu $t7, $s1, $s5 -/* 0A042C 802E0C2C 01F63823 */ subu $a3, $t7, $s6 -/* 0A0430 802E0C30 02402825 */ move $a1, $s2 -/* 0A0434 802E0C34 ACB90000 */ sw $t9, ($a1) -/* 0A0438 802E0C38 00077840 */ sll $t7, $a3, 1 -/* 0A043C 802E0C3C 26980180 */ addiu $t8, $s4, 0x180 -/* 0A0440 802E0C40 0018CC00 */ sll $t9, $t8, 0x10 -/* 0A0444 802E0C44 31EEFFFF */ andi $t6, $t7, 0xffff -/* 0A0448 802E0C48 032EC025 */ or $t8, $t9, $t6 -/* 0A044C 802E0C4C ACB80004 */ sw $t8, 4($a1) -/* 0A0450 802E0C50 26520008 */ addiu $s2, $s2, 8 -.L80201604: -/* 0A0454 802E0C54 8FAF011C */ lw $t7, 0x11c($sp) -/* 0A0458 802E0C58 24010001 */ li $at, 1 -/* 0A045C 802E0C5C 03C7F021 */ addu $fp, $fp, $a3 -/* 0A0460 802E0C60 11E10005 */ beq $t7, $at, .L80201628 -/* 0A0464 802E0C64 39E20002 */ xori $v0, $t7, 2 -/* 0A0468 802E0C68 10400007 */ beqz $v0, .L80201638 -/* 0A046C 802E0C6C AFA0011C */ sw $zero, 0x11c($sp) -/* 0A0470 802E0C70 10000008 */ b .L80201644 -/* 0A0474 802E0C74 00077040 */ sll $t6, $a3, 1 -.L80201628: -/* 0A0478 802E0C78 AFA00104 */ sw $zero, 0x104($sp) -/* 0A047C 802E0C7C 00D4A021 */ addu $s4, $a2, $s4 -/* 0A0480 802E0C80 1000000B */ b .L80201660 -/* 0A0484 802E0C84 AFA0011C */ sw $zero, 0x11c($sp) -.L80201638: -/* 0A0488 802E0C88 0007C840 */ sll $t9, $a3, 1 -/* 0A048C 802E0C8C 10000008 */ b .L80201660 -/* 0A0490 802E0C90 0334A021 */ addu $s4, $t9, $s4 -.L80201644: -/* 0A0494 802E0C94 52800004 */ beql $s4, $zero, .L80201658 -/* 0A0498 802E0C98 0267A021 */ addu $s4, $s3, $a3 -/* 0A049C 802E0C9C 10000004 */ b .L80201660 -/* 0A04A0 802E0CA0 01D4A021 */ addu $s4, $t6, $s4 -/* 0A04A4 802E0CA4 0267A021 */ addu $s4, $s3, $a3 -.L80201658: -/* 0A04A8 802E0CA8 0014C040 */ sll $t8, $s4, 1 -/* 0A04AC 802E0CAC 0300A025 */ move $s4, $t8 -.L80201660: -/* 0A04B0 802E0CB0 11200019 */ beqz $t1, .L802016C8 -/* 0A04B4 802E0CB4 24190001 */ li $t9, 1 -/* 0A04B8 802E0CB8 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* 0A04BC 802E0CBC 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0A04C0 802E0CC0 268F0180 */ addiu $t7, $s4, 0x180 -/* 0A04C4 802E0CC4 01E1C824 */ and $t9, $t7, $at -/* 0A04C8 802E0CC8 8FA3014C */ lw $v1, 0x14c($sp) -/* 0A04CC 802E0CCC 8FA60148 */ lw $a2, 0x148($sp) -/* 0A04D0 802E0CD0 3C010200 */ lui $at, 0x200 -/* 0A04D4 802E0CD4 02401025 */ move $v0, $s2 -/* 0A04D8 802E0CD8 019EC023 */ subu $t8, $t4, $fp -/* 0A04DC 802E0CDC 00187840 */ sll $t7, $t8, 1 -/* 0A04E0 802E0CE0 03217025 */ or $t6, $t9, $at -/* 0A04E4 802E0CE4 AC4E0000 */ sw $t6, ($v0) -/* 0A04E8 802E0CE8 AC4F0004 */ sw $t7, 4($v0) -/* 0A04EC 802E0CEC 906E0000 */ lbu $t6, ($v1) -/* 0A04F0 802E0CF0 26520008 */ addiu $s2, $s2, 8 -/* 0A04F4 802E0CF4 35D80020 */ ori $t8, $t6, 0x20 -/* 0A04F8 802E0CF8 A0780000 */ sb $t8, ($v1) -/* 0A04FC 802E0CFC 90D900B0 */ lbu $t9, 0xb0($a2) -/* 0A0500 802E0D00 372E0020 */ ori $t6, $t9, 0x20 -/* 0A0504 802E0D04 A0CE00B0 */ sb $t6, 0xb0($a2) -/* 0A0508 802E0D08 90D800B0 */ lbu $t8, 0xb0($a2) -/* 0A050C 802E0D0C 330FFF7F */ andi $t7, $t8, 0xff7f -/* 0A0510 802E0D10 1000000D */ b .L802016F8 -/* 0A0514 802E0D14 A0CF00B0 */ sb $t7, 0xb0($a2) -.L802016C8: -/* 0A0518 802E0D18 51400007 */ beql $t2, $zero, .L802016E8 -/* 0A051C 802E0D1C 8EEF0008 */ lw $t7, 8($s7) -/* 0A0520 802E0D20 A2F90000 */ sb $t9, ($s7) -/* 0A0524 802E0D24 8FAE0134 */ lw $t6, 0x134($sp) -/* 0A0528 802E0D28 8DD80000 */ lw $t8, ($t6) -/* 0A052C 802E0D2C 10000004 */ b .L802016F0 -/* 0A0530 802E0D30 AEF80008 */ sw $t8, 8($s7) -/* 0A0534 802E0D34 8EEF0008 */ lw $t7, 8($s7) -.L802016E8: -/* 0A0538 802E0D38 01EBC821 */ addu $t9, $t7, $t3 -/* 0A053C 802E0D3C AEF90008 */ sw $t9, 8($s7) -.L802016F0: -/* 0A0540 802E0D40 57CCFEFC */ bnel $fp, $t4, .L802012E4 -/* 0A0544 802E0D44 8EE60008 */ lw $a2, 8($s7) -.L802016F8: -/* 0A0548 802E0D48 8FA400BC */ lw $a0, 0xbc($sp) -.L802016FC: -/* 0A054C 802E0D4C 24010001 */ li $at, 1 -/* 0A0550 802E0D50 8FA3014C */ lw $v1, 0x14c($sp) -/* 0A0554 802E0D54 10810009 */ beq $a0, $at, .L8020172C -/* 0A0558 802E0D58 8FB80104 */ lw $t8, 0x104($sp) -/* 0A055C 802E0D5C 24010002 */ li $at, 2 -/* 0A0560 802E0D60 1081000D */ beq $a0, $at, .L80201748 -/* 0A0564 802E0D64 8FAE00B8 */ lw $t6, 0xb8($sp) -/* 0A0568 802E0D68 8C670000 */ lw $a3, ($v1) -/* 0A056C 802E0D6C 00072880 */ sll $a1, $a3, 2 -/* 0A0570 802E0D70 000577C2 */ srl $t6, $a1, 0x1f -/* 0A0574 802E0D74 1000006A */ b .L802018D0 -/* 0A0578 802E0D78 01C02825 */ move $a1, $t6 -.L8020172C: -/* 0A057C 802E0D7C 270F0180 */ addiu $t7, $t8, 0x180 -/* 0A0580 802E0D80 A7AF00AA */ sh $t7, 0xaa($sp) -/* 0A0584 802E0D84 8C670000 */ lw $a3, ($v1) -/* 0A0588 802E0D88 00072880 */ sll $a1, $a3, 2 -/* 0A058C 802E0D8C 0005CFC2 */ srl $t9, $a1, 0x1f -/* 0A0590 802E0D90 10000063 */ b .L802018D0 -/* 0A0594 802E0D94 03202825 */ move $a1, $t9 -.L80201748: -/* 0A0598 802E0D98 11C00009 */ beqz $t6, .L80201770 -/* 0A059C 802E0D9C 8FA6014C */ lw $a2, 0x14c($sp) -/* 0A05A0 802E0DA0 24010001 */ li $at, 1 -/* 0A05A4 802E0DA4 11C10036 */ beq $t6, $at, .L80201830 -/* 0A05A8 802E0DA8 02401025 */ move $v0, $s2 -/* 0A05AC 802E0DAC 8C670000 */ lw $a3, ($v1) -/* 0A05B0 802E0DB0 00072880 */ sll $a1, $a3, 2 -/* 0A05B4 802E0DB4 0005C7C2 */ srl $t8, $a1, 0x1f -/* 0A05B8 802E0DB8 10000059 */ b .L802018D0 -/* 0A05BC 802E0DBC 03002825 */ move $a1, $t8 -.L80201770: -/* 0A05C0 802E0DC0 8FAF0104 */ lw $t7, 0x104($sp) -/* 0A05C4 802E0DC4 3C010800 */ lui $at, 0x800 -/* 0A05C8 802E0DC8 02401025 */ move $v0, $s2 -/* 0A05CC 802E0DCC 25F90180 */ addiu $t9, $t7, 0x180 -/* 0A05D0 802E0DD0 332EFFFF */ andi $t6, $t9, 0xffff -/* 0A05D4 802E0DD4 01C1C025 */ or $t8, $t6, $at -/* 0A05D8 802E0DD8 25840004 */ addiu $a0, $t4, 4 -/* 0A05DC 802E0DDC 308FFFFF */ andi $t7, $a0, 0xffff -/* 0A05E0 802E0DE0 3C010020 */ lui $at, 0x20 -/* 0A05E4 802E0DE4 01E1C825 */ or $t9, $t7, $at -/* 0A05E8 802E0DE8 26520008 */ addiu $s2, $s2, 8 -/* 0A05EC 802E0DEC 3C0E0501 */ lui $t6, (0x0501FF60 >> 16) # lui $t6, 0x501 -/* 0A05F0 802E0DF0 AC590004 */ sw $t9, 4($v0) -/* 0A05F4 802E0DF4 AC580000 */ sw $t8, ($v0) -/* 0A05F8 802E0DF8 35CEFF60 */ ori $t6, (0x0501FF60 & 0xFFFF) # ori $t6, $t6, 0xff60 -/* 0A05FC 802E0DFC 02401825 */ move $v1, $s2 -/* 0A0600 802E0E00 AC6E0000 */ sw $t6, ($v1) -/* 0A0604 802E0E04 8EF8000C */ lw $t8, 0xc($s7) -/* 0A0608 802E0E08 3C018000 */ lui $at, (0x800000F0 >> 16) # lui $at, 0x8000 -/* 0A060C 802E0E0C 342100F0 */ ori $at, (0x800000F0 & 0xFFFF) # ori $at, $at, 0xf0 -/* 0A0610 802E0E10 03017821 */ addu $t7, $t8, $at -/* 0A0614 802E0E14 AC6F0004 */ sw $t7, 4($v1) -/* 0A0618 802E0E18 24190024 */ li $t9, 36 -/* 0A061C 802E0E1C AFA400AC */ sw $a0, 0xac($sp) -/* 0A0620 802E0E20 A7B900AA */ sh $t9, 0xaa($sp) -/* 0A0624 802E0E24 8CC70000 */ lw $a3, ($a2) -/* 0A0628 802E0E28 26520008 */ addiu $s2, $s2, 8 -/* 0A062C 802E0E2C 02401025 */ move $v0, $s2 -/* 0A0630 802E0E30 00072880 */ sll $a1, $a3, 2 -/* 0A0634 802E0E34 000577C2 */ srl $t6, $a1, 0x1f -/* 0A0638 802E0E38 11C0000F */ beqz $t6, .L80201828 -/* 0A063C 802E0E3C 01C02825 */ move $a1, $t6 -/* 0A0640 802E0E40 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* 0A0644 802E0E44 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0A0648 802E0E48 24980020 */ addiu $t8, $a0, 0x20 -/* 0A064C 802E0E4C 03017824 */ and $t7, $t8, $at -/* 0A0650 802E0E50 3C010200 */ lui $at, 0x200 -/* 0A0654 802E0E54 01E1C825 */ or $t9, $t7, $at -/* 0A0658 802E0E58 258E0010 */ addiu $t6, $t4, 0x10 -/* 0A065C 802E0E5C AC4E0004 */ sw $t6, 4($v0) -/* 0A0660 802E0E60 AC590000 */ sw $t9, ($v0) -/* 0A0664 802E0E64 8CC70000 */ lw $a3, ($a2) -/* 0A0668 802E0E68 26520008 */ addiu $s2, $s2, 8 -/* 0A066C 802E0E6C 00072880 */ sll $a1, $a3, 2 -/* 0A0670 802E0E70 0005C7C2 */ srl $t8, $a1, 0x1f -/* 0A0674 802E0E74 03002825 */ move $a1, $t8 -.L80201828: -/* 0A0678 802E0E78 10000029 */ b .L802018D0 -/* 0A067C 802E0E7C 8FA400BC */ lw $a0, 0xbc($sp) -.L80201830: -/* 0A0680 802E0E80 8FAF0104 */ lw $t7, 0x104($sp) -/* 0A0684 802E0E84 3C010800 */ lui $at, 0x800 -/* 0A0688 802E0E88 26520008 */ addiu $s2, $s2, 8 -/* 0A068C 802E0E8C 25F90180 */ addiu $t9, $t7, 0x180 -/* 0A0690 802E0E90 332EFFFF */ andi $t6, $t9, 0xffff -/* 0A0694 802E0E94 01C1C025 */ or $t8, $t6, $at -/* 0A0698 802E0E98 258F0008 */ addiu $t7, $t4, 8 -/* 0A069C 802E0E9C 31F9FFFF */ andi $t9, $t7, 0xffff -/* 0A06A0 802E0EA0 AC580000 */ sw $t8, ($v0) -/* 0A06A4 802E0EA4 3C010160 */ lui $at, 0x160 -/* 0A06A8 802E0EA8 03217025 */ or $t6, $t9, $at -/* 0A06AC 802E0EAC 3C180501 */ lui $t8, (0x0501FF60 >> 16) # lui $t8, 0x501 -/* 0A06B0 802E0EB0 AC4E0004 */ sw $t6, 4($v0) -/* 0A06B4 802E0EB4 3718FF60 */ ori $t8, (0x0501FF60 & 0xFFFF) # ori $t8, $t8, 0xff60 -/* 0A06B8 802E0EB8 02401825 */ move $v1, $s2 -/* 0A06BC 802E0EBC AC780000 */ sw $t8, ($v1) -/* 0A06C0 802E0EC0 8EEF000C */ lw $t7, 0xc($s7) -/* 0A06C4 802E0EC4 3C018000 */ lui $at, (0x800000F0 >> 16) # lui $at, 0x8000 -/* 0A06C8 802E0EC8 342100F0 */ ori $at, (0x800000F0 & 0xFFFF) # ori $at, $at, 0xf0 -/* 0A06CC 802E0ECC 26520008 */ addiu $s2, $s2, 8 -/* 0A06D0 802E0ED0 3C0E0A00 */ lui $t6, (0x0A000164 >> 16) # lui $t6, 0xa00 -/* 0A06D4 802E0ED4 01E1C821 */ addu $t9, $t7, $at -/* 0A06D8 802E0ED8 AC790004 */ sw $t9, 4($v1) -/* 0A06DC 802E0EDC 35CE0164 */ ori $t6, (0x0A000164 & 0xFFFF) # ori $t6, $t6, 0x164 -/* 0A06E0 802E0EE0 02402025 */ move $a0, $s2 -/* 0A06E4 802E0EE4 AC8E0000 */ sw $t6, ($a0) -/* 0A06E8 802E0EE8 8FB800AC */ lw $t8, 0xac($sp) -/* 0A06EC 802E0EEC 26520008 */ addiu $s2, $s2, 8 -/* 0A06F0 802E0EF0 27190020 */ addiu $t9, $t8, 0x20 -/* 0A06F4 802E0EF4 25980004 */ addiu $t8, $t4, 4 -/* 0A06F8 802E0EF8 330FFFFF */ andi $t7, $t8, 0xffff -/* 0A06FC 802E0EFC 00197400 */ sll $t6, $t9, 0x10 -/* 0A0700 802E0F00 01CFC825 */ or $t9, $t6, $t7 -/* 0A0704 802E0F04 AC990004 */ sw $t9, 4($a0) -/* 0A0708 802E0F08 8FB8014C */ lw $t8, 0x14c($sp) -/* 0A070C 802E0F0C 8FA400BC */ lw $a0, 0xbc($sp) -/* 0A0710 802E0F10 8F070000 */ lw $a3, ($t8) -/* 0A0714 802E0F14 00072880 */ sll $a1, $a3, 2 -/* 0A0718 802E0F18 000577C2 */ srl $t6, $a1, 0x1f -/* 0A071C 802E0F1C 01C02825 */ move $a1, $t6 -.L802018D0: -/* 0A0720 802E0F20 10A00005 */ beqz $a1, .L802018E8 -/* 0A0724 802E0F24 8FA200B8 */ lw $v0, 0xb8($sp) -/* 0A0728 802E0F28 AFB2015C */ sw $s2, 0x15c($sp) -/* 0A072C 802E0F2C 24130001 */ li $s3, 1 -/* 0A0730 802E0F30 10000007 */ b .L80201900 -/* 0A0734 802E0F34 8FB1014C */ lw $s1, 0x14c($sp) -.L802018E8: -/* 0A0738 802E0F38 24420001 */ addiu $v0, $v0, 1 -/* 0A073C 802E0F3C 1444FE45 */ bne $v0, $a0, .L80201204 -/* 0A0740 802E0F40 AFA200B8 */ sw $v0, 0xb8($sp) -/* 0A0744 802E0F44 AFB2015C */ sw $s2, 0x15c($sp) -/* 0A0748 802E0F48 24130001 */ li $s3, 1 -/* 0A074C 802E0F4C 8FB1014C */ lw $s1, 0x14c($sp) -.L80201900: -/* 0A0750 802E0F50 00077840 */ sll $t7, $a3, 1 -/* 0A0754 802E0F54 000FCFC2 */ srl $t9, $t7, 0x1f -/* 0A0758 802E0F58 8FB2015C */ lw $s2, 0x15c($sp) -/* 0A075C 802E0F5C 16790005 */ bne $s3, $t9, .L80201924 -/* 0A0760 802E0F60 00001825 */ move $v1, $zero -/* 0A0764 802E0F64 92380000 */ lbu $t8, ($s1) -/* 0A0768 802E0F68 24030001 */ li $v1, 1 -/* 0A076C 802E0F6C 330EFFBF */ andi $t6, $t8, 0xffbf -/* 0A0770 802E0F70 A22E0000 */ sb $t6, ($s1) -.L80201924: -/* 0A0774 802E0F74 8FB30158 */ lw $s3, 0x158($sp) -/* 0A0778 802E0F78 97B900AA */ lhu $t9, 0xaa($sp) -/* 0A077C 802E0F7C 02402025 */ move $a0, $s2 -/* 0A0780 802E0F80 00133040 */ sll $a2, $s3, 1 -/* 0A0784 802E0F84 00C09825 */ move $s3, $a2 -/* 0A0788 802E0F88 02E02825 */ move $a1, $s7 -/* 0A078C 802E0F8C 97A7011A */ lhu $a3, 0x11a($sp) -/* 0A0790 802E0F90 AFA30014 */ sw $v1, 0x14($sp) -/* 0A0794 802E0F94 AFA3011C */ sw $v1, 0x11c($sp) -/* 0A0798 802E0F98 0C0B8449 */ jal final_resample -/* 0A079C 802E0F9C AFB90010 */ sw $t9, 0x10($sp) -/* 0A07A0 802E0FA0 92380003 */ lbu $t8, 3($s1) -/* 0A07A4 802E0FA4 00409025 */ move $s2, $v0 -/* 0A07A8 802E0FA8 8FB4011C */ lw $s4, 0x11c($sp) -/* 0A07AC 802E0FAC 17000004 */ bnez $t8, .L80201970 -/* 0A07B0 802E0FB0 02402025 */ move $a0, $s2 -/* 0A07B4 802E0FB4 92EE0002 */ lbu $t6, 2($s7) -/* 0A07B8 802E0FB8 51C00004 */ beql $t6, $zero, .L8020197C -/* 0A07BC 802E0FBC 922F0004 */ lbu $t7, 4($s1) -.L80201970: -/* 0A07C0 802E0FC0 1000000A */ b .L8020199C -/* 0A07C4 802E0FC4 24100001 */ li $s0, 1 -/* 0A07C8 802E0FC8 922F0004 */ lbu $t7, 4($s1) -.L8020197C: -/* 0A07CC 802E0FCC 15E00005 */ bnez $t7, .L80201994 -/* 0A07D0 802E0FD0 00000000 */ nop -/* 0A07D4 802E0FD4 92F90003 */ lbu $t9, 3($s7) -/* 0A07D8 802E0FD8 00008025 */ move $s0, $zero -/* 0A07DC 802E0FDC 13200003 */ beqz $t9, .L8020199C -/* 0A07E0 802E0FE0 00000000 */ nop -.L80201994: -/* 0A07E4 802E0FE4 10000001 */ b .L8020199C -/* 0A07E8 802E0FE8 24100002 */ li $s0, 2 -.L8020199C: -/* 0A07EC 802E0FEC 02202825 */ move $a1, $s1 -/* 0A07F0 802E0FF0 02E03025 */ move $a2, $s7 -/* 0A07F4 802E0FF4 8FA70158 */ lw $a3, 0x158($sp) -/* 0A07F8 802E0FF8 AFA00010 */ sw $zero, 0x10($sp) -/* 0A07FC 802E0FFC AFB00014 */ sw $s0, 0x14($sp) -/* 0A0800 802E1000 0C0B8460 */ jal process_envelope -/* 0A0804 802E1004 AFB40018 */ sw $s4, 0x18($sp) -/* 0A0808 802E1008 92380000 */ lbu $t8, ($s1) -/* 0A080C 802E100C 00409025 */ move $s2, $v0 -/* 0A0810 802E1010 00402025 */ move $a0, $v0 -/* 0A0814 802E1014 330E0001 */ andi $t6, $t8, 1 -/* 0A0818 802E1018 11C00007 */ beqz $t6, .L802019E8 -/* 0A081C 802E101C 02202825 */ move $a1, $s1 -/* 0A0820 802E1020 02E03025 */ move $a2, $s7 -/* 0A0824 802E1024 02603825 */ move $a3, $s3 -/* 0A0828 802E1028 AFB40010 */ sw $s4, 0x10($sp) -/* 0A082C 802E102C 0C0B85E6 */ jal note_apply_headset_pan_effects -/* 0A0830 802E1030 AFB00014 */ sw $s0, 0x14($sp) -/* 0A0834 802E1034 00409025 */ move $s2, $v0 -.L802019E8: -/* 0A0838 802E1038 02401025 */ move $v0, $s2 -.L802019EC: -/* 0A083C 802E103C 8FBF004C */ lw $ra, 0x4c($sp) -/* 0A0840 802E1040 8FB00028 */ lw $s0, 0x28($sp) -/* 0A0844 802E1044 8FB1002C */ lw $s1, 0x2c($sp) -/* 0A0848 802E1048 8FB20030 */ lw $s2, 0x30($sp) -/* 0A084C 802E104C 8FB30034 */ lw $s3, 0x34($sp) -/* 0A0850 802E1050 8FB40038 */ lw $s4, 0x38($sp) -/* 0A0854 802E1054 8FB5003C */ lw $s5, 0x3c($sp) -/* 0A0858 802E1058 8FB60040 */ lw $s6, 0x40($sp) -/* 0A085C 802E105C 8FB70044 */ lw $s7, 0x44($sp) -/* 0A0860 802E1060 8FBE0048 */ lw $fp, 0x48($sp) -/* 0A0864 802E1064 03E00008 */ jr $ra -/* 0A0868 802E1068 27BD0148 */ addiu $sp, $sp, 0x148 diff --git a/asm/non_matchings/synthesis_process_notes_jp.s b/asm/non_matchings/synthesis_process_notes_jp.s deleted file mode 100644 index 9416430c..00000000 --- a/asm/non_matchings/synthesis_process_notes_jp.s +++ /dev/null @@ -1,738 +0,0 @@ -.late_rodata -glabel D_80337BB0 - .word 0x3FFFFFD6, 0x0E94EE39 -glabel D_80337BB8 - .word 0x3FFFFEB0, 0 -glabel D_80337BC0 - .word 0x400FFFDB, 0x4CC25072 -glabel D_80337BC8 - .word 0x407FFEDA, 0 - -.text -glabel synthesis_process_notes -/* 0CF480 80314480 27BDFE88 */ addiu $sp, $sp, -0x178 -/* 0CF484 80314484 3C0E8022 */ lui $t6, %hi(gMaxSimultaneousNotes) # $t6, 0x8022 -/* 0CF488 80314488 8DCE6D70 */ lw $t6, %lo(gMaxSimultaneousNotes)($t6) -/* 0CF48C 8031448C AFB40030 */ sw $s4, 0x30($sp) -/* 0CF490 80314490 00C0A025 */ move $s4, $a2 -/* 0CF494 80314494 AFBF0044 */ sw $ra, 0x44($sp) -/* 0CF498 80314498 AFBE0040 */ sw $fp, 0x40($sp) -/* 0CF49C 8031449C AFB7003C */ sw $s7, 0x3c($sp) -/* 0CF4A0 803144A0 AFB60038 */ sw $s6, 0x38($sp) -/* 0CF4A4 803144A4 AFB50034 */ sw $s5, 0x34($sp) -/* 0CF4A8 803144A8 AFB3002C */ sw $s3, 0x2c($sp) -/* 0CF4AC 803144AC AFB20028 */ sw $s2, 0x28($sp) -/* 0CF4B0 803144B0 AFB10024 */ sw $s1, 0x24($sp) -/* 0CF4B4 803144B4 AFB00020 */ sw $s0, 0x20($sp) -/* 0CF4B8 803144B8 AFA40178 */ sw $a0, 0x178($sp) -/* 0CF4BC 803144BC AFA5017C */ sw $a1, 0x17c($sp) -/* 0CF4C0 803144C0 AFA00174 */ sw $zero, 0x174($sp) -/* 0CF4C4 803144C4 19C00267 */ blez $t6, .L80314E64 -/* 0CF4C8 803144C8 AFA0015C */ sw $zero, 0x15c($sp) -/* 0CF4CC 803144CC AFA0006C */ sw $zero, 0x6c($sp) -/* 0CF4D0 803144D0 3C1F8000 */ lui $ra, 0x8000 -.L803144D4: -/* 0CF4D4 803144D4 3C188022 */ lui $t8, %hi(gNotes) # $t8, 0x8022 -/* 0CF4D8 803144D8 8F182A10 */ lw $t8, %lo(gNotes)($t8) -/* 0CF4DC 803144DC 8FAF006C */ lw $t7, 0x6c($sp) -/* 0CF4E0 803144E0 3C198022 */ lui $t9, %hi(gBankLoadStatus) -/* 0CF4E4 803144E4 3C010100 */ lui $at, 0x100 -/* 0CF4E8 803144E8 01F8B821 */ addu $s7, $t7, $t8 -/* 0CF4EC 803144EC 92E20007 */ lbu $v0, 7($s7) -/* 0CF4F0 803144F0 8FB80174 */ lw $t8, 0x174($sp) -/* 0CF4F4 803144F4 0322C821 */ addu $t9, $t9, $v0 -/* 0CF4F8 803144F8 933918D0 */ lbu $t9, %lo(gBankLoadStatus)($t9) -/* 0CF4FC 803144FC 2B2E0002 */ slti $t6, $t9, 2 -/* 0CF500 80314500 11C00006 */ beqz $t6, .L8031451C -/* 0CF504 80314504 00027A00 */ sll $t7, $v0, 8 -/* 0CF508 80314508 01F8C821 */ addu $t9, $t7, $t8 -/* 0CF50C 8031450C 03217021 */ addu $t6, $t9, $at -/* 0CF510 80314510 3C018033 */ lui $at, %hi(gAudioErrorFlags) -/* 0CF514 80314514 10000249 */ b .L80314E3C -/* 0CF518 80314518 AC2E1D40 */ sw $t6, %lo(gAudioErrorFlags)($at) -.L8031451C: -/* 0CF51C 8031451C 8EEF0000 */ lw $t7, ($s7) -/* 0CF520 80314520 000FC7C2 */ srl $t8, $t7, 0x1f -/* 0CF524 80314524 53000246 */ beql $t8, $zero, .L80314E40 -/* 0CF528 80314528 8FAE0174 */ lw $t6, 0x174($sp) -/* 0CF52C 8031452C 8FB9017C */ lw $t9, 0x17c($sp) -/* 0CF530 80314530 AFA00148 */ sw $zero, 0x148($sp) -/* 0CF534 80314534 24010001 */ li $at, 1 -/* 0CF538 80314538 00197040 */ sll $t6, $t9, 1 -/* 0CF53C 8031453C AFAE0048 */ sw $t6, 0x48($sp) -/* 0CF540 80314540 8EEF0000 */ lw $t7, ($s7) -/* 0CF544 80314544 44802000 */ mtc1 $zero, $f4 -/* 0CF548 80314548 240E0001 */ li $t6, 1 -/* 0CF54C 8031454C 000FC040 */ sll $t8, $t7, 1 -/* 0CF550 80314550 0018CFC2 */ srl $t9, $t8, 0x1f -/* 0CF554 80314554 17210004 */ bne $t9, $at, .L80314568 -/* 0CF558 80314558 02802025 */ move $a0, $s4 -/* 0CF55C 8031455C AFAE0148 */ sw $t6, 0x148($sp) -/* 0CF560 80314560 AEE00014 */ sw $zero, 0x14($s7) -/* 0CF564 80314564 A6E00020 */ sh $zero, 0x20($s7) -.L80314568: -/* 0CF568 80314568 C6E20038 */ lwc1 $f2, 0x38($s7) -/* 0CF56C 8031456C 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 0CF570 80314570 44812800 */ mtc1 $at, $f5 -/* 0CF574 80314574 46001021 */ cvt.d.s $f0, $f2 -/* 0CF578 80314578 3C018033 */ lui $at, %hi(D_80337BC0) -/* 0CF57C 8031457C 4624003C */ c.lt.d $f0, $f4 -/* 0CF580 80314580 02E02825 */ move $a1, $s7 -/* 0CF584 80314584 4500000E */ bc1f .L803145C0 -/* 0CF588 80314588 00000000 */ nop -/* 0CF58C 8031458C 3C018033 */ lui $at, %hi(D_80337BB0) -/* 0CF590 80314590 D4267BB0 */ ldc1 $f6, %lo(D_80337BB0)($at) -/* 0CF594 80314594 240F0001 */ li $t7, 1 -/* 0CF598 80314598 AFAF00E8 */ sw $t7, 0xe8($sp) -/* 0CF59C 8031459C 4620303C */ c.lt.d $f6, $f0 -/* 0CF5A0 803145A0 3C018033 */ lui $at, %hi(D_80337BB8) -/* 0CF5A4 803145A4 45000004 */ bc1f .L803145B8 -/* 0CF5A8 803145A8 00000000 */ nop -/* 0CF5AC 803145AC C4287BB8 */ lwc1 $f8, %lo(D_80337BB8)($at) -/* 0CF5B0 803145B0 E6E80038 */ swc1 $f8, 0x38($s7) -/* 0CF5B4 803145B4 C6E20038 */ lwc1 $f2, 0x38($s7) -.L803145B8: -/* 0CF5B8 803145B8 10000012 */ b .L80314604 -/* 0CF5BC 803145BC 46001306 */ mov.s $f12, $f2 -.L803145C0: -/* 0CF5C0 803145C0 D42A7BC0 */ ldc1 $f10, %lo(D_80337BC0)($at) -/* 0CF5C4 803145C4 24180002 */ li $t8, 2 -/* 0CF5C8 803145C8 44802000 */ mtc1 $zero, $f4 -/* 0CF5CC 803145CC 4620503E */ c.le.d $f10, $f0 -/* 0CF5D0 803145D0 AFB800E8 */ sw $t8, 0xe8($sp) -/* 0CF5D4 803145D4 3C018033 */ lui $at, %hi(D_80337BC8) -/* 0CF5D8 803145D8 45020006 */ bc1fl .L803145F4 -/* 0CF5DC 803145DC 3C013FE0 */ lui $at, 0x3fe0 -/* 0CF5E0 803145E0 C4307BC8 */ lwc1 $f16, %lo(D_80337BC8)($at) -/* 0CF5E4 803145E4 E6F00038 */ swc1 $f16, 0x38($s7) -/* 0CF5E8 803145E8 C6F20038 */ lwc1 $f18, 0x38($s7) -/* 0CF5EC 803145EC 46009021 */ cvt.d.s $f0, $f18 -/* 0CF5F0 803145F0 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -.L803145F4: -/* 0CF5F4 803145F4 44812800 */ mtc1 $at, $f5 -/* 0CF5F8 803145F8 00000000 */ nop -/* 0CF5FC 803145FC 46240182 */ mul.d $f6, $f0, $f4 -/* 0CF600 80314600 46203320 */ cvt.s.d $f12, $f6 -.L80314604: -/* 0CF604 80314604 3C014700 */ li $at, 0x47000000 # 32768.000000 -/* 0CF608 80314608 44814000 */ mtc1 $at, $f8 -/* 0CF60C 8031460C 8FB8017C */ lw $t8, 0x17c($sp) -/* 0CF610 80314610 46086282 */ mul.s $f10, $f12, $f8 -/* 0CF614 80314614 4600540D */ trunc.w.s $f16, $f10 -/* 0CF618 80314618 440E8000 */ mfc1 $t6, $f16 -/* 0CF61C 8031461C 00000000 */ nop -/* 0CF620 80314620 31CFFFFF */ andi $t7, $t6, 0xffff -/* 0CF624 80314624 01F80019 */ multu $t7, $t8 -/* 0CF628 80314628 AFAF005C */ sw $t7, 0x5c($sp) -/* 0CF62C 8031462C 96EF0020 */ lhu $t7, 0x20($s7) -/* 0CF630 80314630 8EE20024 */ lw $v0, 0x24($s7) -/* 0CF634 80314634 0000C812 */ mflo $t9 -/* 0CF638 80314638 00197040 */ sll $t6, $t9, 1 -/* 0CF63C 8031463C 01EE1821 */ addu $v1, $t7, $t6 -/* 0CF640 80314640 1440000E */ bnez $v0, .L8031467C -/* 0CF644 80314644 A6E30020 */ sh $v1, 0x20($s7) -/* 0CF648 80314648 00038402 */ srl $s0, $v1, 0x10 -/* 0CF64C 8031464C 02003025 */ move $a2, $s0 -/* 0CF650 80314650 0C0C53C2 */ jal load_wave_samples -/* 0CF654 80314654 AFA00148 */ sw $zero, 0x148($sp) -/* 0CF658 80314658 8EE90014 */ lw $t1, 0x14($s7) -/* 0CF65C 8031465C 0040A025 */ move $s4, $v0 -/* 0CF660 80314660 0009C840 */ sll $t9, $t1, 1 -/* 0CF664 80314664 272F0180 */ addiu $t7, $t9, 0x180 -/* 0CF668 80314668 A7AF00D6 */ sh $t7, 0xd6($sp) -/* 0CF66C 8031466C 01307021 */ addu $t6, $t1, $s0 -/* 0CF670 80314670 AEEE0014 */ sw $t6, 0x14($s7) -/* 0CF674 80314674 100001B9 */ b .L80314D5C -/* 0CF678 80314678 8EE50000 */ lw $a1, ($s7) -.L8031467C: -/* 0CF67C 8031467C 8C460000 */ lw $a2, ($v0) -/* 0CF680 80314680 00031402 */ srl $v0, $v1, 0x10 -/* 0CF684 80314684 8CD80008 */ lw $t8, 8($a2) -/* 0CF688 80314688 AFB80160 */ sw $t8, 0x160($sp) -/* 0CF68C 8031468C 8F0F0004 */ lw $t7, 4($t8) -/* 0CF690 80314690 8FB800E8 */ lw $t8, 0xe8($sp) -/* 0CF694 80314694 AFAF0110 */ sw $t7, 0x110($sp) -/* 0CF698 80314698 8CCE0004 */ lw $t6, 4($a2) -/* 0CF69C 8031469C AFA000D8 */ sw $zero, 0xd8($sp) -/* 0CF6A0 803146A0 AFA000E4 */ sw $zero, 0xe4($sp) -/* 0CF6A4 803146A4 1B0001AB */ blez $t8, .L80314D54 -/* 0CF6A8 803146A8 AFAE0120 */ sw $t6, 0x120($sp) -/* 0CF6AC 803146AC 3B190001 */ xori $t9, $t8, 1 -/* 0CF6B0 803146B0 2F390001 */ sltiu $t9, $t9, 1 -/* 0CF6B4 803146B4 AFB90054 */ sw $t9, 0x54($sp) -/* 0CF6B8 803146B8 AFA20058 */ sw $v0, 0x58($sp) -/* 0CF6BC 803146BC AFA60164 */ sw $a2, 0x164($sp) -/* 0CF6C0 803146C0 8FA60164 */ lw $a2, 0x164($sp) -.L803146C4: -/* 0CF6C4 803146C4 8FAF0054 */ lw $t7, 0x54($sp) -/* 0CF6C8 803146C8 8FA20058 */ lw $v0, 0x58($sp) -/* 0CF6CC 803146CC 8CC4000C */ lw $a0, 0xc($a2) -/* 0CF6D0 803146D0 0000F025 */ move $fp, $zero -/* 0CF6D4 803146D4 0000A825 */ move $s5, $zero -/* 0CF6D8 803146D8 11E00003 */ beqz $t7, .L803146E8 -/* 0CF6DC 803146DC 24850008 */ addiu $a1, $a0, 8 -/* 0CF6E0 803146E0 1000000B */ b .L80314710 -/* 0CF6E4 803146E4 00406825 */ move $t5, $v0 -.L803146E8: -/* 0CF6E8 803146E8 304E0001 */ andi $t6, $v0, 1 -/* 0CF6EC 803146EC 11C00007 */ beqz $t6, .L8031470C -/* 0CF6F0 803146F0 AFA60164 */ sw $a2, 0x164($sp) -/* 0CF6F4 803146F4 8FB900E4 */ lw $t9, 0xe4($sp) -/* 0CF6F8 803146F8 2401FFFE */ li $at, -2 -/* 0CF6FC 803146FC 0041C024 */ and $t8, $v0, $at -/* 0CF700 80314700 00197840 */ sll $t7, $t9, 1 -/* 0CF704 80314704 10000002 */ b .L80314710 -/* 0CF708 80314708 030F6821 */ addu $t5, $t8, $t7 -.L8031470C: -/* 0CF70C 8031470C 00406825 */ move $t5, $v0 -.L80314710: -/* 0CF710 80314710 8FAE015C */ lw $t6, 0x15c($sp) -/* 0CF714 80314714 AFA20058 */ sw $v0, 0x58($sp) -/* 0CF718 80314718 11C50012 */ beq $t6, $a1, .L80314764 -/* 0CF71C 8031471C 00000000 */ nop -/* 0CF720 80314720 AFA5015C */ sw $a1, 0x15c($sp) -/* 0CF724 80314724 8C980000 */ lw $t8, ($a0) -/* 0CF728 80314728 8C990004 */ lw $t9, 4($a0) -/* 0CF72C 8031472C 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* 0CF730 80314730 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0CF734 80314734 03380019 */ multu $t9, $t8 -/* 0CF738 80314738 02801025 */ move $v0, $s4 -/* 0CF73C 8031473C 26940008 */ addiu $s4, $s4, 8 -/* 0CF740 80314740 00001812 */ mflo $v1 -/* 0CF744 80314744 00037900 */ sll $t7, $v1, 4 -/* 0CF748 80314748 01E17024 */ and $t6, $t7, $at -/* 0CF74C 8031474C 3C010B00 */ lui $at, 0xb00 -/* 0CF750 80314750 01C1C825 */ or $t9, $t6, $at -/* 0CF754 80314754 AC590000 */ sw $t9, ($v0) -/* 0CF758 80314758 8FB8015C */ lw $t8, 0x15c($sp) -/* 0CF75C 8031475C 031F7821 */ addu $t7, $t8, $ra -/* 0CF760 80314760 AC4F0004 */ sw $t7, 4($v0) -.L80314764: -/* 0CF764 80314764 11A00101 */ beqz $t5, .L80314B6C -/* 0CF768 80314768 8FA20058 */ lw $v0, 0x58($sp) -/* 0CF76C 8031476C AFA20058 */ sw $v0, 0x58($sp) -/* 0CF770 80314770 8EE90014 */ lw $t1, 0x14($s7) -.L80314774: -/* 0CF774 80314774 8FAE0110 */ lw $t6, 0x110($sp) -/* 0CF778 80314778 01BE2023 */ subu $a0, $t5, $fp -/* 0CF77C 8031477C 3132000F */ andi $s2, $t1, 0xf -/* 0CF780 80314780 00005025 */ move $t2, $zero -/* 0CF784 80314784 00005825 */ move $t3, $zero -/* 0CF788 80314788 00806025 */ move $t4, $a0 -/* 0CF78C 8031478C 16400006 */ bnez $s2, .L803147A8 -/* 0CF790 80314790 01C91823 */ subu $v1, $t6, $t1 -/* 0CF794 80314794 8EF90000 */ lw $t9, ($s7) -/* 0CF798 80314798 00197880 */ sll $t7, $t9, 2 -/* 0CF79C 8031479C 05E20003 */ bltzl $t7, .L803147AC -/* 0CF7A0 803147A0 240E0010 */ li $t6, 16 -/* 0CF7A4 803147A4 24120010 */ li $s2, 16 -.L803147A8: -/* 0CF7A8 803147A8 240E0010 */ li $t6, 16 -.L803147AC: -/* 0CF7AC 803147AC 01D22823 */ subu $a1, $t6, $s2 -/* 0CF7B0 803147B0 0083082A */ slt $at, $a0, $v1 -/* 0CF7B4 803147B4 1020000C */ beqz $at, .L803147E8 -/* 0CF7B8 803147B8 00A0B025 */ move $s6, $a1 -/* 0CF7BC 803147BC 00851023 */ subu $v0, $a0, $a1 -/* 0CF7C0 803147C0 2442000F */ addiu $v0, $v0, 0xf -/* 0CF7C4 803147C4 04410003 */ bgez $v0, .L803147D4 -/* 0CF7C8 803147C8 0002C903 */ sra $t9, $v0, 4 -/* 0CF7CC 803147CC 2441000F */ addiu $at, $v0, 0xf -/* 0CF7D0 803147D0 0001C903 */ sra $t9, $at, 4 -.L803147D4: -/* 0CF7D4 803147D4 00198100 */ sll $s0, $t9, 4 -/* 0CF7D8 803147D8 00B0C021 */ addu $t8, $a1, $s0 -/* 0CF7DC 803147DC 03204025 */ move $t0, $t9 -/* 0CF7E0 803147E0 10000014 */ b .L80314834 -/* 0CF7E4 803147E4 03049823 */ subu $s3, $t8, $a0 -.L803147E8: -/* 0CF7E8 803147E8 00721021 */ addu $v0, $v1, $s2 -/* 0CF7EC 803147EC 2450FFF0 */ addiu $s0, $v0, -0x10 -/* 0CF7F0 803147F0 1E000003 */ bgtz $s0, .L80314800 -/* 0CF7F4 803147F4 00009825 */ move $s3, $zero -/* 0CF7F8 803147F8 00008025 */ move $s0, $zero -/* 0CF7FC 803147FC 0060B025 */ move $s6, $v1 -.L80314800: -/* 0CF800 80314800 8FAE0160 */ lw $t6, 0x160($sp) -/* 0CF804 80314804 2608000F */ addiu $t0, $s0, 0xf -/* 0CF808 80314808 05010003 */ bgez $t0, .L80314818 -/* 0CF80C 8031480C 00087903 */ sra $t7, $t0, 4 -/* 0CF810 80314810 2501000F */ addiu $at, $t0, 0xf -/* 0CF814 80314814 00017903 */ sra $t7, $at, 4 -.L80314818: -/* 0CF818 80314818 8DD90008 */ lw $t9, 8($t6) -/* 0CF81C 8031481C 01E04025 */ move $t0, $t7 -/* 0CF820 80314820 53200004 */ beql $t9, $zero, .L80314834 -/* 0CF824 80314824 240A0001 */ li $t2, 1 -/* 0CF828 80314828 10000002 */ b .L80314834 -/* 0CF82C 8031482C 240B0001 */ li $t3, 1 -/* 0CF830 80314830 240A0001 */ li $t2, 1 -.L80314834: -/* 0CF834 80314834 11000030 */ beqz $t0, .L803148F8 -/* 0CF838 80314838 24030009 */ li $v1, 9 -/* 0CF83C 8031483C 01321023 */ subu $v0, $t1, $s2 -/* 0CF840 80314840 24420010 */ addiu $v0, $v0, 0x10 -/* 0CF844 80314844 04410003 */ bgez $v0, .L80314854 -/* 0CF848 80314848 0002C103 */ sra $t8, $v0, 4 -/* 0CF84C 8031484C 2441000F */ addiu $at, $v0, 0xf -/* 0CF850 80314850 0001C103 */ sra $t8, $at, 4 -.L80314854: -/* 0CF854 80314854 03030019 */ multu $t8, $v1 -/* 0CF858 80314858 8FAE0120 */ lw $t6, 0x120($sp) -/* 0CF85C 8031485C 8FA60148 */ lw $a2, 0x148($sp) -/* 0CF860 80314860 26E70003 */ addiu $a3, $s7, 3 -/* 0CF864 80314864 AFAA0150 */ sw $t2, 0x150($sp) -/* 0CF868 80314868 AFAB014C */ sw $t3, 0x14c($sp) -/* 0CF86C 8031486C AFAC010C */ sw $t4, 0x10c($sp) -/* 0CF870 80314870 AFAD0118 */ sw $t5, 0x118($sp) -/* 0CF874 80314874 00007812 */ mflo $t7 -/* 0CF878 80314878 01EE2021 */ addu $a0, $t7, $t6 -/* 0CF87C 8031487C 00000000 */ nop -/* 0CF880 80314880 01030019 */ multu $t0, $v1 -/* 0CF884 80314884 00008812 */ mflo $s1 -/* 0CF888 80314888 02202825 */ move $a1, $s1 -/* 0CF88C 8031488C 0C0C5C9C */ jal dma_sample_data -/* 0CF890 80314890 00000000 */ nop -/* 0CF894 80314894 3047000F */ andi $a3, $v0, 0xf -/* 0CF898 80314898 02802025 */ move $a0, $s4 -/* 0CF89C 8031489C 3C190800 */ lui $t9, (0x080003F0 >> 16) # lui $t9, 0x800 -/* 0CF8A0 803148A0 8FAA0150 */ lw $t2, 0x150($sp) -/* 0CF8A4 803148A4 8FAB014C */ lw $t3, 0x14c($sp) -/* 0CF8A8 803148A8 8FAC010C */ lw $t4, 0x10c($sp) -/* 0CF8AC 803148AC 8FAD0118 */ lw $t5, 0x118($sp) -/* 0CF8B0 803148B0 373903F0 */ ori $t9, (0x080003F0 & 0xFFFF) # ori $t9, $t9, 0x3f0 -/* 0CF8B4 803148B4 0227C021 */ addu $t8, $s1, $a3 -/* 0CF8B8 803148B8 330FFFFF */ andi $t7, $t8, 0xffff -/* 0CF8BC 803148BC AC990000 */ sw $t9, ($a0) -/* 0CF8C0 803148C0 26940008 */ addiu $s4, $s4, 8 -/* 0CF8C4 803148C4 3C1F8000 */ lui $ra, 0x8000 -/* 0CF8C8 803148C8 AC8F0004 */ sw $t7, 4($a0) -/* 0CF8CC 803148CC 02802825 */ move $a1, $s4 -/* 0CF8D0 803148D0 0047C823 */ subu $t9, $v0, $a3 -/* 0CF8D4 803148D4 033FC021 */ addu $t8, $t9, $ra -/* 0CF8D8 803148D8 3C0E0400 */ lui $t6, 0x400 -/* 0CF8DC 803148DC ACAE0000 */ sw $t6, ($a1) -/* 0CF8E0 803148E0 ACB80004 */ sw $t8, 4($a1) -/* 0CF8E4 803148E4 8EE60000 */ lw $a2, ($s7) -/* 0CF8E8 803148E8 26940008 */ addiu $s4, $s4, 8 -/* 0CF8EC 803148EC 00067880 */ sll $t7, $a2, 2 -/* 0CF8F0 803148F0 10000006 */ b .L8031490C -/* 0CF8F4 803148F4 000F37C2 */ srl $a2, $t7, 0x1f -.L803148F8: -/* 0CF8F8 803148F8 8EE60000 */ lw $a2, ($s7) -/* 0CF8FC 803148FC 00008025 */ move $s0, $zero -/* 0CF900 80314900 00003825 */ move $a3, $zero -/* 0CF904 80314904 0006C880 */ sll $t9, $a2, 2 -/* 0CF908 80314908 001937C2 */ srl $a2, $t9, 0x1f -.L8031490C: -/* 0CF90C 8031490C 10C0000F */ beqz $a2, .L8031494C -/* 0CF910 80314910 02801025 */ move $v0, $s4 -/* 0CF914 80314914 3C0F0F00 */ lui $t7, 0xf00 -/* 0CF918 80314918 AC4F0000 */ sw $t7, ($v0) -/* 0CF91C 8031491C 8FAE0164 */ lw $t6, 0x164($sp) -/* 0CF920 80314920 3C018000 */ lui $at, (0x80000010 >> 16) # lui $at, 0x8000 -/* 0CF924 80314924 34210010 */ ori $at, (0x80000010 & 0xFFFF) # ori $at, $at, 0x10 -/* 0CF928 80314928 8DD90008 */ lw $t9, 8($t6) -/* 0CF92C 8031492C 240F0002 */ li $t7, 2 -/* 0CF930 80314930 26940008 */ addiu $s4, $s4, 8 -/* 0CF934 80314934 0321C021 */ addu $t8, $t9, $at -/* 0CF938 80314938 AC580004 */ sw $t8, 4($v0) -/* 0CF93C 8031493C AFAF0148 */ sw $t7, 0x148($sp) -/* 0CF940 80314940 92EE0000 */ lbu $t6, ($s7) -/* 0CF944 80314944 31D9FFDF */ andi $t9, $t6, 0xffdf -/* 0CF948 80314948 A2F90000 */ sb $t9, ($s7) -.L8031494C: -/* 0CF94C 8031494C 17C0001B */ bnez $fp, .L803149BC -/* 0CF950 80314950 02801025 */ move $v0, $s4 -/* 0CF954 80314954 24F803F0 */ addiu $t8, $a3, 0x3f0 -/* 0CF958 80314958 330FFFFF */ andi $t7, $t8, 0xffff -/* 0CF95C 8031495C 3C010800 */ lui $at, 0x800 -/* 0CF960 80314960 01E17025 */ or $t6, $t7, $at -/* 0CF964 80314964 00103040 */ sll $a2, $s0, 1 -/* 0CF968 80314968 30D9FFFF */ andi $t9, $a2, 0xffff -/* 0CF96C 8031496C 3C010180 */ lui $at, 0x180 -/* 0CF970 80314970 02801025 */ move $v0, $s4 -/* 0CF974 80314974 0321C025 */ or $t8, $t9, $at -/* 0CF978 80314978 AC580004 */ sw $t8, 4($v0) -/* 0CF97C 8031497C AC4E0000 */ sw $t6, ($v0) -/* 0CF980 80314980 8FAF0148 */ lw $t7, 0x148($sp) -/* 0CF984 80314984 26940008 */ addiu $s4, $s4, 8 -/* 0CF988 80314988 3C010100 */ lui $at, 0x100 -/* 0CF98C 8031498C 31EE00FF */ andi $t6, $t7, 0xff -/* 0CF990 80314990 000ECC00 */ sll $t9, $t6, 0x10 -/* 0CF994 80314994 0321C025 */ or $t8, $t9, $at -/* 0CF998 80314998 02801825 */ move $v1, $s4 -/* 0CF99C 8031499C AC780000 */ sw $t8, ($v1) -/* 0CF9A0 803149A0 8EEF0034 */ lw $t7, 0x34($s7) -/* 0CF9A4 803149A4 0012C840 */ sll $t9, $s2, 1 -/* 0CF9A8 803149A8 26940008 */ addiu $s4, $s4, 8 -/* 0CF9AC 803149AC 01FF7021 */ addu $t6, $t7, $ra -/* 0CF9B0 803149B0 AC6E0004 */ sw $t6, 4($v1) -/* 0CF9B4 803149B4 1000002F */ b .L80314A74 -/* 0CF9B8 803149B8 AFB90130 */ sw $t9, 0x130($sp) -.L803149BC: -/* 0CF9BC 803149BC 24F803F0 */ addiu $t8, $a3, 0x3f0 -/* 0CF9C0 803149C0 330FFFFF */ andi $t7, $t8, 0xffff -/* 0CF9C4 803149C4 3C010800 */ lui $at, 0x800 -/* 0CF9C8 803149C8 01E17025 */ or $t6, $t7, $at -/* 0CF9CC 803149CC 2401FFE0 */ li $at, -32 -/* 0CF9D0 803149D0 26A3001F */ addiu $v1, $s5, 0x1f -/* 0CF9D4 803149D4 0061C824 */ and $t9, $v1, $at -/* 0CF9D8 803149D8 272F0180 */ addiu $t7, $t9, 0x180 -/* 0CF9DC 803149DC 03201825 */ move $v1, $t9 -/* 0CF9E0 803149E0 AC4E0000 */ sw $t6, ($v0) -/* 0CF9E4 803149E4 00103040 */ sll $a2, $s0, 1 -/* 0CF9E8 803149E8 30D9FFFF */ andi $t9, $a2, 0xffff -/* 0CF9EC 803149EC 000F7400 */ sll $t6, $t7, 0x10 -/* 0CF9F0 803149F0 01D9C025 */ or $t8, $t6, $t9 -/* 0CF9F4 803149F4 AC580004 */ sw $t8, 4($v0) -/* 0CF9F8 803149F8 8FAF0148 */ lw $t7, 0x148($sp) -/* 0CF9FC 803149FC 26940008 */ addiu $s4, $s4, 8 -/* 0CFA00 80314A00 3C010100 */ lui $at, 0x100 -/* 0CFA04 80314A04 31EE00FF */ andi $t6, $t7, 0xff -/* 0CFA08 80314A08 000ECC00 */ sll $t9, $t6, 0x10 -/* 0CFA0C 80314A0C 0321C025 */ or $t8, $t9, $at -/* 0CFA10 80314A10 02802025 */ move $a0, $s4 -/* 0CFA14 80314A14 AC980000 */ sw $t8, ($a0) -/* 0CFA18 80314A18 8EEF0034 */ lw $t7, 0x34($s7) -/* 0CFA1C 80314A1C 0012C840 */ sll $t9, $s2, 1 -/* 0CFA20 80314A20 0079C021 */ addu $t8, $v1, $t9 -/* 0CFA24 80314A24 01FF7021 */ addu $t6, $t7, $ra -/* 0CFA28 80314A28 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* 0CFA2C 80314A2C AC8E0004 */ sw $t6, 4($a0) -/* 0CFA30 80314A30 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0CFA34 80314A34 270F0180 */ addiu $t7, $t8, 0x180 -/* 0CFA38 80314A38 01E17024 */ and $t6, $t7, $at -/* 0CFA3C 80314A3C 26940008 */ addiu $s4, $s4, 8 -/* 0CFA40 80314A40 3C010A00 */ lui $at, 0xa00 -/* 0CFA44 80314A44 01C1C825 */ or $t9, $t6, $at -/* 0CFA48 80314A48 02802825 */ move $a1, $s4 -/* 0CFA4C 80314A4C ACB90000 */ sw $t9, ($a1) -/* 0CFA50 80314A50 0216C821 */ addu $t9, $s0, $s6 -/* 0CFA54 80314A54 26AF0180 */ addiu $t7, $s5, 0x180 -/* 0CFA58 80314A58 000F7400 */ sll $t6, $t7, 0x10 -/* 0CFA5C 80314A5C 0333C023 */ subu $t8, $t9, $s3 -/* 0CFA60 80314A60 00187840 */ sll $t7, $t8, 1 -/* 0CFA64 80314A64 31F9FFFF */ andi $t9, $t7, 0xffff -/* 0CFA68 80314A68 01D9C025 */ or $t8, $t6, $t9 -/* 0CFA6C 80314A6C ACB80004 */ sw $t8, 4($a1) -/* 0CFA70 80314A70 26940008 */ addiu $s4, $s4, 8 -.L80314A74: -/* 0CFA74 80314A74 8FB90148 */ lw $t9, 0x148($sp) -/* 0CFA78 80314A78 03D07821 */ addu $t7, $fp, $s0 -/* 0CFA7C 80314A7C 01F67021 */ addu $t6, $t7, $s6 -/* 0CFA80 80314A80 24010001 */ li $at, 1 -/* 0CFA84 80314A84 13210008 */ beq $t9, $at, .L80314AA8 -/* 0CFA88 80314A88 01D3F023 */ subu $fp, $t6, $s3 -/* 0CFA8C 80314A8C 3B220002 */ xori $v0, $t9, 2 -/* 0CFA90 80314A90 0216C021 */ addu $t8, $s0, $s6 -/* 0CFA94 80314A94 03131823 */ subu $v1, $t8, $s3 -/* 0CFA98 80314A98 10400007 */ beqz $v0, .L80314AB8 -/* 0CFA9C 80314A9C AFA00148 */ sw $zero, 0x148($sp) -/* 0CFAA0 80314AA0 10000008 */ b .L80314AC4 -/* 0CFAA4 80314AA4 00037040 */ sll $t6, $v1, 1 -.L80314AA8: -/* 0CFAA8 80314AA8 AFA00130 */ sw $zero, 0x130($sp) -/* 0CFAAC 80314AAC 02A6A821 */ addu $s5, $s5, $a2 -/* 0CFAB0 80314AB0 1000000B */ b .L80314AE0 -/* 0CFAB4 80314AB4 AFA00148 */ sw $zero, 0x148($sp) -.L80314AB8: -/* 0CFAB8 80314AB8 00037840 */ sll $t7, $v1, 1 -/* 0CFABC 80314ABC 10000008 */ b .L80314AE0 -/* 0CFAC0 80314AC0 02AFA821 */ addu $s5, $s5, $t7 -.L80314AC4: -/* 0CFAC4 80314AC4 52A00004 */ beql $s5, $zero, .L80314AD8 -/* 0CFAC8 80314AC8 0072A821 */ addu $s5, $v1, $s2 -/* 0CFACC 80314ACC 10000004 */ b .L80314AE0 -/* 0CFAD0 80314AD0 02AEA821 */ addu $s5, $s5, $t6 -/* 0CFAD4 80314AD4 0072A821 */ addu $s5, $v1, $s2 -.L80314AD8: -/* 0CFAD8 80314AD8 0015C840 */ sll $t9, $s5, 1 -/* 0CFADC 80314ADC 0320A825 */ move $s5, $t9 -.L80314AE0: -/* 0CFAE0 80314AE0 11400014 */ beqz $t2, .L80314B34 -/* 0CFAE4 80314AE4 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* 0CFAE8 80314AE8 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0CFAEC 80314AEC 26B80180 */ addiu $t8, $s5, 0x180 -/* 0CFAF0 80314AF0 03017824 */ and $t7, $t8, $at -/* 0CFAF4 80314AF4 3C010200 */ lui $at, 0x200 -/* 0CFAF8 80314AF8 02801025 */ move $v0, $s4 -/* 0CFAFC 80314AFC 01BEC823 */ subu $t9, $t5, $fp -/* 0CFB00 80314B00 0019C040 */ sll $t8, $t9, 1 -/* 0CFB04 80314B04 01E17025 */ or $t6, $t7, $at -/* 0CFB08 80314B08 AC4E0000 */ sw $t6, ($v0) -/* 0CFB0C 80314B0C AC580004 */ sw $t8, 4($v0) -/* 0CFB10 80314B10 92EE0000 */ lbu $t6, ($s7) -/* 0CFB14 80314B14 26940008 */ addiu $s4, $s4, 8 -/* 0CFB18 80314B18 AEE00014 */ sw $zero, 0x14($s7) -/* 0CFB1C 80314B1C 35D90010 */ ori $t9, $t6, 0x10 -/* 0CFB20 80314B20 A2F90000 */ sb $t9, ($s7) -/* 0CFB24 80314B24 92F80000 */ lbu $t8, ($s7) -/* 0CFB28 80314B28 330FFF7F */ andi $t7, $t8, 0xff7f -/* 0CFB2C 80314B2C 1000000F */ b .L80314B6C -/* 0CFB30 80314B30 A2EF0000 */ sb $t7, ($s7) -.L80314B34: -/* 0CFB34 80314B34 51600009 */ beql $t3, $zero, .L80314B5C -/* 0CFB38 80314B38 8EF90014 */ lw $t9, 0x14($s7) -/* 0CFB3C 80314B3C 92F90000 */ lbu $t9, ($s7) -/* 0CFB40 80314B40 37380020 */ ori $t8, $t9, 0x20 -/* 0CFB44 80314B44 A2F80000 */ sb $t8, ($s7) -/* 0CFB48 80314B48 8FAF0160 */ lw $t7, 0x160($sp) -/* 0CFB4C 80314B4C 8DEE0000 */ lw $t6, ($t7) -/* 0CFB50 80314B50 10000004 */ b .L80314B64 -/* 0CFB54 80314B54 AEEE0014 */ sw $t6, 0x14($s7) -/* 0CFB58 80314B58 8EF90014 */ lw $t9, 0x14($s7) -.L80314B5C: -/* 0CFB5C 80314B5C 032CC021 */ addu $t8, $t9, $t4 -/* 0CFB60 80314B60 AEF80014 */ sw $t8, 0x14($s7) -.L80314B64: -/* 0CFB64 80314B64 57CDFF03 */ bnel $fp, $t5, .L80314774 -/* 0CFB68 80314B68 8EE90014 */ lw $t1, 0x14($s7) -.L80314B6C: -/* 0CFB6C 80314B6C 8FAF0054 */ lw $t7, 0x54($sp) -/* 0CFB70 80314B70 8FAE00E8 */ lw $t6, 0xe8($sp) -/* 0CFB74 80314B74 24010002 */ li $at, 2 -/* 0CFB78 80314B78 15E00008 */ bnez $t7, .L80314B9C -/* 0CFB7C 80314B7C 8FB80130 */ lw $t8, 0x130($sp) -/* 0CFB80 80314B80 11C1000D */ beq $t6, $at, .L80314BB8 -/* 0CFB84 80314B84 8FB900E4 */ lw $t9, 0xe4($sp) -/* 0CFB88 80314B88 8EE50000 */ lw $a1, ($s7) -/* 0CFB8C 80314B8C 000530C0 */ sll $a2, $a1, 3 -/* 0CFB90 80314B90 0006CFC2 */ srl $t9, $a2, 0x1f -/* 0CFB94 80314B94 10000066 */ b .L80314D30 -/* 0CFB98 80314B98 03203025 */ move $a2, $t9 -.L80314B9C: -/* 0CFB9C 80314B9C 270F0180 */ addiu $t7, $t8, 0x180 -/* 0CFBA0 80314BA0 A7AF00D6 */ sh $t7, 0xd6($sp) -/* 0CFBA4 80314BA4 8EE50000 */ lw $a1, ($s7) -/* 0CFBA8 80314BA8 000530C0 */ sll $a2, $a1, 3 -/* 0CFBAC 80314BAC 000677C2 */ srl $t6, $a2, 0x1f -/* 0CFBB0 80314BB0 1000005F */ b .L80314D30 -/* 0CFBB4 80314BB4 01C03025 */ move $a2, $t6 -.L80314BB8: -/* 0CFBB8 80314BB8 13200009 */ beqz $t9, .L80314BE0 -/* 0CFBBC 80314BBC 02801025 */ move $v0, $s4 -/* 0CFBC0 80314BC0 24010001 */ li $at, 1 -/* 0CFBC4 80314BC4 13210034 */ beq $t9, $at, .L80314C98 -/* 0CFBC8 80314BC8 02801025 */ move $v0, $s4 -/* 0CFBCC 80314BCC 8EE50000 */ lw $a1, ($s7) -/* 0CFBD0 80314BD0 000530C0 */ sll $a2, $a1, 3 -/* 0CFBD4 80314BD4 0006C7C2 */ srl $t8, $a2, 0x1f -/* 0CFBD8 80314BD8 10000055 */ b .L80314D30 -/* 0CFBDC 80314BDC 03003025 */ move $a2, $t8 -.L80314BE0: -/* 0CFBE0 80314BE0 8FAF0130 */ lw $t7, 0x130($sp) -/* 0CFBE4 80314BE4 3C010800 */ lui $at, 0x800 -/* 0CFBE8 80314BE8 25A30004 */ addiu $v1, $t5, 4 -/* 0CFBEC 80314BEC 25EE0180 */ addiu $t6, $t7, 0x180 -/* 0CFBF0 80314BF0 31D9FFFF */ andi $t9, $t6, 0xffff -/* 0CFBF4 80314BF4 0321C025 */ or $t8, $t9, $at -/* 0CFBF8 80314BF8 3C010020 */ lui $at, 0x20 -/* 0CFBFC 80314BFC 306FFFFF */ andi $t7, $v1, 0xffff -/* 0CFC00 80314C00 01E17025 */ or $t6, $t7, $at -/* 0CFC04 80314C04 26940008 */ addiu $s4, $s4, 8 -/* 0CFC08 80314C08 3C190501 */ lui $t9, (0x0501FF60 >> 16) # lui $t9, 0x501 -/* 0CFC0C 80314C0C AC4E0004 */ sw $t6, 4($v0) -/* 0CFC10 80314C10 AC580000 */ sw $t8, ($v0) -/* 0CFC14 80314C14 3739FF60 */ ori $t9, (0x0501FF60 & 0xFFFF) # ori $t9, $t9, 0xff60 -/* 0CFC18 80314C18 02802025 */ move $a0, $s4 -/* 0CFC1C 80314C1C AC990000 */ sw $t9, ($a0) -/* 0CFC20 80314C20 8EF80034 */ lw $t8, 0x34($s7) -/* 0CFC24 80314C24 3C018000 */ lui $at, (0x800000F0 >> 16) # lui $at, 0x8000 -/* 0CFC28 80314C28 342100F0 */ ori $at, (0x800000F0 & 0xFFFF) # ori $at, $at, 0xf0 -/* 0CFC2C 80314C2C 03017821 */ addu $t7, $t8, $at -/* 0CFC30 80314C30 AC8F0004 */ sw $t7, 4($a0) -/* 0CFC34 80314C34 240E0024 */ li $t6, 36 -/* 0CFC38 80314C38 AFA300D8 */ sw $v1, 0xd8($sp) -/* 0CFC3C 80314C3C A7AE00D6 */ sh $t6, 0xd6($sp) -/* 0CFC40 80314C40 8EE50000 */ lw $a1, ($s7) -/* 0CFC44 80314C44 26940008 */ addiu $s4, $s4, 8 -/* 0CFC48 80314C48 02801025 */ move $v0, $s4 -/* 0CFC4C 80314C4C 000530C0 */ sll $a2, $a1, 3 -/* 0CFC50 80314C50 0006CFC2 */ srl $t9, $a2, 0x1f -/* 0CFC54 80314C54 13200036 */ beqz $t9, .L80314D30 -/* 0CFC58 80314C58 03203025 */ move $a2, $t9 -/* 0CFC5C 80314C5C 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* 0CFC60 80314C60 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0CFC64 80314C64 25B80024 */ addiu $t8, $t5, 0x24 -/* 0CFC68 80314C68 03017824 */ and $t7, $t8, $at -/* 0CFC6C 80314C6C 3C010200 */ lui $at, 0x200 -/* 0CFC70 80314C70 01E17025 */ or $t6, $t7, $at -/* 0CFC74 80314C74 25B90010 */ addiu $t9, $t5, 0x10 -/* 0CFC78 80314C78 AC590004 */ sw $t9, 4($v0) -/* 0CFC7C 80314C7C AC4E0000 */ sw $t6, ($v0) -/* 0CFC80 80314C80 8EE50000 */ lw $a1, ($s7) -/* 0CFC84 80314C84 26940008 */ addiu $s4, $s4, 8 -/* 0CFC88 80314C88 000530C0 */ sll $a2, $a1, 3 -/* 0CFC8C 80314C8C 0006C7C2 */ srl $t8, $a2, 0x1f -/* 0CFC90 80314C90 10000027 */ b .L80314D30 -/* 0CFC94 80314C94 03003025 */ move $a2, $t8 -.L80314C98: -/* 0CFC98 80314C98 8FAF0130 */ lw $t7, 0x130($sp) -/* 0CFC9C 80314C9C 3C010800 */ lui $at, 0x800 -/* 0CFCA0 80314CA0 26940008 */ addiu $s4, $s4, 8 -/* 0CFCA4 80314CA4 25EE0180 */ addiu $t6, $t7, 0x180 -/* 0CFCA8 80314CA8 31D9FFFF */ andi $t9, $t6, 0xffff -/* 0CFCAC 80314CAC 0321C025 */ or $t8, $t9, $at -/* 0CFCB0 80314CB0 25AF0008 */ addiu $t7, $t5, 8 -/* 0CFCB4 80314CB4 31EEFFFF */ andi $t6, $t7, 0xffff -/* 0CFCB8 80314CB8 AC580000 */ sw $t8, ($v0) -/* 0CFCBC 80314CBC 3C010160 */ lui $at, 0x160 -/* 0CFCC0 80314CC0 01C1C825 */ or $t9, $t6, $at -/* 0CFCC4 80314CC4 3C180501 */ lui $t8, (0x0501FF60 >> 16) # lui $t8, 0x501 -/* 0CFCC8 80314CC8 AC590004 */ sw $t9, 4($v0) -/* 0CFCCC 80314CCC 3718FF60 */ ori $t8, (0x0501FF60 & 0xFFFF) # ori $t8, $t8, 0xff60 -/* 0CFCD0 80314CD0 02801825 */ move $v1, $s4 -/* 0CFCD4 80314CD4 AC780000 */ sw $t8, ($v1) -/* 0CFCD8 80314CD8 8EEF0034 */ lw $t7, 0x34($s7) -/* 0CFCDC 80314CDC 3C018000 */ lui $at, (0x800000F0 >> 16) # lui $at, 0x8000 -/* 0CFCE0 80314CE0 342100F0 */ ori $at, (0x800000F0 & 0xFFFF) # ori $at, $at, 0xf0 -/* 0CFCE4 80314CE4 26940008 */ addiu $s4, $s4, 8 -/* 0CFCE8 80314CE8 3C190A00 */ lui $t9, (0x0A000164 >> 16) # lui $t9, 0xa00 -/* 0CFCEC 80314CEC 01E17021 */ addu $t6, $t7, $at -/* 0CFCF0 80314CF0 AC6E0004 */ sw $t6, 4($v1) -/* 0CFCF4 80314CF4 37390164 */ ori $t9, (0x0A000164 & 0xFFFF) # ori $t9, $t9, 0x164 -/* 0CFCF8 80314CF8 02802025 */ move $a0, $s4 -/* 0CFCFC 80314CFC AC990000 */ sw $t9, ($a0) -/* 0CFD00 80314D00 8FB800D8 */ lw $t8, 0xd8($sp) -/* 0CFD04 80314D04 26940008 */ addiu $s4, $s4, 8 -/* 0CFD08 80314D08 270E0020 */ addiu $t6, $t8, 0x20 -/* 0CFD0C 80314D0C 25B80004 */ addiu $t8, $t5, 4 -/* 0CFD10 80314D10 330FFFFF */ andi $t7, $t8, 0xffff -/* 0CFD14 80314D14 000ECC00 */ sll $t9, $t6, 0x10 -/* 0CFD18 80314D18 032F7025 */ or $t6, $t9, $t7 -/* 0CFD1C 80314D1C AC8E0004 */ sw $t6, 4($a0) -/* 0CFD20 80314D20 8EE50000 */ lw $a1, ($s7) -/* 0CFD24 80314D24 000530C0 */ sll $a2, $a1, 3 -/* 0CFD28 80314D28 0006C7C2 */ srl $t8, $a2, 0x1f -/* 0CFD2C 80314D2C 03003025 */ move $a2, $t8 -.L80314D30: -/* 0CFD30 80314D30 10C00003 */ beqz $a2, .L80314D40 -/* 0CFD34 80314D34 8FA200E4 */ lw $v0, 0xe4($sp) -/* 0CFD38 80314D38 10000008 */ b .L80314D5C -/* 0CFD3C 80314D3C AFA00148 */ sw $zero, 0x148($sp) -.L80314D40: -/* 0CFD40 80314D40 8FB900E8 */ lw $t9, 0xe8($sp) -/* 0CFD44 80314D44 24420001 */ addiu $v0, $v0, 1 -/* 0CFD48 80314D48 AFA200E4 */ sw $v0, 0xe4($sp) -/* 0CFD4C 80314D4C 5459FE5D */ bnel $v0, $t9, .L803146C4 -/* 0CFD50 80314D50 8FA60164 */ lw $a2, 0x164($sp) -.L80314D54: -/* 0CFD54 80314D54 AFA00148 */ sw $zero, 0x148($sp) -/* 0CFD58 80314D58 8EE50000 */ lw $a1, ($s7) -.L80314D5C: -/* 0CFD5C 80314D5C 00057840 */ sll $t7, $a1, 1 -/* 0CFD60 80314D60 000F77C2 */ srl $t6, $t7, 0x1f -/* 0CFD64 80314D64 24010001 */ li $at, 1 -/* 0CFD68 80314D68 15C10006 */ bne $t6, $at, .L80314D84 -/* 0CFD6C 80314D6C 02802025 */ move $a0, $s4 -/* 0CFD70 80314D70 24180001 */ li $t8, 1 -/* 0CFD74 80314D74 AFB80148 */ sw $t8, 0x148($sp) -/* 0CFD78 80314D78 92F90000 */ lbu $t9, ($s7) -/* 0CFD7C 80314D7C 332FFFBF */ andi $t7, $t9, 0xffbf -/* 0CFD80 80314D80 A2EF0000 */ sb $t7, ($s7) -.L80314D84: -/* 0CFD84 80314D84 8FB10048 */ lw $s1, 0x48($sp) -/* 0CFD88 80314D88 97AE00D6 */ lhu $t6, 0xd6($sp) -/* 0CFD8C 80314D8C 8FB80148 */ lw $t8, 0x148($sp) -/* 0CFD90 80314D90 02E02825 */ move $a1, $s7 -/* 0CFD94 80314D94 97A7005E */ lhu $a3, 0x5e($sp) -/* 0CFD98 80314D98 02203025 */ move $a2, $s1 -/* 0CFD9C 80314D9C AFAE0010 */ sw $t6, 0x10($sp) -/* 0CFDA0 80314DA0 0C0C53F5 */ jal final_resample -/* 0CFDA4 80314DA4 AFB80014 */ sw $t8, 0x14($sp) -/* 0CFDA8 80314DA8 96F9000C */ lhu $t9, 0xc($s7) -/* 0CFDAC 80314DAC 0040A025 */ move $s4, $v0 -/* 0CFDB0 80314DB0 02802025 */ move $a0, $s4 -/* 0CFDB4 80314DB4 17200004 */ bnez $t9, .L80314DC8 -/* 0CFDB8 80314DB8 02E02825 */ move $a1, $s7 -/* 0CFDBC 80314DBC 96EF0010 */ lhu $t7, 0x10($s7) -/* 0CFDC0 80314DC0 51E00004 */ beql $t7, $zero, .L80314DD4 -/* 0CFDC4 80314DC4 96EE000E */ lhu $t6, 0xe($s7) -.L80314DC8: -/* 0CFDC8 80314DC8 1000000A */ b .L80314DF4 -/* 0CFDCC 80314DCC 24100001 */ li $s0, 1 -/* 0CFDD0 80314DD0 96EE000E */ lhu $t6, 0xe($s7) -.L80314DD4: -/* 0CFDD4 80314DD4 15C00005 */ bnez $t6, .L80314DEC -/* 0CFDD8 80314DD8 00000000 */ nop -/* 0CFDDC 80314DDC 96F80012 */ lhu $t8, 0x12($s7) -/* 0CFDE0 80314DE0 00008025 */ move $s0, $zero -/* 0CFDE4 80314DE4 13000003 */ beqz $t8, .L80314DF4 -/* 0CFDE8 80314DE8 00000000 */ nop -.L80314DEC: -/* 0CFDEC 80314DEC 10000001 */ b .L80314DF4 -/* 0CFDF0 80314DF0 24100002 */ li $s0, 2 -.L80314DF4: -/* 0CFDF4 80314DF4 8FB90148 */ lw $t9, 0x148($sp) -/* 0CFDF8 80314DF8 8FA6017C */ lw $a2, 0x17c($sp) -/* 0CFDFC 80314DFC 00003825 */ move $a3, $zero -/* 0CFE00 80314E00 AFB00010 */ sw $s0, 0x10($sp) -/* 0CFE04 80314E04 0C0C540C */ jal process_envelope -/* 0CFE08 80314E08 AFB90014 */ sw $t9, 0x14($sp) -/* 0CFE0C 80314E0C 92EF0001 */ lbu $t7, 1($s7) -/* 0CFE10 80314E10 3C1F8000 */ lui $ra, 0x8000 -/* 0CFE14 80314E14 0040A025 */ move $s4, $v0 -/* 0CFE18 80314E18 11E00008 */ beqz $t7, .L80314E3C -/* 0CFE1C 80314E1C 00402025 */ move $a0, $v0 -/* 0CFE20 80314E20 02E02825 */ move $a1, $s7 -/* 0CFE24 80314E24 02203025 */ move $a2, $s1 -/* 0CFE28 80314E28 8FA70148 */ lw $a3, 0x148($sp) -/* 0CFE2C 80314E2C 0C0C557D */ jal note_apply_headset_pan_effects -/* 0CFE30 80314E30 AFB00010 */ sw $s0, 0x10($sp) -/* 0CFE34 80314E34 3C1F8000 */ lui $ra, 0x8000 -/* 0CFE38 80314E38 0040A025 */ move $s4, $v0 -.L80314E3C: -/* 0CFE3C 80314E3C 8FAE0174 */ lw $t6, 0x174($sp) -.L80314E40: -/* 0CFE40 80314E40 8FB9006C */ lw $t9, 0x6c($sp) -/* 0CFE44 80314E44 25D80001 */ addiu $t8, $t6, 1 -/* 0CFE48 80314E48 3C0E8022 */ lui $t6, %hi(gMaxSimultaneousNotes) # $t6, 0x8022 -/* 0CFE4C 80314E4C 8DCE6D70 */ lw $t6, %lo(gMaxSimultaneousNotes)($t6) -/* 0CFE50 80314E50 272F00C0 */ addiu $t7, $t9, 0xc0 -/* 0CFE54 80314E54 AFAF006C */ sw $t7, 0x6c($sp) -/* 0CFE58 80314E58 030E082A */ slt $at, $t8, $t6 -/* 0CFE5C 80314E5C 1420FD9D */ bnez $at, .L803144D4 -/* 0CFE60 80314E60 AFB80174 */ sw $t8, 0x174($sp) -.L80314E64: -/* 0CFE64 80314E64 3C080800 */ lui $t0, 0x800 -/* 0CFE68 80314E68 02802025 */ move $a0, $s4 -/* 0CFE6C 80314E6C AC880000 */ sw $t0, ($a0) -/* 0CFE70 80314E70 8FA3017C */ lw $v1, 0x17c($sp) -/* 0CFE74 80314E74 26940008 */ addiu $s4, $s4, 8 -/* 0CFE78 80314E78 02802825 */ move $a1, $s4 -/* 0CFE7C 80314E7C 0003C840 */ sll $t9, $v1, 1 -/* 0CFE80 80314E80 332FFFFF */ andi $t7, $t9, 0xffff -/* 0CFE84 80314E84 AC8F0004 */ sw $t7, 4($a0) -/* 0CFE88 80314E88 26940008 */ addiu $s4, $s4, 8 -/* 0CFE8C 80314E8C 3C180D00 */ lui $t8, 0xd00 -/* 0CFE90 80314E90 3C0E04C0 */ lui $t6, (0x04C00600 >> 16) # lui $t6, 0x4c0 -/* 0CFE94 80314E94 35CE0600 */ ori $t6, (0x04C00600 & 0xFFFF) # ori $t6, $t6, 0x600 -/* 0CFE98 80314E98 ACB80000 */ sw $t8, ($a1) -/* 0CFE9C 80314E9C 02803025 */ move $a2, $s4 -/* 0CFEA0 80314EA0 ACAE0004 */ sw $t6, 4($a1) -/* 0CFEA4 80314EA4 0019C840 */ sll $t9, $t9, 1 -/* 0CFEA8 80314EA8 332FFFFF */ andi $t7, $t9, 0xffff -/* 0CFEAC 80314EAC 26940008 */ addiu $s4, $s4, 8 -/* 0CFEB0 80314EB0 ACCF0004 */ sw $t7, 4($a2) -/* 0CFEB4 80314EB4 ACC80000 */ sw $t0, ($a2) -/* 0CFEB8 80314EB8 02803825 */ move $a3, $s4 -/* 0CFEBC 80314EBC 3C180600 */ lui $t8, 0x600 -/* 0CFEC0 80314EC0 ACF80000 */ sw $t8, ($a3) -/* 0CFEC4 80314EC4 8FAE0178 */ lw $t6, 0x178($sp) -/* 0CFEC8 80314EC8 3C1F8000 */ lui $ra, 0x8000 -/* 0CFECC 80314ECC 26820008 */ addiu $v0, $s4, 8 -/* 0CFED0 80314ED0 01DFC821 */ addu $t9, $t6, $ra -/* 0CFED4 80314ED4 ACF90004 */ sw $t9, 4($a3) -/* 0CFED8 80314ED8 8FBF0044 */ lw $ra, 0x44($sp) -/* 0CFEDC 80314EDC 8FBE0040 */ lw $fp, 0x40($sp) -/* 0CFEE0 80314EE0 8FB7003C */ lw $s7, 0x3c($sp) -/* 0CFEE4 80314EE4 8FB60038 */ lw $s6, 0x38($sp) -/* 0CFEE8 80314EE8 8FB50034 */ lw $s5, 0x34($sp) -/* 0CFEEC 80314EEC 8FB40030 */ lw $s4, 0x30($sp) -/* 0CFEF0 80314EF0 8FB3002C */ lw $s3, 0x2c($sp) -/* 0CFEF4 80314EF4 8FB20028 */ lw $s2, 0x28($sp) -/* 0CFEF8 80314EF8 8FB10024 */ lw $s1, 0x24($sp) -/* 0CFEFC 80314EFC 8FB00020 */ lw $s0, 0x20($sp) -/* 0CFF00 80314F00 03E00008 */ jr $ra -/* 0CFF04 80314F04 27BD0178 */ addiu $sp, $sp, 0x178 diff --git a/asm/non_matchings/synthesis_process_notes_us.s b/asm/non_matchings/synthesis_process_notes_us.s deleted file mode 100644 index 6e6638ca..00000000 --- a/asm/non_matchings/synthesis_process_notes_us.s +++ /dev/null @@ -1,733 +0,0 @@ -.late_rodata -glabel D_80337BB0 - .word 0x3FFFFEB0, 0x3FFFFEB0 -glabel D_80337BB8 - .word 0x407FFEDA, 0x407FFEDA -.text - -glabel synthesis_process_notes -/* 0D0590 80315590 27BDFE90 */ addiu $sp, $sp, -0x170 -/* 0D0594 80315594 3C0E8022 */ lui $t6, %hi(gMaxSimultaneousNotes) # $t6, 0x8022 -/* 0D0598 80315598 8DCE6B70 */ lw $t6, %lo(gMaxSimultaneousNotes)($t6) -/* 0D059C 8031559C AFB40030 */ sw $s4, 0x30($sp) -/* 0D05A0 803155A0 00C0A025 */ move $s4, $a2 -/* 0D05A4 803155A4 AFBF0044 */ sw $ra, 0x44($sp) -/* 0D05A8 803155A8 AFBE0040 */ sw $fp, 0x40($sp) -/* 0D05AC 803155AC AFB7003C */ sw $s7, 0x3c($sp) -/* 0D05B0 803155B0 AFB60038 */ sw $s6, 0x38($sp) -/* 0D05B4 803155B4 AFB50034 */ sw $s5, 0x34($sp) -/* 0D05B8 803155B8 AFB3002C */ sw $s3, 0x2c($sp) -/* 0D05BC 803155BC AFB20028 */ sw $s2, 0x28($sp) -/* 0D05C0 803155C0 AFB10024 */ sw $s1, 0x24($sp) -/* 0D05C4 803155C4 AFB00020 */ sw $s0, 0x20($sp) -/* 0D05C8 803155C8 AFA40170 */ sw $a0, 0x170($sp) -/* 0D05CC 803155CC AFA50174 */ sw $a1, 0x174($sp) -/* 0D05D0 803155D0 AFA0016C */ sw $zero, 0x16c($sp) -/* 0D05D4 803155D4 19C00265 */ blez $t6, .L_US_80315F6C -/* 0D05D8 803155D8 AFA00154 */ sw $zero, 0x154($sp) -/* 0D05DC 803155DC AFA00064 */ sw $zero, 0x64($sp) -.L_US_803155E0: -/* 0D05E0 803155E0 3C188022 */ lui $t8, %hi(gNotes) # $t8, 0x8022 -/* 0D05E4 803155E4 8F182610 */ lw $t8, %lo(gNotes)($t8) -/* 0D05E8 803155E8 8FAF0064 */ lw $t7, 0x64($sp) -/* 0D05EC 803155EC 01F8B821 */ addu $s7, $t7, $t8 -/* 0D05F0 803155F0 8EF90000 */ lw $t9, ($s7) -/* 0D05F4 803155F4 001977C2 */ srl $t6, $t9, 0x1f -/* 0D05F8 803155F8 51C00010 */ beql $t6, $zero, .L_US_8031563C -/* 0D05FC 803155FC 8EF90000 */ lw $t9, ($s7) -/* 0D0600 80315600 92E20007 */ lbu $v0, 7($s7) -/* 0D0604 80315604 3C0F8022 */ lui $t7, %hi(gBankLoadStatus) -/* 0D0608 80315608 8FAE016C */ lw $t6, 0x16c($sp) -/* 0D060C 8031560C 01E27821 */ addu $t7, $t7, $v0 -/* 0D0610 80315610 91EF14D0 */ lbu $t7, %lo(gBankLoadStatus)($t7) -/* 0D0614 80315614 3C010100 */ lui $at, 0x100 -/* 0D0618 80315618 29F80002 */ slti $t8, $t7, 2 -/* 0D061C 8031561C 13000006 */ beqz $t8, .L_US_80315638 -/* 0D0620 80315620 0002CA00 */ sll $t9, $v0, 8 -/* 0D0624 80315624 032E7821 */ addu $t7, $t9, $t6 -/* 0D0628 80315628 01E1C021 */ addu $t8, $t7, $at -/* 0D062C 8031562C 3C018033 */ lui $at, %hi(gAudioErrorFlags) # $at, 0x8033 -/* 0D0630 80315630 10000244 */ b .L_US_80315F44 -/* 0D0634 80315634 AC382E50 */ sw $t8, %lo(gAudioErrorFlags)($at) -.L_US_80315638: -/* 0D0638 80315638 8EF90000 */ lw $t9, ($s7) -.L_US_8031563C: -/* 0D063C 8031563C 001977C2 */ srl $t6, $t9, 0x1f -/* 0D0640 80315640 51C00241 */ beql $t6, $zero, .L_US_80315F48 -/* 0D0644 80315644 8FB9016C */ lw $t9, 0x16c($sp) -/* 0D0648 80315648 8FAF0174 */ lw $t7, 0x174($sp) -/* 0D064C 8031564C AFA00140 */ sw $zero, 0x140($sp) -/* 0D0650 80315650 24010001 */ li $at, 1 -/* 0D0654 80315654 000FC040 */ sll $t8, $t7, 1 -/* 0D0658 80315658 AFB80048 */ sw $t8, 0x48($sp) -/* 0D065C 8031565C 8EF90000 */ lw $t9, ($s7) -/* 0D0660 80315660 24180001 */ li $t8, 1 -/* 0D0664 80315664 02802025 */ move $a0, $s4 -/* 0D0668 80315668 00197040 */ sll $t6, $t9, 1 -/* 0D066C 8031566C 000E7FC2 */ srl $t7, $t6, 0x1f -/* 0D0670 80315670 15E10004 */ bne $t7, $at, .L_US_80315684 -/* 0D0674 80315674 02E02825 */ move $a1, $s7 -/* 0D0678 80315678 AFB80140 */ sw $t8, 0x140($sp) -/* 0D067C 8031567C AEE00014 */ sw $zero, 0x14($s7) -/* 0D0680 80315680 A6E00020 */ sh $zero, 0x20($s7) -.L_US_80315684: -/* 0D0684 80315684 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 0D0688 80315688 44812000 */ mtc1 $at, $f4 -/* 0D068C 8031568C C6E00038 */ lwc1 $f0, 0x38($s7) -/* 0D0690 80315690 3C018034 */ lui $at, %hi(D_80337BB8) -/* 0D0694 80315694 4604003C */ c.lt.s $f0, $f4 -/* 0D0698 80315698 00000000 */ nop -/* 0D069C 8031569C 4500000E */ bc1f .L_US_803156D8 -/* 0D06A0 803156A0 00000000 */ nop -/* 0D06A4 803156A4 3C018034 */ lui $at, %hi(D_80337BB0) # $at, 0x8034 -/* 0D06A8 803156A8 C4268DA0 */ lwc1 $f6, %lo(D_80337BB0)($at) -/* 0D06AC 803156AC 24190001 */ li $t9, 1 -/* 0D06B0 803156B0 AFB900E0 */ sw $t9, 0xe0($sp) -/* 0D06B4 803156B4 4600303C */ c.lt.s $f6, $f0 -/* 0D06B8 803156B8 3C018034 */ lui $at, %hi(D_80337BB0 + 0x4) # $at, 0x8034 -/* 0D06BC 803156BC 45000004 */ bc1f .L_US_803156D0 -/* 0D06C0 803156C0 00000000 */ nop -/* 0D06C4 803156C4 C4288DA4 */ lwc1 $f8, %lo(D_80337BB0 + 0x4)($at) -/* 0D06C8 803156C8 E6E80038 */ swc1 $f8, 0x38($s7) -/* 0D06CC 803156CC C6E00038 */ lwc1 $f0, 0x38($s7) -.L_US_803156D0: -/* 0D06D0 803156D0 10000010 */ b .L_US_80315714 -/* 0D06D4 803156D4 46000086 */ mov.s $f2, $f0 -.L_US_803156D8: -/* 0D06D8 803156D8 C42A8DA8 */ lwc1 $f10, %lo(D_80337BB8)($at) -/* 0D06DC 803156DC 240E0002 */ li $t6, 2 -/* 0D06E0 803156E0 AFAE00E0 */ sw $t6, 0xe0($sp) -/* 0D06E4 803156E4 4600503E */ c.le.s $f10, $f0 -/* 0D06E8 803156E8 3C018034 */ lui $at, %hi(D_80337BB8) -/* 0D06EC 803156EC 45020005 */ bc1fl .L_US_80315704 -/* 0D06F0 803156F0 3C013F00 */ lui $at, 0x3f00 # $at, 0x3f00 -/* 0D06F4 803156F4 C4308DAC */ lwc1 $f16, %lo(D_80337BB8 + 0x4)($at) -/* 0D06F8 803156F8 E6F00038 */ swc1 $f16, 0x38($s7) -/* 0D06FC 803156FC C6E00038 */ lwc1 $f0, 0x38($s7) -/* 0D0700 80315700 3C013F00 */ li $at, 0x3F000000 # 0.500000 -.L_US_80315704: -/* 0D0704 80315704 44819000 */ mtc1 $at, $f18 -/* 0D0708 80315708 00000000 */ nop -/* 0D070C 8031570C 46120082 */ mul.s $f2, $f0, $f18 -/* 0D0710 80315710 00000000 */ nop -.L_US_80315714: -/* 0D0714 80315714 3C014700 */ li $at, 0x47000000 # 32768.000000 -/* 0D0718 80315718 44812000 */ mtc1 $at, $f4 -/* 0D071C 8031571C 8FAE0174 */ lw $t6, 0x174($sp) -/* 0D0720 80315720 46041182 */ mul.s $f6, $f2, $f4 -/* 0D0724 80315724 4600320D */ trunc.w.s $f8, $f6 -/* 0D0728 80315728 44184000 */ mfc1 $t8, $f8 -/* 0D072C 8031572C 00000000 */ nop -/* 0D0730 80315730 3319FFFF */ andi $t9, $t8, 0xffff -/* 0D0734 80315734 032E0019 */ multu $t9, $t6 -/* 0D0738 80315738 AFB9005C */ sw $t9, 0x5c($sp) -/* 0D073C 8031573C 96F90020 */ lhu $t9, 0x20($s7) -/* 0D0740 80315740 8EE20024 */ lw $v0, 0x24($s7) -/* 0D0744 80315744 00007812 */ mflo $t7 -/* 0D0748 80315748 000FC040 */ sll $t8, $t7, 1 -/* 0D074C 8031574C 03381821 */ addu $v1, $t9, $t8 -/* 0D0750 80315750 1440000E */ bnez $v0, .L_US_8031578C -/* 0D0754 80315754 A6E30020 */ sh $v1, 0x20($s7) -/* 0D0758 80315758 00038402 */ srl $s0, $v1, 0x10 -/* 0D075C 8031575C 02003025 */ move $a2, $s0 -/* 0D0760 80315760 0C0C5804 */ jal load_wave_samples -/* 0D0764 80315764 AFA00140 */ sw $zero, 0x140($sp) -/* 0D0768 80315768 8EE90014 */ lw $t1, 0x14($s7) -/* 0D076C 8031576C 0040A025 */ move $s4, $v0 -/* 0D0770 80315770 00097840 */ sll $t7, $t1, 1 -/* 0D0774 80315774 25F90180 */ addiu $t9, $t7, 0x180 -/* 0D0778 80315778 A7B900CE */ sh $t9, 0xce($sp) -/* 0D077C 8031577C 0130C021 */ addu $t8, $t1, $s0 -/* 0D0780 80315780 AEF80014 */ sw $t8, 0x14($s7) -/* 0D0784 80315784 100001B9 */ b .L_US_80315E6C -/* 0D0788 80315788 8EE50000 */ lw $a1, ($s7) -.L_US_8031578C: -/* 0D078C 8031578C 8C4E0000 */ lw $t6, ($v0) -/* 0D0790 80315790 00031402 */ srl $v0, $v1, 0x10 -/* 0D0794 80315794 AFAE015C */ sw $t6, 0x15c($sp) -/* 0D0798 80315798 8DDF0008 */ lw $ra, 8($t6) -/* 0D079C 8031579C 8FF90004 */ lw $t9, 4($ra) -/* 0D07A0 803157A0 AFB90108 */ sw $t9, 0x108($sp) -/* 0D07A4 803157A4 8DD80004 */ lw $t8, 4($t6) -/* 0D07A8 803157A8 8FAE00E0 */ lw $t6, 0xe0($sp) -/* 0D07AC 803157AC AFA000D0 */ sw $zero, 0xd0($sp) -/* 0D07B0 803157B0 AFA000DC */ sw $zero, 0xdc($sp) -/* 0D07B4 803157B4 19C001AB */ blez $t6, .L_US_80315E64 -/* 0D07B8 803157B8 AFB80118 */ sw $t8, 0x118($sp) -/* 0D07BC 803157BC 39D90001 */ xori $t9, $t6, 1 -/* 0D07C0 803157C0 2F390001 */ sltiu $t9, $t9, 1 -/* 0D07C4 803157C4 AFB90054 */ sw $t9, 0x54($sp) -/* 0D07C8 803157C8 AFA20058 */ sw $v0, 0x58($sp) -/* 0D07CC 803157CC 8FAF015C */ lw $t7, 0x15c($sp) -.L_US_803157D0: -/* 0D07D0 803157D0 8FB80054 */ lw $t8, 0x54($sp) -/* 0D07D4 803157D4 8FA20058 */ lw $v0, 0x58($sp) -/* 0D07D8 803157D8 8DE4000C */ lw $a0, 0xc($t7) -/* 0D07DC 803157DC 0000F025 */ move $fp, $zero -/* 0D07E0 803157E0 0000A825 */ move $s5, $zero -/* 0D07E4 803157E4 13000003 */ beqz $t8, .L_US_803157F4 -/* 0D07E8 803157E8 24850008 */ addiu $a1, $a0, 8 -/* 0D07EC 803157EC 1000000A */ b .L_US_80315818 -/* 0D07F0 803157F0 00406825 */ move $t5, $v0 -.L_US_803157F4: -/* 0D07F4 803157F4 304E0001 */ andi $t6, $v0, 1 -/* 0D07F8 803157F8 11C00007 */ beqz $t6, .L_US_80315818 -/* 0D07FC 803157FC 00406825 */ move $t5, $v0 -/* 0D0800 80315800 8FAF00DC */ lw $t7, 0xdc($sp) -/* 0D0804 80315804 2401FFFE */ li $at, -2 -/* 0D0808 80315808 0041C824 */ and $t9, $v0, $at -/* 0D080C 8031580C 000FC040 */ sll $t8, $t7, 1 -/* 0D0810 80315810 10000001 */ b .L_US_80315818 -/* 0D0814 80315814 03386821 */ addu $t5, $t9, $t8 -.L_US_80315818: -/* 0D0818 80315818 8FAE0154 */ lw $t6, 0x154($sp) -/* 0D081C 8031581C AFA20058 */ sw $v0, 0x58($sp) -/* 0D0820 80315820 11C50013 */ beq $t6, $a1, .L_US_80315870 -/* 0D0824 80315824 00000000 */ nop -/* 0D0828 80315828 AFA50154 */ sw $a1, 0x154($sp) -/* 0D082C 8031582C 8C990000 */ lw $t9, ($a0) -/* 0D0830 80315830 8C8F0004 */ lw $t7, 4($a0) -/* 0D0834 80315834 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* 0D0838 80315838 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0D083C 8031583C 01F90019 */ multu $t7, $t9 -/* 0D0840 80315840 02801025 */ move $v0, $s4 -/* 0D0844 80315844 26940008 */ addiu $s4, $s4, 8 -/* 0D0848 80315848 00001812 */ mflo $v1 -/* 0D084C 8031584C 0003C100 */ sll $t8, $v1, 4 -/* 0D0850 80315850 03017024 */ and $t6, $t8, $at -/* 0D0854 80315854 3C010B00 */ lui $at, 0xb00 -/* 0D0858 80315858 01C17825 */ or $t7, $t6, $at -/* 0D085C 8031585C AC4F0000 */ sw $t7, ($v0) -/* 0D0860 80315860 8FB90154 */ lw $t9, 0x154($sp) -/* 0D0864 80315864 3C018000 */ lui $at, 0x8000 -/* 0D0868 80315868 0321C021 */ addu $t8, $t9, $at -/* 0D086C 8031586C AC580004 */ sw $t8, 4($v0) -.L_US_80315870: -/* 0D0870 80315870 11A00102 */ beqz $t5, .L_US_80315C7C -/* 0D0874 80315874 8FA20058 */ lw $v0, 0x58($sp) -/* 0D0878 80315878 AFA20058 */ sw $v0, 0x58($sp) -/* 0D087C 8031587C 8EE90014 */ lw $t1, 0x14($s7) -.L_US_80315880: -/* 0D0880 80315880 8FAE0108 */ lw $t6, 0x108($sp) -/* 0D0884 80315884 01BE2023 */ subu $a0, $t5, $fp -/* 0D0888 80315888 3132000F */ andi $s2, $t1, 0xf -/* 0D088C 8031588C 00005025 */ move $t2, $zero -/* 0D0890 80315890 00005825 */ move $t3, $zero -/* 0D0894 80315894 00806025 */ move $t4, $a0 -/* 0D0898 80315898 16400006 */ bnez $s2, .L_US_803158B4 -/* 0D089C 8031589C 01C91823 */ subu $v1, $t6, $t1 -/* 0D08A0 803158A0 8EEF0000 */ lw $t7, ($s7) -/* 0D08A4 803158A4 000FC080 */ sll $t8, $t7, 2 -/* 0D08A8 803158A8 07020003 */ bltzl $t8, .L_US_803158B8 -/* 0D08AC 803158AC 240E0010 */ li $t6, 16 -/* 0D08B0 803158B0 24120010 */ li $s2, 16 -.L_US_803158B4: -/* 0D08B4 803158B4 240E0010 */ li $t6, 16 -.L_US_803158B8: -/* 0D08B8 803158B8 01D22823 */ subu $a1, $t6, $s2 -/* 0D08BC 803158BC 0083082A */ slt $at, $a0, $v1 -/* 0D08C0 803158C0 1020000C */ beqz $at, .L_US_803158F4 -/* 0D08C4 803158C4 00A0B025 */ move $s6, $a1 -/* 0D08C8 803158C8 00851023 */ subu $v0, $a0, $a1 -/* 0D08CC 803158CC 2442000F */ addiu $v0, $v0, 0xf -/* 0D08D0 803158D0 04410003 */ bgez $v0, .L_US_803158E0 -/* 0D08D4 803158D4 00027903 */ sra $t7, $v0, 4 -/* 0D08D8 803158D8 2441000F */ addiu $at, $v0, 0xf -/* 0D08DC 803158DC 00017903 */ sra $t7, $at, 4 -.L_US_803158E0: -/* 0D08E0 803158E0 000F8100 */ sll $s0, $t7, 4 -/* 0D08E4 803158E4 00B0C821 */ addu $t9, $a1, $s0 -/* 0D08E8 803158E8 01E04025 */ move $t0, $t7 -/* 0D08EC 803158EC 10000012 */ b .L_US_80315938 -/* 0D08F0 803158F0 03249823 */ subu $s3, $t9, $a0 -.L_US_803158F4: -/* 0D08F4 803158F4 00721021 */ addu $v0, $v1, $s2 -/* 0D08F8 803158F8 2450FFF0 */ addiu $s0, $v0, -0x10 -/* 0D08FC 803158FC 1E000003 */ bgtz $s0, .L_US_8031590C -/* 0D0900 80315900 00009825 */ move $s3, $zero -/* 0D0904 80315904 00008025 */ move $s0, $zero -/* 0D0908 80315908 0060B025 */ move $s6, $v1 -.L_US_8031590C: -/* 0D090C 8031590C 2608000F */ addiu $t0, $s0, 0xf -/* 0D0910 80315910 8FEE0008 */ lw $t6, 8($ra) -/* 0D0914 80315914 05010003 */ bgez $t0, .L_US_80315924 -/* 0D0918 80315918 0008C103 */ sra $t8, $t0, 4 -/* 0D091C 8031591C 2501000F */ addiu $at, $t0, 0xf -/* 0D0920 80315920 0001C103 */ sra $t8, $at, 4 -.L_US_80315924: -/* 0D0924 80315924 11C00003 */ beqz $t6, .L_US_80315934 -/* 0D0928 80315928 03004025 */ move $t0, $t8 -/* 0D092C 8031592C 10000002 */ b .L_US_80315938 -/* 0D0930 80315930 240B0001 */ li $t3, 1 -.L_US_80315934: -/* 0D0934 80315934 240A0001 */ li $t2, 1 -.L_US_80315938: -/* 0D0938 80315938 11000032 */ beqz $t0, .L_US_80315A04 -/* 0D093C 8031593C 24030009 */ li $v1, 9 -/* 0D0940 80315940 01321023 */ subu $v0, $t1, $s2 -/* 0D0944 80315944 24420010 */ addiu $v0, $v0, 0x10 -/* 0D0948 80315948 04410003 */ bgez $v0, .L_US_80315958 -/* 0D094C 8031594C 00027903 */ sra $t7, $v0, 4 -/* 0D0950 80315950 2441000F */ addiu $at, $v0, 0xf -/* 0D0954 80315954 00017903 */ sra $t7, $at, 4 -.L_US_80315958: -/* 0D0958 80315958 01E30019 */ multu $t7, $v1 -/* 0D095C 8031595C 8FB80118 */ lw $t8, 0x118($sp) -/* 0D0960 80315960 AFBF0158 */ sw $ra, 0x158($sp) -/* 0D0964 80315964 8FA60140 */ lw $a2, 0x140($sp) -/* 0D0968 80315968 26E70003 */ addiu $a3, $s7, 3 -/* 0D096C 8031596C AFAA0148 */ sw $t2, 0x148($sp) -/* 0D0970 80315970 AFAB0144 */ sw $t3, 0x144($sp) -/* 0D0974 80315974 AFAC0104 */ sw $t4, 0x104($sp) -/* 0D0978 80315978 AFAD0110 */ sw $t5, 0x110($sp) -/* 0D097C 8031597C 0000C812 */ mflo $t9 -/* 0D0980 80315980 03382021 */ addu $a0, $t9, $t8 -/* 0D0984 80315984 00000000 */ nop -/* 0D0988 80315988 01030019 */ multu $t0, $v1 -/* 0D098C 8031598C 00008812 */ mflo $s1 -/* 0D0990 80315990 02202825 */ move $a1, $s1 -/* 0D0994 80315994 0C0C60C0 */ jal dma_sample_data -/* 0D0998 80315998 00000000 */ nop -/* 0D099C 8031599C 3047000F */ andi $a3, $v0, 0xf -/* 0D09A0 803159A0 02802025 */ move $a0, $s4 -/* 0D09A4 803159A4 3C0E0800 */ lui $t6, (0x080003F0 >> 16) # lui $t6, 0x800 -/* 0D09A8 803159A8 8FAA0148 */ lw $t2, 0x148($sp) -/* 0D09AC 803159AC 8FAB0144 */ lw $t3, 0x144($sp) -/* 0D09B0 803159B0 8FAC0104 */ lw $t4, 0x104($sp) -/* 0D09B4 803159B4 8FAD0110 */ lw $t5, 0x110($sp) -/* 0D09B8 803159B8 8FBF0158 */ lw $ra, 0x158($sp) -/* 0D09BC 803159BC 35CE03F0 */ ori $t6, (0x080003F0 & 0xFFFF) # ori $t6, $t6, 0x3f0 -/* 0D09C0 803159C0 02277821 */ addu $t7, $s1, $a3 -/* 0D09C4 803159C4 31F9FFFF */ andi $t9, $t7, 0xffff -/* 0D09C8 803159C8 AC8E0000 */ sw $t6, ($a0) -/* 0D09CC 803159CC 26940008 */ addiu $s4, $s4, 8 -/* 0D09D0 803159D0 AC990004 */ sw $t9, 4($a0) -/* 0D09D4 803159D4 02802825 */ move $a1, $s4 -/* 0D09D8 803159D8 00477023 */ subu $t6, $v0, $a3 -/* 0D09DC 803159DC 3C018000 */ lui $at, 0x8000 -/* 0D09E0 803159E0 01C17821 */ addu $t7, $t6, $at -/* 0D09E4 803159E4 3C180400 */ lui $t8, 0x400 -/* 0D09E8 803159E8 ACB80000 */ sw $t8, ($a1) -/* 0D09EC 803159EC ACAF0004 */ sw $t7, 4($a1) -/* 0D09F0 803159F0 8EE60000 */ lw $a2, ($s7) -/* 0D09F4 803159F4 26940008 */ addiu $s4, $s4, 8 -/* 0D09F8 803159F8 0006C880 */ sll $t9, $a2, 2 -/* 0D09FC 803159FC 10000006 */ b .L_US_80315A18 -/* 0D0A00 80315A00 001937C2 */ srl $a2, $t9, 0x1f -.L_US_80315A04: -/* 0D0A04 80315A04 8EE60000 */ lw $a2, ($s7) -/* 0D0A08 80315A08 00008025 */ move $s0, $zero -/* 0D0A0C 80315A0C 00003825 */ move $a3, $zero -/* 0D0A10 80315A10 00067080 */ sll $t6, $a2, 2 -/* 0D0A14 80315A14 000E37C2 */ srl $a2, $t6, 0x1f -.L_US_80315A18: -/* 0D0A18 80315A18 10C0000F */ beqz $a2, .L_US_80315A58 -/* 0D0A1C 80315A1C 02801025 */ move $v0, $s4 -/* 0D0A20 80315A20 3C190F00 */ lui $t9, 0xf00 -/* 0D0A24 80315A24 AC590000 */ sw $t9, ($v0) -/* 0D0A28 80315A28 8FB8015C */ lw $t8, 0x15c($sp) -/* 0D0A2C 80315A2C 3C018000 */ lui $at, (0x80000010 >> 16) # lui $at, 0x8000 -/* 0D0A30 80315A30 34210010 */ ori $at, (0x80000010 & 0xFFFF) # ori $at, $at, 0x10 -/* 0D0A34 80315A34 8F0E0008 */ lw $t6, 8($t8) -/* 0D0A38 80315A38 24190002 */ li $t9, 2 -/* 0D0A3C 80315A3C 26940008 */ addiu $s4, $s4, 8 -/* 0D0A40 80315A40 01C17821 */ addu $t7, $t6, $at -/* 0D0A44 80315A44 AC4F0004 */ sw $t7, 4($v0) -/* 0D0A48 80315A48 AFB90140 */ sw $t9, 0x140($sp) -/* 0D0A4C 80315A4C 92F80000 */ lbu $t8, ($s7) -/* 0D0A50 80315A50 330EFFDF */ andi $t6, $t8, 0xffdf -/* 0D0A54 80315A54 A2EE0000 */ sb $t6, ($s7) -.L_US_80315A58: -/* 0D0A58 80315A58 17C0001C */ bnez $fp, .L_US_80315ACC -/* 0D0A5C 80315A5C 02801025 */ move $v0, $s4 -/* 0D0A60 80315A60 24EF03F0 */ addiu $t7, $a3, 0x3f0 -/* 0D0A64 80315A64 31F9FFFF */ andi $t9, $t7, 0xffff -/* 0D0A68 80315A68 3C010800 */ lui $at, 0x800 -/* 0D0A6C 80315A6C 0321C025 */ or $t8, $t9, $at -/* 0D0A70 80315A70 00103040 */ sll $a2, $s0, 1 -/* 0D0A74 80315A74 30CEFFFF */ andi $t6, $a2, 0xffff -/* 0D0A78 80315A78 3C010180 */ lui $at, 0x180 -/* 0D0A7C 80315A7C 02801025 */ move $v0, $s4 -/* 0D0A80 80315A80 01C17825 */ or $t7, $t6, $at -/* 0D0A84 80315A84 AC4F0004 */ sw $t7, 4($v0) -/* 0D0A88 80315A88 AC580000 */ sw $t8, ($v0) -/* 0D0A8C 80315A8C 8FB90140 */ lw $t9, 0x140($sp) -/* 0D0A90 80315A90 26940008 */ addiu $s4, $s4, 8 -/* 0D0A94 80315A94 3C010100 */ lui $at, 0x100 -/* 0D0A98 80315A98 333800FF */ andi $t8, $t9, 0xff -/* 0D0A9C 80315A9C 00187400 */ sll $t6, $t8, 0x10 -/* 0D0AA0 80315AA0 01C17825 */ or $t7, $t6, $at -/* 0D0AA4 80315AA4 02801825 */ move $v1, $s4 -/* 0D0AA8 80315AA8 AC6F0000 */ sw $t7, ($v1) -/* 0D0AAC 80315AAC 8EF90034 */ lw $t9, 0x34($s7) -/* 0D0AB0 80315AB0 3C018000 */ lui $at, 0x8000 -/* 0D0AB4 80315AB4 00127040 */ sll $t6, $s2, 1 -/* 0D0AB8 80315AB8 0321C021 */ addu $t8, $t9, $at -/* 0D0ABC 80315ABC AC780004 */ sw $t8, 4($v1) -/* 0D0AC0 80315AC0 26940008 */ addiu $s4, $s4, 8 -/* 0D0AC4 80315AC4 10000030 */ b .L_US_80315B88 -/* 0D0AC8 80315AC8 AFAE0128 */ sw $t6, 0x128($sp) -.L_US_80315ACC: -/* 0D0ACC 80315ACC 24EF03F0 */ addiu $t7, $a3, 0x3f0 -/* 0D0AD0 80315AD0 31F9FFFF */ andi $t9, $t7, 0xffff -/* 0D0AD4 80315AD4 3C010800 */ lui $at, 0x800 -/* 0D0AD8 80315AD8 0321C025 */ or $t8, $t9, $at -/* 0D0ADC 80315ADC 2401FFE0 */ li $at, -32 -/* 0D0AE0 80315AE0 26A3001F */ addiu $v1, $s5, 0x1f -/* 0D0AE4 80315AE4 00617024 */ and $t6, $v1, $at -/* 0D0AE8 80315AE8 25D90180 */ addiu $t9, $t6, 0x180 -/* 0D0AEC 80315AEC 01C01825 */ move $v1, $t6 -/* 0D0AF0 80315AF0 AC580000 */ sw $t8, ($v0) -/* 0D0AF4 80315AF4 00103040 */ sll $a2, $s0, 1 -/* 0D0AF8 80315AF8 30CEFFFF */ andi $t6, $a2, 0xffff -/* 0D0AFC 80315AFC 0019C400 */ sll $t8, $t9, 0x10 -/* 0D0B00 80315B00 030E7825 */ or $t7, $t8, $t6 -/* 0D0B04 80315B04 AC4F0004 */ sw $t7, 4($v0) -/* 0D0B08 80315B08 8FB90140 */ lw $t9, 0x140($sp) -/* 0D0B0C 80315B0C 26940008 */ addiu $s4, $s4, 8 -/* 0D0B10 80315B10 3C010100 */ lui $at, 0x100 -/* 0D0B14 80315B14 333800FF */ andi $t8, $t9, 0xff -/* 0D0B18 80315B18 00187400 */ sll $t6, $t8, 0x10 -/* 0D0B1C 80315B1C 01C17825 */ or $t7, $t6, $at -/* 0D0B20 80315B20 02802025 */ move $a0, $s4 -/* 0D0B24 80315B24 AC8F0000 */ sw $t7, ($a0) -/* 0D0B28 80315B28 8EF90034 */ lw $t9, 0x34($s7) -/* 0D0B2C 80315B2C 3C018000 */ lui $at, 0x8000 -/* 0D0B30 80315B30 00127040 */ sll $t6, $s2, 1 -/* 0D0B34 80315B34 0321C021 */ addu $t8, $t9, $at -/* 0D0B38 80315B38 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* 0D0B3C 80315B3C 006E7821 */ addu $t7, $v1, $t6 -/* 0D0B40 80315B40 AC980004 */ sw $t8, 4($a0) -/* 0D0B44 80315B44 25F90180 */ addiu $t9, $t7, 0x180 -/* 0D0B48 80315B48 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0D0B4C 80315B4C 0321C024 */ and $t8, $t9, $at -/* 0D0B50 80315B50 26940008 */ addiu $s4, $s4, 8 -/* 0D0B54 80315B54 3C010A00 */ lui $at, 0xa00 -/* 0D0B58 80315B58 03017025 */ or $t6, $t8, $at -/* 0D0B5C 80315B5C 02802825 */ move $a1, $s4 -/* 0D0B60 80315B60 ACAE0000 */ sw $t6, ($a1) -/* 0D0B64 80315B64 02167021 */ addu $t6, $s0, $s6 -/* 0D0B68 80315B68 26B90180 */ addiu $t9, $s5, 0x180 -/* 0D0B6C 80315B6C 0019C400 */ sll $t8, $t9, 0x10 -/* 0D0B70 80315B70 01D37823 */ subu $t7, $t6, $s3 -/* 0D0B74 80315B74 000FC840 */ sll $t9, $t7, 1 -/* 0D0B78 80315B78 332EFFFF */ andi $t6, $t9, 0xffff -/* 0D0B7C 80315B7C 030E7825 */ or $t7, $t8, $t6 -/* 0D0B80 80315B80 ACAF0004 */ sw $t7, 4($a1) -/* 0D0B84 80315B84 26940008 */ addiu $s4, $s4, 8 -.L_US_80315B88: -/* 0D0B88 80315B88 8FAE0140 */ lw $t6, 0x140($sp) -/* 0D0B8C 80315B8C 03D0C821 */ addu $t9, $fp, $s0 -/* 0D0B90 80315B90 0336C021 */ addu $t8, $t9, $s6 -/* 0D0B94 80315B94 24010001 */ li $at, 1 -/* 0D0B98 80315B98 11C10008 */ beq $t6, $at, .L_US_80315BBC -/* 0D0B9C 80315B9C 0313F023 */ subu $fp, $t8, $s3 -/* 0D0BA0 80315BA0 39C20002 */ xori $v0, $t6, 2 -/* 0D0BA4 80315BA4 02167821 */ addu $t7, $s0, $s6 -/* 0D0BA8 80315BA8 01F31823 */ subu $v1, $t7, $s3 -/* 0D0BAC 80315BAC 10400007 */ beqz $v0, .L_US_80315BCC -/* 0D0BB0 80315BB0 AFA00140 */ sw $zero, 0x140($sp) -/* 0D0BB4 80315BB4 10000008 */ b .L_US_80315BD8 -/* 0D0BB8 80315BB8 0003C040 */ sll $t8, $v1, 1 -.L_US_80315BBC: -/* 0D0BBC 80315BBC AFA00128 */ sw $zero, 0x128($sp) -/* 0D0BC0 80315BC0 02A6A821 */ addu $s5, $s5, $a2 -/* 0D0BC4 80315BC4 1000000B */ b .L_US_80315BF4 -/* 0D0BC8 80315BC8 AFA00140 */ sw $zero, 0x140($sp) -.L_US_80315BCC: -/* 0D0BCC 80315BCC 0003C840 */ sll $t9, $v1, 1 -/* 0D0BD0 80315BD0 10000008 */ b .L_US_80315BF4 -/* 0D0BD4 80315BD4 02B9A821 */ addu $s5, $s5, $t9 -.L_US_80315BD8: -/* 0D0BD8 80315BD8 52A00004 */ beql $s5, $zero, .L_US_80315BEC -/* 0D0BDC 80315BDC 0072A821 */ addu $s5, $v1, $s2 -/* 0D0BE0 80315BE0 10000004 */ b .L_US_80315BF4 -/* 0D0BE4 80315BE4 02B8A821 */ addu $s5, $s5, $t8 -/* 0D0BE8 80315BE8 0072A821 */ addu $s5, $v1, $s2 -.L_US_80315BEC: -/* 0D0BEC 80315BEC 00157040 */ sll $t6, $s5, 1 -/* 0D0BF0 80315BF0 01C0A825 */ move $s5, $t6 -.L_US_80315BF4: -/* 0D0BF4 80315BF4 11400014 */ beqz $t2, .L_US_80315C48 -/* 0D0BF8 80315BF8 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* 0D0BFC 80315BFC 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0D0C00 80315C00 26AF0180 */ addiu $t7, $s5, 0x180 -/* 0D0C04 80315C04 01E1C824 */ and $t9, $t7, $at -/* 0D0C08 80315C08 3C010200 */ lui $at, 0x200 -/* 0D0C0C 80315C0C 02801025 */ move $v0, $s4 -/* 0D0C10 80315C10 01BE7023 */ subu $t6, $t5, $fp -/* 0D0C14 80315C14 000E7840 */ sll $t7, $t6, 1 -/* 0D0C18 80315C18 0321C025 */ or $t8, $t9, $at -/* 0D0C1C 80315C1C AC580000 */ sw $t8, ($v0) -/* 0D0C20 80315C20 AC4F0004 */ sw $t7, 4($v0) -/* 0D0C24 80315C24 92F80000 */ lbu $t8, ($s7) -/* 0D0C28 80315C28 26940008 */ addiu $s4, $s4, 8 -/* 0D0C2C 80315C2C AEE00014 */ sw $zero, 0x14($s7) -/* 0D0C30 80315C30 370E0010 */ ori $t6, $t8, 0x10 -/* 0D0C34 80315C34 A2EE0000 */ sb $t6, ($s7) -/* 0D0C38 80315C38 92EF0000 */ lbu $t7, ($s7) -/* 0D0C3C 80315C3C 31F9FF7F */ andi $t9, $t7, 0xff7f -/* 0D0C40 80315C40 1000000E */ b .L_US_80315C7C -/* 0D0C44 80315C44 A2F90000 */ sb $t9, ($s7) -.L_US_80315C48: -/* 0D0C48 80315C48 51600008 */ beql $t3, $zero, .L_US_80315C6C -/* 0D0C4C 80315C4C 8EF80014 */ lw $t8, 0x14($s7) -/* 0D0C50 80315C50 92EE0000 */ lbu $t6, ($s7) -/* 0D0C54 80315C54 35CF0020 */ ori $t7, $t6, 0x20 -/* 0D0C58 80315C58 A2EF0000 */ sb $t7, ($s7) -/* 0D0C5C 80315C5C 8FF90000 */ lw $t9, ($ra) -/* 0D0C60 80315C60 10000004 */ b .L_US_80315C74 -/* 0D0C64 80315C64 AEF90014 */ sw $t9, 0x14($s7) -/* 0D0C68 80315C68 8EF80014 */ lw $t8, 0x14($s7) -.L_US_80315C6C: -/* 0D0C6C 80315C6C 030C7021 */ addu $t6, $t8, $t4 -/* 0D0C70 80315C70 AEEE0014 */ sw $t6, 0x14($s7) -.L_US_80315C74: -/* 0D0C74 80315C74 57CDFF02 */ bnel $fp, $t5, .L_US_80315880 -/* 0D0C78 80315C78 8EE90014 */ lw $t1, 0x14($s7) -.L_US_80315C7C: -/* 0D0C7C 80315C7C 8FAF0054 */ lw $t7, 0x54($sp) -/* 0D0C80 80315C80 8FB900E0 */ lw $t9, 0xe0($sp) -/* 0D0C84 80315C84 24010002 */ li $at, 2 -/* 0D0C88 80315C88 15E00008 */ bnez $t7, .L_US_80315CAC -/* 0D0C8C 80315C8C 8FAE0128 */ lw $t6, 0x128($sp) -/* 0D0C90 80315C90 1321000D */ beq $t9, $at, .L_US_80315CC8 -/* 0D0C94 80315C94 8FB800DC */ lw $t8, 0xdc($sp) -/* 0D0C98 80315C98 8EE50000 */ lw $a1, ($s7) -/* 0D0C9C 80315C9C 000530C0 */ sll $a2, $a1, 3 -/* 0D0CA0 80315CA0 0006C7C2 */ srl $t8, $a2, 0x1f -/* 0D0CA4 80315CA4 10000066 */ b .L_US_80315E40 -/* 0D0CA8 80315CA8 03003025 */ move $a2, $t8 -.L_US_80315CAC: -/* 0D0CAC 80315CAC 25CF0180 */ addiu $t7, $t6, 0x180 -/* 0D0CB0 80315CB0 A7AF00CE */ sh $t7, 0xce($sp) -/* 0D0CB4 80315CB4 8EE50000 */ lw $a1, ($s7) -/* 0D0CB8 80315CB8 000530C0 */ sll $a2, $a1, 3 -/* 0D0CBC 80315CBC 0006CFC2 */ srl $t9, $a2, 0x1f -/* 0D0CC0 80315CC0 1000005F */ b .L_US_80315E40 -/* 0D0CC4 80315CC4 03203025 */ move $a2, $t9 -.L_US_80315CC8: -/* 0D0CC8 80315CC8 13000009 */ beqz $t8, .L_US_80315CF0 -/* 0D0CCC 80315CCC 02801025 */ move $v0, $s4 -/* 0D0CD0 80315CD0 24010001 */ li $at, 1 -/* 0D0CD4 80315CD4 13010034 */ beq $t8, $at, .L_US_80315DA8 -/* 0D0CD8 80315CD8 02801025 */ move $v0, $s4 -/* 0D0CDC 80315CDC 8EE50000 */ lw $a1, ($s7) -/* 0D0CE0 80315CE0 000530C0 */ sll $a2, $a1, 3 -/* 0D0CE4 80315CE4 000677C2 */ srl $t6, $a2, 0x1f -/* 0D0CE8 80315CE8 10000055 */ b .L_US_80315E40 -/* 0D0CEC 80315CEC 01C03025 */ move $a2, $t6 -.L_US_80315CF0: -/* 0D0CF0 80315CF0 8FAF0128 */ lw $t7, 0x128($sp) -/* 0D0CF4 80315CF4 3C010800 */ lui $at, 0x800 -/* 0D0CF8 80315CF8 25A30004 */ addiu $v1, $t5, 4 -/* 0D0CFC 80315CFC 25F90180 */ addiu $t9, $t7, 0x180 -/* 0D0D00 80315D00 3338FFFF */ andi $t8, $t9, 0xffff -/* 0D0D04 80315D04 03017025 */ or $t6, $t8, $at -/* 0D0D08 80315D08 3C010020 */ lui $at, 0x20 -/* 0D0D0C 80315D0C 306FFFFF */ andi $t7, $v1, 0xffff -/* 0D0D10 80315D10 01E1C825 */ or $t9, $t7, $at -/* 0D0D14 80315D14 26940008 */ addiu $s4, $s4, 8 -/* 0D0D18 80315D18 3C180501 */ lui $t8, (0x0501FF60 >> 16) # lui $t8, 0x501 -/* 0D0D1C 80315D1C AC590004 */ sw $t9, 4($v0) -/* 0D0D20 80315D20 AC4E0000 */ sw $t6, ($v0) -/* 0D0D24 80315D24 3718FF60 */ ori $t8, (0x0501FF60 & 0xFFFF) # ori $t8, $t8, 0xff60 -/* 0D0D28 80315D28 02802025 */ move $a0, $s4 -/* 0D0D2C 80315D2C AC980000 */ sw $t8, ($a0) -/* 0D0D30 80315D30 8EEE0034 */ lw $t6, 0x34($s7) -/* 0D0D34 80315D34 3C018000 */ lui $at, (0x800000F0 >> 16) # lui $at, 0x8000 -/* 0D0D38 80315D38 342100F0 */ ori $at, (0x800000F0 & 0xFFFF) # ori $at, $at, 0xf0 -/* 0D0D3C 80315D3C 01C17821 */ addu $t7, $t6, $at -/* 0D0D40 80315D40 AC8F0004 */ sw $t7, 4($a0) -/* 0D0D44 80315D44 24190024 */ li $t9, 36 -/* 0D0D48 80315D48 AFA300D0 */ sw $v1, 0xd0($sp) -/* 0D0D4C 80315D4C A7B900CE */ sh $t9, 0xce($sp) -/* 0D0D50 80315D50 8EE50000 */ lw $a1, ($s7) -/* 0D0D54 80315D54 26940008 */ addiu $s4, $s4, 8 -/* 0D0D58 80315D58 02801025 */ move $v0, $s4 -/* 0D0D5C 80315D5C 000530C0 */ sll $a2, $a1, 3 -/* 0D0D60 80315D60 0006C7C2 */ srl $t8, $a2, 0x1f -/* 0D0D64 80315D64 13000036 */ beqz $t8, .L_US_80315E40 -/* 0D0D68 80315D68 03003025 */ move $a2, $t8 -/* 0D0D6C 80315D6C 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* 0D0D70 80315D70 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0D0D74 80315D74 25AE0024 */ addiu $t6, $t5, 0x24 -/* 0D0D78 80315D78 01C17824 */ and $t7, $t6, $at -/* 0D0D7C 80315D7C 3C010200 */ lui $at, 0x200 -/* 0D0D80 80315D80 01E1C825 */ or $t9, $t7, $at -/* 0D0D84 80315D84 25B80010 */ addiu $t8, $t5, 0x10 -/* 0D0D88 80315D88 AC580004 */ sw $t8, 4($v0) -/* 0D0D8C 80315D8C AC590000 */ sw $t9, ($v0) -/* 0D0D90 80315D90 8EE50000 */ lw $a1, ($s7) -/* 0D0D94 80315D94 26940008 */ addiu $s4, $s4, 8 -/* 0D0D98 80315D98 000530C0 */ sll $a2, $a1, 3 -/* 0D0D9C 80315D9C 000677C2 */ srl $t6, $a2, 0x1f -/* 0D0DA0 80315DA0 10000027 */ b .L_US_80315E40 -/* 0D0DA4 80315DA4 01C03025 */ move $a2, $t6 -.L_US_80315DA8: -/* 0D0DA8 80315DA8 8FAF0128 */ lw $t7, 0x128($sp) -/* 0D0DAC 80315DAC 3C010800 */ lui $at, 0x800 -/* 0D0DB0 80315DB0 26940008 */ addiu $s4, $s4, 8 -/* 0D0DB4 80315DB4 25F90180 */ addiu $t9, $t7, 0x180 -/* 0D0DB8 80315DB8 3338FFFF */ andi $t8, $t9, 0xffff -/* 0D0DBC 80315DBC 03017025 */ or $t6, $t8, $at -/* 0D0DC0 80315DC0 25AF0008 */ addiu $t7, $t5, 8 -/* 0D0DC4 80315DC4 31F9FFFF */ andi $t9, $t7, 0xffff -/* 0D0DC8 80315DC8 AC4E0000 */ sw $t6, ($v0) -/* 0D0DCC 80315DCC 3C010160 */ lui $at, 0x160 -/* 0D0DD0 80315DD0 0321C025 */ or $t8, $t9, $at -/* 0D0DD4 80315DD4 3C0E0501 */ lui $t6, (0x0501FF60 >> 16) # lui $t6, 0x501 -/* 0D0DD8 80315DD8 AC580004 */ sw $t8, 4($v0) -/* 0D0DDC 80315DDC 35CEFF60 */ ori $t6, (0x0501FF60 & 0xFFFF) # ori $t6, $t6, 0xff60 -/* 0D0DE0 80315DE0 02801825 */ move $v1, $s4 -/* 0D0DE4 80315DE4 AC6E0000 */ sw $t6, ($v1) -/* 0D0DE8 80315DE8 8EEF0034 */ lw $t7, 0x34($s7) -/* 0D0DEC 80315DEC 3C018000 */ lui $at, (0x800000F0 >> 16) # lui $at, 0x8000 -/* 0D0DF0 80315DF0 342100F0 */ ori $at, (0x800000F0 & 0xFFFF) # ori $at, $at, 0xf0 -/* 0D0DF4 80315DF4 26940008 */ addiu $s4, $s4, 8 -/* 0D0DF8 80315DF8 3C180A00 */ lui $t8, (0x0A000164 >> 16) # lui $t8, 0xa00 -/* 0D0DFC 80315DFC 01E1C821 */ addu $t9, $t7, $at -/* 0D0E00 80315E00 AC790004 */ sw $t9, 4($v1) -/* 0D0E04 80315E04 37180164 */ ori $t8, (0x0A000164 & 0xFFFF) # ori $t8, $t8, 0x164 -/* 0D0E08 80315E08 02802025 */ move $a0, $s4 -/* 0D0E0C 80315E0C AC980000 */ sw $t8, ($a0) -/* 0D0E10 80315E10 8FAE00D0 */ lw $t6, 0xd0($sp) -/* 0D0E14 80315E14 26940008 */ addiu $s4, $s4, 8 -/* 0D0E18 80315E18 25D90020 */ addiu $t9, $t6, 0x20 -/* 0D0E1C 80315E1C 25AE0004 */ addiu $t6, $t5, 4 -/* 0D0E20 80315E20 31CFFFFF */ andi $t7, $t6, 0xffff -/* 0D0E24 80315E24 0019C400 */ sll $t8, $t9, 0x10 -/* 0D0E28 80315E28 030FC825 */ or $t9, $t8, $t7 -/* 0D0E2C 80315E2C AC990004 */ sw $t9, 4($a0) -/* 0D0E30 80315E30 8EE50000 */ lw $a1, ($s7) -/* 0D0E34 80315E34 000530C0 */ sll $a2, $a1, 3 -/* 0D0E38 80315E38 000677C2 */ srl $t6, $a2, 0x1f -/* 0D0E3C 80315E3C 01C03025 */ move $a2, $t6 -.L_US_80315E40: -/* 0D0E40 80315E40 10C00003 */ beqz $a2, .L_US_80315E50 -/* 0D0E44 80315E44 8FA200DC */ lw $v0, 0xdc($sp) -/* 0D0E48 80315E48 10000008 */ b .L_US_80315E6C -/* 0D0E4C 80315E4C AFA00140 */ sw $zero, 0x140($sp) -.L_US_80315E50: -/* 0D0E50 80315E50 8FB800E0 */ lw $t8, 0xe0($sp) -/* 0D0E54 80315E54 24420001 */ addiu $v0, $v0, 1 -/* 0D0E58 80315E58 AFA200DC */ sw $v0, 0xdc($sp) -/* 0D0E5C 80315E5C 5458FE5C */ bnel $v0, $t8, .L_US_803157D0 -/* 0D0E60 80315E60 8FAF015C */ lw $t7, 0x15c($sp) -.L_US_80315E64: -/* 0D0E64 80315E64 AFA00140 */ sw $zero, 0x140($sp) -/* 0D0E68 80315E68 8EE50000 */ lw $a1, ($s7) -.L_US_80315E6C: -/* 0D0E6C 80315E6C 00057840 */ sll $t7, $a1, 1 -/* 0D0E70 80315E70 000FCFC2 */ srl $t9, $t7, 0x1f -/* 0D0E74 80315E74 24010001 */ li $at, 1 -/* 0D0E78 80315E78 17210006 */ bne $t9, $at, .L_US_80315E94 -/* 0D0E7C 80315E7C 02802025 */ move $a0, $s4 -/* 0D0E80 80315E80 240E0001 */ li $t6, 1 -/* 0D0E84 80315E84 AFAE0140 */ sw $t6, 0x140($sp) -/* 0D0E88 80315E88 92F80000 */ lbu $t8, ($s7) -/* 0D0E8C 80315E8C 330FFFBF */ andi $t7, $t8, 0xffbf -/* 0D0E90 80315E90 A2EF0000 */ sb $t7, ($s7) -.L_US_80315E94: -/* 0D0E94 80315E94 8FB10048 */ lw $s1, 0x48($sp) -/* 0D0E98 80315E98 97B900CE */ lhu $t9, 0xce($sp) -/* 0D0E9C 80315E9C 8FAE0140 */ lw $t6, 0x140($sp) -/* 0D0EA0 80315EA0 02E02825 */ move $a1, $s7 -/* 0D0EA4 80315EA4 97A7005E */ lhu $a3, 0x5e($sp) -/* 0D0EA8 80315EA8 02203025 */ move $a2, $s1 -/* 0D0EAC 80315EAC AFB90010 */ sw $t9, 0x10($sp) -/* 0D0EB0 80315EB0 0C0C5837 */ jal final_resample -/* 0D0EB4 80315EB4 AFAE0014 */ sw $t6, 0x14($sp) -/* 0D0EB8 80315EB8 96F8000C */ lhu $t8, 0xc($s7) -/* 0D0EBC 80315EBC 0040A025 */ move $s4, $v0 -/* 0D0EC0 80315EC0 02802025 */ move $a0, $s4 -/* 0D0EC4 80315EC4 17000004 */ bnez $t8, .L_US_80315ED8 -/* 0D0EC8 80315EC8 02E02825 */ move $a1, $s7 -/* 0D0ECC 80315ECC 96EF0010 */ lhu $t7, 0x10($s7) -/* 0D0ED0 80315ED0 51E00004 */ beql $t7, $zero, .L_US_80315EE4 -/* 0D0ED4 80315ED4 96F9000E */ lhu $t9, 0xe($s7) -.L_US_80315ED8: -/* 0D0ED8 80315ED8 1000000A */ b .L_US_80315F04 -/* 0D0EDC 80315EDC 24100001 */ li $s0, 1 -/* 0D0EE0 80315EE0 96F9000E */ lhu $t9, 0xe($s7) -.L_US_80315EE4: -/* 0D0EE4 80315EE4 17200005 */ bnez $t9, .L_US_80315EFC -/* 0D0EE8 80315EE8 00000000 */ nop -/* 0D0EEC 80315EEC 96EE0012 */ lhu $t6, 0x12($s7) -/* 0D0EF0 80315EF0 00008025 */ move $s0, $zero -/* 0D0EF4 80315EF4 11C00003 */ beqz $t6, .L_US_80315F04 -/* 0D0EF8 80315EF8 00000000 */ nop -.L_US_80315EFC: -/* 0D0EFC 80315EFC 10000001 */ b .L_US_80315F04 -/* 0D0F00 80315F00 24100002 */ li $s0, 2 -.L_US_80315F04: -/* 0D0F04 80315F04 8FB80140 */ lw $t8, 0x140($sp) -/* 0D0F08 80315F08 8FA60174 */ lw $a2, 0x174($sp) -/* 0D0F0C 80315F0C 00003825 */ move $a3, $zero -/* 0D0F10 80315F10 AFB00010 */ sw $s0, 0x10($sp) -/* 0D0F14 80315F14 0C0C584E */ jal process_envelope -/* 0D0F18 80315F18 AFB80014 */ sw $t8, 0x14($sp) -/* 0D0F1C 80315F1C 92EF0001 */ lbu $t7, 1($s7) -/* 0D0F20 80315F20 0040A025 */ move $s4, $v0 -/* 0D0F24 80315F24 00402025 */ move $a0, $v0 -/* 0D0F28 80315F28 11E00006 */ beqz $t7, .L_US_80315F44 -/* 0D0F2C 80315F2C 02E02825 */ move $a1, $s7 -/* 0D0F30 80315F30 02203025 */ move $a2, $s1 -/* 0D0F34 80315F34 8FA70140 */ lw $a3, 0x140($sp) -/* 0D0F38 80315F38 0C0C59BF */ jal note_apply_headset_pan_effects -/* 0D0F3C 80315F3C AFB00010 */ sw $s0, 0x10($sp) -/* 0D0F40 80315F40 0040A025 */ move $s4, $v0 -.L_US_80315F44: -/* 0D0F44 80315F44 8FB9016C */ lw $t9, 0x16c($sp) -.L_US_80315F48: -/* 0D0F48 80315F48 8FB80064 */ lw $t8, 0x64($sp) -/* 0D0F4C 80315F4C 272E0001 */ addiu $t6, $t9, 1 -/* 0D0F50 80315F50 3C198022 */ lui $t9, %hi(gMaxSimultaneousNotes) # $t9, 0x8022 -/* 0D0F54 80315F54 8F396B70 */ lw $t9, %lo(gMaxSimultaneousNotes)($t9) -/* 0D0F58 80315F58 270F00C0 */ addiu $t7, $t8, 0xc0 -/* 0D0F5C 80315F5C AFAF0064 */ sw $t7, 0x64($sp) -/* 0D0F60 80315F60 01D9082A */ slt $at, $t6, $t9 -/* 0D0F64 80315F64 1420FD9E */ bnez $at, .L_US_803155E0 -/* 0D0F68 80315F68 AFAE016C */ sw $t6, 0x16c($sp) -.L_US_80315F6C: -/* 0D0F6C 80315F6C 3C080800 */ lui $t0, 0x800 -/* 0D0F70 80315F70 02802025 */ move $a0, $s4 -/* 0D0F74 80315F74 AC880000 */ sw $t0, ($a0) -/* 0D0F78 80315F78 8FA30174 */ lw $v1, 0x174($sp) -/* 0D0F7C 80315F7C 26940008 */ addiu $s4, $s4, 8 -/* 0D0F80 80315F80 02802825 */ move $a1, $s4 -/* 0D0F84 80315F84 0003C040 */ sll $t8, $v1, 1 -/* 0D0F88 80315F88 330FFFFF */ andi $t7, $t8, 0xffff -/* 0D0F8C 80315F8C AC8F0004 */ sw $t7, 4($a0) -/* 0D0F90 80315F90 26940008 */ addiu $s4, $s4, 8 -/* 0D0F94 80315F94 3C0E0D00 */ lui $t6, 0xd00 -/* 0D0F98 80315F98 3C1904C0 */ lui $t9, (0x04C00600 >> 16) # lui $t9, 0x4c0 -/* 0D0F9C 80315F9C 37390600 */ ori $t9, (0x04C00600 & 0xFFFF) # ori $t9, $t9, 0x600 -/* 0D0FA0 80315FA0 ACAE0000 */ sw $t6, ($a1) -/* 0D0FA4 80315FA4 02803025 */ move $a2, $s4 -/* 0D0FA8 80315FA8 ACB90004 */ sw $t9, 4($a1) -/* 0D0FAC 80315FAC 0018C040 */ sll $t8, $t8, 1 -/* 0D0FB0 80315FB0 330FFFFF */ andi $t7, $t8, 0xffff -/* 0D0FB4 80315FB4 26940008 */ addiu $s4, $s4, 8 -/* 0D0FB8 80315FB8 ACCF0004 */ sw $t7, 4($a2) -/* 0D0FBC 80315FBC ACC80000 */ sw $t0, ($a2) -/* 0D0FC0 80315FC0 02803825 */ move $a3, $s4 -/* 0D0FC4 80315FC4 3C0E0600 */ lui $t6, 0x600 -/* 0D0FC8 80315FC8 ACEE0000 */ sw $t6, ($a3) -/* 0D0FCC 80315FCC 8FB90170 */ lw $t9, 0x170($sp) -/* 0D0FD0 80315FD0 3C018000 */ lui $at, 0x8000 -/* 0D0FD4 80315FD4 26820008 */ addiu $v0, $s4, 8 -/* 0D0FD8 80315FD8 0321C021 */ addu $t8, $t9, $at -/* 0D0FDC 80315FDC ACF80004 */ sw $t8, 4($a3) -/* 0D0FE0 80315FE0 8FBF0044 */ lw $ra, 0x44($sp) -/* 0D0FE4 80315FE4 8FBE0040 */ lw $fp, 0x40($sp) -/* 0D0FE8 80315FE8 8FB7003C */ lw $s7, 0x3c($sp) -/* 0D0FEC 80315FEC 8FB60038 */ lw $s6, 0x38($sp) -/* 0D0FF0 80315FF0 8FB50034 */ lw $s5, 0x34($sp) -/* 0D0FF4 80315FF4 8FB40030 */ lw $s4, 0x30($sp) -/* 0D0FF8 80315FF8 8FB3002C */ lw $s3, 0x2c($sp) -/* 0D0FFC 80315FFC 8FB20028 */ lw $s2, 0x28($sp) -/* 0D1000 80316000 8FB10024 */ lw $s1, 0x24($sp) -/* 0D1004 80316004 8FB00020 */ lw $s0, 0x20($sp) -/* 0D1008 80316008 03E00008 */ jr $ra -/* 0D100C 8031600C 27BD0170 */ addiu $sp, $sp, 0x170 diff --git a/asm/rom_header.s b/asm/rom_header.s index 06d84647..88ac440f 100644 --- a/asm/rom_header.s +++ b/asm/rom_header.s @@ -38,4 +38,9 @@ .ascii "P" /* PAL (Europe) */ .endif -.byte 0x00 /* Version */ +.if VERSION_SH == 1 + .byte 0x03 /* Version (Shindou) */ +.else + .byte 0x00 /* Version */ +.endif + diff --git a/assets.json b/assets.json index 1b032791..3faab45b 100644 --- a/assets.json +++ b/assets.json @@ -7,577 +7,577 @@ "@sound tbl eu": [2216704,{"us":[5846368],"eu":[5723888]}], "@sound tbl jp": [1793408,{"jp":[5833216]}], "@sound tbl us": [2216704,{"us":[5846368],"eu":[5723888]}], -"actors/amp/amp_body.rgba16.png": [32,32,2048,{"jp":[2032944,6936],"us":[2040320,6936],"eu":[1912288,6936]}], -"actors/amp/amp_electricity.rgba16.png": [16,32,1024,{"jp":[2032944,3864],"us":[2040320,3864],"eu":[1912288,3864]}], -"actors/amp/amp_eyes.rgba16.png": [32,32,2048,{"jp":[2032944,4888],"us":[2040320,4888],"eu":[1912288,4888]}], -"actors/amp/amp_mouth.rgba16.png": [32,32,2048,{"jp":[2032944,8984],"us":[2040320,8984],"eu":[1912288,8984]}], -"actors/blue_coin_switch/blue_coin_switch_side.rgba16.png": [32,16,1024,{"jp":[2032944,24],"us":[2040320,24],"eu":[1912288,24]}], -"actors/blue_coin_switch/blue_coin_switch_top.rgba16.png": [32,32,2048,{"jp":[2032944,1048],"us":[2040320,1048],"eu":[1912288,1048]}], -"actors/blue_fish/blue_fish.rgba16.png": [32,32,2048,{"jp":[2094912,112096],"us":[2102288,112096],"eu":[1974256,112096]}], -"actors/bobomb/bob-omb_buddy_left_side.rgba16.png": [32,64,4096,{"jp":[1257760,120],"us":[1264928,120],"eu":[1136896,120]}], -"actors/bobomb/bob-omb_buddy_right_side.rgba16.png": [32,64,4096,{"jp":[1257760,4216],"us":[1264928,4216],"eu":[1136896,4216]}], -"actors/bobomb/bob-omb_eyes.rgba16.png": [32,32,2048,{"jp":[1257760,18552],"us":[1264928,18552],"eu":[1136896,18552]}], -"actors/bobomb/bob-omb_eyes_blink.rgba16.png": [32,32,2048,{"jp":[1257760,20600],"us":[1264928,20600],"eu":[1136896,20600]}], -"actors/bobomb/bob-omb_left_side.rgba16.png": [32,64,4096,{"jp":[2032944,121440],"us":[2040320,121440],"eu":[1912288,121440]}], -"actors/bobomb/bob-omb_right_side.rgba16.png": [32,64,4096,{"jp":[2032944,125536],"us":[2040320,125536],"eu":[1912288,125536]}], -"actors/bomb/bomb_left_side.rgba16.png": [32,64,4096,{"jp":[1599504,359104],"us":[1606720,359440],"eu":[1478688,359440]}], -"actors/bomb/bomb_right_side.rgba16.png": [32,64,4096,{"jp":[1599504,363200],"us":[1606720,363536],"eu":[1478688,363536]}], -"actors/bomb/bomb_spike.rgba16.png": [32,32,2048,{"jp":[1599504,367296],"us":[1606720,367632],"eu":[1478688,367632]}], -"actors/boo/boo_eyes.rgba16.png": [64,32,4096,{"jp":[1462368,39744],"us":[1469536,39744],"eu":[1341504,39744]}], -"actors/boo/boo_mouth.rgba16.png": [32,32,2048,{"jp":[1462368,43840],"us":[1469536,43840],"eu":[1341504,43840]}], -"actors/boo_castle/bbh_boo_eyes.rgba16.png": [64,32,4096,{"jp":[1462368,39744],"us":[1469536,39744],"eu":[1341504,39744]}], -"actors/boo_castle/bbh_boo_mouth.rgba16.png": [32,32,2048,{"jp":[1462368,43840],"us":[1469536,43840],"eu":[1341504,43840]}], -"actors/book/book_cover.rgba16.png": [32,32,2048,{"jp":[1462368,4192],"us":[1469536,4192],"eu":[1341504,4192]}], -"actors/bookend/bookend_cover.rgba16.png": [32,32,2048,{"jp":[1462368,4192],"us":[1469536,4192],"eu":[1341504,4192]}], -"actors/bookend/bookend_mouth.rgba16.png": [16,32,1024,{"jp":[1462368,2144],"us":[1469536,2144],"eu":[1341504,2144]}], -"actors/bookend/bookend_pages.rgba16.png": [16,32,1024,{"jp":[1462368,3168],"us":[1469536,3168],"eu":[1341504,3168]}], -"actors/bookend/bookend_spine.rgba16.png": [16,32,1024,{"jp":[1462368,96],"us":[1469536,96],"eu":[1341504,96]}], -"actors/bookend/bookend_tooth.rgba16.png": [16,32,1024,{"jp":[1462368,1120],"us":[1469536,1120],"eu":[1341504,1120]}], -"actors/bowser/bowser_armband.rgba16.png": [32,32,2048,{"jp":[1599504,146488],"us":[1606720,146488],"eu":[1478688,146488]}], -"actors/bowser/bowser_armband_spike.rgba16.png": [64,32,4096,{"jp":[1599504,142392],"us":[1606720,142392],"eu":[1478688,142392]}], -"actors/bowser/bowser_blue_eye_unused.rgba16.png": [64,32,4096,{"jp":[1599504,156728],"us":[1606720,156728],"eu":[1478688,156728]}], -"actors/bowser/bowser_body.rgba16.png": [32,32,2048,{"jp":[1599504,140344],"us":[1606720,140344],"eu":[1478688,140344]}], -"actors/bowser/bowser_chest.rgba16.png": [32,32,2048,{"jp":[1599504,152632],"us":[1606720,152632],"eu":[1478688,152632]}], -"actors/bowser/bowser_claw_edge.rgba16.png": [32,64,4096,{"jp":[1599504,171064],"us":[1606720,171064],"eu":[1478688,171064]}], -"actors/bowser/bowser_claw_horn_angle.rgba16.png": [32,64,4096,{"jp":[1599504,179256],"us":[1606720,179256],"eu":[1478688,179256]}], -"actors/bowser/bowser_claw_horn_tooth.rgba16.png": [32,64,4096,{"jp":[1599504,175160],"us":[1606720,175160],"eu":[1478688,175160]}], -"actors/bowser/bowser_eye_center_0.rgba16.png": [64,32,4096,{"jp":[1599504,195640],"us":[1606720,195640],"eu":[1478688,195640]}], -"actors/bowser/bowser_eye_center_1.rgba16.png": [64,32,4096,{"jp":[1599504,195640],"us":[1606720,195640],"eu":[1478688,195640]}], -"actors/bowser/bowser_eye_closed_0.rgba16.png": [64,32,4096,{"jp":[1599504,191544],"us":[1606720,191544],"eu":[1478688,191544]}], -"actors/bowser/bowser_eye_closed_1.rgba16.png": [64,32,4096,{"jp":[1599504,191544],"us":[1606720,191544],"eu":[1478688,191544]}], -"actors/bowser/bowser_eye_far_left_0.rgba16.png": [64,32,4096,{"jp":[1599504,203832],"us":[1606720,203832],"eu":[1478688,203832]}], -"actors/bowser/bowser_eye_far_left_1.rgba16.png": [64,32,4096,{"jp":[1599504,203832],"us":[1606720,203832],"eu":[1478688,203832]}], -"actors/bowser/bowser_eye_half_closed_0.rgba16.png": [64,32,4096,{"jp":[1599504,187448],"us":[1606720,187448],"eu":[1478688,187448]}], -"actors/bowser/bowser_eye_half_closed_1.rgba16.png": [64,32,4096,{"jp":[1599504,187448],"us":[1606720,187448],"eu":[1478688,187448]}], -"actors/bowser/bowser_eye_left_0.rgba16.png": [64,32,4096,{"jp":[1599504,183352],"us":[1606720,183352],"eu":[1478688,183352]}], -"actors/bowser/bowser_eye_left_1.rgba16.png": [64,32,4096,{"jp":[1599504,183352],"us":[1606720,183352],"eu":[1478688,183352]}], -"actors/bowser/bowser_eye_right_0.rgba16.png": [64,32,4096,{"jp":[1599504,199736],"us":[1606720,199736],"eu":[1478688,199736]}], -"actors/bowser/bowser_eye_right_1.rgba16.png": [64,32,4096,{"jp":[1599504,199736],"us":[1606720,199736],"eu":[1478688,199736]}], -"actors/bowser/bowser_eyebrow.rgba16.png": [64,32,4096,{"jp":[1599504,130104],"us":[1606720,130104],"eu":[1478688,130104]}], -"actors/bowser/bowser_hair.rgba16.png": [32,64,4096,{"jp":[1599504,166968],"us":[1606720,166968],"eu":[1478688,166968]}], -"actors/bowser/bowser_mouth_unused.rgba16.png": [64,32,4096,{"jp":[1599504,160824],"us":[1606720,160824],"eu":[1478688,160824]}], -"actors/bowser/bowser_muzzle.rgba16.png": [32,32,2048,{"jp":[1599504,134200],"us":[1606720,134200],"eu":[1478688,134200]}], -"actors/bowser/bowser_nostrils.rgba16.png": [64,32,4096,{"jp":[1599504,136248],"us":[1606720,136248],"eu":[1478688,136248]}], -"actors/bowser/bowser_shell.rgba16.png": [32,32,2048,{"jp":[1599504,128056],"us":[1606720,128056],"eu":[1478688,128056]}], -"actors/bowser/bowser_shell_edge.rgba16.png": [32,32,2048,{"jp":[1599504,154680],"us":[1606720,154680],"eu":[1478688,154680]}], -"actors/bowser/bowser_tongue.rgba16.png": [32,64,4096,{"jp":[1599504,148536],"us":[1606720,148536],"eu":[1478688,148536]}], -"actors/bowser/bowser_upper_face.rgba16.png": [32,32,2048,{"jp":[1599504,164920],"us":[1606720,164920],"eu":[1478688,164920]}], -"actors/bowser_flame/bowser_flame_0.rgba16.png": [64,64,8192,{"jp":[1599504,0],"us":[1606720,0],"eu":[1478688,0]}], -"actors/bowser_flame/bowser_flame_1.rgba16.png": [64,64,8192,{"jp":[1599504,8192],"us":[1606720,8192],"eu":[1478688,8192]}], -"actors/bowser_flame/bowser_flame_10.rgba16.png": [64,64,8192,{"jp":[1599504,81920],"us":[1606720,81920],"eu":[1478688,81920]}], -"actors/bowser_flame/bowser_flame_11.rgba16.png": [64,64,8192,{"jp":[1599504,90112],"us":[1606720,90112],"eu":[1478688,90112]}], -"actors/bowser_flame/bowser_flame_12.rgba16.png": [64,64,8192,{"jp":[1599504,98304],"us":[1606720,98304],"eu":[1478688,98304]}], -"actors/bowser_flame/bowser_flame_13.rgba16.png": [64,64,8192,{"jp":[1599504,106496],"us":[1606720,106496],"eu":[1478688,106496]}], -"actors/bowser_flame/bowser_flame_2.rgba16.png": [64,64,8192,{"jp":[1599504,16384],"us":[1606720,16384],"eu":[1478688,16384]}], -"actors/bowser_flame/bowser_flame_3.rgba16.png": [64,64,8192,{"jp":[1599504,24576],"us":[1606720,24576],"eu":[1478688,24576]}], -"actors/bowser_flame/bowser_flame_4.rgba16.png": [64,64,8192,{"jp":[1599504,32768],"us":[1606720,32768],"eu":[1478688,32768]}], -"actors/bowser_flame/bowser_flame_5.rgba16.png": [64,64,8192,{"jp":[1599504,40960],"us":[1606720,40960],"eu":[1478688,40960]}], -"actors/bowser_flame/bowser_flame_6.rgba16.png": [64,64,8192,{"jp":[1599504,49152],"us":[1606720,49152],"eu":[1478688,49152]}], -"actors/bowser_flame/bowser_flame_7.rgba16.png": [64,64,8192,{"jp":[1599504,57344],"us":[1606720,57344],"eu":[1478688,57344]}], -"actors/bowser_flame/bowser_flame_8.rgba16.png": [64,64,8192,{"jp":[1599504,65536],"us":[1606720,65536],"eu":[1478688,65536]}], -"actors/bowser_flame/bowser_flame_9.rgba16.png": [64,64,8192,{"jp":[1599504,73728],"us":[1606720,73728],"eu":[1478688,73728]}], -"actors/breakable_box/cork_box_surface.rgba16.png": [32,32,2048,{"jp":[2032944,74384],"us":[2040320,74384],"eu":[1912288,74384]}], -"actors/breakable_box/crazy_box_surface.rgba16.png": [32,32,2048,{"jp":[2032944,72336],"us":[2040320,72336],"eu":[1912288,72336]}], -"actors/bub/bub_eye_border.rgba16.png": [32,32,2048,{"jp":[1568640,5128],"us":[1575856,5128],"eu":[1447824,5128]}], -"actors/bub/bub_eyes.rgba16.png": [64,32,4096,{"jp":[1568640,1032],"us":[1575856,1032],"eu":[1447824,1032]}], -"actors/bub/bub_fins.rgba16.png": [32,32,2048,{"jp":[1568640,7176],"us":[1575856,7176],"eu":[1447824,7176]}], -"actors/bub/bub_scales.rgba16.png": [64,32,4096,{"jp":[1568640,9224],"us":[1575856,9224],"eu":[1447824,9224]}], -"actors/bubba/bubba_eye_border.rgba16.png": [32,32,2048,{"jp":[1568640,5128],"us":[1575856,5128],"eu":[1447824,5128]}], -"actors/bubba/bubba_eyes_unused.rgba16.png": [64,32,4096,{"jp":[1568640,1032],"us":[1575856,1032],"eu":[1447824,1032]}], -"actors/bubba/bubba_fins.rgba16.png": [32,32,2048,{"jp":[1568640,7176],"us":[1575856,7176],"eu":[1447824,7176]}], -"actors/bubba/bubba_scales.rgba16.png": [64,64,8192,{"jp":[1568640,9224],"us":[1575856,9224],"eu":[1447824,9224]}], -"actors/bubba/bubba_sunglasses.rgba16.png": [16,32,1024,{"jp":[1568640,8],"us":[1575856,8],"eu":[1447824,8]}], -"actors/bubble/bubble.rgba16.png": [32,32,2048,{"jp":[1125200,118112],"us":[1132368,118112],"eu":[1004336,118112]}], -"actors/bubble/mr_i_bubble.rgba16.png": [32,32,2048,{"jp":[1125200,120160],"us":[1132368,120160],"eu":[1004336,120160]}], -"actors/bullet_bill/bullet_bill_eye.rgba16.png": [64,32,4096,{"jp":[1215456,47784],"us":[1222624,47784],"eu":[1094592,47784]}], -"actors/bullet_bill/bullet_bill_mouth.rgba16.png": [64,32,4096,{"jp":[1215456,51880],"us":[1222624,51880],"eu":[1094592,51880]}], -"actors/bully/bully_eye.rgba16.png": [32,32,2048,{"jp":[1249376,9320],"us":[1256544,9320],"eu":[1128512,9320]}], -"actors/bully/bully_horn.rgba16.png": [16,16,512,{"jp":[1249376,224],"us":[1256544,224],"eu":[1128512,224]}], -"actors/bully/bully_left_side.rgba16.png": [32,64,4096,{"jp":[1249376,1128],"us":[1256544,1128],"eu":[1128512,1128]}], -"actors/bully/bully_right_side.rgba16.png": [32,64,4096,{"jp":[1249376,5224],"us":[1256544,5224],"eu":[1128512,5224]}], -"actors/burn_smoke/burn_smoke.ia16.png": [32,32,2048,{"jp":[1125200,137216],"us":[1132368,137216],"eu":[1004336,137216]}], -"actors/butterfly/butterfly_wing.rgba16.png": [32,64,4096,{"jp":[2094912,17320],"us":[2102288,17320],"eu":[1974256,17320]}], -"actors/cannon_barrel/cannon_barrel.rgba16.png": [32,32,2048,{"jp":[2032944,22696],"us":[2040320,22696],"eu":[1912288,22696]}], -"actors/cannon_base/cannon_base.rgba16.png": [32,32,2048,{"jp":[2032944,18872],"us":[2040320,18872],"eu":[1912288,18872]}], -"actors/cannon_lid/cannon_lid.rgba16.png": [32,32,2048,{"jp":[2032944,16472],"us":[2040320,16472],"eu":[1912288,16472]}], -"actors/capswitch/cap_switch_base.rgba16.png": [16,4,128,{"jp":[1457744,11336],"us":[1464912,11336],"eu":[1336880,11336]}], -"actors/capswitch/cap_switch_head.ia16.png": [32,64,4096,{"jp":[1457744,7240],"us":[1464912,7240],"eu":[1336880,7240]}], -"actors/chain_ball/chain_ball.rgba16.png": [32,32,2048,{"jp":[1844608,133864],"us":[1851952,133864],"eu":[1723920,133864]}], -"actors/chain_chomp/chain_chomp_bright_shine.rgba16.png": [32,32,2048,{"jp":[1844608,136144],"us":[1851952,136144],"eu":[1723920,136144]}], -"actors/chain_chomp/chain_chomp_dull_shine.rgba16.png": [32,32,2048,{"jp":[1844608,138192],"us":[1851952,138192],"eu":[1723920,138192]}], -"actors/chain_chomp/chain_chomp_eye.rgba16.png": [32,32,2048,{"jp":[1844608,144336],"us":[1851952,144336],"eu":[1723920,144336]}], -"actors/chain_chomp/chain_chomp_tongue.rgba16.png": [32,32,2048,{"jp":[1844608,140240],"us":[1851952,140240],"eu":[1723920,140240]}], -"actors/chain_chomp/chain_chomp_tooth.rgba16.png": [32,32,2048,{"jp":[1462368,27376],"us":[1469536,27376],"eu":[1341504,27376]}], -"actors/chair/chair_bottom.rgba16.png": [32,16,1024,{"jp":[1462368,16480],"us":[1469536,16480],"eu":[1341504,16480]}], -"actors/chair/chair_front.rgba16.png": [32,32,2048,{"jp":[1462368,12384],"us":[1469536,12384],"eu":[1341504,12384]}], -"actors/chair/chair_leg.rgba16.png": [32,32,2048,{"jp":[1462368,14432],"us":[1469536,14432],"eu":[1341504,14432]}], -"actors/chair/chair_surface_unused.rgba16.png": [32,32,2048,{"jp":[1462368,17504],"us":[1469536,17504],"eu":[1341504,17504]}], -"actors/checkerboard_platform/checkerboard_platform.rgba16.png": [32,32,2048,{"jp":[2032944,52288],"us":[2040320,52288],"eu":[1912288,52288]}], -"actors/checkerboard_platform/checkerboard_platform_side.rgba16.png": [32,16,1024,{"jp":[2032944,51264],"us":[2040320,51264],"eu":[1912288,51264]}], -"actors/chillychief/chill_bully_eye.rgba16.png": [32,32,2048,{"jp":[1249376,9320],"us":[1256544,9320],"eu":[1128512,9320]}], -"actors/chillychief/chill_bully_left_side.rgba16.png": [32,64,4096,{"jp":[1979680,96],"us":[1987056,96],"eu":[1859024,96]}], -"actors/chillychief/chill_bully_right_side.rgba16.png": [32,64,4096,{"jp":[1979680,4192],"us":[1987056,4192],"eu":[1859024,4192]}], -"actors/chuckya/chuckya_body_arm_left_side.rgba16.png": [32,64,4096,{"jp":[2032944,32632],"us":[2040320,32632],"eu":[1912288,32632]}], -"actors/chuckya/chuckya_body_arm_right_side.rgba16.png": [32,64,4096,{"jp":[2032944,36728],"us":[2040320,36728],"eu":[1912288,36728]}], -"actors/chuckya/chuckya_eyes.rgba16.png": [32,64,4096,{"jp":[2032944,26488],"us":[2040320,26488],"eu":[1912288,26488]}], -"actors/chuckya/chuckya_hand_antenna.rgba16.png": [32,32,2048,{"jp":[2032944,30584],"us":[2040320,30584],"eu":[1912288,30584]}], -"actors/clam_shell/clam_shell.rgba16.png": [32,32,2048,{"jp":[1285392,48],"us":[1292560,48],"eu":[1164528,48]}], -"actors/clam_shell/clam_shell_mouth.rgba16.png": [32,32,2048,{"jp":[1285392,2096],"us":[1292560,2096],"eu":[1164528,2096]}], -"actors/coin/coin_front.ia16.png": [32,32,2048,{"jp":[2094912,22400],"us":[2102288,22400],"eu":[1974256,22400]}], -"actors/coin/coin_side.ia16.png": [32,32,2048,{"jp":[2094912,26496],"us":[2102288,26496],"eu":[1974256,26496]}], -"actors/coin/coin_tilt_left.ia16.png": [32,32,2048,{"jp":[2094912,28544],"us":[2102288,28544],"eu":[1974256,28544]}], -"actors/coin/coin_tilt_right.ia16.png": [32,32,2048,{"jp":[2094912,24448],"us":[2102288,24448],"eu":[1974256,24448]}], -"actors/cyan_fish/cyan_fish.rgba16.png": [32,32,2048,{"jp":[1802256,54376],"us":[1809600,54376],"eu":[1681568,54376]}], -"actors/dirt/dirt_particle.rgba16.png": [16,16,512,{"jp":[2094912,179704],"us":[2102288,179704],"eu":[1974256,179704]}], -"actors/door/bbh_door.rgba16.png": [32,64,4096,{"jp":[2094912,66832],"us":[2102288,66832],"eu":[1974256,66832]}], -"actors/door/bbh_door_overlay.rgba16.png": [32,32,2048,{"jp":[2094912,70928],"us":[2102288,70928],"eu":[1974256,70928]}], -"actors/door/door_lock.rgba16.png": [16,32,1024,{"jp":[2094912,79120],"us":[2102288,79120],"eu":[1974256,79120]}], -"actors/door/hmc_mural_door.rgba16.png": [32,64,4096,{"jp":[2094912,60688],"us":[2102288,60688],"eu":[1974256,60688]}], -"actors/door/hmc_mural_door_overlay.rgba16.png": [32,32,2048,{"jp":[2094912,64784],"us":[2102288,64784],"eu":[1974256,64784]}], -"actors/door/metal_door.rgba16.png": [32,64,4096,{"jp":[2094912,54544],"us":[2102288,54544],"eu":[1974256,54544]}], -"actors/door/metal_door_overlay.rgba16.png": [32,32,2048,{"jp":[2094912,58640],"us":[2102288,58640],"eu":[1974256,58640]}], -"actors/door/one_star_door_sign.rgba16.png": [32,32,2048,{"jp":[2094912,75024],"us":[2102288,75024],"eu":[1974256,75024]}], -"actors/door/polished_wooden_door.rgba16.png": [32,64,4096,{"jp":[2094912,40208],"us":[2102288,40208],"eu":[1974256,40208]}], -"actors/door/polished_wooden_door_overlay.rgba16.png": [32,64,4096,{"jp":[2094912,44304],"us":[2102288,44304],"eu":[1974256,44304]}], -"actors/door/rough_wooden_door.rgba16.png": [32,64,4096,{"jp":[2094912,48400],"us":[2102288,48400],"eu":[1974256,48400]}], -"actors/door/rough_wooden_door_overlay.rgba16.png": [32,32,2048,{"jp":[2094912,52496],"us":[2102288,52496],"eu":[1974256,52496]}], -"actors/door/three_star_door_sign.rgba16.png": [32,32,2048,{"jp":[2094912,77072],"us":[2102288,77072],"eu":[1974256,77072]}], -"actors/door/zero_star_door_sign.rgba16.png": [32,32,2048,{"jp":[2094912,72976],"us":[2102288,72976],"eu":[1974256,72976]}], -"actors/dorrie/dorrie_eye.rgba16.png": [16,16,512,{"jp":[1991184,39840],"us":[1998560,39840],"eu":[1870528,39840]}], -"actors/dorrie/dorrie_skin.rgba16.png": [32,64,4096,{"jp":[1991184,40352],"us":[1998560,40352],"eu":[1870528,40352]}], -"actors/dorrie/dorrie_tongue.rgba16.png": [32,32,2048,{"jp":[1844608,140240],"us":[1851952,140240],"eu":[1723920,140240]}], -"actors/exclamation_box/exclamation_box_front.rgba16.png": [32,32,2048,{"jp":[2032944,95784],"us":[2040320,95784],"eu":[1912288,95784]}], -"actors/exclamation_box/exclamation_box_side.rgba16.png": [64,32,4096,{"jp":[2032944,97832],"us":[2040320,97832],"eu":[1912288,97832]}], -"actors/exclamation_box/metal_cap_box_front.rgba16.png": [32,32,2048,{"jp":[2032944,83496],"us":[2040320,83496],"eu":[1912288,83496]}], -"actors/exclamation_box/metal_cap_box_side.rgba16.png": [64,32,4096,{"jp":[2032944,85544],"us":[2040320,85544],"eu":[1912288,85544]}], -"actors/exclamation_box/vanish_cap_box_front.rgba16.png": [32,32,2048,{"jp":[2032944,77352],"us":[2040320,77352],"eu":[1912288,77352]}], -"actors/exclamation_box/vanish_cap_box_sides.rgba16.png": [64,32,4096,{"jp":[2032944,79400],"us":[2040320,79400],"eu":[1912288,79400]}], -"actors/exclamation_box/wing_cap_box_front.rgba16.png": [32,32,2048,{"jp":[2032944,89640],"us":[2040320,89640],"eu":[1912288,89640]}], -"actors/exclamation_box/wing_cap_box_sides.rgba16.png": [64,32,4096,{"jp":[2032944,91688],"us":[2040320,91688],"eu":[1912288,91688]}], -"actors/exclamation_box_outline/exclamation_box_outline.rgba16.png": [32,32,2048,{"jp":[2032944,151912],"us":[2040320,151912],"eu":[1912288,151912]}], -"actors/exclamation_box_outline/exclamation_point.rgba16.png": [16,32,1024,{"jp":[2032944,154240],"us":[2040320,154240],"eu":[1912288,154240]}], -"actors/explosion/explosion_0.rgba16.png": [32,32,2048,{"jp":[2094912,2568],"us":[2102288,2568],"eu":[1974256,2568]}], -"actors/explosion/explosion_1.rgba16.png": [32,32,2048,{"jp":[2094912,4616],"us":[2102288,4616],"eu":[1974256,4616]}], -"actors/explosion/explosion_2.rgba16.png": [32,32,2048,{"jp":[2094912,6664],"us":[2102288,6664],"eu":[1974256,6664]}], -"actors/explosion/explosion_3.rgba16.png": [32,32,2048,{"jp":[2094912,8712],"us":[2102288,8712],"eu":[1974256,8712]}], -"actors/explosion/explosion_4.rgba16.png": [32,32,2048,{"jp":[2094912,10760],"us":[2102288,10760],"eu":[1974256,10760]}], -"actors/explosion/explosion_5.rgba16.png": [32,32,2048,{"jp":[2094912,12808],"us":[2102288,12808],"eu":[1974256,12808]}], -"actors/explosion/explosion_6.rgba16.png": [32,32,2048,{"jp":[2094912,14856],"us":[2102288,14856],"eu":[1974256,14856]}], -"actors/eyerok/eyerok_bricks.rgba16.png": [32,32,2048,{"jp":[1327760,36160],"us":[1334928,36160],"eu":[1206896,36160]}], -"actors/eyerok/eyerok_eye_closed.rgba16.png": [32,32,2048,{"jp":[1327760,44352],"us":[1334928,44352],"eu":[1206896,44352]}], -"actors/eyerok/eyerok_eye_mostly_closed.rgba16.png": [32,32,2048,{"jp":[1327760,42304],"us":[1334928,42304],"eu":[1206896,42304]}], -"actors/eyerok/eyerok_eye_mostly_open.rgba16.png": [32,32,2048,{"jp":[1327760,40256],"us":[1334928,40256],"eu":[1206896,40256]}], -"actors/eyerok/eyerok_eye_open.rgba16.png": [32,32,2048,{"jp":[1327760,38208],"us":[1334928,38208],"eu":[1206896,38208]}], -"actors/flame/flame_0.ia16.png": [32,32,2048,{"jp":[2094912,95008],"us":[2102288,95008],"eu":[1974256,95008]}], -"actors/flame/flame_1.ia16.png": [32,32,2048,{"jp":[2094912,97056],"us":[2102288,97056],"eu":[1974256,97056]}], -"actors/flame/flame_2.ia16.png": [32,32,2048,{"jp":[2094912,99104],"us":[2102288,99104],"eu":[1974256,99104]}], -"actors/flame/flame_3.ia16.png": [32,32,2048,{"jp":[2094912,101152],"us":[2102288,101152],"eu":[1974256,101152]}], -"actors/flame/flame_4.ia16.png": [32,32,2048,{"jp":[2094912,103200],"us":[2102288,103200],"eu":[1974256,103200]}], -"actors/flame/flame_5.ia16.png": [32,32,2048,{"jp":[2094912,105248],"us":[2102288,105248],"eu":[1974256,105248]}], -"actors/flame/flame_6.ia16.png": [32,32,2048,{"jp":[2094912,107296],"us":[2102288,107296],"eu":[1974256,107296]}], -"actors/flame/flame_7.ia16.png": [32,32,2048,{"jp":[2094912,109344],"us":[2102288,109344],"eu":[1974256,109344]}], -"actors/flyguy/flyguy_cloth_wrinkle.rgba16.png": [64,32,4096,{"jp":[2032944,57480],"us":[2040320,57480],"eu":[1912288,57480]}], -"actors/flyguy/flyguy_face.rgba16.png": [32,32,2048,{"jp":[2032944,61576],"us":[2040320,61576],"eu":[1912288,61576]}], -"actors/flyguy/flyguy_propeller.ia16.png": [32,32,2048,{"jp":[2032944,63624],"us":[2040320,63624],"eu":[1912288,63624]}], -"actors/fwoosh/fwoosh_face.ia16.png": [32,32,2048,{"jp":[1377744,88072],"us":[1384912,88072],"eu":[1256880,88072]}], -"actors/goomba/goomba_body.rgba16.png": [32,32,2048,{"jp":[2032944,103728],"us":[2040320,103728],"eu":[1912288,103728]}], -"actors/goomba/goomba_face.rgba16.png": [32,32,2048,{"jp":[2032944,105776],"us":[2040320,105776],"eu":[1912288,105776]}], -"actors/goomba/goomba_face_blink.rgba16.png": [32,32,2048,{"jp":[2032944,107824],"us":[2040320,107824],"eu":[1912288,107824]}], -"actors/haunted_cage/bbh_cage_bars.rgba16.png": [32,32,2048,{"jp":[1462368,55944],"us":[1469536,55944],"eu":[1341504,55944]}], -"actors/haunted_cage/bbh_cage_double_ornament.rgba16.png": [32,32,2048,{"jp":[1462368,51848],"us":[1469536,51848],"eu":[1341504,51848]}], -"actors/haunted_cage/bbh_cage_floor.rgba16.png": [32,32,2048,{"jp":[1462368,49800],"us":[1469536,49800],"eu":[1341504,49800]}], -"actors/haunted_cage/bbh_cage_ornament.rgba16.png": [32,16,1024,{"jp":[1462368,53896],"us":[1469536,53896],"eu":[1341504,53896]}], -"actors/haunted_cage/bbh_cage_wooden_base.rgba16.png": [32,16,1024,{"jp":[1462368,54920],"us":[1469536,54920],"eu":[1341504,54920]}], -"actors/haunted_cage/bbh_cage_garbage.rgba16.png": [32,32,2048,{"jp":[1462368,57992],"us":[1469536,57992],"eu":[1341504,57992]}], -"actors/heart/spinning_heart.rgba16.png": [32,32,2048,{"jp":[2032944,55264],"us":[2040320,55264],"eu":[1912288,55264]}], -"actors/heave_ho/heave-ho_arm_ornament.rgba16.png": [32,32,2048,{"jp":[1215456,68040],"us":[1222624,68040],"eu":[1094592,68040]}], -"actors/heave_ho/heave-ho_face.rgba16.png": [32,32,2048,{"jp":[1215456,59848],"us":[1222624,59848],"eu":[1094592,59848]}], -"actors/heave_ho/heave-ho_logo.rgba16.png": [64,32,4096,{"jp":[1215456,63944],"us":[1222624,63944],"eu":[1094592,63944]}], -"actors/heave_ho/heave-ho_platform.rgba16.png": [32,32,2048,{"jp":[1215456,61896],"us":[1222624,61896],"eu":[1094592,61896]}], -"actors/heave_ho/heave-ho_roller.rgba16.png": [16,16,512,{"jp":[1215456,70088],"us":[1222624,70088],"eu":[1094592,70088]}], -"actors/heave_ho/heave-ho_turnkey.rgba16.png": [32,32,2048,{"jp":[1215456,70600],"us":[1222624,70600],"eu":[1094592,70600]}], -"actors/hoot/hoot_eyes.rgba16.png": [32,32,2048,{"jp":[1215456,2592],"us":[1222624,2592],"eu":[1094592,2592]}], -"actors/hoot/hoot_wing.rgba16.png": [32,32,2048,{"jp":[1215456,7760],"us":[1222624,7760],"eu":[1094592,7760]}], -"actors/hoot/hoot_wing_tip.rgba16.png": [32,32,2048,{"jp":[1215456,9808],"us":[1222624,9808],"eu":[1094592,9808]}], -"actors/impact_ring/impact_ring_left_side.ia16.png": [32,64,4096,{"jp":[1599504,117328],"us":[1606720,117328],"eu":[1478688,117328]}], -"actors/impact_ring/impact_ring_right_side.ia16.png": [32,64,4096,{"jp":[1599504,121424],"us":[1606720,121424],"eu":[1478688,121424]}], -"actors/impact_smoke/impact_smoke_0.ia16.png": [64,64,8192,{"jp":[1599504,371240],"us":[1606720,371576],"eu":[1478688,371576]}], -"actors/impact_smoke/impact_smoke_1.ia16.png": [64,64,8192,{"jp":[1599504,379432],"us":[1606720,379768],"eu":[1478688,379768]}], -"actors/impact_smoke/impact_smoke_2.ia16.png": [64,64,8192,{"jp":[1599504,387624],"us":[1606720,387960],"eu":[1478688,387960]}], -"actors/impact_smoke/impact_smoke_3.ia16.png": [64,64,8192,{"jp":[1599504,395816],"us":[1606720,396152],"eu":[1478688,396152]}], -"actors/king_bobomb/bob-omb_buddy_body_unused.rgba16.png": [64,64,8192,{"jp":[1257760,25720],"us":[1264928,25720],"eu":[1136896,25720]}], -"actors/king_bobomb/bob-omb_buddy_left_side_unused.rgba16.png": [32,64,4096,{"jp":[1257760,120],"us":[1264928,120],"eu":[1136896,120]}], -"actors/king_bobomb/bob-omb_buddy_right_side_unused.rgba16.png": [32,64,4096,{"jp":[1257760,4216],"us":[1264928,4216],"eu":[1136896,4216]}], -"actors/king_bobomb/king_bob-omb_arm.rgba16.png": [32,32,2048,{"jp":[1257760,8312],"us":[1264928,8312],"eu":[1136896,8312]}], -"actors/king_bobomb/king_bob-omb_body_unused.rgba16.png": [64,64,8192,{"jp":[1257760,10360],"us":[1264928,10360],"eu":[1136896,10360]}], -"actors/king_bobomb/king_bob-omb_crown_rim.rgba16.png": [32,16,1024,{"jp":[1257760,24696],"us":[1264928,24696],"eu":[1136896,24696]}], -"actors/king_bobomb/king_bob-omb_eyes.rgba16.png": [32,64,4096,{"jp":[1257760,18552],"us":[1264928,18552],"eu":[1136896,18552]}], -"actors/king_bobomb/king_bob-omb_hand.rgba16.png": [32,32,2048,{"jp":[1215456,64],"us":[1222624,64],"eu":[1094592,64]}], -"actors/king_bobomb/king_bob-omb_left_side.rgba16.png": [32,64,4096,{"jp":[1257760,33912],"us":[1264928,33912],"eu":[1136896,33912]}], -"actors/king_bobomb/king_bob-omb_right_side.rgba16.png": [32,64,4096,{"jp":[1257760,38008],"us":[1264928,38008],"eu":[1136896,38008]}], -"actors/klepto/klepto_beak.rgba16.png": [32,64,4096,{"jp":[1327760,4104],"us":[1334928,4104],"eu":[1206896,4104]}], -"actors/klepto/klepto_chest_tuft.rgba16.png": [32,32,2048,{"jp":[1327760,8],"us":[1334928,8],"eu":[1206896,8]}], -"actors/klepto/klepto_eye.rgba16.png": [32,32,2048,{"jp":[1327760,2056],"us":[1334928,2056],"eu":[1206896,2056]}], -"actors/klepto/klepto_wing.rgba16.png": [64,32,4096,{"jp":[1327760,8200],"us":[1334928,8200],"eu":[1206896,8200]}], -"actors/klepto/klepto_wing_flap.rgba16.png": [32,32,2048,{"jp":[1327760,12296],"us":[1334928,12296],"eu":[1206896,12296]}], -"actors/koopa/koopa_eye_border.rgba16.png": [32,32,2048,{"jp":[1844608,22088],"us":[1851952,22088],"eu":[1723920,22088]}], -"actors/koopa/koopa_eyes_closed.rgba16.png": [32,32,2048,{"jp":[1844608,20040],"us":[1851952,20040],"eu":[1723920,20040]}], -"actors/koopa/koopa_eyes_open.rgba16.png": [32,32,2048,{"jp":[1844608,17992],"us":[1851952,17992],"eu":[1723920,17992]}], -"actors/koopa/koopa_nostrils.rgba16.png": [64,32,4096,{"jp":[1844608,24136],"us":[1851952,24136],"eu":[1723920,24136]}], -"actors/koopa/koopa_shell_back.rgba16.png": [32,32,2048,{"jp":[1844608,11848],"us":[1851952,11848],"eu":[1723920,11848]}], -"actors/koopa/koopa_shell_front.rgba16.png": [32,32,2048,{"jp":[1844608,9800],"us":[1851952,9800],"eu":[1723920,9800]}], -"actors/koopa/koopa_shell_front_top.rgba16.png": [32,32,2048,{"jp":[1844608,15944],"us":[1851952,15944],"eu":[1723920,15944]}], -"actors/koopa/koopa_shoe.rgba16.png": [32,32,2048,{"jp":[1844608,13896],"us":[1851952,13896],"eu":[1723920,13896]}], -"actors/koopa_flag/koopa_flag_banner.rgba16.png": [32,32,2048,{"jp":[1844608,72],"us":[1851952,72],"eu":[1723920,72]}], -"actors/koopa_shell/koopa_shell_back.rgba16.png": [32,32,2048,{"jp":[1844608,11848],"us":[1851952,11848],"eu":[1723920,11848]}], -"actors/koopa_shell/koopa_shell_front.rgba16.png": [32,32,2048,{"jp":[1844608,9800],"us":[1851952,9800],"eu":[1723920,9800]}], -"actors/lakitu_cameraman/lakitu_camera_lens.rgba16.png": [16,16,512,{"jp":[1926752,14336],"us":[1934096,14336],"eu":[1806064,14336]}], -"actors/lakitu_cameraman/lakitu_cameraman_cloud_face_unused.rgba16.png": [32,32,2048,{"jp":[1568640,60640],"us":[1575856,60640],"eu":[1447824,60640]}], -"actors/lakitu_cameraman/lakitu_cameraman_eyes_closed.rgba16.png": [64,32,4096,{"jp":[1568640,66784],"us":[1575856,66784],"eu":[1447824,66784]}], -"actors/lakitu_cameraman/lakitu_cameraman_eyes_open.rgba16.png": [64,32,4096,{"jp":[1568640,62688],"us":[1575856,62688],"eu":[1447824,62688]}], -"actors/lakitu_cameraman/lakitu_cameraman_frown.rgba16.png": [32,32,2048,{"jp":[1568640,72928],"us":[1575856,72928],"eu":[1447824,72928]}], -"actors/lakitu_cameraman/lakitu_cameraman_shell.rgba16.png": [32,32,2048,{"jp":[1568640,70880],"us":[1575856,70880],"eu":[1447824,70880]}], -"actors/lakitu_enemy/lakitu_enemy_cloud_face_unused.rgba16.png": [32,32,2048,{"jp":[1568640,60640],"us":[1575856,60640],"eu":[1447824,60640]}], -"actors/lakitu_enemy/lakitu_enemy_eyes_closed.rgba16.png": [64,32,4096,{"jp":[1568640,66784],"us":[1575856,66784],"eu":[1447824,66784]}], -"actors/lakitu_enemy/lakitu_enemy_eyes_open.rgba16.png": [64,32,4096,{"jp":[1568640,62688],"us":[1575856,62688],"eu":[1447824,62688]}], -"actors/lakitu_enemy/lakitu_enemy_frown.rgba16.png": [32,32,2048,{"jp":[1568640,72928],"us":[1575856,72928],"eu":[1447824,72928]}], -"actors/lakitu_enemy/lakitu_enemy_shell.rgba16.png": [32,32,2048,{"jp":[1568640,70880],"us":[1575856,70880],"eu":[1447824,70880]}], -"actors/leaves/leaf.rgba16.png": [16,16,512,{"jp":[2094912,117728],"us":[2102288,117728],"eu":[1974256,117728]}], -"actors/mad_piano/mad_piano_body.rgba16.png": [16,32,1024,{"jp":[1462368,29424],"us":[1469536,29424],"eu":[1341504,29424]}], -"actors/mad_piano/mad_piano_keys.rgba16.png": [32,16,1024,{"jp":[1462368,32496],"us":[1469536,32496],"eu":[1341504,32496]}], -"actors/mad_piano/mad_piano_keys_corner.rgba16.png": [32,16,1024,{"jp":[1462368,30448],"us":[1469536,30448],"eu":[1341504,30448]}], -"actors/mad_piano/mad_piano_keys_edge.rgba16.png": [32,16,1024,{"jp":[1462368,33520],"us":[1469536,33520],"eu":[1341504,33520]}], -"actors/mad_piano/mad_piano_mouth.rgba16.png": [16,32,1024,{"jp":[1462368,31472],"us":[1469536,31472],"eu":[1341504,31472]}], -"actors/mad_piano/mad_piano_tooth.rgba16.png": [32,32,2048,{"jp":[1462368,27376],"us":[1469536,27376],"eu":[1341504,27376]}], -"actors/manta/manta_eye.rgba16.png": [32,32,2048,{"jp":[1285392,12192],"us":[1292560,12192],"eu":[1164528,12192]}], -"actors/manta/manta_fin_corner.rgba16.png": [32,32,2048,{"jp":[1285392,6048],"us":[1292560,6048],"eu":[1164528,6048]}], -"actors/manta/manta_fin_edge.rgba16.png": [64,32,4096,{"jp":[1285392,14240],"us":[1292560,14240],"eu":[1164528,14240]}], -"actors/manta/manta_gills.rgba16.png": [32,64,4096,{"jp":[1285392,8096],"us":[1292560,8096],"eu":[1164528,8096]}], -"actors/mario/mario_eyes_center.rgba16.png": [32,32,2048,{"jp":[1125200,12432],"us":[1132368,12432],"eu":[1004336,12432]}], -"actors/mario/mario_eyes_closed.rgba16.png": [32,32,2048,{"jp":[1125200,16528],"us":[1132368,16528],"eu":[1004336,16528]}], -"actors/mario/mario_eyes_closed_unused_0.rgba16.png": [32,32,2048,{"jp":[1125200,16528],"us":[1132368,16528],"eu":[1004336,16528]}], -"actors/mario/mario_eyes_closed_unused_1.rgba16.png": [32,32,2048,{"jp":[1125200,16528],"us":[1132368,16528],"eu":[1004336,16528]}], -"actors/mario/mario_eyes_dead.rgba16.png": [32,32,2048,{"jp":[1125200,30864],"us":[1132368,30864],"eu":[1004336,30864]}], -"actors/mario/mario_eyes_down_unused.rgba16.png": [32,32,2048,{"jp":[1125200,28816],"us":[1132368,28816],"eu":[1004336,28816]}], -"actors/mario/mario_eyes_half_closed.rgba16.png": [32,32,2048,{"jp":[1125200,14480],"us":[1132368,14480],"eu":[1004336,14480]}], -"actors/mario/mario_eyes_left_unused.rgba16.png": [32,32,2048,{"jp":[1125200,22672],"us":[1132368,22672],"eu":[1004336,22672]}], -"actors/mario/mario_eyes_right_unused.rgba16.png": [32,32,2048,{"jp":[1125200,24720],"us":[1132368,24720],"eu":[1004336,24720]}], -"actors/mario/mario_eyes_up_unused.rgba16.png": [32,32,2048,{"jp":[1125200,26768],"us":[1132368,26768],"eu":[1004336,26768]}], -"actors/mario/mario_logo.rgba16.png": [32,32,2048,{"jp":[1125200,6288],"us":[1132368,6288],"eu":[1004336,6288]}], -"actors/mario/mario_metal.rgba16.png": [64,32,4096,{"jp":[1125200,144],"us":[1132368,144],"eu":[1004336,144]}], -"actors/mario/mario_metal_wing_tip_unused.rgba16.png": [32,64,4096,{"jp":[1125200,45200],"us":[1132368,45200],"eu":[1004336,45200]}], -"actors/mario/mario_metal_wing_unused.rgba16.png": [32,64,4096,{"jp":[1125200,41104],"us":[1132368,41104],"eu":[1004336,41104]}], -"actors/mario/mario_mustache.rgba16.png": [32,32,2048,{"jp":[1125200,10384],"us":[1132368,10384],"eu":[1004336,10384]}], -"actors/mario/mario_overalls_button.rgba16.png": [32,32,2048,{"jp":[1125200,4240],"us":[1132368,4240],"eu":[1004336,4240]}], -"actors/mario/mario_sideburn.rgba16.png": [32,32,2048,{"jp":[1125200,8336],"us":[1132368,8336],"eu":[1004336,8336]}], -"actors/mario/mario_wing.rgba16.png": [32,64,4096,{"jp":[1125200,32912],"us":[1132368,32912],"eu":[1004336,32912]}], -"actors/mario/mario_wing_tip.rgba16.png": [32,64,4096,{"jp":[1125200,37008],"us":[1132368,37008],"eu":[1004336,37008]}], -"actors/mario_cap/mario_cap_logo.rgba16.png": [32,32,2048,{"jp":[1125200,6288],"us":[1132368,6288],"eu":[1004336,6288]}], -"actors/mario_cap/mario_cap_metal.rgba16.png": [64,32,4096,{"jp":[1125200,144],"us":[1132368,144],"eu":[1004336,144]}], -"actors/mario_cap/mario_cap_metal_wing_tip_unused.rgba16.png": [32,64,4096,{"jp":[1125200,45200],"us":[1132368,45200],"eu":[1004336,45200]}], -"actors/mario_cap/mario_cap_metal_wing_unused.rgba16.png": [32,64,4096,{"jp":[1125200,41104],"us":[1132368,41104],"eu":[1004336,41104]}], -"actors/mario_cap/mario_cap_wing.rgba16.png": [32,64,4096,{"jp":[1125200,32912],"us":[1132368,32912],"eu":[1004336,32912]}], -"actors/mario_cap/mario_cap_wing_tip.rgba16.png": [32,64,4096,{"jp":[1125200,37008],"us":[1132368,37008],"eu":[1004336,37008]}], -"actors/metal_box/metal_box_side.rgba16.png": [32,64,4096,{"jp":[2032944,145816],"us":[2040320,145816],"eu":[1912288,145816]}], -"actors/mips/mips_eyes.rgba16.png": [32,32,2048,{"jp":[1926752,64384],"us":[1934096,64624],"eu":[1806064,64624]}], -"actors/mist/mist.ia16.png": [32,32,2048,{"jp":[2094912,128],"us":[2102288,128],"eu":[1974256,128]}], -"actors/moneybag/moneybag_eyes.rgba16.png": [32,32,2048,{"jp":[1979680,18864],"us":[1987056,18864],"eu":[1859024,18864]}], -"actors/moneybag/moneybag_mouth.rgba16.png": [64,32,4096,{"jp":[1979680,14768],"us":[1987056,14768],"eu":[1859024,14768]}], -"actors/monty_mole/monty_mole_cheek.rgba16.png": [32,32,2048,{"jp":[1377744,2416],"us":[1384912,2416],"eu":[1256880,2416]}], -"actors/monty_mole/monty_mole_claw.rgba16.png": [32,32,2048,{"jp":[1377744,10608],"us":[1384912,10608],"eu":[1256880,10608]}], -"actors/monty_mole/monty_mole_eye.rgba16.png": [32,32,2048,{"jp":[1377744,4464],"us":[1384912,4464],"eu":[1256880,4464]}], -"actors/monty_mole/monty_mole_nose.rgba16.png": [32,32,2048,{"jp":[1377744,6512],"us":[1384912,6512],"eu":[1256880,6512]}], -"actors/monty_mole/monty_mole_tooth.rgba16.png": [32,32,2048,{"jp":[1377744,8560],"us":[1384912,8560],"eu":[1256880,8560]}], -"actors/monty_mole_hole/monty_mole_hole.ia16.png": [32,32,2048,{"jp":[1377744,64],"us":[1384912,64],"eu":[1256880,64]}], -"actors/mr_i_eyeball/mr_i_eyeball_left_side.rgba16.png": [32,64,4096,{"jp":[1991184,128],"us":[1998560,128],"eu":[1870528,128]}], -"actors/mr_i_eyeball/mr_i_eyeball_right_side.rgba16.png": [32,64,4096,{"jp":[1991184,4224],"us":[1998560,4224],"eu":[1870528,4224]}], -"actors/mr_i_iris/mr_i_iris_closed.rgba16.png": [32,32,2048,{"jp":[1991184,14704],"us":[1998560,14704],"eu":[1870528,14704]}], -"actors/mr_i_iris/mr_i_iris_mostly_closed.rgba16.png": [32,32,2048,{"jp":[1991184,12656],"us":[1998560,12656],"eu":[1870528,12656]}], -"actors/mr_i_iris/mr_i_iris_mostly_open.rgba16.png": [32,32,2048,{"jp":[1991184,10608],"us":[1998560,10608],"eu":[1870528,10608]}], -"actors/mr_i_iris/mr_i_iris_open.rgba16.png": [32,32,2048,{"jp":[1991184,8560],"us":[1998560,8560],"eu":[1870528,8560]}], -"actors/mushroom_1up/1-up_mushroom.rgba16.png": [32,64,4096,{"jp":[2094912,169512],"us":[2102288,169512],"eu":[1974256,169512]}], -"actors/peach/peach_chest_jewel.rgba16.png": [16,16,512,{"jp":[1490032,11304],"us":[1497200,11304],"eu":[1369168,11304]}], -"actors/peach/peach_crown_jewel.rgba16.png": [16,16,512,{"jp":[1490032,10792],"us":[1497200,10792],"eu":[1369168,10792]}], -"actors/peach/peach_dress.rgba16.png": [32,32,2048,{"jp":[1490032,16424],"us":[1497200,16424],"eu":[1369168,16424]}], -"actors/peach/peach_eye_closed.rgba16.png": [32,32,2048,{"jp":[1490032,8744],"us":[1497200,8744],"eu":[1369168,8744]}], -"actors/peach/peach_eye_mostly_closed.rgba16.png": [32,32,2048,{"jp":[1490032,6696],"us":[1497200,6696],"eu":[1369168,6696]}], -"actors/peach/peach_eye_mostly_open.rgba16.png": [32,32,2048,{"jp":[1490032,4648],"us":[1497200,4648],"eu":[1369168,4648]}], -"actors/peach/peach_eye_open.rgba16.png": [32,32,2048,{"jp":[1490032,2600],"us":[1497200,2600],"eu":[1369168,2600]}], -"actors/peach/peach_lips.rgba16.png": [32,32,2048,{"jp":[1490032,13864],"us":[1497200,13864],"eu":[1369168,13864]}], -"actors/peach/peach_lips_scrunched.rgba16.png": [32,32,2048,{"jp":[1490032,11816],"us":[1497200,11816],"eu":[1369168,11816]}], -"actors/peach/peach_nostril.rgba16.png": [16,16,512,{"jp":[1490032,15912],"us":[1497200,15912],"eu":[1369168,15912]}], -"actors/pebble/pebble.rgba16.png": [32,32,2048,{"jp":[2094912,115456],"us":[2102288,115456],"eu":[1974256,115456]}], -"actors/penguin/penguin_beak.rgba16.png": [32,32,2048,{"jp":[1436272,21984],"us":[1443440,21984],"eu":[1315408,21984]}], -"actors/penguin/penguin_eye_angry.rgba16.png": [32,32,2048,{"jp":[1436272,17888],"us":[1443440,17888],"eu":[1315408,17888]}], -"actors/penguin/penguin_eye_angry_unused.rgba16.png": [32,32,2048,{"jp":[1436272,19936],"us":[1443440,19936],"eu":[1315408,19936]}], -"actors/penguin/penguin_eye_closed.rgba16.png": [32,32,2048,{"jp":[1436272,15840],"us":[1443440,15840],"eu":[1315408,15840]}], -"actors/penguin/penguin_eye_half_closed.rgba16.png": [32,32,2048,{"jp":[1436272,13792],"us":[1443440,13792],"eu":[1315408,13792]}], -"actors/penguin/penguin_eye_open.rgba16.png": [32,32,2048,{"jp":[1436272,11744],"us":[1443440,11744],"eu":[1315408,11744]}], -"actors/piranha_plant/piranha_plant_bottom_lip.rgba16.png": [32,32,2048,{"jp":[1844608,78840],"us":[1851952,78840],"eu":[1723920,78840]}], -"actors/piranha_plant/piranha_plant_leaf.rgba16.png": [32,64,4096,{"jp":[1844608,82936],"us":[1851952,82936],"eu":[1723920,82936]}], -"actors/piranha_plant/piranha_plant_skin.rgba16.png": [32,32,2048,{"jp":[1844608,74744],"us":[1851952,74744],"eu":[1723920,74744]}], -"actors/piranha_plant/piranha_plant_stem.rgba16.png": [32,32,2048,{"jp":[1844608,76792],"us":[1851952,76792],"eu":[1723920,76792]}], -"actors/piranha_plant/piranha_plant_tongue.rgba16.png": [32,64,4096,{"jp":[1599504,148536],"us":[1606720,148536],"eu":[1478688,148536]}], -"actors/piranha_plant/piranha_plant_tooth.rgba16.png": [32,32,2048,{"jp":[1844608,80888],"us":[1851952,80888],"eu":[1723920,80888]}], -"actors/pokey/pokey_body.rgba16.png": [32,32,2048,{"jp":[1327760,75896],"us":[1334928,75896],"eu":[1206896,75896]}], -"actors/pokey/pokey_face.rgba16.png": [32,32,2048,{"jp":[1327760,71504],"us":[1334928,71504],"eu":[1206896,71504]}], -"actors/pokey/pokey_face_blink.rgba16.png": [32,32,2048,{"jp":[1327760,73552],"us":[1334928,73552],"eu":[1206896,73552]}], -"actors/poundable_pole/poundable_pole_side.rgba16.png": [32,32,2048,{"jp":[1844608,6224],"us":[1851952,6224],"eu":[1723920,6224]}], -"actors/poundable_pole/poundable_pole_top.rgba16.png": [32,32,2048,{"jp":[1844608,4176],"us":[1851952,4176],"eu":[1723920,4176]}], -"actors/power_meter/power_meter_five_segments.rgba16.png": [32,32,2048,{"jp":[2094912,158688],"us":[2102288,158688],"eu":[1974256,158688]}], -"actors/power_meter/power_meter_four_segments.rgba16.png": [32,32,2048,{"jp":[2094912,160736],"us":[2102288,160736],"eu":[1974256,160736]}], -"actors/power_meter/power_meter_full.rgba16.png": [32,32,2048,{"jp":[2094912,152544],"us":[2102288,152544],"eu":[1974256,152544]}], -"actors/power_meter/power_meter_left_side.rgba16.png": [32,64,4096,{"jp":[2094912,144352],"us":[2102288,144352],"eu":[1974256,144352]}], -"actors/power_meter/power_meter_one_segment.rgba16.png": [32,32,2048,{"jp":[2094912,166880],"us":[2102288,166880],"eu":[1974256,166880]}], -"actors/power_meter/power_meter_right_side.rgba16.png": [32,64,4096,{"jp":[2094912,148448],"us":[2102288,148448],"eu":[1974256,148448]}], -"actors/power_meter/power_meter_seven_segments.rgba16.png": [32,32,2048,{"jp":[2094912,154592],"us":[2102288,154592],"eu":[1974256,154592]}], -"actors/power_meter/power_meter_six_segments.rgba16.png": [32,32,2048,{"jp":[2094912,156640],"us":[2102288,156640],"eu":[1974256,156640]}], -"actors/power_meter/power_meter_three_segments.rgba16.png": [32,32,2048,{"jp":[2094912,162784],"us":[2102288,162784],"eu":[1974256,162784]}], -"actors/power_meter/power_meter_two_segments.rgba16.png": [32,32,2048,{"jp":[2094912,164832],"us":[2102288,164832],"eu":[1974256,164832]}], -"actors/purple_switch/purple_switch_base.rgba16.png": [16,4,128,{"jp":[2032944,49320],"us":[2040320,49320],"eu":[1912288,49320]}], -"actors/purple_switch/purple_switch_exclamation_point.rgba16.png": [16,32,1024,{"jp":[2032944,49448],"us":[2040320,49448],"eu":[1912288,49448]}], -"actors/sand/sand_particle.rgba16.png": [16,16,512,{"jp":[2094912,178896],"us":[2102288,178896],"eu":[1974256,178896]}], -"actors/scuttlebug/scuttlebug_eye.rgba16.png": [32,32,2048,{"jp":[1991184,65800],"us":[1998560,65800],"eu":[1870528,65800]}], -"actors/scuttlebug/scuttlebug_iris.rgba16.png": [32,32,2048,{"jp":[1991184,76040],"us":[1998560,76040],"eu":[1870528,76040]}], -"actors/scuttlebug/scuttlebug_left_side.rgba16.png": [32,64,4096,{"jp":[1991184,67848],"us":[1998560,67848],"eu":[1870528,67848]}], -"actors/scuttlebug/scuttlebug_leg.rgba16.png": [32,32,2048,{"jp":[1991184,78088],"us":[1998560,78088],"eu":[1870528,78088]}], -"actors/scuttlebug/scuttlebug_right_side.rgba16.png": [32,64,4096,{"jp":[1991184,71944],"us":[1998560,71944],"eu":[1870528,71944]}], -"actors/seaweed/seaweed_base.rgba16.png": [32,32,2048,{"jp":[1802256,38416],"us":[1809600,38416],"eu":[1681568,38416]}], -"actors/seaweed/seaweed_lower_center.rgba16.png": [32,32,2048,{"jp":[1802256,36368],"us":[1809600,36368],"eu":[1681568,36368]}], -"actors/seaweed/seaweed_tip.rgba16.png": [32,32,2048,{"jp":[1802256,32272],"us":[1809600,32272],"eu":[1681568,32272]}], -"actors/seaweed/seaweed_upper_center.rgba16.png": [32,32,2048,{"jp":[1802256,34320],"us":[1809600,34320],"eu":[1681568,34320]}], -"actors/skeeter/skeeter_eye.rgba16.png": [32,32,2048,{"jp":[1802256,144],"us":[1809600,144],"eu":[1681568,144]}], -"actors/skeeter/skeeter_iris.rgba16.png": [16,8,256,{"jp":[1802256,2192],"us":[1809600,2192],"eu":[1681568,2192]}], -"actors/smoke/smoke.ia16.png": [32,32,2048,{"jp":[1377744,29376],"us":[1384912,29376],"eu":[1256880,29376]}], -"actors/snowman/mr_blizzard_eye.rgba16.png": [32,32,2048,{"jp":[1436272,46192],"us":[1443440,46192],"eu":[1315408,46192]}], -"actors/snowman/mr_blizzard_left_side.rgba16.png": [32,64,4096,{"jp":[1436272,38000],"us":[1443440,38000],"eu":[1315408,38000]}], -"actors/snowman/mr_blizzard_mitten.rgba16.png": [32,32,2048,{"jp":[1436272,35952],"us":[1443440,35952],"eu":[1315408,35952]}], -"actors/snowman/mr_blizzard_mouth.rgba16.png": [32,32,2048,{"jp":[1436272,48240],"us":[1443440,48240],"eu":[1315408,48240]}], -"actors/snowman/mr_blizzard_right_side.rgba16.png": [32,64,4096,{"jp":[1436272,42096],"us":[1443440,42096],"eu":[1315408,42096]}], -"actors/snufit/snufit_body.rgba16.png": [32,32,2048,{"jp":[1991184,28896],"us":[1998560,28896],"eu":[1870528,28896]}], -"actors/snufit/snufit_eye.rgba16.png": [32,32,2048,{"jp":[1991184,30944],"us":[1998560,30944],"eu":[1870528,30944]}], -"actors/snufit/snufit_mask_strap.rgba16.png": [16,32,1024,{"jp":[1991184,32992],"us":[1998560,32992],"eu":[1870528,32992]}], -"actors/snufit/snufit_mouth.rgba16.png": [32,32,2048,{"jp":[1991184,34016],"us":[1998560,34016],"eu":[1870528,34016]}], -"actors/sparkle/sparkle_0.rgba16.png": [32,32,2048,{"jp":[1125200,160912],"us":[1132368,160912],"eu":[1004336,160912]}], -"actors/sparkle/sparkle_1.rgba16.png": [32,32,2048,{"jp":[1125200,162960],"us":[1132368,162960],"eu":[1004336,162960]}], -"actors/sparkle/sparkle_2.rgba16.png": [32,32,2048,{"jp":[1125200,165008],"us":[1132368,165008],"eu":[1004336,165008]}], -"actors/sparkle/sparkle_3.rgba16.png": [32,32,2048,{"jp":[1125200,167056],"us":[1132368,167056],"eu":[1004336,167056]}], -"actors/sparkle/sparkle_4.rgba16.png": [32,32,2048,{"jp":[1125200,169104],"us":[1132368,169104],"eu":[1004336,169104]}], -"actors/sparkle/sparkle_5.rgba16.png": [32,32,2048,{"jp":[1125200,171152],"us":[1132368,171152],"eu":[1004336,171152]}], -"actors/sparkle_animation/sparkle_animation_0.ia16.png": [32,32,2048,{"jp":[1125200,207496],"us":[1132368,207496],"eu":[1004336,207496]}], -"actors/sparkle_animation/sparkle_animation_1.ia16.png": [32,32,2048,{"jp":[1125200,209544],"us":[1132368,209544],"eu":[1004336,209544]}], -"actors/sparkle_animation/sparkle_animation_2.ia16.png": [32,32,2048,{"jp":[1125200,211592],"us":[1132368,211592],"eu":[1004336,211592]}], -"actors/sparkle_animation/sparkle_animation_3.ia16.png": [32,32,2048,{"jp":[1125200,213640],"us":[1132368,213640],"eu":[1004336,213640]}], -"actors/sparkle_animation/sparkle_animation_4.ia16.png": [32,32,2048,{"jp":[1125200,215688],"us":[1132368,215688],"eu":[1004336,215688]}], -"actors/spindrift/spindrift_face.rgba16.png": [32,32,2048,{"jp":[1436272,1744],"us":[1443440,1744],"eu":[1315408,1744]}], -"actors/spindrift/spindrift_head.rgba16.png": [32,32,2048,{"jp":[1436272,7888],"us":[1443440,7888],"eu":[1315408,7888]}], -"actors/spindrift/spindrift_leaf.rgba16.png": [32,32,2048,{"jp":[1436272,5840],"us":[1443440,5840],"eu":[1315408,5840]}], -"actors/spindrift/spindrift_petal.rgba16.png": [32,32,2048,{"jp":[1436272,3792],"us":[1443440,3792],"eu":[1315408,3792]}], -"actors/springboard/springboard_base_unused.rgba16.png": [32,32,2048,{"jp":[1457744,2072],"us":[1464912,2072],"eu":[1336880,2072]}], -"actors/springboard/springboard_top_unused.rgba16.png": [32,32,2048,{"jp":[1457744,24],"us":[1464912,24],"eu":[1336880,24]}], -"actors/star/star_eye.rgba16.png": [32,32,2048,{"jp":[1568640,31280],"us":[1575856,31280],"eu":[1447824,31280]}], -"actors/star/star_surface.rgba16.png": [32,32,2048,{"jp":[2094912,173808],"us":[2102288,173808],"eu":[1974256,173808]}], -"actors/stomp_smoke/stomp_smoke_0.ia16.png": [32,32,2048,{"jp":[1125200,139592],"us":[1132368,139592],"eu":[1004336,139592]}], -"actors/stomp_smoke/stomp_smoke_1.ia16.png": [32,32,2048,{"jp":[1125200,141640],"us":[1132368,141640],"eu":[1004336,141640]}], -"actors/stomp_smoke/stomp_smoke_2.ia16.png": [32,32,2048,{"jp":[1125200,143688],"us":[1132368,143688],"eu":[1004336,143688]}], -"actors/stomp_smoke/stomp_smoke_3.ia16.png": [32,32,2048,{"jp":[1125200,145736],"us":[1132368,145736],"eu":[1004336,145736]}], -"actors/stomp_smoke/stomp_smoke_4.ia16.png": [32,32,2048,{"jp":[1125200,147784],"us":[1132368,147784],"eu":[1004336,147784]}], -"actors/stomp_smoke/stomp_smoke_5.ia16.png": [32,32,2048,{"jp":[1125200,149832],"us":[1132368,149832],"eu":[1004336,149832]}], -"actors/sushi/sushi_eye.rgba16.png": [32,16,1024,{"jp":[1285392,38608],"us":[1292560,38608],"eu":[1164528,38608]}], -"actors/sushi/sushi_snout.rgba16.png": [32,32,2048,{"jp":[1285392,36560],"us":[1292560,36560],"eu":[1164528,36560]}], -"actors/sushi/sushi_tooth.rgba16.png": [8,8,128,{"jp":[1285392,39632],"us":[1292560,39632],"eu":[1164528,39632]}], -"actors/swoop/swoop_body.rgba16.png": [32,32,2048,{"jp":[1991184,17008],"us":[1998560,17008],"eu":[1870528,17008]}], -"actors/swoop/swoop_eye.rgba16.png": [32,32,2048,{"jp":[1991184,19056],"us":[1998560,19056],"eu":[1870528,19056]}], -"actors/swoop/swoop_nose.rgba16.png": [32,32,2048,{"jp":[1991184,21104],"us":[1998560,21104],"eu":[1870528,21104]}], -"actors/swoop/swoop_wing.rgba16.png": [32,32,2048,{"jp":[1991184,23152],"us":[1998560,23152],"eu":[1870528,23152]}], -"actors/thwomp/thwomp_face.rgba16.png": [32,64,4096,{"jp":[1215456,39168],"us":[1222624,39168],"eu":[1094592,39168]}], -"actors/thwomp/thwomp_surface.rgba16.png": [32,32,2048,{"jp":[1215456,43264],"us":[1222624,43264],"eu":[1094592,43264]}], -"actors/toad/toad_face.rgba16.png": [32,32,2048,{"jp":[1926752,22816],"us":[1934096,22816],"eu":[1806064,22816]}], -"actors/toad/toad_head.rgba16.png": [32,32,2048,{"jp":[1926752,24864],"us":[1934096,24864],"eu":[1806064,24864]}], -"actors/tornado/tornado.ia16.png": [32,64,4096,{"jp":[1285392,75848],"us":[1292560,75848],"eu":[1164528,75848]}], -"actors/treasure_chest/treasure_chest_front.rgba16.png": [64,32,4096,{"jp":[1802256,87976],"us":[1809600,87976],"eu":[1681568,87976]}], -"actors/treasure_chest/treasure_chest_lock.rgba16.png": [32,32,2048,{"jp":[1802256,81832],"us":[1809600,81832],"eu":[1681568,81832]}], -"actors/treasure_chest/treasure_chest_lock_top.rgba16.png": [32,32,2048,{"jp":[1802256,85928],"us":[1809600,85928],"eu":[1681568,85928]}], -"actors/treasure_chest/treasure_chest_side.rgba16.png": [32,32,2048,{"jp":[1802256,83880],"us":[1809600,83880],"eu":[1681568,83880]}], -"actors/tree/palm_tree.rgba16.png": [32,64,4096,{"jp":[2094912,205336],"us":[2102288,205336],"eu":[1974256,205336]}], -"actors/tree/pine_tree.rgba16.png": [32,64,4096,{"jp":[2094912,196448],"us":[2102288,196448],"eu":[1974256,196448]}], -"actors/tree/snowy_pine_tree.rgba16.png": [32,64,4096,{"jp":[2094912,200776],"us":[2102288,200776],"eu":[1974256,200776]}], -"actors/tree/tree_left_side.rgba16.png": [32,64,4096,{"jp":[2094912,187944],"us":[2102288,187944],"eu":[1974256,187944]}], -"actors/tree/tree_right_side.rgba16.png": [32,64,4096,{"jp":[2094912,192040],"us":[2102288,192040],"eu":[1974256,192040]}], -"actors/ukiki/ukiki_butt.rgba16.png": [32,32,2048,{"jp":[1377744,39872],"us":[1384912,39872],"eu":[1256880,39872]}], -"actors/ukiki/ukiki_face.rgba16.png": [64,32,4096,{"jp":[1377744,31680],"us":[1384912,31680],"eu":[1256880,31680]}], -"actors/ukiki/ukiki_face_blink.rgba16.png": [64,32,4096,{"jp":[1377744,35776],"us":[1384912,35776],"eu":[1256880,35776]}], -"actors/ukiki/ukiki_fur.rgba16.png": [32,32,2048,{"jp":[1377744,41920],"us":[1384912,41920],"eu":[1256880,41920]}], -"actors/unagi/unagi_body.rgba16.png": [32,32,2048,{"jp":[1285392,44832],"us":[1292560,44832],"eu":[1164528,44832]}], -"actors/unagi/unagi_eye.rgba16.png": [16,16,512,{"jp":[1285392,46880],"us":[1292560,46880],"eu":[1164528,46880]}], -"actors/unagi/unagi_head_base.rgba16.png": [32,32,2048,{"jp":[1285392,47392],"us":[1292560,47392],"eu":[1164528,47392]}], -"actors/unagi/unagi_mouth.rgba16.png": [8,8,128,{"jp":[1285392,49952],"us":[1292560,49952],"eu":[1164528,49952]}], -"actors/unagi/unagi_tail.rgba16.png": [32,32,2048,{"jp":[1285392,50080],"us":[1292560,50080],"eu":[1164528,50080]}], -"actors/unagi/unagi_tooth.rgba16.png": [16,16,512,{"jp":[1285392,49440],"us":[1292560,49440],"eu":[1164528,49440]}], -"actors/walk_smoke/walk_smoke_0.ia16.png": [32,32,2048,{"jp":[1125200,122528],"us":[1132368,122528],"eu":[1004336,122528]}], -"actors/walk_smoke/walk_smoke_1.ia16.png": [32,32,2048,{"jp":[1125200,124576],"us":[1132368,124576],"eu":[1004336,124576]}], -"actors/walk_smoke/walk_smoke_2.ia16.png": [32,32,2048,{"jp":[1125200,126624],"us":[1132368,126624],"eu":[1004336,126624]}], -"actors/walk_smoke/walk_smoke_3.ia16.png": [32,32,2048,{"jp":[1125200,128672],"us":[1132368,128672],"eu":[1004336,128672]}], -"actors/walk_smoke/walk_smoke_4.ia16.png": [32,32,2048,{"jp":[1125200,130720],"us":[1132368,130720],"eu":[1004336,130720]}], -"actors/walk_smoke/walk_smoke_5.ia16.png": [32,32,2048,{"jp":[1125200,132768],"us":[1132368,132768],"eu":[1004336,132768]}], -"actors/walk_smoke/walk_smoke_6.ia16.png": [32,32,2048,{"jp":[1125200,134816],"us":[1132368,134816],"eu":[1004336,134816]}], -"actors/warp_pipe/warp_pipe_side.rgba16.png": [32,64,4096,{"jp":[2094912,32320],"us":[2102288,32320],"eu":[1974256,32320]}], -"actors/warp_pipe/warp_pipe_top.rgba16.png": [32,32,2048,{"jp":[2094912,37224],"us":[2102288,37224],"eu":[1974256,37224]}], -"actors/water_bubble/water_bubble.rgba16.png": [32,32,2048,{"jp":[1257760,65152],"us":[1264928,65152],"eu":[1136896,65152]}], -"actors/water_mine/water_mine_left_side_unused.rgba16.png": [32,64,4096,{"jp":[1599504,359104],"us":[1606720,359440],"eu":[1478688,359440]}], -"actors/water_mine/water_mine_right_side_unused.rgba16.png": [32,64,4096,{"jp":[1599504,363200],"us":[1606720,363536],"eu":[1478688,363536]}], -"actors/water_mine/water_mine_spike_unused.rgba16.png": [32,32,2048,{"jp":[1599504,367296],"us":[1606720,367632],"eu":[1478688,367632]}], -"actors/water_ring/water_ring.rgba16.png": [64,32,4096,{"jp":[1802256,74624],"us":[1809600,74624],"eu":[1681568,74624]}], -"actors/water_splash/water_splash_0.rgba16.png": [32,64,4096,{"jp":[1125200,173512],"us":[1132368,173512],"eu":[1004336,173512]}], -"actors/water_splash/water_splash_1.rgba16.png": [32,64,4096,{"jp":[1125200,177608],"us":[1132368,177608],"eu":[1004336,177608]}], -"actors/water_splash/water_splash_2.rgba16.png": [32,64,4096,{"jp":[1125200,181704],"us":[1132368,181704],"eu":[1004336,181704]}], -"actors/water_splash/water_splash_3.rgba16.png": [32,64,4096,{"jp":[1125200,185800],"us":[1132368,185800],"eu":[1004336,185800]}], -"actors/water_splash/water_splash_4.rgba16.png": [32,64,4096,{"jp":[1125200,189896],"us":[1132368,189896],"eu":[1004336,189896]}], -"actors/water_splash/water_splash_5.rgba16.png": [32,64,4096,{"jp":[1125200,193992],"us":[1132368,193992],"eu":[1004336,193992]}], -"actors/water_splash/water_splash_6.rgba16.png": [32,64,4096,{"jp":[1125200,198088],"us":[1132368,198088],"eu":[1004336,198088]}], -"actors/water_splash/water_splash_7.rgba16.png": [32,64,4096,{"jp":[1125200,202184],"us":[1132368,202184],"eu":[1004336,202184]}], -"actors/water_wave/water_wave_0.ia16.png": [32,32,2048,{"jp":[1125200,152408],"us":[1132368,152408],"eu":[1004336,152408]}], -"actors/water_wave/water_wave_1.ia16.png": [32,32,2048,{"jp":[1125200,154456],"us":[1132368,154456],"eu":[1004336,154456]}], -"actors/water_wave/water_wave_2.ia16.png": [32,32,2048,{"jp":[1125200,156504],"us":[1132368,156504],"eu":[1004336,156504]}], -"actors/water_wave/water_wave_3.ia16.png": [32,32,2048,{"jp":[1125200,158552],"us":[1132368,158552],"eu":[1004336,158552]}], -"actors/whirlpool/whirlpool.ia16.png": [32,64,4096,{"jp":[1285392,75848],"us":[1292560,75848],"eu":[1164528,75848]}], -"actors/white_particle/snow_particle.rgba16.png": [16,16,512,{"jp":[2094912,181920],"us":[2102288,181920],"eu":[1974256,181920]}], -"actors/white_particle_small/small_snow_particle.rgba16.png": [16,16,512,{"jp":[1125200,206720],"us":[1132368,206720],"eu":[1004336,206720]}], -"actors/whomp/whomp_back.rgba16.png": [32,64,4096,{"jp":[1844608,115552],"us":[1851952,115552],"eu":[1723920,115552]}], -"actors/whomp/whomp_face.rgba16.png": [32,64,4096,{"jp":[1844608,119648],"us":[1851952,119648],"eu":[1723920,119648]}], -"actors/whomp/whomp_hand.rgba16.png": [32,32,2048,{"jp":[1844608,123744],"us":[1851952,123744],"eu":[1723920,123744]}], -"actors/whomp/whomp_surface.rgba16.png": [32,32,2048,{"jp":[1844608,125792],"us":[1851952,125792],"eu":[1723920,125792]}], -"actors/wiggler/wiggler_eye.rgba16.png": [32,32,2048,{"jp":[1568640,31280],"us":[1575856,31280],"eu":[1447824,31280]}], -"actors/wiggler/wiggler_flower.rgba16.png": [32,32,2048,{"jp":[1568640,33328],"us":[1575856,33328],"eu":[1447824,33328]}], -"actors/wiggler/wiggler_frown.rgba16.png": [32,32,2048,{"jp":[1568640,35376],"us":[1575856,35376],"eu":[1447824,35376]}], -"actors/wiggler/wiggler_nose_left_side.rgba16.png": [32,64,4096,{"jp":[1568640,37424],"us":[1575856,37424],"eu":[1447824,37424]}], -"actors/wiggler/wiggler_nose_right_side.rgba16.png": [32,64,4096,{"jp":[1568640,41520],"us":[1575856,41520],"eu":[1447824,41520]}], -"actors/wiggler/wiggler_segment_left_side.rgba16.png": [32,64,4096,{"jp":[1568640,23088],"us":[1575856,23088],"eu":[1447824,23088]}], -"actors/wiggler/wiggler_segment_right_side.rgba16.png": [32,64,4096,{"jp":[1568640,27184],"us":[1575856,27184],"eu":[1447824,27184]}], -"actors/wooden_signpost/wooden_signpost_back.rgba16.png": [32,32,2048,{"jp":[2094912,182728],"us":[2102288,182728],"eu":[1974256,182728]}], -"actors/wooden_signpost/wooden_signpost_front.rgba16.png": [32,32,2048,{"jp":[2094912,184776],"us":[2102288,184776],"eu":[1974256,184776]}], -"actors/yellow_sphere/yellow_sphere.rgba16.png": [32,32,2048,{"jp":[1215456,64],"us":[1222624,64],"eu":[1094592,64]}], -"actors/yellow_sphere_small/small_yellow_sphere.rgba16.png": [32,32,2048,{"jp":[1215456,64],"us":[1222624,64],"eu":[1094592,64]}], -"actors/yoshi/yoshi_eye.rgba16.png": [16,16,512,{"jp":[1490032,115872],"us":[1497200,116104],"eu":[1369168,116104]}], -"actors/yoshi/yoshi_eye_blink.rgba16.png": [16,16,512,{"jp":[1490032,116384],"us":[1497200,116616],"eu":[1369168,116616]}], -"actors/yoshi/yoshi_nostril.rgba16.png": [16,16,512,{"jp":[1490032,116896],"us":[1497200,117128],"eu":[1369168,117128]}], -"actors/yoshi_egg/yoshi_egg_0_unused.rgba16.png": [32,32,2048,{"jp":[1215456,22456],"us":[1222624,22456],"eu":[1094592,22456]}], -"actors/yoshi_egg/yoshi_egg_1_unused.rgba16.png": [32,32,2048,{"jp":[1215456,24504],"us":[1222624,24504],"eu":[1094592,24504]}], -"actors/yoshi_egg/yoshi_egg_2_unused.rgba16.png": [32,32,2048,{"jp":[1215456,26552],"us":[1222624,26552],"eu":[1094592,26552]}], -"actors/yoshi_egg/yoshi_egg_3_unused.rgba16.png": [32,32,2048,{"jp":[1215456,28600],"us":[1222624,28600],"eu":[1094592,28600]}], -"actors/yoshi_egg/yoshi_egg_4_unused.rgba16.png": [32,32,2048,{"jp":[1215456,30648],"us":[1222624,30648],"eu":[1094592,30648]}], -"actors/yoshi_egg/yoshi_egg_5_unused.rgba16.png": [32,32,2048,{"jp":[1215456,32696],"us":[1222624,32696],"eu":[1094592,32696]}], -"actors/yoshi_egg/yoshi_egg_6_unused.rgba16.png": [32,32,2048,{"jp":[1215456,34744],"us":[1222624,34744],"eu":[1094592,34744]}], -"actors/yoshi_egg/yoshi_egg_7_unused.rgba16.png": [32,32,2048,{"jp":[1215456,36792],"us":[1222624,36792],"eu":[1094592,36792]}], -"assets/demos/bbh.bin": [988,{"jp":[5733368],"us":[5741664],"eu":[5620584]}], -"assets/demos/bitdw.bin": [1412,{"us":[5747100]}], -"assets/demos/ccm.bin": [1320,{"jp":[5734356],"us":[5742652],"eu":[5621572]}], -"assets/demos/hmc.bin": [980,{"jp":[5735676],"us":[5743972],"eu":[5622892]}], -"assets/demos/jrb.bin": [620,{"jp":[5736656],"us":[5744952],"eu":[5623872]}], -"assets/demos/pss.bin": [748,{"jp":[5737948],"us":[5746244],"eu":[5625164]}], -"assets/demos/unused.bin": [108,{"jp":[5738696],"us":[5746992],"eu":[5625912]}], -"assets/demos/wf.bin": [672,{"jp":[5737276],"us":[5745572],"eu":[5624492]}], -"levels/bbh/0.rgba16.png": [32,64,4096,{"jp":[3604960,0],"us":[3611712,0],"eu":[3485312,0]}], -"levels/bbh/1.rgba16.png": [32,32,2048,{"jp":[3604960,4096],"us":[3611712,4096],"eu":[3485312,4096]}], -"levels/bbh/2.rgba16.png": [32,32,2048,{"jp":[3604960,6144],"us":[3611712,6144],"eu":[3485312,6144]}], -"levels/bbh/3.rgba16.png": [32,64,4096,{"jp":[3604960,8192],"us":[3611712,8192],"eu":[3485312,8192]}], -"levels/bbh/4.rgba16.png": [16,32,1024,{"jp":[3604960,12288],"us":[3611712,12288],"eu":[3485312,12288]}], -"levels/bbh/5.rgba16.png": [32,64,4096,{"jp":[3604960,13312],"us":[3611712,13312],"eu":[3485312,13312]}], -"levels/bbh/6.rgba16.png": [16,32,1024,{"jp":[3604960,17408],"us":[3611712,17408],"eu":[3485312,17408]}], -"levels/bitdw/0.rgba16.png": [32,32,2048,{"jp":[4533568,0],"us":[4541952,0],"eu":[4415552,0]}], -"levels/bitdw/1.rgba16.png": [32,32,2048,{"jp":[4533568,2048],"us":[4541952,2048],"eu":[4415552,2048]}], -"levels/bitdw/2.rgba16.png": [32,32,2048,{"jp":[4533568,4096],"us":[4541952,4096],"eu":[4415552,4096]}], -"levels/bitdw/3.rgba16.png": [32,32,2048,{"jp":[4533568,6144],"us":[4541952,6144],"eu":[4415552,6144]}], -"levels/bitfs/0.rgba16.png": [32,64,4096,{"jp":[4584464,0],"us":[4592848,0],"eu":[4466448,0]}], -"levels/bitfs/1.rgba16.png": [32,32,2048,{"jp":[4584464,4096],"us":[4592848,4096],"eu":[4466448,4096]}], -"levels/bitfs/2.rgba16.png": [32,32,2048,{"jp":[4584464,6144],"us":[4592848,6144],"eu":[4466448,6144]}], -"levels/bits/0.rgba16.png": [32,64,4096,{"jp":[4629216,0],"us":[4637600,0],"eu":[4511200,0]}], -"levels/bits/1.rgba16.png": [64,32,4096,{"jp":[4629216,4096],"us":[4637600,4096],"eu":[4511200,4096]}], -"levels/bits/2.rgba16.png": [32,32,2048,{"jp":[4629216,8192],"us":[4637600,8192],"eu":[4511200,8192]}], -"levels/bob/0.rgba16.png": [32,32,2048,{"jp":[4170512,0],"us":[4178608,0],"eu":[4052208,0]}], -"levels/bob/1.rgba16.png": [32,32,2048,{"jp":[4170512,2048],"us":[4178608,2048],"eu":[4052208,2048]}], -"levels/bob/2.rgba16.png": [32,32,2048,{"jp":[4170512,4096],"us":[4178608,4096],"eu":[4052208,4096]}], -"levels/bob/3.rgba16.png": [32,32,2048,{"jp":[4170512,6144],"us":[4178608,6144],"eu":[4052208,6144]}], -"levels/bob/4.rgba16.png": [32,32,2048,{"jp":[4170512,8192],"us":[4178608,8192],"eu":[4052208,8192]}], -"levels/bowser_1/0.rgba16.png": [32,64,4096,{"jp":[4982976,0],"us":[4991264,0],"eu":[4870192,0]}], -"levels/bowser_1/1.rgba16.png": [32,32,2048,{"jp":[4982976,4096],"us":[4991264,4096],"eu":[4870192,4096]}], -"levels/bowser_1/2.rgba16.png": [32,32,2048,{"jp":[4982976,6144],"us":[4991264,6144],"eu":[4870192,6144]}], -"levels/bowser_2/0.rgba16.png": [32,32,2048,{"jp":[5028720,0],"us":[5037008,0],"eu":[4915936,0]}], -"levels/bowser_3/0.rgba16.png": [32,32,2048,{"jp":[5032864,0],"us":[5041152,0],"eu":[4920080,0]}], -"levels/bowser_3/1.rgba16.png": [32,32,2048,{"jp":[5032864,2048],"us":[5041152,2048],"eu":[4920080,2048]}], -"levels/bowser_3/2.rgba16.png": [32,64,4096,{"jp":[5032864,4096],"us":[5041152,4096],"eu":[4920080,4096]}], -"levels/castle_grounds/0.rgba16.png": [32,64,4096,{"jp":[4492416,0],"us":[4500416,0],"eu":[4374016,0]}], -"levels/castle_grounds/1.rgba16.png": [64,32,4096,{"jp":[4492416,4096],"us":[4500416,4096],"eu":[4374016,4096]}], -"levels/castle_grounds/2.rgba16.png": [64,32,4096,{"jp":[4492416,8192],"us":[4500416,8192],"eu":[4374016,8192]}], -"levels/castle_grounds/3.rgba16.png": [32,64,4096,{"jp":[4492416,51688],"us":[4500416,51688],"eu":[4374016,51688]}], -"levels/castle_grounds/4.rgba16.png": [32,64,4096,{"jp":[4492416,55784],"us":[4500416,55784],"eu":[4374016,55784]}], -"levels/castle_grounds/5.ia8.png": [64,32,2048,{"us":[4500416,60136],"eu":[4374016,60136]}], -"levels/castle_inside/1.rgba16.png": [32,32,2048,{"jp":[3754192,2048],"us":[3760960,2048],"eu":[3634560,2048]}], -"levels/castle_inside/10.rgba16.png": [32,32,2048,{"jp":[3754192,28672],"us":[3760960,28672],"eu":[3634560,28672]}], -"levels/castle_inside/11.rgba16.png": [32,32,2048,{"jp":[3754192,30720],"us":[3760960,30720],"eu":[3634560,30720]}], -"levels/castle_inside/12.rgba16.png": [32,32,2048,{"jp":[3754192,32768],"us":[3760960,32768],"eu":[3634560,32768]}], -"levels/castle_inside/13.rgba16.png": [32,32,2048,{"jp":[3754192,34816],"us":[3760960,34816],"eu":[3634560,34816]}], -"levels/castle_inside/14.rgba16.png": [32,32,2048,{"jp":[3754192,36864],"us":[3760960,36864],"eu":[3634560,36864]}], -"levels/castle_inside/15.rgba16.png": [32,32,2048,{"jp":[3754192,38912],"us":[3760960,38912],"eu":[3634560,38912]}], -"levels/castle_inside/16.ia16.png": [32,32,2048,{"jp":[3754192,40960],"us":[3760960,40960],"eu":[3634560,40960]}], -"levels/castle_inside/17.rgba16.png": [64,32,4096,{"jp":[3754192,43008],"us":[3760960,43008],"eu":[3634560,43008]}], -"levels/castle_inside/18.rgba16.png": [64,32,4096,{"jp":[3754192,47104],"us":[3760960,47104],"eu":[3634560,47104]}], -"levels/castle_inside/19.rgba16.png": [64,32,4096,{"jp":[3754192,51200],"us":[3760960,51200],"eu":[3634560,51200]}], -"levels/castle_inside/2.ia16.png": [32,64,4096,{"jp":[3298272,47104],"us":[3305024,47104],"eu":[3178624,47104]}], -"levels/castle_inside/20.rgba16.png": [64,32,4096,{"jp":[3754192,55296],"us":[3760960,55296],"eu":[3634560,55296]}], -"levels/castle_inside/21.rgba16.png": [64,32,4096,{"jp":[3754192,59392],"us":[3760960,59392],"eu":[3634560,59392]}], -"levels/castle_inside/22.rgba16.png": [64,32,4096,{"jp":[3754192,63488],"us":[3760960,63488],"eu":[3634560,63488]}], +"actors/amp/amp_body.rgba16.png": [32,32,2048,{"jp":[2032944,6936],"us":[2040320,6936],"eu":[1912288,6936],"sh":[1888800,6936]}], +"actors/amp/amp_electricity.rgba16.png": [16,32,1024,{"jp":[2032944,3864],"us":[2040320,3864],"eu":[1912288,3864],"sh":[1888800,3864]}], +"actors/amp/amp_eyes.rgba16.png": [32,32,2048,{"jp":[2032944,4888],"us":[2040320,4888],"eu":[1912288,4888],"sh":[1888800,4888]}], +"actors/amp/amp_mouth.rgba16.png": [32,32,2048,{"jp":[2032944,8984],"us":[2040320,8984],"eu":[1912288,8984],"sh":[1888800,8984]}], +"actors/blue_coin_switch/blue_coin_switch_side.rgba16.png": [32,16,1024,{"jp":[2032944,24],"us":[2040320,24],"eu":[1912288,24],"sh":[1888800,24]}], +"actors/blue_coin_switch/blue_coin_switch_top.rgba16.png": [32,32,2048,{"jp":[2032944,1048],"us":[2040320,1048],"eu":[1912288,1048],"sh":[1888800,1048]}], +"actors/blue_fish/blue_fish.rgba16.png": [32,32,2048,{"jp":[2094912,112096],"us":[2102288,112096],"eu":[1974256,112096],"sh":[1950768,112096]}], +"actors/bobomb/bob-omb_buddy_left_side.rgba16.png": [32,64,4096,{"jp":[1257760,120],"us":[1264928,120],"eu":[1136896,120],"sh":[1113408,120]}], +"actors/bobomb/bob-omb_buddy_right_side.rgba16.png": [32,64,4096,{"jp":[1257760,4216],"us":[1264928,4216],"eu":[1136896,4216],"sh":[1113408,4216]}], +"actors/bobomb/bob-omb_eyes.rgba16.png": [32,32,2048,{"jp":[1257760,18552],"us":[1264928,18552],"eu":[1136896,18552],"sh":[1113408,18552]}], +"actors/bobomb/bob-omb_eyes_blink.rgba16.png": [32,32,2048,{"jp":[1257760,20600],"us":[1264928,20600],"eu":[1136896,20600],"sh":[1113408,20600]}], +"actors/bobomb/bob-omb_left_side.rgba16.png": [32,64,4096,{"jp":[2032944,121440],"us":[2040320,121440],"eu":[1912288,121440],"sh":[1888800,121440]}], +"actors/bobomb/bob-omb_right_side.rgba16.png": [32,64,4096,{"jp":[2032944,125536],"us":[2040320,125536],"eu":[1912288,125536],"sh":[1888800,125536]}], +"actors/bomb/bomb_left_side.rgba16.png": [32,64,4096,{"jp":[1599504,359104],"us":[1606720,359440],"eu":[1478688,359440],"sh":[1455200,359440]}], +"actors/bomb/bomb_right_side.rgba16.png": [32,64,4096,{"jp":[1599504,363200],"us":[1606720,363536],"eu":[1478688,363536],"sh":[1455200,363536]}], +"actors/bomb/bomb_spike.rgba16.png": [32,32,2048,{"jp":[1599504,367296],"us":[1606720,367632],"eu":[1478688,367632],"sh":[1455200,367632]}], +"actors/boo/boo_eyes.rgba16.png": [64,32,4096,{"jp":[1462368,39744],"us":[1469536,39744],"eu":[1341504,39744],"sh":[1318016,39744]}], +"actors/boo/boo_mouth.rgba16.png": [32,32,2048,{"jp":[1462368,43840],"us":[1469536,43840],"eu":[1341504,43840],"sh":[1318016,43840]}], +"actors/boo_castle/bbh_boo_eyes.rgba16.png": [64,32,4096,{"jp":[1462368,39744],"us":[1469536,39744],"eu":[1341504,39744],"sh":[1318016,39744]}], +"actors/boo_castle/bbh_boo_mouth.rgba16.png": [32,32,2048,{"jp":[1462368,43840],"us":[1469536,43840],"eu":[1341504,43840],"sh":[1318016,43840]}], +"actors/book/book_cover.rgba16.png": [32,32,2048,{"jp":[1462368,4192],"us":[1469536,4192],"eu":[1341504,4192],"sh":[1318016,4192]}], +"actors/bookend/bookend_cover.rgba16.png": [32,32,2048,{"jp":[1462368,4192],"us":[1469536,4192],"eu":[1341504,4192],"sh":[1318016,4192]}], +"actors/bookend/bookend_mouth.rgba16.png": [16,32,1024,{"jp":[1462368,2144],"us":[1469536,2144],"eu":[1341504,2144],"sh":[1318016,2144]}], +"actors/bookend/bookend_pages.rgba16.png": [16,32,1024,{"jp":[1462368,3168],"us":[1469536,3168],"eu":[1341504,3168],"sh":[1318016,3168]}], +"actors/bookend/bookend_spine.rgba16.png": [16,32,1024,{"jp":[1462368,96],"us":[1469536,96],"eu":[1341504,96],"sh":[1318016,96]}], +"actors/bookend/bookend_tooth.rgba16.png": [16,32,1024,{"jp":[1462368,1120],"us":[1469536,1120],"eu":[1341504,1120],"sh":[1318016,1120]}], +"actors/bowser/bowser_armband.rgba16.png": [32,32,2048,{"jp":[1599504,146488],"us":[1606720,146488],"eu":[1478688,146488],"sh":[1455200,146488]}], +"actors/bowser/bowser_armband_spike.rgba16.png": [64,32,4096,{"jp":[1599504,142392],"us":[1606720,142392],"eu":[1478688,142392],"sh":[1455200,142392]}], +"actors/bowser/bowser_blue_eye_unused.rgba16.png": [64,32,4096,{"jp":[1599504,156728],"us":[1606720,156728],"eu":[1478688,156728],"sh":[1455200,156728]}], +"actors/bowser/bowser_body.rgba16.png": [32,32,2048,{"jp":[1599504,140344],"us":[1606720,140344],"eu":[1478688,140344],"sh":[1455200,140344]}], +"actors/bowser/bowser_chest.rgba16.png": [32,32,2048,{"jp":[1599504,152632],"us":[1606720,152632],"eu":[1478688,152632],"sh":[1455200,152632]}], +"actors/bowser/bowser_claw_edge.rgba16.png": [32,64,4096,{"jp":[1599504,171064],"us":[1606720,171064],"eu":[1478688,171064],"sh":[1455200,171064]}], +"actors/bowser/bowser_claw_horn_angle.rgba16.png": [32,64,4096,{"jp":[1599504,179256],"us":[1606720,179256],"eu":[1478688,179256],"sh":[1455200,179256]}], +"actors/bowser/bowser_claw_horn_tooth.rgba16.png": [32,64,4096,{"jp":[1599504,175160],"us":[1606720,175160],"eu":[1478688,175160],"sh":[1455200,175160]}], +"actors/bowser/bowser_eye_center_0.rgba16.png": [64,32,4096,{"jp":[1599504,195640],"us":[1606720,195640],"eu":[1478688,195640],"sh":[1455200,195640]}], +"actors/bowser/bowser_eye_center_1.rgba16.png": [64,32,4096,{"jp":[1599504,195640],"us":[1606720,195640],"eu":[1478688,195640],"sh":[1455200,195640]}], +"actors/bowser/bowser_eye_closed_0.rgba16.png": [64,32,4096,{"jp":[1599504,191544],"us":[1606720,191544],"eu":[1478688,191544],"sh":[1455200,191544]}], +"actors/bowser/bowser_eye_closed_1.rgba16.png": [64,32,4096,{"jp":[1599504,191544],"us":[1606720,191544],"eu":[1478688,191544],"sh":[1455200,191544]}], +"actors/bowser/bowser_eye_far_left_0.rgba16.png": [64,32,4096,{"jp":[1599504,203832],"us":[1606720,203832],"eu":[1478688,203832],"sh":[1455200,203832]}], +"actors/bowser/bowser_eye_far_left_1.rgba16.png": [64,32,4096,{"jp":[1599504,203832],"us":[1606720,203832],"eu":[1478688,203832],"sh":[1455200,203832]}], +"actors/bowser/bowser_eye_half_closed_0.rgba16.png": [64,32,4096,{"jp":[1599504,187448],"us":[1606720,187448],"eu":[1478688,187448],"sh":[1455200,187448]}], +"actors/bowser/bowser_eye_half_closed_1.rgba16.png": [64,32,4096,{"jp":[1599504,187448],"us":[1606720,187448],"eu":[1478688,187448],"sh":[1455200,187448]}], +"actors/bowser/bowser_eye_left_0.rgba16.png": [64,32,4096,{"jp":[1599504,183352],"us":[1606720,183352],"eu":[1478688,183352],"sh":[1455200,183352]}], +"actors/bowser/bowser_eye_left_1.rgba16.png": [64,32,4096,{"jp":[1599504,183352],"us":[1606720,183352],"eu":[1478688,183352],"sh":[1455200,183352]}], +"actors/bowser/bowser_eye_right_0.rgba16.png": [64,32,4096,{"jp":[1599504,199736],"us":[1606720,199736],"eu":[1478688,199736],"sh":[1455200,199736]}], +"actors/bowser/bowser_eye_right_1.rgba16.png": [64,32,4096,{"jp":[1599504,199736],"us":[1606720,199736],"eu":[1478688,199736],"sh":[1455200,199736]}], +"actors/bowser/bowser_eyebrow.rgba16.png": [64,32,4096,{"jp":[1599504,130104],"us":[1606720,130104],"eu":[1478688,130104],"sh":[1455200,130104]}], +"actors/bowser/bowser_hair.rgba16.png": [32,64,4096,{"jp":[1599504,166968],"us":[1606720,166968],"eu":[1478688,166968],"sh":[1455200,166968]}], +"actors/bowser/bowser_mouth_unused.rgba16.png": [64,32,4096,{"jp":[1599504,160824],"us":[1606720,160824],"eu":[1478688,160824],"sh":[1455200,160824]}], +"actors/bowser/bowser_muzzle.rgba16.png": [32,32,2048,{"jp":[1599504,134200],"us":[1606720,134200],"eu":[1478688,134200],"sh":[1455200,134200]}], +"actors/bowser/bowser_nostrils.rgba16.png": [64,32,4096,{"jp":[1599504,136248],"us":[1606720,136248],"eu":[1478688,136248],"sh":[1455200,136248]}], +"actors/bowser/bowser_shell.rgba16.png": [32,32,2048,{"jp":[1599504,128056],"us":[1606720,128056],"eu":[1478688,128056],"sh":[1455200,128056]}], +"actors/bowser/bowser_shell_edge.rgba16.png": [32,32,2048,{"jp":[1599504,154680],"us":[1606720,154680],"eu":[1478688,154680],"sh":[1455200,154680]}], +"actors/bowser/bowser_tongue.rgba16.png": [32,64,4096,{"jp":[1599504,148536],"us":[1606720,148536],"eu":[1478688,148536],"sh":[1455200,148536]}], +"actors/bowser/bowser_upper_face.rgba16.png": [32,32,2048,{"jp":[1599504,164920],"us":[1606720,164920],"eu":[1478688,164920],"sh":[1455200,164920]}], +"actors/bowser_flame/bowser_flame_0.rgba16.png": [64,64,8192,{"jp":[1599504,0],"us":[1606720,0],"eu":[1478688,0],"sh":[1455200,0]}], +"actors/bowser_flame/bowser_flame_1.rgba16.png": [64,64,8192,{"jp":[1599504,8192],"us":[1606720,8192],"eu":[1478688,8192],"sh":[1455200,8192]}], +"actors/bowser_flame/bowser_flame_10.rgba16.png": [64,64,8192,{"jp":[1599504,81920],"us":[1606720,81920],"eu":[1478688,81920],"sh":[1455200,81920]}], +"actors/bowser_flame/bowser_flame_11.rgba16.png": [64,64,8192,{"jp":[1599504,90112],"us":[1606720,90112],"eu":[1478688,90112],"sh":[1455200,90112]}], +"actors/bowser_flame/bowser_flame_12.rgba16.png": [64,64,8192,{"jp":[1599504,98304],"us":[1606720,98304],"eu":[1478688,98304],"sh":[1455200,98304]}], +"actors/bowser_flame/bowser_flame_13.rgba16.png": [64,64,8192,{"jp":[1599504,106496],"us":[1606720,106496],"eu":[1478688,106496],"sh":[1455200,106496]}], +"actors/bowser_flame/bowser_flame_2.rgba16.png": [64,64,8192,{"jp":[1599504,16384],"us":[1606720,16384],"eu":[1478688,16384],"sh":[1455200,16384]}], +"actors/bowser_flame/bowser_flame_3.rgba16.png": [64,64,8192,{"jp":[1599504,24576],"us":[1606720,24576],"eu":[1478688,24576],"sh":[1455200,24576]}], +"actors/bowser_flame/bowser_flame_4.rgba16.png": [64,64,8192,{"jp":[1599504,32768],"us":[1606720,32768],"eu":[1478688,32768],"sh":[1455200,32768]}], +"actors/bowser_flame/bowser_flame_5.rgba16.png": [64,64,8192,{"jp":[1599504,40960],"us":[1606720,40960],"eu":[1478688,40960],"sh":[1455200,40960]}], +"actors/bowser_flame/bowser_flame_6.rgba16.png": [64,64,8192,{"jp":[1599504,49152],"us":[1606720,49152],"eu":[1478688,49152],"sh":[1455200,49152]}], +"actors/bowser_flame/bowser_flame_7.rgba16.png": [64,64,8192,{"jp":[1599504,57344],"us":[1606720,57344],"eu":[1478688,57344],"sh":[1455200,57344]}], +"actors/bowser_flame/bowser_flame_8.rgba16.png": [64,64,8192,{"jp":[1599504,65536],"us":[1606720,65536],"eu":[1478688,65536],"sh":[1455200,65536]}], +"actors/bowser_flame/bowser_flame_9.rgba16.png": [64,64,8192,{"jp":[1599504,73728],"us":[1606720,73728],"eu":[1478688,73728],"sh":[1455200,73728]}], +"actors/breakable_box/cork_box_surface.rgba16.png": [32,32,2048,{"jp":[2032944,74384],"us":[2040320,74384],"eu":[1912288,74384],"sh":[1888800,74384]}], +"actors/breakable_box/crazy_box_surface.rgba16.png": [32,32,2048,{"jp":[2032944,72336],"us":[2040320,72336],"eu":[1912288,72336],"sh":[1888800,72336]}], +"actors/bub/bub_eye_border.rgba16.png": [32,32,2048,{"jp":[1568640,5128],"us":[1575856,5128],"eu":[1447824,5128],"sh":[1424336,5128]}], +"actors/bub/bub_eyes.rgba16.png": [64,32,4096,{"jp":[1568640,1032],"us":[1575856,1032],"eu":[1447824,1032],"sh":[1424336,1032]}], +"actors/bub/bub_fins.rgba16.png": [32,32,2048,{"jp":[1568640,7176],"us":[1575856,7176],"eu":[1447824,7176],"sh":[1424336,7176]}], +"actors/bub/bub_scales.rgba16.png": [64,32,4096,{"jp":[1568640,9224],"us":[1575856,9224],"eu":[1447824,9224],"sh":[1424336,9224]}], +"actors/bubba/bubba_eye_border.rgba16.png": [32,32,2048,{"jp":[1568640,5128],"us":[1575856,5128],"eu":[1447824,5128],"sh":[1424336,5128]}], +"actors/bubba/bubba_eyes_unused.rgba16.png": [64,32,4096,{"jp":[1568640,1032],"us":[1575856,1032],"eu":[1447824,1032],"sh":[1424336,1032]}], +"actors/bubba/bubba_fins.rgba16.png": [32,32,2048,{"jp":[1568640,7176],"us":[1575856,7176],"eu":[1447824,7176],"sh":[1424336,7176]}], +"actors/bubba/bubba_scales.rgba16.png": [64,64,8192,{"jp":[1568640,9224],"us":[1575856,9224],"eu":[1447824,9224],"sh":[1424336,9224]}], +"actors/bubba/bubba_sunglasses.rgba16.png": [16,32,1024,{"jp":[1568640,8],"us":[1575856,8],"eu":[1447824,8],"sh":[1424336,8]}], +"actors/bubble/bubble.rgba16.png": [32,32,2048,{"jp":[1125200,118112],"us":[1132368,118112],"eu":[1004336,118112],"sh":[980848,118112]}], +"actors/bubble/mr_i_bubble.rgba16.png": [32,32,2048,{"jp":[1125200,120160],"us":[1132368,120160],"eu":[1004336,120160],"sh":[980848,120160]}], +"actors/bullet_bill/bullet_bill_eye.rgba16.png": [64,32,4096,{"jp":[1215456,47784],"us":[1222624,47784],"eu":[1094592,47784],"sh":[1071104,47784]}], +"actors/bullet_bill/bullet_bill_mouth.rgba16.png": [64,32,4096,{"jp":[1215456,51880],"us":[1222624,51880],"eu":[1094592,51880],"sh":[1071104,51880]}], +"actors/bully/bully_eye.rgba16.png": [32,32,2048,{"jp":[1249376,9320],"us":[1256544,9320],"eu":[1128512,9320],"sh":[1105024,9320]}], +"actors/bully/bully_horn.rgba16.png": [16,16,512,{"jp":[1249376,224],"us":[1256544,224],"eu":[1128512,224],"sh":[1105024,224]}], +"actors/bully/bully_left_side.rgba16.png": [32,64,4096,{"jp":[1249376,1128],"us":[1256544,1128],"eu":[1128512,1128],"sh":[1105024,1128]}], +"actors/bully/bully_right_side.rgba16.png": [32,64,4096,{"jp":[1249376,5224],"us":[1256544,5224],"eu":[1128512,5224],"sh":[1105024,5224]}], +"actors/burn_smoke/burn_smoke.ia16.png": [32,32,2048,{"jp":[1125200,137216],"us":[1132368,137216],"eu":[1004336,137216],"sh":[980848,137216]}], +"actors/butterfly/butterfly_wing.rgba16.png": [32,64,4096,{"jp":[2094912,17320],"us":[2102288,17320],"eu":[1974256,17320],"sh":[1950768,17320]}], +"actors/cannon_barrel/cannon_barrel.rgba16.png": [32,32,2048,{"jp":[2032944,22696],"us":[2040320,22696],"eu":[1912288,22696],"sh":[1888800,22696]}], +"actors/cannon_base/cannon_base.rgba16.png": [32,32,2048,{"jp":[2032944,18872],"us":[2040320,18872],"eu":[1912288,18872],"sh":[1888800,18872]}], +"actors/cannon_lid/cannon_lid.rgba16.png": [32,32,2048,{"jp":[2032944,16472],"us":[2040320,16472],"eu":[1912288,16472],"sh":[1888800,16472]}], +"actors/capswitch/cap_switch_base.rgba16.png": [16,4,128,{"jp":[1457744,11336],"us":[1464912,11336],"eu":[1336880,11336],"sh":[1313392,11336]}], +"actors/capswitch/cap_switch_head.ia16.png": [32,64,4096,{"jp":[1457744,7240],"us":[1464912,7240],"eu":[1336880,7240],"sh":[1313392,7240]}], +"actors/chain_ball/chain_ball.rgba16.png": [32,32,2048,{"jp":[1844608,133864],"us":[1851952,133864],"eu":[1723920,133864],"sh":[1700432,133864]}], +"actors/chain_chomp/chain_chomp_bright_shine.rgba16.png": [32,32,2048,{"jp":[1844608,136144],"us":[1851952,136144],"eu":[1723920,136144],"sh":[1700432,136144]}], +"actors/chain_chomp/chain_chomp_dull_shine.rgba16.png": [32,32,2048,{"jp":[1844608,138192],"us":[1851952,138192],"eu":[1723920,138192],"sh":[1700432,138192]}], +"actors/chain_chomp/chain_chomp_eye.rgba16.png": [32,32,2048,{"jp":[1844608,144336],"us":[1851952,144336],"eu":[1723920,144336],"sh":[1700432,144336]}], +"actors/chain_chomp/chain_chomp_tongue.rgba16.png": [32,32,2048,{"jp":[1844608,140240],"us":[1851952,140240],"eu":[1723920,140240],"sh":[1700432,140240]}], +"actors/chain_chomp/chain_chomp_tooth.rgba16.png": [32,32,2048,{"jp":[1462368,27376],"us":[1469536,27376],"eu":[1341504,27376],"sh":[1318016,27376]}], +"actors/chair/chair_bottom.rgba16.png": [32,16,1024,{"jp":[1462368,16480],"us":[1469536,16480],"eu":[1341504,16480],"sh":[1318016,16480]}], +"actors/chair/chair_front.rgba16.png": [32,32,2048,{"jp":[1462368,12384],"us":[1469536,12384],"eu":[1341504,12384],"sh":[1318016,12384]}], +"actors/chair/chair_leg.rgba16.png": [32,32,2048,{"jp":[1462368,14432],"us":[1469536,14432],"eu":[1341504,14432],"sh":[1318016,14432]}], +"actors/chair/chair_surface_unused.rgba16.png": [32,32,2048,{"jp":[1462368,17504],"us":[1469536,17504],"eu":[1341504,17504],"sh":[1318016,17504]}], +"actors/checkerboard_platform/checkerboard_platform.rgba16.png": [32,32,2048,{"jp":[2032944,52288],"us":[2040320,52288],"eu":[1912288,52288],"sh":[1888800,52288]}], +"actors/checkerboard_platform/checkerboard_platform_side.rgba16.png": [32,16,1024,{"jp":[2032944,51264],"us":[2040320,51264],"eu":[1912288,51264],"sh":[1888800,51264]}], +"actors/chillychief/chill_bully_eye.rgba16.png": [32,32,2048,{"jp":[1249376,9320],"us":[1256544,9320],"eu":[1128512,9320],"sh":[1105024,9320]}], +"actors/chillychief/chill_bully_left_side.rgba16.png": [32,64,4096,{"jp":[1979680,96],"us":[1987056,96],"eu":[1859024,96],"sh":[1835536,96]}], +"actors/chillychief/chill_bully_right_side.rgba16.png": [32,64,4096,{"jp":[1979680,4192],"us":[1987056,4192],"eu":[1859024,4192],"sh":[1835536,4192]}], +"actors/chuckya/chuckya_body_arm_left_side.rgba16.png": [32,64,4096,{"jp":[2032944,32632],"us":[2040320,32632],"eu":[1912288,32632],"sh":[1888800,32632]}], +"actors/chuckya/chuckya_body_arm_right_side.rgba16.png": [32,64,4096,{"jp":[2032944,36728],"us":[2040320,36728],"eu":[1912288,36728],"sh":[1888800,36728]}], +"actors/chuckya/chuckya_eyes.rgba16.png": [32,64,4096,{"jp":[2032944,26488],"us":[2040320,26488],"eu":[1912288,26488],"sh":[1888800,26488]}], +"actors/chuckya/chuckya_hand_antenna.rgba16.png": [32,32,2048,{"jp":[2032944,30584],"us":[2040320,30584],"eu":[1912288,30584],"sh":[1888800,30584]}], +"actors/clam_shell/clam_shell.rgba16.png": [32,32,2048,{"jp":[1285392,48],"us":[1292560,48],"eu":[1164528,48],"sh":[1141040,48]}], +"actors/clam_shell/clam_shell_mouth.rgba16.png": [32,32,2048,{"jp":[1285392,2096],"us":[1292560,2096],"eu":[1164528,2096],"sh":[1141040,2096]}], +"actors/coin/coin_front.ia16.png": [32,32,2048,{"jp":[2094912,22400],"us":[2102288,22400],"eu":[1974256,22400],"sh":[1950768,22400]}], +"actors/coin/coin_side.ia16.png": [32,32,2048,{"jp":[2094912,26496],"us":[2102288,26496],"eu":[1974256,26496],"sh":[1950768,26496]}], +"actors/coin/coin_tilt_left.ia16.png": [32,32,2048,{"jp":[2094912,28544],"us":[2102288,28544],"eu":[1974256,28544],"sh":[1950768,28544]}], +"actors/coin/coin_tilt_right.ia16.png": [32,32,2048,{"jp":[2094912,24448],"us":[2102288,24448],"eu":[1974256,24448],"sh":[1950768,24448]}], +"actors/cyan_fish/cyan_fish.rgba16.png": [32,32,2048,{"jp":[1802256,54376],"us":[1809600,54376],"eu":[1681568,54376],"sh":[1658080,54376]}], +"actors/dirt/dirt_particle.rgba16.png": [16,16,512,{"jp":[2094912,179704],"us":[2102288,179704],"eu":[1974256,179704],"sh":[1950768,179704]}], +"actors/door/bbh_door.rgba16.png": [32,64,4096,{"jp":[2094912,66832],"us":[2102288,66832],"eu":[1974256,66832],"sh":[1950768,66832]}], +"actors/door/bbh_door_overlay.rgba16.png": [32,32,2048,{"jp":[2094912,70928],"us":[2102288,70928],"eu":[1974256,70928],"sh":[1950768,70928]}], +"actors/door/door_lock.rgba16.png": [16,32,1024,{"jp":[2094912,79120],"us":[2102288,79120],"eu":[1974256,79120],"sh":[1950768,79120]}], +"actors/door/hmc_mural_door.rgba16.png": [32,64,4096,{"jp":[2094912,60688],"us":[2102288,60688],"eu":[1974256,60688],"sh":[1950768,60688]}], +"actors/door/hmc_mural_door_overlay.rgba16.png": [32,32,2048,{"jp":[2094912,64784],"us":[2102288,64784],"eu":[1974256,64784],"sh":[1950768,64784]}], +"actors/door/metal_door.rgba16.png": [32,64,4096,{"jp":[2094912,54544],"us":[2102288,54544],"eu":[1974256,54544],"sh":[1950768,54544]}], +"actors/door/metal_door_overlay.rgba16.png": [32,32,2048,{"jp":[2094912,58640],"us":[2102288,58640],"eu":[1974256,58640],"sh":[1950768,58640]}], +"actors/door/one_star_door_sign.rgba16.png": [32,32,2048,{"jp":[2094912,75024],"us":[2102288,75024],"eu":[1974256,75024],"sh":[1950768,75024]}], +"actors/door/polished_wooden_door.rgba16.png": [32,64,4096,{"jp":[2094912,40208],"us":[2102288,40208],"eu":[1974256,40208],"sh":[1950768,40208]}], +"actors/door/polished_wooden_door_overlay.rgba16.png": [32,64,4096,{"jp":[2094912,44304],"us":[2102288,44304],"eu":[1974256,44304],"sh":[1950768,44304]}], +"actors/door/rough_wooden_door.rgba16.png": [32,64,4096,{"jp":[2094912,48400],"us":[2102288,48400],"eu":[1974256,48400],"sh":[1950768,48400]}], +"actors/door/rough_wooden_door_overlay.rgba16.png": [32,32,2048,{"jp":[2094912,52496],"us":[2102288,52496],"eu":[1974256,52496],"sh":[1950768,52496]}], +"actors/door/three_star_door_sign.rgba16.png": [32,32,2048,{"jp":[2094912,77072],"us":[2102288,77072],"eu":[1974256,77072],"sh":[1950768,77072]}], +"actors/door/zero_star_door_sign.rgba16.png": [32,32,2048,{"jp":[2094912,72976],"us":[2102288,72976],"eu":[1974256,72976],"sh":[1950768,72976]}], +"actors/dorrie/dorrie_eye.rgba16.png": [16,16,512,{"jp":[1991184,39840],"us":[1998560,39840],"eu":[1870528,39840],"sh":[1847040,39840]}], +"actors/dorrie/dorrie_skin.rgba16.png": [32,64,4096,{"jp":[1991184,40352],"us":[1998560,40352],"eu":[1870528,40352],"sh":[1847040,40352]}], +"actors/dorrie/dorrie_tongue.rgba16.png": [32,32,2048,{"jp":[1844608,140240],"us":[1851952,140240],"eu":[1723920,140240],"sh":[1700432,140240]}], +"actors/exclamation_box/exclamation_box_front.rgba16.png": [32,32,2048,{"jp":[2032944,95784],"us":[2040320,95784],"eu":[1912288,95784],"sh":[1888800,95784]}], +"actors/exclamation_box/exclamation_box_side.rgba16.png": [64,32,4096,{"jp":[2032944,97832],"us":[2040320,97832],"eu":[1912288,97832],"sh":[1888800,97832]}], +"actors/exclamation_box/metal_cap_box_front.rgba16.png": [32,32,2048,{"jp":[2032944,83496],"us":[2040320,83496],"eu":[1912288,83496],"sh":[1888800,83496]}], +"actors/exclamation_box/metal_cap_box_side.rgba16.png": [64,32,4096,{"jp":[2032944,85544],"us":[2040320,85544],"eu":[1912288,85544],"sh":[1888800,85544]}], +"actors/exclamation_box/vanish_cap_box_front.rgba16.png": [32,32,2048,{"jp":[2032944,77352],"us":[2040320,77352],"eu":[1912288,77352],"sh":[1888800,77352]}], +"actors/exclamation_box/vanish_cap_box_sides.rgba16.png": [64,32,4096,{"jp":[2032944,79400],"us":[2040320,79400],"eu":[1912288,79400],"sh":[1888800,79400]}], +"actors/exclamation_box/wing_cap_box_front.rgba16.png": [32,32,2048,{"jp":[2032944,89640],"us":[2040320,89640],"eu":[1912288,89640],"sh":[1888800,89640]}], +"actors/exclamation_box/wing_cap_box_sides.rgba16.png": [64,32,4096,{"jp":[2032944,91688],"us":[2040320,91688],"eu":[1912288,91688],"sh":[1888800,91688]}], +"actors/exclamation_box_outline/exclamation_box_outline.rgba16.png": [32,32,2048,{"jp":[2032944,151912],"us":[2040320,151912],"eu":[1912288,151912],"sh":[1888800,151912]}], +"actors/exclamation_box_outline/exclamation_point.rgba16.png": [16,32,1024,{"jp":[2032944,154240],"us":[2040320,154240],"eu":[1912288,154240],"sh":[1888800,154240]}], +"actors/explosion/explosion_0.rgba16.png": [32,32,2048,{"jp":[2094912,2568],"us":[2102288,2568],"eu":[1974256,2568],"sh":[1950768,2568]}], +"actors/explosion/explosion_1.rgba16.png": [32,32,2048,{"jp":[2094912,4616],"us":[2102288,4616],"eu":[1974256,4616],"sh":[1950768,4616]}], +"actors/explosion/explosion_2.rgba16.png": [32,32,2048,{"jp":[2094912,6664],"us":[2102288,6664],"eu":[1974256,6664],"sh":[1950768,6664]}], +"actors/explosion/explosion_3.rgba16.png": [32,32,2048,{"jp":[2094912,8712],"us":[2102288,8712],"eu":[1974256,8712],"sh":[1950768,8712]}], +"actors/explosion/explosion_4.rgba16.png": [32,32,2048,{"jp":[2094912,10760],"us":[2102288,10760],"eu":[1974256,10760],"sh":[1950768,10760]}], +"actors/explosion/explosion_5.rgba16.png": [32,32,2048,{"jp":[2094912,12808],"us":[2102288,12808],"eu":[1974256,12808],"sh":[1950768,12808]}], +"actors/explosion/explosion_6.rgba16.png": [32,32,2048,{"jp":[2094912,14856],"us":[2102288,14856],"eu":[1974256,14856],"sh":[1950768,14856]}], +"actors/eyerok/eyerok_bricks.rgba16.png": [32,32,2048,{"jp":[1327760,36160],"us":[1334928,36160],"eu":[1206896,36160],"sh":[1183408,36160]}], +"actors/eyerok/eyerok_eye_closed.rgba16.png": [32,32,2048,{"jp":[1327760,44352],"us":[1334928,44352],"eu":[1206896,44352],"sh":[1183408,44352]}], +"actors/eyerok/eyerok_eye_mostly_closed.rgba16.png": [32,32,2048,{"jp":[1327760,42304],"us":[1334928,42304],"eu":[1206896,42304],"sh":[1183408,42304]}], +"actors/eyerok/eyerok_eye_mostly_open.rgba16.png": [32,32,2048,{"jp":[1327760,40256],"us":[1334928,40256],"eu":[1206896,40256],"sh":[1183408,40256]}], +"actors/eyerok/eyerok_eye_open.rgba16.png": [32,32,2048,{"jp":[1327760,38208],"us":[1334928,38208],"eu":[1206896,38208],"sh":[1183408,38208]}], +"actors/flame/flame_0.ia16.png": [32,32,2048,{"jp":[2094912,95008],"us":[2102288,95008],"eu":[1974256,95008],"sh":[1950768,95008]}], +"actors/flame/flame_1.ia16.png": [32,32,2048,{"jp":[2094912,97056],"us":[2102288,97056],"eu":[1974256,97056],"sh":[1950768,97056]}], +"actors/flame/flame_2.ia16.png": [32,32,2048,{"jp":[2094912,99104],"us":[2102288,99104],"eu":[1974256,99104],"sh":[1950768,99104]}], +"actors/flame/flame_3.ia16.png": [32,32,2048,{"jp":[2094912,101152],"us":[2102288,101152],"eu":[1974256,101152],"sh":[1950768,101152]}], +"actors/flame/flame_4.ia16.png": [32,32,2048,{"jp":[2094912,103200],"us":[2102288,103200],"eu":[1974256,103200],"sh":[1950768,103200]}], +"actors/flame/flame_5.ia16.png": [32,32,2048,{"jp":[2094912,105248],"us":[2102288,105248],"eu":[1974256,105248],"sh":[1950768,105248]}], +"actors/flame/flame_6.ia16.png": [32,32,2048,{"jp":[2094912,107296],"us":[2102288,107296],"eu":[1974256,107296],"sh":[1950768,107296]}], +"actors/flame/flame_7.ia16.png": [32,32,2048,{"jp":[2094912,109344],"us":[2102288,109344],"eu":[1974256,109344],"sh":[1950768,109344]}], +"actors/flyguy/flyguy_cloth_wrinkle.rgba16.png": [64,32,4096,{"jp":[2032944,57480],"us":[2040320,57480],"eu":[1912288,57480],"sh":[1888800,57480]}], +"actors/flyguy/flyguy_face.rgba16.png": [32,32,2048,{"jp":[2032944,61576],"us":[2040320,61576],"eu":[1912288,61576],"sh":[1888800,61576]}], +"actors/flyguy/flyguy_propeller.ia16.png": [32,32,2048,{"jp":[2032944,63624],"us":[2040320,63624],"eu":[1912288,63624],"sh":[1888800,63624]}], +"actors/fwoosh/fwoosh_face.ia16.png": [32,32,2048,{"jp":[1377744,88072],"us":[1384912,88072],"eu":[1256880,88072],"sh":[1233392,88072]}], +"actors/goomba/goomba_body.rgba16.png": [32,32,2048,{"jp":[2032944,103728],"us":[2040320,103728],"eu":[1912288,103728],"sh":[1888800,103728]}], +"actors/goomba/goomba_face.rgba16.png": [32,32,2048,{"jp":[2032944,105776],"us":[2040320,105776],"eu":[1912288,105776],"sh":[1888800,105776]}], +"actors/goomba/goomba_face_blink.rgba16.png": [32,32,2048,{"jp":[2032944,107824],"us":[2040320,107824],"eu":[1912288,107824],"sh":[1888800,107824]}], +"actors/haunted_cage/bbh_cage_bars.rgba16.png": [32,32,2048,{"jp":[1462368,55944],"us":[1469536,55944],"eu":[1341504,55944],"sh":[1318016,55944]}], +"actors/haunted_cage/bbh_cage_double_ornament.rgba16.png": [32,32,2048,{"jp":[1462368,51848],"us":[1469536,51848],"eu":[1341504,51848],"sh":[1318016,51848]}], +"actors/haunted_cage/bbh_cage_floor.rgba16.png": [32,32,2048,{"jp":[1462368,49800],"us":[1469536,49800],"eu":[1341504,49800],"sh":[1318016,49800]}], +"actors/haunted_cage/bbh_cage_garbage.rgba16.png": [32,32,2048,{"jp":[1462368,57992],"us":[1469536,57992],"eu":[1341504,57992],"sh":[1318016,57992]}], +"actors/haunted_cage/bbh_cage_ornament.rgba16.png": [32,16,1024,{"jp":[1462368,53896],"us":[1469536,53896],"eu":[1341504,53896],"sh":[1318016,53896]}], +"actors/haunted_cage/bbh_cage_wooden_base.rgba16.png": [32,16,1024,{"jp":[1462368,54920],"us":[1469536,54920],"eu":[1341504,54920],"sh":[1318016,54920]}], +"actors/heart/spinning_heart.rgba16.png": [32,32,2048,{"jp":[2032944,55264],"us":[2040320,55264],"eu":[1912288,55264],"sh":[1888800,55264]}], +"actors/heave_ho/heave-ho_arm_ornament.rgba16.png": [32,32,2048,{"jp":[1215456,68040],"us":[1222624,68040],"eu":[1094592,68040],"sh":[1071104,68040]}], +"actors/heave_ho/heave-ho_face.rgba16.png": [32,32,2048,{"jp":[1215456,59848],"us":[1222624,59848],"eu":[1094592,59848],"sh":[1071104,59848]}], +"actors/heave_ho/heave-ho_logo.rgba16.png": [64,32,4096,{"jp":[1215456,63944],"us":[1222624,63944],"eu":[1094592,63944],"sh":[1071104,63944]}], +"actors/heave_ho/heave-ho_platform.rgba16.png": [32,32,2048,{"jp":[1215456,61896],"us":[1222624,61896],"eu":[1094592,61896],"sh":[1071104,61896]}], +"actors/heave_ho/heave-ho_roller.rgba16.png": [16,16,512,{"jp":[1215456,70088],"us":[1222624,70088],"eu":[1094592,70088],"sh":[1071104,70088]}], +"actors/heave_ho/heave-ho_turnkey.rgba16.png": [32,32,2048,{"jp":[1215456,70600],"us":[1222624,70600],"eu":[1094592,70600],"sh":[1071104,70600]}], +"actors/hoot/hoot_eyes.rgba16.png": [32,32,2048,{"jp":[1215456,2592],"us":[1222624,2592],"eu":[1094592,2592],"sh":[1071104,2592]}], +"actors/hoot/hoot_wing.rgba16.png": [32,32,2048,{"jp":[1215456,7760],"us":[1222624,7760],"eu":[1094592,7760],"sh":[1071104,7760]}], +"actors/hoot/hoot_wing_tip.rgba16.png": [32,32,2048,{"jp":[1215456,9808],"us":[1222624,9808],"eu":[1094592,9808],"sh":[1071104,9808]}], +"actors/impact_ring/impact_ring_left_side.ia16.png": [32,64,4096,{"jp":[1599504,117328],"us":[1606720,117328],"eu":[1478688,117328],"sh":[1455200,117328]}], +"actors/impact_ring/impact_ring_right_side.ia16.png": [32,64,4096,{"jp":[1599504,121424],"us":[1606720,121424],"eu":[1478688,121424],"sh":[1455200,121424]}], +"actors/impact_smoke/impact_smoke_0.ia16.png": [64,64,8192,{"jp":[1599504,371240],"us":[1606720,371576],"eu":[1478688,371576],"sh":[1455200,371576]}], +"actors/impact_smoke/impact_smoke_1.ia16.png": [64,64,8192,{"jp":[1599504,379432],"us":[1606720,379768],"eu":[1478688,379768],"sh":[1455200,379768]}], +"actors/impact_smoke/impact_smoke_2.ia16.png": [64,64,8192,{"jp":[1599504,387624],"us":[1606720,387960],"eu":[1478688,387960],"sh":[1455200,387960]}], +"actors/impact_smoke/impact_smoke_3.ia16.png": [64,64,8192,{"jp":[1599504,395816],"us":[1606720,396152],"eu":[1478688,396152],"sh":[1455200,396152]}], +"actors/king_bobomb/bob-omb_buddy_body_unused.rgba16.png": [64,64,8192,{"jp":[1257760,25720],"us":[1264928,25720],"eu":[1136896,25720],"sh":[1113408,25720]}], +"actors/king_bobomb/bob-omb_buddy_left_side_unused.rgba16.png": [32,64,4096,{"jp":[1257760,120],"us":[1264928,120],"eu":[1136896,120],"sh":[1113408,120]}], +"actors/king_bobomb/bob-omb_buddy_right_side_unused.rgba16.png": [32,64,4096,{"jp":[1257760,4216],"us":[1264928,4216],"eu":[1136896,4216],"sh":[1113408,4216]}], +"actors/king_bobomb/king_bob-omb_arm.rgba16.png": [32,32,2048,{"jp":[1257760,8312],"us":[1264928,8312],"eu":[1136896,8312],"sh":[1113408,8312]}], +"actors/king_bobomb/king_bob-omb_body_unused.rgba16.png": [64,64,8192,{"jp":[1257760,10360],"us":[1264928,10360],"eu":[1136896,10360],"sh":[1113408,10360]}], +"actors/king_bobomb/king_bob-omb_crown_rim.rgba16.png": [32,16,1024,{"jp":[1257760,24696],"us":[1264928,24696],"eu":[1136896,24696],"sh":[1113408,24696]}], +"actors/king_bobomb/king_bob-omb_eyes.rgba16.png": [32,64,4096,{"jp":[1257760,18552],"us":[1264928,18552],"eu":[1136896,18552],"sh":[1113408,18552]}], +"actors/king_bobomb/king_bob-omb_hand.rgba16.png": [32,32,2048,{"jp":[1215456,64],"us":[1222624,64],"eu":[1094592,64],"sh":[1071104,64]}], +"actors/king_bobomb/king_bob-omb_left_side.rgba16.png": [32,64,4096,{"jp":[1257760,33912],"us":[1264928,33912],"eu":[1136896,33912],"sh":[1113408,33912]}], +"actors/king_bobomb/king_bob-omb_right_side.rgba16.png": [32,64,4096,{"jp":[1257760,38008],"us":[1264928,38008],"eu":[1136896,38008],"sh":[1113408,38008]}], +"actors/klepto/klepto_beak.rgba16.png": [32,64,4096,{"jp":[1327760,4104],"us":[1334928,4104],"eu":[1206896,4104],"sh":[1183408,4104]}], +"actors/klepto/klepto_chest_tuft.rgba16.png": [32,32,2048,{"jp":[1327760,8],"us":[1334928,8],"eu":[1206896,8],"sh":[1183408,8]}], +"actors/klepto/klepto_eye.rgba16.png": [32,32,2048,{"jp":[1327760,2056],"us":[1334928,2056],"eu":[1206896,2056],"sh":[1183408,2056]}], +"actors/klepto/klepto_wing.rgba16.png": [64,32,4096,{"jp":[1327760,8200],"us":[1334928,8200],"eu":[1206896,8200],"sh":[1183408,8200]}], +"actors/klepto/klepto_wing_flap.rgba16.png": [32,32,2048,{"jp":[1327760,12296],"us":[1334928,12296],"eu":[1206896,12296],"sh":[1183408,12296]}], +"actors/koopa/koopa_eye_border.rgba16.png": [32,32,2048,{"jp":[1844608,22088],"us":[1851952,22088],"eu":[1723920,22088],"sh":[1700432,22088]}], +"actors/koopa/koopa_eyes_closed.rgba16.png": [32,32,2048,{"jp":[1844608,20040],"us":[1851952,20040],"eu":[1723920,20040],"sh":[1700432,20040]}], +"actors/koopa/koopa_eyes_open.rgba16.png": [32,32,2048,{"jp":[1844608,17992],"us":[1851952,17992],"eu":[1723920,17992],"sh":[1700432,17992]}], +"actors/koopa/koopa_nostrils.rgba16.png": [64,32,4096,{"jp":[1844608,24136],"us":[1851952,24136],"eu":[1723920,24136],"sh":[1700432,24136]}], +"actors/koopa/koopa_shell_back.rgba16.png": [32,32,2048,{"jp":[1844608,11848],"us":[1851952,11848],"eu":[1723920,11848],"sh":[1700432,11848]}], +"actors/koopa/koopa_shell_front.rgba16.png": [32,32,2048,{"jp":[1844608,9800],"us":[1851952,9800],"eu":[1723920,9800],"sh":[1700432,9800]}], +"actors/koopa/koopa_shell_front_top.rgba16.png": [32,32,2048,{"jp":[1844608,15944],"us":[1851952,15944],"eu":[1723920,15944],"sh":[1700432,15944]}], +"actors/koopa/koopa_shoe.rgba16.png": [32,32,2048,{"jp":[1844608,13896],"us":[1851952,13896],"eu":[1723920,13896],"sh":[1700432,13896]}], +"actors/koopa_flag/koopa_flag_banner.rgba16.png": [32,32,2048,{"jp":[1844608,72],"us":[1851952,72],"eu":[1723920,72],"sh":[1700432,72]}], +"actors/koopa_shell/koopa_shell_back.rgba16.png": [32,32,2048,{"jp":[1844608,11848],"us":[1851952,11848],"eu":[1723920,11848],"sh":[1700432,11848]}], +"actors/koopa_shell/koopa_shell_front.rgba16.png": [32,32,2048,{"jp":[1844608,9800],"us":[1851952,9800],"eu":[1723920,9800],"sh":[1700432,9800]}], +"actors/lakitu_cameraman/lakitu_camera_lens.rgba16.png": [16,16,512,{"jp":[1926752,14336],"us":[1934096,14336],"eu":[1806064,14336],"sh":[1782576,14336]}], +"actors/lakitu_cameraman/lakitu_cameraman_cloud_face_unused.rgba16.png": [32,32,2048,{"jp":[1568640,60640],"us":[1575856,60640],"eu":[1447824,60640],"sh":[1424336,60640]}], +"actors/lakitu_cameraman/lakitu_cameraman_eyes_closed.rgba16.png": [64,32,4096,{"jp":[1568640,66784],"us":[1575856,66784],"eu":[1447824,66784],"sh":[1424336,66784]}], +"actors/lakitu_cameraman/lakitu_cameraman_eyes_open.rgba16.png": [64,32,4096,{"jp":[1568640,62688],"us":[1575856,62688],"eu":[1447824,62688],"sh":[1424336,62688]}], +"actors/lakitu_cameraman/lakitu_cameraman_frown.rgba16.png": [32,32,2048,{"jp":[1568640,72928],"us":[1575856,72928],"eu":[1447824,72928],"sh":[1424336,72928]}], +"actors/lakitu_cameraman/lakitu_cameraman_shell.rgba16.png": [32,32,2048,{"jp":[1568640,70880],"us":[1575856,70880],"eu":[1447824,70880],"sh":[1424336,70880]}], +"actors/lakitu_enemy/lakitu_enemy_cloud_face_unused.rgba16.png": [32,32,2048,{"jp":[1568640,60640],"us":[1575856,60640],"eu":[1447824,60640],"sh":[1424336,60640]}], +"actors/lakitu_enemy/lakitu_enemy_eyes_closed.rgba16.png": [64,32,4096,{"jp":[1568640,66784],"us":[1575856,66784],"eu":[1447824,66784],"sh":[1424336,66784]}], +"actors/lakitu_enemy/lakitu_enemy_eyes_open.rgba16.png": [64,32,4096,{"jp":[1568640,62688],"us":[1575856,62688],"eu":[1447824,62688],"sh":[1424336,62688]}], +"actors/lakitu_enemy/lakitu_enemy_frown.rgba16.png": [32,32,2048,{"jp":[1568640,72928],"us":[1575856,72928],"eu":[1447824,72928],"sh":[1424336,72928]}], +"actors/lakitu_enemy/lakitu_enemy_shell.rgba16.png": [32,32,2048,{"jp":[1568640,70880],"us":[1575856,70880],"eu":[1447824,70880],"sh":[1424336,70880]}], +"actors/leaves/leaf.rgba16.png": [16,16,512,{"jp":[2094912,117728],"us":[2102288,117728],"eu":[1974256,117728],"sh":[1950768,117728]}], +"actors/mad_piano/mad_piano_body.rgba16.png": [16,32,1024,{"jp":[1462368,29424],"us":[1469536,29424],"eu":[1341504,29424],"sh":[1318016,29424]}], +"actors/mad_piano/mad_piano_keys.rgba16.png": [32,16,1024,{"jp":[1462368,32496],"us":[1469536,32496],"eu":[1341504,32496],"sh":[1318016,32496]}], +"actors/mad_piano/mad_piano_keys_corner.rgba16.png": [32,16,1024,{"jp":[1462368,30448],"us":[1469536,30448],"eu":[1341504,30448],"sh":[1318016,30448]}], +"actors/mad_piano/mad_piano_keys_edge.rgba16.png": [32,16,1024,{"jp":[1462368,33520],"us":[1469536,33520],"eu":[1341504,33520],"sh":[1318016,33520]}], +"actors/mad_piano/mad_piano_mouth.rgba16.png": [16,32,1024,{"jp":[1462368,31472],"us":[1469536,31472],"eu":[1341504,31472],"sh":[1318016,31472]}], +"actors/mad_piano/mad_piano_tooth.rgba16.png": [32,32,2048,{"jp":[1462368,27376],"us":[1469536,27376],"eu":[1341504,27376],"sh":[1318016,27376]}], +"actors/manta/manta_eye.rgba16.png": [32,32,2048,{"jp":[1285392,12192],"us":[1292560,12192],"eu":[1164528,12192],"sh":[1141040,12192]}], +"actors/manta/manta_fin_corner.rgba16.png": [32,32,2048,{"jp":[1285392,6048],"us":[1292560,6048],"eu":[1164528,6048],"sh":[1141040,6048]}], +"actors/manta/manta_fin_edge.rgba16.png": [64,32,4096,{"jp":[1285392,14240],"us":[1292560,14240],"eu":[1164528,14240],"sh":[1141040,14240]}], +"actors/manta/manta_gills.rgba16.png": [32,64,4096,{"jp":[1285392,8096],"us":[1292560,8096],"eu":[1164528,8096],"sh":[1141040,8096]}], +"actors/mario/mario_eyes_center.rgba16.png": [32,32,2048,{"jp":[1125200,12432],"us":[1132368,12432],"eu":[1004336,12432],"sh":[980848,12432]}], +"actors/mario/mario_eyes_closed.rgba16.png": [32,32,2048,{"jp":[1125200,16528],"us":[1132368,16528],"eu":[1004336,16528],"sh":[980848,16528]}], +"actors/mario/mario_eyes_closed_unused_0.rgba16.png": [32,32,2048,{"jp":[1125200,16528],"us":[1132368,16528],"eu":[1004336,16528],"sh":[980848,16528]}], +"actors/mario/mario_eyes_closed_unused_1.rgba16.png": [32,32,2048,{"jp":[1125200,16528],"us":[1132368,16528],"eu":[1004336,16528],"sh":[980848,16528]}], +"actors/mario/mario_eyes_dead.rgba16.png": [32,32,2048,{"jp":[1125200,30864],"us":[1132368,30864],"eu":[1004336,30864],"sh":[980848,30864]}], +"actors/mario/mario_eyes_down_unused.rgba16.png": [32,32,2048,{"jp":[1125200,28816],"us":[1132368,28816],"eu":[1004336,28816],"sh":[980848,28816]}], +"actors/mario/mario_eyes_half_closed.rgba16.png": [32,32,2048,{"jp":[1125200,14480],"us":[1132368,14480],"eu":[1004336,14480],"sh":[980848,14480]}], +"actors/mario/mario_eyes_left_unused.rgba16.png": [32,32,2048,{"jp":[1125200,22672],"us":[1132368,22672],"eu":[1004336,22672],"sh":[980848,22672]}], +"actors/mario/mario_eyes_right_unused.rgba16.png": [32,32,2048,{"jp":[1125200,24720],"us":[1132368,24720],"eu":[1004336,24720],"sh":[980848,24720]}], +"actors/mario/mario_eyes_up_unused.rgba16.png": [32,32,2048,{"jp":[1125200,26768],"us":[1132368,26768],"eu":[1004336,26768],"sh":[980848,26768]}], +"actors/mario/mario_logo.rgba16.png": [32,32,2048,{"jp":[1125200,6288],"us":[1132368,6288],"eu":[1004336,6288],"sh":[980848,6288]}], +"actors/mario/mario_metal.rgba16.png": [64,32,4096,{"jp":[1125200,144],"us":[1132368,144],"eu":[1004336,144],"sh":[980848,144]}], +"actors/mario/mario_metal_wing_tip_unused.rgba16.png": [32,64,4096,{"jp":[1125200,45200],"us":[1132368,45200],"eu":[1004336,45200],"sh":[980848,45200]}], +"actors/mario/mario_metal_wing_unused.rgba16.png": [32,64,4096,{"jp":[1125200,41104],"us":[1132368,41104],"eu":[1004336,41104],"sh":[980848,41104]}], +"actors/mario/mario_mustache.rgba16.png": [32,32,2048,{"jp":[1125200,10384],"us":[1132368,10384],"eu":[1004336,10384],"sh":[980848,10384]}], +"actors/mario/mario_overalls_button.rgba16.png": [32,32,2048,{"jp":[1125200,4240],"us":[1132368,4240],"eu":[1004336,4240],"sh":[980848,4240]}], +"actors/mario/mario_sideburn.rgba16.png": [32,32,2048,{"jp":[1125200,8336],"us":[1132368,8336],"eu":[1004336,8336],"sh":[980848,8336]}], +"actors/mario/mario_wing.rgba16.png": [32,64,4096,{"jp":[1125200,32912],"us":[1132368,32912],"eu":[1004336,32912],"sh":[980848,32912]}], +"actors/mario/mario_wing_tip.rgba16.png": [32,64,4096,{"jp":[1125200,37008],"us":[1132368,37008],"eu":[1004336,37008],"sh":[980848,37008]}], +"actors/mario_cap/mario_cap_logo.rgba16.png": [32,32,2048,{"jp":[1125200,6288],"us":[1132368,6288],"eu":[1004336,6288],"sh":[980848,6288]}], +"actors/mario_cap/mario_cap_metal.rgba16.png": [64,32,4096,{"jp":[1125200,144],"us":[1132368,144],"eu":[1004336,144],"sh":[980848,144]}], +"actors/mario_cap/mario_cap_metal_wing_tip_unused.rgba16.png": [32,64,4096,{"jp":[1125200,45200],"us":[1132368,45200],"eu":[1004336,45200],"sh":[980848,45200]}], +"actors/mario_cap/mario_cap_metal_wing_unused.rgba16.png": [32,64,4096,{"jp":[1125200,41104],"us":[1132368,41104],"eu":[1004336,41104],"sh":[980848,41104]}], +"actors/mario_cap/mario_cap_wing.rgba16.png": [32,64,4096,{"jp":[1125200,32912],"us":[1132368,32912],"eu":[1004336,32912],"sh":[980848,32912]}], +"actors/mario_cap/mario_cap_wing_tip.rgba16.png": [32,64,4096,{"jp":[1125200,37008],"us":[1132368,37008],"eu":[1004336,37008],"sh":[980848,37008]}], +"actors/metal_box/metal_box_side.rgba16.png": [32,64,4096,{"jp":[2032944,145816],"us":[2040320,145816],"eu":[1912288,145816],"sh":[1888800,145816]}], +"actors/mips/mips_eyes.rgba16.png": [32,32,2048,{"jp":[1926752,64384],"us":[1934096,64624],"eu":[1806064,64624],"sh":[1782576,64624]}], +"actors/mist/mist.ia16.png": [32,32,2048,{"jp":[2094912,128],"us":[2102288,128],"eu":[1974256,128],"sh":[1950768,128]}], +"actors/moneybag/moneybag_eyes.rgba16.png": [32,32,2048,{"jp":[1979680,18864],"us":[1987056,18864],"eu":[1859024,18864],"sh":[1835536,18864]}], +"actors/moneybag/moneybag_mouth.rgba16.png": [64,32,4096,{"jp":[1979680,14768],"us":[1987056,14768],"eu":[1859024,14768],"sh":[1835536,14768]}], +"actors/monty_mole/monty_mole_cheek.rgba16.png": [32,32,2048,{"jp":[1377744,2416],"us":[1384912,2416],"eu":[1256880,2416],"sh":[1233392,2416]}], +"actors/monty_mole/monty_mole_claw.rgba16.png": [32,32,2048,{"jp":[1377744,10608],"us":[1384912,10608],"eu":[1256880,10608],"sh":[1233392,10608]}], +"actors/monty_mole/monty_mole_eye.rgba16.png": [32,32,2048,{"jp":[1377744,4464],"us":[1384912,4464],"eu":[1256880,4464],"sh":[1233392,4464]}], +"actors/monty_mole/monty_mole_nose.rgba16.png": [32,32,2048,{"jp":[1377744,6512],"us":[1384912,6512],"eu":[1256880,6512],"sh":[1233392,6512]}], +"actors/monty_mole/monty_mole_tooth.rgba16.png": [32,32,2048,{"jp":[1377744,8560],"us":[1384912,8560],"eu":[1256880,8560],"sh":[1233392,8560]}], +"actors/monty_mole_hole/monty_mole_hole.ia16.png": [32,32,2048,{"jp":[1377744,64],"us":[1384912,64],"eu":[1256880,64],"sh":[1233392,64]}], +"actors/mr_i_eyeball/mr_i_eyeball_left_side.rgba16.png": [32,64,4096,{"jp":[1991184,128],"us":[1998560,128],"eu":[1870528,128],"sh":[1847040,128]}], +"actors/mr_i_eyeball/mr_i_eyeball_right_side.rgba16.png": [32,64,4096,{"jp":[1991184,4224],"us":[1998560,4224],"eu":[1870528,4224],"sh":[1847040,4224]}], +"actors/mr_i_iris/mr_i_iris_closed.rgba16.png": [32,32,2048,{"jp":[1991184,14704],"us":[1998560,14704],"eu":[1870528,14704],"sh":[1847040,14704]}], +"actors/mr_i_iris/mr_i_iris_mostly_closed.rgba16.png": [32,32,2048,{"jp":[1991184,12656],"us":[1998560,12656],"eu":[1870528,12656],"sh":[1847040,12656]}], +"actors/mr_i_iris/mr_i_iris_mostly_open.rgba16.png": [32,32,2048,{"jp":[1991184,10608],"us":[1998560,10608],"eu":[1870528,10608],"sh":[1847040,10608]}], +"actors/mr_i_iris/mr_i_iris_open.rgba16.png": [32,32,2048,{"jp":[1991184,8560],"us":[1998560,8560],"eu":[1870528,8560],"sh":[1847040,8560]}], +"actors/mushroom_1up/1-up_mushroom.rgba16.png": [32,64,4096,{"jp":[2094912,169512],"us":[2102288,169512],"eu":[1974256,169512],"sh":[1950768,169512]}], +"actors/peach/peach_chest_jewel.rgba16.png": [16,16,512,{"jp":[1490032,11304],"us":[1497200,11304],"eu":[1369168,11304],"sh":[1345680,11304]}], +"actors/peach/peach_crown_jewel.rgba16.png": [16,16,512,{"jp":[1490032,10792],"us":[1497200,10792],"eu":[1369168,10792],"sh":[1345680,10792]}], +"actors/peach/peach_dress.rgba16.png": [32,32,2048,{"jp":[1490032,16424],"us":[1497200,16424],"eu":[1369168,16424],"sh":[1345680,16424]}], +"actors/peach/peach_eye_closed.rgba16.png": [32,32,2048,{"jp":[1490032,8744],"us":[1497200,8744],"eu":[1369168,8744],"sh":[1345680,8744]}], +"actors/peach/peach_eye_mostly_closed.rgba16.png": [32,32,2048,{"jp":[1490032,6696],"us":[1497200,6696],"eu":[1369168,6696],"sh":[1345680,6696]}], +"actors/peach/peach_eye_mostly_open.rgba16.png": [32,32,2048,{"jp":[1490032,4648],"us":[1497200,4648],"eu":[1369168,4648],"sh":[1345680,4648]}], +"actors/peach/peach_eye_open.rgba16.png": [32,32,2048,{"jp":[1490032,2600],"us":[1497200,2600],"eu":[1369168,2600],"sh":[1345680,2600]}], +"actors/peach/peach_lips.rgba16.png": [32,32,2048,{"jp":[1490032,13864],"us":[1497200,13864],"eu":[1369168,13864],"sh":[1345680,13864]}], +"actors/peach/peach_lips_scrunched.rgba16.png": [32,32,2048,{"jp":[1490032,11816],"us":[1497200,11816],"eu":[1369168,11816],"sh":[1345680,11816]}], +"actors/peach/peach_nostril.rgba16.png": [16,16,512,{"jp":[1490032,15912],"us":[1497200,15912],"eu":[1369168,15912],"sh":[1345680,15912]}], +"actors/pebble/pebble.rgba16.png": [32,32,2048,{"jp":[2094912,115456],"us":[2102288,115456],"eu":[1974256,115456],"sh":[1950768,115456]}], +"actors/penguin/penguin_beak.rgba16.png": [32,32,2048,{"jp":[1436272,21984],"us":[1443440,21984],"eu":[1315408,21984],"sh":[1291920,21984]}], +"actors/penguin/penguin_eye_angry.rgba16.png": [32,32,2048,{"jp":[1436272,17888],"us":[1443440,17888],"eu":[1315408,17888],"sh":[1291920,17888]}], +"actors/penguin/penguin_eye_angry_unused.rgba16.png": [32,32,2048,{"jp":[1436272,19936],"us":[1443440,19936],"eu":[1315408,19936],"sh":[1291920,19936]}], +"actors/penguin/penguin_eye_closed.rgba16.png": [32,32,2048,{"jp":[1436272,15840],"us":[1443440,15840],"eu":[1315408,15840],"sh":[1291920,15840]}], +"actors/penguin/penguin_eye_half_closed.rgba16.png": [32,32,2048,{"jp":[1436272,13792],"us":[1443440,13792],"eu":[1315408,13792],"sh":[1291920,13792]}], +"actors/penguin/penguin_eye_open.rgba16.png": [32,32,2048,{"jp":[1436272,11744],"us":[1443440,11744],"eu":[1315408,11744],"sh":[1291920,11744]}], +"actors/piranha_plant/piranha_plant_bottom_lip.rgba16.png": [32,32,2048,{"jp":[1844608,78840],"us":[1851952,78840],"eu":[1723920,78840],"sh":[1700432,78840]}], +"actors/piranha_plant/piranha_plant_leaf.rgba16.png": [32,64,4096,{"jp":[1844608,82936],"us":[1851952,82936],"eu":[1723920,82936],"sh":[1700432,82936]}], +"actors/piranha_plant/piranha_plant_skin.rgba16.png": [32,32,2048,{"jp":[1844608,74744],"us":[1851952,74744],"eu":[1723920,74744],"sh":[1700432,74744]}], +"actors/piranha_plant/piranha_plant_stem.rgba16.png": [32,32,2048,{"jp":[1844608,76792],"us":[1851952,76792],"eu":[1723920,76792],"sh":[1700432,76792]}], +"actors/piranha_plant/piranha_plant_tongue.rgba16.png": [32,64,4096,{"jp":[1599504,148536],"us":[1606720,148536],"eu":[1478688,148536],"sh":[1455200,148536]}], +"actors/piranha_plant/piranha_plant_tooth.rgba16.png": [32,32,2048,{"jp":[1844608,80888],"us":[1851952,80888],"eu":[1723920,80888],"sh":[1700432,80888]}], +"actors/pokey/pokey_body.rgba16.png": [32,32,2048,{"jp":[1327760,75896],"us":[1334928,75896],"eu":[1206896,75896],"sh":[1183408,75896]}], +"actors/pokey/pokey_face.rgba16.png": [32,32,2048,{"jp":[1327760,71504],"us":[1334928,71504],"eu":[1206896,71504],"sh":[1183408,71504]}], +"actors/pokey/pokey_face_blink.rgba16.png": [32,32,2048,{"jp":[1327760,73552],"us":[1334928,73552],"eu":[1206896,73552],"sh":[1183408,73552]}], +"actors/poundable_pole/poundable_pole_side.rgba16.png": [32,32,2048,{"jp":[1844608,6224],"us":[1851952,6224],"eu":[1723920,6224],"sh":[1700432,6224]}], +"actors/poundable_pole/poundable_pole_top.rgba16.png": [32,32,2048,{"jp":[1844608,4176],"us":[1851952,4176],"eu":[1723920,4176],"sh":[1700432,4176]}], +"actors/power_meter/power_meter_five_segments.rgba16.png": [32,32,2048,{"jp":[2094912,158688],"us":[2102288,158688],"eu":[1974256,158688],"sh":[1950768,158688]}], +"actors/power_meter/power_meter_four_segments.rgba16.png": [32,32,2048,{"jp":[2094912,160736],"us":[2102288,160736],"eu":[1974256,160736],"sh":[1950768,160736]}], +"actors/power_meter/power_meter_full.rgba16.png": [32,32,2048,{"jp":[2094912,152544],"us":[2102288,152544],"eu":[1974256,152544],"sh":[1950768,152544]}], +"actors/power_meter/power_meter_left_side.rgba16.png": [32,64,4096,{"jp":[2094912,144352],"us":[2102288,144352],"eu":[1974256,144352],"sh":[1950768,144352]}], +"actors/power_meter/power_meter_one_segment.rgba16.png": [32,32,2048,{"jp":[2094912,166880],"us":[2102288,166880],"eu":[1974256,166880],"sh":[1950768,166880]}], +"actors/power_meter/power_meter_right_side.rgba16.png": [32,64,4096,{"jp":[2094912,148448],"us":[2102288,148448],"eu":[1974256,148448],"sh":[1950768,148448]}], +"actors/power_meter/power_meter_seven_segments.rgba16.png": [32,32,2048,{"jp":[2094912,154592],"us":[2102288,154592],"eu":[1974256,154592],"sh":[1950768,154592]}], +"actors/power_meter/power_meter_six_segments.rgba16.png": [32,32,2048,{"jp":[2094912,156640],"us":[2102288,156640],"eu":[1974256,156640],"sh":[1950768,156640]}], +"actors/power_meter/power_meter_three_segments.rgba16.png": [32,32,2048,{"jp":[2094912,162784],"us":[2102288,162784],"eu":[1974256,162784],"sh":[1950768,162784]}], +"actors/power_meter/power_meter_two_segments.rgba16.png": [32,32,2048,{"jp":[2094912,164832],"us":[2102288,164832],"eu":[1974256,164832],"sh":[1950768,164832]}], +"actors/purple_switch/purple_switch_base.rgba16.png": [16,4,128,{"jp":[2032944,49320],"us":[2040320,49320],"eu":[1912288,49320],"sh":[1888800,49320]}], +"actors/purple_switch/purple_switch_exclamation_point.rgba16.png": [16,32,1024,{"jp":[2032944,49448],"us":[2040320,49448],"eu":[1912288,49448],"sh":[1888800,49448]}], +"actors/sand/sand_particle.rgba16.png": [16,16,512,{"jp":[2094912,178896],"us":[2102288,178896],"eu":[1974256,178896],"sh":[1950768,178896]}], +"actors/scuttlebug/scuttlebug_eye.rgba16.png": [32,32,2048,{"jp":[1991184,65800],"us":[1998560,65800],"eu":[1870528,65800],"sh":[1847040,65800]}], +"actors/scuttlebug/scuttlebug_iris.rgba16.png": [32,32,2048,{"jp":[1991184,76040],"us":[1998560,76040],"eu":[1870528,76040],"sh":[1847040,76040]}], +"actors/scuttlebug/scuttlebug_left_side.rgba16.png": [32,64,4096,{"jp":[1991184,67848],"us":[1998560,67848],"eu":[1870528,67848],"sh":[1847040,67848]}], +"actors/scuttlebug/scuttlebug_leg.rgba16.png": [32,32,2048,{"jp":[1991184,78088],"us":[1998560,78088],"eu":[1870528,78088],"sh":[1847040,78088]}], +"actors/scuttlebug/scuttlebug_right_side.rgba16.png": [32,64,4096,{"jp":[1991184,71944],"us":[1998560,71944],"eu":[1870528,71944],"sh":[1847040,71944]}], +"actors/seaweed/seaweed_base.rgba16.png": [32,32,2048,{"jp":[1802256,38416],"us":[1809600,38416],"eu":[1681568,38416],"sh":[1658080,38416]}], +"actors/seaweed/seaweed_lower_center.rgba16.png": [32,32,2048,{"jp":[1802256,36368],"us":[1809600,36368],"eu":[1681568,36368],"sh":[1658080,36368]}], +"actors/seaweed/seaweed_tip.rgba16.png": [32,32,2048,{"jp":[1802256,32272],"us":[1809600,32272],"eu":[1681568,32272],"sh":[1658080,32272]}], +"actors/seaweed/seaweed_upper_center.rgba16.png": [32,32,2048,{"jp":[1802256,34320],"us":[1809600,34320],"eu":[1681568,34320],"sh":[1658080,34320]}], +"actors/skeeter/skeeter_eye.rgba16.png": [32,32,2048,{"jp":[1802256,144],"us":[1809600,144],"eu":[1681568,144],"sh":[1658080,144]}], +"actors/skeeter/skeeter_iris.rgba16.png": [16,8,256,{"jp":[1802256,2192],"us":[1809600,2192],"eu":[1681568,2192],"sh":[1658080,2192]}], +"actors/smoke/smoke.ia16.png": [32,32,2048,{"jp":[1377744,29376],"us":[1384912,29376],"eu":[1256880,29376],"sh":[1233392,29376]}], +"actors/snowman/mr_blizzard_eye.rgba16.png": [32,32,2048,{"jp":[1436272,46192],"us":[1443440,46192],"eu":[1315408,46192],"sh":[1291920,46192]}], +"actors/snowman/mr_blizzard_left_side.rgba16.png": [32,64,4096,{"jp":[1436272,38000],"us":[1443440,38000],"eu":[1315408,38000],"sh":[1291920,38000]}], +"actors/snowman/mr_blizzard_mitten.rgba16.png": [32,32,2048,{"jp":[1436272,35952],"us":[1443440,35952],"eu":[1315408,35952],"sh":[1291920,35952]}], +"actors/snowman/mr_blizzard_mouth.rgba16.png": [32,32,2048,{"jp":[1436272,48240],"us":[1443440,48240],"eu":[1315408,48240],"sh":[1291920,48240]}], +"actors/snowman/mr_blizzard_right_side.rgba16.png": [32,64,4096,{"jp":[1436272,42096],"us":[1443440,42096],"eu":[1315408,42096],"sh":[1291920,42096]}], +"actors/snufit/snufit_body.rgba16.png": [32,32,2048,{"jp":[1991184,28896],"us":[1998560,28896],"eu":[1870528,28896],"sh":[1847040,28896]}], +"actors/snufit/snufit_eye.rgba16.png": [32,32,2048,{"jp":[1991184,30944],"us":[1998560,30944],"eu":[1870528,30944],"sh":[1847040,30944]}], +"actors/snufit/snufit_mask_strap.rgba16.png": [16,32,1024,{"jp":[1991184,32992],"us":[1998560,32992],"eu":[1870528,32992],"sh":[1847040,32992]}], +"actors/snufit/snufit_mouth.rgba16.png": [32,32,2048,{"jp":[1991184,34016],"us":[1998560,34016],"eu":[1870528,34016],"sh":[1847040,34016]}], +"actors/sparkle/sparkle_0.rgba16.png": [32,32,2048,{"jp":[1125200,160912],"us":[1132368,160912],"eu":[1004336,160912],"sh":[980848,160912]}], +"actors/sparkle/sparkle_1.rgba16.png": [32,32,2048,{"jp":[1125200,162960],"us":[1132368,162960],"eu":[1004336,162960],"sh":[980848,162960]}], +"actors/sparkle/sparkle_2.rgba16.png": [32,32,2048,{"jp":[1125200,165008],"us":[1132368,165008],"eu":[1004336,165008],"sh":[980848,165008]}], +"actors/sparkle/sparkle_3.rgba16.png": [32,32,2048,{"jp":[1125200,167056],"us":[1132368,167056],"eu":[1004336,167056],"sh":[980848,167056]}], +"actors/sparkle/sparkle_4.rgba16.png": [32,32,2048,{"jp":[1125200,169104],"us":[1132368,169104],"eu":[1004336,169104],"sh":[980848,169104]}], +"actors/sparkle/sparkle_5.rgba16.png": [32,32,2048,{"jp":[1125200,171152],"us":[1132368,171152],"eu":[1004336,171152],"sh":[980848,171152]}], +"actors/sparkle_animation/sparkle_animation_0.ia16.png": [32,32,2048,{"jp":[1125200,207496],"us":[1132368,207496],"eu":[1004336,207496],"sh":[980848,207496]}], +"actors/sparkle_animation/sparkle_animation_1.ia16.png": [32,32,2048,{"jp":[1125200,209544],"us":[1132368,209544],"eu":[1004336,209544],"sh":[980848,209544]}], +"actors/sparkle_animation/sparkle_animation_2.ia16.png": [32,32,2048,{"jp":[1125200,211592],"us":[1132368,211592],"eu":[1004336,211592],"sh":[980848,211592]}], +"actors/sparkle_animation/sparkle_animation_3.ia16.png": [32,32,2048,{"jp":[1125200,213640],"us":[1132368,213640],"eu":[1004336,213640],"sh":[980848,213640]}], +"actors/sparkle_animation/sparkle_animation_4.ia16.png": [32,32,2048,{"jp":[1125200,215688],"us":[1132368,215688],"eu":[1004336,215688],"sh":[980848,215688]}], +"actors/spindrift/spindrift_face.rgba16.png": [32,32,2048,{"jp":[1436272,1744],"us":[1443440,1744],"eu":[1315408,1744],"sh":[1291920,1744]}], +"actors/spindrift/spindrift_head.rgba16.png": [32,32,2048,{"jp":[1436272,7888],"us":[1443440,7888],"eu":[1315408,7888],"sh":[1291920,7888]}], +"actors/spindrift/spindrift_leaf.rgba16.png": [32,32,2048,{"jp":[1436272,5840],"us":[1443440,5840],"eu":[1315408,5840],"sh":[1291920,5840]}], +"actors/spindrift/spindrift_petal.rgba16.png": [32,32,2048,{"jp":[1436272,3792],"us":[1443440,3792],"eu":[1315408,3792],"sh":[1291920,3792]}], +"actors/springboard/springboard_base_unused.rgba16.png": [32,32,2048,{"jp":[1457744,2072],"us":[1464912,2072],"eu":[1336880,2072],"sh":[1313392,2072]}], +"actors/springboard/springboard_top_unused.rgba16.png": [32,32,2048,{"jp":[1457744,24],"us":[1464912,24],"eu":[1336880,24],"sh":[1313392,24]}], +"actors/star/star_eye.rgba16.png": [32,32,2048,{"jp":[1568640,31280],"us":[1575856,31280],"eu":[1447824,31280],"sh":[1424336,31280]}], +"actors/star/star_surface.rgba16.png": [32,32,2048,{"jp":[2094912,173808],"us":[2102288,173808],"eu":[1974256,173808],"sh":[1950768,173808]}], +"actors/stomp_smoke/stomp_smoke_0.ia16.png": [32,32,2048,{"jp":[1125200,139592],"us":[1132368,139592],"eu":[1004336,139592],"sh":[980848,139592]}], +"actors/stomp_smoke/stomp_smoke_1.ia16.png": [32,32,2048,{"jp":[1125200,141640],"us":[1132368,141640],"eu":[1004336,141640],"sh":[980848,141640]}], +"actors/stomp_smoke/stomp_smoke_2.ia16.png": [32,32,2048,{"jp":[1125200,143688],"us":[1132368,143688],"eu":[1004336,143688],"sh":[980848,143688]}], +"actors/stomp_smoke/stomp_smoke_3.ia16.png": [32,32,2048,{"jp":[1125200,145736],"us":[1132368,145736],"eu":[1004336,145736],"sh":[980848,145736]}], +"actors/stomp_smoke/stomp_smoke_4.ia16.png": [32,32,2048,{"jp":[1125200,147784],"us":[1132368,147784],"eu":[1004336,147784],"sh":[980848,147784]}], +"actors/stomp_smoke/stomp_smoke_5.ia16.png": [32,32,2048,{"jp":[1125200,149832],"us":[1132368,149832],"eu":[1004336,149832],"sh":[980848,149832]}], +"actors/sushi/sushi_eye.rgba16.png": [32,16,1024,{"jp":[1285392,38608],"us":[1292560,38608],"eu":[1164528,38608],"sh":[1141040,38608]}], +"actors/sushi/sushi_snout.rgba16.png": [32,32,2048,{"jp":[1285392,36560],"us":[1292560,36560],"eu":[1164528,36560],"sh":[1141040,36560]}], +"actors/sushi/sushi_tooth.rgba16.png": [8,8,128,{"jp":[1285392,39632],"us":[1292560,39632],"eu":[1164528,39632],"sh":[1141040,39632]}], +"actors/swoop/swoop_body.rgba16.png": [32,32,2048,{"jp":[1991184,17008],"us":[1998560,17008],"eu":[1870528,17008],"sh":[1847040,17008]}], +"actors/swoop/swoop_eye.rgba16.png": [32,32,2048,{"jp":[1991184,19056],"us":[1998560,19056],"eu":[1870528,19056],"sh":[1847040,19056]}], +"actors/swoop/swoop_nose.rgba16.png": [32,32,2048,{"jp":[1991184,21104],"us":[1998560,21104],"eu":[1870528,21104],"sh":[1847040,21104]}], +"actors/swoop/swoop_wing.rgba16.png": [32,32,2048,{"jp":[1991184,23152],"us":[1998560,23152],"eu":[1870528,23152],"sh":[1847040,23152]}], +"actors/thwomp/thwomp_face.rgba16.png": [32,64,4096,{"jp":[1215456,39168],"us":[1222624,39168],"eu":[1094592,39168],"sh":[1071104,39168]}], +"actors/thwomp/thwomp_surface.rgba16.png": [32,32,2048,{"jp":[1215456,43264],"us":[1222624,43264],"eu":[1094592,43264],"sh":[1071104,43264]}], +"actors/toad/toad_face.rgba16.png": [32,32,2048,{"jp":[1926752,22816],"us":[1934096,22816],"eu":[1806064,22816],"sh":[1782576,22816]}], +"actors/toad/toad_head.rgba16.png": [32,32,2048,{"jp":[1926752,24864],"us":[1934096,24864],"eu":[1806064,24864],"sh":[1782576,24864]}], +"actors/tornado/tornado.ia16.png": [32,64,4096,{"jp":[1285392,75848],"us":[1292560,75848],"eu":[1164528,75848],"sh":[1141040,75848]}], +"actors/treasure_chest/treasure_chest_front.rgba16.png": [64,32,4096,{"jp":[1802256,87976],"us":[1809600,87976],"eu":[1681568,87976],"sh":[1658080,87976]}], +"actors/treasure_chest/treasure_chest_lock.rgba16.png": [32,32,2048,{"jp":[1802256,81832],"us":[1809600,81832],"eu":[1681568,81832],"sh":[1658080,81832]}], +"actors/treasure_chest/treasure_chest_lock_top.rgba16.png": [32,32,2048,{"jp":[1802256,85928],"us":[1809600,85928],"eu":[1681568,85928],"sh":[1658080,85928]}], +"actors/treasure_chest/treasure_chest_side.rgba16.png": [32,32,2048,{"jp":[1802256,83880],"us":[1809600,83880],"eu":[1681568,83880],"sh":[1658080,83880]}], +"actors/tree/palm_tree.rgba16.png": [32,64,4096,{"jp":[2094912,205336],"us":[2102288,205336],"eu":[1974256,205336],"sh":[1950768,205336]}], +"actors/tree/pine_tree.rgba16.png": [32,64,4096,{"jp":[2094912,196448],"us":[2102288,196448],"eu":[1974256,196448],"sh":[1950768,196448]}], +"actors/tree/snowy_pine_tree.rgba16.png": [32,64,4096,{"jp":[2094912,200776],"us":[2102288,200776],"eu":[1974256,200776],"sh":[1950768,200776]}], +"actors/tree/tree_left_side.rgba16.png": [32,64,4096,{"jp":[2094912,187944],"us":[2102288,187944],"eu":[1974256,187944],"sh":[1950768,187944]}], +"actors/tree/tree_right_side.rgba16.png": [32,64,4096,{"jp":[2094912,192040],"us":[2102288,192040],"eu":[1974256,192040],"sh":[1950768,192040]}], +"actors/ukiki/ukiki_butt.rgba16.png": [32,32,2048,{"jp":[1377744,39872],"us":[1384912,39872],"eu":[1256880,39872],"sh":[1233392,39872]}], +"actors/ukiki/ukiki_face.rgba16.png": [64,32,4096,{"jp":[1377744,31680],"us":[1384912,31680],"eu":[1256880,31680],"sh":[1233392,31680]}], +"actors/ukiki/ukiki_face_blink.rgba16.png": [64,32,4096,{"jp":[1377744,35776],"us":[1384912,35776],"eu":[1256880,35776],"sh":[1233392,35776]}], +"actors/ukiki/ukiki_fur.rgba16.png": [32,32,2048,{"jp":[1377744,41920],"us":[1384912,41920],"eu":[1256880,41920],"sh":[1233392,41920]}], +"actors/unagi/unagi_body.rgba16.png": [32,32,2048,{"jp":[1285392,44832],"us":[1292560,44832],"eu":[1164528,44832],"sh":[1141040,44832]}], +"actors/unagi/unagi_eye.rgba16.png": [16,16,512,{"jp":[1285392,46880],"us":[1292560,46880],"eu":[1164528,46880],"sh":[1141040,46880]}], +"actors/unagi/unagi_head_base.rgba16.png": [32,32,2048,{"jp":[1285392,47392],"us":[1292560,47392],"eu":[1164528,47392],"sh":[1141040,47392]}], +"actors/unagi/unagi_mouth.rgba16.png": [8,8,128,{"jp":[1285392,49952],"us":[1292560,49952],"eu":[1164528,49952],"sh":[1141040,49952]}], +"actors/unagi/unagi_tail.rgba16.png": [32,32,2048,{"jp":[1285392,50080],"us":[1292560,50080],"eu":[1164528,50080],"sh":[1141040,50080]}], +"actors/unagi/unagi_tooth.rgba16.png": [16,16,512,{"jp":[1285392,49440],"us":[1292560,49440],"eu":[1164528,49440],"sh":[1141040,49440]}], +"actors/walk_smoke/walk_smoke_0.ia16.png": [32,32,2048,{"jp":[1125200,122528],"us":[1132368,122528],"eu":[1004336,122528],"sh":[980848,122528]}], +"actors/walk_smoke/walk_smoke_1.ia16.png": [32,32,2048,{"jp":[1125200,124576],"us":[1132368,124576],"eu":[1004336,124576],"sh":[980848,124576]}], +"actors/walk_smoke/walk_smoke_2.ia16.png": [32,32,2048,{"jp":[1125200,126624],"us":[1132368,126624],"eu":[1004336,126624],"sh":[980848,126624]}], +"actors/walk_smoke/walk_smoke_3.ia16.png": [32,32,2048,{"jp":[1125200,128672],"us":[1132368,128672],"eu":[1004336,128672],"sh":[980848,128672]}], +"actors/walk_smoke/walk_smoke_4.ia16.png": [32,32,2048,{"jp":[1125200,130720],"us":[1132368,130720],"eu":[1004336,130720],"sh":[980848,130720]}], +"actors/walk_smoke/walk_smoke_5.ia16.png": [32,32,2048,{"jp":[1125200,132768],"us":[1132368,132768],"eu":[1004336,132768],"sh":[980848,132768]}], +"actors/walk_smoke/walk_smoke_6.ia16.png": [32,32,2048,{"jp":[1125200,134816],"us":[1132368,134816],"eu":[1004336,134816],"sh":[980848,134816]}], +"actors/warp_pipe/warp_pipe_side.rgba16.png": [32,64,4096,{"jp":[2094912,32320],"us":[2102288,32320],"eu":[1974256,32320],"sh":[1950768,32320]}], +"actors/warp_pipe/warp_pipe_top.rgba16.png": [32,32,2048,{"jp":[2094912,37224],"us":[2102288,37224],"eu":[1974256,37224],"sh":[1950768,37224]}], +"actors/water_bubble/water_bubble.rgba16.png": [32,32,2048,{"jp":[1257760,65152],"us":[1264928,65152],"eu":[1136896,65152],"sh":[1113408,65152]}], +"actors/water_mine/water_mine_left_side_unused.rgba16.png": [32,64,4096,{"jp":[1599504,359104],"us":[1606720,359440],"eu":[1478688,359440],"sh":[1455200,359440]}], +"actors/water_mine/water_mine_right_side_unused.rgba16.png": [32,64,4096,{"jp":[1599504,363200],"us":[1606720,363536],"eu":[1478688,363536],"sh":[1455200,363536]}], +"actors/water_mine/water_mine_spike_unused.rgba16.png": [32,32,2048,{"jp":[1599504,367296],"us":[1606720,367632],"eu":[1478688,367632],"sh":[1455200,367632]}], +"actors/water_ring/water_ring.rgba16.png": [64,32,4096,{"jp":[1802256,74624],"us":[1809600,74624],"eu":[1681568,74624],"sh":[1658080,74624]}], +"actors/water_splash/water_splash_0.rgba16.png": [32,64,4096,{"jp":[1125200,173512],"us":[1132368,173512],"eu":[1004336,173512],"sh":[980848,173512]}], +"actors/water_splash/water_splash_1.rgba16.png": [32,64,4096,{"jp":[1125200,177608],"us":[1132368,177608],"eu":[1004336,177608],"sh":[980848,177608]}], +"actors/water_splash/water_splash_2.rgba16.png": [32,64,4096,{"jp":[1125200,181704],"us":[1132368,181704],"eu":[1004336,181704],"sh":[980848,181704]}], +"actors/water_splash/water_splash_3.rgba16.png": [32,64,4096,{"jp":[1125200,185800],"us":[1132368,185800],"eu":[1004336,185800],"sh":[980848,185800]}], +"actors/water_splash/water_splash_4.rgba16.png": [32,64,4096,{"jp":[1125200,189896],"us":[1132368,189896],"eu":[1004336,189896],"sh":[980848,189896]}], +"actors/water_splash/water_splash_5.rgba16.png": [32,64,4096,{"jp":[1125200,193992],"us":[1132368,193992],"eu":[1004336,193992],"sh":[980848,193992]}], +"actors/water_splash/water_splash_6.rgba16.png": [32,64,4096,{"jp":[1125200,198088],"us":[1132368,198088],"eu":[1004336,198088],"sh":[980848,198088]}], +"actors/water_splash/water_splash_7.rgba16.png": [32,64,4096,{"jp":[1125200,202184],"us":[1132368,202184],"eu":[1004336,202184],"sh":[980848,202184]}], +"actors/water_wave/water_wave_0.ia16.png": [32,32,2048,{"jp":[1125200,152408],"us":[1132368,152408],"eu":[1004336,152408],"sh":[980848,152408]}], +"actors/water_wave/water_wave_1.ia16.png": [32,32,2048,{"jp":[1125200,154456],"us":[1132368,154456],"eu":[1004336,154456],"sh":[980848,154456]}], +"actors/water_wave/water_wave_2.ia16.png": [32,32,2048,{"jp":[1125200,156504],"us":[1132368,156504],"eu":[1004336,156504],"sh":[980848,156504]}], +"actors/water_wave/water_wave_3.ia16.png": [32,32,2048,{"jp":[1125200,158552],"us":[1132368,158552],"eu":[1004336,158552],"sh":[980848,158552]}], +"actors/whirlpool/whirlpool.ia16.png": [32,64,4096,{"jp":[1285392,75848],"us":[1292560,75848],"eu":[1164528,75848],"sh":[1141040,75848]}], +"actors/white_particle/snow_particle.rgba16.png": [16,16,512,{"jp":[2094912,181920],"us":[2102288,181920],"eu":[1974256,181920],"sh":[1950768,181920]}], +"actors/white_particle_small/small_snow_particle.rgba16.png": [16,16,512,{"jp":[1125200,206720],"us":[1132368,206720],"eu":[1004336,206720],"sh":[980848,206720]}], +"actors/whomp/whomp_back.rgba16.png": [32,64,4096,{"jp":[1844608,115552],"us":[1851952,115552],"eu":[1723920,115552],"sh":[1700432,115552]}], +"actors/whomp/whomp_face.rgba16.png": [32,64,4096,{"jp":[1844608,119648],"us":[1851952,119648],"eu":[1723920,119648],"sh":[1700432,119648]}], +"actors/whomp/whomp_hand.rgba16.png": [32,32,2048,{"jp":[1844608,123744],"us":[1851952,123744],"eu":[1723920,123744],"sh":[1700432,123744]}], +"actors/whomp/whomp_surface.rgba16.png": [32,32,2048,{"jp":[1844608,125792],"us":[1851952,125792],"eu":[1723920,125792],"sh":[1700432,125792]}], +"actors/wiggler/wiggler_eye.rgba16.png": [32,32,2048,{"jp":[1568640,31280],"us":[1575856,31280],"eu":[1447824,31280],"sh":[1424336,31280]}], +"actors/wiggler/wiggler_flower.rgba16.png": [32,32,2048,{"jp":[1568640,33328],"us":[1575856,33328],"eu":[1447824,33328],"sh":[1424336,33328]}], +"actors/wiggler/wiggler_frown.rgba16.png": [32,32,2048,{"jp":[1568640,35376],"us":[1575856,35376],"eu":[1447824,35376],"sh":[1424336,35376]}], +"actors/wiggler/wiggler_nose_left_side.rgba16.png": [32,64,4096,{"jp":[1568640,37424],"us":[1575856,37424],"eu":[1447824,37424],"sh":[1424336,37424]}], +"actors/wiggler/wiggler_nose_right_side.rgba16.png": [32,64,4096,{"jp":[1568640,41520],"us":[1575856,41520],"eu":[1447824,41520],"sh":[1424336,41520]}], +"actors/wiggler/wiggler_segment_left_side.rgba16.png": [32,64,4096,{"jp":[1568640,23088],"us":[1575856,23088],"eu":[1447824,23088],"sh":[1424336,23088]}], +"actors/wiggler/wiggler_segment_right_side.rgba16.png": [32,64,4096,{"jp":[1568640,27184],"us":[1575856,27184],"eu":[1447824,27184],"sh":[1424336,27184]}], +"actors/wooden_signpost/wooden_signpost_back.rgba16.png": [32,32,2048,{"jp":[2094912,182728],"us":[2102288,182728],"eu":[1974256,182728],"sh":[1950768,182728]}], +"actors/wooden_signpost/wooden_signpost_front.rgba16.png": [32,32,2048,{"jp":[2094912,184776],"us":[2102288,184776],"eu":[1974256,184776],"sh":[1950768,184776]}], +"actors/yellow_sphere/yellow_sphere.rgba16.png": [32,32,2048,{"jp":[1215456,64],"us":[1222624,64],"eu":[1094592,64],"sh":[1071104,64]}], +"actors/yellow_sphere_small/small_yellow_sphere.rgba16.png": [32,32,2048,{"jp":[1215456,64],"us":[1222624,64],"eu":[1094592,64],"sh":[1071104,64]}], +"actors/yoshi/yoshi_eye.rgba16.png": [16,16,512,{"jp":[1490032,115872],"us":[1497200,116104],"eu":[1369168,116104],"sh":[1345680,116104]}], +"actors/yoshi/yoshi_eye_blink.rgba16.png": [16,16,512,{"jp":[1490032,116384],"us":[1497200,116616],"eu":[1369168,116616],"sh":[1345680,116616]}], +"actors/yoshi/yoshi_nostril.rgba16.png": [16,16,512,{"jp":[1490032,116896],"us":[1497200,117128],"eu":[1369168,117128],"sh":[1345680,117128]}], +"actors/yoshi_egg/yoshi_egg_0_unused.rgba16.png": [32,32,2048,{"jp":[1215456,22456],"us":[1222624,22456],"eu":[1094592,22456],"sh":[1071104,22456]}], +"actors/yoshi_egg/yoshi_egg_1_unused.rgba16.png": [32,32,2048,{"jp":[1215456,24504],"us":[1222624,24504],"eu":[1094592,24504],"sh":[1071104,24504]}], +"actors/yoshi_egg/yoshi_egg_2_unused.rgba16.png": [32,32,2048,{"jp":[1215456,26552],"us":[1222624,26552],"eu":[1094592,26552],"sh":[1071104,26552]}], +"actors/yoshi_egg/yoshi_egg_3_unused.rgba16.png": [32,32,2048,{"jp":[1215456,28600],"us":[1222624,28600],"eu":[1094592,28600],"sh":[1071104,28600]}], +"actors/yoshi_egg/yoshi_egg_4_unused.rgba16.png": [32,32,2048,{"jp":[1215456,30648],"us":[1222624,30648],"eu":[1094592,30648],"sh":[1071104,30648]}], +"actors/yoshi_egg/yoshi_egg_5_unused.rgba16.png": [32,32,2048,{"jp":[1215456,32696],"us":[1222624,32696],"eu":[1094592,32696],"sh":[1071104,32696]}], +"actors/yoshi_egg/yoshi_egg_6_unused.rgba16.png": [32,32,2048,{"jp":[1215456,34744],"us":[1222624,34744],"eu":[1094592,34744],"sh":[1071104,34744]}], +"actors/yoshi_egg/yoshi_egg_7_unused.rgba16.png": [32,32,2048,{"jp":[1215456,36792],"us":[1222624,36792],"eu":[1094592,36792],"sh":[1071104,36792]}], +"assets/demos/bbh.bin": [988,{"jp":[5733368],"us":[5741664],"eu":[5620584],"sh":[5589632]}], +"assets/demos/bitdw.bin": [1412,{"us":[5747100],"sh":[5595068]}], +"assets/demos/ccm.bin": [1320,{"jp":[5734356],"us":[5742652],"eu":[5621572],"sh":[5590620]}], +"assets/demos/hmc.bin": [980,{"jp":[5735676],"us":[5743972],"eu":[5622892],"sh":[5591940]}], +"assets/demos/jrb.bin": [620,{"jp":[5736656],"us":[5744952],"eu":[5623872],"sh":[5592920]}], +"assets/demos/pss.bin": [748,{"jp":[5737948],"us":[5746244],"eu":[5625164],"sh":[5594212]}], +"assets/demos/unused.bin": [108,{"jp":[5738696],"us":[5746992],"eu":[5625912],"sh":[5594960]}], +"assets/demos/wf.bin": [672,{"jp":[5737276],"us":[5745572],"eu":[5624492],"sh":[5593540]}], +"levels/bbh/0.rgba16.png": [32,64,4096,{"jp":[3604960,0],"us":[3611712,0],"eu":[3485312,0],"sh":[3459680,0]}], +"levels/bbh/1.rgba16.png": [32,32,2048,{"jp":[3604960,4096],"us":[3611712,4096],"eu":[3485312,4096],"sh":[3459680,4096]}], +"levels/bbh/2.rgba16.png": [32,32,2048,{"jp":[3604960,6144],"us":[3611712,6144],"eu":[3485312,6144],"sh":[3459680,6144]}], +"levels/bbh/3.rgba16.png": [32,64,4096,{"jp":[3604960,8192],"us":[3611712,8192],"eu":[3485312,8192],"sh":[3459680,8192]}], +"levels/bbh/4.rgba16.png": [16,32,1024,{"jp":[3604960,12288],"us":[3611712,12288],"eu":[3485312,12288],"sh":[3459680,12288]}], +"levels/bbh/5.rgba16.png": [32,64,4096,{"jp":[3604960,13312],"us":[3611712,13312],"eu":[3485312,13312],"sh":[3459680,13312]}], +"levels/bbh/6.rgba16.png": [16,32,1024,{"jp":[3604960,17408],"us":[3611712,17408],"eu":[3485312,17408],"sh":[3459680,17408]}], +"levels/bitdw/0.rgba16.png": [32,32,2048,{"jp":[4533568,0],"us":[4541952,0],"eu":[4415552,0],"sh":[4389920,0]}], +"levels/bitdw/1.rgba16.png": [32,32,2048,{"jp":[4533568,2048],"us":[4541952,2048],"eu":[4415552,2048],"sh":[4389920,2048]}], +"levels/bitdw/2.rgba16.png": [32,32,2048,{"jp":[4533568,4096],"us":[4541952,4096],"eu":[4415552,4096],"sh":[4389920,4096]}], +"levels/bitdw/3.rgba16.png": [32,32,2048,{"jp":[4533568,6144],"us":[4541952,6144],"eu":[4415552,6144],"sh":[4389920,6144]}], +"levels/bitfs/0.rgba16.png": [32,64,4096,{"jp":[4584464,0],"us":[4592848,0],"eu":[4466448,0],"sh":[4440816,0]}], +"levels/bitfs/1.rgba16.png": [32,32,2048,{"jp":[4584464,4096],"us":[4592848,4096],"eu":[4466448,4096],"sh":[4440816,4096]}], +"levels/bitfs/2.rgba16.png": [32,32,2048,{"jp":[4584464,6144],"us":[4592848,6144],"eu":[4466448,6144],"sh":[4440816,6144]}], +"levels/bits/0.rgba16.png": [32,64,4096,{"jp":[4629216,0],"us":[4637600,0],"eu":[4511200,0],"sh":[4485568,0]}], +"levels/bits/1.rgba16.png": [64,32,4096,{"jp":[4629216,4096],"us":[4637600,4096],"eu":[4511200,4096],"sh":[4485568,4096]}], +"levels/bits/2.rgba16.png": [32,32,2048,{"jp":[4629216,8192],"us":[4637600,8192],"eu":[4511200,8192],"sh":[4485568,8192]}], +"levels/bob/0.rgba16.png": [32,32,2048,{"jp":[4170512,0],"us":[4178608,0],"eu":[4052208,0],"sh":[4026576,0]}], +"levels/bob/1.rgba16.png": [32,32,2048,{"jp":[4170512,2048],"us":[4178608,2048],"eu":[4052208,2048],"sh":[4026576,2048]}], +"levels/bob/2.rgba16.png": [32,32,2048,{"jp":[4170512,4096],"us":[4178608,4096],"eu":[4052208,4096],"sh":[4026576,4096]}], +"levels/bob/3.rgba16.png": [32,32,2048,{"jp":[4170512,6144],"us":[4178608,6144],"eu":[4052208,6144],"sh":[4026576,6144]}], +"levels/bob/4.rgba16.png": [32,32,2048,{"jp":[4170512,8192],"us":[4178608,8192],"eu":[4052208,8192],"sh":[4026576,8192]}], +"levels/bowser_1/0.rgba16.png": [32,64,4096,{"jp":[4982976,0],"us":[4991264,0],"eu":[4870192,0],"sh":[4839232,0]}], +"levels/bowser_1/1.rgba16.png": [32,32,2048,{"jp":[4982976,4096],"us":[4991264,4096],"eu":[4870192,4096],"sh":[4839232,4096]}], +"levels/bowser_1/2.rgba16.png": [32,32,2048,{"jp":[4982976,6144],"us":[4991264,6144],"eu":[4870192,6144],"sh":[4839232,6144]}], +"levels/bowser_2/0.rgba16.png": [32,32,2048,{"jp":[5028720,0],"us":[5037008,0],"eu":[4915936,0],"sh":[4884976,0]}], +"levels/bowser_3/0.rgba16.png": [32,32,2048,{"jp":[5032864,0],"us":[5041152,0],"eu":[4920080,0],"sh":[4889120,0]}], +"levels/bowser_3/1.rgba16.png": [32,32,2048,{"jp":[5032864,2048],"us":[5041152,2048],"eu":[4920080,2048],"sh":[4889120,2048]}], +"levels/bowser_3/2.rgba16.png": [32,64,4096,{"jp":[5032864,4096],"us":[5041152,4096],"eu":[4920080,4096],"sh":[4889120,4096]}], +"levels/castle_grounds/0.rgba16.png": [32,64,4096,{"jp":[4492416,0],"us":[4500416,0],"eu":[4374016,0],"sh":[4348384,0]}], +"levels/castle_grounds/1.rgba16.png": [64,32,4096,{"jp":[4492416,4096],"us":[4500416,4096],"eu":[4374016,4096],"sh":[4348384,4096]}], +"levels/castle_grounds/2.rgba16.png": [64,32,4096,{"jp":[4492416,8192],"us":[4500416,8192],"eu":[4374016,8192],"sh":[4348384,8192]}], +"levels/castle_grounds/3.rgba16.png": [32,64,4096,{"jp":[4492416,51688],"us":[4500416,51688],"eu":[4374016,51688],"sh":[4348384,51688]}], +"levels/castle_grounds/4.rgba16.png": [32,64,4096,{"jp":[4492416,55784],"us":[4500416,55784],"eu":[4374016,55784],"sh":[4348384,55784]}], +"levels/castle_grounds/5.ia8.png": [64,32,2048,{"us":[4500416,60136],"eu":[4374016,60136],"sh":[4348384,60136]}], +"levels/castle_inside/1.rgba16.png": [32,32,2048,{"jp":[3754192,2048],"us":[3760960,2048],"eu":[3634560,2048],"sh":[3608928,2048]}], +"levels/castle_inside/10.rgba16.png": [32,32,2048,{"jp":[3754192,28672],"us":[3760960,28672],"eu":[3634560,28672],"sh":[3608928,28672]}], +"levels/castle_inside/11.rgba16.png": [32,32,2048,{"jp":[3754192,30720],"us":[3760960,30720],"eu":[3634560,30720],"sh":[3608928,30720]}], +"levels/castle_inside/12.rgba16.png": [32,32,2048,{"jp":[3754192,32768],"us":[3760960,32768],"eu":[3634560,32768],"sh":[3608928,32768]}], +"levels/castle_inside/13.rgba16.png": [32,32,2048,{"jp":[3754192,34816],"us":[3760960,34816],"eu":[3634560,34816],"sh":[3608928,34816]}], +"levels/castle_inside/14.rgba16.png": [32,32,2048,{"jp":[3754192,36864],"us":[3760960,36864],"eu":[3634560,36864],"sh":[3608928,36864]}], +"levels/castle_inside/15.rgba16.png": [32,32,2048,{"jp":[3754192,38912],"us":[3760960,38912],"eu":[3634560,38912],"sh":[3608928,38912]}], +"levels/castle_inside/16.ia16.png": [32,32,2048,{"jp":[3754192,40960],"us":[3760960,40960],"eu":[3634560,40960],"sh":[3608928,40960]}], +"levels/castle_inside/17.rgba16.png": [64,32,4096,{"jp":[3754192,43008],"us":[3760960,43008],"eu":[3634560,43008],"sh":[3608928,43008]}], +"levels/castle_inside/18.rgba16.png": [64,32,4096,{"jp":[3754192,47104],"us":[3760960,47104],"eu":[3634560,47104],"sh":[3608928,47104]}], +"levels/castle_inside/19.rgba16.png": [64,32,4096,{"jp":[3754192,51200],"us":[3760960,51200],"eu":[3634560,51200],"sh":[3608928,51200]}], +"levels/castle_inside/2.ia16.png": [32,64,4096,{"jp":[3298272,47104],"us":[3305024,47104],"eu":[3178624,47104],"sh":[3152992,47104]}], +"levels/castle_inside/20.rgba16.png": [64,32,4096,{"jp":[3754192,55296],"us":[3760960,55296],"eu":[3634560,55296],"sh":[3608928,55296]}], +"levels/castle_inside/21.rgba16.png": [64,32,4096,{"jp":[3754192,59392],"us":[3760960,59392],"eu":[3634560,59392],"sh":[3608928,59392]}], +"levels/castle_inside/22.rgba16.png": [64,32,4096,{"jp":[3754192,63488],"us":[3760960,63488],"eu":[3634560,63488],"sh":[3608928,63488]}], "levels/castle_inside/23.rgba16.png": [64,32,4096,{"jp":[3754192,67584]}], -"levels/castle_inside/23_us.rgba16.png": [64,32,4096,{"us":[3760960,67584],"eu":[3634560,67584]}], +"levels/castle_inside/23_us.rgba16.png": [64,32,4096,{"us":[3760960,67584],"eu":[3634560,67584],"sh":[3608928,67584]}], "levels/castle_inside/24.rgba16.png": [64,32,4096,{"jp":[3754192,71680]}], -"levels/castle_inside/24_us.rgba16.png": [64,32,4096,{"us":[3760960,71680],"eu":[3634560,71680]}], -"levels/castle_inside/25.rgba16.png": [64,32,4096,{"jp":[3754192,75776],"us":[3760960,75776],"eu":[3634560,75776]}], -"levels/castle_inside/26.rgba16.png": [64,32,4096,{"jp":[3754192,79872],"us":[3760960,79872],"eu":[3634560,79872]}], -"levels/castle_inside/27.rgba16.png": [64,32,4096,{"jp":[3754192,83968],"us":[3760960,83968],"eu":[3634560,83968]}], -"levels/castle_inside/28.rgba16.png": [64,32,4096,{"jp":[3754192,88064],"us":[3760960,88064],"eu":[3634560,88064]}], -"levels/castle_inside/29.rgba16.png": [32,32,2048,{"jp":[3754192,92160],"us":[3760960,92160],"eu":[3634560,92160]}], -"levels/castle_inside/3.rgba16.png": [32,64,4096,{"jp":[3754192,8192],"us":[3760960,8192],"eu":[3634560,8192]}], -"levels/castle_inside/30.rgba16.png": [32,32,2048,{"jp":[3754192,94208],"us":[3760960,94208],"eu":[3634560,94208]}], -"levels/castle_inside/31.rgba16.png": [64,32,4096,{"jp":[3754192,96256],"us":[3760960,96256],"eu":[3634560,96256]}], -"levels/castle_inside/32.rgba16.png": [64,32,4096,{"jp":[3754192,100352],"us":[3760960,100352],"eu":[3634560,100352]}], -"levels/castle_inside/33.rgba16.png": [64,32,4096,{"jp":[3754192,104448],"us":[3760960,104448],"eu":[3634560,104448]}], -"levels/castle_inside/34.rgba16.png": [64,32,4096,{"jp":[3754192,108544],"us":[3760960,108544],"eu":[3634560,108544]}], -"levels/castle_inside/35.rgba16.png": [64,32,4096,{"jp":[3754192,112640],"us":[3760960,112640],"eu":[3634560,112640]}], -"levels/castle_inside/36.rgba16.png": [64,32,4096,{"jp":[3754192,116736],"us":[3760960,116736],"eu":[3634560,116736]}], -"levels/castle_inside/37.rgba16.png": [64,32,4096,{"jp":[3754192,120832],"us":[3760960,120832],"eu":[3634560,120832]}], -"levels/castle_inside/38.rgba16.png": [64,32,4096,{"jp":[3754192,124928],"us":[3760960,124928],"eu":[3634560,124928]}], -"levels/castle_inside/39.rgba16.png": [64,32,4096,{"jp":[3754192,129024],"us":[3760960,129024],"eu":[3634560,129024]}], -"levels/castle_inside/4.rgba16.png": [32,32,2048,{"jp":[3754192,12288],"us":[3760960,12288],"eu":[3634560,12288]}], -"levels/castle_inside/40.rgba16.png": [64,32,4096,{"jp":[3754192,133120],"us":[3760960,133120],"eu":[3634560,133120]}], -"levels/castle_inside/5.rgba16.png": [32,64,4096,{"jp":[3754192,14336],"us":[3760960,14336],"eu":[3634560,14336]}], -"levels/castle_inside/6.rgba16.png": [32,64,4096,{"jp":[3754192,18432],"us":[3760960,18432],"eu":[3634560,18432]}], -"levels/castle_inside/7.rgba16.png": [32,32,2048,{"jp":[3754192,22528],"us":[3760960,22528],"eu":[3634560,22528]}], -"levels/castle_inside/8.rgba16.png": [32,32,2048,{"jp":[3754192,24576],"us":[3760960,24576],"eu":[3634560,24576]}], -"levels/castle_inside/9.rgba16.png": [32,32,2048,{"jp":[3754192,26624],"us":[3760960,26624],"eu":[3634560,26624]}], -"levels/castle_inside/castle_light.ia16.png": [32,32,2048,{"jp":[3432432,47104],"us":[3439184,47104],"eu":[3312784,47104]}], -"levels/ccm/0.rgba16.png": [32,32,2048,{"jp":[3677936,0],"us":[3684688,0],"eu":[3558288,0]}], -"levels/ccm/1.rgba16.png": [32,4,256,{"jp":[3677936,2048],"us":[3684688,2048],"eu":[3558288,2048]}], -"levels/ccm/10.rgba16.png": [32,32,2048,{"jp":[3677936,17152],"us":[3684688,17152],"eu":[3558288,17152]}], -"levels/ccm/11.rgba16.png": [32,32,2048,{"jp":[3677936,19200],"us":[3684688,19200],"eu":[3558288,19200]}], -"levels/ccm/12.rgba16.png": [32,32,2048,{"jp":[3677936,72024],"us":[3684688,72024],"eu":[3558288,72024]}], -"levels/ccm/2.rgba16.png": [32,32,2048,{"jp":[3677936,2304],"us":[3684688,2304],"eu":[3558288,2304]}], -"levels/ccm/3.rgba16.png": [32,32,2048,{"jp":[3677936,4352],"us":[3684688,4352],"eu":[3558288,4352]}], -"levels/ccm/4.rgba16.png": [32,32,2048,{"jp":[3677936,6400],"us":[3684688,6400],"eu":[3558288,6400]}], -"levels/ccm/5.rgba16.png": [32,32,2048,{"jp":[1436272,48240],"us":[1443440,48240],"eu":[1315408,48240]}], -"levels/ccm/6.rgba16.png": [32,32,2048,{"jp":[1436272,46192],"us":[1443440,46192],"eu":[1315408,46192]}], -"levels/ccm/7.rgba16.png": [32,32,2048,{"jp":[3677936,12544],"us":[3684688,12544],"eu":[3558288,12544]}], -"levels/ccm/8.ia16.png": [16,16,512,{"jp":[3677936,14592],"us":[3684688,14592],"eu":[3558288,14592]}], -"levels/ccm/9.ia16.png": [32,32,2048,{"jp":[3677936,15104],"us":[3684688,15104],"eu":[3558288,15104]}], -"levels/cotmc/0.rgba16.png": [64,32,4096,{"jp":[4939888,0],"us":[4948176,0],"eu":[4827104,0]}], -"levels/cotmc/1.rgba16.png": [32,32,2048,{"jp":[4939888,4096],"us":[4948176,4096],"eu":[4827104,4096]}], -"levels/cotmc/2.rgba16.png": [32,32,2048,{"jp":[4939888,6144],"us":[4948176,6144],"eu":[4827104,6144]}], -"levels/cotmc/3.rgba16.png": [32,32,2048,{"jp":[4939888,8192],"us":[4948176,8192],"eu":[4827104,8192]}], -"levels/cotmc/4.rgba16.png": [64,16,2048,{"jp":[4939888,10240],"us":[4948176,10240],"eu":[4827104,10240]}], -"levels/ddd/0.rgba16.png": [32,64,4096,{"jp":[4765904,0],"us":[4774192,0],"eu":[4647792,0]}], -"levels/ddd/1.rgba16.png": [32,32,2048,{"jp":[3432432,4096],"us":[3439184,4096],"eu":[3312784,4096]}], -"levels/ddd/2.rgba16.png": [32,32,2048,{"jp":[4765904,6144],"us":[4774192,6144],"eu":[4647792,6144]}], -"levels/ddd/3.rgba16.png": [64,32,4096,{"jp":[4765904,8192],"us":[4774192,8192],"eu":[4647792,8192]}], -"levels/ddd/4.rgba16.png": [32,32,2048,{"jp":[4765904,12288],"us":[4774192,12288],"eu":[4647792,12288]}], +"levels/castle_inside/24_us.rgba16.png": [64,32,4096,{"us":[3760960,71680],"eu":[3634560,71680],"sh":[3608928,71680]}], +"levels/castle_inside/25.rgba16.png": [64,32,4096,{"jp":[3754192,75776],"us":[3760960,75776],"eu":[3634560,75776],"sh":[3608928,75776]}], +"levels/castle_inside/26.rgba16.png": [64,32,4096,{"jp":[3754192,79872],"us":[3760960,79872],"eu":[3634560,79872],"sh":[3608928,79872]}], +"levels/castle_inside/27.rgba16.png": [64,32,4096,{"jp":[3754192,83968],"us":[3760960,83968],"eu":[3634560,83968],"sh":[3608928,83968]}], +"levels/castle_inside/28.rgba16.png": [64,32,4096,{"jp":[3754192,88064],"us":[3760960,88064],"eu":[3634560,88064],"sh":[3608928,88064]}], +"levels/castle_inside/29.rgba16.png": [32,32,2048,{"jp":[3754192,92160],"us":[3760960,92160],"eu":[3634560,92160],"sh":[3608928,92160]}], +"levels/castle_inside/3.rgba16.png": [32,64,4096,{"jp":[3754192,8192],"us":[3760960,8192],"eu":[3634560,8192],"sh":[3608928,8192]}], +"levels/castle_inside/30.rgba16.png": [32,32,2048,{"jp":[3754192,94208],"us":[3760960,94208],"eu":[3634560,94208],"sh":[3608928,94208]}], +"levels/castle_inside/31.rgba16.png": [64,32,4096,{"jp":[3754192,96256],"us":[3760960,96256],"eu":[3634560,96256],"sh":[3608928,96256]}], +"levels/castle_inside/32.rgba16.png": [64,32,4096,{"jp":[3754192,100352],"us":[3760960,100352],"eu":[3634560,100352],"sh":[3608928,100352]}], +"levels/castle_inside/33.rgba16.png": [64,32,4096,{"jp":[3754192,104448],"us":[3760960,104448],"eu":[3634560,104448],"sh":[3608928,104448]}], +"levels/castle_inside/34.rgba16.png": [64,32,4096,{"jp":[3754192,108544],"us":[3760960,108544],"eu":[3634560,108544],"sh":[3608928,108544]}], +"levels/castle_inside/35.rgba16.png": [64,32,4096,{"jp":[3754192,112640],"us":[3760960,112640],"eu":[3634560,112640],"sh":[3608928,112640]}], +"levels/castle_inside/36.rgba16.png": [64,32,4096,{"jp":[3754192,116736],"us":[3760960,116736],"eu":[3634560,116736],"sh":[3608928,116736]}], +"levels/castle_inside/37.rgba16.png": [64,32,4096,{"jp":[3754192,120832],"us":[3760960,120832],"eu":[3634560,120832],"sh":[3608928,120832]}], +"levels/castle_inside/38.rgba16.png": [64,32,4096,{"jp":[3754192,124928],"us":[3760960,124928],"eu":[3634560,124928],"sh":[3608928,124928]}], +"levels/castle_inside/39.rgba16.png": [64,32,4096,{"jp":[3754192,129024],"us":[3760960,129024],"eu":[3634560,129024],"sh":[3608928,129024]}], +"levels/castle_inside/4.rgba16.png": [32,32,2048,{"jp":[3754192,12288],"us":[3760960,12288],"eu":[3634560,12288],"sh":[3608928,12288]}], +"levels/castle_inside/40.rgba16.png": [64,32,4096,{"jp":[3754192,133120],"us":[3760960,133120],"eu":[3634560,133120],"sh":[3608928,133120]}], +"levels/castle_inside/5.rgba16.png": [32,64,4096,{"jp":[3754192,14336],"us":[3760960,14336],"eu":[3634560,14336],"sh":[3608928,14336]}], +"levels/castle_inside/6.rgba16.png": [32,64,4096,{"jp":[3754192,18432],"us":[3760960,18432],"eu":[3634560,18432],"sh":[3608928,18432]}], +"levels/castle_inside/7.rgba16.png": [32,32,2048,{"jp":[3754192,22528],"us":[3760960,22528],"eu":[3634560,22528],"sh":[3608928,22528]}], +"levels/castle_inside/8.rgba16.png": [32,32,2048,{"jp":[3754192,24576],"us":[3760960,24576],"eu":[3634560,24576],"sh":[3608928,24576]}], +"levels/castle_inside/9.rgba16.png": [32,32,2048,{"jp":[3754192,26624],"us":[3760960,26624],"eu":[3634560,26624],"sh":[3608928,26624]}], +"levels/castle_inside/castle_light.ia16.png": [32,32,2048,{"jp":[3432432,47104],"us":[3439184,47104],"eu":[3312784,47104],"sh":[3287152,47104]}], +"levels/ccm/0.rgba16.png": [32,32,2048,{"jp":[3677936,0],"us":[3684688,0],"eu":[3558288,0],"sh":[3532656,0]}], +"levels/ccm/1.rgba16.png": [32,4,256,{"jp":[3677936,2048],"us":[3684688,2048],"eu":[3558288,2048],"sh":[3532656,2048]}], +"levels/ccm/10.rgba16.png": [32,32,2048,{"jp":[3677936,17152],"us":[3684688,17152],"eu":[3558288,17152],"sh":[3532656,17152]}], +"levels/ccm/11.rgba16.png": [32,32,2048,{"jp":[3677936,19200],"us":[3684688,19200],"eu":[3558288,19200],"sh":[3532656,19200]}], +"levels/ccm/12.rgba16.png": [32,32,2048,{"jp":[3677936,72024],"us":[3684688,72024],"eu":[3558288,72024],"sh":[3532656,72024]}], +"levels/ccm/2.rgba16.png": [32,32,2048,{"jp":[3677936,2304],"us":[3684688,2304],"eu":[3558288,2304],"sh":[3532656,2304]}], +"levels/ccm/3.rgba16.png": [32,32,2048,{"jp":[3677936,4352],"us":[3684688,4352],"eu":[3558288,4352],"sh":[3532656,4352]}], +"levels/ccm/4.rgba16.png": [32,32,2048,{"jp":[3677936,6400],"us":[3684688,6400],"eu":[3558288,6400],"sh":[3532656,6400]}], +"levels/ccm/5.rgba16.png": [32,32,2048,{"jp":[1436272,48240],"us":[1443440,48240],"eu":[1315408,48240],"sh":[1291920,48240]}], +"levels/ccm/6.rgba16.png": [32,32,2048,{"jp":[1436272,46192],"us":[1443440,46192],"eu":[1315408,46192],"sh":[1291920,46192]}], +"levels/ccm/7.rgba16.png": [32,32,2048,{"jp":[3677936,12544],"us":[3684688,12544],"eu":[3558288,12544],"sh":[3532656,12544]}], +"levels/ccm/8.ia16.png": [16,16,512,{"jp":[3677936,14592],"us":[3684688,14592],"eu":[3558288,14592],"sh":[3532656,14592]}], +"levels/ccm/9.ia16.png": [32,32,2048,{"jp":[3677936,15104],"us":[3684688,15104],"eu":[3558288,15104],"sh":[3532656,15104]}], +"levels/cotmc/0.rgba16.png": [64,32,4096,{"jp":[4939888,0],"us":[4948176,0],"eu":[4827104,0],"sh":[4796144,0]}], +"levels/cotmc/1.rgba16.png": [32,32,2048,{"jp":[4939888,4096],"us":[4948176,4096],"eu":[4827104,4096],"sh":[4796144,4096]}], +"levels/cotmc/2.rgba16.png": [32,32,2048,{"jp":[4939888,6144],"us":[4948176,6144],"eu":[4827104,6144],"sh":[4796144,6144]}], +"levels/cotmc/3.rgba16.png": [32,32,2048,{"jp":[4939888,8192],"us":[4948176,8192],"eu":[4827104,8192],"sh":[4796144,8192]}], +"levels/cotmc/4.rgba16.png": [64,16,2048,{"jp":[4939888,10240],"us":[4948176,10240],"eu":[4827104,10240],"sh":[4796144,10240]}], +"levels/ddd/0.rgba16.png": [32,64,4096,{"jp":[4765904,0],"us":[4774192,0],"eu":[4647792,0],"sh":[4622160,0]}], +"levels/ddd/1.rgba16.png": [32,32,2048,{"jp":[3432432,4096],"us":[3439184,4096],"eu":[3312784,4096],"sh":[3287152,4096]}], +"levels/ddd/2.rgba16.png": [32,32,2048,{"jp":[4765904,6144],"us":[4774192,6144],"eu":[4647792,6144],"sh":[4622160,6144]}], +"levels/ddd/3.rgba16.png": [64,32,4096,{"jp":[4765904,8192],"us":[4774192,8192],"eu":[4647792,8192],"sh":[4622160,8192]}], +"levels/ddd/4.rgba16.png": [32,32,2048,{"jp":[4765904,12288],"us":[4774192,12288],"eu":[4647792,12288],"sh":[4622160,12288]}], "levels/ending/cake.png": [153600,{"jp":[4834992,0],"us":[4843280,0]}], "levels/ending/cake_eu.png": [143360,{"eu":[4716880,0]}], "levels/ending/eu_023000.rgba16.png": [64,32,4096,{"eu":[4716880,143360]}], @@ -586,229 +586,229 @@ "levels/ending/eu_026000.rgba16.png": [64,32,4096,{"eu":[4716880,155648]}], "levels/ending/eu_027000.rgba16.png": [64,32,4096,{"eu":[4716880,159744]}], "levels/ending/eu_028000.rgba16.png": [64,32,4096,{"eu":[4716880,163840]}], -"levels/hmc/0.rgba16.png": [32,64,4096,{"jp":[3993136,0],"us":[4001216,0],"eu":[3874816,0]}], -"levels/hmc/1.rgba16.png": [32,64,4096,{"jp":[3993136,4096],"us":[4001216,4096],"eu":[3874816,4096]}], -"levels/hmc/2.rgba16.png": [32,64,4096,{"jp":[3993136,8192],"us":[4001216,8192],"eu":[3874816,8192]}], -"levels/hmc/3.rgba16.png": [32,32,2048,{"jp":[3993136,12288],"us":[4001216,12288],"eu":[3874816,12288]}], -"levels/hmc/4.rgba16.png": [32,32,2048,{"jp":[3993136,14336],"us":[4001216,14336],"eu":[3874816,14336]}], -"levels/hmc/5.rgba16.png": [32,32,2048,{"jp":[3993136,16384],"us":[4001216,16384],"eu":[3874816,16384]}], -"levels/hmc/6.rgba16.png": [32,64,4096,{"jp":[3993136,18432],"us":[4001216,18432],"eu":[3874816,18432]}], -"levels/hmc/7.rgba16.png": [32,32,2048,{"jp":[3754192,92160],"us":[3760960,92160],"eu":[3634560,92160]}], -"levels/intro/0.rgba16.png": [32,32,2048,{"jp":[2524448,32416],"us":[2532256,32416],"eu":[2401056,32416]}], -"levels/intro/1.rgba16.png": [32,32,2048,{"jp":[2524448,34464],"us":[2532256,34464],"eu":[2401056,34464]}], +"levels/hmc/0.rgba16.png": [32,64,4096,{"jp":[3993136,0],"us":[4001216,0],"eu":[3874816,0],"sh":[3849184,0]}], +"levels/hmc/1.rgba16.png": [32,64,4096,{"jp":[3993136,4096],"us":[4001216,4096],"eu":[3874816,4096],"sh":[3849184,4096]}], +"levels/hmc/2.rgba16.png": [32,64,4096,{"jp":[3993136,8192],"us":[4001216,8192],"eu":[3874816,8192],"sh":[3849184,8192]}], +"levels/hmc/3.rgba16.png": [32,32,2048,{"jp":[3993136,12288],"us":[4001216,12288],"eu":[3874816,12288],"sh":[3849184,12288]}], +"levels/hmc/4.rgba16.png": [32,32,2048,{"jp":[3993136,14336],"us":[4001216,14336],"eu":[3874816,14336],"sh":[3849184,14336]}], +"levels/hmc/5.rgba16.png": [32,32,2048,{"jp":[3993136,16384],"us":[4001216,16384],"eu":[3874816,16384],"sh":[3849184,16384]}], +"levels/hmc/6.rgba16.png": [32,64,4096,{"jp":[3993136,18432],"us":[4001216,18432],"eu":[3874816,18432],"sh":[3849184,18432]}], +"levels/hmc/7.rgba16.png": [32,32,2048,{"jp":[3754192,92160],"us":[3760960,92160],"eu":[3634560,92160],"sh":[3608928,92160]}], +"levels/intro/0.rgba16.png": [32,32,2048,{"jp":[2524448,32416],"us":[2532256,32416],"eu":[2401056,32416],"sh":[2377888,32416]}], +"levels/intro/1.rgba16.png": [32,32,2048,{"jp":[2524448,34464],"us":[2532256,34464],"eu":[2401056,34464],"sh":[2377888,34464]}], "levels/intro/2_copyright.rgba16.png": [128,16,4096,{"jp":[2524448,46240],"us":[2532256,46240]}], -"levels/intro/2_eu_copyright.rgba16.png": [128,16,4096,{"eu":[2401056,46240]}], +"levels/intro/2_eu_copyright.rgba16.png": [128,16,4096,{"eu":[2401056,46240],"sh":[2377888,46240]}], "levels/intro/3_eu_tm.rgba16.png": [16,16,512,{"eu":[2401056,50336]}], "levels/intro/3_tm.rgba16.png": [16,16,512,{"jp":[2524448,50336],"us":[2532256,50336]}], -"levels/jrb/0.rgba16.png": [32,32,2048,{"jp":[3432432,4096],"us":[3439184,4096],"eu":[3312784,4096]}], -"levels/jrb/1.rgba16.png": [64,32,4096,{"jp":[4294592,2048],"us":[4302688,2048],"eu":[4176288,2048]}], -"levels/jrb/2.rgba16.png": [32,32,2048,{"jp":[4294592,6144],"us":[4302688,6144],"eu":[4176288,6144]}], -"levels/jrb/3.rgba16.png": [32,32,2048,{"jp":[4294592,8192],"us":[4302688,8192],"eu":[4176288,8192]}], -"levels/lll/0.rgba16.png": [32,32,2048,{"jp":[4678592,0],"us":[4687008,0],"eu":[4560608,0]}], -"levels/lll/1.rgba16.png": [32,32,2048,{"jp":[4678592,2048],"us":[4687008,2048],"eu":[4560608,2048]}], -"levels/lll/10.rgba16.png": [32,32,2048,{"jp":[4678592,20480],"us":[4687008,20480],"eu":[4560608,20480]}], -"levels/lll/11.rgba16.png": [32,32,2048,{"jp":[4678592,22528],"us":[4687008,22528],"eu":[4560608,22528]}], -"levels/lll/12.rgba16.png": [32,32,2048,{"jp":[4678592,24576],"us":[4687008,24576],"eu":[4560608,24576]}], -"levels/lll/13.rgba16.png": [32,32,2048,{"jp":[4678592,26624],"us":[4687008,26624],"eu":[4560608,26624]}], -"levels/lll/14.rgba16.png": [32,32,2048,{"jp":[4678592,28672],"us":[4687008,28672],"eu":[4560608,28672]}], -"levels/lll/15.rgba16.png": [32,32,2048,{"jp":[4678592,30720],"us":[4687008,30720],"eu":[4560608,30720]}], -"levels/lll/16.rgba16.png": [32,32,2048,{"jp":[4678592,32768],"us":[4687008,32768],"eu":[4560608,32768]}], -"levels/lll/17.rgba16.png": [32,32,2048,{"jp":[4678592,34816],"us":[4687008,34816],"eu":[4560608,34816]}], -"levels/lll/18.rgba16.png": [32,32,2048,{"jp":[4678592,36864],"us":[4687008,36864],"eu":[4560608,36864]}], -"levels/lll/19.rgba16.png": [32,32,2048,{"jp":[4678592,38912],"us":[4687008,38912],"eu":[4560608,38912]}], -"levels/lll/2.rgba16.png": [32,32,2048,{"jp":[4678592,4096],"us":[4687008,4096],"eu":[4560608,4096]}], -"levels/lll/20.rgba16.png": [32,32,2048,{"jp":[4678592,40960],"us":[4687008,40960],"eu":[4560608,40960]}], -"levels/lll/21.rgba16.png": [32,32,2048,{"jp":[4678592,43008],"us":[4687008,43008],"eu":[4560608,43008]}], -"levels/lll/22.rgba16.png": [32,32,2048,{"jp":[4678592,45056],"us":[4687008,45056],"eu":[4560608,45056]}], -"levels/lll/23.rgba16.png": [32,32,2048,{"jp":[4678592,47104],"us":[4687008,47104],"eu":[4560608,47104]}], -"levels/lll/24.rgba16.png": [32,32,2048,{"jp":[4678592,49152],"us":[4687008,49152],"eu":[4560608,49152]}], -"levels/lll/25.rgba16.png": [32,32,2048,{"jp":[4678592,51200],"us":[4687008,51200],"eu":[4560608,51200]}], -"levels/lll/26.rgba16.png": [16,16,512,{"jp":[4678592,53248],"us":[4687008,53248],"eu":[4560608,53248]}], -"levels/lll/27.ia16.png": [16,16,512,{"jp":[3677936,14592],"us":[3684688,14592],"eu":[3558288,14592]}], -"levels/lll/28.rgba16.png": [32,32,2048,{"jp":[4678592,54272],"us":[4687008,54272],"eu":[4560608,54272]}], -"levels/lll/29.rgba16.png": [32,32,2048,{"jp":[4678592,56320],"us":[4687008,56320],"eu":[4560608,56320]}], -"levels/lll/3.rgba16.png": [32,32,2048,{"jp":[4678592,6144],"us":[4687008,6144],"eu":[4560608,6144]}], -"levels/lll/30.rgba16.png": [32,32,2048,{"jp":[4678592,58368],"us":[4687008,58368],"eu":[4560608,58368]}], -"levels/lll/31.rgba16.png": [32,32,2048,{"jp":[4678592,60416],"us":[4687008,60416],"eu":[4560608,60416]}], -"levels/lll/32.rgba16.png": [64,16,2048,{"jp":[4678592,62464],"us":[4687008,62464],"eu":[4560608,62464]}], -"levels/lll/4.rgba16.png": [32,32,2048,{"jp":[4678592,8192],"us":[4687008,8192],"eu":[4560608,8192]}], -"levels/lll/5.rgba16.png": [32,32,2048,{"jp":[4678592,10240],"us":[4687008,10240],"eu":[4560608,10240]}], -"levels/lll/6.rgba16.png": [32,32,2048,{"jp":[4678592,12288],"us":[4687008,12288],"eu":[4560608,12288]}], -"levels/lll/7.rgba16.png": [32,32,2048,{"jp":[3262320,6144],"us":[3269072,6144],"eu":[3142672,6144]}], -"levels/lll/8.rgba16.png": [32,32,2048,{"jp":[4678592,16384],"us":[4687008,16384],"eu":[4560608,16384]}], -"levels/lll/9.rgba16.png": [32,32,2048,{"jp":[4678592,18432],"us":[4687008,18432],"eu":[4560608,18432]}], -"levels/menu/main_menu_seg7.00018.rgba16.png": [32,32,2048,{"jp":[2770736,24],"us":[2778544,24],"eu":[2647072,24]}], -"levels/menu/main_menu_seg7.00818.rgba16.png": [32,32,2048,{"jp":[2770736,2072],"us":[2778544,2072],"eu":[2647072,2072]}], -"levels/menu/main_menu_seg7.01018.rgba16.png": [64,32,4096,{"jp":[2770736,4120],"us":[2778544,4120],"eu":[2647072,4120]}], -"levels/menu/main_menu_seg7.02018.rgba16.png": [64,32,4096,{"jp":[2770736,8216],"us":[2778544,8216],"eu":[2647072,8216]}], -"levels/menu/main_menu_seg7.03468.rgba16.png": [32,32,2048,{"jp":[2770736,13416],"us":[2778544,13416],"eu":[2647072,13416]}], -"levels/menu/main_menu_seg7.03C68.rgba16.png": [32,32,2048,{"jp":[2770736,15464],"us":[2778544,15464],"eu":[2647072,15464]}], -"levels/menu/main_menu_seg7.04468.rgba16.png": [32,32,2048,{"jp":[2770736,17512],"us":[2778544,17512],"eu":[2647072,17512]}], -"levels/menu/main_menu_seg7.04C68.rgba16.png": [32,32,2048,{"jp":[2770736,19560],"us":[2778544,19560],"eu":[2647072,19560]}], -"levels/menu/main_menu_seg7.05468.rgba16.png": [32,32,2048,{"jp":[2770736,21608],"us":[2778544,21608],"eu":[2647072,21608]}], -"levels/menu/main_menu_seg7.06328.rgba16.png": [32,32,2048,{"jp":[2770736,25384],"us":[2778544,25384],"eu":[2647072,25384]}], -"levels/menu/main_menu_seg7.06B28.rgba16.png": [32,32,2048,{"jp":[2770736,27432],"us":[2778544,27432],"eu":[2647072,27432]}], -"levels/menu/main_menu_seg7.073D0.rgba16.png": [16,16,512,{"jp":[2770736,29648],"us":[2778544,29648],"eu":[2647072,29648]}], -"levels/menu/main_menu_seg7.075D0.rgba16.png": [16,16,512,{"jp":[2770736,30160],"us":[2778544,30160],"eu":[2647072,30160]}], -"levels/menu/main_menu_seg7.077D0.rgba16.png": [16,16,512,{"jp":[2770736,30672],"us":[2778544,30672],"eu":[2647072,30672]}], -"levels/menu/main_menu_seg7.079D0.rgba16.png": [16,16,512,{"jp":[2770736,31184],"us":[2778544,31184],"eu":[2647072,31184]}], -"levels/menu/main_menu_seg7.07BD0.rgba16.png": [16,16,512,{"jp":[2770736,31696],"us":[2778544,31696],"eu":[2647072,31696]}], -"levels/menu/main_menu_seg7.07DD0.rgba16.png": [16,16,512,{"jp":[2770736,32208],"us":[2778544,32208],"eu":[2647072,32208]}], -"levels/menu/main_menu_seg7.07FD0.rgba16.png": [16,16,512,{"jp":[2770736,32720],"us":[2778544,32720],"eu":[2647072,32720]}], -"levels/menu/main_menu_seg7.081D0.rgba16.png": [16,16,512,{"jp":[2770736,33232],"us":[2778544,33232],"eu":[2647072,33232]}], -"levels/menu/main_menu_seg7.083D0.rgba16.png": [16,16,512,{"jp":[2770736,33744],"us":[2778544,33744],"eu":[2647072,33744]}], -"levels/menu/main_menu_seg7.085D0.rgba16.png": [16,16,512,{"jp":[2770736,34256],"us":[2778544,34256],"eu":[2647072,34256]}], -"levels/menu/main_menu_seg7.087D0.rgba16.png": [16,16,512,{"jp":[2770736,34768],"us":[2778544,34768],"eu":[2647072,34768]}], -"levels/menu/main_menu_seg7.089D0.rgba16.png": [16,16,512,{"jp":[2770736,35280],"us":[2778544,35280],"eu":[2647072,35280]}], -"levels/menu/main_menu_seg7.08BD0.rgba16.png": [16,16,512,{"jp":[2770736,35792],"us":[2778544,35792],"eu":[2647072,35792]}], -"levels/menu/main_menu_seg7.08DD0.rgba16.png": [16,16,512,{"jp":[2770736,36304],"us":[2778544,36304],"eu":[2647072,36304]}], -"levels/menu/main_menu_seg7.08FD0.rgba16.png": [16,16,512,{"jp":[2770736,36816],"us":[2778544,36816],"eu":[2647072,36816]}], -"levels/menu/main_menu_seg7.091D0.rgba16.png": [16,16,512,{"jp":[2770736,37328],"us":[2778544,37328],"eu":[2647072,37328]}], -"levels/menu/main_menu_seg7.093D0.rgba16.png": [16,16,512,{"jp":[2770736,37840],"us":[2778544,37840],"eu":[2647072,37840]}], -"levels/menu/main_menu_seg7.095D0.rgba16.png": [16,16,512,{"jp":[2770736,38352],"us":[2778544,38352],"eu":[2647072,38352]}], -"levels/menu/main_menu_seg7.097D0.rgba16.png": [16,16,512,{"jp":[2770736,38864],"us":[2778544,38864],"eu":[2647072,38864]}], -"levels/menu/main_menu_seg7.099D0.rgba16.png": [16,16,512,{"jp":[2770736,39376],"us":[2778544,39376],"eu":[2647072,39376]}], -"levels/menu/main_menu_seg7.09BD0.rgba16.png": [16,16,512,{"jp":[2770736,39888],"us":[2778544,39888],"eu":[2647072,39888]}], -"levels/menu/main_menu_seg7.09DD0.rgba16.png": [16,16,512,{"jp":[2770736,40400],"us":[2778544,40400],"eu":[2647072,40400]}], -"levels/menu/main_menu_seg7.09FD0.rgba16.png": [16,16,512,{"jp":[2770736,40912],"us":[2778544,40912],"eu":[2647072,40912]}], -"levels/menu/main_menu_seg7.0A1D0.rgba16.png": [16,16,512,{"jp":[1078992,20480],"us":[2778544,41424],"eu":[2647072,41424]}], -"levels/menu/main_menu_seg7.0A3D0.rgba16.png": [16,16,512,{"jp":[2770736,41936],"us":[2778544,41936],"eu":[2647072,41936]}], -"levels/menu/main_menu_seg7.0A5D0.rgba16.png": [16,16,512,{"jp":[2770736,42448],"us":[2778544,42448],"eu":[2647072,42448]}], -"levels/menu/main_menu_seg7.0A7D0.rgba16.png": [16,16,512,{"jp":[2770736,42960],"us":[2778544,42960],"eu":[2647072,42960]}], -"levels/menu/main_menu_seg7.0A9D0.rgba16.png": [16,16,512,{"jp":[2770736,43472],"us":[2778544,43472],"eu":[2647072,43472]}], -"levels/menu/main_menu_seg7.0AC48.ia8.png": [8,8,64,{"jp":[2770736,44104]}], -"levels/menu/main_menu_seg7.0AC88.ia8.png": [8,8,64,{"jp":[2770736,44168]}], -"levels/menu/main_menu_seg7.0ACC8.ia8.png": [8,8,64,{"jp":[2770736,44232]}], -"levels/menu/main_menu_seg7.0AD08.ia8.png": [8,8,64,{"jp":[2770736,44296]}], -"levels/menu/main_menu_seg7.0AD48.ia8.png": [8,8,64,{"jp":[2770736,44360]}], -"levels/menu/main_menu_seg7.0AD88.ia8.png": [8,8,64,{"jp":[2770736,44424]}], -"levels/menu/main_menu_seg7.0ADC8.ia8.png": [8,8,64,{"jp":[2770736,44488]}], -"levels/menu/main_menu_seg7.0AE08.ia8.png": [8,8,64,{"jp":[2770736,44552]}], -"levels/menu/main_menu_seg7.0AE48.ia8.png": [8,8,64,{"jp":[2770736,44616]}], -"levels/menu/main_menu_seg7.0AE88.ia8.png": [8,8,64,{"jp":[2770736,44680]}], -"levels/menu/main_menu_seg7.0AEC8.ia8.png": [8,8,64,{"jp":[2770736,44744]}], -"levels/menu/main_menu_seg7.0AF08.ia8.png": [8,8,64,{"jp":[2770736,44808]}], -"levels/menu/main_menu_seg7.0AF48.ia8.png": [8,8,64,{"jp":[2770736,44872]}], -"levels/menu/main_menu_seg7.0AF88.ia8.png": [8,8,64,{"jp":[2770736,44936]}], -"levels/menu/main_menu_seg7.0AFC8.ia8.png": [8,8,64,{"jp":[2770736,45000]}], -"levels/menu/main_menu_seg7.0B008.ia8.png": [8,8,64,{"jp":[2770736,45064]}], -"levels/menu/main_menu_seg7.0B048.ia8.png": [8,8,64,{"jp":[2770736,45128]}], -"levels/menu/main_menu_seg7.0B088.ia8.png": [8,8,64,{"jp":[2770736,45192]}], -"levels/menu/main_menu_seg7.0B0C8.ia8.png": [8,8,64,{"jp":[2770736,45256]}], -"levels/menu/main_menu_seg7.0B108.ia8.png": [8,8,64,{"jp":[2770736,45320]}], -"levels/menu/main_menu_seg7.0B148.ia8.png": [8,8,64,{"jp":[2770736,45384]}], -"levels/menu/main_menu_seg7.0B188.ia8.png": [8,8,64,{"jp":[2770736,45448]}], -"levels/menu/main_menu_seg7.0B1C8.ia8.png": [8,8,64,{"jp":[2770736,45512]}], -"levels/menu/main_menu_seg7.0B208.ia8.png": [8,8,64,{"jp":[2770736,45576]}], -"levels/menu/main_menu_seg7.0B248.ia8.png": [8,8,64,{"jp":[2770736,45640]}], -"levels/menu/main_menu_seg7.0B288.ia8.png": [8,8,64,{"jp":[2770736,45704]}], -"levels/menu/main_menu_seg7.0B2C8.ia8.png": [8,8,64,{"jp":[2770736,45768]}], -"levels/menu/main_menu_seg7.0B308.ia8.png": [8,8,64,{"jp":[2770736,45832]}], -"levels/menu/main_menu_seg7.0B348.ia8.png": [8,8,64,{"jp":[2770736,45896]}], -"levels/menu/main_menu_seg7.0B388.ia8.png": [8,8,64,{"jp":[2770736,45960]}], -"levels/menu/main_menu_seg7.0B3C8.ia8.png": [8,8,64,{"jp":[2770736,46024]}], -"levels/menu/main_menu_seg7.0B408.ia8.png": [8,8,64,{"jp":[2770736,46088]}], -"levels/menu/main_menu_seg7.0B448.ia8.png": [8,8,64,{"jp":[2770736,46152]}], -"levels/menu/main_menu_seg7.0B488.ia8.png": [8,8,64,{"jp":[2770736,46216]}], -"levels/menu/main_menu_seg7.0B4C8.ia8.png": [8,8,64,{"jp":[2770736,46280]}], -"levels/menu/main_menu_seg7.0B508.ia8.png": [8,8,64,{"jp":[2770736,46344]}], -"levels/menu/main_menu_seg7.0B548.ia8.png": [8,8,64,{"jp":[2770736,46408]}], -"levels/menu/main_menu_seg7.0B588.ia8.png": [8,8,64,{"jp":[2770736,46472]}], -"levels/menu/main_menu_seg7.0B5C8.ia8.png": [8,8,64,{"jp":[2770736,46536]}], -"levels/menu/main_menu_seg7.0B608.ia8.png": [8,8,64,{"jp":[2770736,46600]}], -"levels/menu/main_menu_seg7.0B648.ia8.png": [8,8,64,{"jp":[2770736,46664]}], -"levels/menu/main_menu_seg7.0B688.ia8.png": [8,8,64,{"jp":[2770736,46728]}], -"levels/menu/main_menu_seg7.0B6C8.ia8.png": [8,8,64,{"jp":[2770736,46792]}], -"levels/menu/main_menu_seg7.0B708.ia8.png": [8,8,64,{"jp":[2770736,46856]}], -"levels/menu/main_menu_seg7.0B748.ia8.png": [8,8,64,{"jp":[2770736,46920]}], -"levels/menu/main_menu_seg7.0B788.ia8.png": [8,8,64,{"jp":[2770736,46984]}], -"levels/menu/main_menu_seg7.0B7C8.ia8.png": [8,8,64,{"jp":[2770736,47048]}], -"levels/menu/main_menu_seg7.0B808.ia8.png": [8,8,64,{"jp":[2770736,47112]}], -"levels/menu/main_menu_seg7.0B848.ia8.png": [8,8,64,{"jp":[2770736,47176]}], -"levels/menu/main_menu_seg7.0B888.ia8.png": [8,8,64,{"jp":[2770736,47240]}], -"levels/menu/main_menu_seg7.0B8C8.ia8.png": [8,8,64,{"jp":[2770736,47304]}], -"levels/menu/main_menu_seg7.0B908.ia8.png": [8,8,64,{"jp":[2770736,47368]}], -"levels/menu/main_menu_seg7.0B948.ia8.png": [8,8,64,{"jp":[2770736,47432]}], -"levels/menu/main_menu_seg7.0B988.ia8.png": [8,8,64,{"jp":[2770736,47496]}], -"levels/menu/main_menu_seg7.0B9C8.ia8.png": [8,8,64,{"jp":[2770736,47560]}], -"levels/menu/main_menu_seg7.0BA08.ia8.png": [8,8,64,{"jp":[2770736,47624]}], -"levels/menu/main_menu_seg7.0BA48.ia8.png": [8,8,64,{"jp":[2770736,47688]}], -"levels/menu/main_menu_seg7.0BA88.ia8.png": [8,8,64,{"jp":[2770736,47752]}], -"levels/menu/main_menu_seg7.0BAC8.ia8.png": [8,8,64,{"jp":[2770736,47816]}], -"levels/menu/main_menu_seg7.0BB08.ia8.png": [8,8,64,{"jp":[2770736,47880]}], -"levels/menu/main_menu_seg7.0BB48.ia8.png": [8,8,64,{"jp":[2770736,47944]}], -"levels/menu/main_menu_seg7.0BB88.ia8.png": [8,8,64,{"jp":[2770736,48008]}], -"levels/menu/main_menu_seg7.0BBC8.ia8.png": [8,8,64,{"jp":[2770736,48072]}], -"levels/menu/main_menu_seg7.0BC08.ia8.png": [8,8,64,{"jp":[2770736,48136]}], -"levels/menu/main_menu_seg7.0BC48.ia8.png": [8,8,64,{"jp":[2770736,48200]}], -"levels/menu/main_menu_seg7.0BC88.ia8.png": [8,8,64,{"jp":[2770736,48264]}], -"levels/menu/main_menu_seg7.0BCC8.ia8.png": [8,8,64,{"jp":[2770736,48328]}], -"levels/menu/main_menu_seg7.0BD08.ia8.png": [8,8,64,{"jp":[2770736,48392]}], -"levels/menu/main_menu_seg7.0BD48.ia8.png": [8,8,64,{"jp":[2770736,48456]}], -"levels/menu/main_menu_seg7.0BD88.ia8.png": [8,8,64,{"jp":[2770736,48520]}], -"levels/menu/main_menu_seg7.0BDC8.ia8.png": [8,8,64,{"jp":[2770736,48584]}], -"levels/menu/main_menu_seg7.0BE08.ia8.png": [8,8,64,{"jp":[2770736,48648]}], -"levels/menu/main_menu_seg7.0BE48.ia8.png": [8,8,64,{"jp":[2770736,48712]}], -"levels/menu/main_menu_seg7.0BE88.ia8.png": [8,8,64,{"jp":[2770736,48776]}], -"levels/menu/main_menu_seg7.0BEC8.ia8.png": [8,8,64,{"jp":[2770736,48840]}], -"levels/menu/main_menu_seg7.0BF08.ia8.png": [8,8,64,{"jp":[2770736,48904]}], -"levels/menu/main_menu_seg7.0BF48.ia8.png": [8,8,64,{"jp":[2770736,48968]}], -"levels/menu/main_menu_seg7.0BF88.ia8.png": [8,8,64,{"jp":[2770736,49032]}], -"levels/menu/main_menu_seg7.0BFC8.ia8.png": [8,8,64,{"jp":[2770736,49096]}], -"levels/menu/main_menu_seg7.0C008.ia8.png": [8,8,64,{"jp":[2770736,49160]}], -"levels/menu/main_menu_seg7.0C048.ia8.png": [8,8,64,{"jp":[2770736,49224]}], -"levels/menu/main_menu_seg7.0C088.ia8.png": [8,8,64,{"jp":[2770736,49288]}], -"levels/menu/main_menu_seg7.0C0C8.ia8.png": [8,8,64,{"jp":[2770736,49352]}], -"levels/menu/main_menu_seg7.0C108.ia8.png": [8,8,64,{"jp":[2770736,49416]}], -"levels/menu/main_menu_seg7.0C148.ia8.png": [8,8,64,{"jp":[2770736,49480]}], -"levels/menu/main_menu_seg7.0C188.ia8.png": [8,8,64,{"jp":[2770736,49544]}], -"levels/menu/main_menu_seg7.0C1C8.ia8.png": [8,8,64,{"jp":[2770736,49608]}], -"levels/menu/main_menu_seg7.0C208.ia8.png": [8,8,64,{"jp":[2770736,49672]}], -"levels/menu/main_menu_seg7.0C248.ia8.png": [8,8,64,{"jp":[2770736,49736]}], -"levels/menu/main_menu_seg7.0C288.ia8.png": [8,8,64,{"jp":[2770736,49800]}], -"levels/menu/main_menu_seg7.0C2C8.ia8.png": [8,8,64,{"jp":[2770736,49864]}], -"levels/menu/main_menu_seg7.0C308.ia8.png": [8,8,64,{"jp":[2770736,49928]}], -"levels/menu/main_menu_seg7.0C348.ia8.png": [8,8,64,{"jp":[2770736,49992]}], -"levels/menu/main_menu_seg7.0C388.ia8.png": [8,8,64,{"jp":[2770736,50056]}], -"levels/menu/main_menu_seg7.0C3C8.ia8.png": [8,8,64,{"jp":[2770736,50120]}], -"levels/menu/main_menu_seg7.0C408.ia8.png": [8,8,64,{"jp":[2770736,50184]}], -"levels/menu/main_menu_seg7.0C448.ia8.png": [8,8,64,{"jp":[2770736,46536]}], -"levels/menu/main_menu_seg7.0C488.ia8.png": [8,8,64,{"jp":[2770736,50312]}], -"levels/menu/main_menu_seg7.0C4C8.ia8.png": [8,8,64,{"jp":[2770736,50376]}], -"levels/menu/main_menu_seg7.0C508.ia8.png": [8,8,64,{"jp":[2770736,50440]}], -"levels/menu/main_menu_seg7.0C548.ia8.png": [8,8,64,{"jp":[2770736,50504]}], -"levels/menu/main_menu_seg7.0C588.ia8.png": [8,8,64,{"jp":[2770736,50568]}], -"levels/menu/main_menu_seg7.0C5C8.ia8.png": [8,8,64,{"jp":[2770736,50632]}], -"levels/menu/main_menu_seg7.0C608.ia8.png": [8,8,64,{"jp":[2770736,50696]}], -"levels/menu/main_menu_seg7.0C648.ia8.png": [8,8,64,{"jp":[2770736,50760]}], -"levels/menu/main_menu_seg7.0C688.ia8.png": [8,8,64,{"jp":[2770736,50824]}], -"levels/menu/main_menu_seg7.0C6C8.ia8.png": [8,8,64,{"jp":[2770736,50888]}], -"levels/menu/main_menu_seg7.0C708.ia8.png": [8,8,64,{"jp":[2770736,50952]}], -"levels/menu/main_menu_seg7.0C748.ia8.png": [8,8,64,{"jp":[2770736,51016]}], -"levels/menu/main_menu_seg7.0C788.ia8.png": [8,8,64,{"jp":[2770736,51080]}], -"levels/menu/main_menu_seg7.0C7C8.ia8.png": [8,8,64,{"jp":[2770736,51144]}], -"levels/menu/main_menu_seg7.0C808.ia8.png": [8,8,64,{"jp":[2770736,51208]}], -"levels/menu/main_menu_seg7.0C848.ia8.png": [8,8,64,{"jp":[2770736,51272]}], -"levels/menu/main_menu_seg7.0C888.ia8.png": [8,8,64,{"jp":[2770736,51336]}], -"levels/menu/main_menu_seg7.0C8C8.ia8.png": [8,8,64,{"jp":[2770736,51400]}], -"levels/menu/main_menu_seg7.0C908.ia8.png": [8,8,64,{"jp":[2770736,51464]}], -"levels/menu/main_menu_seg7.0C948.ia8.png": [8,8,64,{"jp":[2770736,51528]}], -"levels/menu/main_menu_seg7.0C988.ia8.png": [8,8,64,{"jp":[2770736,51592]}], -"levels/menu/main_menu_seg7.0C9C8.ia8.png": [8,8,64,{"jp":[2770736,51656]}], -"levels/menu/main_menu_seg7.0CA08.ia8.png": [8,8,64,{"jp":[2770736,51720]}], -"levels/menu/main_menu_seg7.0CA48.ia8.png": [8,8,64,{"jp":[2770736,51784]}], -"levels/menu/main_menu_seg7.0CA88.ia8.png": [8,8,64,{"jp":[2770736,51848]}], -"levels/menu/main_menu_seg7.0CAC8.ia8.png": [8,8,64,{"jp":[2770736,51912]}], -"levels/menu/main_menu_seg7.0CB08.ia8.png": [8,8,64,{"jp":[2770736,51976]}], -"levels/menu/main_menu_seg7.0CB48.ia8.png": [8,8,64,{"jp":[2770736,52040]}], -"levels/menu/main_menu_seg7.0CB88.ia8.png": [8,8,64,{"jp":[2770736,52104]}], -"levels/menu/main_menu_seg7.0CBC8.ia8.png": [8,8,64,{"jp":[2770736,52168]}], -"levels/menu/main_menu_seg7.0CC08.ia8.png": [8,8,64,{"jp":[2770736,52232]}], -"levels/menu/main_menu_seg7.0CC48.ia8.png": [8,8,64,{"jp":[2770736,52296]}], -"levels/menu/main_menu_seg7.0CC88.ia8.png": [8,8,64,{"jp":[2770736,52360]}], -"levels/menu/main_menu_seg7.0CCC8.ia8.png": [8,8,64,{"jp":[2770736,52424]}], -"levels/menu/main_menu_seg7.0D1A8.rgba16.png": [64,32,4096,{"jp":[2770736,53672],"us":[2778544,48352]}], -"levels/menu/main_menu_seg7.0E1A8.rgba16.png": [64,32,4096,{"jp":[2770736,57768],"us":[2778544,52448]}], +"levels/jrb/0.rgba16.png": [32,32,2048,{"jp":[3432432,4096],"us":[3439184,4096],"eu":[3312784,4096],"sh":[3287152,4096]}], +"levels/jrb/1.rgba16.png": [64,32,4096,{"jp":[4294592,2048],"us":[4302688,2048],"eu":[4176288,2048],"sh":[4150656,2048]}], +"levels/jrb/2.rgba16.png": [32,32,2048,{"jp":[4294592,6144],"us":[4302688,6144],"eu":[4176288,6144],"sh":[4150656,6144]}], +"levels/jrb/3.rgba16.png": [32,32,2048,{"jp":[4294592,8192],"us":[4302688,8192],"eu":[4176288,8192],"sh":[4150656,8192]}], +"levels/lll/0.rgba16.png": [32,32,2048,{"jp":[4678592,0],"us":[4687008,0],"eu":[4560608,0],"sh":[4534976,0]}], +"levels/lll/1.rgba16.png": [32,32,2048,{"jp":[4678592,2048],"us":[4687008,2048],"eu":[4560608,2048],"sh":[4534976,2048]}], +"levels/lll/10.rgba16.png": [32,32,2048,{"jp":[4678592,20480],"us":[4687008,20480],"eu":[4560608,20480],"sh":[4534976,20480]}], +"levels/lll/11.rgba16.png": [32,32,2048,{"jp":[4678592,22528],"us":[4687008,22528],"eu":[4560608,22528],"sh":[4534976,22528]}], +"levels/lll/12.rgba16.png": [32,32,2048,{"jp":[4678592,24576],"us":[4687008,24576],"eu":[4560608,24576],"sh":[4534976,24576]}], +"levels/lll/13.rgba16.png": [32,32,2048,{"jp":[4678592,26624],"us":[4687008,26624],"eu":[4560608,26624],"sh":[4534976,26624]}], +"levels/lll/14.rgba16.png": [32,32,2048,{"jp":[4678592,28672],"us":[4687008,28672],"eu":[4560608,28672],"sh":[4534976,28672]}], +"levels/lll/15.rgba16.png": [32,32,2048,{"jp":[4678592,30720],"us":[4687008,30720],"eu":[4560608,30720],"sh":[4534976,30720]}], +"levels/lll/16.rgba16.png": [32,32,2048,{"jp":[4678592,32768],"us":[4687008,32768],"eu":[4560608,32768],"sh":[4534976,32768]}], +"levels/lll/17.rgba16.png": [32,32,2048,{"jp":[4678592,34816],"us":[4687008,34816],"eu":[4560608,34816],"sh":[4534976,34816]}], +"levels/lll/18.rgba16.png": [32,32,2048,{"jp":[4678592,36864],"us":[4687008,36864],"eu":[4560608,36864],"sh":[4534976,36864]}], +"levels/lll/19.rgba16.png": [32,32,2048,{"jp":[4678592,38912],"us":[4687008,38912],"eu":[4560608,38912],"sh":[4534976,38912]}], +"levels/lll/2.rgba16.png": [32,32,2048,{"jp":[4678592,4096],"us":[4687008,4096],"eu":[4560608,4096],"sh":[4534976,4096]}], +"levels/lll/20.rgba16.png": [32,32,2048,{"jp":[4678592,40960],"us":[4687008,40960],"eu":[4560608,40960],"sh":[4534976,40960]}], +"levels/lll/21.rgba16.png": [32,32,2048,{"jp":[4678592,43008],"us":[4687008,43008],"eu":[4560608,43008],"sh":[4534976,43008]}], +"levels/lll/22.rgba16.png": [32,32,2048,{"jp":[4678592,45056],"us":[4687008,45056],"eu":[4560608,45056],"sh":[4534976,45056]}], +"levels/lll/23.rgba16.png": [32,32,2048,{"jp":[4678592,47104],"us":[4687008,47104],"eu":[4560608,47104],"sh":[4534976,47104]}], +"levels/lll/24.rgba16.png": [32,32,2048,{"jp":[4678592,49152],"us":[4687008,49152],"eu":[4560608,49152],"sh":[4534976,49152]}], +"levels/lll/25.rgba16.png": [32,32,2048,{"jp":[4678592,51200],"us":[4687008,51200],"eu":[4560608,51200],"sh":[4534976,51200]}], +"levels/lll/26.rgba16.png": [16,16,512,{"jp":[4678592,53248],"us":[4687008,53248],"eu":[4560608,53248],"sh":[4534976,53248]}], +"levels/lll/27.ia16.png": [16,16,512,{"jp":[3677936,14592],"us":[3684688,14592],"eu":[3558288,14592],"sh":[3532656,14592]}], +"levels/lll/28.rgba16.png": [32,32,2048,{"jp":[4678592,54272],"us":[4687008,54272],"eu":[4560608,54272],"sh":[4534976,54272]}], +"levels/lll/29.rgba16.png": [32,32,2048,{"jp":[4678592,56320],"us":[4687008,56320],"eu":[4560608,56320],"sh":[4534976,56320]}], +"levels/lll/3.rgba16.png": [32,32,2048,{"jp":[4678592,6144],"us":[4687008,6144],"eu":[4560608,6144],"sh":[4534976,6144]}], +"levels/lll/30.rgba16.png": [32,32,2048,{"jp":[4678592,58368],"us":[4687008,58368],"eu":[4560608,58368],"sh":[4534976,58368]}], +"levels/lll/31.rgba16.png": [32,32,2048,{"jp":[4678592,60416],"us":[4687008,60416],"eu":[4560608,60416],"sh":[4534976,60416]}], +"levels/lll/32.rgba16.png": [64,16,2048,{"jp":[4678592,62464],"us":[4687008,62464],"eu":[4560608,62464],"sh":[4534976,62464]}], +"levels/lll/4.rgba16.png": [32,32,2048,{"jp":[4678592,8192],"us":[4687008,8192],"eu":[4560608,8192],"sh":[4534976,8192]}], +"levels/lll/5.rgba16.png": [32,32,2048,{"jp":[4678592,10240],"us":[4687008,10240],"eu":[4560608,10240],"sh":[4534976,10240]}], +"levels/lll/6.rgba16.png": [32,32,2048,{"jp":[4678592,12288],"us":[4687008,12288],"eu":[4560608,12288],"sh":[4534976,12288]}], +"levels/lll/7.rgba16.png": [32,32,2048,{"jp":[3262320,6144],"us":[3269072,6144],"eu":[3142672,6144],"sh":[3117040,6144]}], +"levels/lll/8.rgba16.png": [32,32,2048,{"jp":[4678592,16384],"us":[4687008,16384],"eu":[4560608,16384],"sh":[4534976,16384]}], +"levels/lll/9.rgba16.png": [32,32,2048,{"jp":[4678592,18432],"us":[4687008,18432],"eu":[4560608,18432],"sh":[4534976,18432]}], +"levels/menu/main_menu_seg7.00018.rgba16.png": [32,32,2048,{"jp":[2770736,24],"us":[2778544,24],"eu":[2647072,24],"sh":[2625456,24]}], +"levels/menu/main_menu_seg7.00818.rgba16.png": [32,32,2048,{"jp":[2770736,2072],"us":[2778544,2072],"eu":[2647072,2072],"sh":[2625456,2072]}], +"levels/menu/main_menu_seg7.01018.rgba16.png": [64,32,4096,{"jp":[2770736,4120],"us":[2778544,4120],"eu":[2647072,4120],"sh":[2625456,4120]}], +"levels/menu/main_menu_seg7.02018.rgba16.png": [64,32,4096,{"jp":[2770736,8216],"us":[2778544,8216],"eu":[2647072,8216],"sh":[2625456,8216]}], +"levels/menu/main_menu_seg7.03468.rgba16.png": [32,32,2048,{"jp":[2770736,13416],"us":[2778544,13416],"eu":[2647072,13416],"sh":[2625456,13416]}], +"levels/menu/main_menu_seg7.03C68.rgba16.png": [32,32,2048,{"jp":[2770736,15464],"us":[2778544,15464],"eu":[2647072,15464],"sh":[2625456,15464]}], +"levels/menu/main_menu_seg7.04468.rgba16.png": [32,32,2048,{"jp":[2770736,17512],"us":[2778544,17512],"eu":[2647072,17512],"sh":[2625456,17512]}], +"levels/menu/main_menu_seg7.04C68.rgba16.png": [32,32,2048,{"jp":[2770736,19560],"us":[2778544,19560],"eu":[2647072,19560],"sh":[2625456,19560]}], +"levels/menu/main_menu_seg7.05468.rgba16.png": [32,32,2048,{"jp":[2770736,21608],"us":[2778544,21608],"eu":[2647072,21608],"sh":[2625456,21608]}], +"levels/menu/main_menu_seg7.06328.rgba16.png": [32,32,2048,{"jp":[2770736,25384],"us":[2778544,25384],"eu":[2647072,25384],"sh":[2625456,25384]}], +"levels/menu/main_menu_seg7.06B28.rgba16.png": [32,32,2048,{"jp":[2770736,27432],"us":[2778544,27432],"eu":[2647072,27432],"sh":[2625456,27432]}], +"levels/menu/main_menu_seg7.073D0.rgba16.png": [16,16,512,{"jp":[2770736,29648],"us":[2778544,29648],"eu":[2647072,29648],"sh":[2625456,29648]}], +"levels/menu/main_menu_seg7.075D0.rgba16.png": [16,16,512,{"jp":[2770736,30160],"us":[2778544,30160],"eu":[2647072,30160],"sh":[2625456,30160]}], +"levels/menu/main_menu_seg7.077D0.rgba16.png": [16,16,512,{"jp":[2770736,30672],"us":[2778544,30672],"eu":[2647072,30672],"sh":[2625456,30672]}], +"levels/menu/main_menu_seg7.079D0.rgba16.png": [16,16,512,{"jp":[2770736,31184],"us":[2778544,31184],"eu":[2647072,31184],"sh":[2625456,31184]}], +"levels/menu/main_menu_seg7.07BD0.rgba16.png": [16,16,512,{"jp":[2770736,31696],"us":[2778544,31696],"eu":[2647072,31696],"sh":[2625456,31696]}], +"levels/menu/main_menu_seg7.07DD0.rgba16.png": [16,16,512,{"jp":[2770736,32208],"us":[2778544,32208],"eu":[2647072,32208],"sh":[2625456,32208]}], +"levels/menu/main_menu_seg7.07FD0.rgba16.png": [16,16,512,{"jp":[2770736,32720],"us":[2778544,32720],"eu":[2647072,32720],"sh":[2625456,32720]}], +"levels/menu/main_menu_seg7.081D0.rgba16.png": [16,16,512,{"jp":[2770736,33232],"us":[2778544,33232],"eu":[2647072,33232],"sh":[2625456,33232]}], +"levels/menu/main_menu_seg7.083D0.rgba16.png": [16,16,512,{"jp":[2770736,33744],"us":[2778544,33744],"eu":[2647072,33744],"sh":[2625456,33744]}], +"levels/menu/main_menu_seg7.085D0.rgba16.png": [16,16,512,{"jp":[2770736,34256],"us":[2778544,34256],"eu":[2647072,34256],"sh":[2625456,34256]}], +"levels/menu/main_menu_seg7.087D0.rgba16.png": [16,16,512,{"jp":[2770736,34768],"us":[2778544,34768],"eu":[2647072,34768],"sh":[2625456,34768]}], +"levels/menu/main_menu_seg7.089D0.rgba16.png": [16,16,512,{"jp":[2770736,35280],"us":[2778544,35280],"eu":[2647072,35280],"sh":[2625456,35280]}], +"levels/menu/main_menu_seg7.08BD0.rgba16.png": [16,16,512,{"jp":[2770736,35792],"us":[2778544,35792],"eu":[2647072,35792],"sh":[2625456,35792]}], +"levels/menu/main_menu_seg7.08DD0.rgba16.png": [16,16,512,{"jp":[2770736,36304],"us":[2778544,36304],"eu":[2647072,36304],"sh":[2625456,36304]}], +"levels/menu/main_menu_seg7.08FD0.rgba16.png": [16,16,512,{"jp":[2770736,36816],"us":[2778544,36816],"eu":[2647072,36816],"sh":[2625456,36816]}], +"levels/menu/main_menu_seg7.091D0.rgba16.png": [16,16,512,{"jp":[2770736,37328],"us":[2778544,37328],"eu":[2647072,37328],"sh":[2625456,37328]}], +"levels/menu/main_menu_seg7.093D0.rgba16.png": [16,16,512,{"jp":[2770736,37840],"us":[2778544,37840],"eu":[2647072,37840],"sh":[2625456,37840]}], +"levels/menu/main_menu_seg7.095D0.rgba16.png": [16,16,512,{"jp":[2770736,38352],"us":[2778544,38352],"eu":[2647072,38352],"sh":[2625456,38352]}], +"levels/menu/main_menu_seg7.097D0.rgba16.png": [16,16,512,{"jp":[2770736,38864],"us":[2778544,38864],"eu":[2647072,38864],"sh":[2625456,38864]}], +"levels/menu/main_menu_seg7.099D0.rgba16.png": [16,16,512,{"jp":[2770736,39376],"us":[2778544,39376],"eu":[2647072,39376],"sh":[2625456,39376]}], +"levels/menu/main_menu_seg7.09BD0.rgba16.png": [16,16,512,{"jp":[2770736,39888],"us":[2778544,39888],"eu":[2647072,39888],"sh":[2625456,39888]}], +"levels/menu/main_menu_seg7.09DD0.rgba16.png": [16,16,512,{"jp":[2770736,40400],"us":[2778544,40400],"eu":[2647072,40400],"sh":[2625456,40400]}], +"levels/menu/main_menu_seg7.09FD0.rgba16.png": [16,16,512,{"jp":[2770736,40912],"us":[2778544,40912],"eu":[2647072,40912],"sh":[2625456,40912]}], +"levels/menu/main_menu_seg7.0A1D0.rgba16.png": [16,16,512,{"jp":[1078992,20480],"us":[2778544,41424],"eu":[2647072,41424],"sh":[934640,20480]}], +"levels/menu/main_menu_seg7.0A3D0.rgba16.png": [16,16,512,{"jp":[2770736,41936],"us":[2778544,41936],"eu":[2647072,41936],"sh":[2625456,41936]}], +"levels/menu/main_menu_seg7.0A5D0.rgba16.png": [16,16,512,{"jp":[2770736,42448],"us":[2778544,42448],"eu":[2647072,42448],"sh":[2625456,42448]}], +"levels/menu/main_menu_seg7.0A7D0.rgba16.png": [16,16,512,{"jp":[2770736,42960],"us":[2778544,42960],"eu":[2647072,42960],"sh":[2625456,42960]}], +"levels/menu/main_menu_seg7.0A9D0.rgba16.png": [16,16,512,{"jp":[2770736,43472],"us":[2778544,43472],"eu":[2647072,43472],"sh":[2625456,43472]}], +"levels/menu/main_menu_seg7.0AC48.ia8.png": [8,8,64,{"jp":[2770736,44104],"sh":[2625456,44104]}], +"levels/menu/main_menu_seg7.0AC88.ia8.png": [8,8,64,{"jp":[2770736,44168],"sh":[2625456,44168]}], +"levels/menu/main_menu_seg7.0ACC8.ia8.png": [8,8,64,{"jp":[2770736,44232],"sh":[2625456,44232]}], +"levels/menu/main_menu_seg7.0AD08.ia8.png": [8,8,64,{"jp":[2770736,44296],"sh":[2625456,44296]}], +"levels/menu/main_menu_seg7.0AD48.ia8.png": [8,8,64,{"jp":[2770736,44360],"sh":[2625456,44360]}], +"levels/menu/main_menu_seg7.0AD88.ia8.png": [8,8,64,{"jp":[2770736,44424],"sh":[2625456,44424]}], +"levels/menu/main_menu_seg7.0ADC8.ia8.png": [8,8,64,{"jp":[2770736,44488],"sh":[2625456,44488]}], +"levels/menu/main_menu_seg7.0AE08.ia8.png": [8,8,64,{"jp":[2770736,44552],"sh":[2625456,44552]}], +"levels/menu/main_menu_seg7.0AE48.ia8.png": [8,8,64,{"jp":[2770736,44616],"sh":[2625456,44616]}], +"levels/menu/main_menu_seg7.0AE88.ia8.png": [8,8,64,{"jp":[2770736,44680],"sh":[2625456,44680]}], +"levels/menu/main_menu_seg7.0AEC8.ia8.png": [8,8,64,{"jp":[2770736,44744],"sh":[2625456,44744]}], +"levels/menu/main_menu_seg7.0AF08.ia8.png": [8,8,64,{"jp":[2770736,44808],"sh":[2625456,44808]}], +"levels/menu/main_menu_seg7.0AF48.ia8.png": [8,8,64,{"jp":[2770736,44872],"sh":[2625456,44872]}], +"levels/menu/main_menu_seg7.0AF88.ia8.png": [8,8,64,{"jp":[2770736,44936],"sh":[2625456,44936]}], +"levels/menu/main_menu_seg7.0AFC8.ia8.png": [8,8,64,{"jp":[2770736,45000],"sh":[2625456,45000]}], +"levels/menu/main_menu_seg7.0B008.ia8.png": [8,8,64,{"jp":[2770736,45064],"sh":[2625456,45064]}], +"levels/menu/main_menu_seg7.0B048.ia8.png": [8,8,64,{"jp":[2770736,45128],"sh":[2625456,45128]}], +"levels/menu/main_menu_seg7.0B088.ia8.png": [8,8,64,{"jp":[2770736,45192],"sh":[2625456,45192]}], +"levels/menu/main_menu_seg7.0B0C8.ia8.png": [8,8,64,{"jp":[2770736,45256],"sh":[2625456,45256]}], +"levels/menu/main_menu_seg7.0B108.ia8.png": [8,8,64,{"jp":[2770736,45320],"sh":[2625456,45320]}], +"levels/menu/main_menu_seg7.0B148.ia8.png": [8,8,64,{"jp":[2770736,45384],"sh":[2625456,45384]}], +"levels/menu/main_menu_seg7.0B188.ia8.png": [8,8,64,{"jp":[2770736,45448],"sh":[2625456,45448]}], +"levels/menu/main_menu_seg7.0B1C8.ia8.png": [8,8,64,{"jp":[2770736,45512],"sh":[2625456,45512]}], +"levels/menu/main_menu_seg7.0B208.ia8.png": [8,8,64,{"jp":[2770736,45576],"sh":[2625456,45576]}], +"levels/menu/main_menu_seg7.0B248.ia8.png": [8,8,64,{"jp":[2770736,45640],"sh":[2625456,45640]}], +"levels/menu/main_menu_seg7.0B288.ia8.png": [8,8,64,{"jp":[2770736,45704],"sh":[2625456,45704]}], +"levels/menu/main_menu_seg7.0B2C8.ia8.png": [8,8,64,{"jp":[2770736,45768],"sh":[2625456,45768]}], +"levels/menu/main_menu_seg7.0B308.ia8.png": [8,8,64,{"jp":[2770736,45832],"sh":[2625456,45832]}], +"levels/menu/main_menu_seg7.0B348.ia8.png": [8,8,64,{"jp":[2770736,45896],"sh":[2625456,45896]}], +"levels/menu/main_menu_seg7.0B388.ia8.png": [8,8,64,{"jp":[2770736,45960],"sh":[2625456,45960]}], +"levels/menu/main_menu_seg7.0B3C8.ia8.png": [8,8,64,{"jp":[2770736,46024],"sh":[2625456,46024]}], +"levels/menu/main_menu_seg7.0B408.ia8.png": [8,8,64,{"jp":[2770736,46088],"sh":[2625456,46088]}], +"levels/menu/main_menu_seg7.0B448.ia8.png": [8,8,64,{"jp":[2770736,46152],"sh":[2625456,46152]}], +"levels/menu/main_menu_seg7.0B488.ia8.png": [8,8,64,{"jp":[2770736,46216],"sh":[2625456,46216]}], +"levels/menu/main_menu_seg7.0B4C8.ia8.png": [8,8,64,{"jp":[2770736,46280],"sh":[2625456,46280]}], +"levels/menu/main_menu_seg7.0B508.ia8.png": [8,8,64,{"jp":[2770736,46344],"sh":[2625456,46344]}], +"levels/menu/main_menu_seg7.0B548.ia8.png": [8,8,64,{"jp":[2770736,46408],"sh":[2625456,46408]}], +"levels/menu/main_menu_seg7.0B588.ia8.png": [8,8,64,{"jp":[2770736,46472],"sh":[2625456,46472]}], +"levels/menu/main_menu_seg7.0B5C8.ia8.png": [8,8,64,{"jp":[2770736,46536],"sh":[2625456,46536]}], +"levels/menu/main_menu_seg7.0B608.ia8.png": [8,8,64,{"jp":[2770736,46600],"sh":[2625456,46600]}], +"levels/menu/main_menu_seg7.0B648.ia8.png": [8,8,64,{"jp":[2770736,46664],"sh":[2625456,46664]}], +"levels/menu/main_menu_seg7.0B688.ia8.png": [8,8,64,{"jp":[2770736,46728],"sh":[2625456,46728]}], +"levels/menu/main_menu_seg7.0B6C8.ia8.png": [8,8,64,{"jp":[2770736,46792],"sh":[2625456,46792]}], +"levels/menu/main_menu_seg7.0B708.ia8.png": [8,8,64,{"jp":[2770736,46856],"sh":[2625456,46856]}], +"levels/menu/main_menu_seg7.0B748.ia8.png": [8,8,64,{"jp":[2770736,46920],"sh":[2625456,46920]}], +"levels/menu/main_menu_seg7.0B788.ia8.png": [8,8,64,{"jp":[2770736,46984],"sh":[2625456,46984]}], +"levels/menu/main_menu_seg7.0B7C8.ia8.png": [8,8,64,{"jp":[2770736,47048],"sh":[2625456,47048]}], +"levels/menu/main_menu_seg7.0B808.ia8.png": [8,8,64,{"jp":[2770736,47112],"sh":[2625456,47112]}], +"levels/menu/main_menu_seg7.0B848.ia8.png": [8,8,64,{"jp":[2770736,47176],"sh":[2625456,47176]}], +"levels/menu/main_menu_seg7.0B888.ia8.png": [8,8,64,{"jp":[2770736,47240],"sh":[2625456,47240]}], +"levels/menu/main_menu_seg7.0B8C8.ia8.png": [8,8,64,{"jp":[2770736,47304],"sh":[2625456,47304]}], +"levels/menu/main_menu_seg7.0B908.ia8.png": [8,8,64,{"jp":[2770736,47368],"sh":[2625456,47368]}], +"levels/menu/main_menu_seg7.0B948.ia8.png": [8,8,64,{"jp":[2770736,47432],"sh":[2625456,47432]}], +"levels/menu/main_menu_seg7.0B988.ia8.png": [8,8,64,{"jp":[2770736,47496],"sh":[2625456,47496]}], +"levels/menu/main_menu_seg7.0B9C8.ia8.png": [8,8,64,{"jp":[2770736,47560],"sh":[2625456,47560]}], +"levels/menu/main_menu_seg7.0BA08.ia8.png": [8,8,64,{"jp":[2770736,47624],"sh":[2625456,47624]}], +"levels/menu/main_menu_seg7.0BA48.ia8.png": [8,8,64,{"jp":[2770736,47688],"sh":[2625456,47688]}], +"levels/menu/main_menu_seg7.0BA88.ia8.png": [8,8,64,{"jp":[2770736,47752],"sh":[2625456,47752]}], +"levels/menu/main_menu_seg7.0BAC8.ia8.png": [8,8,64,{"jp":[2770736,47816],"sh":[2625456,47816]}], +"levels/menu/main_menu_seg7.0BB08.ia8.png": [8,8,64,{"jp":[2770736,47880],"sh":[2625456,47880]}], +"levels/menu/main_menu_seg7.0BB48.ia8.png": [8,8,64,{"jp":[2770736,47944],"sh":[2625456,47944]}], +"levels/menu/main_menu_seg7.0BB88.ia8.png": [8,8,64,{"jp":[2770736,48008],"sh":[2625456,48008]}], +"levels/menu/main_menu_seg7.0BBC8.ia8.png": [8,8,64,{"jp":[2770736,48072],"sh":[2625456,48072]}], +"levels/menu/main_menu_seg7.0BC08.ia8.png": [8,8,64,{"jp":[2770736,48136],"sh":[2625456,48136]}], +"levels/menu/main_menu_seg7.0BC48.ia8.png": [8,8,64,{"jp":[2770736,48200],"sh":[2625456,48200]}], +"levels/menu/main_menu_seg7.0BC88.ia8.png": [8,8,64,{"jp":[2770736,48264],"sh":[2625456,48264]}], +"levels/menu/main_menu_seg7.0BCC8.ia8.png": [8,8,64,{"jp":[2770736,48328],"sh":[2625456,48328]}], +"levels/menu/main_menu_seg7.0BD08.ia8.png": [8,8,64,{"jp":[2770736,48392],"sh":[2625456,48392]}], +"levels/menu/main_menu_seg7.0BD48.ia8.png": [8,8,64,{"jp":[2770736,48456],"sh":[2625456,48456]}], +"levels/menu/main_menu_seg7.0BD88.ia8.png": [8,8,64,{"jp":[2770736,48520],"sh":[2625456,48520]}], +"levels/menu/main_menu_seg7.0BDC8.ia8.png": [8,8,64,{"jp":[2770736,48584],"sh":[2625456,48584]}], +"levels/menu/main_menu_seg7.0BE08.ia8.png": [8,8,64,{"jp":[2770736,48648],"sh":[2625456,48648]}], +"levels/menu/main_menu_seg7.0BE48.ia8.png": [8,8,64,{"jp":[2770736,48712],"sh":[2625456,48712]}], +"levels/menu/main_menu_seg7.0BE88.ia8.png": [8,8,64,{"jp":[2770736,48776],"sh":[2625456,48776]}], +"levels/menu/main_menu_seg7.0BEC8.ia8.png": [8,8,64,{"jp":[2770736,48840],"sh":[2625456,48840]}], +"levels/menu/main_menu_seg7.0BF08.ia8.png": [8,8,64,{"jp":[2770736,48904],"sh":[2625456,48904]}], +"levels/menu/main_menu_seg7.0BF48.ia8.png": [8,8,64,{"jp":[2770736,48968],"sh":[2625456,48968]}], +"levels/menu/main_menu_seg7.0BF88.ia8.png": [8,8,64,{"jp":[2770736,49032],"sh":[2625456,49032]}], +"levels/menu/main_menu_seg7.0BFC8.ia8.png": [8,8,64,{"jp":[2770736,49096],"sh":[2625456,49096]}], +"levels/menu/main_menu_seg7.0C008.ia8.png": [8,8,64,{"jp":[2770736,49160],"sh":[2625456,49160]}], +"levels/menu/main_menu_seg7.0C048.ia8.png": [8,8,64,{"jp":[2770736,49224],"sh":[2625456,49224]}], +"levels/menu/main_menu_seg7.0C088.ia8.png": [8,8,64,{"jp":[2770736,49288],"sh":[2625456,49288]}], +"levels/menu/main_menu_seg7.0C0C8.ia8.png": [8,8,64,{"jp":[2770736,49352],"sh":[2625456,49352]}], +"levels/menu/main_menu_seg7.0C108.ia8.png": [8,8,64,{"jp":[2770736,49416],"sh":[2625456,49416]}], +"levels/menu/main_menu_seg7.0C148.ia8.png": [8,8,64,{"jp":[2770736,49480],"sh":[2625456,49480]}], +"levels/menu/main_menu_seg7.0C188.ia8.png": [8,8,64,{"jp":[2770736,49544],"sh":[2625456,49544]}], +"levels/menu/main_menu_seg7.0C1C8.ia8.png": [8,8,64,{"jp":[2770736,49608],"sh":[2625456,49608]}], +"levels/menu/main_menu_seg7.0C208.ia8.png": [8,8,64,{"jp":[2770736,49672],"sh":[2625456,49672]}], +"levels/menu/main_menu_seg7.0C248.ia8.png": [8,8,64,{"jp":[2770736,49736],"sh":[2625456,49736]}], +"levels/menu/main_menu_seg7.0C288.ia8.png": [8,8,64,{"jp":[2770736,49800],"sh":[2625456,49800]}], +"levels/menu/main_menu_seg7.0C2C8.ia8.png": [8,8,64,{"jp":[2770736,49864],"sh":[2625456,49864]}], +"levels/menu/main_menu_seg7.0C308.ia8.png": [8,8,64,{"jp":[2770736,49928],"sh":[2625456,49928]}], +"levels/menu/main_menu_seg7.0C348.ia8.png": [8,8,64,{"jp":[2770736,49992],"sh":[2625456,49992]}], +"levels/menu/main_menu_seg7.0C388.ia8.png": [8,8,64,{"jp":[2770736,50056],"sh":[2625456,50056]}], +"levels/menu/main_menu_seg7.0C3C8.ia8.png": [8,8,64,{"jp":[2770736,50120],"sh":[2625456,50120]}], +"levels/menu/main_menu_seg7.0C408.ia8.png": [8,8,64,{"jp":[2770736,50184],"sh":[2625456,50184]}], +"levels/menu/main_menu_seg7.0C448.ia8.png": [8,8,64,{"jp":[2770736,46536],"sh":[2625456,46536]}], +"levels/menu/main_menu_seg7.0C488.ia8.png": [8,8,64,{"jp":[2770736,50312],"sh":[2625456,50312]}], +"levels/menu/main_menu_seg7.0C4C8.ia8.png": [8,8,64,{"jp":[2770736,50376],"sh":[2625456,50376]}], +"levels/menu/main_menu_seg7.0C508.ia8.png": [8,8,64,{"jp":[2770736,50440],"sh":[2625456,50440]}], +"levels/menu/main_menu_seg7.0C548.ia8.png": [8,8,64,{"jp":[2770736,50504],"sh":[2625456,50504]}], +"levels/menu/main_menu_seg7.0C588.ia8.png": [8,8,64,{"jp":[2770736,50568],"sh":[2625456,50568]}], +"levels/menu/main_menu_seg7.0C5C8.ia8.png": [8,8,64,{"jp":[2770736,50632],"sh":[2625456,50632]}], +"levels/menu/main_menu_seg7.0C608.ia8.png": [8,8,64,{"jp":[2770736,50696],"sh":[2625456,50696]}], +"levels/menu/main_menu_seg7.0C648.ia8.png": [8,8,64,{"jp":[2770736,50760],"sh":[2625456,50760]}], +"levels/menu/main_menu_seg7.0C688.ia8.png": [8,8,64,{"jp":[2770736,50824],"sh":[2625456,50824]}], +"levels/menu/main_menu_seg7.0C6C8.ia8.png": [8,8,64,{"jp":[2770736,50888],"sh":[2625456,50888]}], +"levels/menu/main_menu_seg7.0C708.ia8.png": [8,8,64,{"jp":[2770736,50952],"sh":[2625456,50952]}], +"levels/menu/main_menu_seg7.0C748.ia8.png": [8,8,64,{"jp":[2770736,51016],"sh":[2625456,51016]}], +"levels/menu/main_menu_seg7.0C788.ia8.png": [8,8,64,{"jp":[2770736,51080],"sh":[2625456,51080]}], +"levels/menu/main_menu_seg7.0C7C8.ia8.png": [8,8,64,{"jp":[2770736,51144],"sh":[2625456,51144]}], +"levels/menu/main_menu_seg7.0C808.ia8.png": [8,8,64,{"jp":[2770736,51208],"sh":[2625456,51208]}], +"levels/menu/main_menu_seg7.0C848.ia8.png": [8,8,64,{"jp":[2770736,51272],"sh":[2625456,51272]}], +"levels/menu/main_menu_seg7.0C888.ia8.png": [8,8,64,{"jp":[2770736,51336],"sh":[2625456,51336]}], +"levels/menu/main_menu_seg7.0C8C8.ia8.png": [8,8,64,{"jp":[2770736,51400],"sh":[2625456,51400]}], +"levels/menu/main_menu_seg7.0C908.ia8.png": [8,8,64,{"jp":[2770736,51464],"sh":[2625456,51464]}], +"levels/menu/main_menu_seg7.0C948.ia8.png": [8,8,64,{"jp":[2770736,51528],"sh":[2625456,51528]}], +"levels/menu/main_menu_seg7.0C988.ia8.png": [8,8,64,{"jp":[2770736,51592],"sh":[2625456,51592]}], +"levels/menu/main_menu_seg7.0C9C8.ia8.png": [8,8,64,{"jp":[2770736,51656],"sh":[2625456,51656]}], +"levels/menu/main_menu_seg7.0CA08.ia8.png": [8,8,64,{"jp":[2770736,51720],"sh":[2625456,51720]}], +"levels/menu/main_menu_seg7.0CA48.ia8.png": [8,8,64,{"jp":[2770736,51784],"sh":[2625456,51784]}], +"levels/menu/main_menu_seg7.0CA88.ia8.png": [8,8,64,{"jp":[2770736,51848],"sh":[2625456,51848]}], +"levels/menu/main_menu_seg7.0CAC8.ia8.png": [8,8,64,{"jp":[2770736,51912],"sh":[2625456,51912]}], +"levels/menu/main_menu_seg7.0CB08.ia8.png": [8,8,64,{"jp":[2770736,51976],"sh":[2625456,51976]}], +"levels/menu/main_menu_seg7.0CB48.ia8.png": [8,8,64,{"jp":[2770736,52040],"sh":[2625456,52040]}], +"levels/menu/main_menu_seg7.0CB88.ia8.png": [8,8,64,{"jp":[2770736,52104],"sh":[2625456,52104]}], +"levels/menu/main_menu_seg7.0CBC8.ia8.png": [8,8,64,{"jp":[2770736,52168],"sh":[2625456,52168]}], +"levels/menu/main_menu_seg7.0CC08.ia8.png": [8,8,64,{"jp":[2770736,52232],"sh":[2625456,52232]}], +"levels/menu/main_menu_seg7.0CC48.ia8.png": [8,8,64,{"jp":[2770736,52296],"sh":[2625456,52296]}], +"levels/menu/main_menu_seg7.0CC88.ia8.png": [8,8,64,{"jp":[2770736,52360],"sh":[2625456,52360]}], +"levels/menu/main_menu_seg7.0CCC8.ia8.png": [8,8,64,{"jp":[2770736,52424],"sh":[2625456,52424]}], +"levels/menu/main_menu_seg7.0D1A8.rgba16.png": [64,32,4096,{"jp":[2770736,53672],"us":[2778544,48352],"sh":[2625456,53672]}], +"levels/menu/main_menu_seg7.0E1A8.rgba16.png": [64,32,4096,{"jp":[2770736,57768],"us":[2778544,52448],"sh":[2625456,57768]}], "levels/menu/main_menu_seg7_eu.0AF80.ia8.png": [8,8,64,{"eu":[2647072,44928]}], "levels/menu/main_menu_seg7_eu.0B640.ia8.png": [8,8,64,{"eu":[2647072,46656]}], "levels/menu/main_menu_seg7_eu.0B680.ia8.png": [8,8,64,{"eu":[2647072,46720]}], @@ -867,67 +867,67 @@ "levels/menu/main_menu_seg7_us.0B780.ia8.png": [8,8,64,{"us":[2778544,46976],"eu":[2647072,46976]}], "levels/menu/main_menu_seg7_us.0B7C0.ia8.png": [8,8,64,{"us":[2778544,46648],"eu":[2647072,47040]}], "levels/menu/main_menu_seg7_us.0B800.ia8.png": [8,8,64,{"us":[2778544,47104],"eu":[2647072,47104]}], -"levels/pss/0.rgba16.png": [32,32,2048,{"jp":[4905168,0],"us":[4913456,0],"eu":[4792384,0]}], -"levels/pss/1.ia16.png": [32,32,2048,{"jp":[4905168,2048],"us":[4913456,2048],"eu":[4792384,2048]}], -"levels/pss/2.rgba16.png": [32,32,2048,{"jp":[4905168,4096],"us":[4913456,4096],"eu":[4792384,4096]}], -"levels/rr/1.rgba16.png": [64,32,4096,{"jp":[4413648,2048],"us":[4421744,2048],"eu":[4295344,2048]}], -"levels/rr/2.rgba16.png": [32,32,2048,{"jp":[4413648,6144],"us":[4421744,6144],"eu":[4295344,6144]}], -"levels/rr/quarter_flying_carpet.rgba16.png": [32,32,2048,{"jp":[4413648,0],"us":[4421744,0],"eu":[4295344,0]}], -"levels/sl/0.rgba16.png": [32,32,2048,{"jp":[4210704,0],"us":[4218800,0],"eu":[4092400,0]}], -"levels/sl/1.rgba16.png": [32,32,2048,{"jp":[4210704,2048],"us":[4218800,2048],"eu":[4092400,2048]}], -"levels/sl/2.rgba16.png": [32,32,2048,{"jp":[4210704,4096],"us":[4218800,4096],"eu":[4092400,4096]}], -"levels/sl/3.rgba16.png": [32,32,2048,{"jp":[4210704,6144],"us":[4218800,6144],"eu":[4092400,6144]}], -"levels/sl/4.rgba16.png": [32,32,2048,{"jp":[4210704,8192],"us":[4218800,8192],"eu":[4092400,8192]}], -"levels/ssl/0.rgba16.png": [32,32,2048,{"jp":[4085520,0],"us":[4093616,0],"eu":[3967216,0]}], -"levels/ssl/1.ia16.png": [32,32,2048,{"jp":[4085520,2048],"us":[4093616,2048],"eu":[3967216,2048]}], -"levels/ssl/10.rgba16.png": [32,64,4096,{"jp":[4085520,55208],"us":[4093616,55208],"eu":[3967216,55208]}], -"levels/ssl/11.rgba16.png": [32,64,4096,{"jp":[4085520,59304],"us":[4093616,59304],"eu":[3967216,59304]}], -"levels/ssl/2.rgba16.png": [32,32,2048,{"jp":[4085520,4096],"us":[4093616,4096],"eu":[3967216,4096]}], -"levels/ssl/3.rgba16.png": [32,32,2048,{"jp":[4085520,6144],"us":[4093616,6144],"eu":[3967216,6144]}], -"levels/ssl/4.rgba16.png": [32,32,2048,{"jp":[4085520,8192],"us":[4093616,8192],"eu":[3967216,8192]}], -"levels/ssl/5.rgba16.png": [32,64,4096,{"jp":[4085520,10240],"us":[4093616,10240],"eu":[3967216,10240]}], -"levels/ssl/6.rgba16.png": [32,32,2048,{"jp":[4085520,14336],"us":[4093616,14336],"eu":[3967216,14336]}], -"levels/ssl/7.rgba16.png": [32,32,2048,{"jp":[3323408,32768],"us":[3330160,32768],"eu":[3203760,32768]}], -"levels/ssl/8.rgba16.png": [32,32,2048,{"jp":[4085520,49064],"us":[4093616,49064],"eu":[3967216,49064]}], -"levels/ssl/9.rgba16.png": [32,64,4096,{"jp":[4085520,51112],"us":[4093616,51112],"eu":[3967216,51112]}], -"levels/thi/0.rgba16.png": [32,32,2048,{"jp":[4335408,0],"us":[4343504,0],"eu":[4217104,0]}], -"levels/thi/1.rgba16.png": [32,32,2048,{"jp":[4335408,2048],"us":[4343504,2048],"eu":[4217104,2048]}], -"levels/totwc/0.rgba16.png": [32,64,4096,{"jp":[4967376,0],"us":[4975664,0],"eu":[4854592,0]}], -"levels/totwc/1.rgba16.png": [32,32,2048,{"jp":[4967376,4096],"us":[4975664,4096],"eu":[4854592,4096]}], -"levels/totwc/2.rgba16.png": [32,32,2048,{"jp":[4967376,6144],"us":[4975664,6144],"eu":[4854592,6144]}], -"levels/totwc/3.ia16.png": [32,32,2048,{"jp":[4967376,8192],"us":[4975664,8192],"eu":[4854592,8192]}], -"levels/ttc/0.rgba16.png": [32,32,2048,{"jp":[4370304,0],"us":[4378400,0],"eu":[4252000,0]}], -"levels/ttc/1.rgba16.png": [16,64,2048,{"jp":[4370304,2048],"us":[4378400,2048],"eu":[4252000,2048]}], -"levels/ttc/2.rgba16.png": [32,32,2048,{"jp":[4370304,90000],"us":[4378400,90000],"eu":[4252000,90000]}], -"levels/ttm/0.ia16.png": [32,32,2048,{"jp":[5044400,0],"us":[5052688,0],"eu":[4931616,0]}], -"levels/ttm/1.rgba16.png": [32,32,2048,{"jp":[5044400,2048],"us":[5052688,2048],"eu":[4931616,2048]}], -"levels/ttm/2.rgba16.png": [32,32,2048,{"jp":[5044400,4096],"us":[5052688,4096],"eu":[4931616,4096]}], -"levels/ttm/3.rgba16.png": [32,32,2048,{"jp":[5044400,6144],"us":[5052688,6144],"eu":[4931616,6144]}], -"levels/ttm/4.rgba16.png": [32,32,2048,{"jp":[5044400,8192],"us":[5052688,8192],"eu":[4931616,8192]}], -"levels/ttm/5.rgba16.png": [32,32,2048,{"jp":[5044400,10240],"us":[5052688,10240],"eu":[4931616,10240]}], -"levels/ttm/6.rgba16.png": [64,32,4096,{"jp":[5044400,12288],"us":[5052688,12288],"eu":[4931616,12288]}], -"levels/ttm/7.rgba16.png": [64,32,4096,{"jp":[5044400,16384],"us":[5052688,16384],"eu":[4931616,16384]}], -"levels/ttm/8.rgba16.png": [32,32,2048,{"jp":[3473152,43008],"us":[3479904,43008],"eu":[3353504,43008]}], -"levels/vcutm/0.rgba16.png": [32,32,2048,{"jp":[4564288,0],"us":[4572672,0],"eu":[4446272,0]}], -"levels/vcutm/1.rgba16.png": [64,32,4096,{"jp":[4564288,2048],"us":[4572672,2048],"eu":[4446272,2048]}], -"levels/vcutm/2.rgba16.png": [32,64,4096,{"jp":[4564288,6144],"us":[4572672,6144],"eu":[4446272,6144]}], -"levels/vcutm/3.rgba16.png": [32,32,2048,{"jp":[4564288,10240],"us":[4572672,10240],"eu":[4446272,10240]}], -"levels/wdw/0.rgba16.png": [32,32,2048,{"jp":[4246992,0],"us":[4255088,0],"eu":[4128688,0]}], -"levels/wdw/1.rgba16.png": [32,32,2048,{"jp":[4246992,2048],"us":[4255088,2048],"eu":[4128688,2048]}], -"levels/wdw/2.rgba16.png": [32,32,2048,{"jp":[4246992,4096],"us":[4255088,4096],"eu":[4128688,4096]}], -"levels/wdw/3.rgba16.png": [32,32,2048,{"jp":[4246992,6144],"us":[4255088,6144],"eu":[4128688,6144]}], -"levels/wdw/4.rgba16.png": [32,32,2048,{"jp":[4246992,8192],"us":[4255088,8192],"eu":[4128688,8192]}], -"levels/wf/0.rgba16.png": [32,32,2048,{"jp":[4800560,0],"us":[4808848,0],"eu":[4682448,0]}], -"levels/wf/1.rgba16.png": [32,32,2048,{"jp":[4800560,2048],"us":[4808848,2048],"eu":[4682448,2048]}], -"levels/wf/2.rgba16.png": [32,32,2048,{"jp":[4800560,4096],"us":[4808848,4096],"eu":[4682448,4096]}], -"levels/wf/3.rgba16.png": [32,32,2048,{"jp":[4800560,6144],"us":[4808848,6144],"eu":[4682448,6144]}], -"levels/wf/4.rgba16.png": [32,32,2048,{"jp":[4800560,8192],"us":[4808848,8192],"eu":[4682448,8192]}], -"levels/wf/5.ia8.png": [16,16,256,{"jp":[1078992,62296],"us":[1083968,74168],"eu":[909712,30840]}], -"levels/wmotr/0.rgba16.png": [32,32,2048,{"jp":[4989632,0],"us":[4997920,0],"eu":[4876848,0]}], -"levels/wmotr/1.rgba16.png": [32,16,1024,{"jp":[4989632,2048],"us":[4997920,2048],"eu":[4876848,2048]}], -"levels/wmotr/2.rgba16.png": [32,32,2048,{"jp":[4989632,3072],"us":[4997920,3072],"eu":[4876848,3072]}], -"levels/wmotr/3.rgba16.png": [32,8,512,{"jp":[4989632,5120],"us":[4997920,5120],"eu":[4876848,5120]}], -"levels/wmotr/4.rgba16.png": [8,32,512,{"jp":[4989632,5632],"us":[4997920,5632],"eu":[4876848,5632]}], +"levels/pss/0.rgba16.png": [32,32,2048,{"jp":[4905168,0],"us":[4913456,0],"eu":[4792384,0],"sh":[4761424,0]}], +"levels/pss/1.ia16.png": [32,32,2048,{"jp":[4905168,2048],"us":[4913456,2048],"eu":[4792384,2048],"sh":[4761424,2048]}], +"levels/pss/2.rgba16.png": [32,32,2048,{"jp":[4905168,4096],"us":[4913456,4096],"eu":[4792384,4096],"sh":[4761424,4096]}], +"levels/rr/1.rgba16.png": [64,32,4096,{"jp":[4413648,2048],"us":[4421744,2048],"eu":[4295344,2048],"sh":[4269712,2048]}], +"levels/rr/2.rgba16.png": [32,32,2048,{"jp":[4413648,6144],"us":[4421744,6144],"eu":[4295344,6144],"sh":[4269712,6144]}], +"levels/rr/quarter_flying_carpet.rgba16.png": [32,32,2048,{"jp":[4413648,0],"us":[4421744,0],"eu":[4295344,0],"sh":[4269712,0]}], +"levels/sl/0.rgba16.png": [32,32,2048,{"jp":[4210704,0],"us":[4218800,0],"eu":[4092400,0],"sh":[4066768,0]}], +"levels/sl/1.rgba16.png": [32,32,2048,{"jp":[4210704,2048],"us":[4218800,2048],"eu":[4092400,2048],"sh":[4066768,2048]}], +"levels/sl/2.rgba16.png": [32,32,2048,{"jp":[4210704,4096],"us":[4218800,4096],"eu":[4092400,4096],"sh":[4066768,4096]}], +"levels/sl/3.rgba16.png": [32,32,2048,{"jp":[4210704,6144],"us":[4218800,6144],"eu":[4092400,6144],"sh":[4066768,6144]}], +"levels/sl/4.rgba16.png": [32,32,2048,{"jp":[4210704,8192],"us":[4218800,8192],"eu":[4092400,8192],"sh":[4066768,8192]}], +"levels/ssl/0.rgba16.png": [32,32,2048,{"jp":[4085520,0],"us":[4093616,0],"eu":[3967216,0],"sh":[3941584,0]}], +"levels/ssl/1.ia16.png": [32,32,2048,{"jp":[4085520,2048],"us":[4093616,2048],"eu":[3967216,2048],"sh":[3941584,2048]}], +"levels/ssl/10.rgba16.png": [32,64,4096,{"jp":[4085520,55208],"us":[4093616,55208],"eu":[3967216,55208],"sh":[3941584,55208]}], +"levels/ssl/11.rgba16.png": [32,64,4096,{"jp":[4085520,59304],"us":[4093616,59304],"eu":[3967216,59304],"sh":[3941584,59304]}], +"levels/ssl/2.rgba16.png": [32,32,2048,{"jp":[4085520,4096],"us":[4093616,4096],"eu":[3967216,4096],"sh":[3941584,4096]}], +"levels/ssl/3.rgba16.png": [32,32,2048,{"jp":[4085520,6144],"us":[4093616,6144],"eu":[3967216,6144],"sh":[3941584,6144]}], +"levels/ssl/4.rgba16.png": [32,32,2048,{"jp":[4085520,8192],"us":[4093616,8192],"eu":[3967216,8192],"sh":[3941584,8192]}], +"levels/ssl/5.rgba16.png": [32,64,4096,{"jp":[4085520,10240],"us":[4093616,10240],"eu":[3967216,10240],"sh":[3941584,10240]}], +"levels/ssl/6.rgba16.png": [32,32,2048,{"jp":[4085520,14336],"us":[4093616,14336],"eu":[3967216,14336],"sh":[3941584,14336]}], +"levels/ssl/7.rgba16.png": [32,32,2048,{"jp":[3323408,32768],"us":[3330160,32768],"eu":[3203760,32768],"sh":[3178128,32768]}], +"levels/ssl/8.rgba16.png": [32,32,2048,{"jp":[4085520,49064],"us":[4093616,49064],"eu":[3967216,49064],"sh":[3941584,49064]}], +"levels/ssl/9.rgba16.png": [32,64,4096,{"jp":[4085520,51112],"us":[4093616,51112],"eu":[3967216,51112],"sh":[3941584,51112]}], +"levels/thi/0.rgba16.png": [32,32,2048,{"jp":[4335408,0],"us":[4343504,0],"eu":[4217104,0],"sh":[4191472,0]}], +"levels/thi/1.rgba16.png": [32,32,2048,{"jp":[4335408,2048],"us":[4343504,2048],"eu":[4217104,2048],"sh":[4191472,2048]}], +"levels/totwc/0.rgba16.png": [32,64,4096,{"jp":[4967376,0],"us":[4975664,0],"eu":[4854592,0],"sh":[4823632,0]}], +"levels/totwc/1.rgba16.png": [32,32,2048,{"jp":[4967376,4096],"us":[4975664,4096],"eu":[4854592,4096],"sh":[4823632,4096]}], +"levels/totwc/2.rgba16.png": [32,32,2048,{"jp":[4967376,6144],"us":[4975664,6144],"eu":[4854592,6144],"sh":[4823632,6144]}], +"levels/totwc/3.ia16.png": [32,32,2048,{"jp":[4967376,8192],"us":[4975664,8192],"eu":[4854592,8192],"sh":[4823632,8192]}], +"levels/ttc/0.rgba16.png": [32,32,2048,{"jp":[4370304,0],"us":[4378400,0],"eu":[4252000,0],"sh":[4226368,0]}], +"levels/ttc/1.rgba16.png": [16,64,2048,{"jp":[4370304,2048],"us":[4378400,2048],"eu":[4252000,2048],"sh":[4226368,2048]}], +"levels/ttc/2.rgba16.png": [32,32,2048,{"jp":[4370304,90000],"us":[4378400,90000],"eu":[4252000,90000],"sh":[4226368,90000]}], +"levels/ttm/0.ia16.png": [32,32,2048,{"jp":[5044400,0],"us":[5052688,0],"eu":[4931616,0],"sh":[4900656,0]}], +"levels/ttm/1.rgba16.png": [32,32,2048,{"jp":[5044400,2048],"us":[5052688,2048],"eu":[4931616,2048],"sh":[4900656,2048]}], +"levels/ttm/2.rgba16.png": [32,32,2048,{"jp":[5044400,4096],"us":[5052688,4096],"eu":[4931616,4096],"sh":[4900656,4096]}], +"levels/ttm/3.rgba16.png": [32,32,2048,{"jp":[5044400,6144],"us":[5052688,6144],"eu":[4931616,6144],"sh":[4900656,6144]}], +"levels/ttm/4.rgba16.png": [32,32,2048,{"jp":[5044400,8192],"us":[5052688,8192],"eu":[4931616,8192],"sh":[4900656,8192]}], +"levels/ttm/5.rgba16.png": [32,32,2048,{"jp":[5044400,10240],"us":[5052688,10240],"eu":[4931616,10240],"sh":[4900656,10240]}], +"levels/ttm/6.rgba16.png": [64,32,4096,{"jp":[5044400,12288],"us":[5052688,12288],"eu":[4931616,12288],"sh":[4900656,12288]}], +"levels/ttm/7.rgba16.png": [64,32,4096,{"jp":[5044400,16384],"us":[5052688,16384],"eu":[4931616,16384],"sh":[4900656,16384]}], +"levels/ttm/8.rgba16.png": [32,32,2048,{"jp":[3473152,43008],"us":[3479904,43008],"eu":[3353504,43008],"sh":[3327872,43008]}], +"levels/vcutm/0.rgba16.png": [32,32,2048,{"jp":[4564288,0],"us":[4572672,0],"eu":[4446272,0],"sh":[4420640,0]}], +"levels/vcutm/1.rgba16.png": [64,32,4096,{"jp":[4564288,2048],"us":[4572672,2048],"eu":[4446272,2048],"sh":[4420640,2048]}], +"levels/vcutm/2.rgba16.png": [32,64,4096,{"jp":[4564288,6144],"us":[4572672,6144],"eu":[4446272,6144],"sh":[4420640,6144]}], +"levels/vcutm/3.rgba16.png": [32,32,2048,{"jp":[4564288,10240],"us":[4572672,10240],"eu":[4446272,10240],"sh":[4420640,10240]}], +"levels/wdw/0.rgba16.png": [32,32,2048,{"jp":[4246992,0],"us":[4255088,0],"eu":[4128688,0],"sh":[4103056,0]}], +"levels/wdw/1.rgba16.png": [32,32,2048,{"jp":[4246992,2048],"us":[4255088,2048],"eu":[4128688,2048],"sh":[4103056,2048]}], +"levels/wdw/2.rgba16.png": [32,32,2048,{"jp":[4246992,4096],"us":[4255088,4096],"eu":[4128688,4096],"sh":[4103056,4096]}], +"levels/wdw/3.rgba16.png": [32,32,2048,{"jp":[4246992,6144],"us":[4255088,6144],"eu":[4128688,6144],"sh":[4103056,6144]}], +"levels/wdw/4.rgba16.png": [32,32,2048,{"jp":[4246992,8192],"us":[4255088,8192],"eu":[4128688,8192],"sh":[4103056,8192]}], +"levels/wf/0.rgba16.png": [32,32,2048,{"jp":[4800560,0],"us":[4808848,0],"eu":[4682448,0],"sh":[4656816,0]}], +"levels/wf/1.rgba16.png": [32,32,2048,{"jp":[4800560,2048],"us":[4808848,2048],"eu":[4682448,2048],"sh":[4656816,2048]}], +"levels/wf/2.rgba16.png": [32,32,2048,{"jp":[4800560,4096],"us":[4808848,4096],"eu":[4682448,4096],"sh":[4656816,4096]}], +"levels/wf/3.rgba16.png": [32,32,2048,{"jp":[4800560,6144],"us":[4808848,6144],"eu":[4682448,6144],"sh":[4656816,6144]}], +"levels/wf/4.rgba16.png": [32,32,2048,{"jp":[4800560,8192],"us":[4808848,8192],"eu":[4682448,8192],"sh":[4656816,8192]}], +"levels/wf/5.ia8.png": [16,16,256,{"jp":[1078992,62296],"us":[1083968,74168],"eu":[909712,30840],"sh":[934640,62296]}], +"levels/wmotr/0.rgba16.png": [32,32,2048,{"jp":[4989632,0],"us":[4997920,0],"eu":[4876848,0],"sh":[4845888,0]}], +"levels/wmotr/1.rgba16.png": [32,16,1024,{"jp":[4989632,2048],"us":[4997920,2048],"eu":[4876848,2048],"sh":[4845888,2048]}], +"levels/wmotr/2.rgba16.png": [32,32,2048,{"jp":[4989632,3072],"us":[4997920,3072],"eu":[4876848,3072],"sh":[4845888,3072]}], +"levels/wmotr/3.rgba16.png": [32,8,512,{"jp":[4989632,5120],"us":[4997920,5120],"eu":[4876848,5120],"sh":[4845888,5120]}], +"levels/wmotr/4.rgba16.png": [8,32,512,{"jp":[4989632,5632],"us":[4997920,5632],"eu":[4876848,5632],"sh":[4845888,5632]}], "sound/sequences/eu/01_cutscene_collect_star.m64": [626,{"eu":[7954384]}], "sound/sequences/eu/02_menu_title_screen.m64": [8282,{"eu":[7955024]}], "sound/sequences/eu/03_level_grass.m64": [5131,{"eu":[7963312]}], @@ -1029,23 +1029,23 @@ "sound/sequences/us/20_cutscene_ending.m64": [1882,{"us":[8174192]}], "sound/sequences/us/21_menu_file_select.m64": [781,{"us":[8176080]}], "sound/sequences/us/22_cutscene_lakitu.m64": [313,{"us":[8176864]}], -"textures/cave/hmc_textures.00000.rgba16.png": [32,64,4096,{"jp":[3432432,0],"us":[3439184,0],"eu":[3312784,0]}], -"textures/cave/hmc_textures.01000.rgba16.png": [32,32,2048,{"jp":[3432432,4096],"us":[3439184,4096],"eu":[3312784,4096]}], -"textures/cave/hmc_textures.01800.rgba16.png": [32,64,4096,{"jp":[3432432,6144],"us":[3439184,6144],"eu":[3312784,6144]}], -"textures/cave/hmc_textures.02800.rgba16.png": [32,32,2048,{"jp":[3432432,10240],"us":[3439184,10240],"eu":[3312784,10240]}], -"textures/cave/hmc_textures.03000.rgba16.png": [32,32,2048,{"jp":[3432432,12288],"us":[3439184,12288],"eu":[3312784,12288]}], -"textures/cave/hmc_textures.03800.rgba16.png": [32,64,4096,{"jp":[3432432,14336],"us":[3439184,14336],"eu":[3312784,14336]}], -"textures/cave/hmc_textures.04800.rgba16.png": [64,32,4096,{"jp":[3432432,18432],"us":[3439184,18432],"eu":[3312784,18432]}], -"textures/cave/hmc_textures.05800.rgba16.png": [32,64,4096,{"jp":[3432432,22528],"us":[3439184,22528],"eu":[3312784,22528]}], -"textures/cave/hmc_textures.06800.rgba16.png": [32,32,2048,{"jp":[3432432,26624],"us":[3439184,26624],"eu":[3312784,26624]}], -"textures/cave/hmc_textures.07000.rgba16.png": [32,32,2048,{"jp":[3432432,28672],"us":[3439184,28672],"eu":[3312784,28672]}], -"textures/cave/hmc_textures.07800.rgba16.png": [32,64,4096,{"jp":[3432432,30720],"us":[3439184,30720],"eu":[3312784,30720]}], -"textures/cave/hmc_textures.08800.rgba16.png": [32,64,4096,{"jp":[3432432,34816],"us":[3439184,34816],"eu":[3312784,34816]}], -"textures/cave/hmc_textures.09800.rgba16.png": [32,32,2048,{"jp":[3432432,38912],"us":[3439184,38912],"eu":[3312784,38912]}], -"textures/cave/hmc_textures.0A000.rgba16.png": [32,32,2048,{"jp":[3432432,40960],"us":[3439184,40960],"eu":[3312784,40960]}], -"textures/cave/hmc_textures.0A800.rgba16.png": [32,64,4096,{"jp":[3432432,43008],"us":[3439184,43008],"eu":[3312784,43008]}], -"textures/cave/hmc_textures.0B800.ia16.png": [32,32,2048,{"jp":[3432432,47104],"us":[3439184,47104],"eu":[3312784,47104]}], -"textures/cave/hmc_textures.0C000.ia16.png": [32,32,2048,{"jp":[3298272,43008],"us":[3305024,43008],"eu":[3178624,43008]}], +"textures/cave/hmc_textures.00000.rgba16.png": [32,64,4096,{"jp":[3432432,0],"us":[3439184,0],"eu":[3312784,0],"sh":[3287152,0]}], +"textures/cave/hmc_textures.01000.rgba16.png": [32,32,2048,{"jp":[3432432,4096],"us":[3439184,4096],"eu":[3312784,4096],"sh":[3287152,4096]}], +"textures/cave/hmc_textures.01800.rgba16.png": [32,64,4096,{"jp":[3432432,6144],"us":[3439184,6144],"eu":[3312784,6144],"sh":[3287152,6144]}], +"textures/cave/hmc_textures.02800.rgba16.png": [32,32,2048,{"jp":[3432432,10240],"us":[3439184,10240],"eu":[3312784,10240],"sh":[3287152,10240]}], +"textures/cave/hmc_textures.03000.rgba16.png": [32,32,2048,{"jp":[3432432,12288],"us":[3439184,12288],"eu":[3312784,12288],"sh":[3287152,12288]}], +"textures/cave/hmc_textures.03800.rgba16.png": [32,64,4096,{"jp":[3432432,14336],"us":[3439184,14336],"eu":[3312784,14336],"sh":[3287152,14336]}], +"textures/cave/hmc_textures.04800.rgba16.png": [64,32,4096,{"jp":[3432432,18432],"us":[3439184,18432],"eu":[3312784,18432],"sh":[3287152,18432]}], +"textures/cave/hmc_textures.05800.rgba16.png": [32,64,4096,{"jp":[3432432,22528],"us":[3439184,22528],"eu":[3312784,22528],"sh":[3287152,22528]}], +"textures/cave/hmc_textures.06800.rgba16.png": [32,32,2048,{"jp":[3432432,26624],"us":[3439184,26624],"eu":[3312784,26624],"sh":[3287152,26624]}], +"textures/cave/hmc_textures.07000.rgba16.png": [32,32,2048,{"jp":[3432432,28672],"us":[3439184,28672],"eu":[3312784,28672],"sh":[3287152,28672]}], +"textures/cave/hmc_textures.07800.rgba16.png": [32,64,4096,{"jp":[3432432,30720],"us":[3439184,30720],"eu":[3312784,30720],"sh":[3287152,30720]}], +"textures/cave/hmc_textures.08800.rgba16.png": [32,64,4096,{"jp":[3432432,34816],"us":[3439184,34816],"eu":[3312784,34816],"sh":[3287152,34816]}], +"textures/cave/hmc_textures.09800.rgba16.png": [32,32,2048,{"jp":[3432432,38912],"us":[3439184,38912],"eu":[3312784,38912],"sh":[3287152,38912]}], +"textures/cave/hmc_textures.0A000.rgba16.png": [32,32,2048,{"jp":[3432432,40960],"us":[3439184,40960],"eu":[3312784,40960],"sh":[3287152,40960]}], +"textures/cave/hmc_textures.0A800.rgba16.png": [32,64,4096,{"jp":[3432432,43008],"us":[3439184,43008],"eu":[3312784,43008],"sh":[3287152,43008]}], +"textures/cave/hmc_textures.0B800.ia16.png": [32,32,2048,{"jp":[3432432,47104],"us":[3439184,47104],"eu":[3312784,47104],"sh":[3287152,47104]}], +"textures/cave/hmc_textures.0C000.ia16.png": [32,32,2048,{"jp":[3298272,43008],"us":[3305024,43008],"eu":[3178624,43008],"sh":[3152992,43008]}], "textures/skyboxes/bbh.png": [84288,{"jp":[3118928,0],"us":[3125680,0],"eu":[2999280,0]}], "textures/skyboxes/bidw.png": [131392,{"jp":[3146352,0],"us":[3153104,0],"eu":[3026704,0]}], "textures/skyboxes/bitfs.png": [102720,{"jp":[2942432,0],"us":[2949184,0],"eu":[2822784,0]}], @@ -1056,192 +1056,192 @@ "textures/skyboxes/ssl.png": [131392,{"jp":[3078784,0],"us":[3085536,0],"eu":[2959136,0]}], "textures/skyboxes/water.png": [131392,{"jp":[2796624,0],"us":[2803376,0],"eu":[2676976,0]}], "textures/skyboxes/wdw.png": [131392,{"jp":[2968208,0],"us":[2974960,0],"eu":[2848560,0]}], -"textures/effect/bubble.06048.rgba16.png": [32,32,2048,{"jp":[3594960,24648],"us":[3601712,24648],"eu":[3475312,24648]}], -"textures/effect/flower.00008.rgba16.png": [32,32,2048,{"jp":[3594960,8],"us":[3601712,8],"eu":[3475312,8]}], -"textures/effect/flower.00808.rgba16.png": [32,32,2048,{"jp":[3594960,2056],"us":[3601712,2056],"eu":[3475312,2056]}], -"textures/effect/flower.01008.rgba16.png": [32,32,2048,{"jp":[3594960,4104],"us":[3601712,4104],"eu":[3475312,4104]}], -"textures/effect/flower.01808.rgba16.png": [32,32,2048,{"jp":[3594960,6152],"us":[3601712,6152],"eu":[3475312,6152]}], -"textures/effect/lava_bubble.02020.rgba16.png": [32,32,2048,{"jp":[3594960,8224],"us":[3601712,8224],"eu":[3475312,8224]}], -"textures/effect/lava_bubble.02820.rgba16.png": [32,32,2048,{"jp":[3594960,10272],"us":[3601712,10272],"eu":[3475312,10272]}], -"textures/effect/lava_bubble.03020.rgba16.png": [32,32,2048,{"jp":[3594960,12320],"us":[3601712,12320],"eu":[3475312,12320]}], -"textures/effect/lava_bubble.03820.rgba16.png": [32,32,2048,{"jp":[3594960,14368],"us":[3601712,14368],"eu":[3475312,14368]}], -"textures/effect/lava_bubble.04020.rgba16.png": [32,32,2048,{"jp":[3594960,16416],"us":[3601712,16416],"eu":[3475312,16416]}], -"textures/effect/lava_bubble.04820.rgba16.png": [32,32,2048,{"jp":[3594960,18464],"us":[3601712,18464],"eu":[3475312,18464]}], -"textures/effect/lava_bubble.05020.rgba16.png": [32,32,2048,{"jp":[3594960,20512],"us":[3601712,20512],"eu":[3475312,20512]}], -"textures/effect/lava_bubble.05820.rgba16.png": [32,32,2048,{"jp":[3594960,22560],"us":[3601712,22560],"eu":[3475312,22560]}], -"textures/effect/tiny_bubble.0684C.rgba16.png": [16,16,512,{"jp":[3594960,26700],"us":[3601712,26700],"eu":[3475312,26700]}], -"textures/effect/tiny_bubble.06AD8.rgba16.png": [16,16,512,{"jp":[3594960,27352],"us":[3601712,27352],"eu":[3475312,27352]}], -"textures/fire/lll_textures.00000.rgba16.png": [32,32,2048,{"jp":[3262320,0],"us":[3269072,0],"eu":[3142672,0]}], -"textures/fire/lll_textures.00800.rgba16.png": [32,32,2048,{"jp":[3262320,2048],"us":[3269072,2048],"eu":[3142672,2048]}], -"textures/fire/lll_textures.01000.rgba16.png": [32,32,2048,{"jp":[3262320,4096],"us":[3269072,4096],"eu":[3142672,4096]}], -"textures/fire/lll_textures.01800.rgba16.png": [32,32,2048,{"jp":[3262320,6144],"us":[3269072,6144],"eu":[3142672,6144]}], -"textures/fire/lll_textures.02000.rgba16.png": [32,32,2048,{"jp":[3262320,8192],"us":[3269072,8192],"eu":[3142672,8192]}], -"textures/fire/lll_textures.02800.rgba16.png": [32,32,2048,{"jp":[3262320,10240],"us":[3269072,10240],"eu":[3142672,10240]}], -"textures/fire/lll_textures.03000.rgba16.png": [32,32,2048,{"jp":[3262320,12288],"us":[3269072,12288],"eu":[3142672,12288]}], -"textures/fire/lll_textures.03800.rgba16.png": [32,32,2048,{"jp":[3262320,14336],"us":[3269072,14336],"eu":[3142672,14336]}], -"textures/fire/lll_textures.04000.rgba16.png": [32,32,2048,{"jp":[3262320,16384],"us":[3269072,16384],"eu":[3142672,16384]}], -"textures/fire/lll_textures.04800.rgba16.png": [32,32,2048,{"jp":[3262320,18432],"us":[3269072,18432],"eu":[3142672,18432]}], -"textures/fire/lll_textures.05000.rgba16.png": [32,32,2048,{"jp":[3262320,20480],"us":[3269072,20480],"eu":[3142672,20480]}], -"textures/fire/lll_textures.05800.rgba16.png": [32,32,2048,{"jp":[3262320,22528],"us":[3269072,22528],"eu":[3142672,22528]}], -"textures/fire/lll_textures.06000.rgba16.png": [32,32,2048,{"jp":[3262320,24576],"us":[3269072,24576],"eu":[3142672,24576]}], -"textures/fire/lll_textures.06800.rgba16.png": [32,32,2048,{"jp":[3262320,26624],"us":[3269072,26624],"eu":[3142672,26624]}], -"textures/fire/lll_textures.07000.rgba16.png": [32,32,2048,{"jp":[3262320,28672],"us":[3269072,28672],"eu":[3142672,28672]}], -"textures/fire/lll_textures.07800.rgba16.png": [32,32,2048,{"jp":[3262320,30720],"us":[3269072,30720],"eu":[3142672,30720]}], -"textures/fire/lll_textures.08000.rgba16.png": [32,32,2048,{"jp":[3262320,32768],"us":[3269072,32768],"eu":[3142672,32768]}], -"textures/fire/lll_textures.08800.rgba16.png": [32,32,2048,{"jp":[3262320,34816],"us":[3269072,34816],"eu":[3142672,34816]}], -"textures/fire/lll_textures.09000.rgba16.png": [32,32,2048,{"jp":[1078992,80984],"us":[1083968,92856],"eu":[909712,49528]}], -"textures/fire/lll_textures.09800.rgba16.png": [32,32,2048,{"jp":[3262320,38912],"us":[3269072,38912],"eu":[3142672,38912]}], -"textures/fire/lll_textures.0A000.rgba16.png": [32,32,2048,{"jp":[3262320,40960],"us":[3269072,40960],"eu":[3142672,40960]}], -"textures/fire/lll_textures.0A800.rgba16.png": [32,32,2048,{"jp":[3262320,43008],"us":[3269072,43008],"eu":[3142672,43008]}], -"textures/fire/lll_textures.0B000.rgba16.png": [32,32,2048,{"jp":[3262320,45056],"us":[3269072,45056],"eu":[3142672,45056]}], -"textures/fire/lll_textures.0B800.rgba16.png": [32,32,2048,{"jp":[3262320,47104],"us":[3269072,47104],"eu":[3142672,47104]}], -"textures/generic/bob_textures.00000.rgba16.png": [32,32,2048,{"jp":[3323408,0],"us":[3330160,0],"eu":[3203760,0]}], -"textures/generic/bob_textures.00800.rgba16.png": [32,32,2048,{"jp":[1327760,36160],"us":[1334928,36160],"eu":[1206896,36160]}], -"textures/generic/bob_textures.01000.rgba16.png": [32,32,2048,{"jp":[3323408,4096],"us":[3330160,4096],"eu":[3203760,4096]}], -"textures/generic/bob_textures.01800.rgba16.png": [32,32,2048,{"jp":[3323408,6144],"us":[3330160,6144],"eu":[3203760,6144]}], -"textures/generic/bob_textures.02000.rgba16.png": [32,32,2048,{"jp":[3323408,8192],"us":[3330160,8192],"eu":[3203760,8192]}], -"textures/generic/bob_textures.02800.rgba16.png": [32,32,2048,{"jp":[3323408,10240],"us":[3330160,10240],"eu":[3203760,10240]}], -"textures/generic/bob_textures.03000.rgba16.png": [32,32,2048,{"jp":[3323408,12288],"us":[3330160,12288],"eu":[3203760,12288]}], -"textures/generic/bob_textures.03800.rgba16.png": [32,32,2048,{"jp":[3323408,14336],"us":[3330160,14336],"eu":[3203760,14336]}], -"textures/generic/bob_textures.04000.rgba16.png": [32,32,2048,{"jp":[3323408,16384],"us":[3330160,16384],"eu":[3203760,16384]}], -"textures/generic/bob_textures.04800.rgba16.png": [32,32,2048,{"jp":[3323408,18432],"us":[3330160,18432],"eu":[3203760,18432]}], -"textures/generic/bob_textures.05000.rgba16.png": [32,32,2048,{"jp":[3323408,20480],"us":[3330160,20480],"eu":[3203760,20480]}], -"textures/generic/bob_textures.05800.rgba16.png": [32,32,2048,{"jp":[3323408,22528],"us":[3330160,22528],"eu":[3203760,22528]}], -"textures/generic/bob_textures.06000.rgba16.png": [32,64,4096,{"jp":[3323408,24576],"us":[3330160,24576],"eu":[3203760,24576]}], -"textures/generic/bob_textures.07000.rgba16.png": [32,32,2048,{"jp":[3323408,28672],"us":[3330160,28672],"eu":[3203760,28672]}], -"textures/generic/bob_textures.07800.rgba16.png": [32,32,2048,{"jp":[3323408,30720],"us":[3330160,30720],"eu":[3203760,30720]}], -"textures/generic/bob_textures.08000.rgba16.png": [32,32,2048,{"jp":[3323408,32768],"us":[3330160,32768],"eu":[3203760,32768]}], -"textures/generic/bob_textures.08800.rgba16.png": [32,32,2048,{"jp":[3323408,34816],"us":[3330160,34816],"eu":[3203760,34816]}], -"textures/generic/bob_textures.09000.rgba16.png": [32,32,2048,{"jp":[3323408,36864],"us":[3330160,36864],"eu":[3203760,36864]}], -"textures/generic/bob_textures.09800.rgba16.png": [32,32,2048,{"jp":[3323408,38912],"us":[3330160,38912],"eu":[3203760,38912]}], -"textures/generic/bob_textures.0A000.rgba16.png": [32,32,2048,{"jp":[3323408,40960],"us":[3330160,40960],"eu":[3203760,40960]}], -"textures/generic/bob_textures.0A800.rgba16.png": [32,32,2048,{"jp":[3323408,43008],"us":[3330160,43008],"eu":[3203760,43008]}], -"textures/generic/bob_textures.0B000.ia16.png": [32,32,2048,{"jp":[3323408,45056],"us":[3330160,45056],"eu":[3203760,45056]}], -"textures/grass/wf_textures.00000.rgba16.png": [32,32,2048,{"jp":[3496176,0],"us":[3502928,0],"eu":[3376528,0]}], -"textures/grass/wf_textures.00800.rgba16.png": [32,32,2048,{"jp":[3496176,2048],"us":[3502928,2048],"eu":[3376528,2048]}], -"textures/grass/wf_textures.01000.rgba16.png": [32,32,2048,{"jp":[3496176,4096],"us":[3502928,4096],"eu":[3376528,4096]}], -"textures/grass/wf_textures.01800.rgba16.png": [32,32,2048,{"jp":[3496176,6144],"us":[3502928,6144],"eu":[3376528,6144]}], -"textures/grass/wf_textures.02000.rgba16.png": [32,32,2048,{"jp":[3496176,8192],"us":[3502928,8192],"eu":[3376528,8192]}], -"textures/grass/wf_textures.02800.rgba16.png": [32,32,2048,{"jp":[3496176,10240],"us":[3502928,10240],"eu":[3376528,10240]}], -"textures/grass/wf_textures.03000.rgba16.png": [32,32,2048,{"jp":[3496176,12288],"us":[3502928,12288],"eu":[3376528,12288]}], -"textures/grass/wf_textures.03800.rgba16.png": [32,32,2048,{"jp":[3496176,14336],"us":[3502928,14336],"eu":[3376528,14336]}], -"textures/grass/wf_textures.04000.rgba16.png": [32,32,2048,{"jp":[3496176,16384],"us":[3502928,16384],"eu":[3376528,16384]}], -"textures/grass/wf_textures.04800.rgba16.png": [32,32,2048,{"jp":[3496176,18432],"us":[3502928,18432],"eu":[3376528,18432]}], -"textures/grass/wf_textures.05000.rgba16.png": [32,32,2048,{"jp":[3496176,20480],"us":[3502928,20480],"eu":[3376528,20480]}], -"textures/grass/wf_textures.05800.rgba16.png": [32,32,2048,{"jp":[3496176,22528],"us":[3502928,22528],"eu":[3376528,22528]}], -"textures/grass/wf_textures.06000.rgba16.png": [32,32,2048,{"jp":[3390640,20480],"us":[3397392,20480],"eu":[3270992,20480]}], -"textures/grass/wf_textures.06800.rgba16.png": [32,32,2048,{"jp":[3496176,26624],"us":[3502928,26624],"eu":[3376528,26624]}], -"textures/grass/wf_textures.07000.rgba16.png": [32,32,2048,{"jp":[3496176,28672],"us":[3502928,28672],"eu":[3376528,28672]}], -"textures/grass/wf_textures.07800.rgba16.png": [32,32,2048,{"jp":[3496176,30720],"us":[3502928,30720],"eu":[3376528,30720]}], -"textures/grass/wf_textures.08000.rgba16.png": [32,32,2048,{"jp":[3496176,32768],"us":[3502928,32768],"eu":[3376528,32768]}], -"textures/grass/wf_textures.08800.rgba16.png": [32,32,2048,{"jp":[3496176,34816],"us":[3502928,34816],"eu":[3376528,34816]}], -"textures/grass/wf_textures.09000.rgba16.png": [32,32,2048,{"jp":[3496176,36864],"us":[3502928,36864],"eu":[3376528,36864]}], -"textures/grass/wf_textures.09800.rgba16.png": [32,32,2048,{"jp":[3496176,38912],"us":[3502928,38912],"eu":[3376528,38912]}], -"textures/grass/wf_textures.0A000.rgba16.png": [32,32,2048,{"jp":[3496176,40960],"us":[3502928,40960],"eu":[3376528,40960]}], -"textures/grass/wf_textures.0A800.rgba16.png": [32,32,2048,{"jp":[3496176,43008],"us":[3502928,43008],"eu":[3376528,43008]}], -"textures/grass/wf_textures.0B000.ia16.png": [32,32,2048,{"jp":[3323408,45056],"us":[3330160,45056],"eu":[3203760,45056]}], -"textures/grass/wf_textures.0B800.ia16.png": [32,32,2048,{"jp":[3496176,47104],"us":[3502928,47104],"eu":[3376528,47104]}], -"textures/inside/inside_castle_textures.00000.rgba16.png": [64,32,4096,{"jp":[3555104,0],"us":[3561856,0],"eu":[3435456,0]}], -"textures/inside/inside_castle_textures.01000.rgba16.png": [64,32,4096,{"jp":[3555104,4096],"us":[3561856,4096],"eu":[3435456,4096]}], -"textures/inside/inside_castle_textures.02000.rgba16.png": [32,64,4096,{"jp":[3555104,8192],"us":[3561856,8192],"eu":[3435456,8192]}], -"textures/inside/inside_castle_textures.03000.rgba16.png": [32,32,2048,{"jp":[3555104,12288],"us":[3561856,12288],"eu":[3435456,12288]}], -"textures/inside/inside_castle_textures.03800.rgba16.png": [32,32,2048,{"jp":[3555104,14336],"us":[3561856,14336],"eu":[3435456,14336]}], -"textures/inside/inside_castle_textures.04000.rgba16.png": [32,32,2048,{"jp":[3555104,16384],"us":[3561856,16384],"eu":[3435456,16384]}], -"textures/inside/inside_castle_textures.04800.rgba16.png": [32,32,2048,{"jp":[3460352,2048],"us":[3467104,2048],"eu":[3340704,2048]}], -"textures/inside/inside_castle_textures.05000.rgba16.png": [32,32,2048,{"jp":[3555104,20480],"us":[3561856,20480],"eu":[3435456,20480]}], -"textures/inside/inside_castle_textures.05800.rgba16.png": [32,32,2048,{"jp":[3555104,22528],"us":[3561856,22528],"eu":[3435456,22528]}], -"textures/inside/inside_castle_textures.06000.rgba16.png": [32,64,4096,{"jp":[3555104,24576],"us":[3561856,24576],"eu":[3435456,24576]}], -"textures/inside/inside_castle_textures.07000.rgba16.png": [32,64,4096,{"jp":[3555104,28672],"us":[3561856,28672],"eu":[3435456,28672]}], -"textures/inside/inside_castle_textures.08000.rgba16.png": [32,32,2048,{"jp":[3555104,32768],"us":[3561856,32768],"eu":[3435456,32768]}], -"textures/inside/inside_castle_textures.08800.rgba16.png": [32,32,2048,{"jp":[3555104,34816],"us":[3561856,34816],"eu":[3435456,34816]}], -"textures/inside/inside_castle_textures.09000.rgba16.png": [32,64,4096,{"jp":[3555104,36864],"us":[3561856,36864],"eu":[3435456,36864]}], -"textures/inside/inside_castle_textures.0A000.rgba16.png": [32,64,4096,{"jp":[3555104,40960],"us":[3561856,40960],"eu":[3435456,40960]}], -"textures/inside/inside_castle_textures.0B000.rgba16.png": [32,32,2048,{"jp":[3555104,45056],"us":[3561856,45056],"eu":[3435456,45056]}], -"textures/inside/inside_castle_textures.0B800.rgba16.png": [64,32,4096,{"jp":[3555104,47104],"us":[3561856,47104],"eu":[3435456,47104]}], -"textures/intro_raw/hand_closed.rgba16.png": [32,32,2048,{"jp":[2455304],"us":[2463112],"eu":[2331912]}], -"textures/intro_raw/hand_open.rgba16.png": [32,32,2048,{"jp":[2453248],"us":[2461056],"eu":[2329856]}], -"textures/intro_raw/mario_face_shine.ia8.png": [32,32,1024,{"jp":[2503888],"us":[2511696],"eu":[2380496]}], -"textures/intro_raw/red_star_0.rgba16.png": [32,32,2048,{"jp":[2457352],"us":[2465160],"eu":[2333960]}], -"textures/intro_raw/red_star_1.rgba16.png": [32,32,2048,{"jp":[2459400],"us":[2467208],"eu":[2336008]}], -"textures/intro_raw/red_star_2.rgba16.png": [32,32,2048,{"jp":[2461448],"us":[2469256],"eu":[2338056]}], -"textures/intro_raw/red_star_3.rgba16.png": [32,32,2048,{"jp":[2463496],"us":[2471304],"eu":[2340104]}], -"textures/intro_raw/red_star_4.rgba16.png": [32,32,2048,{"jp":[2465544],"us":[2473352],"eu":[2342152]}], -"textures/intro_raw/red_star_5.rgba16.png": [32,32,2048,{"jp":[2467592],"us":[2475400],"eu":[2344200]}], -"textures/intro_raw/red_star_6.rgba16.png": [32,32,2048,{"jp":[2469640],"us":[2477448],"eu":[2346248]}], -"textures/intro_raw/red_star_7.rgba16.png": [32,32,2048,{"jp":[2471688],"us":[2479496],"eu":[2348296]}], -"textures/intro_raw/sparkle_0.rgba16.png": [32,32,2048,{"jp":[2490888],"us":[2498696],"eu":[2367496]}], -"textures/intro_raw/sparkle_1.rgba16.png": [32,32,2048,{"jp":[2492936],"us":[2500744],"eu":[2369544]}], -"textures/intro_raw/sparkle_2.rgba16.png": [32,32,2048,{"jp":[2494984],"us":[2502792],"eu":[2371592]}], -"textures/intro_raw/sparkle_3.rgba16.png": [32,32,2048,{"jp":[2497032],"us":[2504840],"eu":[2373640]}], -"textures/intro_raw/sparkle_4.rgba16.png": [32,32,2048,{"jp":[2499080],"us":[2506888],"eu":[2375688]}], -"textures/intro_raw/sparkle_5.rgba16.png": [32,32,2048,{"jp":[2501128],"us":[2508936],"eu":[2377736]}], -"textures/intro_raw/white_star_0.rgba16.png": [32,32,2048,{"jp":[2473736],"us":[2481544],"eu":[2350344]}], -"textures/intro_raw/white_star_1.rgba16.png": [32,32,2048,{"jp":[2475784],"us":[2483592],"eu":[2352392]}], -"textures/intro_raw/white_star_2.rgba16.png": [32,32,2048,{"jp":[2477832],"us":[2485640],"eu":[2354440]}], -"textures/intro_raw/white_star_3.rgba16.png": [32,32,2048,{"jp":[2479880],"us":[2487688],"eu":[2356488]}], -"textures/intro_raw/white_star_4.rgba16.png": [32,32,2048,{"jp":[2481928],"us":[2489736],"eu":[2358536]}], -"textures/intro_raw/white_star_5.rgba16.png": [32,32,2048,{"jp":[2483976],"us":[2491784],"eu":[2360584]}], -"textures/intro_raw/white_star_6.rgba16.png": [32,32,2048,{"jp":[2486024],"us":[2493832],"eu":[2362632]}], -"textures/intro_raw/white_star_7.rgba16.png": [32,32,2048,{"jp":[2488072],"us":[2495880],"eu":[2364680]}], -"textures/machine/ttc_textures.00000.rgba16.png": [32,32,2048,{"jp":[3460352,0],"us":[3467104,0],"eu":[3340704,0]}], -"textures/machine/ttc_textures.00800.rgba16.png": [32,32,2048,{"jp":[3460352,2048],"us":[3467104,2048],"eu":[3340704,2048]}], -"textures/machine/ttc_textures.01000.rgba16.png": [32,32,2048,{"jp":[3460352,4096],"us":[3467104,4096],"eu":[3340704,4096]}], -"textures/machine/ttc_textures.01800.rgba16.png": [32,32,2048,{"jp":[3460352,6144],"us":[3467104,6144],"eu":[3340704,6144]}], -"textures/machine/ttc_textures.02000.rgba16.png": [32,32,2048,{"jp":[3460352,8192],"us":[3467104,8192],"eu":[3340704,8192]}], -"textures/machine/ttc_textures.02800.rgba16.png": [32,32,2048,{"jp":[3460352,10240],"us":[3467104,10240],"eu":[3340704,10240]}], -"textures/machine/ttc_textures.03000.rgba16.png": [32,32,2048,{"jp":[3460352,12288],"us":[3467104,12288],"eu":[3340704,12288]}], -"textures/machine/ttc_textures.03800.rgba16.png": [32,32,2048,{"jp":[3460352,14336],"us":[3467104,14336],"eu":[3340704,14336]}], -"textures/machine/ttc_textures.04000.rgba16.png": [32,64,4096,{"jp":[3460352,16384],"us":[3467104,16384],"eu":[3340704,16384]}], -"textures/machine/ttc_textures.05000.rgba16.png": [32,32,2048,{"jp":[3460352,20480],"us":[3467104,20480],"eu":[3340704,20480]}], -"textures/machine/ttc_textures.05800.rgba16.png": [32,32,2048,{"jp":[3460352,22528],"us":[3467104,22528],"eu":[3340704,22528]}], -"textures/machine/ttc_textures.06000.rgba16.png": [32,32,2048,{"jp":[3460352,24576],"us":[3467104,24576],"eu":[3340704,24576]}], -"textures/machine/ttc_textures.06800.rgba16.png": [32,32,2048,{"jp":[3460352,26624],"us":[3467104,26624],"eu":[3340704,26624]}], -"textures/machine/ttc_textures.07000.rgba16.png": [32,32,2048,{"jp":[3460352,28672],"us":[3467104,28672],"eu":[3340704,28672]}], -"textures/machine/ttc_textures.07800.rgba16.png": [16,64,2048,{"jp":[3460352,30720],"us":[3467104,30720],"eu":[3340704,30720]}], -"textures/machine/ttc_textures.08000.rgba16.png": [64,8,1024,{"jp":[3460352,32768],"us":[3467104,32768],"eu":[3340704,32768]}], -"textures/machine/ttc_textures.08400.rgba16.png": [32,32,2048,{"jp":[3460352,33792],"us":[3467104,33792],"eu":[3340704,33792]}], -"textures/mountain/ttm_textures.00000.rgba16.png": [32,32,2048,{"jp":[3473152,0],"us":[3479904,0],"eu":[3353504,0]}], -"textures/mountain/ttm_textures.00800.rgba16.png": [64,32,4096,{"jp":[3473152,2048],"us":[3479904,2048],"eu":[3353504,2048]}], -"textures/mountain/ttm_textures.01800.rgba16.png": [32,64,4096,{"jp":[3473152,6144],"us":[3479904,6144],"eu":[3353504,6144]}], -"textures/mountain/ttm_textures.02800.rgba16.png": [32,32,2048,{"jp":[3473152,10240],"us":[3479904,10240],"eu":[3353504,10240]}], -"textures/mountain/ttm_textures.03000.rgba16.png": [32,32,2048,{"jp":[3473152,12288],"us":[3479904,12288],"eu":[3353504,12288]}], -"textures/mountain/ttm_textures.03800.rgba16.png": [32,32,2048,{"jp":[3473152,14336],"us":[3479904,14336],"eu":[3353504,14336]}], -"textures/mountain/ttm_textures.04000.rgba16.png": [32,32,2048,{"jp":[3473152,16384],"us":[3479904,16384],"eu":[3353504,16384]}], -"textures/mountain/ttm_textures.04800.rgba16.png": [32,32,2048,{"jp":[3473152,18432],"us":[3479904,18432],"eu":[3353504,18432]}], -"textures/mountain/ttm_textures.05000.rgba16.png": [32,32,2048,{"jp":[3473152,20480],"us":[3479904,20480],"eu":[3353504,20480]}], -"textures/mountain/ttm_textures.05800.rgba16.png": [32,64,4096,{"jp":[3473152,22528],"us":[3479904,22528],"eu":[3353504,22528]}], -"textures/mountain/ttm_textures.06800.rgba16.png": [32,32,2048,{"jp":[3473152,26624],"us":[3479904,26624],"eu":[3353504,26624]}], -"textures/mountain/ttm_textures.07000.rgba16.png": [32,32,2048,{"jp":[3473152,28672],"us":[3479904,28672],"eu":[3353504,28672]}], -"textures/mountain/ttm_textures.07800.rgba16.png": [32,32,2048,{"jp":[3473152,30720],"us":[3479904,30720],"eu":[3353504,30720]}], -"textures/mountain/ttm_textures.08000.rgba16.png": [32,32,2048,{"jp":[3473152,32768],"us":[3479904,32768],"eu":[3353504,32768]}], -"textures/mountain/ttm_textures.08800.rgba16.png": [64,32,4096,{"jp":[3473152,34816],"us":[3479904,34816],"eu":[3353504,34816]}], -"textures/mountain/ttm_textures.09800.rgba16.png": [32,32,2048,{"jp":[3473152,38912],"us":[3479904,38912],"eu":[3353504,38912]}], -"textures/mountain/ttm_textures.0A000.rgba16.png": [32,32,2048,{"jp":[3390640,24576],"us":[3397392,24576],"eu":[3270992,24576]}], -"textures/mountain/ttm_textures.0A800.rgba16.png": [32,32,2048,{"jp":[3473152,43008],"us":[3479904,43008],"eu":[3353504,43008]}], -"textures/mountain/ttm_textures.0B000.rgba16.png": [32,32,2048,{"jp":[3473152,45056],"us":[3479904,45056],"eu":[3353504,45056]}], -"textures/mountain/ttm_textures.0B800.rgba16.png": [32,32,2048,{"jp":[3473152,47104],"us":[3479904,47104],"eu":[3353504,47104]}], -"textures/mountain/ttm_textures.0C000.rgba16.png": [32,32,2048,{"jp":[3473152,49152],"us":[3479904,49152],"eu":[3353504,49152]}], -"textures/outside/castle_grounds_textures.00000.rgba16.png": [32,32,2048,{"jp":[3527344,0],"us":[3534096,0],"eu":[3407696,0]}], -"textures/outside/castle_grounds_textures.00800.rgba16.png": [32,32,2048,{"jp":[3527344,2048],"us":[3534096,2048],"eu":[3407696,2048]}], -"textures/outside/castle_grounds_textures.01000.rgba16.png": [64,32,4096,{"jp":[3527344,4096],"us":[3534096,4096],"eu":[3407696,4096]}], -"textures/outside/castle_grounds_textures.02000.rgba16.png": [32,64,4096,{"jp":[3527344,8192],"us":[3534096,8192],"eu":[3407696,8192]}], -"textures/outside/castle_grounds_textures.03000.rgba16.png": [32,32,2048,{"jp":[3527344,12288],"us":[3534096,12288],"eu":[3407696,12288]}], -"textures/outside/castle_grounds_textures.03800.rgba16.png": [32,32,2048,{"jp":[3527344,14336],"us":[3534096,14336],"eu":[3407696,14336]}], -"textures/outside/castle_grounds_textures.04000.rgba16.png": [32,32,2048,{"jp":[3527344,16384],"us":[3534096,16384],"eu":[3407696,16384]}], -"textures/outside/castle_grounds_textures.04800.rgba16.png": [32,64,4096,{"jp":[3527344,18432],"us":[3534096,18432],"eu":[3407696,18432]}], -"textures/outside/castle_grounds_textures.05800.rgba16.png": [32,32,2048,{"jp":[3527344,22528],"us":[3534096,22528],"eu":[3407696,22528]}], -"textures/outside/castle_grounds_textures.06000.rgba16.png": [32,32,2048,{"jp":[3527344,24576],"us":[3534096,24576],"eu":[3407696,24576]}], -"textures/outside/castle_grounds_textures.06800.rgba16.png": [64,32,4096,{"jp":[3527344,26624],"us":[3534096,26624],"eu":[3407696,26624]}], -"textures/outside/castle_grounds_textures.07800.rgba16.png": [32,32,2048,{"jp":[3527344,30720],"us":[3534096,30720],"eu":[3407696,30720]}], -"textures/outside/castle_grounds_textures.08000.rgba16.png": [32,32,2048,{"jp":[3527344,32768],"us":[3534096,32768],"eu":[3407696,32768]}], -"textures/outside/castle_grounds_textures.08800.rgba16.png": [32,32,2048,{"jp":[3527344,34816],"us":[3534096,34816],"eu":[3407696,34816]}], -"textures/outside/castle_grounds_textures.09000.rgba16.png": [32,32,2048,{"jp":[3527344,36864],"us":[3534096,36864],"eu":[3407696,36864]}], -"textures/outside/castle_grounds_textures.09800.rgba16.png": [32,32,2048,{"jp":[3527344,38912],"us":[3534096,38912],"eu":[3407696,38912]}], -"textures/outside/castle_grounds_textures.0A000.rgba16.png": [32,32,2048,{"jp":[3527344,40960],"us":[3534096,40960],"eu":[3407696,40960]}], -"textures/outside/castle_grounds_textures.0A800.rgba16.png": [32,32,2048,{"jp":[3527344,43008],"us":[3534096,43008],"eu":[3407696,43008]}], -"textures/outside/castle_grounds_textures.0B000.rgba16.png": [16,32,1024,{"jp":[3527344,45056],"us":[3534096,45056],"eu":[3407696,45056]}], -"textures/outside/castle_grounds_textures.0B400.rgba16.png": [32,32,2048,{"jp":[3527344,46080],"us":[3534096,46080],"eu":[3407696,46080]}], -"textures/outside/castle_grounds_textures.0BC00.ia16.png": [32,32,2048,{"jp":[3323408,45056],"us":[3330160,45056],"eu":[3203760,45056]}], +"textures/effect/bubble.06048.rgba16.png": [32,32,2048,{"jp":[3594960,24648],"us":[3601712,24648],"eu":[3475312,24648],"sh":[3449680,24648]}], +"textures/effect/flower.00008.rgba16.png": [32,32,2048,{"jp":[3594960,8],"us":[3601712,8],"eu":[3475312,8],"sh":[3449680,8]}], +"textures/effect/flower.00808.rgba16.png": [32,32,2048,{"jp":[3594960,2056],"us":[3601712,2056],"eu":[3475312,2056],"sh":[3449680,2056]}], +"textures/effect/flower.01008.rgba16.png": [32,32,2048,{"jp":[3594960,4104],"us":[3601712,4104],"eu":[3475312,4104],"sh":[3449680,4104]}], +"textures/effect/flower.01808.rgba16.png": [32,32,2048,{"jp":[3594960,6152],"us":[3601712,6152],"eu":[3475312,6152],"sh":[3449680,6152]}], +"textures/effect/lava_bubble.02020.rgba16.png": [32,32,2048,{"jp":[3594960,8224],"us":[3601712,8224],"eu":[3475312,8224],"sh":[3449680,8224]}], +"textures/effect/lava_bubble.02820.rgba16.png": [32,32,2048,{"jp":[3594960,10272],"us":[3601712,10272],"eu":[3475312,10272],"sh":[3449680,10272]}], +"textures/effect/lava_bubble.03020.rgba16.png": [32,32,2048,{"jp":[3594960,12320],"us":[3601712,12320],"eu":[3475312,12320],"sh":[3449680,12320]}], +"textures/effect/lava_bubble.03820.rgba16.png": [32,32,2048,{"jp":[3594960,14368],"us":[3601712,14368],"eu":[3475312,14368],"sh":[3449680,14368]}], +"textures/effect/lava_bubble.04020.rgba16.png": [32,32,2048,{"jp":[3594960,16416],"us":[3601712,16416],"eu":[3475312,16416],"sh":[3449680,16416]}], +"textures/effect/lava_bubble.04820.rgba16.png": [32,32,2048,{"jp":[3594960,18464],"us":[3601712,18464],"eu":[3475312,18464],"sh":[3449680,18464]}], +"textures/effect/lava_bubble.05020.rgba16.png": [32,32,2048,{"jp":[3594960,20512],"us":[3601712,20512],"eu":[3475312,20512],"sh":[3449680,20512]}], +"textures/effect/lava_bubble.05820.rgba16.png": [32,32,2048,{"jp":[3594960,22560],"us":[3601712,22560],"eu":[3475312,22560],"sh":[3449680,22560]}], +"textures/effect/tiny_bubble.0684C.rgba16.png": [16,16,512,{"jp":[3594960,26700],"us":[3601712,26700],"eu":[3475312,26700],"sh":[3449680,26700]}], +"textures/effect/tiny_bubble.06AD8.rgba16.png": [16,16,512,{"jp":[3594960,27352],"us":[3601712,27352],"eu":[3475312,27352],"sh":[3449680,27352]}], +"textures/fire/lll_textures.00000.rgba16.png": [32,32,2048,{"jp":[3262320,0],"us":[3269072,0],"eu":[3142672,0],"sh":[3117040,0]}], +"textures/fire/lll_textures.00800.rgba16.png": [32,32,2048,{"jp":[3262320,2048],"us":[3269072,2048],"eu":[3142672,2048],"sh":[3117040,2048]}], +"textures/fire/lll_textures.01000.rgba16.png": [32,32,2048,{"jp":[3262320,4096],"us":[3269072,4096],"eu":[3142672,4096],"sh":[3117040,4096]}], +"textures/fire/lll_textures.01800.rgba16.png": [32,32,2048,{"jp":[3262320,6144],"us":[3269072,6144],"eu":[3142672,6144],"sh":[3117040,6144]}], +"textures/fire/lll_textures.02000.rgba16.png": [32,32,2048,{"jp":[3262320,8192],"us":[3269072,8192],"eu":[3142672,8192],"sh":[3117040,8192]}], +"textures/fire/lll_textures.02800.rgba16.png": [32,32,2048,{"jp":[3262320,10240],"us":[3269072,10240],"eu":[3142672,10240],"sh":[3117040,10240]}], +"textures/fire/lll_textures.03000.rgba16.png": [32,32,2048,{"jp":[3262320,12288],"us":[3269072,12288],"eu":[3142672,12288],"sh":[3117040,12288]}], +"textures/fire/lll_textures.03800.rgba16.png": [32,32,2048,{"jp":[3262320,14336],"us":[3269072,14336],"eu":[3142672,14336],"sh":[3117040,14336]}], +"textures/fire/lll_textures.04000.rgba16.png": [32,32,2048,{"jp":[3262320,16384],"us":[3269072,16384],"eu":[3142672,16384],"sh":[3117040,16384]}], +"textures/fire/lll_textures.04800.rgba16.png": [32,32,2048,{"jp":[3262320,18432],"us":[3269072,18432],"eu":[3142672,18432],"sh":[3117040,18432]}], +"textures/fire/lll_textures.05000.rgba16.png": [32,32,2048,{"jp":[3262320,20480],"us":[3269072,20480],"eu":[3142672,20480],"sh":[3117040,20480]}], +"textures/fire/lll_textures.05800.rgba16.png": [32,32,2048,{"jp":[3262320,22528],"us":[3269072,22528],"eu":[3142672,22528],"sh":[3117040,22528]}], +"textures/fire/lll_textures.06000.rgba16.png": [32,32,2048,{"jp":[3262320,24576],"us":[3269072,24576],"eu":[3142672,24576],"sh":[3117040,24576]}], +"textures/fire/lll_textures.06800.rgba16.png": [32,32,2048,{"jp":[3262320,26624],"us":[3269072,26624],"eu":[3142672,26624],"sh":[3117040,26624]}], +"textures/fire/lll_textures.07000.rgba16.png": [32,32,2048,{"jp":[3262320,28672],"us":[3269072,28672],"eu":[3142672,28672],"sh":[3117040,28672]}], +"textures/fire/lll_textures.07800.rgba16.png": [32,32,2048,{"jp":[3262320,30720],"us":[3269072,30720],"eu":[3142672,30720],"sh":[3117040,30720]}], +"textures/fire/lll_textures.08000.rgba16.png": [32,32,2048,{"jp":[3262320,32768],"us":[3269072,32768],"eu":[3142672,32768],"sh":[3117040,32768]}], +"textures/fire/lll_textures.08800.rgba16.png": [32,32,2048,{"jp":[3262320,34816],"us":[3269072,34816],"eu":[3142672,34816],"sh":[3117040,34816]}], +"textures/fire/lll_textures.09000.rgba16.png": [32,32,2048,{"jp":[1078992,80984],"us":[1083968,92856],"eu":[909712,49528],"sh":[934640,80984]}], +"textures/fire/lll_textures.09800.rgba16.png": [32,32,2048,{"jp":[3262320,38912],"us":[3269072,38912],"eu":[3142672,38912],"sh":[3117040,38912]}], +"textures/fire/lll_textures.0A000.rgba16.png": [32,32,2048,{"jp":[3262320,40960],"us":[3269072,40960],"eu":[3142672,40960],"sh":[3117040,40960]}], +"textures/fire/lll_textures.0A800.rgba16.png": [32,32,2048,{"jp":[3262320,43008],"us":[3269072,43008],"eu":[3142672,43008],"sh":[3117040,43008]}], +"textures/fire/lll_textures.0B000.rgba16.png": [32,32,2048,{"jp":[3262320,45056],"us":[3269072,45056],"eu":[3142672,45056],"sh":[3117040,45056]}], +"textures/fire/lll_textures.0B800.rgba16.png": [32,32,2048,{"jp":[3262320,47104],"us":[3269072,47104],"eu":[3142672,47104],"sh":[3117040,47104]}], +"textures/generic/bob_textures.00000.rgba16.png": [32,32,2048,{"jp":[3323408,0],"us":[3330160,0],"eu":[3203760,0],"sh":[3178128,0]}], +"textures/generic/bob_textures.00800.rgba16.png": [32,32,2048,{"jp":[1327760,36160],"us":[1334928,36160],"eu":[1206896,36160],"sh":[1183408,36160]}], +"textures/generic/bob_textures.01000.rgba16.png": [32,32,2048,{"jp":[3323408,4096],"us":[3330160,4096],"eu":[3203760,4096],"sh":[3178128,4096]}], +"textures/generic/bob_textures.01800.rgba16.png": [32,32,2048,{"jp":[3323408,6144],"us":[3330160,6144],"eu":[3203760,6144],"sh":[3178128,6144]}], +"textures/generic/bob_textures.02000.rgba16.png": [32,32,2048,{"jp":[3323408,8192],"us":[3330160,8192],"eu":[3203760,8192],"sh":[3178128,8192]}], +"textures/generic/bob_textures.02800.rgba16.png": [32,32,2048,{"jp":[3323408,10240],"us":[3330160,10240],"eu":[3203760,10240],"sh":[3178128,10240]}], +"textures/generic/bob_textures.03000.rgba16.png": [32,32,2048,{"jp":[3323408,12288],"us":[3330160,12288],"eu":[3203760,12288],"sh":[3178128,12288]}], +"textures/generic/bob_textures.03800.rgba16.png": [32,32,2048,{"jp":[3323408,14336],"us":[3330160,14336],"eu":[3203760,14336],"sh":[3178128,14336]}], +"textures/generic/bob_textures.04000.rgba16.png": [32,32,2048,{"jp":[3323408,16384],"us":[3330160,16384],"eu":[3203760,16384],"sh":[3178128,16384]}], +"textures/generic/bob_textures.04800.rgba16.png": [32,32,2048,{"jp":[3323408,18432],"us":[3330160,18432],"eu":[3203760,18432],"sh":[3178128,18432]}], +"textures/generic/bob_textures.05000.rgba16.png": [32,32,2048,{"jp":[3323408,20480],"us":[3330160,20480],"eu":[3203760,20480],"sh":[3178128,20480]}], +"textures/generic/bob_textures.05800.rgba16.png": [32,32,2048,{"jp":[3323408,22528],"us":[3330160,22528],"eu":[3203760,22528],"sh":[3178128,22528]}], +"textures/generic/bob_textures.06000.rgba16.png": [32,64,4096,{"jp":[3323408,24576],"us":[3330160,24576],"eu":[3203760,24576],"sh":[3178128,24576]}], +"textures/generic/bob_textures.07000.rgba16.png": [32,32,2048,{"jp":[3323408,28672],"us":[3330160,28672],"eu":[3203760,28672],"sh":[3178128,28672]}], +"textures/generic/bob_textures.07800.rgba16.png": [32,32,2048,{"jp":[3323408,30720],"us":[3330160,30720],"eu":[3203760,30720],"sh":[3178128,30720]}], +"textures/generic/bob_textures.08000.rgba16.png": [32,32,2048,{"jp":[3323408,32768],"us":[3330160,32768],"eu":[3203760,32768],"sh":[3178128,32768]}], +"textures/generic/bob_textures.08800.rgba16.png": [32,32,2048,{"jp":[3323408,34816],"us":[3330160,34816],"eu":[3203760,34816],"sh":[3178128,34816]}], +"textures/generic/bob_textures.09000.rgba16.png": [32,32,2048,{"jp":[3323408,36864],"us":[3330160,36864],"eu":[3203760,36864],"sh":[3178128,36864]}], +"textures/generic/bob_textures.09800.rgba16.png": [32,32,2048,{"jp":[3323408,38912],"us":[3330160,38912],"eu":[3203760,38912],"sh":[3178128,38912]}], +"textures/generic/bob_textures.0A000.rgba16.png": [32,32,2048,{"jp":[3323408,40960],"us":[3330160,40960],"eu":[3203760,40960],"sh":[3178128,40960]}], +"textures/generic/bob_textures.0A800.rgba16.png": [32,32,2048,{"jp":[3323408,43008],"us":[3330160,43008],"eu":[3203760,43008],"sh":[3178128,43008]}], +"textures/generic/bob_textures.0B000.ia16.png": [32,32,2048,{"jp":[3323408,45056],"us":[3330160,45056],"eu":[3203760,45056],"sh":[3178128,45056]}], +"textures/grass/wf_textures.00000.rgba16.png": [32,32,2048,{"jp":[3496176,0],"us":[3502928,0],"eu":[3376528,0],"sh":[3350896,0]}], +"textures/grass/wf_textures.00800.rgba16.png": [32,32,2048,{"jp":[3496176,2048],"us":[3502928,2048],"eu":[3376528,2048],"sh":[3350896,2048]}], +"textures/grass/wf_textures.01000.rgba16.png": [32,32,2048,{"jp":[3496176,4096],"us":[3502928,4096],"eu":[3376528,4096],"sh":[3350896,4096]}], +"textures/grass/wf_textures.01800.rgba16.png": [32,32,2048,{"jp":[3496176,6144],"us":[3502928,6144],"eu":[3376528,6144],"sh":[3350896,6144]}], +"textures/grass/wf_textures.02000.rgba16.png": [32,32,2048,{"jp":[3496176,8192],"us":[3502928,8192],"eu":[3376528,8192],"sh":[3350896,8192]}], +"textures/grass/wf_textures.02800.rgba16.png": [32,32,2048,{"jp":[3496176,10240],"us":[3502928,10240],"eu":[3376528,10240],"sh":[3350896,10240]}], +"textures/grass/wf_textures.03000.rgba16.png": [32,32,2048,{"jp":[3496176,12288],"us":[3502928,12288],"eu":[3376528,12288],"sh":[3350896,12288]}], +"textures/grass/wf_textures.03800.rgba16.png": [32,32,2048,{"jp":[3496176,14336],"us":[3502928,14336],"eu":[3376528,14336],"sh":[3350896,14336]}], +"textures/grass/wf_textures.04000.rgba16.png": [32,32,2048,{"jp":[3496176,16384],"us":[3502928,16384],"eu":[3376528,16384],"sh":[3350896,16384]}], +"textures/grass/wf_textures.04800.rgba16.png": [32,32,2048,{"jp":[3496176,18432],"us":[3502928,18432],"eu":[3376528,18432],"sh":[3350896,18432]}], +"textures/grass/wf_textures.05000.rgba16.png": [32,32,2048,{"jp":[3496176,20480],"us":[3502928,20480],"eu":[3376528,20480],"sh":[3350896,20480]}], +"textures/grass/wf_textures.05800.rgba16.png": [32,32,2048,{"jp":[3496176,22528],"us":[3502928,22528],"eu":[3376528,22528],"sh":[3350896,22528]}], +"textures/grass/wf_textures.06000.rgba16.png": [32,32,2048,{"jp":[3390640,20480],"us":[3397392,20480],"eu":[3270992,20480],"sh":[3245360,20480]}], +"textures/grass/wf_textures.06800.rgba16.png": [32,32,2048,{"jp":[3496176,26624],"us":[3502928,26624],"eu":[3376528,26624],"sh":[3350896,26624]}], +"textures/grass/wf_textures.07000.rgba16.png": [32,32,2048,{"jp":[3496176,28672],"us":[3502928,28672],"eu":[3376528,28672],"sh":[3350896,28672]}], +"textures/grass/wf_textures.07800.rgba16.png": [32,32,2048,{"jp":[3496176,30720],"us":[3502928,30720],"eu":[3376528,30720],"sh":[3350896,30720]}], +"textures/grass/wf_textures.08000.rgba16.png": [32,32,2048,{"jp":[3496176,32768],"us":[3502928,32768],"eu":[3376528,32768],"sh":[3350896,32768]}], +"textures/grass/wf_textures.08800.rgba16.png": [32,32,2048,{"jp":[3496176,34816],"us":[3502928,34816],"eu":[3376528,34816],"sh":[3350896,34816]}], +"textures/grass/wf_textures.09000.rgba16.png": [32,32,2048,{"jp":[3496176,36864],"us":[3502928,36864],"eu":[3376528,36864],"sh":[3350896,36864]}], +"textures/grass/wf_textures.09800.rgba16.png": [32,32,2048,{"jp":[3496176,38912],"us":[3502928,38912],"eu":[3376528,38912],"sh":[3350896,38912]}], +"textures/grass/wf_textures.0A000.rgba16.png": [32,32,2048,{"jp":[3496176,40960],"us":[3502928,40960],"eu":[3376528,40960],"sh":[3350896,40960]}], +"textures/grass/wf_textures.0A800.rgba16.png": [32,32,2048,{"jp":[3496176,43008],"us":[3502928,43008],"eu":[3376528,43008],"sh":[3350896,43008]}], +"textures/grass/wf_textures.0B000.ia16.png": [32,32,2048,{"jp":[3323408,45056],"us":[3330160,45056],"eu":[3203760,45056],"sh":[3178128,45056]}], +"textures/grass/wf_textures.0B800.ia16.png": [32,32,2048,{"jp":[3496176,47104],"us":[3502928,47104],"eu":[3376528,47104],"sh":[3350896,47104]}], +"textures/inside/inside_castle_textures.00000.rgba16.png": [64,32,4096,{"jp":[3555104,0],"us":[3561856,0],"eu":[3435456,0],"sh":[3409824,0]}], +"textures/inside/inside_castle_textures.01000.rgba16.png": [64,32,4096,{"jp":[3555104,4096],"us":[3561856,4096],"eu":[3435456,4096],"sh":[3409824,4096]}], +"textures/inside/inside_castle_textures.02000.rgba16.png": [32,64,4096,{"jp":[3555104,8192],"us":[3561856,8192],"eu":[3435456,8192],"sh":[3409824,8192]}], +"textures/inside/inside_castle_textures.03000.rgba16.png": [32,32,2048,{"jp":[3555104,12288],"us":[3561856,12288],"eu":[3435456,12288],"sh":[3409824,12288]}], +"textures/inside/inside_castle_textures.03800.rgba16.png": [32,32,2048,{"jp":[3555104,14336],"us":[3561856,14336],"eu":[3435456,14336],"sh":[3409824,14336]}], +"textures/inside/inside_castle_textures.04000.rgba16.png": [32,32,2048,{"jp":[3555104,16384],"us":[3561856,16384],"eu":[3435456,16384],"sh":[3409824,16384]}], +"textures/inside/inside_castle_textures.04800.rgba16.png": [32,32,2048,{"jp":[3460352,2048],"us":[3467104,2048],"eu":[3340704,2048],"sh":[3315072,2048]}], +"textures/inside/inside_castle_textures.05000.rgba16.png": [32,32,2048,{"jp":[3555104,20480],"us":[3561856,20480],"eu":[3435456,20480],"sh":[3409824,20480]}], +"textures/inside/inside_castle_textures.05800.rgba16.png": [32,32,2048,{"jp":[3555104,22528],"us":[3561856,22528],"eu":[3435456,22528],"sh":[3409824,22528]}], +"textures/inside/inside_castle_textures.06000.rgba16.png": [32,64,4096,{"jp":[3555104,24576],"us":[3561856,24576],"eu":[3435456,24576],"sh":[3409824,24576]}], +"textures/inside/inside_castle_textures.07000.rgba16.png": [32,64,4096,{"jp":[3555104,28672],"us":[3561856,28672],"eu":[3435456,28672],"sh":[3409824,28672]}], +"textures/inside/inside_castle_textures.08000.rgba16.png": [32,32,2048,{"jp":[3555104,32768],"us":[3561856,32768],"eu":[3435456,32768],"sh":[3409824,32768]}], +"textures/inside/inside_castle_textures.08800.rgba16.png": [32,32,2048,{"jp":[3555104,34816],"us":[3561856,34816],"eu":[3435456,34816],"sh":[3409824,34816]}], +"textures/inside/inside_castle_textures.09000.rgba16.png": [32,64,4096,{"jp":[3555104,36864],"us":[3561856,36864],"eu":[3435456,36864],"sh":[3409824,36864]}], +"textures/inside/inside_castle_textures.0A000.rgba16.png": [32,64,4096,{"jp":[3555104,40960],"us":[3561856,40960],"eu":[3435456,40960],"sh":[3409824,40960]}], +"textures/inside/inside_castle_textures.0B000.rgba16.png": [32,32,2048,{"jp":[3555104,45056],"us":[3561856,45056],"eu":[3435456,45056],"sh":[3409824,45056]}], +"textures/inside/inside_castle_textures.0B800.rgba16.png": [64,32,4096,{"jp":[3555104,47104],"us":[3561856,47104],"eu":[3435456,47104],"sh":[3409824,47104]}], +"textures/intro_raw/hand_closed.rgba16.png": [32,32,2048,{"jp":[2455304],"us":[2463112],"eu":[2331912],"sh":[2308680]}], +"textures/intro_raw/hand_open.rgba16.png": [32,32,2048,{"jp":[2453248],"us":[2461056],"eu":[2329856],"sh":[2306624]}], +"textures/intro_raw/mario_face_shine.ia8.png": [32,32,1024,{"jp":[2503888],"us":[2511696],"eu":[2380496],"sh":[2357264]}], +"textures/intro_raw/red_star_0.rgba16.png": [32,32,2048,{"jp":[2457352],"us":[2465160],"eu":[2333960],"sh":[2310728]}], +"textures/intro_raw/red_star_1.rgba16.png": [32,32,2048,{"jp":[2459400],"us":[2467208],"eu":[2336008],"sh":[2312776]}], +"textures/intro_raw/red_star_2.rgba16.png": [32,32,2048,{"jp":[2461448],"us":[2469256],"eu":[2338056],"sh":[2314824]}], +"textures/intro_raw/red_star_3.rgba16.png": [32,32,2048,{"jp":[2463496],"us":[2471304],"eu":[2340104],"sh":[2316872]}], +"textures/intro_raw/red_star_4.rgba16.png": [32,32,2048,{"jp":[2465544],"us":[2473352],"eu":[2342152],"sh":[2318920]}], +"textures/intro_raw/red_star_5.rgba16.png": [32,32,2048,{"jp":[2467592],"us":[2475400],"eu":[2344200],"sh":[2320968]}], +"textures/intro_raw/red_star_6.rgba16.png": [32,32,2048,{"jp":[2469640],"us":[2477448],"eu":[2346248],"sh":[2323016]}], +"textures/intro_raw/red_star_7.rgba16.png": [32,32,2048,{"jp":[2471688],"us":[2479496],"eu":[2348296],"sh":[2325064]}], +"textures/intro_raw/sparkle_0.rgba16.png": [32,32,2048,{"jp":[2490888],"us":[2498696],"eu":[2367496],"sh":[2344264]}], +"textures/intro_raw/sparkle_1.rgba16.png": [32,32,2048,{"jp":[2492936],"us":[2500744],"eu":[2369544],"sh":[2346312]}], +"textures/intro_raw/sparkle_2.rgba16.png": [32,32,2048,{"jp":[2494984],"us":[2502792],"eu":[2371592],"sh":[2348360]}], +"textures/intro_raw/sparkle_3.rgba16.png": [32,32,2048,{"jp":[2497032],"us":[2504840],"eu":[2373640],"sh":[2350408]}], +"textures/intro_raw/sparkle_4.rgba16.png": [32,32,2048,{"jp":[2499080],"us":[2506888],"eu":[2375688],"sh":[2352456]}], +"textures/intro_raw/sparkle_5.rgba16.png": [32,32,2048,{"jp":[2501128],"us":[2508936],"eu":[2377736],"sh":[2354504]}], +"textures/intro_raw/white_star_0.rgba16.png": [32,32,2048,{"jp":[2473736],"us":[2481544],"eu":[2350344],"sh":[2327112]}], +"textures/intro_raw/white_star_1.rgba16.png": [32,32,2048,{"jp":[2475784],"us":[2483592],"eu":[2352392],"sh":[2329160]}], +"textures/intro_raw/white_star_2.rgba16.png": [32,32,2048,{"jp":[2477832],"us":[2485640],"eu":[2354440],"sh":[2331208]}], +"textures/intro_raw/white_star_3.rgba16.png": [32,32,2048,{"jp":[2479880],"us":[2487688],"eu":[2356488],"sh":[2333256]}], +"textures/intro_raw/white_star_4.rgba16.png": [32,32,2048,{"jp":[2481928],"us":[2489736],"eu":[2358536],"sh":[2335304]}], +"textures/intro_raw/white_star_5.rgba16.png": [32,32,2048,{"jp":[2483976],"us":[2491784],"eu":[2360584],"sh":[2337352]}], +"textures/intro_raw/white_star_6.rgba16.png": [32,32,2048,{"jp":[2486024],"us":[2493832],"eu":[2362632],"sh":[2339400]}], +"textures/intro_raw/white_star_7.rgba16.png": [32,32,2048,{"jp":[2488072],"us":[2495880],"eu":[2364680],"sh":[2341448]}], +"textures/machine/ttc_textures.00000.rgba16.png": [32,32,2048,{"jp":[3460352,0],"us":[3467104,0],"eu":[3340704,0],"sh":[3315072,0]}], +"textures/machine/ttc_textures.00800.rgba16.png": [32,32,2048,{"jp":[3460352,2048],"us":[3467104,2048],"eu":[3340704,2048],"sh":[3315072,2048]}], +"textures/machine/ttc_textures.01000.rgba16.png": [32,32,2048,{"jp":[3460352,4096],"us":[3467104,4096],"eu":[3340704,4096],"sh":[3315072,4096]}], +"textures/machine/ttc_textures.01800.rgba16.png": [32,32,2048,{"jp":[3460352,6144],"us":[3467104,6144],"eu":[3340704,6144],"sh":[3315072,6144]}], +"textures/machine/ttc_textures.02000.rgba16.png": [32,32,2048,{"jp":[3460352,8192],"us":[3467104,8192],"eu":[3340704,8192],"sh":[3315072,8192]}], +"textures/machine/ttc_textures.02800.rgba16.png": [32,32,2048,{"jp":[3460352,10240],"us":[3467104,10240],"eu":[3340704,10240],"sh":[3315072,10240]}], +"textures/machine/ttc_textures.03000.rgba16.png": [32,32,2048,{"jp":[3460352,12288],"us":[3467104,12288],"eu":[3340704,12288],"sh":[3315072,12288]}], +"textures/machine/ttc_textures.03800.rgba16.png": [32,32,2048,{"jp":[3460352,14336],"us":[3467104,14336],"eu":[3340704,14336],"sh":[3315072,14336]}], +"textures/machine/ttc_textures.04000.rgba16.png": [32,64,4096,{"jp":[3460352,16384],"us":[3467104,16384],"eu":[3340704,16384],"sh":[3315072,16384]}], +"textures/machine/ttc_textures.05000.rgba16.png": [32,32,2048,{"jp":[3460352,20480],"us":[3467104,20480],"eu":[3340704,20480],"sh":[3315072,20480]}], +"textures/machine/ttc_textures.05800.rgba16.png": [32,32,2048,{"jp":[3460352,22528],"us":[3467104,22528],"eu":[3340704,22528],"sh":[3315072,22528]}], +"textures/machine/ttc_textures.06000.rgba16.png": [32,32,2048,{"jp":[3460352,24576],"us":[3467104,24576],"eu":[3340704,24576],"sh":[3315072,24576]}], +"textures/machine/ttc_textures.06800.rgba16.png": [32,32,2048,{"jp":[3460352,26624],"us":[3467104,26624],"eu":[3340704,26624],"sh":[3315072,26624]}], +"textures/machine/ttc_textures.07000.rgba16.png": [32,32,2048,{"jp":[3460352,28672],"us":[3467104,28672],"eu":[3340704,28672],"sh":[3315072,28672]}], +"textures/machine/ttc_textures.07800.rgba16.png": [16,64,2048,{"jp":[3460352,30720],"us":[3467104,30720],"eu":[3340704,30720],"sh":[3315072,30720]}], +"textures/machine/ttc_textures.08000.rgba16.png": [64,8,1024,{"jp":[3460352,32768],"us":[3467104,32768],"eu":[3340704,32768],"sh":[3315072,32768]}], +"textures/machine/ttc_textures.08400.rgba16.png": [32,32,2048,{"jp":[3460352,33792],"us":[3467104,33792],"eu":[3340704,33792],"sh":[3315072,33792]}], +"textures/mountain/ttm_textures.00000.rgba16.png": [32,32,2048,{"jp":[3473152,0],"us":[3479904,0],"eu":[3353504,0],"sh":[3327872,0]}], +"textures/mountain/ttm_textures.00800.rgba16.png": [64,32,4096,{"jp":[3473152,2048],"us":[3479904,2048],"eu":[3353504,2048],"sh":[3327872,2048]}], +"textures/mountain/ttm_textures.01800.rgba16.png": [32,64,4096,{"jp":[3473152,6144],"us":[3479904,6144],"eu":[3353504,6144],"sh":[3327872,6144]}], +"textures/mountain/ttm_textures.02800.rgba16.png": [32,32,2048,{"jp":[3473152,10240],"us":[3479904,10240],"eu":[3353504,10240],"sh":[3327872,10240]}], +"textures/mountain/ttm_textures.03000.rgba16.png": [32,32,2048,{"jp":[3473152,12288],"us":[3479904,12288],"eu":[3353504,12288],"sh":[3327872,12288]}], +"textures/mountain/ttm_textures.03800.rgba16.png": [32,32,2048,{"jp":[3473152,14336],"us":[3479904,14336],"eu":[3353504,14336],"sh":[3327872,14336]}], +"textures/mountain/ttm_textures.04000.rgba16.png": [32,32,2048,{"jp":[3473152,16384],"us":[3479904,16384],"eu":[3353504,16384],"sh":[3327872,16384]}], +"textures/mountain/ttm_textures.04800.rgba16.png": [32,32,2048,{"jp":[3473152,18432],"us":[3479904,18432],"eu":[3353504,18432],"sh":[3327872,18432]}], +"textures/mountain/ttm_textures.05000.rgba16.png": [32,32,2048,{"jp":[3473152,20480],"us":[3479904,20480],"eu":[3353504,20480],"sh":[3327872,20480]}], +"textures/mountain/ttm_textures.05800.rgba16.png": [32,64,4096,{"jp":[3473152,22528],"us":[3479904,22528],"eu":[3353504,22528],"sh":[3327872,22528]}], +"textures/mountain/ttm_textures.06800.rgba16.png": [32,32,2048,{"jp":[3473152,26624],"us":[3479904,26624],"eu":[3353504,26624],"sh":[3327872,26624]}], +"textures/mountain/ttm_textures.07000.rgba16.png": [32,32,2048,{"jp":[3473152,28672],"us":[3479904,28672],"eu":[3353504,28672],"sh":[3327872,28672]}], +"textures/mountain/ttm_textures.07800.rgba16.png": [32,32,2048,{"jp":[3473152,30720],"us":[3479904,30720],"eu":[3353504,30720],"sh":[3327872,30720]}], +"textures/mountain/ttm_textures.08000.rgba16.png": [32,32,2048,{"jp":[3473152,32768],"us":[3479904,32768],"eu":[3353504,32768],"sh":[3327872,32768]}], +"textures/mountain/ttm_textures.08800.rgba16.png": [64,32,4096,{"jp":[3473152,34816],"us":[3479904,34816],"eu":[3353504,34816],"sh":[3327872,34816]}], +"textures/mountain/ttm_textures.09800.rgba16.png": [32,32,2048,{"jp":[3473152,38912],"us":[3479904,38912],"eu":[3353504,38912],"sh":[3327872,38912]}], +"textures/mountain/ttm_textures.0A000.rgba16.png": [32,32,2048,{"jp":[3390640,24576],"us":[3397392,24576],"eu":[3270992,24576],"sh":[3245360,24576]}], +"textures/mountain/ttm_textures.0A800.rgba16.png": [32,32,2048,{"jp":[3473152,43008],"us":[3479904,43008],"eu":[3353504,43008],"sh":[3327872,43008]}], +"textures/mountain/ttm_textures.0B000.rgba16.png": [32,32,2048,{"jp":[3473152,45056],"us":[3479904,45056],"eu":[3353504,45056],"sh":[3327872,45056]}], +"textures/mountain/ttm_textures.0B800.rgba16.png": [32,32,2048,{"jp":[3473152,47104],"us":[3479904,47104],"eu":[3353504,47104],"sh":[3327872,47104]}], +"textures/mountain/ttm_textures.0C000.rgba16.png": [32,32,2048,{"jp":[3473152,49152],"us":[3479904,49152],"eu":[3353504,49152],"sh":[3327872,49152]}], +"textures/outside/castle_grounds_textures.00000.rgba16.png": [32,32,2048,{"jp":[3527344,0],"us":[3534096,0],"eu":[3407696,0],"sh":[3382064,0]}], +"textures/outside/castle_grounds_textures.00800.rgba16.png": [32,32,2048,{"jp":[3527344,2048],"us":[3534096,2048],"eu":[3407696,2048],"sh":[3382064,2048]}], +"textures/outside/castle_grounds_textures.01000.rgba16.png": [64,32,4096,{"jp":[3527344,4096],"us":[3534096,4096],"eu":[3407696,4096],"sh":[3382064,4096]}], +"textures/outside/castle_grounds_textures.02000.rgba16.png": [32,64,4096,{"jp":[3527344,8192],"us":[3534096,8192],"eu":[3407696,8192],"sh":[3382064,8192]}], +"textures/outside/castle_grounds_textures.03000.rgba16.png": [32,32,2048,{"jp":[3527344,12288],"us":[3534096,12288],"eu":[3407696,12288],"sh":[3382064,12288]}], +"textures/outside/castle_grounds_textures.03800.rgba16.png": [32,32,2048,{"jp":[3527344,14336],"us":[3534096,14336],"eu":[3407696,14336],"sh":[3382064,14336]}], +"textures/outside/castle_grounds_textures.04000.rgba16.png": [32,32,2048,{"jp":[3527344,16384],"us":[3534096,16384],"eu":[3407696,16384],"sh":[3382064,16384]}], +"textures/outside/castle_grounds_textures.04800.rgba16.png": [32,64,4096,{"jp":[3527344,18432],"us":[3534096,18432],"eu":[3407696,18432],"sh":[3382064,18432]}], +"textures/outside/castle_grounds_textures.05800.rgba16.png": [32,32,2048,{"jp":[3527344,22528],"us":[3534096,22528],"eu":[3407696,22528],"sh":[3382064,22528]}], +"textures/outside/castle_grounds_textures.06000.rgba16.png": [32,32,2048,{"jp":[3527344,24576],"us":[3534096,24576],"eu":[3407696,24576],"sh":[3382064,24576]}], +"textures/outside/castle_grounds_textures.06800.rgba16.png": [64,32,4096,{"jp":[3527344,26624],"us":[3534096,26624],"eu":[3407696,26624],"sh":[3382064,26624]}], +"textures/outside/castle_grounds_textures.07800.rgba16.png": [32,32,2048,{"jp":[3527344,30720],"us":[3534096,30720],"eu":[3407696,30720],"sh":[3382064,30720]}], +"textures/outside/castle_grounds_textures.08000.rgba16.png": [32,32,2048,{"jp":[3527344,32768],"us":[3534096,32768],"eu":[3407696,32768],"sh":[3382064,32768]}], +"textures/outside/castle_grounds_textures.08800.rgba16.png": [32,32,2048,{"jp":[3527344,34816],"us":[3534096,34816],"eu":[3407696,34816],"sh":[3382064,34816]}], +"textures/outside/castle_grounds_textures.09000.rgba16.png": [32,32,2048,{"jp":[3527344,36864],"us":[3534096,36864],"eu":[3407696,36864],"sh":[3382064,36864]}], +"textures/outside/castle_grounds_textures.09800.rgba16.png": [32,32,2048,{"jp":[3527344,38912],"us":[3534096,38912],"eu":[3407696,38912],"sh":[3382064,38912]}], +"textures/outside/castle_grounds_textures.0A000.rgba16.png": [32,32,2048,{"jp":[3527344,40960],"us":[3534096,40960],"eu":[3407696,40960],"sh":[3382064,40960]}], +"textures/outside/castle_grounds_textures.0A800.rgba16.png": [32,32,2048,{"jp":[3527344,43008],"us":[3534096,43008],"eu":[3407696,43008],"sh":[3382064,43008]}], +"textures/outside/castle_grounds_textures.0B000.rgba16.png": [16,32,1024,{"jp":[3527344,45056],"us":[3534096,45056],"eu":[3407696,45056],"sh":[3382064,45056]}], +"textures/outside/castle_grounds_textures.0B400.rgba16.png": [32,32,2048,{"jp":[3527344,46080],"us":[3534096,46080],"eu":[3407696,46080],"sh":[3382064,46080]}], +"textures/outside/castle_grounds_textures.0BC00.ia16.png": [32,32,2048,{"jp":[3323408,45056],"us":[3330160,45056],"eu":[3203760,45056],"sh":[3178128,45056]}], "textures/segment2/font_graphics.05900.ia4.png": [16,8,64,{"us":[1083968,22784]}], "textures/segment2/font_graphics.05940.ia4.png": [16,8,64,{"us":[1083968,22848]}], "textures/segment2/font_graphics.05980.ia4.png": [16,8,64,{"us":[1083968,22912]}], @@ -1368,8 +1368,8 @@ "textures/segment2/font_graphics.063F0.ia1.png": [16,8,16,{"eu":[909712,25584]}], "textures/segment2/font_graphics.06400.ia1.png": [16,8,16,{"eu":[909712,25600]}], "textures/segment2/font_graphics.06400.ia4.png": [16,8,64,{"us":[1083968,25600]}], -"textures/segment2/font_graphics.06410.ia1.png": [16,8,16,{"jp":[1599504,83574],"us":[1606720,83574],"eu":[909712,25616]}], -"textures/segment2/font_graphics.06420.ia1.png": [16,8,16,{"jp":[1844608,133979],"us":[1851952,133979],"eu":[909712,25632]}], +"textures/segment2/font_graphics.06410.ia1.png": [16,8,16,{"jp":[1599504,83574],"us":[1606720,83574],"eu":[909712,25616],"sh":[1455200,83574]}], +"textures/segment2/font_graphics.06420.ia1.png": [16,8,16,{"jp":[1844608,133979],"us":[1851952,133979],"eu":[909712,25632],"sh":[1700432,133979]}], "textures/segment2/font_graphics.06430.ia1.png": [16,8,16,{"eu":[909712,25648]}], "textures/segment2/font_graphics.06440.ia1.png": [16,8,16,{"eu":[909712,25664]}], "textures/segment2/font_graphics.06440.ia4.png": [16,8,64,{"us":[1083968,25664]}], @@ -1434,482 +1434,345 @@ "textures/segment2/font_graphics.06F40.ia4.png": [16,8,64,{"us":[1083968,28480]}], "textures/segment2/font_graphics.06F80.ia4.png": [16,8,64,{"us":[1083968,28544]}], "textures/segment2/font_graphics.06FC0.ia4.png": [16,8,64,{"us":[1083968,28608]}], -"textures/segment2/segment2.00000.rgba16.png": [16,16,512,{"jp":[1078992,0],"us":[1083968,0],"eu":[909712,0]}], -"textures/segment2/segment2.00200.rgba16.png": [16,16,512,{"jp":[1078992,512],"us":[1083968,512],"eu":[909712,512]}], -"textures/segment2/segment2.00400.rgba16.png": [16,16,512,{"jp":[1078992,1024],"us":[1083968,1024],"eu":[909712,1024]}], -"textures/segment2/segment2.00600.rgba16.png": [16,16,512,{"jp":[1078992,1536],"us":[1083968,1536],"eu":[909712,1536]}], -"textures/segment2/segment2.00800.rgba16.png": [16,16,512,{"jp":[1078992,2048],"us":[1083968,2048],"eu":[909712,2048]}], -"textures/segment2/segment2.00A00.rgba16.png": [16,16,512,{"jp":[1078992,2560],"us":[1083968,2560],"eu":[909712,2560]}], -"textures/segment2/segment2.00C00.rgba16.png": [16,16,512,{"jp":[1078992,3072],"us":[1083968,3072],"eu":[909712,3072]}], -"textures/segment2/segment2.00E00.rgba16.png": [16,16,512,{"jp":[1078992,3584],"us":[1083968,3584],"eu":[909712,3584]}], -"textures/segment2/segment2.01000.rgba16.png": [16,16,512,{"jp":[1078992,4096],"us":[1083968,4096],"eu":[909712,4096]}], -"textures/segment2/segment2.01200.rgba16.png": [16,16,512,{"jp":[1078992,4608],"us":[1083968,4608],"eu":[909712,4608]}], -"textures/segment2/segment2.01400.rgba16.png": [16,16,512,{"jp":[1078992,5120],"us":[1083968,5120],"eu":[909712,5120]}], -"textures/segment2/segment2.01600.rgba16.png": [16,16,512,{"jp":[1078992,5632],"us":[1083968,5632],"eu":[909712,5632]}], -"textures/segment2/segment2.01800.rgba16.png": [16,16,512,{"jp":[1078992,6144],"us":[1083968,6144],"eu":[909712,6144]}], -"textures/segment2/segment2.01A00.rgba16.png": [16,16,512,{"jp":[1078992,6656],"us":[1083968,6656],"eu":[909712,6656]}], -"textures/segment2/segment2.01C00.rgba16.png": [16,16,512,{"jp":[1078992,7168],"us":[1083968,7168],"eu":[909712,7168]}], -"textures/segment2/segment2.01E00.rgba16.png": [16,16,512,{"jp":[1078992,7680],"us":[1083968,7680],"eu":[909712,7680]}], -"textures/segment2/segment2.02000.rgba16.png": [16,16,512,{"jp":[1078992,8192],"us":[1083968,8192],"eu":[909712,8192]}], -"textures/segment2/segment2.02200.rgba16.png": [16,16,512,{"jp":[1078992,8704],"us":[1083968,8704],"eu":[909712,8704]}], -"textures/segment2/segment2.02400.rgba16.png": [16,16,512,{"jp":[1078992,9216],"us":[1083968,9216],"eu":[909712,9216]}], -"textures/segment2/segment2.02600.rgba16.png": [16,16,512,{"jp":[1078992,9728]}], -"textures/segment2/segment2.02800.rgba16.png": [16,16,512,{"jp":[1078992,10240],"us":[1083968,9728],"eu":[909712,9728]}], -"textures/segment2/segment2.02A00.rgba16.png": [16,16,512,{"jp":[1078992,10752],"us":[1083968,10240],"eu":[909712,10240]}], -"textures/segment2/segment2.02C00.rgba16.png": [16,16,512,{"jp":[1078992,11264],"us":[1083968,10752],"eu":[909712,10752]}], -"textures/segment2/segment2.02E00.rgba16.png": [16,16,512,{"jp":[1078992,11776],"us":[1083968,11264],"eu":[909712,11264]}], -"textures/segment2/segment2.03000.rgba16.png": [16,16,512,{"jp":[1078992,12288],"us":[1083968,11776],"eu":[909712,11776]}], -"textures/segment2/segment2.03200.rgba16.png": [16,16,512,{"jp":[1078992,12800],"us":[1083968,12288],"eu":[909712,12288]}], -"textures/segment2/segment2.03400.rgba16.png": [16,16,512,{"jp":[1078992,13312]}], -"textures/segment2/segment2.03600.rgba16.png": [16,16,512,{"jp":[1078992,13824],"us":[1083968,12800],"eu":[909712,12800]}], -"textures/segment2/segment2.03800.rgba16.png": [16,16,512,{"jp":[1078992,14336],"us":[1083968,13312],"eu":[909712,13312]}], -"textures/segment2/segment2.03A00.rgba16.png": [16,16,512,{"jp":[1078992,14848],"us":[1083968,13824],"eu":[909712,13824]}], -"textures/segment2/segment2.03C00.rgba16.png": [16,16,512,{"jp":[1078992,15360],"us":[1083968,14336],"eu":[909712,14336]}], -"textures/segment2/segment2.03E00.rgba16.png": [16,16,512,{"jp":[1078992,15872],"eu":[909712,14848]}], -"textures/segment2/segment2.04000.rgba16.png": [16,16,512,{"jp":[1078992,16384],"us":[1083968,14848],"eu":[909712,15360]}], -"textures/segment2/segment2.04200.rgba16.png": [16,16,512,{"jp":[1078992,16896]}], -"textures/segment2/segment2.04400.rgba16.png": [16,16,512,{"jp":[1078992,17408],"us":[1083968,15360],"eu":[909712,15872]}], -"textures/segment2/segment2.04600.rgba16.png": [16,16,512,{"jp":[1078992,17920],"eu":[909712,16384]}], -"textures/segment2/segment2.04800.rgba16.png": [16,16,512,{"jp":[1078992,18432],"us":[1083968,15872],"eu":[909712,16896]}], -"textures/segment2/segment2.04A00.rgba16.png": [16,16,512,{"jp":[1078992,18944],"us":[1083968,16384],"eu":[909712,17408]}], -"textures/segment2/segment2.04C00.rgba16.png": [16,16,512,{"jp":[1078992,19456]}], -"textures/segment2/segment2.04E00.rgba16.png": [16,16,512,{"jp":[1078992,19968]}], -"textures/segment2/segment2.05000.rgba16.png": [16,16,512,{"jp":[1078992,20480],"us":[2778544,41424],"eu":[2647072,41424]}], -"textures/segment2/segment2.05200.rgba16.png": [16,16,512,{"jp":[1078992,20992]}], -"textures/segment2/segment2.05400.rgba16.png": [16,16,512,{"jp":[1078992,21504]}], -"textures/segment2/segment2.05600.rgba16.png": [16,16,512,{"jp":[1078992,22016],"us":[1083968,16896],"eu":[909712,18432]}], -"textures/segment2/segment2.05800.rgba16.png": [16,16,512,{"jp":[1078992,22528],"us":[1083968,17408],"eu":[909712,18944]}], -"textures/segment2/segment2.05A00.rgba16.png": [16,16,512,{"jp":[1078992,23040],"us":[1083968,17920],"eu":[909712,19456]}], -"textures/segment2/segment2.05C00.rgba16.png": [16,16,512,{"jp":[1078992,23552],"us":[1083968,18432],"eu":[909712,19968]}], -"textures/segment2/segment2.05E00.rgba16.png": [16,16,512,{"jp":[1078992,24064]}], -"textures/segment2/segment2.06000.rgba16.png": [16,16,512,{"jp":[1078992,24576]}], -"textures/segment2/segment2.06200.rgba16.png": [8,8,128,{"jp":[1078992,25088],"us":[1083968,18944],"eu":[909712,20480]}], -"textures/segment2/segment2.06280.rgba16.png": [8,8,128,{"jp":[1078992,25216],"us":[1083968,19072],"eu":[909712,20608]}], -"textures/segment2/segment2.06300.rgba16.png": [8,8,128,{"jp":[1078992,25344],"us":[1083968,19200],"eu":[909712,20736]}], -"textures/segment2/segment2.06380.rgba16.png": [8,8,128,{"jp":[1078992,25472],"us":[1083968,19328],"eu":[909712,20864]}], -"textures/segment2/segment2.06400.rgba16.png": [8,8,128,{"jp":[1078992,25600],"us":[1083968,19456],"eu":[909712,20992]}], -"textures/segment2/segment2.06480.rgba16.png": [8,8,128,{"jp":[1078992,25728],"us":[1083968,19584],"eu":[909712,21120]}], -"textures/segment2/segment2.06500.rgba16.png": [8,8,128,{"jp":[1078992,25856],"us":[1083968,19712],"eu":[909712,21248]}], -"textures/segment2/segment2.06580.rgba16.png": [8,8,128,{"jp":[1078992,25984],"us":[1083968,19840],"eu":[909712,21376]}], -"textures/segment2/segment2.06600.rgba16.png": [8,8,128,{"jp":[1078992,26112],"us":[1083968,19968],"eu":[909712,21504]}], -"textures/segment2/segment2.06680.rgba16.png": [8,8,128,{"jp":[1078992,26240],"us":[1083968,20096],"eu":[909712,21632]}], -"textures/segment2/segment2.06700.rgba16.png": [8,8,128,{"jp":[1078992,26368],"us":[1083968,20224],"eu":[909712,21760]}], -"textures/segment2/segment2.06780.rgba16.png": [8,8,128,{"jp":[1078992,26496],"us":[1083968,20352],"eu":[909712,21888]}], -"textures/segment2/segment2.06800.rgba16.png": [8,8,128,{"jp":[1078992,26624],"us":[1083968,20480],"eu":[909712,22016]}], -"textures/segment2/segment2.06880.rgba16.png": [8,8,128,{"jp":[1078992,26752],"us":[1083968,20608],"eu":[909712,22144]}], -"textures/segment2/segment2.06900.rgba16.png": [8,8,128,{"jp":[1078992,26880],"us":[1083968,20736],"eu":[909712,22272]}], -"textures/segment2/segment2.06980.rgba16.png": [8,8,128,{"jp":[1078992,27008],"us":[1083968,20864],"eu":[909712,22400]}], -"textures/segment2/segment2.06A00.rgba16.png": [8,8,128,{"jp":[1078992,27136],"us":[1083968,20992],"eu":[909712,22528]}], -"textures/segment2/segment2.06A80.rgba16.png": [8,8,128,{"jp":[1078992,27264],"us":[1083968,21120],"eu":[909712,22656]}], -"textures/segment2/segment2.06B00.rgba16.png": [8,8,128,{"jp":[1078992,27392],"us":[1083968,21248],"eu":[909712,22784]}], -"textures/segment2/segment2.06B80.rgba16.png": [8,8,128,{"jp":[1078992,27520],"us":[1083968,21376],"eu":[909712,22912]}], -"textures/segment2/segment2.06C00.rgba16.png": [8,8,128,{"jp":[1078992,27648],"us":[1083968,21504],"eu":[909712,23040]}], -"textures/segment2/segment2.06C80.rgba16.png": [8,8,128,{"jp":[1078992,27776],"us":[1083968,21632],"eu":[909712,23168]}], -"textures/segment2/segment2.06D00.rgba16.png": [8,8,128,{"jp":[1078992,27904],"us":[1083968,21760],"eu":[909712,23296]}], -"textures/segment2/segment2.06D80.rgba16.png": [8,8,128,{"jp":[1078992,28032],"us":[1083968,21888],"eu":[909712,23424]}], -"textures/segment2/segment2.06E00.rgba16.png": [8,8,128,{"jp":[1078992,28160],"us":[1083968,22016],"eu":[909712,23552]}], -"textures/segment2/segment2.06E80.rgba16.png": [8,8,128,{"jp":[1078992,28288],"us":[1083968,22144],"eu":[909712,23680]}], -"textures/segment2/segment2.06F00.rgba16.png": [8,8,128,{"jp":[1078992,28416],"us":[1083968,22272],"eu":[909712,23808]}], -"textures/segment2/segment2.06F80.rgba16.png": [8,8,128,{"jp":[1078992,28544],"us":[1083968,22400],"eu":[909712,23936]}], -"textures/segment2/segment2.07000.rgba16.png": [8,8,128,{"jp":[1078992,28672],"us":[1083968,22528],"eu":[909712,24064]}], -"textures/segment2/segment2.07080.rgba16.png": [8,8,128,{"jp":[1078992,28800],"us":[1083968,22656],"eu":[909712,24192]}], -"textures/segment2/segment2.07100.ia1.png": [8,16,16,{"jp":[1078992,28928]}], -"textures/segment2/segment2.07110.ia1.png": [8,16,16,{"jp":[1078992,28944]}], -"textures/segment2/segment2.07120.ia1.png": [8,16,16,{"jp":[1078992,28960]}], -"textures/segment2/segment2.07130.ia1.png": [8,16,16,{"jp":[1078992,28976]}], -"textures/segment2/segment2.07140.ia1.png": [8,16,16,{"jp":[1078992,28992]}], -"textures/segment2/segment2.07150.ia1.png": [8,16,16,{"jp":[1078992,29008]}], -"textures/segment2/segment2.07160.ia1.png": [8,16,16,{"jp":[1078992,29024]}], -"textures/segment2/segment2.07170.ia1.png": [8,16,16,{"jp":[1078992,29040]}], -"textures/segment2/segment2.07180.ia1.png": [8,16,16,{"jp":[1078992,29056]}], -"textures/segment2/segment2.07190.ia1.png": [8,16,16,{"jp":[1078992,29072]}], -"textures/segment2/segment2.071A0.ia1.png": [8,16,16,{"jp":[1078992,29088]}], -"textures/segment2/segment2.071B0.ia1.png": [8,16,16,{"jp":[1078992,29104]}], -"textures/segment2/segment2.071C0.ia1.png": [8,16,16,{"jp":[1078992,29120]}], -"textures/segment2/segment2.071D0.ia1.png": [8,16,16,{"jp":[1078992,29136]}], -"textures/segment2/segment2.071E0.ia1.png": [8,16,16,{"jp":[1078992,29152]}], -"textures/segment2/segment2.071F0.ia1.png": [8,16,16,{"jp":[1078992,29168]}], -"textures/segment2/segment2.07200.ia1.png": [8,16,16,{"jp":[1078992,29184]}], -"textures/segment2/segment2.07210.ia1.png": [8,16,16,{"jp":[1078992,29200]}], -"textures/segment2/segment2.07220.ia1.png": [8,16,16,{"jp":[1078992,29216]}], -"textures/segment2/segment2.07230.ia1.png": [8,16,16,{"jp":[1078992,29232]}], -"textures/segment2/segment2.07240.ia1.png": [8,16,16,{"jp":[1078992,29248]}], -"textures/segment2/segment2.07250.ia1.png": [8,16,16,{"jp":[1078992,29264]}], -"textures/segment2/segment2.07260.ia1.png": [8,16,16,{"jp":[1078992,29280]}], -"textures/segment2/segment2.07270.ia1.png": [8,16,16,{"jp":[1078992,29296]}], -"textures/segment2/segment2.07280.ia1.png": [8,16,16,{"jp":[1078992,29312]}], -"textures/segment2/segment2.07290.ia1.png": [8,16,16,{"jp":[1078992,29328]}], -"textures/segment2/segment2.072A0.ia1.png": [8,16,16,{"jp":[1078992,29344]}], -"textures/segment2/segment2.072B0.ia1.png": [8,16,16,{"jp":[1078992,29360]}], -"textures/segment2/segment2.072C0.ia1.png": [8,16,16,{"jp":[1078992,29376]}], -"textures/segment2/segment2.072D0.ia1.png": [8,16,16,{"jp":[1078992,29392]}], -"textures/segment2/segment2.072E0.ia1.png": [8,16,16,{"jp":[1078992,29408]}], -"textures/segment2/segment2.072F0.ia1.png": [8,16,16,{"jp":[1078992,29424]}], -"textures/segment2/segment2.07300.ia1.png": [8,16,16,{"jp":[1078992,29440]}], -"textures/segment2/segment2.07310.ia1.png": [8,16,16,{"jp":[1078992,29456]}], -"textures/segment2/segment2.07320.ia1.png": [8,16,16,{"jp":[1078992,29472]}], -"textures/segment2/segment2.07330.ia1.png": [8,16,16,{"jp":[1078992,29488]}], -"textures/segment2/segment2.07340.ia1.png": [8,16,16,{"jp":[1078992,29504],"us":[1083968,24050],"eu":[2647072,44317]}], -"textures/segment2/segment2.07350.ia1.png": [8,16,16,{"jp":[1078992,29520]}], -"textures/segment2/segment2.07360.ia1.png": [8,16,16,{"jp":[1078992,29536]}], -"textures/segment2/segment2.07370.ia1.png": [8,16,16,{"jp":[1078992,29552]}], -"textures/segment2/segment2.07380.ia1.png": [8,16,16,{"jp":[1078992,29568]}], -"textures/segment2/segment2.07390.ia1.png": [8,16,16,{"jp":[1078992,29584]}], -"textures/segment2/segment2.073A0.ia1.png": [8,16,16,{"jp":[1078992,29600]}], -"textures/segment2/segment2.073B0.ia1.png": [8,16,16,{"jp":[1078992,29616]}], -"textures/segment2/segment2.073C0.ia1.png": [8,16,16,{"jp":[1078992,29632]}], -"textures/segment2/segment2.073D0.ia1.png": [8,16,16,{"jp":[1078992,29648]}], -"textures/segment2/segment2.073E0.ia1.png": [8,16,16,{"jp":[1078992,29664]}], -"textures/segment2/segment2.073F0.ia1.png": [8,16,16,{"jp":[1078992,29680]}], -"textures/segment2/segment2.07400.ia1.png": [8,16,16,{"jp":[1078992,29696]}], -"textures/segment2/segment2.07410.ia1.png": [8,16,16,{"jp":[1078992,29712]}], -"textures/segment2/segment2.07420.ia1.png": [8,16,16,{"jp":[1078992,29728]}], -"textures/segment2/segment2.07430.ia1.png": [8,16,16,{"jp":[1078992,29744]}], -"textures/segment2/segment2.07440.ia1.png": [8,16,16,{"jp":[1078992,29760]}], -"textures/segment2/segment2.07450.ia1.png": [8,16,16,{"jp":[1078992,29776]}], -"textures/segment2/segment2.07460.ia1.png": [8,16,16,{"jp":[1078992,29792]}], -"textures/segment2/segment2.07470.ia1.png": [8,16,16,{"jp":[1078992,29808]}], -"textures/segment2/segment2.07480.ia1.png": [8,16,16,{"jp":[1078992,29824]}], -"textures/segment2/segment2.07490.ia1.png": [8,16,16,{"jp":[1078992,29840]}], -"textures/segment2/segment2.074A0.ia1.png": [8,16,16,{"jp":[1078992,29856]}], -"textures/segment2/segment2.074B0.ia1.png": [8,16,16,{"jp":[1078992,29872]}], -"textures/segment2/segment2.074C0.ia1.png": [8,16,16,{"jp":[1078992,29888]}], -"textures/segment2/segment2.074D0.ia1.png": [8,16,16,{"jp":[1078992,29904]}], -"textures/segment2/segment2.074E0.ia1.png": [8,16,16,{"jp":[1078992,29920]}], -"textures/segment2/segment2.074F0.ia1.png": [8,16,16,{"jp":[1078992,29936]}], -"textures/segment2/segment2.07500.ia1.png": [8,16,16,{"jp":[1078992,29952]}], -"textures/segment2/segment2.07510.ia1.png": [8,16,16,{"jp":[1078992,29968]}], -"textures/segment2/segment2.07520.ia1.png": [8,16,16,{"jp":[1078992,29984]}], -"textures/segment2/segment2.07530.ia1.png": [8,16,16,{"jp":[1078992,30000]}], -"textures/segment2/segment2.07540.ia1.png": [8,16,16,{"jp":[1078992,30016]}], -"textures/segment2/segment2.07550.ia1.png": [8,16,16,{"jp":[1078992,30032]}], -"textures/segment2/segment2.07560.ia1.png": [8,16,16,{"jp":[1078992,30048]}], -"textures/segment2/segment2.07570.ia1.png": [8,16,16,{"jp":[1078992,30064]}], -"textures/segment2/segment2.07580.ia1.png": [8,16,16,{"jp":[1078992,30080]}], -"textures/segment2/segment2.07590.ia1.png": [8,16,16,{"jp":[1078992,30096]}], -"textures/segment2/segment2.075A0.ia1.png": [8,16,16,{"jp":[1078992,30112]}], -"textures/segment2/segment2.075B0.ia1.png": [8,16,16,{"jp":[1078992,30128]}], -"textures/segment2/segment2.075C0.ia1.png": [8,16,16,{"jp":[1078992,30144]}], -"textures/segment2/segment2.075D0.ia1.png": [8,16,16,{"jp":[1078992,30160]}], -"textures/segment2/segment2.075E0.ia1.png": [8,16,16,{"jp":[1078992,30176]}], -"textures/segment2/segment2.075F0.ia1.png": [8,16,16,{"jp":[1078992,30192]}], -"textures/segment2/segment2.07600.ia1.png": [8,16,16,{"jp":[1078992,30208]}], -"textures/segment2/segment2.07610.ia1.png": [8,16,16,{"jp":[1078992,30224]}], -"textures/segment2/segment2.07620.ia1.png": [8,16,16,{"jp":[1078992,30240]}], -"textures/segment2/segment2.07630.ia1.png": [8,16,16,{"jp":[1078992,30256]}], -"textures/segment2/segment2.07640.ia1.png": [8,16,16,{"jp":[1078992,30272]}], -"textures/segment2/segment2.07650.ia1.png": [8,16,16,{"jp":[1078992,30288]}], -"textures/segment2/segment2.07660.ia1.png": [8,16,16,{"jp":[1078992,30304]}], -"textures/segment2/segment2.07670.ia1.png": [8,16,16,{"jp":[1078992,30320]}], -"textures/segment2/segment2.07680.ia1.png": [8,16,16,{"jp":[1078992,30336]}], -"textures/segment2/segment2.07690.ia1.png": [8,16,16,{"jp":[1078992,30352]}], -"textures/segment2/segment2.076A0.ia1.png": [8,16,16,{"jp":[1078992,30368]}], -"textures/segment2/segment2.076B0.ia1.png": [8,16,16,{"jp":[1078992,30384]}], -"textures/segment2/segment2.076C0.ia1.png": [8,16,16,{"jp":[1078992,30400]}], -"textures/segment2/segment2.076D0.ia1.png": [8,16,16,{"jp":[1078992,30416]}], -"textures/segment2/segment2.076E0.ia1.png": [8,16,16,{"jp":[1078992,30432]}], -"textures/segment2/segment2.076F0.ia1.png": [8,16,16,{"jp":[1078992,30448]}], -"textures/segment2/segment2.07700.ia1.png": [8,16,16,{"jp":[1078992,30464]}], -"textures/segment2/segment2.07710.ia1.png": [8,16,16,{"jp":[1078992,30480]}], -"textures/segment2/segment2.07720.ia1.png": [8,16,16,{"jp":[1078992,30496]}], -"textures/segment2/segment2.07730.ia1.png": [8,16,16,{"jp":[1078992,30512]}], -"textures/segment2/segment2.07740.ia1.png": [8,16,16,{"jp":[1078992,30528]}], -"textures/segment2/segment2.07750.ia1.png": [8,16,16,{"jp":[1078992,30544]}], -"textures/segment2/segment2.07760.ia1.png": [8,16,16,{"jp":[1078992,30560]}], -"textures/segment2/segment2.07770.ia1.png": [8,16,16,{"jp":[1078992,30576]}], -"textures/segment2/segment2.07780.ia1.png": [8,16,16,{"jp":[1078992,30592]}], -"textures/segment2/segment2.07790.ia1.png": [8,16,16,{"jp":[1078992,30608]}], -"textures/segment2/segment2.077A0.ia1.png": [8,16,16,{"jp":[1078992,30624]}], -"textures/segment2/segment2.077B0.ia1.png": [8,16,16,{"jp":[1078992,30640]}], -"textures/segment2/segment2.077C0.ia1.png": [8,16,16,{"jp":[1078992,30656]}], -"textures/segment2/segment2.077D0.ia1.png": [8,16,16,{"jp":[1078992,30672]}], -"textures/segment2/segment2.077E0.ia1.png": [8,16,16,{"jp":[1078992,30688]}], -"textures/segment2/segment2.077F0.ia1.png": [8,16,16,{"jp":[1078992,30704]}], -"textures/segment2/segment2.07800.ia1.png": [8,16,16,{"jp":[1078992,30720]}], -"textures/segment2/segment2.07810.ia1.png": [8,16,16,{"jp":[1078992,30736]}], -"textures/segment2/segment2.07820.ia1.png": [8,16,16,{"jp":[1078992,30752]}], -"textures/segment2/segment2.07830.ia1.png": [8,16,16,{"jp":[1078992,30768]}], -"textures/segment2/segment2.07840.ia1.png": [8,16,16,{"jp":[1078992,30784]}], -"textures/segment2/segment2.07850.ia1.png": [8,16,16,{"jp":[1078992,30800]}], -"textures/segment2/segment2.07860.ia1.png": [8,16,16,{"jp":[1078992,30816]}], -"textures/segment2/segment2.07870.ia1.png": [8,16,16,{"jp":[1078992,30832]}], -"textures/segment2/segment2.07880.ia1.png": [8,16,16,{"jp":[1078992,30848]}], -"textures/segment2/segment2.07890.ia1.png": [8,16,16,{"jp":[1078992,30864]}], -"textures/segment2/segment2.078A0.ia1.png": [8,16,16,{"jp":[1078992,30880]}], -"textures/segment2/segment2.078B0.ia1.png": [8,16,16,{"jp":[1078992,30896]}], -"textures/segment2/segment2.078C0.ia1.png": [8,16,16,{"jp":[1078992,30912]}], -"textures/segment2/segment2.078D0.ia1.png": [8,16,16,{"jp":[1078992,30928]}], -"textures/segment2/segment2.078E0.ia1.png": [8,16,16,{"jp":[1078992,30944]}], -"textures/segment2/segment2.078F0.ia1.png": [8,16,16,{"jp":[1078992,30960]}], -"textures/segment2/segment2.07900.ia1.png": [8,16,16,{"jp":[1078992,30976]}], -"textures/segment2/segment2.07910.ia1.png": [8,16,16,{"jp":[1078992,30992]}], -"textures/segment2/segment2.07920.ia1.png": [8,16,16,{"jp":[1078992,31008]}], -"textures/segment2/segment2.07930.ia1.png": [8,16,16,{"jp":[1078992,31024]}], -"textures/segment2/segment2.07940.ia1.png": [8,16,16,{"jp":[1078992,31040]}], -"textures/segment2/segment2.07950.ia1.png": [8,16,16,{"jp":[1078992,31056]}], -"textures/segment2/segment2.07960.ia1.png": [8,16,16,{"jp":[1078992,31072]}], -"textures/segment2/segment2.07970.ia1.png": [8,16,16,{"jp":[1078992,31088]}], -"textures/segment2/segment2.07980.ia1.png": [8,16,16,{"jp":[1078992,31104]}], -"textures/segment2/segment2.07990.ia1.png": [8,16,16,{"jp":[1078992,31120]}], -"textures/segment2/segment2.079A0.ia1.png": [8,16,16,{"jp":[1078992,31136]}], -"textures/segment2/segment2.079B0.ia1.png": [8,16,16,{"jp":[1078992,31152]}], -"textures/segment2/segment2.079C0.ia1.png": [8,16,16,{"jp":[1078992,31168]}], -"textures/segment2/segment2.079D0.ia1.png": [8,16,16,{"jp":[1078992,31184]}], -"textures/segment2/segment2.079E0.ia1.png": [8,16,16,{"jp":[1078992,31200]}], -"textures/segment2/segment2.079F0.ia1.png": [8,16,16,{"jp":[1078992,31216]}], -"textures/segment2/segment2.07A00.ia1.png": [8,16,16,{"jp":[1078992,31232]}], -"textures/segment2/segment2.07A10.ia1.png": [8,16,16,{"jp":[1078992,31248]}], -"textures/segment2/segment2.07A20.ia1.png": [8,16,16,{"jp":[1078992,31264]}], -"textures/segment2/segment2.07A30.ia1.png": [8,16,16,{"jp":[1078992,31280]}], -"textures/segment2/segment2.07A40.ia1.png": [8,16,16,{"jp":[1078992,31296]}], -"textures/segment2/segment2.07A50.ia1.png": [8,16,16,{"jp":[1078992,31312]}], -"textures/segment2/segment2.07A60.ia1.png": [8,16,16,{"jp":[1078992,31328]}], -"textures/segment2/segment2.07A70.ia1.png": [8,16,16,{"jp":[1078992,31344]}], -"textures/segment2/segment2.07A80.ia1.png": [8,16,16,{"jp":[1078992,31360]}], -"textures/segment2/segment2.07A90.ia1.png": [8,16,16,{"jp":[1078992,31376]}], -"textures/segment2/segment2.07AA0.ia1.png": [8,16,16,{"jp":[1078992,31392]}], -"textures/segment2/segment2.07AB0.ia1.png": [8,16,16,{"jp":[1078992,31408]}], -"textures/segment2/segment2.07AC0.ia1.png": [8,16,16,{"jp":[1078992,31424]}], -"textures/segment2/segment2.07AD0.ia1.png": [8,16,16,{"jp":[1078992,31440]}], -"textures/segment2/segment2.07AE0.ia1.png": [8,16,16,{"jp":[1078992,31456]}], -"textures/segment2/segment2.07AF0.ia1.png": [8,16,16,{"jp":[1078992,31472]}], -"textures/segment2/segment2.07B00.ia1.png": [8,16,16,{"jp":[1078992,31488]}], -"textures/segment2/segment2.07B10.ia1.png": [8,16,16,{"jp":[1078992,31504]}], -"textures/segment2/segment2.07B20.ia1.png": [8,16,16,{"jp":[1078992,31520]}], -"textures/segment2/segment2.07B30.ia1.png": [8,16,16,{"jp":[1078992,31536]}], -"textures/segment2/segment2.07B40.ia1.png": [8,16,16,{"jp":[1078992,31552]}], -"textures/segment2/segment2.07B50.rgba16.png": [16,16,512,{"jp":[1078992,31568],"us":[1083968,28672],"eu":[909712,25920]}], -"textures/segment2/segment2.07D50.rgba16.png": [16,16,512,{"jp":[1078992,32080],"us":[1083968,29184],"eu":[909712,26432]}], -"textures/segment2/segment2.07F50.rgba16.png": [16,16,512,{"jp":[1078992,32592],"us":[1083968,29696],"eu":[909712,26944]}], -"textures/segment2/segment2.08150.rgba16.png": [8,8,128,{"jp":[1078992,33104],"us":[1083968,30208],"eu":[909712,27456]}], -"textures/segment2/segment2.081D0.rgba16.png": [8,8,128,{"jp":[1078992,33232],"us":[1083968,30336],"eu":[909712,27584]}], -"textures/segment2/segment2.0F458.ia8.png": [32,64,2048,{"jp":[1078992,62552],"us":[1083968,74424],"eu":[909712,31096]}], -"textures/segment2/segment2.0FC58.ia8.png": [32,64,2048,{"jp":[1078992,64600],"us":[1083968,76472],"eu":[909712,33144]}], -"textures/segment2/segment2.10458.ia8.png": [64,64,4096,{"jp":[1078992,66648],"us":[1083968,78520],"eu":[909712,35192]}], -"textures/segment2/segment2.11458.ia8.png": [32,64,2048,{"jp":[1078992,70744],"us":[1083968,82616],"eu":[909712,39288]}], -"textures/segment2/segment2.11C58.rgba16.png": [32,32,2048,{"jp":[1078992,72792],"us":[1083968,84664],"eu":[909712,41336]}], -"textures/segment2/segment2.12458.rgba16.png": [32,32,2048,{"jp":[1078992,74840],"us":[1083968,86712],"eu":[909712,43384]}], -"textures/segment2/segment2.12C58.rgba16.png": [32,32,2048,{"jp":[1078992,76888],"us":[1083968,88760],"eu":[909712,45432]}], -"textures/segment2/segment2.13458.ia16.png": [32,32,2048,{"jp":[1078992,78936],"us":[1083968,90808],"eu":[909712,47480]}], -"textures/segment2/segment2.13C58.rgba16.png": [32,32,2048,{"jp":[1078992,80984],"us":[1083968,92856],"eu":[909712,49528]}], -"textures/segment2/segment2.14838.ia8.png": [8,8,64,{"jp":[1078992,84024],"us":[1083968,95896],"eu":[909712,52568]}], +"textures/segment2/segment2.00000.rgba16.png": [16,16,512,{"jp":[1078992,0],"us":[1083968,0],"eu":[909712,0],"sh":[934640,0]}], +"textures/segment2/segment2.00200.rgba16.png": [16,16,512,{"jp":[1078992,512],"us":[1083968,512],"eu":[909712,512],"sh":[934640,512]}], +"textures/segment2/segment2.00400.rgba16.png": [16,16,512,{"jp":[1078992,1024],"us":[1083968,1024],"eu":[909712,1024],"sh":[934640,1024]}], +"textures/segment2/segment2.00600.rgba16.png": [16,16,512,{"jp":[1078992,1536],"us":[1083968,1536],"eu":[909712,1536],"sh":[934640,1536]}], +"textures/segment2/segment2.00800.rgba16.png": [16,16,512,{"jp":[1078992,2048],"us":[1083968,2048],"eu":[909712,2048],"sh":[934640,2048]}], +"textures/segment2/segment2.00A00.rgba16.png": [16,16,512,{"jp":[1078992,2560],"us":[1083968,2560],"eu":[909712,2560],"sh":[934640,2560]}], +"textures/segment2/segment2.00C00.rgba16.png": [16,16,512,{"jp":[1078992,3072],"us":[1083968,3072],"eu":[909712,3072],"sh":[934640,3072]}], +"textures/segment2/segment2.00E00.rgba16.png": [16,16,512,{"jp":[1078992,3584],"us":[1083968,3584],"eu":[909712,3584],"sh":[934640,3584]}], +"textures/segment2/segment2.01000.rgba16.png": [16,16,512,{"jp":[1078992,4096],"us":[1083968,4096],"eu":[909712,4096],"sh":[934640,4096]}], +"textures/segment2/segment2.01200.rgba16.png": [16,16,512,{"jp":[1078992,4608],"us":[1083968,4608],"eu":[909712,4608],"sh":[934640,4608]}], +"textures/segment2/segment2.01400.rgba16.png": [16,16,512,{"jp":[1078992,5120],"us":[1083968,5120],"eu":[909712,5120],"sh":[934640,5120]}], +"textures/segment2/segment2.01600.rgba16.png": [16,16,512,{"jp":[1078992,5632],"us":[1083968,5632],"eu":[909712,5632],"sh":[934640,5632]}], +"textures/segment2/segment2.01800.rgba16.png": [16,16,512,{"jp":[1078992,6144],"us":[1083968,6144],"eu":[909712,6144],"sh":[934640,6144]}], +"textures/segment2/segment2.01A00.rgba16.png": [16,16,512,{"jp":[1078992,6656],"us":[1083968,6656],"eu":[909712,6656],"sh":[934640,6656]}], +"textures/segment2/segment2.01C00.rgba16.png": [16,16,512,{"jp":[1078992,7168],"us":[1083968,7168],"eu":[909712,7168],"sh":[934640,7168]}], +"textures/segment2/segment2.01E00.rgba16.png": [16,16,512,{"jp":[1078992,7680],"us":[1083968,7680],"eu":[909712,7680],"sh":[934640,7680]}], +"textures/segment2/segment2.02000.rgba16.png": [16,16,512,{"jp":[1078992,8192],"us":[1083968,8192],"eu":[909712,8192],"sh":[934640,8192]}], +"textures/segment2/segment2.02200.rgba16.png": [16,16,512,{"jp":[1078992,8704],"us":[1083968,8704],"eu":[909712,8704],"sh":[934640,8704]}], +"textures/segment2/segment2.02400.rgba16.png": [16,16,512,{"jp":[1078992,9216],"us":[1083968,9216],"eu":[909712,9216],"sh":[934640,9216]}], +"textures/segment2/segment2.02600.rgba16.png": [16,16,512,{"jp":[1078992,9728],"sh":[934640,9728]}], +"textures/segment2/segment2.02800.rgba16.png": [16,16,512,{"jp":[1078992,10240],"us":[1083968,9728],"eu":[909712,9728],"sh":[934640,10240]}], +"textures/segment2/segment2.02A00.rgba16.png": [16,16,512,{"jp":[1078992,10752],"us":[1083968,10240],"eu":[909712,10240],"sh":[934640,10752]}], +"textures/segment2/segment2.02C00.rgba16.png": [16,16,512,{"jp":[1078992,11264],"us":[1083968,10752],"eu":[909712,10752],"sh":[934640,11264]}], +"textures/segment2/segment2.02E00.rgba16.png": [16,16,512,{"jp":[1078992,11776],"us":[1083968,11264],"eu":[909712,11264],"sh":[934640,11776]}], +"textures/segment2/segment2.03000.rgba16.png": [16,16,512,{"jp":[1078992,12288],"us":[1083968,11776],"eu":[909712,11776],"sh":[934640,12288]}], +"textures/segment2/segment2.03200.rgba16.png": [16,16,512,{"jp":[1078992,12800],"us":[1083968,12288],"eu":[909712,12288],"sh":[934640,12800]}], +"textures/segment2/segment2.03400.rgba16.png": [16,16,512,{"jp":[1078992,13312],"sh":[934640,13312]}], +"textures/segment2/segment2.03600.rgba16.png": [16,16,512,{"jp":[1078992,13824],"us":[1083968,12800],"eu":[909712,12800],"sh":[934640,13824]}], +"textures/segment2/segment2.03800.rgba16.png": [16,16,512,{"jp":[1078992,14336],"us":[1083968,13312],"eu":[909712,13312],"sh":[934640,14336]}], +"textures/segment2/segment2.03A00.rgba16.png": [16,16,512,{"jp":[1078992,14848],"us":[1083968,13824],"eu":[909712,13824],"sh":[934640,14848]}], +"textures/segment2/segment2.03C00.rgba16.png": [16,16,512,{"jp":[1078992,15360],"us":[1083968,14336],"eu":[909712,14336],"sh":[934640,15360]}], +"textures/segment2/segment2.03E00.rgba16.png": [16,16,512,{"jp":[1078992,15872],"eu":[909712,14848],"sh":[934640,15872]}], +"textures/segment2/segment2.04000.rgba16.png": [16,16,512,{"jp":[1078992,16384],"us":[1083968,14848],"eu":[909712,15360],"sh":[934640,16384]}], +"textures/segment2/segment2.04200.rgba16.png": [16,16,512,{"jp":[1078992,16896],"sh":[934640,16896]}], +"textures/segment2/segment2.04400.rgba16.png": [16,16,512,{"jp":[1078992,17408],"us":[1083968,15360],"eu":[909712,15872],"sh":[934640,17408]}], +"textures/segment2/segment2.04600.rgba16.png": [16,16,512,{"jp":[1078992,17920],"eu":[909712,16384],"sh":[934640,17920]}], +"textures/segment2/segment2.04800.rgba16.png": [16,16,512,{"jp":[1078992,18432],"us":[1083968,15872],"eu":[909712,16896],"sh":[934640,18432]}], +"textures/segment2/segment2.04A00.rgba16.png": [16,16,512,{"jp":[1078992,18944],"us":[1083968,16384],"eu":[909712,17408],"sh":[934640,18944]}], +"textures/segment2/segment2.04C00.rgba16.png": [16,16,512,{"jp":[1078992,19456],"sh":[934640,19456]}], +"textures/segment2/segment2.04E00.rgba16.png": [16,16,512,{"jp":[1078992,19968],"sh":[934640,19968]}], +"textures/segment2/segment2.05000.rgba16.png": [16,16,512,{"jp":[1078992,20480],"us":[2778544,41424],"eu":[2647072,41424],"sh":[934640,20480]}], +"textures/segment2/segment2.05200.rgba16.png": [16,16,512,{"jp":[1078992,20992],"sh":[934640,20992]}], +"textures/segment2/segment2.05400.rgba16.png": [16,16,512,{"jp":[1078992,21504],"sh":[934640,21504]}], +"textures/segment2/segment2.05600.rgba16.png": [16,16,512,{"jp":[1078992,22016],"us":[1083968,16896],"eu":[909712,18432],"sh":[934640,22016]}], +"textures/segment2/segment2.05800.rgba16.png": [16,16,512,{"jp":[1078992,22528],"us":[1083968,17408],"eu":[909712,18944],"sh":[934640,22528]}], +"textures/segment2/segment2.05A00.rgba16.png": [16,16,512,{"jp":[1078992,23040],"us":[1083968,17920],"eu":[909712,19456],"sh":[934640,23040]}], +"textures/segment2/segment2.05C00.rgba16.png": [16,16,512,{"jp":[1078992,23552],"us":[1083968,18432],"eu":[909712,19968],"sh":[934640,23552]}], +"textures/segment2/segment2.05E00.rgba16.png": [16,16,512,{"jp":[1078992,24064],"sh":[934640,24064]}], +"textures/segment2/segment2.06000.rgba16.png": [16,16,512,{"jp":[1078992,24576],"sh":[934640,24576]}], +"textures/segment2/segment2.06200.rgba16.png": [8,8,128,{"jp":[1078992,25088],"us":[1083968,18944],"eu":[909712,20480],"sh":[934640,25088]}], +"textures/segment2/segment2.06280.rgba16.png": [8,8,128,{"jp":[1078992,25216],"us":[1083968,19072],"eu":[909712,20608],"sh":[934640,25216]}], +"textures/segment2/segment2.06300.rgba16.png": [8,8,128,{"jp":[1078992,25344],"us":[1083968,19200],"eu":[909712,20736],"sh":[934640,25344]}], +"textures/segment2/segment2.06380.rgba16.png": [8,8,128,{"jp":[1078992,25472],"us":[1083968,19328],"eu":[909712,20864],"sh":[934640,25472]}], +"textures/segment2/segment2.06400.rgba16.png": [8,8,128,{"jp":[1078992,25600],"us":[1083968,19456],"eu":[909712,20992],"sh":[934640,25600]}], +"textures/segment2/segment2.06480.rgba16.png": [8,8,128,{"jp":[1078992,25728],"us":[1083968,19584],"eu":[909712,21120],"sh":[934640,25728]}], +"textures/segment2/segment2.06500.rgba16.png": [8,8,128,{"jp":[1078992,25856],"us":[1083968,19712],"eu":[909712,21248],"sh":[934640,25856]}], +"textures/segment2/segment2.06580.rgba16.png": [8,8,128,{"jp":[1078992,25984],"us":[1083968,19840],"eu":[909712,21376],"sh":[934640,25984]}], +"textures/segment2/segment2.06600.rgba16.png": [8,8,128,{"jp":[1078992,26112],"us":[1083968,19968],"eu":[909712,21504],"sh":[934640,26112]}], +"textures/segment2/segment2.06680.rgba16.png": [8,8,128,{"jp":[1078992,26240],"us":[1083968,20096],"eu":[909712,21632],"sh":[934640,26240]}], +"textures/segment2/segment2.06700.rgba16.png": [8,8,128,{"jp":[1078992,26368],"us":[1083968,20224],"eu":[909712,21760],"sh":[934640,26368]}], +"textures/segment2/segment2.06780.rgba16.png": [8,8,128,{"jp":[1078992,26496],"us":[1083968,20352],"eu":[909712,21888],"sh":[934640,26496]}], +"textures/segment2/segment2.06800.rgba16.png": [8,8,128,{"jp":[1078992,26624],"us":[1083968,20480],"eu":[909712,22016],"sh":[934640,26624]}], +"textures/segment2/segment2.06880.rgba16.png": [8,8,128,{"jp":[1078992,26752],"us":[1083968,20608],"eu":[909712,22144],"sh":[934640,26752]}], +"textures/segment2/segment2.06900.rgba16.png": [8,8,128,{"jp":[1078992,26880],"us":[1083968,20736],"eu":[909712,22272],"sh":[934640,26880]}], +"textures/segment2/segment2.06980.rgba16.png": [8,8,128,{"jp":[1078992,27008],"us":[1083968,20864],"eu":[909712,22400],"sh":[934640,27008]}], +"textures/segment2/segment2.06A00.rgba16.png": [8,8,128,{"jp":[1078992,27136],"us":[1083968,20992],"eu":[909712,22528],"sh":[934640,27136]}], +"textures/segment2/segment2.06A80.rgba16.png": [8,8,128,{"jp":[1078992,27264],"us":[1083968,21120],"eu":[909712,22656],"sh":[934640,27264]}], +"textures/segment2/segment2.06B00.rgba16.png": [8,8,128,{"jp":[1078992,27392],"us":[1083968,21248],"eu":[909712,22784],"sh":[934640,27392]}], +"textures/segment2/segment2.06B80.rgba16.png": [8,8,128,{"jp":[1078992,27520],"us":[1083968,21376],"eu":[909712,22912],"sh":[934640,27520]}], +"textures/segment2/segment2.06C00.rgba16.png": [8,8,128,{"jp":[1078992,27648],"us":[1083968,21504],"eu":[909712,23040],"sh":[934640,27648]}], +"textures/segment2/segment2.06C80.rgba16.png": [8,8,128,{"jp":[1078992,27776],"us":[1083968,21632],"eu":[909712,23168],"sh":[934640,27776]}], +"textures/segment2/segment2.06D00.rgba16.png": [8,8,128,{"jp":[1078992,27904],"us":[1083968,21760],"eu":[909712,23296],"sh":[934640,27904]}], +"textures/segment2/segment2.06D80.rgba16.png": [8,8,128,{"jp":[1078992,28032],"us":[1083968,21888],"eu":[909712,23424],"sh":[934640,28032]}], +"textures/segment2/segment2.06E00.rgba16.png": [8,8,128,{"jp":[1078992,28160],"us":[1083968,22016],"eu":[909712,23552],"sh":[934640,28160]}], +"textures/segment2/segment2.06E80.rgba16.png": [8,8,128,{"jp":[1078992,28288],"us":[1083968,22144],"eu":[909712,23680],"sh":[934640,28288]}], +"textures/segment2/segment2.06F00.rgba16.png": [8,8,128,{"jp":[1078992,28416],"us":[1083968,22272],"eu":[909712,23808],"sh":[934640,28416]}], +"textures/segment2/segment2.06F80.rgba16.png": [8,8,128,{"jp":[1078992,28544],"us":[1083968,22400],"eu":[909712,23936],"sh":[934640,28544]}], +"textures/segment2/segment2.07000.rgba16.png": [8,8,128,{"jp":[1078992,28672],"us":[1083968,22528],"eu":[909712,24064],"sh":[934640,28672]}], +"textures/segment2/segment2.07080.rgba16.png": [8,8,128,{"jp":[1078992,28800],"us":[1083968,22656],"eu":[909712,24192],"sh":[934640,28800]}], +"textures/segment2/segment2.07100.ia1.png": [8,16,16,{"jp":[1078992,28928],"sh":[934640,28928]}], +"textures/segment2/segment2.07110.ia1.png": [8,16,16,{"jp":[1078992,28944],"sh":[934640,28944]}], +"textures/segment2/segment2.07120.ia1.png": [8,16,16,{"jp":[1078992,28960],"sh":[934640,28960]}], +"textures/segment2/segment2.07130.ia1.png": [8,16,16,{"jp":[1078992,28976],"sh":[934640,28976]}], +"textures/segment2/segment2.07140.ia1.png": [8,16,16,{"jp":[1078992,28992],"sh":[934640,28992]}], +"textures/segment2/segment2.07150.ia1.png": [8,16,16,{"jp":[1078992,29008],"sh":[934640,29008]}], +"textures/segment2/segment2.07160.ia1.png": [8,16,16,{"jp":[1078992,29024],"sh":[934640,29024]}], +"textures/segment2/segment2.07170.ia1.png": [8,16,16,{"jp":[1078992,29040],"sh":[934640,29040]}], +"textures/segment2/segment2.07180.ia1.png": [8,16,16,{"jp":[1078992,29056],"sh":[934640,29056]}], +"textures/segment2/segment2.07190.ia1.png": [8,16,16,{"jp":[1078992,29072],"sh":[934640,29072]}], +"textures/segment2/segment2.071A0.ia1.png": [8,16,16,{"jp":[1078992,29088],"sh":[934640,29088]}], +"textures/segment2/segment2.071B0.ia1.png": [8,16,16,{"jp":[1078992,29104],"sh":[934640,29104]}], +"textures/segment2/segment2.071C0.ia1.png": [8,16,16,{"jp":[1078992,29120],"sh":[934640,29120]}], +"textures/segment2/segment2.071D0.ia1.png": [8,16,16,{"jp":[1078992,29136],"sh":[934640,29136]}], +"textures/segment2/segment2.071E0.ia1.png": [8,16,16,{"jp":[1078992,29152],"sh":[934640,29152]}], +"textures/segment2/segment2.071F0.ia1.png": [8,16,16,{"jp":[1078992,29168],"sh":[934640,29168]}], +"textures/segment2/segment2.07200.ia1.png": [8,16,16,{"jp":[1078992,29184],"sh":[934640,29184]}], +"textures/segment2/segment2.07210.ia1.png": [8,16,16,{"jp":[1078992,29200],"sh":[934640,29200]}], +"textures/segment2/segment2.07220.ia1.png": [8,16,16,{"jp":[1078992,29216],"sh":[934640,29216]}], +"textures/segment2/segment2.07230.ia1.png": [8,16,16,{"jp":[1078992,29232],"sh":[934640,29232]}], +"textures/segment2/segment2.07240.ia1.png": [8,16,16,{"jp":[1078992,29248],"sh":[934640,29248]}], +"textures/segment2/segment2.07250.ia1.png": [8,16,16,{"jp":[1078992,29264],"sh":[934640,29264]}], +"textures/segment2/segment2.07260.ia1.png": [8,16,16,{"jp":[1078992,29280],"sh":[934640,29280]}], +"textures/segment2/segment2.07270.ia1.png": [8,16,16,{"jp":[1078992,29296],"sh":[934640,29296]}], +"textures/segment2/segment2.07280.ia1.png": [8,16,16,{"jp":[1078992,29312],"sh":[934640,29312]}], +"textures/segment2/segment2.07290.ia1.png": [8,16,16,{"jp":[1078992,29328],"sh":[934640,29328]}], +"textures/segment2/segment2.072A0.ia1.png": [8,16,16,{"jp":[1078992,29344],"sh":[934640,29344]}], +"textures/segment2/segment2.072B0.ia1.png": [8,16,16,{"jp":[1078992,29360],"sh":[934640,29360]}], +"textures/segment2/segment2.072C0.ia1.png": [8,16,16,{"jp":[1078992,29376],"sh":[934640,29376]}], +"textures/segment2/segment2.072D0.ia1.png": [8,16,16,{"jp":[1078992,29392],"sh":[934640,29392]}], +"textures/segment2/segment2.072E0.ia1.png": [8,16,16,{"jp":[1078992,29408],"sh":[934640,29408]}], +"textures/segment2/segment2.072F0.ia1.png": [8,16,16,{"jp":[1078992,29424],"sh":[934640,29424]}], +"textures/segment2/segment2.07300.ia1.png": [8,16,16,{"jp":[1078992,29440],"sh":[934640,29440]}], +"textures/segment2/segment2.07310.ia1.png": [8,16,16,{"jp":[1078992,29456],"sh":[934640,29456]}], +"textures/segment2/segment2.07320.ia1.png": [8,16,16,{"jp":[1078992,29472],"sh":[934640,29472]}], +"textures/segment2/segment2.07330.ia1.png": [8,16,16,{"jp":[1078992,29488],"sh":[934640,29488]}], +"textures/segment2/segment2.07340.ia1.png": [8,16,16,{"jp":[1078992,29504],"us":[1083968,24050],"eu":[2647072,44317],"sh":[934640,29504]}], +"textures/segment2/segment2.07350.ia1.png": [8,16,16,{"jp":[1078992,29520],"sh":[934640,29520]}], +"textures/segment2/segment2.07360.ia1.png": [8,16,16,{"jp":[1078992,29536],"sh":[934640,29536]}], +"textures/segment2/segment2.07370.ia1.png": [8,16,16,{"jp":[1078992,29552],"sh":[934640,29552]}], +"textures/segment2/segment2.07380.ia1.png": [8,16,16,{"jp":[1078992,29568],"sh":[934640,29568]}], +"textures/segment2/segment2.07390.ia1.png": [8,16,16,{"jp":[1078992,29584],"sh":[934640,29584]}], +"textures/segment2/segment2.073A0.ia1.png": [8,16,16,{"jp":[1078992,29600],"sh":[934640,29600]}], +"textures/segment2/segment2.073B0.ia1.png": [8,16,16,{"jp":[1078992,29616],"sh":[934640,29616]}], +"textures/segment2/segment2.073C0.ia1.png": [8,16,16,{"jp":[1078992,29632],"sh":[934640,29632]}], +"textures/segment2/segment2.073D0.ia1.png": [8,16,16,{"jp":[1078992,29648],"sh":[934640,29648]}], +"textures/segment2/segment2.073E0.ia1.png": [8,16,16,{"jp":[1078992,29664],"sh":[934640,29664]}], +"textures/segment2/segment2.073F0.ia1.png": [8,16,16,{"jp":[1078992,29680],"sh":[934640,29680]}], +"textures/segment2/segment2.07400.ia1.png": [8,16,16,{"jp":[1078992,29696],"sh":[934640,29696]}], +"textures/segment2/segment2.07410.ia1.png": [8,16,16,{"jp":[1078992,29712],"sh":[934640,29712]}], +"textures/segment2/segment2.07420.ia1.png": [8,16,16,{"jp":[1078992,29728],"sh":[934640,29728]}], +"textures/segment2/segment2.07430.ia1.png": [8,16,16,{"jp":[1078992,29744],"sh":[934640,29744]}], +"textures/segment2/segment2.07440.ia1.png": [8,16,16,{"jp":[1078992,29760],"sh":[934640,29760]}], +"textures/segment2/segment2.07450.ia1.png": [8,16,16,{"jp":[1078992,29776],"sh":[934640,29776]}], +"textures/segment2/segment2.07460.ia1.png": [8,16,16,{"jp":[1078992,29792],"sh":[934640,29792]}], +"textures/segment2/segment2.07470.ia1.png": [8,16,16,{"jp":[1078992,29808],"sh":[934640,29808]}], +"textures/segment2/segment2.07480.ia1.png": [8,16,16,{"jp":[1078992,29824],"sh":[934640,29824]}], +"textures/segment2/segment2.07490.ia1.png": [8,16,16,{"jp":[1078992,29840],"sh":[934640,29840]}], +"textures/segment2/segment2.074A0.ia1.png": [8,16,16,{"jp":[1078992,29856],"sh":[934640,29856]}], +"textures/segment2/segment2.074B0.ia1.png": [8,16,16,{"jp":[1078992,29872],"sh":[934640,29872]}], +"textures/segment2/segment2.074C0.ia1.png": [8,16,16,{"jp":[1078992,29888],"sh":[934640,29888]}], +"textures/segment2/segment2.074D0.ia1.png": [8,16,16,{"jp":[1078992,29904],"sh":[934640,29904]}], +"textures/segment2/segment2.074E0.ia1.png": [8,16,16,{"jp":[1078992,29920],"sh":[934640,29920]}], +"textures/segment2/segment2.074F0.ia1.png": [8,16,16,{"jp":[1078992,29936],"sh":[934640,29936]}], +"textures/segment2/segment2.07500.ia1.png": [8,16,16,{"jp":[1078992,29952],"sh":[934640,29952]}], +"textures/segment2/segment2.07510.ia1.png": [8,16,16,{"jp":[1078992,29968],"sh":[934640,29968]}], +"textures/segment2/segment2.07520.ia1.png": [8,16,16,{"jp":[1078992,29984],"sh":[934640,29984]}], +"textures/segment2/segment2.07530.ia1.png": [8,16,16,{"jp":[1078992,30000],"sh":[934640,30000]}], +"textures/segment2/segment2.07540.ia1.png": [8,16,16,{"jp":[1078992,30016],"sh":[934640,30016]}], +"textures/segment2/segment2.07550.ia1.png": [8,16,16,{"jp":[1078992,30032],"sh":[934640,30032]}], +"textures/segment2/segment2.07560.ia1.png": [8,16,16,{"jp":[1078992,30048],"sh":[934640,30048]}], +"textures/segment2/segment2.07570.ia1.png": [8,16,16,{"jp":[1078992,30064],"sh":[934640,30064]}], +"textures/segment2/segment2.07580.ia1.png": [8,16,16,{"jp":[1078992,30080],"sh":[934640,30080]}], +"textures/segment2/segment2.07590.ia1.png": [8,16,16,{"jp":[1078992,30096],"sh":[934640,30096]}], +"textures/segment2/segment2.075A0.ia1.png": [8,16,16,{"jp":[1078992,30112],"sh":[934640,30112]}], +"textures/segment2/segment2.075B0.ia1.png": [8,16,16,{"jp":[1078992,30128],"sh":[934640,30128]}], +"textures/segment2/segment2.075C0.ia1.png": [8,16,16,{"jp":[1078992,30144],"sh":[934640,30144]}], +"textures/segment2/segment2.075D0.ia1.png": [8,16,16,{"jp":[1078992,30160],"sh":[934640,30160]}], +"textures/segment2/segment2.075E0.ia1.png": [8,16,16,{"jp":[1078992,30176],"sh":[934640,30176]}], +"textures/segment2/segment2.075F0.ia1.png": [8,16,16,{"jp":[1078992,30192],"sh":[934640,30192]}], +"textures/segment2/segment2.07600.ia1.png": [8,16,16,{"jp":[1078992,30208],"sh":[934640,30208]}], +"textures/segment2/segment2.07610.ia1.png": [8,16,16,{"jp":[1078992,30224],"sh":[934640,30224]}], +"textures/segment2/segment2.07620.ia1.png": [8,16,16,{"jp":[1078992,30240],"sh":[934640,30240]}], +"textures/segment2/segment2.07630.ia1.png": [8,16,16,{"jp":[1078992,30256],"sh":[934640,30256]}], +"textures/segment2/segment2.07640.ia1.png": [8,16,16,{"jp":[1078992,30272],"sh":[934640,30272]}], +"textures/segment2/segment2.07650.ia1.png": [8,16,16,{"jp":[1078992,30288],"sh":[934640,30288]}], +"textures/segment2/segment2.07660.ia1.png": [8,16,16,{"jp":[1078992,30304],"sh":[934640,30304]}], +"textures/segment2/segment2.07670.ia1.png": [8,16,16,{"jp":[1078992,30320],"sh":[934640,30320]}], +"textures/segment2/segment2.07680.ia1.png": [8,16,16,{"jp":[1078992,30336],"sh":[934640,30336]}], +"textures/segment2/segment2.07690.ia1.png": [8,16,16,{"jp":[1078992,30352],"sh":[934640,30352]}], +"textures/segment2/segment2.076A0.ia1.png": [8,16,16,{"jp":[1078992,30368],"sh":[934640,30368]}], +"textures/segment2/segment2.076B0.ia1.png": [8,16,16,{"jp":[1078992,30384],"sh":[934640,30384]}], +"textures/segment2/segment2.076C0.ia1.png": [8,16,16,{"jp":[1078992,30400],"sh":[934640,30400]}], +"textures/segment2/segment2.076D0.ia1.png": [8,16,16,{"jp":[1078992,30416],"sh":[934640,30416]}], +"textures/segment2/segment2.076E0.ia1.png": [8,16,16,{"jp":[1078992,30432],"sh":[934640,30432]}], +"textures/segment2/segment2.076F0.ia1.png": [8,16,16,{"jp":[1078992,30448],"sh":[934640,30448]}], +"textures/segment2/segment2.07700.ia1.png": [8,16,16,{"jp":[1078992,30464],"sh":[934640,30464]}], +"textures/segment2/segment2.07710.ia1.png": [8,16,16,{"jp":[1078992,30480],"sh":[934640,30480]}], +"textures/segment2/segment2.07720.ia1.png": [8,16,16,{"jp":[1078992,30496],"sh":[934640,30496]}], +"textures/segment2/segment2.07730.ia1.png": [8,16,16,{"jp":[1078992,30512],"sh":[934640,30512]}], +"textures/segment2/segment2.07740.ia1.png": [8,16,16,{"jp":[1078992,30528],"sh":[934640,30528]}], +"textures/segment2/segment2.07750.ia1.png": [8,16,16,{"jp":[1078992,30544],"sh":[934640,30544]}], +"textures/segment2/segment2.07760.ia1.png": [8,16,16,{"jp":[1078992,30560],"sh":[934640,30560]}], +"textures/segment2/segment2.07770.ia1.png": [8,16,16,{"jp":[1078992,30576],"sh":[934640,30576]}], +"textures/segment2/segment2.07780.ia1.png": [8,16,16,{"jp":[1078992,30592],"sh":[934640,30592]}], +"textures/segment2/segment2.07790.ia1.png": [8,16,16,{"jp":[1078992,30608],"sh":[934640,30608]}], +"textures/segment2/segment2.077A0.ia1.png": [8,16,16,{"jp":[1078992,30624],"sh":[934640,30624]}], +"textures/segment2/segment2.077B0.ia1.png": [8,16,16,{"jp":[1078992,30640],"sh":[934640,30640]}], +"textures/segment2/segment2.077C0.ia1.png": [8,16,16,{"jp":[1078992,30656],"sh":[934640,30656]}], +"textures/segment2/segment2.077D0.ia1.png": [8,16,16,{"jp":[1078992,30672],"sh":[934640,30672]}], +"textures/segment2/segment2.077E0.ia1.png": [8,16,16,{"jp":[1078992,30688],"sh":[934640,30688]}], +"textures/segment2/segment2.077F0.ia1.png": [8,16,16,{"jp":[1078992,30704],"sh":[934640,30704]}], +"textures/segment2/segment2.07800.ia1.png": [8,16,16,{"jp":[1078992,30720],"sh":[934640,30720]}], +"textures/segment2/segment2.07810.ia1.png": [8,16,16,{"jp":[1078992,30736],"sh":[934640,30736]}], +"textures/segment2/segment2.07820.ia1.png": [8,16,16,{"jp":[1078992,30752],"sh":[934640,30752]}], +"textures/segment2/segment2.07830.ia1.png": [8,16,16,{"jp":[1078992,30768],"sh":[934640,30768]}], +"textures/segment2/segment2.07840.ia1.png": [8,16,16,{"jp":[1078992,30784],"sh":[934640,30784]}], +"textures/segment2/segment2.07850.ia1.png": [8,16,16,{"jp":[1078992,30800],"sh":[934640,30800]}], +"textures/segment2/segment2.07860.ia1.png": [8,16,16,{"jp":[1078992,30816],"sh":[934640,30816]}], +"textures/segment2/segment2.07870.ia1.png": [8,16,16,{"jp":[1078992,30832],"sh":[934640,30832]}], +"textures/segment2/segment2.07880.ia1.png": [8,16,16,{"jp":[1078992,30848],"sh":[934640,30848]}], +"textures/segment2/segment2.07890.ia1.png": [8,16,16,{"jp":[1078992,30864],"sh":[934640,30864]}], +"textures/segment2/segment2.078A0.ia1.png": [8,16,16,{"jp":[1078992,30880],"sh":[934640,30880]}], +"textures/segment2/segment2.078B0.ia1.png": [8,16,16,{"jp":[1078992,30896],"sh":[934640,30896]}], +"textures/segment2/segment2.078C0.ia1.png": [8,16,16,{"jp":[1078992,30912],"sh":[934640,30912]}], +"textures/segment2/segment2.078D0.ia1.png": [8,16,16,{"jp":[1078992,30928],"sh":[934640,30928]}], +"textures/segment2/segment2.078E0.ia1.png": [8,16,16,{"jp":[1078992,30944],"sh":[934640,30944]}], +"textures/segment2/segment2.078F0.ia1.png": [8,16,16,{"jp":[1078992,30960],"sh":[934640,30960]}], +"textures/segment2/segment2.07900.ia1.png": [8,16,16,{"jp":[1078992,30976],"sh":[934640,30976]}], +"textures/segment2/segment2.07910.ia1.png": [8,16,16,{"jp":[1078992,30992],"sh":[934640,30992]}], +"textures/segment2/segment2.07920.ia1.png": [8,16,16,{"jp":[1078992,31008],"sh":[934640,31008]}], +"textures/segment2/segment2.07930.ia1.png": [8,16,16,{"jp":[1078992,31024],"sh":[934640,31024]}], +"textures/segment2/segment2.07940.ia1.png": [8,16,16,{"jp":[1078992,31040],"sh":[934640,31040]}], +"textures/segment2/segment2.07950.ia1.png": [8,16,16,{"jp":[1078992,31056],"sh":[934640,31056]}], +"textures/segment2/segment2.07960.ia1.png": [8,16,16,{"jp":[1078992,31072],"sh":[934640,31072]}], +"textures/segment2/segment2.07970.ia1.png": [8,16,16,{"jp":[1078992,31088],"sh":[934640,31088]}], +"textures/segment2/segment2.07980.ia1.png": [8,16,16,{"jp":[1078992,31104],"sh":[934640,31104]}], +"textures/segment2/segment2.07990.ia1.png": [8,16,16,{"jp":[1078992,31120],"sh":[934640,31120]}], +"textures/segment2/segment2.079A0.ia1.png": [8,16,16,{"jp":[1078992,31136],"sh":[934640,31136]}], +"textures/segment2/segment2.079B0.ia1.png": [8,16,16,{"jp":[1078992,31152],"sh":[934640,31152]}], +"textures/segment2/segment2.079C0.ia1.png": [8,16,16,{"jp":[1078992,31168],"sh":[934640,31168]}], +"textures/segment2/segment2.079D0.ia1.png": [8,16,16,{"jp":[1078992,31184],"sh":[934640,31184]}], +"textures/segment2/segment2.079E0.ia1.png": [8,16,16,{"jp":[1078992,31200],"sh":[934640,31200]}], +"textures/segment2/segment2.079F0.ia1.png": [8,16,16,{"jp":[1078992,31216],"sh":[934640,31216]}], +"textures/segment2/segment2.07A00.ia1.png": [8,16,16,{"jp":[1078992,31232],"sh":[934640,31232]}], +"textures/segment2/segment2.07A10.ia1.png": [8,16,16,{"jp":[1078992,31248],"sh":[934640,31248]}], +"textures/segment2/segment2.07A20.ia1.png": [8,16,16,{"jp":[1078992,31264],"sh":[934640,31264]}], +"textures/segment2/segment2.07A30.ia1.png": [8,16,16,{"jp":[1078992,31280],"sh":[934640,31280]}], +"textures/segment2/segment2.07A40.ia1.png": [8,16,16,{"jp":[1078992,31296],"sh":[934640,31296]}], +"textures/segment2/segment2.07A50.ia1.png": [8,16,16,{"jp":[1078992,31312],"sh":[934640,31312]}], +"textures/segment2/segment2.07A60.ia1.png": [8,16,16,{"jp":[1078992,31328],"sh":[934640,31328]}], +"textures/segment2/segment2.07A70.ia1.png": [8,16,16,{"jp":[1078992,31344],"sh":[934640,31344]}], +"textures/segment2/segment2.07A80.ia1.png": [8,16,16,{"jp":[1078992,31360],"sh":[934640,31360]}], +"textures/segment2/segment2.07A90.ia1.png": [8,16,16,{"jp":[1078992,31376],"sh":[934640,31376]}], +"textures/segment2/segment2.07AA0.ia1.png": [8,16,16,{"jp":[1078992,31392],"sh":[934640,31392]}], +"textures/segment2/segment2.07AB0.ia1.png": [8,16,16,{"jp":[1078992,31408],"sh":[934640,31408]}], +"textures/segment2/segment2.07AC0.ia1.png": [8,16,16,{"jp":[1078992,31424],"sh":[934640,31424]}], +"textures/segment2/segment2.07AD0.ia1.png": [8,16,16,{"jp":[1078992,31440],"sh":[934640,31440]}], +"textures/segment2/segment2.07AE0.ia1.png": [8,16,16,{"jp":[1078992,31456],"sh":[934640,31456]}], +"textures/segment2/segment2.07AF0.ia1.png": [8,16,16,{"jp":[1078992,31472],"sh":[934640,31472]}], +"textures/segment2/segment2.07B00.ia1.png": [8,16,16,{"jp":[1078992,31488],"sh":[934640,31488]}], +"textures/segment2/segment2.07B10.ia1.png": [8,16,16,{"jp":[1078992,31504],"sh":[934640,31504]}], +"textures/segment2/segment2.07B20.ia1.png": [8,16,16,{"jp":[1078992,31520],"sh":[934640,31520]}], +"textures/segment2/segment2.07B30.ia1.png": [8,16,16,{"jp":[1078992,31536],"sh":[934640,31536]}], +"textures/segment2/segment2.07B40.ia1.png": [8,16,16,{"jp":[1078992,31552],"sh":[934640,31552]}], +"textures/segment2/segment2.07B50.rgba16.png": [16,16,512,{"jp":[1078992,31568],"us":[1083968,28672],"eu":[909712,25920],"sh":[934640,31568]}], +"textures/segment2/segment2.07D50.rgba16.png": [16,16,512,{"jp":[1078992,32080],"us":[1083968,29184],"eu":[909712,26432],"sh":[934640,32080]}], +"textures/segment2/segment2.07F50.rgba16.png": [16,16,512,{"jp":[1078992,32592],"us":[1083968,29696],"eu":[909712,26944],"sh":[934640,32592]}], +"textures/segment2/segment2.08150.rgba16.png": [8,8,128,{"jp":[1078992,33104],"us":[1083968,30208],"eu":[909712,27456],"sh":[934640,33104]}], +"textures/segment2/segment2.081D0.rgba16.png": [8,8,128,{"jp":[1078992,33232],"us":[1083968,30336],"eu":[909712,27584],"sh":[934640,33232]}], +"textures/segment2/segment2.0F458.ia8.png": [32,64,2048,{"jp":[1078992,62552],"us":[1083968,74424],"eu":[909712,31096],"sh":[934640,62552]}], +"textures/segment2/segment2.0FC58.ia8.png": [32,64,2048,{"jp":[1078992,64600],"us":[1083968,76472],"eu":[909712,33144],"sh":[934640,64600]}], +"textures/segment2/segment2.10458.ia8.png": [64,64,4096,{"jp":[1078992,66648],"us":[1083968,78520],"eu":[909712,35192],"sh":[934640,66648]}], +"textures/segment2/segment2.11458.ia8.png": [32,64,2048,{"jp":[1078992,70744],"us":[1083968,82616],"eu":[909712,39288],"sh":[934640,70744]}], +"textures/segment2/segment2.11C58.rgba16.png": [32,32,2048,{"jp":[1078992,72792],"us":[1083968,84664],"eu":[909712,41336],"sh":[934640,72792]}], +"textures/segment2/segment2.12458.rgba16.png": [32,32,2048,{"jp":[1078992,74840],"us":[1083968,86712],"eu":[909712,43384],"sh":[934640,74840]}], +"textures/segment2/segment2.12C58.rgba16.png": [32,32,2048,{"jp":[1078992,76888],"us":[1083968,88760],"eu":[909712,45432],"sh":[934640,76888]}], +"textures/segment2/segment2.13458.ia16.png": [32,32,2048,{"jp":[1078992,78936],"us":[1083968,90808],"eu":[909712,47480],"sh":[934640,78936]}], +"textures/segment2/segment2.13C58.rgba16.png": [32,32,2048,{"jp":[1078992,80984],"us":[1083968,92856],"eu":[909712,49528],"sh":[934640,80984]}], +"textures/segment2/segment2.14838.ia8.png": [8,8,64,{"jp":[1078992,84024],"us":[1083968,95896],"eu":[909712,52568],"sh":[934640,84024]}], "textures/segment2/segment2.umlaut.rgba16.png": [16,16,512,{"eu":[909712,17920]}], -"textures/segment2/shadow_quarter_circle.ia8.png": [16,16,256,{"jp":[1078992,62040],"us":[1083968,73912],"eu":[909712,30584]}], -"textures/segment2/shadow_quarter_square.ia8.png": [16,16,256,{"jp":[1078992,62296],"us":[1083968,74168],"eu":[909712,30840]}], -"textures/sky/metal_hole.rgba16.png": [32,32,2048,{"jp":[3390640,26624],"us":[3397392,26624],"eu":[3270992,26624]}], -"textures/sky/rr_textures.00000.rgba16.png": [32,32,2048,{"jp":[3390640,0],"us":[3397392,0],"eu":[3270992,0]}], -"textures/sky/rr_textures.00800.rgba16.png": [32,32,2048,{"jp":[3390640,2048],"us":[3397392,2048],"eu":[3270992,2048]}], -"textures/sky/rr_textures.01000.rgba16.png": [32,32,2048,{"jp":[3390640,4096],"us":[3397392,4096],"eu":[3270992,4096]}], -"textures/sky/rr_textures.01800.rgba16.png": [32,32,2048,{"jp":[3390640,6144],"us":[3397392,6144],"eu":[3270992,6144]}], -"textures/sky/rr_textures.02000.rgba16.png": [32,64,4096,{"jp":[3390640,8192],"us":[3397392,8192],"eu":[3270992,8192]}], -"textures/sky/rr_textures.03000.rgba16.png": [32,32,2048,{"jp":[3390640,12288],"us":[3397392,12288],"eu":[3270992,12288]}], -"textures/sky/rr_textures.03800.rgba16.png": [64,32,4096,{"jp":[3390640,14336],"us":[3397392,14336],"eu":[3270992,14336]}], -"textures/sky/rr_textures.04800.rgba16.png": [32,32,2048,{"jp":[3390640,18432],"us":[3397392,18432],"eu":[3270992,18432]}], -"textures/sky/rr_textures.05000.rgba16.png": [32,32,2048,{"jp":[3390640,20480],"us":[3397392,20480],"eu":[3270992,20480]}], -"textures/sky/rr_textures.05800.rgba16.png": [32,32,2048,{"jp":[3390640,22528],"us":[3397392,22528],"eu":[3270992,22528]}], -"textures/sky/rr_textures.06000.rgba16.png": [32,32,2048,{"jp":[3390640,24576],"us":[3397392,24576],"eu":[3270992,24576]}], -"textures/sky/rr_textures.07000.rgba16.png": [32,32,2048,{"jp":[3390640,28672],"us":[3397392,28672],"eu":[3270992,28672]}], -"textures/sky/rr_textures.07800.rgba16.png": [32,32,2048,{"jp":[3390640,30720],"us":[3397392,30720],"eu":[3270992,30720]}], -"textures/sky/rr_textures.08000.rgba16.png": [32,32,2048,{"jp":[3390640,32768],"us":[3397392,32768],"eu":[3270992,32768]}], -"textures/snow/ccm_textures.00000.rgba16.png": [32,32,2048,{"jp":[3405536,0],"us":[3412288,0],"eu":[3285888,0]}], -"textures/snow/ccm_textures.00800.rgba16.png": [32,32,2048,{"jp":[3405536,2048],"us":[3412288,2048],"eu":[3285888,2048]}], -"textures/snow/ccm_textures.01000.rgba16.png": [32,64,4096,{"jp":[3405536,4096],"us":[3412288,4096],"eu":[3285888,4096]}], -"textures/snow/ccm_textures.02000.rgba16.png": [32,32,2048,{"jp":[3405536,8192],"us":[3412288,8192],"eu":[3285888,8192]}], -"textures/snow/ccm_textures.02800.rgba16.png": [32,32,2048,{"jp":[3405536,10240],"us":[3412288,10240],"eu":[3285888,10240]}], -"textures/snow/ccm_textures.03000.rgba16.png": [32,32,2048,{"jp":[3405536,12288],"us":[3412288,12288],"eu":[3285888,12288]}], -"textures/snow/ccm_textures.03800.rgba16.png": [32,32,2048,{"jp":[3405536,14336],"us":[3412288,14336],"eu":[3285888,14336]}], -"textures/snow/ccm_textures.04000.rgba16.png": [32,32,2048,{"jp":[3405536,16384],"us":[3412288,16384],"eu":[3285888,16384]}], -"textures/snow/ccm_textures.04800.rgba16.png": [32,32,2048,{"jp":[3405536,18432],"us":[3412288,18432],"eu":[3285888,18432]}], -"textures/snow/ccm_textures.05000.rgba16.png": [32,32,2048,{"jp":[3405536,20480],"us":[3412288,20480],"eu":[3285888,20480]}], -"textures/snow/ccm_textures.05800.rgba16.png": [32,32,2048,{"jp":[3405536,22528],"us":[3412288,22528],"eu":[3285888,22528]}], -"textures/snow/ccm_textures.06000.rgba16.png": [32,32,2048,{"jp":[3405536,24576],"us":[3412288,24576],"eu":[3285888,24576]}], -"textures/snow/ccm_textures.06800.rgba16.png": [32,32,2048,{"jp":[3405536,26624],"us":[3412288,26624],"eu":[3285888,26624]}], -"textures/snow/ccm_textures.07000.rgba16.png": [64,32,4096,{"jp":[3405536,28672],"us":[3412288,28672],"eu":[3285888,28672]}], -"textures/snow/ccm_textures.08000.rgba16.png": [32,32,2048,{"jp":[3405536,32768],"us":[3412288,32768],"eu":[3285888,32768]}], -"textures/snow/ccm_textures.08800.rgba16.png": [32,32,2048,{"jp":[3405536,34816],"us":[3412288,34816],"eu":[3285888,34816]}], -"textures/snow/ccm_textures.09000.ia16.png": [32,32,2048,{"jp":[3405536,36864],"us":[3412288,36864],"eu":[3285888,36864]}], -"textures/snow/ccm_textures.09800.ia16.png": [32,32,2048,{"jp":[3405536,38912],"us":[3412288,38912],"eu":[3285888,38912]}], -"textures/spooky/bbh_textures.00000.rgba16.png": [32,32,2048,{"jp":[3298272,0],"us":[3305024,0],"eu":[3178624,0]}], -"textures/spooky/bbh_textures.00800.rgba16.png": [32,64,4096,{"jp":[3298272,2048],"us":[3305024,2048],"eu":[3178624,2048]}], -"textures/spooky/bbh_textures.01800.rgba16.png": [32,64,4096,{"jp":[3298272,6144],"us":[3305024,6144],"eu":[3178624,6144]}], -"textures/spooky/bbh_textures.02800.rgba16.png": [32,64,4096,{"jp":[3298272,10240],"us":[3305024,10240],"eu":[3178624,10240]}], -"textures/spooky/bbh_textures.03800.rgba16.png": [32,64,4096,{"jp":[3298272,14336],"us":[3305024,14336],"eu":[3178624,14336]}], -"textures/spooky/bbh_textures.04800.rgba16.png": [32,32,2048,{"jp":[3298272,18432],"us":[3305024,18432],"eu":[3178624,18432]}], -"textures/spooky/bbh_textures.05000.rgba16.png": [32,64,4096,{"jp":[3298272,20480],"us":[3305024,20480],"eu":[3178624,20480]}], -"textures/spooky/bbh_textures.06000.rgba16.png": [32,32,2048,{"jp":[3298272,24576],"us":[3305024,24576],"eu":[3178624,24576]}], -"textures/spooky/bbh_textures.06800.rgba16.png": [32,32,2048,{"jp":[3298272,26624],"us":[3305024,26624],"eu":[3178624,26624]}], -"textures/spooky/bbh_textures.07000.rgba16.png": [64,32,4096,{"jp":[3298272,28672],"us":[3305024,28672],"eu":[3178624,28672]}], -"textures/spooky/bbh_textures.08000.rgba16.png": [32,32,2048,{"jp":[3298272,32768],"us":[3305024,32768],"eu":[3178624,32768]}], -"textures/spooky/bbh_textures.08800.rgba16.png": [32,32,2048,{"jp":[3298272,34816],"us":[3305024,34816],"eu":[3178624,34816]}], -"textures/spooky/bbh_textures.09000.rgba16.png": [64,32,4096,{"jp":[3298272,36864],"us":[3305024,36864],"eu":[3178624,36864]}], -"textures/spooky/bbh_textures.0A000.rgba16.png": [32,32,2048,{"jp":[1462368,49800],"us":[1469536,49800],"eu":[1341504,49800]}], -"textures/spooky/bbh_textures.0A800.ia16.png": [32,32,2048,{"jp":[3298272,43008],"us":[3305024,43008],"eu":[3178624,43008]}], -"textures/spooky/bbh_textures.0B000.ia16.png": [32,32,2048,{"jp":[3298272,45056],"us":[3305024,45056],"eu":[3178624,45056]}], -"textures/spooky/bbh_textures.0B800.ia16.png": [32,64,4096,{"jp":[3298272,47104],"us":[3305024,47104],"eu":[3178624,47104]}], -"textures/title_screen_bg/title_screen_bg.001C0.rgba16.png": [80,20,3200,{"jp":[2550336,448],"us":[2558144,448],"eu":[2426672,448]}], -"textures/title_screen_bg/title_screen_bg.00E40.rgba16.png": [80,20,3200,{"jp":[2550336,3648],"us":[2558144,3648],"eu":[2426672,3648]}], -"textures/title_screen_bg/title_screen_bg.01AC0.rgba16.png": [80,20,3200,{"jp":[2550336,6848],"us":[2558144,6848],"eu":[2426672,6848]}], -"textures/title_screen_bg/title_screen_bg.02740.rgba16.png": [80,20,3200,{"jp":[2550336,10048],"us":[2558144,10048],"eu":[2426672,10048]}], -"textures/title_screen_bg/title_screen_bg.033C0.rgba16.png": [80,20,3200,{"jp":[2550336,13248],"us":[2558144,13248],"eu":[2426672,13248]}], -"textures/title_screen_bg/title_screen_bg.04040.rgba16.png": [80,20,3200,{"jp":[2550336,16448],"us":[2558144,16448],"eu":[2426672,16448]}], -"textures/title_screen_bg/title_screen_bg.04CC0.rgba16.png": [80,20,3200,{"jp":[2550336,19648],"us":[2558144,19648],"eu":[2426672,19648]}], -"textures/title_screen_bg/title_screen_bg.05940.rgba16.png": [80,20,3200,{"jp":[2550336,22848],"us":[2558144,22848],"eu":[2426672,22848]}], -"textures/water/jrb_textures.00000.rgba16.png": [32,32,2048,{"jp":[3354832,0],"us":[3361584,0],"eu":[3235184,0]}], -"textures/water/jrb_textures.00800.rgba16.png": [64,32,4096,{"jp":[3354832,2048],"us":[3361584,2048],"eu":[3235184,2048]}], -"textures/water/jrb_textures.01800.rgba16.png": [64,32,4096,{"jp":[3354832,6144],"us":[3361584,6144],"eu":[3235184,6144]}], -"textures/water/jrb_textures.02800.rgba16.png": [64,32,4096,{"jp":[3354832,10240],"us":[3361584,10240],"eu":[3235184,10240]}], -"textures/water/jrb_textures.03800.rgba16.png": [64,32,4096,{"jp":[3354832,14336],"us":[3361584,14336],"eu":[3235184,14336]}], -"textures/water/jrb_textures.04800.rgba16.png": [64,32,4096,{"jp":[3354832,18432],"us":[3361584,18432],"eu":[3235184,18432]}], -"textures/water/jrb_textures.05800.rgba16.png": [32,32,2048,{"jp":[3354832,22528],"us":[3361584,22528],"eu":[3235184,22528]}], -"textures/water/jrb_textures.06000.rgba16.png": [32,32,2048,{"jp":[3354832,24576],"us":[3361584,24576],"eu":[3235184,24576]}], -"textures/water/jrb_textures.06800.rgba16.png": [64,32,4096,{"jp":[3354832,26624],"us":[3361584,26624],"eu":[3235184,26624]}], -"textures/water/jrb_textures.07800.rgba16.png": [64,32,4096,{"jp":[3354832,30720],"us":[3361584,30720],"eu":[3235184,30720]}], -"textures/water/jrb_textures.08800.rgba16.png": [32,32,2048,{"jp":[3354832,34816],"us":[3361584,34816],"eu":[3235184,34816]}], -"textures/water/jrb_textures.09000.rgba16.png": [64,32,4096,{"jp":[3354832,36864],"us":[3361584,36864],"eu":[3235184,36864]}], -"textures/water/jrb_textures.0A000.rgba16.png": [32,32,2048,{"jp":[3354832,40960],"us":[3361584,40960],"eu":[3235184,40960]}], -"textures/water/jrb_textures.0A800.rgba16.png": [64,32,4096,{"jp":[3354832,43008],"us":[3361584,43008],"eu":[3235184,43008]}], -"textures/water/jrb_textures.0B800.rgba16.png": [64,32,4096,{"jp":[3354832,47104],"us":[3361584,47104],"eu":[3235184,47104]}], -"sound/samples/sfx_1/00_twirl.aiff": [0,{"jp":["@sound",0],"us":["@sound",0],"eu":["@sound",0]}], -"sound/samples/sfx_1/01_brushing.aiff": [0,{"jp":["@sound",1],"us":["@sound",1],"eu":["@sound",1]}], -"sound/samples/sfx_1/02_hand_touch.aiff": [0,{"jp":["@sound",2],"us":["@sound",2],"eu":["@sound",2]}], -"sound/samples/sfx_1/03_yoshi.aiff": [0,{"jp":["@sound",3],"us":["@sound",3],"eu":["@sound",3]}], -"sound/samples/sfx_1/04_plop.aiff": [0,{"jp":["@sound",4],"us":["@sound",4],"eu":["@sound",4]}], -"sound/samples/sfx_1/05_heavy_landing.aiff": [0,{"jp":["@sound",5],"us":["@sound",5],"eu":["@sound",5]}], -"sound/samples/sfx_terrain/00_step_default.aiff": [0,{"jp":["@sound",6],"us":["@sound",6],"eu":["@sound",6]}], -"sound/samples/sfx_terrain/01_step_grass.aiff": [0,{"jp":["@sound",7],"us":["@sound",7],"eu":["@sound",7]}], -"sound/samples/sfx_terrain/02_step_stone.aiff": [0,{"jp":["@sound",8],"us":["@sound",8],"eu":["@sound",8]}], -"sound/samples/sfx_terrain/03_step_spooky.aiff": [0,{"jp":["@sound",9],"us":["@sound",9],"eu":["@sound",9]}], -"sound/samples/sfx_terrain/04_step_snow.aiff": [0,{"jp":["@sound",10],"us":["@sound",10],"eu":["@sound",10]}], -"sound/samples/sfx_terrain/05_step_ice.aiff": [0,{"jp":["@sound",11],"us":["@sound",11],"eu":["@sound",11]}], -"sound/samples/sfx_terrain/06_step_metal.aiff": [0,{"jp":["@sound",12],"us":["@sound",12],"eu":["@sound",12]}], -"sound/samples/sfx_terrain/07_step_sand.aiff": [0,{"jp":["@sound",13],"us":["@sound",13],"eu":["@sound",13]}], -"sound/samples/sfx_water/00_plunge.aiff": [0,{"jp":["@sound",14],"us":["@sound",14],"eu":["@sound",14]}], -"sound/samples/sfx_water/01_splash.aiff": [0,{"jp":["@sound",15],"us":["@sound",15],"eu":["@sound",15]}], -"sound/samples/sfx_water/02_swim.aiff": [0,{"jp":["@sound",16],"us":["@sound",16],"eu":["@sound",16]}], -"sound/samples/sfx_4/00.aiff": [0,{"jp":["@sound",17],"us":["@sound",17],"eu":["@sound",17]}], -"sound/samples/sfx_4/01.aiff": [0,{"jp":["@sound",18],"us":["@sound",18],"eu":["@sound",18]}], -"sound/samples/sfx_4/02.aiff": [0,{"jp":["@sound",19],"us":["@sound",19],"eu":["@sound",19]}], -"sound/samples/sfx_4/03.aiff": [0,{"jp":["@sound",20],"us":["@sound",20],"eu":["@sound",20]}], -"sound/samples/sfx_4/04.aiff": [0,{"jp":["@sound",21],"us":["@sound",21],"eu":["@sound",21]}], -"sound/samples/sfx_4/05.aiff": [0,{"jp":["@sound",22],"us":["@sound",22],"eu":["@sound",22]}], -"sound/samples/sfx_4/06.aiff": [0,{"jp":["@sound",23],"us":["@sound",23],"eu":["@sound",23]}], -"sound/samples/sfx_4/07.aiff": [0,{"jp":["@sound",24],"us":["@sound",24],"eu":["@sound",24]}], -"sound/samples/sfx_4/08.aiff": [0,{"jp":["@sound",25],"us":["@sound",25],"eu":["@sound",25]}], -"sound/samples/sfx_4/09.aiff": [0,{"jp":["@sound",26],"us":["@sound",26],"eu":["@sound",26]}], -"sound/samples/sfx_5/00.aiff": [0,{"jp":["@sound",27],"us":["@sound",27],"eu":["@sound",27]}], -"sound/samples/sfx_5/01.aiff": [0,{"jp":["@sound",28],"us":["@sound",28],"eu":["@sound",28]}], -"sound/samples/sfx_5/02.aiff": [0,{"jp":["@sound",29],"us":["@sound",29],"eu":["@sound",29]}], -"sound/samples/sfx_5/03.aiff": [0,{"jp":["@sound",30],"us":["@sound",30],"eu":["@sound",30]}], -"sound/samples/sfx_5/04.aiff": [0,{"jp":["@sound",31],"us":["@sound",31],"eu":["@sound",31]}], -"sound/samples/sfx_5/05.aiff": [0,{"jp":["@sound",32],"us":["@sound",32],"eu":["@sound",32]}], -"sound/samples/sfx_5/06.aiff": [0,{"jp":["@sound",33],"us":["@sound",33],"eu":["@sound",33]}], -"sound/samples/sfx_5/07.aiff": [0,{"jp":["@sound",34],"us":["@sound",34],"eu":["@sound",34]}], -"sound/samples/sfx_5/08.aiff": [0,{"jp":["@sound",35],"us":["@sound",35],"eu":["@sound",35]}], -"sound/samples/sfx_5/09.aiff": [0,{"jp":["@sound",36],"us":["@sound",36],"eu":["@sound",36]}], -"sound/samples/sfx_5/0A.aiff": [0,{"jp":["@sound",37],"us":["@sound",37],"eu":["@sound",37]}], -"sound/samples/sfx_5/0B.aiff": [0,{"jp":["@sound",38],"us":["@sound",38],"eu":["@sound",38]}], -"sound/samples/sfx_5/0C.aiff": [0,{"jp":["@sound",39],"us":["@sound",39],"eu":["@sound",39]}], -"sound/samples/sfx_5/0D.aiff": [0,{"jp":["@sound",40],"us":["@sound",40],"eu":["@sound",40]}], -"sound/samples/sfx_5/0E.aiff": [0,{"jp":["@sound",41],"us":["@sound",41],"eu":["@sound",41]}], -"sound/samples/sfx_5/0F.aiff": [0,{"jp":["@sound",42],"us":["@sound",42],"eu":["@sound",42]}], -"sound/samples/sfx_5/10.aiff": [0,{"jp":["@sound",43],"us":["@sound",43],"eu":["@sound",43]}], -"sound/samples/sfx_5/11.aiff": [0,{"jp":["@sound",44],"us":["@sound",44],"eu":["@sound",44]}], -"sound/samples/sfx_5/12.aiff": [0,{"jp":["@sound",45],"us":["@sound",45],"eu":["@sound",45]}], -"sound/samples/sfx_5/13.aiff": [0,{"jp":["@sound",46],"us":["@sound",46],"eu":["@sound",46]}], -"sound/samples/sfx_5/14.aiff": [0,{"jp":["@sound",47],"us":["@sound",47],"eu":["@sound",47]}], -"sound/samples/sfx_5/15.aiff": [0,{"jp":["@sound",48],"us":["@sound",48],"eu":["@sound",48]}], -"sound/samples/sfx_5/16.aiff": [0,{"jp":["@sound",49],"us":["@sound",49],"eu":["@sound",49]}], -"sound/samples/sfx_5/17.aiff": [0,{"jp":["@sound",50],"us":["@sound",50],"eu":["@sound",50]}], -"sound/samples/sfx_5/18.aiff": [0,{"jp":["@sound",51],"us":["@sound",51],"eu":["@sound",51]}], -"sound/samples/sfx_5/19.aiff": [0,{"jp":["@sound",52],"us":["@sound",52],"eu":["@sound",52]}], -"sound/samples/sfx_5/1A.aiff": [0,{"jp":["@sound",53],"us":["@sound",53],"eu":["@sound",53]}], -"sound/samples/sfx_5/1B.aiff": [0,{"jp":["@sound",54],"us":["@sound",54],"eu":["@sound",54]}], -"sound/samples/sfx_5/1C.aiff": [0,{"jp":["@sound",55],"us":["@sound",55],"eu":["@sound",55]}], -"sound/samples/sfx_6/00.aiff": [0,{"jp":["@sound",56],"us":["@sound",56],"eu":["@sound",56]}], -"sound/samples/sfx_6/01.aiff": [0,{"jp":["@sound",57],"us":["@sound",57],"eu":["@sound",57]}], -"sound/samples/sfx_6/02.aiff": [0,{"jp":["@sound",58],"us":["@sound",58],"eu":["@sound",58]}], -"sound/samples/sfx_6/03.aiff": [0,{"jp":["@sound",59],"us":["@sound",59],"eu":["@sound",59]}], -"sound/samples/sfx_6/04.aiff": [0,{"jp":["@sound",60],"us":["@sound",60],"eu":["@sound",60]}], -"sound/samples/sfx_6/05.aiff": [0,{"jp":["@sound",61],"us":["@sound",61],"eu":["@sound",61]}], -"sound/samples/sfx_6/06.aiff": [0,{"jp":["@sound",62],"us":["@sound",62],"eu":["@sound",62]}], -"sound/samples/sfx_6/07.aiff": [0,{"jp":["@sound",63],"us":["@sound",63],"eu":["@sound",63]}], -"sound/samples/sfx_6/08.aiff": [0,{"jp":["@sound",64],"us":["@sound",64],"eu":["@sound",64]}], -"sound/samples/sfx_6/09.aiff": [0,{"jp":["@sound",65],"us":["@sound",65],"eu":["@sound",65]}], -"sound/samples/sfx_6/0A.aiff": [0,{"jp":["@sound",66],"us":["@sound",66],"eu":["@sound",66]}], -"sound/samples/sfx_6/0B.aiff": [0,{"jp":["@sound",67],"us":["@sound",67],"eu":["@sound",67]}], -"sound/samples/sfx_6/0C.aiff": [0,{"jp":["@sound",68],"us":["@sound",68],"eu":["@sound",68]}], -"sound/samples/sfx_6/0D.aiff": [0,{"jp":["@sound",69],"us":["@sound",69],"eu":["@sound",69]}], -"sound/samples/sfx_7/00.aiff": [0,{"jp":["@sound",70],"us":["@sound",70],"eu":["@sound",70]}], -"sound/samples/sfx_7/01.aiff": [0,{"jp":["@sound",71],"us":["@sound",71],"eu":["@sound",71]}], -"sound/samples/sfx_7/02.aiff": [0,{"jp":["@sound",72],"us":["@sound",72],"eu":["@sound",72]}], -"sound/samples/sfx_7/03.aiff": [0,{"jp":["@sound",73],"us":["@sound",73],"eu":["@sound",73]}], -"sound/samples/sfx_7/04.aiff": [0,{"jp":["@sound",74],"us":["@sound",74],"eu":["@sound",74]}], -"sound/samples/sfx_7/05.aiff": [0,{"jp":["@sound",75],"us":["@sound",75],"eu":["@sound",75]}], -"sound/samples/sfx_7/06.aiff": [0,{"jp":["@sound",76],"us":["@sound",76],"eu":["@sound",76]}], -"sound/samples/sfx_7/07.aiff": [0,{"jp":["@sound",77],"us":["@sound",77],"eu":["@sound",77]}], -"sound/samples/sfx_7/08.aiff": [0,{"jp":["@sound",78],"us":["@sound",78],"eu":["@sound",78]}], -"sound/samples/sfx_7/09.aiff": [0,{"jp":["@sound",79],"us":["@sound",79],"eu":["@sound",79]}], -"sound/samples/sfx_7/0A.aiff": [0,{"jp":["@sound",80],"us":["@sound",80],"eu":["@sound",80]}], -"sound/samples/sfx_7/0B.aiff": [0,{"jp":["@sound",81],"us":["@sound",81],"eu":["@sound",81]}], -"sound/samples/sfx_7/0C.aiff": [0,{"jp":["@sound",82],"us":["@sound",82],"eu":["@sound",82]}], -"sound/samples/sfx_7/0D.aiff": [0,{"us":["@sound",83],"eu":["@sound",83]}], -"sound/samples/sfx_mario/00.aiff": [0,{"jp":["@sound",83],"us":["@sound",84],"eu":["@sound",84]}], -"sound/samples/sfx_mario/01.aiff": [0,{"jp":["@sound",84],"us":["@sound",85],"eu":["@sound",85]}], -"sound/samples/sfx_mario/02.aiff": [0,{"jp":["@sound",85],"us":["@sound",86],"eu":["@sound",86]}], -"sound/samples/sfx_mario/03.aiff": [0,{"jp":["@sound",86],"us":["@sound",87],"eu":["@sound",87]}], -"sound/samples/sfx_mario/04.aiff": [0,{"jp":["@sound",87],"us":["@sound",88],"eu":["@sound",88]}], -"sound/samples/sfx_mario/05.aiff": [0,{"jp":["@sound",88],"us":["@sound",89],"eu":["@sound",89]}], -"sound/samples/sfx_mario/06.aiff": [0,{"jp":["@sound",89],"us":["@sound",90],"eu":["@sound",90]}], -"sound/samples/sfx_mario/07.aiff": [0,{"jp":["@sound",90],"us":["@sound",91],"eu":["@sound",91]}], -"sound/samples/sfx_mario/08.aiff": [0,{"jp":["@sound",91],"us":["@sound",92],"eu":["@sound",92]}], -"sound/samples/sfx_mario/09.aiff": [0,{"jp":["@sound",92],"us":["@sound",93],"eu":["@sound",93]}], -"sound/samples/sfx_mario/0A.aiff": [0,{"jp":["@sound",93],"us":["@sound",94],"eu":["@sound",94]}], -"sound/samples/sfx_mario/0B.aiff": [0,{"jp":["@sound",94],"us":["@sound",95],"eu":["@sound",95]}], -"sound/samples/sfx_mario/0C.aiff": [0,{"jp":["@sound",95],"us":["@sound",96],"eu":["@sound",96]}], -"sound/samples/sfx_mario/0D.aiff": [0,{"jp":["@sound",96],"us":["@sound",97],"eu":["@sound",97]}], -"sound/samples/sfx_mario/0E.aiff": [0,{"jp":["@sound",97],"us":["@sound",98],"eu":["@sound",98]}], -"sound/samples/sfx_mario/0F.aiff": [0,{"jp":["@sound",98],"us":["@sound",99],"eu":["@sound",99]}], -"sound/samples/sfx_mario/10.aiff": [0,{"us":["@sound",100],"eu":["@sound",100]}], -"sound/samples/sfx_mario/11.aiff": [0,{"us":["@sound",101],"eu":["@sound",101]}], -"sound/samples/sfx_mario/12.aiff": [0,{"us":["@sound",102],"eu":["@sound",102]}], -"sound/samples/sfx_mario/13.aiff": [0,{"us":["@sound",103],"eu":["@sound",103]}], -"sound/samples/sfx_mario/14.aiff": [0,{"us":["@sound",104],"eu":["@sound",104]}], -"sound/samples/sfx_mario/15.aiff": [0,{"us":["@sound",105],"eu":["@sound",105]}], -"sound/samples/sfx_mario/16.aiff": [0,{"us":["@sound",106],"eu":["@sound",106]}], -"sound/samples/sfx_mario/17.aiff": [0,{"us":["@sound",107],"eu":["@sound",107]}], -"sound/samples/sfx_mario/18.aiff": [0,{"us":["@sound",108],"eu":["@sound",108]}], -"sound/samples/sfx_mario/19.aiff": [0,{"us":["@sound",109],"eu":["@sound",109]}], -"sound/samples/sfx_mario/1A.aiff": [0,{"us":["@sound",110],"eu":["@sound",110]}], -"sound/samples/sfx_9/00.aiff": [0,{"jp":["@sound",99],"us":["@sound",111],"eu":["@sound",111]}], -"sound/samples/sfx_9/01.aiff": [0,{"jp":["@sound",100],"us":["@sound",112],"eu":["@sound",112]}], -"sound/samples/sfx_9/02.aiff": [0,{"jp":["@sound",101],"us":["@sound",113],"eu":["@sound",113]}], -"sound/samples/sfx_9/03.aiff": [0,{"jp":["@sound",102],"us":["@sound",114],"eu":["@sound",114]}], -"sound/samples/sfx_9/04.aiff": [0,{"jp":["@sound",103],"us":["@sound",115],"eu":["@sound",115]}], -"sound/samples/sfx_9/05.aiff": [0,{"jp":["@sound",104],"us":["@sound",116],"eu":["@sound",116]}], -"sound/samples/sfx_9/06.aiff": [0,{"jp":["@sound",105],"us":["@sound",117],"eu":["@sound",117]}], -"sound/samples/sfx_mario_peach/00.aiff": [0,{"jp":["@sound",106],"us":["@sound",118],"eu":["@sound",118]}], -"sound/samples/sfx_mario_peach/01.aiff": [0,{"jp":["@sound",107],"us":["@sound",119],"eu":["@sound",119]}], -"sound/samples/sfx_mario_peach/02.aiff": [0,{"jp":["@sound",108],"us":["@sound",120],"eu":["@sound",120]}], -"sound/samples/sfx_mario_peach/03.aiff": [0,{"jp":["@sound",109],"us":["@sound",121],"eu":["@sound",121]}], -"sound/samples/sfx_mario_peach/04.aiff": [0,{"jp":["@sound",110],"us":["@sound",122],"eu":["@sound",122]}], -"sound/samples/sfx_mario_peach/05.aiff": [0,{"jp":["@sound",111],"us":["@sound",123],"eu":["@sound",123]}], -"sound/samples/sfx_mario_peach/06.aiff": [0,{"jp":["@sound",112],"us":["@sound",124],"eu":["@sound",124]}], -"sound/samples/sfx_mario_peach/07.aiff": [0,{"jp":["@sound",113],"us":["@sound",125],"eu":["@sound",125]}], -"sound/samples/sfx_mario_peach/08.aiff": [0,{"jp":["@sound",114],"us":["@sound",126],"eu":["@sound",126]}], -"sound/samples/sfx_mario_peach/09.aiff": [0,{"jp":["@sound",115],"us":["@sound",127],"eu":["@sound",127]}], -"sound/samples/sfx_mario_peach/0A.aiff": [0,{"jp":["@sound",116],"us":["@sound",128],"eu":["@sound",128]}], -"sound/samples/sfx_mario_peach/0B.aiff": [0,{"jp":["@sound",117],"us":["@sound",129],"eu":["@sound",129]}], -"sound/samples/sfx_mario_peach/0C.aiff": [0,{"jp":["@sound",118],"us":["@sound",130],"eu":["@sound",130]}], -"sound/samples/sfx_mario_peach/0D.aiff": [0,{"jp":["@sound",119],"us":["@sound",131],"eu":["@sound",131]}], -"sound/samples/sfx_mario_peach/0E.aiff": [0,{"us":["@sound",132],"eu":["@sound",132]}], -"sound/samples/sfx_mario_peach/0F.aiff": [0,{"us":["@sound",133],"eu":["@sound",133]}], -"sound/samples/sfx_mario_peach/10.aiff": [0,{"us":["@sound",134],"eu":["@sound",134]}], -"sound/samples/sfx_mario_peach/11.aiff": [0,{"us":["@sound",135],"eu":["@sound",135]}], -"sound/samples/sfx_mario_peach/12.aiff": [0,{"us":["@sound",136],"eu":["@sound",136]}], -"sound/samples/sfx_mario_peach/13.aiff": [0,{"us":["@sound",137],"eu":["@sound",137]}], -"sound/samples/sfx_mario_peach/14.aiff": [0,{"us":["@sound",138],"eu":["@sound",138]}], -"sound/samples/sfx_mario_peach/15.aiff": [0,{"us":["@sound",139],"eu":["@sound",139]}], -"sound/samples/sfx_mario_peach/16.aiff": [0,{"us":["@sound",140],"eu":["@sound",140]}], +"textures/segment2/shadow_quarter_circle.ia8.png": [16,16,256,{"jp":[1078992,62040],"us":[1083968,73912],"eu":[909712,30584],"sh":[934640,62040]}], +"textures/segment2/shadow_quarter_square.ia8.png": [16,16,256,{"jp":[1078992,62296],"us":[1083968,74168],"eu":[909712,30840],"sh":[934640,62296]}], +"textures/sky/metal_hole.rgba16.png": [32,32,2048,{"jp":[3390640,26624],"us":[3397392,26624],"eu":[3270992,26624],"sh":[3245360,26624]}], +"textures/sky/rr_textures.00000.rgba16.png": [32,32,2048,{"jp":[3390640,0],"us":[3397392,0],"eu":[3270992,0],"sh":[3245360,0]}], +"textures/sky/rr_textures.00800.rgba16.png": [32,32,2048,{"jp":[3390640,2048],"us":[3397392,2048],"eu":[3270992,2048],"sh":[3245360,2048]}], +"textures/sky/rr_textures.01000.rgba16.png": [32,32,2048,{"jp":[3390640,4096],"us":[3397392,4096],"eu":[3270992,4096],"sh":[3245360,4096]}], +"textures/sky/rr_textures.01800.rgba16.png": [32,32,2048,{"jp":[3390640,6144],"us":[3397392,6144],"eu":[3270992,6144],"sh":[3245360,6144]}], +"textures/sky/rr_textures.02000.rgba16.png": [32,64,4096,{"jp":[3390640,8192],"us":[3397392,8192],"eu":[3270992,8192],"sh":[3245360,8192]}], +"textures/sky/rr_textures.03000.rgba16.png": [32,32,2048,{"jp":[3390640,12288],"us":[3397392,12288],"eu":[3270992,12288],"sh":[3245360,12288]}], +"textures/sky/rr_textures.03800.rgba16.png": [64,32,4096,{"jp":[3390640,14336],"us":[3397392,14336],"eu":[3270992,14336],"sh":[3245360,14336]}], +"textures/sky/rr_textures.04800.rgba16.png": [32,32,2048,{"jp":[3390640,18432],"us":[3397392,18432],"eu":[3270992,18432],"sh":[3245360,18432]}], +"textures/sky/rr_textures.05000.rgba16.png": [32,32,2048,{"jp":[3390640,20480],"us":[3397392,20480],"eu":[3270992,20480],"sh":[3245360,20480]}], +"textures/sky/rr_textures.05800.rgba16.png": [32,32,2048,{"jp":[3390640,22528],"us":[3397392,22528],"eu":[3270992,22528],"sh":[3245360,22528]}], +"textures/sky/rr_textures.06000.rgba16.png": [32,32,2048,{"jp":[3390640,24576],"us":[3397392,24576],"eu":[3270992,24576],"sh":[3245360,24576]}], +"textures/sky/rr_textures.07000.rgba16.png": [32,32,2048,{"jp":[3390640,28672],"us":[3397392,28672],"eu":[3270992,28672],"sh":[3245360,28672]}], +"textures/sky/rr_textures.07800.rgba16.png": [32,32,2048,{"jp":[3390640,30720],"us":[3397392,30720],"eu":[3270992,30720],"sh":[3245360,30720]}], +"textures/sky/rr_textures.08000.rgba16.png": [32,32,2048,{"jp":[3390640,32768],"us":[3397392,32768],"eu":[3270992,32768],"sh":[3245360,32768]}], +"textures/snow/ccm_textures.00000.rgba16.png": [32,32,2048,{"jp":[3405536,0],"us":[3412288,0],"eu":[3285888,0],"sh":[3260256,0]}], +"textures/snow/ccm_textures.00800.rgba16.png": [32,32,2048,{"jp":[3405536,2048],"us":[3412288,2048],"eu":[3285888,2048],"sh":[3260256,2048]}], +"textures/snow/ccm_textures.01000.rgba16.png": [32,64,4096,{"jp":[3405536,4096],"us":[3412288,4096],"eu":[3285888,4096],"sh":[3260256,4096]}], +"textures/snow/ccm_textures.02000.rgba16.png": [32,32,2048,{"jp":[3405536,8192],"us":[3412288,8192],"eu":[3285888,8192],"sh":[3260256,8192]}], +"textures/snow/ccm_textures.02800.rgba16.png": [32,32,2048,{"jp":[3405536,10240],"us":[3412288,10240],"eu":[3285888,10240],"sh":[3260256,10240]}], +"textures/snow/ccm_textures.03000.rgba16.png": [32,32,2048,{"jp":[3405536,12288],"us":[3412288,12288],"eu":[3285888,12288],"sh":[3260256,12288]}], +"textures/snow/ccm_textures.03800.rgba16.png": [32,32,2048,{"jp":[3405536,14336],"us":[3412288,14336],"eu":[3285888,14336],"sh":[3260256,14336]}], +"textures/snow/ccm_textures.04000.rgba16.png": [32,32,2048,{"jp":[3405536,16384],"us":[3412288,16384],"eu":[3285888,16384],"sh":[3260256,16384]}], +"textures/snow/ccm_textures.04800.rgba16.png": [32,32,2048,{"jp":[3405536,18432],"us":[3412288,18432],"eu":[3285888,18432],"sh":[3260256,18432]}], +"textures/snow/ccm_textures.05000.rgba16.png": [32,32,2048,{"jp":[3405536,20480],"us":[3412288,20480],"eu":[3285888,20480],"sh":[3260256,20480]}], +"textures/snow/ccm_textures.05800.rgba16.png": [32,32,2048,{"jp":[3405536,22528],"us":[3412288,22528],"eu":[3285888,22528],"sh":[3260256,22528]}], +"textures/snow/ccm_textures.06000.rgba16.png": [32,32,2048,{"jp":[3405536,24576],"us":[3412288,24576],"eu":[3285888,24576],"sh":[3260256,24576]}], +"textures/snow/ccm_textures.06800.rgba16.png": [32,32,2048,{"jp":[3405536,26624],"us":[3412288,26624],"eu":[3285888,26624],"sh":[3260256,26624]}], +"textures/snow/ccm_textures.07000.rgba16.png": [64,32,4096,{"jp":[3405536,28672],"us":[3412288,28672],"eu":[3285888,28672],"sh":[3260256,28672]}], +"textures/snow/ccm_textures.08000.rgba16.png": [32,32,2048,{"jp":[3405536,32768],"us":[3412288,32768],"eu":[3285888,32768],"sh":[3260256,32768]}], +"textures/snow/ccm_textures.08800.rgba16.png": [32,32,2048,{"jp":[3405536,34816],"us":[3412288,34816],"eu":[3285888,34816],"sh":[3260256,34816]}], +"textures/snow/ccm_textures.09000.ia16.png": [32,32,2048,{"jp":[3405536,36864],"us":[3412288,36864],"eu":[3285888,36864],"sh":[3260256,36864]}], +"textures/snow/ccm_textures.09800.ia16.png": [32,32,2048,{"jp":[3405536,38912],"us":[3412288,38912],"eu":[3285888,38912],"sh":[3260256,38912]}], +"textures/spooky/bbh_textures.00000.rgba16.png": [32,32,2048,{"jp":[3298272,0],"us":[3305024,0],"eu":[3178624,0],"sh":[3152992,0]}], +"textures/spooky/bbh_textures.00800.rgba16.png": [32,64,4096,{"jp":[3298272,2048],"us":[3305024,2048],"eu":[3178624,2048],"sh":[3152992,2048]}], +"textures/spooky/bbh_textures.01800.rgba16.png": [32,64,4096,{"jp":[3298272,6144],"us":[3305024,6144],"eu":[3178624,6144],"sh":[3152992,6144]}], +"textures/spooky/bbh_textures.02800.rgba16.png": [32,64,4096,{"jp":[3298272,10240],"us":[3305024,10240],"eu":[3178624,10240],"sh":[3152992,10240]}], +"textures/spooky/bbh_textures.03800.rgba16.png": [32,64,4096,{"jp":[3298272,14336],"us":[3305024,14336],"eu":[3178624,14336],"sh":[3152992,14336]}], +"textures/spooky/bbh_textures.04800.rgba16.png": [32,32,2048,{"jp":[3298272,18432],"us":[3305024,18432],"eu":[3178624,18432],"sh":[3152992,18432]}], +"textures/spooky/bbh_textures.05000.rgba16.png": [32,64,4096,{"jp":[3298272,20480],"us":[3305024,20480],"eu":[3178624,20480],"sh":[3152992,20480]}], +"textures/spooky/bbh_textures.06000.rgba16.png": [32,32,2048,{"jp":[3298272,24576],"us":[3305024,24576],"eu":[3178624,24576],"sh":[3152992,24576]}], +"textures/spooky/bbh_textures.06800.rgba16.png": [32,32,2048,{"jp":[3298272,26624],"us":[3305024,26624],"eu":[3178624,26624],"sh":[3152992,26624]}], +"textures/spooky/bbh_textures.07000.rgba16.png": [64,32,4096,{"jp":[3298272,28672],"us":[3305024,28672],"eu":[3178624,28672],"sh":[3152992,28672]}], +"textures/spooky/bbh_textures.08000.rgba16.png": [32,32,2048,{"jp":[3298272,32768],"us":[3305024,32768],"eu":[3178624,32768],"sh":[3152992,32768]}], +"textures/spooky/bbh_textures.08800.rgba16.png": [32,32,2048,{"jp":[3298272,34816],"us":[3305024,34816],"eu":[3178624,34816],"sh":[3152992,34816]}], +"textures/spooky/bbh_textures.09000.rgba16.png": [64,32,4096,{"jp":[3298272,36864],"us":[3305024,36864],"eu":[3178624,36864],"sh":[3152992,36864]}], +"textures/spooky/bbh_textures.0A000.rgba16.png": [32,32,2048,{"jp":[1462368,49800],"us":[1469536,49800],"eu":[1341504,49800],"sh":[1318016,49800]}], +"textures/spooky/bbh_textures.0A800.ia16.png": [32,32,2048,{"jp":[3298272,43008],"us":[3305024,43008],"eu":[3178624,43008],"sh":[3152992,43008]}], +"textures/spooky/bbh_textures.0B000.ia16.png": [32,32,2048,{"jp":[3298272,45056],"us":[3305024,45056],"eu":[3178624,45056],"sh":[3152992,45056]}], +"textures/spooky/bbh_textures.0B800.ia16.png": [32,64,4096,{"jp":[3298272,47104],"us":[3305024,47104],"eu":[3178624,47104],"sh":[3152992,47104]}], +"textures/title_screen_bg/title_screen_bg.001C0.rgba16.png": [80,20,3200,{"jp":[2550336,448],"us":[2558144,448],"eu":[2426672,448],"sh":[2403488,448]}], +"textures/title_screen_bg/title_screen_bg.00E40.rgba16.png": [80,20,3200,{"jp":[2550336,3648],"us":[2558144,3648],"eu":[2426672,3648],"sh":[2403488,3648]}], +"textures/title_screen_bg/title_screen_bg.01AC0.rgba16.png": [80,20,3200,{"jp":[2550336,6848],"us":[2558144,6848],"eu":[2426672,6848],"sh":[2403488,6848]}], +"textures/title_screen_bg/title_screen_bg.02740.rgba16.png": [80,20,3200,{"jp":[2550336,10048],"us":[2558144,10048],"eu":[2426672,10048],"sh":[2403488,10048]}], +"textures/title_screen_bg/title_screen_bg.033C0.rgba16.png": [80,20,3200,{"jp":[2550336,13248],"us":[2558144,13248],"eu":[2426672,13248],"sh":[2403488,13248]}], +"textures/title_screen_bg/title_screen_bg.04040.rgba16.png": [80,20,3200,{"jp":[2550336,16448],"us":[2558144,16448],"eu":[2426672,16448],"sh":[2403488,16448]}], +"textures/title_screen_bg/title_screen_bg.04CC0.rgba16.png": [80,20,3200,{"jp":[2550336,19648],"us":[2558144,19648],"eu":[2426672,19648],"sh":[2403488,19648]}], +"textures/title_screen_bg/title_screen_bg.05940.rgba16.png": [80,20,3200,{"jp":[2550336,22848],"us":[2558144,22848],"eu":[2426672,22848],"sh":[2403488,22848]}], +"textures/water/jrb_textures.00000.rgba16.png": [32,32,2048,{"jp":[3354832,0],"us":[3361584,0],"eu":[3235184,0],"sh":[3209552,0]}], +"textures/water/jrb_textures.00800.rgba16.png": [64,32,4096,{"jp":[3354832,2048],"us":[3361584,2048],"eu":[3235184,2048],"sh":[3209552,2048]}], +"textures/water/jrb_textures.01800.rgba16.png": [64,32,4096,{"jp":[3354832,6144],"us":[3361584,6144],"eu":[3235184,6144],"sh":[3209552,6144]}], +"textures/water/jrb_textures.02800.rgba16.png": [64,32,4096,{"jp":[3354832,10240],"us":[3361584,10240],"eu":[3235184,10240],"sh":[3209552,10240]}], +"textures/water/jrb_textures.03800.rgba16.png": [64,32,4096,{"jp":[3354832,14336],"us":[3361584,14336],"eu":[3235184,14336],"sh":[3209552,14336]}], +"textures/water/jrb_textures.04800.rgba16.png": [64,32,4096,{"jp":[3354832,18432],"us":[3361584,18432],"eu":[3235184,18432],"sh":[3209552,18432]}], +"textures/water/jrb_textures.05800.rgba16.png": [32,32,2048,{"jp":[3354832,22528],"us":[3361584,22528],"eu":[3235184,22528],"sh":[3209552,22528]}], +"textures/water/jrb_textures.06000.rgba16.png": [32,32,2048,{"jp":[3354832,24576],"us":[3361584,24576],"eu":[3235184,24576],"sh":[3209552,24576]}], +"textures/water/jrb_textures.06800.rgba16.png": [64,32,4096,{"jp":[3354832,26624],"us":[3361584,26624],"eu":[3235184,26624],"sh":[3209552,26624]}], +"textures/water/jrb_textures.07800.rgba16.png": [64,32,4096,{"jp":[3354832,30720],"us":[3361584,30720],"eu":[3235184,30720],"sh":[3209552,30720]}], +"textures/water/jrb_textures.08800.rgba16.png": [32,32,2048,{"jp":[3354832,34816],"us":[3361584,34816],"eu":[3235184,34816],"sh":[3209552,34816]}], +"textures/water/jrb_textures.09000.rgba16.png": [64,32,4096,{"jp":[3354832,36864],"us":[3361584,36864],"eu":[3235184,36864],"sh":[3209552,36864]}], +"textures/water/jrb_textures.0A000.rgba16.png": [32,32,2048,{"jp":[3354832,40960],"us":[3361584,40960],"eu":[3235184,40960],"sh":[3209552,40960]}], +"textures/water/jrb_textures.0A800.rgba16.png": [64,32,4096,{"jp":[3354832,43008],"us":[3361584,43008],"eu":[3235184,43008],"sh":[3209552,43008]}], +"textures/water/jrb_textures.0B800.rgba16.png": [64,32,4096,{"jp":[3354832,47104],"us":[3361584,47104],"eu":[3235184,47104],"sh":[3209552,47104]}], +"sound/samples/bowser_organ/00.aiff": [0,{"jp":["@sound",195],"us":["@sound",216],"eu":["@sound",216]}], +"sound/samples/bowser_organ/01.aiff": [0,{"jp":["@sound",196],"us":["@sound",217],"eu":["@sound",217]}], +"sound/samples/bowser_organ/02.aiff": [0,{"jp":["@sound",197],"us":["@sound",218],"eu":["@sound",218]}], +"sound/samples/course_start/00_la.aiff": [0,{"jp":["@sound",194],"us":["@sound",215],"eu":["@sound",215]}], "sound/samples/instruments/00.aiff": [0,{"jp":["@sound",120],"us":["@sound",141],"eu":["@sound",141]}], "sound/samples/instruments/01.aiff": [0,{"jp":["@sound",121],"us":["@sound",142],"eu":["@sound",142]}], "sound/samples/instruments/02.aiff": [0,{"jp":["@sound",122],"us":["@sound",143],"eu":["@sound",143]}], @@ -1984,8 +1847,145 @@ "sound/samples/instruments/47.aiff": [0,{"jp":["@sound",191],"us":["@sound",212],"eu":["@sound",212]}], "sound/samples/instruments/48.aiff": [0,{"jp":["@sound",192],"us":["@sound",213],"eu":["@sound",213]}], "sound/samples/piranha_music_box/00_pling.aiff": [0,{"jp":["@sound",193],"us":["@sound",214],"eu":["@sound",214]}], -"sound/samples/course_start/00_la.aiff": [0,{"jp":["@sound",194],"us":["@sound",215],"eu":["@sound",215]}], -"sound/samples/bowser_organ/00.aiff": [0,{"jp":["@sound",195],"us":["@sound",216],"eu":["@sound",216]}], -"sound/samples/bowser_organ/01.aiff": [0,{"jp":["@sound",196],"us":["@sound",217],"eu":["@sound",217]}], -"sound/samples/bowser_organ/02.aiff": [0,{"jp":["@sound",197],"us":["@sound",218],"eu":["@sound",218]}] +"sound/samples/sfx_1/00_twirl.aiff": [0,{"jp":["@sound",0],"us":["@sound",0],"eu":["@sound",0]}], +"sound/samples/sfx_1/01_brushing.aiff": [0,{"jp":["@sound",1],"us":["@sound",1],"eu":["@sound",1]}], +"sound/samples/sfx_1/02_hand_touch.aiff": [0,{"jp":["@sound",2],"us":["@sound",2],"eu":["@sound",2]}], +"sound/samples/sfx_1/03_yoshi.aiff": [0,{"jp":["@sound",3],"us":["@sound",3],"eu":["@sound",3]}], +"sound/samples/sfx_1/04_plop.aiff": [0,{"jp":["@sound",4],"us":["@sound",4],"eu":["@sound",4]}], +"sound/samples/sfx_1/05_heavy_landing.aiff": [0,{"jp":["@sound",5],"us":["@sound",5],"eu":["@sound",5]}], +"sound/samples/sfx_4/00.aiff": [0,{"jp":["@sound",17],"us":["@sound",17],"eu":["@sound",17]}], +"sound/samples/sfx_4/01.aiff": [0,{"jp":["@sound",18],"us":["@sound",18],"eu":["@sound",18]}], +"sound/samples/sfx_4/02.aiff": [0,{"jp":["@sound",19],"us":["@sound",19],"eu":["@sound",19]}], +"sound/samples/sfx_4/03.aiff": [0,{"jp":["@sound",20],"us":["@sound",20],"eu":["@sound",20]}], +"sound/samples/sfx_4/04.aiff": [0,{"jp":["@sound",21],"us":["@sound",21],"eu":["@sound",21]}], +"sound/samples/sfx_4/05.aiff": [0,{"jp":["@sound",22],"us":["@sound",22],"eu":["@sound",22]}], +"sound/samples/sfx_4/06.aiff": [0,{"jp":["@sound",23],"us":["@sound",23],"eu":["@sound",23]}], +"sound/samples/sfx_4/07.aiff": [0,{"jp":["@sound",24],"us":["@sound",24],"eu":["@sound",24]}], +"sound/samples/sfx_4/08.aiff": [0,{"jp":["@sound",25],"us":["@sound",25],"eu":["@sound",25]}], +"sound/samples/sfx_4/09.aiff": [0,{"jp":["@sound",26],"us":["@sound",26],"eu":["@sound",26]}], +"sound/samples/sfx_5/00.aiff": [0,{"jp":["@sound",27],"us":["@sound",27],"eu":["@sound",27]}], +"sound/samples/sfx_5/01.aiff": [0,{"jp":["@sound",28],"us":["@sound",28],"eu":["@sound",28]}], +"sound/samples/sfx_5/02.aiff": [0,{"jp":["@sound",29],"us":["@sound",29],"eu":["@sound",29]}], +"sound/samples/sfx_5/03.aiff": [0,{"jp":["@sound",30],"us":["@sound",30],"eu":["@sound",30]}], +"sound/samples/sfx_5/04.aiff": [0,{"jp":["@sound",31],"us":["@sound",31],"eu":["@sound",31]}], +"sound/samples/sfx_5/05.aiff": [0,{"jp":["@sound",32],"us":["@sound",32],"eu":["@sound",32]}], +"sound/samples/sfx_5/06.aiff": [0,{"jp":["@sound",33],"us":["@sound",33],"eu":["@sound",33]}], +"sound/samples/sfx_5/07.aiff": [0,{"jp":["@sound",34],"us":["@sound",34],"eu":["@sound",34]}], +"sound/samples/sfx_5/08.aiff": [0,{"jp":["@sound",35],"us":["@sound",35],"eu":["@sound",35]}], +"sound/samples/sfx_5/09.aiff": [0,{"jp":["@sound",36],"us":["@sound",36],"eu":["@sound",36]}], +"sound/samples/sfx_5/0A.aiff": [0,{"jp":["@sound",37],"us":["@sound",37],"eu":["@sound",37]}], +"sound/samples/sfx_5/0B.aiff": [0,{"jp":["@sound",38],"us":["@sound",38],"eu":["@sound",38]}], +"sound/samples/sfx_5/0C.aiff": [0,{"jp":["@sound",39],"us":["@sound",39],"eu":["@sound",39]}], +"sound/samples/sfx_5/0D.aiff": [0,{"jp":["@sound",40],"us":["@sound",40],"eu":["@sound",40]}], +"sound/samples/sfx_5/0E.aiff": [0,{"jp":["@sound",41],"us":["@sound",41],"eu":["@sound",41]}], +"sound/samples/sfx_5/0F.aiff": [0,{"jp":["@sound",42],"us":["@sound",42],"eu":["@sound",42]}], +"sound/samples/sfx_5/10.aiff": [0,{"jp":["@sound",43],"us":["@sound",43],"eu":["@sound",43]}], +"sound/samples/sfx_5/11.aiff": [0,{"jp":["@sound",44],"us":["@sound",44],"eu":["@sound",44]}], +"sound/samples/sfx_5/12.aiff": [0,{"jp":["@sound",45],"us":["@sound",45],"eu":["@sound",45]}], +"sound/samples/sfx_5/13.aiff": [0,{"jp":["@sound",46],"us":["@sound",46],"eu":["@sound",46]}], +"sound/samples/sfx_5/14.aiff": [0,{"jp":["@sound",47],"us":["@sound",47],"eu":["@sound",47]}], +"sound/samples/sfx_5/15.aiff": [0,{"jp":["@sound",48],"us":["@sound",48],"eu":["@sound",48]}], +"sound/samples/sfx_5/16.aiff": [0,{"jp":["@sound",49],"us":["@sound",49],"eu":["@sound",49]}], +"sound/samples/sfx_5/17.aiff": [0,{"jp":["@sound",50],"us":["@sound",50],"eu":["@sound",50]}], +"sound/samples/sfx_5/18.aiff": [0,{"jp":["@sound",51],"us":["@sound",51],"eu":["@sound",51]}], +"sound/samples/sfx_5/19.aiff": [0,{"jp":["@sound",52],"us":["@sound",52],"eu":["@sound",52]}], +"sound/samples/sfx_5/1A.aiff": [0,{"jp":["@sound",53],"us":["@sound",53],"eu":["@sound",53]}], +"sound/samples/sfx_5/1B.aiff": [0,{"jp":["@sound",54],"us":["@sound",54],"eu":["@sound",54]}], +"sound/samples/sfx_5/1C.aiff": [0,{"jp":["@sound",55],"us":["@sound",55],"eu":["@sound",55]}], +"sound/samples/sfx_6/00.aiff": [0,{"jp":["@sound",56],"us":["@sound",56],"eu":["@sound",56]}], +"sound/samples/sfx_6/01.aiff": [0,{"jp":["@sound",57],"us":["@sound",57],"eu":["@sound",57]}], +"sound/samples/sfx_6/02.aiff": [0,{"jp":["@sound",58],"us":["@sound",58],"eu":["@sound",58]}], +"sound/samples/sfx_6/03.aiff": [0,{"jp":["@sound",59],"us":["@sound",59],"eu":["@sound",59]}], +"sound/samples/sfx_6/04.aiff": [0,{"jp":["@sound",60],"us":["@sound",60],"eu":["@sound",60]}], +"sound/samples/sfx_6/05.aiff": [0,{"jp":["@sound",61],"us":["@sound",61],"eu":["@sound",61]}], +"sound/samples/sfx_6/06.aiff": [0,{"jp":["@sound",62],"us":["@sound",62],"eu":["@sound",62]}], +"sound/samples/sfx_6/07.aiff": [0,{"jp":["@sound",63],"us":["@sound",63],"eu":["@sound",63]}], +"sound/samples/sfx_6/08.aiff": [0,{"jp":["@sound",64],"us":["@sound",64],"eu":["@sound",64]}], +"sound/samples/sfx_6/09.aiff": [0,{"jp":["@sound",65],"us":["@sound",65],"eu":["@sound",65]}], +"sound/samples/sfx_6/0A.aiff": [0,{"jp":["@sound",66],"us":["@sound",66],"eu":["@sound",66]}], +"sound/samples/sfx_6/0B.aiff": [0,{"jp":["@sound",67],"us":["@sound",67],"eu":["@sound",67]}], +"sound/samples/sfx_6/0C.aiff": [0,{"jp":["@sound",68],"us":["@sound",68],"eu":["@sound",68]}], +"sound/samples/sfx_6/0D.aiff": [0,{"jp":["@sound",69],"us":["@sound",69],"eu":["@sound",69]}], +"sound/samples/sfx_7/00.aiff": [0,{"jp":["@sound",70],"us":["@sound",70],"eu":["@sound",70]}], +"sound/samples/sfx_7/01.aiff": [0,{"jp":["@sound",71],"us":["@sound",71],"eu":["@sound",71]}], +"sound/samples/sfx_7/02.aiff": [0,{"jp":["@sound",72],"us":["@sound",72],"eu":["@sound",72]}], +"sound/samples/sfx_7/03.aiff": [0,{"jp":["@sound",73],"us":["@sound",73],"eu":["@sound",73]}], +"sound/samples/sfx_7/04.aiff": [0,{"jp":["@sound",74],"us":["@sound",74],"eu":["@sound",74]}], +"sound/samples/sfx_7/05.aiff": [0,{"jp":["@sound",75],"us":["@sound",75],"eu":["@sound",75]}], +"sound/samples/sfx_7/06.aiff": [0,{"jp":["@sound",76],"us":["@sound",76],"eu":["@sound",76]}], +"sound/samples/sfx_7/07.aiff": [0,{"jp":["@sound",77],"us":["@sound",77],"eu":["@sound",77]}], +"sound/samples/sfx_7/08.aiff": [0,{"jp":["@sound",78],"us":["@sound",78],"eu":["@sound",78]}], +"sound/samples/sfx_7/09.aiff": [0,{"jp":["@sound",79],"us":["@sound",79],"eu":["@sound",79]}], +"sound/samples/sfx_7/0A.aiff": [0,{"jp":["@sound",80],"us":["@sound",80],"eu":["@sound",80]}], +"sound/samples/sfx_7/0B.aiff": [0,{"jp":["@sound",81],"us":["@sound",81],"eu":["@sound",81]}], +"sound/samples/sfx_7/0C.aiff": [0,{"jp":["@sound",82],"us":["@sound",82],"eu":["@sound",82]}], +"sound/samples/sfx_7/0D.aiff": [0,{"us":["@sound",83],"eu":["@sound",83]}], +"sound/samples/sfx_9/00.aiff": [0,{"jp":["@sound",99],"us":["@sound",111],"eu":["@sound",111]}], +"sound/samples/sfx_9/01.aiff": [0,{"jp":["@sound",100],"us":["@sound",112],"eu":["@sound",112]}], +"sound/samples/sfx_9/02.aiff": [0,{"jp":["@sound",101],"us":["@sound",113],"eu":["@sound",113]}], +"sound/samples/sfx_9/03.aiff": [0,{"jp":["@sound",102],"us":["@sound",114],"eu":["@sound",114]}], +"sound/samples/sfx_9/04.aiff": [0,{"jp":["@sound",103],"us":["@sound",115],"eu":["@sound",115]}], +"sound/samples/sfx_9/05.aiff": [0,{"jp":["@sound",104],"us":["@sound",116],"eu":["@sound",116]}], +"sound/samples/sfx_9/06.aiff": [0,{"jp":["@sound",105],"us":["@sound",117],"eu":["@sound",117]}], +"sound/samples/sfx_mario/00.aiff": [0,{"jp":["@sound",83],"us":["@sound",84],"eu":["@sound",84]}], +"sound/samples/sfx_mario/01.aiff": [0,{"jp":["@sound",84],"us":["@sound",85],"eu":["@sound",85]}], +"sound/samples/sfx_mario/02.aiff": [0,{"jp":["@sound",85],"us":["@sound",86],"eu":["@sound",86]}], +"sound/samples/sfx_mario/03.aiff": [0,{"jp":["@sound",86],"us":["@sound",87],"eu":["@sound",87]}], +"sound/samples/sfx_mario/04.aiff": [0,{"jp":["@sound",87],"us":["@sound",88],"eu":["@sound",88]}], +"sound/samples/sfx_mario/05.aiff": [0,{"jp":["@sound",88],"us":["@sound",89],"eu":["@sound",89]}], +"sound/samples/sfx_mario/06.aiff": [0,{"jp":["@sound",89],"us":["@sound",90],"eu":["@sound",90]}], +"sound/samples/sfx_mario/07.aiff": [0,{"jp":["@sound",90],"us":["@sound",91],"eu":["@sound",91]}], +"sound/samples/sfx_mario/08.aiff": [0,{"jp":["@sound",91],"us":["@sound",92],"eu":["@sound",92]}], +"sound/samples/sfx_mario/09.aiff": [0,{"jp":["@sound",92],"us":["@sound",93],"eu":["@sound",93]}], +"sound/samples/sfx_mario/0A.aiff": [0,{"jp":["@sound",93],"us":["@sound",94],"eu":["@sound",94]}], +"sound/samples/sfx_mario/0B.aiff": [0,{"jp":["@sound",94],"us":["@sound",95],"eu":["@sound",95]}], +"sound/samples/sfx_mario/0C.aiff": [0,{"jp":["@sound",95],"us":["@sound",96],"eu":["@sound",96]}], +"sound/samples/sfx_mario/0D.aiff": [0,{"jp":["@sound",96],"us":["@sound",97],"eu":["@sound",97]}], +"sound/samples/sfx_mario/0E.aiff": [0,{"jp":["@sound",97],"us":["@sound",98],"eu":["@sound",98]}], +"sound/samples/sfx_mario/0F.aiff": [0,{"jp":["@sound",98],"us":["@sound",99],"eu":["@sound",99]}], +"sound/samples/sfx_mario/10.aiff": [0,{"us":["@sound",100],"eu":["@sound",100]}], +"sound/samples/sfx_mario/11.aiff": [0,{"us":["@sound",101],"eu":["@sound",101]}], +"sound/samples/sfx_mario/12.aiff": [0,{"us":["@sound",102],"eu":["@sound",102]}], +"sound/samples/sfx_mario/13.aiff": [0,{"us":["@sound",103],"eu":["@sound",103]}], +"sound/samples/sfx_mario/14.aiff": [0,{"us":["@sound",104],"eu":["@sound",104]}], +"sound/samples/sfx_mario/15.aiff": [0,{"us":["@sound",105],"eu":["@sound",105]}], +"sound/samples/sfx_mario/16.aiff": [0,{"us":["@sound",106],"eu":["@sound",106]}], +"sound/samples/sfx_mario/17.aiff": [0,{"us":["@sound",107],"eu":["@sound",107]}], +"sound/samples/sfx_mario/18.aiff": [0,{"us":["@sound",108],"eu":["@sound",108]}], +"sound/samples/sfx_mario/19.aiff": [0,{"us":["@sound",109],"eu":["@sound",109]}], +"sound/samples/sfx_mario/1A.aiff": [0,{"us":["@sound",110],"eu":["@sound",110]}], +"sound/samples/sfx_mario_peach/00.aiff": [0,{"jp":["@sound",106],"us":["@sound",118],"eu":["@sound",118]}], +"sound/samples/sfx_mario_peach/01.aiff": [0,{"jp":["@sound",107],"us":["@sound",119],"eu":["@sound",119]}], +"sound/samples/sfx_mario_peach/02.aiff": [0,{"jp":["@sound",108],"us":["@sound",120],"eu":["@sound",120]}], +"sound/samples/sfx_mario_peach/03.aiff": [0,{"jp":["@sound",109],"us":["@sound",121],"eu":["@sound",121]}], +"sound/samples/sfx_mario_peach/04.aiff": [0,{"jp":["@sound",110],"us":["@sound",122],"eu":["@sound",122]}], +"sound/samples/sfx_mario_peach/05.aiff": [0,{"jp":["@sound",111],"us":["@sound",123],"eu":["@sound",123]}], +"sound/samples/sfx_mario_peach/06.aiff": [0,{"jp":["@sound",112],"us":["@sound",124],"eu":["@sound",124]}], +"sound/samples/sfx_mario_peach/07.aiff": [0,{"jp":["@sound",113],"us":["@sound",125],"eu":["@sound",125]}], +"sound/samples/sfx_mario_peach/08.aiff": [0,{"jp":["@sound",114],"us":["@sound",126],"eu":["@sound",126]}], +"sound/samples/sfx_mario_peach/09.aiff": [0,{"jp":["@sound",115],"us":["@sound",127],"eu":["@sound",127]}], +"sound/samples/sfx_mario_peach/0A.aiff": [0,{"jp":["@sound",116],"us":["@sound",128],"eu":["@sound",128]}], +"sound/samples/sfx_mario_peach/0B.aiff": [0,{"jp":["@sound",117],"us":["@sound",129],"eu":["@sound",129]}], +"sound/samples/sfx_mario_peach/0C.aiff": [0,{"jp":["@sound",118],"us":["@sound",130],"eu":["@sound",130]}], +"sound/samples/sfx_mario_peach/0D.aiff": [0,{"jp":["@sound",119],"us":["@sound",131],"eu":["@sound",131]}], +"sound/samples/sfx_mario_peach/0E.aiff": [0,{"us":["@sound",132],"eu":["@sound",132]}], +"sound/samples/sfx_mario_peach/0F.aiff": [0,{"us":["@sound",133],"eu":["@sound",133]}], +"sound/samples/sfx_mario_peach/10.aiff": [0,{"us":["@sound",134],"eu":["@sound",134]}], +"sound/samples/sfx_mario_peach/11.aiff": [0,{"us":["@sound",135],"eu":["@sound",135]}], +"sound/samples/sfx_mario_peach/12.aiff": [0,{"us":["@sound",136],"eu":["@sound",136]}], +"sound/samples/sfx_mario_peach/13.aiff": [0,{"us":["@sound",137],"eu":["@sound",137]}], +"sound/samples/sfx_mario_peach/14.aiff": [0,{"us":["@sound",138],"eu":["@sound",138]}], +"sound/samples/sfx_mario_peach/15.aiff": [0,{"us":["@sound",139],"eu":["@sound",139]}], +"sound/samples/sfx_mario_peach/16.aiff": [0,{"us":["@sound",140],"eu":["@sound",140]}], +"sound/samples/sfx_terrain/00_step_default.aiff": [0,{"jp":["@sound",6],"us":["@sound",6],"eu":["@sound",6]}], +"sound/samples/sfx_terrain/01_step_grass.aiff": [0,{"jp":["@sound",7],"us":["@sound",7],"eu":["@sound",7]}], +"sound/samples/sfx_terrain/02_step_stone.aiff": [0,{"jp":["@sound",8],"us":["@sound",8],"eu":["@sound",8]}], +"sound/samples/sfx_terrain/03_step_spooky.aiff": [0,{"jp":["@sound",9],"us":["@sound",9],"eu":["@sound",9]}], +"sound/samples/sfx_terrain/04_step_snow.aiff": [0,{"jp":["@sound",10],"us":["@sound",10],"eu":["@sound",10]}], +"sound/samples/sfx_terrain/05_step_ice.aiff": [0,{"jp":["@sound",11],"us":["@sound",11],"eu":["@sound",11]}], +"sound/samples/sfx_terrain/06_step_metal.aiff": [0,{"jp":["@sound",12],"us":["@sound",12],"eu":["@sound",12]}], +"sound/samples/sfx_terrain/07_step_sand.aiff": [0,{"jp":["@sound",13],"us":["@sound",13],"eu":["@sound",13]}], +"sound/samples/sfx_water/00_plunge.aiff": [0,{"jp":["@sound",14],"us":["@sound",14],"eu":["@sound",14]}], +"sound/samples/sfx_water/01_splash.aiff": [0,{"jp":["@sound",15],"us":["@sound",15],"eu":["@sound",15]}], +"sound/samples/sfx_water/02_swim.aiff": [0,{"jp":["@sound",16],"us":["@sound",16],"eu":["@sound",16]}] } diff --git a/data/behavior_data.c b/data/behavior_data.c index 18459522..13212d3b 100644 --- a/data/behavior_data.c +++ b/data/behavior_data.c @@ -9,7 +9,6 @@ #include "game/mario_actions_cutscene.h" #include "game/mario_misc.h" #include "game/object_helpers.h" -#include "game/object_helpers2.h" #include "game/debug.h" #include "menu/file_select.h" #include "engine/surface_load.h" @@ -69,13 +68,13 @@ // Defines the start of the behavior script as well as the object list the object belongs to. -// Has some special behavior for certain BBH objects. +// Has some special behavior for certain objects. #define BEGIN(objList) \ BC_BB(0x00, objList) // Delays the behavior script for a certain number of frames. -#define DELAY(frames) \ - BC_B0H(0x01, frames) +#define DELAY(num) \ + BC_B0H(0x01, num) // Jumps to a new behavior command and stores the return address in the object's stack. #define CALL(addr) \ @@ -92,8 +91,8 @@ BC_PTR(addr) // Marks the start of a loop that will repeat a certain number of times. -#define BEGIN_REPEAT(times) \ - BC_B0H(0x05, times) +#define BEGIN_REPEAT(count) \ + BC_B0H(0x05, count) // Marks the end of a repeating loop. #define END_REPEAT() \ @@ -115,11 +114,15 @@ // Often used to end behavior scripts that do not contain an infinite loop. #define BREAK() \ BC_B(0x0A) + +// Exits the behavior script, unused. +#define BREAK_UNUSED() \ + BC_B(0x0B) // Executes a native game function. -#define CALL_NATIVE(addr) \ +#define CALL_NATIVE(func) \ BC_B(0x0C), \ - BC_PTR(addr) + BC_PTR(func) // Adds a float to the specified field. #define ADD_FLOAT(field, value) \ @@ -143,7 +146,7 @@ BC_BBH(0x11, field, value) // Performs a bit clear with the specified short. Unused in favor of the 32-bit version. -#define BIT_CLEAR_INT(field, value) \ +#define BIT_CLEAR(field, value) \ BC_BBH(0x12, field, value) // TODO: this one needs a better name / labelling @@ -153,35 +156,47 @@ BC_H(rshift) // Sets the specified field to a random float in the given range. -#define SET_RANDOM_FLOAT(field, min, max) \ +#define SET_RANDOM_FLOAT(field, min, range) \ BC_BBH(0x14, field, min), \ - BC_H(max) + BC_H(range) // Sets the specified field to a random integer in the given range. -#define SET_RANDOM_INT(field, min, max) \ +#define SET_RANDOM_INT(field, min, range) \ BC_BBH(0x15, field, min), \ - BC_H(max) + BC_H(range) // Adds a random float in the given range to the specified field. -#define ADD_RANDOM_FLOAT(field, min, max) \ +#define ADD_RANDOM_FLOAT(field, min, range) \ BC_BBH(0x16, field, min), \ - BC_H(max) + BC_H(range) // TODO: better name (unused anyway) // Gets a random short, right shifts it the specified amount and adds min to it, then adds the value to the specified field. Unused. #define ADD_INT_RAND_RSHIFT(field, min, rshift) \ BC_BBH(0x17, field, min), \ BC_H(rshift) + +// No operation. Unused. +#define CMD_NOP_1(field) \ + BC_BB(0x18, field) + +// No operation. Unused. +#define CMD_NOP_2(field) \ + BC_BB(0x19, field) + +// No operation. Unused. +#define CMD_NOP_3(field) \ + BC_BB(0x1A, field) // Sets the current model ID of the object. #define SET_MODEL(modelID) \ BC_B0H(0x1B, modelID) // Spawns a child object with the specified model and behavior. -#define SPAWN_CHILD(modelID, bhv) \ +#define SPAWN_CHILD(modelID, behavior) \ BC_B(0x1C), \ BC_W(modelID), \ - BC_PTR(bhv) + BC_PTR(behavior) // Exits the behavior script and despawns the object. // Often used to end behavior scripts that do not contain an infinite loop. @@ -193,12 +208,12 @@ BC_B(0x1E) // Sets the destination float field to the sum of the values of the given float fields. -#define SUM_FLOAT(fieldDest, fieldSrc1, fieldSrc2) \ - BC_BBBB(0x1F, fieldDest, fieldSrc1, fieldSrc2) +#define SUM_FLOAT(fieldDst, fieldSrc1, fieldSrc2) \ + BC_BBBB(0x1F, fieldDst, fieldSrc1, fieldSrc2) -// Sets the destination integer field to the sum of the values of the given integer fields. -#define SUM_INT(fieldDest, fieldSrc1, fieldSrc2) \ - BC_BBBB(0x20, fieldDest, fieldSrc1, fieldSrc2) +// Sets the destination integer field to the sum of the values of the given integer fields. Unused. +#define SUM_INT(fieldDst, fieldSrc1, fieldSrc2) \ + BC_BBBB(0x20, fieldDst, fieldSrc1, fieldSrc2) // Billboards the current object, making it always face the camera. #define BILLBOARD() \ @@ -213,29 +228,38 @@ BC_B(0x23), \ BC_HH(radius, height) -// Delays the behavior script for the number of frames given by the value of the specified field.. +// No operation. Unused. +#define CMD_NOP_4(field, value) \ + BC_BBH(0x24, field, value) + +// Delays the behavior script for the number of frames given by the value of the specified field. #define DELAY_VAR(field) \ BC_BB(0x25, field) -// Loads the animations for the object. -#define LOAD_ANIMATIONS(field, value) \ +// Unused. Marks the start of a loop that will repeat a certain number of times. +// Uses a u8 as the argument, instead of a s16 like the other version does. +#define BEGIN_REPEAT_UNUSED(count) \ + BC_BB(0x26, count) + +// Loads the animations for the object. is always set to oAnimations. +#define LOAD_ANIMATIONS(field, anims) \ BC_BB(0x27, field), \ - BC_PTR(value) + BC_PTR(anims) // Begins animation and sets the object's current animation index to the specified value. #define ANIMATE(animIndex) \ BC_BB(0x28, animIndex) // Spawns a child object with the specified model and behavior, plus a behavior param. -#define SPAWN_CHILD_WITH_PARAM(behParam, modelID, bhv) \ - BC_B0H(0x29, behParam), \ +#define SPAWN_CHILD_WITH_PARAM(bhvParam, modelID, behavior) \ + BC_B0H(0x29, bhvParam), \ BC_W(modelID), \ - BC_PTR(bhv) + BC_PTR(behavior) // Loads collision data for the object. -#define LOAD_COLLISION_DATA(addr) \ +#define LOAD_COLLISION_DATA(collisionData) \ BC_B(0x2A), \ - BC_PTR(addr) + BC_PTR(collisionData) // Sets the size of the object's cylindrical hitbox, and applies a downwards offset. #define SET_HITBOX_WITH_OFFSET(radius, height, downOffset) \ @@ -244,10 +268,10 @@ BC_H(downOffset) // Spawns a new object with the specified model and behavior. -#define SPAWN_OBJ(modelID, bhv) \ +#define SPAWN_OBJ(modelID, behavior) \ BC_B(0x2C), \ BC_W(modelID), \ - BC_PTR(bhv) + BC_PTR(behavior) // Sets the home position of the object to its current position. #define SET_HOME() \ @@ -261,37 +285,48 @@ // Sets the object's interaction type. #define SET_INTERACT_TYPE(type) \ BC_B(0x2F), \ - BC_PTR(type) + BC_W(type) // Sets various parameters that the object uses for calculating physics. -#define SET_OBJ_PHYSICS(wallHitboxRadius, gravity, bounciness, drag, friction, buoyancy, unused1, unused2) \ +#define SET_OBJ_PHYSICS(wallHitboxRadius, gravity, bounciness, dragStrength, friction, buoyancy, unused1, unused2) \ BC_B(0x30), \ BC_HH(wallHitboxRadius, gravity), \ - BC_HH(bounciness, drag), \ + BC_HH(bounciness, dragStrength), \ BC_HH(friction, buoyancy), \ BC_HH(unused1, unused2) +// Sets the object's interaction subtype. Unused. +#define SET_INTERACT_SUBTYPE(subtype) \ + BC_B(0x31), \ + BC_W(subtype) + // Sets the object's size to the specified percentage. -#define SCALE(percent) \ - BC_B0H(0x32, percent) +#define SCALE(unusedField, percent) \ + BC_BBH(0x32, unusedField, percent) -// Performs a bit clear with the specified integer. -#define BIT_CLEAR_INT32(field, value) \ +// Performs a bit clear on the object's parent's field with the specified value. +// Used for clearing active particle flags fron Mario's object. +#define PARENT_BIT_CLEAR(field, flags) \ BC_BB(0x33, field), \ - BC_W(value) + BC_W(flags) -// Adds 1 to the specified field every frames. Only used for animation. -#define TEX_ANIM_RATE(field, rate) \ +// Animates an object using texture animation. is always set to oAnimState. +#define ANIMATE_TEXTURE(field, rate) \ BC_BBH(0x34, field, rate) // Disables rendering for the object. #define DISABLE_RENDERING() \ BC_B(0x35) +// Unused. Sets the specified field to an integer. Wastes 4 bytes of space for no reason at all. +#define SET_INT_UNUSED(field, value) \ + BC_BB(0x36, field), \ + BC_HH(0, value) + // Spawns a water droplet with the given parameters. -#define SPAWN_WATER_DROPLET(params) \ +#define SPAWN_WATER_DROPLET(dropletParams) \ BC_B(0x37), \ - BC_PTR(params) + BC_PTR(dropletParams) const BehaviorScript bhvStarDoor[] = { @@ -342,7 +377,7 @@ const BehaviorScript bhvMrIParticle[] = { SET_HITBOX(50, 50), SET_INT(oDamageOrCoinValue, 1), SET_INT(oInteractType, INTERACT_DAMAGE), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ 0, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ 0, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0), CALL_NATIVE(bhv_init_room), BEGIN_LOOP(), CALL_NATIVE(bhv_mr_i_particle_loop), @@ -425,7 +460,7 @@ const BehaviorScript bhvKingBobomb[] = { LOAD_ANIMATIONS(oAnimations, king_bobomb_seg5_anims_0500FE30), SET_INT(oInteractType, INTERACT_GRABBABLE), SET_HITBOX(/*Radius*/ 100, /*Height*/ 100), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_INT(oIntangibleTimer, 0), DROP_TO_FLOOR(), SET_HOME(), @@ -467,13 +502,13 @@ const BehaviorScript bhvBetaChestLid[] = { END_LOOP(), }; -const BehaviorScript bhvBubbleMario[] = { +const BehaviorScript bhvBubbleParticleSpawner[] = { BEGIN(OBJ_LIST_DEFAULT), DISABLE_RENDERING(), - SET_RANDOM_INT(oWaterObjUnkF4, /*Minimum*/ 2, /*Maximum*/ 9), + SET_RANDOM_INT(oWaterObjUnkF4, /*Minimum*/ 2, /*Range*/ 9), DELAY_VAR(oWaterObjUnkF4), SPAWN_CHILD(/*Model*/ MODEL_BUBBLE, /*Behavior*/ bhvSmallWaterWave), - BIT_CLEAR_INT32(oActiveParticleFlags, ACTIVE_PARTICLE_5), + PARENT_BIT_CLEAR(oActiveParticleFlags, ACTIVE_PARTICLE_BUBBLE), DEACTIVATE(), }; @@ -482,9 +517,9 @@ const BehaviorScript bhvBubbleMaybe[] = { OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), BILLBOARD(), CALL_NATIVE(bhv_bubble_wave_init), - SET_RANDOM_FLOAT(oWaterObjUnkF4, /*Minimum*/ -75, /*Maximum*/ 150), - SET_RANDOM_FLOAT(oWaterObjUnkF8, /*Minimum*/ -75, /*Maximum*/ 150), - SET_RANDOM_FLOAT(oWaterObjUnkFC, /*Minimum*/ -75, /*Maximum*/ 150), + SET_RANDOM_FLOAT(oWaterObjUnkF4, /*Minimum*/ -75, /*Range*/ 150), + SET_RANDOM_FLOAT(oWaterObjUnkF8, /*Minimum*/ -75, /*Range*/ 150), + SET_RANDOM_FLOAT(oWaterObjUnkFC, /*Minimum*/ -75, /*Range*/ 150), SUM_FLOAT(/*Dest*/ oPosX, /*Value 1*/ oPosX, /*Value 2*/ oWaterObjUnkF4), SUM_FLOAT(/*Dest*/ oPosZ, /*Value 1*/ oPosZ, /*Value 2*/ oWaterObjUnkF8), SUM_FLOAT(/*Dest*/ oPosY, /*Value 1*/ oPosY, /*Value 2*/ oWaterObjUnkFC), @@ -501,11 +536,11 @@ const BehaviorScript bhvSmallWaterWave[] = { OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), BILLBOARD(), CALL_NATIVE(bhv_bubble_wave_init), - SET_RANDOM_FLOAT(oWaterObjUnkF4, /*Minimum*/ -50, /*Maximum*/ 100), - SET_RANDOM_FLOAT(oWaterObjUnkF8, /*Minimum*/ -50, /*Maximum*/ 100), + SET_RANDOM_FLOAT(oWaterObjUnkF4, /*Minimum*/ -50, /*Range*/ 100), + SET_RANDOM_FLOAT(oWaterObjUnkF8, /*Minimum*/ -50, /*Range*/ 100), SUM_FLOAT(/*Dest*/ oPosX, /*Value 1*/ oPosX, /*Value 2*/ oWaterObjUnkF4), SUM_FLOAT(/*Dest*/ oPosZ, /*Value 1*/ oPosZ, /*Value 2*/ oWaterObjUnkF8), - SET_RANDOM_FLOAT(oWaterObjUnkFC, /*Minimum*/ 0, /*Maximum*/ 50), + SET_RANDOM_FLOAT(oWaterObjUnkFC, /*Minimum*/ 0, /*Range*/ 50), SUM_FLOAT(/*Dest*/ oPosY, /*Value 1*/ oPosY, /*Value 2*/ oWaterObjUnkFC), SET_INT(oAnimState, -1), CALL(bhvSmallWaterWave398), @@ -519,8 +554,8 @@ const BehaviorScript bhvSmallWaterWave[] = { const BehaviorScript bhvSmallWaterWave398[] = { ADD_INT(oAnimState, 1), ADD_FLOAT(oPosY, 7), - SET_RANDOM_FLOAT(oWaterObjUnkF4, /*Minimum*/ -2, /*Maximum*/ 5), - SET_RANDOM_FLOAT(oWaterObjUnkF8, /*Minimum*/ -2, /*Maximum*/ 5), + SET_RANDOM_FLOAT(oWaterObjUnkF4, /*Minimum*/ -2, /*Range*/ 5), + SET_RANDOM_FLOAT(oWaterObjUnkF8, /*Minimum*/ -2, /*Range*/ 5), SUM_FLOAT(/*Dest*/ oPosX, /*Value 1*/ oPosX, /*Value 2*/ oWaterObjUnkF4), SUM_FLOAT(/*Dest*/ oPosZ, /*Value 1*/ oPosZ, /*Value 2*/ oWaterObjUnkF8), RETURN(), @@ -552,9 +587,9 @@ const BehaviorScript bhvSmallParticle[] = { DEACTIVATE(), }; -const BehaviorScript bhvWaterWaves[] = { +const BehaviorScript bhvPlungeBubble[] = { BEGIN(OBJ_LIST_DEFAULT), - BIT_CLEAR_INT32(oActiveParticleFlags, ACTIVE_PARTICLE_9), + PARENT_BIT_CLEAR(oActiveParticleFlags, ACTIVE_PARTICLE_PLUNGE_BUBBLE), DISABLE_RENDERING(), CALL_NATIVE(bhv_water_waves_init), DEACTIVATE(), @@ -631,7 +666,7 @@ const BehaviorScript bhvChuckya[] = { ANIMATE(5), SET_INT(oInteractType, INTERACT_GRABBABLE), SET_HITBOX(/*Radius*/ 150, /*Height*/ 100), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SPAWN_OBJ(/*Model*/ MODEL_NONE, /*Behavior*/ bhvChuckyaAnchorMario), SET_INT(oNumLootCoins, 5), SET_INT(oIntangibleTimer, 0), @@ -841,7 +876,7 @@ const BehaviorScript bhvMrIBlueCoin[] = { SET_INT(oIntangibleTimer, 0), SET_FLOAT(oMrIUnk110, 20), SET_INT(oAnimState, -1), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), CALL_NATIVE(bhv_coin_init), SET_INT(oDamageOrCoinValue, 5), SET_HITBOX(/*Radius*/ 120, /*Height*/ 64), @@ -856,7 +891,7 @@ const BehaviorScript bhvCoinInsideBoo[] = { SET_HITBOX(/*Radius*/ 100, /*Height*/ 64), SET_INT(oInteractType, INTERACT_COIN), OR_INT(oFlags, (OBJ_FLAG_ACTIVE_FROM_AFAR | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BILLBOARD(), CALL_NATIVE(bhv_init_room), BEGIN_LOOP(), @@ -933,7 +968,7 @@ const BehaviorScript bhvSingleCoinGetsSpawned[] = { OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), BILLBOARD(), CALL_NATIVE(bhv_coin_init), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_coin_loop), ADD_INT(oAnimState, 1), @@ -975,11 +1010,11 @@ const BehaviorScript bhvWallTinyStarParticle[] = { DEACTIVATE(), }; -const BehaviorScript bhvWallTinyStarParticleSpawn[] = { +const BehaviorScript bhvVertStarParticleSpawner[] = { BEGIN(OBJ_LIST_DEFAULT), DISABLE_RENDERING(), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), - BIT_CLEAR_INT32(oActiveParticleFlags, ACTIVE_PARTICLE_18), + PARENT_BIT_CLEAR(oActiveParticleFlags, ACTIVE_PARTICLE_V_STAR), CALL_NATIVE(bhv_tiny_star_particles_init), DELAY(1), DEACTIVATE(), @@ -995,11 +1030,11 @@ const BehaviorScript bhvPoundTinyStarParticle[] = { DEACTIVATE(), }; -const BehaviorScript bhvPoundTinyStarParticleSpawn[] = { +const BehaviorScript bhvHorStarParticleSpawner[] = { BEGIN(OBJ_LIST_DEFAULT), DISABLE_RENDERING(), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), - BIT_CLEAR_INT32(oActiveParticleFlags, ACTIVE_PARTICLE_4), + PARENT_BIT_CLEAR(oActiveParticleFlags, ACTIVE_PARTICLE_H_STAR), CALL_NATIVE(bhv_pound_tiny_star_particle_init), DELAY(1), DEACTIVATE(), @@ -1014,11 +1049,11 @@ const BehaviorScript bhvPunchTinyTriangle[] = { END_LOOP(), }; -const BehaviorScript bhvPunchTinyTriangleSpawn[] = { +const BehaviorScript bhvTriangleParticleSpawner[] = { BEGIN(OBJ_LIST_DEFAULT), DISABLE_RENDERING(), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), - BIT_CLEAR_INT32(oActiveParticleFlags, ACTIVE_PARTICLE_19), + PARENT_BIT_CLEAR(oActiveParticleFlags, ACTIVE_PARTICLE_TRIANGLE), CALL_NATIVE(bhv_punch_tiny_triangle_init), DELAY(1), DEACTIVATE(), @@ -1068,7 +1103,7 @@ const BehaviorScript bhvThwomp2[] = { DROP_TO_FLOOR(), ADD_FLOAT(oPosY, 1), SET_HOME(), - SCALE(140), + SCALE(/*Unused*/ 0, /*Field*/ 140), SET_FLOAT(oDrawingDistance, 4000), BEGIN_LOOP(), CALL_NATIVE(bhv_grindel_thwomp_loop), @@ -1082,7 +1117,7 @@ const BehaviorScript bhvThwomp[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), DROP_TO_FLOOR(), ADD_FLOAT(oPosY, 1), - SCALE(140), + SCALE(/*Unused*/ 0, /*Field*/ 140), SET_HOME(), SET_FLOAT(oDrawingDistance, 4000), BEGIN_LOOP(), @@ -1135,14 +1170,14 @@ const BehaviorScript bhvFlame[] = { OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), BILLBOARD(), SET_HOME(), - SCALE(700), + SCALE(/*Unused*/ 0, /*Field*/ 700), SET_INTERACT_TYPE(INTERACT_FLAME), SET_HITBOX_WITH_OFFSET(/*Radius*/ 50, /*Height*/ 25, /*Downwards offset*/ 25), SET_INT(oIntangibleTimer, 0), CALL_NATIVE(bhv_init_room), BEGIN_LOOP(), SET_INT(oInteractStatus, 0), - TEX_ANIM_RATE(oAnimState, 2), + ANIMATE_TEXTURE(oAnimState, 2), END_LOOP(), }; @@ -1196,7 +1231,7 @@ const BehaviorScript bhvWaterMist[] = { END_LOOP(), }; -const BehaviorScript bhvWaterMistSpawn[] = { +const BehaviorScript bhvBreathParticleSpawner[] = { BEGIN(OBJ_LIST_DEFAULT), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), BEGIN_REPEAT(8), @@ -1220,7 +1255,7 @@ const BehaviorScript bhvWaterMist2[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), SET_HOME(), SET_INT(oFaceAnglePitch, 0xC000), - SCALE(2100), + SCALE(/*Unused*/ 0, /*Field*/ 2100), BEGIN_LOOP(), CALL_NATIVE(bhv_water_mist_2_loop), END_LOOP(), @@ -1239,7 +1274,7 @@ const BehaviorScript bhvUnused0DFC[] = { DEACTIVATE(), }; -const BehaviorScript bhvPoundWhitePuffs[] = { +const BehaviorScript bhvMistCircParticleSpawner[] = { BEGIN(OBJ_LIST_DEFAULT), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), CALL_NATIVE(bhv_pound_white_puffs_init), @@ -1247,7 +1282,7 @@ const BehaviorScript bhvPoundWhitePuffs[] = { DEACTIVATE(), }; -const BehaviorScript bhvGroundSand[] = { +const BehaviorScript bhvDirtParticleSpawner[] = { BEGIN(OBJ_LIST_DEFAULT), BEGIN(OBJ_LIST_DEFAULT), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), @@ -1256,7 +1291,7 @@ const BehaviorScript bhvGroundSand[] = { DEACTIVATE(), }; -const BehaviorScript bhvGroundSnow[] = { +const BehaviorScript bhvSnowParticleSpawner[] = { BEGIN(OBJ_LIST_DEFAULT), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), CALL_NATIVE(bhv_ground_snow_init), @@ -1295,7 +1330,7 @@ const BehaviorScript bhvEndPeach[] = { const BehaviorScript bhvUnusedParticleSpawn[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_INT(oIntangibleTimer, 0), SET_HITBOX(/*Radius*/ 40, /*Height*/ 40), BEGIN_LOOP(), @@ -1334,7 +1369,7 @@ const BehaviorScript bhvUkikiCage[] = { SPAWN_CHILD(/*Model*/ MODEL_STAR, /*Behavior*/ bhvUkikiCageStar), SPAWN_CHILD(/*Model*/ MODEL_NONE, /*Behavior*/ bhvUkikiCageChild), SET_FLOAT(oCollisionDistance, 20000), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_ukiki_cage_loop), END_LOOP(), @@ -1473,7 +1508,7 @@ const BehaviorScript bhvBouncingFireballFlame[] = { SET_INTERACT_TYPE(INTERACT_FLAME), SET_FLOAT(oGraphYOffset, 30), SET_HITBOX_WITH_OFFSET(/*Radius*/ 50, /*Height*/ 25, /*Downwards offset*/ 25), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BILLBOARD(), BEGIN_LOOP(), CALL_NATIVE(bhv_bouncing_fireball_flame_loop), @@ -1490,7 +1525,7 @@ const BehaviorScript bhvBowserShockWave[] = { END_LOOP(), }; -const BehaviorScript bhvFlameMario[] = { +const BehaviorScript bhvFireParticleSpawner[] = { BEGIN(OBJ_LIST_DEFAULT), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), BILLBOARD(), @@ -1525,7 +1560,7 @@ const BehaviorScript bhvBlackSmokeBowser[] = { SET_FLOAT(oGraphYOffset, 0), BEGIN_REPEAT(8), CALL_NATIVE(bhv_black_smoke_bowser_loop), - TEX_ANIM_RATE(oAnimState, 4), + ANIMATE_TEXTURE(oAnimState, 4), END_REPEAT(), DEACTIVATE(), }; @@ -1553,7 +1588,7 @@ const BehaviorScript bhvSpindrift[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_ANIMATIONS(oAnimations, spindrift_seg5_anims_05002D68), ANIMATE(0), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_HOME(), SET_INT(oInteractionSubtype, INT_SUBTYPE_TWIRL_BOUNCE), BEGIN_LOOP(), @@ -1602,7 +1637,7 @@ const BehaviorScript bhvWfSolidTowerPlatform[] = { END_LOOP(), }; -const BehaviorScript bhvSnowLeafParticleSpawn[] = { +const BehaviorScript bhvLeafParticleSpawner[] = { BEGIN(OBJ_LIST_DEFAULT), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), CALL_NATIVE(bhv_snow_leaf_particle_spawn_init), @@ -1735,7 +1770,7 @@ const BehaviorScript bhvHeaveHo[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_HOLDABLE | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_ANIMATIONS(oAnimations, heave_ho_seg5_anims_0501534C), ANIMATE(0), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 200, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 600, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 200, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 600, /*Unused*/ 0, 0), SPAWN_OBJ(/*Model*/ MODEL_NONE, /*Behavior*/ bhvHeaveHoThrowMario), SET_INT(oInteractType, INTERACT_GRABBABLE), SET_INT(oInteractionSubtype, INT_SUBTYPE_NOT_GRABBABLE | INT_SUBTYPE_GRABS_MARIO), @@ -1799,7 +1834,7 @@ const BehaviorScript bhvBetaTrampolineSpring[] = { const BehaviorScript bhvJumpingBox[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, (OBJ_FLAG_HOLDABLE | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 600, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 600, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_jumping_box_loop), END_LOOP(), @@ -1809,7 +1844,7 @@ const BehaviorScript bhvBooCage[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, (OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), SET_FLOAT(oGraphYOffset, 10), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_boo_cage_loop), END_LOOP(), @@ -1837,7 +1872,7 @@ const BehaviorScript bhvBowserKey[] = { BEGIN(OBJ_LIST_LEVEL), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), SET_HOME(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_bowser_key_loop), END_LOOP(), @@ -1859,7 +1894,7 @@ const BehaviorScript bhvBetaBooKey[] = { BEGIN(OBJ_LIST_LEVEL), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), SET_HITBOX(/*Radius*/ 32, /*Height*/ 64), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_beta_boo_key_loop), END_LOOP(), @@ -1882,9 +1917,9 @@ const BehaviorScript bhvBulletBill[] = { SET_HITBOX_WITH_OFFSET(/*Radius*/ 50, /*Height*/ 50, /*Downwards offset*/ 50), SET_INTERACT_TYPE(INTERACT_DAMAGE), SET_INT(oDamageOrCoinValue, 3), - SCALE(40), + SCALE(/*Unused*/ 0, /*Field*/ 40), SET_INT(oIntangibleTimer, 0), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ 0, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ 0, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0), CALL_NATIVE(bhv_bullet_bill_init), BEGIN_LOOP(), CALL_NATIVE(bhv_bullet_bill_loop), @@ -1931,7 +1966,7 @@ const BehaviorScript bhvBowser[] = { SPAWN_CHILD(/*Model*/ MODEL_BOWSER_BOMB_CHILD_OBJ, /*Behavior*/ bhvBowserFlameSpawn), SPAWN_OBJ(/*Model*/ MODEL_NONE, /*Behavior*/ bhvBowserTailAnchor), SET_INT(oNumLootCoins, 50), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_HOME(), CALL_NATIVE(bhv_bowser_init), BEGIN_LOOP(), @@ -1993,11 +2028,11 @@ const BehaviorScript bhvBlueBowserFlame[] = { OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), SET_INTERACT_TYPE(INTERACT_FLAME), BILLBOARD(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), CALL_NATIVE(bhv_blue_bowser_flame_init), BEGIN_LOOP(), CALL_NATIVE(bhv_blue_bowser_flame_loop), - TEX_ANIM_RATE(oAnimState, 2), + ANIMATE_TEXTURE(oAnimState, 2), END_LOOP(), }; @@ -2006,11 +2041,11 @@ const BehaviorScript bhvFlameFloatingLanding[] = { OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), SET_INTERACT_TYPE(INTERACT_FLAME), BILLBOARD(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), CALL_NATIVE(bhv_flame_floating_landing_init), BEGIN_LOOP(), CALL_NATIVE(bhv_flame_floating_landing_loop), - TEX_ANIM_RATE(oAnimState, 2), + ANIMATE_TEXTURE(oAnimState, 2), END_LOOP(), }; @@ -2030,10 +2065,10 @@ const BehaviorScript bhvFlameBouncing[] = { SET_INTERACT_TYPE(INTERACT_FLAME), BILLBOARD(), CALL_NATIVE(bhv_flame_bouncing_init), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_flame_bouncing_loop), - TEX_ANIM_RATE(oAnimState, 2), + ANIMATE_TEXTURE(oAnimState, 2), END_LOOP(), }; @@ -2045,7 +2080,7 @@ const BehaviorScript bhvFlameMovingForwardGrowing[] = { CALL_NATIVE(bhv_flame_moving_forward_growing_init), BEGIN_LOOP(), CALL_NATIVE(bhv_flame_moving_forward_growing_loop), - TEX_ANIM_RATE(oAnimState, 2), + ANIMATE_TEXTURE(oAnimState, 2), END_LOOP(), }; @@ -2055,10 +2090,10 @@ const BehaviorScript bhvFlameBowser[] = { SET_INTERACT_TYPE(INTERACT_FLAME), BILLBOARD(), CALL_NATIVE(bhv_flame_bowser_init), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_flame_bowser_loop), - TEX_ANIM_RATE(oAnimState, 2), + ANIMATE_TEXTURE(oAnimState, 2), END_LOOP(), }; @@ -2068,10 +2103,10 @@ const BehaviorScript bhvFlameLargeBurningOut[] = { SET_INTERACT_TYPE(INTERACT_FLAME), BILLBOARD(), CALL_NATIVE(bhv_flame_large_burning_out_init), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_flame_bowser_loop), - TEX_ANIM_RATE(oAnimState, 2), + ANIMATE_TEXTURE(oAnimState, 2), END_LOOP(), }; @@ -2197,7 +2232,7 @@ const BehaviorScript bhvMacroUkiki[] = { DROP_TO_FLOOR(), LOAD_ANIMATIONS(oAnimations, ukiki_seg5_anims_05015784), ANIMATE(0), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_HOME(), CALL_NATIVE(bhv_ukiki_init), BEGIN_LOOP(), @@ -2364,7 +2399,7 @@ const BehaviorScript bhvUnused1F30[] = { const BehaviorScript bhvKoopaShell[] = { BEGIN(OBJ_LIST_LEVEL), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_koopa_shell_loop), END_LOOP(), @@ -2377,7 +2412,7 @@ const BehaviorScript bhvKoopaShellFlame[] = { BILLBOARD(), BEGIN_LOOP(), CALL_NATIVE(bhv_koopa_shell_flame_loop), - TEX_ANIM_RATE(oAnimState, 2), + ANIMATE_TEXTURE(oAnimState, 2), END_LOOP(), }; @@ -2448,7 +2483,7 @@ const BehaviorScript bhvTuxiesMother[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_ANIMATIONS(oAnimations, penguin_seg5_anims_05008B74), ANIMATE(3), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0), SET_HOME(), SET_INTERACT_TYPE(INTERACT_TEXT), SET_HITBOX(/*Radius*/ 200, /*Height*/ 300), @@ -2474,7 +2509,7 @@ const BehaviorScript bhvSmallPenguin[] = { DROP_TO_FLOOR(), LOAD_ANIMATIONS(oAnimations, penguin_seg5_anims_05008B74), ANIMATE(0), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_INT(oInteractType, INTERACT_GRABBABLE), SET_INT(oInteractionSubtype, INT_SUBTYPE_HOLDABLE_NPC), SET_INT(oIntangibleTimer, 0), @@ -2581,7 +2616,7 @@ const BehaviorScript bhvExclamationBox[] = { const BehaviorScript bhvRotatingExclamationMark[] = { BEGIN(OBJ_LIST_DEFAULT), OR_INT(oFlags, (OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), - SCALE(200), + SCALE(/*Unused*/ 0, /*Field*/ 200), BEGIN_LOOP(), CALL_NATIVE(bhv_rotating_exclamation_box_loop), ADD_INT(oMoveAngleYaw, 0x800), @@ -2690,7 +2725,7 @@ const BehaviorScript bhvInSunkenShip3[] = { const BehaviorScript bhvSunkenShipPart[] = { BEGIN(OBJ_LIST_DEFAULT), OR_INT(oFlags, (OBJ_FLAG_ACTIVE_FROM_AFAR | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), - SCALE(50), + SCALE(/*Unused*/ 0, /*Field*/ 50), SET_HOME(), BEGIN_LOOP(), CALL_NATIVE(bhv_sunken_ship_part_loop), @@ -2707,7 +2742,7 @@ const BehaviorScript bhvSunkenShipSetRotation[] = { const BehaviorScript bhvSunkenShipPart2[] = { BEGIN(OBJ_LIST_DEFAULT), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), - SCALE(100), + SCALE(/*Unused*/ 0, /*Field*/ 100), SET_FLOAT(oDrawingDistance, 6000), SET_HOME(), CALL(bhvSunkenShipSetRotation), @@ -2732,9 +2767,9 @@ const BehaviorScript bhvInSunkenShip2[] = { END_LOOP(), }; -const BehaviorScript bhvMarioDustGenerator[] = { +const BehaviorScript bhvMistParticleSpawner[] = { BEGIN(OBJ_LIST_DEFAULT), - BIT_CLEAR_INT32(oActiveParticleFlags, ACTIVE_PARTICLE_0), + PARENT_BIT_CLEAR(oActiveParticleFlags, ACTIVE_PARTICLE_DUST), DISABLE_RENDERING(), SPAWN_CHILD(/*Model*/ MODEL_MIST, /*Behavior*/ bhvWhitePuff1), SPAWN_CHILD(/*Model*/ MODEL_SMOKE, /*Behavior*/ bhvWhitePuff2), @@ -2744,7 +2779,7 @@ const BehaviorScript bhvMarioDustGenerator[] = { const BehaviorScript bhvWhitePuff1[] = { BEGIN(OBJ_LIST_DEFAULT), - BIT_CLEAR_INT32(oActiveParticleFlags, ACTIVE_PARTICLE_0), + PARENT_BIT_CLEAR(oActiveParticleFlags, ACTIVE_PARTICLE_DUST), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), BILLBOARD(), BEGIN_LOOP(), @@ -2854,7 +2889,7 @@ const BehaviorScript bhvTweesterSandParticle[] = { const BehaviorScript bhvTweester[] = { BEGIN(OBJ_LIST_POLELIKE), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_ACTIVE_FROM_AFAR | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), DROP_TO_FLOOR(), SET_HOME(), BEGIN_LOOP(), @@ -2873,12 +2908,12 @@ const BehaviorScript bhvMerryGoRoundBooManager[] = { const BehaviorScript bhvAnimatedTexture[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BILLBOARD(), BEGIN_LOOP(), CALL_NATIVE(bhv_animated_texture_loop), ADD_INT(oAnimState, 1), - TEX_ANIM_RATE(oAnimState, 2), + ANIMATE_TEXTURE(oAnimState, 2), END_LOOP(), }; @@ -2887,7 +2922,7 @@ const BehaviorScript bhvBooInCastle[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), SET_HOME(), SET_FLOAT(oGraphYOffset, 60), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), CALL_NATIVE(bhv_init_room), BEGIN_LOOP(), CALL_NATIVE(bhv_boo_in_castle_loop), @@ -2902,7 +2937,7 @@ const BehaviorScript bhvBooWithCage[] = { SET_HURTBOX(/*Radius*/ 80, /*Height*/ 120), SET_HITBOX(/*Radius*/ 180, /*Height*/ 140), SET_FLOAT(oGraphYOffset, 60), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), CALL_NATIVE(bhv_boo_with_cage_init), CALL_NATIVE(bhv_init_room), BEGIN_LOOP(), @@ -2930,7 +2965,7 @@ const BehaviorScript bhvGhostHuntBigBoo[] = { // Big boo - common: OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), SET_HOME(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), CALL_NATIVE(bhv_init_room), CALL_NATIVE(bhv_boo_init), BEGIN_LOOP(), @@ -2969,7 +3004,7 @@ const BehaviorScript bhvGhostHuntBoo[] = { SET_FLOAT(oGraphYOffset, 30), CALL_NATIVE(bhv_init_room), SPAWN_CHILD(/*Model*/ MODEL_YELLOW_COIN, /*Behavior*/ bhvCoinInsideBoo), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), CALL_NATIVE(bhv_boo_init), BEGIN_LOOP(), CALL_NATIVE(bhv_boo_loop), @@ -3174,18 +3209,18 @@ const BehaviorScript bhvSparkleSpawn[] = { END_LOOP(), }; -const BehaviorScript bhvSpecialTripleJumpSparkles[] = { +const BehaviorScript bhvSparkleParticleSpawner[] = { BEGIN(OBJ_LIST_DEFAULT), - BIT_CLEAR_INT32(oActiveParticleFlags, ACTIVE_PARTICLE_3), + PARENT_BIT_CLEAR(oActiveParticleFlags, ACTIVE_PARTICLE_SPARKLES), BEGIN(OBJ_LIST_UNIMPORTANT), BILLBOARD(), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), SET_FLOAT(oGraphYOffset, 25), - SET_RANDOM_FLOAT(oMarioParticleFlags, /*Minimum*/ -50, /*Maximum*/ 100), + SET_RANDOM_FLOAT(oMarioParticleFlags, /*Minimum*/ -50, /*Range*/ 100), SUM_FLOAT(/*Dest*/ oPosX, /*Value 1*/ oPosX, /*Value 2*/ oMarioParticleFlags), - SET_RANDOM_FLOAT(oMarioParticleFlags, /*Minimum*/ -50, /*Maximum*/ 100), + SET_RANDOM_FLOAT(oMarioParticleFlags, /*Minimum*/ -50, /*Range*/ 100), SUM_FLOAT(/*Dest*/ oPosZ, /*Value 1*/ oPosZ, /*Value 2*/ oMarioParticleFlags), - SET_RANDOM_FLOAT(oMarioParticleFlags, /*Minimum*/ -50, /*Maximum*/ 100), + SET_RANDOM_FLOAT(oMarioParticleFlags, /*Minimum*/ -50, /*Range*/ 100), SUM_FLOAT(/*Dest*/ oPosY, /*Value 1*/ oPosY, /*Value 2*/ oMarioParticleFlags), SET_INT(oAnimState, -1), BEGIN_REPEAT(12), @@ -3199,7 +3234,7 @@ const BehaviorScript bhvScuttlebug[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_ANIMATIONS(oAnimations, scuttlebug_seg6_anims_06015064), ANIMATE(0), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 80, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 80, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_HOME(), CALL_NATIVE(bhv_init_room), BEGIN_LOOP(), @@ -3230,7 +3265,7 @@ const BehaviorScript bhvSmallWhomp[] = { LOAD_ANIMATIONS(oAnimations, whomp_seg6_anims_06020A04), LOAD_COLLISION_DATA(whomp_seg6_collision_06020A0C), ANIMATE(0), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_HOME(), BEGIN_LOOP(), CALL_NATIVE(bhv_whomp_loop), @@ -3253,7 +3288,7 @@ const BehaviorScript bhvWaterSplash[] = { ADD_INT(oAnimState, 1), DELAY(1), END_REPEAT(), - BIT_CLEAR_INT32(oActiveParticleFlags, ACTIVE_PARTICLE_6), + PARENT_BIT_CLEAR(oActiveParticleFlags, ACTIVE_PARTICLE_WATER_SPLASH), DEACTIVATE(), }; @@ -3364,7 +3399,7 @@ const BehaviorScript bhvShallowWaterWave[] = { SPAWN_WATER_DROPLET(&sShallowWaterWaveDropletParams), END_REPEAT_CONTINUE(), DELAY(1), - BIT_CLEAR_INT32(oActiveParticleFlags, ACTIVE_PARTICLE_SHALLOW_WATER_WAVE), + PARENT_BIT_CLEAR(oActiveParticleFlags, ACTIVE_PARTICLE_SHALLOW_WATER_WAVE), DEACTIVATE(), }; @@ -3380,7 +3415,7 @@ const BehaviorScript bhvShallowWaterSplash[] = { END_REPEAT_CONTINUE(), CALL_NATIVE(bhv_shallow_water_splash_init), DELAY(1), - BIT_CLEAR_INT32(oActiveParticleFlags, ACTIVE_PARTICLE_SHALLOW_WATER_SPLASH), + PARENT_BIT_CLEAR(oActiveParticleFlags, ACTIVE_PARTICLE_SHALLOW_WATER_SPLASH), DEACTIVATE(), }; @@ -3396,7 +3431,7 @@ const BehaviorScript bhvObjectWaveTrail[] = { const BehaviorScript bhvWaveTrail[] = { BEGIN(OBJ_LIST_DEFAULT), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), - BIT_CLEAR_INT32(oActiveParticleFlags, ACTIVE_PARTICLE_WAVE_TRAIL), + PARENT_BIT_CLEAR(oActiveParticleFlags, ACTIVE_PARTICLE_WAVE_TRAIL), // Wave trail - common: SET_FLOAT(oFaceAnglePitch, 0), SET_FLOAT(oFaceAngleYaw, 0), @@ -3450,8 +3485,8 @@ const BehaviorScript bhvSLWalkingPenguin[] = { LOAD_COLLISION_DATA(penguin_seg5_collision_05008B88), LOAD_ANIMATIONS(oAnimations, penguin_seg5_anims_05008B74), ANIMATE(0), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), - SCALE(600), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SCALE(/*Unused*/ 0, /*Field*/ 600), SET_HOME(), BEGIN_LOOP(), CALL_NATIVE(bhv_sl_walking_penguin_loop), @@ -3520,7 +3555,7 @@ const BehaviorScript bhvWarps6C[] = { BREAK(), }; -const BehaviorScript bhvWarps70[] = { +const BehaviorScript bhvDeathWarp[] = { BREAK(), }; @@ -3536,7 +3571,7 @@ const BehaviorScript bhvWarps7C[] = { BREAK(), }; -const BehaviorScript bhvWarps80[] = { +const BehaviorScript bhvPaintingDeathWarp[] = { BREAK(), }; @@ -3594,7 +3629,7 @@ const BehaviorScript bhvMenuButton[] = { const BehaviorScript bhvMenuButtonManager[] = { BEGIN(OBJ_LIST_LEVEL), - OR_INT(oFlags, (OBJ_FLAG_0800 | OBJ_FLAG_0020 | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), + OR_INT(oFlags, (OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM | OBJ_FLAG_0020 | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), CALL_NATIVE(bhv_menu_button_manager_init), BEGIN_LOOP(), SET_INT(oIntangibleTimer, 0), @@ -3913,7 +3948,7 @@ const BehaviorScript bhvObjectBubble[] = { OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), SET_INT(oAnimState, -1), CALL_NATIVE(bhv_object_bubble_init), - SET_RANDOM_FLOAT(oVelY, /*Minimum*/ 3, /*Maximum*/ 6), + SET_RANDOM_FLOAT(oVelY, /*Minimum*/ 3, /*Range*/ 6), SET_INT_RAND_RSHIFT(oMoveAngleYaw, /*Minimum*/ 0, /*Right shift*/ 0), DELAY(1), BEGIN_LOOP(), @@ -3986,9 +4021,9 @@ const BehaviorScript bhvBobombExplosionBubble[] = { BILLBOARD(), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), CALL_NATIVE(bhv_bobomb_explosion_bubble_init), - ADD_RANDOM_FLOAT(oPosX, /*Minimum*/ -50, /*Maximum*/ 100), - ADD_RANDOM_FLOAT(oPosY, /*Minimum*/ -50, /*Maximum*/ 100), - ADD_RANDOM_FLOAT(oPosZ, /*Minimum*/ -50, /*Maximum*/ 100), + ADD_RANDOM_FLOAT(oPosX, /*Minimum*/ -50, /*Range*/ 100), + ADD_RANDOM_FLOAT(oPosY, /*Minimum*/ -50, /*Range*/ 100), + ADD_RANDOM_FLOAT(oPosZ, /*Minimum*/ -50, /*Range*/ 100), CALL(bhvBobombExplosionBubble3600), DELAY(1), BEGIN_LOOP(), @@ -3998,8 +4033,8 @@ const BehaviorScript bhvBobombExplosionBubble[] = { }; const BehaviorScript bhvBobombExplosionBubble3600[] = { - ADD_RANDOM_FLOAT(oPosX, /*Minimum*/ -2, /*Maximum*/ 4), - ADD_RANDOM_FLOAT(oPosZ, /*Minimum*/ -2, /*Maximum*/ 4), + ADD_RANDOM_FLOAT(oPosX, /*Minimum*/ -2, /*Range*/ 4), + ADD_RANDOM_FLOAT(oPosZ, /*Minimum*/ -2, /*Range*/ 4), RETURN(), }; @@ -4337,7 +4372,7 @@ const BehaviorScript bhvRrCruiserWing[] = { const BehaviorScript bhvSpindel[] = { BEGIN(OBJ_LIST_SURFACE), - OR_INT(oFlags, (OBJ_FLAG_0010 | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), + OR_INT(oFlags, (OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_COLLISION_DATA(ssl_seg7_collision_spindel), CALL_NATIVE(bhv_spindel_init), BEGIN_LOOP(), @@ -4348,7 +4383,7 @@ const BehaviorScript bhvSpindel[] = { const BehaviorScript bhvSslMovingPyramidWall[] = { BEGIN(OBJ_LIST_SURFACE), - OR_INT(oFlags, (OBJ_FLAG_0010 | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), + OR_INT(oFlags, (OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_COLLISION_DATA(ssl_seg7_collision_0702808C), CALL_NATIVE(bhv_ssl_moving_pyramid_wall_init), BEGIN_LOOP(), @@ -4791,7 +4826,7 @@ const BehaviorScript bhvHidden1upInPoleSpawner[] = { const BehaviorScript bhvControllablePlatform[] = { BEGIN(OBJ_LIST_SURFACE), - OR_INT(oFlags, (OBJ_FLAG_0800 | OBJ_FLAG_0020 | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), + OR_INT(oFlags, (OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM | OBJ_FLAG_0020 | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_COLLISION_DATA(hmc_seg7_collision_controllable_platform), SET_HOME(), CALL_NATIVE(bhv_controllable_platform_init), @@ -4902,7 +4937,7 @@ const BehaviorScript bhvOrangeNumber[] = { const BehaviorScript bhvMantaRay[] = { BEGIN(OBJ_LIST_GENACTOR), - OR_INT(oFlags, (OBJ_FLAG_0010 | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), + OR_INT(oFlags, (OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_ANIMATIONS(oAnimations, manta_seg5_anims_05008EB4), ANIMATE(0), CALL_NATIVE(bhv_manta_ray_init), @@ -5047,8 +5082,8 @@ const BehaviorScript bhvKoopa[] = { LOAD_ANIMATIONS(oAnimations, koopa_seg6_anims_06011364), ANIMATE(9), SET_HOME(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 50, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag*/ 0, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), - SCALE(150), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 50, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag strength*/ 0, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SCALE(/*Unused*/ 0, /*Field*/ 150), SET_FLOAT(oKoopaAgility, 1), CALL_NATIVE(bhv_koopa_init), BEGIN_LOOP(), @@ -5085,7 +5120,7 @@ const BehaviorScript bhvPokey[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), DROP_TO_FLOOR(), SET_HOME(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 60, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 60, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_pokey_update), END_LOOP(), @@ -5094,7 +5129,7 @@ const BehaviorScript bhvPokey[] = { const BehaviorScript bhvPokeyBodyPart[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 60, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 60, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BILLBOARD(), BEGIN_LOOP(), CALL_NATIVE(bhv_pokey_body_part_update), @@ -5106,9 +5141,9 @@ const BehaviorScript bhvSwoop[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_ANIMATIONS(oAnimations, swoop_seg6_anims_060070D0), SET_HOME(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 50, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 50, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0), CALL_NATIVE(bhv_init_room), - SCALE(0), + SCALE(/*Unused*/ 0, /*Field*/ 0), BEGIN_LOOP(), CALL_NATIVE(bhv_swoop_update), END_LOOP(), @@ -5120,11 +5155,11 @@ const BehaviorScript bhvFlyGuy[] = { LOAD_ANIMATIONS(oAnimations, flyguy_seg8_anims_08011A64), ANIMATE(0), SET_HOME(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 50, /*Gravity*/ 0, /*Bounciness*/ 0, /*Drag*/ 0, /*Friction*/ 1000, /*Buoyancy*/ 600, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 50, /*Gravity*/ 0, /*Bounciness*/ 0, /*Drag strength*/ 0, /*Friction*/ 1000, /*Buoyancy*/ 600, /*Unused*/ 0, 0), CALL_NATIVE(bhv_init_room), SET_INT(oInteractionSubtype, INT_SUBTYPE_TWIRL_BOUNCE), SET_FLOAT(oGraphYOffset, 30), - SCALE(150), + SCALE(/*Unused*/ 0, /*Field*/ 150), BEGIN_LOOP(), CALL_NATIVE(bhv_fly_guy_update), END_LOOP(), @@ -5136,7 +5171,7 @@ const BehaviorScript bhvGoomba[] = { DROP_TO_FLOOR(), LOAD_ANIMATIONS(oAnimations, goomba_seg8_anims_0801DA4C), SET_HOME(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 40, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 0, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 40, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 0, /*Unused*/ 0, 0), CALL_NATIVE(bhv_goomba_init), BEGIN_LOOP(), CALL_NATIVE(bhv_goomba_update), @@ -5158,11 +5193,11 @@ const BehaviorScript bhvChainChomp[] = { DROP_TO_FLOOR(), LOAD_ANIMATIONS(oAnimations, chain_chomp_seg6_anims_06025178), ANIMATE(0), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 0, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 0, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), HIDE(), SET_HOME(), SET_FLOAT(oGraphYOffset, 240), - SCALE(200), + SCALE(/*Unused*/ 0, /*Field*/ 200), SPAWN_CHILD_WITH_PARAM(/*Bhv param*/ 0, /*Model*/ MODEL_WOODEN_POST, /*Behavior*/ bhvWoodenPost), BEGIN_LOOP(), CALL_NATIVE(bhv_chain_chomp_update), @@ -5173,9 +5208,9 @@ const BehaviorScript bhvChainChompChainPart[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), BILLBOARD(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_FLOAT(oGraphYOffset, 40), - SCALE(200), + SCALE(/*Unused*/ 0, /*Field*/ 200), BEGIN_LOOP(), CALL_NATIVE(bhv_chain_chomp_chain_part_update), END_LOOP(), @@ -5185,11 +5220,11 @@ const BehaviorScript bhvWoodenPost[] = { BEGIN(OBJ_LIST_SURFACE), LOAD_COLLISION_DATA(poundable_pole_collision_06002490), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_INT(oNumLootCoins, 5), DROP_TO_FLOOR(), SET_HOME(), - SCALE(50), + SCALE(/*Unused*/ 0, /*Field*/ 50), BEGIN_LOOP(), CALL_NATIVE(bhv_wooden_post_update), CALL_NATIVE(load_object_collision_model), @@ -5213,9 +5248,9 @@ const BehaviorScript bhvWigglerHead[] = { DROP_TO_FLOOR(), LOAD_ANIMATIONS(oAnimations, wiggler_seg5_anims_0500EC8C), SET_HOME(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 60, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 60, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), HIDE(), - SCALE(400), + SCALE(/*Unused*/ 0, /*Field*/ 400), SET_FLOAT(oWigglerFallThroughFloorsHeight, 5000), BEGIN_LOOP(), CALL_NATIVE(bhv_wiggler_update), @@ -5226,8 +5261,8 @@ const BehaviorScript bhvWigglerBody[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), LOAD_ANIMATIONS(oAnimations, wiggler_seg5_anims_0500C874), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), - SCALE(400), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SCALE(/*Unused*/ 0, /*Field*/ 400), BEGIN_LOOP(), CALL_NATIVE(bhv_wiggler_body_part_update), END_LOOP(), @@ -5239,7 +5274,7 @@ const BehaviorScript bhvEnemyLakitu[] = { LOAD_ANIMATIONS(oAnimations, lakitu_enemy_seg5_anims_050144D4), ANIMATE(0), SET_HOME(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 40, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 40, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_enemy_lakitu_update), END_LOOP(), @@ -5282,7 +5317,7 @@ const BehaviorScript bhvSpiny[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_ANIMATIONS(oAnimations, spiny_seg5_anims_05016EAC), ANIMATE(0), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 40, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 40, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_spiny_update), END_LOOP(), @@ -5294,11 +5329,11 @@ const BehaviorScript bhvMontyMole[] = { DROP_TO_FLOOR(), LOAD_ANIMATIONS(oAnimations, monty_mole_seg5_anims_05007248), ANIMATE(3), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), HIDE(), SET_INT(oIntangibleTimer, -1), SET_FLOAT(oGraphYOffset, -60), - SCALE(150), + SCALE(/*Unused*/ 0, /*Field*/ 150), DELAY(1), CALL_NATIVE(bhv_monty_mole_init), BEGIN_LOOP(), @@ -5310,7 +5345,7 @@ const BehaviorScript bhvMontyMoleHole[] = { BEGIN(OBJ_LIST_DEFAULT), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), DROP_TO_FLOOR(), - SCALE(150), + SCALE(/*Unused*/ 0, /*Field*/ 150), BEGIN_LOOP(), CALL_NATIVE(bhv_monty_mole_hole_update), END_LOOP(), @@ -5320,9 +5355,9 @@ const BehaviorScript bhvMontyMoleRock[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), BILLBOARD(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_FLOAT(oGraphYOffset, 10), - SCALE(200), + SCALE(/*Unused*/ 0, /*Field*/ 200), BEGIN_LOOP(), CALL_NATIVE(bhv_monty_mole_rock_update), END_LOOP(), @@ -5331,7 +5366,7 @@ const BehaviorScript bhvMontyMoleRock[] = { const BehaviorScript bhvPlatformOnTrack[] = { BEGIN(OBJ_LIST_SURFACE), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 50, /*Gravity*/ -100, /*Bounciness*/ -50, /*Drag*/ 100, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 50, /*Gravity*/ -100, /*Bounciness*/ -50, /*Drag strength*/ 100, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), CALL_NATIVE(bhv_init_room), CALL_NATIVE(bhv_platform_on_track_init), BEGIN_LOOP(), @@ -5345,7 +5380,7 @@ const BehaviorScript bhvTrackBall[] = { OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), BILLBOARD(), CALL_NATIVE(bhv_init_room), - SCALE(15), + SCALE(/*Unused*/ 0, /*Field*/ 15), BEGIN_LOOP(), CALL_NATIVE(bhv_track_ball_update), END_LOOP(), @@ -5393,7 +5428,7 @@ const BehaviorScript bhvWaterBombSpawner[] = { const BehaviorScript bhvWaterBomb[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 120, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 120, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_water_bomb_update), END_LOOP(), @@ -5402,7 +5437,7 @@ const BehaviorScript bhvWaterBomb[] = { const BehaviorScript bhvWaterBombShadow[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), - SCALE(150), + SCALE(/*Unused*/ 0, /*Field*/ 150), BEGIN_LOOP(), CALL_NATIVE(bhv_water_bomb_shadow_update), END_LOOP(), @@ -5526,7 +5561,7 @@ const BehaviorScript bhvMrBlizzard[] = { LOAD_ANIMATIONS(oAnimations, snowman_seg5_anims_0500D118), ANIMATE(0), SET_HOME(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), CALL_NATIVE(bhv_mr_blizzard_init), SET_FLOAT(oMrBlizzardUnkF4, 1), BEGIN_LOOP(), @@ -5538,8 +5573,8 @@ const BehaviorScript bhvMrBlizzardSnowball[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), BILLBOARD(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -300, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), - SCALE(200), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ -300, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SCALE(/*Unused*/ 0, /*Field*/ 200), ADD_INT(oMoveAngleYaw, -0x5B58), SET_FLOAT(oForwardVel, 5), SET_FLOAT(oVelY, -1), @@ -5622,7 +5657,7 @@ const BehaviorScript bhvUnagi[] = { LOAD_ANIMATIONS(oAnimations, unagi_seg5_anims_05012824), ANIMATE(6), SET_HOME(), - SCALE(300), + SCALE(/*Unused*/ 0, /*Field*/ 300), SET_FLOAT(oDrawingDistance, 6000), CALL_NATIVE(bhv_unagi_init), BEGIN_LOOP(), @@ -5659,7 +5694,7 @@ const BehaviorScript bhvHauntedChair[] = { DROP_TO_FLOOR(), LOAD_ANIMATIONS(oAnimations, chair_seg5_anims_05005784), ANIMATE(0), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 40, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 40, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_HOME(), CALL_NATIVE(bhv_init_room), CALL_NATIVE(bhv_haunted_chair_init), @@ -5673,7 +5708,7 @@ const BehaviorScript bhvMadPiano[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), DROP_TO_FLOOR(), LOAD_ANIMATIONS(oAnimations, mad_piano_seg5_anims_05009B14), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 40, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 40, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_HOME(), ADD_INT(oMoveAngleYaw, 0x4000), CALL_NATIVE(bhv_init_room), @@ -5687,9 +5722,9 @@ const BehaviorScript bhvFlyingBookend[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_ANIMATIONS(oAnimations, bookend_seg5_anims_05002540), ANIMATE(0), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 60, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 60, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_INT(oMoveFlags, 0), - SCALE(70), + SCALE(/*Unused*/ 0, /*Field*/ 70), CALL_NATIVE(bhv_init_room), BEGIN_LOOP(), CALL_NATIVE(bhv_flying_bookend_loop), @@ -5744,7 +5779,7 @@ const BehaviorScript bhvSmallPiranhaFlame[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), BILLBOARD(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_small_piranha_flame_loop), ADD_INT(oAnimState, 1), @@ -5755,7 +5790,7 @@ const BehaviorScript bhvFireSpitter[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), BILLBOARD(), - SCALE(40), + SCALE(/*Unused*/ 0, /*Field*/ 40), BEGIN_LOOP(), CALL_NATIVE(bhv_fire_spitter_update), END_LOOP(), @@ -5765,7 +5800,7 @@ const BehaviorScript bhvFlyguyFlame[] = { BEGIN(OBJ_LIST_UNIMPORTANT), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), BILLBOARD(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ 200, /*Bounciness*/ 0, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ 200, /*Bounciness*/ 0, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_fly_guy_flame_loop), ADD_INT(oAnimState, 1), @@ -5776,7 +5811,7 @@ const BehaviorScript bhvSnufit[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), SET_HOME(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 30, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0), CALL_NATIVE(bhv_init_room), BEGIN_LOOP(), SET_INT(oSnufitRecoil, 0), @@ -5788,10 +5823,10 @@ const BehaviorScript bhvSnufitBalls[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), BILLBOARD(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 10, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 10, /*Gravity*/ 0, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), CALL_NATIVE(bhv_init_room), SET_FLOAT(oGraphYOffset, 10), - SCALE(10), + SCALE(/*Unused*/ 0, /*Field*/ 10), BEGIN_LOOP(), CALL_NATIVE(bhv_snufit_balls_loop), END_LOOP(), @@ -5803,8 +5838,8 @@ const BehaviorScript bhvHorizontalGrindel[] = { OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), DROP_TO_FLOOR(), SET_HOME(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 40, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), - SCALE(90), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 40, /*Gravity*/ -400, /*Bounciness*/ 0, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SCALE(/*Unused*/ 0, /*Field*/ 90), CALL_NATIVE(bhv_horizontal_grindel_init), BEGIN_LOOP(), CALL_NATIVE(cur_obj_update_floor_and_walls), @@ -5827,7 +5862,7 @@ const BehaviorScript bhvEyerokHand[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_ANIMATIONS(oAnimations, eyerok_seg5_anims_050116E4), ANIMATE(6), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 150, /*Gravity*/ 0, /*Bounciness*/ 0, /*Drag*/ 0, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 150, /*Gravity*/ 0, /*Bounciness*/ 0, /*Drag strength*/ 0, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_HOME(), SET_INT(oAnimState, 3), BEGIN_LOOP(), @@ -5840,7 +5875,7 @@ const BehaviorScript bhvKlepto[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_ACTIVE_FROM_AFAR | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_ANIMATIONS(oAnimations, klepto_seg5_anims_05008CFC), ANIMATE(0), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 100, /*Gravity*/ 0, /*Bounciness*/ -20, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 100, /*Gravity*/ 0, /*Bounciness*/ -20, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_HOME(), CALL_NATIVE(bhv_klepto_init), BEGIN_LOOP(), @@ -5854,7 +5889,7 @@ const BehaviorScript bhvBird[] = { LOAD_ANIMATIONS(oAnimations, birds_seg5_anims_050009E8), ANIMATE(0), HIDE(), - SCALE(70), + SCALE(/*Unused*/ 0, /*Field*/ 70), BEGIN_LOOP(), CALL_NATIVE(bhv_bird_update), END_LOOP(), @@ -5865,8 +5900,8 @@ const BehaviorScript bhvRacingPenguin[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_ACTIVE_FROM_AFAR | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_ANIMATIONS(oAnimations, penguin_seg5_anims_05008B74), ANIMATE(3), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 300, /*Gravity*/ -800, /*Bounciness*/ -5, /*Drag*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0), - SCALE(400), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 300, /*Gravity*/ -800, /*Bounciness*/ -5, /*Drag strength*/ 0, /*Friction*/ 0, /*Buoyancy*/ 0, /*Unused*/ 0, 0), + SCALE(/*Unused*/ 0, /*Field*/ 400), CALL_NATIVE(bhv_racing_penguin_init), BEGIN_LOOP(), CALL_NATIVE(bhv_racing_penguin_update), @@ -5925,7 +5960,7 @@ const BehaviorScript bhvSkeeter[] = { OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_ANIMATIONS(oAnimations, skeeter_seg6_anims_06007DE0), SET_HOME(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 180, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 1200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 180, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 1200, /*Unused*/ 0, 0), BEGIN_LOOP(), CALL_NATIVE(bhv_skeeter_update), END_LOOP(), @@ -5988,7 +6023,7 @@ const BehaviorScript bhvRedCoinStarMarker[] = { BEGIN(OBJ_LIST_DEFAULT), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), DROP_TO_FLOOR(), - SCALE(150), + SCALE(/*Unused*/ 0, /*Field*/ 150), SET_INT(oFaceAnglePitch, 0x4000), ADD_FLOAT(oPosY, 60), CALL_NATIVE(bhv_red_coin_star_marker_init), @@ -6004,7 +6039,7 @@ const BehaviorScript bhvTripletButterfly[] = { ANIMATE(0), HIDE(), SET_HOME(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ 0, /*Bounciness*/ 0, /*Drag*/ 0, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ 0, /*Bounciness*/ 0, /*Drag strength*/ 0, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_FLOAT(oTripletButterflyScale, 1), BEGIN_LOOP(), CALL_NATIVE(bhv_triplet_butterfly_update), @@ -6015,8 +6050,8 @@ const BehaviorScript bhvBubba[] = { BEGIN(OBJ_LIST_GENACTOR), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), SET_HOME(), - SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 200, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 0, /*Unused*/ 0, 0), - SCALE(50), + SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 200, /*Gravity*/ -400, /*Bounciness*/ -50, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 0, /*Unused*/ 0, 0), + SCALE(/*Unused*/ 0, /*Field*/ 50), BEGIN_LOOP(), CALL_NATIVE(bhv_bubba_loop), END_LOOP(), @@ -6045,7 +6080,7 @@ const BehaviorScript bhvBeginningPeach[] = { const BehaviorScript bhvEndBirds1[] = { BEGIN(OBJ_LIST_DEFAULT), - OR_INT(oFlags, (OBJ_FLAG_0010 | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), + OR_INT(oFlags, (OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_ANIMATIONS(oAnimations, birds_seg5_anims_050009E8), ANIMATE(0), BEGIN_LOOP(), @@ -6055,7 +6090,7 @@ const BehaviorScript bhvEndBirds1[] = { const BehaviorScript bhvEndBirds2[] = { BEGIN(OBJ_LIST_DEFAULT), - OR_INT(oFlags, (OBJ_FLAG_0010 | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), + OR_INT(oFlags, (OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), LOAD_ANIMATIONS(oAnimations, birds_seg5_anims_050009E8), ANIMATE(0), BEGIN_LOOP(), diff --git a/diff.py b/diff.py index d97ad361..6bafc0f6 100755 --- a/diff.py +++ b/diff.py @@ -50,7 +50,7 @@ parser.add_argument('-m', '--make', dest='make', action='store_true', help="Automatically run 'make' on the .o file or binary before diffing.") parser.add_argument('-l', '--skip-lines', dest='skip_lines', type=int, default=0, help="Skip the first N lines of output.") -parser.add_argument('-s', '--stop-jr-ra', dest='stop_jrra', action='store_true', +parser.add_argument('-f', '--stop-jr-ra', dest='stop_jrra', action='store_true', help="Stop disassembling at the first 'jr ra'. Some functions have multiple return points, so use with care!") parser.add_argument('-i', '--ignore-large-imms', dest='ignore_large_imms', action='store_true', help="Pretend all large enough immediates are the same.") diff --git a/diff_settings.py b/diff_settings.py index dffcf038..c1cd3a5f 100644 --- a/diff_settings.py +++ b/diff_settings.py @@ -8,6 +8,8 @@ def add_custom_arguments(parser): help="Set version to US.") group.add_argument('-e', dest='lang', action='store_const', const='eu', help="Set version to EU.") + group.add_argument('-s', dest='lang', action='store_const', const='sh', + help="Set version to SH.") def apply(config, args): lang = args.lang or 'us' diff --git a/enhancements/debug_box.patch b/enhancements/debug_box.patch index 4fba40ec..e02bbf43 100644 --- a/enhancements/debug_box.patch +++ b/enhancements/debug_box.patch @@ -2,15 +2,16 @@ diff --git a/src/game/area.c b/src/game/area.c index 240605d8..88c1a314 100644 --- a/src/game/area.c +++ b/src/game/area.c -@@ -19,6 +19,7 @@ +@@ -19,7 +19,8 @@ #include "level_update.h" #include "engine/geo_layout.h" #include "save_file.h" + #include "level_table.h" +#include "debug_box.h" struct SpawnInfo gPlayerSpawnInfos[1]; struct GraphNode *D_8033A160[0x100]; -@@ -352,6 +353,8 @@ void render_game(void) { +@@ -353,6 +354,8 @@ void render_game(void) { if (gCurrentArea != NULL && !gWarpTransition.pauseRendering) { geo_process_root(gCurrentArea->unk04, D_8032CE74, D_8032CE78, gFBSetColor); @@ -28,7 +29,7 @@ index 00000000..0ee87ec7 +#include + +#include "sm64.h" -+#include "game/game.h" ++#include "game/game_init.h" +#include "game/geo_misc.h" +#include "engine/math_util.h" + diff --git a/enhancements/fps.patch b/enhancements/fps.patch index 43de4a08..9e28d22a 100644 --- a/enhancements/fps.patch +++ b/enhancements/fps.patch @@ -1,8 +1,8 @@ -diff --git a/src/game/game.c b/src/game/game.c -index ad800839..4a37549b 100644 ---- a/src/game/game.c -+++ b/src/game/game.c -@@ -52,6 +52,47 @@ struct DemoInput *gCurrDemoInput = NULL; // demo input sequence +diff --git a/src/game/game_init.c b/src/game/game_init.c +index 0852a141..18c5e8fe 100644 +--- a/src/game/game_init.c ++++ b/src/game/game_init.c +@@ -56,6 +56,47 @@ struct DemoInput *gCurrDemoInput = NULL; // demo input sequence u16 gDemoInputListID = 0; struct DemoInput gRecordedDemoInput = { 0 }; // possibly removed in EU. TODO: Check @@ -47,10 +47,10 @@ index ad800839..4a37549b 100644 + } +} + - // this function records distinct inputs over a 255-frame interval to RAM locations and was likely - // used to record the demo sequences seen in the final game. This function is unused. - static void record_demo(void) { -@@ -334,5 +375,7 @@ void thread5_game_loop(UNUSED void *arg) { + /** + * Initializes the Reality Display Processor (RDP). + * This function initializes settings such as texture filtering mode, +@@ -614,5 +655,7 @@ void thread5_game_loop(UNUSED void *arg) { // amount of free space remaining. print_text_fmt_int(180, 20, "BUF %d", gGfxPoolEnd - (u8 *) gDisplayListHead); } diff --git a/enhancements/mem_error_screen.patch b/enhancements/mem_error_screen.patch index 6429a674..87d995d6 100644 --- a/enhancements/mem_error_screen.patch +++ b/enhancements/mem_error_screen.patch @@ -1,8 +1,8 @@ diff --git a/Makefile b/Makefile -index 26c76d3d..bfc8bb18 100644 +index 88c8dbbe..f60df04f 100644 --- a/Makefile +++ b/Makefile -@@ -341,6 +341,7 @@ $(BUILD_DIR)/include/text_strings.h: $(BUILD_DIR)/include/text_menu_strings.h +@@ -382,6 +382,7 @@ $(BUILD_DIR)/include/text_strings.h: $(BUILD_DIR)/include/text_menu_strings.h $(BUILD_DIR)/src/menu/file_select.o: $(BUILD_DIR)/include/text_strings.h $(BUILD_DIR)/src/menu/star_select.o: $(BUILD_DIR)/include/text_strings.h $(BUILD_DIR)/src/game/ingame_menu.o: $(BUILD_DIR)/include/text_strings.h @@ -11,7 +11,7 @@ index 26c76d3d..bfc8bb18 100644 ################################################################ # TEXTURE GENERATION # diff --git a/include/segments.h b/include/segments.h -index ccc989aa..e54c3eab 100644 +index c98040a8..eeecb4f6 100644 --- a/include/segments.h +++ b/include/segments.h @@ -1,6 +1,9 @@ @@ -25,7 +25,7 @@ index ccc989aa..e54c3eab 100644 * Memory addresses for segments. Ideally, this header file would not be * needed, and the addresses would be defined in sm64.ld and linker-inserted diff --git a/include/text_strings.h.in b/include/text_strings.h.in -index 2fda11d7..8ba0a1c9 100644 +index 4e36eb96..7aadf0cb 100644 --- a/include/text_strings.h.in +++ b/include/text_strings.h.in @@ -25,6 +25,11 @@ @@ -58,10 +58,10 @@ index 015eeb6b..cc010ca1 100644 + JUMP(/*target*/ level_script_entry_error_screen), +}; diff --git a/levels/intro/geo.c b/levels/intro/geo.c -index 7fbee0c5..e7effd85 100644 +index 8ac70024..72766f3f 100644 --- a/levels/intro/geo.c +++ b/levels/intro/geo.c -@@ -13,6 +13,24 @@ +@@ -15,6 +15,24 @@ #include "levels/intro/header.h" @@ -100,7 +100,7 @@ index e0f6292d..8f77fb26 100644 + #endif diff --git a/levels/intro/script.c b/levels/intro/script.c -index 3ffd7859..b8c3ae41 100644 +index 4975dbb2..5ee6c688 100644 --- a/levels/intro/script.c +++ b/levels/intro/script.c @@ -18,6 +18,21 @@ @@ -137,18 +137,18 @@ index 89bfb4ed..0ea607c5 100644 #endif /* _LEVEL_SCRIPT_H */ diff --git a/src/game/main.c b/src/game/main.c -index f677f6f9..a164beb1 100644 +index a3afffee..8b05fcf1 100644 --- a/src/game/main.c +++ b/src/game/main.c @@ -12,6 +12,7 @@ - #include "buffers/buffers.h" #include "segments.h" #include "main.h" + #include "thread6.h" +#include "mem_error_screen.h" // Message IDs #define MESG_SP_COMPLETE 100 -@@ -125,6 +126,10 @@ void AllocPool(void) { +@@ -125,6 +126,10 @@ void alloc_pool(void) { void *start = (void *) SEG_POOL_START; void *end = (void *) SEG_POOL_END; @@ -159,7 +159,7 @@ index f677f6f9..a164beb1 100644 main_pool_init(start, end); gEffectsMemoryPool = mem_pool_init(0x4000, MEMORY_POOL_LEFT); } -@@ -314,7 +319,10 @@ void thread3_main(UNUSED void *arg) { +@@ -330,7 +335,10 @@ void thread3_main(UNUSED void *arg) { create_thread(&gSoundThread, 4, thread4_sound, NULL, gThread4Stack + 0x2000, 20); osStartThread(&gSoundThread); @@ -173,10 +173,10 @@ index f677f6f9..a164beb1 100644 while (1) { diff --git a/src/game/mem_error_screen.c b/src/game/mem_error_screen.c new file mode 100644 -index 00000000..20eeef8f +index 00000000..81efaf91 --- /dev/null +++ b/src/game/mem_error_screen.c -@@ -0,0 +1,105 @@ +@@ -0,0 +1,104 @@ +/* clang-format off */ +/* + * mem_error_screen.inc.c @@ -189,9 +189,8 @@ index 00000000..20eeef8f +#include +#include "segments.h" +#include "text_strings.h" -+#include "game.h" ++#include "game_init.h" +#include "main.h" -+#include "display.h" +#include "print.h" +#include "ingame_menu.h" +#include "segment2.h" @@ -282,6 +281,7 @@ index 00000000..20eeef8f + display_and_vsync(); + } +} +\ No newline at end of file diff --git a/src/game/mem_error_screen.h b/src/game/mem_error_screen.h new file mode 100644 index 00000000..9fbff34c diff --git a/enhancements/record_demo.patch b/enhancements/record_demo.patch index f7edd5f3..b1c970b1 100644 --- a/enhancements/record_demo.patch +++ b/enhancements/record_demo.patch @@ -1,10 +1,10 @@ -diff --git a/src/game/game.c b/src/game/game.c -index ad800839..810e2ba3 100644 ---- a/src/game/game.c -+++ b/src/game/game.c -@@ -52,6 +52,45 @@ struct DemoInput *gCurrDemoInput = NULL; // demo input sequence - u16 gDemoInputListID = 0; - struct DemoInput gRecordedDemoInput = { 0 }; // possibly removed in EU. TODO: Check +diff --git a/src/game/game_init.c b/src/game/game_init.c +index 0852a141..004941d8 100644 +--- a/src/game/game_init.c ++++ b/src/game/game_init.c +@@ -332,6 +332,45 @@ void display_and_vsync(void) { + gGlobalTimer++; + } +/* + * This enhancement allows you to record gameplay demos for the mario head screen. @@ -48,7 +48,7 @@ index ad800839..810e2ba3 100644 // this function records distinct inputs over a 255-frame interval to RAM locations and was likely // used to record the demo sequences seen in the final game. This function is unused. static void record_demo(void) { -@@ -85,6 +124,118 @@ static void record_demo(void) { +@@ -365,6 +404,118 @@ static void record_demo(void) { gRecordedDemoInput.timer++; } @@ -167,9 +167,9 @@ index ad800839..810e2ba3 100644 // take the updated controller struct and calculate // the new x, y, and distance floats. void adjust_analog_stick(struct Controller *controller) { -@@ -325,6 +476,7 @@ void thread5_game_loop(UNUSED void *arg) { +@@ -605,6 +756,7 @@ void thread5_game_loop(UNUSED void *arg) { audio_game_loop_tick(); - func_80247FAC(); + config_gfx_pool(); read_controller_inputs(); + recordingDemo(); addr = level_script_execute(addr); diff --git a/extract_assets.py b/extract_assets.py index c83d3bf6..b13bd6ed 100755 --- a/extract_assets.py +++ b/extract_assets.py @@ -74,7 +74,7 @@ def main(): clean_assets(local_asset_file) sys.exit(0) - all_langs = ["jp", "us", "eu"] + all_langs = ["jp", "us", "eu", "sh"] if not langs or not all(a in all_langs for a in langs): langs_str = " ".join("[" + lang + "]" for lang in all_langs) print("Usage: " + sys.argv[0] + " " + langs_str) diff --git a/first-diff.py b/first-diff.py index 4840e2a8..f47d2ff5 100755 --- a/first-diff.py +++ b/first-diff.py @@ -13,13 +13,15 @@ for arg in sys.argv[1:]: lang = 'us' elif arg == '-e': lang = 'eu' + elif arg == '-s': + lang = 'sh' else: args.append(arg) if lang is None: lang = 'us' best = 0 - for path in ['build/us/sm64.us.z64', 'build/jp/sm64.jp.z64', 'build/eu/sm64.eu.z64']: + for path in ['build/us/sm64.us.z64', 'build/jp/sm64.jp.z64', 'build/eu/sm64.eu.z64', 'build/sh/sm64.sh.z64']: try: mtime = os.path.getmtime(path) if mtime > best: @@ -187,7 +189,7 @@ if diffs > 100: i = found_instr_diff print("First instruction difference at ROM addr " + hex(i) + ", " + search_map(i)) print("Bytes:", hexbytes(mybin[i:i+4]), 'vs', hexbytes(basebin[i:i+4])) - if lang == 'eu': + if lang == 'sh': print("Shifted ROM, as expected.") else: if not os.path.isfile(basemap): diff --git a/include/behavior_data.h b/include/behavior_data.h index 3334adf5..19802282 100644 --- a/include/behavior_data.h +++ b/include/behavior_data.h @@ -18,13 +18,13 @@ extern const BehaviorScript bhvKingBobomb[]; extern const BehaviorScript bhvBobombAnchorMario[]; extern const BehaviorScript bhvBetaChestBottom[]; extern const BehaviorScript bhvBetaChestLid[]; -extern const BehaviorScript bhvBubbleMario[]; +extern const BehaviorScript bhvBubbleParticleSpawner[]; extern const BehaviorScript bhvBubbleMaybe[]; extern const BehaviorScript bhvSmallWaterWave[]; extern const BehaviorScript bhvSmallWaterWave398[]; extern const BehaviorScript bhvWaterAirBubble[]; extern const BehaviorScript bhvSmallParticle[]; -extern const BehaviorScript bhvWaterWaves[]; +extern const BehaviorScript bhvPlungeBubble[]; extern const BehaviorScript bhvSmallParticleSnow[]; extern const BehaviorScript bhvSmallParticleBubbles[]; extern const BehaviorScript bhvFishGroup[]; @@ -64,11 +64,11 @@ extern const BehaviorScript bhvSingleCoinGetsSpawned[]; extern const BehaviorScript bhvCoinSparkles[]; extern const BehaviorScript bhvGoldenCoinSparkles[]; extern const BehaviorScript bhvWallTinyStarParticle[]; -extern const BehaviorScript bhvWallTinyStarParticleSpawn[]; +extern const BehaviorScript bhvVertStarParticleSpawner[]; extern const BehaviorScript bhvPoundTinyStarParticle[]; -extern const BehaviorScript bhvPoundTinyStarParticleSpawn[]; +extern const BehaviorScript bhvHorStarParticleSpawner[]; extern const BehaviorScript bhvPunchTinyTriangle[]; -extern const BehaviorScript bhvPunchTinyTriangleSpawn[]; +extern const BehaviorScript bhvTriangleParticleSpawner[]; extern const BehaviorScript bhvDoorWarp[]; extern const BehaviorScript bhvDoor[]; extern const BehaviorScript bhvGrindel[]; @@ -83,14 +83,14 @@ extern const BehaviorScript bhvAnotherElavator[]; extern const BehaviorScript bhvRrElevatorPlatform[]; extern const BehaviorScript bhvHmcElevatorPlatform[]; extern const BehaviorScript bhvWaterMist[]; -extern const BehaviorScript bhvWaterMistSpawn[]; +extern const BehaviorScript bhvBreathParticleSpawner[]; extern const BehaviorScript bhvBreakBoxTriangle[]; extern const BehaviorScript bhvWaterMist2[]; extern const BehaviorScript bhvUnused0DFC[]; -extern const BehaviorScript bhvPoundWhitePuffs[]; -extern const BehaviorScript bhvGroundSand[]; +extern const BehaviorScript bhvMistCircParticleSpawner[]; +extern const BehaviorScript bhvDirtParticleSpawner[]; extern const BehaviorScript bhvUnused0E40[]; -extern const BehaviorScript bhvGroundSnow[]; +extern const BehaviorScript bhvSnowParticleSpawner[]; extern const BehaviorScript bhvWind[]; extern const BehaviorScript bhvEndToad[]; extern const BehaviorScript bhvEndPeach[]; @@ -113,7 +113,7 @@ extern const BehaviorScript bhvFlamethrowerFlame[]; extern const BehaviorScript bhvBouncingFireball[]; extern const BehaviorScript bhvBouncingFireballFlame[]; extern const BehaviorScript bhvBowserShockWave[]; -extern const BehaviorScript bhvFlameMario[]; +extern const BehaviorScript bhvFireParticleSpawner[]; extern const BehaviorScript bhvBlackSmokeMario[]; extern const BehaviorScript bhvBlackSmokeBowser[]; extern const BehaviorScript bhvBlackSmokeUpward[]; @@ -123,7 +123,7 @@ extern const BehaviorScript bhvTowerPlatformGroup[]; extern const BehaviorScript bhvWfSlidingTowerPlatform[]; extern const BehaviorScript bhvWfElevatorTowerPlatform[]; extern const BehaviorScript bhvWfSolidTowerPlatform[]; -extern const BehaviorScript bhvSnowLeafParticleSpawn[]; +extern const BehaviorScript bhvLeafParticleSpawner[]; extern const BehaviorScript bhvTreeSnow[]; extern const BehaviorScript bhvTreeLeaf[]; extern const BehaviorScript bhvAnotherTiltingPlatform[]; @@ -235,7 +235,7 @@ extern const BehaviorScript bhvUnused243C[]; extern const BehaviorScript bhvSunkenShipPart2[]; extern const BehaviorScript bhvInSunkenShip[]; extern const BehaviorScript bhvInSunkenShip2[]; -extern const BehaviorScript bhvMarioDustGenerator[]; +extern const BehaviorScript bhvMistParticleSpawner[]; extern const BehaviorScript bhvWhitePuff1[]; extern const BehaviorScript bhvWhitePuff2[]; extern const BehaviorScript bhvWhitePuffSmoke2[]; @@ -278,7 +278,7 @@ extern const BehaviorScript bhvFloorTrapInCastle[]; extern const BehaviorScript bhvTree[]; extern const BehaviorScript bhvSparkle[]; extern const BehaviorScript bhvSparkleSpawn[]; -extern const BehaviorScript bhvSpecialTripleJumpSparkles[]; +extern const BehaviorScript bhvSparkleParticleSpawner[]; extern const BehaviorScript bhvSomeGfx[]; extern const BehaviorScript bhvScuttlebug[]; extern const BehaviorScript bhvScuttlebugSpawn[]; @@ -306,11 +306,11 @@ extern const BehaviorScript bhvWarps60[]; extern const BehaviorScript bhvWarps64[]; extern const BehaviorScript bhvWarps68[]; extern const BehaviorScript bhvWarps6C[]; -extern const BehaviorScript bhvWarps70[]; +extern const BehaviorScript bhvDeathWarp[]; extern const BehaviorScript bhvWarps74[]; extern const BehaviorScript bhvWarps78[]; extern const BehaviorScript bhvWarps7C[]; -extern const BehaviorScript bhvWarps80[]; +extern const BehaviorScript bhvPaintingDeathWarp[]; extern const BehaviorScript bhvWarps84[]; extern const BehaviorScript bhvWarps88[]; extern const BehaviorScript bhvWarps8C[]; diff --git a/include/config.h b/include/config.h index cb6449f6..64097458 100644 --- a/include/config.h +++ b/include/config.h @@ -10,16 +10,16 @@ // Bug Fixes // --| US Version Nintendo Bug Fixes /// Fixes bug where obtaining over 999 coins sets the number of lives to 999 (or -25) -#define BUGFIX_MAX_LIVES (0 || VERSION_US || VERSION_EU) +#define BUGFIX_MAX_LIVES (0 || VERSION_US || VERSION_EU || VERSION_SH) /// Fixes bug where the Boss music won't fade out after defeating King Bob-omb #define BUGFIX_KING_BOB_OMB_FADE_MUSIC (0 || VERSION_US || VERSION_EU) /// Fixes bug in Bob-Omb Battlefield where entering a warp stops the Koopa race music -#define BUGFIX_KOOPA_RACE_MUSIC (0 || VERSION_US || VERSION_EU) +#define BUGFIX_KOOPA_RACE_MUSIC (0 || VERSION_US || VERSION_EU || VERSION_SH) /// Fixes bug where Piranha Plants do not reset their action state when the /// player exits their activation radius. -#define BUGFIX_PIRANHA_PLANT_STATE_RESET (0 || VERSION_US || VERSION_EU) +#define BUGFIX_PIRANHA_PLANT_STATE_RESET (0 || VERSION_US || VERSION_EU || VERSION_SH) /// Fixes bug where sleeping Piranha Plants damage players that bump into them -#define BUGFIX_PIRANHA_PLANT_SLEEP_DAMAGE (0 || VERSION_US) +#define BUGFIX_PIRANHA_PLANT_SLEEP_DAMAGE (0 || VERSION_US || VERSION_SH) /// Fixes bug where it shows a star when you grab a key in bowser battle stages #define BUGFIX_STAR_BOWSER_KEY (0 || VERSION_US || VERSION_EU) diff --git a/include/geo_commands.h b/include/geo_commands.h index c83d043e..33f2b7eb 100644 --- a/include/geo_commands.h +++ b/include/geo_commands.h @@ -5,7 +5,6 @@ #include "game/shadow.h" #include "game/object_helpers.h" -#include "game/object_helpers2.h" #include "game/behavior_actions.h" #include "game/segment2.h" #include "game/mario_misc.h" diff --git a/include/macro_presets.h b/include/macro_presets.h index f8f5f6b2..bb123e59 100644 --- a/include/macro_presets.h +++ b/include/macro_presets.h @@ -7,7 +7,7 @@ struct MacroPreset { - /*0x00*/ const BehaviorScript *beh; + /*0x00*/ const BehaviorScript *behavior; /*0x04*/ s16 model; /*0x06*/ s16 param; }; diff --git a/include/macros.h b/include/macros.h index 87daedd3..c6a8a054 100644 --- a/include/macros.h +++ b/include/macros.h @@ -3,6 +3,10 @@ #include "platform_info.h" +#ifndef __sgi +#define GLOBAL_ASM(...) +#endif + #if !defined(__sgi) && (!defined(NON_MATCHING) || !defined(AVOID_UB)) // asm-process isn't supported outside of IDO, and undefined behavior causes // crashes. diff --git a/include/make_const_nonconst.h b/include/make_const_nonconst.h index c6a0c252..6336ec34 100644 --- a/include/make_const_nonconst.h +++ b/include/make_const_nonconst.h @@ -1,9 +1,10 @@ #ifndef MAKE_CONST_NONCONST_H #define MAKE_CONST_NONCONST_H -#ifdef __sgi +#ifdef TARGET_N64 // IDO sometimes puts const variables in .rodata and sometimes in .data, which breaks ordering. -// This makes sure all variables are put into the same section (.data). +// This makes sure all variables are put into the same section (.data). We need to do this for +// both IDO and gcc for TARGET_N64. #define const #endif diff --git a/include/object_constants.h b/include/object_constants.h index b828b6eb..9e7623a9 100644 --- a/include/object_constants.h +++ b/include/object_constants.h @@ -32,14 +32,14 @@ #define OBJ_FLAG_MOVE_XZ_USING_FVEL (1 << 1) // 0x00000002 #define OBJ_FLAG_MOVE_Y_WITH_TERMINAL_VEL (1 << 2) // 0x00000004 #define OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW (1 << 3) // 0x00000008 -#define OBJ_FLAG_0010 (1 << 4) // 0x00000010 +#define OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE (1 << 4) // 0x00000010 #define OBJ_FLAG_0020 (1 << 5) // 0x00000020 #define OBJ_FLAG_COMPUTE_DIST_TO_MARIO (1 << 6) // 0x00000040 #define OBJ_FLAG_ACTIVE_FROM_AFAR (1 << 7) // 0x00000080 #define OBJ_FLAG_0100 (1 << 8) // 0x00000100 #define OBJ_FLAG_TRANSFORM_RELATIVE_TO_PARENT (1 << 9) // 0x00000200 #define OBJ_FLAG_HOLDABLE (1 << 10) // 0x00000400 -#define OBJ_FLAG_0800 (1 << 11) // 0x00000800 +#define OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM (1 << 11) // 0x00000800 #define OBJ_FLAG_1000 (1 << 12) // 0x00001000 #define OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO (1 << 13) // 0x00002000 #define OBJ_FLAG_PERSISTENT_RESPAWN (1 << 14) // 0x00004000 @@ -106,26 +106,26 @@ OBJ_MOVE_UNDERWATER_ON_GROUND) /* oActiveParticleFlags */ -#define ACTIVE_PARTICLE_0 (1 << 0) // 0x00000001 +#define ACTIVE_PARTICLE_DUST (1 << 0) // 0x00000001 #define ACTIVE_PARTICLE_UNUSED_1 (1 << 1) // 0x00000002 #define ACTIVE_PARTICLE_UNUSED_2 (1 << 2) // 0x00000004 -#define ACTIVE_PARTICLE_3 (1 << 3) // 0x00000008 -#define ACTIVE_PARTICLE_4 (1 << 4) // 0x00000010 -#define ACTIVE_PARTICLE_5 (1 << 5) // 0x00000020 -#define ACTIVE_PARTICLE_6 (1 << 6) // 0x00000040 +#define ACTIVE_PARTICLE_SPARKLES (1 << 3) // 0x00000008 +#define ACTIVE_PARTICLE_H_STAR (1 << 4) // 0x00000010 +#define ACTIVE_PARTICLE_BUBBLE (1 << 5) // 0x00000020 +#define ACTIVE_PARTICLE_WATER_SPLASH (1 << 6) // 0x00000040 #define ACTIVE_PARTICLE_IDLE_WATER_WAVE (1 << 7) // 0x00000080 #define ACTIVE_PARTICLE_SHALLOW_WATER_WAVE (1 << 8) // 0x00000100 -#define ACTIVE_PARTICLE_9 (1 << 9) // 0x00000200 +#define ACTIVE_PARTICLE_PLUNGE_BUBBLE (1 << 9) // 0x00000200 #define ACTIVE_PARTICLE_WAVE_TRAIL (1 << 10) // 0x00000400 -#define ACTIVE_PARTICLE_11 (1 << 11) // 0x00000800 +#define ACTIVE_PARTICLE_FIRE (1 << 11) // 0x00000800 #define ACTIVE_PARTICLE_SHALLOW_WATER_SPLASH (1 << 12) // 0x00001000 -#define ACTIVE_PARTICLE_13 (1 << 13) // 0x00002000 -#define ACTIVE_PARTICLE_14 (1 << 14) // 0x00004000 -#define ACTIVE_PARTICLE_15 (1 << 15) // 0x00008000 -#define ACTIVE_PARTICLE_16 (1 << 16) // 0x00010000 -#define ACTIVE_PARTICLE_17 (1 << 17) // 0x00020000 -#define ACTIVE_PARTICLE_18 (1 << 18) // 0x00040000 -#define ACTIVE_PARTICLE_19 (1 << 19) // 0x00080000 +#define ACTIVE_PARTICLE_LEAF (1 << 13) // 0x00002000 +#define ACTIVE_PARTICLE_DIRT (1 << 14) // 0x00004000 +#define ACTIVE_PARTICLE_MIST_CIRCLE (1 << 15) // 0x00008000 +#define ACTIVE_PARTICLE_SNOW (1 << 16) // 0x00010000 +#define ACTIVE_PARTICLE_BREATH (1 << 17) // 0x00020000 +#define ACTIVE_PARTICLE_V_STAR (1 << 18) // 0x00040000 +#define ACTIVE_PARTICLE_TRIANGLE (1 << 19) // 0x00080000 /* oAction */ #define OBJ_ACT_LAVA_DEATH 100 diff --git a/include/object_fields.h b/include/object_fields.h index 4eb50ed3..5ba0e1cb 100644 --- a/include/object_fields.h +++ b/include/object_fields.h @@ -107,7 +107,7 @@ #define /*0x14C*/ oAction OBJECT_FIELD_S32(0x31) #define /*0x150*/ oSubAction OBJECT_FIELD_S32(0x32) #define /*0x154*/ oTimer OBJECT_FIELD_S32(0x33) -#define /*0x158*/ oBounce OBJECT_FIELD_F32(0x34) +#define /*0x158*/ oBounciness OBJECT_FIELD_F32(0x34) #define /*0x15C*/ oDistanceToMario OBJECT_FIELD_F32(0x35) #define /*0x160*/ oAngleToMario OBJECT_FIELD_S32(0x36) #define /*0x164*/ oHomeX OBJECT_FIELD_F32(0x37) @@ -129,7 +129,7 @@ // 0x1A4 is unused, possibly related to 0x1A8 in removed macro purposes. #define /*0x1A8*/ oUnk1A8 OBJECT_FIELD_U32(0x48) // 0x1AC-0x1B2 (0x48-0x4A) are object specific and defined below the common fields. -#define /*0x1B4*/ oWallAngle OBJECT_FIELD_U32(0x4B) +#define /*0x1B4*/ oWallAngle OBJECT_FIELD_S32(0x4B) #define /*0x1B8*/ oFloorType OBJECT_FIELD_S16(0x4C, 0) #define /*0x1BA*/ oFloorRoom OBJECT_FIELD_S16(0x4C, 1) #define /*0x1BC*/ oAngleToHome OBJECT_FIELD_S32(0x4D) diff --git a/include/sm64.h b/include/sm64.h index 714e1ecd..8dede4e8 100644 --- a/include/sm64.h +++ b/include/sm64.h @@ -89,24 +89,24 @@ #define WATER_STEP_HIT_WALL 4 #define PARTICLE_DUST /* 0x00000001 */ (1 << 0) -#define PARTICLE_1 /* 0x00000002 */ (1 << 1) +#define PARTICLE_VERTICAL_STAR /* 0x00000002 */ (1 << 1) #define PARTICLE_2 /* 0x00000004 */ (1 << 2) #define PARTICLE_SPARKLES /* 0x00000008 */ (1 << 3) -#define PARTICLE_4 /* 0x00000010 */ (1 << 4) -#define PARTICLE_5 /* 0x00000020 */ (1 << 5) +#define PARTICLE_HORIZONTAL_STAR /* 0x00000010 */ (1 << 4) +#define PARTICLE_BUBBLE /* 0x00000020 */ (1 << 5) #define PARTICLE_WATER_SPLASH /* 0x00000040 */ (1 << 6) #define PARTICLE_IDLE_WATER_WAVE /* 0x00000080 */ (1 << 7) #define PARTICLE_SHALLOW_WATER_WAVE /* 0x00000100 */ (1 << 8) -#define PARTICLE_9 /* 0x00000200 */ (1 << 9) +#define PARTICLE_PLUNGE_BUBBLE /* 0x00000200 */ (1 << 9) #define PARTICLE_WAVE_TRAIL /* 0x00000400 */ (1 << 10) -#define PARTICLE_11 /* 0x00000800 */ (1 << 11) +#define PARTICLE_FIRE /* 0x00000800 */ (1 << 11) #define PARTICLE_SHALLOW_WATER_SPLASH /* 0x00001000 */ (1 << 12) -#define PARTICLE_LEAVES /* 0x00002000 */ (1 << 13) -#define PARTICLE_14 /* 0x00004000 */ (1 << 14) -#define PARTICLE_15 /* 0x00008000 */ (1 << 15) -#define PARTICLE_16 /* 0x00010000 */ (1 << 16) -#define PARTICLE_17 /* 0x00020000 */ (1 << 17) -#define PARTICLE_18 /* 0x00040000 */ (1 << 18) +#define PARTICLE_LEAF /* 0x00002000 */ (1 << 13) +#define PARTICLE_SNOW /* 0x00004000 */ (1 << 14) +#define PARTICLE_DIRT /* 0x00008000 */ (1 << 15) +#define PARTICLE_MIST_CIRCLE /* 0x00010000 */ (1 << 16) +#define PARTICLE_BREATH /* 0x00020000 */ (1 << 17) +#define PARTICLE_TRIANGLE /* 0x00040000 */ (1 << 18) #define PARTICLE_19 /* 0x00080000 */ (1 << 19) #define MODEL_STATE_NOISE_ALPHA 0x180 @@ -185,19 +185,19 @@ #define ACT_IN_QUICKSAND 0x0002020D // (0x00D | ACT_FLAG_STATIONARY | ACT_FLAG_INVULNERABLE) #define ACT_CROUCHING 0x0C008220 // (0x020 | ACT_FLAG_STATIONARY | ACT_FLAG_SHORT_HITBOX | ACT_FLAG_ALLOW_FIRST_PERSON | ACT_FLAG_PAUSE_EXIT) #define ACT_START_CROUCHING 0x0C008221 // (0x021 | ACT_FLAG_STATIONARY | ACT_FLAG_SHORT_HITBOX | ACT_FLAG_ALLOW_FIRST_PERSON | ACT_FLAG_PAUSE_EXIT) -#define ACT_UNKNOWN_022 0x0C008222 // (0x022 | ACT_FLAG_STATIONARY | ACT_FLAG_SHORT_HITBOX | ACT_FLAG_ALLOW_FIRST_PERSON | ACT_FLAG_PAUSE_EXIT) +#define ACT_STOP_CROUCHING 0x0C008222 // (0x022 | ACT_FLAG_STATIONARY | ACT_FLAG_SHORT_HITBOX | ACT_FLAG_ALLOW_FIRST_PERSON | ACT_FLAG_PAUSE_EXIT) #define ACT_START_CRAWLING 0x0C008223 // (0x023 | ACT_FLAG_STATIONARY | ACT_FLAG_SHORT_HITBOX | ACT_FLAG_ALLOW_FIRST_PERSON | ACT_FLAG_PAUSE_EXIT) -#define ACT_UNKNOWN_024 0x0C008224 // (0x024 | ACT_FLAG_STATIONARY | ACT_FLAG_SHORT_HITBOX | ACT_FLAG_ALLOW_FIRST_PERSON | ACT_FLAG_PAUSE_EXIT) +#define ACT_STOP_CRAWLING 0x0C008224 // (0x024 | ACT_FLAG_STATIONARY | ACT_FLAG_SHORT_HITBOX | ACT_FLAG_ALLOW_FIRST_PERSON | ACT_FLAG_PAUSE_EXIT) #define ACT_SLIDE_KICK_SLIDE_STOP 0x08000225 // (0x025 | ACT_FLAG_STATIONARY | ACT_FLAG_PAUSE_EXIT) -#define ACT_UNKNOWN_026 0x00020226 // (0x026 | ACT_FLAG_STATIONARY | ACT_FLAG_INVULNERABLE) +#define ACT_SHOCKWAVE_BOUNCE 0x00020226 // (0x026 | ACT_FLAG_STATIONARY | ACT_FLAG_INVULNERABLE) #define ACT_FIRST_PERSON 0x0C000227 // (0x027 | ACT_FLAG_STATIONARY | ACT_FLAG_ALLOW_FIRST_PERSON | ACT_FLAG_PAUSE_EXIT) #define ACT_BACKFLIP_LAND_STOP 0x0800022F // (0x02F | ACT_FLAG_STATIONARY | ACT_FLAG_PAUSE_EXIT) #define ACT_JUMP_LAND_STOP 0x0C000230 // (0x030 | ACT_FLAG_STATIONARY | ACT_FLAG_ALLOW_FIRST_PERSON | ACT_FLAG_PAUSE_EXIT) #define ACT_DOUBLE_JUMP_LAND_STOP 0x0C000231 // (0x031 | ACT_FLAG_STATIONARY | ACT_FLAG_ALLOW_FIRST_PERSON | ACT_FLAG_PAUSE_EXIT) #define ACT_FREEFALL_LAND_STOP 0x0C000232 // (0x032 | ACT_FLAG_STATIONARY | ACT_FLAG_ALLOW_FIRST_PERSON | ACT_FLAG_PAUSE_EXIT) #define ACT_SIDE_FLIP_LAND_STOP 0x0C000233 // (0x033 | ACT_FLAG_STATIONARY | ACT_FLAG_ALLOW_FIRST_PERSON | ACT_FLAG_PAUSE_EXIT) -#define ACT_UNKNOWN_034 0x08000234 // (0x034 | ACT_FLAG_STATIONARY | ACT_FLAG_PAUSE_EXIT) -#define ACT_UNKNOWN_035 0x08000235 // (0x035 | ACT_FLAG_STATIONARY | ACT_FLAG_PAUSE_EXIT) +#define ACT_HOLD_JUMP_LAND_STOP 0x08000234 // (0x034 | ACT_FLAG_STATIONARY | ACT_FLAG_PAUSE_EXIT) +#define ACT_HOLD_FREEFALL_LAND_STOP 0x08000235 // (0x035 | ACT_FLAG_STATIONARY | ACT_FLAG_PAUSE_EXIT) #define ACT_AIR_THROW_LAND 0x80000A36 // (0x036 | ACT_FLAG_STATIONARY | ACT_FLAG_AIR | ACT_FLAG_THROWING) #define ACT_TWIRL_LAND 0x18800238 // (0x038 | ACT_FLAG_STATIONARY | ACT_FLAG_ATTACKING | ACT_FLAG_PAUSE_EXIT | ACT_FLAG_SWIMMING_OR_FLYING) #define ACT_LAVA_BOOST_LAND 0x08000239 // (0x039 | ACT_FLAG_STATIONARY | ACT_FLAG_PAUSE_EXIT) @@ -206,7 +206,7 @@ #define ACT_GROUND_POUND_LAND 0x0080023C // (0x03C | ACT_FLAG_STATIONARY | ACT_FLAG_ATTACKING) #define ACT_BRAKING_STOP 0x0C00023D // (0x03D | ACT_FLAG_STATIONARY | ACT_FLAG_ALLOW_FIRST_PERSON | ACT_FLAG_PAUSE_EXIT) #define ACT_BUTT_SLIDE_STOP 0x0C00023E // (0x03E | ACT_FLAG_STATIONARY | ACT_FLAG_ALLOW_FIRST_PERSON | ACT_FLAG_PAUSE_EXIT) -#define ACT_UNKNOWN_03F 0x0800043F // (0x03F | ACT_FLAG_MOVING | ACT_FLAG_PAUSE_EXIT) +#define ACT_HOLD_BUTT_SLIDE_STOP 0x0800043F // (0x03F | ACT_FLAG_MOVING | ACT_FLAG_PAUSE_EXIT) // group 0x040: moving (ground) actions #define ACT_WALKING 0x04000440 // (0x040 | ACT_FLAG_MOVING | ACT_FLAG_ALLOW_FIRST_PERSON) diff --git a/include/types.h b/include/types.h index ab289fc7..483c894f 100644 --- a/include/types.h +++ b/include/types.h @@ -30,6 +30,9 @@ struct Controller /*0x12*/ u16 buttonPressed; /*0x14*/ OSContStatus *statusData; /*0x18*/ OSContPad *controllerData; +#ifdef VERSION_SH + /*0x1C*/ int port; +#endif }; typedef f32 Vec2f[2]; @@ -185,10 +188,10 @@ struct Object } ptrData; #endif /*0x1C8*/ u32 unused1; - /*0x1CC*/ const BehaviorScript *behScript; - /*0x1D0*/ u32 stackIndex; - /*0x1D4*/ uintptr_t stack[8]; - /*0x1F4*/ s16 unk1F4; + /*0x1CC*/ const BehaviorScript *curBhvCommand; + /*0x1D0*/ u32 bhvStackIndex; + /*0x1D4*/ uintptr_t bhvStack[8]; + /*0x1F4*/ s16 bhvDelayTimer; /*0x1F6*/ s16 respawnInfoType; /*0x1F8*/ f32 hitboxRadius; /*0x1FC*/ f32 hitboxHeight; diff --git a/levels/bbh/geo.c b/levels/bbh/geo.c index d4ca306c..12712e11 100644 --- a/levels/bbh/geo.c +++ b/levels/bbh/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/bbh/header.h" #include "levels/bbh/staircase_step/geo.inc.c" diff --git a/levels/bitdw/geo.c b/levels/bitdw/geo.c index 943ac02c..2b1a1707 100644 --- a/levels/bitdw/geo.c +++ b/levels/bitdw/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/bitdw/header.h" #include "levels/bitdw/areas/1/starting_platform/geo.inc.c" diff --git a/levels/bitdw/script.c b/levels/bitdw/script.c index 2b3855f7..d97fec47 100644 --- a/levels/bitdw/script.c +++ b/levels/bitdw/script.c @@ -89,7 +89,7 @@ const LevelScript level_bitdw_entry[] = { AREA(/*index*/ 1, geo_bitdw_000618), OBJECT(/*model*/ MODEL_NONE, /*pos*/ -7443, -2153, 3886, /*angle*/ 0, 90, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvWarps64), OBJECT(/*model*/ MODEL_BITDW_WARP_PIPE, /*pos*/ 6816, 2860, -7, /*angle*/ 0, 0, 0, /*behParam*/ 0x000B0000, /*beh*/ bhvWarpPipe), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ 5910, 3500, -7, /*angle*/ 0, 90, 0, /*behParam*/ 0x000C0000, /*beh*/ bhvWarps70), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ 5910, 3500, -7, /*angle*/ 0, 90, 0, /*behParam*/ 0x000C0000, /*beh*/ bhvDeathWarp), WARP_NODE(/*id*/ 0x0A, /*destLevel*/ LEVEL_BITDW, /*destArea*/ 0x01, /*destNode*/ 0x0A, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x0B, /*destLevel*/ LEVEL_BOWSER_1, /*destArea*/ 0x01, /*destNode*/ 0x0A, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x0C, /*destLevel*/ LEVEL_BITDW, /*destArea*/ 0x01, /*destNode*/ 0x0C, /*flags*/ WARP_NO_CHECKPOINT), diff --git a/levels/bitfs/geo.c b/levels/bitfs/geo.c index c84bb9ba..96851ba0 100644 --- a/levels/bitfs/geo.c +++ b/levels/bitfs/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/bitfs/header.h" #include "levels/bitfs/areas/1/2/geo.inc.c" diff --git a/levels/bitfs/script.c b/levels/bitfs/script.c index 119e3817..f9f1f645 100644 --- a/levels/bitfs/script.c +++ b/levels/bitfs/script.c @@ -102,7 +102,7 @@ const LevelScript level_bitfs_entry[] = { AREA(/*index*/ 1, bitfs_geo_0007A0), OBJECT(/*model*/ MODEL_NONE, /*pos*/ -7577, -1764, 0, /*angle*/ 0, 90, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvWarps64), OBJECT(/*model*/ MODEL_NONE, /*pos*/ 6735, 3681, 99, /*angle*/ 0, 0, 0, /*behParam*/ 0x140B0000, /*beh*/ bhvWarp), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ 5886, 5000, 99, /*angle*/ 0, 90, 0, /*behParam*/ 0x000C0000, /*beh*/ bhvWarps70), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ 5886, 5000, 99, /*angle*/ 0, 90, 0, /*behParam*/ 0x000C0000, /*beh*/ bhvDeathWarp), WARP_NODE(/*id*/ 0x0A, /*destLevel*/ LEVEL_BITFS, /*destArea*/ 0x01, /*destNode*/ 0x0A, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x0B, /*destLevel*/ LEVEL_BOWSER_2, /*destArea*/ 0x01, /*destNode*/ 0x0A, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x0C, /*destLevel*/ LEVEL_BITFS, /*destArea*/ 0x01, /*destNode*/ 0x0C, /*flags*/ WARP_NO_CHECKPOINT), diff --git a/levels/bits/geo.c b/levels/bits/geo.c index 503a6314..fe1078fb 100644 --- a/levels/bits/geo.c +++ b/levels/bits/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/bits/header.h" #include "levels/bits/areas/1/2/geo.inc.c" diff --git a/levels/bits/script.c b/levels/bits/script.c index e1eb66be..59dc60d6 100644 --- a/levels/bits/script.c +++ b/levels/bits/script.c @@ -92,7 +92,7 @@ const LevelScript level_bits_entry[] = { AREA(/*index*/ 1, bits_geo_000718), OBJECT(/*model*/ MODEL_NONE, /*pos*/ -7039, -3812, 4, /*angle*/ 0, 90, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvWarps64), OBJECT(/*model*/ MODEL_BITS_WARP_PIPE, /*pos*/ 351, 6652, -6030, /*angle*/ 0, 0, 0, /*behParam*/ 0x000B0000, /*beh*/ bhvWarpPipe), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ 351, 6800, -3900, /*angle*/ 0, 180, 0, /*behParam*/ 0x000C0000, /*beh*/ bhvWarps70), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ 351, 6800, -3900, /*angle*/ 0, 180, 0, /*behParam*/ 0x000C0000, /*beh*/ bhvDeathWarp), WARP_NODE(/*id*/ 0x0A, /*destLevel*/ LEVEL_BITS, /*destArea*/ 0x01, /*destNode*/ 0x0A, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x0B, /*destLevel*/ LEVEL_BOWSER_3, /*destArea*/ 0x01, /*destNode*/ 0x0A, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x0C, /*destLevel*/ LEVEL_BITS, /*destArea*/ 0x01, /*destNode*/ 0x0C, /*flags*/ WARP_NO_CHECKPOINT), diff --git a/levels/bob/geo.c b/levels/bob/geo.c index 4867fc5d..59376b73 100644 --- a/levels/bob/geo.c +++ b/levels/bob/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/bob/header.h" #include "levels/bob/chain_chomp_gate/geo.inc.c" diff --git a/levels/bowser_1/geo.c b/levels/bowser_1/geo.c index 77219fb8..26906a11 100644 --- a/levels/bowser_1/geo.c +++ b/levels/bowser_1/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/bowser_1/header.h" #include "levels/bowser_1/areas/1/geo.inc.c" diff --git a/levels/bowser_2/geo.c b/levels/bowser_2/geo.c index 49c35e2c..0bbbe62d 100644 --- a/levels/bowser_2/geo.c +++ b/levels/bowser_2/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/bowser_2/header.h" #include "levels/bowser_2/tilting_platform/geo.inc.c" diff --git a/levels/bowser_3/geo.c b/levels/bowser_3/geo.c index 185f2e08..0823b113 100644 --- a/levels/bowser_3/geo.c +++ b/levels/bowser_3/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/bowser_3/header.h" #include "levels/bowser_3/falling_platform_1/geo.inc.c" diff --git a/levels/castle_courtyard/geo.c b/levels/castle_courtyard/geo.c index ee3be1cf..46418bf9 100644 --- a/levels/castle_courtyard/geo.c +++ b/levels/castle_courtyard/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/castle_courtyard/header.h" #include "levels/castle_courtyard/areas/1/spire/geo.inc.c" diff --git a/levels/castle_grounds/geo.c b/levels/castle_grounds/geo.c index 194f91f7..31f74204 100644 --- a/levels/castle_grounds/geo.c +++ b/levels/castle_grounds/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/castle_grounds/header.h" #include "levels/castle_grounds/areas/1/11/geo.inc.c" diff --git a/levels/castle_grounds/script.c b/levels/castle_grounds/script.c index e51d6a03..ccba9859 100644 --- a/levels/castle_grounds/script.c +++ b/levels/castle_grounds/script.c @@ -19,7 +19,7 @@ static const LevelScript script_func_local_1[] = { WARP_NODE(/*id*/ 0x00, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x01, /*destNode*/ 0x00, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x01, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x01, /*destNode*/ 0x01, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x02, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x03, /*destNode*/ 0x02, /*flags*/ WARP_NO_CHECKPOINT), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, 900, -1710, /*angle*/ 0, 180, 0, /*behParam*/ 0x00030000, /*beh*/ bhvWarps70), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, 900, -1710, /*angle*/ 0, 180, 0, /*behParam*/ 0x00030000, /*beh*/ bhvDeathWarp), WARP_NODE(/*id*/ 0x03, /*destLevel*/ LEVEL_CASTLE_GROUNDS, /*destArea*/ 0x01, /*destNode*/ 0x03, /*flags*/ WARP_NO_CHECKPOINT), OBJECT(/*model*/ MODEL_NONE, /*pos*/ -1328, 260, 4664, /*angle*/ 0, 180, 0, /*behParam*/ 0x00040000, /*beh*/ bhvWarps6C), WARP_NODE(/*id*/ 0x04, /*destLevel*/ LEVEL_CASTLE_GROUNDS, /*destArea*/ 0x01, /*destNode*/ 0x04, /*flags*/ WARP_NO_CHECKPOINT), diff --git a/levels/castle_inside/geo.c b/levels/castle_inside/geo.c index f8b5dbc2..53c8b3a2 100644 --- a/levels/castle_inside/geo.c +++ b/levels/castle_inside/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/castle_inside/header.h" #include "levels/castle_inside/star_door/geo.inc.c" diff --git a/levels/castle_inside/script.c b/levels/castle_inside/script.c index 8a493f82..28d9c731 100644 --- a/levels/castle_inside/script.c +++ b/levels/castle_inside/script.c @@ -54,12 +54,12 @@ static const LevelScript script_func_local_1[] = { OBJECT(/*model*/ MODEL_NONE, /*pos*/ -1024, 900, 717, /*angle*/ 0, 180, 0, /*behParam*/ 0x00200000, /*beh*/ bhvWarps64), OBJECT(/*model*/ MODEL_NONE, /*pos*/ -1024, 900, 717, /*angle*/ 0, 180, 0, /*behParam*/ 0x00210000, /*beh*/ bhvWarps84), OBJECT(/*model*/ MODEL_NONE, /*pos*/ -1024, 900, 717, /*angle*/ 0, 180, 0, /*behParam*/ 0x00220000, /*beh*/ bhvWarps68), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ -1024, 900, 717, /*angle*/ 0, 180, 0, /*behParam*/ 0x00230000, /*beh*/ bhvWarps70), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ -1024, 900, 717, /*angle*/ 0, 180, 0, /*behParam*/ 0x00230000, /*beh*/ bhvDeathWarp), OBJECT(/*model*/ MODEL_NONE, /*pos*/ -5513, 512, -4324, /*angle*/ 0, -135, 0, /*behParam*/ 0x00240000, /*beh*/ bhvWarps8C), OBJECT(/*model*/ MODEL_NONE, /*pos*/ -5513, 512, -4324, /*angle*/ 0, -135, 0, /*behParam*/ 0x00250000, /*beh*/ bhvWarps90), OBJECT(/*model*/ MODEL_NONE, /*pos*/ -1024, 900, 717, /*angle*/ 0, 0, 0, /*behParam*/ 0x00260000, /*beh*/ bhvWarps88), OBJECT(/*model*/ MODEL_NONE, /*pos*/ 2816, 1200, -256, /*angle*/ 0, 90, 0, /*behParam*/ 0x00270000, /*beh*/ bhvWarps88), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ 2816, 1200, -256, /*angle*/ 0, 270, 0, /*behParam*/ 0x00280000, /*beh*/ bhvWarps70), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ 2816, 1200, -256, /*angle*/ 0, 270, 0, /*behParam*/ 0x00280000, /*beh*/ bhvDeathWarp), WARP_NODE(/*id*/ 0x1E, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x01, /*destNode*/ 0x1E, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x1F, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x01, /*destNode*/ 0x1F, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x20, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x01, /*destNode*/ 0x20, /*flags*/ WARP_NO_CHECKPOINT), @@ -79,10 +79,10 @@ static const LevelScript script_func_local_1[] = { WARP_NODE(/*id*/ 0x33, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x01, /*destNode*/ 0x33, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x34, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x01, /*destNode*/ 0x34, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x35, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x01, /*destNode*/ 0x35, /*flags*/ WARP_NO_CHECKPOINT), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ -5422, 717, -461, /*angle*/ 0, 270, 0, /*behParam*/ 0x00640000, /*beh*/ bhvWarps80), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ -2304, 0, -4552, /*angle*/ 0, 180, 0, /*behParam*/ 0x00650000, /*beh*/ bhvWarps80), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ 256, 102, -4706, /*angle*/ 0, 180, 0, /*behParam*/ 0x00660000, /*beh*/ bhvWarps80), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ 4501, 717, -230, /*angle*/ 0, 90, 0, /*behParam*/ 0x00670000, /*beh*/ bhvWarps80), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ -5422, 717, -461, /*angle*/ 0, 270, 0, /*behParam*/ 0x00640000, /*beh*/ bhvPaintingDeathWarp), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ -2304, 0, -4552, /*angle*/ 0, 180, 0, /*behParam*/ 0x00650000, /*beh*/ bhvPaintingDeathWarp), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ 256, 102, -4706, /*angle*/ 0, 180, 0, /*behParam*/ 0x00660000, /*beh*/ bhvPaintingDeathWarp), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ 4501, 717, -230, /*angle*/ 0, 90, 0, /*behParam*/ 0x00670000, /*beh*/ bhvPaintingDeathWarp), WARP_NODE(/*id*/ 0x64, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x01, /*destNode*/ 0x64, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x65, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x01, /*destNode*/ 0x65, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x66, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x01, /*destNode*/ 0x66, /*flags*/ WARP_NO_CHECKPOINT), @@ -138,12 +138,12 @@ static const LevelScript script_func_local_2[] = { WARP_NODE(/*id*/ 0x37, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x02, /*destNode*/ 0x37, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x38, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x02, /*destNode*/ 0x38, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x3A, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x02, /*destNode*/ 0x3A, /*flags*/ WARP_NO_CHECKPOINT), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ -659, 1613, -350, /*angle*/ 0, 180, 0, /*behParam*/ 0x00640000, /*beh*/ bhvWarps80), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ -4693, 2157, 1828, /*angle*/ 0, 270, 0, /*behParam*/ 0x00650000, /*beh*/ bhvWarps70), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ -675, 1400, 3870, /*angle*/ 0, 0, 0, /*behParam*/ 0x00660000, /*beh*/ bhvWarps80), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ -205, 2918, 7300, /*angle*/ 0, 0, 0, /*behParam*/ 0x00670000, /*beh*/ bhvWarps80), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ 3538, 1766, -400, /*angle*/ 0, 180, 0, /*behParam*/ 0x00680000, /*beh*/ bhvWarps80), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ -4693, 2157, 1828, /*angle*/ 0, 270, 0, /*behParam*/ 0x00690000, /*beh*/ bhvWarps70), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ -659, 1613, -350, /*angle*/ 0, 180, 0, /*behParam*/ 0x00640000, /*beh*/ bhvPaintingDeathWarp), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ -4693, 2157, 1828, /*angle*/ 0, 270, 0, /*behParam*/ 0x00650000, /*beh*/ bhvDeathWarp), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ -675, 1400, 3870, /*angle*/ 0, 0, 0, /*behParam*/ 0x00660000, /*beh*/ bhvPaintingDeathWarp), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ -205, 2918, 7300, /*angle*/ 0, 0, 0, /*behParam*/ 0x00670000, /*beh*/ bhvPaintingDeathWarp), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ 3538, 1766, -400, /*angle*/ 0, 180, 0, /*behParam*/ 0x00680000, /*beh*/ bhvPaintingDeathWarp), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ -4693, 2157, 1828, /*angle*/ 0, 270, 0, /*behParam*/ 0x00690000, /*beh*/ bhvDeathWarp), OBJECT(/*model*/ MODEL_NONE, /*pos*/ -230, 4813, -3352, /*angle*/ 0, 180, 0, /*behParam*/ 0x006B0000, /*beh*/ bhvWarps90), OBJECT(/*model*/ MODEL_NONE, /*pos*/ -3412, 2816, 5886, /*angle*/ 0, 270, 0, /*behParam*/ 0x006C0000, /*beh*/ bhvWarps90), OBJECT(/*model*/ MODEL_NONE, /*pos*/ 3002, 2816, 5886, /*angle*/ 0, 90, 0, /*behParam*/ 0x006D0000, /*beh*/ bhvWarps90), @@ -189,10 +189,10 @@ static const LevelScript script_func_local_3[] = { WARP_NODE(/*id*/ 0x34, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x03, /*destNode*/ 0x34, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x35, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x03, /*destNode*/ 0x35, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x36, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x03, /*destNode*/ 0x36, /*flags*/ WARP_NO_CHECKPOINT), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ -1382, -819, -4150, /*angle*/ 0, 180, 0, /*behParam*/ 0x00640000, /*beh*/ bhvWarps80), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ -2918, -870, -875, /*angle*/ 0, 0, 0, /*behParam*/ 0x00650000, /*beh*/ bhvWarps80), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ -1382, -819, -4150, /*angle*/ 0, 180, 0, /*behParam*/ 0x00640000, /*beh*/ bhvPaintingDeathWarp), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ -2918, -870, -875, /*angle*/ 0, 0, 0, /*behParam*/ 0x00650000, /*beh*/ bhvPaintingDeathWarp), OBJECT(/*model*/ MODEL_NONE, /*pos*/ 2483, -1688, -2662, /*angle*/ 0, 270, 0, /*behParam*/ 0x00660000, /*beh*/ bhvWarps90), - OBJECT(/*model*/ MODEL_NONE, /*pos*/ 2381, -500, 2011, /*angle*/ 0, 90, 0, /*behParam*/ 0x00670000, /*beh*/ bhvWarps70), + OBJECT(/*model*/ MODEL_NONE, /*pos*/ 2381, -500, 2011, /*angle*/ 0, 90, 0, /*behParam*/ 0x00670000, /*beh*/ bhvDeathWarp), OBJECT(/*model*/ MODEL_NONE, /*pos*/ 4147, -1100, 1997, /*angle*/ 0, 90, 0, /*behParam*/ 0x00680000, /*beh*/ bhvWarps90), WARP_NODE(/*id*/ 0x64, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x03, /*destNode*/ 0x64, /*flags*/ WARP_NO_CHECKPOINT), WARP_NODE(/*id*/ 0x65, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x03, /*destNode*/ 0x65, /*flags*/ WARP_NO_CHECKPOINT), diff --git a/levels/ccm/geo.c b/levels/ccm/geo.c index 8e205b53..aaa04325 100644 --- a/levels/ccm/geo.c +++ b/levels/ccm/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/ccm/header.h" #include "levels/ccm/ropeway_lift/geo.inc.c" diff --git a/levels/cotmc/geo.c b/levels/cotmc/geo.c index 4e9964ae..9deb6ef3 100644 --- a/levels/cotmc/geo.c +++ b/levels/cotmc/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/cotmc/header.h" #include "levels/cotmc/areas/1/geo.inc.c" diff --git a/levels/ddd/geo.c b/levels/ddd/geo.c index 46ce9ad2..8dbd4970 100644 --- a/levels/ddd/geo.c +++ b/levels/ddd/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/ddd/header.h" #include "levels/ddd/pole/geo.inc.c" diff --git a/levels/ending/geo.c b/levels/ending/geo.c index bb766347..867bebb5 100644 --- a/levels/ending/geo.c +++ b/levels/ending/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/ending/header.h" // 0x0E000050 diff --git a/levels/hmc/geo.c b/levels/hmc/geo.c index 439308b8..3bffd83a 100644 --- a/levels/hmc/geo.c +++ b/levels/hmc/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/hmc/header.h" #include "levels/hmc/areas/1/grill_door/geo.inc.c" diff --git a/levels/intro/geo.c b/levels/intro/geo.c index 7fbee0c5..8ac70024 100644 --- a/levels/intro/geo.c +++ b/levels/intro/geo.c @@ -11,6 +11,8 @@ #include "menu/debug_level_select.h" #include "menu/intro_geo.h" +#include "make_const_nonconst.h" + #include "levels/intro/header.h" // 0x0E0002D0 @@ -30,13 +32,13 @@ const GeoLayout intro_geo_0002D0[] = { GEO_OPEN_NODE(), GEO_CAMERA(0, 0, 0, 3200, 0, 0, 0, 0x00000000), GEO_OPEN_NODE(), - GEO_ASM(0, geo18_title_screen), + GEO_ASM(0, geo_title_screen), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_ZBUFFER(0), GEO_OPEN_NODE(), - GEO_ASM(0, geo18_fade_transition), + GEO_ASM(0, geo_fade_transition), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_END(), @@ -50,7 +52,7 @@ const GeoLayout intro_geo_00035C[] = { GEO_OPEN_NODE(), GEO_NODE_ORTHO(100), GEO_OPEN_NODE(), - GEO_ASM(0, geo18_intro_backdrop), + GEO_ASM(0, geo_intro_backdrop), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_ZBUFFER(1), @@ -72,7 +74,7 @@ const GeoLayout intro_geo_0003B8[] = { GEO_OPEN_NODE(), GEO_NODE_ORTHO(100), GEO_OPEN_NODE(), - GEO_ASM(0, geo18_game_over_tile), + GEO_ASM(0, geo_game_over_tile), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_ZBUFFER(1), @@ -94,7 +96,7 @@ const GeoLayout intro_geo_000414[] = { GEO_OPEN_NODE(), GEO_NODE_ORTHO(100), GEO_OPEN_NODE(), - GEO_ASM(0, geo18_intro_backdrop), + GEO_ASM(0, geo_intro_backdrop), GEO_CLOSE_NODE(), GEO_CLOSE_NODE(), GEO_ZBUFFER(1), diff --git a/levels/intro/script.c b/levels/intro/script.c index 3ffd7859..4975dbb2 100644 --- a/levels/intro/script.c +++ b/levels/intro/script.c @@ -30,7 +30,7 @@ const LevelScript level_intro_entry_1[] = { FREE_LEVEL_POOL(), LOAD_AREA(/*area*/ 1), - CALL(/*arg*/ 0, /*func*/ LevelProc_8016F508), + CALL(/*arg*/ 0, /*func*/ lvl_intro_update), SLEEP(/*frames*/ 75), TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0x00, 0x00, 0x00), SLEEP(/*frames*/ 16), @@ -59,7 +59,7 @@ const LevelScript level_intro_entry_2[] = { SET_MENU_MUSIC(/*seq*/ 0x0002), TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00), SLEEP(/*frames*/ 20), - CALL_LOOP(/*arg*/ 1, /*func*/ LevelProc_8016F508), + CALL_LOOP(/*arg*/ 1, /*func*/ lvl_intro_update), JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1), JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2), JUMP(script_intro_L4), @@ -84,7 +84,7 @@ const LevelScript level_intro_entry_3[] = { SET_MENU_MUSIC(/*seq*/ 0x0082), TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00), SLEEP(/*frames*/ 20), - CALL_LOOP(/*arg*/ 2, /*func*/ LevelProc_8016F508), + CALL_LOOP(/*arg*/ 2, /*func*/ lvl_intro_update), JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1), JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2), JUMP(script_intro_L4), @@ -106,7 +106,7 @@ const LevelScript level_intro_entry_4[] = { SET_MENU_MUSIC(/*seq*/ 0x0002), TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF), SLEEP(/*frames*/ 16), - CALL_LOOP(/*arg*/ 3, /*func*/ LevelProc_8016F508), + CALL_LOOP(/*arg*/ 3, /*func*/ lvl_intro_update), JUMP_IF(/*op*/ OP_EQ, /*arg*/ -1, script_intro_L5), JUMP(script_intro_L3), }; diff --git a/levels/jrb/geo.c b/levels/jrb/geo.c index f38ea6ca..d7d0f900 100644 --- a/levels/jrb/geo.c +++ b/levels/jrb/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/jrb/header.h" #include "levels/jrb/falling_pillar/geo.inc.c" diff --git a/levels/lll/geo.c b/levels/lll/geo.c index 3241b6ea..43b6dfe4 100644 --- a/levels/lll/geo.c +++ b/levels/lll/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/lll/header.h" #include "levels/lll/areas/1/4/geo.inc.c" diff --git a/levels/menu/geo.c b/levels/menu/geo.c index 1369966d..466b85d4 100644 --- a/levels/menu/geo.c +++ b/levels/menu/geo.c @@ -11,6 +11,8 @@ #include "menu/file_select.h" #include "menu/star_select.h" +#include "make_const_nonconst.h" + #include "levels/menu/header.h" // 0x0E0001D0 diff --git a/levels/pss/geo.c b/levels/pss/geo.c index 05b5214a..58c3aa1c 100644 --- a/levels/pss/geo.c +++ b/levels/pss/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/pss/header.h" #include "levels/pss/areas/1/geo.inc.c" diff --git a/levels/rr/geo.c b/levels/rr/geo.c index 7a0a575a..2fc7289f 100644 --- a/levels/rr/geo.c +++ b/levels/rr/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/rr/header.h" #include "levels/rr/areas/1/2/geo.inc.c" diff --git a/levels/sa/geo.c b/levels/sa/geo.c index 29a0b7f5..bcf1e782 100644 --- a/levels/sa/geo.c +++ b/levels/sa/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/sa/header.h" #include "levels/sa/areas/1/geo.inc.c" diff --git a/levels/scripts.c b/levels/scripts.c index ac5776cd..972c9ad0 100644 --- a/levels/scripts.c +++ b/levels/scripts.c @@ -4,6 +4,8 @@ #include "level_commands.h" #include "game/area.h" +#include "make_const_nonconst.h" + #include "segment_symbols.h" #include "actors/common0.h" diff --git a/levels/sl/geo.c b/levels/sl/geo.c index 265e3706..8b4219c1 100644 --- a/levels/sl/geo.c +++ b/levels/sl/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/sl/header.h" #include "levels/sl/unused_cracked_ice/geo.inc.c" diff --git a/levels/ssl/geo.c b/levels/ssl/geo.c index ec9d7fe5..217edac8 100644 --- a/levels/ssl/geo.c +++ b/levels/ssl/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/ssl/header.h" #include "levels/ssl/areas/1/5/geo.inc.c" diff --git a/levels/thi/geo.c b/levels/thi/geo.c index 7cf23ea0..a47ae6f2 100644 --- a/levels/thi/geo.c +++ b/levels/thi/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/thi/header.h" #include "levels/thi/areas/1/6/geo.inc.c" diff --git a/levels/totwc/geo.c b/levels/totwc/geo.c index bdde89f3..4391e675 100644 --- a/levels/totwc/geo.c +++ b/levels/totwc/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/totwc/header.h" #include "levels/totwc/cloud/geo.inc.c" diff --git a/levels/ttc/geo.c b/levels/ttc/geo.c index 4408369a..5c37c754 100644 --- a/levels/ttc/geo.c +++ b/levels/ttc/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/ttc/header.h" #include "levels/ttc/rotating_cube/geo.inc.c" diff --git a/levels/ttm/geo.c b/levels/ttm/geo.c index d0c08e80..07d62070 100644 --- a/levels/ttm/geo.c +++ b/levels/ttm/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/ttm/header.h" #include "levels/ttm/star_cage/geo.inc.c" diff --git a/levels/vcutm/geo.c b/levels/vcutm/geo.c index 1f95da14..e1d27e67 100644 --- a/levels/vcutm/geo.c +++ b/levels/vcutm/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/vcutm/header.h" #include "levels/vcutm/seesaw/geo.inc.c" diff --git a/levels/wdw/geo.c b/levels/wdw/geo.c index 208e7b6e..458a1ce9 100644 --- a/levels/wdw/geo.c +++ b/levels/wdw/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/wdw/header.h" #include "levels/wdw/square_floating_platform/geo.inc.c" diff --git a/levels/wf/geo.c b/levels/wf/geo.c index 75059c62..f31514b6 100644 --- a/levels/wf/geo.c +++ b/levels/wf/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/wf/header.h" #include "levels/wf/areas/1/5/geo.inc.c" diff --git a/levels/wmotr/geo.c b/levels/wmotr/geo.c index f7e6c2c9..edc66962 100644 --- a/levels/wmotr/geo.c +++ b/levels/wmotr/geo.c @@ -9,6 +9,8 @@ #include "game/screen_transition.h" #include "game/paintings.h" +#include "make_const_nonconst.h" + #include "levels/wmotr/header.h" #include "levels/wmotr/areas/1/geo.inc.c" diff --git a/lib/asm/__osExceptionPreamble.s b/lib/asm/__osExceptionPreamble.s index 21f38204..c98608b0 100644 --- a/lib/asm/__osExceptionPreamble.s +++ b/lib/asm/__osExceptionPreamble.s @@ -10,6 +10,10 @@ .section .text, "ax" +.ifdef AVOID_UB +.set D_80334890, D_80334890_fix +.endif + glabel __osExceptionPreamble lui $k0, %hi(__osException) # $k0, 0x8032 addiu $k0, %lo(__osException) # addiu $k0, $k0, 0x66d0 @@ -60,8 +64,8 @@ glabel __osException move $t0, $k0 sw $zero, %lo(D_80334938)($at) - lui $k0, %hi(D_803348A0) # $k0, 0x8033 - lw $k0, %lo(D_803348A0)($k0) + lui $k0, %hi(D_80334890 + 0x10) # $k0, 0x8033 + lw $k0, %lo(D_80334890 + 0x10)($k0) ld $t1, 0x20($t0) sd $t1, 0x20($k0) ld $t1, 0x118($t0) @@ -119,8 +123,8 @@ glabel __osException or $k1, $k1, $t1 sw $k1, 0x118($k0) .L802F3A18: - lui $t1, %hi(D_A430000C) # $t1, 0xa430 - lw $t1, %lo(D_A430000C)($t1) + lui $t1, %hi(MI_INTR_MASK_REG) # $t1, 0xa430 + lw $t1, %lo(MI_INTR_MASK_REG)($t1) beqz $t1, .L802F3A50 nop lui $t0, %hi(D_8030208C) # $t0, 0x8030 @@ -165,8 +169,8 @@ glabel __osException .L80326868: mfc0 $t0, $13 sw $t0, 0x120($k0) - lui $t1, %hi(D_A430000C) # $t1, 0xa430 - lw $t1, %lo(D_A430000C)($t1) + lui $t1, %hi(MI_INTR_MASK_REG) # $t1, 0xa430 + lw $t1, %lo(MI_INTR_MASK_REG)($t1) sw $t1, 0x128($k0) li $t1, 2 sh $t1, 0x10($k0) @@ -256,20 +260,20 @@ glabel L80326984 b .L8032692C and $s0, $s0, $at glabel L803269B8 - lui $s1, %hi(D_A4300008) # $s1, 0xa430 - lw $s1, %lo(D_A4300008)($s1) + lui $s1, %hi(MI_INTR_REG) # $s1, 0xa430 + lw $s1, %lo(MI_INTR_REG)($s1) andi $s1, $s1, 0x3f andi $t1, $s1, 1 beqz $t1, .L80326A18 nop - lui $t4, %hi(D_A4040010) # $t4, 0xa404 - lw $t4, %lo(D_A4040010)($t4) + lui $t4, %hi(SP_STATUS_REG) # $t4, 0xa404 + lw $t4, %lo(SP_STATUS_REG)($t4) li $t1, 8 - lui $at, %hi(D_A4040010) # $at, 0xa404 + lui $at, %hi(SP_STATUS_REG) # $at, 0xa404 andi $t4, $t4, 0x300 andi $s1, $s1, 0x3e beqz $t4, .L80326A08 - sw $t1, %lo(D_A4040010)($at) + sw $t1, %lo(SP_STATUS_REG)($at) jal send_mesg li $a0, 32 beqz $s1, .L80326ADC @@ -284,9 +288,9 @@ glabel L803269B8 .L80326A18: andi $t1, $s1, 8 beqz $t1, .L80326A3C - lui $at, %hi(D_A4400010) # $at, 0xa440 + lui $at, %hi(VI_CURRENT_REG) # $at, 0xa440 andi $s1, $s1, 0x37 - sw $zero, %lo(D_A4400010)($at) + sw $zero, %lo(VI_CURRENT_REG)($at) jal send_mesg li $a0, 56 beqz $s1, .L80326ADC @@ -296,9 +300,9 @@ glabel L803269B8 beqz $t1, .L80326A68 nop li $t1, 1 - lui $at, %hi(D_A450000C) # $at, 0xa450 + lui $at, %hi(AI_STATUS_REG) # $at, 0xa450 andi $s1, $s1, 0x3b - sw $t1, %lo(D_A450000C)($at) + sw $t1, %lo(AI_STATUS_REG)($at) jal send_mesg li $a0, 48 beqz $s1, .L80326ADC @@ -306,9 +310,9 @@ glabel L803269B8 .L80326A68: andi $t1, $s1, 2 beqz $t1, .L80326A8C - lui $at, %hi(D_A4800018) # $at, 0xa480 + lui $at, %hi(SI_STATUS_REG) # $at, 0xa480 andi $s1, $s1, 0x3d - sw $zero, %lo(D_A4800018)($at) + sw $zero, %lo(SI_STATUS_REG)($at) jal send_mesg li $a0, 40 beqz $s1, .L80326ADC @@ -318,9 +322,9 @@ glabel L803269B8 beqz $t1, .L80326AB8 nop li $t1, 2 - lui $at, %hi(D_A4600010) # $at, 0xa460 + lui $at, %hi(PI_STATUS_REG) # $at, 0xa460 andi $s1, $s1, 0x2f - sw $t1, %lo(D_A4600010)($at) + sw $t1, %lo(PI_STATUS_REG)($at) jal send_mesg li $a0, 64 beqz $s1, .L80326ADC @@ -330,9 +334,9 @@ glabel L803269B8 beqz $t1, .L80326ADC nop li $t1, 2048 - lui $at, %hi(D_A4300000) + lui $at, %hi(MI_MODE_REG) andi $s1, $s1, 0x1f - sw $t1, %lo(D_A4300000)($at) + sw $t1, %lo(MI_MODE_REG)($at) jal send_mesg li $a0, 72 .L80326ADC: @@ -356,8 +360,8 @@ glabel L80326AE8 sw $t2, ($t1) jal send_mesg li $a0, 112 - lui $t2, %hi(D_80334898) # $t2, 0x8033 - lw $t2, %lo(D_80334898)($t2) + lui $t2, %hi(D_80334890 + 0x8) # $t2, 0x8033 + lw $t2, %lo(D_80334890 + 0x8)($t2) li $at, -4097 and $s0, $s0, $at lw $k1, 0x118($t2) @@ -391,23 +395,23 @@ glabel L80326B64 nop .L80326B9C: glabel L80326B9C - lui $t2, %hi(D_80334898) # $t2, 0x8033 - lw $t2, %lo(D_80334898)($t2) + lui $t2, %hi(D_80334890 + 0x8) # $t2, 0x8033 + lw $t2, %lo(D_80334890 + 0x8)($t2) lw $t1, 4($k0) lw $t3, 4($t2) slt $at, $t1, $t3 beqz $at, .L80326BD0 nop - lui $a0, %hi(D_80334898) # $a0, 0x8033 + lui $a0, %hi(D_80334890 + 0x8) # $a0, 0x8033 move $a1, $k0 jal __osEnqueueThread - addiu $a0, %lo(D_80334898) # addiu $a0, $a0, 0x4898 + addiu $a0, %lo(D_80334890 + 0x8) # addiu $a0, $a0, 0x4898 j __osDispatchThread nop .L80326BD0: - lui $t1, %hi(D_80334898) # $t1, 0x8033 - addiu $t1, %lo(D_80334898) # addiu $t1, $t1, 0x4898 + lui $t1, %hi(D_80334890 + 0x8) # $t1, 0x8033 + addiu $t1, %lo(D_80334890 + 0x8) # addiu $t1, $t1, 0x4898 lw $t2, ($t1) sw $t2, ($k0) j __osDispatchThread @@ -415,8 +419,8 @@ glabel L80326B9C .L80326BE8: glabel L80326BE8 - lui $at, %hi(D_803348A4) # $at, 0x8033 - sw $k0, %lo(D_803348A4)($at) + lui $at, %hi(D_80334890 + 0x14) # $at, 0x8033 + sw $k0, %lo(D_80334890 + 0x14)($at) li $t1, 1 sh $t1, 0x10($k0) li $t1, 2 @@ -442,8 +446,8 @@ glabel L80326BE8 sw $zero, 0x18($k0) mfc0 $t0, $13 move $t0, $k0 - lui $k0, %hi(D_803348A0) # $k0, 0x8030 - lw $k0, %lo(D_803348A0)($k0) + lui $k0, %hi(D_80334890 + 0x10) # $k0, 0x8030 + lw $k0, %lo(D_80334890 + 0x10)($k0) ld $t1, 0x20($t0) sd $t1, 0x20($k0) ld $t1, 0x118($t0) @@ -499,8 +503,8 @@ glabel L80326BE8 or $k1, $k1, $t1 sw $k1, 0x118($k0) .L802F3A18: - lui $t1, %hi(D_A430000C) # $t1, 0xa430 - lw $t1, %lo(D_A430000C)($t1) + lui $t1, %hi(MI_INTR_MASK_REG) # $t1, 0xa430 + lw $t1, %lo(MI_INTR_MASK_REG)($t1) beqz $t1, .L802F3A50 nop lui $t0, %hi(D_8030208C) # $t0, 0x8030 @@ -613,21 +617,21 @@ glabel L803269B8 lui $t0, %hi(D_8030208C) # $t0, 0x8030 addiu $t0, %lo(D_8030208C) # addiu $t0, $t0, 0x208c lw $t0, ($t0) - lui $s1, %hi(D_A4300008) # $s1, 0xa430 - lw $s1, %lo(D_A4300008)($s1) + lui $s1, %hi(MI_INTR_REG) # $s1, 0xa430 + lw $s1, %lo(MI_INTR_REG)($s1) srl $t0, $t0, 0x10 and $s1, $s1, $t0 andi $t1, $s1, 1 beqz $t1, .L802F3C24 nop - lui $t4, %hi(D_A4040010) # $t4, 0xa404 - lw $t4, %lo(D_A4040010)($t4) + lui $t4, %hi(SP_STATUS_REG) # $t4, 0xa404 + lw $t4, %lo(SP_STATUS_REG)($t4) li $t1, 8 - lui $at, %hi(D_A4040010) # $at, 0xa404 + lui $at, %hi(SP_STATUS_REG) # $at, 0xa404 andi $t4, $t4, 0x300 andi $s1, $s1, 0x3e beqz $t4, .L802F3C14 - sw $t1, %lo(D_A4040010)($at) + sw $t1, %lo(SP_STATUS_REG)($at) jal send_mesg li $a0, 32 beqz $s1, .L802F3CE8 @@ -642,9 +646,9 @@ glabel L803269B8 .L802F3C24: andi $t1, $s1, 8 beqz $t1, .L802F3C48 - lui $at, %hi(D_A4400010) # $at, 0xa440 + lui $at, %hi(VI_CURRENT_REG) # $at, 0xa440 andi $s1, $s1, 0x37 - sw $zero, %lo(D_A4400010)($at) + sw $zero, %lo(VI_CURRENT_REG)($at) jal send_mesg li $a0, 56 beqz $s1, .L802F3CE8 @@ -654,9 +658,9 @@ glabel L803269B8 beqz $t1, .L802F3C74 nop li $t1, 1 - lui $at, %hi(D_A450000C) # $at, 0xa450 + lui $at, %hi(AI_STATUS_REG) # $at, 0xa450 andi $s1, $s1, 0x3b - sw $t1, %lo(D_A450000C)($at) + sw $t1, %lo(AI_STATUS_REG)($at) jal send_mesg li $a0, 48 beqz $s1, .L802F3CE8 @@ -664,9 +668,9 @@ glabel L803269B8 .L802F3C74: andi $t1, $s1, 2 beqz $t1, .L802F3C98 - lui $at, %hi(D_A4800018) # $at, 0xa480 + lui $at, %hi(SI_STATUS_REG) # $at, 0xa480 andi $s1, $s1, 0x3d - sw $zero, %lo(D_A4800018)($at) + sw $zero, %lo(SI_STATUS_REG)($at) jal send_mesg li $a0, 40 beqz $s1, .L802F3CE8 @@ -676,9 +680,9 @@ glabel L803269B8 beqz $t1, .L802F3CC4 nop li $t1, 2 - lui $at, %hi(D_A4600010) # $at, 0xa460 + lui $at, %hi(PI_STATUS_REG) # $at, 0xa460 andi $s1, $s1, 0x2f - sw $t1, %lo(D_A4600010)($at) + sw $t1, %lo(PI_STATUS_REG)($at) jal send_mesg li $a0, 64 beqz $s1, .L802F3CE8 @@ -714,8 +718,8 @@ glabel L80326AE8 sw $t2, ($t1) jal send_mesg li $a0, 112 - lui $t2, %hi(D_80334898) # $t2, 0x8030 - lw $t2, %lo(D_80334898)($t2) + lui $t2, %hi(D_80334890 + 0x8) # $t2, 0x8030 + lw $t2, %lo(D_80334890 + 0x8)($t2) li $at, -4097 and $s0, $s0, $at lw $k1, 0x118($t2) @@ -749,23 +753,23 @@ glabel L80326B64 nop .L802F3DA8: glabel L80326B9C - lui $t2, %hi(D_80334898) # $t2, 0x8030 - lw $t2, %lo(D_80334898)($t2) + lui $t2, %hi(D_80334890 + 0x8) # $t2, 0x8030 + lw $t2, %lo(D_80334890 + 0x8)($t2) lw $t1, 4($k0) lw $t3, 4($t2) slt $at, $t1, $t3 beqz $at, .L80326BD0 nop - lui $a0, %hi(D_80334898) # $a0, 0x8030 + lui $a0, %hi(D_80334890 + 0x8) # $a0, 0x8030 move $a1, $k0 jal __osEnqueueThread - addiu $a0, %lo(D_80334898) # addiu $a0, $a0, 0x2ef8 + addiu $a0, %lo(D_80334890 + 0x8) # addiu $a0, $a0, 0x2ef8 j __osDispatchThread nop .L80326BD0: - lui $t1, %hi(D_80334898) # $t1, 0x8030 - addiu $t1, %lo(D_80334898) # addiu $t1, $t1, 0x2ef8 + lui $t1, %hi(D_80334890 + 0x8) # $t1, 0x8030 + addiu $t1, %lo(D_80334890 + 0x8) # addiu $t1, $t1, 0x2ef8 lw $t2, ($t1) sw $t2, ($k0) j __osDispatchThread @@ -773,8 +777,8 @@ glabel L80326B9C .L80326BE8: glabel L80326BE8 - lui $at, %hi(D_803348A4) # $at, 0x8030 - sw $k0, %lo(D_803348A4)($at) + lui $at, %hi(D_80334890 + 0x14) # $at, 0x8030 + sw $k0, %lo(D_80334890 + 0x14)($at) li $t1, 1 sh $t1, 0x10($k0) li $t1, 2 @@ -829,10 +833,10 @@ glabel send_mesg jal __osPopThread move $a0, $t1 move $t2, $v0 - lui $a0, %hi(D_80334898) # $a0, 0x8033 + lui $a0, %hi(D_80334890 + 0x8) # $a0, 0x8033 move $a1, $t2 jal __osEnqueueThread - addiu $a0, %lo(D_80334898) # addiu $a0, $a0, 0x4898 + addiu $a0, %lo(D_80334890 + 0x8) # addiu $a0, $a0, 0x4898 .L80326CC4: jr $s2 nop @@ -853,8 +857,8 @@ glabel send_mesg glabel __osEnqueueAndYield - lui $a1, %hi(D_803348A0) # $a1, 0x8033 - lw $a1, %lo(D_803348A0)($a1) + lui $a1, %hi(D_80334890 + 0x10) # $a1, 0x8033 + lw $a1, %lo(D_80334890 + 0x10)($a1) mfc0 $t0, $12 lw $k1, 0x18($a1) ori $t0, $t0, 2 @@ -905,8 +909,8 @@ glabel __osEnqueueAndYield /* 0B37B4 802F3FB4 0369D825 */ or $k1, $k1, $t1 /* 0B37B8 802F3FB8 ACBB0118 */ sw $k1, 0x118($a1) .L802F3FBC: -/* 0B37BC 802F3FBC 3C1BA430 */ lui $k1, %hi(D_A430000C) # $k1, 0xa430 -/* 0B37C0 802F3FC0 8F7B000C */ lw $k1, %lo(D_A430000C)($k1) +/* 0B37BC 802F3FBC 3C1BA430 */ lui $k1, %hi(MI_INTR_MASK_REG) # $k1, 0xa430 +/* 0B37C0 802F3FC0 8F7B000C */ lw $k1, %lo(MI_INTR_MASK_REG)($k1) /* 0B37C4 802F3FC4 1360000B */ beqz $k1, .L802F3FF4 /* 0B37C8 802F3FC8 00000000 */ nop /* 0B37CC 802F3FCC 3C1A8030 */ lui $k0, %hi(D_8030208C) # $k0, 0x8030 @@ -925,8 +929,8 @@ glabel __osEnqueueAndYield .L80326D70: .ifndef VERSION_EU - lui $k1, %hi(D_A430000C) # $k1, 0xa430 - lw $k1, %lo(D_A430000C)($k1) + lui $k1, %hi(MI_INTR_MASK_REG) # $k1, 0xa430 + lw $k1, %lo(MI_INTR_MASK_REG)($k1) .endif beqz $a0, .L80326D88 sw $k1, 0x128($a1) @@ -967,11 +971,11 @@ glabel __osPopThread sw $t9, ($a0) glabel __osDispatchThread - lui $a0, %hi(D_80334898) # $a0, 0x8033 + lui $a0, %hi(D_80334890 + 0x8) # $a0, 0x8033 jal __osPopThread - addiu $a0, %lo(D_80334898) # addiu $a0, $a0, 0x4898 - lui $at, %hi(D_803348A0) # $at, 0x8033 - sw $v0, %lo(D_803348A0)($at) + addiu $a0, %lo(D_80334890 + 0x8) # addiu $a0, $a0, 0x4898 + lui $at, %hi(D_80334890 + 0x10) # $at, 0x8033 + sw $v0, %lo(D_80334890 + 0x10)($at) li $t0, 4 sh $t0, 0x10($v0) move $k0, $v0 @@ -1066,8 +1070,8 @@ glabel __osDispatchThread addiu $k0, %lo(D_803386D0) # addiu $k0, $k0, -0x7930 addu $k1, $k1, $k0 lhu $k1, ($k1) - lui $k0, %hi(D_A430000C) # $k0, 0xa430 - addiu $k0, %lo(D_A430000C) # addiu $k0, $k0, 0xc + lui $k0, %hi(MI_INTR_MASK_REG) # $k0, 0xa430 + addiu $k0, %lo(MI_INTR_MASK_REG) # addiu $k0, $k0, 0xc sw $k1, ($k0) nop nop diff --git a/lib/asm/llmuldiv_gcc.s b/lib/asm/llmuldiv_gcc.s new file mode 100644 index 00000000..cf604929 --- /dev/null +++ b/lib/asm/llmuldiv_gcc.s @@ -0,0 +1,100 @@ +# assembler directives +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches +.set gp=64 + +.include "macros.inc" + + +.section .text, "ax" + +/* -------------------------------------------------------------------------------------- */ +/* need to asm these functions because lib32gcc-7-dev-mips-cross does not exist so we */ +/* cannot naturally link a libgcc variant for this target given this architecture and */ +/* compiler. Until we have a good workaround with a gcc target that doesn't involve */ +/* assuming a 32-bit to 64-bit change, we have to encode these functions as raw assembly */ +/* for it to compile. */ +/* -------------------------------------------------------------------------------------- */ + +/* TODO: Is there a non-insane way to fix this hack that doesn't involve the user compiling */ +/* a library themselves? */ +glabel __umoddi3 + sw $a0, ($sp) + sw $a1, 4($sp) + sw $a2, 8($sp) + sw $a3, 0xc($sp) + ld $t7, 8($sp) + ld $t6, ($sp) + ddivu $zero, $t6, $t7 + bnez $t7, .L80324144 + nop + break 7 +.L80324144: + mfhi $v0 + dsll32 $v1, $v0, 0 + dsra32 $v1, $v1, 0 + jr $ra + dsra32 $v0, $v0, 0 + +glabel __udivdi3 + sw $a0, ($sp) + sw $a1, 4($sp) + sw $a2, 8($sp) + sw $a3, 0xc($sp) + ld $t7, 8($sp) + ld $t6, ($sp) + ddivu $zero, $t6, $t7 + bnez $t7, .L80324180 + nop + break 7 +.L80324180: + mflo $v0 + dsll32 $v1, $v0, 0 + dsra32 $v1, $v1, 0 + jr $ra + dsra32 $v0, $v0, 0 + +glabel __moddi3 + sw $a0, ($sp) + sw $a1, 4($sp) + sw $a2, 8($sp) + sw $a3, 0xc($sp) + ld $t7, 8($sp) + ld $t6, ($sp) + ddivu $zero, $t6, $t7 + bnez $t7, .L803241E8 + nop + break 7 +.L803241E8: + mfhi $v0 + dsll32 $v1, $v0, 0 + dsra32 $v1, $v1, 0 + jr $ra + dsra32 $v0, $v0, 0 + +glabel __divdi3 + sw $a0, ($sp) + sw $a1, 4($sp) + sw $a2, 8($sp) + sw $a3, 0xc($sp) + ld $t7, 8($sp) + ld $t6, ($sp) + ddiv $zero, $t6, $t7 + nop + bnez $t7, .L80324228 + nop + break 7 +.L80324228: + daddiu $at, $zero, -1 + bne $t7, $at, .L80324244 + daddiu $at, $zero, 1 + dsll32 $at, $at, 0x1f + bne $t6, $at, .L80324244 + nop + break 6 +.L80324244: + mflo $v0 + dsll32 $v1, $v0, 0 + dsra32 $v1, $v1, 0 + jr $ra + dsra32 $v0, $v0, 0 diff --git a/lib/src/__osDequeueThread.c b/lib/src/__osDequeueThread.c index b71c25f1..08758378 100644 --- a/lib/src/__osDequeueThread.c +++ b/lib/src/__osDequeueThread.c @@ -2,12 +2,16 @@ // these don't feel like they belong here // but it makes the most logical since there was printf data before +#ifndef AVOID_UB OSThread *D_80334890 = NULL; -u32 unknown = -1; +u32 D_80334894 = -1; OSThread *D_80334898 = (OSThread *) &D_80334890; OSThread *D_8033489C = (OSThread *) &D_80334890; OSThread *D_803348A0 = NULL; u32 D_803348A4 = 0; // UNKNOWN +#else +OSThread_ListHead D_80334890_fix = {NULL, -1, (OSThread *) &D_80334890_fix, (OSThread *) &D_80334890_fix, NULL, 0}; +#endif void __osDequeueThread(OSThread **queue, OSThread *thread) { register OSThread **a2; diff --git a/lib/src/__osGetCurrFaultedThread.c b/lib/src/__osGetCurrFaultedThread.c index f5b7f607..f4951ff1 100644 --- a/lib/src/__osGetCurrFaultedThread.c +++ b/lib/src/__osGetCurrFaultedThread.c @@ -1,5 +1,5 @@ #include "libultra_internal.h" -extern OSThread* D_8033489C; + OSThread *__osGetCurrFaultedThread() { return D_8033489C; // 80302efc } diff --git a/lib/src/func_802F4A20.c b/lib/src/func_802F4A20.c index 985cdcdf..f1e85625 100644 --- a/lib/src/func_802F4A20.c +++ b/lib/src/func_802F4A20.c @@ -1,6 +1,5 @@ #include "new_func.h" -extern OSThread *D_80334898; void func_802F4A20() { __OSTranxInfo *sp1c; volatile u32 sp18; @@ -11,8 +10,8 @@ void func_802F4A20() { // addiu $t7, $t6, 0x14 // sw $t7, 0x1c($sp) sp1c = &__osDiskHandle->transferInfo; - // lui $t8, %hi(D_A4600010) # $t8, 0xa460 - // lw $t9, %lo(D_A4600010)($t8) + // lui $t8, %hi(PI_STATUS_REG) # $t8, 0xa460 + // lw $t9, %lo(PI_STATUS_REG)($t8) // sw $t9, 0x18($sp) // sp18 = HW_REG(PI_STATUS_REG, u32); // while(sp18 & 0x2) sp18 = HW_REG(PI_STATUS_REG, u32); @@ -22,8 +21,8 @@ void func_802F4A20() { // beqz $t1, .L802F4A70 // nop // L802F4A54: - // lui $t2, %hi(D_A4600010) # $t2, 0xa460 - // lw $t3, %lo(D_A4600010)($t2) + // lui $t2, %hi(PI_STATUS_REG) # $t2, 0xa460 + // lw $t3, %lo(PI_STATUS_REG)($t2) // sw $t3, 0x18($sp) // lw $t4, 0x18($sp) // andi $t5, $t4, 2 @@ -35,11 +34,11 @@ void func_802F4A20() { // lui $at, 0x1000 // lui $t9, %hi(D_A5000510) # $t9, 0xa500 // lw $t7, 0x14($t6) - // lui $t0, %hi(D_A4600010) # $t0, 0xa460 + // lui $t0, %hi(PI_STATUS_REG) # $t0, 0xa460 // or $t8, $t7, $at // sw $t8, %lo(D_A5000510)($t9) HW_REG(ASIC_BM_CTL, u32) = BUFFER_MANAGER_RESET | sp1c->bmCtlShadow; //should be unk10?? - // lw $t1, %lo(D_A4600010)($t0) + // lw $t1, %lo(PI_STATUS_REG)($t0) // sw $t1, 0x18($sp) // lw $t2, 0x18($sp) // andi $t3, $t2, 2 @@ -47,8 +46,8 @@ void func_802F4A20() { // nop WAIT_ON_IOBUSY(sp18); // L802F4AA4: - // lui $t4, %hi(D_A4600010) # $t4, 0xa460 - // lw $t5, %lo(D_A4600010)($t4) + // lui $t4, %hi(PI_STATUS_REG) # $t4, 0xa460 + // lw $t5, %lo(PI_STATUS_REG)($t4) // sw $t5, 0x18($sp) // lw $t6, 0x18($sp) // andi $t7, $t6, 2 @@ -64,8 +63,8 @@ void func_802F4A20() { HW_REG(ASIC_BM_CTL, u32) = sp1c->bmCtlShadow; func_802F4B08(); // li $t1, 2 - // lui $t2, %hi(D_A4600010) # $t2, 0xa460 - // sw $t1, %lo(D_A4600010)($t2) + // lui $t2, %hi(PI_STATUS_REG) # $t2, 0xa460 + // sw $t1, %lo(PI_STATUS_REG)($t2) HW_REG(PI_STATUS_REG, u32) = PI_STATUS_CLEAR_INTR; // lui $t3, %hi(D_8030208C) # $t3, 0x8030 // lw $t3, %lo(D_8030208C)($t3) diff --git a/lib/src/func_802F71A0.c b/lib/src/func_802F71A0.c index fd80dd17..9823b93e 100644 --- a/lib/src/func_802F71A0.c +++ b/lib/src/func_802F71A0.c @@ -10,16 +10,16 @@ s32 func_802F71A0(OSPiHandle *a0, u32 a1, u32 a2) { return 0; } /* -/ 0B69A0 802F71A0 3C0EA460 / lui $t6, %hi(D_A4600010) # $t6, 0xa460 -/ 0B69A4 802F71A4 8DC70010 / lw $a3, %lo(D_A4600010)($t6) +/ 0B69A0 802F71A0 3C0EA460 / lui $t6, %hi(PI_STATUS_REG) # $t6, 0xa460 +/ 0B69A4 802F71A4 8DC70010 / lw $a3, %lo(PI_STATUS_REG)($t6) / 0B69A8 802F71A8 27BDFFF8 / addiu $sp, $sp, -8 / 0B69AC 802F71AC 30EF0003 / andi $t7, $a3, 3 / 0B69B0 802F71B0 11E00006 / beqz $t7, .L802F71CC / 0B69B4 802F71B4 00000000 / nop .L802F71B8: -/ 0B69B8 802F71B8 3C18A460 / lui $t8, %hi(D_A4600010) # $t8, 0xa460 -/ 0B69BC 802F71BC 8F070010 / lw $a3, %lo(D_A4600010)($t8) +/ 0B69B8 802F71B8 3C18A460 / lui $t8, %hi(PI_STATUS_REG) # $t8, 0xa460 +/ 0B69BC 802F71BC 8F070010 / lw $a3, %lo(PI_STATUS_REG)($t8) / 0B69C0 802F71C0 30F90003 / andi $t9, $a3, 3 / 0B69C4 802F71C4 1720FFFC / bnez $t9, .L802F71B8 / 0B69C8 802F71C8 00000000 / nop diff --git a/lib/src/func_802F71F0.c b/lib/src/func_802F71F0.c index a7aea2a5..6785cc42 100644 --- a/lib/src/func_802F71F0.c +++ b/lib/src/func_802F71F0.c @@ -1,7 +1,5 @@ #include "libultra_internal.h" -extern OSThread *D_803348A0; -extern OSThread *D_80334898; void func_802F71F0() { register u32 s0 = __osDisableInt(); D_803348A0->state = OS_STATE_RUNNABLE; diff --git a/lib/src/libultra_internal.h b/lib/src/libultra_internal.h index 1216401e..4b2473b3 100644 --- a/lib/src/libultra_internal.h +++ b/lib/src/libultra_internal.h @@ -2,6 +2,50 @@ #define _LIBULTRA_INTERNAL_H_ #include +/* + * This define is needed because the original definitions in __osDequeueThread.c are declared + * seperately instead of part of a single struct, however some code alises over this memory + * assuming a unified structure. To fix this, we declare the full type here and then alias the + * symbol names to the correct members in AVOID_UB. + */ +#ifdef AVOID_UB +typedef struct OSThread_ListHead_s +{ + /*0x00*/ struct OSThread_s *next; + /*0x04*/ OSPri priority; + /*0x08*/ struct OSThread_s *queue; + /*0x0C*/ struct OSThread_s *tlnext; + /*0x10*/ struct OSThread_s *unk10; + /*0x14*/ u32 unk14; +} OSThread_ListHead; + +// Now fix the symbols to the new one. +extern OSThread_ListHead D_80334890_fix; + +#define D_80334890 D_80334890_fix.next +#define D_80334894 D_80334890_fix.priority +#define D_80334898 D_80334890_fix.queue +#define D_8033489C D_80334890_fix.tlnext +#define D_803348A0 D_80334890_fix.unk10 + +// Fix for the EEPROM array. +extern u32 D_80365E00[16]; + +// alias the last array element correctly +#define D_80365E3C D_80365E00[15] +#else +// Original OSThread_ListHead definitions +extern OSThread *D_80334890; +extern u32 D_80334894; +extern OSThread *D_80334898; +extern OSThread *D_8033489C; +extern OSThread *D_803348A0; + +// Original EEPROM definitions +extern u32 D_80365E00[15]; +extern u32 D_80365E3C; +#endif + typedef struct { u32 initialized; // probably something like initialized? OSThread *mgrThread; diff --git a/lib/src/osContInit.c b/lib/src/osContInit.c index d155b6b5..310d4344 100644 --- a/lib/src/osContInit.c +++ b/lib/src/osContInit.c @@ -6,7 +6,6 @@ void __osContGetInitData(u8 *, OSContStatus *); u32 D_80334810 = 0; // probably initialized -extern u32 D_80365D1C; extern u64 osClockRate; // these probably belong in EEPROMlongread or something diff --git a/lib/src/osContInternal.h b/lib/src/osContInternal.h index c3383c14..2b577e07 100644 --- a/lib/src/osContInternal.h +++ b/lib/src/osContInternal.h @@ -27,9 +27,19 @@ typedef struct typedef union { OSContPackedRead read; OSContPackedRequest request; + u32 as_raw[2]; } OSContPackedStruct; +#ifdef AVOID_UB +// Fix the OSContPackedStruct array +extern OSContPackedStruct D_80365CE0[8]; +// And fix the last element +#define D_80365D1C D_80365CE0[7].as_raw[1] +#else +// Original OSContPackedStruct definitions extern OSContPackedStruct D_80365CE0[7]; +extern u32 D_80365D1C; +#endif #endif diff --git a/lib/src/osContStartReadData.c b/lib/src/osContStartReadData.c index 7844c3d8..889bbd77 100644 --- a/lib/src/osContStartReadData.c +++ b/lib/src/osContStartReadData.c @@ -2,9 +2,14 @@ #include "osContInternal.h" #include +#ifndef AVOID_UB OSContPackedStruct D_80365CE0[7]; UNUSED static u32 unused; // padding between these two variables u32 D_80365D1C; +#else +// Reordered gcc vars above will disturb the aliasing done to access all 8 members of this array, hence AVOID_UB. +OSContPackedStruct D_80365CE0[8]; +#endif extern u8 D_80365D20; extern u8 _osCont_numControllers; @@ -52,6 +57,7 @@ void __osPackReadData() { for (i = 0; i < 0x10; i++) { *((u32 *) &D_80365CE0 + i) = 0; } + D_80365D1C = 1; sp4.unk00 = 255; sp4.unk01 = 1; diff --git a/lib/src/osCreateMesgQueue.c b/lib/src/osCreateMesgQueue.c index 5c677205..727c0af7 100644 --- a/lib/src/osCreateMesgQueue.c +++ b/lib/src/osCreateMesgQueue.c @@ -1,7 +1,5 @@ #include "libultra_internal.h" -extern OSThread *D_80334890; - void osCreateMesgQueue(OSMesgQueue *mq, OSMesg *msgBuf, s32 count) { mq->mtqueue = (OSThread *) &D_80334890; //? mq->fullqueue = (OSThread *) &D_80334890; diff --git a/lib/src/osCreateThread.c b/lib/src/osCreateThread.c index 7a891682..b4e283f2 100644 --- a/lib/src/osCreateThread.c +++ b/lib/src/osCreateThread.c @@ -1,6 +1,5 @@ #include "libultra_internal.h" -extern OSThread *D_8033489C; void __osCleanupThread(void); // Don't warn about pointer->u64 cast diff --git a/lib/src/osDestroyThread.c b/lib/src/osDestroyThread.c index 7857b9ff..215ce073 100644 --- a/lib/src/osDestroyThread.c +++ b/lib/src/osDestroyThread.c @@ -1,8 +1,5 @@ #include "libultra_internal.h" -extern OSThread *D_803348A0; -extern OSThread *D_8033489C; - void osDestroyThread(OSThread *thread) { register s32 int_disabled; register OSThread *s1; diff --git a/lib/src/osEepromRead.c b/lib/src/osEepromRead.c index 905eff74..9c4aa641 100644 --- a/lib/src/osEepromRead.c +++ b/lib/src/osEepromRead.c @@ -1,7 +1,5 @@ #include "libultra_internal.h" -extern u32 D_80365E00[15]; -extern u32 D_80365E3C; extern u8 D_80365D20; typedef struct { diff --git a/lib/src/osEepromWrite.c b/lib/src/osEepromWrite.c index 71d0b7d6..ab7d544a 100644 --- a/lib/src/osEepromWrite.c +++ b/lib/src/osEepromWrite.c @@ -1,8 +1,14 @@ #include "libultra_internal.h" #include "osContInternal.h" -u32 D_80365E00[0x3c >> 2]; +#ifndef AVOID_UB +u32 D_80365E00[15]; u32 D_80365E3C; +#else +// Certain code accesses the 16th element (D_80365E3C) in this array, making a seperate +// definition UB when gcc rearranges those. +u32 D_80365E00[16]; +#endif extern u8 D_80365D20; typedef struct { diff --git a/lib/src/osGetThreadPri.c b/lib/src/osGetThreadPri.c index c5590101..7b5b58c4 100644 --- a/lib/src/osGetThreadPri.c +++ b/lib/src/osGetThreadPri.c @@ -1,7 +1,5 @@ #include "libultra_internal.h" -extern OSThread *D_803348A0; - OSPri osGetThreadPri(OSThread *thread) { if (thread == NULL) { thread = D_803348A0; diff --git a/lib/src/osJamMesg.c b/lib/src/osJamMesg.c index 78936e86..72513135 100644 --- a/lib/src/osJamMesg.c +++ b/lib/src/osJamMesg.c @@ -1,7 +1,5 @@ #include "libultra_internal.h" -extern OSThread *D_803348A0; - s32 osJamMesg(OSMesgQueue *mq, OSMesg msg, s32 flag) { register s32 int_disabled; int_disabled = __osDisableInt(); diff --git a/lib/src/osRecvMesg.c b/lib/src/osRecvMesg.c index 41f65697..057ec9f0 100644 --- a/lib/src/osRecvMesg.c +++ b/lib/src/osRecvMesg.c @@ -1,7 +1,5 @@ #include "libultra_internal.h" -extern OSThread *D_803348A0; - s32 osRecvMesg(OSMesgQueue *mq, OSMesg *msg, s32 flag) { register u32 int_disabled; register OSThread *thread; diff --git a/lib/src/osSendMesg.c b/lib/src/osSendMesg.c index a7db99ff..f0d02fff 100644 --- a/lib/src/osSendMesg.c +++ b/lib/src/osSendMesg.c @@ -1,7 +1,5 @@ #include "libultra_internal.h" -extern OSThread *D_803348A0; - s32 osSendMesg(OSMesgQueue *mq, OSMesg msg, s32 flag) { register u32 int_disabled; register s32 index; diff --git a/lib/src/osSetThreadPri.c b/lib/src/osSetThreadPri.c index e76d18a0..1c782534 100644 --- a/lib/src/osSetThreadPri.c +++ b/lib/src/osSetThreadPri.c @@ -1,8 +1,5 @@ #include "libultra_internal.h" -extern OSThread *D_803348A0; -extern OSThread *D_80334898; - void osSetThreadPri(OSThread *thread, OSPri pri) { register u32 int_disabled = __osDisableInt(); if (thread == NULL) { diff --git a/lib/src/osStartThread.c b/lib/src/osStartThread.c index caea4cad..c241e388 100644 --- a/lib/src/osStartThread.c +++ b/lib/src/osStartThread.c @@ -1,6 +1,5 @@ #include "libultra_internal.h" -extern OSThread *D_803348A0; -extern OSThread *D_80334898; + void osStartThread(OSThread *thread) { register u32 int_disabled; register uintptr_t state; diff --git a/sm64.ld b/sm64.ld index 05e3e2d9..85069852 100755 --- a/sm64.ld +++ b/sm64.ld @@ -90,9 +90,11 @@ SECTIONS BUILD_DIR/asm/entry.o(.text); BUILD_DIR/src/game/crash_screen.o(.text); BUILD_DIR/src/game/main.o(.text); - BUILD_DIR/src/game/display.o(.text); - BUILD_DIR/src/game/game.o(.text); + BUILD_DIR/src/game/game_init.o(.text); BUILD_DIR/src/game/sound_init.o(.text); +#ifdef VERSION_SH + BUILD_DIR/src/game/thread6.o(.text); +#endif BUILD_DIR/src/game/level_update.o(.text); BUILD_DIR/src/game/interaction.o(.text); BUILD_DIR/src/game/mario.o(.text); @@ -291,6 +293,7 @@ SECTIONS BUILD_DIR/libultra.a:osContInit.o(.text); BUILD_DIR/libultra.a:osEepromProbe.o(.text); BUILD_DIR/libultra.a:llmuldiv.o(.text); + BUILD_DIR/libultra.a:llmuldiv_gcc.o(.text); BUILD_DIR/libultra.a:osInvalDCache.o(.text); BUILD_DIR/libultra.a:osPiStartDma.o(.text); BUILD_DIR/libultra.a:bzero.o(.text); @@ -375,8 +378,7 @@ SECTIONS /* data */ BUILD_DIR/src/game/crash_screen.o(.data*); BUILD_DIR/src/game/main.o(.data*); - BUILD_DIR/src/game/display.o(.data*); - BUILD_DIR/src/game/game.o(.data*); + BUILD_DIR/src/game/game_init.o(.data*); BUILD_DIR/src/game/sound_init.o(.data*); BUILD_DIR/src/game/level_update.o(.data*); BUILD_DIR/src/game/interaction.o(.data*); @@ -475,7 +477,7 @@ SECTIONS /* rodata */ BUILD_DIR/src/game/crash_screen.o(.rodata*); BUILD_DIR/src/game/main.o(.rodata*); - BUILD_DIR/src/game/game.o(.rodata*); + BUILD_DIR/src/game/game_init.o(.rodata*); BUILD_DIR/src/game/sound_init.o(.rodata*); BUILD_DIR/src/game/level_update.o(.rodata*); BUILD_DIR/src/game/interaction.o(.rodata*); @@ -570,7 +572,7 @@ SECTIONS { BUILD_DIR/src/game/crash_screen.o(.bss*); BUILD_DIR/src/game/main.o(.bss*); - BUILD_DIR/src/game/game.o(.bss*); + BUILD_DIR/src/game/game_init.o(.bss*); BUILD_DIR/src/game/sound_init.o(.bss*); BUILD_DIR/src/game/level_update.o(.bss*); BUILD_DIR/src/game/interaction.o(.bss*); @@ -654,6 +656,8 @@ SECTIONS BUILD_DIR/libultra.a:kdebugserver.o(.bss*); BUILD_DIR/libultra.a:*.o(.bss*); #endif + + . = ALIGN(0x8); } END_NOLOAD(main) _mainSegmentNoloadSizeLo = SIZEOF (.main.noload) & 0xffff; @@ -930,8 +934,8 @@ SECTIONS BUILD_DIR/libgoddard.a:anim_mario_eyebrows_1.o(.data); BUILD_DIR/libgoddard.a:anim_group_1.o(.data); BUILD_DIR/libgoddard.a:anim_group_2.o(.data); - BUILD_DIR/libgoddard.a:dynlist_test_cube.o(.rodata); - BUILD_DIR/libgoddard.a:dynlist_unused.o(.rodata); + BUILD_DIR/libgoddard.a:dynlist_test_cube.o(.rodata*); + BUILD_DIR/libgoddard.a:dynlist_unused.o(.rodata*); BUILD_DIR/libgoddard.a:*.o(.data); BUILD_DIR/libgoddard.a:*.o(.rodata); } @@ -996,6 +1000,7 @@ SECTIONS BEGIN_SEG(assets, __romPos) { BUILD_DIR/assets/mario_anim_data.o(.data); + BUILD_DIR/assets/mario_anim_data.o(.rodata); BUILD_DIR/assets/demo_data.o(.data); gSoundDataADSR = .; BUILD_DIR/sound/sound_data.ctl.o(.data); diff --git a/sound/sequences/00_sound_player.s b/sound/sequences/00_sound_player.s index aafbbc2f..caa0e782 100644 --- a/sound/sequences/00_sound_player.s +++ b/sound/sequences/00_sound_player.s @@ -7986,11 +7986,7 @@ layer_note0 38, 0x3, 127, 127 layer_delay 0x2a layer_jump .layer_32B7 -.ifndef VERSION_US - # padding - .byte 0 -.endif - +.align 2, 0 .envelope_32C4: envelope_line 7 20000 envelope_line 6 32700 diff --git a/src/audio/external.c b/src/audio/external.c index fcc89971..ab8a3e2d 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -22,10 +22,6 @@ #define EU_FLOAT(x) x #endif -#ifndef __sgi -#define GLOBAL_ASM(...) -#endif - #ifdef VERSION_EU u8 audioString1[] = "pitch %x: delaybytes %d : olddelay %d\n"; u8 audioString2[] = "cont %x: delaybytes %d : olddelay %d\n"; @@ -607,9 +603,9 @@ void unused_8031E4F0(void) { stubbed_printf("CHANNELS %2d / MAX %3d \n", 0, 0); stubbed_printf("TEMPOMAX %d\n", gTempoInternalToExternal / TEMPO_SCALE); - stubbed_printf("TEMPO G0 %d\n", gSequencePlayers[0].tempo / TEMPO_SCALE); - stubbed_printf("TEMPO G1 %d\n", gSequencePlayers[1].tempo / TEMPO_SCALE); - stubbed_printf("TEMPO G2 %d\n", gSequencePlayers[2].tempo / TEMPO_SCALE); + stubbed_printf("TEMPO G0 %d\n", gSequencePlayers[SEQ_PLAYER_LEVEL].tempo / TEMPO_SCALE); + stubbed_printf("TEMPO G1 %d\n", gSequencePlayers[SEQ_PLAYER_ENV].tempo / TEMPO_SCALE); + stubbed_printf("TEMPO G2 %d\n", gSequencePlayers[SEQ_PLAYER_SFX].tempo / TEMPO_SCALE); stubbed_printf("DEBUGFLAG %8x\n", gAudioErrorFlags); } @@ -1244,9 +1240,9 @@ u8 get_sound_reverb(UNUSED u8 bankIndex, UNUSED u8 item, u8 channelIndex) { #ifndef VERSION_JP } #endif - reverb = (u8)((u8) gSequencePlayers[2].channels[channelIndex]->soundScriptIO[5] + reverb = (u8)((u8) gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->soundScriptIO[5] + gAreaEchoLevel[level][area] - + (US_FLOAT(1.0) - gSequencePlayers[2].channels[channelIndex]->volume) * VAL); + + (US_FLOAT(1.0) - gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume) * VAL); if (reverb > 0x7f) { reverb = 0x7f; @@ -1287,7 +1283,7 @@ void update_game_sound(void) { process_all_sound_requests(); process_level_music_dynamics(); - if (gSequencePlayers[2].channels[0] == &gSequenceChannelNone) { + if (gSequencePlayers[SEQ_PLAYER_SFX].channels[0] == &gSequenceChannelNone) { return; } @@ -1307,8 +1303,8 @@ void update_game_sound(void) { gSoundBanks[bankIndex][index].soundBits++; gSoundBanks[bankIndex][index].soundStatus = SOUND_STATUS_PLAYING; - gSequencePlayers[2].channels[channelIndex]->soundScriptIO[4] = soundId; - gSequencePlayers[2].channels[channelIndex]->soundScriptIO[0] = 1; + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->soundScriptIO[4] = soundId; + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->soundScriptIO[0] = 1; switch (bankIndex) { case 1: @@ -1319,7 +1315,7 @@ void update_game_sound(void) { get_sound_dynamics(bankIndex, index, ARG2_VAL1)); #else ret = get_sound_dynamics(bankIndex, index, ARG2_VAL1); - gSequencePlayers[2].channels[channelIndex]->volume = ret; + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume = ret; #endif } else { #ifdef VERSION_EU @@ -1328,7 +1324,7 @@ void update_game_sound(void) { ((D_80363808[bankIndex] + 8.0f) / 16)); #else ret = get_sound_dynamics(bankIndex, index, ARG2_VAL1); - gSequencePlayers[2].channels[channelIndex]->volume = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume = (D_80363808[bankIndex] + 8.0f) / 16 * ret; #endif } @@ -1337,7 +1333,7 @@ void update_game_sound(void) { get_sound_pan(*gSoundBanks[bankIndex][index].x, *gSoundBanks[bankIndex][index].z)); #else - gSequencePlayers[2].channels[channelIndex]->pan = get_sound_pan( + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->pan = get_sound_pan( *gSoundBanks[bankIndex][index].x, *gSoundBanks[bankIndex][index].z); #endif @@ -1349,7 +1345,7 @@ void update_game_sound(void) { ((f32) D_80363808[bankIndex] / US_FLOAT(80.0))); #else ret = get_sound_freq_scale(bankIndex, index); - gSequencePlayers[2].channels[channelIndex]->freqScale = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->freqScale = ((f32) D_80363808[bankIndex] / US_FLOAT(80.0)) + ret; #endif } else { @@ -1359,7 +1355,7 @@ void update_game_sound(void) { ((f32) D_80363808[bankIndex] / US_FLOAT(400.0))); #else ret = get_sound_freq_scale(bankIndex, index); - gSequencePlayers[2].channels[channelIndex]->freqScale = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->freqScale = ((f32) D_80363808[bankIndex] / US_FLOAT(400.0)) + ret; #endif } @@ -1367,7 +1363,7 @@ void update_game_sound(void) { func_802ad770(0x05020000 | ((channelIndex & 0xff) << 8), get_sound_reverb(bankIndex, index, channelIndex)); #else - gSequencePlayers[2].channels[channelIndex]->reverb = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->reverb = get_sound_reverb(bankIndex, index, channelIndex); #endif @@ -1381,9 +1377,9 @@ void update_game_sound(void) { func_802ad728(0x04020000 | ((channelIndex & 0xff) << 8), get_sound_freq_scale(bankIndex, index)); #else - gSequencePlayers[2].channels[channelIndex]->volume = 1.0f; - gSequencePlayers[2].channels[channelIndex]->pan = 0.5f; - gSequencePlayers[2].channels[channelIndex]->freqScale = 1.0f; + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume = 1.0f; + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->pan = 0.5f; + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->freqScale = 1.0f; #endif break; case 0: @@ -1399,13 +1395,13 @@ void update_game_sound(void) { func_802ad728(0x04020000 | ((channelIndex & 0xff) << 8), get_sound_freq_scale(bankIndex, index)); #else - gSequencePlayers[2].channels[channelIndex]->volume = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume = get_sound_dynamics(bankIndex, index, ARG2_VAL1); - gSequencePlayers[2].channels[channelIndex]->pan = get_sound_pan( + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->pan = get_sound_pan( *gSoundBanks[bankIndex][index].x, *gSoundBanks[bankIndex][index].z); - gSequencePlayers[2].channels[channelIndex]->freqScale = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->freqScale = get_sound_freq_scale(bankIndex, index); - gSequencePlayers[2].channels[channelIndex]->reverb = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->reverb = get_sound_reverb(bankIndex, index, channelIndex); #endif break; @@ -1426,13 +1422,13 @@ void update_game_sound(void) { func_802ad728(0x04020000 | ((channelIndex & 0xff) << 8), get_sound_freq_scale(bankIndex, index)); #else - gSequencePlayers[2].channels[channelIndex]->reverb = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->reverb = get_sound_reverb(bankIndex, index, channelIndex); - gSequencePlayers[2].channels[channelIndex]->volume = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume = get_sound_dynamics(bankIndex, index, ARG2_VAL2); - gSequencePlayers[2].channels[channelIndex]->pan = get_sound_pan( + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->pan = get_sound_pan( *gSoundBanks[bankIndex][index].x, *gSoundBanks[bankIndex][index].z); - gSequencePlayers[2].channels[channelIndex]->freqScale = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->freqScale = get_sound_freq_scale(bankIndex, index); #endif break; @@ -1441,23 +1437,23 @@ void update_game_sound(void) { #ifdef VERSION_JP else if (soundStatus == SOUND_STATUS_STOPPED) { func_8031E0E4(bankIndex, index); - gSequencePlayers[2].channels[channelIndex]->soundScriptIO[0] = 0; + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->soundScriptIO[0] = 0; func_8031DFE8(bankIndex, index); } #else - else if (gSequencePlayers[2].channels[channelIndex]->layers[0] == NULL) { + else if (gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->layers[0] == NULL) { func_8031E0E4(bankIndex, index); gSoundBanks[bankIndex][index].soundStatus = SOUND_STATUS_STOPPED; func_8031DFE8(bankIndex, index); } else if (soundStatus == SOUND_STATUS_STOPPED - && gSequencePlayers[2].channels[channelIndex]->layers[0]->finished + && gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->layers[0]->finished == FALSE) { func_8031E0E4(bankIndex, index); - gSequencePlayers[2].channels[channelIndex]->soundScriptIO[0] = 0; + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->soundScriptIO[0] = 0; func_8031DFE8(bankIndex, index); } #endif - else if (gSequencePlayers[2].channels[channelIndex]->layers[0]->enabled == FALSE) { + else if (gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->layers[0]->enabled == FALSE) { func_8031E0E4(bankIndex, index); gSoundBanks[bankIndex][index].soundStatus = SOUND_STATUS_STOPPED; func_8031DFE8(bankIndex, index); @@ -1476,7 +1472,7 @@ void update_game_sound(void) { get_sound_dynamics(bankIndex, index, ARG2_VAL1)); #else ret = get_sound_dynamics(bankIndex, index, ARG2_VAL1); - gSequencePlayers[2].channels[channelIndex]->volume = ret; + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume = ret; #endif } else { #ifdef VERSION_EU @@ -1485,7 +1481,7 @@ void update_game_sound(void) { ((D_80363808[bankIndex] + 8.0f) / 16)); #else ret = get_sound_dynamics(bankIndex, index, ARG2_VAL1); - gSequencePlayers[2].channels[channelIndex]->volume = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume = (D_80363808[bankIndex] + 8.0f) / 16 * ret; #endif } @@ -1494,7 +1490,7 @@ void update_game_sound(void) { get_sound_pan(*gSoundBanks[bankIndex][index].x, *gSoundBanks[bankIndex][index].z)); #else - gSequencePlayers[2].channels[channelIndex]->pan = get_sound_pan( + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->pan = get_sound_pan( *gSoundBanks[bankIndex][index].x, *gSoundBanks[bankIndex][index].z); #endif @@ -1506,7 +1502,7 @@ void update_game_sound(void) { ((f32) D_80363808[bankIndex] / US_FLOAT(80.0))); #else ret = get_sound_freq_scale(bankIndex, index); - gSequencePlayers[2].channels[channelIndex]->freqScale = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->freqScale = ((f32) D_80363808[bankIndex] / US_FLOAT(80.0)) + ret; #endif } else { @@ -1516,7 +1512,7 @@ void update_game_sound(void) { ((f32) D_80363808[bankIndex] / US_FLOAT(400.0))); #else ret = get_sound_freq_scale(bankIndex, index); - gSequencePlayers[2].channels[channelIndex]->freqScale = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->freqScale = ((f32) D_80363808[bankIndex] / US_FLOAT(400.0)) + ret; #endif } @@ -1524,7 +1520,7 @@ void update_game_sound(void) { func_802ad770(0x05020000 | ((channelIndex & 0xff) << 8), get_sound_reverb(bankIndex, index, channelIndex)); #else - gSequencePlayers[2].channels[channelIndex]->reverb = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->reverb = get_sound_reverb(bankIndex, index, channelIndex); #endif @@ -1538,9 +1534,9 @@ void update_game_sound(void) { func_802ad728(0x04020000 | ((channelIndex & 0xff) << 8), get_sound_freq_scale(bankIndex, index)); #else - gSequencePlayers[2].channels[channelIndex]->volume = 1.0f; - gSequencePlayers[2].channels[channelIndex]->pan = 0.5f; - gSequencePlayers[2].channels[channelIndex]->freqScale = 1.0f; + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume = 1.0f; + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->pan = 0.5f; + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->freqScale = 1.0f; #endif break; case 0: @@ -1556,13 +1552,13 @@ void update_game_sound(void) { func_802ad728(0x04020000 | ((channelIndex & 0xff) << 8), get_sound_freq_scale(bankIndex, index)); #else - gSequencePlayers[2].channels[channelIndex]->volume = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume = get_sound_dynamics(bankIndex, index, ARG2_VAL1); - gSequencePlayers[2].channels[channelIndex]->pan = get_sound_pan( + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->pan = get_sound_pan( *gSoundBanks[bankIndex][index].x, *gSoundBanks[bankIndex][index].z); - gSequencePlayers[2].channels[channelIndex]->freqScale = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->freqScale = get_sound_freq_scale(bankIndex, index); - gSequencePlayers[2].channels[channelIndex]->reverb = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->reverb = get_sound_reverb(bankIndex, index, channelIndex); #endif break; @@ -1583,13 +1579,13 @@ void update_game_sound(void) { func_802ad728(0x04020000 | ((channelIndex & 0xff) << 8), get_sound_freq_scale(bankIndex, index)); #else - gSequencePlayers[2].channels[channelIndex]->reverb = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->reverb = get_sound_reverb(bankIndex, index, channelIndex); - gSequencePlayers[2].channels[channelIndex]->volume = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->volume = get_sound_dynamics(bankIndex, index, ARG2_VAL2); - gSequencePlayers[2].channels[channelIndex]->pan = get_sound_pan( + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->pan = get_sound_pan( *gSoundBanks[bankIndex][index].x, *gSoundBanks[bankIndex][index].z); - gSequencePlayers[2].channels[channelIndex]->freqScale = + gSequencePlayers[SEQ_PLAYER_SFX].channels[channelIndex]->freqScale = get_sound_freq_scale(bankIndex, index); #endif break; @@ -1628,7 +1624,7 @@ void play_sequence(u8 player, u8 seqId, u16 fadeTimer) { if (player == 0) { temp_ret = func_803200E4(0); if (temp_ret != 0xff) { - gSequencePlayers[0].fadeVolumeScale = (f32) temp_ret / US_FLOAT(127.0); + gSequencePlayers[SEQ_PLAYER_LEVEL].fadeVolumeScale = (f32) temp_ret / US_FLOAT(127.0); } } #else @@ -1638,8 +1634,8 @@ void play_sequence(u8 player, u8 seqId, u16 fadeTimer) { if (player == 0) { temp_ret = func_803200E4(0); if (temp_ret != 0xff) { - gSequencePlayers[0].state = SEQUENCE_PLAYER_STATE_4; - gSequencePlayers[0].fadeVolume = (f32) temp_ret / US_FLOAT(127.0); + gSequencePlayers[SEQ_PLAYER_LEVEL].state = SEQUENCE_PLAYER_STATE_4; + gSequencePlayers[SEQ_PLAYER_LEVEL].fadeVolume = (f32) temp_ret / US_FLOAT(127.0); } } else { func_8031D690(player, fadeTimer); @@ -1713,16 +1709,17 @@ void func_8031F96C(u8 player) { void process_level_music_dynamics(void) { s32 conditionBits; // s0 + u32 tempBits; // v1 u8 musicDynIndex; // sp57 87 + u8 condIndex; // a0, v1 + u8 i; // s1 u8 j; // v0 s16 conditionValues[8]; // sp44 68 u8 conditionTypes[8]; // sp3C 60 s16 dur1; // sp3A 58 s16 dur2; // sp38 56 u16 bit; // a1 (in first loop), s0, v1 - u8 i; // s1 - u8 condIndex; // a0, v1 - u32 tempBits; // v1 + // room for 16 bits without affecting stack func_8031F96C(0); func_8031F96C(2); @@ -1737,65 +1734,65 @@ void process_level_music_dynamics(void) { return; } - conditionBits = sLevelDynamics[gCurrLevelNum][1] & 0xff00; - musicDynIndex = sLevelDynamics[gCurrLevelNum][1] & 0xff; + // conditionBits uses a3 instead of s0 + // s16 cast is unnecessary, u16 cast fixes regalloc in the switch + conditionBits = ((s16) sLevelDynamics[gCurrLevelNum][1]) & 0xff00; + musicDynIndex = ((u16) sLevelDynamics[gCurrLevelNum][1]) & 0xff; i = 2; while (conditionBits & 0xff00) { - for (j = 0, condIndex = 0, bit = 0x8000; j<8; j++, bit = bit>> 1) { + j = 0; + condIndex = 0; + bit = 0x8000; + while (j < 8) { if (conditionBits & bit) { conditionValues[condIndex] = sLevelDynamics[gCurrLevelNum][i++]; conditionTypes[condIndex] = j; condIndex++; } + + j++; + bit = bit >> 1; } + // condIndex uses a0 (the same register as 'bit') instead of v1 for (j = 0; j < condIndex; j++) { - // (having all 'temp' share a single variable affects regalloc) switch (conditionTypes[j]) { case MARIO_X_GE: { - s16 temp = gMarioStates[0].pos[0]; - if (temp < conditionValues[j]) + if (((s16) gMarioStates[0].pos[0]) < conditionValues[j]) j = condIndex + 1; break; } case MARIO_Y_GE: { - s16 temp = gMarioStates[0].pos[1]; - if (temp < conditionValues[j]) + if (((s16) gMarioStates[0].pos[1]) < conditionValues[j]) j = condIndex + 1; break; } case MARIO_Z_GE: { - s16 temp = gMarioStates[0].pos[2]; - if (temp < conditionValues[j]) + if (((s16) gMarioStates[0].pos[2]) < conditionValues[j]) j = condIndex + 1; break; } case MARIO_X_LT: { - s16 temp = gMarioStates[0].pos[0]; - if (temp >= conditionValues[j]) + if (((s16) gMarioStates[0].pos[0]) >= conditionValues[j]) j = condIndex + 1; break; } case MARIO_Y_LT: { - s16 temp = gMarioStates[0].pos[1]; - if (temp >= conditionValues[j]) + if (((s16) gMarioStates[0].pos[1]) >= conditionValues[j]) j = condIndex + 1; break; } case MARIO_Z_LT: { - s16 temp = gMarioStates[0].pos[2]; - if (temp >= conditionValues[j]) + if (((s16) gMarioStates[0].pos[2]) >= conditionValues[j]) j = condIndex + 1; break; } case MARIO_IS_IN_AREA: { - // s16 temp = gCurrAreaIndex; if (gCurrAreaIndex != conditionValues[j]) j = condIndex + 1; break; } case MARIO_IS_IN_ROOM: { - // s16 temp = gMarioCurrentRoom; if (gMarioCurrentRoom != conditionValues[j]) j = condIndex + 1; break; @@ -1807,15 +1804,18 @@ void process_level_music_dynamics(void) { // The area matches. Break out of the loop. tempBits = 0; } else { - tempBits = sLevelDynamics[gCurrLevelNum][i]; + // s16 cast is unnecessary, u16 cast fixes regalloc + // While conditionBits didn't need a cast above, the opposite is the case here + tempBits = ((u16) sLevelDynamics[gCurrLevelNum][i]) & 0xff00; + musicDynIndex = ((s16) sLevelDynamics[gCurrLevelNum][i]) & 0xff; i++; - musicDynIndex = tempBits & 0xff, tempBits &= 0xff00; } conditionBits = tempBits; } - if (musicDynIndex != sCurrentMusicDynamic) { + if (sCurrentMusicDynamic != musicDynIndex) { + // bit keeps using a0, should use v1 bit = 1; if (sCurrentMusicDynamic == 0xff) { dur1 = 1; @@ -1827,10 +1827,12 @@ void process_level_music_dynamics(void) { for (i = 0; i < CHANNELS_MAX; i++) { if (sMusicDynamics[musicDynIndex].bits1 & bit) { - fade_channel_volume_scale(0, i, sMusicDynamics[musicDynIndex].volScale1, dur1); + // The instructions setting a0 and a1 are swapped, but get fixed pretty easily by a + // branch or anything that changes regalloc + fade_channel_volume_scale(SEQ_PLAYER_LEVEL, i, sMusicDynamics[musicDynIndex].volScale1, dur1); } if (sMusicDynamics[musicDynIndex].bits2 & bit) { - fade_channel_volume_scale(0, i, sMusicDynamics[musicDynIndex].volScale2, dur2); + fade_channel_volume_scale(SEQ_PLAYER_LEVEL, i, sMusicDynamics[musicDynIndex].volScale2, dur2); } bit <<= 1; } @@ -1896,8 +1898,8 @@ u8 func_803200E4(u16 fadeTimer) { return 0xff; } - if (gSequencePlayers[0].volume == 0.0f && fadeTimer) { - gSequencePlayers[0].volume = gSequencePlayers[0].fadeVolume; + if (gSequencePlayers[SEQ_PLAYER_LEVEL].volume == 0.0f && fadeTimer) { + gSequencePlayers[SEQ_PLAYER_LEVEL].volume = gSequencePlayers[SEQ_PLAYER_LEVEL].fadeVolume; } if (D_80363812 != 0) { @@ -1919,14 +1921,14 @@ u8 func_803200E4(u16 fadeTimer) { vol = 20; } - if (gSequencePlayers[0].enabled == TRUE) { + if (gSequencePlayers[SEQ_PLAYER_LEVEL].enabled == TRUE) { if (vol != 0xff) { - func_8031D838(0, fadeTimer, vol); + func_8031D838(SEQ_PLAYER_LEVEL, fadeTimer, vol); } else { #if defined(VERSION_JP) || defined(VERSION_US) - gSequencePlayers[0].volume = sBackgroundMusicDefaultVolume[sPlayer0CurSeqId] / 127.0f; + gSequencePlayers[SEQ_PLAYER_LEVEL].volume = sBackgroundMusicDefaultVolume[sPlayer0CurSeqId] / 127.0f; #endif - func_8031D7B0(0, fadeTimer); + func_8031D7B0(SEQ_PLAYER_LEVEL, fadeTimer); } } return vol; @@ -2130,7 +2132,7 @@ void play_dialog_sound(u8 dialogID) { play_sound(sDialogSpeakerVoice[speaker], gDefaultSoundArgs); if (speaker == 2) // SOUND_OBJ_BOWSER_INTRO_LAUGH { - play_sequence(1, SEQ_EVENT_KOOPA_MESSAGE, 0); + play_sequence(SEQ_PLAYER_ENV, SEQ_EVENT_KOOPA_MESSAGE, 0); } } @@ -2166,8 +2168,8 @@ void play_music(u8 player, u16 seqArgs, u16 fadeTimer) { for (i = 0; i < sBackgroundMusicQueueSize; i++) { if (sBackgroundMusicQueue[i].seqId == seqId) { if (i == 0) { - play_sequence(0, seqId, fadeTimer); - } else if (!gSequencePlayers[0].enabled) { + play_sequence(SEQ_PLAYER_LEVEL, seqId, fadeTimer); + } else if (!gSequencePlayers[SEQ_PLAYER_LEVEL].enabled) { stop_background_music(sBackgroundMusicQueue[0].seqId); } return; @@ -2185,7 +2187,7 @@ void play_music(u8 player, u16 seqArgs, u16 fadeTimer) { // If the sequence ends up first in the queue, start it, and make space for // more entries in the queue. if (foundIndex == 0) { - play_sequence(0, seqId, fadeTimer); + play_sequence(SEQ_PLAYER_LEVEL, seqId, fadeTimer); sBackgroundMusicQueueSize++; } @@ -2221,9 +2223,9 @@ void stop_background_music(u16 seqId) { sBackgroundMusicQueueSize--; if (i == 0) { if (sBackgroundMusicQueueSize != 0) { - play_sequence(0, sBackgroundMusicQueue[1].seqId, 0); + play_sequence(SEQ_PLAYER_LEVEL, sBackgroundMusicQueue[1].seqId, 0); } else { - sequence_player_fade_out(0, 20); + sequence_player_fade_out(SEQ_PLAYER_LEVEL, 20); } } foundIndex = i; @@ -2244,7 +2246,7 @@ void stop_background_music(u16 seqId) { void fadeout_background_music(u16 seqId, u16 fadeOut) { if (sBackgroundMusicQueueSize != 0 && sBackgroundMusicQueue[0].seqId == (u8)(seqId & 0xff)) { - sequence_player_fade_out(0, fadeOut); + sequence_player_fade_out(SEQ_PLAYER_LEVEL, fadeOut); } } @@ -2267,9 +2269,9 @@ void func_80320ED8(void) { D_EU_80300558--; } - if (gSequencePlayers[1].enabled || D_8033211C == 0 || D_EU_80300558 != 0) { + if (gSequencePlayers[SEQ_PLAYER_ENV].enabled || D_8033211C == 0 || D_EU_80300558 != 0) { #else - if (gSequencePlayers[1].enabled || D_8033211C == 0) { + if (gSequencePlayers[SEQ_PLAYER_ENV].enabled || D_8033211C == 0) { #endif return; } @@ -2279,9 +2281,9 @@ void func_80320ED8(void) { if (D_80363812 != 0 && (D_80332120 == SEQ_EVENT_MERRY_GO_ROUND || D_80332120 == SEQ_EVENT_PIRANHA_PLANT)) { - play_sequence(1, D_80332120, 1); + play_sequence(SEQ_PLAYER_ENV, D_80332120, 1); if (D_80332124 != 0xff) { - func_8031D838(1, 1, D_80332124); + func_8031D838(SEQ_PLAYER_ENV, 1, D_80332124); } } } @@ -2297,16 +2299,16 @@ void play_secondary_music(u8 seqId, u8 bgMusicVolume, u8 volume, u16 fadeTimer) if (D_80363812 == 0) { D_80363812 = bgMusicVolume + 0x80; func_803200E4(fadeTimer); - play_sequence(1, seqId, fadeTimer >> 1); + play_sequence(SEQ_PLAYER_ENV, seqId, fadeTimer >> 1); if (volume < 0x80) { - func_8031D838(1, fadeTimer, volume); + func_8031D838(SEQ_PLAYER_ENV, fadeTimer, volume); } D_80332124 = volume; D_80332120 = seqId; } else if (volume != 0xff) { D_80363812 = bgMusicVolume + 0x80; func_803200E4(fadeTimer); - func_8031D838(1, fadeTimer, volume); + func_8031D838(SEQ_PLAYER_ENV, fadeTimer, volume); D_80332124 = volume; } } @@ -2317,7 +2319,7 @@ void func_80321080(u16 fadeTimer) { D_80332120 = 0; D_80332124 = 0; func_803200E4(fadeTimer); - sequence_player_fade_out(1, fadeTimer); + sequence_player_fade_out(SEQ_PLAYER_ENV, fadeTimer); } } @@ -2328,31 +2330,31 @@ void func_803210D4(u16 fadeOutTime) { return; } - if (gSequencePlayers[0].enabled == TRUE) { + if (gSequencePlayers[SEQ_PLAYER_LEVEL].enabled == TRUE) { #ifdef VERSION_EU func_802ad74c(0x83000000, fadeOutTime); #else - sequence_player_fade_out_internal(0, fadeOutTime); + sequence_player_fade_out_internal(SEQ_PLAYER_LEVEL, fadeOutTime); #endif } - if (gSequencePlayers[1].enabled == TRUE) { + if (gSequencePlayers[SEQ_PLAYER_ENV].enabled == TRUE) { #ifdef VERSION_EU func_802ad74c(0x83010000, fadeOutTime); #else - sequence_player_fade_out_internal(1, fadeOutTime); + sequence_player_fade_out_internal(SEQ_PLAYER_ENV, fadeOutTime); #endif } for (i = 0; i < SOUND_BANK_COUNT; i++) { if (i != 7) { - fade_channel_volume_scale(2, i, 0, fadeOutTime / 16); + fade_channel_volume_scale(SEQ_PLAYER_SFX, i, 0, fadeOutTime / 16); } } sHasStartedFadeOut = TRUE; } void play_course_clear(void) { - play_sequence(1, SEQ_EVENT_CUTSCENE_COLLECT_STAR, 0); + play_sequence(SEQ_PLAYER_ENV, SEQ_EVENT_CUTSCENE_COLLECT_STAR, 0); D_8033211C = 0x80 | 0; #ifdef VERSION_EU D_EU_80300558 = 2; @@ -2361,7 +2363,7 @@ void play_course_clear(void) { } void play_peachs_jingle(void) { - play_sequence(1, SEQ_EVENT_PEACH_MESSAGE, 0); + play_sequence(SEQ_PLAYER_ENV, SEQ_EVENT_PEACH_MESSAGE, 0); D_8033211C = 0x80 | 0; #ifdef VERSION_EU D_EU_80300558 = 2; @@ -2375,7 +2377,7 @@ void play_peachs_jingle(void) { * yoshi, releasing chain chomp, opening the pyramid top, etc. */ void play_puzzle_jingle(void) { - play_sequence(1, SEQ_EVENT_SOLVE_PUZZLE, 0); + play_sequence(SEQ_PLAYER_ENV, SEQ_EVENT_SOLVE_PUZZLE, 0); D_8033211C = 0x80 | 20; #ifdef VERSION_EU D_EU_80300558 = 2; @@ -2384,7 +2386,7 @@ void play_puzzle_jingle(void) { } void play_star_fanfare(void) { - play_sequence(1, SEQ_EVENT_HIGH_SCORE, 0); + play_sequence(SEQ_PLAYER_ENV, SEQ_EVENT_HIGH_SCORE, 0); D_8033211C = 0x80 | 20; #ifdef VERSION_EU D_EU_80300558 = 2; @@ -2396,7 +2398,7 @@ void play_power_star_jingle(u8 arg0) { if (!arg0) { D_80363812 = 0; } - play_sequence(1, SEQ_EVENT_CUTSCENE_STAR_SPAWN, 0); + play_sequence(SEQ_PLAYER_ENV, SEQ_EVENT_CUTSCENE_STAR_SPAWN, 0); D_8033211C = 0x80 | 20; #ifdef VERSION_EU D_EU_80300558 = 2; @@ -2405,7 +2407,7 @@ void play_power_star_jingle(u8 arg0) { } void play_race_fanfare(void) { - play_sequence(1, SEQ_EVENT_RACE, 0); + play_sequence(SEQ_PLAYER_ENV, SEQ_EVENT_RACE, 0); D_8033211C = 0x80 | 20; #ifdef VERSION_EU D_EU_80300558 = 2; @@ -2414,7 +2416,7 @@ void play_race_fanfare(void) { } void play_toads_jingle(void) { - play_sequence(1, SEQ_EVENT_TOAD_MESSAGE, 0); + play_sequence(SEQ_PLAYER_ENV, SEQ_EVENT_TOAD_MESSAGE, 0); D_8033211C = 0x80 | 20; #ifdef VERSION_EU D_EU_80300558 = 2; @@ -2443,7 +2445,7 @@ void sound_reset(u8 presetId) { preload_sequence(SEQ_EVENT_PEACH_MESSAGE, PRELOAD_BANKS | PRELOAD_SEQUENCE); preload_sequence(SEQ_EVENT_CUTSCENE_STAR_SPAWN, PRELOAD_BANKS | PRELOAD_SEQUENCE); } - play_sequence(2, SEQ_SOUND_PLAYER, 0); + play_sequence(SEQ_PLAYER_SFX, SEQ_SOUND_PLAYER, 0); D_80332108 = (D_80332108 & 0xf0) + presetId; gSoundMode = D_80332108 >> 4; sHasStartedFadeOut = FALSE; diff --git a/src/audio/external.h b/src/audio/external.h index 7193a96f..2a8d0e6d 100644 --- a/src/audio/external.h +++ b/src/audio/external.h @@ -12,6 +12,10 @@ #define SOUND_MODE_MONO 3 #define SOUND_MODE_HEADSET 1 +#define SEQ_PLAYER_LEVEL 0 +#define SEQ_PLAYER_ENV 1 +#define SEQ_PLAYER_SFX 2 + extern s32 gAudioErrorFlags; extern f32 gDefaultSoundArgs[3]; diff --git a/src/audio/internal.h b/src/audio/internal.h index 19a91bba..f681afae 100644 --- a/src/audio/internal.h +++ b/src/audio/internal.h @@ -527,6 +527,12 @@ struct Note /* , 0xB0*/ struct NoteSubEu noteSubEu; }; // size = 0xC0 #else +struct vNote +{ + /* U/J, EU */ + /*0x00*/ volatile u8 enabled : 1; + long long int force_structure_alignment; +}; // size = 0xC0 struct Note { /* U/J, EU */ diff --git a/src/audio/synthesis.c b/src/audio/synthesis.c index e051d63c..0031c242 100644 --- a/src/audio/synthesis.c +++ b/src/audio/synthesis.c @@ -24,15 +24,15 @@ #define aSetLoadBufferPair(pkt, c, off) \ aSetBuffer(pkt, 0, c + DMEM_ADDR_WET_LEFT_CH, 0, DEFAULT_LEN_1CH - c); \ - aLoadBuffer(pkt, VIRTUAL_TO_PHYSICAL2(&gSynthesisReverb.ringBuffer.left[off])); \ + aLoadBuffer(pkt, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.ringBuffer.left + (off))); \ aSetBuffer(pkt, 0, c + DMEM_ADDR_WET_RIGHT_CH, 0, DEFAULT_LEN_1CH - c); \ - aLoadBuffer(pkt, VIRTUAL_TO_PHYSICAL2(&gSynthesisReverb.ringBuffer.right[off])); + aLoadBuffer(pkt, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.ringBuffer.right + (off))) #define aSetSaveBufferPair(pkt, c, d, off) \ aSetBuffer(pkt, 0, 0, c + DMEM_ADDR_WET_LEFT_CH, d); \ - aSaveBuffer(pkt, VIRTUAL_TO_PHYSICAL2(&gSynthesisReverb.ringBuffer.left[off])); \ + aSaveBuffer(pkt, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.ringBuffer.left + (off))); \ aSetBuffer(pkt, 0, 0, c + DMEM_ADDR_WET_RIGHT_CH, d); \ - aSaveBuffer(pkt, VIRTUAL_TO_PHYSICAL2(&gSynthesisReverb.ringBuffer.right[off])); + aSaveBuffer(pkt, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.ringBuffer.right + (off))); #define ALIGN(val, amnt) (((val) + (1 << amnt) - 1) & ~((1 << amnt) - 1)) @@ -48,7 +48,7 @@ u64 *synthesis_do_one_audio_update(u16 *aiBuf, s32 bufLen, u64 *cmd, u32 updateI u64 *synthesis_process_note(struct Note *note, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *synthesisState, u16 *aiBuf, s32 bufLen, u64 *cmd); u64 *load_wave_samples(u64 *cmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *synthesisState, s32 nSamplesToLoad); u64 *final_resample(u64 *cmd, struct NoteSynthesisState *synthesisState, s32 count, u16 pitch, u16 dmemIn, u32 flags); -u64 *process_envelope(u64 *cmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *synthesisState, s32 nSamples, u16 inBuf, s32 headsetPanSettings); +u64 *process_envelope(u64 *cmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *synthesisState, s32 nSamples, u16 inBuf, s32 headsetPanSettings, u32 flags); u64 *note_apply_headset_pan_effects(u64 *cmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *note, s32 bufLen, s32 flags, s32 leftRight); #else u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd); @@ -166,17 +166,17 @@ void prepare_reverb_ring_buffer(s32 chunkLen, u32 updateIndex) { } item = &gSynthesisReverb.items[gSynthesisReverb.curFrame][updateIndex]; - numSamplesAfterDownsampling = nSamples = chunkLen / gReverbDownsampleRate; - if (((nSamples + gSynthesisReverb.nextRingBufferPos) - gSynthesisReverb.bufSizePerChannel) < 0) { + numSamplesAfterDownsampling = chunkLen / gReverbDownsampleRate; + if (((numSamplesAfterDownsampling + gSynthesisReverb.nextRingBufferPos) - gSynthesisReverb.bufSizePerChannel) < 0) { // There is space in the ring buffer before it wraps around - item->lengths[0] = nSamples * 2; + item->lengths[0] = numSamplesAfterDownsampling * 2; item->lengths[1] = 0; item->startPos = (s32) gSynthesisReverb.nextRingBufferPos; - gSynthesisReverb.nextRingBufferPos += nSamples; + gSynthesisReverb.nextRingBufferPos += numSamplesAfterDownsampling; } else { // Ring buffer wrapped around excessiveSamples = - (nSamples + gSynthesisReverb.nextRingBufferPos) - gSynthesisReverb.bufSizePerChannel; + (numSamplesAfterDownsampling + gSynthesisReverb.nextRingBufferPos) - gSynthesisReverb.bufSizePerChannel; nSamples = numSamplesAfterDownsampling - excessiveSamples; item->lengths[0] = nSamples * 2; item->lengths[1] = excessiveSamples * 2; @@ -309,19 +309,18 @@ u64 *synthesis_execute(u64 *cmdBuf, s32 *writtenCmds, u16 *aiBuf, s32 bufLen) { u64 *synthesis_execute(u64 *cmdBuf, s32 *writtenCmds, u16 *aiBuf, s32 bufLen) { s32 chunkLen; s32 i; - s32 remaining = bufLen; u32 *aiBufPtr = (u32 *) aiBuf; - u64 *cmd = cmdBuf; + u64 *cmd = cmdBuf + 1; s32 v0; - aSegment(cmd++, 0, 0); + aSegment(cmdBuf, 0, 0); for (i = gAudioUpdatesPerFrame; i > 0; i--) { if (i == 1) { - // 'remaining' will automatically be divisible by 8, no need to round - chunkLen = remaining; + // 'bufLen' will automatically be divisible by 8, no need to round + chunkLen = bufLen; } else { - v0 = remaining / i; + v0 = bufLen / i; // chunkLen = v0 rounded to nearest multiple of 8 chunkLen = v0 - (v0 & 7); @@ -334,7 +333,7 @@ u64 *synthesis_execute(u64 *cmdBuf, s32 *writtenCmds, u16 *aiBuf, s32 bufLen) { prepare_reverb_ring_buffer(chunkLen, gAudioUpdatesPerFrame - i); } cmd = synthesis_do_one_audio_update((u16 *) aiBufPtr, chunkLen, cmd, gAudioUpdatesPerFrame - i); - remaining -= chunkLen; + bufLen -= chunkLen; aiBufPtr += chunkLen; } if (gSynthesisReverb.framesLeftToIgnore != 0) { @@ -502,12 +501,12 @@ u64 *synthesis_do_one_audio_update(u16 *aiBuf, s32 bufLen, u64 *cmd, u32 updateI s16 t4; UNUSED s32 pad[2]; struct ReverbRingBufferItem *v1; - UNUSED s32 pad2[2]; + UNUSED s32 pad2[1]; + s16 temp; v1 = &gSynthesisReverb.items[gSynthesisReverb.curFrame][updateIndex]; if (gSynthesisReverb.useReverb == 0) { - aClearBuffer(cmd++, DMEM_ADDR_LEFT_CH, DEFAULT_LEN_2CH); cmd = synthesis_process_notes(aiBuf, bufLen, cmd); } else { @@ -517,6 +516,7 @@ u64 *synthesis_do_one_audio_update(u16 *aiBuf, s32 bufLen, u64 *cmd, u32 updateI if (v1->lengths[1] != 0) { // Ring buffer wrapped aSetLoadBufferPair(cmd++, v1->lengths[0], 0); + temp = 0; } // Use the reverb sound as initial sound for this audio update @@ -530,22 +530,25 @@ u64 *synthesis_do_one_audio_update(u16 *aiBuf, s32 bufLen, u64 *cmd, u32 updateI /*out*/ DMEM_ADDR_WET_LEFT_CH); } else { // Same as above but upsample the previously downsampled samples used for reverb first + temp = 0; //! jesus christ t4 = (v1->startPos & 7) * 2; ra = ALIGN(v1->lengths[0] + t4, 4); aSetLoadBufferPair(cmd++, 0, v1->startPos - t4 / 2); if (v1->lengths[1] != 0) { // Ring buffer wrapped aSetLoadBufferPair(cmd++, ra, 0); + //! We need an empty statement (even an empty ';') here to make the function match (because IDO). + //! However, copt removes extraneous statements and dead code. So we need to trick copt + //! into thinking 'temp' could be undefined, and luckily the compiler optimizes out the + //! useless assignment. + ra = ra + temp; } aSetBuffer(cmd++, 0, t4 + DMEM_ADDR_WET_LEFT_CH, DMEM_ADDR_LEFT_CH, bufLen << 1); - aResample(cmd++, gSynthesisReverb.resampleFlags, (u16) gSynthesisReverb.resampleRate, - VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.resampleStateLeft)); + aResample(cmd++, gSynthesisReverb.resampleFlags, (u16) gSynthesisReverb.resampleRate, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.resampleStateLeft)); aSetBuffer(cmd++, 0, t4 + DMEM_ADDR_WET_RIGHT_CH, DMEM_ADDR_RIGHT_CH, bufLen << 1); - aResample(cmd++, gSynthesisReverb.resampleFlags, (u16) gSynthesisReverb.resampleRate, - VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.resampleStateRight)); + aResample(cmd++, gSynthesisReverb.resampleFlags, (u16) gSynthesisReverb.resampleRate, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.resampleStateRight)); aSetBuffer(cmd++, 0, 0, 0, DEFAULT_LEN_2CH); - aMix(cmd++, 0, /*gain*/ 0x8000 + gSynthesisReverb.reverbGain, /*in*/ DMEM_ADDR_LEFT_CH, - /*out*/ DMEM_ADDR_LEFT_CH); + aMix(cmd++, 0, /*gain*/ 0x8000 + gSynthesisReverb.reverbGain, /*in*/ DMEM_ADDR_LEFT_CH, /*out*/ DMEM_ADDR_LEFT_CH); aDMEMMove(cmd++, DMEM_ADDR_LEFT_CH, DMEM_ADDR_WET_LEFT_CH, DEFAULT_LEN_2CH); } cmd = synthesis_process_notes(aiBuf, bufLen, cmd); @@ -559,10 +562,7 @@ u64 *synthesis_do_one_audio_update(u16 *aiBuf, s32 bufLen, u64 *cmd, u32 updateI // Downsampling is done later by CPU when RSP is done, therefore we need to have double // buffering. Left and right buffers are adjacent in memory. aSetBuffer(cmd++, 0, 0, DMEM_ADDR_WET_LEFT_CH, DEFAULT_LEN_2CH); - aSaveBuffer( - cmd++, - VIRTUAL_TO_PHYSICAL2( - gSynthesisReverb.items[gSynthesisReverb.curFrame][updateIndex].toDownsampleLeft)); + aSaveBuffer(cmd++, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.items[gSynthesisReverb.curFrame][updateIndex].toDownsampleLeft)); gSynthesisReverb.resampleFlags = 0; } } @@ -570,50 +570,75 @@ u64 *synthesis_do_one_audio_update(u16 *aiBuf, s32 bufLen, u64 *cmd, u32 updateI } #endif -#ifdef NON_MATCHING #ifdef VERSION_EU // Processes just one note, not all u64 *synthesis_process_note(struct Note *note, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *synthesisState, UNUSED u16 *aiBuf, s32 bufLen, u64 *cmd) { + UNUSED s32 pad0[3]; #else u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd) { s32 noteIndex; // sp174 struct Note *note; // s7 + UNUSED u8 pad0[0x08]; #endif - struct AudioBankSample *audioBookSample; // sp164 - struct AdpcmLoop *loopInfo; // sp160 - s16 *curLoadedBook; // sp15C - s32 noteFinished; // 150 t2 - s32 restart; // 14c t3 - s32 flags; // sp148 - UNUSED u8 pad8[0x14]; - s32 sp130; - UNUSED u8 pad7[0xC]; - u8 *sampleAddr; // sp120 - u32 samplesLenAdjusted; // 108, definitely unsigned, t5 - // UNUSED u8 pad6[4]; - s32 endPos; // sp110 - s32 nSamplesToProcess; // 10c a0 - // UNUSED u8 pad5[0x10c - 0xe8 - 4]; - s32 nParts; // spE8 - s32 curPart; // spE4 - u32 nAdpcmSamplesProcessed; // probably unsigned, fp + struct AudioBankSample *audioBookSample; // sp164, sp138 + struct AdpcmLoop *loopInfo; // sp160, sp134 + s16 *curLoadedBook = NULL; // sp154, sp130 +#ifdef VERSION_EU + UNUSED u8 padEU[0x04]; +#endif + UNUSED u8 pad8[0x04]; +#ifndef VERSION_EU + u16 resamplingRateFixedPoint; // sp5c, sp11A +#endif + s32 noteFinished; // 150 t2, sp124 + s32 restart; // 14c t3, sp120 + s32 flags; // sp148, sp11C +#ifdef VERSION_EU + u16 resamplingRateFixedPoint; // sp5c, sp11A +#endif + UNUSED u8 pad7[0x0c]; // sp100 + UNUSED s32 tempBufLen; +#ifdef VERSION_EU + s32 sp130; //sp128, sp104 + UNUSED u32 pad9; +#else + UNUSED u32 pad9; + s32 sp130; //sp128, sp104 +#endif + s32 nAdpcmSamplesProcessed; // signed required for US s32 t0; - s32 resampledTempLen; // spD8 - u16 noteSamplesDmemAddrBeforeResampling; // spD6 +#ifdef VERSION_EU + u8 *sampleAddr; // sp120, spF4 + s32 s6; +#else + s32 s6; + u8 *sampleAddr; // sp120, spF4 +#endif // sp6c is a temporary! - u16 resamplingRateFixedPoint; // sp5c - s32 samplesLenInt; // sp58 - s32 onePart; // sp54 - s32 s6; - s32 s6_2; +#ifdef VERSION_EU + s32 samplesLenAdjusted; // 108, spEC + // Might have been used to store (samplesLenFixedPoint >> 0x10), but doing so causes strange + // behavior with the break near the end of the loop, causing US and JP to need a goto instead + UNUSED s32 samplesLenInt; + s32 endPos; // sp110, spE4 + s32 nSamplesToProcess; // sp10c/a0, spE0 s32 s2; +#else + // Might have been used to store (samplesLenFixedPoint >> 0x10), but doing so causes strange + // behavior with the break near the end of the loop, causing US and JP to need a goto instead + UNUSED s32 samplesLenInt; + s32 samplesLenAdjusted; // 108 + s32 s2; + s32 endPos; // sp110, spE4 + s32 nSamplesToProcess; // sp10c/a0, spE0 +#endif s32 s0; s32 s3; - s32 s5; - // s32 v0; + s32 s5; //s4 + u32 samplesLenFixedPoint; // v1_1 s32 nSamplesInThisIteration; // v1_2 u32 a3; @@ -621,30 +646,42 @@ u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd) { s32 t9; #endif u8 *v0_2; + s32 nParts; // spE8, spBC + s32 curPart; // spE4, spB8 #ifndef VERSION_EU f32 resamplingRate; // f12 #endif - UNUSED s32 temp; + s32 temp; #ifdef VERSION_EU - curLoadedBook = NULL; + s32 s5Aligned; #endif + s32 resampledTempLen; // spD8, spAC + u16 noteSamplesDmemAddrBeforeResampling; // spD6, spAA #ifndef VERSION_EU - for (noteIndex = 0, curLoadedBook = NULL; noteIndex < gMaxSimultaneousNotes; noteIndex++) { + for (noteIndex = 0; noteIndex < gMaxSimultaneousNotes; noteIndex++) { note = &gNotes[noteIndex]; - if (IS_BANK_LOAD_COMPLETE(note->bankId) == FALSE) { - gAudioErrorFlags = (note->bankId << 8) + noteIndex + 0x1000000; - } else if (note->enabled) { +#ifdef VERSION_US + //! This function requires note->enabled to be volatile, but it breaks other functions like note_enable. + //! Casting to a struct with just the volatile bitfield works, but there may be a better way to match. + if (((struct vNote *)note)->enabled && IS_BANK_LOAD_COMPLETE(note->bankId) == FALSE) { #else - if (noteSubEu->enabled) { + if (IS_BANK_LOAD_COMPLETE(note->bankId) == FALSE) { +#endif + gAudioErrorFlags = (note->bankId << 8) + noteIndex + 0x1000000; + } else if (((struct vNote *)note)->enabled) { +#else + if (note->noteSubEu.enabled == FALSE) { + return cmd; + } else { #endif - // This matches much much better if enabled is volatile... but that - // breaks other functions (e.g. note_enable). Can we achieve the - // volatile effect in some other way? flags = 0; +#ifdef VERSION_EU + tempBufLen = bufLen; +#endif #ifdef VERSION_EU if (noteSubEu->needsInit == TRUE) { @@ -684,28 +721,26 @@ u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd) { resamplingRateFixedPoint = (u16)(s32)(resamplingRate * 32768.0f); samplesLenFixedPoint = note->samplePosFrac + (resamplingRateFixedPoint * bufLen) * 2; - note->samplePosFrac = samplesLenFixedPoint; // 16-bit store, can't reuse + note->samplePosFrac = samplesLenFixedPoint & 0xFFFF; // 16-bit store, can't reuse #else resamplingRateFixedPoint = noteSubEu->resamplingRateFixedPoint; nParts = noteSubEu->hasTwoAdpcmParts + 1; - samplesLenFixedPoint = synthesisState->samplePosFrac + (resamplingRateFixedPoint * bufLen) * 2; - synthesisState->samplePosFrac = samplesLenFixedPoint; + samplesLenFixedPoint = (resamplingRateFixedPoint * tempBufLen * 2) + synthesisState->samplePosFrac; + synthesisState->samplePosFrac = samplesLenFixedPoint & 0xFFFF; #endif #ifdef VERSION_EU if (noteSubEu->isSyntheticWave) { - noteSamplesDmemAddrBeforeResampling = - DMEM_ADDR_UNCOMPRESSED_NOTE + synthesisState->samplePosInt * 2; - synthesisState->samplePosInt += (samplesLenFixedPoint >> 0x10); cmd = load_wave_samples(cmd, noteSubEu, synthesisState, samplesLenFixedPoint >> 0x10); + noteSamplesDmemAddrBeforeResampling = (synthesisState->samplePosInt * 2) + DMEM_ADDR_UNCOMPRESSED_NOTE; + synthesisState->samplePosInt += samplesLenFixedPoint >> 0x10; } #else if (note->sound == NULL) { // A wave synthesis note (not ADPCM) - // samplesLenFixedPoint >> 0x10 stored in s0 + cmd = load_wave_samples(cmd, note, samplesLenFixedPoint >> 0x10); - noteSamplesDmemAddrBeforeResampling = - DMEM_ADDR_UNCOMPRESSED_NOTE + note->samplePosInt * 2; + noteSamplesDmemAddrBeforeResampling = DMEM_ADDR_UNCOMPRESSED_NOTE + note->samplePosInt * 2; note->samplePosInt += (samplesLenFixedPoint >> 0x10); flags = 0; } @@ -719,46 +754,31 @@ u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd) { audioBookSample = note->sound->sample; #endif - // sp58 is a low-numbered register, so possibly a temporary. - // Should it be used for samplesLenFixedPoint >> 0x10 above as well? But then - // the asm matches worse. This variable seems to highly involved - // in causing this function not to match... - samplesLenInt = samplesLenFixedPoint >> 0x10; // v0 // sp58 - loopInfo = audioBookSample->loop; endPos = loopInfo->end; sampleAddr = audioBookSample->sampleAddr; - - onePart = (nParts == 1); - resampledTempLen = 0; for (curPart = 0; curPart < nParts; curPart++) { - nAdpcmSamplesProcessed = 0; - s5 = 0; + nAdpcmSamplesProcessed = 0; // s8 + s5 = 0; // s4 - // This whole if-else if chain is weird. First it uses onePart - // instead of nParts == 1, and it needs a weird if to not - // induce non-matchings all over the rest of the function. - // Then it induces a bunch of stack-relative loads that - // shouldn't be there. Finally, it relates to sp58, which - // behaves very oddly... - if (onePart) { // nParts == 1 - if (1) { // shouldn't be here, but it makes things line up better... - samplesLenAdjusted = samplesLenInt; - } - } else if (samplesLenInt & 1) { - samplesLenAdjusted = (samplesLenInt & ~1) + (curPart * 2); - } else { - samplesLenAdjusted = samplesLenInt; + if (nParts == 1) { + samplesLenAdjusted = samplesLenFixedPoint >> 0x10; + } else if ((samplesLenFixedPoint >> 0x10) & 1) { + samplesLenAdjusted = ((samplesLenFixedPoint >> 0x10) & ~1) + (curPart * 2); + } + else { + samplesLenAdjusted = (samplesLenFixedPoint >> 0x10); } if (curLoadedBook != audioBookSample->book->book) { u32 nEntries; // v1 curLoadedBook = audioBookSample->book->book; - nEntries = audioBookSample->book->order * audioBookSample->book->npredictors; #ifdef VERSION_EU - aLoadADPCM(cmd++, nEntries * 16, VIRTUAL_TO_PHYSICAL2(curLoadedBook + noteSubEu->bookOffset)); + nEntries = 16 * audioBookSample->book->order * audioBookSample->book->npredictors; + aLoadADPCM(cmd++, nEntries, VIRTUAL_TO_PHYSICAL2(curLoadedBook + noteSubEu->bookOffset)); #else + nEntries = audioBookSample->book->order * audioBookSample->book->npredictors; aLoadADPCM(cmd++, nEntries * 16, VIRTUAL_TO_PHYSICAL2(curLoadedBook)); #endif } @@ -772,7 +792,7 @@ u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd) { while (nAdpcmSamplesProcessed != samplesLenAdjusted) { s32 samplesRemaining; // v1 s32 s0; - // sp58 = sp58; here, doesn't happen + noteFinished = FALSE; restart = FALSE; nSamplesToProcess = samplesLenAdjusted - nAdpcmSamplesProcessed; @@ -785,11 +805,11 @@ u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd) { #endif #ifdef VERSION_EU - if (s2 == 0 && !synthesisState->restart) { + if (s2 == 0 && synthesisState->restart == FALSE) { s2 = 16; } #else - if (s2 == 0 && !note->restart) { + if (s2 == 0 && note->restart == FALSE) { s2 = 16; } #endif @@ -800,7 +820,11 @@ u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd) { s0 = t0 * 16; s3 = s6 + s0 - nSamplesToProcess; } else { +#ifndef VERSION_EU s0 = samplesRemaining + s2 - 0x10; +#else + s0 = samplesRemaining - s6; +#endif s3 = 0; if (s0 <= 0) { s0 = 0; @@ -815,24 +839,20 @@ u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd) { } } - // Improve regalloc for saved registers. Probably - // shouldn't be here, but it gives nicer diffs for now. - s6_2 = s6; - if (t0 != 0) { - // maybe keep a var for t0 * 9? #ifdef VERSION_EU + temp = (synthesisState->samplePosInt - s2 + 0x10) / 16; if (audioBookSample->loaded == 0x81) { - v0_2 = sampleAddr + (synthesisState->samplePosInt - s2 + 0x10) / 16 * 9; + v0_2 = sampleAddr + temp * 9; } else { v0_2 = dma_sample_data( - (uintptr_t) (sampleAddr + (synthesisState->samplePosInt - s2 + 0x10) / 16 * 9), + (uintptr_t) (sampleAddr + temp * 9), t0 * 9, flags, &synthesisState->sampleDmaIndex); - a3 = (u32)((uintptr_t) v0_2 & 0xf); } #else + temp = (note->samplePosInt - s2 + 0x10) / 16; v0_2 = dma_sample_data( - (uintptr_t) (sampleAddr + (note->samplePosInt - s2 + 0x10) / 16 * 9), + (uintptr_t) (sampleAddr + temp * 9), t0 * 9, flags, ¬e->sampleDmaIndex); #endif a3 = (u32)((uintptr_t) v0_2 & 0xf); @@ -849,61 +869,60 @@ u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd) { flags = A_LOOP; // = 2 synthesisState->restart = FALSE; } - - if (nAdpcmSamplesProcessed == 0) { - aSetBuffer(cmd++, 0, DMEM_ADDR_COMPRESSED_ADPCM_DATA + a3, - DMEM_ADDR_UNCOMPRESSED_NOTE, s0 * 2); - aADPCMdec(cmd++, flags, - VIRTUAL_TO_PHYSICAL2(synthesisState->synthesisBuffers->adpcmdecState)); - sp130 = s2 * 2; - } else { - aSetBuffer(cmd++, 0, DMEM_ADDR_COMPRESSED_ADPCM_DATA + a3, - DMEM_ADDR_UNCOMPRESSED_NOTE + ALIGN(s5, 5), s0 * 2); - aADPCMdec(cmd++, flags, - VIRTUAL_TO_PHYSICAL2(synthesisState->synthesisBuffers->adpcmdecState)); - aDMEMMove(cmd++, DMEM_ADDR_UNCOMPRESSED_NOTE + ALIGN(s5, 5) + (s2 * 2), - DMEM_ADDR_UNCOMPRESSED_NOTE + s5, (s0 + s6_2 - s3) * 2); - } #else if (note->restart != FALSE) { aSetLoop(cmd++, VIRTUAL_TO_PHYSICAL2(audioBookSample->loop->state)); flags = A_LOOP; // = 2 note->restart = FALSE; } +#endif + nSamplesInThisIteration = s0 + s6 - s3; +#ifdef VERSION_EU if (nAdpcmSamplesProcessed == 0) { aSetBuffer(cmd++, 0, DMEM_ADDR_COMPRESSED_ADPCM_DATA + a3, DMEM_ADDR_UNCOMPRESSED_NOTE, s0 * 2); aADPCMdec(cmd++, flags, - VIRTUAL_TO_PHYSICAL2(note->synthesisBuffers->adpcmdecState)); + VIRTUAL_TO_PHYSICAL2(synthesisState->synthesisBuffers->adpcmdecState)); sp130 = s2 * 2; } else { + s5Aligned = ALIGN(s5, 5); aSetBuffer(cmd++, 0, DMEM_ADDR_COMPRESSED_ADPCM_DATA + a3, - DMEM_ADDR_UNCOMPRESSED_NOTE + ALIGN(s5, 5), s0 * 2); + DMEM_ADDR_UNCOMPRESSED_NOTE + s5Aligned, s0 * 2); aADPCMdec(cmd++, flags, - VIRTUAL_TO_PHYSICAL2(note->synthesisBuffers->adpcmdecState)); - aDMEMMove(cmd++, DMEM_ADDR_UNCOMPRESSED_NOTE + ALIGN(s5, 5) + (s2 * 2), - DMEM_ADDR_UNCOMPRESSED_NOTE + s5, (s0 + s6_2 - s3) * 2); + VIRTUAL_TO_PHYSICAL2(synthesisState->synthesisBuffers->adpcmdecState)); + aDMEMMove(cmd++, DMEM_ADDR_UNCOMPRESSED_NOTE + s5Aligned + (s2 * 2), + DMEM_ADDR_UNCOMPRESSED_NOTE + s5, (nSamplesInThisIteration) * 2); + } +#else + if (nAdpcmSamplesProcessed == 0) { + aSetBuffer(cmd++, 0, DMEM_ADDR_COMPRESSED_ADPCM_DATA + a3, DMEM_ADDR_UNCOMPRESSED_NOTE, s0 * 2); + aADPCMdec(cmd++, flags, VIRTUAL_TO_PHYSICAL2(note->synthesisBuffers->adpcmdecState)); + sp130 = s2 * 2; + } else { + aSetBuffer(cmd++, 0, DMEM_ADDR_COMPRESSED_ADPCM_DATA + a3, DMEM_ADDR_UNCOMPRESSED_NOTE + ALIGN(s5, 5), s0 * 2); + aADPCMdec(cmd++, flags, VIRTUAL_TO_PHYSICAL2(note->synthesisBuffers->adpcmdecState)); + aDMEMMove(cmd++, DMEM_ADDR_UNCOMPRESSED_NOTE + ALIGN(s5, 5) + (s2 * 2), DMEM_ADDR_UNCOMPRESSED_NOTE + s5, (nSamplesInThisIteration) * 2); } #endif - nAdpcmSamplesProcessed = nAdpcmSamplesProcessed + s0 + s6_2 - s3; - nSamplesInThisIteration = s0 + s6_2 - s3; + nAdpcmSamplesProcessed += nSamplesInThisIteration; + switch (flags) { case A_INIT: // = 1 sp130 = 0; - s5 += s0 * 2; + s5 = s0 * 2 + s5; break; case A_LOOP: // = 2 - s5 += nSamplesInThisIteration * 2; + s5 = nSamplesInThisIteration * 2 + s5; break; default: if (s5 != 0) { - s5 += nSamplesInThisIteration * 2; + s5 = nSamplesInThisIteration * 2 + s5; } else { - s5 = (nSamplesInThisIteration + s2) * 2; + s5 = (s2 + nSamplesInThisIteration) * 2; } break; } @@ -919,9 +938,9 @@ u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd) { #else note->samplePosInt = 0; note->finished = 1; - note->enabled = 0; + ((struct vNote *)note)->enabled = 0; #endif - break; // goto? doesn't matter, though + break; } #ifdef VERSION_EU if (restart) { @@ -948,33 +967,27 @@ u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd) { case 2: switch (curPart) { case 0: - aSetBuffer(cmd++, 0, DMEM_ADDR_UNCOMPRESSED_NOTE + sp130, - DMEM_ADDR_ADPCM_RESAMPLED, samplesLenAdjusted + 4); + aSetBuffer(cmd++, 0, DMEM_ADDR_UNCOMPRESSED_NOTE + sp130, DMEM_ADDR_ADPCM_RESAMPLED, samplesLenAdjusted + 4); #ifdef VERSION_EU - aResample(cmd++, A_INIT, 0xff60, - VIRTUAL_TO_PHYSICAL2( - synthesisState->synthesisBuffers->dummyResampleState)); + aResample(cmd++, A_INIT, 0xff60, VIRTUAL_TO_PHYSICAL2(synthesisState->synthesisBuffers->dummyResampleState)); #else - aResample(cmd++, A_INIT, 0xff60, - VIRTUAL_TO_PHYSICAL2( - note->synthesisBuffers->dummyResampleState)); + aResample(cmd++, A_INIT, 0xff60, VIRTUAL_TO_PHYSICAL2(note->synthesisBuffers->dummyResampleState)); #endif resampledTempLen = samplesLenAdjusted + 4; noteSamplesDmemAddrBeforeResampling = DMEM_ADDR_ADPCM_RESAMPLED + 4; #ifdef VERSION_EU - if (noteSubEu->finished != 0) { + if (noteSubEu->finished != FALSE) { #else - if (note->finished != 0) { + if (note->finished != FALSE) { #endif - aClearBuffer(cmd++, - DMEM_ADDR_ADPCM_RESAMPLED + resampledTempLen, - samplesLenAdjusted + 0x10); + aClearBuffer(cmd++, DMEM_ADDR_ADPCM_RESAMPLED + resampledTempLen, samplesLenAdjusted + 0x10); } break; case 1: aSetBuffer(cmd++, 0, DMEM_ADDR_UNCOMPRESSED_NOTE + sp130, - DMEM_ADDR_ADPCM_RESAMPLED2, samplesLenAdjusted + 8); + DMEM_ADDR_ADPCM_RESAMPLED2, + samplesLenAdjusted + 8); #ifdef VERSION_EU aResample(cmd++, A_INIT, 0xff60, VIRTUAL_TO_PHYSICAL2( @@ -992,19 +1005,16 @@ u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd) { } #ifdef VERSION_EU - if (noteSubEu->finished != 0) { + if (noteSubEu->finished != FALSE) { #else - if (note->finished != 0) { + if (note->finished != FALSE) { #endif - // ("break;" doesn't match) - flags = 0; - goto out; + break; } } - - flags = 0; } - out: + + flags = 0; #ifdef VERSION_EU if (noteSubEu->needsInit == TRUE) { @@ -1030,9 +1040,9 @@ u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd) { } else if (note->headsetPanLeft != 0 || note->prevHeadsetPanLeft != 0) { s0 = 2; #else - if (note->noteSubEu.headsetPanRight != 0 || synthesisState->prevHeadsetPanRight != 0) { + if (noteSubEu->headsetPanRight != 0 || synthesisState->prevHeadsetPanRight != 0) { s0 = 1; - } else if (note->noteSubEu.headsetPanLeft != 0 || synthesisState->prevHeadsetPanLeft != 0) { + } else if (noteSubEu->headsetPanLeft != 0 || synthesisState->prevHeadsetPanLeft != 0) { s0 = 2; #endif } else { @@ -1040,7 +1050,7 @@ u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd) { } #ifdef VERSION_EU - cmd = process_envelope(cmd, noteSubEu, synthesisState, bufLen, 0, s0); + cmd = process_envelope(cmd, noteSubEu, synthesisState, bufLen, 0, s0, flags); #else cmd = process_envelope(cmd, note, bufLen, 0, s0, flags); #endif @@ -1068,13 +1078,6 @@ u64 *synthesis_process_notes(u16 *aiBuf, s32 bufLen, u64 *cmd) { return cmd; } -#elif defined(VERSION_JP) || defined(VERSION_SH) // todo: extract this nonmatching if applicable. -GLOBAL_ASM("asm/non_matchings/synthesis_process_notes_jp.s") -#elif defined(VERSION_US) -GLOBAL_ASM("asm/non_matchings/synthesis_process_notes_us.s") -#elif defined(VERSION_EU) -GLOBAL_ASM("asm/non_matchings/eu/audio/synthesis_process_note.s") -#endif #ifdef VERSION_EU u64 *load_wave_samples(u64 *cmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *synthesisState, s32 nSamplesToLoad) { @@ -1103,15 +1106,11 @@ u64 *load_wave_samples(u64 *cmd, struct Note *note, s32 nSamplesToLoad) { aSetBuffer(cmd++, /*flags*/ 0, /*dmemin*/ DMEM_ADDR_UNCOMPRESSED_NOTE, /*dmemout*/ 0, /*count*/ sizeof(note->synthesisBuffers->samples)); aLoadBuffer(cmd++, VIRTUAL_TO_PHYSICAL2(note->synthesisBuffers->samples)); - note->samplePosInt = (note->sampleCount - 1) & note->samplePosInt; + note->samplePosInt &= (note->sampleCount - 1); a3 = 64 - note->samplePosInt; if (a3 < nSamplesToLoad) { for (i = 0; i <= (nSamplesToLoad - a3 + 63) / 64 - 1; i++) { - aDMEMMove(cmd++, - /*dmemin*/ DMEM_ADDR_UNCOMPRESSED_NOTE, - /*dmemout*/ DMEM_ADDR_UNCOMPRESSED_NOTE - + (1 + i) * sizeof(note->synthesisBuffers->samples), - /*count*/ sizeof(note->synthesisBuffers->samples)); + aDMEMMove(cmd++, /*dmemin*/ DMEM_ADDR_UNCOMPRESSED_NOTE, /*dmemout*/ DMEM_ADDR_UNCOMPRESSED_NOTE + (1 + i) * sizeof(note->synthesisBuffers->samples), /*count*/ sizeof(note->synthesisBuffers->samples)); } } return cmd; @@ -1153,7 +1152,7 @@ u64 *process_envelope_inner(u64 *cmd, struct Note *note, s32 nSamples, u16 inBuf UNUSED u8 pad2[8]; s32 rampLeft, rampRight; #else -u64 *process_envelope(u64 *cmd, struct NoteSubEu *note, struct NoteSynthesisState *synthesisState, s32 nSamples, u16 inBuf, s32 headsetPanSettings) { +u64 *process_envelope(u64 *cmd, struct NoteSubEu *note, struct NoteSynthesisState *synthesisState, s32 nSamples, u16 inBuf, s32 headsetPanSettings, UNUSED u32 flags) { UNUSED u8 pad1[20]; u16 sourceRight; u16 sourceLeft; @@ -1225,7 +1224,7 @@ u64 *process_envelope(u64 *cmd, struct NoteSubEu *note, struct NoteSynthesisStat #ifdef VERSION_EU if (targetLeft == sourceLeft && targetRight == sourceRight && !note->envMixerNeedsInit) { #else - if (vol->sourceLeft == vol->targetLeft && vol->sourceRight == vol->targetRight + if (vol->targetLeft == vol->sourceLeft && vol->targetRight == vol->sourceRight && !note->envMixerNeedsInit) { #endif mixerFlags = A_CONTINUE; @@ -1308,7 +1307,6 @@ u64 *note_apply_headset_pan_effects(u64 *cmd, struct Note *note, s32 bufLen, s32 #ifndef VERSION_EU u16 prevPanShift; u16 panShift; - UNUSED s32 padding[11]; #else u8 prevPanShift; u8 panShift; @@ -1319,24 +1317,22 @@ u64 *note_apply_headset_pan_effects(u64 *cmd, struct Note *note, s32 bufLen, s32 case 1: dest = DMEM_ADDR_LEFT_CH; #ifndef VERSION_EU - note->prevHeadsetPanLeft = 0; panShift = note->headsetPanRight; #else panShift = noteSubEu->headsetPanRight; - note->prevHeadsetPanLeft = 0; #endif + note->prevHeadsetPanLeft = 0; prevPanShift = note->prevHeadsetPanRight; note->prevHeadsetPanRight = panShift; break; case 2: dest = DMEM_ADDR_RIGHT_CH; #ifndef VERSION_EU - note->prevHeadsetPanRight = 0; panShift = note->headsetPanLeft; #else panShift = noteSubEu->headsetPanLeft; - note->prevHeadsetPanRight = 0; #endif + note->prevHeadsetPanRight = 0; prevPanShift = note->prevHeadsetPanLeft; note->prevHeadsetPanLeft = panShift; @@ -1365,26 +1361,27 @@ u64 *note_apply_headset_pan_effects(u64 *cmd, struct Note *note, s32 bufLen, s32 #else pitch = (bufLen << 0xf) / (panShift + bufLen - prevPanShift + 8); #endif - aSetBuffer(cmd++, 0, DMEM_ADDR_NOTE_PAN_TEMP + 8, DMEM_ADDR_TEMP, - panShift + bufLen - prevPanShift); + aSetBuffer(cmd++, 0, DMEM_ADDR_NOTE_PAN_TEMP + 8, DMEM_ADDR_TEMP, panShift + bufLen - prevPanShift); aResample(cmd++, 0, pitch, VIRTUAL_TO_PHYSICAL2(note->synthesisBuffers->panResampleState)); } else { - pitch = (panShift == 0) ? (bufLen << 0xf) / (bufLen - prevPanShift - 4) - : (bufLen << 0xf) / (bufLen + panShift - prevPanShift); + if (panShift == 0) { + pitch = (bufLen << 0xf) / (bufLen - prevPanShift - 4); + } else { + pitch = (bufLen << 0xf) / (bufLen + panShift - prevPanShift); + } + #if defined(VERSION_EU) && !defined(AVOID_UB) if (unkDebug) { // UB } #endif - aSetBuffer(cmd++, 0, DMEM_ADDR_NOTE_PAN_TEMP, DMEM_ADDR_TEMP, - panShift + bufLen - prevPanShift); + aSetBuffer(cmd++, 0, DMEM_ADDR_NOTE_PAN_TEMP, DMEM_ADDR_TEMP, panShift + bufLen - prevPanShift); aResample(cmd++, 0, pitch, VIRTUAL_TO_PHYSICAL2(note->synthesisBuffers->panResampleState)); } if (prevPanShift != 0) { aSetBuffer(cmd++, 0, DMEM_ADDR_NOTE_PAN_TEMP, 0, prevPanShift); aLoadBuffer(cmd++, VIRTUAL_TO_PHYSICAL2(note->synthesisBuffers->panSamplesBuffer)); - aDMEMMove(cmd++, DMEM_ADDR_TEMP, DMEM_ADDR_NOTE_PAN_TEMP + prevPanShift, - panShift + bufLen - prevPanShift); + aDMEMMove(cmd++, DMEM_ADDR_TEMP, DMEM_ADDR_NOTE_PAN_TEMP + prevPanShift, panShift + bufLen - prevPanShift); } else { aDMEMMove(cmd++, DMEM_ADDR_TEMP, DMEM_ADDR_NOTE_PAN_TEMP, panShift + bufLen - prevPanShift); } @@ -1432,7 +1429,12 @@ void note_set_vel_pan_reverb(struct Note *note, f32 velocity, f32 pan, u8 reverb #endif if (note->stereoHeadsetEffects && gSoundMode == SOUND_MODE_HEADSET) { s8 smallPanIndex; - smallPanIndex = MIN((s8)(pan * 10.0f), 9); + s8 temp = (s8)(pan * 10.0f); + if (temp < 9) { + smallPanIndex = temp; + } else { + smallPanIndex = 9; + } note->headsetPanLeft = gHeadsetPanQuantization[smallPanIndex]; note->headsetPanRight = gHeadsetPanQuantization[9 - smallPanIndex]; note->stereoStrongRight = FALSE; @@ -1441,8 +1443,10 @@ void note_set_vel_pan_reverb(struct Note *note, f32 velocity, f32 pan, u8 reverb volLeft = gHeadsetPanVolume[panIndex]; volRight = gHeadsetPanVolume[127 - panIndex]; } else if (note->stereoHeadsetEffects && gSoundMode == SOUND_MODE_STEREO) { - u8 strongLeft = FALSE; - u8 strongRight = FALSE; + u8 strongLeft; + u8 strongRight; + strongLeft = FALSE; + strongRight = FALSE; note->headsetPanLeft = 0; note->headsetPanRight = 0; note->usesHeadsetPanEffects = FALSE; @@ -1463,7 +1467,9 @@ void note_set_vel_pan_reverb(struct Note *note, f32 velocity, f32 pan, u8 reverb volRight = gDefaultPanVolume[127 - panIndex]; } - velocity = MAX(velocity, 0); + if (velocity < 0) { + velocity = 0; + } #ifdef VERSION_JP note->targetVolLeft = (u16)(velocity * volLeft) & ~0x80FF; // 0x7F00, but that doesn't match note->targetVolRight = (u16)(velocity * volRight) & ~0x80FF; diff --git a/src/buffers/buffers.c b/src/buffers/buffers.c index 41843970..d05bea38 100644 --- a/src/buffers/buffers.c +++ b/src/buffers/buffers.c @@ -3,7 +3,7 @@ #include "buffers.h" ALIGNED8 u8 gDecompressionHeap[0xD000]; -#ifdef VERSION_EU +#if defined(VERSION_EU) || defined(VERSION_SH) ALIGNED16 u8 gAudioHeap[DOUBLE_SIZE_ON_64_BIT(0x31200) - 0x3800]; #else ALIGNED16 u8 gAudioHeap[DOUBLE_SIZE_ON_64_BIT(0x31200)]; @@ -13,6 +13,9 @@ ALIGNED8 u8 gIdleThreadStack[0x800]; ALIGNED8 u8 gThread3Stack[0x2000]; ALIGNED8 u8 gThread4Stack[0x2000]; ALIGNED8 u8 gThread5Stack[0x2000]; +#ifdef VERSION_SH +ALIGNED8 u8 gThread6Stack[0x2000]; +#endif // 0x400 bytes ALIGNED8 u8 gGfxSPTaskStack[SP_DRAM_STACK_SIZE8]; // 0xc00 bytes for f3dex, 0x900 otherwise diff --git a/src/buffers/buffers.h b/src/buffers/buffers.h index 41968248..c01aa435 100644 --- a/src/buffers/buffers.h +++ b/src/buffers/buffers.h @@ -3,7 +3,7 @@ #include "types.h" #include "game/save_file.h" -#include "game/display.h" +#include "game/game_init.h" extern u8 gDecompressionHeap[]; @@ -17,6 +17,9 @@ extern u8 gIdleThreadStack[]; extern u8 gThread3Stack[]; extern u8 gThread4Stack[]; extern u8 gThread5Stack[]; +#ifdef VERSION_SH +extern u8 gThread6Stack[]; +#endif extern u8 gGfxSPTaskYieldBuffer[]; diff --git a/src/engine/behavior_script.c b/src/engine/behavior_script.c index 3e963221..edd52478 100644 --- a/src/engine/behavior_script.c +++ b/src/engine/behavior_script.c @@ -6,22 +6,36 @@ #include "graph_node.h" #include "surface_collision.h" #include "game/object_helpers.h" -#include "game/object_helpers2.h" #include "game/mario.h" -#include "game/display.h" +#include "game/game_init.h" #include "game/obj_behaviors_2.h" #include "behavior_data.h" #include "game/object_list_processor.h" +// Macros for retrieving arguments from behavior scripts. +#define BHV_CMD_GET_1ST_U8(index) (u8)((gCurBhvCommand[index] >> 24) & 0xFF) // unused +#define BHV_CMD_GET_2ND_U8(index) (u8)((gCurBhvCommand[index] >> 16) & 0xFF) +#define BHV_CMD_GET_3RD_U8(index) (u8)((gCurBhvCommand[index] >> 8) & 0xFF) +#define BHV_CMD_GET_4TH_U8(index) (u8)((gCurBhvCommand[index]) & 0xFF) + +#define BHV_CMD_GET_1ST_S16(index) (s16)(gCurBhvCommand[index] >> 16) +#define BHV_CMD_GET_2ND_S16(index) (s16)(gCurBhvCommand[index] & 0xFFFF) + +#define BHV_CMD_GET_U32(index) (u32)(gCurBhvCommand[index]) +#define BHV_CMD_GET_VPTR(index) (void *)(gCurBhvCommand[index]) + +#define BHV_CMD_GET_ADDR_OF_CMD(index) (uintptr_t)(&gCurBhvCommand[index]) + static u16 gRandomSeed16; -// unused -static void func_80383B70(void *segptr) { - gBehCommand = segmented_to_virtual(segptr); - gCurrentObject->stackIndex = 0; +// Unused function that directly jumps to a behavior command and resets the object's stack index. +static void goto_behavior_unused(const BehaviorScript *bhvAddr) { + gCurBhvCommand = segmented_to_virtual(bhvAddr); + gCurrentObject->bhvStackIndex = 0; } -u16 RandomU16(void) { +// Generate a pseudorandom integer from 0 to 65535 from the random seed, and update the seed. +u16 random_u16(void) { u16 temp1, temp2; if (gRandomSeed16 == 22026) { @@ -49,779 +63,936 @@ u16 RandomU16(void) { return gRandomSeed16; } -f32 RandomFloat(void) { - f32 rnd = RandomU16(); +// Generate a pseudorandom float from 0 to 1. +f32 random_float(void) { + f32 rnd = random_u16(); return rnd / (double) 0x10000; } -s32 RandomSign(void) { - if (RandomU16() >= 0x7FFF) { +// Return either -1 or 1 with a 50:50 chance. +s32 random_sign(void) { + if (random_u16() >= 0x7FFF) { return 1; } else { return -1; } } -void func_80383D68(struct Object *object) { - object->header.gfx.pos[0] = object->oPosX; - object->header.gfx.pos[1] = object->oPosY + object->oGraphYOffset; - object->header.gfx.pos[2] = object->oPosZ; +// Update an object's graphical position and rotation to match its real position and rotation. +void obj_update_gfx_pos_and_angle(struct Object *obj) { + obj->header.gfx.pos[0] = obj->oPosX; + obj->header.gfx.pos[1] = obj->oPosY + obj->oGraphYOffset; + obj->header.gfx.pos[2] = obj->oPosZ; - object->header.gfx.angle[0] = object->oFaceAnglePitch & 0xFFFF; - object->header.gfx.angle[1] = object->oFaceAngleYaw & 0xFFFF; - object->header.gfx.angle[2] = object->oFaceAngleRoll & 0xFFFF; + obj->header.gfx.angle[0] = obj->oFaceAnglePitch & 0xFFFF; + obj->header.gfx.angle[1] = obj->oFaceAngleYaw & 0xFFFF; + obj->header.gfx.angle[2] = obj->oFaceAngleRoll & 0xFFFF; } -static void cur_object_stack_push(uintptr_t value) { - gCurrentObject->stack[gCurrentObject->stackIndex] = value; - gCurrentObject->stackIndex++; +// Push the address of a behavior command to the object's behavior stack. +static void cur_obj_bhv_stack_push(uintptr_t bhvAddr) { + gCurrentObject->bhvStack[gCurrentObject->bhvStackIndex] = bhvAddr; + gCurrentObject->bhvStackIndex++; } -static uintptr_t cur_object_stack_pop(void) { - uintptr_t value; - gCurrentObject->stackIndex--; - value = gCurrentObject->stack[gCurrentObject->stackIndex]; - return value; +// Retrieve the last behavior command address from the object's behavior stack. +static uintptr_t cur_obj_bhv_stack_pop(void) { + uintptr_t bhvAddr; + + gCurrentObject->bhvStackIndex--; + bhvAddr = gCurrentObject->bhvStack[gCurrentObject->bhvStackIndex]; + + return bhvAddr; } -static void Unknown80383E44(void) // ? -{ +static void stub_behavior_script_1(void) { for (;;) { ; } } -static s32 beh_cmd_hide(void) { +// Command 0x22: Hides the current object. +// Usage: HIDE() +static s32 bhv_cmd_hide(void) { cur_obj_hide(); - gBehCommand++; - return BEH_CONTINUE; + + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_disable_rendering(void) { +// Command 0x35: Disables rendering for the object. +// Usage: DISABLE_RENDERING() +static s32 bhv_cmd_disable_rendering(void) { gCurrentObject->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE; - gBehCommand++; - return BEH_CONTINUE; + + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_billboard(void) { +// Command 0x21: Billboards the current object, making it always face the camera. +// Usage: BILLBOARD() +static s32 bhv_cmd_billboard(void) { gCurrentObject->header.gfx.node.flags |= GRAPH_RENDER_BILLBOARD; - gBehCommand++; - return BEH_CONTINUE; + + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_set_model(void) { - s32 modelID = (s16)(gBehCommand[0] & 0xFFFF); +// Command 0x1B: Sets the current model ID of the object. +// Usage: SET_MODEL(modelID) +static s32 bhv_cmd_set_model(void) { + s32 modelID = BHV_CMD_GET_2ND_S16(0); + gCurrentObject->header.gfx.sharedChild = gLoadedGraphNodes[modelID]; - gBehCommand++; - return BEH_CONTINUE; + + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_spawn_child(void) { - u32 model = (u32) gBehCommand[1]; - const BehaviorScript *behavior = (const BehaviorScript *) gBehCommand[2]; +// Command 0x1C: Spawns a child object with the specified model and behavior. +// Usage: SPAWN_CHILD(modelID, behavior) +static s32 bhv_cmd_spawn_child(void) { + u32 model = BHV_CMD_GET_U32(1); + const BehaviorScript *behavior = BHV_CMD_GET_VPTR(2); struct Object *child = spawn_object_at_origin(gCurrentObject, 0, model, behavior); - obj_copy_pos_and_angle(child, gCurrentObject); - gBehCommand += 3; - return BEH_CONTINUE; + gCurBhvCommand += 3; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_spawn_obj(void) { - u32 model = (u32) gBehCommand[1]; - const BehaviorScript *behavior = (const BehaviorScript *) gBehCommand[2]; +// Command 0x2C: Spawns a new object with the specified model and behavior. +// Usage: SPAWN_OBJ(modelID, behavior) +static s32 bhv_cmd_spawn_obj(void) { + u32 model = BHV_CMD_GET_U32(1); + const BehaviorScript *behavior = BHV_CMD_GET_VPTR(2); struct Object *object = spawn_object_at_origin(gCurrentObject, 0, model, behavior); - obj_copy_pos_and_angle(object, gCurrentObject); - + // TODO: Does this cmd need renaming? This line is the only difference between this and the above func. gCurrentObject->prevObj = object; - gBehCommand += 3; - return BEH_CONTINUE; + gCurBhvCommand += 3; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_spawn_child_with_param(void) { - u32 behParam = (s16)(gBehCommand[0] & 0xFFFF); - u32 model = (u32) gBehCommand[1]; - const BehaviorScript *behavior = (const BehaviorScript *) gBehCommand[2]; - - struct Object *child = spawn_object_at_origin(gCurrentObject, 0, model, behavior); +// Command 0x29: Spawns a child object with the specified model and behavior, plus a behavior param. +// Usage: SPAWN_CHILD_WITH_PARAM(bhvParam, modelID, behavior) +static s32 bhv_cmd_spawn_child_with_param(void) { + u32 bhvParam = BHV_CMD_GET_2ND_S16(0); + u32 modelID = BHV_CMD_GET_U32(1); + const BehaviorScript *behavior = BHV_CMD_GET_VPTR(2); + struct Object *child = spawn_object_at_origin(gCurrentObject, 0, modelID, behavior); obj_copy_pos_and_angle(child, gCurrentObject); + child->oBehParams2ndByte = bhvParam; - child->oBehParams2ndByte = behParam; - - gBehCommand += 3; - return BEH_CONTINUE; + gCurBhvCommand += 3; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_deactivate(void) { +// Command 0x1D: Exits the behavior script and despawns the object. +// Usage: DEACTIVATE() +static s32 bhv_cmd_deactivate(void) { gCurrentObject->activeFlags = 0; - return BEH_BREAK; + return BHV_PROC_BREAK; } -static s32 beh_cmd_break(void) { - return BEH_BREAK; +// Command 0x0A: Exits the behavior script. +// Usage: BREAK() +static s32 bhv_cmd_break(void) { + return BHV_PROC_BREAK; } -// unused -static s32 beh_cmd_break2(void) { - return BEH_BREAK; +// Command 0x0B: Exits the behavior script, unused. +// Usage: BREAK_UNUSED() +static s32 bhv_cmd_break_unused(void) { + return BHV_PROC_BREAK; } -static s32 beh_cmd_call(void) { +// Command 0x02: Jumps to a new behavior command and stores the return address in the object's behavior stack. +// Usage: CALL(addr) +static s32 bhv_cmd_call(void) { const BehaviorScript *jumpAddress; + gCurBhvCommand++; + + cur_obj_bhv_stack_push(BHV_CMD_GET_ADDR_OF_CMD(1)); // Store address of the next bhv command in the stack. + jumpAddress = segmented_to_virtual(BHV_CMD_GET_VPTR(0)); + gCurBhvCommand = jumpAddress; // Jump to the new address. - gBehCommand++; - cur_object_stack_push((uintptr_t)(gBehCommand + 1)); - jumpAddress = segmented_to_virtual((const BehaviorScript *) gBehCommand[0]); - gBehCommand = jumpAddress; - - return BEH_CONTINUE; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_return(void) { - gBehCommand = (const BehaviorScript *) cur_object_stack_pop(); - return BEH_CONTINUE; +// Command 0x03: Jumps back to the behavior command stored in the object's behavior stack. Used after CALL. +// Usage: RETURN() +static s32 bhv_cmd_return(void) { + gCurBhvCommand = (const BehaviorScript *) cur_obj_bhv_stack_pop(); // Retrieve command address and jump to it. + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_delay(void) { - s16 arg0 = (s16)(gBehCommand[0] & 0xFFFF); +// Command 0x01: Delays the behavior script for a certain number of frames. +// Usage: DELAY(num) +static s32 bhv_cmd_delay(void) { + s16 num = BHV_CMD_GET_2ND_S16(0); - if (gCurrentObject->unk1F4 < arg0 - 1) { - gCurrentObject->unk1F4++; + if (gCurrentObject->bhvDelayTimer < num - 1) { + gCurrentObject->bhvDelayTimer++; // Increment timer } else { - gCurrentObject->unk1F4 = 0; - gBehCommand++; + gCurrentObject->bhvDelayTimer = 0; + gCurBhvCommand++; // Delay ended, move to next bhv command (note: following commands will not execute until next frame) } - return BEH_BREAK; + return BHV_PROC_BREAK; } -static s32 beh_cmd_delay_var(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - s32 arg0 = cur_object_get_int(objectOffset); +// Command 0x25: Delays the behavior script for the number of frames given by the value of the specified field. +// Usage: DELAY_VAR(field) +static s32 bhv_cmd_delay_var(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); + s32 num = cur_obj_get_int(field); - if (gCurrentObject->unk1F4 < (arg0 - 1)) { - gCurrentObject->unk1F4++; + if (gCurrentObject->bhvDelayTimer < num - 1) { + gCurrentObject->bhvDelayTimer++; // Increment timer } else { - gCurrentObject->unk1F4 = 0; - gBehCommand++; + gCurrentObject->bhvDelayTimer = 0; + gCurBhvCommand++; // Delay ended, move to next bhv command } - return BEH_BREAK; + return BHV_PROC_BREAK; } -static s32 beh_cmd_goto(void) { - gBehCommand++; - gBehCommand = segmented_to_virtual((const BehaviorScript *) gBehCommand[0]); - return BEH_CONTINUE; +// Command 0x04: Jumps to a new behavior script without saving anything. +// Usage: GOTO(addr) +static s32 bhv_cmd_goto(void) { + gCurBhvCommand++; // Useless + gCurBhvCommand = segmented_to_virtual(BHV_CMD_GET_VPTR(0)); // Jump directly to address + return BHV_PROC_CONTINUE; } -// unused -static s32 Behavior26(void) { - s32 value = (u8)(gBehCommand[0] >> 16) & 0xFF; +// Command 0x26: Unused. Marks the start of a loop that will repeat a certain number of times. +// Uses a u8 as the argument, instead of a s16 like the other version does. +// Usage: BEGIN_REPEAT_UNUSED(count) +static s32 bhv_cmd_begin_repeat_unused(void) { + s32 count = BHV_CMD_GET_2ND_U8(0); - cur_object_stack_push((uintptr_t)(gBehCommand + 1)); - cur_object_stack_push(value); + cur_obj_bhv_stack_push(BHV_CMD_GET_ADDR_OF_CMD(1)); // Store address of the first command of the loop in the stack + cur_obj_bhv_stack_push(count); // Store repeat count in the stack too - gBehCommand++; - - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_begin_repeat(void) { - s32 count = (s16)(gBehCommand[0] & 0xFFFF); +// Command 0x05: Marks the start of a loop that will repeat a certain number of times. +// Usage: BEGIN_REPEAT(count) +static s32 bhv_cmd_begin_repeat(void) { + s32 count = BHV_CMD_GET_2ND_S16(0); - cur_object_stack_push((uintptr_t)(gBehCommand + 1)); - cur_object_stack_push(count); + cur_obj_bhv_stack_push(BHV_CMD_GET_ADDR_OF_CMD(1)); // Store address of the first command of the loop in the stack + cur_obj_bhv_stack_push(count); // Store repeat count in the stack too - gBehCommand++; - - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_end_repeat(void) { - u32 count = (u32) cur_object_stack_pop(); - +// Command 0x06: Marks the end of a repeating loop. +// Usage: END_REPEAT() +static s32 bhv_cmd_end_repeat(void) { + u32 count = cur_obj_bhv_stack_pop(); // Retrieve loop count from the stack. count--; + if (count != 0) { - gBehCommand = (const BehaviorScript *) cur_object_stack_pop(); - cur_object_stack_push((uintptr_t) gBehCommand); - cur_object_stack_push(count); - } else { - cur_object_stack_pop(); - gBehCommand++; + gCurBhvCommand = (const BehaviorScript *) cur_obj_bhv_stack_pop(); // Jump back to the first command in the loop + // Save address and count to the stack again + cur_obj_bhv_stack_push(BHV_CMD_GET_ADDR_OF_CMD(0)); + cur_obj_bhv_stack_push(count); + } else { // Finished iterating over the loop + cur_obj_bhv_stack_pop(); // Necessary to remove address from the stack + gCurBhvCommand++; } - return BEH_BREAK; + // Don't execute following commands until next frame + return BHV_PROC_BREAK; } -static s32 beh_cmd_end_repeat_continue(void) { - u32 count = (u32) cur_object_stack_pop(); - +// Command 0x07: Also marks the end of a repeating loop, but continues executing commands following the loop on the same frame. +// Usage: END_REPEAT_CONTINUE() +static s32 bhv_cmd_end_repeat_continue(void) { + u32 count = cur_obj_bhv_stack_pop(); count--; + if (count != 0) { - gBehCommand = (const BehaviorScript *) cur_object_stack_pop(); - cur_object_stack_push((uintptr_t) gBehCommand); - cur_object_stack_push(count); - } else { - cur_object_stack_pop(); - gBehCommand++; + gCurBhvCommand = (const BehaviorScript *) cur_obj_bhv_stack_pop(); // Jump back to the first command in the loop + // Save address and count to the stack again + cur_obj_bhv_stack_push(BHV_CMD_GET_ADDR_OF_CMD(0)); + cur_obj_bhv_stack_push(count); + } else { // Finished iterating over the loop + cur_obj_bhv_stack_pop(); // Necessary to remove address from the stack + gCurBhvCommand++; } - return BEH_CONTINUE; + // Start executing following commands immediately + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_begin_loop(void) { - cur_object_stack_push((uintptr_t)(gBehCommand + 1)); +// Command 0x08: Marks the beginning of an infinite loop. +// Usage: BEGIN_LOOP() +static s32 bhv_cmd_begin_loop(void) { + cur_obj_bhv_stack_push(BHV_CMD_GET_ADDR_OF_CMD(1)); // Store address of the first command of the loop in the stack - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_end_loop(void) { - gBehCommand = (const BehaviorScript *) cur_object_stack_pop(); - cur_object_stack_push((uintptr_t) gBehCommand); +// Command 0x09: Marks the end of an infinite loop. +// Usage: END_LOOP() +static s32 bhv_cmd_end_loop(void) { + gCurBhvCommand = (const BehaviorScript *) cur_obj_bhv_stack_pop(); // Jump back to the first command in the loop + cur_obj_bhv_stack_push(BHV_CMD_GET_ADDR_OF_CMD(0)); // Save address to the stack again - return BEH_BREAK; + return BHV_PROC_BREAK; } -typedef void (*BehaviorCallProc)(void); +// Command 0x0C: Executes a native game function. Function must not take or return any values. +// Usage: CALL_NATIVE(func) +typedef void (*NativeBhvFunc)(void); +static s32 bhv_cmd_call_native(void) { + NativeBhvFunc behaviorFunc = BHV_CMD_GET_VPTR(1); -static s32 beh_cmd_call_native(void) { - BehaviorCallProc behavior_proc = (BehaviorCallProc) gBehCommand[1]; + behaviorFunc(); - behavior_proc(); - - gBehCommand += 2; - return BEH_CONTINUE; + gCurBhvCommand += 2; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_set_float(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - f32 value = (s16)(gBehCommand[0] & 0xFFFF); +// Command 0x0E: Sets the specified field to a float. +// Usage: SET_FLOAT(field, value) +static s32 bhv_cmd_set_float(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); + f32 value = BHV_CMD_GET_2ND_S16(0); - cur_object_set_float(objectOffset, value); + cur_obj_set_float(field, value); - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_set_int(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - s16 value = (s16)(gBehCommand[0] & 0xFFFF); +// Command 0x10: Sets the specified field to an integer. +// Usage: SET_INT(field, value) +static s32 bhv_cmd_set_int(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); + s16 value = BHV_CMD_GET_2ND_S16(0); - cur_object_set_int(objectOffset, value); + cur_obj_set_int(field, value); - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -// unused -static s32 Behavior36(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - u32 value = (s16)(gBehCommand[1] & 0xFFFF); +// Command 0x36: Unused. Sets the specified field to an integer. Wastes 4 bytes of space for no reason at all. +static s32 bhv_cmd_set_int_unused(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); + s32 value = BHV_CMD_GET_2ND_S16(1); // Taken from 2nd word instead of 1st - cur_object_set_int(objectOffset, value); + cur_obj_set_int(field, value); - gBehCommand += 2; - return BEH_CONTINUE; + gCurBhvCommand += 2; // Twice as long + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_set_random_float(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - f32 min = (s16)(gBehCommand[0] & 0xFFFF); - f32 max = (s16)(gBehCommand[1] >> 16); +// Command 0x14: Sets the specified field to a random float in the given range. +// Usage: SET_RANDOM_FLOAT(field, min, range) +static s32 bhv_cmd_set_random_float(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); + f32 min = BHV_CMD_GET_2ND_S16(0); + f32 range = BHV_CMD_GET_1ST_S16(1); - cur_object_set_float(objectOffset, (max * RandomFloat()) + min); + cur_obj_set_float(field, (range * random_float()) + min); - gBehCommand += 2; - return BEH_CONTINUE; + gCurBhvCommand += 2; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_set_random_int(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - s32 min = (s16)(gBehCommand[0] & 0xFFFF); - s32 max = (s16)(gBehCommand[1] >> 16); +// Command 0x15: Sets the specified field to a random integer in the given range. +// Usage: SET_RANDOM_INT(field, min, range) +static s32 bhv_cmd_set_random_int(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); + s32 min = BHV_CMD_GET_2ND_S16(0); + s32 range = BHV_CMD_GET_1ST_S16(1); - cur_object_set_int(objectOffset, (s32)(max * RandomFloat()) + min); + cur_obj_set_int(field, (s32)(range * random_float()) + min); - gBehCommand += 2; - return BEH_CONTINUE; + gCurBhvCommand += 2; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_set_int_rand_rshift(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - s32 min = (s16)(gBehCommand[0] & 0xFFFF); - s32 rshift = (s16)(gBehCommand[1] >> 16); +// Command 0x13: Gets a random short, right shifts it the specified amount and adds min to it, then sets the specified field to that value. +// Usage: SET_INT_RAND_RSHIFT(field, min, rshift) +static s32 bhv_cmd_set_int_rand_rshift(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); + s32 min = BHV_CMD_GET_2ND_S16(0); + s32 rshift = BHV_CMD_GET_1ST_S16(1); - cur_object_set_int(objectOffset, (RandomU16() >> rshift) + min); + cur_obj_set_int(field, (random_u16() >> rshift) + min); - gBehCommand += 2; - return BEH_CONTINUE; + gCurBhvCommand += 2; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_add_random_float(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - f32 min = (s16)(gBehCommand[0] & 0xFFFF); - f32 max = (s16)(gBehCommand[1] >> 16); +// Command 0x16: Adds a random float in the given range to the specified field. +// Usage: ADD_RANDOM_FLOAT(field, min, range) +static s32 bhv_cmd_add_random_float(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); + f32 min = BHV_CMD_GET_2ND_S16(0); + f32 range = BHV_CMD_GET_1ST_S16(1); - cur_object_set_float(objectOffset, - (cur_object_get_float(objectOffset) + min) + (max * RandomFloat())); + cur_obj_set_float(field, cur_obj_get_float(field) + min + (range * random_float())); - gBehCommand += 2; - return BEH_CONTINUE; + gCurBhvCommand += 2; + return BHV_PROC_CONTINUE; } -// unused -static s32 beh_cmd_add_int_rand_rshift(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - s32 min = (s16)(gBehCommand[0] & 0xFFFF); - s32 rshift = (s16)(gBehCommand[1] >> 16); - s32 rnd = RandomU16(); +// Command 0x17: Gets a random short, right shifts it the specified amount and adds min to it, then adds the value to the specified field. Unused. +// Usage: ADD_INT_RAND_RSHIFT(field, min, rshift) +static s32 bhv_cmd_add_int_rand_rshift(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); + s32 min = BHV_CMD_GET_2ND_S16(0); + s32 rshift = BHV_CMD_GET_1ST_S16(1); + s32 rnd = random_u16(); - cur_object_set_int(objectOffset, (cur_object_get_int(objectOffset) + min) + (rnd >> rshift)); + cur_obj_set_int(field, (cur_obj_get_int(field) + min) + (rnd >> rshift)); - gBehCommand += 2; - return BEH_CONTINUE; + gCurBhvCommand += 2; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_add_float(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - f32 value = (s16)(gBehCommand[0] & 0xFFFF); +// Command 0x0D: Adds a float to the specified field. +// Usage: ADD_FLOAT(field, value) +static s32 bhv_cmd_add_float(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); + f32 value = BHV_CMD_GET_2ND_S16(0); - cur_object_add_float(objectOffset, value); + cur_obj_add_float(field, value); - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_add_int(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - s16 value = gBehCommand[0] & 0xFFFF; +// Command 0x0F: Adds an integer to the specified field. +// Usage: ADD_INT(field, value) +static s32 bhv_cmd_add_int(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); + s16 value = BHV_CMD_GET_2ND_S16(0); - cur_object_add_int(objectOffset, value); + cur_obj_add_int(field, value); - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_or_int(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - s32 value = (s16)(gBehCommand[0] & 0xFFFF); +// Command 0x11: Performs a bitwise OR with the specified field and the given integer. +// Usually used to set an object's flags. +// Usage: OR_INT(field, value) +static s32 bhv_cmd_or_int(void) { + u8 objectOffset = BHV_CMD_GET_2ND_U8(0); + s32 value = BHV_CMD_GET_2ND_S16(0); value &= 0xFFFF; - cur_object_or_int(objectOffset, value); + cur_obj_or_int(objectOffset, value); - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -// unused -static s32 beh_cmd_bit_clear_int(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - s32 value = (s16)(gBehCommand[0] & 0xFFFF); +// Command 0x12: Performs a bit clear with the specified short. Unused. +// Usage: BIT_CLEAR(field, value) +static s32 bhv_cmd_bit_clear(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); + s32 value = BHV_CMD_GET_2ND_S16(0); value = (value & 0xFFFF) ^ 0xFFFF; - cur_object_and_int(objectOffset, value); + cur_obj_and_int(field, value); - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_load_animations(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); +// Command 0x27: Loads the animations for the object. is always set to oAnimations. +// Usage: LOAD_ANIMATIONS(field, anims) +static s32 bhv_cmd_load_animations(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); - cur_object_set_vptr(objectOffset, gBehCommand[1]); + cur_obj_set_vptr(field, BHV_CMD_GET_VPTR(1)); - gBehCommand += 2; - return BEH_CONTINUE; + gCurBhvCommand += 2; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_animate(void) { - s32 animIndex = (u8)((gBehCommand[0] >> 16) & 0xFF); +// Command 0x28: Begins animation and sets the object's current animation index to the specified value. +// Usage: ANIMATE(animIndex) +static s32 bhv_cmd_animate(void) { + s32 animIndex = BHV_CMD_GET_2ND_U8(0); struct Animation **animations = gCurrentObject->oAnimations; - geo_obj_init_animation((struct GraphNodeObject *) gCurrentObject, &animations[animIndex]); + geo_obj_init_animation(&gCurrentObject->header.gfx, &animations[animIndex]); - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_drop_to_floor(void) { +// Command 0x1E: Finds the floor triangle directly under the object and moves the object down to it. +// Usage: DROP_TO_FLOOR() +static s32 bhv_cmd_drop_to_floor(void) { f32 x = gCurrentObject->oPosX; f32 y = gCurrentObject->oPosY; f32 z = gCurrentObject->oPosZ; + f32 floor = find_floor_height(x, y + 200.0f, z); - gCurrentObject->oPosY = floor; gCurrentObject->oMoveFlags |= OBJ_MOVE_ON_GROUND; - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -// unused -static s32 Behavior18(void) { - /* no operation */ - UNUSED u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; +// Command 0x18: No operation. Unused. +// Usage: CMD_NOP_1(field) +static s32 bhv_cmd_nop_1(void) { + UNUSED u8 field = BHV_CMD_GET_2ND_U8(0); - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -// unused -static s32 Behavior1A(void) { - /* no operation */ - UNUSED u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; +// Command 0x1A: No operation. Unused. +// Usage: CMD_NOP_3(field) +static s32 bhv_cmd_nop_3(void) { + UNUSED u8 field = BHV_CMD_GET_2ND_U8(0); - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -// unused -static s32 Behavior19(void) { - /* no operation */ - UNUSED u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; +// Command 0x19: No operation. Unused. +// Usage: CMD_NOP_2(field) +static s32 bhv_cmd_nop_2(void) { + UNUSED u8 field = BHV_CMD_GET_2ND_U8(0); - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_sum_float(void) { - u32 objectOffsetDst = (u8)((gBehCommand[0] >> 16) & 0xFF); - u32 objectOffsetSrc1 = (u8)((gBehCommand[0] >> 8) & 0xFF); - u32 objectOffsetSrc2 = (u8)((gBehCommand[0]) & 0xFF); +// Command 0x1F: Sets the destination float field to the sum of the values of the given float fields. +// Usage: SUM_FLOAT(fieldDst, fieldSrc1, fieldSrc2) +static s32 bhv_cmd_sum_float(void) { + u32 fieldDst = BHV_CMD_GET_2ND_U8(0); + u32 fieldSrc1 = BHV_CMD_GET_3RD_U8(0); + u32 fieldSrc2 = BHV_CMD_GET_4TH_U8(0); - cur_object_set_float(objectOffsetDst, cur_object_get_float(objectOffsetSrc1) - + cur_object_get_float(objectOffsetSrc2)); + cur_obj_set_float(fieldDst, cur_obj_get_float(fieldSrc1) + cur_obj_get_float(fieldSrc2)); - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -// unused -static s32 beh_cmd_sum_int(void) { - u32 objectOffsetDst = (u8)((gBehCommand[0] >> 16) & 0xFF); - u32 objectOffsetSrc1 = (u8)((gBehCommand[0] >> 8) & 0xFF); - u32 objectOffsetSrc2 = (u8)((gBehCommand[0]) & 0xFF); +// Command 0x20: Sets the destination integer field to the sum of the values of the given integer fields. Unused. +// Usage: SUM_INT(fieldDst, fieldSrc1, fieldSrc2) +static s32 bhv_cmd_sum_int(void) { + u32 fieldDst = BHV_CMD_GET_2ND_U8(0); + u32 fieldSrc1 = BHV_CMD_GET_3RD_U8(0); + u32 fieldSrc2 = BHV_CMD_GET_4TH_U8(0); - cur_object_set_int(objectOffsetDst, - cur_object_get_int(objectOffsetSrc1) + cur_object_get_int(objectOffsetSrc2)); + cur_obj_set_int(fieldDst, cur_obj_get_int(fieldSrc1) + cur_obj_get_int(fieldSrc2)); - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_set_hitbox(void) { - s16 radius = (s16)(gBehCommand[1] >> 16); - s16 height = (s16)(gBehCommand[1] & 0xFFFF); +// Command 0x23: Sets the size of the object's cylindrical hitbox. +// Usage: SET_HITBOX(radius, height) +static s32 bhv_cmd_set_hitbox(void) { + s16 radius = BHV_CMD_GET_1ST_S16(1); + s16 height = BHV_CMD_GET_2ND_S16(1); gCurrentObject->hitboxRadius = radius; gCurrentObject->hitboxHeight = height; - gBehCommand += 2; - return BEH_CONTINUE; + gCurBhvCommand += 2; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_set_hurtbox(void) { - s16 radius = (s16)(gBehCommand[1] >> 16); - s16 height = (s16)(gBehCommand[1] & 0xFFFF); +// Command 0x2E: Sets the size of the object's cylindrical hurtbox. +// Usage: SET_HURTBOX(radius, height) +static s32 bhv_cmd_set_hurtbox(void) { + s16 radius = BHV_CMD_GET_1ST_S16(1); + s16 height = BHV_CMD_GET_2ND_S16(1); gCurrentObject->hurtboxRadius = radius; gCurrentObject->hurtboxHeight = height; - gBehCommand += 2; - return BEH_CONTINUE; + gCurBhvCommand += 2; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_set_hitbox_with_offset(void) { - s16 radius = (s16)(gBehCommand[1] >> 16); - s16 height = (s16)(gBehCommand[1] & 0xFFFF); - s16 downOffset = (s16)(gBehCommand[2] >> 16); +// Command 0x2B: Sets the size of the object's cylindrical hitbox, and applies a downwards offset. +// Usage: SET_HITBOX_WITH_OFFSET(radius, height, downOffset) +static s32 bhv_cmd_set_hitbox_with_offset(void) { + s16 radius = BHV_CMD_GET_1ST_S16(1); + s16 height = BHV_CMD_GET_2ND_S16(1); + s16 downOffset = BHV_CMD_GET_1ST_S16(2); gCurrentObject->hitboxRadius = radius; gCurrentObject->hitboxHeight = height; gCurrentObject->hitboxDownOffset = downOffset; - gBehCommand += 3; - return BEH_CONTINUE; + gCurBhvCommand += 3; + return BHV_PROC_CONTINUE; } -// unused -static s32 Behavior24(void) { - /* no operation */ - UNUSED s16 arg0 = (u8)((gBehCommand[0] >> 16) & 0xFF); - UNUSED s16 arg1 = gBehCommand[0] & 0xFFFF; +// Command 0x24: No operation. Unused. +// Usage: CMD_NOP_4(field, value) +static s32 bhv_cmd_nop_4(void) { + UNUSED s16 field = BHV_CMD_GET_2ND_U8(0); + UNUSED s16 value = BHV_CMD_GET_2ND_S16(0); - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_begin(void) { +// Command 0x00: Defines the start of the behavior script as well as the object list the object belongs to. +// Has some special behavior for certain objects. +// Usage: BEGIN(objList) +static s32 bhv_cmd_begin(void) { + // These objects were likely very early objects, which is why this code is here + // instead of in the respective behavior scripts. + + // Initiate the room if the object is a haunted chair or the mad piano. if (cur_obj_has_behavior(bhvHauntedChair)) { bhv_init_room(); } if (cur_obj_has_behavior(bhvMadPiano)) { bhv_init_room(); } + // Set collision distance if the object is a message panel. if (cur_obj_has_behavior(bhvMessagePanel)) { gCurrentObject->oCollisionDistance = 150.0f; } - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static void Unknown8038556C(s32 lastIndex) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - u32 table[16]; +// An unused, incomplete behavior command that does not have an entry in the lookup table, and so no command number. +// It cannot be simply re-added to the table, as unlike all other bhv commands it takes a parameter. +// Theoretically this command would have been of variable size. +// Included below is a modified/repaired version of this function that would work properly. +static void bhv_cmd_set_int_random_from_table(s32 tableSize) { + u8 field = BHV_CMD_GET_2ND_U8(0); + s32 table[16]; s32 i; - - for (i = 0; i <= lastIndex / 2; i += 2) { - table[i] = (s16)(gBehCommand[i + 1] >> 16); - table[i + 1] = (s16)(gBehCommand[i + 1] & 0xFFFF); + // This for loop would not work as intended at all... + for (i = 0; i <= tableSize / 2; i += 2) { + table[i] = BHV_CMD_GET_1ST_S16(i + 1); + table[i + 1] = BHV_CMD_GET_2ND_S16(i + 1); } - cur_object_set_int(objectOffset, table[(s32)(lastIndex * RandomFloat())]); + cur_obj_set_int(field, table[(s32)(tableSize * random_float())]); + + // Does not increment gCurBhvCommand or return a bhv status } -static s32 beh_cmd_load_collision_data(void) { - u32 *collisionData = segmented_to_virtual((void *) gBehCommand[1]); +/** +// Command 0x??: Sets the specified field to a random entry in the given table, up to size 16. +// Bytes: ?? FF SS SS V1 V1 V2 V2 V3 V3 V4 V4... ...V15 V15 V16 V16 (no macro exists) +// F -> field, S -> table size, V1, V2, etc. -> table entries (up to 16) +static s32 bhv_cmd_set_int_random_from_table(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); + // Retrieve tableSize from the bhv command instead of as a parameter. + s16 tableSize = BHV_CMD_GET_2ND_S16(0); // tableSize should not be greater than 16 + s32 table[16]; + s32 i; + + // Construct the table from the behavior command. + for (i = 0; i <= tableSize; i += 2) { + table[i] = BHV_CMD_GET_1ST_S16((i / 2) + 1); + table[i + 1] = BHV_CMD_GET_2ND_S16((i / 2) + 1); + } + + // Set the field to a random entry of the table. + cur_obj_set_int(field, table[(s32)(tableSize * random_float())]); + + gCurBhvCommand += (tableSize / 2) + 1; + return BHV_PROC_CONTINUE; +} +**/ + +// Command 0x2A: Loads collision data for the object. +// Usage: LOAD_COLLISION_DATA(collisionData) +static s32 bhv_cmd_load_collision_data(void) { + u32 *collisionData = segmented_to_virtual(BHV_CMD_GET_VPTR(1)); + gCurrentObject->collisionData = collisionData; - gBehCommand += 2; - return BEH_CONTINUE; + + gCurBhvCommand += 2; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_set_home(void) { +// Command 0x2D: Sets the home position of the object to its current position. +// Usage: SET_HOME() +static s32 bhv_cmd_set_home(void) { gCurrentObject->oHomeX = gCurrentObject->oPosX; gCurrentObject->oHomeY = gCurrentObject->oPosY; gCurrentObject->oHomeZ = gCurrentObject->oPosZ; - gBehCommand++; - return BEH_CONTINUE; + + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_set_interact_type(void) { - gCurrentObject->oInteractType = (u32) gBehCommand[1]; +// Command 0x2F: Sets the object's interaction type. +// Usage: SET_INTERACT_TYPE(type) +static s32 bhv_cmd_set_interact_type(void) { + gCurrentObject->oInteractType = BHV_CMD_GET_U32(1); - gBehCommand += 2; - return BEH_CONTINUE; + gCurBhvCommand += 2; + return BHV_PROC_CONTINUE; } -// unused -static s32 Behavior31(void) { - gCurrentObject->oInteractionSubtype = (u32) gBehCommand[1]; +// Command 0x31: Sets the object's interaction subtype. Unused. +// Usage: SET_INTERACT_SUBTYPE(subtype) +static s32 bhv_cmd_set_interact_subtype(void) { + gCurrentObject->oInteractionSubtype = BHV_CMD_GET_U32(1); - gBehCommand += 2; - return BEH_CONTINUE; + gCurBhvCommand += 2; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_scale(void) { - UNUSED u8 sp1f = (u8)((gBehCommand[0] >> 16) & 0xFF); - s16 sp1c = gBehCommand[0] & 0xFFFF; +// Command 0x32: Sets the object's size to the specified percentage. +// Usage: SCALE(unusedField, percent) +static s32 bhv_cmd_scale(void) { + UNUSED u8 unusedField = BHV_CMD_GET_2ND_U8(0); + s16 percent = BHV_CMD_GET_2ND_S16(0); - cur_obj_scale((f32) sp1c / 100.0f); + cur_obj_scale(percent / 100.0f); - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_set_obj_physics(void) { - UNUSED f32 sp04, sp00; - gCurrentObject->oWallHitboxRadius = (f32)(s16)(gBehCommand[1] >> 16); - gCurrentObject->oGravity = (f32)(s16)(gBehCommand[1] & 0xFFFF) / 100.0f; - gCurrentObject->oBounce = (f32)(s16)(gBehCommand[2] >> 16) / 100.0f; - gCurrentObject->oDragStrength = (f32)(s16)(gBehCommand[2] & 0xFFFF) / 100.0f; - gCurrentObject->oFriction = (f32)(s16)(gBehCommand[3] >> 16) / 100.0f; - gCurrentObject->oBuoyancy = (f32)(s16)(gBehCommand[3] & 0xFFFF) / 100.0f; +// Command 0x30: Sets various parameters that the object uses for calculating physics. +// Usage: SET_OBJ_PHYSICS(wallHitboxRadius, gravity, bounciness, dragStrength, friction, buoyancy, unused1, unused2) +static s32 bhv_cmd_set_obj_physics(void) { + UNUSED f32 unused1, unused2; - // unused parameters - sp04 = (f32)(s16)(gBehCommand[4] >> 16) / 100.0f; - sp00 = (f32)(s16)(gBehCommand[4] & 0xFFFF) / 100.0f; + gCurrentObject->oWallHitboxRadius = BHV_CMD_GET_1ST_S16(1); + gCurrentObject->oGravity = BHV_CMD_GET_2ND_S16(1) / 100.0f; + gCurrentObject->oBounciness = BHV_CMD_GET_1ST_S16(2) / 100.0f; + gCurrentObject->oDragStrength = BHV_CMD_GET_2ND_S16(2) / 100.0f; + gCurrentObject->oFriction = BHV_CMD_GET_1ST_S16(3) / 100.0f; + gCurrentObject->oBuoyancy = BHV_CMD_GET_2ND_S16(3) / 100.0f; - gBehCommand += 5; - return BEH_CONTINUE; + unused1 = BHV_CMD_GET_1ST_S16(4) / 100.0f; + unused2 = BHV_CMD_GET_2ND_S16(4) / 100.0f; + + gCurBhvCommand += 5; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_bit_clear_int32(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - s32 flags = gBehCommand[1]; +// Command 0x33: Performs a bit clear on the object's parent's field with the specified value. +// Used for clearing active particle flags fron Mario's object. +// Usage: PARENT_BIT_CLEAR(field, value) +static s32 bhv_cmd_parent_bit_clear(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); + s32 value = BHV_CMD_GET_U32(1); - flags = flags ^ 0xFFFFFFFF; + value = value ^ 0xFFFFFFFF; + obj_and_int(gCurrentObject->parentObj, field, value); - object_and_int(gCurrentObject->parentObj, objectOffset, flags); - - gBehCommand += 2; - return BEH_CONTINUE; + gCurBhvCommand += 2; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_spawn_water_droplet(void) { - struct WaterDropletParams *dropletParams = (struct WaterDropletParams *) gBehCommand[1]; +// Command 0x37: Spawns a water droplet with the given parameters. +// Usage: SPAWN_WATER_DROPLET(dropletParams) +static s32 bhv_cmd_spawn_water_droplet(void) { + struct WaterDropletParams *dropletParams = BHV_CMD_GET_VPTR(1); + spawn_water_droplet(gCurrentObject, dropletParams); - gBehCommand += 2; - return BEH_CONTINUE; + gCurBhvCommand += 2; + return BHV_PROC_CONTINUE; } -static s32 beh_cmd_tex_anim_rate(void) { - u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); - s16 rate = (gBehCommand[0] & 0xFFFF); +// Command 0x34: Animates an object using texture animation. is always set to oAnimState. +// Usage: ANIMATE_TEXTURE(field, rate) +static s32 bhv_cmd_animate_texture(void) { + u8 field = BHV_CMD_GET_2ND_U8(0); + s16 rate = BHV_CMD_GET_2ND_S16(0); + // Increase the field (oAnimState) by 1 every frames. if ((gGlobalTimer % rate) == 0) { - cur_object_add_int(objectOffset, 1); + cur_obj_add_int(field, 1); } - gBehCommand++; - return BEH_CONTINUE; + gCurBhvCommand++; + return BHV_PROC_CONTINUE; } -void stub_80385BF0(void) { - // (empty function) +void stub_behavior_script_2(void) { } -typedef s32 (*BehCommandProc)(void); -static BehCommandProc BehaviorJumpTable[] = { - beh_cmd_begin, - beh_cmd_delay, - beh_cmd_call, - beh_cmd_return, - beh_cmd_goto, - beh_cmd_begin_repeat, - beh_cmd_end_repeat, - beh_cmd_end_repeat_continue, - beh_cmd_begin_loop, - beh_cmd_end_loop, - beh_cmd_break, - beh_cmd_break2, - beh_cmd_call_native, - beh_cmd_add_float, - beh_cmd_set_float, - beh_cmd_add_int, - beh_cmd_set_int, - beh_cmd_or_int, - beh_cmd_bit_clear_int, - beh_cmd_set_int_rand_rshift, - beh_cmd_set_random_float, - beh_cmd_set_random_int, - beh_cmd_add_random_float, - beh_cmd_add_int_rand_rshift, - Behavior18, - Behavior19, - Behavior1A, - beh_cmd_set_model, - beh_cmd_spawn_child, - beh_cmd_deactivate, - beh_cmd_drop_to_floor, - beh_cmd_sum_float, - beh_cmd_sum_int, - beh_cmd_billboard, - beh_cmd_hide, - beh_cmd_set_hitbox, - Behavior24, - beh_cmd_delay_var, - Behavior26, - beh_cmd_load_animations, - beh_cmd_animate, - beh_cmd_spawn_child_with_param, - beh_cmd_load_collision_data, - beh_cmd_set_hitbox_with_offset, - beh_cmd_spawn_obj, - beh_cmd_set_home, - beh_cmd_set_hurtbox, - beh_cmd_set_interact_type, - beh_cmd_set_obj_physics, - Behavior31, - beh_cmd_scale, - beh_cmd_bit_clear_int32, - beh_cmd_tex_anim_rate, - beh_cmd_disable_rendering, - Behavior36, - beh_cmd_spawn_water_droplet, +typedef s32 (*BhvCommandProc)(void); +static BhvCommandProc BehaviorCmdTable[] = { + bhv_cmd_begin, + bhv_cmd_delay, + bhv_cmd_call, + bhv_cmd_return, + bhv_cmd_goto, + bhv_cmd_begin_repeat, + bhv_cmd_end_repeat, + bhv_cmd_end_repeat_continue, + bhv_cmd_begin_loop, + bhv_cmd_end_loop, + bhv_cmd_break, + bhv_cmd_break_unused, + bhv_cmd_call_native, + bhv_cmd_add_float, + bhv_cmd_set_float, + bhv_cmd_add_int, + bhv_cmd_set_int, + bhv_cmd_or_int, + bhv_cmd_bit_clear, + bhv_cmd_set_int_rand_rshift, + bhv_cmd_set_random_float, + bhv_cmd_set_random_int, + bhv_cmd_add_random_float, + bhv_cmd_add_int_rand_rshift, + bhv_cmd_nop_1, + bhv_cmd_nop_2, + bhv_cmd_nop_3, + bhv_cmd_set_model, + bhv_cmd_spawn_child, + bhv_cmd_deactivate, + bhv_cmd_drop_to_floor, + bhv_cmd_sum_float, + bhv_cmd_sum_int, + bhv_cmd_billboard, + bhv_cmd_hide, + bhv_cmd_set_hitbox, + bhv_cmd_nop_4, + bhv_cmd_delay_var, + bhv_cmd_begin_repeat_unused, + bhv_cmd_load_animations, + bhv_cmd_animate, + bhv_cmd_spawn_child_with_param, + bhv_cmd_load_collision_data, + bhv_cmd_set_hitbox_with_offset, + bhv_cmd_spawn_obj, + bhv_cmd_set_home, + bhv_cmd_set_hurtbox, + bhv_cmd_set_interact_type, + bhv_cmd_set_obj_physics, + bhv_cmd_set_interact_subtype, + bhv_cmd_scale, + bhv_cmd_parent_bit_clear, + bhv_cmd_animate_texture, + bhv_cmd_disable_rendering, + bhv_cmd_set_int_unused, + bhv_cmd_spawn_water_droplet, }; -void cur_object_exec_behavior(void) { +// Execute the behavior script of the current object, process the object flags, and other miscellaneous code for updating objects. +void cur_obj_update(void) { UNUSED u32 unused; - s16 flagsLo = gCurrentObject->oFlags; + s16 objFlags = gCurrentObject->oFlags; f32 distanceFromMario; - BehCommandProc behCmdFunc; - s32 behProcResult; + BhvCommandProc bhvCmdProc; + s32 bhvProcResult; - if (flagsLo & OBJ_FLAG_COMPUTE_DIST_TO_MARIO) { + // Calculate the distance from the object to Mario. + if (objFlags & OBJ_FLAG_COMPUTE_DIST_TO_MARIO) { gCurrentObject->oDistanceToMario = dist_between_objects(gCurrentObject, gMarioObject); distanceFromMario = gCurrentObject->oDistanceToMario; } else { distanceFromMario = 0.0f; } - if (flagsLo & OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO) { + // Calculate the angle from the object to Mario. + if (objFlags & OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO) { gCurrentObject->oAngleToMario = obj_angle_to_object(gCurrentObject, gMarioObject); } + // If the object's action has changed, reset the action timer. if (gCurrentObject->oAction != gCurrentObject->oPrevAction) { (void) (gCurrentObject->oTimer = 0, gCurrentObject->oSubAction = 0, gCurrentObject->oPrevAction = gCurrentObject->oAction); } - gBehCommand = gCurrentObject->behScript; + // Execute the behavior script. + gCurBhvCommand = gCurrentObject->curBhvCommand; do { - behCmdFunc = BehaviorJumpTable[*gBehCommand >> 24]; - behProcResult = behCmdFunc(); - } while (behProcResult == BEH_CONTINUE); + bhvCmdProc = BehaviorCmdTable[*gCurBhvCommand >> 24]; + bhvProcResult = bhvCmdProc(); + } while (bhvProcResult == BHV_PROC_CONTINUE); - gCurrentObject->behScript = gBehCommand; + gCurrentObject->curBhvCommand = gCurBhvCommand; + // Increment the object's timer. if (gCurrentObject->oTimer < 0x3FFFFFFF) { gCurrentObject->oTimer++; } + // If the object's action has changed, reset the action timer. if (gCurrentObject->oAction != gCurrentObject->oPrevAction) { (void) (gCurrentObject->oTimer = 0, gCurrentObject->oSubAction = 0, gCurrentObject->oPrevAction = gCurrentObject->oAction); } - flagsLo = (s16) gCurrentObject->oFlags; + // Execute various code based on object flags. + objFlags = (s16) gCurrentObject->oFlags; - if (flagsLo & OBJ_FLAG_0010) { + if (objFlags & OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE) { obj_set_face_angle_to_move_angle(gCurrentObject); } - if (flagsLo & OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW) { + if (objFlags & OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW) { gCurrentObject->oFaceAngleYaw = gCurrentObject->oMoveAngleYaw; } - if (flagsLo & OBJ_FLAG_MOVE_XZ_USING_FVEL) { + if (objFlags & OBJ_FLAG_MOVE_XZ_USING_FVEL) { cur_obj_move_xz_using_fvel_and_yaw(); } - if (flagsLo & OBJ_FLAG_MOVE_Y_WITH_TERMINAL_VEL) { + if (objFlags & OBJ_FLAG_MOVE_Y_WITH_TERMINAL_VEL) { cur_obj_move_y_with_terminal_vel(); } - if (flagsLo & OBJ_FLAG_TRANSFORM_RELATIVE_TO_PARENT) { + if (objFlags & OBJ_FLAG_TRANSFORM_RELATIVE_TO_PARENT) { obj_build_transform_relative_to_parent(gCurrentObject); } - if (flagsLo & OBJ_FLAG_0800) { + if (objFlags & OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM) { obj_set_throw_matrix_from_transform(gCurrentObject); } - if (flagsLo & OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE) { - func_80383D68(gCurrentObject); + if (objFlags & OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE) { + obj_update_gfx_pos_and_angle(gCurrentObject); } + // Handle visibility of object if (gCurrentObject->oRoom != -1) { + // If the object is in a room, only show it when Mario is in the room. cur_obj_enable_rendering_if_mario_in_room(); - } else if ((flagsLo & OBJ_FLAG_COMPUTE_DIST_TO_MARIO) && gCurrentObject->collisionData == NULL) { - if (!(flagsLo & OBJ_FLAG_ACTIVE_FROM_AFAR)) { + } else if ((objFlags & OBJ_FLAG_COMPUTE_DIST_TO_MARIO) && gCurrentObject->collisionData == NULL) { + if (!(objFlags & OBJ_FLAG_ACTIVE_FROM_AFAR)) { + // If the object has a render distance, check if it should be shown. if (distanceFromMario > gCurrentObject->oDrawingDistance) { + // Out of render distance, hide the object. gCurrentObject->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE; gCurrentObject->activeFlags |= ACTIVE_FLAG_FAR_AWAY; } else if (gCurrentObject->oHeldState == HELD_FREE) { + // In render distance (and not being held), show the object. gCurrentObject->header.gfx.node.flags |= GRAPH_RENDER_ACTIVE; gCurrentObject->activeFlags &= ~ACTIVE_FLAG_FAR_AWAY; } diff --git a/src/engine/behavior_script.h b/src/engine/behavior_script.h index 5047c678..23d98716 100644 --- a/src/engine/behavior_script.h +++ b/src/engine/behavior_script.h @@ -1,30 +1,29 @@ #ifndef _BEHAVIOR_SCRIPT_H_ #define _BEHAVIOR_SCRIPT_H_ -#define BEH_BREAK 1 -#define BEH_CONTINUE 0 +#define BHV_PROC_CONTINUE 0 +#define BHV_PROC_BREAK 1 -#define cur_object_get_int(offset) gCurrentObject->OBJECT_FIELD_S32(offset) -#define cur_object_get_float(offset) gCurrentObject->OBJECT_FIELD_F32(offset) +#define cur_obj_get_int(offset) gCurrentObject->OBJECT_FIELD_S32(offset) +#define cur_obj_get_float(offset) gCurrentObject->OBJECT_FIELD_F32(offset) -#define cur_object_add_float(offset, value) gCurrentObject->OBJECT_FIELD_F32(offset) += (f32)(value) -#define cur_object_set_float(offset, value) gCurrentObject->OBJECT_FIELD_F32(offset) = (f32)(value) -#define cur_object_add_int(offset, value) gCurrentObject->OBJECT_FIELD_S32(offset) += (s32)(value) -#define cur_object_set_int(offset, value) gCurrentObject->OBJECT_FIELD_S32(offset) = (s32)(value) -#define cur_object_or_int(offset, value) gCurrentObject->OBJECT_FIELD_S32(offset) |= (s32)(value) -#define cur_object_and_int(offset, value) gCurrentObject->OBJECT_FIELD_S32(offset) &= (s32)(value) -#define cur_object_set_vptr(offset, value) gCurrentObject->OBJECT_FIELD_VPTR(offset) = (void *)(value) +#define cur_obj_add_float(offset, value) gCurrentObject->OBJECT_FIELD_F32(offset) += (f32)(value) +#define cur_obj_set_float(offset, value) gCurrentObject->OBJECT_FIELD_F32(offset) = (f32)(value) +#define cur_obj_add_int(offset, value) gCurrentObject->OBJECT_FIELD_S32(offset) += (s32)(value) +#define cur_obj_set_int(offset, value) gCurrentObject->OBJECT_FIELD_S32(offset) = (s32)(value) +#define cur_obj_or_int(offset, value) gCurrentObject->OBJECT_FIELD_S32(offset) |= (s32)(value) +#define cur_obj_and_int(offset, value) gCurrentObject->OBJECT_FIELD_S32(offset) &= (s32)(value) +#define cur_obj_set_vptr(offset, value) gCurrentObject->OBJECT_FIELD_VPTR(offset) = (void *)(value) -#define object_and_int(object, offset, value) object->OBJECT_FIELD_S32(offset) &= (s32)(value) +#define obj_and_int(object, offset, value) object->OBJECT_FIELD_S32(offset) &= (s32)(value) -u16 RandomU16(void); -float RandomFloat(void); -s32 RandomSign(void); +u16 random_u16(void); +float random_float(void); +s32 random_sign(void); -void func_80383D68(struct Object *object); +void obj_update_gfx_pos_and_angle(struct Object *); +void stub_behavior_script_2(void); -void stub_80385BF0(void); - -void cur_object_exec_behavior(void); +void cur_obj_update(void); #endif /* _BEHAVIOR_SCRIPT_H_ */ diff --git a/src/engine/level_script.c b/src/engine/level_script.c index 7a28953b..f522f1b9 100644 --- a/src/engine/level_script.c +++ b/src/engine/level_script.c @@ -5,7 +5,7 @@ #include "buffers/framebuffers.h" #include "buffers/zbuffer.h" #include "game/area.h" -#include "game/display.h" +#include "game/game_init.h" #include "game/mario.h" #include "game/memory.h" #include "game/object_helpers.h" diff --git a/src/engine/surface_collision.c b/src/engine/surface_collision.c index 10c46b5e..7672187d 100644 --- a/src/engine/surface_collision.c +++ b/src/engine/surface_collision.c @@ -20,12 +20,9 @@ */ static s32 find_wall_collisions_from_list(struct SurfaceNode *surfaceNode, struct WallCollisionData *data) { -#ifdef VERSION_EU - UNUSED u8 pad; -#endif + register struct Surface *surf; register f32 offset; register f32 radius = data->radius; - register struct Surface *surf; register f32 x = data->x; register f32 y = data->y + data->offsetY; register f32 z = data->z; diff --git a/src/engine/surface_load.c b/src/engine/surface_load.c index 704e752b..2e32ebfe 100644 --- a/src/engine/surface_load.c +++ b/src/engine/surface_load.c @@ -103,6 +103,10 @@ static void clear_static_surfaces(void) { /** * Add a surface to the correct cell list of surfaces. + * @param dynamic Determines whether the surface is static or dynamic + * @param cellX The X position of the cell in which the surface resides + * @param cellZ The Z position of the cell in which the surface resides + * @param surface The surface to add */ static void add_surface_to_cell(s16 dynamic, s16 cellX, s16 cellZ, struct Surface *surface) { struct SurfaceNode *newNode = alloc_surface_node(); @@ -191,23 +195,24 @@ static s16 max_3(s16 a0, s16 a1, s16 a2) { /** * Every level is split into 16 * 16 cells of surfaces (to limit computing * time). This function determines the lower cell for a given x/z position. + * @param coord The coordinate to test */ -static s16 lower_cell_index(s16 t) { +static s16 lower_cell_index(s16 coord) { s16 index; // Move from range [-0x2000, 0x2000) to [0, 0x4000) - t += 0x2000; - if (t < 0) { - t = 0; + coord += 0x2000; + if (coord < 0) { + coord = 0; } // [0, 16) - index = t / 0x400; + index = coord / 0x400; // Include extra cell if close to boundary //! Some wall checks are larger than the buffer, meaning wall checks can // miss walls that are near a cell border. - if (t % 0x400 < 50) { + if (coord % 0x400 < 50) { index -= 1; } @@ -222,23 +227,24 @@ static s16 lower_cell_index(s16 t) { /** * Every level is split into 16 * 16 cells of surfaces (to limit computing * time). This function determines the upper cell for a given x/z position. + * @param coord The coordinate to test */ -static s16 upper_cell_index(s16 t) { +static s16 upper_cell_index(s16 coord) { s16 index; // Move from range [-0x2000, 0x2000) to [0, 0x4000) - t += 0x2000; - if (t < 0) { - t = 0; + coord += 0x2000; + if (coord < 0) { + coord = 0; } // [0, 16) - index = t / 0x400; + index = coord / 0x400; // Include extra cell if close to boundary //! Some wall checks are larger than the buffer, meaning wall checks can // miss walls that are near a cell border. - if (t % 0x400 > 0x400 - 50) { + if (coord % 0x400 > 0x400 - 50) { index += 1; } @@ -254,6 +260,8 @@ static s16 upper_cell_index(s16 t) { * Every level is split into 16x16 cells, this takes a surface, finds * the appropriate cells (with a buffer), and adds the surface to those * cells. + * @param surface The surface to check + * @param dynamic Boolean determining whether the surface is static or dynamic */ static void add_surface(struct Surface *surface, s32 dynamic) { // minY/maxY maybe? s32 instead of s16, though. @@ -283,12 +291,13 @@ static void add_surface(struct Surface *surface, s32 dynamic) { } } -static void unused_80382B6C(void) { +static void stub_surface_load_1(void) { } /** - * Initialize a surface from reading it's data and putting it into a surface - * stuct. + * Initializes a Surface struct using the given vertex data + * @param vertexData The raw data containing vertex positions + * @param vertexIndices Helper which tells positions in vertexData to start reading vertices */ static struct Surface *read_surface_data(s16 *vertexData, s16 **vertexIndices) { struct Surface *surface; @@ -602,14 +611,8 @@ static void unused_80383604(void) { */ void transform_object_vertices(s16 **data, s16 *vertexData) { register s16 *vertices; - -#ifdef VERSION_EU register f32 vx, vy, vz; register s32 numVertices; -#else - register s32 numVertices; - register f32 vx, vy, vz; -#endif Mat4 *objectTransform; Mat4 m; diff --git a/src/game/area.c b/src/game/area.c index 8253a330..82d17a32 100644 --- a/src/game/area.c +++ b/src/game/area.c @@ -3,8 +3,7 @@ #include "area.h" #include "sm64.h" #include "behavior_data.h" -#include "game.h" -#include "display.h" +#include "game_init.h" #include "object_list_processor.h" #include "engine/surface_load.h" #include "ingame_menu.h" @@ -19,6 +18,7 @@ #include "level_update.h" #include "engine/geo_layout.h" #include "save_file.h" +#include "level_table.h" struct SpawnInfo gPlayerSpawnInfos[1]; struct GraphNode *D_8033A160[0x100]; @@ -47,19 +47,30 @@ u8 gWarpTransRed = 0; u8 gWarpTransGreen = 0; u8 gWarpTransBlue = 0; s16 gCurrSaveFileNum = 1; -s16 gCurrLevelNum = 1; +s16 gCurrLevelNum = LEVEL_MIN; -const BehaviorScript *D_8032CE9C[] = { - bhvDoorWarp, bhvStar, bhvExitPodiumWarp, bhvWarp, bhvWarpPipe, bhvFadingWarp, bhvWarps60, - bhvWarps64, bhvWarps68, bhvWarps6C, bhvWarps70, bhvWarps74, bhvWarps78, bhvWarps94, - bhvWarps7C, bhvWarps80, bhvWarps88, bhvWarps84, bhvWarps8C, bhvWarps90, +/* + * The following two tables are used in get_mario_spawn_type() to determine spawn type + * from warp behavior. + * When looping through sWarpBhvSpawnTable, if the behavior function in the table matches + * the spawn behavior executed, the index of that behavior is used with sSpawnTypeFromWarpBhv +*/ + +// D_8032CE9C +const BehaviorScript *sWarpBhvSpawnTable[] = { + bhvDoorWarp, bhvStar, bhvExitPodiumWarp, bhvWarp, + bhvWarpPipe, bhvFadingWarp, bhvWarps60, bhvWarps64, + bhvWarps68, bhvWarps6C, bhvDeathWarp, bhvWarps74, + bhvWarps78, bhvWarps94, bhvWarps7C, bhvPaintingDeathWarp, + bhvWarps88, bhvWarps84, bhvWarps8C, bhvWarps90, }; -u8 D_8032CEEC[] = { +// D_8032CEEC +u8 sSpawnTypeFromWarpBhv[] = { MARIO_SPAWN_UNKNOWN_01, MARIO_SPAWN_UNKNOWN_02, MARIO_SPAWN_UNKNOWN_03, MARIO_SPAWN_UNKNOWN_03, MARIO_SPAWN_UNKNOWN_03, MARIO_SPAWN_UNKNOWN_04, MARIO_SPAWN_UNKNOWN_10, MARIO_SPAWN_UNKNOWN_12, - MARIO_SPAWN_UNKNOWN_13, MARIO_SPAWN_UNKNOWN_14, MARIO_SPAWN_UNKNOWN_15, MARIO_SPAWN_UNKNOWN_16, - MARIO_SPAWN_UNKNOWN_17, MARIO_SPAWN_UNKNOWN_11, MARIO_SPAWN_UNKNOWN_20, MARIO_SPAWN_UNKNOWN_21, + MARIO_SPAWN_UNKNOWN_13, MARIO_SPAWN_UNKNOWN_14, MARIO_SPAWN_DEATH, MARIO_SPAWN_UNKNOWN_16, + MARIO_SPAWN_UNKNOWN_17, MARIO_SPAWN_UNKNOWN_11, MARIO_SPAWN_UNKNOWN_20, MARIO_SPAWN_PAINTING_DEATH, MARIO_SPAWN_UNKNOWN_22, MARIO_SPAWN_UNKNOWN_23, MARIO_SPAWN_UNKNOWN_24, MARIO_SPAWN_UNKNOWN_25, }; @@ -120,8 +131,8 @@ u32 get_mario_spawn_type(struct Object *o) { const BehaviorScript *behavior = virtual_to_segmented(0x13, o->behavior); for (i = 0; i < 20; i++) { - if (D_8032CE9C[i] == behavior) { - return D_8032CEEC[i]; + if (sWarpBhvSpawnTable[i] == behavior) { + return sSpawnTypeFromWarpBhv[i]; } } return 0; diff --git a/src/game/behavior_actions.c b/src/game/behavior_actions.c index 73c96f4e..35fa3ed1 100644 --- a/src/game/behavior_actions.c +++ b/src/game/behavior_actions.c @@ -3,13 +3,12 @@ #include "sm64.h" #include "types.h" #include "behavior_actions.h" -#include "game.h" +#include "game_init.h" #include "main.h" #include "mario.h" #include "engine/behavior_script.h" #include "engine/math_util.h" #include "object_helpers.h" -#include "object_helpers2.h" #include "behavior_data.h" #include "obj_behaviors.h" #include "engine/surface_collision.h" @@ -22,7 +21,6 @@ #include "area.h" #include "engine/graph_node.h" #include "camera.h" -#include "display.h" #include "spawn_object.h" #include "mario_actions_cutscene.h" #include "object_list_processor.h" @@ -37,6 +35,7 @@ #include "ingame_menu.h" #include "rendering_graph_node.h" #include "level_table.h" +#include "thread6.h" #define o gCurrentObject diff --git a/src/game/behaviors/amp.inc.c b/src/game/behaviors/amp.inc.c index a8ea0e06..29583c40 100644 --- a/src/game/behaviors/amp.inc.c +++ b/src/game/behaviors/amp.inc.c @@ -260,7 +260,7 @@ void bhv_circling_amp_init(void) { // Choose a random point along the amp's circle. // The amp's move angle represents its angle along the circle. - o->oMoveAngleYaw = RandomU16(); + o->oMoveAngleYaw = random_u16(); o->oAction = AMP_ACT_IDLE; } diff --git a/src/game/behaviors/beta_chest.inc.c b/src/game/behaviors/beta_chest.inc.c index 07c2daf8..7a1a786d 100644 --- a/src/game/behaviors/beta_chest.inc.c +++ b/src/game/behaviors/beta_chest.inc.c @@ -20,7 +20,7 @@ void bhv_beta_chest_bottom_init(void) { // a point with different yaws. Maybe this feature was lazily // cancelled by setting the yaw to 0, right before this beta // object was discarded? - o->oMoveAngleYaw = RandomU16(); + o->oMoveAngleYaw = random_u16(); o->oMoveAngleYaw = 0; // Spawn the chest lid 97 units in the +Y direction and 77 units in the -Z direction. diff --git a/src/game/behaviors/bird.inc.c b/src/game/behaviors/bird.inc.c index f59081df..e6d081a4 100644 --- a/src/game/behaviors/bird.inc.c +++ b/src/game/behaviors/bird.inc.c @@ -37,8 +37,8 @@ static void bird_act_inactive(void) { // Start with a random yaw, and a random pitch from 1000 to 5000. // Positive pitch is downwards. - o->oMoveAnglePitch = 5000 - (s32)(4000.0f * RandomFloat()); - o->oMoveAngleYaw = RandomU16(); + o->oMoveAnglePitch = 5000 - (s32)(4000.0f * random_float()); + o->oMoveAngleYaw = random_u16(); o->oBirdSpeed = 40.0f; diff --git a/src/game/behaviors/blue_fish.inc.c b/src/game/behaviors/blue_fish.inc.c index c9cea526..dcaa35b3 100644 --- a/src/game/behaviors/blue_fish.inc.c +++ b/src/game/behaviors/blue_fish.inc.c @@ -15,12 +15,12 @@ void bhv_blue_fish_movement_loop(void) { // Assigns random values to variables that help determine natural motion. if (o->oTimer == 0) { - o->oBlueFishRandomAngle = RandomSign() << 11; - o->oBlueFishRandomVel = RandomFloat() * 2; - o->oBlueFishRandomTime = (s32)(RandomFloat() * 30) & 0xFE; + o->oBlueFishRandomAngle = random_sign() << 11; + o->oBlueFishRandomVel = random_float() * 2; + o->oBlueFishRandomTime = (s32)(random_float() * 30) & 0xFE; // Adjusts pitch velocity or sets to zero dependant on outcome of randomSwitch. - randomSwitch = RandomFloat() * 5; + randomSwitch = random_float() * 5; if (randomSwitch < 2.0f) { o->oAngleVelPitch = random_f32_around_zero(128); } else { diff --git a/src/game/behaviors/bobomb.inc.c b/src/game/behaviors/bobomb.inc.c index a05d38dd..146ecbcf 100644 --- a/src/game/behaviors/bobomb.inc.c +++ b/src/game/behaviors/bobomb.inc.c @@ -44,9 +44,9 @@ void bobomb_act_explode(void) { void bobomb_check_interactions(void) { obj_set_hitbox(o, &sBobombHitbox); - if ((o->oInteractStatus & INT_STATUS_INTERACTED) != 0) /* bit 15 */ + if ((o->oInteractStatus & INT_STATUS_INTERACTED) != 0) { - if ((o->oInteractStatus & INTERACT_GRABBABLE) != 0) /* bit 1 */ + if ((o->oInteractStatus & INT_STATUS_MARIO_UNK1) != 0) { o->oMoveAngleYaw = gMarioObject->header.gfx.angle[1]; o->oForwardVel = 25.0; @@ -54,7 +54,7 @@ void bobomb_check_interactions(void) { o->oAction = BOBOMB_ACT_LAUNCHED; } - if ((o->oInteractStatus & INTERACT_TEXT) != 0) /* bit 23 */ + if ((o->oInteractStatus & INT_STATUS_TOUCHED_BOB_OMB) != 0) o->oAction = BOBOMB_ACT_EXPLODE; o->oInteractStatus = 0; @@ -174,7 +174,7 @@ void bobomb_free_loop(void) { } void bobomb_held_loop(void) { - o->header.gfx.node.flags |= 0x10; /* bit 4 */ + o->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; cur_obj_init_animation(1); cur_obj_set_pos_relative(gMarioObject, 0, 60.0f, 100.0); @@ -183,8 +183,7 @@ void bobomb_held_loop(void) { //! Although the Bob-omb's action is set to explode when the fuse timer expires, // bobomb_act_explode() will not execute until the bob-omb's held state changes. // This allows the Bob-omb to be regrabbed indefinitely. - - gMarioObject->oInteractStatus |= INTERACT_DAMAGE; /* bit 3 */ + gMarioObject->oInteractStatus |= INT_STATUS_MARIO_DROP_OBJECT; o->oAction = BOBOMB_ACT_EXPLODE; } } @@ -192,7 +191,7 @@ void bobomb_held_loop(void) { void bobomb_dropped_loop(void) { cur_obj_get_dropped(); - o->header.gfx.node.flags &= ~0x10; /* bit 4 = 0 */ + o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; cur_obj_init_animation(0); o->oHeldState = 0; @@ -202,7 +201,7 @@ void bobomb_dropped_loop(void) { void bobomb_thrown_loop(void) { cur_obj_enable_rendering_2(); - o->header.gfx.node.flags &= ~0x10; /* bit 4 = 0 */ + o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; o->oHeldState = 0; o->oFlags &= ~0x8; /* bit 3 */ o->oForwardVel = 25.0; @@ -214,7 +213,7 @@ void bobomb_thrown_loop(void) { void curr_obj_random_blink(s32 *blinkTimer) { if (*blinkTimer == 0) { - if ((s16)(RandomFloat() * 100.0f) == 0) { + if ((s16)(random_float() * 100.0f) == 0) { o->oAnimState = 1; *blinkTimer = 1; } @@ -272,9 +271,9 @@ void bhv_bobomb_loop(void) { } void bhv_bobomb_fuse_smoke_init(void) { - o->oPosX += (s32)(RandomFloat() * 80.0f) - 40; - o->oPosY += (s32)(RandomFloat() * 80.0f) + 60; - o->oPosZ += (s32)(RandomFloat() * 80.0f) - 40; + o->oPosX += (s32)(random_float() * 80.0f) - 40; + o->oPosY += (s32)(random_float() * 80.0f) + 60; + o->oPosZ += (s32)(random_float() * 80.0f) - 40; cur_obj_scale(1.2f); } diff --git a/src/game/behaviors/bomp.inc.c b/src/game/behaviors/bomp.inc.c index d2e56a19..26b38931 100644 --- a/src/game/behaviors/bomp.inc.c +++ b/src/game/behaviors/bomp.inc.c @@ -3,7 +3,7 @@ void bhv_small_bomp_init(void) { o->oFaceAngleYaw -= 0x4000; o->oSmallBompInitX = o->oPosX; - o->oTimer = RandomFloat() * 100.0f; + o->oTimer = random_float() * 100.0f; } void bhv_small_bomp_loop(void) { @@ -59,7 +59,7 @@ void bhv_small_bomp_loop(void) { void bhv_large_bomp_init(void) { o->oMoveAngleYaw += 0x4000; - o->oTimer = RandomFloat() * 100.0f; + o->oTimer = random_float() * 100.0f; } void bhv_large_bomp_loop(void) { diff --git a/src/game/behaviors/boo.inc.c b/src/game/behaviors/boo.inc.c index 7a7ddb31..14f322bb 100644 --- a/src/game/behaviors/boo.inc.c +++ b/src/game/behaviors/boo.inc.c @@ -100,7 +100,7 @@ void bhv_courtyard_boo_triplet_init(void) { bhvGhostHuntBoo ); - boo->oMoveAngleYaw = RandomU16(); + boo->oMoveAngleYaw = random_u16(); } } } @@ -412,8 +412,8 @@ static void boo_act_1(void) { s32 attackStatus; if (o->oTimer == 0) { - o->oBooNegatedAggressiveness = -RandomFloat() * 5.0f; - o->oBooTurningSpeed = (s32)(RandomFloat() * 128.0f); + o->oBooNegatedAggressiveness = -random_float() * 5.0f; + o->oBooTurningSpeed = (s32)(random_float() * 128.0f); } boo_chase_mario(-100.0f, o->oBooTurningSpeed + 0x180, 0.5f); diff --git a/src/game/behaviors/boulder.inc.c b/src/game/behaviors/boulder.inc.c index e83d9509..ccc36c3c 100644 --- a/src/game/behaviors/boulder.inc.c +++ b/src/game/behaviors/boulder.inc.c @@ -57,12 +57,12 @@ void bhv_big_boulder_generator_loop(void) { if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 6000)) { if ((o->oTimer & 0x3F) == 0) { sp1C = spawn_object(o, MODEL_HMC_ROLLING_ROCK, bhvBigBoulder); - sp1C->oMoveAngleYaw = RandomFloat() * 4096.0f; + sp1C->oMoveAngleYaw = random_float() * 4096.0f; } } else { if ((o->oTimer & 0x7F) == 0) { sp1C = spawn_object(o, MODEL_HMC_ROLLING_ROCK, bhvBigBoulder); - sp1C->oMoveAngleYaw = RandomFloat() * 4096.0f; + sp1C->oMoveAngleYaw = random_float() * 4096.0f; } } } diff --git a/src/game/behaviors/bouncing_fireball.inc.c b/src/game/behaviors/bouncing_fireball.inc.c index a9cb1ed4..2ebda22a 100644 --- a/src/game/behaviors/bouncing_fireball.inc.c +++ b/src/game/behaviors/bouncing_fireball.inc.c @@ -6,7 +6,7 @@ void bhv_bouncing_fireball_flame_loop(void) { switch (o->oAction) { case 0: if (o->oTimer == 0) { - o->oAnimState = RandomFloat() * 10.0f; + o->oAnimState = random_float() * 10.0f; o->oVelY = 30.0f; } if (o->oMoveFlags & 1) @@ -46,7 +46,7 @@ void bhv_bouncing_fireball_loop(void) { break; case 2: if (o->oTimer == 0) - o->oBouncingFireBallUnkF4 = RandomFloat() * 100.0f; + o->oBouncingFireBallUnkF4 = random_float() * 100.0f; if (o->oBouncingFireBallUnkF4 + 100 < o->oTimer) o->oAction = 0; break; diff --git a/src/game/behaviors/bowling_ball.inc.c b/src/game/behaviors/bowling_ball.inc.c index b7ec7d1c..292b7c4d 100644 --- a/src/game/behaviors/bowling_ball.inc.c +++ b/src/game/behaviors/bowling_ball.inc.c @@ -179,7 +179,7 @@ void bhv_generic_bowling_ball_spawner_loop(void) { if ((o->oTimer & o->oBBallSpawnerPeriodMinus1) == 0) /* Modulus */ { if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, o->oBBallSpawnerMaxSpawnDist)) { - if ((s32)(RandomFloat() * o->oBBallSpawnerSpawnOdds) == 0) { + if ((s32)(random_float() * o->oBBallSpawnerSpawnOdds) == 0) { bowlingBall = spawn_object(o, MODEL_BOWLING_BALL, bhvBowlingBall); bowlingBall->oBehParams2ndByte = o->oBehParams2ndByte; } @@ -199,7 +199,7 @@ void bhv_thi_bowling_ball_spawner_loop(void) { if ((o->oTimer % 64) == 0) { if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 12000)) { - if ((s32)(RandomFloat() * 1.5) == 0) { + if ((s32)(random_float() * 1.5) == 0) { bowlingBall = spawn_object(o, MODEL_BOWLING_BALL, bhvBowlingBall); bowlingBall->oBehParams2ndByte = o->oBehParams2ndByte; } @@ -251,7 +251,7 @@ void bhv_free_bowling_ball_roll_loop(void) { cur_obj_play_sound_2(SOUND_GENERAL_QUIET_POUND1_LOWPRIO); if (!is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 6000)) { - o->header.gfx.node.flags |= 0x10; /* bit 4 */ + o->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; cur_obj_become_intangible(); o->oPosX = o->oHomeX; @@ -269,7 +269,7 @@ void bhv_free_bowling_ball_loop(void) { case FREE_BBALL_ACT_IDLE: if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 3000)) { o->oAction = FREE_BBALL_ACT_ROLL; - o->header.gfx.node.flags &= ~0x10; /* bit 4 */ + o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; cur_obj_become_tangible(); } break; diff --git a/src/game/behaviors/bowser.inc.c b/src/game/behaviors/bowser.inc.c index ae4e69d7..38908d01 100644 --- a/src/game/behaviors/bowser.inc.c +++ b/src/game/behaviors/bowser.inc.c @@ -190,7 +190,7 @@ static void bowser_debug_actions(void) // unused } void bowser_bitdw_act_controller(void) { - f32 rand = RandomFloat(); + f32 rand = random_float(); if (o->oBowserUnk110 == 0) { if (o->oBowserUnkF4 & 2) { if (o->oDistanceToMario < 1500.0f) @@ -221,7 +221,7 @@ void bowser_bitdw_act_controller(void) { } void bowser_bitfs_act_controller(void) { - f32 rand = RandomFloat(); + f32 rand = random_float(); if (o->oBowserUnk110 == 0) { if (o->oBowserUnkF4 & 2) { if (o->oDistanceToMario < 1300.0f) // nearby @@ -247,7 +247,7 @@ void bowser_bitfs_act_controller(void) { } void bowser_general_bits_act_controller(void) { - f32 rand = RandomFloat(); + f32 rand = random_float(); if (o->oBowserUnkF4 & 2) { if (o->oDistanceToMario < 1000.0f) { if (rand < 0.4) @@ -462,9 +462,9 @@ s32 bowser_land(void) { cur_obj_start_cam_event(o, CAM_EVENT_BOWSER_JUMP); if (BITDW) { if (o->oDistanceToMario < 850.0f) - gMarioObject->oInteractStatus |= INTERACT_GRABBABLE; + gMarioObject->oInteractStatus |= INT_STATUS_MARIO_UNK1; else - gMarioObject->oInteractStatus |= INTERACT_HOOT; // hmm... + gMarioObject->oInteractStatus |= INT_STATUS_HOOT_GRABBED_BY_MARIO; // hmm... } return 1; } else @@ -548,7 +548,7 @@ void bowser_act_spit_fire_onto_floor(void) { if (gHudDisplay.wedges < 4) o->oBowserUnk108 = 3; else - o->oBowserUnk108 = RandomFloat() * 3.0f + 1.0f; + o->oBowserUnk108 = random_float() * 3.0f + 1.0f; cur_obj_init_animation_with_sound(22); if (cur_obj_check_anim_frame(5)) obj_spit_fire(0, 200, 180, 7.0f, MODEL_RED_FLAME, 30.0f, 10.0f, 0x1000); @@ -636,7 +636,7 @@ s32 bowser_check_hit_mine(void) { f32 sp18; mine = cur_obj_find_nearest_object_with_behavior(bhvBowserBomb, &sp18); if (mine != NULL && sp18 < 800.0f) { - mine->oInteractStatus |= INTERACT_MR_BLIZZARD; + mine->oInteractStatus |= INT_STATUS_HIT_MINE; return 1; } return 0; @@ -830,13 +830,13 @@ s32 bowser_dead_not_bits_end(void) { s32 ret = 0; if (o->oBowserUnkF8 < 2) { if (o->oBowserUnkF8 == 0) { - func_8031FFB4(0, 60, 40); + func_8031FFB4(SEQ_PLAYER_LEVEL, 60, 40); o->oBowserUnkF8++; } if (cur_obj_update_dialog(2, 18, sBowserDefeatedDialogText[o->oBehParams2ndByte], 0)) { o->oBowserUnkF8++; cur_obj_play_sound_2(SOUND_GENERAL2_BOWSER_EXPLODE); - sequence_player_unlower(0, 60); + sequence_player_unlower(SEQ_PLAYER_LEVEL, 60); sequence_player_fade_out(0, 1); } } else if (bowser_dead_twirl_into_trophy()) { @@ -859,12 +859,12 @@ s32 bowser_dead_bits_end(void) { else dialogID = DIALOG_163; if (o->oBowserUnkF8 == 0) { - func_8031FFB4(0, 60, 40); + func_8031FFB4(SEQ_PLAYER_LEVEL, 60, 40); o->oBowserUnkF8++; } if (cur_obj_update_dialog(2, 18, dialogID, 0)) { cur_obj_set_model(MODEL_BOWSER2); - sequence_player_unlower(0, 60); + sequence_player_unlower(SEQ_PLAYER_LEVEL, 60); sequence_player_fade_out(0, 1); bowser_spawn_grand_star_key(); o->oBowserUnkF8++; @@ -1375,7 +1375,7 @@ void bhv_falling_bowser_platform_loop(void) { void bowser_flame_despawn(void) { obj_mark_for_deletion(o); spawn_object_with_scale(o, MODEL_NONE, bhvBlackSmokeUpward, 1.0f); - if (RandomFloat() < 0.1) + if (random_float() < 0.1) spawn_object(o, MODEL_YELLOW_COIN, bhvTemporaryYellowCoin); } @@ -1390,20 +1390,20 @@ s32 bowser_flame_should_despawn(s32 a0) { } void bhv_flame_bowser_init(void) { - o->oAnimState = (s32)(RandomFloat() * 10.0f); - o->oMoveAngleYaw = RandomU16(); - if (RandomFloat() < 0.2) + o->oAnimState = (s32)(random_float() * 10.0f); + o->oMoveAngleYaw = random_u16(); + if (random_float() < 0.2) o->oVelY = 80.0f; else o->oVelY = 20.0f; o->oForwardVel = 10.0f; o->oGravity = -1.0f; - o->oFlameUnkF4 = RandomFloat() + 1.0f; + o->oFlameUnkF4 = random_float() + 1.0f; } void bhv_flame_large_burning_out_init(void) { - o->oAnimState = (s32)(RandomFloat() * 10.0f); - o->oMoveAngleYaw = RandomU16(); + o->oAnimState = (s32)(random_float() * 10.0f); + o->oMoveAngleYaw = random_u16(); o->oVelY = 10.0f; o->oForwardVel = 0.0f; o->oFlameUnkF4 = 7.0f; @@ -1429,7 +1429,7 @@ void bhv_flame_bowser_loop(void) { if (cur_obj_has_behavior(bhvFlameLargeBurningOut)) o->oFlameUnkF4 = 8.0f; else - o->oFlameUnkF4 = RandomFloat() * 2 + 6.0f; + o->oFlameUnkF4 = random_float() * 2 + 6.0f; o->oForwardVel = 0; o->oVelY = 0; o->oGravity = 0; @@ -1450,7 +1450,7 @@ void bhv_flame_bowser_loop(void) { void bhv_flame_moving_forward_growing_init(void) { o->oForwardVel = 30.0f; obj_translate_xz_random(o, 80.0f); - o->oAnimState = (s32)(RandomFloat() * 10.0f); + o->oAnimState = (s32)(random_float() * 10.0f); o->oFlameUnkF4 = 3.0f; } @@ -1474,15 +1474,15 @@ void bhv_flame_moving_forward_growing_loop(void) { } void bhv_flame_floating_landing_init(void) { - o->oAnimState = (s32)(RandomFloat() * 10.0f); - o->oMoveAngleYaw = RandomU16(); + o->oAnimState = (s32)(random_float() * 10.0f); + o->oMoveAngleYaw = random_u16(); if (o->oBehParams2ndByte != 0) - o->oForwardVel = RandomFloat() * 5.0f; + o->oForwardVel = random_float() * 5.0f; else - o->oForwardVel = RandomFloat() * 70.0f; - o->oVelY = RandomFloat() * 20.0f; + o->oForwardVel = random_float() * 70.0f; + o->oVelY = random_float() * 20.0f; o->oGravity = -1.0f; - o->oFlameUnkF8 = RandomFloat() * 64.0f; + o->oFlameUnkF8 = random_float() * 64.0f; } void bhv_flame_floating_landing_loop(void) { @@ -1506,13 +1506,13 @@ void bhv_flame_floating_landing_loop(void) { void bhv_blue_bowser_flame_init(void) { obj_translate_xz_random(o, 80.0f); - o->oAnimState = (s32)(RandomFloat() * 10.0f); + o->oAnimState = (s32)(random_float() * 10.0f); o->oVelY = 7.0f; o->oForwardVel = 35.0f; o->oFlameUnkF4 = 3.0f; - o->oFlameUnkFC = RandomFloat() * 0.5; + o->oFlameUnkFC = random_float() * 0.5; o->oGravity = 1.0f; - o->oFlameUnkF8 = (s32)(RandomFloat() * 64.0f); + o->oFlameUnkF8 = (s32)(random_float() * 64.0f); } void bhv_blue_bowser_flame_loop(void) { @@ -1539,11 +1539,11 @@ void bhv_blue_bowser_flame_loop(void) { } void bhv_flame_bouncing_init(void) { - o->oAnimState = (s32)(RandomFloat() * 10.0f); + o->oAnimState = (s32)(random_float() * 10.0f); o->oVelY = 30.0f; o->oForwardVel = 20.0f; o->oFlameUnkF4 = o->header.gfx.scale[0]; - o->oFlameUnkF8 = (s32)(RandomFloat() * 64.0f); + o->oFlameUnkF8 = (s32)(random_float() * 64.0f); } void bhv_flame_bouncing_loop(void) { @@ -1552,7 +1552,7 @@ void bhv_flame_bouncing_loop(void) { o->oFlameUnk100 = cur_obj_nearest_object_with_behavior(bhvBowser); sp1C = o->oFlameUnk100; o->oForwardVel = 15.0f; - o->oBounce = -1.0f; + o->oBounciness = -1.0f; cur_obj_scale(o->oFlameUnkF4); obj_set_hitbox(o, &sGrowingBowserFlameHitbox); cur_obj_update_floor_and_walls(); diff --git a/src/game/behaviors/bowser_bomb.inc.c b/src/game/behaviors/bowser_bomb.inc.c index 80383ae4..0a0eab25 100644 --- a/src/game/behaviors/bowser_bomb.inc.c +++ b/src/game/behaviors/bowser_bomb.inc.c @@ -2,12 +2,12 @@ void bhv_bowser_bomb_loop(void) { if (obj_check_if_collided_with_object(o, gMarioObject) == 1) { - o->oInteractStatus &= ~INT_STATUS_INTERACTED; /* bit 15 */ + o->oInteractStatus &= ~INT_STATUS_INTERACTED; spawn_object(o, MODEL_EXPLOSION, bhvExplosion); o->activeFlags = 0; } - if (o->oInteractStatus & INTERACT_MR_BLIZZARD) /* bit 21 */ + if (o->oInteractStatus & INT_STATUS_HIT_MINE) { spawn_object(o, MODEL_BOWSER_FLAMES, bhvBowserBombExplosion); create_sound_spawner(SOUND_GENERAL_BOWSER_BOMB_EXPLOSION); @@ -24,9 +24,9 @@ void bhv_bowser_bomb_explosion_loop(void) { cur_obj_scale((f32) o->oTimer / 14.0f * 9.0 + 1.0); if ((o->oTimer % 4 == 0) && (o->oTimer < 20)) { mineSmoke = spawn_object(o, MODEL_BOWSER_SMOKE, bhvBowserBombSmoke); - mineSmoke->oPosX += RandomFloat() * 600.0f - 400.0f; - mineSmoke->oPosZ += RandomFloat() * 600.0f - 400.0f; - mineSmoke->oVelY += RandomFloat() * 10.0f; + mineSmoke->oPosX += random_float() * 600.0f - 400.0f; + mineSmoke->oPosZ += random_float() * 600.0f - 400.0f; + mineSmoke->oVelY += random_float() * 10.0f; } if (o->oTimer % 2 == 0) diff --git a/src/game/behaviors/break_particles.inc.c b/src/game/behaviors/break_particles.inc.c index f8ebea70..a5a6a069 100644 --- a/src/game/behaviors/break_particles.inc.c +++ b/src/game/behaviors/break_particles.inc.c @@ -7,16 +7,16 @@ void spawn_triangle_break_particles(s16 numTris, s16 triModel, f32 triSize, s16 triangle = spawn_object(o, triModel, bhvBreakBoxTriangle); triangle->oAnimState = triAnimState; triangle->oPosY += 100.0f; - triangle->oMoveAngleYaw = RandomU16(); + triangle->oMoveAngleYaw = random_u16(); triangle->oFaceAngleYaw = triangle->oMoveAngleYaw; - triangle->oFaceAnglePitch = RandomU16(); + triangle->oFaceAnglePitch = random_u16(); triangle->oVelY = random_f32_around_zero(50.0f); if (triModel == 138 || triModel == 56) { triangle->oAngleVelPitch = 0xF00; triangle->oAngleVelYaw = 0x500; triangle->oForwardVel = 30.0f; } else { - triangle->oAngleVelPitch = 0x80 * (s32)(RandomFloat() + 50.0f); + triangle->oAngleVelPitch = 0x80 * (s32)(random_float() + 50.0f); triangle->oForwardVel = 30.0f; } obj_scale(triangle, triSize); diff --git a/src/game/behaviors/breakable_box_small.inc.c b/src/game/behaviors/breakable_box_small.inc.c index 3910fc7e..5b8745f5 100644 --- a/src/game/behaviors/breakable_box_small.inc.c +++ b/src/game/behaviors/breakable_box_small.inc.c @@ -24,8 +24,8 @@ void bhv_breakable_box_small_init(void) { void small_breakable_box_spawn_dust(void) { struct Object *sp24 = spawn_object(o, MODEL_SMOKE, bhvSmoke); - sp24->oPosX += (s32)(RandomFloat() * 80.0f) - 40; - sp24->oPosZ += (s32)(RandomFloat() * 80.0f) - 40; + sp24->oPosX += (s32)(random_float() * 80.0f) - 40; + sp24->oPosZ += (s32)(random_float() * 80.0f) - 40; } void small_breakable_box_act_move(void) { @@ -58,9 +58,9 @@ void breakable_box_small_released_loop(void) { // Begin flashing if (o->oBreakableBoxSmallFramesSinceReleased > 810) { if (o->oBreakableBoxSmallFramesSinceReleased & 1) - o->header.gfx.node.flags |= 0x10; + o->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; else - o->header.gfx.node.flags &= ~0x10; + o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; } // Despawn, and create a corkbox respawner @@ -94,7 +94,7 @@ void breakable_box_small_get_dropped(void) { cur_obj_become_tangible(); cur_obj_enable_rendering(); cur_obj_get_dropped(); - o->header.gfx.node.flags &= ~0x10; + o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; o->oHeldState = 0; o->oBreakableBoxSmallReleased = 1; o->oBreakableBoxSmallFramesSinceReleased = 0; @@ -104,7 +104,7 @@ void breakable_box_small_get_thrown(void) { cur_obj_become_tangible(); cur_obj_enable_rendering_2(); cur_obj_enable_rendering(); - o->header.gfx.node.flags &= ~0x10; + o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; o->oHeldState = 0; o->oFlags &= ~0x08; o->oForwardVel = 40.0f; diff --git a/src/game/behaviors/bub.inc.c b/src/game/behaviors/bub.inc.c index 42b98f20..e8e63096 100644 --- a/src/game/behaviors/bub.inc.c +++ b/src/game/behaviors/bub.inc.c @@ -45,16 +45,16 @@ void bub_move_vertically(s32 a0) { } void bub_act_0(void) { - o->oCheepCheepUnkFC = RandomFloat() * 100.0f; - o->oCheepCheepUnk104 = RandomFloat() * 300.0f; + o->oCheepCheepUnkFC = random_float() * 100.0f; + o->oCheepCheepUnk104 = random_float() * 300.0f; o->oAction = 1; } void bub_act_1(void) { f32 dy; if (o->oTimer == 0) { - o->oForwardVel = RandomFloat() * 2 + 2; - o->oCheepCheepUnk108 = RandomFloat(); + o->oForwardVel = random_float() * 2 + 2; + o->oCheepCheepUnk108 = random_float(); } dy = o->oPosY - gMarioObject->oPosY; if (o->oPosY < o->oCheepCheepUnkF4 - 50.0f) { diff --git a/src/game/behaviors/bubba.inc.c b/src/game/behaviors/bubba.inc.c index 5fddd4e3..742ec15f 100644 --- a/src/game/behaviors/bubba.inc.c +++ b/src/game/behaviors/bubba.inc.c @@ -143,7 +143,7 @@ void bhv_bubba_loop(void) { } else { approach_f32_ptr(&o->oBubbaUnk108, 0.0f, 4.0f); if ((o->oBubbaUnk10C -= o->oBubbaUnk108) > 1.0f) { - sp36 = RandomU16(); + sp36 = random_u16(); o->oBubbaUnk10C -= 1.0f; spawn_object_relative(0, 150.0f * coss(sp36), 0x64, 150.0f * sins(sp36), o, MODEL_WHITE_PARTICLE_SMALL, bhvSmallParticleSnow); diff --git a/src/game/behaviors/bubble.inc.c b/src/game/behaviors/bubble.inc.c index 000d369c..9afa4e52 100644 --- a/src/game/behaviors/bubble.inc.c +++ b/src/game/behaviors/bubble.inc.c @@ -1,9 +1,9 @@ // bubble.c.inc void bhv_object_bubble_init(void) { - o->oPosX += RandomFloat() * 30.0f; - o->oPosY += RandomFloat() * 30.0f; - o->oPosZ += RandomFloat() * 30.0f; + o->oPosX += random_float() * 30.0f; + o->oPosY += random_float() * 30.0f; + o->oPosZ += random_float() * 30.0f; } void bhv_object_bubble_loop(void) { diff --git a/src/game/behaviors/bullet_bill.inc.c b/src/game/behaviors/bullet_bill.inc.c index a94fe4b7..4a5650ed 100644 --- a/src/game/behaviors/bullet_bill.inc.c +++ b/src/game/behaviors/bullet_bill.inc.c @@ -1,8 +1,8 @@ -// bullet_bill.c.inc +// bullet_bill.inc.c // bullet bill smoke void bhv_white_puff_smoke_init(void) { - cur_obj_scale(RandomFloat() * 2 + 2.0); + cur_obj_scale(random_float() * 2 + 2.0); } void bhv_bullet_bill_init(void) { diff --git a/src/game/behaviors/bully.inc.c b/src/game/behaviors/bully.inc.c index 6e2bd262..725fb6c3 100644 --- a/src/game/behaviors/bully.inc.c +++ b/src/game/behaviors/bully.inc.c @@ -187,7 +187,7 @@ void bully_spawn_coin(void) { coin->oForwardVel = 10.0f; coin->oVelY = 100.0f; coin->oPosY = o->oPosY + 310.0f; - coin->oMoveAngleYaw = (f32)(o->oBullyMarioCollisionAngle + 0x8000) + RandomFloat() * 1024.0f; + coin->oMoveAngleYaw = (f32)(o->oBullyMarioCollisionAngle + 0x8000) + random_float() * 1024.0f; } void bully_act_level_death(void) { @@ -277,7 +277,7 @@ void bhv_big_bully_with_minions_init(void) { big_bully_spawn_minion(3840, 307, -6041, 0); big_bully_spawn_minion(3226, 307, -5426, 0); - o->header.gfx.node.flags |= 0x10; /* bit 4 */ + o->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; cur_obj_become_intangible(); @@ -355,7 +355,7 @@ void bhv_big_bully_with_minions_loop(void) { spawn_mist_particles(); } - o->header.gfx.node.flags &= ~0x10; /* bit 4 */ + o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; cur_obj_become_tangible(); break; diff --git a/src/game/behaviors/butterfly.inc.c b/src/game/behaviors/butterfly.inc.c index ed005519..d435d8d8 100644 --- a/src/game/behaviors/butterfly.inc.c +++ b/src/game/behaviors/butterfly.inc.c @@ -3,8 +3,8 @@ void bhv_butterfly_init(void) { cur_obj_init_animation(1); - o->oButterflyYPhase = RandomFloat() * 100.0f; - o->header.gfx.unk38.animFrame = RandomFloat() * 7.0f; + o->oButterflyYPhase = random_float() * 100.0f; + o->header.gfx.unk38.animFrame = random_float() * 7.0f; o->oHomeX = o->oPosX; o->oHomeY = o->oPosY; o->oHomeZ = o->oPosZ; diff --git a/src/game/behaviors/camera_lakitu.inc.c b/src/game/behaviors/camera_lakitu.inc.c index cb5d8380..0f70c339 100644 --- a/src/game/behaviors/camera_lakitu.inc.c +++ b/src/game/behaviors/camera_lakitu.inc.c @@ -100,7 +100,7 @@ static void camera_lakitu_intro_act_show_dialog(void) { if (o->oDistanceToMario < 1000.0f) { #ifndef VERSION_JP if (!o->oCameraLakituUnk104) { - play_music(0, SEQUENCE_ARGS(15, SEQ_EVENT_CUTSCENE_LAKITU), 0); + play_music(SEQ_PLAYER_LEVEL, SEQUENCE_ARGS(15, SEQ_EVENT_CUTSCENE_LAKITU), 0); o->oCameraLakituUnk104 = TRUE; } #endif diff --git a/src/game/behaviors/cap.inc.c b/src/game/behaviors/cap.inc.c index 6234b352..8a2d08c4 100644 --- a/src/game/behaviors/cap.inc.c +++ b/src/game/behaviors/cap.inc.c @@ -50,11 +50,7 @@ void cap_check_quicksand(void) { case SURFACE_MOVING_QUICKSAND: o->oAction = 11; o->oMoveAngleYaw = (sObjFloor->force & 0xFF) << 8; -#if defined(VERSION_EU) && !defined(NON_MATCHING) - o->oForwardVel = 8 - ((sObjFloor->force & 0xff00) >> 8) * 2; -#else - o->oForwardVel = -((sObjFloor->force & 0xff00) >> 8) * 2 + 8; -#endif + o->oForwardVel = 8 + 2 * (0 - ((sObjFloor->force & 0xFF00) >> 8)); break; case SURFACE_INSTANT_QUICKSAND: @@ -65,11 +61,7 @@ void cap_check_quicksand(void) { case SURFACE_INSTANT_MOVING_QUICKSAND: o->oAction = 13; o->oMoveAngleYaw = (sObjFloor->force & 0xFF) << 8; -#if defined(VERSION_EU) && !defined(NON_MATCHING) - o->oForwardVel = 8 - ((sObjFloor->force & 0xff00) >> 8) * 2; -#else - o->oForwardVel = -((sObjFloor->force & 0xff00) >> 8) * 2 + 8; -#endif + o->oForwardVel = 8 + 2 * (0 - ((sObjFloor->force & 0xFF00) >> 8)); break; } } diff --git a/src/game/behaviors/capswitch.inc.c b/src/game/behaviors/capswitch.inc.c index 091638b7..7b8cae57 100644 --- a/src/game/behaviors/capswitch.inc.c +++ b/src/game/behaviors/capswitch.inc.c @@ -31,6 +31,9 @@ void cap_switch_act_2(void) { cur_obj_shake_screen(SHAKE_POS_SMALL); spawn_mist_particles(); spawn_triangle_break_particles(60, 139, 0.3f, o->oBehParams2ndByte); +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif } } else { sp1C = cur_obj_update_dialog_with_cutscene(1, 0x0C, CUTSCENE_CAP_SWITCH_PRESS, 0); diff --git a/src/game/behaviors/castle_flag.inc.c b/src/game/behaviors/castle_flag.inc.c index aefcd4d0..6872621b 100644 --- a/src/game/behaviors/castle_flag.inc.c +++ b/src/game/behaviors/castle_flag.inc.c @@ -1,5 +1,5 @@ // castle_flag.inc.c void bhv_castle_flag_init(void) { - o->header.gfx.unk38.animFrame = RandomFloat() * 28.0f; + o->header.gfx.unk38.animFrame = random_float() * 28.0f; } diff --git a/src/game/behaviors/castle_floor_trap.inc.c b/src/game/behaviors/castle_floor_trap.inc.c index 66f16ffb..9eeddbb4 100644 --- a/src/game/behaviors/castle_floor_trap.inc.c +++ b/src/game/behaviors/castle_floor_trap.inc.c @@ -2,7 +2,7 @@ void bhv_floor_trap_in_castle_loop(void) { if (gMarioObject->platform == o) - o->parentObj->oInteractStatus |= INTERACT_TRAP_TURN; + o->parentObj->oInteractStatus |= INT_STATUS_TRAP_TURN; o->oFaceAngleRoll = o->parentObj->oFaceAngleRoll; } @@ -19,7 +19,7 @@ void bhv_castle_floor_trap_open_detect(void) { o->oAction = 4; // rotates trapdoor so it looks always open else { o->oAngleVelRoll = 0x400; - if (o->oInteractStatus & INTERACT_TRAP_TURN) + if (o->oInteractStatus & INT_STATUS_TRAP_TURN) o->oAction = 1; // detects interact then opens the trapdoor } } @@ -45,7 +45,7 @@ void bhv_castle_floor_trap_close(void) { if (o->oFaceAngleRoll > 0) { o->oFaceAngleRoll = 0; o->oAction = 0; // after closing, reloads open detection - o->oInteractStatus &= ~(INTERACT_TRAP_TURN); + o->oInteractStatus &= ~INT_STATUS_TRAP_TURN; } } diff --git a/src/game/behaviors/chain_chomp.inc.c b/src/game/behaviors/chain_chomp.inc.c index 80d74590..a77c5d5f 100644 --- a/src/game/behaviors/chain_chomp.inc.c +++ b/src/game/behaviors/chain_chomp.inc.c @@ -290,7 +290,7 @@ static void chain_chomp_released_lunge_around(void) { } else { if (++o->oChainChompNumLunges <= 5) { cur_obj_play_sound_2(SOUND_GENERAL_CHAIN_CHOMP1); - o->oMoveAngleYaw = o->oAngleToMario + RandomSign() * 0x2000; + o->oMoveAngleYaw = o->oAngleToMario + random_sign() * 0x2000; o->oForwardVel = 30.0f; o->oVelY = 50.0f; } else { diff --git a/src/game/behaviors/chuckya.inc.c b/src/game/behaviors/chuckya.inc.c index aa50186b..4eab68c9 100644 --- a/src/game/behaviors/chuckya.inc.c +++ b/src/game/behaviors/chuckya.inc.c @@ -127,7 +127,7 @@ void chuckya_act_1(void) { if (o->oSubAction == 0) { if (cur_obj_init_animation_and_check_if_near_end(0)) o->oSubAction++; - o->oChuckyaUnkFC = RandomFloat() * 30.0f + 10.0f; + o->oChuckyaUnkFC = random_float() * 30.0f + 10.0f; o->oChuckyaUnk100 = 0; o->oForwardVel = 0.0f; } else { diff --git a/src/game/behaviors/clam.inc.c b/src/game/behaviors/clam.inc.c index 6ce44029..36969800 100644 --- a/src/game/behaviors/clam.inc.c +++ b/src/game/behaviors/clam.inc.c @@ -13,7 +13,7 @@ struct ObjectHitbox sClamShellHitbox = { }; void clam_act_0(void) { - if (func_802F92EC(0, 25)) { + if (cur_obj_init_anim_check_frame(0, 25)) { cur_obj_play_sound_2(SOUND_GENERAL_CLAM_SHELL3); spawn_mist_from_global(); cur_obj_become_tangible(); @@ -36,7 +36,7 @@ void clam_act_1(void) { if (o->oTimer > 150) { o->oAction = 0; - } else if (obj_is_rendering_enabled() && func_802F92EC(1, 8)) { + } else if (obj_is_rendering_enabled() && cur_obj_init_anim_check_frame(1, 8)) { for (val06 = -0x2000; val06 < 0x2000; val06 += 0x555) { val04 = (s16)(100.0f * sins(val06)); val02 = (s16)(100.0f * coss(val06)); diff --git a/src/game/behaviors/coin.inc.c b/src/game/behaviors/coin.inc.c index d7c27e30..913c5834 100644 --- a/src/game/behaviors/coin.inc.c +++ b/src/game/behaviors/coin.inc.c @@ -16,7 +16,7 @@ s16 D_8032F2A4[][2] = { { 0, -150 }, { 0, -50 }, { 0, 50 }, { 0, 150 }, { -50, 100 }, { -100, 50 }, { 50, 100 }, { 100, 50 } }; s32 bhv_coin_sparkles_init(void) { - if (o->oInteractStatus & INT_STATUS_INTERACTED && !(o->oInteractStatus & INTERACT_TEXT)) { + if (o->oInteractStatus & INT_STATUS_INTERACTED && !(o->oInteractStatus & INT_STATUS_TOUCHED_BOB_OMB)) { spawn_object(o, MODEL_SPARKLES, bhvGoldenCoinSparkles); obj_mark_for_deletion(o); return 1; @@ -49,9 +49,9 @@ void bhv_temp_coin_loop(void) { } void bhv_coin_init(void) { - o->oVelY = RandomFloat() * 10.0f + 30 + o->oCoinUnk110; - o->oForwardVel = RandomFloat() * 10.0f; - o->oMoveAngleYaw = RandomU16(); + o->oVelY = random_float() * 10.0f + 30 + o->oCoinUnk110; + o->oForwardVel = random_float() * 10.0f; + o->oMoveAngleYaw = random_u16(); cur_obj_set_behavior(bhvYellowCoin); obj_set_hitbox(o, &sYellowCoinHitbox); cur_obj_become_intangible(); @@ -67,7 +67,7 @@ void bhv_coin_loop(void) { if (o->oMoveFlags & OBJ_MOVE_ON_GROUND) o->oSubAction = 1; if (o->oSubAction == 1) { - o->oBounce = 0; + o->oBounciness = 0; if (sp1C->normal.y < 0.9) { sp1A = atan2s(sp1C->normal.z, sp1C->normal.x); cur_obj_rotate_yaw_toward(sp1A, 0x400); @@ -258,6 +258,6 @@ void bhv_golden_coin_sparkles_loop(void) { UNUSED s32 unused; f32 sp24 = 30.0f; sp2C = spawn_object(o, MODEL_SPARKLES, bhvCoinSparkles); - sp2C->oPosX += RandomFloat() * sp24 - sp24 / 2; - sp2C->oPosZ += RandomFloat() * sp24 - sp24 / 2; + sp2C->oPosX += random_float() * sp24 - sp24 / 2; + sp2C->oPosZ += random_float() * sp24 - sp24 / 2; } diff --git a/src/game/behaviors/controllable_platform.inc.c b/src/game/behaviors/controllable_platform.inc.c index de0ee086..73564a0f 100644 --- a/src/game/behaviors/controllable_platform.inc.c +++ b/src/game/behaviors/controllable_platform.inc.c @@ -138,7 +138,7 @@ void controllable_platform_tilt_from_mario(void) { if (D_80331694 == 6) { D_80331694 = 0; o->oTimer = 0; - o->header.gfx.node.flags &= ~0x10; + o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; } } else { } diff --git a/src/game/behaviors/corkbox.inc.c b/src/game/behaviors/corkbox.inc.c index cbc50ea9..f9ea7fce 100644 --- a/src/game/behaviors/corkbox.inc.c +++ b/src/game/behaviors/corkbox.inc.c @@ -10,10 +10,10 @@ void bhv_bobomb_bully_death_smoke_init(void) { void bhv_bobomb_explosion_bubble_init(void) { obj_scale_xyz(o, 2.0f, 2.0f, 1.0f); - o->oBobombExpBubGfxExpRateX = (s32)(RandomFloat() * 2048.0f) + 0x800; - o->oBobombExpBubGfxExpRateY = (s32)(RandomFloat() * 2048.0f) + 0x800; - o->oTimer = RandomFloat() * 10.0f; - o->oVelY = (s32)(RandomFloat() * 4.0f) + 4; + o->oBobombExpBubGfxExpRateX = (s32)(random_float() * 2048.0f) + 0x800; + o->oBobombExpBubGfxExpRateY = (s32)(random_float() * 2048.0f) + 0x800; + o->oTimer = random_float() * 10.0f; + o->oVelY = (s32)(random_float() * 4.0f) + 4; } void bhv_bobomb_explosion_bubble_loop(void) { diff --git a/src/game/behaviors/door.inc.c b/src/game/behaviors/door.inc.c index ecd24d69..db48e4f9 100644 --- a/src/game/behaviors/door.inc.c +++ b/src/game/behaviors/door.inc.c @@ -129,11 +129,11 @@ void bhv_star_door_loop_2(void) { } else sp4 = 1; if (sp4 == 1) { - o->header.gfx.node.flags |= 1; + o->header.gfx.node.flags |= GRAPH_RENDER_ACTIVE; D_8035FEE4++; } if (sp4 == 0) { - o->header.gfx.node.flags &= ~1; + o->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE; } o->oDoorUnk88 = sp4; } diff --git a/src/game/behaviors/dorrie.inc.c b/src/game/behaviors/dorrie.inc.c index 6a522c77..7cf5c8b9 100644 --- a/src/game/behaviors/dorrie.inc.c +++ b/src/game/behaviors/dorrie.inc.c @@ -61,7 +61,7 @@ void dorrie_begin_head_raise(s32 liftingMario) { } void dorrie_act_lower_head(void) { - if (func_802F92EC(2, 35)) { + if (cur_obj_init_anim_check_frame(2, 35)) { cur_obj_reverse_animation(); #ifdef VERSION_JP diff --git a/src/game/behaviors/end_birds_1.inc.c b/src/game/behaviors/end_birds_1.inc.c index b7526f76..532c2728 100644 --- a/src/game/behaviors/end_birds_1.inc.c +++ b/src/game/behaviors/end_birds_1.inc.c @@ -2,7 +2,7 @@ void bhv_end_birds_1_loop(void) { Vec3f sp34; - UNUSED f32 sp30 = RandomFloat(); + UNUSED f32 sp30 = random_float(); switch (gCurrentObject->oAction) { case 0: diff --git a/src/game/behaviors/end_birds_2.inc.c b/src/game/behaviors/end_birds_2.inc.c index 5b0aafdb..9526448e 100644 --- a/src/game/behaviors/end_birds_2.inc.c +++ b/src/game/behaviors/end_birds_2.inc.c @@ -6,8 +6,8 @@ void bhv_end_birds_2_loop(void) { f32 sp34; s16 sp32, sp30; - sp38 = RandomFloat(); - gCurrentObject->oForwardVel = (RandomFloat() * 10.f) + 25.f; + sp38 = random_float(); + gCurrentObject->oForwardVel = (random_float() * 10.f) + 25.f; switch (gCurrentObject->oAction) { case 0: diff --git a/src/game/behaviors/enemy_lakitu.inc.c b/src/game/behaviors/enemy_lakitu.inc.c index 5fcaf5e7..056c3f13 100644 --- a/src/game/behaviors/enemy_lakitu.inc.c +++ b/src/game/behaviors/enemy_lakitu.inc.c @@ -117,7 +117,7 @@ static void enemy_lakitu_sub_act_no_spiny(void) { * enter the throw spiny sub-action. */ static void enemy_lakitu_sub_act_hold_spiny(void) { - func_802F927C(3); + cur_obj_init_anim_extend(3); if (o->oEnemyLakituSpinyCooldown != 0) { o->oEnemyLakituSpinyCooldown -= 1; @@ -135,7 +135,7 @@ static void enemy_lakitu_sub_act_hold_spiny(void) { * Throw the spiny, then enter the no spiny sub-action. */ static void enemy_lakitu_sub_act_throw_spiny(void) { - if (func_802F92EC(2, 2)) { + if (cur_obj_init_anim_check_frame(2, 2)) { cur_obj_play_sound_2(SOUND_OBJ_EVIL_LAKITU_THROW); o->prevObj = NULL; } diff --git a/src/game/behaviors/exclamation_box.inc.c b/src/game/behaviors/exclamation_box.inc.c index 3050a771..86486c35 100644 --- a/src/game/behaviors/exclamation_box.inc.c +++ b/src/game/behaviors/exclamation_box.inc.c @@ -78,6 +78,9 @@ void exclamation_box_act_2(void) { o->oGravity = -8.0f; o->oFloorHeight = o->oPosY; o->oAction = 3; +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif } load_object_collision_model(); } diff --git a/src/game/behaviors/eyerok.inc.c b/src/game/behaviors/eyerok.inc.c index d5197692..ef9e6169 100644 --- a/src/game/behaviors/eyerok.inc.c +++ b/src/game/behaviors/eyerok.inc.c @@ -12,7 +12,7 @@ struct ObjectHitbox sEyerokHitbox = { s8 D_80331BA4[] = { 0, 1, 3, 2, 1, 0 }; -static s32 func_8030D284(s32 arg0) { +static s32 eyerok_check_mario_relative_z(s32 arg0) { if (gMarioObject->oPosZ - o->oHomeZ < arg0) { return TRUE; } else { @@ -43,7 +43,7 @@ static void eyerok_boss_act_wake_up(void) { if (o->oEyerokBossNumHands == 2) { if (o->oTimer > 5) { if (o->oSubAction == 0) { - func_8031FFB4(0, 60, 40); + func_8031FFB4(SEQ_PLAYER_LEVEL, 60, 40); o->oSubAction += 1; } @@ -75,7 +75,7 @@ static void eyerok_boss_act_fight(void) { if (o->oEyerokBossUnk104 != 0) { if (approach_f32_ptr(&o->oEyerokBossUnk110, 1.0f, 0.02f)) { if (o->oEyerokBossUnk104 < 0) { - if (func_8030D284(400) == 0 && ++o->oEyerokBossUnk104 == 0) { + if (eyerok_check_mario_relative_z(400) == 0 && ++o->oEyerokBossUnk104 == 0) { o->oEyerokBossUnk104 = 1; } } else { @@ -92,7 +92,7 @@ static void eyerok_boss_act_fight(void) { } else { o->oEyerokBossUnkFC += 1; - if (func_8030D284(400)) { + if (eyerok_check_mario_relative_z(400)) { o->oEyerokBossUnk104 = -8; o->oEyerokBossUnk110 = 1.0f; o->oEyerokBossUnk108 = 0.0f; @@ -100,7 +100,7 @@ static void eyerok_boss_act_fight(void) { o->oEyerokBossUnk104 = 8; o->oEyerokBossUnk110 = 0.0f; - if ((o->oEyerokBossUnkFC = RandomU16() & 0x1) != 0) { + if ((o->oEyerokBossUnkFC = random_u16() & 0x1) != 0) { o->oEyerokBossUnk108 = -1.0f; } else { o->oEyerokBossUnk108 = 1.0f; @@ -173,7 +173,7 @@ static s32 eyerok_hand_check_attacked(void) { } } -static void func_8030DBA8(void) { +static void eyerok_hand_pound_ground(void) { cur_obj_play_sound_2(SOUND_OBJ_POUNDING_LOUD); set_camera_shake_from_point(SHAKE_POS_SMALL, o->oPosX, o->oPosY, o->oPosZ); spawn_mist_from_global(); @@ -216,7 +216,7 @@ static void eyerok_hand_act_idle(void) { } } else if (o->parentObj->oEyerokBossUnk1AC == 0 && o->parentObj->oEyerokBossActiveHand != 0) { if (o->parentObj->oEyerokBossActiveHand == o->oBehParams2ndByte) { - if (func_8030D284(400) != 0 || RandomU16() % 2 != 0) { + if (eyerok_check_mario_relative_z(400) != 0 || random_u16() % 2 != 0) { o->oAction = EYEROK_HAND_ACT_TARGET_MARIO; o->oMoveAngleYaw = o->oAngleToMario; o->oGravity = 0.0f; @@ -245,7 +245,7 @@ static void eyerok_hand_act_open(void) { o->parentObj->oEyerokBossUnk1AC = o->oBehParams2ndByte; - if (func_802F92B0(4)) { + if (cur_obj_init_anim_and_check_if_end(4)) { o->oAction = EYEROK_HAND_ACT_SHOW_EYE; o->oEyerokHandUnkFC = 2; o->oEyerokHandUnk100 = 60; @@ -268,7 +268,7 @@ static void eyerok_hand_act_show_eye(void) { UNUSED s16 val06; cur_obj_init_animation_with_sound(5); - func_802F9378(0, 0, SOUND_OBJ_EYEROK_SHOW_EYE); + cur_obj_play_sound_at_anim_range(0, 0, SOUND_OBJ_EYEROK_SHOW_EYE); if (!eyerok_hand_check_attacked()) { if (o->parentObj->oEyerokBossActiveHand == 0) { @@ -302,7 +302,7 @@ static void eyerok_hand_act_show_eye(void) { } static void eyerok_hand_act_close(void) { - if (func_802F92EC(7, 1)) { + if (cur_obj_init_anim_check_frame(7, 1)) { o->collisionData = segmented_to_virtual(ssl_seg7_collision_07028274); if (o->parentObj->oEyerokBossNumHands != 2) { @@ -316,7 +316,7 @@ static void eyerok_hand_act_close(void) { } static void eyerok_hand_act_attacked(void) { - if (func_802F92B0(3)) { + if (cur_obj_init_anim_and_check_if_end(3)) { o->oAction = EYEROK_HAND_ACT_RECOVER; o->collisionData = segmented_to_virtual(ssl_seg7_collision_07028274); } @@ -327,7 +327,7 @@ static void eyerok_hand_act_attacked(void) { } static void eyerok_hand_act_recover(void) { - if (func_802F92B0(0)) { + if (cur_obj_init_anim_and_check_if_end(0)) { o->oAction = EYEROK_HAND_ACT_BECOME_ACTIVE; } } @@ -340,7 +340,7 @@ static void eyerok_hand_act_become_active(void) { } static void eyerok_hand_act_die(void) { - if (func_802F92B0(1)) { + if (cur_obj_init_anim_and_check_if_end(1)) { o->parentObj->oEyerokBossUnk1AC = 0; obj_explode_and_spawn_coins(150.0f, 1); create_sound_spawner(SOUND_OBJ2_EYEROK_SOUND_LONG); @@ -376,7 +376,7 @@ static void eyerok_hand_act_retreat(void) { } static void eyerok_hand_act_target_mario(void) { - if (func_8030D284(400) != 0 || o->oPosZ - gMarioObject->oPosZ > 0.0f + if (eyerok_check_mario_relative_z(400) != 0 || o->oPosZ - gMarioObject->oPosZ > 0.0f || o->oPosZ - o->parentObj->oPosZ > 1700.0f || absf(o->oPosX - o->parentObj->oPosX) > 900.0f || (o->oMoveFlags & 0x00000200)) { o->oForwardVel = 0.0f; @@ -396,7 +396,7 @@ static void eyerok_hand_act_smash(void) { if (o->oTimer > 20) { if (o->oMoveFlags & 0x00000003) { if (o->oGravity < -4.0f) { - func_8030DBA8(); + eyerok_hand_pound_ground(); o->oGravity = -4.0f; } else { sp1E = abs_angle_diff(o->oFaceAngleYaw, o->oAngleToMario); @@ -473,7 +473,7 @@ static void eyerok_hand_act_double_pound(void) { if (o->oMoveFlags & 0x00000003) { if (o->oGravity < -15.0f) { o->parentObj->oEyerokBossActiveHand = 0; - func_8030DBA8(); + eyerok_hand_pound_ground(); o->oForwardVel = 0.0f; o->oGravity = -15.0f; } else { diff --git a/src/game/behaviors/fire_piranha_plant.inc.c b/src/game/behaviors/fire_piranha_plant.inc.c index 8cf1744a..a6d867b2 100644 --- a/src/game/behaviors/fire_piranha_plant.inc.c +++ b/src/game/behaviors/fire_piranha_plant.inc.c @@ -91,7 +91,7 @@ static void fire_piranha_plant_act_hide(void) { } static void fire_piranha_plant_act_grow(void) { - func_802F927C(4); + cur_obj_init_anim_extend(4); if (approach_f32_ptr(&o->oFirePiranhaPlantScale, o->oFirePiranhaPlantNeutralScale, 0.04f * o->oFirePiranhaPlantNeutralScale)) { diff --git a/src/game/behaviors/fish.inc.c b/src/game/behaviors/fish.inc.c index 31bb4eb8..839ab8d6 100644 --- a/src/game/behaviors/fish.inc.c +++ b/src/game/behaviors/fish.inc.c @@ -124,13 +124,13 @@ void fish_group_act_rotation(void) { * Determines fish movement. */ if (o->oTimer == 0) { - o->oForwardVel = RandomFloat() * 2 + 3.0f; + o->oForwardVel = random_float() * 2 + 3.0f; if (gCurrLevelNum == LEVEL_SA) { - o->oFishRandomOffset = RandomFloat() * 700.0f; + o->oFishRandomOffset = random_float() * 700.0f; } else { - o->oFishRandomOffset = RandomFloat() * 100.0f; + o->oFishRandomOffset = random_float() * 100.0f; } - o->oFishRespawnDistance = RandomFloat() * 500 + 200.0f; + o->oFishRespawnDistance = random_float() * 500 + 200.0f; } // Interact with Mario through rotating towards him. @@ -176,9 +176,9 @@ void fish_group_act_move(void) { * This allows fish to move in seemingly natural patterns. */ if (o->oTimer == 0) { - o->oFishActiveDistance = RandomFloat() * 300.0f; - o->oFishRandomSpeed = RandomFloat() * 1024.0f + 1024.0f; - o->oFishRandomVel = RandomFloat() * 4.0f + 8.0f + 5.0f; + o->oFishActiveDistance = random_float() * 300.0f; + o->oFishRandomSpeed = random_float() * 1024.0f + 1024.0f; + o->oFishRandomVel = random_float() * 4.0f + 8.0f + 5.0f; if (o->oDistanceToMario < 600.0f) { distance = 1; } else { @@ -226,9 +226,9 @@ void fish_group_act_move(void) { */ void fish_group_act_animate(void) { cur_obj_init_animation_with_accel_and_sound(0, 1.0f); - o->header.gfx.unk38.animFrame = (s16)(RandomFloat() * 28.0f); - o->oFishDepthDistance = RandomFloat() * 300.0f; - cur_obj_scale(RandomFloat() * 0.4 + 0.8); + o->header.gfx.unk38.animFrame = (s16)(random_float() * 28.0f); + o->oFishDepthDistance = random_float() * 300.0f; + cur_obj_scale(random_float() * 0.4 + 0.8); o->oAction = FISH_ACT_ACTIVE; } diff --git a/src/game/behaviors/flame.inc.c b/src/game/behaviors/flame.inc.c index 5bc899c9..e3668219 100644 --- a/src/game/behaviors/flame.inc.c +++ b/src/game/behaviors/flame.inc.c @@ -7,11 +7,11 @@ void bhv_small_piranha_flame_loop(void) { if (o->oTimer > 0) { obj_mark_for_deletion(o); } else { - sp2C = RandomFloat() - 0.5f; + sp2C = random_float() - 0.5f; o->header.gfx.scale[1] = o->header.gfx.scale[2] * (1.0f + 0.7f * sp2C); o->header.gfx.scale[0] = o->header.gfx.scale[2] * (0.9f - 0.5f * sp2C); - o->oAnimState = RandomU16(); + o->oAnimState = random_u16(); } } else { cur_obj_update_floor_and_walls(); diff --git a/src/game/behaviors/flame_mario.inc.c b/src/game/behaviors/flame_mario.inc.c index eacc297e..52e4bae6 100644 --- a/src/game/behaviors/flame_mario.inc.c +++ b/src/game/behaviors/flame_mario.inc.c @@ -6,8 +6,8 @@ void bhv_black_smoke_upward_loop(void) { void bhv_black_smoke_bowser_loop(void) { if (o->oTimer == 0) { - o->oForwardVel = RandomFloat() * 2 + 0.5; - o->oMoveAngleYaw = RandomU16(); + o->oForwardVel = random_float() * 2 + 0.5; + o->oMoveAngleYaw = random_u16(); o->oVelY = 8; o->oBlackSmokeBowserUnkF4 = o->header.gfx.scale[0]; } @@ -18,8 +18,8 @@ void bhv_black_smoke_bowser_loop(void) { void bhv_black_smoke_mario_loop(void) { if (o->oTimer == 0) { cur_obj_set_pos_relative(gMarioObject, 0, 0, -30.0f); - o->oForwardVel = RandomFloat() * 2 + 0.5; - o->oMoveAngleYaw = (gMarioObject->oMoveAngleYaw + 0x7000) + RandomFloat() * 8192.0f; + o->oForwardVel = random_float() * 2 + 0.5; + o->oMoveAngleYaw = (gMarioObject->oMoveAngleYaw + 0x7000) + random_float() * 8192.0f; o->oVelY = 8; } o->oMoveAngleYaw += o->oAngleVelYaw; diff --git a/src/game/behaviors/flamethrower.inc.c b/src/game/behaviors/flamethrower.inc.c index e6bced99..3ef046ae 100644 --- a/src/game/behaviors/flamethrower.inc.c +++ b/src/game/behaviors/flamethrower.inc.c @@ -4,7 +4,7 @@ void bhv_flamethrower_flame_loop(void) { f32 size; s32 sp18; if (o->oTimer == 0) { - o->oAnimState = (s32)(RandomFloat() * 10.0f); + o->oAnimState = (s32)(random_float() * 10.0f); obj_translate_xyz_random(o, 10.0f); } if (o->oBehParams2ndByte == 2) diff --git a/src/game/behaviors/fly_guy.inc.c b/src/game/behaviors/fly_guy.inc.c index 63cb45a3..6dcd78b1 100644 --- a/src/game/behaviors/fly_guy.inc.c +++ b/src/game/behaviors/fly_guy.inc.c @@ -40,7 +40,7 @@ static void fly_guy_act_idle(void) { } else { // Randomly enter the approach mario action - but this doesn't // really do anything since we come right back to idle - if (o->oFlyGuyIdleTimer >= 3 || o->oFlyGuyIdleTimer == (RandomU16() & 1) + 2) { + if (o->oFlyGuyIdleTimer >= 3 || o->oFlyGuyIdleTimer == (random_u16() & 1) + 2) { o->oFlyGuyIdleTimer = 0; o->oAction = FLY_GUY_ACT_APPROACH_MARIO; } else { @@ -69,7 +69,7 @@ static void fly_guy_act_approach_mario(void) { if (abs_angle_diff(o->oAngleToMario, o->oFaceAngleYaw) < 0x2000) { if (o->oPosY - gMarioObject->oPosY > 400.0f || o->oDistanceToMario < 400.0f) { // Either shoot fire or lunge - if (o->oBehParams2ndByte != 0 && RandomU16() % 2) { + if (o->oBehParams2ndByte != 0 && random_u16() % 2) { o->oAction = FLY_GUY_ACT_SHOOT_FIRE; o->oFlyGuyScaleVel = 0.06f; } else { @@ -101,7 +101,7 @@ static void fly_guy_act_lunge(void) { obj_face_pitch_approach(o->oFlyGuyLungeTargetPitch, 0x400); // Range [-0x1000, 0x2000] - o->oFlyGuyTargetRoll = 0x1000 * (s16)(RandomFloat() * 3.0f) - 0x1000; + o->oFlyGuyTargetRoll = 0x1000 * (s16)(random_float() * 3.0f) - 0x1000; o->oTimer = 0; } else { // Twirl back upward diff --git a/src/game/behaviors/flying_bookend_switch.inc.c b/src/game/behaviors/flying_bookend_switch.inc.c index 48e949d1..6b2f25c2 100644 --- a/src/game/behaviors/flying_bookend_switch.inc.c +++ b/src/game/behaviors/flying_bookend_switch.inc.c @@ -47,7 +47,7 @@ void flying_bookend_act_0(void) { void flying_bookend_act_1(void) { if (obj_forward_vel_approach(3.0f, 1.0f)) { - if (func_802F92B0(2)) { + if (cur_obj_init_anim_and_check_if_end(2)) { o->oAction = 2; o->oForwardVel = 0.0f; } else { @@ -272,7 +272,7 @@ void bhv_book_switch_loop(void) { play_sound(SOUND_GENERAL2_RIGHT_ANSWER, gDefaultSoundArgs); o->parentObj->oBookSwitchManagerUnkF4 += 1; } else { - sp36 = RandomU16() & 0x1; + sp36 = random_u16() & 0x1; sp34 = gMarioObject->oPosZ + 1.5f * gMarioStates[0].vel[2]; play_sound(SOUND_MENU_CAMERA_BUZZ, gDefaultSoundArgs); diff --git a/src/game/behaviors/goomba.inc.c b/src/game/behaviors/goomba.inc.c index 92ad4782..2dab2fec 100644 --- a/src/game/behaviors/goomba.inc.c +++ b/src/game/behaviors/goomba.inc.c @@ -159,7 +159,7 @@ static void goomba_act_walk(void) { // If walking fast enough, play footstep sounds if (o->oGoombaRelativeSpeed > 4.0f / 3.0f) { - func_802F9378(2, 17, SOUND_OBJ_GOOMBA_WALK); + cur_obj_play_sound_at_anim_range(2, 17, SOUND_OBJ_GOOMBA_WALK); } //! By strategically hitting a wall, steep slope, or another goomba, we can @@ -198,7 +198,7 @@ static void goomba_act_walk(void) { if (o->oGoombaWalkTimer != 0) { o->oGoombaWalkTimer -= 1; } else { - if (RandomU16() & 3) { + if (random_u16() & 3) { o->oGoombaTargetYaw = obj_random_fixed_turn(0x2000); o->oGoombaWalkTimer = random_linear_offset(100, 100); } else { diff --git a/src/game/behaviors/haunted_chair.inc.c b/src/game/behaviors/haunted_chair.inc.c index e2646cae..4627a0b7 100644 --- a/src/game/behaviors/haunted_chair.inc.c +++ b/src/game/behaviors/haunted_chair.inc.c @@ -137,6 +137,6 @@ void bhv_haunted_chair_loop(void) { haunted_chair_act_1(); break; } - func_802F8D78(30.0f, 30.0f); + cur_obj_spin_all_dimensions(30.0f, 30.0f); } } diff --git a/src/game/behaviors/hoot.inc.c b/src/game/behaviors/hoot.inc.c index b807d5d9..481b6433 100644 --- a/src/game/behaviors/hoot.inc.c +++ b/src/game/behaviors/hoot.inc.c @@ -6,7 +6,7 @@ void bhv_hoot_init(void) { o->oHomeX = o->oPosX + 800.0f; o->oHomeY = o->oPosY - 150.0f; o->oHomeZ = o->oPosZ + 300.0f; - o->header.gfx.node.flags |= 0x10; /* bit 4 */ + o->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; cur_obj_become_intangible(); } @@ -225,7 +225,7 @@ void hoot_turn_to_home(void) { } void hoot_awake_loop(void) { - if (o->oInteractStatus == INTERACT_HOOT) { + if (o->oInteractStatus == INT_STATUS_HOOT_GRABBED_BY_MARIO) { hoot_action_loop(); cur_obj_init_animation(1); } else { @@ -246,7 +246,7 @@ void bhv_hoot_loop(void) { switch (o->oHootAvailability) { case HOOT_AVAIL_ASLEEP_IN_TREE: if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 50)) { - o->header.gfx.node.flags &= ~0x10; /* bit 4 */ + o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; o->oHootAvailability = HOOT_AVAIL_WANTS_TO_TALK; } break; diff --git a/src/game/behaviors/intro_lakitu.inc.c b/src/game/behaviors/intro_lakitu.inc.c index 4947adcd..7b12a651 100644 --- a/src/game/behaviors/intro_lakitu.inc.c +++ b/src/game/behaviors/intro_lakitu.inc.c @@ -89,7 +89,7 @@ void bhv_intro_lakitu_loop(void) { gCurrentObject->oAction += 1; switch (gCurrentObject->oTimer) { -#ifdef VERSION_US +#if defined(VERSION_US) || defined(VERSION_SH) case 534: cur_obj_play_sound_2(SOUND_ACTION_FLYING_FAST); break; diff --git a/src/game/behaviors/intro_scene.inc.c b/src/game/behaviors/intro_scene.inc.c index 854d37a5..7b3498ba 100644 --- a/src/game/behaviors/intro_scene.inc.c +++ b/src/game/behaviors/intro_scene.inc.c @@ -5,7 +5,7 @@ void spawn_child_obj_relative(struct Object *parent, s16 xOffset, s16 yOffset, s s32 model, const BehaviorScript *behavior) { struct Object *sp1C = spawn_object(parent, model, behavior); - sp1C->header.gfx.unk38.animFrame = RandomFloat() * 6.f; + sp1C->header.gfx.unk38.animFrame = random_float() * 6.f; sp1C->oEndBirdUnk104 = sCutsceneVars[9].point[0]; sCutsceneVars[9].point[0] += 1.f; sp1C->oPosX += xOffset; diff --git a/src/game/behaviors/jumping_box.inc.c b/src/game/behaviors/jumping_box.inc.c index 4a40b073..3f43ea11 100644 --- a/src/game/behaviors/jumping_box.inc.c +++ b/src/game/behaviors/jumping_box.inc.c @@ -17,12 +17,12 @@ void jumping_box_act_0(void) { if (o->oJumpingBoxUnkF8-- < 0) o->oSubAction++; if (o->oTimer > o->oJumpingBoxUnkF4) { - o->oVelY = RandomFloat() * 5.0f + 15.0f; + o->oVelY = random_float() * 5.0f + 15.0f; o->oSubAction++; } } else if (o->oMoveFlags & 2) { o->oSubAction = 0; - o->oJumpingBoxUnkF8 = RandomFloat() * 60.0f + 30.0f; + o->oJumpingBoxUnkF8 = random_float() * 60.0f + 30.0f; } } @@ -62,7 +62,7 @@ void bhv_jumping_box_loop(void) { o->oAction = 1; break; } - if (o->oInteractStatus & INTERACT_HIT_FROM_BELOW) { + if (o->oInteractStatus & INT_STATUS_STOP_RIDING) { create_sound_spawner(SOUND_GENERAL_BREAK_BOX); obj_explode_and_spawn_coins(46.0f, 1); } diff --git a/src/game/behaviors/king_bobomb.inc.c b/src/game/behaviors/king_bobomb.inc.c index 248f54f8..63a75755 100644 --- a/src/game/behaviors/king_bobomb.inc.c +++ b/src/game/behaviors/king_bobomb.inc.c @@ -33,7 +33,7 @@ void king_bobomb_act_0(void) { o->oHealth = 3; if (cur_obj_can_mario_activate_textbox_2(500.0f, 100.0f)) { o->oSubAction++; - func_8031FFB4(0, 60, 40); + func_8031FFB4(SEQ_PLAYER_LEVEL, 60, 40); } } else if (cur_obj_update_dialog_with_cutscene(2, 1, CUTSCENE_DIALOG, DIALOG_017)) { o->oAction = 2; diff --git a/src/game/behaviors/klepto.inc.c b/src/game/behaviors/klepto.inc.c index 39b105f4..22ab3e8f 100644 --- a/src/game/behaviors/klepto.inc.c +++ b/src/game/behaviors/klepto.inc.c @@ -25,11 +25,11 @@ static void klepto_target_mario(void) { o->oKleptoUnk1AE = -60; } -static s32 func_8030F158(void) { +static s32 klepto_set_and_check_if_anim_at_end(void) { if (o->oSoundStateID == 6) { - func_802F932C(5); + cur_obj_set_anim_if_at_end(5); } else if (o->oSoundStateID == 5) { - if (func_802F932C(0)) { + if (cur_obj_set_anim_if_at_end(0)) { cur_obj_play_sound_2(SOUND_GENERAL_SWISH_WATER); o->header.gfx.unk38.animFrame = 9; } @@ -43,7 +43,7 @@ static s32 func_8030F158(void) { return FALSE; } -static void func_8030F218(void) { +static void klepto_anim_dive(void) { if (o->oKleptoUnk1AE > 0) { if (o->oKleptoUnk1B0 < -400) { o->oKleptoUnk1AE = 0; @@ -61,7 +61,7 @@ static void func_8030F218(void) { } } else { obj_move_pitch_approach(o->oKleptoUnk1B0, 600); - if (func_8030F158() != 0) { + if (klepto_set_and_check_if_anim_at_end() != 0) { if (o->oKleptoUnk1AE != 0) { o->oKleptoUnk1AE += 1; } else if (o->oKleptoUnk1B0 > -100) { @@ -111,7 +111,7 @@ static void klepto_change_target(void) { } } } else { - newTarget = RandomU16() % 3; + newTarget = random_u16() % 3; } o->oKleptoUnkF8 = 400 * absi(newTarget - o->oKleptoTargetNumber); @@ -142,7 +142,7 @@ static void klepto_circle_target(f32 radius, f32 targetSpeed) { } o->oKleptoYawToTarget += turnAmount; - func_8030F218(); + klepto_anim_dive(); //! The multiplied value is sometimes out of range for an s16 during the s32 -> s16 cast, // which might invert sign. @@ -169,7 +169,7 @@ static void klepto_approach_target(f32 targetSpeed) { } } - func_8030F218(); + klepto_anim_dive(); obj_rotate_yaw_and_bounce_off_walls(o->oKleptoYawToTarget, 400); approach_f32_ptr(&o->oKleptoSpeed, targetSpeed, 0.05f); } @@ -190,7 +190,7 @@ static void klepto_act_wait_for_mario(void) { static void klepto_act_turn_toward_mario(void) { klepto_target_mario(); - if (func_8030F158() && cur_obj_check_if_at_animation_end() && o->oKleptoDistanceToTarget > 800.0f + if (klepto_set_and_check_if_anim_at_end() && cur_obj_check_if_at_animation_end() && o->oKleptoDistanceToTarget > 800.0f && abs_angle_diff(o->oAngleToMario, o->oFaceAngleYaw) < 0x800 && o->oKleptoUnk1B0 < 0x400) { cur_obj_play_sound_2(SOUND_OBJ_KLEPTO1); o->oAction = KLEPTO_ACT_DIVE_AT_MARIO; @@ -211,7 +211,7 @@ static void klepto_act_dive_at_mario(void) { cur_obj_play_sound_2(SOUND_GENERAL_SWISH_WATER); } - if (func_802F932C(0)) { + if (cur_obj_set_anim_if_at_end(0)) { if (o->oAnimState != KLEPTO_ANIM_STATE_HOLDING_NOTHING) { o->oAction = KLEPTO_ACT_CIRCLE_TARGET_HOLDING; o->oKleptoTimeUntilTargetChange = 0; @@ -222,7 +222,7 @@ static void klepto_act_dive_at_mario(void) { } else { f32 dy = o->oPosY - gMarioObject->oPosY; if (o->oSoundStateID == 3) { - func_802F932C(4); + cur_obj_set_anim_if_at_end(4); } else if (o->oVelY > 0.0f && dy > 200.0f) { cur_obj_init_animation_with_sound(2); } diff --git a/src/game/behaviors/koopa.inc.c b/src/game/behaviors/koopa.inc.c index 2786ac35..87824452 100644 --- a/src/game/behaviors/koopa.inc.c +++ b/src/game/behaviors/koopa.inc.c @@ -97,7 +97,7 @@ static void koopa_play_footstep_sound(s8 animFrame1, s8 animFrame2) { sound = SOUND_OBJ_KOOPA_WALK; } - func_802F9378(animFrame1, animFrame2, sound); + cur_obj_play_sound_at_anim_range(animFrame1, animFrame2, sound); } /** @@ -120,9 +120,9 @@ static s32 koopa_check_run_from_mario(void) { */ static void koopa_shelled_act_stopped(void) { o->oForwardVel = 0.0f; - if (func_802F92B0(7)) { + if (cur_obj_init_anim_and_check_if_end(7)) { o->oAction = KOOPA_SHELLED_ACT_WALK; - o->oKoopaTargetYaw = o->oMoveAngleYaw + 0x2000 * (s16) RandomSign(); + o->oKoopaTargetYaw = o->oMoveAngleYaw + 0x2000 * (s16) random_sign(); } } @@ -132,7 +132,7 @@ static void koopa_shelled_act_stopped(void) { static void koopa_walk_start(void) { obj_forward_vel_approach(3.0f * o->oKoopaAgility, 0.3f * o->oKoopaAgility); - if (func_802F92B0(11)) { + if (cur_obj_init_anim_and_check_if_end(11)) { o->oSubAction += 1; o->oKoopaCountdown = random_linear_offset(30, 100); } @@ -157,7 +157,7 @@ static void koopa_walk(void) { */ static void koopa_walk_stop(void) { obj_forward_vel_approach(0.0f, 1.0f * o->oKoopaAgility); - if (func_802F92B0(10)) { + if (cur_obj_init_anim_and_check_if_end(10)) { o->oAction = KOOPA_SHELLED_ACT_STOPPED; } } @@ -241,12 +241,12 @@ static void koopa_shelled_act_lying(void) { o->oMoveAngleYaw = cur_obj_reflect_move_angle_off_wall(); } - func_802F927C(5); + cur_obj_init_anim_extend(5); koopa_dive_update_speed(0.3f); } else if (o->oKoopaCountdown != 0) { o->oKoopaCountdown -= 1; cur_obj_extend_animation_if_at_end(); - } else if (func_802F92B0(6)) { + } else if (cur_obj_init_anim_and_check_if_end(6)) { o->oAction = KOOPA_SHELLED_ACT_STOPPED; } } @@ -418,15 +418,15 @@ static void koopa_unshelled_act_dive(void) { if (o->oForwardVel != 0.0f) { if (o->oAction == KOOPA_UNSHELLED_ACT_LYING) { o->oAnimState = 1; - func_802F927C(2); + cur_obj_init_anim_extend(2); } else { - func_802F927C(5); + cur_obj_init_anim_extend(5); } koopa_dive_update_speed(0.5f); } else if (o->oKoopaCountdown != 0) { o->oKoopaCountdown -= 1; cur_obj_extend_animation_if_at_end(); - } else if (func_802F92B0(6)) { + } else if (cur_obj_init_anim_and_check_if_end(6)) { o->oAction = KOOPA_UNSHELLED_ACT_RUN; } @@ -437,7 +437,7 @@ end:; * Unused action function. */ static void koopa_unshelled_act_unused3(void) { - func_802F927C(0); + cur_obj_init_anim_extend(0); } /** @@ -473,7 +473,7 @@ s32 obj_begin_race(s32 noTimer) { cur_obj_play_sound_2(SOUND_GENERAL_RACE_GUN_SHOT); if (!noTimer) { - play_music(0, SEQUENCE_ARGS(4, SEQ_LEVEL_SLIDE), 0); + play_music(SEQ_PLAYER_LEVEL, SEQUENCE_ARGS(4, SEQ_LEVEL_SLIDE), 0); level_control_timer(TIMER_CONTROL_SHOW); level_control_timer(TIMER_CONTROL_START); @@ -662,7 +662,7 @@ static void koopa_the_quick_act_race(void) { // We could perform a goomba double jump if we could deactivate // ktq if (o->oMoveFlags & OBJ_MOVE_MASK_ON_GROUND) { - if (func_802F92B0(13)) { + if (cur_obj_init_anim_and_check_if_end(13)) { o->oSubAction -= 1; } diff --git a/src/game/behaviors/koopa_shell.inc.c b/src/game/behaviors/koopa_shell.inc.c index 62526dbc..c408bed7 100644 --- a/src/game/behaviors/koopa_shell.inc.c +++ b/src/game/behaviors/koopa_shell.inc.c @@ -18,17 +18,17 @@ void koopa_shell_spawn_water_drop(void) { spawn_object(o, MODEL_WAVE_TRAIL, bhvObjectWaveTrail); if (gMarioStates->forwardVel > 10.0f) { drop = spawn_object_with_scale(o, MODEL_WHITE_PARTICLE_SMALL, bhvWaterDroplet, 1.5f); - drop->oVelY = RandomFloat() * 30.0f; + drop->oVelY = random_float() * 30.0f; obj_translate_xz_random(drop, 110.0f); } } void bhv_koopa_shell_flame_loop(void) { if (o->oTimer == 0) { - o->oMoveAngleYaw = RandomU16(); - o->oVelY = RandomFloat() * 30.0f; + o->oMoveAngleYaw = random_u16(); + o->oVelY = random_float() * 30.0f; o->oGravity = -4.0f; - o->oAnimState = RandomFloat() * 10.0f; + o->oAnimState = random_float() * 10.0f; obj_translate_xz_random(o, 110.0f); o->oKoopaShellFlameUnkF8 = 4.0f; } diff --git a/src/game/behaviors/lll_hexagonal_ring.inc.c b/src/game/behaviors/lll_hexagonal_ring.inc.c index 7c75f046..a0a4d6b7 100644 --- a/src/game/behaviors/lll_hexagonal_ring.inc.c +++ b/src/game/behaviors/lll_hexagonal_ring.inc.c @@ -5,12 +5,12 @@ void hexagonal_ring_spawn_flames(void) { f32 size; sp1C = spawn_object(o, MODEL_RED_FLAME, bhvVolcanoFlames); sp1C->oPosY += 550.0f; - sp1C->oMoveAngleYaw = RandomU16() << 0x10 >> 0x10; - sp1C->oForwardVel = RandomFloat() * 40.0f + 20.0f; - sp1C->oVelY = RandomFloat() * 50.0f + 10.0f; - size = RandomFloat() * 6.0 + 3.0; + sp1C->oMoveAngleYaw = random_u16() << 0x10 >> 0x10; + sp1C->oForwardVel = random_float() * 40.0f + 20.0f; + sp1C->oVelY = random_float() * 50.0f + 10.0f; + size = random_float() * 6.0 + 3.0; obj_scale_xyz(sp1C, size, size, size); - if (RandomFloat() < 0.1) + if (random_float() < 0.1) cur_obj_play_sound_2(SOUND_GENERAL_VOLCANO_EXPLOSION); } diff --git a/src/game/behaviors/mad_piano.inc.c b/src/game/behaviors/mad_piano.inc.c index 18d20be2..903403f7 100644 --- a/src/game/behaviors/mad_piano.inc.c +++ b/src/game/behaviors/mad_piano.inc.c @@ -31,7 +31,7 @@ static void mad_piano_act_wait(void) { static void mad_piano_act_attack(void) { cur_obj_update_floor_and_walls(); cur_obj_init_animation_with_sound(1); - func_802F9378(0, 0, SOUND_OBJ_MAD_PIANO_CHOMPING); + cur_obj_play_sound_at_anim_range(0, 0, SOUND_OBJ_MAD_PIANO_CHOMPING); if (o->oDistanceToMario < 500.0f) { o->oTimer = 0; diff --git a/src/game/behaviors/mips.inc.c b/src/game/behaviors/mips.inc.c index be33eca5..35816129 100644 --- a/src/game/behaviors/mips.inc.c +++ b/src/game/behaviors/mips.inc.c @@ -160,11 +160,8 @@ void bhv_mips_act_wait_for_animation_done(void) { * Handles MIPS falling down after being thrown. */ void bhv_mips_act_fall_down(void) { -#ifdef VERSION_EU - s32 collisionFlags = 0; -#else + s16 collisionFlags = 0; -#endif collisionFlags = object_step(); o->header.gfx.unk38.animFrame = 0; diff --git a/src/game/behaviors/moneybag.inc.c b/src/game/behaviors/moneybag.inc.c index 667182e9..d92600b5 100644 --- a/src/game/behaviors/moneybag.inc.c +++ b/src/game/behaviors/moneybag.inc.c @@ -116,7 +116,7 @@ void moneybag_act_move_around(void) { if (((collisionFlags & OBJ_COL_FLAGS_LANDED) == OBJ_COL_FLAGS_LANDED) && (o->oMoneybagJumpState == MONEYBAG_JUMP_LANDING)) { - if ((s32)(RandomFloat() * 6.0f) == 1) { + if ((s32)(random_float() * 6.0f) == 1) { o->oMoneybagJumpState = MONEYBAG_JUMP_WALK_AROUND; o->oTimer = 0; } else diff --git a/src/game/behaviors/monty_mole.inc.c b/src/game/behaviors/monty_mole.inc.c index 582acdec..377226c6 100644 --- a/src/game/behaviors/monty_mole.inc.c +++ b/src/game/behaviors/monty_mole.inc.c @@ -5,74 +5,6 @@ * search for an available hole to pop out of. */ -/** - * The particles that pop out of the ground when a monty mole rises from a hole. - */ -static struct SpawnParticlesInfo sMontyMoleRiseFromGroundParticles = { - /* behParam: */ 0, - /* count: */ 3, - /* model: */ MODEL_SAND_DUST, - /* offsetY: */ 0, - /* forwardVelBase: */ 4, - /* forwardVelRange: */ 4, - /* velYBase: */ 10, - /* velYRange: */ 15, - /* gravity: */ -4, - /* dragStrength: */ 0, - /* sizeBase: */ 10.0f, - /* sizeRange: */ 7.0f, -}; - -/** - * Hitbox for monty mole. - */ -static struct ObjectHitbox sMontyMoleHitbox = { - /* interactType: */ INTERACT_BOUNCE_TOP, - /* downOffset: */ 0, - /* damageOrCoinValue: */ 2, - /* health: */ -1, - /* numLootCoins: */ 0, - /* radius: */ 70, - /* height: */ 50, - /* hurtboxRadius: */ 30, - /* hurtboxHeight: */ 40, -}; - -/** - * Hitbox for monty mole rock. - */ -static struct ObjectHitbox sMontyMoleRockHitbox = { - /* interactType: */ INTERACT_MR_BLIZZARD, - /* downOffset: */ 15, - /* damageOrCoinValue: */ 1, - /* health: */ 99, - /* numLootCoins: */ 0, - /* radius: */ 30, - /* height: */ 15, - /* hurtboxRadius: */ 30, - /* hurtboxHeight: */ 15, -}; - -/** - * The particles that spawn when a monty mole rock breaks. - */ -static struct SpawnParticlesInfo sMontyMoleRockBreakParticles = { - /* behParam: */ 0, - /* count: */ 2, - /* model: */ MODEL_PEBBLE, - /* offsetY: */ 10, - /* forwardVelBase: */ 4, - /* forwardVelRange: */ 4, - /* velYBase: */ 10, - /* velYRange: */ 15, - /* gravity: */ -4, - /* dragStrength: */ 0, - /* sizeBase: */ 8.0f, - /* sizeRange: */ 4.0f, -}; - -// TODO: bss - /** * The first hole in the list of monty mole holes. The list is a singly linked * list using the parentObj field. @@ -140,7 +72,7 @@ static struct Object *monty_mole_select_available_hole(f32 minDistToMario) { } if (numAvailableHoles != 0) { - s32 selectedHole = (s32)(RandomFloat() * numAvailableHoles); + s32 selectedHole = (s32)(random_float() * numAvailableHoles); hole = sMontyMoleHoleList; numAvailableHoles = 0; @@ -178,25 +110,26 @@ void bhv_monty_mole_hole_update(void) { /** * Spawn dirt particles when rising out of the ground. - * - * TODO: (Scrub C) monty_mole_spawn_dirt_particles, water_bomb_spawn_explode_particles, and - * func_80306ED4 all have similar issues with their functions, none of which match legitimately. */ void monty_mole_spawn_dirt_particles(s8 offsetY, s8 velYBase) { -#if defined(VERSION_JP) || defined(VERSION_US) + static struct SpawnParticlesInfo sMontyMoleRiseFromGroundParticles = { + /* behParam: */ 0, + /* count: */ 3, + /* model: */ MODEL_SAND_DUST, + /* offsetY: */ 0, + /* forwardVelBase: */ 4, + /* forwardVelRange: */ 4, + /* velYBase: */ 10, + /* velYRange: */ 15, + /* gravity: */ -4, + /* dragStrength: */ 0, + /* sizeBase: */ 10.0f, + /* sizeRange: */ 7.0f, + }; + sMontyMoleRiseFromGroundParticles.offsetY = offsetY; sMontyMoleRiseFromGroundParticles.velYBase = velYBase; cur_obj_spawn_particles(&sMontyMoleRiseFromGroundParticles); -#else - s8 tempVelYBase = velYBase; - s8 tempOffsetY = offsetY; - - do { - sMontyMoleRiseFromGroundParticles.offsetY = tempOffsetY; - sMontyMoleRiseFromGroundParticles.velYBase = tempVelYBase; - cur_obj_spawn_particles(&sMontyMoleRiseFromGroundParticles); - } while (0); -#endif } /** @@ -236,7 +169,7 @@ static void monty_mole_act_select_hole(void) { o->oFaceAnglePitch = 0; o->oMoveAngleYaw = o->oMontyMoleCurrentHole->oAngleToMario; - if (o->oDistanceToMario > 500.0f || minDistToMario > 100.0f || RandomSign() < 0) { + if (o->oDistanceToMario > 500.0f || minDistToMario > 100.0f || random_sign() < 0) { o->oAction = MONTY_MOLE_ACT_RISE_FROM_HOLE; o->oVelY = 3.0f; o->oGravity = 0.0f; @@ -276,7 +209,7 @@ static void monty_mole_act_rise_from_hole(void) { static void monty_mole_act_spawn_rock(void) { struct Object *rock; - if (func_802F92B0(2)) { + if (cur_obj_init_anim_and_check_if_end(2)) { if (o->oBehParams2ndByte != MONTY_MOLE_BP_NO_ROCK && abs_angle_diff(o->oAngleToMario, o->oMoveAngleYaw) < 0x4000 && (rock = spawn_object(o, MODEL_PEBBLE, bhvMontyMoleRock)) != NULL) { @@ -293,7 +226,7 @@ static void monty_mole_act_spawn_rock(void) { * into hole action. */ static void monty_mole_act_begin_jump_into_hole(void) { - if (func_802F92B0(3) || obj_is_near_to_and_facing_mario(1000.0f, 0x4000)) { + if (cur_obj_init_anim_and_check_if_end(3) || obj_is_near_to_and_facing_mario(1000.0f, 0x4000)) { o->oAction = MONTY_MOLE_ACT_JUMP_INTO_HOLE; o->oVelY = 40.0f; o->oGravity = -6.0f; @@ -304,7 +237,7 @@ static void monty_mole_act_begin_jump_into_hole(void) { * Throw the held rock, then enter the begin jump into hole action. */ static void monty_mole_act_throw_rock(void) { - if (func_802F92EC(8, 10)) { + if (cur_obj_init_anim_check_frame(8, 10)) { cur_obj_play_sound_2(SOUND_OBJ_MONTY_MOLE_ATTACK); o->prevObj = NULL; } @@ -318,7 +251,7 @@ static void monty_mole_act_throw_rock(void) { * Tilt downward and wait until close to landing, then enter the hide action. */ static void monty_mole_act_jump_into_hole(void) { - func_802F927C(0); + cur_obj_init_anim_extend(0); o->oFaceAnglePitch = -atan2s(o->oVelY, -4.0f); @@ -369,7 +302,7 @@ static void monty_mole_act_jump_out_of_hole(void) { if (o->oVelY > 0.0f) { cur_obj_init_animation_with_sound(9); } else { - func_802F927C(4); + cur_obj_init_anim_extend(4); if (o->oMontyMoleHeightRelativeToFloor < 50.0f) { o->oPosY = o->oFloorHeight + 50.0f; @@ -379,6 +312,21 @@ static void monty_mole_act_jump_out_of_hole(void) { } } +/** + * Hitbox for monty mole. + */ +static struct ObjectHitbox sMontyMoleHitbox = { + /* interactType: */ INTERACT_BOUNCE_TOP, + /* downOffset: */ 0, + /* damageOrCoinValue: */ 2, + /* health: */ -1, + /* numLootCoins: */ 0, + /* radius: */ 70, + /* height: */ 50, + /* hurtboxRadius: */ 30, + /* hurtboxHeight: */ 40, +}; + /** * Update function for bhvMontyMole. */ @@ -482,6 +430,39 @@ static void monty_mole_rock_act_held(void) { } } +/** + * Hitbox for monty mole rock. + */ +static struct ObjectHitbox sMontyMoleRockHitbox = { + /* interactType: */ INTERACT_MR_BLIZZARD, + /* downOffset: */ 15, + /* damageOrCoinValue: */ 1, + /* health: */ 99, + /* numLootCoins: */ 0, + /* radius: */ 30, + /* height: */ 15, + /* hurtboxRadius: */ 30, + /* hurtboxHeight: */ 15, +}; + +/** + * The particles that spawn when a monty mole rock breaks. + */ +static struct SpawnParticlesInfo sMontyMoleRockBreakParticles = { + /* behParam: */ 0, + /* count: */ 2, + /* model: */ MODEL_PEBBLE, + /* offsetY: */ 10, + /* forwardVelBase: */ 4, + /* forwardVelRange: */ 4, + /* velYBase: */ 10, + /* velYRange: */ 15, + /* gravity: */ -4, + /* dragStrength: */ 0, + /* sizeBase: */ 8.0f, + /* sizeRange: */ 4.0f, +}; + /** * Move, then despawn after hitting the ground or water. */ diff --git a/src/game/behaviors/moving_coin.inc.c b/src/game/behaviors/moving_coin.inc.c index 71c1d6fa..fa105ca1 100644 --- a/src/game/behaviors/moving_coin.inc.c +++ b/src/game/behaviors/moving_coin.inc.c @@ -112,16 +112,16 @@ void bhv_moving_blue_coin_loop(void) { switch (o->oAction) { case MOV_BCOIN_ACT_STILL: - if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 1500) != 0) + if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 1500)) o->oAction = 1; break; case MOV_BCOIN_ACT_MOVING: collisionFlags = object_step(); - if ((collisionFlags & 0x1) != 0) /* bit 0 */ + if ((collisionFlags & OBJ_COL_FLAG_GROUNDED)) /* bit 0 */ { o->oForwardVel += 25.0f; - if ((collisionFlags & 0x8) == 0) + if (!(collisionFlags & OBJ_COL_FLAG_NO_Y_VEL)) cur_obj_play_sound_2(SOUND_GENERAL_COIN_DROP); /* bit 3 */ } else o->oForwardVel *= 0.98; diff --git a/src/game/behaviors/mr_blizzard.inc.c b/src/game/behaviors/mr_blizzard.inc.c index d10bbe16..e1d35583 100644 --- a/src/game/behaviors/mr_blizzard.inc.c +++ b/src/game/behaviors/mr_blizzard.inc.c @@ -10,61 +10,28 @@ struct ObjectHitbox sMrBlizzardHitbox = { /* hurtboxHeight: */ 170, }; -struct SpawnParticlesInfo D_80331A00 = { - /* behParam: */ 0, - /* count: */ 6, - /* model: */ MODEL_WHITE_PARTICLE, - /* offsetY: */ 0, - /* forwardVelBase: */ 5, - /* forwardVelRange: */ 5, - /* velYBase: */ 10, - /* velYRange: */ 10, - /* gravity: */ -3, - /* dragStrength: */ 0, - /* sizeBase: */ 3.0f, - /* sizeRange: */ 5.0f, -}; +void mr_blizzard_spawn_white_particles(s8 count, s8 offsetY, s8 forwardVelBase, s8 velYBase, s8 sizeBase) { + static struct SpawnParticlesInfo D_80331A00 = { + /* behParam: */ 0, + /* count: */ 6, + /* model: */ MODEL_WHITE_PARTICLE, + /* offsetY: */ 0, + /* forwardVelBase: */ 5, + /* forwardVelRange: */ 5, + /* velYBase: */ 10, + /* velYRange: */ 10, + /* gravity: */ -3, + /* dragStrength: */ 0, + /* sizeBase: */ 3.0f, + /* sizeRange: */ 5.0f, + }; -struct ObjectHitbox sMrBlizzardSnowballHitbox = { - /* interactType: */ INTERACT_MR_BLIZZARD, - /* downOffset: */ 12, - /* damageOrCoinValue: */ 1, - /* health: */ 99, - /* numLootCoins: */ 0, - /* radius: */ 30, - /* height: */ 30, - /* hurtboxRadius: */ 25, - /* hurtboxHeight: */ 25, -}; - -/** - * TODO: (Scrub C) monty_mole_spawn_dirt_particles, water_bomb_spawn_explode_particles, and - * func_80306ED4 all have similar issues with their functions, none of which match legitimately. - */ -void func_80306ED4(s8 count, s8 offsetY, s8 forwardVelBase, s8 velYBase, s8 sizeBase) { -#if defined(VERSION_JP) || defined(VERSION_US) D_80331A00.count = count; D_80331A00.offsetY = offsetY; D_80331A00.forwardVelBase = forwardVelBase; D_80331A00.velYBase = velYBase; D_80331A00.sizeBase = sizeBase; cur_obj_spawn_particles(&D_80331A00); -#else - s8 tempSizeBase = sizeBase; - s8 tempVelYBase = velYBase; - s8 tempForwardVelBase = forwardVelBase; - s8 tempOffsetY = offsetY; - s8 tempCount = count; - - do { - D_80331A00.count = tempCount; - D_80331A00.offsetY = tempOffsetY; - D_80331A00.forwardVelBase = tempForwardVelBase; - D_80331A00.velYBase = tempVelYBase; - D_80331A00.sizeBase = tempSizeBase; - cur_obj_spawn_particles(&D_80331A00); - } while (0); -#endif } void bhv_mr_blizzard_init(void) { @@ -84,8 +51,8 @@ void bhv_mr_blizzard_init(void) { } } -static void func_8030702C(void) { - if (o->oMrBlizzardUnkF8 == NULL && func_802F92EC(0, 5)) { +static void mr_blizzard_act_0(void) { + if (o->oMrBlizzardUnkF8 == NULL && cur_obj_init_anim_check_frame(0, 5)) { o->oMrBlizzardUnkF8 = spawn_object_relative(0, -70, (s32)(o->oMrBlizzardUnk10C + 153.0f), 0, o, MODEL_WHITE_PARTICLE, bhvMrBlizzardSnowball); } else if (cur_obj_check_anim_frame(10)) { @@ -99,14 +66,14 @@ static void func_8030702C(void) { } } -static void func_80307144(void) { +static void mr_blizzard_act_1(void) { if (o->oDistanceToMario < 1000.0f) { cur_obj_play_sound_2(SOUND_OBJ_SNOW_SAND2); o->oAction = 2; o->oMoveAngleYaw = o->oAngleToMario; o->oMrBlizzardUnkFC = 42.0f; - func_80306ED4(8, -10, 15, 20, 10); + mr_blizzard_spawn_white_particles(8, -10, 15, 20, 10); cur_obj_unhide(); cur_obj_become_tangible(); } else { @@ -114,14 +81,14 @@ static void func_80307144(void) { } } -static void func_80307208(void) { +static void mr_blizzard_act_2(void) { if (o->oMrBlizzardUnk100 != 0) { o->oMrBlizzardUnk100 -= 1; } else if ((o->oMrBlizzardUnk10C += o->oMrBlizzardUnkFC) > 24.0f) { o->oPosY += o->oMrBlizzardUnk10C - 24.0f; o->oMrBlizzardUnk10C = 24.0f; - func_80306ED4(8, -20, 20, 15, 10); + mr_blizzard_spawn_white_particles(8, -20, 20, 15, 10); o->oAction = 3; o->oVelY = o->oMrBlizzardUnkFC; @@ -131,7 +98,7 @@ static void func_80307208(void) { } } -static void func_80307370(void) { +static void mr_blizzard_act_3(void) { s16 val06; f32 val00; @@ -177,7 +144,7 @@ static void func_80307370(void) { } } -static void func_80307650(void) { +static void mr_blizzard_act_6(void) { struct Object *val04; if (clamp_f32(&o->oMrBlizzardUnk104, -0x4000, 0x4000)) { @@ -233,8 +200,8 @@ static void func_80307650(void) { } } -static void func_80307990(void) { - if (func_802F92EC(1, 7)) { +static void mr_blizzard_act_4(void) { + if (cur_obj_init_anim_check_frame(1, 7)) { cur_obj_play_sound_2(SOUND_OBJ2_SCUTTLEBUG_ALERT); o->prevObj = o->oMrBlizzardUnkF8 = NULL; } else if (cur_obj_check_if_near_animation_end()) { @@ -242,7 +209,7 @@ static void func_80307990(void) { } } -static void func_80307A0C(void) { +static void mr_blizzard_act_5(void) { o->oMrBlizzardUnk104 += o->oMrBlizzardUnk108; if (o->oMrBlizzardUnk104 < 0.0f) { @@ -257,7 +224,7 @@ static void func_80307A0C(void) { } } -static void func_80307AD4(void) { +static void mr_blizzard_act_7(void) { if (o->oMrBlizzardUnk100 != 0) { cur_obj_rotate_yaw_toward(o->oMrBlizzardUnk1AC, 3400); @@ -293,28 +260,28 @@ void bhv_mr_blizzard_update(void) { switch (o->oAction) { case 0: - func_8030702C(); + mr_blizzard_act_0(); break; case 1: - func_80307144(); + mr_blizzard_act_1(); break; case 2: - func_80307208(); + mr_blizzard_act_2(); break; case 3: - func_80307370(); + mr_blizzard_act_3(); break; case 4: - func_80307990(); + mr_blizzard_act_4(); break; case 5: - func_80307A0C(); + mr_blizzard_act_5(); break; case 6: - func_80307650(); + mr_blizzard_act_6(); break; case 7: - func_80307AD4(); + mr_blizzard_act_7(); break; } @@ -327,7 +294,7 @@ void bhv_mr_blizzard_update(void) { obj_check_attacks(&sMrBlizzardHitbox, o->oAction); } -static void func_80307E24(void) { +static void mr_blizzard_snowball_act_0(void) { cur_obj_move_using_fvel_and_gravity(); if (o->parentObj->prevObj == o) { o->oAction = 1; @@ -336,7 +303,7 @@ static void func_80307E24(void) { } } -static void func_80307EB0(void) { +static void mr_blizzard_snowball_act_1(void) { f32 val04; if (o->parentObj->prevObj == NULL) { @@ -356,12 +323,24 @@ static void func_80307EB0(void) { } } -static void func_80307FD4(void) { +struct ObjectHitbox sMrBlizzardSnowballHitbox = { + /* interactType: */ INTERACT_MR_BLIZZARD, + /* downOffset: */ 12, + /* damageOrCoinValue: */ 1, + /* health: */ 99, + /* numLootCoins: */ 0, + /* radius: */ 30, + /* height: */ 30, + /* hurtboxRadius: */ 25, + /* hurtboxHeight: */ 25, +}; + +static void mr_blizzard_snowball_act_2(void) { cur_obj_update_floor_and_walls(); obj_check_attacks(&sMrBlizzardSnowballHitbox, -1); if (o->oAction == -1 || o->oMoveFlags & 0x0000000B) { - func_80306ED4(6, 0, 5, 10, 3); + mr_blizzard_spawn_white_particles(6, 0, 5, 10, 3); create_sound_spawner(SOUND_GENERAL_MOVING_IN_SAND); obj_mark_for_deletion(o); } @@ -372,13 +351,13 @@ static void func_80307FD4(void) { void bhv_mr_blizzard_snowball(void) { switch (o->oAction) { case 0: - func_80307E24(); + mr_blizzard_snowball_act_0(); break; case 1: - func_80307EB0(); + mr_blizzard_snowball_act_1(); break; case 2: - func_80307FD4(); + mr_blizzard_snowball_act_2(); break; } } diff --git a/src/game/behaviors/mr_i.inc.c b/src/game/behaviors/mr_i.inc.c index 05299c84..4e03f8f1 100644 --- a/src/game/behaviors/mr_i.inc.c +++ b/src/game/behaviors/mr_i.inc.c @@ -4,9 +4,9 @@ // plant code later on reuses this function. void bhv_piranha_particle_loop(void) { if (o->oTimer == 0) { - o->oVelY = 20.0f + 20.0f * RandomFloat(); - o->oForwardVel = 20.0f + 20.0f * RandomFloat(); - o->oMoveAngleYaw = RandomU16(); + o->oVelY = 20.0f + 20.0f * random_float(); + o->oForwardVel = 20.0f + 20.0f * random_float(); + o->oMoveAngleYaw = random_u16(); } cur_obj_move_using_fvel_and_gravity(); } @@ -169,12 +169,12 @@ void mr_i_act_2() { if (o->oMrIUnk104 == o->oMrIUnk108 + 20) { spawn_mr_i_particle(); o->oMrIUnk104 = 0; - o->oMrIUnk108 = (s32)(RandomFloat() * 50.0f + 50.0f); + o->oMrIUnk108 = (s32)(random_float() * 50.0f + 50.0f); } o->oMrIUnk104++; } else { o->oMrIUnk104 = 0; - o->oMrIUnk108 = (s32)(RandomFloat() * 50.0f + 50.0f); + o->oMrIUnk108 = (s32)(random_float() * 50.0f + 50.0f); } if (o->oDistanceToMario > 800.0f) o->oAction = 1; @@ -191,7 +191,7 @@ void mr_i_act_1(void) { cur_obj_become_tangible(); o->oMoveAnglePitch = 0; o->oMrIUnk104 = 30; - o->oMrIUnk108 = RandomFloat() * 20.0f; + o->oMrIUnk108 = random_float() * 20.0f; if (o->oMrIUnk108 & 1) o->oAngleVelYaw = -256; else @@ -210,7 +210,7 @@ void mr_i_act_1(void) { o->oMrIUnk110 = 1; if (o->oMrIUnk108 + 80 < o->oMrIUnk104) { o->oMrIUnk104 = 0; - o->oMrIUnk108 = RandomFloat() * 80.0f; + o->oMrIUnk108 = random_float() * 80.0f; spawn_mr_i_particle(); } } diff --git a/src/game/behaviors/mushroom_1up.inc.c b/src/game/behaviors/mushroom_1up.inc.c index 66ae68d4..ad4d995f 100644 --- a/src/game/behaviors/mushroom_1up.inc.c +++ b/src/game/behaviors/mushroom_1up.inc.c @@ -210,11 +210,11 @@ void bhv_1up_hidden_loop(void) { s16 sp26; switch (o->oAction) { case 0: - o->header.gfx.node.flags |= 0x10; + o->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; if (o->o1UpHiddenUnkF4 == o->oBehParams2ndByte) { o->oVelY = 40.0f; o->oAction = 3; - o->header.gfx.node.flags &= ~0x10; + o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; play_sound(SOUND_GENERAL2_1UP_APPEAR, gDefaultSoundArgs); } break; @@ -262,11 +262,11 @@ void bhv_1up_hidden_in_pole_loop(void) { UNUSED s16 sp26; switch (o->oAction) { case 0: - o->header.gfx.node.flags |= 0x10; + o->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; if (o->o1UpHiddenUnkF4 == o->oBehParams2ndByte) { o->oVelY = 40.0f; o->oAction = 3; - o->header.gfx.node.flags &= ~0x10; + o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; play_sound(SOUND_GENERAL2_1UP_APPEAR, gDefaultSoundArgs); } break; diff --git a/src/game/behaviors/piranha_bubbles.inc.c b/src/game/behaviors/piranha_bubbles.inc.c index 94313d1e..581a4d0e 100644 --- a/src/game/behaviors/piranha_bubbles.inc.c +++ b/src/game/behaviors/piranha_bubbles.inc.c @@ -12,9 +12,9 @@ */ void bhv_piranha_plant_waking_bubbles_loop(void) { if (o->oTimer == 0) { - o->oVelY = RandomFloat() * 10.0f + 5.0f; - o->oForwardVel = RandomFloat() * 10.0f + 5.0f; - o->oMoveAngleYaw = RandomU16(); + o->oVelY = random_float() * 10.0f + 5.0f; + o->oForwardVel = random_float() * 10.0f + 5.0f; + o->oMoveAngleYaw = random_u16(); } cur_obj_move_using_fvel_and_gravity(); } diff --git a/src/game/behaviors/purple_switch.inc.c b/src/game/behaviors/purple_switch.inc.c index f1924694..3035bd6b 100644 --- a/src/game/behaviors/purple_switch.inc.c +++ b/src/game/behaviors/purple_switch.inc.c @@ -32,6 +32,9 @@ void bhv_purple_switch_loop(void) { cur_obj_play_sound_2(SOUND_GENERAL2_PURPLE_SWITCH); o->oAction = PURPLE_SWITCH_TICKING; cur_obj_shake_screen(SHAKE_POS_SMALL); +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif } break; /** diff --git a/src/game/behaviors/pyramid_top.inc.c b/src/game/behaviors/pyramid_top.inc.c index 27314573..536ce96f 100644 --- a/src/game/behaviors/pyramid_top.inc.c +++ b/src/game/behaviors/pyramid_top.inc.c @@ -53,10 +53,10 @@ void bhv_pyramid_top_spinning(void) { // with a random velocity and angle. if (o->oTimer < 90) { pyramidFragment = spawn_object(o, MODEL_DIRT_ANIMATION, bhvPyramidTopFragment); - pyramidFragment->oForwardVel = RandomFloat() * 10.0f + 20.0f; - pyramidFragment->oMoveAngleYaw = RandomU16(); + pyramidFragment->oForwardVel = random_float() * 10.0f + 20.0f; + pyramidFragment->oMoveAngleYaw = random_u16(); pyramidFragment->oPyramidTopFragmentsScale = 0.8f; - pyramidFragment->oGravity = RandomFloat() + 2.0f; + pyramidFragment->oGravity = random_float() + 2.0f; } // After enough time, transition to the exploding state. @@ -79,11 +79,11 @@ void bhv_pyramid_top_explode(void) { pyramidFragment = spawn_object( o, MODEL_DIRT_ANIMATION, bhvPyramidTopFragment ); - pyramidFragment->oForwardVel = RandomFloat() * 50 + 80; - pyramidFragment->oVelY = RandomFloat() * 80 + 20; - pyramidFragment->oMoveAngleYaw = RandomU16(); + pyramidFragment->oForwardVel = random_float() * 50 + 80; + pyramidFragment->oVelY = random_float() * 80 + 20; + pyramidFragment->oMoveAngleYaw = random_u16(); pyramidFragment->oPyramidTopFragmentsScale = 3; - pyramidFragment->oGravity = RandomFloat() * 2 + 5; + pyramidFragment->oGravity = random_float() * 2 + 5; } // Deactivate the pyramid top. diff --git a/src/game/behaviors/racing_penguin.inc.c b/src/game/behaviors/racing_penguin.inc.c index 2939642f..fea739b8 100644 --- a/src/game/behaviors/racing_penguin.inc.c +++ b/src/game/behaviors/racing_penguin.inc.c @@ -109,7 +109,7 @@ static void racing_penguin_act_finish_race(void) { set_camera_shake_from_point(SHAKE_POS_SMALL, o->oPosX, o->oPosY, o->oPosZ); o->oForwardVel = 0.0f; } - } else if (func_802F92B0(2) != 0) { + } else if (cur_obj_init_anim_and_check_if_end(2) != 0) { o->oAction = RACING_PENGUIN_ACT_SHOW_FINAL_TEXT; } } diff --git a/src/game/behaviors/seaweed.inc.c b/src/game/behaviors/seaweed.inc.c index 8864b94f..d1dc2b46 100644 --- a/src/game/behaviors/seaweed.inc.c +++ b/src/game/behaviors/seaweed.inc.c @@ -1,7 +1,7 @@ // seaweed.c.inc void bhv_seaweed_init(void) { - o->header.gfx.unk38.animFrame = RandomFloat() * 80.0f; + o->header.gfx.unk38.animFrame = random_float() * 80.0f; } void bhv_seaweed_bundle_init(void) { @@ -23,7 +23,7 @@ void bhv_seaweed_bundle_init(void) { seaweed->header.gfx.scale[0] = 0.8; seaweed->header.gfx.scale[1] = 0.9; seaweed->header.gfx.scale[2] = 0.8; - seaweed->header.gfx.unk38.animFrame = RandomFloat() * 80.0f; + seaweed->header.gfx.unk38.animFrame = random_float() * 80.0f; seaweed = spawn_object(o, MODEL_SEAWEED, bhvSeaweed); seaweed->oFaceAngleYaw = 40500; @@ -32,7 +32,7 @@ void bhv_seaweed_bundle_init(void) { seaweed->header.gfx.scale[0] = 0.8; seaweed->header.gfx.scale[1] = 0.8; seaweed->header.gfx.scale[2] = 0.8; - seaweed->header.gfx.unk38.animFrame = RandomFloat() * 80.0f; + seaweed->header.gfx.unk38.animFrame = random_float() * 80.0f; seaweed = spawn_object(o, MODEL_SEAWEED, bhvSeaweed); seaweed->oFaceAngleYaw = 57236; @@ -41,5 +41,5 @@ void bhv_seaweed_bundle_init(void) { seaweed->header.gfx.scale[0] = 1.2; seaweed->header.gfx.scale[1] = 1.2; seaweed->header.gfx.scale[2] = 1.2; - seaweed->header.gfx.unk38.animFrame = RandomFloat() * 80.0f; + seaweed->header.gfx.unk38.animFrame = random_float() * 80.0f; } diff --git a/src/game/behaviors/skeeter.inc.c b/src/game/behaviors/skeeter.inc.c index b0a02296..aa118923 100644 --- a/src/game/behaviors/skeeter.inc.c +++ b/src/game/behaviors/skeeter.inc.c @@ -79,7 +79,7 @@ static void skeeter_act_lunge(void) { if (o->oDistanceToMario >= 25000.0f) { o->oSkeeterTargetAngle = o->oAngleToMario; } else { - o->oSkeeterTargetAngle = obj_random_fixed_turn(RandomU16() % 0x2000); + o->oSkeeterTargetAngle = obj_random_fixed_turn(random_u16() % 0x2000); } o->oAction = SKEETER_ACT_IDLE; @@ -99,7 +99,7 @@ static void skeeter_act_walk(void) { sp24 = 0.12f * o->oForwardVel; cur_obj_init_animation_with_accel_and_sound(2, sp24); - func_802F9378(3, 13, SOUND_OBJ_SKEETER_WALK); + cur_obj_play_sound_at_anim_range(3, 13, SOUND_OBJ_SKEETER_WALK); if (o->oSkeeterUnkF8 != 0) { o->oSkeeterUnkF8 = obj_resolve_collisions_and_turn(o->oSkeeterTargetAngle, 0x400); @@ -118,7 +118,7 @@ static void skeeter_act_walk(void) { if (o->oSkeeterWaitTime != 0) { o->oSkeeterWaitTime -= 1; } else if (cur_obj_check_if_near_animation_end() != 0) { - if (RandomU16() & 0x0003) { + if (random_u16() & 0x0003) { o->oSkeeterTargetAngle = obj_random_fixed_turn(0x2000); o->oSkeeterWaitTime = random_linear_offset(100, 100); } else { diff --git a/src/game/behaviors/sliding_platform.inc.c b/src/game/behaviors/sliding_platform.inc.c index 6af9bf49..0e2087e1 100644 --- a/src/game/behaviors/sliding_platform.inc.c +++ b/src/game/behaviors/sliding_platform.inc.c @@ -19,7 +19,7 @@ void bhv_wf_sliding_platform_init(void) { break; } - o->oTimer = RandomFloat() * 100.0f; + o->oTimer = random_float() * 100.0f; } void bhv_wf_sliding_platform_loop(void) { diff --git a/src/game/behaviors/spawn_star.inc.c b/src/game/behaviors/spawn_star.inc.c index 80095af9..2571f3d6 100644 --- a/src/game/behaviors/spawn_star.inc.c +++ b/src/game/behaviors/spawn_star.inc.c @@ -144,7 +144,7 @@ void bhv_hidden_red_coin_star_init(void) { s16 sp36; struct Object *sp30; - if (gCurrCourseNum != 3) + if (gCurrCourseNum != COURSE_JRB) spawn_object(o, MODEL_TRANSPARENT_STAR, bhvRedCoinStarMarker); sp36 = count_objects_with_behavior(bhvRedCoin); diff --git a/src/game/behaviors/spiny.inc.c b/src/game/behaviors/spiny.inc.c index b11ee2e5..3d894bfc 100644 --- a/src/game/behaviors/spiny.inc.c +++ b/src/game/behaviors/spiny.inc.c @@ -87,7 +87,7 @@ static void spiny_act_walk(void) { if (o->oSpinyTimeUntilTurn != 0) { o->oSpinyTimeUntilTurn -= 1; } else { - o->oSpinyTargetYaw = o->oMoveAngleYaw + (s16) RandomSign() * 0x2000; + o->oSpinyTargetYaw = o->oMoveAngleYaw + (s16) random_sign() * 0x2000; o->oSpinyTimeUntilTurn = random_linear_offset(100, 100); } } diff --git a/src/game/behaviors/star_door.inc.c b/src/game/behaviors/star_door.inc.c index 95e5c506..2d7dad1f 100644 --- a/src/game/behaviors/star_door.inc.c +++ b/src/game/behaviors/star_door.inc.c @@ -20,8 +20,12 @@ void bhv_star_door_loop(void) { o->oAction = 1; break; case 1: - if (o->oTimer == 0 && (s16)(o->oMoveAngleYaw) >= 0) + if (o->oTimer == 0 && (s16)(o->oMoveAngleYaw) >= 0) { cur_obj_play_sound_2(SOUND_GENERAL_STAR_DOOR_OPEN); +#ifdef VERSION_SH + queue_rumble_data(35, 30); +#endif + } cur_obj_become_intangible(); o->oUnkBC = -8.0f; star_door_update_pos(); @@ -33,8 +37,12 @@ void bhv_star_door_loop(void) { o->oAction++; break; case 3: - if (o->oTimer == 0 && (s16)(o->oMoveAngleYaw) >= 0) + if (o->oTimer == 0 && (s16)(o->oMoveAngleYaw) >= 0) { cur_obj_play_sound_2(SOUND_GENERAL_STAR_DOOR_CLOSE); +#ifdef VERSION_SH + queue_rumble_data(35, 30); +#endif + } o->oUnkBC = 8.0f; star_door_update_pos(); if (o->oTimer >= 16) diff --git a/src/game/behaviors/thwomp.inc.c b/src/game/behaviors/thwomp.inc.c index 69d0541f..5f46b9ef 100644 --- a/src/game/behaviors/thwomp.inc.c +++ b/src/game/behaviors/thwomp.inc.c @@ -2,7 +2,7 @@ void grindel_thwomp_act_4(void) { if (o->oTimer == 0) - o->oThwompUnkF4 = RandomFloat() * 10.0f + 20.0f; + o->oThwompUnkF4 = random_float() * 10.0f + 20.0f; if (o->oTimer > o->oThwompUnkF4) o->oAction = 0; } @@ -29,7 +29,7 @@ void grindel_thwomp_act_3(void) { void grindel_thwomp_act_1(void) { if (o->oTimer == 0) - o->oThwompUnkF4 = RandomFloat() * 30.0f + 10.0f; + o->oThwompUnkF4 = random_float() * 30.0f + 10.0f; if (o->oTimer > o->oThwompUnkF4) o->oAction = 2; } diff --git a/src/game/behaviors/tower_platform.inc.c b/src/game/behaviors/tower_platform.inc.c index 45a4b8a5..8103fa5d 100644 --- a/src/game/behaviors/tower_platform.inc.c +++ b/src/game/behaviors/tower_platform.inc.c @@ -55,9 +55,9 @@ void bhv_wf_sliding_tower_platform_loop(void) { obj_mark_for_deletion(o); } -void spawn_and_init_wf_platforms(s16 a, const BehaviorScript *beh) { +void spawn_and_init_wf_platforms(s16 a, const BehaviorScript *bhv) { s16 yaw; - struct Object *platform = spawn_object(o, a, beh); + struct Object *platform = spawn_object(o, a, bhv); yaw = o->oPlatformSpawnerUnkF4 * o->oPlatformSpawnerUnkFC + o->oPlatformSpawnerUnkF8; platform->oMoveAngleYaw = yaw; platform->oPosX += o->oPlatformSpawnerUnk100 * sins(yaw); diff --git a/src/game/behaviors/tree_particles.inc.c b/src/game/behaviors/tree_particles.inc.c index 64771e0a..6c5587ff 100644 --- a/src/game/behaviors/tree_particles.inc.c +++ b/src/game/behaviors/tree_particles.inc.c @@ -3,10 +3,10 @@ void bhv_tree_snow_or_leaf_loop(void) { cur_obj_update_floor_height(); if (o->oTimer == 0) { - o->oAngleVelPitch = (RandomFloat() - 0.5) * 0x1000; - o->oAngleVelRoll = (RandomFloat() - 0.5) * 0x1000; + o->oAngleVelPitch = (random_float() - 0.5) * 0x1000; + o->oAngleVelRoll = (random_float() - 0.5) * 0x1000; o->oTreeSnowOrLeafUnkF8 = 4; - o->oTreeSnowOrLeafUnkFC = RandomFloat() * 0x400 + 0x600; + o->oTreeSnowOrLeafUnkFC = random_float() * 0x400 + 0x600; } if (o->oPosY < o->oFloorHeight) obj_mark_for_deletion(o); @@ -43,25 +43,25 @@ void bhv_snow_leaf_particle_spawn_init(void) { else isSnow = 0; if (isSnow) { - if (RandomFloat() < 0.5) { + if (random_float() < 0.5) { obj = spawn_object(o, MODEL_WHITE_PARTICLE_DL, bhvTreeSnow); - scale = RandomFloat(); + scale = random_float(); obj_scale_xyz(obj, scale, scale, scale); - obj->oMoveAngleYaw = RandomU16(); - obj->oForwardVel = RandomFloat() * 5.0f; - obj->oVelY = RandomFloat() * 15.0f; + obj->oMoveAngleYaw = random_u16(); + obj->oForwardVel = random_float() * 5.0f; + obj->oVelY = random_float() * 15.0f; } } else { - if (RandomFloat() < 0.3) { + if (random_float() < 0.3) { obj = spawn_object(o, MODEL_LEAVES, bhvTreeLeaf); - scale = RandomFloat() * 3.0f; + scale = random_float() * 3.0f; obj_scale_xyz(obj, scale, scale, scale); - obj->oMoveAngleYaw = RandomU16(); - obj->oForwardVel = RandomFloat() * 5.0f + 5.0f; - obj->oVelY = RandomFloat() * 15.0f; - obj->oFaceAnglePitch = RandomU16(); - obj->oFaceAngleRoll = RandomU16(); - obj->oFaceAngleYaw = RandomU16(); + obj->oMoveAngleYaw = random_u16(); + obj->oForwardVel = random_float() * 5.0f + 5.0f; + obj->oVelY = random_float() * 15.0f; + obj->oFaceAnglePitch = random_u16(); + obj->oFaceAngleRoll = random_u16(); + obj->oFaceAngleYaw = random_u16(); } } } diff --git a/src/game/behaviors/triplet_butterfly.inc.c b/src/game/behaviors/triplet_butterfly.inc.c index 15e3f2f4..1c2b9265 100644 --- a/src/game/behaviors/triplet_butterfly.inc.c +++ b/src/game/behaviors/triplet_butterfly.inc.c @@ -32,7 +32,7 @@ static void triplet_butterfly_act_init(void) { spawn_object_relative(i, 0, 0, 0, o, MODEL_BUTTERFLY, bhvTripletButterfly); } - o->oTripletButterflySelectedButterfly = RandomU16() % 3; + o->oTripletButterflySelectedButterfly = random_u16() % 3; } //! TODO: Describe this glitch diff --git a/src/game/behaviors/ttc_2d_rotator.inc.c b/src/game/behaviors/ttc_2d_rotator.inc.c index 3ae2cde7..46c7603e 100644 --- a/src/game/behaviors/ttc_2d_rotator.inc.c +++ b/src/game/behaviors/ttc_2d_rotator.inc.c @@ -67,7 +67,7 @@ void bhv_ttc_2d_rotator_update(void) { // If ready for a change in direction, then pick a new // direction if (o->oTTC2DRotatorRandomDirTimer == 0) { - if (RandomU16() & 0x3) { + if (random_u16() & 0x3) { o->oTTC2DRotatorIncrement = o->oTTC2DRotatorSpeed; o->oTTC2DRotatorRandomDirTimer = random_mod_offset(90, 60, 4); } else { diff --git a/src/game/behaviors/ttc_cog.inc.c b/src/game/behaviors/ttc_cog.inc.c index ae139887..fe7a502a 100644 --- a/src/game/behaviors/ttc_cog.inc.c +++ b/src/game/behaviors/ttc_cog.inc.c @@ -43,7 +43,7 @@ void bhv_ttc_cog_update(void) { case TTC_SPEED_RANDOM: if (approach_f32_ptr(&o->oTTCCogSpeed, o->oTTCCogTargetVel, 50.0f)) { - o->oTTCCogTargetVel = 200.0f * (RandomU16() % 7) * RandomSign(); + o->oTTCCogTargetVel = 200.0f * (random_u16() % 7) * random_sign(); } case TTC_SPEED_STOPPED: diff --git a/src/game/behaviors/ttc_elevator.inc.c b/src/game/behaviors/ttc_elevator.inc.c index 10d578df..a4debfc2 100644 --- a/src/game/behaviors/ttc_elevator.inc.c +++ b/src/game/behaviors/ttc_elevator.inc.c @@ -34,7 +34,7 @@ void bhv_ttc_elevator_update(void) { if (gTTCSpeedSetting == TTC_SPEED_RANDOM) { // Occasionally stop for 5 frames then change direction if (o->oTimer > o->oTTCElevatorMoveTime) { - o->oTTCElevatorDir = RandomSign(); + o->oTTCElevatorDir = random_sign(); o->oTTCElevatorMoveTime = random_mod_offset(30, 30, 6); o->oTimer = 0; } else if (o->oTimer < 5) { diff --git a/src/game/behaviors/ttc_moving_bar.inc.c b/src/game/behaviors/ttc_moving_bar.inc.c index d0d9a732..e54e3c42 100644 --- a/src/game/behaviors/ttc_moving_bar.inc.c +++ b/src/game/behaviors/ttc_moving_bar.inc.c @@ -47,10 +47,10 @@ static void ttc_moving_bar_act_wait(void) { } else { if (gTTCSpeedSetting == TTC_SPEED_RANDOM) { // Set the delay for the next cycle - o->oTTCMovingBarDelay = sTTCMovingBarRandomDelays[RandomU16() & 0x3]; + o->oTTCMovingBarDelay = sTTCMovingBarRandomDelays[random_u16() & 0x3]; // With 50% probability, pause after pulling back - if (RandomU16() % 2 == 0) { + if (random_u16() % 2 == 0) { o->oTTCMovingBarStoppedTimer = random_linear_offset(20, 100); } } @@ -121,7 +121,7 @@ static void ttc_moving_bar_act_extend(void) { // When we pass neutral on random setting, then stop immediately with // 25% probability (fake out) if (gTTCSpeedSetting == TTC_SPEED_RANDOM - && o->oTTCMovingBarOffset * o->oTTCMovingBarStartOffset < 0.0f && RandomU16() % 4 == 0) { + && o->oTTCMovingBarOffset * o->oTTCMovingBarStartOffset < 0.0f && random_u16() % 4 == 0) { ttc_moving_bar_reset(); } } diff --git a/src/game/behaviors/ttc_pendulum.inc.c b/src/game/behaviors/ttc_pendulum.inc.c index 9b870cae..b63282e2 100644 --- a/src/game/behaviors/ttc_pendulum.inc.c +++ b/src/game/behaviors/ttc_pendulum.inc.c @@ -60,14 +60,14 @@ void bhv_ttc_pendulum_update(void) { // Select a new acceleration //! By manipulating this, we can cause the pendulum to reach // extreme angles and speeds - if (RandomU16() % 3 != 0) { + if (random_u16() % 3 != 0) { o->oTTCPendulumAngleAccel = 13.0f; } else { o->oTTCPendulumAngleAccel = 42.0f; } // Pick a random delay - if (RandomU16() % 2 == 0) { + if (random_u16() % 2 == 0) { o->oTTCPendulumDelay = random_linear_offset(5, 30); } } diff --git a/src/game/behaviors/ttc_spinner.inc.c b/src/game/behaviors/ttc_spinner.inc.c index fd9e88c6..7ebc3f8e 100644 --- a/src/game/behaviors/ttc_spinner.inc.c +++ b/src/game/behaviors/ttc_spinner.inc.c @@ -21,7 +21,7 @@ void bhv_ttc_spinner_update(void) { if (gTTCSpeedSetting == TTC_SPEED_RANDOM) { if (o->oTimer > o->oTTCChangeDirTimer) { - o->oTTCSpinnerDir = RandomSign(); + o->oTTCSpinnerDir = random_sign(); o->oTTCChangeDirTimer = random_mod_offset(30, 30, 4); o->oTimer = 0; } else if (o->oTimer > 5) { diff --git a/src/game/behaviors/ttc_treadmill.inc.c b/src/game/behaviors/ttc_treadmill.inc.c index 7ae82f43..b4d49f61 100644 --- a/src/game/behaviors/ttc_treadmill.inc.c +++ b/src/game/behaviors/ttc_treadmill.inc.c @@ -51,7 +51,7 @@ void bhv_ttc_treadmill_update(void) { // Then stop and select new target speed and time until switch if (approach_f32_ptr(&o->oTTCTreadmillSpeed, 0.0f, 10.0f)) { o->oTTCTreadmillTimeUntilSwitch = random_mod_offset(10, 20, 7); - o->oTTCTreadmillTargetSpeed = RandomSign() * 50.0f; + o->oTTCTreadmillTargetSpeed = random_sign() * 50.0f; o->oTimer = 0; } } else if (o->oTimer > 5) { diff --git a/src/game/behaviors/tumbling_bridge.inc.c b/src/game/behaviors/tumbling_bridge.inc.c index 39729553..ffe02a12 100644 --- a/src/game/behaviors/tumbling_bridge.inc.c +++ b/src/game/behaviors/tumbling_bridge.inc.c @@ -17,7 +17,7 @@ void bhv_tumbling_bridge_platform_loop(void) { case 0: if (gMarioObject->platform == o) { o->oAction++; - o->oTumblingBridgeUnkF4 = RandomSign() * 0x80; + o->oTumblingBridgeUnkF4 = random_sign() * 0x80; } break; case 1: diff --git a/src/game/behaviors/tuxie.inc.c b/src/game/behaviors/tuxie.inc.c index 16ba877d..1a1c204b 100644 --- a/src/game/behaviors/tuxie.inc.c +++ b/src/game/behaviors/tuxie.inc.c @@ -201,9 +201,9 @@ void small_penguin_act_0(void) { sp1C = 0; cur_obj_init_animation_with_sound(3); if (o->oTimer == 0) { - o->oSmallPenguinUnk110 = (s32)(RandomFloat() * 0x400); - o->oSmallPenguinUnk108 = RandomFloat() * 100.0f; - o->oSmallPenguinUnk104 = RandomFloat(); + o->oSmallPenguinUnk110 = (s32)(random_float() * 0x400); + o->oSmallPenguinUnk108 = random_float() * 100.0f; + o->oSmallPenguinUnk104 = random_float(); o->oForwardVel = 0.0f; if (cur_obj_dist_to_nearest_object_with_behavior(bhvTuxiesMother) < 1000.0f) sp1C = 1; diff --git a/src/game/behaviors/tweester.inc.c b/src/game/behaviors/tweester.inc.c index 62e95060..69738145 100644 --- a/src/game/behaviors/tweester.inc.c +++ b/src/game/behaviors/tweester.inc.c @@ -143,12 +143,12 @@ void bhv_tweester_sand_particle_loop(void) { o->oForwardVel += 15.0f; o->oPosY += 22.0f; - cur_obj_scale(RandomFloat() + 1.0); + cur_obj_scale(random_float() + 1.0); if (o->oTimer == 0) { obj_translate_xz_random(o, 100.0f); - o->oFaceAnglePitch = RandomU16(); - o->oFaceAngleYaw = RandomU16(); + o->oFaceAnglePitch = random_u16(); + o->oFaceAngleYaw = random_u16(); } if (o->oTimer > 15) diff --git a/src/game/behaviors/ukiki.inc.c b/src/game/behaviors/ukiki.inc.c index 189fd263..401abaa2 100644 --- a/src/game/behaviors/ukiki.inc.c +++ b/src/game/behaviors/ukiki.inc.c @@ -65,12 +65,12 @@ void idle_ukiki_taunt(void) { if (o->oSubAction == UKIKI_SUB_ACT_TAUNT_NONE) { // Subaction is between 1 and 4. - o->oSubAction = (s32)(RandomFloat() * 4.0f + 1.0f); + o->oSubAction = (s32)(random_float() * 4.0f + 1.0f); // Counter keeps track of the iterations done, while ToBeDone // is the count of iterations to be done (between 2 and 5). o->oUkikiTauntCounter = 0; - o->oUkikiTauntsToBeDone = (s16)(RandomFloat() * 4.0f + 2.0f); + o->oUkikiTauntsToBeDone = (s16)(random_float() * 4.0f + 2.0f); } // Switch goes from 1-4. @@ -221,7 +221,7 @@ void ukiki_act_turn_to_mario(void) { // Initialize the action with a random fVel from 2-5. if (o->oTimer == 0) { - o->oForwardVel = RandomFloat() * 3.0f + 2.0f; + o->oForwardVel = random_float() * 3.0f + 2.0f; } cur_obj_init_animation_with_sound(UKIKI_ANIM_TURN); @@ -254,7 +254,7 @@ void ukiki_act_run(void) { } if (o->oTimer == 0) { - o->oUkikiChaseFleeRange = RandomFloat() * 100.0f + 350.0f; + o->oUkikiChaseFleeRange = random_float() * 100.0f + 350.0f; } cur_obj_init_animation_with_sound(UKIKI_ANIM_RUN); @@ -298,7 +298,7 @@ void ukiki_act_jump(void) { if (o->oSubAction == 0) { if (o->oTimer == 0) { - cur_obj_set_y_vel_and_animation(RandomFloat() * 10.0f + 45.0f, UKIKI_ANIM_JUMP); + cur_obj_set_y_vel_and_animation(random_float() * 10.0f + 45.0f, UKIKI_ANIM_JUMP); } else if (o->oMoveFlags & OBJ_MOVE_MASK_NOT_AIR) { o->oSubAction++; o->oVelY = 0.0f; diff --git a/src/game/behaviors/unagi.inc.c b/src/game/behaviors/unagi.inc.c index d1023e90..df9041e9 100644 --- a/src/game/behaviors/unagi.inc.c +++ b/src/game/behaviors/unagi.inc.c @@ -110,7 +110,7 @@ void unagi_act_3(void) { o->oUnagiUnk110 = 0.0f; } } else if (o->oUnagiUnk110 > 0.0f) { - if (func_802F92B0(5)) { + if (cur_obj_init_anim_and_check_if_end(5)) { o->oUnagiUnk110 = 0.0f; } } else if (o->oUnagiUnk110 == 0.0f) { diff --git a/src/game/behaviors/water_bomb.inc.c b/src/game/behaviors/water_bomb.inc.c index a309154e..41333803 100644 --- a/src/game/behaviors/water_bomb.inc.c +++ b/src/game/behaviors/water_bomb.inc.c @@ -24,36 +24,6 @@ static struct ObjectHitbox sWaterBombHitbox = { /* hurtboxHeight: */ 50, }; -static struct SpawnParticlesInfo sWaterBombExplodeParticles = { - /* behParam: */ 0, - /* count: */ 5, - /* model: */ MODEL_BUBBLE, - /* offsetY: */ 20, - /* forwardVelBase: */ 20, - /* forwardVelRange: */ 60, - /* velYBase: */ 10, - /* velYRange: */ 10, - /* gravity: */ -2, - /* dragStrength: */ 0, - /* sizeBase: */ 35.0f, - /* sizeRange: */ 10.0f, -}; - -static struct SpawnParticlesInfo sWaterBombCannonParticle = { - /* behParam: */ 0, - /* count: */ 1, - /* model: */ MODEL_BUBBLE, - /* offsetY: */ 236, - /* forwardVelBase: */ 20, - /* forwardVelRange: */ 5, - /* velYBase: */ 0, - /* velYRange: */ 0, - /* gravity: */ -2, - /* dragStrength: */ 0, - /* sizeBase: */ 20.0f, - /* sizeRange: */ 5.0f, -}; - /** * Update function for bhvWaterBombSpawner. * Spawn water bombs targeting mario when he comes in range. @@ -96,28 +66,27 @@ void bhv_water_bomb_spawner_update(void) { /** * Spawn particles when the water bomb explodes. - * - * TODO: (Scrub C) monty_mole_spawn_dirt_particles, water_bomb_spawn_explode_particles, and - * func_80306ED4 all have similar issues with their functions, none of which match legitimately. */ void water_bomb_spawn_explode_particles(s8 offsetY, s8 forwardVelRange, s8 velYBase) { -#if defined(VERSION_JP) || defined(VERSION_US) + static struct SpawnParticlesInfo sWaterBombExplodeParticles = { + /* behParam: */ 0, + /* count: */ 5, + /* model: */ MODEL_BUBBLE, + /* offsetY: */ 20, + /* forwardVelBase: */ 20, + /* forwardVelRange: */ 60, + /* velYBase: */ 10, + /* velYRange: */ 10, + /* gravity: */ -2, + /* dragStrength: */ 0, + /* sizeBase: */ 35.0f, + /* sizeRange: */ 10.0f, + }; + sWaterBombExplodeParticles.offsetY = offsetY; sWaterBombExplodeParticles.forwardVelRange = forwardVelRange; sWaterBombExplodeParticles.velYBase = velYBase; cur_obj_spawn_particles(&sWaterBombExplodeParticles); -#else - s8 tempVelYBase = velYBase; - s8 tempForwardVelRange = forwardVelRange; - s8 tempOffsetY = offsetY; - - do { - sWaterBombExplodeParticles.offsetY = tempOffsetY; - sWaterBombExplodeParticles.forwardVelRange = tempForwardVelRange; - sWaterBombExplodeParticles.velYBase = tempVelYBase; - cur_obj_spawn_particles(&sWaterBombExplodeParticles); - } while (0); -#endif } /** @@ -206,6 +175,22 @@ static void water_bomb_act_explode(void) { * Despawn after 100 frames. */ static void water_bomb_act_shot_from_cannon(void) { + + static struct SpawnParticlesInfo sWaterBombCannonParticle = { + /* behParam: */ 0, + /* count: */ 1, + /* model: */ MODEL_BUBBLE, + /* offsetY: */ 236, + /* forwardVelBase: */ 20, + /* forwardVelRange: */ 5, + /* velYBase: */ 0, + /* velYRange: */ 0, + /* gravity: */ -2, + /* dragStrength: */ 0, + /* sizeBase: */ 20.0f, + /* sizeRange: */ 5.0f, + }; + if (o->oTimer > 100) { obj_mark_for_deletion(o); } else { diff --git a/src/game/behaviors/water_bomb_cannon.inc.c b/src/game/behaviors/water_bomb_cannon.inc.c index 3dbe53aa..8e9ba33b 100644 --- a/src/game/behaviors/water_bomb_cannon.inc.c +++ b/src/game/behaviors/water_bomb_cannon.inc.c @@ -63,8 +63,8 @@ void water_bomb_cannon_act_1(void) { } else { cur_obj_play_sound_2(SOUND_OBJ_CANNON4); o->oWaterCannonUnkF4 = 70; - o->oWaterCannonUnkFC = 0x1000 + 0x400 * (RandomU16() & 0x3); - o->oWaterCannonUnk100 = -0x2000 + o->oMoveAngleYaw + 0x1000 * (RandomU16() % 5); + o->oWaterCannonUnkFC = 0x1000 + 0x400 * (random_u16() & 0x3); + o->oWaterCannonUnk100 = -0x2000 + o->oMoveAngleYaw + 0x1000 * (random_u16() % 5); o->oWaterCannonUnkF8 = 60; } } diff --git a/src/game/behaviors/water_mist.inc.c b/src/game/behaviors/water_mist.inc.c index 03a6501a..64d25c77 100644 --- a/src/game/behaviors/water_mist.inc.c +++ b/src/game/behaviors/water_mist.inc.c @@ -5,5 +5,5 @@ void bhv_water_mist_2_loop(void) { o->oPosY = find_water_level(o->oHomeX, o->oHomeZ) + 20.0f; o->oPosX = o->oHomeX + random_f32_around_zero(150.0f); o->oPosZ = o->oHomeZ + random_f32_around_zero(150.0f); - o->oOpacity = RandomFloat() * 50.0f + 200.0f; + o->oOpacity = random_float() * 50.0f + 200.0f; } diff --git a/src/game/behaviors/water_objs.inc.c b/src/game/behaviors/water_objs.inc.c index 6168605c..0926a0c4 100644 --- a/src/game/behaviors/water_objs.inc.c +++ b/src/game/behaviors/water_objs.inc.c @@ -21,8 +21,8 @@ void bhv_water_air_bubble_loop(void) { o->oMoveAngleYaw = obj_angle_to_object(o, gMarioObject); cur_obj_move_using_fvel_and_gravity(); } - o->oPosX += RandomFloat() * 4.0f - 2.0f; - o->oPosZ += RandomFloat() * 4.0f - 2.0f; + o->oPosX += random_float() * 4.0f - 2.0f; + o->oPosZ += random_float() * 4.0f - 2.0f; if (o->oInteractStatus & INT_STATUS_INTERACTED || o->oTimer > 200) { cur_obj_play_sound_2(SOUND_GENERAL_QUIET_BUBBLE); obj_mark_for_deletion(o); @@ -35,19 +35,19 @@ void bhv_water_air_bubble_loop(void) { } void bhv_bubble_wave_init(void) { - o->oWaterObjUnkFC = 0x800 + (s32)(RandomFloat() * 2048.0f); - o->oWaterObjUnk100 = 0x800 + (s32)(RandomFloat() * 2048.0f); + o->oWaterObjUnkFC = 0x800 + (s32)(random_float() * 2048.0f); + o->oWaterObjUnk100 = 0x800 + (s32)(random_float() * 2048.0f); cur_obj_play_sound_2(SOUND_GENERAL_QUIET_BUBBLE); } void scale_bubble_random(void) { - cur_obj_scale(RandomFloat() + 1.0); + cur_obj_scale(random_float() + 1.0); } void bhv_bubble_maybe_loop(void) { - o->oPosY += RandomFloat() * 3.0f + 6.0f; - o->oPosX += RandomFloat() * 10.0f - 5.0f; - o->oPosZ += RandomFloat() * 10.0f - 5.0f; + o->oPosY += random_float() * 3.0f + 6.0f; + o->oPosX += random_float() * 10.0f - 5.0f; + o->oPosZ += random_float() * 10.0f - 5.0f; o->header.gfx.scale[0] = sins(o->oWaterObjUnkF4) * 0.2 + 1.0; o->oWaterObjUnkF4 += o->oWaterObjUnkFC; o->header.gfx.scale[1] = sins(o->oWaterObjUnkF8) * 0.2 + 1.0; @@ -79,8 +79,8 @@ void scale_bubble_sin(void) { void bhv_particle_init(void) { obj_scale_xyz(o, 2.0f, 2.0f, 1.0f); - o->oWaterObjUnkFC = 0x800 + (s32)(RandomFloat() * 2048.0f); - o->oWaterObjUnk100 = 0x800 + (s32)(RandomFloat() * 2048.0f); + o->oWaterObjUnkFC = 0x800 + (s32)(random_float() * 2048.0f); + o->oWaterObjUnk100 = 0x800 + (s32)(random_float() * 2048.0f); obj_translate_xyz_random(o, 100.0f); } diff --git a/src/game/behaviors/water_pillar.inc.c b/src/game/behaviors/water_pillar.inc.c index 5b7f2656..801069ca 100644 --- a/src/game/behaviors/water_pillar.inc.c +++ b/src/game/behaviors/water_pillar.inc.c @@ -40,6 +40,9 @@ void water_level_pillar_undrained(void) { (s32) approach_f32_symmetric(gEnvironmentLevels[2], -2450.0f, 5.0f); gEnvironmentLevels[0] = (s32) approach_f32_symmetric(gEnvironmentLevels[0], -2450.0f, 5.0f); +#ifdef VERSION_SH + reset_rumble_timers_2(2); +#endif } else o->oAction++; break; diff --git a/src/game/behaviors/water_ring.inc.c b/src/game/behaviors/water_ring.inc.c index 6cdc43d4..dfb4482b 100644 --- a/src/game/behaviors/water_ring.inc.c +++ b/src/game/behaviors/water_ring.inc.c @@ -12,9 +12,9 @@ f32 water_ring_calc_mario_dist(void) { void water_ring_init(void) { cur_obj_init_animation(0); - o->oWaterRingScalePhaseX = (s32)(RandomFloat() * 4096.0f) + 0x1000; - o->oWaterRingScalePhaseY = (s32)(RandomFloat() * 4096.0f) + 0x1000; - o->oWaterRingScalePhaseZ = (s32)(RandomFloat() * 4096.0f) + 0x1000; + o->oWaterRingScalePhaseX = (s32)(random_float() * 4096.0f) + 0x1000; + o->oWaterRingScalePhaseY = (s32)(random_float() * 4096.0f) + 0x1000; + o->oWaterRingScalePhaseZ = (s32)(random_float() * 4096.0f) + 0x1000; //! This normal calculation assumes a facing yaw of 0, which is not the case // for the manta ray rings. It also errs by multiplying the normal X by -1. diff --git a/src/game/behaviors/water_splashes_and_waves.inc.c b/src/game/behaviors/water_splashes_and_waves.inc.c index fef9a1c9..07722c04 100644 --- a/src/game/behaviors/water_splashes_and_waves.inc.c +++ b/src/game/behaviors/water_splashes_and_waves.inc.c @@ -62,10 +62,10 @@ void bhv_water_droplet_loop(void) { if (o->oTimer == 0) { if (cur_obj_has_model(MODEL_FISH)) - o->header.gfx.node.flags &= ~4; + o->header.gfx.node.flags &= ~GRAPH_RENDER_BILLBOARD; else - o->header.gfx.node.flags |= 4; - o->oFaceAngleYaw = RandomU16(); + o->header.gfx.node.flags |= GRAPH_RENDER_BILLBOARD; + o->oFaceAngleYaw = random_u16(); } // Apply gravity o->oVelY -= 4.0f; @@ -93,7 +93,7 @@ void bhv_idle_water_wave_loop(void) { } void bhv_water_droplet_splash_init(void) { - cur_obj_scale(RandomFloat() + 1.5); + cur_obj_scale(random_float() + 1.5); } void bhv_bubble_splash_init(void) { @@ -105,7 +105,7 @@ void bhv_bubble_splash_init(void) { void bhv_shallow_water_splash_init(void) { struct Object *fishObj; // Have a 1 in 256 chance to spawn the fish particle easter egg. - if ((RandomU16() & 0xFF) <= 0) // Strange + if ((random_u16() & 0xFF) <= 0) // Strange { fishObj = spawn_water_droplet(o, &sWaterDropletFishParams); obj_init_animation_with_sound(fishObj, blue_fish_seg3_anims_0301C2B0, 0); diff --git a/src/game/behaviors/wdw_water_level.inc.c b/src/game/behaviors/wdw_water_level.inc.c index 85556dc9..6a8a346b 100644 --- a/src/game/behaviors/wdw_water_level.inc.c +++ b/src/game/behaviors/wdw_water_level.inc.c @@ -49,6 +49,9 @@ void bhv_water_level_diamond_loop(void) { cur_obj_play_sound_1(SOUND_ENV_WATER_DRAIN); // same as above } o->oAngleVelYaw = 0x800; +#ifdef VERSION_SH + reset_rumble_timers_2(2); +#endif } break; case WATER_LEVEL_DIAMOND_ACT_IDLE_SPINNING: diff --git a/src/game/behaviors/whirlpool.inc.c b/src/game/behaviors/whirlpool.inc.c index f2c502da..405e0518 100644 --- a/src/game/behaviors/whirlpool.inc.c +++ b/src/game/behaviors/whirlpool.inc.c @@ -36,7 +36,7 @@ void whirpool_orient_graph(void) { void bhv_whirlpool_loop(void) { if (o->oDistanceToMario < 5000.0f) { - o->header.gfx.node.flags &= ~0x10; /* bit 4 */ + o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; // not sure if actually an array gEnvFxBubbleConfig[ENVFX_STATE_PARTICLECOUNT] = 60; @@ -53,7 +53,7 @@ void bhv_whirlpool_loop(void) { o->oFaceAngleYaw += 0x1F40; } else { - o->header.gfx.node.flags |= 0x10; /* bit 4 */ + o->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; gEnvFxBubbleConfig[ENVFX_STATE_PARTICLECOUNT] = 0; } diff --git a/src/game/behaviors/whomp.inc.c b/src/game/behaviors/whomp.inc.c index 93a68dc8..c9ebca0a 100644 --- a/src/game/behaviors/whomp.inc.c +++ b/src/game/behaviors/whomp.inc.c @@ -23,7 +23,7 @@ void whomp_act_0(void) { if (o->oSubAction == 0) { if (o->oDistanceToMario < 600.0f) { o->oSubAction++; - func_8031FFB4(0, 60, 40); + func_8031FFB4(SEQ_PLAYER_LEVEL, 60, 40); } else { cur_obj_set_pos_to_home(); o->oHealth = 3; diff --git a/src/game/behaviors/wiggler.inc.c b/src/game/behaviors/wiggler.inc.c index c1760bf1..4c465f80 100644 --- a/src/game/behaviors/wiggler.inc.c +++ b/src/game/behaviors/wiggler.inc.c @@ -222,7 +222,7 @@ static void wiggler_act_walk(void) { // Update text if necessary if (o->oWigglerTextStatus < WIGGLER_TEXT_STATUS_COMPLETED_DIALOG) { if (o->oWigglerTextStatus == WIGGLER_TEXT_STATUS_AWAIT_DIALOG) { - func_8031FFB4(0, 60, 40); + func_8031FFB4(SEQ_PLAYER_LEVEL, 60, 40); o->oWigglerTextStatus = WIGGLER_TEXT_STATUS_SHOWING_DIALOG; } @@ -257,7 +257,7 @@ static void wiggler_act_walk(void) { } else if (o->oWigglerTimeUntilRandomTurn != 0) { o->oWigglerTimeUntilRandomTurn -= 1; } else { - o->oWigglerTargetYaw = o->oMoveAngleYaw + 0x4000 * (s16) RandomSign(); + o->oWigglerTargetYaw = o->oMoveAngleYaw + 0x4000 * (s16) random_sign(); o->oWigglerTimeUntilRandomTurn = random_linear_offset(30, 50); } } @@ -412,7 +412,7 @@ void bhv_wiggler_update(void) { // Walking animation and sound cur_obj_init_animation_with_accel_and_sound(0, o->oWigglerWalkAnimSpeed); if (o->oWigglerWalkAnimSpeed != 0.0f) { - func_802F9378(0, 13, + cur_obj_play_sound_at_anim_range(0, 13, o->oHealth >= 4 ? SOUND_OBJ_WIGGLER_LOW_PITCH : SOUND_OBJ_WIGGLER_HIGH_PITCH); } else { cur_obj_reverse_animation(); diff --git a/src/game/behaviors/wind.inc.c b/src/game/behaviors/wind.inc.c index 238f9f72..a1c58dd4 100644 --- a/src/game/behaviors/wind.inc.c +++ b/src/game/behaviors/wind.inc.c @@ -20,12 +20,12 @@ void bhv_wind_loop(void) { o->oPosY += 80.0f + random_f32_around_zero(200.0f); o->oPosZ += coss(o->oMoveAngleYaw + 0x8000) * sp2E; // -coss(a) * sp2E o->oMoveAngleYaw += random_f32_around_zero(4000.0f); - o->oForwardVel = RandomFloat() * 70.0f + 50.0f; + o->oForwardVel = random_float() * 70.0f + 50.0f; } else { obj_translate_xz_random(o, 600.0f); o->oPosY -= sp2E - 200; // 300 - o->oVelY = RandomFloat() * 30.0f + 50.0f; - o->oMoveAngleYaw = RandomU16(); + o->oVelY = random_float() * 30.0f + 50.0f; + o->oMoveAngleYaw = random_u16(); o->oForwardVel = 10.0f; } obj_set_billboard(o); @@ -33,7 +33,7 @@ void bhv_wind_loop(void) { } if (o->oTimer > 8) obj_mark_for_deletion(o); - o->oFaceAnglePitch += 4000.0f + 2000.0f * RandomFloat(); - o->oFaceAngleYaw += 4000.0f + 2000.0f * RandomFloat(); + o->oFaceAnglePitch += 4000.0f + 2000.0f * random_float(); + o->oFaceAngleYaw += 4000.0f + 2000.0f * random_float(); cur_obj_move_using_fvel_and_gravity(); } diff --git a/src/game/behaviors/yoshi.inc.c b/src/game/behaviors/yoshi.inc.c index 5622f74d..ed61f400 100644 --- a/src/game/behaviors/yoshi.inc.c +++ b/src/game/behaviors/yoshi.inc.c @@ -44,7 +44,7 @@ void yoshi_idle_loop(void) { UNUSED s16 sp1C = o->header.gfx.unk38.animFrame; if (o->oTimer > 90) { - chosenHome = RandomFloat() * 3.99; + chosenHome = random_float() * 3.99; if (o->oYoshiChosenHome == chosenHome) { return; diff --git a/src/game/camera.c b/src/game/camera.c index fdf140f1..e0bf05f4 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -8,7 +8,7 @@ #include "dialog_ids.h" #include "audio/external.h" #include "mario_misc.h" -#include "game.h" +#include "game_init.h" #include "hud.h" #include "engine/math_util.h" #include "area.h" @@ -19,7 +19,6 @@ #include "mario_actions_cutscene.h" #include "save_file.h" #include "object_helpers.h" -#include "object_helpers2.h" #include "print.h" #include "spawn_sound.h" #include "behavior_actions.h" @@ -556,8 +555,8 @@ void set_camera_shake_from_hit(s16 shake) { break; case SHAKE_SHOCK: - set_camera_pitch_shake(RandomFloat() * 64.f, 0x8, 0x8000); - set_camera_yaw_shake(RandomFloat() * 64.f, 0x8, 0x8000); + set_camera_pitch_shake(random_float() * 64.f, 0x8, 0x8000); + set_camera_yaw_shake(random_float() * 64.f, 0x8, 0x8000); break; } } @@ -3819,7 +3818,7 @@ void shake_camera_handheld(Vec3f pos, Vec3f focus) { sHandheldShakeTimer -= 1.f; // Code dead, this is set to be 0 before it is used. - sHandheldShakeInc = RandomFloat() * 0.5f; + sHandheldShakeInc = random_float() * 0.5f; if (sHandheldShakeInc < 0.02f) { sHandheldShakeInc = 0.02f; } @@ -4239,15 +4238,15 @@ void random_vec3s(Vec3s dst, s16 xRange, s16 yRange, s16 zRange) { f32 tempYRange; f32 tempZRange; - randomFloat = RandomFloat(); + randomFloat = random_float(); tempXRange = xRange; dst[0] = randomFloat * tempXRange - tempXRange / 2; - randomFloat = RandomFloat(); + randomFloat = random_float(); tempYRange = yRange; dst[1] = randomFloat * tempYRange - tempYRange / 2; - randomFloat = RandomFloat(); + randomFloat = random_float(); tempZRange = zRange; dst[2] = randomFloat * tempZRange - tempZRange / 2; } @@ -4786,14 +4785,14 @@ s32 offset_yaw_outward_radial(struct Camera *c, s16 areaYaw) { * Plays the background music that starts while peach reads the intro message. */ void cutscene_intro_peach_play_message_music(void) { - play_music(0, SEQUENCE_ARGS(4, SEQ_EVENT_PEACH_MESSAGE), 0); + play_music(SEQ_PLAYER_LEVEL, SEQUENCE_ARGS(4, SEQ_EVENT_PEACH_MESSAGE), 0); } /** * Plays the music that starts after peach fades and lakitu appears. */ void cutscene_intro_peach_play_lakitu_flying_music(void) { - play_music(0, SEQUENCE_ARGS(15, SEQ_EVENT_CUTSCENE_INTRO), 0); + play_music(SEQ_PLAYER_LEVEL, SEQUENCE_ARGS(15, SEQ_EVENT_CUTSCENE_INTRO), 0); } void play_camera_buzz_if_cdown(void) { @@ -7019,8 +7018,8 @@ static UNUSED void unused_cutscene_mario_dialog_looking_up(UNUSED struct Camera * Lower the volume (US only) and start the peach letter background music */ BAD_RETURN(s32) cutscene_intro_peach_start_letter_music(UNUSED struct Camera *c) { -#ifdef VERSION_US - func_8031FFB4(0, 60, 40); +#if defined(VERSION_US) || defined(VERSION_SH) + func_8031FFB4(SEQ_PLAYER_LEVEL, 60, 40); #endif cutscene_intro_peach_play_message_music(); } @@ -7030,7 +7029,7 @@ BAD_RETURN(s32) cutscene_intro_peach_start_letter_music(UNUSED struct Camera *c) */ BAD_RETURN(s32) cutscene_intro_peach_start_flying_music(UNUSED struct Camera *c) { #ifndef VERSION_JP - sequence_player_unlower(0, 60); + sequence_player_unlower(SEQ_PLAYER_LEVEL, 60); #endif cutscene_intro_peach_play_lakitu_flying_music(); } @@ -7041,7 +7040,7 @@ BAD_RETURN(s32) cutscene_intro_peach_start_flying_music(UNUSED struct Camera *c) * starts. */ BAD_RETURN(s32) cutscene_intro_peach_eu_lower_volume(UNUSED struct Camera *c) { - func_8031FFB4(0, 60, 40); + func_8031FFB4(SEQ_PLAYER_LEVEL, 60, 40); } #endif @@ -7061,12 +7060,7 @@ void player2_rotate_cam(struct Camera *c, s16 minPitch, s16 maxPitch, s16 minYaw approach_s16_asymptotic_bool(&sCreditsPlayer2Pitch, -(s16)(gPlayer2Controller->stickY * 265.f), 4); vec3f_get_dist_and_angle(c->pos, c->focus, &distCamToFocus, &pitch, &yaw); -#ifdef VERSION_EU - if ((pitchCap = 0x3800 - pitch) < 0) { -#else - pitchCap = 0x3800 - pitch; - if (pitchCap < 0) { -#endif + pitchCap = 0x3800 - pitch; if (pitchCap < 0) { pitchCap = 0; } if (maxPitch > pitchCap) { @@ -7199,11 +7193,11 @@ void set_flag_post_door(struct Camera *c) { } void cutscene_soften_music(UNUSED struct Camera *c) { - func_8031FFB4(0, 60, 40); + func_8031FFB4(SEQ_PLAYER_LEVEL, 60, 40); } void cutscene_unsoften_music(UNUSED struct Camera *c) { - sequence_player_unlower(0, 60); + sequence_player_unlower(SEQ_PLAYER_LEVEL, 60); } static void stub_camera_5(UNUSED struct Camera *c) { @@ -9601,7 +9595,7 @@ BAD_RETURN(s32) play_sound_intro_turn_on_hud(UNUSED struct Camera *c) { * Fly to the pipe. Near the end, the camera jumps to lakitu's position and the hud turns on. */ BAD_RETURN(s32) cutscene_intro_peach_fly_to_pipe(struct Camera *c) { -#ifdef VERSION_US +#if defined(VERSION_US) || defined(VERSION_SH) cutscene_event(play_sound_intro_turn_on_hud, c, 818, 818); #elif VERSION_EU cutscene_event(play_sound_intro_turn_on_hud, c, 673, 673); @@ -11505,7 +11499,7 @@ void set_fov_shake_from_point_preset(u8 preset, f32 posX, f32 posY, f32 posZ) { * Offset an object's position in a random direction within the given bounds. */ static UNUSED void unused_displace_obj_randomly(struct Object *o, f32 xRange, f32 yRange, f32 zRange) { - f32 rnd = RandomFloat(); + f32 rnd = random_float(); o->oPosX += (rnd * xRange - xRange / 2.f); o->oPosY += (rnd * yRange - yRange / 2.f); @@ -11516,7 +11510,7 @@ static UNUSED void unused_displace_obj_randomly(struct Object *o, f32 xRange, f3 * Rotate an object in a random direction within the given bounds. */ static UNUSED void unused_rotate_obj_randomly(struct Object *o, f32 pitchRange, f32 yawRange) { - f32 rnd = RandomFloat(); + f32 rnd = random_float(); o->oMoveAnglePitch += (s16)(rnd * pitchRange - pitchRange / 2.f); o->oMoveAngleYaw += (s16)(rnd * yawRange - yawRange / 2.f); diff --git a/src/game/crash_screen.c b/src/game/crash_screen.c index ea07ffd5..dd8d70fd 100644 --- a/src/game/crash_screen.c +++ b/src/game/crash_screen.c @@ -177,22 +177,39 @@ static char *write_to_buf(char *buffer, const char *data, size_t size) { void crash_screen_print(s32 x, s32 y, const char *fmt, ...) { char *ptr; - char buf[0x108]; u32 glyph; - va_list args; + s32 size; + char buf[0x100]; + va_list args; va_start(args, fmt); - if (_Printf(write_to_buf, buf, fmt, args) > 0) { + + size = _Printf(write_to_buf, buf, fmt, args); + + if (size > 0) { ptr = buf; + +#ifdef VERSION_SH + while (size > 0) { +#else while (*ptr) { +#endif + glyph = gCrashScreenCharToGlyph[*ptr & 0x7f]; + if (glyph != 0xff) { crash_screen_draw_glyph(x, y, glyph); } + +#ifdef VERSION_SH + size--; +#endif + ptr++; x += 6; } } + va_end(args); } @@ -245,10 +262,16 @@ void draw_crash_screen(OSThread *thread) { cause = 17; } +#ifdef VERSION_SH + osWritebackDCacheAll(); +#endif + crash_screen_draw_rect(25, 20, 270, 25); crash_screen_print(30, 25, "THREAD:%d (%s)", thread->id, gCauseDesc[cause]); crash_screen_print(30, 35, "PC:%08XH SR:%08XH VA:%08XH", tc->pc, tc->sr, tc->badvaddr); +#ifdef VERSION_EU osWritebackDCacheAll(); +#endif crash_screen_sleep(2000); crash_screen_draw_rect(25, 45, 270, 185); crash_screen_print(30, 50, "AT:%08XH V0:%08XH V1:%08XH", (u32) tc->at, (u32) tc->v0, @@ -271,7 +294,9 @@ void draw_crash_screen(OSThread *thread) { (u32) tc->sp); crash_screen_print(30, 140, "S8:%08XH RA:%08XH", (u32) tc->s8, (u32) tc->ra); crash_screen_print_fpcsr(tc->fpcsr); +#ifdef VERSION_EU osWritebackDCacheAll(); +#endif crash_screen_print_float_reg(30, 170, 0, &tc->fp0.f.f_even); crash_screen_print_float_reg(120, 170, 2, &tc->fp2.f.f_even); crash_screen_print_float_reg(210, 170, 4, &tc->fp4.f.f_even); @@ -288,7 +313,9 @@ void draw_crash_screen(OSThread *thread) { crash_screen_print_float_reg(120, 210, 26, &tc->fp26.f.f_even); crash_screen_print_float_reg(210, 210, 28, &tc->fp28.f.f_even); crash_screen_print_float_reg(30, 220, 30, &tc->fp30.f.f_even); +#ifdef VERSION_EU osWritebackDCacheAll(); +#endif osViBlack(FALSE); osViSwapBuffer(gCrashScreen.framebuffer); } @@ -323,18 +350,36 @@ void thread2_crash_screen(UNUSED void *arg) { } void crash_screen_set_framebuffer(u16 *framebuffer, s16 width, s16 height) { +#ifdef VERSION_EU gCrashScreen.framebuffer = framebuffer; +#else + gCrashScreen.framebuffer = (u16 *)((uintptr_t)framebuffer | 0xa0000000); +#endif gCrashScreen.width = width; gCrashScreen.height = height; } void crash_screen_init(void) { +#ifdef VERSION_EU gCrashScreen.framebuffer = (u16 *) (osMemSize | 0x80000000) - SCREEN_WIDTH * SCREEN_HEIGHT; +#else + gCrashScreen.framebuffer = (u16 *) (osMemSize | 0xA0000000) - SCREEN_WIDTH * SCREEN_HEIGHT; +#endif gCrashScreen.width = SCREEN_WIDTH; +#ifdef VERSION_EU gCrashScreen.height = SCREEN_HEIGHT; +#else + gCrashScreen.height = 0x10; +#endif osCreateMesgQueue(&gCrashScreen.mesgQueue, &gCrashScreen.mesg, 1); osCreateThread(&gCrashScreen.thread, 2, thread2_crash_screen, NULL, - (u8 *) gCrashScreen.stack + sizeof(gCrashScreen.stack), OS_PRIORITY_APPMAX); + (u8 *) gCrashScreen.stack + sizeof(gCrashScreen.stack), +#ifdef VERSION_EU + OS_PRIORITY_APPMAX +#else + OS_PRIORITY_RMON +#endif + ); osStartThread(&gCrashScreen.thread); } diff --git a/src/game/debug.c b/src/game/debug.c index e27a77c3..2a364605 100644 --- a/src/game/debug.c +++ b/src/game/debug.c @@ -7,7 +7,7 @@ #include "print.h" #include "engine/surface_collision.h" #include "mario.h" -#include "game.h" +#include "game_init.h" #include "main.h" #include "debug.h" #include "object_list_processor.h" @@ -391,7 +391,10 @@ static void try_change_debug_page(void) { * sDebugSysCursor. This is used to adjust enemy and effect behaviors * on the fly. (unused) */ -static void try_modify_debug_controls(void) { +#ifndef VERSION_SH +static +#endif +void try_modify_debug_controls(void) { s32 sp4; if (gPlayer1Controller->buttonPressed & Z_TRIG) { @@ -521,8 +524,11 @@ void try_do_mario_debug_object_spawn(void) { } // TODO: figure out what this is -static void debug_print_obj_move_flags(void) { -#ifndef VERSION_EU +#ifndef VERSION_SH +static +#endif +void debug_print_obj_move_flags(void) { +#ifndef VERSION_EU // TODO: Is there a better way to diff this? static EU doesn't seem to work. if (gCurrentObject->oMoveFlags & OBJ_MOVE_LANDED) { print_debug_top_down_objectinfo("BOUND %x", gCurrentObject->oMoveFlags); } diff --git a/src/game/display.c b/src/game/display.c deleted file mode 100644 index b9ac5fcc..00000000 --- a/src/game/display.c +++ /dev/null @@ -1,289 +0,0 @@ -#include - -#include "sm64.h" -#include "audio/external.h" -#include "buffers/buffers.h" -#include "buffers/gfx_output_buffer.h" -#include "game.h" -#include "main.h" -#include "memory.h" -#include "profiler.h" -#include "display.h" - -int unused8032C690 = 0; -u32 gGlobalTimer = 0; -static u16 sCurrFBNum = 0; -u16 frameBufferIndex = 0; - -/** - * Initializes the Reality Display Processor (RDP). - * This function initializes settings such as texture filtering mode, - * scissoring, and render mode (although keep in mind that this render - * mode is not used in-game, where it is set in render_graph_node.c). - */ -void my_rdp_init(void) { - gDPPipeSync(gDisplayListHead++); - gDPPipelineMode(gDisplayListHead++, G_PM_1PRIMITIVE); - - gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE); - - gDPSetTextureLOD(gDisplayListHead++, G_TL_TILE); - gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE); - gDPSetTextureDetail(gDisplayListHead++, G_TD_CLAMP); - gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP); - gDPSetTextureFilter(gDisplayListHead++, G_TF_BILERP); - gDPSetTextureConvert(gDisplayListHead++, G_TC_FILT); - - gDPSetCombineKey(gDisplayListHead++, G_CK_NONE); - gDPSetAlphaCompare(gDisplayListHead++, G_AC_NONE); - gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2); - gDPSetColorDither(gDisplayListHead++, G_CD_MAGICSQ); - gDPSetCycleType(gDisplayListHead++, G_CYC_FILL); - - gDPPipeSync(gDisplayListHead++); -} - -/** - * Initializes the RSP's built-in geometry and lighting engines. - * Most of these (with the notable exception of gSPNumLights), are - * almost immediately overwritten. - */ -void my_rsp_init(void) { - gSPClearGeometryMode(gDisplayListHead++, G_SHADE | G_SHADING_SMOOTH | G_CULL_BOTH | G_FOG - | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD); - - gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_SHADING_SMOOTH | G_CULL_BACK | G_LIGHTING); - - gSPNumLights(gDisplayListHead++, NUMLIGHTS_1); - gSPTexture(gDisplayListHead++, 0, 0, 0, G_TX_RENDERTILE, G_OFF); - - // @bug Nintendo did not explicitly define the clipping ratio. - // For Fast3DEX2, this causes the dreaded warped vertices issue - // unless the clipping ratio is changed back to the intended value, - // as Fast3DEX2 uses a different initial value than Fast3D(EX). -#ifdef F3DEX_GBI_2 - gSPClipRatio(gDisplayListHead++, FRUSTRATIO_1); -#endif -} - -/** Clear the Z buffer. */ -void clear_z_buffer(void) { - gDPPipeSync(gDisplayListHead++); - - gDPSetDepthSource(gDisplayListHead++, G_ZS_PIXEL); - gDPSetDepthImage(gDisplayListHead++, gPhysicalZBuffer); - - gDPSetColorImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, gPhysicalZBuffer); - gDPSetFillColor(gDisplayListHead++, - GPACK_ZDZ(G_MAXFBZ, 0) << 16 | GPACK_ZDZ(G_MAXFBZ, 0)); - - gDPFillRectangle(gDisplayListHead++, 0, BORDER_HEIGHT, SCREEN_WIDTH - 1, - SCREEN_HEIGHT - 1 - BORDER_HEIGHT); -} - -/** Sets up the final framebuffer image. */ -void display_frame_buffer(void) { - gDPPipeSync(gDisplayListHead++); - - gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE); - gDPSetColorImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, - gPhysicalFrameBuffers[frameBufferIndex]); - gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, BORDER_HEIGHT, SCREEN_WIDTH, - SCREEN_HEIGHT - BORDER_HEIGHT); -} - -/** Clears the framebuffer, allowing it to be overwritten. */ -void clear_frame_buffer(s32 a) { - gDPPipeSync(gDisplayListHead++); - - gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2); - gDPSetCycleType(gDisplayListHead++, G_CYC_FILL); - - gDPSetFillColor(gDisplayListHead++, a); - gDPFillRectangle(gDisplayListHead++, 0, BORDER_HEIGHT, SCREEN_WIDTH - 1, - SCREEN_HEIGHT - 1 - BORDER_HEIGHT); - - gDPPipeSync(gDisplayListHead++); - - gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE); -} - -/** Clears and initializes the viewport. */ -void clear_viewport(Vp *viewport, s32 b) { - s16 vpUlx = (viewport->vp.vtrans[0] - viewport->vp.vscale[0]) / 4 + 1; - s16 vpUly = (viewport->vp.vtrans[1] - viewport->vp.vscale[1]) / 4 + 1; - s16 VpLrx = (viewport->vp.vtrans[0] + viewport->vp.vscale[0]) / 4 - 2; - s16 vpLry = (viewport->vp.vtrans[1] + viewport->vp.vscale[1]) / 4 - 2; - - gDPPipeSync(gDisplayListHead++); - - gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2); - gDPSetCycleType(gDisplayListHead++, G_CYC_FILL); - - gDPSetFillColor(gDisplayListHead++, b); - gDPFillRectangle(gDisplayListHead++, vpUlx, vpUly, VpLrx, vpLry); - - gDPPipeSync(gDisplayListHead++); - - gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE); -} - -/** Draws the horizontal screen borders */ -void draw_screen_borders(void) { - gDPPipeSync(gDisplayListHead++); - - gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); - gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2); - gDPSetCycleType(gDisplayListHead++, G_CYC_FILL); - - gDPSetFillColor(gDisplayListHead++, GPACK_RGBA5551(0, 0, 0, 0) << 16 | GPACK_RGBA5551(0, 0, 0, 0)); - -#if BORDER_HEIGHT != 0 - gDPFillRectangle(gDisplayListHead++, 0, 0, SCREEN_WIDTH - 1, BORDER_HEIGHT - 1); - gDPFillRectangle(gDisplayListHead++, 0, SCREEN_HEIGHT - BORDER_HEIGHT, SCREEN_WIDTH - 1, - SCREEN_HEIGHT - 1); -#endif -} - -void make_viewport_clip_rect(Vp *viewport) { - s16 vpUlx = (viewport->vp.vtrans[0] - viewport->vp.vscale[0]) / 4 + 1; - s16 vpPly = (viewport->vp.vtrans[1] - viewport->vp.vscale[1]) / 4 + 1; - s16 vpLrx = (viewport->vp.vtrans[0] + viewport->vp.vscale[0]) / 4 - 1; - s16 vpLry = (viewport->vp.vtrans[1] + viewport->vp.vscale[1]) / 4 - 1; - - gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, vpUlx, vpPly, vpLrx, vpLry); -} - -/** - * Loads the F3D microcodes. - * Refer to this function if you would like to load - * other microcodes (i.e. S2DEX). - */ -void create_task_structure(void) { - s32 entries = gDisplayListHead - gGfxPool->buffer; - - gGfxSPTask->msgqueue = &D_80339CB8; - gGfxSPTask->msg = (OSMesg) 2; - gGfxSPTask->task.t.type = M_GFXTASK; - gGfxSPTask->task.t.ucode_boot = rspF3DBootStart; - gGfxSPTask->task.t.ucode_boot_size = ((u8 *) rspF3DBootEnd - (u8 *) rspF3DBootStart); - gGfxSPTask->task.t.flags = 0; - gGfxSPTask->task.t.ucode = rspF3DStart; - gGfxSPTask->task.t.ucode_data = rspF3DDataStart; - gGfxSPTask->task.t.ucode_size = SP_UCODE_SIZE; // (this size is ignored) - gGfxSPTask->task.t.ucode_data_size = SP_UCODE_DATA_SIZE; - gGfxSPTask->task.t.dram_stack = (u64 *) gGfxSPTaskStack; - gGfxSPTask->task.t.dram_stack_size = SP_DRAM_STACK_SIZE8; - #ifdef VERSION_EU - // terrible hack - gGfxSPTask->task.t.output_buff = - (u64 *)((u8 *) gGfxSPTaskOutputBuffer - 0x670 + 0x280); - gGfxSPTask->task.t.output_buff_size = - (u64 *)((u8 *) gGfxSPTaskOutputBuffer+ 0x280 + 0x17790); - #else - gGfxSPTask->task.t.output_buff = gGfxSPTaskOutputBuffer; - gGfxSPTask->task.t.output_buff_size = - (u64 *)((u8 *) gGfxSPTaskOutputBuffer + sizeof(gGfxSPTaskOutputBuffer)); - #endif - gGfxSPTask->task.t.data_ptr = (u64 *) &gGfxPool->buffer; - gGfxSPTask->task.t.data_size = entries * sizeof(Gfx); - gGfxSPTask->task.t.yield_data_ptr = (u64 *) gGfxSPTaskYieldBuffer; - gGfxSPTask->task.t.yield_data_size = OS_YIELD_DATA_SIZE; -} - -/** Starts rendering the scene. */ -void init_render_image(void) { - move_segment_table_to_dmem(); - my_rdp_init(); - my_rsp_init(); - clear_z_buffer(); - display_frame_buffer(); -} - -/** Ends the master display list. */ -void end_master_display_list(void) { - draw_screen_borders(); - if (gShowProfiler) { - draw_profiler(); - } - - gDPFullSync(gDisplayListHead++); - gSPEndDisplayList(gDisplayListHead++); - - create_task_structure(); -} - -void draw_reset_bars(void) { - s32 sp24; - s32 sp20; - s32 fbNum; - u64 *sp18; - - if (gResetTimer != 0 && D_8032C648 < 15) { - if (sCurrFBNum == 0) { - fbNum = 2; - } else { - fbNum = sCurrFBNum - 1; - } - - sp18 = (u64 *) PHYSICAL_TO_VIRTUAL(gPhysicalFrameBuffers[fbNum]); - sp18 += D_8032C648++ * (SCREEN_WIDTH / 4); - - for (sp24 = 0; sp24 < ((SCREEN_HEIGHT / 16) + 1); sp24++) { - // Must be on one line to match -O2 - for (sp20 = 0; sp20 < (SCREEN_WIDTH / 4); sp20++) *sp18++ = 0; - sp18 += ((SCREEN_WIDTH / 4) * 14); - } - } - - osWritebackDCacheAll(); - osRecvMesg(&gGameVblankQueue, &D_80339BEC, OS_MESG_BLOCK); - osRecvMesg(&gGameVblankQueue, &D_80339BEC, OS_MESG_BLOCK); -} - -void rendering_init(void) { - gGfxPool = &gGfxPools[0]; - set_segment_base_addr(1, gGfxPool->buffer); - gGfxSPTask = &gGfxPool->spTask; - gDisplayListHead = gGfxPool->buffer; - gGfxPoolEnd = (u8 *) (gGfxPool->buffer + GFX_POOL_SIZE); - init_render_image(); - clear_frame_buffer(0); - end_master_display_list(); - send_display_list(&gGfxPool->spTask); - - frameBufferIndex++; - gGlobalTimer++; -} - -void config_gfx_pool(void) { - gGfxPool = &gGfxPools[gGlobalTimer % 2]; - set_segment_base_addr(1, gGfxPool->buffer); - gGfxSPTask = &gGfxPool->spTask; - gDisplayListHead = gGfxPool->buffer; - gGfxPoolEnd = (u8 *) (gGfxPool->buffer + GFX_POOL_SIZE); -} - -/** Handles vsync. */ -void display_and_vsync(void) { - profiler_log_thread5_time(BEFORE_DISPLAY_LISTS); - osRecvMesg(&D_80339CB8, &D_80339BEC, OS_MESG_BLOCK); - if (D_8032C6A0 != NULL) { - D_8032C6A0(); - D_8032C6A0 = NULL; - } - send_display_list(&gGfxPool->spTask); - profiler_log_thread5_time(AFTER_DISPLAY_LISTS); - osRecvMesg(&gGameVblankQueue, &D_80339BEC, OS_MESG_BLOCK); - osViSwapBuffer((void *) PHYSICAL_TO_VIRTUAL(gPhysicalFrameBuffers[sCurrFBNum])); - profiler_log_thread5_time(THREAD5_END); - osRecvMesg(&gGameVblankQueue, &D_80339BEC, OS_MESG_BLOCK); - if (++sCurrFBNum == 3) { - sCurrFBNum = 0; - } - if (++frameBufferIndex == 3) { - frameBufferIndex = 0; - } - gGlobalTimer++; -} diff --git a/src/game/display.h b/src/game/display.h deleted file mode 100644 index 7d55b2d2..00000000 --- a/src/game/display.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _DISPLAY_H -#define _DISPLAY_H - -#include "types.h" - -#define GFX_POOL_SIZE 6400 - -struct GfxPool { - Gfx buffer[GFX_POOL_SIZE]; - struct SPTask spTask; -}; - -extern u16 frameBufferIndex; -extern u32 gGlobalTimer; - -// extern ? my_rdp_init(?); -// extern ? my_rsp_init(?); -// extern ? clear_z_buffer(?); -// extern ? display_frame_buffer(?); -extern void clear_frame_buffer(s32); -extern void clear_viewport(Vp *, s32); -// extern ? draw_screen_borders(?); -void make_viewport_clip_rect(Vp *viewport); -extern void init_render_image(void); -extern void end_master_display_list(void); -extern void draw_reset_bars(void); -extern void rendering_init(void); -extern void config_gfx_pool(void); -extern void display_and_vsync(void); - -#endif /* _DISPLAY_H */ diff --git a/src/game/envfx_bubbles.c b/src/game/envfx_bubbles.c index 34eb7c02..477c0063 100644 --- a/src/game/envfx_bubbles.c +++ b/src/game/envfx_bubbles.c @@ -1,7 +1,7 @@ #include #include "sm64.h" -#include "display.h" +#include "game_init.h" #include "memory.h" #include "ingame_menu.h" #include "envfx_snow.h" @@ -64,7 +64,7 @@ s32 particle_is_laterally_close(s32 index, s32 x, s32 z, s32 distance) { * Used to position flower particles */ s32 random_flower_offset() { - s32 result = RandomFloat() * 2000.0f - 1000.0f; + s32 result = random_float() * 2000.0f - 1000.0f; if (result < 0) { result -= 1000; } else { @@ -95,7 +95,7 @@ void envfx_update_flower(Vec3s centerPos) { (gEnvFxBuffer + i)->yPos = find_floor_height_and_data((gEnvFxBuffer + i)->xPos, 10000.0f, (gEnvFxBuffer + i)->zPos, &floorGeo); (gEnvFxBuffer + i)->isAlive = 1; - (gEnvFxBuffer + i)->animFrame = RandomFloat() * 5.0f; + (gEnvFxBuffer + i)->animFrame = random_float() * 5.0f; } else if ((timer & 0x03) == 0) { (gEnvFxBuffer + i)->animFrame += 1; if ((gEnvFxBuffer + i)->animFrame > 5) { @@ -123,8 +123,8 @@ void envfx_set_lava_bubble_position(s32 index, Vec3s centerPos) { centerY = centerPos[1]; centerZ = centerPos[2]; - (gEnvFxBuffer + index)->xPos = RandomFloat() * 6000.0f - 3000.0f + centerX; - (gEnvFxBuffer + index)->zPos = RandomFloat() * 6000.0f - 3000.0f + centerZ; + (gEnvFxBuffer + index)->xPos = random_float() * 6000.0f - 3000.0f + centerX; + (gEnvFxBuffer + index)->zPos = random_float() * 6000.0f - 3000.0f + centerZ; if ((gEnvFxBuffer + index)->xPos > 8000) { (gEnvFxBuffer + index)->xPos = 16000 - (gEnvFxBuffer + index)->xPos; @@ -181,7 +181,7 @@ void envfx_update_lava(Vec3s centerPos) { } } - if ((chance = (s32)(RandomFloat() * 16.0f)) == 8) { + if ((chance = (s32)(random_float() * 16.0f)) == 8) { play_sound(SOUND_GENERAL_QUIET_BUBBLE2, gDefaultSoundArgs); } } @@ -236,8 +236,8 @@ void envfx_update_whirlpool(void) { for (i = 0; i < sBubbleParticleMaxCount; i++) { (gEnvFxBuffer + i)->isAlive = envfx_is_whirlpool_bubble_alive(i); if ((gEnvFxBuffer + i)->isAlive == 0) { - (gEnvFxBuffer + i)->angleAndDist[1] = RandomFloat() * 1000.0f; - (gEnvFxBuffer + i)->angleAndDist[0] = RandomFloat() * 65536.0f; + (gEnvFxBuffer + i)->angleAndDist[1] = random_float() * 1000.0f; + (gEnvFxBuffer + i)->angleAndDist[0] = random_float() * 65536.0f; (gEnvFxBuffer + i)->xPos = gEnvFxBubbleConfig[ENVFX_STATE_SRC_X] + sins((gEnvFxBuffer + i)->angleAndDist[0]) * (gEnvFxBuffer + i)->angleAndDist[1]; @@ -245,7 +245,7 @@ void envfx_update_whirlpool(void) { gEnvFxBubbleConfig[ENVFX_STATE_SRC_Z] + coss((gEnvFxBuffer + i)->angleAndDist[0]) * (gEnvFxBuffer + i)->angleAndDist[1]; (gEnvFxBuffer + i)->bubbleY = - gEnvFxBubbleConfig[ENVFX_STATE_SRC_Y] + (RandomFloat() * 100.0f - 50.0f); + gEnvFxBubbleConfig[ENVFX_STATE_SRC_Y] + (random_float() * 100.0f - 50.0f); (gEnvFxBuffer + i)->yPos = (i + gEnvFxBuffer)->bubbleY; (gEnvFxBuffer + i)->unusedBubbleVar = 0; (gEnvFxBuffer + i)->isAlive = 1; @@ -297,8 +297,8 @@ void envfx_update_jetstream(void) { for (i = 0; i < sBubbleParticleMaxCount; i++) { (gEnvFxBuffer + i)->isAlive = envfx_is_jestream_bubble_alive(i); if ((gEnvFxBuffer + i)->isAlive == 0) { - (gEnvFxBuffer + i)->angleAndDist[1] = RandomFloat() * 300.0f; - (gEnvFxBuffer + i)->angleAndDist[0] = RandomU16(); + (gEnvFxBuffer + i)->angleAndDist[1] = random_float() * 300.0f; + (gEnvFxBuffer + i)->angleAndDist[0] = random_u16(); (gEnvFxBuffer + i)->xPos = gEnvFxBubbleConfig[ENVFX_STATE_SRC_X] + sins((gEnvFxBuffer + i)->angleAndDist[0]) * (gEnvFxBuffer + i)->angleAndDist[1]; @@ -306,7 +306,7 @@ void envfx_update_jetstream(void) { gEnvFxBubbleConfig[ENVFX_STATE_SRC_Z] + coss((gEnvFxBuffer + i)->angleAndDist[0]) * (gEnvFxBuffer + i)->angleAndDist[1]; (gEnvFxBuffer + i)->yPos = - gEnvFxBubbleConfig[ENVFX_STATE_SRC_Y] + (RandomFloat() * 400.0f - 200.0f); + gEnvFxBubbleConfig[ENVFX_STATE_SRC_Y] + (random_float() * 400.0f - 200.0f); } else { (gEnvFxBuffer + i)->angleAndDist[1] += 10; (gEnvFxBuffer + i)->xPos += sins((gEnvFxBuffer + i)->angleAndDist[0]) * 10.0f; @@ -361,7 +361,7 @@ s32 envfx_init_bubble(s32 mode) { } for (i = 0; i < sBubbleParticleCount; i++) { - (gEnvFxBuffer + i)->animFrame = RandomFloat() * 7.0f; + (gEnvFxBuffer + i)->animFrame = random_float() * 7.0f; } if (0) { diff --git a/src/game/envfx_snow.c b/src/game/envfx_snow.c index 8d7ec2ed..ea2dfc4c 100644 --- a/src/game/envfx_snow.c +++ b/src/game/envfx_snow.c @@ -1,7 +1,7 @@ #include #include "sm64.h" -#include "display.h" +#include "game_init.h" #include "memory.h" #include "ingame_menu.h" #include "envfx_snow.h" @@ -212,15 +212,15 @@ void envfx_update_snow_normal(s32 snowCylinderX, s32 snowCylinderY, s32 snowCyli envfx_is_snowflake_alive(i, snowCylinderX, snowCylinderY, snowCylinderZ); if ((gEnvFxBuffer + i)->isAlive == 0) { (gEnvFxBuffer + i)->xPos = - 400.0f * RandomFloat() - 200.0f + snowCylinderX + (s16)(deltaX * 2); + 400.0f * random_float() - 200.0f + snowCylinderX + (s16)(deltaX * 2); (gEnvFxBuffer + i)->zPos = - 400.0f * RandomFloat() - 200.0f + snowCylinderZ + (s16)(deltaZ * 2); - (gEnvFxBuffer + i)->yPos = 200.0f * RandomFloat() + snowCylinderY; + 400.0f * random_float() - 200.0f + snowCylinderZ + (s16)(deltaZ * 2); + (gEnvFxBuffer + i)->yPos = 200.0f * random_float() + snowCylinderY; (gEnvFxBuffer + i)->isAlive = 1; } else { - (gEnvFxBuffer + i)->xPos += RandomFloat() * 2 - 1.0f + (s16)(deltaX / 1.2); + (gEnvFxBuffer + i)->xPos += random_float() * 2 - 1.0f + (s16)(deltaX / 1.2); (gEnvFxBuffer + i)->yPos -= 2 -(s16)(deltaY * 0.8); - (gEnvFxBuffer + i)->zPos += RandomFloat() * 2 - 1.0f + (s16)(deltaZ / 1.2); + (gEnvFxBuffer + i)->zPos += random_float() * 2 - 1.0f + (s16)(deltaZ / 1.2); } } @@ -246,15 +246,15 @@ void envfx_update_snow_blizzard(s32 snowCylinderX, s32 snowCylinderY, s32 snowCy envfx_is_snowflake_alive(i, snowCylinderX, snowCylinderY, snowCylinderZ); if ((gEnvFxBuffer + i)->isAlive == 0) { (gEnvFxBuffer + i)->xPos = - 400.0f * RandomFloat() - 200.0f + snowCylinderX + (s16)(deltaX * 2); + 400.0f * random_float() - 200.0f + snowCylinderX + (s16)(deltaX * 2); (gEnvFxBuffer + i)->zPos = - 400.0f * RandomFloat() - 200.0f + snowCylinderZ + (s16)(deltaZ * 2); - (gEnvFxBuffer + i)->yPos = 400.0f * RandomFloat() - 200.0f + snowCylinderY; + 400.0f * random_float() - 200.0f + snowCylinderZ + (s16)(deltaZ * 2); + (gEnvFxBuffer + i)->yPos = 400.0f * random_float() - 200.0f + snowCylinderY; (gEnvFxBuffer + i)->isAlive = 1; } else { - (gEnvFxBuffer + i)->xPos += RandomFloat() * 2 - 1.0f + (s16)(deltaX / 1.2) + 20.0f; + (gEnvFxBuffer + i)->xPos += random_float() * 2 - 1.0f + (s16)(deltaX / 1.2) + 20.0f; (gEnvFxBuffer + i)->yPos -= 5 -(s16)(deltaY * 0.8); - (gEnvFxBuffer + i)->zPos += RandomFloat() * 2 - 1.0f + (s16)(deltaZ / 1.2); + (gEnvFxBuffer + i)->zPos += random_float() * 2 - 1.0f + (s16)(deltaZ / 1.2); } } @@ -290,9 +290,9 @@ void envfx_update_snow_water(s32 snowCylinderX, s32 snowCylinderY, s32 snowCylin (gEnvFxBuffer + i)->isAlive = envfx_is_snowflake_alive(i, snowCylinderX, snowCylinderY, snowCylinderZ); if ((gEnvFxBuffer + i)->isAlive == 0) { - (gEnvFxBuffer + i)->xPos = 400.0f * RandomFloat() - 200.0f + snowCylinderX; - (gEnvFxBuffer + i)->zPos = 400.0f * RandomFloat() - 200.0f + snowCylinderZ; - (gEnvFxBuffer + i)->yPos = 400.0f * RandomFloat() - 200.0f + snowCylinderY; + (gEnvFxBuffer + i)->xPos = 400.0f * random_float() - 200.0f + snowCylinderX; + (gEnvFxBuffer + i)->zPos = 400.0f * random_float() - 200.0f + snowCylinderZ; + (gEnvFxBuffer + i)->yPos = 400.0f * random_float() - 200.0f + snowCylinderY; (gEnvFxBuffer + i)->isAlive = 1; } } diff --git a/src/game/game.c b/src/game/game_init.c similarity index 55% rename from src/game/game.c rename to src/game/game_init.c index ca9af904..d5e5eb37 100644 --- a/src/game/game.c +++ b/src/game/game_init.c @@ -2,21 +2,23 @@ #include "sm64.h" #include "audio/external.h" +#include "buffers/buffers.h" +#include "buffers/gfx_output_buffer.h" #include "buffers/framebuffers.h" #include "buffers/zbuffer.h" #include "engine/level_script.h" +#include "game_init.h" #include "main.h" #include "memory.h" +#include "profiler.h" #include "save_file.h" #include "seq_ids.h" #include "sound_init.h" -#include "display.h" -#include "profiler.h" #include "print.h" #include "segment2.h" #include "main_entry.h" +#include "thread6.h" #include -#include "game.h" // FIXME: I'm not sure all of these variables belong in this file, but I don't // know of a good way to split them @@ -42,6 +44,11 @@ struct MarioAnimation D_80339D10; struct MarioAnimation gDemo; UNUSED u8 filler80339D30[0x90]; +int unused8032C690 = 0; +u32 gGlobalTimer = 0; + +static u16 sCurrFBNum = 0; +u16 frameBufferIndex = 0; void (*D_8032C6A0)(void) = NULL; struct Controller *gPlayer1Controller = &gControllers[0]; struct Controller *gPlayer2Controller = &gControllers[1]; @@ -51,6 +58,282 @@ struct DemoInput *gCurrDemoInput = NULL; // demo input sequence u16 gDemoInputListID = 0; struct DemoInput gRecordedDemoInput = { 0 }; // possibly removed in EU. TODO: Check +/** + * Initializes the Reality Display Processor (RDP). + * This function initializes settings such as texture filtering mode, + * scissoring, and render mode (although keep in mind that this render + * mode is not used in-game, where it is set in render_graph_node.c). + */ +void my_rdp_init(void) { + gDPPipeSync(gDisplayListHead++); + gDPPipelineMode(gDisplayListHead++, G_PM_1PRIMITIVE); + + gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE); + + gDPSetTextureLOD(gDisplayListHead++, G_TL_TILE); + gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE); + gDPSetTextureDetail(gDisplayListHead++, G_TD_CLAMP); + gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP); + gDPSetTextureFilter(gDisplayListHead++, G_TF_BILERP); + gDPSetTextureConvert(gDisplayListHead++, G_TC_FILT); + + gDPSetCombineKey(gDisplayListHead++, G_CK_NONE); + gDPSetAlphaCompare(gDisplayListHead++, G_AC_NONE); + gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2); + gDPSetColorDither(gDisplayListHead++, G_CD_MAGICSQ); + gDPSetCycleType(gDisplayListHead++, G_CYC_FILL); + +#ifdef VERSION_SH + gDPSetAlphaDither(gDisplayListHead++, G_AD_PATTERN); +#endif + gDPPipeSync(gDisplayListHead++); +} + +/** + * Initializes the RSP's built-in geometry and lighting engines. + * Most of these (with the notable exception of gSPNumLights), are + * almost immediately overwritten. + */ +void my_rsp_init(void) { + gSPClearGeometryMode(gDisplayListHead++, G_SHADE | G_SHADING_SMOOTH | G_CULL_BOTH | G_FOG + | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD); + + gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_SHADING_SMOOTH | G_CULL_BACK | G_LIGHTING); + + gSPNumLights(gDisplayListHead++, NUMLIGHTS_1); + gSPTexture(gDisplayListHead++, 0, 0, 0, G_TX_RENDERTILE, G_OFF); + + // @bug Nintendo did not explicitly define the clipping ratio. + // For Fast3DEX2, this causes the dreaded warped vertices issue + // unless the clipping ratio is changed back to the intended value, + // as Fast3DEX2 uses a different initial value than Fast3D(EX). +#ifdef F3DEX_GBI_2 + gSPClipRatio(gDisplayListHead++, FRUSTRATIO_1); +#endif +} + +/** Clear the Z buffer. */ +void clear_z_buffer(void) { + gDPPipeSync(gDisplayListHead++); + + gDPSetDepthSource(gDisplayListHead++, G_ZS_PIXEL); + gDPSetDepthImage(gDisplayListHead++, gPhysicalZBuffer); + + gDPSetColorImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, gPhysicalZBuffer); + gDPSetFillColor(gDisplayListHead++, + GPACK_ZDZ(G_MAXFBZ, 0) << 16 | GPACK_ZDZ(G_MAXFBZ, 0)); + + gDPFillRectangle(gDisplayListHead++, 0, BORDER_HEIGHT, SCREEN_WIDTH - 1, + SCREEN_HEIGHT - 1 - BORDER_HEIGHT); +} + +/** Sets up the final framebuffer image. */ +void display_frame_buffer(void) { + gDPPipeSync(gDisplayListHead++); + + gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE); + gDPSetColorImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, + gPhysicalFrameBuffers[frameBufferIndex]); + gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, BORDER_HEIGHT, SCREEN_WIDTH, + SCREEN_HEIGHT - BORDER_HEIGHT); +} + +/** Clears the framebuffer, allowing it to be overwritten. */ +void clear_frame_buffer(s32 a) { + gDPPipeSync(gDisplayListHead++); + + gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2); + gDPSetCycleType(gDisplayListHead++, G_CYC_FILL); + + gDPSetFillColor(gDisplayListHead++, a); + gDPFillRectangle(gDisplayListHead++, 0, BORDER_HEIGHT, SCREEN_WIDTH - 1, + SCREEN_HEIGHT - 1 - BORDER_HEIGHT); + + gDPPipeSync(gDisplayListHead++); + + gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE); +} + +/** Clears and initializes the viewport. */ +void clear_viewport(Vp *viewport, s32 b) { + s16 vpUlx = (viewport->vp.vtrans[0] - viewport->vp.vscale[0]) / 4 + 1; + s16 vpUly = (viewport->vp.vtrans[1] - viewport->vp.vscale[1]) / 4 + 1; + s16 VpLrx = (viewport->vp.vtrans[0] + viewport->vp.vscale[0]) / 4 - 2; + s16 vpLry = (viewport->vp.vtrans[1] + viewport->vp.vscale[1]) / 4 - 2; + + gDPPipeSync(gDisplayListHead++); + + gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2); + gDPSetCycleType(gDisplayListHead++, G_CYC_FILL); + + gDPSetFillColor(gDisplayListHead++, b); + gDPFillRectangle(gDisplayListHead++, vpUlx, vpUly, VpLrx, vpLry); + + gDPPipeSync(gDisplayListHead++); + + gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE); +} + +/** Draws the horizontal screen borders */ +void draw_screen_borders(void) { + gDPPipeSync(gDisplayListHead++); + + gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2); + gDPSetCycleType(gDisplayListHead++, G_CYC_FILL); + + gDPSetFillColor(gDisplayListHead++, GPACK_RGBA5551(0, 0, 0, 0) << 16 | GPACK_RGBA5551(0, 0, 0, 0)); + +#if BORDER_HEIGHT != 0 + gDPFillRectangle(gDisplayListHead++, 0, 0, SCREEN_WIDTH - 1, BORDER_HEIGHT - 1); + gDPFillRectangle(gDisplayListHead++, 0, SCREEN_HEIGHT - BORDER_HEIGHT, SCREEN_WIDTH - 1, + SCREEN_HEIGHT - 1); +#endif +} + +void make_viewport_clip_rect(Vp *viewport) { + s16 vpUlx = (viewport->vp.vtrans[0] - viewport->vp.vscale[0]) / 4 + 1; + s16 vpPly = (viewport->vp.vtrans[1] - viewport->vp.vscale[1]) / 4 + 1; + s16 vpLrx = (viewport->vp.vtrans[0] + viewport->vp.vscale[0]) / 4 - 1; + s16 vpLry = (viewport->vp.vtrans[1] + viewport->vp.vscale[1]) / 4 - 1; + + gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, vpUlx, vpPly, vpLrx, vpLry); +} + +/** + * Loads the F3D microcodes. + * Refer to this function if you would like to load + * other microcodes (i.e. S2DEX). + */ +void create_task_structure(void) { + s32 entries = gDisplayListHead - gGfxPool->buffer; + + gGfxSPTask->msgqueue = &D_80339CB8; + gGfxSPTask->msg = (OSMesg) 2; + gGfxSPTask->task.t.type = M_GFXTASK; + gGfxSPTask->task.t.ucode_boot = rspF3DBootStart; + gGfxSPTask->task.t.ucode_boot_size = ((u8 *) rspF3DBootEnd - (u8 *) rspF3DBootStart); + gGfxSPTask->task.t.flags = 0; + gGfxSPTask->task.t.ucode = rspF3DStart; + gGfxSPTask->task.t.ucode_data = rspF3DDataStart; + gGfxSPTask->task.t.ucode_size = SP_UCODE_SIZE; // (this size is ignored) + gGfxSPTask->task.t.ucode_data_size = SP_UCODE_DATA_SIZE; + gGfxSPTask->task.t.dram_stack = (u64 *) gGfxSPTaskStack; + gGfxSPTask->task.t.dram_stack_size = SP_DRAM_STACK_SIZE8; + #ifdef VERSION_EU + // terrible hack + gGfxSPTask->task.t.output_buff = + (u64 *)((u8 *) gGfxSPTaskOutputBuffer - 0x670 + 0x280); + gGfxSPTask->task.t.output_buff_size = + (u64 *)((u8 *) gGfxSPTaskOutputBuffer+ 0x280 + 0x17790); + #else + gGfxSPTask->task.t.output_buff = gGfxSPTaskOutputBuffer; + gGfxSPTask->task.t.output_buff_size = + (u64 *)((u8 *) gGfxSPTaskOutputBuffer + sizeof(gGfxSPTaskOutputBuffer)); + #endif + gGfxSPTask->task.t.data_ptr = (u64 *) &gGfxPool->buffer; + gGfxSPTask->task.t.data_size = entries * sizeof(Gfx); + gGfxSPTask->task.t.yield_data_ptr = (u64 *) gGfxSPTaskYieldBuffer; + gGfxSPTask->task.t.yield_data_size = OS_YIELD_DATA_SIZE; +} + +/** Starts rendering the scene. */ +void init_render_image(void) { + move_segment_table_to_dmem(); + my_rdp_init(); + my_rsp_init(); + clear_z_buffer(); + display_frame_buffer(); +} + +/** Ends the master display list. */ +void end_master_display_list(void) { + draw_screen_borders(); + if (gShowProfiler) { + draw_profiler(); + } + + gDPFullSync(gDisplayListHead++); + gSPEndDisplayList(gDisplayListHead++); + + create_task_structure(); +} + +void draw_reset_bars(void) { + s32 sp24; + s32 sp20; + s32 fbNum; + u64 *sp18; + + if (gResetTimer != 0 && D_8032C648 < 15) { + if (sCurrFBNum == 0) { + fbNum = 2; + } else { + fbNum = sCurrFBNum - 1; + } + + sp18 = (u64 *) PHYSICAL_TO_VIRTUAL(gPhysicalFrameBuffers[fbNum]); + sp18 += D_8032C648++ * (SCREEN_WIDTH / 4); + + for (sp24 = 0; sp24 < ((SCREEN_HEIGHT / 16) + 1); sp24++) { + // Must be on one line to match -O2 + for (sp20 = 0; sp20 < (SCREEN_WIDTH / 4); sp20++) *sp18++ = 0; + sp18 += ((SCREEN_WIDTH / 4) * 14); + } + } + + osWritebackDCacheAll(); + osRecvMesg(&gGameVblankQueue, &D_80339BEC, OS_MESG_BLOCK); + osRecvMesg(&gGameVblankQueue, &D_80339BEC, OS_MESG_BLOCK); +} + +void rendering_init(void) { + gGfxPool = &gGfxPools[0]; + set_segment_base_addr(1, gGfxPool->buffer); + gGfxSPTask = &gGfxPool->spTask; + gDisplayListHead = gGfxPool->buffer; + gGfxPoolEnd = (u8 *) (gGfxPool->buffer + GFX_POOL_SIZE); + init_render_image(); + clear_frame_buffer(0); + end_master_display_list(); + send_display_list(&gGfxPool->spTask); + + frameBufferIndex++; + gGlobalTimer++; +} + +void config_gfx_pool(void) { + gGfxPool = &gGfxPools[gGlobalTimer % 2]; + set_segment_base_addr(1, gGfxPool->buffer); + gGfxSPTask = &gGfxPool->spTask; + gDisplayListHead = gGfxPool->buffer; + gGfxPoolEnd = (u8 *) (gGfxPool->buffer + GFX_POOL_SIZE); +} + +/** Handles vsync. */ +void display_and_vsync(void) { + profiler_log_thread5_time(BEFORE_DISPLAY_LISTS); + osRecvMesg(&D_80339CB8, &D_80339BEC, OS_MESG_BLOCK); + if (D_8032C6A0 != NULL) { + D_8032C6A0(); + D_8032C6A0 = NULL; + } + send_display_list(&gGfxPool->spTask); + profiler_log_thread5_time(AFTER_DISPLAY_LISTS); + osRecvMesg(&gGameVblankQueue, &D_80339BEC, OS_MESG_BLOCK); + osViSwapBuffer((void *) PHYSICAL_TO_VIRTUAL(gPhysicalFrameBuffers[sCurrFBNum])); + profiler_log_thread5_time(THREAD5_END); + osRecvMesg(&gGameVblankQueue, &D_80339BEC, OS_MESG_BLOCK); + if (++sCurrFBNum == 3) { + sCurrFBNum = 0; + } + if (++frameBufferIndex == 3) { + frameBufferIndex = 0; + } + gGlobalTimer++; +} + // this function records distinct inputs over a 255-frame interval to RAM locations and was likely // used to record the demo sequences seen in the final game. This function is unused. static void record_demo(void) { @@ -197,6 +480,9 @@ void read_controller_inputs(void) { if (gControllerBits) { osRecvMesg(&gSIEventMesgQueue, &D_80339BEC, OS_MESG_BLOCK); osContGetReadData(&gControllerPads[0]); +#ifdef VERSION_SH + release_rumble_pak_control(); +#endif } run_demo_inputs(); @@ -263,6 +549,9 @@ void init_controllers(void) { // into any port in order to play the game. this was probably // so if any of the ports didnt work, you can have controllers // plugged into any of them and it will work. +#ifdef VERSION_SH + gControllers[cont].port = port; +#endif gControllers[cont].statusData = &gControllerStatuses[port]; gControllers[cont++].controllerData = &gControllerPads[port]; } @@ -295,7 +584,13 @@ void thread5_game_loop(UNUSED void *arg) { struct LevelCommand *addr; setup_game_memory(); +#ifdef VERSION_SH + init_rumble_pak_scheduler_queue(); +#endif init_controllers(); +#ifdef VERSION_SH + create_thread_6(); +#endif save_file_load_all(); set_vblank_handler(2, &gGameVblankHandler, &gGameVblankQueue, (OSMesg) 1); @@ -303,7 +598,7 @@ void thread5_game_loop(UNUSED void *arg) { // point addr to the entry point into the level script data. addr = segmented_to_virtual(level_script_entry); - play_music(2, SEQUENCE_ARGS(0, SEQ_SOUND_PLAYER), 0); + play_music(SEQ_PLAYER_SFX, SEQUENCE_ARGS(0, SEQ_SOUND_PLAYER), 0); set_sound_mode(save_file_get_sound_mode()); rendering_init(); @@ -318,6 +613,9 @@ void thread5_game_loop(UNUSED void *arg) { // if any controllers are plugged in, start read the data for when // read_controller_inputs is called later. if (gControllerBits) { +#ifdef VERSION_SH + block_until_rumble_pak_free(); +#endif osContStartReadData(&gSIEventMesgQueue); } diff --git a/src/game/game.h b/src/game/game_init.h similarity index 68% rename from src/game/game.h rename to src/game/game_init.h index 07ad3020..68db7426 100644 --- a/src/game/game.h +++ b/src/game/game_init.h @@ -1,5 +1,5 @@ -#ifndef _GAME_H_ -#define _GAME_H_ +#ifndef _GAME_INIT_H_ +#define _GAME_INIT_H_ #include "memory.h" @@ -51,4 +51,29 @@ extern struct MarioAnimation gDemo; extern u8 gMarioAnims[]; extern u8 gDemoInputs[]; +#define GFX_POOL_SIZE 6400 + +struct GfxPool { + Gfx buffer[GFX_POOL_SIZE]; + struct SPTask spTask; +}; + +extern u16 frameBufferIndex; +extern u32 gGlobalTimer; + +// extern ? my_rdp_init(?); +// extern ? my_rsp_init(?); +// extern ? clear_z_buffer(?); +// extern ? display_frame_buffer(?); +extern void clear_frame_buffer(s32); +extern void clear_viewport(Vp *, s32); +// extern ? draw_screen_borders(?); +void make_viewport_clip_rect(Vp *viewport); +extern void init_render_image(void); +extern void end_master_display_list(void); +extern void draw_reset_bars(void); +extern void rendering_init(void); +extern void config_gfx_pool(void); +extern void display_and_vsync(void); + #endif diff --git a/src/game/hud.c b/src/game/hud.c index 7ab1977a..2c4441d3 100644 --- a/src/game/hud.c +++ b/src/game/hud.c @@ -1,8 +1,7 @@ #include #include "sm64.h" -#include "display.h" -#include "game.h" +#include "game_init.h" #include "level_update.h" #include "camera.h" #include "print.h" @@ -26,7 +25,7 @@ struct PowerMeterHUD { f32 unused; }; -struct UnusedStruct803314F0 { +struct UnusedHUDStruct { u32 unused1; u16 unused2; u16 unused3; @@ -52,7 +51,7 @@ static struct PowerMeterHUD sPowerMeterHUD = { // when the power meter is hidden. s32 sPowerMeterVisibleTimer = 0; -static struct UnusedStruct803314F0 unused803314F0 = { 0x00000000, 0x000A, 0x0000 }; +static struct UnusedHUDStruct sUnusedHUDValues = { 0x00, 0x0A, 0x00 }; static struct CameraHUD sCameraHUD = { CAM_STATUS_NONE }; @@ -209,7 +208,7 @@ void handle_power_meter_actions(s16 numHealthWedges) { // Update to match health value sPowerMeterStoredHealth = numHealthWedges; - // If mario is swimming, keep showing power meter + // If Mario is swimming, keep power meter visible if (gPlayerCameraState->action & ACT_FLAG_SWIMMING) { if (sPowerMeterHUD.animation == POWER_METER_HIDDEN || sPowerMeterHUD.animation == POWER_METER_EMPHASIZED) { @@ -431,16 +430,16 @@ void render_hud(void) { } else { #ifdef VERSION_EU // basically create_dl_ortho_matrix but guOrtho screen width is different + mtx = alloc_display_list(sizeof(*mtx)); if (mtx == NULL) { return; } create_dl_identity_matrix(); - guOrtho(mtx, -16.0f, 336.0f, 0, 240.0f, -10.0f, 10.0f, 1.0f); - gMoveWd(gDisplayListHead++, 0xE, 0, 0xFFFF); - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(mtx), + guOrtho(mtx, -16.0f, SCREEN_WIDTH + 16, 0, SCREEN_HEIGHT, -10.0f, 10.0f, 1.0f); + gSPPerspNormalize(gDisplayListHead++, 0xFFFF); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(mtx), G_MTX_PROJECTION | G_MTX_MUL | G_MTX_NOPUSH); - #else create_dl_ortho_matrix(); #endif diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index c55d9d74..00db0618 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -6,7 +6,7 @@ #include "audio/external.h" #include "seq_ids.h" #include "dialog_ids.h" -#include "game.h" +#include "game_init.h" #include "save_file.h" #include "level_update.h" #include "camera.h" @@ -17,9 +17,9 @@ #include "ingame_menu.h" #include "print.h" #include "engine/math_util.h" +#include "course_table.h" extern Gfx *gDisplayListHead; -extern s32 gGlobalTimer; extern s16 gCurrCourseNum; extern s16 gCurrSaveFileNum; @@ -69,7 +69,7 @@ enum DialogMark { DIALOG_MARK_NONE = 0, DIALOG_MARK_DAKUTEN = 1, DIALOG_MARK_HAN #define DEFAULT_DIALOG_BOX_ANGLE 90.0f #define DEFAULT_DIALOG_BOX_SCALE 19.0f -#ifndef VERSION_JP +#if !defined(VERSION_JP) && !defined(VERSION_SH) u8 gDialogCharWidths[256] = { // TODO: Is there a way to auto generate this? 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 5, 8, 8, 6, 6, 6, 6, 6, 5, 6, 6, @@ -131,6 +131,7 @@ void create_dl_identity_matrix(void) { matrix->m[0][1] = 0x00000000; matrix->m[1][1] = 0x00010000; matrix->m[2][1] = 0x00000000; matrix->m[3][1] = 0x00000000; matrix->m[0][2] = 0x00000001; matrix->m[1][2] = 0x00000000; matrix->m[2][2] = 0x00000000; matrix->m[3][2] = 0x00000000; matrix->m[0][3] = 0x00000000; matrix->m[1][3] = 0x00000001; matrix->m[2][3] = 0x00000000; matrix->m[3][3] = 0x00000000; + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(matrix), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(matrix), G_MTX_PROJECTION | G_MTX_LOAD | G_MTX_NOPUSH); } @@ -195,7 +196,7 @@ void create_dl_ortho_matrix(void) { guOrtho(matrix, 0.0f, SCREEN_WIDTH, 0.0f, SCREEN_HEIGHT, -10.0f, 10.0f, 1.0f); // Should produce G_RDPHALF_1 in Fast3D - gSPPerspNormalize((Gfx *) (gDisplayListHead++), 0xFFFF); + gSPPerspNormalize(gDisplayListHead++, 0xFFFF); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(matrix), G_MTX_PROJECTION | G_MTX_MUL | G_MTX_NOPUSH) } @@ -204,10 +205,9 @@ static u8 *alloc_ia8_text_from_i1(u16 *in, s16 width, s16 height) { s32 inPos; u16 bitMask; u8 *out; - s16 outPos; + s16 outPos = 0; - outPos = 0; - out = alloc_display_list(width * height); + out = alloc_display_list((u32) width * (u32) height); if (out == NULL) { return NULL; @@ -234,14 +234,14 @@ static u8 *alloc_ia8_text_from_i1(u16 *in, s16 width, s16 height) { void render_generic_char(u8 c) { void **fontLUT; void *packedTexture; -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) void *unpackedTexture; #endif fontLUT = segmented_to_virtual(main_font_lut); packedTexture = segmented_to_virtual(fontLUT[c]); -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) unpackedTexture = alloc_ia8_text_from_i1(packedTexture, 8, 16); gDPPipeSync(gDisplayListHead++); @@ -255,7 +255,7 @@ void render_generic_char(u8 c) { gSPDisplayList(gDisplayListHead++, dl_ia_text_tex_settings); #ifdef VERSION_EU gSPTextureRectangleFlip(gDisplayListHead++, gDialogX << 2, (gDialogY - 16) << 2, - (gDialogX + 8) << 2, gDialogY << 2, G_TX_RENDERTILE, 16 << 5, 8 << 5, 1 << 10, 1 << 10); + (gDialogX + 8) << 2, gDialogY << 2, G_TX_RENDERTILE, 8 << 6, 4 << 6, 1 << 10, 1 << 10); #endif } @@ -301,7 +301,7 @@ void render_generic_char_at_pos(s16 xPos, s16 yPos, u8 c) { gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, VIRTUAL_TO_PHYSICAL(unpackedTexture)); gSPDisplayList(gDisplayListHead++, dl_ia_text_tex_settings); gSPTextureRectangleFlip(gDisplayListHead++, xPos << 2, (yPos - 16) << 2, (xPos + 8) << 2, yPos << 2, - G_TX_RENDERTILE, 16 << 5, 8 << 5, 1 << 10, 1 << 10); + G_TX_RENDERTILE, 8 << 6, 4 << 6, 1 << 10, 1 << 10); } void render_lowercase_diacritic(s16 *xPos, s16 *yPos, u8 letter, u8 diacritic) { @@ -473,7 +473,7 @@ void print_generic_string(s16 x, s16 y, const u8 *str) { #endif #ifndef VERSION_EU case DIALOG_CHAR_SPACE: -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) create_dl_translation_matrix(MENU_MTX_NOPUSH, 5.0f, 0.0f, 0.0f); break; #else @@ -495,7 +495,7 @@ void print_generic_string(s16 x, s16 y, const u8 *str) { mark = DIALOG_MARK_NONE; } -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) create_dl_translation_matrix(MENU_MTX_NOPUSH, 10.0f, 0.0f, 0.0f); #else create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[str[strPos]]), 0.0f, 0.0f); @@ -542,10 +542,10 @@ void print_hud_lut_string(s8 hudLUT, s16 x, s16 y, const u8 *str) { if (hudLUT == HUD_LUT_JPMENU) { xStride = 16; } else { // HUD_LUT_GLOBAL -#ifdef VERSION_JP +#if defined(VERSION_JP) xStride = 14; #else - xStride = 12; + xStride = 12; //? Shindou uses this. #endif } @@ -569,7 +569,7 @@ void print_hud_lut_string(s8 hudLUT, s16 x, s16 y, const u8 *str) { break; default: #endif -#ifdef VERSION_US +#if defined(VERSION_US) || defined(VERSION_SH) if (str[strPos] == GLOBAL_CHAR_SPACE) { if (0) //! dead code { @@ -595,7 +595,7 @@ void print_hud_lut_string(s8 hudLUT, s16 x, s16 y, const u8 *str) { break; } #endif -#ifdef VERSION_US +#if defined(VERSION_US) || defined(VERSION_SH) } #endif strPos++; @@ -669,7 +669,7 @@ void print_menu_generic_string(s16 x, s16 y, const u8 *str) { mark = DIALOG_MARK_NONE; } #endif -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) curX += 9; #else curX += gDialogCharWidths[str[strPos]]; @@ -803,7 +803,7 @@ s16 get_str_x_pos_from_center_scale(s16 centerPos, u8 *str, f32 scale) { } #endif -#ifndef VERSION_JP +#if !defined(VERSION_JP) && !defined(VERSION_SH) s16 get_string_width(u8 *str) { s16 strPos = 0; s16 width = 0; @@ -933,7 +933,7 @@ void reset_dialog_render_state(void) { gDialogResponse = 0; } -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) #define X_VAL1 -5.0f #define Y_VAL1 2.0 #define Y_VAL2 4.0f @@ -1025,11 +1025,11 @@ void render_generic_dialog_char_at_pos(struct DialogEntry *dialog, s16 x, s16 y, gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, VIRTUAL_TO_PHYSICAL(unpackedTexture)); gSPDisplayList(gDisplayListHead++, dl_ia_text_tex_settings); gSPTextureRectangleFlip(gDisplayListHead++, xCoord << 2, (yCoord - height) << 2, - (xCoord + width) << 2, yCoord << 2, G_TX_RENDERTILE, 16 << 5, 8 << 5, 1 << 10, 1 << 10); + (xCoord + width) << 2, yCoord << 2, G_TX_RENDERTILE, 8 << 6, 4 << 6, 1 << 10, 1 << 10); } #endif -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) #define X_VAL3 5.0f #define Y_VAL3 20 #else @@ -1087,7 +1087,7 @@ void render_star_count_dialog_text(s8 *xMatrix, s16 *linePos) s8 onesDigit = gDialogVariable - (tensDigit * 10); // remainder if (tensDigit != 0) { -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) create_dl_translation_matrix(MENU_MTX_NOPUSH, xMatrix[0] * 10, 0, 0); render_generic_char(tensDigit); #elif defined(VERSION_EU) @@ -1107,7 +1107,7 @@ void render_star_count_dialog_text(s8 *xMatrix, s16 *linePos) } #ifndef VERSION_EU else { -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) xMatrix[0]++; #endif } @@ -1119,7 +1119,7 @@ void render_star_count_dialog_text(s8 *xMatrix, s16 *linePos) linePos[0] = 1; #else -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) create_dl_translation_matrix(MENU_MTX_NOPUSH, xMatrix[0] * 10, 0, 0); render_generic_char(onesDigit); #else @@ -1326,11 +1326,11 @@ void handle_dialog_text_and_pages(s8 colorMode, struct DialogEntry *dialog, s8 l #ifdef VERSION_EU gDialogX += gDialogCharWidths[DIALOG_CHAR_SPACE]; #else -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) if (linePos != 0) { #endif xMatrix++; -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) } #endif linePos++; @@ -1416,7 +1416,7 @@ void handle_dialog_text_and_pages(s8 colorMode, struct DialogEntry *dialog, s8 l #endif } -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) if (linePos == 12) { if (str[strIdx + 1] == DIALOG_CHAR_PERIOD) { adjust_pos_and_print_period_char(&xMatrix, &linePos); @@ -1459,7 +1459,7 @@ void handle_dialog_text_and_pages(s8 colorMode, struct DialogEntry *dialog, s8 l gLastDialogLineNum = lineNum; } -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) #define X_VAL4_1 50 #define X_VAL4_2 25 #define Y_VAL4_1 1 @@ -1544,8 +1544,8 @@ void handle_special_dialog_text(s16 dialogID) { // dialog ID tables, in order for (i = 0; i < (s16) ARRAY_COUNT(dialogBossStart); i++) { if (dialogBossStart[i] == dialogID) { - sequence_player_unlower(0, 60); - play_music(0, SEQUENCE_ARGS(4, SEQ_EVENT_BOSS), 0); + sequence_player_unlower(SEQ_PLAYER_LEVEL, 60); + play_music(SEQ_PLAYER_LEVEL, SEQUENCE_ARGS(4, SEQ_EVENT_BOSS), 0); return; } } @@ -1657,7 +1657,7 @@ s16 gCutsceneMsgTimer = 0; s8 gDialogCameraAngleIndex = CAM_SELECTION_MARIO; s8 gDialogCourseActNum = 1; -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) #define DIAG_VAL1 20 #define DIAG_VAL3 130 #define DIAG_VAL4 4 @@ -1979,13 +1979,13 @@ void do_cutscene_handler(void) { extern Gfx castle_grounds_seg7_us_dl_0700F2E8[]; #endif -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) #define PEACH_MESSAGE_TIMER 170 #else #define PEACH_MESSAGE_TIMER 250 #endif -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) #define STR_X 53 #define STR_Y 136 #else @@ -2027,7 +2027,7 @@ void print_peach_letter_message(void) { gDPSetEnvColor(gDisplayListHead++, 20, 20, 20, gCutsceneMsgFade); print_generic_string(STR_X, STR_Y, str); -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) gSPDisplayList(gDisplayListHead++, dl_ia_text_end); #endif gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); @@ -2157,7 +2157,7 @@ u8 gTextCourseArr[][7] = { // D_802FDA10 }; #endif -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) #define CRS_NUM_X1 93 #else #define CRS_NUM_X1 100 @@ -2280,7 +2280,7 @@ void render_pause_my_score_coins(void) { gSPDisplayList(gDisplayListHead++, dl_ia_text_end); } -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) #define TXT1_X 4 #define TXT2_X 116 #define Y_VAL7 0 @@ -2337,7 +2337,7 @@ void render_pause_camera_options(s16 x, s16 y, s8 *index, s16 xIndex) { } } -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) #define X_VAL8 0 #define Y_VAL8 4 #else @@ -2417,7 +2417,7 @@ void render_pause_castle_menu_box(s16 x, s16 y) { void highlight_last_course_complete_stars(void) { u8 courseDone; - if (gLastCompletedCourseNum == 0) { + if (gLastCompletedCourseNum == COURSE_NONE) { courseDone = 0; } else { courseDone = gLastCompletedCourseNum - 1; @@ -2593,7 +2593,7 @@ s16 render_pause_courses_and_castle(void) { gDialogLineNum = 1; gDialogTextAlpha = 0; level_set_transition(-1, 0); -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) play_sound(SOUND_MENU_PAUSE, gDefaultSoundArgs); #else play_sound(SOUND_MENU_PAUSE_HIGHPRIO, gDefaultSoundArgs); @@ -2667,7 +2667,7 @@ s16 render_pause_courses_and_castle(void) { return 0; } -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) #define TXT_HISCORE_X 112 #define TXT_HISCORE_Y 48 #define TXT_CONGRATS_X 60 @@ -2775,7 +2775,7 @@ void play_star_fanfare_and_flash_hud(s32 arg, u8 starNum) { #define TXT_NAME_X1 71 #define TXT_NAME_X2 69 #endif -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) #define CRS_NUM_X2 95 #define CRS_NUM_X3 93 #define TXT_CLEAR_X1 205 @@ -2788,7 +2788,7 @@ void play_star_fanfare_and_flash_hud(s32 arg, u8 starNum) { #endif void render_course_complete_lvl_info_and_hud_str(void) { -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) u8 textSymStar[] = { GLYPH_STAR, GLYPH_SPACE }; u8 textCourse[] = { TEXT_COURSE }; u8 textCatch[] = { TEXT_CATCH }; @@ -2884,12 +2884,12 @@ void render_course_complete_lvl_info_and_hud_str(void) { gSPDisplayList(gDisplayListHead++, dl_ia_text_begin); gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, gDialogTextAlpha); print_generic_string(76, 145, name); -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) print_generic_string(220, 145, textCatch); #endif gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); print_generic_string(74, 147, name); -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) print_generic_string(218, 147, textCatch); #endif gSPDisplayList(gDisplayListHead++, dl_ia_text_end); @@ -2902,7 +2902,7 @@ void render_course_complete_lvl_info_and_hud_str(void) { #elif defined(VERSION_EU) #define TXT_SAVEOPTIONS_X xOffset #endif -#ifdef VERSION_JP +#if defined(VERSION_JP) || defined(VERSION_SH) #define TXT_SAVECONT_Y 2 #define TXT_SAVEQUIT_Y 18 #define TXT_CONTNOSAVE_Y 38 diff --git a/src/game/interaction.c b/src/game/interaction.c index c495e611..b8f3f881 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -10,7 +10,7 @@ #include "save_file.h" #include "engine/surface_collision.h" #include "sound_init.h" -#include "display.h" +#include "game_init.h" #include "mario.h" #include "obj_behaviors.h" #include "object_helpers.h" @@ -18,7 +18,9 @@ #include "audio/external.h" #include "behavior_data.h" #include "dialog_ids.h" +#include "seq_ids.h" #include "course_table.h" +#include "thread6.h" #define INT_GROUND_POUND_OR_TWIRL (1 << 0) // 0x01 #define INT_PUNCH (1 << 1) // 0x02 @@ -96,7 +98,7 @@ static struct InteractionHandler sInteractionHandlers[] = { { INTERACT_CLAM_OR_BUBBA, interact_clam_or_bubba }, { INTERACT_BULLY, interact_bully }, { INTERACT_SHOCK, interact_shock }, - { INTERACT_TRAP_TURN, interact_bounce_top }, + { INTERACT_BOUNCE_TOP2, interact_bounce_top }, { INTERACT_MR_BLIZZARD, interact_mr_blizzard }, { INTERACT_HIT_FROM_BELOW, interact_hit_from_below }, { INTERACT_BOUNCE_TOP, interact_bounce_top }, @@ -656,7 +658,7 @@ void bounce_back_from_attack(struct MarioState *m, u32 interaction) { } set_camera_shake_from_hit(SHAKE_ATTACK); - m->particleFlags |= PARTICLE_18; + m->particleFlags |= PARTICLE_TRIANGLE; } if (interaction & (INT_PUNCH | INT_KICK | INT_TRIP | INT_FAST_ATTACK_OR_SHELL)) { @@ -695,6 +697,9 @@ u32 take_damage_from_interact_object(struct MarioState *m) { m->hurtCounter += 4 * damage; +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif set_camera_shake_from_hit(shake); return damage; } @@ -742,6 +747,11 @@ u32 interact_coin(struct MarioState *m, UNUSED u32 interactType, struct Object * && m->numCoins >= 100) { bhv_spawn_star_no_level_exit(6); } +#ifdef VERSION_SH + if (o->oDamageOrCoinValue >= 2) { + queue_rumble_data(5, 80); + } +#endif return FALSE; } @@ -760,6 +770,9 @@ u32 interact_star_or_key(struct MarioState *m, UNUSED u32 interactType, struct O if (m->health >= 0x100) { mario_stop_riding_and_holding(m); +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif if (!noExit) { m->hurtCounter = 0; @@ -861,10 +874,20 @@ u32 interact_warp(struct MarioState *m, UNUSED u32 interactType, struct Object * m->interactObj = o; m->usedObj = o; +#ifdef VERSION_SH + if (o->collisionData == segmented_to_virtual(warp_pipe_seg3_collision_03009AC8)) { + play_sound(SOUND_MENU_ENTER_PIPE, m->marioObj->header.gfx.cameraToObject); + queue_rumble_data(15, 80); + } else { + play_sound(SOUND_MENU_ENTER_HOLE, m->marioObj->header.gfx.cameraToObject); + queue_rumble_data(12, 80); + } +#else play_sound(o->collisionData == segmented_to_virtual(warp_pipe_seg3_collision_03009AC8) ? SOUND_MENU_ENTER_PIPE : SOUND_MENU_ENTER_HOLE, m->marioObj->header.gfx.cameraToObject); +#endif mario_stop_riding_object(m); return set_mario_action(m, ACT_DISAPPEARED, (WARP_OP_WARP_OBJECT << 16) + 2); @@ -1075,6 +1098,9 @@ u32 interact_tornado(struct MarioState *m, UNUSED u32 interactType, struct Objec marioObj->oMarioTornadoPosY = m->pos[1] - o->oPosY; play_sound(SOUND_MARIO_WAAAOOOW, m->marioObj->header.gfx.cameraToObject); +#ifdef VERSION_SH + queue_rumble_data(30, 60); +#endif return set_mario_action(m, ACT_TORNADO_TWIRLING, m->action == ACT_TWIRLING); } @@ -1095,6 +1121,9 @@ u32 interact_whirlpool(struct MarioState *m, UNUSED u32 interactType, struct Obj marioObj->oMarioWhirlpoolPosY = m->pos[1] - o->oPosY; play_sound(SOUND_MARIO_WAAAOOOW, m->marioObj->header.gfx.cameraToObject); +#ifdef VERSION_SH + queue_rumble_data(30, 60); +#endif return set_mario_action(m, ACT_CAUGHT_IN_WHIRLPOOL, 0); } @@ -1128,6 +1157,9 @@ u32 interact_flame(struct MarioState *m, UNUSED u32 interactType, struct Object if (!sInvulnerable && !(m->flags & MARIO_METAL_CAP) && !(m->flags & MARIO_VANISH_CAP) && !(o->oInteractionSubtype & INT_SUBTYPE_DELAY_INVINCIBILITY)) { +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif o->oInteractStatus = INT_STATUS_INTERACTED; m->interactObj = o; @@ -1203,6 +1235,9 @@ u32 interact_bully(struct MarioState *m, UNUSED u32 interactType, struct Object m->interactObj = o; if (interaction & INT_ATTACK_NOT_FROM_BELOW) { +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif push_mario_out_of_object(m, o, 5.0f); m->forwardVel = -16.0f; @@ -1225,6 +1260,9 @@ u32 interact_bully(struct MarioState *m, UNUSED u32 interactType, struct Object push_mario_out_of_object(m, o, 5.0f); drop_and_set_mario_action(m, bully_knock_back_mario(m), 0); +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif return TRUE; } @@ -1241,6 +1279,9 @@ u32 interact_shock(struct MarioState *m, UNUSED u32 interactType, struct Object take_damage_from_interact_object(m); play_sound(SOUND_MARIO_ATTACKED, m->marioObj->header.gfx.cameraToObject); +#ifdef VERSION_SH + queue_rumble_data(70, 60); +#endif if (m->action & (ACT_FLAG_SWIMMING | ACT_FLAG_METAL_WATER)) { return drop_and_set_mario_action(m, ACT_WATER_SHOCKED, 0); @@ -1286,6 +1327,9 @@ u32 interact_hit_from_below(struct MarioState *m, UNUSED u32 interactType, struc } if (interaction & INT_ANY_ATTACK) { +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif attack_object(o, interaction); bounce_back_from_attack(m, interaction); @@ -1324,6 +1368,9 @@ u32 interact_bounce_top(struct MarioState *m, UNUSED u32 interactType, struct Ob } if (interaction & INT_ATTACK_NOT_FROM_BELOW) { +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif attack_object(o, interaction); bounce_back_from_attack(m, interaction); @@ -1440,6 +1487,9 @@ u32 check_object_grab_mario(struct MarioState *m, UNUSED u32 interactType, struc update_mario_sound_and_camera(m); play_sound(SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject); +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif return set_mario_action(m, ACT_GRABBED, 0); } } @@ -1452,11 +1502,21 @@ u32 interact_pole(struct MarioState *m, UNUSED u32 interactType, struct Object * s32 actionId = m->action & ACT_ID_MASK; if (actionId >= 0x080 && actionId < 0x0A0) { if (!(m->prevAction & ACT_FLAG_ON_POLE) || m->usedObj != o) { - u32 lowSpeed = m->forwardVel <= 10.0f; +#ifdef VERSION_SH + f32 velConv = m->forwardVel; // conserve the velocity. struct Object *marioObj = m->marioObj; + u32 lowSpeed; +#else + u32 lowSpeed = (m->forwardVel <= 10.0f); + struct Object *marioObj = m->marioObj; +#endif mario_stop_riding_and_holding(m); +#ifdef VERSION_SH + lowSpeed = (velConv <= 10.0f); +#endif + m->interactObj = o; m->usedObj = o; m->vel[1] = 0.0f; @@ -1470,8 +1530,17 @@ u32 interact_pole(struct MarioState *m, UNUSED u32 interactType, struct Object * return set_mario_action(m, ACT_GRAB_POLE_SLOW, 0); } + //! @bug Using m->forwardVel here is assumed to be 0.0f due to the set from earlier. + // This is fixed in the Shindou version. +#ifdef VERSION_SH + marioObj->oMarioPoleYawVel = (s32)(velConv * 0x100 + 0x1000); +#else marioObj->oMarioPoleYawVel = (s32)(m->forwardVel * 0x100 + 0x1000); +#endif reset_mario_pitch(m); +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif return set_mario_action(m, ACT_GRAB_POLE_FAST, 0); } } @@ -1491,6 +1560,9 @@ u32 interact_hoot(struct MarioState *m, UNUSED u32 interactType, struct Object * m->interactObj = o; m->usedObj = o; +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif update_mario_sound_and_camera(m); return set_mario_action(m, ACT_RIDING_HOOT, 0); } @@ -1513,17 +1585,17 @@ u32 interact_cap(struct MarioState *m, UNUSED u32 interactType, struct Object *o switch (capFlag) { case MARIO_VANISH_CAP: capTime = 600; - capMusic = 0x040E; + capMusic = SEQUENCE_ARGS(4, SEQ_EVENT_POWERUP); break; case MARIO_METAL_CAP: capTime = 600; - capMusic = 0x040F; + capMusic = SEQUENCE_ARGS(4, SEQ_EVENT_METAL_CAP); break; case MARIO_WING_CAP: capTime = 1800; - capMusic = 0x040E; + capMusic = SEQUENCE_ARGS(4, SEQ_EVENT_POWERUP); break; } @@ -1684,11 +1756,11 @@ void check_kick_or_punch_wall(struct MarioState *m) { mario_set_forward_vel(m, -48.0f); play_sound(SOUND_ACTION_HIT_2, m->marioObj->header.gfx.cameraToObject); - m->particleFlags |= PARTICLE_18; + m->particleFlags |= PARTICLE_TRIANGLE; } else if (m->action & ACT_FLAG_AIR) { mario_set_forward_vel(m, -16.0f); play_sound(SOUND_ACTION_HIT_2, m->marioObj->header.gfx.cameraToObject); - m->particleFlags |= PARTICLE_18; + m->particleFlags |= PARTICLE_TRIANGLE; } } } diff --git a/src/game/interaction.h b/src/game/interaction.h index 60d327e3..611022da 100644 --- a/src/game/interaction.h +++ b/src/game/interaction.h @@ -13,7 +13,7 @@ #define INTERACT_KOOPA /* 0x00000080 */ (1 << 7) #define INTERACT_UNKNOWN_08 /* 0x00000100 */ (1 << 8) #define INTERACT_BREAKABLE /* 0x00000200 */ (1 << 9) -#define INTERACT_STRONG_WIND /* 0x00000400 */ (1 << 10) +#define INTERACT_STRONG_WIND /* 0x00000400 */ (1 << 10) #define INTERACT_WARP_DOOR /* 0x00000800 */ (1 << 11) #define INTERACT_STAR_OR_KEY /* 0x00001000 */ (1 << 12) #define INTERACT_WARP /* 0x00002000 */ (1 << 13) @@ -23,7 +23,7 @@ #define INTERACT_BULLY /* 0x00020000 */ (1 << 17) #define INTERACT_FLAME /* 0x00040000 */ (1 << 18) #define INTERACT_KOOPA_SHELL /* 0x00080000 */ (1 << 19) -#define INTERACT_TRAP_TURN /* 0x00100000 */ (1 << 20) +#define INTERACT_BOUNCE_TOP2 /* 0x00100000 */ (1 << 20) #define INTERACT_MR_BLIZZARD /* 0x00200000 */ (1 << 21) #define INTERACT_HIT_FROM_BELOW /* 0x00400000 */ (1 << 22) #define INTERACT_TEXT /* 0x00800000 */ (1 << 23) @@ -90,6 +90,8 @@ #define INT_STATUS_ATTACKED_MARIO (1 << 13) /* 0x00002000 */ #define INT_STATUS_WAS_ATTACKED (1 << 14) /* 0x00004000 */ #define INT_STATUS_INTERACTED (1 << 15) /* 0x00008000 */ +#define INT_STATUS_TRAP_TURN (1 << 20) /* 0x00100000 */ +#define INT_STATUS_HIT_MINE (1 << 21) /* 0x00200000 */ #define INT_STATUS_STOP_RIDING (1 << 22) /* 0x00400000 */ #define INT_STATUS_TOUCHED_BOB_OMB (1 << 23) /* 0x00800000 */ diff --git a/src/game/level_update.c b/src/game/level_update.c index ffe44236..f179356b 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -5,7 +5,7 @@ #include "dialog_ids.h" #include "audio/external.h" #include "level_update.h" -#include "game.h" +#include "game_init.h" #include "level_update.h" #include "main.h" #include "engine/math_util.h" @@ -18,7 +18,6 @@ #include "object_list_processor.h" #include "ingame_menu.h" #include "obj_behaviors.h" -#include "display.h" #include "save_file.h" #include "debug_course.h" #ifdef VERSION_EU @@ -26,6 +25,8 @@ #include "eu_translation.h" #endif #include "level_table.h" +#include "course_table.h" +#include "thread6.h" #define PLAY_MODE_NORMAL 0 #define PLAY_MODE_PAUSED 2 @@ -144,7 +145,7 @@ struct CreditsEntry sCreditsSequence[] = { { LEVEL_DDD, 2, -111, -64, { 3948, 1185, -104 }, credits19 }, { LEVEL_CCM, 1, 33, 31, { 3169, -4607, 5240 }, credits20 }, { LEVEL_CASTLE_GROUNDS, 1, 1, -128, { 0, 906, -1200 }, NULL }, - { 0, 0, 1, 0, { 0, 0, 0 }, NULL }, + { LEVEL_NONE, 0, 1, 0, { 0, 0, 0 }, NULL }, }; struct MarioState gMarioStates[1]; @@ -328,7 +329,7 @@ void set_mario_initial_action(struct MarioState *m, u32 spawnType, u32 actionArg case MARIO_SPAWN_UNKNOWN_14: set_mario_action(m, ACT_SPAWN_SPIN_AIRBORNE, 0); break; - case MARIO_SPAWN_UNKNOWN_15: + case MARIO_SPAWN_DEATH: set_mario_action(m, ACT_FALLING_DEATH_EXIT, 0); break; case MARIO_SPAWN_UNKNOWN_16: @@ -343,7 +344,7 @@ void set_mario_initial_action(struct MarioState *m, u32 spawnType, u32 actionArg case MARIO_SPAWN_UNKNOWN_20: set_mario_action(m, ACT_EXIT_AIRBORNE, 0); break; - case MARIO_SPAWN_UNKNOWN_21: + case MARIO_SPAWN_PAINTING_DEATH: set_mario_action(m, ACT_DEATH_EXIT, 0); break; case MARIO_SPAWN_UNKNOWN_22: @@ -435,7 +436,7 @@ void init_mario_after_warp(void) { if (gCurrLevelNum == LEVEL_BOB && get_current_background_music() != SEQUENCE_ARGS(4, SEQ_LEVEL_SLIDE) && sTimerRunning != 0) { - play_music(0, SEQUENCE_ARGS(4, SEQ_LEVEL_SLIDE), 0); + play_music(SEQ_PLAYER_LEVEL, SEQUENCE_ARGS(4, SEQ_LEVEL_SLIDE), 0); } #endif @@ -448,7 +449,7 @@ void init_mario_after_warp(void) { ) play_sound(SOUND_MENU_MARIO_CASTLE_WARP, gDefaultSoundArgs); #ifndef VERSION_JP - if (sWarpDest.levelNum == 16 && sWarpDest.areaIdx == 1 + if (sWarpDest.levelNum == LEVEL_CASTLE_GROUNDS && sWarpDest.areaIdx == 1 && (sWarpDest.nodeId == 7 || sWarpDest.nodeId == 10 || sWarpDest.nodeId == 20 || sWarpDest.nodeId == 30)) { play_sound(SOUND_MENU_MARIO_CASTLE_WARP, gDefaultSoundArgs); @@ -676,10 +677,14 @@ void initiate_painting_warp(void) { set_mario_action(gMarioState, ACT_DISAPPEARED, 0); - gMarioState->marioObj->header.gfx.node.flags &= ~0x0001; + gMarioState->marioObj->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE; play_sound(SOUND_MENU_STAR_SOUND, gDefaultSoundArgs); fadeout_music(398); +#ifdef VERSION_SH + queue_rumble_data(80, 70); + func_sh_8024C89C(1); +#endif } } } @@ -703,7 +708,7 @@ s16 level_trigger_warp(struct MarioState *m, s32 warpOp) { case WARP_OP_DEMO_END: do {sDelayedWarpTimer = 20;} while (0); sSourceWarpNodeId = WARP_NODE_F0; - gSavedCourseNum = 0; + gSavedCourseNum = COURSE_NONE; val04 = FALSE; play_transition(WARP_TRANSITION_FADE_INTO_STAR, 0x14, 0x00, 0x00, 0x00); break; @@ -712,14 +717,14 @@ s16 level_trigger_warp(struct MarioState *m, s32 warpOp) { sDelayedWarpTimer = 60; sSourceWarpNodeId = WARP_NODE_F0; val04 = FALSE; - gSavedCourseNum = 0; + gSavedCourseNum = COURSE_NONE; play_transition(WARP_TRANSITION_FADE_INTO_COLOR, 0x3C, 0x00, 0x00, 0x00); break; case WARP_OP_STAR_EXIT: sDelayedWarpTimer = 32; sSourceWarpNodeId = WARP_NODE_F0; - gSavedCourseNum = 0; + gSavedCourseNum = COURSE_NONE; play_transition(WARP_TRANSITION_FADE_INTO_MARIO, 0x20, 0x00, 0x00, 0x00); break; @@ -853,7 +858,7 @@ void initiate_delayed_warp(void) { gCurrCreditsEntry += 1; gCurrActNum = gCurrCreditsEntry->unk02 & 0x07; - if ((gCurrCreditsEntry + 1)->levelNum == 0) { + if ((gCurrCreditsEntry + 1)->levelNum == LEVEL_NONE) { destWarpNode = WARP_NODE_CREDITS_END; } else { destWarpNode = WARP_NODE_CREDITS_NEXT; @@ -991,6 +996,9 @@ s32 play_mode_normal(void) { set_play_mode(PLAY_MODE_CHANGE_AREA); } else if (pressed_pause()) { lower_background_noise(1); +#ifdef VERSION_SH + cancel_rumble(); +#endif gCameraMovementFlags |= CAM_MOVE_PAUSE_SCREEN; set_play_mode(PLAY_MODE_PAUSED); } @@ -1014,7 +1022,7 @@ s32 play_mode_paused(void) { } else { initiate_warp(LEVEL_CASTLE, 1, 0x1F, 0); fade_into_special_warp(0, 0); - gSavedCourseNum = 0; + gSavedCourseNum = COURSE_NONE; } gCameraMovementFlags &= ~CAM_MOVE_PAUSE_SCREEN; @@ -1204,6 +1212,11 @@ s32 init_level(void) { set_background_music(gCurrentArea->musicParam, gCurrentArea->musicParam2, 0); } } +#ifdef VERSION_SH + if (gCurrDemoInput == NULL) { + cancel_rumble(); + } +#endif if (gMarioState->action == ACT_INTRO_CUTSCENE) { sound_banks_disable(2, 0x0330); @@ -1255,7 +1268,7 @@ s32 lvl_init_from_save_file(UNUSED s16 arg0, s32 levelNum) { gCurrLevelNum = levelNum; gCurrCourseNum = COURSE_NONE; - gSavedCourseNum = 0; + gSavedCourseNum = COURSE_NONE; gCurrCreditsEntry = NULL; gSpecialTripleJump = 0; diff --git a/src/game/level_update.h b/src/game/level_update.h index 098c870a..a6100de2 100644 --- a/src/game/level_update.h +++ b/src/game/level_update.h @@ -27,25 +27,25 @@ #define WARP_OP_TRIGGERS_LEVEL_SELECT 0x10 -#define MARIO_SPAWN_UNKNOWN_01 0x01 -#define MARIO_SPAWN_UNKNOWN_02 0x02 -#define MARIO_SPAWN_UNKNOWN_03 0x03 -#define MARIO_SPAWN_UNKNOWN_04 0x04 -#define MARIO_SPAWN_UNKNOWN_10 0x10 -#define MARIO_SPAWN_UNKNOWN_11 0x11 -#define MARIO_SPAWN_UNKNOWN_12 0x12 -#define MARIO_SPAWN_UNKNOWN_13 0x13 -#define MARIO_SPAWN_UNKNOWN_14 0x14 -#define MARIO_SPAWN_UNKNOWN_15 0x15 -#define MARIO_SPAWN_UNKNOWN_16 0x16 -#define MARIO_SPAWN_UNKNOWN_17 0x17 -#define MARIO_SPAWN_UNKNOWN_20 0x20 -#define MARIO_SPAWN_UNKNOWN_21 0x21 -#define MARIO_SPAWN_UNKNOWN_22 0x22 -#define MARIO_SPAWN_UNKNOWN_23 0x23 -#define MARIO_SPAWN_UNKNOWN_24 0x24 -#define MARIO_SPAWN_UNKNOWN_25 0x25 -#define MARIO_SPAWN_UNKNOWN_27 0x27 +#define MARIO_SPAWN_UNKNOWN_01 0x01 +#define MARIO_SPAWN_UNKNOWN_02 0x02 +#define MARIO_SPAWN_UNKNOWN_03 0x03 +#define MARIO_SPAWN_UNKNOWN_04 0x04 +#define MARIO_SPAWN_UNKNOWN_10 0x10 +#define MARIO_SPAWN_UNKNOWN_11 0x11 +#define MARIO_SPAWN_UNKNOWN_12 0x12 +#define MARIO_SPAWN_UNKNOWN_13 0x13 +#define MARIO_SPAWN_UNKNOWN_14 0x14 +#define MARIO_SPAWN_DEATH 0x15 +#define MARIO_SPAWN_UNKNOWN_16 0x16 +#define MARIO_SPAWN_UNKNOWN_17 0x17 +#define MARIO_SPAWN_UNKNOWN_20 0x20 +#define MARIO_SPAWN_PAINTING_DEATH 0x21 +#define MARIO_SPAWN_UNKNOWN_22 0x22 +#define MARIO_SPAWN_UNKNOWN_23 0x23 +#define MARIO_SPAWN_UNKNOWN_24 0x24 +#define MARIO_SPAWN_UNKNOWN_25 0x25 +#define MARIO_SPAWN_UNKNOWN_27 0x27 struct CreditsEntry diff --git a/src/game/macro_special_objects.c b/src/game/macro_special_objects.c index 6b1b6aac..c1d4813b 100644 --- a/src/game/macro_special_objects.c +++ b/src/game/macro_special_objects.c @@ -93,7 +93,7 @@ static void spawn_macro_coin_unknown(const BehaviorScript *behavior, s16 a1[]) { } struct LoadedPreset { - /*0x00*/ const BehaviorScript *beh; + /*0x00*/ const BehaviorScript *behavior; /*0x04*/ s16 param; // huh? why does the below function swap these.. just use the struct.. /*0x06*/ s16 model; }; @@ -135,7 +135,7 @@ void spawn_macro_objects(s16 areaIndex, s16 *macroObjList) { // Get the preset values from the MacroObjectPresets list. preset.model = MacroObjectPresets[presetID].model; - preset.beh = MacroObjectPresets[presetID].beh; + preset.behavior = MacroObjectPresets[presetID].behavior; preset.param = MacroObjectPresets[presetID].param; if (preset.param != 0) { @@ -151,7 +151,7 @@ void spawn_macro_objects(s16 areaIndex, s16 *macroObjList) { spawn_object_abs_with_rot(&gMacroObjectDefaultParent, // Parent object 0, // Unused preset.model, // Model ID - preset.beh, // Behavior address + preset.behavior, // Behavior address macroObject[MACRO_OBJ_X], // X-position macroObject[MACRO_OBJ_Y], // Y-position macroObject[MACRO_OBJ_Z], // Z-position diff --git a/src/game/main.c b/src/game/main.c index 4a56d124..2d6bf1d9 100644 --- a/src/game/main.c +++ b/src/game/main.c @@ -4,14 +4,14 @@ #include "sm64.h" #include "prevent_bss_reordering.h" #include "audio/external.h" -#include "game.h" +#include "game_init.h" #include "memory.h" #include "sound_init.h" #include "profiler.h" -#include "game.h" #include "buffers/buffers.h" #include "segments.h" #include "main.h" +#include "thread6.h" // Message IDs #define MESG_SP_COMPLETE 100 @@ -25,6 +25,12 @@ OSThread gIdleThread; OSThread gMainThread; OSThread gGameLoopThread; OSThread gSoundThread; +#ifdef VERSION_SH +OSThread gRumblePakThread; + +s32 gRumblePakPfs; // Actually an OSPfs but we don't have that header yet +#endif + OSIoMesg gDmaIoMesg; OSMesg D_80339BEC; OSMesgQueue gDmaMesgQueue; @@ -32,11 +38,22 @@ OSMesgQueue gSIEventMesgQueue; OSMesgQueue gPIMesgQueue; OSMesgQueue gIntrMesgQueue; OSMesgQueue gSPTaskMesgQueue; +#ifdef VERSION_SH +OSMesgQueue gRumblePakSchedulerMesgQueue; +OSMesgQueue gRumbleThreadVIMesgQueue; +#endif OSMesg gDmaMesgBuf[1]; OSMesg gPIMesgBuf[32]; OSMesg gSIEventMesgBuf[1]; OSMesg gIntrMesgBuf[16]; OSMesg gUnknownMesgBuf[16]; +#ifdef VERSION_SH +OSMesg gRumblePakSchedulerMesgBuf[1]; +OSMesg gRumbleThreadVIMesgBuf[1]; + +struct RumbleData gRumbleDataQueue[3]; +struct StructSH8031D9B0 gCurrRumbleSettings; +#endif struct VblankHandler *gVblankHandler1 = NULL; struct VblankHandler *gVblankHandler2 = NULL; @@ -211,10 +228,6 @@ void pretend_audio_sptask_done(void) { osSendMesg(&gIntrMesgQueue, (OSMesg) MESG_SP_COMPLETE, OS_MESG_NOBLOCK); } -#ifdef VERSION_SH -extern void func_sh_8024CC7C(void); -#endif - void handle_vblank(void) { UNUSED s32 pad; // needed to pad the stack @@ -256,7 +269,7 @@ void handle_vblank(void) { } } #ifdef VERSION_SH - func_sh_8024CC7C(); + rumble_thread_update_vi(); #endif // Notify the game loop about the vblank. diff --git a/src/game/main.h b/src/game/main.h index 6a1bd499..901b1c0a 100644 --- a/src/game/main.h +++ b/src/game/main.h @@ -1,14 +1,42 @@ #ifndef _MAIN_H_ #define _MAIN_H_ +struct RumbleData { + u8 unk00; + u8 unk01; + s16 unk02; + s16 unk04; +}; + +struct StructSH8031D9B0 { + s16 unk00; + s16 unk02; + s16 unk04; + s16 unk06; + s16 unk08; + s16 unk0A; + s16 unk0C; + s16 unk0E; +}; + extern OSThread D_80339210; extern OSThread gIdleThread; extern OSThread gMainThread; extern OSThread gGameLoopThread; extern OSThread gSoundThread; +#ifdef VERSION_SH +extern OSThread gRumblePakThread; + +extern s32 gRumblePakPfs; // Actually an OSPfs but we don't have that header yet +#endif + extern OSMesgQueue gPIMesgQueue; extern OSMesgQueue gIntrMesgQueue; extern OSMesgQueue gSPTaskMesgQueue; +#ifdef VERSION_SH +extern OSMesgQueue gRumblePakSchedulerMesgQueue; +extern OSMesgQueue gRumbleThreadVIMesgQueue; +#endif extern OSMesg gDmaMesgBuf[1]; extern OSMesg gPIMesgBuf[32]; extern OSMesg gSIEventMesgBuf[1]; @@ -18,6 +46,13 @@ extern OSIoMesg gDmaIoMesg; extern OSMesg D_80339BEC; extern OSMesgQueue gDmaMesgQueue; extern OSMesgQueue gSIEventMesgQueue; +#ifdef VERSION_SH +extern OSMesg gRumblePakSchedulerMesgBuf[1]; +extern OSMesg gRumbleThreadVIMesgBuf[1]; + +extern struct RumbleData gRumbleDataQueue[3]; +extern struct StructSH8031D9B0 gCurrRumbleSettings; +#endif extern struct VblankHandler *gVblankHandler1; extern struct VblankHandler *gVblankHandler2; diff --git a/src/game/mario.c b/src/game/mario.c index 9bc36cf5..aace34f6 100644 --- a/src/game/mario.c +++ b/src/game/mario.c @@ -8,8 +8,7 @@ #include "behavior_data.h" #include "camera.h" #include "mario_misc.h" -#include "display.h" -#include "game.h" +#include "game_init.h" #include "engine/graph_node.h" #include "interaction.h" #include "level_update.h" @@ -31,6 +30,7 @@ #include "sound_init.h" #include "engine/surface_collision.h" #include "level_table.h" +#include "thread6.h" u32 unused80339F10; s8 filler80339F1C[20]; @@ -284,9 +284,9 @@ void play_sound_and_spawn_particles(struct MarioState *m, u32 soundBits, u32 wav } } else { if (m->terrainSoundAddend == (SOUND_TERRAIN_SAND << 16)) { - m->particleFlags |= PARTICLE_15; + m->particleFlags |= PARTICLE_DIRT; } else if (m->terrainSoundAddend == (SOUND_TERRAIN_SNOW << 16)) { - m->particleFlags |= PARTICLE_14; + m->particleFlags |= PARTICLE_SNOW; } } @@ -1441,9 +1441,11 @@ void set_submerged_cam_preset_and_spawn_bubbles(struct MarioState *m) { set_camera_mode(m->area->camera, CAMERA_MODE_WATER_SURFACE, 1); } + // As long as Mario isn't drowning or at the top + // of the water with his head out, spawn bubbles. if ((m->action & ACT_FLAG_INTANGIBLE) == 0) { if ((m->pos[1] < (f32)(m->waterLevel - 160)) || (m->faceAngle[0] < -0x800)) { - m->particleFlags |= PARTICLE_5; + m->particleFlags |= PARTICLE_BUBBLE; } } } @@ -1498,6 +1500,16 @@ void update_mario_health(struct MarioState *m) { // Play a noise to alert the player when Mario is close to drowning. if (((m->action & ACT_GROUP_MASK) == ACT_GROUP_SUBMERGED) && (m->health < 0x300)) { play_sound(SOUND_MOVING_ALMOST_DROWNING, gDefaultSoundArgs); +#ifdef VERSION_SH + if (!gRumblePakTimer) { + gRumblePakTimer = 36; + if (is_rumble_finished_and_queue_empty()) { + queue_rumble_data(3, 30); + } + } + } else { + gRumblePakTimer = 0; +#endif } } } @@ -1675,6 +1687,21 @@ static void debug_update_mario_cap(u16 button, s32 flags, u16 capTimer, u16 capM } } +#ifdef VERSION_SH +void func_sh_8025574C(void) { + if (gMarioState->particleFlags & PARTICLE_HORIZONTAL_STAR) { + queue_rumble_data(5, 80); + } else if (gMarioState->particleFlags & PARTICLE_VERTICAL_STAR) { + queue_rumble_data(5, 80); + } else if (gMarioState->particleFlags & PARTICLE_TRIANGLE) { + queue_rumble_data(5, 80); + } + if(gMarioState->heldObj && gMarioState->heldObj->behavior == segmented_to_virtual(bhvBobomb)) { + reset_rumble_timers(); + } +} +#endif + /** * Main function for executing Mario's behavior. */ @@ -1753,6 +1780,9 @@ s32 execute_mario_action(UNUSED struct Object *o) { play_infinite_stairs_music(); gMarioState->marioObj->oInteractStatus = 0; +#ifdef VERSION_SH + func_sh_8025574C(); +#endif return gMarioState->particleFlags; } diff --git a/src/game/mario_actions_airborne.c b/src/game/mario_actions_airborne.c index 10da4712..92e5dab1 100644 --- a/src/game/mario_actions_airborne.c +++ b/src/game/mario_actions_airborne.c @@ -7,11 +7,12 @@ #include "interaction.h" #include "mario.h" #include "mario_step.h" -#include "display.h" +#include "game_init.h" #include "camera.h" #include "save_file.h" #include "audio/external.h" #include "engine/graph_node.h" +#include "thread6.h" void play_flip_sounds(struct MarioState *m, s16 frame1, s16 frame2, s16 frame3) { s32 animFrame = m->marioObj->header.gfx.unk38.animFrame; @@ -79,12 +80,18 @@ s32 check_fall_damage(struct MarioState *m, u32 hardFallAction) { if (m->vel[1] < -55.0f) { if (fallHeight > 3000.0f) { m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 16 : 24; +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif set_camera_shake_from_hit(SHAKE_FALL_DAMAGE); play_sound(SOUND_MARIO_ATTACKED, m->marioObj->header.gfx.cameraToObject); return drop_and_set_mario_action(m, hardFallAction, 4); } else if (fallHeight > damageHeight && !mario_floor_is_slippery(m)) { m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 8 : 12; m->squishTimer = 30; +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif set_camera_shake_from_hit(SHAKE_FALL_DAMAGE); play_sound(SOUND_MARIO_ATTACKED, m->marioObj->header.gfx.cameraToObject); } @@ -124,8 +131,11 @@ s32 check_fall_damage_or_get_stuck(struct MarioState *m, u32 hardFallAction) { #else play_sound(SOUND_MARIO_OOOF2, m->marioObj->header.gfx.cameraToObject); #endif - m->particleFlags |= PARTICLE_16; + m->particleFlags |= PARTICLE_MIST_CIRCLE; drop_and_set_mario_action(m, ACT_FEET_STUCK_IN_GROUND, 0); +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif return TRUE; } @@ -375,6 +385,9 @@ u32 common_air_action_step(struct MarioState *m, u32 landAction, s32 animation, set_mario_animation(m, animation); if (m->forwardVel > 16.0f) { +#ifdef VERSION_SH + queue_rumble_data(5, 40); +#endif mario_bonk_reflection(m, FALSE); m->faceAngle[1] += 0x8000; @@ -395,7 +408,7 @@ u32 common_air_action_step(struct MarioState *m, u32 landAction, s32 animation, // that the final quarter step detects a ledge, but you are // not able to ledge grab it. if (m->forwardVel >= 38.0f) { - m->particleFlags |= PARTICLE_1; + m->particleFlags |= PARTICLE_VERTICAL_STAR; set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); } else { if (m->forwardVel > 8.0f) { @@ -480,6 +493,11 @@ s32 act_triple_jump(struct MarioState *m) { #endif common_air_action_step(m, ACT_TRIPLE_JUMP_LAND, MARIO_ANIM_TRIPLE_JUMP, 0); +#ifdef VERSION_SH + if (m->action == ACT_TRIPLE_JUMP_LAND) { + queue_rumble_data(5, 40); + } +#endif play_flip_sounds(m, 2, 8, 20); return FALSE; } @@ -491,6 +509,11 @@ s32 act_backflip(struct MarioState *m) { play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, SOUND_MARIO_YAH_WAH_HOO); common_air_action_step(m, ACT_BACKFLIP_LAND, MARIO_ANIM_BACKFLIP, 0); +#ifdef VERSION_SH + if (m->action == ACT_BACKFLIP_LAND) { + queue_rumble_data(5, 40); + } +#endif play_flip_sounds(m, 2, 3, 17); return FALSE; } @@ -618,6 +641,11 @@ s32 act_long_jump(struct MarioState *m) { } common_air_action_step(m, ACT_LONG_JUMP_LAND, animation, AIR_STEP_CHECK_LEDGE_GRAB); +#ifdef VERSION_SH + if (m->action == ACT_LONG_JUMP_LAND) { + queue_rumble_data(5, 40); + } +#endif return FALSE; } @@ -718,12 +746,15 @@ s32 act_dive(struct MarioState *m) { case AIR_STEP_LANDED: if (should_get_stuck_in_ground(m) && m->faceAngle[0] == -0x2AAA) { +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif #ifdef VERSION_JP play_sound(SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject); #else play_sound(SOUND_MARIO_OOOF2, m->marioObj->header.gfx.cameraToObject); #endif - m->particleFlags |= PARTICLE_16; + m->particleFlags |= PARTICLE_MIST_CIRCLE; drop_and_set_mario_action(m, ACT_HEAD_STUCK_IN_GROUND, 0); } else if (!check_fall_damage(m, ACT_HARD_FORWARD_GROUND_KB)) { if (m->heldObj == NULL) { @@ -743,7 +774,7 @@ s32 act_dive(struct MarioState *m) { m->vel[1] = 0.0f; } - m->particleFlags |= PARTICLE_1; + m->particleFlags |= PARTICLE_VERTICAL_STAR; drop_and_set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); break; @@ -913,17 +944,20 @@ s32 act_ground_pound(struct MarioState *m) { stepResult = perform_air_step(m, 0); if (stepResult == AIR_STEP_LANDED) { if (should_get_stuck_in_ground(m)) { +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif #ifdef VERSION_JP play_sound(SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject); #else play_sound(SOUND_MARIO_OOOF2, m->marioObj->header.gfx.cameraToObject); #endif - m->particleFlags |= PARTICLE_16; + m->particleFlags |= PARTICLE_MIST_CIRCLE; set_mario_action(m, ACT_BUTT_STUCK_IN_GROUND, 0); } else { play_mario_heavy_landing_sound(m, SOUND_ACTION_TERRAIN_HEAVY_LANDING); if (!check_fall_damage(m, ACT_HARD_BACKWARD_GROUND_KB)) { - m->particleFlags |= PARTICLE_16 | PARTICLE_4; + m->particleFlags |= PARTICLE_MIST_CIRCLE | PARTICLE_HORIZONTAL_STAR; set_mario_action(m, ACT_GROUND_POUND_LAND, 0); } } @@ -934,7 +968,7 @@ s32 act_ground_pound(struct MarioState *m) { m->vel[1] = 0.0f; } - m->particleFlags |= PARTICLE_1; + m->particleFlags |= PARTICLE_VERTICAL_STAR; set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); } } @@ -952,7 +986,7 @@ s32 act_burning_jump(struct MarioState *m) { } set_mario_animation(m, m->actionArg == 0 ? MARIO_ANIM_SINGLE_JUMP : MARIO_ANIM_FIRE_LAVA_BURN); - m->particleFlags |= PARTICLE_11; + m->particleFlags |= PARTICLE_FIRE; play_sound(SOUND_MOVING_LAVA_BURN, m->marioObj->header.gfx.cameraToObject); m->marioObj->oMarioBurnTimer += 3; @@ -961,6 +995,9 @@ s32 act_burning_jump(struct MarioState *m) { if (m->health < 0x100) { m->health = 0xFF; } +#ifdef VERSION_SH + reset_rumble_timers(); +#endif return FALSE; } @@ -973,13 +1010,16 @@ s32 act_burning_fall(struct MarioState *m) { } set_mario_animation(m, MARIO_ANIM_GENERAL_FALL); - m->particleFlags |= PARTICLE_11; + m->particleFlags |= PARTICLE_FIRE; m->marioObj->oMarioBurnTimer += 3; m->health -= 10; if (m->health < 0x100) { m->health = 0xFF; } +#ifdef VERSION_SH + reset_rumble_timers(); +#endif return FALSE; } @@ -1028,7 +1068,10 @@ s32 act_crazy_box_bounce(struct MarioState *m) { m->heldObj = NULL; set_mario_action(m, ACT_STOMACH_SLIDE, 0); } - m->particleFlags |= PARTICLE_16; +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif + m->particleFlags |= PARTICLE_MIST_CIRCLE; break; case AIR_STEP_HIT_WALL: @@ -1057,6 +1100,11 @@ u32 common_air_knockback_step(struct MarioState *m, u32 landAction, u32 hardFall break; case AIR_STEP_LANDED: +#ifdef VERSION_SH + if (m->action == ACT_SOFT_BONK) { + queue_rumble_data(5, 80); + } +#endif if (!check_fall_damage_or_get_stuck(m, hardFallAction)) { #ifndef VERSION_JP if (m->action == ACT_THROWN_FORWARD || m->action == ACT_THROWN_BACKWARD) { @@ -1268,7 +1316,7 @@ s32 act_air_hit_wall(struct MarioState *m) { m->vel[1] = 0.0f; } - m->particleFlags |= PARTICLE_1; + m->particleFlags |= PARTICLE_VERTICAL_STAR; return set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); } else { m->wallKickTimer = 5; @@ -1400,7 +1448,7 @@ s32 act_butt_slide_air(struct MarioState *m) { if (m->vel[1] > 0.0f) { m->vel[1] = 0.0f; } - m->particleFlags |= PARTICLE_1; + m->particleFlags |= PARTICLE_VERTICAL_STAR; set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); break; @@ -1441,7 +1489,7 @@ s32 act_hold_butt_slide_air(struct MarioState *m) { } mario_drop_held_object(m); - m->particleFlags |= PARTICLE_1; + m->particleFlags |= PARTICLE_VERTICAL_STAR; set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); break; @@ -1455,7 +1503,14 @@ s32 act_hold_butt_slide_air(struct MarioState *m) { } s32 act_lava_boost(struct MarioState *m) { +#ifdef VERSION_SH + if (!(m->flags & MARIO_MARIO_SOUND_PLAYED)) { + play_sound_if_no_flag(m, SOUND_MARIO_ON_FIRE, MARIO_MARIO_SOUND_PLAYED); + queue_rumble_data(5, 80); + } +#else play_sound_if_no_flag(m, SOUND_MARIO_ON_FIRE, MARIO_MARIO_SOUND_PLAYED); +#endif if (!(m->input & INPUT_NONZERO_ANALOG)) { m->forwardVel = approach_f32(m->forwardVel, 0.0f, 0.35f, 0.35f); @@ -1472,6 +1527,9 @@ s32 act_lava_boost(struct MarioState *m) { } m->vel[1] = 84.0f; play_sound(SOUND_MARIO_ON_FIRE, m->marioObj->header.gfx.cameraToObject); +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif } else { play_mario_heavy_landing_sound(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND); if (m->actionState < 2 && m->vel[1] < 0.0f) { @@ -1496,7 +1554,7 @@ s32 act_lava_boost(struct MarioState *m) { set_mario_animation(m, MARIO_ANIM_FIRE_LAVA_BURN); if ((m->area->terrainType & TERRAIN_MASK) != TERRAIN_SNOW && !(m->flags & MARIO_METAL_CAP) && m->vel[1] > 0.0f) { - m->particleFlags |= PARTICLE_11; + m->particleFlags |= PARTICLE_FIRE; if (m->actionState == 0) { play_sound(SOUND_MOVING_LAVA_BURN, m->marioObj->header.gfx.cameraToObject); } @@ -1507,6 +1565,9 @@ s32 act_lava_boost(struct MarioState *m) { } m->marioBodyState->eyeState = MARIO_EYES_DEAD; +#ifdef VERSION_SH + reset_rumble_timers(); +#endif return FALSE; } @@ -1548,7 +1609,7 @@ s32 act_slide_kick(struct MarioState *m) { m->vel[1] = 0.0f; } - m->particleFlags |= PARTICLE_1; + m->particleFlags |= PARTICLE_VERTICAL_STAR; set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); break; @@ -1616,6 +1677,9 @@ s32 act_shot_from_cannon(struct MarioState *m) { set_mario_action(m, ACT_DIVE_SLIDE, 0); m->faceAngle[0] = 0; set_camera_mode(m->area->camera, m->area->camera->defMode, 1); +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif break; case AIR_STEP_HIT_WALL: @@ -1626,7 +1690,7 @@ s32 act_shot_from_cannon(struct MarioState *m) { m->vel[1] = 0.0f; } - m->particleFlags |= PARTICLE_1; + m->particleFlags |= PARTICLE_VERTICAL_STAR; set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); set_camera_mode(m->area->camera, m->area->camera->defMode, 1); break; @@ -1647,6 +1711,9 @@ s32 act_shot_from_cannon(struct MarioState *m) { if (m->vel[1] > 0.0f) { m->particleFlags |= PARTICLE_DUST; } +#ifdef VERSION_SH + reset_rumble_timers(); +#endif return FALSE; } @@ -1709,6 +1776,9 @@ s32 act_flying(struct MarioState *m) { m->faceAngle[0] = 0; set_camera_mode(m->area->camera, m->area->camera->defMode, 1); +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif break; case AIR_STEP_HIT_WALL: @@ -1724,7 +1794,7 @@ s32 act_flying(struct MarioState *m) { : SOUND_ACTION_BONK, m->marioObj->header.gfx.cameraToObject); - m->particleFlags |= PARTICLE_1; + m->particleFlags |= PARTICLE_VERTICAL_STAR; set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); set_camera_mode(m->area->camera, m->area->camera->defMode, 1); } else { @@ -1760,6 +1830,9 @@ s32 act_flying(struct MarioState *m) { #ifndef VERSION_JP play_sound(SOUND_MARIO_YAHOO_WAHA_YIPPEE + ((gAudioRandom % 5) << 16), m->marioObj->header.gfx.cameraToObject); +#endif +#ifdef VERSION_SH + queue_rumble_data(50, 40); #endif } @@ -1774,6 +1847,9 @@ s32 act_riding_hoot(struct MarioState *m) { m->usedObj->oHootMarioReleaseTime = gGlobalTimer; play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED); +#ifdef VERSION_SH + queue_rumble_data(4, 40); +#endif return set_mario_action(m, ACT_FREEFALL, 0); } @@ -1829,6 +1905,9 @@ s32 act_flying_triple_jump(struct MarioState *m) { if (is_anim_past_end(m)) { set_mario_animation(m, MARIO_ANIM_FORWARD_SPINNING); +#ifdef VERSION_SH + queue_rumble_data(8, 80); +#endif m->actionState = 1; } } @@ -1889,6 +1968,9 @@ s32 act_vertical_wind(struct MarioState *m) { set_mario_animation(m, MARIO_ANIM_FORWARD_SPINNING_FLIP); if (m->marioObj->header.gfx.unk38.animFrame == 1) { play_sound(SOUND_ACTION_SPIN, m->marioObj->header.gfx.cameraToObject); +#ifdef VERSION_SH + queue_rumble_data(8, 80); +#endif } if (is_anim_past_end(m)) { diff --git a/src/game/mario_actions_automatic.c b/src/game/mario_actions_automatic.c index d9cc09fc..d2a36491 100644 --- a/src/game/mario_actions_automatic.c +++ b/src/game/mario_actions_automatic.c @@ -15,6 +15,7 @@ #include "interaction.h" #include "camera.h" #include "level_table.h" +#include "thread6.h" #define POLE_NONE 0 #define POLE_TOUCHED_FLOOR 1 @@ -35,7 +36,7 @@ void add_tree_leaf_particles(struct MarioState *m) { leafHeight = 100.0f; } if (m->pos[1] - m->floorHeight > leafHeight) { - m->particleFlags |= PARTICLE_LEAVES; + m->particleFlags |= PARTICLE_LEAF; } } } @@ -166,10 +167,13 @@ s32 act_holding_pole(struct MarioState *m) { //! The Shifting Sand Land palm tree check is done climbing up in // add_tree_leaf_particles, but not here, when climbing down. if (m->pos[1] - m->floorHeight > 100.0f) { - m->particleFlags |= PARTICLE_LEAVES; + m->particleFlags |= PARTICLE_LEAF; } } play_climbing_sounds(m, 2); +#ifdef VERSION_SH + reset_rumble_timers(); +#endif func_80320A4C(1, marioObj->oMarioPoleYawVel / 0x100 * 2); } else { marioObj->oMarioPoleYawVel = 0; @@ -381,7 +385,13 @@ void update_hang_stationary(struct MarioState *m) { } s32 act_start_hanging(struct MarioState *m) { +#ifdef VERSION_SH + if (m->actionTimer++ == 0) { + queue_rumble_data(5, 80); + } +#else m->actionTimer++; +#endif if ((m->input & INPUT_NONZERO_ANALOG) && m->actionTimer >= 31) { return set_mario_action(m, ACT_HANGING, 0); @@ -460,6 +470,9 @@ s32 act_hang_moving(struct MarioState *m) { if (m->marioObj->header.gfx.unk38.animFrame == 12) { play_sound(SOUND_ACTION_HANGING_STEP, m->marioObj->header.gfx.cameraToObject); +#ifdef VERSION_SH + queue_rumble_data(5, 30); +#endif } if (is_anim_past_end(m)) { @@ -649,6 +662,9 @@ s32 act_grabbed(struct MarioState *m) { m->faceAngle[1] = m->usedObj->oMoveAngleYaw; vec3f_copy(m->pos, m->marioObj->header.gfx.pos); +#ifdef VERSION_SH + queue_rumble_data(5, 60); +#endif return set_mario_action(m, (m->forwardVel >= 0.0f) ? ACT_THROWN_FORWARD : ACT_THROWN_BACKWARD, thrown); @@ -665,7 +681,7 @@ s32 act_in_cannon(struct MarioState *m) { switch (m->actionState) { case 0: - m->marioObj->header.gfx.node.flags &= ~0x0001; + m->marioObj->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE; m->usedObj->oInteractStatus = INT_STATUS_INTERACTED; m->statusForCamera->cameraEvent = CAM_EVENT_CANNON; @@ -725,14 +741,20 @@ s32 act_in_cannon(struct MarioState *m) { play_sound(SOUND_ACTION_FLYING_FAST, m->marioObj->header.gfx.cameraToObject); play_sound(SOUND_OBJ_POUNDING_CANNON, m->marioObj->header.gfx.cameraToObject); - m->marioObj->header.gfx.node.flags |= 0x0001; + m->marioObj->header.gfx.node.flags |= GRAPH_RENDER_ACTIVE; set_mario_action(m, ACT_SHOT_FROM_CANNON, 0); +#ifdef VERSION_SH + queue_rumble_data(60, 70); +#endif m->usedObj->oAction = 2; return FALSE; } else { if (m->faceAngle[0] != startFacePitch || m->faceAngle[1] != startFaceYaw) { play_sound(SOUND_MOVING_AIM_CANNON, m->marioObj->header.gfx.cameraToObject); +#ifdef VERSION_SH + reset_rumble_timers_2(0); +#endif } } } @@ -818,6 +840,9 @@ s32 act_tornado_twirling(struct MarioState *m) { vec3f_copy(m->marioObj->header.gfx.pos, m->pos); vec3s_set(m->marioObj->header.gfx.angle, 0, m->faceAngle[1] + m->twirlYaw, 0); +#ifdef VERSION_SH + reset_rumble_timers(); +#endif return FALSE; } diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index 5402d333..475873d1 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -1,7 +1,7 @@ #include #include "prevent_bss_reordering.h" #include "sm64.h" -#include "game.h" +#include "game_init.h" #include "sound_init.h" #include "level_update.h" #include "interaction.h" @@ -12,7 +12,6 @@ #include "area.h" #include "camera.h" #include "object_helpers.h" -#include "object_helpers2.h" #include "moving_texture.h" #include "ingame_menu.h" #include "audio/external.h" @@ -25,6 +24,7 @@ #include "object_list_processor.h" #include "level_table.h" #include "dialog_ids.h" +#include "thread6.h" // TODO: put this elsewhere enum SaveOption { SAVE_OPT_SAVE_AND_CONTINUE = 1, SAVE_OPT_SAVE_AND_QUIT, SAVE_OPT_CONTINUE_DONT_SAVE }; @@ -70,18 +70,6 @@ static Vec4s sJumboStarKeyframes[27] = { { 0, -3500, 2100, -2000 }, { 0, -2000, 2200, -3500 }, { 0, 0, 2300, -4000 }, }; -static s32 sSparkleGenTheta = 0; -static s32 sSparkleGenPhi = 0; - -// blink twice then have half-shut eyes (see end_peach_cutscene_kiss_from_peach) -static u8 sMarioBlinkOverride[20] = { - MARIO_EYES_HALF_CLOSED, MARIO_EYES_HALF_CLOSED, MARIO_EYES_CLOSED, MARIO_EYES_CLOSED, - MARIO_EYES_HALF_CLOSED, MARIO_EYES_HALF_CLOSED, MARIO_EYES_OPEN, MARIO_EYES_OPEN, - MARIO_EYES_HALF_CLOSED, MARIO_EYES_HALF_CLOSED, MARIO_EYES_CLOSED, MARIO_EYES_CLOSED, - MARIO_EYES_HALF_CLOSED, MARIO_EYES_HALF_CLOSED, MARIO_EYES_OPEN, MARIO_EYES_OPEN, - MARIO_EYES_HALF_CLOSED, MARIO_EYES_HALF_CLOSED, MARIO_EYES_CLOSED, MARIO_EYES_CLOSED, -}; - /** * get_credits_str_width: Calculate width of a Credits String * Loop over each character in a credits string and increment the length. If the @@ -610,9 +598,9 @@ void general_star_dance_handler(struct MarioState *m, s32 isInWater) { play_course_clear(); } else { if (gCurrLevelNum == LEVEL_BOWSER_1 || gCurrLevelNum == LEVEL_BOWSER_2) { - play_music(1, SEQUENCE_ARGS(15, SEQ_EVENT_CUTSCENE_COLLECT_KEY), 0); + play_music(SEQ_PLAYER_ENV, SEQUENCE_ARGS(15, SEQ_EVENT_CUTSCENE_COLLECT_KEY), 0); } else { - play_music(1, SEQUENCE_ARGS(15, SEQ_EVENT_CUTSCENE_COLLECT_STAR), 0); + play_music(SEQ_PLAYER_ENV, SEQUENCE_ARGS(15, SEQ_EVENT_CUTSCENE_COLLECT_STAR), 0); } } break; @@ -996,7 +984,7 @@ s32 act_emerge_from_pipe(struct MarioState *m) { play_sound_if_no_flag(m, SOUND_MARIO_YAHOO, MARIO_MARIO_SOUND_PLAYED); - if (gCurrLevelNum == 13) { + if (gCurrLevelNum == LEVEL_THI) { if (gCurrAreaIndex == 2) { play_sound_if_no_flag(m, SOUND_MENU_EXIT_PIPE, MARIO_ACTION_SOUND_PLAYED); } else { @@ -1177,6 +1165,9 @@ s32 act_death_exit(struct MarioState *m) { play_sound(SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject); #else play_sound(SOUND_MARIO_OOOF2, m->marioObj->header.gfx.cameraToObject); +#endif +#ifdef VERSION_SH + queue_rumble_data(5, 80); #endif m->numLives--; // restore 7.75 units of health @@ -1209,6 +1200,9 @@ s32 act_falling_death_exit(struct MarioState *m) { play_sound(SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject); #else play_sound(SOUND_MARIO_OOOF2, m->marioObj->header.gfx.cameraToObject); +#endif +#ifdef VERSION_SH + queue_rumble_data(5, 80); #endif m->numLives--; // restore 7.75 units of health @@ -1254,6 +1248,9 @@ s32 act_special_death_exit(struct MarioState *m) { } if (launch_mario_until_land(m, ACT_HARD_BACKWARD_GROUND_KB, MARIO_ANIM_BACKWARD_AIR_KB, -24.0f)) { +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif m->numLives--; m->healCounter = 31; } @@ -1337,6 +1334,9 @@ s32 act_bbh_enter_spin(struct MarioState *m) { m->flags &= ~MARIO_UNKNOWN_08; if (perform_air_step(m, 0) == AIR_STEP_LANDED) { level_trigger_warp(m, WARP_OP_UNKNOWN_02); +#ifdef VERSION_SH + queue_rumble_data(15, 80); +#endif m->actionState = 4; } if (m->actionState == 2) { @@ -1401,6 +1401,14 @@ s32 act_teleport_fade_out(struct MarioState *m) { play_sound_if_no_flag(m, SOUND_ACTION_TELEPORT, MARIO_ACTION_SOUND_PLAYED); set_mario_animation(m, m->prevAction == ACT_CROUCHING ? MARIO_ANIM_CROUCHING : MARIO_ANIM_FIRST_PERSON); + +#ifdef VERSION_SH + if (m->actionTimer == 0) { + queue_rumble_data(30, 70); + func_sh_8024C89C(2); + } +#endif + m->flags |= MARIO_TELEPORTING; if (m->actionTimer < 32) { @@ -1420,6 +1428,13 @@ s32 act_teleport_fade_in(struct MarioState *m) { play_sound_if_no_flag(m, SOUND_ACTION_TELEPORT, MARIO_ACTION_SOUND_PLAYED); set_mario_animation(m, MARIO_ANIM_FIRST_PERSON); +#ifdef VERSION_SH + if (m->actionTimer == 0) { + queue_rumble_data(30, 70); + func_sh_8024C89C(2); + } +#endif + if (m->actionTimer < 32) { m->flags |= MARIO_TELEPORTING; m->fadeWarpOpacity = m->actionTimer << 3; @@ -1507,6 +1522,9 @@ s32 act_squished(struct MarioState *m) { // Both of the 1.8's are really floats, but one of them has to // be written as a double for this to match on EU. vec3f_set(m->marioObj->header.gfx.scale, 1.8, 0.05f, 1.8f); +#ifdef VERSION_SH + queue_rumble_data(10, 80); +#endif m->actionState = 1; } break; @@ -1608,6 +1626,9 @@ void stuck_in_ground_handler(struct MarioState *m, s32 animation, s32 unstuckFra if (animFrame == -1) { play_sound_and_spawn_particles(m, SOUND_ACTION_TERRAIN_STUCK_IN_GROUND, 1); } else if (animFrame == unstuckFrame) { +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif play_sound_and_spawn_particles(m, SOUND_ACTION_UNSTUCK_FROM_GROUND, 1); } else if (animFrame == target2 || animFrame == target3) { play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); @@ -1940,15 +1961,13 @@ static s32 act_jumbo_star_cutscene(struct MarioState *m) { return FALSE; } -// TODO: (Scrub C) This function almost certainly has a version that matches for both -g and -O2 -static void generate_yellow_sparkles(s16 x, s16 y, s16 z, f32 radius) { +void generate_yellow_sparkles(s16 x, s16 y, s16 z, f32 radius) { + static s32 sSparkleGenTheta = 0; + static s32 sSparkleGenPhi = 0; + s16 offsetX = radius * coss(sSparkleGenTheta) * sins(sSparkleGenPhi); s16 offsetY = radius * sins(sSparkleGenTheta); s16 offsetZ = radius * coss(sSparkleGenTheta) * coss(sSparkleGenPhi); -#ifdef VERSION_EU - s16 dTheta = 0x3800; - s16 dPhi = 0x6000; -#endif spawn_object_abs_with_rot(gCurrentObject, 0, MODEL_NONE, bhvSparkleSpawn, x + offsetX, y + offsetY, z + offsetZ, 0, 0, 0); @@ -1961,16 +1980,10 @@ static void generate_yellow_sparkles(s16 x, s16 y, s16 z, f32 radius) { spawn_object_abs_with_rot(gCurrentObject, 0, MODEL_NONE, bhvSparkleSpawn, x - offsetX, y - offsetY, z - offsetZ, 0, 0, 0); -#ifdef VERSION_EU - sSparkleGenTheta += dTheta; - sSparkleGenPhi += dPhi; -#else sSparkleGenTheta += 0x3800; sSparkleGenPhi += 0x6000; -#endif } - // not sure what this does, returns the height of the floor, but idk about the // other stuff (animation related?) static f32 end_obj_set_visual_pos(struct Object *o) { @@ -2196,7 +2209,7 @@ static void end_peach_cutscene_dialog_1(struct MarioState *m) { case 230: set_cutscene_message(160, 227, 0, 30); #ifndef VERSION_JP - func_8031FFB4(0, 60, 40); + func_8031FFB4(SEQ_PLAYER_LEVEL, 60, 40); play_sound(SOUND_PEACH_MARIO, sEndPeachObj->header.gfx.cameraToObject); #endif break; @@ -2269,6 +2282,15 @@ static void end_peach_cutscene_dialog_2(struct MarioState *m) { #undef TIMER_SOMETHING_SPECIAL #undef TIMER_PEACH_KISS +// blink twice then have half-shut eyes (see end_peach_cutscene_kiss_from_peach) +static u8 sMarioBlinkOverride[20] = { + MARIO_EYES_HALF_CLOSED, MARIO_EYES_HALF_CLOSED, MARIO_EYES_CLOSED, MARIO_EYES_CLOSED, + MARIO_EYES_HALF_CLOSED, MARIO_EYES_HALF_CLOSED, MARIO_EYES_OPEN, MARIO_EYES_OPEN, + MARIO_EYES_HALF_CLOSED, MARIO_EYES_HALF_CLOSED, MARIO_EYES_CLOSED, MARIO_EYES_CLOSED, + MARIO_EYES_HALF_CLOSED, MARIO_EYES_HALF_CLOSED, MARIO_EYES_OPEN, MARIO_EYES_OPEN, + MARIO_EYES_HALF_CLOSED, MARIO_EYES_HALF_CLOSED, MARIO_EYES_CLOSED, MARIO_EYES_CLOSED, +}; + static void end_peach_cutscene_kiss_from_peach(struct MarioState *m) { sEndPeachAnimation = 10; @@ -2348,7 +2370,7 @@ static void end_peach_cutscene_star_dance(struct MarioState *m) { case 140: #ifndef VERSION_JP - sequence_player_unlower(0, 60); + sequence_player_unlower(SEQ_PLAYER_LEVEL, 60); #endif play_cutscene_music(SEQUENCE_ARGS(15, SEQ_EVENT_CUTSCENE_CREDITS)); break; @@ -2523,7 +2545,7 @@ static s32 act_credits_cutscene(struct MarioState *m) { vec3f_copy(m->marioObj->header.gfx.pos, m->pos); // will copy over roll and pitch, if set vec3s_copy(m->marioObj->header.gfx.angle, m->faceAngle); - m->particleFlags |= PARTICLE_5; + m->particleFlags |= PARTICLE_BUBBLE; } else { set_mario_animation(m, MARIO_ANIM_FIRST_PERSON); if (m->actionTimer > 0) { diff --git a/src/game/mario_actions_moving.c b/src/game/mario_actions_moving.c index b173eb8b..57290d2e 100644 --- a/src/game/mario_actions_moving.c +++ b/src/game/mario_actions_moving.c @@ -11,6 +11,7 @@ #include "mario_actions_object.h" #include "memory.h" #include "behavior_data.h" +#include "thread6.h" struct LandingAction { s16 numFrames; @@ -35,11 +36,11 @@ struct LandingAction sSideFlipLandAction = { }; struct LandingAction sHoldJumpLandAction = { - 4, 5, ACT_HOLD_FREEFALL, ACT_UNKNOWN_034, ACT_HOLD_JUMP, ACT_HOLD_FREEFALL, ACT_HOLD_BEGIN_SLIDING, + 4, 5, ACT_HOLD_FREEFALL, ACT_HOLD_JUMP_LAND_STOP, ACT_HOLD_JUMP, ACT_HOLD_FREEFALL, ACT_HOLD_BEGIN_SLIDING, }; struct LandingAction sHoldFreefallLandAction = { - 4, 5, ACT_HOLD_FREEFALL, ACT_UNKNOWN_035, ACT_HOLD_JUMP, ACT_HOLD_FREEFALL, ACT_HOLD_BEGIN_SLIDING, + 4, 5, ACT_HOLD_FREEFALL, ACT_HOLD_FREEFALL_LAND_STOP, ACT_HOLD_JUMP, ACT_HOLD_FREEFALL, ACT_HOLD_BEGIN_SLIDING, }; struct LandingAction sLongJumpLandAction = { @@ -1229,7 +1230,7 @@ s32 act_riding_shell_ground(struct MarioState *m) { mario_stop_riding_object(m); play_sound(m->flags & MARIO_METAL_CAP ? SOUND_ACTION_METAL_BONK : SOUND_ACTION_BONK, m->marioObj->header.gfx.cameraToObject); - m->particleFlags |= PARTICLE_1; + m->particleFlags |= PARTICLE_VERTICAL_STAR; set_mario_action(m, ACT_BACKWARD_GROUND_KB, 0); break; } @@ -1243,6 +1244,9 @@ s32 act_riding_shell_ground(struct MarioState *m) { } adjust_sound_for_speed(m); +#ifdef VERSION_SH + reset_rumble_timers(); +#endif return FALSE; } @@ -1254,7 +1258,7 @@ s32 act_crawling(struct MarioState *m) { } if (m->input & INPUT_FIRST_PERSON) { - return set_mario_action(m, ACT_UNKNOWN_024, 0); + return set_mario_action(m, ACT_STOP_CRAWLING, 0); } if (m->input & INPUT_A_PRESSED) { @@ -1266,11 +1270,11 @@ s32 act_crawling(struct MarioState *m) { } if (m->input & INPUT_UNKNOWN_5) { - return set_mario_action(m, ACT_UNKNOWN_024, 0); + return set_mario_action(m, ACT_STOP_CRAWLING, 0); } if (!(m->input & INPUT_Z_DOWN)) { - return set_mario_action(m, ACT_UNKNOWN_024, 0); + return set_mario_action(m, ACT_STOP_CRAWLING, 0); } m->intendedMag *= 0.1f; @@ -1337,7 +1341,7 @@ s32 act_burning_ground(struct MarioState *m) { set_mario_anim_with_accel(m, MARIO_ANIM_RUNNING, (s32)(m->forwardVel / 2.0f * 0x10000)); play_step_sound(m, 9, 45); - m->particleFlags |= PARTICLE_11; + m->particleFlags |= PARTICLE_FIRE; play_sound(SOUND_MOVING_LAVA_BURN, m->marioObj->header.gfx.cameraToObject); m->health -= 10; @@ -1346,6 +1350,9 @@ s32 act_burning_ground(struct MarioState *m) { } m->marioBodyState->eyeState = MARIO_EYES_DEAD; +#ifdef VERSION_SH + reset_rumble_timers(); +#endif return FALSE; } @@ -1361,6 +1368,10 @@ void common_slide_action(struct MarioState *m, u32 endAction, u32 airAction, s32 vec3f_copy(val14, m->pos); play_sound(SOUND_MOVING_TERRAIN_SLIDE + m->terrainSoundAddend, m->marioObj->header.gfx.cameraToObject); +#ifdef VERSION_SH + reset_rumble_timers(); +#endif + adjust_sound_for_speed(m); switch (perform_ground_step(m)) { @@ -1380,10 +1391,10 @@ void common_slide_action(struct MarioState *m, u32 endAction, u32 airAction, s32 case GROUND_STEP_HIT_WALL: if (!mario_floor_is_slippery(m)) { #ifdef VERSION_JP - m->particleFlags |= PARTICLE_1; + m->particleFlags |= PARTICLE_VERTICAL_STAR; #else if (m->forwardVel > 16.0f) { - m->particleFlags |= PARTICLE_1; + m->particleFlags |= PARTICLE_VERTICAL_STAR; } #endif slide_bonk(m, ACT_GROUND_BONK, endAction); @@ -1438,7 +1449,7 @@ s32 act_hold_butt_slide(struct MarioState *m) { return drop_and_set_mario_action(m, ACT_BUTT_SLIDE, 0); } - cancel = common_slide_action_with_jump(m, ACT_UNKNOWN_03F, ACT_HOLD_JUMP, ACT_HOLD_BUTT_SLIDE_AIR, + cancel = common_slide_action_with_jump(m, ACT_HOLD_BUTT_SLIDE_STOP, ACT_HOLD_JUMP, ACT_HOLD_BUTT_SLIDE_AIR, MARIO_ANIM_SLIDING_ON_BOTTOM_WITH_LIGHT_OBJ); tilt_body_butt_slide(m); return cancel; @@ -1483,6 +1494,9 @@ s32 act_crouch_slide(struct MarioState *m) { s32 act_slide_kick_slide(struct MarioState *m) { if (m->input & INPUT_A_PRESSED) { +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif return set_jumping_action(m, ACT_FORWARD_ROLLOUT, 0); } @@ -1499,7 +1513,7 @@ s32 act_slide_kick_slide(struct MarioState *m) { case GROUND_STEP_HIT_WALL: mario_bonk_reflection(m, TRUE); - m->particleFlags |= PARTICLE_1; + m->particleFlags |= PARTICLE_VERTICAL_STAR; set_mario_action(m, ACT_BACKWARD_GROUND_KB, 0); break; } @@ -1512,6 +1526,9 @@ s32 act_slide_kick_slide(struct MarioState *m) { s32 stomach_slide_action(struct MarioState *m, u32 stopAction, u32 airAction, s32 animation) { if (m->actionTimer == 5) { if (!(m->input & INPUT_ABOVE_SLIDE) && (m->input & (INPUT_A_PRESSED | INPUT_B_PRESSED))) { +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif return drop_and_set_mario_action( m, m->forwardVel >= 0.0f ? ACT_FORWARD_ROLLOUT : ACT_BACKWARD_ROLLOUT, 0); } @@ -1545,6 +1562,9 @@ s32 act_hold_stomach_slide(struct MarioState *m) { s32 act_dive_slide(struct MarioState *m) { if (!(m->input & INPUT_ABOVE_SLIDE) && (m->input & (INPUT_A_PRESSED | INPUT_B_PRESSED))) { +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif return set_mario_action(m, m->forwardVel > 0.0f ? ACT_FORWARD_ROLLOUT : ACT_BACKWARD_ROLLOUT, 0); } @@ -1829,6 +1849,13 @@ s32 act_hold_freefall_land(struct MarioState *m) { } s32 act_long_jump_land(struct MarioState *m) { +#ifdef VERSION_SH + // BLJ (Backwards Long Jump) speed build up fix, crushing SimpleFlips's dreams since July 1997 + if (m->forwardVel < 0.0f) { + m->forwardVel = 0.0f; + } +#endif + if (!(m->input & INPUT_Z_DOWN)) { m->input &= ~INPUT_A_PRESSED; } @@ -1922,7 +1949,7 @@ s32 act_quicksand_jump_land(struct MarioState *m) { s32 act_hold_quicksand_jump_land(struct MarioState *m) { s32 cancel = quicksand_jump_land_action(m, MARIO_ANIM_JUMP_WITH_LIGHT_OBJ, - MARIO_ANIM_JUMP_LAND_WITH_LIGHT_OBJ, ACT_UNKNOWN_034, + MARIO_ANIM_JUMP_LAND_WITH_LIGHT_OBJ, ACT_HOLD_JUMP_LAND_STOP, ACT_HOLD_FREEFALL); return cancel; } @@ -1933,7 +1960,7 @@ s32 check_common_moving_cancels(struct MarioState *m) { } if (!(m->action & ACT_FLAG_INVULNERABLE) && (m->input & INPUT_UNKNOWN_10)) { - return drop_and_set_mario_action(m, ACT_UNKNOWN_026, 0); + return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_SQUISHED) { diff --git a/src/game/mario_actions_object.c b/src/game/mario_actions_object.c index ba3e5765..5c71e962 100644 --- a/src/game/mario_actions_object.c +++ b/src/game/mario_actions_object.c @@ -9,6 +9,7 @@ #include "interaction.h" #include "audio_defines.h" #include "engine/math_util.h" +#include "thread6.h" /** * Used by act_punching() to determine Mario's forward velocity during each @@ -146,7 +147,7 @@ s32 mario_update_punch_sequence(struct MarioState *m) { s32 act_punching(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return drop_and_set_mario_action(m, ACT_UNKNOWN_026, 0); + return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE)) { @@ -174,7 +175,7 @@ s32 act_punching(struct MarioState *m) { s32 act_picking_up(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return drop_and_set_mario_action(m, ACT_UNKNOWN_026, 0); + return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -212,7 +213,7 @@ s32 act_picking_up(struct MarioState *m) { s32 act_dive_picking_up(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return drop_and_set_mario_action(m, ACT_UNKNOWN_026, 0); + return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } //! Hands-free holding. Landing on a slope or being pushed off a ledge while @@ -232,7 +233,7 @@ s32 act_dive_picking_up(struct MarioState *m) { s32 act_placing_down(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return drop_and_set_mario_action(m, ACT_UNKNOWN_026, 0); + return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -253,7 +254,7 @@ s32 act_throwing(struct MarioState *m) { } if (m->input & INPUT_UNKNOWN_10) { - return drop_and_set_mario_action(m, ACT_UNKNOWN_026, 0); + return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -264,6 +265,9 @@ s32 act_throwing(struct MarioState *m) { mario_throw_held_object(m); play_sound_if_no_flag(m, SOUND_MARIO_WAH2, MARIO_MARIO_SOUND_PLAYED); play_sound_if_no_flag(m, SOUND_ACTION_THROW, MARIO_ACTION_SOUND_PLAYED); +#ifdef VERSION_SH + queue_rumble_data(3, 50); +#endif } animated_stationary_ground_step(m, MARIO_ANIM_GROUND_THROW, ACT_IDLE); @@ -272,7 +276,7 @@ s32 act_throwing(struct MarioState *m) { s32 act_heavy_throw(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return drop_and_set_mario_action(m, ACT_UNKNOWN_026, 0); + return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -283,6 +287,9 @@ s32 act_heavy_throw(struct MarioState *m) { mario_drop_held_object(m); play_sound_if_no_flag(m, SOUND_MARIO_WAH2, MARIO_MARIO_SOUND_PLAYED); play_sound_if_no_flag(m, SOUND_ACTION_THROW, MARIO_ACTION_SOUND_PLAYED); +#ifdef VERSION_SH + queue_rumble_data(3, 50); +#endif } animated_stationary_ground_step(m, MARIO_ANIM_HEAVY_THROW, ACT_IDLE); @@ -291,7 +298,7 @@ s32 act_heavy_throw(struct MarioState *m) { s32 act_stomach_slide_stop(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -312,6 +319,9 @@ s32 act_picking_up_bowser(struct MarioState *m) { m->angleVel[1] = 0; m->marioBodyState->grabPos = GRAB_POS_BOWSER; mario_grab_used_object(m); +#ifdef VERSION_SH + queue_rumble_data(5, 80); +#endif play_sound(SOUND_MARIO_HRMM, m->marioObj->header.gfx.cameraToObject); } @@ -387,9 +397,15 @@ s32 act_holding_bowser(struct MarioState *m) { // play sound on overflow if (m->angleVel[1] <= -0x100 && spin < m->faceAngle[1]) { +#ifdef VERSION_SH + queue_rumble_data(4, 20); +#endif play_sound(SOUND_OBJ_BOWSER_SPINNING, m->marioObj->header.gfx.cameraToObject); } if (m->angleVel[1] >= 0x100 && spin > m->faceAngle[1]) { +#ifdef VERSION_SH + queue_rumble_data(4, 20); +#endif play_sound(SOUND_OBJ_BOWSER_SPINNING, m->marioObj->header.gfx.cameraToObject); } @@ -406,8 +422,14 @@ s32 act_holding_bowser(struct MarioState *m) { s32 act_releasing_bowser(struct MarioState *m) { if (++m->actionTimer == 1) { if (m->actionArg == 0) { +#ifdef VERSION_SH + queue_rumble_data(4, 50); +#endif mario_throw_held_object(m); } else { +#ifdef VERSION_SH + queue_rumble_data(4, 50); +#endif mario_drop_held_object(m); } } diff --git a/src/game/mario_actions_stationary.c b/src/game/mario_actions_stationary.c index 4592b691..33d2919d 100644 --- a/src/game/mario_actions_stationary.c +++ b/src/game/mario_actions_stationary.c @@ -14,6 +14,7 @@ #include "level_update.h" #include "save_file.h" #include "camera.h" +#include "thread6.h" s32 check_common_idle_cancels(struct MarioState *m) { mario_drop_held_object(m); @@ -22,7 +23,7 @@ s32 check_common_idle_cancels(struct MarioState *m) { } if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_A_PRESSED) { @@ -69,7 +70,7 @@ s32 check_common_hold_idle_cancels(struct MarioState *m) { } if (m->input & INPUT_UNKNOWN_10) { - return drop_and_set_mario_action(m, ACT_UNKNOWN_026, 0); + return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_A_PRESSED) { @@ -340,7 +341,7 @@ s32 act_waking_up(struct MarioState *m) { } if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -368,7 +369,7 @@ s32 act_shivering(struct MarioState *m) { s32 sp24; if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -388,7 +389,7 @@ s32 act_shivering(struct MarioState *m) { case 0: { sp24 = set_mario_animation(m, MARIO_ANIM_SHIVERING_WARMING_HAND); if (sp24 == 0x31) { - m->particleFlags |= PARTICLE_17; + m->particleFlags |= PARTICLE_BREATH; play_sound(SOUND_MARIO_PANTING_COLD, m->marioObj->header.gfx.cameraToObject); } if (sp24 == 7 || sp24 == 0x51) { @@ -465,7 +466,7 @@ s32 act_hold_idle(struct MarioState *m) { s32 act_hold_heavy_idle(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return drop_and_set_mario_action(m, ACT_UNKNOWN_026, 0); + return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -491,7 +492,7 @@ s32 act_hold_heavy_idle(struct MarioState *m) { s32 act_standing_against_wall(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE)) { @@ -532,7 +533,7 @@ s32 act_in_quicksand(struct MarioState *m) { s32 act_crouching(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_A_PRESSED) { @@ -548,11 +549,11 @@ s32 act_crouching(struct MarioState *m) { } if (m->input & INPUT_FIRST_PERSON) { - return set_mario_action(m, ACT_UNKNOWN_022, 0); + return set_mario_action(m, ACT_STOP_CROUCHING, 0); } if (!(m->input & INPUT_Z_DOWN)) { - return set_mario_action(m, ACT_UNKNOWN_022, 0); + return set_mario_action(m, ACT_STOP_CROUCHING, 0); } if (m->input & INPUT_NONZERO_ANALOG) { @@ -570,7 +571,7 @@ s32 act_crouching(struct MarioState *m) { s32 act_panting(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->health >= 0x500) { @@ -597,7 +598,7 @@ s32 act_hold_panting_unused(struct MarioState *m) { } if (m->input & INPUT_UNKNOWN_10) { - return drop_and_set_mario_action(m, ACT_UNKNOWN_026, 0); + return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->health >= 0x500) { @@ -624,7 +625,7 @@ void stopping_step(struct MarioState *m, s32 animID, u32 action) { s32 act_braking_stop(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -646,7 +647,7 @@ s32 act_braking_stop(struct MarioState *m) { s32 act_butt_slide_stop(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE)) { @@ -661,13 +662,13 @@ s32 act_butt_slide_stop(struct MarioState *m) { return 0; } -s32 act_unknown_03F(struct MarioState *m) { +s32 act_hold_butt_slide_stop(struct MarioState *m) { if (m->marioObj->oInteractStatus & INT_STATUS_MARIO_DROP_OBJECT) { return drop_and_set_mario_action(m, ACT_IDLE, 0); } if (m->input & INPUT_UNKNOWN_10) { - return drop_and_set_mario_action(m, ACT_UNKNOWN_026, 0); + return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE)) { @@ -684,7 +685,7 @@ s32 act_unknown_03F(struct MarioState *m) { s32 act_slide_kick_slide_stop(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return drop_and_set_mario_action(m, ACT_UNKNOWN_026, 0); + return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -697,7 +698,7 @@ s32 act_slide_kick_slide_stop(struct MarioState *m) { s32 act_start_crouching(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -722,7 +723,7 @@ s32 act_start_crouching(struct MarioState *m) { s32 act_stop_crouching(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -747,7 +748,7 @@ s32 act_stop_crouching(struct MarioState *m) { s32 act_start_crawling(struct MarioState *m) { if (m->input & INPUT_FIRST_PERSON) { - return set_mario_action(m, ACT_UNKNOWN_022, 0); + return set_mario_action(m, ACT_STOP_CROUCHING, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -755,7 +756,7 @@ s32 act_start_crawling(struct MarioState *m) { } if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_ABOVE_SLIDE) { @@ -773,7 +774,7 @@ s32 act_start_crawling(struct MarioState *m) { s32 act_stop_crawling(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -792,15 +793,21 @@ s32 act_stop_crawling(struct MarioState *m) { return 0; } -s32 act_unknown_026(struct MarioState *m) { +s32 act_shockwave_bounce(struct MarioState *m) { s16 sp1E; f32 sp18; if (m->marioObj->oInteractStatus & 0x10) { +#ifdef VERSION_SH + queue_rumble_data(70, 40); +#endif return hurt_and_set_mario_action(m, ACT_SHOCKED, 0, 4); } if (m->actionTimer == 0) { +#ifdef VERSION_SH + queue_rumble_data(70, 40); +#endif if (m->marioObj->oInteractStatus & INT_STATUS_MARIO_UNK1) { return hurt_and_set_mario_action(m, ACT_BACKWARD_GROUND_KB, 0, 0xc); } @@ -837,7 +844,7 @@ s32 landing_step(struct MarioState *m, s32 arg1, u32 action) { s32 check_common_landing_cancels(struct MarioState *m, u32 action) { if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_FIRST_PERSON) { @@ -946,13 +953,13 @@ s32 act_long_jump_land_stop(struct MarioState *m) { return 0; } -s32 act_unknown_034(struct MarioState *m) { +s32 act_hold_jump_land_stop(struct MarioState *m) { if (m->marioObj->oInteractStatus & INT_STATUS_MARIO_DROP_OBJECT) { return drop_and_set_mario_action(m, ACT_IDLE, 0); } if (m->input & INPUT_UNKNOWN_10) { - return drop_and_set_mario_action(m, ACT_UNKNOWN_026, 0); + return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE)) { @@ -967,13 +974,13 @@ s32 act_unknown_034(struct MarioState *m) { return 0; } -s32 act_unknown_035(struct MarioState *m) { +s32 act_hold_freefall_land_stop(struct MarioState *m) { if (m->marioObj->oInteractStatus & INT_STATUS_MARIO_DROP_OBJECT) { return drop_and_set_mario_action(m, ACT_IDLE, 0); } if (m->input & INPUT_UNKNOWN_10) { - return drop_and_set_mario_action(m, ACT_UNKNOWN_026, 0); + return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & (INPUT_NONZERO_ANALOG | INPUT_A_PRESSED | INPUT_OFF_FLOOR | INPUT_ABOVE_SLIDE)) { @@ -989,7 +996,7 @@ s32 act_unknown_035(struct MarioState *m) { s32 act_air_throw_land(struct MarioState *m) { if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -1007,7 +1014,7 @@ s32 act_air_throw_land(struct MarioState *m) { s32 act_twirl_land(struct MarioState *m) { m->actionState = 1; if (m->input & INPUT_UNKNOWN_10) { - return set_mario_action(m, ACT_UNKNOWN_026, 0); + return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -1039,7 +1046,7 @@ s32 act_twirl_land(struct MarioState *m) { s32 act_ground_pound_land(struct MarioState *m) { m->actionState = 1; if (m->input & INPUT_UNKNOWN_10) { - return drop_and_set_mario_action(m, ACT_UNKNOWN_026, 0); + return drop_and_set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0); } if (m->input & INPUT_OFF_FLOOR) { @@ -1126,42 +1133,42 @@ s32 mario_execute_stationary_action(struct MarioState *m) { /* clang-format off */ switch (m->action) { - case ACT_IDLE: sp24 = act_idle(m); break; - case ACT_START_SLEEPING: sp24 = act_start_sleeping(m); break; - case ACT_SLEEPING: sp24 = act_sleeping(m); break; - case ACT_WAKING_UP: sp24 = act_waking_up(m); break; - case ACT_PANTING: sp24 = act_panting(m); break; - case ACT_HOLD_PANTING_UNUSED: sp24 = act_hold_panting_unused(m); break; - case ACT_HOLD_IDLE: sp24 = act_hold_idle(m); break; - case ACT_HOLD_HEAVY_IDLE: sp24 = act_hold_heavy_idle(m); break; - case ACT_IN_QUICKSAND: sp24 = act_in_quicksand(m); break; - case ACT_STANDING_AGAINST_WALL: sp24 = act_standing_against_wall(m); break; - case ACT_COUGHING: sp24 = act_coughing(m); break; - case ACT_SHIVERING: sp24 = act_shivering(m); break; - case ACT_CROUCHING: sp24 = act_crouching(m); break; - case ACT_START_CROUCHING: sp24 = act_start_crouching(m); break; - case ACT_UNKNOWN_022: sp24 = act_stop_crouching(m); break; - case ACT_START_CRAWLING: sp24 = act_start_crawling(m); break; - case ACT_UNKNOWN_024: sp24 = act_stop_crawling(m); break; - case ACT_SLIDE_KICK_SLIDE_STOP: sp24 = act_slide_kick_slide_stop(m); break; - case ACT_UNKNOWN_026: sp24 = act_unknown_026(m); break; - case ACT_FIRST_PERSON: sp24 = act_first_person(m); break; - case ACT_JUMP_LAND_STOP: sp24 = act_jump_land_stop(m); break; - case ACT_DOUBLE_JUMP_LAND_STOP: sp24 = act_double_jump_land_stop(m); break; - case ACT_FREEFALL_LAND_STOP: sp24 = act_freefall_land_stop(m); break; - case ACT_SIDE_FLIP_LAND_STOP: sp24 = act_side_flip_land_stop(m); break; - case ACT_UNKNOWN_034: sp24 = act_unknown_034(m); break; - case ACT_UNKNOWN_035: sp24 = act_unknown_035(m); break; - case ACT_AIR_THROW_LAND: sp24 = act_air_throw_land(m); break; - case ACT_LAVA_BOOST_LAND: sp24 = act_lava_boost_land(m); break; - case ACT_TWIRL_LAND: sp24 = act_twirl_land(m); break; - case ACT_TRIPLE_JUMP_LAND_STOP: sp24 = act_triple_jump_land_stop(m); break; - case ACT_BACKFLIP_LAND_STOP: sp24 = act_backflip_land_stop(m); break; - case ACT_LONG_JUMP_LAND_STOP: sp24 = act_long_jump_land_stop(m); break; - case ACT_GROUND_POUND_LAND: sp24 = act_ground_pound_land(m); break; - case ACT_BRAKING_STOP: sp24 = act_braking_stop(m); break; - case ACT_BUTT_SLIDE_STOP: sp24 = act_butt_slide_stop(m); break; - case ACT_UNKNOWN_03F: sp24 = act_unknown_03F(m); break; + case ACT_IDLE: sp24 = act_idle(m); break; + case ACT_START_SLEEPING: sp24 = act_start_sleeping(m); break; + case ACT_SLEEPING: sp24 = act_sleeping(m); break; + case ACT_WAKING_UP: sp24 = act_waking_up(m); break; + case ACT_PANTING: sp24 = act_panting(m); break; + case ACT_HOLD_PANTING_UNUSED: sp24 = act_hold_panting_unused(m); break; + case ACT_HOLD_IDLE: sp24 = act_hold_idle(m); break; + case ACT_HOLD_HEAVY_IDLE: sp24 = act_hold_heavy_idle(m); break; + case ACT_IN_QUICKSAND: sp24 = act_in_quicksand(m); break; + case ACT_STANDING_AGAINST_WALL: sp24 = act_standing_against_wall(m); break; + case ACT_COUGHING: sp24 = act_coughing(m); break; + case ACT_SHIVERING: sp24 = act_shivering(m); break; + case ACT_CROUCHING: sp24 = act_crouching(m); break; + case ACT_START_CROUCHING: sp24 = act_start_crouching(m); break; + case ACT_STOP_CROUCHING: sp24 = act_stop_crouching(m); break; + case ACT_START_CRAWLING: sp24 = act_start_crawling(m); break; + case ACT_STOP_CRAWLING: sp24 = act_stop_crawling(m); break; + case ACT_SLIDE_KICK_SLIDE_STOP: sp24 = act_slide_kick_slide_stop(m); break; + case ACT_SHOCKWAVE_BOUNCE: sp24 = act_shockwave_bounce(m); break; + case ACT_FIRST_PERSON: sp24 = act_first_person(m); break; + case ACT_JUMP_LAND_STOP: sp24 = act_jump_land_stop(m); break; + case ACT_DOUBLE_JUMP_LAND_STOP: sp24 = act_double_jump_land_stop(m); break; + case ACT_FREEFALL_LAND_STOP: sp24 = act_freefall_land_stop(m); break; + case ACT_SIDE_FLIP_LAND_STOP: sp24 = act_side_flip_land_stop(m); break; + case ACT_HOLD_JUMP_LAND_STOP: sp24 = act_hold_jump_land_stop(m); break; + case ACT_HOLD_FREEFALL_LAND_STOP: sp24 = act_hold_freefall_land_stop(m); break; + case ACT_AIR_THROW_LAND: sp24 = act_air_throw_land(m); break; + case ACT_LAVA_BOOST_LAND: sp24 = act_lava_boost_land(m); break; + case ACT_TWIRL_LAND: sp24 = act_twirl_land(m); break; + case ACT_TRIPLE_JUMP_LAND_STOP: sp24 = act_triple_jump_land_stop(m); break; + case ACT_BACKFLIP_LAND_STOP: sp24 = act_backflip_land_stop(m); break; + case ACT_LONG_JUMP_LAND_STOP: sp24 = act_long_jump_land_stop(m); break; + case ACT_GROUND_POUND_LAND: sp24 = act_ground_pound_land(m); break; + case ACT_BRAKING_STOP: sp24 = act_braking_stop(m); break; + case ACT_BUTT_SLIDE_STOP: sp24 = act_butt_slide_stop(m); break; + case ACT_HOLD_BUTT_SLIDE_STOP: sp24 = act_hold_butt_slide_stop(m); break; } /* clang-format on */ diff --git a/src/game/mario_actions_stationary.h b/src/game/mario_actions_stationary.h index 1fded715..bb988deb 100644 --- a/src/game/mario_actions_stationary.h +++ b/src/game/mario_actions_stationary.h @@ -24,13 +24,13 @@ extern s32 func_80261C74(struct MarioState *); extern void stopping_step(struct MarioState *, s32, u32); extern s32 act_braking_stop(struct MarioState *); extern s32 act_butt_slide_stop(struct MarioState *); -extern s32 act_unknown_03F(struct MarioState *); +extern s32 act_hold_butt_slide_stop(struct MarioState *); extern s32 act_slide_kick_slide_stop(struct MarioState *); extern s32 act_start_crouching(struct MarioState *); extern s32 act_stop_crouching(struct MarioState *); extern s32 act_start_crawling(struct MarioState *); extern s32 act_stop_crawling(struct MarioState *); -extern s32 act_unknown_026(struct MarioState *); +extern s32 act_shockwave_bounce(struct MarioState *); extern s32 landing_step(struct MarioState *, s32, u32); extern s32 check_common_landing_cancels(struct MarioState *, u32); extern s32 act_jump_land_stop(struct MarioState *); @@ -41,8 +41,8 @@ extern s32 act_triple_jump_land_stop(struct MarioState *); extern s32 act_backflip_land_stop(struct MarioState *); extern s32 act_lava_boost_land(struct MarioState *); extern s32 act_long_jump_land_stop(struct MarioState *); -extern s32 act_unknown_034(struct MarioState *); -extern s32 act_unknown_035(struct MarioState *); +extern s32 act_hold_jump_land_stop(struct MarioState *); +extern s32 act_hold_freefall_land_stop(struct MarioState *); extern s32 act_air_throw_land(struct MarioState *); extern s32 act_twirl_land(struct MarioState *); extern s32 act_ground_pound_land(struct MarioState *); diff --git a/src/game/mario_actions_submerged.c b/src/game/mario_actions_submerged.c index f9634cd5..d563bd17 100644 --- a/src/game/mario_actions_submerged.c +++ b/src/game/mario_actions_submerged.c @@ -15,6 +15,7 @@ #include "audio/external.h" #include "behavior_data.h" #include "level_table.h" +#include "thread6.h" #define MIN_SWIM_STRENGTH 160 #define MIN_SWIM_SPEED 16.0f @@ -553,6 +554,12 @@ static s32 act_breaststroke(struct MarioState *m) { reset_float_globals(m); } +#ifdef VERSION_SH + if (m->actionTimer < 6) { + func_sh_8024CA04(); + } +#endif + set_mario_animation(m, MARIO_ANIM_SWIM_PART1); common_swimming_step(m, sSwimStrength); @@ -795,6 +802,9 @@ static s32 act_water_throw(struct MarioState *m) { if (m->actionTimer++ == 5) { mario_throw_held_object(m); +#ifdef VERSION_SH + queue_rumble_data(3, 50); +#endif } if (is_anim_at_end(m)) { @@ -968,6 +978,11 @@ static s32 act_water_plunge(struct MarioState *m) { m->particleFlags |= PARTICLE_WATER_SPLASH; m->actionState = 1; +#ifdef VERSION_SH + if (m->prevAction & ACT_FLAG_AIR) { + queue_rumble_data(5, 80); + } +#endif } if (stepResult == WATER_STEP_HIT_FLOOR || m->vel[1] >= endVSpeed || m->actionTimer > 20) { @@ -1015,7 +1030,7 @@ static s32 act_water_plunge(struct MarioState *m) { break; } - m->particleFlags |= PARTICLE_9; + m->particleFlags |= PARTICLE_PLUNGE_BUBBLE; return FALSE; } @@ -1072,13 +1087,16 @@ static s32 act_caught_in_whirlpool(struct MarioState *m) { set_mario_animation(m, MARIO_ANIM_GENERAL_FALL); vec3f_copy(m->marioObj->header.gfx.pos, m->pos); vec3s_set(m->marioObj->header.gfx.angle, 0, m->faceAngle[1], 0); +#ifdef VERSION_SH + reset_rumble_timers(); +#endif return FALSE; } static void play_metal_water_jumping_sound(struct MarioState *m, u32 landing) { if (!(m->flags & MARIO_ACTION_SOUND_PLAYED)) { - m->particleFlags |= PARTICLE_16; + m->particleFlags |= PARTICLE_MIST_CIRCLE; } play_sound_if_no_flag(m, landing ? SOUND_ACTION_METAL_LAND_WATER : SOUND_ACTION_METAL_JUMP_WATER, diff --git a/src/game/mario_misc.c b/src/game/mario_misc.c index f68f5d04..1059edbc 100644 --- a/src/game/mario_misc.c +++ b/src/game/mario_misc.c @@ -8,14 +8,13 @@ #include "behavior_actions.h" #include "behavior_data.h" #include "engine/behavior_script.h" -#include "game.h" +#include "game_init.h" #include "engine/graph_node.h" #include "envfx_snow.h" #include "level_update.h" #include "engine/math_util.h" #include "memory.h" #include "object_helpers.h" -#include "object_helpers2.h" #include "goddard/renderer.h" #include "rendering_graph_node.h" #include "save_file.h" diff --git a/src/game/mario_step.c b/src/game/mario_step.c index e40ed68d..226f93ed 100644 --- a/src/game/mario_step.c +++ b/src/game/mario_step.c @@ -5,7 +5,7 @@ #include "engine/surface_collision.h" #include "mario.h" #include "audio/external.h" -#include "display.h" +#include "game_init.h" #include "interaction.h" #include "mario_step.h" diff --git a/src/game/memory.c b/src/game/memory.c index a01869e3..d0bc1b7b 100644 --- a/src/game/memory.c +++ b/src/game/memory.c @@ -5,7 +5,7 @@ #define INCLUDED_FROM_MEMORY_C #include "decompress.h" -#include "game.h" +#include "game_init.h" #include "main.h" #include "segments.h" #include "memory.h" @@ -92,7 +92,7 @@ void move_segment_table_to_dmem(void) { s32 i; for (i = 0; i < 16; i++) - gMoveWd(gDisplayListHead++, 6, i * 4, sSegmentTable[i]); + gSPSegment(gDisplayListHead++, i, sSegmentTable[i]); } /** diff --git a/src/game/obj_behaviors.c b/src/game/obj_behaviors.c index f12f45b7..0e2c7c86 100644 --- a/src/game/obj_behaviors.c +++ b/src/game/obj_behaviors.c @@ -7,11 +7,10 @@ #include "engine/behavior_script.h" #include "engine/surface_collision.h" #include "engine/math_util.h" -#include "display.h" #include "object_helpers.h" #include "behavior_data.h" #include "mario.h" -#include "game.h" +#include "game_init.h" #include "camera.h" #include "mario_actions_cutscene.h" #include "object_list_processor.h" @@ -559,9 +558,9 @@ void obj_return_and_displace_home(struct Object *obj, f32 homeX, UNUSED f32 home s16 angleToNewHome; f32 homeDistX, homeDistZ; - if ((s32)(RandomFloat() * 50.0f) == 0) { - obj->oHomeX = (f32)(baseDisp * 2) * RandomFloat() - (f32) baseDisp + homeX; - obj->oHomeZ = (f32)(baseDisp * 2) * RandomFloat() - (f32) baseDisp + homeZ; + if ((s32)(random_float() * 50.0f) == 0) { + obj->oHomeX = (f32)(baseDisp * 2) * random_float() - (f32) baseDisp + homeX; + obj->oHomeZ = (f32)(baseDisp * 2) * random_float() - (f32) baseDisp + homeZ; } homeDistX = obj->oHomeX - obj->oPosX; @@ -618,9 +617,9 @@ void obj_spawn_yellow_coins(struct Object *obj, s8 nCoins) { for (count = 0; count < nCoins; count++) { coin = spawn_object(obj, MODEL_YELLOW_COIN, bhvMovingYellowCoin); - coin->oForwardVel = RandomFloat() * 20; - coin->oVelY = RandomFloat() * 40 + 20; - coin->oMoveAngleYaw = RandomU16(); + coin->oForwardVel = random_float() * 20; + coin->oVelY = random_float() * 40 + 20; + coin->oMoveAngleYaw = random_u16(); } } @@ -741,10 +740,10 @@ s32 obj_lava_death(void) { if ((o->oTimer % 8) == 0) { cur_obj_play_sound_2(SOUND_OBJ_BULLY_EXPLODE_2); deathSmoke = spawn_object(o, MODEL_SMOKE, bhvBobombBullyDeathSmoke); - deathSmoke->oPosX += RandomFloat() * 20.0f; - deathSmoke->oPosY += RandomFloat() * 20.0f; - deathSmoke->oPosZ += RandomFloat() * 20.0f; - deathSmoke->oForwardVel = RandomFloat() * 10.0f; + deathSmoke->oPosX += random_float() * 20.0f; + deathSmoke->oPosY += random_float() * 20.0f; + deathSmoke->oPosZ += random_float() * 20.0f; + deathSmoke->oForwardVel = random_float() * 10.0f; } return FALSE; diff --git a/src/game/obj_behaviors.h b/src/game/obj_behaviors.h index b12a5202..a78ee2e1 100644 --- a/src/game/obj_behaviors.h +++ b/src/game/obj_behaviors.h @@ -2,7 +2,7 @@ #define _OBJ_BEHAVIORS_H #include "types.h" -#include "object_helpers2.h" +#include "object_helpers.h" #include "engine/surface_collision.h" extern u8 bob_seg7_metal_ball_path0[]; diff --git a/src/game/obj_behaviors_2.c b/src/game/obj_behaviors_2.c index e7bd7057..eb52683c 100644 --- a/src/game/obj_behaviors_2.c +++ b/src/game/obj_behaviors_2.c @@ -1,11 +1,10 @@ #include #include "sm64.h" -#include "prevent_bss_reordering.h" #include "behavior_actions.h" #include "engine/behavior_script.h" #include "camera.h" -#include "display.h" +#include "game_init.h" #include "engine/math_util.h" #include "object_helpers.h" #include "mario_actions_cutscene.h" @@ -290,7 +289,7 @@ static void platform_on_track_update_pos_or_spawn_ball(s32 ballIndex, f32 x, f32 } } -static void func_802F8D78(f32 arg0, f32 arg1) { +static void cur_obj_spin_all_dimensions(f32 arg0, f32 arg1) { f32 val24; f32 val20; f32 val1C; @@ -385,22 +384,22 @@ static s32 clamp_f32(f32 *value, f32 minimum, f32 maximum) { return TRUE; } -static void func_802F927C(s32 arg0) { +static void cur_obj_init_anim_extend(s32 arg0) { cur_obj_init_animation_with_sound(arg0); cur_obj_extend_animation_if_at_end(); } -static s32 func_802F92B0(s32 arg0) { +static s32 cur_obj_init_anim_and_check_if_end(s32 arg0) { cur_obj_init_animation_with_sound(arg0); return cur_obj_check_if_near_animation_end(); } -static s32 func_802F92EC(s32 arg0, s32 arg1) { +static s32 cur_obj_init_anim_check_frame(s32 arg0, s32 arg1) { cur_obj_init_animation_with_sound(arg0); return cur_obj_check_anim_frame(arg1); } -static s32 func_802F932C(s32 arg0) { +static s32 cur_obj_set_anim_if_at_end(s32 arg0) { if (cur_obj_check_if_at_animation_end()) { cur_obj_init_animation_with_sound(arg0); return TRUE; @@ -408,7 +407,7 @@ static s32 func_802F932C(s32 arg0) { return FALSE; } -static s32 func_802F9378(s8 arg0, s8 arg1, u32 sound) { +static s32 cur_obj_play_sound_at_anim_range(s8 arg0, s8 arg1, u32 sound) { s32 val04; if ((val04 = o->header.gfx.unk38.animAccel / 0x10000) <= 0) { @@ -517,15 +516,15 @@ static void obj_roll_to_match_yaw_turn(s16 targetYaw, s16 maxRoll, s16 rollSpeed } static s16 random_linear_offset(s16 base, s16 range) { - return base + (s16)(range * RandomFloat()); + return base + (s16)(range * random_float()); } static s16 random_mod_offset(s16 base, s16 step, s16 mod) { - return base + step * (RandomU16() % mod); + return base + step * (random_u16() % mod); } static s16 obj_random_fixed_turn(s16 delta) { - return o->oMoveAngleYaw + (s16) RandomSign() * delta; + return o->oMoveAngleYaw + (s16) random_sign() * delta; } /** @@ -662,22 +661,12 @@ static s32 obj_resolve_collisions_and_turn(s16 targetYaw, s16 turnSpeed) { } } -// TODO Likely scrub C, needs true matching code. static void obj_die_if_health_non_positive(void) { -#ifdef VERSION_EU - s32 new_var; -#endif - if (o->oHealth <= 0) { if (o->oDeathSound == 0) { spawn_mist_particles_with_sound(SOUND_OBJ_DEFAULT_DEATH); } else if (o->oDeathSound > 0) { -#ifdef VERSION_EU - new_var = o->oDeathSound; - spawn_mist_particles_with_sound(new_var); -#else spawn_mist_particles_with_sound(o->oDeathSound); -#endif } else { spawn_mist_particles(); } diff --git a/src/game/object_helpers.c b/src/game/object_helpers.c index 4829858f..42ad0e57 100644 --- a/src/game/object_helpers.c +++ b/src/game/object_helpers.c @@ -19,7 +19,7 @@ #include "area.h" #include "engine/geo_layout.h" #include "ingame_menu.h" -#include "game.h" +#include "game_init.h" #include "obj_behaviors.h" #include "interaction.h" #include "object_list_processor.h" @@ -27,14 +27,11 @@ #include "dialog_ids.h" #include "object_helpers.h" -#include "object_helpers2.h" s8 D_8032F0A0[] = { 0xF8, 0x08, 0xFC, 0x04 }; s16 D_8032F0A4[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; static s8 sLevelsWithRooms[] = { LEVEL_BBH, LEVEL_CASTLE, LEVEL_HMC, -1 }; -s32 sGrabReleaseState; - // These can be static: extern void create_transformation_from_matrices(Mat4, Mat4, Mat4); extern void obj_set_gfx_pos_from_pos(struct Object *); @@ -290,8 +287,8 @@ void obj_set_held_state(struct Object *obj, const BehaviorScript *heldBehavior) obj->oHeldState = HELD_DROPPED; } } else { - obj->behScript = segmented_to_virtual(heldBehavior); - obj->stackIndex = 0; + obj->curBhvCommand = segmented_to_virtual(heldBehavior); + obj->bhvStackIndex = 0; } } @@ -490,7 +487,7 @@ struct Object *spawn_object_rel_with_rot(struct Object *parent, u32 model, struct Object *spawn_obj_with_transform_flags(struct Object *sp20, s32 model, const BehaviorScript *sp28) { struct Object *sp1C = spawn_object(sp20, model, sp28); - sp1C->oFlags |= OBJ_FLAG_0020 | OBJ_FLAG_0800; + sp1C->oFlags |= OBJ_FLAG_0020 | OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM; return sp1C; } @@ -499,7 +496,7 @@ struct Object *spawn_water_droplet(struct Object *parent, struct WaterDropletPar struct Object *newObj = spawn_object(parent, params->model, params->behavior); if (params->flags & WATER_DROPLET_FLAG_RAND_ANGLE) { - newObj->oMoveAngleYaw = RandomU16(); + newObj->oMoveAngleYaw = random_u16(); } if (params->flags & WATER_DROPLET_FLAG_RAND_ANGLE_INCR_PLUS_8000) { @@ -524,10 +521,10 @@ struct Object *spawn_water_droplet(struct Object *parent, struct WaterDropletPar obj_translate_xyz_random(newObj, params->moveRange); } - newObj->oForwardVel = RandomFloat() * params->randForwardVelScale + params->randForwardVelOffset; - newObj->oVelY = RandomFloat() * params->randYVelScale + params->randYVelOffset; + newObj->oForwardVel = random_float() * params->randForwardVelScale + params->randForwardVelOffset; + newObj->oVelY = random_float() * params->randYVelScale + params->randYVelOffset; - randomScale = RandomFloat() * params->randSizeScale + params->randSizeOffset; + randomScale = random_float() * params->randSizeScale + params->randSizeOffset; obj_scale(newObj, randomScale); return newObj; @@ -1103,7 +1100,7 @@ static void cur_obj_move_after_thrown_or_dropped(f32 forwardVel, f32 velY) { o->oVelY = velY; if (o->oForwardVel != 0) { - cur_obj_move_y(/*gravity*/ -4.0f, /*bounce*/ -0.1f, /*buoyancy*/ 2.0f); + cur_obj_move_y(/*gravity*/ -4.0f, /*bounciness*/ -0.1f, /*buoyancy*/ 2.0f); } } @@ -1296,7 +1293,7 @@ static void cur_obj_move_update_underwater_flags(void) { } } -static void cur_obj_move_update_ground_air_flags(UNUSED f32 gravity, f32 bounce) { +static void cur_obj_move_update_ground_air_flags(UNUSED f32 gravity, f32 bounciness) { o->oMoveFlags &= ~OBJ_MOVE_13; if (o->oPosY < o->oFloorHeight) { @@ -1313,7 +1310,7 @@ static void cur_obj_move_update_ground_air_flags(UNUSED f32 gravity, f32 bounce) o->oPosY = o->oFloorHeight; if (o->oVelY < 0.0f) { - o->oVelY *= bounce; + o->oVelY *= bounciness; } if (o->oVelY > 5.0f) { @@ -1349,7 +1346,7 @@ static f32 cur_obj_move_y_and_get_water_level(f32 gravity, f32 buoyancy) { return waterLevel; } -void cur_obj_move_y(f32 gravity, f32 bounce, f32 buoyancy) { +void cur_obj_move_y(f32 gravity, f32 bounciness, f32 buoyancy) { f32 waterLevel; o->oMoveFlags &= ~OBJ_MOVE_LEFT_GROUND; @@ -1367,7 +1364,7 @@ void cur_obj_move_y(f32 gravity, f32 bounce, f32 buoyancy) { //! We only handle floor collision if the object does not enter // water. This allows e.g. coins to clip through floors if they // enter water on the same frame. - cur_obj_move_update_ground_air_flags(gravity, bounce); + cur_obj_move_update_ground_air_flags(gravity, bounciness); } else { o->oMoveFlags |= OBJ_MOVE_ENTERED_WATER; o->oMoveFlags &= ~OBJ_MOVE_MASK_ON_GROUND; @@ -1807,7 +1804,7 @@ void cur_obj_update_floor_and_walls(void) { void cur_obj_move_standard(s16 steepSlopeAngleDegrees) { f32 gravity = o->oGravity; - f32 bounce = o->oBounce; + f32 bounciness = o->oBounciness; f32 buoyancy = o->oBuoyancy; f32 dragStrength = o->oDragStrength; f32 steepSlopeNormalY; @@ -1833,7 +1830,7 @@ void cur_obj_move_standard(s16 steepSlopeAngleDegrees) { cur_obj_apply_drag_xz(dragStrength); cur_obj_move_xz(steepSlopeNormalY, careAboutEdgesAndSteepSlopes); - cur_obj_move_y(gravity, bounce, buoyancy); + cur_obj_move_y(gravity, bounciness, buoyancy); if (o->oForwardVel < 0) { negativeSpeed = TRUE; @@ -1974,7 +1971,7 @@ void obj_build_transform_relative_to_parent(struct Object *obj) { void obj_create_transform_from_self(struct Object *a0) { a0->oFlags &= ~OBJ_FLAG_TRANSFORM_RELATIVE_TO_PARENT; - a0->oFlags |= OBJ_FLAG_0800; + a0->oFlags |= OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM; a0->transform[3][0] = a0->oPosX; a0->transform[3][1] = a0->oPosY; @@ -2060,23 +2057,23 @@ void chain_segment_init(struct ChainSegment *segment) { } f32 random_f32_around_zero(f32 diameter) { - return RandomFloat() * diameter - diameter / 2; + return random_float() * diameter - diameter / 2; } void obj_scale_random(struct Object *obj, f32 rangeLength, f32 minScale) { - f32 scale = RandomFloat() * rangeLength + minScale; + f32 scale = random_float() * rangeLength + minScale; obj_scale_xyz(obj, scale, scale, scale); } void obj_translate_xyz_random(struct Object *obj, f32 rangeLength) { - obj->oPosX += RandomFloat() * rangeLength - rangeLength * 0.5f; - obj->oPosY += RandomFloat() * rangeLength - rangeLength * 0.5f; - obj->oPosZ += RandomFloat() * rangeLength - rangeLength * 0.5f; + obj->oPosX += random_float() * rangeLength - rangeLength * 0.5f; + obj->oPosY += random_float() * rangeLength - rangeLength * 0.5f; + obj->oPosZ += random_float() * rangeLength - rangeLength * 0.5f; } void obj_translate_xz_random(struct Object *obj, f32 rangeLength) { - obj->oPosX += RandomFloat() * rangeLength - rangeLength * 0.5f; - obj->oPosZ += RandomFloat() * rangeLength - rangeLength * 0.5f; + obj->oPosX += random_float() * rangeLength - rangeLength * 0.5f; + obj->oPosZ += random_float() * rangeLength - rangeLength * 0.5f; } static void obj_build_vel_from_transform(struct Object *a0) { @@ -2097,75 +2094,10 @@ void cur_obj_set_pos_via_transform(void) { o->oPosZ += o->oVelZ; } -#if defined(VERSION_EU) -//this is a test to see if object is possibly built wrong -//it matches -struct Object_test -{ - /*0x000*/ struct ObjectNode header; - /*0x068*/ struct Object *parentObj; - /*0x06C*/ struct Object *prevObj; - /*0x070*/ u32 collidedObjInteractTypes; - /*0x074*/ s16 activeFlags; - /*0x076*/ s16 numCollidedObjs; - /*0x078*/ struct Object *collidedObjs[4]; - /*0x088*/ - union - { - struct { - u8 pad[0xF*4]; - s32 MoveAnglePitch; - s32 MoveAngleYaw; - s32 MoveAngleRoll; - u8 pad2[0x4B*4-0xF*4-3*4]; - struct { - u32 WallAngle; - } special; - } moving; - // Object fields. See object_fields.h. - u32 asU32[0x50]; - s32 asS32[0x50]; - s16 asS16[0x50][2]; - f32 asF32[0x50]; - s16 *asS16P[0x50]; - s32 *asS32P[0x50]; - struct Animation **asAnims[0x50]; - struct Waypoint *asWaypoint[0x50]; - struct ChainSegment *asChainSegment[0x50]; - struct Object *asObject[0x50]; - struct Surface *asSurface[0x50]; - void *asVoidPtr[0x50]; - const void *asConstVoidPtr[0x50]; - } rawData; - /*0x1C8*/ u32 unused1; - /*0x1CC*/ const BehaviorScript *behScript; - /*0x1D0*/ u32 stackIndex; - /*0x1D4*/ uintptr_t stack[8]; - /*0x1F4*/ s16 unk1F4; - /*0x1F6*/ s16 respawnInfoType; - /*0x1F8*/ f32 hitboxRadius; - /*0x1FC*/ f32 hitboxHeight; - /*0x200*/ f32 hurtboxRadius; - /*0x204*/ f32 hurtboxHeight; - /*0x208*/ f32 hitboxDownOffset; - /*0x20C*/ const BehaviorScript *behavior; - /*0x210*/ u32 unused2; - /*0x214*/ struct Object *platform; - /*0x218*/ void *collisionData; - /*0x21C*/ Mat4 transform; - /*0x25C*/ void *respawnInfo; -}; - -s16 cur_obj_reflect_move_angle_off_wall(void) { - s16 angle = ((struct Object_test*)o)->rawData.moving.special.WallAngle - (s16) ((struct Object_test*)o)->rawData.moving.MoveAngleYaw + (s16) ((struct Object_test*)o)->rawData.moving.special.WallAngle +0x8000; - return angle; -} -#else s16 cur_obj_reflect_move_angle_off_wall(void) { s16 angle = o->oWallAngle - ((s16) o->oMoveAngleYaw - (s16) o->oWallAngle) + 0x8000; return angle; } -#endif void cur_obj_spawn_particles(struct SpawnParticlesInfo *info) { struct Object *particle; @@ -2185,18 +2117,18 @@ void cur_obj_spawn_particles(struct SpawnParticlesInfo *info) { } for (i = 0; i < numParticles; i++) { - scale = RandomFloat() * (info->sizeRange * 0.1f) + info->sizeBase * 0.1f; + scale = random_float() * (info->sizeRange * 0.1f) + info->sizeBase * 0.1f; particle = spawn_object(o, info->model, bhvWhitePuffExplosion); particle->oBehParams2ndByte = info->behParam; - particle->oMoveAngleYaw = RandomU16(); + particle->oMoveAngleYaw = random_u16(); particle->oGravity = info->gravity; particle->oDragStrength = info->dragStrength; particle->oPosY += info->offsetY; - particle->oForwardVel = RandomFloat() * info->forwardVelRange + info->forwardVelBase; - particle->oVelY = RandomFloat() * info->velYRange + info->velYBase; + particle->oForwardVel = random_float() * info->forwardVelRange + info->forwardVelBase; + particle->oVelY = random_float() * info->velYRange + info->velYBase; obj_scale_xyz(particle, scale, scale, scale); } @@ -2277,7 +2209,7 @@ void spawn_mist_particles(void) { spawn_mist_particles_variable(0, 0, 46.0f); } -void spawn_mist_particles_with_sound(s32 sp18) { +void spawn_mist_particles_with_sound(u32 sp18) { spawn_mist_particles_variable(0, 0, 46.0f); create_sound_spawner(sp18); } @@ -2922,37 +2854,16 @@ s32 cur_obj_check_grabbed_mario(void) { return FALSE; } -#if defined(VERSION_EU) // Fake match -s32 player_performed_grab_escape_action(void) { - s32 result = FALSE; - s32 grabEscape = TRUE; - // using register here causes less differences with non-EU versions - register f32 stickMag = gPlayer1Controller->stickMag; - if (stickMag < 30.0f) { - sGrabReleaseState = 0; - } - - if (sGrabReleaseState == 0 && stickMag > 40.0f) { - sGrabReleaseState = grabEscape; - result = TRUE; - } - - if (gPlayer1Controller->buttonPressed & A_BUTTON) { - result = TRUE; - } - - return result; -} -#else s32 player_performed_grab_escape_action(void) { + static s32 grabReleaseState; s32 result = FALSE; if (gPlayer1Controller->stickMag < 30.0f) { - sGrabReleaseState = 0; + grabReleaseState = 0; } - if (sGrabReleaseState == 0 && gPlayer1Controller->stickMag > 40.0f) { - sGrabReleaseState = 1; + if (grabReleaseState == 0 && gPlayer1Controller->stickMag > 40.0f) { + grabReleaseState = 1; result = TRUE; } @@ -2962,7 +2873,6 @@ s32 player_performed_grab_escape_action(void) { return result; } -#endif void cur_obj_unused_play_footstep_sound(s32 animFrame1, s32 animFrame2, s32 sound) { if (cur_obj_check_anim_frame(animFrame1) || cur_obj_check_anim_frame(animFrame2)) { diff --git a/src/game/object_helpers.h b/src/game/object_helpers.h index 56c75a85..80806bde 100644 --- a/src/game/object_helpers.h +++ b/src/game/object_helpers.h @@ -67,7 +67,6 @@ struct SpawnParticlesInfo // extern ? D_80336610; extern struct GraphNode **gLoadedGraphNodes; // extern ? sLevelsWithRooms; -// extern ? sGrabReleaseState; // extern ? sMrIParticleActions; // extern ? D_8032F124; // extern ? sMrIActions; @@ -332,4 +331,90 @@ void cur_obj_set_pos_via_transform(void); void cur_obj_spawn_particles(struct SpawnParticlesInfo *sp28); extern s16 cur_obj_reflect_move_angle_off_wall(void); +#define WAYPOINT_FLAGS_END -1 +#define WAYPOINT_FLAGS_INITIALIZED 0x8000 +#define WAYPOINT_MASK_00FF 0x00FF +#define WAYPOINT_FLAGS_PLATFORM_ON_TRACK_PAUSE 3 + +#define PATH_NONE 0 +#define PATH_REACHED_END -1 +#define PATH_REACHED_WAYPOINT 1 + +struct GraphNode_802A45E4 { + /*0x00*/ s8 filler0[0x18 - 0x00]; + /*0x18*/ s16 unk18; + /*0x1A*/ s16 unk1A; + /*0x1C*/ s16 unk1C; + /*0x1E*/ s16 unk1E; + /*0x20*/ s16 unk20; + /*0x22*/ s16 unk22; +}; + +extern void obj_set_hitbox(struct Object* obj, struct ObjectHitbox *arg1); +s32 signum_positive(s32); +extern f32 absf(f32); +extern s32 absi(s32 a0); +s32 cur_obj_wait_then_blink(s32 a0, s32 a1); +s32 cur_obj_is_mario_ground_pounding_platform(void); +extern void spawn_mist_particles(void); +extern void spawn_mist_particles_with_sound(u32 sp18); +void cur_obj_push_mario_away(f32); +void cur_obj_push_mario_away_from_cylinder(f32 sp20, f32 sp24); +// extern ? bhv_dust_smoke_loop(?); +s32 cur_obj_set_direction_table(s8*); +s32 cur_obj_progress_direction_table(void); +// extern ? stub_obj_helpers_3(?); +extern void cur_obj_scale_over_time(s32,s32,f32,f32); +void cur_obj_set_pos_to_home_with_debug(void); +extern s32 cur_obj_is_mario_on_platform(void); +// extern ? obj_shake_y_until(?); +s32 cur_obj_move_up_and_down(s32); +void cur_obj_call_action_function(void(*[])(void)); +// extern ? spawn_star_with_no_lvl_exit(?); +// extern ? spawn_base_star_with_no_lvl_exit(?); +s32 bit_shift_left(s32); +s32 cur_obj_mario_far_away(void); +s32 is_mario_moving_fast_or_in_air(s32); +s32 is_item_in_array(s8,s8*); +extern void bhv_init_room(void); // 802A3978 +extern void cur_obj_enable_rendering_if_mario_in_room(void); +s32 cur_obj_set_hitbox_and_die_if_attacked(struct ObjectHitbox*,s32,s32); +void obj_explode_and_spawn_coins(f32 sp18, s32 sp1C); +void obj_set_collision_data(struct Object*, const void*); +void cur_obj_if_hit_wall_bounce_away(void); +s32 cur_obj_hide_if_mario_far_away_y(f32); +extern Gfx *geo_offset_klepto_held_object(s32 run, struct GraphNode *node, UNUSED f32 mtx[4][4]); +// extern ? geo_offset_klepto_debug(?); +s32 obj_is_hidden(struct Object*); +extern void enable_time_stop(void); +extern void disable_time_stop(void); +void set_time_stop_flags(s32); +void clear_time_stop_flags(s32); +s32 cur_obj_can_mario_activate_textbox(f32,f32,s32); +extern s32 cur_obj_can_mario_activate_textbox_2(f32 sp18, f32 sp1C); +// extern ? obj_end_dialog(?); +s32 cur_obj_update_dialog(s32 arg0, s32 dialogFlags, s32 dialogID, s32 unused); +s32 cur_obj_update_dialog_with_cutscene(s32 arg0, s32 dialogFlags, s32 cutsceneTable, s32 dialogID); +s32 cur_obj_has_model(u16); +extern void cur_obj_align_gfx_with_floor(void); +// extern ? mario_is_within_rectangle(?); +void cur_obj_shake_screen(s32 shake); +extern s32 obj_attack_collided_from_other_object(struct Object *obj); +s32 cur_obj_was_attacked_or_ground_pounded(void); +void obj_copy_behavior_params(struct Object*,struct Object*); +void cur_obj_init_animation_and_anim_frame(s32,s32); +s32 cur_obj_init_animation_and_check_if_near_end(s32); +void cur_obj_init_animation_and_extend_if_at_end(s32); +s32 cur_obj_check_grabbed_mario(void); +s32 player_performed_grab_escape_action(void); +// extern ? cur_obj_unused_play_footstep_sound(?); +// extern ? enable_time_stop_including_mario(?); +extern void disable_time_stop_including_mario(void); +s32 cur_obj_check_interacted(void); +void cur_obj_spawn_loot_blue_coin(void); + +#ifndef VERSION_JP +void cur_obj_spawn_star_at_y_offset(f32 f12, f32 f14, f32 a2, f32 a3); +#endif + #endif /* OBJECT_HELPERS_H */ diff --git a/src/game/object_helpers2.h b/src/game/object_helpers2.h deleted file mode 100644 index 86bc18fd..00000000 --- a/src/game/object_helpers2.h +++ /dev/null @@ -1,94 +0,0 @@ -#ifndef OBJECT_HELPERS2_H -#define OBJECT_HELPERS2_H - -#include "types.h" - -// TODO: join this together with object_helpers.h - -#define WAYPOINT_FLAGS_END -1 -#define WAYPOINT_FLAGS_INITIALIZED 0x8000 -#define WAYPOINT_MASK_00FF 0x00FF -#define WAYPOINT_FLAGS_PLATFORM_ON_TRACK_PAUSE 3 - -#define PATH_NONE 0 -#define PATH_REACHED_END -1 -#define PATH_REACHED_WAYPOINT 1 - -struct GraphNode_802A45E4 { - /*0x00*/ s8 filler0[0x18 - 0x00]; - /*0x18*/ s16 unk18; - /*0x1A*/ s16 unk1A; - /*0x1C*/ s16 unk1C; - /*0x1E*/ s16 unk1E; - /*0x20*/ s16 unk20; - /*0x22*/ s16 unk22; -}; - -extern void obj_set_hitbox(struct Object* obj, struct ObjectHitbox *arg1); -s32 signum_positive(s32); -extern f32 absf(f32); -extern s32 absi(s32 a0); -s32 cur_obj_wait_then_blink(s32 a0, s32 a1); -s32 cur_obj_is_mario_ground_pounding_platform(void); -extern void spawn_mist_particles(void); -extern void spawn_mist_particles_with_sound(s32 sp18); -void cur_obj_push_mario_away(f32); -void cur_obj_push_mario_away_from_cylinder(f32 sp20, f32 sp24); -// extern ? bhv_dust_smoke_loop(?); -s32 cur_obj_set_direction_table(s8*); -s32 cur_obj_progress_direction_table(void); -// extern ? stub_obj_helpers_3(?); -extern void cur_obj_scale_over_time(s32,s32,f32,f32); -void cur_obj_set_pos_to_home_with_debug(void); -extern s32 cur_obj_is_mario_on_platform(void); -// extern ? obj_shake_y_until(?); -s32 cur_obj_move_up_and_down(s32); -void cur_obj_call_action_function(void(*[])(void)); -// extern ? spawn_star_with_no_lvl_exit(?); -// extern ? spawn_base_star_with_no_lvl_exit(?); -s32 bit_shift_left(s32); -s32 cur_obj_mario_far_away(void); -s32 is_mario_moving_fast_or_in_air(s32); -s32 is_item_in_array(s8,s8*); -extern void bhv_init_room(void); // 802A3978 -extern void cur_obj_enable_rendering_if_mario_in_room(void); -s32 cur_obj_set_hitbox_and_die_if_attacked(struct ObjectHitbox*,s32,s32); -void obj_explode_and_spawn_coins(f32 sp18, s32 sp1C); -void obj_set_collision_data(struct Object*, const void*); -void cur_obj_if_hit_wall_bounce_away(void); -s32 cur_obj_hide_if_mario_far_away_y(f32); -extern Gfx *geo_offset_klepto_held_object(s32 run, struct GraphNode *node, UNUSED f32 mtx[4][4]); -// extern ? geo_offset_klepto_debug(?); -s32 obj_is_hidden(struct Object*); -extern void enable_time_stop(void); -extern void disable_time_stop(void); -void set_time_stop_flags(s32); -void clear_time_stop_flags(s32); -s32 cur_obj_can_mario_activate_textbox(f32,f32,s32); -extern s32 cur_obj_can_mario_activate_textbox_2(f32 sp18, f32 sp1C); -// extern ? obj_end_dialog(?); -s32 cur_obj_update_dialog(s32 arg0, s32 dialogFlags, s32 dialogID, s32 unused); -s32 cur_obj_update_dialog_with_cutscene(s32 arg0, s32 dialogFlags, s32 cutsceneTable, s32 dialogID); -s32 cur_obj_has_model(u16); -extern void cur_obj_align_gfx_with_floor(void); -// extern ? mario_is_within_rectangle(?); -void cur_obj_shake_screen(s32 shake); -extern s32 obj_attack_collided_from_other_object(struct Object *obj); -s32 cur_obj_was_attacked_or_ground_pounded(void); -void obj_copy_behavior_params(struct Object*,struct Object*); -void cur_obj_init_animation_and_anim_frame(s32,s32); -s32 cur_obj_init_animation_and_check_if_near_end(s32); -void cur_obj_init_animation_and_extend_if_at_end(s32); -s32 cur_obj_check_grabbed_mario(void); -s32 player_performed_grab_escape_action(void); -// extern ? cur_obj_unused_play_footstep_sound(?); -// extern ? enable_time_stop_including_mario(?); -extern void disable_time_stop_including_mario(void); -s32 cur_obj_check_interacted(void); -void cur_obj_spawn_loot_blue_coin(void); - -#ifndef VERSION_JP -void cur_obj_spawn_star_at_y_offset(f32 f12, f32 f14, f32 a2, f32 a3); -#endif - -#endif /* OBJECT_HELPERS2_H */ diff --git a/src/game/object_list_processor.c b/src/game/object_list_processor.c index 0839a85b..3bb3ca65 100644 --- a/src/game/object_list_processor.c +++ b/src/game/object_list_processor.c @@ -107,7 +107,7 @@ struct Object *gCurrentObject; /** * The next object behavior command to be executed. */ -const BehaviorScript *gBehCommand; +const BehaviorScript *gCurBhvCommand; /** * The number of objects that were processed last frame, which may miss some @@ -196,24 +196,24 @@ struct ParticleProperties { * A table mapping particle flags to various properties use when spawning a particle. */ struct ParticleProperties sParticleTypes[] = { - { PARTICLE_DUST, ACTIVE_PARTICLE_0, MODEL_MIST, bhvMarioDustGenerator }, - { PARTICLE_1, ACTIVE_PARTICLE_18, MODEL_NONE, bhvWallTinyStarParticleSpawn }, - { PARTICLE_4, ACTIVE_PARTICLE_4, MODEL_NONE, bhvPoundTinyStarParticleSpawn }, - { PARTICLE_SPARKLES, ACTIVE_PARTICLE_3, MODEL_SPARKLES, bhvSpecialTripleJumpSparkles }, - { PARTICLE_5, ACTIVE_PARTICLE_5, MODEL_BUBBLE, bhvBubbleMario }, - { PARTICLE_WATER_SPLASH, ACTIVE_PARTICLE_6, MODEL_WATER_SPLASH, bhvWaterSplash }, + { PARTICLE_DUST, ACTIVE_PARTICLE_DUST, MODEL_MIST, bhvMistParticleSpawner }, + { PARTICLE_VERTICAL_STAR, ACTIVE_PARTICLE_V_STAR, MODEL_NONE, bhvVertStarParticleSpawner }, + { PARTICLE_HORIZONTAL_STAR, ACTIVE_PARTICLE_H_STAR, MODEL_NONE, bhvHorStarParticleSpawner }, + { PARTICLE_SPARKLES, ACTIVE_PARTICLE_SPARKLES, MODEL_SPARKLES, bhvSparkleParticleSpawner }, + { PARTICLE_BUBBLE, ACTIVE_PARTICLE_BUBBLE, MODEL_BUBBLE, bhvBubbleParticleSpawner }, + { PARTICLE_WATER_SPLASH, ACTIVE_PARTICLE_WATER_SPLASH, MODEL_WATER_SPLASH, bhvWaterSplash }, { PARTICLE_IDLE_WATER_WAVE, ACTIVE_PARTICLE_IDLE_WATER_WAVE, MODEL_IDLE_WATER_WAVE, bhvIdleWaterWave }, - { PARTICLE_9, ACTIVE_PARTICLE_9, MODEL_WHITE_PARTICLE_SMALL, bhvWaterWaves }, + { PARTICLE_PLUNGE_BUBBLE, ACTIVE_PARTICLE_PLUNGE_BUBBLE, MODEL_WHITE_PARTICLE_SMALL, bhvPlungeBubble }, { PARTICLE_WAVE_TRAIL, ACTIVE_PARTICLE_WAVE_TRAIL, MODEL_WAVE_TRAIL, bhvWaveTrail }, - { PARTICLE_11, ACTIVE_PARTICLE_11, MODEL_RED_FLAME, bhvFlameMario }, + { PARTICLE_FIRE, ACTIVE_PARTICLE_FIRE, MODEL_RED_FLAME, bhvFireParticleSpawner }, { PARTICLE_SHALLOW_WATER_WAVE, ACTIVE_PARTICLE_SHALLOW_WATER_WAVE, MODEL_NONE, bhvShallowWaterWave }, { PARTICLE_SHALLOW_WATER_SPLASH, ACTIVE_PARTICLE_SHALLOW_WATER_SPLASH, MODEL_NONE, bhvShallowWaterSplash }, - { PARTICLE_LEAVES, ACTIVE_PARTICLE_13, MODEL_NONE, bhvSnowLeafParticleSpawn }, - { PARTICLE_14, ACTIVE_PARTICLE_16, MODEL_NONE, bhvGroundSnow }, - { PARTICLE_17, ACTIVE_PARTICLE_17, MODEL_NONE, bhvWaterMistSpawn }, - { PARTICLE_15, ACTIVE_PARTICLE_14, MODEL_NONE, bhvGroundSand }, - { PARTICLE_16, ACTIVE_PARTICLE_15, MODEL_NONE, bhvPoundWhitePuffs }, - { PARTICLE_18, ACTIVE_PARTICLE_19, MODEL_NONE, bhvPunchTinyTriangleSpawn }, + { PARTICLE_LEAF, ACTIVE_PARTICLE_LEAF, MODEL_NONE, bhvLeafParticleSpawner }, + { PARTICLE_SNOW, ACTIVE_PARTICLE_SNOW, MODEL_NONE, bhvSnowParticleSpawner }, + { PARTICLE_BREATH, ACTIVE_PARTICLE_BREATH, MODEL_NONE, bhvBreathParticleSpawner }, + { PARTICLE_DIRT, ACTIVE_PARTICLE_DIRT, MODEL_NONE, bhvDirtParticleSpawner }, + { PARTICLE_MIST_CIRCLE, ACTIVE_PARTICLE_MIST_CIRCLE, MODEL_NONE, bhvMistCircParticleSpawner }, + { PARTICLE_TRIANGLE, ACTIVE_PARTICLE_TRIANGLE, MODEL_NONE, bhvTriangleParticleSpawner }, { 0, 0, MODEL_NONE, NULL }, }; @@ -297,7 +297,7 @@ s32 update_objects_starting_at(struct ObjectNode *objList, struct ObjectNode *fi gCurrentObject = (struct Object *) firstObj; gCurrentObject->header.gfx.node.flags |= GRAPH_RENDER_HAS_ANIMATION; - cur_object_exec_behavior(); + cur_obj_update(); firstObj = firstObj->next; count += 1; @@ -344,7 +344,7 @@ s32 update_objects_during_time_stop(struct ObjectNode *objList, struct ObjectNod // Only update if unfrozen if (unfrozen) { gCurrentObject->header.gfx.node.flags |= GRAPH_RENDER_HAS_ANIMATION; - cur_object_exec_behavior(); + cur_obj_update(); } else { gCurrentObject->header.gfx.node.flags &= ~GRAPH_RENDER_HAS_ANIMATION; } @@ -544,7 +544,7 @@ void clear_objects(void) { init_free_object_list(); clear_object_lists(gObjectListArray); - stub_80385BF0(); + stub_behavior_script_2(); stub_obj_list_processor_1(); for (i = 0; i < OBJECT_POOL_CAPACITY; i++) { diff --git a/src/game/object_list_processor.h b/src/game/object_list_processor.h index c75647cb..1bb5cb61 100644 --- a/src/game/object_list_processor.h +++ b/src/game/object_list_processor.h @@ -86,7 +86,7 @@ extern struct Object *gMarioObject; extern struct Object *gLuigiObject; extern struct Object *gCurrentObject; -extern const BehaviorScript *gBehCommand; +extern const BehaviorScript *gCurBhvCommand; extern s16 gPrevFrameObjectCount; extern s32 gSurfaceNodesAllocated; diff --git a/src/game/paintings.c b/src/game/paintings.c index 3977fca6..01c51409 100644 --- a/src/game/paintings.c +++ b/src/game/paintings.c @@ -1,7 +1,7 @@ #include #include "sm64.h" -#include "game.h" +#include "game_init.h" #include "mario.h" #include "memory.h" #include "save_file.h" diff --git a/src/game/platform_displacement.c b/src/game/platform_displacement.c index 154daff0..24363226 100644 --- a/src/game/platform_displacement.c +++ b/src/game/platform_displacement.c @@ -4,7 +4,6 @@ #include "platform_displacement.h" #include "engine/math_util.h" #include "object_helpers.h" -#include "object_helpers2.h" #include "mario.h" #include "engine/behavior_script.h" #include "level_update.h" diff --git a/src/game/print.c b/src/game/print.c index 363b4bc6..b70551e7 100644 --- a/src/game/print.c +++ b/src/game/print.c @@ -1,7 +1,7 @@ #include #include "sm64.h" -#include "game.h" +#include "game_init.h" #include "mario.h" #include "memory.h" #include "save_file.h" diff --git a/src/game/profiler.c b/src/game/profiler.c index a1c590fb..ad64cb3c 100644 --- a/src/game/profiler.c +++ b/src/game/profiler.c @@ -2,7 +2,7 @@ #include "sm64.h" #include "profiler.h" -#include "game.h" +#include "game_init.h" s16 gProfilerMode = 0; diff --git a/src/game/rendering_graph_node.c b/src/game/rendering_graph_node.c index 01ba06ca..31083680 100644 --- a/src/game/rendering_graph_node.c +++ b/src/game/rendering_graph_node.c @@ -2,13 +2,12 @@ #include "sm64.h" #include "main.h" -#include "display.h" #include "print.h" #include "engine/math_util.h" #include "area.h" #include "shadow.h" #include "memory.h" -#include "game.h" +#include "game_init.h" #include "rendering_graph_node.h" /** @@ -157,7 +156,7 @@ static void geo_process_master_list_sub(struct GraphNodeMasterList *node) { gDPSetRenderMode(gDisplayListHead++, modeList->modes[i], mode2List->modes[i]); while (currList != NULL) { gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(currList->transform), - G_MTX_MODELVIEW | G_MTX_MUL | G_MTX_LOAD); + G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH); gSPDisplayList(gDisplayListHead++, currList->displayList); currList = currList->next; } @@ -793,7 +792,7 @@ static void geo_process_object(struct Object *node) { if (node->header.gfx.throwMatrix != NULL) { mtxf_mul(gMatStack[gMatStackIndex + 1], (void *) node->header.gfx.throwMatrix, gMatStack[gMatStackIndex]); - } else if (node->header.gfx.node.flags & 4) { + } else if (node->header.gfx.node.flags & GRAPH_RENDER_BILLBOARD) { mtxf_billboard(gMatStack[gMatStackIndex + 1], gMatStack[gMatStackIndex], node->header.gfx.pos, gCurGraphNodeCamera->roll); } else { diff --git a/src/game/save_file.c b/src/game/save_file.c index 23ae6ac1..6803fb69 100644 --- a/src/game/save_file.c +++ b/src/game/save_file.c @@ -1,7 +1,7 @@ #include #include "sm64.h" -#include "game.h" +#include "game_init.h" #include "main.h" #include "engine/math_util.h" #include "area.h" @@ -9,6 +9,8 @@ #include "save_file.h" #include "sound_init.h" #include "level_table.h" +#include "course_table.h" +#include "thread6.h" #define MENU_DATA_MAGIC 0x4849 #define SAVE_FILE_MAGIC 0x4441 @@ -22,7 +24,7 @@ struct WarpCheckpoint gWarpCheckpoint; s8 gMainMenuDataModified; s8 gSaveFileModified; -u8 gLastCompletedCourseNum = 0; +u8 gLastCompletedCourseNum = COURSE_NONE; u8 gLastCompletedStarNum = 0; s8 sUnusedGotGlobalCoinHiScore = 0; u8 gGotFileCoinHiScore = 0; @@ -62,8 +64,14 @@ static s32 read_eeprom_data(void *buffer, s32 size) { u32 offset = (u32)((u8 *) buffer - (u8 *) &gSaveBuffer) / 8; do { +#ifdef VERSION_SH + block_until_rumble_pak_free(); +#endif triesLeft--; status = osEepromLongRead(&gSIEventMesgQueue, offset, buffer, size); +#ifdef VERSION_SH + release_rumble_pak_control(); +#endif } while (triesLeft > 0 && status != 0); } @@ -84,8 +92,14 @@ static s32 write_eeprom_data(void *buffer, s32 size) { u32 offset = (u32)((u8 *) buffer - (u8 *) &gSaveBuffer) >> 3; do { +#ifdef VERSION_SH + block_until_rumble_pak_free(); +#endif triesLeft--; status = osEepromLongWrite(&gSIEventMesgQueue, offset, buffer, size); +#ifdef VERSION_SH + release_rumble_pak_control(); +#endif } while (triesLeft > 0 && status != 0); } @@ -581,8 +595,8 @@ u16 eu_get_language(void) { #endif void disable_warp_checkpoint(void) { - // check_warp_checkpoint() checks to see if gWarpCheckpoint.courseNum != 0 - gWarpCheckpoint.courseNum = 0; + // check_warp_checkpoint() checks to see if gWarpCheckpoint.courseNum != COURSE_NONE + gWarpCheckpoint.courseNum = COURSE_NONE; } /** @@ -610,7 +624,7 @@ s32 check_warp_checkpoint(struct WarpNode *warpNode) { s16 currCourseNum = gLevelToCourseNumTable[(warpNode->destLevel & 0x7F) - 1]; // gSavedCourseNum is only used in this function. - if (gWarpCheckpoint.courseNum != 0 && gSavedCourseNum == currCourseNum + if (gWarpCheckpoint.courseNum != COURSE_NONE && gSavedCourseNum == currCourseNum && gWarpCheckpoint.actNum == gCurrActNum) { warpNode->destLevel = gWarpCheckpoint.levelID; warpNode->destArea = gWarpCheckpoint.areaNum; @@ -618,7 +632,7 @@ s32 check_warp_checkpoint(struct WarpNode *warpNode) { isWarpCheckpointActive = TRUE; } else { // Disable the warp checkpoint just incase the other 2 conditions failed? - gWarpCheckpoint.courseNum = 0; + gWarpCheckpoint.courseNum = COURSE_NONE; } return isWarpCheckpointActive; diff --git a/src/game/screen_transition.c b/src/game/screen_transition.c index 5fc9e63c..c6aedbbd 100644 --- a/src/game/screen_transition.c +++ b/src/game/screen_transition.c @@ -2,7 +2,7 @@ #include "sm64.h" #include "area.h" -#include "game.h" +#include "game/game_init.h" #include "engine/math_util.h" #include "engine/graph_node.h" #include "screen_transition.h" diff --git a/src/game/sound_init.c b/src/game/sound_init.c index 91690e5e..ec5dfcbc 100644 --- a/src/game/sound_init.c +++ b/src/game/sound_init.c @@ -14,6 +14,7 @@ #include "engine/graph_node.h" #include "paintings.h" #include "level_table.h" +#include "thread6.h" #define MUSIC_NONE 0xFFFF @@ -71,7 +72,7 @@ static u32 menuSoundsExtra[] = { }; static s8 paintingEjectSoundPlayed = FALSE; -static void play_menu_sounds_extra(int a, void *b); +void play_menu_sounds_extra(int a, void *b); void reset_volume(void) { D_8032C6C0 = 0; @@ -84,7 +85,7 @@ void lower_background_noise(s32 a) // Soften volume set_sound_disabled(TRUE); break; case 2: - func_8031FFB4(0, 60, 40); // soften music + func_8031FFB4(SEQ_PLAYER_LEVEL, 60, 40); // soften music break; } D_8032C6C0 |= a; @@ -97,7 +98,7 @@ void raise_background_noise(s32 a) // harden volume set_sound_disabled(FALSE); break; case 2: - sequence_player_unlower(0, 60); + sequence_player_unlower(SEQ_PLAYER_LEVEL, 60); break; } D_8032C6C0 &= ~a; @@ -130,6 +131,7 @@ void set_sound_mode(u16 soundMode) { * Wrapper method by menu used to set the sound via flags. */ void play_menu_sounds(s16 soundMenuFlags) { + if (soundMenuFlags & SOUND_MENU_FLAG_HANDAPPEAR) { play_sound(SOUND_MENU_HAND_APPEAR, gDefaultSoundArgs); } else if (soundMenuFlags & SOUND_MENU_FLAG_HANDISAPPEAR) { @@ -151,6 +153,11 @@ void play_menu_sounds(s16 soundMenuFlags) { if (soundMenuFlags & 0x100) { play_menu_sounds_extra(20, NULL); } +#ifdef VERSION_SH + if ((soundMenuFlags & 0x20) != 0) { + queue_rumble_data(10, 60); + } +#endif } /** @@ -200,7 +207,7 @@ void set_background_music(u16 a, u16 seqArgs, s16 fadeTimer) { } if (!(gShouldNotPlayCastleMusic && seqArgs == SEQ_LEVEL_INSIDE_CASTLE)) { - play_music(0, seqArgs, fadeTimer); + play_music(SEQ_PLAYER_LEVEL, seqArgs, fadeTimer); sCurrentMusic = seqArgs; } } @@ -221,12 +228,12 @@ void fadeout_level_music(s16 fadeTimer) { } void play_cutscene_music(u16 seqArgs) { - play_music(0, seqArgs, 0); + play_music(SEQ_PLAYER_LEVEL, seqArgs, 0); sCurrentMusic = seqArgs; } void play_shell_music(void) { - play_music(0, SEQUENCE_ARGS(4, SEQ_EVENT_POWERUP | SEQ_VARIATION), 0); + play_music(SEQ_PLAYER_LEVEL, SEQUENCE_ARGS(4, SEQ_EVENT_POWERUP | SEQ_VARIATION), 0); sCurrentShellMusic = SEQUENCE_ARGS(4, SEQ_EVENT_POWERUP | SEQ_VARIATION); } @@ -238,7 +245,7 @@ void stop_shell_music(void) { } void play_cap_music(u16 seqArgs) { - play_music(0, seqArgs, 0); + play_music(SEQ_PLAYER_LEVEL, seqArgs, 0); if (sCurrentCapMusic != MUSIC_NONE && sCurrentCapMusic != seqArgs) { stop_background_music(sCurrentCapMusic); } diff --git a/src/game/spawn_object.c b/src/game/spawn_object.c index c78619c6..5e416584 100644 --- a/src/game/spawn_object.c +++ b/src/game/spawn_object.c @@ -164,9 +164,6 @@ void clear_object_lists(struct ObjectNode *objLists) { * This function looks broken, but it appears to attempt to delete the leaf * graph nodes under obj and obj's siblings. */ -#ifdef VERSION_EU -struct Object *unused_delete_leaf_nodes() {} -#else static void unused_delete_leaf_nodes(struct Object *obj) { struct Object *children; struct Object *sibling; @@ -185,7 +182,6 @@ static void unused_delete_leaf_nodes(struct Object *obj) { obj = (struct Object *) sibling->header.gfx.node.next; } } -#endif /** * Free the given object. @@ -258,8 +254,8 @@ struct Object *allocate_object(struct ObjectNode *objList) { #endif obj->unused1 = 0; - obj->stackIndex = 0; - obj->unk1F4 = 0; + obj->bhvStackIndex = 0; + obj->bhvDelayTimer = 0; obj->hitboxRadius = 50.0f; obj->hitboxHeight = 100.0f; @@ -315,18 +311,18 @@ static void snap_object_to_floor(struct Object *obj) { /** * Spawn an object at the origin with the behavior script at virtual address - * behScript. + * bhvScript. */ -struct Object *create_object(const BehaviorScript *behScript) { +struct Object *create_object(const BehaviorScript *bhvScript) { s32 objListIndex; struct Object *obj; struct ObjectNode *objList; - const BehaviorScript *behavior = behScript; + const BehaviorScript *behavior = bhvScript; // If the first behavior script command is "begin ", then // extract the object list from it - if ((behScript[0] >> 24) == 0) { - objListIndex = (behScript[0] >> 16) & 0xFFFF; + if ((bhvScript[0] >> 24) == 0) { + objListIndex = (bhvScript[0] >> 16) & 0xFFFF; } else { objListIndex = OBJ_LIST_DEFAULT; } @@ -334,7 +330,7 @@ struct Object *create_object(const BehaviorScript *behScript) { objList = &gObjectLists[objListIndex]; obj = allocate_object(objList); - obj->behScript = behScript; + obj->curBhvCommand = bhvScript; obj->behavior = behavior; if (objListIndex == OBJ_LIST_UNIMPORTANT) { diff --git a/src/game/spawn_object.h b/src/game/spawn_object.h index 074dda81..536a979e 100644 --- a/src/game/spawn_object.h +++ b/src/game/spawn_object.h @@ -7,7 +7,7 @@ struct Object; void init_free_object_list(void); void clear_object_lists(struct ObjectNode *objLists); void unload_object(struct Object *obj); -struct Object *create_object(const BehaviorScript *behScript); +struct Object *create_object(const BehaviorScript *bhvScript); void mark_obj_for_deletion(struct Object *obj); #endif /* _SPAWN_OBJECT_H */ diff --git a/src/game/spawn_sound.c b/src/game/spawn_sound.c index 98481f1c..c7812b25 100644 --- a/src/game/spawn_sound.c +++ b/src/game/spawn_sound.c @@ -7,6 +7,8 @@ #include "spawn_sound.h" #include "object_list_processor.h" #include "behavior_data.h" +#include "engine/graph_node.h" +#include "thread6.h" /* * execute an object's current sound state with a provided array @@ -58,14 +60,25 @@ void create_sound_spawner(s32 soundMagic) { * seperate left/right leg functions that went unused. */ void cur_obj_play_sound_1(s32 soundMagic) { - if (gCurrentObject->header.gfx.node.flags & 0x0001) { + if (gCurrentObject->header.gfx.node.flags & GRAPH_RENDER_ACTIVE) { play_sound(soundMagic, gCurrentObject->header.gfx.cameraToObject); } } void cur_obj_play_sound_2(s32 soundMagic) { - if (gCurrentObject->header.gfx.node.flags & 0x0001) { + if (gCurrentObject->header.gfx.node.flags & GRAPH_RENDER_ACTIVE) { play_sound(soundMagic, gCurrentObject->header.gfx.cameraToObject); +#ifdef VERSION_SH + if (soundMagic == SOUND_OBJ_BOWSER_WALK) { + queue_rumble_data(3, 60); + } + if (soundMagic == SOUND_OBJ_POUNDING_LOUD) { + queue_rumble_data(3, 60); + } + if (soundMagic == SOUND_OBJ_WHOMP_LOWPRIO) { + queue_rumble_data(5, 80); + } +#endif } } diff --git a/src/game/thread6.c b/src/game/thread6.c new file mode 100644 index 00000000..40984407 --- /dev/null +++ b/src/game/thread6.c @@ -0,0 +1,288 @@ +#include +#include "macros.h" + +#include "buffers/buffers.h" +#include "main.h" +#include "thread6.h" + +#ifdef VERSION_SH + +static s8 D_SH_8030CCB4; +static s32 sUnusedDisableRumble; +static s32 sRumblePakThreadActive; +static s32 sRumblePakActive; +static s32 sRumblePakErrorCount; +s32 gRumblePakTimer; + +// These void* are OSPfs* but we don't have that header +extern s32 osMotorStop(void *); +extern s32 osMotorStart(void *); +extern u32 osMotorInit(OSMesgQueue *, void *, s32); + +void init_rumble_pak_scheduler_queue(void) { + osCreateMesgQueue(&gRumblePakSchedulerMesgQueue, gRumblePakSchedulerMesgBuf, 1); + osSendMesg(&gRumblePakSchedulerMesgQueue, (OSMesg) 0, OS_MESG_NOBLOCK); +} + +void block_until_rumble_pak_free(void) { + OSMesg msg; + osRecvMesg(&gRumblePakSchedulerMesgQueue, &msg, OS_MESG_BLOCK); +} + +void release_rumble_pak_control(void) { + osSendMesg(&gRumblePakSchedulerMesgQueue, (OSMesg) 0, OS_MESG_NOBLOCK); +} + +static void start_rumble(void) { + if (!sRumblePakActive) { + return; + } + + block_until_rumble_pak_free(); + + if (!osMotorStart(&gRumblePakPfs)) { + sRumblePakErrorCount = 0; + } else { + sRumblePakErrorCount++; + } + + release_rumble_pak_control(); +} + +static void stop_rumble(void) { + if (!sRumblePakActive) { + return; + } + + block_until_rumble_pak_free(); + + if (!osMotorStop(&gRumblePakPfs)) { + sRumblePakErrorCount = 0; + } else { + sRumblePakErrorCount++; + } + + release_rumble_pak_control(); +} + +static void update_rumble_pak(void) { + if (D_SH_8030CCB4 > 0) { + stop_rumble(); + return; + } + + if (gCurrRumbleSettings.unk08 > 0) { + gCurrRumbleSettings.unk08--; + start_rumble(); + } else if (gCurrRumbleSettings.unk04 > 0) { + gCurrRumbleSettings.unk04--; + + gCurrRumbleSettings.unk02 -= gCurrRumbleSettings.unk0E; + if (gCurrRumbleSettings.unk02 < 0) { + gCurrRumbleSettings.unk02 = 0; + } + + if (gCurrRumbleSettings.unk00 == 1) { + start_rumble(); + } else if (gCurrRumbleSettings.unk06 >= 0x100) { + gCurrRumbleSettings.unk06 -= 0x100; + start_rumble(); + } else { + gCurrRumbleSettings.unk06 += + ((gCurrRumbleSettings.unk02 * gCurrRumbleSettings.unk02 * gCurrRumbleSettings.unk02) / (1 << 9)) + 4; + + stop_rumble(); + } + } else { + gCurrRumbleSettings.unk04 = 0; + + if (gCurrRumbleSettings.unk0A >= 5) { + start_rumble(); + } else if ((gCurrRumbleSettings.unk0A >= 2) && (gGlobalTimer % gCurrRumbleSettings.unk0C == 0)) { + start_rumble(); + } else { + stop_rumble(); + } + } + + if (gCurrRumbleSettings.unk0A > 0) { + gCurrRumbleSettings.unk0A--; + } +} + +static void update_rumble_data_queue(void) { + if (gRumbleDataQueue[0].unk00) { + gCurrRumbleSettings.unk06 = 0; + gCurrRumbleSettings.unk08 = 4; + gCurrRumbleSettings.unk00 = gRumbleDataQueue[0].unk00; + gCurrRumbleSettings.unk04 = gRumbleDataQueue[0].unk02; + gCurrRumbleSettings.unk02 = gRumbleDataQueue[0].unk01; + gCurrRumbleSettings.unk0E = gRumbleDataQueue[0].unk04; + } + + gRumbleDataQueue[0] = gRumbleDataQueue[1]; + gRumbleDataQueue[1] = gRumbleDataQueue[2]; + + gRumbleDataQueue[2].unk00 = 0; +} + +void queue_rumble_data(s16 a0, s16 a1) { + if (sUnusedDisableRumble) { + return; + } + + if (a1 > 70) { + gRumbleDataQueue[2].unk00 = 1; + } else { + gRumbleDataQueue[2].unk00 = 2; + } + + gRumbleDataQueue[2].unk01 = a1; + gRumbleDataQueue[2].unk02 = a0; + gRumbleDataQueue[2].unk04 = 0; +} + +void func_sh_8024C89C(s16 a0) { + gRumbleDataQueue[2].unk04 = a0; +} + +u8 is_rumble_finished_and_queue_empty(void) { + if (gCurrRumbleSettings.unk08 + gCurrRumbleSettings.unk04 >= 4) { + return FALSE; + } + + if (gRumbleDataQueue[0].unk00 != 0) { + return FALSE; + } + + if (gRumbleDataQueue[1].unk00 != 0) { + return FALSE; + } + + if (gRumbleDataQueue[2].unk00 != 0) { + return FALSE; + } + + return TRUE; +} + +void reset_rumble_timers(void) { + if (sUnusedDisableRumble) { + return; + } + + if (gCurrRumbleSettings.unk0A == 0) { + gCurrRumbleSettings.unk0A = 7; + } + + if (gCurrRumbleSettings.unk0A < 4) { + gCurrRumbleSettings.unk0A = 4; + } + + gCurrRumbleSettings.unk0C = 7; +} + +void reset_rumble_timers_2(s32 a0) { + if (sUnusedDisableRumble) { + return; + } + + if (gCurrRumbleSettings.unk0A == 0) { + gCurrRumbleSettings.unk0A = 7; + } + + if (gCurrRumbleSettings.unk0A < 4) { + gCurrRumbleSettings.unk0A = 4; + } + + if (a0 == 4) { + gCurrRumbleSettings.unk0C = 1; + } + + if (a0 == 3) { + gCurrRumbleSettings.unk0C = 2; + } + + if (a0 == 2) { + gCurrRumbleSettings.unk0C = 3; + } + + if (a0 == 1) { + gCurrRumbleSettings.unk0C = 4; + } + + if (a0 == 0) { + gCurrRumbleSettings.unk0C = 5; + } +} + +void func_sh_8024CA04(void) { + if (sUnusedDisableRumble) { + return; + } + + gCurrRumbleSettings.unk0A = 4; + gCurrRumbleSettings.unk0C = 4; +} + +static void thread6_rumble_loop(UNUSED void *a0) { + OSMesg msg; + + cancel_rumble(); + + sRumblePakThreadActive = TRUE; + + while (TRUE) { + // Block until VI + osRecvMesg(&gRumbleThreadVIMesgQueue, &msg, OS_MESG_BLOCK); + + update_rumble_data_queue(); + update_rumble_pak(); + + if (sRumblePakActive) { + if (sRumblePakErrorCount >= 30) { + sRumblePakActive = FALSE; + } + } else if (gGlobalTimer % 60 == 0) { + sRumblePakActive = osMotorInit(&gSIEventMesgQueue, &gRumblePakPfs, gPlayer1Controller->port) < 1; + sRumblePakErrorCount = 0; + } + + if (gRumblePakTimer > 0) { + gRumblePakTimer--; + } + } +} + +void cancel_rumble(void) { + sRumblePakActive = osMotorInit(&gSIEventMesgQueue, &gRumblePakPfs, gPlayer1Controller->port) < 1; + + if (sRumblePakActive) { + osMotorStop(&gRumblePakPfs); + } + + gRumbleDataQueue[0].unk00 = 0; + gRumbleDataQueue[1].unk00 = 0; + gRumbleDataQueue[2].unk00 = 0; + + gCurrRumbleSettings.unk04 = 0; + gCurrRumbleSettings.unk0A = 0; + + gRumblePakTimer = 0; +} + +void create_thread_6(void) { + osCreateMesgQueue(&gRumbleThreadVIMesgQueue, gRumbleThreadVIMesgBuf, 1); + osCreateThread(&gRumblePakThread, 6, thread6_rumble_loop, NULL, gThread6Stack + 0x2000, 30); + osStartThread(&gRumblePakThread); +} + +void rumble_thread_update_vi(void) { + if (sRumblePakThreadActive == FALSE) { + return; + } + + osSendMesg(&gRumbleThreadVIMesgQueue, (OSMesg) 0x56525443, OS_MESG_NOBLOCK); +} + +#endif diff --git a/src/game/thread6.h b/src/game/thread6.h new file mode 100644 index 00000000..92418635 --- /dev/null +++ b/src/game/thread6.h @@ -0,0 +1,23 @@ +#ifndef _THREAD_6_H +#define _THREAD_6_H + +#ifdef VERSION_SH + +extern s32 gRumblePakTimer; + +extern void init_rumble_pak_scheduler_queue(void); +extern void block_until_rumble_pak_free(void); +extern void release_rumble_pak_control(void); +extern void queue_rumble_data(s16 a0, s16 a1); +extern void func_sh_8024C89C(s16 a0); +extern u8 is_rumble_finished_and_queue_empty(void); +extern void reset_rumble_timers(void); +extern void reset_rumble_timers_2(s32 a0); +extern void func_sh_8024CA04(void); +extern void cancel_rumble(void); +extern void create_thread_6(void); +extern void rumble_thread_update_vi(void); + +#endif + +#endif diff --git a/src/goddard/draw_objects.c b/src/goddard/draw_objects.c index 9abbd0c4..55ad28ac 100644 --- a/src/goddard/draw_objects.c +++ b/src/goddard/draw_objects.c @@ -142,8 +142,8 @@ void Unknown801781DC(struct ObjZone *zone) { lightPos.y = light->position.y; lightPos.z = light->position.z; unk = (struct ObjUnk200000 *) obj; - sp34 = dot_product_vec3f(&unk->unk34->normal, &unk->unk30->pos); - sp30 = dot_product_vec3f(&unk->unk34->normal, &lightPos); + sp34 = gd_dot_vec3f(&unk->unk34->normal, &unk->unk30->pos); + sp30 = gd_dot_vec3f(&unk->unk34->normal, &lightPos); lightPos.x -= unk->unk34->normal.x * (sp30 - sp34); lightPos.y -= unk->unk34->normal.y * (sp30 - sp34); lightPos.z -= unk->unk34->normal.z * (sp30 - sp34); @@ -260,7 +260,7 @@ void draw_shape_2d(struct ObjShape *shape, s32 flag, UNUSED f32 c, UNUSED f32 d, sp1C.y = g; sp1C.z = h; if (gViewUpdateCamera != NULL) { - func_80196430(&sp1C, &gViewUpdateCamera->unkE8); + gd_rotate_and_translate_vec3f(&sp1C, &gViewUpdateCamera->unkE8); } translate_load_mtx_gddl(sp1C.x, sp1C.y, sp1C.z); } @@ -284,11 +284,11 @@ void draw_light(struct ObjLight *light) { sLightColours[0].b = light->colour.b; if (light->flags & LIGHT_UNK02) { - set_identity_mat4(&sp54); + gd_set_identity_mat4(&sp54); sp94.x = -light->unk80.x; sp94.y = -light->unk80.y; sp94.z = -light->unk80.z; - func_80194358(&sp54, &sp94, 0.0f); + gd_create_origin_lookat(&sp54, &sp94, 0.0f); uMultiplier = light->unk38 / 45.0; shape = D_801A82E4; uMatPtr = &sp54; @@ -695,7 +695,7 @@ void func_80179B64(struct ObjGroup *group) { /* 22836C -> 228498 */ void func_80179B9C(struct GdVec3f *pos, struct ObjCamera *cam, struct ObjView *view) { - func_80196430(pos, &cam->unkE8); + gd_rotate_and_translate_vec3f(pos, &cam->unkE8); if (pos->z > -256.0f) { return; } @@ -1022,7 +1022,7 @@ void Proc8017A980(struct ObjLight *light) { sLightPositionCache[light->id].x = light->position.x - sLightPositionOffset.x; sLightPositionCache[light->id].y = light->position.y - sLightPositionOffset.y; sLightPositionCache[light->id].z = light->position.z - sLightPositionOffset.z; - into_unit_vec3f(&sLightPositionCache[light->id]); + gd_normalize_vec3f(&sLightPositionCache[light->id]); if (light->flags & LIGHT_UNK20) { sPhongLightPosition.x = sLightPositionCache[light->id].x; sPhongLightPosition.y = sLightPositionCache[light->id].y; @@ -1031,7 +1031,7 @@ void Proc8017A980(struct ObjLight *light) { } sp24 = light->unk30; if (light->flags & LIGHT_UNK02) { - sp20 = -dot_product_vec3f(&sLightPositionCache[light->id], &light->unk80); + sp20 = -gd_dot_vec3f(&sLightPositionCache[light->id], &light->unk80); sp1C = 1.0 - light->unk38 / 90.0; if (sp20 > sp1C) { sp20 = (sp20 - sp1C) * (1.0 / (1.0 - sp1C)); diff --git a/src/goddard/dynlist_proc.c b/src/goddard/dynlist_proc.c index 93818f86..2ffa327a 100644 --- a/src/goddard/dynlist_proc.c +++ b/src/goddard/dynlist_proc.c @@ -934,9 +934,9 @@ void alloc_animdata(struct ObjAnimator *animator) { tri.p2.y = (f32)(*halfarr)[7]; tri.p2.z = (f32)(*halfarr)[8]; - set_identity_mat4(&curMtxVec->matrix); - func_80194220(&curMtxVec->matrix, &tri.p1); - func_801942E4(&curMtxVec->matrix, &tri.p2); + gd_set_identity_mat4(&curMtxVec->matrix); + gd_rot_mat_about_vec(&curMtxVec->matrix, &tri.p1); + gd_add_vec3f_to_mat4f_offset(&curMtxVec->matrix, &tri.p2); ((struct AnimMtxVec *) allocSpace)[dataIdx].vec.x = tri.p0.x; ((struct AnimMtxVec *) allocSpace)[dataIdx].vec.y = tri.p0.y; @@ -1045,11 +1045,11 @@ void chk_shapegen(struct ObjShape *shape) { vtxbuf[i]->normal.x = vtxbuf[i]->pos.x; vtxbuf[i]->normal.y = vtxbuf[i]->pos.y; vtxbuf[i]->normal.z = vtxbuf[i]->pos.z; - into_unit_vec3f(&vtxbuf[i]->normal); + gd_normalize_vec3f(&vtxbuf[i]->normal); } } else { for (i = 0; i < vtxdata->count; i++) { - into_unit_vec3f(&vtxbuf[i]->normal); + gd_normalize_vec3f(&vtxbuf[i]->normal); } } @@ -2054,7 +2054,7 @@ void d_set_normal(f32 x, f32 y, f32 z) { normal.x = x; normal.y = y; normal.z = z; - into_unit_vec3f(&normal); + gd_normalize_vec3f(&normal); switch (sDynListCurObj->type) { case OBJ_TYPE_VERTICES: @@ -2918,20 +2918,20 @@ void d_get_matrix(Mat4f *dst) { dynobj = sDynListCurObj; switch (sDynListCurObj->type) { case OBJ_TYPE_NETS: - cpy_mat4(&((struct ObjNet *) dynobj)->mat128, dst); + gd_copy_mat4f(&((struct ObjNet *) dynobj)->mat128, dst); break; break; // lol case OBJ_TYPE_JOINTS: - cpy_mat4(&((struct ObjJoint *) dynobj)->matE8, dst); + gd_copy_mat4f(&((struct ObjJoint *) dynobj)->matE8, dst); break; case OBJ_TYPE_CAMERAS: - cpy_mat4(&((struct ObjCamera *) dynobj)->unkE8, dst); + gd_copy_mat4f(&((struct ObjCamera *) dynobj)->unkE8, dst); break; case OBJ_TYPE_PARTICLES: - set_identity_mat4(dst); + gd_set_identity_mat4(dst); break; case OBJ_TYPE_SHAPES: - set_identity_mat4(dst); + gd_set_identity_mat4(dst); break; default: fatal_printf("%s: Object '%s'(%x) does not support this function.", "dGetMatrix()", @@ -2949,16 +2949,16 @@ void d_set_matrix(Mat4f *src) { switch (sDynListCurObj->type) { case OBJ_TYPE_NETS: - cpy_mat4(src, &((struct ObjNet *) sDynListCurObj)->mat128); + gd_copy_mat4f(src, &((struct ObjNet *) sDynListCurObj)->mat128); //! @bug When setting an `ObjNet` matrix, the source is copied twice //! due to a probable copy-paste line repeat error - cpy_mat4(src, &((struct ObjNet *) sDynListCurObj)->mat128); + gd_copy_mat4f(src, &((struct ObjNet *) sDynListCurObj)->mat128); break; case OBJ_TYPE_JOINTS: - cpy_mat4(src, &((struct ObjJoint *) sDynListCurObj)->matE8); + gd_copy_mat4f(src, &((struct ObjJoint *) sDynListCurObj)->matE8); break; case OBJ_TYPE_CAMERAS: - cpy_mat4(src, &((struct ObjCamera *) sDynListCurObj)->unk64); + gd_copy_mat4f(src, &((struct ObjCamera *) sDynListCurObj)->unk64); break; default: fatal_printf("%s: Object '%s'(%x) does not support this function.", "dSetMatrix()", @@ -2977,10 +2977,10 @@ void d_set_rot_mtx(Mat4f *src) { switch (sDynListCurObj->type) { case OBJ_TYPE_JOINTS: - cpy_mat4(src, &((struct ObjJoint *) sDynListCurObj)->mat128); + gd_copy_mat4f(src, &((struct ObjJoint *) sDynListCurObj)->mat128); break; case OBJ_TYPE_NETS: - cpy_mat4(src, &((struct ObjNet *) sDynListCurObj)->mat168); + gd_copy_mat4f(src, &((struct ObjNet *) sDynListCurObj)->mat168); break; default: fatal_printf("%s: Object '%s'(%x) does not support this function.", "dSetRMatrix()", @@ -3021,10 +3021,10 @@ void d_set_idn_mtx(Mat4f *src) { dynobj = sDynListCurObj; switch (sDynListCurObj->type) { case OBJ_TYPE_NETS: - cpy_mat4(src, &((struct ObjNet *) dynobj)->matE8); + gd_copy_mat4f(src, &((struct ObjNet *) dynobj)->matE8); break; case OBJ_TYPE_JOINTS: - cpy_mat4(src, &((struct ObjJoint *) dynobj)->mat168); + gd_copy_mat4f(src, &((struct ObjJoint *) dynobj)->mat168); break; case OBJ_TYPE_LIGHTS: ((struct ObjLight *) dynobj)->position.x = (*src)[3][0]; @@ -3108,7 +3108,7 @@ f32 d_calc_world_dist_btwn(struct GdObj *obj1, struct GdObj *obj2) { posdiff.y = obj2pos.y - obj1pos.y; posdiff.z = obj2pos.z - obj1pos.z; - return magnitude_vec3f(&posdiff); + return gd_vec3f_magnitude(&posdiff); } /** diff --git a/src/goddard/gd_math.c b/src/goddard/gd_math.c index 30afc72e..7f24f7e1 100644 --- a/src/goddard/gd_math.c +++ b/src/goddard/gd_math.c @@ -7,75 +7,92 @@ #include "debug_utils.h" #include "renderer.h" -/* 242300 -> 242338 */ +/** + * Finds the square root of a float by treating + * it as a double and finding the square root from there. + */ f32 gd_sqrt_f(f32 val) { return (f32) gd_sqrt_d(val); } -/* 242338 -> 24292C */ -void func_80193B68(Mat4f *mtx, f32 a1, f32 a2, f32 a3, f32 sp78, f32 sp7C, f32 sp80, f32 sp84, f32 sp88, - f32 sp8C) { - f32 sp64; - struct GdVec3f sp58; - struct GdVec3f sp4C; - struct GdVec3f sp40; +/** + * Set mtx to a look-at matrix for the camera. The resulting transformation + * transforms the world as if there exists a camera at position 'from' pointed + * at the position 'to'. + * An effective goddard copy of mtxf_lookat. + */ +void gd_mat4f_lookat(Mat4f *mtx, f32 xFrom, f32 yFrom, f32 zFrom, f32 xTo, f32 yTo, f32 zTo, + f32 zColY, f32 yColY, f32 xColY) { + f32 invLength; - set_identity_mat4(mtx); - sp58.z = sp78 - a1; - sp58.y = sp7C - a2; - sp58.x = sp80 - a3; + struct GdVec3f d; + struct GdVec3f colX; + struct GdVec3f norm; - sp64 = ABS(sp58.z) + ABS(sp58.y) + ABS(sp58.x); + // No reason to do this? mtx is set lower. + gd_set_identity_mat4(mtx); - if (sp64 > 10000.0f || sp64 < 10.0f) { - sp40.x = sp58.z; - sp40.y = sp58.y; - sp40.z = sp58.x; - into_unit_vec3f(&sp40); - sp40.x *= 10000.0f; - sp40.y *= 10000.0f; - sp40.z *= 10000.0f; + d.z = xTo - xFrom; + d.y = yTo - yFrom; + d.x = zTo - zFrom; - sp58.z = sp40.x; - sp58.y = sp40.y; - sp58.x = sp40.z; + invLength = ABS(d.z) + ABS(d.y) + ABS(d.x); + + // Scales 'd' if smaller than 10 or larger than 10,000 to be + // of a magnitude of 10,000. + if (invLength > 10000.0f || invLength < 10.0f) { + norm.x = d.z; + norm.y = d.y; + norm.z = d.x; + gd_normalize_vec3f(&norm); + norm.x *= 10000.0f; + norm.y *= 10000.0f; + norm.z *= 10000.0f; + + d.z = norm.x; + d.y = norm.y; + d.x = norm.z; } - // L80193D44 - sp64 = -1.0 / gd_sqrt_f(SQ(sp58.z) + SQ(sp58.y) + SQ(sp58.x)); //? -1.0f - sp58.z *= sp64; - sp58.y *= sp64; - sp58.x *= sp64; - // 80193DC8 - sp4C.z = sp88 * sp58.x - sp8C * sp58.y; - sp4C.y = sp8C * sp58.z - sp84 * sp58.x; - sp4C.x = sp84 * sp58.y - sp88 * sp58.z; - sp64 = 1.0 / gd_sqrt_f(SQ(sp4C.z) + SQ(sp4C.y) + SQ(sp4C.x)); //? 1.0f - sp4C.z *= sp64; - sp4C.y *= sp64; - sp4C.x *= sp64; - sp84 = sp58.y * sp4C.x - sp58.x * sp4C.y; - sp88 = sp58.x * sp4C.z - sp58.z * sp4C.x; - sp8C = sp58.z * sp4C.y - sp58.y * sp4C.z; - sp64 = 1.0 / gd_sqrt_f(SQ(sp84) + SQ(sp88) + SQ(sp8C)); //? 1.0f - sp84 *= sp64; - sp88 *= sp64; - sp8C *= sp64; - // 80193FA8 - (*mtx)[0][0] = sp4C.z; - (*mtx)[1][0] = sp4C.y; - (*mtx)[2][0] = sp4C.x; - (*mtx)[3][0] = -(a1 * sp4C.z + a2 * sp4C.y + a3 * sp4C.x); + invLength = -1.0 / gd_sqrt_f(SQ(d.z) + SQ(d.y) + SQ(d.x)); + d.z *= invLength; + d.y *= invLength; + d.x *= invLength; - (*mtx)[0][1] = sp84; - (*mtx)[1][1] = sp88; - (*mtx)[2][1] = sp8C; - (*mtx)[3][1] = -(a1 * sp84 + a2 * sp88 + a3 * sp8C); + colX.z = yColY * d.x - xColY * d.y; + colX.y = xColY * d.z - zColY * d.x; + colX.x = zColY * d.y - yColY * d.z; - (*mtx)[0][2] = sp58.z; - (*mtx)[1][2] = sp58.y; - (*mtx)[2][2] = sp58.x; - (*mtx)[3][2] = -(a1 * sp58.z + a2 * sp58.y + a3 * sp58.x); + invLength = 1.0 / gd_sqrt_f(SQ(colX.z) + SQ(colX.y) + SQ(colX.x)); + + colX.z *= invLength; + colX.y *= invLength; + colX.x *= invLength; + + zColY = d.y * colX.x - d.x * colX.y; + yColY = d.x * colX.z - d.z * colX.x; + xColY = d.z * colX.y - d.y * colX.z; + + invLength = 1.0 / gd_sqrt_f(SQ(zColY) + SQ(yColY) + SQ(xColY)); + + zColY *= invLength; + yColY *= invLength; + xColY *= invLength; + + (*mtx)[0][0] = colX.z; + (*mtx)[1][0] = colX.y; + (*mtx)[2][0] = colX.x; + (*mtx)[3][0] = -(xFrom * colX.z + yFrom * colX.y + zFrom * colX.x); + + (*mtx)[0][1] = zColY; + (*mtx)[1][1] = yColY; + (*mtx)[2][1] = xColY; + (*mtx)[3][1] = -(xFrom * zColY + yFrom * yColY + zFrom * xColY); + + (*mtx)[0][2] = d.z; + (*mtx)[1][2] = d.y; + (*mtx)[2][2] = d.x; + (*mtx)[3][2] = -(xFrom * d.z + yFrom * d.y + zFrom * d.x); (*mtx)[0][3] = 0.0f; (*mtx)[1][3] = 0.0f; @@ -83,8 +100,10 @@ void func_80193B68(Mat4f *mtx, f32 a1, f32 a2, f32 a3, f32 sp78, f32 sp7C, f32 s (*mtx)[3][3] = 1.0f; } -/* 24292C -> 2429F0 */ -void func_8019415C(Mat4f *mtx, struct GdVec3f *vec) { +/** + * Scales a mat4f in each dimension by a vector. + */ +void gd_scale_mat4f_by_vec3f(Mat4f *mtx, struct GdVec3f *vec) { (*mtx)[0][0] *= vec->x; (*mtx)[0][1] *= vec->x; (*mtx)[0][2] *= vec->x; @@ -96,21 +115,26 @@ void func_8019415C(Mat4f *mtx, struct GdVec3f *vec) { (*mtx)[2][2] *= vec->z; } -/* 2429F0 -> 242AB4 */ -void func_80194220(Mat4f *mtx, struct GdVec3f *vec) { +/** + * Rotates the matrix 'mtx' about the vector given. + */ +void gd_rot_mat_about_vec(Mat4f *mtx, struct GdVec3f *vec) { if (vec->x != 0.0f) { - absrot_mat4(mtx, 0, vec->x); + gd_absrot_mat4(mtx, GD_X_AXIS, vec->x); } if (vec->y != 0.0f) { - absrot_mat4(mtx, 1, vec->y); + gd_absrot_mat4(mtx, GD_Y_AXIS, vec->y); } if (vec->z != 0.0f) { - absrot_mat4(mtx, 2, vec->z); + gd_absrot_mat4(mtx, GD_Z_AXIS, vec->z); } } -/* 242AB4 -> 242B28 */ -void func_801942E4(Mat4f *mtx, struct GdVec3f *vec) { +/** + * Adds each component of a vector to the + * translation column of a mat4f matrix. + */ +void gd_add_vec3f_to_mat4f_offset(Mat4f *mtx, struct GdVec3f *vec) { UNUSED Mat4f temp; f32 z, y, x; @@ -123,56 +147,72 @@ void func_801942E4(Mat4f *mtx, struct GdVec3f *vec) { (*mtx)[3][2] += z; } -/* 242B28 -> 242EF8 */ -void func_80194358(Mat4f *mtx, struct GdVec3f *vec, f32 a2) { - f32 sp34; - f32 sp30; // distance between unit vec.x and unit vec.y - f32 sp2C; // cos(a2) - f32 sp28; // sin(a2) - f32 sp24 = RAD_PER_DEG; - struct GdVec3f unit; // 18 +/** + * Creates a lookat matrix, but specifically from the perspective of the origin. + * Rolls is only ever 0 in practice, and this is really only ever used once. + * + * Matrix has form- | -(cz+sxy)/h sh (cx-syz)/h 0 | + * | (sz-cxy)/h ch -(sx+cyz)/h 0 | + * | -x -y -z 0 | + * | 0 0 0 1 | + */ +void gd_create_origin_lookat(Mat4f *mtx, struct GdVec3f *vec, f32 roll) { + f32 invertedHMag; + f32 hMag; + f32 c; + f32 s; + f32 radPerDeg = RAD_PER_DEG; + struct GdVec3f unit; unit.x = vec->x; unit.y = vec->y; unit.z = vec->z; - into_unit_vec3f(&unit); - sp30 = gd_sqrt_f(SQ(unit.x) + SQ(unit.z)); - a2 *= sp24; // convert a2 from degrees to radians? - sp28 = gd_sin_d(a2); - sp2C = gd_cos_d(a2); - set_identity_mat4(mtx); - if (sp30 != 0.0f) { - sp34 = 1.0f / sp30; - (*mtx)[0][0] = ((-unit.z * sp2C) - (sp28 * unit.y * unit.x)) * sp34; - (*mtx)[1][0] = ((unit.z * sp28) - (sp2C * unit.y * unit.x)) * sp34; + gd_normalize_vec3f(&unit); + hMag = gd_sqrt_f(SQ(unit.x) + SQ(unit.z)); + + roll *= radPerDeg; // convert roll from degrees to radians + s = gd_sin_d(roll); + c = gd_cos_d(roll); + + gd_set_identity_mat4(mtx); + if (hMag != 0.0f) { + invertedHMag = 1.0f / hMag; + (*mtx)[0][0] = ((-unit.z * c) - (s * unit.y * unit.x)) * invertedHMag; + (*mtx)[1][0] = ((unit.z * s) - (c * unit.y * unit.x)) * invertedHMag; (*mtx)[2][0] = -unit.x; (*mtx)[3][0] = 0.0f; - (*mtx)[0][1] = sp28 * sp30; - (*mtx)[1][1] = sp2C * sp30; + + (*mtx)[0][1] = s * hMag; + (*mtx)[1][1] = c * hMag; (*mtx)[2][1] = -unit.y; (*mtx)[3][1] = 0.0f; - (*mtx)[0][2] = ((sp2C * unit.x) - (sp28 * unit.y * unit.z)) * sp34; - (*mtx)[1][2] = ((-sp28 * unit.x) - (sp2C * unit.y * unit.z)) * sp34; + + (*mtx)[0][2] = ((c * unit.x) - (s * unit.y * unit.z)) * invertedHMag; + (*mtx)[1][2] = ((-s * unit.x) - (c * unit.y * unit.z)) * invertedHMag; (*mtx)[2][2] = -unit.z; (*mtx)[3][2] = 0.0f; + (*mtx)[0][3] = 0.0f; (*mtx)[1][3] = 0.0f; (*mtx)[2][3] = 0.0f; (*mtx)[3][3] = 1.0f; - } else { // L80194600 + } else { (*mtx)[0][0] = 0.0f; (*mtx)[1][0] = 1.0f; (*mtx)[2][0] = 0.0f; (*mtx)[3][0] = 0.0f; + (*mtx)[0][1] = 0.0f; (*mtx)[1][1] = 0.0f; (*mtx)[2][1] = 1.0f; (*mtx)[3][1] = 0.0f; + (*mtx)[0][2] = 1.0f; (*mtx)[1][2] = 0.0f; (*mtx)[2][2] = 0.0f; (*mtx)[3][2] = 0.0f; + (*mtx)[0][3] = 0.0f; (*mtx)[1][3] = 0.0f; (*mtx)[2][3] = 0.0f; @@ -180,8 +220,10 @@ void func_80194358(Mat4f *mtx, struct GdVec3f *vec, f32 a2) { } } -/* 242EF8 -> 242F40 */ -f32 func_80194728(f32 a, f32 b) { +/** + * Clamps a float within a set range about zero. + */ +f32 gd_clamp_f32(f32 a, f32 b) { if (b < a) { a = b; } else if (a < -b) { @@ -191,8 +233,10 @@ f32 func_80194728(f32 a, f32 b) { return a; } -/* 242F40 -> 243050; orig name: func_80194770 */ -void limit_vec3f(struct GdVec3f *vec, f32 limit) { +/** + * Clamps a vector within a set range about zero. + */ +void gd_clamp_vec3f(struct GdVec3f *vec, f32 limit) { if (vec->x > limit) { vec->x = limit; } else if (vec->x < -limit) { @@ -212,50 +256,56 @@ void limit_vec3f(struct GdVec3f *vec, f32 limit) { } } -/* 243050 -> 24315C */ -void func_80194880(f32 a0, f32 *a1, f32 *a2) { - f32 sp34; - f32 sp30; - f32 sp2C; +/** + * Rotates a 2D vector by some angle in degrees. + */ +void gd_rot_2d_vec(f32 deg, f32 *x, f32 *y) { + f32 xP; + f32 yP; + f32 rad; - sp2C = a0 / DEG_PER_RAD; // degree to radians - sp34 = (*a1 * gd_cos_d(sp2C)) - (*a2 * gd_sin_d(sp2C)); - sp30 = (*a1 * gd_sin_d(sp2C)) + (*a2 * gd_cos_d(sp2C)); - *a1 = sp34; - *a2 = sp30; + rad = deg / DEG_PER_RAD; + xP = (*x * gd_cos_d(rad)) - (*y * gd_sin_d(rad)); + yP = (*x * gd_sin_d(rad)) + (*y * gd_cos_d(rad)); + *x = xP; + *y = yP; } -/* 24315C -> 243224 */ -void Unknown8019498C(Mat4f *a0, s32 row, f32 a2) { - Mat4f sp28; +/** + * Rotates a matrix about one of its rows. + */ +void UNUSED gd_rot_mat_about_row(Mat4f *mat, s32 row, f32 ang) { + Mat4f rot; struct GdVec3f vec; - vec.x = (*a0)[row][0]; - vec.y = (*a0)[row][1]; - vec.z = (*a0)[row][2]; + vec.x = (*mat)[row][0]; + vec.y = (*mat)[row][1]; + vec.z = (*mat)[row][2]; - func_801961F4(&sp28, &vec, a2 / 2.0); //? 2.0f - multiply_mat4(a0, &sp28, a0); + gd_create_rot_mat_angular(&rot, &vec, ang / 2.0); + gd_mult_mat4f(mat, &rot, mat); } -// TODO: enumerate second argument (0-2)? -/* 243224 -> 243368; orig name: func_80194A54 */ -void absrot_mat4(Mat4f *mtx, s32 axisnum, f32 a2) { - Mat4f sp30; - struct GdVec3f rot; // 24 +/** + * Rotates a mat4f matrix about a given axis + * by a set angle in degrees. + */ +void gd_absrot_mat4(Mat4f *mtx, s32 axisnum, f32 ang) { + Mat4f rMat; + struct GdVec3f rot; switch (axisnum) { - case 0: + case GD_X_AXIS: rot.x = 1.0f; rot.y = 0.0f; rot.z = 0.0f; break; - case 1: + case GD_Y_AXIS: rot.x = 0.0f; rot.y = 1.0f; rot.z = 0.0f; break; - case 2: + case GD_Z_AXIS: rot.x = 0.0f; rot.y = 0.0f; rot.z = 1.0f; @@ -264,23 +314,26 @@ void absrot_mat4(Mat4f *mtx, s32 axisnum, f32 a2) { fatal_printf("absrot_matrix4(): Bad axis num"); } - func_801961F4(&sp30, &rot, a2 / 2.0); //? 2.0f - multiply_mat4(mtx, &sp30, mtx); + gd_create_rot_mat_angular(&rMat, &rot, ang / 2.0); //? 2.0f + gd_mult_mat4f(mtx, &rMat, mtx); } -/* 243368 -> 2433C4 */ -f32 magnitude_vec3f(struct GdVec3f *vec) { + +f32 gd_vec3f_magnitude(struct GdVec3f *vec) { return gd_sqrt_f(SQ(vec->x) + SQ(vec->y) + SQ(vec->z)); } -/* 2433C4 -> 2434E4; orig name: func_80194BF4 */ -s32 into_unit_vec3f(struct GdVec3f *vec) { +/** + * Normalizes a vec3f to have a length of 1. + */ +s32 gd_normalize_vec3f(struct GdVec3f *vec) { f32 mag; if ((mag = SQ(vec->x) + SQ(vec->y) + SQ(vec->z)) == 0.0f) { return FALSE; } mag = gd_sqrt_f(mag); + // gd_sqrt_f rounds near 0 numbers to 0, so verify again. if (mag == 0.0f) { vec->x = 0.0f; vec->y = 0.0f; @@ -295,8 +348,10 @@ s32 into_unit_vec3f(struct GdVec3f *vec) { return TRUE; } -/* 2434E4 -> 243588; orig name: func_80194D14 */ -void cross_product_vec3f(struct GdVec3f *a, struct GdVec3f *b, struct GdVec3f *dst) { +/** + * Stores the cross product of 'a' x 'b' in 'dst'. + */ +void gd_cross_vec3f(struct GdVec3f *a, struct GdVec3f *b, struct GdVec3f *dst) { struct GdVec3f result; result.x = (a->y * b->z) - (a->z * b->y); @@ -308,13 +363,17 @@ void cross_product_vec3f(struct GdVec3f *a, struct GdVec3f *b, struct GdVec3f *d dst->z = result.z; } -/* 243588 -> 2435CC; orig name: func_80194DB8 */ -f32 dot_product_vec3f(struct GdVec3f *a, struct GdVec3f *b) { +/** + * Returns the dot product of 'a' and 'b'. + */ +f32 gd_dot_vec3f(struct GdVec3f *a, struct GdVec3f *b) { return (a->x * b->x) + (a->y * b->y) + (a->z * b->z); } -/* 2435CC -> 24364C */ -void Unknown80194DFC(Mat4f *src, Mat4f *dst) { +/** + * Inverts each element of src into dst. + */ +void UNUSED gd_invert_elements_mat4f(Mat4f *src, Mat4f *dst) { s32 i; s32 j; @@ -325,17 +384,17 @@ void Unknown80194DFC(Mat4f *src, Mat4f *dst) { } } -/* self */ void func_80194F90(Mat4f *, Mat4f *); -/* self */ f32 func_80195578(Mat4f *); - -/* 24364C -> 243760; orig name: func_80194E7C */ -void inverse_mat4(Mat4f *src, Mat4f *dst) { +/** + * Inverts a matrix from src and stores it into dst. + * Reaches a fatal_print if the determinant is 0. + */ +void gd_inverse_mat4f(Mat4f *src, Mat4f *dst) { s32 i; s32 j; f32 determinant; - func_80194F90(src, dst); - determinant = func_80195578(dst); + gd_adjunct_mat4f(src, dst); + determinant = gd_mat4f_det(dst); if (ABS(determinant) < 1e-5) //? 1e-5f { @@ -349,19 +408,11 @@ void inverse_mat4(Mat4f *src, Mat4f *dst) { } } -/* self */ f32 func_80195844(f32, f32, f32, f32, f32, f32, f32, f32, f32); - -struct Row4 { - f32 c0, c1, c2, c3; -}; -struct InvMat4 { - struct Row4 r0, r1, r2, r3; -}; - -/* 243760 -> 243D48 */ -// TODO: adjunct mat4? -void func_80194F90(Mat4f *src, Mat4f *adj) { - struct InvMat4 inv; // 30 +/** + * Takes a matrix from src and converts it into its adjunct in dst. + */ +void gd_adjunct_mat4f(Mat4f *src, Mat4f *dst) { + struct InvMat4 inv; inv.r3.c3 = (*src)[0][0]; inv.r2.c3 = (*src)[0][1]; @@ -380,60 +431,46 @@ void func_80194F90(Mat4f *src, Mat4f *adj) { inv.r1.c0 = (*src)[3][2]; inv.r0.c0 = (*src)[3][3]; - (*adj)[0][0] = func_80195844(inv.r2.c2, inv.r2.c1, inv.r2.c0, inv.r1.c2, inv.r1.c1, inv.r1.c0, + (*dst)[0][0] = gd_3x3_det(inv.r2.c2, inv.r2.c1, inv.r2.c0, inv.r1.c2, inv.r1.c1, inv.r1.c0, inv.r0.c2, inv.r0.c1, inv.r0.c0); - - (*adj)[1][0] = -func_80195844(inv.r3.c2, inv.r3.c1, inv.r3.c0, inv.r1.c2, inv.r1.c1, inv.r1.c0, + (*dst)[1][0] = -gd_3x3_det(inv.r3.c2, inv.r3.c1, inv.r3.c0, inv.r1.c2, inv.r1.c1, inv.r1.c0, inv.r0.c2, inv.r0.c1, inv.r0.c0); - // 80195170 - (*adj)[2][0] = func_80195844(inv.r3.c2, inv.r3.c1, inv.r3.c0, inv.r2.c2, inv.r2.c1, inv.r2.c0, + (*dst)[2][0] = gd_3x3_det(inv.r3.c2, inv.r3.c1, inv.r3.c0, inv.r2.c2, inv.r2.c1, inv.r2.c0, inv.r0.c2, inv.r0.c1, inv.r0.c0); - // 801951B8 - (*adj)[3][0] = -func_80195844(inv.r3.c2, inv.r3.c1, inv.r3.c0, inv.r2.c2, inv.r2.c1, inv.r2.c0, + (*dst)[3][0] = -gd_3x3_det(inv.r3.c2, inv.r3.c1, inv.r3.c0, inv.r2.c2, inv.r2.c1, inv.r2.c0, inv.r1.c2, inv.r1.c1, inv.r1.c0); - // 80195200 - (*adj)[0][1] = -func_80195844(inv.r2.c3, inv.r2.c1, inv.r2.c0, inv.r1.c3, inv.r1.c1, inv.r1.c0, + (*dst)[0][1] = -gd_3x3_det(inv.r2.c3, inv.r2.c1, inv.r2.c0, inv.r1.c3, inv.r1.c1, inv.r1.c0, inv.r0.c3, inv.r0.c1, inv.r0.c0); - // 80195248 - (*adj)[1][1] = func_80195844(inv.r3.c3, inv.r3.c1, inv.r3.c0, inv.r1.c3, inv.r1.c1, inv.r1.c0, + (*dst)[1][1] = gd_3x3_det(inv.r3.c3, inv.r3.c1, inv.r3.c0, inv.r1.c3, inv.r1.c1, inv.r1.c0, inv.r0.c3, inv.r0.c1, inv.r0.c0); - // 80195290 - (*adj)[2][1] = -func_80195844(inv.r3.c3, inv.r3.c1, inv.r3.c0, inv.r2.c3, inv.r2.c1, inv.r2.c0, + (*dst)[2][1] = -gd_3x3_det(inv.r3.c3, inv.r3.c1, inv.r3.c0, inv.r2.c3, inv.r2.c1, inv.r2.c0, inv.r0.c3, inv.r0.c1, inv.r0.c0); - // 801952D8 - (*adj)[3][1] = func_80195844(inv.r3.c3, inv.r3.c1, inv.r3.c0, inv.r2.c3, inv.r2.c1, inv.r2.c0, + (*dst)[3][1] = gd_3x3_det(inv.r3.c3, inv.r3.c1, inv.r3.c0, inv.r2.c3, inv.r2.c1, inv.r2.c0, inv.r1.c3, inv.r1.c1, inv.r1.c0); - // 80195320 - (*adj)[0][2] = func_80195844(inv.r2.c3, inv.r2.c2, inv.r2.c0, inv.r1.c3, inv.r1.c2, inv.r1.c0, + (*dst)[0][2] = gd_3x3_det(inv.r2.c3, inv.r2.c2, inv.r2.c0, inv.r1.c3, inv.r1.c2, inv.r1.c0, inv.r0.c3, inv.r0.c2, inv.r0.c0); - // 80195368 - (*adj)[1][2] = -func_80195844(inv.r3.c3, inv.r3.c2, inv.r3.c0, inv.r1.c3, inv.r1.c2, inv.r1.c0, + (*dst)[1][2] = -gd_3x3_det(inv.r3.c3, inv.r3.c2, inv.r3.c0, inv.r1.c3, inv.r1.c2, inv.r1.c0, inv.r0.c3, inv.r0.c2, inv.r0.c0); - // 801953B0 - (*adj)[2][2] = func_80195844(inv.r3.c3, inv.r3.c2, inv.r3.c0, inv.r2.c3, inv.r2.c2, inv.r2.c0, + (*dst)[2][2] = gd_3x3_det(inv.r3.c3, inv.r3.c2, inv.r3.c0, inv.r2.c3, inv.r2.c2, inv.r2.c0, inv.r0.c3, inv.r0.c2, inv.r0.c0); - // 801953F8 - (*adj)[3][2] = -func_80195844(inv.r3.c3, inv.r3.c2, inv.r3.c0, inv.r2.c3, inv.r2.c2, inv.r2.c0, + (*dst)[3][2] = -gd_3x3_det(inv.r3.c3, inv.r3.c2, inv.r3.c0, inv.r2.c3, inv.r2.c2, inv.r2.c0, inv.r1.c3, inv.r1.c2, inv.r1.c0); - // 80195440 - (*adj)[0][3] = -func_80195844(inv.r2.c3, inv.r2.c2, inv.r2.c1, inv.r1.c3, inv.r1.c2, inv.r1.c1, + (*dst)[0][3] = -gd_3x3_det(inv.r2.c3, inv.r2.c2, inv.r2.c1, inv.r1.c3, inv.r1.c2, inv.r1.c1, inv.r0.c3, inv.r0.c2, inv.r0.c1); - // 80195488 - (*adj)[1][3] = func_80195844(inv.r3.c3, inv.r3.c2, inv.r3.c1, inv.r1.c3, inv.r1.c2, inv.r1.c1, + (*dst)[1][3] = gd_3x3_det(inv.r3.c3, inv.r3.c2, inv.r3.c1, inv.r1.c3, inv.r1.c2, inv.r1.c1, inv.r0.c3, inv.r0.c2, inv.r0.c1); - // 801954D0 - (*adj)[2][3] = -func_80195844(inv.r3.c3, inv.r3.c2, inv.r3.c1, inv.r2.c3, inv.r2.c2, inv.r2.c1, + (*dst)[2][3] = -gd_3x3_det(inv.r3.c3, inv.r3.c2, inv.r3.c1, inv.r2.c3, inv.r2.c2, inv.r2.c1, inv.r0.c3, inv.r0.c2, inv.r0.c1); - // 80195518 - (*adj)[3][3] = func_80195844(inv.r3.c3, inv.r3.c2, inv.r3.c1, inv.r2.c3, inv.r2.c2, inv.r2.c1, + (*dst)[3][3] = gd_3x3_det(inv.r3.c3, inv.r3.c2, inv.r3.c1, inv.r2.c3, inv.r2.c2, inv.r2.c1, inv.r1.c3, inv.r1.c2, inv.r1.c1); } -/* 243D48 -> 244014 */ -// TODO: determinant mat4 -f32 func_80195578(Mat4f *mtx) { +/** + * Returns the determinant of a mat4f matrix. + */ +f32 gd_mat4f_det(Mat4f *mtx) { f32 det; - struct InvMat4 inv; // 54 -> 94 + struct InvMat4 inv; inv.r3.c3 = (*mtx)[0][0]; inv.r2.c3 = (*mtx)[0][1]; @@ -453,45 +490,56 @@ f32 func_80195578(Mat4f *mtx) { inv.r0.c0 = (*mtx)[3][3]; det = (inv.r3.c3 - * func_80195844(inv.r2.c2, inv.r2.c1, inv.r2.c0, inv.r1.c2, inv.r1.c1, inv.r1.c0, - inv.r0.c2, inv.r0.c1, inv.r0.c0) + * gd_3x3_det(inv.r2.c2, inv.r2.c1, inv.r2.c0, + inv.r1.c2, inv.r1.c1, inv.r1.c0, + inv.r0.c2, inv.r0.c1, inv.r0.c0) - inv.r2.c3 - * func_80195844(inv.r3.c2, inv.r3.c1, inv.r3.c0, inv.r1.c2, inv.r1.c1, inv.r1.c0, - inv.r0.c2, inv.r0.c1, inv.r0.c0)) + * gd_3x3_det(inv.r3.c2, inv.r3.c1, inv.r3.c0, + inv.r1.c2, inv.r1.c1, inv.r1.c0, + inv.r0.c2, inv.r0.c1, inv.r0.c0)) + inv.r1.c3 - * func_80195844(inv.r3.c2, inv.r3.c1, inv.r3.c0, inv.r2.c2, inv.r2.c1, inv.r2.c0, - inv.r0.c2, inv.r0.c1, inv.r0.c0) + * gd_3x3_det(inv.r3.c2, inv.r3.c1, inv.r3.c0, + inv.r2.c2, inv.r2.c1, inv.r2.c0, + inv.r0.c2, inv.r0.c1, inv.r0.c0) - inv.r0.c3 - * func_80195844(inv.r3.c2, inv.r3.c1, inv.r3.c0, inv.r2.c2, inv.r2.c1, inv.r2.c0, - inv.r1.c2, inv.r1.c1, inv.r1.c0); + * gd_3x3_det(inv.r3.c2, inv.r3.c1, inv.r3.c0, + inv.r2.c2, inv.r2.c1, inv.r2.c0, + inv.r1.c2, inv.r1.c1, inv.r1.c0); return det; } -/* self */ f32 func_8019590C(f32, f32, f32, f32); - -/* 244014 -> 2440DC */ -// TODO: determinant_3x3 -f32 func_80195844(f32 r0c0, f32 r0c1, f32 r0c2, f32 r1c0, f32 r1c1, f32 r1c2, f32 r2c0, f32 r2c1, - f32 r2c2) { +/** + * Takes the individual values of a 3 by 3 matrix and + * returns the determinant. + */ +f32 gd_3x3_det(f32 r0c0, f32 r0c1, f32 r0c2, + f32 r1c0, f32 r1c1, f32 r1c2, + f32 r2c0, f32 r2c1, f32 r2c2) { f32 det; - det = r0c0 * func_8019590C(r1c1, r1c2, r2c1, r2c2) - r1c0 * func_8019590C(r0c1, r0c2, r2c1, r2c2) - + r2c0 * func_8019590C(r0c1, r0c2, r1c1, r1c2); + det = r0c0 * gd_2x2_det(r1c1, r1c2, r2c1, r2c2) - r1c0 * gd_2x2_det(r0c1, r0c2, r2c1, r2c2) + + r2c0 * gd_2x2_det(r0c1, r0c2, r1c1, r1c2); return det; } -/* 2440DC -> 244120 */ -// TODO: determinant_2x2 -f32 func_8019590C(f32 a, f32 b, f32 c, f32 d) { +/** + * Takes the individual values of a 2 by 2 matrix and + * returns the determinant. + */ +f32 gd_2x2_det(f32 a, f32 b, f32 c, f32 d) { f32 det = a * d - b * c; return det; } -/* 244120 -> 2441B0 */ -void Unknown80195950(Mat4f *mtx, struct GdVec3f *vec, f32 x, f32 y, f32 z) { +/** + * Creates a vector negative to what was passed in. Also sets the first row of a mat4f + * to 1 0 0 0. Perhaps meant to be used at the end of gd_create_quat_rot_mat? Not + * sure of the purpose of the vector portion, though. + */ +void UNUSED gd_create_neg_vec_zero_first_mat_row(Mat4f *mtx, struct GdVec3f *vec, f32 x, f32 y, f32 z) { s32 i; vec->x = -x; @@ -505,72 +553,79 @@ void Unknown80195950(Mat4f *mtx, struct GdVec3f *vec, f32 x, f32 y, f32 z) { } } -/* 2441B0 -> 2442D4 */ -void Unknown801959E0(f32 *a0, struct GdVec3f *vec, f32 a2, s32 a3, s32 sp38) { - s32 sp24; - s32 sp20; - UNUSED f32 sp1C; - UNUSED f32 sp18; - UNUSED struct GdVec3f sp0C; - struct GdVec3f sp00; +/** + * This function quite literally does nothing. + * Seems to have been meant to create a vector from a quaternion? + */ +void UNUSED gd_broken_quat_to_vec3f(f32 quat[4], struct GdVec3f *vec, f32 zHalf, s32 i, s32 run) { + s32 j; + s32 k; + UNUSED f32 jVal; + UNUSED f32 kVal; + UNUSED struct GdVec3f uVec; + struct GdVec3f tVec; - sp00.x = vec->x; - sp00.y = vec->y; - sp00.z = vec->z; + tVec.x = vec->x; + tVec.y = vec->y; + tVec.z = vec->z; - if (sp38 < 0) { + if (run < 0) { goto end; } - // L80195A24 - sp24 = a3 + 1; - if (sp24 >= 4) { - sp24 = 1; - } - // L80195A48 - if ((sp20 = sp24 + 1) >= 4) { - sp20 = 1; - } - // L80195A68 - sp1C = a0[sp24]; - sp18 = a0[sp20]; - sp0C.x = a0[0]; - sp0C.y = a0[a3]; - sp0C.z = a2 + a2; -end: // L80195AD0 - vec->x = sp00.x; - vec->y = sp00.y; - vec->z = sp00.z; + if ((j = i + 1) >= 4) { + j = 1; + } + + if ((k = j + 1) >= 4) { + k = 1; + } + + jVal = quat[j]; + kVal = quat[k]; + uVec.x = quat[0]; + uVec.y = quat[i]; + uVec.z = zHalf + zHalf; + +end: + vec->x = tVec.x; + vec->y = tVec.y; + vec->z = tVec.z; } -/* 2442D4 -> 244448 */ -void Unknown80195B04(f32 *a0, UNUSED s32 a1, f32 a2, f32 a3, s32 sp28, s32 sp2C) { - s32 sp14; - s32 sp10; - f32 sp0C; +/** + * This function is a pitch rotation of a quaternion, with the sign allowing both regular + * and inverse multiplication. + */ +void UNUSED gd_quat_rotation(f32 quat[4], UNUSED s32 unused, f32 c, f32 s, s32 i, s32 sign) { + s32 j; + s32 k; + f32 quatVal; UNUSED u32 pad[2]; - if ((sp14 = sp28 + 1) >= 4) { - sp14 = 1; + if ((j = i + 1) >= 4) { + j = 1; } - if ((sp10 = sp14 + 1) >= 4) { - sp10 = 1; + if ((k = j + 1) >= 4) { + k = 1; } - sp0C = a0[sp28]; - a0[sp28] = ((f32) sp2C) * a3 * a0[0] + sp0C * a2; - a0[0] = a0[0] * a2 - ((f32) sp2C) * a3 * sp0C; + quatVal = quat[i]; + quat[i] = sign * s * quat[0] + quatVal * c; + quat[0] = quat[0] * c - sign * s * quatVal; - sp0C = a0[sp14]; - a0[sp14] = a0[sp10] * a3 + sp0C * a2; - a0[sp10] = a0[sp10] * a2 - a3 * sp0C; + quatVal = quat[j]; + quat[j] = quat[k] * s + quatVal * c; + quat[k] = quat[k] * c - s * quatVal; } -/* 244448 -> 244568 */ -void func_80195C78(Mat4f *mtx) { - s32 i; // 14 - s32 j; // 10 - f32 temp[3]; // 04 +/** + * Shifts a matrix up by one row, putting the top row on bottom. + */ +void gd_shift_mat_up(Mat4f *mtx) { + s32 i; + s32 j; + f32 temp[3]; for (i = 0; i < 3; i++) { temp[i] = (*mtx)[0][i + 1]; @@ -591,81 +646,114 @@ void func_80195C78(Mat4f *mtx) { } } -/* 244568 -> 2447A4 */ -void Unknown80195D98(f32 *a0, UNUSED s32 a1, Mat4f *mtx) { - f32 sp3C; - f32 sp38; - f32 temp[4]; // 28 - s32 i; // 24 - s32 sp20; // row? - s32 sp1C; +/** + * Creates a rotation matrix from a quaternion. + * + * Has form- + * | 1 - - - | + * | 0 w^2+i^2-j^2-k^2 2ij+2wk 2ik+2wj | + * | 0 2ij-2wk w^2+j^2-i^2-k^2 2jk+2wi | + * | 0 2ik+2wj 2jk-2wi w^2+k^2-i^2-j^2 | + * + * Potentially broken if 'mtx' is not an identity matrix/zero'ed. + */ +void UNUSED gd_create_quat_rot_mat(f32 quat[4], UNUSED s32 unused, Mat4f *mtx) { + f32 twoIJ; + f32 two0K; + f32 sqQuat[4]; + s32 i; + s32 j; + s32 k; for (i = 0; i < 4; i++) { - temp[i] = SQ(a0[i]); + sqQuat[i] = SQ(quat[i]); } + for (i = 1; i < 4; i++) { - if ((sp20 = i + 1) >= 4) { - sp20 = 1; - } - if ((sp1C = sp20 + 1) >= 4) { - sp1C = 1; + if ((j = i + 1) >= 4) { + j = 1; } - sp3C = 2.0 * a0[i] * a0[sp20]; //? 2.0f - sp38 = 2.0 * a0[sp1C] * a0[0]; //? 2.0f + if ((k = j + 1) >= 4) { + k = 1; + } - (*mtx)[sp20][i] = sp3C - sp38; - (*mtx)[i][sp20] = sp3C + sp38; - (*mtx)[i][i] = temp[i] + temp[0] - temp[sp20] - temp[sp1C]; + twoIJ = 2.0 * quat[i] * quat[j]; + two0K = 2.0 * quat[k] * quat[0]; + + (*mtx)[j][i] = twoIJ - two0K; + (*mtx)[i][j] = twoIJ + two0K; + (*mtx)[i][i] = sqQuat[i] + sqQuat[0] - sqQuat[j] - sqQuat[k]; (*mtx)[i][0] = 0.0f; } + + //! The first row only ever has the first value set to 1, but the + //! latter portions remain what they were originally. Perhaps this was meant + //! to call gd_create_neg_vec_zero_first_mat_row? (*mtx)[0][0] = 1.0f; - func_80195C78(mtx); + gd_shift_mat_up(mtx); } -/* 2447A4 -> 2449C4 */ -void func_80195FD4(Mat4f *mtx, struct GdVec3f *vec, f32 a, f32 b) { - f32 spC; - struct GdVec3f rev; // 0 +/** + * Creates a rotation matrix to multiply the primary matrix by. + * s/c are sin(angle)/cos(angle). That angular rotation is about vector + * 'vec'. + * + * Matrix has form- + * + * | (1-c)z^2+c (1-c)zy-sx (1-c)xz-sy 0 | + * | (1-c)zy-sx (1-c)y^2+c (1-c)xy-sz 0 | + * | (1-c)xz-sy (1-c)xy-sz (1-c)x^2+c 0 | + * | 0 0 0 1 | + */ +void gd_create_rot_matrix(Mat4f *mtx, struct GdVec3f *vec, f32 s, f32 c) { + f32 oneMinusCos; + struct GdVec3f rev; rev.z = vec->x; rev.y = vec->y; rev.x = vec->z; - spC = 1.0 - b; + oneMinusCos = 1.0 - c; - (*mtx)[0][0] = spC * rev.z * rev.z + b; - (*mtx)[0][1] = spC * rev.z * rev.y + a * rev.x; - (*mtx)[0][2] = spC * rev.z * rev.x - a * rev.y; + (*mtx)[0][0] = oneMinusCos * rev.z * rev.z + c; + (*mtx)[0][1] = oneMinusCos * rev.z * rev.y + s * rev.x; + (*mtx)[0][2] = oneMinusCos * rev.z * rev.x - s * rev.y; (*mtx)[0][3] = 0.0f; - (*mtx)[1][0] = spC * rev.z * rev.y - a * rev.x; - (*mtx)[1][1] = spC * rev.y * rev.y + b; - (*mtx)[1][2] = spC * rev.y * rev.x + a * rev.z; + + (*mtx)[1][0] = oneMinusCos * rev.z * rev.y - s * rev.x; + (*mtx)[1][1] = oneMinusCos * rev.y * rev.y + c; + (*mtx)[1][2] = oneMinusCos * rev.y * rev.x + s * rev.z; (*mtx)[1][3] = 0.0f; - (*mtx)[2][0] = spC * rev.z * rev.x + a * rev.y; - (*mtx)[2][1] = spC * rev.y * rev.x - a * rev.z; - (*mtx)[2][2] = spC * rev.x * rev.x + b; + + (*mtx)[2][0] = oneMinusCos * rev.z * rev.x + s * rev.y; + (*mtx)[2][1] = oneMinusCos * rev.y * rev.x - s * rev.z; + (*mtx)[2][2] = oneMinusCos * rev.x * rev.x + c; (*mtx)[2][3] = 0.0f; + (*mtx)[3][0] = 0.0f; (*mtx)[3][1] = 0.0f; (*mtx)[3][2] = 0.0f; (*mtx)[3][3] = 1.0f; } -/* 2449C4 -> 244A50 */ -void func_801961F4(Mat4f *mtx, struct GdVec3f *vec, f32 ang) { - f32 ycmp; // 1c - f32 xcmp; // 18 +/** + * Creates a rotation matrix about vector 'vec' with ang in degrees. + */ +void gd_create_rot_mat_angular(Mat4f *mtx, struct GdVec3f *vec, f32 ang) { + f32 s; + f32 c; - // probably is "(angle * pi / 180) / 2" - ycmp = gd_sin_d(ang / (DEG_PER_RAD / 2.0)); - xcmp = gd_cos_d(ang / (DEG_PER_RAD / 2.0)); + s = gd_sin_d(ang / (DEG_PER_RAD / 2.0)); + c = gd_cos_d(ang / (DEG_PER_RAD / 2.0)); - func_80195FD4(mtx, vec, ycmp, xcmp); + gd_create_rot_matrix(mtx, vec, s, c); } -/* 244A50 -> 244B30 */ -void set_identity_mat4(Mat4f *mtx) { +/** + * Sets a mat4f matrix to an identity matrix. + */ +void gd_set_identity_mat4(Mat4f *mtx) { (*mtx)[0][0] = 1.0f; (*mtx)[0][1] = 0.0f; (*mtx)[0][2] = 0.0f; @@ -684,8 +772,10 @@ void set_identity_mat4(Mat4f *mtx) { (*mtx)[3][3] = 1.0f; } -/* 244B30 -> 244C00 */ -void cpy_mat4(const Mat4f *src, Mat4f *dst) { +/** + * Copies a mat4f from src to dst. + */ +void gd_copy_mat4f(const Mat4f *src, Mat4f *dst) { (*dst)[0][0] = (*src)[0][0]; (*dst)[0][1] = (*src)[0][1]; (*dst)[0][2] = (*src)[0][2]; @@ -704,33 +794,38 @@ void cpy_mat4(const Mat4f *src, Mat4f *dst) { (*dst)[3][3] = (*src)[3][3]; } -/* 244C00 -> 244D10 */ -void func_80196430(struct GdVec3f *vec, const Mat4f *mtx) { - struct GdVec3f dot; +/** + * Transforms a vec3f, rotating with the main 3x3 portion of the mat4f + * and translating with the 4th column. + */ +void gd_rotate_and_translate_vec3f(struct GdVec3f *vec, const Mat4f *mtx) { + struct GdVec3f out; - dot.x = (*mtx)[0][0] * vec->x + (*mtx)[1][0] * vec->y + (*mtx)[2][0] * vec->z; - dot.y = (*mtx)[0][1] * vec->x + (*mtx)[1][1] * vec->y + (*mtx)[2][1] * vec->z; - dot.z = (*mtx)[0][2] * vec->x + (*mtx)[1][2] * vec->y + (*mtx)[2][2] * vec->z; - dot.x += (*mtx)[3][0]; - dot.y += (*mtx)[3][1]; - dot.z += (*mtx)[3][2]; + out.x = (*mtx)[0][0] * vec->x + (*mtx)[1][0] * vec->y + (*mtx)[2][0] * vec->z; + out.y = (*mtx)[0][1] * vec->x + (*mtx)[1][1] * vec->y + (*mtx)[2][1] * vec->z; + out.z = (*mtx)[0][2] * vec->x + (*mtx)[1][2] * vec->y + (*mtx)[2][2] * vec->z; + out.x += (*mtx)[3][0]; + out.y += (*mtx)[3][1]; + out.z += (*mtx)[3][2]; - vec->x = dot.x; - vec->y = dot.y; - vec->z = dot.z; + vec->x = out.x; + vec->y = out.y; + vec->z = out.z; } -/* 244D10 -> 244DE4 */ -void func_80196540(struct GdVec3f *vec, const Mat4f *mtx) { - struct GdVec3f dot; +/** + * Multiples a vec3f by the main 3x3 portion of a mat4f matrix. + */ +void gd_mat4f_mult_vec3f(struct GdVec3f *vec, const Mat4f *mtx) { + struct GdVec3f out; - dot.x = (*mtx)[0][0] * vec->x + (*mtx)[1][0] * vec->y + (*mtx)[2][0] * vec->z; - dot.y = (*mtx)[0][1] * vec->x + (*mtx)[1][1] * vec->y + (*mtx)[2][1] * vec->z; - dot.z = (*mtx)[0][2] * vec->x + (*mtx)[1][2] * vec->y + (*mtx)[2][2] * vec->z; + out.x = (*mtx)[0][0] * vec->x + (*mtx)[1][0] * vec->y + (*mtx)[2][0] * vec->z; + out.y = (*mtx)[0][1] * vec->x + (*mtx)[1][1] * vec->y + (*mtx)[2][1] * vec->z; + out.z = (*mtx)[0][2] * vec->x + (*mtx)[1][2] * vec->y + (*mtx)[2][2] * vec->z; - vec->x = dot.x; - vec->y = dot.y; - vec->z = dot.z; + vec->x = out.x; + vec->y = out.y; + vec->z = out.z; } #define MAT4_DOT_PROD(A, B, R, row, col) \ @@ -761,26 +856,36 @@ void func_80196540(struct GdVec3f *vec, const Mat4f *mtx) { MAT4_DOT_PROD((A), (B), (R), 3, 3); \ } -/* 244DE4 -> 24575C; orig name: func_80196614 */ -void multiply_mat4(const Mat4f *mA, const Mat4f *mB, Mat4f *dst) { - Mat4f res; // 18 +/** + * Multiplies two Mat4f matrices and puts it in dst. + */ +void gd_mult_mat4f(const Mat4f *mA, const Mat4f *mB, Mat4f *dst) { + Mat4f res; MAT4_MULTIPLY((*mA), (*mB), res); - cpy_mat4(&res, dst); + gd_copy_mat4f(&res, dst); } #undef MAT4_MULTIPLY #undef MAT4_DOT_PROD -/* 24575C -> 245778 */ -void gd_print_vec(UNUSED const char *prefix, UNUSED const struct GdVec3f *vec) { +/** + * Prints a vec3f vector. + * + * Printed the prefix at some point, as shown by how the function is used. + */ +void gd_print_vec(UNUSED const char *prefix, const struct GdVec3f *vec) { UNUSED u8 pad[8]; printf("%f,%f,%f\n", vec->x, vec->y, vec->z); printf("\n"); } -/* 245778 -> 245794 */ +/** + * Prints a plane's boundaries. + * + * Printed a prefix at some point, as shone by how the function is used. + */ void gd_print_plane(UNUSED const char *prefix, UNUSED const struct GdPlaneF *p) { UNUSED u8 pad[8]; @@ -790,10 +895,15 @@ void gd_print_plane(UNUSED const char *prefix, UNUSED const struct GdPlaneF *p) printf("\n"); } -/* 245794 -> 245838 */ +/** + * Prints a Mat4f. + * + * Although the prefix input is unused, the one usage of this function + * does have a "Matrix:" prefix, so it was definitely used at one point. + */ void gd_print_mtx(UNUSED const char *prefix, const Mat4f *mtx) { - s32 i; // 1c - s32 j; // 18 + s32 i; + s32 j; for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { @@ -803,9 +913,11 @@ void gd_print_mtx(UNUSED const char *prefix, const Mat4f *mtx) { } } -/* 245838 -> 2458C0 */ -void Unknown80197068(const char *prefix, const f32 *f) { - s32 i; // 1c +/** + * Prints a quaternion along with a prefix. + */ +void UNUSED gd_print_quat(const char *prefix, const f32 f[4]) { + s32 i; gd_printf(prefix); for (i = 0; i < 4; i++) { @@ -814,36 +926,40 @@ void Unknown80197068(const char *prefix, const f32 *f) { gd_printf("\n"); } -/* 2458C0 -> 245A48 */ -void Unknown801970F0(Mat4f *dst, f32 x, f32 y, f32 z, s32 copy) { - f32 sp74 = 100.0f; - Mat4f sp34; - f32 sp30; - f32 sp2C; - f32 mag; // 28 - f32 sp24; - struct GdVec3f sp18; +/** + * Rotates a matrix or creates a rotation matrix about a vector made from an offset + * of 100 and the passed in x, y, and z values. + */ +void UNUSED gd_rot_mat_offset(Mat4f *dst, f32 x, f32 y, f32 z, s32 copy) { + f32 adj = 100.0f; + Mat4f rot; + f32 c; + f32 s; + f32 opp; + f32 mag; + struct GdVec3f vec; - mag = gd_sqrt_f(SQ(x) + SQ(y) + SQ(z)); + opp = gd_sqrt_f(SQ(x) + SQ(y) + SQ(z)); - if (mag == 0.0f) { + if (opp == 0.0f) { if (copy) { - set_identity_mat4(dst); + gd_set_identity_mat4(dst); } return; } - sp24 = gd_sqrt_f(SQ(sp74) + SQ(mag)); - sp30 = sp74 / sp24; - sp2C = mag / sp24; - sp18.x = -y / mag; - sp18.y = -x / mag; - sp18.z = -z / mag; + mag = gd_sqrt_f(SQ(adj) + SQ(opp)); + c = adj / mag; + s = opp / mag; - func_80195FD4(&sp34, &sp18, sp2C, sp30); + vec.x = -y / opp; + vec.y = -x / opp; + vec.z = -z / opp; + + gd_create_rot_matrix(&rot, &vec, s, c); if (!copy) { - multiply_mat4(dst, &sp34, dst); + gd_mult_mat4f(dst, &rot, dst); } else { - cpy_mat4(&sp34, dst); + gd_copy_mat4f(&rot, dst); } } diff --git a/src/goddard/gd_math.h b/src/goddard/gd_math.h index ba6d087d..59ed83d3 100644 --- a/src/goddard/gd_math.h +++ b/src/goddard/gd_math.h @@ -4,26 +4,46 @@ #include #include "gd_types.h" -extern void func_80193B68(Mat4f *, f32, f32, f32, f32, f32, f32, f32, f32, f32); -extern void func_8019415C(Mat4f *, struct GdVec3f *); -extern void func_80194220(Mat4f *, struct GdVec3f *); -extern void func_801942E4(Mat4f *, struct GdVec3f *); -extern void func_80194358(Mat4f *, struct GdVec3f *, f32); -extern f32 func_80194728(f32, f32); /* min(f1, +/-f2)? */ -extern void limit_vec3f(struct GdVec3f *, f32); -extern void func_80194880(f32, f32 *, f32 *); -extern void absrot_mat4(Mat4f *, s32, f32); -extern f32 magnitude_vec3f(struct GdVec3f *); -extern s32 into_unit_vec3f(struct GdVec3f *); -extern void cross_product_vec3f(struct GdVec3f *a, struct GdVec3f *b, struct GdVec3f *dst); -extern f32 dot_product_vec3f(struct GdVec3f *, struct GdVec3f *); -extern void inverse_mat4(Mat4f *, Mat4f *); -extern void func_801961F4(Mat4f *, struct GdVec3f *, f32); -extern void set_identity_mat4(Mat4f *); -extern void cpy_mat4(const Mat4f *, Mat4f *); -extern void func_80196430(struct GdVec3f *, const Mat4f *); -extern void func_80196540(struct GdVec3f *, const Mat4f *); -extern void multiply_mat4(const Mat4f *, const Mat4f *, Mat4f *); +struct Row4 { + f32 c0, c1, c2, c3; +}; + +struct InvMat4 { + struct Row4 r0, r1, r2, r3; +}; + +enum GdRotAxis { + GD_X_AXIS, + GD_Y_AXIS, + GD_Z_AXIS +}; + +// Needed for gd_math.c itself. +extern void gd_adjunct_mat4f(Mat4f *, Mat4f *); +extern f32 gd_mat4f_det(Mat4f *); +extern f32 gd_3x3_det(f32, f32, f32, f32, f32, f32, f32, f32, f32); +extern f32 gd_2x2_det(f32, f32, f32, f32); + +extern void gd_mat4f_lookat(Mat4f *, f32, f32, f32, f32, f32, f32, f32, f32, f32); +extern void gd_scale_mat4f_by_vec3f(Mat4f *, struct GdVec3f *); +extern void gd_rot_mat_about_vec(Mat4f *, struct GdVec3f *); +extern void gd_add_vec3f_to_mat4f_offset(Mat4f *, struct GdVec3f *); +extern void gd_create_origin_lookat(Mat4f *, struct GdVec3f *, f32); +extern f32 gd_clamp_f32(f32, f32); +extern void gd_clamp_vec3f(struct GdVec3f *, f32); +extern void gd_rot_2d_vec(f32, f32 *, f32 *); +extern void gd_absrot_mat4(Mat4f *, s32, f32); +extern f32 gd_vec3f_magnitude(struct GdVec3f *); +extern s32 gd_normalize_vec3f(struct GdVec3f *); +extern void gd_cross_vec3f(struct GdVec3f *a, struct GdVec3f *b, struct GdVec3f *dst); +extern f32 gd_dot_vec3f(struct GdVec3f *, struct GdVec3f *); +extern void gd_inverse_mat4f(Mat4f *, Mat4f *); +extern void gd_create_rot_mat_angular(Mat4f *, struct GdVec3f *, f32); +extern void gd_set_identity_mat4(Mat4f *); +extern void gd_copy_mat4f(const Mat4f *, Mat4f *); +extern void gd_rotate_and_translate_vec3f(struct GdVec3f *, const Mat4f *); +extern void gd_mat4f_mult_vec3f(struct GdVec3f *, const Mat4f *); +extern void gd_mult_mat4f(const Mat4f *, const Mat4f *, Mat4f *); extern void gd_print_vec(const char *, const struct GdVec3f *); extern void gd_print_plane(const char *, const struct GdPlaneF *); extern void gd_print_mtx(const char *, const Mat4f *); diff --git a/src/goddard/joints.c b/src/goddard/joints.c index b814f7bf..55786a66 100644 --- a/src/goddard/joints.c +++ b/src/goddard/joints.c @@ -115,7 +115,7 @@ void Proc8018E520(struct ObjJoint *self) { attobj = att->obj; set_cur_dynobj(attobj); sp74 = d_get_matrix_ptr(); - func_801942E4(sp74, &sp64); + gd_add_vec3f_to_mat4f_offset(sp74, &sp64); } } @@ -152,8 +152,8 @@ void Proc8018EBE8(struct ObjJoint *self) { sp50.x *= 2.0; //?2.0f sp50.y *= 2.0; //?2.0f sp50.z *= 2.0; //?2.0f - if (magnitude_vec3f(&sp50) > 30.0f) { - into_unit_vec3f(&sp50); + if (gd_vec3f_magnitude(&sp50) > 30.0f) { + gd_normalize_vec3f(&sp50); sp50.x *= 30.0f; sp50.y *= 30.0f; sp50.z *= 30.0f; @@ -163,7 +163,7 @@ void Proc8018EBE8(struct ObjJoint *self) { attobj = att->obj; set_cur_dynobj(attobj); sp5C = d_get_rot_mtx_ptr(); - func_801942E4(sp5C, &sp50); + gd_add_vec3f_to_mat4f_offset(sp5C, &sp50); } } @@ -228,8 +228,8 @@ struct ObjJoint *make_joint(s32 flags, f32 x, f32 y, f32 z) { j->nextjoint = oldhead; oldhead->prevjoint = j; } - set_identity_mat4(&j->matE8); - set_identity_mat4(&j->mat128); + gd_set_identity_mat4(&j->matE8); + gd_set_identity_mat4(&j->mat128); set_joint_vecs(j, x, y, z); j->unk1CC = 0; j->id = sJointCount; @@ -296,8 +296,8 @@ void func_8018F328(struct ObjBone *b) { b->unk58.y = sp20->unk14.y - sp24->unk14.y; b->unk58.z = sp20->unk14.z - sp24->unk14.z; - into_unit_vec3f(&b->unk58); - func_80194358(&b->matB0, &b->unk58, 0); //? 0.0f + gd_normalize_vec3f(&b->unk58); + gd_create_origin_lookat(&b->matB0, &b->unk58, 0); //? 0.0f } /* 23DC9C -> 23DCF0 */ @@ -356,15 +356,15 @@ void func_8018F520(struct ObjBone *b) { sp90.y *= sp68; sp90.z *= sp68; - cross_product_vec3f(&sp90, &sp6C, &sp78); + gd_cross_vec3f(&sp90, &sp6C, &sp78); sp84.x = sp78.x; sp84.y = sp78.y; sp84.z = sp78.z; - into_unit_vec3f(&sp84); - sp64 = magnitude_vec3f(&sp78); - func_801961F4(&mtx, &sp84, sp64); - multiply_mat4(&b->mat70, &mtx, &b->mat70); + gd_normalize_vec3f(&sp84); + sp64 = gd_vec3f_magnitude(&sp78); + gd_create_rot_mat_angular(&mtx, &sp84, sp64); + gd_mult_mat4f(&b->mat70, &mtx, &b->mat70); D_801BA968.x = b->mat70[2][0]; D_801BA968.y = b->mat70[2][1]; D_801BA968.z = b->mat70[2][2]; @@ -392,8 +392,8 @@ void func_8018F89C(struct ObjBone *b) { b->unk14.y = (spAC->unk14.y + spA8->unk14.y) / 2.0; //? 2.0f; b->unk14.z = (spAC->unk14.z + spA8->unk14.z) / 2.0; //? 2.0f; - multiply_mat4(&b->matB0, &gGdSkinNet->mat128, &mtx); - cpy_mat4(&mtx, &b->mat70); + gd_mult_mat4f(&b->matB0, &gGdSkinNet->mat128, &mtx); + gd_copy_mat4f(&mtx, &b->mat70); D_801BA968.x = -b->mat70[2][0]; D_801BA968.y = -b->mat70[2][1]; @@ -490,7 +490,7 @@ struct ObjBone *make_bone(s32 a0, struct ObjJoint *j1, struct ObjJoint *j2, UNUS b->unk100 = 0; b->unk104 = a0; b->unkF0 = NULL; - set_identity_mat4(&b->mat70); + gd_set_identity_mat4(&b->mat70); b->unk110 = 0.8f; b->unk114 = 0.9f; b->unkF8 = 100.0f; @@ -586,7 +586,7 @@ void func_80190168(struct ObjBone *b, UNUSED struct ObjJoint *a1, UNUSED struct b->unk58.z = sp7C.z; if (b->unk104 & 0x8) { - sp58 = magnitude_vec3f(&sp7C); + sp58 = gd_vec3f_magnitude(&sp7C); if (sp58 == 0.0f) { sp58 = 1.0f; } @@ -594,7 +594,7 @@ void func_80190168(struct ObjBone *b, UNUSED struct ObjJoint *a1, UNUSED struct } if (b->unk104 & 0x4) { - if (sp60 > (sp58 = magnitude_vec3f(&sp7C))) { + if (sp60 > (sp58 = gd_vec3f_magnitude(&sp7C))) { sp5C = b->unk110; a3->x *= sp5C; a3->y *= sp5C; @@ -607,7 +607,7 @@ void func_80190168(struct ObjBone *b, UNUSED struct ObjJoint *a1, UNUSED struct } if (b->unk104 & 0x2) { - if (sp60 < (sp58 = magnitude_vec3f(&sp7C))) { + if (sp60 < (sp58 = gd_vec3f_magnitude(&sp7C))) { sp5C = b->unk110; a3->x *= sp5C; a3->y *= sp5C; @@ -812,7 +812,7 @@ void func_80190B54(struct ObjJoint *a0, struct ObjJoint *a1, struct GdVec3f *a2) sp8C.x = spA4.x; sp8C.y = spA4.y; sp8C.z = spA4.z; - into_unit_vec3f(&sp8C); + gd_normalize_vec3f(&sp8C); sp7C = a1->unk228; @@ -829,11 +829,11 @@ void func_80190B54(struct ObjJoint *a0, struct ObjJoint *a1, struct GdVec3f *a2) spA4.y *= sp78; spA4.z *= sp78; - cross_product_vec3f(&spA4, &D_801BAAD0, &sp80); - sp78 = magnitude_vec3f(&sp80); - into_unit_vec3f(&sp80); - func_801961F4(&sp38, &sp80, sp78); - multiply_mat4(&a0->matE8, &sp38, &a0->matE8); + gd_cross_vec3f(&spA4, &D_801BAAD0, &sp80); + sp78 = gd_vec3f_magnitude(&sp80); + gd_normalize_vec3f(&sp80); + gd_create_rot_mat_angular(&sp38, &sp80, sp78); + gd_mult_mat4f(&a0->matE8, &sp38, &a0->matE8); } else { D_801BAAE0.x = a2->x; @@ -910,7 +910,7 @@ f32 func_80190F3C(struct ObjJoint *a0, f32 a1, f32 a2, f32 a3) { sp24.y -= a0->unk3C.y; sp24.z -= a0->unk3C.z; - return magnitude_vec3f(&sp24); + return gd_vec3f_magnitude(&sp24); } /* 23F978 -> 23F9F0 */ @@ -919,7 +919,7 @@ void Unknown801911A8(struct ObjJoint *j) { j->unkCC.y = j->unkC0.y; j->unkCC.z = j->unkC0.z; - func_80196430(&j->unkCC, &gGdSkinNet->mat128); + gd_rotate_and_translate_vec3f(&j->unkCC, &gGdSkinNet->mat128); } /* 23F9F0 -> 23FB90 */ @@ -928,7 +928,7 @@ void Unknown80191220(struct ObjJoint *j) { j->unk48.y = j->unk54.y; j->unk48.z = j->unk54.z; - func_80196540(&j->unk48, &gGdSkinNet->mat128); + gd_mat4f_mult_vec3f(&j->unk48, &gGdSkinNet->mat128); j->unk3C.x = j->unk48.x; j->unk3C.y = j->unk48.y; j->unk3C.z = j->unk48.z; @@ -963,7 +963,7 @@ void Unknown801913F0(struct ObjJoint *j) { j->unk30.y = j->unk14.y; j->unk30.z = j->unk14.z; - cpy_mat4(&gGdSkinNet->mat128, &j->matE8); + gd_copy_mat4f(&gGdSkinNet->mat128, &j->matE8); } /* 23FCC8 -> 23FCDC */ @@ -981,7 +981,7 @@ void Unknown8019150C(Mat4f *a0, struct GdVec3f *a1) { a1->x += sp1C.x; a1->y += sp1C.y; a1->z += sp1C.z; - func_80196540(a1, a0); + gd_mat4f_mult_vec3f(a1, a0); } /* 23FDD4 -> 23FFF4 */ @@ -1003,14 +1003,14 @@ void func_80191604(struct ObjJoint *j) { j->unk90.x = j->unk90.y = j->unk90.z = 0.0f; j->unk1A8.x = j->unk1A8.y = j->unk1A8.z = 0.0f; - set_identity_mat4(&j->mat168); - func_8019415C(&j->mat168, (struct GdVec3f *) &j->unk9C); - func_80194220(&j->mat168, (struct GdVec3f *) &j->unk6C); - func_801942E4(&j->mat168, &j->unk200); - cpy_mat4(&j->mat168, &j->matE8); + gd_set_identity_mat4(&j->mat168); + gd_scale_mat4f_by_vec3f(&j->mat168, (struct GdVec3f *) &j->unk9C); + gd_rot_mat_about_vec(&j->mat168, (struct GdVec3f *) &j->unk6C); + gd_add_vec3f_to_mat4f_offset(&j->mat168, &j->unk200); + gd_copy_mat4f(&j->mat168, &j->matE8); - set_identity_mat4(&j->mat128); - func_801942E4(&j->mat128, &j->unk54); + gd_set_identity_mat4(&j->mat128); + gd_add_vec3f_to_mat4f_offset(&j->mat128, &j->unk54); } /* 23FFF4 -> 2400C4 */ @@ -1069,7 +1069,7 @@ void Unknown80191A1C(struct ObjBone *a0) { if (gGdTempBone == NULL) { gGdTempBone = a0; } - sp3C = dot_product_vec3f(&gGdTempBone->unk40, &a0->unk40); + sp3C = gd_dot_vec3f(&gGdTempBone->unk40, &a0->unk40); a0->unk118 = sp3C; if ((sp3C -= sp38) < 0.0f) { @@ -1083,7 +1083,7 @@ void Unknown80191A1C(struct ObjBone *a0) { sp24.x -= sp18.x; sp24.y -= sp18.y; sp24.z -= sp18.z; - into_unit_vec3f(&sp24); + gd_normalize_vec3f(&sp24); sp3C = -sp3C * 50.0; //? 50.0f if (!(((struct ObjJoint *) argjoint)->unk1BC & 0x1)) { diff --git a/src/goddard/objects.c b/src/goddard/objects.c index 27fd2770..8fee024e 100644 --- a/src/goddard/objects.c +++ b/src/goddard/objects.c @@ -435,7 +435,7 @@ void reset_plane(struct ObjPlane *plane) { sp4C = plane->unk40; calc_face_normal(sp4C); - plane->unk1C = dot_product_vec3f(&sp4C->vertices[0]->pos, &sp4C->normal); + plane->unk1C = gd_dot_vec3f(&sp4C->vertices[0]->pos, &sp4C->normal); sp48 = 0.0f; sp28 = sp4C->normal.x < 0.0f ? -sp4C->normal.x : sp4C->normal.x; @@ -535,8 +535,8 @@ struct ObjCamera *make_camera(s32 a0, struct GdObj *a1) { newCam->unk2C = a0 | 0x10; newCam->unk30 = a1; - set_identity_mat4(&newCam->unk64); - set_identity_mat4(&newCam->unkA8); + gd_set_identity_mat4(&newCam->unk64); + gd_set_identity_mat4(&newCam->unkA8); newCam->unk180.x = 1.0f; newCam->unk180.y = 0.1f; @@ -1096,7 +1096,7 @@ void func_8017E584(struct ObjNet *a0, struct GdVec3f *a1, struct GdVec3f *a2) { sp70.y = a2->y; sp70.z = a2->z; - into_unit_vec3f(&sp70); + gd_normalize_vec3f(&sp70); sp7C.x = a1->x; sp7C.y = a1->y; @@ -1106,19 +1106,19 @@ void func_8017E584(struct ObjNet *a0, struct GdVec3f *a1, struct GdVec3f *a2) { sp1C.y = a0->unkB0.y; sp1C.z = a0->unkB0.z; - func_80196430(&sp1C, &a0->mat128); + gd_rotate_and_translate_vec3f(&sp1C, &a0->mat128); sp7C.x -= sp1C.x; sp7C.y -= sp1C.y; sp7C.z -= sp1C.z; - if (into_unit_vec3f(&sp7C) == FALSE) { + if (gd_normalize_vec3f(&sp7C) == FALSE) { sp7C.x = -sp70.x; sp7C.y = -sp70.y; sp7C.z = -sp70.z; } - cross_product_vec3f(&sp70, a1, &sp94); + gd_cross_vec3f(&sp70, a1, &sp94); sp2C = (f32) gd_sqrt_d((sp94.x * sp94.x) + (sp94.z * sp94.z)); if (sp2C > 1000.0) { //? 1000.0f @@ -1155,7 +1155,7 @@ void func_8017E838(struct ObjNet *a0, struct GdVec3f *a1, struct GdVec3f *a2) { sp18.y = a0->unkB0.y; sp18.z = a0->unkB0.z; - func_80196430(&sp18, &a0->mat128); + gd_rotate_and_translate_vec3f(&sp18, &a0->mat128); sp64.x -= sp18.x; sp64.y -= sp18.y; @@ -1165,8 +1165,8 @@ void func_8017E838(struct ObjNet *a0, struct GdVec3f *a1, struct GdVec3f *a2) { sp64.y *= 0.01; //? 0.01f; sp64.z *= 0.01; //? 0.01f; - cross_product_vec3f(a2, &sp64, &sp70); - limit_vec3f(&sp70, 5.0f); + gd_cross_vec3f(a2, &sp64, &sp70); + gd_clamp_vec3f(&sp70, 5.0f); a0->unk80.x += sp70.x; a0->unk80.y += sp70.y; @@ -1183,10 +1183,10 @@ void func_8017E9EC(struct ObjNet *a0) { sp5C.y = a0->unkA4.y; sp5C.z = a0->unkA4.z; - into_unit_vec3f(&sp5C); - sp18 = magnitude_vec3f(&a0->unkA4); - func_801961F4(&sp1C, &sp5C, -sp18); - multiply_mat4(&D_801B9DC8, &sp1C, &D_801B9DC8); + gd_normalize_vec3f(&sp5C); + sp18 = gd_vec3f_magnitude(&a0->unkA4); + gd_create_rot_mat_angular(&sp1C, &sp5C, -sp18); + gd_mult_mat4f(&D_801B9DC8, &sp1C, &D_801B9DC8); } /* @ 22D264 for 0x90 */ @@ -1344,9 +1344,9 @@ s32 func_8017F054(struct GdObj *a0, struct GdObj *a1) { d_get_scale(&sp1C); sp48 = d_get_matrix_ptr(); - multiply_mat4(sp4C, sp50, sp48); - multiply_mat4(sp4C, sp44, sp40); - func_8019415C(sp40, &sp1C); + gd_mult_mat4f(sp4C, sp50, sp48); + gd_mult_mat4f(sp4C, sp44, sp40); + gd_scale_mat4f_by_vec3f(sp40, &sp1C); } else { set_cur_dynobj(a0); sp48 = d_get_matrix_ptr(); @@ -1354,9 +1354,9 @@ s32 func_8017F054(struct GdObj *a0, struct GdObj *a1) { sp44 = (Mat4f *) d_get_rot_mtx_ptr(); d_get_scale(&sp1C); - set_identity_mat4(sp48); - cpy_mat4(sp4C, sp44); - func_8019415C(sp44, &sp1C); + gd_set_identity_mat4(sp48); + gd_copy_mat4f(sp4C, sp44); + gd_scale_mat4f_by_vec3f(sp44, &sp1C); } set_cur_dynobj(a0); @@ -1398,8 +1398,8 @@ s32 UnknownRecursive8017F210(struct GdObj *a0, struct GdObj *a1) { sp50 = (Mat4f *) d_get_rot_mtx_ptr(); d_get_scale(&sp2C); - multiply_mat4(sp5C, sp54, sp50); - func_8019415C(sp50, &sp2C); + gd_mult_mat4f(sp5C, sp54, sp50); + gd_scale_mat4f_by_vec3f(sp50, &sp2C); } else { set_cur_dynobj(a0); sp58 = d_get_matrix_ptr(); @@ -1407,8 +1407,8 @@ s32 UnknownRecursive8017F210(struct GdObj *a0, struct GdObj *a1) { sp54 = (Mat4f *) d_get_rot_mtx_ptr(); d_get_scale(&sp2C); - cpy_mat4(sp5C, sp54); - func_8019415C(sp54, &sp2C); + gd_copy_mat4f(sp5C, sp54); + gd_scale_mat4f_by_vec3f(sp54, &sp2C); } set_cur_dynobj(a0); @@ -1426,7 +1426,7 @@ s32 UnknownRecursive8017F210(struct GdObj *a0, struct GdObj *a1) { /* @ 22DB9C for 0x38; a0 might be ObjUnk200000* */ void Unknown8017F3CC(struct Unk8017F3CC *a0) { - func_80196430(&a0->unk20, D_801B9E48); + gd_rotate_and_translate_vec3f(&a0->unk20, D_801B9E48); } /* @ 22DBD4 for 0x20 */ @@ -1439,7 +1439,7 @@ void func_8017F424(struct GdTriangleF *a0, struct GdTriangleF *a1, f32 a2) { Mat4f sp40; struct GdTriangleF sp1C; - set_identity_mat4(&sp40); + gd_set_identity_mat4(&sp40); if (a2 != 0.0f) { sp1C.p1.x = a0->p1.x + (a1->p1.x - a0->p1.x) * a2; @@ -1449,13 +1449,13 @@ void func_8017F424(struct GdTriangleF *a0, struct GdTriangleF *a1, f32 a2) { sp1C.p2.y = a0->p2.y + (a1->p2.y - a0->p2.y) * a2; sp1C.p2.z = a0->p2.z + (a1->p2.z - a0->p2.z) * a2; - func_8019415C(&sp40, &a0->p0); - func_80194220(&sp40, &sp1C.p1); - func_801942E4(&sp40, &sp1C.p2); + gd_scale_mat4f_by_vec3f(&sp40, &a0->p0); + gd_rot_mat_about_vec(&sp40, &sp1C.p1); + gd_add_vec3f_to_mat4f_offset(&sp40, &sp1C.p2); } else { // L8017F568 d_set_scale(a0->p0.x, a0->p0.y, a0->p0.z); - func_80194220(&sp40, &a0->p1); - func_801942E4(&sp40, &a0->p2); + gd_rot_mat_about_vec(&sp40, &a0->p1); + gd_add_vec3f_to_mat4f_offset(&sp40, &a0->p2); } // L8017F5A4 d_set_idn_mtx(&sp40); } @@ -1670,10 +1670,10 @@ void move_animator(struct ObjAnimator *animObj) { break; case GD_ANIM_TRI_F_4: // GdTriangleF* triPtr = (struct GdTriangleF *) animData->data; - set_identity_mat4(&localMtx); - func_8019415C(&localMtx, &triPtr->p0); - func_80194220(&localMtx, &triPtr->p1); - func_801942E4(&localMtx, &triPtr->p2); + gd_set_identity_mat4(&localMtx); + gd_scale_mat4f_by_vec3f(&localMtx, &triPtr->p0); + gd_rot_mat_about_vec(&localMtx, &triPtr->p1); + gd_add_vec3f_to_mat4f_offset(&localMtx, &triPtr->p2); d_set_idn_mtx(&localMtx); break; case GD_ANIM_STUB: @@ -1716,15 +1716,15 @@ void drag_picked_object(struct GdObj *inputObj) { return; } - sp28 = magnitude_vec3f(&gViewUpdateCamera->unk40); + sp28 = gd_vec3f_magnitude(&gViewUpdateCamera->unk40); sp28 /= 1000.0f; spD0.x = ((f32)(ctrl->csrX - ctrl->csrXatApress)) * sp28; spD0.y = ((f32) - (ctrl->csrY - ctrl->csrYatApress)) * sp28; spD0.z = 0.0f; - inverse_mat4(&gViewUpdateCamera->unkE8, &sp40); - func_80196540(&spD0, &sp40); + gd_inverse_mat4f(&gViewUpdateCamera->unkE8, &sp40); + gd_mat4f_mult_vec3f(&spD0, &sp40); obj = inputObj; if ((inputObj->drawFlags & OBJ_PICKED) && gGdCtrl.btnApressed) { @@ -1743,12 +1743,12 @@ void drag_picked_object(struct GdObj *inputObj) { case OBJ_TYPE_GADGETS: break; case OBJ_TYPE_NETS: - inverse_mat4(&((struct ObjNet *) obj)->mat128, &sp80); + gd_inverse_mat4f(&((struct ObjNet *) obj)->mat128, &sp80); spC4.x = spD0.x; spC4.y = spD0.y; spC4.z = spD0.z; - func_80196540(&spC4, &sp80); + gd_mat4f_mult_vec3f(&spC4, &sp80); ((struct ObjNet *) obj)->matE8[3][0] += spD0.x; ((struct ObjNet *) obj)->matE8[3][1] += spD0.y; ((struct ObjNet *) obj)->matE8[3][2] += spD0.z; @@ -1816,9 +1816,9 @@ void move_camera(struct ObjCamera *cam) { cam->unkA8[1][1] = 1.0f; cam->unkA8[1][2] = 0.0f; - set_identity_mat4(&cam->unkA8); + gd_set_identity_mat4(&cam->unkA8); } else { - set_identity_mat4(&cam->unkA8); + gd_set_identity_mat4(&cam->unkA8); } sp2C = &cam->unk64; @@ -1856,20 +1856,20 @@ void move_camera(struct ObjCamera *cam) { cam->unk128.x -= cam->unk134.x; } - cam->unk128.x = func_80194728(cam->unk128.x, 80.0f); + cam->unk128.x = gd_clamp_f32(cam->unk128.x, 80.0f); cam->unk4C.x = cam->positions[cam->zoom].x; cam->unk4C.y = cam->positions[cam->zoom].y; cam->unk4C.z = cam->positions[cam->zoom].z; - func_80194880(cam->unk128.x, &cam->unk4C.y, &cam->unk4C.z); - func_80194880(-cam->unk128.y, &cam->unk4C.x, &cam->unk4C.z); + gd_rot_2d_vec(cam->unk128.x, &cam->unk4C.y, &cam->unk4C.z); + gd_rot_2d_vec(-cam->unk128.y, &cam->unk4C.x, &cam->unk4C.z); cam->unk40.x += (cam->unk4C.x - cam->unk40.x) * cam->unk17C; cam->unk40.y += (cam->unk4C.y - cam->unk40.y) * cam->unk17C; cam->unk40.z += (cam->unk4C.z - cam->unk40.z) * cam->unk17C; } else { - set_identity_mat4(sp2C); + gd_set_identity_mat4(sp2C); } spD4.x = cam->unk40.x; @@ -1880,8 +1880,8 @@ void move_camera(struct ObjCamera *cam) { spD4.y += spB0.y; spD4.z += spB0.z; - multiply_mat4(sp2C, &cam->unkA8, &cam->unkA8); - func_80196540(&spD4, &cam->unkA8); + gd_mult_mat4f(sp2C, &cam->unkA8, &cam->unkA8); + gd_mat4f_mult_vec3f(&spD4, &cam->unkA8); cam->unk14.x = spD4.x; cam->unk14.y = spD4.y; @@ -1942,18 +1942,18 @@ void Unknown8018100C(struct ObjLight *light) { D_801A81C0 += 1.0; //? 1.0f D_801A81C4 += 0.6; //? 0.6f - set_identity_mat4(&mtx); - absrot_mat4(&mtx, 1, light->unk68.y); - absrot_mat4(&mtx, 0, light->unk68.x); - absrot_mat4(&mtx, 2, light->unk68.z); - func_80196540(&light->unk8C, &mtx); + gd_set_identity_mat4(&mtx); + gd_absrot_mat4(&mtx, GD_Y_AXIS, light->unk68.y); + gd_absrot_mat4(&mtx, GD_X_AXIS, light->unk68.x); + gd_absrot_mat4(&mtx, GD_Z_AXIS, light->unk68.z); + gd_mat4f_mult_vec3f(&light->unk8C, &mtx); light->position.x = light->unk8C.x; light->position.y = light->unk8C.y; light->position.z = light->unk8C.z; return; // even more unreachable - func_80196540(&light->unk80, &mtx); + gd_mat4f_mult_vec3f(&light->unk80, &mtx); imout(); // this call would cause an issue if it was reachable } diff --git a/src/goddard/particles.c b/src/goddard/particles.c index dd8e85a0..a54dfacc 100644 --- a/src/goddard/particles.c +++ b/src/goddard/particles.c @@ -150,7 +150,7 @@ void func_80182088(struct Connection *cxn) { sp4C.x = sp1C->unk20.x - sp18->unk20.x; sp4C.y = sp1C->unk20.y - sp18->unk20.y; sp4C.z = sp1C->unk20.z - sp18->unk20.z; - sp20 = magnitude_vec3f(&sp4C); + sp20 = gd_vec3f_magnitude(&sp4C); sp24 = sp20 - cxn->unk24; sp4C.x /= sp20; sp4C.y /= sp20; @@ -243,7 +243,7 @@ struct Connection *func_801825FC(struct ObjVertex *vtx1, struct ObjVertex *vtx2) sp28.x -= sp1C.x; sp28.y -= sp1C.y; sp28.z -= sp1C.z; - sp34->unk24 = magnitude_vec3f(&sp28); + sp34->unk24 = gd_vec3f_magnitude(&sp28); // Duplicate conditional. Possibly should've checked `vtx2`; // Also, this shouldn't be called with particle types... if (vtx1->header.type == OBJ_TYPE_PARTICLES && vtx1->header.type == OBJ_TYPE_PARTICLES) { @@ -303,7 +303,7 @@ void func_80182A08(struct ObjParticle *ptc, struct GdVec3f *b) { sp20->unk38.x = func_8018D560() * 50.0 - 25.0; sp20->unk38.y = func_8018D560() * 50.0 - 25.0; sp20->unk38.z = func_8018D560() * 50.0 - 25.0; - } while (magnitude_vec3f(&sp20->unk38) > 30.0); + } while (gd_vec3f_magnitude(&sp20->unk38) > 30.0); sp20->unk38.x += b->x; sp20->unk38.y += b->y; sp20->unk38.z += b->z; @@ -428,7 +428,7 @@ void move_particle(struct ObjParticle *ptc) { sp2C->unk38.x = func_8018D560() * 64.0 - 32.0; sp2C->unk38.y = func_8018D560() * 64.0 - 32.0; sp2C->unk38.z = func_8018D560() * 64.0 - 32.0; - } while (magnitude_vec3f(&sp2C->unk38) > 32.0); + } while (gd_vec3f_magnitude(&sp2C->unk38) > 32.0); sp2C->unk30 = func_8018D560() * 180.0f; sp2C->header.drawFlags &= ~OBJ_NOT_DRAWABLE; sp2C->unk54 |= 8; diff --git a/src/goddard/renderer.c b/src/goddard/renderer.c index 3c4fcf72..9284bc61 100644 --- a/src/goddard/renderer.c +++ b/src/goddard/renderer.c @@ -1755,8 +1755,8 @@ void func_8019F258(f32 x, f32 y, f32 z) { vec.x = x; vec.y = y; vec.z = z; - set_identity_mat4(&mtx); - func_8019415C(&mtx, &vec); + gd_set_identity_mat4(&mtx); + gd_scale_mat4f_by_vec3f(&mtx, &vec); add_mat4_to_dl(&mtx); } @@ -1764,8 +1764,8 @@ void func_8019F258(f32 x, f32 y, f32 z) { void func_8019F2C4(f32 arg0, s8 arg1) { Mat4f mtx; // 18 - set_identity_mat4(&mtx); - absrot_mat4(&mtx, arg1 - 120, -arg0); + gd_set_identity_mat4(&mtx); + gd_absrot_mat4(&mtx, arg1 - 120, -arg0); add_mat4_to_dl(&mtx); } @@ -1776,7 +1776,7 @@ void func_8019F318(struct ObjCamera *cam, f32 arg1, f32 arg2, f32 arg3, f32 arg4 arg7 *= RAD_PER_DEG; - func_80193B68(&cam->unkE8, arg1, arg2, arg3, arg4, arg5, arg6, gd_sin_d(arg7), gd_cos_d(arg7), + gd_mat4f_lookat(&cam->unkE8, arg1, arg2, arg3, arg4, arg5, arg6, gd_sin_d(arg7), gd_cos_d(arg7), 0.0f); // 8019F3C8 mat4_to_mtx(&cam->unkE8, &DL_CURRENT_MTX(sCurrentGdDl)); @@ -3137,7 +3137,7 @@ void gd_init(void) { } sNumLights = NUMLIGHTS_2; - set_identity_mat4(&sInitIdnMat4); + gd_set_identity_mat4(&sInitIdnMat4); mat4_to_mtx(&sInitIdnMat4, &sIdnMtx); remove_all_memtrackers(); null_obj_lists(); @@ -3430,11 +3430,11 @@ void gd_put_sprite(u16 *sprite, s32 x, s32 y, s32 wx, s32 wy) { s32 r; // 58 gSPDisplayList(next_gfx(), osVirtualToPhysical(gd_dl_sprite_start_tex_block)); - for (r = 0; r < wy; r += 0x20) { - for (c = 0; c < wx; c += 0x20) { - gDPLoadTextureBlock(next_gfx(), (r * 0x20) + sprite + c, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, + for (r = 0; r < wy; r += 32) { + for (c = 0; c < wx; c += 32) { + gDPLoadTextureBlock(next_gfx(), (r * 32) + sprite + c, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD) - gSPTextureRectangle(next_gfx(), x << 2, (y + r) << 2, (x + 0x20) << 2, (y + r + 0x20) << 2, + gSPTextureRectangle(next_gfx(), x << 2, (y + r) << 2, (x + 32) << 2, (y + r + 32) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); } } diff --git a/src/goddard/shape_helper.c b/src/goddard/shape_helper.c index a696dcac..90b14d35 100644 --- a/src/goddard/shape_helper.c +++ b/src/goddard/shape_helper.c @@ -186,7 +186,7 @@ void calc_face_normal(struct ObjFace *face) { sp2C.z = (((sp44.x - sp50.x) * (sp38.y - sp44.y)) - ((sp44.y - sp50.y) * (sp38.x - sp44.x))) * sp18; // 245C84 - into_unit_vec3f(&sp2C); + gd_normalize_vec3f(&sp2C); face->normal.x = sp2C.x; face->normal.y = sp2C.y; face->normal.z = sp2C.z; @@ -489,16 +489,16 @@ void Unknown80198068(UNUSED f32 a0) { /* @ 24684C for 0x6C */ void func_8019807C(struct ObjVertex *vtx) { - func_80194880(D_801BAC60.x, &vtx->pos.y, &vtx->pos.z); - func_80194880(D_801BAC60.y, &vtx->pos.x, &vtx->pos.z); - func_80194880(D_801BAC60.z, &vtx->pos.x, &vtx->pos.y); + gd_rot_2d_vec(D_801BAC60.x, &vtx->pos.y, &vtx->pos.z); + gd_rot_2d_vec(D_801BAC60.y, &vtx->pos.x, &vtx->pos.z); + gd_rot_2d_vec(D_801BAC60.z, &vtx->pos.x, &vtx->pos.y); } /* @ 2468B8 for 0x6C */ void func_801980E8(f32 *a0) { - func_80194880(D_801BAC60.x, &a0[1], &a0[2]); - func_80194880(D_801BAC60.y, &a0[0], &a0[2]); - func_80194880(D_801BAC60.z, &a0[0], &a0[1]); + gd_rot_2d_vec(D_801BAC60.x, &a0[1], &a0[2]); + gd_rot_2d_vec(D_801BAC60.y, &a0[0], &a0[2]); + gd_rot_2d_vec(D_801BAC60.z, &a0[0], &a0[1]); } /* @ 246924 for 0x30 */ diff --git a/src/goddard/skin.c b/src/goddard/skin.c index 65a7f183..a3cef2c0 100644 --- a/src/goddard/skin.c +++ b/src/goddard/skin.c @@ -62,11 +62,11 @@ void reset_net(struct ObjNet *net) { gGdSkinNet = net; D_801BAAF4 = 0; - set_identity_mat4(&net->mat168); - set_identity_mat4(&net->matE8); - func_80194220(&net->matE8, &net->unk68); // set rot mtx to initial rotation? - func_801942E4(&net->matE8, &net->unk14); // set to initial position? - cpy_mat4(&net->matE8, &net->mat128); + gd_set_identity_mat4(&net->mat168); + gd_set_identity_mat4(&net->matE8); + gd_rot_mat_about_vec(&net->matE8, &net->unk68); // set rot mtx to initial rotation? + gd_add_vec3f_to_mat4f_offset(&net->matE8, &net->unk14); // set to initial position? + gd_copy_mat4f(&net->matE8, &net->mat128); if ((grp = net->unk1C8) != NULL) { apply_to_obj_types_in_group(OBJ_TYPE_JOINTS, (applyproc_t) func_80191604, grp); @@ -111,7 +111,7 @@ struct ObjNet *make_net(UNUSED s32 a0, struct ObjShape *shapedata, struct ObjGro struct ObjNet *net; // 24 net = (struct ObjNet *) make_object(OBJ_TYPE_NETS); - set_identity_mat4(&net->mat128); + gd_set_identity_mat4(&net->mat128); net->unk20.x = net->unk20.y = net->unk20.z = 0.0f; net->unk38 = ++sNetCount; net->unk1AC.x = net->unk1AC.y = net->unk1AC.z = 1.0f; @@ -212,7 +212,7 @@ void Unknown80192AD0(struct ObjNet *net) { net->unk14.x = net->unk1F4.x; net->unk14.y = net->unk1F4.y; net->unk14.z = net->unk1F4.z; - func_80196430(&net->unk14, &sp18->mat128); + gd_rotate_and_translate_vec3f(&net->unk14, &sp18->mat128); net->unk14.x += net->unk1F0->unk14.x; net->unk14.y += net->unk1F0->unk14.y; @@ -220,7 +220,7 @@ void Unknown80192AD0(struct ObjNet *net) { net->unk200.x = 0.0f; net->unk200.y = 10.0f; net->unk200.z = -4.0f; - func_80196430(&net->unk200, &sp18->mat128); + gd_rotate_and_translate_vec3f(&net->unk200, &sp18->mat128); apply_to_obj_types_in_group(OBJ_TYPE_JOINTS, (applyproc_t) Unknown80191824, sp60); func_80191E88(sp60); @@ -233,7 +233,7 @@ void move_bonesnet(struct ObjNet *net) { UNUSED u32 pad18[3]; add_to_stacktrace("move_bonesnet"); - set_identity_mat4(&D_801B9DC8); + gd_set_identity_mat4(&D_801B9DC8); if ((sp24 = net->unk1C8) != NULL) { apply_to_obj_types_in_group(OBJ_TYPE_JOINTS, (applyproc_t) Unknown801913C0, sp24); } @@ -251,14 +251,14 @@ void func_80192CCC(struct ObjNet *net) { if (gGdCtrl.unk2C != NULL) { func_8017E2B8(); } - set_identity_mat4(&D_801B9DC8); + gd_set_identity_mat4(&D_801B9DC8); if (gGdCtrl.unk30 != NULL) { sp24.x = net->mat128[0][0]; sp24.y = net->mat128[0][1]; sp24.z = net->mat128[0][2]; - func_801961F4(&sp38, &sp24, 4.0f); - multiply_mat4(&sp38, &D_801B9DC8, &D_801B9DC8); + gd_create_rot_mat_angular(&sp38, &sp24, 4.0f); + gd_mult_mat4f(&sp38, &D_801B9DC8, &D_801B9DC8); net->unkA4.x = net->unkA4.y = net->unkA4.z = 0.0f; } @@ -266,8 +266,8 @@ void func_80192CCC(struct ObjNet *net) { sp24.x = net->mat128[0][0]; sp24.y = net->mat128[0][1]; sp24.z = net->mat128[0][2]; - func_801961F4(&sp38, &sp24, -4.0f); - multiply_mat4(&sp38, &D_801B9DC8, &D_801B9DC8); + gd_create_rot_mat_angular(&sp38, &sp24, -4.0f); + gd_mult_mat4f(&sp38, &D_801B9DC8, &D_801B9DC8); net->unkA4.x = net->unkA4.y = net->unkA4.z = 0.0f; } @@ -289,7 +289,7 @@ void func_80192CCC(struct ObjNet *net) { } func_801926A4(net); - multiply_mat4(&net->mat128, &D_801B9DC8, &net->mat128); + gd_mult_mat4f(&net->mat128, &D_801B9DC8, &net->mat128); if (group != NULL) { apply_to_obj_types_in_group(OBJ_TYPE_JOINTS, (applyproc_t) Unknown801913C0, group); apply_to_obj_types_in_group(OBJ_TYPE_BONES, (applyproc_t) Unknown8018FA68, group); diff --git a/src/goddard/skin_movement.c b/src/goddard/skin_movement.c index fcf9acf6..fc94447c 100644 --- a/src/goddard/skin_movement.c +++ b/src/goddard/skin_movement.c @@ -20,7 +20,7 @@ void Unknown801815E0(Mat4f *mtx) { scratchVec.x = (*mtx)[0][0]; scratchVec.y = (*mtx)[0][1]; scratchVec.z = (*mtx)[0][2]; - into_unit_vec3f(&scratchVec); + gd_normalize_vec3f(&scratchVec); (*mtx)[0][0] = scratchVec.x; (*mtx)[0][1] = scratchVec.y; (*mtx)[0][2] = scratchVec.z; @@ -28,7 +28,7 @@ void Unknown801815E0(Mat4f *mtx) { scratchVec.x = (*mtx)[1][0]; scratchVec.y = (*mtx)[1][1]; scratchVec.z = (*mtx)[1][2]; - into_unit_vec3f(&scratchVec); + gd_normalize_vec3f(&scratchVec); (*mtx)[1][0] = scratchVec.x; (*mtx)[1][1] = scratchVec.y; (*mtx)[1][2] = scratchVec.z; @@ -36,7 +36,7 @@ void Unknown801815E0(Mat4f *mtx) { scratchVec.x = (*mtx)[2][0]; scratchVec.y = (*mtx)[2][1]; scratchVec.z = (*mtx)[2][2]; - into_unit_vec3f(&scratchVec); + gd_normalize_vec3f(&scratchVec); (*mtx)[2][0] = scratchVec.x; (*mtx)[2][1] = scratchVec.y; (*mtx)[2][2] = scratchVec.z; @@ -93,7 +93,7 @@ void func_80181894(struct ObjJoint *joint) { stackVec.x = curWeight->vec20.x; stackVec.y = curWeight->vec20.y; stackVec.z = curWeight->vec20.z; - func_80196430(&stackVec, &joint->matE8); + gd_rotate_and_translate_vec3f(&stackVec, &joint->matE8); connectedVtx = curWeight->unk3C; scaleFactor = curWeight->unk38; @@ -117,7 +117,7 @@ void Unknown801819D0(struct ObjVertex *vtx) { localVec.y = vtx->pos.y; localVec.z = vtx->pos.z; - func_80196430(&localVec, &D_801B9EA8); + gd_rotate_and_translate_vec3f(&localVec, &D_801B9EA8); sSkinNetCurWeight->vec20.x = localVec.x; sSkinNetCurWeight->vec20.y = localVec.y; sSkinNetCurWeight->vec20.z = localVec.z; @@ -150,7 +150,7 @@ void reset_weight(struct ObjWeight *weight) { void Unknown80181B88(struct ObjJoint *joint) { struct ObjGroup *group; - inverse_mat4(&joint->matE8, &D_801B9EA8); + gd_inverse_mat4f(&joint->matE8, &D_801B9EA8); D_801B9EE8 = joint; if ((group = joint->unk1F4) != NULL) { apply_to_obj_types_in_group(OBJ_TYPE_WEIGHTS, (applyproc_t) reset_weight, group); diff --git a/src/menu/file_select.c b/src/menu/file_select.c index 93c5c185..3637d7d9 100644 --- a/src/menu/file_select.c +++ b/src/menu/file_select.c @@ -2,7 +2,7 @@ #include "sm64.h" #include "audio/external.h" -#include "game/game.h" +#include "game/game_init.h" #include "game/ingame_menu.h" #include "game/object_helpers.h" #include "game/area.h" diff --git a/src/menu/intro_geo.c b/src/menu/intro_geo.c index 0d6850aa..fbdca7ba 100644 --- a/src/menu/intro_geo.c +++ b/src/menu/intro_geo.c @@ -77,7 +77,7 @@ s8 gameOverBackgroundTable[] = { s8 gameOverBackgroundFlipOrder[] = { 0x00, 0x01, 0x02, 0x03, 0x07, 0x0B, 0x0a, 0x09, 0x08, 0x04, 0x05, 0x06 }; -Gfx *geo18_title_screen(s32 sp50, struct GraphNode *sp54, UNUSED void *context) { +Gfx *geo_title_screen(s32 sp50, struct GraphNode *sp54, UNUSED void *context) { struct GraphNode *graphNode; // sp4c Gfx *displayList; // sp48 Gfx *displayListIter; // sp44 @@ -127,7 +127,7 @@ Gfx *geo18_title_screen(s32 sp50, struct GraphNode *sp54, UNUSED void *context) return displayList; } -Gfx *geo18_fade_transition(s32 sp40, struct GraphNode *sp44, UNUSED void *context) { +Gfx *geo_fade_transition(s32 sp40, struct GraphNode *sp44, UNUSED void *context) { struct GraphNode *graphNode = sp44; // sp3c Gfx *displayList = NULL; // sp38 Gfx *displayListIter = NULL; // sp34 @@ -184,7 +184,7 @@ Gfx *intro_backdrop_one_image(s32 index, s8 *backgroundTable) { return displayList; } -Gfx *geo18_intro_backdrop(s32 sp48, struct GraphNode *sp4c, UNUSED void *context) { +Gfx *geo_intro_backdrop(s32 sp48, struct GraphNode *sp4c, UNUSED void *context) { struct GraphNodeMore *graphNode; // sp44 s32 index; // sp40 s8 *backgroundTable; // sp3c @@ -211,7 +211,7 @@ Gfx *geo18_intro_backdrop(s32 sp48, struct GraphNode *sp4c, UNUSED void *context return displayList; } -Gfx *geo18_game_over_tile(s32 sp40, struct GraphNode *sp44, UNUSED void *context) { +Gfx *geo_game_over_tile(s32 sp40, struct GraphNode *sp44, UNUSED void *context) { struct GraphNode *graphNode; // sp3c Gfx *displayList; // sp38 Gfx *displayListIter; // sp34 diff --git a/src/menu/intro_geo.h b/src/menu/intro_geo.h index 30689e02..a972397c 100644 --- a/src/menu/intro_geo.h +++ b/src/menu/intro_geo.h @@ -3,10 +3,10 @@ #include "engine/graph_node.h" -Gfx *geo18_title_screen(s32 a0, struct GraphNode *a1, UNUSED void *context); -Gfx *geo18_fade_transition(s32 a0, struct GraphNode *a1, UNUSED void *context); +Gfx *geo_title_screen(s32 a0, struct GraphNode *a1, UNUSED void *context); +Gfx *geo_fade_transition(s32 a0, struct GraphNode *a1, UNUSED void *context); Gfx *intro_backdrop_one_image(s32 index, s8 *backdrop_table); -Gfx *geo18_intro_backdrop(s32 a0, struct GraphNode *a1, UNUSED void *context); -Gfx *geo18_game_over_tile(s32 a0, struct GraphNode *a1, UNUSED void *context); +Gfx *geo_intro_backdrop(s32 a0, struct GraphNode *a1, UNUSED void *context); +Gfx *geo_game_over_tile(s32 a0, struct GraphNode *a1, UNUSED void *context); #endif /* _INTRO_GEO_H */ diff --git a/src/menu/level_select_menu.c b/src/menu/level_select_menu.c index 83a17f5f..2da5ce89 100644 --- a/src/menu/level_select_menu.c +++ b/src/menu/level_select_menu.c @@ -2,7 +2,7 @@ #include "sm64.h" #include "audio/external.h" -#include "game/game.h" +#include "game/game_init.h" #include "game/main.h" #include "game/memory.h" #include "game/area.h" @@ -10,7 +10,6 @@ #include "game/level_update.h" #include "game/sound_init.h" #include "game/print.h" -#include "game/display.h" #include "seq_ids.h" #include "engine/math_util.h" #include "level_table.h" @@ -135,7 +134,7 @@ s16 level_select_input_loop(void) { return 0; } -int func_8016F3CC(void) { +int intro_default(void) { s32 sp1C = 0; #ifndef VERSION_JP @@ -163,7 +162,7 @@ int func_8016F3CC(void) { return run_press_start_demo_timer(sp1C); } -int func_8016F444(void) { +int intro_game_over(void) { s32 sp1C = 0; #ifndef VERSION_JP @@ -185,24 +184,24 @@ int func_8016F444(void) { return run_press_start_demo_timer(sp1C); } -int func_8016F4BC(void) { +int intro_play_its_a_me_mario(void) { set_background_music(0, SEQ_SOUND_PLAYER, 0); play_sound(SOUND_MENU_COIN_ITS_A_ME_MARIO, gDefaultSoundArgs); return 1; } -s32 LevelProc_8016F508(s16 arg1, UNUSED s32 arg2) { +s32 lvl_intro_update(s16 arg1, UNUSED s32 arg2) { s32 retVar; switch (arg1) { case 0: - retVar = func_8016F4BC(); + retVar = intro_play_its_a_me_mario(); break; case 1: - retVar = func_8016F3CC(); + retVar = intro_default(); break; case 2: - retVar = func_8016F444(); + retVar = intro_game_over(); break; case 3: retVar = level_select_input_loop(); diff --git a/src/menu/level_select_menu.h b/src/menu/level_select_menu.h index 77f07679..f53fe562 100644 --- a/src/menu/level_select_menu.h +++ b/src/menu/level_select_menu.h @@ -3,6 +3,6 @@ #include "types.h" -extern s32 LevelProc_8016F508(s16 arg1, s32 arg2); +extern s32 lvl_intro_update(s16 arg1, s32 arg2); #endif /* _LEVEL_SELECT_MENU_H */ diff --git a/src/menu/star_select.c b/src/menu/star_select.c index 432994f4..0333ddab 100644 --- a/src/menu/star_select.c +++ b/src/menu/star_select.c @@ -2,7 +2,7 @@ #include "sm64.h" #include "audio/external.h" -#include "game/game.h" +#include "game/game_init.h" #include "game/memory.h" #include "game/area.h" #include "game/save_file.h" @@ -18,6 +18,7 @@ #include "text_strings.h" #include "star_select.h" #include "eu_translation.h" +#include /** * @file star_select.c diff --git a/tools/gen_asset_list.cpp b/tools/gen_asset_list.cpp index af4fab45..050bd118 100644 --- a/tools/gen_asset_list.cpp +++ b/tools/gen_asset_list.cpp @@ -23,7 +23,7 @@ using namespace std; const char* OUTPUT_FILE = "assets.json"; const size_t CHUNK_SIZE = 16; -const vector LANGS = {"jp", "us", "eu"}; +const vector LANGS = {"jp", "us", "eu", "sh"}; typedef uint8_t u8; typedef uint64_t u64; diff --git a/undefined_syms.txt b/undefined_syms.txt index b3937a03..c4ab1176 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -2,26 +2,53 @@ /* boot and osException symbols */ /* most of these should be in hardware.h */ -D_80000000 = 0x80000000; -D_A4000000 = 0xA4000000; -D_A40004C0 = 0xA40004C0; -D_A4000774 = 0xA4000774; -D_A4001000 = 0xA4001000; -D_A4040010 = 0xA4040010; -D_A4080000 = 0xA4080000; -D_A4300000 = 0xA4300000; -D_A4300004 = 0xA4300004; -D_A4300008 = 0xA4300008; -D_A430000C = 0xA430000C; -D_A4400010 = 0xA4400010; -D_A450000C = 0xA450000C; -D_A4600000 = 0xA4600000; -D_A4600004 = 0xA4600004; -D_A460000C = 0xA460000C; -D_A4600010 = 0xA4600010; -D_A4700000 = 0xA4700000; -D_A4700010 = 0xA4700010; -D_A4800018 = 0xA4800018; + +/* exceptions */ + +EXCEPTION_TLB_MISS = 0x80000000; + +/* SP */ + +SP_DMEM = 0xA4000000; +SP_DMEM_UNK0 = 0xA40004C0; +SP_DMEM_UNK1 = 0xA4000774; +SP_IMEM = 0xA4001000; +SP_STATUS_REG = 0xA4040010; +SP_PC = 0xA4080000; + +/* MI */ + +MI_MODE_REG = 0xA4300000; +MI_VERSION_REG = 0xA4300004; +MI_INTR_REG = 0xA4300008; +MI_INTR_MASK_REG = 0xA430000C; + +/* VI */ + +VI_CURRENT_REG = 0xA4400010; + +/* AI */ + +AI_STATUS_REG = 0xA450000C; + +/* PI */ + +PI_DRAM_ADDR_REG = 0xA4600000; +PI_CART_ADDR_REG = 0xA4600004; +PI_WR_LEN_REG = 0xA460000C; +PI_STATUS_REG = 0xA4600010; + +/* RI */ + +RI_MODE_REG = 0xA4700000; +RI_REFRESH_REG = 0xA4700010; + +/* SI */ + +SI_STATUS_REG = 0xA4800018; + +/* Unknown */ + D_B0000008 = 0xB0000008; D_B0000010 = 0xB0000010; D_B0000014 = 0xB0000014; @@ -29,6 +56,11 @@ D_C0000000 = 0xC0000000; D_C0000008 = 0xC0000008; D_C000000C = 0xC000000C; -/* Shindou symbols */ +/* Shindou functions */ func_sh_802F69CC = 0x802F69CC; -func_sh_8024CC7C = 0x8024CC7C; \ No newline at end of file +osMotorStop = 0x80302EF0; +osMotorStart = 0x80303090; +osMotorInit = 0x803033AC; +func_sh_803016A0 = 0x803016A0; +func_sh_803016D0 = 0x803016D0; +func_sh_80301820 = 0x80301820;