From 52e605f075baa551ca81c2a49bb193b4a987ee4d Mon Sep 17 00:00:00 2001 From: n64 Date: Sat, 5 Oct 2019 15:08:05 -0400 Subject: [PATCH] Refresh 2 --- CHANGES | 29 + Makefile | 29 +- README.md | 60 +- actors/bubba/model.s | 3 +- actors/chain_ball/model.s | 3 +- actors/cyan_fish/model.s | 3 +- actors/flyguy/model.s | 3 +- actors/klepto/model.s | 3 +- actors/piranha_plant/model.s | 3 +- actors/power_meter/model.s | 66 +- actors/small_key/model.s | 5 +- actors/snowman/model.s | 3 +- actors/sparkle/model.s | 12 +- actors/spindrift/model.s | 5 +- actors/sushi/model.s | 3 +- actors/ukiki/model.s | 3 +- actors/water_splash/model.s | 16 +- actors/whomp/collision.s | 20 +- actors/whomp/model.s | 4 +- asm/non_matchings/func_80316928_jp.s | 469 - asm/non_matchings/func_80316928_us.s | 503 - ...eu.s => handle_dialog_text_and_pages_eu.s} | 40 +- assets.json | 28 +- assets/demo_data.s | 16 +- assets/mario_anim_data.s | 13 +- bin/effect.s | 2 +- bin/segment2.s | 1198 +- charmap.txt | 19 +- charmap_menu.txt | 30 + data/behavior_data.s | 19 +- data/trig_tables.s | 10240 ++++++++-------- diff.sh | 16 +- enhancements/mem_error_screen.inc.c | 10 +- include/PR/abi.h | 473 +- include/PR/gbi.h | 204 +- include/PR/gbi.inc | 16 +- include/PR/gbi_old.h | 296 +- include/PR/os_cache.h | 6 +- include/PR/os_misc.h | 2 +- include/PR/os_pi.h | 14 +- include/PR/ultratypes.h | 14 +- include/audio_defines.h | 976 +- include/behavior_data.h | 2 +- include/config.h | 10 +- include/geo_commands.inc | 2 +- include/level_commands.inc | 56 +- include/macros.h | 9 + include/macros.inc | 10 +- include/object_constants.h | 9 +- include/object_fields.h | 1987 +-- include/sm64.h | 9 +- include/text_menu_strings.h.in | 18 + include/text_strings.h.in | 394 +- include/types.h | 29 +- levels/castle_grounds/areas/1/11/anim.s | 11 +- levels/castle_grounds/areas/1/13/model.s | 2 +- levels/ending/geo.s | 2 +- levels/ending/leveldata.s | 82 +- levels/hmc/areas/1/painting.s | 4 +- levels/intro/geo.s | 2 +- levels/menu/geo.s | 56 +- levels/menu/leveldata.s | 1121 +- levels/menu/script.s | 32 +- lib/PR/audio/aspMain.bin | Bin 2048 -> 3616 bytes lib/PR/audio/aspMain_unk.bin | Bin 1568 -> 0 bytes lib/PR/f3d/old/F3D.bin | Bin 4096 -> 5128 bytes lib/PR/f3d/old/F3D_unk.bin | Bin 1032 -> 0 bytes lib/rsp.s | 9 - lib/src/_Ldtob.c | 2 +- lib/src/_Printf.c | 2 +- lib/src/__osSiRawReadIo.c | 2 +- lib/src/__osSiRawWriteIo.c | 2 +- lib/src/alBnkfNew.c | 4 +- lib/src/hardware.h | 2 +- lib/src/kdebugserver.c | 2 +- lib/src/osAiSetNextBuffer.c | 2 +- lib/src/osPiRawStartDma.c | 3 +- lib/src/osPiStartDma.c | 2 +- lib/src/osStartThread.c | 4 +- lib/src/osVirtualToPhysical.c | 12 +- sm64.ld | 56 +- sound/sequences/00_sound_player.s | 2080 ++-- src/audio/external.c | 82 +- src/audio/external.h | 6 +- src/audio/internal.h | 4 +- src/audio/load.c | 96 +- src/audio/load.h | 8 +- src/audio/memory.c | 49 +- src/audio/seqplayer.c | 18 +- src/audio/synthesis.c | 51 +- src/{game => buffers}/buffers.c | 0 src/{game => buffers}/buffers.h | 4 +- src/engine/behavior_script.c | 108 +- src/engine/geo_layout.c | 59 +- src/engine/geo_layout.h | 5 +- src/engine/graph_node.c | 19 +- src/engine/graph_node.h | 13 +- src/engine/level_script.c | 91 +- src/engine/surface_load.c | 2 +- src/game/area.c | 26 +- src/game/area.h | 4 +- src/game/behavior_actions.c | 10 +- src/game/behaviors/amp.inc.c | 4 +- .../behaviors/animated_floor_switch.inc.c | 4 +- .../behaviors/bbh_haunted_bookshelf.inc.c | 2 +- src/game/behaviors/bbh_merry_go_round.inc.c | 6 +- src/game/behaviors/beta_chest.inc.c | 2 +- src/game/behaviors/beta_trampoline.inc.c | 2 +- src/game/behaviors/bird.inc.c | 2 +- src/game/behaviors/blue_coin.inc.c | 9 +- src/game/behaviors/bobomb.inc.c | 45 +- src/game/behaviors/bomp.inc.c | 8 +- src/game/behaviors/boo.inc.c | 613 +- src/game/behaviors/boo_cage.inc.c | 2 +- src/game/behaviors/boulder.inc.c | 4 +- src/game/behaviors/bowling_ball.inc.c | 42 +- src/game/behaviors/bowser.inc.c | 108 +- src/game/behaviors/bowser_bomb.inc.c | 2 +- src/game/behaviors/bowser_key_cutscene.inc.c | 24 +- src/game/behaviors/bowser_puzzle_piece.inc.c | 2 +- src/game/behaviors/breakable_box.inc.c | 2 +- src/game/behaviors/breakable_box_small.inc.c | 6 +- src/game/behaviors/breakable_wall.inc.c | 2 +- src/game/behaviors/bub.inc.c | 2 +- src/game/behaviors/bubba.inc.c | 2 +- src/game/behaviors/bullet_bill.inc.c | 2 +- src/game/behaviors/bully.inc.c | 23 +- src/game/behaviors/camera_lakitu.inc.c | 4 +- src/game/behaviors/cannon.inc.c | 32 +- src/game/behaviors/cannon_door.inc.c | 2 +- src/game/behaviors/cap.inc.c | 18 +- src/game/behaviors/capswitch.inc.c | 4 +- src/game/behaviors/castle_floor_trap.inc.c | 2 +- src/game/behaviors/celebration_star.inc.c | 6 +- src/game/behaviors/chain_chomp.inc.c | 14 +- .../behaviors/checkerboard_platform.inc.c | 7 +- src/game/behaviors/chuckya.inc.c | 48 +- src/game/behaviors/clam.inc.c | 4 +- src/game/behaviors/cloud.inc.c | 4 +- src/game/behaviors/coffin.inc.c | 6 +- src/game/behaviors/coin.inc.c | 29 +- src/game/behaviors/collide_particles.inc.c | 18 +- .../behaviors/controllable_platform.inc.c | 18 +- src/game/behaviors/cruiser.inc.c | 2 +- src/game/behaviors/decorative_pendulum.inc.c | 2 +- src/game/behaviors/donut_platform.inc.c | 2 +- src/game/behaviors/door.inc.c | 34 +- src/game/behaviors/door_key.inc.c | 47 - src/game/behaviors/dorrie.inc.c | 2 +- src/game/behaviors/drawbridge.inc.c | 4 +- src/game/behaviors/elevator.inc.c | 54 +- src/game/behaviors/end_birds_1.inc.c | 2 +- src/game/behaviors/end_birds_2.inc.c | 2 +- src/game/behaviors/enemy_lakitu.inc.c | 4 +- src/game/behaviors/exclamation_box.inc.c | 2 +- src/game/behaviors/explosion.inc.c | 2 +- src/game/behaviors/express_elevator.inc.c | 4 +- src/game/behaviors/eyerok.inc.c | 16 +- src/game/behaviors/falling_pillar.inc.c | 4 +- src/game/behaviors/fire_piranha_plant.inc.c | 8 +- src/game/behaviors/fire_spitter.inc.c | 2 +- src/game/behaviors/fish.inc.c | 4 +- src/game/behaviors/flamethrower.inc.c | 2 +- src/game/behaviors/floating_platform.inc.c | 32 +- src/game/behaviors/fly_guy.inc.c | 4 +- .../behaviors/flying_bookend_switch.inc.c | 12 +- src/game/behaviors/goomba.inc.c | 10 +- src/game/behaviors/grand_star.inc.c | 10 +- src/game/behaviors/grill_door.inc.c | 6 +- src/game/behaviors/haunted_chair.inc.c | 6 +- src/game/behaviors/heave_ho.inc.c | 14 +- src/game/behaviors/hidden_star.inc.c | 20 +- src/game/behaviors/hoot.inc.c | 10 +- src/game/behaviors/horizontal_grindel.inc.c | 4 +- src/game/behaviors/intro_lakitu.inc.c | 10 +- src/game/behaviors/jrb_ship.inc.c | 4 +- src/game/behaviors/jumping_box.inc.c | 2 +- src/game/behaviors/kickable_board.inc.c | 18 +- src/game/behaviors/king_bobomb.inc.c | 116 +- src/game/behaviors/klepto.inc.c | 12 +- src/game/behaviors/koopa.inc.c | 14 +- src/game/behaviors/lll_volcano_flames.inc.c | 2 +- src/game/behaviors/mad_piano.inc.c | 2 +- src/game/behaviors/manta_ray.inc.c | 24 +- src/game/behaviors/metal_box.inc.c | 2 +- src/game/behaviors/mips.inc.c | 20 +- src/game/behaviors/moneybag.inc.c | 4 +- src/game/behaviors/monty_mole.inc.c | 6 +- src/game/behaviors/moving_coin.inc.c | 4 +- src/game/behaviors/mr_blizzard.inc.c | 14 +- src/game/behaviors/mr_i.inc.c | 104 +- src/game/behaviors/mushroom_1up.inc.c | 10 +- src/game/behaviors/piranha_plant.inc.c | 6 +- src/game/behaviors/platform_on_track.inc.c | 4 +- src/game/behaviors/pokey.inc.c | 2 +- src/game/behaviors/purple_switch.inc.c | 6 +- src/game/behaviors/pyramid_top.inc.c | 8 +- src/game/behaviors/racing_penguin.inc.c | 6 +- src/game/behaviors/recovery_heart.inc.c | 2 +- src/game/behaviors/red_coin.inc.c | 12 +- src/game/behaviors/rolling_log.inc.c | 10 +- src/game/behaviors/rotating_platform.inc.c | 2 +- src/game/behaviors/scuttlebug.inc.c | 18 +- src/game/behaviors/seesaw_platform.inc.c | 2 +- src/game/behaviors/skeeter.inc.c | 6 +- src/game/behaviors/snow_mound.inc.c | 2 +- src/game/behaviors/snowman.inc.c | 24 +- src/game/behaviors/snowman_wind.inc.c | 4 +- src/game/behaviors/snufit.inc.c | 12 +- src/game/behaviors/sound_ambient.inc.c | 2 +- src/game/behaviors/sound_birds.inc.c | 6 +- src/game/behaviors/sound_sand.inc.c | 2 +- src/game/behaviors/sound_volcano.inc.c | 2 +- src/game/behaviors/sound_waterfall.inc.c | 2 +- src/game/behaviors/sparkle_spawn_star.inc.c | 6 +- src/game/behaviors/spawn_star.inc.c | 16 +- src/game/behaviors/spindel.inc.c | 26 +- src/game/behaviors/spindrift.inc.c | 2 +- src/game/behaviors/spiny.inc.c | 2 +- src/game/behaviors/star_door.inc.c | 4 +- src/game/behaviors/sushi.inc.c | 2 +- .../behaviors/switch_hidden_objects.inc.c | 6 +- src/game/behaviors/swoop.inc.c | 6 +- src/game/behaviors/thi_top.inc.c | 9 +- src/game/behaviors/thwomp.inc.c | 10 +- src/game/behaviors/tower_door.inc.c | 2 +- src/game/behaviors/tower_platform.inc.c | 4 +- src/game/behaviors/treasure_chest.inc.c | 40 +- src/game/behaviors/ttc_rotating_solid.inc.c | 4 +- src/game/behaviors/ttc_treadmill.inc.c | 2 +- src/game/behaviors/tumbling_bridge.inc.c | 4 +- src/game/behaviors/tuxie.inc.c | 46 +- src/game/behaviors/tweester.inc.c | 4 +- src/game/behaviors/ukiki.inc.c | 25 +- src/game/behaviors/ukiki_cage.inc.c | 2 - src/game/behaviors/unagi.inc.c | 28 +- src/game/behaviors/water_bomb.inc.c | 8 +- src/game/behaviors/water_bomb_cannon.inc.c | 28 +- src/game/behaviors/water_objs.inc.c | 44 +- src/game/behaviors/water_pillar.inc.c | 2 +- src/game/behaviors/water_ring.inc.c | 4 +- src/game/behaviors/wdw_water_level.inc.c | 6 +- src/game/behaviors/whirlpool.inc.c | 4 +- src/game/behaviors/white_puff_explode.inc.c | 18 +- src/game/behaviors/whomp.inc.c | 16 +- src/game/behaviors/wiggler.inc.c | 12 +- src/game/behaviors/yoshi.inc.c | 14 +- src/game/camera.c | 156 +- src/game/camera.h | 31 +- src/game/display.c | 8 +- src/game/envfx_bubbles.c | 12 +- src/game/file_select.c | 1945 --- src/game/file_select.h | 86 - src/game/game.c | 4 +- src/game/game.h | 14 +- src/game/hud.c | 248 +- src/game/hud.h | 52 +- src/game/ingame_menu.c | 1472 ++- src/game/ingame_menu.h | 172 +- src/game/interaction.c | 20 +- src/game/level_update.c | 42 +- src/game/level_update.h | 4 +- src/game/macro_special_objects.c | 12 +- src/game/main.c | 6 +- src/game/mario.c | 172 +- src/game/mario.h | 10 +- src/game/mario_actions_airborne.c | 156 +- src/game/mario_actions_automatic.c | 28 +- src/game/mario_actions_cutscene.c | 147 +- src/game/mario_actions_moving.c | 107 +- src/game/mario_actions_object.c | 28 +- src/game/mario_actions_stationary.c | 34 +- src/game/mario_actions_submerged.c | 28 +- src/game/mario_misc.c | 6 +- src/game/mario_step.c | 8 +- src/game/memory.c | 79 +- src/game/memory.h | 4 +- src/game/moving_texture.c | 76 +- src/game/obj_behaviors.c | 20 +- src/game/obj_behaviors.h | 9 +- src/game/obj_behaviors_2.c | 18 +- src/game/object_helpers.c | 76 +- src/game/object_helpers.h | 6 +- src/game/object_helpers2.h | 4 +- src/game/object_list_processor.c | 4 +- src/game/object_list_processor.h | 2 +- src/game/paintings.c | 17 +- src/game/paintings.h | 14 +- src/game/print.c | 6 +- src/game/print.h | 2 + src/game/rendering_graph_node.c | 3 +- src/game/save_file.h | 7 + src/game/segment2.h | 33 +- src/game/segment7.h | 17 +- src/game/shadow.c | 4 +- src/game/skybox.c | 4 +- src/game/sound_init.c | 94 +- src/game/spawn_object.c | 6 +- src/game/spawn_object.h | 2 +- src/game/star_select.c | 286 - src/game/star_select.h | 19 - src/goddard/draw_objects.c | 8 +- src/goddard/dynlist_proc.h | 2 +- src/goddard/gd_main.c | 2 +- src/goddard/old_menu.c | 6 +- src/goddard/renderer.c | 8 +- src/goddard/skin.c | 8 +- src/menu/file_select.c | 2236 ++++ src/menu/file_select.h | 128 + src/{game => menu}/intro_geo.c | 6 +- src/{game => menu}/intro_geo.h | 0 src/{game => menu}/level_select_menu.c | 177 +- src/{game => menu}/level_select_menu.h | 0 src/menu/star_select.c | 344 + src/menu/star_select.h | 11 + tools/textconv.c | 17 +- 316 files changed, 16346 insertions(+), 16367 deletions(-) delete mode 100644 asm/non_matchings/func_80316928_jp.s delete mode 100644 asm/non_matchings/func_80316928_us.s rename asm/non_matchings/{func_802AF808_eu.s => handle_dialog_text_and_pages_eu.s} (92%) create mode 100644 charmap_menu.txt create mode 100644 include/text_menu_strings.h.in delete mode 100644 lib/PR/audio/aspMain_unk.bin delete mode 100644 lib/PR/f3d/old/F3D_unk.bin rename src/{game => buffers}/buffers.c (100%) rename src/{game => buffers}/buffers.h (89%) delete mode 100644 src/game/behaviors/door_key.inc.c delete mode 100644 src/game/file_select.c delete mode 100644 src/game/file_select.h delete mode 100644 src/game/star_select.c delete mode 100644 src/game/star_select.h create mode 100644 src/menu/file_select.c create mode 100644 src/menu/file_select.h rename src/{game => menu}/intro_geo.c (99%) rename src/{game => menu}/intro_geo.h (100%) rename src/{game => menu}/level_select_menu.c (51%) rename src/{game => menu}/level_select_menu.h (100%) create mode 100644 src/menu/star_select.c create mode 100644 src/menu/star_select.h diff --git a/CHANGES b/CHANGES index f66d9a4..68eba87 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,32 @@ +Refresh #2 +Changes from Refresh #1: +1.) Label src/game/behaviors/boo.inc.c +2.) Verify half of audio_defines.h +3.) Label ingame_menu.c and some dialog stuff +4.) Improve handle_dialog_text_and_pages EU non-matching +5.) Fix texture format for water splash/sparkle +6.) Merge ucode.bin and ucode_unk.bin +7.) 64-bit fixes +8.) [AUDIO] Match func_80316928 +9.) Documented bug in Tuxie's mother's code +10.) [AUDIO] Slightly closer matching for process_level_music_dynamics +11.) Name channel scripts in sequence 0 +12.) Nicer error message when sha1sum doesn't match +13.) Refactor object fields +14.) Document file_select.c +15.) Document star_select.c +16.) Add uncompressed string support to textconv +17.) Document main_menu geo and leveldata +18.) Document hud.c and rename char textures +19.) Correct gSPTextureRectangle values +20.) Linker script wildcard + - Fixes "undefined reference to x in discarded section y" linker errors. + - Also means that you no longer have to add linker script entries for source files. +21.) Reference qemu-irix package and add project structure + - Installing qemu-irix is as simple as installing the provided Debian package on the GitHub "Releases" tab + (https://github.com/n64decomp/qemu-irix). + - Old qemu-irix installs are unaffected by this change, and it is still possible to install qemu-irix with the older method. + Refresh #1 Changes from initial release: diff --git a/Makefile b/Makefile index a918fd4..3825af9 100644 --- a/Makefile +++ b/Makefile @@ -131,7 +131,7 @@ TEXTURE_DIR := textures ACTOR_DIR := actors # Directories containing source files -SRC_DIRS := src src/engine src/game src/audio +SRC_DIRS := src src/engine src/game src/audio src/menu src/buffers ASM_DIRS := asm actors lib data levels assets sound text BIN_DIRS := bin bin/$(VERSION) @@ -207,6 +207,14 @@ else CROSS := mips64-elf- endif +# check that either QEMU_IRIX is set or qemu-irix package installed +ifndef QEMU_IRIX + QEMU_IRIX := $(shell which qemu-irix) + ifeq (, $(QEMU_IRIX)) + $(error Please install qemu-irix package or set QEMU_IRIX env var to the full qemu-irix binary path) + endif +endif + AS := $(CROSS)as CC := $(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/bin/cc CPP := cpp -P @@ -260,15 +268,11 @@ ifeq ($(BINUTILS_DEPEND),0) $(error binutils version 2.27 required, version $(BINUTILS_VER_MAJOR).$(BINUTILS_VER_MINOR) detected) endif -ifndef QEMU_IRIX -$(error env variable QEMU_IRIX should point to the qemu-mips binary) -endif - ######################## Targets ############################# all: $(ROM) ifeq ($(COMPARE),1) - @$(SHA1SUM) -c $(TARGET).sha1 + @$(SHA1SUM) -c $(TARGET).sha1 || (echo 'The build succeeded, but did not match the official ROM. This is expected if you are making changes to the game.\nTo silence this message, use "make COMPARE=0"'. && false) endif clean: @@ -288,13 +292,16 @@ libultra: $(BUILD_DIR)/libultra.a asm/boot.s: $(BUILD_DIR)/lib/bin/ipl3_font.bin -$(BUILD_DIR)/lib/bin/ipl3_font.bin: lib/ipl3_font.png | $(BUILD_DIR) +$(BUILD_DIR)/lib/bin/ipl3_font.bin: lib/ipl3_font.png $(IPLFONTUTIL) e $< $@ -$(BUILD_DIR)/include/text_strings.h: include/text_strings.h.in | $(BUILD_DIR) +$(BUILD_DIR)/include/text_strings.h: include/text_strings.h.in $(TEXTCONV) charmap.txt $< $@ -$(BUILD_DIR)/text/%.s: text/$(VERSION)/%.s.in | $(BUILD_DIR) +$(BUILD_DIR)/include/text_menu_strings.h: include/text_menu_strings.h.in + $(TEXTCONV) charmap_menu.txt $< $@ + +$(BUILD_DIR)/text/%.s: text/$(VERSION)/%.s.in $(TEXTCONV) charmap.txt $< $@ ifeq ($(VERSION),eu) @@ -313,8 +320,8 @@ ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(ASM_DIRS) $(GOD # Make sure build directory exists before compiling anything DUMMY != mkdir -p $(ALL_DIRS) -$(BUILD_DIR)/src/game/star_select.o: $(BUILD_DIR)/include/text_strings.h -$(BUILD_DIR)/src/game/file_select.o: $(BUILD_DIR)/include/text_strings.h +$(BUILD_DIR)/src/menu/file_select.o: $(BUILD_DIR)/include/text_strings.h $(BUILD_DIR)/include/text_menu_strings.h +$(BUILD_DIR)/src/menu/star_select.o: $(BUILD_DIR)/include/text_strings.h $(BUILD_DIR)/include/text_menu_strings.h $(BUILD_DIR)/src/game/ingame_menu.o: $(BUILD_DIR)/include/text_strings.h ################################################################ diff --git a/README.md b/README.md index 4308011..cb34db8 100644 --- a/README.md +++ b/README.md @@ -35,33 +35,22 @@ __Debian / Ubuntu__ sudo apt install build-essential pkg-config git binutils-mips-linux-gnu python3 zlib1g-dev libaudiofile-dev ``` +Download latest package from [qemu-irix Releases](https://github.com/n64decomp/qemu-irix/releases) +``` +sudo dpkg -i qemu-irix-2.11.0-2169-g32ab296eef_amd64.deb +``` + +(Optional) Clone https://github.com/n64decomp/qemu-irix and follow the install instructions in the README. + __Arch Linux__ ``` -sudo pacman -Sy base-devel python audiofile +sudo pacman -S base-devel python audiofile ``` Install the following AUR packages: * [mips64-elf-binutils](https://aur.archlinux.org/packages/mips64-elf-binutils) (AUR) * [qemu-irix-git](https://aur.archlinux.org/packages/qemu-irix-git) (AUR) -#### 3. Install qemu-irix - -1. Options: - 1. Clone https://github.com/n64decomp/qemu-irix to somewhere and follow its install instructions in the README. - 2. Optionally, grab the prebuilt qemu-irix from the [Releases](https://github.com/n64decomp/sm64/releases) section. - 3. (Arch) Use AUR package [qemu-irix-git](https://aur.archlinux.org/packages/qemu-irix-git) -2. (For the first two options), copy executable `qemu-irix` from irix-linux-user to - somewhere convenient with a relatively short path. e.g.: -``` -mkdir -p /opt/qemu-irix/bin -cp irix-linux-user/qemu-irix /opt/qemu-irix/bin -``` - -3. Define `QEMU_IRIX` environment variable in your `~/.bashrc` to point to this qemu-irix executable. -``` -export QEMU_IRIX=/opt/qemu-irix/bin/qemu-irix -``` - -#### 4. Build ROM +#### 3. Build ROM Run `make` to build the ROM (defaults to `VERSION=us`). Make sure your path to the repo is not too long or else this process will error, as the emulated IDO compiler cannot @@ -85,6 +74,37 @@ Then follow the directions in the [Linux](#linux) installation section above. macOS is currently unsupported as qemu-irix is unable to be built for macOS host. The recommended path is installing a Linux distribution under a VM. +## Project Structure + +``` +sm64 +├── actors: object behaviors, geo layout, and display lists +├── asm: handwritten assembly code +│   └── non_matchings: asm for non-matching sections +├── assets: animation and demo data +│   ├── anims: animation data +│   └── demos: demo data +├── bin: asm files for ordering display lists and textures +├── build: output directory +├── data: behavior scripts, misc. data +├── doxygen: documentation infrastructure +├── enhancements: example source modifications +├── include: header files +├── levels: level scripts, geo layout, and display lists +├── lib: SDK library code +├── sound: sequences, sound samples, and sound banks +├── src: C source code for game +│   ├── audio: audio code +│   ├── buffers: stacks, heaps, and task buffers +│   ├── engine: script processing engines and utils +│   ├── game: behaviors and rest of game source +│   ├── goddard: Mario intro screen +│   └── menu: title screen and file, act, and debug level selection menus +├── text: dialog, level names, act names +├── textures: skybox and generic texture data +└── tools: build tools +``` + ## Contributing Pull requests are welcome. For major changes, please open an issue first to diff --git a/actors/bubba/model.s b/actors/bubba/model.s index f9043a6..3af6cab 100644 --- a/actors/bubba/model.s +++ b/actors/bubba/model.s @@ -2,8 +2,7 @@ # It's possible that bubba and bub used to be 2 "actors" in # one actor file. -.word 0 -.word 0 # Bin ID? What is this? +.dword 0 # Bin ID? What is this? # Bubba diff --git a/actors/chain_ball/model.s b/actors/chain_ball/model.s index 81a5b24..d0adedd 100644 --- a/actors/chain_ball/model.s +++ b/actors/chain_ball/model.s @@ -8,7 +8,8 @@ vertex 26, -26, 0, 992, 992, 0xFF, 0xFF, 0xFF, 0xFF vertex 26, 26, 0, 992, 0, 0xFF, 0xFF, 0xFF, 0xFF vertex -26, 26, 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF -.word 0, 0 # align but balign wont here? +.dword 0 # align? binid? + chain_ball_seg6_texture_06020AE8: # 0x06020AE8 .incbin "actors/chain_ball/chain_ball.rgba16" diff --git a/actors/cyan_fish/model.s b/actors/cyan_fish/model.s index 68aec1c..b325dd6 100644 --- a/actors/cyan_fish/model.s +++ b/actors/cyan_fish/model.s @@ -1,8 +1,7 @@ # Cyan Fish # ??? -.word 0 -.word 0 +.dword 0 cyan_fish_seg6_texture_0600D468: # 0x0600D468 .incbin "actors/cyan_fish/cyan_fish.rgba16" diff --git a/actors/flyguy/model.s b/actors/flyguy/model.s index eb3b3d9..b4c5527 100644 --- a/actors/flyguy/model.s +++ b/actors/flyguy/model.s @@ -1,8 +1,7 @@ # Flyguy # ??? -.word 0 -.word 0 +.dword 0 flyguy_seg8_texture_0800E088: # 0x0800E088 .incbin "actors/flyguy/flyguy_cloth_wrinkle.rgba16" diff --git a/actors/klepto/model.s b/actors/klepto/model.s index 442f7d5..7e6ed09 100644 --- a/actors/klepto/model.s +++ b/actors/klepto/model.s @@ -1,7 +1,6 @@ # Possible Removed Actor File -.word 0 -.word 0 # Bin ID? What is this? +.dword 0 # Bin ID? What is this? # Klepto diff --git a/actors/piranha_plant/model.s b/actors/piranha_plant/model.s index 51caa99..9ea4568 100644 --- a/actors/piranha_plant/model.s +++ b/actors/piranha_plant/model.s @@ -2191,5 +2191,4 @@ glabel piranha_plant_seg6_anims_0601C31C # 0x0601C31C .word 0 # huh? this isnt following the Bin ID format? -.word 0 -.word 1 +.dword 1 diff --git a/actors/power_meter/model.s b/actors/power_meter/model.s index 178f6f5..16352ee 100644 --- a/actors/power_meter/model.s +++ b/actors/power_meter/model.s @@ -1,50 +1,48 @@ # Power Meter HUD -# ??? -.word 0 -.word 0 +.word 0, 0 -power_meter_seg3_texture_030233E0: # 0x030233E0 +texture_power_meter_left_side: # 0x030233E0 .incbin "actors/power_meter/power_meter_left_side.rgba16" -power_meter_seg3_texture_030243E0: # 0x030243E0 +texture_power_meter_right_side: # 0x030243E0 .incbin "actors/power_meter/power_meter_right_side.rgba16" -power_meter_seg3_texture_030253E0: # 0x030253E0 +texture_power_meter_full: # 0x030253E0 .incbin "actors/power_meter/power_meter_full.rgba16" -power_meter_seg3_texture_03025BE0: # 0x03025BE0 +texture_power_meter_seven_segments: # 0x03025BE0 .incbin "actors/power_meter/power_meter_seven_segments.rgba16" -power_meter_seg3_texture_030263E0: # 0x030263E0 +texture_power_meter_six_segments: # 0x030263E0 .incbin "actors/power_meter/power_meter_six_segments.rgba16" -power_meter_seg3_texture_03026BE0: # 0x03026BE0 +texture_power_meter_five_segments: # 0x03026BE0 .incbin "actors/power_meter/power_meter_five_segments.rgba16" -power_meter_seg3_texture_030273E0: # 0x030273E0 +texture_power_meter_four_segments: # 0x030273E0 .incbin "actors/power_meter/power_meter_four_segments.rgba16" -power_meter_seg3_texture_03027BE0: # 0x03027BE0 +texture_power_meter_three_segments: # 0x03027BE0 .incbin "actors/power_meter/power_meter_three_segments.rgba16" -power_meter_seg3_texture_030283E0: # 0x030283E0 +texture_power_meter_two_segments: # 0x030283E0 .incbin "actors/power_meter/power_meter_two_segments.rgba16" -power_meter_seg3_texture_03028BE0: # 0x03028BE0 +texture_power_meter_one_segments: # 0x03028BE0 .incbin "actors/power_meter/power_meter_one_segment.rgba16" -glabel power_meter_seg3_health_icons_030293E0 # 0x030293E0 -.word power_meter_seg3_texture_03028BE0 -.word power_meter_seg3_texture_030283E0 -.word power_meter_seg3_texture_03027BE0 -.word power_meter_seg3_texture_030273E0 -.word power_meter_seg3_texture_03026BE0 -.word power_meter_seg3_texture_030263E0 -.word power_meter_seg3_texture_03025BE0 -.word power_meter_seg3_texture_030253E0 +glabel power_meter_health_segments_lut # 0x030293E0 +.word texture_power_meter_one_segments +.word texture_power_meter_two_segments +.word texture_power_meter_three_segments +.word texture_power_meter_four_segments +.word texture_power_meter_five_segments +.word texture_power_meter_six_segments +.word texture_power_meter_seven_segments +.word texture_power_meter_full -power_meter_seg3_vertex_03029400: # 0x03029400 +vertex_power_meter_base: # 0x03029400 vertex -32, -32, 0, 0, 2016, 0xFF, 0xFF, 0xFF, 0xFF vertex 0, -32, 0, 992, 2016, 0xFF, 0xFF, 0xFF, 0xFF vertex 0, 32, 0, 992, 0, 0xFF, 0xFF, 0xFF, 0xFF @@ -54,56 +52,56 @@ vertex 32, -32, 0, 1024, 2016, 0xFF, 0xFF, 0xFF, 0xFF vertex 32, 32, 0, 1024, 0, 0xFF, 0xFF, 0xFF, 0xFF vertex 0, 32, 0, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF -glabel power_meter_seg3_dl_03029480 # 0x03029480 - 0x03029530 +glabel dl_power_meter_base # 0x03029480 - 0x03029530 gsDPPipeSync gsSPClearGeometryMode G_LIGHTING gsDPSetCombineModeLERP1Cycle G_CCMUX_0, G_CCMUX_0, G_CCMUX_0, G_CCMUX_TEXEL0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_TEXEL0 # There were multiple matching pairs, so I don't know if this is correct or not. gsDPSetRenderMode G_RM_TEX_EDGE, G_RM_TEX_EDGE2 -# It could also be one of these: +# It could also be one of these: # G_RM_OPA_SURF, G_RM_TEX_EDGE2; G_RM_TEX_EDGE, G_RM_OPA_SURF2; G_RM_RA_ZB_OPA_SURF, G_RM_TEX_EDGE, G_RM_OPA_CI2; -# G_RM_OPA_CI, G_RM_TEX_EDGE2; G_G_RM_PASS, G_RM_TEX_EDGE2; +# G_RM_OPA_CI, G_RM_TEX_EDGE2; G_G_RM_PASS, G_RM_TEX_EDGE2; gsDPSetTextureFilter G_TF_POINT gsSPTexture -1, -1, 0, 0, 1 -gsSPVertex power_meter_seg3_vertex_03029400, 8, 0 +gsSPVertex vertex_power_meter_base, 8, 0 gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD gsDPTileSync gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP | G_TX_NOMIRROR, 6, G_TX_NOLOD, G_TX_CLAMP | G_TX_NOMIRROR, 5, G_TX_NOLOD gsDPSetTileSize 0, 0, 0, 124, 252 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, power_meter_seg3_texture_030233E0 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_power_meter_left_side gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x100 gsSP2Triangles 0, 1, 2, 0x0, 0, 2, 3, 0x0 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, power_meter_seg3_texture_030243E0 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_power_meter_right_side gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x100 gsSP2Triangles 4, 5, 6, 0x0, 4, 6, 7, 0x0 gsSPEndDisplayList -power_meter_seg3_vertex_03029530: # 0x03029530 +vertex_power_meter_health_segments: # 0x03029530 vertex -16, -16, 0, 0, 992, 0xFF, 0xFF, 0xFF, 0xFF vertex 15, -16, 0, 992, 992, 0xFF, 0xFF, 0xFF, 0xFF vertex 15, 16, 0, 992, 0, 0xFF, 0xFF, 0xFF, 0xFF vertex -16, 16, 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF -glabel power_meter_seg3_dl_03029570 # 0x03029570 - 0x030295A0 +glabel dl_power_meter_health_segments_begin # 0x03029570 - 0x030295A0 gsDPPipeSync -gsSPVertex power_meter_seg3_vertex_03029530, 4, 0 +gsSPVertex vertex_power_meter_health_segments, 4, 0 gsDPTileSync gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_CLAMP | G_TX_NOMIRROR, 5, G_TX_NOLOD gsDPSetTileSize 0, 0, 0, 124, 124 gsSPEndDisplayList -glabel power_meter_seg3_dl_030295A0 # 0x030295A0 - 0x030295D8 +glabel dl_power_meter_health_segments_end # 0x030295A0 - 0x030295D8 gsDPPipeSync gsSPTexture -1, -1, 0, 0, 0 gsSPSetGeometryMode G_LIGHTING # There were multiple matching pairs, so I don't know if this is correct or not. gsDPSetRenderMode G_RM_OPA_SURF, G_RM_OPA_SURF2 -# It could also be one of these: +# It could also be one of these: # G_RM_OPA_SURF, G_RM_OPA_CI2; G_RM_OPA_CI, G_RM_OPA_SURF2; G_RM_PASS, G_RM_OPA_SURF2; gsDPSetCombineModeLERP1Cycle G_CCMUX_0, G_CCMUX_0, G_CCMUX_0, G_CCMUX_SHADE, G_ACMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_SHADE diff --git a/actors/small_key/model.s b/actors/small_key/model.s index 0911b9b..0649c86 100644 --- a/actors/small_key/model.s +++ b/actors/small_key/model.s @@ -1,8 +1,7 @@ # Small Key (unused) # ??? -.word 0 -.word 0 +.dword 0 small_key_seg5_light_05005798: # 0x05005798 .byte 0x3F, 0x19, 0x0C, 0x00, 0x3F, 0x19, 0x0C, 0x00 @@ -32,7 +31,7 @@ small_key_seg5_light_050057E8: # 0x050057E8 .byte 0xCC, 0xFF, 0x00, 0x00, 0xCC, 0xFF, 0x00, 0x00 .byte 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00 -.word 0, 0 # align? +.balign 16 small_key_seg5_vertex_05005800: # 0x05005800 vertex -14, -109, 14, 0, 0, 0x00, 0x00, 0x7F, 0x00 vertex 14, -109, 14, 0, 0, 0x00, 0x00, 0x7F, 0x00 diff --git a/actors/snowman/model.s b/actors/snowman/model.s index e5b9b7b..363b0a8 100644 --- a/actors/snowman/model.s +++ b/actors/snowman/model.s @@ -1,8 +1,7 @@ # Snowman # ??? -.word 0 -.word 1 +.dword 1 # Unreferenced light .byte 0x0D, 0x0C, 0x28, 0x00, 0x0D, 0x0C, 0x28, 0x00 diff --git a/actors/sparkle/model.s b/actors/sparkle/model.s index 1cf9531..d7ca129 100644 --- a/actors/sparkle/model.s +++ b/actors/sparkle/model.s @@ -7,22 +7,22 @@ vertex 32, 64, 0, 1984, 0, 0x00, 0x00, 0x7F, 0x00 vertex -32, 64, 0, 0, 0, 0x00, 0x00, 0x7F, 0x00 sparkles_seg4_texture_04027490: # 0x04027490 -.incbin "actors/sparkle/sparkle_0.ia16" +.incbin "actors/sparkle/sparkle_0.rgba16" sparkles_seg4_texture_04027C90: # 0x04027C90 -.incbin "actors/sparkle/sparkle_1.ia16" +.incbin "actors/sparkle/sparkle_1.rgba16" sparkles_seg4_texture_04028490: # 0x04028490 -.incbin "actors/sparkle/sparkle_2.ia16" +.incbin "actors/sparkle/sparkle_2.rgba16" sparkles_seg4_texture_04028C90: # 0x04028C90 -.incbin "actors/sparkle/sparkle_3.ia16" +.incbin "actors/sparkle/sparkle_3.rgba16" sparkles_seg4_texture_04029490: # 0x04029490 -.incbin "actors/sparkle/sparkle_4.ia16" +.incbin "actors/sparkle/sparkle_4.rgba16" sparkles_seg4_texture_04029C90: # 0x04029C90 -.incbin "actors/sparkle/sparkle_5.ia16" +.incbin "actors/sparkle/sparkle_5.rgba16" glabel sparkles_seg4_dl_0402A490 # 0x0402A490 - 0x0402A4F8 gsDPSetCombineModeLERP1Cycle G_CCMUX_0, G_CCMUX_0, G_CCMUX_0, G_CCMUX_TEXEL0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_TEXEL0 diff --git a/actors/spindrift/model.s b/actors/spindrift/model.s index 039c42d..fefa3e1 100644 --- a/actors/spindrift/model.s +++ b/actors/spindrift/model.s @@ -184,10 +184,9 @@ spindrift_seg5_anim_050006AC: # 0x050006AC .word spindrift_seg5_animindex_050005F8 .word 0 -.word 0 +.balign 8 -.word 0 -.word 1 # False Bin ID? +.dword 1 # False Bin ID? spindrift_seg5_texture_050006D0: # 0x050006D0 .incbin "actors/spindrift/spindrift_face.rgba16" diff --git a/actors/sushi/model.s b/actors/sushi/model.s index c95f8c1..70e7f7c 100644 --- a/actors/sushi/model.s +++ b/actors/sushi/model.s @@ -3,8 +3,7 @@ # Could be a duplicate binid of the previous actor, but i'm putting it here for # macro reasons so I don't have to clutter the macros.inc with a new macro for this # case. -.word 0 -.word 1 +.dword 1 sushi_seg5_texture_05008ED0: # 0x05008ED0 .incbin "actors/sushi/sushi_snout.rgba16" diff --git a/actors/ukiki/model.s b/actors/ukiki/model.s index 081c9d8..83c38fa 100644 --- a/actors/ukiki/model.s +++ b/actors/ukiki/model.s @@ -19,8 +19,7 @@ ukiki_seg5_light_05007BA8: # 0x05007BA8 .byte 0xE7, 0x93, 0x61, 0x00, 0xE7, 0x93, 0x61, 0x00 .byte 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00 -.word 0 -.word 1 # The hell? +.dword 1 # The hell? ukiki_seg5_texture_05007BC0: # 0x05007BC0 .incbin "actors/ukiki/ukiki_face.rgba16" diff --git a/actors/water_splash/model.s b/actors/water_splash/model.s index b8567e4..3fcf7da 100644 --- a/actors/water_splash/model.s +++ b/actors/water_splash/model.s @@ -7,28 +7,28 @@ vertex 64, 256, 0, 992, 0, 0xFF, 0xFF, 0xFF, 0xFF vertex -64, 256, 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF water_splash_seg4_texture_0402A5C8: # 0x0402A5C8 -.incbin "actors/water_splash/water_splash_0.ia16" +.incbin "actors/water_splash/water_splash_0.rgba16" water_splash_seg4_texture_0402B5C8: # 0x0402B5C8 -.incbin "actors/water_splash/water_splash_1.ia16" +.incbin "actors/water_splash/water_splash_1.rgba16" water_splash_seg4_texture_0402C5C8: # 0x0402C5C8 -.incbin "actors/water_splash/water_splash_2.ia16" +.incbin "actors/water_splash/water_splash_2.rgba16" water_splash_seg4_texture_0402D5C8: # 0x0402D5C8 -.incbin "actors/water_splash/water_splash_3.ia16" +.incbin "actors/water_splash/water_splash_3.rgba16" water_splash_seg4_texture_0402E5C8: # 0x0402E5C8 -.incbin "actors/water_splash/water_splash_4.ia16" +.incbin "actors/water_splash/water_splash_4.rgba16" water_splash_seg4_texture_0402F5C8: # 0x0402F5C8 -.incbin "actors/water_splash/water_splash_5.ia16" +.incbin "actors/water_splash/water_splash_5.rgba16" water_splash_seg4_texture_040305C8: # 0x040305C8 -.incbin "actors/water_splash/water_splash_6.ia16" +.incbin "actors/water_splash/water_splash_6.rgba16" water_splash_seg4_texture_040315C8: # 0x040315C8 -.incbin "actors/water_splash/water_splash_7.ia16" +.incbin "actors/water_splash/water_splash_7.rgba16" glabel water_splash_seg4_dl_040325C8 # 0x040325C8 - 0x04032640 gsSPClearGeometryMode G_LIGHTING diff --git a/actors/whomp/collision.s b/actors/whomp/collision.s index b83b59b..a0171ae 100644 --- a/actors/whomp/collision.s +++ b/actors/whomp/collision.s @@ -13,23 +13,6 @@ colVertex 150, 430, -3 colVertex 150, 50, -3 colVertex -200, 430, -3 -colTriInit SURFACE_CAM_NO_COL, 12 -colTri 2, 1, 0 -colTri 3, 2, 0 -colTri 6, 5, 4 -colTri 5, 7, 4 -colTri 7, 5, 3 -colTri 5, 2, 3 -colTri 6, 4, 0 -colTri 1, 6, 0 -colTri 5, 1, 2 -colTri 6, 1, 5 -colTri 0, 7, 3 -colTri 0, 4, 7 -colTriStop -colEnd -.word 0 - .else colInit @@ -42,6 +25,7 @@ colVertex -150, 50, -3 colVertex 150, 430, -3 colVertex 150, 50, -3 colVertex -150, 430, -3 +.endif colTriInit SURFACE_CAM_NO_COL, 12 colTri 2, 1, 0 @@ -58,5 +42,5 @@ colTri 0, 7, 3 colTri 0, 4, 7 colTriStop colEnd + .word 0 -.endif diff --git a/actors/whomp/model.s b/actors/whomp/model.s index 578e2cd..5eafa53 100644 --- a/actors/whomp/model.s +++ b/actors/whomp/model.s @@ -1,8 +1,7 @@ # Whomp # ??? -.word 0 -.word 2 +.dword 2 .balign 8 @@ -571,4 +570,3 @@ whomp_seg6_anim_060209EC: # 0x060209EC glabel whomp_seg6_anims_06020A04 # 0x06020A04 .word whomp_seg6_anim_060209EC .word whomp_seg6_anim_060202DC -# no terminator? TODO: What does the 0 at the end of these structs actually do? diff --git a/asm/non_matchings/func_80316928_jp.s b/asm/non_matchings/func_80316928_jp.s deleted file mode 100644 index adcb5f6..0000000 --- a/asm/non_matchings/func_80316928_jp.s +++ /dev/null @@ -1,469 +0,0 @@ -.late_rodata -glabel jtbl_80337BE0 - .word L80316BD0 - .word L80316BDC - .word L80316C1C - .word L80316BEC - .word L80316C1C - .word L80316C1C - .word L80316C1C - .word L80316BFC - .word L80316C1C - .word L80316C1C - .word L80316C1C - .word L80316C1C - .word L80316C1C - .word L80316C1C - .word L80316C1C - .word L80316C0C - -.text -glabel func_80316928 -/* 0D1928 80316928 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 0D192C 8031692C 3C0E8033 */ lui $t6, %hi(gAudioLoadLock) # $t6, 0x8033 -/* 0D1930 80316930 AFBF0024 */ sw $ra, 0x24($sp) -/* 0D1934 80316934 AFB30020 */ sw $s3, 0x20($sp) -/* 0D1938 80316938 AFB2001C */ sw $s2, 0x1c($sp) -/* 0D193C 8031693C AFB10018 */ sw $s1, 0x18($sp) -/* 0D1940 80316940 AFB00014 */ sw $s0, 0x14($sp) -/* 0D1944 80316944 AFA40038 */ sw $a0, 0x38($sp) -/* 0D1948 80316948 25CE3EF4 */ addiu $t6, %lo(gAudioLoadLock) # addiu $t6, $t6, 0x3ef4 -/* 0D194C 8031694C 8DCF0000 */ lw $t7, ($t6) -/* 0D1950 80316950 51E0007A */ beql $t7, $zero, .L80316B3C -/* 0D1954 80316954 8FB80038 */ lw $t8, 0x38($sp) -/* 0D1958 80316958 0C0C5A33 */ jal func_803168CC -/* 0D195C 8031695C 00000000 */ nop -/* 0D1960 80316960 3C038022 */ lui $v1, %hi(gMaxSimultaneousNotes) # $v1, 0x8022 -/* 0D1964 80316964 8C636D70 */ lw $v1, %lo(gMaxSimultaneousNotes)($v1) -/* 0D1968 80316968 00008025 */ move $s0, $zero -/* 0D196C 8031696C 00002025 */ move $a0, $zero -/* 0D1970 80316970 18600027 */ blez $v1, .L80316A10 -/* 0D1974 80316974 00008825 */ move $s1, $zero -/* 0D1978 80316978 3C068022 */ lui $a2, %hi(gAudioUpdatesPerFrame) # $a2, 0x8022 -/* 0D197C 8031697C 3C058022 */ lui $a1, %hi(gNotes) # $a1, 0x8022 -/* 0D1980 80316980 24A52A10 */ addiu $a1, %lo(gNotes) # addiu $a1, $a1, 0x2a10 -/* 0D1984 80316984 24C66D7E */ addiu $a2, %lo(gAudioUpdatesPerFrame) # addiu $a2, $a2, 0x6d7e -.L80316988: -/* 0D1988 80316988 8CB80000 */ lw $t8, ($a1) -/* 0D198C 8031698C 26100001 */ addiu $s0, $s0, 1 -/* 0D1990 80316990 03041021 */ addu $v0, $t8, $a0 -/* 0D1994 80316994 8C590000 */ lw $t9, ($v0) -/* 0D1998 80316998 001967C2 */ srl $t4, $t9, 0x1f -/* 0D199C 8031699C 5180001A */ beql $t4, $zero, .L80316A08 -/* 0D19A0 803169A0 0203082A */ slt $at, $s0, $v1 -/* 0D19A4 803169A4 904D0055 */ lbu $t5, 0x55($v0) -/* 0D19A8 803169A8 51A00017 */ beql $t5, $zero, .L80316A08 -/* 0D19AC 803169AC 0203082A */ slt $at, $s0, $v1 -/* 0D19B0 803169B0 80CE0000 */ lb $t6, ($a2) -/* 0D19B4 803169B4 340F8000 */ li $t7, 32768 -/* 0D19B8 803169B8 3C038022 */ lui $v1, %hi(gMaxSimultaneousNotes) # $v1, 0x8022 -/* 0D19BC 803169BC 01EE001A */ div $zero, $t7, $t6 -/* 0D19C0 803169C0 0000C012 */ mflo $t8 -/* 0D19C4 803169C4 A4580062 */ sh $t8, 0x62($v0) -/* 0D19C8 803169C8 8CB90000 */ lw $t9, ($a1) -/* 0D19CC 803169CC 15C00002 */ bnez $t6, .L803169D8 -/* 0D19D0 803169D0 00000000 */ nop -/* 0D19D4 803169D4 0007000D */ break 7 -.L803169D8: -/* 0D19D8 803169D8 2401FFFF */ li $at, -1 -/* 0D19DC 803169DC 15C10004 */ bne $t6, $at, .L803169F0 -/* 0D19E0 803169E0 3C018000 */ lui $at, 0x8000 -/* 0D19E4 803169E4 15E10002 */ bne $t7, $at, .L803169F0 -/* 0D19E8 803169E8 00000000 */ nop -/* 0D19EC 803169EC 0006000D */ break 6 -.L803169F0: -/* 0D19F0 803169F0 03241021 */ addu $v0, $t9, $a0 -/* 0D19F4 803169F4 904C0054 */ lbu $t4, 0x54($v0) -/* 0D19F8 803169F8 358D0010 */ ori $t5, $t4, 0x10 -/* 0D19FC 803169FC A04D0054 */ sb $t5, 0x54($v0) -/* 0D1A00 80316A00 8C636D70 */ lw $v1, %lo(gMaxSimultaneousNotes)($v1) -/* 0D1A04 80316A04 0203082A */ slt $at, $s0, $v1 -.L80316A08: -/* 0D1A08 80316A08 1420FFDF */ bnez $at, .L80316988 -/* 0D1A0C 80316A0C 248400C0 */ addiu $a0, $a0, 0xc0 -.L80316A10: -/* 0D1A10 80316A10 0C0C5A3D */ jal wait_for_audio_frames -/* 0D1A14 80316A14 24040001 */ li $a0, 1 -/* 0D1A18 80316A18 26310001 */ addiu $s1, $s1, 1 -/* 0D1A1C 80316A1C 2A2100F1 */ slti $at, $s1, 0xf1 -/* 0D1A20 80316A20 10200013 */ beqz $at, .L80316A70 -/* 0D1A24 80316A24 3C038022 */ lui $v1, %hi(gMaxSimultaneousNotes) # $v1, 0x8022 -/* 0D1A28 80316A28 8C636D70 */ lw $v1, %lo(gMaxSimultaneousNotes)($v1) -/* 0D1A2C 80316A2C 00008025 */ move $s0, $zero -/* 0D1A30 80316A30 3C028022 */ lui $v0, %hi(gNotes) # $v0, 0x8022 -/* 0D1A34 80316A34 1860000A */ blez $v1, .L80316A60 -/* 0D1A38 80316A38 00000000 */ nop -/* 0D1A3C 80316A3C 8C422A10 */ lw $v0, %lo(gNotes)($v0) -.L80316A40: -/* 0D1A40 80316A40 8C4F0000 */ lw $t7, ($v0) -/* 0D1A44 80316A44 000F77C2 */ srl $t6, $t7, 0x1f -/* 0D1A48 80316A48 15C00005 */ bnez $t6, .L80316A60 -/* 0D1A4C 80316A4C 00000000 */ nop -/* 0D1A50 80316A50 26100001 */ addiu $s0, $s0, 1 -/* 0D1A54 80316A54 0203082A */ slt $at, $s0, $v1 -/* 0D1A58 80316A58 1420FFF9 */ bnez $at, .L80316A40 -/* 0D1A5C 80316A5C 244200C0 */ addiu $v0, $v0, 0xc0 -.L80316A60: -/* 0D1A60 80316A60 12030003 */ beq $s0, $v1, .L80316A70 -/* 0D1A64 80316A64 00000000 */ nop -/* 0D1A68 80316A68 1000FFE9 */ b .L80316A10 -/* 0D1A6C 80316A6C 00000000 */ nop -.L80316A70: -/* 0D1A70 80316A70 0C0C5A33 */ jal func_803168CC -/* 0D1A74 80316A74 00000000 */ nop -/* 0D1A78 80316A78 0C0C5A3D */ jal wait_for_audio_frames -/* 0D1A7C 80316A7C 24040003 */ li $a0, 3 -/* 0D1A80 80316A80 3C181971 */ lui $t8, (0x19710515 >> 16) # lui $t8, 0x1971 -/* 0D1A84 80316A84 3C198033 */ lui $t9, %hi(gAudioLoadLock) # $t9, 0x8033 -/* 0D1A88 80316A88 27393EF4 */ addiu $t9, %lo(gAudioLoadLock) # addiu $t9, $t9, 0x3ef4 -/* 0D1A8C 80316A8C 37180515 */ ori $t8, (0x19710515 & 0xFFFF) # ori $t8, $t8, 0x515 -/* 0D1A90 80316A90 AF380000 */ sw $t8, ($t9) -/* 0D1A94 80316A94 0C0C5A3D */ jal wait_for_audio_frames -/* 0D1A98 80316A98 24040003 */ li $a0, 3 -/* 0D1A9C 80316A9C 3C138022 */ lui $s3, %hi(gCurrAudioFrameDmaCount) # $s3, 0x8022 -/* 0D1AA0 80316AA0 26736D84 */ addiu $s3, %lo(gCurrAudioFrameDmaCount) # addiu $s3, $s3, 0x6d84 -/* 0D1AA4 80316AA4 8E710000 */ lw $s1, ($s3) -/* 0D1AA8 80316AA8 1A200014 */ blez $s1, .L80316AFC -/* 0D1AAC 80316AAC 00000000 */ nop -/* 0D1AB0 80316AB0 3C128022 */ lui $s2, %hi(gCurrAudioFrameDmaQueue) # $s2, 0x8022 -/* 0D1AB4 80316AB4 26525EE8 */ addiu $s2, %lo(gCurrAudioFrameDmaQueue) # addiu $s2, $s2, 0x5ee8 -/* 0D1AB8 80316AB8 8E6C0000 */ lw $t4, ($s3) -.L80316ABC: -/* 0D1ABC 80316ABC 00008025 */ move $s0, $zero -/* 0D1AC0 80316AC0 1980000C */ blez $t4, .L80316AF4 -/* 0D1AC4 80316AC4 02402025 */ move $a0, $s2 -.L80316AC8: -/* 0D1AC8 80316AC8 00002825 */ move $a1, $zero -/* 0D1ACC 80316ACC 0C0C8634 */ jal osRecvMesg -/* 0D1AD0 80316AD0 00003025 */ move $a2, $zero -/* 0D1AD4 80316AD4 54400003 */ bnezl $v0, .L80316AE4 -/* 0D1AD8 80316AD8 8E6D0000 */ lw $t5, ($s3) -/* 0D1ADC 80316ADC 2631FFFF */ addiu $s1, $s1, -1 -/* 0D1AE0 80316AE0 8E6D0000 */ lw $t5, ($s3) -.L80316AE4: -/* 0D1AE4 80316AE4 26100001 */ addiu $s0, $s0, 1 -/* 0D1AE8 80316AE8 020D082A */ slt $at, $s0, $t5 -/* 0D1AEC 80316AEC 5420FFF6 */ bnezl $at, .L80316AC8 -/* 0D1AF0 80316AF0 02402025 */ move $a0, $s2 -.L80316AF4: -/* 0D1AF4 80316AF4 5E20FFF1 */ bgtzl $s1, .L80316ABC -/* 0D1AF8 80316AF8 8E6C0000 */ lw $t4, ($s3) -.L80316AFC: -/* 0D1AFC 80316AFC 3C038022 */ lui $v1, %hi(gAiBuffers) # $v1, 0x8022 -/* 0D1B00 80316B00 3C068022 */ lui $a2, %hi(gAiBuffers + 0xC) # $a2, 0x8022 -/* 0D1B04 80316B04 AE600000 */ sw $zero, ($s3) -/* 0D1B08 80316B08 24C66E4C */ addiu $a2, %lo(gAiBuffers + 0xC) # addiu $a2, $a2, 0x6e4c -/* 0D1B0C 80316B0C 24636E40 */ addiu $v1, %lo(gAiBuffers) # addiu $v1, $v1, 0x6e40 -/* 0D1B10 80316B10 24040A00 */ li $a0, 2560 -/* 0D1B14 80316B14 00001025 */ move $v0, $zero -.L80316B18: -/* 0D1B18 80316B18 8C6F0000 */ lw $t7, ($v1) -/* 0D1B1C 80316B1C 01E27021 */ addu $t6, $t7, $v0 -/* 0D1B20 80316B20 24420002 */ addiu $v0, $v0, 2 -/* 0D1B24 80316B24 1444FFFC */ bne $v0, $a0, .L80316B18 -/* 0D1B28 80316B28 A5C00000 */ sh $zero, ($t6) -/* 0D1B2C 80316B2C 24630004 */ addiu $v1, $v1, 4 -/* 0D1B30 80316B30 5466FFF9 */ bnel $v1, $a2, .L80316B18 -/* 0D1B34 80316B34 00001025 */ move $v0, $zero -/* 0D1B38 80316B38 8FB80038 */ lw $t8, 0x38($sp) -.L80316B3C: -/* 0D1B3C 80316B3C 3C018022 */ lui $at, %hi(gSampleDmaNumListItems) # $at, 0x8022 -/* 0D1B40 80316B40 AC206B38 */ sw $zero, %lo(gSampleDmaNumListItems)($at) -/* 0D1B44 80316B44 97190006 */ lhu $t9, 6($t8) -/* 0D1B48 80316B48 AFB9002C */ sw $t9, 0x2c($sp) -/* 0D1B4C 80316B4C 0C0C9290 */ jal osAiSetFrequency -/* 0D1B50 80316B50 8F040000 */ lw $a0, ($t8) -/* 0D1B54 80316B54 2401003C */ li $at, 60 -/* 0D1B58 80316B58 0041001A */ div $zero, $v0, $at -/* 0D1B5C 80316B5C 8FA80038 */ lw $t0, 0x38($sp) -/* 0D1B60 80316B60 3C038022 */ lui $v1, %hi(gAiFrequency) # $v1, 0x8022 -/* 0D1B64 80316B64 24636D64 */ addiu $v1, %lo(gAiFrequency) # addiu $v1, $v1, 0x6d64 -/* 0D1B68 80316B68 AC620000 */ sw $v0, ($v1) -/* 0D1B6C 80316B6C 910C0004 */ lbu $t4, 4($t0) -/* 0D1B70 80316B70 00007812 */ mflo $t7 -/* 0D1B74 80316B74 3C0A8022 */ lui $t2, %hi(D_80226D74) # $t2, 0x8022 -/* 0D1B78 80316B78 3C0B8022 */ lui $t3, %hi(gMaxSimultaneousNotes) # $t3, 0x8022 -/* 0D1B7C 80316B7C 25EE000F */ addiu $t6, $t7, 0xf -/* 0D1B80 80316B80 2401FFF0 */ li $at, -16 -/* 0D1B84 80316B84 256B6D70 */ addiu $t3, %lo(gMaxSimultaneousNotes) # addiu $t3, $t3, 0x6d70 -/* 0D1B88 80316B88 254A6D74 */ addiu $t2, %lo(D_80226D74) # addiu $t2, $t2, 0x6d74 -/* 0D1B8C 80316B8C 01C1C824 */ and $t9, $t6, $at -/* 0D1B90 80316B90 AD590000 */ sw $t9, ($t2) -/* 0D1B94 80316B94 AD6C0000 */ sw $t4, ($t3) -/* 0D1B98 80316B98 91180005 */ lbu $t8, 5($t0) -/* 0D1B9C 80316B9C 3C098022 */ lui $t1, %hi(D_802212A2) # $t1, 0x8022 -/* 0D1BA0 80316BA0 252912A2 */ addiu $t1, %lo(D_802212A2) # addiu $t1, $t1, 0x12a2 -/* 0D1BA4 80316BA4 A1380000 */ sb $t8, ($t1) -/* 0D1BA8 80316BA8 812C0000 */ lb $t4, ($t1) -/* 0D1BAC 80316BAC 258DFFFF */ addiu $t5, $t4, -1 -/* 0D1BB0 80316BB0 2DA10010 */ sltiu $at, $t5, 0x10 -/* 0D1BB4 80316BB4 10200019 */ beqz $at, .L80316C1C -/* 0D1BB8 80316BB8 000D6880 */ sll $t5, $t5, 2 -/* 0D1BBC 80316BBC 3C018033 */ lui $at, %hi(jtbl_80337BE0) -/* 0D1BC0 80316BC0 002D0821 */ addu $at, $at, $t5 -/* 0D1BC4 80316BC4 8C2D7BE0 */ lw $t5, %lo(jtbl_80337BE0)($at) -/* 0D1BC8 80316BC8 01A00008 */ jr $t5 -/* 0D1BCC 80316BCC 00000000 */ nop -glabel L80316BD0 -/* 0D1BD0 80316BD0 3C018022 */ lui $at, %hi(D_802212A3) # $at, 0x8022 -/* 0D1BD4 80316BD4 10000013 */ b .L80316C24 -/* 0D1BD8 80316BD8 A02012A3 */ sb $zero, %lo(D_802212A3)($at) -glabel L80316BDC -/* 0D1BDC 80316BDC 240F0001 */ li $t7, 1 -/* 0D1BE0 80316BE0 3C018022 */ lui $at, %hi(D_802212A3) # $at, 0x8022 -/* 0D1BE4 80316BE4 1000000F */ b .L80316C24 -/* 0D1BE8 80316BE8 A02F12A3 */ sb $t7, %lo(D_802212A3)($at) -glabel L80316BEC -/* 0D1BEC 80316BEC 240E0002 */ li $t6, 2 -/* 0D1BF0 80316BF0 3C018022 */ lui $at, %hi(D_802212A3) # $at, 0x8022 -/* 0D1BF4 80316BF4 1000000B */ b .L80316C24 -/* 0D1BF8 80316BF8 A02E12A3 */ sb $t6, %lo(D_802212A3)($at) -glabel L80316BFC -/* 0D1BFC 80316BFC 24190003 */ li $t9, 3 -/* 0D1C00 80316C00 3C018022 */ lui $at, %hi(D_802212A3) # $at, 0x8022 -/* 0D1C04 80316C04 10000007 */ b .L80316C24 -/* 0D1C08 80316C08 A03912A3 */ sb $t9, %lo(D_802212A3)($at) -glabel L80316C0C -/* 0D1C0C 80316C0C 24180004 */ li $t8, 4 -/* 0D1C10 80316C10 3C018022 */ lui $at, %hi(D_802212A3) # $at, 0x8022 -/* 0D1C14 80316C14 10000003 */ b .L80316C24 -/* 0D1C18 80316C18 A03812A3 */ sb $t8, %lo(D_802212A3)($at) -.L80316C1C: -glabel L80316C1C -/* 0D1C1C 80316C1C 3C018022 */ lui $at, %hi(D_802212A3) # $at, 0x8022 -/* 0D1C20 80316C20 A02012A3 */ sb $zero, %lo(D_802212A3)($at) -.L80316C24: -/* 0D1C24 80316C24 910C0005 */ lbu $t4, 5($t0) -/* 0D1C28 80316C28 3C018022 */ lui $at, %hi(D_802212A0) # $at, 0x8022 -/* 0D1C2C 80316C2C 3C188033 */ lui $t8, %hi(gTatumsPerBeat) # $t8, 0x8033 -/* 0D1C30 80316C30 A12C0000 */ sb $t4, ($t1) -/* 0D1C34 80316C34 950D000A */ lhu $t5, 0xa($t0) -/* 0D1C38 80316C38 87183EE4 */ lh $t8, %lo(gTatumsPerBeat)($t8) -/* 0D1C3C 80316C3C 3C138022 */ lui $s3, %hi(D_80226D6C) # $s3, 0x8022 -/* 0D1C40 80316C40 A42D12A0 */ sh $t5, %lo(D_802212A0)($at) -/* 0D1C44 80316C44 8D420000 */ lw $v0, ($t2) -/* 0D1C48 80316C48 3C018022 */ lui $at, %hi(gMinAiBufferLength) # $at, 0x8022 -/* 0D1C4C 80316C4C 26736D6C */ addiu $s3, %lo(D_80226D6C) # addiu $s3, $s3, 0x6d6c -/* 0D1C50 80316C50 244FFFF0 */ addiu $t7, $v0, -0x10 -/* 0D1C54 80316C54 AC2F6D78 */ sw $t7, %lo(gMinAiBufferLength)($at) -/* 0D1C58 80316C58 240100A0 */ li $at, 160 -/* 0D1C5C 80316C5C 0041001A */ div $zero, $v0, $at -/* 0D1C60 80316C60 00001812 */ mflo $v1 -/* 0D1C64 80316C64 24630001 */ addiu $v1, $v1, 1 -/* 0D1C68 80316C68 00032E00 */ sll $a1, $v1, 0x18 -/* 0D1C6C 80316C6C 00057603 */ sra $t6, $a1, 0x18 -/* 0D1C70 80316C70 000EC8C0 */ sll $t9, $t6, 3 -/* 0D1C74 80316C74 032EC823 */ subu $t9, $t9, $t6 -/* 0D1C78 80316C78 0019C940 */ sll $t9, $t9, 5 -/* 0D1C7C 80316C7C 032EC821 */ addu $t9, $t9, $t6 -/* 0D1C80 80316C80 0019C900 */ sll $t9, $t9, 4 -/* 0D1C84 80316C84 0338001A */ div $zero, $t9, $t8 -/* 0D1C88 80316C88 3C018022 */ lui $at, %hi(gAudioUpdatesPerFrame) # $at, 0x8022 -/* 0D1C8C 80316C8C A0236D7E */ sb $v1, %lo(gAudioUpdatesPerFrame)($at) -/* 0D1C90 80316C90 00006012 */ mflo $t4 -/* 0D1C94 80316C94 01C02825 */ move $a1, $t6 -/* 0D1C98 80316C98 3C048022 */ lui $a0, %hi(D_80221898) # $a0, 0x8022 -/* 0D1C9C 80316C9C 24841898 */ addiu $a0, %lo(D_80221898) # addiu $a0, $a0, 0x1898 -/* 0D1CA0 80316CA0 17000002 */ bnez $t8, .L80316CAC -/* 0D1CA4 80316CA4 00000000 */ nop -/* 0D1CA8 80316CA8 0007000D */ break 7 -.L80316CAC: -/* 0D1CAC 80316CAC 2401FFFF */ li $at, -1 -/* 0D1CB0 80316CB0 17010004 */ bne $t8, $at, .L80316CC4 -/* 0D1CB4 80316CB4 3C018000 */ lui $at, 0x8000 -/* 0D1CB8 80316CB8 17210002 */ bne $t9, $at, .L80316CC4 -/* 0D1CBC 80316CBC 00000000 */ nop -/* 0D1CC0 80316CC0 0006000D */ break 6 -.L80316CC4: -/* 0D1CC4 80316CC4 3C018022 */ lui $at, %hi(gTempoInternalToExternal) # $at, 0x8022 -/* 0D1CC8 80316CC8 A42C6D7C */ sh $t4, %lo(gTempoInternalToExternal)($at) -/* 0D1CCC 80316CCC 8D6D0000 */ lw $t5, ($t3) -/* 0D1CD0 80316CD0 000D7880 */ sll $t7, $t5, 2 -/* 0D1CD4 80316CD4 01ED7821 */ addu $t7, $t7, $t5 -/* 0D1CD8 80316CD8 000F7880 */ sll $t7, $t7, 2 -/* 0D1CDC 80316CDC 01E50019 */ multu $t7, $a1 -/* 0D1CE0 80316CE0 00007012 */ mflo $t6 -/* 0D1CE4 80316CE4 25D90140 */ addiu $t9, $t6, 0x140 -/* 0D1CE8 80316CE8 AE790000 */ sw $t9, ($s3) -/* 0D1CEC 80316CEC 8D0C000C */ lw $t4, 0xc($t0) -/* 0D1CF0 80316CF0 8D180010 */ lw $t8, 0x10($t0) -/* 0D1CF4 80316CF4 8D0F0014 */ lw $t7, 0x14($t0) -/* 0D1CF8 80316CF8 8D0D0018 */ lw $t5, 0x18($t0) -/* 0D1CFC 80316CFC 3C0E8022 */ lui $t6, %hi(D_802212A8 + 8) # $t6, 0x8022 -/* 0D1D00 80316D00 8DCE12B0 */ lw $t6, %lo(D_802212A8 + 8)($t6) -/* 0D1D04 80316D04 030C8021 */ addu $s0, $t8, $t4 -/* 0D1D08 80316D08 01AF8821 */ addu $s1, $t5, $t7 -/* 0D1D0C 80316D0C 02113021 */ addu $a2, $s0, $s1 -/* 0D1D10 80316D10 01C63823 */ subu $a3, $t6, $a2 -/* 0D1D14 80316D14 24E7FF00 */ addiu $a3, $a3, -0x100 -/* 0D1D18 80316D18 AC870000 */ sw $a3, ($a0) -/* 0D1D1C 80316D1C 0C0C5859 */ jal func_80316164 -/* 0D1D20 80316D20 AC86000C */ sw $a2, 0xc($a0) -/* 0D1D24 80316D24 3C048022 */ lui $a0, %hi(D_802218A8) # $a0, 0x8022 -/* 0D1D28 80316D28 248418A8 */ addiu $a0, %lo(D_802218A8) # addiu $a0, $a0, 0x18a8 -/* 0D1D2C 80316D2C AC900000 */ sw $s0, ($a0) -/* 0D1D30 80316D30 0C0C5878 */ jal func_803161E0 -/* 0D1D34 80316D34 AC910004 */ sw $s1, 4($a0) -/* 0D1D38 80316D38 8FA20038 */ lw $v0, 0x38($sp) -/* 0D1D3C 80316D3C 3C048022 */ lui $a0, %hi(D_802218B0) # $a0, 0x8022 -/* 0D1D40 80316D40 248418B0 */ addiu $a0, %lo(D_802218B0) # addiu $a0, $a0, 0x18b0 -/* 0D1D44 80316D44 8C59000C */ lw $t9, 0xc($v0) -/* 0D1D48 80316D48 AC990000 */ sw $t9, ($a0) -/* 0D1D4C 80316D4C 8C580010 */ lw $t8, 0x10($v0) -/* 0D1D50 80316D50 AC800008 */ sw $zero, 8($a0) -/* 0D1D54 80316D54 0C0C5897 */ jal func_8031625C -/* 0D1D58 80316D58 AC980004 */ sw $t8, 4($a0) -/* 0D1D5C 80316D5C 8FAC0038 */ lw $t4, 0x38($sp) -/* 0D1D60 80316D60 8FAF0038 */ lw $t7, 0x38($sp) -/* 0D1D64 80316D64 3C048022 */ lui $a0, %hi(D_802218C0) # $a0, 0x8022 -/* 0D1D68 80316D68 8D8D0014 */ lw $t5, 0x14($t4) -/* 0D1D6C 80316D6C 248418C0 */ addiu $a0, %lo(D_802218C0) # addiu $a0, $a0, 0x18c0 -/* 0D1D70 80316D70 AC8D0000 */ sw $t5, ($a0) -/* 0D1D74 80316D74 8DEE0018 */ lw $t6, 0x18($t7) -/* 0D1D78 80316D78 AC800008 */ sw $zero, 8($a0) -/* 0D1D7C 80316D7C 0C0C58C6 */ jal func_80316318 -/* 0D1D80 80316D80 AC8E0004 */ sw $t6, 4($a0) -/* 0D1D84 80316D84 0C0C5798 */ jal reset_bank_and_seq_load_status -/* 0D1D88 80316D88 00000000 */ nop -/* 0D1D8C 80316D8C 3C108022 */ lui $s0, %hi(gAudioCmdBuffers) # $s0, 0x8022 -/* 0D1D90 80316D90 3C128022 */ lui $s2, %hi(D_802212C8) # $s2, 0x8022 -/* 0D1D94 80316D94 3C118022 */ lui $s1, %hi(gAudioCmdBuffers + 8) # $s1, 0x8022 -/* 0D1D98 80316D98 26316D98 */ addiu $s1, %lo(gAudioCmdBuffers + 8) # addiu $s1, $s1, 0x6d98 -/* 0D1D9C 80316D9C 265212C8 */ addiu $s2, %lo(D_802212C8) # addiu $s2, $s2, 0x12c8 -/* 0D1DA0 80316DA0 26106D90 */ addiu $s0, %lo(gAudioCmdBuffers) # addiu $s0, $s0, 0x6d90 -.L80316DA4: -/* 0D1DA4 80316DA4 8E650000 */ lw $a1, ($s3) -/* 0D1DA8 80316DA8 02402025 */ move $a0, $s2 -/* 0D1DAC 80316DAC 0005C8C0 */ sll $t9, $a1, 3 -/* 0D1DB0 80316DB0 0C0C5808 */ jal soundAlloc -/* 0D1DB4 80316DB4 03202825 */ move $a1, $t9 -/* 0D1DB8 80316DB8 26100004 */ addiu $s0, $s0, 4 -/* 0D1DBC 80316DBC 1611FFF9 */ bne $s0, $s1, .L80316DA4 -/* 0D1DC0 80316DC0 AE02FFFC */ sw $v0, -4($s0) -/* 0D1DC4 80316DC4 3C058022 */ lui $a1, %hi(gMaxSimultaneousNotes) # $a1, 0x8022 -/* 0D1DC8 80316DC8 8CA56D70 */ lw $a1, %lo(gMaxSimultaneousNotes)($a1) -/* 0D1DCC 80316DCC 02402025 */ move $a0, $s2 -/* 0D1DD0 80316DD0 0005C080 */ sll $t8, $a1, 2 -/* 0D1DD4 80316DD4 0305C023 */ subu $t8, $t8, $a1 -/* 0D1DD8 80316DD8 0C0C5808 */ jal soundAlloc -/* 0D1DDC 80316DDC 00182980 */ sll $a1, $t8, 6 -/* 0D1DE0 80316DE0 3C018022 */ lui $at, %hi(gNotes) # $at, 0x8022 -/* 0D1DE4 80316DE4 0C0C6750 */ jal note_init_all -/* 0D1DE8 80316DE8 AC222A10 */ sw $v0, %lo(gNotes)($at) -/* 0D1DEC 80316DEC 0C0C6492 */ jal init_note_free_list -/* 0D1DF0 80316DF0 00000000 */ nop -/* 0D1DF4 80316DF4 8FA2002C */ lw $v0, 0x2c($sp) -/* 0D1DF8 80316DF8 3C118022 */ lui $s1, %hi(D_802211B0) # $s1, 0x8022 -/* 0D1DFC 80316DFC 263111B0 */ addiu $s1, %lo(D_802211B0) # addiu $s1, $s1, 0x11b0 -/* 0D1E00 80316E00 14400005 */ bnez $v0, .L80316E18 -/* 0D1E04 80316E04 240C0008 */ li $t4, 8 -/* 0D1E08 80316E08 3C118022 */ lui $s1, %hi(D_802211B0) # $s1, 0x8022 -/* 0D1E0C 80316E0C 263111B0 */ addiu $s1, %lo(D_802211B0) # addiu $s1, $s1, 0x11b0 -/* 0D1E10 80316E10 10000051 */ b .L80316F58 -/* 0D1E14 80316E14 A2200001 */ sb $zero, 1($s1) -.L80316E18: -/* 0D1E18 80316E18 00028040 */ sll $s0, $v0, 1 -/* 0D1E1C 80316E1C A22C0001 */ sb $t4, 1($s1) -/* 0D1E20 80316E20 02002825 */ move $a1, $s0 -/* 0D1E24 80316E24 0C0C5808 */ jal soundAlloc -/* 0D1E28 80316E28 02402025 */ move $a0, $s2 -/* 0D1E2C 80316E2C AE220014 */ sw $v0, 0x14($s1) -/* 0D1E30 80316E30 02402025 */ move $a0, $s2 -/* 0D1E34 80316E34 0C0C5808 */ jal soundAlloc -/* 0D1E38 80316E38 02002825 */ move $a1, $s0 -/* 0D1E3C 80316E3C 8FAD002C */ lw $t5, 0x2c($sp) -/* 0D1E40 80316E40 8FAF0038 */ lw $t7, 0x38($sp) -/* 0D1E44 80316E44 AE220018 */ sw $v0, 0x18($s1) -/* 0D1E48 80316E48 AE200008 */ sw $zero, 8($s1) -/* 0D1E4C 80316E4C AE20000C */ sw $zero, 0xc($s1) -/* 0D1E50 80316E50 A2200003 */ sb $zero, 3($s1) -/* 0D1E54 80316E54 AE2D0010 */ sw $t5, 0x10($s1) -/* 0D1E58 80316E58 95EE0008 */ lhu $t6, 8($t7) -/* 0D1E5C 80316E5C 24190002 */ li $t9, 2 -/* 0D1E60 80316E60 A2390002 */ sb $t9, 2($s1) -/* 0D1E64 80316E64 3C038022 */ lui $v1, %hi(D_802212A2) # $v1, 0x8022 -/* 0D1E68 80316E68 A62E0004 */ sh $t6, 4($s1) -/* 0D1E6C 80316E6C 806312A2 */ lb $v1, %lo(D_802212A2)($v1) -/* 0D1E70 80316E70 24010001 */ li $at, 1 -/* 0D1E74 80316E74 24180001 */ li $t8, 1 -/* 0D1E78 80316E78 10610037 */ beq $v1, $at, .L80316F58 -/* 0D1E7C 80316E7C 340C8000 */ li $t4, 32768 -/* 0D1E80 80316E80 0183001A */ div $zero, $t4, $v1 -/* 0D1E84 80316E84 00006812 */ mflo $t5 -/* 0D1E88 80316E88 A2380000 */ sb $t8, ($s1) -/* 0D1E8C 80316E8C 14600002 */ bnez $v1, .L80316E98 -/* 0D1E90 80316E90 00000000 */ nop -/* 0D1E94 80316E94 0007000D */ break 7 -.L80316E98: -/* 0D1E98 80316E98 2401FFFF */ li $at, -1 -/* 0D1E9C 80316E9C 14610004 */ bne $v1, $at, .L80316EB0 -/* 0D1EA0 80316EA0 3C018000 */ lui $at, 0x8000 -/* 0D1EA4 80316EA4 15810002 */ bne $t4, $at, .L80316EB0 -/* 0D1EA8 80316EA8 00000000 */ nop -/* 0D1EAC 80316EAC 0006000D */ break 6 -.L80316EB0: -/* 0D1EB0 80316EB0 A62D0006 */ sh $t5, 6($s1) -/* 0D1EB4 80316EB4 02402025 */ move $a0, $s2 -/* 0D1EB8 80316EB8 24050020 */ li $a1, 32 -/* 0D1EBC 80316EBC 0C0C5808 */ jal soundAlloc -/* 0D1EC0 80316EC0 00008025 */ move $s0, $zero -/* 0D1EC4 80316EC4 AE22001C */ sw $v0, 0x1c($s1) -/* 0D1EC8 80316EC8 02402025 */ move $a0, $s2 -/* 0D1ECC 80316ECC 0C0C5808 */ jal soundAlloc -/* 0D1ED0 80316ED0 24050020 */ li $a1, 32 -/* 0D1ED4 80316ED4 AE220020 */ sw $v0, 0x20($s1) -/* 0D1ED8 80316ED8 02402025 */ move $a0, $s2 -/* 0D1EDC 80316EDC 0C0C5808 */ jal soundAlloc -/* 0D1EE0 80316EE0 24050020 */ li $a1, 32 -/* 0D1EE4 80316EE4 AE220024 */ sw $v0, 0x24($s1) -/* 0D1EE8 80316EE8 02402025 */ move $a0, $s2 -/* 0D1EEC 80316EEC 0C0C5808 */ jal soundAlloc -/* 0D1EF0 80316EF0 24050020 */ li $a1, 32 -/* 0D1EF4 80316EF4 AE220028 */ sw $v0, 0x28($s1) -/* 0D1EF8 80316EF8 3C0F8022 */ lui $t7, %hi(gAudioUpdatesPerFrame) # $t7, 0x8022 -/* 0D1EFC 80316EFC 81EF6D7E */ lb $t7, %lo(gAudioUpdatesPerFrame)($t7) -/* 0D1F00 80316F00 3C118022 */ lui $s1, %hi(D_802211B0) # $s1, 0x8022 -/* 0D1F04 80316F04 263111B0 */ addiu $s1, %lo(D_802211B0) # addiu $s1, $s1, 0x11b0 -/* 0D1F08 80316F08 19E00013 */ blez $t7, .L80316F58 -/* 0D1F0C 80316F0C 02402025 */ move $a0, $s2 -.L80316F10: -/* 0D1F10 80316F10 0C0C5808 */ jal soundAlloc -/* 0D1F14 80316F14 24050280 */ li $a1, 640 -/* 0D1F18 80316F18 244E0140 */ addiu $t6, $v0, 0x140 -/* 0D1F1C 80316F1C AE220030 */ sw $v0, 0x30($s1) -/* 0D1F20 80316F20 AE2E0034 */ sw $t6, 0x34($s1) -/* 0D1F24 80316F24 02402025 */ move $a0, $s2 -/* 0D1F28 80316F28 0C0C5808 */ jal soundAlloc -/* 0D1F2C 80316F2C 24050280 */ li $a1, 640 -/* 0D1F30 80316F30 24590140 */ addiu $t9, $v0, 0x140 -/* 0D1F34 80316F34 3C188022 */ lui $t8, %hi(gAudioUpdatesPerFrame) # $t8, 0x8022 -/* 0D1F38 80316F38 AE220080 */ sw $v0, 0x80($s1) -/* 0D1F3C 80316F3C AE390084 */ sw $t9, 0x84($s1) -/* 0D1F40 80316F40 83186D7E */ lb $t8, %lo(gAudioUpdatesPerFrame)($t8) -/* 0D1F44 80316F44 26100001 */ addiu $s0, $s0, 1 -/* 0D1F48 80316F48 26310014 */ addiu $s1, $s1, 0x14 -/* 0D1F4C 80316F4C 0218082A */ slt $at, $s0, $t8 -/* 0D1F50 80316F50 5420FFEF */ bnezl $at, .L80316F10 -/* 0D1F54 80316F54 02402025 */ move $a0, $s2 -.L80316F58: -/* 0D1F58 80316F58 3C048022 */ lui $a0, %hi(gMaxSimultaneousNotes) # $a0, 0x8022 -/* 0D1F5C 80316F5C 0C0C5D63 */ jal func_8031758C -/* 0D1F60 80316F60 8C846D70 */ lw $a0, %lo(gMaxSimultaneousNotes)($a0) -/* 0D1F64 80316F64 0C0C8804 */ jal osWritebackDCacheAll -/* 0D1F68 80316F68 00000000 */ nop -/* 0D1F6C 80316F6C 3C0C8033 */ lui $t4, %hi(gAudioLoadLock) # $t4, 0x8033 -/* 0D1F70 80316F70 258C3EF4 */ addiu $t4, %lo(gAudioLoadLock) # addiu $t4, $t4, 0x3ef4 -/* 0D1F74 80316F74 8D8D0000 */ lw $t5, ($t4) -/* 0D1F78 80316F78 3C0F7655 */ lui $t7, (0x76557364 >> 16) # lui $t7, 0x7655 -/* 0D1F7C 80316F7C 35EF7364 */ ori $t7, (0x76557364 & 0xFFFF) # ori $t7, $t7, 0x7364 -/* 0D1F80 80316F80 51A00003 */ beql $t5, $zero, .L80316F90 -/* 0D1F84 80316F84 8FBF0024 */ lw $ra, 0x24($sp) -/* 0D1F88 80316F88 AD8F0000 */ sw $t7, ($t4) -/* 0D1F8C 80316F8C 8FBF0024 */ lw $ra, 0x24($sp) -.L80316F90: -/* 0D1F90 80316F90 8FB00014 */ lw $s0, 0x14($sp) -/* 0D1F94 80316F94 8FB10018 */ lw $s1, 0x18($sp) -/* 0D1F98 80316F98 8FB2001C */ lw $s2, 0x1c($sp) -/* 0D1F9C 80316F9C 8FB30020 */ lw $s3, 0x20($sp) -/* 0D1FA0 80316FA0 03E00008 */ jr $ra -/* 0D1FA4 80316FA4 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/asm/non_matchings/func_80316928_us.s b/asm/non_matchings/func_80316928_us.s deleted file mode 100644 index 9795615..0000000 --- a/asm/non_matchings/func_80316928_us.s +++ /dev/null @@ -1,503 +0,0 @@ -.late_rodata -glabel jtbl_80337BE0 - .word L80317BF0 - .word L80317BFC - .word L80317C3C - .word L80317C0C - .word L80317C3C - .word L80317C3C - .word L80317C3C - .word L80317C1C - .word L80317C3C - .word L80317C3C - .word L80317C3C - .word L80317C3C - .word L80317C3C - .word L80317C3C - .word L80317C3C - .word L80317C2C - -glabel D_U_80338E00 - .word 0x4A2FC800 /* 2880000.0f */ - -glabel D_U_80338E04 - .word 0x4185B439 /* 16.713f */ - -.text -glabel func_80316928 -/* 0D2948 80317948 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 0D294C 8031794C 3C0E8033 */ lui $t6, %hi(gAudioLoadLock) # $t6, 0x8033 -/* 0D2950 80317950 AFBF0024 */ sw $ra, 0x24($sp) -/* 0D2954 80317954 AFB30020 */ sw $s3, 0x20($sp) -/* 0D2958 80317958 AFB2001C */ sw $s2, 0x1c($sp) -/* 0D295C 8031795C AFB10018 */ sw $s1, 0x18($sp) -/* 0D2960 80317960 AFB00014 */ sw $s0, 0x14($sp) -/* 0D2964 80317964 AFA40038 */ sw $a0, 0x38($sp) -/* 0D2968 80317968 25CE5004 */ addiu $t6, %lo(gAudioLoadLock) # addiu $t6, $t6, 0x5004 -/* 0D296C 8031796C 8DCF0000 */ lw $t7, ($t6) -/* 0D2970 80317970 51E0007A */ beql $t7, $zero, .L80317B5C -/* 0D2974 80317974 8FB80038 */ lw $t8, 0x38($sp) -/* 0D2978 80317978 0C0C5E3B */ jal func_803168CC -/* 0D297C 8031797C 00000000 */ nop -/* 0D2980 80317980 3C038022 */ lui $v1, %hi(gMaxSimultaneousNotes) # $v1, 0x8022 -/* 0D2984 80317984 8C636B70 */ lw $v1, %lo(gMaxSimultaneousNotes)($v1) -/* 0D2988 80317988 00008025 */ move $s0, $zero -/* 0D298C 8031798C 00002025 */ move $a0, $zero -/* 0D2990 80317990 18600027 */ blez $v1, .L80317A30 -/* 0D2994 80317994 00008825 */ move $s1, $zero -/* 0D2998 80317998 3C068022 */ lui $a2, %hi(gAudioUpdatesPerFrame) # $a2, 0x8022 -/* 0D299C 8031799C 3C058022 */ lui $a1, %hi(gNotes) # $a1, 0x8022 -/* 0D29A0 803179A0 24A52610 */ addiu $a1, %lo(gNotes) # addiu $a1, $a1, 0x2610 -/* 0D29A4 803179A4 24C66B7E */ addiu $a2, %lo(gAudioUpdatesPerFrame) # addiu $a2, $a2, 0x6b7e -.L803179A8: -/* 0D29A8 803179A8 8CB80000 */ lw $t8, ($a1) -/* 0D29AC 803179AC 26100001 */ addiu $s0, $s0, 1 -/* 0D29B0 803179B0 03041021 */ addu $v0, $t8, $a0 -/* 0D29B4 803179B4 8C590000 */ lw $t9, ($v0) -/* 0D29B8 803179B8 001967C2 */ srl $t4, $t9, 0x1f -/* 0D29BC 803179BC 5180001A */ beql $t4, $zero, .L80317A28 -/* 0D29C0 803179C0 0203082A */ slt $at, $s0, $v1 -/* 0D29C4 803179C4 904D0055 */ lbu $t5, 0x55($v0) -/* 0D29C8 803179C8 51A00017 */ beql $t5, $zero, .L80317A28 -/* 0D29CC 803179CC 0203082A */ slt $at, $s0, $v1 -/* 0D29D0 803179D0 80CE0000 */ lb $t6, ($a2) -/* 0D29D4 803179D4 340F8000 */ li $t7, 32768 -/* 0D29D8 803179D8 3C038022 */ lui $v1, %hi(gMaxSimultaneousNotes) # $v1, 0x8022 -/* 0D29DC 803179DC 01EE001A */ div $zero, $t7, $t6 -/* 0D29E0 803179E0 0000C012 */ mflo $t8 -/* 0D29E4 803179E4 A4580062 */ sh $t8, 0x62($v0) -/* 0D29E8 803179E8 8CB90000 */ lw $t9, ($a1) -/* 0D29EC 803179EC 15C00002 */ bnez $t6, .L803179F8 -/* 0D29F0 803179F0 00000000 */ nop -/* 0D29F4 803179F4 0007000D */ break 7 -.L803179F8: -/* 0D29F8 803179F8 2401FFFF */ li $at, -1 -/* 0D29FC 803179FC 15C10004 */ bne $t6, $at, .L80317A10 -/* 0D2A00 80317A00 3C018000 */ lui $at, 0x8000 -/* 0D2A04 80317A04 15E10002 */ bne $t7, $at, .L80317A10 -/* 0D2A08 80317A08 00000000 */ nop -/* 0D2A0C 80317A0C 0006000D */ break 6 -.L80317A10: -/* 0D2A10 80317A10 03241021 */ addu $v0, $t9, $a0 -/* 0D2A14 80317A14 904C0054 */ lbu $t4, 0x54($v0) -/* 0D2A18 80317A18 358D0010 */ ori $t5, $t4, 0x10 -/* 0D2A1C 80317A1C A04D0054 */ sb $t5, 0x54($v0) -/* 0D2A20 80317A20 8C636B70 */ lw $v1, %lo(gMaxSimultaneousNotes)($v1) -/* 0D2A24 80317A24 0203082A */ slt $at, $s0, $v1 -.L80317A28: -/* 0D2A28 80317A28 1420FFDF */ bnez $at, .L803179A8 -/* 0D2A2C 80317A2C 248400C0 */ addiu $a0, $a0, 0xc0 -.L80317A30: -/* 0D2A30 80317A30 0C0C5E45 */ jal wait_for_audio_frames -/* 0D2A34 80317A34 24040001 */ li $a0, 1 -/* 0D2A38 80317A38 26310001 */ addiu $s1, $s1, 1 -/* 0D2A3C 80317A3C 2A2100F1 */ slti $at, $s1, 0xf1 -/* 0D2A40 80317A40 10200013 */ beqz $at, .L80317A90 -/* 0D2A44 80317A44 3C038022 */ lui $v1, %hi(gMaxSimultaneousNotes) # $v1, 0x8022 -/* 0D2A48 80317A48 8C636B70 */ lw $v1, %lo(gMaxSimultaneousNotes)($v1) -/* 0D2A4C 80317A4C 00008025 */ move $s0, $zero -/* 0D2A50 80317A50 3C028022 */ lui $v0, %hi(gNotes) # $v0, 0x8022 -/* 0D2A54 80317A54 1860000A */ blez $v1, .L80317A80 -/* 0D2A58 80317A58 00000000 */ nop -/* 0D2A5C 80317A5C 8C422610 */ lw $v0, %lo(gNotes)($v0) -.L80317A60: -/* 0D2A60 80317A60 8C4F0000 */ lw $t7, ($v0) -/* 0D2A64 80317A64 000F77C2 */ srl $t6, $t7, 0x1f -/* 0D2A68 80317A68 15C00005 */ bnez $t6, .L80317A80 -/* 0D2A6C 80317A6C 00000000 */ nop -/* 0D2A70 80317A70 26100001 */ addiu $s0, $s0, 1 -/* 0D2A74 80317A74 0203082A */ slt $at, $s0, $v1 -/* 0D2A78 80317A78 1420FFF9 */ bnez $at, .L80317A60 -/* 0D2A7C 80317A7C 244200C0 */ addiu $v0, $v0, 0xc0 -.L80317A80: -/* 0D2A80 80317A80 12030003 */ beq $s0, $v1, .L80317A90 -/* 0D2A84 80317A84 00000000 */ nop -/* 0D2A88 80317A88 1000FFE9 */ b .L80317A30 -/* 0D2A8C 80317A8C 00000000 */ nop -.L80317A90: -/* 0D2A90 80317A90 0C0C5E3B */ jal func_803168CC -/* 0D2A94 80317A94 00000000 */ nop -/* 0D2A98 80317A98 0C0C5E45 */ jal wait_for_audio_frames -/* 0D2A9C 80317A9C 24040003 */ li $a0, 3 -/* 0D2AA0 80317AA0 3C181971 */ lui $t8, (0x19710515 >> 16) # lui $t8, 0x1971 -/* 0D2AA4 80317AA4 3C198033 */ lui $t9, %hi(gAudioLoadLock) # $t9, 0x8033 -/* 0D2AA8 80317AA8 27395004 */ addiu $t9, %lo(gAudioLoadLock) # addiu $t9, $t9, 0x5004 -/* 0D2AAC 80317AAC 37180515 */ ori $t8, (0x19710515 & 0xFFFF) # ori $t8, $t8, 0x515 -/* 0D2AB0 80317AB0 AF380000 */ sw $t8, ($t9) -/* 0D2AB4 80317AB4 0C0C5E45 */ jal wait_for_audio_frames -/* 0D2AB8 80317AB8 24040003 */ li $a0, 3 -/* 0D2ABC 80317ABC 3C138022 */ lui $s3, %hi(gCurrAudioFrameDmaCount) # $s3, 0x8022 -/* 0D2AC0 80317AC0 26736B84 */ addiu $s3, %lo(gCurrAudioFrameDmaCount) # addiu $s3, $s3, 0x6b84 -/* 0D2AC4 80317AC4 8E710000 */ lw $s1, ($s3) -/* 0D2AC8 80317AC8 3C128022 */ lui $s2, %hi(gCurrAudioFrameDmaQueue) # $s2, 0x8022 -/* 0D2ACC 80317ACC 26525CE8 */ addiu $s2, %lo(gCurrAudioFrameDmaQueue) # addiu $s2, $s2, 0x5ce8 -/* 0D2AD0 80317AD0 1A200012 */ blez $s1, .L80317B1C -/* 0D2AD4 80317AD4 00000000 */ nop -/* 0D2AD8 80317AD8 8E6C0000 */ lw $t4, ($s3) -.L80317ADC: -/* 0D2ADC 80317ADC 00008025 */ move $s0, $zero -/* 0D2AE0 80317AE0 1980000C */ blez $t4, .L80317B14 -/* 0D2AE4 80317AE4 02402025 */ move $a0, $s2 -.L80317AE8: -/* 0D2AE8 80317AE8 00002825 */ move $a1, $zero -/* 0D2AEC 80317AEC 0C0C8A00 */ jal osRecvMesg -/* 0D2AF0 80317AF0 00003025 */ move $a2, $zero -/* 0D2AF4 80317AF4 54400003 */ bnezl $v0, .L80317B04 -/* 0D2AF8 80317AF8 8E6D0000 */ lw $t5, ($s3) -/* 0D2AFC 80317AFC 2631FFFF */ addiu $s1, $s1, -1 -/* 0D2B00 80317B00 8E6D0000 */ lw $t5, ($s3) -.L80317B04: -/* 0D2B04 80317B04 26100001 */ addiu $s0, $s0, 1 -/* 0D2B08 80317B08 020D082A */ slt $at, $s0, $t5 -/* 0D2B0C 80317B0C 5420FFF6 */ bnezl $at, .L80317AE8 -/* 0D2B10 80317B10 02402025 */ move $a0, $s2 -.L80317B14: -/* 0D2B14 80317B14 5E20FFF1 */ bgtzl $s1, .L80317ADC -/* 0D2B18 80317B18 8E6C0000 */ lw $t4, ($s3) -.L80317B1C: -/* 0D2B1C 80317B1C 3C038022 */ lui $v1, %hi(gAiBuffers) # $v1, 0x8022 -/* 0D2B20 80317B20 3C068022 */ lui $a2, %hi(gAiBuffers + 0xC) # $a2, 0x8022 -/* 0D2B24 80317B24 AE600000 */ sw $zero, ($s3) -/* 0D2B28 80317B28 24C66C4C */ addiu $a2, %lo(gAiBuffers + 0xC) # addiu $a2, $a2, 0x6c4c -/* 0D2B2C 80317B2C 24636C40 */ addiu $v1, %lo(gAiBuffers) # addiu $v1, $v1, 0x6c40 -/* 0D2B30 80317B30 24040A00 */ li $a0, 2560 -/* 0D2B34 80317B34 00001025 */ move $v0, $zero -.L80317B38: -/* 0D2B38 80317B38 8C6F0000 */ lw $t7, ($v1) -/* 0D2B3C 80317B3C 01E27021 */ addu $t6, $t7, $v0 -/* 0D2B40 80317B40 24420002 */ addiu $v0, $v0, 2 -/* 0D2B44 80317B44 1444FFFC */ bne $v0, $a0, .L80317B38 -/* 0D2B48 80317B48 A5C00000 */ sh $zero, ($t6) -/* 0D2B4C 80317B4C 24630004 */ addiu $v1, $v1, 4 -/* 0D2B50 80317B50 5466FFF9 */ bnel $v1, $a2, .L80317B38 -/* 0D2B54 80317B54 00001025 */ move $v0, $zero -/* 0D2B58 80317B58 8FB80038 */ lw $t8, 0x38($sp) -.L80317B5C: -/* 0D2B5C 80317B5C 3C018022 */ lui $at, %hi(gSampleDmaNumListItems) # $at, 0x8022 -/* 0D2B60 80317B60 AC206938 */ sw $zero, %lo(gSampleDmaNumListItems)($at) -/* 0D2B64 80317B64 97190006 */ lhu $t9, 6($t8) -/* 0D2B68 80317B68 AFB9002C */ sw $t9, 0x2c($sp) -/* 0D2B6C 80317B6C 0C0C965C */ jal osAiSetFrequency -/* 0D2B70 80317B70 8F040000 */ lw $a0, ($t8) -/* 0D2B74 80317B74 2401003C */ li $at, 60 -/* 0D2B78 80317B78 0041001A */ div $zero, $v0, $at -/* 0D2B7C 80317B7C 8FA80038 */ lw $t0, 0x38($sp) -/* 0D2B80 80317B80 3C038022 */ lui $v1, %hi(gAiFrequency) # $v1, 0x8022 -/* 0D2B84 80317B84 24636B64 */ addiu $v1, %lo(gAiFrequency) # addiu $v1, $v1, 0x6b64 -/* 0D2B88 80317B88 AC620000 */ sw $v0, ($v1) -/* 0D2B8C 80317B8C 910C0004 */ lbu $t4, 4($t0) -/* 0D2B90 80317B90 00007812 */ mflo $t7 -/* 0D2B94 80317B94 3C0A8022 */ lui $t2, %hi(D_80226D74) # $t2, 0x8022 -/* 0D2B98 80317B98 3C0B8022 */ lui $t3, %hi(gMaxSimultaneousNotes) # $t3, 0x8022 -/* 0D2B9C 80317B9C 25EE000F */ addiu $t6, $t7, 0xf -/* 0D2BA0 80317BA0 2401FFF0 */ li $at, -16 -/* 0D2BA4 80317BA4 256B6B70 */ addiu $t3, %lo(gMaxSimultaneousNotes) # addiu $t3, $t3, 0x6b70 -/* 0D2BA8 80317BA8 254A6B74 */ addiu $t2, %lo(D_80226D74) # addiu $t2, $t2, 0x6b74 -/* 0D2BAC 80317BAC 01C1C824 */ and $t9, $t6, $at -/* 0D2BB0 80317BB0 AD590000 */ sw $t9, ($t2) -/* 0D2BB4 80317BB4 AD6C0000 */ sw $t4, ($t3) -/* 0D2BB8 80317BB8 91180005 */ lbu $t8, 5($t0) -/* 0D2BBC 80317BBC 3C098022 */ lui $t1, %hi(D_802212A2) # $t1, 0x8022 -/* 0D2BC0 80317BC0 25290EA2 */ addiu $t1, %lo(D_802212A2) # addiu $t1, $t1, 0xea2 -/* 0D2BC4 80317BC4 A1380000 */ sb $t8, ($t1) -/* 0D2BC8 80317BC8 812C0000 */ lb $t4, ($t1) -/* 0D2BCC 80317BCC 258DFFFF */ addiu $t5, $t4, -1 -/* 0D2BD0 80317BD0 2DA10010 */ sltiu $at, $t5, 0x10 -/* 0D2BD4 80317BD4 10200019 */ beqz $at, .L80317C3C -/* 0D2BD8 80317BD8 000D6880 */ sll $t5, $t5, 2 -/* 0D2BDC 80317BDC 3C018034 */ lui $at, %hi(jtbl_80337BE0) -/* 0D2BE0 80317BE0 002D0821 */ addu $at, $at, $t5 -/* 0D2BE4 80317BE4 8C2D8DC0 */ lw $t5, %lo(jtbl_80337BE0)($at) -/* 0D2BE8 80317BE8 01A00008 */ jr $t5 -/* 0D2BEC 80317BEC 00000000 */ nop -glabel L80317BF0 -/* 0D2BF0 80317BF0 3C018022 */ lui $at, %hi(D_802212A3) # $at, 0x8022 -/* 0D2BF4 80317BF4 10000013 */ b .L80317C44 -/* 0D2BF8 80317BF8 A0200EA3 */ sb $zero, %lo(D_802212A3)($at) -glabel L80317BFC -/* 0D2BFC 80317BFC 240F0001 */ li $t7, 1 -/* 0D2C00 80317C00 3C018022 */ lui $at, %hi(D_802212A3) # $at, 0x8022 -/* 0D2C04 80317C04 1000000F */ b .L80317C44 -/* 0D2C08 80317C08 A02F0EA3 */ sb $t7, %lo(D_802212A3)($at) -glabel L80317C0C -/* 0D2C0C 80317C0C 240E0002 */ li $t6, 2 -/* 0D2C10 80317C10 3C018022 */ lui $at, %hi(D_802212A3) # $at, 0x8022 -/* 0D2C14 80317C14 1000000B */ b .L80317C44 -/* 0D2C18 80317C18 A02E0EA3 */ sb $t6, %lo(D_802212A3)($at) -glabel L80317C1C -/* 0D2C1C 80317C1C 24190003 */ li $t9, 3 -/* 0D2C20 80317C20 3C018022 */ lui $at, %hi(D_802212A3) # $at, 0x8022 -/* 0D2C24 80317C24 10000007 */ b .L80317C44 -/* 0D2C28 80317C28 A0390EA3 */ sb $t9, %lo(D_802212A3)($at) -glabel L80317C2C -/* 0D2C2C 80317C2C 24180004 */ li $t8, 4 -/* 0D2C30 80317C30 3C018022 */ lui $at, %hi(D_802212A3) # $at, 0x8022 -/* 0D2C34 80317C34 10000003 */ b .L80317C44 -/* 0D2C38 80317C38 A0380EA3 */ sb $t8, %lo(D_802212A3)($at) -glabel L80317C3C -.L80317C3C: -/* 0D2C3C 80317C3C 3C018022 */ lui $at, %hi(D_802212A3) # $at, 0x8022 -/* 0D2C40 80317C40 A0200EA3 */ sb $zero, %lo(D_802212A3)($at) -.L80317C44: -/* 0D2C44 80317C44 910C0005 */ lbu $t4, 5($t0) -/* 0D2C48 80317C48 3C018022 */ lui $at, %hi(D_802212A0) # $at, 0x8022 -/* 0D2C4C 80317C4C 3C198033 */ lui $t9, %hi(gTatumsPerBeat) # $t9, 0x8033 -/* 0D2C50 80317C50 A12C0000 */ sb $t4, ($t1) -/* 0D2C54 80317C54 950D000A */ lhu $t5, 0xa($t0) -/* 0D2C58 80317C58 87394FF4 */ lh $t9, %lo(gTatumsPerBeat)($t9) -/* 0D2C5C 80317C5C 240C0001 */ li $t4, 1 -/* 0D2C60 80317C60 A42D0EA0 */ sh $t5, %lo(D_802212A0)($at) -/* 0D2C64 80317C64 8D420000 */ lw $v0, ($t2) -/* 0D2C68 80317C68 3C018022 */ lui $at, %hi(gMinAiBufferLength) # $at, 0x8022 -/* 0D2C6C 80317C6C 44998000 */ mtc1 $t9, $f16 -/* 0D2C70 80317C70 244FFFF0 */ addiu $t7, $v0, -0x10 -/* 0D2C74 80317C74 AC2F6B78 */ sw $t7, %lo(gMinAiBufferLength)($at) -/* 0D2C78 80317C78 240100A0 */ li $at, 160 -/* 0D2C7C 80317C7C 0041001A */ div $zero, $v0, $at -/* 0D2C80 80317C80 00001812 */ mflo $v1 -/* 0D2C84 80317C84 24630001 */ addiu $v1, $v1, 1 -/* 0D2C88 80317C88 00032E00 */ sll $a1, $v1, 0x18 -/* 0D2C8C 80317C8C 00057603 */ sra $t6, $a1, 0x18 -/* 0D2C90 80317C90 01C02825 */ move $a1, $t6 -/* 0D2C94 80317C94 44852000 */ mtc1 $a1, $f4 -/* 0D2C98 80317C98 3C018022 */ lui $at, %hi(gAudioUpdatesPerFrame) # $at, 0x8022 -/* 0D2C9C 80317C9C A0236B7E */ sb $v1, %lo(gAudioUpdatesPerFrame)($at) -/* 0D2CA0 80317CA0 468021A0 */ cvt.s.w $f6, $f4 -/* 0D2CA4 80317CA4 3C018034 */ lui $at, %hi(D_U_80338E00) # $at, 0x8034 -/* 0D2CA8 80317CA8 C4288E00 */ lwc1 $f8, %lo(D_U_80338E00)($at) -/* 0D2CAC 80317CAC 3C018034 */ lui $at, %hi(D_U_80338E04) # $at, 0x8034 -/* 0D2CB0 80317CB0 3C048022 */ lui $a0, %hi(D_80221898) # $a0, 0x8022 -/* 0D2CB4 80317CB4 468084A0 */ cvt.s.w $f18, $f16 -/* 0D2CB8 80317CB8 46083282 */ mul.s $f10, $f6, $f8 -/* 0D2CBC 80317CBC C4268E04 */ lwc1 $f6, %lo(D_U_80338E04)($at) -/* 0D2CC0 80317CC0 3C138022 */ lui $s3, %hi(D_80226D6C) # $s3, 0x8022 -/* 0D2CC4 80317CC4 26736B6C */ addiu $s3, %lo(D_80226D6C) # addiu $s3, $s3, 0x6b6c -/* 0D2CC8 80317CC8 24841498 */ addiu $a0, %lo(D_80221898) # addiu $a0, $a0, 0x1498 -/* 0D2CCC 80317CCC 46125103 */ div.s $f4, $f10, $f18 -/* 0D2CD0 80317CD0 46062203 */ div.s $f8, $f4, $f6 -/* 0D2CD4 80317CD4 4458F800 */ cfc1 $t8, $31 -/* 0D2CD8 80317CD8 44CCF800 */ ctc1 $t4, $31 -/* 0D2CDC 80317CDC 00000000 */ nop -/* 0D2CE0 80317CE0 46004424 */ cvt.w.s $f16, $f8 -/* 0D2CE4 80317CE4 444CF800 */ cfc1 $t4, $31 -/* 0D2CE8 80317CE8 00000000 */ nop -/* 0D2CEC 80317CEC 318C0078 */ andi $t4, $t4, 0x78 -/* 0D2CF0 80317CF0 11800012 */ beqz $t4, .L80317D3C -/* 0D2CF4 80317CF4 3C014F00 */ li $at, 0x4F000000 # 2147483648.000000 -/* 0D2CF8 80317CF8 44818000 */ mtc1 $at, $f16 -/* 0D2CFC 80317CFC 240C0001 */ li $t4, 1 -/* 0D2D00 80317D00 46104401 */ sub.s $f16, $f8, $f16 -/* 0D2D04 80317D04 44CCF800 */ ctc1 $t4, $31 -/* 0D2D08 80317D08 00000000 */ nop -/* 0D2D0C 80317D0C 46008424 */ cvt.w.s $f16, $f16 -/* 0D2D10 80317D10 444CF800 */ cfc1 $t4, $31 -/* 0D2D14 80317D14 00000000 */ nop -/* 0D2D18 80317D18 318C0078 */ andi $t4, $t4, 0x78 -/* 0D2D1C 80317D1C 15800005 */ bnez $t4, .L80317D34 -/* 0D2D20 80317D20 00000000 */ nop -/* 0D2D24 80317D24 440C8000 */ mfc1 $t4, $f16 -/* 0D2D28 80317D28 3C018000 */ lui $at, 0x8000 -/* 0D2D2C 80317D2C 10000007 */ b .L80317D4C -/* 0D2D30 80317D30 01816025 */ or $t4, $t4, $at -.L80317D34: -/* 0D2D34 80317D34 10000005 */ b .L80317D4C -/* 0D2D38 80317D38 240CFFFF */ li $t4, -1 -.L80317D3C: -/* 0D2D3C 80317D3C 440C8000 */ mfc1 $t4, $f16 -/* 0D2D40 80317D40 00000000 */ nop -/* 0D2D44 80317D44 0580FFFB */ bltz $t4, .L80317D34 -/* 0D2D48 80317D48 00000000 */ nop -.L80317D4C: -/* 0D2D4C 80317D4C 3C018022 */ lui $at, %hi(gTempoInternalToExternal) # $at, 0x8022 -/* 0D2D50 80317D50 A42C6B7C */ sh $t4, %lo(gTempoInternalToExternal)($at) -/* 0D2D54 80317D54 8D6D0000 */ lw $t5, ($t3) -/* 0D2D58 80317D58 44D8F800 */ ctc1 $t8, $31 -/* 0D2D5C 80317D5C 000D7880 */ sll $t7, $t5, 2 -/* 0D2D60 80317D60 01ED7821 */ addu $t7, $t7, $t5 -/* 0D2D64 80317D64 000F7880 */ sll $t7, $t7, 2 -/* 0D2D68 80317D68 01E50019 */ multu $t7, $a1 -/* 0D2D6C 80317D6C 00007012 */ mflo $t6 -/* 0D2D70 80317D70 25D90140 */ addiu $t9, $t6, 0x140 -/* 0D2D74 80317D74 AE790000 */ sw $t9, ($s3) -/* 0D2D78 80317D78 8D0C000C */ lw $t4, 0xc($t0) -/* 0D2D7C 80317D7C 8D180010 */ lw $t8, 0x10($t0) -/* 0D2D80 80317D80 8D0F0014 */ lw $t7, 0x14($t0) -/* 0D2D84 80317D84 8D0D0018 */ lw $t5, 0x18($t0) -/* 0D2D88 80317D88 3C0E8022 */ lui $t6, %hi(D_802212A8 + 8) # $t6, 0x8022 -/* 0D2D8C 80317D8C 8DCE0EB0 */ lw $t6, %lo(D_802212A8 + 8)($t6) -/* 0D2D90 80317D90 030C8021 */ addu $s0, $t8, $t4 -/* 0D2D94 80317D94 01AF8821 */ addu $s1, $t5, $t7 -/* 0D2D98 80317D98 02113021 */ addu $a2, $s0, $s1 -/* 0D2D9C 80317D9C 01C63823 */ subu $a3, $t6, $a2 -/* 0D2DA0 80317DA0 24E7FF00 */ addiu $a3, $a3, -0x100 -/* 0D2DA4 80317DA4 AC870000 */ sw $a3, ($a0) -/* 0D2DA8 80317DA8 0C0C5C61 */ jal func_80316164 -/* 0D2DAC 80317DAC AC86000C */ sw $a2, 0xc($a0) -/* 0D2DB0 80317DB0 3C048022 */ lui $a0, %hi(D_802218A8) # $a0, 0x8022 -/* 0D2DB4 80317DB4 248414A8 */ addiu $a0, %lo(D_802218A8) # addiu $a0, $a0, 0x14a8 -/* 0D2DB8 80317DB8 AC900000 */ sw $s0, ($a0) -/* 0D2DBC 80317DBC 0C0C5C80 */ jal func_803161E0 -/* 0D2DC0 80317DC0 AC910004 */ sw $s1, 4($a0) -/* 0D2DC4 80317DC4 8FA20038 */ lw $v0, 0x38($sp) -/* 0D2DC8 80317DC8 3C048022 */ lui $a0, %hi(D_802218B0) # $a0, 0x8022 -/* 0D2DCC 80317DCC 248414B0 */ addiu $a0, %lo(D_802218B0) # addiu $a0, $a0, 0x14b0 -/* 0D2DD0 80317DD0 8C59000C */ lw $t9, 0xc($v0) -/* 0D2DD4 80317DD4 AC990000 */ sw $t9, ($a0) -/* 0D2DD8 80317DD8 8C580010 */ lw $t8, 0x10($v0) -/* 0D2DDC 80317DDC AC800008 */ sw $zero, 8($a0) -/* 0D2DE0 80317DE0 0C0C5C9F */ jal func_8031625C -/* 0D2DE4 80317DE4 AC980004 */ sw $t8, 4($a0) -/* 0D2DE8 80317DE8 8FAC0038 */ lw $t4, 0x38($sp) -/* 0D2DEC 80317DEC 8FAF0038 */ lw $t7, 0x38($sp) -/* 0D2DF0 80317DF0 3C048022 */ lui $a0, %hi(D_802218C0) # $a0, 0x8022 -/* 0D2DF4 80317DF4 8D8D0014 */ lw $t5, 0x14($t4) -/* 0D2DF8 80317DF8 248414C0 */ addiu $a0, %lo(D_802218C0) # addiu $a0, $a0, 0x14c0 -/* 0D2DFC 80317DFC AC8D0000 */ sw $t5, ($a0) -/* 0D2E00 80317E00 8DEE0018 */ lw $t6, 0x18($t7) -/* 0D2E04 80317E04 AC800008 */ sw $zero, 8($a0) -/* 0D2E08 80317E08 0C0C5CCE */ jal func_80316318 -/* 0D2E0C 80317E0C AC8E0004 */ sw $t6, 4($a0) -/* 0D2E10 80317E10 0C0C5BA0 */ jal reset_bank_and_seq_load_status -/* 0D2E14 80317E14 00000000 */ nop -/* 0D2E18 80317E18 3C108022 */ lui $s0, %hi(gAudioCmdBuffers) # $s0, 0x8022 -/* 0D2E1C 80317E1C 3C128022 */ lui $s2, %hi(D_802212C8) # $s2, 0x8022 -/* 0D2E20 80317E20 3C118022 */ lui $s1, %hi(gAudioCmdBuffers + 8) # $s1, 0x8022 -/* 0D2E24 80317E24 26316B98 */ addiu $s1, %lo(gAudioCmdBuffers + 8) # addiu $s1, $s1, 0x6b98 -/* 0D2E28 80317E28 26520EC8 */ addiu $s2, %lo(D_802212C8) # addiu $s2, $s2, 0xec8 -/* 0D2E2C 80317E2C 26106B90 */ addiu $s0, %lo(gAudioCmdBuffers) # addiu $s0, $s0, 0x6b90 -.L80317E30: -/* 0D2E30 80317E30 8E650000 */ lw $a1, ($s3) -/* 0D2E34 80317E34 02402025 */ move $a0, $s2 -/* 0D2E38 80317E38 0005C8C0 */ sll $t9, $a1, 3 -/* 0D2E3C 80317E3C 0C0C5C10 */ jal soundAlloc -/* 0D2E40 80317E40 03202825 */ move $a1, $t9 -/* 0D2E44 80317E44 26100004 */ addiu $s0, $s0, 4 -/* 0D2E48 80317E48 1611FFF9 */ bne $s0, $s1, .L80317E30 -/* 0D2E4C 80317E4C AE02FFFC */ sw $v0, -4($s0) -/* 0D2E50 80317E50 3C058022 */ lui $a1, %hi(gMaxSimultaneousNotes) # $a1, 0x8022 -/* 0D2E54 80317E54 8CA56B70 */ lw $a1, %lo(gMaxSimultaneousNotes)($a1) -/* 0D2E58 80317E58 02402025 */ move $a0, $s2 -/* 0D2E5C 80317E5C 0005C080 */ sll $t8, $a1, 2 -/* 0D2E60 80317E60 0305C023 */ subu $t8, $t8, $a1 -/* 0D2E64 80317E64 0C0C5C10 */ jal soundAlloc -/* 0D2E68 80317E68 00182980 */ sll $a1, $t8, 6 -/* 0D2E6C 80317E6C 3C018022 */ lui $at, %hi(gNotes) # $at, 0x8022 -/* 0D2E70 80317E70 0C0C6B6B */ jal note_init_all -/* 0D2E74 80317E74 AC222610 */ sw $v0, %lo(gNotes)($at) -/* 0D2E78 80317E78 0C0C68AD */ jal init_note_free_list -/* 0D2E7C 80317E7C 00000000 */ nop -/* 0D2E80 80317E80 8FA2002C */ lw $v0, 0x2c($sp) -/* 0D2E84 80317E84 3C118022 */ lui $s1, %hi(D_802211B0) # $s1, 0x8022 -/* 0D2E88 80317E88 26310DB0 */ addiu $s1, %lo(D_802211B0) # addiu $s1, $s1, 0xdb0 -/* 0D2E8C 80317E8C 14400005 */ bnez $v0, .L80317EA4 -/* 0D2E90 80317E90 240C0008 */ li $t4, 8 -/* 0D2E94 80317E94 3C118022 */ lui $s1, %hi(D_802211B0) # $s1, 0x8022 -/* 0D2E98 80317E98 26310DB0 */ addiu $s1, %lo(D_802211B0) # addiu $s1, $s1, 0xdb0 -/* 0D2E9C 80317E9C 10000051 */ b .L80317FE4 -/* 0D2EA0 80317EA0 A2200001 */ sb $zero, 1($s1) -.L80317EA4: -/* 0D2EA4 80317EA4 00028040 */ sll $s0, $v0, 1 -/* 0D2EA8 80317EA8 A22C0001 */ sb $t4, 1($s1) -/* 0D2EAC 80317EAC 02002825 */ move $a1, $s0 -/* 0D2EB0 80317EB0 0C0C5C10 */ jal soundAlloc -/* 0D2EB4 80317EB4 02402025 */ move $a0, $s2 -/* 0D2EB8 80317EB8 AE220014 */ sw $v0, 0x14($s1) -/* 0D2EBC 80317EBC 02402025 */ move $a0, $s2 -/* 0D2EC0 80317EC0 0C0C5C10 */ jal soundAlloc -/* 0D2EC4 80317EC4 02002825 */ move $a1, $s0 -/* 0D2EC8 80317EC8 8FAD002C */ lw $t5, 0x2c($sp) -/* 0D2ECC 80317ECC 8FAF0038 */ lw $t7, 0x38($sp) -/* 0D2ED0 80317ED0 AE220018 */ sw $v0, 0x18($s1) -/* 0D2ED4 80317ED4 AE200008 */ sw $zero, 8($s1) -/* 0D2ED8 80317ED8 AE20000C */ sw $zero, 0xc($s1) -/* 0D2EDC 80317EDC A2200003 */ sb $zero, 3($s1) -/* 0D2EE0 80317EE0 AE2D0010 */ sw $t5, 0x10($s1) -/* 0D2EE4 80317EE4 95EE0008 */ lhu $t6, 8($t7) -/* 0D2EE8 80317EE8 24190002 */ li $t9, 2 -/* 0D2EEC 80317EEC A2390002 */ sb $t9, 2($s1) -/* 0D2EF0 80317EF0 3C038022 */ lui $v1, %hi(D_802212A2) # $v1, 0x8022 -/* 0D2EF4 80317EF4 A62E0004 */ sh $t6, 4($s1) -/* 0D2EF8 80317EF8 80630EA2 */ lb $v1, %lo(D_802212A2)($v1) -/* 0D2EFC 80317EFC 24010001 */ li $at, 1 -/* 0D2F00 80317F00 24180001 */ li $t8, 1 -/* 0D2F04 80317F04 10610037 */ beq $v1, $at, .L80317FE4 -/* 0D2F08 80317F08 340C8000 */ li $t4, 32768 -/* 0D2F0C 80317F0C 0183001A */ div $zero, $t4, $v1 -/* 0D2F10 80317F10 00006812 */ mflo $t5 -/* 0D2F14 80317F14 A2380000 */ sb $t8, ($s1) -/* 0D2F18 80317F18 14600002 */ bnez $v1, .L80317F24 -/* 0D2F1C 80317F1C 00000000 */ nop -/* 0D2F20 80317F20 0007000D */ break 7 -.L80317F24: -/* 0D2F24 80317F24 2401FFFF */ li $at, -1 -/* 0D2F28 80317F28 14610004 */ bne $v1, $at, .L80317F3C -/* 0D2F2C 80317F2C 3C018000 */ lui $at, 0x8000 -/* 0D2F30 80317F30 15810002 */ bne $t4, $at, .L80317F3C -/* 0D2F34 80317F34 00000000 */ nop -/* 0D2F38 80317F38 0006000D */ break 6 -.L80317F3C: -/* 0D2F3C 80317F3C A62D0006 */ sh $t5, 6($s1) -/* 0D2F40 80317F40 02402025 */ move $a0, $s2 -/* 0D2F44 80317F44 24050020 */ li $a1, 32 -/* 0D2F48 80317F48 0C0C5C10 */ jal soundAlloc -/* 0D2F4C 80317F4C 00008025 */ move $s0, $zero -/* 0D2F50 80317F50 AE22001C */ sw $v0, 0x1c($s1) -/* 0D2F54 80317F54 02402025 */ move $a0, $s2 -/* 0D2F58 80317F58 0C0C5C10 */ jal soundAlloc -/* 0D2F5C 80317F5C 24050020 */ li $a1, 32 -/* 0D2F60 80317F60 AE220020 */ sw $v0, 0x20($s1) -/* 0D2F64 80317F64 02402025 */ move $a0, $s2 -/* 0D2F68 80317F68 0C0C5C10 */ jal soundAlloc -/* 0D2F6C 80317F6C 24050020 */ li $a1, 32 -/* 0D2F70 80317F70 AE220024 */ sw $v0, 0x24($s1) -/* 0D2F74 80317F74 02402025 */ move $a0, $s2 -/* 0D2F78 80317F78 0C0C5C10 */ jal soundAlloc -/* 0D2F7C 80317F7C 24050020 */ li $a1, 32 -/* 0D2F80 80317F80 AE220028 */ sw $v0, 0x28($s1) -/* 0D2F84 80317F84 3C0F8022 */ lui $t7, %hi(gAudioUpdatesPerFrame) # $t7, 0x8022 -/* 0D2F88 80317F88 81EF6B7E */ lb $t7, %lo(gAudioUpdatesPerFrame)($t7) -/* 0D2F8C 80317F8C 3C118022 */ lui $s1, %hi(D_802211B0) # $s1, 0x8022 -/* 0D2F90 80317F90 26310DB0 */ addiu $s1, %lo(D_802211B0) # addiu $s1, $s1, 0xdb0 -/* 0D2F94 80317F94 19E00013 */ blez $t7, .L80317FE4 -/* 0D2F98 80317F98 02402025 */ move $a0, $s2 -.L80317F9C: -/* 0D2F9C 80317F9C 0C0C5C10 */ jal soundAlloc -/* 0D2FA0 80317FA0 24050280 */ li $a1, 640 -/* 0D2FA4 80317FA4 244E0140 */ addiu $t6, $v0, 0x140 -/* 0D2FA8 80317FA8 AE220030 */ sw $v0, 0x30($s1) -/* 0D2FAC 80317FAC AE2E0034 */ sw $t6, 0x34($s1) -/* 0D2FB0 80317FB0 02402025 */ move $a0, $s2 -/* 0D2FB4 80317FB4 0C0C5C10 */ jal soundAlloc -/* 0D2FB8 80317FB8 24050280 */ li $a1, 640 -/* 0D2FBC 80317FBC 24590140 */ addiu $t9, $v0, 0x140 -/* 0D2FC0 80317FC0 3C188022 */ lui $t8, %hi(gAudioUpdatesPerFrame) # $t8, 0x8022 -/* 0D2FC4 80317FC4 AE220080 */ sw $v0, 0x80($s1) -/* 0D2FC8 80317FC8 AE390084 */ sw $t9, 0x84($s1) -/* 0D2FCC 80317FCC 83186B7E */ lb $t8, %lo(gAudioUpdatesPerFrame)($t8) -/* 0D2FD0 80317FD0 26100001 */ addiu $s0, $s0, 1 -/* 0D2FD4 80317FD4 26310014 */ addiu $s1, $s1, 0x14 -/* 0D2FD8 80317FD8 0218082A */ slt $at, $s0, $t8 -/* 0D2FDC 80317FDC 5420FFEF */ bnezl $at, .L80317F9C -/* 0D2FE0 80317FE0 02402025 */ move $a0, $s2 -.L80317FE4: -/* 0D2FE4 80317FE4 3C048022 */ lui $a0, %hi(gMaxSimultaneousNotes) # $a0, 0x8022 -/* 0D2FE8 80317FE8 0C0C618D */ jal func_8031758C -/* 0D2FEC 80317FEC 8C846B70 */ lw $a0, %lo(gMaxSimultaneousNotes)($a0) -/* 0D2FF0 80317FF0 0C0C8BD0 */ jal osWritebackDCacheAll -/* 0D2FF4 80317FF4 00000000 */ nop -/* 0D2FF8 80317FF8 3C0C8033 */ lui $t4, %hi(gAudioLoadLock) # $t4, 0x8033 -/* 0D2FFC 80317FFC 258C5004 */ addiu $t4, %lo(gAudioLoadLock) # addiu $t4, $t4, 0x5004 -/* 0D3000 80318000 8D8D0000 */ lw $t5, ($t4) -/* 0D3004 80318004 3C0F7655 */ lui $t7, (0x76557364 >> 16) # lui $t7, 0x7655 -/* 0D3008 80318008 35EF7364 */ ori $t7, (0x76557364 & 0xFFFF) # ori $t7, $t7, 0x7364 -/* 0D300C 8031800C 51A00003 */ beql $t5, $zero, .L8031801C -/* 0D3010 80318010 8FBF0024 */ lw $ra, 0x24($sp) -/* 0D3014 80318014 AD8F0000 */ sw $t7, ($t4) -/* 0D3018 80318018 8FBF0024 */ lw $ra, 0x24($sp) -.L8031801C: -/* 0D301C 8031801C 8FB00014 */ lw $s0, 0x14($sp) -/* 0D3020 80318020 8FB10018 */ lw $s1, 0x18($sp) -/* 0D3024 80318024 8FB2001C */ lw $s2, 0x1c($sp) -/* 0D3028 80318028 8FB30020 */ lw $s3, 0x20($sp) -/* 0D302C 8031802C 03E00008 */ jr $ra -/* 0D3030 80318030 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/asm/non_matchings/func_802AF808_eu.s b/asm/non_matchings/handle_dialog_text_and_pages_eu.s similarity index 92% rename from asm/non_matchings/func_802AF808_eu.s rename to asm/non_matchings/handle_dialog_text_and_pages_eu.s index b8bcb22..bc3fed0 100644 --- a/asm/non_matchings/func_802AF808_eu.s +++ b/asm/non_matchings/handle_dialog_text_and_pages_eu.s @@ -34,7 +34,7 @@ glabel jtbl_80305A60 .word L_EU_802AFBD0, L_EU_802AFACC, L_EU_802AFACC .text -glabel func_802D8980 # EU: func_802AF808 +glabel handle_dialog_text_and_pages # EU: func_802AF808 /* 06F008 802AF808 27BDFF90 */ addiu $sp, $sp, -0x70 /* 06F00C 802AF80C AFB50034 */ sw $s5, 0x34($sp) /* 06F010 802AF810 0006AE00 */ sll $s5, $a2, 0x18 @@ -82,11 +82,11 @@ glabel func_802D8980 # EU: func_802AF808 /* 06F0B0 802AF8B0 ACCB0000 */ sw $t3, ($a2) /* 06F0B4 802AF8B4 3C0C0600 */ lui $t4, 0x600 /* 06F0B8 802AF8B8 3C128033 */ lui $s2, %hi(gDialogX) # $s2, 0x8033 -/* 06F0BC 802AF8BC 3C178030 */ lui $s7, %hi(D_8033042C) # $s7, 0x8030 +/* 06F0BC 802AF8BC 3C178030 */ lui $s7, %hi(gDialogTextPos) # $s7, 0x8030 /* 06F0C0 802AF8C0 AC6C0000 */ sw $t4, ($v1) /* 06F0C4 802AF8C4 AC6D0004 */ sw $t5, 4($v1) /* 06F0C8 802AF8C8 2652F69A */ addiu $s2, %lo(gDialogX) # addiu $s2, $s2, -0x966 -/* 06F0CC 802AF8CC 86F7D64C */ lh $s7, %lo(D_8033042C)($s7) +/* 06F0CC 802AF8CC 86F7D64C */ lh $s7, %lo(gDialogTextPos)($s7) /* 06F0D0 802AF8D0 A6400000 */ sh $zero, ($s2) /* 06F0D4 802AF8D4 240E000E */ li $t6, 14 /* 06F0D8 802AF8D8 3C018033 */ lui $at, %hi(gDialogY) # $at, 0x8033 @@ -111,7 +111,7 @@ glabel func_802D8980 # EU: func_802AF808 /* 06F11C 802AF91C 00132E00 */ sll $a1, $s3, 0x18 /* 06F120 802AF920 00055E03 */ sra $t3, $a1, 0x18 /* 06F124 802AF924 01602825 */ move $a1, $t3 -/* 06F128 802AF928 0C0ABBFE */ jal func_802D8450 # func_802AEFF8 +/* 06F128 802AF928 0C0ABBFE */ jal change_and_flash_dialog_text_color_lines # func_802AEFF8 /* 06F12C 802AF92C 83A40073 */ lb $a0, 0x73($sp) /* 06F130 802AF930 8FAC0060 */ lw $t4, 0x60($sp) /* 06F134 802AF934 02EC6821 */ addu $t5, $s7, $t4 @@ -151,7 +151,7 @@ glabel L_EU_802AF99C /* 06F1B0 802AF9B0 01402025 */ move $a0, $t2 /* 06F1B4 802AF9B4 83A5005E */ lb $a1, 0x5e($sp) /* 06F1B8 802AF9B8 27A6005D */ addiu $a2, $sp, 0x5d -/* 06F1BC 802AF9BC 0C0ABD0B */ jal func_802D8690 # func_802AF42C +/* 06F1BC 802AF9BC 0C0ABD0B */ jal handle_dialog_scroll_page_state # func_802AF42C /* 06F1C0 802AF9C0 27A7005B */ addiu $a3, $sp, 0x5b /* 06F1C4 802AF9C4 10000091 */ b .L802AFC0C /* 06F1C8 802AF9C8 A6400000 */ sh $zero, ($s2) @@ -160,7 +160,7 @@ glabel L_EU_802AF9CC /* 06F1D0 802AF9D0 30CB000F */ andi $t3, $a2, 0xf /* 06F1D4 802AF9D4 01603025 */ move $a2, $t3 /* 06F1D8 802AF9D8 02202025 */ move $a0, $s1 -/* 06F1DC 802AF9DC 0C0ABDB5 */ jal func_eu_802AF6D4 +/* 06F1DC 802AF9DC 0C0ABDB5 */ jal render_dialog_lowercase_diacritic /* 06F1E0 802AF9E0 24050024 */ li $a1, 36 /* 06F1E4 802AF9E4 1000008A */ b .L802AFC10 /* 06F1E8 802AF9E8 83A9005D */ lb $t1, 0x5d($sp) @@ -169,7 +169,7 @@ glabel L_EU_802AF9EC /* 06F1F0 802AF9F0 30CC000F */ andi $t4, $a2, 0xf /* 06F1F4 802AF9F4 01803025 */ move $a2, $t4 /* 06F1F8 802AF9F8 02202025 */ move $a0, $s1 -/* 06F1FC 802AF9FC 0C0ABDD6 */ jal func_eu_802AF758 +/* 06F1FC 802AF9FC 0C0ABDD6 */ jal render_dialog_uppercase_diacritic /* 06F200 802AFA00 2405000A */ li $a1, 10 /* 06F204 802AFA04 10000082 */ b .L802AFC10 /* 06F208 802AFA08 83A9005D */ lb $t1, 0x5d($sp) @@ -178,7 +178,7 @@ glabel L_EU_802AFA0C /* 06F210 802AFA10 30CD000F */ andi $t5, $a2, 0xf /* 06F214 802AFA14 01A03025 */ move $a2, $t5 /* 06F218 802AFA18 02202025 */ move $a0, $s1 -/* 06F21C 802AFA1C 0C0ABDB5 */ jal func_eu_802AF6D4 +/* 06F21C 802AFA1C 0C0ABDB5 */ jal render_dialog_lowercase_diacritic /* 06F220 802AFA20 24050028 */ li $a1, 40 /* 06F224 802AFA24 1000007A */ b .L802AFC10 /* 06F228 802AFA28 83A9005D */ lb $t1, 0x5d($sp) @@ -187,7 +187,7 @@ glabel L_EU_802AFA2C /* 06F230 802AFA30 30CE000F */ andi $t6, $a2, 0xf /* 06F234 802AFA34 01C03025 */ move $a2, $t6 /* 06F238 802AFA38 02202025 */ move $a0, $s1 -/* 06F23C 802AFA3C 0C0ABDD6 */ jal func_eu_802AF758 +/* 06F23C 802AFA3C 0C0ABDD6 */ jal render_dialog_uppercase_diacritic /* 06F240 802AFA40 2405000E */ li $a1, 14 /* 06F244 802AFA44 10000072 */ b .L802AFC10 /* 06F248 802AFA48 83A9005D */ lb $t1, 0x5d($sp) @@ -196,7 +196,7 @@ glabel L_EU_802AFA4C /* 06F250 802AFA50 30CF000F */ andi $t7, $a2, 0xf /* 06F254 802AFA54 01E03025 */ move $a2, $t7 /* 06F258 802AFA58 02202025 */ move $a0, $s1 -/* 06F25C 802AFA5C 0C0ABDB5 */ jal func_eu_802AF6D4 +/* 06F25C 802AFA5C 0C0ABDB5 */ jal render_dialog_lowercase_diacritic /* 06F260 802AFA60 24050038 */ li $a1, 56 /* 06F264 802AFA64 1000006A */ b .L802AFC10 /* 06F268 802AFA68 83A9005D */ lb $t1, 0x5d($sp) @@ -205,7 +205,7 @@ glabel L_EU_802AFA6C /* 06F270 802AFA70 30D8000F */ andi $t8, $a2, 0xf /* 06F274 802AFA74 03003025 */ move $a2, $t8 /* 06F278 802AFA78 02202025 */ move $a0, $s1 -/* 06F27C 802AFA7C 0C0ABDD6 */ jal func_eu_802AF758 +/* 06F27C 802AFA7C 0C0ABDD6 */ jal render_dialog_uppercase_diacritic /* 06F280 802AFA80 2405001E */ li $a1, 30 /* 06F284 802AFA84 10000062 */ b .L802AFC10 /* 06F288 802AFA88 83A9005D */ lb $t1, 0x5d($sp) @@ -214,7 +214,7 @@ glabel L_EU_802AFA8C /* 06F290 802AFA90 30D9000F */ andi $t9, $a2, 0xf /* 06F294 802AFA94 03203025 */ move $a2, $t9 /* 06F298 802AFA98 02202025 */ move $a0, $s1 -/* 06F29C 802AFA9C 0C0ABDB5 */ jal func_eu_802AF6D4 +/* 06F29C 802AFA9C 0C0ABDB5 */ jal render_dialog_lowercase_diacritic /* 06F2A0 802AFAA0 24050032 */ li $a1, 50 /* 06F2A4 802AFAA4 1000005A */ b .L802AFC10 /* 06F2A8 802AFAA8 83A9005D */ lb $t1, 0x5d($sp) @@ -223,7 +223,7 @@ glabel L_EU_802AFAAC /* 06F2B0 802AFAB0 30C9000F */ andi $t1, $a2, 0xf /* 06F2B4 802AFAB4 01203025 */ move $a2, $t1 /* 06F2B8 802AFAB8 02202025 */ move $a0, $s1 -/* 06F2BC 802AFABC 0C0ABDD6 */ jal func_eu_802AF758 +/* 06F2BC 802AFABC 0C0ABDD6 */ jal render_dialog_uppercase_diacritic /* 06F2C0 802AFAC0 24050018 */ li $a1, 24 /* 06F2C4 802AFAC4 10000052 */ b .L802AFC10 /* 06F2C8 802AFAC8 83A9005D */ lb $t1, 0x5d($sp) @@ -232,7 +232,7 @@ glabel L_EU_802AFACC /* 06F2D0 802AFAD0 30CA000F */ andi $t2, $a2, 0xf /* 06F2D4 802AFAD4 01403025 */ move $a2, $t2 /* 06F2D8 802AFAD8 02202025 */ move $a0, $s1 -/* 06F2DC 802AFADC 0C0ABDB5 */ jal func_eu_802AF6D4 +/* 06F2DC 802AFADC 0C0ABDB5 */ jal render_dialog_lowercase_diacritic /* 06F2E0 802AFAE0 240500EB */ li $a1, 235 /* 06F2E4 802AFAE4 1000004A */ b .L802AFC10 /* 06F2E8 802AFAE8 83A9005D */ lb $t1, 0x5d($sp) @@ -259,7 +259,7 @@ glabel L_EU_802AFB18 /* 06F330 802AFB30 00002025 */ move $a0, $zero /* 06F334 802AFB34 83A7005B */ lb $a3, 0x5b($sp) /* 06F338 802AFB38 AFB50010 */ sw $s5, 0x10($sp) -/* 06F33C 802AFB3C 0C0ABD64 */ jal func_eu_802AF590 +/* 06F33C 802AFB3C 0C0ABD64 */ jal render_multi_text_string_lines /* 06F340 802AFB40 AFB10014 */ sw $s1, 0x14($sp) /* 06F344 802AFB44 240B0001 */ li $t3, 1 /* 06F348 802AFB48 10000030 */ b .L802AFC0C @@ -274,14 +274,14 @@ glabel L_EU_802AFB50 /* 06F368 802AFB68 24040001 */ li $a0, 1 /* 06F36C 802AFB6C 83A7005B */ lb $a3, 0x5b($sp) /* 06F370 802AFB70 AFB50010 */ sw $s5, 0x10($sp) -/* 06F374 802AFB74 0C0ABD64 */ jal func_eu_802AF590 +/* 06F374 802AFB74 0C0ABD64 */ jal render_multi_text_string_lines /* 06F378 802AFB78 AFB10014 */ sw $s1, 0x14($sp) /* 06F37C 802AFB7C 240F0001 */ li $t7, 1 /* 06F380 802AFB80 10000022 */ b .L802AFC0C /* 06F384 802AFB84 A3AF005B */ sb $t7, 0x5b($sp) glabel L_EU_802AFB88 /* 06F388 802AFB88 02202025 */ move $a0, $s1 -/* 06F38C 802AFB8C 0C0ABD1E */ jal func_eu_802AF478 +/* 06F38C 802AFB8C 0C0ABD1E */ jal render_star_count_dialog_text /* 06F390 802AFB90 27A5005B */ addiu $a1, $sp, 0x5b /* 06F394 802AFB94 1000001E */ b .L802AFC10 /* 06F398 802AFB98 83A9005D */ lb $t1, 0x5d($sp) @@ -292,7 +292,7 @@ glabel L_EU_802AFB9C /* 06F3A8 802AFBA8 24C60008 */ addiu $a2, $a2, 8 /* 06F3AC 802AFBAC 00067400 */ sll $t6, $a2, 0x10 /* 06F3B0 802AFBB0 000E3403 */ sra $a2, $t6, 0x10 -/* 06F3B4 802AFBB4 0C0ABC6E */ jal func_eu_802AF1B8 +/* 06F3B4 802AFBB4 0C0ABC6E */ jal render_generic_dialog_char_at_pos /* 06F3B8 802AFBB8 240700F6 */ li $a3, 246 /* 06F3BC 802AFBBC 86590000 */ lh $t9, ($s2) /* 06F3C0 802AFBC0 928900F6 */ lbu $t1, 0xf6($s4) @@ -309,7 +309,7 @@ glabel L_EU_802AFBD0 /* 06F3E4 802AFBE4 02202025 */ move $a0, $s1 /* 06F3E8 802AFBE8 86450000 */ lh $a1, ($s2) /* 06F3EC 802AFBEC 87C60000 */ lh $a2, ($fp) -/* 06F3F0 802AFBF0 0C0ABC6E */ jal func_eu_802AF1B8 +/* 06F3F0 802AFBF0 0C0ABC6E */ jal render_generic_dialog_char_at_pos /* 06F3F4 802AFBF4 320700FF */ andi $a3, $s0, 0xff .L802AFBF8: /* 06F3F8 802AFBF8 02906821 */ addu $t5, $s4, $s0 @@ -344,7 +344,7 @@ glabel L_EU_802AFBD0 /* 06F460 802AFC60 55810009 */ bnel $t4, $at, .L802AFC88 /* 06F464 802AFC64 8FBF0044 */ lw $ra, 0x44($sp) /* 06F468 802AFC68 15E70005 */ bne $t7, $a3, .L802AFC80 -/* 06F46C 802AFC6C 3C018030 */ lui $at, 0x8030 +/* 06F46C 802AFC6C 3C018030 */ lui $at, %hi(gLastDialogPageStrPos) /* 06F470 802AFC70 240EFFFF */ li $t6, -1 /* 06F474 802AFC74 3C018030 */ lui $at, %hi(gLastDialogPageStrPos) # $at, 0x8030 /* 06F478 802AFC78 10000002 */ b .L802AFC84 diff --git a/assets.json b/assets.json index fc96a8f..c8d535b 100644 --- a/assets.json +++ b/assets.json @@ -357,12 +357,12 @@ "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.ia16.png": [32,32,2048,{"jp":[1125200,160912],"us":[1132368,160912],"eu":[1004336,160912]}], -"actors/sparkle/sparkle_1.ia16.png": [32,32,2048,{"jp":[1125200,162960],"us":[1132368,162960],"eu":[1004336,162960]}], -"actors/sparkle/sparkle_2.ia16.png": [32,32,2048,{"jp":[1125200,165008],"us":[1132368,165008],"eu":[1004336,165008]}], -"actors/sparkle/sparkle_3.ia16.png": [32,32,2048,{"jp":[1125200,167056],"us":[1132368,167056],"eu":[1004336,167056]}], -"actors/sparkle/sparkle_4.ia16.png": [32,32,2048,{"jp":[1125200,169104],"us":[1132368,169104],"eu":[1004336,169104]}], -"actors/sparkle/sparkle_5.ia16.png": [32,32,2048,{"jp":[1125200,171152],"us":[1132368,171152],"eu":[1004336,171152]}], +"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]}], @@ -427,14 +427,14 @@ "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.ia16.png": [32,64,4096,{"jp":[1125200,173512],"us":[1132368,173512],"eu":[1004336,173512]}], -"actors/water_splash/water_splash_1.ia16.png": [32,64,4096,{"jp":[1125200,177608],"us":[1132368,177608],"eu":[1004336,177608]}], -"actors/water_splash/water_splash_2.ia16.png": [32,64,4096,{"jp":[1125200,181704],"us":[1132368,181704],"eu":[1004336,181704]}], -"actors/water_splash/water_splash_3.ia16.png": [32,64,4096,{"jp":[1125200,185800],"us":[1132368,185800],"eu":[1004336,185800]}], -"actors/water_splash/water_splash_4.ia16.png": [32,64,4096,{"jp":[1125200,189896],"us":[1132368,189896],"eu":[1004336,189896]}], -"actors/water_splash/water_splash_5.ia16.png": [32,64,4096,{"jp":[1125200,193992],"us":[1132368,193992],"eu":[1004336,193992]}], -"actors/water_splash/water_splash_6.ia16.png": [32,64,4096,{"jp":[1125200,198088],"us":[1132368,198088],"eu":[1004336,198088]}], -"actors/water_splash/water_splash_7.ia16.png": [32,64,4096,{"jp":[1125200,202184],"us":[1132368,202184],"eu":[1004336,202184]}], +"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_waves/water_waves_0.ia16.png": [32,32,2048,{"jp":[1125200,152408],"us":[1132368,152408],"eu":[1004336,152408]}], "actors/water_waves/water_waves_1.ia16.png": [32,32,2048,{"jp":[1125200,154456],"us":[1132368,154456],"eu":[1004336,154456]}], "actors/water_waves/water_waves_2.ia16.png": [32,32,2048,{"jp":[1125200,156504],"us":[1132368,156504],"eu":[1004336,156504]}], diff --git a/assets/demo_data.s b/assets/demo_data.s index a71cd24..dcc2c60 100644 --- a/assets/demo_data.s +++ b/assets/demo_data.s @@ -3,25 +3,27 @@ .section .data .macro demo name -.word (\name - gDemoInputs), (\name\()_end - \name) + .word32 (\name - gDemoInputs) + .word32 (\name\()_end - \name) .endm # Whomp's Fortress has the wrong size. The original entries probably manually # input the sizes, but we opt for macros for cleanliness. .macro demo2 name -.word (\name - gDemoInputs), ((\name\()_end + 0x170) - \name) + .word32 (\name - gDemoInputs) + .word32 ((\name\()_end + 0x170) - \name) .endm .macro demofile name -\name: -.incbin "assets/demos/\name\().bin" -\name\()_end: + \name: + .incbin "assets/demos/\name\().bin" + \name\()_end: .endm glabel gDemoInputs -.word (demo_entry_end - demo_entry_start) / 8 # number of entries +.word32 (demo_entry_end - demo_entry_start) / 8 # number of entries +.word 0 -.align 3, 0x00 demo_entry_start: .ifdef VERSION_US demo bitdw # Bowser in the Dark World diff --git a/assets/mario_anim_data.s b/assets/mario_anim_data.s index 9e23453..1c22fd2 100644 --- a/assets/mario_anim_data.s +++ b/assets/mario_anim_data.s @@ -1,6 +1,6 @@ .include "macros.inc" -.data +.section .data .macro anim_file name .balign 4, 0 @@ -8,19 +8,20 @@ .endm .macro anim_entry name - .word (\name - gMarioAnims), (\name\()_end - \name) + .word32 (\name - gMarioAnims) + .word32 (\name\()_end - \name) .endm .macro anim_header name, flags, unk02, unk04, unk06, length, numnodes \name: .hword \flags, \unk02, \unk04, \unk06, \length, \numnodes - .word \name\()_values - \name - .word \name\()_indices - \name - .word \name\()_end - \name + .word32 \name\()_values - \name + .word32 \name\()_indices - \name + .word32 \name\()_end - \name .endm glabel gMarioAnims -.word (anim_table_end - anim_table_start) / 8 # number of entries +.word32 (anim_table_end - anim_table_start) / 8 # number of entries .word 0 anim_table_start: diff --git a/bin/effect.s b/bin/effect.s index d3a4062..7633d78 100644 --- a/bin/effect.s +++ b/bin/effect.s @@ -78,7 +78,7 @@ glabel bubble_ptr_0B006848 # 0x0B006848 effect_0B00684C: # 0x0B00684C .incbin "textures/effect/tiny_bubble.0684C.rgba16" -.word 0 # align? +.balign 16 glabel tiny_bubble_dl_0B006A50 # 0x0B006A50 - 0x0B006AB0 gsDPPipeSync gsSPClearGeometryMode G_LIGHTING | G_CULL_BACK | G_SHADING_SMOOTH diff --git a/bin/segment2.s b/bin/segment2.s index fbc0f82..c1d4913 100644 --- a/bin/segment2.s +++ b/bin/segment2.s @@ -3,179 +3,179 @@ .include "macros.inc" .include "PR/gbi.inc" -texture_colorful_num_0: +texture_hud_char_0: .incbin "textures/segment2/segment2.00000.rgba16" -texture_colorful_num_1: +texture_hud_char_1: .incbin "textures/segment2/segment2.00200.rgba16" -texture_colorful_num_2: +texture_hud_char_2: .incbin "textures/segment2/segment2.00400.rgba16" -texture_colorful_num_3: +texture_hud_char_3: .incbin "textures/segment2/segment2.00600.rgba16" -texture_colorful_num_4: +texture_hud_char_4: .incbin "textures/segment2/segment2.00800.rgba16" -texture_colorful_num_5: +texture_hud_char_5: .incbin "textures/segment2/segment2.00A00.rgba16" -texture_colorful_num_6: +texture_hud_char_6: .incbin "textures/segment2/segment2.00C00.rgba16" -texture_colorful_num_7: +texture_hud_char_7: .incbin "textures/segment2/segment2.00E00.rgba16" -texture_colorful_num_8: +texture_hud_char_8: .incbin "textures/segment2/segment2.01000.rgba16" -texture_colorful_num_9: +texture_hud_char_9: .incbin "textures/segment2/segment2.01200.rgba16" -texture_colorful_char_A: +texture_hud_char_A: .incbin "textures/segment2/segment2.01400.rgba16" -texture_colorful_char_B: +texture_hud_char_B: .incbin "textures/segment2/segment2.01600.rgba16" -texture_colorful_char_C: +texture_hud_char_C: .incbin "textures/segment2/segment2.01800.rgba16" -texture_colorful_char_D: +texture_hud_char_D: .incbin "textures/segment2/segment2.01A00.rgba16" -texture_colorful_char_E: +texture_hud_char_E: .incbin "textures/segment2/segment2.01C00.rgba16" -texture_colorful_char_F: +texture_hud_char_F: .incbin "textures/segment2/segment2.01E00.rgba16" -texture_colorful_char_G: +texture_hud_char_G: .incbin "textures/segment2/segment2.02000.rgba16" -texture_colorful_char_H: +texture_hud_char_H: .incbin "textures/segment2/segment2.02200.rgba16" -texture_colorful_char_I: +texture_hud_char_I: .incbin "textures/segment2/segment2.02400.rgba16" .ifdef VERSION_JP -texture_colorful_char_J: +texture_hud_char_J: .incbin "textures/segment2/segment2.02600.rgba16" .endif -texture_colorful_char_K: +texture_hud_char_K: .incbin "textures/segment2/segment2.02800.rgba16" -texture_colorful_char_L: +texture_hud_char_L: .incbin "textures/segment2/segment2.02A00.rgba16" -texture_colorful_char_M: +texture_hud_char_M: .incbin "textures/segment2/segment2.02C00.rgba16" -texture_colorful_char_N: +texture_hud_char_N: .incbin "textures/segment2/segment2.02E00.rgba16" -texture_colorful_char_O: +texture_hud_char_O: .incbin "textures/segment2/segment2.03000.rgba16" -texture_colorful_char_P: +texture_hud_char_P: .incbin "textures/segment2/segment2.03200.rgba16" .ifdef VERSION_JP -texture_colorful_char_Q: +texture_hud_char_Q: .incbin "textures/segment2/segment2.03400.rgba16" .endif -texture_colorful_char_R: +texture_hud_char_R: .incbin "textures/segment2/segment2.03600.rgba16" -texture_colorful_char_S: +texture_hud_char_S: .incbin "textures/segment2/segment2.03800.rgba16" -texture_colorful_char_T: +texture_hud_char_T: .incbin "textures/segment2/segment2.03A00.rgba16" -texture_colorful_char_U: +texture_hud_char_U: .incbin "textures/segment2/segment2.03C00.rgba16" .if VERSION_JP == 1 || VERSION_EU == 1 -texture_colorful_char_V: +texture_hud_char_V: .incbin "textures/segment2/segment2.03E00.rgba16" .endif -texture_colorful_char_W: +texture_hud_char_W: .incbin "textures/segment2/segment2.04000.rgba16" .ifdef VERSION_JP -texture_colorful_char_X: +texture_hud_char_X: .incbin "textures/segment2/segment2.04200.rgba16" .endif -texture_colorful_char_Y: +texture_hud_char_Y: .incbin "textures/segment2/segment2.04400.rgba16" .if VERSION_JP == 1 || VERSION_EU == 1 -texture_colorful_char_Z: +texture_hud_char_Z: .incbin "textures/segment2/segment2.04600.rgba16" .endif -texture_colorful_char_apostrophe: +texture_hud_char_apostrophe: .incbin "textures/segment2/segment2.04800.rgba16" -texture_colorful_char_double_quote: +texture_hud_char_double_quote: .incbin "textures/segment2/segment2.04A00.rgba16" .ifdef VERSION_EU -texture_colorful_char_umlaut: +texture_hud_char_umlaut: .incbin "textures/segment2/segment2.umlaut.rgba16" # EU ¨ .endif .ifdef VERSION_JP -texture_colorful_char_exclamation: +texture_hud_char_exclamation: .incbin "textures/segment2/segment2.04C00.rgba16" # JP ! .endif .ifdef VERSION_JP -texture_colorful_char_double_exclamation: +texture_hud_char_double_exclamation: .incbin "textures/segment2/segment2.04E00.rgba16" # JP !! .endif .ifdef VERSION_JP -texture_colorful_char_question: +texture_hud_char_question: .incbin "textures/segment2/segment2.05000.rgba16" # JP ? .endif .ifdef VERSION_JP -texture_colorful_char_ampersand: +texture_hud_char_ampersand: .incbin "textures/segment2/segment2.05200.rgba16" # JP & .endif .ifdef VERSION_JP -texture_colorful_char_percent: +texture_hud_char_percent: .incbin "textures/segment2/segment2.05400.rgba16" # JP % .endif -texture_colorful_char_multiply: +texture_hud_char_multiply: .incbin "textures/segment2/segment2.05600.rgba16" -texture_colorful_char_coin: +texture_hud_char_coin: .incbin "textures/segment2/segment2.05800.rgba16" -texture_colorful_char_mario_head: +texture_hud_char_mario_head: .incbin "textures/segment2/segment2.05A00.rgba16" -texture_colorful_char_star: +texture_hud_char_star: .incbin "textures/segment2/segment2.05C00.rgba16" .ifdef VERSION_JP -texture_colorful_char_decimal_point: +texture_hud_char_decimal_point: .incbin "textures/segment2/segment2.05E00.rgba16" .endif .ifdef VERSION_JP -texture_colorful_char_beta_key: +texture_hud_char_beta_key: .incbin "textures/segment2/segment2.06000.rgba16" .endif @@ -270,1244 +270,1244 @@ texture_credits_char_period: .incbin "textures/segment2/segment2.07080.rgba16" .ifdef VERSION_JP # JP Small Font -texture_dialog_jp_0: +texture_font_char_jp_0: .incbin "textures/segment2/segment2.07100.ia1" -texture_dialog_jp_1: +texture_font_char_jp_1: .incbin "textures/segment2/segment2.07110.ia1" -texture_dialog_jp_2: +texture_font_char_jp_2: .incbin "textures/segment2/segment2.07120.ia1" -texture_dialog_jp_3: +texture_font_char_jp_3: .incbin "textures/segment2/segment2.07130.ia1" -texture_dialog_jp_4: +texture_font_char_jp_4: .incbin "textures/segment2/segment2.07140.ia1" -texture_dialog_jp_5: +texture_font_char_jp_5: .incbin "textures/segment2/segment2.07150.ia1" -texture_dialog_jp_6: +texture_font_char_jp_6: .incbin "textures/segment2/segment2.07160.ia1" -texture_dialog_jp_7: +texture_font_char_jp_7: .incbin "textures/segment2/segment2.07170.ia1" -texture_dialog_jp_8: +texture_font_char_jp_8: .incbin "textures/segment2/segment2.07180.ia1" -texture_dialog_jp_9: +texture_font_char_jp_9: .incbin "textures/segment2/segment2.07190.ia1" -texture_dialog_jp_A: +texture_font_char_jp_A: .incbin "textures/segment2/segment2.071A0.ia1" -texture_dialog_jp_B: +texture_font_char_jp_B: .incbin "textures/segment2/segment2.071B0.ia1" -texture_dialog_jp_C: +texture_font_char_jp_C: .incbin "textures/segment2/segment2.071C0.ia1" -texture_dialog_jp_D: +texture_font_char_jp_D: .incbin "textures/segment2/segment2.071D0.ia1" -texture_dialog_jp_E: +texture_font_char_jp_E: .incbin "textures/segment2/segment2.071E0.ia1" -texture_dialog_jp_F: +texture_font_char_jp_F: .incbin "textures/segment2/segment2.071F0.ia1" -texture_dialog_jp_G: +texture_font_char_jp_G: .incbin "textures/segment2/segment2.07200.ia1" -texture_dialog_jp_H: +texture_font_char_jp_H: .incbin "textures/segment2/segment2.07210.ia1" -texture_dialog_jp_I: +texture_font_char_jp_I: .incbin "textures/segment2/segment2.07220.ia1" -texture_dialog_jp_J: +texture_font_char_jp_J: .incbin "textures/segment2/segment2.07230.ia1" -texture_dialog_jp_K: +texture_font_char_jp_K: .incbin "textures/segment2/segment2.07240.ia1" -texture_dialog_jp_L: +texture_font_char_jp_L: .incbin "textures/segment2/segment2.07250.ia1" -texture_dialog_jp_M: +texture_font_char_jp_M: .incbin "textures/segment2/segment2.07260.ia1" -texture_dialog_jp_N: +texture_font_char_jp_N: .incbin "textures/segment2/segment2.07270.ia1" -texture_dialog_jp_O: +texture_font_char_jp_O: .incbin "textures/segment2/segment2.07280.ia1" -texture_dialog_jp_P: +texture_font_char_jp_P: .incbin "textures/segment2/segment2.07290.ia1" -texture_dialog_jp_Q: +texture_font_char_jp_Q: .incbin "textures/segment2/segment2.072A0.ia1" -texture_dialog_jp_R: +texture_font_char_jp_R: .incbin "textures/segment2/segment2.072B0.ia1" -texture_dialog_jp_S: +texture_font_char_jp_S: .incbin "textures/segment2/segment2.072C0.ia1" -texture_dialog_jp_T: +texture_font_char_jp_T: .incbin "textures/segment2/segment2.072D0.ia1" -texture_dialog_jp_U: +texture_font_char_jp_U: .incbin "textures/segment2/segment2.072E0.ia1" -texture_dialog_jp_V: +texture_font_char_jp_V: .incbin "textures/segment2/segment2.072F0.ia1" -texture_dialog_jp_W: +texture_font_char_jp_W: .incbin "textures/segment2/segment2.07300.ia1" -texture_dialog_jp_X: +texture_font_char_jp_X: .incbin "textures/segment2/segment2.07310.ia1" -texture_dialog_jp_Y: +texture_font_char_jp_Y: .incbin "textures/segment2/segment2.07320.ia1" -texture_dialog_jp_Z: +texture_font_char_jp_Z: .incbin "textures/segment2/segment2.07330.ia1" -texture_dialog_jp_long_vowel: +texture_font_char_jp_long_vowel: .incbin "textures/segment2/segment2.07340.ia1" -texture_dialog_jp_exclamation: +texture_font_char_jp_exclamation: .incbin "textures/segment2/segment2.07350.ia1" -texture_dialog_jp_dakuten: +texture_font_char_jp_dakuten: .incbin "textures/segment2/segment2.07360.ia1" -texture_dialog_jp_handakuten: +texture_font_char_jp_handakuten: .incbin "textures/segment2/segment2.07370.ia1" -texture_dialog_jp_percent: +texture_font_char_jp_percent: .incbin "textures/segment2/segment2.07380.ia1" -texture_dialog_jp_question: +texture_font_char_jp_question: .incbin "textures/segment2/segment2.07390.ia1" -texture_dialog_jp_left_right_arrow: +texture_font_char_jp_left_right_arrow: .incbin "textures/segment2/segment2.073A0.ia1" -texture_dialog_jp_open_parentheses: +texture_font_char_jp_open_parentheses: .incbin "textures/segment2/segment2.073B0.ia1" -texture_dialog_jp_close_open_parentheses: +texture_font_char_jp_close_open_parentheses: .incbin "textures/segment2/segment2.073C0.ia1" -texture_dialog_jp_close_parentheses: +texture_font_char_jp_close_parentheses: .incbin "textures/segment2/segment2.073D0.ia1" -texture_dialog_jp_coin: +texture_font_char_jp_coin: .incbin "textures/segment2/segment2.073E0.ia1" -texture_dialog_jp_multiply: +texture_font_char_jp_multiply: .incbin "textures/segment2/segment2.073F0.ia1" -texture_dialog_jp_star_filled: +texture_font_char_jp_star_filled: .incbin "textures/segment2/segment2.07400.ia1" -texture_dialog_jp_star_hollow: +texture_font_char_jp_star_hollow: .incbin "textures/segment2/segment2.07410.ia1" -texture_dialog_jp_hiragana_a: +texture_font_char_jp_hiragana_a: .incbin "textures/segment2/segment2.07420.ia1" -texture_dialog_jp_hiragana_i: +texture_font_char_jp_hiragana_i: .incbin "textures/segment2/segment2.07430.ia1" -texture_dialog_jp_hiragana_u: +texture_font_char_jp_hiragana_u: .incbin "textures/segment2/segment2.07440.ia1" -texture_dialog_jp_hiragana_c: +texture_font_char_jp_hiragana_c: .incbin "textures/segment2/segment2.07450.ia1" -texture_dialog_jp_hiragana_o: +texture_font_char_jp_hiragana_o: .incbin "textures/segment2/segment2.07460.ia1" -texture_dialog_jp_hiragana_ka: +texture_font_char_jp_hiragana_ka: .incbin "textures/segment2/segment2.07470.ia1" -texture_dialog_jp_hiragana_ki: +texture_font_char_jp_hiragana_ki: .incbin "textures/segment2/segment2.07480.ia1" -texture_dialog_jp_hiragana_ku: +texture_font_char_jp_hiragana_ku: .incbin "textures/segment2/segment2.07490.ia1" -texture_dialog_jp_hiragana_ke: +texture_font_char_jp_hiragana_ke: .incbin "textures/segment2/segment2.074A0.ia1" -texture_dialog_jp_hiragana_ko: +texture_font_char_jp_hiragana_ko: .incbin "textures/segment2/segment2.074B0.ia1" -texture_dialog_jp_hiragana_sa: +texture_font_char_jp_hiragana_sa: .incbin "textures/segment2/segment2.074C0.ia1" -texture_dialog_jp_hiragana_shi: +texture_font_char_jp_hiragana_shi: .incbin "textures/segment2/segment2.074D0.ia1" -texture_dialog_jp_hiragana_su: +texture_font_char_jp_hiragana_su: .incbin "textures/segment2/segment2.074E0.ia1" -texture_dialog_jp_hiragana_se: +texture_font_char_jp_hiragana_se: .incbin "textures/segment2/segment2.074F0.ia1" -texture_dialog_jp_hiragana_so: +texture_font_char_jp_hiragana_so: .incbin "textures/segment2/segment2.07500.ia1" -texture_dialog_jp_hiragana_ta: +texture_font_char_jp_hiragana_ta: .incbin "textures/segment2/segment2.07510.ia1" -texture_dialog_jp_hiragana_chi: +texture_font_char_jp_hiragana_chi: .incbin "textures/segment2/segment2.07520.ia1" -texture_dialog_jp_hiragana_tsu: +texture_font_char_jp_hiragana_tsu: .incbin "textures/segment2/segment2.07530.ia1" -texture_dialog_jp_hiragana_te: +texture_font_char_jp_hiragana_te: .incbin "textures/segment2/segment2.07540.ia1" -texture_dialog_jp_hiragana_to: +texture_font_char_jp_hiragana_to: .incbin "textures/segment2/segment2.07550.ia1" -texture_dialog_jp_hiragana_na: +texture_font_char_jp_hiragana_na: .incbin "textures/segment2/segment2.07560.ia1" -texture_dialog_jp_hiragana_ni: +texture_font_char_jp_hiragana_ni: .incbin "textures/segment2/segment2.07570.ia1" -texture_dialog_jp_hiragana_nu: +texture_font_char_jp_hiragana_nu: .incbin "textures/segment2/segment2.07580.ia1" -texture_dialog_jp_hiragana_ne: +texture_font_char_jp_hiragana_ne: .incbin "textures/segment2/segment2.07590.ia1" -texture_dialog_jp_hiragana_no: +texture_font_char_jp_hiragana_no: .incbin "textures/segment2/segment2.075A0.ia1" -texture_dialog_jp_hiragana_ha: +texture_font_char_jp_hiragana_ha: .incbin "textures/segment2/segment2.075B0.ia1" -texture_dialog_jp_hiragana_hi: +texture_font_char_jp_hiragana_hi: .incbin "textures/segment2/segment2.075C0.ia1" -texture_dialog_jp_hiragana_hu: +texture_font_char_jp_hiragana_hu: .incbin "textures/segment2/segment2.075D0.ia1" -texture_dialog_jp_hiragana_he: +texture_font_char_jp_hiragana_he: .incbin "textures/segment2/segment2.075E0.ia1" -texture_dialog_jp_hiragana_ho: +texture_font_char_jp_hiragana_ho: .incbin "textures/segment2/segment2.075F0.ia1" -texture_dialog_jp_hiragana_ma: +texture_font_char_jp_hiragana_ma: .incbin "textures/segment2/segment2.07600.ia1" -texture_dialog_jp_hiragana_mi: +texture_font_char_jp_hiragana_mi: .incbin "textures/segment2/segment2.07610.ia1" -texture_dialog_jp_hiragana_mu: +texture_font_char_jp_hiragana_mu: .incbin "textures/segment2/segment2.07620.ia1" -texture_dialog_jp_hiragana_me: +texture_font_char_jp_hiragana_me: .incbin "textures/segment2/segment2.07630.ia1" -texture_dialog_jp_hiragana_mo: +texture_font_char_jp_hiragana_mo: .incbin "textures/segment2/segment2.07640.ia1" -texture_dialog_jp_hiragana_ya: +texture_font_char_jp_hiragana_ya: .incbin "textures/segment2/segment2.07650.ia1" -texture_dialog_jp_hiragana_yu: +texture_font_char_jp_hiragana_yu: .incbin "textures/segment2/segment2.07660.ia1" -texture_dialog_jp_hiragana_yo: +texture_font_char_jp_hiragana_yo: .incbin "textures/segment2/segment2.07670.ia1" -texture_dialog_jp_hiragana_ra: +texture_font_char_jp_hiragana_ra: .incbin "textures/segment2/segment2.07680.ia1" -texture_dialog_jp_hiragana_ri: +texture_font_char_jp_hiragana_ri: .incbin "textures/segment2/segment2.07690.ia1" -texture_dialog_jp_hiragana_ru: +texture_font_char_jp_hiragana_ru: .incbin "textures/segment2/segment2.076A0.ia1" -texture_dialog_jp_hiragana_re: +texture_font_char_jp_hiragana_re: .incbin "textures/segment2/segment2.076B0.ia1" -texture_dialog_jp_hiragana_ro: +texture_font_char_jp_hiragana_ro: .incbin "textures/segment2/segment2.076C0.ia1" -texture_dialog_jp_hiragana_wa: +texture_font_char_jp_hiragana_wa: .incbin "textures/segment2/segment2.076D0.ia1" -texture_dialog_jp_hiragana_wo: +texture_font_char_jp_hiragana_wo: .incbin "textures/segment2/segment2.076E0.ia1" -texture_dialog_jp_hiragana_n: +texture_font_char_jp_hiragana_n: .incbin "textures/segment2/segment2.076F0.ia1" -texture_dialog_jp_hiragana_small_e: +texture_font_char_jp_hiragana_small_e: .incbin "textures/segment2/segment2.07700.ia1" -texture_dialog_jp_hiragana_small_tsu: +texture_font_char_jp_hiragana_small_tsu: .incbin "textures/segment2/segment2.07710.ia1" -texture_dialog_jp_hiragana_small_ka: +texture_font_char_jp_hiragana_small_ka: .incbin "textures/segment2/segment2.07720.ia1" -texture_dialog_jp_hiragana_small_yu: +texture_font_char_jp_hiragana_small_yu: .incbin "textures/segment2/segment2.07730.ia1" -texture_dialog_jp_hiragana_small_yo: +texture_font_char_jp_hiragana_small_yo: .incbin "textures/segment2/segment2.07740.ia1" -texture_dialog_jp_hiragana_small_a: +texture_font_char_jp_hiragana_small_a: .incbin "textures/segment2/segment2.07750.ia1" -texture_dialog_jp_hiragana_small_i: +texture_font_char_jp_hiragana_small_i: .incbin "textures/segment2/segment2.07760.ia1" -texture_dialog_jp_hiragana_small_o: +texture_font_char_jp_hiragana_small_o: .incbin "textures/segment2/segment2.07770.ia1" -texture_dialog_jp_hiragana_small_u: +texture_font_char_jp_hiragana_small_u: .incbin "textures/segment2/segment2.07780.ia1" -texture_dialog_jp_interpunct: +texture_font_char_jp_interpunct: .incbin "textures/segment2/segment2.07790.ia1" -texture_dialog_jp_comma: +texture_font_char_jp_comma: .incbin "textures/segment2/segment2.077A0.ia1" -texture_dialog_jp_katakana_a: +texture_font_char_jp_katakana_a: .incbin "textures/segment2/segment2.077B0.ia1" -texture_dialog_jp_katakana_i: +texture_font_char_jp_katakana_i: .incbin "textures/segment2/segment2.077C0.ia1" -texture_dialog_jp_katakana_u: +texture_font_char_jp_katakana_u: .incbin "textures/segment2/segment2.077D0.ia1" -texture_dialog_jp_katakana_e: +texture_font_char_jp_katakana_e: .incbin "textures/segment2/segment2.077E0.ia1" -texture_dialog_jp_katakana_o: +texture_font_char_jp_katakana_o: .incbin "textures/segment2/segment2.077F0.ia1" -texture_dialog_jp_katakana_ka: +texture_font_char_jp_katakana_ka: .incbin "textures/segment2/segment2.07800.ia1" -texture_dialog_jp_katakana_ki: +texture_font_char_jp_katakana_ki: .incbin "textures/segment2/segment2.07810.ia1" -texture_dialog_jp_katakana_ku: +texture_font_char_jp_katakana_ku: .incbin "textures/segment2/segment2.07820.ia1" -texture_dialog_jp_katakana_ke: +texture_font_char_jp_katakana_ke: .incbin "textures/segment2/segment2.07830.ia1" -texture_dialog_jp_katakana_ko: +texture_font_char_jp_katakana_ko: .incbin "textures/segment2/segment2.07840.ia1" -texture_dialog_jp_katakana_sa: +texture_font_char_jp_katakana_sa: .incbin "textures/segment2/segment2.07850.ia1" -texture_dialog_jp_katakana_shi: +texture_font_char_jp_katakana_shi: .incbin "textures/segment2/segment2.07860.ia1" -texture_dialog_jp_katakana_su: +texture_font_char_jp_katakana_su: .incbin "textures/segment2/segment2.07870.ia1" -texture_dialog_jp_katakana_se: +texture_font_char_jp_katakana_se: .incbin "textures/segment2/segment2.07880.ia1" -texture_dialog_jp_katakana_so: +texture_font_char_jp_katakana_so: .incbin "textures/segment2/segment2.07890.ia1" -texture_dialog_jp_katakana_ta: +texture_font_char_jp_katakana_ta: .incbin "textures/segment2/segment2.078A0.ia1" -texture_dialog_jp_katakana_chi: +texture_font_char_jp_katakana_chi: .incbin "textures/segment2/segment2.078B0.ia1" -texture_dialog_jp_katakana_tsu: +texture_font_char_jp_katakana_tsu: .incbin "textures/segment2/segment2.078C0.ia1" -texture_dialog_jp_katakana_te: +texture_font_char_jp_katakana_te: .incbin "textures/segment2/segment2.078D0.ia1" -texture_dialog_jp_katakana_to: +texture_font_char_jp_katakana_to: .incbin "textures/segment2/segment2.078E0.ia1" -texture_dialog_jp_katakana_na: +texture_font_char_jp_katakana_na: .incbin "textures/segment2/segment2.078F0.ia1" -texture_dialog_jp_katakana_ni: +texture_font_char_jp_katakana_ni: .incbin "textures/segment2/segment2.07900.ia1" -texture_dialog_jp_katakana_nu: +texture_font_char_jp_katakana_nu: .incbin "textures/segment2/segment2.07910.ia1" -texture_dialog_jp_katakana_ne: +texture_font_char_jp_katakana_ne: .incbin "textures/segment2/segment2.07920.ia1" -texture_dialog_jp_katakana_no: +texture_font_char_jp_katakana_no: .incbin "textures/segment2/segment2.07930.ia1" -texture_dialog_jp_katakana_ha: +texture_font_char_jp_katakana_ha: .incbin "textures/segment2/segment2.07940.ia1" -texture_dialog_jp_katakana_hi: +texture_font_char_jp_katakana_hi: .incbin "textures/segment2/segment2.07950.ia1" -texture_dialog_jp_katakana_hu: +texture_font_char_jp_katakana_hu: .incbin "textures/segment2/segment2.07960.ia1" -texture_dialog_jp_katakana_he: +texture_font_char_jp_katakana_he: .incbin "textures/segment2/segment2.07970.ia1" -texture_dialog_jp_katakana_ho: +texture_font_char_jp_katakana_ho: .incbin "textures/segment2/segment2.07980.ia1" -texture_dialog_jp_katakana_ma: +texture_font_char_jp_katakana_ma: .incbin "textures/segment2/segment2.07990.ia1" -texture_dialog_jp_katakana_mi: +texture_font_char_jp_katakana_mi: .incbin "textures/segment2/segment2.079A0.ia1" -texture_dialog_jp_katakana_mu: +texture_font_char_jp_katakana_mu: .incbin "textures/segment2/segment2.079B0.ia1" -texture_dialog_jp_katakana_me: +texture_font_char_jp_katakana_me: .incbin "textures/segment2/segment2.079C0.ia1" -texture_dialog_jp_katakana_mo: +texture_font_char_jp_katakana_mo: .incbin "textures/segment2/segment2.079D0.ia1" -texture_dialog_jp_katakana_ya: +texture_font_char_jp_katakana_ya: .incbin "textures/segment2/segment2.079E0.ia1" -texture_dialog_jp_katakana_yu: +texture_font_char_jp_katakana_yu: .incbin "textures/segment2/segment2.079F0.ia1" -texture_dialog_jp_katakana_yo: +texture_font_char_jp_katakana_yo: .incbin "textures/segment2/segment2.07A00.ia1" -texture_dialog_jp_katakana_ra: +texture_font_char_jp_katakana_ra: .incbin "textures/segment2/segment2.07A10.ia1" -texture_dialog_jp_katakana_ri: +texture_font_char_jp_katakana_ri: .incbin "textures/segment2/segment2.07A20.ia1" -texture_dialog_jp_katakana_ru: +texture_font_char_jp_katakana_ru: .incbin "textures/segment2/segment2.07A30.ia1" -texture_dialog_jp_katakana_re: +texture_font_char_jp_katakana_re: .incbin "textures/segment2/segment2.07A40.ia1" -texture_dialog_jp_katakana_ro: +texture_font_char_jp_katakana_ro: .incbin "textures/segment2/segment2.07A50.ia1" -texture_dialog_jp_katakana_wa: +texture_font_char_jp_katakana_wa: .incbin "textures/segment2/segment2.07A60.ia1" -texture_dialog_jp_katakana_n: +texture_font_char_jp_katakana_n: .incbin "textures/segment2/segment2.07A70.ia1" -texture_dialog_jp_katakana_small_e: +texture_font_char_jp_katakana_small_e: .incbin "textures/segment2/segment2.07A80.ia1" -texture_dialog_jp_katakana_small_tsu: +texture_font_char_jp_katakana_small_tsu: .incbin "textures/segment2/segment2.07A90.ia1" -texture_dialog_jp_katakana_small_ka: +texture_font_char_jp_katakana_small_ka: .incbin "textures/segment2/segment2.07AA0.ia1" -texture_dialog_jp_katakana_small_yu: +texture_font_char_jp_katakana_small_yu: .incbin "textures/segment2/segment2.07AB0.ia1" -texture_dialog_jp_katakana_small_yo: +texture_font_char_jp_katakana_small_yo: .incbin "textures/segment2/segment2.07AC0.ia1" -texture_dialog_jp_katakana_small_a: +texture_font_char_jp_katakana_small_a: .incbin "textures/segment2/segment2.07AD0.ia1" -texture_dialog_jp_katakana_small_i: +texture_font_char_jp_katakana_small_i: .incbin "textures/segment2/segment2.07AE0.ia1" -texture_dialog_jp_katakana_small_u: +texture_font_char_jp_katakana_small_u: .incbin "textures/segment2/segment2.07AF0.ia1" -texture_dialog_jp_katakana_small_o: +texture_font_char_jp_katakana_small_o: .incbin "textures/segment2/segment2.07B00.ia1" -texture_dialog_jp_double_quotation_open: +texture_font_char_jp_double_quotation_open: .incbin "textures/segment2/segment2.07B10.ia1" -texture_dialog_jp_double_quotation_close: +texture_font_char_jp_double_quotation_close: .incbin "textures/segment2/segment2.07B20.ia1" -texture_dialog_jp_wave_dash: +texture_font_char_jp_wave_dash: .incbin "textures/segment2/segment2.07B30.ia1" -texture_dialog_jp_ellipsis: +texture_font_char_jp_ellipsis: .incbin "textures/segment2/segment2.07B40.ia1" .elseif VERSION_EU == 1 # EU Small Font -texture_dialog_eu_0: +texture_font_char_eu_0: .incbin "textures/segment2/font_graphics.05F00.ia1" -texture_dialog_eu_1: +texture_font_char_eu_1: .incbin "textures/segment2/font_graphics.05F10.ia1" -texture_dialog_eu_2: +texture_font_char_eu_2: .incbin "textures/segment2/font_graphics.05F20.ia1" -texture_dialog_eu_3: +texture_font_char_eu_3: .incbin "textures/segment2/font_graphics.05F30.ia1" -texture_dialog_eu_4: +texture_font_char_eu_4: .incbin "textures/segment2/font_graphics.05F40.ia1" -texture_dialog_eu_5: +texture_font_char_eu_5: .incbin "textures/segment2/font_graphics.05F50.ia1" -texture_dialog_eu_6: +texture_font_char_eu_6: .incbin "textures/segment2/font_graphics.05F60.ia1" -texture_dialog_eu_7: +texture_font_char_eu_7: .incbin "textures/segment2/font_graphics.05F70.ia1" -texture_dialog_eu_8: +texture_font_char_eu_8: .incbin "textures/segment2/font_graphics.05F80.ia1" -texture_dialog_eu_9: +texture_font_char_eu_9: .incbin "textures/segment2/font_graphics.05F90.ia1" -texture_dialog_eu_A: +texture_font_char_eu_A: .incbin "textures/segment2/font_graphics.05FA0.ia1" -texture_dialog_eu_B: +texture_font_char_eu_B: .incbin "textures/segment2/font_graphics.05FB0.ia1" -texture_dialog_eu_C: +texture_font_char_eu_C: .incbin "textures/segment2/font_graphics.05FC0.ia1" -texture_dialog_eu_D: +texture_font_char_eu_D: .incbin "textures/segment2/font_graphics.05FD0.ia1" -texture_dialog_eu_E: +texture_font_char_eu_E: .incbin "textures/segment2/font_graphics.05FE0.ia1" -texture_dialog_eu_F: +texture_font_char_eu_F: .incbin "textures/segment2/font_graphics.05FF0.ia1" -texture_dialog_eu_G: +texture_font_char_eu_G: .incbin "textures/segment2/font_graphics.06000.ia1" -texture_dialog_eu_H: +texture_font_char_eu_H: .incbin "textures/segment2/font_graphics.06010.ia1" -texture_dialog_eu_I: +texture_font_char_eu_I: .incbin "textures/segment2/font_graphics.06020.ia1" -texture_dialog_eu_J: +texture_font_char_eu_J: .incbin "textures/segment2/font_graphics.06030.ia1" -texture_dialog_eu_K: +texture_font_char_eu_K: .incbin "textures/segment2/font_graphics.06040.ia1" -texture_dialog_eu_L: +texture_font_char_eu_L: .incbin "textures/segment2/font_graphics.06050.ia1" -texture_dialog_eu_M: +texture_font_char_eu_M: .incbin "textures/segment2/font_graphics.06060.ia1" -texture_dialog_eu_N: +texture_font_char_eu_N: .incbin "textures/segment2/font_graphics.06070.ia1" -texture_dialog_eu_O: +texture_font_char_eu_O: .incbin "textures/segment2/font_graphics.06080.ia1" -texture_dialog_eu_P: +texture_font_char_eu_P: .incbin "textures/segment2/font_graphics.06090.ia1" -texture_dialog_eu_Q: +texture_font_char_eu_Q: .incbin "textures/segment2/font_graphics.060A0.ia1" -texture_dialog_eu_R: +texture_font_char_eu_R: .incbin "textures/segment2/font_graphics.060B0.ia1" -texture_dialog_eu_S: +texture_font_char_eu_S: .incbin "textures/segment2/font_graphics.060C0.ia1" -texture_dialog_eu_T: +texture_font_char_eu_T: .incbin "textures/segment2/font_graphics.060D0.ia1" -texture_dialog_eu_U: +texture_font_char_eu_U: .incbin "textures/segment2/font_graphics.060E0.ia1" -texture_dialog_eu_V: +texture_font_char_eu_V: .incbin "textures/segment2/font_graphics.060F0.ia1" -texture_dialog_eu_W: +texture_font_char_eu_W: .incbin "textures/segment2/font_graphics.06100.ia1" -texture_dialog_eu_X: +texture_font_char_eu_X: .incbin "textures/segment2/font_graphics.06110.ia1" -texture_dialog_eu_Y: +texture_font_char_eu_Y: .incbin "textures/segment2/font_graphics.06120.ia1" -texture_dialog_eu_Z: +texture_font_char_eu_Z: .incbin "textures/segment2/font_graphics.06130.ia1" -texture_dialog_eu_a: +texture_font_char_eu_a: .incbin "textures/segment2/font_graphics.06140.ia1" -texture_dialog_eu_b: +texture_font_char_eu_b: .incbin "textures/segment2/font_graphics.06150.ia1" -texture_dialog_eu_c: +texture_font_char_eu_c: .incbin "textures/segment2/font_graphics.06160.ia1" -texture_dialog_eu_d: +texture_font_char_eu_d: .incbin "textures/segment2/font_graphics.06170.ia1" -texture_dialog_eu_e: +texture_font_char_eu_e: .incbin "textures/segment2/font_graphics.06180.ia1" -texture_dialog_eu_f: +texture_font_char_eu_f: .incbin "textures/segment2/font_graphics.06190.ia1" -texture_dialog_eu_g: +texture_font_char_eu_g: .incbin "textures/segment2/font_graphics.061A0.ia1" -texture_dialog_eu_h: +texture_font_char_eu_h: .incbin "textures/segment2/font_graphics.061B0.ia1" -texture_dialog_eu_i: +texture_font_char_eu_i: .incbin "textures/segment2/font_graphics.061C0.ia1" -texture_dialog_eu_j: +texture_font_char_eu_j: .incbin "textures/segment2/font_graphics.061D0.ia1" -texture_dialog_eu_k: +texture_font_char_eu_k: .incbin "textures/segment2/font_graphics.061E0.ia1" -texture_dialog_eu_l: +texture_font_char_eu_l: .incbin "textures/segment2/font_graphics.061F0.ia1" -texture_dialog_eu_m: +texture_font_char_eu_m: .incbin "textures/segment2/font_graphics.06200.ia1" -texture_dialog_eu_n: +texture_font_char_eu_n: .incbin "textures/segment2/font_graphics.06210.ia1" -texture_dialog_eu_o: +texture_font_char_eu_o: .incbin "textures/segment2/font_graphics.06220.ia1" -texture_dialog_eu_p: +texture_font_char_eu_p: .incbin "textures/segment2/font_graphics.06230.ia1" -texture_dialog_eu_q: +texture_font_char_eu_q: .incbin "textures/segment2/font_graphics.06240.ia1" -texture_dialog_eu_r: +texture_font_char_eu_r: .incbin "textures/segment2/font_graphics.06250.ia1" -texture_dialog_eu_s: +texture_font_char_eu_s: .incbin "textures/segment2/font_graphics.06260.ia1" -texture_dialog_eu_t: +texture_font_char_eu_t: .incbin "textures/segment2/font_graphics.06270.ia1" -texture_dialog_eu_u: +texture_font_char_eu_u: .incbin "textures/segment2/font_graphics.06280.ia1" -texture_dialog_eu_v: +texture_font_char_eu_v: .incbin "textures/segment2/font_graphics.06290.ia1" -texture_dialog_eu_w: +texture_font_char_eu_w: .incbin "textures/segment2/font_graphics.062A0.ia1" -texture_dialog_eu_x: +texture_font_char_eu_x: .incbin "textures/segment2/font_graphics.062B0.ia1" -texture_dialog_eu_y: +texture_font_char_eu_y: .incbin "textures/segment2/font_graphics.062C0.ia1" -texture_dialog_eu_z: +texture_font_char_eu_z: .incbin "textures/segment2/font_graphics.062D0.ia1" -texture_dialog_eu_left_right_arrow: +texture_font_char_eu_left_right_arrow: .incbin "textures/segment2/font_graphics.062E0.ia1" -texture_dialog_eu_ampersand: +texture_font_char_eu_ampersand: .incbin "textures/segment2/font_graphics.062F0.ia1" -texture_dialog_eu_exclamation: +texture_font_char_eu_exclamation: .incbin "textures/segment2/font_graphics.06300.ia1" -texture_dialog_eu_coin: +texture_font_char_eu_coin: .incbin "textures/segment2/font_graphics.06310.ia1" -texture_dialog_eu_multiply: +texture_font_char_eu_multiply: .incbin "textures/segment2/font_graphics.06320.ia1" -texture_dialog_eu_open_parentheses: +texture_font_char_eu_open_parentheses: .incbin "textures/segment2/font_graphics.06330.ia1" -texture_dialog_eu_close_open_parentheses: +texture_font_char_eu_close_open_parentheses: .incbin "textures/segment2/font_graphics.06340.ia1" -texture_dialog_eu_close_parentheses: +texture_font_char_eu_close_parentheses: .incbin "textures/segment2/font_graphics.06350.ia1" -texture_dialog_eu_tilde: +texture_font_char_eu_tilde: .incbin "textures/segment2/font_graphics.06360.ia1" -texture_dialog_eu_period: +texture_font_char_eu_period: .incbin "textures/segment2/font_graphics.06370.ia1" -texture_dialog_eu_percent: +texture_font_char_eu_percent: .incbin "textures/segment2/font_graphics.06380.ia1" -texture_dialog_eu_interpunct: +texture_font_char_eu_interpunct: .incbin "textures/segment2/font_graphics.06390.ia1" -texture_dialog_eu_comma: +texture_font_char_eu_comma: .incbin "textures/segment2/font_graphics.063A0.ia1" -texture_dialog_eu_apostrophe: +texture_font_char_eu_apostrophe: .incbin "textures/segment2/font_graphics.063B0.ia1" -texture_dialog_eu_question: +texture_font_char_eu_question: .incbin "textures/segment2/font_graphics.063C0.ia1" -texture_dialog_eu_star_filled: +texture_font_char_eu_star_filled: .incbin "textures/segment2/font_graphics.063D0.ia1" -texture_dialog_eu_star_hollow: +texture_font_char_eu_star_hollow: .incbin "textures/segment2/font_graphics.063E0.ia1" -texture_dialog_eu_double_quote_open: +texture_font_char_eu_double_quote_open: .incbin "textures/segment2/font_graphics.063F0.ia1" -texture_dialog_eu_double_quote_close: +texture_font_char_eu_double_quote_close: .incbin "textures/segment2/font_graphics.06400.ia1" -texture_dialog_eu_colon: +texture_font_char_eu_colon: .incbin "textures/segment2/font_graphics.06410.ia1" -texture_dialog_eu_dash: +texture_font_char_EU_slash: .incbin "textures/segment2/font_graphics.06420.ia1" -texture_dialog_eu_button_A: +texture_font_char_eu_button_A: .incbin "textures/segment2/font_graphics.06430.ia1" -texture_dialog_eu_button_B: +texture_font_char_eu_button_B: .incbin "textures/segment2/font_graphics.06440.ia1" -texture_dialog_eu_button_C: +texture_font_char_eu_button_C: .incbin "textures/segment2/font_graphics.06450.ia1" -texture_dialog_eu_button_Z: +texture_font_char_eu_button_Z: .incbin "textures/segment2/font_graphics.06460.ia1" -texture_dialog_eu_button_R: +texture_font_char_eu_button_R: .incbin "textures/segment2/font_graphics.06470.ia1" -texture_dialog_eu_button_C_up: +texture_font_char_eu_button_C_up: .incbin "textures/segment2/font_graphics.06480.ia1" -texture_dialog_eu_button_C_down: +texture_font_char_eu_button_C_down: .incbin "textures/segment2/font_graphics.06490.ia1" -texture_dialog_eu_button_C_left: +texture_font_char_eu_button_C_left: .incbin "textures/segment2/font_graphics.064A0.ia1" -texture_dialog_eu_button_C_right: +texture_font_char_eu_button_C_right: .incbin "textures/segment2/font_graphics.064B0.ia1" -texture_dialog_eu_umlaut: +texture_font_char_eu_umlaut: .incbin "textures/segment2/font_graphics.064C0.ia1" -texture_dialog_eu_circumflex: +texture_font_char_eu_circumflex: .incbin "textures/segment2/font_graphics.064D0.ia1" -texture_dialog_eu_grave: +texture_font_char_eu_grave: .incbin "textures/segment2/font_graphics.064E0.ia1" -texture_dialog_eu_acute: +texture_font_char_eu_acute: .incbin "textures/segment2/font_graphics.064F0.ia1" -texture_dialog_eu_cedilla: +texture_font_char_eu_cedilla: .incbin "textures/segment2/font_graphics.06500.ia1" -texture_dialog_eu_unknown: +texture_font_char_eu_unknown: .incbin "textures/segment2/font_graphics.06510.ia1" -texture_dialog_eu_Cedilla: +texture_font_char_eu_Cedilla: .incbin "textures/segment2/font_graphics.06520.ia1" -texture_dialog_eu_sset: +texture_font_char_eu_eszeet: .incbin "textures/segment2/font_graphics.06530.ia1" .else # US Small Font -texture_dialog_us_0: +texture_font_char_us_0: .incbin "textures/segment2/font_graphics.05900.ia4" -texture_dialog_us_1: +texture_font_char_us_1: .incbin "textures/segment2/font_graphics.05940.ia4" -texture_dialog_us_2: +texture_font_char_us_2: .incbin "textures/segment2/font_graphics.05980.ia4" -texture_dialog_us_3: +texture_font_char_us_3: .incbin "textures/segment2/font_graphics.059C0.ia4" -texture_dialog_us_4: +texture_font_char_us_4: .incbin "textures/segment2/font_graphics.05A00.ia4" -texture_dialog_us_5: +texture_font_char_us_5: .incbin "textures/segment2/font_graphics.05A40.ia4" -texture_dialog_us_6: +texture_font_char_us_6: .incbin "textures/segment2/font_graphics.05A80.ia4" -texture_dialog_us_7: +texture_font_char_us_7: .incbin "textures/segment2/font_graphics.05AC0.ia4" -texture_dialog_us_8: +texture_font_char_us_8: .incbin "textures/segment2/font_graphics.05B00.ia4" -texture_dialog_us_9: +texture_font_char_us_9: .incbin "textures/segment2/font_graphics.05B40.ia4" -texture_dialog_us_A: +texture_font_char_us_A: .incbin "textures/segment2/font_graphics.05B80.ia4" -texture_dialog_us_B: +texture_font_char_us_B: .incbin "textures/segment2/font_graphics.05BC0.ia4" -texture_dialog_us_C: +texture_font_char_us_C: .incbin "textures/segment2/font_graphics.05C00.ia4" -texture_dialog_us_D: +texture_font_char_us_D: .incbin "textures/segment2/font_graphics.05C40.ia4" -texture_dialog_us_E: +texture_font_char_us_E: .incbin "textures/segment2/font_graphics.05C80.ia4" -texture_dialog_us_F: +texture_font_char_us_F: .incbin "textures/segment2/font_graphics.05CC0.ia4" -texture_dialog_us_G: +texture_font_char_us_G: .incbin "textures/segment2/font_graphics.05D00.ia4" -texture_dialog_us_H: +texture_font_char_us_H: .incbin "textures/segment2/font_graphics.05D40.ia4" -texture_dialog_us_I: +texture_font_char_us_I: .incbin "textures/segment2/font_graphics.05D80.ia4" -texture_dialog_us_J: +texture_font_char_us_J: .incbin "textures/segment2/font_graphics.05DC0.ia4" -texture_dialog_us_K: +texture_font_char_us_K: .incbin "textures/segment2/font_graphics.05E00.ia4" -texture_dialog_us_L: +texture_font_char_us_L: .incbin "textures/segment2/font_graphics.05E40.ia4" -texture_dialog_us_M: +texture_font_char_us_M: .incbin "textures/segment2/font_graphics.05E80.ia4" -texture_dialog_us_N: +texture_font_char_us_N: .incbin "textures/segment2/font_graphics.05EC0.ia4" -texture_dialog_us_O: +texture_font_char_us_O: .incbin "textures/segment2/font_graphics.05F00.ia4" -texture_dialog_us_P: +texture_font_char_us_P: .incbin "textures/segment2/font_graphics.05F40.ia4" -texture_dialog_us_Q: +texture_font_char_us_Q: .incbin "textures/segment2/font_graphics.05F80.ia4" -texture_dialog_us_R: +texture_font_char_us_R: .incbin "textures/segment2/font_graphics.05FC0.ia4" -texture_dialog_us_S: +texture_font_char_us_S: .incbin "textures/segment2/font_graphics.06000.ia4" -texture_dialog_us_T: +texture_font_char_us_T: .incbin "textures/segment2/font_graphics.06040.ia4" -texture_dialog_us_U: +texture_font_char_us_U: .incbin "textures/segment2/font_graphics.06080.ia4" -texture_dialog_us_V: +texture_font_char_us_V: .incbin "textures/segment2/font_graphics.060C0.ia4" -texture_dialog_us_W: +texture_font_char_us_W: .incbin "textures/segment2/font_graphics.06100.ia4" -texture_dialog_us_X: +texture_font_char_us_X: .incbin "textures/segment2/font_graphics.06140.ia4" -texture_dialog_us_Y: +texture_font_char_us_Y: .incbin "textures/segment2/font_graphics.06180.ia4" -texture_dialog_us_Z: +texture_font_char_us_Z: .incbin "textures/segment2/font_graphics.061C0.ia4" -texture_dialog_us_a: +texture_font_char_us_a: .incbin "textures/segment2/font_graphics.06200.ia4" -texture_dialog_us_b: +texture_font_char_us_b: .incbin "textures/segment2/font_graphics.06240.ia4" -texture_dialog_us_c: +texture_font_char_us_c: .incbin "textures/segment2/font_graphics.06280.ia4" -texture_dialog_us_d: +texture_font_char_us_d: .incbin "textures/segment2/font_graphics.062C0.ia4" -texture_dialog_us_e: +texture_font_char_us_e: .incbin "textures/segment2/font_graphics.06300.ia4" -texture_dialog_us_f: +texture_font_char_us_f: .incbin "textures/segment2/font_graphics.06340.ia4" -texture_dialog_us_g: +texture_font_char_us_g: .incbin "textures/segment2/font_graphics.06380.ia4" -texture_dialog_us_h: +texture_font_char_us_h: .incbin "textures/segment2/font_graphics.063C0.ia4" -texture_dialog_us_i: +texture_font_char_us_i: .incbin "textures/segment2/font_graphics.06400.ia4" -texture_dialog_us_j: +texture_font_char_us_j: .incbin "textures/segment2/font_graphics.06440.ia4" -texture_dialog_us_k: +texture_font_char_us_k: .incbin "textures/segment2/font_graphics.06480.ia4" -texture_dialog_us_l: +texture_font_char_us_l: .incbin "textures/segment2/font_graphics.064C0.ia4" -texture_dialog_us_m: +texture_font_char_us_m: .incbin "textures/segment2/font_graphics.06500.ia4" -texture_dialog_us_n: +texture_font_char_us_n: .incbin "textures/segment2/font_graphics.06540.ia4" -texture_dialog_us_o: +texture_font_char_us_o: .incbin "textures/segment2/font_graphics.06580.ia4" -texture_dialog_us_p: +texture_font_char_us_p: .incbin "textures/segment2/font_graphics.065C0.ia4" -texture_dialog_us_q: +texture_font_char_us_q: .incbin "textures/segment2/font_graphics.06600.ia4" -texture_dialog_us_r: +texture_font_char_us_r: .incbin "textures/segment2/font_graphics.06640.ia4" -texture_dialog_us_s: +texture_font_char_us_s: .incbin "textures/segment2/font_graphics.06680.ia4" -texture_dialog_us_t: +texture_font_char_us_t: .incbin "textures/segment2/font_graphics.066C0.ia4" -texture_dialog_us_u: +texture_font_char_us_u: .incbin "textures/segment2/font_graphics.06700.ia4" -texture_dialog_us_v: +texture_font_char_us_v: .incbin "textures/segment2/font_graphics.06740.ia4" -texture_dialog_us_w: +texture_font_char_us_w: .incbin "textures/segment2/font_graphics.06780.ia4" -texture_dialog_us_x: +texture_font_char_us_x: .incbin "textures/segment2/font_graphics.067C0.ia4" -texture_dialog_us_y: +texture_font_char_us_y: .incbin "textures/segment2/font_graphics.06800.ia4" -texture_dialog_us_z: +texture_font_char_us_z: .incbin "textures/segment2/font_graphics.06840.ia4" -texture_dialog_us_left_right_arrow: +texture_font_char_us_left_right_arrow: .incbin "textures/segment2/font_graphics.06880.ia4" -texture_dialog_us_exclamation: +texture_font_char_us_exclamation: .incbin "textures/segment2/font_graphics.068C0.ia4" -texture_dialog_us_coin: +texture_font_char_us_coin: .incbin "textures/segment2/font_graphics.06900.ia4" -texture_dialog_us_multiply: +texture_font_char_us_multiply: .incbin "textures/segment2/font_graphics.06940.ia4" -texture_dialog_us_open_parentheses: +texture_font_char_us_open_parentheses: .incbin "textures/segment2/font_graphics.06980.ia4" -texture_dialog_us_close_open_parentheses: +texture_font_char_us_close_open_parentheses: .incbin "textures/segment2/font_graphics.069C0.ia4" -texture_dialog_us_close_parentheses: +texture_font_char_us_close_parentheses: .incbin "textures/segment2/font_graphics.06A00.ia4" -texture_dialog_us_tilde: +texture_font_char_us_tilde: .incbin "textures/segment2/font_graphics.06A40.ia4" -texture_dialog_us_period: +texture_font_char_us_period: .incbin "textures/segment2/font_graphics.06A80.ia4" -texture_dialog_us_percent: +texture_font_char_us_percent: .incbin "textures/segment2/font_graphics.06AC0.ia4" -texture_dialog_us_interpunct: +texture_font_char_us_interpunct: .incbin "textures/segment2/font_graphics.06B00.ia4" -texture_dialog_us_comma: +texture_font_char_us_comma: .incbin "textures/segment2/font_graphics.06B40.ia4" -texture_dialog_us_apostrophe: +texture_font_char_us_apostrophe: .incbin "textures/segment2/font_graphics.06B80.ia4" -texture_dialog_us_question: +texture_font_char_us_question: .incbin "textures/segment2/font_graphics.06BC0.ia4" -texture_dialog_us_star_filled: +texture_font_char_us_star_filled: .incbin "textures/segment2/font_graphics.06C00.ia4" -texture_dialog_us_star_hollow: +texture_font_char_us_star_hollow: .incbin "textures/segment2/font_graphics.06C40.ia4" -texture_dialog_us_double_quote_open: +texture_font_char_us_double_quote_open: .incbin "textures/segment2/font_graphics.06C80.ia4" -texture_dialog_us_double_quote_close: +texture_font_char_us_double_quote_close: .incbin "textures/segment2/font_graphics.06CC0.ia4" -texture_dialog_us_ellipsis: +texture_font_char_us_ellipsis: .incbin "textures/segment2/font_graphics.06D00.ia4" -texture_dialog_us_dash: +texture_font_char_us_slash: .incbin "textures/segment2/font_graphics.06D40.ia4" -texture_dialog_us_ampersand: +texture_font_char_us_ampersand: .incbin "textures/segment2/font_graphics.06D80.ia4" -texture_dialog_us_button_A: +texture_font_char_us_button_A: .incbin "textures/segment2/font_graphics.06DC0.ia4" -texture_dialog_us_button_B: +texture_font_char_us_button_B: .incbin "textures/segment2/font_graphics.06E00.ia4" -texture_dialog_us_button_C: +texture_font_char_us_button_C: .incbin "textures/segment2/font_graphics.06E40.ia4" -texture_dialog_us_button_Z: +texture_font_char_us_button_Z: .incbin "textures/segment2/font_graphics.06E80.ia4" -texture_dialog_us_button_R: +texture_font_char_us_button_R: .incbin "textures/segment2/font_graphics.06EC0.ia4" -texture_dialog_us_button_C_up: +texture_font_char_us_button_C_up: .incbin "textures/segment2/font_graphics.06F00.ia4" -texture_dialog_us_button_C_down: +texture_font_char_us_button_C_down: .incbin "textures/segment2/font_graphics.06F40.ia4" -texture_dialog_us_button_C_left: +texture_font_char_us_button_C_left: .incbin "textures/segment2/font_graphics.06F80.ia4" -texture_dialog_us_button_C_right: +texture_font_char_us_button_C_right: .incbin "textures/segment2/font_graphics.06FC0.ia4" .endif -texture_colorful_char_camera: +texture_hud_char_camera: .incbin "textures/segment2/segment2.07B50.rgba16" -texture_colorful_char_lakitu: +texture_hud_char_lakitu: .incbin "textures/segment2/segment2.07D50.rgba16" -texture_colorful_char_no_camera: +texture_hud_char_no_camera: .incbin "textures/segment2/segment2.07F50.rgba16" -texture_colorful_char_arrow_up: +texture_hud_char_arrow_up: .incbin "textures/segment2/segment2.08150.rgba16" -texture_colorful_char_arrow_down: +texture_hud_char_arrow_down: .incbin "textures/segment2/segment2.081D0.rgba16" -# HUD print table 0x02008250-0x02008337 -glabel seg2_hud_lut +# Main HUD print table 0x02008250-0x02008337 +glabel main_hud_lut .if VERSION_EU == 1 - .word texture_colorful_num_0, texture_colorful_num_1, texture_colorful_num_2, texture_colorful_num_3 - .word texture_colorful_num_4, texture_colorful_num_5, texture_colorful_num_6, texture_colorful_num_7 - .word texture_colorful_num_8, texture_colorful_num_9, texture_colorful_char_A, texture_colorful_char_B - .word texture_colorful_char_C, texture_colorful_char_D, texture_colorful_char_E, texture_colorful_char_F - .word texture_colorful_char_G, texture_colorful_char_H, texture_colorful_char_I, 0x0 - .word texture_colorful_char_K, texture_colorful_char_L, texture_colorful_char_M, texture_colorful_char_N - .word texture_colorful_char_O, texture_colorful_char_P, 0x0, texture_colorful_char_R - .word texture_colorful_char_S, texture_colorful_char_T, texture_colorful_char_U, texture_colorful_char_V - .word texture_colorful_char_W, 0x0, texture_colorful_char_Y, texture_colorful_char_Z - .word 0x0, 0x0, 0x0, 0x0 - .word 0x0, 0x0, 0x0, 0x0 - .word 0x0, 0x0, 0x0, 0x0 - .word 0x0, 0x0, texture_colorful_char_multiply, texture_colorful_char_coin - .word texture_colorful_char_mario_head, texture_colorful_char_star, 0x0, 0x0 - .word texture_colorful_char_apostrophe, texture_colorful_char_double_quote, texture_colorful_char_umlaut + .word texture_hud_char_0, texture_hud_char_1, texture_hud_char_2, texture_hud_char_3 + .word texture_hud_char_4, texture_hud_char_5, texture_hud_char_6, texture_hud_char_7 + .word texture_hud_char_8, texture_hud_char_9, texture_hud_char_A, texture_hud_char_B + .word texture_hud_char_C, texture_hud_char_D, texture_hud_char_E, texture_hud_char_F + .word texture_hud_char_G, texture_hud_char_H, texture_hud_char_I, 0x0 + .word texture_hud_char_K, texture_hud_char_L, texture_hud_char_M, texture_hud_char_N + .word texture_hud_char_O, texture_hud_char_P, 0x0, texture_hud_char_R + .word texture_hud_char_S, texture_hud_char_T, texture_hud_char_U, texture_hud_char_V + .word texture_hud_char_W, 0x0, texture_hud_char_Y, texture_hud_char_Z + .word 0x0, 0x0, 0x0, 0x0 + .word 0x0, 0x0, 0x0, 0x0 + .word 0x0, 0x0, 0x0, 0x0 + .word 0x0, 0x0, texture_hud_char_multiply, texture_hud_char_coin + .word texture_hud_char_mario_head, texture_hud_char_star, 0x0, 0x0 + .word texture_hud_char_apostrophe, texture_hud_char_double_quote, texture_hud_char_umlaut .elseif VERSION_US == 1 - .word texture_colorful_num_0, texture_colorful_num_1, texture_colorful_num_2, texture_colorful_num_3 - .word texture_colorful_num_4, texture_colorful_num_5, texture_colorful_num_6, texture_colorful_num_7 - .word texture_colorful_num_8, texture_colorful_num_9, texture_colorful_char_A, texture_colorful_char_B - .word texture_colorful_char_C, texture_colorful_char_D, texture_colorful_char_E, texture_colorful_char_F - .word texture_colorful_char_G, texture_colorful_char_H, texture_colorful_char_I, 0x0 - .word texture_colorful_char_K, texture_colorful_char_L, texture_colorful_char_M, texture_colorful_char_N - .word texture_colorful_char_O, texture_colorful_char_P, 0x0, texture_colorful_char_R - .word texture_colorful_char_S, texture_colorful_char_T, texture_colorful_char_U, 0x0 - .word texture_colorful_char_W, 0x0, texture_colorful_char_Y, 0x0 - .word 0x0, 0x0, 0x0, 0x0 - .word 0x0, 0x0, 0x0, 0x0 - .word 0x0, 0x0, 0x0, 0x0 - .word 0x0, 0x0, texture_colorful_char_multiply, texture_colorful_char_coin - .word texture_colorful_char_mario_head, texture_colorful_char_star, 0x0, 0x0 - .word texture_colorful_char_apostrophe, texture_colorful_char_double_quote + .word texture_hud_char_0, texture_hud_char_1, texture_hud_char_2, texture_hud_char_3 + .word texture_hud_char_4, texture_hud_char_5, texture_hud_char_6, texture_hud_char_7 + .word texture_hud_char_8, texture_hud_char_9, texture_hud_char_A, texture_hud_char_B + .word texture_hud_char_C, texture_hud_char_D, texture_hud_char_E, texture_hud_char_F + .word texture_hud_char_G, texture_hud_char_H, texture_hud_char_I, 0x0 + .word texture_hud_char_K, texture_hud_char_L, texture_hud_char_M, texture_hud_char_N + .word texture_hud_char_O, texture_hud_char_P, 0x0, texture_hud_char_R + .word texture_hud_char_S, texture_hud_char_T, texture_hud_char_U, 0x0 + .word texture_hud_char_W, 0x0, texture_hud_char_Y, 0x0 + .word 0x0, 0x0, 0x0, 0x0 + .word 0x0, 0x0, 0x0, 0x0 + .word 0x0, 0x0, 0x0, 0x0 + .word 0x0, 0x0, texture_hud_char_multiply, texture_hud_char_coin + .word texture_hud_char_mario_head, texture_hud_char_star, 0x0, 0x0 + .word texture_hud_char_apostrophe, texture_hud_char_double_quote .else - .word texture_colorful_num_0, texture_colorful_num_1, texture_colorful_num_2, texture_colorful_num_3 - .word texture_colorful_num_4, texture_colorful_num_5, texture_colorful_num_6, texture_colorful_num_7 - .word texture_colorful_num_8, texture_colorful_num_9, texture_colorful_char_A, texture_colorful_char_B - .word texture_colorful_char_C, texture_colorful_char_D, texture_colorful_char_E, texture_colorful_char_F - .word texture_colorful_char_G, texture_colorful_char_H, texture_colorful_char_I, texture_colorful_char_J - .word texture_colorful_char_K, texture_colorful_char_L, texture_colorful_char_M, texture_colorful_char_N - .word texture_colorful_char_O, texture_colorful_char_P, texture_colorful_char_Q, texture_colorful_char_R - .word texture_colorful_char_S, texture_colorful_char_T, texture_colorful_char_U, texture_colorful_char_V - .word texture_colorful_char_W, texture_colorful_char_X, texture_colorful_char_Y, texture_colorful_char_Z - .word texture_colorful_char_exclamation, texture_colorful_char_double_exclamation, texture_colorful_char_question, texture_colorful_char_ampersand - .word texture_colorful_char_percent, 0x0, 0x0, 0x0 - .word 0x0, 0x0, 0x0, 0x0 - .word 0x0, 0x0, texture_colorful_char_multiply, texture_colorful_char_coin - .word texture_colorful_char_mario_head, texture_colorful_char_star, texture_colorful_char_decimal_point, texture_colorful_char_beta_key - .word texture_colorful_char_apostrophe, texture_colorful_char_double_quote + .word texture_hud_char_0, texture_hud_char_1, texture_hud_char_2, texture_hud_char_3 + .word texture_hud_char_4, texture_hud_char_5, texture_hud_char_6, texture_hud_char_7 + .word texture_hud_char_8, texture_hud_char_9, texture_hud_char_A, texture_hud_char_B + .word texture_hud_char_C, texture_hud_char_D, texture_hud_char_E, texture_hud_char_F + .word texture_hud_char_G, texture_hud_char_H, texture_hud_char_I, texture_hud_char_J + .word texture_hud_char_K, texture_hud_char_L, texture_hud_char_M, texture_hud_char_N + .word texture_hud_char_O, texture_hud_char_P, texture_hud_char_Q, texture_hud_char_R + .word texture_hud_char_S, texture_hud_char_T, texture_hud_char_U, texture_hud_char_V + .word texture_hud_char_W, texture_hud_char_X, texture_hud_char_Y, texture_hud_char_Z + .word texture_hud_char_exclamation, texture_hud_char_double_exclamation, texture_hud_char_question, texture_hud_char_ampersand + .word texture_hud_char_percent, 0x0, 0x0, 0x0 + .word 0x0, 0x0, 0x0, 0x0 + .word 0x0, 0x0, texture_hud_char_multiply, texture_hud_char_coin + .word texture_hud_char_mario_head, texture_hud_char_star, texture_hud_char_decimal_point, texture_hud_char_beta_key + .word texture_hud_char_apostrophe, texture_hud_char_double_quote .endif -# small font HUD LUT 0x02008338-0x02008737 -glabel seg2_small_font_lut +# Main small font print table 0x02008338-0x02008737 +glabel main_font_lut .if VERSION_EU == 1 # EU Font Table - .word texture_dialog_eu_0, texture_dialog_eu_1, texture_dialog_eu_2, texture_dialog_eu_3 - .word texture_dialog_eu_4, texture_dialog_eu_5, texture_dialog_eu_6, texture_dialog_eu_7 - .word texture_dialog_eu_8, texture_dialog_eu_9, texture_dialog_eu_A, texture_dialog_eu_B - .word texture_dialog_eu_C, texture_dialog_eu_D, texture_dialog_eu_E, texture_dialog_eu_F - .word texture_dialog_eu_G, texture_dialog_eu_H, texture_dialog_eu_I, texture_dialog_eu_J - .word texture_dialog_eu_K, texture_dialog_eu_L, texture_dialog_eu_M, texture_dialog_eu_N - .word texture_dialog_eu_O, texture_dialog_eu_P, texture_dialog_eu_Q, texture_dialog_eu_R - .word texture_dialog_eu_S, texture_dialog_eu_T, texture_dialog_eu_U, texture_dialog_eu_V - .word texture_dialog_eu_W, texture_dialog_eu_X, texture_dialog_eu_Y, texture_dialog_eu_Z - .word texture_dialog_eu_a, texture_dialog_eu_b, texture_dialog_eu_c, texture_dialog_eu_d - .word texture_dialog_eu_e, texture_dialog_eu_f, texture_dialog_eu_g, texture_dialog_eu_h - .word texture_dialog_eu_i, texture_dialog_eu_j, texture_dialog_eu_k, texture_dialog_eu_l - .word texture_dialog_eu_m, texture_dialog_eu_n, texture_dialog_eu_o, texture_dialog_eu_p - .word texture_dialog_eu_q, texture_dialog_eu_r, texture_dialog_eu_s, texture_dialog_eu_t - .word texture_dialog_eu_u, texture_dialog_eu_v, texture_dialog_eu_w, texture_dialog_eu_x - .word texture_dialog_eu_y, texture_dialog_eu_z, texture_dialog_eu_apostrophe, texture_dialog_eu_period + .word texture_font_char_eu_0, texture_font_char_eu_1, texture_font_char_eu_2, texture_font_char_eu_3 + .word texture_font_char_eu_4, texture_font_char_eu_5, texture_font_char_eu_6, texture_font_char_eu_7 + .word texture_font_char_eu_8, texture_font_char_eu_9, texture_font_char_eu_A, texture_font_char_eu_B + .word texture_font_char_eu_C, texture_font_char_eu_D, texture_font_char_eu_E, texture_font_char_eu_F + .word texture_font_char_eu_G, texture_font_char_eu_H, texture_font_char_eu_I, texture_font_char_eu_J + .word texture_font_char_eu_K, texture_font_char_eu_L, texture_font_char_eu_M, texture_font_char_eu_N + .word texture_font_char_eu_O, texture_font_char_eu_P, texture_font_char_eu_Q, texture_font_char_eu_R + .word texture_font_char_eu_S, texture_font_char_eu_T, texture_font_char_eu_U, texture_font_char_eu_V + .word texture_font_char_eu_W, texture_font_char_eu_X, texture_font_char_eu_Y, texture_font_char_eu_Z + .word texture_font_char_eu_a, texture_font_char_eu_b, texture_font_char_eu_c, texture_font_char_eu_d + .word texture_font_char_eu_e, texture_font_char_eu_f, texture_font_char_eu_g, texture_font_char_eu_h + .word texture_font_char_eu_i, texture_font_char_eu_j, texture_font_char_eu_k, texture_font_char_eu_l + .word texture_font_char_eu_m, texture_font_char_eu_n, texture_font_char_eu_o, texture_font_char_eu_p + .word texture_font_char_eu_q, texture_font_char_eu_r, texture_font_char_eu_s, texture_font_char_eu_t + .word texture_font_char_eu_u, texture_font_char_eu_v, texture_font_char_eu_w, texture_font_char_eu_x + .word texture_font_char_eu_y, texture_font_char_eu_z, texture_font_char_eu_apostrophe, texture_font_char_eu_period .word 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 - .word texture_dialog_eu_button_C_up - .word texture_dialog_eu_button_C_down - .word texture_dialog_eu_button_C_left - .word texture_dialog_eu_button_C_right - .word texture_dialog_eu_button_A - .word texture_dialog_eu_button_B - .word texture_dialog_eu_button_C - .word texture_dialog_eu_button_Z - .word texture_dialog_eu_button_R + .word texture_font_char_eu_button_C_up + .word texture_font_char_eu_button_C_down + .word texture_font_char_eu_button_C_left + .word texture_font_char_eu_button_C_right + .word texture_font_char_eu_button_A + .word texture_font_char_eu_button_B + .word texture_font_char_eu_button_C + .word texture_font_char_eu_button_Z + .word texture_font_char_eu_button_R .word 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 - .word texture_dialog_eu_comma + .word texture_font_char_eu_comma .word 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 - .word texture_dialog_eu_dash + .word texture_font_char_EU_slash .word 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 .word 0x0 - .word texture_dialog_eu_open_parentheses - .word texture_dialog_eu_close_open_parentheses - .word texture_dialog_eu_close_parentheses - .word texture_dialog_eu_left_right_arrow - .word texture_dialog_eu_ampersand - .word texture_dialog_eu_colon - .word texture_dialog_eu_acute - .word texture_dialog_eu_circumflex - .word texture_dialog_eu_umlaut - .word texture_dialog_eu_grave - .word texture_dialog_eu_unknown - .word texture_dialog_eu_sset - .word texture_dialog_eu_Cedilla - .word texture_dialog_eu_cedilla + .word texture_font_char_eu_open_parentheses + .word texture_font_char_eu_close_open_parentheses + .word texture_font_char_eu_close_parentheses + .word texture_font_char_eu_left_right_arrow + .word texture_font_char_eu_ampersand + .word texture_font_char_eu_colon + .word texture_font_char_eu_acute + .word texture_font_char_eu_circumflex + .word texture_font_char_eu_umlaut + .word texture_font_char_eu_grave + .word texture_font_char_eu_unknown + .word texture_font_char_eu_eszeet + .word texture_font_char_eu_Cedilla + .word texture_font_char_eu_cedilla .word 0x0, 0x0, 0x0 - .word texture_dialog_eu_exclamation - .word texture_dialog_eu_percent - .word texture_dialog_eu_question - .word texture_dialog_eu_double_quote_open - .word texture_dialog_eu_double_quote_close - .word texture_dialog_eu_tilde + .word texture_font_char_eu_exclamation + .word texture_font_char_eu_percent + .word texture_font_char_eu_question + .word texture_font_char_eu_double_quote_open + .word texture_font_char_eu_double_quote_close + .word texture_font_char_eu_tilde .word 0x0 - .word texture_dialog_eu_coin - .word texture_dialog_eu_star_filled - .word texture_dialog_eu_multiply - .word texture_dialog_eu_interpunct - .word texture_dialog_eu_star_hollow + .word texture_font_char_eu_coin + .word texture_font_char_eu_star_filled + .word texture_font_char_eu_multiply + .word texture_font_char_eu_interpunct + .word texture_font_char_eu_star_hollow .word 0x0, 0x0 .elseif VERSION_US == 1 # US Font Table - .word texture_dialog_us_0, texture_dialog_us_1, texture_dialog_us_2, texture_dialog_us_3 - .word texture_dialog_us_4, texture_dialog_us_5, texture_dialog_us_6, texture_dialog_us_7 - .word texture_dialog_us_8, texture_dialog_us_9, texture_dialog_us_A, texture_dialog_us_B - .word texture_dialog_us_C, texture_dialog_us_D, texture_dialog_us_E, texture_dialog_us_F - .word texture_dialog_us_G, texture_dialog_us_H, texture_dialog_us_I, texture_dialog_us_J - .word texture_dialog_us_K, texture_dialog_us_L, texture_dialog_us_M, texture_dialog_us_N - .word texture_dialog_us_O, texture_dialog_us_P, texture_dialog_us_Q, texture_dialog_us_R - .word texture_dialog_us_S, texture_dialog_us_T, texture_dialog_us_U, texture_dialog_us_V - .word texture_dialog_us_W, texture_dialog_us_X, texture_dialog_us_Y, texture_dialog_us_Z - .word texture_dialog_us_a, texture_dialog_us_b, texture_dialog_us_c, texture_dialog_us_d - .word texture_dialog_us_e, texture_dialog_us_f, texture_dialog_us_g, texture_dialog_us_h - .word texture_dialog_us_i, texture_dialog_us_j, texture_dialog_us_k, texture_dialog_us_l - .word texture_dialog_us_m, texture_dialog_us_n, texture_dialog_us_o, texture_dialog_us_p - .word texture_dialog_us_q, texture_dialog_us_r, texture_dialog_us_s, texture_dialog_us_t - .word texture_dialog_us_u, texture_dialog_us_v, texture_dialog_us_w, texture_dialog_us_x - .word texture_dialog_us_y, texture_dialog_us_z, texture_dialog_us_apostrophe, texture_dialog_us_period + .word texture_font_char_us_0, texture_font_char_us_1, texture_font_char_us_2, texture_font_char_us_3 + .word texture_font_char_us_4, texture_font_char_us_5, texture_font_char_us_6, texture_font_char_us_7 + .word texture_font_char_us_8, texture_font_char_us_9, texture_font_char_us_A, texture_font_char_us_B + .word texture_font_char_us_C, texture_font_char_us_D, texture_font_char_us_E, texture_font_char_us_F + .word texture_font_char_us_G, texture_font_char_us_H, texture_font_char_us_I, texture_font_char_us_J + .word texture_font_char_us_K, texture_font_char_us_L, texture_font_char_us_M, texture_font_char_us_N + .word texture_font_char_us_O, texture_font_char_us_P, texture_font_char_us_Q, texture_font_char_us_R + .word texture_font_char_us_S, texture_font_char_us_T, texture_font_char_us_U, texture_font_char_us_V + .word texture_font_char_us_W, texture_font_char_us_X, texture_font_char_us_Y, texture_font_char_us_Z + .word texture_font_char_us_a, texture_font_char_us_b, texture_font_char_us_c, texture_font_char_us_d + .word texture_font_char_us_e, texture_font_char_us_f, texture_font_char_us_g, texture_font_char_us_h + .word texture_font_char_us_i, texture_font_char_us_j, texture_font_char_us_k, texture_font_char_us_l + .word texture_font_char_us_m, texture_font_char_us_n, texture_font_char_us_o, texture_font_char_us_p + .word texture_font_char_us_q, texture_font_char_us_r, texture_font_char_us_s, texture_font_char_us_t + .word texture_font_char_us_u, texture_font_char_us_v, texture_font_char_us_w, texture_font_char_us_x + .word texture_font_char_us_y, texture_font_char_us_z, texture_font_char_us_apostrophe, texture_font_char_us_period .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 - .word texture_dialog_us_button_C_up, texture_dialog_us_button_C_down, texture_dialog_us_button_C_left, texture_dialog_us_button_C_right - .word texture_dialog_us_button_A, texture_dialog_us_button_B, texture_dialog_us_button_C, texture_dialog_us_button_Z - .word texture_dialog_us_button_R, 0x0, 0x0, 0x0 + .word texture_font_char_us_button_C_up, texture_font_char_us_button_C_down, texture_font_char_us_button_C_left, texture_font_char_us_button_C_right + .word texture_font_char_us_button_A, texture_font_char_us_button_B, texture_font_char_us_button_C, texture_font_char_us_button_Z + .word texture_font_char_us_button_R, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 - .word 0x0, 0x0, 0x0, texture_dialog_us_comma + .word 0x0, 0x0, 0x0, texture_font_char_us_comma .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 @@ -1519,7 +1519,7 @@ glabel seg2_small_font_lut .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 - .word 0x0, 0x0, 0x0, texture_dialog_us_dash + .word 0x0, 0x0, 0x0, texture_font_char_us_slash .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 @@ -1536,24 +1536,24 @@ glabel seg2_small_font_lut .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 - .word 0x0, texture_dialog_us_open_parentheses, texture_dialog_us_close_open_parentheses, texture_dialog_us_close_parentheses - .word texture_dialog_us_left_right_arrow, texture_dialog_us_ampersand, texture_dialog_us_ellipsis, 0x0 + .word 0x0, texture_font_char_us_open_parentheses, texture_font_char_us_close_open_parentheses, texture_font_char_us_close_parentheses + .word texture_font_char_us_left_right_arrow, texture_font_char_us_ampersand, texture_font_char_us_ellipsis, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 - .word 0x0, 0x0, texture_dialog_us_exclamation, texture_dialog_us_percent - .word texture_dialog_us_question, texture_dialog_us_double_quote_open, texture_dialog_us_double_quote_close, texture_dialog_us_tilde - .word 0x0, texture_dialog_us_coin, texture_dialog_us_star_filled, texture_dialog_us_multiply - .word texture_dialog_us_interpunct, texture_dialog_us_star_hollow, 0x0, 0x0 + .word 0x0, 0x0, texture_font_char_us_exclamation, texture_font_char_us_percent + .word texture_font_char_us_question, texture_font_char_us_double_quote_open, texture_font_char_us_double_quote_close, texture_font_char_us_tilde + .word 0x0, texture_font_char_us_coin, texture_font_char_us_star_filled, texture_font_char_us_multiply + .word texture_font_char_us_interpunct, texture_font_char_us_star_hollow, 0x0, 0x0 .elseif VERSION_JP == 1 - .word texture_dialog_jp_0, texture_dialog_jp_1, texture_dialog_jp_2, texture_dialog_jp_3 - .word texture_dialog_jp_4, texture_dialog_jp_5, texture_dialog_jp_6, texture_dialog_jp_7 - .word texture_dialog_jp_8, texture_dialog_jp_9, texture_dialog_jp_A, texture_dialog_jp_B - .word texture_dialog_jp_C, texture_dialog_jp_D, texture_dialog_jp_E, texture_dialog_jp_F - .word texture_dialog_jp_G, texture_dialog_jp_H, texture_dialog_jp_I, texture_dialog_jp_J - .word texture_dialog_jp_K, texture_dialog_jp_L, texture_dialog_jp_M, texture_dialog_jp_N - .word texture_dialog_jp_O, texture_dialog_jp_P, texture_dialog_jp_Q, texture_dialog_jp_R - .word texture_dialog_jp_S, texture_dialog_jp_T, texture_dialog_jp_U, texture_dialog_jp_V - .word texture_dialog_jp_W, texture_dialog_jp_X, texture_dialog_jp_Y, texture_dialog_jp_Z + .word texture_font_char_jp_0, texture_font_char_jp_1, texture_font_char_jp_2, texture_font_char_jp_3 + .word texture_font_char_jp_4, texture_font_char_jp_5, texture_font_char_jp_6, texture_font_char_jp_7 + .word texture_font_char_jp_8, texture_font_char_jp_9, texture_font_char_jp_A, texture_font_char_jp_B + .word texture_font_char_jp_C, texture_font_char_jp_D, texture_font_char_jp_E, texture_font_char_jp_F + .word texture_font_char_jp_G, texture_font_char_jp_H, texture_font_char_jp_I, texture_font_char_jp_J + .word texture_font_char_jp_K, texture_font_char_jp_L, texture_font_char_jp_M, texture_font_char_jp_N + .word texture_font_char_jp_O, texture_font_char_jp_P, texture_font_char_jp_Q, texture_font_char_jp_R + .word texture_font_char_jp_S, texture_font_char_jp_T, texture_font_char_jp_U, texture_font_char_jp_V + .word texture_font_char_jp_W, texture_font_char_jp_X, texture_font_char_jp_Y, texture_font_char_jp_Z .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 @@ -1561,33 +1561,33 @@ glabel seg2_small_font_lut .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 - .word texture_dialog_jp_hiragana_a, texture_dialog_jp_hiragana_i, texture_dialog_jp_hiragana_u, texture_dialog_jp_hiragana_c - .word texture_dialog_jp_hiragana_o, texture_dialog_jp_hiragana_ka, texture_dialog_jp_hiragana_ki, texture_dialog_jp_hiragana_ku - .word texture_dialog_jp_hiragana_ke, texture_dialog_jp_hiragana_ko, texture_dialog_jp_hiragana_sa, texture_dialog_jp_hiragana_shi - .word texture_dialog_jp_hiragana_su, texture_dialog_jp_hiragana_se, texture_dialog_jp_hiragana_so, texture_dialog_jp_hiragana_ta - .word texture_dialog_jp_hiragana_chi, texture_dialog_jp_hiragana_tsu, texture_dialog_jp_hiragana_te, texture_dialog_jp_hiragana_to - .word texture_dialog_jp_hiragana_na, texture_dialog_jp_hiragana_ni, texture_dialog_jp_hiragana_nu, texture_dialog_jp_hiragana_ne - .word texture_dialog_jp_hiragana_no, texture_dialog_jp_hiragana_ha, texture_dialog_jp_hiragana_hi, texture_dialog_jp_hiragana_hu - .word texture_dialog_jp_hiragana_he, texture_dialog_jp_hiragana_ho, texture_dialog_jp_hiragana_ma, texture_dialog_jp_hiragana_mi - .word texture_dialog_jp_hiragana_mu, texture_dialog_jp_hiragana_me, texture_dialog_jp_hiragana_mo, texture_dialog_jp_hiragana_ya - .word texture_dialog_jp_hiragana_yu, texture_dialog_jp_hiragana_yo, texture_dialog_jp_hiragana_ra, texture_dialog_jp_hiragana_ri - .word texture_dialog_jp_hiragana_ru, texture_dialog_jp_hiragana_re, texture_dialog_jp_hiragana_ro, texture_dialog_jp_hiragana_wa - .word texture_dialog_jp_hiragana_wo, texture_dialog_jp_hiragana_n, 0x0, texture_dialog_jp_comma - .word texture_dialog_jp_katakana_a, texture_dialog_jp_katakana_i, texture_dialog_jp_katakana_u, texture_dialog_jp_katakana_e - .word texture_dialog_jp_katakana_o, texture_dialog_jp_katakana_ka, texture_dialog_jp_katakana_ki, texture_dialog_jp_katakana_ku - .word texture_dialog_jp_katakana_ke, texture_dialog_jp_katakana_ko, texture_dialog_jp_katakana_sa, texture_dialog_jp_katakana_shi - .word texture_dialog_jp_katakana_su, texture_dialog_jp_katakana_se, texture_dialog_jp_katakana_so, texture_dialog_jp_katakana_ta - .word texture_dialog_jp_katakana_chi, texture_dialog_jp_katakana_tsu, texture_dialog_jp_katakana_te, texture_dialog_jp_katakana_to - .word texture_dialog_jp_katakana_na, texture_dialog_jp_katakana_ni, texture_dialog_jp_katakana_nu, texture_dialog_jp_katakana_ne - .word texture_dialog_jp_katakana_no, texture_dialog_jp_katakana_ha, texture_dialog_jp_katakana_hi, texture_dialog_jp_katakana_hu - .word texture_dialog_jp_katakana_he, texture_dialog_jp_katakana_ho, texture_dialog_jp_katakana_ma, texture_dialog_jp_katakana_mi - .word texture_dialog_jp_katakana_mu, texture_dialog_jp_katakana_me, texture_dialog_jp_katakana_mo, texture_dialog_jp_katakana_ya - .word texture_dialog_jp_katakana_yu, texture_dialog_jp_katakana_yo, texture_dialog_jp_katakana_ra, texture_dialog_jp_katakana_ri - .word texture_dialog_jp_katakana_ru, texture_dialog_jp_katakana_re, texture_dialog_jp_katakana_ro, texture_dialog_jp_katakana_wa - .word 0x0, texture_dialog_jp_katakana_n, 0x0, texture_dialog_jp_long_vowel - .word texture_dialog_jp_hiragana_small_e, texture_dialog_jp_hiragana_small_tsu, texture_dialog_jp_hiragana_small_ka, texture_dialog_jp_hiragana_small_yu - .word texture_dialog_jp_hiragana_small_yo, texture_dialog_jp_hiragana_small_a, texture_dialog_jp_hiragana_small_i, texture_dialog_jp_hiragana_small_u - .word texture_dialog_jp_hiragana_small_o, 0x0, 0x0, 0x0 + .word texture_font_char_jp_hiragana_a, texture_font_char_jp_hiragana_i, texture_font_char_jp_hiragana_u, texture_font_char_jp_hiragana_c + .word texture_font_char_jp_hiragana_o, texture_font_char_jp_hiragana_ka, texture_font_char_jp_hiragana_ki, texture_font_char_jp_hiragana_ku + .word texture_font_char_jp_hiragana_ke, texture_font_char_jp_hiragana_ko, texture_font_char_jp_hiragana_sa, texture_font_char_jp_hiragana_shi + .word texture_font_char_jp_hiragana_su, texture_font_char_jp_hiragana_se, texture_font_char_jp_hiragana_so, texture_font_char_jp_hiragana_ta + .word texture_font_char_jp_hiragana_chi, texture_font_char_jp_hiragana_tsu, texture_font_char_jp_hiragana_te, texture_font_char_jp_hiragana_to + .word texture_font_char_jp_hiragana_na, texture_font_char_jp_hiragana_ni, texture_font_char_jp_hiragana_nu, texture_font_char_jp_hiragana_ne + .word texture_font_char_jp_hiragana_no, texture_font_char_jp_hiragana_ha, texture_font_char_jp_hiragana_hi, texture_font_char_jp_hiragana_hu + .word texture_font_char_jp_hiragana_he, texture_font_char_jp_hiragana_ho, texture_font_char_jp_hiragana_ma, texture_font_char_jp_hiragana_mi + .word texture_font_char_jp_hiragana_mu, texture_font_char_jp_hiragana_me, texture_font_char_jp_hiragana_mo, texture_font_char_jp_hiragana_ya + .word texture_font_char_jp_hiragana_yu, texture_font_char_jp_hiragana_yo, texture_font_char_jp_hiragana_ra, texture_font_char_jp_hiragana_ri + .word texture_font_char_jp_hiragana_ru, texture_font_char_jp_hiragana_re, texture_font_char_jp_hiragana_ro, texture_font_char_jp_hiragana_wa + .word texture_font_char_jp_hiragana_wo, texture_font_char_jp_hiragana_n, 0x0, texture_font_char_jp_comma + .word texture_font_char_jp_katakana_a, texture_font_char_jp_katakana_i, texture_font_char_jp_katakana_u, texture_font_char_jp_katakana_e + .word texture_font_char_jp_katakana_o, texture_font_char_jp_katakana_ka, texture_font_char_jp_katakana_ki, texture_font_char_jp_katakana_ku + .word texture_font_char_jp_katakana_ke, texture_font_char_jp_katakana_ko, texture_font_char_jp_katakana_sa, texture_font_char_jp_katakana_shi + .word texture_font_char_jp_katakana_su, texture_font_char_jp_katakana_se, texture_font_char_jp_katakana_so, texture_font_char_jp_katakana_ta + .word texture_font_char_jp_katakana_chi, texture_font_char_jp_katakana_tsu, texture_font_char_jp_katakana_te, texture_font_char_jp_katakana_to + .word texture_font_char_jp_katakana_na, texture_font_char_jp_katakana_ni, texture_font_char_jp_katakana_nu, texture_font_char_jp_katakana_ne + .word texture_font_char_jp_katakana_no, texture_font_char_jp_katakana_ha, texture_font_char_jp_katakana_hi, texture_font_char_jp_katakana_hu + .word texture_font_char_jp_katakana_he, texture_font_char_jp_katakana_ho, texture_font_char_jp_katakana_ma, texture_font_char_jp_katakana_mi + .word texture_font_char_jp_katakana_mu, texture_font_char_jp_katakana_me, texture_font_char_jp_katakana_mo, texture_font_char_jp_katakana_ya + .word texture_font_char_jp_katakana_yu, texture_font_char_jp_katakana_yo, texture_font_char_jp_katakana_ra, texture_font_char_jp_katakana_ri + .word texture_font_char_jp_katakana_ru, texture_font_char_jp_katakana_re, texture_font_char_jp_katakana_ro, texture_font_char_jp_katakana_wa + .word 0x0, texture_font_char_jp_katakana_n, 0x0, texture_font_char_jp_long_vowel + .word texture_font_char_jp_hiragana_small_e, texture_font_char_jp_hiragana_small_tsu, texture_font_char_jp_hiragana_small_ka, texture_font_char_jp_hiragana_small_yu + .word texture_font_char_jp_hiragana_small_yo, texture_font_char_jp_hiragana_small_a, texture_font_char_jp_hiragana_small_i, texture_font_char_jp_hiragana_small_u + .word texture_font_char_jp_hiragana_small_o, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 @@ -1597,22 +1597,22 @@ glabel seg2_small_font_lut .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 - .word texture_dialog_jp_katakana_small_e, texture_dialog_jp_katakana_small_tsu, texture_dialog_jp_katakana_small_ka, texture_dialog_jp_katakana_small_yu - .word texture_dialog_jp_katakana_small_yo, texture_dialog_jp_katakana_small_a, texture_dialog_jp_katakana_small_i, texture_dialog_jp_katakana_small_u - .word texture_dialog_jp_katakana_small_o, 0x0, 0x0, 0x0 + .word texture_font_char_jp_katakana_small_e, texture_font_char_jp_katakana_small_tsu, texture_font_char_jp_katakana_small_ka, texture_font_char_jp_katakana_small_yu + .word texture_font_char_jp_katakana_small_yo, texture_font_char_jp_katakana_small_a, texture_font_char_jp_katakana_small_i, texture_font_char_jp_katakana_small_u + .word texture_font_char_jp_katakana_small_o, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 - .word 0x0, texture_dialog_jp_open_parentheses, texture_dialog_jp_close_open_parentheses, texture_dialog_jp_close_parentheses - .word texture_dialog_jp_left_right_arrow, 0x0, 0x0, 0x0 + .word 0x0, texture_font_char_jp_open_parentheses, texture_font_char_jp_close_open_parentheses, texture_font_char_jp_close_parentheses + .word texture_font_char_jp_left_right_arrow, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 .word 0x0, 0x0, 0x0, 0x0 - .word texture_dialog_jp_dakuten, texture_dialog_jp_handakuten, texture_dialog_jp_exclamation, texture_dialog_jp_percent - .word texture_dialog_jp_question, texture_dialog_jp_double_quotation_open, texture_dialog_jp_double_quotation_close, texture_dialog_jp_wave_dash - .word texture_dialog_jp_ellipsis, texture_dialog_jp_coin, texture_dialog_jp_star_filled, texture_dialog_jp_multiply - .word texture_dialog_jp_interpunct, texture_dialog_jp_star_hollow, 0x0, 0x0 + .word texture_font_char_jp_dakuten, texture_font_char_jp_handakuten, texture_font_char_jp_exclamation, texture_font_char_jp_percent + .word texture_font_char_jp_question, texture_font_char_jp_double_quotation_open, texture_font_char_jp_double_quotation_close, texture_font_char_jp_wave_dash + .word texture_font_char_jp_ellipsis, texture_font_char_jp_coin, texture_font_char_jp_star_filled, texture_font_char_jp_multiply + .word texture_font_char_jp_interpunct, texture_font_char_jp_star_hollow, 0x0, 0x0 .endif # credits font LUT 0x02008738-0x020087CB -glabel seg2_credits_font_lut +glabel main_credits_font_lut .word 0x0, 0x0, 0x0, texture_credits_char_3 .word texture_credits_char_4, 0x0, texture_credits_char_6, 0x0 .word 0x0, 0x0, texture_credits_char_A, texture_credits_char_B @@ -1625,9 +1625,9 @@ glabel seg2_credits_font_lut .word texture_credits_char_period # HUD camera table 0x020087CC-0x020087E3 -glabel seg2_hud_camera_lut -.word texture_colorful_char_camera, texture_colorful_char_mario_head, texture_colorful_char_lakitu, texture_colorful_char_no_camera -.word texture_colorful_char_arrow_up, texture_colorful_char_arrow_down +glabel main_hud_camera_lut +.word texture_hud_char_camera, texture_hud_char_mario_head, texture_hud_char_lakitu, texture_hud_char_no_camera +.word texture_hud_char_arrow_up, texture_hud_char_arrow_down .macro textdata name .if VERSION_US == 1 @@ -1893,7 +1893,7 @@ gsSPEndDisplayList glabel dl_billboard_num_0 # 0x0200F078 - 0x0200F0A8 gsSPDisplayList dl_billboard_num_begin -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_colorful_num_0 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_hud_char_0 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x0FF, 0x200 gsSPDisplayList dl_billboard_num_end @@ -1901,7 +1901,7 @@ gsSPEndDisplayList glabel dl_billboard_num_1 # 0x0200F0A8 - 0x0200F0D8 gsSPDisplayList dl_billboard_num_begin -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_colorful_num_1 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_hud_char_1 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x0FF, 0x200 gsSPDisplayList dl_billboard_num_end @@ -1909,7 +1909,7 @@ gsSPEndDisplayList glabel dl_billboard_num_2 # 0x0200F0D8 - 0x0200F108 gsSPDisplayList dl_billboard_num_begin -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_colorful_num_2 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_hud_char_2 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x0FF, 0x200 gsSPDisplayList dl_billboard_num_end @@ -1917,7 +1917,7 @@ gsSPEndDisplayList glabel dl_billboard_num_3 # 0x0200F108 - 0x0200F138 gsSPDisplayList dl_billboard_num_begin -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_colorful_num_3 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_hud_char_3 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x0FF, 0x200 gsSPDisplayList dl_billboard_num_end @@ -1925,7 +1925,7 @@ gsSPEndDisplayList glabel dl_billboard_num_4 # 0x0200F138 - 0x0200F168 gsSPDisplayList dl_billboard_num_begin -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_colorful_num_4 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_hud_char_4 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x0FF, 0x200 gsSPDisplayList dl_billboard_num_end @@ -1933,7 +1933,7 @@ gsSPEndDisplayList glabel dl_billboard_num_5 # 0x0200F168 - 0x0200F198 gsSPDisplayList dl_billboard_num_begin -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_colorful_num_5 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_hud_char_5 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x0FF, 0x200 gsSPDisplayList dl_billboard_num_end @@ -1941,7 +1941,7 @@ gsSPEndDisplayList glabel dl_billboard_num_6 # 0x0200F198 - 0x0200F1C8 gsSPDisplayList dl_billboard_num_begin -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_colorful_num_6 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_hud_char_6 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x0FF, 0x200 gsSPDisplayList dl_billboard_num_end @@ -1949,7 +1949,7 @@ gsSPEndDisplayList glabel dl_billboard_num_7 # 0x0200F1C8 - 0x0200F1F8 gsSPDisplayList dl_billboard_num_begin -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_colorful_num_7 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_hud_char_7 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x0FF, 0x200 gsSPDisplayList dl_billboard_num_end @@ -1957,7 +1957,7 @@ gsSPEndDisplayList glabel dl_billboard_num_8 # 0x0200F1F8 - 0x0200F228 gsSPDisplayList dl_billboard_num_begin -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_colorful_num_8 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_hud_char_8 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x0FF, 0x200 gsSPDisplayList dl_billboard_num_end @@ -1965,7 +1965,7 @@ gsSPEndDisplayList glabel dl_billboard_num_9 # 0x0200F228 - 0x0200F258 gsSPDisplayList dl_billboard_num_begin -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_colorful_num_9 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_hud_char_9 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x0FF, 0x200 gsSPDisplayList dl_billboard_num_end diff --git a/charmap.txt b/charmap.txt index 370f011..a1e8b4f 100644 --- a/charmap.txt +++ b/charmap.txt @@ -62,6 +62,10 @@ 'z' = 0x3D '\'' = 0x3E '.' = 0x3F + +# Mario face US/EU menu string (Note: NOT multi-text, each char has a part of the face) +'☺' = 0x40, 0x41 + 'あ' = 0x40 'い' = 0x41 'う' = 0x42 @@ -154,6 +158,8 @@ 'レ' = 0x99 'ロ' = 0x9A 'ワ' = 0x9B +# 0x9C is unused, only defined in jp menu char lut +'ヲ' = 0x9C 'ン' = 0x9D ' ' = 0x9E '-' = 0x9F @@ -177,11 +183,8 @@ 'ォ' = 0xD8 '[%]' = 0xE0 '(' = 0xE1 -'{' = 0xE1 ')(' = 0xE2 ')' = 0xE3 -# these two are a hack because US depends on the non combined character. TODO: Better way to handle this? -'}' = 0xE3 '+' = 0xE4 '&' = 0xE5 ':' = 0xE6 @@ -193,13 +196,13 @@ '~' = 0xF7 '…' = 0xF8 '$' = 0xF9 -'*' = 0xFA -'[x]' = 0xFB +'★' = 0xFA +'×' = 0xFB '・' = 0xFC -'#' = 0xFD +'☆' = 0xFD '\n' = 0xFE -# kana with dakuten +# kana or hira with dakuten 'が' = 0xF0, 0x45 'ぎ' = 0xF0, 0x46 'ぐ' = 0xF0, 0x47 @@ -241,7 +244,7 @@ 'ベ' = 0xF0, 0x8C 'ボ' = 0xF0, 0x8D -# kana with handakuten +# kana or hira with handakuten 'ぱ' = 0xF1, 0x59 'ぴ' = 0xF1, 0x5A 'ぷ' = 0xF1, 0x5B diff --git a/charmap_menu.txt b/charmap_menu.txt new file mode 100644 index 0000000..60a14d6 --- /dev/null +++ b/charmap_menu.txt @@ -0,0 +1,30 @@ +# Menu HUD chars, only used in JP +# Char values used by text_menu_strings.h.in +'フ' = 0x00 +'ァ' = 0x01 +'イ' = 0x02 +'ル' = 0x03 +'セ' = 0x04 +'レ' = 0x05 +'ク' = 0x06 +'ト' = 0x07 +'を' = 0x08 +'コ' = 0x09 +'ピ' = 0x0A +'ー' = 0x0B +'す' = 0x0C +'る' = 0x0D +'け' = 0x0E +'マ' = 0x0F +'リ' = 0x10 +'オ' = 0x11 +'ス' = 0x12 +'ア' = 0x13 +'み' = 0x14 +'ど' = 0x15 +'の' = 0x16 +'?' = 0x17 +'サ' = 0x18 +'ウ' = 0x19 +'ン' = 0x1A +'ド' = 0x1B diff --git a/data/behavior_data.s b/data/behavior_data.s index 0b2cf24..24081af 100644 --- a/data/behavior_data.s +++ b/data/behavior_data.s @@ -241,7 +241,8 @@ .macro obj_child model_id, beh bytes4 0x1C, 0x00, 0x00, 0x00 - .word \model_id, \beh + .word \model_id + .word \beh .endm .macro deactivate @@ -3301,35 +3302,35 @@ glabel bhvYellowBackgroundInMenu # 2FA0 glabel bhvMenuButton # 2FC4 begin OBJ_LIST_LEVEL obj_or_int objFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE - callnative bhvMenuButton_init + callnative bhv_menu_button_init begin_loop obj_set_int objIntangibleTimer, 0 - callnative bhvMenuButton_loop + callnative bhv_menu_button_loop end_loop glabel bhvMenuButtonManager # 2FE8 begin OBJ_LIST_LEVEL obj_or_int objFlags, (OBJ_FLAG_0800 | OBJ_FLAG_0020 | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE) - callnative bhvMenuButtonManager_init + callnative bhv_menu_button_manager_init begin_loop obj_set_int objIntangibleTimer, 0 - callnative bhvMenuButtonManager_loop + callnative bhv_menu_button_manager_loop end_loop -glabel bhvStarInActSelector # 300C +glabel bhvActSelectorStarType # 300C begin OBJ_LIST_DEFAULT obj_or_int objFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE obj_set_pos begin_loop - callnative BehStarActSelectorLoop + callnative bhv_act_selector_star_type_loop end_loop glabel bhvActSelector # 3028 begin OBJ_LIST_DEFAULT obj_or_int objFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE - callnative BehActSelectorInit + callnative bhv_act_selector_init begin_loop - callnative BehActSelectorLoop + callnative bhv_act_selector_loop end_loop glabel bhvMovingYellowCoin # 3048 diff --git a/data/trig_tables.s b/data/trig_tables.s index 0c22b9c..62f484d 100644 --- a/data/trig_tables.s +++ b/data/trig_tables.s @@ -3,5127 +3,5127 @@ .section .data glabel gSineTable -.word 0x00000000 -.word 0x3AC90FD5 -.word 0x3B490FC6 -.word 0x3B96CBC1 -.word 0x3BC90F88 -.word 0x3BFB5330 -.word 0x3C16CB58 -.word 0x3C2FED02 -.word 0x3C490E90 -.word 0x3C622FFF -.word 0x3C7B514B -.word 0x3C8A3938 -.word 0x3C96C9B6 -.word 0x3CA35A1C -.word 0x3CAFEA69 -.word 0x3CBC7A9B -.word 0x3CC90AB0 -.word 0x3CD59AA6 -.word 0x3CE22A7A -.word 0x3CEEBA2C -.word 0x3CFB49BA -.word 0x3D03EC90 -.word 0x3D0A342F -.word 0x3D107BB8 -.word 0x3D16C32C -.word 0x3D1D0A88 -.word 0x3D2351CB -.word 0x3D2998F6 -.word 0x3D2FE007 -.word 0x3D3626FC -.word 0x3D3C6DD5 -.word 0x3D42B491 -.word 0x3D48FB30 -.word 0x3D4F41AF -.word 0x3D55880E -.word 0x3D5BCE4C -.word 0x3D621469 -.word 0x3D685A62 -.word 0x3D6EA038 -.word 0x3D74E5E9 -.word 0x3D7B2B74 -.word 0x3D80B86C -.word 0x3D83DB0A -.word 0x3D86FD94 -.word 0x3D8A200A -.word 0x3D8D426A -.word 0x3D9064B4 -.word 0x3D9386E7 -.word 0x3D96A905 -.word 0x3D99CB0A -.word 0x3D9CECF9 -.word 0x3DA00ECF -.word 0x3DA3308C -.word 0x3DA65230 -.word 0x3DA973BA -.word 0x3DAC952B -.word 0x3DAFB680 -.word 0x3DB2D7BB -.word 0x3DB5F8DA -.word 0x3DB919DD -.word 0x3DBC3AC3 -.word 0x3DBF5B8D -.word 0x3DC27C39 -.word 0x3DC59CC6 -.word 0x3DC8BD36 -.word 0x3DCBDD86 -.word 0x3DCEFDB7 -.word 0x3DD21DC8 -.word 0x3DD53DB9 -.word 0x3DD85D89 -.word 0x3DDB7D37 -.word 0x3DDE9CC4 -.word 0x3DE1BC2E -.word 0x3DE4DB76 -.word 0x3DE7FA9A -.word 0x3DEB199A -.word 0x3DEE3876 -.word 0x3DF1572E -.word 0x3DF475C0 -.word 0x3DF7942C -.word 0x3DFAB273 -.word 0x3DFDD092 -.word 0x3E007745 -.word 0x3E02062E -.word 0x3E039502 -.word 0x3E0523C2 -.word 0x3E06B26E -.word 0x3E084105 -.word 0x3E09CF86 -.word 0x3E0B5DF3 -.word 0x3E0CEC4A -.word 0x3E0E7A8B -.word 0x3E1008B7 -.word 0x3E1196CC -.word 0x3E1324CA -.word 0x3E14B2B2 -.word 0x3E164083 -.word 0x3E17CE3D -.word 0x3E195BE0 -.word 0x3E1AE96B -.word 0x3E1C76DE -.word 0x3E1E0438 -.word 0x3E1F917B -.word 0x3E211EA5 -.word 0x3E22ABB6 -.word 0x3E2438AD -.word 0x3E25C58C -.word 0x3E275251 -.word 0x3E28DEFC -.word 0x3E2A6B8D -.word 0x3E2BF804 -.word 0x3E2D8461 -.word 0x3E2F10A2 -.word 0x3E309CC9 -.word 0x3E3228D4 -.word 0x3E33B4C4 -.word 0x3E354098 -.word 0x3E36CC50 -.word 0x3E3857EC -.word 0x3E39E36C -.word 0x3E3B6ECF -.word 0x3E3CFA15 -.word 0x3E3E853E -.word 0x3E401049 -.word 0x3E419B37 -.word 0x3E432607 -.word 0x3E44B0B9 -.word 0x3E463B4D -.word 0x3E47C5C2 -.word 0x3E495018 -.word 0x3E4ADA4F -.word 0x3E4C6467 -.word 0x3E4DEE60 -.word 0x3E4F7838 -.word 0x3E5101F1 -.word 0x3E528B89 -.word 0x3E541501 -.word 0x3E559E58 -.word 0x3E57278F -.word 0x3E58B0A4 -.word 0x3E5A3997 -.word 0x3E5BC26A -.word 0x3E5D4B1A -.word 0x3E5ED3A8 -.word 0x3E605C13 -.word 0x3E61E45C -.word 0x3E636C83 -.word 0x3E64F486 -.word 0x3E667C66 -.word 0x3E680422 -.word 0x3E698BBA -.word 0x3E6B132F -.word 0x3E6C9A7F -.word 0x3E6E21AB -.word 0x3E6FA8B2 -.word 0x3E712F94 -.word 0x3E72B651 -.word 0x3E743CE8 -.word 0x3E75C35A -.word 0x3E7749A6 -.word 0x3E78CFCC -.word 0x3E7A55CB -.word 0x3E7BDBA4 -.word 0x3E7D6156 -.word 0x3E7EE6E1 -.word 0x3E803622 -.word 0x3E80F8C0 -.word 0x3E81BB4A -.word 0x3E827DC0 -.word 0x3E834022 -.word 0x3E840270 -.word 0x3E84C4AA -.word 0x3E8586CE -.word 0x3E8648DF -.word 0x3E870ADA -.word 0x3E87CCC1 -.word 0x3E888E93 -.word 0x3E895050 -.word 0x3E8A11F7 -.word 0x3E8AD38A -.word 0x3E8B9507 -.word 0x3E8C566E -.word 0x3E8D17C0 -.word 0x3E8DD8FC -.word 0x3E8E9A22 -.word 0x3E8F5B32 -.word 0x3E901C2C -.word 0x3E90DD10 -.word 0x3E919DDD -.word 0x3E925E94 -.word 0x3E931F35 -.word 0x3E93DFBF -.word 0x3E94A031 -.word 0x3E95608D -.word 0x3E9620D2 -.word 0x3E96E100 -.word 0x3E97A117 -.word 0x3E986116 -.word 0x3E9920FE -.word 0x3E99E0CE -.word 0x3E9AA086 -.word 0x3E9B6027 -.word 0x3E9C1FAF -.word 0x3E9CDF20 -.word 0x3E9D9E78 -.word 0x3E9E5DB8 -.word 0x3E9F1CDF -.word 0x3E9FDBEE -.word 0x3EA09AE5 -.word 0x3EA159C2 -.word 0x3EA21887 -.word 0x3EA2D733 -.word 0x3EA395C5 -.word 0x3EA4543F -.word 0x3EA5129F -.word 0x3EA5D0E5 -.word 0x3EA68F12 -.word 0x3EA74D25 -.word 0x3EA80B1F -.word 0x3EA8C8FE -.word 0x3EA986C4 -.word 0x3EAA446F -.word 0x3EAB0201 -.word 0x3EABBF77 -.word 0x3EAC7CD4 -.word 0x3EAD3A15 -.word 0x3EADF73C -.word 0x3EAEB449 -.word 0x3EAF713A -.word 0x3EB02E10 -.word 0x3EB0EACB -.word 0x3EB1A76B -.word 0x3EB263EF -.word 0x3EB32058 -.word 0x3EB3DCA5 -.word 0x3EB498D6 -.word 0x3EB554EC -.word 0x3EB610E6 -.word 0x3EB6CCC3 -.word 0x3EB78884 -.word 0x3EB8442A -.word 0x3EB8FFB2 -.word 0x3EB9BB1E -.word 0x3EBA766E -.word 0x3EBB31A0 -.word 0x3EBBECB6 -.word 0x3EBCA7AF -.word 0x3EBD628B -.word 0x3EBE1D4A -.word 0x3EBED7EB -.word 0x3EBF926F -.word 0x3EC04CD5 -.word 0x3EC1071E -.word 0x3EC1C148 -.word 0x3EC27B55 -.word 0x3EC33544 -.word 0x3EC3EF15 -.word 0x3EC4A8C8 -.word 0x3EC5625C -.word 0x3EC61BD2 -.word 0x3EC6D529 -.word 0x3EC78E62 -.word 0x3EC8477C -.word 0x3EC90077 -.word 0x3EC9B953 -.word 0x3ECA7210 -.word 0x3ECB2AAE -.word 0x3ECBE32C -.word 0x3ECC9B8B -.word 0x3ECD53CA -.word 0x3ECE0BEA -.word 0x3ECEC3EA -.word 0x3ECF7BCA -.word 0x3ED0338A -.word 0x3ED0EB2A -.word 0x3ED1A2AA -.word 0x3ED25A09 -.word 0x3ED31148 -.word 0x3ED3C867 -.word 0x3ED47F64 -.word 0x3ED53641 -.word 0x3ED5ECFD -.word 0x3ED6A399 -.word 0x3ED75A13 -.word 0x3ED8106B -.word 0x3ED8C6A3 -.word 0x3ED97CB9 -.word 0x3EDA32AD -.word 0x3EDAE880 -.word 0x3EDB9E31 -.word 0x3EDC53C1 -.word 0x3EDD092E -.word 0x3EDDBE79 -.word 0x3EDE73A2 -.word 0x3EDF28A9 -.word 0x3EDFDD8D -.word 0x3EE0924F -.word 0x3EE146EE -.word 0x3EE1FB6A -.word 0x3EE2AFC4 -.word 0x3EE363FA -.word 0x3EE4180E -.word 0x3EE4CBFE -.word 0x3EE57FCB -.word 0x3EE63375 -.word 0x3EE6E6FB -.word 0x3EE79A5D -.word 0x3EE84D9C -.word 0x3EE900B7 -.word 0x3EE9B3AE -.word 0x3EEA6681 -.word 0x3EEB1930 -.word 0x3EEBCBBB -.word 0x3EEC7E21 -.word 0x3EED3063 -.word 0x3EEDE280 -.word 0x3EEE9479 -.word 0x3EEF464C -.word 0x3EEFF7FB -.word 0x3EF0A985 -.word 0x3EF15AEA -.word 0x3EF20C29 -.word 0x3EF2BD43 -.word 0x3EF36E38 -.word 0x3EF41F07 -.word 0x3EF4CFB1 -.word 0x3EF58035 -.word 0x3EF63093 -.word 0x3EF6E0CB -.word 0x3EF790DC -.word 0x3EF840C8 -.word 0x3EF8F08E -.word 0x3EF9A02D -.word 0x3EFA4FA5 -.word 0x3EFAFEF7 -.word 0x3EFBAE22 -.word 0x3EFC5D27 -.word 0x3EFD0C04 -.word 0x3EFDBABB -.word 0x3EFE694A -.word 0x3EFF17B2 -.word 0x3EFFC5F3 -.word 0x3F003A06 -.word 0x3F0090FF -.word 0x3F00E7E4 -.word 0x3F013EB5 -.word 0x3F019573 -.word 0x3F01EC1C -.word 0x3F0242B1 -.word 0x3F029932 -.word 0x3F02EF9F -.word 0x3F0345F8 -.word 0x3F039C3D -.word 0x3F03F26D -.word 0x3F044889 -.word 0x3F049E91 -.word 0x3F04F484 -.word 0x3F054A62 -.word 0x3F05A02C -.word 0x3F05F5E2 -.word 0x3F064B82 -.word 0x3F06A10E -.word 0x3F06F686 -.word 0x3F074BE8 -.word 0x3F07A136 -.word 0x3F07F66F -.word 0x3F084B92 -.word 0x3F08A0A1 -.word 0x3F08F59B -.word 0x3F094A7F -.word 0x3F099F4E -.word 0x3F09F409 -.word 0x3F0A48AD -.word 0x3F0A9D3D -.word 0x3F0AF1B7 -.word 0x3F0B461C -.word 0x3F0B9A6B -.word 0x3F0BEEA5 -.word 0x3F0C42C9 -.word 0x3F0C96D7 -.word 0x3F0CEAD0 -.word 0x3F0D3EB3 -.word 0x3F0D9281 -.word 0x3F0DE638 -.word 0x3F0E39DA -.word 0x3F0E8D65 -.word 0x3F0EE0DB -.word 0x3F0F343B -.word 0x3F0F8784 -.word 0x3F0FDAB8 -.word 0x3F102DD5 -.word 0x3F1080DC -.word 0x3F10D3CD -.word 0x3F1126A7 -.word 0x3F11796B -.word 0x3F11CC19 -.word 0x3F121EB0 -.word 0x3F127130 -.word 0x3F12C39A -.word 0x3F1315EE -.word 0x3F13682A -.word 0x3F13BA50 -.word 0x3F140C5F -.word 0x3F145E58 -.word 0x3F14B039 -.word 0x3F150204 -.word 0x3F1553B7 -.word 0x3F15A554 -.word 0x3F15F6D9 -.word 0x3F164847 -.word 0x3F16999F -.word 0x3F16EADE -.word 0x3F173C07 -.word 0x3F178D18 -.word 0x3F17DE12 -.word 0x3F182EF5 -.word 0x3F187FC0 -.word 0x3F18D073 -.word 0x3F19210F -.word 0x3F197194 -.word 0x3F19C200 -.word 0x3F1A1255 -.word 0x3F1A6293 -.word 0x3F1AB2B8 -.word 0x3F1B02C6 -.word 0x3F1B52BB -.word 0x3F1BA299 -.word 0x3F1BF25F -.word 0x3F1C420C -.word 0x3F1C91A2 -.word 0x3F1CE11F -.word 0x3F1D3084 -.word 0x3F1D7FD1 -.word 0x3F1DCF06 -.word 0x3F1E1E22 -.word 0x3F1E6D26 -.word 0x3F1EBC12 -.word 0x3F1F0AE5 -.word 0x3F1F599F -.word 0x3F1FA841 -.word 0x3F1FF6CB -.word 0x3F20453B -.word 0x3F209393 -.word 0x3F20E1D2 -.word 0x3F212FF9 -.word 0x3F217E06 -.word 0x3F21CBFB -.word 0x3F2219D7 -.word 0x3F226799 -.word 0x3F22B543 -.word 0x3F2302D3 -.word 0x3F23504B -.word 0x3F239DA9 -.word 0x3F23EAEE -.word 0x3F24381A -.word 0x3F24852C -.word 0x3F24D225 -.word 0x3F251F04 -.word 0x3F256BCB -.word 0x3F25B877 -.word 0x3F26050A -.word 0x3F265184 -.word 0x3F269DE3 -.word 0x3F26EA2A -.word 0x3F273656 -.word 0x3F278268 -.word 0x3F27CE61 -.word 0x3F281A40 -.word 0x3F286605 -.word 0x3F28B1B0 -.word 0x3F28FD41 -.word 0x3F2948B8 -.word 0x3F299415 -.word 0x3F29DF57 -.word 0x3F2A2A80 -.word 0x3F2A758E -.word 0x3F2AC082 -.word 0x3F2B0B5B -.word 0x3F2B561B -.word 0x3F2BA0BF -.word 0x3F2BEB4A -.word 0x3F2C35B9 -.word 0x3F2C800F -.word 0x3F2CCA49 -.word 0x3F2D1469 -.word 0x3F2D5E6F -.word 0x3F2DA859 -.word 0x3F2DF229 -.word 0x3F2E3BDE -.word 0x3F2E8578 -.word 0x3F2ECEF7 -.word 0x3F2F185B -.word 0x3F2F61A5 -.word 0x3F2FAAD3 -.word 0x3F2FF3E6 -.word 0x3F303CDE -.word 0x3F3085BB -.word 0x3F30CE7C -.word 0x3F311722 -.word 0x3F315FAD -.word 0x3F31A81D -.word 0x3F31F071 -.word 0x3F3238AA -.word 0x3F3280C7 -.word 0x3F32C8C9 -.word 0x3F3310AF -.word 0x3F33587A -.word 0x3F33A029 -.word 0x3F33E7BC -.word 0x3F342F34 -.word 0x3F34768F -.word 0x3F34BDCF -.word 0x3F3504F3 -.word 0x3F354BFB -.word 0x3F3592E7 -.word 0x3F35D9B8 -.word 0x3F36206C -.word 0x3F366704 -.word 0x3F36AD7F -.word 0x3F36F3DF -.word 0x3F373A23 -.word 0x3F37804A -.word 0x3F37C655 -.word 0x3F380C43 -.word 0x3F385216 -.word 0x3F3897CB -.word 0x3F38DD65 -.word 0x3F3922E1 -.word 0x3F396842 -.word 0x3F39AD85 -.word 0x3F39F2AC -.word 0x3F3A37B7 -.word 0x3F3A7CA4 -.word 0x3F3AC175 -.word 0x3F3B0629 -.word 0x3F3B4AC1 -.word 0x3F3B8F3B -.word 0x3F3BD398 -.word 0x3F3C17D9 -.word 0x3F3C5BFC -.word 0x3F3CA003 -.word 0x3F3CE3EC -.word 0x3F3D27B8 -.word 0x3F3D6B67 -.word 0x3F3DAEF9 -.word 0x3F3DF26E -.word 0x3F3E35C5 -.word 0x3F3E78FF -.word 0x3F3EBC1B -.word 0x3F3EFF1B -.word 0x3F3F41FC -.word 0x3F3F84C0 -.word 0x3F3FC767 -.word 0x3F4009F0 -.word 0x3F404C5C -.word 0x3F408EA9 -.word 0x3F40D0DA -.word 0x3F4112EC -.word 0x3F4154E1 -.word 0x3F4196B7 -.word 0x3F41D870 -.word 0x3F421A0B -.word 0x3F425B89 -.word 0x3F429CE8 -.word 0x3F42DE29 -.word 0x3F431F4C -.word 0x3F436051 -.word 0x3F43A138 -.word 0x3F43E200 -.word 0x3F4422AB -.word 0x3F446337 -.word 0x3F44A3A5 -.word 0x3F44E3F5 -.word 0x3F452426 -.word 0x3F456439 -.word 0x3F45A42D -.word 0x3F45E403 -.word 0x3F4623BB -.word 0x3F466354 -.word 0x3F46A2CE -.word 0x3F46E22A -.word 0x3F472167 -.word 0x3F476085 -.word 0x3F479F84 -.word 0x3F47DE65 -.word 0x3F481D27 -.word 0x3F485BCA -.word 0x3F489A4E -.word 0x3F48D8B3 -.word 0x3F4916FA -.word 0x3F495521 -.word 0x3F499329 -.word 0x3F49D112 -.word 0x3F4A0EDC -.word 0x3F4A4C87 -.word 0x3F4A8A13 -.word 0x3F4AC77F -.word 0x3F4B04CC -.word 0x3F4B41FA -.word 0x3F4B7F09 -.word 0x3F4BBBF8 -.word 0x3F4BF8C7 -.word 0x3F4C3578 -.word 0x3F4C7208 -.word 0x3F4CAE79 -.word 0x3F4CEACB -.word 0x3F4D26FD -.word 0x3F4D6310 -.word 0x3F4D9F02 -.word 0x3F4DDAD5 -.word 0x3F4E1689 -.word 0x3F4E521C -.word 0x3F4E8D90 -.word 0x3F4EC8E4 -.word 0x3F4F0417 -.word 0x3F4F3F2B -.word 0x3F4F7A1F -.word 0x3F4FB4F4 -.word 0x3F4FEFA8 -.word 0x3F502A3B -.word 0x3F5064AF -.word 0x3F509F03 -.word 0x3F50D937 -.word 0x3F51134A -.word 0x3F514D3D -.word 0x3F518710 -.word 0x3F51C0C2 -.word 0x3F51FA54 -.word 0x3F5233C6 -.word 0x3F526D18 -.word 0x3F52A649 -.word 0x3F52DF59 -.word 0x3F531849 -.word 0x3F535118 -.word 0x3F5389C7 -.word 0x3F53C255 -.word 0x3F53FAC3 -.word 0x3F54330F -.word 0x3F546B3B -.word 0x3F54A347 -.word 0x3F54DB31 -.word 0x3F5512FB -.word 0x3F554AA4 -.word 0x3F55822C -.word 0x3F55B993 -.word 0x3F55F0D9 -.word 0x3F5627FE -.word 0x3F565F02 -.word 0x3F5695E5 -.word 0x3F56CCA7 -.word 0x3F570348 -.word 0x3F5739C7 -.word 0x3F577026 -.word 0x3F57A663 -.word 0x3F57DC7F -.word 0x3F581279 -.word 0x3F584853 -.word 0x3F587E0B -.word 0x3F58B3A1 -.word 0x3F58E916 -.word 0x3F591E6A -.word 0x3F59539C -.word 0x3F5988AD -.word 0x3F59BD9C -.word 0x3F59F26A -.word 0x3F5A2716 -.word 0x3F5A5BA0 -.word 0x3F5A9009 -.word 0x3F5AC450 -.word 0x3F5AF875 -.word 0x3F5B2C79 -.word 0x3F5B605A -.word 0x3F5B941A -.word 0x3F5BC7B8 -.word 0x3F5BFB34 -.word 0x3F5C2E8E -.word 0x3F5C61C7 -.word 0x3F5C94DD -.word 0x3F5CC7D1 -.word 0x3F5CFAA3 -.word 0x3F5D2D53 -.word 0x3F5D5FE1 -.word 0x3F5D924D -.word 0x3F5DC497 -.word 0x3F5DF6BE -.word 0x3F5E28C3 -.word 0x3F5E5AA6 -.word 0x3F5E8C67 -.word 0x3F5EBE05 -.word 0x3F5EEF81 -.word 0x3F5F20DB -.word 0x3F5F5212 -.word 0x3F5F8327 -.word 0x3F5FB419 -.word 0x3F5FE4E9 -.word 0x3F601596 -.word 0x3F604621 -.word 0x3F607689 -.word 0x3F60A6CF -.word 0x3F60D6F2 -.word 0x3F6106F2 -.word 0x3F6136D0 -.word 0x3F61668A -.word 0x3F619622 -.word 0x3F61C598 -.word 0x3F61F4EA -.word 0x3F62241A -.word 0x3F625326 -.word 0x3F628210 -.word 0x3F62B0D7 -.word 0x3F62DF7B -.word 0x3F630DFC -.word 0x3F633C5A -.word 0x3F636A95 -.word 0x3F6398AC -.word 0x3F63C6A1 -.word 0x3F63F473 -.word 0x3F642221 -.word 0x3F644FAC -.word 0x3F647D14 -.word 0x3F64AA59 -.word 0x3F64D77B -.word 0x3F650479 -.word 0x3F653154 -.word 0x3F655E0B -.word 0x3F658AA0 -.word 0x3F65B710 -.word 0x3F65E35E -.word 0x3F660F88 -.word 0x3F663B8E -.word 0x3F666771 -.word 0x3F669330 -.word 0x3F66BECC -.word 0x3F66EA45 -.word 0x3F671599 -.word 0x3F6740CA -.word 0x3F676BD8 -.word 0x3F6796C1 -.word 0x3F67C187 -.word 0x3F67EC29 -.word 0x3F6816A8 -.word 0x3F684103 -.word 0x3F686B39 -.word 0x3F68954C -.word 0x3F68BF3C -.word 0x3F68E907 -.word 0x3F6912AE -.word 0x3F693C32 -.word 0x3F696591 -.word 0x3F698ECC -.word 0x3F69B7E4 -.word 0x3F69E0D7 -.word 0x3F6A09A7 -.word 0x3F6A3252 -.word 0x3F6A5AD9 -.word 0x3F6A833C -.word 0x3F6AAB7B -.word 0x3F6AD395 -.word 0x3F6AFB8C -.word 0x3F6B235E -.word 0x3F6B4B0C -.word 0x3F6B7295 -.word 0x3F6B99FB -.word 0x3F6BC13B -.word 0x3F6BE858 -.word 0x3F6C0F50 -.word 0x3F6C3624 -.word 0x3F6C5CD4 -.word 0x3F6C835E -.word 0x3F6CA9C5 -.word 0x3F6CD007 -.word 0x3F6CF624 -.word 0x3F6D1C1D -.word 0x3F6D41F2 -.word 0x3F6D67A1 -.word 0x3F6D8D2D -.word 0x3F6DB293 -.word 0x3F6DD7D5 -.word 0x3F6DFCF2 -.word 0x3F6E21EB -.word 0x3F6E46BE -.word 0x3F6E6B6D -.word 0x3F6E8FF8 -.word 0x3F6EB45D -.word 0x3F6ED89E -.word 0x3F6EFCBA -.word 0x3F6F20B0 -.word 0x3F6F4483 -.word 0x3F6F6830 -.word 0x3F6F8BB8 -.word 0x3F6FAF1B -.word 0x3F6FD25A -.word 0x3F6FF573 -.word 0x3F701867 -.word 0x3F703B37 -.word 0x3F705DE1 -.word 0x3F708066 -.word 0x3F70A2C6 -.word 0x3F70C501 -.word 0x3F70E717 -.word 0x3F710908 -.word 0x3F712AD4 -.word 0x3F714C7A -.word 0x3F716DFB -.word 0x3F718F57 -.word 0x3F71B08E -.word 0x3F71D19F -.word 0x3F71F28C -.word 0x3F721352 -.word 0x3F7233F4 -.word 0x3F725470 -.word 0x3F7274C7 -.word 0x3F7294F8 -.word 0x3F72B504 -.word 0x3F72D4EB -.word 0x3F72F4AC -.word 0x3F731447 -.word 0x3F7333BE -.word 0x3F73530E -.word 0x3F737239 -.word 0x3F73913F -.word 0x3F73B01F -.word 0x3F73CED9 -.word 0x3F73ED6E -.word 0x3F740BDD -.word 0x3F742A27 -.word 0x3F74484B -.word 0x3F746649 -.word 0x3F748422 -.word 0x3F74A1D5 -.word 0x3F74BF62 -.word 0x3F74DCC9 -.word 0x3F74FA0B -.word 0x3F751727 -.word 0x3F75341D -.word 0x3F7550ED -.word 0x3F756D97 -.word 0x3F758A1C -.word 0x3F75A67B -.word 0x3F75C2B3 -.word 0x3F75DEC6 -.word 0x3F75FAB3 -.word 0x3F76167A -.word 0x3F76321B -.word 0x3F764D97 -.word 0x3F7668EC -.word 0x3F76841B -.word 0x3F769F24 -.word 0x3F76BA07 -.word 0x3F76D4C4 -.word 0x3F76EF5B -.word 0x3F7709CC -.word 0x3F772417 -.word 0x3F773E3C -.word 0x3F77583A -.word 0x3F777213 -.word 0x3F778BC5 -.word 0x3F77A551 -.word 0x3F77BEB7 -.word 0x3F77D7F7 -.word 0x3F77F110 -.word 0x3F780A04 -.word 0x3F7822D1 -.word 0x3F783B77 -.word 0x3F7853F8 -.word 0x3F786C52 -.word 0x3F788486 -.word 0x3F789C93 -.word 0x3F78B47B -.word 0x3F78CC3B -.word 0x3F78E3D6 -.word 0x3F78FB4A -.word 0x3F791298 -.word 0x3F7929BF -.word 0x3F7940C0 -.word 0x3F79579A -.word 0x3F796E4E -.word 0x3F7984DC -.word 0x3F799B43 -.word 0x3F79B183 -.word 0x3F79C79D -.word 0x3F79DD91 -.word 0x3F79F35E -.word 0x3F7A0904 -.word 0x3F7A1E84 -.word 0x3F7A33DD -.word 0x3F7A4910 -.word 0x3F7A5E1C -.word 0x3F7A7302 -.word 0x3F7A87C1 -.word 0x3F7A9C59 -.word 0x3F7AB0CB -.word 0x3F7AC516 -.word 0x3F7AD93A -.word 0x3F7AED37 -.word 0x3F7B010E -.word 0x3F7B14BE -.word 0x3F7B2848 -.word 0x3F7B3BAB -.word 0x3F7B4EE7 -.word 0x3F7B61FC -.word 0x3F7B74EA -.word 0x3F7B87B2 -.word 0x3F7B9A53 -.word 0x3F7BACCD -.word 0x3F7BBF20 -.word 0x3F7BD14D -.word 0x3F7BE353 -.word 0x3F7BF531 -.word 0x3F7C06E9 -.word 0x3F7C187A -.word 0x3F7C29E5 -.word 0x3F7C3B28 -.word 0x3F7C4C44 -.word 0x3F7C5D3A -.word 0x3F7C6E08 -.word 0x3F7C7EB0 -.word 0x3F7C8F31 -.word 0x3F7C9F8A -.word 0x3F7CAFBD -.word 0x3F7CBFC9 -.word 0x3F7CCFAE -.word 0x3F7CDF6C -.word 0x3F7CEF03 -.word 0x3F7CFE73 -.word 0x3F7D0DBC -.word 0x3F7D1CDD -.word 0x3F7D2BD8 -.word 0x3F7D3AAC -.word 0x3F7D4959 -.word 0x3F7D57DE -.word 0x3F7D663D -.word 0x3F7D7474 -.word 0x3F7D8285 -.word 0x3F7D906E -.word 0x3F7D9E30 -.word 0x3F7DABCC -.word 0x3F7DB940 -.word 0x3F7DC68C -.word 0x3F7DD3B2 -.word 0x3F7DE0B1 -.word 0x3F7DED88 -.word 0x3F7DFA38 -.word 0x3F7E06C2 -.word 0x3F7E1324 -.word 0x3F7E1F5E -.word 0x3F7E2B72 -.word 0x3F7E375E -.word 0x3F7E4323 -.word 0x3F7E4EC1 -.word 0x3F7E5A38 -.word 0x3F7E6588 -.word 0x3F7E70B0 -.word 0x3F7E7BB1 -.word 0x3F7E868B -.word 0x3F7E913D -.word 0x3F7E9BC9 -.word 0x3F7EA62D -.word 0x3F7EB069 -.word 0x3F7EBA7F -.word 0x3F7EC46D -.word 0x3F7ECE34 -.word 0x3F7ED7D4 -.word 0x3F7EE14C -.word 0x3F7EEA9D -.word 0x3F7EF3C7 -.word 0x3F7EFCC9 -.word 0x3F7F05A4 -.word 0x3F7F0E58 -.word 0x3F7F16E4 -.word 0x3F7F1F49 -.word 0x3F7F2787 -.word 0x3F7F2F9D -.word 0x3F7F378C -.word 0x3F7F3F54 -.word 0x3F7F46F4 -.word 0x3F7F4E6D -.word 0x3F7F55BF -.word 0x3F7F5CE9 -.word 0x3F7F63EC -.word 0x3F7F6AC7 -.word 0x3F7F717B -.word 0x3F7F7808 -.word 0x3F7F7E6D -.word 0x3F7F84AB -.word 0x3F7F8AC2 -.word 0x3F7F90B1 -.word 0x3F7F9678 -.word 0x3F7F9C18 -.word 0x3F7FA191 -.word 0x3F7FA6E3 -.word 0x3F7FAC0D -.word 0x3F7FB10F -.word 0x3F7FB5EA -.word 0x3F7FBA9E -.word 0x3F7FBF2A -.word 0x3F7FC38F -.word 0x3F7FC7CC -.word 0x3F7FCBE2 -.word 0x3F7FCFD1 -.word 0x3F7FD397 -.word 0x3F7FD737 -.word 0x3F7FDAAF -.word 0x3F7FDE00 -.word 0x3F7FE129 -.word 0x3F7FE42B -.word 0x3F7FE705 -.word 0x3F7FE9B8 -.word 0x3F7FEC43 -.word 0x3F7FEEA7 -.word 0x3F7FF0E3 -.word 0x3F7FF2F8 -.word 0x3F7FF4E6 -.word 0x3F7FF6AC -.word 0x3F7FF84A -.word 0x3F7FF9C1 -.word 0x3F7FFB11 -.word 0x3F7FFC39 -.word 0x3F7FFD39 -.word 0x3F7FFE13 -.word 0x3F7FFEC4 -.word 0x3F7FFF4E -.word 0x3F7FFFB1 -.word 0x3F7FFFEC +.word32 0x00000000 +.word32 0x3AC90FD5 +.word32 0x3B490FC6 +.word32 0x3B96CBC1 +.word32 0x3BC90F88 +.word32 0x3BFB5330 +.word32 0x3C16CB58 +.word32 0x3C2FED02 +.word32 0x3C490E90 +.word32 0x3C622FFF +.word32 0x3C7B514B +.word32 0x3C8A3938 +.word32 0x3C96C9B6 +.word32 0x3CA35A1C +.word32 0x3CAFEA69 +.word32 0x3CBC7A9B +.word32 0x3CC90AB0 +.word32 0x3CD59AA6 +.word32 0x3CE22A7A +.word32 0x3CEEBA2C +.word32 0x3CFB49BA +.word32 0x3D03EC90 +.word32 0x3D0A342F +.word32 0x3D107BB8 +.word32 0x3D16C32C +.word32 0x3D1D0A88 +.word32 0x3D2351CB +.word32 0x3D2998F6 +.word32 0x3D2FE007 +.word32 0x3D3626FC +.word32 0x3D3C6DD5 +.word32 0x3D42B491 +.word32 0x3D48FB30 +.word32 0x3D4F41AF +.word32 0x3D55880E +.word32 0x3D5BCE4C +.word32 0x3D621469 +.word32 0x3D685A62 +.word32 0x3D6EA038 +.word32 0x3D74E5E9 +.word32 0x3D7B2B74 +.word32 0x3D80B86C +.word32 0x3D83DB0A +.word32 0x3D86FD94 +.word32 0x3D8A200A +.word32 0x3D8D426A +.word32 0x3D9064B4 +.word32 0x3D9386E7 +.word32 0x3D96A905 +.word32 0x3D99CB0A +.word32 0x3D9CECF9 +.word32 0x3DA00ECF +.word32 0x3DA3308C +.word32 0x3DA65230 +.word32 0x3DA973BA +.word32 0x3DAC952B +.word32 0x3DAFB680 +.word32 0x3DB2D7BB +.word32 0x3DB5F8DA +.word32 0x3DB919DD +.word32 0x3DBC3AC3 +.word32 0x3DBF5B8D +.word32 0x3DC27C39 +.word32 0x3DC59CC6 +.word32 0x3DC8BD36 +.word32 0x3DCBDD86 +.word32 0x3DCEFDB7 +.word32 0x3DD21DC8 +.word32 0x3DD53DB9 +.word32 0x3DD85D89 +.word32 0x3DDB7D37 +.word32 0x3DDE9CC4 +.word32 0x3DE1BC2E +.word32 0x3DE4DB76 +.word32 0x3DE7FA9A +.word32 0x3DEB199A +.word32 0x3DEE3876 +.word32 0x3DF1572E +.word32 0x3DF475C0 +.word32 0x3DF7942C +.word32 0x3DFAB273 +.word32 0x3DFDD092 +.word32 0x3E007745 +.word32 0x3E02062E +.word32 0x3E039502 +.word32 0x3E0523C2 +.word32 0x3E06B26E +.word32 0x3E084105 +.word32 0x3E09CF86 +.word32 0x3E0B5DF3 +.word32 0x3E0CEC4A +.word32 0x3E0E7A8B +.word32 0x3E1008B7 +.word32 0x3E1196CC +.word32 0x3E1324CA +.word32 0x3E14B2B2 +.word32 0x3E164083 +.word32 0x3E17CE3D +.word32 0x3E195BE0 +.word32 0x3E1AE96B +.word32 0x3E1C76DE +.word32 0x3E1E0438 +.word32 0x3E1F917B +.word32 0x3E211EA5 +.word32 0x3E22ABB6 +.word32 0x3E2438AD +.word32 0x3E25C58C +.word32 0x3E275251 +.word32 0x3E28DEFC +.word32 0x3E2A6B8D +.word32 0x3E2BF804 +.word32 0x3E2D8461 +.word32 0x3E2F10A2 +.word32 0x3E309CC9 +.word32 0x3E3228D4 +.word32 0x3E33B4C4 +.word32 0x3E354098 +.word32 0x3E36CC50 +.word32 0x3E3857EC +.word32 0x3E39E36C +.word32 0x3E3B6ECF +.word32 0x3E3CFA15 +.word32 0x3E3E853E +.word32 0x3E401049 +.word32 0x3E419B37 +.word32 0x3E432607 +.word32 0x3E44B0B9 +.word32 0x3E463B4D +.word32 0x3E47C5C2 +.word32 0x3E495018 +.word32 0x3E4ADA4F +.word32 0x3E4C6467 +.word32 0x3E4DEE60 +.word32 0x3E4F7838 +.word32 0x3E5101F1 +.word32 0x3E528B89 +.word32 0x3E541501 +.word32 0x3E559E58 +.word32 0x3E57278F +.word32 0x3E58B0A4 +.word32 0x3E5A3997 +.word32 0x3E5BC26A +.word32 0x3E5D4B1A +.word32 0x3E5ED3A8 +.word32 0x3E605C13 +.word32 0x3E61E45C +.word32 0x3E636C83 +.word32 0x3E64F486 +.word32 0x3E667C66 +.word32 0x3E680422 +.word32 0x3E698BBA +.word32 0x3E6B132F +.word32 0x3E6C9A7F +.word32 0x3E6E21AB +.word32 0x3E6FA8B2 +.word32 0x3E712F94 +.word32 0x3E72B651 +.word32 0x3E743CE8 +.word32 0x3E75C35A +.word32 0x3E7749A6 +.word32 0x3E78CFCC +.word32 0x3E7A55CB +.word32 0x3E7BDBA4 +.word32 0x3E7D6156 +.word32 0x3E7EE6E1 +.word32 0x3E803622 +.word32 0x3E80F8C0 +.word32 0x3E81BB4A +.word32 0x3E827DC0 +.word32 0x3E834022 +.word32 0x3E840270 +.word32 0x3E84C4AA +.word32 0x3E8586CE +.word32 0x3E8648DF +.word32 0x3E870ADA +.word32 0x3E87CCC1 +.word32 0x3E888E93 +.word32 0x3E895050 +.word32 0x3E8A11F7 +.word32 0x3E8AD38A +.word32 0x3E8B9507 +.word32 0x3E8C566E +.word32 0x3E8D17C0 +.word32 0x3E8DD8FC +.word32 0x3E8E9A22 +.word32 0x3E8F5B32 +.word32 0x3E901C2C +.word32 0x3E90DD10 +.word32 0x3E919DDD +.word32 0x3E925E94 +.word32 0x3E931F35 +.word32 0x3E93DFBF +.word32 0x3E94A031 +.word32 0x3E95608D +.word32 0x3E9620D2 +.word32 0x3E96E100 +.word32 0x3E97A117 +.word32 0x3E986116 +.word32 0x3E9920FE +.word32 0x3E99E0CE +.word32 0x3E9AA086 +.word32 0x3E9B6027 +.word32 0x3E9C1FAF +.word32 0x3E9CDF20 +.word32 0x3E9D9E78 +.word32 0x3E9E5DB8 +.word32 0x3E9F1CDF +.word32 0x3E9FDBEE +.word32 0x3EA09AE5 +.word32 0x3EA159C2 +.word32 0x3EA21887 +.word32 0x3EA2D733 +.word32 0x3EA395C5 +.word32 0x3EA4543F +.word32 0x3EA5129F +.word32 0x3EA5D0E5 +.word32 0x3EA68F12 +.word32 0x3EA74D25 +.word32 0x3EA80B1F +.word32 0x3EA8C8FE +.word32 0x3EA986C4 +.word32 0x3EAA446F +.word32 0x3EAB0201 +.word32 0x3EABBF77 +.word32 0x3EAC7CD4 +.word32 0x3EAD3A15 +.word32 0x3EADF73C +.word32 0x3EAEB449 +.word32 0x3EAF713A +.word32 0x3EB02E10 +.word32 0x3EB0EACB +.word32 0x3EB1A76B +.word32 0x3EB263EF +.word32 0x3EB32058 +.word32 0x3EB3DCA5 +.word32 0x3EB498D6 +.word32 0x3EB554EC +.word32 0x3EB610E6 +.word32 0x3EB6CCC3 +.word32 0x3EB78884 +.word32 0x3EB8442A +.word32 0x3EB8FFB2 +.word32 0x3EB9BB1E +.word32 0x3EBA766E +.word32 0x3EBB31A0 +.word32 0x3EBBECB6 +.word32 0x3EBCA7AF +.word32 0x3EBD628B +.word32 0x3EBE1D4A +.word32 0x3EBED7EB +.word32 0x3EBF926F +.word32 0x3EC04CD5 +.word32 0x3EC1071E +.word32 0x3EC1C148 +.word32 0x3EC27B55 +.word32 0x3EC33544 +.word32 0x3EC3EF15 +.word32 0x3EC4A8C8 +.word32 0x3EC5625C +.word32 0x3EC61BD2 +.word32 0x3EC6D529 +.word32 0x3EC78E62 +.word32 0x3EC8477C +.word32 0x3EC90077 +.word32 0x3EC9B953 +.word32 0x3ECA7210 +.word32 0x3ECB2AAE +.word32 0x3ECBE32C +.word32 0x3ECC9B8B +.word32 0x3ECD53CA +.word32 0x3ECE0BEA +.word32 0x3ECEC3EA +.word32 0x3ECF7BCA +.word32 0x3ED0338A +.word32 0x3ED0EB2A +.word32 0x3ED1A2AA +.word32 0x3ED25A09 +.word32 0x3ED31148 +.word32 0x3ED3C867 +.word32 0x3ED47F64 +.word32 0x3ED53641 +.word32 0x3ED5ECFD +.word32 0x3ED6A399 +.word32 0x3ED75A13 +.word32 0x3ED8106B +.word32 0x3ED8C6A3 +.word32 0x3ED97CB9 +.word32 0x3EDA32AD +.word32 0x3EDAE880 +.word32 0x3EDB9E31 +.word32 0x3EDC53C1 +.word32 0x3EDD092E +.word32 0x3EDDBE79 +.word32 0x3EDE73A2 +.word32 0x3EDF28A9 +.word32 0x3EDFDD8D +.word32 0x3EE0924F +.word32 0x3EE146EE +.word32 0x3EE1FB6A +.word32 0x3EE2AFC4 +.word32 0x3EE363FA +.word32 0x3EE4180E +.word32 0x3EE4CBFE +.word32 0x3EE57FCB +.word32 0x3EE63375 +.word32 0x3EE6E6FB +.word32 0x3EE79A5D +.word32 0x3EE84D9C +.word32 0x3EE900B7 +.word32 0x3EE9B3AE +.word32 0x3EEA6681 +.word32 0x3EEB1930 +.word32 0x3EEBCBBB +.word32 0x3EEC7E21 +.word32 0x3EED3063 +.word32 0x3EEDE280 +.word32 0x3EEE9479 +.word32 0x3EEF464C +.word32 0x3EEFF7FB +.word32 0x3EF0A985 +.word32 0x3EF15AEA +.word32 0x3EF20C29 +.word32 0x3EF2BD43 +.word32 0x3EF36E38 +.word32 0x3EF41F07 +.word32 0x3EF4CFB1 +.word32 0x3EF58035 +.word32 0x3EF63093 +.word32 0x3EF6E0CB +.word32 0x3EF790DC +.word32 0x3EF840C8 +.word32 0x3EF8F08E +.word32 0x3EF9A02D +.word32 0x3EFA4FA5 +.word32 0x3EFAFEF7 +.word32 0x3EFBAE22 +.word32 0x3EFC5D27 +.word32 0x3EFD0C04 +.word32 0x3EFDBABB +.word32 0x3EFE694A +.word32 0x3EFF17B2 +.word32 0x3EFFC5F3 +.word32 0x3F003A06 +.word32 0x3F0090FF +.word32 0x3F00E7E4 +.word32 0x3F013EB5 +.word32 0x3F019573 +.word32 0x3F01EC1C +.word32 0x3F0242B1 +.word32 0x3F029932 +.word32 0x3F02EF9F +.word32 0x3F0345F8 +.word32 0x3F039C3D +.word32 0x3F03F26D +.word32 0x3F044889 +.word32 0x3F049E91 +.word32 0x3F04F484 +.word32 0x3F054A62 +.word32 0x3F05A02C +.word32 0x3F05F5E2 +.word32 0x3F064B82 +.word32 0x3F06A10E +.word32 0x3F06F686 +.word32 0x3F074BE8 +.word32 0x3F07A136 +.word32 0x3F07F66F +.word32 0x3F084B92 +.word32 0x3F08A0A1 +.word32 0x3F08F59B +.word32 0x3F094A7F +.word32 0x3F099F4E +.word32 0x3F09F409 +.word32 0x3F0A48AD +.word32 0x3F0A9D3D +.word32 0x3F0AF1B7 +.word32 0x3F0B461C +.word32 0x3F0B9A6B +.word32 0x3F0BEEA5 +.word32 0x3F0C42C9 +.word32 0x3F0C96D7 +.word32 0x3F0CEAD0 +.word32 0x3F0D3EB3 +.word32 0x3F0D9281 +.word32 0x3F0DE638 +.word32 0x3F0E39DA +.word32 0x3F0E8D65 +.word32 0x3F0EE0DB +.word32 0x3F0F343B +.word32 0x3F0F8784 +.word32 0x3F0FDAB8 +.word32 0x3F102DD5 +.word32 0x3F1080DC +.word32 0x3F10D3CD +.word32 0x3F1126A7 +.word32 0x3F11796B +.word32 0x3F11CC19 +.word32 0x3F121EB0 +.word32 0x3F127130 +.word32 0x3F12C39A +.word32 0x3F1315EE +.word32 0x3F13682A +.word32 0x3F13BA50 +.word32 0x3F140C5F +.word32 0x3F145E58 +.word32 0x3F14B039 +.word32 0x3F150204 +.word32 0x3F1553B7 +.word32 0x3F15A554 +.word32 0x3F15F6D9 +.word32 0x3F164847 +.word32 0x3F16999F +.word32 0x3F16EADE +.word32 0x3F173C07 +.word32 0x3F178D18 +.word32 0x3F17DE12 +.word32 0x3F182EF5 +.word32 0x3F187FC0 +.word32 0x3F18D073 +.word32 0x3F19210F +.word32 0x3F197194 +.word32 0x3F19C200 +.word32 0x3F1A1255 +.word32 0x3F1A6293 +.word32 0x3F1AB2B8 +.word32 0x3F1B02C6 +.word32 0x3F1B52BB +.word32 0x3F1BA299 +.word32 0x3F1BF25F +.word32 0x3F1C420C +.word32 0x3F1C91A2 +.word32 0x3F1CE11F +.word32 0x3F1D3084 +.word32 0x3F1D7FD1 +.word32 0x3F1DCF06 +.word32 0x3F1E1E22 +.word32 0x3F1E6D26 +.word32 0x3F1EBC12 +.word32 0x3F1F0AE5 +.word32 0x3F1F599F +.word32 0x3F1FA841 +.word32 0x3F1FF6CB +.word32 0x3F20453B +.word32 0x3F209393 +.word32 0x3F20E1D2 +.word32 0x3F212FF9 +.word32 0x3F217E06 +.word32 0x3F21CBFB +.word32 0x3F2219D7 +.word32 0x3F226799 +.word32 0x3F22B543 +.word32 0x3F2302D3 +.word32 0x3F23504B +.word32 0x3F239DA9 +.word32 0x3F23EAEE +.word32 0x3F24381A +.word32 0x3F24852C +.word32 0x3F24D225 +.word32 0x3F251F04 +.word32 0x3F256BCB +.word32 0x3F25B877 +.word32 0x3F26050A +.word32 0x3F265184 +.word32 0x3F269DE3 +.word32 0x3F26EA2A +.word32 0x3F273656 +.word32 0x3F278268 +.word32 0x3F27CE61 +.word32 0x3F281A40 +.word32 0x3F286605 +.word32 0x3F28B1B0 +.word32 0x3F28FD41 +.word32 0x3F2948B8 +.word32 0x3F299415 +.word32 0x3F29DF57 +.word32 0x3F2A2A80 +.word32 0x3F2A758E +.word32 0x3F2AC082 +.word32 0x3F2B0B5B +.word32 0x3F2B561B +.word32 0x3F2BA0BF +.word32 0x3F2BEB4A +.word32 0x3F2C35B9 +.word32 0x3F2C800F +.word32 0x3F2CCA49 +.word32 0x3F2D1469 +.word32 0x3F2D5E6F +.word32 0x3F2DA859 +.word32 0x3F2DF229 +.word32 0x3F2E3BDE +.word32 0x3F2E8578 +.word32 0x3F2ECEF7 +.word32 0x3F2F185B +.word32 0x3F2F61A5 +.word32 0x3F2FAAD3 +.word32 0x3F2FF3E6 +.word32 0x3F303CDE +.word32 0x3F3085BB +.word32 0x3F30CE7C +.word32 0x3F311722 +.word32 0x3F315FAD +.word32 0x3F31A81D +.word32 0x3F31F071 +.word32 0x3F3238AA +.word32 0x3F3280C7 +.word32 0x3F32C8C9 +.word32 0x3F3310AF +.word32 0x3F33587A +.word32 0x3F33A029 +.word32 0x3F33E7BC +.word32 0x3F342F34 +.word32 0x3F34768F +.word32 0x3F34BDCF +.word32 0x3F3504F3 +.word32 0x3F354BFB +.word32 0x3F3592E7 +.word32 0x3F35D9B8 +.word32 0x3F36206C +.word32 0x3F366704 +.word32 0x3F36AD7F +.word32 0x3F36F3DF +.word32 0x3F373A23 +.word32 0x3F37804A +.word32 0x3F37C655 +.word32 0x3F380C43 +.word32 0x3F385216 +.word32 0x3F3897CB +.word32 0x3F38DD65 +.word32 0x3F3922E1 +.word32 0x3F396842 +.word32 0x3F39AD85 +.word32 0x3F39F2AC +.word32 0x3F3A37B7 +.word32 0x3F3A7CA4 +.word32 0x3F3AC175 +.word32 0x3F3B0629 +.word32 0x3F3B4AC1 +.word32 0x3F3B8F3B +.word32 0x3F3BD398 +.word32 0x3F3C17D9 +.word32 0x3F3C5BFC +.word32 0x3F3CA003 +.word32 0x3F3CE3EC +.word32 0x3F3D27B8 +.word32 0x3F3D6B67 +.word32 0x3F3DAEF9 +.word32 0x3F3DF26E +.word32 0x3F3E35C5 +.word32 0x3F3E78FF +.word32 0x3F3EBC1B +.word32 0x3F3EFF1B +.word32 0x3F3F41FC +.word32 0x3F3F84C0 +.word32 0x3F3FC767 +.word32 0x3F4009F0 +.word32 0x3F404C5C +.word32 0x3F408EA9 +.word32 0x3F40D0DA +.word32 0x3F4112EC +.word32 0x3F4154E1 +.word32 0x3F4196B7 +.word32 0x3F41D870 +.word32 0x3F421A0B +.word32 0x3F425B89 +.word32 0x3F429CE8 +.word32 0x3F42DE29 +.word32 0x3F431F4C +.word32 0x3F436051 +.word32 0x3F43A138 +.word32 0x3F43E200 +.word32 0x3F4422AB +.word32 0x3F446337 +.word32 0x3F44A3A5 +.word32 0x3F44E3F5 +.word32 0x3F452426 +.word32 0x3F456439 +.word32 0x3F45A42D +.word32 0x3F45E403 +.word32 0x3F4623BB +.word32 0x3F466354 +.word32 0x3F46A2CE +.word32 0x3F46E22A +.word32 0x3F472167 +.word32 0x3F476085 +.word32 0x3F479F84 +.word32 0x3F47DE65 +.word32 0x3F481D27 +.word32 0x3F485BCA +.word32 0x3F489A4E +.word32 0x3F48D8B3 +.word32 0x3F4916FA +.word32 0x3F495521 +.word32 0x3F499329 +.word32 0x3F49D112 +.word32 0x3F4A0EDC +.word32 0x3F4A4C87 +.word32 0x3F4A8A13 +.word32 0x3F4AC77F +.word32 0x3F4B04CC +.word32 0x3F4B41FA +.word32 0x3F4B7F09 +.word32 0x3F4BBBF8 +.word32 0x3F4BF8C7 +.word32 0x3F4C3578 +.word32 0x3F4C7208 +.word32 0x3F4CAE79 +.word32 0x3F4CEACB +.word32 0x3F4D26FD +.word32 0x3F4D6310 +.word32 0x3F4D9F02 +.word32 0x3F4DDAD5 +.word32 0x3F4E1689 +.word32 0x3F4E521C +.word32 0x3F4E8D90 +.word32 0x3F4EC8E4 +.word32 0x3F4F0417 +.word32 0x3F4F3F2B +.word32 0x3F4F7A1F +.word32 0x3F4FB4F4 +.word32 0x3F4FEFA8 +.word32 0x3F502A3B +.word32 0x3F5064AF +.word32 0x3F509F03 +.word32 0x3F50D937 +.word32 0x3F51134A +.word32 0x3F514D3D +.word32 0x3F518710 +.word32 0x3F51C0C2 +.word32 0x3F51FA54 +.word32 0x3F5233C6 +.word32 0x3F526D18 +.word32 0x3F52A649 +.word32 0x3F52DF59 +.word32 0x3F531849 +.word32 0x3F535118 +.word32 0x3F5389C7 +.word32 0x3F53C255 +.word32 0x3F53FAC3 +.word32 0x3F54330F +.word32 0x3F546B3B +.word32 0x3F54A347 +.word32 0x3F54DB31 +.word32 0x3F5512FB +.word32 0x3F554AA4 +.word32 0x3F55822C +.word32 0x3F55B993 +.word32 0x3F55F0D9 +.word32 0x3F5627FE +.word32 0x3F565F02 +.word32 0x3F5695E5 +.word32 0x3F56CCA7 +.word32 0x3F570348 +.word32 0x3F5739C7 +.word32 0x3F577026 +.word32 0x3F57A663 +.word32 0x3F57DC7F +.word32 0x3F581279 +.word32 0x3F584853 +.word32 0x3F587E0B +.word32 0x3F58B3A1 +.word32 0x3F58E916 +.word32 0x3F591E6A +.word32 0x3F59539C +.word32 0x3F5988AD +.word32 0x3F59BD9C +.word32 0x3F59F26A +.word32 0x3F5A2716 +.word32 0x3F5A5BA0 +.word32 0x3F5A9009 +.word32 0x3F5AC450 +.word32 0x3F5AF875 +.word32 0x3F5B2C79 +.word32 0x3F5B605A +.word32 0x3F5B941A +.word32 0x3F5BC7B8 +.word32 0x3F5BFB34 +.word32 0x3F5C2E8E +.word32 0x3F5C61C7 +.word32 0x3F5C94DD +.word32 0x3F5CC7D1 +.word32 0x3F5CFAA3 +.word32 0x3F5D2D53 +.word32 0x3F5D5FE1 +.word32 0x3F5D924D +.word32 0x3F5DC497 +.word32 0x3F5DF6BE +.word32 0x3F5E28C3 +.word32 0x3F5E5AA6 +.word32 0x3F5E8C67 +.word32 0x3F5EBE05 +.word32 0x3F5EEF81 +.word32 0x3F5F20DB +.word32 0x3F5F5212 +.word32 0x3F5F8327 +.word32 0x3F5FB419 +.word32 0x3F5FE4E9 +.word32 0x3F601596 +.word32 0x3F604621 +.word32 0x3F607689 +.word32 0x3F60A6CF +.word32 0x3F60D6F2 +.word32 0x3F6106F2 +.word32 0x3F6136D0 +.word32 0x3F61668A +.word32 0x3F619622 +.word32 0x3F61C598 +.word32 0x3F61F4EA +.word32 0x3F62241A +.word32 0x3F625326 +.word32 0x3F628210 +.word32 0x3F62B0D7 +.word32 0x3F62DF7B +.word32 0x3F630DFC +.word32 0x3F633C5A +.word32 0x3F636A95 +.word32 0x3F6398AC +.word32 0x3F63C6A1 +.word32 0x3F63F473 +.word32 0x3F642221 +.word32 0x3F644FAC +.word32 0x3F647D14 +.word32 0x3F64AA59 +.word32 0x3F64D77B +.word32 0x3F650479 +.word32 0x3F653154 +.word32 0x3F655E0B +.word32 0x3F658AA0 +.word32 0x3F65B710 +.word32 0x3F65E35E +.word32 0x3F660F88 +.word32 0x3F663B8E +.word32 0x3F666771 +.word32 0x3F669330 +.word32 0x3F66BECC +.word32 0x3F66EA45 +.word32 0x3F671599 +.word32 0x3F6740CA +.word32 0x3F676BD8 +.word32 0x3F6796C1 +.word32 0x3F67C187 +.word32 0x3F67EC29 +.word32 0x3F6816A8 +.word32 0x3F684103 +.word32 0x3F686B39 +.word32 0x3F68954C +.word32 0x3F68BF3C +.word32 0x3F68E907 +.word32 0x3F6912AE +.word32 0x3F693C32 +.word32 0x3F696591 +.word32 0x3F698ECC +.word32 0x3F69B7E4 +.word32 0x3F69E0D7 +.word32 0x3F6A09A7 +.word32 0x3F6A3252 +.word32 0x3F6A5AD9 +.word32 0x3F6A833C +.word32 0x3F6AAB7B +.word32 0x3F6AD395 +.word32 0x3F6AFB8C +.word32 0x3F6B235E +.word32 0x3F6B4B0C +.word32 0x3F6B7295 +.word32 0x3F6B99FB +.word32 0x3F6BC13B +.word32 0x3F6BE858 +.word32 0x3F6C0F50 +.word32 0x3F6C3624 +.word32 0x3F6C5CD4 +.word32 0x3F6C835E +.word32 0x3F6CA9C5 +.word32 0x3F6CD007 +.word32 0x3F6CF624 +.word32 0x3F6D1C1D +.word32 0x3F6D41F2 +.word32 0x3F6D67A1 +.word32 0x3F6D8D2D +.word32 0x3F6DB293 +.word32 0x3F6DD7D5 +.word32 0x3F6DFCF2 +.word32 0x3F6E21EB +.word32 0x3F6E46BE +.word32 0x3F6E6B6D +.word32 0x3F6E8FF8 +.word32 0x3F6EB45D +.word32 0x3F6ED89E +.word32 0x3F6EFCBA +.word32 0x3F6F20B0 +.word32 0x3F6F4483 +.word32 0x3F6F6830 +.word32 0x3F6F8BB8 +.word32 0x3F6FAF1B +.word32 0x3F6FD25A +.word32 0x3F6FF573 +.word32 0x3F701867 +.word32 0x3F703B37 +.word32 0x3F705DE1 +.word32 0x3F708066 +.word32 0x3F70A2C6 +.word32 0x3F70C501 +.word32 0x3F70E717 +.word32 0x3F710908 +.word32 0x3F712AD4 +.word32 0x3F714C7A +.word32 0x3F716DFB +.word32 0x3F718F57 +.word32 0x3F71B08E +.word32 0x3F71D19F +.word32 0x3F71F28C +.word32 0x3F721352 +.word32 0x3F7233F4 +.word32 0x3F725470 +.word32 0x3F7274C7 +.word32 0x3F7294F8 +.word32 0x3F72B504 +.word32 0x3F72D4EB +.word32 0x3F72F4AC +.word32 0x3F731447 +.word32 0x3F7333BE +.word32 0x3F73530E +.word32 0x3F737239 +.word32 0x3F73913F +.word32 0x3F73B01F +.word32 0x3F73CED9 +.word32 0x3F73ED6E +.word32 0x3F740BDD +.word32 0x3F742A27 +.word32 0x3F74484B +.word32 0x3F746649 +.word32 0x3F748422 +.word32 0x3F74A1D5 +.word32 0x3F74BF62 +.word32 0x3F74DCC9 +.word32 0x3F74FA0B +.word32 0x3F751727 +.word32 0x3F75341D +.word32 0x3F7550ED +.word32 0x3F756D97 +.word32 0x3F758A1C +.word32 0x3F75A67B +.word32 0x3F75C2B3 +.word32 0x3F75DEC6 +.word32 0x3F75FAB3 +.word32 0x3F76167A +.word32 0x3F76321B +.word32 0x3F764D97 +.word32 0x3F7668EC +.word32 0x3F76841B +.word32 0x3F769F24 +.word32 0x3F76BA07 +.word32 0x3F76D4C4 +.word32 0x3F76EF5B +.word32 0x3F7709CC +.word32 0x3F772417 +.word32 0x3F773E3C +.word32 0x3F77583A +.word32 0x3F777213 +.word32 0x3F778BC5 +.word32 0x3F77A551 +.word32 0x3F77BEB7 +.word32 0x3F77D7F7 +.word32 0x3F77F110 +.word32 0x3F780A04 +.word32 0x3F7822D1 +.word32 0x3F783B77 +.word32 0x3F7853F8 +.word32 0x3F786C52 +.word32 0x3F788486 +.word32 0x3F789C93 +.word32 0x3F78B47B +.word32 0x3F78CC3B +.word32 0x3F78E3D6 +.word32 0x3F78FB4A +.word32 0x3F791298 +.word32 0x3F7929BF +.word32 0x3F7940C0 +.word32 0x3F79579A +.word32 0x3F796E4E +.word32 0x3F7984DC +.word32 0x3F799B43 +.word32 0x3F79B183 +.word32 0x3F79C79D +.word32 0x3F79DD91 +.word32 0x3F79F35E +.word32 0x3F7A0904 +.word32 0x3F7A1E84 +.word32 0x3F7A33DD +.word32 0x3F7A4910 +.word32 0x3F7A5E1C +.word32 0x3F7A7302 +.word32 0x3F7A87C1 +.word32 0x3F7A9C59 +.word32 0x3F7AB0CB +.word32 0x3F7AC516 +.word32 0x3F7AD93A +.word32 0x3F7AED37 +.word32 0x3F7B010E +.word32 0x3F7B14BE +.word32 0x3F7B2848 +.word32 0x3F7B3BAB +.word32 0x3F7B4EE7 +.word32 0x3F7B61FC +.word32 0x3F7B74EA +.word32 0x3F7B87B2 +.word32 0x3F7B9A53 +.word32 0x3F7BACCD +.word32 0x3F7BBF20 +.word32 0x3F7BD14D +.word32 0x3F7BE353 +.word32 0x3F7BF531 +.word32 0x3F7C06E9 +.word32 0x3F7C187A +.word32 0x3F7C29E5 +.word32 0x3F7C3B28 +.word32 0x3F7C4C44 +.word32 0x3F7C5D3A +.word32 0x3F7C6E08 +.word32 0x3F7C7EB0 +.word32 0x3F7C8F31 +.word32 0x3F7C9F8A +.word32 0x3F7CAFBD +.word32 0x3F7CBFC9 +.word32 0x3F7CCFAE +.word32 0x3F7CDF6C +.word32 0x3F7CEF03 +.word32 0x3F7CFE73 +.word32 0x3F7D0DBC +.word32 0x3F7D1CDD +.word32 0x3F7D2BD8 +.word32 0x3F7D3AAC +.word32 0x3F7D4959 +.word32 0x3F7D57DE +.word32 0x3F7D663D +.word32 0x3F7D7474 +.word32 0x3F7D8285 +.word32 0x3F7D906E +.word32 0x3F7D9E30 +.word32 0x3F7DABCC +.word32 0x3F7DB940 +.word32 0x3F7DC68C +.word32 0x3F7DD3B2 +.word32 0x3F7DE0B1 +.word32 0x3F7DED88 +.word32 0x3F7DFA38 +.word32 0x3F7E06C2 +.word32 0x3F7E1324 +.word32 0x3F7E1F5E +.word32 0x3F7E2B72 +.word32 0x3F7E375E +.word32 0x3F7E4323 +.word32 0x3F7E4EC1 +.word32 0x3F7E5A38 +.word32 0x3F7E6588 +.word32 0x3F7E70B0 +.word32 0x3F7E7BB1 +.word32 0x3F7E868B +.word32 0x3F7E913D +.word32 0x3F7E9BC9 +.word32 0x3F7EA62D +.word32 0x3F7EB069 +.word32 0x3F7EBA7F +.word32 0x3F7EC46D +.word32 0x3F7ECE34 +.word32 0x3F7ED7D4 +.word32 0x3F7EE14C +.word32 0x3F7EEA9D +.word32 0x3F7EF3C7 +.word32 0x3F7EFCC9 +.word32 0x3F7F05A4 +.word32 0x3F7F0E58 +.word32 0x3F7F16E4 +.word32 0x3F7F1F49 +.word32 0x3F7F2787 +.word32 0x3F7F2F9D +.word32 0x3F7F378C +.word32 0x3F7F3F54 +.word32 0x3F7F46F4 +.word32 0x3F7F4E6D +.word32 0x3F7F55BF +.word32 0x3F7F5CE9 +.word32 0x3F7F63EC +.word32 0x3F7F6AC7 +.word32 0x3F7F717B +.word32 0x3F7F7808 +.word32 0x3F7F7E6D +.word32 0x3F7F84AB +.word32 0x3F7F8AC2 +.word32 0x3F7F90B1 +.word32 0x3F7F9678 +.word32 0x3F7F9C18 +.word32 0x3F7FA191 +.word32 0x3F7FA6E3 +.word32 0x3F7FAC0D +.word32 0x3F7FB10F +.word32 0x3F7FB5EA +.word32 0x3F7FBA9E +.word32 0x3F7FBF2A +.word32 0x3F7FC38F +.word32 0x3F7FC7CC +.word32 0x3F7FCBE2 +.word32 0x3F7FCFD1 +.word32 0x3F7FD397 +.word32 0x3F7FD737 +.word32 0x3F7FDAAF +.word32 0x3F7FDE00 +.word32 0x3F7FE129 +.word32 0x3F7FE42B +.word32 0x3F7FE705 +.word32 0x3F7FE9B8 +.word32 0x3F7FEC43 +.word32 0x3F7FEEA7 +.word32 0x3F7FF0E3 +.word32 0x3F7FF2F8 +.word32 0x3F7FF4E6 +.word32 0x3F7FF6AC +.word32 0x3F7FF84A +.word32 0x3F7FF9C1 +.word32 0x3F7FFB11 +.word32 0x3F7FFC39 +.word32 0x3F7FFD39 +.word32 0x3F7FFE13 +.word32 0x3F7FFEC4 +.word32 0x3F7FFF4E +.word32 0x3F7FFFB1 +.word32 0x3F7FFFEC glabel gCosineTable -.word 0x3F800000 -.word 0x3F7FFFEC -.word 0x3F7FFFB1 -.word 0x3F7FFF4E -.word 0x3F7FFEC4 -.word 0x3F7FFE13 -.word 0x3F7FFD39 -.word 0x3F7FFC39 -.word 0x3F7FFB11 -.word 0x3F7FF9C1 -.word 0x3F7FF84A -.word 0x3F7FF6AC -.word 0x3F7FF4E6 -.word 0x3F7FF2F8 -.word 0x3F7FF0E3 -.word 0x3F7FEEA7 -.word 0x3F7FEC43 -.word 0x3F7FE9B8 -.word 0x3F7FE705 -.word 0x3F7FE42B -.word 0x3F7FE129 -.word 0x3F7FDE00 -.word 0x3F7FDAAF -.word 0x3F7FD737 -.word 0x3F7FD397 -.word 0x3F7FCFD1 -.word 0x3F7FCBE2 -.word 0x3F7FC7CC -.word 0x3F7FC38F -.word 0x3F7FBF2A -.word 0x3F7FBA9E -.word 0x3F7FB5EA -.word 0x3F7FB10F -.word 0x3F7FAC0D -.word 0x3F7FA6E3 -.word 0x3F7FA191 -.word 0x3F7F9C18 -.word 0x3F7F9678 -.word 0x3F7F90B1 -.word 0x3F7F8AC2 -.word 0x3F7F84AB -.word 0x3F7F7E6D -.word 0x3F7F7808 -.word 0x3F7F717B -.word 0x3F7F6AC7 -.word 0x3F7F63EC -.word 0x3F7F5CE9 -.word 0x3F7F55BF -.word 0x3F7F4E6D -.word 0x3F7F46F4 -.word 0x3F7F3F54 -.word 0x3F7F378C -.word 0x3F7F2F9D -.word 0x3F7F2787 -.word 0x3F7F1F49 -.word 0x3F7F16E4 -.word 0x3F7F0E58 -.word 0x3F7F05A4 -.word 0x3F7EFCC9 -.word 0x3F7EF3C7 -.word 0x3F7EEA9D -.word 0x3F7EE14C -.word 0x3F7ED7D4 -.word 0x3F7ECE34 -.word 0x3F7EC46D -.word 0x3F7EBA7F -.word 0x3F7EB069 -.word 0x3F7EA62D -.word 0x3F7E9BC9 -.word 0x3F7E913D -.word 0x3F7E868B -.word 0x3F7E7BB1 -.word 0x3F7E70B0 -.word 0x3F7E6588 -.word 0x3F7E5A38 -.word 0x3F7E4EC1 -.word 0x3F7E4323 -.word 0x3F7E375E -.word 0x3F7E2B72 -.word 0x3F7E1F5E -.word 0x3F7E1324 -.word 0x3F7E06C2 -.word 0x3F7DFA38 -.word 0x3F7DED88 -.word 0x3F7DE0B1 -.word 0x3F7DD3B2 -.word 0x3F7DC68C -.word 0x3F7DB940 -.word 0x3F7DABCC -.word 0x3F7D9E30 -.word 0x3F7D906E -.word 0x3F7D8285 -.word 0x3F7D7474 -.word 0x3F7D663D -.word 0x3F7D57DE -.word 0x3F7D4959 -.word 0x3F7D3AAC -.word 0x3F7D2BD8 -.word 0x3F7D1CDD -.word 0x3F7D0DBC -.word 0x3F7CFE73 -.word 0x3F7CEF03 -.word 0x3F7CDF6C -.word 0x3F7CCFAE -.word 0x3F7CBFC9 -.word 0x3F7CAFBD -.word 0x3F7C9F8A -.word 0x3F7C8F31 -.word 0x3F7C7EB0 -.word 0x3F7C6E08 -.word 0x3F7C5D3A -.word 0x3F7C4C44 -.word 0x3F7C3B28 -.word 0x3F7C29E5 -.word 0x3F7C187A -.word 0x3F7C06E9 -.word 0x3F7BF531 -.word 0x3F7BE353 -.word 0x3F7BD14D -.word 0x3F7BBF20 -.word 0x3F7BACCD -.word 0x3F7B9A53 -.word 0x3F7B87B2 -.word 0x3F7B74EA -.word 0x3F7B61FC -.word 0x3F7B4EE7 -.word 0x3F7B3BAB -.word 0x3F7B2848 -.word 0x3F7B14BE -.word 0x3F7B010E -.word 0x3F7AED37 -.word 0x3F7AD93A -.word 0x3F7AC516 -.word 0x3F7AB0CB -.word 0x3F7A9C59 -.word 0x3F7A87C1 -.word 0x3F7A7302 -.word 0x3F7A5E1C -.word 0x3F7A4910 -.word 0x3F7A33DD -.word 0x3F7A1E84 -.word 0x3F7A0904 -.word 0x3F79F35E -.word 0x3F79DD91 -.word 0x3F79C79D -.word 0x3F79B183 -.word 0x3F799B43 -.word 0x3F7984DC -.word 0x3F796E4E -.word 0x3F79579A -.word 0x3F7940C0 -.word 0x3F7929BF -.word 0x3F791298 -.word 0x3F78FB4A -.word 0x3F78E3D6 -.word 0x3F78CC3B -.word 0x3F78B47B -.word 0x3F789C93 -.word 0x3F788486 -.word 0x3F786C52 -.word 0x3F7853F8 -.word 0x3F783B77 -.word 0x3F7822D1 -.word 0x3F780A04 -.word 0x3F77F110 -.word 0x3F77D7F7 -.word 0x3F77BEB7 -.word 0x3F77A551 -.word 0x3F778BC5 -.word 0x3F777213 -.word 0x3F77583A -.word 0x3F773E3C -.word 0x3F772417 -.word 0x3F7709CC -.word 0x3F76EF5B -.word 0x3F76D4C4 -.word 0x3F76BA07 -.word 0x3F769F24 -.word 0x3F76841B -.word 0x3F7668EC -.word 0x3F764D97 -.word 0x3F76321B -.word 0x3F76167A -.word 0x3F75FAB3 -.word 0x3F75DEC6 -.word 0x3F75C2B3 -.word 0x3F75A67B -.word 0x3F758A1C -.word 0x3F756D97 -.word 0x3F7550ED -.word 0x3F75341D -.word 0x3F751727 -.word 0x3F74FA0B -.word 0x3F74DCC9 -.word 0x3F74BF62 -.word 0x3F74A1D5 -.word 0x3F748422 -.word 0x3F746649 -.word 0x3F74484B -.word 0x3F742A27 -.word 0x3F740BDD -.word 0x3F73ED6E -.word 0x3F73CED9 -.word 0x3F73B01F -.word 0x3F73913F -.word 0x3F737239 -.word 0x3F73530E -.word 0x3F7333BE -.word 0x3F731447 -.word 0x3F72F4AC -.word 0x3F72D4EB -.word 0x3F72B504 -.word 0x3F7294F8 -.word 0x3F7274C7 -.word 0x3F725470 -.word 0x3F7233F4 -.word 0x3F721352 -.word 0x3F71F28C -.word 0x3F71D19F -.word 0x3F71B08E -.word 0x3F718F57 -.word 0x3F716DFB -.word 0x3F714C7A -.word 0x3F712AD4 -.word 0x3F710908 -.word 0x3F70E717 -.word 0x3F70C501 -.word 0x3F70A2C6 -.word 0x3F708066 -.word 0x3F705DE1 -.word 0x3F703B37 -.word 0x3F701867 -.word 0x3F6FF573 -.word 0x3F6FD25A -.word 0x3F6FAF1B -.word 0x3F6F8BB8 -.word 0x3F6F6830 -.word 0x3F6F4483 -.word 0x3F6F20B0 -.word 0x3F6EFCBA -.word 0x3F6ED89E -.word 0x3F6EB45D -.word 0x3F6E8FF8 -.word 0x3F6E6B6D -.word 0x3F6E46BE -.word 0x3F6E21EB -.word 0x3F6DFCF2 -.word 0x3F6DD7D5 -.word 0x3F6DB293 -.word 0x3F6D8D2D -.word 0x3F6D67A1 -.word 0x3F6D41F2 -.word 0x3F6D1C1D -.word 0x3F6CF624 -.word 0x3F6CD007 -.word 0x3F6CA9C5 -.word 0x3F6C835E -.word 0x3F6C5CD4 -.word 0x3F6C3624 -.word 0x3F6C0F50 -.word 0x3F6BE858 -.word 0x3F6BC13B -.word 0x3F6B99FB -.word 0x3F6B7295 -.word 0x3F6B4B0C -.word 0x3F6B235E -.word 0x3F6AFB8C -.word 0x3F6AD395 -.word 0x3F6AAB7B -.word 0x3F6A833C -.word 0x3F6A5AD9 -.word 0x3F6A3252 -.word 0x3F6A09A7 -.word 0x3F69E0D7 -.word 0x3F69B7E4 -.word 0x3F698ECC -.word 0x3F696591 -.word 0x3F693C32 -.word 0x3F6912AE -.word 0x3F68E907 -.word 0x3F68BF3C -.word 0x3F68954C -.word 0x3F686B39 -.word 0x3F684103 -.word 0x3F6816A8 -.word 0x3F67EC29 -.word 0x3F67C187 -.word 0x3F6796C1 -.word 0x3F676BD8 -.word 0x3F6740CA -.word 0x3F671599 -.word 0x3F66EA45 -.word 0x3F66BECC -.word 0x3F669330 -.word 0x3F666771 -.word 0x3F663B8E -.word 0x3F660F88 -.word 0x3F65E35E -.word 0x3F65B710 -.word 0x3F658AA0 -.word 0x3F655E0B -.word 0x3F653154 -.word 0x3F650479 -.word 0x3F64D77B -.word 0x3F64AA59 -.word 0x3F647D14 -.word 0x3F644FAC -.word 0x3F642221 -.word 0x3F63F473 -.word 0x3F63C6A1 -.word 0x3F6398AC -.word 0x3F636A95 -.word 0x3F633C5A -.word 0x3F630DFC -.word 0x3F62DF7B -.word 0x3F62B0D7 -.word 0x3F628210 -.word 0x3F625326 -.word 0x3F62241A -.word 0x3F61F4EA -.word 0x3F61C598 -.word 0x3F619622 -.word 0x3F61668A -.word 0x3F6136D0 -.word 0x3F6106F2 -.word 0x3F60D6F2 -.word 0x3F60A6CF -.word 0x3F607689 -.word 0x3F604621 -.word 0x3F601596 -.word 0x3F5FE4E9 -.word 0x3F5FB419 -.word 0x3F5F8327 -.word 0x3F5F5212 -.word 0x3F5F20DB -.word 0x3F5EEF81 -.word 0x3F5EBE05 -.word 0x3F5E8C67 -.word 0x3F5E5AA6 -.word 0x3F5E28C3 -.word 0x3F5DF6BE -.word 0x3F5DC497 -.word 0x3F5D924D -.word 0x3F5D5FE1 -.word 0x3F5D2D53 -.word 0x3F5CFAA3 -.word 0x3F5CC7D1 -.word 0x3F5C94DD -.word 0x3F5C61C7 -.word 0x3F5C2E8E -.word 0x3F5BFB34 -.word 0x3F5BC7B8 -.word 0x3F5B941A -.word 0x3F5B605A -.word 0x3F5B2C79 -.word 0x3F5AF875 -.word 0x3F5AC450 -.word 0x3F5A9009 -.word 0x3F5A5BA0 -.word 0x3F5A2716 -.word 0x3F59F26A -.word 0x3F59BD9C -.word 0x3F5988AD -.word 0x3F59539C -.word 0x3F591E6A -.word 0x3F58E916 -.word 0x3F58B3A1 -.word 0x3F587E0B -.word 0x3F584853 -.word 0x3F581279 -.word 0x3F57DC7F -.word 0x3F57A663 -.word 0x3F577026 -.word 0x3F5739C7 -.word 0x3F570348 -.word 0x3F56CCA7 -.word 0x3F5695E5 -.word 0x3F565F02 -.word 0x3F5627FE -.word 0x3F55F0D9 -.word 0x3F55B993 -.word 0x3F55822C -.word 0x3F554AA4 -.word 0x3F5512FB -.word 0x3F54DB31 -.word 0x3F54A347 -.word 0x3F546B3B -.word 0x3F54330F -.word 0x3F53FAC3 -.word 0x3F53C255 -.word 0x3F5389C7 -.word 0x3F535118 -.word 0x3F531849 -.word 0x3F52DF59 -.word 0x3F52A649 -.word 0x3F526D18 -.word 0x3F5233C6 -.word 0x3F51FA54 -.word 0x3F51C0C2 -.word 0x3F518710 -.word 0x3F514D3D -.word 0x3F51134A -.word 0x3F50D937 -.word 0x3F509F03 -.word 0x3F5064AF -.word 0x3F502A3B -.word 0x3F4FEFA8 -.word 0x3F4FB4F4 -.word 0x3F4F7A1F -.word 0x3F4F3F2B -.word 0x3F4F0417 -.word 0x3F4EC8E4 -.word 0x3F4E8D90 -.word 0x3F4E521C -.word 0x3F4E1689 -.word 0x3F4DDAD5 -.word 0x3F4D9F02 -.word 0x3F4D6310 -.word 0x3F4D26FD -.word 0x3F4CEACB -.word 0x3F4CAE79 -.word 0x3F4C7208 -.word 0x3F4C3578 -.word 0x3F4BF8C7 -.word 0x3F4BBBF8 -.word 0x3F4B7F09 -.word 0x3F4B41FA -.word 0x3F4B04CC -.word 0x3F4AC77F -.word 0x3F4A8A13 -.word 0x3F4A4C87 -.word 0x3F4A0EDC -.word 0x3F49D112 -.word 0x3F499329 -.word 0x3F495521 -.word 0x3F4916FA -.word 0x3F48D8B3 -.word 0x3F489A4E -.word 0x3F485BCA -.word 0x3F481D27 -.word 0x3F47DE65 -.word 0x3F479F84 -.word 0x3F476085 -.word 0x3F472167 -.word 0x3F46E22A -.word 0x3F46A2CE -.word 0x3F466354 -.word 0x3F4623BB -.word 0x3F45E403 -.word 0x3F45A42D -.word 0x3F456439 -.word 0x3F452426 -.word 0x3F44E3F5 -.word 0x3F44A3A5 -.word 0x3F446337 -.word 0x3F4422AB -.word 0x3F43E200 -.word 0x3F43A138 -.word 0x3F436051 -.word 0x3F431F4C -.word 0x3F42DE29 -.word 0x3F429CE8 -.word 0x3F425B89 -.word 0x3F421A0B -.word 0x3F41D870 -.word 0x3F4196B7 -.word 0x3F4154E1 -.word 0x3F4112EC -.word 0x3F40D0DA -.word 0x3F408EA9 -.word 0x3F404C5C -.word 0x3F4009F0 -.word 0x3F3FC767 -.word 0x3F3F84C0 -.word 0x3F3F41FC -.word 0x3F3EFF1B -.word 0x3F3EBC1B -.word 0x3F3E78FF -.word 0x3F3E35C5 -.word 0x3F3DF26E -.word 0x3F3DAEF9 -.word 0x3F3D6B67 -.word 0x3F3D27B8 -.word 0x3F3CE3EC -.word 0x3F3CA003 -.word 0x3F3C5BFC -.word 0x3F3C17D9 -.word 0x3F3BD398 -.word 0x3F3B8F3B -.word 0x3F3B4AC1 -.word 0x3F3B0629 -.word 0x3F3AC175 -.word 0x3F3A7CA4 -.word 0x3F3A37B7 -.word 0x3F39F2AC -.word 0x3F39AD85 -.word 0x3F396842 -.word 0x3F3922E1 -.word 0x3F38DD65 -.word 0x3F3897CB -.word 0x3F385216 -.word 0x3F380C43 -.word 0x3F37C655 -.word 0x3F37804A -.word 0x3F373A23 -.word 0x3F36F3DF -.word 0x3F36AD7F -.word 0x3F366704 -.word 0x3F36206C -.word 0x3F35D9B8 -.word 0x3F3592E7 -.word 0x3F354BFB -.word 0x3F3504F3 -.word 0x3F34BDCF -.word 0x3F34768F -.word 0x3F342F34 -.word 0x3F33E7BC -.word 0x3F33A029 -.word 0x3F33587A -.word 0x3F3310AF -.word 0x3F32C8C9 -.word 0x3F3280C7 -.word 0x3F3238AA -.word 0x3F31F071 -.word 0x3F31A81D -.word 0x3F315FAD -.word 0x3F311722 -.word 0x3F30CE7C -.word 0x3F3085BB -.word 0x3F303CDE -.word 0x3F2FF3E6 -.word 0x3F2FAAD3 -.word 0x3F2F61A5 -.word 0x3F2F185B -.word 0x3F2ECEF7 -.word 0x3F2E8578 -.word 0x3F2E3BDE -.word 0x3F2DF229 -.word 0x3F2DA859 -.word 0x3F2D5E6F -.word 0x3F2D1469 -.word 0x3F2CCA49 -.word 0x3F2C800F -.word 0x3F2C35B9 -.word 0x3F2BEB4A -.word 0x3F2BA0BF -.word 0x3F2B561B -.word 0x3F2B0B5B -.word 0x3F2AC082 -.word 0x3F2A758E -.word 0x3F2A2A80 -.word 0x3F29DF57 -.word 0x3F299415 -.word 0x3F2948B8 -.word 0x3F28FD41 -.word 0x3F28B1B0 -.word 0x3F286605 -.word 0x3F281A40 -.word 0x3F27CE61 -.word 0x3F278268 -.word 0x3F273656 -.word 0x3F26EA2A -.word 0x3F269DE3 -.word 0x3F265184 -.word 0x3F26050A -.word 0x3F25B877 -.word 0x3F256BCB -.word 0x3F251F04 -.word 0x3F24D225 -.word 0x3F24852C -.word 0x3F24381A -.word 0x3F23EAEE -.word 0x3F239DA9 -.word 0x3F23504B -.word 0x3F2302D3 -.word 0x3F22B543 -.word 0x3F226799 -.word 0x3F2219D7 -.word 0x3F21CBFB -.word 0x3F217E06 -.word 0x3F212FF9 -.word 0x3F20E1D2 -.word 0x3F209393 -.word 0x3F20453B -.word 0x3F1FF6CB -.word 0x3F1FA841 -.word 0x3F1F599F -.word 0x3F1F0AE5 -.word 0x3F1EBC12 -.word 0x3F1E6D26 -.word 0x3F1E1E22 -.word 0x3F1DCF06 -.word 0x3F1D7FD1 -.word 0x3F1D3084 -.word 0x3F1CE11F -.word 0x3F1C91A2 -.word 0x3F1C420C -.word 0x3F1BF25F -.word 0x3F1BA299 -.word 0x3F1B52BB -.word 0x3F1B02C6 -.word 0x3F1AB2B8 -.word 0x3F1A6293 -.word 0x3F1A1255 -.word 0x3F19C200 -.word 0x3F197194 -.word 0x3F19210F -.word 0x3F18D073 -.word 0x3F187FC0 -.word 0x3F182EF5 -.word 0x3F17DE12 -.word 0x3F178D18 -.word 0x3F173C07 -.word 0x3F16EADE -.word 0x3F16999F -.word 0x3F164847 -.word 0x3F15F6D9 -.word 0x3F15A554 -.word 0x3F1553B7 -.word 0x3F150204 -.word 0x3F14B039 -.word 0x3F145E58 -.word 0x3F140C5F -.word 0x3F13BA50 -.word 0x3F13682A -.word 0x3F1315EE -.word 0x3F12C39A -.word 0x3F127130 -.word 0x3F121EB0 -.word 0x3F11CC19 -.word 0x3F11796B -.word 0x3F1126A7 -.word 0x3F10D3CD -.word 0x3F1080DC -.word 0x3F102DD5 -.word 0x3F0FDAB8 -.word 0x3F0F8784 -.word 0x3F0F343B -.word 0x3F0EE0DB -.word 0x3F0E8D65 -.word 0x3F0E39DA -.word 0x3F0DE638 -.word 0x3F0D9281 -.word 0x3F0D3EB3 -.word 0x3F0CEAD0 -.word 0x3F0C96D7 -.word 0x3F0C42C9 -.word 0x3F0BEEA5 -.word 0x3F0B9A6B -.word 0x3F0B461C -.word 0x3F0AF1B7 -.word 0x3F0A9D3D -.word 0x3F0A48AD -.word 0x3F09F409 -.word 0x3F099F4E -.word 0x3F094A7F -.word 0x3F08F59B -.word 0x3F08A0A1 -.word 0x3F084B92 -.word 0x3F07F66F -.word 0x3F07A136 -.word 0x3F074BE8 -.word 0x3F06F686 -.word 0x3F06A10E -.word 0x3F064B82 -.word 0x3F05F5E2 -.word 0x3F05A02C -.word 0x3F054A62 -.word 0x3F04F484 -.word 0x3F049E91 -.word 0x3F044889 -.word 0x3F03F26D -.word 0x3F039C3D -.word 0x3F0345F8 -.word 0x3F02EF9F -.word 0x3F029932 -.word 0x3F0242B1 -.word 0x3F01EC1C -.word 0x3F019573 -.word 0x3F013EB5 -.word 0x3F00E7E4 -.word 0x3F0090FF -.word 0x3F003A06 -.word 0x3EFFC5F3 -.word 0x3EFF17B2 -.word 0x3EFE694A -.word 0x3EFDBABB -.word 0x3EFD0C04 -.word 0x3EFC5D27 -.word 0x3EFBAE22 -.word 0x3EFAFEF7 -.word 0x3EFA4FA5 -.word 0x3EF9A02D -.word 0x3EF8F08E -.word 0x3EF840C8 -.word 0x3EF790DC -.word 0x3EF6E0CB -.word 0x3EF63093 -.word 0x3EF58035 -.word 0x3EF4CFB1 -.word 0x3EF41F07 -.word 0x3EF36E38 -.word 0x3EF2BD43 -.word 0x3EF20C29 -.word 0x3EF15AEA -.word 0x3EF0A985 -.word 0x3EEFF7FB -.word 0x3EEF464C -.word 0x3EEE9479 -.word 0x3EEDE280 -.word 0x3EED3063 -.word 0x3EEC7E21 -.word 0x3EEBCBBB -.word 0x3EEB1930 -.word 0x3EEA6681 -.word 0x3EE9B3AE -.word 0x3EE900B7 -.word 0x3EE84D9C -.word 0x3EE79A5D -.word 0x3EE6E6FB -.word 0x3EE63375 -.word 0x3EE57FCB -.word 0x3EE4CBFE -.word 0x3EE4180E -.word 0x3EE363FA -.word 0x3EE2AFC4 -.word 0x3EE1FB6A -.word 0x3EE146EE -.word 0x3EE0924F -.word 0x3EDFDD8D -.word 0x3EDF28A9 -.word 0x3EDE73A2 -.word 0x3EDDBE79 -.word 0x3EDD092E -.word 0x3EDC53C1 -.word 0x3EDB9E31 -.word 0x3EDAE880 -.word 0x3EDA32AD -.word 0x3ED97CB9 -.word 0x3ED8C6A3 -.word 0x3ED8106B -.word 0x3ED75A13 -.word 0x3ED6A399 -.word 0x3ED5ECFD -.word 0x3ED53641 -.word 0x3ED47F64 -.word 0x3ED3C867 -.word 0x3ED31148 -.word 0x3ED25A09 -.word 0x3ED1A2AA -.word 0x3ED0EB2A -.word 0x3ED0338A -.word 0x3ECF7BCA -.word 0x3ECEC3EA -.word 0x3ECE0BEA -.word 0x3ECD53CA -.word 0x3ECC9B8B -.word 0x3ECBE32C -.word 0x3ECB2AAE -.word 0x3ECA7210 -.word 0x3EC9B953 -.word 0x3EC90077 -.word 0x3EC8477C -.word 0x3EC78E62 -.word 0x3EC6D529 -.word 0x3EC61BD2 -.word 0x3EC5625C -.word 0x3EC4A8C8 -.word 0x3EC3EF15 -.word 0x3EC33544 -.word 0x3EC27B55 -.word 0x3EC1C148 -.word 0x3EC1071E -.word 0x3EC04CD5 -.word 0x3EBF926F -.word 0x3EBED7EB -.word 0x3EBE1D4A -.word 0x3EBD628B -.word 0x3EBCA7AF -.word 0x3EBBECB6 -.word 0x3EBB31A0 -.word 0x3EBA766E -.word 0x3EB9BB1E -.word 0x3EB8FFB2 -.word 0x3EB8442A -.word 0x3EB78884 -.word 0x3EB6CCC3 -.word 0x3EB610E6 -.word 0x3EB554EC -.word 0x3EB498D6 -.word 0x3EB3DCA5 -.word 0x3EB32058 -.word 0x3EB263EF -.word 0x3EB1A76B -.word 0x3EB0EACB -.word 0x3EB02E10 -.word 0x3EAF713A -.word 0x3EAEB449 -.word 0x3EADF73C -.word 0x3EAD3A15 -.word 0x3EAC7CD4 -.word 0x3EABBF77 -.word 0x3EAB0201 -.word 0x3EAA446F -.word 0x3EA986C4 -.word 0x3EA8C8FE -.word 0x3EA80B1F -.word 0x3EA74D25 -.word 0x3EA68F12 -.word 0x3EA5D0E5 -.word 0x3EA5129F -.word 0x3EA4543F -.word 0x3EA395C5 -.word 0x3EA2D733 -.word 0x3EA21887 -.word 0x3EA159C2 -.word 0x3EA09AE5 -.word 0x3E9FDBEE -.word 0x3E9F1CDF -.word 0x3E9E5DB8 -.word 0x3E9D9E78 -.word 0x3E9CDF20 -.word 0x3E9C1FAF -.word 0x3E9B6027 -.word 0x3E9AA086 -.word 0x3E99E0CE -.word 0x3E9920FE -.word 0x3E986116 -.word 0x3E97A117 -.word 0x3E96E100 -.word 0x3E9620D2 -.word 0x3E95608D -.word 0x3E94A031 -.word 0x3E93DFBF -.word 0x3E931F35 -.word 0x3E925E94 -.word 0x3E919DDD -.word 0x3E90DD10 -.word 0x3E901C2C -.word 0x3E8F5B32 -.word 0x3E8E9A22 -.word 0x3E8DD8FC -.word 0x3E8D17C0 -.word 0x3E8C566E -.word 0x3E8B9507 -.word 0x3E8AD38A -.word 0x3E8A11F7 -.word 0x3E895050 -.word 0x3E888E93 -.word 0x3E87CCC1 -.word 0x3E870ADA -.word 0x3E8648DF -.word 0x3E8586CE -.word 0x3E84C4AA -.word 0x3E840270 -.word 0x3E834022 -.word 0x3E827DC0 -.word 0x3E81BB4A -.word 0x3E80F8C0 -.word 0x3E803622 -.word 0x3E7EE6E1 -.word 0x3E7D6156 -.word 0x3E7BDBA4 -.word 0x3E7A55CB -.word 0x3E78CFCC -.word 0x3E7749A6 -.word 0x3E75C35A -.word 0x3E743CE8 -.word 0x3E72B651 -.word 0x3E712F94 -.word 0x3E6FA8B2 -.word 0x3E6E21AB -.word 0x3E6C9A7F -.word 0x3E6B132F -.word 0x3E698BBA -.word 0x3E680422 -.word 0x3E667C66 -.word 0x3E64F486 -.word 0x3E636C83 -.word 0x3E61E45C -.word 0x3E605C13 -.word 0x3E5ED3A8 -.word 0x3E5D4B1A -.word 0x3E5BC26A -.word 0x3E5A3997 -.word 0x3E58B0A4 -.word 0x3E57278F -.word 0x3E559E58 -.word 0x3E541501 -.word 0x3E528B89 -.word 0x3E5101F1 -.word 0x3E4F7838 -.word 0x3E4DEE60 -.word 0x3E4C6467 -.word 0x3E4ADA4F -.word 0x3E495018 -.word 0x3E47C5C2 -.word 0x3E463B4D -.word 0x3E44B0B9 -.word 0x3E432607 -.word 0x3E419B37 -.word 0x3E401049 -.word 0x3E3E853E -.word 0x3E3CFA15 -.word 0x3E3B6ECF -.word 0x3E39E36C -.word 0x3E3857EC -.word 0x3E36CC50 -.word 0x3E354098 -.word 0x3E33B4C4 -.word 0x3E3228D4 -.word 0x3E309CC9 -.word 0x3E2F10A2 -.word 0x3E2D8461 -.word 0x3E2BF804 -.word 0x3E2A6B8D -.word 0x3E28DEFC -.word 0x3E275251 -.word 0x3E25C58C -.word 0x3E2438AD -.word 0x3E22ABB6 -.word 0x3E211EA5 -.word 0x3E1F917B -.word 0x3E1E0438 -.word 0x3E1C76DE -.word 0x3E1AE96B -.word 0x3E195BE0 -.word 0x3E17CE3D -.word 0x3E164083 -.word 0x3E14B2B2 -.word 0x3E1324CA -.word 0x3E1196CC -.word 0x3E1008B7 -.word 0x3E0E7A8B -.word 0x3E0CEC4A -.word 0x3E0B5DF3 -.word 0x3E09CF86 -.word 0x3E084105 -.word 0x3E06B26E -.word 0x3E0523C2 -.word 0x3E039502 -.word 0x3E02062E -.word 0x3E007745 -.word 0x3DFDD092 -.word 0x3DFAB273 -.word 0x3DF7942C -.word 0x3DF475C0 -.word 0x3DF1572E -.word 0x3DEE3876 -.word 0x3DEB199A -.word 0x3DE7FA9A -.word 0x3DE4DB76 -.word 0x3DE1BC2E -.word 0x3DDE9CC4 -.word 0x3DDB7D37 -.word 0x3DD85D89 -.word 0x3DD53DB9 -.word 0x3DD21DC8 -.word 0x3DCEFDB7 -.word 0x3DCBDD86 -.word 0x3DC8BD36 -.word 0x3DC59CC6 -.word 0x3DC27C39 -.word 0x3DBF5B8D -.word 0x3DBC3AC3 -.word 0x3DB919DD -.word 0x3DB5F8DA -.word 0x3DB2D7BB -.word 0x3DAFB680 -.word 0x3DAC952B -.word 0x3DA973BA -.word 0x3DA65230 -.word 0x3DA3308C -.word 0x3DA00ECF -.word 0x3D9CECF9 -.word 0x3D99CB0A -.word 0x3D96A905 -.word 0x3D9386E7 -.word 0x3D9064B4 -.word 0x3D8D426A -.word 0x3D8A200A -.word 0x3D86FD94 -.word 0x3D83DB0A -.word 0x3D80B86C -.word 0x3D7B2B74 -.word 0x3D74E5E9 -.word 0x3D6EA038 -.word 0x3D685A62 -.word 0x3D621469 -.word 0x3D5BCE4C -.word 0x3D55880E -.word 0x3D4F41AF -.word 0x3D48FB30 -.word 0x3D42B491 -.word 0x3D3C6DD5 -.word 0x3D3626FC -.word 0x3D2FE007 -.word 0x3D2998F6 -.word 0x3D2351CB -.word 0x3D1D0A88 -.word 0x3D16C32C -.word 0x3D107BB8 -.word 0x3D0A342F -.word 0x3D03EC90 -.word 0x3CFB49BA -.word 0x3CEEBA2C -.word 0x3CE22A7A -.word 0x3CD59AA6 -.word 0x3CC90AB0 -.word 0x3CBC7A9B -.word 0x3CAFEA69 -.word 0x3CA35A1C -.word 0x3C96C9B6 -.word 0x3C8A3938 -.word 0x3C7B514B -.word 0x3C622FFF -.word 0x3C490E90 -.word 0x3C2FED02 -.word 0x3C16CB58 -.word 0x3BFB5330 -.word 0x3BC90F88 -.word 0x3B96CBC1 -.word 0x3B490FC6 -.word 0x3AC90FD5 -.word 0x00000000 -.word 0xBAC90FD5 -.word 0xBB490FC6 -.word 0xBB96CBC1 -.word 0xBBC90F88 -.word 0xBBFB5330 -.word 0xBC16CB58 -.word 0xBC2FED02 -.word 0xBC490E90 -.word 0xBC622FFF -.word 0xBC7B514B -.word 0xBC8A3938 -.word 0xBC96C9B6 -.word 0xBCA35A1C -.word 0xBCAFEA69 -.word 0xBCBC7A9B -.word 0xBCC90AB0 -.word 0xBCD59AA6 -.word 0xBCE22A7A -.word 0xBCEEBA2C -.word 0xBCFB49BA -.word 0xBD03EC90 -.word 0xBD0A342F -.word 0xBD107BB8 -.word 0xBD16C32C -.word 0xBD1D0A88 -.word 0xBD2351CB -.word 0xBD2998F6 -.word 0xBD2FE007 -.word 0xBD3626FC -.word 0xBD3C6DD5 -.word 0xBD42B491 -.word 0xBD48FB30 -.word 0xBD4F41AF -.word 0xBD55880E -.word 0xBD5BCE4C -.word 0xBD621469 -.word 0xBD685A62 -.word 0xBD6EA038 -.word 0xBD74E5E9 -.word 0xBD7B2B74 -.word 0xBD80B86C -.word 0xBD83DB0A -.word 0xBD86FD94 -.word 0xBD8A200A -.word 0xBD8D426A -.word 0xBD9064B4 -.word 0xBD9386E7 -.word 0xBD96A905 -.word 0xBD99CB0A -.word 0xBD9CECF9 -.word 0xBDA00ECF -.word 0xBDA3308C -.word 0xBDA65230 -.word 0xBDA973BA -.word 0xBDAC952B -.word 0xBDAFB680 -.word 0xBDB2D7BB -.word 0xBDB5F8DA -.word 0xBDB919DD -.word 0xBDBC3AC3 -.word 0xBDBF5B8D -.word 0xBDC27C39 -.word 0xBDC59CC6 -.word 0xBDC8BD36 -.word 0xBDCBDD86 -.word 0xBDCEFDB7 -.word 0xBDD21DC8 -.word 0xBDD53DB9 -.word 0xBDD85D89 -.word 0xBDDB7D37 -.word 0xBDDE9CC4 -.word 0xBDE1BC2E -.word 0xBDE4DB76 -.word 0xBDE7FA9A -.word 0xBDEB199A -.word 0xBDEE3876 -.word 0xBDF1572E -.word 0xBDF475C0 -.word 0xBDF7942C -.word 0xBDFAB273 -.word 0xBDFDD092 -.word 0xBE007745 -.word 0xBE02062E -.word 0xBE039502 -.word 0xBE0523C2 -.word 0xBE06B26E -.word 0xBE084105 -.word 0xBE09CF86 -.word 0xBE0B5DF3 -.word 0xBE0CEC4A -.word 0xBE0E7A8B -.word 0xBE1008B7 -.word 0xBE1196CC -.word 0xBE1324CA -.word 0xBE14B2B2 -.word 0xBE164083 -.word 0xBE17CE3D -.word 0xBE195BE0 -.word 0xBE1AE96B -.word 0xBE1C76DE -.word 0xBE1E0438 -.word 0xBE1F917B -.word 0xBE211EA5 -.word 0xBE22ABB6 -.word 0xBE2438AD -.word 0xBE25C58C -.word 0xBE275251 -.word 0xBE28DEFC -.word 0xBE2A6B8D -.word 0xBE2BF804 -.word 0xBE2D8461 -.word 0xBE2F10A2 -.word 0xBE309CC9 -.word 0xBE3228D4 -.word 0xBE33B4C4 -.word 0xBE354098 -.word 0xBE36CC50 -.word 0xBE3857EC -.word 0xBE39E36C -.word 0xBE3B6ECF -.word 0xBE3CFA15 -.word 0xBE3E853E -.word 0xBE401049 -.word 0xBE419B37 -.word 0xBE432607 -.word 0xBE44B0B9 -.word 0xBE463B4D -.word 0xBE47C5C2 -.word 0xBE495018 -.word 0xBE4ADA4F -.word 0xBE4C6467 -.word 0xBE4DEE60 -.word 0xBE4F7838 -.word 0xBE5101F1 -.word 0xBE528B89 -.word 0xBE541501 -.word 0xBE559E58 -.word 0xBE57278F -.word 0xBE58B0A4 -.word 0xBE5A3997 -.word 0xBE5BC26A -.word 0xBE5D4B1A -.word 0xBE5ED3A8 -.word 0xBE605C13 -.word 0xBE61E45C -.word 0xBE636C83 -.word 0xBE64F486 -.word 0xBE667C66 -.word 0xBE680422 -.word 0xBE698BBA -.word 0xBE6B132F -.word 0xBE6C9A7F -.word 0xBE6E21AB -.word 0xBE6FA8B2 -.word 0xBE712F94 -.word 0xBE72B651 -.word 0xBE743CE8 -.word 0xBE75C35A -.word 0xBE7749A6 -.word 0xBE78CFCC -.word 0xBE7A55CB -.word 0xBE7BDBA4 -.word 0xBE7D6156 -.word 0xBE7EE6E1 -.word 0xBE803622 -.word 0xBE80F8C0 -.word 0xBE81BB4A -.word 0xBE827DC0 -.word 0xBE834022 -.word 0xBE840270 -.word 0xBE84C4AA -.word 0xBE8586CE -.word 0xBE8648DF -.word 0xBE870ADA -.word 0xBE87CCC1 -.word 0xBE888E93 -.word 0xBE895050 -.word 0xBE8A11F7 -.word 0xBE8AD38A -.word 0xBE8B9507 -.word 0xBE8C566E -.word 0xBE8D17C0 -.word 0xBE8DD8FC -.word 0xBE8E9A22 -.word 0xBE8F5B32 -.word 0xBE901C2C -.word 0xBE90DD10 -.word 0xBE919DDD -.word 0xBE925E94 -.word 0xBE931F35 -.word 0xBE93DFBF -.word 0xBE94A031 -.word 0xBE95608D -.word 0xBE9620D2 -.word 0xBE96E100 -.word 0xBE97A117 -.word 0xBE986116 -.word 0xBE9920FE -.word 0xBE99E0CE -.word 0xBE9AA086 -.word 0xBE9B6027 -.word 0xBE9C1FAF -.word 0xBE9CDF20 -.word 0xBE9D9E78 -.word 0xBE9E5DB8 -.word 0xBE9F1CDF -.word 0xBE9FDBEE -.word 0xBEA09AE5 -.word 0xBEA159C2 -.word 0xBEA21887 -.word 0xBEA2D733 -.word 0xBEA395C5 -.word 0xBEA4543F -.word 0xBEA5129F -.word 0xBEA5D0E5 -.word 0xBEA68F12 -.word 0xBEA74D25 -.word 0xBEA80B1F -.word 0xBEA8C8FE -.word 0xBEA986C4 -.word 0xBEAA446F -.word 0xBEAB0201 -.word 0xBEABBF77 -.word 0xBEAC7CD4 -.word 0xBEAD3A15 -.word 0xBEADF73C -.word 0xBEAEB449 -.word 0xBEAF713A -.word 0xBEB02E10 -.word 0xBEB0EACB -.word 0xBEB1A76B -.word 0xBEB263EF -.word 0xBEB32058 -.word 0xBEB3DCA5 -.word 0xBEB498D6 -.word 0xBEB554EC -.word 0xBEB610E6 -.word 0xBEB6CCC3 -.word 0xBEB78884 -.word 0xBEB8442A -.word 0xBEB8FFB2 -.word 0xBEB9BB1E -.word 0xBEBA766E -.word 0xBEBB31A0 -.word 0xBEBBECB6 -.word 0xBEBCA7AF -.word 0xBEBD628B -.word 0xBEBE1D4A -.word 0xBEBED7EB -.word 0xBEBF926F -.word 0xBEC04CD5 -.word 0xBEC1071E -.word 0xBEC1C148 -.word 0xBEC27B55 -.word 0xBEC33544 -.word 0xBEC3EF15 -.word 0xBEC4A8C8 -.word 0xBEC5625C -.word 0xBEC61BD2 -.word 0xBEC6D529 -.word 0xBEC78E62 -.word 0xBEC8477C -.word 0xBEC90077 -.word 0xBEC9B953 -.word 0xBECA7210 -.word 0xBECB2AAE -.word 0xBECBE32C -.word 0xBECC9B8B -.word 0xBECD53CA -.word 0xBECE0BEA -.word 0xBECEC3EA -.word 0xBECF7BCA -.word 0xBED0338A -.word 0xBED0EB2A -.word 0xBED1A2AA -.word 0xBED25A09 -.word 0xBED31148 -.word 0xBED3C867 -.word 0xBED47F64 -.word 0xBED53641 -.word 0xBED5ECFD -.word 0xBED6A399 -.word 0xBED75A13 -.word 0xBED8106B -.word 0xBED8C6A3 -.word 0xBED97CB9 -.word 0xBEDA32AD -.word 0xBEDAE880 -.word 0xBEDB9E31 -.word 0xBEDC53C1 -.word 0xBEDD092E -.word 0xBEDDBE79 -.word 0xBEDE73A2 -.word 0xBEDF28A9 -.word 0xBEDFDD8D -.word 0xBEE0924F -.word 0xBEE146EE -.word 0xBEE1FB6A -.word 0xBEE2AFC4 -.word 0xBEE363FA -.word 0xBEE4180E -.word 0xBEE4CBFE -.word 0xBEE57FCB -.word 0xBEE63375 -.word 0xBEE6E6FB -.word 0xBEE79A5D -.word 0xBEE84D9C -.word 0xBEE900B7 -.word 0xBEE9B3AE -.word 0xBEEA6681 -.word 0xBEEB1930 -.word 0xBEEBCBBB -.word 0xBEEC7E21 -.word 0xBEED3063 -.word 0xBEEDE280 -.word 0xBEEE9479 -.word 0xBEEF464C -.word 0xBEEFF7FB -.word 0xBEF0A985 -.word 0xBEF15AEA -.word 0xBEF20C29 -.word 0xBEF2BD43 -.word 0xBEF36E38 -.word 0xBEF41F07 -.word 0xBEF4CFB1 -.word 0xBEF58035 -.word 0xBEF63093 -.word 0xBEF6E0CB -.word 0xBEF790DC -.word 0xBEF840C8 -.word 0xBEF8F08E -.word 0xBEF9A02D -.word 0xBEFA4FA5 -.word 0xBEFAFEF7 -.word 0xBEFBAE22 -.word 0xBEFC5D27 -.word 0xBEFD0C04 -.word 0xBEFDBABB -.word 0xBEFE694A -.word 0xBEFF17B2 -.word 0xBEFFC5F3 -.word 0xBF003A06 -.word 0xBF0090FF -.word 0xBF00E7E4 -.word 0xBF013EB5 -.word 0xBF019573 -.word 0xBF01EC1C -.word 0xBF0242B1 -.word 0xBF029932 -.word 0xBF02EF9F -.word 0xBF0345F8 -.word 0xBF039C3D -.word 0xBF03F26D -.word 0xBF044889 -.word 0xBF049E91 -.word 0xBF04F484 -.word 0xBF054A62 -.word 0xBF05A02C -.word 0xBF05F5E2 -.word 0xBF064B82 -.word 0xBF06A10E -.word 0xBF06F686 -.word 0xBF074BE8 -.word 0xBF07A136 -.word 0xBF07F66F -.word 0xBF084B92 -.word 0xBF08A0A1 -.word 0xBF08F59B -.word 0xBF094A7F -.word 0xBF099F4E -.word 0xBF09F409 -.word 0xBF0A48AD -.word 0xBF0A9D3D -.word 0xBF0AF1B7 -.word 0xBF0B461C -.word 0xBF0B9A6B -.word 0xBF0BEEA5 -.word 0xBF0C42C9 -.word 0xBF0C96D7 -.word 0xBF0CEAD0 -.word 0xBF0D3EB3 -.word 0xBF0D9281 -.word 0xBF0DE638 -.word 0xBF0E39DA -.word 0xBF0E8D65 -.word 0xBF0EE0DB -.word 0xBF0F343B -.word 0xBF0F8784 -.word 0xBF0FDAB8 -.word 0xBF102DD5 -.word 0xBF1080DC -.word 0xBF10D3CD -.word 0xBF1126A7 -.word 0xBF11796B -.word 0xBF11CC19 -.word 0xBF121EB0 -.word 0xBF127130 -.word 0xBF12C39A -.word 0xBF1315EE -.word 0xBF13682A -.word 0xBF13BA50 -.word 0xBF140C5F -.word 0xBF145E58 -.word 0xBF14B039 -.word 0xBF150204 -.word 0xBF1553B7 -.word 0xBF15A554 -.word 0xBF15F6D9 -.word 0xBF164847 -.word 0xBF16999F -.word 0xBF16EADE -.word 0xBF173C07 -.word 0xBF178D18 -.word 0xBF17DE12 -.word 0xBF182EF5 -.word 0xBF187FC0 -.word 0xBF18D073 -.word 0xBF19210F -.word 0xBF197194 -.word 0xBF19C200 -.word 0xBF1A1255 -.word 0xBF1A6293 -.word 0xBF1AB2B8 -.word 0xBF1B02C6 -.word 0xBF1B52BB -.word 0xBF1BA299 -.word 0xBF1BF25F -.word 0xBF1C420C -.word 0xBF1C91A2 -.word 0xBF1CE11F -.word 0xBF1D3084 -.word 0xBF1D7FD1 -.word 0xBF1DCF06 -.word 0xBF1E1E22 -.word 0xBF1E6D26 -.word 0xBF1EBC12 -.word 0xBF1F0AE5 -.word 0xBF1F599F -.word 0xBF1FA841 -.word 0xBF1FF6CB -.word 0xBF20453B -.word 0xBF209393 -.word 0xBF20E1D2 -.word 0xBF212FF9 -.word 0xBF217E06 -.word 0xBF21CBFB -.word 0xBF2219D7 -.word 0xBF226799 -.word 0xBF22B543 -.word 0xBF2302D3 -.word 0xBF23504B -.word 0xBF239DA9 -.word 0xBF23EAEE -.word 0xBF24381A -.word 0xBF24852C -.word 0xBF24D225 -.word 0xBF251F04 -.word 0xBF256BCB -.word 0xBF25B877 -.word 0xBF26050A -.word 0xBF265184 -.word 0xBF269DE3 -.word 0xBF26EA2A -.word 0xBF273656 -.word 0xBF278268 -.word 0xBF27CE61 -.word 0xBF281A40 -.word 0xBF286605 -.word 0xBF28B1B0 -.word 0xBF28FD41 -.word 0xBF2948B8 -.word 0xBF299415 -.word 0xBF29DF57 -.word 0xBF2A2A80 -.word 0xBF2A758E -.word 0xBF2AC082 -.word 0xBF2B0B5B -.word 0xBF2B561B -.word 0xBF2BA0BF -.word 0xBF2BEB4A -.word 0xBF2C35B9 -.word 0xBF2C800F -.word 0xBF2CCA49 -.word 0xBF2D1469 -.word 0xBF2D5E6F -.word 0xBF2DA859 -.word 0xBF2DF229 -.word 0xBF2E3BDE -.word 0xBF2E8578 -.word 0xBF2ECEF7 -.word 0xBF2F185B -.word 0xBF2F61A5 -.word 0xBF2FAAD3 -.word 0xBF2FF3E6 -.word 0xBF303CDE -.word 0xBF3085BB -.word 0xBF30CE7C -.word 0xBF311722 -.word 0xBF315FAD -.word 0xBF31A81D -.word 0xBF31F071 -.word 0xBF3238AA -.word 0xBF3280C7 -.word 0xBF32C8C9 -.word 0xBF3310AF -.word 0xBF33587A -.word 0xBF33A029 -.word 0xBF33E7BC -.word 0xBF342F34 -.word 0xBF34768F -.word 0xBF34BDCF -.word 0xBF3504F3 -.word 0xBF354BFB -.word 0xBF3592E7 -.word 0xBF35D9B8 -.word 0xBF36206C -.word 0xBF366704 -.word 0xBF36AD7F -.word 0xBF36F3DF -.word 0xBF373A23 -.word 0xBF37804A -.word 0xBF37C655 -.word 0xBF380C43 -.word 0xBF385216 -.word 0xBF3897CB -.word 0xBF38DD65 -.word 0xBF3922E1 -.word 0xBF396842 -.word 0xBF39AD85 -.word 0xBF39F2AC -.word 0xBF3A37B7 -.word 0xBF3A7CA4 -.word 0xBF3AC175 -.word 0xBF3B0629 -.word 0xBF3B4AC1 -.word 0xBF3B8F3B -.word 0xBF3BD398 -.word 0xBF3C17D9 -.word 0xBF3C5BFC -.word 0xBF3CA003 -.word 0xBF3CE3EC -.word 0xBF3D27B8 -.word 0xBF3D6B67 -.word 0xBF3DAEF9 -.word 0xBF3DF26E -.word 0xBF3E35C5 -.word 0xBF3E78FF -.word 0xBF3EBC1B -.word 0xBF3EFF1B -.word 0xBF3F41FC -.word 0xBF3F84C0 -.word 0xBF3FC767 -.word 0xBF4009F0 -.word 0xBF404C5C -.word 0xBF408EA9 -.word 0xBF40D0DA -.word 0xBF4112EC -.word 0xBF4154E1 -.word 0xBF4196B7 -.word 0xBF41D870 -.word 0xBF421A0B -.word 0xBF425B89 -.word 0xBF429CE8 -.word 0xBF42DE29 -.word 0xBF431F4C -.word 0xBF436051 -.word 0xBF43A138 -.word 0xBF43E200 -.word 0xBF4422AB -.word 0xBF446337 -.word 0xBF44A3A5 -.word 0xBF44E3F5 -.word 0xBF452426 -.word 0xBF456439 -.word 0xBF45A42D -.word 0xBF45E403 -.word 0xBF4623BB -.word 0xBF466354 -.word 0xBF46A2CE -.word 0xBF46E22A -.word 0xBF472167 -.word 0xBF476085 -.word 0xBF479F84 -.word 0xBF47DE65 -.word 0xBF481D27 -.word 0xBF485BCA -.word 0xBF489A4E -.word 0xBF48D8B3 -.word 0xBF4916FA -.word 0xBF495521 -.word 0xBF499329 -.word 0xBF49D112 -.word 0xBF4A0EDC -.word 0xBF4A4C87 -.word 0xBF4A8A13 -.word 0xBF4AC77F -.word 0xBF4B04CC -.word 0xBF4B41FA -.word 0xBF4B7F09 -.word 0xBF4BBBF8 -.word 0xBF4BF8C7 -.word 0xBF4C3578 -.word 0xBF4C7208 -.word 0xBF4CAE79 -.word 0xBF4CEACB -.word 0xBF4D26FD -.word 0xBF4D6310 -.word 0xBF4D9F02 -.word 0xBF4DDAD5 -.word 0xBF4E1689 -.word 0xBF4E521C -.word 0xBF4E8D90 -.word 0xBF4EC8E4 -.word 0xBF4F0417 -.word 0xBF4F3F2B -.word 0xBF4F7A1F -.word 0xBF4FB4F4 -.word 0xBF4FEFA8 -.word 0xBF502A3B -.word 0xBF5064AF -.word 0xBF509F03 -.word 0xBF50D937 -.word 0xBF51134A -.word 0xBF514D3D -.word 0xBF518710 -.word 0xBF51C0C2 -.word 0xBF51FA54 -.word 0xBF5233C6 -.word 0xBF526D18 -.word 0xBF52A649 -.word 0xBF52DF59 -.word 0xBF531849 -.word 0xBF535118 -.word 0xBF5389C7 -.word 0xBF53C255 -.word 0xBF53FAC3 -.word 0xBF54330F -.word 0xBF546B3B -.word 0xBF54A347 -.word 0xBF54DB31 -.word 0xBF5512FB -.word 0xBF554AA4 -.word 0xBF55822C -.word 0xBF55B993 -.word 0xBF55F0D9 -.word 0xBF5627FE -.word 0xBF565F02 -.word 0xBF5695E5 -.word 0xBF56CCA7 -.word 0xBF570348 -.word 0xBF5739C7 -.word 0xBF577026 -.word 0xBF57A663 -.word 0xBF57DC7F -.word 0xBF581279 -.word 0xBF584853 -.word 0xBF587E0B -.word 0xBF58B3A1 -.word 0xBF58E916 -.word 0xBF591E6A -.word 0xBF59539C -.word 0xBF5988AD -.word 0xBF59BD9C -.word 0xBF59F26A -.word 0xBF5A2716 -.word 0xBF5A5BA0 -.word 0xBF5A9009 -.word 0xBF5AC450 -.word 0xBF5AF875 -.word 0xBF5B2C79 -.word 0xBF5B605A -.word 0xBF5B941A -.word 0xBF5BC7B8 -.word 0xBF5BFB34 -.word 0xBF5C2E8E -.word 0xBF5C61C7 -.word 0xBF5C94DD -.word 0xBF5CC7D1 -.word 0xBF5CFAA3 -.word 0xBF5D2D53 -.word 0xBF5D5FE1 -.word 0xBF5D924D -.word 0xBF5DC497 -.word 0xBF5DF6BE -.word 0xBF5E28C3 -.word 0xBF5E5AA6 -.word 0xBF5E8C67 -.word 0xBF5EBE05 -.word 0xBF5EEF81 -.word 0xBF5F20DB -.word 0xBF5F5212 -.word 0xBF5F8327 -.word 0xBF5FB419 -.word 0xBF5FE4E9 -.word 0xBF601596 -.word 0xBF604621 -.word 0xBF607689 -.word 0xBF60A6CF -.word 0xBF60D6F2 -.word 0xBF6106F2 -.word 0xBF6136D0 -.word 0xBF61668A -.word 0xBF619622 -.word 0xBF61C598 -.word 0xBF61F4EA -.word 0xBF62241A -.word 0xBF625326 -.word 0xBF628210 -.word 0xBF62B0D7 -.word 0xBF62DF7B -.word 0xBF630DFC -.word 0xBF633C5A -.word 0xBF636A95 -.word 0xBF6398AC -.word 0xBF63C6A1 -.word 0xBF63F473 -.word 0xBF642221 -.word 0xBF644FAC -.word 0xBF647D14 -.word 0xBF64AA59 -.word 0xBF64D77B -.word 0xBF650479 -.word 0xBF653154 -.word 0xBF655E0B -.word 0xBF658AA0 -.word 0xBF65B710 -.word 0xBF65E35E -.word 0xBF660F88 -.word 0xBF663B8E -.word 0xBF666771 -.word 0xBF669330 -.word 0xBF66BECC -.word 0xBF66EA45 -.word 0xBF671599 -.word 0xBF6740CA -.word 0xBF676BD8 -.word 0xBF6796C1 -.word 0xBF67C187 -.word 0xBF67EC29 -.word 0xBF6816A8 -.word 0xBF684103 -.word 0xBF686B39 -.word 0xBF68954C -.word 0xBF68BF3C -.word 0xBF68E907 -.word 0xBF6912AE -.word 0xBF693C32 -.word 0xBF696591 -.word 0xBF698ECC -.word 0xBF69B7E4 -.word 0xBF69E0D7 -.word 0xBF6A09A7 -.word 0xBF6A3252 -.word 0xBF6A5AD9 -.word 0xBF6A833C -.word 0xBF6AAB7B -.word 0xBF6AD395 -.word 0xBF6AFB8C -.word 0xBF6B235E -.word 0xBF6B4B0C -.word 0xBF6B7295 -.word 0xBF6B99FB -.word 0xBF6BC13B -.word 0xBF6BE858 -.word 0xBF6C0F50 -.word 0xBF6C3624 -.word 0xBF6C5CD4 -.word 0xBF6C835E -.word 0xBF6CA9C5 -.word 0xBF6CD007 -.word 0xBF6CF624 -.word 0xBF6D1C1D -.word 0xBF6D41F2 -.word 0xBF6D67A1 -.word 0xBF6D8D2D -.word 0xBF6DB293 -.word 0xBF6DD7D5 -.word 0xBF6DFCF2 -.word 0xBF6E21EB -.word 0xBF6E46BE -.word 0xBF6E6B6D -.word 0xBF6E8FF8 -.word 0xBF6EB45D -.word 0xBF6ED89E -.word 0xBF6EFCBA -.word 0xBF6F20B0 -.word 0xBF6F4483 -.word 0xBF6F6830 -.word 0xBF6F8BB8 -.word 0xBF6FAF1B -.word 0xBF6FD25A -.word 0xBF6FF573 -.word 0xBF701867 -.word 0xBF703B37 -.word 0xBF705DE1 -.word 0xBF708066 -.word 0xBF70A2C6 -.word 0xBF70C501 -.word 0xBF70E717 -.word 0xBF710908 -.word 0xBF712AD4 -.word 0xBF714C7A -.word 0xBF716DFB -.word 0xBF718F57 -.word 0xBF71B08E -.word 0xBF71D19F -.word 0xBF71F28C -.word 0xBF721352 -.word 0xBF7233F4 -.word 0xBF725470 -.word 0xBF7274C7 -.word 0xBF7294F8 -.word 0xBF72B504 -.word 0xBF72D4EB -.word 0xBF72F4AC -.word 0xBF731447 -.word 0xBF7333BE -.word 0xBF73530E -.word 0xBF737239 -.word 0xBF73913F -.word 0xBF73B01F -.word 0xBF73CED9 -.word 0xBF73ED6E -.word 0xBF740BDD -.word 0xBF742A27 -.word 0xBF74484B -.word 0xBF746649 -.word 0xBF748422 -.word 0xBF74A1D5 -.word 0xBF74BF62 -.word 0xBF74DCC9 -.word 0xBF74FA0B -.word 0xBF751727 -.word 0xBF75341D -.word 0xBF7550ED -.word 0xBF756D97 -.word 0xBF758A1C -.word 0xBF75A67B -.word 0xBF75C2B3 -.word 0xBF75DEC6 -.word 0xBF75FAB3 -.word 0xBF76167A -.word 0xBF76321B -.word 0xBF764D97 -.word 0xBF7668EC -.word 0xBF76841B -.word 0xBF769F24 -.word 0xBF76BA07 -.word 0xBF76D4C4 -.word 0xBF76EF5B -.word 0xBF7709CC -.word 0xBF772417 -.word 0xBF773E3C -.word 0xBF77583A -.word 0xBF777213 -.word 0xBF778BC5 -.word 0xBF77A551 -.word 0xBF77BEB7 -.word 0xBF77D7F7 -.word 0xBF77F110 -.word 0xBF780A04 -.word 0xBF7822D1 -.word 0xBF783B77 -.word 0xBF7853F8 -.word 0xBF786C52 -.word 0xBF788486 -.word 0xBF789C93 -.word 0xBF78B47B -.word 0xBF78CC3B -.word 0xBF78E3D6 -.word 0xBF78FB4A -.word 0xBF791298 -.word 0xBF7929BF -.word 0xBF7940C0 -.word 0xBF79579A -.word 0xBF796E4E -.word 0xBF7984DC -.word 0xBF799B43 -.word 0xBF79B183 -.word 0xBF79C79D -.word 0xBF79DD91 -.word 0xBF79F35E -.word 0xBF7A0904 -.word 0xBF7A1E84 -.word 0xBF7A33DD -.word 0xBF7A4910 -.word 0xBF7A5E1C -.word 0xBF7A7302 -.word 0xBF7A87C1 -.word 0xBF7A9C59 -.word 0xBF7AB0CB -.word 0xBF7AC516 -.word 0xBF7AD93A -.word 0xBF7AED37 -.word 0xBF7B010E -.word 0xBF7B14BE -.word 0xBF7B2848 -.word 0xBF7B3BAB -.word 0xBF7B4EE7 -.word 0xBF7B61FC -.word 0xBF7B74EA -.word 0xBF7B87B2 -.word 0xBF7B9A53 -.word 0xBF7BACCD -.word 0xBF7BBF20 -.word 0xBF7BD14D -.word 0xBF7BE353 -.word 0xBF7BF531 -.word 0xBF7C06E9 -.word 0xBF7C187A -.word 0xBF7C29E5 -.word 0xBF7C3B28 -.word 0xBF7C4C44 -.word 0xBF7C5D3A -.word 0xBF7C6E08 -.word 0xBF7C7EB0 -.word 0xBF7C8F31 -.word 0xBF7C9F8A -.word 0xBF7CAFBD -.word 0xBF7CBFC9 -.word 0xBF7CCFAE -.word 0xBF7CDF6C -.word 0xBF7CEF03 -.word 0xBF7CFE73 -.word 0xBF7D0DBC -.word 0xBF7D1CDD -.word 0xBF7D2BD8 -.word 0xBF7D3AAC -.word 0xBF7D4959 -.word 0xBF7D57DE -.word 0xBF7D663D -.word 0xBF7D7474 -.word 0xBF7D8285 -.word 0xBF7D906E -.word 0xBF7D9E30 -.word 0xBF7DABCC -.word 0xBF7DB940 -.word 0xBF7DC68C -.word 0xBF7DD3B2 -.word 0xBF7DE0B1 -.word 0xBF7DED88 -.word 0xBF7DFA38 -.word 0xBF7E06C2 -.word 0xBF7E1324 -.word 0xBF7E1F5E -.word 0xBF7E2B72 -.word 0xBF7E375E -.word 0xBF7E4323 -.word 0xBF7E4EC1 -.word 0xBF7E5A38 -.word 0xBF7E6588 -.word 0xBF7E70B0 -.word 0xBF7E7BB1 -.word 0xBF7E868B -.word 0xBF7E913D -.word 0xBF7E9BC9 -.word 0xBF7EA62D -.word 0xBF7EB069 -.word 0xBF7EBA7F -.word 0xBF7EC46D -.word 0xBF7ECE34 -.word 0xBF7ED7D4 -.word 0xBF7EE14C -.word 0xBF7EEA9D -.word 0xBF7EF3C7 -.word 0xBF7EFCC9 -.word 0xBF7F05A4 -.word 0xBF7F0E58 -.word 0xBF7F16E4 -.word 0xBF7F1F49 -.word 0xBF7F2787 -.word 0xBF7F2F9D -.word 0xBF7F378C -.word 0xBF7F3F54 -.word 0xBF7F46F4 -.word 0xBF7F4E6D -.word 0xBF7F55BF -.word 0xBF7F5CE9 -.word 0xBF7F63EC -.word 0xBF7F6AC7 -.word 0xBF7F717B -.word 0xBF7F7808 -.word 0xBF7F7E6D -.word 0xBF7F84AB -.word 0xBF7F8AC2 -.word 0xBF7F90B1 -.word 0xBF7F9678 -.word 0xBF7F9C18 -.word 0xBF7FA191 -.word 0xBF7FA6E3 -.word 0xBF7FAC0D -.word 0xBF7FB10F -.word 0xBF7FB5EA -.word 0xBF7FBA9E -.word 0xBF7FBF2A -.word 0xBF7FC38F -.word 0xBF7FC7CC -.word 0xBF7FCBE2 -.word 0xBF7FCFD1 -.word 0xBF7FD397 -.word 0xBF7FD737 -.word 0xBF7FDAAF -.word 0xBF7FDE00 -.word 0xBF7FE129 -.word 0xBF7FE42B -.word 0xBF7FE705 -.word 0xBF7FE9B8 -.word 0xBF7FEC43 -.word 0xBF7FEEA7 -.word 0xBF7FF0E3 -.word 0xBF7FF2F8 -.word 0xBF7FF4E6 -.word 0xBF7FF6AC -.word 0xBF7FF84A -.word 0xBF7FF9C1 -.word 0xBF7FFB11 -.word 0xBF7FFC39 -.word 0xBF7FFD39 -.word 0xBF7FFE13 -.word 0xBF7FFEC4 -.word 0xBF7FFF4E -.word 0xBF7FFFB1 -.word 0xBF7FFFEC -.word 0xBF800000 -.word 0xBF7FFFEC -.word 0xBF7FFFB1 -.word 0xBF7FFF4E -.word 0xBF7FFEC4 -.word 0xBF7FFE13 -.word 0xBF7FFD39 -.word 0xBF7FFC39 -.word 0xBF7FFB11 -.word 0xBF7FF9C1 -.word 0xBF7FF84A -.word 0xBF7FF6AC -.word 0xBF7FF4E6 -.word 0xBF7FF2F8 -.word 0xBF7FF0E3 -.word 0xBF7FEEA7 -.word 0xBF7FEC43 -.word 0xBF7FE9B8 -.word 0xBF7FE705 -.word 0xBF7FE42B -.word 0xBF7FE129 -.word 0xBF7FDE00 -.word 0xBF7FDAAF -.word 0xBF7FD737 -.word 0xBF7FD397 -.word 0xBF7FCFD1 -.word 0xBF7FCBE2 -.word 0xBF7FC7CC -.word 0xBF7FC38F -.word 0xBF7FBF2A -.word 0xBF7FBA9E -.word 0xBF7FB5EA -.word 0xBF7FB10F -.word 0xBF7FAC0D -.word 0xBF7FA6E3 -.word 0xBF7FA191 -.word 0xBF7F9C18 -.word 0xBF7F9678 -.word 0xBF7F90B1 -.word 0xBF7F8AC2 -.word 0xBF7F84AB -.word 0xBF7F7E6D -.word 0xBF7F7808 -.word 0xBF7F717B -.word 0xBF7F6AC7 -.word 0xBF7F63EC -.word 0xBF7F5CE9 -.word 0xBF7F55BF -.word 0xBF7F4E6D -.word 0xBF7F46F4 -.word 0xBF7F3F54 -.word 0xBF7F378C -.word 0xBF7F2F9D -.word 0xBF7F2787 -.word 0xBF7F1F49 -.word 0xBF7F16E4 -.word 0xBF7F0E58 -.word 0xBF7F05A4 -.word 0xBF7EFCC9 -.word 0xBF7EF3C7 -.word 0xBF7EEA9D -.word 0xBF7EE14C -.word 0xBF7ED7D4 -.word 0xBF7ECE34 -.word 0xBF7EC46D -.word 0xBF7EBA7F -.word 0xBF7EB069 -.word 0xBF7EA62D -.word 0xBF7E9BC9 -.word 0xBF7E913D -.word 0xBF7E868B -.word 0xBF7E7BB1 -.word 0xBF7E70B0 -.word 0xBF7E6588 -.word 0xBF7E5A38 -.word 0xBF7E4EC1 -.word 0xBF7E4323 -.word 0xBF7E375E -.word 0xBF7E2B72 -.word 0xBF7E1F5E -.word 0xBF7E1324 -.word 0xBF7E06C2 -.word 0xBF7DFA38 -.word 0xBF7DED88 -.word 0xBF7DE0B1 -.word 0xBF7DD3B2 -.word 0xBF7DC68C -.word 0xBF7DB940 -.word 0xBF7DABCC -.word 0xBF7D9E30 -.word 0xBF7D906E -.word 0xBF7D8285 -.word 0xBF7D7474 -.word 0xBF7D663D -.word 0xBF7D57DE -.word 0xBF7D4959 -.word 0xBF7D3AAC -.word 0xBF7D2BD8 -.word 0xBF7D1CDD -.word 0xBF7D0DBC -.word 0xBF7CFE73 -.word 0xBF7CEF03 -.word 0xBF7CDF6C -.word 0xBF7CCFAE -.word 0xBF7CBFC9 -.word 0xBF7CAFBD -.word 0xBF7C9F8A -.word 0xBF7C8F31 -.word 0xBF7C7EB0 -.word 0xBF7C6E08 -.word 0xBF7C5D3A -.word 0xBF7C4C44 -.word 0xBF7C3B28 -.word 0xBF7C29E5 -.word 0xBF7C187A -.word 0xBF7C06E9 -.word 0xBF7BF531 -.word 0xBF7BE353 -.word 0xBF7BD14D -.word 0xBF7BBF20 -.word 0xBF7BACCD -.word 0xBF7B9A53 -.word 0xBF7B87B2 -.word 0xBF7B74EA -.word 0xBF7B61FC -.word 0xBF7B4EE7 -.word 0xBF7B3BAB -.word 0xBF7B2848 -.word 0xBF7B14BE -.word 0xBF7B010E -.word 0xBF7AED37 -.word 0xBF7AD93A -.word 0xBF7AC516 -.word 0xBF7AB0CB -.word 0xBF7A9C59 -.word 0xBF7A87C1 -.word 0xBF7A7302 -.word 0xBF7A5E1C -.word 0xBF7A4910 -.word 0xBF7A33DD -.word 0xBF7A1E84 -.word 0xBF7A0904 -.word 0xBF79F35E -.word 0xBF79DD91 -.word 0xBF79C79D -.word 0xBF79B183 -.word 0xBF799B43 -.word 0xBF7984DC -.word 0xBF796E4E -.word 0xBF79579A -.word 0xBF7940C0 -.word 0xBF7929BF -.word 0xBF791298 -.word 0xBF78FB4A -.word 0xBF78E3D6 -.word 0xBF78CC3B -.word 0xBF78B47B -.word 0xBF789C93 -.word 0xBF788486 -.word 0xBF786C52 -.word 0xBF7853F8 -.word 0xBF783B77 -.word 0xBF7822D1 -.word 0xBF780A04 -.word 0xBF77F110 -.word 0xBF77D7F7 -.word 0xBF77BEB7 -.word 0xBF77A551 -.word 0xBF778BC5 -.word 0xBF777213 -.word 0xBF77583A -.word 0xBF773E3C -.word 0xBF772417 -.word 0xBF7709CC -.word 0xBF76EF5B -.word 0xBF76D4C4 -.word 0xBF76BA07 -.word 0xBF769F24 -.word 0xBF76841B -.word 0xBF7668EC -.word 0xBF764D97 -.word 0xBF76321B -.word 0xBF76167A -.word 0xBF75FAB3 -.word 0xBF75DEC6 -.word 0xBF75C2B3 -.word 0xBF75A67B -.word 0xBF758A1C -.word 0xBF756D97 -.word 0xBF7550ED -.word 0xBF75341D -.word 0xBF751727 -.word 0xBF74FA0B -.word 0xBF74DCC9 -.word 0xBF74BF62 -.word 0xBF74A1D5 -.word 0xBF748422 -.word 0xBF746649 -.word 0xBF74484B -.word 0xBF742A27 -.word 0xBF740BDD -.word 0xBF73ED6E -.word 0xBF73CED9 -.word 0xBF73B01F -.word 0xBF73913F -.word 0xBF737239 -.word 0xBF73530E -.word 0xBF7333BE -.word 0xBF731447 -.word 0xBF72F4AC -.word 0xBF72D4EB -.word 0xBF72B504 -.word 0xBF7294F8 -.word 0xBF7274C7 -.word 0xBF725470 -.word 0xBF7233F4 -.word 0xBF721352 -.word 0xBF71F28C -.word 0xBF71D19F -.word 0xBF71B08E -.word 0xBF718F57 -.word 0xBF716DFB -.word 0xBF714C7A -.word 0xBF712AD4 -.word 0xBF710908 -.word 0xBF70E717 -.word 0xBF70C501 -.word 0xBF70A2C6 -.word 0xBF708066 -.word 0xBF705DE1 -.word 0xBF703B37 -.word 0xBF701867 -.word 0xBF6FF573 -.word 0xBF6FD25A -.word 0xBF6FAF1B -.word 0xBF6F8BB8 -.word 0xBF6F6830 -.word 0xBF6F4483 -.word 0xBF6F20B0 -.word 0xBF6EFCBA -.word 0xBF6ED89E -.word 0xBF6EB45D -.word 0xBF6E8FF8 -.word 0xBF6E6B6D -.word 0xBF6E46BE -.word 0xBF6E21EB -.word 0xBF6DFCF2 -.word 0xBF6DD7D5 -.word 0xBF6DB293 -.word 0xBF6D8D2D -.word 0xBF6D67A1 -.word 0xBF6D41F2 -.word 0xBF6D1C1D -.word 0xBF6CF624 -.word 0xBF6CD007 -.word 0xBF6CA9C5 -.word 0xBF6C835E -.word 0xBF6C5CD4 -.word 0xBF6C3624 -.word 0xBF6C0F50 -.word 0xBF6BE858 -.word 0xBF6BC13B -.word 0xBF6B99FB -.word 0xBF6B7295 -.word 0xBF6B4B0C -.word 0xBF6B235E -.word 0xBF6AFB8C -.word 0xBF6AD395 -.word 0xBF6AAB7B -.word 0xBF6A833C -.word 0xBF6A5AD9 -.word 0xBF6A3252 -.word 0xBF6A09A7 -.word 0xBF69E0D7 -.word 0xBF69B7E4 -.word 0xBF698ECC -.word 0xBF696591 -.word 0xBF693C32 -.word 0xBF6912AE -.word 0xBF68E907 -.word 0xBF68BF3C -.word 0xBF68954C -.word 0xBF686B39 -.word 0xBF684103 -.word 0xBF6816A8 -.word 0xBF67EC29 -.word 0xBF67C187 -.word 0xBF6796C1 -.word 0xBF676BD8 -.word 0xBF6740CA -.word 0xBF671599 -.word 0xBF66EA45 -.word 0xBF66BECC -.word 0xBF669330 -.word 0xBF666771 -.word 0xBF663B8E -.word 0xBF660F88 -.word 0xBF65E35E -.word 0xBF65B710 -.word 0xBF658AA0 -.word 0xBF655E0B -.word 0xBF653154 -.word 0xBF650479 -.word 0xBF64D77B -.word 0xBF64AA59 -.word 0xBF647D14 -.word 0xBF644FAC -.word 0xBF642221 -.word 0xBF63F473 -.word 0xBF63C6A1 -.word 0xBF6398AC -.word 0xBF636A95 -.word 0xBF633C5A -.word 0xBF630DFC -.word 0xBF62DF7B -.word 0xBF62B0D7 -.word 0xBF628210 -.word 0xBF625326 -.word 0xBF62241A -.word 0xBF61F4EA -.word 0xBF61C598 -.word 0xBF619622 -.word 0xBF61668A -.word 0xBF6136D0 -.word 0xBF6106F2 -.word 0xBF60D6F2 -.word 0xBF60A6CF -.word 0xBF607689 -.word 0xBF604621 -.word 0xBF601596 -.word 0xBF5FE4E9 -.word 0xBF5FB419 -.word 0xBF5F8327 -.word 0xBF5F5212 -.word 0xBF5F20DB -.word 0xBF5EEF81 -.word 0xBF5EBE05 -.word 0xBF5E8C67 -.word 0xBF5E5AA6 -.word 0xBF5E28C3 -.word 0xBF5DF6BE -.word 0xBF5DC497 -.word 0xBF5D924D -.word 0xBF5D5FE1 -.word 0xBF5D2D53 -.word 0xBF5CFAA3 -.word 0xBF5CC7D1 -.word 0xBF5C94DD -.word 0xBF5C61C7 -.word 0xBF5C2E8E -.word 0xBF5BFB34 -.word 0xBF5BC7B8 -.word 0xBF5B941A -.word 0xBF5B605A -.word 0xBF5B2C79 -.word 0xBF5AF875 -.word 0xBF5AC450 -.word 0xBF5A9009 -.word 0xBF5A5BA0 -.word 0xBF5A2716 -.word 0xBF59F26A -.word 0xBF59BD9C -.word 0xBF5988AD -.word 0xBF59539C -.word 0xBF591E6A -.word 0xBF58E916 -.word 0xBF58B3A1 -.word 0xBF587E0B -.word 0xBF584853 -.word 0xBF581279 -.word 0xBF57DC7F -.word 0xBF57A663 -.word 0xBF577026 -.word 0xBF5739C7 -.word 0xBF570348 -.word 0xBF56CCA7 -.word 0xBF5695E5 -.word 0xBF565F02 -.word 0xBF5627FE -.word 0xBF55F0D9 -.word 0xBF55B993 -.word 0xBF55822C -.word 0xBF554AA4 -.word 0xBF5512FB -.word 0xBF54DB31 -.word 0xBF54A347 -.word 0xBF546B3B -.word 0xBF54330F -.word 0xBF53FAC3 -.word 0xBF53C255 -.word 0xBF5389C7 -.word 0xBF535118 -.word 0xBF531849 -.word 0xBF52DF59 -.word 0xBF52A649 -.word 0xBF526D18 -.word 0xBF5233C6 -.word 0xBF51FA54 -.word 0xBF51C0C2 -.word 0xBF518710 -.word 0xBF514D3D -.word 0xBF51134A -.word 0xBF50D937 -.word 0xBF509F03 -.word 0xBF5064AF -.word 0xBF502A3B -.word 0xBF4FEFA8 -.word 0xBF4FB4F4 -.word 0xBF4F7A1F -.word 0xBF4F3F2B -.word 0xBF4F0417 -.word 0xBF4EC8E4 -.word 0xBF4E8D90 -.word 0xBF4E521C -.word 0xBF4E1689 -.word 0xBF4DDAD5 -.word 0xBF4D9F02 -.word 0xBF4D6310 -.word 0xBF4D26FD -.word 0xBF4CEACB -.word 0xBF4CAE79 -.word 0xBF4C7208 -.word 0xBF4C3578 -.word 0xBF4BF8C7 -.word 0xBF4BBBF8 -.word 0xBF4B7F09 -.word 0xBF4B41FA -.word 0xBF4B04CC -.word 0xBF4AC77F -.word 0xBF4A8A13 -.word 0xBF4A4C87 -.word 0xBF4A0EDC -.word 0xBF49D112 -.word 0xBF499329 -.word 0xBF495521 -.word 0xBF4916FA -.word 0xBF48D8B3 -.word 0xBF489A4E -.word 0xBF485BCA -.word 0xBF481D27 -.word 0xBF47DE65 -.word 0xBF479F84 -.word 0xBF476085 -.word 0xBF472167 -.word 0xBF46E22A -.word 0xBF46A2CE -.word 0xBF466354 -.word 0xBF4623BB -.word 0xBF45E403 -.word 0xBF45A42D -.word 0xBF456439 -.word 0xBF452426 -.word 0xBF44E3F5 -.word 0xBF44A3A5 -.word 0xBF446337 -.word 0xBF4422AB -.word 0xBF43E200 -.word 0xBF43A138 -.word 0xBF436051 -.word 0xBF431F4C -.word 0xBF42DE29 -.word 0xBF429CE8 -.word 0xBF425B89 -.word 0xBF421A0B -.word 0xBF41D870 -.word 0xBF4196B7 -.word 0xBF4154E1 -.word 0xBF4112EC -.word 0xBF40D0DA -.word 0xBF408EA9 -.word 0xBF404C5C -.word 0xBF4009F0 -.word 0xBF3FC767 -.word 0xBF3F84C0 -.word 0xBF3F41FC -.word 0xBF3EFF1B -.word 0xBF3EBC1B -.word 0xBF3E78FF -.word 0xBF3E35C5 -.word 0xBF3DF26E -.word 0xBF3DAEF9 -.word 0xBF3D6B67 -.word 0xBF3D27B8 -.word 0xBF3CE3EC -.word 0xBF3CA003 -.word 0xBF3C5BFC -.word 0xBF3C17D9 -.word 0xBF3BD398 -.word 0xBF3B8F3B -.word 0xBF3B4AC1 -.word 0xBF3B0629 -.word 0xBF3AC175 -.word 0xBF3A7CA4 -.word 0xBF3A37B7 -.word 0xBF39F2AC -.word 0xBF39AD85 -.word 0xBF396842 -.word 0xBF3922E1 -.word 0xBF38DD65 -.word 0xBF3897CB -.word 0xBF385216 -.word 0xBF380C43 -.word 0xBF37C655 -.word 0xBF37804A -.word 0xBF373A23 -.word 0xBF36F3DF -.word 0xBF36AD7F -.word 0xBF366704 -.word 0xBF36206C -.word 0xBF35D9B8 -.word 0xBF3592E7 -.word 0xBF354BFB -.word 0xBF3504F3 -.word 0xBF34BDCF -.word 0xBF34768F -.word 0xBF342F34 -.word 0xBF33E7BC -.word 0xBF33A029 -.word 0xBF33587A -.word 0xBF3310AF -.word 0xBF32C8C9 -.word 0xBF3280C7 -.word 0xBF3238AA -.word 0xBF31F071 -.word 0xBF31A81D -.word 0xBF315FAD -.word 0xBF311722 -.word 0xBF30CE7C -.word 0xBF3085BB -.word 0xBF303CDE -.word 0xBF2FF3E6 -.word 0xBF2FAAD3 -.word 0xBF2F61A5 -.word 0xBF2F185B -.word 0xBF2ECEF7 -.word 0xBF2E8578 -.word 0xBF2E3BDE -.word 0xBF2DF229 -.word 0xBF2DA859 -.word 0xBF2D5E6F -.word 0xBF2D1469 -.word 0xBF2CCA49 -.word 0xBF2C800F -.word 0xBF2C35B9 -.word 0xBF2BEB4A -.word 0xBF2BA0BF -.word 0xBF2B561B -.word 0xBF2B0B5B -.word 0xBF2AC082 -.word 0xBF2A758E -.word 0xBF2A2A80 -.word 0xBF29DF57 -.word 0xBF299415 -.word 0xBF2948B8 -.word 0xBF28FD41 -.word 0xBF28B1B0 -.word 0xBF286605 -.word 0xBF281A40 -.word 0xBF27CE61 -.word 0xBF278268 -.word 0xBF273656 -.word 0xBF26EA2A -.word 0xBF269DE3 -.word 0xBF265184 -.word 0xBF26050A -.word 0xBF25B877 -.word 0xBF256BCB -.word 0xBF251F04 -.word 0xBF24D225 -.word 0xBF24852C -.word 0xBF24381A -.word 0xBF23EAEE -.word 0xBF239DA9 -.word 0xBF23504B -.word 0xBF2302D3 -.word 0xBF22B543 -.word 0xBF226799 -.word 0xBF2219D7 -.word 0xBF21CBFB -.word 0xBF217E06 -.word 0xBF212FF9 -.word 0xBF20E1D2 -.word 0xBF209393 -.word 0xBF20453B -.word 0xBF1FF6CB -.word 0xBF1FA841 -.word 0xBF1F599F -.word 0xBF1F0AE5 -.word 0xBF1EBC12 -.word 0xBF1E6D26 -.word 0xBF1E1E22 -.word 0xBF1DCF06 -.word 0xBF1D7FD1 -.word 0xBF1D3084 -.word 0xBF1CE11F -.word 0xBF1C91A2 -.word 0xBF1C420C -.word 0xBF1BF25F -.word 0xBF1BA299 -.word 0xBF1B52BB -.word 0xBF1B02C6 -.word 0xBF1AB2B8 -.word 0xBF1A6293 -.word 0xBF1A1255 -.word 0xBF19C200 -.word 0xBF197194 -.word 0xBF19210F -.word 0xBF18D073 -.word 0xBF187FC0 -.word 0xBF182EF5 -.word 0xBF17DE12 -.word 0xBF178D18 -.word 0xBF173C07 -.word 0xBF16EADE -.word 0xBF16999F -.word 0xBF164847 -.word 0xBF15F6D9 -.word 0xBF15A554 -.word 0xBF1553B7 -.word 0xBF150204 -.word 0xBF14B039 -.word 0xBF145E58 -.word 0xBF140C5F -.word 0xBF13BA50 -.word 0xBF13682A -.word 0xBF1315EE -.word 0xBF12C39A -.word 0xBF127130 -.word 0xBF121EB0 -.word 0xBF11CC19 -.word 0xBF11796B -.word 0xBF1126A7 -.word 0xBF10D3CD -.word 0xBF1080DC -.word 0xBF102DD5 -.word 0xBF0FDAB8 -.word 0xBF0F8784 -.word 0xBF0F343B -.word 0xBF0EE0DB -.word 0xBF0E8D65 -.word 0xBF0E39DA -.word 0xBF0DE638 -.word 0xBF0D9281 -.word 0xBF0D3EB3 -.word 0xBF0CEAD0 -.word 0xBF0C96D7 -.word 0xBF0C42C9 -.word 0xBF0BEEA5 -.word 0xBF0B9A6B -.word 0xBF0B461C -.word 0xBF0AF1B7 -.word 0xBF0A9D3D -.word 0xBF0A48AD -.word 0xBF09F409 -.word 0xBF099F4E -.word 0xBF094A7F -.word 0xBF08F59B -.word 0xBF08A0A1 -.word 0xBF084B92 -.word 0xBF07F66F -.word 0xBF07A136 -.word 0xBF074BE8 -.word 0xBF06F686 -.word 0xBF06A10E -.word 0xBF064B82 -.word 0xBF05F5E2 -.word 0xBF05A02C -.word 0xBF054A62 -.word 0xBF04F484 -.word 0xBF049E91 -.word 0xBF044889 -.word 0xBF03F26D -.word 0xBF039C3D -.word 0xBF0345F8 -.word 0xBF02EF9F -.word 0xBF029932 -.word 0xBF0242B1 -.word 0xBF01EC1C -.word 0xBF019573 -.word 0xBF013EB5 -.word 0xBF00E7E4 -.word 0xBF0090FF -.word 0xBF003A06 -.word 0xBEFFC5F3 -.word 0xBEFF17B2 -.word 0xBEFE694A -.word 0xBEFDBABB -.word 0xBEFD0C04 -.word 0xBEFC5D27 -.word 0xBEFBAE22 -.word 0xBEFAFEF7 -.word 0xBEFA4FA5 -.word 0xBEF9A02D -.word 0xBEF8F08E -.word 0xBEF840C8 -.word 0xBEF790DC -.word 0xBEF6E0CB -.word 0xBEF63093 -.word 0xBEF58035 -.word 0xBEF4CFB1 -.word 0xBEF41F07 -.word 0xBEF36E38 -.word 0xBEF2BD43 -.word 0xBEF20C29 -.word 0xBEF15AEA -.word 0xBEF0A985 -.word 0xBEEFF7FB -.word 0xBEEF464C -.word 0xBEEE9479 -.word 0xBEEDE280 -.word 0xBEED3063 -.word 0xBEEC7E21 -.word 0xBEEBCBBB -.word 0xBEEB1930 -.word 0xBEEA6681 -.word 0xBEE9B3AE -.word 0xBEE900B7 -.word 0xBEE84D9C -.word 0xBEE79A5D -.word 0xBEE6E6FB -.word 0xBEE63375 -.word 0xBEE57FCB -.word 0xBEE4CBFE -.word 0xBEE4180E -.word 0xBEE363FA -.word 0xBEE2AFC4 -.word 0xBEE1FB6A -.word 0xBEE146EE -.word 0xBEE0924F -.word 0xBEDFDD8D -.word 0xBEDF28A9 -.word 0xBEDE73A2 -.word 0xBEDDBE79 -.word 0xBEDD092E -.word 0xBEDC53C1 -.word 0xBEDB9E31 -.word 0xBEDAE880 -.word 0xBEDA32AD -.word 0xBED97CB9 -.word 0xBED8C6A3 -.word 0xBED8106B -.word 0xBED75A13 -.word 0xBED6A399 -.word 0xBED5ECFD -.word 0xBED53641 -.word 0xBED47F64 -.word 0xBED3C867 -.word 0xBED31148 -.word 0xBED25A09 -.word 0xBED1A2AA -.word 0xBED0EB2A -.word 0xBED0338A -.word 0xBECF7BCA -.word 0xBECEC3EA -.word 0xBECE0BEA -.word 0xBECD53CA -.word 0xBECC9B8B -.word 0xBECBE32C -.word 0xBECB2AAE -.word 0xBECA7210 -.word 0xBEC9B953 -.word 0xBEC90077 -.word 0xBEC8477C -.word 0xBEC78E62 -.word 0xBEC6D529 -.word 0xBEC61BD2 -.word 0xBEC5625C -.word 0xBEC4A8C8 -.word 0xBEC3EF15 -.word 0xBEC33544 -.word 0xBEC27B55 -.word 0xBEC1C148 -.word 0xBEC1071E -.word 0xBEC04CD5 -.word 0xBEBF926F -.word 0xBEBED7EB -.word 0xBEBE1D4A -.word 0xBEBD628B -.word 0xBEBCA7AF -.word 0xBEBBECB6 -.word 0xBEBB31A0 -.word 0xBEBA766E -.word 0xBEB9BB1E -.word 0xBEB8FFB2 -.word 0xBEB8442A -.word 0xBEB78884 -.word 0xBEB6CCC3 -.word 0xBEB610E6 -.word 0xBEB554EC -.word 0xBEB498D6 -.word 0xBEB3DCA5 -.word 0xBEB32058 -.word 0xBEB263EF -.word 0xBEB1A76B -.word 0xBEB0EACB -.word 0xBEB02E10 -.word 0xBEAF713A -.word 0xBEAEB449 -.word 0xBEADF73C -.word 0xBEAD3A15 -.word 0xBEAC7CD4 -.word 0xBEABBF77 -.word 0xBEAB0201 -.word 0xBEAA446F -.word 0xBEA986C4 -.word 0xBEA8C8FE -.word 0xBEA80B1F -.word 0xBEA74D25 -.word 0xBEA68F12 -.word 0xBEA5D0E5 -.word 0xBEA5129F -.word 0xBEA4543F -.word 0xBEA395C5 -.word 0xBEA2D733 -.word 0xBEA21887 -.word 0xBEA159C2 -.word 0xBEA09AE5 -.word 0xBE9FDBEE -.word 0xBE9F1CDF -.word 0xBE9E5DB8 -.word 0xBE9D9E78 -.word 0xBE9CDF20 -.word 0xBE9C1FAF -.word 0xBE9B6027 -.word 0xBE9AA086 -.word 0xBE99E0CE -.word 0xBE9920FE -.word 0xBE986116 -.word 0xBE97A117 -.word 0xBE96E100 -.word 0xBE9620D2 -.word 0xBE95608D -.word 0xBE94A031 -.word 0xBE93DFBF -.word 0xBE931F35 -.word 0xBE925E94 -.word 0xBE919DDD -.word 0xBE90DD10 -.word 0xBE901C2C -.word 0xBE8F5B32 -.word 0xBE8E9A22 -.word 0xBE8DD8FC -.word 0xBE8D17C0 -.word 0xBE8C566E -.word 0xBE8B9507 -.word 0xBE8AD38A -.word 0xBE8A11F7 -.word 0xBE895050 -.word 0xBE888E93 -.word 0xBE87CCC1 -.word 0xBE870ADA -.word 0xBE8648DF -.word 0xBE8586CE -.word 0xBE84C4AA -.word 0xBE840270 -.word 0xBE834022 -.word 0xBE827DC0 -.word 0xBE81BB4A -.word 0xBE80F8C0 -.word 0xBE803622 -.word 0xBE7EE6E1 -.word 0xBE7D6156 -.word 0xBE7BDBA4 -.word 0xBE7A55CB -.word 0xBE78CFCC -.word 0xBE7749A6 -.word 0xBE75C35A -.word 0xBE743CE8 -.word 0xBE72B651 -.word 0xBE712F94 -.word 0xBE6FA8B2 -.word 0xBE6E21AB -.word 0xBE6C9A7F -.word 0xBE6B132F -.word 0xBE698BBA -.word 0xBE680422 -.word 0xBE667C66 -.word 0xBE64F486 -.word 0xBE636C83 -.word 0xBE61E45C -.word 0xBE605C13 -.word 0xBE5ED3A8 -.word 0xBE5D4B1A -.word 0xBE5BC26A -.word 0xBE5A3997 -.word 0xBE58B0A4 -.word 0xBE57278F -.word 0xBE559E58 -.word 0xBE541501 -.word 0xBE528B89 -.word 0xBE5101F1 -.word 0xBE4F7838 -.word 0xBE4DEE60 -.word 0xBE4C6467 -.word 0xBE4ADA4F -.word 0xBE495018 -.word 0xBE47C5C2 -.word 0xBE463B4D -.word 0xBE44B0B9 -.word 0xBE432607 -.word 0xBE419B37 -.word 0xBE401049 -.word 0xBE3E853E -.word 0xBE3CFA15 -.word 0xBE3B6ECF -.word 0xBE39E36C -.word 0xBE3857EC -.word 0xBE36CC50 -.word 0xBE354098 -.word 0xBE33B4C4 -.word 0xBE3228D4 -.word 0xBE309CC9 -.word 0xBE2F10A2 -.word 0xBE2D8461 -.word 0xBE2BF804 -.word 0xBE2A6B8D -.word 0xBE28DEFC -.word 0xBE275251 -.word 0xBE25C58C -.word 0xBE2438AD -.word 0xBE22ABB6 -.word 0xBE211EA5 -.word 0xBE1F917B -.word 0xBE1E0438 -.word 0xBE1C76DE -.word 0xBE1AE96B -.word 0xBE195BE0 -.word 0xBE17CE3D -.word 0xBE164083 -.word 0xBE14B2B2 -.word 0xBE1324CA -.word 0xBE1196CC -.word 0xBE1008B7 -.word 0xBE0E7A8B -.word 0xBE0CEC4A -.word 0xBE0B5DF3 -.word 0xBE09CF86 -.word 0xBE084105 -.word 0xBE06B26E -.word 0xBE0523C2 -.word 0xBE039502 -.word 0xBE02062E -.word 0xBE007745 -.word 0xBDFDD092 -.word 0xBDFAB273 -.word 0xBDF7942C -.word 0xBDF475C0 -.word 0xBDF1572E -.word 0xBDEE3876 -.word 0xBDEB199A -.word 0xBDE7FA9A -.word 0xBDE4DB76 -.word 0xBDE1BC2E -.word 0xBDDE9CC4 -.word 0xBDDB7D37 -.word 0xBDD85D89 -.word 0xBDD53DB9 -.word 0xBDD21DC8 -.word 0xBDCEFDB7 -.word 0xBDCBDD86 -.word 0xBDC8BD36 -.word 0xBDC59CC6 -.word 0xBDC27C39 -.word 0xBDBF5B8D -.word 0xBDBC3AC3 -.word 0xBDB919DD -.word 0xBDB5F8DA -.word 0xBDB2D7BB -.word 0xBDAFB680 -.word 0xBDAC952B -.word 0xBDA973BA -.word 0xBDA65230 -.word 0xBDA3308C -.word 0xBDA00ECF -.word 0xBD9CECF9 -.word 0xBD99CB0A -.word 0xBD96A905 -.word 0xBD9386E7 -.word 0xBD9064B4 -.word 0xBD8D426A -.word 0xBD8A200A -.word 0xBD86FD94 -.word 0xBD83DB0A -.word 0xBD80B86C -.word 0xBD7B2B74 -.word 0xBD74E5E9 -.word 0xBD6EA038 -.word 0xBD685A62 -.word 0xBD621469 -.word 0xBD5BCE4C -.word 0xBD55880E -.word 0xBD4F41AF -.word 0xBD48FB30 -.word 0xBD42B491 -.word 0xBD3C6DD5 -.word 0xBD3626FC -.word 0xBD2FE007 -.word 0xBD2998F6 -.word 0xBD2351CB -.word 0xBD1D0A88 -.word 0xBD16C32C -.word 0xBD107BB8 -.word 0xBD0A342F -.word 0xBD03EC90 -.word 0xBCFB49BA -.word 0xBCEEBA2C -.word 0xBCE22A7A -.word 0xBCD59AA6 -.word 0xBCC90AB0 -.word 0xBCBC7A9B -.word 0xBCAFEA69 -.word 0xBCA35A1C -.word 0xBC96C9B6 -.word 0xBC8A3938 -.word 0xBC7B514B -.word 0xBC622FFF -.word 0xBC490E90 -.word 0xBC2FED02 -.word 0xBC16CB58 -.word 0xBBFB5330 -.word 0xBBC90F88 -.word 0xBB96CBC1 -.word 0xBB490FC6 -.word 0xBAC90FD5 -.word 0x00000000 -.word 0x3AC90FD5 -.word 0x3B490FC6 -.word 0x3B96CBC1 -.word 0x3BC90F88 -.word 0x3BFB5330 -.word 0x3C16CB58 -.word 0x3C2FED02 -.word 0x3C490E90 -.word 0x3C622FFF -.word 0x3C7B514B -.word 0x3C8A3938 -.word 0x3C96C9B6 -.word 0x3CA35A1C -.word 0x3CAFEA69 -.word 0x3CBC7A9B -.word 0x3CC90AB0 -.word 0x3CD59AA6 -.word 0x3CE22A7A -.word 0x3CEEBA2C -.word 0x3CFB49BA -.word 0x3D03EC90 -.word 0x3D0A342F -.word 0x3D107BB8 -.word 0x3D16C32C -.word 0x3D1D0A88 -.word 0x3D2351CB -.word 0x3D2998F6 -.word 0x3D2FE007 -.word 0x3D3626FC -.word 0x3D3C6DD5 -.word 0x3D42B491 -.word 0x3D48FB30 -.word 0x3D4F41AF -.word 0x3D55880E -.word 0x3D5BCE4C -.word 0x3D621469 -.word 0x3D685A62 -.word 0x3D6EA038 -.word 0x3D74E5E9 -.word 0x3D7B2B74 -.word 0x3D80B86C -.word 0x3D83DB0A -.word 0x3D86FD94 -.word 0x3D8A200A -.word 0x3D8D426A -.word 0x3D9064B4 -.word 0x3D9386E7 -.word 0x3D96A905 -.word 0x3D99CB0A -.word 0x3D9CECF9 -.word 0x3DA00ECF -.word 0x3DA3308C -.word 0x3DA65230 -.word 0x3DA973BA -.word 0x3DAC952B -.word 0x3DAFB680 -.word 0x3DB2D7BB -.word 0x3DB5F8DA -.word 0x3DB919DD -.word 0x3DBC3AC3 -.word 0x3DBF5B8D -.word 0x3DC27C39 -.word 0x3DC59CC6 -.word 0x3DC8BD36 -.word 0x3DCBDD86 -.word 0x3DCEFDB7 -.word 0x3DD21DC8 -.word 0x3DD53DB9 -.word 0x3DD85D89 -.word 0x3DDB7D37 -.word 0x3DDE9CC4 -.word 0x3DE1BC2E -.word 0x3DE4DB76 -.word 0x3DE7FA9A -.word 0x3DEB199A -.word 0x3DEE3876 -.word 0x3DF1572E -.word 0x3DF475C0 -.word 0x3DF7942C -.word 0x3DFAB273 -.word 0x3DFDD092 -.word 0x3E007745 -.word 0x3E02062E -.word 0x3E039502 -.word 0x3E0523C2 -.word 0x3E06B26E -.word 0x3E084105 -.word 0x3E09CF86 -.word 0x3E0B5DF3 -.word 0x3E0CEC4A -.word 0x3E0E7A8B -.word 0x3E1008B7 -.word 0x3E1196CC -.word 0x3E1324CA -.word 0x3E14B2B2 -.word 0x3E164083 -.word 0x3E17CE3D -.word 0x3E195BE0 -.word 0x3E1AE96B -.word 0x3E1C76DE -.word 0x3E1E0438 -.word 0x3E1F917B -.word 0x3E211EA5 -.word 0x3E22ABB6 -.word 0x3E2438AD -.word 0x3E25C58C -.word 0x3E275251 -.word 0x3E28DEFC -.word 0x3E2A6B8D -.word 0x3E2BF804 -.word 0x3E2D8461 -.word 0x3E2F10A2 -.word 0x3E309CC9 -.word 0x3E3228D4 -.word 0x3E33B4C4 -.word 0x3E354098 -.word 0x3E36CC50 -.word 0x3E3857EC -.word 0x3E39E36C -.word 0x3E3B6ECF -.word 0x3E3CFA15 -.word 0x3E3E853E -.word 0x3E401049 -.word 0x3E419B37 -.word 0x3E432607 -.word 0x3E44B0B9 -.word 0x3E463B4D -.word 0x3E47C5C2 -.word 0x3E495018 -.word 0x3E4ADA4F -.word 0x3E4C6467 -.word 0x3E4DEE60 -.word 0x3E4F7838 -.word 0x3E5101F1 -.word 0x3E528B89 -.word 0x3E541501 -.word 0x3E559E58 -.word 0x3E57278F -.word 0x3E58B0A4 -.word 0x3E5A3997 -.word 0x3E5BC26A -.word 0x3E5D4B1A -.word 0x3E5ED3A8 -.word 0x3E605C13 -.word 0x3E61E45C -.word 0x3E636C83 -.word 0x3E64F486 -.word 0x3E667C66 -.word 0x3E680422 -.word 0x3E698BBA -.word 0x3E6B132F -.word 0x3E6C9A7F -.word 0x3E6E21AB -.word 0x3E6FA8B2 -.word 0x3E712F94 -.word 0x3E72B651 -.word 0x3E743CE8 -.word 0x3E75C35A -.word 0x3E7749A6 -.word 0x3E78CFCC -.word 0x3E7A55CB -.word 0x3E7BDBA4 -.word 0x3E7D6156 -.word 0x3E7EE6E1 -.word 0x3E803622 -.word 0x3E80F8C0 -.word 0x3E81BB4A -.word 0x3E827DC0 -.word 0x3E834022 -.word 0x3E840270 -.word 0x3E84C4AA -.word 0x3E8586CE -.word 0x3E8648DF -.word 0x3E870ADA -.word 0x3E87CCC1 -.word 0x3E888E93 -.word 0x3E895050 -.word 0x3E8A11F7 -.word 0x3E8AD38A -.word 0x3E8B9507 -.word 0x3E8C566E -.word 0x3E8D17C0 -.word 0x3E8DD8FC -.word 0x3E8E9A22 -.word 0x3E8F5B32 -.word 0x3E901C2C -.word 0x3E90DD10 -.word 0x3E919DDD -.word 0x3E925E94 -.word 0x3E931F35 -.word 0x3E93DFBF -.word 0x3E94A031 -.word 0x3E95608D -.word 0x3E9620D2 -.word 0x3E96E100 -.word 0x3E97A117 -.word 0x3E986116 -.word 0x3E9920FE -.word 0x3E99E0CE -.word 0x3E9AA086 -.word 0x3E9B6027 -.word 0x3E9C1FAF -.word 0x3E9CDF20 -.word 0x3E9D9E78 -.word 0x3E9E5DB8 -.word 0x3E9F1CDF -.word 0x3E9FDBEE -.word 0x3EA09AE5 -.word 0x3EA159C2 -.word 0x3EA21887 -.word 0x3EA2D733 -.word 0x3EA395C5 -.word 0x3EA4543F -.word 0x3EA5129F -.word 0x3EA5D0E5 -.word 0x3EA68F12 -.word 0x3EA74D25 -.word 0x3EA80B1F -.word 0x3EA8C8FE -.word 0x3EA986C4 -.word 0x3EAA446F -.word 0x3EAB0201 -.word 0x3EABBF77 -.word 0x3EAC7CD4 -.word 0x3EAD3A15 -.word 0x3EADF73C -.word 0x3EAEB449 -.word 0x3EAF713A -.word 0x3EB02E10 -.word 0x3EB0EACB -.word 0x3EB1A76B -.word 0x3EB263EF -.word 0x3EB32058 -.word 0x3EB3DCA5 -.word 0x3EB498D6 -.word 0x3EB554EC -.word 0x3EB610E6 -.word 0x3EB6CCC3 -.word 0x3EB78884 -.word 0x3EB8442A -.word 0x3EB8FFB2 -.word 0x3EB9BB1E -.word 0x3EBA766E -.word 0x3EBB31A0 -.word 0x3EBBECB6 -.word 0x3EBCA7AF -.word 0x3EBD628B -.word 0x3EBE1D4A -.word 0x3EBED7EB -.word 0x3EBF926F -.word 0x3EC04CD5 -.word 0x3EC1071E -.word 0x3EC1C148 -.word 0x3EC27B55 -.word 0x3EC33544 -.word 0x3EC3EF15 -.word 0x3EC4A8C8 -.word 0x3EC5625C -.word 0x3EC61BD2 -.word 0x3EC6D529 -.word 0x3EC78E62 -.word 0x3EC8477C -.word 0x3EC90077 -.word 0x3EC9B953 -.word 0x3ECA7210 -.word 0x3ECB2AAE -.word 0x3ECBE32C -.word 0x3ECC9B8B -.word 0x3ECD53CA -.word 0x3ECE0BEA -.word 0x3ECEC3EA -.word 0x3ECF7BCA -.word 0x3ED0338A -.word 0x3ED0EB2A -.word 0x3ED1A2AA -.word 0x3ED25A09 -.word 0x3ED31148 -.word 0x3ED3C867 -.word 0x3ED47F64 -.word 0x3ED53641 -.word 0x3ED5ECFD -.word 0x3ED6A399 -.word 0x3ED75A13 -.word 0x3ED8106B -.word 0x3ED8C6A3 -.word 0x3ED97CB9 -.word 0x3EDA32AD -.word 0x3EDAE880 -.word 0x3EDB9E31 -.word 0x3EDC53C1 -.word 0x3EDD092E -.word 0x3EDDBE79 -.word 0x3EDE73A2 -.word 0x3EDF28A9 -.word 0x3EDFDD8D -.word 0x3EE0924F -.word 0x3EE146EE -.word 0x3EE1FB6A -.word 0x3EE2AFC4 -.word 0x3EE363FA -.word 0x3EE4180E -.word 0x3EE4CBFE -.word 0x3EE57FCB -.word 0x3EE63375 -.word 0x3EE6E6FB -.word 0x3EE79A5D -.word 0x3EE84D9C -.word 0x3EE900B7 -.word 0x3EE9B3AE -.word 0x3EEA6681 -.word 0x3EEB1930 -.word 0x3EEBCBBB -.word 0x3EEC7E21 -.word 0x3EED3063 -.word 0x3EEDE280 -.word 0x3EEE9479 -.word 0x3EEF464C -.word 0x3EEFF7FB -.word 0x3EF0A985 -.word 0x3EF15AEA -.word 0x3EF20C29 -.word 0x3EF2BD43 -.word 0x3EF36E38 -.word 0x3EF41F07 -.word 0x3EF4CFB1 -.word 0x3EF58035 -.word 0x3EF63093 -.word 0x3EF6E0CB -.word 0x3EF790DC -.word 0x3EF840C8 -.word 0x3EF8F08E -.word 0x3EF9A02D -.word 0x3EFA4FA5 -.word 0x3EFAFEF7 -.word 0x3EFBAE22 -.word 0x3EFC5D27 -.word 0x3EFD0C04 -.word 0x3EFDBABB -.word 0x3EFE694A -.word 0x3EFF17B2 -.word 0x3EFFC5F3 -.word 0x3F003A06 -.word 0x3F0090FF -.word 0x3F00E7E4 -.word 0x3F013EB5 -.word 0x3F019573 -.word 0x3F01EC1C -.word 0x3F0242B1 -.word 0x3F029932 -.word 0x3F02EF9F -.word 0x3F0345F8 -.word 0x3F039C3D -.word 0x3F03F26D -.word 0x3F044889 -.word 0x3F049E91 -.word 0x3F04F484 -.word 0x3F054A62 -.word 0x3F05A02C -.word 0x3F05F5E2 -.word 0x3F064B82 -.word 0x3F06A10E -.word 0x3F06F686 -.word 0x3F074BE8 -.word 0x3F07A136 -.word 0x3F07F66F -.word 0x3F084B92 -.word 0x3F08A0A1 -.word 0x3F08F59B -.word 0x3F094A7F -.word 0x3F099F4E -.word 0x3F09F409 -.word 0x3F0A48AD -.word 0x3F0A9D3D -.word 0x3F0AF1B7 -.word 0x3F0B461C -.word 0x3F0B9A6B -.word 0x3F0BEEA5 -.word 0x3F0C42C9 -.word 0x3F0C96D7 -.word 0x3F0CEAD0 -.word 0x3F0D3EB3 -.word 0x3F0D9281 -.word 0x3F0DE638 -.word 0x3F0E39DA -.word 0x3F0E8D65 -.word 0x3F0EE0DB -.word 0x3F0F343B -.word 0x3F0F8784 -.word 0x3F0FDAB8 -.word 0x3F102DD5 -.word 0x3F1080DC -.word 0x3F10D3CD -.word 0x3F1126A7 -.word 0x3F11796B -.word 0x3F11CC19 -.word 0x3F121EB0 -.word 0x3F127130 -.word 0x3F12C39A -.word 0x3F1315EE -.word 0x3F13682A -.word 0x3F13BA50 -.word 0x3F140C5F -.word 0x3F145E58 -.word 0x3F14B039 -.word 0x3F150204 -.word 0x3F1553B7 -.word 0x3F15A554 -.word 0x3F15F6D9 -.word 0x3F164847 -.word 0x3F16999F -.word 0x3F16EADE -.word 0x3F173C07 -.word 0x3F178D18 -.word 0x3F17DE12 -.word 0x3F182EF5 -.word 0x3F187FC0 -.word 0x3F18D073 -.word 0x3F19210F -.word 0x3F197194 -.word 0x3F19C200 -.word 0x3F1A1255 -.word 0x3F1A6293 -.word 0x3F1AB2B8 -.word 0x3F1B02C6 -.word 0x3F1B52BB -.word 0x3F1BA299 -.word 0x3F1BF25F -.word 0x3F1C420C -.word 0x3F1C91A2 -.word 0x3F1CE11F -.word 0x3F1D3084 -.word 0x3F1D7FD1 -.word 0x3F1DCF06 -.word 0x3F1E1E22 -.word 0x3F1E6D26 -.word 0x3F1EBC12 -.word 0x3F1F0AE5 -.word 0x3F1F599F -.word 0x3F1FA841 -.word 0x3F1FF6CB -.word 0x3F20453B -.word 0x3F209393 -.word 0x3F20E1D2 -.word 0x3F212FF9 -.word 0x3F217E06 -.word 0x3F21CBFB -.word 0x3F2219D7 -.word 0x3F226799 -.word 0x3F22B543 -.word 0x3F2302D3 -.word 0x3F23504B -.word 0x3F239DA9 -.word 0x3F23EAEE -.word 0x3F24381A -.word 0x3F24852C -.word 0x3F24D225 -.word 0x3F251F04 -.word 0x3F256BCB -.word 0x3F25B877 -.word 0x3F26050A -.word 0x3F265184 -.word 0x3F269DE3 -.word 0x3F26EA2A -.word 0x3F273656 -.word 0x3F278268 -.word 0x3F27CE61 -.word 0x3F281A40 -.word 0x3F286605 -.word 0x3F28B1B0 -.word 0x3F28FD41 -.word 0x3F2948B8 -.word 0x3F299415 -.word 0x3F29DF57 -.word 0x3F2A2A80 -.word 0x3F2A758E -.word 0x3F2AC082 -.word 0x3F2B0B5B -.word 0x3F2B561B -.word 0x3F2BA0BF -.word 0x3F2BEB4A -.word 0x3F2C35B9 -.word 0x3F2C800F -.word 0x3F2CCA49 -.word 0x3F2D1469 -.word 0x3F2D5E6F -.word 0x3F2DA859 -.word 0x3F2DF229 -.word 0x3F2E3BDE -.word 0x3F2E8578 -.word 0x3F2ECEF7 -.word 0x3F2F185B -.word 0x3F2F61A5 -.word 0x3F2FAAD3 -.word 0x3F2FF3E6 -.word 0x3F303CDE -.word 0x3F3085BB -.word 0x3F30CE7C -.word 0x3F311722 -.word 0x3F315FAD -.word 0x3F31A81D -.word 0x3F31F071 -.word 0x3F3238AA -.word 0x3F3280C7 -.word 0x3F32C8C9 -.word 0x3F3310AF -.word 0x3F33587A -.word 0x3F33A029 -.word 0x3F33E7BC -.word 0x3F342F34 -.word 0x3F34768F -.word 0x3F34BDCF -.word 0x3F3504F3 -.word 0x3F354BFB -.word 0x3F3592E7 -.word 0x3F35D9B8 -.word 0x3F36206C -.word 0x3F366704 -.word 0x3F36AD7F -.word 0x3F36F3DF -.word 0x3F373A23 -.word 0x3F37804A -.word 0x3F37C655 -.word 0x3F380C43 -.word 0x3F385216 -.word 0x3F3897CB -.word 0x3F38DD65 -.word 0x3F3922E1 -.word 0x3F396842 -.word 0x3F39AD85 -.word 0x3F39F2AC -.word 0x3F3A37B7 -.word 0x3F3A7CA4 -.word 0x3F3AC175 -.word 0x3F3B0629 -.word 0x3F3B4AC1 -.word 0x3F3B8F3B -.word 0x3F3BD398 -.word 0x3F3C17D9 -.word 0x3F3C5BFC -.word 0x3F3CA003 -.word 0x3F3CE3EC -.word 0x3F3D27B8 -.word 0x3F3D6B67 -.word 0x3F3DAEF9 -.word 0x3F3DF26E -.word 0x3F3E35C5 -.word 0x3F3E78FF -.word 0x3F3EBC1B -.word 0x3F3EFF1B -.word 0x3F3F41FC -.word 0x3F3F84C0 -.word 0x3F3FC767 -.word 0x3F4009F0 -.word 0x3F404C5C -.word 0x3F408EA9 -.word 0x3F40D0DA -.word 0x3F4112EC -.word 0x3F4154E1 -.word 0x3F4196B7 -.word 0x3F41D870 -.word 0x3F421A0B -.word 0x3F425B89 -.word 0x3F429CE8 -.word 0x3F42DE29 -.word 0x3F431F4C -.word 0x3F436051 -.word 0x3F43A138 -.word 0x3F43E200 -.word 0x3F4422AB -.word 0x3F446337 -.word 0x3F44A3A5 -.word 0x3F44E3F5 -.word 0x3F452426 -.word 0x3F456439 -.word 0x3F45A42D -.word 0x3F45E403 -.word 0x3F4623BB -.word 0x3F466354 -.word 0x3F46A2CE -.word 0x3F46E22A -.word 0x3F472167 -.word 0x3F476085 -.word 0x3F479F84 -.word 0x3F47DE65 -.word 0x3F481D27 -.word 0x3F485BCA -.word 0x3F489A4E -.word 0x3F48D8B3 -.word 0x3F4916FA -.word 0x3F495521 -.word 0x3F499329 -.word 0x3F49D112 -.word 0x3F4A0EDC -.word 0x3F4A4C87 -.word 0x3F4A8A13 -.word 0x3F4AC77F -.word 0x3F4B04CC -.word 0x3F4B41FA -.word 0x3F4B7F09 -.word 0x3F4BBBF8 -.word 0x3F4BF8C7 -.word 0x3F4C3578 -.word 0x3F4C7208 -.word 0x3F4CAE79 -.word 0x3F4CEACB -.word 0x3F4D26FD -.word 0x3F4D6310 -.word 0x3F4D9F02 -.word 0x3F4DDAD5 -.word 0x3F4E1689 -.word 0x3F4E521C -.word 0x3F4E8D90 -.word 0x3F4EC8E4 -.word 0x3F4F0417 -.word 0x3F4F3F2B -.word 0x3F4F7A1F -.word 0x3F4FB4F4 -.word 0x3F4FEFA8 -.word 0x3F502A3B -.word 0x3F5064AF -.word 0x3F509F03 -.word 0x3F50D937 -.word 0x3F51134A -.word 0x3F514D3D -.word 0x3F518710 -.word 0x3F51C0C2 -.word 0x3F51FA54 -.word 0x3F5233C6 -.word 0x3F526D18 -.word 0x3F52A649 -.word 0x3F52DF59 -.word 0x3F531849 -.word 0x3F535118 -.word 0x3F5389C7 -.word 0x3F53C255 -.word 0x3F53FAC3 -.word 0x3F54330F -.word 0x3F546B3B -.word 0x3F54A347 -.word 0x3F54DB31 -.word 0x3F5512FB -.word 0x3F554AA4 -.word 0x3F55822C -.word 0x3F55B993 -.word 0x3F55F0D9 -.word 0x3F5627FE -.word 0x3F565F02 -.word 0x3F5695E5 -.word 0x3F56CCA7 -.word 0x3F570348 -.word 0x3F5739C7 -.word 0x3F577026 -.word 0x3F57A663 -.word 0x3F57DC7F -.word 0x3F581279 -.word 0x3F584853 -.word 0x3F587E0B -.word 0x3F58B3A1 -.word 0x3F58E916 -.word 0x3F591E6A -.word 0x3F59539C -.word 0x3F5988AD -.word 0x3F59BD9C -.word 0x3F59F26A -.word 0x3F5A2716 -.word 0x3F5A5BA0 -.word 0x3F5A9009 -.word 0x3F5AC450 -.word 0x3F5AF875 -.word 0x3F5B2C79 -.word 0x3F5B605A -.word 0x3F5B941A -.word 0x3F5BC7B8 -.word 0x3F5BFB34 -.word 0x3F5C2E8E -.word 0x3F5C61C7 -.word 0x3F5C94DD -.word 0x3F5CC7D1 -.word 0x3F5CFAA3 -.word 0x3F5D2D53 -.word 0x3F5D5FE1 -.word 0x3F5D924D -.word 0x3F5DC497 -.word 0x3F5DF6BE -.word 0x3F5E28C3 -.word 0x3F5E5AA6 -.word 0x3F5E8C67 -.word 0x3F5EBE05 -.word 0x3F5EEF81 -.word 0x3F5F20DB -.word 0x3F5F5212 -.word 0x3F5F8327 -.word 0x3F5FB419 -.word 0x3F5FE4E9 -.word 0x3F601596 -.word 0x3F604621 -.word 0x3F607689 -.word 0x3F60A6CF -.word 0x3F60D6F2 -.word 0x3F6106F2 -.word 0x3F6136D0 -.word 0x3F61668A -.word 0x3F619622 -.word 0x3F61C598 -.word 0x3F61F4EA -.word 0x3F62241A -.word 0x3F625326 -.word 0x3F628210 -.word 0x3F62B0D7 -.word 0x3F62DF7B -.word 0x3F630DFC -.word 0x3F633C5A -.word 0x3F636A95 -.word 0x3F6398AC -.word 0x3F63C6A1 -.word 0x3F63F473 -.word 0x3F642221 -.word 0x3F644FAC -.word 0x3F647D14 -.word 0x3F64AA59 -.word 0x3F64D77B -.word 0x3F650479 -.word 0x3F653154 -.word 0x3F655E0B -.word 0x3F658AA0 -.word 0x3F65B710 -.word 0x3F65E35E -.word 0x3F660F88 -.word 0x3F663B8E -.word 0x3F666771 -.word 0x3F669330 -.word 0x3F66BECC -.word 0x3F66EA45 -.word 0x3F671599 -.word 0x3F6740CA -.word 0x3F676BD8 -.word 0x3F6796C1 -.word 0x3F67C187 -.word 0x3F67EC29 -.word 0x3F6816A8 -.word 0x3F684103 -.word 0x3F686B39 -.word 0x3F68954C -.word 0x3F68BF3C -.word 0x3F68E907 -.word 0x3F6912AE -.word 0x3F693C32 -.word 0x3F696591 -.word 0x3F698ECC -.word 0x3F69B7E4 -.word 0x3F69E0D7 -.word 0x3F6A09A7 -.word 0x3F6A3252 -.word 0x3F6A5AD9 -.word 0x3F6A833C -.word 0x3F6AAB7B -.word 0x3F6AD395 -.word 0x3F6AFB8C -.word 0x3F6B235E -.word 0x3F6B4B0C -.word 0x3F6B7295 -.word 0x3F6B99FB -.word 0x3F6BC13B -.word 0x3F6BE858 -.word 0x3F6C0F50 -.word 0x3F6C3624 -.word 0x3F6C5CD4 -.word 0x3F6C835E -.word 0x3F6CA9C5 -.word 0x3F6CD007 -.word 0x3F6CF624 -.word 0x3F6D1C1D -.word 0x3F6D41F2 -.word 0x3F6D67A1 -.word 0x3F6D8D2D -.word 0x3F6DB293 -.word 0x3F6DD7D5 -.word 0x3F6DFCF2 -.word 0x3F6E21EB -.word 0x3F6E46BE -.word 0x3F6E6B6D -.word 0x3F6E8FF8 -.word 0x3F6EB45D -.word 0x3F6ED89E -.word 0x3F6EFCBA -.word 0x3F6F20B0 -.word 0x3F6F4483 -.word 0x3F6F6830 -.word 0x3F6F8BB8 -.word 0x3F6FAF1B -.word 0x3F6FD25A -.word 0x3F6FF573 -.word 0x3F701867 -.word 0x3F703B37 -.word 0x3F705DE1 -.word 0x3F708066 -.word 0x3F70A2C6 -.word 0x3F70C501 -.word 0x3F70E717 -.word 0x3F710908 -.word 0x3F712AD4 -.word 0x3F714C7A -.word 0x3F716DFB -.word 0x3F718F57 -.word 0x3F71B08E -.word 0x3F71D19F -.word 0x3F71F28C -.word 0x3F721352 -.word 0x3F7233F4 -.word 0x3F725470 -.word 0x3F7274C7 -.word 0x3F7294F8 -.word 0x3F72B504 -.word 0x3F72D4EB -.word 0x3F72F4AC -.word 0x3F731447 -.word 0x3F7333BE -.word 0x3F73530E -.word 0x3F737239 -.word 0x3F73913F -.word 0x3F73B01F -.word 0x3F73CED9 -.word 0x3F73ED6E -.word 0x3F740BDD -.word 0x3F742A27 -.word 0x3F74484B -.word 0x3F746649 -.word 0x3F748422 -.word 0x3F74A1D5 -.word 0x3F74BF62 -.word 0x3F74DCC9 -.word 0x3F74FA0B -.word 0x3F751727 -.word 0x3F75341D -.word 0x3F7550ED -.word 0x3F756D97 -.word 0x3F758A1C -.word 0x3F75A67B -.word 0x3F75C2B3 -.word 0x3F75DEC6 -.word 0x3F75FAB3 -.word 0x3F76167A -.word 0x3F76321B -.word 0x3F764D97 -.word 0x3F7668EC -.word 0x3F76841B -.word 0x3F769F24 -.word 0x3F76BA07 -.word 0x3F76D4C4 -.word 0x3F76EF5B -.word 0x3F7709CC -.word 0x3F772417 -.word 0x3F773E3C -.word 0x3F77583A -.word 0x3F777213 -.word 0x3F778BC5 -.word 0x3F77A551 -.word 0x3F77BEB7 -.word 0x3F77D7F7 -.word 0x3F77F110 -.word 0x3F780A04 -.word 0x3F7822D1 -.word 0x3F783B77 -.word 0x3F7853F8 -.word 0x3F786C52 -.word 0x3F788486 -.word 0x3F789C93 -.word 0x3F78B47B -.word 0x3F78CC3B -.word 0x3F78E3D6 -.word 0x3F78FB4A -.word 0x3F791298 -.word 0x3F7929BF -.word 0x3F7940C0 -.word 0x3F79579A -.word 0x3F796E4E -.word 0x3F7984DC -.word 0x3F799B43 -.word 0x3F79B183 -.word 0x3F79C79D -.word 0x3F79DD91 -.word 0x3F79F35E -.word 0x3F7A0904 -.word 0x3F7A1E84 -.word 0x3F7A33DD -.word 0x3F7A4910 -.word 0x3F7A5E1C -.word 0x3F7A7302 -.word 0x3F7A87C1 -.word 0x3F7A9C59 -.word 0x3F7AB0CB -.word 0x3F7AC516 -.word 0x3F7AD93A -.word 0x3F7AED37 -.word 0x3F7B010E -.word 0x3F7B14BE -.word 0x3F7B2848 -.word 0x3F7B3BAB -.word 0x3F7B4EE7 -.word 0x3F7B61FC -.word 0x3F7B74EA -.word 0x3F7B87B2 -.word 0x3F7B9A53 -.word 0x3F7BACCD -.word 0x3F7BBF20 -.word 0x3F7BD14D -.word 0x3F7BE353 -.word 0x3F7BF531 -.word 0x3F7C06E9 -.word 0x3F7C187A -.word 0x3F7C29E5 -.word 0x3F7C3B28 -.word 0x3F7C4C44 -.word 0x3F7C5D3A -.word 0x3F7C6E08 -.word 0x3F7C7EB0 -.word 0x3F7C8F31 -.word 0x3F7C9F8A -.word 0x3F7CAFBD -.word 0x3F7CBFC9 -.word 0x3F7CCFAE -.word 0x3F7CDF6C -.word 0x3F7CEF03 -.word 0x3F7CFE73 -.word 0x3F7D0DBC -.word 0x3F7D1CDD -.word 0x3F7D2BD8 -.word 0x3F7D3AAC -.word 0x3F7D4959 -.word 0x3F7D57DE -.word 0x3F7D663D -.word 0x3F7D7474 -.word 0x3F7D8285 -.word 0x3F7D906E -.word 0x3F7D9E30 -.word 0x3F7DABCC -.word 0x3F7DB940 -.word 0x3F7DC68C -.word 0x3F7DD3B2 -.word 0x3F7DE0B1 -.word 0x3F7DED88 -.word 0x3F7DFA38 -.word 0x3F7E06C2 -.word 0x3F7E1324 -.word 0x3F7E1F5E -.word 0x3F7E2B72 -.word 0x3F7E375E -.word 0x3F7E4323 -.word 0x3F7E4EC1 -.word 0x3F7E5A38 -.word 0x3F7E6588 -.word 0x3F7E70B0 -.word 0x3F7E7BB1 -.word 0x3F7E868B -.word 0x3F7E913D -.word 0x3F7E9BC9 -.word 0x3F7EA62D -.word 0x3F7EB069 -.word 0x3F7EBA7F -.word 0x3F7EC46D -.word 0x3F7ECE34 -.word 0x3F7ED7D4 -.word 0x3F7EE14C -.word 0x3F7EEA9D -.word 0x3F7EF3C7 -.word 0x3F7EFCC9 -.word 0x3F7F05A4 -.word 0x3F7F0E58 -.word 0x3F7F16E4 -.word 0x3F7F1F49 -.word 0x3F7F2787 -.word 0x3F7F2F9D -.word 0x3F7F378C -.word 0x3F7F3F54 -.word 0x3F7F46F4 -.word 0x3F7F4E6D -.word 0x3F7F55BF -.word 0x3F7F5CE9 -.word 0x3F7F63EC -.word 0x3F7F6AC7 -.word 0x3F7F717B -.word 0x3F7F7808 -.word 0x3F7F7E6D -.word 0x3F7F84AB -.word 0x3F7F8AC2 -.word 0x3F7F90B1 -.word 0x3F7F9678 -.word 0x3F7F9C18 -.word 0x3F7FA191 -.word 0x3F7FA6E3 -.word 0x3F7FAC0D -.word 0x3F7FB10F -.word 0x3F7FB5EA -.word 0x3F7FBA9E -.word 0x3F7FBF2A -.word 0x3F7FC38F -.word 0x3F7FC7CC -.word 0x3F7FCBE2 -.word 0x3F7FCFD1 -.word 0x3F7FD397 -.word 0x3F7FD737 -.word 0x3F7FDAAF -.word 0x3F7FDE00 -.word 0x3F7FE129 -.word 0x3F7FE42B -.word 0x3F7FE705 -.word 0x3F7FE9B8 -.word 0x3F7FEC43 -.word 0x3F7FEEA7 -.word 0x3F7FF0E3 -.word 0x3F7FF2F8 -.word 0x3F7FF4E6 -.word 0x3F7FF6AC -.word 0x3F7FF84A -.word 0x3F7FF9C1 -.word 0x3F7FFB11 -.word 0x3F7FFC39 -.word 0x3F7FFD39 -.word 0x3F7FFE13 -.word 0x3F7FFEC4 -.word 0x3F7FFF4E -.word 0x3F7FFFB1 -.word 0x3F7FFFEC +.word32 0x3F800000 +.word32 0x3F7FFFEC +.word32 0x3F7FFFB1 +.word32 0x3F7FFF4E +.word32 0x3F7FFEC4 +.word32 0x3F7FFE13 +.word32 0x3F7FFD39 +.word32 0x3F7FFC39 +.word32 0x3F7FFB11 +.word32 0x3F7FF9C1 +.word32 0x3F7FF84A +.word32 0x3F7FF6AC +.word32 0x3F7FF4E6 +.word32 0x3F7FF2F8 +.word32 0x3F7FF0E3 +.word32 0x3F7FEEA7 +.word32 0x3F7FEC43 +.word32 0x3F7FE9B8 +.word32 0x3F7FE705 +.word32 0x3F7FE42B +.word32 0x3F7FE129 +.word32 0x3F7FDE00 +.word32 0x3F7FDAAF +.word32 0x3F7FD737 +.word32 0x3F7FD397 +.word32 0x3F7FCFD1 +.word32 0x3F7FCBE2 +.word32 0x3F7FC7CC +.word32 0x3F7FC38F +.word32 0x3F7FBF2A +.word32 0x3F7FBA9E +.word32 0x3F7FB5EA +.word32 0x3F7FB10F +.word32 0x3F7FAC0D +.word32 0x3F7FA6E3 +.word32 0x3F7FA191 +.word32 0x3F7F9C18 +.word32 0x3F7F9678 +.word32 0x3F7F90B1 +.word32 0x3F7F8AC2 +.word32 0x3F7F84AB +.word32 0x3F7F7E6D +.word32 0x3F7F7808 +.word32 0x3F7F717B +.word32 0x3F7F6AC7 +.word32 0x3F7F63EC +.word32 0x3F7F5CE9 +.word32 0x3F7F55BF +.word32 0x3F7F4E6D +.word32 0x3F7F46F4 +.word32 0x3F7F3F54 +.word32 0x3F7F378C +.word32 0x3F7F2F9D +.word32 0x3F7F2787 +.word32 0x3F7F1F49 +.word32 0x3F7F16E4 +.word32 0x3F7F0E58 +.word32 0x3F7F05A4 +.word32 0x3F7EFCC9 +.word32 0x3F7EF3C7 +.word32 0x3F7EEA9D +.word32 0x3F7EE14C +.word32 0x3F7ED7D4 +.word32 0x3F7ECE34 +.word32 0x3F7EC46D +.word32 0x3F7EBA7F +.word32 0x3F7EB069 +.word32 0x3F7EA62D +.word32 0x3F7E9BC9 +.word32 0x3F7E913D +.word32 0x3F7E868B +.word32 0x3F7E7BB1 +.word32 0x3F7E70B0 +.word32 0x3F7E6588 +.word32 0x3F7E5A38 +.word32 0x3F7E4EC1 +.word32 0x3F7E4323 +.word32 0x3F7E375E +.word32 0x3F7E2B72 +.word32 0x3F7E1F5E +.word32 0x3F7E1324 +.word32 0x3F7E06C2 +.word32 0x3F7DFA38 +.word32 0x3F7DED88 +.word32 0x3F7DE0B1 +.word32 0x3F7DD3B2 +.word32 0x3F7DC68C +.word32 0x3F7DB940 +.word32 0x3F7DABCC +.word32 0x3F7D9E30 +.word32 0x3F7D906E +.word32 0x3F7D8285 +.word32 0x3F7D7474 +.word32 0x3F7D663D +.word32 0x3F7D57DE +.word32 0x3F7D4959 +.word32 0x3F7D3AAC +.word32 0x3F7D2BD8 +.word32 0x3F7D1CDD +.word32 0x3F7D0DBC +.word32 0x3F7CFE73 +.word32 0x3F7CEF03 +.word32 0x3F7CDF6C +.word32 0x3F7CCFAE +.word32 0x3F7CBFC9 +.word32 0x3F7CAFBD +.word32 0x3F7C9F8A +.word32 0x3F7C8F31 +.word32 0x3F7C7EB0 +.word32 0x3F7C6E08 +.word32 0x3F7C5D3A +.word32 0x3F7C4C44 +.word32 0x3F7C3B28 +.word32 0x3F7C29E5 +.word32 0x3F7C187A +.word32 0x3F7C06E9 +.word32 0x3F7BF531 +.word32 0x3F7BE353 +.word32 0x3F7BD14D +.word32 0x3F7BBF20 +.word32 0x3F7BACCD +.word32 0x3F7B9A53 +.word32 0x3F7B87B2 +.word32 0x3F7B74EA +.word32 0x3F7B61FC +.word32 0x3F7B4EE7 +.word32 0x3F7B3BAB +.word32 0x3F7B2848 +.word32 0x3F7B14BE +.word32 0x3F7B010E +.word32 0x3F7AED37 +.word32 0x3F7AD93A +.word32 0x3F7AC516 +.word32 0x3F7AB0CB +.word32 0x3F7A9C59 +.word32 0x3F7A87C1 +.word32 0x3F7A7302 +.word32 0x3F7A5E1C +.word32 0x3F7A4910 +.word32 0x3F7A33DD +.word32 0x3F7A1E84 +.word32 0x3F7A0904 +.word32 0x3F79F35E +.word32 0x3F79DD91 +.word32 0x3F79C79D +.word32 0x3F79B183 +.word32 0x3F799B43 +.word32 0x3F7984DC +.word32 0x3F796E4E +.word32 0x3F79579A +.word32 0x3F7940C0 +.word32 0x3F7929BF +.word32 0x3F791298 +.word32 0x3F78FB4A +.word32 0x3F78E3D6 +.word32 0x3F78CC3B +.word32 0x3F78B47B +.word32 0x3F789C93 +.word32 0x3F788486 +.word32 0x3F786C52 +.word32 0x3F7853F8 +.word32 0x3F783B77 +.word32 0x3F7822D1 +.word32 0x3F780A04 +.word32 0x3F77F110 +.word32 0x3F77D7F7 +.word32 0x3F77BEB7 +.word32 0x3F77A551 +.word32 0x3F778BC5 +.word32 0x3F777213 +.word32 0x3F77583A +.word32 0x3F773E3C +.word32 0x3F772417 +.word32 0x3F7709CC +.word32 0x3F76EF5B +.word32 0x3F76D4C4 +.word32 0x3F76BA07 +.word32 0x3F769F24 +.word32 0x3F76841B +.word32 0x3F7668EC +.word32 0x3F764D97 +.word32 0x3F76321B +.word32 0x3F76167A +.word32 0x3F75FAB3 +.word32 0x3F75DEC6 +.word32 0x3F75C2B3 +.word32 0x3F75A67B +.word32 0x3F758A1C +.word32 0x3F756D97 +.word32 0x3F7550ED +.word32 0x3F75341D +.word32 0x3F751727 +.word32 0x3F74FA0B +.word32 0x3F74DCC9 +.word32 0x3F74BF62 +.word32 0x3F74A1D5 +.word32 0x3F748422 +.word32 0x3F746649 +.word32 0x3F74484B +.word32 0x3F742A27 +.word32 0x3F740BDD +.word32 0x3F73ED6E +.word32 0x3F73CED9 +.word32 0x3F73B01F +.word32 0x3F73913F +.word32 0x3F737239 +.word32 0x3F73530E +.word32 0x3F7333BE +.word32 0x3F731447 +.word32 0x3F72F4AC +.word32 0x3F72D4EB +.word32 0x3F72B504 +.word32 0x3F7294F8 +.word32 0x3F7274C7 +.word32 0x3F725470 +.word32 0x3F7233F4 +.word32 0x3F721352 +.word32 0x3F71F28C +.word32 0x3F71D19F +.word32 0x3F71B08E +.word32 0x3F718F57 +.word32 0x3F716DFB +.word32 0x3F714C7A +.word32 0x3F712AD4 +.word32 0x3F710908 +.word32 0x3F70E717 +.word32 0x3F70C501 +.word32 0x3F70A2C6 +.word32 0x3F708066 +.word32 0x3F705DE1 +.word32 0x3F703B37 +.word32 0x3F701867 +.word32 0x3F6FF573 +.word32 0x3F6FD25A +.word32 0x3F6FAF1B +.word32 0x3F6F8BB8 +.word32 0x3F6F6830 +.word32 0x3F6F4483 +.word32 0x3F6F20B0 +.word32 0x3F6EFCBA +.word32 0x3F6ED89E +.word32 0x3F6EB45D +.word32 0x3F6E8FF8 +.word32 0x3F6E6B6D +.word32 0x3F6E46BE +.word32 0x3F6E21EB +.word32 0x3F6DFCF2 +.word32 0x3F6DD7D5 +.word32 0x3F6DB293 +.word32 0x3F6D8D2D +.word32 0x3F6D67A1 +.word32 0x3F6D41F2 +.word32 0x3F6D1C1D +.word32 0x3F6CF624 +.word32 0x3F6CD007 +.word32 0x3F6CA9C5 +.word32 0x3F6C835E +.word32 0x3F6C5CD4 +.word32 0x3F6C3624 +.word32 0x3F6C0F50 +.word32 0x3F6BE858 +.word32 0x3F6BC13B +.word32 0x3F6B99FB +.word32 0x3F6B7295 +.word32 0x3F6B4B0C +.word32 0x3F6B235E +.word32 0x3F6AFB8C +.word32 0x3F6AD395 +.word32 0x3F6AAB7B +.word32 0x3F6A833C +.word32 0x3F6A5AD9 +.word32 0x3F6A3252 +.word32 0x3F6A09A7 +.word32 0x3F69E0D7 +.word32 0x3F69B7E4 +.word32 0x3F698ECC +.word32 0x3F696591 +.word32 0x3F693C32 +.word32 0x3F6912AE +.word32 0x3F68E907 +.word32 0x3F68BF3C +.word32 0x3F68954C +.word32 0x3F686B39 +.word32 0x3F684103 +.word32 0x3F6816A8 +.word32 0x3F67EC29 +.word32 0x3F67C187 +.word32 0x3F6796C1 +.word32 0x3F676BD8 +.word32 0x3F6740CA +.word32 0x3F671599 +.word32 0x3F66EA45 +.word32 0x3F66BECC +.word32 0x3F669330 +.word32 0x3F666771 +.word32 0x3F663B8E +.word32 0x3F660F88 +.word32 0x3F65E35E +.word32 0x3F65B710 +.word32 0x3F658AA0 +.word32 0x3F655E0B +.word32 0x3F653154 +.word32 0x3F650479 +.word32 0x3F64D77B +.word32 0x3F64AA59 +.word32 0x3F647D14 +.word32 0x3F644FAC +.word32 0x3F642221 +.word32 0x3F63F473 +.word32 0x3F63C6A1 +.word32 0x3F6398AC +.word32 0x3F636A95 +.word32 0x3F633C5A +.word32 0x3F630DFC +.word32 0x3F62DF7B +.word32 0x3F62B0D7 +.word32 0x3F628210 +.word32 0x3F625326 +.word32 0x3F62241A +.word32 0x3F61F4EA +.word32 0x3F61C598 +.word32 0x3F619622 +.word32 0x3F61668A +.word32 0x3F6136D0 +.word32 0x3F6106F2 +.word32 0x3F60D6F2 +.word32 0x3F60A6CF +.word32 0x3F607689 +.word32 0x3F604621 +.word32 0x3F601596 +.word32 0x3F5FE4E9 +.word32 0x3F5FB419 +.word32 0x3F5F8327 +.word32 0x3F5F5212 +.word32 0x3F5F20DB +.word32 0x3F5EEF81 +.word32 0x3F5EBE05 +.word32 0x3F5E8C67 +.word32 0x3F5E5AA6 +.word32 0x3F5E28C3 +.word32 0x3F5DF6BE +.word32 0x3F5DC497 +.word32 0x3F5D924D +.word32 0x3F5D5FE1 +.word32 0x3F5D2D53 +.word32 0x3F5CFAA3 +.word32 0x3F5CC7D1 +.word32 0x3F5C94DD +.word32 0x3F5C61C7 +.word32 0x3F5C2E8E +.word32 0x3F5BFB34 +.word32 0x3F5BC7B8 +.word32 0x3F5B941A +.word32 0x3F5B605A +.word32 0x3F5B2C79 +.word32 0x3F5AF875 +.word32 0x3F5AC450 +.word32 0x3F5A9009 +.word32 0x3F5A5BA0 +.word32 0x3F5A2716 +.word32 0x3F59F26A +.word32 0x3F59BD9C +.word32 0x3F5988AD +.word32 0x3F59539C +.word32 0x3F591E6A +.word32 0x3F58E916 +.word32 0x3F58B3A1 +.word32 0x3F587E0B +.word32 0x3F584853 +.word32 0x3F581279 +.word32 0x3F57DC7F +.word32 0x3F57A663 +.word32 0x3F577026 +.word32 0x3F5739C7 +.word32 0x3F570348 +.word32 0x3F56CCA7 +.word32 0x3F5695E5 +.word32 0x3F565F02 +.word32 0x3F5627FE +.word32 0x3F55F0D9 +.word32 0x3F55B993 +.word32 0x3F55822C +.word32 0x3F554AA4 +.word32 0x3F5512FB +.word32 0x3F54DB31 +.word32 0x3F54A347 +.word32 0x3F546B3B +.word32 0x3F54330F +.word32 0x3F53FAC3 +.word32 0x3F53C255 +.word32 0x3F5389C7 +.word32 0x3F535118 +.word32 0x3F531849 +.word32 0x3F52DF59 +.word32 0x3F52A649 +.word32 0x3F526D18 +.word32 0x3F5233C6 +.word32 0x3F51FA54 +.word32 0x3F51C0C2 +.word32 0x3F518710 +.word32 0x3F514D3D +.word32 0x3F51134A +.word32 0x3F50D937 +.word32 0x3F509F03 +.word32 0x3F5064AF +.word32 0x3F502A3B +.word32 0x3F4FEFA8 +.word32 0x3F4FB4F4 +.word32 0x3F4F7A1F +.word32 0x3F4F3F2B +.word32 0x3F4F0417 +.word32 0x3F4EC8E4 +.word32 0x3F4E8D90 +.word32 0x3F4E521C +.word32 0x3F4E1689 +.word32 0x3F4DDAD5 +.word32 0x3F4D9F02 +.word32 0x3F4D6310 +.word32 0x3F4D26FD +.word32 0x3F4CEACB +.word32 0x3F4CAE79 +.word32 0x3F4C7208 +.word32 0x3F4C3578 +.word32 0x3F4BF8C7 +.word32 0x3F4BBBF8 +.word32 0x3F4B7F09 +.word32 0x3F4B41FA +.word32 0x3F4B04CC +.word32 0x3F4AC77F +.word32 0x3F4A8A13 +.word32 0x3F4A4C87 +.word32 0x3F4A0EDC +.word32 0x3F49D112 +.word32 0x3F499329 +.word32 0x3F495521 +.word32 0x3F4916FA +.word32 0x3F48D8B3 +.word32 0x3F489A4E +.word32 0x3F485BCA +.word32 0x3F481D27 +.word32 0x3F47DE65 +.word32 0x3F479F84 +.word32 0x3F476085 +.word32 0x3F472167 +.word32 0x3F46E22A +.word32 0x3F46A2CE +.word32 0x3F466354 +.word32 0x3F4623BB +.word32 0x3F45E403 +.word32 0x3F45A42D +.word32 0x3F456439 +.word32 0x3F452426 +.word32 0x3F44E3F5 +.word32 0x3F44A3A5 +.word32 0x3F446337 +.word32 0x3F4422AB +.word32 0x3F43E200 +.word32 0x3F43A138 +.word32 0x3F436051 +.word32 0x3F431F4C +.word32 0x3F42DE29 +.word32 0x3F429CE8 +.word32 0x3F425B89 +.word32 0x3F421A0B +.word32 0x3F41D870 +.word32 0x3F4196B7 +.word32 0x3F4154E1 +.word32 0x3F4112EC +.word32 0x3F40D0DA +.word32 0x3F408EA9 +.word32 0x3F404C5C +.word32 0x3F4009F0 +.word32 0x3F3FC767 +.word32 0x3F3F84C0 +.word32 0x3F3F41FC +.word32 0x3F3EFF1B +.word32 0x3F3EBC1B +.word32 0x3F3E78FF +.word32 0x3F3E35C5 +.word32 0x3F3DF26E +.word32 0x3F3DAEF9 +.word32 0x3F3D6B67 +.word32 0x3F3D27B8 +.word32 0x3F3CE3EC +.word32 0x3F3CA003 +.word32 0x3F3C5BFC +.word32 0x3F3C17D9 +.word32 0x3F3BD398 +.word32 0x3F3B8F3B +.word32 0x3F3B4AC1 +.word32 0x3F3B0629 +.word32 0x3F3AC175 +.word32 0x3F3A7CA4 +.word32 0x3F3A37B7 +.word32 0x3F39F2AC +.word32 0x3F39AD85 +.word32 0x3F396842 +.word32 0x3F3922E1 +.word32 0x3F38DD65 +.word32 0x3F3897CB +.word32 0x3F385216 +.word32 0x3F380C43 +.word32 0x3F37C655 +.word32 0x3F37804A +.word32 0x3F373A23 +.word32 0x3F36F3DF +.word32 0x3F36AD7F +.word32 0x3F366704 +.word32 0x3F36206C +.word32 0x3F35D9B8 +.word32 0x3F3592E7 +.word32 0x3F354BFB +.word32 0x3F3504F3 +.word32 0x3F34BDCF +.word32 0x3F34768F +.word32 0x3F342F34 +.word32 0x3F33E7BC +.word32 0x3F33A029 +.word32 0x3F33587A +.word32 0x3F3310AF +.word32 0x3F32C8C9 +.word32 0x3F3280C7 +.word32 0x3F3238AA +.word32 0x3F31F071 +.word32 0x3F31A81D +.word32 0x3F315FAD +.word32 0x3F311722 +.word32 0x3F30CE7C +.word32 0x3F3085BB +.word32 0x3F303CDE +.word32 0x3F2FF3E6 +.word32 0x3F2FAAD3 +.word32 0x3F2F61A5 +.word32 0x3F2F185B +.word32 0x3F2ECEF7 +.word32 0x3F2E8578 +.word32 0x3F2E3BDE +.word32 0x3F2DF229 +.word32 0x3F2DA859 +.word32 0x3F2D5E6F +.word32 0x3F2D1469 +.word32 0x3F2CCA49 +.word32 0x3F2C800F +.word32 0x3F2C35B9 +.word32 0x3F2BEB4A +.word32 0x3F2BA0BF +.word32 0x3F2B561B +.word32 0x3F2B0B5B +.word32 0x3F2AC082 +.word32 0x3F2A758E +.word32 0x3F2A2A80 +.word32 0x3F29DF57 +.word32 0x3F299415 +.word32 0x3F2948B8 +.word32 0x3F28FD41 +.word32 0x3F28B1B0 +.word32 0x3F286605 +.word32 0x3F281A40 +.word32 0x3F27CE61 +.word32 0x3F278268 +.word32 0x3F273656 +.word32 0x3F26EA2A +.word32 0x3F269DE3 +.word32 0x3F265184 +.word32 0x3F26050A +.word32 0x3F25B877 +.word32 0x3F256BCB +.word32 0x3F251F04 +.word32 0x3F24D225 +.word32 0x3F24852C +.word32 0x3F24381A +.word32 0x3F23EAEE +.word32 0x3F239DA9 +.word32 0x3F23504B +.word32 0x3F2302D3 +.word32 0x3F22B543 +.word32 0x3F226799 +.word32 0x3F2219D7 +.word32 0x3F21CBFB +.word32 0x3F217E06 +.word32 0x3F212FF9 +.word32 0x3F20E1D2 +.word32 0x3F209393 +.word32 0x3F20453B +.word32 0x3F1FF6CB +.word32 0x3F1FA841 +.word32 0x3F1F599F +.word32 0x3F1F0AE5 +.word32 0x3F1EBC12 +.word32 0x3F1E6D26 +.word32 0x3F1E1E22 +.word32 0x3F1DCF06 +.word32 0x3F1D7FD1 +.word32 0x3F1D3084 +.word32 0x3F1CE11F +.word32 0x3F1C91A2 +.word32 0x3F1C420C +.word32 0x3F1BF25F +.word32 0x3F1BA299 +.word32 0x3F1B52BB +.word32 0x3F1B02C6 +.word32 0x3F1AB2B8 +.word32 0x3F1A6293 +.word32 0x3F1A1255 +.word32 0x3F19C200 +.word32 0x3F197194 +.word32 0x3F19210F +.word32 0x3F18D073 +.word32 0x3F187FC0 +.word32 0x3F182EF5 +.word32 0x3F17DE12 +.word32 0x3F178D18 +.word32 0x3F173C07 +.word32 0x3F16EADE +.word32 0x3F16999F +.word32 0x3F164847 +.word32 0x3F15F6D9 +.word32 0x3F15A554 +.word32 0x3F1553B7 +.word32 0x3F150204 +.word32 0x3F14B039 +.word32 0x3F145E58 +.word32 0x3F140C5F +.word32 0x3F13BA50 +.word32 0x3F13682A +.word32 0x3F1315EE +.word32 0x3F12C39A +.word32 0x3F127130 +.word32 0x3F121EB0 +.word32 0x3F11CC19 +.word32 0x3F11796B +.word32 0x3F1126A7 +.word32 0x3F10D3CD +.word32 0x3F1080DC +.word32 0x3F102DD5 +.word32 0x3F0FDAB8 +.word32 0x3F0F8784 +.word32 0x3F0F343B +.word32 0x3F0EE0DB +.word32 0x3F0E8D65 +.word32 0x3F0E39DA +.word32 0x3F0DE638 +.word32 0x3F0D9281 +.word32 0x3F0D3EB3 +.word32 0x3F0CEAD0 +.word32 0x3F0C96D7 +.word32 0x3F0C42C9 +.word32 0x3F0BEEA5 +.word32 0x3F0B9A6B +.word32 0x3F0B461C +.word32 0x3F0AF1B7 +.word32 0x3F0A9D3D +.word32 0x3F0A48AD +.word32 0x3F09F409 +.word32 0x3F099F4E +.word32 0x3F094A7F +.word32 0x3F08F59B +.word32 0x3F08A0A1 +.word32 0x3F084B92 +.word32 0x3F07F66F +.word32 0x3F07A136 +.word32 0x3F074BE8 +.word32 0x3F06F686 +.word32 0x3F06A10E +.word32 0x3F064B82 +.word32 0x3F05F5E2 +.word32 0x3F05A02C +.word32 0x3F054A62 +.word32 0x3F04F484 +.word32 0x3F049E91 +.word32 0x3F044889 +.word32 0x3F03F26D +.word32 0x3F039C3D +.word32 0x3F0345F8 +.word32 0x3F02EF9F +.word32 0x3F029932 +.word32 0x3F0242B1 +.word32 0x3F01EC1C +.word32 0x3F019573 +.word32 0x3F013EB5 +.word32 0x3F00E7E4 +.word32 0x3F0090FF +.word32 0x3F003A06 +.word32 0x3EFFC5F3 +.word32 0x3EFF17B2 +.word32 0x3EFE694A +.word32 0x3EFDBABB +.word32 0x3EFD0C04 +.word32 0x3EFC5D27 +.word32 0x3EFBAE22 +.word32 0x3EFAFEF7 +.word32 0x3EFA4FA5 +.word32 0x3EF9A02D +.word32 0x3EF8F08E +.word32 0x3EF840C8 +.word32 0x3EF790DC +.word32 0x3EF6E0CB +.word32 0x3EF63093 +.word32 0x3EF58035 +.word32 0x3EF4CFB1 +.word32 0x3EF41F07 +.word32 0x3EF36E38 +.word32 0x3EF2BD43 +.word32 0x3EF20C29 +.word32 0x3EF15AEA +.word32 0x3EF0A985 +.word32 0x3EEFF7FB +.word32 0x3EEF464C +.word32 0x3EEE9479 +.word32 0x3EEDE280 +.word32 0x3EED3063 +.word32 0x3EEC7E21 +.word32 0x3EEBCBBB +.word32 0x3EEB1930 +.word32 0x3EEA6681 +.word32 0x3EE9B3AE +.word32 0x3EE900B7 +.word32 0x3EE84D9C +.word32 0x3EE79A5D +.word32 0x3EE6E6FB +.word32 0x3EE63375 +.word32 0x3EE57FCB +.word32 0x3EE4CBFE +.word32 0x3EE4180E +.word32 0x3EE363FA +.word32 0x3EE2AFC4 +.word32 0x3EE1FB6A +.word32 0x3EE146EE +.word32 0x3EE0924F +.word32 0x3EDFDD8D +.word32 0x3EDF28A9 +.word32 0x3EDE73A2 +.word32 0x3EDDBE79 +.word32 0x3EDD092E +.word32 0x3EDC53C1 +.word32 0x3EDB9E31 +.word32 0x3EDAE880 +.word32 0x3EDA32AD +.word32 0x3ED97CB9 +.word32 0x3ED8C6A3 +.word32 0x3ED8106B +.word32 0x3ED75A13 +.word32 0x3ED6A399 +.word32 0x3ED5ECFD +.word32 0x3ED53641 +.word32 0x3ED47F64 +.word32 0x3ED3C867 +.word32 0x3ED31148 +.word32 0x3ED25A09 +.word32 0x3ED1A2AA +.word32 0x3ED0EB2A +.word32 0x3ED0338A +.word32 0x3ECF7BCA +.word32 0x3ECEC3EA +.word32 0x3ECE0BEA +.word32 0x3ECD53CA +.word32 0x3ECC9B8B +.word32 0x3ECBE32C +.word32 0x3ECB2AAE +.word32 0x3ECA7210 +.word32 0x3EC9B953 +.word32 0x3EC90077 +.word32 0x3EC8477C +.word32 0x3EC78E62 +.word32 0x3EC6D529 +.word32 0x3EC61BD2 +.word32 0x3EC5625C +.word32 0x3EC4A8C8 +.word32 0x3EC3EF15 +.word32 0x3EC33544 +.word32 0x3EC27B55 +.word32 0x3EC1C148 +.word32 0x3EC1071E +.word32 0x3EC04CD5 +.word32 0x3EBF926F +.word32 0x3EBED7EB +.word32 0x3EBE1D4A +.word32 0x3EBD628B +.word32 0x3EBCA7AF +.word32 0x3EBBECB6 +.word32 0x3EBB31A0 +.word32 0x3EBA766E +.word32 0x3EB9BB1E +.word32 0x3EB8FFB2 +.word32 0x3EB8442A +.word32 0x3EB78884 +.word32 0x3EB6CCC3 +.word32 0x3EB610E6 +.word32 0x3EB554EC +.word32 0x3EB498D6 +.word32 0x3EB3DCA5 +.word32 0x3EB32058 +.word32 0x3EB263EF +.word32 0x3EB1A76B +.word32 0x3EB0EACB +.word32 0x3EB02E10 +.word32 0x3EAF713A +.word32 0x3EAEB449 +.word32 0x3EADF73C +.word32 0x3EAD3A15 +.word32 0x3EAC7CD4 +.word32 0x3EABBF77 +.word32 0x3EAB0201 +.word32 0x3EAA446F +.word32 0x3EA986C4 +.word32 0x3EA8C8FE +.word32 0x3EA80B1F +.word32 0x3EA74D25 +.word32 0x3EA68F12 +.word32 0x3EA5D0E5 +.word32 0x3EA5129F +.word32 0x3EA4543F +.word32 0x3EA395C5 +.word32 0x3EA2D733 +.word32 0x3EA21887 +.word32 0x3EA159C2 +.word32 0x3EA09AE5 +.word32 0x3E9FDBEE +.word32 0x3E9F1CDF +.word32 0x3E9E5DB8 +.word32 0x3E9D9E78 +.word32 0x3E9CDF20 +.word32 0x3E9C1FAF +.word32 0x3E9B6027 +.word32 0x3E9AA086 +.word32 0x3E99E0CE +.word32 0x3E9920FE +.word32 0x3E986116 +.word32 0x3E97A117 +.word32 0x3E96E100 +.word32 0x3E9620D2 +.word32 0x3E95608D +.word32 0x3E94A031 +.word32 0x3E93DFBF +.word32 0x3E931F35 +.word32 0x3E925E94 +.word32 0x3E919DDD +.word32 0x3E90DD10 +.word32 0x3E901C2C +.word32 0x3E8F5B32 +.word32 0x3E8E9A22 +.word32 0x3E8DD8FC +.word32 0x3E8D17C0 +.word32 0x3E8C566E +.word32 0x3E8B9507 +.word32 0x3E8AD38A +.word32 0x3E8A11F7 +.word32 0x3E895050 +.word32 0x3E888E93 +.word32 0x3E87CCC1 +.word32 0x3E870ADA +.word32 0x3E8648DF +.word32 0x3E8586CE +.word32 0x3E84C4AA +.word32 0x3E840270 +.word32 0x3E834022 +.word32 0x3E827DC0 +.word32 0x3E81BB4A +.word32 0x3E80F8C0 +.word32 0x3E803622 +.word32 0x3E7EE6E1 +.word32 0x3E7D6156 +.word32 0x3E7BDBA4 +.word32 0x3E7A55CB +.word32 0x3E78CFCC +.word32 0x3E7749A6 +.word32 0x3E75C35A +.word32 0x3E743CE8 +.word32 0x3E72B651 +.word32 0x3E712F94 +.word32 0x3E6FA8B2 +.word32 0x3E6E21AB +.word32 0x3E6C9A7F +.word32 0x3E6B132F +.word32 0x3E698BBA +.word32 0x3E680422 +.word32 0x3E667C66 +.word32 0x3E64F486 +.word32 0x3E636C83 +.word32 0x3E61E45C +.word32 0x3E605C13 +.word32 0x3E5ED3A8 +.word32 0x3E5D4B1A +.word32 0x3E5BC26A +.word32 0x3E5A3997 +.word32 0x3E58B0A4 +.word32 0x3E57278F +.word32 0x3E559E58 +.word32 0x3E541501 +.word32 0x3E528B89 +.word32 0x3E5101F1 +.word32 0x3E4F7838 +.word32 0x3E4DEE60 +.word32 0x3E4C6467 +.word32 0x3E4ADA4F +.word32 0x3E495018 +.word32 0x3E47C5C2 +.word32 0x3E463B4D +.word32 0x3E44B0B9 +.word32 0x3E432607 +.word32 0x3E419B37 +.word32 0x3E401049 +.word32 0x3E3E853E +.word32 0x3E3CFA15 +.word32 0x3E3B6ECF +.word32 0x3E39E36C +.word32 0x3E3857EC +.word32 0x3E36CC50 +.word32 0x3E354098 +.word32 0x3E33B4C4 +.word32 0x3E3228D4 +.word32 0x3E309CC9 +.word32 0x3E2F10A2 +.word32 0x3E2D8461 +.word32 0x3E2BF804 +.word32 0x3E2A6B8D +.word32 0x3E28DEFC +.word32 0x3E275251 +.word32 0x3E25C58C +.word32 0x3E2438AD +.word32 0x3E22ABB6 +.word32 0x3E211EA5 +.word32 0x3E1F917B +.word32 0x3E1E0438 +.word32 0x3E1C76DE +.word32 0x3E1AE96B +.word32 0x3E195BE0 +.word32 0x3E17CE3D +.word32 0x3E164083 +.word32 0x3E14B2B2 +.word32 0x3E1324CA +.word32 0x3E1196CC +.word32 0x3E1008B7 +.word32 0x3E0E7A8B +.word32 0x3E0CEC4A +.word32 0x3E0B5DF3 +.word32 0x3E09CF86 +.word32 0x3E084105 +.word32 0x3E06B26E +.word32 0x3E0523C2 +.word32 0x3E039502 +.word32 0x3E02062E +.word32 0x3E007745 +.word32 0x3DFDD092 +.word32 0x3DFAB273 +.word32 0x3DF7942C +.word32 0x3DF475C0 +.word32 0x3DF1572E +.word32 0x3DEE3876 +.word32 0x3DEB199A +.word32 0x3DE7FA9A +.word32 0x3DE4DB76 +.word32 0x3DE1BC2E +.word32 0x3DDE9CC4 +.word32 0x3DDB7D37 +.word32 0x3DD85D89 +.word32 0x3DD53DB9 +.word32 0x3DD21DC8 +.word32 0x3DCEFDB7 +.word32 0x3DCBDD86 +.word32 0x3DC8BD36 +.word32 0x3DC59CC6 +.word32 0x3DC27C39 +.word32 0x3DBF5B8D +.word32 0x3DBC3AC3 +.word32 0x3DB919DD +.word32 0x3DB5F8DA +.word32 0x3DB2D7BB +.word32 0x3DAFB680 +.word32 0x3DAC952B +.word32 0x3DA973BA +.word32 0x3DA65230 +.word32 0x3DA3308C +.word32 0x3DA00ECF +.word32 0x3D9CECF9 +.word32 0x3D99CB0A +.word32 0x3D96A905 +.word32 0x3D9386E7 +.word32 0x3D9064B4 +.word32 0x3D8D426A +.word32 0x3D8A200A +.word32 0x3D86FD94 +.word32 0x3D83DB0A +.word32 0x3D80B86C +.word32 0x3D7B2B74 +.word32 0x3D74E5E9 +.word32 0x3D6EA038 +.word32 0x3D685A62 +.word32 0x3D621469 +.word32 0x3D5BCE4C +.word32 0x3D55880E +.word32 0x3D4F41AF +.word32 0x3D48FB30 +.word32 0x3D42B491 +.word32 0x3D3C6DD5 +.word32 0x3D3626FC +.word32 0x3D2FE007 +.word32 0x3D2998F6 +.word32 0x3D2351CB +.word32 0x3D1D0A88 +.word32 0x3D16C32C +.word32 0x3D107BB8 +.word32 0x3D0A342F +.word32 0x3D03EC90 +.word32 0x3CFB49BA +.word32 0x3CEEBA2C +.word32 0x3CE22A7A +.word32 0x3CD59AA6 +.word32 0x3CC90AB0 +.word32 0x3CBC7A9B +.word32 0x3CAFEA69 +.word32 0x3CA35A1C +.word32 0x3C96C9B6 +.word32 0x3C8A3938 +.word32 0x3C7B514B +.word32 0x3C622FFF +.word32 0x3C490E90 +.word32 0x3C2FED02 +.word32 0x3C16CB58 +.word32 0x3BFB5330 +.word32 0x3BC90F88 +.word32 0x3B96CBC1 +.word32 0x3B490FC6 +.word32 0x3AC90FD5 +.word32 0x00000000 +.word32 0xBAC90FD5 +.word32 0xBB490FC6 +.word32 0xBB96CBC1 +.word32 0xBBC90F88 +.word32 0xBBFB5330 +.word32 0xBC16CB58 +.word32 0xBC2FED02 +.word32 0xBC490E90 +.word32 0xBC622FFF +.word32 0xBC7B514B +.word32 0xBC8A3938 +.word32 0xBC96C9B6 +.word32 0xBCA35A1C +.word32 0xBCAFEA69 +.word32 0xBCBC7A9B +.word32 0xBCC90AB0 +.word32 0xBCD59AA6 +.word32 0xBCE22A7A +.word32 0xBCEEBA2C +.word32 0xBCFB49BA +.word32 0xBD03EC90 +.word32 0xBD0A342F +.word32 0xBD107BB8 +.word32 0xBD16C32C +.word32 0xBD1D0A88 +.word32 0xBD2351CB +.word32 0xBD2998F6 +.word32 0xBD2FE007 +.word32 0xBD3626FC +.word32 0xBD3C6DD5 +.word32 0xBD42B491 +.word32 0xBD48FB30 +.word32 0xBD4F41AF +.word32 0xBD55880E +.word32 0xBD5BCE4C +.word32 0xBD621469 +.word32 0xBD685A62 +.word32 0xBD6EA038 +.word32 0xBD74E5E9 +.word32 0xBD7B2B74 +.word32 0xBD80B86C +.word32 0xBD83DB0A +.word32 0xBD86FD94 +.word32 0xBD8A200A +.word32 0xBD8D426A +.word32 0xBD9064B4 +.word32 0xBD9386E7 +.word32 0xBD96A905 +.word32 0xBD99CB0A +.word32 0xBD9CECF9 +.word32 0xBDA00ECF +.word32 0xBDA3308C +.word32 0xBDA65230 +.word32 0xBDA973BA +.word32 0xBDAC952B +.word32 0xBDAFB680 +.word32 0xBDB2D7BB +.word32 0xBDB5F8DA +.word32 0xBDB919DD +.word32 0xBDBC3AC3 +.word32 0xBDBF5B8D +.word32 0xBDC27C39 +.word32 0xBDC59CC6 +.word32 0xBDC8BD36 +.word32 0xBDCBDD86 +.word32 0xBDCEFDB7 +.word32 0xBDD21DC8 +.word32 0xBDD53DB9 +.word32 0xBDD85D89 +.word32 0xBDDB7D37 +.word32 0xBDDE9CC4 +.word32 0xBDE1BC2E +.word32 0xBDE4DB76 +.word32 0xBDE7FA9A +.word32 0xBDEB199A +.word32 0xBDEE3876 +.word32 0xBDF1572E +.word32 0xBDF475C0 +.word32 0xBDF7942C +.word32 0xBDFAB273 +.word32 0xBDFDD092 +.word32 0xBE007745 +.word32 0xBE02062E +.word32 0xBE039502 +.word32 0xBE0523C2 +.word32 0xBE06B26E +.word32 0xBE084105 +.word32 0xBE09CF86 +.word32 0xBE0B5DF3 +.word32 0xBE0CEC4A +.word32 0xBE0E7A8B +.word32 0xBE1008B7 +.word32 0xBE1196CC +.word32 0xBE1324CA +.word32 0xBE14B2B2 +.word32 0xBE164083 +.word32 0xBE17CE3D +.word32 0xBE195BE0 +.word32 0xBE1AE96B +.word32 0xBE1C76DE +.word32 0xBE1E0438 +.word32 0xBE1F917B +.word32 0xBE211EA5 +.word32 0xBE22ABB6 +.word32 0xBE2438AD +.word32 0xBE25C58C +.word32 0xBE275251 +.word32 0xBE28DEFC +.word32 0xBE2A6B8D +.word32 0xBE2BF804 +.word32 0xBE2D8461 +.word32 0xBE2F10A2 +.word32 0xBE309CC9 +.word32 0xBE3228D4 +.word32 0xBE33B4C4 +.word32 0xBE354098 +.word32 0xBE36CC50 +.word32 0xBE3857EC +.word32 0xBE39E36C +.word32 0xBE3B6ECF +.word32 0xBE3CFA15 +.word32 0xBE3E853E +.word32 0xBE401049 +.word32 0xBE419B37 +.word32 0xBE432607 +.word32 0xBE44B0B9 +.word32 0xBE463B4D +.word32 0xBE47C5C2 +.word32 0xBE495018 +.word32 0xBE4ADA4F +.word32 0xBE4C6467 +.word32 0xBE4DEE60 +.word32 0xBE4F7838 +.word32 0xBE5101F1 +.word32 0xBE528B89 +.word32 0xBE541501 +.word32 0xBE559E58 +.word32 0xBE57278F +.word32 0xBE58B0A4 +.word32 0xBE5A3997 +.word32 0xBE5BC26A +.word32 0xBE5D4B1A +.word32 0xBE5ED3A8 +.word32 0xBE605C13 +.word32 0xBE61E45C +.word32 0xBE636C83 +.word32 0xBE64F486 +.word32 0xBE667C66 +.word32 0xBE680422 +.word32 0xBE698BBA +.word32 0xBE6B132F +.word32 0xBE6C9A7F +.word32 0xBE6E21AB +.word32 0xBE6FA8B2 +.word32 0xBE712F94 +.word32 0xBE72B651 +.word32 0xBE743CE8 +.word32 0xBE75C35A +.word32 0xBE7749A6 +.word32 0xBE78CFCC +.word32 0xBE7A55CB +.word32 0xBE7BDBA4 +.word32 0xBE7D6156 +.word32 0xBE7EE6E1 +.word32 0xBE803622 +.word32 0xBE80F8C0 +.word32 0xBE81BB4A +.word32 0xBE827DC0 +.word32 0xBE834022 +.word32 0xBE840270 +.word32 0xBE84C4AA +.word32 0xBE8586CE +.word32 0xBE8648DF +.word32 0xBE870ADA +.word32 0xBE87CCC1 +.word32 0xBE888E93 +.word32 0xBE895050 +.word32 0xBE8A11F7 +.word32 0xBE8AD38A +.word32 0xBE8B9507 +.word32 0xBE8C566E +.word32 0xBE8D17C0 +.word32 0xBE8DD8FC +.word32 0xBE8E9A22 +.word32 0xBE8F5B32 +.word32 0xBE901C2C +.word32 0xBE90DD10 +.word32 0xBE919DDD +.word32 0xBE925E94 +.word32 0xBE931F35 +.word32 0xBE93DFBF +.word32 0xBE94A031 +.word32 0xBE95608D +.word32 0xBE9620D2 +.word32 0xBE96E100 +.word32 0xBE97A117 +.word32 0xBE986116 +.word32 0xBE9920FE +.word32 0xBE99E0CE +.word32 0xBE9AA086 +.word32 0xBE9B6027 +.word32 0xBE9C1FAF +.word32 0xBE9CDF20 +.word32 0xBE9D9E78 +.word32 0xBE9E5DB8 +.word32 0xBE9F1CDF +.word32 0xBE9FDBEE +.word32 0xBEA09AE5 +.word32 0xBEA159C2 +.word32 0xBEA21887 +.word32 0xBEA2D733 +.word32 0xBEA395C5 +.word32 0xBEA4543F +.word32 0xBEA5129F +.word32 0xBEA5D0E5 +.word32 0xBEA68F12 +.word32 0xBEA74D25 +.word32 0xBEA80B1F +.word32 0xBEA8C8FE +.word32 0xBEA986C4 +.word32 0xBEAA446F +.word32 0xBEAB0201 +.word32 0xBEABBF77 +.word32 0xBEAC7CD4 +.word32 0xBEAD3A15 +.word32 0xBEADF73C +.word32 0xBEAEB449 +.word32 0xBEAF713A +.word32 0xBEB02E10 +.word32 0xBEB0EACB +.word32 0xBEB1A76B +.word32 0xBEB263EF +.word32 0xBEB32058 +.word32 0xBEB3DCA5 +.word32 0xBEB498D6 +.word32 0xBEB554EC +.word32 0xBEB610E6 +.word32 0xBEB6CCC3 +.word32 0xBEB78884 +.word32 0xBEB8442A +.word32 0xBEB8FFB2 +.word32 0xBEB9BB1E +.word32 0xBEBA766E +.word32 0xBEBB31A0 +.word32 0xBEBBECB6 +.word32 0xBEBCA7AF +.word32 0xBEBD628B +.word32 0xBEBE1D4A +.word32 0xBEBED7EB +.word32 0xBEBF926F +.word32 0xBEC04CD5 +.word32 0xBEC1071E +.word32 0xBEC1C148 +.word32 0xBEC27B55 +.word32 0xBEC33544 +.word32 0xBEC3EF15 +.word32 0xBEC4A8C8 +.word32 0xBEC5625C +.word32 0xBEC61BD2 +.word32 0xBEC6D529 +.word32 0xBEC78E62 +.word32 0xBEC8477C +.word32 0xBEC90077 +.word32 0xBEC9B953 +.word32 0xBECA7210 +.word32 0xBECB2AAE +.word32 0xBECBE32C +.word32 0xBECC9B8B +.word32 0xBECD53CA +.word32 0xBECE0BEA +.word32 0xBECEC3EA +.word32 0xBECF7BCA +.word32 0xBED0338A +.word32 0xBED0EB2A +.word32 0xBED1A2AA +.word32 0xBED25A09 +.word32 0xBED31148 +.word32 0xBED3C867 +.word32 0xBED47F64 +.word32 0xBED53641 +.word32 0xBED5ECFD +.word32 0xBED6A399 +.word32 0xBED75A13 +.word32 0xBED8106B +.word32 0xBED8C6A3 +.word32 0xBED97CB9 +.word32 0xBEDA32AD +.word32 0xBEDAE880 +.word32 0xBEDB9E31 +.word32 0xBEDC53C1 +.word32 0xBEDD092E +.word32 0xBEDDBE79 +.word32 0xBEDE73A2 +.word32 0xBEDF28A9 +.word32 0xBEDFDD8D +.word32 0xBEE0924F +.word32 0xBEE146EE +.word32 0xBEE1FB6A +.word32 0xBEE2AFC4 +.word32 0xBEE363FA +.word32 0xBEE4180E +.word32 0xBEE4CBFE +.word32 0xBEE57FCB +.word32 0xBEE63375 +.word32 0xBEE6E6FB +.word32 0xBEE79A5D +.word32 0xBEE84D9C +.word32 0xBEE900B7 +.word32 0xBEE9B3AE +.word32 0xBEEA6681 +.word32 0xBEEB1930 +.word32 0xBEEBCBBB +.word32 0xBEEC7E21 +.word32 0xBEED3063 +.word32 0xBEEDE280 +.word32 0xBEEE9479 +.word32 0xBEEF464C +.word32 0xBEEFF7FB +.word32 0xBEF0A985 +.word32 0xBEF15AEA +.word32 0xBEF20C29 +.word32 0xBEF2BD43 +.word32 0xBEF36E38 +.word32 0xBEF41F07 +.word32 0xBEF4CFB1 +.word32 0xBEF58035 +.word32 0xBEF63093 +.word32 0xBEF6E0CB +.word32 0xBEF790DC +.word32 0xBEF840C8 +.word32 0xBEF8F08E +.word32 0xBEF9A02D +.word32 0xBEFA4FA5 +.word32 0xBEFAFEF7 +.word32 0xBEFBAE22 +.word32 0xBEFC5D27 +.word32 0xBEFD0C04 +.word32 0xBEFDBABB +.word32 0xBEFE694A +.word32 0xBEFF17B2 +.word32 0xBEFFC5F3 +.word32 0xBF003A06 +.word32 0xBF0090FF +.word32 0xBF00E7E4 +.word32 0xBF013EB5 +.word32 0xBF019573 +.word32 0xBF01EC1C +.word32 0xBF0242B1 +.word32 0xBF029932 +.word32 0xBF02EF9F +.word32 0xBF0345F8 +.word32 0xBF039C3D +.word32 0xBF03F26D +.word32 0xBF044889 +.word32 0xBF049E91 +.word32 0xBF04F484 +.word32 0xBF054A62 +.word32 0xBF05A02C +.word32 0xBF05F5E2 +.word32 0xBF064B82 +.word32 0xBF06A10E +.word32 0xBF06F686 +.word32 0xBF074BE8 +.word32 0xBF07A136 +.word32 0xBF07F66F +.word32 0xBF084B92 +.word32 0xBF08A0A1 +.word32 0xBF08F59B +.word32 0xBF094A7F +.word32 0xBF099F4E +.word32 0xBF09F409 +.word32 0xBF0A48AD +.word32 0xBF0A9D3D +.word32 0xBF0AF1B7 +.word32 0xBF0B461C +.word32 0xBF0B9A6B +.word32 0xBF0BEEA5 +.word32 0xBF0C42C9 +.word32 0xBF0C96D7 +.word32 0xBF0CEAD0 +.word32 0xBF0D3EB3 +.word32 0xBF0D9281 +.word32 0xBF0DE638 +.word32 0xBF0E39DA +.word32 0xBF0E8D65 +.word32 0xBF0EE0DB +.word32 0xBF0F343B +.word32 0xBF0F8784 +.word32 0xBF0FDAB8 +.word32 0xBF102DD5 +.word32 0xBF1080DC +.word32 0xBF10D3CD +.word32 0xBF1126A7 +.word32 0xBF11796B +.word32 0xBF11CC19 +.word32 0xBF121EB0 +.word32 0xBF127130 +.word32 0xBF12C39A +.word32 0xBF1315EE +.word32 0xBF13682A +.word32 0xBF13BA50 +.word32 0xBF140C5F +.word32 0xBF145E58 +.word32 0xBF14B039 +.word32 0xBF150204 +.word32 0xBF1553B7 +.word32 0xBF15A554 +.word32 0xBF15F6D9 +.word32 0xBF164847 +.word32 0xBF16999F +.word32 0xBF16EADE +.word32 0xBF173C07 +.word32 0xBF178D18 +.word32 0xBF17DE12 +.word32 0xBF182EF5 +.word32 0xBF187FC0 +.word32 0xBF18D073 +.word32 0xBF19210F +.word32 0xBF197194 +.word32 0xBF19C200 +.word32 0xBF1A1255 +.word32 0xBF1A6293 +.word32 0xBF1AB2B8 +.word32 0xBF1B02C6 +.word32 0xBF1B52BB +.word32 0xBF1BA299 +.word32 0xBF1BF25F +.word32 0xBF1C420C +.word32 0xBF1C91A2 +.word32 0xBF1CE11F +.word32 0xBF1D3084 +.word32 0xBF1D7FD1 +.word32 0xBF1DCF06 +.word32 0xBF1E1E22 +.word32 0xBF1E6D26 +.word32 0xBF1EBC12 +.word32 0xBF1F0AE5 +.word32 0xBF1F599F +.word32 0xBF1FA841 +.word32 0xBF1FF6CB +.word32 0xBF20453B +.word32 0xBF209393 +.word32 0xBF20E1D2 +.word32 0xBF212FF9 +.word32 0xBF217E06 +.word32 0xBF21CBFB +.word32 0xBF2219D7 +.word32 0xBF226799 +.word32 0xBF22B543 +.word32 0xBF2302D3 +.word32 0xBF23504B +.word32 0xBF239DA9 +.word32 0xBF23EAEE +.word32 0xBF24381A +.word32 0xBF24852C +.word32 0xBF24D225 +.word32 0xBF251F04 +.word32 0xBF256BCB +.word32 0xBF25B877 +.word32 0xBF26050A +.word32 0xBF265184 +.word32 0xBF269DE3 +.word32 0xBF26EA2A +.word32 0xBF273656 +.word32 0xBF278268 +.word32 0xBF27CE61 +.word32 0xBF281A40 +.word32 0xBF286605 +.word32 0xBF28B1B0 +.word32 0xBF28FD41 +.word32 0xBF2948B8 +.word32 0xBF299415 +.word32 0xBF29DF57 +.word32 0xBF2A2A80 +.word32 0xBF2A758E +.word32 0xBF2AC082 +.word32 0xBF2B0B5B +.word32 0xBF2B561B +.word32 0xBF2BA0BF +.word32 0xBF2BEB4A +.word32 0xBF2C35B9 +.word32 0xBF2C800F +.word32 0xBF2CCA49 +.word32 0xBF2D1469 +.word32 0xBF2D5E6F +.word32 0xBF2DA859 +.word32 0xBF2DF229 +.word32 0xBF2E3BDE +.word32 0xBF2E8578 +.word32 0xBF2ECEF7 +.word32 0xBF2F185B +.word32 0xBF2F61A5 +.word32 0xBF2FAAD3 +.word32 0xBF2FF3E6 +.word32 0xBF303CDE +.word32 0xBF3085BB +.word32 0xBF30CE7C +.word32 0xBF311722 +.word32 0xBF315FAD +.word32 0xBF31A81D +.word32 0xBF31F071 +.word32 0xBF3238AA +.word32 0xBF3280C7 +.word32 0xBF32C8C9 +.word32 0xBF3310AF +.word32 0xBF33587A +.word32 0xBF33A029 +.word32 0xBF33E7BC +.word32 0xBF342F34 +.word32 0xBF34768F +.word32 0xBF34BDCF +.word32 0xBF3504F3 +.word32 0xBF354BFB +.word32 0xBF3592E7 +.word32 0xBF35D9B8 +.word32 0xBF36206C +.word32 0xBF366704 +.word32 0xBF36AD7F +.word32 0xBF36F3DF +.word32 0xBF373A23 +.word32 0xBF37804A +.word32 0xBF37C655 +.word32 0xBF380C43 +.word32 0xBF385216 +.word32 0xBF3897CB +.word32 0xBF38DD65 +.word32 0xBF3922E1 +.word32 0xBF396842 +.word32 0xBF39AD85 +.word32 0xBF39F2AC +.word32 0xBF3A37B7 +.word32 0xBF3A7CA4 +.word32 0xBF3AC175 +.word32 0xBF3B0629 +.word32 0xBF3B4AC1 +.word32 0xBF3B8F3B +.word32 0xBF3BD398 +.word32 0xBF3C17D9 +.word32 0xBF3C5BFC +.word32 0xBF3CA003 +.word32 0xBF3CE3EC +.word32 0xBF3D27B8 +.word32 0xBF3D6B67 +.word32 0xBF3DAEF9 +.word32 0xBF3DF26E +.word32 0xBF3E35C5 +.word32 0xBF3E78FF +.word32 0xBF3EBC1B +.word32 0xBF3EFF1B +.word32 0xBF3F41FC +.word32 0xBF3F84C0 +.word32 0xBF3FC767 +.word32 0xBF4009F0 +.word32 0xBF404C5C +.word32 0xBF408EA9 +.word32 0xBF40D0DA +.word32 0xBF4112EC +.word32 0xBF4154E1 +.word32 0xBF4196B7 +.word32 0xBF41D870 +.word32 0xBF421A0B +.word32 0xBF425B89 +.word32 0xBF429CE8 +.word32 0xBF42DE29 +.word32 0xBF431F4C +.word32 0xBF436051 +.word32 0xBF43A138 +.word32 0xBF43E200 +.word32 0xBF4422AB +.word32 0xBF446337 +.word32 0xBF44A3A5 +.word32 0xBF44E3F5 +.word32 0xBF452426 +.word32 0xBF456439 +.word32 0xBF45A42D +.word32 0xBF45E403 +.word32 0xBF4623BB +.word32 0xBF466354 +.word32 0xBF46A2CE +.word32 0xBF46E22A +.word32 0xBF472167 +.word32 0xBF476085 +.word32 0xBF479F84 +.word32 0xBF47DE65 +.word32 0xBF481D27 +.word32 0xBF485BCA +.word32 0xBF489A4E +.word32 0xBF48D8B3 +.word32 0xBF4916FA +.word32 0xBF495521 +.word32 0xBF499329 +.word32 0xBF49D112 +.word32 0xBF4A0EDC +.word32 0xBF4A4C87 +.word32 0xBF4A8A13 +.word32 0xBF4AC77F +.word32 0xBF4B04CC +.word32 0xBF4B41FA +.word32 0xBF4B7F09 +.word32 0xBF4BBBF8 +.word32 0xBF4BF8C7 +.word32 0xBF4C3578 +.word32 0xBF4C7208 +.word32 0xBF4CAE79 +.word32 0xBF4CEACB +.word32 0xBF4D26FD +.word32 0xBF4D6310 +.word32 0xBF4D9F02 +.word32 0xBF4DDAD5 +.word32 0xBF4E1689 +.word32 0xBF4E521C +.word32 0xBF4E8D90 +.word32 0xBF4EC8E4 +.word32 0xBF4F0417 +.word32 0xBF4F3F2B +.word32 0xBF4F7A1F +.word32 0xBF4FB4F4 +.word32 0xBF4FEFA8 +.word32 0xBF502A3B +.word32 0xBF5064AF +.word32 0xBF509F03 +.word32 0xBF50D937 +.word32 0xBF51134A +.word32 0xBF514D3D +.word32 0xBF518710 +.word32 0xBF51C0C2 +.word32 0xBF51FA54 +.word32 0xBF5233C6 +.word32 0xBF526D18 +.word32 0xBF52A649 +.word32 0xBF52DF59 +.word32 0xBF531849 +.word32 0xBF535118 +.word32 0xBF5389C7 +.word32 0xBF53C255 +.word32 0xBF53FAC3 +.word32 0xBF54330F +.word32 0xBF546B3B +.word32 0xBF54A347 +.word32 0xBF54DB31 +.word32 0xBF5512FB +.word32 0xBF554AA4 +.word32 0xBF55822C +.word32 0xBF55B993 +.word32 0xBF55F0D9 +.word32 0xBF5627FE +.word32 0xBF565F02 +.word32 0xBF5695E5 +.word32 0xBF56CCA7 +.word32 0xBF570348 +.word32 0xBF5739C7 +.word32 0xBF577026 +.word32 0xBF57A663 +.word32 0xBF57DC7F +.word32 0xBF581279 +.word32 0xBF584853 +.word32 0xBF587E0B +.word32 0xBF58B3A1 +.word32 0xBF58E916 +.word32 0xBF591E6A +.word32 0xBF59539C +.word32 0xBF5988AD +.word32 0xBF59BD9C +.word32 0xBF59F26A +.word32 0xBF5A2716 +.word32 0xBF5A5BA0 +.word32 0xBF5A9009 +.word32 0xBF5AC450 +.word32 0xBF5AF875 +.word32 0xBF5B2C79 +.word32 0xBF5B605A +.word32 0xBF5B941A +.word32 0xBF5BC7B8 +.word32 0xBF5BFB34 +.word32 0xBF5C2E8E +.word32 0xBF5C61C7 +.word32 0xBF5C94DD +.word32 0xBF5CC7D1 +.word32 0xBF5CFAA3 +.word32 0xBF5D2D53 +.word32 0xBF5D5FE1 +.word32 0xBF5D924D +.word32 0xBF5DC497 +.word32 0xBF5DF6BE +.word32 0xBF5E28C3 +.word32 0xBF5E5AA6 +.word32 0xBF5E8C67 +.word32 0xBF5EBE05 +.word32 0xBF5EEF81 +.word32 0xBF5F20DB +.word32 0xBF5F5212 +.word32 0xBF5F8327 +.word32 0xBF5FB419 +.word32 0xBF5FE4E9 +.word32 0xBF601596 +.word32 0xBF604621 +.word32 0xBF607689 +.word32 0xBF60A6CF +.word32 0xBF60D6F2 +.word32 0xBF6106F2 +.word32 0xBF6136D0 +.word32 0xBF61668A +.word32 0xBF619622 +.word32 0xBF61C598 +.word32 0xBF61F4EA +.word32 0xBF62241A +.word32 0xBF625326 +.word32 0xBF628210 +.word32 0xBF62B0D7 +.word32 0xBF62DF7B +.word32 0xBF630DFC +.word32 0xBF633C5A +.word32 0xBF636A95 +.word32 0xBF6398AC +.word32 0xBF63C6A1 +.word32 0xBF63F473 +.word32 0xBF642221 +.word32 0xBF644FAC +.word32 0xBF647D14 +.word32 0xBF64AA59 +.word32 0xBF64D77B +.word32 0xBF650479 +.word32 0xBF653154 +.word32 0xBF655E0B +.word32 0xBF658AA0 +.word32 0xBF65B710 +.word32 0xBF65E35E +.word32 0xBF660F88 +.word32 0xBF663B8E +.word32 0xBF666771 +.word32 0xBF669330 +.word32 0xBF66BECC +.word32 0xBF66EA45 +.word32 0xBF671599 +.word32 0xBF6740CA +.word32 0xBF676BD8 +.word32 0xBF6796C1 +.word32 0xBF67C187 +.word32 0xBF67EC29 +.word32 0xBF6816A8 +.word32 0xBF684103 +.word32 0xBF686B39 +.word32 0xBF68954C +.word32 0xBF68BF3C +.word32 0xBF68E907 +.word32 0xBF6912AE +.word32 0xBF693C32 +.word32 0xBF696591 +.word32 0xBF698ECC +.word32 0xBF69B7E4 +.word32 0xBF69E0D7 +.word32 0xBF6A09A7 +.word32 0xBF6A3252 +.word32 0xBF6A5AD9 +.word32 0xBF6A833C +.word32 0xBF6AAB7B +.word32 0xBF6AD395 +.word32 0xBF6AFB8C +.word32 0xBF6B235E +.word32 0xBF6B4B0C +.word32 0xBF6B7295 +.word32 0xBF6B99FB +.word32 0xBF6BC13B +.word32 0xBF6BE858 +.word32 0xBF6C0F50 +.word32 0xBF6C3624 +.word32 0xBF6C5CD4 +.word32 0xBF6C835E +.word32 0xBF6CA9C5 +.word32 0xBF6CD007 +.word32 0xBF6CF624 +.word32 0xBF6D1C1D +.word32 0xBF6D41F2 +.word32 0xBF6D67A1 +.word32 0xBF6D8D2D +.word32 0xBF6DB293 +.word32 0xBF6DD7D5 +.word32 0xBF6DFCF2 +.word32 0xBF6E21EB +.word32 0xBF6E46BE +.word32 0xBF6E6B6D +.word32 0xBF6E8FF8 +.word32 0xBF6EB45D +.word32 0xBF6ED89E +.word32 0xBF6EFCBA +.word32 0xBF6F20B0 +.word32 0xBF6F4483 +.word32 0xBF6F6830 +.word32 0xBF6F8BB8 +.word32 0xBF6FAF1B +.word32 0xBF6FD25A +.word32 0xBF6FF573 +.word32 0xBF701867 +.word32 0xBF703B37 +.word32 0xBF705DE1 +.word32 0xBF708066 +.word32 0xBF70A2C6 +.word32 0xBF70C501 +.word32 0xBF70E717 +.word32 0xBF710908 +.word32 0xBF712AD4 +.word32 0xBF714C7A +.word32 0xBF716DFB +.word32 0xBF718F57 +.word32 0xBF71B08E +.word32 0xBF71D19F +.word32 0xBF71F28C +.word32 0xBF721352 +.word32 0xBF7233F4 +.word32 0xBF725470 +.word32 0xBF7274C7 +.word32 0xBF7294F8 +.word32 0xBF72B504 +.word32 0xBF72D4EB +.word32 0xBF72F4AC +.word32 0xBF731447 +.word32 0xBF7333BE +.word32 0xBF73530E +.word32 0xBF737239 +.word32 0xBF73913F +.word32 0xBF73B01F +.word32 0xBF73CED9 +.word32 0xBF73ED6E +.word32 0xBF740BDD +.word32 0xBF742A27 +.word32 0xBF74484B +.word32 0xBF746649 +.word32 0xBF748422 +.word32 0xBF74A1D5 +.word32 0xBF74BF62 +.word32 0xBF74DCC9 +.word32 0xBF74FA0B +.word32 0xBF751727 +.word32 0xBF75341D +.word32 0xBF7550ED +.word32 0xBF756D97 +.word32 0xBF758A1C +.word32 0xBF75A67B +.word32 0xBF75C2B3 +.word32 0xBF75DEC6 +.word32 0xBF75FAB3 +.word32 0xBF76167A +.word32 0xBF76321B +.word32 0xBF764D97 +.word32 0xBF7668EC +.word32 0xBF76841B +.word32 0xBF769F24 +.word32 0xBF76BA07 +.word32 0xBF76D4C4 +.word32 0xBF76EF5B +.word32 0xBF7709CC +.word32 0xBF772417 +.word32 0xBF773E3C +.word32 0xBF77583A +.word32 0xBF777213 +.word32 0xBF778BC5 +.word32 0xBF77A551 +.word32 0xBF77BEB7 +.word32 0xBF77D7F7 +.word32 0xBF77F110 +.word32 0xBF780A04 +.word32 0xBF7822D1 +.word32 0xBF783B77 +.word32 0xBF7853F8 +.word32 0xBF786C52 +.word32 0xBF788486 +.word32 0xBF789C93 +.word32 0xBF78B47B +.word32 0xBF78CC3B +.word32 0xBF78E3D6 +.word32 0xBF78FB4A +.word32 0xBF791298 +.word32 0xBF7929BF +.word32 0xBF7940C0 +.word32 0xBF79579A +.word32 0xBF796E4E +.word32 0xBF7984DC +.word32 0xBF799B43 +.word32 0xBF79B183 +.word32 0xBF79C79D +.word32 0xBF79DD91 +.word32 0xBF79F35E +.word32 0xBF7A0904 +.word32 0xBF7A1E84 +.word32 0xBF7A33DD +.word32 0xBF7A4910 +.word32 0xBF7A5E1C +.word32 0xBF7A7302 +.word32 0xBF7A87C1 +.word32 0xBF7A9C59 +.word32 0xBF7AB0CB +.word32 0xBF7AC516 +.word32 0xBF7AD93A +.word32 0xBF7AED37 +.word32 0xBF7B010E +.word32 0xBF7B14BE +.word32 0xBF7B2848 +.word32 0xBF7B3BAB +.word32 0xBF7B4EE7 +.word32 0xBF7B61FC +.word32 0xBF7B74EA +.word32 0xBF7B87B2 +.word32 0xBF7B9A53 +.word32 0xBF7BACCD +.word32 0xBF7BBF20 +.word32 0xBF7BD14D +.word32 0xBF7BE353 +.word32 0xBF7BF531 +.word32 0xBF7C06E9 +.word32 0xBF7C187A +.word32 0xBF7C29E5 +.word32 0xBF7C3B28 +.word32 0xBF7C4C44 +.word32 0xBF7C5D3A +.word32 0xBF7C6E08 +.word32 0xBF7C7EB0 +.word32 0xBF7C8F31 +.word32 0xBF7C9F8A +.word32 0xBF7CAFBD +.word32 0xBF7CBFC9 +.word32 0xBF7CCFAE +.word32 0xBF7CDF6C +.word32 0xBF7CEF03 +.word32 0xBF7CFE73 +.word32 0xBF7D0DBC +.word32 0xBF7D1CDD +.word32 0xBF7D2BD8 +.word32 0xBF7D3AAC +.word32 0xBF7D4959 +.word32 0xBF7D57DE +.word32 0xBF7D663D +.word32 0xBF7D7474 +.word32 0xBF7D8285 +.word32 0xBF7D906E +.word32 0xBF7D9E30 +.word32 0xBF7DABCC +.word32 0xBF7DB940 +.word32 0xBF7DC68C +.word32 0xBF7DD3B2 +.word32 0xBF7DE0B1 +.word32 0xBF7DED88 +.word32 0xBF7DFA38 +.word32 0xBF7E06C2 +.word32 0xBF7E1324 +.word32 0xBF7E1F5E +.word32 0xBF7E2B72 +.word32 0xBF7E375E +.word32 0xBF7E4323 +.word32 0xBF7E4EC1 +.word32 0xBF7E5A38 +.word32 0xBF7E6588 +.word32 0xBF7E70B0 +.word32 0xBF7E7BB1 +.word32 0xBF7E868B +.word32 0xBF7E913D +.word32 0xBF7E9BC9 +.word32 0xBF7EA62D +.word32 0xBF7EB069 +.word32 0xBF7EBA7F +.word32 0xBF7EC46D +.word32 0xBF7ECE34 +.word32 0xBF7ED7D4 +.word32 0xBF7EE14C +.word32 0xBF7EEA9D +.word32 0xBF7EF3C7 +.word32 0xBF7EFCC9 +.word32 0xBF7F05A4 +.word32 0xBF7F0E58 +.word32 0xBF7F16E4 +.word32 0xBF7F1F49 +.word32 0xBF7F2787 +.word32 0xBF7F2F9D +.word32 0xBF7F378C +.word32 0xBF7F3F54 +.word32 0xBF7F46F4 +.word32 0xBF7F4E6D +.word32 0xBF7F55BF +.word32 0xBF7F5CE9 +.word32 0xBF7F63EC +.word32 0xBF7F6AC7 +.word32 0xBF7F717B +.word32 0xBF7F7808 +.word32 0xBF7F7E6D +.word32 0xBF7F84AB +.word32 0xBF7F8AC2 +.word32 0xBF7F90B1 +.word32 0xBF7F9678 +.word32 0xBF7F9C18 +.word32 0xBF7FA191 +.word32 0xBF7FA6E3 +.word32 0xBF7FAC0D +.word32 0xBF7FB10F +.word32 0xBF7FB5EA +.word32 0xBF7FBA9E +.word32 0xBF7FBF2A +.word32 0xBF7FC38F +.word32 0xBF7FC7CC +.word32 0xBF7FCBE2 +.word32 0xBF7FCFD1 +.word32 0xBF7FD397 +.word32 0xBF7FD737 +.word32 0xBF7FDAAF +.word32 0xBF7FDE00 +.word32 0xBF7FE129 +.word32 0xBF7FE42B +.word32 0xBF7FE705 +.word32 0xBF7FE9B8 +.word32 0xBF7FEC43 +.word32 0xBF7FEEA7 +.word32 0xBF7FF0E3 +.word32 0xBF7FF2F8 +.word32 0xBF7FF4E6 +.word32 0xBF7FF6AC +.word32 0xBF7FF84A +.word32 0xBF7FF9C1 +.word32 0xBF7FFB11 +.word32 0xBF7FFC39 +.word32 0xBF7FFD39 +.word32 0xBF7FFE13 +.word32 0xBF7FFEC4 +.word32 0xBF7FFF4E +.word32 0xBF7FFFB1 +.word32 0xBF7FFFEC +.word32 0xBF800000 +.word32 0xBF7FFFEC +.word32 0xBF7FFFB1 +.word32 0xBF7FFF4E +.word32 0xBF7FFEC4 +.word32 0xBF7FFE13 +.word32 0xBF7FFD39 +.word32 0xBF7FFC39 +.word32 0xBF7FFB11 +.word32 0xBF7FF9C1 +.word32 0xBF7FF84A +.word32 0xBF7FF6AC +.word32 0xBF7FF4E6 +.word32 0xBF7FF2F8 +.word32 0xBF7FF0E3 +.word32 0xBF7FEEA7 +.word32 0xBF7FEC43 +.word32 0xBF7FE9B8 +.word32 0xBF7FE705 +.word32 0xBF7FE42B +.word32 0xBF7FE129 +.word32 0xBF7FDE00 +.word32 0xBF7FDAAF +.word32 0xBF7FD737 +.word32 0xBF7FD397 +.word32 0xBF7FCFD1 +.word32 0xBF7FCBE2 +.word32 0xBF7FC7CC +.word32 0xBF7FC38F +.word32 0xBF7FBF2A +.word32 0xBF7FBA9E +.word32 0xBF7FB5EA +.word32 0xBF7FB10F +.word32 0xBF7FAC0D +.word32 0xBF7FA6E3 +.word32 0xBF7FA191 +.word32 0xBF7F9C18 +.word32 0xBF7F9678 +.word32 0xBF7F90B1 +.word32 0xBF7F8AC2 +.word32 0xBF7F84AB +.word32 0xBF7F7E6D +.word32 0xBF7F7808 +.word32 0xBF7F717B +.word32 0xBF7F6AC7 +.word32 0xBF7F63EC +.word32 0xBF7F5CE9 +.word32 0xBF7F55BF +.word32 0xBF7F4E6D +.word32 0xBF7F46F4 +.word32 0xBF7F3F54 +.word32 0xBF7F378C +.word32 0xBF7F2F9D +.word32 0xBF7F2787 +.word32 0xBF7F1F49 +.word32 0xBF7F16E4 +.word32 0xBF7F0E58 +.word32 0xBF7F05A4 +.word32 0xBF7EFCC9 +.word32 0xBF7EF3C7 +.word32 0xBF7EEA9D +.word32 0xBF7EE14C +.word32 0xBF7ED7D4 +.word32 0xBF7ECE34 +.word32 0xBF7EC46D +.word32 0xBF7EBA7F +.word32 0xBF7EB069 +.word32 0xBF7EA62D +.word32 0xBF7E9BC9 +.word32 0xBF7E913D +.word32 0xBF7E868B +.word32 0xBF7E7BB1 +.word32 0xBF7E70B0 +.word32 0xBF7E6588 +.word32 0xBF7E5A38 +.word32 0xBF7E4EC1 +.word32 0xBF7E4323 +.word32 0xBF7E375E +.word32 0xBF7E2B72 +.word32 0xBF7E1F5E +.word32 0xBF7E1324 +.word32 0xBF7E06C2 +.word32 0xBF7DFA38 +.word32 0xBF7DED88 +.word32 0xBF7DE0B1 +.word32 0xBF7DD3B2 +.word32 0xBF7DC68C +.word32 0xBF7DB940 +.word32 0xBF7DABCC +.word32 0xBF7D9E30 +.word32 0xBF7D906E +.word32 0xBF7D8285 +.word32 0xBF7D7474 +.word32 0xBF7D663D +.word32 0xBF7D57DE +.word32 0xBF7D4959 +.word32 0xBF7D3AAC +.word32 0xBF7D2BD8 +.word32 0xBF7D1CDD +.word32 0xBF7D0DBC +.word32 0xBF7CFE73 +.word32 0xBF7CEF03 +.word32 0xBF7CDF6C +.word32 0xBF7CCFAE +.word32 0xBF7CBFC9 +.word32 0xBF7CAFBD +.word32 0xBF7C9F8A +.word32 0xBF7C8F31 +.word32 0xBF7C7EB0 +.word32 0xBF7C6E08 +.word32 0xBF7C5D3A +.word32 0xBF7C4C44 +.word32 0xBF7C3B28 +.word32 0xBF7C29E5 +.word32 0xBF7C187A +.word32 0xBF7C06E9 +.word32 0xBF7BF531 +.word32 0xBF7BE353 +.word32 0xBF7BD14D +.word32 0xBF7BBF20 +.word32 0xBF7BACCD +.word32 0xBF7B9A53 +.word32 0xBF7B87B2 +.word32 0xBF7B74EA +.word32 0xBF7B61FC +.word32 0xBF7B4EE7 +.word32 0xBF7B3BAB +.word32 0xBF7B2848 +.word32 0xBF7B14BE +.word32 0xBF7B010E +.word32 0xBF7AED37 +.word32 0xBF7AD93A +.word32 0xBF7AC516 +.word32 0xBF7AB0CB +.word32 0xBF7A9C59 +.word32 0xBF7A87C1 +.word32 0xBF7A7302 +.word32 0xBF7A5E1C +.word32 0xBF7A4910 +.word32 0xBF7A33DD +.word32 0xBF7A1E84 +.word32 0xBF7A0904 +.word32 0xBF79F35E +.word32 0xBF79DD91 +.word32 0xBF79C79D +.word32 0xBF79B183 +.word32 0xBF799B43 +.word32 0xBF7984DC +.word32 0xBF796E4E +.word32 0xBF79579A +.word32 0xBF7940C0 +.word32 0xBF7929BF +.word32 0xBF791298 +.word32 0xBF78FB4A +.word32 0xBF78E3D6 +.word32 0xBF78CC3B +.word32 0xBF78B47B +.word32 0xBF789C93 +.word32 0xBF788486 +.word32 0xBF786C52 +.word32 0xBF7853F8 +.word32 0xBF783B77 +.word32 0xBF7822D1 +.word32 0xBF780A04 +.word32 0xBF77F110 +.word32 0xBF77D7F7 +.word32 0xBF77BEB7 +.word32 0xBF77A551 +.word32 0xBF778BC5 +.word32 0xBF777213 +.word32 0xBF77583A +.word32 0xBF773E3C +.word32 0xBF772417 +.word32 0xBF7709CC +.word32 0xBF76EF5B +.word32 0xBF76D4C4 +.word32 0xBF76BA07 +.word32 0xBF769F24 +.word32 0xBF76841B +.word32 0xBF7668EC +.word32 0xBF764D97 +.word32 0xBF76321B +.word32 0xBF76167A +.word32 0xBF75FAB3 +.word32 0xBF75DEC6 +.word32 0xBF75C2B3 +.word32 0xBF75A67B +.word32 0xBF758A1C +.word32 0xBF756D97 +.word32 0xBF7550ED +.word32 0xBF75341D +.word32 0xBF751727 +.word32 0xBF74FA0B +.word32 0xBF74DCC9 +.word32 0xBF74BF62 +.word32 0xBF74A1D5 +.word32 0xBF748422 +.word32 0xBF746649 +.word32 0xBF74484B +.word32 0xBF742A27 +.word32 0xBF740BDD +.word32 0xBF73ED6E +.word32 0xBF73CED9 +.word32 0xBF73B01F +.word32 0xBF73913F +.word32 0xBF737239 +.word32 0xBF73530E +.word32 0xBF7333BE +.word32 0xBF731447 +.word32 0xBF72F4AC +.word32 0xBF72D4EB +.word32 0xBF72B504 +.word32 0xBF7294F8 +.word32 0xBF7274C7 +.word32 0xBF725470 +.word32 0xBF7233F4 +.word32 0xBF721352 +.word32 0xBF71F28C +.word32 0xBF71D19F +.word32 0xBF71B08E +.word32 0xBF718F57 +.word32 0xBF716DFB +.word32 0xBF714C7A +.word32 0xBF712AD4 +.word32 0xBF710908 +.word32 0xBF70E717 +.word32 0xBF70C501 +.word32 0xBF70A2C6 +.word32 0xBF708066 +.word32 0xBF705DE1 +.word32 0xBF703B37 +.word32 0xBF701867 +.word32 0xBF6FF573 +.word32 0xBF6FD25A +.word32 0xBF6FAF1B +.word32 0xBF6F8BB8 +.word32 0xBF6F6830 +.word32 0xBF6F4483 +.word32 0xBF6F20B0 +.word32 0xBF6EFCBA +.word32 0xBF6ED89E +.word32 0xBF6EB45D +.word32 0xBF6E8FF8 +.word32 0xBF6E6B6D +.word32 0xBF6E46BE +.word32 0xBF6E21EB +.word32 0xBF6DFCF2 +.word32 0xBF6DD7D5 +.word32 0xBF6DB293 +.word32 0xBF6D8D2D +.word32 0xBF6D67A1 +.word32 0xBF6D41F2 +.word32 0xBF6D1C1D +.word32 0xBF6CF624 +.word32 0xBF6CD007 +.word32 0xBF6CA9C5 +.word32 0xBF6C835E +.word32 0xBF6C5CD4 +.word32 0xBF6C3624 +.word32 0xBF6C0F50 +.word32 0xBF6BE858 +.word32 0xBF6BC13B +.word32 0xBF6B99FB +.word32 0xBF6B7295 +.word32 0xBF6B4B0C +.word32 0xBF6B235E +.word32 0xBF6AFB8C +.word32 0xBF6AD395 +.word32 0xBF6AAB7B +.word32 0xBF6A833C +.word32 0xBF6A5AD9 +.word32 0xBF6A3252 +.word32 0xBF6A09A7 +.word32 0xBF69E0D7 +.word32 0xBF69B7E4 +.word32 0xBF698ECC +.word32 0xBF696591 +.word32 0xBF693C32 +.word32 0xBF6912AE +.word32 0xBF68E907 +.word32 0xBF68BF3C +.word32 0xBF68954C +.word32 0xBF686B39 +.word32 0xBF684103 +.word32 0xBF6816A8 +.word32 0xBF67EC29 +.word32 0xBF67C187 +.word32 0xBF6796C1 +.word32 0xBF676BD8 +.word32 0xBF6740CA +.word32 0xBF671599 +.word32 0xBF66EA45 +.word32 0xBF66BECC +.word32 0xBF669330 +.word32 0xBF666771 +.word32 0xBF663B8E +.word32 0xBF660F88 +.word32 0xBF65E35E +.word32 0xBF65B710 +.word32 0xBF658AA0 +.word32 0xBF655E0B +.word32 0xBF653154 +.word32 0xBF650479 +.word32 0xBF64D77B +.word32 0xBF64AA59 +.word32 0xBF647D14 +.word32 0xBF644FAC +.word32 0xBF642221 +.word32 0xBF63F473 +.word32 0xBF63C6A1 +.word32 0xBF6398AC +.word32 0xBF636A95 +.word32 0xBF633C5A +.word32 0xBF630DFC +.word32 0xBF62DF7B +.word32 0xBF62B0D7 +.word32 0xBF628210 +.word32 0xBF625326 +.word32 0xBF62241A +.word32 0xBF61F4EA +.word32 0xBF61C598 +.word32 0xBF619622 +.word32 0xBF61668A +.word32 0xBF6136D0 +.word32 0xBF6106F2 +.word32 0xBF60D6F2 +.word32 0xBF60A6CF +.word32 0xBF607689 +.word32 0xBF604621 +.word32 0xBF601596 +.word32 0xBF5FE4E9 +.word32 0xBF5FB419 +.word32 0xBF5F8327 +.word32 0xBF5F5212 +.word32 0xBF5F20DB +.word32 0xBF5EEF81 +.word32 0xBF5EBE05 +.word32 0xBF5E8C67 +.word32 0xBF5E5AA6 +.word32 0xBF5E28C3 +.word32 0xBF5DF6BE +.word32 0xBF5DC497 +.word32 0xBF5D924D +.word32 0xBF5D5FE1 +.word32 0xBF5D2D53 +.word32 0xBF5CFAA3 +.word32 0xBF5CC7D1 +.word32 0xBF5C94DD +.word32 0xBF5C61C7 +.word32 0xBF5C2E8E +.word32 0xBF5BFB34 +.word32 0xBF5BC7B8 +.word32 0xBF5B941A +.word32 0xBF5B605A +.word32 0xBF5B2C79 +.word32 0xBF5AF875 +.word32 0xBF5AC450 +.word32 0xBF5A9009 +.word32 0xBF5A5BA0 +.word32 0xBF5A2716 +.word32 0xBF59F26A +.word32 0xBF59BD9C +.word32 0xBF5988AD +.word32 0xBF59539C +.word32 0xBF591E6A +.word32 0xBF58E916 +.word32 0xBF58B3A1 +.word32 0xBF587E0B +.word32 0xBF584853 +.word32 0xBF581279 +.word32 0xBF57DC7F +.word32 0xBF57A663 +.word32 0xBF577026 +.word32 0xBF5739C7 +.word32 0xBF570348 +.word32 0xBF56CCA7 +.word32 0xBF5695E5 +.word32 0xBF565F02 +.word32 0xBF5627FE +.word32 0xBF55F0D9 +.word32 0xBF55B993 +.word32 0xBF55822C +.word32 0xBF554AA4 +.word32 0xBF5512FB +.word32 0xBF54DB31 +.word32 0xBF54A347 +.word32 0xBF546B3B +.word32 0xBF54330F +.word32 0xBF53FAC3 +.word32 0xBF53C255 +.word32 0xBF5389C7 +.word32 0xBF535118 +.word32 0xBF531849 +.word32 0xBF52DF59 +.word32 0xBF52A649 +.word32 0xBF526D18 +.word32 0xBF5233C6 +.word32 0xBF51FA54 +.word32 0xBF51C0C2 +.word32 0xBF518710 +.word32 0xBF514D3D +.word32 0xBF51134A +.word32 0xBF50D937 +.word32 0xBF509F03 +.word32 0xBF5064AF +.word32 0xBF502A3B +.word32 0xBF4FEFA8 +.word32 0xBF4FB4F4 +.word32 0xBF4F7A1F +.word32 0xBF4F3F2B +.word32 0xBF4F0417 +.word32 0xBF4EC8E4 +.word32 0xBF4E8D90 +.word32 0xBF4E521C +.word32 0xBF4E1689 +.word32 0xBF4DDAD5 +.word32 0xBF4D9F02 +.word32 0xBF4D6310 +.word32 0xBF4D26FD +.word32 0xBF4CEACB +.word32 0xBF4CAE79 +.word32 0xBF4C7208 +.word32 0xBF4C3578 +.word32 0xBF4BF8C7 +.word32 0xBF4BBBF8 +.word32 0xBF4B7F09 +.word32 0xBF4B41FA +.word32 0xBF4B04CC +.word32 0xBF4AC77F +.word32 0xBF4A8A13 +.word32 0xBF4A4C87 +.word32 0xBF4A0EDC +.word32 0xBF49D112 +.word32 0xBF499329 +.word32 0xBF495521 +.word32 0xBF4916FA +.word32 0xBF48D8B3 +.word32 0xBF489A4E +.word32 0xBF485BCA +.word32 0xBF481D27 +.word32 0xBF47DE65 +.word32 0xBF479F84 +.word32 0xBF476085 +.word32 0xBF472167 +.word32 0xBF46E22A +.word32 0xBF46A2CE +.word32 0xBF466354 +.word32 0xBF4623BB +.word32 0xBF45E403 +.word32 0xBF45A42D +.word32 0xBF456439 +.word32 0xBF452426 +.word32 0xBF44E3F5 +.word32 0xBF44A3A5 +.word32 0xBF446337 +.word32 0xBF4422AB +.word32 0xBF43E200 +.word32 0xBF43A138 +.word32 0xBF436051 +.word32 0xBF431F4C +.word32 0xBF42DE29 +.word32 0xBF429CE8 +.word32 0xBF425B89 +.word32 0xBF421A0B +.word32 0xBF41D870 +.word32 0xBF4196B7 +.word32 0xBF4154E1 +.word32 0xBF4112EC +.word32 0xBF40D0DA +.word32 0xBF408EA9 +.word32 0xBF404C5C +.word32 0xBF4009F0 +.word32 0xBF3FC767 +.word32 0xBF3F84C0 +.word32 0xBF3F41FC +.word32 0xBF3EFF1B +.word32 0xBF3EBC1B +.word32 0xBF3E78FF +.word32 0xBF3E35C5 +.word32 0xBF3DF26E +.word32 0xBF3DAEF9 +.word32 0xBF3D6B67 +.word32 0xBF3D27B8 +.word32 0xBF3CE3EC +.word32 0xBF3CA003 +.word32 0xBF3C5BFC +.word32 0xBF3C17D9 +.word32 0xBF3BD398 +.word32 0xBF3B8F3B +.word32 0xBF3B4AC1 +.word32 0xBF3B0629 +.word32 0xBF3AC175 +.word32 0xBF3A7CA4 +.word32 0xBF3A37B7 +.word32 0xBF39F2AC +.word32 0xBF39AD85 +.word32 0xBF396842 +.word32 0xBF3922E1 +.word32 0xBF38DD65 +.word32 0xBF3897CB +.word32 0xBF385216 +.word32 0xBF380C43 +.word32 0xBF37C655 +.word32 0xBF37804A +.word32 0xBF373A23 +.word32 0xBF36F3DF +.word32 0xBF36AD7F +.word32 0xBF366704 +.word32 0xBF36206C +.word32 0xBF35D9B8 +.word32 0xBF3592E7 +.word32 0xBF354BFB +.word32 0xBF3504F3 +.word32 0xBF34BDCF +.word32 0xBF34768F +.word32 0xBF342F34 +.word32 0xBF33E7BC +.word32 0xBF33A029 +.word32 0xBF33587A +.word32 0xBF3310AF +.word32 0xBF32C8C9 +.word32 0xBF3280C7 +.word32 0xBF3238AA +.word32 0xBF31F071 +.word32 0xBF31A81D +.word32 0xBF315FAD +.word32 0xBF311722 +.word32 0xBF30CE7C +.word32 0xBF3085BB +.word32 0xBF303CDE +.word32 0xBF2FF3E6 +.word32 0xBF2FAAD3 +.word32 0xBF2F61A5 +.word32 0xBF2F185B +.word32 0xBF2ECEF7 +.word32 0xBF2E8578 +.word32 0xBF2E3BDE +.word32 0xBF2DF229 +.word32 0xBF2DA859 +.word32 0xBF2D5E6F +.word32 0xBF2D1469 +.word32 0xBF2CCA49 +.word32 0xBF2C800F +.word32 0xBF2C35B9 +.word32 0xBF2BEB4A +.word32 0xBF2BA0BF +.word32 0xBF2B561B +.word32 0xBF2B0B5B +.word32 0xBF2AC082 +.word32 0xBF2A758E +.word32 0xBF2A2A80 +.word32 0xBF29DF57 +.word32 0xBF299415 +.word32 0xBF2948B8 +.word32 0xBF28FD41 +.word32 0xBF28B1B0 +.word32 0xBF286605 +.word32 0xBF281A40 +.word32 0xBF27CE61 +.word32 0xBF278268 +.word32 0xBF273656 +.word32 0xBF26EA2A +.word32 0xBF269DE3 +.word32 0xBF265184 +.word32 0xBF26050A +.word32 0xBF25B877 +.word32 0xBF256BCB +.word32 0xBF251F04 +.word32 0xBF24D225 +.word32 0xBF24852C +.word32 0xBF24381A +.word32 0xBF23EAEE +.word32 0xBF239DA9 +.word32 0xBF23504B +.word32 0xBF2302D3 +.word32 0xBF22B543 +.word32 0xBF226799 +.word32 0xBF2219D7 +.word32 0xBF21CBFB +.word32 0xBF217E06 +.word32 0xBF212FF9 +.word32 0xBF20E1D2 +.word32 0xBF209393 +.word32 0xBF20453B +.word32 0xBF1FF6CB +.word32 0xBF1FA841 +.word32 0xBF1F599F +.word32 0xBF1F0AE5 +.word32 0xBF1EBC12 +.word32 0xBF1E6D26 +.word32 0xBF1E1E22 +.word32 0xBF1DCF06 +.word32 0xBF1D7FD1 +.word32 0xBF1D3084 +.word32 0xBF1CE11F +.word32 0xBF1C91A2 +.word32 0xBF1C420C +.word32 0xBF1BF25F +.word32 0xBF1BA299 +.word32 0xBF1B52BB +.word32 0xBF1B02C6 +.word32 0xBF1AB2B8 +.word32 0xBF1A6293 +.word32 0xBF1A1255 +.word32 0xBF19C200 +.word32 0xBF197194 +.word32 0xBF19210F +.word32 0xBF18D073 +.word32 0xBF187FC0 +.word32 0xBF182EF5 +.word32 0xBF17DE12 +.word32 0xBF178D18 +.word32 0xBF173C07 +.word32 0xBF16EADE +.word32 0xBF16999F +.word32 0xBF164847 +.word32 0xBF15F6D9 +.word32 0xBF15A554 +.word32 0xBF1553B7 +.word32 0xBF150204 +.word32 0xBF14B039 +.word32 0xBF145E58 +.word32 0xBF140C5F +.word32 0xBF13BA50 +.word32 0xBF13682A +.word32 0xBF1315EE +.word32 0xBF12C39A +.word32 0xBF127130 +.word32 0xBF121EB0 +.word32 0xBF11CC19 +.word32 0xBF11796B +.word32 0xBF1126A7 +.word32 0xBF10D3CD +.word32 0xBF1080DC +.word32 0xBF102DD5 +.word32 0xBF0FDAB8 +.word32 0xBF0F8784 +.word32 0xBF0F343B +.word32 0xBF0EE0DB +.word32 0xBF0E8D65 +.word32 0xBF0E39DA +.word32 0xBF0DE638 +.word32 0xBF0D9281 +.word32 0xBF0D3EB3 +.word32 0xBF0CEAD0 +.word32 0xBF0C96D7 +.word32 0xBF0C42C9 +.word32 0xBF0BEEA5 +.word32 0xBF0B9A6B +.word32 0xBF0B461C +.word32 0xBF0AF1B7 +.word32 0xBF0A9D3D +.word32 0xBF0A48AD +.word32 0xBF09F409 +.word32 0xBF099F4E +.word32 0xBF094A7F +.word32 0xBF08F59B +.word32 0xBF08A0A1 +.word32 0xBF084B92 +.word32 0xBF07F66F +.word32 0xBF07A136 +.word32 0xBF074BE8 +.word32 0xBF06F686 +.word32 0xBF06A10E +.word32 0xBF064B82 +.word32 0xBF05F5E2 +.word32 0xBF05A02C +.word32 0xBF054A62 +.word32 0xBF04F484 +.word32 0xBF049E91 +.word32 0xBF044889 +.word32 0xBF03F26D +.word32 0xBF039C3D +.word32 0xBF0345F8 +.word32 0xBF02EF9F +.word32 0xBF029932 +.word32 0xBF0242B1 +.word32 0xBF01EC1C +.word32 0xBF019573 +.word32 0xBF013EB5 +.word32 0xBF00E7E4 +.word32 0xBF0090FF +.word32 0xBF003A06 +.word32 0xBEFFC5F3 +.word32 0xBEFF17B2 +.word32 0xBEFE694A +.word32 0xBEFDBABB +.word32 0xBEFD0C04 +.word32 0xBEFC5D27 +.word32 0xBEFBAE22 +.word32 0xBEFAFEF7 +.word32 0xBEFA4FA5 +.word32 0xBEF9A02D +.word32 0xBEF8F08E +.word32 0xBEF840C8 +.word32 0xBEF790DC +.word32 0xBEF6E0CB +.word32 0xBEF63093 +.word32 0xBEF58035 +.word32 0xBEF4CFB1 +.word32 0xBEF41F07 +.word32 0xBEF36E38 +.word32 0xBEF2BD43 +.word32 0xBEF20C29 +.word32 0xBEF15AEA +.word32 0xBEF0A985 +.word32 0xBEEFF7FB +.word32 0xBEEF464C +.word32 0xBEEE9479 +.word32 0xBEEDE280 +.word32 0xBEED3063 +.word32 0xBEEC7E21 +.word32 0xBEEBCBBB +.word32 0xBEEB1930 +.word32 0xBEEA6681 +.word32 0xBEE9B3AE +.word32 0xBEE900B7 +.word32 0xBEE84D9C +.word32 0xBEE79A5D +.word32 0xBEE6E6FB +.word32 0xBEE63375 +.word32 0xBEE57FCB +.word32 0xBEE4CBFE +.word32 0xBEE4180E +.word32 0xBEE363FA +.word32 0xBEE2AFC4 +.word32 0xBEE1FB6A +.word32 0xBEE146EE +.word32 0xBEE0924F +.word32 0xBEDFDD8D +.word32 0xBEDF28A9 +.word32 0xBEDE73A2 +.word32 0xBEDDBE79 +.word32 0xBEDD092E +.word32 0xBEDC53C1 +.word32 0xBEDB9E31 +.word32 0xBEDAE880 +.word32 0xBEDA32AD +.word32 0xBED97CB9 +.word32 0xBED8C6A3 +.word32 0xBED8106B +.word32 0xBED75A13 +.word32 0xBED6A399 +.word32 0xBED5ECFD +.word32 0xBED53641 +.word32 0xBED47F64 +.word32 0xBED3C867 +.word32 0xBED31148 +.word32 0xBED25A09 +.word32 0xBED1A2AA +.word32 0xBED0EB2A +.word32 0xBED0338A +.word32 0xBECF7BCA +.word32 0xBECEC3EA +.word32 0xBECE0BEA +.word32 0xBECD53CA +.word32 0xBECC9B8B +.word32 0xBECBE32C +.word32 0xBECB2AAE +.word32 0xBECA7210 +.word32 0xBEC9B953 +.word32 0xBEC90077 +.word32 0xBEC8477C +.word32 0xBEC78E62 +.word32 0xBEC6D529 +.word32 0xBEC61BD2 +.word32 0xBEC5625C +.word32 0xBEC4A8C8 +.word32 0xBEC3EF15 +.word32 0xBEC33544 +.word32 0xBEC27B55 +.word32 0xBEC1C148 +.word32 0xBEC1071E +.word32 0xBEC04CD5 +.word32 0xBEBF926F +.word32 0xBEBED7EB +.word32 0xBEBE1D4A +.word32 0xBEBD628B +.word32 0xBEBCA7AF +.word32 0xBEBBECB6 +.word32 0xBEBB31A0 +.word32 0xBEBA766E +.word32 0xBEB9BB1E +.word32 0xBEB8FFB2 +.word32 0xBEB8442A +.word32 0xBEB78884 +.word32 0xBEB6CCC3 +.word32 0xBEB610E6 +.word32 0xBEB554EC +.word32 0xBEB498D6 +.word32 0xBEB3DCA5 +.word32 0xBEB32058 +.word32 0xBEB263EF +.word32 0xBEB1A76B +.word32 0xBEB0EACB +.word32 0xBEB02E10 +.word32 0xBEAF713A +.word32 0xBEAEB449 +.word32 0xBEADF73C +.word32 0xBEAD3A15 +.word32 0xBEAC7CD4 +.word32 0xBEABBF77 +.word32 0xBEAB0201 +.word32 0xBEAA446F +.word32 0xBEA986C4 +.word32 0xBEA8C8FE +.word32 0xBEA80B1F +.word32 0xBEA74D25 +.word32 0xBEA68F12 +.word32 0xBEA5D0E5 +.word32 0xBEA5129F +.word32 0xBEA4543F +.word32 0xBEA395C5 +.word32 0xBEA2D733 +.word32 0xBEA21887 +.word32 0xBEA159C2 +.word32 0xBEA09AE5 +.word32 0xBE9FDBEE +.word32 0xBE9F1CDF +.word32 0xBE9E5DB8 +.word32 0xBE9D9E78 +.word32 0xBE9CDF20 +.word32 0xBE9C1FAF +.word32 0xBE9B6027 +.word32 0xBE9AA086 +.word32 0xBE99E0CE +.word32 0xBE9920FE +.word32 0xBE986116 +.word32 0xBE97A117 +.word32 0xBE96E100 +.word32 0xBE9620D2 +.word32 0xBE95608D +.word32 0xBE94A031 +.word32 0xBE93DFBF +.word32 0xBE931F35 +.word32 0xBE925E94 +.word32 0xBE919DDD +.word32 0xBE90DD10 +.word32 0xBE901C2C +.word32 0xBE8F5B32 +.word32 0xBE8E9A22 +.word32 0xBE8DD8FC +.word32 0xBE8D17C0 +.word32 0xBE8C566E +.word32 0xBE8B9507 +.word32 0xBE8AD38A +.word32 0xBE8A11F7 +.word32 0xBE895050 +.word32 0xBE888E93 +.word32 0xBE87CCC1 +.word32 0xBE870ADA +.word32 0xBE8648DF +.word32 0xBE8586CE +.word32 0xBE84C4AA +.word32 0xBE840270 +.word32 0xBE834022 +.word32 0xBE827DC0 +.word32 0xBE81BB4A +.word32 0xBE80F8C0 +.word32 0xBE803622 +.word32 0xBE7EE6E1 +.word32 0xBE7D6156 +.word32 0xBE7BDBA4 +.word32 0xBE7A55CB +.word32 0xBE78CFCC +.word32 0xBE7749A6 +.word32 0xBE75C35A +.word32 0xBE743CE8 +.word32 0xBE72B651 +.word32 0xBE712F94 +.word32 0xBE6FA8B2 +.word32 0xBE6E21AB +.word32 0xBE6C9A7F +.word32 0xBE6B132F +.word32 0xBE698BBA +.word32 0xBE680422 +.word32 0xBE667C66 +.word32 0xBE64F486 +.word32 0xBE636C83 +.word32 0xBE61E45C +.word32 0xBE605C13 +.word32 0xBE5ED3A8 +.word32 0xBE5D4B1A +.word32 0xBE5BC26A +.word32 0xBE5A3997 +.word32 0xBE58B0A4 +.word32 0xBE57278F +.word32 0xBE559E58 +.word32 0xBE541501 +.word32 0xBE528B89 +.word32 0xBE5101F1 +.word32 0xBE4F7838 +.word32 0xBE4DEE60 +.word32 0xBE4C6467 +.word32 0xBE4ADA4F +.word32 0xBE495018 +.word32 0xBE47C5C2 +.word32 0xBE463B4D +.word32 0xBE44B0B9 +.word32 0xBE432607 +.word32 0xBE419B37 +.word32 0xBE401049 +.word32 0xBE3E853E +.word32 0xBE3CFA15 +.word32 0xBE3B6ECF +.word32 0xBE39E36C +.word32 0xBE3857EC +.word32 0xBE36CC50 +.word32 0xBE354098 +.word32 0xBE33B4C4 +.word32 0xBE3228D4 +.word32 0xBE309CC9 +.word32 0xBE2F10A2 +.word32 0xBE2D8461 +.word32 0xBE2BF804 +.word32 0xBE2A6B8D +.word32 0xBE28DEFC +.word32 0xBE275251 +.word32 0xBE25C58C +.word32 0xBE2438AD +.word32 0xBE22ABB6 +.word32 0xBE211EA5 +.word32 0xBE1F917B +.word32 0xBE1E0438 +.word32 0xBE1C76DE +.word32 0xBE1AE96B +.word32 0xBE195BE0 +.word32 0xBE17CE3D +.word32 0xBE164083 +.word32 0xBE14B2B2 +.word32 0xBE1324CA +.word32 0xBE1196CC +.word32 0xBE1008B7 +.word32 0xBE0E7A8B +.word32 0xBE0CEC4A +.word32 0xBE0B5DF3 +.word32 0xBE09CF86 +.word32 0xBE084105 +.word32 0xBE06B26E +.word32 0xBE0523C2 +.word32 0xBE039502 +.word32 0xBE02062E +.word32 0xBE007745 +.word32 0xBDFDD092 +.word32 0xBDFAB273 +.word32 0xBDF7942C +.word32 0xBDF475C0 +.word32 0xBDF1572E +.word32 0xBDEE3876 +.word32 0xBDEB199A +.word32 0xBDE7FA9A +.word32 0xBDE4DB76 +.word32 0xBDE1BC2E +.word32 0xBDDE9CC4 +.word32 0xBDDB7D37 +.word32 0xBDD85D89 +.word32 0xBDD53DB9 +.word32 0xBDD21DC8 +.word32 0xBDCEFDB7 +.word32 0xBDCBDD86 +.word32 0xBDC8BD36 +.word32 0xBDC59CC6 +.word32 0xBDC27C39 +.word32 0xBDBF5B8D +.word32 0xBDBC3AC3 +.word32 0xBDB919DD +.word32 0xBDB5F8DA +.word32 0xBDB2D7BB +.word32 0xBDAFB680 +.word32 0xBDAC952B +.word32 0xBDA973BA +.word32 0xBDA65230 +.word32 0xBDA3308C +.word32 0xBDA00ECF +.word32 0xBD9CECF9 +.word32 0xBD99CB0A +.word32 0xBD96A905 +.word32 0xBD9386E7 +.word32 0xBD9064B4 +.word32 0xBD8D426A +.word32 0xBD8A200A +.word32 0xBD86FD94 +.word32 0xBD83DB0A +.word32 0xBD80B86C +.word32 0xBD7B2B74 +.word32 0xBD74E5E9 +.word32 0xBD6EA038 +.word32 0xBD685A62 +.word32 0xBD621469 +.word32 0xBD5BCE4C +.word32 0xBD55880E +.word32 0xBD4F41AF +.word32 0xBD48FB30 +.word32 0xBD42B491 +.word32 0xBD3C6DD5 +.word32 0xBD3626FC +.word32 0xBD2FE007 +.word32 0xBD2998F6 +.word32 0xBD2351CB +.word32 0xBD1D0A88 +.word32 0xBD16C32C +.word32 0xBD107BB8 +.word32 0xBD0A342F +.word32 0xBD03EC90 +.word32 0xBCFB49BA +.word32 0xBCEEBA2C +.word32 0xBCE22A7A +.word32 0xBCD59AA6 +.word32 0xBCC90AB0 +.word32 0xBCBC7A9B +.word32 0xBCAFEA69 +.word32 0xBCA35A1C +.word32 0xBC96C9B6 +.word32 0xBC8A3938 +.word32 0xBC7B514B +.word32 0xBC622FFF +.word32 0xBC490E90 +.word32 0xBC2FED02 +.word32 0xBC16CB58 +.word32 0xBBFB5330 +.word32 0xBBC90F88 +.word32 0xBB96CBC1 +.word32 0xBB490FC6 +.word32 0xBAC90FD5 +.word32 0x00000000 +.word32 0x3AC90FD5 +.word32 0x3B490FC6 +.word32 0x3B96CBC1 +.word32 0x3BC90F88 +.word32 0x3BFB5330 +.word32 0x3C16CB58 +.word32 0x3C2FED02 +.word32 0x3C490E90 +.word32 0x3C622FFF +.word32 0x3C7B514B +.word32 0x3C8A3938 +.word32 0x3C96C9B6 +.word32 0x3CA35A1C +.word32 0x3CAFEA69 +.word32 0x3CBC7A9B +.word32 0x3CC90AB0 +.word32 0x3CD59AA6 +.word32 0x3CE22A7A +.word32 0x3CEEBA2C +.word32 0x3CFB49BA +.word32 0x3D03EC90 +.word32 0x3D0A342F +.word32 0x3D107BB8 +.word32 0x3D16C32C +.word32 0x3D1D0A88 +.word32 0x3D2351CB +.word32 0x3D2998F6 +.word32 0x3D2FE007 +.word32 0x3D3626FC +.word32 0x3D3C6DD5 +.word32 0x3D42B491 +.word32 0x3D48FB30 +.word32 0x3D4F41AF +.word32 0x3D55880E +.word32 0x3D5BCE4C +.word32 0x3D621469 +.word32 0x3D685A62 +.word32 0x3D6EA038 +.word32 0x3D74E5E9 +.word32 0x3D7B2B74 +.word32 0x3D80B86C +.word32 0x3D83DB0A +.word32 0x3D86FD94 +.word32 0x3D8A200A +.word32 0x3D8D426A +.word32 0x3D9064B4 +.word32 0x3D9386E7 +.word32 0x3D96A905 +.word32 0x3D99CB0A +.word32 0x3D9CECF9 +.word32 0x3DA00ECF +.word32 0x3DA3308C +.word32 0x3DA65230 +.word32 0x3DA973BA +.word32 0x3DAC952B +.word32 0x3DAFB680 +.word32 0x3DB2D7BB +.word32 0x3DB5F8DA +.word32 0x3DB919DD +.word32 0x3DBC3AC3 +.word32 0x3DBF5B8D +.word32 0x3DC27C39 +.word32 0x3DC59CC6 +.word32 0x3DC8BD36 +.word32 0x3DCBDD86 +.word32 0x3DCEFDB7 +.word32 0x3DD21DC8 +.word32 0x3DD53DB9 +.word32 0x3DD85D89 +.word32 0x3DDB7D37 +.word32 0x3DDE9CC4 +.word32 0x3DE1BC2E +.word32 0x3DE4DB76 +.word32 0x3DE7FA9A +.word32 0x3DEB199A +.word32 0x3DEE3876 +.word32 0x3DF1572E +.word32 0x3DF475C0 +.word32 0x3DF7942C +.word32 0x3DFAB273 +.word32 0x3DFDD092 +.word32 0x3E007745 +.word32 0x3E02062E +.word32 0x3E039502 +.word32 0x3E0523C2 +.word32 0x3E06B26E +.word32 0x3E084105 +.word32 0x3E09CF86 +.word32 0x3E0B5DF3 +.word32 0x3E0CEC4A +.word32 0x3E0E7A8B +.word32 0x3E1008B7 +.word32 0x3E1196CC +.word32 0x3E1324CA +.word32 0x3E14B2B2 +.word32 0x3E164083 +.word32 0x3E17CE3D +.word32 0x3E195BE0 +.word32 0x3E1AE96B +.word32 0x3E1C76DE +.word32 0x3E1E0438 +.word32 0x3E1F917B +.word32 0x3E211EA5 +.word32 0x3E22ABB6 +.word32 0x3E2438AD +.word32 0x3E25C58C +.word32 0x3E275251 +.word32 0x3E28DEFC +.word32 0x3E2A6B8D +.word32 0x3E2BF804 +.word32 0x3E2D8461 +.word32 0x3E2F10A2 +.word32 0x3E309CC9 +.word32 0x3E3228D4 +.word32 0x3E33B4C4 +.word32 0x3E354098 +.word32 0x3E36CC50 +.word32 0x3E3857EC +.word32 0x3E39E36C +.word32 0x3E3B6ECF +.word32 0x3E3CFA15 +.word32 0x3E3E853E +.word32 0x3E401049 +.word32 0x3E419B37 +.word32 0x3E432607 +.word32 0x3E44B0B9 +.word32 0x3E463B4D +.word32 0x3E47C5C2 +.word32 0x3E495018 +.word32 0x3E4ADA4F +.word32 0x3E4C6467 +.word32 0x3E4DEE60 +.word32 0x3E4F7838 +.word32 0x3E5101F1 +.word32 0x3E528B89 +.word32 0x3E541501 +.word32 0x3E559E58 +.word32 0x3E57278F +.word32 0x3E58B0A4 +.word32 0x3E5A3997 +.word32 0x3E5BC26A +.word32 0x3E5D4B1A +.word32 0x3E5ED3A8 +.word32 0x3E605C13 +.word32 0x3E61E45C +.word32 0x3E636C83 +.word32 0x3E64F486 +.word32 0x3E667C66 +.word32 0x3E680422 +.word32 0x3E698BBA +.word32 0x3E6B132F +.word32 0x3E6C9A7F +.word32 0x3E6E21AB +.word32 0x3E6FA8B2 +.word32 0x3E712F94 +.word32 0x3E72B651 +.word32 0x3E743CE8 +.word32 0x3E75C35A +.word32 0x3E7749A6 +.word32 0x3E78CFCC +.word32 0x3E7A55CB +.word32 0x3E7BDBA4 +.word32 0x3E7D6156 +.word32 0x3E7EE6E1 +.word32 0x3E803622 +.word32 0x3E80F8C0 +.word32 0x3E81BB4A +.word32 0x3E827DC0 +.word32 0x3E834022 +.word32 0x3E840270 +.word32 0x3E84C4AA +.word32 0x3E8586CE +.word32 0x3E8648DF +.word32 0x3E870ADA +.word32 0x3E87CCC1 +.word32 0x3E888E93 +.word32 0x3E895050 +.word32 0x3E8A11F7 +.word32 0x3E8AD38A +.word32 0x3E8B9507 +.word32 0x3E8C566E +.word32 0x3E8D17C0 +.word32 0x3E8DD8FC +.word32 0x3E8E9A22 +.word32 0x3E8F5B32 +.word32 0x3E901C2C +.word32 0x3E90DD10 +.word32 0x3E919DDD +.word32 0x3E925E94 +.word32 0x3E931F35 +.word32 0x3E93DFBF +.word32 0x3E94A031 +.word32 0x3E95608D +.word32 0x3E9620D2 +.word32 0x3E96E100 +.word32 0x3E97A117 +.word32 0x3E986116 +.word32 0x3E9920FE +.word32 0x3E99E0CE +.word32 0x3E9AA086 +.word32 0x3E9B6027 +.word32 0x3E9C1FAF +.word32 0x3E9CDF20 +.word32 0x3E9D9E78 +.word32 0x3E9E5DB8 +.word32 0x3E9F1CDF +.word32 0x3E9FDBEE +.word32 0x3EA09AE5 +.word32 0x3EA159C2 +.word32 0x3EA21887 +.word32 0x3EA2D733 +.word32 0x3EA395C5 +.word32 0x3EA4543F +.word32 0x3EA5129F +.word32 0x3EA5D0E5 +.word32 0x3EA68F12 +.word32 0x3EA74D25 +.word32 0x3EA80B1F +.word32 0x3EA8C8FE +.word32 0x3EA986C4 +.word32 0x3EAA446F +.word32 0x3EAB0201 +.word32 0x3EABBF77 +.word32 0x3EAC7CD4 +.word32 0x3EAD3A15 +.word32 0x3EADF73C +.word32 0x3EAEB449 +.word32 0x3EAF713A +.word32 0x3EB02E10 +.word32 0x3EB0EACB +.word32 0x3EB1A76B +.word32 0x3EB263EF +.word32 0x3EB32058 +.word32 0x3EB3DCA5 +.word32 0x3EB498D6 +.word32 0x3EB554EC +.word32 0x3EB610E6 +.word32 0x3EB6CCC3 +.word32 0x3EB78884 +.word32 0x3EB8442A +.word32 0x3EB8FFB2 +.word32 0x3EB9BB1E +.word32 0x3EBA766E +.word32 0x3EBB31A0 +.word32 0x3EBBECB6 +.word32 0x3EBCA7AF +.word32 0x3EBD628B +.word32 0x3EBE1D4A +.word32 0x3EBED7EB +.word32 0x3EBF926F +.word32 0x3EC04CD5 +.word32 0x3EC1071E +.word32 0x3EC1C148 +.word32 0x3EC27B55 +.word32 0x3EC33544 +.word32 0x3EC3EF15 +.word32 0x3EC4A8C8 +.word32 0x3EC5625C +.word32 0x3EC61BD2 +.word32 0x3EC6D529 +.word32 0x3EC78E62 +.word32 0x3EC8477C +.word32 0x3EC90077 +.word32 0x3EC9B953 +.word32 0x3ECA7210 +.word32 0x3ECB2AAE +.word32 0x3ECBE32C +.word32 0x3ECC9B8B +.word32 0x3ECD53CA +.word32 0x3ECE0BEA +.word32 0x3ECEC3EA +.word32 0x3ECF7BCA +.word32 0x3ED0338A +.word32 0x3ED0EB2A +.word32 0x3ED1A2AA +.word32 0x3ED25A09 +.word32 0x3ED31148 +.word32 0x3ED3C867 +.word32 0x3ED47F64 +.word32 0x3ED53641 +.word32 0x3ED5ECFD +.word32 0x3ED6A399 +.word32 0x3ED75A13 +.word32 0x3ED8106B +.word32 0x3ED8C6A3 +.word32 0x3ED97CB9 +.word32 0x3EDA32AD +.word32 0x3EDAE880 +.word32 0x3EDB9E31 +.word32 0x3EDC53C1 +.word32 0x3EDD092E +.word32 0x3EDDBE79 +.word32 0x3EDE73A2 +.word32 0x3EDF28A9 +.word32 0x3EDFDD8D +.word32 0x3EE0924F +.word32 0x3EE146EE +.word32 0x3EE1FB6A +.word32 0x3EE2AFC4 +.word32 0x3EE363FA +.word32 0x3EE4180E +.word32 0x3EE4CBFE +.word32 0x3EE57FCB +.word32 0x3EE63375 +.word32 0x3EE6E6FB +.word32 0x3EE79A5D +.word32 0x3EE84D9C +.word32 0x3EE900B7 +.word32 0x3EE9B3AE +.word32 0x3EEA6681 +.word32 0x3EEB1930 +.word32 0x3EEBCBBB +.word32 0x3EEC7E21 +.word32 0x3EED3063 +.word32 0x3EEDE280 +.word32 0x3EEE9479 +.word32 0x3EEF464C +.word32 0x3EEFF7FB +.word32 0x3EF0A985 +.word32 0x3EF15AEA +.word32 0x3EF20C29 +.word32 0x3EF2BD43 +.word32 0x3EF36E38 +.word32 0x3EF41F07 +.word32 0x3EF4CFB1 +.word32 0x3EF58035 +.word32 0x3EF63093 +.word32 0x3EF6E0CB +.word32 0x3EF790DC +.word32 0x3EF840C8 +.word32 0x3EF8F08E +.word32 0x3EF9A02D +.word32 0x3EFA4FA5 +.word32 0x3EFAFEF7 +.word32 0x3EFBAE22 +.word32 0x3EFC5D27 +.word32 0x3EFD0C04 +.word32 0x3EFDBABB +.word32 0x3EFE694A +.word32 0x3EFF17B2 +.word32 0x3EFFC5F3 +.word32 0x3F003A06 +.word32 0x3F0090FF +.word32 0x3F00E7E4 +.word32 0x3F013EB5 +.word32 0x3F019573 +.word32 0x3F01EC1C +.word32 0x3F0242B1 +.word32 0x3F029932 +.word32 0x3F02EF9F +.word32 0x3F0345F8 +.word32 0x3F039C3D +.word32 0x3F03F26D +.word32 0x3F044889 +.word32 0x3F049E91 +.word32 0x3F04F484 +.word32 0x3F054A62 +.word32 0x3F05A02C +.word32 0x3F05F5E2 +.word32 0x3F064B82 +.word32 0x3F06A10E +.word32 0x3F06F686 +.word32 0x3F074BE8 +.word32 0x3F07A136 +.word32 0x3F07F66F +.word32 0x3F084B92 +.word32 0x3F08A0A1 +.word32 0x3F08F59B +.word32 0x3F094A7F +.word32 0x3F099F4E +.word32 0x3F09F409 +.word32 0x3F0A48AD +.word32 0x3F0A9D3D +.word32 0x3F0AF1B7 +.word32 0x3F0B461C +.word32 0x3F0B9A6B +.word32 0x3F0BEEA5 +.word32 0x3F0C42C9 +.word32 0x3F0C96D7 +.word32 0x3F0CEAD0 +.word32 0x3F0D3EB3 +.word32 0x3F0D9281 +.word32 0x3F0DE638 +.word32 0x3F0E39DA +.word32 0x3F0E8D65 +.word32 0x3F0EE0DB +.word32 0x3F0F343B +.word32 0x3F0F8784 +.word32 0x3F0FDAB8 +.word32 0x3F102DD5 +.word32 0x3F1080DC +.word32 0x3F10D3CD +.word32 0x3F1126A7 +.word32 0x3F11796B +.word32 0x3F11CC19 +.word32 0x3F121EB0 +.word32 0x3F127130 +.word32 0x3F12C39A +.word32 0x3F1315EE +.word32 0x3F13682A +.word32 0x3F13BA50 +.word32 0x3F140C5F +.word32 0x3F145E58 +.word32 0x3F14B039 +.word32 0x3F150204 +.word32 0x3F1553B7 +.word32 0x3F15A554 +.word32 0x3F15F6D9 +.word32 0x3F164847 +.word32 0x3F16999F +.word32 0x3F16EADE +.word32 0x3F173C07 +.word32 0x3F178D18 +.word32 0x3F17DE12 +.word32 0x3F182EF5 +.word32 0x3F187FC0 +.word32 0x3F18D073 +.word32 0x3F19210F +.word32 0x3F197194 +.word32 0x3F19C200 +.word32 0x3F1A1255 +.word32 0x3F1A6293 +.word32 0x3F1AB2B8 +.word32 0x3F1B02C6 +.word32 0x3F1B52BB +.word32 0x3F1BA299 +.word32 0x3F1BF25F +.word32 0x3F1C420C +.word32 0x3F1C91A2 +.word32 0x3F1CE11F +.word32 0x3F1D3084 +.word32 0x3F1D7FD1 +.word32 0x3F1DCF06 +.word32 0x3F1E1E22 +.word32 0x3F1E6D26 +.word32 0x3F1EBC12 +.word32 0x3F1F0AE5 +.word32 0x3F1F599F +.word32 0x3F1FA841 +.word32 0x3F1FF6CB +.word32 0x3F20453B +.word32 0x3F209393 +.word32 0x3F20E1D2 +.word32 0x3F212FF9 +.word32 0x3F217E06 +.word32 0x3F21CBFB +.word32 0x3F2219D7 +.word32 0x3F226799 +.word32 0x3F22B543 +.word32 0x3F2302D3 +.word32 0x3F23504B +.word32 0x3F239DA9 +.word32 0x3F23EAEE +.word32 0x3F24381A +.word32 0x3F24852C +.word32 0x3F24D225 +.word32 0x3F251F04 +.word32 0x3F256BCB +.word32 0x3F25B877 +.word32 0x3F26050A +.word32 0x3F265184 +.word32 0x3F269DE3 +.word32 0x3F26EA2A +.word32 0x3F273656 +.word32 0x3F278268 +.word32 0x3F27CE61 +.word32 0x3F281A40 +.word32 0x3F286605 +.word32 0x3F28B1B0 +.word32 0x3F28FD41 +.word32 0x3F2948B8 +.word32 0x3F299415 +.word32 0x3F29DF57 +.word32 0x3F2A2A80 +.word32 0x3F2A758E +.word32 0x3F2AC082 +.word32 0x3F2B0B5B +.word32 0x3F2B561B +.word32 0x3F2BA0BF +.word32 0x3F2BEB4A +.word32 0x3F2C35B9 +.word32 0x3F2C800F +.word32 0x3F2CCA49 +.word32 0x3F2D1469 +.word32 0x3F2D5E6F +.word32 0x3F2DA859 +.word32 0x3F2DF229 +.word32 0x3F2E3BDE +.word32 0x3F2E8578 +.word32 0x3F2ECEF7 +.word32 0x3F2F185B +.word32 0x3F2F61A5 +.word32 0x3F2FAAD3 +.word32 0x3F2FF3E6 +.word32 0x3F303CDE +.word32 0x3F3085BB +.word32 0x3F30CE7C +.word32 0x3F311722 +.word32 0x3F315FAD +.word32 0x3F31A81D +.word32 0x3F31F071 +.word32 0x3F3238AA +.word32 0x3F3280C7 +.word32 0x3F32C8C9 +.word32 0x3F3310AF +.word32 0x3F33587A +.word32 0x3F33A029 +.word32 0x3F33E7BC +.word32 0x3F342F34 +.word32 0x3F34768F +.word32 0x3F34BDCF +.word32 0x3F3504F3 +.word32 0x3F354BFB +.word32 0x3F3592E7 +.word32 0x3F35D9B8 +.word32 0x3F36206C +.word32 0x3F366704 +.word32 0x3F36AD7F +.word32 0x3F36F3DF +.word32 0x3F373A23 +.word32 0x3F37804A +.word32 0x3F37C655 +.word32 0x3F380C43 +.word32 0x3F385216 +.word32 0x3F3897CB +.word32 0x3F38DD65 +.word32 0x3F3922E1 +.word32 0x3F396842 +.word32 0x3F39AD85 +.word32 0x3F39F2AC +.word32 0x3F3A37B7 +.word32 0x3F3A7CA4 +.word32 0x3F3AC175 +.word32 0x3F3B0629 +.word32 0x3F3B4AC1 +.word32 0x3F3B8F3B +.word32 0x3F3BD398 +.word32 0x3F3C17D9 +.word32 0x3F3C5BFC +.word32 0x3F3CA003 +.word32 0x3F3CE3EC +.word32 0x3F3D27B8 +.word32 0x3F3D6B67 +.word32 0x3F3DAEF9 +.word32 0x3F3DF26E +.word32 0x3F3E35C5 +.word32 0x3F3E78FF +.word32 0x3F3EBC1B +.word32 0x3F3EFF1B +.word32 0x3F3F41FC +.word32 0x3F3F84C0 +.word32 0x3F3FC767 +.word32 0x3F4009F0 +.word32 0x3F404C5C +.word32 0x3F408EA9 +.word32 0x3F40D0DA +.word32 0x3F4112EC +.word32 0x3F4154E1 +.word32 0x3F4196B7 +.word32 0x3F41D870 +.word32 0x3F421A0B +.word32 0x3F425B89 +.word32 0x3F429CE8 +.word32 0x3F42DE29 +.word32 0x3F431F4C +.word32 0x3F436051 +.word32 0x3F43A138 +.word32 0x3F43E200 +.word32 0x3F4422AB +.word32 0x3F446337 +.word32 0x3F44A3A5 +.word32 0x3F44E3F5 +.word32 0x3F452426 +.word32 0x3F456439 +.word32 0x3F45A42D +.word32 0x3F45E403 +.word32 0x3F4623BB +.word32 0x3F466354 +.word32 0x3F46A2CE +.word32 0x3F46E22A +.word32 0x3F472167 +.word32 0x3F476085 +.word32 0x3F479F84 +.word32 0x3F47DE65 +.word32 0x3F481D27 +.word32 0x3F485BCA +.word32 0x3F489A4E +.word32 0x3F48D8B3 +.word32 0x3F4916FA +.word32 0x3F495521 +.word32 0x3F499329 +.word32 0x3F49D112 +.word32 0x3F4A0EDC +.word32 0x3F4A4C87 +.word32 0x3F4A8A13 +.word32 0x3F4AC77F +.word32 0x3F4B04CC +.word32 0x3F4B41FA +.word32 0x3F4B7F09 +.word32 0x3F4BBBF8 +.word32 0x3F4BF8C7 +.word32 0x3F4C3578 +.word32 0x3F4C7208 +.word32 0x3F4CAE79 +.word32 0x3F4CEACB +.word32 0x3F4D26FD +.word32 0x3F4D6310 +.word32 0x3F4D9F02 +.word32 0x3F4DDAD5 +.word32 0x3F4E1689 +.word32 0x3F4E521C +.word32 0x3F4E8D90 +.word32 0x3F4EC8E4 +.word32 0x3F4F0417 +.word32 0x3F4F3F2B +.word32 0x3F4F7A1F +.word32 0x3F4FB4F4 +.word32 0x3F4FEFA8 +.word32 0x3F502A3B +.word32 0x3F5064AF +.word32 0x3F509F03 +.word32 0x3F50D937 +.word32 0x3F51134A +.word32 0x3F514D3D +.word32 0x3F518710 +.word32 0x3F51C0C2 +.word32 0x3F51FA54 +.word32 0x3F5233C6 +.word32 0x3F526D18 +.word32 0x3F52A649 +.word32 0x3F52DF59 +.word32 0x3F531849 +.word32 0x3F535118 +.word32 0x3F5389C7 +.word32 0x3F53C255 +.word32 0x3F53FAC3 +.word32 0x3F54330F +.word32 0x3F546B3B +.word32 0x3F54A347 +.word32 0x3F54DB31 +.word32 0x3F5512FB +.word32 0x3F554AA4 +.word32 0x3F55822C +.word32 0x3F55B993 +.word32 0x3F55F0D9 +.word32 0x3F5627FE +.word32 0x3F565F02 +.word32 0x3F5695E5 +.word32 0x3F56CCA7 +.word32 0x3F570348 +.word32 0x3F5739C7 +.word32 0x3F577026 +.word32 0x3F57A663 +.word32 0x3F57DC7F +.word32 0x3F581279 +.word32 0x3F584853 +.word32 0x3F587E0B +.word32 0x3F58B3A1 +.word32 0x3F58E916 +.word32 0x3F591E6A +.word32 0x3F59539C +.word32 0x3F5988AD +.word32 0x3F59BD9C +.word32 0x3F59F26A +.word32 0x3F5A2716 +.word32 0x3F5A5BA0 +.word32 0x3F5A9009 +.word32 0x3F5AC450 +.word32 0x3F5AF875 +.word32 0x3F5B2C79 +.word32 0x3F5B605A +.word32 0x3F5B941A +.word32 0x3F5BC7B8 +.word32 0x3F5BFB34 +.word32 0x3F5C2E8E +.word32 0x3F5C61C7 +.word32 0x3F5C94DD +.word32 0x3F5CC7D1 +.word32 0x3F5CFAA3 +.word32 0x3F5D2D53 +.word32 0x3F5D5FE1 +.word32 0x3F5D924D +.word32 0x3F5DC497 +.word32 0x3F5DF6BE +.word32 0x3F5E28C3 +.word32 0x3F5E5AA6 +.word32 0x3F5E8C67 +.word32 0x3F5EBE05 +.word32 0x3F5EEF81 +.word32 0x3F5F20DB +.word32 0x3F5F5212 +.word32 0x3F5F8327 +.word32 0x3F5FB419 +.word32 0x3F5FE4E9 +.word32 0x3F601596 +.word32 0x3F604621 +.word32 0x3F607689 +.word32 0x3F60A6CF +.word32 0x3F60D6F2 +.word32 0x3F6106F2 +.word32 0x3F6136D0 +.word32 0x3F61668A +.word32 0x3F619622 +.word32 0x3F61C598 +.word32 0x3F61F4EA +.word32 0x3F62241A +.word32 0x3F625326 +.word32 0x3F628210 +.word32 0x3F62B0D7 +.word32 0x3F62DF7B +.word32 0x3F630DFC +.word32 0x3F633C5A +.word32 0x3F636A95 +.word32 0x3F6398AC +.word32 0x3F63C6A1 +.word32 0x3F63F473 +.word32 0x3F642221 +.word32 0x3F644FAC +.word32 0x3F647D14 +.word32 0x3F64AA59 +.word32 0x3F64D77B +.word32 0x3F650479 +.word32 0x3F653154 +.word32 0x3F655E0B +.word32 0x3F658AA0 +.word32 0x3F65B710 +.word32 0x3F65E35E +.word32 0x3F660F88 +.word32 0x3F663B8E +.word32 0x3F666771 +.word32 0x3F669330 +.word32 0x3F66BECC +.word32 0x3F66EA45 +.word32 0x3F671599 +.word32 0x3F6740CA +.word32 0x3F676BD8 +.word32 0x3F6796C1 +.word32 0x3F67C187 +.word32 0x3F67EC29 +.word32 0x3F6816A8 +.word32 0x3F684103 +.word32 0x3F686B39 +.word32 0x3F68954C +.word32 0x3F68BF3C +.word32 0x3F68E907 +.word32 0x3F6912AE +.word32 0x3F693C32 +.word32 0x3F696591 +.word32 0x3F698ECC +.word32 0x3F69B7E4 +.word32 0x3F69E0D7 +.word32 0x3F6A09A7 +.word32 0x3F6A3252 +.word32 0x3F6A5AD9 +.word32 0x3F6A833C +.word32 0x3F6AAB7B +.word32 0x3F6AD395 +.word32 0x3F6AFB8C +.word32 0x3F6B235E +.word32 0x3F6B4B0C +.word32 0x3F6B7295 +.word32 0x3F6B99FB +.word32 0x3F6BC13B +.word32 0x3F6BE858 +.word32 0x3F6C0F50 +.word32 0x3F6C3624 +.word32 0x3F6C5CD4 +.word32 0x3F6C835E +.word32 0x3F6CA9C5 +.word32 0x3F6CD007 +.word32 0x3F6CF624 +.word32 0x3F6D1C1D +.word32 0x3F6D41F2 +.word32 0x3F6D67A1 +.word32 0x3F6D8D2D +.word32 0x3F6DB293 +.word32 0x3F6DD7D5 +.word32 0x3F6DFCF2 +.word32 0x3F6E21EB +.word32 0x3F6E46BE +.word32 0x3F6E6B6D +.word32 0x3F6E8FF8 +.word32 0x3F6EB45D +.word32 0x3F6ED89E +.word32 0x3F6EFCBA +.word32 0x3F6F20B0 +.word32 0x3F6F4483 +.word32 0x3F6F6830 +.word32 0x3F6F8BB8 +.word32 0x3F6FAF1B +.word32 0x3F6FD25A +.word32 0x3F6FF573 +.word32 0x3F701867 +.word32 0x3F703B37 +.word32 0x3F705DE1 +.word32 0x3F708066 +.word32 0x3F70A2C6 +.word32 0x3F70C501 +.word32 0x3F70E717 +.word32 0x3F710908 +.word32 0x3F712AD4 +.word32 0x3F714C7A +.word32 0x3F716DFB +.word32 0x3F718F57 +.word32 0x3F71B08E +.word32 0x3F71D19F +.word32 0x3F71F28C +.word32 0x3F721352 +.word32 0x3F7233F4 +.word32 0x3F725470 +.word32 0x3F7274C7 +.word32 0x3F7294F8 +.word32 0x3F72B504 +.word32 0x3F72D4EB +.word32 0x3F72F4AC +.word32 0x3F731447 +.word32 0x3F7333BE +.word32 0x3F73530E +.word32 0x3F737239 +.word32 0x3F73913F +.word32 0x3F73B01F +.word32 0x3F73CED9 +.word32 0x3F73ED6E +.word32 0x3F740BDD +.word32 0x3F742A27 +.word32 0x3F74484B +.word32 0x3F746649 +.word32 0x3F748422 +.word32 0x3F74A1D5 +.word32 0x3F74BF62 +.word32 0x3F74DCC9 +.word32 0x3F74FA0B +.word32 0x3F751727 +.word32 0x3F75341D +.word32 0x3F7550ED +.word32 0x3F756D97 +.word32 0x3F758A1C +.word32 0x3F75A67B +.word32 0x3F75C2B3 +.word32 0x3F75DEC6 +.word32 0x3F75FAB3 +.word32 0x3F76167A +.word32 0x3F76321B +.word32 0x3F764D97 +.word32 0x3F7668EC +.word32 0x3F76841B +.word32 0x3F769F24 +.word32 0x3F76BA07 +.word32 0x3F76D4C4 +.word32 0x3F76EF5B +.word32 0x3F7709CC +.word32 0x3F772417 +.word32 0x3F773E3C +.word32 0x3F77583A +.word32 0x3F777213 +.word32 0x3F778BC5 +.word32 0x3F77A551 +.word32 0x3F77BEB7 +.word32 0x3F77D7F7 +.word32 0x3F77F110 +.word32 0x3F780A04 +.word32 0x3F7822D1 +.word32 0x3F783B77 +.word32 0x3F7853F8 +.word32 0x3F786C52 +.word32 0x3F788486 +.word32 0x3F789C93 +.word32 0x3F78B47B +.word32 0x3F78CC3B +.word32 0x3F78E3D6 +.word32 0x3F78FB4A +.word32 0x3F791298 +.word32 0x3F7929BF +.word32 0x3F7940C0 +.word32 0x3F79579A +.word32 0x3F796E4E +.word32 0x3F7984DC +.word32 0x3F799B43 +.word32 0x3F79B183 +.word32 0x3F79C79D +.word32 0x3F79DD91 +.word32 0x3F79F35E +.word32 0x3F7A0904 +.word32 0x3F7A1E84 +.word32 0x3F7A33DD +.word32 0x3F7A4910 +.word32 0x3F7A5E1C +.word32 0x3F7A7302 +.word32 0x3F7A87C1 +.word32 0x3F7A9C59 +.word32 0x3F7AB0CB +.word32 0x3F7AC516 +.word32 0x3F7AD93A +.word32 0x3F7AED37 +.word32 0x3F7B010E +.word32 0x3F7B14BE +.word32 0x3F7B2848 +.word32 0x3F7B3BAB +.word32 0x3F7B4EE7 +.word32 0x3F7B61FC +.word32 0x3F7B74EA +.word32 0x3F7B87B2 +.word32 0x3F7B9A53 +.word32 0x3F7BACCD +.word32 0x3F7BBF20 +.word32 0x3F7BD14D +.word32 0x3F7BE353 +.word32 0x3F7BF531 +.word32 0x3F7C06E9 +.word32 0x3F7C187A +.word32 0x3F7C29E5 +.word32 0x3F7C3B28 +.word32 0x3F7C4C44 +.word32 0x3F7C5D3A +.word32 0x3F7C6E08 +.word32 0x3F7C7EB0 +.word32 0x3F7C8F31 +.word32 0x3F7C9F8A +.word32 0x3F7CAFBD +.word32 0x3F7CBFC9 +.word32 0x3F7CCFAE +.word32 0x3F7CDF6C +.word32 0x3F7CEF03 +.word32 0x3F7CFE73 +.word32 0x3F7D0DBC +.word32 0x3F7D1CDD +.word32 0x3F7D2BD8 +.word32 0x3F7D3AAC +.word32 0x3F7D4959 +.word32 0x3F7D57DE +.word32 0x3F7D663D +.word32 0x3F7D7474 +.word32 0x3F7D8285 +.word32 0x3F7D906E +.word32 0x3F7D9E30 +.word32 0x3F7DABCC +.word32 0x3F7DB940 +.word32 0x3F7DC68C +.word32 0x3F7DD3B2 +.word32 0x3F7DE0B1 +.word32 0x3F7DED88 +.word32 0x3F7DFA38 +.word32 0x3F7E06C2 +.word32 0x3F7E1324 +.word32 0x3F7E1F5E +.word32 0x3F7E2B72 +.word32 0x3F7E375E +.word32 0x3F7E4323 +.word32 0x3F7E4EC1 +.word32 0x3F7E5A38 +.word32 0x3F7E6588 +.word32 0x3F7E70B0 +.word32 0x3F7E7BB1 +.word32 0x3F7E868B +.word32 0x3F7E913D +.word32 0x3F7E9BC9 +.word32 0x3F7EA62D +.word32 0x3F7EB069 +.word32 0x3F7EBA7F +.word32 0x3F7EC46D +.word32 0x3F7ECE34 +.word32 0x3F7ED7D4 +.word32 0x3F7EE14C +.word32 0x3F7EEA9D +.word32 0x3F7EF3C7 +.word32 0x3F7EFCC9 +.word32 0x3F7F05A4 +.word32 0x3F7F0E58 +.word32 0x3F7F16E4 +.word32 0x3F7F1F49 +.word32 0x3F7F2787 +.word32 0x3F7F2F9D +.word32 0x3F7F378C +.word32 0x3F7F3F54 +.word32 0x3F7F46F4 +.word32 0x3F7F4E6D +.word32 0x3F7F55BF +.word32 0x3F7F5CE9 +.word32 0x3F7F63EC +.word32 0x3F7F6AC7 +.word32 0x3F7F717B +.word32 0x3F7F7808 +.word32 0x3F7F7E6D +.word32 0x3F7F84AB +.word32 0x3F7F8AC2 +.word32 0x3F7F90B1 +.word32 0x3F7F9678 +.word32 0x3F7F9C18 +.word32 0x3F7FA191 +.word32 0x3F7FA6E3 +.word32 0x3F7FAC0D +.word32 0x3F7FB10F +.word32 0x3F7FB5EA +.word32 0x3F7FBA9E +.word32 0x3F7FBF2A +.word32 0x3F7FC38F +.word32 0x3F7FC7CC +.word32 0x3F7FCBE2 +.word32 0x3F7FCFD1 +.word32 0x3F7FD397 +.word32 0x3F7FD737 +.word32 0x3F7FDAAF +.word32 0x3F7FDE00 +.word32 0x3F7FE129 +.word32 0x3F7FE42B +.word32 0x3F7FE705 +.word32 0x3F7FE9B8 +.word32 0x3F7FEC43 +.word32 0x3F7FEEA7 +.word32 0x3F7FF0E3 +.word32 0x3F7FF2F8 +.word32 0x3F7FF4E6 +.word32 0x3F7FF6AC +.word32 0x3F7FF84A +.word32 0x3F7FF9C1 +.word32 0x3F7FFB11 +.word32 0x3F7FFC39 +.word32 0x3F7FFD39 +.word32 0x3F7FFE13 +.word32 0x3F7FFEC4 +.word32 0x3F7FFF4E +.word32 0x3F7FFFB1 +.word32 0x3F7FFFEC glabel gArctanTable .hword 0x0000 diff --git a/diff.sh b/diff.sh index 5089418..c482cfc 100755 --- a/diff.sh +++ b/diff.sh @@ -70,11 +70,15 @@ fi START="$1" BASE=0 +if [ $DIFF_OBJ != 1 ] && [ $MAKE = 1 ]; then + make $MAKEFLAGS "$MYIMG" +fi + set +e -if [ -n "$MAPFILE" ]; then +if [ -n "$MAPFILE" ] && [ "${START:0:2}" != "0x" ]; then LINE=$(grep "$1$" $MAPFILE) - if [[ -n "$LINE" && "${1:0:2}" != "0x" ]]; then + if [ -n "$LINE" ]; then START=$(echo $LINE | cut -d' ' -f1) if [[ $DIFF_OBJ = 1 ]]; then LINE2=$(grep "$1$\|^ .text" $MAPFILE | grep "$1$" -B1 | head -n1) @@ -88,6 +92,11 @@ if [ -n "$MAPFILE" ]; then fi fi +if ! [[ "$START" =~ ^[0-9] ]]; then + echo "Function $1 not found in map file." >&2 + exit 1 +fi + set -e if [[ $DIFF_OBJ = 1 ]]; then @@ -109,9 +118,6 @@ if [[ $DIFF_OBJ = 1 ]]; then $OBJDUMP $OBJFILE | grep "<$1>:" -A1000 > $MYDUMP DIFF_ARGS+=" -o" else - if [[ $MAKE = 1 ]]; then - make $MAKEFLAGS "$MYIMG" - fi END="$START + 0x1000" if [[ $# -ge 2 ]]; then END="$2" diff --git a/enhancements/mem_error_screen.inc.c b/enhancements/mem_error_screen.inc.c index 760f696..0846802 100644 --- a/enhancements/mem_error_screen.inc.c +++ b/enhancements/mem_error_screen.inc.c @@ -143,16 +143,16 @@ Gfx *geo18_display_error_message(u32 run, UNUSED struct GraphNode *sp44, UNUSED print_text(10, 210, "ERROR Need more memory"); // Init generic text rendering - dl_add_new_ortho_matrix(); + create_dl_ortho_matrix(); gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); // Init rendering stuff for generic text // Set text color to white gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); - PrintGenericText(8, 170, text_console_8mb); - PrintGenericText(8, 120, text_pj64); - PrintGenericText(8, 54, text_pj64_2); + print_generic_string(8, 170, text_console_8mb); + print_generic_string(8, 120, text_pj64); + print_generic_string(8, 54, text_pj64_2); // Cleanup gSPDisplayList(gDisplayListHead++, @@ -173,7 +173,7 @@ void thread5_mem_error_message_loop(UNUSED void *arg) { setup_game_memory(); set_vblank_handler(2, &gGameVblankHandler, &gGameVblankQueue, (OSMesg) 1); - addr = (struct LevelCommand *) segmented_to_virtual(level_script_entry_error_screen); + addr = segmented_to_virtual(level_script_entry_error_screen); func_80247ED8(); diff --git a/include/PR/abi.h b/include/PR/abi.h index 9c826f4..12e439b 100644 --- a/include/PR/abi.h +++ b/include/PR/abi.h @@ -1,16 +1,16 @@ #ifndef _ABI_H_ -#define _ABI_H_ +#define _ABI_H_ /************************************************************************** - * * - * Copyright (C) 1994, Silicon Graphics, Inc. * - * * + * * + * Copyright (C) 1994, Silicon Graphics, Inc. * + * * * These coded instructions, statements, and computer programs contain * * unpublished proprietary information of Silicon Graphics, Inc., and * * are protected by Federal copyright law. They may not be disclosed * * to third parties or copied or duplicated in any form, in whole or * * in part, without the prior written consent of Silicon Graphics, Inc. * - * * + * * **************************************************************************/ /************************************************************************** @@ -31,19 +31,19 @@ */ /* Audio commands: */ -#define A_SPNOOP 0 -#define A_ADPCM 1 -#define A_CLEARBUFF 2 -#define A_ENVMIXER 3 -#define A_LOADBUFF 4 -#define A_RESAMPLE 5 -#define A_SAVEBUFF 6 -#define A_SEGMENT 7 -#define A_SETBUFF 8 -#define A_SETVOL 9 +#define A_SPNOOP 0 +#define A_ADPCM 1 +#define A_CLEARBUFF 2 +#define A_ENVMIXER 3 +#define A_LOADBUFF 4 +#define A_RESAMPLE 5 +#define A_SAVEBUFF 6 +#define A_SEGMENT 7 +#define A_SETBUFF 8 +#define A_SETVOL 9 #define A_DMEMMOVE 10 #define A_LOADADPCM 11 -#define A_MIXER 12 +#define A_MIXER 12 #define A_INTERLEAVE 13 #define A_POLEF 14 #define A_SETLOOP 15 @@ -53,18 +53,18 @@ * Audio flags */ -#define A_INIT 0x01 -#define A_CONTINUE 0x00 +#define A_INIT 0x01 +#define A_CONTINUE 0x00 #define A_LOOP 0x02 #define A_OUT 0x02 -#define A_LEFT 0x02 -#define A_RIGHT 0x00 -#define A_VOL 0x04 -#define A_RATE 0x00 -#define A_AUX 0x08 -#define A_NOAUX 0x00 -#define A_MAIN 0x00 -#define A_MIX 0x10 +#define A_LEFT 0x02 +#define A_RIGHT 0x00 +#define A_VOL 0x04 +#define A_RATE 0x00 +#define A_AUX 0x08 +#define A_NOAUX 0x00 +#define A_MAIN 0x00 +#define A_MIX 0x10 /* * BEGIN C-specific section: (typedef's) @@ -76,134 +76,134 @@ */ typedef struct { - unsigned int cmd:8; - unsigned int flags:8; - unsigned int gain:16; - unsigned int addr; + unsigned int cmd:8; + unsigned int flags:8; + unsigned int gain:16; + unsigned int addr; } Aadpcm; typedef struct { - unsigned int cmd:8; - unsigned int flags:8; - unsigned int gain:16; - unsigned int addr; + unsigned int cmd:8; + unsigned int flags:8; + unsigned int gain:16; + unsigned int addr; } Apolef; typedef struct { - unsigned int cmd:8; - unsigned int flags:8; - unsigned int pad1:16; - unsigned int addr; + unsigned int cmd:8; + unsigned int flags:8; + unsigned int pad1:16; + unsigned int addr; } Aenvelope; typedef struct { - unsigned int cmd:8; - unsigned int pad1:8; - unsigned int dmem:16; - unsigned int pad2:16; - unsigned int count:16; + unsigned int cmd:8; + unsigned int pad1:8; + unsigned int dmem:16; + unsigned int pad2:16; + unsigned int count:16; } Aclearbuff; typedef struct { - unsigned int cmd:8; - unsigned int pad1:8; - unsigned int pad2:16; - unsigned int inL:16; - unsigned int inR:16; + unsigned int cmd:8; + unsigned int pad1:8; + unsigned int pad2:16; + unsigned int inL:16; + unsigned int inR:16; } Ainterleave; typedef struct { - unsigned int cmd:8; - unsigned int pad1:24; - unsigned int addr; + unsigned int cmd:8; + unsigned int pad1:24; + unsigned int addr; } Aloadbuff; typedef struct { - unsigned int cmd:8; - unsigned int flags:8; - unsigned int pad1:16; - unsigned int addr; + unsigned int cmd:8; + unsigned int flags:8; + unsigned int pad1:16; + unsigned int addr; } Aenvmixer; typedef struct { - unsigned int cmd:8; - unsigned int flags:8; - unsigned int gain:16; - unsigned int dmemi:16; - unsigned int dmemo:16; + unsigned int cmd:8; + unsigned int flags:8; + unsigned int gain:16; + unsigned int dmemi:16; + unsigned int dmemo:16; } Amixer; typedef struct { - unsigned int cmd:8; - unsigned int flags:8; - unsigned int dmem2:16; - unsigned int addr; + unsigned int cmd:8; + unsigned int flags:8; + unsigned int dmem2:16; + unsigned int addr; } Apan; typedef struct { - unsigned int cmd:8; - unsigned int flags:8; - unsigned int pitch:16; - unsigned int addr; + unsigned int cmd:8; + unsigned int flags:8; + unsigned int pitch:16; + unsigned int addr; } Aresample; typedef struct { - unsigned int cmd:8; - unsigned int flags:8; - unsigned int pad1:16; - unsigned int addr; + unsigned int cmd:8; + unsigned int flags:8; + unsigned int pad1:16; + unsigned int addr; } Areverb; typedef struct { - unsigned int cmd:8; - unsigned int pad1:24; - unsigned int addr; + unsigned int cmd:8; + unsigned int pad1:24; + unsigned int addr; } Asavebuff; typedef struct { - unsigned int cmd:8; - unsigned int pad1:24; - unsigned int pad2:2; - unsigned int number:4; - unsigned int base:24; + unsigned int cmd:8; + unsigned int pad1:24; + unsigned int pad2:2; + unsigned int number:4; + unsigned int base:24; } Asegment; typedef struct { - unsigned int cmd:8; - unsigned int flags:8; - unsigned int dmemin:16; - unsigned int dmemout:16; - unsigned int count:16; + unsigned int cmd:8; + unsigned int flags:8; + unsigned int dmemin:16; + unsigned int dmemout:16; + unsigned int count:16; } Asetbuff; typedef struct { - unsigned int cmd:8; - unsigned int flags:8; - unsigned int vol:16; - unsigned int voltgt:16; - unsigned int volrate:16; + unsigned int cmd:8; + unsigned int flags:8; + unsigned int vol:16; + unsigned int voltgt:16; + unsigned int volrate:16; } Asetvol; typedef struct { - unsigned int cmd:8; - unsigned int pad1:8; - unsigned int dmemin:16; - unsigned int dmemout:16; - unsigned int count:16; + unsigned int cmd:8; + unsigned int pad1:8; + unsigned int dmemin:16; + unsigned int dmemout:16; + unsigned int count:16; } Admemmove; typedef struct { - unsigned int cmd:8; - unsigned int pad1:8; - unsigned int count:16; - unsigned int addr; + unsigned int cmd:8; + unsigned int pad1:8; + unsigned int count:16; + unsigned int addr; } Aloadadpcm; typedef struct { - unsigned int cmd:8; - unsigned int pad1:8; - unsigned int pad2:16; - unsigned int addr; + unsigned int cmd:8; + unsigned int pad1:8; + unsigned int pad2:16; + unsigned int addr; } Asetloop; /* @@ -211,30 +211,32 @@ typedef struct { */ typedef struct { - unsigned int w0; - unsigned int w1; + uintptr_t w0; + uintptr_t w1; } Awords; typedef union { - Awords words; - Aadpcm adpcm; - Apolef polef; - Aclearbuff clearbuff; - Aenvelope envelope; - Ainterleave interleave; - Aloadbuff loadbuff; - Aenvmixer envmixer; - Aresample resample; - Areverb reverb; - Asavebuff savebuff; - Asegment segment; - Asetbuff setbuff; - Asetvol setvol; - Admemmove dmemmove; - Aloadadpcm loadadpcm; - Amixer mixer; - Asetloop setloop; - long long int force_union_align; /* dummy, force alignment */ + Awords words; +#if !defined(__x86_64__) && !defined(__i386__) + Aadpcm adpcm; + Apolef polef; + Aclearbuff clearbuff; + Aenvelope envelope; + Ainterleave interleave; + Aloadbuff loadbuff; + Aenvmixer envmixer; + Aresample resample; + Areverb reverb; + Asavebuff savebuff; + Asegment segment; + Asetbuff setbuff; + Asetvol setvol; + Admemmove dmemmove; + Aloadadpcm loadadpcm; + Amixer mixer; + Asetloop setloop; +#endif + long long int force_union_align; /* dummy, force alignment */ } Acmd; /* @@ -256,7 +258,7 @@ typedef short RESAMPLE_STATE[16]; * Resampler constants */ #define UNITY_PITCH 0x8000 -#define MAX_RATIO 1.99996 /* within .03 cents of +1 octave */ +#define MAX_RATIO 1.99996 /* within .03 cents of +1 octave */ /* * Enveloper/Mixer state @@ -267,162 +269,153 @@ typedef short ENVMIX_STATE[40]; * Macros to assemble the audio command list */ -#define aADPCMdec(pkt, f, s) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = _SHIFTL(A_ADPCM, 24, 8) | _SHIFTL(f, 16, 8); \ - _a->words.w1 = (unsigned int)(s); \ +#define aADPCMdec(pkt, f, s) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = _SHIFTL(A_ADPCM, 24, 8) | _SHIFTL(f, 16, 8); \ + _a->words.w1 = (uintptr_t)(s); \ } -#define aPoleFilter(pkt, f, g, s) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = (_SHIFTL(A_POLEF, 24, 8) | _SHIFTL(f, 16, 8) | \ - _SHIFTL(g, 0, 16)); \ - _a->words.w1 = (unsigned int)(s); \ +#define aPoleFilter(pkt, f, g, s) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = (_SHIFTL(A_POLEF, 24, 8) | _SHIFTL(f, 16, 8) | \ + _SHIFTL(g, 0, 16)); \ + _a->words.w1 = (uintptr_t)(s); \ } -#define aClearBuffer(pkt, d, c) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = _SHIFTL(A_CLEARBUFF, 24, 8) | _SHIFTL(d, 0, 24); \ - _a->words.w1 = (unsigned int)(c); \ +#define aClearBuffer(pkt, d, c) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = _SHIFTL(A_CLEARBUFF, 24, 8) | _SHIFTL(d, 0, 24); \ + _a->words.w1 = (uintptr_t)(c); \ } -#define aEnvMixer(pkt, f, s) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = _SHIFTL(A_ENVMIXER, 24, 8) | _SHIFTL(f, 16, 8); \ - _a->words.w1 = (unsigned int)(s); \ +#define aEnvMixer(pkt, f, s) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = _SHIFTL(A_ENVMIXER, 24, 8) | _SHIFTL(f, 16, 8); \ + _a->words.w1 = (uintptr_t)(s); \ } -#define aInterleave(pkt, l, r) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = _SHIFTL(A_INTERLEAVE, 24, 8); \ - _a->words.w1 = _SHIFTL(l, 16, 16) | _SHIFTL(r, 0, 16); \ +#define aInterleave(pkt, l, r) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = _SHIFTL(A_INTERLEAVE, 24, 8); \ + _a->words.w1 = _SHIFTL(l, 16, 16) | _SHIFTL(r, 0, 16); \ } -#define aLoadBuffer(pkt, s) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = _SHIFTL(A_LOADBUFF, 24, 8); \ - _a->words.w1 = (unsigned int)(s); \ +#define aLoadBuffer(pkt, s) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = _SHIFTL(A_LOADBUFF, 24, 8); \ + _a->words.w1 = (uintptr_t)(s); \ } -#define aMix(pkt, f, g, i, o) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = (_SHIFTL(A_MIXER, 24, 8) | _SHIFTL(f, 16, 8) | \ - _SHIFTL(g, 0, 16)); \ - _a->words.w1 = _SHIFTL(i,16, 16) | _SHIFTL(o, 0, 16); \ +#define aMix(pkt, f, g, i, o) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = (_SHIFTL(A_MIXER, 24, 8) | _SHIFTL(f, 16, 8) | \ + _SHIFTL(g, 0, 16)); \ + _a->words.w1 = _SHIFTL(i,16, 16) | _SHIFTL(o, 0, 16); \ } -#define aPan(pkt, f, d, s) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = (_SHIFTL(A_PAN, 24, 8) | _SHIFTL(f, 16, 8) | \ - _SHIFTL(d, 0, 16)); \ - _a->words.w1 = (unsigned int)(s); \ +#define aPan(pkt, f, d, s) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = (_SHIFTL(A_PAN, 24, 8) | _SHIFTL(f, 16, 8) | \ + _SHIFTL(d, 0, 16)); \ + _a->words.w1 = (uintptr_t)(s); \ } -#define aResample(pkt, f, p, s) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = (_SHIFTL(A_RESAMPLE, 24, 8) | _SHIFTL(f, 16, 8) |\ - _SHIFTL(p, 0, 16)); \ - _a->words.w1 = (unsigned int)(s); \ +#define aResample(pkt, f, p, s) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = (_SHIFTL(A_RESAMPLE, 24, 8) | _SHIFTL(f, 16, 8) |\ + _SHIFTL(p, 0, 16)); \ + _a->words.w1 = (uintptr_t)(s); \ } -#define aSaveBuffer(pkt, s) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = _SHIFTL(A_SAVEBUFF, 24, 8); \ - _a->words.w1 = (unsigned int)(s); \ +#define aSaveBuffer(pkt, s) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = _SHIFTL(A_SAVEBUFF, 24, 8); \ + _a->words.w1 = (uintptr_t)(s); \ } -#define aSegment(pkt, s, b) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = _SHIFTL(A_SEGMENT, 24, 8); \ - _a->words.w1 = _SHIFTL(s, 24, 8) | _SHIFTL(b, 0, 24); \ +#define aSegment(pkt, s, b) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = _SHIFTL(A_SEGMENT, 24, 8); \ + _a->words.w1 = _SHIFTL(s, 24, 8) | _SHIFTL(b, 0, 24); \ } -#define aSetBuffer(pkt, f, i, o, c) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = (_SHIFTL(A_SETBUFF, 24, 8) | _SHIFTL(f, 16, 8) | \ - _SHIFTL(i, 0, 16)); \ - _a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \ +#define aSetBuffer(pkt, f, i, o, c) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = (_SHIFTL(A_SETBUFF, 24, 8) | _SHIFTL(f, 16, 8) | \ + _SHIFTL(i, 0, 16)); \ + _a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \ } -#define aSetVolume(pkt, f, v, t, r) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = (_SHIFTL(A_SETVOL, 24, 8) | _SHIFTL(f, 16, 16) | \ - _SHIFTL(v, 0, 16)); \ - _a->words.w1 = _SHIFTL(t, 16, 16) | _SHIFTL(r, 0, 16); \ +#define aSetVolume(pkt, f, v, t, r) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = (_SHIFTL(A_SETVOL, 24, 8) | _SHIFTL(f, 16, 16) | \ + _SHIFTL(v, 0, 16)); \ + _a->words.w1 = _SHIFTL(t, 16, 16) | _SHIFTL(r, 0, 16); \ } #define aSetLoop(pkt, a) \ { \ Acmd *_a = (Acmd *)pkt; \ _a->words.w0 = _SHIFTL(A_SETLOOP, 24, 8); \ - _a->words.w1 = (unsigned int)(a); \ + _a->words.w1 = (uintptr_t)(a); \ } -#define aDMEMMove(pkt, i, o, c) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = _SHIFTL(A_DMEMMOVE, 24, 8) | _SHIFTL(i, 0, 24); \ - _a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \ +#define aDMEMMove(pkt, i, o, c) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = _SHIFTL(A_DMEMMOVE, 24, 8) | _SHIFTL(i, 0, 24); \ + _a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \ } -#define aLoadADPCM(pkt, c, d) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = _SHIFTL(A_LOADADPCM, 24, 8) | _SHIFTL(c, 0, 24); \ - _a->words.w1 = (unsigned int) d; \ +#define aLoadADPCM(pkt, c, d) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = _SHIFTL(A_LOADADPCM, 24, 8) | _SHIFTL(c, 0, 24); \ + _a->words.w1 = (uintptr_t) d; \ } -/* - * -------------------------------------------------------------------- - * The below command is seemingly declared manually and used for the - * sound driver. - * -------------------------------------------------------------------- - */ - -// This is a version of aSetAudio which takes a single 32-bit parameter +// This is a version of aSetVolume which takes a single 32-bit parameter // instead of two 16-bit ones. According to AziAudio, it is used to set // ramping values when neither bit 4 nor bit 8 is set in the flags parameter. +// It does not appear in the official abi.h header. -#define aSetVolume32(pkt, f, v, tr) \ -{ \ - Acmd *_a = (Acmd *)pkt; \ - \ - _a->words.w0 = (_SHIFTL(A_SETVOL, 24, 8) | _SHIFTL(f, 16, 16) | \ - _SHIFTL(v, 0, 16)); \ - _a->words.w1 = (unsigned int)(tr); \ +#define aSetVolume32(pkt, f, v, tr) \ +{ \ + Acmd *_a = (Acmd *)pkt; \ + \ + _a->words.w0 = (_SHIFTL(A_SETVOL, 24, 8) | _SHIFTL(f, 16, 16) | \ + _SHIFTL(v, 0, 16)); \ + _a->words.w1 = (uintptr_t)(tr); \ } #endif /* _LANGUAGE_C */ #endif /* !_ABI_H_ */ - - - diff --git a/include/PR/gbi.h b/include/PR/gbi.h index 80ba602..be08324 100644 --- a/include/PR/gbi.h +++ b/include/PR/gbi.h @@ -18,7 +18,7 @@ **************************************************************************/ #ifndef _GBI_H_ -#define _GBI_H_ +#define _GBI_H_ #include @@ -91,57 +91,57 @@ # ifndef F3DEX_GBI # define F3DEX_GBI # endif -#define G_NOOP 0x00 -#define G_RDPHALF_2 0xf1 -#define G_SETOTHERMODE_H 0xe3 -#define G_SETOTHERMODE_L 0xe2 -#define G_RDPHALF_1 0xe1 -#define G_SPNOOP 0xe0 -#define G_ENDDL 0xdf -#define G_DL 0xde -#define G_LOAD_UCODE 0xdd -#define G_MOVEMEM 0xdc -#define G_MOVEWORD 0xdb -#define G_MTX 0xda +#define G_NOOP 0x00 +#define G_RDPHALF_2 0xf1 +#define G_SETOTHERMODE_H 0xe3 +#define G_SETOTHERMODE_L 0xe2 +#define G_RDPHALF_1 0xe1 +#define G_SPNOOP 0xe0 +#define G_ENDDL 0xdf +#define G_DL 0xde +#define G_LOAD_UCODE 0xdd +#define G_MOVEMEM 0xdc +#define G_MOVEWORD 0xdb +#define G_MTX 0xda #define G_GEOMETRYMODE 0xd9 -#define G_POPMTX 0xd8 -#define G_TEXTURE 0xd7 -#define G_DMA_IO 0xd6 -#define G_SPECIAL_1 0xd5 -#define G_SPECIAL_2 0xd4 -#define G_SPECIAL_3 0xd3 +#define G_POPMTX 0xd8 +#define G_TEXTURE 0xd7 +#define G_DMA_IO 0xd6 +#define G_SPECIAL_1 0xd5 +#define G_SPECIAL_2 0xd4 +#define G_SPECIAL_3 0xd3 -#define G_VTX 0x01 -#define G_MODIFYVTX 0x02 -#define G_CULLDL 0x03 -#define G_BRANCH_Z 0x04 -#define G_TRI1 0x05 +#define G_VTX 0x01 +#define G_MODIFYVTX 0x02 +#define G_CULLDL 0x03 +#define G_BRANCH_Z 0x04 +#define G_TRI1 0x05 #define G_TRI2 0x06 #define G_QUAD 0x07 #define G_LINE3D 0x08 -#else /* F3DEX_GBI_2 */ +#else /* F3DEX_GBI_2 */ /* DMA commands: */ -#define G_SPNOOP 0 /* handle 0 gracefully */ -#define G_MTX 1 +#define G_SPNOOP 0 /* handle 0 gracefully */ +#define G_MTX 1 #define G_RESERVED0 2 /* not implemeted */ #define G_MOVEMEM 3 /* move a block of memory (up to 4 words) to dmem */ -#define G_VTX 4 +#define G_VTX 4 #define G_RESERVED1 5 /* not implemeted */ -#define G_DL 6 +#define G_DL 6 #define G_RESERVED2 7 /* not implemeted */ #define G_RESERVED3 8 /* not implemeted */ #define G_SPRITE2D_BASE 9 /* sprite command */ /* IMMEDIATE commands: */ -#define G_IMMFIRST -65 -#define G_TRI1 (G_IMMFIRST-0) +#define G_IMMFIRST -65 +#define G_TRI1 (G_IMMFIRST-0) #define G_CULLDL (G_IMMFIRST-1) -#define G_POPMTX (G_IMMFIRST-2) -#define G_MOVEWORD (G_IMMFIRST-3) -#define G_TEXTURE (G_IMMFIRST-4) -#define G_SETOTHERMODE_H (G_IMMFIRST-5) -#define G_SETOTHERMODE_L (G_IMMFIRST-6) +#define G_POPMTX (G_IMMFIRST-2) +#define G_MOVEWORD (G_IMMFIRST-3) +#define G_TEXTURE (G_IMMFIRST-4) +#define G_SETOTHERMODE_H (G_IMMFIRST-5) +#define G_SETOTHERMODE_L (G_IMMFIRST-6) #define G_ENDDL (G_IMMFIRST-7) #define G_SETGEOMETRYMODE (G_IMMFIRST-8) #define G_CLEARGEOMETRYMODE (G_IMMFIRST-9) @@ -164,36 +164,36 @@ #define G_SPRITE2D_DRAW (G_IMMFIRST-2) /* RDP commands: */ -#define G_NOOP 0xc0 /* 0 */ +#define G_NOOP 0xc0 /* 0 */ -#endif /* F3DEX_GBI_2 */ +#endif /* F3DEX_GBI_2 */ /* RDP commands: */ -#define G_SETCIMG 0xff /* -1 */ -#define G_SETZIMG 0xfe /* -2 */ -#define G_SETTIMG 0xfd /* -3 */ -#define G_SETCOMBINE 0xfc /* -4 */ -#define G_SETENVCOLOR 0xfb /* -5 */ -#define G_SETPRIMCOLOR 0xfa /* -6 */ -#define G_SETBLENDCOLOR 0xf9 /* -7 */ -#define G_SETFOGCOLOR 0xf8 /* -8 */ -#define G_SETFILLCOLOR 0xf7 /* -9 */ -#define G_FILLRECT 0xf6 /* -10 */ -#define G_SETTILE 0xf5 /* -11 */ -#define G_LOADTILE 0xf4 /* -12 */ -#define G_LOADBLOCK 0xf3 /* -13 */ -#define G_SETTILESIZE 0xf2 /* -14 */ -#define G_LOADTLUT 0xf0 /* -16 */ -#define G_RDPSETOTHERMODE 0xef /* -17 */ -#define G_SETPRIMDEPTH 0xee /* -18 */ -#define G_SETSCISSOR 0xed /* -19 */ -#define G_SETCONVERT 0xec /* -20 */ -#define G_SETKEYR 0xeb /* -21 */ -#define G_SETKEYGB 0xea /* -22 */ -#define G_RDPFULLSYNC 0xe9 /* -23 */ -#define G_RDPTILESYNC 0xe8 /* -24 */ -#define G_RDPPIPESYNC 0xe7 /* -25 */ -#define G_RDPLOADSYNC 0xe6 /* -26 */ +#define G_SETCIMG 0xff /* -1 */ +#define G_SETZIMG 0xfe /* -2 */ +#define G_SETTIMG 0xfd /* -3 */ +#define G_SETCOMBINE 0xfc /* -4 */ +#define G_SETENVCOLOR 0xfb /* -5 */ +#define G_SETPRIMCOLOR 0xfa /* -6 */ +#define G_SETBLENDCOLOR 0xf9 /* -7 */ +#define G_SETFOGCOLOR 0xf8 /* -8 */ +#define G_SETFILLCOLOR 0xf7 /* -9 */ +#define G_FILLRECT 0xf6 /* -10 */ +#define G_SETTILE 0xf5 /* -11 */ +#define G_LOADTILE 0xf4 /* -12 */ +#define G_LOADBLOCK 0xf3 /* -13 */ +#define G_SETTILESIZE 0xf2 /* -14 */ +#define G_LOADTLUT 0xf0 /* -16 */ +#define G_RDPSETOTHERMODE 0xef /* -17 */ +#define G_SETPRIMDEPTH 0xee /* -18 */ +#define G_SETSCISSOR 0xed /* -19 */ +#define G_SETCONVERT 0xec /* -20 */ +#define G_SETKEYR 0xeb /* -21 */ +#define G_SETKEYGB 0xea /* -22 */ +#define G_RDPFULLSYNC 0xe9 /* -23 */ +#define G_RDPTILESYNC 0xe8 /* -24 */ +#define G_RDPPIPESYNC 0xe7 /* -25 */ +#define G_RDPLOADSYNC 0xe6 /* -26 */ #define G_TEXRECTFLIP 0xe5 /* -27 */ #define G_TEXRECT 0xe4 /* -28 */ @@ -229,10 +229,10 @@ */ /* masks to build RDP triangle commands: */ -#define G_RDP_TRI_FILL_MASK 0x08 -#define G_RDP_TRI_SHADE_MASK 0x04 -#define G_RDP_TRI_TXTR_MASK 0x02 -#define G_RDP_TRI_ZBUFF_MASK 0x01 +#define G_RDP_TRI_FILL_MASK 0x08 +#define G_RDP_TRI_SHADE_MASK 0x04 +#define G_RDP_TRI_TXTR_MASK 0x02 +#define G_RDP_TRI_ZBUFF_MASK 0x01 /* * HACK: @@ -1485,7 +1485,7 @@ typedef struct { int cmd:8; unsigned int par:8; unsigned int len:16; - unsigned int addr; + uintptr_t addr; } Gdma; /* @@ -1570,7 +1570,7 @@ typedef struct { unsigned int siz:2; unsigned int pad:7; unsigned int wd:12; /* really only 10 bits, extra */ - unsigned int dram; /* to account for 1024 */ + uintptr_t dram; /* to account for 1024 */ } Gsetimg; typedef struct { @@ -1667,16 +1667,21 @@ typedef struct { * Generic Gfx Packet */ typedef struct { - unsigned int w0; - unsigned int w1; + uintptr_t w0; + uintptr_t w1; } Gwords; /* * This union is the fundamental type of the display list. * It is, by law, exactly 64 bits in size. + * + * (Edit: except on 64-bit, where it is exactly 128 bit. On little-endian or + * 64-bit systems, only the 'words' member may be accessed; the rest of the + * structs don't have matching layouts for now.) */ typedef union { Gwords words; +#if !defined(__x86_64__) && !defined(__i386__) Gdma dma; Gtri tri; Gline3D line; @@ -1694,6 +1699,7 @@ typedef union { Gloadtile loadtile; /* use for loadblock also, th is dxt */ Gsettilesize settilesize; Gloadtlut loadtlut; +#endif long long int force_structure_alignment; } Gfx; @@ -1709,12 +1715,12 @@ typedef union { Gfx *_g = (Gfx *)(pkt); \ \ _g->words.w0 = _SHIFTL((c), 24, 8) | _SHIFTL((l), 0, 24); \ - _g->words.w1 = (unsigned int)(s); \ + _g->words.w1 = (uintptr_t)(s); \ } #define gsDma0p(c, s, l) \ {{ \ - _SHIFTL((c), 24, 8) | _SHIFTL((l), 0, 24), (unsigned int)(s) \ + _SHIFTL((c), 24, 8) | _SHIFTL((l), 0, 24), (uintptr_t)(s) \ }} #define gDma1p(pkt, c, s, l, p) \ @@ -1723,14 +1729,14 @@ typedef union { \ _g->words.w0 = (_SHIFTL((c), 24, 8) | _SHIFTL((p), 16, 8) | \ _SHIFTL((l), 0, 16)); \ - _g->words.w1 = (unsigned int)(s); \ + _g->words.w1 = (uintptr_t)(s); \ } #define gsDma1p(c, s, l, p) \ {{ \ (_SHIFTL((c), 24, 8) | _SHIFTL((p), 16, 8) | \ _SHIFTL((l), 0, 16)), \ - (unsigned int)(s) \ + (uintptr_t)(s) \ }} #define gDma2p(pkt, c, adrs, len, idx, ofs) \ @@ -1738,13 +1744,13 @@ typedef union { Gfx *_g = (Gfx *)(pkt); \ _g->words.w0 = (_SHIFTL((c),24,8)|_SHIFTL(((len)-1)/8,19,5)| \ _SHIFTL((ofs)/8,8,8)|_SHIFTL((idx),0,8)); \ - _g->words.w1 = (unsigned int)(adrs); \ + _g->words.w1 = (uintptr_t)(adrs); \ } #define gsDma2p(c, adrs, len, idx, ofs) \ {{ \ (_SHIFTL((c),24,8)|_SHIFTL(((len)-1)/8,19,5)| \ _SHIFTL((ofs)/8,8,8)|_SHIFTL((idx),0,8)), \ - (unsigned int)(adrs) \ + (uintptr_t)(adrs) \ }} #define gSPNoOp(pkt) gDma0p(pkt, G_SPNOOP, 0, 0) @@ -1775,12 +1781,12 @@ typedef union { Gfx *_g = (Gfx *)(pkt); \ _g->words.w0 = \ _SHIFTL(G_VTX,24,8)|_SHIFTL((n),12,8)|_SHIFTL((v0)+(n),1,7); \ - _g->words.w1 = (unsigned int)(v); \ + _g->words.w1 = (uintptr_t)(v); \ } # define gsSPVertex(v, n, v0) \ {{ \ (_SHIFTL(G_VTX,24,8)|_SHIFTL((n),12,8)|_SHIFTL((v0)+(n),1,7)), \ - (unsigned int)(v) \ + (uintptr_t)(v) \ }} #elif (defined(F3DEX_GBI)||defined(F3DLP_GBI)) /* @@ -1845,12 +1851,12 @@ typedef union { Gfx *_g = (Gfx *)(pkt); \ \ _g->words.w0 = _SHIFTL((c), 24, 8); \ - _g->words.w1 = (unsigned int)(p0); \ + _g->words.w1 = (uintptr_t)(p0); \ } #define gsImmp1(c, p0) \ {{ \ - _SHIFTL((c), 24, 8), (unsigned int)(p0) \ + _SHIFTL((c), 24, 8), (uintptr_t)(p0) \ }} #define gImmp2(pkt, c, p0, p1) \ @@ -1887,13 +1893,13 @@ typedef union { \ _g->words.w0 = (_SHIFTL((c), 24, 8) | _SHIFTL((p0), 8, 16) | \ _SHIFTL((p1), 0, 8)); \ - _g->words.w1 = (unsigned int) (dat); \ + _g->words.w1 = (uintptr_t) (dat); \ } #define gsImmp21(c, p0, p1, dat) \ {{ \ _SHIFTL((c), 24, 8) | _SHIFTL((p0), 8, 16) | _SHIFTL((p1), 0, 8),\ - (unsigned int) (dat) \ + (uintptr_t) (dat) \ }} #ifdef F3DEX_GBI_2 @@ -2332,7 +2338,7 @@ typedef union { { \ Gfx *_g = (Gfx *)(pkt); \ _g->words.w0 = _SHIFTL(G_RDPHALF_1,24,8); \ - _g->words.w1 = (unsigned int)(dl); \ + _g->words.w1 = (uintptr_t)(dl); \ _g = (Gfx *)(pkt); \ _g->words.w0 = (_SHIFTL(G_BRANCH_Z,24,8)| \ _SHIFTL((vtx)*5,12,12)|_SHIFTL((vtx)*2,0,12)); \ @@ -2341,7 +2347,7 @@ typedef union { #define gsSPBranchLessZrg(dl, vtx, zval, near, far, flag, zmin, zmax) \ {{ _SHIFTL(G_RDPHALF_1,24,8), \ - (unsigned int)(dl), }}, \ + (uintptr_t)(dl), }}, \ {{ _SHIFTL(G_BRANCH_Z,24,8)|_SHIFTL((vtx)*5,12,12)|_SHIFTL((vtx)*2,0,12),\ G_DEPTOZSrg(zval, near, far, flag, zmin, zmax), }} @@ -2361,7 +2367,7 @@ typedef union { { \ Gfx *_g = (Gfx *)(pkt); \ _g->words.w0 = _SHIFTL(G_RDPHALF_1,24,8); \ - _g->words.w1 = (unsigned int)(dl); \ + _g->words.w1 = (uintptr_t)(dl); \ _g = (Gfx *)(pkt); \ _g->words.w0 = (_SHIFTL(G_BRANCH_Z,24,8)| \ _SHIFTL((vtx)*5,12,12)|_SHIFTL((vtx)*2,0,12)); \ @@ -2370,7 +2376,7 @@ typedef union { #define gsSPBranchLessZraw(dl, vtx, zval) \ {{ _SHIFTL(G_RDPHALF_1,24,8), \ - (unsigned int)(dl), }}, \ + (uintptr_t)(dl), }}, \ {{ _SHIFTL(G_BRANCH_Z,24,8)|_SHIFTL((vtx)*5,12,12)|_SHIFTL((vtx)*2,0,12),\ (unsigned int)(zval), }} @@ -2384,19 +2390,19 @@ typedef union { { \ Gfx *_g = (Gfx *)(pkt); \ _g->words.w0 = _SHIFTL(G_RDPHALF_1,24,8); \ - _g->words.w1 = (unsigned int)(uc_dstart); \ + _g->words.w1 = (uintptr_t)(uc_dstart); \ _g = (Gfx *)(pkt); \ _g->words.w0 = (_SHIFTL(G_LOAD_UCODE,24,8)| \ _SHIFTL((int)(uc_dsize)-1,0,16)); \ - _g->words.w1 = (unsigned int)(uc_start); \ + _g->words.w1 = (uintptr_t)(uc_start); \ } #define gsSPLoadUcodeEx(uc_start, uc_dstart, uc_dsize) \ {{ _SHIFTL(G_RDPHALF_1,24,8), \ - (unsigned int)(uc_dstart), }}, \ + (uintptr_t)(uc_dstart), }}, \ {{ _SHIFTL(G_LOAD_UCODE,24,8)| \ _SHIFTL((int)(uc_dsize)-1,0,16), \ - (unsigned int)(uc_start), }} + (uintptr_t)(uc_start), }} #define gSPLoadUcode(pkt, uc_start, uc_dstart) \ gSPLoadUcodeEx((pkt), (uc_start), (uc_dstart), SP_UCODE_DATA_SIZE) @@ -2420,14 +2426,14 @@ typedef union { Gfx *_g = (Gfx *)(pkt); \ _g->words.w0 = _SHIFTL(G_DMA_IO,24,8)|_SHIFTL((flag),23,1)| \ _SHIFTL((dmem)/8,13,10)|_SHIFTL((size)-1,0,12); \ - _g->words.w1 = (unsigned int)(dram); \ + _g->words.w1 = (uintptr_t)(dram); \ } #define gsSPDma_io(flag, dmem, dram, size) \ {{ \ _SHIFTL(G_DMA_IO,24,8)|_SHIFTL((flag),23,1)| \ _SHIFTL((dmem)/8,13,10)|_SHIFTL((size)-1,0,12), \ - (unsigned int)(dram) \ + (uintptr_t)(dram) \ }} #define gSPDmaRead(pkt,dmem,dram,size) gSPDma_io((pkt),0,(dmem),(dram),(size)) @@ -3000,14 +3006,14 @@ typedef union { \ _g->words.w0 = _SHIFTL(cmd, 24, 8) | _SHIFTL(fmt, 21, 3) | \ _SHIFTL(siz, 19, 2) | _SHIFTL((width)-1, 0, 12); \ - _g->words.w1 = (unsigned int)(i); \ + _g->words.w1 = (uintptr_t)(i); \ } #define gsSetImage(cmd, fmt, siz, width, i) \ {{ \ _SHIFTL(cmd, 24, 8) | _SHIFTL(fmt, 21, 3) | \ _SHIFTL(siz, 19, 2) | _SHIFTL((width)-1, 0, 12), \ - (unsigned int)(i) \ + (uintptr_t)(i) \ }} #define gDPSetColorImage(pkt, f, s, w, i) gSetImage(pkt, G_SETCIMG, f, s, w, i) @@ -4542,15 +4548,15 @@ typedef union { } #define gsDPWord(wordhi, wordlo) \ - gsImmp1(G_RDPHALF_1, (unsigned int)(wordhi)), \ - gsImmp1(G_RDPHALF_2, (unsigned int)(wordlo)) + gsImmp1(G_RDPHALF_1, (uintptr_t)(wordhi)), \ + gsImmp1(G_RDPHALF_2, (uintptr_t)(wordlo)) #define gDPWord(pkt, wordhi, wordlo) \ { \ Gfx *_g = (Gfx *)(pkt); \ \ - gImmp1(pkt, G_RDPHALF_1, (unsigned int)(wordhi)); \ - gImmp1(pkt, G_RDPHALF_2, (unsigned int)(wordlo)); \ + gImmp1(pkt, G_RDPHALF_1, (uintptr_t)(wordhi)); \ + gImmp1(pkt, G_RDPHALF_2, (uintptr_t)(wordlo)); \ } #define gDPFullSync(pkt) gDPNoParam(pkt, G_RDPFULLSYNC) diff --git a/include/PR/gbi.inc b/include/PR/gbi.inc index 15edb66..194c6f7 100644 --- a/include/PR/gbi.inc +++ b/include/PR/gbi.inc @@ -10,13 +10,19 @@ /* Macros */ +.macro bytes4 byte1, byte2, byte3, byte4 + .word ((\byte1 & 0xFF) << 24) | ((\byte2 & 0xFF) << 16) | ((\byte3 & 0xFF) << 8) | (\byte4 & 0xFF) +.endm + /* commands with no parameters */ .macro f3d_noparam cmd - .word (\cmd << 24), 0x00000000 + .word (\cmd << 24) + .word 0 .endm .macro gsImmp1 cmd, param - .word (\cmd << 24), \param + .word (\cmd << 24) + .word \param .endm /* DMA helper */ @@ -27,14 +33,14 @@ /* DMA helper 3*/ .macro gsDma3p cmd, byte2, byte3, byte4, segAddr - .byte \cmd, \byte2, \byte3, \byte4 + bytes4 \cmd, \byte2, \byte3, \byte4 .word \segAddr .endm /* Helper for RGBA colors. */ .macro sDPRGBColor cmd r, g, b, a .word \cmd << 24 - .byte \r, \g, \b, \a + bytes4 \r, \g, \b, \a .endm /* Opcodes */ @@ -667,7 +673,7 @@ .word (\v0*10 << 16) | (\v1*10 << 8) | \v2*10 .endif .else /* Fast3DEX2 */ - .byte G_TRI1, \v0*2, \v1*2, \v2*2 + bytes4 G_TRI1, \v0*2, \v1*2, \v2*2 .word 0 .endif .endm diff --git a/include/PR/gbi_old.h b/include/PR/gbi_old.h index 9e00c2d..f500118 100644 --- a/include/PR/gbi_old.h +++ b/include/PR/gbi_old.h @@ -53,8 +53,8 @@ typedef union typedef struct { - unsigned int w0; - unsigned int w1; + uintptr_t w0; + uintptr_t w1; } Gwords; /* TODO: fill in the rest of the members */ @@ -258,35 +258,35 @@ typedef union /* G_SETOTHERMODE_L render modes */ -#define AA_EN 0x8 -#define Z_CMP 0x10 -#define Z_UPD 0x20 -#define IM_RD 0x40 -#define CLR_ON_CVG 0x80 -#define CVG_DST_CLAMP 0 -#define CVG_DST_WRAP 0x100 -#define CVG_DST_FULL 0x200 -#define CVG_DST_SAVE 0x300 -#define ZMODE_OPA 0 -#define ZMODE_INTER 0x400 -#define ZMODE_XLU 0x800 -#define ZMODE_DEC 0xc00 -#define CVG_X_ALPHA 0x1000 -#define ALPHA_CVG_SEL 0x2000 -#define FORCE_BL 0x4000 -#define TEX_EDGE 0x0000 +#define AA_EN 0x8 +#define Z_CMP 0x10 +#define Z_UPD 0x20 +#define IM_RD 0x40 +#define CLR_ON_CVG 0x80 +#define CVG_DST_CLAMP 0 +#define CVG_DST_WRAP 0x100 +#define CVG_DST_FULL 0x200 +#define CVG_DST_SAVE 0x300 +#define ZMODE_OPA 0 +#define ZMODE_INTER 0x400 +#define ZMODE_XLU 0x800 +#define ZMODE_DEC 0xc00 +#define CVG_X_ALPHA 0x1000 +#define ALPHA_CVG_SEL 0x2000 +#define FORCE_BL 0x4000 +#define TEX_EDGE 0x0000 -#define G_BL_CLR_IN 0 -#define G_BL_CLR_MEM 1 -#define G_BL_CLR_BL 2 -#define G_BL_CLR_FOG 3 -#define G_BL_1MA 0 -#define G_BL_A_MEM 1 -#define G_BL_A_IN 0 -#define G_BL_A_FOG 1 -#define G_BL_A_SHADE 2 -#define G_BL_1 2 -#define G_BL_0 3 +#define G_BL_CLR_IN 0 +#define G_BL_CLR_MEM 1 +#define G_BL_CLR_BL 2 +#define G_BL_CLR_FOG 3 +#define G_BL_1MA 0 +#define G_BL_A_MEM 1 +#define G_BL_A_IN 0 +#define G_BL_A_FOG 1 +#define G_BL_A_SHADE 2 +#define G_BL_1 2 +#define G_BL_0 3 #define GBL_c1(m1a, m1b, m2a, m2b) \ (m1a) << 30 | (m1b) << 26 | (m2a) << 22 | (m2b) << 18 @@ -511,93 +511,93 @@ typedef union -#define G_RM_AA_ZB_OPA_SURF RM_AA_ZB_OPA_SURF(1) -#define G_RM_AA_ZB_OPA_SURF2 RM_AA_ZB_OPA_SURF(2) -#define G_RM_AA_ZB_XLU_SURF RM_AA_ZB_XLU_SURF(1) -#define G_RM_AA_ZB_XLU_SURF2 RM_AA_ZB_XLU_SURF(2) -#define G_RM_AA_ZB_OPA_DECAL RM_AA_ZB_OPA_DECAL(1) -#define G_RM_AA_ZB_OPA_DECAL2 RM_AA_ZB_OPA_DECAL(2) -#define G_RM_AA_ZB_XLU_DECAL RM_AA_ZB_XLU_DECAL(1) -#define G_RM_AA_ZB_XLU_DECAL2 RM_AA_ZB_XLU_DECAL(2) -#define G_RM_AA_ZB_OPA_INTER RM_AA_ZB_OPA_INTER(1) -#define G_RM_AA_ZB_OPA_INTER2 RM_AA_ZB_OPA_INTER(2) -#define G_RM_AA_ZB_XLU_INTER RM_AA_ZB_XLU_INTER(1) -#define G_RM_AA_ZB_XLU_INTER2 RM_AA_ZB_XLU_INTER(2) -#define G_RM_AA_ZB_XLU_LINE RM_AA_ZB_XLU_LINE(1) -#define G_RM_AA_ZB_XLU_LINE2 RM_AA_ZB_XLU_LINE(2) -#define G_RM_AA_ZB_DEC_LINE RM_AA_ZB_DEC_LINE(1) -#define G_RM_AA_ZB_DEC_LINE2 RM_AA_ZB_DEC_LINE(2) -#define G_RM_AA_ZB_TEX_EDGE RM_AA_ZB_TEX_EDGE(1) -#define G_RM_AA_ZB_TEX_EDGE2 RM_AA_ZB_TEX_EDGE(2) -#define G_RM_AA_ZB_TEX_INTER RM_AA_ZB_TEX_INTER(1) -#define G_RM_AA_ZB_TEX_INTER2 RM_AA_ZB_TEX_INTER(2) -#define G_RM_AA_ZB_SUB_SURF RM_AA_ZB_SUB_SURF(1) -#define G_RM_AA_ZB_SUB_SURF2 RM_AA_ZB_SUB_SURF(2) -#define G_RM_AA_ZB_PCL_SURF RM_AA_ZB_PCL_SURF(1) -#define G_RM_AA_ZB_PCL_SURF2 RM_AA_ZB_PCL_SURF(2) -#define G_RM_AA_ZB_OPA_TERR RM_AA_ZB_OPA_TERR(1) -#define G_RM_AA_ZB_OPA_TERR2 RM_AA_ZB_OPA_TERR(2) -#define G_RM_AA_ZB_TEX_TERR RM_AA_ZB_TEX_TERR(1) -#define G_RM_AA_ZB_TEX_TERR2 RM_AA_ZB_TEX_TERR(2) -#define G_RM_AA_ZB_SUB_TERR RM_AA_ZB_SUB_TERR(1) -#define G_RM_AA_ZB_SUB_TERR2 RM_AA_ZB_SUB_TERR(2) +#define G_RM_AA_ZB_OPA_SURF RM_AA_ZB_OPA_SURF(1) +#define G_RM_AA_ZB_OPA_SURF2 RM_AA_ZB_OPA_SURF(2) +#define G_RM_AA_ZB_XLU_SURF RM_AA_ZB_XLU_SURF(1) +#define G_RM_AA_ZB_XLU_SURF2 RM_AA_ZB_XLU_SURF(2) +#define G_RM_AA_ZB_OPA_DECAL RM_AA_ZB_OPA_DECAL(1) +#define G_RM_AA_ZB_OPA_DECAL2 RM_AA_ZB_OPA_DECAL(2) +#define G_RM_AA_ZB_XLU_DECAL RM_AA_ZB_XLU_DECAL(1) +#define G_RM_AA_ZB_XLU_DECAL2 RM_AA_ZB_XLU_DECAL(2) +#define G_RM_AA_ZB_OPA_INTER RM_AA_ZB_OPA_INTER(1) +#define G_RM_AA_ZB_OPA_INTER2 RM_AA_ZB_OPA_INTER(2) +#define G_RM_AA_ZB_XLU_INTER RM_AA_ZB_XLU_INTER(1) +#define G_RM_AA_ZB_XLU_INTER2 RM_AA_ZB_XLU_INTER(2) +#define G_RM_AA_ZB_XLU_LINE RM_AA_ZB_XLU_LINE(1) +#define G_RM_AA_ZB_XLU_LINE2 RM_AA_ZB_XLU_LINE(2) +#define G_RM_AA_ZB_DEC_LINE RM_AA_ZB_DEC_LINE(1) +#define G_RM_AA_ZB_DEC_LINE2 RM_AA_ZB_DEC_LINE(2) +#define G_RM_AA_ZB_TEX_EDGE RM_AA_ZB_TEX_EDGE(1) +#define G_RM_AA_ZB_TEX_EDGE2 RM_AA_ZB_TEX_EDGE(2) +#define G_RM_AA_ZB_TEX_INTER RM_AA_ZB_TEX_INTER(1) +#define G_RM_AA_ZB_TEX_INTER2 RM_AA_ZB_TEX_INTER(2) +#define G_RM_AA_ZB_SUB_SURF RM_AA_ZB_SUB_SURF(1) +#define G_RM_AA_ZB_SUB_SURF2 RM_AA_ZB_SUB_SURF(2) +#define G_RM_AA_ZB_PCL_SURF RM_AA_ZB_PCL_SURF(1) +#define G_RM_AA_ZB_PCL_SURF2 RM_AA_ZB_PCL_SURF(2) +#define G_RM_AA_ZB_OPA_TERR RM_AA_ZB_OPA_TERR(1) +#define G_RM_AA_ZB_OPA_TERR2 RM_AA_ZB_OPA_TERR(2) +#define G_RM_AA_ZB_TEX_TERR RM_AA_ZB_TEX_TERR(1) +#define G_RM_AA_ZB_TEX_TERR2 RM_AA_ZB_TEX_TERR(2) +#define G_RM_AA_ZB_SUB_TERR RM_AA_ZB_SUB_TERR(1) +#define G_RM_AA_ZB_SUB_TERR2 RM_AA_ZB_SUB_TERR(2) -#define G_RM_RA_ZB_OPA_SURF RM_RA_ZB_OPA_SURF(1) -#define G_RM_RA_ZB_OPA_SURF2 RM_RA_ZB_OPA_SURF(2) -#define G_RM_RA_ZB_OPA_DECAL RM_RA_ZB_OPA_DECAL(1) -#define G_RM_RA_ZB_OPA_DECAL2 RM_RA_ZB_OPA_DECAL(2) -#define G_RM_RA_ZB_OPA_INTER RM_RA_ZB_OPA_INTER(1) -#define G_RM_RA_ZB_OPA_INTER2 RM_RA_ZB_OPA_INTER(2) +#define G_RM_RA_ZB_OPA_SURF RM_RA_ZB_OPA_SURF(1) +#define G_RM_RA_ZB_OPA_SURF2 RM_RA_ZB_OPA_SURF(2) +#define G_RM_RA_ZB_OPA_DECAL RM_RA_ZB_OPA_DECAL(1) +#define G_RM_RA_ZB_OPA_DECAL2 RM_RA_ZB_OPA_DECAL(2) +#define G_RM_RA_ZB_OPA_INTER RM_RA_ZB_OPA_INTER(1) +#define G_RM_RA_ZB_OPA_INTER2 RM_RA_ZB_OPA_INTER(2) -#define G_RM_AA_OPA_SURF RM_AA_OPA_SURF(1) -#define G_RM_AA_OPA_SURF2 RM_AA_OPA_SURF(2) -#define G_RM_AA_XLU_SURF RM_AA_XLU_SURF(1) -#define G_RM_AA_XLU_SURF2 RM_AA_XLU_SURF(2) -#define G_RM_AA_XLU_LINE RM_AA_XLU_LINE(1) -#define G_RM_AA_XLU_LINE2 RM_AA_XLU_LINE(2) -#define G_RM_AA_DEC_LINE RM_AA_DEC_LINE(1) -#define G_RM_AA_DEC_LINE2 RM_AA_DEC_LINE(2) -#define G_RM_AA_TEX_EDGE RM_AA_TEX_EDGE(1) -#define G_RM_AA_TEX_EDGE2 RM_AA_TEX_EDGE(2) -#define G_RM_AA_SUB_SURF RM_AA_SUB_SURF(1) -#define G_RM_AA_SUB_SURF2 RM_AA_SUB_SURF(2) -#define G_RM_AA_PCL_SURF RM_AA_PCL_SURF(1) -#define G_RM_AA_PCL_SURF2 RM_AA_PCL_SURF(2) -#define G_RM_AA_OPA_TERR RM_AA_OPA_TERR(1) -#define G_RM_AA_OPA_TERR2 RM_AA_OPA_TERR(2) -#define G_RM_AA_TEX_TERR RM_AA_TEX_TERR(1) -#define G_RM_AA_TEX_TERR2 RM_AA_TEX_TERR(2) -#define G_RM_AA_SUB_TERR RM_AA_SUB_TERR(1) -#define G_RM_AA_SUB_TERR2 RM_AA_SUB_TERR(2) +#define G_RM_AA_OPA_SURF RM_AA_OPA_SURF(1) +#define G_RM_AA_OPA_SURF2 RM_AA_OPA_SURF(2) +#define G_RM_AA_XLU_SURF RM_AA_XLU_SURF(1) +#define G_RM_AA_XLU_SURF2 RM_AA_XLU_SURF(2) +#define G_RM_AA_XLU_LINE RM_AA_XLU_LINE(1) +#define G_RM_AA_XLU_LINE2 RM_AA_XLU_LINE(2) +#define G_RM_AA_DEC_LINE RM_AA_DEC_LINE(1) +#define G_RM_AA_DEC_LINE2 RM_AA_DEC_LINE(2) +#define G_RM_AA_TEX_EDGE RM_AA_TEX_EDGE(1) +#define G_RM_AA_TEX_EDGE2 RM_AA_TEX_EDGE(2) +#define G_RM_AA_SUB_SURF RM_AA_SUB_SURF(1) +#define G_RM_AA_SUB_SURF2 RM_AA_SUB_SURF(2) +#define G_RM_AA_PCL_SURF RM_AA_PCL_SURF(1) +#define G_RM_AA_PCL_SURF2 RM_AA_PCL_SURF(2) +#define G_RM_AA_OPA_TERR RM_AA_OPA_TERR(1) +#define G_RM_AA_OPA_TERR2 RM_AA_OPA_TERR(2) +#define G_RM_AA_TEX_TERR RM_AA_TEX_TERR(1) +#define G_RM_AA_TEX_TERR2 RM_AA_TEX_TERR(2) +#define G_RM_AA_SUB_TERR RM_AA_SUB_TERR(1) +#define G_RM_AA_SUB_TERR2 RM_AA_SUB_TERR(2) -#define G_RM_RA_OPA_SURF RM_RA_OPA_SURF(1) -#define G_RM_RA_OPA_SURF2 RM_RA_OPA_SURF(2) +#define G_RM_RA_OPA_SURF RM_RA_OPA_SURF(1) +#define G_RM_RA_OPA_SURF2 RM_RA_OPA_SURF(2) -#define G_RM_ZB_OPA_SURF RM_ZB_OPA_SURF(1) -#define G_RM_ZB_OPA_SURF2 RM_ZB_OPA_SURF(2) -#define G_RM_ZB_XLU_SURF RM_ZB_XLU_SURF(1) -#define G_RM_ZB_XLU_SURF2 RM_ZB_XLU_SURF(2) -#define G_RM_ZB_OPA_DECAL RM_ZB_OPA_DECAL(1) -#define G_RM_ZB_OPA_DECAL2 RM_ZB_OPA_DECAL(2) -#define G_RM_ZB_XLU_DECAL RM_ZB_XLU_DECAL(1) -#define G_RM_ZB_XLU_DECAL2 RM_ZB_XLU_DECAL(2) -#define G_RM_ZB_CLD_SURF RM_ZB_CLD_SURF(1) -#define G_RM_ZB_CLD_SURF2 RM_ZB_CLD_SURF(2) -#define G_RM_ZB_OVL_SURF RM_ZB_OVL_SURF(1) -#define G_RM_ZB_OVL_SURF2 RM_ZB_OVL_SURF(2) -#define G_RM_ZB_PCL_SURF RM_ZB_PCL_SURF(1) -#define G_RM_ZB_PCL_SURF2 RM_ZB_PCL_SURF(2) +#define G_RM_ZB_OPA_SURF RM_ZB_OPA_SURF(1) +#define G_RM_ZB_OPA_SURF2 RM_ZB_OPA_SURF(2) +#define G_RM_ZB_XLU_SURF RM_ZB_XLU_SURF(1) +#define G_RM_ZB_XLU_SURF2 RM_ZB_XLU_SURF(2) +#define G_RM_ZB_OPA_DECAL RM_ZB_OPA_DECAL(1) +#define G_RM_ZB_OPA_DECAL2 RM_ZB_OPA_DECAL(2) +#define G_RM_ZB_XLU_DECAL RM_ZB_XLU_DECAL(1) +#define G_RM_ZB_XLU_DECAL2 RM_ZB_XLU_DECAL(2) +#define G_RM_ZB_CLD_SURF RM_ZB_CLD_SURF(1) +#define G_RM_ZB_CLD_SURF2 RM_ZB_CLD_SURF(2) +#define G_RM_ZB_OVL_SURF RM_ZB_OVL_SURF(1) +#define G_RM_ZB_OVL_SURF2 RM_ZB_OVL_SURF(2) +#define G_RM_ZB_PCL_SURF RM_ZB_PCL_SURF(1) +#define G_RM_ZB_PCL_SURF2 RM_ZB_PCL_SURF(2) -#define G_RM_OPA_SURF RM_OPA_SURF(1) -#define G_RM_OPA_SURF2 RM_OPA_SURF(2) -#define G_RM_XLU_SURF RM_XLU_SURF(1) -#define G_RM_XLU_SURF2 RM_XLU_SURF(2) -#define G_RM_CLD_SURF RM_CLD_SURF(1) -#define G_RM_CLD_SURF2 RM_CLD_SURF(2) -#define G_RM_TEX_EDGE RM_TEX_EDGE(1) -#define G_RM_TEX_EDGE2 RM_TEX_EDGE(2) -#define G_RM_PCL_SURF RM_PCL_SURF(1) -#define G_RM_PCL_SURF2 RM_PCL_SURF(2) +#define G_RM_OPA_SURF RM_OPA_SURF(1) +#define G_RM_OPA_SURF2 RM_OPA_SURF(2) +#define G_RM_XLU_SURF RM_XLU_SURF(1) +#define G_RM_XLU_SURF2 RM_XLU_SURF(2) +#define G_RM_CLD_SURF RM_CLD_SURF(1) +#define G_RM_CLD_SURF2 RM_CLD_SURF(2) +#define G_RM_TEX_EDGE RM_TEX_EDGE(1) +#define G_RM_TEX_EDGE2 RM_TEX_EDGE(2) +#define G_RM_PCL_SURF RM_PCL_SURF(1) +#define G_RM_PCL_SURF2 RM_PCL_SURF(2) #define G_RM_ADD RM_ADD(1) #define G_RM_ADD2 RM_ADD(2) #define G_RM_NOOP RM_NOOP(1) @@ -608,14 +608,14 @@ typedef union #define G_RM_OPA_CI2 RM_OPA_CI(2) -#define G_RM_FOG_SHADE_A GBL_c1(G_BL_CLR_FOG, G_BL_A_SHADE, G_BL_CLR_IN, G_BL_1MA) -#define G_RM_FOG_PRIM_A GBL_c1(G_BL_CLR_FOG, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA) -#define G_RM_PASS GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1) +#define G_RM_FOG_SHADE_A GBL_c1(G_BL_CLR_FOG, G_BL_A_SHADE, G_BL_CLR_IN, G_BL_1MA) +#define G_RM_FOG_PRIM_A GBL_c1(G_BL_CLR_FOG, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA) +#define G_RM_PASS GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_IN, G_BL_1) #define G_MWO_NUMLIGHT 0x00 #define G_MW_NUMLIGHT 0x02 #define NUML(n) (((n)+1)*32 + 0x80000000) -#define G_MW_PERSPNORM 0x0e +#define G_MW_PERSPNORM 0x0e #ifndef MAX #define MAX(a, b) ((a) > (b) ? (a) : (b)) @@ -630,16 +630,16 @@ typedef union #define gDma1p(pkt, c, s, l, p) \ { \ Gfx *_g = (Gfx *)(pkt); \ - _g->words.w0 = (_SHIFTL((c), 24, 8) | _SHIFTL((p), 16, 8) | \ - _SHIFTL((l), 0, 16)); \ - _g->words.w1 = (unsigned int)(s); \ + _g->words.w0 = (_SHIFTL((c), 24, 8) | _SHIFTL((p), 16, 8) \ + | _SHIFTL((l), 0, 16)); \ + _g->words.w1 = (uintptr_t)(s); \ } #define gsDma1p(c, s, l, p) \ { \ - _g->words.w0 = (_SHIFTL((c), 24, 8) | _SHIFTL((p), 16, 8) | \ - _SHIFTL((l), 0, 16)); \ - _g->words.w1 = (unsigned int)(s); \ + _g->words.w0 = (_SHIFTL((c), 24, 8) | _SHIFTL((p), 16, 8) \ + | _SHIFTL((l), 0, 16)); \ + _g->words.w1 = (uintptr_t)(s); \ } /* Matrix */ @@ -650,7 +650,7 @@ typedef union _g->words.w0 = _SHIFTL(G_MTX, 24, 8) \ | _SHIFTL((p), 16, 8) \ | _SHIFTL(sizeof(Mtx), 0, 16); \ - _g->words.w1 = (u32)(m); \ + _g->words.w1 = (uintptr_t)(m); \ } #define gsSPMatrix(m, p) \ @@ -658,7 +658,7 @@ typedef union _g->words.w0 = _SHIFTL(G_MTX, 24, 8) \ | _SHIFTL((p), 16, 8) \ | _SHIFTL(sizeof(Mtx), 0, 16); \ - _g->words.w1 = (u32)(m); \ + _g->words.w1 = (uintptr_t)(m); \ } /* Vertex */ @@ -671,7 +671,7 @@ typedef union _g->words.w0 = _SHIFTL(G_VTX, 24, 8) \ | _SHIFTL(((n)-1) << 4 | (v0), 16, 8) \ | _SHIFTL(sizeof(Vtx)*(n), 0, 16); \ - _g->words.w1 = (u32)(v); \ + _g->words.w1 = (uintptr_t)(v); \ } #define gsSPVertex(v, n, v0) \ @@ -679,7 +679,7 @@ typedef union _g->words.w0 = _SHIFTL(G_VTX, 24, 8) \ | _SHIFTL(((n)-1) << 4 | (v0), 16, 8) \ | _SHIFTL(sizeof(Vtx)*(n), 0, 16); \ - _g->words.w1 = (u32)(v); \ + _g->words.w1 = (uintptr_t)(v); \ } #else /* Fast3DEX */ @@ -689,7 +689,7 @@ typedef union _g->words.w0 = _SHIFTL(G_VTX, 24, 8) \ | _SHIFTL(((v0)*2), 16, 8) \ | _SHIFTL((n << 10) | ((sizeof(Vtx)*(n))-1), 0, 16); \ - _g->words.w1 = (u32)(v); \ + _g->words.w1 = (uintptr_t)(v); \ } #define gsSPVertex(v, n, v0) \ @@ -697,7 +697,7 @@ typedef union _g->words.w0 = _SHIFTL(G_VTX, 24, 8) \ | _SHIFTL(((v0)*2), 16, 8) \ | _SHIFTL((n << 10) | ((sizeof(Vtx)*(n))-1), 0, 16); \ - _g->words.w1 = (u32)(v); \ + _g->words.w1 = (uintptr_t)(v); \ } #endif @@ -767,13 +767,13 @@ typedef union { \ Gfx *_g = (Gfx *) (pkt); \ _g->words.w0 = _SHIFTL(G_DL, 24, 8); \ - _g->words.w1 = (u32)(dl); \ + _g->words.w1 = (uintptr_t)(dl); \ } #define gsSPDisplayList(dl) \ { \ _g->words.w0 = _SHIFTL(G_DL, 24, 8); \ - _g->words.w1 = (u32)(dl); \ + _g->words.w1 = (uintptr_t)(dl); \ } /* BranchList */ @@ -1186,7 +1186,7 @@ typedef union /* SetPrimColor */ -#define gDPSetPrimColor(pkt, m, l, r, g, b, a) \ +#define gDPSetPrimColor(pkt, m, l, r, g, b, a) \ { \ Gfx *_g = (Gfx *)(pkt); \ _g->words.w0 = _SHIFTL(G_SETPRIMCOLOR, 24, 8) \ @@ -1198,7 +1198,7 @@ typedef union | _SHIFTL(a, 0, 8); \ } -#define gsDPSetPrimColor(m, l, r, g, b, a) \ +#define gsDPSetPrimColor(m, l, r, g, b, a) \ { \ _g->words.w0 = _SHIFTL(G_SETPRIMCOLOR, 24, 8) \ | _SHIFTL(m, 8, 8) \ @@ -1239,7 +1239,7 @@ typedef union | _SHIFTL((fmt), 21, 3) \ | _SHIFTL((size), 19, 2) \ | _SHIFTL((width)-1, 0, 12); \ - _g->words.w1 = (u32)(img); \ + _g->words.w1 = (uintptr_t)(img); \ } #define gsDPSetTextureImage(fmt, size, width, img) \ @@ -1248,7 +1248,7 @@ typedef union | _SHIFTL((fmt), 21, 3) \ | _SHIFTL((size), 19, 2) \ | _SHIFTL((width)-1, 0, 12); \ - _g->words.w1 = (u32)(img); \ + _g->words.w1 = (uintptr_t)(img); \ } /* MoveWd */ @@ -1259,7 +1259,7 @@ typedef union _g->words.w0 = _SHIFTL(G_MOVEWORD, 24, 8) \ | _SHIFTL((offset), 8, 16) \ | _SHIFTL((index), 0, 8); \ - _g->words.w1 = (u32)(data); \ + _g->words.w1 = (uintptr_t)(data); \ } #define gsMoveWd(index, offset, data) \ @@ -1267,7 +1267,7 @@ typedef union _g->words.w0 = _SHIFTL(G_MOVEWORD, 24, 8) \ | _SHIFTL((offset), 8, 16) \ | _SHIFTL((index), 0, 8); \ - _g->words.w1 = (u32)(data); \ + _g->words.w1 = (uintptr_t)(data); \ } /* Matrix Operations */ @@ -1302,7 +1302,7 @@ typedef union _g->words.w0 = _SHIFTL(G_MOVEMEM, 24, 8) \ | _SHIFTL(G_MV_VIEWPORT, 16, 8) \ | _SHIFTL(sizeof(Vp), 0, 16); \ - _g->words.w1 = (u32)(v); \ + _g->words.w1 = (uintptr_t)(v); \ } #define gsSPViewport(v) \ @@ -1310,7 +1310,7 @@ typedef union _g->words.w0 = _SHIFTL(G_MOVEMEM, 24, 8) \ | _SHIFTL(G_MV_VIEWPORT, 16, 8) \ | _SHIFTL(sizeof(Vp), 0, 16); \ - _g->words.w1 = (u32)(v); \ + _g->words.w1 = (uintptr_t)(v); \ } /* 1Triangle */ @@ -1429,7 +1429,7 @@ typedef union | _SHIFTL((dtdy), 0, 16); \ } -#define gsSPTextureRectangle(xl, yl, xh, yh, tile, s, t, dsdx, dtdy) \ +#define gsSPTextureRectangle(xl, yl, xh, yh, tile, s, t, dsdx, dtdy) \ { \ _g->words.w0 = _SHIFTL(G_TEXRECT, 24, 8) \ | _SHIFTL((xh), 12, 12) \ @@ -1511,7 +1511,7 @@ typedef union { #define LIGHT_2 2 #define LIGHT_3 3 #define LIGHT_4 4 -#define LIGHT_5 5 +#define LIGHT_5 5 #define LIGHT_6 6 #define LIGHT_7 7 #define LIGHT_8 8 @@ -1524,7 +1524,7 @@ typedef union { _g->words.w0 = _SHIFTL(G_MOVEMEM, 24, 8) \ | _SHIFTL(((n)-1)*2+G_MV_L0, 16, 8) \ | _SHIFTL(sizeof(Light), 0, 16); \ - _g->words.w1 = (u32)(l); \ + _g->words.w1 = (uintptr_t)(l); \ } #define gsSPLight(l, n) \ @@ -1532,7 +1532,7 @@ typedef union { _g->words.w0 = _SHIFTL(G_MOVEMEM, 24, 8) \ | _SHIFTL(((n)-1)*2+G_MV_L0, 16, 8) \ | _SHIFTL(sizeof(Light), 0, 16); \ - _g->words.w1 = (u32)(l); \ + _g->words.w1 = (uintptr_t)(l); \ } /* LookAtX */ @@ -1543,7 +1543,7 @@ typedef union { _g->words.w0 = _SHIFTL(G_MOVEMEM, 24, 8) \ | _SHIFTL(G_MV_LOOKATX, 16, 8) \ | _SHIFTL(sizeof(Light), 0, 16); \ - _g->words.w1 = (u32)(la); \ + _g->words.w1 = (uintptr_t)(la); \ } #define gsSPLookAtX(la) \ @@ -1551,7 +1551,7 @@ typedef union { _g->words.w0 = _SHIFTL(G_MOVEMEM, 24, 8) \ | _SHIFTL(G_MV_LOOKATX, 16, 8) \ | _SHIFTL(sizeof(Light), 0, 16); \ - _g->words.w1 = (u32)(la); \ + _g->words.w1 = (uintptr_t)(la); \ } /* LookAtY */ @@ -1562,7 +1562,7 @@ typedef union { _g->words.w0 = _SHIFTL(G_MOVEMEM, 24, 8) \ | _SHIFTL(G_MV_LOOKATY, 16, 8) \ | _SHIFTL(sizeof(Light), 0, 16); \ - _g->words.w1 = (u32)(la); \ + _g->words.w1 = (uintptr_t)(la); \ } #define gsSPLookAtY(la) \ @@ -1570,7 +1570,7 @@ typedef union { _g->words.w0 = _SHIFTL(G_MOVEMEM, 24, 8) \ | _SHIFTL(G_MV_LOOKATY, 16, 8) \ | _SHIFTL(sizeof(Light), 0, 16); \ - _g->words.w1 = (u32)(la); \ + _g->words.w1 = (uintptr_t)(la); \ } /* LookAt */ @@ -1605,10 +1605,10 @@ typedef union { #else #define gSPPerspNormalize(pkt, s) \ - gMoveWd(pkt, G_MW_PERSPNORM, 0, (s)) + gMoveWd(pkt, G_MW_PERSPNORM, 0, (s)) #define gsSPPerspNormalize(s) \ - gsMoveWd(G_MW_PERSPNORM, 0, (s)) + gsMoveWd(G_MW_PERSPNORM, 0, (s)) #endif #endif diff --git a/include/PR/os_cache.h b/include/PR/os_cache.h index 54ed923..93d53c5 100644 --- a/include/PR/os_cache.h +++ b/include/PR/os_cache.h @@ -81,9 +81,9 @@ extern "C" { /* Cache operations and macros */ -extern void osInvalDCache(void *, s32); -extern void osInvalICache(void *, s32); -extern void osWritebackDCache(void *, s32); +extern void osInvalDCache(void *, size_t); +extern void osInvalICache(void *, size_t); +extern void osWritebackDCache(void *, size_t); extern void osWritebackDCacheAll(void); diff --git a/include/PR/os_misc.h b/include/PR/os_misc.h index fecc4e7..6b7f6e6 100644 --- a/include/PR/os_misc.h +++ b/include/PR/os_misc.h @@ -6,6 +6,6 @@ void osInitialize(void); u32 osGetCount(void); -u32 osVirtualToPhysical(void *); +uintptr_t osVirtualToPhysical(void *); #endif diff --git a/include/PR/os_pi.h b/include/PR/os_pi.h index 591264c..1d4176f 100644 --- a/include/PR/os_pi.h +++ b/include/PR/os_pi.h @@ -21,7 +21,7 @@ typedef struct u16 transferMode; u16 blockNum; s32 sectorNum; - u32 devAddr; + uintptr_t devAddr; u32 bmCtlShadow; u32 seqCtlShadow; __OSBlockInfo block[2]; @@ -44,7 +44,7 @@ typedef struct OSPiHandle_s typedef struct { u8 type; - u32 address; + uintptr_t address; } OSPiInfo; typedef struct @@ -59,8 +59,8 @@ typedef struct { /*0x00*/ OSIoMesgHdr hdr; /*0x08*/ void *dramAddr; - /*0x0C*/ u32 devAddr; - /*0x10*/ u32 size; + /*0x0C*/ uintptr_t devAddr; + /*0x10*/ size_t size; //OSPiHandle *piHandle; //from the official definition } OSIoMesg; @@ -75,11 +75,11 @@ typedef struct /* Functions */ s32 osPiStartDma(OSIoMesg *mb, s32 priority, s32 direction, - u32 devAddr, void *vAddr, u32 nbytes, OSMesgQueue *mq); + uintptr_t devAddr, void *vAddr, size_t nbytes, OSMesgQueue *mq); void osCreatePiManager(OSPri pri, OSMesgQueue *cmdQ, OSMesg *cmdBuf, s32 cmdMsgCnt); OSMesgQueue *osPiGetCmdQueue(void); -s32 osPiWriteIo(u32 devAddr, u32 data); -s32 osPiReadIo(u32 devAddr, u32 *data); +s32 osPiWriteIo(uintptr_t devAddr, u32 data); +s32 osPiReadIo(uintptr_t devAddr, u32 *data); #endif diff --git a/include/PR/ultratypes.h b/include/PR/ultratypes.h index 5e7d313..ab9ebc1 100644 --- a/include/PR/ultratypes.h +++ b/include/PR/ultratypes.h @@ -29,6 +29,18 @@ typedef volatile s64 vs64; typedef float f32; typedef double f64; -typedef unsigned long size_t; +#ifdef __x86_64__ +typedef u64 size_t; +typedef s64 ssize_t; +typedef u64 uintptr_t; +typedef s64 intptr_t; +typedef s64 ptrdiff_t; +#else +typedef u32 size_t; +typedef s32 ssize_t; +typedef u32 uintptr_t; +typedef s32 intptr_t; +typedef s32 ptrdiff_t; +#endif #endif diff --git a/include/audio_defines.h b/include/audio_defines.h index 6ba8e1e..b5a3e7e 100644 --- a/include/audio_defines.h +++ b/include/audio_defines.h @@ -44,47 +44,44 @@ * The table below defines all sounds that exist in the game, and which flags * they are used with. If a sound is used with multiple sets of flags (e.g. * different priorities), they are gives distinguishing suffixes. - * Some sounds are given as 2-byte values rather than SOUND_ARG_LOAD calls. - * These sounds are not directly referenced by the game; either they are - * unused, or they are computed rather than referred to literally, or they - * are loaded from another bank somehow (e.g. bank 9 and 5 use the same - * sounds, as do 8 and 3). + * A _2 suffix means the sound is the same despite a different sound ID. + * Some sounds are unused by the game, and given as hexadecimal literals rather + * than SOUND_ARG_LOAD calls. */ /* Terrain sounds */ /** - * Terrain-dependent sounds. mario_get_step_noise computes a sound terrain type - * between 0 and 7, depending on the terrain type of the level and the - * floor type that Mario is standing on. That value is then added to the - * sound ID for the six SOUND_TERRAIN_* sounds. - * - * The sound terrain types represent the following: - * 0: default, uses terrain value from level script cmd31 - * 1: grass - * 2: water - * 3: stone - * 4: squeaky floor - * 5: squeaky floor again?, slides - * 6: snow - * 7: sand - * - * TODO: figure out what these sounds are. + * Terrain-dependent action sounds. mario_get_terrain_sound_addend computes a + * sound terrain type between 0 and 7, depending on the terrain type of the + * level and the floor type that Mario is standing on. That value is then added + * to the sound ID for the TERRAIN_* sounds. */ -/* not verified */ #define SOUND_TERRAIN_1 SOUND_ARG_LOAD(0, 4, 0x00, 0x80, 8) -/* not verified */ #define SOUND_TERRAIN_2 SOUND_ARG_LOAD(0, 4, 0x08, 0x80, 8) -/* not verified */ #define SOUND_TERRAIN_3 SOUND_ARG_LOAD(0, 6, 0x10, 0x80, 8) -/* not verified */ #define SOUND_TERRAIN_4 SOUND_ARG_LOAD(0, 4, 0x18, 0x80, 8) -/* not verified */ #define SOUND_TERRAIN_5 SOUND_ARG_LOAD(0, 6, 0x20, 0x80, 8) +#define SOUND_TERRAIN_DEFAULT 0 // e.g. air +#define SOUND_TERRAIN_GRASS 1 +#define SOUND_TERRAIN_WATER 2 +#define SOUND_TERRAIN_STONE 3 +#define SOUND_TERRAIN_SPOOKY 4 // squeaky floor +#define SOUND_TERRAIN_SNOW 5 +#define SOUND_TERRAIN_ICE 6 +#define SOUND_TERRAIN_SAND 7 -/* not verified */ #define SOUND_ACTION_UNKNOWN428 SOUND_ARG_LOAD(0, 4, 0x28, 0x90, 8) -/* not verified */ #define SOUND_ACTION_UNKNOWN429 SOUND_ARG_LOAD(0, 4, 0x29, 0x90, 8) -/* not verified */ #define SOUND_ACTION_UNKNOWN42A SOUND_ARG_LOAD(0, 4, 0x2A, 0x90, 8) -/* not verified */ #define SOUND_ACTION_UNKNOWN42B SOUND_ARG_LOAD(0, 4, 0x2B, 0x90, 8) -/* not verified */ #define SOUND_ACTION_UNKNOWN62C SOUND_ARG_LOAD(0, 6, 0x2C, 0x00, 8) -/* not verified */ #define SOUND_ACTION_UNKNOWN42D SOUND_ARG_LOAD(0, 4, 0x2D, 0xA0, 8) -/* not verified */ #define SOUND_ACTION_UNKNOWN42E SOUND_ARG_LOAD(0, 4, 0x2E, 0x00, 8) -/* not verified */ #define SOUND_ACTION_UNKNOWN42F SOUND_ARG_LOAD(0, 4, 0x2F, 0x90, 8) +#define SOUND_ACTION_TERRAIN_JUMP SOUND_ARG_LOAD(0, 4, 0x00, 0x80, 8) +#define SOUND_ACTION_TERRAIN_LANDING SOUND_ARG_LOAD(0, 4, 0x08, 0x80, 8) +#define SOUND_ACTION_TERRAIN_STEP SOUND_ARG_LOAD(0, 6, 0x10, 0x80, 8) +#define SOUND_ACTION_TERRAIN_BODY_HIT_GROUND SOUND_ARG_LOAD(0, 4, 0x18, 0x80, 8) +#define SOUND_ACTION_TERRAIN_STEP_TIPTOE SOUND_ARG_LOAD(0, 6, 0x20, 0x80, 8) +#define SOUND_ACTION_TERRAIN_STUCK_IN_GROUND SOUND_ARG_LOAD(0, 4, 0x48, 0x80, 8) +#define SOUND_ACTION_TERRAIN_HEAVY_LANDING SOUND_ARG_LOAD(0, 4, 0x60, 0x80, 8) + +#define SOUND_ACTION_METAL_JUMP SOUND_ARG_LOAD(0, 4, 0x28, 0x90, 8) +#define SOUND_ACTION_METAL_LANDING SOUND_ARG_LOAD(0, 4, 0x29, 0x90, 8) +#define SOUND_ACTION_METAL_STEP SOUND_ARG_LOAD(0, 4, 0x2A, 0x90, 8) +#define SOUND_ACTION_METAL_HEAVY_LANDING SOUND_ARG_LOAD(0, 4, 0x2B, 0x90, 8) +#define SOUND_ACTION_CLAP_HANDS_COLD SOUND_ARG_LOAD(0, 6, 0x2C, 0x00, 8) +#define SOUND_ACTION_HANGING_STEP SOUND_ARG_LOAD(0, 4, 0x2D, 0xA0, 8) +#define SOUND_ACTION_QUICKSAND_STEP SOUND_ARG_LOAD(0, 4, 0x2E, 0x00, 8) +#define SOUND_ACTION_METAL_STEP_TIPTOE SOUND_ARG_LOAD(0, 4, 0x2F, 0x90, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN430 SOUND_ARG_LOAD(0, 4, 0x30, 0xC0, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN431 SOUND_ARG_LOAD(0, 4, 0x31, 0x60, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN432 SOUND_ARG_LOAD(0, 4, 0x32, 0x80, 8) @@ -93,16 +90,15 @@ /* not verified */ #define SOUND_ACTION_UNKNOWN435 SOUND_ARG_LOAD(0, 4, 0x35, 0x80, 8) /* not verified */ #define SOUND_ACTION_SWISH1 SOUND_ARG_LOAD(0, 4, 0x36, 0x80, 8) /* not verified */ #define SOUND_ACTION_SWISH2 SOUND_ARG_LOAD(0, 4, 0x37, 0x80, 8) -/* not verified */ #define SOUND_ACTION_UNKNOWN438 SOUND_ARG_LOAD(0, 4, 0x38, 0x80, 8) -// 0x39? -/* not verified */ #define SOUND_ACTION_CLIMBUPTREE SOUND_ARG_LOAD(0, 4, 0x3A, 0x80, 8) -/* not verified */ #define SOUND_ACTION_CLIMBDOWNTREE 0x043B -/* not verified */ #define SOUND_ACTION_UNKNOWN43C 0x043C +/* not verified */ #define SOUND_ACTION_SWISH2_2 SOUND_ARG_LOAD(0, 4, 0x38, 0x80, 8) +/* not verified */ #define SOUND_ACTION_CLIMB_UP_TREE SOUND_ARG_LOAD(0, 4, 0x3A, 0x80, 8) +/* not verified */ #define SOUND_ACTION_CLIMB_DOWN_TREE 0x003B +/* not verified */ #define SOUND_ACTION_UNK3C 0x003C /* not verified */ #define SOUND_ACTION_UNKNOWN43D SOUND_ARG_LOAD(0, 4, 0x3D, 0x80, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN43E SOUND_ARG_LOAD(0, 4, 0x3E, 0x80, 8) -/* not verified */ #define SOUND_ACTION_PATBACK SOUND_ARG_LOAD(0, 4, 0x3F, 0x80, 8) -/* not verified */ #define SOUND_ACTION_BRUSHHAIR SOUND_ARG_LOAD(0, 4, 0x40, 0x80, 8) -/* not verified */ #define SOUND_ACTION_UNKNOWN441 SOUND_ARG_LOAD(0, 4, 0x41, 0x80, 8) +/* not verified */ #define SOUND_ACTION_PAT_BACK SOUND_ARG_LOAD(0, 4, 0x3F, 0x80, 8) +/* not verified */ #define SOUND_ACTION_BRUSH_HAIR SOUND_ARG_LOAD(0, 4, 0x40, 0x80, 8) +/* not verified */ #define SOUND_ACTION_CLIMB_UP_POLE SOUND_ARG_LOAD(0, 4, 0x41, 0x80, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN442 SOUND_ARG_LOAD(0, 4, 0x42, 0x80, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN443 SOUND_ARG_LOAD(0, 4, 0x43, 0x80, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN444 SOUND_ARG_LOAD(0, 4, 0x44, 0xC0, 8) @@ -111,11 +107,12 @@ /* not verified */ #define SOUND_ACTION_UNKNOWN445 SOUND_ARG_LOAD(0, 4, 0x45, 0xA0, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN446 SOUND_ARG_LOAD(0, 4, 0x46, 0xA0, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN447 SOUND_ARG_LOAD(0, 4, 0x47, 0xA0, 8) -/* not verified */ #define SOUND_TERRAIN_6 SOUND_ARG_LOAD(0, 4, 0x48, 0x80, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN450 SOUND_ARG_LOAD(0, 4, 0x50, 0x90, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN451 SOUND_ARG_LOAD(0, 4, 0x51, 0x90, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN452 SOUND_ARG_LOAD(0, 4, 0x52, 0x90, 8) -// 0x53, 0x54, 0x55? +/* not verified */ #define SOUND_ACTION_UNK53 0x0053 +/* not verified */ #define SOUND_ACTION_UNK54 0x0054 +/* not verified */ #define SOUND_ACTION_UNK55 0x0055 /* not verified */ #define SOUND_ACTION_UNKNOWN456 SOUND_ARG_LOAD(0, 4, 0x56, 0x80, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN457 SOUND_ARG_LOAD(0, 4, 0x57, 0xC0, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN458 SOUND_ARG_LOAD(0, 4, 0x58, 0xA0, 8) @@ -123,50 +120,31 @@ /* not verified */ #define SOUND_ACTION_UNKNOWN45A SOUND_ARG_LOAD(0, 4, 0x5A, 0x80, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN45B SOUND_ARG_LOAD(0, 4, 0x5B, 0xFF, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN45C SOUND_ARG_LOAD(0, 4, 0x5C, 0x80, 8) -// 0x5D? +/* not verified */ #define SOUND_ACTION_UNK5D 0x005D /* not verified */ #define SOUND_ACTION_UNKNOWN45E SOUND_ARG_LOAD(0, 4, 0x5E, 0x80, 8) /* not verified */ #define SOUND_ACTION_UNKNOWN45F SOUND_ARG_LOAD(0, 4, 0x5F, 0x80, 8) -/* not verified */ #define SOUND_ACTION_UNKNOWN460 SOUND_ARG_LOAD(0, 4, 0x60, 0x80, 8) - /* Moving Sound Effects */ -// might be a bad name, consider something else. -/* not verified */ #define SOUND_MOVING_SLIDING1 0x1000 -/* not verified */ #define SOUND_UNKNOWN_UNK1400 SOUND_ARG_LOAD(1, 4, 0x00, 0x00, 0) -/* not verified */ #define SOUND_MOVING_SLIDING2 0x1001 -/* not verified */ #define SOUND_UNKNOWN_UNK1401 SOUND_ARG_LOAD(1, 4, 0x01, 0x00, 0) -/* not verified */ #define SOUND_MOVING_SLIDINGWATER1 0x1002 -/* not verified */ #define SOUND_UNKNOWN_UNK1402 SOUND_ARG_LOAD(1, 4, 0x02, 0x00, 0) -/* not verified */ #define SOUND_MOVING_SLIDING3 0x1003 -/* not verified */ #define SOUND_UNKNOWN_UNK1403 SOUND_ARG_LOAD(1, 4, 0x03, 0x00, 0) -/* not verified */ #define SOUND_MOVING_SLIDINGGHOST 0x1004 -/* not verified */ #define SOUND_UNKNOWN_UNK1404 SOUND_ARG_LOAD(1, 4, 0x04, 0x00, 0) -/* not verified */ #define SOUND_MOVING_SLIDINGGRASS 0x1005 -/* not verified */ #define SOUND_UNKNOWN_UNK1405 SOUND_ARG_LOAD(1, 4, 0x05, 0x00, 0) -/* not verified */ #define SOUND_MOVING_SLIDINGSNOW 0x1006 -/* not verified */ #define SOUND_UNKNOWN_UNK1406 SOUND_ARG_LOAD(1, 4, 0x06, 0x00, 0) -/* not verified */ #define SOUND_MOVING_SLIDINGSAND 0x1007 -/* not verified */ #define SOUND_MOVING_SLIDING4 0x1008 -/* not verified */ #define SOUND_MOVING_SLIDING5 0x1009 -/* not verified */ #define SOUND_MOVING_SLIDINGWATER2 0x100A -/* not verified */ #define SOUND_MOVING_SLIDING6 0x100B -/* not verified */ #define SOUND_UNKNOWN_UNK1410 SOUND_ARG_LOAD(1, 4, 0x10, 0x00, 0) -/* not verified */ #define SOUND_UNKNOWN_UNK1411 SOUND_ARG_LOAD(1, 4, 0x11, 0x00, 0) -/* not verified */ #define SOUND_UNKNOWN_UNK1412 SOUND_ARG_LOAD(1, 4, 0x12, 0x80, 0) -/* not verified */ #define SOUND_UNKNOWN_UNK1414 SOUND_ARG_LOAD(1, 4, 0x14, 0x00, 0) -/* not verified */ #define SOUND_UNKNOWN_UNK1416 SOUND_ARG_LOAD(1, 4, 0x16, 0x00, 0) -/* not verified */ #define SOUND_UNKNOWN_UNK1417 SOUND_ARG_LOAD(1, 4, 0x17, 0x00, 0) -/* not verified */ #define SOUND_UNKNOWN_UNK1C18 SOUND_ARG_LOAD(1, 0xC, 0x18, 0x00, 0) -/* not verified */ #define SOUND_MOVING_UNKNOWN19 SOUND_ARG_LOAD(1, 0xD, 0x19, 0x20, 0) -/* not verified */ #define SOUND_MOVING_ONFIRE 0x1020 -/* not verified */ #define SOUND_UNKNOWN_UNK1420 SOUND_ARG_LOAD(1, 4, 0x20, 0x00, 0) -/* not verified */ #define SOUND_MOVING_UNKNOWN 0x1021 -/* not verified */ #define SOUND_UNKNOWN_UNK1428 SOUND_ARG_LOAD(1, 4, 0x28, 0x00, 0) + +// Terrain-dependent moving sounds; a value 0-7 is added to the sound ID before +// playing. See higher up for the different terrain types. +#define SOUND_MOVING_TERRAIN_SLIDE SOUND_ARG_LOAD(1, 4, 0x00, 0x00, 0) +#define SOUND_MOVING_TERRAIN_RIDING_SHELL SOUND_ARG_LOAD(1, 4, 0x20, 0x00, 0) + +#define SOUND_MOVING_LAVA_BURN SOUND_ARG_LOAD(1, 4, 0x10, 0x00, 0) // ? +#define SOUND_MOVING_SLIDE_DOWN_POLE SOUND_ARG_LOAD(1, 4, 0x11, 0x00, 0) // ? +#define SOUND_MOVING_SLIDE_DOWN_TREE SOUND_ARG_LOAD(1, 4, 0x12, 0x80, 0) +#define SOUND_MOVING_QUICKSAND_DEATH SOUND_ARG_LOAD(1, 4, 0x14, 0x00, 0) +#define SOUND_MOVING_SHOCKED SOUND_ARG_LOAD(1, 4, 0x16, 0x00, 0) +#define SOUND_MOVING_FLYING SOUND_ARG_LOAD(1, 4, 0x17, 0x00, 0) +#define SOUND_MOVING_ALMOST_DROWNING SOUND_ARG_LOAD(1, 0xC, 0x18, 0x00, 0) +#define SOUND_MOVING_AIM_CANNON SOUND_ARG_LOAD(1, 0xD, 0x19, 0x20, 0) +#define SOUND_MOVING_UNK1A 0x101A // ? +#define SOUND_MOVING_RIDING_SHELL_LAVA SOUND_ARG_LOAD(1, 4, 0x28, 0x00, 0) /* Mario Sound Effects */ -/* not verified */ #define SOUND_MARIO_YAH SOUND_ARG_LOAD(2, 4, 0x00, 0x80, 8) -/* not verified */ #define SOUND_MARIO_WAH1 0x2401 -/* not verified */ #define SOUND_MARIO_WOOH 0x2402 +// A random number 0-2 is added to the sound ID before playing, producing Yah/Wah/Hoo +#define SOUND_MARIO_YAH_WAH_HOO SOUND_ARG_LOAD(2, 4, 0x00, 0x80, 8) /* not verified */ #define SOUND_MARIO_HOOHOO SOUND_ARG_LOAD(2, 4, 0x03, 0x80, 8) /* not verified */ #define SOUND_MARIO_YAHOO SOUND_ARG_LOAD(2, 4, 0x04, 0x80, 8) /* not verified */ #define SOUND_MARIO_UH SOUND_ARG_LOAD(2, 4, 0x05, 0x80, 8) @@ -177,488 +155,406 @@ /* not verified */ #define SOUND_MARIO_ATTACKED SOUND_ARG_LOAD(2, 4, 0x0A, 0xFF, 8) /* not verified */ #define SOUND_MARIO_OOOF SOUND_ARG_LOAD(2, 4, 0x0B, 0x80, 8) /* not verified */ #define SOUND_MARIO_OOOF2 SOUND_ARG_LOAD(2, 4, 0x0B, 0xD0, 8) -/* not verified */ #define SOUND_MARIO_HEREWEGO SOUND_ARG_LOAD(2, 4, 0x0C, 0x80, 8) +#define SOUND_MARIO_HERE_WE_GO SOUND_ARG_LOAD(2, 4, 0x0C, 0x80, 8) /* not verified */ #define SOUND_MARIO_YAWNING SOUND_ARG_LOAD(2, 4, 0x0D, 0x80, 8) -/* not verified */ #define SOUND_MARIO_SNORING1 SOUND_ARG_LOAD(2, 4, 0x0E, 0x80, 8) -/* not verified */ #define SOUND_MARIO_SNORING2 SOUND_ARG_LOAD(2, 4, 0x0F, 0x80, 8) +#define SOUND_MARIO_SNORING1 SOUND_ARG_LOAD(2, 4, 0x0E, 0x80, 8) +#define SOUND_MARIO_SNORING2 SOUND_ARG_LOAD(2, 4, 0x0F, 0x80, 8) /* not verified */ #define SOUND_MARIO_WAAAOOOW SOUND_ARG_LOAD(2, 4, 0x10, 0xC0, 8) /* not verified */ #define SOUND_MARIO_HAHA SOUND_ARG_LOAD(2, 4, 0x11, 0x80, 8) /* not verified */ #define SOUND_MARIO_HAHA_2 SOUND_ARG_LOAD(2, 4, 0x11, 0xF0, 8) -/* not verified */ #define SOUND_MARIO_HOO 0x2412 /* not verified */ #define SOUND_MARIO_UH2 SOUND_ARG_LOAD(2, 4, 0x13, 0xD0, 8) /* not verified */ #define SOUND_MARIO_UH2_2 SOUND_ARG_LOAD(2, 4, 0x13, 0x80, 8) -/* not verified */ #define SOUND_MARIO_ONFIRE SOUND_ARG_LOAD(2, 4, 0x14, 0xA0, 8) +/* not verified */ #define SOUND_MARIO_ON_FIRE SOUND_ARG_LOAD(2, 4, 0x14, 0xA0, 8) /* not verified */ #define SOUND_MARIO_DYING SOUND_ARG_LOAD(2, 4, 0x15, 0xFF, 8) -/* not verified */ #define SOUND_MARIO_HOO2 SOUND_ARG_LOAD(2, 4, 0x16, 0x80, 8) -/* not verified */ #define SOUND_MARIO_COUGHING 0x2417 -/* not verified */ #define SOUND_MARIO_HOO3 SOUND_ARG_LOAD(2, 4, 0x18, 0x80, 8) -/* not verified */ #define SOUND_MARIO_HOO4 0x2419 -/* not verified */ #define SOUND_MARIO_HOO5 0x241A -/* not verified */ #define SOUND_MARIO_COUGHING2 SOUND_ARG_LOAD(2, 4, 0x1B, 0x80, 8) -/* not verified */ #define SOUND_MARIO_COUGHING3 SOUND_ARG_LOAD(2, 4, 0x1C, 0x80, 8) -/* not verified */ #define SOUND_MARIO_COUGHING4 SOUND_ARG_LOAD(2, 4, 0x1D, 0x80, 8) -/* not verified */ #define SOUND_MARIO_YAH2 SOUND_ARG_LOAD(2, 4, 0x1E, 0x80, 8) -/* not verified */ #define SOUND_MARIO_HOO6 SOUND_ARG_LOAD(2, 4, 0x1F, 0x80, 8) -/* not verified */ #define SOUND_MARIO_MAMAMIA SOUND_ARG_LOAD(2, 4, 0x20, 0x80, 8) -/* not verified */ #define SOUND_MARIO_OKEYDOKEY 0x2421 -/* not verified */ #define SOUND_MARIO_WAH3 SOUND_ARG_LOAD(2, 4, 0x22, 0x80, 8) -/* not verified */ #define SOUND_MARIO_DROWNING SOUND_ARG_LOAD(2, 4, 0x23, 0xF0, 8) -/* not verified */ #define SOUND_MARIO_WAH4 SOUND_ARG_LOAD(2, 4, 0x24, 0x80, 8) -/* not verified */ #define SOUND_MARIO_UH3 0x2425 -/* not verified */ #define SOUND_MARIO_HEAVYLIFT 0x2426 -/* not verified */ #define SOUND_MARIO_WAH5 0x2427 +#define SOUND_MARIO_PANTING_COLD SOUND_ARG_LOAD(2, 4, 0x16, 0x80, 8) -/* Mario Sound Effects (Added in US) */ -/* not verified */ #define SOUND_PEACH_DEARMARIO SOUND_ARG_LOAD(2, 4, 0x28, 0xFF, 8) -/* not verified */ #define SOUND_MARIO_WOOH2 0x2429 -/* not verified */ #define SOUND_MARIO_WOOH3 0x242A -/* not verified */ // the next 5 sounds are in a group of 5 for which the sound is determined by the play_sound call used. -/* not verified */ #define SOUND_MARIO_YAHOO2 SOUND_ARG_LOAD(2, 4, 0x2B, 0x80, 8) -/* not verified */ #define SOUND_MARIO_YAHOO3 SOUND_ARG_LOAD(2, 4, 0x2C, 0x80, 8) -/* not verified */ #define SOUND_MARIO_YAHOO4 SOUND_ARG_LOAD(2, 4, 0x2D, 0x80, 8) -/* not verified */ #define SOUND_MARIO_WAHA SOUND_ARG_LOAD(2, 4, 0x2E, 0x80, 8) -/* not verified */ #define SOUND_MARIO_YIPEE SOUND_ARG_LOAD(2, 4, 0x2F, 0x80, 8) -/* not verified */ #define SOUND_MARIO_DOH SOUND_ARG_LOAD(2, 4, 0x30, 0x80, 8) -/* not verified */ #define SOUND_MARIO_GAMEOVER SOUND_ARG_LOAD(2, 4, 0x31, 0xFF, 8) -/* not verified */ #define SOUND_MARIO_HELLO SOUND_ARG_LOAD(2, 4, 0x32, 0xFF, 8) -/* not verified */ #define SOUND_MARIO_PRESSSTARTTOPLAY SOUND_ARG_LOAD(2, 4, 0x33, 0xFF, 0xA) -/* not verified */ #define SOUND_MARIO_BOING SOUND_ARG_LOAD(2, 4, 0x34, 0x80, 8) -/* not verified */ #define SOUND_MARIO_SNORING3 SOUND_ARG_LOAD(2, 4, 0x35, 0xFF, 8) -/* not verified */ #define SOUND_MARIO_SOLONGABOWSER SOUND_ARG_LOAD(2, 4, 0x36, 0x80, 8) -/* not verified */ #define SOUND_MARIO_IMATIRED SOUND_ARG_LOAD(2, 4, 0x37, 0x80, 8) +// A random number 0-2 is added to the sound ID before playing +#define SOUND_MARIO_PANTING SOUND_ARG_LOAD(2, 4, 0x18, 0x80, 8) -/* Princess Peach Sound Effects (US Only) */ -/* not verified */ #define SOUND_PEACH_MARIO SOUND_ARG_LOAD(2, 4, 0x38, 0xFF, 8) -/* not verified */ #define SOUND_PEACH_POWEROFTHESTARS SOUND_ARG_LOAD(2, 4, 0x39, 0xFF, 8) -/* not verified */ #define SOUND_PEACH_THANKSTOYOU SOUND_ARG_LOAD(2, 4, 0x3A, 0xFF, 8) -/* not verified */ #define SOUND_PEACH_THANKYOUMARIO SOUND_ARG_LOAD(2, 4, 0x3B, 0xFF, 8) -/* not verified */ #define SOUND_PEACH_SOMETHINGSPECIAL SOUND_ARG_LOAD(2, 4, 0x3C, 0xFF, 8) -/* not verified */ #define SOUND_PEACH_BAKEACAKE SOUND_ARG_LOAD(2, 4, 0x3D, 0xFF, 8) -/* not verified */ #define SOUND_PEACH_FORMARIO SOUND_ARG_LOAD(2, 4, 0x3E, 0xFF, 8) -/* not verified */ #define SOUND_PEACH_MARIO2 SOUND_ARG_LOAD(2, 4, 0x3F, 0xFF, 8) +#define SOUND_MARIO_COUGHING1 SOUND_ARG_LOAD(2, 4, 0x1B, 0x80, 8) +#define SOUND_MARIO_COUGHING2 SOUND_ARG_LOAD(2, 4, 0x1C, 0x80, 8) +#define SOUND_MARIO_COUGHING3 SOUND_ARG_LOAD(2, 4, 0x1D, 0x80, 8) +#define SOUND_MARIO_PUNCH_YAH SOUND_ARG_LOAD(2, 4, 0x1E, 0x80, 8) +#define SOUND_MARIO_PUNCH_HOO SOUND_ARG_LOAD(2, 4, 0x1F, 0x80, 8) +#define SOUND_MARIO_MAMA_MIA SOUND_ARG_LOAD(2, 4, 0x20, 0x80, 8) +#define SOUND_MARIO_OKEY_DOKEY 0x2021 +#define SOUND_MARIO_GROUND_POUND_WAH SOUND_ARG_LOAD(2, 4, 0x22, 0x80, 8) +#define SOUND_MARIO_DROWNING SOUND_ARG_LOAD(2, 4, 0x23, 0xF0, 8) +#define SOUND_MARIO_PUNCH_WAH SOUND_ARG_LOAD(2, 4, 0x24, 0x80, 8) + +/* Mario Sound Effects (US/EU only) */ +#define SOUND_PEACH_DEAR_MARIO SOUND_ARG_LOAD(2, 4, 0x28, 0xFF, 8) + +// A random number 0-4 is added to the sound ID before playing, producing one of +// Yahoo! (60% chance), Waha! (20%), or Yippee! (20%). +#define SOUND_MARIO_YAHOO_WAHA_YIPPEE SOUND_ARG_LOAD(2, 4, 0x2B, 0x80, 8) + +#define SOUND_MARIO_DOH SOUND_ARG_LOAD(2, 4, 0x30, 0x80, 8) +#define SOUND_MARIO_GAME_OVER SOUND_ARG_LOAD(2, 4, 0x31, 0xFF, 8) +#define SOUND_MARIO_HELLO SOUND_ARG_LOAD(2, 4, 0x32, 0xFF, 8) +#define SOUND_MARIO_PRESS_START_TO_PLAY SOUND_ARG_LOAD(2, 4, 0x33, 0xFF, 0xA) +#define SOUND_MARIO_TWIRL_BOUNCE SOUND_ARG_LOAD(2, 4, 0x34, 0x80, 8) +#define SOUND_MARIO_SNORING3 SOUND_ARG_LOAD(2, 4, 0x35, 0xFF, 8) +#define SOUND_MARIO_SO_LONGA_BOWSER SOUND_ARG_LOAD(2, 4, 0x36, 0x80, 8) +#define SOUND_MARIO_IMA_TIRED SOUND_ARG_LOAD(2, 4, 0x37, 0x80, 8) + +/* Princess Peach Sound Effects (US/EU only) */ +#define SOUND_PEACH_MARIO SOUND_ARG_LOAD(2, 4, 0x38, 0xFF, 8) +#define SOUND_PEACH_POWER_OF_THE_STARS SOUND_ARG_LOAD(2, 4, 0x39, 0xFF, 8) +#define SOUND_PEACH_THANKS_TO_YOU SOUND_ARG_LOAD(2, 4, 0x3A, 0xFF, 8) +#define SOUND_PEACH_THANK_YOU_MARIO SOUND_ARG_LOAD(2, 4, 0x3B, 0xFF, 8) +#define SOUND_PEACH_SOMETHING_SPECIAL SOUND_ARG_LOAD(2, 4, 0x3C, 0xFF, 8) +#define SOUND_PEACH_BAKE_A_CAKE SOUND_ARG_LOAD(2, 4, 0x3D, 0xFF, 8) +#define SOUND_PEACH_FOR_MARIO SOUND_ARG_LOAD(2, 4, 0x3E, 0xFF, 8) +#define SOUND_PEACH_MARIO2 SOUND_ARG_LOAD(2, 4, 0x3F, 0xFF, 8) /* General Sound Effects */ -/* not verified */ #define SOUND_GENERAL_EXPLOSION SOUND_ARG_LOAD(3, 0, 0x00, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_MARIOHOLE1 0x3001 -/* not verified */ #define SOUND_GENERAL_MARIOHOLE2 0x3002 -/* not verified */ #define SOUND_GENERAL_FLAMEOUT SOUND_ARG_LOAD(3, 0, 0x03, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_OPENWOODDOOR SOUND_ARG_LOAD(3, 0, 0x04, 0xC0, 8) -/* not verified */ #define SOUND_GENERAL_CLOSEWOODDOOR SOUND_ARG_LOAD(3, 0, 0x05, 0xC0, 8) -/* not verified */ #define SOUND_GENERAL_OPENIRONDOOR SOUND_ARG_LOAD(3, 0, 0x06, 0xC0, 8) -/* not verified */ #define SOUND_GENERAL_CLOSEIRONDOOR SOUND_ARG_LOAD(3, 0, 0x07, 0xC0, 8) -/* not verified */ #define SOUND_GENERAL_BUBBLES1 0x3008 -/* not verified */ #define SOUND_GENERAL_MOVINGWATER SOUND_ARG_LOAD(3, 0, 0x09, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_SWISHWATER SOUND_ARG_LOAD(3, 0, 0x0A, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_QUIETBUBBLE SOUND_ARG_LOAD(3, 0, 0x0B, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_EXPLOSION2 SOUND_ARG_LOAD(3, 0, 0x0C, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_QUIETBUBBLE2 SOUND_ARG_LOAD(3, 0, 0x0D, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_UNUSED SOUND_ARG_LOAD(3, 0, 0x0E, 0x80, 8) // not actually unused? -/* not verified */ #define SOUND_GENERAL_EXPLOSION3 SOUND_ARG_LOAD(3, 0, 0x0F, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_COIN1 0x3010 -/* not verified */ #define SOUND_GENERAL_COIN2 SOUND_ARG_LOAD(3, 8, 0x11, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_COINWATER1 SOUND_ARG_LOAD(3, 8, 0x12, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_COINWATER2 0x3013 -/* not verified */ #define SOUND_GENERAL_COINWATER3 0x3014 -/* not verified */ #define SOUND_GENERAL_COINWATER4 0x3015 -/* not verified */ #define SOUND_GENERAL_SHORTSTAR SOUND_ARG_LOAD(3, 0, 0x16, 0x00, 9) -/* not verified */ #define SOUND_GENERAL_BIGCLOCK SOUND_ARG_LOAD(3, 0, 0x17, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_LOUDPOUND 0x3018 -/* not verified */ #define SOUND_GENERAL_SHORTPOUND1 0x3019 -/* not verified */ #define SOUND_GENERAL_SHORTPOUND2 0x301A -/* not verified */ #define SOUND_GENERAL_SHORTPOUND3 0x301B -/* not verified */ #define SOUND_GENERAL_SHORTPOUND4 0x301C -/* not verified */ #define SOUND_GENERAL_SHORTPOUND5 0x301D -/* not verified */ #define SOUND_GENERAL_SHORTPOUND6 0x301E -/* not verified */ #define SOUND_GENERAL_SHORTPOUND7 0x301F -/* not verified */ #define SOUND_GENERAL_OPENCHEST1 SOUND_ARG_LOAD(3, 1, 0x20, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_OPENCHEST2 0x3021 -/* not verified */ #define SOUND_GENERAL_CLAMSHELL1 SOUND_ARG_LOAD(3, 1, 0x22, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_CLAMSHELL2 0x3023 -/* not verified */ #define SOUND_GENERAL_BOXLANDING SOUND_ARG_LOAD(3, 0, 0x24, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_BOXLANDING_2 SOUND_ARG_LOAD(3, 2, 0x24, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_UNKNOWN1 SOUND_ARG_LOAD(3, 0, 0x25, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_UNKNOWN1_2 SOUND_ARG_LOAD(3, 2, 0x25, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_CLAMSHELL3 SOUND_ARG_LOAD(3, 0, 0x26, 0x40, 8) -/* not verified */ #define SOUND_GENERAL_CLAMSHELL4 SOUND_ARG_LOAD(3, 0, 0x27, 0x40, 8) -/* not verified */ #define SOUND_GENERAL_EXITPAINTING1 0x3028 +#define SOUND_GENERAL_ACTIVATE_CAP_SWITCH SOUND_ARG_LOAD(3, 0, 0x00, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_FLAME_OUT SOUND_ARG_LOAD(3, 0, 0x03, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_OPEN_WOOD_DOOR SOUND_ARG_LOAD(3, 0, 0x04, 0xC0, 8) +/* not verified */ #define SOUND_GENERAL_CLOSE_WOOD_DOOR SOUND_ARG_LOAD(3, 0, 0x05, 0xC0, 8) +/* not verified */ #define SOUND_GENERAL_OPEN_IRON_DOOR SOUND_ARG_LOAD(3, 0, 0x06, 0xC0, 8) +/* not verified */ #define SOUND_GENERAL_CLOSE_IRON_DOOR SOUND_ARG_LOAD(3, 0, 0x07, 0xC0, 8) +/* not verified */ #define SOUND_GENERAL_BUBBLES 0x3008 +/* not verified */ #define SOUND_GENERAL_MOVING_WATER SOUND_ARG_LOAD(3, 0, 0x09, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_SWISH_WATER SOUND_ARG_LOAD(3, 0, 0x0A, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_QUIET_BUBBLE SOUND_ARG_LOAD(3, 0, 0x0B, 0x00, 8) +#define SOUND_GENERAL_VOLCANO_EXPLOSION SOUND_ARG_LOAD(3, 0, 0x0C, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_QUIET_BUBBLE2 SOUND_ARG_LOAD(3, 0, 0x0D, 0x00, 8) +#define SOUND_GENERAL_CASTLE_TRAP_OPEN SOUND_ARG_LOAD(3, 0, 0x0E, 0x80, 8) +#define SOUND_GENERAL_WALL_EXPLOSION SOUND_ARG_LOAD(3, 0, 0x0F, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_COIN SOUND_ARG_LOAD(3, 8, 0x11, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_COIN_WATER SOUND_ARG_LOAD(3, 8, 0x12, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_SHORT_STAR SOUND_ARG_LOAD(3, 0, 0x16, 0x00, 9) +/* not verified */ #define SOUND_GENERAL_BIG_CLOCK SOUND_ARG_LOAD(3, 0, 0x17, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_LOUD_POUND 0x3018 // _TERRAIN? +/* not verified */ #define SOUND_GENERAL_LOUD_POUND2 0x3019 +/* not verified */ #define SOUND_GENERAL_SHORT_POUND1 0x301A +/* not verified */ #define SOUND_GENERAL_SHORT_POUND2 0x301B +/* not verified */ #define SOUND_GENERAL_SHORT_POUND3 0x301C +/* not verified */ #define SOUND_GENERAL_SHORT_POUND4 0x301D +/* not verified */ #define SOUND_GENERAL_SHORT_POUND5 0x301E +/* not verified */ #define SOUND_GENERAL_SHORT_POUND6 0x301F +#define SOUND_GENERAL_OPEN_CHEST SOUND_ARG_LOAD(3, 1, 0x20, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_CLAM_SHELL1 SOUND_ARG_LOAD(3, 1, 0x22, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_BOX_LANDING SOUND_ARG_LOAD(3, 0, 0x24, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_BOX_LANDING_2 SOUND_ARG_LOAD(3, 2, 0x24, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_UNKNOWN1 SOUND_ARG_LOAD(3, 0, 0x25, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_UNKNOWN1_2 SOUND_ARG_LOAD(3, 2, 0x25, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_CLAM_SHELL2 SOUND_ARG_LOAD(3, 0, 0x26, 0x40, 8) +/* not verified */ #define SOUND_GENERAL_CLAM_SHELL3 SOUND_ARG_LOAD(3, 0, 0x27, 0x40, 8) #ifdef VERSION_JP -/* not verified */ #define SOUND_GENERAL_PAINTING_EJECT SOUND_ARG_LOAD(3, 8, 0x28, 0x00, 8) +#define SOUND_GENERAL_PAINTING_EJECT SOUND_ARG_LOAD(3, 8, 0x28, 0x00, 8) #else -/* not verified */ #define SOUND_GENERAL_PAINTING_EJECT SOUND_ARG_LOAD(3, 9, 0x28, 0x00, 8) +#define SOUND_GENERAL_PAINTING_EJECT SOUND_ARG_LOAD(3, 9, 0x28, 0x00, 8) #endif -/* not verified */ #define SOUND_GENERAL_EXITPAINTING2 0x3029 -/* not verified */ #define SOUND_GENERAL_EXITPAINTING3 0x302A -/* not verified */ #define SOUND_GENERAL_EXITPAINTING4 SOUND_ARG_LOAD(3, 0, 0x2B, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_GETSTAR 0x302C -/* not verified */ #define SOUND_GENERAL_PLATFORM SOUND_ARG_LOAD(3, 0, 0x2D, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_EXPLOSION4 SOUND_ARG_LOAD(3, 0, 0x2E, 0x20, 8) -/* not verified */ #define SOUND_GENERAL_EXPLOSION5 SOUND_ARG_LOAD(3, 1, 0x2F, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_COINSPURT SOUND_ARG_LOAD(3, 0, 0x30, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_COINSPURT_2 SOUND_ARG_LOAD(3, 8, 0x30, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_EXPLOSION6 0x3031 -/* not verified */ #define SOUND_GENERAL_UNKNOWN2 0x3032 -/* not verified */ #define SOUND_GENERAL_GETCOIN 0x3033 -/* not verified */ #define SOUND_GENERAL_BOATTILT1 SOUND_ARG_LOAD(3, 0, 0x34, 0x40, 8) -/* not verified */ #define SOUND_GENERAL_BOATTILT2 SOUND_ARG_LOAD(3, 0, 0x35, 0x40, 8) -/* not verified */ #define SOUND_GENERAL_COINDROP SOUND_ARG_LOAD(3, 0, 0x36, 0x40, 8) +#define SOUND_GENERAL_LEVEL_SELECT_CHANGE SOUND_ARG_LOAD(3, 0, 0x2B, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_PLATFORM SOUND_ARG_LOAD(3, 0, 0x2D, 0x80, 8) +#define SOUND_GENERAL_DONUT_PLATFORM_EXPLOSION SOUND_ARG_LOAD(3, 0, 0x2E, 0x20, 8) +#define SOUND_GENERAL_BOWSER_BOMB_EXPLOSION SOUND_ARG_LOAD(3, 1, 0x2F, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_COIN_SPURT SOUND_ARG_LOAD(3, 0, 0x30, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_COIN_SPURT_2 SOUND_ARG_LOAD(3, 8, 0x30, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_EXPLOSION6 0x3031 +/* not verified */ #define SOUND_GENERAL_UNK32 0x3032 +/* not verified */ #define SOUND_GENERAL_BOAT_TILT1 SOUND_ARG_LOAD(3, 0, 0x34, 0x40, 8) +/* not verified */ #define SOUND_GENERAL_BOAT_TILT2 SOUND_ARG_LOAD(3, 0, 0x35, 0x40, 8) +/* not verified */ #define SOUND_GENERAL_COIN_DROP SOUND_ARG_LOAD(3, 0, 0x36, 0x40, 8) /* not verified */ #define SOUND_GENERAL_UNKNOWN3_LOWPRIO SOUND_ARG_LOAD(3, 0, 0x37, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_UNKNOWN3 SOUND_ARG_LOAD(3, 0, 0x37, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_UNKNOWN3_2 SOUND_ARG_LOAD(3, 8, 0x37, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_SWITCH1 SOUND_ARG_LOAD(3, 0, 0x38, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_CHAINCHOMP1 SOUND_ARG_LOAD(3, 0, 0x39, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_CHAINCHOMP2 SOUND_ARG_LOAD(3, 0, 0x3A, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_SWITCH2 SOUND_ARG_LOAD(3, 0, 0x3B, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_MOVINGINSAND SOUND_ARG_LOAD(3, 0, 0x3C, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_UNKNOWN4_LOWPRIO SOUND_ARG_LOAD(3, 0, 0x3D, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_UNKNOWN4 SOUND_ARG_LOAD(3, 0, 0x3D, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_SWITCH3 SOUND_ARG_LOAD(3, 0, 0x3E, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_CAGEOPEN SOUND_ARG_LOAD(3, 0, 0x3F, 0xA0, 8) -/* not verified */ #define SOUND_GENERAL_QUIETPOUND1_LOWPRIO SOUND_ARG_LOAD(3, 0, 0x40, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_QUIETPOUND1 SOUND_ARG_LOAD(3, 0, 0x40, 0x40, 8) -/* not verified */ #define SOUND_GENERAL_BREAKBOX SOUND_ARG_LOAD(3, 0, 0x41, 0xC0, 8) -/* not verified */ #define SOUND_GENERAL_SWITCH4 SOUND_ARG_LOAD(3, 0, 0x42, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_QUIETPOUND2 SOUND_ARG_LOAD(3, 0, 0x43, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_BIGPOUND SOUND_ARG_LOAD(3, 0, 0x44, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_UNK45 SOUND_ARG_LOAD(3, 0, 0x45, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_UNK46_LOWPRIO SOUND_ARG_LOAD(3, 0, 0x46, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_UNK46 SOUND_ARG_LOAD(3, 0, 0x46, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_CANNONUP SOUND_ARG_LOAD(3, 0, 0x47, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_GRINDELROLL SOUND_ARG_LOAD(3, 0, 0x48, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_EXPLOSION7 0x3049 -/* not verified */ #define SOUND_GENERAL_SHAKECOFFIN 0x304A -/* not verified */ #define SOUND_GENERAL_PYRAMIDTOP 0x304B -/* not verified */ #define SOUND_GENERAL_EXPLOSION8 0x304C -/* not verified */ #define SOUND_GENERAL_RACEGUNSHOT SOUND_ARG_LOAD(3, 1, 0x4D, 0x40, 8) -/* not verified */ #define SOUND_GENERAL_STARDOOROPEN SOUND_ARG_LOAD(3, 0, 0x4E, 0xC0, 8) -/* not verified */ #define SOUND_GENERAL_STARDOORCLOSE SOUND_ARG_LOAD(3, 0, 0x4F, 0xC0, 8) -/* not verified */ #define SOUND_GENERAL_BIRDCHIRP1 0x3050 -/* not verified */ #define SOUND_GENERAL_BIRDCHIRP2 0x3051 -/* not verified */ #define SOUND_GENERAL_BIRDCHIRP3 0x3052 -/* not verified */ #define SOUND_GENERAL_BIRDCHIRP4 0x3053 -/* not verified */ #define SOUND_GENERAL_SWITCH5 0x3054 -/* not verified */ #define SOUND_GENERAL_SWITCH6 0x3055 -/* not verified */ #define SOUND_GENERAL_POUNDROCK SOUND_ARG_LOAD(3, 0, 0x56, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_STARAPPEARS SOUND_ARG_LOAD(3, 0, 0x57, 0xFF, 9) -/* not verified */ #define SOUND_GENERAL_1UP SOUND_ARG_LOAD(3, 0, 0x58, 0xFF, 8) -/* not verified */ #define SOUND_GENERAL_ELEVATORHMC 0x3059 -/* not verified */ #define SOUND_GENERAL_BUTTONPRESS_LOWPRIO SOUND_ARG_LOAD(3, 0, 0x5A, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_BUTTONPRESS SOUND_ARG_LOAD(3, 0, 0x5A, 0x40, 8) -/* not verified */ #define SOUND_GENERAL_BUTTONPRESS_2_LOWPRIO SOUND_ARG_LOAD(3, 1, 0x5A, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_BUTTONPRESS_2 SOUND_ARG_LOAD(3, 1, 0x5A, 0x40, 8) -/* not verified */ #define SOUND_GENERAL_ELEVATORMOVE SOUND_ARG_LOAD(3, 0, 0x5B, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_ELEVATORMOVE_2 SOUND_ARG_LOAD(3, 1, 0x5B, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_SWISHAIR SOUND_ARG_LOAD(3, 0, 0x5C, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_SWISHAIR_2 SOUND_ARG_LOAD(3, 1, 0x5C, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_HAUNTEDCHAIR SOUND_ARG_LOAD(3, 0, 0x5D, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_SOFTLANDING SOUND_ARG_LOAD(3, 0, 0x5E, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_MOVINGBOOMAYBE SOUND_ARG_LOAD(3, 0, 0x5F, 0x00, 8) // not certain -/* not verified */ #define SOUND_GENERAL_BOWSEREXPLODE 0x3060 -/* not verified */ #define SOUND_GENERAL_BOWSERKEY 0x3061 -/* not verified */ #define SOUND_GENERAL_BOWSERPLATFORM SOUND_ARG_LOAD(3, 0, 0x62, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_BOWSERPLATFORM_2 SOUND_ARG_LOAD(3, 1, 0x62, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_1UP2 0x3063 -/* not verified */ #define SOUND_GENERAL_HEARTSPIN SOUND_ARG_LOAD(3, 0, 0x64, 0xC0, 8) -/* not verified */ #define SOUND_GENERAL_POUNDWOODPOST SOUND_ARG_LOAD(3, 0, 0x65, 0xC0, 8) -/* not verified */ #define SOUND_GENERAL_WATERLEVELTRIG SOUND_ARG_LOAD(3, 0, 0x66, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_SWITCHDOOROPEN SOUND_ARG_LOAD(3, 0, 0x67, 0xA0, 8) -/* not verified */ #define SOUND_GENERAL_REDCOIN SOUND_ARG_LOAD(3, 0, 0x68, 0x90, 8) -/* not verified */ #define SOUND_GENERAL_BIRDSFLYAWAY SOUND_ARG_LOAD(3, 0, 0x69, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_RIGHTANSWER 0x306A -/* not verified */ #define SOUND_GENERAL_METALPOUND SOUND_ARG_LOAD(3, 0, 0x6B, 0x80, 8) -/* not verified */ #define SOUND_GENERAL_BOING1 SOUND_ARG_LOAD(3, 0, 0x6C, 0x40, 8) -/* not verified */ #define SOUND_GENERAL_BOING2_LOWPRIO SOUND_ARG_LOAD(3, 0, 0x6D, 0x20, 8) -/* not verified */ #define SOUND_GENERAL_BOING2 SOUND_ARG_LOAD(3, 0, 0x6D, 0x40, 8) -/* not verified */ #define SOUND_GENERAL_YOSHIWALK SOUND_ARG_LOAD(3, 0, 0x6E, 0x20, 8) -/* not verified */ #define SOUND_GENERAL_ENEMYALERT1 SOUND_ARG_LOAD(3, 0, 0x6F, 0x30, 8) -/* not verified */ #define SOUND_GENERAL_YOSHI SOUND_ARG_LOAD(3, 0, 0x70, 0x30, 8) -/* not verified */ #define SOUND_GENERAL_SPLATTERING SOUND_ARG_LOAD(3, 0, 0x71, 0x30, 8) -/* not verified */ #define SOUND_GENERAL_BOING3 0x3072 -/* not verified */ #define SOUND_GENERAL_GRANDSTAR SOUND_ARG_LOAD(3, 0, 0x73, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_GRANDSTARJUMP SOUND_ARG_LOAD(3, 0, 0x74, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_BOATROCK SOUND_ARG_LOAD(3, 0, 0x75, 0x00, 8) -/* not verified */ #define SOUND_GENERAL_VANISHSFX SOUND_ARG_LOAD(3, 0, 0x76, 0x20, 8) -/* not verified */ #define SOUND_GENERAL_MARIOHOLE3 0x3077 -/* not verified */ #define SOUND_GENERAL_REDCOIN2 0x3078 -/* not verified */ #define SOUND_GENERAL_BIRDSFLYAWAY2 0x3079 -/* not verified */ #define SOUND_GENERAL_RIGHTANSWER2 0x307A -/* not verified */ #define SOUND_GENERAL_METALPOUND2 0x307B -/* not verified */ #define SOUND_GENERAL_BOING4 0x307C -/* not verified */ #define SOUND_GENERAL_BOING5 0x307D -/* not verified */ #define SOUND_GENERAL_UNKNOWN5 0x307E // Unused, sounds identical to YOSHIWALK -/* not verified */ #define SOUND_GENERAL_ENEMYALERT2 0x307F +/* not verified */ #define SOUND_GENERAL_UNKNOWN3 SOUND_ARG_LOAD(3, 0, 0x37, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_UNKNOWN3_2 SOUND_ARG_LOAD(3, 8, 0x37, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_SWITCH1 SOUND_ARG_LOAD(3, 0, 0x38, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_CHAIN_CHOMP1 SOUND_ARG_LOAD(3, 0, 0x39, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_CHAIN_CHOMP2 SOUND_ARG_LOAD(3, 0, 0x3A, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_SWITCH2 SOUND_ARG_LOAD(3, 0, 0x3B, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_MOVING_IN_SAND SOUND_ARG_LOAD(3, 0, 0x3C, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_UNKNOWN4_LOWPRIO SOUND_ARG_LOAD(3, 0, 0x3D, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_UNKNOWN4 SOUND_ARG_LOAD(3, 0, 0x3D, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_SWITCH3 SOUND_ARG_LOAD(3, 0, 0x3E, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_CAGE_OPEN SOUND_ARG_LOAD(3, 0, 0x3F, 0xA0, 8) +/* not verified */ #define SOUND_GENERAL_QUIET_POUND1_LOWPRIO SOUND_ARG_LOAD(3, 0, 0x40, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_QUIET_POUND1 SOUND_ARG_LOAD(3, 0, 0x40, 0x40, 8) +/* not verified */ #define SOUND_GENERAL_BREAK_BOX SOUND_ARG_LOAD(3, 0, 0x41, 0xC0, 8) +/* not verified */ #define SOUND_GENERAL_SWITCH4 SOUND_ARG_LOAD(3, 0, 0x42, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_QUIET_POUND2 SOUND_ARG_LOAD(3, 0, 0x43, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_BIG_POUND SOUND_ARG_LOAD(3, 0, 0x44, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_UNK45 SOUND_ARG_LOAD(3, 0, 0x45, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_UNK46_LOWPRIO SOUND_ARG_LOAD(3, 0, 0x46, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_UNK46 SOUND_ARG_LOAD(3, 0, 0x46, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_CANNON_UP SOUND_ARG_LOAD(3, 0, 0x47, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_GRINDEL_ROLL SOUND_ARG_LOAD(3, 0, 0x48, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_EXPLOSION7 0x3049 +/* not verified */ #define SOUND_GENERAL_SHAKE_COFFIN 0x304A +/* not verified */ #define SOUND_GENERAL_RACE_GUN_SHOT SOUND_ARG_LOAD(3, 1, 0x4D, 0x40, 8) +/* not verified */ #define SOUND_GENERAL_STAR_DOOR_OPEN SOUND_ARG_LOAD(3, 0, 0x4E, 0xC0, 8) +/* not verified */ #define SOUND_GENERAL_STAR_DOOR_CLOSE SOUND_ARG_LOAD(3, 0, 0x4F, 0xC0, 8) +/* not verified */ #define SOUND_GENERAL_POUND_ROCK SOUND_ARG_LOAD(3, 0, 0x56, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_STAR_APPEARS SOUND_ARG_LOAD(3, 0, 0x57, 0xFF, 9) +#define SOUND_GENERAL_COLLECT_1UP SOUND_ARG_LOAD(3, 0, 0x58, 0xFF, 8) +/* not verified */ #define SOUND_GENERAL_BUTTON_PRESS_LOWPRIO SOUND_ARG_LOAD(3, 0, 0x5A, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_BUTTON_PRESS SOUND_ARG_LOAD(3, 0, 0x5A, 0x40, 8) +/* not verified */ #define SOUND_GENERAL_BUTTON_PRESS_2_LOWPRIO SOUND_ARG_LOAD(3, 1, 0x5A, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_BUTTON_PRESS_2 SOUND_ARG_LOAD(3, 1, 0x5A, 0x40, 8) +/* not verified */ #define SOUND_GENERAL_ELEVATOR_MOVE SOUND_ARG_LOAD(3, 0, 0x5B, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_ELEVATOR_MOVE_2 SOUND_ARG_LOAD(3, 1, 0x5B, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_SWISH_AIR SOUND_ARG_LOAD(3, 0, 0x5C, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_SWISH_AIR_2 SOUND_ARG_LOAD(3, 1, 0x5C, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_HAUNTED_CHAIR SOUND_ARG_LOAD(3, 0, 0x5D, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_SOFT_LANDING SOUND_ARG_LOAD(3, 0, 0x5E, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_HAUNTED_CHAIR_MOVE SOUND_ARG_LOAD(3, 0, 0x5F, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_BOWSER_PLATFORM SOUND_ARG_LOAD(3, 0, 0x62, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_BOWSER_PLATFORM_2 SOUND_ARG_LOAD(3, 1, 0x62, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_HEART_SPIN SOUND_ARG_LOAD(3, 0, 0x64, 0xC0, 8) +/* not verified */ #define SOUND_GENERAL_POUND_WOOD_POST SOUND_ARG_LOAD(3, 0, 0x65, 0xC0, 8) +/* not verified */ #define SOUND_GENERAL_WATER_LEVEL_TRIG SOUND_ARG_LOAD(3, 0, 0x66, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_SWITCH_DOOR_OPEN SOUND_ARG_LOAD(3, 0, 0x67, 0xA0, 8) +/* not verified */ #define SOUND_GENERAL_RED_COIN SOUND_ARG_LOAD(3, 0, 0x68, 0x90, 8) +/* not verified */ #define SOUND_GENERAL_BIRDS_FLY_AWAY SOUND_ARG_LOAD(3, 0, 0x69, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_METAL_POUND SOUND_ARG_LOAD(3, 0, 0x6B, 0x80, 8) +/* not verified */ #define SOUND_GENERAL_BOING1 SOUND_ARG_LOAD(3, 0, 0x6C, 0x40, 8) +/* not verified */ #define SOUND_GENERAL_BOING2_LOWPRIO SOUND_ARG_LOAD(3, 0, 0x6D, 0x20, 8) +/* not verified */ #define SOUND_GENERAL_BOING2 SOUND_ARG_LOAD(3, 0, 0x6D, 0x40, 8) +/* not verified */ #define SOUND_GENERAL_YOSHI_WALK SOUND_ARG_LOAD(3, 0, 0x6E, 0x20, 8) +/* not verified */ #define SOUND_GENERAL_ENEMY_ALERT1 SOUND_ARG_LOAD(3, 0, 0x6F, 0x30, 8) +/* not verified */ #define SOUND_GENERAL_YOSHI_TALK SOUND_ARG_LOAD(3, 0, 0x70, 0x30, 8) +/* not verified */ #define SOUND_GENERAL_SPLATTERING SOUND_ARG_LOAD(3, 0, 0x71, 0x30, 8) +/* not verified */ #define SOUND_GENERAL_BOING3 0x3072 +/* not verified */ #define SOUND_GENERAL_GRAND_STAR SOUND_ARG_LOAD(3, 0, 0x73, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_GRAND_STAR_JUMP SOUND_ARG_LOAD(3, 0, 0x74, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_BOAT_ROCK SOUND_ARG_LOAD(3, 0, 0x75, 0x00, 8) +/* not verified */ #define SOUND_GENERAL_VANISH_SFX SOUND_ARG_LOAD(3, 0, 0x76, 0x20, 8) /* Environment Sound Effects */ -/* not verified */ #define SOUND_ENVIRONMENT_WATERFALL1 SOUND_ARG_LOAD(4, 0, 0x00, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_WATERFALL2 SOUND_ARG_LOAD(4, 0, 0x01, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_ELEVATOR1 SOUND_ARG_LOAD(4, 0, 0x02, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_DRONING1 SOUND_ARG_LOAD(4, 1, 0x03, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_DRONING2 SOUND_ARG_LOAD(4, 0, 0x04, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_WIND1 SOUND_ARG_LOAD(4, 0, 0x05, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_MOVINGSANDSNOW 0x4006 -/* not verified */ #define SOUND_ENVIRONMENT_UNKNOWN1 0x4007 -/* not verified */ #define SOUND_ENVIRONMENT_ELEVATOR2 SOUND_ARG_LOAD(4, 0, 0x08, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_WATER SOUND_ARG_LOAD(4, 0, 0x09, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_UNKNOWN2 SOUND_ARG_LOAD(4, 0, 0x0A, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_BOATROCKING1 SOUND_ARG_LOAD(4, 0, 0x0B, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_ELEVATOR3 SOUND_ARG_LOAD(4, 0, 0x0C, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_ELEVATOR4 SOUND_ARG_LOAD(4, 0, 0x0D, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_ELEVATOR4_2 SOUND_ARG_LOAD(4, 1, 0x0D, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_MOVINGSAND SOUND_ARG_LOAD(4, 0, 0x0E, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_MERRYGOROUNDCREAKING SOUND_ARG_LOAD(4, 0, 0x0F, 0x40, 0) -/* not verified */ #define SOUND_ENVIRONMENT_WIND2 SOUND_ARG_LOAD(4, 0, 0x10, 0x80, 0) -/* not verified */ #define SOUND_ENVIRONMENT_MOVINGSANDSNOW2 0x4011 -/* not verified */ #define SOUND_ENVIRONMENT_UNKNOWN3 0x4012 -/* not verified */ #define SOUND_ENVIRONMENT_SLIDING SOUND_ARG_LOAD(4, 0, 0x13, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_STAR SOUND_ARG_LOAD(4, 0, 0x14, 0x00, 1) -/* not verified */ #define SOUND_ENVIRONMENT_UNKNOWN4 SOUND_ARG_LOAD(4, 1, 0x15, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_WATERDRAIN SOUND_ARG_LOAD(4, 1, 0x16, 0x00, 0) -/* not verified */ #define SOUND_ENVIRONMENT_METALBOXPUSH SOUND_ARG_LOAD(4, 0, 0x17, 0x80, 0) -/* not verified */ #define SOUND_ENVIRONMENT_SINKQUICKSAND SOUND_ARG_LOAD(4, 0, 0x18, 0x80, 0) -/* not verified */ #define SOUND_ENVIRONMENT_PEACHSPARKLE 0x4019 -/* not verified */ #define SOUND_ENVIRONMENT_ELEVATOR5 0x401A -/* not verified */ #define SOUND_ENVIRONMENT_FIRE 0x401B +/* not verified */ #define SOUND_ENV_WATERFALL1 SOUND_ARG_LOAD(4, 0, 0x00, 0x00, 0) +/* not verified */ #define SOUND_ENV_WATERFALL2 SOUND_ARG_LOAD(4, 0, 0x01, 0x00, 0) +/* not verified */ #define SOUND_ENV_ELEVATOR1 SOUND_ARG_LOAD(4, 0, 0x02, 0x00, 0) +/* not verified */ #define SOUND_ENV_DRONING1 SOUND_ARG_LOAD(4, 1, 0x03, 0x00, 0) +/* not verified */ #define SOUND_ENV_DRONING2 SOUND_ARG_LOAD(4, 0, 0x04, 0x00, 0) +/* not verified */ #define SOUND_ENV_WIND1 SOUND_ARG_LOAD(4, 0, 0x05, 0x00, 0) +/* not verified */ #define SOUND_ENV_MOVING_SAND_SNOW 0x4006 +/* not verified */ #define SOUND_ENV_UNK07 0x4007 +/* not verified */ #define SOUND_ENV_ELEVATOR2 SOUND_ARG_LOAD(4, 0, 0x08, 0x00, 0) +/* not verified */ #define SOUND_ENV_WATER SOUND_ARG_LOAD(4, 0, 0x09, 0x00, 0) +/* not verified */ #define SOUND_ENV_UNKNOWN2 SOUND_ARG_LOAD(4, 0, 0x0A, 0x00, 0) +/* not verified */ #define SOUND_ENV_BOAT_ROCKING1 SOUND_ARG_LOAD(4, 0, 0x0B, 0x00, 0) +/* not verified */ #define SOUND_ENV_ELEVATOR3 SOUND_ARG_LOAD(4, 0, 0x0C, 0x00, 0) +/* not verified */ #define SOUND_ENV_ELEVATOR4 SOUND_ARG_LOAD(4, 0, 0x0D, 0x00, 0) +/* not verified */ #define SOUND_ENV_ELEVATOR4_2 SOUND_ARG_LOAD(4, 1, 0x0D, 0x00, 0) +/* not verified */ #define SOUND_ENV_MOVINGSAND SOUND_ARG_LOAD(4, 0, 0x0E, 0x00, 0) +/* not verified */ #define SOUND_ENV_MERRY_GO_ROUND_CREAKING SOUND_ARG_LOAD(4, 0, 0x0F, 0x40, 0) +/* not verified */ #define SOUND_ENV_WIND2 SOUND_ARG_LOAD(4, 0, 0x10, 0x80, 0) +/* not verified */ #define SOUND_ENV_UNK12 0x4012 +/* not verified */ #define SOUND_ENV_SLIDING SOUND_ARG_LOAD(4, 0, 0x13, 0x00, 0) +/* not verified */ #define SOUND_ENV_STAR SOUND_ARG_LOAD(4, 0, 0x14, 0x00, 1) +/* not verified */ #define SOUND_ENV_UNKNOWN4 SOUND_ARG_LOAD(4, 1, 0x15, 0x00, 0) +/* not verified */ #define SOUND_ENV_WATER_DRAIN SOUND_ARG_LOAD(4, 1, 0x16, 0x00, 0) +/* not verified */ #define SOUND_ENV_METAL_BOX_PUSH SOUND_ARG_LOAD(4, 0, 0x17, 0x80, 0) +/* not verified */ #define SOUND_ENV_SINK_QUICKSAND SOUND_ARG_LOAD(4, 0, 0x18, 0x80, 0) /* Object Sound Effects */ -/* not verified */ #define SOUND_OBJECT_WATERSOUND SOUND_ARG_LOAD(5, 0, 0x00, 0x80, 8) -/* not verified */ #define SOUND_OBJECT_MRISHOOT SOUND_ARG_LOAD(5, 0, 0x01, 0x00, 8) -#define SOUND_BABY_PENGUIN_WALK SOUND_ARG_LOAD(5, 0, 0x02, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_BOWSERWALK SOUND_ARG_LOAD(5, 0, 0x03, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_BOWSERROAR 0x5004 -/* not verified */ #define SOUND_OBJECT_BOWSERTAILPICKUP SOUND_ARG_LOAD(5, 0, 0x05, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_BOWSERDEFEATED SOUND_ARG_LOAD(5, 0, 0x06, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_BOWSERSPINNING SOUND_ARG_LOAD(5, 0, 0x07, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_BOWSERINHALING SOUND_ARG_LOAD(5, 0, 0x08, 0x00, 8) -#define SOUND_BIG_PENGUIN_WALK SOUND_ARG_LOAD(5, 0, 0x09, 0x80, 8) -/* not verified */ #define SOUND_OBJECT_BOOBOUNCETOP SOUND_ARG_LOAD(5, 0, 0x0A, 0x00, 8) -#define SOUND_BOO_LAUGH_SHORT SOUND_ARG_LOAD(5, 0, 0x0B, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_THWOMP SOUND_ARG_LOAD(5, 0, 0x0C, 0xA0, 8) -/* not verified */ #define SOUND_OBJECT_CANNON1 SOUND_ARG_LOAD(5, 0, 0x0D, 0xF0, 8) -/* not verified */ #define SOUND_OBJECT_CANNON2 SOUND_ARG_LOAD(5, 0, 0x0E, 0xF0, 8) -/* not verified */ #define SOUND_OBJECT_CANNON3 SOUND_ARG_LOAD(5, 0, 0x0F, 0xF0, 8) -#define SOUND_CH5_PIRANHA_PLANT_BITE 0x5010 -#define SOUND_CH5_PIRANHA_PLANT_DYING 0x5011 -/* not verified */ #define SOUND_OBJECT_JUMPWALKWATER 0x5012 -/* not verified */ #define SOUND_OBJECT_UNKNOWN2 SOUND_ARG_LOAD(5, 0, 0x13, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_MRIDEATH SOUND_ARG_LOAD(5, 0, 0x14, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_POUNDING1 SOUND_ARG_LOAD(5, 0, 0x15, 0x50, 8) -/* not verified */ #define SOUND_OBJECT_POUNDING1_HIGHPRIO SOUND_ARG_LOAD(5, 0, 0x15, 0x80, 8) -/* not verified */ #define SOUND_OBJECT_BULLYTHWOMP_LOWPRIO SOUND_ARG_LOAD(5, 0, 0x16, 0x60, 8) -/* not verified */ #define SOUND_OBJECT_BULLYTHWOMP SOUND_ARG_LOAD(5, 0, 0x16, 0x80, 8) -/* not verified */ #define SOUND_OBJECT_BULLYMETAL SOUND_ARG_LOAD(5, 0, 0x17, 0x80, 8) -/* not verified */ #define SOUND_OBJECT_BULLYEXPLODE SOUND_ARG_LOAD(5, 0, 0x18, 0xA0, 8) -/* not verified */ #define SOUND_OBJECT_BULLYEXPLODE_2 SOUND_ARG_LOAD(5, 1, 0x18, 0xA0, 8) -#define SOUND_CH5_BOWSER_PUZZLE_PIECE_MOVE 0x5019 -/* not verified */ #define SOUND_OBJECT_POUNDINGCANNON SOUND_ARG_LOAD(5, 0, 0x1A, 0x50, 8) -/* not verified */ #define SOUND_OBJECT_BULLYWALK SOUND_ARG_LOAD(5, 0, 0x1B, 0x30, 8) -/* not verified */ #define SOUND_OBJECT_BULLYATTACKED 0x501C -/* not verified */ #define SOUND_OBJECT_UNKNOWN3 SOUND_ARG_LOAD(5, 0, 0x1D, 0x80, 8) -/* not verified */ #define SOUND_OBJECT_UNKNOWN4 SOUND_ARG_LOAD(5, 0, 0x1E, 0xA0, 8) -#define SOUND_BABY_PENGUIN_DIVE SOUND_ARG_LOAD(5, 0, 0x1F, 0x40, 8) -/* not verified */ #define SOUND_OBJECT_GOOMBAWALK SOUND_ARG_LOAD(5, 0, 0x20, 0x00, 8) -#define SOUND_UKIKI_CHATTER_LONG SOUND_ARG_LOAD(5, 0, 0x21, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_MONTYMOLEATTACK SOUND_ARG_LOAD(5, 0, 0x22, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_EVILLAKITUTHROW SOUND_ARG_LOAD(5, 0, 0x22, 0x20, 8) -/* not verified */ #define SOUND_OBJECT_UNKNOWN5 0x5023 -/* not verified */ #define SOUND_OBJECT_DYINGENEMY1 SOUND_ARG_LOAD(5, 0, 0x24, 0x40, 8) -/* not verified */ #define SOUND_OBJECT_CANNON4 SOUND_ARG_LOAD(5, 0, 0x25, 0x40, 8) -/* not verified */ #define SOUND_OBJECT_DYINGENEMY2 0x5026 -/* not verified */ #define SOUND_OBJECT_BOBOMBWALK SOUND_ARG_LOAD(5, 0, 0x27, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_SOMETHINGLANDING SOUND_ARG_LOAD(5, 0, 0x28, 0x80, 8) -/* not verified */ #define SOUND_OBJECT_DIVINGINWATER SOUND_ARG_LOAD(5, 0, 0x29, 0xA0, 8) -/* not verified */ #define SOUND_OBJECT_SNOWSAND1 SOUND_ARG_LOAD(5, 0, 0x2A, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_SNOWSAND2 SOUND_ARG_LOAD(5, 0, 0x2B, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_FLAMEVANISHING 0x502C -/* not verified */ #define SOUND_OBJECT_DEFAULTDEATH SOUND_ARG_LOAD(5, 0, 0x2C, 0x80, 8) -#define SOUND_BIG_PENGUIN_YELL SOUND_ARG_LOAD(5, 0, 0x2D, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_WATERBOMBBOUNCING SOUND_ARG_LOAD(5, 0, 0x2E, 0x80, 8) -/* not verified */ #define SOUND_OBJECT_GOOMBAALERT SOUND_ARG_LOAD(5, 0, 0x2F, 0x00, 8) -#define SOUND_WIGGLER_JUMP SOUND_ARG_LOAD(5, 0, 0x2F, 0x60, 8) -/* not verified */ #define SOUND_OBJECT_STOMPED SOUND_ARG_LOAD(5, 0, 0x30, 0x80, 8) -/* not verified */ #define SOUND_OBJECT_UNKNOWN6 SOUND_ARG_LOAD(5, 0, 0x31, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_DIVINGINTOWATER SOUND_ARG_LOAD(5, 0, 0x32, 0x40, 8) -/* not verified */ #define SOUND_OBJECT_PIRANHAPLANTSHRINK SOUND_ARG_LOAD(5, 0, 0x33, 0x40, 8) -/* not verified */ #define SOUND_OBJECT_YOSHIWALK 0x5034 -/* not verified */ #define SOUND_OBJECT_UNK50342081 SOUND_ARG_LOAD(5, 0, 0x34, 0x20, 8) -/* not verified */ #define SOUND_OBJECT_UNKNOWNWALKING 0x5035 -/* not verified */ #define SOUND_OBJECT_UNK50350081 SOUND_ARG_LOAD(5, 0, 0x35, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_BULLYWALKING SOUND_ARG_LOAD(5, 0, 0x36, 0x60, 8) -/* not verified */ #define SOUND_OBJECT_DORRIE SOUND_ARG_LOAD(5, 0, 0x37, 0x60, 8) -/* not verified */ #define SOUND_OBJECT_BOWSERLAUGH SOUND_ARG_LOAD(5, 0, 0x38, 0x80, 8) -#define SOUND_UKIKI_CHATTER_SHORT SOUND_ARG_LOAD(5, 0, 0x39, 0x00, 8) -#define SOUND_UKIKI_CHATTER_IDLE SOUND_ARG_LOAD(5, 0, 0x3A, 0x00, 8) -#define SOUND_UKIKI_STEP_DEFAULT SOUND_ARG_LOAD(5, 0, 0x3B, 0x00, 8) -#define SOUND_UKIKI_STEP_LEAVES SOUND_ARG_LOAD(5, 0, 0x3C, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_KOOPA SOUND_ARG_LOAD(5, 0, 0x3D, 0xA0, 8) -/* not verified */ #define SOUND_OBJECT_KOOPADAMAGE SOUND_ARG_LOAD(5, 0, 0x3E, 0xA0, 8) -/* not verified */ #define SOUND_OBJECT_KLEPTO1 SOUND_ARG_LOAD(5, 0, 0x3F, 0x40, 8) -/* not verified */ #define SOUND_OBJECT_KLEPTO2 SOUND_ARG_LOAD(5, 0, 0x40, 0x60, 8) -/* not verified */ #define SOUND_OBJECT_KINGBOBOMB SOUND_ARG_LOAD(5, 0, 0x41, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_KINGBOBOMBDAMAGE 0x5042 -/* not verified */ #define SOUND_OBJECT_SCUTTLEBUGWALK 0x5043 -/* not verified */ #define SOUND_OBJECT_SCUTTLEBUGALERT 0x5044 -#define SOUND_CH5_BABY_PENGUIN_YELL 0x5045 -/* not verified */ #define SOUND_OBJECT_KINGBOBOMBJUMP SOUND_ARG_LOAD(5, 0, 0x46, 0x80, 8) -/* not verified */ #define SOUND_OBJECT_KINGWHOMPDEATH SOUND_ARG_LOAD(5, 1, 0x47, 0xC0, 8) -#define SOUND_BOO_LAUGH_LONG SOUND_ARG_LOAD(5, 0, 0x48, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_BAT 0x5049 -/* not verified */ #define SOUND_OBJECT_EEL SOUND_ARG_LOAD(5, 0, 0x4A, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_EEL_2 SOUND_ARG_LOAD(5, 2, 0x4A, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_BRIDGEEXPLODE SOUND_ARG_LOAD(5, 2, 0x4B, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_ENEMYALERT SOUND_ARG_LOAD(5, 0, 0x4C, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_SNUFITSHOOT SOUND_ARG_LOAD(5, 0, 0x4D, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_SKEETERWALK SOUND_ARG_LOAD(5, 0, 0x4E, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_WALKINGWATER SOUND_ARG_LOAD(5, 0, 0x4F, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_BIRDS1 0x5050 -/* not verified */ #define SOUND_OBJECT_BIRDS2 SOUND_ARG_LOAD(5, 0, 0x51, 0x40, 0) -/* not verified */ #define SOUND_OBJECT_BIRDS3 0x5052 -/* not verified */ #define SOUND_OBJECT_BIRDS4 0x5053 -/* not verified */ #define SOUND_OBJECT_PIRANHAPLANTAPPEAR SOUND_ARG_LOAD(5, 0, 0x54, 0x20, 8) -/* not verified */ #define SOUND_OBJECT_FLAMEBLOWN SOUND_ARG_LOAD(5, 0, 0x55, 0x80, 8) -/* not verified */ #define SOUND_OBJECT_MADPIANOCHOMPING SOUND_ARG_LOAD(5, 2, 0x56, 0x40, 8) -/* not verified */ #define SOUND_OBJECT_BULLYOTHERENEMY 0x5057 -/* not verified */ #define SOUND_OBJECT_BOBOMBBUDDY SOUND_ARG_LOAD(5, 0, 0x58, 0x40, 8) -/* not verified */ #define SOUND_OBJECT_SPINYUNK59 SOUND_ARG_LOAD(5, 0, 0x59, 0x10, 8) -/* not verified */ #define SOUND_OBJECT_THWOMPSOUNDSHORT 0x505A -/* not verified */ #define SOUND_OBJECT_THWOMPSOUNDLONG 0x505B -#define SOUND_WIGGLER_HIGH_PITCH SOUND_ARG_LOAD(5, 0, 0x5C, 0x40, 8) -/* not verified */ #define SOUND_OBJECT_HEAVEHOTOSSED SOUND_ARG_LOAD(5, 0, 0x5D, 0x40, 8) -/* not verified */ #define SOUND_OBJECT_WIGGLERDEATH 0x505E -/* not verified */ #define SOUND_OBJECT_BOWSERINTROLAUGH SOUND_ARG_LOAD(5, 0, 0x5F, 0x80, 9) -/* not verified */ #define SOUND_OBJECT_ENEMYDEATHHIGH SOUND_ARG_LOAD(5, 0, 0x60, 0xB0, 8) -/* not verified */ #define SOUND_OBJECT_ENEMYDEATHLOW SOUND_ARG_LOAD(5, 0, 0x61, 0xB0, 8) -/* not verified */ #define SOUND_OBJECT_BATDEATH SOUND_ARG_LOAD(5, 0, 0x62, 0xB0, 8) -/* not verified */ #define SOUND_OBJECT_KOOPADEATH SOUND_ARG_LOAD(5, 0, 0x63, 0xB0, 8) -/* not verified */ #define SOUND_OBJECT_FLYGUYDEATH SOUND_ARG_LOAD(5, 0, 0x63, 0xB0, 8) -/* not verified */ #define SOUND_OBJECT_POKEYDEATH SOUND_ARG_LOAD(5, 0, 0x63, 0xC0, 8) -/* not verified */ #define SOUND_OBJECT_WATERBOMBBOUNCING2 SOUND_ARG_LOAD(5, 0, 0x64, 0xC0, 8) -/* not verified */ #define SOUND_OBJECT_EXPLODE SOUND_ARG_LOAD(5, 0, 0x65, 0xD0, 8) -/* not verified */ #define SOUND_OBJECT_TELEPORT 0x5066 -/* not verified */ #define SOUND_OBJECT_UNKNOWN9 0x5067 -/* not verified */ #define SOUND_OBJECT_POUNDINGLOUD SOUND_ARG_LOAD(5, 0, 0x68, 0x40, 8) -#define SOUND_CH5_BOSS_DIALOG_GRUNT 0x5069 -/* not verified */ #define SOUND_OBJECT_MIPSRABBIT SOUND_ARG_LOAD(5, 0, 0x6A, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_MRISPINNING 0x506B -/* not verified */ #define SOUND_OBJECT_MIPSRABBITWATER SOUND_ARG_LOAD(5, 0, 0x6C, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_EYEROKEXPLODE SOUND_ARG_LOAD(5, 0, 0x6D, 0x00, 8) -/* not verified */ #define SOUND_OBJECT_CHUCKYADEATH SOUND_ARG_LOAD(5, 1, 0x6E, 0x00, 8) -#define SOUND_WIGGLER_DIALOG SOUND_ARG_LOAD(5, 0, 0x6F, 0x00, 8) -#define SOUND_WIGGLER_ATTACKED SOUND_ARG_LOAD(5, 0, 0x70, 0x60, 8) -#define SOUND_WIGGLER_LOW_PITCH SOUND_ARG_LOAD(5, 0, 0x71, 0x20, 8) -/* not verified */ #define SOUND_OBJECT_SNUFITDEATH SOUND_ARG_LOAD(5, 0, 0x72, 0xC0, 8) -/* not verified */ #define SOUND_OBJECT_CHOMPINGSOUND SOUND_ARG_LOAD(5, 0, 0x73, 0x40, 8) -#define SOUND_EMEMY_DEFEAT_SHRINK SOUND_ARG_LOAD(5, 0, 0x74, 0x40, 8) -/* not verified */ #define SOUND_OBJECT_BOWSERTAILPICKUP2 0x5075 -/* not verified */ #define SOUND_OBJECT_BOWSERDEFEATED2 0x5076 -/* not verified */ #define SOUND_OBJECT_BOWSERSWINGTAIL 0x5077 -/* not verified */ #define SOUND_OBJECT_KLEPTO3 0x5078 -/* not verified */ #define SOUND_OBJECT_KINGBOBOMB2 0x5079 -/* not verified */ #define SOUND_OBJECT_PENGUINWALKING3 0x507A -/* not verified */ #define SOUND_OBJECT_POUNDING2 0x507B -/* not verified */ #define SOUND_OBJECT_BOWSERROAR2 0x507C -/* not verified */ #define SOUND_OBJECT_BOWSERTAILPICKUP3 0x507D -/* not verified */ #define SOUND_OBJECT_BOWSERDEFEATED3 0x507E -/* not verified */ #define SOUND_OBJECT_BOWSERSWINGTAIL2 0x507F +#define SOUND_OBJ_SUSHI_SHARK_WATER_SOUND SOUND_ARG_LOAD(5, 0, 0x00, 0x80, 8) +#define SOUND_OBJ_MRI_SHOOT SOUND_ARG_LOAD(5, 0, 0x01, 0x00, 8) +#define SOUND_OBJ_BABY_PENGUIN_WALK SOUND_ARG_LOAD(5, 0, 0x02, 0x00, 8) +#define SOUND_OBJ_BOWSER_WALK SOUND_ARG_LOAD(5, 0, 0x03, 0x00, 8) +#define SOUND_OBJ_BOWSER_TAIL_PICKUP SOUND_ARG_LOAD(5, 0, 0x05, 0x00, 8) +#define SOUND_OBJ_BOWSER_DEFEATED SOUND_ARG_LOAD(5, 0, 0x06, 0x00, 8) +#define SOUND_OBJ_BOWSER_SPINNING SOUND_ARG_LOAD(5, 0, 0x07, 0x00, 8) +#define SOUND_OBJ_BOWSER_INHALING SOUND_ARG_LOAD(5, 0, 0x08, 0x00, 8) +#define SOUND_OBJ_BIG_PENGUIN_WALK SOUND_ARG_LOAD(5, 0, 0x09, 0x80, 8) +#define SOUND_OBJ_BOO_BOUNCE_TOP SOUND_ARG_LOAD(5, 0, 0x0A, 0x00, 8) +#define SOUND_OBJ_BOO_LAUGH_SHORT SOUND_ARG_LOAD(5, 0, 0x0B, 0x00, 8) +#define SOUND_OBJ_THWOMP SOUND_ARG_LOAD(5, 0, 0x0C, 0xA0, 8) +/* not verified */ #define SOUND_OBJ_CANNON1 SOUND_ARG_LOAD(5, 0, 0x0D, 0xF0, 8) +/* not verified */ #define SOUND_OBJ_CANNON2 SOUND_ARG_LOAD(5, 0, 0x0E, 0xF0, 8) +/* not verified */ #define SOUND_OBJ_CANNON3 SOUND_ARG_LOAD(5, 0, 0x0F, 0xF0, 8) +/* not verified */ #define SOUND_OBJ_JUMP_WALK_WATER 0x5012 +/* not verified */ #define SOUND_OBJ_UNKNOWN2 SOUND_ARG_LOAD(5, 0, 0x13, 0x00, 8) +#define SOUND_OBJ_MRI_DEATH SOUND_ARG_LOAD(5, 0, 0x14, 0x00, 8) +/* not verified */ #define SOUND_OBJ_POUNDING1 SOUND_ARG_LOAD(5, 0, 0x15, 0x50, 8) +/* not verified */ #define SOUND_OBJ_POUNDING1_HIGHPRIO SOUND_ARG_LOAD(5, 0, 0x15, 0x80, 8) +#define SOUND_OBJ_WHOMP_LOWPRIO SOUND_ARG_LOAD(5, 0, 0x16, 0x60, 8) +#define SOUND_OBJ_KING_BOBOMB SOUND_ARG_LOAD(5, 0, 0x16, 0x80, 8) +/* not verified */ #define SOUND_OBJ_BULLY_METAL SOUND_ARG_LOAD(5, 0, 0x17, 0x80, 8) +/* not verified */ #define SOUND_OBJ_BULLY_EXPLODE SOUND_ARG_LOAD(5, 0, 0x18, 0xA0, 8) +/* not verified */ #define SOUND_OBJ_BULLY_EXPLODE_2 SOUND_ARG_LOAD(5, 1, 0x18, 0xA0, 8) +/* not verified */ #define SOUND_OBJ_POUNDING_CANNON SOUND_ARG_LOAD(5, 0, 0x1A, 0x50, 8) +/* not verified */ #define SOUND_OBJ_BULLY_WALK SOUND_ARG_LOAD(5, 0, 0x1B, 0x30, 8) +/* not verified */ #define SOUND_OBJ_UNKNOWN3 SOUND_ARG_LOAD(5, 0, 0x1D, 0x80, 8) +/* not verified */ #define SOUND_OBJ_UNKNOWN4 SOUND_ARG_LOAD(5, 0, 0x1E, 0xA0, 8) +#define SOUND_OBJ_BABY_PENGUIN_DIVE SOUND_ARG_LOAD(5, 0, 0x1F, 0x40, 8) +#define SOUND_OBJ_GOOMBA_WALK SOUND_ARG_LOAD(5, 0, 0x20, 0x00, 8) +#define SOUND_OBJ_UKIKI_CHATTER_LONG SOUND_ARG_LOAD(5, 0, 0x21, 0x00, 8) +#define SOUND_OBJ_MONTY_MOLE_ATTACK SOUND_ARG_LOAD(5, 0, 0x22, 0x00, 8) +#define SOUND_OBJ_EVIL_LAKITU_THROW SOUND_ARG_LOAD(5, 0, 0x22, 0x20, 8) +/* not verified */ #define SOUND_OBJ_UNK23 0x5023 +#define SOUND_OBJ_DYING_ENEMY1 SOUND_ARG_LOAD(5, 0, 0x24, 0x40, 8) +/* not verified */ #define SOUND_OBJ_CANNON4 SOUND_ARG_LOAD(5, 0, 0x25, 0x40, 8) +/* not verified */ #define SOUND_OBJ_DYING_ENEMY2 0x5026 +#define SOUND_OBJ_BOBOMB_WALK SOUND_ARG_LOAD(5, 0, 0x27, 0x00, 8) +/* not verified */ #define SOUND_OBJ_SOMETHING_LANDING SOUND_ARG_LOAD(5, 0, 0x28, 0x80, 8) +/* not verified */ #define SOUND_OBJ_DIVING_IN_WATER SOUND_ARG_LOAD(5, 0, 0x29, 0xA0, 8) +/* not verified */ #define SOUND_OBJ_SNOW_SAND1 SOUND_ARG_LOAD(5, 0, 0x2A, 0x00, 8) +/* not verified */ #define SOUND_OBJ_SNOW_SAND2 SOUND_ARG_LOAD(5, 0, 0x2B, 0x00, 8) +#define SOUND_OBJ_DEFAULT_DEATH SOUND_ARG_LOAD(5, 0, 0x2C, 0x80, 8) +#define SOUND_OBJ_BIG_PENGUIN_YELL SOUND_ARG_LOAD(5, 0, 0x2D, 0x00, 8) +#define SOUND_OBJ_WATER_BOMB_BOUNCING SOUND_ARG_LOAD(5, 0, 0x2E, 0x80, 8) +#define SOUND_OBJ_GOOMBA_ALERT SOUND_ARG_LOAD(5, 0, 0x2F, 0x00, 8) +#define SOUND_OBJ_WIGGLER_JUMP SOUND_ARG_LOAD(5, 0, 0x2F, 0x60, 8) +/* not verified */ #define SOUND_OBJ_STOMPED SOUND_ARG_LOAD(5, 0, 0x30, 0x80, 8) +/* not verified */ #define SOUND_OBJ_UNKNOWN6 SOUND_ARG_LOAD(5, 0, 0x31, 0x00, 8) +/* not verified */ #define SOUND_OBJ_DIVING_INTO_WATER SOUND_ARG_LOAD(5, 0, 0x32, 0x40, 8) +#define SOUND_OBJ_PIRANHA_PLANT_SHRINK SOUND_ARG_LOAD(5, 0, 0x33, 0x40, 8) +#define SOUND_OBJ_KOOPA_THE_QUICK_WALK SOUND_ARG_LOAD(5, 0, 0x34, 0x20, 8) +#define SOUND_OBJ_KOOPA_WALK SOUND_ARG_LOAD(5, 0, 0x35, 0x00, 8) +#define SOUND_OBJ_BULLY_WALKING SOUND_ARG_LOAD(5, 0, 0x36, 0x60, 8) +#define SOUND_OBJ_DORRIE SOUND_ARG_LOAD(5, 0, 0x37, 0x60, 8) +#define SOUND_OBJ_BOWSER_LAUGH SOUND_ARG_LOAD(5, 0, 0x38, 0x80, 8) +#define SOUND_OBJ_UKIKI_CHATTER_SHORT SOUND_ARG_LOAD(5, 0, 0x39, 0x00, 8) +#define SOUND_OBJ_UKIKI_CHATTER_IDLE SOUND_ARG_LOAD(5, 0, 0x3A, 0x00, 8) +#define SOUND_OBJ_UKIKI_STEP_DEFAULT SOUND_ARG_LOAD(5, 0, 0x3B, 0x00, 8) +#define SOUND_OBJ_UKIKI_STEP_LEAVES SOUND_ARG_LOAD(5, 0, 0x3C, 0x00, 8) +#define SOUND_OBJ_KOOPA_TALK SOUND_ARG_LOAD(5, 0, 0x3D, 0xA0, 8) +#define SOUND_OBJ_KOOPA_DAMAGE SOUND_ARG_LOAD(5, 0, 0x3E, 0xA0, 8) +/* not verified */ #define SOUND_OBJ_KLEPTO1 SOUND_ARG_LOAD(5, 0, 0x3F, 0x40, 8) +/* not verified */ #define SOUND_OBJ_KLEPTO2 SOUND_ARG_LOAD(5, 0, 0x40, 0x60, 8) +#define SOUND_OBJ_KING_BOBOMB_TALK SOUND_ARG_LOAD(5, 0, 0x41, 0x00, 8) +#define SOUND_OBJ_KING_BOBOMB_JUMP SOUND_ARG_LOAD(5, 0, 0x46, 0x80, 8) +#define SOUND_OBJ_KING_WHOMP_DEATH SOUND_ARG_LOAD(5, 1, 0x47, 0xC0, 8) +#define SOUND_OBJ_BOO_LAUGH_LONG SOUND_ARG_LOAD(5, 0, 0x48, 0x00, 8) +/* not verified */ #define SOUND_OBJ_EEL SOUND_ARG_LOAD(5, 0, 0x4A, 0x00, 8) +/* not verified */ #define SOUND_OBJ_EEL_2 SOUND_ARG_LOAD(5, 2, 0x4A, 0x00, 8) +#define SOUND_OBJ_EYEROK_SHOW_EYE SOUND_ARG_LOAD(5, 2, 0x4B, 0x00, 8) +#define SOUND_OBJ_MR_BLIZZARD_ALERT SOUND_ARG_LOAD(5, 0, 0x4C, 0x00, 8) +#define SOUND_OBJ_SNUFIT_SHOOT SOUND_ARG_LOAD(5, 0, 0x4D, 0x00, 8) +#define SOUND_OBJ_SKEETER_WALK SOUND_ARG_LOAD(5, 0, 0x4E, 0x00, 8) +/* not verified */ #define SOUND_OBJ_WALKING_WATER SOUND_ARG_LOAD(5, 0, 0x4F, 0x00, 8) +#define SOUND_OBJ_BIRD_CHIRP3 SOUND_ARG_LOAD(5, 0, 0x51, 0x40, 0) +#define SOUND_OBJ_PIRANHA_PLANT_APPEAR SOUND_ARG_LOAD(5, 0, 0x54, 0x20, 8) +#define SOUND_OBJ_FLAME_BLOWN SOUND_ARG_LOAD(5, 0, 0x55, 0x80, 8) +#define SOUND_OBJ_MAD_PIANO_CHOMPING SOUND_ARG_LOAD(5, 2, 0x56, 0x40, 8) +#define SOUND_OBJ_BOBOMB_BUDDY_TALK SOUND_ARG_LOAD(5, 0, 0x58, 0x40, 8) +/* not verified */ #define SOUND_OBJ_SPINY_UNK59 SOUND_ARG_LOAD(5, 0, 0x59, 0x10, 8) +#define SOUND_OBJ_WIGGLER_HIGH_PITCH SOUND_ARG_LOAD(5, 0, 0x5C, 0x40, 8) +#define SOUND_OBJ_HEAVEHO_TOSSED SOUND_ARG_LOAD(5, 0, 0x5D, 0x40, 8) +/* not verified */ #define SOUND_OBJ_WIGGLER_DEATH 0x505E +#define SOUND_OBJ_BOWSER_INTRO_LAUGH SOUND_ARG_LOAD(5, 0, 0x5F, 0x80, 9) +/* not verified */ #define SOUND_OBJ_ENEMY_DEATH_HIGH SOUND_ARG_LOAD(5, 0, 0x60, 0xB0, 8) +/* not verified */ #define SOUND_OBJ_ENEMY_DEATH_LOW SOUND_ARG_LOAD(5, 0, 0x61, 0xB0, 8) +#define SOUND_OBJ_SWOOP_DEATH SOUND_ARG_LOAD(5, 0, 0x62, 0xB0, 8) +#define SOUND_OBJ_KOOPA_FLYGUY_DEATH SOUND_ARG_LOAD(5, 0, 0x63, 0xB0, 8) +#define SOUND_OBJ_POKEY_DEATH SOUND_ARG_LOAD(5, 0, 0x63, 0xC0, 8) +/* not verified */ #define SOUND_OBJ_SNOWMAN_BOUNCE SOUND_ARG_LOAD(5, 0, 0x64, 0xC0, 8) +#define SOUND_OBJ_SNOWMAN_EXPLODE SOUND_ARG_LOAD(5, 0, 0x65, 0xD0, 8) +/* not verified */ #define SOUND_OBJ_POUNDING_LOUD SOUND_ARG_LOAD(5, 0, 0x68, 0x40, 8) +/* not verified */ #define SOUND_OBJ_MIPS_RABBIT SOUND_ARG_LOAD(5, 0, 0x6A, 0x00, 8) +/* not verified */ #define SOUND_OBJ_MIPS_RABBIT_WATER SOUND_ARG_LOAD(5, 0, 0x6C, 0x00, 8) +#define SOUND_OBJ_EYEROK_EXPLODE SOUND_ARG_LOAD(5, 0, 0x6D, 0x00, 8) +#define SOUND_OBJ_CHUCKYA_DEATH SOUND_ARG_LOAD(5, 1, 0x6E, 0x00, 8) +#define SOUND_OBJ_WIGGLER_TALK SOUND_ARG_LOAD(5, 0, 0x6F, 0x00, 8) +#define SOUND_OBJ_WIGGLER_ATTACKED SOUND_ARG_LOAD(5, 0, 0x70, 0x60, 8) +#define SOUND_OBJ_WIGGLER_LOW_PITCH SOUND_ARG_LOAD(5, 0, 0x71, 0x20, 8) +#define SOUND_OBJ_SNUFIT_SKEETER_DEATH SOUND_ARG_LOAD(5, 0, 0x72, 0xC0, 8) +#define SOUND_OBJ_BUBBA_CHOMP SOUND_ARG_LOAD(5, 0, 0x73, 0x40, 8) +#define SOUND_OBJ_ENEMY_DEFEAT_SHRINK SOUND_ARG_LOAD(5, 0, 0x74, 0x40, 8) -// Channel 6 sound effects are not yet explored. -/* not verified */ #define SOUND_CH6_BOWSERSPITFIRE SOUND_ARG_LOAD(6, 0, 0x00, 0x00, 0) -/* not verified */ #define SOUND_CH6_LAKITUFLY SOUND_ARG_LOAD(6, 0, 0x02, 0x80, 0) -/* not verified */ #define SOUND_CH6_LAKITUFLY_HIGHPRIO SOUND_ARG_LOAD(6, 0, 0x02, 0xFF, 0) -/* not verified */ #define SOUND_CH6_AMPBUZZ SOUND_ARG_LOAD(6, 0, 0x03, 0x40, 0) -/* not verified */ #define SOUND_CH6_BLOWWINDORFIRE SOUND_ARG_LOAD(6, 0, 0x04, 0x80, 0) -/* not verified */ #define SOUND_CH6_BLOWWINDORFIRE_LOWPRIO SOUND_ARG_LOAD(6, 0, 0x04, 0x40, 0) -/* not verified */ #define SOUND_CH6_ROUGHSLIDE SOUND_ARG_LOAD(6, 0, 0x05, 0x00, 0) -/* not verified */ #define SOUND_CH6_HEAVEHOMOVE SOUND_ARG_LOAD(6, 0, 0x06, 0x40, 0) -/* not verified */ #define SOUND_CH6_BOBOMBLITFUSE SOUND_ARG_LOAD(6, 0, 0x08, 0x60, 0) -/* not verified */ #define SOUND_CH6_HOWLINGWIND SOUND_ARG_LOAD(6, 0, 0x09, 0x80, 0) -/* not verified */ #define SOUND_CH6_CHUCKYAMOVE SOUND_ARG_LOAD(6, 0, 0x0A, 0x40, 0) -/* not verified */ #define SOUND_CH6_PEACHTWINKLE SOUND_ARG_LOAD(6, 0, 0x0B, 0x40, 0) -/* not verified */ #define SOUND_CH6_CASTLEOUTDOORSAMBIENT SOUND_ARG_LOAD(6, 0, 0x10, 0x40, 0) +#define SOUND_AIR_BOWSER_SPIT_FIRE SOUND_ARG_LOAD(6, 0, 0x00, 0x00, 0) +#define SOUND_AIR_UNK01 0x6001 // ? +#define SOUND_AIR_LAKITU_FLY SOUND_ARG_LOAD(6, 0, 0x02, 0x80, 0) +#define SOUND_AIR_LAKITU_FLY_HIGHPRIO SOUND_ARG_LOAD(6, 0, 0x02, 0xFF, 0) +#define SOUND_AIR_AMP_BUZZ SOUND_ARG_LOAD(6, 0, 0x03, 0x40, 0) +#define SOUND_AIR_BLOW_FIRE SOUND_ARG_LOAD(6, 0, 0x04, 0x80, 0) +#define SOUND_AIR_BLOW_WIND SOUND_ARG_LOAD(6, 0, 0x04, 0x40, 0) +#define SOUND_AIR_ROUGH_SLIDE SOUND_ARG_LOAD(6, 0, 0x05, 0x00, 0) +#define SOUND_AIR_HEAVEHO_MOVE SOUND_ARG_LOAD(6, 0, 0x06, 0x40, 0) +#define SOUND_AIR_UNK07 0x6007 // ? +#define SOUND_AIR_BOBOMB_LIT_FUSE SOUND_ARG_LOAD(6, 0, 0x08, 0x60, 0) +#define SOUND_AIR_HOWLING_WIND SOUND_ARG_LOAD(6, 0, 0x09, 0x80, 0) +#define SOUND_AIR_CHUCKYA_MOVE SOUND_ARG_LOAD(6, 0, 0x0A, 0x40, 0) +#define SOUND_AIR_PEACH_TWINKLE SOUND_ARG_LOAD(6, 0, 0x0B, 0x40, 0) +#define SOUND_AIR_CASTLE_OUTDOORS_AMBIENT SOUND_ARG_LOAD(6, 0, 0x10, 0x40, 0) /* Menu Sound Effects */ -/* not verified */ #define SOUND_MENU_CHANGESELECT SOUND_ARG_LOAD(7, 0, 0x00, 0xF8, 8) -/* not verified */ #define SOUND_MENU_REVERSEPAUSE 0x7001 -/* not verified */ #define SOUND_MENU_PAUSE1 SOUND_ARG_LOAD(7, 0, 0x02, 0xF0, 8) -/* not verified */ #define SOUND_MENU_PAUSE1_HIGHPRIO SOUND_ARG_LOAD(7, 0, 0x02, 0xFF, 8) -/* not verified */ #define SOUND_MENU_PAUSE2 SOUND_ARG_LOAD(7, 0, 0x03, 0xFF, 8) -/* not verified */ #define SOUND_MENU_MESSAGEAPPEAR SOUND_ARG_LOAD(7, 0, 0x04, 0x00, 8) -/* not verified */ #define SOUND_MENU_MESSAGEDISAPPEAR SOUND_ARG_LOAD(7, 0, 0x05, 0x00, 8) -/* not verified */ #define SOUND_MENU_CAMERAZOOMIN SOUND_ARG_LOAD(7, 0, 0x06, 0x00, 8) -/* not verified */ #define SOUND_MENU_CAMERAZOOMOUT SOUND_ARG_LOAD(7, 0, 0x07, 0x00, 8) -/* not verified */ #define SOUND_MENU_PINCHMARIOFACE SOUND_ARG_LOAD(7, 0, 0x08, 0x00, 8) -/* not verified */ #define SOUND_MENU_LETGOMARIOFACE SOUND_ARG_LOAD(7, 0, 0x09, 0x00, 8) -/* not verified */ #define SOUND_MENU_HANDAPPEAR SOUND_ARG_LOAD(7, 0, 0x0A, 0x00, 8) -/* not verified */ #define SOUND_MENU_HANDDISAPPEAR SOUND_ARG_LOAD(7, 0, 0x0B, 0x00, 8) -/* not verified */ #define SOUND_MENU_UNKNOWN1 SOUND_ARG_LOAD(7, 0, 0x0C, 0x00, 8) -/* not verified */ #define SOUND_MENU_POWERMETER SOUND_ARG_LOAD(7, 0, 0x0D, 0x00, 8) -/* not verified */ #define SOUND_MENU_CAMERABUZZ SOUND_ARG_LOAD(7, 0, 0x0E, 0x00, 8) -/* not verified */ #define SOUND_MENU_CAMERATURN SOUND_ARG_LOAD(7, 0, 0x0F, 0x00, 8) -/* not verified */ #define SOUND_MENU_UNKNOWN2 0x7010 -/* not verified */ #define SOUND_MENU_CLICKFILESELECT SOUND_ARG_LOAD(7, 0, 0x11, 0x00, 8) -/* not verified */ #define SOUND_MENU_READSIGN 0x7012 -/* not verified */ #define SOUND_MENU_MESSAGENEXTPAGE SOUND_ARG_LOAD(7, 0, 0x13, 0x00, 8) -/* not verified */ #define SOUND_MENU_COINITSAMEMARIO SOUND_ARG_LOAD(7, 0, 0x14, 0x00, 8) -/* not verified */ #define SOUND_MENU_YOSHIGAINLIVES SOUND_ARG_LOAD(7, 0, 0x15, 0x00, 8) -/* not verified */ #define SOUND_MENU_ENTERPIPE SOUND_ARG_LOAD(7, 0, 0x16, 0xA0, 8) -/* not verified */ #define SOUND_MENU_EXITPIPE SOUND_ARG_LOAD(7, 0, 0x17, 0xA0, 8) -/* not verified */ #define SOUND_MENU_BOWSERLAUGH SOUND_ARG_LOAD(7, 0, 0x18, 0x80, 8) -/* not verified */ #define SOUND_MENU_MARIOHOLE SOUND_ARG_LOAD(7, 1, 0x19, 0x80, 8) -/* not verified */ #define SOUND_MENU_CLICKCHANGEVIEW SOUND_ARG_LOAD(7, 0, 0x1A, 0x80, 8) -/* not verified */ #define SOUND_MENU_CAMERAUNUSED1 0x701B -/* not verified */ #define SOUND_MENU_CAMERAUNUSED2 0x701C -/* not verified */ #define SOUND_MENU_MARIOCASTLEWARP SOUND_ARG_LOAD(7, 0, 0x1D, 0xB0, 8) -/* not verified */ #define SOUND_MENU_STARSOUND SOUND_ARG_LOAD(7, 0, 0x1E, 0xFF, 8) -/* not verified */ #define SOUND_MENU_THANKYOUPLAYINGMYGAME SOUND_ARG_LOAD(7, 0, 0x1F, 0xFF, 8) -/* not verified */ #define SOUND_MENU_READASIGN 0x7020 -/* not verified */ #define SOUND_MENU_EXITASIGN 0x7021 -/* not verified */ #define SOUND_MENU_MARIOCASTLEWARP2 SOUND_ARG_LOAD(7, 0, 0x22, 0x20, 8) -/* not verified */ #define SOUND_MENU_STARSOUNDOKEYDOKEY SOUND_ARG_LOAD(7, 0, 0x23, 0xFF, 8) -/* not verified */ #define SOUND_MENU_STARSOUNDLETSAGO SOUND_ARG_LOAD(7, 0, 0x24, 0xFF, 8) +#define SOUND_MENU_CHANGE_SELECT SOUND_ARG_LOAD(7, 0, 0x00, 0xF8, 8) +/* not verified */ #define SOUND_MENU_REVERSE_PAUSE 0x7001 +#define SOUND_MENU_PAUSE SOUND_ARG_LOAD(7, 0, 0x02, 0xF0, 8) +#define SOUND_MENU_PAUSE_HIGHPRIO SOUND_ARG_LOAD(7, 0, 0x02, 0xFF, 8) +#define SOUND_MENU_PAUSE_2 SOUND_ARG_LOAD(7, 0, 0x03, 0xFF, 8) +#define SOUND_MENU_MESSAGE_APPEAR SOUND_ARG_LOAD(7, 0, 0x04, 0x00, 8) +#define SOUND_MENU_MESSAGE_DISAPPEAR SOUND_ARG_LOAD(7, 0, 0x05, 0x00, 8) +#define SOUND_MENU_CAMERA_ZOOM_IN SOUND_ARG_LOAD(7, 0, 0x06, 0x00, 8) +#define SOUND_MENU_CAMERA_ZOOM_OUT SOUND_ARG_LOAD(7, 0, 0x07, 0x00, 8) +#define SOUND_MENU_PINCH_MARIO_FACE SOUND_ARG_LOAD(7, 0, 0x08, 0x00, 8) +#define SOUND_MENU_LET_GO_MARIO_FACE SOUND_ARG_LOAD(7, 0, 0x09, 0x00, 8) +#define SOUND_MENU_HAND_APPEAR SOUND_ARG_LOAD(7, 0, 0x0A, 0x00, 8) +#define SOUND_MENU_HAND_DISAPPEAR SOUND_ARG_LOAD(7, 0, 0x0B, 0x00, 8) +/* not verified */ #define SOUND_MENU_UNK0C SOUND_ARG_LOAD(7, 0, 0x0C, 0x00, 8) +/* not verified */ #define SOUND_MENU_POWER_METER SOUND_ARG_LOAD(7, 0, 0x0D, 0x00, 8) +#define SOUND_MENU_CAMERA_BUZZ SOUND_ARG_LOAD(7, 0, 0x0E, 0x00, 8) +#define SOUND_MENU_CAMERA_TURN SOUND_ARG_LOAD(7, 0, 0x0F, 0x00, 8) +/* not verified */ #define SOUND_MENU_UNK10 0x7010 +#define SOUND_MENU_CLICK_FILE_SELECT SOUND_ARG_LOAD(7, 0, 0x11, 0x00, 8) +/* not verified */ #define SOUND_MENU_READ_SIGN 0x7012 +/* not verified */ #define SOUND_MENU_MESSAGE_NEXT_PAGE SOUND_ARG_LOAD(7, 0, 0x13, 0x00, 8) +#define SOUND_MENU_COIN_ITS_A_ME_MARIO SOUND_ARG_LOAD(7, 0, 0x14, 0x00, 8) +#define SOUND_MENU_YOSHI_GAIN_LIVES SOUND_ARG_LOAD(7, 0, 0x15, 0x00, 8) +#define SOUND_MENU_ENTER_PIPE SOUND_ARG_LOAD(7, 0, 0x16, 0xA0, 8) +#define SOUND_MENU_EXIT_PIPE SOUND_ARG_LOAD(7, 0, 0x17, 0xA0, 8) +#define SOUND_MENU_BOWSER_LAUGH SOUND_ARG_LOAD(7, 0, 0x18, 0x80, 8) +#define SOUND_MENU_ENTER_HOLE SOUND_ARG_LOAD(7, 1, 0x19, 0x80, 8) +/* not verified */ #define SOUND_MENU_CLICK_CHANGE_VIEW SOUND_ARG_LOAD(7, 0, 0x1A, 0x80, 8) +/* not verified */ #define SOUND_MENU_CAMERA_UNUSED1 0x701B +/* not verified */ #define SOUND_MENU_CAMERA_UNUSED2 0x701C +/* not verified */ #define SOUND_MENU_MARIO_CASTLE_WARP SOUND_ARG_LOAD(7, 0, 0x1D, 0xB0, 8) +#define SOUND_MENU_STAR_SOUND SOUND_ARG_LOAD(7, 0, 0x1E, 0xFF, 8) +#define SOUND_MENU_THANK_YOU_PLAYING_MY_GAME SOUND_ARG_LOAD(7, 0, 0x1F, 0xFF, 8) +/* not verified */ #define SOUND_MENU_READ_A_SIGN 0x7020 +/* not verified */ #define SOUND_MENU_EXIT_A_SIGN 0x7021 +/* not verified */ #define SOUND_MENU_MARIO_CASTLE_WARP2 SOUND_ARG_LOAD(7, 0, 0x22, 0x20, 8) +#define SOUND_MENU_STAR_SOUND_OKEY_DOKEY SOUND_ARG_LOAD(7, 0, 0x23, 0xFF, 8) +#define SOUND_MENU_STAR_SOUND_LETS_A_GO SOUND_ARG_LOAD(7, 0, 0x24, 0xFF, 8) -/* US only; an index between 0-7 or 0-4 is added to the sound ID before playing */ -/* not verified */ #define SOUND_MENU_COLLECTREDCOIN SOUND_ARG_LOAD(7, 8, 0x28, 0x90, 8) -/* not verified */ #define SOUND_MENU_COLLECTSECRET SOUND_ARG_LOAD(7, 0, 0x30, 0x20, 8) +// US/EU only; an index between 0-7 or 0-4 is added to the sound ID before +// playing, producing the same sound with different pitch. +#define SOUND_MENU_COLLECT_RED_COIN SOUND_ARG_LOAD(7, 8, 0x28, 0x90, 8) +#define SOUND_MENU_COLLECT_SECRET SOUND_ARG_LOAD(7, 0, 0x30, 0x20, 8) -/* Channel 8 Sound Effects */ -// Channel 3 loads sounds from the same place as channel 8, so these are all carried over. -// Sounds from the same channel cannot play at the same time, so channel 3 and 5 sounds are also -// loaded into channels 8 and 9 so that they can play over other channel 3/5 sounds. -/* not verified */ #define SOUND_CH8_UNK2E SOUND_ARG_LOAD(8, 0, 0x2E, 0x20, 8) -/* not verified */ #define SOUND_CH8_UNK3E SOUND_ARG_LOAD(8, 0, 0x3E, 0xC0, 8) -/* not verified */ #define SOUND_CH8_UNK40 SOUND_ARG_LOAD(8, 0, 0x40, 0x00, 8) -/* not verified */ #define SOUND_CH8_UNK48 SOUND_ARG_LOAD(8, 0, 0x48, 0x20, 8) -/* not verified */ #define SOUND_CH8_UNK4B SOUND_ARG_LOAD(8, 1, 0x4B, 0xE0, 8) -/* not verified */ #define SOUND_CH8_UNK4C SOUND_ARG_LOAD(8, 1, 0x4C, 0xF0, 8) -/* not verified */ #define SOUND_CH8_UNK50 SOUND_ARG_LOAD(8, 0, 0x50, 0x40, 0) -/* not verified */ #define SOUND_CH8_SWITCH5 SOUND_ARG_LOAD(8, 0, 0x54, 0xF0, 1) -/* not verified */ #define SOUND_CH8_SWITCH6 SOUND_ARG_LOAD(8, 0, 0x55, 0xF0, 1) -/* not verified */ #define SOUND_CH8_UNK57 SOUND_ARG_LOAD(8, 0, 0x57, 0xFF, 9) -/* not verified */ #define SOUND_CH8_UNK59 SOUND_ARG_LOAD(8, 0, 0x59, 0x00, 8) -/* not verified */ #define SOUND_CH8_UNK60 SOUND_ARG_LOAD(8, 0, 0x60, 0x00, 8) -/* not verified */ #define SOUND_CH8_UNK61 SOUND_ARG_LOAD(8, 0, 0x61, 0x00, 8) -/* not verified */ #define SOUND_CH8_UNK63 SOUND_ARG_LOAD(8, 0, 0x63, 0xD0, 8) -/* not verified */ #define SOUND_CH8_RIGHTANSWER SOUND_ARG_LOAD(8, 0, 0x6A, 0xA0, 8) - -/* Channel 9 Sound Effects */ -// Channel 9 loads sounds from the same place as channel 5. See the channel 8 comment for why this was done. -/* not verified */ #define SOUND_CH9_UNK04 SOUND_ARG_LOAD(9, 0, 0x04, 0x00, 8) -#define SOUND_PIRANHA_PLANT_BITE SOUND_ARG_LOAD(9, 0, 0x10, 0x50, 8) -#define SOUND_PIRANHA_PLANT_DYING SOUND_ARG_LOAD(9, 0, 0x11, 0x60, 8) -#define SOUND_BOWSER_PUZZLE_PIECE_MOVE SOUND_ARG_LOAD(9, 0, 0x19, 0x20, 8) -/* not verified */ #define SOUND_CH9_UNK1C SOUND_ARG_LOAD(9, 0, 0x1C, 0x00, 8) -/* not verified */ #define SOUND_CH9_UNK42 SOUND_ARG_LOAD(9, 1, 0x42, 0x40, 8) -/* not verified */ #define SOUND_CH9_UNK43 SOUND_ARG_LOAD(9, 0, 0x43, 0x40, 8) -/* not verified */ #define SOUND_CH9_UNK44 SOUND_ARG_LOAD(9, 0, 0x44, 0x40, 8) -#define SOUND_BABY_PENGUIN_YELL SOUND_ARG_LOAD(9, 0, 0x45, 0x00, 8) -/* not verified */ #define SOUND_CH9_UNK49 SOUND_ARG_LOAD(9, 0, 0x49, 0x00, 8) -/* not verified */ #define SOUND_CH9_UNK52 SOUND_ARG_LOAD(9, 0, 0x52, 0x40, 0) -/* not verified */ #define SOUND_CH9_UNK57 SOUND_ARG_LOAD(9, 0, 0x57, 0x00, 8) -/* not verified */ #define SOUND_CH9_UNK5A_LOWPRIO SOUND_ARG_LOAD(9, 3, 0x5A, 0x00, 8) -/* not verified */ #define SOUND_CH9_UNK5A SOUND_ARG_LOAD(9, 3, 0x5A, 0xC0, 8) -/* not verified */ #define SOUND_CH9_UNK5B SOUND_ARG_LOAD(9, 2, 0x5B, 0x00, 8) -/* not verified */ #define SOUND_CH9_UNK66 SOUND_ARG_LOAD(9, 0, 0x66, 0x80, 8) -/* not verified */ #define SOUND_CH9_UNK67 SOUND_ARG_LOAD(9, 0, 0x67, 0x80, 8) -#define SOUND_BOSS_DIALOG_GRUNT SOUND_ARG_LOAD(9, 0, 0x69, 0x40, 8) -/* not verified */ #define SOUND_CH9_UNK6B SOUND_ARG_LOAD(9, 0, 0x6B, 0x00, 8) +// Channel 8 loads sounds from the same place as channel 3, making it possible +// to play two channel 3 sounds at once (since just one sound from each channel +// can play at a given time). +#define SOUND_GENERAL2_BOBOMB_EXPLOSION SOUND_ARG_LOAD(8, 0, 0x2E, 0x20, 8) +#define SOUND_GENERAL2_PURPLE_SWITCH SOUND_ARG_LOAD(8, 0, 0x3E, 0xC0, 8) +#define SOUND_GENERAL2_ROTATING_BLOCK_CLICK SOUND_ARG_LOAD(8, 0, 0x40, 0x00, 8) +#define SOUND_GENERAL2_SPINDEL_ROLL SOUND_ARG_LOAD(8, 0, 0x48, 0x20, 8) +#define SOUND_GENERAL2_PYRAMID_TOP_SPIN SOUND_ARG_LOAD(8, 1, 0x4B, 0xE0, 8) +#define SOUND_GENERAL2_PYRAMID_TOP_EXPLOSION SOUND_ARG_LOAD(8, 1, 0x4C, 0xF0, 8) +#define SOUND_GENERAL2_BIRD_CHIRP2 SOUND_ARG_LOAD(8, 0, 0x50, 0x40, 0) +#define SOUND_GENERAL2_SWITCH_TICK_FAST SOUND_ARG_LOAD(8, 0, 0x54, 0xF0, 1) +#define SOUND_GENERAL2_SWITCH_TICK_SLOW SOUND_ARG_LOAD(8, 0, 0x55, 0xF0, 1) +#define SOUND_GENERAL2_STAR_APPEARS SOUND_ARG_LOAD(8, 0, 0x57, 0xFF, 9) +#define SOUND_GENERAL2_ROTATING_BLOCK_ALERT SOUND_ARG_LOAD(8, 0, 0x59, 0x00, 8) +#define SOUND_GENERAL2_BOWSER_EXPLODE SOUND_ARG_LOAD(8, 0, 0x60, 0x00, 8) +#define SOUND_GENERAL2_BOWSER_KEY SOUND_ARG_LOAD(8, 0, 0x61, 0x00, 8) +#define SOUND_GENERAL2_1UP_APPEAR SOUND_ARG_LOAD(8, 0, 0x63, 0xD0, 8) +#define SOUND_GENERAL2_RIGHT_ANSWER SOUND_ARG_LOAD(8, 0, 0x6A, 0xA0, 8) +// Channel 9 loads sounds from the same place as channel 5. +#define SOUND_OBJ2_BOWSER_ROAR SOUND_ARG_LOAD(9, 0, 0x04, 0x00, 8) +#define SOUND_OBJ2_PIRANHA_PLANT_BITE SOUND_ARG_LOAD(9, 0, 0x10, 0x50, 8) +#define SOUND_OBJ2_PIRANHA_PLANT_DYING SOUND_ARG_LOAD(9, 0, 0x11, 0x60, 8) +#define SOUND_OBJ2_BOWSER_PUZZLE_PIECE_MOVE SOUND_ARG_LOAD(9, 0, 0x19, 0x20, 8) +#define SOUND_OBJ2_BULLY_ATTACKED SOUND_ARG_LOAD(9, 0, 0x1C, 0x00, 8) +#define SOUND_OBJ2_KING_BOBOMB_DAMAGE SOUND_ARG_LOAD(9, 1, 0x42, 0x40, 8) +#define SOUND_OBJ2_SCUTTLEBUG_WALK SOUND_ARG_LOAD(9, 0, 0x43, 0x40, 8) +#define SOUND_OBJ2_SCUTTLEBUG_ALERT SOUND_ARG_LOAD(9, 0, 0x44, 0x40, 8) +#define SOUND_OBJ2_BABY_PENGUIN_YELL SOUND_ARG_LOAD(9, 0, 0x45, 0x00, 8) +#define SOUND_OBJ2_SWOOP SOUND_ARG_LOAD(9, 0, 0x49, 0x00, 8) +#define SOUND_OBJ2_BIRD_CHIRP1 SOUND_ARG_LOAD(9, 0, 0x52, 0x40, 0) +#define SOUND_OBJ2_LARGE_BULLY_ATTACKED SOUND_ARG_LOAD(9, 0, 0x57, 0x00, 8) +#define SOUND_OBJ2_EYEROK_SOUND_SHORT SOUND_ARG_LOAD(9, 3, 0x5A, 0x00, 8) +#define SOUND_OBJ2_WHOMP_SOUND_SHORT SOUND_ARG_LOAD(9, 3, 0x5A, 0xC0, 8) +#define SOUND_OBJ2_EYEROK_SOUND_LONG SOUND_ARG_LOAD(9, 2, 0x5B, 0x00, 8) +#define SOUND_OBJ2_BOWSER_TELEPORT SOUND_ARG_LOAD(9, 0, 0x66, 0x80, 8) +#define SOUND_OBJ2_MONTY_MOLE_APPEAR SOUND_ARG_LOAD(9, 0, 0x67, 0x80, 8) +#define SOUND_OBJ2_BOSS_DIALOG_GRUNT SOUND_ARG_LOAD(9, 0, 0x69, 0x40, 8) +#define SOUND_OBJ2_MRI_SPINNING SOUND_ARG_LOAD(9, 0, 0x6B, 0x00, 8) #endif /* _AUDIODEFINES_H */ diff --git a/include/behavior_data.h b/include/behavior_data.h index 013b64f..796f9e7 100644 --- a/include/behavior_data.h +++ b/include/behavior_data.h @@ -317,7 +317,7 @@ extern u32 bhvRandomAnimatedTexture[]; extern u32 bhvYellowBackgroundInMenu[]; extern u32 bhvMenuButton[]; extern u32 bhvMenuButtonManager[]; -extern u32 bhvStarInActSelector[]; +extern u32 bhvActSelectorStarType[]; extern u32 bhvActSelector[]; extern u32 bhvMovingYellowCoin[]; extern u32 bhvMovingBlueCoin[]; diff --git a/include/config.h b/include/config.h index 0b48568..43dbee2 100644 --- a/include/config.h +++ b/include/config.h @@ -1,5 +1,5 @@ -#ifndef _CONFIG_H_ -#define _CONFIG_H_ +#ifndef CONFIG_H +#define CONFIG_H /** * @file config.h @@ -17,6 +17,8 @@ // --| 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) +/// 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) /// Fixes bug where Piranha Plants do not reset their action state when the @@ -34,11 +36,11 @@ /// incorrect promotion of floats to doubles. #define BUGFIX_GODDARD_BAD_DECLARATIONS (0 || BUGFIXES_CRITICAL) -//Screen Size Defines +// Screen Size Defines #define SCREEN_WIDTH 320 #define SCREEN_HEIGHT 240 -//Border Height Define for NTSC Versions +// Border Height Define for NTSC Versions #define BORDER_HEIGHT 8 #endif diff --git a/include/geo_commands.inc b/include/geo_commands.inc index 6bbf941..7463007 100644 --- a/include/geo_commands.inc +++ b/include/geo_commands.inc @@ -414,7 +414,7 @@ .byte 0x00 .endif .byte 0x00, 0x00 - .word \scale + .word32 \scale .if (\displayList != 0) .word \displayList .endif diff --git a/include/level_commands.inc b/include/level_commands.inc index ec62c13..cedbe06 100644 --- a/include/level_commands.inc +++ b/include/level_commands.inc @@ -21,7 +21,7 @@ .macro execute seg, script, scriptEnd, entry - .byte 0x00, 0x10 + .byte 0x00, 0x04 + 3 * PTR_WIDTH .hword \seg .word \script .word \scriptEnd @@ -29,7 +29,7 @@ .endm .macro exit_and_execute seg, script, scriptEnd, entry - .byte 0x01, 0x10 + .byte 0x01, 0x04 + 3 * PTR_WIDTH .hword \seg .word \script .word \scriptEnd @@ -52,13 +52,13 @@ .endm .macro jump target - .byte 0x05, 0x08 + .byte 0x05, 0x04 + PTR_WIDTH .hword 0 .word \target .endm .macro jump_link target - .byte 0x06, 0x08 + .byte 0x06, 0x04 + PTR_WIDTH .hword 0 .word \target .endm @@ -84,25 +84,25 @@ .endm .macro loop_until op, arg - .byte 0x0B, 0x08 + .byte 0x0B, 0x04 + PTR_WIDTH .byte \op .byte 0 .word \arg .endm .macro jump_if op, arg, target - .byte 0x0C, 0x0C + .byte 0x0C, 0x08 + PTR_WIDTH .byte \op .byte 0 - .word \arg + .word32 \arg .word \target .endm .macro jump_link_if op, arg, target - .byte 0x0D, 0x0C + .byte 0x0D, 0x08 + PTR_WIDTH .byte \op .byte 0 - .word \arg + .word32 \arg .word \target .endm @@ -110,7 +110,7 @@ .byte 0x0E, 0x08 .byte \op .byte 0 - .word \arg + .word32 \arg .endm .macro skip @@ -124,13 +124,13 @@ .endm .macro call arg, func - .byte 0x11, 0x08 + .byte 0x11, 0x04 + PTR_WIDTH .hword \arg .word \func .endm .macro call_loop arg, func - .byte 0x12, 0x08 + .byte 0x12, 0x04 + PTR_WIDTH .hword \arg .word \func .endm @@ -151,7 +151,7 @@ .endm .macro fixed_load loadAddr, romStart, romEnd - .byte 0x16, 0x10 + .byte 0x16, 0x04 + 3 * PTR_WIDTH .hword 0 .word \loadAddr .word \romStart @@ -159,14 +159,14 @@ .endm .macro load_raw seg, romStart, romEnd - .byte 0x17, 0x0C + .byte 0x17, 0x04 + 2 * PTR_WIDTH .hword \seg .word \romStart .word \romEnd .endm .macro load_mio0 seg, romStart, romEnd - .byte 0x18, 0x0C + .byte 0x18, 0x04 + 2 * PTR_WIDTH .hword \seg .word \romStart .word \romEnd @@ -178,7 +178,7 @@ .endm .macro load_mio0_texture seg, romStart, romEnd - .byte 0x1A, 0x0C + .byte 0x1A, 0x04 + 2 * PTR_WIDTH .hword \seg .word \romStart .word \romEnd @@ -205,7 +205,7 @@ .endm .macro area index, geo - .byte 0x1F, 0x08 + .byte 0x1F, 0x04 + PTR_WIDTH .byte \index .byte 0 .word \geo @@ -217,26 +217,26 @@ .endm .macro load_model_from_dl model, dl, layer - .byte 0x21, 0x08 + .byte 0x21, 0x04 + PTR_WIDTH .hword (\layer << 12) | \model .word \dl .endm .macro load_model_from_geo model, geo - .byte 0x22, 0x08 + .byte 0x22, 0x04 + PTR_WIDTH .hword \model .word \geo .endm .macro cmd23 model, unk4, unk8 - .byte 0x23, 0x0C + .byte 0x23, 0x08 + PTR_WIDTH .hword \model .word \unk4 - .word \unk8 + .float \unk8 .endm .macro object model, posX, posY, posZ, angleX, angleY, angleZ, behParam, beh, acts=0x1F - .byte 0x24, 0x18 + .byte 0x24, 0x14 + PTR_WIDTH .byte \acts .byte \model .hword \posX @@ -245,15 +245,15 @@ .hword \angleX .hword \angleY .hword \angleZ - .word \behParam + .word32 \behParam .word \beh .endm .macro mario unk3, behArg, beh - .byte 0x25, 0x0C + .byte 0x25, 0x08 + PTR_WIDTH .byte 0 .byte \unk3 - .word \behArg + .word32 \behArg .word \beh .endm @@ -312,13 +312,13 @@ .endm .macro terrain terrainData - .byte 0x2E, 0x08 + .byte 0x2E, 0x04 + PTR_WIDTH .hword 0 .word \terrainData .endm .macro rooms surfaceRooms - .byte 0x2F, 0x08 + .byte 0x2F, 0x04 + PTR_WIDTH .hword 0 .word \surfaceRooms .endm @@ -379,7 +379,7 @@ .endm .macro macro_objects objList - .byte 0x39, 0x08 + .byte 0x39, 0x04 + PTR_WIDTH .hword 0 .word \objList .endm diff --git a/include/macros.h b/include/macros.h index 4304779..343359c 100644 --- a/include/macros.h +++ b/include/macros.h @@ -25,4 +25,13 @@ #define STATIC_ASSERT(cond, msg) typedef char GLUE2(static_assertion_failed, __LINE__)[(cond) ? 1 : -1] #endif +// convert a virtual address to physical. +#define VIRTUAL_TO_PHYSICAL(addr) ((uintptr_t)(addr) & 0x1FFFFFFF) + +// convert a physical address to virtual. +#define PHYSICAL_TO_VIRTUAL(addr) ((uintptr_t)(addr) | 0x80000000) + +// another way of converting virtual to physical +#define VIRTUAL_TO_PHYSICAL2(addr) ((u8 *)(addr) - 0x80000000U) + #endif diff --git a/include/macros.inc b/include/macros.inc index 2410d7d..5c1f24f 100644 --- a/include/macros.inc +++ b/include/macros.inc @@ -9,12 +9,18 @@ .set K2BASE, 0xC0000000 .set SCREEN_WIDTH, 320 .set SCREEN_HEIGHT, 240 +.set PTR_WIDTH, 4 .macro glabel label .global \label + .balign 4 \label: .endm +.macro .word32 x + .word \x +.endm + # F3D vertex .macro vertex x, y, z, u, v, r=0xFF, g=0xFF, b=0xFF, a=0xFF .hword \x, \y, \z, 0, \u, \v @@ -105,8 +111,8 @@ binid .endm .macro dialog_entry w1, w2, w3, w4 - .word \w1 + .word32 \w1 .byte (\w2 >> 24), 0x00 .hword (\w2 & 0xFFFF), (\w3 >> 16), 0x0000 - .long \w4 + .word \w4 .endm diff --git a/include/object_constants.h b/include/object_constants.h index 5e0b4a1..0f538c5 100644 --- a/include/object_constants.h +++ b/include/object_constants.h @@ -59,8 +59,8 @@ #define DIALOG_UNK1_AWAIT_DIALOG 3 #define DIALOG_UNK1_DISABLE_TIME_STOP 4 -#define DIALOG_UNK1_FLAG_1 (1 << 1) // 0x02 -#define DIALOG_UNK1_FLAG_2 (1 << 2) // 0x04 +#define DIALOG_UNK1_FLAG_DEFAULT (1 << 1) // 0x02 +#define DIALOG_UNK1_FLAG_RESPONSE (1 << 2) // 0x04 #define DIALOG_UNK1_FLAG_4 (1 << 4) // 0x10 #define DIALOG_UNK2_ENABLE_TIME_STOP 0 @@ -352,6 +352,11 @@ #define BOO_DEATH_STATUS_DYING 1 #define BOO_DEATH_STATUS_DEAD 2 + /* attackStatus */ + #define BOO_NOT_ATTACKED 0 + #define BOO_ATTACKED 1 + #define BOO_BOUNCED_ON -1 + /* Beta Boo Key */ /* oAction */ #define BETA_BOO_KEY_ACT_IN_BOO 0 diff --git a/include/object_fields.h b/include/object_fields.h index ff34bc9..f97676b 100644 --- a/include/object_fields.h +++ b/include/object_fields.h @@ -8,343 +8,246 @@ */ -#define OBJECT_FIELD_U32(index) rawData.asU32[index] -#define OBJECT_FIELD_S32(index) rawData.asS32[index] +#define OBJECT_FIELD_U32(index) rawData.asU32[index] +#define OBJECT_FIELD_S32(index) rawData.asS32[index] #define OBJECT_FIELD_S16(index, subIndex) rawData.asS16[index][subIndex] -#define OBJECT_FIELD_F32(index) rawData.asF32[index] -#define OBJECT_FIELD_VOIDP(index) rawData.asVoidP[index] -#define OBJECT_FIELD_S16P(index) rawData.asS16P[index] -#define OBJECT_FIELD_S32P(index) rawData.asS32P[index] -#define OBJECT_FIELD_ANIMS(index) rawData.asAnims[index] -#define OBJECT_FIELD_WAYPOINT(index) rawData.asWaypoint[index] +#define OBJECT_FIELD_F32(index) rawData.asF32[index] +#define OBJECT_FIELD_S16P(index) rawData.asS16P[index] +#define OBJECT_FIELD_S32P(index) rawData.asS32P[index] +#define OBJECT_FIELD_ANIMS(index) rawData.asAnims[index] +#define OBJECT_FIELD_WAYPOINT(index) rawData.asWaypoint[index] #define OBJECT_FIELD_CHAIN_SEGMENT(index) rawData.asChainSegment[index] -#define OBJECT_FIELD_OBJECT(index) rawData.asObject[index] -#define OBJECT_FIELD_SURFACE(index) rawData.asSurface[index] -#define OBJECT_FIELD_VPTR(index) rawData.asVoidPtr[index] -#define OBJECT_FIELD_OBJ(index) rawData.asObjPtr[index] +#define OBJECT_FIELD_OBJ(index) rawData.asObject[index] +#define OBJECT_FIELD_SURFACE(index) rawData.asSurface[index] +#define OBJECT_FIELD_VPTR(index) rawData.asVoidPtr[index] // 0x088 (0x00), the first field, is object-specific and defined below the common fields. /* Common fields */ -#define /*0x08C*/ oFlags OBJECT_FIELD_U32(0x01) -#define /*0x090*/ oDialogResponse OBJECT_FIELD_S16(0x02, 0) -#define /*0x092*/ oDialogState OBJECT_FIELD_S16(0x02, 1) -#define /*0x09C*/ oIntangibleTimer OBJECT_FIELD_S32(0x05) -#define /*0x0A0*/ O_POS_INDEX 0x06 -#define /*0x0A0*/ oPosX OBJECT_FIELD_F32(O_POS_INDEX + 0) -#define /*0x0A4*/ oPosY OBJECT_FIELD_F32(O_POS_INDEX + 1) -#define /*0x0A8*/ oPosZ OBJECT_FIELD_F32(O_POS_INDEX + 2) -#define /*0x0AC*/ oVelX OBJECT_FIELD_F32(0x09) -#define /*0x0B0*/ oVelY OBJECT_FIELD_F32(0x0A) -#define /*0x0B4*/ oVelZ OBJECT_FIELD_F32(0x0B) -#define /*0x0B8*/ oForwardVel OBJECT_FIELD_F32(0x0C) -#define /*0x0B8*/ oForwardVel2 OBJECT_FIELD_S32(0x0C) -#define /*0x0BC*/ oUnkBC OBJECT_FIELD_F32(0x0D) -#define /*0x0C0*/ oUnkC0 OBJECT_FIELD_F32(0x0E) -#define /*0x0C4*/ O_MOVE_ANGLE_INDEX 0x0F -#define /*0x0C4*/ O_MOVE_ANGLE_PITCH_INDEX (O_MOVE_ANGLE_INDEX + 0) -#define /*0x0C4*/ O_MOVE_ANGLE_YAW_INDEX (O_MOVE_ANGLE_INDEX + 1) -#define /*0x0C4*/ O_MOVE_ANGLE_ROLL_INDEX (O_MOVE_ANGLE_INDEX + 2) -#define /*0x0C4*/ oMoveAnglePitch OBJECT_FIELD_S32(O_MOVE_ANGLE_PITCH_INDEX) -#define /*0x0C8*/ oMoveAngleYaw OBJECT_FIELD_S32(O_MOVE_ANGLE_YAW_INDEX) -#define /*0x0CC*/ oMoveAngleRoll OBJECT_FIELD_S32(O_MOVE_ANGLE_ROLL_INDEX) -#define /*0x0D0*/ O_FACE_ANGLE_INDEX 0x12 -#define /*0x0C4*/ O_FACE_ANGLE_PITCH_INDEX (O_FACE_ANGLE_INDEX + 0) -#define /*0x0C4*/ O_FACE_ANGLE_YAW_INDEX (O_FACE_ANGLE_INDEX + 1) -#define /*0x0C4*/ O_FACE_ANGLE_ROLL_INDEX (O_FACE_ANGLE_INDEX + 2) -#define /*0x0D0*/ oFaceAnglePitch OBJECT_FIELD_S32(O_FACE_ANGLE_PITCH_INDEX) -#define /*0x0D4*/ oFaceAngleYaw OBJECT_FIELD_S32(O_FACE_ANGLE_YAW_INDEX) -#define /*0x0D8*/ oFaceAngleRoll OBJECT_FIELD_S32(O_FACE_ANGLE_ROLL_INDEX) -#define /*0x0DC*/ oGraphYOffset OBJECT_FIELD_F32(0x15) -#define /*0x0E0*/ oActiveParticleFlags OBJECT_FIELD_U32(0x16) -#define /*0x0E4*/ oGravity OBJECT_FIELD_F32(0x17) -#define /*0x0E8*/ oFloorHeight OBJECT_FIELD_F32(0x18) -#define /*0x0EC*/ oMoveFlags OBJECT_FIELD_U32(0x19) -#define /*0x0F0*/ oAnimState OBJECT_FIELD_S32(0x1A) +#define /*0x08C*/ oFlags OBJECT_FIELD_U32(0x01) +#define /*0x090*/ oDialogResponse OBJECT_FIELD_S16(0x02, 0) +#define /*0x092*/ oDialogState OBJECT_FIELD_S16(0x02, 1) +// 0x94/0x98 unused/removed. +#define /*0x09C*/ oIntangibleTimer OBJECT_FIELD_S32(0x05) +#define /*0x0A0*/ O_POS_INDEX 0x06 +#define /*0x0A0*/ oPosX OBJECT_FIELD_F32(O_POS_INDEX + 0) +#define /*0x0A4*/ oPosY OBJECT_FIELD_F32(O_POS_INDEX + 1) +#define /*0x0A8*/ oPosZ OBJECT_FIELD_F32(O_POS_INDEX + 2) +#define /*0x0AC*/ oVelX OBJECT_FIELD_F32(0x09) +#define /*0x0B0*/ oVelY OBJECT_FIELD_F32(0x0A) +#define /*0x0B4*/ oVelZ OBJECT_FIELD_F32(0x0B) +#define /*0x0B8*/ oForwardVel OBJECT_FIELD_F32(0x0C) +#define /*0x0B8*/ oForwardVelS32 OBJECT_FIELD_S32(0x0C) +#define /*0x0BC*/ oUnkBC OBJECT_FIELD_F32(0x0D) +#define /*0x0C0*/ oUnkC0 OBJECT_FIELD_F32(0x0E) +#define /*0x0C4*/ O_MOVE_ANGLE_INDEX 0x0F +#define /*0x0C4*/ O_MOVE_ANGLE_PITCH_INDEX (O_MOVE_ANGLE_INDEX + 0) +#define /*0x0C4*/ O_MOVE_ANGLE_YAW_INDEX (O_MOVE_ANGLE_INDEX + 1) +#define /*0x0C4*/ O_MOVE_ANGLE_ROLL_INDEX (O_MOVE_ANGLE_INDEX + 2) +#define /*0x0C4*/ oMoveAnglePitch OBJECT_FIELD_S32(O_MOVE_ANGLE_PITCH_INDEX) +#define /*0x0C8*/ oMoveAngleYaw OBJECT_FIELD_S32(O_MOVE_ANGLE_YAW_INDEX) +#define /*0x0CC*/ oMoveAngleRoll OBJECT_FIELD_S32(O_MOVE_ANGLE_ROLL_INDEX) +#define /*0x0D0*/ O_FACE_ANGLE_INDEX 0x12 +#define /*0x0D0*/ O_FACE_ANGLE_PITCH_INDEX (O_FACE_ANGLE_INDEX + 0) +#define /*0x0D0*/ O_FACE_ANGLE_YAW_INDEX (O_FACE_ANGLE_INDEX + 1) +#define /*0x0D0*/ O_FACE_ANGLE_ROLL_INDEX (O_FACE_ANGLE_INDEX + 2) +#define /*0x0D0*/ oFaceAnglePitch OBJECT_FIELD_S32(O_FACE_ANGLE_PITCH_INDEX) +#define /*0x0D4*/ oFaceAngleYaw OBJECT_FIELD_S32(O_FACE_ANGLE_YAW_INDEX) +#define /*0x0D8*/ oFaceAngleRoll OBJECT_FIELD_S32(O_FACE_ANGLE_ROLL_INDEX) +#define /*0x0DC*/ oGraphYOffset OBJECT_FIELD_F32(0x15) +#define /*0x0E0*/ oActiveParticleFlags OBJECT_FIELD_U32(0x16) +#define /*0x0E4*/ oGravity OBJECT_FIELD_F32(0x17) +#define /*0x0E8*/ oFloorHeight OBJECT_FIELD_F32(0x18) +#define /*0x0EC*/ oMoveFlags OBJECT_FIELD_U32(0x19) +#define /*0x0F0*/ oAnimState OBJECT_FIELD_S32(0x1A) // 0x0F4-0x110 (0x1B-0x22) are object specific and defined below the common fields. -#define /*0x114*/ oAngleVelPitch OBJECT_FIELD_S32(0x23) -#define /*0x118*/ oAngleVelYaw OBJECT_FIELD_S32(0x24) -#define /*0x11C*/ oAngleVelRoll OBJECT_FIELD_S32(0x25) -#define /*0x120*/ oAnimations OBJECT_FIELD_ANIMS(0x26) -#define /*0x124*/ oHeldState OBJECT_FIELD_U32(0x27) -#define /*0x128*/ oWallHitboxRadius OBJECT_FIELD_F32(0x28) -#define /*0x12C*/ oDragStrength OBJECT_FIELD_F32(0x29) -#define /*0x130*/ oInteractType OBJECT_FIELD_U32(0x2A) -#define /*0x134*/ oInteractStatus OBJECT_FIELD_S32(0x2B) +#define /*0x114*/ oAngleVelPitch OBJECT_FIELD_S32(0x23) +#define /*0x118*/ oAngleVelYaw OBJECT_FIELD_S32(0x24) +#define /*0x11C*/ oAngleVelRoll OBJECT_FIELD_S32(0x25) +#define /*0x120*/ oAnimations OBJECT_FIELD_ANIMS(0x26) +#define /*0x124*/ oHeldState OBJECT_FIELD_U32(0x27) +#define /*0x128*/ oWallHitboxRadius OBJECT_FIELD_F32(0x28) +#define /*0x12C*/ oDragStrength OBJECT_FIELD_F32(0x29) +#define /*0x130*/ oInteractType OBJECT_FIELD_U32(0x2A) +#define /*0x134*/ oInteractStatus OBJECT_FIELD_S32(0x2B) #define /*0x138*/ O_PARENT_RELATIVE_POS_INDEX 0x2C -#define /*0x138*/ oParentRelativePosX OBJECT_FIELD_F32(O_PARENT_RELATIVE_POS_INDEX + 0) -#define /*0x13C*/ oParentRelativePosY OBJECT_FIELD_F32(O_PARENT_RELATIVE_POS_INDEX + 1) -#define /*0x140*/ oParentRelativePosZ OBJECT_FIELD_F32(O_PARENT_RELATIVE_POS_INDEX + 2) -#define /*0x144*/ oBehParams2ndByte OBJECT_FIELD_S32(0x2F) -#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 /*0x15C*/ oDistanceToMario OBJECT_FIELD_F32(0x35) -#define /*0x15C*/ oDistanceToMarioS32 OBJECT_FIELD_S32(0x35) -#define /*0x160*/ oAngleToMario OBJECT_FIELD_S32(0x36) -#define /*0x164*/ oHomeX OBJECT_FIELD_F32(0x37) -#define /*0x168*/ oHomeY OBJECT_FIELD_F32(0x38) -#define /*0x16C*/ oHomeZ OBJECT_FIELD_F32(0x39) -#define /*0x170*/ oFriction OBJECT_FIELD_F32(0x3A) -#define /*0x174*/ oBuoyancy OBJECT_FIELD_F32(0x3B) -#define /*0x178*/ oSoundStateID OBJECT_FIELD_S32(0x3C) -#define /*0x17C*/ oOpacity OBJECT_FIELD_S32(0x3D) -#define /*0x180*/ oDamageOrCoinValue OBJECT_FIELD_S32(0x3E) -#define /*0x184*/ oHealth OBJECT_FIELD_S32(0x3F) -#define /*0x188*/ oBehParams OBJECT_FIELD_S32(0x40) -#define /*0x18C*/ oPrevAction OBJECT_FIELD_S32(0x41) -#define /*0x190*/ oInteractionSubtype OBJECT_FIELD_U32(0x42) -#define /*0x194*/ oCollisionDistance OBJECT_FIELD_F32(0x43) -#define /*0x198*/ oNumLootCoins OBJECT_FIELD_S32(0x44) -#define /*0x19C*/ oDrawingDistance OBJECT_FIELD_F32(0x45) -#define /*0x1A0*/ oRoom OBJECT_FIELD_S32(0x46) -// another object specific range, anim related -#define /*0x1A8*/ oUnk1A8 OBJECT_FIELD_U32(0x48) -#define /*0x1AC*/ oUnk1AC_VPTR OBJECT_FIELD_VPTR(0x49) -#define /*0x1AC*/ oUnk1AC_S32 OBJECT_FIELD_S32(0x49) -#define /*0x1AC*/ oUnk1AC_F32 OBJECT_FIELD_F32(0x49) -#define /*0x1AC*/ oUnk1AC_S16 OBJECT_FIELD_S16(0x49, 0) -#define /*0x1B0*/ oUnk1B0 OBJECT_FIELD_S32(0x4A) -#define /*0x1B0*/ oUnk1B0_S16 OBJECT_FIELD_S16(0x4A, 0) -// more generic fields -#define /*0x1B4*/ oWallAngle OBJECT_FIELD_U32(0x4B) -#define /*0x1B8*/ oFloorType OBJECT_FIELD_S16(0x4C, 0) -#define /*0x1BA*/ oFloorRoom OBJECT_FIELD_S16(0x4C, 1) -#define /*0x1BC*/ oUnk1BC OBJECT_FIELD_S32(0x4D) -#define /*0x1C0*/ oFloor OBJECT_FIELD_SURFACE(0x4E) -#define /*0x1C4*/ oDeathSound OBJECT_FIELD_S32(0x4F) - -/* All uses of these should be removed as soon as object type is known */ -#define /*0x088*/ oUnknownUnk88 OBJECT_FIELD_S32(0x00) -#define /*0x0F4*/ oUnknownUnkF4_S32 OBJECT_FIELD_S32(0x1B) -#define /*0x0F4*/ oUnknownUnkF4_F32 OBJECT_FIELD_F32(0x1B) -#define /*0x0FC*/ oUnknownUnkFC_VPtr OBJECT_FIELD_VPTR(0x1D) -#define /*0x100*/ oUnknownUnk100_VPtr OBJECT_FIELD_VPTR(0x1E) -#define /*0x104*/ oUnknownUnk104_S32 OBJECT_FIELD_S32(0x1F) -#define /*0x0F8*/ oUnknownUnkF8_S32 OBJECT_FIELD_S32(0x1C) -#define /*0x0F8*/ oUnknownUnkF8_F32 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oUnknownUnkFC_S32 OBJECT_FIELD_S32(0x1D) -#define /*0x0FC*/ oUnknownUnkFC_F32 OBJECT_FIELD_F32(0x1D) -#define /*0x0FC*/ oUnknownUnkFC_VOIDP OBJECT_FIELD_VOIDP(0x1D) -#define /*0x100*/ oUnknownUnk100_S32 OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oUnknownUnk104_F32 OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oUnknownUnk108_S32 OBJECT_FIELD_S32(0x20) -#define /*0x108*/ oUnknownUnk108_F32 OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oUnknownUnk10C_S32 OBJECT_FIELD_S32(0x21) -#define /*0x10C*/ oUnknownUnk10C_F32 OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oUnknownUnk110_S32 OBJECT_FIELD_S32(0x22) -#define /*0x110*/ oUnknownUnk110_F32 OBJECT_FIELD_F32(0x22) -#define /*0x110*/ oUnknownUnk110_S32 OBJECT_FIELD_S32(0x22) +#define /*0x138*/ oParentRelativePosX OBJECT_FIELD_F32(O_PARENT_RELATIVE_POS_INDEX + 0) +#define /*0x13C*/ oParentRelativePosY OBJECT_FIELD_F32(O_PARENT_RELATIVE_POS_INDEX + 1) +#define /*0x140*/ oParentRelativePosZ OBJECT_FIELD_F32(O_PARENT_RELATIVE_POS_INDEX + 2) +#define /*0x144*/ oBehParams2ndByte OBJECT_FIELD_S32(0x2F) +// 0x148 unused, possibly a third param byte. +#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 /*0x15C*/ oDistanceToMario OBJECT_FIELD_F32(0x35) +#define /*0x160*/ oAngleToMario OBJECT_FIELD_S32(0x36) +#define /*0x164*/ oHomeX OBJECT_FIELD_F32(0x37) +#define /*0x168*/ oHomeY OBJECT_FIELD_F32(0x38) +#define /*0x16C*/ oHomeZ OBJECT_FIELD_F32(0x39) +#define /*0x170*/ oFriction OBJECT_FIELD_F32(0x3A) +#define /*0x174*/ oBuoyancy OBJECT_FIELD_F32(0x3B) +#define /*0x178*/ oSoundStateID OBJECT_FIELD_S32(0x3C) +#define /*0x17C*/ oOpacity OBJECT_FIELD_S32(0x3D) +#define /*0x180*/ oDamageOrCoinValue OBJECT_FIELD_S32(0x3E) +#define /*0x184*/ oHealth OBJECT_FIELD_S32(0x3F) +#define /*0x188*/ oBehParams OBJECT_FIELD_S32(0x40) +#define /*0x18C*/ oPrevAction OBJECT_FIELD_S32(0x41) +#define /*0x190*/ oInteractionSubtype OBJECT_FIELD_U32(0x42) +#define /*0x194*/ oCollisionDistance OBJECT_FIELD_F32(0x43) +#define /*0x198*/ oNumLootCoins OBJECT_FIELD_S32(0x44) +#define /*0x19C*/ oDrawingDistance OBJECT_FIELD_F32(0x45) +#define /*0x1A0*/ oRoom OBJECT_FIELD_S32(0x46) +// 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 /*0x1B8*/ oFloorType OBJECT_FIELD_S16(0x4C, 0) +#define /*0x1BA*/ oFloorRoom OBJECT_FIELD_S16(0x4C, 1) +#define /*0x1BC*/ oUnk1BC OBJECT_FIELD_S32(0x4D) +#define /*0x1C0*/ oFloor OBJECT_FIELD_SURFACE(0x4E) +#define /*0x1C4*/ oDeathSound OBJECT_FIELD_S32(0x4F) /* Pathed (see obj_follow_path) */ -#define /*0x0FC*/ oPathedStartWaypoint OBJECT_FIELD_WAYPOINT(0x1D) -#define /*0x100*/ oPathedPrevWaypoint OBJECT_FIELD_WAYPOINT(0x1E) +// TODO: These two 0x0FC fields need merged, one is data and one is a C struct. +#define /*0x0FC*/ oPathedWaypointsS16 OBJECT_FIELD_VPTR(0x1D) +#define /*0x0FC*/ oPathedStartWaypoint OBJECT_FIELD_WAYPOINT(0x1D) +#define /*0x100*/ oPathedPrevWaypoint OBJECT_FIELD_WAYPOINT(0x1E) #define /*0x104*/ oPathedPrevWaypointFlags OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oPathedTargetPitch OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oPathedTargetYaw OBJECT_FIELD_S32(0x21) +#define /*0x108*/ oPathedTargetPitch OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oPathedTargetYaw OBJECT_FIELD_S32(0x21) + +/* Special Object Macro */ +#define /*0x108*/ oMacroUnk108 OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oMacroUnk10C OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oMacroUnk110 OBJECT_FIELD_F32(0x22) /* Mario */ -#define /*0x0F4*/ oMarioParticleFlags OBJECT_FIELD_S32(0x1B) -#define /*0x108*/ oMarioPoleUnk108 OBJECT_FIELD_S32(0x20) -#define /*0x108*/ oMarioReadingSignDYaw OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oMarioPoleYawVel OBJECT_FIELD_S32(0x21) -#define /*0x10C*/ oMarioCannonObjectYaw OBJECT_FIELD_S32(0x21) -#define /*0x10C*/ oMarioTornadoYawVel OBJECT_FIELD_S32(0x21) +#define /*0x0F4*/ oMarioParticleFlags OBJECT_FIELD_S32(0x1B) +#define /*0x108*/ oMarioPoleUnk108 OBJECT_FIELD_S32(0x20) +#define /*0x108*/ oMarioReadingSignDYaw OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oMarioPoleYawVel OBJECT_FIELD_S32(0x21) +#define /*0x10C*/ oMarioCannonObjectYaw OBJECT_FIELD_S32(0x21) +#define /*0x10C*/ oMarioTornadoYawVel OBJECT_FIELD_S32(0x21) #define /*0x10C*/ oMarioReadingSignDPosX OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oMarioPolePos OBJECT_FIELD_F32(0x22) -#define /*0x110*/ oMarioCannonInputYaw OBJECT_FIELD_S32(0x22) -#define /*0x110*/ oMarioTornadoPosY OBJECT_FIELD_F32(0x22) +#define /*0x110*/ oMarioPolePos OBJECT_FIELD_F32(0x22) +#define /*0x110*/ oMarioCannonInputYaw OBJECT_FIELD_S32(0x22) +#define /*0x110*/ oMarioTornadoPosY OBJECT_FIELD_F32(0x22) #define /*0x110*/ oMarioReadingSignDPosZ OBJECT_FIELD_F32(0x22) -#define /*0x110*/ oMarioWhirlpoolPosY OBJECT_FIELD_F32(0x22) -#define /*0x110*/ oMarioBurnTimer OBJECT_FIELD_S32(0x22) -#define /*0x110*/ oMarioLongJumpIsSlow OBJECT_FIELD_S32(0x22) -#define /*0x110*/ oMarioSteepJumpYaw OBJECT_FIELD_S32(0x22) -#define /*0x110*/ oMarioWalkingPitch OBJECT_FIELD_S32(0x22) +#define /*0x110*/ oMarioWhirlpoolPosY OBJECT_FIELD_F32(0x22) +#define /*0x110*/ oMarioBurnTimer OBJECT_FIELD_S32(0x22) +#define /*0x110*/ oMarioLongJumpIsSlow OBJECT_FIELD_S32(0x22) +#define /*0x110*/ oMarioSteepJumpYaw OBJECT_FIELD_S32(0x22) +#define /*0x110*/ oMarioWalkingPitch OBJECT_FIELD_S32(0x22) -/* Star selector */ -#define /*0x0F4*/ oStarSelectorType OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oStarSelectorTimer OBJECT_FIELD_S32(0x1C) -#define /*0x108*/ oStarSelectorSize OBJECT_FIELD_F32(0x20) +/* 1-Up Hidden */ +#define /*0x0F4*/ o1UpHiddenUnkF4 OBJECT_FIELD_S32(0x1B) -/* Sound effect */ -#define /*0x0F4*/ oSoundEffectUnkF4 OBJECT_FIELD_S32(0x1B) - -/* Main menu button */ -#define /*0x0F4*/ oMenuButtonState OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oMenuButtonTimer OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oMenuButtonOrigPosX OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oMenuButtonOrigPosY OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oMenuButtonOrigPosZ OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oMenuButtonScale OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oMenuButtonActionPhase OBJECT_FIELD_S32(0x21) - -/* Toad message */ -#define /*0x108*/ oToadMessageDialogNum OBJECT_FIELD_U32(0x20) -#define /*0x10C*/ oToadMessageRecentlyTalked OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oToadMessageState OBJECT_FIELD_S32(0x22) - -/* Sealed door star */ -#define /*0x108*/ oUnlockDoorStarState OBJECT_FIELD_U32(0x20) -#define /*0x10C*/ oUnlockDoorStarTimer OBJECT_FIELD_S32(0x21) -#define /*0x10C*/ oUnlockDoorStarYawVel OBJECT_FIELD_S32(0x22) - -/* Bob-omb */ -#define /*0x0F4*/ oBobombBlinkTimer OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oBobombFuseLit OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oBobombFuseTimer OBJECT_FIELD_S32(0x1D) - -/* Bob-omb Buddy */ -#define /*0x0F4*/ oBobombBuddyBlinkTimer OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oBobombBuddyHasTalkedToMario OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oBobombBuddyRole OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oBobombBuddyCannonStatus OBJECT_FIELD_S32(0x1E) -#define /*0x108*/ oBobombBuddyPosXCopy OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oBobombBuddyPosYCopy OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oBobombBuddyPosZCopy OBJECT_FIELD_F32(0x22) - -/* Whirlpool */ -#define /*0x0F4*/ oWhirlpoolInitFacePitch OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oWhirlpoolInitFaceRoll OBJECT_FIELD_S32(0x1C) - -/* Homing Amp */ -#define /*0x0F4*/ oHomingAmpLockedOn OBJECT_FIELD_S32(0x1B) -#define /*0x0FC*/ oHomingAmpAvgY OBJECT_FIELD_F32(0x1D) +/* Activated Back and Forth Platform */ +#define /*0x0F4*/ oActivatedBackAndForthPlatformMaxOffset OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oActivatedBackAndForthPlatformOffset OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oActivatedBackAndForthPlatformVel OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oActivatedBackAndForthPlatformCountdown OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oActivatedBackAndForthPlatformStartYaw OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oActivatedBackAndForthPlatformVertical OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oActivatedBackAndForthPlatformFlipRotation OBJECT_FIELD_S32(0x21) /* Amp */ #define /*0x0F4*/ oAmpRadiusOfRotation OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oAmpYPhase OBJECT_FIELD_S32(0x1C) +#define /*0x0F8*/ oAmpYPhase OBJECT_FIELD_S32(0x1C) -/* Butterfly */ -#define /*0x0F4*/ oButterflyYPhase OBJECT_FIELD_S32(0x1B) +/* Homing Amp */ +#define /*0x0F4*/ oHomingAmpLockedOn OBJECT_FIELD_S32(0x1B) +#define /*0x0FC*/ oHomingAmpAvgY OBJECT_FIELD_F32(0x1D) -/* Hoot */ -#define /*0x0F4*/ oHootAvailability OBJECT_FIELD_S32(0x1B) -#define /*0x110*/ oHootMarioReleaseTime OBJECT_FIELD_S32(0x22) +/* Arrow Lift */ +#define /*0x0F4*/ oArrowLiftDisplacement OBJECT_FIELD_F32(0x1B) + +/* Back-and-Forth Platform */ +#define /*0x0F4*/ oBackAndForthPlatformUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oBackAndForthPlatformUnkF8 OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oBackAndForthPlatformUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oBackAndForthPlatformUnk100 OBJECT_FIELD_F32(0x1E) + +/* Bird */ +#define /*0x0F4*/ oBirdSpeed OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oBirdTargetPitch OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oBirdTargetYaw OBJECT_FIELD_S32(0x1D) + +/* Bird Chirp Chirp */ +#define /*0x0F4*/ oBirdChirpChirpUnkF4 OBJECT_FIELD_S32(0x1B) + +/* End Birds */ +#define /*0x104*/ oEndBirdUnk104 OBJECT_FIELD_F32(0x1F) + +/* Hidden Blue Coin */ +#define /*0x0F8*/ oHiddenBlueCoinSwitch OBJECT_FIELD_OBJ(0x1C) + +/* Bob-omb */ +#define /*0x0F4*/ oBobombBlinkTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oBobombFuseLit OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oBobombFuseTimer OBJECT_FIELD_S32(0x1D) + +/* Bob-omb Buddy */ +#define /*0x0F4*/ oBobombBuddyBlinkTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oBobombBuddyHasTalkedToMario OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oBobombBuddyRole OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oBobombBuddyCannonStatus OBJECT_FIELD_S32(0x1E) +#define /*0x108*/ oBobombBuddyPosXCopy OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oBobombBuddyPosYCopy OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oBobombBuddyPosZCopy OBJECT_FIELD_F32(0x22) /* Bob-omb Explosion Bubble */ #define /*0x0FC*/ oBobombExpBubGfxScaleFacX OBJECT_FIELD_S32(0x1D) #define /*0x100*/ oBobombExpBubGfxScaleFacY OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oBobombExpBubGfxExpRateX OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oBobombExpBubGfxExpRateY OBJECT_FIELD_S32(0x20) +#define /*0x104*/ oBobombExpBubGfxExpRateX OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oBobombExpBubGfxExpRateY OBJECT_FIELD_S32(0x20) -/* Object Respawner */ -#define /*0x0F4*/ oRespawnerModelToRespawn OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oRespawnerMinSpawnDist OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oRespawnerBehaviorToRespawn OBJECT_FIELD_VPTR(0x1D) - -/* Bully (all variants) */ -#define /*0x0F4*/ oBullySubtype OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oBullyPrevX OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oBullyPrevY OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oBullyPrevZ OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oBullyKBTimerAndMinionKOCounter OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oBullyMarioCollisionAngle OBJECT_FIELD_S32(0x20) - -/* Water Ring (both variants) */ -#define /*0x0F4*/ oWaterRingScalePhaseX OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oWaterRingScalePhaseY OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oWaterRingScalePhaseZ OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oWaterRingNormalX OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oWaterRingNormalY OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oWaterRingNormalZ OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oWaterRingMarioDistInFront OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oWaterRingIndex OBJECT_FIELD_S32(0x22) -#define /*0x1AC*/ oWaterRingAvgScale OBJECT_FIELD_F32(0x49) - -/* Water Ring Spawner (Jet Stream Ring Spawner and Manta Ray) */ -#define /*0x1AC*/ oWaterRingSpawnerRingsCollected OBJECT_FIELD_S32(0x49) - -/* Water Ring Manager (Jet Stream Ring Spawner and Manta Ray Ring Manager) */ -#define /*0x0F4*/ oWaterRingMgrNextRingIndex OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oWaterRingMgrLastRingCollected OBJECT_FIELD_S32(0x1C) - -/* Celebration Star */ -#define /*0x108*/ oCelebStarDiameterOfRotation OBJECT_FIELD_S32(0x20) - -/* Bomp (small) */ +/* Bomp (Small) */ #define /*0x100*/ oSmallBompInitX OBJECT_FIELD_F32(0x1E) -/* WF Sliding Brick Platform */ -#define /*0x0F4*/ oWFSlidBrickPtfmMovVel OBJECT_FIELD_F32(0x1B) +/* Boo */ +#define /*0x088*/ oBooDeathStatus OBJECT_FIELD_S32(0x00) +#define /*0x0F4*/ oBooTargetOpacity OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oBooBaseScale OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oBooOscillationTimer OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oBooMoveYawDuringHit OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oBooMoveYawBeforeHit OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oBooParentBigBoo OBJECT_FIELD_OBJ(0x20) +#define /*0x10C*/ oBooNegatedAggressiveness OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oBooInitialMoveYaw OBJECT_FIELD_S32(0x22) +#define /*0x1B0*/ oBooTurningSpeed OBJECT_FIELD_S16(0x4A, 0) -/* Moneybag */ -#define /*0x0F4*/ oMoneybagJumpState OBJECT_FIELD_S32(0x1B) +/* Big Boo */ +#define /*0x1AC*/ oBigBooNumMinionBoosKilled OBJECT_FIELD_S32(0x49) + +/* Bookend */ +#define /*0x0F4*/ oBookendUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oBookendUnkF8 OBJECT_FIELD_S32(0x1C) + +/* Book Switch */ +#define /*0x0F4*/ oBookSwitchUnkF4 OBJECT_FIELD_F32(0x1B) + +/* Book Switch Manager */ +#define /*0x0F4*/ oBookSwitchManagerUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oBookSwitchManagerUnkF8 OBJECT_FIELD_S32(0x1C) + +/* Haunted Bookshelf */ +#define /*0x088*/ oHauntedBookshelfShouldOpen OBJECT_FIELD_S32(0x00) + +/* Bouncing FireBall */ +#define /*0x0F4*/ oBouncingFireBallUnkF4 OBJECT_FIELD_S32(0x1B) /* Bowling Ball */ #define /*0x0F4*/ oBowlingBallTargetYaw OBJECT_FIELD_S32(0x1B) -#define /*0x0FC*/ oBowlingBallUnkFC OBJECT_FIELD_VPTR(0x1D) -#define /*0x10C*/ oBowlingBallInitYaw OBJECT_FIELD_S32(0x21) +// 0x1D-0x21 reserved for pathing /* Bowling Ball Spawner (Generic) */ -#define /*0x0F4*/ oBBallSpwnrMaxSpawnDist OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oBBallSpwnrSpawnOdds OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oBBallSpwnrPeriodMinus1 OBJECT_FIELD_S32(0x1D) - -/* RR Cruiser Wing */ -#define /*0x0F4*/ oRRCruiserWingUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oRRCruiserWingUnkF8 OBJECT_FIELD_S32(0x1C) - -/* MrI */ -#define /*0x10C*/ oMrISize OBJECT_FIELD_F32(0x21) - -/* Platform */ -#define /*0x0F4*/ oPlatformTimer OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oPlatformUnkF8 OBJECT_FIELD_OBJ(0x1C) -#define /*0x0FC*/ oPlatformUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x10C*/ oPlatformUnk10C OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oPlatformUnk110 OBJECT_FIELD_F32(0x22) - -/* MovingFlame */ -#define /*0x0F4*/ oMovingFlameTimer OBJECT_FIELD_S32(0x1B) - -/* FlameThrowerFlame */ -#define /*0x110*/ oFlameThowerFlameUnk110 OBJECT_FIELD_S32(0x22) - -/* FlameThrower */ -#define /*0x110*/ oFlameThowerUnk110 OBJECT_FIELD_S32(0x22) - -/* BouncingFireBall */ -#define /*0x0F4*/ oBouncingFireBallUnkF4 OBJECT_FIELD_S32(0x1B) - -/* BowserShockWave */ -#define /*0x0F4*/ oBowserShockWaveUnkF4 OBJECT_FIELD_F32(0x1B) - -/* BlackSmokeBowser */ -#define /*0x0F4*/ oBlackSmokeBowserUnkF4 OBJECT_FIELD_F32(0x1B) - -/* PlatformSpawner */ -#define /*0x0F4*/ oPlatformSpawnerUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oPlatformSpawnerUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oPlatformSpawnerUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oPlatformSpawnerUnk100 OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oPlatformSpawnerUnk104 OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oPlatformSpawnerUnk108 OBJECT_FIELD_F32(0x20) - -/* TreeSnowOrLeaf */ -#define /*0x0F4*/ oTreeSnowOrLeafUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oTreeSnowOrLeafUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oTreeSnowOrLeafUnkFC OBJECT_FIELD_S32(0x1D) - -/* HiddenObject */ -#define /*0x0F4*/ oHiddenObjectUnkF4 OBJECT_FIELD_OBJ(0x1B) - -/* HeaveHo */ -#define /*0x0F4*/ oHeaveHoUnkF4 OBJECT_FIELD_F32(0x1B) - -/* BetaTrampoline */ -#define /*0x110*/ oBetaTrampolineMarioOnTrampoline OBJECT_FIELD_S32(0x22) - -/* JumpingBox */ -#define /*0x0F4*/ oJumpingBoxUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oJumpingBoxUnkF8 OBJECT_FIELD_S32(0x1C) - -/* GrandStar */ -#define /*0x108*/ oGrandStarUnk108 OBJECT_FIELD_S32(0x20) - -/* BulletBill */ -#define /*0x0F8*/ oBulletBillUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0F4*/ oBBallSpawnerMaxSpawnDist OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oBBallSpawnerSpawnOdds OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oBBallSpawnerPeriodMinus1 OBJECT_FIELD_S32(0x1D) /* Bowser */ +#define /*0x088*/ oBowserUnk88 OBJECT_FIELD_S32(0x00) #define /*0x0F4*/ oBowserUnkF4 OBJECT_FIELD_S32(0x1B) #define /*0x0F8*/ oBowserUnkF8 OBJECT_FIELD_S32(0x1C) #define /*0x0FC*/ oBowserDistToCentre OBJECT_FIELD_F32(0x1D) @@ -355,614 +258,35 @@ #define /*0x10E*/ oBowserUnk10E OBJECT_FIELD_S16(0x21, 1) #define /*0x110*/ oBowserUnk110 OBJECT_FIELD_S16(0x22, 0) #define /*0x112*/ oBowserAngleToCentre OBJECT_FIELD_S16(0x22, 1) +#define /*0x1AC*/ oBowserUnk1AC OBJECT_FIELD_S16(0x49, 0) #define /*0x1AE*/ oBowserUnk1AE OBJECT_FIELD_S16(0x49, 1) #define /*0x1B0*/ oBowserEyesShut OBJECT_FIELD_S16(0x4A, 0) #define /*0x1B2*/ oBowserUnk1B2 OBJECT_FIELD_S16(0x4A, 1) -/* Flame */ -#define /*0x0F4*/ oFlameUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oFlameUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oFlameUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oFlameUnk100 OBJECT_FIELD_OBJ(0x1E) +/* Bowser Shockwave */ +#define /*0x0F4*/ oBowserShockWaveUnkF4 OBJECT_FIELD_F32(0x1B) -/* BlueFlame */ -#define /*0x0F8*/ oBlueFlameUnkF8 OBJECT_FIELD_F32(0x1C) +/* Black Smoke Bowser */ +#define /*0x0F4*/ oBlackSmokeBowserUnkF4 OBJECT_FIELD_F32(0x1B) -/* BlueFish */ -#define /*0x0F4*/ oBlueFishUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oBlueFishUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x100*/ oBlueFishUnk100 OBJECT_FIELD_F32(0x1E) +/* Bowser Key Cutscene */ +#define /*0x0F4*/ oBowserKeyScale OBJECT_FIELD_F32(0x1B) -/* CheckerboardPlatform */ -#define /*0x0F8*/ oCheckerBoardPlatformUnkF8 OBJECT_FIELD_S32(0x1C) // oAction like -#define /*0x0FC*/ oCheckerBoardPlatformUnkFC OBJECT_FIELD_S32(0x1D) - -/* WaterLevelPillar */ -#define /*0x0F8*/ oWaterLevelPillarUnkF8 OBJECT_FIELD_S32(0x1C) // boolean? - -/* BowserKeyUnlockDoor */ -#define /*0x0F4*/ oBowserKeyUnlockDoorScale OBJECT_FIELD_F32(0x1B) - -/* bhvBowserKeyCourseExit */ -#define /*0x0F4*/ oBowserKeyCourseExitScale OBJECT_FIELD_F32(0x1B) - -/* Ukiki */ -#define /*0x0F4*/ oUkikiTauntCounter OBJECT_FIELD_S16(0x1B, 0) -#define /*0x0F6*/ oUkikiTauntsToBeDone OBJECT_FIELD_S16(0x1B, 1) - //TODO change to the actual waypoint form. -#define /*0x0FC*/ oUkikiPath OBJECT_FIELD_VPTR(0x1D) -#define /*0x110*/ oUkikiChaseFleeRange OBJECT_FIELD_F32(0x22) -#define /*0x1AC*/ oUkikiTextState OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oUkikiTextboxTimer OBJECT_FIELD_S16(0x49, 1) -#define /*0x1B0*/ oUkikiCageSpinTimer OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oUkikiHasHat OBJECT_FIELD_S16(0x4A, 1) - -/* Ukiki Cage*/ -#define /*0x088*/ oUkikiCageNextAction OBJECT_FIELD_S32(0x00) - -/* HorizontalMovement */ -#define /*0x0F4*/ oHorizontalMovementUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oHorizontalMovementUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x100*/ oHorizontalMovementUnk100 OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oHorizontalMovementUnk104 OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oHorizontalMovementUnk108 OBJECT_FIELD_F32(0x20) - -/* SinkWhenSteppedOn */ -#define /*0x104*/ oSinkWhenSteppedOnUnk104 OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oSinkWhenSteppedOnUnk108 OBJECT_FIELD_F32(0x20) - -/* BehLllRotatingHexFlame */ -#define /*0x0F4*/ oLllRotatingHexFlameUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oLllRotatingHexFlameUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oLllRotatingHexFlameUnkFC OBJECT_FIELD_F32(0x1D) - -/* LllWoodPiece */ -#define /*0x0F4*/ oLllWoodPieceUnkF4 OBJECT_FIELD_S32(0x1B) - -/* TiltingPlatform */ -#define /*0x0F4*/ oTiltingPlatformUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oTiltingPlatformUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oTiltingPlatformUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x10C*/ oTiltingPlatformUnk10C OBJECT_FIELD_S32(0x21) - -/* KoopaShellFlame */ -#define /*0x0F4*/ oKoopaShellFlameUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oKoopaShellFlameUnkF8 OBJECT_FIELD_F32(0x1C) - -/* PiranhaPlant */ -#define /*0x0F4*/ oPiranhaPlantSleepMusicState OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oPiranhaPlantScale OBJECT_FIELD_F32(0x1C) - -/* BowserPuzzle */ +/* Bowser Puzzle */ #define /*0x0F4*/ oBowserPuzzleCompletionFlags OBJECT_FIELD_S32(0x1B) -/* BowserPuzzlePiece */ -#define /*0x0FC*/ oBowserPuzzlePieceOffsetX OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oBowserPuzzlePieceOffsetY OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oBowserPuzzlePieceOffsetZ OBJECT_FIELD_F32(0x1F) +/* Bowser Puzzle Piece */ +#define /*0x0FC*/ oBowserPuzzlePieceOffsetX OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oBowserPuzzlePieceOffsetY OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oBowserPuzzlePieceOffsetZ OBJECT_FIELD_F32(0x1F) #define /*0x108*/ oBowserPuzzlePieceContinuePerformingAction OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oBowserPuzzlePieceActionList OBJECT_FIELD_VPTR(0x21) -#define /*0x110*/ oBowserPuzzlePieceNextAction OBJECT_FIELD_VPTR(0x22) - -/* SmallPenguin */ -#define /*0x100*/ oSmallPenguinUnk100 OBJECT_FIELD_S32(0x1E) // angle? -#define /*0x104*/ oSmallPenguinUnk104 OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oSmallPenguinUnk108 OBJECT_FIELD_F32(0x20) -#define /*0x110*/ oSmallPenguinUnk110 OBJECT_FIELD_S32(0x22) - -/* FishGroup */ -#define /*0x0F4*/ oFishGroupUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oFishGroupUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oFishGroupUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oFishGroupUnk100 OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oFishGroupUnk104 OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oFishGroupUnk108 OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oFishGroupUnk10C OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oFishGroupUnk110 OBJECT_FIELD_F32(0x22) - -/* BirdChirpChirp */ -#define /*0x0F4*/ oBirdChirpChirpUnkF4 OBJECT_FIELD_S32(0x1B) - -/* CheepCheep */ -#define /*0x0F4*/ oCheepCheepUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oCheepCheepUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oCheepCheepUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x104*/ oCheepCheepUnk104 OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oCheepCheepUnk108 OBJECT_FIELD_F32(0x20) - -/* ExclamationBox */ -#define /*0x0F4*/ oExclamationBoxUnkF4 OBJECT_FIELD_F32(0x1B) // scale? -#define /*0x0F8*/ oExclamationBoxUnkF8 OBJECT_FIELD_F32(0x1C) // scale? -#define /*0x0FC*/ oExclamationBoxUnkFC OBJECT_FIELD_S32(0x1D) // angle? - -/* SushiShark */ -#define /*0x0F4*/ oSushiSharkUnkF4 OBJECT_FIELD_S32(0x1B) // angle? - -/* ShipPart3 */ -#define /*0x0F4*/ oShipPart3UnkF4 OBJECT_FIELD_S32(0x1B) // angle? -#define /*0x0F8*/ oShipPart3UnkF8 OBJECT_FIELD_S32(0x1C) // angle? - -/* JrbSlidingBox */ -#define /*0x0F4*/ oJrbSlidingBoxUnkF4 OBJECT_FIELD_VPTR(0x1B) -#define /*0x0F8*/ oJrbSlidingBoxUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oJrbSlidingBoxUnkFC OBJECT_FIELD_F32(0x1D) - -/* HiddenBlueCoin */ -#define /*0x0F8*/ oHiddenBlueCoinSwitch OBJECT_FIELD_VPTR(0x1C) // coin switch - -/* OpenableGrill */ -#define /*0x0F4*/ oOpenableGrillUnkF4 OBJECT_FIELD_VPTR(0x1B) - -/* WaterLevelTrigger */ -#define /*0x0F4*/ oWaterLevelTriggerUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oWaterLevelTriggerTargetWaterLevel OBJECT_FIELD_S32(0x1C) - -/* Tweester */ -#define /*0x0F4*/ oTweesterUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oTweesterUnkF8 OBJECT_FIELD_S32(0x1C) - -/* HauntedBookshelf */ -#define /*0x088*/ oHauntedBookshelfShouldOpen OBJECT_FIELD_S32(0x00) - -/* Boo */ -#define /*0x088*/ oBooDeathStatus OBJECT_FIELD_S32(0x00) -#define /*0x0F4*/ oBooTargetOpacity OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oBooBaseScale OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oBooOscillationTimer OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oBooMoveYawAfterHit OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oBooUnk104 OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oBooParentBigBoo OBJECT_FIELD_OBJ(0x20) -#define /*0x10C*/ oBooUnk10C OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oBooUnk110 OBJECT_FIELD_S32(0x22) - -/* BigBoo */ -#define /*0x1AC*/ oBigBooNumMinionBoosKilled OBJECT_FIELD_S32(0x49) - -/* MerryGoRound */ -#define /*0x088*/ oMerryGoRoundStopped OBJECT_FIELD_S32(0x00) -#define /*0x0F8*/ oMerryGoRoundMusicShouldPlay OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oMerryGoRoundMarioIsOutside OBJECT_FIELD_S32(0x1D) - -/* MerryGoRoundBooManager */ -#define /*0x088*/ oMerryGoRoundBooManagerNumMinionBoosKilled OBJECT_FIELD_S32(0x00) - -/* Scuttlebug */ -#define /*0x0F4*/ oScuttlebugUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oScuttlebugUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oScuttlebugUnkFC OBJECT_FIELD_S32(0x1D) - -/* ScuttlebugSpawner */ -#define /*0x0F4*/ oScuttlebugSpawnerUnkF4 OBJECT_FIELD_S32(0x1B) - -/* Whomp */ -#define /*0x0F8*/ oWhompUnkF8 OBJECT_FIELD_S32(0x1C) - -/* WaveTrail */ -#define /*0x0F8*/ oWaveTrailUnkF8 OBJECT_FIELD_F32(0x1C) - -/* WhiteWindParticle */ -#define /*0x0F4*/ oWhiteWindParticleUnkF4 OBJECT_FIELD_VPTR(0x1B) - -/* WalkingPenguin */ -#define /*0x100*/ oWalkingPenguinUnk100 OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oWalkingPenguinUnk104 OBJECT_FIELD_F32(0x1F) -#define /*0x10C*/ oWalkingPenguinUnk10C OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oWalkingPenguinUnk110 OBJECT_FIELD_S32(0x22) - -/* SnowmanWindBlowing */ -#define /*0x0F4*/ oSnowmanWindBlowingUnkF4 OBJECT_FIELD_S32(0x1B) - -/* Koopa */ -#define /*0x0F4*/ oKoopaAgility OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oKoopaMovementType OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oKoopaTargetYaw OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oKoopaUnshelledTimeUntilTurn OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oKoopaTurningAwayFromWall OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oKoopaDistanceToMario OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oKoopaAngleToMario OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oKoopaBlinkTimer OBJECT_FIELD_S32(0x22) -#define /*0x1AC*/ oKoopaCountdown OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oKoopaTheQuickRaceIndex OBJECT_FIELD_S16(0x49, 1) -#define /*0x1B0*/ oKoopaTheQuickInitTextboxCooldown OBJECT_FIELD_S16(0x4A, 0) -// 0x1D-0x21 for koopa the quick reserved for pathing - -/* Koopa race endpoint */ -#define /*0x0F4*/ oKoopaRaceEndpointRaceBegun OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oKoopaRaceEndpointKoopaFinished OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oKoopaRaceEndpointRaceStatus OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oKoopaRaceEndpointUnk100 OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oKoopaRaceEndpointRaceEnded OBJECT_FIELD_S32(0x1F) - -/* Pokey body part */ -#define /*0x0F8*/ oPokeyBodyPartDeathDelayAfterHeadKilled OBJECT_FIELD_S32(0x1C) -#define /*0x110*/ oPokeyBodyPartBlinkTimer OBJECT_FIELD_S32(0x22) - -/* Pokey */ -#define /*0x0F4*/ oPokeyAliveBodyPartFlags OBJECT_FIELD_U32(0x1B) -#define /*0x0F8*/ oPokeyNumAliveBodyParts OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oPokeyBottomBodyPartSize OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oPokeyHeadWasKilled OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oPokeyTargetYaw OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oPokeyChangeTargetTimer OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oPokeyTurningAwayFromWall OBJECT_FIELD_S32(0x21) - -/* Swoop */ -#define /*0x0F4*/ oSwoopBonkCountdown OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oSwoopTargetPitch OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oSwoopTargetYaw OBJECT_FIELD_S32(0x1D) - -/* Fly guy */ -#define /*0x0F4*/ oFlyGuyIdleTimer OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oFlyGuyOscTimer OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oFlyGuyUnusedJitter OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oFlyGuyLungeYDecel OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oFlyGuyLungeTargetPitch OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oFlyGuyTargetRoll OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oFlyGuyScaleVel OBJECT_FIELD_F32(0x21) - -/* Goomba */ -#define /*0x0F4*/ oGoombaSize OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oGoombaScale OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oGoombaWalkTimer OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oGoombaTargetYaw OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oGoombaBlinkTimer OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oGoombaTurningAwayFromWall OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oGoombaRelativeSpeed OBJECT_FIELD_F32(0x21) - -/* Chain chomp */ -#define /*0x0F4*/ oChainChompSegments OBJECT_FIELD_CHAIN_SEGMENT(0x1B) -#define /*0x0F8*/ oChainChompMaxDistFromPivotPerChainPart OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oChainChompMaxDistBetweenChainParts OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oChainChompDistToPivot OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oChainChompUnk104 OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oChainChompRestrictedByChain OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oChainChompTargetPitch OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oChainChompNumLunges OBJECT_FIELD_S32(0x22) -#define /*0x1AC*/ oChainChompReleaseStatus OBJECT_FIELD_S32(0x49) -#define /*0x1B0*/ oChainChompHitGate OBJECT_FIELD_S32(0x4A) - -/* Wooden post */ -#define /*0x0F4*/ oWoodenPostTotalMarioAngle OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oWoodenPostPrevAngleToMario OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oWoodenPostSpeedY OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oWoodenPostMarioPounding OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oWoodenPostOffsetY OBJECT_FIELD_F32(0x1F) - -/* Wiggler */ -#define /*0x0F4*/ oWigglerFallThroughFloorsHeight OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oWigglerSegments OBJECT_FIELD_CHAIN_SEGMENT(0x1C) -#define /*0x0FC*/ oWigglerWalkAnimSpeed OBJECT_FIELD_F32(0x1D) -#define /*0x104*/ oWigglerSquishSpeed OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oWigglerTimeUntilRandomTurn OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oWigglerTargetYaw OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oWigglerWalkAwayFromWallTimer OBJECT_FIELD_S32(0x22) -#define /*0x1AC*/ oWigglerUnk1AC OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oWigglerTextStatus OBJECT_FIELD_S16(0x49, + 1) - -/* Spiny */ -#define /*0x0F4*/ oSpinyTimeUntilTurn OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oSpinyTargetYaw OBJECT_FIELD_S32(0x1C) -#define /*0x100*/ oSpinyTurningAwayFromWall OBJECT_FIELD_S32(0x1E) - -/* Evil lakitu */ -#define /*0x0F4*/ oEnemyLakituNumSpinies OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oEnemyLakituBlinkTimer OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oEnemyLakituSpinyCooldown OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oEnemyLakituFaceForwardCountdown OBJECT_FIELD_S32(0x1E) - -/* Cloud */ -#define /*0x0F4*/ oCloudCenterX OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oCloudCenterY OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oCloudBlowing OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oCloudGrowSpeed OBJECT_FIELD_F32(0x1E) -#define /*0x1AC*/ oCloudFwooshMovementRadius OBJECT_FIELD_S16(0x49, 0) - -/* Camera lakitu */ -#define /*0x0F4*/ oCameraLakituBlinkTimer OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oCameraLakituSpeed OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oCameraLakituCircleRadius OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oCameraLakituFinishedDialog OBJECT_FIELD_S32(0x1E) -#ifndef VERSION_JP -#define /*0x104*/ oCameraLakituUnk104 OBJECT_FIELD_S32(0x1F) -#endif -#define /*0x1AC*/ oCameraLakituPitchVel OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oCameraLakituYawVel OBJECT_FIELD_S16(0x49, + 1) - -/* Monty mole hole */ -#define /*0x0F4*/ oMontyMoleHoleCooldown OBJECT_FIELD_S32(0x1B) - -/* Monty mole */ -#define /*0x0F4*/ oMontyMoleCurrentHole OBJECT_FIELD_OBJECT(0x1B) -#define /*0x0F8*/ oMontyMoleHeightRelativeToFloor OBJECT_FIELD_F32(0x1C) - -/* Platform on tracks */ -#define /*0x088*/ oPlatformOnTrackBaseBallIndex OBJECT_FIELD_S32(0x00) -#define /*0x0F4*/ oPlatformOnTrackDistMovedSinceLastBall OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oPlatformOnTrackSkiLiftRollVel OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oPlatformOnTrackStartWaypoint OBJECT_FIELD_WAYPOINT(0x1D) -#define /*0x100*/ oPlatformOnTrackPrevWaypoint OBJECT_FIELD_WAYPOINT(0x1E) -#define /*0x104*/ oPlatformOnTrackPrevWaypointFlags OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oPlatformOnTrackPitch OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oPlatformOnTrackYaw OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oPlatformOnTrackOffsetY OBJECT_FIELD_F32(0x22) -#define /*0x1AC*/ oPlatformOnTrackIsNotSkiLift OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oPlatformOnTrackIsNotHMC OBJECT_FIELD_S16(0x49, + 1) -#define /*0x1B0*/ oPlatformOnTrackType OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oPlatformOnTrackWasStoodOn OBJECT_FIELD_S16(0x4A, + 1) - -/* Seesaw platform */ -#define /*0x0F4*/ oSeesawPlatformPitchVel OBJECT_FIELD_F32(0x1B) - -/* Water bomb spawner */ -#define /*0x0F4*/ oWaterBombSpawnerBombActive OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oWaterBombSpawnerTimeToSpawn OBJECT_FIELD_S32(0x1C) - -/* Water bomb */ -#define /*0x0F8*/ oWaterBombVerticalStretch OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oWaterBombStretchSpeed OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oWaterBombOnGround OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oWaterBombNumBounces OBJECT_FIELD_F32(0x1F) - -/* TTC rotating solid */ -#define /*0x0F4*/ oTTCRotatingSolidNumTurns OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oTTCRotatingSolidNumSides OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oTTCRotatingSolidRotationDelay OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oTTCRotatingSolidVelY OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oTTCRotatingSolidSoundTimer OBJECT_FIELD_S32(0x1F) - -/* TTC pendulum */ -#define /*0x0F4*/ oTTCPendulumAccelDir OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oTTCPendulumAngle OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oTTCPendulumAngleVel OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oTTCPendulumAngleAccel OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oTTCPendulumDelay OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oTTCPendulumSoundTimer OBJECT_FIELD_S32(0x20) - -/* TTC treadmill */ -#define /*0x0F4*/ oTTCTreadmillBigSurface OBJECT_FIELD_S16P(0x1B) -#define /*0x0F8*/ oTTCTreadmillSmallSurface OBJECT_FIELD_S16P(0x1C) -#define /*0x0FC*/ oTTCTreadmillSpeed OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oTTCTreadmillTargetSpeed OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oTTCTreadmillTimeUntilSwitch OBJECT_FIELD_S32(0x1F) - -/* TTC moving bar */ -#define /*0x0F4*/ oTTCMovingBarDelay OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oTTCMovingBarStoppedTimer OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oTTCMovingBarOffset OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oTTCMovingBarSpeed OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oTTCMovingBarStartOffset OBJECT_FIELD_F32(0x1F) - -/* TTC cog */ -#define /*0x0F4*/ oTTCCogDir OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oTTCCogSpeed OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oTTCCogTargetVel OBJECT_FIELD_F32(0x1D) - -/* TTC pit block */ -#define /*0x0F4*/ oTTCPitBlockPeakY OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oTTCPitBlockDir OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oTTCPitBlockWaitTime OBJECT_FIELD_S32(0x1D) - -/* TTC elevator */ -#define /*0x0F4*/ oTTCElevatorDir OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oTTCElevatorPeakY OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oTTCElevatorMoveTime OBJECT_FIELD_S32(0x1D) - -/* TTC 2D rotator */ -#define /*0x0F4*/ oTTC2DRotatorMinTimeUntilNextTurn OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oTTC2DRotatorTargetYaw OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oTTC2DRotatorIncrement OBJECT_FIELD_S32(0x1D) -#define /*0x104*/ oTTC2DRotatorRandomDirTimer OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oTTC2DRotatorSpeed OBJECT_FIELD_S32(0x20) - -/* TTC spinner */ -#define /*0x0F4*/ oTTCSpinnerDir OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oTTCChangeDirTimer OBJECT_FIELD_S32(0x1C) - -/* Mr. Blizzard */ -#define /*0x0F4*/ oMrBlizzardUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oMrBlizzardUnkF8 OBJECT_FIELD_OBJECT(0x1C) -#define /*0x0FC*/ oMrBlizzardUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oMrBlizzardUnk100 OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oMrBlizzardUnk104 OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oMrBlizzardUnk108 OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oMrBlizzardUnk10C OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oMrBlizzardUnk110 OBJECT_FIELD_S32(0x22) -#define /*0x1AC*/ oMrBlizzardUnk1AC OBJECT_FIELD_S32(0x49) - -/* Back-and-forth platform */ -#define /*0x0F4*/ oBackAndForthPlatformUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oBackAndForthPlatformUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oBackAndForthPlatformUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oBackAndForthPlatformUnk100 OBJECT_FIELD_F32(0x1E) - -// rename -/* Floor switch press animation */ -#define /*0x0F4*/ oFloorSwitchPressAnimationUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oFloorSwitchPressAnimationUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oFloorSwitchPressAnimationUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oFloorSwitchPressAnimationUnk100 OBJECT_FIELD_S32(0x1E) - -/* Activated back and forth platform */ -#define /*0x0F4*/ oActivatedBackAndForthPlatformMaxOffset OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oActivatedBackAndForthPlatformOffset OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oActivatedBackAndForthPlatformVel OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oActivatedBackAndForthPlatformCountdown OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oActivatedBackAndForthPlatformStartYaw OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oActivatedBackAndForthPlatformVertical OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oActivatedBackAndForthPlatformFlipRotation OBJECT_FIELD_S32(0x21) - -/* Spinning heart */ -#define /*0x0F4*/ oSpinningHeartTotalSpin OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oSpinningHeartPlayedSound OBJECT_FIELD_S32(0x1C) - -// check name -/* Cannon barrel bubbles */ -#define /*0x0F4*/ oCannonBarrelBubblesUnkF4 OBJECT_FIELD_F32(0x1B) - -/* Cannon */ -#define /*0x0F4*/ oCannonUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oCannonUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oCannonUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oCannonUnk100 OBJECT_FIELD_S32(0x1E) - -/* Eel */ -#define /*0x0F4*/ oUnagiUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oUnagiUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oUnagiUnkFC OBJECT_FIELD_S16P(0x1D) -#define /*0x100*/ oUnagiUnk100 OBJECT_FIELD_S16P(0x1E) -#define /*0x104*/ oUnagiUnk104 OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oUnagiUnk108 OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oUnagiUnk10C OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oUnagiUnk110 OBJECT_FIELD_F32(0x22) -#define /*0x1B0*/ oUnagiUnk1AC OBJECT_FIELD_F32(0x49) -#define /*0x1B0*/ oUnagiUnk1B0 OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oUnagiUnk1B2 OBJECT_FIELD_S16(0x4A, + 1) - -/* Dorrie */ -#define /*0x0F4*/ oDorrieDistToHome OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oDorrieOffsetY OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oDorrieVelY OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oDorrieForwardDistToMario OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oDorrieYawVel OBJECT_FIELD_S32(0x1F) -#define /*0x10C*/ oDorrieLiftingMario OBJECT_FIELD_S32(0x21) -#define /*0x1AC*/ oDorrieGroundPounded OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oDorrieAngleToHome OBJECT_FIELD_S16(0x49, + 1) -#define /*0x1B0*/ oDorrieNeckAngle OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oDorrieHeadRaiseSpeed OBJECT_FIELD_S16(0x4A, + 1) - -/* Haunted chair */ -#define /*0x0F4*/ oHauntedChairUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oHauntedChairUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oHauntedChairUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oHauntedChairUnk100 OBJECT_FIELD_S32P(0x1E) -#define /*0x104*/ oHauntedChairUnk104 OBJECT_FIELD_S32(0x1F) - -/* Bookend */ -#define /*0x0F4*/ oBookendUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oBookendUnkF8 OBJECT_FIELD_S32(0x1C) - -/* Book switch manager */ -#define /*0x0F4*/ oBookSwitchManagerUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oBookSwitchManagerUnkF8 OBJECT_FIELD_S32(0x1C) - -/* Book switch */ -#define /*0x0F4*/ oBookSwitchUnkF4 OBJECT_FIELD_F32(0x1B) - -/* Fire piranha plant */ -#define /*0x0F4*/ oFirePiranhaPlantNeutralScale OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oFirePiranhaPlantScale OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oFirePiranhaPlantActive OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oFirePiranhaPlantDeathSpinTimer OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oFirePiranhaPlantDeathSpinVel OBJECT_FIELD_F32(0x1F) - -// Rename -/* Small piranha flame */ -#define /*0x0F4*/ oSmallPiranhaFlameUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oSmallPiranhaFlameUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oSmallPiranhaFlameUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oSmallPiranhaFlameUnk100 OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oSmallPiranhaFlameUnk104 OBJECT_FIELD_F32(0x1F) - -/* Fire spitter */ -#define /*0x0F4*/ oFireSpitterScaleVel OBJECT_FIELD_F32(0x1B) - -/* Snufit */ -#define /*0x0F4*/ oSnufitUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oSnufitUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x100*/ oSnufitUnk100 OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oSnufitUnk104 OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oSnufitUnk108 OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oSnufitUnk10C OBJECT_FIELD_S32(0x21) -#define /*0x1AE*/ oSnufitUnk1AE OBJECT_FIELD_S16(0x49, + 1) -#define /*0x1B0*/ oSnufitUnk1B0 OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oSnufitUnk1B2 OBJECT_FIELD_S16(0x4A, + 1) - -/* Horizontal grindel */ -#define /*0x0F4*/ oHorizontalGrindelTargetYaw OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oHorizontalGrindelDistToHome OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oHorizontalGrindelOnGround OBJECT_FIELD_S32(0x1D) - -/* Eyerok boss */ -#define /*0x0F8*/ oEyerokBossNumHands OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oEyerokBossUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oEyerokBossActiveHand OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oEyerokBossUnk104 OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oEyerokBossUnk108 OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oEyerokBossUnk10C OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oEyerokBossUnk110 OBJECT_FIELD_F32(0x22) -#define /*0x1AC*/ oEyerokBossUnk1AC OBJECT_FIELD_S32(0x49) - -/* Eyerok hand */ -#define /*0x0F4*/ oEyerokHandWakeUpTimer OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oEyerokReceivedAttack OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oEyerokHandUnkFC OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oEyerokHandUnk100 OBJECT_FIELD_S32(0x1E) - -/* Klepto */ -#define /*0x0F4*/ oKleptoDistanceToTarget OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oKleptoUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oKleptoUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oKleptoSpeed OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oKleptoStartPosX OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oKleptoStartPosY OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oKleptoStartPosZ OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oKleptoTimeUntilTargetChange OBJECT_FIELD_S32(0x22) -#define /*0x1AC*/ oKleptoTargetNumber OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oKleptoUnk1AE OBJECT_FIELD_S16(0x49, + 1) -#define /*0x1B0*/ oKleptoUnk1B0 OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oKleptoYawToTarget OBJECT_FIELD_S16(0x4A, + 1) - -/* Bird */ -#define /*0x0F4*/ oBirdSpeed OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oBirdTargetPitch OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oBirdTargetYaw OBJECT_FIELD_S32(0x1D) - -/* Racing penguin */ -#define /*0x0F4*/ oRacingPenguinInitTextCooldown OBJECT_FIELD_S32(0x1B) -// 0x1D-0x21 reserved for pathing -#define /*0x110*/ oRacingPenguinWeightedNewTargetSpeed OBJECT_FIELD_F32(0x22) -#define /*0x1AC*/ oRacingPenguinFinalTextbox OBJECT_FIELD_S16(0x49, 0) -#define /*0x1AE*/ oRacingPenguinMarioWon OBJECT_FIELD_S16(0x49, + 1) -#define /*0x1B0*/ oRacingPenguinReachedBottom OBJECT_FIELD_S16(0x4A, 0) -#define /*0x1B2*/ oRacingPenguinMarioCheated OBJECT_FIELD_S16(0x4A, + 1) - -/* Clam */ -#define /*0x0F4*/ oClamUnkF4 OBJECT_FIELD_S32(0x1B) - -/* Skeeter */ -#define /*0x0F4*/ oSkeeterTargetAngle OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oSkeeterUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oSkeeterUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oSkeeterWaitTime OBJECT_FIELD_S32(0x1E) -#define /*0x1AC*/ oSkeeterUnk1AC OBJECT_FIELD_S16(0x49, 0) - -/* Swing platform */ -#define /*0x0F4*/ oSwingPlatformAngle OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oSwingPlatformSpeed OBJECT_FIELD_F32(0x1C) - -/* Donut platform spawner */ -#define /*0x0F4*/ oDonutPlatformSpawnerSpawnedPlatforms OBJECT_FIELD_S32(0x1B) - -/* DDD pole */ -#define /*0x0F4*/ oDDDPoleVel OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oDDDPoleMaxOffset OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oDDDPoleOffset OBJECT_FIELD_F32(0x1D) - -/* Triplet butterfly */ -#define /*0x0F4*/ oTripletButterflyScale OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oTripletButterflySpeed OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oTripletButterflyBaseYaw OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oTripletButterflyTargetPitch OBJECT_FIELD_S32(0x1E) -#define /*0x104*/ oTripletButterflyTargetYaw OBJECT_FIELD_S32(0x1F) -#define /*0x108*/ oTripletButterflyType OBJECT_FIELD_S32(0x20) -#define /*0x10C*/ oTripletButterflyModel OBJECT_FIELD_S32(0x21) -#define /*0x110*/ oTripletButterflySelectedButterfly OBJECT_FIELD_S32(0x22) -#define /*0x1AC*/ oTripletButterflyScalePhase OBJECT_FIELD_S32(0x49) +#define /*0x10C*/ oBowserPuzzlePieceActionList OBJECT_FIELD_VPTR(0x21) +#define /*0x110*/ oBowserPuzzlePieceNextAction OBJECT_FIELD_VPTR(0x22) /* Bubba */ -#define /*0x0F4*/ oBubbaUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oBubbaUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oBubbaUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x0F4*/ oBubbaUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oBubbaUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oBubbaUnkFC OBJECT_FIELD_S32(0x1D) #define /*0x100*/ oBubbaUnk100 OBJECT_FIELD_S32(0x1E) #define /*0x104*/ oBubbaUnk104 OBJECT_FIELD_S32(0x1F) #define /*0x108*/ oBubbaUnk108 OBJECT_FIELD_F32(0x20) @@ -972,92 +296,839 @@ #define /*0x1B0*/ oBubbaUnk1B0 OBJECT_FIELD_S16(0x4A, 0) #define /*0x1B2*/ oBubbaUnk1B2 OBJECT_FIELD_S16(0x4A, + 1) -/* PyramidTop */ -#define /*0x0F4*/ oPyramidTopPillarsTouched OBJECT_FIELD_S32(0x1B) +/* Bullet Bill */ +#define /*0x0F8*/ oBulletBillUnkF8 OBJECT_FIELD_S32(0x1C) -/* PyramidTopExplosion */ -#define /*0x0F4*/ oPyramidTopFragmentsScale OBJECT_FIELD_F32(0x1B) +/* Bully (all variants) */ +#define /*0x0F4*/ oBullySubtype OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oBullyPrevX OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oBullyPrevY OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oBullyPrevZ OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oBullyKBTimerAndMinionKOCounter OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oBullyMarioCollisionAngle OBJECT_FIELD_S32(0x20) -/* SnowmansBottom */ -#define /*0x0F4*/ oSnowmansBottomUnkF4 OBJECT_FIELD_F32(0x1B) -#define /*0x0F8*/ oSnowmansBottomUnkF8 OBJECT_FIELD_S32(0x1C) -#define /*0x0FC*/ oSnowmansBottomUnkFC OBJECT_FIELD_VOIDP(0x1D) -#define /*0x10C*/ oSnowmansBottomUnk10C OBJECT_FIELD_S32(0x21) +/* Butterfly */ +#define /*0x0F4*/ oButterflyYPhase OBJECT_FIELD_S32(0x1B) -/* SnowmansHead */ -#define /*0x0F4*/ oSnowmansHeadUnkF4 OBJECT_FIELD_S32(0x1B) +/* Triplet Butterfly */ +#define /*0x0F4*/ oTripletButterflyScale OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oTripletButterflySpeed OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oTripletButterflyBaseYaw OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oTripletButterflyTargetPitch OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oTripletButterflyTargetYaw OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oTripletButterflyType OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oTripletButterflyModel OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oTripletButterflySelectedButterfly OBJECT_FIELD_S32(0x22) +#define /*0x1AC*/ oTripletButterflyScalePhase OBJECT_FIELD_S32(0x49) -/* StarSpawn */ -#define /*0x0F4*/ oStarSpawnDisFromHome OBJECT_FIELD_F32(0x1B) -#define /*0x0FC*/ oStarSpawnUnkFC OBJECT_FIELD_F32(0x1D) +/* Cannon */ +#define /*0x0F4*/ oCannonUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oCannonUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x10C*/ oCannonUnk10C OBJECT_FIELD_S32(0x21) -/* HiddenRedCoinStar */ -#define /*0x0F4*/ oHiddenRedCoinStarCoinsCollected OBJECT_FIELD_S32(0x1B) +/* Cap */ +#define /*0x0F4*/ oCapUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oCapUnkF8 OBJECT_FIELD_S32(0x1C) -/* HiddenStar */ -#define /*0x0F4*/ oHiddenStarSecretsCollected OBJECT_FIELD_S32(0x1B) +/* Chain Chomp */ +#define /*0x0F4*/ oChainChompSegments OBJECT_FIELD_CHAIN_SEGMENT(0x1B) +#define /*0x0F8*/ oChainChompMaxDistFromPivotPerChainPart OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oChainChompMaxDistBetweenChainParts OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oChainChompDistToPivot OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oChainChompUnk104 OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oChainChompRestrictedByChain OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oChainChompTargetPitch OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oChainChompNumLunges OBJECT_FIELD_S32(0x22) +#define /*0x1AC*/ oChainChompReleaseStatus OBJECT_FIELD_S32(0x49) +#define /*0x1B0*/ oChainChompHitGate OBJECT_FIELD_S32(0x4A) -/* BowserCourseRedCoinStar */ -#define /*0x0F4*/ oBowserCourseRedCoinStarCoinsCollected OBJECT_FIELD_S32(0x1B) +/* Checkerboard Platform */ +#define /*0x0F8*/ oCheckerBoardPlatformUnkF8 OBJECT_FIELD_S32(0x1C) // oAction like +#define /*0x0FC*/ oCheckerBoardPlatformUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x1AC*/ oCheckerBoardPlatformUnk1AC OBJECT_FIELD_F32(0x49) + +/* Cheep Cheep */ +#define /*0x0F4*/ oCheepCheepUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oCheepCheepUnkF8 OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oCheepCheepUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x104*/ oCheepCheepUnk104 OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oCheepCheepUnk108 OBJECT_FIELD_F32(0x20) + +/* Chuckya */ +#define /*0x088*/ oChuckyaUnk88 OBJECT_FIELD_S32(0x00) +#define /*0x0F8*/ oChuckyaUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oChuckyaUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oChuckyaUnk100 OBJECT_FIELD_S32(0x1E) + +/* Clam */ +#define /*0x0F4*/ oClamUnkF4 OBJECT_FIELD_S32(0x1B) + +/* Cloud */ +#define /*0x0F4*/ oCloudCenterX OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oCloudCenterY OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oCloudBlowing OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oCloudGrowSpeed OBJECT_FIELD_F32(0x1E) +#define /*0x1AC*/ oCloudFwooshMovementRadius OBJECT_FIELD_S16(0x49, 0) + +/* Coin */ +#define /*0x0F4*/ oCoinUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oCoinUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x110*/ oCoinUnk110 OBJECT_FIELD_F32(0x22) +#ifndef VERSION_JP +#define /*0x1B0*/ oCoinUnk1B0 OBJECT_FIELD_S32(0x4A) +#endif + +/* Collision Particle */ +#define /*0x0F4*/ oCollisionParticleUnkF4 OBJECT_FIELD_F32(0x1B) + +/* Controllable Platform */ +#define /*0x0F8*/ oControllablePlatformUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oControllablePlatformUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oControllablePlatformUnk100 OBJECT_FIELD_S32(0x1E) + +/* Breakable Box Small (Small Cork Box) */ +#define /*0x0F4*/ oBreakableBoxSmallReleased OBJECT_FIELD_S32(0x1B) +#define /*0x0FC*/ oBreakableBoxSmallFramesSinceReleased OBJECT_FIELD_S32(0x1D) + +/* Jumping Box (Crazy Box) */ +#define /*0x0F4*/ oJumpingBoxUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oJumpingBoxUnkF8 OBJECT_FIELD_S32(0x1C) + +/* RR Cruiser Wing */ +#define /*0x0F4*/ oRRCruiserWingUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oRRCruiserWingUnkF8 OBJECT_FIELD_S32(0x1C) + +/* Donut Platform Spawner */ +#define /*0x0F4*/ oDonutPlatformSpawnerSpawnedPlatforms OBJECT_FIELD_S32(0x1B) + +/* Door */ +#define /*0x088*/ oDoorUnk88 OBJECT_FIELD_S32(0x00) +#define /*0x0F8*/ oDoorUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oDoorUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oDoorUnk100 OBJECT_FIELD_S32(0x1E) + +/* Dorrie */ +#define /*0x0F4*/ oDorrieDistToHome OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oDorrieOffsetY OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oDorrieVelY OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oDorrieForwardDistToMario OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oDorrieYawVel OBJECT_FIELD_S32(0x1F) +#define /*0x10C*/ oDorrieLiftingMario OBJECT_FIELD_S32(0x21) +#define /*0x1AC*/ oDorrieGroundPounded OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oDorrieAngleToHome OBJECT_FIELD_S16(0x49, + 1) +#define /*0x1B0*/ oDorrieNeckAngle OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oDorrieHeadRaiseSpeed OBJECT_FIELD_S16(0x4A, + 1) + +/* Elevator */ +#define /*0x0F4*/ oElevatorUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oElevatorUnkF8 OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oElevatorUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oElevatorUnk100 OBJECT_FIELD_S32(0x1E) + +/* Exclamation Box */ +#define /*0x0F4*/ oExclamationBoxUnkF4 OBJECT_FIELD_F32(0x1B) // scale? +#define /*0x0F8*/ oExclamationBoxUnkF8 OBJECT_FIELD_F32(0x1C) // scale? +#define /*0x0FC*/ oExclamationBoxUnkFC OBJECT_FIELD_S32(0x1D) // angle? + +/* Eyerok Boss */ +#define /*0x0F8*/ oEyerokBossNumHands OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oEyerokBossUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oEyerokBossActiveHand OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oEyerokBossUnk104 OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oEyerokBossUnk108 OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oEyerokBossUnk10C OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oEyerokBossUnk110 OBJECT_FIELD_F32(0x22) +#define /*0x1AC*/ oEyerokBossUnk1AC OBJECT_FIELD_S32(0x49) + +/* Eyerok Hand */ +#define /*0x0F4*/ oEyerokHandWakeUpTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oEyerokReceivedAttack OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oEyerokHandUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oEyerokHandUnk100 OBJECT_FIELD_S32(0x1E) + +/* Falling Pillar */ +#define /*0x0F4*/ oFallingPillarPitchAcceleration OBJECT_FIELD_F32(0x1B) + +/* Fire Spitter */ +#define /*0x0F4*/ oFireSpitterScaleVel OBJECT_FIELD_F32(0x1B) + +/* Blue Fish */ +#define /*0x0F4*/ oBlueFishUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oBlueFishUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x100*/ oBlueFishUnk100 OBJECT_FIELD_F32(0x1E) + +/* Fish Group */ +#define /*0x0F4*/ oFishGroupUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oFishGroupUnkF8 OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oFishGroupUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oFishGroupUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oFishGroupUnk104 OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oFishGroupUnk108 OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oFishGroupUnk10C OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oFishGroupUnk110 OBJECT_FIELD_F32(0x22) + +/* Flame */ +#define /*0x0F4*/ oFlameUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oFlameUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oFlameUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oFlameUnk100 OBJECT_FIELD_OBJ(0x1E) + +/* Blue Flame */ +#define /*0x0F8*/ oBlueFlameUnkF8 OBJECT_FIELD_F32(0x1C) + +/* Small Piranha Flame */ +#define /*0x0F4*/ oSmallPiranhaFlameUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oSmallPiranhaFlameUnkF8 OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oSmallPiranhaFlameUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oSmallPiranhaFlameUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oSmallPiranhaFlameUnk104 OBJECT_FIELD_F32(0x1F) + +/* Moving Flame */ +#define /*0x0F4*/ oMovingFlameTimer OBJECT_FIELD_S32(0x1B) + +/* Flamethrower Flame */ +#define /*0x110*/ oFlameThowerFlameUnk110 OBJECT_FIELD_S32(0x22) + +/* Flamethrower */ +#define /*0x110*/ oFlameThowerUnk110 OBJECT_FIELD_S32(0x22) + +/* Floating Platform */ +#define /*0x0F4*/ oFloatingPlatformUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oFloatingPlatformUnkF8 OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oFloatingPlatformUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oFloatingPlatformUnk100 OBJECT_FIELD_S32(0x1E) + +/* Floor Switch Press Animation */ +#define /*0x0F4*/ oFloorSwitchPressAnimationUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oFloorSwitchPressAnimationUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oFloorSwitchPressAnimationUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oFloorSwitchPressAnimationUnk100 OBJECT_FIELD_S32(0x1E) + +/* Fly Guy */ +#define /*0x0F4*/ oFlyGuyIdleTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oFlyGuyOscTimer OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oFlyGuyUnusedJitter OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oFlyGuyLungeYDecel OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oFlyGuyLungeTargetPitch OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oFlyGuyTargetRoll OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oFlyGuyScaleVel OBJECT_FIELD_F32(0x21) + +/* Grand Star */ +#define /*0x108*/ oGrandStarUnk108 OBJECT_FIELD_S32(0x20) + +/* Horizontal Grindel */ +#define /*0x0F4*/ oHorizontalGrindelTargetYaw OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oHorizontalGrindelDistToHome OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oHorizontalGrindelOnGround OBJECT_FIELD_S32(0x1D) + +/* Goomba */ +#define /*0x0F4*/ oGoombaSize OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oGoombaScale OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oGoombaWalkTimer OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oGoombaTargetYaw OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oGoombaBlinkTimer OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oGoombaTurningAwayFromWall OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oGoombaRelativeSpeed OBJECT_FIELD_F32(0x21) + +/* Haunted Chair */ +#define /*0x0F4*/ oHauntedChairUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oHauntedChairUnkF8 OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oHauntedChairUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oHauntedChairUnk100 OBJECT_FIELD_S32P(0x1E) +#define /*0x104*/ oHauntedChairUnk104 OBJECT_FIELD_S32(0x1F) + +/* Heave-Ho */ +#define /*0x088*/ oHeaveHoUnk88 OBJECT_FIELD_S32(0x00) +#define /*0x0F4*/ oHeaveHoUnkF4 OBJECT_FIELD_F32(0x1B) + +/* Hidden Object */ +#define /*0x0F4*/ oHiddenObjectUnkF4 OBJECT_FIELD_OBJ(0x1B) + +/* Hoot */ +#define /*0x0F4*/ oHootAvailability OBJECT_FIELD_S32(0x1B) +#define /*0x110*/ oHootMarioReleaseTime OBJECT_FIELD_S32(0x22) + +/* Horizontal Movement */ +#define /*0x0F4*/ oHorizontalMovementUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oHorizontalMovementUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x100*/ oHorizontalMovementUnk100 OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oHorizontalMovementUnk104 OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oHorizontalMovementUnk108 OBJECT_FIELD_F32(0x20) + +/* Kickable Board */ +#define /*0x0F4*/ oKickableBoardF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oKickableBoardF8 OBJECT_FIELD_S32(0x1C) + + /* King Bob-omb */ +#define /*0x088*/ oKingBobombUnk88 OBJECT_FIELD_S32(0x00) +#define /*0x0F8*/ oKingBobombUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oKingBobombUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oKingBobombUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oKingBobombUnk104 OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oKingBobombUnk108 OBJECT_FIELD_S32(0x20) + +/* Klepto */ +#define /*0x0F4*/ oKleptoDistanceToTarget OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oKleptoUnkF8 OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oKleptoUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oKleptoSpeed OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oKleptoStartPosX OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oKleptoStartPosY OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oKleptoStartPosZ OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oKleptoTimeUntilTargetChange OBJECT_FIELD_S32(0x22) +#define /*0x1AC*/ oKleptoTargetNumber OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oKleptoUnk1AE OBJECT_FIELD_S16(0x49, + 1) +#define /*0x1B0*/ oKleptoUnk1B0 OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oKleptoYawToTarget OBJECT_FIELD_S16(0x4A, + 1) + +/* Koopa */ +#define /*0x0F4*/ oKoopaAgility OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oKoopaMovementType OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oKoopaTargetYaw OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oKoopaUnshelledTimeUntilTurn OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oKoopaTurningAwayFromWall OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oKoopaDistanceToMario OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oKoopaAngleToMario OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oKoopaBlinkTimer OBJECT_FIELD_S32(0x22) +#define /*0x1AC*/ oKoopaCountdown OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oKoopaTheQuickRaceIndex OBJECT_FIELD_S16(0x49, 1) +#define /*0x1B0*/ oKoopaTheQuickInitTextboxCooldown OBJECT_FIELD_S16(0x4A, 0) +// 0x1D-0x21 for koopa the quick reserved for pathing + +/* Koopa Race Endpoint */ +#define /*0x0F4*/ oKoopaRaceEndpointRaceBegun OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oKoopaRaceEndpointKoopaFinished OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oKoopaRaceEndpointRaceStatus OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oKoopaRaceEndpointUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oKoopaRaceEndpointRaceEnded OBJECT_FIELD_S32(0x1F) + +/* Koopa Shell Flame */ +#define /*0x0F4*/ oKoopaShellFlameUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oKoopaShellFlameUnkF8 OBJECT_FIELD_F32(0x1C) + +/* Camera Lakitu */ +#define /*0x0F4*/ oCameraLakituBlinkTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oCameraLakituSpeed OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oCameraLakituCircleRadius OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oCameraLakituFinishedDialog OBJECT_FIELD_S32(0x1E) +#ifndef VERSION_JP +#define /*0x104*/ oCameraLakituUnk104 OBJECT_FIELD_S32(0x1F) +#endif +#define /*0x1AC*/ oCameraLakituPitchVel OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oCameraLakituYawVel OBJECT_FIELD_S16(0x49, + 1) + +/* Evil Lakitu */ +#define /*0x0F4*/ oEnemyLakituNumSpinies OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oEnemyLakituBlinkTimer OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oEnemyLakituSpinyCooldown OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oEnemyLakituFaceForwardCountdown OBJECT_FIELD_S32(0x1E) + +/* Intro Cutscene Lakitu */ +#define /*0x0F8*/ oIntroLakituUnkF8 OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oIntroLakituUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oIntroLakituUnk100 OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oIntroLakituUnk104 OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oIntroLakituUnk108 OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oIntroLakituUnk10C OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oIntroLakituUnk110 OBJECT_FIELD_F32(0x22) +#define /*0x1AC*/ oIntroLakituUnk1AC OBJECT_FIELD_OBJ(0x49) + +/* Main Menu Button */ +#define /*0x0F4*/ oMenuButtonState OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oMenuButtonTimer OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oMenuButtonOrigPosX OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oMenuButtonOrigPosY OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oMenuButtonOrigPosZ OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oMenuButtonScale OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oMenuButtonActionPhase OBJECT_FIELD_S32(0x21) + +/* Manta Ray */ +#define /*0x0F4*/ oMantaUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oMantaUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x1AC*/ oMantaUnk1AC OBJECT_FIELD_S32(0x49) + +/* Merry-Go-Round */ +#define /*0x088*/ oMerryGoRoundStopped OBJECT_FIELD_S32(0x00) +#define /*0x0F8*/ oMerryGoRoundMusicShouldPlay OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oMerryGoRoundMarioIsOutside OBJECT_FIELD_S32(0x1D) + +/* Merry-Go-Round Boo Manager */ +#define /*0x088*/ oMerryGoRoundBooManagerNumBoosKilled OBJECT_FIELD_S32(0x00) +#define /*0x0FC*/ oMerryGoRoundBooManagerNumBoosSpawned OBJECT_FIELD_S32(0x1D) + +/* Mips */ +#define /*0x0F4*/ oMipsStarStatus OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oMipsStartWaypointIndex OBJECT_FIELD_S32(0x1C) + // 0x1D-0x21 reserved for pathing +#define /*0x1AC*/ oMipsForwardVelocity OBJECT_FIELD_F32(0x49) + +/* Moneybag */ +#define /*0x0F4*/ oMoneybagJumpState OBJECT_FIELD_S32(0x1B) + +/* Monty Mole */ +#define /*0x0F4*/ oMontyMoleCurrentHole OBJECT_FIELD_OBJ(0x1B) +#define /*0x0F8*/ oMontyMoleHeightRelativeToFloor OBJECT_FIELD_F32(0x1C) + +/* Monty Mole Hole */ +#define /*0x0F4*/ oMontyMoleHoleCooldown OBJECT_FIELD_S32(0x1B) + +/* Mr. Blizzard */ +#define /*0x0F4*/ oMrBlizzardUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oMrBlizzardUnkF8 OBJECT_FIELD_OBJ(0x1C) +#define /*0x0FC*/ oMrBlizzardUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oMrBlizzardUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oMrBlizzardUnk104 OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oMrBlizzardUnk108 OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oMrBlizzardUnk10C OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oMrBlizzardUnk110 OBJECT_FIELD_S32(0x22) +#define /*0x1AC*/ oMrBlizzardUnk1AC OBJECT_FIELD_S32(0x49) + +/* Mr. I */ +#define /*0x0F4*/ oMrIUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0FC*/ oMrIUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oMrIUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oMrIUnk104 OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oMrIUnk108 OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oMrISize OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oMrIUnk110 OBJECT_FIELD_S32(0x22) + +/* Object Respawner */ +#define /*0x0F4*/ oRespawnerModelToRespawn OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oRespawnerMinSpawnDist OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oRespawnerBehaviorToRespawn OBJECT_FIELD_VPTR(0x1D) + +/* Openable Grill */ +#define /*0x088*/ oOpenableGrillUnk88 OBJECT_FIELD_S32(0x00) +#define /*0x0F4*/ oOpenableGrillUnkF4 OBJECT_FIELD_OBJ(0x1B) + +/* Intro Cutscene Peach */ +#define /*0x108*/ oIntroPeachUnk108 OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oIntroPeachUnk10C OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oIntroPeachUnk110 OBJECT_FIELD_F32(0x22) + +/* Racing Penguin */ +#define /*0x0F4*/ oRacingPenguinInitTextCooldown OBJECT_FIELD_S32(0x1B) +// 0x1D-0x21 reserved for pathing +#define /*0x110*/ oRacingPenguinWeightedNewTargetSpeed OBJECT_FIELD_F32(0x22) +#define /*0x1AC*/ oRacingPenguinFinalTextbox OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oRacingPenguinMarioWon OBJECT_FIELD_S16(0x49, + 1) +#define /*0x1B0*/ oRacingPenguinReachedBottom OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oRacingPenguinMarioCheated OBJECT_FIELD_S16(0x4A, + 1) + +/* Small Penguin */ +#define /*0x088*/ oSmallPenguinUnk88 OBJECT_FIELD_S32(0x00) +#define /*0x100*/ oSmallPenguinUnk100 OBJECT_FIELD_S32(0x1E) // angle? +#define /*0x104*/ oSmallPenguinUnk104 OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oSmallPenguinUnk108 OBJECT_FIELD_F32(0x20) +#define /*0x110*/ oSmallPenguinUnk110 OBJECT_FIELD_S32(0x22) + +/* Walking Penguin */ +#define /*0x100*/ oWalkingPenguinUnk100 OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oWalkingPenguinUnk104 OBJECT_FIELD_F32(0x1F) +#define /*0x10C*/ oWalkingPenguinUnk10C OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oWalkingPenguinUnk110 OBJECT_FIELD_S32(0x22) + +/* Piranha Plant */ +#define /*0x0F4*/ oPiranhaPlantSleepMusicState OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oPiranhaPlantScale OBJECT_FIELD_F32(0x1C) + +/* Fire Piranha Plant */ +#define /*0x0F4*/ oFirePiranhaPlantNeutralScale OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oFirePiranhaPlantScale OBJECT_FIELD_F32(0x1C) //Shared with above obj? Coincidence? +#define /*0x0FC*/ oFirePiranhaPlantActive OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oFirePiranhaPlantDeathSpinTimer OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oFirePiranhaPlantDeathSpinVel OBJECT_FIELD_F32(0x1F) /* Pitoune */ #define /*0x0F4*/ oPitouneUnkF4 OBJECT_FIELD_F32(0x1B) #define /*0x0F8*/ oPitouneUnkF8 OBJECT_FIELD_F32(0x1C) #define /*0x0FC*/ oPitouneUnkFC OBJECT_FIELD_F32(0x1D) -/* 1UpHidden */ -#define /*0x0F4*/ o1UpHiddenUnkF4 OBJECT_FIELD_S32(0x1B) +/* Platform */ +#define /*0x0F4*/ oPlatformTimer OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oPlatformUnkF8 OBJECT_FIELD_OBJ(0x1C) +#define /*0x0FC*/ oPlatformUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x10C*/ oPlatformUnk10C OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oPlatformUnk110 OBJECT_FIELD_F32(0x22) -/* ControllablePlatform */ -#define /*0x0FC*/ oControllablePlatformUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oControllablePlatformUnk100 OBJECT_FIELD_S32(0x1E) +/* Platform on Tracks */ +#define /*0x088*/ oPlatformOnTrackBaseBallIndex OBJECT_FIELD_S32(0x00) +#define /*0x0F4*/ oPlatformOnTrackDistMovedSinceLastBall OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oPlatformOnTrackSkiLiftRollVel OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oPlatformOnTrackStartWaypoint OBJECT_FIELD_WAYPOINT(0x1D) +#define /*0x100*/ oPlatformOnTrackPrevWaypoint OBJECT_FIELD_WAYPOINT(0x1E) +#define /*0x104*/ oPlatformOnTrackPrevWaypointFlags OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oPlatformOnTrackPitch OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oPlatformOnTrackYaw OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oPlatformOnTrackOffsetY OBJECT_FIELD_F32(0x22) +#define /*0x1AC*/ oPlatformOnTrackIsNotSkiLift OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oPlatformOnTrackIsNotHMC OBJECT_FIELD_S16(0x49, + 1) +#define /*0x1B0*/ oPlatformOnTrackType OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oPlatformOnTrackWasStoodOn OBJECT_FIELD_S16(0x4A, + 1) -/* BreakableBoxSmall */ -#define /*0x0F4*/ oBreakableBoxSmallReleased OBJECT_FIELD_S32(0x1B) -#define /*0x0FC*/ oBreakableBoxSmallFramesSinceReleased OBJECT_FIELD_S32(0x1D) +/* Platform Spawner */ +#define /*0x0F4*/ oPlatformSpawnerUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oPlatformSpawnerUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oPlatformSpawnerUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oPlatformSpawnerUnk100 OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oPlatformSpawnerUnk104 OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oPlatformSpawnerUnk108 OBJECT_FIELD_F32(0x20) -/* FloatingPlatform */ -#define /*0x0F4*/ oFloatingPlatformUnkFC OBJECT_FIELD_S32(0x1B) +/* Pokey */ +#define /*0x0F4*/ oPokeyAliveBodyPartFlags OBJECT_FIELD_U32(0x1B) +#define /*0x0F8*/ oPokeyNumAliveBodyParts OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oPokeyBottomBodyPartSize OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oPokeyHeadWasKilled OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oPokeyTargetYaw OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oPokeyChangeTargetTimer OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oPokeyTurningAwayFromWall OBJECT_FIELD_S32(0x21) -/* ArrowLift */ -#define /*0x0F4*/ oArrowLiftDisplacement OBJECT_FIELD_F32(0x1B) +/* Pokey Body Part */ +#define /*0x0F8*/ oPokeyBodyPartDeathDelayAfterHeadKilled OBJECT_FIELD_S32(0x1C) +#define /*0x110*/ oPokeyBodyPartBlinkTimer OBJECT_FIELD_S32(0x22) -/* FallingPillar */ -#define /*0x0F4*/ oFallingPillarPitchAcceleration OBJECT_FIELD_F32(0x1B) +/* DDD Pole */ +#define /*0x0F4*/ oDDDPoleVel OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oDDDPoleMaxOffset OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oDDDPoleOffset OBJECT_FIELD_F32(0x1D) -/* TreasureChestJrb */ -#define /*0x0F4*/ oTreasureChestJrbUnkF4 OBJECT_FIELD_S32(0x1B) -#define /*0x0FC*/ oTreasureChestJrbUnkFC OBJECT_FIELD_S32(0x1D) +/* Pyramid Top */ +#define /*0x0F4*/ oPyramidTopPillarsTouched OBJECT_FIELD_S32(0x1B) -/* TreasureChest */ +/* Pyramid Top Explosion */ +#define /*0x0F4*/ oPyramidTopFragmentsScale OBJECT_FIELD_F32(0x1B) + +/* Rolling Log */ +#define /*0x0F4*/ oRollingLogUnkF4 OBJECT_FIELD_F32(0x1B) + +/* Lll Rotating Hex Flame */ +#define /*0x0F4*/ oLllRotatingHexFlameUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oLllRotatingHexFlameUnkF8 OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oLllRotatingHexFlameUnkFC OBJECT_FIELD_F32(0x1D) + +/* Scuttlebug */ +#define /*0x0F4*/ oScuttlebugUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oScuttlebugUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oScuttlebugUnkFC OBJECT_FIELD_S32(0x1D) + +/* Scuttlebug Spawner */ +#define /*0x088*/ oScuttlebugSpawnerUnk88 OBJECT_FIELD_S32(0x00) +#define /*0x0F4*/ oScuttlebugSpawnerUnkF4 OBJECT_FIELD_S32(0x1B) + +/* Seesaw Platform */ +#define /*0x0F4*/ oSeesawPlatformPitchVel OBJECT_FIELD_F32(0x1B) + +/* Ship Part 3 */ +#define /*0x0F4*/ oShipPart3UnkF4 OBJECT_FIELD_S32(0x1B) // angle? +#define /*0x0F8*/ oShipPart3UnkF8 OBJECT_FIELD_S32(0x1C) // angle? + +/* Sink When Stepped On */ +#define /*0x104*/ oSinkWhenSteppedOnUnk104 OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oSinkWhenSteppedOnUnk108 OBJECT_FIELD_F32(0x20) + +/* Skeeter */ +#define /*0x0F4*/ oSkeeterTargetAngle OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oSkeeterUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oSkeeterUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oSkeeterWaitTime OBJECT_FIELD_S32(0x1E) +#define /*0x1AC*/ oSkeeterUnk1AC OBJECT_FIELD_S16(0x49, 0) + +/* Jrb Sliding Box */ +#define /*0x0F4*/ oJrbSlidingBoxUnkF4 OBJECT_FIELD_OBJ(0x1B) +#define /*0x0F8*/ oJrbSlidingBoxUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oJrbSlidingBoxUnkFC OBJECT_FIELD_F32(0x1D) + +/* WF Sliding Brick Platform */ +#define /*0x0F4*/ oWFSlidBrickPtfmMovVel OBJECT_FIELD_F32(0x1B) + +/* Smoke */ +#define /*0x0F4*/ oSmokeTimer OBJECT_FIELD_S32(0x1B) + +/* Snowman's Bottom */ +#define /*0x0F4*/ oSnowmansBottomUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oSnowmansBottomUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x1AC*/ oSnowmansBottomUnk1AC OBJECT_FIELD_S32(0x49) +// 0x1D-0x21 reserved for pathing + +/* Snowman's Head */ +#define /*0x0F4*/ oSnowmansHeadUnkF4 OBJECT_FIELD_S32(0x1B) + +/* Snowman Wind Blowing */ +#define /*0x0F4*/ oSnowmanWindBlowingUnkF4 OBJECT_FIELD_S32(0x1B) + +/* Snufit */ +#define /*0x0F4*/ oSnufitUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oSnufitUnkF8 OBJECT_FIELD_F32(0x1C) +#define /*0x100*/ oSnufitUnk100 OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oSnufitUnk104 OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oSnufitUnk108 OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oSnufitUnk10C OBJECT_FIELD_S32(0x21) +#define /*0x1AC*/ oSnufitUnk1AC OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oSnufitUnk1AE OBJECT_FIELD_S16(0x49, + 1) +#define /*0x1B0*/ oSnufitUnk1B0 OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oSnufitUnk1B2 OBJECT_FIELD_S16(0x4A, + 1) + +/* Spindel */ +#define /*0x0F4*/ oSpindelUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oSpindelUnkF8 OBJECT_FIELD_S32(0x1C) + +/* Spinning Heart */ +#define /*0x0F4*/ oSpinningHeartTotalSpin OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oSpinningHeartPlayedSound OBJECT_FIELD_S32(0x1C) + +/* Spiny */ +#define /*0x0F4*/ oSpinyTimeUntilTurn OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oSpinyTargetYaw OBJECT_FIELD_S32(0x1C) +#define /*0x100*/ oSpinyTurningAwayFromWall OBJECT_FIELD_S32(0x1E) + +/* Sound Effect */ +#define /*0x0F4*/ oSoundEffectUnkF4 OBJECT_FIELD_S32(0x1B) + +/* Star Spawn */ +#define /*0x0F4*/ oStarSpawnDisFromHome OBJECT_FIELD_F32(0x1B) +#define /*0x0FC*/ oStarSpawnUnkFC OBJECT_FIELD_F32(0x1D) + +/* Hidden Star */ +// Secrets/Red Coins +#define /*0x0F4*/ oHiddenStarTriggerCounter OBJECT_FIELD_S32(0x1B) + +// Overall very difficult to determine usage, mostly stubbed code. +/* Sparkle Spawn Star */ +#define /*0x1B0*/ oSparkleSpawnUnk1B0 OBJECT_FIELD_S32(0x4A) + +/* Sealed Door Star */ +#define /*0x108*/ oUnlockDoorStarState OBJECT_FIELD_U32(0x20) +#define /*0x10C*/ oUnlockDoorStarTimer OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oUnlockDoorStarYawVel OBJECT_FIELD_S32(0x22) + +/* Celebration Star */ +#define /*0x0F4*/ oCelebStarUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x108*/ oCelebStarDiameterOfRotation OBJECT_FIELD_S32(0x20) + +/* Star Selector */ +#define /*0x0F4*/ oStarSelectorType OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oStarSelectorTimer OBJECT_FIELD_S32(0x1C) +#define /*0x108*/ oStarSelectorSize OBJECT_FIELD_F32(0x20) + +/* Sushi Shark */ +#define /*0x0F4*/ oSushiSharkUnkF4 OBJECT_FIELD_S32(0x1B) // angle? + +/* Swing Platform */ +#define /*0x0F4*/ oSwingPlatformAngle OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oSwingPlatformSpeed OBJECT_FIELD_F32(0x1C) + +/* Swoop */ +#define /*0x0F4*/ oSwoopBonkCountdown OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oSwoopTargetPitch OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oSwoopTargetYaw OBJECT_FIELD_S32(0x1D) + +/* Thwomp */ +#define /*0x0F4*/ oThwompUnkF4 OBJECT_FIELD_S32(0x1B) + +/* Tilting Platform */ +#define /*0x0F4*/ oTiltingPlatformUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oTiltingPlatformUnkF8 OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oTiltingPlatformUnkFC OBJECT_FIELD_F32(0x1D) +#define /*0x10C*/ oTiltingPlatformUnk10C OBJECT_FIELD_S32(0x21) + +/* Toad Message */ +#define /*0x108*/ oToadMessageDialogNum OBJECT_FIELD_U32(0x20) +#define /*0x10C*/ oToadMessageRecentlyTalked OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oToadMessageState OBJECT_FIELD_S32(0x22) + +/* Tox Box */ +#define /*0x1AC*/ oToxBoxUnk1AC OBJECT_FIELD_VPTR(0x49) +#define /*0x1B0*/ oToxBoxUnk1B0 OBJECT_FIELD_S32(0x4A) + +/* TTC Rotating Solid */ +#define /*0x0F4*/ oTTCRotatingSolidNumTurns OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oTTCRotatingSolidNumSides OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oTTCRotatingSolidRotationDelay OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oTTCRotatingSolidVelY OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oTTCRotatingSolidSoundTimer OBJECT_FIELD_S32(0x1F) + +/* TTC Pendulum */ +#define /*0x0F4*/ oTTCPendulumAccelDir OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oTTCPendulumAngle OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oTTCPendulumAngleVel OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oTTCPendulumAngleAccel OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oTTCPendulumDelay OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oTTCPendulumSoundTimer OBJECT_FIELD_S32(0x20) + +/* TTC Treadmill */ +#define /*0x0F4*/ oTTCTreadmillBigSurface OBJECT_FIELD_S16P(0x1B) +#define /*0x0F8*/ oTTCTreadmillSmallSurface OBJECT_FIELD_S16P(0x1C) +#define /*0x0FC*/ oTTCTreadmillSpeed OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oTTCTreadmillTargetSpeed OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oTTCTreadmillTimeUntilSwitch OBJECT_FIELD_S32(0x1F) + +/* TTC Moving Bar */ +#define /*0x0F4*/ oTTCMovingBarDelay OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oTTCMovingBarStoppedTimer OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oTTCMovingBarOffset OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oTTCMovingBarSpeed OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oTTCMovingBarStartOffset OBJECT_FIELD_F32(0x1F) + +/* TTC Cog */ +#define /*0x0F4*/ oTTCCogDir OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oTTCCogSpeed OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oTTCCogTargetVel OBJECT_FIELD_F32(0x1D) + +/* TTC Pit Block */ +#define /*0x0F4*/ oTTCPitBlockPeakY OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oTTCPitBlockDir OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oTTCPitBlockWaitTime OBJECT_FIELD_S32(0x1D) + +/* TTC Elevator */ +#define /*0x0F4*/ oTTCElevatorDir OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oTTCElevatorPeakY OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oTTCElevatorMoveTime OBJECT_FIELD_S32(0x1D) + +/* TTC 2D Rotator */ +#define /*0x0F4*/ oTTC2DRotatorMinTimeUntilNextTurn OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oTTC2DRotatorTargetYaw OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oTTC2DRotatorIncrement OBJECT_FIELD_S32(0x1D) +#define /*0x104*/ oTTC2DRotatorRandomDirTimer OBJECT_FIELD_S32(0x1F) +#define /*0x108*/ oTTC2DRotatorSpeed OBJECT_FIELD_S32(0x20) + +/* TTC Spinner */ +#define /*0x0F4*/ oTTCSpinnerDir OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oTTCChangeDirTimer OBJECT_FIELD_S32(0x1C) + +/* Beta Trampoline */ +#define /*0x110*/ oBetaTrampolineMarioOnTrampoline OBJECT_FIELD_S32(0x22) + +/* Treasure Chest */ #define /*0x0F4*/ oTreasureChestUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oTreasureChestUnkF8 OBJECT_FIELD_S32(0x1C) #define /*0x0FC*/ oTreasureChestUnkFC OBJECT_FIELD_S32(0x1D) -/* Mips */ -#define /*0x0F4*/ oMipsStarStatus OBJECT_FIELD_S32(0x1B) -#define /*0x0F8*/ oMipsStartWaypointIndex OBJECT_FIELD_S32(0x1C) -#define /*0x1AC*/ oMipsForwardVelocity OBJECT_FIELD_F32(0x49) +/* Tree Snow Or Leaf */ +#define /*0x0F4*/ oTreeSnowOrLeafUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oTreeSnowOrLeafUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oTreeSnowOrLeafUnkFC OBJECT_FIELD_S32(0x1D) + +/* Tumbling Bridge */ +#define /*0x0F4*/ oTumblingBridgeUnkF4 OBJECT_FIELD_S32(0x1B) + +/* Tweester */ +#define /*0x0F4*/ oTweesterUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oTweesterUnkF8 OBJECT_FIELD_S32(0x1C) + +/* Ukiki */ +#define /*0x0F4*/ oUkikiTauntCounter OBJECT_FIELD_S16(0x1B, 0) +#define /*0x0F6*/ oUkikiTauntsToBeDone OBJECT_FIELD_S16(0x1B, 1) +// 0x1D-0x21 reserved for pathing +#define /*0x110*/ oUkikiChaseFleeRange OBJECT_FIELD_F32(0x22) +#define /*0x1AC*/ oUkikiTextState OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oUkikiTextboxTimer OBJECT_FIELD_S16(0x49, 1) +#define /*0x1B0*/ oUkikiCageSpinTimer OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oUkikiHasHat OBJECT_FIELD_S16(0x4A, 1) + +/* Ukiki Cage*/ +#define /*0x088*/ oUkikiCageNextAction OBJECT_FIELD_S32(0x00) + +/* Unagi */ +#define /*0x0F4*/ oUnagiUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oUnagiUnkF8 OBJECT_FIELD_F32(0x1C) +// 0x1D-0x21 reserved for pathing +#define /*0x110*/ oUnagiUnk110 OBJECT_FIELD_F32(0x22) +#define /*0x1AC*/ oUnagiUnk1AC OBJECT_FIELD_F32(0x49) +#define /*0x1B0*/ oUnagiUnk1B0 OBJECT_FIELD_S16(0x4A, 0) +#define /*0x1B2*/ oUnagiUnk1B2 OBJECT_FIELD_S16(0x4A, + 1) + +/* Water Bomb */ +#define /*0x0F8*/ oWaterBombVerticalStretch OBJECT_FIELD_F32(0x1C) +#define /*0x0FC*/ oWaterBombStretchSpeed OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oWaterBombOnGround OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oWaterBombNumBounces OBJECT_FIELD_F32(0x1F) + +/* Water Bomb Spawner */ +#define /*0x0F4*/ oWaterBombSpawnerBombActive OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oWaterBombSpawnerTimeToSpawn OBJECT_FIELD_S32(0x1C) + +/* Water Bomb Cannon */ +#define /*0x0F4*/ oWaterCannonUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oWaterCannonUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oWaterCannonUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oWaterCannonUnk100 OBJECT_FIELD_S32(0x1E) + +/* Cannon Barrel Bubbles */ +#define /*0x0F4*/ oCannonBarrelBubblesUnkF4 OBJECT_FIELD_F32(0x1B) + +/* Water Level Pillar */ +#define /*0x0F8*/ oWaterLevelPillarUnkF8 OBJECT_FIELD_S32(0x1C) + +/* Water Level Trigger */ +#define /*0x0F4*/ oWaterLevelTriggerUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oWaterLevelTriggerTargetWaterLevel OBJECT_FIELD_S32(0x1C) + +/* Water Objects */ +#define /*0x0F4*/ oWaterObjUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oWaterObjUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oWaterObjUnkFC OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oWaterObjUnk100 OBJECT_FIELD_S32(0x1E) + +/* Water Ring (both variants) */ +#define /*0x0F4*/ oWaterRingScalePhaseX OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oWaterRingScalePhaseY OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oWaterRingScalePhaseZ OBJECT_FIELD_S32(0x1D) +#define /*0x100*/ oWaterRingNormalX OBJECT_FIELD_F32(0x1E) +#define /*0x104*/ oWaterRingNormalY OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oWaterRingNormalZ OBJECT_FIELD_F32(0x20) +#define /*0x10C*/ oWaterRingMarioDistInFront OBJECT_FIELD_F32(0x21) +#define /*0x110*/ oWaterRingIndex OBJECT_FIELD_S32(0x22) +#define /*0x1AC*/ oWaterRingAvgScale OBJECT_FIELD_F32(0x49) + +/* Water Ring Spawner (Jet Stream Ring Spawner and Manta Ray) */ +#define /*0x1AC*/ oWaterRingSpawnerRingsCollected OBJECT_FIELD_S32(0x49) + +/* Water Ring Manager (Jet Stream Ring Spawner and Manta Ray Ring Manager) */ +#define /*0x0F4*/ oWaterRingMgrNextRingIndex OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oWaterRingMgrLastRingCollected OBJECT_FIELD_S32(0x1C) + +/* Wave Trail */ +#define /*0x0F8*/ oWaveTrailUnkF8 OBJECT_FIELD_F32(0x1C) + +/* Whirlpool */ +#define /*0x0F4*/ oWhirlpoolInitFacePitch OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oWhirlpoolInitFaceRoll OBJECT_FIELD_S32(0x1C) + +/* White Puff Explode */ +#define /*0x0F4*/ oWhitePuffUnkF4 OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oWhitePuffUnkF8 OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oWhitePuffUnkFC OBJECT_FIELD_S32(0x1D) + +/* White Wind Particle */ +#define /*0x0F4*/ oWhiteWindParticleUnkF4 OBJECT_FIELD_OBJ(0x1B) + +/* Whomp */ +#define /*0x0F8*/ oWhompUnkF8 OBJECT_FIELD_S32(0x1C) + +/* Wiggler */ +#define /*0x0F4*/ oWigglerFallThroughFloorsHeight OBJECT_FIELD_F32(0x1B) +#define /*0x0F8*/ oWigglerSegments OBJECT_FIELD_CHAIN_SEGMENT(0x1C) +#define /*0x0FC*/ oWigglerWalkAnimSpeed OBJECT_FIELD_F32(0x1D) +#define /*0x104*/ oWigglerSquishSpeed OBJECT_FIELD_F32(0x1F) +#define /*0x108*/ oWigglerTimeUntilRandomTurn OBJECT_FIELD_S32(0x20) +#define /*0x10C*/ oWigglerTargetYaw OBJECT_FIELD_S32(0x21) +#define /*0x110*/ oWigglerWalkAwayFromWallTimer OBJECT_FIELD_S32(0x22) +#define /*0x1AC*/ oWigglerUnk1AC OBJECT_FIELD_S16(0x49, 0) +#define /*0x1AE*/ oWigglerTextStatus OBJECT_FIELD_S16(0x49, + 1) + +/* Lll Wood Piece */ +#define /*0x0F4*/ oLllWoodPieceUnkF4 OBJECT_FIELD_S32(0x1B) + +/* Wooden Post */ +#define /*0x0F4*/ oWoodenPostTotalMarioAngle OBJECT_FIELD_S32(0x1B) +#define /*0x0F8*/ oWoodenPostPrevAngleToMario OBJECT_FIELD_S32(0x1C) +#define /*0x0FC*/ oWoodenPostSpeedY OBJECT_FIELD_F32(0x1D) +#define /*0x100*/ oWoodenPostMarioPounding OBJECT_FIELD_S32(0x1E) +#define /*0x104*/ oWoodenPostOffsetY OBJECT_FIELD_F32(0x1F) /* Yoshi */ -#define /*0x0F4*/ oYoshiUnkF4 OBJECT_FIELD_S32(0x1B) +#define /*0x0F4*/ oYoshiUnkF4 OBJECT_FIELD_S32(0x1B) #define /*0x0FC*/ oYoshiChosenHome OBJECT_FIELD_S32(0x1D) -#define /*0x100*/ oYoshiTargetYaw OBJECT_FIELD_S32(0x1E) - -/* End birds */ -#define /*0x104*/ oEndBirdUnk104 OBJECT_FIELD_F32(0x1F) - -/* Intro cutscene lakitu */ -#define /*0x0F8*/ oIntroLakituUnkF8 OBJECT_FIELD_F32(0x1C) -#define /*0x0FC*/ oIntroLakituUnkFC OBJECT_FIELD_F32(0x1D) -#define /*0x100*/ oIntroLakituUnk100 OBJECT_FIELD_F32(0x1E) -#define /*0x104*/ oIntroLakituUnk104 OBJECT_FIELD_F32(0x1F) -#define /*0x108*/ oIntroLakituUnk108 OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oIntroLakituUnk10C OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oIntroLakituUnk110 OBJECT_FIELD_F32(0x22) - -/* Intro cutscene Peach */ -#define /*0x108*/ oIntroPeachUnk108 OBJECT_FIELD_F32(0x20) -#define /*0x10C*/ oIntroPeachUnk10C OBJECT_FIELD_F32(0x21) -#define /*0x110*/ oIntroPeachUnk110 OBJECT_FIELD_F32(0x22) +#define /*0x100*/ oYoshiTargetYaw OBJECT_FIELD_S32(0x1E) #endif diff --git a/include/sm64.h b/include/sm64.h index d39f3f3..54524b9 100644 --- a/include/sm64.h +++ b/include/sm64.h @@ -122,8 +122,8 @@ #define MARIO_TELEPORTING 0x00000080 #define MARIO_UNKNOWN_08 0x00000100 #define MARIO_UNKNOWN_13 0x00002000 -#define MARIO_ENVIRONMENT_NOISE_PLAYED 0x00010000 -#define MARIO_ACTION_NOISE_PLAYED 0x00020000 +#define MARIO_ACTION_SOUND_PLAYED 0x00010000 +#define MARIO_MARIO_SOUND_PLAYED 0x00020000 #define MARIO_UNKNOWN_18 0x00040000 #define MARIO_PUNCHING 0x00100000 #define MARIO_KICKING 0x00200000 @@ -415,11 +415,6 @@ #define ACT_HOLDING_BOWSER 0x00000391 // (0x191 | ACT_FLAG_STATIONARY) #define ACT_RELEASING_BOWSER 0x00000392 // (0x192 | ACT_FLAG_STATIONARY) -// convert a virtual address to physical. -#define VIRTUAL_TO_PHYSICAL(addr) ((u32)(addr) & 0x1FFFFFFF) -// convert a physical address to virtual. -#define PHYSICAL_TO_VIRTUAL(addr) ((u32)(addr) | 0x80000000) - /* this input mask is unused by the controller, but END_DEMO is used internally to signal diff --git a/include/text_menu_strings.h.in b/include/text_menu_strings.h.in new file mode 100644 index 0000000..7015a8e --- /dev/null +++ b/include/text_menu_strings.h.in @@ -0,0 +1,18 @@ +#ifndef TEXT_MENU_STRINGS_H +#define TEXT_MENU_STRINGS_H + +// These strings use a different table defined in menu_hud_lut +// Unlike text_strings.h.in, the charmap is different and +// uses char values from charmap_menu.txt + +/** + * File Select JP HUD Text + */ +#define TEXT_JPHUD_MARIO _("マリオ") +#define TEXT_JPHUD_SELECT_FILE _("ファイルセレクト") +#define TEXT_JPHUD_CHECK_FILE _("どのスコアをみる?") +#define TEXT_JPHUD_COPY_FILE _("ファイルコピーする") +#define TEXT_JPHUD_ERASE_FILE _("ファイルけす") +#define TEXT_JPHUD_SOUND_SELECT _("サウンドセレクト") + +#endif diff --git a/include/text_strings.h.in b/include/text_strings.h.in index b525fac..6a5e9a2 100644 --- a/include/text_strings.h.in +++ b/include/text_strings.h.in @@ -1,115 +1,280 @@ -#ifndef _TEXT_STRINGS_H_ -#define _TEXT_STRINGS_H_ +#ifndef TEXT_STRINGS_H +#define TEXT_STRINGS_H -// star select screen -#define TEXT_0 _("0") +#include "text_menu_strings.h" -#define TEXT_COIN_X _("$[x]") -#define TEXT_STAR_X _("*[x]") - -// common +/** + * Global Symbols + */ +#define TEXT_ZERO _("0") #define TEXT_COIN _("$") -#define TEXT_STAR _("*") -#define TEXT_VARIABLE_X _("[x]") -#define TEXT_UNFILLED_STAR _("#") -#define TEXT_NEW _("NEW") +#define TEXT_STAR _("★") +#define TEXT_COIN_X _("$×") +#define TEXT_STAR_X _("★×") +#define TEXT_VARIABLE_X _("×") +#define TEXT_UNFILLED_STAR _("☆") + +/** + * Global Text + */ +// File Select +#define TEXT_NEW _("NEW") // New File Text +#define TEXT_4DASHES _("----") // Used in Score File Menu + +// Ingame Menu +#define TEXT_PAUSE _("PAUSE") // Pause text, Castle Courses +#define TEXT_HUD_CONGRATULATIONS _("CONGRATULATIONS") // Course Complete Text, Bowser Courses #ifdef VERSION_JP -#define TEXT_COURSE _("コ-ス") + +/** + * File Select Text + */ +// Main Screens +// JPHUD menu strings are defined in "text_menu_strings.h.in" +#define TEXT_MARIO TEXT_JPHUD_MARIO // View Score Menu +#define TEXT_SELECT_FILE TEXT_JPHUD_SELECT_FILE +#define TEXT_CHECK_FILE TEXT_JPHUD_CHECK_FILE +#define TEXT_COPY_FILE TEXT_JPHUD_COPY_FILE +#define TEXT_ERASE_FILE TEXT_JPHUD_ERASE_FILE +#define TEXT_SOUND_SELECT TEXT_JPHUD_SOUND_SELECT + +#define TEXT_FILE_MARIO_A _("マリオA") +#define TEXT_FILE_MARIO_B _("マリオB") +#define TEXT_FILE_MARIO_C _("マリオC") +#define TEXT_FILE_MARIO_D _("マリオD") + +// Menu Options +#define TEXT_SCORE _("スコア") +#define TEXT_COPY _("コピ-") +#define TEXT_ERASE _("けす") + +// Sound Options +#define TEXT_STEREO _("ステレオ") +#define TEXT_MONO _("モノラル") +#define TEXT_HEADSET _("ヘッドホン") + +// Misc Menu Text +#define TEXT_SAVED_DATA_EXISTS _("ファイルにデ-タがはいってます") +#define TEXT_NO_SAVED_DATA_EXISTS _("ファイルにデ-タがありません") + +// Inside a Menu +#define TEXT_RETURN _("もどる") +#define TEXT_CHECK_SCORE _("スコアをみる") +#define TEXT_COPY_FILE_BUTTON _("ファイルコピ-") +#define TEXT_ERASE_FILE_BUTTON _("ファイルけす") + +// Score Menu +#define TEXT_HI_SCORE _("ハイスコア") #define TEXT_MY_SCORE _("マイスコア") +#define TEXT_SCORE_MARIO_A _("マリオA") +#define TEXT_SCORE_MARIO_B _("マリオB") +#define TEXT_SCORE_MARIO_C _("マリオC") +#define TEXT_SCORE_MARIO_D _("マリオD") + +// Copy Menu +#define TEXT_COPY_IT_TO_WHERE _("どこにコピ-しますか?") +#define TEXT_COPYING_COMPLETED _("コピ-おわりました") +#define TEXT_NO_FILE_TO_COPY_FROM _("からのファイルがありません") + +// Erase Menu +#define TEXT_SURE _("ほんと?") +#define TEXT_YES _("はい") +#define TEXT_NO _("いいえ") +#define TEXT_FILE_MARIO_A_JUST_ERASED _("マリオAをけしました") + +/** + * Menus Text (Pause, Course Completed) + */ +// Main Courses +#define TEXT_COURSE _("コ-ス") +#define TEXT_MYSCORE _("マイスコア") +#define TEXT_CONTINUE _("つづけて マリオする?") +#define TEXT_EXIT_COURSE _("コ-スからでる?") +#define TEXT_CAMERA_ANGLE_R _("Rボタンのカメラきりかえ") + +// Camera Options #define TEXT_LAKITU_MARIO _("ジュゲム+マリオ") #define TEXT_LAKITU_STOP _("ジュゲム+ストップ") #define TEXT_NORMAL_UPCLOSE _("(おすすめ)(リアル)") #define TEXT_NORMAL_FIXED _("(おすすめ)(とまる)") -#define TEXT_CONTINUE _("つづけて マリオする?") -#define TEXT_EXIT_COURSE _("コ-スからでる?") -#define TEXT_CAMERA_ANGLE_R _("Rボタンのカメラきりかえ") + +// Course Completed Misc Text +#define TEXT_CATCH _("キャッチ!") +#define TEXT_CLEAR _("クリア!") +#define TEXT_HUD_HI_SCORE _("HISCORE") + +// Save Options #define TEXT_SAVE_AND_CONTINUE _("セ-ブしてつづける?") #define TEXT_SAVE_AND_QUIT _("セ-ブしておわる?") #define TEXT_CONTINUE_WITHOUT_SAVING _("セ-ブしないでつづける?") -// ending cutscene subtitles + +/** + * Ending Peach cutscene text. + */ #define TEXT_FILE_MARIO_EXCLAMATION _("マリオ!!") #define TEXT_POWER_STARS_RESTORED _("おしろにスタ-が もどったのね") #define TEXT_THANKS_TO_YOU _("みんな あなたのおかげだわ!") #define TEXT_THANK_YOU_MARIO _("ありがとう マリオ") #define TEXT_SOMETHING_SPECIAL _("なにか おれいをしなくちゃ・・") -#define TEXT_COME_ON_EVERYBODY _("さあ みんな") +#define TEXT_LISTEN_EVERYBODY _("さあ みんな") #define TEXT_LETS_HAVE_CAKE _("おいしいケ-キを やきましょう") #define TEXT_FOR_MARIO _("マリオの ために・・・") #define TEXT_FILE_MARIO_QUESTION _("マリオ?") -#define TEXT_SURE _("ほんと?") -#define TEXT_NO_SAVED_DATA_EXISTS _("ファイルにデ-タがありません") -#define TEXT_FILE_MARIO_A_JUST_ERASED _("マリオAをけしました") -#define TEXT_SAVED_DATA_EXISTS _("ファイルにデ-タがはいってます") -// file select -#define TEXT_RETURN _("もどる") -#define TEXT_CHECK_SCORE _("スコアをみる") -#define TEXT_HI_SCORE _("ハイスコア") -#define TEXT_MY_SCORE _("マイスコア") -#define TEXT_COPY_FILE_BUTTON _("ファイルコピ-") -#define TEXT_ERASE_FILE_BUTTON _("ファイルけす") -#define TEXT_STEREO _("ステレオ") -#define TEXT_MONO _("モノラル") -#define TEXT_HEADSET _("ヘッドホン") -#define TEXT_FILE_MARIO_A _("マリオA") -#define TEXT_FILE_MARIO_B _("マリオB") -#define TEXT_FILE_MARIO_C _("マリオC") -#define TEXT_FILE_MARIO_D _("マリオD") -#define TEXT_SCORE_MARIO_A _("マリオA") -#define TEXT_SCORE_MARIO_B _("マリオB") -#define TEXT_SCORE_MARIO_C _("マリオC") -#define TEXT_SCORE_MARIO_D _("マリオD") -#define TEXT_SCORE _("スコア") -#define TEXT_COPY _("コピ-") -#define TEXT_ERASE _("けす") -#define TEXT_COPY_IT_TO_WHERE _("どこにコピ-しますか?") -#define TEXT_COPYING_COMPLETED _("コピ-おわりました") -#define TEXT_NO_FILE_TO_COPY_FROM _("からのファイルがありません") -#define TEXT_YES _("はい") -#define TEXT_NO _("いいえ") -#define TEXT_4DASHES _("----") -#define TEXT_HI_SCORE_EN _("HISCORE") -#define TEXT_CLEAR _("クリア!") -#define TEXT_CATCH _("キャッチ!") -// todo: handle these strings -#define TEXT_MARIO 0x0F, 0x10, 0x11, 0xFF -#define TEXT_SELECT_FILE 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0xff -#define TEXT_CHECK_FILE 0x15, 0x16, 0x12, 0x09, 0x13, 0x08, 0x14, 0x0d, 0x17, 0xff -#define TEXT_COPY_FILE 0x00, 0x01, 0x02, 0x03, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0xff -#define TEXT_ERASE_FILE 0x00, 0x01, 0x02, 0x03, 0x0E, 0x0C, 0xFF -#define TEXT_SOUND_SELECT 0x18, 0x19, 0x1A, 0x1B, 0x04, 0x05, 0x06, 0x07, 0xFF +#endif + +#if defined(VERSION_US) || defined(VERSION_EU) + +/** + * File Select Text + */ +// Main Screens +#define TEXT_MARIO _("MARIO") // View Score Menu +#define TEXT_SELECT_FILE _("SELECT FILE") +#define TEXT_CHECK_FILE _("CHECK FILE") +#define TEXT_COPY_FILE _("COPY FILE") +#define TEXT_ERASE_FILE _("ERASE FILE") +#define TEXT_SOUND_SELECT _("SOUND SELECT") +#define TEXT_FILE_MARIO_A _("MARIO A") +#define TEXT_FILE_MARIO_B _("MARIO B") +#define TEXT_FILE_MARIO_C _("MARIO C") +#define TEXT_FILE_MARIO_D _("MARIO D") + +// Menu Options +#define TEXT_SCORE _("SCORE") +#define TEXT_COPY _("COPY") +#define TEXT_ERASE _("ERASE") + +// Sound Options +#define TEXT_STEREO _("STEREO") +#define TEXT_MONO _("MONO") +#define TEXT_HEADSET _("HEADSET") + +// Misc Menu Text +#define TEXT_SAVED_DATA_EXISTS _("SAVED DATA EXITS") // Misspell +#define TEXT_NO_SAVED_DATA_EXISTS _("NO SAVED DATA EXISTS") + +// Inside a Menu +#define TEXT_RETURN _("RETURN") +#define TEXT_CHECK_SCORE _("CHECK SCORE") +#define TEXT_COPY_FILE_BUTTON _("COPY FILE") +#define TEXT_ERASE_FILE_BUTTON _("ERASE FILE") + +// Score Menu +#define TEXT_HI_SCORE _("HI SCORE") +#define TEXT_MY_SCORE _("MY SCORE") +// Score Mario Text ("☺" is the Mario face defined in the US/EU menu char table) +#define TEXT_SCORE_MARIO_A _("☺A") +#define TEXT_SCORE_MARIO_B _("☺B") +#define TEXT_SCORE_MARIO_C _("☺C") +#define TEXT_SCORE_MARIO_D _("☺D") + +// Copy Menu +#define TEXT_COPY_IT_TO_WHERE _("COPY IT TO WHERE?") +#define TEXT_COPYING_COMPLETED _("COPYING COMPLETED") +#define TEXT_NO_FILE_TO_COPY_FROM _("NO EMPTY FILE") + +// Erase Menu +#define TEXT_SURE _("SURE?") +#define TEXT_YES _("YES") +#define TEXT_NO _("NO") +#define TEXT_FILE_MARIO_A_JUST_ERASED _("MARIO A JUST ERASED") + +/** + * Menus Text (Pause, Course Completed) + */ +// Main Courses +#define TEXT_COURSE _("COURSE") +#define TEXT_MYSCORE _("MYSCORE") +#define TEXT_CONTINUE _("CONTINUE") +#define TEXT_EXIT_COURSE _("EXIT COURSE") +#ifndef VERSION_EU // "R" text is different in EU +#define TEXT_CAMERA_ANGLE_R _("SET CAMERA ANGLE WITH R") +#endif + +// Camera Options +#define TEXT_LAKITU_MARIO _("LAKITU + MARIO") +#define TEXT_LAKITU_STOP _("LAKITU + STOP") +#define TEXT_NORMAL_UPCLOSE __("(NORMAL)(UP-CLOSE)") +#define TEXT_NORMAL_FIXED __("(NORMAL)(FIXED)") + +// Course Completed Misc Text +#define TEXT_CATCH _("CATCH") +#define TEXT_CLEAR _("CLEAR") +#define TEXT_HUD_HI_SCORE _("HI SCORE") + +// Save Options +#define TEXT_SAVE_AND_CONTINUE _("SAVE & CONTINUE") +#define TEXT_SAVE_AND_QUIT _("SAVE & QUIT") +#define TEXT_CONTINUE_WITHOUT_SAVING _("CONTINUE, DON'T SAVE") + +/** + * Ending Peach cutscene text. + */ +#define TEXT_FILE_MARIO_EXCLAMATION _("Mario!") +#define TEXT_POWER_STARS_RESTORED __("The power of the Stars is restored to the castle...") +#define TEXT_THANKS_TO_YOU __("...and it's all thanks to you!") +#define TEXT_THANK_YOU_MARIO __("Thank you, Mario!") +#define TEXT_SOMETHING_SPECIAL __("We have to do something special for you...") +#define TEXT_LISTEN_EVERYBODY _("Listen, everybody,") +#define TEXT_LETS_HAVE_CAKE _("let's bake a delicious cake...") +#define TEXT_FOR_MARIO _("...for Mario...") +#define TEXT_FILE_MARIO_QUESTION _("Mario!") + +#endif -#else #ifdef VERSION_EU -#define TEXT_CAMERA_ANGLE_R_EN _("SET CAMERA ANGLE WITH [R]") -#define TEXT_MY_SCORE_FR _("MON SCORE") +/** + * Menus Text (Pause, Course Completed) + */ +// Main Courses +// English, "R" text is different +#define TEXT_CAMERA_ANGLE_R _("SET CAMERA ANGLE WITH [R]") +// French #define TEXT_COURSE_FR _("NIVEAU") -#define TEXT_NORMAL_UPCLOSE_FR _("(NORMAL}{GROS-PLAN)") -#define TEXT_NORMAL_FIXED_FR _("(NORMAL}{FIXE)") +#define TEXT_MY_SCORE_FR _("MON SCORE") #define TEXT_CONTINUE_FR _("CONTINUER") #define TEXT_EXIT_COURSE_FR _("QUITTER NIVEAU") #define TEXT_CAMERA_ANGLE_R_FR _("RÉGLAGE CAMÉRA AVEC [R]") -#define TEXT_HI_SCORE_FR _("MEILLEUR SCORE") -#define TEXT_CONGRATULATIONS_FR _("FELICITATIONS") -#define TEXT_SAVE_AND_CONTINUE_FR _("SAUVEGARDER & CONTINUER") -#define TEXT_SAVE_AND_QUIT_FR _("SAUVEGARDER & QUITTER") -#define TEXT_CONTINUE_WITHOUT_SAVING_FR _("CONTINUER SANS SAUVEGARDER") - -#define TEXT_MY_SCORE_DE _("LEISTUNG") +// German #define TEXT_COURSE_DE _("KURS") -#define TEXT_NORMAL_UPCLOSE_DE _("(NORMAL}{WEIT-ZOOM)") -#define TEXT_NORMAL_FIXED_DE _("(NORMAL}{STATIV)") +#define TEXT_MY_SCORE_DE _("LEISTUNG") #define TEXT_CONTINUE_DE _("WEITER") #define TEXT_EXIT_COURSE_DE _("KURS VERLASSEN") #define TEXT_CAMERA_ANGLE_R_DE _("KAMERA MIT [R] VERSTELLEN") -#define TEXT_HI_SCORE_DE _("BESTLEISTUNG") -#define TEXT_CONGRATULATIONS_DE _("GRATULATION") + +// Camera Options +// French +#define TEXT_NORMAL_UPCLOSE_FR __("(NORMAL)(GROS-PLAN)") +#define TEXT_NORMAL_FIXED_FR __("(NORMAL)(FIXE)") +// German +#define TEXT_NORMAL_UPCLOSE_DE __("(NORMAL)(WEIT-ZOOM)") +#define TEXT_NORMAL_FIXED_DE __("(NORMAL)(STATIV)") + +// Course Completed Misc Text +// French +#define TEXT_HUD_HI_SCORE_FR _("MEILLEUR SCORE") +#define TEXT_HUD_CONGRATULATIONS_FR _("FELICITATIONS") +// German +#define TEXT_HUD_HI_SCORE_DE _("BESTLEISTUNG") +#define TEXT_HUD_CONGRATULATIONS_DE _("GRATULATION") + +// Save Options +// French +#define TEXT_SAVE_AND_CONTINUE_FR _("SAUVEGARDER & CONTINUER") +#define TEXT_SAVE_AND_QUIT_FR _("SAUVEGARDER & QUITTER") +#define TEXT_CONTINUE_WITHOUT_SAVING_FR _("CONTINUER SANS SAUVEGARDER") +// German #define TEXT_SAVE_AND_CONTINUE_DE _("SPEICHERN & WEITER") #define TEXT_SAVE_AND_QUIT_DE _("SPEICHERN & ENDE") #define TEXT_CONTINUE_WITHOUT_SAVING_DE _("WEITER OHNE ZU SPEICHERN") +/** + * Ending Peach cutscene text. + */ +// French #define TEXT_POWER_STARS_RESTORED_FR _("Grâce aux étoiles, le château a retrouvé ses pouvoirs...") #define TEXT_THANKS_TO_YOU_FR _("...et ceci grâce à toi!") #define TEXT_THANK_YOU_MARIO_FR _("Merci, Mario!") @@ -117,7 +282,7 @@ #define TEXT_COME_ON_EVERYBODY_FR _("Venez les amis...") #define TEXT_LETS_HAVE_CAKE_FR _("Allons préparer un délicieux gâteau...") #define TEXT_FOR_MARIO_FR _("...pour Mario...") - +// German #define TEXT_POWER_STARS_RESTORED_DE _("Die Macht der Sterne ruht wieder sicher im Schloss...") #define TEXT_THANKS_TO_YOU_DE _("...und alles dank Deiner Hilfe!") #define TEXT_THANK_YOU_MARIO_DE _("Vielen Dank, Mario!") @@ -125,80 +290,7 @@ #define TEXT_COME_ON_EVERYBODY_DE _("Hört alle her...") #define TEXT_LETS_HAVE_CAKE_DE _("Laßt uns einen leckeren Kuchen backen...") #define TEXT_FOR_MARIO_DE _("...für Mario...") -#endif - -#define TEXT_COURSE _("COURSE") -#define TEXT_MY_SCORE _("MY SCORE") -#define TEXT_LAKITU_MARIO _("LAKITU + MARIO") -#define TEXT_LAKITU_STOP _("LAKITU + STOP") -#define TEXT_NORMAL_UPCLOSE _("(NORMAL}{UP-CLOSE)") -#define TEXT_NORMAL_FIXED _("(NORMAL}{FIXED)") -#define TEXT_CONTINUE _("CONTINUE") -#define TEXT_EXIT_COURSE _("EXIT COURSE") -#define TEXT_CAMERA_ANGLE_R _("SET CAMERA ANGLE WITH R") -#define TEXT_SAVE_AND_CONTINUE _("SAVE & CONTINUE") -#define TEXT_SAVE_AND_QUIT _("SAVE & QUIT") -#define TEXT_CONTINUE_WITHOUT_SAVING _("CONTINUE, DON'T SAVE") -#define TEXT_HI_SCORE_EN _("HI SCORE") -// ending cutscene subtitles -// TODO: Handle the following uncompressed strings -// #define TEXT_POWER_STARS_RESTORED __("The power of the Stars is restored to the castle...") -// #define TEXT_THANKS_TO_YOU __("...and it's all thanks to you!") -// #define TEXT_THANK_YOU_MARIO __("Thank you, Mario!") -// #define TEXT_SOMETHING_SPECIAL __("We have to do something special for you...") -#define TEXT_FILE_MARIO_EXCLAMATION _("Mario!") -#define TEXT_POWER_STARS_RESTORED 0x1D, 0x2B, 0x28, 0x9E, 0x33, 0x32, 0x3A, 0x28, 0x35, 0x9E, 0x32, 0x29, 0x9E, 0x37, 0x2B, 0x28, 0x9E, 0x1C, 0x37, 0x24, 0x35, 0x36, 0x9E, 0x2C, 0x36, 0x9E, 0x35, 0x28, 0x36, 0x37, 0x32, 0x35, 0x28, 0x27, 0x9E, 0x37, 0x32, 0x9E, 0x37, 0x2B, 0x28, 0x9E, 0x26, 0x24, 0x36, 0x37, 0x2F, 0x28, 0x3F, 0x3F, 0x3F, 0xFF -#define TEXT_THANKS_TO_YOU 0x3F, 0x3F, 0x3F, 0x24, 0x31, 0x27, 0x9E, 0x2C, 0x37, 0x3E, 0x36, 0x9E, 0x24, 0x2F, 0x2F, 0x9E, 0x37, 0x2B, 0x24, 0x31, 0x2E, 0x36, 0x9E, 0x37, 0x32, 0x9E, 0x3C, 0x32, 0x38, 0xF2, 0xFF -#define TEXT_THANK_YOU_MARIO 0x1D, 0x2B, 0x24, 0x31, 0x2E, 0x9E, 0x3C, 0x32, 0x38, 0x6F, 0x9E, 0x16, 0x24, 0x35, 0x2C, 0x32, 0xF2, 0xFF -#define TEXT_SOMETHING_SPECIAL 0x20, 0x28, 0x9E, 0x2B, 0x24, 0x39, 0x28, 0x9E, 0x37, 0x32, 0x9E, 0x27, 0x32, 0x9E, 0x36, 0x32, 0x30, 0x28, 0x37, 0x2B, 0x2C, 0x31, 0x2A, 0x9E, 0x36, 0x33, 0x28, 0x26, 0x2C, 0x24, 0x2F, 0x9E, 0x29, 0x32, 0x35, 0x9E, 0x3C, 0x32, 0x38, 0x3F, 0x3F, 0x3F, 0xFF -#define TEXT_COME_ON_EVERYBODY _("Listen, everybody,") -#define TEXT_LETS_HAVE_CAKE _("let's bake a delicious cake...") -#define TEXT_FOR_MARIO _("...for Mario...") -#define TEXT_FILE_MARIO_QUESTION _("Mario!") -#define TEXT_ERASE_FILE _("ERASE FILE") -#define TEXT_SURE _("SURE?") -#define TEXT_NO_SAVED_DATA_EXISTS _("NO SAVED DATA EXISTS") -#define TEXT_FILE_MARIO_A_JUST_ERASED _("MARIO A JUST ERASED") -#define TEXT_SAVED_DATA_EXISTS _("SAVED DATA EXITS") -// file select -#define TEXT_RETURN _("RETURN") -#define TEXT_CHECK_SCORE _("CHECK SCORE") -#define TEXT_MYSCORE _("MYSCORE") -#define TEXT_COPY_FILE_BUTTON _("COPY FILE") -#define TEXT_ERASE_FILE_BUTTON _("ERASE FILE") -#define TEXT_STEREO _("STEREO") -#define TEXT_MONO _("MONO") -#define TEXT_HEADSET _("HEADSET") -#define TEXT_FILE_MARIO_A _("MARIO A") -#define TEXT_FILE_MARIO_B _("MARIO B") -#define TEXT_FILE_MARIO_C _("MARIO C") -#define TEXT_FILE_MARIO_D _("MARIO D") -#define TEXT_SCORE_MARIO_A 0x40, 0x41, 0x0A, 0xFF -#define TEXT_SCORE_MARIO_B 0x40, 0x41, 0x0B, 0xFF -#define TEXT_SCORE_MARIO_C 0x40, 0x41, 0x0C, 0xFF -#define TEXT_SCORE_MARIO_D 0x40, 0x41, 0x0D, 0xFF -#define TEXT_SCORE _("SCORE") -#define TEXT_COPY _("COPY") -#define TEXT_ERASE _("ERASE") -#define TEXT_COPY_IT_TO_WHERE _("COPY IT TO WHERE?") -#define TEXT_COPYING_COMPLETED _("COPYING COMPLETED") -#define TEXT_NO_FILE_TO_COPY_FROM _("NO EMPTY FILE") -#define TEXT_YES _("YES") -#define TEXT_NO _("NO") -#define TEXT_4DASHES _("----") -#define TEXT_CLEAR _("CLEAR") -#define TEXT_CATCH _("CATCH") -#define TEXT_MARIO _("MARIO") -#define TEXT_SELECT_FILE _("SELECT FILE") -#define TEXT_CHECK_FILE _("CHECK FILE") -#define TEXT_COPY_FILE _("COPY FILE") -#define TEXT_ERASE_FILE _("ERASE FILE") -#define TEXT_SOUND_SELECT _("SOUND SELECT") -#endif - -#define TEXT_PAUSE _("PAUSE") - -// course complete menu -#define TEXT_CONGRATULATIONS _("CONGRATULATIONS") + +#endif #endif diff --git a/include/types.h b/include/types.h index b86ef3a..364e756 100644 --- a/include/types.h +++ b/include/types.h @@ -136,21 +136,19 @@ struct Object s32 asS32[0x50]; s16 asS16[0x50][2]; f32 asF32[0x50]; - void *asVoidP[0x50]; s16 *asS16P[0x50]; s32 *asS32P[0x50]; - u32 *asAnims[0x50]; + struct Animation **asAnims[0x50]; struct Waypoint *asWaypoint[0x50]; struct ChainSegment *asChainSegment[0x50]; struct Object *asObject[0x50]; struct Surface *asSurface[0x50]; void *asVoidPtr[0x50]; - struct Object *asObjPtr[0x50]; } rawData; - /*0x1C8*/ u32 unk1C8; - /*0x1CC*/ u32 *behScript; + /*0x1C8*/ u32 unused1; + /*0x1CC*/ uintptr_t *behScript; /*0x1D0*/ u32 stackIndex; - /*0x1D4*/ u32 stack[8]; + /*0x1D4*/ uintptr_t stack[8]; /*0x1F4*/ s16 unk1F4; /*0x1F6*/ s16 respawnInfoType; /*0x1F8*/ f32 hitboxRadius; @@ -159,7 +157,7 @@ struct Object /*0x204*/ f32 hurtboxHeight; /*0x208*/ f32 hitboxDownOffset; /*0x20C*/ void *behavior; - /*0x210*/ u32 unk210; + /*0x210*/ u32 unused2; /*0x214*/ struct Object *platform; /*0x218*/ void *collisionData; /*0x21C*/ Mat4 transform; @@ -218,19 +216,26 @@ struct MarioBodyState /*0x0C*/ Vec3s unkC; /*0x12*/ Vec3s unk12; /*0x18*/ Vec3f unk18; - u8 padding[4]; // what is this? + u8 padding[4]; +}; + +struct MarioAnimSub +{ + u32 offset; + u32 size; }; struct MarioAnimDmaRelatedThing { - u32 unk0; - u32 unk4; + u32 count; + u8 *srcAddr; + struct MarioAnimSub anim[1]; // dynamic size }; struct MarioAnimation { struct MarioAnimDmaRelatedThing *animDmaTable; - u32 currentDma; + u8 *currentAnimAddr; struct Animation *targetAnim; u8 padding[4]; }; @@ -243,7 +248,7 @@ struct MarioState /*0x08*/ u32 particleFlags; /*0x0C*/ u32 action; /*0x10*/ u32 prevAction; - /*0x14*/ u32 stepSound; + /*0x14*/ u32 terrainSoundAddend; /*0x18*/ u16 actionState; /*0x1A*/ u16 actionTimer; /*0x1C*/ u32 actionArg; diff --git a/levels/castle_grounds/areas/1/11/anim.s b/levels/castle_grounds/areas/1/11/anim.s index 89a7621..d3652a6 100644 --- a/levels/castle_grounds/areas/1/11/anim.s +++ b/levels/castle_grounds/areas/1/11/anim.s @@ -20,14 +20,15 @@ castle_grounds_seg7_anim_indexes_flags: # 0x0700C8F0 - 0x0700C944 .hword 1, 0, 1, 0, 29, 3 castle_grounds_seg7_anim_header_flags: # 0x0700C944 - 0x0700C95C -.hword 0 # repeats -.hword 0x0000 -.word 0x00000000 +.hword 0 # repeats +.hword 0 +.hword 0 +.hword 0 .hword 29 # frame count -.hword 6 # node count +.hword 6 # node count .word castle_grounds_seg7_anim_values_flags # 0x0700C7C8 .word castle_grounds_seg7_anim_indexes_flags # 0x0700C8F0 -.word 0x00000000 +.word 0 glabel castle_grounds_seg7_anim_flags # 0x0700C95C - 0x0700C960 .word castle_grounds_seg7_anim_header_flags # 0x0700C944 diff --git a/levels/castle_grounds/areas/1/13/model.s b/levels/castle_grounds/areas/1/13/model.s index 64db140..038c752 100644 --- a/levels/castle_grounds/areas/1/13/model.s +++ b/levels/castle_grounds/areas/1/13/model.s @@ -14,7 +14,7 @@ gsDPSetTileSize 0, 0, 0, 252, 124 gsDPSetTextureImage G_IM_FMT_IA, G_IM_SIZ_8b, 1, castle_grounds_seg7_us_texture_0700EAE8 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x100 -gsSPTextureRectangle 464, 664, 720, 792, 0, 0, 0, 1024, 1024 +gsSPTextureRectangle 116 << 2, 166 << 2, (116 + 64) << 2, (166 + 32) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10 gsDPPipeSync gsDPSetTexturePersp G_TP_PERSP diff --git a/levels/ending/geo.s b/levels/ending/geo.s index 445c9d8..f7ebd7a 100644 --- a/levels/ending/geo.s +++ b/levels/ending/geo.s @@ -18,4 +18,4 @@ glabel ending_geo_000050 # 0x0E000050 geo_close_node geo_end -.word 0x0 +.balign 16 diff --git a/levels/ending/leveldata.s b/levels/ending/leveldata.s index e1d214c..1d087de 100644 --- a/levels/ending/leveldata.s +++ b/levels/ending/leveldata.s @@ -139,143 +139,143 @@ gsDPSetTileSize 0, 0, 0, 252, 124 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07000000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 0, 32, 252, 156, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 0 << 2, 8 << 2, (0 + 63) << 2, (8 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07001000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 256, 32, 508, 156, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 64 << 2, 8 << 2, (64 + 63) << 2, (8 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07002000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 512, 32, 764, 156, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 128 << 2, 8 << 2, (128 + 63) << 2, (8 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07003000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 768, 32, 1020, 156, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 192 << 2, 8 << 2, (192 + 63) << 2, (8 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07004000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 1024, 32, 1276, 156, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 256 << 2, 8 << 2, (256 + 63) << 2, (8 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07005000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 0, 160, 252, 284, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 0 << 2, 40 << 2, (0 + 63) << 2, (40 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07006000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 256, 160, 508, 284, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 64 << 2, 40 << 2, (64 + 63) << 2, (40 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07007000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 512, 160, 764, 284, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 128 << 2, 40 << 2, (128 + 63) << 2, (40 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07008000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 768, 160, 1020, 284, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 192 << 2, 40 << 2, (192 + 63) << 2, (40 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07009000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 1024, 160, 1276, 284, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 256 << 2, 40 << 2, (256 + 63) << 2, (40 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_0700A000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 0, 288, 252, 412, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 0 << 2, 72 << 2, (0 + 63) << 2, (72 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_0700B000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 256, 288, 508, 412, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 64 << 2, 72 << 2, (64 + 63) << 2, (72 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_0700C000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 512, 288, 764, 412, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 128 << 2, 72 << 2, (128 + 63) << 2, (72 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_0700D000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 768, 288, 1020, 412, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 192 << 2, 72 << 2, (192 + 63) << 2, (72 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_0700E000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 1024, 288, 1276, 412, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 256 << 2, 72 << 2, (256 + 63) << 2, (72 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_0700F000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 0, 416, 252, 540, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 0 << 2, 104 << 2, (0 + 63) << 2, (104 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07010000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 256, 416, 508, 540, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 64 << 2, 104 << 2, (64 + 63) << 2, (104 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07011000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 512, 416, 764, 540, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 128 << 2, 104 << 2, (128 + 63) << 2, (104 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07012000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 768, 416, 1020, 540, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 192 << 2, 104 << 2, (192 + 63) << 2, (104 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07013000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 1024, 416, 1276, 540, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 256 << 2, 104 << 2, (256 + 63) << 2, (104 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07014000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 0, 544, 252, 668, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 0 << 2, 136 << 2, (0 + 63) << 2, (136 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07015000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 256, 544, 508, 668, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 64 << 2, 136 << 2, (64 + 63) << 2, (136 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07016000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 512, 544, 764, 668, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 128 << 2, 136 << 2, (128 + 63) << 2, (136 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07017000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 768, 544, 1020, 668, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 192 << 2, 136 << 2, (192 + 63) << 2, (136 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07018000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 1024, 544, 1276, 668, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 256 << 2, 136 << 2, (256 + 63) << 2, (136 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07019000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 0, 672, 252, 796, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 0 << 2, 168 << 2, (0 + 63) << 2, (168 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_0701A000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 256, 672, 508, 796, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 64 << 2, 168 << 2, (64 + 63) << 2, (168 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_0701B000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 512, 672, 764, 796, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 128 << 2, 168 << 2, (128 + 63) << 2, (168 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_0701C000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 768, 672, 1020, 796, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 192 << 2, 168 << 2, (192 + 63) << 2, (168 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_0701D000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 1024, 672, 1276, 796, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 256 << 2, 168 << 2, (256 + 63) << 2, (168 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_0701E000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 0, 800, 252, 924, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 0 << 2, 200 << 2, (0 + 63) << 2, (200 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_0701F000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 256, 800, 508, 924, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 64 << 2, 200 << 2, (64 + 63) << 2, (200 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07020000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 512, 800, 764, 924, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 128 << 2, 200 << 2, (128 + 63) << 2, (200 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07021000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 768, 800, 1020, 924, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 192 << 2, 200 << 2, (192 + 63) << 2, (200 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07022000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 1024, 800, 1276, 924, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 256 << 2, 200 << 2, (256 + 63) << 2, (200 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsSPEndDisplayList dl_cake_end_eu_070296D8: # 0x070296D8 - 0x070296F8 @@ -288,11 +288,11 @@ glabel dl_cake_end_screen_eu_070296F8 # 0x070296F8 - 0x07029768 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07026000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 512, 800, 764, 924, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 128 << 2, 200 << 2, (128 + 63) << 2, (200 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07023000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 512, 500, 764, 624, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 128 << 2, 125 << 2, (128 + 63) << 2, (125 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsSPDisplayList dl_cake_end_eu_070296D8 gsSPEndDisplayList @@ -300,11 +300,11 @@ glabel dl_cake_end_screen_eu_07029768 # 0x07029768 - 0x070297D8 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07027000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 512, 800, 764, 924, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 128 << 2, 200 << 2, (128 + 63) << 2, (200 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07024000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 512, 500, 764, 624, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 128 << 2, 125 << 2, (128 + 63) << 2, (125 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsSPDisplayList dl_cake_end_eu_070296D8 gsSPEndDisplayList @@ -312,11 +312,11 @@ glabel dl_cake_end_screen_eu_070297D8 # 0x070297D8 - 0x07029848 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07028000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 512, 800, 764, 924, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 128 << 2, 200 << 2, (128 + 63) << 2, (200 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, cake_end_texture_07025000 gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPTextureRectangle 512, 500, 764, 624, 0, 0, 0, 4096, 1024 +gsSPTextureRectangle 128 << 2, 125 << 2, (128 + 63) << 2, (125 + 31) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10 gsSPDisplayList dl_cake_end_eu_070296D8 gsSPEndDisplayList diff --git a/levels/hmc/areas/1/painting.s b/levels/hmc/areas/1/painting.s index 3744bdd..f28eedc 100644 --- a/levels/hmc/areas/1/painting.s +++ b/levels/hmc/areas/1/painting.s @@ -481,7 +481,9 @@ hmc_seg7_triangles_070246A0: # 0x070246A0 - 0x07024CD2 .balign 4 hmc_seg7_painting_data_07024CD4: # 0x07024CD4 .word hmc_seg7_pool_points_070242F0 -.word 0, 0 +.word 0 + +.balign 8 hmc_seg7_texture_07024CE0: # 0x07024CE0 - 0x070254E0 .incbin "levels/hmc/7.rgba16" diff --git a/levels/intro/geo.s b/levels/intro/geo.s index cdf6027..1e616fc 100644 --- a/levels/intro/geo.s +++ b/levels/intro/geo.s @@ -97,4 +97,4 @@ glabel intro_geo_000414 # 0x0E000414 geo_close_node geo_end -.word 0x0 +.balign 16 diff --git a/levels/menu/geo.s b/levels/menu/geo.s index 1bc85a2..2dc5d0a 100644 --- a/levels/menu/geo.s +++ b/levels/menu/geo.s @@ -1,108 +1,108 @@ -glabel main_menu_geo_0001D0 # 0x0E0001D0 +glabel geo_menu_mario_save_button # 0x0E0001D0 geo_node_start geo_open_node geo_scale 0x00, 524288 geo_open_node - geo_display_list LAYER_OPAQUE, main_menu_seg7_dl_07003330 - geo_display_list LAYER_OPAQUE, main_menu_seg7_dl_070033D0 + geo_display_list LAYER_OPAQUE, dl_menu_mario_save_button_base + geo_display_list LAYER_OPAQUE, dl_menu_save_button_back geo_close_node geo_close_node geo_end -glabel main_menu_geo_000200 # 0x0E000200 +glabel geo_menu_mario_save_button_fade # 0x0E000200 geo_node_start geo_open_node geo_scale 0x00, 524288 geo_open_node - geo_display_list LAYER_OPAQUE, main_menu_seg7_dl_07003330 - geo_display_list LAYER_OPAQUE, main_menu_seg7_dl_07003400 + geo_display_list LAYER_OPAQUE, dl_menu_mario_save_button_base + geo_display_list LAYER_OPAQUE, dl_menu_save_button_fade_back geo_close_node geo_close_node geo_end -glabel main_menu_geo_000230 # 0x0E000230 +glabel geo_menu_mario_new_button # 0x0E000230 geo_node_start geo_open_node geo_scale 0x00, 524288 geo_open_node - geo_display_list LAYER_OPAQUE, main_menu_seg7_dl_07003380 - geo_display_list LAYER_OPAQUE, main_menu_seg7_dl_070033D0 + geo_display_list LAYER_OPAQUE, dl_menu_mario_new_button_base + geo_display_list LAYER_OPAQUE, dl_menu_save_button_back geo_close_node geo_close_node geo_end -glabel main_menu_geo_000260 # 0x0E000260 +glabel geo_menu_mario_new_button_fade # 0x0E000260 geo_node_start geo_open_node geo_scale 0x00, 524288 geo_open_node - geo_display_list LAYER_OPAQUE, main_menu_seg7_dl_07003380 - geo_display_list LAYER_OPAQUE, main_menu_seg7_dl_07003400 + geo_display_list LAYER_OPAQUE, dl_menu_mario_new_button_base + geo_display_list LAYER_OPAQUE, dl_menu_save_button_fade_back geo_close_node geo_close_node geo_end -glabel main_menu_geo_000290 # 0x0E000290 +glabel geo_menu_erase_button # 0x0E000290 geo_node_start geo_open_node geo_scale 0x00, 524288 geo_open_node - geo_display_list LAYER_OPAQUE, main_menu_seg7_dl_070061C8 + geo_display_list LAYER_OPAQUE, dl_menu_erase_button geo_close_node geo_close_node geo_end -glabel main_menu_geo_0002B8 # 0x0E0002B8 +glabel geo_menu_copy_button # 0x0E0002B8 geo_node_start geo_open_node geo_scale 0x00, 524288 geo_open_node - geo_display_list LAYER_OPAQUE, main_menu_seg7_dl_070061F8 + geo_display_list LAYER_OPAQUE, dl_menu_copy_button geo_close_node geo_close_node geo_end -glabel main_menu_geo_0002E0 # 0x0E0002E0 +glabel geo_menu_file_button # 0x0E0002E0 geo_node_start geo_open_node geo_scale 0x00, 524288 geo_open_node - geo_display_list LAYER_OPAQUE, main_menu_seg7_dl_07006228 + geo_display_list LAYER_OPAQUE, dl_menu_file_button geo_close_node geo_close_node geo_end -glabel main_menu_geo_000308 # 0x0E000308 +glabel geo_menu_score_button # 0x0E000308 geo_node_start geo_open_node geo_scale 0x00, 524288 geo_open_node - geo_display_list LAYER_OPAQUE, main_menu_seg7_dl_07006258 + geo_display_list LAYER_OPAQUE, dl_menu_score_button geo_close_node geo_close_node geo_end -glabel main_menu_geo_000330 # 0x0E000330 +glabel geo_menu_sound_button # 0x0E000330 geo_node_start geo_open_node geo_scale 0x00, 524288 geo_open_node - geo_display_list LAYER_OPAQUE, main_menu_seg7_dl_07006288 + geo_display_list LAYER_OPAQUE, dl_menu_sound_button geo_close_node geo_close_node geo_end -glabel main_menu_geo_000358 # 0x0E000358 +glabel geo_menu_generic_button # 0x0E000358 geo_node_start geo_open_node geo_scale 0x00, 524288 geo_open_node - geo_display_list LAYER_OPAQUE, main_menu_seg7_dl_070062B8 + geo_display_list LAYER_OPAQUE, dl_menu_generic_button geo_close_node geo_close_node geo_end -glabel main_menu_geo_000380 # 0x0E000380 +glabel geo_menu_file_select_strings_and_menu_cursor # 0x0E000380 geo_node_screen_area 10, SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH/2, SCREEN_HEIGHT/2 geo_open_node geo_zbuffer 0 @@ -124,12 +124,12 @@ glabel main_menu_geo_000380 # 0x0E000380 geo_close_node geo_zbuffer 0 geo_open_node - geo_asm 0, Geo18_80176688 + geo_asm 0, geo_file_select_strings_and_menu_cursor geo_close_node geo_close_node geo_end -glabel main_menu_geo_000408 # 0x0E000408 +glabel geo_menu_act_selector_strings # 0x0E000408 geo_node_screen_area 10, SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH/2, SCREEN_HEIGHT/2 geo_open_node geo_zbuffer 0 @@ -151,7 +151,7 @@ glabel main_menu_geo_000408 # 0x0E000408 geo_close_node geo_zbuffer 0 geo_open_node - geo_asm 0, Geo18_80177518 + geo_asm 0, geo_act_selector_strings geo_close_node geo_close_node geo_end diff --git a/levels/menu/leveldata.s b/levels/menu/leveldata.s index 2fd55d4..9681841 100644 --- a/levels/menu/leveldata.s +++ b/levels/menu/leveldata.s @@ -1,27 +1,28 @@ .section .rodata .include "macros.inc" .include "PR/gbi.inc" +.include "surface_terrains.inc" -main_menu_seg7_light_07000000: # 0x07000000 - 0x07000008 +ambient_light_menu_1: # 0x07000000 - 0x07000008 .byte 0x3F, 0x3F, 0x3F, 0x00, 0x3F, 0x3F, 0x3F, 0x00 -main_menu_seg7_light_07000008: # 0x07000008 - 0x07000018 +diffuse_light_menu_1: # 0x07000008 - 0x07000018 .byte 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0x00 .byte 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00 -main_menu_seg7_texture_07000018: # 0x07000018 - 0x07000818 +texture_menu_stone: # 0x07000018 - 0x07000818 .incbin "levels/menu/main_menu_seg7.00018.rgba16" -main_menu_seg7_texture_07000818: # 0x07000818 - 0x07001018 +texture_menu_dark_stone: # 0x07000818 - 0x07001018 .incbin "levels/menu/main_menu_seg7.00818.rgba16" -main_menu_seg7_texture_07001018: # 0x07001018 - 0x07002018 +texture_menu_mario_save: # 0x07001018 - 0x07002018 .incbin "levels/menu/main_menu_seg7.01018.rgba16" -main_menu_seg7_texture_07002018: # 0x07002018 - 0x07003018 +texture_menu_mario_new: # 0x07002018 - 0x07003018 .incbin "levels/menu/main_menu_seg7.02018.rgba16" -main_menu_seg7_vertex_07003018: # 0x07003018 - 0x07003118 +vertex_menu_save_button_borders: # 0x07003018 - 0x07003118 vertex -163, -122, 0, 0, 990, 0x00, 0xB6, 0x66, 0xFF vertex 163, -122, 0, 990, 990, 0x00, 0xB6, 0x66, 0xFF vertex -122, -81, 30, 96, 820, 0x00, 0xB6, 0x66, 0xFF @@ -39,13 +40,13 @@ vertex 122, -81, 30, 862, 820, 0x4A, 0x00, 0x66, 0xFF vertex 163, -122, 0, 990, 990, 0x4A, 0x00, 0x66, 0xFF vertex 163, 122, 0, 990, 0, 0x4A, 0x00, 0x66, 0xFF -main_menu_seg7_vertex_07003118: # 0x07003118 - 0x07003158 +vertex_menu_save_button_front: # 0x07003118 - 0x07003158 vertex 122, 81, 30, 2012, 0, 0x00, 0x00, 0x7F, 0xFF vertex -122, 81, 30, 0, 0, 0x00, 0x00, 0x7F, 0xFF vertex 122, -81, 30, 2012, 990, 0x00, 0x00, 0x7F, 0xFF vertex -122, -81, 30, 0, 990, 0x00, 0x00, 0x7F, 0xFF -main_menu_seg7_dl_07003158: # 0x07003158 - 0x070031A0 +dl_tex_block_menu_save_button_base: # 0x07003158 - 0x070031A0 gsDPPipeSync gsDPSetCombineModeLERP1Cycle G_CCMUX_TEXEL0, G_CCMUX_0, G_CCMUX_SHADE, G_CCMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_SHADE gsSPClearGeometryMode G_SHADING_SMOOTH @@ -56,10 +57,10 @@ gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G gsDPSetTileSize 0, 0, 0, 124, 124 gsSPEndDisplayList -main_menu_seg7_dl_070031A0: # 0x070031A0 - 0x07003218 -gsSPLight main_menu_seg7_light_07000008, 1 -gsSPLight main_menu_seg7_light_07000000, 2 -gsSPVertex main_menu_seg7_vertex_07003018, 16, 0 +dl_vertex_menu_save_button_borders: # 0x070031A0 - 0x07003218 +gsSPLight diffuse_light_menu_1, 1 +gsSPLight ambient_light_menu_1, 2 +gsSPVertex vertex_menu_save_button_borders, 16, 0 gsSP2Triangles 0, 1, 2, 0x0, 1, 3, 2, 0x0 gsSP2Triangles 4, 5, 6, 0x0, 5, 7, 6, 0x0 gsSP2Triangles 8, 9, 10, 0x0, 11, 8, 10, 0x0 @@ -69,8 +70,8 @@ gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | gsDPSetTileSize 0, 0, 0, 252, 124 gsSPEndDisplayList -main_menu_seg7_dl_07003218: # 0x07003218 - 0x07003258 -gsSPVertex main_menu_seg7_vertex_07003118, 4, 0 +dl_vertex_menu_save_button_front: # 0x07003218 - 0x07003258 +gsSPVertex vertex_menu_save_button_front, 4, 0 gsSP2Triangles 0, 1, 2, 0x0, 1, 3, 2, 0x0 gsSPTexture -1, -1, 0, 0, 0 gsDPPipeSync @@ -78,13 +79,13 @@ gsDPSetCombineModeLERP1Cycle G_CCMUX_0, G_CCMUX_0, G_CCMUX_0, G_CCMUX_SHADE, G_A gsSPSetGeometryMode G_SHADING_SMOOTH gsSPEndDisplayList -main_menu_seg7_vertex_07003258: # 0x07003258 - 0x07003298 +vertex_menu_save_button_back: # 0x07003258 - 0x07003298 vertex 163, -122, 0, 0, 990, 0x00, 0x00, 0x81, 0xFF vertex -163, -122, 0, 990, 990, 0x00, 0x00, 0x81, 0xFF vertex 163, 122, 0, 0, 0, 0x00, 0x00, 0x81, 0xFF vertex -163, 122, 0, 990, 0, 0x00, 0x00, 0x81, 0xFF -main_menu_seg7_dl_07003298: # 0x07003298 - 0x070032E0 +dl_tex_block_menu_save_button_back: # 0x07003298 - 0x070032E0 gsDPPipeSync gsDPSetCombineModeLERP1Cycle G_CCMUX_TEXEL0, G_CCMUX_0, G_CCMUX_SHADE, G_CCMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_SHADE gsSPClearGeometryMode G_SHADING_SMOOTH @@ -95,10 +96,10 @@ gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G gsDPSetTileSize 0, 0, 0, 124, 124 gsSPEndDisplayList -main_menu_seg7_dl_070032E0: # 0x070032E0 - 0x07003330 -gsSPLight main_menu_seg7_light_07000008, 1 -gsSPLight main_menu_seg7_light_07000000, 2 -gsSPVertex main_menu_seg7_vertex_07003258, 4, 0 +dl_vertex_menu_save_button_back: # 0x070032E0 - 0x07003330 +gsSPLight diffuse_light_menu_1, 1 +gsSPLight ambient_light_menu_1, 2 +gsSPVertex vertex_menu_save_button_back, 4, 0 gsSP2Triangles 0, 1, 2, 0x0, 1, 3, 2, 0x0 gsSPTexture -1, -1, 0, 0, 0 gsDPPipeSync @@ -106,72 +107,72 @@ gsDPSetCombineModeLERP1Cycle G_CCMUX_0, G_CCMUX_0, G_CCMUX_0, G_CCMUX_SHADE, G_A gsSPSetGeometryMode G_SHADING_SMOOTH gsSPEndDisplayList -glabel main_menu_seg7_dl_07003330 # 0x07003330 - 0x07003380 -gsSPDisplayList main_menu_seg7_dl_07003158 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_07000018 +glabel dl_menu_mario_save_button_base # 0x07003330 - 0x07003380 +gsSPDisplayList dl_tex_block_menu_save_button_base +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_stone gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x3FF, 0x100 -gsSPDisplayList main_menu_seg7_dl_070031A0 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_07001018 +gsSPDisplayList dl_vertex_menu_save_button_borders +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_mario_save gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPDisplayList main_menu_seg7_dl_07003218 +gsSPDisplayList dl_vertex_menu_save_button_front gsSPEndDisplayList -glabel main_menu_seg7_dl_07003380 # 0x07003380 - 0x070033D0 -gsSPDisplayList main_menu_seg7_dl_07003158 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_07000018 +glabel dl_menu_mario_new_button_base # 0x07003380 - 0x070033D0 +gsSPDisplayList dl_tex_block_menu_save_button_base +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_stone gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x3FF, 0x100 -gsSPDisplayList main_menu_seg7_dl_070031A0 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_07002018 +gsSPDisplayList dl_vertex_menu_save_button_borders +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_mario_new gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 -gsSPDisplayList main_menu_seg7_dl_07003218 +gsSPDisplayList dl_vertex_menu_save_button_front gsSPEndDisplayList -glabel main_menu_seg7_dl_070033D0 # 0x070033D0 - 0x07003400 -gsSPDisplayList main_menu_seg7_dl_07003298 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_07000818 +glabel dl_menu_save_button_back # 0x070033D0 - 0x07003400 +gsSPDisplayList dl_tex_block_menu_save_button_back +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_dark_stone gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x3FF, 0x100 -gsSPDisplayList main_menu_seg7_dl_070032E0 +gsSPDisplayList dl_vertex_menu_save_button_back gsSPEndDisplayList -glabel main_menu_seg7_dl_07003400 # 0x07003400 - 0x07003450 +glabel dl_menu_save_button_fade_back # 0x07003400 - 0x07003450 gsDPPipeSync gsSPClearGeometryMode G_SHADING_SMOOTH -gsSPLight main_menu_seg7_light_07000008, 1 -gsSPLight main_menu_seg7_light_07000000, 2 -gsSPVertex main_menu_seg7_vertex_07003258, 4, 0 +gsSPLight diffuse_light_menu_1, 1 +gsSPLight ambient_light_menu_1, 2 +gsSPVertex vertex_menu_save_button_back, 4, 0 gsSP2Triangles 0, 1, 2, 0x0, 1, 3, 2, 0x0 gsDPPipeSync gsSPSetGeometryMode G_SHADING_SMOOTH gsSPEndDisplayList -main_menu_seg7_light_07003450: # 0x07003450 - 0x07003458 +ambient_light_menu_2: # 0x07003450 - 0x07003458 .byte 0x3F, 0x3F, 0x3F, 0x00, 0x3F, 0x3F, 0x3F, 0x00 -main_menu_seg7_light_07003458: # 0x07003458 - 0x07003468 +diffuse_light_menu_2: # 0x07003458 - 0x07003468 .byte 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0x00 .byte 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00 -main_menu_seg7_texture_07003468: # 0x07003468 - 0x07003468 +texture_menu_erase: # 0x07003468 - 0x07003468 .incbin "levels/menu/main_menu_seg7.03468.rgba16" -main_menu_seg7_texture_07003C68: # 0x07003C68 - 0x07003C68 +texture_menu_copy: # 0x07003C68 - 0x07003C68 .incbin "levels/menu/main_menu_seg7.03C68.rgba16" -main_menu_seg7_texture_07004468: # 0x07004468 - 0x07004468 +texture_menu_file: # 0x07004468 - 0x07004468 .incbin "levels/menu/main_menu_seg7.04468.rgba16" -main_menu_seg7_texture_07004C68: # 0x07004C68 - 0x07004C68 +texture_menu_score: # 0x07004C68 - 0x07004C68 .incbin "levels/menu/main_menu_seg7.04C68.rgba16" -main_menu_seg7_texture_07005468: # 0x07005468 - 0x07005468 +texture_menu_sound: # 0x07005468 - 0x07005468 .incbin "levels/menu/main_menu_seg7.05468.rgba16" -main_menu_seg7_vertex_07005C68: # 0x07005C68 - 0x07005D68 +vertex_menu_main_button_group1: # 0x07005C68 - 0x07005D68 vertex -163, -122, 0, 990, 0, 0xB6, 0x00, 0x66, 0xFF vertex -122, -81, 30, 862, 138, 0xB6, 0x00, 0x66, 0xFF vertex -163, 122, 0, 990, 990, 0xB6, 0x00, 0x66, 0xFF @@ -189,7 +190,7 @@ vertex 143, -102, 0, 32, 54, 0xA7, 0x00, 0xA7, 0xFF vertex 133, 92, 10, 64, 862, 0xA7, 0x00, 0xA7, 0xFF vertex 143, 102, 0, 32, 904, 0xA7, 0x00, 0xA7, 0xFF -main_menu_seg7_vertex_07005D68: # 0x07005D68 - 0x07005E68 +vertex_menu_main_button_group2: # 0x07005D68 - 0x07005E68 vertex 143, -102, 0, 32, 54, 0xA7, 0x00, 0xA7, 0xFF vertex 133, -92, 10, 64, 96, 0xA7, 0x00, 0xA7, 0xFF vertex 133, 92, 10, 64, 862, 0xA7, 0x00, 0xA7, 0xFF @@ -207,7 +208,7 @@ vertex 163, 122, 0, 0, 990, 0x00, 0x00, 0x81, 0xFF vertex -143, 102, 0, 926, 904, 0x00, 0x00, 0x81, 0xFF vertex -163, 122, 0, 990, 990, 0x00, 0x00, 0x81, 0xFF -main_menu_seg7_vertex_07005E68: # 0x07005E68 - 0x07005F48 +vertex_menu_main_button_group3: # 0x07005E68 - 0x07005F48 vertex 163, 122, 0, 0, 990, 0x00, 0x00, 0x81, 0xFF vertex 143, 102, 0, 32, 904, 0x00, 0x00, 0x81, 0xFF vertex -143, 102, 0, 926, 904, 0x00, 0x00, 0x81, 0xFF @@ -223,7 +224,7 @@ vertex -122, -81, 30, 862, 138, 0xB6, 0x00, 0x66, 0xFF vertex -122, 81, 30, 862, 820, 0xB6, 0x00, 0x66, 0xFF vertex -163, 122, 0, 990, 990, 0xB6, 0x00, 0x66, 0xFF -main_menu_seg7_vertex_07005F48: # 0x07005F48 - 0x07006038 +vertex_menu_main_button_group4: # 0x07005F48 - 0x07006038 vertex -122, 81, 30, 862, 820, 0x00, 0x00, 0x7F, 0xFF vertex -122, -81, 30, 862, 138, 0x00, 0x00, 0x7F, 0xFF vertex 122, -81, 30, 96, 138, 0x00, 0x00, 0x7F, 0xFF @@ -240,31 +241,31 @@ vertex 122, 81, 30, 96, 820, 0x4A, 0x00, 0x66, 0xFF vertex 163, -122, 0, 0, 0, 0x4A, 0x00, 0x66, 0xFF vertex 122, -81, 30, 96, 138, 0x4A, 0x00, 0x66, 0xFF -main_menu_seg7_dl_07006038: # 0x07006038 - 0x07006150 -gsSPLight main_menu_seg7_light_07003458, 1 -gsSPLight main_menu_seg7_light_07003450, 2 -gsSPVertex main_menu_seg7_vertex_07005C68, 16, 0 +dl_vertex_menu_main_button: # 0x07006038 - 0x07006150 +gsSPLight diffuse_light_menu_2, 1 +gsSPLight ambient_light_menu_2, 2 +gsSPVertex vertex_menu_main_button_group1, 16, 0 gsSP2Triangles 0, 1, 2, 0x0, 3, 4, 5, 0x0 gsSP2Triangles 6, 7, 8, 0x0, 6, 9, 7, 0x0 gsSP2Triangles 10, 11, 12, 0x0, 13, 14, 15, 0x0 -gsSPVertex main_menu_seg7_vertex_07005D68, 16, 0 +gsSPVertex vertex_menu_main_button_group2, 16, 0 gsSP2Triangles 0, 1, 2, 0x0, 3, 4, 5, 0x0 gsSP2Triangles 6, 7, 8, 0x0, 6, 9, 7, 0x0 gsSP2Triangles 10, 11, 12, 0x0, 13, 14, 15, 0x0 -gsSPVertex main_menu_seg7_vertex_07005E68, 14, 0 +gsSPVertex vertex_menu_main_button_group3, 14, 0 gsSP2Triangles 0, 1, 2, 0x0, 0, 3, 1, 0x0 gsSP2Triangles 0, 4, 3, 0x0, 5, 2, 6, 0x0 gsSP2Triangles 5, 6, 7, 0x0, 6, 3, 4, 0x0 gsSP2Triangles 6, 4, 7, 0x0, 8, 9, 10, 0x0 gsSP1Triangle 11, 12, 13, 0x0 -gsSPVertex main_menu_seg7_vertex_07005F48, 15, 0 +gsSPVertex vertex_menu_main_button_group4, 15, 0 gsSP2Triangles 0, 1, 2, 0x0, 3, 4, 5, 0x0 gsSP2Triangles 6, 7, 8, 0x0, 9, 6, 8, 0x0 gsSP2Triangles 10, 0, 2, 0x0, 11, 12, 13, 0x0 gsSP1Triangle 12, 14, 13, 0x0 gsSPEndDisplayList -main_menu_seg7_dl_07006150: # 0x07006150 - 0x07006198 +dl_tex_block_menu_main_button: # 0x07006150 - 0x07006198 gsDPPipeSync gsDPSetCombineModeLERP1Cycle G_CCMUX_TEXEL0, G_CCMUX_0, G_CCMUX_SHADE, G_CCMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_SHADE gsSPClearGeometryMode G_SHADING_SMOOTH @@ -275,75 +276,75 @@ gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G gsDPSetTileSize 0, 0, 0, 124, 124 gsSPEndDisplayList -main_menu_seg7_dl_07006198: # 0x07006198 - 0x070061C8 -gsSPDisplayList main_menu_seg7_dl_07006038 +dl_menu_main_button: # 0x07006198 - 0x070061C8 +gsSPDisplayList dl_vertex_menu_main_button gsSPTexture -1, -1, 0, 0, 0 gsDPPipeSync gsDPSetCombineModeLERP1Cycle G_CCMUX_0, G_CCMUX_0, G_CCMUX_0, G_CCMUX_SHADE, G_ACMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_SHADE gsSPSetGeometryMode G_SHADING_SMOOTH gsSPEndDisplayList -glabel main_menu_seg7_dl_070061C8 # 0x070061C8 - 0x070061F8 -gsSPDisplayList main_menu_seg7_dl_07006150 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_07003468 +glabel dl_menu_erase_button # 0x070061C8 - 0x070061F8 +gsSPDisplayList dl_tex_block_menu_main_button +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_erase gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x3FF, 0x100 -gsSPDisplayList main_menu_seg7_dl_07006198 +gsSPDisplayList dl_menu_main_button gsSPEndDisplayList -glabel main_menu_seg7_dl_070061F8 # 0x070061F8 - 0x07006228 -gsSPDisplayList main_menu_seg7_dl_07006150 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_07003C68 +glabel dl_menu_copy_button # 0x070061F8 - 0x07006228 +gsSPDisplayList dl_tex_block_menu_main_button +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_copy gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x3FF, 0x100 -gsSPDisplayList main_menu_seg7_dl_07006198 +gsSPDisplayList dl_menu_main_button gsSPEndDisplayList -glabel main_menu_seg7_dl_07006228 # 0x07006228 - 0x07006258 -gsSPDisplayList main_menu_seg7_dl_07006150 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_07004468 +glabel dl_menu_file_button # 0x07006228 - 0x07006258 +gsSPDisplayList dl_tex_block_menu_main_button +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_file gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x3FF, 0x100 -gsSPDisplayList main_menu_seg7_dl_07006198 +gsSPDisplayList dl_menu_main_button gsSPEndDisplayList -glabel main_menu_seg7_dl_07006258 # 0x07006258 - 0x07006288 -gsSPDisplayList main_menu_seg7_dl_07006150 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_07004C68 +glabel dl_menu_score_button # 0x07006258 - 0x07006288 +gsSPDisplayList dl_tex_block_menu_main_button +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_score gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x3FF, 0x100 -gsSPDisplayList main_menu_seg7_dl_07006198 +gsSPDisplayList dl_menu_main_button gsSPEndDisplayList -glabel main_menu_seg7_dl_07006288 # 0x07006288 - 0x070062B8 -gsSPDisplayList main_menu_seg7_dl_07006150 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_07005468 +glabel dl_menu_sound_button # 0x07006288 - 0x070062B8 +gsSPDisplayList dl_tex_block_menu_main_button +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_sound gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x3FF, 0x100 -gsSPDisplayList main_menu_seg7_dl_07006198 +gsSPDisplayList dl_menu_main_button gsSPEndDisplayList -glabel main_menu_seg7_dl_070062B8 # 0x070062B8 - 0x070062E8 -gsSPDisplayList main_menu_seg7_dl_07006150 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_07000018 +glabel dl_menu_generic_button # 0x070062B8 - 0x070062E8 +gsSPDisplayList dl_tex_block_menu_main_button +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_stone gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x3FF, 0x100 -gsSPDisplayList main_menu_seg7_dl_07006198 +gsSPDisplayList dl_menu_main_button gsSPEndDisplayList -main_menu_seg7_vertex_070062E8: # 0x070062E8 - 0x07006328 +vertex_menu_hand: # 0x070062E8 - 0x07006328 vertex 0, 0, 0, 0, 1984, 0x00, 0x00, 0x7F, 0xFF vertex 32, 0, 0, 1984, 1984, 0x00, 0x00, 0x7F, 0xFF vertex 32, 32, 0, 1984, 0, 0x00, 0x00, 0x7F, 0xFF vertex 0, 32, 0, 0, 0, 0x00, 0x00, 0x7F, 0xFF -main_menu_seg7_texture_07006328: # 0x07006328 - 0x07006B28 +texture_menu_idle_hand: # 0x07006328 - 0x07006B28 .incbin "levels/menu/main_menu_seg7.06328.rgba16" -main_menu_seg7_texture_07006B28: # 0x07006B28 - 0x07007328 +texture_menu_grabbing_hand: # 0x07006B28 - 0x07007328 .incbin "levels/menu/main_menu_seg7.06B28.rgba16" -main_menu_seg7_dl_07007328: # 0x07007328 - 0x070073A0 +dl_menu_hand: # 0x07007328 - 0x070073A0 gsDPSetCombineModeLERP1Cycle G_CCMUX_0, G_CCMUX_0, G_CCMUX_0, G_CCMUX_TEXEL0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_TEXEL0 # There were multiple matching pairs, so I don't know if this is correct or not. @@ -358,7 +359,7 @@ gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x3FF, 0x100 gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD gsDPSetTileSize 0, 0, 0, 124, 124 -gsSPVertex main_menu_seg7_vertex_070062E8, 4, 0 +gsSPVertex vertex_menu_hand, 4, 0 gsSP2Triangles 0, 1, 2, 0x0, 0, 2, 3, 0x0 gsSPTexture 1, 1, 0, 0, 0 @@ -372,656 +373,815 @@ gsDPSetRenderMode G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2 gsDPSetCombineModeLERP1Cycle G_CCMUX_0, G_CCMUX_0, G_CCMUX_0, G_CCMUX_SHADE, G_ACMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_SHADE gsSPEndDisplayList -glabel main_menu_seg7_dl_070073A0 # 0x070073A0 - 0x070073B8 +glabel dl_menu_idle_hand # 0x070073A0 - 0x070073B8 gsDPPipeSync -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_07006328 -gsSPBranchList main_menu_seg7_dl_07007328 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_idle_hand +gsSPBranchList dl_menu_hand -glabel main_menu_seg7_dl_070073B8 # 0x070073B8 - 0x070073D0 +glabel dl_menu_grabbing_hand # 0x070073B8 - 0x070073D0 gsDPPipeSync -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_07006B28 -gsSPBranchList main_menu_seg7_dl_07007328 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_grabbing_hand +gsSPBranchList dl_menu_hand -main_menu_seg7_texture_070073D0: # 0x070073D0 +texture_menu_hud_char_katakana_hu: # 0x070073D0 .incbin "levels/menu/main_menu_seg7.073D0.rgba16" -main_menu_seg7_texture_070075D0: # 0x070075D0 + +texture_menu_hud_char_katakana_small_a: # 0x070075D0 .incbin "levels/menu/main_menu_seg7.075D0.rgba16" -main_menu_seg7_texture_070077D0: # 0x070077D0 + +texture_menu_hud_char_katakana_i: # 0x070077D0 .incbin "levels/menu/main_menu_seg7.077D0.rgba16" -main_menu_seg7_texture_070079D0: # 0x070079D0 + +texture_menu_hud_char_katakana_ru: # 0x070079D0 .incbin "levels/menu/main_menu_seg7.079D0.rgba16" -main_menu_seg7_texture_07007BD0: # 0x07007BD0 + +texture_menu_hud_char_katakana_se: # 0x07007BD0 .incbin "levels/menu/main_menu_seg7.07BD0.rgba16" -main_menu_seg7_texture_07007DD0: # 0x07007DD0 + +texture_menu_hud_char_katakana_re: # 0x07007DD0 .incbin "levels/menu/main_menu_seg7.07DD0.rgba16" -main_menu_seg7_texture_07007FD0: # 0x07007FD0 + +texture_menu_hud_char_katakana_ku: # 0x07007FD0 .incbin "levels/menu/main_menu_seg7.07FD0.rgba16" -main_menu_seg7_texture_070081D0: # 0x070081D0 + +texture_menu_hud_char_katakana_to: # 0x070081D0 .incbin "levels/menu/main_menu_seg7.081D0.rgba16" -main_menu_seg7_texture_070083D0: # 0x070083D0 + +texture_menu_hud_char_hiragana_wo: # 0x070083D0 .incbin "levels/menu/main_menu_seg7.083D0.rgba16" -main_menu_seg7_texture_070085D0: # 0x070085D0 + +texture_menu_hud_char_katakana_ko: # 0x070085D0 .incbin "levels/menu/main_menu_seg7.085D0.rgba16" -main_menu_seg7_texture_070087D0: # 0x070087D0 + +texture_menu_hud_char_kana_handakuten_pi: # 0x070087D0 .incbin "levels/menu/main_menu_seg7.087D0.rgba16" -main_menu_seg7_texture_070089D0: # 0x070089D0 + +texture_menu_hud_char_choonpu: # 0x070089D0 .incbin "levels/menu/main_menu_seg7.089D0.rgba16" -main_menu_seg7_texture_07008BD0: # 0x07008BD0 + +texture_menu_hud_char_hiragana_su: # 0x07008BD0 .incbin "levels/menu/main_menu_seg7.08BD0.rgba16" -main_menu_seg7_texture_07008DD0: # 0x07008DD0 + +texture_menu_hud_char_hiragana_ru: # 0x07008DD0 .incbin "levels/menu/main_menu_seg7.08DD0.rgba16" -main_menu_seg7_texture_07008FD0: # 0x07008FD0 + +texture_menu_hud_char_hiragana_ke: # 0x07008FD0 .incbin "levels/menu/main_menu_seg7.08FD0.rgba16" -main_menu_seg7_texture_070091D0: # 0x070091D0 + +texture_menu_hud_char_katakana_ma: # 0x070091D0 .incbin "levels/menu/main_menu_seg7.091D0.rgba16" -main_menu_seg7_texture_070093D0: # 0x070093D0 + +texture_menu_hud_char_katakana_ri: # 0x070093D0 .incbin "levels/menu/main_menu_seg7.093D0.rgba16" -main_menu_seg7_texture_070095D0: # 0x070095D0 + +texture_menu_hud_char_katakana_o: # 0x070095D0 .incbin "levels/menu/main_menu_seg7.095D0.rgba16" -main_menu_seg7_texture_070097D0: # 0x070097D0 + +texture_menu_hud_char_katakana_su: # 0x070097D0 .incbin "levels/menu/main_menu_seg7.097D0.rgba16" -main_menu_seg7_texture_070099D0: # 0x070099D0 + +texture_menu_hud_char_katakana_a: # 0x070099D0 .incbin "levels/menu/main_menu_seg7.099D0.rgba16" -main_menu_seg7_texture_07009BD0: # 0x07009BD0 + +texture_menu_hud_char_hiragana_mi: # 0x07009BD0 .incbin "levels/menu/main_menu_seg7.09BD0.rgba16" -main_menu_seg7_texture_07009DD0: # 0x07009DD0 + +texture_menu_hud_char_hira_dakuten_do: # 0x07009DD0 .incbin "levels/menu/main_menu_seg7.09DD0.rgba16" -main_menu_seg7_texture_07009FD0: # 0x07009FD0 + +texture_menu_hud_char_hiragana_no: # 0x07009FD0 .incbin "levels/menu/main_menu_seg7.09FD0.rgba16" -main_menu_seg7_texture_0700A1D0: # 0x0700A1D0 + +texture_menu_hud_char_question: # 0x0700A1D0 .incbin "levels/menu/main_menu_seg7.0A1D0.rgba16" -main_menu_seg7_texture_0700A3D0: # 0x0700A3D0 + +texture_menu_hud_char_katakana_sa: # 0x0700A3D0 .incbin "levels/menu/main_menu_seg7.0A3D0.rgba16" -main_menu_seg7_texture_0700A5D0: # 0x0700A5D0 + +texture_menu_hud_char_katakana_u: # 0x0700A5D0 .incbin "levels/menu/main_menu_seg7.0A5D0.rgba16" -main_menu_seg7_texture_0700A7D0: # 0x0700A7D0 + +texture_menu_hud_char_katakana_n: # 0x0700A7D0 .incbin "levels/menu/main_menu_seg7.0A7D0.rgba16" -main_menu_seg7_texture_0700A9D0: # 0x0700A9D0 + +texture_menu_hud_char_kana_dakuten_do: # 0x0700A9D0 .incbin "levels/menu/main_menu_seg7.0A9D0.rgba16" -glabel main_menu_seg7_table_0700ABD0 # 0x0700ABD0 -.word main_menu_seg7_texture_070073D0, main_menu_seg7_texture_070075D0, main_menu_seg7_texture_070077D0, main_menu_seg7_texture_070079D0 -.word main_menu_seg7_texture_07007BD0, main_menu_seg7_texture_07007DD0, main_menu_seg7_texture_07007FD0, main_menu_seg7_texture_070081D0 -.word main_menu_seg7_texture_070083D0, main_menu_seg7_texture_070085D0, main_menu_seg7_texture_070087D0, main_menu_seg7_texture_070089D0 -.word main_menu_seg7_texture_07008BD0, main_menu_seg7_texture_07008DD0, main_menu_seg7_texture_07008FD0, main_menu_seg7_texture_070091D0 -.word main_menu_seg7_texture_070093D0, main_menu_seg7_texture_070095D0, main_menu_seg7_texture_070097D0, main_menu_seg7_texture_070099D0 -.word main_menu_seg7_texture_07009BD0, main_menu_seg7_texture_07009DD0, main_menu_seg7_texture_07009FD0, main_menu_seg7_texture_0700A1D0 -.word main_menu_seg7_texture_0700A3D0, main_menu_seg7_texture_0700A5D0, main_menu_seg7_texture_0700A7D0, main_menu_seg7_texture_0700A9D0 +# Menu HUD print table, only used in JP +glabel menu_hud_lut # 0x0700ABD0 +.word texture_menu_hud_char_katakana_hu, texture_menu_hud_char_katakana_small_a, texture_menu_hud_char_katakana_i, texture_menu_hud_char_katakana_ru +.word texture_menu_hud_char_katakana_se, texture_menu_hud_char_katakana_re, texture_menu_hud_char_katakana_ku, texture_menu_hud_char_katakana_to +.word texture_menu_hud_char_hiragana_wo, texture_menu_hud_char_katakana_ko, texture_menu_hud_char_kana_handakuten_pi, texture_menu_hud_char_choonpu +.word texture_menu_hud_char_hiragana_su, texture_menu_hud_char_hiragana_ru, texture_menu_hud_char_hiragana_ke, texture_menu_hud_char_katakana_ma +.word texture_menu_hud_char_katakana_ri, texture_menu_hud_char_katakana_o, texture_menu_hud_char_katakana_su, texture_menu_hud_char_katakana_a +.word texture_menu_hud_char_hiragana_mi, texture_menu_hud_char_hira_dakuten_do, texture_menu_hud_char_hiragana_no, texture_menu_hud_char_question +.word texture_menu_hud_char_katakana_sa, texture_menu_hud_char_katakana_u, texture_menu_hud_char_katakana_n, texture_menu_hud_char_kana_dakuten_do .ifdef VERSION_JP -.word 0x00000000, 0x00000000 +.word 0, 0 -main_menu_seg7_texture_0700AC48: # 0x0700AC48 +texture_menu_font_char_jp_0: # 0x0700AC48 .incbin "levels/menu/main_menu_seg7.0AC48.ia8" -main_menu_seg7_texture_0700AC88: # 0x0700AC88 + +texture_menu_font_char_jp_1: # 0x0700AC88 .incbin "levels/menu/main_menu_seg7.0AC88.ia8" -main_menu_seg7_texture_0700ACC8: # 0x0700ACC8 + +texture_menu_font_char_jp_2: # 0x0700ACC8 .incbin "levels/menu/main_menu_seg7.0ACC8.ia8" -main_menu_seg7_texture_0700AD08: # 0x0700AD08 + +texture_menu_font_char_jp_3: # 0x0700AD08 .incbin "levels/menu/main_menu_seg7.0AD08.ia8" -main_menu_seg7_texture_0700AD48: # 0x0700AD48 + +texture_menu_font_char_jp_4: # 0x0700AD48 .incbin "levels/menu/main_menu_seg7.0AD48.ia8" -main_menu_seg7_texture_0700AD88: # 0x0700AD88 + +texture_menu_font_char_jp_5: # 0x0700AD88 .incbin "levels/menu/main_menu_seg7.0AD88.ia8" -main_menu_seg7_texture_0700ADC8: # 0x0700ADC8 + +texture_menu_font_char_jp_6: # 0x0700ADC8 .incbin "levels/menu/main_menu_seg7.0ADC8.ia8" -main_menu_seg7_texture_0700AE08: # 0x0700AE08 + +texture_menu_font_char_jp_7: # 0x0700AE08 .incbin "levels/menu/main_menu_seg7.0AE08.ia8" -main_menu_seg7_texture_0700AE48: # 0x0700AE48 + +texture_menu_font_char_jp_8: # 0x0700AE48 .incbin "levels/menu/main_menu_seg7.0AE48.ia8" -main_menu_seg7_texture_0700AE88: # 0x0700AE88 + +texture_menu_font_char_jp_9: # 0x0700AE88 .incbin "levels/menu/main_menu_seg7.0AE88.ia8" -main_menu_seg7_texture_0700AEC8: # 0x0700AEC8 + +texture_menu_font_char_jp_hiragana_a: # 0x0700AEC8 .incbin "levels/menu/main_menu_seg7.0AEC8.ia8" -main_menu_seg7_texture_0700AF08: # 0x0700AF08 + +texture_menu_font_char_jp_hiragana_i: # 0x0700AF08 .incbin "levels/menu/main_menu_seg7.0AF08.ia8" -main_menu_seg7_texture_0700AF48: # 0x0700AF48 + +texture_menu_font_char_jp_hiragana_u: # 0x0700AF48 .incbin "levels/menu/main_menu_seg7.0AF48.ia8" -main_menu_seg7_texture_0700AF88: # 0x0700AF88 + +texture_menu_font_char_jp_hiragana_c: # 0x0700AF88 .incbin "levels/menu/main_menu_seg7.0AF88.ia8" -main_menu_seg7_texture_0700AFC8: # 0x0700AFC8 + +texture_menu_font_char_jp_hiragana_o: # 0x0700AFC8 .incbin "levels/menu/main_menu_seg7.0AFC8.ia8" -main_menu_seg7_texture_0700B008: # 0x0700B008 + +texture_menu_font_char_jp_hiragana_ka: # 0x0700B008 .incbin "levels/menu/main_menu_seg7.0B008.ia8" -main_menu_seg7_texture_0700B048: # 0x0700B048 + +texture_menu_font_char_jp_hiragana_ki: # 0x0700B048 .incbin "levels/menu/main_menu_seg7.0B048.ia8" -main_menu_seg7_texture_0700B088: # 0x0700B088 + +texture_menu_font_char_jp_hiragana_ku: # 0x0700B088 .incbin "levels/menu/main_menu_seg7.0B088.ia8" -main_menu_seg7_texture_0700B0C8: # 0x0700B0C8 + +texture_menu_font_char_jp_hiragana_ke: # 0x0700B0C8 .incbin "levels/menu/main_menu_seg7.0B0C8.ia8" -main_menu_seg7_texture_0700B108: # 0x0700B108 + +texture_menu_font_char_jp_hiragana_ko: # 0x0700B108 .incbin "levels/menu/main_menu_seg7.0B108.ia8" -main_menu_seg7_texture_0700B148: # 0x0700B148 + +texture_menu_font_char_jp_hiragana_sa: # 0x0700B148 .incbin "levels/menu/main_menu_seg7.0B148.ia8" -main_menu_seg7_texture_0700B188: # 0x0700B188 + +texture_menu_font_char_jp_hiragana_shi: # 0x0700B188 .incbin "levels/menu/main_menu_seg7.0B188.ia8" -main_menu_seg7_texture_0700B1C8: # 0x0700B1C8 + +texture_menu_font_char_jp_hiragana_su: # 0x0700B1C8 .incbin "levels/menu/main_menu_seg7.0B1C8.ia8" -main_menu_seg7_texture_0700B208: # 0x0700B208 + +texture_menu_font_char_jp_hiragana_se: # 0x0700B208 .incbin "levels/menu/main_menu_seg7.0B208.ia8" -main_menu_seg7_texture_0700B248: # 0x0700B248 + +texture_menu_font_char_jp_hiragana_so: # 0x0700B248 .incbin "levels/menu/main_menu_seg7.0B248.ia8" -main_menu_seg7_texture_0700B288: # 0x0700B288 + +texture_menu_font_char_jp_hiragana_ta: # 0x0700B288 .incbin "levels/menu/main_menu_seg7.0B288.ia8" -main_menu_seg7_texture_0700B2C8: # 0x0700B2C8 + +texture_menu_font_char_jp_hiragana_chi: # 0x0700B2C8 .incbin "levels/menu/main_menu_seg7.0B2C8.ia8" -main_menu_seg7_texture_0700B308: # 0x0700B308 + +texture_menu_font_char_jp_hiragana_tsu: # 0x0700B308 .incbin "levels/menu/main_menu_seg7.0B308.ia8" -main_menu_seg7_texture_0700B348: # 0x0700B348 + +texture_menu_font_char_jp_hiragana_te: # 0x0700B348 .incbin "levels/menu/main_menu_seg7.0B348.ia8" -main_menu_seg7_texture_0700B388: # 0x0700B388 + +texture_menu_font_char_jp_hiragana_to: # 0x0700B388 .incbin "levels/menu/main_menu_seg7.0B388.ia8" -main_menu_seg7_texture_0700B3C8: # 0x0700B3C8 + +texture_menu_font_char_jp_hiragana_na: # 0x0700B3C8 .incbin "levels/menu/main_menu_seg7.0B3C8.ia8" -main_menu_seg7_texture_0700B408: # 0x0700B408 + +texture_menu_font_char_jp_hiragana_ni: # 0x0700B408 .incbin "levels/menu/main_menu_seg7.0B408.ia8" -main_menu_seg7_texture_0700B448: # 0x0700B448 + +texture_menu_font_char_jp_hiragana_nu: # 0x0700B448 .incbin "levels/menu/main_menu_seg7.0B448.ia8" -main_menu_seg7_texture_0700B488: # 0x0700B488 + +texture_menu_font_char_jp_hiragana_ne: # 0x0700B488 .incbin "levels/menu/main_menu_seg7.0B488.ia8" -main_menu_seg7_texture_0700B4C8: # 0x0700B4C8 + +texture_menu_font_char_jp_hiragana_no: # 0x0700B4C8 .incbin "levels/menu/main_menu_seg7.0B4C8.ia8" -main_menu_seg7_texture_0700B508: # 0x0700B508 + +texture_menu_font_char_jp_hiragana_ha: # 0x0700B508 .incbin "levels/menu/main_menu_seg7.0B508.ia8" -main_menu_seg7_texture_0700B548: # 0x0700B548 + +texture_menu_font_char_jp_hiragana_hi: # 0x0700B548 .incbin "levels/menu/main_menu_seg7.0B548.ia8" -main_menu_seg7_texture_0700B588: # 0x0700B588 + +texture_menu_font_char_jp_hiragana_hu: # 0x0700B588 .incbin "levels/menu/main_menu_seg7.0B588.ia8" -main_menu_seg7_texture_0700B5C8: # 0x0700B5C8 + +texture_menu_font_char_jp_hiragana_he: # 0x0700B5C8 .incbin "levels/menu/main_menu_seg7.0B5C8.ia8" -main_menu_seg7_texture_0700B608: # 0x0700B608 + +texture_menu_font_char_jp_hiragana_ho: # 0x0700B608 .incbin "levels/menu/main_menu_seg7.0B608.ia8" -main_menu_seg7_texture_0700B648: # 0x0700B648 + +texture_menu_font_char_jp_hiragana_ma: # 0x0700B648 .incbin "levels/menu/main_menu_seg7.0B648.ia8" -main_menu_seg7_texture_0700B688: # 0x0700B688 + +texture_menu_font_char_jp_hiragana_mi: # 0x0700B688 .incbin "levels/menu/main_menu_seg7.0B688.ia8" -main_menu_seg7_texture_0700B6C8: # 0x0700B6C8 + +texture_menu_font_char_jp_hiragana_mu: # 0x0700B6C8 .incbin "levels/menu/main_menu_seg7.0B6C8.ia8" -main_menu_seg7_texture_0700B708: # 0x0700B708 + +texture_menu_font_char_jp_hiragana_me: # 0x0700B708 .incbin "levels/menu/main_menu_seg7.0B708.ia8" -main_menu_seg7_texture_0700B748: # 0x0700B748 + +texture_menu_font_char_jp_hiragana_mo: # 0x0700B748 .incbin "levels/menu/main_menu_seg7.0B748.ia8" -main_menu_seg7_texture_0700B788: # 0x0700B788 + +texture_menu_font_char_jp_hiragana_ya: # 0x0700B788 .incbin "levels/menu/main_menu_seg7.0B788.ia8" -main_menu_seg7_texture_0700B7C8: # 0x0700B7C8 + +texture_menu_font_char_jp_hiragana_yu: # 0x0700B7C8 .incbin "levels/menu/main_menu_seg7.0B7C8.ia8" -main_menu_seg7_texture_0700B808: # 0x0700B808 + +texture_menu_font_char_jp_hiragana_yo: # 0x0700B808 .incbin "levels/menu/main_menu_seg7.0B808.ia8" -main_menu_seg7_texture_0700B848: # 0x0700B848 + +texture_menu_font_char_jp_hiragana_ra: # 0x0700B848 .incbin "levels/menu/main_menu_seg7.0B848.ia8" -main_menu_seg7_texture_0700B888: # 0x0700B888 + +texture_menu_font_char_jp_hiragana_ri: # 0x0700B888 .incbin "levels/menu/main_menu_seg7.0B888.ia8" -main_menu_seg7_texture_0700B8C8: # 0x0700B8C8 + +texture_menu_font_char_jp_hiragana_ru: # 0x0700B8C8 .incbin "levels/menu/main_menu_seg7.0B8C8.ia8" -main_menu_seg7_texture_0700B908: # 0x0700B908 + +texture_menu_font_char_jp_hiragana_re: # 0x0700B908 .incbin "levels/menu/main_menu_seg7.0B908.ia8" -main_menu_seg7_texture_0700B948: # 0x0700B948 + +texture_menu_font_char_jp_hiragana_ro: # 0x0700B948 .incbin "levels/menu/main_menu_seg7.0B948.ia8" -main_menu_seg7_texture_0700B988: # 0x0700B988 + +texture_menu_font_char_jp_hiragana_wa: # 0x0700B988 .incbin "levels/menu/main_menu_seg7.0B988.ia8" -main_menu_seg7_texture_0700B9C8: # 0x0700B9C8 + +texture_menu_font_char_jp_hiragana_wo: # 0x0700B9C8 .incbin "levels/menu/main_menu_seg7.0B9C8.ia8" -main_menu_seg7_texture_0700BA08: # 0x0700BA08 + +texture_menu_font_char_jp_hiragana_n: # 0x0700BA08 .incbin "levels/menu/main_menu_seg7.0BA08.ia8" -main_menu_seg7_texture_0700BA48: # 0x0700BA48 + +texture_menu_font_char_jp_hiragana_small_a: # 0x0700BA48 .incbin "levels/menu/main_menu_seg7.0BA48.ia8" -main_menu_seg7_texture_0700BA88: # 0x0700BA88 + +texture_menu_font_char_jp_hiragana_small_i: # 0x0700BA88 .incbin "levels/menu/main_menu_seg7.0BA88.ia8" -main_menu_seg7_texture_0700BAC8: # 0x0700BAC8 + +texture_menu_font_char_jp_hiragana_small_u: # 0x0700BAC8 .incbin "levels/menu/main_menu_seg7.0BAC8.ia8" -main_menu_seg7_texture_0700BB08: # 0x0700BB08 + +texture_menu_font_char_jp_hiragana_small_e: # 0x0700BB08 .incbin "levels/menu/main_menu_seg7.0BB08.ia8" -main_menu_seg7_texture_0700BB48: # 0x0700BB48 + +texture_menu_font_char_jp_hiragana_small_o: # 0x0700BB48 .incbin "levels/menu/main_menu_seg7.0BB48.ia8" -main_menu_seg7_texture_0700BB88: # 0x0700BB88 + +texture_menu_font_char_jp_hiragana_small_ka: # 0x0700BB88 .incbin "levels/menu/main_menu_seg7.0BB88.ia8" -main_menu_seg7_texture_0700BBC8: # 0x0700BBC8 + +texture_menu_font_char_jp_hiragana_small_yu: # 0x0700BBC8 .incbin "levels/menu/main_menu_seg7.0BBC8.ia8" -main_menu_seg7_texture_0700BC08: # 0x0700BC08 + +texture_menu_font_char_jp_hiragana_small_yo: # 0x0700BC08 .incbin "levels/menu/main_menu_seg7.0BC08.ia8" -main_menu_seg7_texture_0700BC48: # 0x0700BC48 + +texture_menu_font_char_jp_hiragana_small_tsu: # 0x0700BC48 .incbin "levels/menu/main_menu_seg7.0BC48.ia8" -main_menu_seg7_texture_0700BC88: # 0x0700BC88 + +texture_menu_font_char_jp_handakuten: # 0x0700BC88 .incbin "levels/menu/main_menu_seg7.0BC88.ia8" -main_menu_seg7_texture_0700BCC8: # 0x0700BCC8 + +texture_menu_font_char_jp_dakuten: # 0x0700BCC8 .incbin "levels/menu/main_menu_seg7.0BCC8.ia8" -main_menu_seg7_texture_0700BD08: # 0x0700BD08 + +texture_menu_font_char_jp_long_vowel: # 0x0700BD08 .incbin "levels/menu/main_menu_seg7.0BD08.ia8" -main_menu_seg7_texture_0700BD48: # 0x0700BD48 + +texture_menu_font_char_jp_katakana_a: # 0x0700BD48 .incbin "levels/menu/main_menu_seg7.0BD48.ia8" -main_menu_seg7_texture_0700BD88: # 0x0700BD88 + +texture_menu_font_char_jp_katakana_i: # 0x0700BD88 .incbin "levels/menu/main_menu_seg7.0BD88.ia8" -main_menu_seg7_texture_0700BDC8: # 0x0700BDC8 + +texture_menu_font_char_jp_katakana_u: # 0x0700BDC8 .incbin "levels/menu/main_menu_seg7.0BDC8.ia8" -main_menu_seg7_texture_0700BE08: # 0x0700BE08 + +texture_menu_font_char_jp_katakana_e: # 0x0700BE08 .incbin "levels/menu/main_menu_seg7.0BE08.ia8" -main_menu_seg7_texture_0700BE48: # 0x0700BE48 + +texture_menu_font_char_jp_katakana_o: # 0x0700BE48 .incbin "levels/menu/main_menu_seg7.0BE48.ia8" -main_menu_seg7_texture_0700BE88: # 0x0700BE88 + +texture_menu_font_char_jp_katakana_ka: # 0x0700BE88 .incbin "levels/menu/main_menu_seg7.0BE88.ia8" -main_menu_seg7_texture_0700BEC8: # 0x0700BEC8 + +texture_menu_font_char_jp_katakana_ki: # 0x0700BEC8 .incbin "levels/menu/main_menu_seg7.0BEC8.ia8" -main_menu_seg7_texture_0700BF08: # 0x0700BF08 + +texture_menu_font_char_jp_katakana_ku: # 0x0700BF08 .incbin "levels/menu/main_menu_seg7.0BF08.ia8" -main_menu_seg7_texture_0700BF48: # 0x0700BF48 + +texture_menu_font_char_jp_katakana_ke: # 0x0700BF48 .incbin "levels/menu/main_menu_seg7.0BF48.ia8" -main_menu_seg7_texture_0700BF88: # 0x0700BF88 + +texture_menu_font_char_jp_katakana_ko: # 0x0700BF88 .incbin "levels/menu/main_menu_seg7.0BF88.ia8" -main_menu_seg7_texture_0700BFC8: # 0x0700BFC8 + +texture_menu_font_char_jp_katakana_sa: # 0x0700BFC8 .incbin "levels/menu/main_menu_seg7.0BFC8.ia8" -main_menu_seg7_texture_0700C008: # 0x0700C008 + +texture_menu_font_char_jp_katakana_shi: # 0x0700C008 .incbin "levels/menu/main_menu_seg7.0C008.ia8" -main_menu_seg7_texture_0700C048: # 0x0700C048 + +texture_menu_font_char_jp_katakana_su: # 0x0700C048 .incbin "levels/menu/main_menu_seg7.0C048.ia8" -main_menu_seg7_texture_0700C088: # 0x0700C088 + +texture_menu_font_char_jp_katakana_se: # 0x0700C088 .incbin "levels/menu/main_menu_seg7.0C088.ia8" -main_menu_seg7_texture_0700C0C8: # 0x0700C0C8 + +texture_menu_font_char_jp_katakana_so: # 0x0700C0C8 .incbin "levels/menu/main_menu_seg7.0C0C8.ia8" -main_menu_seg7_texture_0700C108: # 0x0700C108 + +texture_menu_font_char_jp_katakana_ta: # 0x0700C108 .incbin "levels/menu/main_menu_seg7.0C108.ia8" -main_menu_seg7_texture_0700C148: # 0x0700C148 + +texture_menu_font_char_jp_katakana_chi: # 0x0700C148 .incbin "levels/menu/main_menu_seg7.0C148.ia8" -main_menu_seg7_texture_0700C188: # 0x0700C188 + +texture_menu_font_char_jp_katakana_tsu: # 0x0700C188 .incbin "levels/menu/main_menu_seg7.0C188.ia8" -main_menu_seg7_texture_0700C1C8: # 0x0700C1C8 + +texture_menu_font_char_jp_katakana_te: # 0x0700C1C8 .incbin "levels/menu/main_menu_seg7.0C1C8.ia8" -main_menu_seg7_texture_0700C208: # 0x0700C208 + +texture_menu_font_char_jp_katakana_to: # 0x0700C208 .incbin "levels/menu/main_menu_seg7.0C208.ia8" -main_menu_seg7_texture_0700C248: # 0x0700C248 + +texture_menu_font_char_jp_katakana_na: # 0x0700C248 .incbin "levels/menu/main_menu_seg7.0C248.ia8" -main_menu_seg7_texture_0700C288: # 0x0700C288 + +texture_menu_font_char_jp_katakana_ni: # 0x0700C288 .incbin "levels/menu/main_menu_seg7.0C288.ia8" -main_menu_seg7_texture_0700C2C8: # 0x0700C2C8 + +texture_menu_font_char_jp_katakana_nu: # 0x0700C2C8 .incbin "levels/menu/main_menu_seg7.0C2C8.ia8" -main_menu_seg7_texture_0700C308: # 0x0700C308 + +texture_menu_font_char_jp_katakana_ne: # 0x0700C308 .incbin "levels/menu/main_menu_seg7.0C308.ia8" -main_menu_seg7_texture_0700C348: # 0x0700C348 + +texture_menu_font_char_jp_katakana_no: # 0x0700C348 .incbin "levels/menu/main_menu_seg7.0C348.ia8" -main_menu_seg7_texture_0700C388: # 0x0700C388 + +texture_menu_font_char_jp_katakana_ha: # 0x0700C388 .incbin "levels/menu/main_menu_seg7.0C388.ia8" -main_menu_seg7_texture_0700C3C8: # 0x0700C3C8 + +texture_menu_font_char_jp_katakana_hi: # 0x0700C3C8 .incbin "levels/menu/main_menu_seg7.0C3C8.ia8" -main_menu_seg7_texture_0700C408: # 0x0700C408 + +texture_menu_font_char_jp_katakana_hu: # 0x0700C408 .incbin "levels/menu/main_menu_seg7.0C408.ia8" -main_menu_seg7_texture_0700C448: # 0x0700C448 + +texture_menu_font_char_jp_katakana_he: # 0x0700C448 .incbin "levels/menu/main_menu_seg7.0C448.ia8" -main_menu_seg7_texture_0700C488: # 0x0700C488 + +texture_menu_font_char_jp_katakana_ho: # 0x0700C488 .incbin "levels/menu/main_menu_seg7.0C488.ia8" -main_menu_seg7_texture_0700C4C8: # 0x0700C4C8 + +texture_menu_font_char_jp_katakana_ma: # 0x0700C4C8 .incbin "levels/menu/main_menu_seg7.0C4C8.ia8" -main_menu_seg7_texture_0700C508: # 0x0700C508 + +texture_menu_font_char_jp_katakana_mi: # 0x0700C508 .incbin "levels/menu/main_menu_seg7.0C508.ia8" -main_menu_seg7_texture_0700C548: # 0x0700C548 + +texture_menu_font_char_jp_katakana_mu: # 0x0700C548 .incbin "levels/menu/main_menu_seg7.0C548.ia8" -main_menu_seg7_texture_0700C588: # 0x0700C588 + +texture_menu_font_char_jp_katakana_me: # 0x0700C588 .incbin "levels/menu/main_menu_seg7.0C588.ia8" -main_menu_seg7_texture_0700C5C8: # 0x0700C5C8 + +texture_menu_font_char_jp_katakana_mo: # 0x0700C5C8 .incbin "levels/menu/main_menu_seg7.0C5C8.ia8" -main_menu_seg7_texture_0700C608: # 0x0700C608 + +texture_menu_font_char_jp_katakana_ya: # 0x0700C608 .incbin "levels/menu/main_menu_seg7.0C608.ia8" -main_menu_seg7_texture_0700C648: # 0x0700C648 + +texture_menu_font_char_jp_katakana_yu: # 0x0700C648 .incbin "levels/menu/main_menu_seg7.0C648.ia8" -main_menu_seg7_texture_0700C688: # 0x0700C688 + +texture_menu_font_char_jp_katakana_yo: # 0x0700C688 .incbin "levels/menu/main_menu_seg7.0C688.ia8" -main_menu_seg7_texture_0700C6C8: # 0x0700C6C8 + +texture_menu_font_char_jp_katakana_ra: # 0x0700C6C8 .incbin "levels/menu/main_menu_seg7.0C6C8.ia8" -main_menu_seg7_texture_0700C708: # 0x0700C708 + +texture_menu_font_char_jp_katakana_ri: # 0x0700C708 .incbin "levels/menu/main_menu_seg7.0C708.ia8" -main_menu_seg7_texture_0700C748: # 0x0700C748 + +texture_menu_font_char_jp_katakana_ru: # 0x0700C748 .incbin "levels/menu/main_menu_seg7.0C748.ia8" -main_menu_seg7_texture_0700C788: # 0x0700C788 + +texture_menu_font_char_jp_katakana_re: # 0x0700C788 .incbin "levels/menu/main_menu_seg7.0C788.ia8" -main_menu_seg7_texture_0700C7C8: # 0x0700C7C8 + +texture_menu_font_char_jp_katakana_ro: # 0x0700C7C8 .incbin "levels/menu/main_menu_seg7.0C7C8.ia8" -main_menu_seg7_texture_0700C808: # 0x0700C808 + +texture_menu_font_char_jp_katakana_wa: # 0x0700C808 .incbin "levels/menu/main_menu_seg7.0C808.ia8" -main_menu_seg7_texture_0700C848: # 0x0700C848 + +texture_menu_font_char_jp_katakana_wo: # 0x0700C848 .incbin "levels/menu/main_menu_seg7.0C848.ia8" -main_menu_seg7_texture_0700C888: # 0x0700C888 + +texture_menu_font_char_jp_katakana_n: # 0x0700C888 .incbin "levels/menu/main_menu_seg7.0C888.ia8" -main_menu_seg7_texture_0700C8C8: # 0x0700C8C8 + +texture_menu_font_char_jp_katakana_small_a: # 0x0700C8C8 .incbin "levels/menu/main_menu_seg7.0C8C8.ia8" -main_menu_seg7_texture_0700C908: # 0x0700C908 + +texture_menu_font_char_jp_katakana_small_i: # 0x0700C908 .incbin "levels/menu/main_menu_seg7.0C908.ia8" -main_menu_seg7_texture_0700C948: # 0x0700C948 + +texture_menu_font_char_jp_katakana_small_u: # 0x0700C948 .incbin "levels/menu/main_menu_seg7.0C948.ia8" -main_menu_seg7_texture_0700C988: # 0x0700C988 + +texture_menu_font_char_jp_katakana_small_e: # 0x0700C988 .incbin "levels/menu/main_menu_seg7.0C988.ia8" -main_menu_seg7_texture_0700C9C8: # 0x0700C9C8 + +texture_menu_font_char_jp_katakana_small_o: # 0x0700C9C8 .incbin "levels/menu/main_menu_seg7.0C9C8.ia8" -main_menu_seg7_texture_0700CA08: # 0x0700CA08 + +texture_menu_font_char_jp_katakana_small_ka: # 0x0700CA08 .incbin "levels/menu/main_menu_seg7.0CA08.ia8" -main_menu_seg7_texture_0700CA48: # 0x0700CA48 + +texture_menu_font_char_jp_katakana_small_yu: # 0x0700CA48 .incbin "levels/menu/main_menu_seg7.0CA48.ia8" -main_menu_seg7_texture_0700CA88: # 0x0700CA88 + +texture_menu_font_char_jp_katakana_small_yo: # 0x0700CA88 .incbin "levels/menu/main_menu_seg7.0CA88.ia8" -main_menu_seg7_texture_0700CAC8: # 0x0700CAC8 + +texture_menu_font_char_jp_katakana_small_tsu: # 0x0700CAC8 .incbin "levels/menu/main_menu_seg7.0CAC8.ia8" -main_menu_seg7_texture_0700CB08: # 0x0700CB08 + +texture_menu_font_char_jp_A: # 0x0700CB08 .incbin "levels/menu/main_menu_seg7.0CB08.ia8" -main_menu_seg7_texture_0700CB48: # 0x0700CB48 + +texture_menu_font_char_jp_B: # 0x0700CB48 .incbin "levels/menu/main_menu_seg7.0CB48.ia8" -main_menu_seg7_texture_0700CB88: # 0x0700CB88 + +texture_menu_font_char_jp_C: # 0x0700CB88 .incbin "levels/menu/main_menu_seg7.0CB88.ia8" -main_menu_seg7_texture_0700CBC8: # 0x0700CBC8 + +texture_menu_font_char_jp_D: # 0x0700CBC8 .incbin "levels/menu/main_menu_seg7.0CBC8.ia8" -main_menu_seg7_texture_0700CC08: # 0x0700CC08 + +texture_menu_font_char_jp_coin: # 0x0700CC08 .incbin "levels/menu/main_menu_seg7.0CC08.ia8" -main_menu_seg7_texture_0700CC48: # 0x0700CC48 + +texture_menu_font_char_jp_star_filled: # 0x0700CC48 .incbin "levels/menu/main_menu_seg7.0CC48.ia8" -main_menu_seg7_texture_0700CC88: # 0x0700CC88 + +texture_menu_font_char_jp_multiply: # 0x0700CC88 .incbin "levels/menu/main_menu_seg7.0CC88.ia8" -main_menu_seg7_texture_0700CCC8: # 0x0700CCC8 + +texture_menu_font_char_jp_exclamation: # 0x0700CCC8 .incbin "levels/menu/main_menu_seg7.0CCC8.ia8" .else -texture_0700AC40: # 0x0700AC40 +texture_menu_font_char_0: # 0x0700AC40 .incbin "levels/menu/main_menu_seg7_us.0AC40.ia8" -texture_0700AC80: # 0x0700AC80 +texture_menu_font_char_1: # 0x0700AC80 .incbin "levels/menu/main_menu_seg7_us.0AC80.ia8" -texture_0700ACC0: # 0x0700ACC0 +texture_menu_font_char_2: # 0x0700ACC0 .incbin "levels/menu/main_menu_seg7_us.0ACC0.ia8" -texture_0700AD00: # 0x0700AD00 +texture_menu_font_char_3: # 0x0700AD00 .incbin "levels/menu/main_menu_seg7_us.0AD00.ia8" -texture_0700AD40: # 0x0700AD40 +texture_menu_font_char_4: # 0x0700AD40 .incbin "levels/menu/main_menu_seg7_us.0AD40.ia8" -texture_0700AD80: # 0x0700AD80 +texture_menu_font_char_5: # 0x0700AD80 .incbin "levels/menu/main_menu_seg7_us.0AD80.ia8" -texture_0700ADC0: # 0x0700ADC0 +texture_menu_font_char_6: # 0x0700ADC0 .incbin "levels/menu/main_menu_seg7_us.0ADC0.ia8" -texture_0700AE00: # 0x0700AE00 +texture_menu_font_char_7: # 0x0700AE00 .incbin "levels/menu/main_menu_seg7_us.0AE00.ia8" -texture_0700AE40: # 0x0700AE40 +texture_menu_font_char_8: # 0x0700AE40 .incbin "levels/menu/main_menu_seg7_us.0AE40.ia8" -texture_0700AE80: # 0x0700AE80 +texture_menu_font_char_9: # 0x0700AE80 .incbin "levels/menu/main_menu_seg7_us.0AE80.ia8" -texture_0700AEC0: # 0x0700AEC0 +texture_menu_font_char_A: # 0x0700AEC0 .incbin "levels/menu/main_menu_seg7_us.0AEC0.ia8" -texture_0700AF00: # 0x0700AF00 +texture_menu_font_char_B: # 0x0700AF00 .incbin "levels/menu/main_menu_seg7_us.0AF00.ia8" -texture_0700AF40: # 0x0700AF40 +texture_menu_font_char_C: # 0x0700AF40 .incbin "levels/menu/main_menu_seg7_us.0AF40.ia8" -texture_0700AF80: # 0x0700AF80 +texture_menu_font_char_D: # 0x0700AF80 .ifdef VERSION_EU .incbin "levels/menu/main_menu_seg7_eu.0AF80.ia8" .else .incbin "levels/menu/main_menu_seg7_us.0AF80.ia8" .endif -texture_0700AFC0: # 0x0700AFC0 +texture_menu_font_char_E: # 0x0700AFC0 .incbin "levels/menu/main_menu_seg7_us.0AFC0.ia8" -texture_0700B000: # 0x0700B000 +texture_menu_font_char_F: # 0x0700B000 .incbin "levels/menu/main_menu_seg7_us.0B000.ia8" -texture_0700B040: # 0x0700B040 +texture_menu_font_char_G: # 0x0700B040 .incbin "levels/menu/main_menu_seg7_us.0B040.ia8" -texture_0700B080: # 0x0700B080 +texture_menu_font_char_H: # 0x0700B080 .incbin "levels/menu/main_menu_seg7_us.0B080.ia8" -texture_0700B0C0: # 0x0700B0C0 +texture_menu_font_char_I: # 0x0700B0C0 .incbin "levels/menu/main_menu_seg7_us.0B0C0.ia8" -texture_0700B100: # 0x0700B100 +texture_menu_font_char_J: # 0x0700B100 .incbin "levels/menu/main_menu_seg7_us.0B100.ia8" -texture_0700B140: # 0x0700B140 +texture_menu_font_char_K: # 0x0700B140 .incbin "levels/menu/main_menu_seg7_us.0B140.ia8" -texture_0700B180: # 0x0700B180 +texture_menu_font_char_L: # 0x0700B180 .incbin "levels/menu/main_menu_seg7_us.0B180.ia8" -texture_0700B1C0: # 0x0700B1C0 +texture_menu_font_char_M: # 0x0700B1C0 .incbin "levels/menu/main_menu_seg7_us.0B1C0.ia8" -texture_0700B200: # 0x0700B200 +texture_menu_font_char_N: # 0x0700B200 .incbin "levels/menu/main_menu_seg7_us.0B200.ia8" -texture_0700B240: # 0x0700B240 +texture_menu_font_char_O: # 0x0700B240 .incbin "levels/menu/main_menu_seg7_us.0B240.ia8" -texture_0700B280: # 0x0700B280 +texture_menu_font_char_P: # 0x0700B280 .incbin "levels/menu/main_menu_seg7_us.0B280.ia8" -texture_0700B2C0: # 0x0700B2C0 +texture_menu_font_char_Q: # 0x0700B2C0 .incbin "levels/menu/main_menu_seg7_us.0B2C0.ia8" -texture_0700B300: # 0x0700B300 +texture_menu_font_char_R: # 0x0700B300 .incbin "levels/menu/main_menu_seg7_us.0B300.ia8" -texture_0700B340: # 0x0700B340 +texture_menu_font_char_S: # 0x0700B340 .incbin "levels/menu/main_menu_seg7_us.0B340.ia8" -texture_0700B380: # 0x0700B380 +texture_menu_font_char_T: # 0x0700B380 .incbin "levels/menu/main_menu_seg7_us.0B380.ia8" -texture_0700B3C0: # 0x0700B3C0 +texture_menu_font_char_U: # 0x0700B3C0 .incbin "levels/menu/main_menu_seg7_us.0B3C0.ia8" -texture_0700B400: # 0x0700B400 +texture_menu_font_char_V: # 0x0700B400 .incbin "levels/menu/main_menu_seg7_us.0B400.ia8" -texture_0700B440: # 0x0700B440 +texture_menu_font_char_W: # 0x0700B440 .incbin "levels/menu/main_menu_seg7_us.0B440.ia8" -texture_0700B480: # 0x0700B480 +texture_menu_font_char_X: # 0x0700B480 .incbin "levels/menu/main_menu_seg7_us.0B480.ia8" -texture_0700B4C0: # 0x0700B4C0 +texture_menu_font_char_Y: # 0x0700B4C0 .incbin "levels/menu/main_menu_seg7_us.0B4C0.ia8" -texture_0700B500: # 0x0700B500 +texture_menu_font_char_Z: # 0x0700B500 .incbin "levels/menu/main_menu_seg7_us.0B500.ia8" -texture_0700B540: # 0x0700B540 +texture_menu_font_char_coin: # 0x0700B540 .incbin "levels/menu/main_menu_seg7_us.0B540.ia8" -texture_0700B580: # 0x0700B580 +texture_menu_font_char_multiply: # 0x0700B580 .incbin "levels/menu/main_menu_seg7_us.0B580.ia8" -texture_0700B5C0: # 0x0700B5C0 +texture_menu_font_char_star_filled: # 0x0700B5C0 .incbin "levels/menu/main_menu_seg7_us.0B5C0.ia8" -texture_0700B600: # 0x0700B600 +texture_menu_font_char_dash: # 0x0700B600 .incbin "levels/menu/main_menu_seg7_us.0B600.ia8" -texture_0700B640: # 0x0700B640 +texture_menu_font_char_comma: # 0x0700B640 .ifdef VERSION_EU .incbin "levels/menu/main_menu_seg7_eu.0B640.ia8" .else .incbin "levels/menu/main_menu_seg7_us.0B640.ia8" .endif -texture_0700B680: # 0x0700B680 +texture_menu_font_char_apostrophe: # 0x0700B680 .ifdef VERSION_EU .incbin "levels/menu/main_menu_seg7_eu.0B680.ia8" .else .incbin "levels/menu/main_menu_seg7_us.0B680.ia8" .endif -texture_0700B6C0: # 0x0700B6C0 +texture_menu_font_char_exclamation: # 0x0700B6C0 .incbin "levels/menu/main_menu_seg7_us.0B6C0.ia8" -texture_0700B700: # 0x0700B700 +texture_menu_font_char_question: # 0x0700B700 .incbin "levels/menu/main_menu_seg7_us.0B700.ia8" -texture_0700B740: # 0x0700B740 +texture_menu_font_char_mface1: # 0x0700B740 .incbin "levels/menu/main_menu_seg7_us.0B740.ia8" -texture_0700B780: # 0x0700B780 +texture_menu_font_char_mface2: # 0x0700B780 .incbin "levels/menu/main_menu_seg7_us.0B780.ia8" -texture_0700B7C0: # 0x0700B7C0 +texture_menu_font_char_period: # 0x0700B7C0 .incbin "levels/menu/main_menu_seg7_us.0B7C0.ia8" -texture_0700B800: # 0x0700B800 +texture_menu_font_char_ampersand: # 0x0700B800 .incbin "levels/menu/main_menu_seg7_us.0B800.ia8" .endif .ifdef VERSION_EU -texture_0700B840: # 0x0700B840 +texture_menu_font_char_umlaut: # 0x0700B840 .incbin "levels/menu/main_menu_seg7_eu.0B840.ia8" -texture_0700B880: # 0x0700B880 +texture_menu_font_char_cedilla_mayus: # 0x0700B880 .incbin "levels/menu/main_menu_seg7_eu.0B880.ia8" -texture_0700B8C0: # 0x0700B8C0 +texture_menu_font_char_colon: # 0x0700B8C0 .incbin "levels/menu/main_menu_seg7_eu.0B8C0.ia8" .endif -glabel main_menu_seg7_table_0700CD08 # 0x0700CD08 +# Menu small font print table +glabel menu_font_lut # 0x0700CD08 .ifdef VERSION_JP -.word main_menu_seg7_texture_0700AC48, main_menu_seg7_texture_0700AC88, main_menu_seg7_texture_0700ACC8, main_menu_seg7_texture_0700AD08 -.word main_menu_seg7_texture_0700AD48, main_menu_seg7_texture_0700AD88, main_menu_seg7_texture_0700ADC8, main_menu_seg7_texture_0700AE08 -.word main_menu_seg7_texture_0700AE48, main_menu_seg7_texture_0700AE88, main_menu_seg7_texture_0700CB08, main_menu_seg7_texture_0700CB48 -.word main_menu_seg7_texture_0700CB88, main_menu_seg7_texture_0700CBC8, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word main_menu_seg7_texture_0700AEC8, main_menu_seg7_texture_0700AF08, main_menu_seg7_texture_0700AF48, main_menu_seg7_texture_0700AF88 -.word main_menu_seg7_texture_0700AFC8, main_menu_seg7_texture_0700B008, main_menu_seg7_texture_0700B048, main_menu_seg7_texture_0700B088 -.word main_menu_seg7_texture_0700B0C8, main_menu_seg7_texture_0700B108, main_menu_seg7_texture_0700B148, main_menu_seg7_texture_0700B188 -.word main_menu_seg7_texture_0700B1C8, main_menu_seg7_texture_0700B208, main_menu_seg7_texture_0700B248, main_menu_seg7_texture_0700B288 -.word main_menu_seg7_texture_0700B2C8, main_menu_seg7_texture_0700B308, main_menu_seg7_texture_0700B348, main_menu_seg7_texture_0700B388 -.word main_menu_seg7_texture_0700B3C8, main_menu_seg7_texture_0700B408, main_menu_seg7_texture_0700B448, main_menu_seg7_texture_0700B488 -.word main_menu_seg7_texture_0700B4C8, main_menu_seg7_texture_0700B508, main_menu_seg7_texture_0700B548, main_menu_seg7_texture_0700B588 -.word main_menu_seg7_texture_0700B5C8, main_menu_seg7_texture_0700B608, main_menu_seg7_texture_0700B648, main_menu_seg7_texture_0700B688 -.word main_menu_seg7_texture_0700B6C8, main_menu_seg7_texture_0700B708, main_menu_seg7_texture_0700B748, main_menu_seg7_texture_0700B788 -.word main_menu_seg7_texture_0700B7C8, main_menu_seg7_texture_0700B808, main_menu_seg7_texture_0700B848, main_menu_seg7_texture_0700B888 -.word main_menu_seg7_texture_0700B8C8, main_menu_seg7_texture_0700B908, main_menu_seg7_texture_0700B948, main_menu_seg7_texture_0700B988 -.word main_menu_seg7_texture_0700B9C8, main_menu_seg7_texture_0700BA08, 0x00000000, 0x00000000 -.word main_menu_seg7_texture_0700BD48, main_menu_seg7_texture_0700BD88, main_menu_seg7_texture_0700BDC8, main_menu_seg7_texture_0700BE08 -.word main_menu_seg7_texture_0700BE48, main_menu_seg7_texture_0700BE88, main_menu_seg7_texture_0700BEC8, main_menu_seg7_texture_0700BF08 -.word main_menu_seg7_texture_0700BF48, main_menu_seg7_texture_0700BF88, main_menu_seg7_texture_0700BFC8, main_menu_seg7_texture_0700C008 -.word main_menu_seg7_texture_0700C048, main_menu_seg7_texture_0700C088, main_menu_seg7_texture_0700C0C8, main_menu_seg7_texture_0700C108 -.word main_menu_seg7_texture_0700C148, main_menu_seg7_texture_0700C188, main_menu_seg7_texture_0700C1C8, main_menu_seg7_texture_0700C208 -.word main_menu_seg7_texture_0700C248, main_menu_seg7_texture_0700C288, main_menu_seg7_texture_0700C2C8, main_menu_seg7_texture_0700C308 -.word main_menu_seg7_texture_0700C348, main_menu_seg7_texture_0700C388, main_menu_seg7_texture_0700C3C8, main_menu_seg7_texture_0700C408 -.word main_menu_seg7_texture_0700C448, main_menu_seg7_texture_0700C488, main_menu_seg7_texture_0700C4C8, main_menu_seg7_texture_0700C508 -.word main_menu_seg7_texture_0700C548, main_menu_seg7_texture_0700C588, main_menu_seg7_texture_0700C5C8, main_menu_seg7_texture_0700C608 -.word main_menu_seg7_texture_0700C648, main_menu_seg7_texture_0700C688, main_menu_seg7_texture_0700C6C8, main_menu_seg7_texture_0700C708 -.word main_menu_seg7_texture_0700C748, main_menu_seg7_texture_0700C788, main_menu_seg7_texture_0700C7C8, main_menu_seg7_texture_0700C808 -.word main_menu_seg7_texture_0700C848, main_menu_seg7_texture_0700C888, 0x00000000, main_menu_seg7_texture_0700BD08 -.word main_menu_seg7_texture_0700BB08, main_menu_seg7_texture_0700BC48, main_menu_seg7_texture_0700BB88, main_menu_seg7_texture_0700BBC8 -.word main_menu_seg7_texture_0700BC08, main_menu_seg7_texture_0700BA48, main_menu_seg7_texture_0700BA88, main_menu_seg7_texture_0700BAC8 -.word main_menu_seg7_texture_0700BB48, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word main_menu_seg7_texture_0700C988, main_menu_seg7_texture_0700CAC8, main_menu_seg7_texture_0700CA08, main_menu_seg7_texture_0700CA48 -.word main_menu_seg7_texture_0700CA88, main_menu_seg7_texture_0700C8C8, main_menu_seg7_texture_0700C908, main_menu_seg7_texture_0700C948 -.word main_menu_seg7_texture_0700C9C8, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word main_menu_seg7_texture_0700BCC8, main_menu_seg7_texture_0700BC88, main_menu_seg7_texture_0700CCC8, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, main_menu_seg7_texture_0700CC08, main_menu_seg7_texture_0700CC48, main_menu_seg7_texture_0700CC88 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 +.word texture_menu_font_char_jp_0, texture_menu_font_char_jp_1, texture_menu_font_char_jp_2, texture_menu_font_char_jp_3 +.word texture_menu_font_char_jp_4, texture_menu_font_char_jp_5, texture_menu_font_char_jp_6, texture_menu_font_char_jp_7 +.word texture_menu_font_char_jp_8, texture_menu_font_char_jp_9, texture_menu_font_char_jp_A, texture_menu_font_char_jp_B +.word texture_menu_font_char_jp_C, texture_menu_font_char_jp_D, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word texture_menu_font_char_jp_hiragana_a, texture_menu_font_char_jp_hiragana_i, texture_menu_font_char_jp_hiragana_u, texture_menu_font_char_jp_hiragana_c +.word texture_menu_font_char_jp_hiragana_o, texture_menu_font_char_jp_hiragana_ka, texture_menu_font_char_jp_hiragana_ki, texture_menu_font_char_jp_hiragana_ku +.word texture_menu_font_char_jp_hiragana_ke, texture_menu_font_char_jp_hiragana_ko, texture_menu_font_char_jp_hiragana_sa, texture_menu_font_char_jp_hiragana_shi +.word texture_menu_font_char_jp_hiragana_su, texture_menu_font_char_jp_hiragana_se, texture_menu_font_char_jp_hiragana_so, texture_menu_font_char_jp_hiragana_ta +.word texture_menu_font_char_jp_hiragana_chi, texture_menu_font_char_jp_hiragana_tsu, texture_menu_font_char_jp_hiragana_te, texture_menu_font_char_jp_hiragana_to +.word texture_menu_font_char_jp_hiragana_na, texture_menu_font_char_jp_hiragana_ni, texture_menu_font_char_jp_hiragana_nu, texture_menu_font_char_jp_hiragana_ne +.word texture_menu_font_char_jp_hiragana_no, texture_menu_font_char_jp_hiragana_ha, texture_menu_font_char_jp_hiragana_hi, texture_menu_font_char_jp_hiragana_hu +.word texture_menu_font_char_jp_hiragana_he, texture_menu_font_char_jp_hiragana_ho, texture_menu_font_char_jp_hiragana_ma, texture_menu_font_char_jp_hiragana_mi +.word texture_menu_font_char_jp_hiragana_mu, texture_menu_font_char_jp_hiragana_me, texture_menu_font_char_jp_hiragana_mo, texture_menu_font_char_jp_hiragana_ya +.word texture_menu_font_char_jp_hiragana_yu, texture_menu_font_char_jp_hiragana_yo, texture_menu_font_char_jp_hiragana_ra, texture_menu_font_char_jp_hiragana_ri +.word texture_menu_font_char_jp_hiragana_ru, texture_menu_font_char_jp_hiragana_re, texture_menu_font_char_jp_hiragana_ro, texture_menu_font_char_jp_hiragana_wa +.word texture_menu_font_char_jp_hiragana_wo, texture_menu_font_char_jp_hiragana_n, 0x0, 0x0 +.word texture_menu_font_char_jp_katakana_a, texture_menu_font_char_jp_katakana_i, texture_menu_font_char_jp_katakana_u, texture_menu_font_char_jp_katakana_e +.word texture_menu_font_char_jp_katakana_o, texture_menu_font_char_jp_katakana_ka, texture_menu_font_char_jp_katakana_ki, texture_menu_font_char_jp_katakana_ku +.word texture_menu_font_char_jp_katakana_ke, texture_menu_font_char_jp_katakana_ko, texture_menu_font_char_jp_katakana_sa, texture_menu_font_char_jp_katakana_shi +.word texture_menu_font_char_jp_katakana_su, texture_menu_font_char_jp_katakana_se, texture_menu_font_char_jp_katakana_so, texture_menu_font_char_jp_katakana_ta +.word texture_menu_font_char_jp_katakana_chi, texture_menu_font_char_jp_katakana_tsu, texture_menu_font_char_jp_katakana_te, texture_menu_font_char_jp_katakana_to +.word texture_menu_font_char_jp_katakana_na, texture_menu_font_char_jp_katakana_ni, texture_menu_font_char_jp_katakana_nu, texture_menu_font_char_jp_katakana_ne +.word texture_menu_font_char_jp_katakana_no, texture_menu_font_char_jp_katakana_ha, texture_menu_font_char_jp_katakana_hi, texture_menu_font_char_jp_katakana_hu +.word texture_menu_font_char_jp_katakana_he, texture_menu_font_char_jp_katakana_ho, texture_menu_font_char_jp_katakana_ma, texture_menu_font_char_jp_katakana_mi +.word texture_menu_font_char_jp_katakana_mu, texture_menu_font_char_jp_katakana_me, texture_menu_font_char_jp_katakana_mo, texture_menu_font_char_jp_katakana_ya +.word texture_menu_font_char_jp_katakana_yu, texture_menu_font_char_jp_katakana_yo, texture_menu_font_char_jp_katakana_ra, texture_menu_font_char_jp_katakana_ri +.word texture_menu_font_char_jp_katakana_ru, texture_menu_font_char_jp_katakana_re, texture_menu_font_char_jp_katakana_ro, texture_menu_font_char_jp_katakana_wa +.word texture_menu_font_char_jp_katakana_wo, texture_menu_font_char_jp_katakana_n, 0x0, texture_menu_font_char_jp_long_vowel +.word texture_menu_font_char_jp_hiragana_small_e, texture_menu_font_char_jp_hiragana_small_tsu, texture_menu_font_char_jp_hiragana_small_ka, texture_menu_font_char_jp_hiragana_small_yu +.word texture_menu_font_char_jp_hiragana_small_yo, texture_menu_font_char_jp_hiragana_small_a, texture_menu_font_char_jp_hiragana_small_i, texture_menu_font_char_jp_hiragana_small_u +.word texture_menu_font_char_jp_hiragana_small_o, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word texture_menu_font_char_jp_katakana_small_e, texture_menu_font_char_jp_katakana_small_tsu, texture_menu_font_char_jp_katakana_small_ka, texture_menu_font_char_jp_katakana_small_yu +.word texture_menu_font_char_jp_katakana_small_yo, texture_menu_font_char_jp_katakana_small_a, texture_menu_font_char_jp_katakana_small_i, texture_menu_font_char_jp_katakana_small_u +.word texture_menu_font_char_jp_katakana_small_o, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word texture_menu_font_char_jp_dakuten, texture_menu_font_char_jp_handakuten, texture_menu_font_char_jp_exclamation, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, texture_menu_font_char_jp_coin, texture_menu_font_char_jp_star_filled, texture_menu_font_char_jp_multiply +.word 0x0, 0x0, 0x0, 0x0 .else -.word texture_0700AC40, texture_0700AC80, texture_0700ACC0, texture_0700AD00 -.word texture_0700AD40, texture_0700AD80, texture_0700ADC0, texture_0700AE00 -.word texture_0700AE40, texture_0700AE80, texture_0700AEC0, texture_0700AF00 -.word texture_0700AF40, texture_0700AF80, texture_0700AFC0, texture_0700B000 -.word texture_0700B040, texture_0700B080, texture_0700B0C0, texture_0700B100 -.word texture_0700B140, texture_0700B180, texture_0700B1C0, texture_0700B200 -.word texture_0700B240, texture_0700B280, texture_0700B2C0, texture_0700B300 -.word texture_0700B340, texture_0700B380, texture_0700B3C0, texture_0700B400 -.word texture_0700B440, texture_0700B480, texture_0700B4C0, texture_0700B500 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, texture_0700B680, texture_0700B7C0 -.word texture_0700B740, texture_0700B780, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, texture_0700B640 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, texture_0700B600 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 +.word texture_menu_font_char_0, texture_menu_font_char_1, texture_menu_font_char_2, texture_menu_font_char_3 +.word texture_menu_font_char_4, texture_menu_font_char_5, texture_menu_font_char_6, texture_menu_font_char_7 +.word texture_menu_font_char_8, texture_menu_font_char_9, texture_menu_font_char_A, texture_menu_font_char_B +.word texture_menu_font_char_C, texture_menu_font_char_D, texture_menu_font_char_E, texture_menu_font_char_F +.word texture_menu_font_char_G, texture_menu_font_char_H, texture_menu_font_char_I, texture_menu_font_char_J +.word texture_menu_font_char_K, texture_menu_font_char_L, texture_menu_font_char_M, texture_menu_font_char_N +.word texture_menu_font_char_O, texture_menu_font_char_P, texture_menu_font_char_Q, texture_menu_font_char_R +.word texture_menu_font_char_S, texture_menu_font_char_T, texture_menu_font_char_U, texture_menu_font_char_V +.word texture_menu_font_char_W, texture_menu_font_char_X, texture_menu_font_char_Y, texture_menu_font_char_Z +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, texture_menu_font_char_apostrophe, texture_menu_font_char_period +.word texture_menu_font_char_mface1, texture_menu_font_char_mface2, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, texture_menu_font_char_comma +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, texture_menu_font_char_dash +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 .ifdef VERSION_EU -.word 0x00000000, texture_0700B800, texture_0700B8C0, 0x00000000 -.word 0x00000000, texture_0700B840, 0x00000000, 0x00000000 -.word 0x00000000, texture_0700B880, 0x00000000, 0x00000000 +.word 0x0, texture_menu_font_char_ampersand, texture_menu_font_char_colon, 0x0 +.word 0x0, texture_menu_font_char_umlaut, 0x0, 0x0 +.word 0x0, texture_menu_font_char_cedilla_mayus, 0x0, 0x0 .else -.word 0x00000000, texture_0700B800, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 +.word 0x0, texture_menu_font_char_ampersand, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 +.word 0x0, 0x0, 0x0, 0x0 .endif -.word 0x00000000, 0x00000000, texture_0700B6C0, 0x00000000 -.word texture_0700B700, 0x00000000, 0x00000000, 0x00000000 -.word 0x00000000, texture_0700B540, texture_0700B5C0, texture_0700B580 -.word 0x00000000, 0x00000000, 0x00000000, 0x00000000 +.word 0x0, 0x0, texture_menu_font_char_exclamation, 0x0 +.word texture_menu_font_char_question, 0x0, 0x0, 0x0 +.word 0x0, texture_menu_font_char_coin, texture_menu_font_char_star_filled, texture_menu_font_char_multiply +.word 0x0, 0x0, 0x0, 0x0 .endif -glabel main_menu_seg7_dl_0700D108 # 0x0700D108 - 0x0700D160 +glabel dl_menu_ia8_text_begin # 0x0700D108 - 0x0700D160 gsDPPipeSync gsDPSetTexturePersp G_TP_NONE gsDPSetCombineModeLERP1Cycle G_CCMUX_TEXEL0, G_CCMUX_0, G_CCMUX_ENVIRONMENT, G_CCMUX_0, G_ACMUX_TEXEL0, G_ACMUX_0, G_ACMUX_ENVIRONMENT, G_ACMUX_0 @@ -1034,7 +1194,7 @@ gsDPSetTile G_IM_FMT_IA, G_IM_SIZ_8b, 1, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP | G_T gsDPSetTileSize 0, 0, 0, 28, 28 gsSPEndDisplayList -glabel main_menu_seg7_dl_0700D160 # 0x0700D160 - 0x0700D1A0 +glabel dl_menu_ia8_text_end # 0x0700D160 - 0x0700D1A0 gsDPPipeSync gsDPSetTexturePersp G_TP_PERSP @@ -1055,41 +1215,41 @@ gsSPEndDisplayList .ifdef VERSION_EU -main_menu_seg7_texture_course_upper: # 0x0700BDA0 - 0x0700CDA0 +texture_menu_course_upper: # 0x0700BDA0 - 0x0700CDA0 .incbin "levels/menu/main_menu_seg7_eu.0BDA0.rgba16" -main_menu_seg7_texture_niveau_upper: # 0x0700CDA0 - 0x0700DDA0 +texture_menu_niveau_upper: # 0x0700CDA0 - 0x0700DDA0 .incbin "levels/menu/main_menu_seg7_eu.0CDA0.rgba16" -main_menu_seg7_texture_kurs_upper: # 0x0700DDA0 - 0x0700EDA0 +texture_menu_kurs_upper: # 0x0700DDA0 - 0x0700EDA0 .incbin "levels/menu/main_menu_seg7_eu.0DDA0.rgba16" -main_menu_seg7_texture_course_lower: # 0x0700EDA0 - 0x0700FDA0 +texture_menu_course_lower: # 0x0700EDA0 - 0x0700FDA0 .incbin "levels/menu/main_menu_seg7_eu.0EDA0.rgba16" .else -main_menu_seg7_texture_course_upper: # 0x0700D1A8 - 0x0700E1A8 +texture_menu_course_upper: # 0x0700D1A8 - 0x0700E1A8 .incbin "levels/menu/main_menu_seg7.0D1A8.rgba16" -main_menu_seg7_texture_course_lower: # 0x0700E1A8 - 0x0700F1A8 +texture_menu_course_lower: # 0x0700E1A8 - 0x0700F1A8 .incbin "levels/menu/main_menu_seg7.0E1A8.rgba16" .endif -main_menu_seg7_vertex_0700F1A8: # 0x0700F1A8 - 0x0700F1E8 +vertex_menu_course_upper: # 0x0700F1A8 - 0x0700F1E8 vertex -32, 0, 0, 0, 1984, 0x00, 0x00, 0x7F, 0x00 vertex 32, 0, 0, 4032, 1984, 0x00, 0x00, 0x7F, 0x00 vertex 32, 32, 0, 4032, 0, 0x00, 0x00, 0x7F, 0x00 vertex -32, 32, 0, 0, 0, 0x00, 0x00, 0x7F, 0x00 -main_menu_seg7_vertex_0700F1E8: # 0x0700F1E8 - 0x0700F228 +vertex_menu_course_lower: # 0x0700F1E8 - 0x0700F228 vertex -32, -32, 0, 0, 1984, 0x00, 0x00, 0x7F, 0x00 vertex 32, -32, 0, 4032, 1984, 0x00, 0x00, 0x7F, 0x00 vertex 32, 0, 0, 4032, 0, 0x00, 0x00, 0x7F, 0x00 vertex -32, 0, 0, 0, 0, 0x00, 0x00, 0x7F, 0x00 -glabel main_menu_seg7_dl_0700F228 # 0x0700F228 - 0x0700F2F8 +glabel dl_menu_rgba16_wood_course # 0x0700F228 - 0x0700F2F8 gsDPPipeSync gsDPSetCombineModeLERP1Cycle G_CCMUX_0, G_CCMUX_0, G_CCMUX_0, G_CCMUX_TEXEL0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_TEXEL0 gsSPTexture -32768, -32768, 0, 0, 1 @@ -1103,22 +1263,22 @@ gsDPSetRenderMode G_RM_AA_TEX_EDGE, G_RM_AA_TEX_EDGE2 .ifdef VERSION_EU gsSPEndDisplayList .else -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_course_upper +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_course_upper .endif gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD gsDPSetTileSize 0, 0, 0, 252, 124 -gsSPVertex main_menu_seg7_vertex_0700F1A8, 4, 0 +gsSPVertex vertex_menu_course_upper, 4, 0 gsSP2Triangles 0, 1, 2, 0x0, 0, 2, 3, 0x0 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_course_lower +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_course_lower gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD gsDPLoadSync gsDPLoadBlock 7, 0, 0, 0x7FF, 0x080 gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD gsDPSetTileSize 0, 0, 0, 252, 124 -gsSPVertex main_menu_seg7_vertex_0700F1E8, 4, 0 +gsSPVertex vertex_menu_course_lower, 4, 0 gsSP2Triangles 0, 1, 2, 0x0, 0, 2, 3, 0x0 # There were multiple matching pairs, so I don't know if this is correct or not. @@ -1133,29 +1293,28 @@ gsDPSetCombineModeLERP1Cycle G_CCMUX_0, G_CCMUX_0, G_CCMUX_0, G_CCMUX_SHADE, G_A gsSPEndDisplayList .ifdef VERSION_EU -glabel main_menu_seg7_dl_0700FEF0 # 0x0700FEF0 - 0x0700FF00 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_course_upper +glabel dl_menu_texture_course_upper # 0x0700FEF0 - 0x0700FF00 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_course_upper gsSPEndDisplayList -glabel main_menu_seg7_dl_0700FF00 # 0x0700FF00 - 0x0700FF10 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_niveau_upper +glabel dl_menu_texture_niveau_upper # 0x0700FF00 - 0x0700FF10 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_niveau_upper gsSPEndDisplayList -glabel main_menu_seg7_dl_0700FF10 # 0x0700FF10 - 0x0700FF20 -gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, main_menu_seg7_texture_kurs_upper +glabel dl_menu_texture_kurs_upper # 0x0700FF10 - 0x0700FF20 +gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_menu_kurs_upper gsSPEndDisplayList .endif glabel main_menu_seg7_collision # 0x0700F2F8 - 0x0700F328 -# collision vertices -.hword 0x0040, 0x0004 -.hword 8192, -1000, -8192 -.hword -8192, -1000, -8192 -.hword -8192, -1000, 8192 -.hword 8192, -1000, 8192 -# collision 0x00 normal -.hword 0x0000, 2 -.hword 0, 1, 2 -.hword 0, 2, 3 -.hword 0x0041 -.hword 0x0042 +colInit +colVertexInit 0x4 +colVertex 8192, -1000, -8192 +colVertex -8192, -1000, -8192 +colVertex -8192, -1000, 8192 +colVertex 8192, -1000, 8192 +colTriInit SURFACE_DEFAULT, 2 +colTri 0, 1, 2 +colTri 0, 2, 3 +colTriStop +colEnd diff --git a/levels/menu/script.s b/levels/menu/script.s index 4d49b46..a708690 100644 --- a/levels/menu/script.s +++ b/levels/menu/script.s @@ -4,18 +4,18 @@ glabel level_main_menu_entry_1 load_mio0 /*seg*/ 0x07, /*romStart*/ _menu_segment_7SegmentRomStart, /*romEnd*/ _menu_segment_7SegmentRomEnd load_raw /*seg*/ 0x13, /*romStart*/ _behaviorSegmentRomStart, /*romEnd*/ _behaviorSegmentRomEnd alloc_level_pool - load_model_from_geo /*model*/ MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, /*geo*/ main_menu_geo_0001D0 - load_model_from_geo /*model*/ MODEL_MAIN_MENU_RED_ERASE_BUTTON, /*geo*/ main_menu_geo_000290 - load_model_from_geo /*model*/ MODEL_MAIN_MENU_BLUE_COPY_BUTTON, /*geo*/ main_menu_geo_0002B8 - load_model_from_geo /*model*/ MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, /*geo*/ main_menu_geo_0002E0 - load_model_from_geo /*model*/ MODEL_MAIN_MENU_GREEN_SCORE_BUTTON, /*geo*/ main_menu_geo_000308 - load_model_from_geo /*model*/ MODEL_MAIN_MENU_MARIO_SAVE_BUTTON_FADE, /*geo*/ main_menu_geo_000200 - load_model_from_geo /*model*/ MODEL_MAIN_MENU_MARIO_NEW_BUTTON, /*geo*/ main_menu_geo_000230 - load_model_from_geo /*model*/ MODEL_MAIN_MENU_MARIO_NEW_BUTTON_FADE, /*geo*/ main_menu_geo_000260 - load_model_from_geo /*model*/ MODEL_MAIN_MENU_PURPLE_SOUND_BUTTON, /*geo*/ main_menu_geo_000330 - load_model_from_geo /*model*/ MODEL_MAIN_MENU_GENERIC_BUTTON, /*geo*/ main_menu_geo_000358 + load_model_from_geo /*model*/ MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, /*geo*/ geo_menu_mario_save_button + load_model_from_geo /*model*/ MODEL_MAIN_MENU_RED_ERASE_BUTTON, /*geo*/ geo_menu_erase_button + load_model_from_geo /*model*/ MODEL_MAIN_MENU_BLUE_COPY_BUTTON, /*geo*/ geo_menu_copy_button + load_model_from_geo /*model*/ MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, /*geo*/ geo_menu_file_button + load_model_from_geo /*model*/ MODEL_MAIN_MENU_GREEN_SCORE_BUTTON, /*geo*/ geo_menu_score_button + load_model_from_geo /*model*/ MODEL_MAIN_MENU_MARIO_SAVE_BUTTON_FADE, /*geo*/ geo_menu_mario_save_button_fade + load_model_from_geo /*model*/ MODEL_MAIN_MENU_MARIO_NEW_BUTTON, /*geo*/ geo_menu_mario_new_button + load_model_from_geo /*model*/ MODEL_MAIN_MENU_MARIO_NEW_BUTTON_FADE, /*geo*/ geo_menu_mario_new_button_fade + load_model_from_geo /*model*/ MODEL_MAIN_MENU_PURPLE_SOUND_BUTTON, /*geo*/ geo_menu_sound_button + load_model_from_geo /*model*/ MODEL_MAIN_MENU_GENERIC_BUTTON, /*geo*/ geo_menu_generic_button - area /*index*/ 1, /*geo*/ main_menu_geo_000380 + area /*index*/ 1, /*geo*/ geo_menu_file_select_strings_and_menu_cursor object /*model*/ MODEL_NONE, /*pos*/ 0, 0, -19000, /*angle*/ 0, 0, 0, /*behParam*/ 0x04000000, /*beh*/ bhvMenuButtonManager object /*model*/ MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, /*pos*/ 0, 0, -19000, /*angle*/ 0, 0, 0, /*behParam*/ 0x04000000, /*beh*/ bhvYellowBackgroundInMenu terrain /*terrainData*/ main_menu_seg7_collision @@ -25,8 +25,8 @@ glabel level_main_menu_entry_1 load_area /*area*/ 1 set_menu_music /*seq*/ 0x0021 transition /*unk2*/ 0, /*unk3*/ 16, /*color*/ -1, -1, -1 - call /*arg*/ 0, /*func*/ LevelProc_801766DC - call_loop /*arg*/ 0, /*func*/ LevelProc_801768A0 + call /*arg*/ 0, /*func*/ lvl_init_menu_values_and_cursor_pos + call_loop /*arg*/ 0, /*func*/ lvl_update_obj_and_load_file_selected get_or_set /*op*/ OP_SET, /*var*/ VAR_CURR_SAVE_FILE_NUM cmd38 /*unk2*/ 0x00BE transition /*unk2*/ 1, /*unk3*/ 16, /*color*/ -1, -1, -1 @@ -44,7 +44,7 @@ glabel level_main_menu_entry_2 load_mio0 /*seg*/ 0x07, /*romStart*/ _menu_segment_7SegmentRomStart, /*romEnd*/ _menu_segment_7SegmentRomEnd alloc_level_pool - area /*index*/ 2, /*geo*/ main_menu_geo_000408 + area /*index*/ 2, /*geo*/ geo_menu_act_selector_strings object /*model*/ MODEL_NONE, /*pos*/ 0, -100, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x04000000, /*beh*/ bhvActSelector terrain /*terrainData*/ main_menu_seg7_collision end_area @@ -54,8 +54,8 @@ glabel level_main_menu_entry_2 transition /*unk2*/ 0, /*unk3*/ 16, /*color*/ -1, -1, -1 sleep /*frames*/ 16 set_menu_music /*seq*/ 0x000D - call /*arg*/ 0, /*func*/ LevelProc_80177560 - call_loop /*arg*/ 0, /*func*/ LevelProc_80177610 + call /*arg*/ 0, /*func*/ lvl_init_act_selector_values_and_stars + call_loop /*arg*/ 0, /*func*/ lvl_update_obj_and_load_act_button_actions get_or_set /*op*/ OP_SET, /*var*/ VAR_CURR_ACT_NUM cmd38 /*unk2*/ 0x00BE transition /*unk2*/ 1, /*unk3*/ 16, /*color*/ -1, -1, -1 diff --git a/lib/PR/audio/aspMain.bin b/lib/PR/audio/aspMain.bin index 8553f65a972ab338a80634be180c54339fac3434..6fe732ddbdf455756911828c6d772381f735eeda 100644 GIT binary patch delta 1561 zcmah}T}T{P6h1pU>h2nM$G@`5X1$J5QV5A+A53D~X$i8OOKp@swSfFXDy^UXkO656ib~U5ui-0cZgzNqy6BKls!o;BVZrmT_f3Pn{hzVpb;SLf`5c?LG*kxFNjopuf ztJn8u`yym7hADe5Om;W+Krs6*_8jcl=w-5Igv`(h%D#+y+4~tLZk8U3GkGR%`a2CK zZ@%-A#sbW@_x#8r%(t39Vu)$Of3|%LNhrZ zWR+&(mmn)OPyQ5qq*m`LEV+jT)f(hw<(U76`ccx{HJ{2Z@cfgQyxvSc<>?)I(>R5c z#+0tbsZJ3kq|sfWpTCPxG=#}%hr1H!4zv%###|6#_z=nNXl-O7B;!jZfFrn(n z?%Ar4S00?0k*yO0lJYsT`kSB4s;NP_wmK~ztmd%SCs*^Y$d!C3I!3A_E8ii*6AgYU zsbCPS8|BS$lI!O(()r6UwSky)Ze`3+f7S(%3n1rpR4o82&o0hZgj9KLct(y4KLo4< zV8s)F%Nuj@{>DHw&VU;^c`SVnc)K?7tYhhMc{2^bAprhC0Q5=cMjU`C7eFq6>T`vq z`bpAw?0Oez%I=gc{M z;IC~GfmrLmnl>BYgp1j+8!qPe$PspcUDC_ac(_k z&MvT0c7m0%8?2NaVf9;GVHavLiLjng9R* delta 6 NcmZ1=(;%>b0{{og0rda? diff --git a/lib/PR/audio/aspMain_unk.bin b/lib/PR/audio/aspMain_unk.bin deleted file mode 100644 index efb4f69efc4495009f4f475ff10c0bc02dfd6e8e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1568 zcmah}TWB0r82)#5lI(7p-N{WhA>E!#f>bDNLVQTusG~?&&%v|_KJ-C^LcM?i(Sj7k zcB$#^HZ+N86AaQwp-CRJ=?wyXP*@?+oe5d>!BSs((V}D;G&V_-hpglGZ;b@0xbSmk z&wtMOF6Wy`Rg#vfAiYf|@5vs|^EVoeRI^i~qV0)O6MjMMhA{6CUHpkG;iqj>+omUAg5S?}QU+$q!`YPGZ{c?CRAq9!SjJb}7QS~88gK%rz0>JsV66zX%@lKc>L zk&2T^)Mpe<9;dL=6eY&AcVT>x|JJ@-M~t7ngb^H^Fy_I-F2e{ec0cC9C)-y?_Cl1h z_o8HXV-EbXZ(`2DoQ<{2Ro0P=9H;CH7|Y(yFmG9UFu~lJw+wb#%w4|moWcC%>$|^W z4f3_-k64F%^@;tgMP|{59{COW&?LV`AG+iW`p_oR^Tn)BrtXAUqfGu7W}WiH_u&n# zW|z0<9uib*k)L(r?%y>Jli{ugboPMnK80I1n<=0@zTIpZqlng+HjM;nqJ#{(E6jfe>N(7;JUzh{3pYka2Uf`7UZl5pL1Vm&XVvuYeG+z5v3l!Goe&DZAlpvPK8Mq z5i;V{Us1ejnwn2iV5=aV&o=*{{ZyV1=o4@)`=}_fui)GdPCd{rae?E!jH(4*<=KVViiobR4bP~N;fHvYz^nKd-qQMc$Z8&H(RM0$xBl*Au`?yTEaQQ=jt|>nF+JESOznXuHxv zizI|PFgXpabEzp5Qeq_Dh=AxL6DBg7?NO OZ;AH?NpEKy{{014cn+@s diff --git a/lib/PR/f3d/old/F3D.bin b/lib/PR/f3d/old/F3D.bin index 27d994b7dec4864c49758eaf139bd06b9b40ea99..90eafc23edf07689ecb7bb2a25e7d9d4882feab5 100644 GIT binary patch delta 1047 zcmX9-UrbwN6hGhX?d7Y`QtBmMpyRekM>jPVQ(Zel)>JaPb3k~T;9O^_6MZp03c5?o zEiR5BCcLj%iu%yUJuLq11H)dBjwL20J|K=oTDMpv8NpzW|c7S~2J^5O=l{xZC4uEH0gW&1GR z2Eyhe@#_E{a6f#q3KDBh^|l4T8%m2fRfsIE0E9)}M1b~`y`RrOZ%@=dJOcKCQ`ZLe zeF0(!0Of*2^G9c*u-DTsiUGLEnUwi-0;K8DNJgE26IB3{!+w!7CA1CE#UB9{%OF{2 zG_X)(E2ai3d5wXRnzoqcBZD^~drCppbDQ)7AHrF2jf{|P`|#W!3;6n9>-hCADt=@9 zHk#r0fj%1Br4L{In{?r`+OnI0i?YevWN6D|2(Kr97x6abwq?pShP@!eBe0>jRix}F ze!HdOcYm&9XKo2QUt7bjTot>W|yg&65<jyDd7!$@)4QSnC_c#@QBZj0`&;u!a)S%9Vs<4XN&xE2^8`doxcH=dRXv6Hwa?vdXT; zyx=}L+W^QsHsQ!I8TSA)zXB+7xKVU7#q5Sd!Kh-o;6`2oDbGL-bCA>!1Pq5#56H(I zMdRJz_rqb%Y-cdb*wZBeTG|0w4na@lUJNRIiIdp1@j$S#Rf)tB*tD@Oaxakn{Bd-L zr}1KJ9hW=iaVA*~hU~pi*xsxiBp@~ca-jjP!VWY!jSB6}S%E9^24DR$7N{tiiVFii zu~!P||6aww=Vc5e%XD-A=;8pU(+iiyWFOGAh51;x)h>zV#MEa(+;t(&y_ZwX3uZ&0rLf{N9mNtRcWEuW@TB1Y^4T|1V-{2Md4 z_|6>OdVh}e{WZ#VqQ={6u*3 zj-Lk8d-U>44~52ibZKgdE{(4}(!8~QiCR0>sJXvN%^j@*tGaq!(@9EhkPLYuOIj7$5931O~?}ah|{{f6vK&}7) delta 6 NcmeCsXi!)n000NB0s#O3 diff --git a/lib/PR/f3d/old/F3D_unk.bin b/lib/PR/f3d/old/F3D_unk.bin deleted file mode 100644 index 9d4bf7b8face9066fa726a5a72e0fa3f46733f90..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1032 zcmXX_UrbwN6hGhX?d7Y`QtBmMpyRd`MmIIK=IYuRvZj*Rodd$#1m`+aoz)lPqo9MB zTQrU#CcKX@0evvK zOYgt@7wN)gwPiO07iE*TXi{6INn!QmZ^GZE+_p@)#*i0ec!)Llrizpu!Ed%y{PvG^ z?944;=PPU2m8)XcSSx*Ri~lEnq+Hr7>Zp>Q4%6hsHt7?0=#*o}pQ2M~6^}GVu=cc! zwZ0*2oNd9z@Q{OV4JM?O%L&OERNX6=RX4r!dV%uiuGDrDP}>c%%C5$|;66Fi0LVO& zceEHcJiyE^0g4>17u`%TyWvpqshBRfUXVa4Fp$F>BsBy9hffd4#~mGvZt(lzFlV+i zm|^V6lE5tOfGmd~Qn?$0N?+n6c5U1jTx?Z(V+m~9SQoM9NPqS?y2Dd=F}9A&9dkIH zEC)mOUMOsD)(#R7%Y(eo0N26}G&yw&-OU++E8=|hi&&tdXe!S4`@~2or2lgT1D};K zkSx>DexQr}oKDYwEc$wnuFlWJ!mV~m)Fyg96XLE52KR2(`6#RNF{#eayXrhETRh7w zeqOTpn9Jg$a=j%e)xANv?h7hbizZoKO}2cRB6>JMSC6Hz@Y*ykzBP+C-<>6We~q#o z1uUd0xR|Nn&5;V}f6t;4A3&vJ2wm})(AE7ZzH#g)9KY?ykAyXE`)MG(M=!qcKgqL3Cn>o_k>n<&lgqWfSYjs1%B3h<61@H5 z@Fw~lFm+gPbP@g?$2v>Q-KZg@AoXGBzoXa<$q%I5$9`OXn~;5(rTz`v(YI;H>s diff --git a/lib/rsp.s b/lib/rsp.s index fd92b73..dddc6d2 100644 --- a/lib/rsp.s +++ b/lib/rsp.s @@ -8,13 +8,6 @@ glabel rspF3DBootStart .incbin "lib/PR/boot/F3D_boot.bin" glabel rspF3DBootEnd -/* - * Both of these ucode bins are 0x1000/0x800 respectively as defined in their - * ucode initializations, but there's extra data afterwards. However, it's not the - * RSP data as that is pointed to below in the rodata section. TODO: What are these - * extra bins? - */ - .balign 16 .ifndef F3DEX_GBI_SHARED glabel rspF3DStart /* Use regular Fast3D bins (default) */ @@ -22,7 +15,6 @@ glabel rspF3DStart /* Use regular Fast3D bins (default) */ .incbin "lib/PR/f3d/new/F3D.bin" /* OS 2.0H (J2 and IQ) */ .else .incbin "lib/PR/f3d/old/F3D.bin" /* OS 2.0D (US and JP) */ - .incbin "lib/PR/f3d/old/F3D_unk.bin" .endif glabel rspF3DEnd @@ -43,7 +35,6 @@ glabel rspF3DEnd .balign 16 glabel rspAspMainStart .incbin "lib/PR/audio/aspMain.bin" - .incbin "lib/PR/audio/aspMain_unk.bin" glabel rspAspMainEnd /* diff --git a/lib/src/_Ldtob.c b/lib/src/_Ldtob.c index 308fe88..f456802 100644 --- a/lib/src/_Ldtob.c +++ b/lib/src/_Ldtob.c @@ -276,7 +276,7 @@ static void _Genld(printf_struct *px, u8 code, u8 *p, s16 nsig, s16 xexp) { } *p++ = xexp / 10 + '0', xexp %= 10; *p++ = xexp + '0'; - px->part3_len = (u32) p - (u32) &px->buff[px->part2_len]; + px->part3_len = p - (u8 *) &px->buff[px->part2_len]; } if ((px->flags & (FLAGS_ZERO | FLAGS_MINUS)) == FLAGS_ZERO) { /* pad with leading zeros */ int n = diff --git a/lib/src/_Printf.c b/lib/src/_Printf.c index e0c69fb..ae789e0 100644 --- a/lib/src/_Printf.c +++ b/lib/src/_Printf.c @@ -205,7 +205,7 @@ static void _Putfld(printf_struct *a0, va_list *args, u8 type, u8 *buff) { break; case 'p': - a0->value.s64 = (long) va_arg(*args, void *); // void* + a0->value.s64 = (intptr_t) va_arg(*args, void *); a0->buff = (char *) &buff[a0->part1_len]; _Litob(a0, 'x'); break; diff --git a/lib/src/__osSiRawReadIo.c b/lib/src/__osSiRawReadIo.c index 404e8fb..02a62ae 100644 --- a/lib/src/__osSiRawReadIo.c +++ b/lib/src/__osSiRawReadIo.c @@ -4,6 +4,6 @@ s32 __osSiRawReadIo(void *a0, u32 *a1) { if (__osSiDeviceBusy()) { return -1; } - *a1 = HW_REG((u32) a0, u32); + *a1 = HW_REG((uintptr_t) a0, u32); return 0; } diff --git a/lib/src/__osSiRawWriteIo.c b/lib/src/__osSiRawWriteIo.c index f9ddf50..49d83da 100644 --- a/lib/src/__osSiRawWriteIo.c +++ b/lib/src/__osSiRawWriteIo.c @@ -4,6 +4,6 @@ s32 __osSiRawWriteIo(void *a0, u32 a1) { if (__osSiDeviceBusy()) { return -1; } - HW_REG((u32) a0, u32) = a1; + HW_REG((uintptr_t) a0, u32) = a1; return 0; } diff --git a/lib/src/alBnkfNew.c b/lib/src/alBnkfNew.c index 508ca55..d5870fa 100644 --- a/lib/src/alBnkfNew.c +++ b/lib/src/alBnkfNew.c @@ -1,12 +1,12 @@ #include "libultra_internal.h" #include "libaudio_internal.h" -#define PATCH(SRC, BASE, TYPE) SRC = (TYPE)((u32) SRC + (u32) BASE) +#define PATCH(SRC, BASE, TYPE) SRC = (TYPE)((uintptr_t) SRC + (uintptr_t) BASE) void alSeqFileNew(ALSeqFile *f, u8 *base) { int i; for (i = 0; i < f->seqCount; i++) { - f->seqArray[i].offset = (u32)(f->seqArray[i].offset) + base; + PATCH(f->seqArray[i].offset, base, u8 *); } } diff --git a/lib/src/hardware.h b/lib/src/hardware.h index 95d10ee..c207335 100644 --- a/lib/src/hardware.h +++ b/lib/src/hardware.h @@ -1,7 +1,7 @@ #ifndef _HARDWARE_H_ #define _HARDWARE_H_ -#define HW_REG(reg, type) *(volatile type *)(reg | 0xa0000000) +#define HW_REG(reg, type) *(volatile type *)(uintptr_t)(reg | 0xa0000000) #define AI_DRAM_ADDR_REG 0x04500000 #define AI_LEN_REG 0x04500004 diff --git a/lib/src/kdebugserver.c b/lib/src/kdebugserver.c index 08b1db0..747cc7d 100644 --- a/lib/src/kdebugserver.c +++ b/lib/src/kdebugserver.c @@ -73,7 +73,7 @@ void process_command_memory() { u32 sp18; sp1c = string_to_u32(&D_80365E40[1]); sp18 = string_to_u32(&D_80365E40[5]); - send((u8 *) sp1c, sp18); + send((u8 *) (uintptr_t) sp1c, sp18); } void process_command_register() { send((u8 *) &gInterruptedThread.context, sizeof(__OSThreadContext)); diff --git a/lib/src/osAiSetNextBuffer.c b/lib/src/osAiSetNextBuffer.c index 3cb4c32..cc27ae4 100644 --- a/lib/src/osAiSetNextBuffer.c +++ b/lib/src/osAiSetNextBuffer.c @@ -24,7 +24,7 @@ s32 osAiSetNextBuffer(void *buff, u32 len) { sp1c -= 0x2000; } - if ((((u32) buff + len) & 0x3fff) == 0x2000) { + if ((((uintptr_t) buff + len) & 0x3fff) == 0x2000) { D_80334820 = 1; } else { D_80334820 = 0; diff --git a/lib/src/osPiRawStartDma.c b/lib/src/osPiRawStartDma.c index 4aa28f5..4b74786 100644 --- a/lib/src/osPiRawStartDma.c +++ b/lib/src/osPiRawStartDma.c @@ -12,8 +12,7 @@ s32 osPiRawStartDma(s32 dir, u32 cart_addr, void *dram_addr, size_t size) { HW_REG(PI_DRAM_ADDR_REG, void *) = (void *) osVirtualToPhysical(dram_addr); - HW_REG(PI_CART_ADDR_REG, void *) = - (void *) ((osRomBase /*(*(u32 *)80000308)*/ | cart_addr) & 0x1fffffff); + HW_REG(PI_CART_ADDR_REG, void *) = (void *) (((uintptr_t) osRomBase | cart_addr) & 0x1fffffff); switch (dir) { case 0: diff --git a/lib/src/osPiStartDma.c b/lib/src/osPiStartDma.c index f983bb4..df73d43 100644 --- a/lib/src/osPiStartDma.c +++ b/lib/src/osPiStartDma.c @@ -2,7 +2,7 @@ extern OSMgrArgs piMgrArgs; -s32 osPiStartDma(OSIoMesg *mb, s32 priority, s32 direction, u32 devAddr, void *vAddr, u32 nbytes, +s32 osPiStartDma(OSIoMesg *mb, s32 priority, s32 direction, uintptr_t devAddr, void *vAddr, size_t nbytes, OSMesgQueue *mq) { register s32 result; register OSMesgQueue *cmdQueue; diff --git a/lib/src/osStartThread.c b/lib/src/osStartThread.c index 16c328a..caea4ca 100644 --- a/lib/src/osStartThread.c +++ b/lib/src/osStartThread.c @@ -3,7 +3,7 @@ extern OSThread *D_803348A0; extern OSThread *D_80334898; void osStartThread(OSThread *thread) { register u32 int_disabled; - register u32 state; + register uintptr_t state; int_disabled = __osDisableInt(); state = thread->state; @@ -22,7 +22,7 @@ void osStartThread(OSThread *thread) { } else { thread->state = OS_STATE_WAITING; __osEnqueueThread(thread->queue, thread); - state = (u32) __osPopThread(thread->queue); + state = (uintptr_t) __osPopThread(thread->queue); __osEnqueueThread(&D_80334898, (OSThread *) state); } } diff --git a/lib/src/osVirtualToPhysical.c b/lib/src/osVirtualToPhysical.c index 373073d..b1fb1a5 100644 --- a/lib/src/osVirtualToPhysical.c +++ b/lib/src/osVirtualToPhysical.c @@ -1,12 +1,10 @@ #include "libultra_internal.h" -u32 osVirtualToPhysical(void *addr) { - if ((u32) addr >= 0x80000000 && (u32) addr < 0xa0000000) { - return ((u32) addr & 0x1fffffff); - } - - else if ((u32) addr >= 0xa0000000 && (u32) addr < 0xc0000000) { - return ((u32) addr & 0x1fffffff); +uintptr_t osVirtualToPhysical(void *addr) { + if ((uintptr_t) addr >= 0x80000000 && (uintptr_t) addr < 0xa0000000) { + return ((uintptr_t) addr & 0x1fffffff); + } else if ((uintptr_t) addr >= 0xa0000000 && (uintptr_t) addr < 0xc0000000) { + return ((uintptr_t) addr & 0x1fffffff); } else { return __osProbeTLB(addr); } diff --git a/sm64.ld b/sm64.ld index 676f656..c735663 100755 --- a/sm64.ld +++ b/sm64.ld @@ -153,6 +153,8 @@ SECTIONS BUILD_DIR/src/game/object_collision.o(.text); BUILD_DIR/src/game/spawn_object.o(.text); #endif + BUILD_DIR/src/game*.o(.text); + BUILD_DIR/src/audio*.o(.text); #if VERSION_US . += 0x40; #endif @@ -260,6 +262,7 @@ SECTIONS BUILD_DIR/libultra.a:__osGetCause.o(.text); BUILD_DIR/libultra.a:__osAtomicDec.o(.text); BUILD_DIR/libultra.a:guLookAtRef.o(.text); /* Fast3DEX2 only */ + BUILD_DIR/libultra.a:*.o(.text); BUILD_DIR/lib/rsp.o(.text); /* data */ BUILD_DIR/src/game/crash_screen.o(.data*); @@ -302,8 +305,10 @@ SECTIONS BUILD_DIR/src/game/hud.o(.data*); BUILD_DIR/src/game/obj_behaviors.o(.data*); BUILD_DIR/src/game/obj_behaviors_2.o(.data*); + BUILD_DIR/src/game*.o(.data*); BUILD_DIR/src/audio/external.o(.data*); BUILD_DIR/src/audio/data.o(.data*); + BUILD_DIR/src/audio*.o(.data*); BUILD_DIR/libultra.a:osCreateViManager.o(.data*); BUILD_DIR/libultra.a:osCreatePiManager.o(.data*); BUILD_DIR/libultra.a:osInitialize.o(.data*); @@ -321,7 +326,8 @@ SECTIONS BUILD_DIR/libultra.a:osViData.o(.data*); BUILD_DIR/libultra.a:kdebugserver.o(.data*); BUILD_DIR/libultra.a:__osSyncPutChars.o(.data*); - BUILD_DIR/libultra.a:guRotateF.o(.data); + BUILD_DIR/libultra.a:guRotateF.o(.data*); + BUILD_DIR/libultra.a:*.o(.data*); /* rodata */ BUILD_DIR/src/game/crash_screen.o(.rodata*); BUILD_DIR/src/game/main.o(.rodata*); @@ -363,12 +369,14 @@ SECTIONS BUILD_DIR/src/game/hud.o(.rodata*); BUILD_DIR/src/game/obj_behaviors.o(.rodata*); BUILD_DIR/src/game/obj_behaviors_2.o(.rodata*); + BUILD_DIR/src/game*.o(.rodata*); BUILD_DIR/src/audio/synthesis.o(.rodata*); BUILD_DIR/src/audio/memory.o(.rodata*); BUILD_DIR/src/audio/playback.o(.rodata*); BUILD_DIR/src/audio/effects.o(.rodata*); BUILD_DIR/src/audio/seqplayer.o(.rodata*); BUILD_DIR/src/audio/external.o(.rodata*); + BUILD_DIR/src/audio*.o(.rodata*); BUILD_DIR/libultra.a:guPerspectiveF.o(.rodata*); BUILD_DIR/libultra.a:llconv.o(.rodata*); BUILD_DIR/libultra.a:cosf.o(.rodata*); @@ -381,6 +389,7 @@ SECTIONS BUILD_DIR/libultra.a:_Ldtob.o(.rodata*); BUILD_DIR/libultra.a:osSetIntMask.o(.rodata*); BUILD_DIR/libultra.a:guLookAtRef.o(.rodata*); /* Fast3DEX2 only */ + BUILD_DIR/libultra.a:*.o(.rodata*); BUILD_DIR/lib/rsp.o(.rodata*); } END_SEG(main) @@ -421,6 +430,7 @@ SECTIONS BUILD_DIR/src/game/hud.o(.bss*); BUILD_DIR/src/game/obj_behaviors.o(.bss*); BUILD_DIR/src/game/obj_behaviors_2.o(.bss*); + BUILD_DIR/src/game*.o(.bss*); BUILD_DIR/src/audio/external.o(.bss*); BUILD_DIR/libultra.a:osSetEventMesg.o(.bss*); BUILD_DIR/libultra.a:osSpTaskLoadGo.o(.bss*); @@ -436,6 +446,7 @@ SECTIONS BUILD_DIR/libultra.a:__osSiCreateAccessQueue.o(.bss*); BUILD_DIR/libultra.a:osEepromWrite.o(.bss*); BUILD_DIR/libultra.a:kdebugserver.o(.bss*); + BUILD_DIR/libultra.a:*.o(.bss*); } END_NOLOAD(main) @@ -451,6 +462,7 @@ SECTIONS BUILD_DIR/src/engine/surface_collision.o(.text); BUILD_DIR/src/engine/surface_load.o(.text); BUILD_DIR/src/engine/behavior_script.o(.text); + BUILD_DIR/src/engine*.o(.text); /* data */ BUILD_DIR/src/engine/graph_node.o(.data*); BUILD_DIR/src/engine/graph_node_manager.o(.data*); @@ -459,11 +471,13 @@ SECTIONS BUILD_DIR/src/engine/geo_layout.o(.data*); BUILD_DIR/src/engine/level_script.o(.data*); BUILD_DIR/src/engine/behavior_script.o(.data*); + BUILD_DIR/src/engine*.o(.data*); /* rodata */ BUILD_DIR/src/engine/math_util.o(.rodata*); BUILD_DIR/src/engine/level_script.o(.rodata*); BUILD_DIR/src/engine/surface_collision.o(.rodata*); BUILD_DIR/src/engine/surface_load.o(.rodata*); + BUILD_DIR/src/engine*.o(.rodata*); } END_SEG(engine) BEGIN_NOLOAD(engine) @@ -474,6 +488,7 @@ SECTIONS BUILD_DIR/src/engine/surface_collision.o(.bss*); BUILD_DIR/src/engine/surface_load.o(.bss*); BUILD_DIR/src/engine/behavior_script.o(.bss*); + BUILD_DIR/src/engine*.o(.bss*); } END_NOLOAD(engine) @@ -540,10 +555,11 @@ SECTIONS /* 0x8016F000 21D7D0-255EC0 [386F0] */ BEGIN_SEG(goddard, SEG_GODDARD) { - BUILD_DIR/src/game/level_select_menu.o(.text); - BUILD_DIR/src/game/intro_geo.o(.text); - BUILD_DIR/src/game/file_select.o(.text); - BUILD_DIR/src/game/star_select.o(.text); + BUILD_DIR/src/menu/level_select_menu.o(.text); + BUILD_DIR/src/menu/intro_geo.o(.text); + BUILD_DIR/src/menu/file_select.o(.text); + BUILD_DIR/src/menu/star_select.o(.text); + BUILD_DIR/src/menu*.o(.text); BUILD_DIR/libgoddard.a:gd_main.o(.text); BUILD_DIR/libgoddard.a:gd_memory.o(.text); BUILD_DIR/libgoddard.a:sfx.o(.text); @@ -559,14 +575,17 @@ SECTIONS BUILD_DIR/libgoddard.a:gd_math.o(.text); BUILD_DIR/libgoddard.a:shape_helper.o(.text); BUILD_DIR/libgoddard.a:renderer.o(.text); + BUILD_DIR/libgoddard.a:*.o(.text); /* data, rodata, per file */ - BUILD_DIR/src/game/level_select_menu.o(.data*); - BUILD_DIR/src/game/level_select_menu.o(.rodata*); - BUILD_DIR/src/game/intro_geo.o(.data*); - BUILD_DIR/src/game/file_select.o(.data*); - BUILD_DIR/src/game/file_select.o(.rodata*); - BUILD_DIR/src/game/star_select.o(.data*); - BUILD_DIR/src/game/star_select.o(.rodata*); + BUILD_DIR/src/menu/level_select_menu.o(.data*); + BUILD_DIR/src/menu/level_select_menu.o(.rodata*); + BUILD_DIR/src/menu/intro_geo.o(.data*); + BUILD_DIR/src/menu/file_select.o(.data*); + BUILD_DIR/src/menu/file_select.o(.rodata*); + BUILD_DIR/src/menu/star_select.o(.data*); + BUILD_DIR/src/menu/star_select.o(.rodata*); + BUILD_DIR/src/menu*.o(.data*); + BUILD_DIR/src/menu*.o(.rodata*); /* goddard subsystem data */ BUILD_DIR/libgoddard.a:gd_main.o(.data*); BUILD_DIR/libgoddard.a:draw_objects.o(.data*); @@ -598,9 +617,10 @@ SECTIONS END_SEG(goddard) BEGIN_NOLOAD(goddard) { - BUILD_DIR/src/game/intro_geo.o(.bss*); - BUILD_DIR/src/game/file_select.o(.bss*); - BUILD_DIR/src/game/star_select.o(.bss*); + BUILD_DIR/src/menu/intro_geo.o(.bss*); + BUILD_DIR/src/menu/file_select.o(.bss*); + BUILD_DIR/src/menu/star_select.o(.bss*); + BUILD_DIR/src/menu*.o(.bss*); BUILD_DIR/libgoddard.a:gd_main.o(.bss*); BUILD_DIR/libgoddard.a:gd_memory.o(.bss*); BUILD_DIR/libgoddard.a:sfx.o(.bss*); @@ -615,6 +635,7 @@ SECTIONS BUILD_DIR/libgoddard.a:skin.o(.bss*); BUILD_DIR/libgoddard.a:shape_helper.o(.bss*); BUILD_DIR/libgoddard.a:renderer.o(.bss*); + BUILD_DIR/libgoddard.a:*.o(.bss*); } END_NOLOAD(goddard) @@ -623,13 +644,14 @@ SECTIONS . = SEG_BUFFERS; BEGIN_NOLOAD(buffers) { - BUILD_DIR/src/game/buffers.o(.bss*); + BUILD_DIR/src/buffers/buffers.o(.bss*); BUILD_DIR/src/audio/globals_start.o(.bss*); BUILD_DIR/src/audio/synthesis.o(.bss*); BUILD_DIR/src/audio/memory.o(.bss*); BUILD_DIR/src/audio/load.o(.bss*); BUILD_DIR/src/audio/data.o(.bss*); BUILD_DIR/src/audio/globals_end.o(.bss*); + BUILD_DIR/src/audio*.o(.bss*); BUILD_DIR/data/gfx_output_buffer.o(.bss*); } END_NOLOAD(buffers) @@ -673,6 +695,8 @@ SECTIONS 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:*.o(.data); + BUILD_DIR/libgoddard.a:*.o(.rodata); } END_SEG(gd_dynlists) diff --git a/sound/sequences/00_sound_player.s b/sound/sequences/00_sound_player.s index bf55542..4b3a1c4 100644 --- a/sound/sequences/00_sound_player.s +++ b/sound/sequences/00_sound_player.s @@ -66,6 +66,7 @@ chan_stereoheadseteffects 1 chan_setdyntable .channel59_table chan_jump .main_loop_023589 +# Main loop for standard, non-continuous sound effects .main_loop_023589: chan_delay1 chan_ioreadval 0 @@ -132,6 +133,7 @@ chan_stereoheadseteffects 1 chan_setdyntable .channel6_table chan_jump .main_loop_146 +# Main loop for moving, env and air sound effects, which play continuously .main_loop_146: chan_delay1 chan_ioreadval 0 @@ -168,6 +170,7 @@ chan_iowriteval 5 chan_stereoheadseteffects 1 chan_setdyntable .channel7_table +# Loop for menu sound effects .main_loop_7: chan_delay1 chan_ioreadval 0 @@ -235,86 +238,86 @@ chan_iowriteval 5 chan_end .channel0_table: -sound_ref .chan_22C -sound_ref .chan_23B -sound_ref .chan_24A -sound_ref .chan_259 -sound_ref .chan_268 -sound_ref .chan_277 -sound_ref .chan_286 -sound_ref .chan_295 -sound_ref .chan_2A6 -sound_ref .chan_2B5 -sound_ref .chan_2C4 -sound_ref .chan_2D3 -sound_ref .chan_2E2 -sound_ref .chan_2F1 -sound_ref .chan_300 -sound_ref .chan_30F -sound_ref .chan_320 -sound_ref .chan_32C -sound_ref .chan_338 -sound_ref .chan_344 -sound_ref .chan_350 -sound_ref .chan_35C -sound_ref .chan_368 -sound_ref .chan_374 -sound_ref .chan_380 -sound_ref .chan_38F -sound_ref .chan_39E -sound_ref .chan_3AD -sound_ref .chan_3BC -sound_ref .chan_3CB -sound_ref .chan_3DA -sound_ref .chan_3E9 -sound_ref .chan_3FA -sound_ref .chan_406 -sound_ref .chan_412 -sound_ref .chan_41E -sound_ref .chan_42A -sound_ref .chan_436 -sound_ref .chan_442 -sound_ref .chan_44E -sound_ref .chan_45A -sound_ref .chan_469 -sound_ref .chan_478 -sound_ref .chan_488 -sound_ref .chan_497 -sound_ref .chan_4A9 -sound_ref .chan_4C5 -sound_ref .chan_4D5 +sound_ref .sound_action_jump_default +sound_ref .sound_action_jump_grass +sound_ref .sound_action_jump_water +sound_ref .sound_action_jump_stone +sound_ref .sound_action_jump_spooky +sound_ref .sound_action_jump_snow +sound_ref .sound_action_jump_ice +sound_ref .sound_action_jump_sand +sound_ref .sound_action_landing_default +sound_ref .sound_action_landing_grass +sound_ref .sound_action_landing_water +sound_ref .sound_action_landing_stone +sound_ref .sound_action_landing_spooky +sound_ref .sound_action_landing_snow +sound_ref .sound_action_landing_ice +sound_ref .sound_action_landing_sand +sound_ref .sound_action_step_default +sound_ref .sound_action_step_grass +sound_ref .sound_action_step_water +sound_ref .sound_action_step_stone +sound_ref .sound_action_step_spooky +sound_ref .sound_action_step_snow +sound_ref .sound_action_step_ice +sound_ref .sound_action_step_sand +sound_ref .sound_action_body_hit_ground_default +sound_ref .sound_action_body_hit_ground_grass +sound_ref .sound_action_body_hit_ground_water +sound_ref .sound_action_body_hit_ground_stone +sound_ref .sound_action_body_hit_ground_spooky +sound_ref .sound_action_body_hit_ground_snow +sound_ref .sound_action_body_hit_ground_ice +sound_ref .sound_action_body_hit_ground_sand +sound_ref .sound_action_step_tiptoe_default +sound_ref .sound_action_step_tiptoe_grass +sound_ref .sound_action_step_tiptoe_water +sound_ref .sound_action_step_tiptoe_stone +sound_ref .sound_action_step_tiptoe_spooky +sound_ref .sound_action_step_tiptoe_snow +sound_ref .sound_action_step_tiptoe_ice +sound_ref .sound_action_step_tiptoe_sand +sound_ref .sound_action_metal_jump +sound_ref .sound_action_metal_landing +sound_ref .sound_action_metal_step +sound_ref .sound_action_metal_heavy_landing +sound_ref .sound_action_clap_hands_cold +sound_ref .sound_action_hanging_step +sound_ref .sound_action_quicksand_step +sound_ref .sound_action_metal_step_tiptoe sound_ref .chan_4E5 sound_ref .chan_4F1 sound_ref .chan_4FD sound_ref .chan_512 sound_ref .chan_522 sound_ref .chan_52E -sound_ref .chan_540 -sound_ref .chan_54C -sound_ref .chan_54C -sound_ref .chan_54C -sound_ref .chan_55E -sound_ref .chan_571 +sound_ref .sound_action_swish1 +sound_ref .sound_action_swish2 +sound_ref .sound_action_swish2 +sound_ref .sound_action_swish2 +sound_ref .sound_action_climb_up_tree +sound_ref .sound_action_climb_down_tree sound_ref .chan_582 sound_ref .chan_591 sound_ref .chan_5A3 -sound_ref .chan_5B5 -sound_ref .chan_5C1 -sound_ref .chan_5D3 +sound_ref .sound_action_pat_back +sound_ref .sound_action_brush_hair +sound_ref .sound_action_climb_up_pole sound_ref .chan_5E9 sound_ref .chan_5F8 sound_ref .chan_604 sound_ref .chan_651 sound_ref .chan_664 sound_ref .chan_6A9 -sound_ref .chan_6C9 -sound_ref .chan_6C9 -sound_ref .chan_6C9 -sound_ref .chan_6C9 -sound_ref .chan_6C9 -sound_ref .chan_6DC -sound_ref .chan_6EB -sound_ref .chan_6EB +sound_ref .sound_action_stuck_in_ground_default +sound_ref .sound_action_stuck_in_ground_default +sound_ref .sound_action_stuck_in_ground_default +sound_ref .sound_action_stuck_in_ground_default +sound_ref .sound_action_stuck_in_ground_default +sound_ref .sound_action_stuck_in_ground_snow +sound_ref .sound_action_stuck_in_ground_sand +sound_ref .sound_action_stuck_in_ground_sand sound_ref .chan_6FA sound_ref .chan_70C sound_ref .chan_71E @@ -329,32 +332,32 @@ sound_ref .chan_7ED sound_ref .chan_801 sound_ref .chan_810 .ifdef VERSION_JP - sound_ref .chan_22C - sound_ref .chan_22C - sound_ref .chan_22C + sound_ref .sound_action_jump_default + sound_ref .sound_action_jump_default + sound_ref .sound_action_jump_default .else sound_ref .chan_828 sound_ref .chan_84B sound_ref .chan_863 .endif -sound_ref .chan_876 -sound_ref .chan_886 -sound_ref .chan_896 -sound_ref .chan_8A6 -sound_ref .chan_8B6 -sound_ref .chan_8C6 -sound_ref .chan_8D6 -sound_ref .chan_8E6 -sound_ref .chan_22C -sound_ref .chan_22C -sound_ref .chan_22C -sound_ref .chan_22C -sound_ref .chan_22C -sound_ref .chan_22C -sound_ref .chan_22C -sound_ref .chan_22C +sound_ref .sound_action_heavy_landing_default +sound_ref .sound_action_heavy_landing_grass +sound_ref .sound_action_heavy_landing_water +sound_ref .sound_action_heavy_landing_stone +sound_ref .sound_action_heavy_landing_spooky +sound_ref .sound_action_heavy_landing_snow +sound_ref .sound_action_heavy_landing_ice +sound_ref .sound_action_heavy_landing_sand +sound_ref .sound_action_jump_default +sound_ref .sound_action_jump_default +sound_ref .sound_action_jump_default +sound_ref .sound_action_jump_default +sound_ref .sound_action_jump_default +sound_ref .sound_action_jump_default +sound_ref .sound_action_jump_default +sound_ref .sound_action_jump_default -.chan_22C: +.sound_action_jump_default: chan_setbank 1 chan_setinstr 0 chan_setlayer 0, .layer_234 @@ -365,7 +368,7 @@ layer_note1 41, 0xc, 117 layer_note1 46, 0x18, 117 layer_end -.chan_23B: +.sound_action_jump_grass: chan_setbank 1 chan_setinstr 1 chan_setlayer 0, .layer_243 @@ -376,7 +379,7 @@ layer_note1 41, 0xc, 120 layer_note1 50, 0x18, 120 layer_end -.chan_24A: +.sound_action_jump_water: chan_setbank 2 chan_setinstr 1 chan_setlayer 0, .layer_252 @@ -387,7 +390,7 @@ layer_note1 41, 0x6, 80 layer_note1 50, 0x18, 80 layer_end -.chan_259: +.sound_action_jump_stone: chan_setbank 1 chan_setinstr 3 chan_setlayer 0, .layer_261 @@ -398,7 +401,7 @@ layer_note1 41, 0xc, 127 layer_note1 50, 0x18, 127 layer_end -.chan_268: +.sound_action_jump_spooky: chan_setbank 1 chan_setinstr 4 chan_setlayer 0, .layer_270 @@ -409,7 +412,7 @@ layer_note1 41, 0xc, 90 layer_note1 50, 0x18, 90 layer_end -.chan_277: +.sound_action_jump_snow: chan_setbank 1 chan_setinstr 5 chan_setlayer 0, .layer_27F @@ -420,7 +423,7 @@ layer_note1 41, 0xc, 80 layer_note1 50, 0x18, 80 layer_end -.chan_286: +.sound_action_jump_ice: chan_setbank 1 chan_setinstr 6 chan_setlayer 0, .layer_28E @@ -431,7 +434,7 @@ layer_note1 29, 0xc, 127 layer_note1 38, 0x18, 127 layer_end -.chan_295: +.sound_action_jump_sand: chan_setbank 1 chan_setinstr 8 chan_setlayer 0, .layer_29D @@ -442,7 +445,7 @@ layer_note0 34, 0xc, 100, 127 layer_note0 43, 0x24, 100, 127 layer_end -.chan_2A6: +.sound_action_landing_default: chan_setbank 1 chan_setinstr 0 chan_setlayer 0, .layer_2AE @@ -453,7 +456,7 @@ layer_note1 46, 0xc, 117 layer_note1 41, 0x18, 117 layer_end -.chan_2B5: +.sound_action_landing_grass: chan_setbank 1 chan_setinstr 1 chan_setlayer 0, .layer_2BD @@ -464,7 +467,7 @@ layer_note1 50, 0xc, 120 layer_note1 41, 0x18, 120 layer_end -.chan_2C4: +.sound_action_landing_water: chan_setbank 2 chan_setinstr 1 chan_setlayer 0, .layer_2CC @@ -475,7 +478,7 @@ layer_note1 50, 0xc, 80 layer_note1 41, 0x18, 80 layer_end -.chan_2D3: +.sound_action_landing_stone: chan_setbank 1 chan_setinstr 3 chan_setlayer 0, .layer_2DB @@ -486,7 +489,7 @@ layer_note1 50, 0xc, 127 layer_note1 41, 0x18, 127 layer_end -.chan_2E2: +.sound_action_landing_spooky: chan_setbank 1 chan_setinstr 4 chan_setlayer 0, .layer_2EA @@ -497,7 +500,7 @@ layer_note1 50, 0xc, 90 layer_note1 41, 0x18, 90 layer_end -.chan_2F1: +.sound_action_landing_snow: chan_setbank 1 chan_setinstr 5 chan_setlayer 0, .layer_2F9 @@ -508,7 +511,7 @@ layer_note1 50, 0xc, 80 layer_note1 41, 0x18, 80 layer_end -.chan_300: +.sound_action_landing_ice: chan_setbank 1 chan_setinstr 6 chan_setlayer 0, .layer_308 @@ -519,7 +522,7 @@ layer_note1 38, 0xc, 127 layer_note1 29, 0x18, 127 layer_end -.chan_30F: +.sound_action_landing_sand: chan_setbank 1 chan_setinstr 8 chan_setlayer 0, .layer_317 @@ -530,7 +533,7 @@ layer_note0 43, 0xc, 100, 127 layer_note0 34, 0x24, 100, 127 layer_end -.chan_320: +.sound_action_step_default: chan_setbank 1 chan_setinstr 0 chan_setlayer 0, .layer_328 @@ -540,7 +543,7 @@ chan_end layer_note1 39, 0x18, 85 layer_end -.chan_32C: +.sound_action_step_grass: chan_setbank 1 chan_setinstr 1 chan_setlayer 0, .layer_334 @@ -550,7 +553,7 @@ chan_end layer_note1 39, 0x18, 100 layer_end -.chan_338: +.sound_action_step_water: chan_setbank 2 chan_setinstr 1 chan_setlayer 0, .layer_340 @@ -560,7 +563,7 @@ chan_end layer_note1 43, 0x18, 63 layer_end -.chan_344: +.sound_action_step_stone: chan_setbank 1 chan_setinstr 3 chan_setlayer 0, .layer_34C @@ -570,7 +573,7 @@ chan_end layer_note1 39, 0x18, 77 layer_end -.chan_350: +.sound_action_step_spooky: chan_setbank 1 chan_setinstr 4 chan_setlayer 0, .layer_358 @@ -580,7 +583,7 @@ chan_end layer_note1 39, 0x18, 70 layer_end -.chan_35C: +.sound_action_step_snow: chan_setbank 1 chan_setinstr 5 chan_setlayer 0, .layer_364 @@ -590,7 +593,7 @@ chan_end layer_note1 39, 0x18, 68 layer_end -.chan_368: +.sound_action_step_ice: chan_setbank 1 chan_setinstr 6 chan_setlayer 0, .layer_370 @@ -600,7 +603,7 @@ chan_end layer_note1 39, 0x18, 100 layer_end -.chan_374: +.sound_action_step_sand: chan_setbank 1 chan_setinstr 8 chan_setlayer 0, .layer_37C @@ -610,7 +613,7 @@ chan_end layer_note1 39, 0x18, 70 layer_end -.chan_380: +.sound_action_body_hit_ground_default: chan_setbank 1 chan_setinstr 0 chan_setlayer 0, .layer_388 @@ -621,7 +624,7 @@ layer_note1 17, 0xc, 117 layer_note1 19, 0x18, 117 layer_end -.chan_38F: +.sound_action_body_hit_ground_grass: chan_setbank 1 chan_setinstr 1 chan_setlayer 0, .layer_397 @@ -632,7 +635,7 @@ layer_note1 29, 0xc, 120 layer_note1 31, 0x18, 120 layer_end -.chan_39E: +.sound_action_body_hit_ground_water: chan_setbank 2 chan_setinstr 1 chan_setlayer 0, .layer_3A6 @@ -643,7 +646,7 @@ layer_note1 34, 0xc, 80 layer_note1 39, 0x18, 80 layer_end -.chan_3AD: +.sound_action_body_hit_ground_stone: chan_setbank 1 chan_setinstr 3 chan_setlayer 0, .layer_3B5 @@ -654,7 +657,7 @@ layer_note1 29, 0xc, 115 layer_note1 31, 0xc, 115 layer_end -.chan_3BC: +.sound_action_body_hit_ground_spooky: chan_setbank 1 chan_setinstr 4 chan_setlayer 0, .layer_3C4 @@ -665,7 +668,7 @@ layer_note1 29, 0xc, 90 layer_note1 31, 0x18, 90 layer_end -.chan_3CB: +.sound_action_body_hit_ground_snow: chan_setbank 1 chan_setinstr 5 chan_setlayer 0, .layer_3D3 @@ -676,7 +679,7 @@ layer_note1 34, 0xc, 80 layer_note1 36, 0x18, 80 layer_end -.chan_3DA: +.sound_action_body_hit_ground_ice: chan_setbank 1 chan_setinstr 6 chan_setlayer 0, .layer_3E2 @@ -687,7 +690,7 @@ layer_note1 29, 0xc, 127 layer_note1 31, 0x18, 127 layer_end -.chan_3E9: +.sound_action_body_hit_ground_sand: chan_setbank 1 chan_setinstr 8 chan_setlayer 0, .layer_3F1 @@ -698,7 +701,7 @@ layer_note0 31, 0xc, 100, 127 layer_note0 32, 0x24, 100, 127 layer_end -.chan_3FA: +.sound_action_step_tiptoe_default: chan_setbank 1 chan_setinstr 0 chan_setlayer 0, .layer_402 @@ -708,7 +711,7 @@ chan_end layer_note1 37, 0x18, 63 layer_end -.chan_406: +.sound_action_step_tiptoe_grass: chan_setbank 1 chan_setinstr 1 chan_setlayer 0, .layer_40E @@ -718,7 +721,7 @@ chan_end layer_note1 37, 0x18, 57 layer_end -.chan_412: +.sound_action_step_tiptoe_water: chan_setbank 2 chan_setinstr 1 chan_setlayer 0, .layer_41A @@ -728,7 +731,7 @@ chan_end layer_note1 39, 0x18, 39 layer_end -.chan_41E: +.sound_action_step_tiptoe_stone: chan_setbank 1 chan_setinstr 3 chan_setlayer 0, .layer_426 @@ -738,7 +741,7 @@ chan_end layer_note1 37, 0x18, 49 layer_end -.chan_42A: +.sound_action_step_tiptoe_spooky: chan_setbank 1 chan_setinstr 4 chan_setlayer 0, .layer_432 @@ -748,7 +751,7 @@ chan_end layer_note1 37, 0x18, 39 layer_end -.chan_436: +.sound_action_step_tiptoe_snow: chan_setbank 1 chan_setinstr 5 chan_setlayer 0, .layer_43E @@ -758,7 +761,7 @@ chan_end layer_note1 37, 0x18, 39 layer_end -.chan_442: +.sound_action_step_tiptoe_ice: chan_setbank 1 chan_setinstr 6 chan_setlayer 0, .layer_44A @@ -768,7 +771,7 @@ chan_end layer_note1 37, 0x18, 70 layer_end -.chan_44E: +.sound_action_step_tiptoe_sand: chan_setbank 1 chan_setinstr 8 chan_setlayer 0, .layer_456 @@ -778,7 +781,7 @@ chan_end layer_note1 35, 0x18, 49 layer_end -.chan_45A: +.sound_action_metal_jump: chan_setbank 1 chan_setinstr 7 chan_setlayer 0, .layer_462 @@ -789,7 +792,7 @@ layer_note1 29, 0xc, 100 layer_note1 38, 0x12, 100 layer_end -.chan_469: +.sound_action_metal_landing: chan_setbank 1 chan_setinstr 7 chan_setlayer 0, .layer_471 @@ -800,7 +803,7 @@ layer_note1 38, 0xc, 100 layer_note1 29, 0x18, 100 layer_end -.chan_478: +.sound_action_metal_step: chan_setbank 1 chan_setinstr 7 chan_setlayer 0, .layer_480 @@ -811,7 +814,7 @@ layer_portamento 0x85, 27, 255 layer_note1 31, 0x10, 100 layer_end -.chan_488: +.sound_action_metal_heavy_landing: chan_setbank 1 chan_setinstr 7 chan_setlayer 0, .layer_490 @@ -822,7 +825,7 @@ layer_note1 20, 0xc, 100 layer_note1 24, 0x18, 100 layer_end -.chan_497: +.sound_action_clap_hands_cold: chan_setbank 3 chan_setinstr 6 chan_setenvelope .envelope_3304 @@ -834,7 +837,7 @@ layer_note1 62, 0x6, 90 layer_note1 58, 0x7, 90 layer_end -.chan_4A9: +.sound_action_hanging_step: chan_setbank 0 chan_setinstr 2 chan_setlayer 0, .layer_4BD @@ -850,7 +853,7 @@ layer_note1 62, 0x4, 127 layer_note0 56, 0x3, 127, 80 layer_end -.chan_4C5: +.sound_action_quicksand_step: chan_setbank 1 chan_setinstr 8 chan_setlayer 0, .layer_4CD @@ -861,7 +864,7 @@ layer_portamento 0x1, 29, 0x12 layer_note1 24, 0x12, 115 layer_end -.chan_4D5: +.sound_action_metal_step_tiptoe: chan_setbank 1 chan_setinstr 7 chan_setlayer 0, .layer_4DD @@ -940,7 +943,7 @@ layer_portamento 0x81, 46, 255 layer_note1 31, 0xf, 100 layer_end -.chan_540: +.sound_action_swish1: chan_setbank 0 chan_setinstr 0 chan_setlayer 0, .layer_548 @@ -950,7 +953,7 @@ chan_end layer_note1 39, 0x12, 100 layer_end -.chan_54C: +.sound_action_swish2: chan_setbank 0 chan_setinstr 0 chan_setdecayrelease 30 @@ -962,7 +965,7 @@ layer_portamento 0x81, 34, 255 layer_note1 41, 0xc, 127 layer_end -.chan_55E: +.sound_action_climb_up_tree: chan_setbank 0 chan_setinstr 1 chan_setlayer 0, .layer_566 @@ -974,7 +977,7 @@ layer_portamento 0x81, 42, 255 layer_note1 37, 0x1e, 105 layer_end -.chan_571: +.sound_action_climb_down_tree: chan_setbank 0 chan_setinstr 1 chan_setlayer 0, .layer_579 @@ -1020,7 +1023,7 @@ layer_note1 41, 0x6, 127 layer_note1 38, 0x6, 127 layer_end -.chan_5B5: +.sound_action_pat_back: chan_setbank 0 chan_setinstr 2 chan_setlayer 0, .layer_5BD @@ -1030,7 +1033,7 @@ chan_end layer_note1 32, 0xa, 127 layer_end -.chan_5C1: +.sound_action_brush_hair: chan_setbank 0 chan_setinstr 1 chan_setenvelope .envelope_32C4 @@ -1042,7 +1045,7 @@ layer_note1 39, 0x8, 90 layer_note1 41, 0x8, 90 layer_end -.chan_5D3: +.sound_action_climb_up_pole: chan_setbank 3 chan_setinstr 1 chan_setenvelope .envelope_32E4 @@ -1182,7 +1185,7 @@ layer_portamento 0x81, 35, 255 layer_note1 42, 0x3c, 110 layer_end -.chan_6C9: +.sound_action_stuck_in_ground_default: chan_setbank 1 chan_setinstr 0 chan_setlayer 0, .layer_6D1 @@ -1194,7 +1197,7 @@ layer_portamento 0x81, 31, 255 layer_note1 7, 0xc, 127 layer_end -.chan_6DC: +.sound_action_stuck_in_ground_snow: chan_setbank 1 chan_setinstr 5 chan_setlayer 0, .layer_6E4 @@ -1205,7 +1208,7 @@ layer_note1 23, 0x6, 127 layer_note1 25, 0xc, 127 layer_end -.chan_6EB: +.sound_action_stuck_in_ground_sand: chan_setbank 1 chan_setinstr 8 chan_setlayer 0, .layer_6F3 @@ -1378,7 +1381,7 @@ layer_note1 39, 0x24, 127 layer_end .chan_801: -chan_jump .chan_2DD0 +chan_jump .sound_menu_read_sign .chan_fn_804: chan_setbank 0 @@ -1452,7 +1455,7 @@ layer_end layer_jump .layer_776 .endif -.chan_876: +.sound_action_heavy_landing_default: chan_call .chan_fn_804 chan_setval 1 chan_call .delay @@ -1461,7 +1464,7 @@ chan_setinstr 0 chan_setlayer 1, .layer_388 chan_end -.chan_886: +.sound_action_heavy_landing_grass: chan_call .chan_fn_804 chan_setval 1 chan_call .delay @@ -1470,7 +1473,7 @@ chan_setinstr 1 chan_setlayer 1, .layer_397 chan_end -.chan_896: +.sound_action_heavy_landing_water: chan_call .chan_fn_804 chan_setval 1 chan_call .delay @@ -1479,7 +1482,7 @@ chan_setinstr 1 chan_setlayer 1, .layer_3A6 chan_end -.chan_8A6: +.sound_action_heavy_landing_stone: chan_call .chan_fn_804 chan_setval 1 chan_call .delay @@ -1488,7 +1491,7 @@ chan_setinstr 3 chan_setlayer 1, .layer_3B5 chan_end -.chan_8B6: +.sound_action_heavy_landing_spooky: chan_call .chan_fn_804 chan_setval 1 chan_call .delay @@ -1497,7 +1500,7 @@ chan_setinstr 4 chan_setlayer 1, .layer_3C4 chan_end -.chan_8C6: +.sound_action_heavy_landing_snow: chan_call .chan_fn_804 chan_setval 1 chan_call .delay @@ -1506,7 +1509,7 @@ chan_setinstr 5 chan_setlayer 1, .layer_3D3 chan_end -.chan_8D6: +.sound_action_heavy_landing_ice: chan_call .chan_fn_804 chan_setval 1 chan_call .delay @@ -1515,7 +1518,7 @@ chan_setinstr 6 chan_setlayer 1, .layer_3E2 chan_end -.chan_8E6: +.sound_action_heavy_landing_sand: chan_call .chan_fn_804 chan_setval 1 chan_call .delay @@ -1525,64 +1528,64 @@ chan_setlayer 1, .layer_3F1 chan_end .channel1_table: -sound_ref .chan_966 -sound_ref .chan_977 -sound_ref .chan_994 -sound_ref .chan_9BB -sound_ref .chan_9CC -sound_ref .chan_9E9 -sound_ref .chan_9FA -sound_ref .chan_A0B -sound_ref .chan_966 -sound_ref .chan_977 -sound_ref .chan_994 -sound_ref .chan_9BB -sound_ref .chan_9CC -sound_ref .chan_9E9 -sound_ref .chan_9FA -sound_ref .chan_A0B -sound_ref .chan_A28 -sound_ref .chan_A39 -sound_ref .chan_A4D -sound_ref .chan_11D0 -sound_ref .chan_A62 -sound_ref .chan_11D0 -sound_ref .chan_A77 -sound_ref .chan_A8C -sound_ref .chan_AA3 -sound_ref .chan_AC0 +sound_ref .sound_moving_slide_default +sound_ref .sound_moving_slide_grass +sound_ref .sound_moving_slide_water +sound_ref .sound_moving_slide_stone +sound_ref .sound_moving_slide_spooky +sound_ref .sound_moving_slide_snow +sound_ref .sound_moving_slide_ice +sound_ref .sound_moving_slide_sand +sound_ref .sound_moving_slide_default +sound_ref .sound_moving_slide_grass +sound_ref .sound_moving_slide_water +sound_ref .sound_moving_slide_stone +sound_ref .sound_moving_slide_spooky +sound_ref .sound_moving_slide_snow +sound_ref .sound_moving_slide_ice +sound_ref .sound_moving_slide_sand +sound_ref .sound_moving_lava_burn +sound_ref .sound_moving_slide_down_pole +sound_ref .sound_moving_slide_down_tree +sound_ref .sound_general_coin +sound_ref .sound_moving_quicksand_death +sound_ref .sound_general_coin +sound_ref .sound_moving_shocked +sound_ref .sound_moving_flying +sound_ref .sound_moving_almost_drowning +sound_ref .sound_moving_aim_cannon sound_ref .chan_AC3 -sound_ref .chan_9BB -sound_ref .chan_9CC -sound_ref .chan_9E9 -sound_ref .chan_9FA -sound_ref .chan_A0B -sound_ref .chan_AEA -sound_ref .chan_AF7 -sound_ref .chan_B0D -sound_ref .chan_B2B -sound_ref .chan_B38 -sound_ref .chan_B4E -sound_ref .chan_B5B -sound_ref .chan_B68 -sound_ref .chan_B7E -sound_ref .chan_AF7 -sound_ref .chan_B0D -sound_ref .chan_B2B -sound_ref .chan_B38 -sound_ref .chan_B4E -sound_ref .chan_B5B -sound_ref .chan_B68 -sound_ref .chan_AEA -sound_ref .chan_AF7 -sound_ref .chan_B0D -sound_ref .chan_B2B -sound_ref .chan_B38 -sound_ref .chan_B4E -sound_ref .chan_B5B -sound_ref .chan_B68 +sound_ref .sound_moving_slide_stone +sound_ref .sound_moving_slide_spooky +sound_ref .sound_moving_slide_snow +sound_ref .sound_moving_slide_ice +sound_ref .sound_moving_slide_sand +sound_ref .sound_moving_riding_shell_default +sound_ref .sound_moving_riding_shell_grass +sound_ref .sound_moving_riding_shell_water +sound_ref .sound_moving_riding_shell_stone +sound_ref .sound_moving_riding_shell_spooky +sound_ref .sound_moving_riding_shell_snow +sound_ref .sound_moving_riding_shell_ice +sound_ref .sound_moving_riding_shell_sand +sound_ref .sound_moving_riding_shell_lava +sound_ref .sound_moving_riding_shell_grass +sound_ref .sound_moving_riding_shell_water +sound_ref .sound_moving_riding_shell_stone +sound_ref .sound_moving_riding_shell_spooky +sound_ref .sound_moving_riding_shell_snow +sound_ref .sound_moving_riding_shell_ice +sound_ref .sound_moving_riding_shell_sand +sound_ref .sound_moving_riding_shell_default +sound_ref .sound_moving_riding_shell_grass +sound_ref .sound_moving_riding_shell_water +sound_ref .sound_moving_riding_shell_stone +sound_ref .sound_moving_riding_shell_spooky +sound_ref .sound_moving_riding_shell_snow +sound_ref .sound_moving_riding_shell_ice +sound_ref .sound_moving_riding_shell_sand -.chan_966: +.sound_moving_slide_default: chan_setbank 3 chan_setinstr 0 chan_setlayer 0, .layer_96E @@ -1595,7 +1598,7 @@ layer_note1 39, 0x12c, 80 layer_jump .layer_96F layer_end -.chan_977: +.sound_moving_slide_grass: chan_setbank 1 chan_setinstr 1 chan_setlayer 0, .layer_988 @@ -1613,7 +1616,7 @@ layer_note1 39, 0x12c, 70 layer_jump .layer_98C layer_end -.chan_994: +.sound_moving_slide_water: chan_setbank 2 chan_setinstr 1 chan_setlayer 0, .layer_9A8 @@ -1637,7 +1640,7 @@ layer_portamento 0x81, 39, 255 layer_note1 48, 0x32, 80 layer_end -.chan_9BB: +.sound_moving_slide_stone: chan_setbank 3 chan_setinstr 3 chan_setlayer 0, .layer_9C3 @@ -1650,7 +1653,7 @@ layer_note1 39, 0x12c, 68 layer_jump .layer_9C4 layer_end -.chan_9CC: +.sound_moving_slide_spooky: chan_setbank 1 chan_setinstr 4 chan_setlayer 0, .layer_9DD @@ -1668,7 +1671,7 @@ layer_note1 39, 0x12c, 76 layer_jump .layer_9E1 layer_end -.chan_9E9: +.sound_moving_slide_snow: chan_setbank 3 chan_setinstr 5 chan_setlayer 0, .layer_9F1 @@ -1681,7 +1684,7 @@ layer_note1 39, 0x12c, 80 layer_jump .layer_9F2 layer_end -.chan_9FA: +.sound_moving_slide_ice: chan_setbank 3 chan_setinstr 6 chan_setlayer 0, .layer_A02 @@ -1694,7 +1697,7 @@ layer_note1 39, 0x12c, 100 layer_jump .layer_A03 layer_end -.chan_A0B: +.sound_moving_slide_sand: chan_setbank 1 chan_setinstr 8 chan_setlayer 0, .layer_A1C @@ -1712,7 +1715,7 @@ layer_note1 39, 0x12c, 81 layer_jump .layer_A20 layer_end -.chan_A28: +.sound_moving_lava_burn: chan_setbank 3 chan_setinstr 8 chan_setlayer 0, .layer_A30 @@ -1725,7 +1728,7 @@ layer_note1 39, 0x12c, 120 layer_jump .layer_A31 layer_end -.chan_A39: +.sound_moving_slide_down_pole: chan_setbank 3 chan_setinstr 1 chan_setenvelope .envelope_32D4 @@ -1739,7 +1742,7 @@ layer_note1 43, 0x12c, 80 layer_jump .layer_A45 layer_end -.chan_A4D: +.sound_moving_slide_down_tree: chan_setbank 0 chan_setinstr 1 chan_setlayer 0, .layer_A55 @@ -1753,7 +1756,7 @@ layer_note1 40, 0xb4, 100 layer_jump .layer_A59 layer_end -.chan_A62: +.sound_moving_quicksand_death: chan_setbank 3 chan_setinstr 7 chan_setlayer 0, .layer_A6A @@ -1767,7 +1770,7 @@ layer_note1 34, 0xc8, 127 layer_jump .layer_A6F layer_end -.chan_A77: +.sound_moving_shocked: chan_setbank 3 chan_setinstr 9 chan_setlayer 0, .layer_A84 @@ -1782,7 +1785,7 @@ layer_note1_long 43, 0x6, 127 layer_jump .layer_A84 layer_end -.chan_A8C: +.sound_moving_flying: chan_setbank 5 chan_setinstr 6 chan_setlayer 0, .layer_A9B @@ -1799,7 +1802,7 @@ layer_somethingon layer_note1 43, 0x12c, 105 layer_jump .layer_A9C -.chan_AA3: +.sound_moving_almost_drowning: chan_setbank 9 chan_setinstr 3 chan_setval 40 @@ -1815,7 +1818,7 @@ layer_note0 60, 0xc, 100, 127 layer_note0 60, 0x30, 100, 127 layer_jump .layer_AB5 -.chan_AC0: +.sound_moving_aim_cannon: chan_jump .chan_29C2 .chan_AC3: @@ -1842,7 +1845,7 @@ layer_note1 44, 0x6, 50 layer_note1 51, 0x3, 20 layer_jump .layer_ADA -.chan_AEA: +.sound_moving_riding_shell_default: chan_setbank 3 chan_setinstr 0 chan_setlayer 0, .layer_AF2 @@ -1852,7 +1855,7 @@ chan_end layer_transpose 4 layer_jump .layer_96E -.chan_AF7: +.sound_moving_riding_shell_grass: chan_setbank 1 chan_setinstr 1 chan_setlayer 0, .layer_B08 @@ -1866,7 +1869,7 @@ chan_end layer_transpose 4 layer_jump .layer_988 -.chan_B0D: +.sound_moving_riding_shell_water: chan_setbank 2 chan_setinstr 1 chan_setlayer 0, .layer_B21 @@ -1885,7 +1888,7 @@ layer_jump .layer_9A8 layer_transpose 4 layer_jump .layer_9B3 -.chan_B2B: +.sound_moving_riding_shell_stone: chan_setbank 3 chan_setinstr 3 chan_setlayer 0, .layer_B33 @@ -1895,7 +1898,7 @@ chan_end layer_transpose 4 layer_jump .layer_9C3 -.chan_B38: +.sound_moving_riding_shell_spooky: chan_setbank 1 chan_setinstr 4 chan_setlayer 0, .layer_B49 @@ -1909,7 +1912,7 @@ chan_end layer_transpose 4 layer_jump .layer_9DD -.chan_B4E: +.sound_moving_riding_shell_snow: chan_setbank 3 chan_setinstr 5 chan_setlayer 0, .layer_B56 @@ -1919,7 +1922,7 @@ chan_end layer_transpose 4 layer_jump .layer_9F1 -.chan_B5B: +.sound_moving_riding_shell_ice: chan_setbank 3 chan_setinstr 6 chan_setlayer 0, .layer_B63 @@ -1929,7 +1932,7 @@ chan_end layer_transpose 4 layer_jump .layer_A02 -.chan_B68: +.sound_moving_riding_shell_sand: chan_setbank 1 chan_setinstr 8 chan_setlayer 0, .layer_B79 @@ -1943,7 +1946,7 @@ chan_end layer_transpose 4 layer_jump .layer_A1C -.chan_B7E: +.sound_moving_riding_shell_lava: chan_setlayer 0, .layer_B9F chan_setlayer 1, .layer_BA8 .chan_B84: @@ -1975,91 +1978,91 @@ layer_note1 56, 0xa, 127 layer_jump .layer_BAA .channel2_table: -sound_ref .chan_C52 -sound_ref .chan_C44 -sound_ref .chan_C34 -sound_ref .chan_C64 -sound_ref .chan_C74 -sound_ref .chan_C8A -sound_ref .chan_C9C -sound_ref .chan_CAA -sound_ref .chan_CB8 -sound_ref .chan_CC6 -sound_ref .chan_CD4 -sound_ref .chan_CE2 -sound_ref .chan_CF0 -sound_ref .chan_D01 -sound_ref .chan_D0F -sound_ref .chan_D1D -sound_ref .chan_D2B -sound_ref .chan_D3A -sound_ref .chan_D86 -sound_ref .chan_D48 -sound_ref .chan_D56 -sound_ref .chan_D65 -sound_ref .chan_D74 -sound_ref .chan_DD4 -sound_ref .chan_D86 -sound_ref .chan_D94 -sound_ref .chan_DA4 -sound_ref .chan_DB4 -sound_ref .chan_DC2 -sound_ref .chan_DD4 -sound_ref .chan_DEA -sound_ref .chan_E03 -sound_ref .chan_E21 -sound_ref .chan_E32 -sound_ref .chan_E3E -sound_ref .chan_E41 -sound_ref .chan_E4E -sound_ref .chan_C8A -sound_ref .chan_C9C -sound_ref .chan_CAA +sound_ref .sound_mario_jump_yah +sound_ref .sound_mario_jump_wah +sound_ref .sound_mario_jump_hoo +sound_ref .sound_mario_hoohoo +sound_ref .sound_mario_yahoo +sound_ref .sound_mario_uh +sound_ref .sound_mario_hrmm +sound_ref .sound_mario_wah2 +sound_ref .sound_mario_whoa +sound_ref .sound_mario_eeuh +sound_ref .sound_mario_attacked +sound_ref .sound_mario_ooof +sound_ref .sound_mario_here_we_go +sound_ref .sound_mario_yawning +sound_ref .sound_mario_snoring1 +sound_ref .sound_mario_snoring2 +sound_ref .sound_mario_waaaooow +sound_ref .sound_mario_haha +sound_ref .sound_mario_panting1 +sound_ref .sound_mario_uh2 +sound_ref .sound_mario_on_fire +sound_ref .sound_mario_dying +sound_ref .sound_mario_panting_cold +sound_ref .sound_mario_coughing3 +sound_ref .sound_mario_panting1 +sound_ref .sound_mario_panting2 +sound_ref .sound_mario_panting3 +sound_ref .sound_mario_coughing1 +sound_ref .sound_mario_coughing2 +sound_ref .sound_mario_coughing3 +sound_ref .sound_mario_punch_yah +sound_ref .sound_mario_punch_hoo +sound_ref .sound_mario_mama_mia +sound_ref .sound_mario_okey_dokey +sound_ref .sound_mario_ground_pound_wah +sound_ref .sound_mario_drowning +sound_ref .sound_mario_punch_wah +sound_ref .sound_mario_uh +sound_ref .sound_mario_hrmm +sound_ref .sound_mario_wah2 .ifdef VERSION_JP - sound_ref .chan_C34 - sound_ref .chan_C34 - sound_ref .chan_C34 - sound_ref .chan_C34 - sound_ref .chan_C34 - sound_ref .chan_C34 - sound_ref .chan_C34 - sound_ref .chan_C34 - sound_ref .chan_C34 - sound_ref .chan_C34 - sound_ref .chan_C34 - sound_ref .chan_C34 - sound_ref .chan_C34 - sound_ref .chan_C34 - sound_ref .chan_C34 - sound_ref .chan_C34 + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo .else - sound_ref .chan_E67 - sound_ref .chan_C34 - sound_ref .chan_C34 - sound_ref .chan_C74 - sound_ref .chan_C74 - sound_ref .chan_C74 - sound_ref .chan_E74 - sound_ref .chan_E80 - sound_ref .chan_E8C - sound_ref .chan_E98 - sound_ref .chan_EA4 - sound_ref .chan_EB0 - sound_ref .chan_EBD - sound_ref .chan_EC9 - sound_ref .chan_EEC - sound_ref .chan_F00 - sound_ref .chan_F0D - sound_ref .chan_F1C - sound_ref .chan_F2C - sound_ref .chan_F3C - sound_ref .chan_F4B - sound_ref .chan_F5B - sound_ref .chan_F6B - sound_ref .chan_F7A + sound_ref .sound_peach_dear_mario + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_jump_hoo + sound_ref .sound_mario_yahoo + sound_ref .sound_mario_yahoo + sound_ref .sound_mario_yahoo + sound_ref .sound_mario_waha + sound_ref .sound_mario_yippee + sound_ref .sound_mario_doh + sound_ref .sound_mario_game_over + sound_ref .sound_mario_hello + sound_ref .sound_mario_press_start_to_play + sound_ref .sound_mario_twirl_bounce + sound_ref .sound_mario_snoring3 + sound_ref .sound_mario_so_longa_bowser + sound_ref .sound_mario_ima_tired + sound_ref .sound_peach_mario + sound_ref .sound_peach_power_of_the_stars + sound_ref .sound_peach_thanks_to_you + sound_ref .sound_peach_thank_you_mario + sound_ref .sound_peach_something_special + sound_ref .sound_peach_bake_a_cake + sound_ref .sound_peach_for_mario + sound_ref .sound_peach_mario2 .endif -.chan_C34: +.sound_mario_jump_hoo: chan_setbank 8 chan_setinstr 0 chan_setlayer 0, .layer_C3C @@ -2073,7 +2076,7 @@ layer_portamento 0x82, 41, 127 layer_note1 37, 0x14, 127 layer_end -.chan_C44: +.sound_mario_jump_wah: chan_setbank 8 chan_setinstr 1 chan_setlayer 0, .layer_C4C @@ -2085,7 +2088,7 @@ layer_transpose 254 layer_note1 38, 0x18, 127 layer_end -.chan_C52: +.sound_mario_jump_yah: chan_setbank 10 chan_setinstr 9 chan_setlayer 0, .layer_C5A @@ -2098,7 +2101,7 @@ layer_portamento 0x82, 39, 200 layer_note1 38, 0x24, 120 layer_end -.chan_C64: +.sound_mario_hoohoo: chan_setbank 10 chan_setinstr 1 chan_setlayer 0, .layer_C6C @@ -2112,7 +2115,7 @@ layer_portamento 0x82, 44, 200 layer_note1 39, 0x30, 127 layer_end -.chan_C74: +.sound_mario_yahoo: chan_setbank 8 chan_setinstr 4 chan_setlayer 0, .layer_C7C @@ -2126,7 +2129,7 @@ layer_note1 42, 0x1e, 110 layer_note1 39, 0x41, 110 layer_end -.chan_C8A: +.sound_mario_uh: chan_setbank 8 chan_setinstr 5 chan_setlayer 0, .layer_C92 @@ -2138,7 +2141,7 @@ layer_portamento 0x81, 41, 255 layer_note1 38, 0x2b, 115 layer_end -.chan_C9C: +.sound_mario_hrmm: chan_setbank 8 chan_setinstr 6 chan_setlayer 0, .layer_CA4 @@ -2149,7 +2152,7 @@ layer_transpose 254 layer_note1 44, 0x1e, 110 layer_end -.chan_CAA: +.sound_mario_wah2: chan_setbank 8 chan_setinstr 7 chan_setlayer 0, .layer_CB2 @@ -2160,7 +2163,7 @@ layer_transpose 253 layer_note1 39, 0x1c, 127 layer_end -.chan_CB8: +.sound_mario_whoa: chan_setbank 8 chan_setinstr 8 chan_setlayer 0, .layer_CC0 @@ -2171,7 +2174,7 @@ layer_transpose 254 layer_note1 40, 0x30, 110 layer_end -.chan_CC6: +.sound_mario_eeuh: chan_setbank 8 chan_setinstr 9 chan_setlayer 0, .layer_CCE @@ -2182,7 +2185,7 @@ layer_transpose 254 layer_note1 40, 0x44, 105 layer_end -.chan_CD4: +.sound_mario_attacked: chan_setbank 8 chan_setinstr 10 chan_setlayer 0, .layer_CDC @@ -2193,7 +2196,7 @@ layer_transpose 254 layer_note1 41, 0x30, 120 layer_end -.chan_CE2: +.sound_mario_ooof: chan_setbank 8 chan_setinstr 11 chan_setlayer 0, .layer_CEA @@ -2204,7 +2207,7 @@ layer_transpose 254 layer_note1 38, 0x30, 127 layer_end -.chan_CF0: +.sound_mario_here_we_go: chan_setbank 8 chan_setinstr 12 chan_setlayer 0, .layer_CF8 @@ -2215,7 +2218,7 @@ layer_portamento 0x81, 38, 200 layer_note1 41, 0x85, 127 layer_end -.chan_D01: +.sound_mario_yawning: chan_setbank 8 chan_setinstr 13 chan_setlayer 0, .layer_D09 @@ -2226,7 +2229,7 @@ layer_transpose 254 layer_note1 39, 0x7f, 105 layer_end -.chan_D0F: +.sound_mario_snoring1: chan_setbank 8 chan_setinstr 14 chan_setlayer 0, .layer_D17 @@ -2237,7 +2240,7 @@ layer_transpose 254 layer_note1 39, 0x60, 64 layer_end -.chan_D1D: +.sound_mario_snoring2: chan_setbank 8 chan_setinstr 15 chan_setlayer 0, .layer_D25 @@ -2248,7 +2251,7 @@ layer_transpose 254 layer_note1 39, 0x5c, 52 layer_end -.chan_D2B: +.sound_mario_waaaooow: chan_setbank 10 chan_setinstr 0 chan_setlayer 0, .layer_D33 @@ -2259,7 +2262,7 @@ layer_transpose 254 layer_note1 39, 0xaa, 127 layer_end -.chan_D3A: +.sound_mario_haha: chan_setbank 8 chan_setinstr 3 chan_setlayer 0, .layer_D42 @@ -2270,7 +2273,7 @@ layer_transpose 255 layer_note1 39, 0x4d, 120 layer_end -.chan_D48: +.sound_mario_uh2: chan_setbank 10 chan_setinstr 6 chan_setlayer 0, .layer_D50 @@ -2281,7 +2284,7 @@ layer_transpose 254 layer_note1 43, 0x1e, 105 layer_end -.chan_D56: +.sound_mario_on_fire: chan_setbank 10 chan_setinstr 5 chan_setlayer 0, .layer_D5E @@ -2292,7 +2295,7 @@ layer_transpose 254 layer_note1 39, 0xc8, 127 layer_end -.chan_D65: +.sound_mario_dying: chan_setbank 10 chan_setinstr 4 chan_setlayer 0, .layer_D6D @@ -2303,7 +2306,7 @@ layer_transpose 254 layer_note1 39, 0x8c, 110 layer_end -.chan_D74: +.sound_mario_panting_cold: chan_setbank 10 chan_setinstr 2 chan_setlayer 0, .layer_D7C @@ -2315,7 +2318,7 @@ layer_portamento 0x82, 35, 255 layer_note1 38, 0x30, 127 layer_end -.chan_D86: +.sound_mario_panting1: chan_setbank 10 chan_setinstr 2 chan_setlayer 0, .layer_D8E @@ -2326,7 +2329,7 @@ layer_transpose 254 layer_note1 39, 0x3c, 100 layer_end -.chan_D94: +.sound_mario_panting2: chan_setbank 10 chan_setinstr 2 chan_setlayer 0, .layer_D9C @@ -2338,7 +2341,7 @@ layer_delay 0x4 layer_note1 38, 0x3c, 100 layer_end -.chan_DA4: +.sound_mario_panting3: chan_setbank 10 chan_setinstr 2 chan_setlayer 0, .layer_DAC @@ -2350,7 +2353,7 @@ layer_delay 0x8 layer_note1 40, 0x3c, 100 layer_end -.chan_DB4: +.sound_mario_coughing1: chan_setbank 10 chan_setinstr 7 chan_setlayer 0, .layer_DBC @@ -2361,7 +2364,7 @@ layer_transpose 254 layer_note1 39, 0x10, 115 layer_end -.chan_DC2: +.sound_mario_coughing2: chan_setbank 10 chan_setinstr 7 chan_setlayer 0, .layer_DCA @@ -2373,7 +2376,7 @@ layer_portamento 0x81, 38, 255 layer_note1 41, 0x18, 115 layer_end -.chan_DD4: +.sound_mario_coughing3: chan_setbank 10 chan_setinstr 7 chan_setlayer 0, .layer_DDC @@ -2387,7 +2390,7 @@ layer_note1 41, 0xc, 115 layer_note1 35, 0x12, 115 layer_end -.chan_DEA: +.sound_mario_punch_yah: chan_setbank 10 chan_setinstr 9 chan_setlayer 0, .layer_DFE @@ -2402,7 +2405,7 @@ chan_end layer_transpose 254 layer_jump .layer_C5C -.chan_E03: +.sound_mario_punch_hoo: chan_setbank 10 chan_setinstr 10 chan_setlayer 0, .layer_E17 @@ -2419,7 +2422,7 @@ layer_portamento 0x81, 42, 255 layer_note1 38, 0x30, 115 layer_end -.chan_E21: +.sound_mario_mama_mia: chan_setbank 10 chan_setinstr 11 chan_setlayer 0, .layer_E29 @@ -2430,7 +2433,7 @@ layer_portamento 0x81, 38, 255 layer_note1 36, 0x8c, 115 layer_end -.chan_E32: +.sound_mario_okey_dokey: chan_setbank 10 chan_setinstr 12 chan_setlayer 0, .layer_E3A @@ -2440,10 +2443,10 @@ chan_end layer_note1 39, 0x60, 115 layer_end -.chan_E3E: -chan_jump .chan_CAA +.sound_mario_ground_pound_wah: +chan_jump .sound_mario_wah2 -.chan_E41: +.sound_mario_drowning: chan_setbank 10 chan_setinstr 13 chan_setlayer 0, .layer_E49 @@ -2453,7 +2456,7 @@ chan_end layer_note1 38, 0x91, 127 layer_end -.chan_E4E: +.sound_mario_punch_wah: chan_setbank 8 chan_setinstr 1 chan_setlayer 0, .layer_E62 @@ -2469,7 +2472,7 @@ layer_transpose 255 layer_jump .layer_C4E .ifndef VERSION_JP - .chan_E67: + .sound_peach_dear_mario: chan_setbank 10 chan_setinstr 15 chan_setlayer 0, .layer_E6F @@ -2479,7 +2482,7 @@ layer_jump .layer_C4E layer_note1 39, 0x2bc, 127 layer_end - .chan_E74: + .sound_mario_waha: chan_setbank 8 chan_setinstr 24 chan_setlayer 0, .layer_E7C @@ -2489,7 +2492,7 @@ layer_jump .layer_C4E layer_note1 39, 0x5a, 127 layer_end - .chan_E80: + .sound_mario_yippee: chan_setbank 8 chan_setinstr 25 chan_setlayer 0, .layer_E88 @@ -2499,7 +2502,7 @@ layer_jump .layer_C4E layer_note1 39, 0x5a, 97 layer_end - .chan_E8C: + .sound_mario_doh: chan_setbank 8 chan_setinstr 16 chan_setlayer 0, .layer_E94 @@ -2509,7 +2512,7 @@ layer_jump .layer_C4E layer_note1 41, 0x46, 127 layer_end - .chan_E98: + .sound_mario_game_over: chan_setbank 8 chan_setinstr 17 chan_setlayer 0, .layer_EA0 @@ -2519,7 +2522,7 @@ layer_jump .layer_C4E layer_note1 39, 0x55, 110 layer_end - .chan_EA4: + .sound_mario_hello: chan_setbank 8 chan_setinstr 18 chan_setlayer 0, .layer_EAC @@ -2529,7 +2532,7 @@ layer_jump .layer_C4E layer_note1 39, 0x46, 127 layer_end - .chan_EB0: + .sound_mario_press_start_to_play: chan_setbank 8 chan_setinstr 19 chan_setlayer 0, .layer_EB8 @@ -2539,7 +2542,7 @@ layer_jump .layer_C4E layer_note1 39, 0x12c, 127 layer_end - .chan_EBD: + .sound_mario_twirl_bounce: chan_setbank 8 chan_setinstr 20 chan_setlayer 0, .layer_EC5 @@ -2549,7 +2552,7 @@ layer_jump .layer_C4E layer_note1 39, 0x30, 127 layer_end - .chan_EC9: + .sound_mario_snoring3: chan_setbank 8 chan_setlayer 0, .layer_ECF chan_end @@ -2572,7 +2575,7 @@ layer_jump .layer_C4E layer_note1 37, 0x4e, 64 layer_end - .chan_EEC: + .sound_mario_so_longa_bowser: chan_setbank 8 chan_setinstr 22 chan_setlayer 0, .layer_EF7 @@ -2584,7 +2587,7 @@ layer_jump .layer_C4E layer_note1 39, 0xc8, 110 layer_end - .chan_F00: + .sound_mario_ima_tired: chan_setbank 8 chan_setinstr 23 chan_setlayer 0, .layer_F08 @@ -2594,7 +2597,7 @@ layer_jump .layer_C4E layer_note1 39, 0x96, 110 layer_end - .chan_F0D: + .sound_peach_mario: chan_setbank 10 chan_setinstr 16 chan_setlayer 0, .layer_F18 @@ -2605,7 +2608,7 @@ layer_jump .layer_C4E layer_note1 39, 0x46, 127 layer_end - .chan_F1C: + .sound_peach_power_of_the_stars: chan_setbank 10 chan_setinstr 17 chan_setlayer 0, .layer_F27 @@ -2616,7 +2619,7 @@ layer_jump .layer_C4E layer_note1 39, 0x15e, 127 layer_end - .chan_F2C: + .sound_peach_thanks_to_you: chan_setbank 10 chan_setinstr 18 chan_setlayer 0, .layer_F37 @@ -2627,7 +2630,7 @@ layer_jump .layer_C4E layer_note1 39, 0xb4, 127 layer_end - .chan_F3C: + .sound_peach_thank_you_mario: chan_setbank 10 chan_setinstr 19 chan_setlayer 0, .layer_F47 @@ -2638,7 +2641,7 @@ layer_jump .layer_C4E layer_note1 39, 0x64, 127 layer_end - .chan_F4B: + .sound_peach_something_special: chan_setbank 10 chan_setinstr 20 chan_setlayer 0, .layer_F56 @@ -2649,7 +2652,7 @@ layer_jump .layer_C4E layer_note1 39, 0xdc, 127 layer_end - .chan_F5B: + .sound_peach_bake_a_cake: chan_setbank 10 chan_setinstr 21 chan_setlayer 0, .layer_F66 @@ -2660,7 +2663,7 @@ layer_jump .layer_C4E layer_note1 39, 0x190, 127 layer_end - .chan_F6B: + .sound_peach_for_mario: chan_setbank 10 chan_setinstr 22 chan_setlayer 0, .layer_F76 @@ -2671,7 +2674,7 @@ layer_jump .layer_C4E layer_note1 39, 0x50, 127 layer_end - .chan_F7A: + .sound_peach_mario2: chan_setbank 10 chan_setinstr 23 chan_setval 20 @@ -2698,150 +2701,149 @@ layer_jump .layer_C4E .endif .channel38_table: -sound_ref .chan_108E -sound_ref .chan_10A7 -sound_ref .chan_10A7 -sound_ref .chan_10B3 -sound_ref .chan_10CA -sound_ref .chan_10DB -sound_ref .chan_10EA -sound_ref .chan_1110 -sound_ref .chan_111C -sound_ref .chan_1130 -sound_ref .chan_1F4E -sound_ref .chan_114D -sound_ref .chan_1159 -sound_ref .chan_116D -sound_ref .chan_117D -sound_ref .chan_1189 -sound_ref .chan_11D0 -sound_ref .chan_11D0 -sound_ref .chan_11F3 -sound_ref .chan_11F3 -sound_ref .chan_11F3 -sound_ref .chan_11F3 -sound_ref .chan_125A -sound_ref .chan_126F -sound_ref .chan_127E -sound_ref .chan_127E -sound_ref .chan_128A -sound_ref .chan_128A -sound_ref .chan_128A -sound_ref .chan_128A -sound_ref .chan_128A -sound_ref .chan_128A -sound_ref .chan_1296 -sound_ref .chan_1296 -sound_ref .chan_12BF -sound_ref .chan_12BF -sound_ref .chan_12D4 +sound_ref .sound_general_activate_cap_switch +sound_ref .sound_menu_enter_hole +sound_ref .sound_menu_enter_hole +sound_ref .sound_general_flame_out +sound_ref .sound_general_open_wood_door +sound_ref .sound_general_close_wood_door +sound_ref .sound_general_open_iron_door +sound_ref .sound_general_close_iron_door +sound_ref .sound_general_bubbles +sound_ref .sound_general_moving_water +sound_ref .sound_general_swish_water +sound_ref .sound_general_quiet_bubble +sound_ref .sound_general_volcano_explosion +sound_ref .sound_general_quiet_bubble2 +sound_ref .sound_general_castle_trap_open +sound_ref .sound_general_wall_explosion +sound_ref .sound_general_coin +sound_ref .sound_general_coin +sound_ref .sound_general_coin_water +sound_ref .sound_general_coin_water +sound_ref .sound_general_coin_water +sound_ref .sound_general_coin_water +sound_ref .sound_general_short_star +sound_ref .sound_general_big_clock +sound_ref .sound_general_loud_pound +sound_ref .sound_general_loud_pound +sound_ref .sound_general_short_pound +sound_ref .sound_general_short_pound +sound_ref .sound_general_short_pound +sound_ref .sound_general_short_pound +sound_ref .sound_general_short_pound +sound_ref .sound_general_short_pound +sound_ref .sound_general_open_chest +sound_ref .sound_general_open_chest +sound_ref .sound_general_clam_shell1 +sound_ref .sound_general_clam_shell1 +sound_ref .sound_general_box_landing sound_ref .chan_12EB -sound_ref .chan_1303 -sound_ref .chan_1316 -sound_ref .chan_1330 -sound_ref .chan_1330 -sound_ref .chan_1330 -sound_ref .chan_1330 -sound_ref .chan_133C -sound_ref .chan_1348 -sound_ref .chan_1369 -sound_ref .chan_1385 -sound_ref .chan_13A5 -sound_ref .chan_13BA +sound_ref .sound_general_clam_shell2 +sound_ref .sound_general_clam_shell3 +sound_ref .sound_general_painting_eject +sound_ref .sound_general_painting_eject +sound_ref .sound_general_painting_eject +sound_ref .sound_general_painting_eject +sound_ref .sound_menu_star_sound +sound_ref .sound_general_platform +sound_ref .sound_general_bobomb_explosion +sound_ref .sound_general_bowser_bomb_explosion +sound_ref .sound_general_coin_spurt +sound_ref .sound_general_explosion6 sound_ref .chan_13D4 -sound_ref .chan_11D0 -sound_ref .chan_13ED -sound_ref .chan_13FD -sound_ref .chan_140D +sound_ref .sound_general_coin +sound_ref .sound_general_boat_tilt1 +sound_ref .sound_general_boat_tilt2 +sound_ref .sound_general_coin_drop sound_ref .chan_1429 -sound_ref .chan_144B -sound_ref .chan_1471 -sound_ref .chan_149E -sound_ref .chan_14EA -sound_ref .chan_14FE +sound_ref .sound_general_switch1 +sound_ref .sound_general_chain_chomp1 +sound_ref .sound_general_chain_chomp2 +sound_ref .sound_general_switch2 +sound_ref .sound_general_moving_in_sand sound_ref .chan_1519 -sound_ref .chan_152F -sound_ref .chan_154B -sound_ref .chan_1561 -sound_ref .chan_1577 -sound_ref .chan_1591 -sound_ref .chan_15A2 -sound_ref .chan_15B9 +sound_ref .sound_general_switch3 +sound_ref .sound_general_cage_open +sound_ref .sound_general_quiet_pound1 +sound_ref .sound_general_break_box +sound_ref .sound_general_switch4 +sound_ref .sound_general_quiet_pound2 +sound_ref .sound_general_big_pound sound_ref .chan_15CD sound_ref .chan_15DA -sound_ref .chan_15F2 -sound_ref .chan_15FF -sound_ref .chan_1613 -sound_ref .chan_163B -sound_ref .chan_164D -sound_ref .chan_168B -sound_ref .chan_16BB -sound_ref .chan_16D8 -sound_ref .chan_16EB -sound_ref .chan_31A6 -sound_ref .chan_31DE -sound_ref .chan_3214 -sound_ref .chan_3248 -sound_ref .chan_3292 -sound_ref .chan_328D -sound_ref .chan_16FE -sound_ref .chan_1712 -sound_ref .chan_1722 -sound_ref .chan_1749 -sound_ref .chan_1761 -sound_ref .chan_1770 -sound_ref .chan_1783 -sound_ref .chan_1796 -sound_ref .chan_17AB -sound_ref .chan_17B7 -sound_ref .chan_17D1 -sound_ref .chan_1821 -sound_ref .chan_184F -sound_ref .chan_1862 -sound_ref .chan_187B -sound_ref .chan_18A7 -sound_ref .chan_18C0 -sound_ref .chan_18D7 -sound_ref .chan_18F3 -sound_ref .chan_192A -sound_ref .chan_19CA -sound_ref .chan_19EA -sound_ref .chan_1A07 -sound_ref .chan_1A17 -sound_ref .chan_1A27 -sound_ref .chan_1A2A -sound_ref .chan_1A2D -sound_ref .chan_1A39 -sound_ref .chan_1A56 -sound_ref .chan_1A6E -sound_ref .chan_1A87 +sound_ref .sound_general_cannon_up +sound_ref .sound_general_grindel_spindel_roll +sound_ref .sound_general_explosion7 +sound_ref .sound_general_shake_coffin +sound_ref .sound_general_pyramid_top_spin +sound_ref .sound_general_pyramid_top_explosion +sound_ref .sound_general_race_gun_shot +sound_ref .sound_general_star_door_open +sound_ref .sound_general_star_door_close +sound_ref .sound_general_bird_chirp2 +sound_ref .sound_obj_bird_chirp3 +sound_ref .sound_obj_bird_chirp1 +sound_ref .sound_air_castle_outdoors_ambient +sound_ref .sound_general_switch_tick_fast +sound_ref .sound_general_switch_tick_slow +sound_ref .sound_general_pound_rock +sound_ref .sound_general_star_appears +sound_ref .sound_general_collect_1up +sound_ref .sound_general_rotating_block_alert +sound_ref .sound_general_button_press +sound_ref .sound_general_elevator_move +sound_ref .sound_general_swish_air +sound_ref .sound_general_haunted_chair +sound_ref .sound_general_soft_landing +sound_ref .sound_general_haunted_chair_move +sound_ref .sound_general_bowser_explode +sound_ref .sound_general_bowser_key +sound_ref .sound_general_bowser_platform +sound_ref .sound_general_1up_appear +sound_ref .sound_general_heart_spin +sound_ref .sound_general_pound_wood_post +sound_ref .sound_general_water_level_trig +sound_ref .sound_general_switch_door_open +sound_ref .sound_general_red_coin +sound_ref .sound_general_birds_fly_away +sound_ref .sound_general_right_answer +sound_ref .sound_general_metal_pound +sound_ref .sound_general_boing1 +sound_ref .sound_general_boing2 +sound_ref .sound_general_yoshi_walk +sound_ref .sound_general_enemy_alert1 +sound_ref .sound_general_yoshi_talk +sound_ref .sound_general_splattering +sound_ref .sound_general_boing3 +sound_ref .sound_general_grand_star +sound_ref .sound_general_grand_star_jump +sound_ref .sound_general_boat_rock .ifdef VERSION_JP - sound_ref .chan_1AB4_jp - sound_ref .chan_10A7 - sound_ref .chan_10A7 - sound_ref .chan_10A7 - sound_ref .chan_10CA - sound_ref .chan_10DB - sound_ref .chan_10EA - sound_ref .chan_1110 - sound_ref .chan_111C - sound_ref .chan_10A7 - sound_ref .chan_10A7 + sound_ref .sound_menu_enter_hole + sound_ref .sound_menu_enter_hole + sound_ref .sound_menu_enter_hole + sound_ref .sound_general_open_wood_door + sound_ref .sound_general_close_wood_door + sound_ref .sound_general_open_iron_door + sound_ref .sound_general_close_iron_door + sound_ref .sound_general_bubbles + sound_ref .sound_menu_enter_hole + sound_ref .sound_menu_enter_hole .else - sound_ref .chan_1AB4 - sound_ref .chan_1AD0 - sound_ref .chan_10A7 - sound_ref .chan_18F3 - sound_ref .chan_192A - sound_ref .chan_19CA - sound_ref .chan_19EA - sound_ref .chan_1A07 - sound_ref .chan_1A17 - sound_ref .chan_1A27 - sound_ref .chan_1A2A + sound_ref .sound_general_vanish_sfx + sound_ref .sound_menu_enter_hole + sound_ref .sound_general_red_coin + sound_ref .sound_general_birds_fly_away + sound_ref .sound_general_right_answer + sound_ref .sound_general_metal_pound + sound_ref .sound_general_boing1 + sound_ref .sound_general_boing2 + sound_ref .sound_general_yoshi_walk + sound_ref .sound_general_enemy_alert1 .endif -.chan_108E: +.sound_general_activate_cap_switch: chan_setbank 5 chan_setinstr 7 chan_setlayer 0, .layer_109F @@ -2856,7 +2858,7 @@ layer_portamento 0x1, 27, 0x28 layer_note1 37, 0x7f, 120 layer_end -.chan_10A7: +.sound_menu_enter_hole: chan_setbank 4 chan_setinstr 0 chan_setlayer 0, .layer_10AF @@ -2866,7 +2868,7 @@ chan_end layer_note1 39, 0x30, 85 layer_end -.chan_10B3: +.sound_general_flame_out: chan_setbank 3 chan_setinstr 8 chan_setenvelope .envelope_3314 @@ -2880,7 +2882,7 @@ layer_note1 43, 0x8, 127 layer_note1 27, 0x7f, 127 layer_end -.chan_10CA: +.sound_general_open_wood_door: chan_setbank 4 chan_setinstr 1 chan_setlayer 0, .layer_10D2 @@ -2892,7 +2894,7 @@ layer_setinstr 2 layer_note1 39, 0x48, 60 layer_end -.chan_10DB: +.sound_general_close_wood_door: chan_setbank 4 chan_setinstr 1 chan_setlayer 0, .layer_10E3 @@ -2903,7 +2905,7 @@ layer_note1 37, 0x6, 100 layer_note1 34, 0x18, 100 layer_end -.chan_10EA: +.sound_general_open_iron_door: chan_setbank 4 chan_setinstr 4 chan_setlayer 0, .layer_10FE @@ -2925,7 +2927,7 @@ layer_portamento 0x81, 44, 255 layer_note1 34, 0x2c, 85 layer_end -.chan_1110: +.sound_general_close_iron_door: chan_setbank 4 chan_setinstr 4 chan_setlayer 0, .layer_1118 @@ -2935,7 +2937,7 @@ chan_end layer_note1 39, 0x30, 115 layer_end -.chan_111C: +.sound_general_bubbles: chan_setbank 4 chan_setinstr 6 chan_setlayer 0, .layer_1124 @@ -2948,7 +2950,7 @@ layer_note1 39, 0x9, 70 layer_note1 39, 0x8, 75 layer_end -.chan_1130: +.sound_general_moving_water: chan_setbank 4 chan_setinstr 5 chan_setlayer 0, .layer_1138 @@ -2958,7 +2960,7 @@ chan_end layer_note1 39, 0x91, 127 layer_end -.chan_113D: +.sound_obj_sushi_shark_water_sound: chan_setbank 4 chan_setinstr 5 chan_setlayer 0, .layer_1145 @@ -2969,7 +2971,7 @@ layer_portamento 0x81, 27, 255 layer_note1 32, 0x60, 127 layer_end -.chan_114D: +.sound_general_quiet_bubble: chan_setbank 4 chan_setinstr 6 chan_setlayer 0, .layer_1155 @@ -2979,7 +2981,7 @@ chan_end layer_note1 39, 0x14, 70 layer_end -.chan_1159: +.sound_general_volcano_explosion: chan_setbank 4 chan_setinstr 15 chan_setlayer 0, .layer_1161 @@ -2991,7 +2993,7 @@ layer_portamento 0x81, 41, 255 layer_note1 27, 0x96, 127 layer_end -.chan_116D: +.sound_general_quiet_bubble2: chan_setbank 4 chan_setinstr 6 chan_setlayer 0, .layer_1175 @@ -3002,7 +3004,7 @@ layer_portamento 0x81, 34, 255 layer_note1 37, 0x18, 80 layer_end -.chan_117D: +.sound_general_castle_trap_open: chan_setbank 4 chan_setinstr 8 chan_setlayer 0, .layer_1185 @@ -3012,7 +3014,7 @@ chan_end layer_note1 39, 0x40, 120 layer_end -.chan_1189: +.sound_general_wall_explosion: chan_setbank 5 chan_setinstr 7 chan_setlayer 0, .layer_109F @@ -3042,7 +3044,7 @@ layer_note0 29, 0x9, 127, 64 layer_note0 24, 0x8, 127, 64 layer_end -.chan_11D0: +.sound_general_coin: chan_setbank 9 chan_setinstr 3 chan_setenvelope .envelope_3358 @@ -3063,7 +3065,7 @@ layer_note1 30, 0x5, 40 layer_note1 42, 0x37, 85 layer_end -.chan_11F3: +.sound_general_coin_water: chan_setbank 9 chan_setinstr 3 chan_setenvelope .envelope_3358 @@ -3114,7 +3116,7 @@ layer_transpose 23 layer_call .layer_fn_11E6 layer_end -.chan_125A: +.sound_general_short_star: chan_setbank 4 chan_setinstr 14 chan_setenvelope .envelope_33FC @@ -3127,7 +3129,7 @@ layer_note1 38, 0x30, 127 layer_delay 0x30 layer_end -.chan_126F: +.sound_general_big_clock: chan_setbank 4 chan_setinstr 9 chan_setlayer 0, .layer_1277 @@ -3138,7 +3140,7 @@ layer_note1 37, 0xa, 100 layer_note1 26, 0x12, 120 layer_end -.chan_127E: +.sound_general_loud_pound: chan_setbank 4 chan_setinstr 10 chan_setlayer 0, .layer_1286 @@ -3148,7 +3150,7 @@ chan_end layer_note1 39, 0xf, 120 layer_end -.chan_128A: +.sound_general_short_pound: chan_setbank 4 chan_setinstr 10 chan_setlayer 0, .layer_1292 @@ -3158,7 +3160,7 @@ chan_end layer_note1 37, 0x12, 120 layer_end -.chan_1296: +.sound_general_open_chest: chan_setbank 7 chan_setinstr 1 chan_setval 25 @@ -3179,7 +3181,7 @@ layer_portamento 0x81, 27, 255 layer_note1 25, 0x5a, 108 layer_end -.chan_12BF: +.sound_general_clam_shell1: chan_setbank 4 chan_setinstr 11 chan_setlayer 0, .layer_12C7 @@ -3193,7 +3195,7 @@ layer_portamento 0x82, 27, 255 layer_note1 32, 0x73, 127 layer_end -.chan_12D4: +.sound_general_box_landing: chan_setbank 4 chan_setinstr 1 chan_setenvelope .envelope_33CC @@ -3223,7 +3225,7 @@ layer_portamento 0x2, 17, 0x28 layer_note1 5, 0x60, 127 layer_end -.chan_1303: +.sound_general_clam_shell2: chan_setbank 4 chan_setinstr 11 chan_setlayer 0, .layer_130B @@ -3235,7 +3237,7 @@ layer_note1 31, 0x6, 110 layer_transpose 8 layer_jump .layer_12CA -.chan_1316: +.sound_general_clam_shell3: chan_setbank 4 chan_setinstr 5 chan_setlayer 0, .layer_131E @@ -3250,7 +3252,7 @@ layer_portamento 0x82, 20, 255 layer_note1 32, 0x5a, 127 layer_end -.chan_1330: +.sound_general_painting_eject: chan_setbank 4 chan_setinstr 13 chan_setlayer 0, .layer_1338 @@ -3260,7 +3262,7 @@ chan_end layer_note1 39, 0x73, 95 layer_end -.chan_133C: +.sound_menu_star_sound: chan_setbank 4 chan_setinstr 14 chan_setlayer 0, .layer_1344 @@ -3270,7 +3272,7 @@ chan_end layer_note1 39, 0x7f, 115 layer_end -.chan_1348: +.sound_general_platform: chan_setbank 4 chan_setinstr 15 chan_setlayer 0, .layer_1350 @@ -3285,7 +3287,7 @@ layer_note0 30, 0x7, 115, 20 layer_note0 29, 0x60, 115, 20 layer_end -.chan_1369: +.sound_general_bobomb_explosion: chan_setbank 4 chan_setinstr 15 chan_setenvelope .envelope_33EC @@ -3303,7 +3305,7 @@ layer_note1 43, 0xc, 115 layer_note1 34, 0x7f, 127 layer_end -.chan_1385: +.sound_general_bowser_bomb_explosion: chan_setbank 4 chan_setinstr 15 chan_setlayer 0, .layer_1395 @@ -3324,7 +3326,7 @@ layer_end layer_note1 22, 0x96, 127 layer_end -.chan_13A5: +.sound_general_coin_spurt: chan_setbank 9 chan_setinstr 3 chan_setval 20 @@ -3337,7 +3339,7 @@ layer_portamento 0x81, 36, 255 layer_note1 48, 0x6, 80 layer_end -.chan_13BA: +.sound_general_explosion6: chan_setbank 4 chan_setinstr 15 chan_setenvelope .envelope_33EC @@ -3368,7 +3370,7 @@ layer_portamento 0x81, 20, 255 layer_note1 25, 0x60, 127 layer_end -.chan_13ED: +.sound_general_boat_tilt1: chan_setbank 4 chan_setinstr 2 chan_setlayer 0, .layer_13F5 @@ -3379,7 +3381,7 @@ layer_portamento 0x81, 12, 255 layer_note1 13, 0x6e, 127 layer_end -.chan_13FD: +.sound_general_boat_tilt2: chan_setbank 4 chan_setinstr 2 chan_setlayer 0, .layer_1405 @@ -3390,7 +3392,7 @@ layer_portamento 0x81, 15, 255 layer_note1 11, 0x6e, 127 layer_end -.chan_140D: +.sound_general_coin_drop: chan_setbank 9 chan_setinstr 3 chan_setval 40 @@ -3424,7 +3426,7 @@ layer_note1 51, 0x3, 50 layer_note1 27, 0xa, 75 layer_end -.chan_144B: +.sound_general_switch1: chan_setbank 4 chan_setinstr 9 chan_setval 50 @@ -3444,7 +3446,7 @@ layer_portamento 0x81, 22, 255 layer_note1 15, 0x48, 80 layer_end -.chan_1471: +.sound_general_chain_chomp1: chan_setbank 1 chan_setinstr 1 chan_setval 15 @@ -3466,7 +3468,7 @@ layer_portamento 0x81, 52, 255 layer_note1 54, 0x9, 118 layer_end -.chan_149E: +.sound_general_chain_chomp2: chan_setbank 7 .ifdef VERSION_JP chan_setinstr 8 @@ -3517,7 +3519,7 @@ layer_loop 2 layer_loopend layer_end -.chan_14EA: +.sound_general_switch2: chan_setbank 4 chan_setinstr 9 chan_setlayer 0, .layer_14F2 @@ -3529,7 +3531,7 @@ layer_portamento 0x82, 53, 255 layer_note1 44, 0x7, 88 layer_end -.chan_14FE: +.sound_general_moving_in_sand: chan_setbank 3 chan_setinstr 5 chan_setenvelope .envelope_32D4 @@ -3560,7 +3562,7 @@ layer_transpose 1 layer_note1 15, 0x2c, 127 layer_end -.chan_152F: +.sound_general_switch3: chan_setbank 4 chan_setinstr 9 chan_setlayer 0, .layer_1539 @@ -3577,7 +3579,7 @@ layer_portamento 0x81, 27, 255 layer_note1 3, 0x18, 120 layer_end -.chan_154B: +.sound_general_cage_open: chan_setbank 4 chan_setinstr 3 chan_setval 30 @@ -3590,7 +3592,7 @@ layer_portamento 0x81, 19, 40 layer_note1 22, 0xb4, 115 layer_end -.chan_1561: +.sound_general_quiet_pound1: chan_setbank 5 chan_setinstr 5 chan_setenvelope .envelope_3344 @@ -3604,7 +3606,7 @@ layer_note1 14, 0x34, 110 layer_delay 0x14 layer_end -.chan_1577: +.sound_general_break_box: chan_setbank 5 chan_setinstr 7 chan_setlayer 0, .layer_1582 @@ -3619,7 +3621,7 @@ layer_note1 38, 0x10, 110 layer_note1 27, 0x64, 110 layer_end -.chan_1591: +.sound_general_switch4: chan_setbank 4 chan_setinstr 9 chan_setlayer 0, .layer_1599 @@ -3630,7 +3632,7 @@ layer_note0 36, 0xa, 80, 80 layer_note0 24, 0xa, 80, 80 layer_end -.chan_15A2: +.sound_general_quiet_pound2: chan_setbank 6 chan_setinstr 15 chan_setlayer 0, .layer_15AA @@ -3644,7 +3646,7 @@ layer_note1 32, 0x60, 127 layer_note1 32, 0x30, 127 layer_end -.chan_15B9: +.sound_general_big_pound: chan_setbank 6 chan_setinstr 1 chan_setval 55 @@ -3682,7 +3684,7 @@ layer_note1 24, 0xc, 127 layer_note1 22, 0x48, 127 layer_end -.chan_15F2: +.sound_general_cannon_up: chan_setbank 6 chan_setinstr 10 chan_setlayer 0, .layer_15FA @@ -3692,7 +3694,7 @@ chan_end layer_note1 44, 0xfa, 127 layer_end -.chan_15FF: +.sound_general_grindel_spindel_roll: chan_setbank 6 chan_setinstr 1 chan_setval 25 @@ -3705,7 +3707,7 @@ layer_note1 29, 0xc, 120 layer_note1 24, 0x24, 120 layer_end -.chan_1613: +.sound_general_explosion7: chan_setbank 3 chan_setinstr 5 chan_setenvelope .envelope_3358 @@ -3728,7 +3730,7 @@ layer_end layer_note1 24, 0x60, 127 layer_end -.chan_163B: +.sound_general_shake_coffin: chan_setbank 6 chan_setinstr 15 chan_setenvelope .envelope_3304 @@ -3740,7 +3742,7 @@ layer_note1 31, 0xa, 127 layer_note1 43, 0x10, 127 layer_end -.chan_164D: +.sound_general_pyramid_top_spin: chan_setbank 4 chan_setinstr 15 chan_setval 30 @@ -3772,7 +3774,7 @@ layer_note1 36, 0xb, 105 layer_note1 39, 0x31, 116 layer_end -.chan_168B: +.sound_general_pyramid_top_explosion: chan_setbank 4 chan_setinstr 15 chan_setval 30 @@ -3799,7 +3801,7 @@ layer_note1 41, 0xf, 109 layer_note1 43, 0xfa, 113 layer_end -.chan_16BB: +.sound_general_race_gun_shot: chan_setbank 5 chan_setinstr 0 chan_setval 127 @@ -3818,7 +3820,7 @@ layer_delay 0xa layer_note1 48, 0x30, 85 layer_end -.chan_16D8: +.sound_general_star_door_open: chan_setbank 6 chan_setinstr 10 chan_setenvelope .envelope_32D4 @@ -3830,7 +3832,7 @@ layer_portamento 0x81, 51, 96 layer_note1 58, 0x40, 100 layer_end -.chan_16EB: +.sound_general_star_door_close: chan_setbank 6 chan_setinstr 10 chan_setenvelope .envelope_32D4 @@ -3842,7 +3844,7 @@ layer_portamento 0x82, 51, 96 layer_note1 58, 0x40, 100 layer_end -.chan_16FE: +.sound_general_pound_rock: chan_setbank 6 chan_setinstr 1 chan_setval 55 @@ -3855,7 +3857,7 @@ layer_note1 27, 0x7, 127 layer_note1 15, 0x12, 127 layer_end -.chan_1712: +.sound_general_star_appears: chan_setbank 4 chan_setinstr 14 chan_setlayer 0, .layer_171A @@ -3866,7 +3868,7 @@ layer_portamento 0x81, 43, 127 layer_note1 31, 0x7f, 115 layer_end -.chan_1722: +.sound_general_collect_1up: chan_setbank 9 chan_setinstr 3 chan_setenvelope .envelope_3358 @@ -3888,7 +3890,7 @@ layer_note1 41, 0xc, 100 layer_note1 46, 0x18, 100 layer_end -.chan_1749: +.sound_general_rotating_block_alert: chan_setbank 4 chan_setinstr 9 chan_setlayer 0, .layer_1751 @@ -3904,7 +3906,7 @@ layer_portamento 0x81, 15, 255 layer_note1 8, 0xa, 100 layer_end -.chan_1761: +.sound_general_button_press: chan_setbank 4 chan_setinstr 9 chan_setlayer 0, .layer_1769 @@ -3915,7 +3917,7 @@ layer_note1 8, 0x5, 127 layer_note1 18, 0x12, 127 layer_end -.chan_1770: +.sound_general_elevator_move: chan_setbank 4 chan_setinstr 9 chan_setenvelope .envelope_33BC @@ -3927,7 +3929,7 @@ layer_portamento 0x82, 5, 255 layer_note1 8, 0xa, 127 layer_end -.chan_1783: +.sound_general_swish_air: chan_setbank 0 chan_setinstr 0 chan_setlayer 0, .layer_178B @@ -3939,7 +3941,7 @@ layer_portamento 0x81, 44, 255 layer_note1 32, 0x12, 100 layer_end -.chan_1796: +.sound_general_haunted_chair: chan_setbank 9 chan_setinstr 3 chan_setenvelope .envelope_3428 @@ -3952,7 +3954,7 @@ layer_portamento 0x85, 62, 255 layer_note1 38, 0x78, 93 layer_end -.chan_17AB: +.sound_general_soft_landing: chan_setbank 1 chan_setinstr 1 chan_setlayer 0, .layer_17B3 @@ -3962,7 +3964,7 @@ chan_end layer_note1 29, 0xc, 127 layer_end -.chan_17B7: +.sound_general_haunted_chair_move: chan_setbank 4 chan_setinstr 1 chan_setlayer 0, .layer_17C4 @@ -3979,7 +3981,7 @@ layer_note1 33, 0x6, 127 layer_note1 34, 0x6, 127 layer_end -.chan_17D1: +.sound_general_bowser_explode: chan_setbank 6 chan_setenvelope .envelope_32D4 chan_setlayer 0, .layer_17E8 @@ -4019,7 +4021,7 @@ layer_note1 34, 0xa, 100 layer_jump .layer_181A layer_end -.chan_1821: +.sound_general_bowser_key: chan_setbank 4 chan_setinstr 14 chan_setlayer 0, .layer_171A @@ -4042,7 +4044,7 @@ layer_portamento 0x81, 43, 127 layer_note1 31, 0xfa, 115 layer_end -.chan_184F: +.sound_general_bowser_platform: chan_setbank 4 chan_setinstr 15 chan_setlayer 0, .layer_185C @@ -4056,7 +4058,7 @@ layer_transpose 2 layer_note1 39, 0xc, 127 layer_jump .layer_1350 -.chan_1862: +.sound_general_1up_appear: chan_setbank 4 chan_setinstr 14 chan_setlayer 0, .layer_186A @@ -4070,7 +4072,7 @@ layer_note1 42, 0x2d, 115 layer_note1 44, 0x7f, 115 layer_end -.chan_187B: +.sound_general_heart_spin: chan_setbank 9 chan_setinstr 3 chan_setval 30 @@ -4091,7 +4093,7 @@ layer_note1 51, 0xa, 45 layer_note1 56, 0xa, 35 layer_end -.chan_18A7: +.sound_general_pound_wood_post: chan_setbank 5 chan_setinstr 7 chan_setlayer 0, .layer_18B8 @@ -4106,7 +4108,7 @@ layer_portamento 0x1, 27, 0x28 layer_note1 32, 0x32, 120 layer_end -.chan_18C0: +.sound_general_water_level_trig: chan_setbank 6 chan_setinstr 11 chan_setlayer 0, .layer_2DBF @@ -4118,7 +4120,7 @@ chan_setenvelope .envelope_3454 chan_setlayer 0, .layer_2D26 chan_end -.chan_18D7: +.sound_general_switch_door_open: chan_setbank 4 chan_setinstr 9 chan_setlayer 0, .layer_1539 @@ -4134,7 +4136,7 @@ layer_portamento 0x82, 15, 255 layer_note1 31, 0x14, 127 layer_end -.chan_18F3: +.sound_general_red_coin: .ifdef VERSION_JP chan_setbank 9 chan_setinstr 3 @@ -4175,7 +4177,7 @@ layer_note0 58, 0x10, 25, 80 layer_delay 0xa layer_end -.chan_192A: +.sound_general_birds_fly_away: chan_setbank 5 chan_setinstr 13 chan_setenvelope .envelope_33DC @@ -4253,7 +4255,7 @@ layer_loopend layer_jump .layer_19A5 layer_end -.chan_19CA: +.sound_general_right_answer: chan_setbank 9 chan_setinstr 3 chan_setval 40 @@ -4271,7 +4273,7 @@ layer_note1 58, 0x2, 45 layer_loopend layer_end -.chan_19EA: +.sound_general_metal_pound: chan_setbank 7 chan_setinstr 1 chan_setlayer 0, .layer_1A00 @@ -4290,7 +4292,7 @@ layer_note1 15, 0xc, 127 layer_note1 17, 0x3a, 127 layer_end -.chan_1A07: +.sound_general_boing1: chan_setbank 5 chan_setinstr 14 chan_setlayer 0, .layer_1A0F @@ -4301,7 +4303,7 @@ layer_portamento 0x82, 40, 127 layer_note1 38, 0x28, 100 layer_end -.chan_1A17: +.sound_general_boing2: chan_setbank 5 chan_setinstr 14 chan_setlayer 0, .layer_1A1F @@ -4312,13 +4314,13 @@ layer_portamento 0x82, 43, 127 layer_note1 39, 0x36, 100 layer_end -.chan_1A27: -chan_jump .chan_2391 +.sound_general_yoshi_walk: +chan_jump .sound_obj_koopa_the_quick_walk -.chan_1A2A: -chan_jump .chan_22FF +.sound_general_enemy_alert1: +chan_jump .sound_obj_goomba_alert -.chan_1A2D: +.sound_general_yoshi_talk: chan_setbank 0 chan_setinstr 3 chan_setlayer 0, .layer_1A35 @@ -4328,7 +4330,7 @@ chan_end layer_note1 39, 0x32, 127 layer_end -.chan_1A39: +.sound_general_splattering: chan_setbank 6 chan_setinstr 2 chan_setlayer 0, .layer_1A44 @@ -4346,7 +4348,7 @@ layer_note1 51, 0x6, 127 layer_note1 56, 0xc, 127 layer_end -.chan_1A56: +.sound_general_boing3: chan_setbank 9 chan_setinstr 6 chan_setval 10 @@ -4360,7 +4362,7 @@ layer_portamento 0x82, 39, 255 layer_note1 31, 0x60, 100 layer_end -.chan_1A6E: +.sound_general_grand_star: chan_setbank 4 chan_setinstr 14 chan_setlayer 0, .layer_1A79 @@ -4377,7 +4379,7 @@ layer_portamento 0x85, 31, 255 layer_note1 34, 0x12c, 127 layer_end -.chan_1A87: +.sound_general_grand_star_jump: chan_setbank 4 chan_setinstr 14 chan_setenvelope .envelope_3358 @@ -4404,7 +4406,7 @@ layer_note1 41, 0xc, 127 layer_end .ifdef VERSION_JP - .chan_1AB4_jp: + .sound_general_boat_rock: chan_setbank 9 chan_setinstr 0 chan_setenvelope .envelope_3438 @@ -4420,7 +4422,7 @@ layer_end layer_note1 60, 0x28, 100 layer_end .else - .chan_1AB4: + .sound_general_boat_rock: chan_setbank 4 chan_setinstr 2 chan_setlayer 0, .layer_1AC1 @@ -4437,7 +4439,7 @@ layer_end layer_note1 7, 0x5a, 127 layer_end - .chan_1AD0: + .sound_general_vanish_sfx: chan_setbank 9 chan_setinstr 3 chan_setvibratoextent 70 @@ -4460,48 +4462,48 @@ layer_end .endif .channel4_table: -sound_ref .chan_1B43 -sound_ref .chan_1B43 -sound_ref .chan_1B5D -sound_ref .chan_1B6D -sound_ref .chan_1B6D -sound_ref .chan_1B7D -sound_ref .chan_1BCD +sound_ref .sound_env_waterfall1 +sound_ref .sound_env_waterfall1 +sound_ref .sound_env_elevator1 +sound_ref .sound_env_droning1 +sound_ref .sound_env_droning1 +sound_ref .sound_env_wind1 +sound_ref .sound_env_moving_sand_snow sound_ref .chan_1BE5 -sound_ref .chan_1BFF -sound_ref .chan_1C0F +sound_ref .sound_env_elevator2 +sound_ref .sound_env_water sound_ref .chan_1C46 -sound_ref .chan_1C5F -sound_ref .chan_1C72 -sound_ref .chan_1CBB -sound_ref .chan_1CCD -sound_ref .chan_1CEA -sound_ref .chan_1D04 -sound_ref .chan_2A17 +sound_ref .sound_env_boat_rocking1 +sound_ref .sound_env_elevator3 +sound_ref .sound_env_elevator4 +sound_ref .sound_env_movingsand +sound_ref .sound_env_merry_go_round_creaking +sound_ref .sound_env_wind2 +sound_ref .sound_air_rough_slide sound_ref .chan_1D42 -sound_ref .chan_1D5A -sound_ref .chan_1D6F +sound_ref .sound_env_sliding +sound_ref .sound_env_star sound_ref .chan_1D81 -sound_ref .chan_1DB8 -sound_ref .chan_1DFF -sound_ref .chan_1E1A -sound_ref .chan_1E35 -sound_ref .chan_1B5D -sound_ref .chan_1B6D -sound_ref .chan_1B43 -sound_ref .chan_1B43 -sound_ref .chan_1B43 -sound_ref .chan_1B43 -sound_ref .chan_10A7 -sound_ref .chan_1770 -sound_ref .chan_1B5D -sound_ref .chan_1B6D -sound_ref .chan_1B43 -sound_ref .chan_1B43 -sound_ref .chan_1B43 -sound_ref .chan_1B43 +sound_ref .sound_env_water_drain +sound_ref .sound_env_metal_box_push +sound_ref .sound_env_sink_quicksand +sound_ref .sound_air_peach_twinkle +sound_ref .sound_env_elevator1 +sound_ref .sound_env_droning1 +sound_ref .sound_env_waterfall1 +sound_ref .sound_env_waterfall1 +sound_ref .sound_env_waterfall1 +sound_ref .sound_env_waterfall1 +sound_ref .sound_menu_enter_hole +sound_ref .sound_general_elevator_move +sound_ref .sound_env_elevator1 +sound_ref .sound_env_droning1 +sound_ref .sound_env_waterfall1 +sound_ref .sound_env_waterfall1 +sound_ref .sound_env_waterfall1 +sound_ref .sound_env_waterfall1 -.chan_1B43: +.sound_env_waterfall1: chan_setbank 5 chan_setinstr 1 chan_setval 25 @@ -4525,7 +4527,7 @@ layer_somethingon layer_note1 41, 0x12c, 95 layer_jump .layer_1B56 -.chan_1B5D: +.sound_env_elevator1: chan_setbank 5 chan_setinstr 2 chan_setlayer 0, .layer_1B65 @@ -4537,7 +4539,7 @@ layer_somethingon layer_note1 39, 0x12c, 90 layer_jump .layer_1B66 -.chan_1B6D: +.sound_env_droning1: chan_setbank 5 chan_setinstr 3 chan_setlayer 0, .layer_1B75 @@ -4549,7 +4551,7 @@ layer_somethingon layer_note1 44, 0x12c, 105 layer_jump .layer_1B76 -.chan_1B7D: +.sound_env_wind1: chan_setbank 5 chan_setinstr 6 chan_setdecayrelease 13 @@ -4585,7 +4587,7 @@ layer_note1 41, 0x60, 110 layer_note1 39, 0x22, 110 layer_jump .layer_1B91 -.chan_1BCD: +.sound_env_moving_sand_snow: chan_setbank 3 chan_setinstr 2 chan_setlayer 0, .layer_1BD5 @@ -4614,7 +4616,7 @@ layer_note1 43, 0x50, 127 layer_note1 43, 0x12c, 127 layer_jump .layer_1BF8 -.chan_1BFF: +.sound_env_elevator2: chan_setbank 5 chan_setinstr 2 chan_setlayer 0, .layer_1C07 @@ -4626,7 +4628,7 @@ layer_somethingon layer_note1 27, 0x12c, 100 layer_jump .layer_1C08 -.chan_1C0F: +.sound_env_water: chan_setbank 4 chan_setinstr 5 chan_setenvelope .envelope_32E4 @@ -4666,7 +4668,7 @@ layer_note1 41, 0x3c, 127 layer_note1 42, 0x3c, 127 layer_jump .layer_1C56 -.chan_1C5F: +.sound_env_boat_rocking1: chan_setbank 4 chan_setinstr 2 chan_setdecayrelease 30 @@ -4682,7 +4684,7 @@ layer_portamento 0x81, 15, 255 .endif layer_end -.chan_1C72: +.sound_env_elevator3: chan_setbank 5 chan_setinstr 5 chan_setenvelope .envelope_3368 @@ -4721,7 +4723,7 @@ layer_disableportamento layer_somethingoff layer_end -.chan_1CBB: +.sound_env_elevator4: chan_setbank 4 chan_setinstr 2 chan_setlayer 0, .layer_1CC3 @@ -4732,7 +4734,7 @@ layer_portamento 0x81, 19, 10 layer_note1 8, 0x9, 127 layer_jump .layer_1CC3 -.chan_1CCD: +.sound_env_movingsand: chan_setbank 3 chan_setinstr 7 chan_setdecayrelease 5 @@ -4752,7 +4754,7 @@ layer_somethingon layer_note1 46, 0x1f4, 90 layer_jump .layer_1CE3 -.chan_1CEA: +.sound_env_merry_go_round_creaking: chan_setbank 4 chan_setinstr 2 chan_setdecayrelease 30 @@ -4768,7 +4770,7 @@ layer_portamento 0x85, 7, 255 layer_note1_long 13, 0x46, 120 layer_jump .layer_1CF9 -.chan_1D04: +.sound_env_wind2: chan_setbank 5 chan_setinstr 6 chan_setdecayrelease 13 @@ -4813,7 +4815,7 @@ layer_transpose 3 layer_note0 62, 0x2, 127, 127 layer_jump .layer_1D53 -.chan_1D5A: +.sound_env_sliding: chan_setbank 3 chan_setinstr 1 chan_setenvelope .envelope_32E4 @@ -4827,7 +4829,7 @@ layer_somethingon layer_note1 44, 0x12c, 95 layer_jump .layer_1D68 -.chan_1D6F: +.sound_env_star: chan_setbank 4 chan_setinstr 14 chan_setlayer 0, .layer_1D77 @@ -4867,7 +4869,7 @@ layer_portamento 0x82, 19, 255 layer_note1 20, 0x1f4, 127 layer_end -.chan_1DB8: +.sound_env_water_drain: chan_setbank 3 chan_setinstr 2 chan_setenvelope .envelope_32E4 @@ -4903,7 +4905,7 @@ layer_note1 24, 0x74, 127 layer_transpose 7 layer_jump .layer_1DE4 -.chan_1DFF: +.sound_env_metal_box_push: chan_setbank 6 chan_setinstr 1 chan_setlayer 0, .layer_1E0C @@ -4921,7 +4923,7 @@ layer_setinstr 15 layer_note1 39, 0x10, 115 layer_jump .layer_1E14 -.chan_1E1A: +.sound_env_sink_quicksand: chan_setbank 3 chan_setinstr 6 chan_setenvelope .envelope_32E4 @@ -4937,7 +4939,7 @@ layer_note1 35, 0x12c, 100 layer_jump .layer_1E2D layer_end -.chan_1E35: +.sound_air_peach_twinkle: chan_setbank 5 chan_setinstr 15 chan_setenvelope .envelope_32E4 @@ -4953,136 +4955,136 @@ layer_note1 43, 0x1b58, 63 layer_jump .layer_1E47 .channel59_table: -sound_ref .chan_113D -sound_ref .chan_1F61 -sound_ref .chan_1F7D -sound_ref .chan_1F8D -sound_ref .chan_1FAC -sound_ref .chan_1FC4 -sound_ref .chan_1FE0 -sound_ref .chan_1FF2 -sound_ref .chan_1FFE -sound_ref .chan_200A -sound_ref .chan_201A -sound_ref .chan_2026 -sound_ref .chan_2035 -sound_ref .chan_2059 -sound_ref .chan_2066 -sound_ref .chan_2073 -sound_ref .chan_207F -sound_ref .chan_209A -sound_ref .chan_20A6 +sound_ref .sound_obj_sushi_shark_water_sound +sound_ref .sound_obj_mri_shoot +sound_ref .sound_obj_baby_penguin_walk +sound_ref .sound_obj_bowser_walk +sound_ref .sound_obj_bowser_roar +sound_ref .sound_obj_bowser_tail_pickup +sound_ref .sound_obj_bowser_defeated +sound_ref .sound_obj_bowser_spinning +sound_ref .sound_obj_bowser_inhaling +sound_ref .sound_obj_big_penguin_walk +sound_ref .sound_obj_boo_bounce_top +sound_ref .sound_obj_boo_laugh_short +sound_ref .sound_obj_thwomp +sound_ref .sound_obj_cannon1 +sound_ref .sound_obj_cannon2 +sound_ref .sound_obj_cannon3 +sound_ref .sound_obj_piranha_plant_bite +sound_ref .sound_obj_piranha_plant_dying +sound_ref .sound_obj_jump_walk_water sound_ref .chan_20B2 -sound_ref .chan_20BE -sound_ref .chan_20CA -sound_ref .chan_20DC -sound_ref .chan_20FB -sound_ref .chan_2107 -sound_ref .chan_212E -sound_ref .chan_213A -sound_ref .chan_2146 -sound_ref .chan_2158 +sound_ref .sound_obj_mri_death +sound_ref .sound_obj_pounding1 +sound_ref .sound_obj_king_bobomb +sound_ref .sound_obj_bully_metal +sound_ref .sound_obj_bully_explode +sound_ref .sound_obj_bowser_puzzle_piece_move +sound_ref .sound_obj_pounding_cannon +sound_ref .sound_obj_bully_walk +sound_ref .sound_obj_bully_attacked sound_ref .chan_2177 sound_ref .chan_218E -sound_ref .chan_21A1 -sound_ref .chan_21B8 -sound_ref .chan_21D6 -sound_ref .chan_21E4 +sound_ref .sound_obj_baby_penguin_dive +sound_ref .sound_obj_goomba_walk +sound_ref .sound_obj_ukiki_chatter_long +sound_ref .sound_obj_monty_mole_lakitu_attack sound_ref .chan_21FF -sound_ref .chan_2211 -sound_ref .chan_2224 -sound_ref .chan_2235 -sound_ref .chan_2248 -sound_ref .chan_2260 -sound_ref .chan_2277 -sound_ref .chan_2293 -sound_ref .chan_22A5 -sound_ref .chan_22B7 -sound_ref .chan_22D2 -sound_ref .chan_22E6 -sound_ref .chan_22FF -sound_ref .chan_2321 +sound_ref .sound_obj_dying_enemy1 +sound_ref .sound_obj_cannon4 +sound_ref .sound_obj_dying_enemy2 +sound_ref .sound_obj_bobomb_walk +sound_ref .sound_obj_something_landing +sound_ref .sound_obj_diving_in_water +sound_ref .sound_obj_snow_sand1 +sound_ref .sound_obj_snow_sand2 +sound_ref .sound_obj_default_death +sound_ref .sound_obj_big_penguin_yell +sound_ref .sound_obj_water_bomb_bouncing +sound_ref .sound_obj_goomba_alert +sound_ref .sound_obj_stomped sound_ref .chan_233D -sound_ref .chan_2361 -sound_ref .chan_237E -sound_ref .chan_2391 -sound_ref .chan_23A2 -sound_ref .chan_23B0 -sound_ref .chan_23C0 -sound_ref .chan_23DF -sound_ref .chan_23F8 -sound_ref .chan_2408 -sound_ref .chan_241F -sound_ref .chan_242F -sound_ref .chan_2441 -sound_ref .chan_2459 -sound_ref .chan_246E -sound_ref .chan_2482 -sound_ref .chan_2492 -sound_ref .chan_24BA -sound_ref .chan_24D4 -sound_ref .chan_24E2 -sound_ref .chan_24F2 -sound_ref .chan_2508 -sound_ref .chan_2518 -sound_ref .chan_2531 -sound_ref .chan_2542 -sound_ref .chan_2552 -sound_ref .chan_2570 -sound_ref .chan_2580 -sound_ref .chan_25A7 -sound_ref .chan_25BB -sound_ref .chan_25DB -sound_ref .chan_31A6 -sound_ref .chan_31DE -sound_ref .chan_3214 -sound_ref .chan_3248 -sound_ref .chan_25FE -sound_ref .chan_2611 -sound_ref .chan_2624 -sound_ref .chan_265D -sound_ref .chan_2671 +sound_ref .sound_obj_diving_into_water +sound_ref .sound_obj_piranha_plant_shrink +sound_ref .sound_obj_koopa_the_quick_walk +sound_ref .sound_obj_koopa_walk +sound_ref .sound_obj_bully_walking +sound_ref .sound_obj_dorrie +sound_ref .sound_obj_bowser_laugh +sound_ref .sound_obj_ukiki_chatter_short +sound_ref .sound_obj_ukiki_chatter_idle +sound_ref .sound_obj_ukiki_step_default +sound_ref .sound_obj_ukiki_step_leaves +sound_ref .sound_obj_koopa_talk +sound_ref .sound_obj_koopa_damage +sound_ref .sound_obj_klepto1 +sound_ref .sound_obj_klepto2 +sound_ref .sound_obj_king_bobomb_talk +sound_ref .sound_obj_king_bobomb_damage +sound_ref .sound_obj_scuttlebug_walk +sound_ref .sound_obj_scuttlebug_alert +sound_ref .sound_obj_baby_penguin_yell +sound_ref .sound_obj_king_bobomb_jump +sound_ref .sound_obj_king_whomp_death +sound_ref .sound_obj_boo_laugh_long +sound_ref .sound_obj_swoop +sound_ref .sound_obj_eel +sound_ref .sound_obj_eyerok_show_eye +sound_ref .sound_obj_mr_blizzard_alert +sound_ref .sound_obj_snufit_shoot +sound_ref .sound_obj_skeeter_walk +sound_ref .sound_obj_walking_water +sound_ref .sound_general_bird_chirp2 +sound_ref .sound_obj_bird_chirp3 +sound_ref .sound_obj_bird_chirp1 +sound_ref .sound_air_castle_outdoors_ambient +sound_ref .sound_obj_piranha_plant_appear +sound_ref .sound_obj_flame_blown +sound_ref .sound_obj_mad_piano_chomping +sound_ref .sound_obj_large_bully_attacked +sound_ref .sound_obj_bobomb_buddy_talk sound_ref .chan_26A9 -sound_ref .chan_26BC -sound_ref .chan_26CF -sound_ref .chan_26DF -sound_ref .chan_26FA -sound_ref .chan_2771 -sound_ref .chan_270A -sound_ref .chan_2726 -sound_ref .chan_2736 -sound_ref .chan_2751 -sound_ref .chan_2761 -sound_ref .chan_2781 -sound_ref .chan_2788 -sound_ref .chan_279C -sound_ref .chan_27BB -sound_ref .chan_27DC -sound_ref .chan_27E9 -sound_ref .chan_27FC -sound_ref .chan_2810 -sound_ref .chan_2827 -sound_ref .chan_2846 -sound_ref .chan_2865 -sound_ref .chan_2890 -sound_ref .chan_28C7 -sound_ref .chan_28E3 -sound_ref .chan_28FE -sound_ref .chan_2922 -sound_ref .chan_2942 -sound_ref .chan_1FC4 -sound_ref .chan_1FE0 -sound_ref .chan_1FF2 -sound_ref .chan_2482 -sound_ref .chan_2492 -sound_ref .chan_1F7D -sound_ref .chan_1F8D -sound_ref .chan_1FAC -sound_ref .chan_1FC4 -sound_ref .chan_1FE0 -sound_ref .chan_1FF2 +sound_ref .sound_obj_eyerok_sound_short +sound_ref .sound_obj_eyerok_sound_long +sound_ref .sound_obj_wiggler_high_pitch +sound_ref .sound_obj_heaveho_tossed +sound_ref .sound_obj_wiggler_death +sound_ref .sound_obj_bowser_intro_laugh +sound_ref .sound_obj_enemy_death_high +sound_ref .sound_obj_enemy_death_low +sound_ref .sound_obj_swoop_death +sound_ref .sound_obj_koopa_flyguy_pokey_death +sound_ref .sound_obj_snowman_bounce +sound_ref .sound_obj_snowman_explode +sound_ref .sound_obj_bowser_teleport +sound_ref .sound_obj_monty_mole_appear +sound_ref .sound_obj_pounding_loud +sound_ref .sound_obj_boss_dialog_grunt +sound_ref .sound_obj_mips_rabbit +sound_ref .sound_obj_mri_spinning +sound_ref .sound_obj_mips_rabbit_water +sound_ref .sound_obj_eyerok_explode +sound_ref .sound_obj_chuckya_death +sound_ref .sound_obj_wiggler_talk +sound_ref .sound_obj_wiggler_attacked +sound_ref .sound_obj_wiggler_low_pitch +sound_ref .sound_obj_snufit_skeeter_death +sound_ref .sound_obj_bubba_chomp +sound_ref .sound_obj_enemy_defeat_shrink +sound_ref .sound_obj_bowser_tail_pickup +sound_ref .sound_obj_bowser_defeated +sound_ref .sound_obj_bowser_spinning +sound_ref .sound_obj_klepto2 +sound_ref .sound_obj_king_bobomb_talk +sound_ref .sound_obj_baby_penguin_walk +sound_ref .sound_obj_bowser_walk +sound_ref .sound_obj_bowser_roar +sound_ref .sound_obj_bowser_tail_pickup +sound_ref .sound_obj_bowser_defeated +sound_ref .sound_obj_bowser_spinning -.chan_1F4E: +.sound_general_swish_water: chan_setbank 6 chan_setinstr 5 chan_setlayer 0, .layer_1F56 @@ -5094,7 +5096,7 @@ layer_portamento 0x81, 43, 255 layer_note1 27, 0x21, 90 layer_end -.chan_1F61: +.sound_obj_mri_shoot: chan_setbank 7 chan_setinstr 3 chan_setlayer 0, .layer_1F72 @@ -5110,7 +5112,7 @@ layer_portamento 0x82, 27, 255 layer_note1 36, 0xb, 90 layer_end -.chan_1F7D: +.sound_obj_baby_penguin_walk: chan_setbank 6 chan_setinstr 7 chan_setlayer 0, .layer_1F85 @@ -5121,7 +5123,7 @@ layer_portamento 0x81, 43, 255 layer_note1 48, 0x30, 110 layer_end -.chan_1F8D: +.sound_obj_bowser_walk: chan_setbank 6 chan_setinstr 1 chan_setval 60 @@ -5141,7 +5143,7 @@ layer_delay 0x18 layer_note1 0, 0x1e, 95 layer_end -.chan_1FAC: +.sound_obj_bowser_roar: chan_setbank 6 chan_setinstr 2 chan_setval 10 @@ -5158,7 +5160,7 @@ layer_transpose 5 layer_note1 39, 0x7f, 127 layer_end -.chan_1FC4: +.sound_obj_bowser_tail_pickup: chan_setbank 6 chan_setinstr 2 chan_setval 10 @@ -5176,7 +5178,7 @@ layer_portamento 0x81, 45, 255 layer_note1 33, 0x30, 127 layer_end -.chan_1FE0: +.sound_obj_bowser_defeated: chan_setbank 6 chan_setinstr 4 chan_setval 10 @@ -5188,7 +5190,7 @@ chan_end layer_note1 32, 0x104, 127 layer_end -.chan_1FF2: +.sound_obj_bowser_spinning: chan_setbank 6 chan_setinstr 5 chan_setlayer 0, .layer_1FFA @@ -5198,7 +5200,7 @@ chan_end layer_note1 32, 0x28, 127 layer_end -.chan_1FFE: +.sound_obj_bowser_inhaling: chan_setbank 6 chan_setinstr 6 chan_setlayer 0, .layer_2006 @@ -5208,7 +5210,7 @@ chan_end layer_note1 36, 0x5a, 127 layer_end -.chan_200A: +.sound_obj_big_penguin_walk: chan_setbank 6 chan_setinstr 7 chan_setlayer 0, .layer_2012 @@ -5219,7 +5221,7 @@ layer_portamento 0x81, 39, 255 layer_note1 36, 0x26, 100 layer_end -.chan_201A: +.sound_obj_boo_bounce_top: chan_setbank 6 chan_setinstr 8 chan_setlayer 0, .layer_2022 @@ -5229,7 +5231,7 @@ chan_end layer_note1 39, 0x18, 127 layer_end -.chan_2026: +.sound_obj_boo_laugh_short: chan_setbank 6 chan_setinstr 9 chan_setlayer 0, .layer_202E @@ -5240,7 +5242,7 @@ layer_note1 50, 0xa, 127 layer_note1 55, 0xa, 127 layer_end -.chan_2035: +.sound_obj_thwomp: chan_setbank 7 chan_setinstr 12 chan_setval 55 @@ -5262,7 +5264,7 @@ layer_end layer_note1 31, 0x2a, 127 layer_end -.chan_2059: +.sound_obj_cannon1: chan_setbank 6 chan_setinstr 10 chan_setlayer 0, .layer_2061 @@ -5272,7 +5274,7 @@ chan_end layer_note1 39, 0xd2, 127 layer_end -.chan_2066: +.sound_obj_cannon2: chan_setbank 6 chan_setinstr 11 chan_setlayer 0, .layer_206E @@ -5282,7 +5284,7 @@ chan_end layer_note1 39, 0xd2, 127 layer_end -.chan_2073: +.sound_obj_cannon3: chan_setbank 6 chan_setinstr 12 chan_setlayer 0, .layer_207B @@ -5292,7 +5294,7 @@ chan_end layer_note1 39, 0x24, 127 layer_end -.chan_207F: +.sound_obj_piranha_plant_bite: chan_setbank 6 chan_setinstr 11 chan_setlayer 0, .layer_2087 @@ -5307,7 +5309,7 @@ layer_note1 33, 0x6, 127 layer_delay 0x14 layer_end -.chan_209A: +.sound_obj_piranha_plant_dying: chan_setbank 6 chan_setinstr 14 chan_setlayer 0, .layer_20A2 @@ -5317,7 +5319,7 @@ chan_end layer_note1 39, 0x48, 110 layer_end -.chan_20A6: +.sound_obj_jump_walk_water: chan_setbank 4 chan_setinstr 5 chan_setlayer 0, .layer_20AE @@ -5337,7 +5339,7 @@ chan_end layer_note1 39, 0x4c, 127 layer_end -.chan_20BE: +.sound_obj_mri_death: chan_setbank 7 chan_setinstr 0 chan_setlayer 0, .layer_20C6 @@ -5347,7 +5349,7 @@ chan_end layer_note1 39, 0x18, 105 layer_end -.chan_20CA: +.sound_obj_pounding1: chan_setbank 6 chan_setinstr 1 chan_setlayer 0, .layer_20D2 @@ -5363,7 +5365,7 @@ layer_portamento 0x81, 44, 255 layer_delay 0x32 layer_end -.chan_20DC: +.sound_obj_king_bobomb: chan_setbank 7 chan_setinstr 12 chan_setlayer 0, .layer_20F0 @@ -5388,7 +5390,7 @@ layer_end .endif layer_end -.chan_20FB: +.sound_obj_bully_metal: chan_setbank 7 chan_setinstr 1 chan_setlayer 0, .layer_2103 @@ -5398,7 +5400,7 @@ chan_end layer_note1 39, 0x24, 120 layer_end -.chan_2107: +.sound_obj_bully_explode: chan_setbank 4 chan_setinstr 15 chan_setenvelope .envelope_33EC @@ -5423,7 +5425,7 @@ layer_delay 0xa layer_note1 48, 0x23, 127 layer_end -.chan_212E: +.sound_obj_bowser_puzzle_piece_move: chan_setbank 7 chan_setinstr 2 chan_setlayer 0, .layer_2136 @@ -5433,7 +5435,7 @@ chan_end layer_note1 39, 0xc, 105 layer_end -.chan_213A: +.sound_obj_pounding_cannon: chan_setbank 7 chan_setinstr 3 chan_setlayer 0, .layer_2142 @@ -5443,7 +5445,7 @@ chan_end layer_note1 39, 0x68, 127 layer_end -.chan_2146: +.sound_obj_bully_walk: chan_setbank 7 chan_setinstr 3 chan_setlayer 0, .layer_214E @@ -5455,7 +5457,7 @@ layer_note1 51, 0x4, 80 layer_delay 0x1e layer_end -.chan_2158: +.sound_obj_bully_attacked: chan_setbank 7 chan_setinstr 12 chan_setlayer 0, .layer_2160 @@ -5498,7 +5500,7 @@ layer_portamento 0x81, 43, 255 layer_note1 27, 0x14, 90 layer_end -.chan_21A1: +.sound_obj_baby_penguin_dive: chan_setbank 6 chan_setinstr 7 chan_setlayer 0, .layer_21A9 @@ -5511,7 +5513,7 @@ layer_portamento 0x81, 46, 255 layer_note1 58, 0x30, 110 layer_end -.chan_21B8: +.sound_obj_goomba_walk: chan_setbank 6 chan_setinstr 12 chan_setlayer 0, .layer_21C9 @@ -5528,7 +5530,7 @@ layer_note1 51, 0x8, 80 layer_delay 0x1e layer_end -.chan_21D6: +.sound_obj_ukiki_chatter_long: chan_setbank 7 chan_setinstr 7 chan_setdecayrelease 15 @@ -5539,7 +5541,7 @@ chan_end layer_note1 39, 0x30, 127 layer_end -.chan_21E4: +.sound_obj_monty_mole_lakitu_attack: chan_setbank 9 chan_setinstr 3 chan_setenvelope .envelope_3428 @@ -5566,7 +5568,7 @@ layer_note1 3, 0x14, 115 layer_delay 0x1e layer_end -.chan_2211: +.sound_obj_dying_enemy1: chan_setbank 7 chan_setinstr 0 chan_setlayer 0, .layer_2219 @@ -5578,7 +5580,7 @@ layer_portamento 0x81, 32, 255 layer_note1 44, 0x18, 105 layer_end -.chan_2224: +.sound_obj_cannon4: chan_setbank 7 chan_setinstr 3 chan_setval 15 @@ -5590,7 +5592,7 @@ chan_end layer_note1 48, 0x55, 127 layer_end -.chan_2235: +.sound_obj_dying_enemy2: chan_setbank 7 chan_setinstr 8 chan_setlayer 0, .layer_223D @@ -5602,7 +5604,7 @@ layer_portamento 0x81, 44, 255 layer_note1 32, 0x18, 105 layer_end -.chan_2248: +.sound_obj_bobomb_walk: chan_setbank 9 chan_setinstr 1 chan_setenvelope .envelope_32D4 @@ -5616,7 +5618,7 @@ layer_note1 32, 0x3, 127 layer_delay 0x22 layer_end -.chan_2260: +.sound_obj_something_landing: chan_setbank 9 chan_setinstr 3 chan_setenvelope .envelope_3428 @@ -5630,7 +5632,7 @@ layer_note1 50, 0x24, 93 layer_note1 26, 0x3c, 93 layer_end -.chan_2277: +.sound_obj_diving_in_water: chan_setbank 4 chan_setinstr 5 chan_setlayer 0, .layer_2288 @@ -5646,7 +5648,7 @@ layer_portamento 0x81, 43, 200 layer_note1 36, 0x4e, 127 layer_end -.chan_2293: +.sound_obj_snow_sand1: chan_setbank 3 chan_setinstr 5 chan_setenvelope .envelope_32D4 @@ -5658,7 +5660,7 @@ layer_note1 41, 0x6, 100 layer_note1 24, 0x1c, 100 layer_end -.chan_22A5: +.sound_obj_snow_sand2: chan_setbank 3 chan_setinstr 5 chan_setenvelope .envelope_32D4 @@ -5670,7 +5672,7 @@ layer_note1 36, 0x5, 100 layer_note1 44, 0x18, 100 layer_end -.chan_22B7: +.sound_obj_default_death: chan_setbank 0 chan_setinstr 4 chan_setenvelope .envelope_32D4 @@ -5686,7 +5688,7 @@ layer_note1 62, 0x1b, 107 layer_delay 0x12 layer_end -.chan_22D2: +.sound_obj_big_penguin_yell: chan_setbank 7 chan_setinstr 10 chan_setlayer 0, .layer_22DA @@ -5699,7 +5701,7 @@ layer_note1 45, 0x28, 127 layer_note1 41, 0xf, 127 layer_end -.chan_22E6: +.sound_obj_water_bomb_bouncing: chan_setbank 7 chan_setinstr 11 chan_setenvelope .envelope_32D4 @@ -5716,7 +5718,7 @@ layer_note1 32, 0xc, 127 layer_note1 39, 0x60, 127 layer_end -.chan_22FF: +.sound_obj_goomba_alert: chan_setbank 9 chan_setinstr 3 chan_setval 20 @@ -5735,7 +5737,7 @@ layer_note1 51, 0x1c, 85 layer_delay 0x19 layer_end -.chan_2321: +.sound_obj_stomped: chan_setbank 9 chan_setinstr 3 chan_setenvelope .envelope_3428 @@ -5773,7 +5775,7 @@ layer_delay 0x2 layer_disableportamento layer_end -.chan_2361: +.sound_obj_diving_into_water: chan_setbank 2 chan_setlayer 0, .layer_236A chan_setlayer 1, .layer_2374 @@ -5791,7 +5793,7 @@ layer_portamento 0x82, 32, 255 layer_note1 31, 0x54, 100 layer_end -.chan_237E: +.sound_obj_piranha_plant_shrink: chan_setbank 3 chan_setinstr 0 chan_setenvelope .envelope_3324 @@ -5803,7 +5805,7 @@ layer_portamento 0x81, 62, 255 layer_note1 38, 0x7f, 117 layer_end -.chan_2391: +.sound_obj_koopa_the_quick_walk: chan_setbank 7 chan_setinstr 3 chan_setlayer 0, .layer_2399 @@ -5815,7 +5817,7 @@ layer_note1 29, 0x3, 70 layer_delay 0x1e layer_end -.chan_23A2: +.sound_obj_koopa_walk: chan_setbank 7 chan_setinstr 3 chan_setlayer 0, .layer_23AA @@ -5826,7 +5828,7 @@ layer_note1 20, 0x4, 100 layer_delay 0x1e layer_end -.chan_23B0: +.sound_obj_bully_walking: chan_setbank 7 chan_setinstr 3 chan_setlayer 0, .layer_23B8 @@ -5837,7 +5839,7 @@ layer_portamento 0x82, 29, 255 layer_note1 46, 0xc, 80 layer_end -.chan_23C0: +.sound_obj_dorrie: chan_setbank 6 chan_setinstr 4 chan_setenvelope .envelope_32F4 @@ -5856,7 +5858,7 @@ layer_note1 48, 0xa, 100 layer_note1 41, 0x48, 100 layer_end -.chan_23DF: +.sound_obj_bowser_laugh: chan_setbank 6 chan_setinstr 9 chan_setval 25 @@ -5870,7 +5872,7 @@ layer_portamento 0x81, 20, 255 layer_note1 26, 0x12c, 127 layer_end -.chan_23F8: +.sound_obj_ukiki_chatter_short: chan_setbank 7 chan_setinstr 7 chan_setlayer 0, .layer_2400 @@ -5881,7 +5883,7 @@ layer_portamento 0x81, 32, 221 layer_note1 34, 0xa, 115 layer_end -.chan_2408: +.sound_obj_ukiki_chatter_idle: chan_setbank 7 chan_setinstr 7 chan_setlayer 0, .layer_2410 @@ -5894,7 +5896,7 @@ layer_portamento 0x82, 34, 221 layer_note1 39, 0x12, 127 layer_end -.chan_241F: +.sound_obj_ukiki_step_default: chan_setbank 1 chan_setinstr 1 chan_setlayer 0, .layer_2427 @@ -5905,7 +5907,7 @@ layer_portamento 0x81, 58, 255 layer_note1 52, 0x6, 105 layer_end -.chan_242F: +.sound_obj_ukiki_step_leaves: chan_setbank 0 chan_setinstr 1 chan_setenvelope .envelope_32D4 @@ -5917,7 +5919,7 @@ layer_note1 43, 0x6, 90 layer_note1 44, 0x6, 90 layer_end -.chan_2441: +.sound_obj_koopa_talk: chan_setbank 7 chan_setinstr 8 chan_setlayer 0, .layer_2449 @@ -5933,7 +5935,7 @@ layer_note1 51, 0x9, 100 layer_note1 39, 0xc, 100 layer_end -.chan_2459: +.sound_obj_koopa_damage: chan_setbank 7 chan_setinstr 8 chan_setlayer 0, .layer_2461 @@ -5946,7 +5948,7 @@ layer_note1 39, 0x6, 105 layer_note1 27, 0x12, 105 layer_end -.chan_246E: +.sound_obj_klepto1: chan_setbank 7 chan_setinstr 9 chan_setlayer 0, .layer_2476 @@ -5959,7 +5961,7 @@ layer_note1 41, 0x6, 127 layer_note1 37, 0x24, 127 layer_end -.chan_2482: +.sound_obj_klepto2: chan_setbank 7 chan_setinstr 9 chan_setlayer 0, .layer_248A @@ -5970,7 +5972,7 @@ layer_portamento 0x81, 48, 255 layer_note1 40, 0x24, 127 layer_end -.chan_2492: +.sound_obj_king_bobomb_talk: chan_setbank 7 chan_setinstr 9 chan_setval 20 @@ -5993,7 +5995,7 @@ layer_note1 24, 0x2, 127 layer_note1 41, 0x10, 127 layer_end -.chan_24BA: +.sound_obj_king_bobomb_damage: chan_setbank 7 chan_setinstr 9 chan_setval 20 @@ -6008,7 +6010,7 @@ layer_note1 39, 0x4, 127 layer_note1 29, 0x30, 127 layer_end -.chan_24D4: +.sound_obj_scuttlebug_walk: chan_setbank 7 chan_setinstr 2 chan_setlayer 0, .layer_24DC @@ -6019,7 +6021,7 @@ layer_note1 44, 0x4, 127 layer_delay 0x14 layer_end -.chan_24E2: +.sound_obj_scuttlebug_alert: chan_setbank 9 chan_setinstr 3 chan_setlayer 0, .layer_24EA @@ -6030,7 +6032,7 @@ layer_portamento 0x81, 24, 255 layer_note1 53, 0x12, 80 layer_end -.chan_24F2: +.sound_obj_baby_penguin_yell: chan_setbank 7 chan_setinstr 10 chan_setenvelope .envelope_3344 @@ -6043,7 +6045,7 @@ layer_portamento 0x82, 46, 255 layer_note1 50, 0x30, 105 layer_end -.chan_2508: +.sound_obj_king_bobomb_jump: chan_setbank 6 chan_setinstr 1 chan_setlayer 0, .layer_2510 @@ -6054,7 +6056,7 @@ layer_portamento 0x81, 27, 255 layer_note1 43, 0x1e, 127 layer_end -.chan_2518: +.sound_obj_king_whomp_death: chan_setbank 5 chan_setinstr 7 chan_setlayer 0, .layer_252C @@ -6069,7 +6071,7 @@ chan_end layer_note1 34, 0xaf, 127 layer_end -.chan_2531: +.sound_obj_boo_laugh_long: chan_setbank 6 chan_setinstr 9 chan_setval 25 @@ -6081,7 +6083,7 @@ chan_end layer_note1 55, 0x32, 127 layer_end -.chan_2542: +.sound_obj_swoop: chan_setbank 7 chan_setinstr 7 chan_setlayer 0, .layer_254A @@ -6092,7 +6094,7 @@ layer_portamento 0x82, 51, 127 layer_note1 48, 0x6, 127 layer_end -.chan_2552: +.sound_obj_eel: chan_setbank 6 chan_setinstr 2 chan_setval 25 @@ -6111,7 +6113,7 @@ layer_note1 34, 0x18, 127 layer_note1 17, 0x48, 127 layer_end -.chan_2570: +.sound_obj_eyerok_show_eye: chan_setbank 4 chan_setinstr 15 chan_setlayer 0, .layer_257D @@ -6124,7 +6126,7 @@ layer_transpose 4 .layer_257D: layer_jump .layer_11BB -.chan_2580: +.sound_obj_mr_blizzard_alert: chan_setbank 9 chan_setinstr 3 chan_setval 24 @@ -6145,7 +6147,7 @@ layer_note1 3, 0x7, 100 layer_note1 36, 0x18, 100 layer_end -.chan_25A7: +.sound_obj_snufit_shoot: chan_setbank 6 chan_setinstr 0 chan_setenvelope .envelope_32D4 @@ -6158,7 +6160,7 @@ layer_portamento 0x81, 44, 255 layer_note1 51, 0x8, 118 layer_end -.chan_25BB: +.sound_obj_skeeter_walk: chan_setbank 6 chan_setinstr 7 chan_setlayer 0, .layer_25CC @@ -6175,7 +6177,7 @@ layer_portamento 0x81, 27, 255 layer_note1 49, 0x6, 127 layer_end -.chan_25DB: +.sound_obj_walking_water: chan_setbank 6 chan_setinstr 7 chan_setlayer 0, .layer_25EC @@ -6193,7 +6195,7 @@ layer_note1 48, 0x6, 92 layer_note1 55, 0x30, 92 layer_end -.chan_25FE: +.sound_obj_piranha_plant_appear: chan_setbank 3 chan_setinstr 0 chan_setenvelope .envelope_3324 @@ -6205,7 +6207,7 @@ layer_portamento 0x82, 62, 255 layer_note1 38, 0x60, 117 layer_end -.chan_2611: +.sound_obj_flame_blown: chan_setbank 7 chan_setinstr 5 chan_setenvelope .envelope_32F4 @@ -6217,8 +6219,8 @@ layer_portamento 0x85, 41, 255 layer_note1 36, 0x18, 127 layer_end -.chan_2624: -chan_call .chan_207F +.sound_obj_mad_piano_chomping: +chan_call .sound_obj_piranha_plant_bite chan_setval 1 chan_call .delay chan_setbank 7 @@ -6227,7 +6229,7 @@ chan_setlayer 1, .layer_2655 chan_setlayer 2, .layer_2659 chan_setval 11 chan_call .delay -chan_call .chan_1770 +chan_call .sound_general_elevator_move chan_setval 20 chan_call .delay chan_setbank 1 @@ -6249,7 +6251,7 @@ layer_end layer_note1 39, 0x32, 127 layer_end -.chan_265D: +.sound_obj_large_bully_attacked: chan_setbank 7 chan_setinstr 12 chan_setlayer 0, .layer_2665 @@ -6261,7 +6263,7 @@ layer_note0 34, 0x12, 127, 127 layer_note1 20, 0x28, 127 layer_end -.chan_2671: +.sound_obj_bobomb_buddy_talk: chan_setbank 8 chan_setinstr 12 chan_setvibratoextent 80 @@ -6296,7 +6298,7 @@ layer_note1 8, 0x6, 100 layer_note1 32, 0xc, 100 layer_end -.chan_26BC: +.sound_obj_eyerok_sound_short: chan_setbank 7 chan_setinstr 12 chan_setlayer 0, .layer_26C7 @@ -6308,7 +6310,7 @@ layer_portamento 0x81, 32, 255 layer_note1 22, 0x24, 110 layer_end -.chan_26CF: +.sound_obj_eyerok_sound_long: chan_setbank 7 chan_setinstr 12 chan_setlayer 0, .layer_26D7 @@ -6319,7 +6321,7 @@ layer_portamento 0x81, 26, 255 layer_note1 19, 0x60, 127 layer_end -.chan_26DF: +.sound_obj_wiggler_high_pitch: chan_setbank 6 chan_setinstr 7 chan_setlayer 0, .layer_26E7 @@ -6333,7 +6335,7 @@ layer_note0 29, 0x8, 127, 70 layer_note0 28, 0x9, 127, 70 layer_end -.chan_26FA: +.sound_obj_heaveho_tossed: chan_setbank 6 chan_setinstr 11 chan_setlayer 0, .layer_2702 @@ -6344,7 +6346,7 @@ layer_portamento 0x81, 12, 255 layer_note1 51, 0x24, 127 layer_end -.chan_270A: +.sound_obj_bowser_intro_laugh: chan_setbank 6 chan_setinstr 9 chan_setval 25 @@ -6361,8 +6363,8 @@ layer_portamento 0x81, 20, 255 layer_note1 26, 0xc8, 110 layer_end -.chan_2726: -chan_call .chan_22B7 +.sound_obj_enemy_death_high: +chan_call .sound_obj_default_death chan_setval 1 chan_call .delay chan_setbank 7 @@ -6370,8 +6372,8 @@ chan_setinstr 8 chan_setlayer 1, .layer_223D chan_end -.chan_2736: -chan_call .chan_22B7 +.sound_obj_enemy_death_low: +chan_call .sound_obj_default_death chan_setval 1 chan_call .delay chan_setbank 7 @@ -6385,8 +6387,8 @@ layer_portamento 0x81, 39, 255 layer_note1 27, 0x1c, 105 layer_end -.chan_2751: -chan_call .chan_22B7 +.sound_obj_swoop_death: +chan_call .sound_obj_default_death chan_setval 1 chan_call .delay chan_setbank 7 @@ -6394,8 +6396,8 @@ chan_setinstr 7 chan_setlayer 1, .layer_254A chan_end -.chan_2761: -chan_call .chan_22B7 +.sound_obj_koopa_flyguy_pokey_death: +chan_call .sound_obj_default_death chan_setval 1 chan_call .delay chan_setbank 7 @@ -6403,8 +6405,8 @@ chan_setinstr 8 chan_setlayer 1, .layer_2461 chan_end -.chan_2771: -chan_call .chan_22B7 +.sound_obj_wiggler_death: +chan_call .sound_obj_default_death chan_setval 1 chan_call .delay chan_setbank 7 @@ -6412,13 +6414,13 @@ chan_setinstr 0 chan_setlayer 1, .layer_2219 chan_end -.chan_2781: -chan_call .chan_22E6 +.sound_obj_snowman_bounce: +chan_call .sound_obj_water_bomb_bouncing chan_setlayer 1, .layer_22F3 chan_end -.chan_2788: -chan_call .chan_1613 +.sound_obj_snowman_explode: +chan_call .sound_general_explosion7 chan_setval 12 chan_call .delay chan_setbank 6 @@ -6430,7 +6432,7 @@ chan_end layer_note1 24, 0x46, 127 layer_end -.chan_279C: +.sound_obj_bowser_teleport: chan_setbank 9 chan_setinstr 3 chan_setvibratoextent 80 @@ -6450,7 +6452,7 @@ layer_transpose 1 layer_note1 15, 0x48, 127 layer_end -.chan_27BB: +.sound_obj_monty_mole_appear: chan_setbank 4 chan_setinstr 15 chan_setval 40 @@ -6467,7 +6469,7 @@ layer_note1 51, 0x7, 127 layer_note1 56, 0x8, 127 layer_end -.chan_27DC: +.sound_obj_pounding_loud: chan_setbank 6 chan_setinstr 1 chan_setval 55 @@ -6475,7 +6477,7 @@ chan_call .set_reverb chan_setlayer 0, .layer_204E chan_end -.chan_27E9: +.sound_obj_boss_dialog_grunt: chan_setbank 7 chan_setinstr 12 chan_setlayer 0, .layer_27F1 @@ -6487,7 +6489,7 @@ layer_note0 31, 0x18, 127, 127 layer_note1 27, 0x26, 127 layer_end -.chan_27FC: +.sound_obj_mips_rabbit: chan_setbank 6 chan_setinstr 0 chan_setlayer 0, .layer_2804 @@ -6500,7 +6502,7 @@ layer_note1 46, 0x9, 80 layer_note1 36, 0xa, 90 layer_end -.chan_2810: +.sound_obj_mri_spinning: chan_setbank 6 chan_setinstr 11 chan_setenvelope .envelope_3304 @@ -6514,7 +6516,7 @@ layer_note1 31, 0xe, 127 layer_note1 62, 0x8, 127 layer_end -.chan_2827: +.sound_obj_mips_rabbit_water: chan_setbank 2 chan_setinstr 1 chan_setenvelope .envelope_32C4 @@ -6531,7 +6533,7 @@ layer_portamento 0x81, 47, 255 layer_note1 50, 0x18, 115 layer_end -.chan_2846: +.sound_obj_eyerok_explode: chan_setbank 4 chan_setinstr 9 chan_setenvelope .envelope_32C4 @@ -6550,8 +6552,8 @@ layer_call .layer_fn_119F layer_transpose 236 layer_jump .layer_fn_119F -.chan_2865: -chan_call .chan_2518 +.sound_obj_chuckya_death: +chan_call .sound_obj_king_whomp_death chan_setlayer 1, .layer_288B chan_setval 2 chan_call .delay @@ -6573,7 +6575,7 @@ layer_end layer_transpose 2 layer_jump .layer_252C -.chan_2890: +.sound_obj_wiggler_talk: chan_setbank 7 chan_setinstr 10 chan_setenvelope .envelope_3344 @@ -6598,7 +6600,7 @@ layer_portamento 0x81, 43, 255 layer_note1 51, 0xc, 105 layer_end -.chan_28C7: +.sound_obj_wiggler_attacked: chan_setbank 7 chan_setinstr 10 chan_setenvelope .envelope_3344 @@ -6613,7 +6615,7 @@ layer_note0 60, 0x9, 105, 100 layer_note1 39, 0xb, 105 layer_end -.chan_28E3: +.sound_obj_wiggler_low_pitch: chan_setbank 6 chan_setinstr 7 chan_setlayer 0, .layer_28EB @@ -6627,8 +6629,8 @@ layer_note0 29, 0xa, 127, 70 layer_note0 28, 0xc, 127, 70 layer_end -.chan_28FE: -chan_call .chan_22B7 +.sound_obj_snufit_skeeter_death: +chan_call .sound_obj_default_death chan_setval 1 chan_call .delay chan_setbank 7 @@ -6645,8 +6647,8 @@ layer_note0 60, 0x9, 105, 100 layer_note1 39, 0x14, 105 layer_end -.chan_2922: -chan_call .chan_207F +.sound_obj_bubba_chomp: +chan_call .sound_obj_piranha_plant_bite chan_setval 10 chan_call .delay chan_setbank 9 @@ -6662,7 +6664,7 @@ layer_note1 0, 0x12, 127 layer_note1 10, 0x14, 127 layer_end -.chan_2942: +.sound_obj_enemy_defeat_shrink: chan_setbank 7 chan_setinstr 0 chan_setlayer 0, .layer_2951 @@ -6686,40 +6688,40 @@ layer_note1 34, 0x10, 105 layer_end .channel6_table: -sound_ref .chan_29B1 +sound_ref .sound_air_bowser_spit_fire sound_ref .chan_29C2 -sound_ref .chan_29D3 -sound_ref .chan_29EF -sound_ref .chan_2A03 -sound_ref .chan_2A17 -sound_ref .chan_2A2B +sound_ref .sound_air_lakitu_fly +sound_ref .sound_air_amp_buzz +sound_ref .sound_air_blow_fire +sound_ref .sound_air_rough_slide +sound_ref .sound_air_heaveho_move sound_ref .chan_2A3D -sound_ref .chan_2A50 -sound_ref .chan_2A81 -sound_ref .chan_2B04 -sound_ref .chan_1E35 -sound_ref .chan_29B1 -sound_ref .chan_29B1 -sound_ref .chan_29B1 -sound_ref .chan_29B1 -sound_ref .chan_3248 +sound_ref .sound_air_bobomb_lit_fuse +sound_ref .sound_air_howling_wind +sound_ref .sound_air_chuckya_move +sound_ref .sound_air_peach_twinkle +sound_ref .sound_air_bowser_spit_fire +sound_ref .sound_air_bowser_spit_fire +sound_ref .sound_air_bowser_spit_fire +sound_ref .sound_air_bowser_spit_fire +sound_ref .sound_air_castle_outdoors_ambient sound_ref .chan_29C2 -sound_ref .chan_29B1 -sound_ref .chan_29B1 -sound_ref .chan_29B1 -sound_ref .chan_29B1 -sound_ref .chan_29B1 -sound_ref .chan_29B1 -sound_ref .chan_29B1 +sound_ref .sound_air_bowser_spit_fire +sound_ref .sound_air_bowser_spit_fire +sound_ref .sound_air_bowser_spit_fire +sound_ref .sound_air_bowser_spit_fire +sound_ref .sound_air_bowser_spit_fire +sound_ref .sound_air_bowser_spit_fire +sound_ref .sound_air_bowser_spit_fire sound_ref .chan_29C2 -sound_ref .chan_29B1 -sound_ref .chan_29B1 -sound_ref .chan_29B1 -sound_ref .chan_29B1 -sound_ref .chan_29B1 -sound_ref .chan_29B1 +sound_ref .sound_air_bowser_spit_fire +sound_ref .sound_air_bowser_spit_fire +sound_ref .sound_air_bowser_spit_fire +sound_ref .sound_air_bowser_spit_fire +sound_ref .sound_air_bowser_spit_fire +sound_ref .sound_air_bowser_spit_fire -.chan_29B1: +.sound_air_bowser_spit_fire: chan_setbank 7 chan_setinstr 5 chan_setlayer 0, .layer_29B9 @@ -6745,7 +6747,7 @@ layer_note1 39, 0x12c, 90 layer_jump .layer_29CB layer_end -.chan_29D3: +.sound_air_lakitu_fly: chan_setbank 9 chan_setinstr 3 chan_setenvelope .envelope_32E4 @@ -6762,7 +6764,7 @@ layer_note1 27, 0x16, 50 layer_jump .layer_29E5 layer_end -.chan_29EF: +.sound_air_amp_buzz: chan_setbank 3 chan_setinstr 9 chan_setenvelope .envelope_32E4 @@ -6776,7 +6778,7 @@ layer_note1 46, 0xc8, 92 layer_jump .layer_29FB layer_end -.chan_2A03: +.sound_air_blow_fire: chan_setbank 7 chan_setinstr 5 chan_setenvelope .envelope_32E4 @@ -6790,7 +6792,7 @@ layer_note1 44, 0x12c, 127 layer_jump .layer_2A0F layer_end -.chan_2A17: +.sound_air_rough_slide: chan_setbank 3 chan_setinstr 6 chan_setenvelope .envelope_32E4 @@ -6804,7 +6806,7 @@ layer_note1 35, 0x12c, 127 layer_jump .layer_2A23 layer_end -.chan_2A2B: +.sound_air_heaveho_move: chan_setbank 5 chan_setinstr 5 chan_setlayer 0, .layer_2A33 @@ -6828,7 +6830,7 @@ layer_note1 56, 0x10, 55 layer_jump .layer_2A45 layer_end -.chan_2A50: +.sound_air_bobomb_lit_fuse: chan_setbank 3 chan_setinstr 5 chan_setlayer 0, .layer_2A61 @@ -6859,7 +6861,7 @@ layer_note1 35, 0x12c, 100 layer_jump .layer_2A23 layer_end -.chan_2A81: +.sound_air_howling_wind: chan_setlayer 0, .layer_2AA7 chan_setlayer 1, .layer_2AB7 chan_setpanmix 0 @@ -6920,7 +6922,7 @@ layer_note1 52, 0x28, 45 layer_delay 0x38 layer_jump .layer_2AB7 -.chan_2B04: +.sound_air_chuckya_move: chan_setbank 5 chan_setinstr 5 chan_setenvelope .envelope_32C4 @@ -6935,88 +6937,88 @@ layer_jump .layer_2B0F layer_end .channel7_table: -sound_ref .chan_2B9D -sound_ref .chan_2BC5 -sound_ref .chan_2BF3 -sound_ref .chan_2BF3 -sound_ref .chan_2C31 -sound_ref .chan_2C42 -sound_ref .chan_2C73 -sound_ref .chan_2C56 -sound_ref .chan_2C90 -sound_ref .chan_2CAC -sound_ref .chan_2CE5 -sound_ref .chan_2CFE +sound_ref .sound_menu_change_select +sound_ref .sound_menu_reverse_pause +sound_ref .sound_menu_pause +sound_ref .sound_menu_pause +sound_ref .sound_menu_message_appear +sound_ref .sound_menu_message_disappear +sound_ref .sound_menu_camera_zoom_in +sound_ref .sound_menu_camera_zoom_out +sound_ref .sound_menu_pinch_mario_face +sound_ref .sound_menu_let_go_mario_face +sound_ref .sound_menu_hand_appear +sound_ref .sound_menu_hand_disappear sound_ref .chan_2D18 -sound_ref .chan_2D40 -sound_ref .chan_2D7C -sound_ref .chan_2D8B +sound_ref .sound_menu_power_meter +sound_ref .sound_menu_camera_buzz +sound_ref .sound_menu_camera_turn sound_ref .chan_2DA8 -sound_ref .chan_2DB4 -sound_ref .chan_2DD0 -sound_ref .chan_2DF2 -sound_ref .chan_2E05 -sound_ref .chan_2E4E -sound_ref .chan_2E83 -sound_ref .chan_2ED8 -sound_ref .chan_2F55 -sound_ref .chan_10A7 -sound_ref .chan_2F65 -sound_ref .chan_2F71 -sound_ref .chan_2F8C -sound_ref .chan_2FA6 -sound_ref .chan_133C -sound_ref .chan_309F -sound_ref .chan_30B6 -sound_ref .chan_30CB -sound_ref .chan_30E0 +sound_ref .sound_menu_click_file_select +sound_ref .sound_menu_read_sign +sound_ref .sound_menu_message_next_page +sound_ref .sound_menu_coin_its_a_me_mario +sound_ref .sound_menu_yoshi_gain_lives +sound_ref .sound_menu_enter_pipe +sound_ref .sound_menu_exit_pipe +sound_ref .sound_menu_bowser_laugh +sound_ref .sound_menu_enter_hole +sound_ref .sound_menu_click_change_view +sound_ref .sound_menu_camera_unused1 +sound_ref .sound_menu_camera_unused2 +sound_ref .sound_menu_mario_castle_warp +sound_ref .sound_menu_star_sound +sound_ref .sound_menu_thank_you_playing_my_game +sound_ref .sound_menu_read_a_sign +sound_ref .sound_menu_exit_a_sign +sound_ref .sound_menu_mario_castle_warp2 .ifdef VERSION_JP - sound_ref .chan_2DF2 - sound_ref .chan_2E05 - sound_ref .chan_2E4E - sound_ref .chan_2E83 - sound_ref .chan_2ED8 - sound_ref .chan_2F55 - sound_ref .chan_10A7 - sound_ref .chan_2F65 - sound_ref .chan_2F71 - sound_ref .chan_2F8C - sound_ref .chan_2FA6 - sound_ref .chan_133C - sound_ref .chan_2B9D + sound_ref .sound_menu_message_next_page + sound_ref .sound_menu_coin_its_a_me_mario + sound_ref .sound_menu_yoshi_gain_lives + sound_ref .sound_menu_enter_pipe + sound_ref .sound_menu_exit_pipe + sound_ref .sound_menu_bowser_laugh + sound_ref .sound_menu_enter_hole + sound_ref .sound_menu_click_change_view + sound_ref .sound_menu_camera_unused1 + sound_ref .sound_menu_camera_unused2 + sound_ref .sound_menu_mario_castle_warp + sound_ref .sound_menu_star_sound + sound_ref .sound_menu_change_select .else - sound_ref .chan_30F5 - sound_ref .chan_3109 - sound_ref .chan_2E4E - sound_ref .chan_2E83 - sound_ref .chan_2ED8 - sound_ref .chan_3122 - sound_ref .chan_3122 - sound_ref .chan_3122 - sound_ref .chan_3122 - sound_ref .chan_3122 - sound_ref .chan_3122 - sound_ref .chan_3122 - sound_ref .chan_3122 - sound_ref .chan_318B - sound_ref .chan_318B - sound_ref .chan_318B - sound_ref .chan_318B - sound_ref .chan_318B - sound_ref .chan_318B - sound_ref .chan_318B - sound_ref .chan_318B - sound_ref .chan_2C90 - sound_ref .chan_2CAC - sound_ref .chan_2CE5 - sound_ref .chan_2CFE + sound_ref .sound_menu_star_sound_okey_dokey + sound_ref .sound_menu_star_sound_lets_a_go + sound_ref .sound_menu_yoshi_gain_lives + sound_ref .sound_menu_enter_pipe + sound_ref .sound_menu_exit_pipe + sound_ref .sound_menu_collect_red_coin + sound_ref .sound_menu_collect_red_coin + sound_ref .sound_menu_collect_red_coin + sound_ref .sound_menu_collect_red_coin + sound_ref .sound_menu_collect_red_coin + sound_ref .sound_menu_collect_red_coin + sound_ref .sound_menu_collect_red_coin + sound_ref .sound_menu_collect_red_coin + sound_ref .sound_menu_collect_secret + sound_ref .sound_menu_collect_secret + sound_ref .sound_menu_collect_secret + sound_ref .sound_menu_collect_secret + sound_ref .sound_menu_collect_secret + sound_ref .sound_menu_collect_secret + sound_ref .sound_menu_collect_secret + sound_ref .sound_menu_collect_secret + sound_ref .sound_menu_pinch_mario_face + sound_ref .sound_menu_let_go_mario_face + sound_ref .sound_menu_hand_appear + sound_ref .sound_menu_hand_disappear sound_ref .chan_2D18 - sound_ref .chan_2D40 - sound_ref .chan_2D7C - sound_ref .chan_2D8B + sound_ref .sound_menu_power_meter + sound_ref .sound_menu_camera_buzz + sound_ref .sound_menu_camera_turn .endif -.chan_2B9D: +.sound_menu_change_select: chan_setbank 9 chan_setinstr 1 chan_setmutebhv 0x0 @@ -7040,7 +7042,7 @@ layer_delay 0xc layer_note1 41, 0xa, 80 layer_end -.chan_2BC5: +.sound_menu_reverse_pause: chan_setbank 9 chan_setinstr 1 chan_setmutebhv 0x0 @@ -7065,7 +7067,7 @@ layer_setpan 94 layer_delay 0x2 layer_jump .layer_2BD7 -.chan_2BF3: +.sound_menu_pause: chan_setbank 9 chan_setinstr 1 chan_setmutebhv 0x0 @@ -7098,7 +7100,7 @@ layer_setpan 100 layer_note1 39, 0x9, 25 layer_end -.chan_2C31: +.sound_menu_message_appear: chan_setbank 9 chan_setnotepriority 14 chan_setinstr 2 @@ -7110,7 +7112,7 @@ layer_portamento 0x1, 32, 0x7f layer_note1 56, 0x1e, 102 layer_end -.chan_2C42: +.sound_menu_message_disappear: chan_setnotepriority 14 chan_setbank 9 chan_setinstr 0 @@ -7123,7 +7125,7 @@ layer_portamento 0x1, 32, 0x7f layer_note1 53, 0x1e, 78 layer_end -.chan_2C56: +.sound_menu_camera_zoom_out: chan_setmutebhv 0x0 chan_setnotepriority 14 chan_setbank 9 @@ -7139,7 +7141,7 @@ layer_portamento 0x81, 39, 255 layer_note1 20, 0x28, 127 layer_end -.chan_2C73: +.sound_menu_camera_zoom_in: chan_setmutebhv 0x0 chan_setnotepriority 14 chan_setbank 9 @@ -7155,7 +7157,7 @@ layer_portamento 0x81, 20, 255 layer_note1 39, 0x28, 93 layer_end -.chan_2C90: +.sound_menu_pinch_mario_face: chan_setbank 9 chan_setnotepriority 14 chan_setinstr 1 @@ -7172,7 +7174,7 @@ layer_note1 15, 0x6, 127 layer_note1 34, 0xc, 127 layer_end -.chan_2CAC: +.sound_menu_let_go_mario_face: chan_setbank 9 chan_setnotepriority 14 chan_setinstr 1 @@ -7203,7 +7205,7 @@ layer_note1 28, 0x5, 110 layer_note1 28, 0x78, 110 layer_end -.chan_2CE5: +.sound_menu_hand_appear: chan_setbank 9 chan_setnotepriority 14 chan_setinstr 3 @@ -7220,7 +7222,7 @@ layer_note1 35, 0x8, 90 layer_note1 47, 0x10, 90 layer_end -.chan_2CFE: +.sound_menu_hand_disappear: chan_setbank 9 chan_setnotepriority 14 chan_setinstr 3 @@ -7259,7 +7261,7 @@ layer_note1 57, 0x6, 38 layer_note1 57, 0xc, 38 layer_end -.chan_2D40: +.sound_menu_power_meter: chan_setbank 9 chan_setnotepriority 14 chan_setpanmix 0 @@ -7289,7 +7291,7 @@ layer_setpan 97 layer_note1 56, 0xa, 32 layer_end -.chan_2D7C: +.sound_menu_camera_buzz: chan_setmutebhv 0x0 chan_setnotepriority 14 chan_setbank 9 @@ -7301,7 +7303,7 @@ chan_end layer_note1 39, 0x18, 105 layer_end -.chan_2D8B: +.sound_menu_camera_turn: chan_setmutebhv 0x0 chan_setnotepriority 14 chan_setbank 9 @@ -7328,7 +7330,7 @@ chan_end layer_delay 1 layer_end -.chan_2DB4: +.sound_menu_click_file_select: chan_setmutebhv 0x0 chan_setnotepriority 14 chan_setbank 6 @@ -7343,7 +7345,7 @@ layer_portamento 0x81, 44, 255 layer_note0 51, 0x3, 115, 255 layer_end -.chan_2DD0: +.sound_menu_read_sign: chan_setmutebhv 0x0 chan_setbank 9 chan_setinstr 1 @@ -7361,7 +7363,7 @@ layer_note1 46, 0x3, 90 layer_note1 46, 0x3, 30 layer_end -.chan_2DF2: +.sound_menu_message_next_page: chan_setbank 9 chan_setinstr 0 chan_setenvelope .envelope_32C4 @@ -7373,7 +7375,7 @@ layer_portamento 0x81, 15, 255 layer_note1 51, 0x5, 73 layer_end -.chan_2E05: +.sound_menu_coin_its_a_me_mario: chan_setbank 9 chan_setinstr 3 chan_setenvelope .envelope_3358 @@ -7412,7 +7414,7 @@ layer_note1 30, 0x5, 18 layer_note1 42, 0x37, 36 layer_end -.chan_2E4E: +.sound_menu_yoshi_gain_lives: chan_setbank 9 chan_setnotepriority 14 chan_setpanmix 0 @@ -7439,7 +7441,7 @@ layer_setpan 108 layer_note1 58, 0x5, 20 layer_end -.chan_2E83: +.sound_menu_enter_pipe: chan_reservenotes 4 chan_setbank 9 chan_setinstr 2 @@ -7483,7 +7485,7 @@ layer_setpan 10 layer_note1 41, 0x3, 126 layer_end -.chan_2ED8: +.sound_menu_exit_pipe: chan_reservenotes 4 chan_setbank 9 chan_setinstr 2 @@ -7535,7 +7537,7 @@ layer_note1 49, 0x3, 126 layer_note1 44, 0x3, 126 layer_end -.chan_2F55: +.sound_menu_bowser_laugh: chan_setbank 6 chan_setinstr 9 chan_setval 25 @@ -7544,7 +7546,7 @@ chan_setlayer 0, .layer_271D chan_setlayer 1, .layer_271D chan_end -.chan_2F65: +.sound_menu_click_change_view: chan_setbank 9 chan_setinstr 5 chan_setlayer 0, .layer_2F6D @@ -7554,7 +7556,7 @@ chan_end layer_note1 39, 0x30, 127 layer_end -.chan_2F71: +.sound_menu_camera_unused1: chan_setbank 9 chan_setinstr 3 chan_setenvelope .envelope_32D4 @@ -7570,7 +7572,7 @@ layer_transpose 0 layer_note1 46, 0x64, 127 layer_end -.chan_2F8C: +.sound_menu_camera_unused2: chan_setbank 9 chan_setinstr 3 chan_setlayer 0, .layer_2F97 @@ -7584,7 +7586,7 @@ layer_portamento 0x81, 39, 255 layer_note1 3, 0x64, 127 layer_end -.chan_2FA6: +.sound_menu_mario_castle_warp: chan_setbank 9 chan_setnotepriority 14 chan_setpanmix 0 @@ -7695,7 +7697,7 @@ layer_note1 60, 0x1, 50 layer_note1 60, 0x1, 20 layer_end -.chan_309F: +.sound_menu_thank_you_playing_my_game: chan_setbank 10 chan_setinstr 14 chan_setlayer 0, .layer_30AA @@ -7711,7 +7713,7 @@ layer_delay 0x9 layer_note1 39, 0xf1, 45 layer_end -.chan_30B6: +.sound_menu_read_a_sign: chan_setbank 9 chan_setinstr 1 chan_setlayer 0, .layer_30BE @@ -7724,7 +7726,7 @@ layer_note1 58, 0x3, 90 layer_note1 58, 0x3, 30 layer_end -.chan_30CB: +.sound_menu_exit_a_sign: chan_setbank 9 chan_setinstr 1 chan_setlayer 0, .layer_30D3 @@ -7737,7 +7739,7 @@ layer_note1 46, 0x3, 90 layer_note1 46, 0x3, 30 layer_end -.chan_30E0: +.sound_menu_mario_castle_warp2: chan_reservenotes 6 chan_setbank 9 chan_setnotepriority 14 @@ -7750,7 +7752,7 @@ chan_setlayer 1, .layer_2FC9 chan_end .ifndef VERSION_JP - .chan_30F5: + .sound_menu_star_sound_okey_dokey: chan_setbank 4 chan_setinstr 14 chan_setlayer 0, .layer_1344 @@ -7761,7 +7763,7 @@ chan_end chan_setlayer 1, .layer_E3A chan_end - .chan_3109: + .sound_menu_star_sound_lets_a_go: chan_setbank 8 chan_setinstr 26 chan_setlayer 0, .layer_311D @@ -7776,7 +7778,7 @@ chan_end layer_note1 39, 0xb4, 127 layer_end - .chan_3122: + .sound_menu_collect_red_coin: chan_setinstr 128 chan_setnotepriority 14 chan_setpanmix 0 @@ -7829,7 +7831,7 @@ chan_end layer_transpose 0 layer_end - .chan_318B: + .sound_menu_collect_secret: chan_setbank 4 chan_setinstr 14 chan_setnotepriority 14 @@ -7847,7 +7849,7 @@ chan_end layer_end .endif -.chan_31A6: +.sound_general_bird_chirp2: chan_setbank 5 chan_setinstr 9 chan_setval 40 @@ -7868,7 +7870,7 @@ layer_note0 36, 0x74, 78, 127 layer_jump .layer_31B3 layer_end -.chan_31DE: +.sound_obj_bird_chirp3: chan_setbank 5 chan_setinstr 10 chan_setval 60 @@ -7891,7 +7893,7 @@ layer_note1 35, 0xe9, 74 layer_jump .layer_31EB layer_end -.chan_3214: +.sound_obj_bird_chirp1: chan_setbank 5 chan_setinstr 12 chan_setval 30 @@ -7915,7 +7917,7 @@ layer_delay 0xc6 layer_jump .layer_3221 layer_end -.chan_3248: +.sound_air_castle_outdoors_ambient: chan_setbank 5 chan_setval 15 chan_call .set_reverb @@ -7949,11 +7951,11 @@ layer_delay 0xf layer_note1 39, 0x12c, 25 layer_jump .layer_3286 -.chan_328D: +.sound_general_switch_tick_slow: chan_setval 18 chan_jump .chan_3294 -.chan_3292: +.sound_general_switch_tick_fast: chan_setval 42 .chan_3294: chan_writeseq 0, .layer_32BF, 1 diff --git a/src/audio/external.c b/src/audio/external.c index 309494f..12a9a33 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -112,17 +112,17 @@ u8 sDialogSpeaker[170] = { #undef _ s32 sDialogSpeakerVoice[15] = { - SOUND_UKIKI_CHATTER_LONG, - SOUND_BIG_PENGUIN_YELL, - SOUND_OBJECT_BOWSERINTROLAUGH, - SOUND_OBJECT_KOOPA, - SOUND_OBJECT_KINGBOBOMB, - SOUND_BOO_LAUGH_LONG, - SOUND_OBJECT_BOBOMBBUDDY, - SOUND_OBJECT_BOWSERLAUGH, - SOUND_BOSS_DIALOG_GRUNT, - SOUND_WIGGLER_DIALOG, - SOUND_GENERAL_YOSHI, + SOUND_OBJ_UKIKI_CHATTER_LONG, + SOUND_OBJ_BIG_PENGUIN_YELL, + SOUND_OBJ_BOWSER_INTRO_LAUGH, + SOUND_OBJ_KOOPA_TALK, + SOUND_OBJ_KING_BOBOMB_TALK, + SOUND_OBJ_BOO_LAUGH_LONG, + SOUND_OBJ_BOBOMB_BUDDY_TALK, + SOUND_OBJ_BOWSER_LAUGH, + SOUND_OBJ2_BOSS_DIALOG_GRUNT, + SOUND_OBJ_WIGGLER_TALK, + SOUND_GENERAL_YOSHI_TALK, NO_SOUND, NO_SOUND, NO_SOUND, @@ -545,7 +545,7 @@ void unused_8031E568(void) { /** * Fade out a sequence player */ -static void sequence_player_fade_out(s32 player, FadeT fadeOutTime) { +static void sequence_player_fade_out_internal(s32 player, FadeT fadeOutTime) { struct SequencePlayer *seqPlayer = &gSequencePlayers[player]; #ifndef VERSION_JP if (fadeOutTime == 0) { @@ -694,9 +694,9 @@ struct SPTask *create_next_audio_frame_task(void) { task->type = M_AUDTASK; task->flags = flags; task->ucode_boot = rspF3DBootStart; - task->ucode_boot_size = (u32) rspF3DBootEnd - (u32) rspF3DBootStart; + task->ucode_boot_size = (u8 *) rspF3DBootEnd - (u8 *) rspF3DBootStart; task->ucode = rspAspMainStart; - task->ucode_size = 0x800; + task->ucode_size = 0x800; // (this size is ignored) task->ucode_data = rspAspMainDataStart; task->ucode_data_size = (rspAspMainDataEnd - rspAspMainDataStart) * sizeof(u64); task->dram_stack = NULL; @@ -1169,7 +1169,7 @@ void update_game_sound(void) { *gSoundBanks[bankIndex][index].x, *gSoundBanks[bankIndex][index].z); if ((gSoundBanks[bankIndex][index].soundBits & SOUNDARGS_MASK_SOUNDID) - == (SOUND_UNKNOWN_UNK1417 & SOUNDARGS_MASK_SOUNDID)) { + == (SOUND_MOVING_FLYING & SOUNDARGS_MASK_SOUNDID)) { ret = get_sound_freq_scale(bankIndex, index); gSequencePlayers[2].channels[channelIndex]->freqScale = ((f32) D_80363808[bankIndex] / US_FLOAT(80.0)) + ret; @@ -1261,7 +1261,7 @@ void update_game_sound(void) { *gSoundBanks[bankIndex][index].x, *gSoundBanks[bankIndex][index].z); if ((gSoundBanks[bankIndex][index].soundBits & SOUNDARGS_MASK_SOUNDID) - == (SOUND_UNKNOWN_UNK1417 & SOUNDARGS_MASK_SOUNDID)) { + == (SOUND_MOVING_FLYING & SOUNDARGS_MASK_SOUNDID)) { ret = get_sound_freq_scale(bankIndex, index); gSequencePlayers[2].channels[channelIndex]->freqScale = ((f32) D_80363808[bankIndex] / US_FLOAT(80.0)) + ret; @@ -1349,11 +1349,11 @@ void play_sequence(u8 player, u8 seqId, u16 fadeTimer) { } } -void func_8031F7CC(u8 player, u16 fadeTimer) { +void sequence_player_fade_out(u8 player, u16 fadeTimer) { if (player == 0) { gPlayer0CurSeqId = SEQUENCE_NONE; } - sequence_player_fade_out(player, fadeTimer); + sequence_player_fade_out_internal(player, fadeTimer); } void fade_volume_scale(u8 player, u8 targetScale, u16 fadeTimer) { @@ -1404,7 +1404,6 @@ void process_level_music_dynamics(void) { s16 dur2; // sp38 u32 conditionBits; // s0 u32 tempBits; // v1 - s32 numConditions; // v1 u16 bit; // a1 u8 condIndex; // a0 (same as numConditions?) u8 i; // s1 @@ -1439,63 +1438,62 @@ void process_level_music_dynamics(void) { } } - numConditions = condIndex; - for (j = 0; j < numConditions; j++) { + for (j = 0; j < condIndex; j++) { // (having all 'temp' share a single variable affects regalloc) UNUSED s16 temp; switch (conditionTypes[j]) { case MARIO_X_GE: { s16 temp = gMarioStates[0].pos[0]; if (temp < conditionValues[j]) - j = numConditions + 1; + j = condIndex + 1; break; } case MARIO_Y_GE: { s16 temp = gMarioStates[0].pos[1]; if (temp < conditionValues[j]) - j = numConditions + 1; + j = condIndex + 1; break; } case MARIO_Z_GE: { s16 temp = gMarioStates[0].pos[2]; if (temp < conditionValues[j]) - j = numConditions + 1; + j = condIndex + 1; break; } case MARIO_X_LT: { s16 temp = gMarioStates[0].pos[0]; if (temp >= conditionValues[j]) - j = numConditions + 1; + j = condIndex + 1; break; } case MARIO_Y_LT: { s16 temp = gMarioStates[0].pos[1]; if (temp >= conditionValues[j]) - j = numConditions + 1; + j = condIndex + 1; break; } case MARIO_Z_LT: { s16 temp = gMarioStates[0].pos[2]; if (temp >= conditionValues[j]) - j = numConditions + 1; + j = condIndex + 1; break; } case MARIO_IS_IN_AREA: { s16 temp = gCurrAreaIndex; if (temp != conditionValues[j]) - j = numConditions + 1; + j = condIndex + 1; break; } case MARIO_IS_IN_ROOM: { s16 temp = gMarioCurrentRoom; if (temp != conditionValues[j]) - j = numConditions + 1; + j = condIndex + 1; break; } } } - if (j == numConditions) { + if (j == condIndex) { // The area matches. Break out of the loop. tempBits = 0; } else { @@ -1565,7 +1563,7 @@ void func_8031FFB4(u8 player, u16 fadeTimer, u8 arg2) { } } -void func_80320040(u8 player, u16 fadeTimer) { +void sequence_player_unlower(u8 player, u16 fadeTimer) { sCapVolumeTo40 = FALSE; if (player == 0) { if (gSequencePlayers[player].state != SEQUENCE_PLAYER_STATE_FADE_OUT) { @@ -1799,17 +1797,17 @@ void func_80320A4C(u8 bankIndex, u8 arg1) { D_80363808[bankIndex] = arg1; } -void play_dialog_sound(u8 dialogId) { +void play_dialog_sound(u8 dialogID) { u8 speaker; - if (dialogId >= 170) { - dialogId = 0; + if (dialogID >= 170) { + dialogID = 0; } - speaker = sDialogSpeaker[dialogId]; + speaker = sDialogSpeaker[dialogID]; if (speaker != 0xff) { play_sound(sDialogSpeakerVoice[speaker], gDefaultSoundArgs); - if (speaker == 2) // SOUND_OBJECT_BOWSERINTROLAUGH + if (speaker == 2) // SOUND_OBJ_BOWSER_INTRO_LAUGH { play_sequence(1, SEQ_EVENT_KOOPA_MESSAGE, 0); } @@ -1817,7 +1815,7 @@ void play_dialog_sound(u8 dialogId) { #ifndef VERSION_JP // "You've stepped on the (Wing|Metal|Vanish) Cap Switch" - if (dialogId == 10 || dialogId == 11 || dialogId == 12) { + if (dialogID == 10 || dialogID == 11 || dialogID == 12) { play_puzzle_jingle(); } #endif @@ -1904,7 +1902,7 @@ void stop_background_music(u16 seqId) { if (sBackgroundMusicQueueSize != 0) { play_sequence(0, sBackgroundMusicQueue[1].seqId, 0); } else { - func_8031F7CC(0, 20); + sequence_player_fade_out(0, 20); } } foundIndex = i; @@ -1925,7 +1923,7 @@ void stop_background_music(u16 seqId) { void fadeout_background_music(u16 seqId, u16 fadeOut) { if (sBackgroundMusicQueueSize != 0 && sBackgroundMusicQueue[0].seqId == (u8)(seqId & 0xff)) { - func_8031F7CC(0, fadeOut); + sequence_player_fade_out(0, fadeOut); } } @@ -1990,7 +1988,7 @@ void func_80321080(u16 fadeTimer) { D_80332120 = 0; D_80332124 = 0; func_803200E4(fadeTimer); - func_8031F7CC(1, fadeTimer); + sequence_player_fade_out(1, fadeTimer); } } @@ -2002,10 +2000,10 @@ void func_803210D4(u16 fadeOutTime) { } if (gSequencePlayers[0].enabled == TRUE) { - sequence_player_fade_out(0, fadeOutTime); + sequence_player_fade_out_internal(0, fadeOutTime); } if (gSequencePlayers[1].enabled == TRUE) { - sequence_player_fade_out(1, fadeOutTime); + sequence_player_fade_out_internal(1, fadeOutTime); } for (i = 0; i < SOUND_BANK_COUNT; i++) { diff --git a/src/audio/external.h b/src/audio/external.h index 3fcba70..142f02d 100644 --- a/src/audio/external.h +++ b/src/audio/external.h @@ -20,10 +20,10 @@ extern u8 gAudioSPTaskYieldBuffer[]; // ucode yield data ptr; only used in JP struct SPTask *create_next_audio_frame_task(void); void play_sound(s32 soundBits, f32 *pos); void audio_signal_game_loop_tick(void); -void func_8031F7CC(u8 player, u16 fadeTimer); +void sequence_player_fade_out(u8 player, u16 fadeTimer); void fade_volume_scale(u8 player, u8 targetScale, u16 fadeTimer); void func_8031FFB4(u8 player, u16 fadeTimer, u8 arg2); -void func_80320040(u8 player, u16 fadeTimer); +void sequence_player_unlower(u8 player, u16 fadeTimer); void set_sound_disabled(u8 disabled); void sound_init(void); void func_803205E8(u32 soundBits, f32 *vec); @@ -32,7 +32,7 @@ void func_80320890(void); void sound_banks_disable(u8 player, u16 bankMask); void sound_banks_enable(u8 player, u16 bankMask); void func_80320A4C(u8 bankIndex, u8 arg1); -void play_dialog_sound(u8 dialogId); +void play_dialog_sound(u8 dialogID); void play_music(u8 player, u16 seqArgs, s16 fadeTimer); void stop_background_music(u16 seqId); void fadeout_background_music(u16 arg0, u16 fadeOut); diff --git a/src/audio/internal.h b/src/audio/internal.h index 96413fb..f96e40f 100644 --- a/src/audio/internal.h +++ b/src/audio/internal.h @@ -220,8 +220,8 @@ struct SequencePlayer /*0x11C*/ OSIoMesg bankDmaIoMesg; /*0x130*/ u8 *bankDmaCurrMemAddr; /*0x134*/ struct AudioBank *loadingBank; - /*0x138*/ u32 bankDmaCurrDevAddr; - /*0x13C*/ s32 bankDmaRemaining; + /*0x138*/ uintptr_t bankDmaCurrDevAddr; + /*0x13C*/ ssize_t bankDmaRemaining; }; // size = 0x140 struct AdsrSettings diff --git a/src/audio/load.c b/src/audio/load.c index 7a250ca..a0da258 100644 --- a/src/audio/load.c +++ b/src/audio/load.c @@ -9,9 +9,9 @@ #define ALIGN16(val) (((val) + 0xF) & ~0xF) struct SharedDma { - /*0x0*/ u8 *buffer; // target, points to pre-allocated buffer - /*0x4*/ u32 source; // device address - /*0x8*/ u16 sizeUnused; // set to bufSize, never read + /*0x0*/ u8 *buffer; // target, points to pre-allocated buffer + /*0x4*/ uintptr_t source; // device address + /*0x8*/ u16 sizeUnused; // set to bufSize, never read /*0xA*/ u16 bufSize; /*0xC*/ u8 unused2; // set to 0, never read /*0xD*/ u8 reuseIndex; // position in sSampleDmaReuseQueue1/2, if ttl == 0 @@ -69,8 +69,8 @@ extern u8 gBankSetsData[]; // bank_sets.s /** * Performs an immediate DMA copy */ -void audio_dma_copy_immediate(u32 devAddr, void *vAddr, u32 nbytes) { - osInvalDCache(vAddr, (s32) nbytes); +void audio_dma_copy_immediate(uintptr_t devAddr, void *vAddr, size_t nbytes) { + osInvalDCache(vAddr, nbytes); osPiStartDma(&gAudioDmaIoMesg, OS_MESG_PRI_HIGH, OS_READ, devAddr, vAddr, nbytes, &gAudioDmaMesgQueue); osRecvMesg(&gAudioDmaMesgQueue, NULL, OS_MESG_BLOCK); @@ -79,8 +79,8 @@ void audio_dma_copy_immediate(u32 devAddr, void *vAddr, u32 nbytes) { /** * Performs an asynchronus (normal priority) DMA copy */ -void audio_dma_copy_async(u32 devAddr, void *vAddr, u32 nbytes, OSMesgQueue *queue, OSIoMesg *mesg) { - osInvalDCache(vAddr, (s32) nbytes); +void audio_dma_copy_async(uintptr_t devAddr, void *vAddr, size_t nbytes, OSMesgQueue *queue, OSIoMesg *mesg) { + osInvalDCache(vAddr, nbytes); osPiStartDma(mesg, OS_MESG_PRI_NORMAL, OS_READ, devAddr, vAddr, nbytes, queue); } @@ -88,9 +88,9 @@ void audio_dma_copy_async(u32 devAddr, void *vAddr, u32 nbytes, OSMesgQueue *que * Performs a partial asynchronous (normal priority) DMA copy. This is limited * to 0x1000 bytes transfer at once. */ -void audio_dma_partial_copy_async(u32 *devAddr, u8 **vAddr, s32 *remaining, OSMesgQueue *queue, +void audio_dma_partial_copy_async(uintptr_t *devAddr, u8 **vAddr, ssize_t *remaining, OSMesgQueue *queue, OSIoMesg *mesg) { - s32 transfer = (*remaining < 0x1000 ? *remaining : 0x1000); + ssize_t transfer = (*remaining < 0x1000 ? *remaining : 0x1000); *remaining -= transfer; osInvalDCache(*vAddr, transfer); osPiStartDma(mesg, OS_MESG_PRI_NORMAL, OS_READ, *devAddr, *vAddr, transfer, queue); @@ -129,7 +129,7 @@ void decrease_sample_dma_ttls() { #ifdef NON_MATCHING void *dma_sample_data(u8 *devAddr, u32 size, s32 arg2, u8 *arg3) { - s32 bufferPos; // v0 + ssize_t bufferPos; // v0 struct SharedDma *dma; // sp58, v1, t0 u32 transfer; // v0 u32 dmaDevAddr; // s0 @@ -141,8 +141,8 @@ void *dma_sample_data(u8 *devAddr, u32 size, s32 arg2, u8 *arg3) { if (arg2 != 0 || *arg3 >= sSampleDmaListSize1) { for (i = sSampleDmaListSize1; i < gSampleDmaNumListItems; i++) { dma = sSampleDmas + i; - bufferPos = (u32) devAddr - dma->source; - if (0 <= bufferPos && (u32) bufferPos <= dma->bufSize - size) { + bufferPos = (uintptr_t) devAddr - dma->source; + if (0 <= bufferPos && (size_t) bufferPos <= dma->bufSize - size) { // We already have a DMA request for this memory range. if (dma->ttl == 0 && sSampleDmaReuseQueueHead2 != sSampleDmaReuseQueueTail2) { // Move the DMA out of the reuse queue, by swapping it with the @@ -157,7 +157,7 @@ void *dma_sample_data(u8 *devAddr, u32 size, s32 arg2, u8 *arg3) { } dma->ttl = 60; *arg3 = (u8) i; - bufferPos = (u32) devAddr - dma->source; + bufferPos = (uintptr_t) devAddr - dma->source; return dma->buffer + bufferPos; } } @@ -171,8 +171,8 @@ void *dma_sample_data(u8 *devAddr, u32 size, s32 arg2, u8 *arg3) { } } else { dma = &sSampleDmas[*arg3]; - bufferPos = (u32) devAddr - dma->source; - if (0 <= bufferPos && (u32) bufferPos <= dma->bufSize - size) { + bufferPos = (uintptr_t) devAddr - dma->source; + if (0 <= bufferPos && (size_t) bufferPos <= dma->bufSize - size) { // We already have DMA for this memory range. if (dma->ttl == 0) { // Move the DMA out of the reuse queue, by swapping it with the @@ -184,7 +184,7 @@ void *dma_sample_data(u8 *devAddr, u32 size, s32 arg2, u8 *arg3) { dma->reuseIndex; } sSampleDmaReuseQueueTail1++; - bufferPos = (u32) devAddr - dma->source; + bufferPos = (uintptr_t) devAddr - dma->source; } dma->ttl = 2; return dma->buffer + bufferPos; @@ -200,7 +200,7 @@ void *dma_sample_data(u8 *devAddr, u32 size, s32 arg2, u8 *arg3) { } transfer = dma->bufSize; - dmaDevAddr = (u32) devAddr & ~0xF; + dmaDevAddr = (uintptr_t) devAddr & ~0xF; dma->ttl = 2; dma->source = dmaDevAddr; dma->sizeUnused = transfer; @@ -211,7 +211,7 @@ void *dma_sample_data(u8 *devAddr, u32 size, s32 arg2, u8 *arg3) { osPiStartDma(&gCurrAudioFrameDmaIoMesgBufs[gCurrAudioFrameDmaCount - 1], OS_MESG_PRI_NORMAL, OS_READ, dmaDevAddr, dma->buffer, transfer, &gCurrAudioFrameDmaQueue); *arg3 = dmaIndex; - return dma->buffer + (u32) devAddr - dmaDevAddr; + return dma->buffer + (uintptr_t) devAddr - dmaDevAddr; } #elif defined(VERSION_JP) @@ -301,8 +301,8 @@ void func_8031784C(struct AudioBank *mem, u8 *offset, u32 numInstruments, u32 nu struct Instrument *instrument; struct Instrument **itInstrs; u32 i; - u32 memBase = (u32) mem; - u32 offsetBase = (u32) offset; + uintptr_t memBase = (uintptr_t) mem; + uintptr_t offsetBase = (uintptr_t) offset; #define INIT_SOUND(sound) \ { \ @@ -315,16 +315,16 @@ void func_8031784C(struct AudioBank *mem, u8 *offset, u32 numInstruments, u32 nu * Presumably sample and sample2 ought to have different types, \ * but that doesn't matter for codegen. */ \ volatile struct AudioBankSample *sample, *sample2; \ - *itSample = (void *) (memBase + (u32)(*itSample)); \ + *itSample = (void *) (memBase + (uintptr_t)(*itSample)); \ sample = *itSample; \ sample2 = *itSample; \ if (sample2->loaded == FALSE) { \ void *a = sample2->sampleAddr; \ void *b = sample->loop; \ void *c = sample->book; \ - sample->sampleAddr = (void *) (offsetBase + (u32) a); \ - sample->loop = (void *) (memBase + (u32) b); \ - sample->book = (void *) (memBase + (u32) c); \ + sample->sampleAddr = (void *) (offsetBase + (uintptr_t) a); \ + sample->loop = (void *) (memBase + (uintptr_t) b); \ + sample->book = (void *) (memBase + (uintptr_t) c); \ sample->loaded = TRUE; \ } \ } \ @@ -332,7 +332,7 @@ void func_8031784C(struct AudioBank *mem, u8 *offset, u32 numInstruments, u32 nu if (mem->drums != NULL) { if (numDrums != 0) { - mem->drums = (struct Drum **) (memBase + (u32) mem->drums); + mem->drums = (struct Drum **) (memBase + (uintptr_t) mem->drums); if (numDrums != 0) { for (i = 0; i < numDrums; i++) { #if 0 @@ -342,7 +342,7 @@ void func_8031784C(struct AudioBank *mem, u8 *offset, u32 numInstruments, u32 nu struct Drum **h = &mem->drums[i]; if (*h == 0) continue; { - *h = (void *)(memBase + (u32)*h); + *h = (void *)(memBase + (uintptr_t)*h); drum = *h; drum2 = *h; if (drum2->loaded == FALSE) @@ -351,7 +351,7 @@ void func_8031784C(struct AudioBank *mem, u8 *offset, u32 numInstruments, u32 nu INIT_SOUND(((struct Drum *)drum2)->sound); d = drum2->envelope; drum->loaded = TRUE; - drum->envelope = (void *) (memBase + (u32)d); + drum->envelope = (void *) (memBase + (uintptr_t)d); } } #else @@ -359,7 +359,7 @@ void func_8031784C(struct AudioBank *mem, u8 *offset, u32 numInstruments, u32 nu // deduplicates it -- drum and drum2 end up in the same // register. struct Drum **drums = mem->drums; - u32 h = (u32) drums[i]; + uintptr_t h = (uintptr_t) drums[i]; if (h != 0) { volatile struct Drum *drum, *drum2; drums[i] = (struct Drum *) (memBase + h); @@ -370,7 +370,7 @@ void func_8031784C(struct AudioBank *mem, u8 *offset, u32 numInstruments, u32 nu INIT_SOUND(((struct Drum *) drum)->sound); d = drum->envelope; drum2->loaded = TRUE; - drum2->envelope = (void *) (memBase + (u32) d); + drum2->envelope = (void *) (memBase + (uintptr_t) d); } } #endif @@ -383,7 +383,7 @@ void func_8031784C(struct AudioBank *mem, u8 *offset, u32 numInstruments, u32 nu itInstrs = mem->instruments; do { if (*itInstrs) { - *itInstrs = (void *) (memBase + (u32) *itInstrs); + *itInstrs = (void *) (memBase + (uintptr_t) *itInstrs); instrument = *itInstrs; if (instrument->loaded == FALSE) { @@ -392,7 +392,7 @@ void func_8031784C(struct AudioBank *mem, u8 *offset, u32 numInstruments, u32 nu INIT_SOUND(instrument->highNotesSound); instrument->loaded = TRUE; - instrument->envelope = (void *) (memBase + (u32) instrument->envelope); + instrument->envelope = (void *) (memBase + (uintptr_t) instrument->envelope); } } itInstrs++; @@ -424,10 +424,10 @@ struct AudioBank *bank_load_immediate(s32 bankId, s32 arg1) { return NULL; } - audio_dma_copy_immediate((u32) ctlData, buf, 0x10); + audio_dma_copy_immediate((uintptr_t) ctlData, buf, 0x10); numInstruments = buf[0]; numDrums = buf[1]; - audio_dma_copy_immediate((u32)(ctlData + 0x10), ret, alloc); + audio_dma_copy_immediate((uintptr_t)(ctlData + 0x10), ret, alloc); func_8031784C(ret, gAlTbl->seqArray[bankId].offset, numInstruments, numDrums); gCtlEntries[bankId].numInstruments = (u8) numInstruments; gCtlEntries[bankId].numDrums = (u8) numDrums; @@ -442,7 +442,7 @@ struct AudioBank *bank_load_async(s32 bankId, s32 arg1, struct SequencePlayer *s UNUSED u32 pad1[2]; u32 buf[4]; UNUSED u32 pad2; - s32 alloc; + size_t alloc; struct AudioBank *ret; u8 *ctlData; OSMesgQueue *mesgQueue; @@ -456,7 +456,7 @@ struct AudioBank *bank_load_async(s32 bankId, s32 arg1, struct SequencePlayer *s return NULL; } - audio_dma_copy_immediate((u32) ctlData, buf, 0x10); + audio_dma_copy_immediate((uintptr_t) ctlData, buf, 0x10); numInstruments = buf[0]; numDrums = buf[1]; seqPlayer->loadingBankId = (u8) bankId; @@ -464,7 +464,7 @@ struct AudioBank *bank_load_async(s32 bankId, s32 arg1, struct SequencePlayer *s seqPlayer->loadingBankNumDrums = numDrums; seqPlayer->bankDmaCurrMemAddr = (u8 *) ret; seqPlayer->loadingBank = ret; - seqPlayer->bankDmaCurrDevAddr = (u32)(ctlData + 0x10); + seqPlayer->bankDmaCurrDevAddr = (uintptr_t)(ctlData + 0x10); seqPlayer->bankDmaRemaining = alloc; mesgQueue = &seqPlayer->bankDmaMesgQueue; osCreateMesgQueue(mesgQueue, &seqPlayer->bankDmaMesg, 1); @@ -489,7 +489,7 @@ void *sequence_dma_immediate(s32 seqId, s32 arg1) { return NULL; } - audio_dma_copy_immediate((u32) seqData, ptr, seqLength); + audio_dma_copy_immediate((uintptr_t) seqData, ptr, seqLength); gSeqLoadStatus[seqId] = SOUND_LOAD_STATUS_COMPLETE; return ptr; } @@ -510,15 +510,15 @@ void *sequence_dma_async(s32 seqId, s32 arg1, struct SequencePlayer *seqPlayer) if (seqLength <= 0x40) { // Immediately load short sequenece - audio_dma_copy_immediate((u32) seqData, ptr, seqLength); + audio_dma_copy_immediate((uintptr_t) seqData, ptr, seqLength); gSeqLoadStatus[seqId] = SOUND_LOAD_STATUS_COMPLETE; } else { - audio_dma_copy_immediate((u32) seqData, ptr, 0x40); + audio_dma_copy_immediate((uintptr_t) seqData, ptr, 0x40); mesgQueue = &seqPlayer->seqDmaMesgQueue; osCreateMesgQueue(mesgQueue, &seqPlayer->seqDmaMesg, 1); seqPlayer->seqDmaMesg = NULL; seqPlayer->seqDmaInProgress = TRUE; - audio_dma_copy_async((u32)(seqData + 0x40), (u8 *) ptr + 0x40, seqLength - 0x40, mesgQueue, + audio_dma_copy_async((uintptr_t)(seqData + 0x40), (u8 *) ptr + 0x40, seqLength - 0x40, mesgQueue, &seqPlayer->seqDmaIoMesg); gSeqLoadStatus[seqId] = SOUND_LOAD_STATUS_IN_PROGRESS; } @@ -702,7 +702,7 @@ void audio_init() { } i = 0; - lim3 = ((u32) &gAudioGlobalsEndMarker - (u32) &gAudioGlobalsStartMarker) / 8; + lim3 = ((uintptr_t) &gAudioGlobalsEndMarker - (uintptr_t) &gAudioGlobalsStartMarker) / 8; ptr64 = &gAudioGlobalsStartMarker - 1; for (k = lim3; k >= 0; k--) { i++; @@ -741,36 +741,36 @@ void audio_init() { // Load header for sequence data (assets/music_data.sbk.s) gSeqFileHeader = (ALSeqFile *) buf; data = gMusicData; - audio_dma_copy_immediate((u32) data, gSeqFileHeader, 0x10); + audio_dma_copy_immediate((uintptr_t) data, gSeqFileHeader, 0x10); gSequenceCount = gSeqFileHeader->seqCount; size = ALIGN16(gSequenceCount * sizeof(ALSeqData) + 4); gSeqFileHeader = soundAlloc(&gSoundPool, size); - audio_dma_copy_immediate((u32) data, gSeqFileHeader, size); + audio_dma_copy_immediate((uintptr_t) data, gSeqFileHeader, size); alSeqFileNew(gSeqFileHeader, data); // Load header for CTL (assets/sound_data.ctl.s, i.e. ADSR) gAlCtlHeader = (ALSeqFile *) buf; data = gSoundDataADSR; - audio_dma_copy_immediate((u32) data, gAlCtlHeader, 0x10); + audio_dma_copy_immediate((uintptr_t) data, gAlCtlHeader, 0x10); size = gAlCtlHeader->seqCount * sizeof(ALSeqData) + 4; size = ALIGN16(size); gCtlEntries = soundAlloc(&gSoundPool, gAlCtlHeader->seqCount * sizeof(struct CtlEntry)); gAlCtlHeader = soundAlloc(&gSoundPool, size); - audio_dma_copy_immediate((u32) data, gAlCtlHeader, size); + audio_dma_copy_immediate((uintptr_t) data, gAlCtlHeader, size); alSeqFileNew(gAlCtlHeader, data); // Load header for TBL (assets/sound_data.tbl.s, i.e. raw data) gAlTbl = (ALSeqFile *) buf; - audio_dma_copy_immediate((u32) data, gAlTbl, 0x10); + audio_dma_copy_immediate((uintptr_t) data, gAlTbl, 0x10); size = gAlTbl->seqCount * sizeof(ALSeqData) + 4; size = ALIGN16(size); gAlTbl = soundAlloc(&gSoundPool, size); - audio_dma_copy_immediate((u32) gSoundDataRaw, gAlTbl, size); + audio_dma_copy_immediate((uintptr_t) gSoundDataRaw, gAlTbl, size); alSeqFileNew(gAlTbl, gSoundDataRaw); // Load bank sets for each sequence (assets/bank_sets.s) gAlBankSets = soundAlloc(&gSoundPool, 0x100); - audio_dma_copy_immediate((u32) gBankSetsData, gAlBankSets, 0x100); + audio_dma_copy_immediate((uintptr_t) gBankSetsData, gAlBankSets, 0x100); func_8031D4B8(); gAudioLoadLock = AUDIO_LOCK_NOT_LOADING; diff --git a/src/audio/load.h b/src/audio/load.h index fef597b..eb3b320 100644 --- a/src/audio/load.h +++ b/src/audio/load.h @@ -8,7 +8,7 @@ #define PRELOAD_BANKS 2 #define PRELOAD_SEQUENCE 1 -#define IS_SEQUENCE_CHANNEL_VALID(ptr) ((u32)(ptr) != (u32)&gSequenceChannelNone) +#define IS_SEQUENCE_CHANNEL_VALID(ptr) ((uintptr_t)(ptr) != (uintptr_t)&gSequenceChannelNone) extern struct Note *gNotes; @@ -36,11 +36,11 @@ extern u32 gSampleDmaNumListItems; extern ALSeqFile *gAlTbl; extern u8 *gAlBankSets; -void audio_dma_partial_copy_async(u32 *devAddr, u8 **vAddr, s32 *remaining, OSMesgQueue *queue, OSIoMesg *mesg); +void audio_dma_partial_copy_async(uintptr_t *devAddr, u8 **vAddr, ssize_t *remaining, OSMesgQueue *queue, OSIoMesg *mesg); void decrease_sample_dma_ttls(void); -void *dma_sample_data(u8 *arg0, u32 arg1, s32 arg2, u8 *arg3); +void *dma_sample_data(u8 *devAddr, u32 size, s32 arg2, u8 *arg3); void func_8031758C(s32 arg0); -void func_8031784C(struct AudioBank *arg0, u8 *offset, u32 arg2, u32 arg3); +void func_8031784C(struct AudioBank *mem, u8 *offset, u32 numInstruments, u32 numDrums); void preload_sequence(u32 seqId, u8 preloadMask); void load_sequence(u32 player, u32 seqId, s32 loadAsync); diff --git a/src/audio/memory.c b/src/audio/memory.c index 4da1aee..e0e12e8 100644 --- a/src/audio/memory.c +++ b/src/audio/memory.c @@ -109,7 +109,7 @@ void *soundAlloc(struct SoundAllocPool *pool, u32 size) { } void func_80316094(struct SoundAllocPool *pool, void *arg1, u32 arg2) { - pool->cur = pool->start = (u8 *) (((u32) arg1 + 0xf) & -0x10); + pool->cur = pool->start = (u8 *) (((uintptr_t) arg1 + 0xf) & -0x10); pool->size = arg2; pool->unused = 0; } @@ -376,27 +376,24 @@ void func_803168CC(void) { void wait_for_audio_frames(s32 frames) { gActiveAudioFrames = 0; // Sound thread will update gActiveAudioFrames - while (gActiveAudioFrames < frames) { /* spin */ + while (gActiveAudioFrames < frames) { + // spin } } -#ifdef NON_MATCHING -#define frames s1 void func_80316928(struct Struct80332190 *arg0) { - // Wrong regalloc, and a lui which is too far up. - s32 sp2C; + s8 updatesPerFrame; s16 *mem; - s32 i; // s0 + s32 sp2C; + s32 i; s32 j; s32 k; s32 persistentMem; s32 temporaryMem; s32 totalMem; s32 wantMisc; - s32 s1; - s8 temp8; - s32 size; - UNUSED s32 temp; + s32 frames; + s32 remainingDmas; if (gAudioLoadLock != AUDIO_LOCK_UNINITIALIZED) { func_803168CC(); @@ -412,7 +409,7 @@ void func_80316928(struct Struct80332190 *arg0) { for (;;) { wait_for_audio_frames(1); frames++; - if (frames > 8 * 30) { + if (frames > 4 * 60) { // Break after 4 seconds break; } @@ -433,11 +430,11 @@ void func_80316928(struct Struct80332190 *arg0) { gAudioLoadLock = AUDIO_LOCK_LOADING; wait_for_audio_frames(3); - s1 = gCurrAudioFrameDmaCount; - while (s1 > 0) { + remainingDmas = gCurrAudioFrameDmaCount; + while (remainingDmas > 0) { for (i = 0; i < gCurrAudioFrameDmaCount; i++) { if (osRecvMesg(&gCurrAudioFrameDmaQueue, NULL, OS_MESG_NOBLOCK) == 0) - s1--; + remainingDmas--; } } gCurrAudioFrameDmaCount = 0; @@ -453,8 +450,7 @@ void func_80316928(struct Struct80332190 *arg0) { sp2C = arg0->unk6; gAiFrequency = osAiSetFrequency(arg0->frequency); gMaxSimultaneousNotes = arg0->maxSimultaneousNotes; - size = gAiFrequency / 60; - D_80226D74 = ALIGN16(size); + D_80226D74 = ALIGN16(gAiFrequency / 60); D_802212A2 = arg0->unk5; switch (D_802212A2) { @@ -480,21 +476,22 @@ void func_80316928(struct Struct80332190 *arg0) { D_802212A2 = arg0->unk5; D_802212A0 = arg0->volume; gMinAiBufferLength = D_80226D74 - 0x10; - temp8 = D_80226D74 / 160 + 1; - gAudioUpdatesPerFrame = temp8; + updatesPerFrame = D_80226D74 / 160 + 1; + gAudioUpdatesPerFrame = D_80226D74 / 160 + 1; + // Compute conversion ratio from the internal unit tatums/tick to the // external beats/minute (JP) or tatums/minute (US). In practice this is // 300 on JP and 14360 on US. #ifdef VERSION_JP - gTempoInternalToExternal = temp8 * 3600 / gTatumsPerBeat; + gTempoInternalToExternal = updatesPerFrame * 3600 / gTatumsPerBeat; #else - gTempoInternalToExternal = (u32)(temp8 * 2880000.0f / gTatumsPerBeat / 16.713f); + gTempoInternalToExternal = (u32)(updatesPerFrame * 2880000.0f / gTatumsPerBeat / 16.713f); #endif - D_80226D6C = gMaxSimultaneousNotes * 20 * temp8 + 320; + + D_80226D6C = gMaxSimultaneousNotes * 20 * updatesPerFrame + 320; persistentMem = arg0->persistentBankMem + arg0->persistentSeqMem; temporaryMem = arg0->temporaryBankMem + arg0->temporarySeqMem; totalMem = persistentMem + temporaryMem; - // (the address of D_802212A8.size is lui'd too far up) wantMisc = D_802212A8.size - totalMem - 0x100; D_80221898.wantSeq = wantMisc; D_80221898.wantCustom = totalMem; @@ -556,9 +553,3 @@ void func_80316928(struct Struct80332190 *arg0) { gAudioLoadLock = AUDIO_LOCK_NOT_LOADING; } } - -#elif defined(VERSION_JP) -GLOBAL_ASM("asm/non_matchings/func_80316928_jp.s") -#else -GLOBAL_ASM("asm/non_matchings/func_80316928_us.s") -#endif diff --git a/src/audio/seqplayer.c b/src/audio/seqplayer.c index e67cc37..f111eea 100644 --- a/src/audio/seqplayer.c +++ b/src/audio/seqplayer.c @@ -491,11 +491,11 @@ void seq_channel_layer_process_script(struct SequenceChannelLayer *layer) { } temp_v0_11 = &layer->adsr; - if (((u32) gBankLoadedPool.persistent.pool.start <= (u32) inst - && (u32) inst <= (u32)(gBankLoadedPool.persistent.pool.start + if (((uintptr_t) gBankLoadedPool.persistent.pool.start <= (uintptr_t) inst + && (uintptr_t) inst <= (uintptr_t)(gBankLoadedPool.persistent.pool.start + gBankLoadedPool.persistent.pool.size)) - || ((u32) gBankLoadedPool.temporary.pool.start <= (u32) inst - && (u32) inst <= (u32)(gBankLoadedPool.temporary.pool.start + || ((uintptr_t) gBankLoadedPool.temporary.pool.start <= (uintptr_t) inst + && (uintptr_t) inst <= (uintptr_t)(gBankLoadedPool.temporary.pool.start + gBankLoadedPool.temporary.pool.size))) { temp_v0_11->envelope = inst->envelope; temp_v0_11->releaseRate = inst->releaseRate; @@ -802,11 +802,11 @@ u8 get_instrument(struct SequenceChannel *seqChannel, u8 instId, struct Instrume } } - if (((u32) gBankLoadedPool.persistent.pool.start <= (u32) inst - && (u32) inst - <= (u32)(gBankLoadedPool.persistent.pool.start + gBankLoadedPool.persistent.pool.size)) - || ((u32) gBankLoadedPool.temporary.pool.start <= (u32) inst - && (u32) inst <= (u32)(gBankLoadedPool.temporary.pool.start + if (((uintptr_t) gBankLoadedPool.persistent.pool.start <= (uintptr_t) inst + && (uintptr_t) inst <= (uintptr_t)(gBankLoadedPool.persistent.pool.start + + gBankLoadedPool.persistent.pool.size)) + || ((uintptr_t) gBankLoadedPool.temporary.pool.start <= (uintptr_t) inst + && (uintptr_t) inst <= (uintptr_t)(gBankLoadedPool.temporary.pool.start + gBankLoadedPool.temporary.pool.size))) { adsr->envelope = inst->envelope; adsr->releaseRate = inst->releaseRate; diff --git a/src/audio/synthesis.c b/src/audio/synthesis.c index b88d014..9312dc0 100644 --- a/src/audio/synthesis.c +++ b/src/audio/synthesis.c @@ -10,18 +10,17 @@ #define aSetLoadBufferPair(pkt, c, off) \ aSetBuffer(pkt, 0, c + 0x740, 0, 0x140 - c); \ - aLoadBuffer(pkt, FIX(&D_802211B0.unk14.unk00[off])); \ + aLoadBuffer(pkt, VIRTUAL_TO_PHYSICAL2(&D_802211B0.unk14.unk00[off])); \ aSetBuffer(pkt, 0, c + 0x880, 0, 0x140 - c); \ - aLoadBuffer(pkt, FIX(&D_802211B0.unk14.unk04[off])); + aLoadBuffer(pkt, VIRTUAL_TO_PHYSICAL2(&D_802211B0.unk14.unk04[off])); #define aSetSaveBufferPair(pkt, c, d, off) \ aSetBuffer(pkt, 0, 0, c + 0x740, d); \ - aSaveBuffer(pkt, FIX(&D_802211B0.unk14.unk00[off])); \ + aSaveBuffer(pkt, VIRTUAL_TO_PHYSICAL2(&D_802211B0.unk14.unk00[off])); \ aSetBuffer(pkt, 0, 0, c + 0x880, d); \ - aSaveBuffer(pkt, FIX(&D_802211B0.unk14.unk04[off])); + aSaveBuffer(pkt, VIRTUAL_TO_PHYSICAL2(&D_802211B0.unk14.unk04[off])); #define ALIGN(val, amnt) (((val) + (1 << amnt) - 1) & ~((1 << amnt) - 1)) -#define FIX(a) (u16 *) ((u8 *) (a) + 0x80000000U) struct Struct802211B0 D_802211B0; u8 sAudioSynthesisPad[0x20]; @@ -174,9 +173,9 @@ u64 *func_80313E54(u16 *aiBuf, s32 bufLen, u64 *cmd, u32 updateIndex) { aSetLoadBufferPair(cmd++, ra, 0); } aSetBuffer(cmd++, 0, t4 + 0x740, 0x4c0, bufLen << 1); - aResample(cmd++, D_802211B0.unk0, (u16) D_802211B0.unk6, FIX(D_802211B0.unk1C)); + aResample(cmd++, D_802211B0.unk0, (u16) D_802211B0.unk6, VIRTUAL_TO_PHYSICAL2(D_802211B0.unk1C)); aSetBuffer(cmd++, 0, t4 + 0x880, 0x600, bufLen << 1); - aResample(cmd++, D_802211B0.unk0, (u16) D_802211B0.unk6, FIX(D_802211B0.unk20)); + aResample(cmd++, D_802211B0.unk0, (u16) D_802211B0.unk6, VIRTUAL_TO_PHYSICAL2(D_802211B0.unk20)); aSetBuffer(cmd++, 0, 0, 0, 0x280); aMix(cmd++, 0, /*gain*/ D_802211B0.unk4 + 32768, /*in*/ 0x4c0, /*out*/ 0x4c0); aDMEMMove(cmd++, 0x4c0, 0x740, 0x280); @@ -189,7 +188,7 @@ u64 *func_80313E54(u16 *aiBuf, s32 bufLen, u64 *cmd, u32 updateIndex) { } } else { aSetBuffer(cmd++, 0, 0, 0x740, 0x280); - aSaveBuffer(cmd++, FIX(D_802211B0.unk2C[D_802211B0.unk3][updateIndex].unk4)); + aSaveBuffer(cmd++, VIRTUAL_TO_PHYSICAL2(D_802211B0.unk2C[D_802211B0.unk3][updateIndex].unk4)); D_802211B0.unk0 = 0; } } @@ -324,7 +323,7 @@ u64 *func_80314480(u16 *aiBuf, s32 bufLen, u64 *cmd) { u32 v1; sp15C = sp164->book->book; v1 = sp164->book->order * sp164->book->npredictors; - aLoadADPCM(cmd++, v1 * 16, FIX(sp15C)); + aLoadADPCM(cmd++, v1 * 16, VIRTUAL_TO_PHYSICAL2(sp15C)); } while (fp != t5) { @@ -369,27 +368,27 @@ u64 *func_80314480(u16 *aiBuf, s32 bufLen, u64 *cmd) { // maybe keep a var for t0 * 9? v0_2 = dma_sample_data(sp120 + (s7->unk14 - s2 + 0x10) / 16 * 9, t0 * 9, sp148, &s7->sampleDmaIndex); - a3 = (u32) v0_2 & 0xf; + a3 = (u32)((uintptr_t) v0_2 & 0xf); aSetBuffer(cmd++, 0, 0x3f0, 0, t0 * 9 + a3); - aLoadBuffer(cmd++, FIX(v0_2 - a3)); + aLoadBuffer(cmd++, VIRTUAL_TO_PHYSICAL2(v0_2 - a3)); } else { s0 = 0; a3 = 0; } if (s7->unk0b20 != 0) { - aSetLoop(cmd++, FIX(sp164->loop->state)); + aSetLoop(cmd++, VIRTUAL_TO_PHYSICAL2(sp164->loop->state)); sp148 = A_LOOP; // = 2 s7->unk0b20 = 0; } if (fp == 0) { aSetBuffer(cmd++, 0, a3 + 0x3f0, 0x180, s0 * 2); - aADPCMdec(cmd++, sp148, FIX(s7->unk34->unk00)); + aADPCMdec(cmd++, sp148, VIRTUAL_TO_PHYSICAL2(s7->unk34->unk00)); sp130 = s2 * 2; } else { aSetBuffer(cmd++, 0, a3 + 0x3f0, ALIGN(s5, 5) + 0x180, s0 * 2); - aADPCMdec(cmd++, sp148, FIX(s7->unk34->unk00)); + aADPCMdec(cmd++, sp148, VIRTUAL_TO_PHYSICAL2(s7->unk34->unk00)); aDMEMMove(cmd++, ALIGN(s5, 5) + (s2 * 2) + 0x180, s5 + 0x180, (s0 + s6_2 - s3) * 2); } @@ -440,7 +439,7 @@ u64 *func_80314480(u16 *aiBuf, s32 bufLen, u64 *cmd) { switch (spE4) { case 0: aSetBuffer(cmd++, 0, sp130 + 0x180, 0x20, t5 + 4); - aResample(cmd++, 0x1, 0xff60, FIX(s7->unk34->unkF0)); + aResample(cmd++, 0x1, 0xff60, VIRTUAL_TO_PHYSICAL2(s7->unk34->unkF0)); spD8 = t5 + 4; spD6 = 36; if (s7->unk0b10 != 0) { @@ -450,7 +449,7 @@ u64 *func_80314480(u16 *aiBuf, s32 bufLen, u64 *cmd) { case 1: aSetBuffer(cmd++, 0, sp130 + 0x180, 0x160, t5 + 8); - aResample(cmd++, 0x1, 0xff60, FIX(s7->unk34->unkF0)); + aResample(cmd++, 0x1, 0xff60, VIRTUAL_TO_PHYSICAL2(s7->unk34->unkF0)); aDMEMMove(cmd++, 0x164, spD8 + 0x20, t5 + 4); break; } @@ -494,7 +493,7 @@ u64 *func_80314480(u16 *aiBuf, s32 bufLen, u64 *cmd) { aInterleave(cmd++, 0x4c0, 0x600); t9 *= 2; aSetBuffer(cmd++, 0, 0, 0, t9); - aSaveBuffer(cmd++, FIX(aiBuf)); + aSaveBuffer(cmd++, VIRTUAL_TO_PHYSICAL2(aiBuf)); return cmd; } @@ -509,7 +508,7 @@ u64 *func_80314F08(u64 *cmd, struct Note *note, s32 arg2) { s32 i; aSetBuffer(cmd++, /*flags*/ 0, /*dmemin*/ 0x180, /*dmemout*/ 0, /*count*/ sizeof(note->unk34->samples)); // interesting that it's 128... - aLoadBuffer(cmd++, FIX(note->unk34->samples)); + aLoadBuffer(cmd++, VIRTUAL_TO_PHYSICAL2(note->unk34->samples)); note->unk14 = (note->sampleCount - 1) & note->unk14; a3 = 64 - note->unk14; if (a3 < arg2) { @@ -525,7 +524,7 @@ u64 *func_80314F08(u64 *cmd, struct Note *note, s32 arg2) { u64 *func_80314FD4(u64 *cmd, struct Note *note, s32 arg2, u16 arg3, u16 arg4, u32 arg5) { aSetBuffer(cmd++, 0, arg4, 0, arg2); - aResample(cmd++, arg5, arg3, FIX(note->unk34->unk20)); + aResample(cmd++, arg5, arg3, VIRTUAL_TO_PHYSICAL2(note->unk34->unk20)); return cmd; } @@ -593,7 +592,7 @@ u64 *func_80315094(u64 *cmd, struct Note *note, s32 arg2, u16 arg3, s32 arg4, aSetVolume(cmd++, A_AUX, D_802212A0, 0, note->reverbVol); } if (D_802211B0.unk1 && note->reverb) { - aEnvMixer(cmd++, mixerFlags | A_AUX, FIX(note->unk34->unk40)); + aEnvMixer(cmd++, mixerFlags | A_AUX, VIRTUAL_TO_PHYSICAL2(note->unk34->unk40)); if (note->stereoStrongRight) { aSetBuffer(cmd++, 0, 0, 0, arg2 * 2); aMix(cmd++, 0, /*gain*/ 0x8000, /*in*/ 0x200, /*out*/ 0x4c0); @@ -604,7 +603,7 @@ u64 *func_80315094(u64 *cmd, struct Note *note, s32 arg2, u16 arg3, s32 arg4, aMix(cmd++, 0, /*gain*/ 0x8000, /*in*/ 0x340, /*out*/ 0x880); } } else { - aEnvMixer(cmd++, mixerFlags, FIX(note->unk34->unk40)); + aEnvMixer(cmd++, mixerFlags, VIRTUAL_TO_PHYSICAL2(note->unk34->unk40)); if (note->stereoStrongRight) { aSetBuffer(cmd++, 0, 0, 0, arg2 * 2); aMix(cmd++, 0, /*gain*/ 0x8000, /*in*/ 0x200, /*out*/ 0x4c0); @@ -649,20 +648,20 @@ u64 *func_803155F4(u64 *cmd, struct Note *note, s32 arg2, s32 arg3, s32 leftRigh aClearBuffer(cmd++, 8, 8); aDMEMMove(cmd++, 0x200, 0x10, 0x10); aSetBuffer(cmd++, 0, 0, 0, 32); - aSaveBuffer(cmd++, FIX(note->unk34->unk90)); + aSaveBuffer(cmd++, VIRTUAL_TO_PHYSICAL2(note->unk34->unk90)); pitch = (arg2 << 0xf) / (panVolume + arg2 - prevPanVolume + 8); aSetBuffer(cmd++, 0, 0x208, 0, panVolume + arg2 - prevPanVolume); - aResample(cmd++, 0, pitch, FIX(note->unk34->unk90)); + aResample(cmd++, 0, pitch, VIRTUAL_TO_PHYSICAL2(note->unk34->unk90)); } else { pitch = (panVolume == 0) ? (arg2 << 0xf) / (arg2 - prevPanVolume - 4) : (arg2 << 0xf) / (arg2 + panVolume - prevPanVolume); aSetBuffer(cmd++, 0, 0x200, 0, panVolume + arg2 - prevPanVolume); - aResample(cmd++, 0, pitch, FIX(note->unk34->unk90)); + aResample(cmd++, 0, pitch, VIRTUAL_TO_PHYSICAL2(note->unk34->unk90)); } if (prevPanVolume != 0) { aSetBuffer(cmd++, 0, 0x200, 0, prevPanVolume); - aLoadBuffer(cmd++, FIX(note->unk34->unkB0)); + aLoadBuffer(cmd++, VIRTUAL_TO_PHYSICAL2(note->unk34->unkB0)); aDMEMMove(cmd++, 0, prevPanVolume + 0x200, panVolume + arg2 - prevPanVolume); } else { aDMEMMove(cmd++, 0, 0x200, panVolume + arg2 - prevPanVolume); @@ -675,7 +674,7 @@ u64 *func_803155F4(u64 *cmd, struct Note *note, s32 arg2, s32 arg3, s32 leftRigh if (panVolume) { aSetBuffer(cmd++, 0, 0, arg2 + 0x200, panVolume); - aSaveBuffer(cmd++, FIX(note->unk34->unkB0)); + aSaveBuffer(cmd++, VIRTUAL_TO_PHYSICAL2(note->unk34->unkB0)); } aSetBuffer(cmd++, 0, 0, 0, arg2); diff --git a/src/game/buffers.c b/src/buffers/buffers.c similarity index 100% rename from src/game/buffers.c rename to src/buffers/buffers.c diff --git a/src/game/buffers.h b/src/buffers/buffers.h similarity index 89% rename from src/game/buffers.h rename to src/buffers/buffers.h index ffe0db7..4196824 100644 --- a/src/game/buffers.h +++ b/src/buffers/buffers.h @@ -2,8 +2,8 @@ #define BUFFERS_H #include "types.h" -#include "save_file.h" -#include "display.h" +#include "game/save_file.h" +#include "game/display.h" extern u8 gDecompressionHeap[]; diff --git a/src/engine/behavior_script.c b/src/engine/behavior_script.c index f46e991..6ae32ad 100644 --- a/src/engine/behavior_script.c +++ b/src/engine/behavior_script.c @@ -16,8 +16,8 @@ static u16 gRandomSeed16; // unused -static void func_80383B70(u32 segptr) { - gBehCommand = segmented_to_virtual((void *) segptr); +static void func_80383B70(void *segptr) { + gBehCommand = segmented_to_virtual(segptr); gCurrentObject->stackIndex = 0; } @@ -72,13 +72,13 @@ void func_80383D68(struct Object *object) { object->header.gfx.angle[2] = object->oFaceAngleRoll & 0xFFFF; } -static void cur_object_stack_push(u32 value) { +static void cur_object_stack_push(uintptr_t value) { gCurrentObject->stack[gCurrentObject->stackIndex] = value; gCurrentObject->stackIndex++; } -static u32 cur_object_stack_pop(void) { - u32 value; +static uintptr_t cur_object_stack_pop(void) { + uintptr_t value; gCurrentObject->stackIndex--; value = gCurrentObject->stack[gCurrentObject->stackIndex]; return value; @@ -117,7 +117,7 @@ static s32 beh_cmd_graph_node(void) { } static s32 beh_cmd_obj_load_chill(void) { - u32 model = gBehCommand[1]; + u32 model = (u32) gBehCommand[1]; void *arg1 = (void *) gBehCommand[2]; struct Object *object = spawn_object_at_origin(gCurrentObject, 0, model, arg1); @@ -129,7 +129,7 @@ static s32 beh_cmd_obj_load_chill(void) { } static s32 beh_cmd_obj_spawn(void) { - u32 model = gBehCommand[1]; + u32 model = (u32) gBehCommand[1]; void *arg1 = (void *) gBehCommand[2]; struct Object *object = spawn_object_at_origin(gCurrentObject, 0, model, arg1); @@ -144,7 +144,7 @@ static s32 beh_cmd_obj_spawn(void) { static s32 beh_cmd_obj_load_chill_param(void) { u32 behParam = (s16)(gBehCommand[0] & 0xFFFF); - u32 model = gBehCommand[1]; + u32 model = (u32) gBehCommand[1]; void *arg2 = (void *) gBehCommand[2]; struct Object *object = spawn_object_at_origin(gCurrentObject, 0, model, arg2); @@ -172,23 +172,23 @@ static s32 beh_cmd_break2(void) { } static s32 beh_cmd_call(void) { - u32 *jumpAddress; + uintptr_t *jumpAddress; gBehCommand++; - cur_object_stack_push((u32)(gBehCommand + 1)); - jumpAddress = (u32 *) segmented_to_virtual((void *) gBehCommand[0]); + cur_object_stack_push((uintptr_t)(gBehCommand + 1)); + jumpAddress = segmented_to_virtual((void *) gBehCommand[0]); gBehCommand = jumpAddress; return BEH_CONTINUE; } static s32 beh_cmd_return(void) { - gBehCommand = (u32 *) cur_object_stack_pop(); + gBehCommand = (uintptr_t *) cur_object_stack_pop(); return BEH_CONTINUE; } static s32 beh_cmd_delay(void) { - s16 arg0 = gBehCommand[0] & 0xFFFF; + s16 arg0 = (s16)(gBehCommand[0] & 0xFFFF); if (gCurrentObject->unk1F4 < arg0 - 1) { gCurrentObject->unk1F4++; @@ -201,7 +201,7 @@ static s32 beh_cmd_delay(void) { } static s32 beh_cmd_delay_var(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); s32 arg0 = cur_object_get_int(objectOffset); if (gCurrentObject->unk1F4 < (arg0 - 1)) { @@ -216,7 +216,7 @@ static s32 beh_cmd_delay_var(void) { static s32 beh_cmd_goto(void) { gBehCommand++; - gBehCommand = (u32 *) segmented_to_virtual((void *) gBehCommand[0]); + gBehCommand = segmented_to_virtual((void *) gBehCommand[0]); return BEH_CONTINUE; } @@ -224,7 +224,7 @@ static s32 beh_cmd_goto(void) { static s32 Behavior26(void) { s32 value = (u8)(gBehCommand[0] >> 16) & 0xFF; - cur_object_stack_push((u32)(gBehCommand + 1)); + cur_object_stack_push((uintptr_t)(gBehCommand + 1)); cur_object_stack_push(value); gBehCommand++; @@ -235,7 +235,7 @@ static s32 Behavior26(void) { static s32 beh_cmd_begin_repeat(void) { s32 count = (s16)(gBehCommand[0] & 0xFFFF); - cur_object_stack_push((u32)(gBehCommand + 1)); + cur_object_stack_push((uintptr_t)(gBehCommand + 1)); cur_object_stack_push(count); gBehCommand++; @@ -244,12 +244,12 @@ static s32 beh_cmd_begin_repeat(void) { } static s32 beh_cmd_end_repeat(void) { - u32 count = cur_object_stack_pop(); + u32 count = (u32) cur_object_stack_pop(); count--; if (count != 0) { - gBehCommand = (u32 *) cur_object_stack_pop(); - cur_object_stack_push((u32) gBehCommand); + gBehCommand = (uintptr_t *) cur_object_stack_pop(); + cur_object_stack_push((uintptr_t) gBehCommand); cur_object_stack_push(count); } else { cur_object_stack_pop(); @@ -260,12 +260,12 @@ static s32 beh_cmd_end_repeat(void) { } static s32 beh_cmd_end_repeat_nobreak(void) { - u32 count = cur_object_stack_pop(); + u32 count = (u32) cur_object_stack_pop(); count--; if (count != 0) { - gBehCommand = (u32 *) cur_object_stack_pop(); - cur_object_stack_push((u32) gBehCommand); + gBehCommand = (uintptr_t *) cur_object_stack_pop(); + cur_object_stack_push((uintptr_t) gBehCommand); cur_object_stack_push(count); } else { cur_object_stack_pop(); @@ -276,15 +276,15 @@ static s32 beh_cmd_end_repeat_nobreak(void) { } static s32 beh_cmd_begin_loop(void) { - cur_object_stack_push((u32)(gBehCommand + 1)); + cur_object_stack_push((uintptr_t)(gBehCommand + 1)); gBehCommand++; return BEH_CONTINUE; } static s32 beh_cmd_end_loop(void) { - gBehCommand = (u32 *) cur_object_stack_pop(); - cur_object_stack_push((u32) gBehCommand); + gBehCommand = (uintptr_t *) cur_object_stack_pop(); + cur_object_stack_push((uintptr_t) gBehCommand); return BEH_BREAK; } @@ -301,7 +301,7 @@ static s32 beh_cmd_callnative(void) { } static s32 beh_cmd_obj_set_float(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); f32 value = (s16)(gBehCommand[0] & 0xFFFF); cur_object_set_float(objectOffset, value); @@ -311,8 +311,8 @@ static s32 beh_cmd_obj_set_float(void) { } static s32 beh_cmd_obj_set_int(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; - s16 value = gBehCommand[0] & 0xFFFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); + s16 value = (s16)(gBehCommand[0] & 0xFFFF); cur_object_set_int(objectOffset, value); @@ -322,7 +322,7 @@ static s32 beh_cmd_obj_set_int(void) { // unused static s32 Behavior36(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); u32 value = (s16)(gBehCommand[1] & 0xFFFF); cur_object_set_int(objectOffset, value); @@ -332,7 +332,7 @@ static s32 Behavior36(void) { } static s32 beh_cmd_obj_set_float_rand(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); f32 min = (s16)(gBehCommand[0] & 0xFFFF); f32 max = (s16)(gBehCommand[1] >> 16); @@ -343,7 +343,7 @@ static s32 beh_cmd_obj_set_float_rand(void) { } static s32 beh_cmd_obj_set_int_rand(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); s32 min = (s16)(gBehCommand[0] & 0xFFFF); s32 max = (s16)(gBehCommand[1] >> 16); @@ -354,7 +354,7 @@ static s32 beh_cmd_obj_set_int_rand(void) { } static s32 beh_cmd_obj_set_int_rand_rshift(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); s32 min = (s16)(gBehCommand[0] & 0xFFFF); s32 rshift = (s16)(gBehCommand[1] >> 16); @@ -365,7 +365,7 @@ static s32 beh_cmd_obj_set_int_rand_rshift(void) { } static s32 beh_cmd_obj_add_float_rand(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); f32 min = (s16)(gBehCommand[0] & 0xFFFF); f32 max = (s16)(gBehCommand[1] >> 16); @@ -378,7 +378,7 @@ static s32 beh_cmd_obj_add_float_rand(void) { // unused static s32 beh_cmd_obj_add_int_rand_rshift(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); s32 min = (s16)(gBehCommand[0] & 0xFFFF); s32 rshift = (s16)(gBehCommand[1] >> 16); s32 rnd = RandomU16(); @@ -390,7 +390,7 @@ static s32 beh_cmd_obj_add_int_rand_rshift(void) { } static s32 beh_cmd_obj_add_float(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); f32 value = (s16)(gBehCommand[0] & 0xFFFF); cur_object_add_float(objectOffset, value); @@ -400,7 +400,7 @@ static s32 beh_cmd_obj_add_float(void) { } static s32 beh_cmd_obj_add_int(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); s16 value = gBehCommand[0] & 0xFFFF; cur_object_add_int(objectOffset, value); @@ -410,7 +410,7 @@ static s32 beh_cmd_obj_add_int(void) { } static s32 beh_cmd_obj_or_int(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); s32 value = (s16)(gBehCommand[0] & 0xFFFF); value &= 0xFFFF; @@ -422,7 +422,7 @@ static s32 beh_cmd_obj_or_int(void) { // unused static s32 beh_cmd_obj_bit_clear_int(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); s32 value = (s16)(gBehCommand[0] & 0xFFFF); value = (value & 0xFFFF) ^ 0xFFFF; @@ -433,7 +433,7 @@ static s32 beh_cmd_obj_bit_clear_int(void) { } static s32 beh_cmd_obj_set_int32(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); cur_object_set_int(objectOffset, gBehCommand[1]); @@ -443,7 +443,7 @@ static s32 beh_cmd_obj_set_int32(void) { static s32 beh_cmd_obj_animate(void) { s32 animIndex = (u8)((gBehCommand[0] >> 16) & 0xFF); - u32 *animations = gCurrentObject->oAnimations; + struct Animation **animations = gCurrentObject->oAnimations; geo_obj_init_animation((struct GraphNodeObject *) gCurrentObject, &animations[animIndex]); @@ -517,8 +517,8 @@ static s32 beh_cmd_obj_sum_int(void) { } static s32 beh_cmd_set_hitbox(void) { - s16 colSphereX = gBehCommand[1] >> 16; - s16 colSphereY = gBehCommand[1] & 0xFFFF; + s16 colSphereX = (s16)(gBehCommand[1] >> 16); + s16 colSphereY = (s16)(gBehCommand[1] & 0xFFFF); gCurrentObject->hitboxRadius = colSphereX; gCurrentObject->hitboxHeight = colSphereY; @@ -528,8 +528,8 @@ static s32 beh_cmd_set_hitbox(void) { } static s32 beh_cmd_obj_set_float2(void) { - s16 arg0 = gBehCommand[1] >> 16; - s16 arg1 = gBehCommand[1] & 0xFFFF; + s16 arg0 = (s16)(gBehCommand[1] >> 16); + s16 arg1 = (s16)(gBehCommand[1] & 0xFFFF); gCurrentObject->hurtboxRadius = arg0; gCurrentObject->hurtboxHeight = arg1; @@ -539,9 +539,9 @@ static s32 beh_cmd_obj_set_float2(void) { } static s32 beh_cmd_collision_sphere(void) { - s16 colSphereX = gBehCommand[1] >> 16; - s16 colSphereY = gBehCommand[1] & 0xFFFF; - s16 unknown = gBehCommand[2] >> 16; + s16 colSphereX = (s16)(gBehCommand[1] >> 16); + s16 colSphereY = (s16)(gBehCommand[1] & 0xFFFF); + s16 unknown = (s16)(gBehCommand[2] >> 16); gCurrentObject->hitboxRadius = colSphereX; gCurrentObject->hitboxHeight = colSphereY; @@ -576,7 +576,7 @@ static s32 beh_cmd_begin(void) { } static void Unknown8038556C(s32 lastIndex) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); u32 table[16]; s32 i; @@ -604,7 +604,7 @@ static s32 beh_cmd_obj_set_pos(void) { } static s32 beh_cmd_interact_type(void) { - gCurrentObject->oInteractType = gBehCommand[1]; + gCurrentObject->oInteractType = (u32) gBehCommand[1]; gBehCommand += 2; return BEH_CONTINUE; @@ -612,14 +612,14 @@ static s32 beh_cmd_interact_type(void) { // unused static s32 Behavior31(void) { - gCurrentObject->oInteractionSubtype = gBehCommand[1]; + gCurrentObject->oInteractionSubtype = (u32) gBehCommand[1]; gBehCommand += 2; return BEH_CONTINUE; } static s32 beh_cmd_scale(void) { - UNUSED u8 sp1f = (gBehCommand[0] >> 16) & 0xFF; + UNUSED u8 sp1f = (u8)((gBehCommand[0] >> 16) & 0xFF); s16 sp1c = gBehCommand[0] & 0xFFFF; obj_scale((f32) sp1c / 100.0f); @@ -647,7 +647,7 @@ static s32 beh_cmd_obj_set_gravity(void) { } static s32 beh_cmd_obj_bit_clear_int32(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); s32 flags = gBehCommand[1]; flags = flags ^ 0xFFFFFFFF; @@ -666,7 +666,7 @@ static s32 beh_cmd_spawn_addr(void) { } static s32 beh_cmd_text_anim_rate(void) { - u8 objectOffset = (gBehCommand[0] >> 16) & 0xFF; + u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF); s16 arg1 = (gBehCommand[0] & 0xFFFF); if ((gGlobalTimer % arg1) == 0) { diff --git a/src/engine/geo_layout.c b/src/engine/geo_layout.c index 7379fbf..5c45887 100644 --- a/src/engine/geo_layout.c +++ b/src/engine/geo_layout.c @@ -91,7 +91,7 @@ UNUSED s32 D_8038BCA8; struct GraphNode **gGeoViews; u16 gGeoNumViews; // length of gGeoViews array -u32 gGeoLayoutStack[16]; +uintptr_t gGeoLayoutStack[16]; struct GraphNode *gCurGraphNodeList[32]; s16 gCurGraphNodeIndex; s16 gGeoLayoutStackIndex; // similar to SP register in MIPS @@ -107,10 +107,10 @@ u32 unused_8038B894[3] = { 0 }; cmd+0x04: void *branchTarget */ void geo_layout_cmd_branch_and_link(void) { - gGeoLayoutStack[gGeoLayoutStackIndex++] = (u32) &gGeoLayoutCommand[8]; + gGeoLayoutStack[gGeoLayoutStackIndex++] = (uintptr_t) (gGeoLayoutCommand + 4 + sizeof(void *)); gGeoLayoutStack[gGeoLayoutStackIndex++] = (gCurGraphNodeIndex << 16) + gGeoLayoutReturnIndex; gGeoLayoutReturnIndex = gGeoLayoutStackIndex; - gGeoLayoutCommand = (u8 *) segmented_to_virtual((void *) cur_geo_cmd_s32(0x04)); + gGeoLayoutCommand = segmented_to_virtual(cur_geo_cmd_ptr(0x04)); } // 0x01: Terminate geo layout @@ -127,10 +127,10 @@ void geo_layout_cmd_end(void) { */ void geo_layout_cmd_branch(void) { if (cur_geo_cmd_u8(0x01) == 1) { - gGeoLayoutStack[gGeoLayoutStackIndex++] = (u32) &gGeoLayoutCommand[8]; + gGeoLayoutStack[gGeoLayoutStackIndex++] = (uintptr_t) (gGeoLayoutCommand + 4 + sizeof(void *)); } - gGeoLayoutCommand = (u8 *) segmented_to_virtual((void *) cur_geo_cmd_s32(0x04)); + gGeoLayoutCommand = segmented_to_virtual(cur_geo_cmd_ptr(0x04)); } // 0x03: Return from branch @@ -216,8 +216,7 @@ void geo_layout_cmd_node_root(void) { graphNode = init_graph_node_root(gGraphNodePool, NULL, 0, x, y, width, height); // TODO: check type - gGeoViews = - (struct GraphNode **) alloc_only_pool_alloc(gGraphNodePool, gGeoNumViews * sizeof(void *)); + gGeoViews = alloc_only_pool_alloc(gGraphNodePool, gGeoNumViews * sizeof(struct GraphNode *)); graphNode->views = gGeoViews; graphNode->numViews = gGeoNumViews; @@ -263,8 +262,8 @@ void geo_layout_cmd_node_perspective(void) { if (cur_geo_cmd_u8(0x01) != 0) { // optional asm function - frustumFunc = (GraphNodeFunc) cur_geo_cmd_s32(0x08); - gGeoLayoutCommand += 0x04; + frustumFunc = (GraphNodeFunc) cur_geo_cmd_ptr(0x08); + gGeoLayoutCommand += sizeof(void *); } graphNode = init_graph_node_perspective(gGraphNodePool, NULL, (f32) fov, near, far, frustumFunc, 0); @@ -340,12 +339,12 @@ void geo_layout_cmd_node_switch_case(void) { init_graph_node_switch_case(gGraphNodePool, NULL, cur_geo_cmd_s16(0x02), // case which is initially selected 0, - (GraphNodeFunc) cur_geo_cmd_s32(0x04), // case update function + (GraphNodeFunc) cur_geo_cmd_ptr(0x04), // case update function 0); register_scene_graph_node(&graphNode->fnNode.node); - gGeoLayoutCommand += 0x08; + gGeoLayoutCommand += 0x04 + sizeof(void *); } /* @@ -369,13 +368,13 @@ void geo_layout_cmd_node_camera(void) { cmdPos = read_vec3s_to_vec3f(toPos, cmdPos); graphNode = init_graph_node_camera(gGraphNodePool, NULL, fromPos, toPos, - (GraphNodeFunc) cur_geo_cmd_s32(0x10), cur_geo_cmd_s16(0x02)); + (GraphNodeFunc) cur_geo_cmd_ptr(0x10), cur_geo_cmd_s16(0x02)); register_scene_graph_node(&graphNode->fnNode.node); gGeoViews[0] = &graphNode->fnNode.node; - gGeoLayoutCommand += 0x14; + gGeoLayoutCommand += 0x10 + sizeof(void *); } /* @@ -446,7 +445,7 @@ void geo_layout_cmd_node_translation_rotation(void) { if (params & 0x80) { displayList = *(void **) &cmdPos[0]; drawingLayer = params & 0x0F; - cmdPos += 2; + cmdPos += sizeof(void*) / 2; } graphNode = init_graph_node_translation_rotation(gGraphNodePool, NULL, drawingLayer, displayList, @@ -481,7 +480,7 @@ void geo_layout_cmd_node_translation(void) { if (params & 0x80) { displayList = *(void **) &cmdPos[0]; drawingLayer = params & 0x0F; - cmdPos += 2; + cmdPos += sizeof(void*) / 2; } graphNode = @@ -517,7 +516,7 @@ void geo_layout_cmd_node_rotation(void) { if (params & 0x80) { displayList = *(void **) &cmdPos[0]; drawingLayer = params & 0x0F; - cmdPos += 2; + cmdPos += sizeof(void*) / 2; } graphNode = init_graph_node_rotation(gGraphNodePool, NULL, drawingLayer, displayList, sp2c); @@ -544,9 +543,9 @@ void geo_layout_cmd_node_scale(void) { void *displayList = NULL; if (params & 0x80) { - displayList = (void *) cur_geo_cmd_s32(0x08); + displayList = cur_geo_cmd_ptr(0x08); drawingLayer = params & 0x0F; - gGeoLayoutCommand += 0x04; + gGeoLayoutCommand += sizeof(void *); } graphNode = init_graph_node_scale(gGraphNodePool, NULL, drawingLayer, displayList, scale); @@ -573,7 +572,7 @@ void geo_layout_cmd_node_animated_part(void) { struct GraphNodeAnimatedPart *graphNode; Vec3s translation; s32 drawingLayer = cur_geo_cmd_u8(0x01); - void *displayList = (void *) cur_geo_cmd_s32(0x08); + void *displayList = cur_geo_cmd_ptr(0x08); s16 *cmdPos = (s16 *) gGeoLayoutCommand; read_vec3s(translation, &cmdPos[1]); @@ -583,7 +582,7 @@ void geo_layout_cmd_node_animated_part(void) { register_scene_graph_node(&graphNode->node); - gGeoLayoutCommand += 0x0C; + gGeoLayoutCommand += 0x08 + sizeof(void *); } /* @@ -609,7 +608,7 @@ void geo_layout_cmd_node_billboard(void) { if (params & 0x80) { displayList = *(void **) &cmdPos[0]; drawingLayer = params & 0x0F; - cmdPos += 2; + cmdPos += sizeof(void*) / 2; } graphNode = init_graph_node_billboard(gGraphNodePool, NULL, drawingLayer, displayList, translation); @@ -627,13 +626,13 @@ void geo_layout_cmd_node_billboard(void) { void geo_layout_cmd_node_display_list(void) { struct GraphNodeDisplayList *graphNode; s32 drawingLayer = cur_geo_cmd_u8(0x01); - void *displayList = (void *) cur_geo_cmd_s32(0x04); + void *displayList = cur_geo_cmd_ptr(0x04); graphNode = init_graph_node_display_list(gGraphNodePool, NULL, drawingLayer, displayList); register_scene_graph_node(&graphNode->node); - gGeoLayoutCommand += 0x08; + gGeoLayoutCommand += 0x04 + sizeof(void *); } /* @@ -675,12 +674,12 @@ void geo_layout_cmd_node_generated(void) { struct GraphNodeGenerated *graphNode; graphNode = init_graph_node_generated(gGraphNodePool, NULL, - (GraphNodeFunc) cur_geo_cmd_s32(0x04), // asm function + (GraphNodeFunc) cur_geo_cmd_ptr(0x04), // asm function cur_geo_cmd_s16(0x02)); // parameter register_scene_graph_node(&graphNode->fnNode.node); - gGeoLayoutCommand += 0x08; + gGeoLayoutCommand += 0x04 + sizeof(void *); } /* @@ -694,12 +693,12 @@ void geo_layout_cmd_node_background(void) { graphNode = init_graph_node_background( gGraphNodePool, NULL, cur_geo_cmd_s16(0x02), // background ID, or RGBA5551 color if asm function is null - (GraphNodeFunc) cur_geo_cmd_s32(0x04), // asm function + (GraphNodeFunc) cur_geo_cmd_ptr(0x04), // asm function 0); register_scene_graph_node(&graphNode->fnNode.node); - gGeoLayoutCommand += 0x08; + gGeoLayoutCommand += 0x04 + sizeof(void *); } // 0x1A: No operation @@ -749,11 +748,11 @@ void geo_layout_cmd_node_held_obj(void) { read_vec3s(offset, (s16 *) &gGeoLayoutCommand[0x02]); graphNode = init_graph_node_held_object( - gGraphNodePool, NULL, 0, offset, (GraphNodeFunc) cur_geo_cmd_s32(0x08), cur_geo_cmd_u8(0x01)); + gGraphNodePool, NULL, NULL, offset, (GraphNodeFunc) cur_geo_cmd_ptr(0x08), cur_geo_cmd_u8(0x01)); register_scene_graph_node(&graphNode->fnNode.node); - gGeoLayoutCommand += 0x0C; + gGeoLayoutCommand += 0x08 + sizeof(void *); } /* @@ -781,7 +780,7 @@ struct GraphNode *process_geo_layout(struct AllocOnlyPool *pool, void *segptr) { gGeoLayoutStackIndex = 2; gGeoLayoutReturnIndex = 2; // stack index is often copied here? - gGeoLayoutCommand = (u8 *) segmented_to_virtual(segptr); + gGeoLayoutCommand = segmented_to_virtual(segptr); gGraphNodePool = pool; diff --git a/src/engine/geo_layout.h b/src/engine/geo_layout.h index 614133a..0645af9 100644 --- a/src/engine/geo_layout.h +++ b/src/engine/geo_layout.h @@ -19,12 +19,15 @@ #define cur_geo_cmd_u32(offset) \ (*(u32 *) &gGeoLayoutCommand[offset]) +#define cur_geo_cmd_ptr(offset) \ + (*(void **) &gGeoLayoutCommand[offset]) + extern struct AllocOnlyPool *gGraphNodePool; extern struct GraphNode *gCurRootGraphNode; extern UNUSED s32 D_8038BCA8; extern struct GraphNode **gGeoViews; extern u16 gGeoNumViews; -extern u32 gGeoLayoutStack[]; +extern uintptr_t gGeoLayoutStack[]; extern struct GraphNode *gCurGraphNodeList[]; extern s16 gCurGraphNodeIndex; extern s16 gGeoLayoutStackIndex; diff --git a/src/engine/graph_node.c b/src/engine/graph_node.c index 4b9a610..e40c112 100644 --- a/src/engine/graph_node.c +++ b/src/engine/graph_node.c @@ -497,7 +497,8 @@ struct GraphNodeBackground *init_graph_node_background(struct AllocOnlyPool *poo */ struct GraphNodeHeldObject *init_graph_node_held_object(struct AllocOnlyPool *pool, struct GraphNodeHeldObject *graphNode, - s32 objNode, Vec3s translation, + struct GraphNodeObject *objNode, + Vec3s translation, GraphNodeFunc nodeFunc, s32 unused) { if (pool != NULL) { graphNode = alloc_only_pool_alloc(pool, sizeof(struct GraphNodeHeldObject)); @@ -506,7 +507,7 @@ struct GraphNodeHeldObject *init_graph_node_held_object(struct AllocOnlyPool *po if (graphNode != NULL) { init_scene_graph_node_links(&graphNode->fnNode.node, GRAPH_NODE_TYPE_HELD_OBJ); vec3s_copy(graphNode->translation, translation); - graphNode->objNode = (struct GraphNodeObject *) objNode; // assumed type + graphNode->objNode = objNode; graphNode->fnNode.func = nodeFunc; graphNode->unused = unused; @@ -732,13 +733,13 @@ void geo_obj_init_spawninfo(struct GraphNodeObject *graphNode, struct SpawnInfo /** * Initialize the animation of an object node */ -void geo_obj_init_animation(struct GraphNodeObject *graphNode, void *sp34) { - void **animSegmented = segmented_to_virtual(sp34); - struct Animation *anim = segmented_to_virtual(animSegmented[0]); +void geo_obj_init_animation(struct GraphNodeObject *graphNode, struct Animation **animPtrAddr) { + struct Animation **animSegmented = segmented_to_virtual(animPtrAddr); + struct Animation *anim = segmented_to_virtual(*animSegmented); if (graphNode->unk38.curAnim != anim) { graphNode->unk38.curAnim = anim; - graphNode->unk38.animFrame = (anim->unk04) + ((anim->flags & ANIM_FLAG_FORWARD) ? 1 : -1); + graphNode->unk38.animFrame = anim->unk04 + ((anim->flags & ANIM_FLAG_FORWARD) ? 1 : -1); graphNode->unk38.animAccel = 0; graphNode->unk38.animYTrans = 0; } @@ -747,9 +748,9 @@ void geo_obj_init_animation(struct GraphNodeObject *graphNode, void *sp34) { /** * Initialize the animation of an object node */ -void geo_obj_init_animation_accel(struct GraphNodeObject *graphNode, void *sp34, u32 animAccel) { - void **animSegmented = segmented_to_virtual(sp34); - struct Animation *anim = segmented_to_virtual(animSegmented[0]); +void geo_obj_init_animation_accel(struct GraphNodeObject *graphNode, struct Animation **animPtrAddr, u32 animAccel) { + struct Animation **animSegmented = segmented_to_virtual(animPtrAddr); + struct Animation *anim = segmented_to_virtual(*animSegmented); if (graphNode->unk38.curAnim != anim) { graphNode->unk38.curAnim = anim; diff --git a/src/engine/graph_node.h b/src/engine/graph_node.h index 711f5d7..8a9ebaa 100644 --- a/src/engine/graph_node.h +++ b/src/engine/graph_node.h @@ -181,8 +181,9 @@ struct GraphNodeSwitchCase /*0x1E*/ s16 selectedCase; }; -/** GraphNode that specifies the location and aim of the camera. - * When the roll is 0, the up vector is (0, 1, 0). +/** + * GraphNode that specifies the location and aim of the camera. + * When the roll is 0, the up vector is (0, 1, 0). */ struct GraphNodeCamera { @@ -386,7 +387,7 @@ struct GraphNodeObject *init_graph_node_object(struct AllocOnlyPool *pool, struc struct GraphNode *sp20, Vec3f pos, Vec3s angle, Vec3f scale); struct GraphNodeCullingRadius *init_graph_node_culling_radius(struct AllocOnlyPool *pool, struct GraphNodeCullingRadius *sp1c, s16 sp22); -struct GraphNodeAnimatedPart *init_graph_node_animated_part(struct AllocOnlyPool *pool, struct GraphNodeAnimatedPart * graphNode, +struct GraphNodeAnimatedPart *init_graph_node_animated_part(struct AllocOnlyPool *pool, struct GraphNodeAnimatedPart *graphNode, s32 drawingLayer, void *displayList, Vec3s relativePos); struct GraphNodeBillboard *init_graph_node_billboard(struct AllocOnlyPool *pool, struct GraphNodeBillboard *graphNode, s32 drawingLayer, void *displayList, Vec3s sp28); @@ -401,7 +402,7 @@ struct GraphNodeGenerated *init_graph_node_generated(struct AllocOnlyPool *pool, struct GraphNodeBackground *init_graph_node_background(struct AllocOnlyPool *pool, struct GraphNodeBackground *sp1c, u16 sp22, GraphNodeFunc sp24, s32 sp28); struct GraphNodeHeldObject *init_graph_node_held_object(struct AllocOnlyPool *pool, struct GraphNodeHeldObject *sp1c, - s32 sp20, Vec3s sp24, GraphNodeFunc sp28, s32 sp2c); + struct GraphNodeObject *objNode, Vec3s translation, GraphNodeFunc nodeFunc, s32 unused); struct GraphNode *geo_add_child(struct GraphNode *, struct GraphNode *); struct GraphNode *geo_remove_child(struct GraphNode *); @@ -413,8 +414,8 @@ void geo_call_global_function_nodes(struct GraphNode *graphNode, s32 sp1c); void geo_reset_object_node(struct GraphNodeObject *sp20); void geo_obj_init(struct GraphNodeObject *sp18, void *sp1c, Vec3f sp20, Vec3s sp24); void geo_obj_init_spawninfo(struct GraphNodeObject *sp18, struct SpawnInfo *sp1c); -void geo_obj_init_animation(struct GraphNodeObject *, void *); -void geo_obj_init_animation_accel(struct GraphNodeObject *sp30, void *sp34, u32 sp38); +void geo_obj_init_animation(struct GraphNodeObject *graphNode, struct Animation **animPtrAddr); +void geo_obj_init_animation_accel(struct GraphNodeObject *graphNode, struct Animation **animPtrAddr, u32 animAccel); s32 retrieve_animation_index(s32 a0, u16 **a1); diff --git a/src/engine/level_script.c b/src/engine/level_script.c index 5dc1dcb..80411f6 100644 --- a/src/engine/level_script.c +++ b/src/engine/level_script.c @@ -20,7 +20,7 @@ #include "goddard/renderer.h" #include "game/profiler.h" -#define CMD_GET(type, offset) (*(type *) (offset + (u8 *) sCurrentCmd)) +#define CMD_GET(type, offset) (*(type *) ((offset) + (u8 *) sCurrentCmd)) // These are equal #define CMD_NEXT ((struct LevelCommand *) ((u8 *) sCurrentCmd + sCurrentCmd->size)) @@ -34,7 +34,7 @@ struct LevelCommand { enum ScriptStatus { SCRIPT_RUNNING = 1, SCRIPT_PAUSED = 0, SCRIPT_PAUSED2 = -1 }; -static u32 sStack[32]; +static uintptr_t sStack[32]; static struct AllocOnlyPool *sLevelPool = NULL; @@ -43,8 +43,8 @@ static u16 sDelayFrames2 = 0; static s16 sCurrAreaIndex = -1; -static u32 *sStackTop = sStack; -static u32 *sStackBase = NULL; +static uintptr_t *sStackTop = sStack; +static uintptr_t *sStackBase = NULL; static s16 sScriptStatus; static s32 sRegister; @@ -85,32 +85,33 @@ static s32 eval_script_op(s8 op, s32 arg) { static void level_cmd_load_and_execute(void) { main_pool_push_state(); - load_segment(CMD_GET(s16, 2), CMD_GET(void *, 4), CMD_GET(void *, 8), MEMORY_POOL_LEFT); + load_segment(CMD_GET(s16, 2), CMD_GET(void *, 4), CMD_GET(void *, 4 + sizeof(void *)), MEMORY_POOL_LEFT); - *sStackTop++ = (u32) NEXT_CMD; - *sStackTop++ = (u32) sStackBase; + *sStackTop++ = (uintptr_t) NEXT_CMD; + *sStackTop++ = (uintptr_t) sStackBase; sStackBase = sStackTop; - sCurrentCmd = segmented_to_virtual(CMD_GET(void *, 12)); + sCurrentCmd = segmented_to_virtual(CMD_GET(void *, 4 + 2 * sizeof(void *))); } static void level_cmd_exit_and_execute(void) { - void *targetAddr = CMD_GET(void *, 12); + void *targetAddr = CMD_GET(void *, 4 + 2 * sizeof(void *)); main_pool_pop_state(); main_pool_push_state(); - load_segment(CMD_GET(s16, 2), CMD_GET(void *, 4), CMD_GET(void *, 8), MEMORY_POOL_LEFT); + load_segment(CMD_GET(s16, 2), CMD_GET(void *, 4), CMD_GET(void *, 4 + sizeof(void *)), + MEMORY_POOL_LEFT); sStackTop = sStackBase; - sCurrentCmd = (struct LevelCommand *) segmented_to_virtual(targetAddr); + sCurrentCmd = segmented_to_virtual(targetAddr); } static void level_cmd_exit(void) { main_pool_pop_state(); sStackTop = sStackBase; - sStackBase = (u32 *) *(--sStackTop); + sStackBase = (uintptr_t *) *(--sStackTop); sCurrentCmd = (struct LevelCommand *) *(--sStackTop); } @@ -137,12 +138,12 @@ static void level_cmd_sleep2(void) { } static void level_cmd_jump(void) { - sCurrentCmd = (struct LevelCommand *) segmented_to_virtual(CMD_GET(void *, 4)); + sCurrentCmd = segmented_to_virtual(CMD_GET(void *, 4)); } static void level_cmd_jump_and_link(void) { - *sStackTop++ = (u32) NEXT_CMD; - sCurrentCmd = (struct LevelCommand *) segmented_to_virtual(CMD_GET(void *, 4)); + *sStackTop++ = (uintptr_t) NEXT_CMD; + sCurrentCmd = segmented_to_virtual(CMD_GET(void *, 4)); } static void level_cmd_return(void) { @@ -150,7 +151,7 @@ static void level_cmd_return(void) { } static void level_cmd_jump_and_link_push_arg(void) { - *sStackTop++ = (u32) NEXT_CMD; + *sStackTop++ = (uintptr_t) NEXT_CMD; *sStackTop++ = CMD_GET(s16, 2); sCurrentCmd = CMD_NEXT; } @@ -170,7 +171,7 @@ static void level_cmd_jump_repeat(void) { } static void level_cmd_loop_begin(void) { - *sStackTop++ = (u32) NEXT_CMD; + *sStackTop++ = (uintptr_t) NEXT_CMD; *sStackTop++ = 0; sCurrentCmd = CMD_NEXT; } @@ -186,7 +187,7 @@ static void level_cmd_loop_until(void) { static void level_cmd_jump_if(void) { if (eval_script_op(CMD_GET(u8, 2), CMD_GET(s32, 4)) != 0) { - sCurrentCmd = (struct LevelCommand *) segmented_to_virtual(CMD_GET(void *, 8)); + sCurrentCmd = segmented_to_virtual(CMD_GET(void *, 8)); } else { sCurrentCmd = CMD_NEXT; } @@ -194,8 +195,8 @@ static void level_cmd_jump_if(void) { static void level_cmd_jump_and_link_if(void) { if (eval_script_op(CMD_GET(u8, 2), CMD_GET(s32, 4)) != 0) { - *sStackTop++ = (u32) NEXT_CMD; - sCurrentCmd = (struct LevelCommand *) segmented_to_virtual(CMD_GET(void *, 8)); + *sStackTop++ = (uintptr_t) NEXT_CMD; + sCurrentCmd = segmented_to_virtual(CMD_GET(void *, 8)); } else { sCurrentCmd = CMD_NEXT; } @@ -263,27 +264,29 @@ static void level_cmd_pop_pool_state(void) { } static void level_cmd_load_to_fixed_address(void) { - load_to_fixed_pool_addr(CMD_GET(void *, 4), CMD_GET(void *, 8), CMD_GET(void *, 12)); + load_to_fixed_pool_addr(CMD_GET(void *, 4), CMD_GET(void *, 4 + sizeof(void *)), + CMD_GET(void *, 4 + 2 * sizeof(void *))); sCurrentCmd = CMD_NEXT; } -static void level_cmd_load_segment(void) { - load_segment(CMD_GET(s16, 2), CMD_GET(void *, 4), CMD_GET(void *, 8), MEMORY_POOL_LEFT); +static void level_cmd_load_raw(void) { + load_segment(CMD_GET(s16, 2), CMD_GET(void *, 4), CMD_GET(void *, 4 + sizeof(void *)), + MEMORY_POOL_LEFT); sCurrentCmd = CMD_NEXT; } -static void level_cmd_load_compressed_segment(void) { - load_segment_decompress(CMD_GET(s16, 2), CMD_GET(void *, 4), CMD_GET(void *, 8)); +static void level_cmd_load_mio0(void) { + load_segment_decompress(CMD_GET(s16, 2), CMD_GET(void *, 4), CMD_GET(void *, 4 + sizeof(void *))); sCurrentCmd = CMD_NEXT; } -static void level_cmd_19(void) { +static void level_cmd_load_mario_head(void) { // TODO: Fix these hardcoded sizes void *addr = main_pool_alloc(0xE1000, MEMORY_POOL_LEFT); if (addr != NULL) { gdm_init(addr, 0xE1000); - gd_add_to_heap(gZBuffer, 0x25800); - gd_add_to_heap(gFrameBuffer0, 0x70800); + gd_add_to_heap(gZBuffer, SCREEN_WIDTH * SCREEN_HEIGHT * 2); // 0x25800 + gd_add_to_heap(gFrameBuffer0, SCREEN_WIDTH * SCREEN_HEIGHT * 2 * 3); // 0x70800 gdm_setup(); gdm_maketestdl(CMD_GET(s16, 2)); } else { @@ -292,8 +295,8 @@ static void level_cmd_19(void) { sCurrentCmd = CMD_NEXT; } -static void level_cmd_1A(void) { - func_80278304(CMD_GET(s16, 2), CMD_GET(void *, 4), CMD_GET(void *, 8)); +static void level_cmd_load_mio0_texture(void) { + func_80278304(CMD_GET(s16, 2), CMD_GET(void *, 4), CMD_GET(void *, 4 + sizeof(void *))); sCurrentCmd = CMD_NEXT; } @@ -368,7 +371,7 @@ static void level_cmd_end_area(void) { sCurrentCmd = CMD_NEXT; } -static void level_cmd_21(void) { +static void level_cmd_load_model_from_dl(void) { s16 val1 = CMD_GET(s16, 2) & 0x0FFF; s16 val2 = CMD_GET(u16, 2) >> 12; void *val3 = CMD_GET(void *, 4); @@ -381,7 +384,7 @@ static void level_cmd_21(void) { sCurrentCmd = CMD_NEXT; } -static void level_cmd_22(void) { +static void level_cmd_load_model_from_geo(void) { s16 arg0 = CMD_GET(s16, 2); void *arg1 = CMD_GET(void *, 4); @@ -401,8 +404,8 @@ static void level_cmd_23(void) { s16 model = CMD_GET(s16, 2) & 0x0FFF; s16 arg0H = CMD_GET(u16, 2) >> 12; void *arg1 = CMD_GET(void *, 4); - arg2.i = CMD_GET(s32, 8); // store the raw word as a union s32. this allows is to reinterpret the - // contents as a f32 without the value being converted implicitly. + // load an f32, but using an integer load instruction for some reason (hence the union) + arg2.i = CMD_GET(s32, 4 + sizeof(void *)); if (model < 256) { // GraphNodeScale has a GraphNode at the top. This @@ -603,7 +606,7 @@ static void level_cmd_set_rooms(void) { sCurrentCmd = CMD_NEXT; } -static void level_cmd_39(void) { +static void level_cmd_set_macro_objects(void) { if (sCurrAreaIndex != -1) { gAreas[sCurrAreaIndex].macroObjects = segmented_to_virtual(CMD_GET(void *, 4)); } @@ -655,7 +658,7 @@ static void level_cmd_nop(void) { sCurrentCmd = CMD_NEXT; } -static void level_cmd_30(void) { +static void level_cmd_show_dialog(void) { if (sCurrAreaIndex != -1) { if (CMD_GET(u8, 2) < 2) { gAreas[sCurrAreaIndex].dialog[CMD_GET(u8, 2)] = CMD_GET(u8, 3); @@ -748,18 +751,18 @@ static void (*LevelScriptJumpTable[])(void) = { /*14*/ level_cmd_push_pool_state, /*15*/ level_cmd_pop_pool_state, /*16*/ level_cmd_load_to_fixed_address, - /*17*/ level_cmd_load_segment, - /*18*/ level_cmd_load_compressed_segment, - /*19*/ level_cmd_19, - /*1A*/ level_cmd_1A, + /*17*/ level_cmd_load_raw, + /*18*/ level_cmd_load_mio0, + /*19*/ level_cmd_load_mario_head, + /*1A*/ level_cmd_load_mio0_texture, /*1B*/ level_cmd_init_level, /*1C*/ level_cmd_clear_level, /*1D*/ level_cmd_alloc_level_pool, /*1E*/ level_cmd_free_level_pool, /*1F*/ level_cmd_begin_area, /*20*/ level_cmd_end_area, - /*21*/ level_cmd_21, - /*22*/ level_cmd_22, + /*21*/ level_cmd_load_model_from_dl, + /*22*/ level_cmd_load_model_from_geo, /*23*/ level_cmd_23, /*24*/ level_cmd_place_object, /*25*/ level_cmd_init_mario, @@ -773,7 +776,7 @@ static void (*LevelScriptJumpTable[])(void) = { /*2D*/ level_cmd_2D, /*2E*/ level_cmd_set_terrain_data, /*2F*/ level_cmd_set_rooms, - /*30*/ level_cmd_30, + /*30*/ level_cmd_show_dialog, /*31*/ level_cmd_set_terrain_type, /*32*/ level_cmd_nop, /*33*/ level_cmd_set_transition, @@ -782,7 +785,7 @@ static void (*LevelScriptJumpTable[])(void) = { /*36*/ level_cmd_set_music, /*37*/ level_cmd_set_menu_music, /*38*/ level_cmd_38, - /*39*/ level_cmd_39, + /*39*/ level_cmd_set_macro_objects, /*3A*/ level_cmd_3A, /*3B*/ level_cmd_create_whirlpool, /*3C*/ level_cmd_get_or_set_var, diff --git a/src/engine/surface_load.c b/src/engine/surface_load.c index d39136c..757692b 100644 --- a/src/engine/surface_load.c +++ b/src/engine/surface_load.c @@ -522,7 +522,7 @@ void alloc_surface_pools(void) { sSurfacePool = main_pool_alloc(sSurfacePoolSize * sizeof(struct Surface), MEMORY_POOL_LEFT); gCCMEnteredSlide = 0; - func_802DA4DC(); + reset_red_coins_collected(); } /** diff --git a/src/game/area.c b/src/game/area.c index 62d8cc6..b418beb 100644 --- a/src/game/area.c +++ b/src/game/area.c @@ -30,8 +30,8 @@ s16 gCurrCourseNum; s16 gCurrActNum; s16 gCurrAreaIndex; s16 gSavedCourseNum; -s16 D_8033A75E; -s16 D_8033A760; +s16 gPauseScreenMode; +s16 gSaveOptSelectIndex; struct SpawnInfo *gMarioSpawnInfo = &gPlayerSpawnInfos[0]; struct GraphNode **gLoadedGraphNodes = D_8033A160; @@ -354,27 +354,27 @@ void render_game(void) { gSPViewport(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&D_8032CF00)); - gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, BORDER_HEIGHT, 320, - 240 - BORDER_HEIGHT); + gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, BORDER_HEIGHT, SCREEN_WIDTH, + SCREEN_HEIGHT - BORDER_HEIGHT); render_hud(); - gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, 0, 320, 240); + gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); render_text_labels(); do_cutscene_handler(); print_displaying_credits_entry(); - gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, BORDER_HEIGHT, 320, - 240 - BORDER_HEIGHT); - D_8033A75E = func_802DCD98(); + gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, BORDER_HEIGHT, SCREEN_WIDTH, + SCREEN_HEIGHT - BORDER_HEIGHT); + gPauseScreenMode = render_menus_and_dialogs(); - if (D_8033A75E != 0) { - D_8033A760 = D_8033A75E; + if (gPauseScreenMode != 0) { + gSaveOptSelectIndex = gPauseScreenMode; } - + if (D_8032CE78 != NULL) { make_viewport_clip_rect(D_8032CE78); } else - gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, BORDER_HEIGHT, 320, - 240 - BORDER_HEIGHT); + gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, BORDER_HEIGHT, SCREEN_WIDTH, + SCREEN_HEIGHT - BORDER_HEIGHT); if (gWarpTransition.isActive) { if (gWarpTransDelay == 0) { diff --git a/src/game/area.h b/src/game/area.h index e702ec1..50e4054 100644 --- a/src/game/area.h +++ b/src/game/area.h @@ -248,8 +248,8 @@ extern s16 gCurrCourseNum; extern s16 gCurrActNum; extern s16 gCurrAreaIndex; extern s16 gSavedCourseNum; -extern s16 D_8033A75E; -extern s16 D_8033A760; +extern s16 gPauseScreenMode; +extern s16 gSaveOptSelectIndex; extern struct SpawnInfo *gMarioSpawnInfo; diff --git a/src/game/behavior_actions.c b/src/game/behavior_actions.c index 7a5cc41..1b31a39 100644 --- a/src/game/behavior_actions.c +++ b/src/game/behavior_actions.c @@ -101,15 +101,15 @@ extern s32 gDialogResponse; extern s32 gCutsceneActive; extern u8 gCutsceneNumber; extern s8 *D_8032F96C[]; -extern u32 bowser_seg6_unkmoveshorts_060576FC[]; -extern u32 blue_fish_seg3_anims_0301C2B0[]; -extern u32 cyan_fish_seg6_anims_0600E264[]; -extern u32 blue_fish_seg3_anims_0301C2B0[]; +extern s16 bowser_seg6_unkmoveshorts_060576FC[]; +extern struct Animation *blue_fish_seg3_anims_0301C2B0[]; +extern struct Animation *cyan_fish_seg6_anims_0600E264[]; +extern struct Animation *blue_fish_seg3_anims_0301C2B0[]; void func_802A8D18(f32, f32, s32); s32 mario_moving_fast_enough_to_make_piranha_plant_bite(void); -void func_802C49E0(void); +void obj_set_secondary_camera_focus(void); s32 D_8032F0C0[] = { SAVE_FLAG_HAVE_WING_CAP, SAVE_FLAG_HAVE_METAL_CAP, SAVE_FLAG_HAVE_VANISH_CAP }; diff --git a/src/game/behaviors/amp.inc.c b/src/game/behaviors/amp.inc.c index 1706daa..b5e8c93 100644 --- a/src/game/behaviors/amp.inc.c +++ b/src/game/behaviors/amp.inc.c @@ -213,7 +213,7 @@ void bhv_homing_amp_loop(void) { case HOMING_AMP_ACT_CHASE: homing_amp_chase_loop(); - PlaySound(SOUND_CH6_AMPBUZZ); + PlaySound(SOUND_AIR_AMP_BUZZ); break; case HOMING_AMP_ACT_GIVE_UP: @@ -318,7 +318,7 @@ static void circling_amp_idle_loop(void) { // Oscillate o->oAmpYPhase++; - PlaySound(SOUND_CH6_AMPBUZZ); + PlaySound(SOUND_AIR_AMP_BUZZ); } /** diff --git a/src/game/behaviors/animated_floor_switch.inc.c b/src/game/behaviors/animated_floor_switch.inc.c index 5678ca5..82a72d6 100644 --- a/src/game/behaviors/animated_floor_switch.inc.c +++ b/src/game/behaviors/animated_floor_switch.inc.c @@ -53,9 +53,9 @@ void bhv_animates_on_floor_switch_press_loop(void) { if (o->oFloorSwitchPressAnimationUnkF4 != 0) { if (o->oFloorSwitchPressAnimationUnkF4 < 60) { - PlaySound(SOUND_CH8_SWITCH6); + PlaySound(SOUND_GENERAL2_SWITCH_TICK_SLOW); } else { - PlaySound(SOUND_CH8_SWITCH5); + PlaySound(SOUND_GENERAL2_SWITCH_TICK_FAST); } if (--o->oFloorSwitchPressAnimationUnkF4 == 0) { diff --git a/src/game/behaviors/bbh_haunted_bookshelf.inc.c b/src/game/behaviors/bbh_haunted_bookshelf.inc.c index c7a2371..a8ccdca 100644 --- a/src/game/behaviors/bbh_haunted_bookshelf.inc.c +++ b/src/game/behaviors/bbh_haunted_bookshelf.inc.c @@ -32,7 +32,7 @@ void bhv_haunted_bookshelf_loop(void) { case HAUNTED_BOOKSHELF_ACT_RECEDE: // Move the bookshelf and play the sound o->oPosX += 5.0f; - PlaySound(SOUND_ENVIRONMENT_ELEVATOR4_2); + PlaySound(SOUND_ENV_ELEVATOR4_2); // Delete the object after 102 frames if (o->oTimer > 101) { diff --git a/src/game/behaviors/bbh_merry_go_round.inc.c b/src/game/behaviors/bbh_merry_go_round.inc.c index 6020a98..ab10aa0 100644 --- a/src/game/behaviors/bbh_merry_go_round.inc.c +++ b/src/game/behaviors/bbh_merry_go_round.inc.c @@ -57,7 +57,7 @@ static void handle_merry_go_round_music(void) { func_80321080(300); // Switch to BBH music? FIXME: Audio needs labelling o->oMerryGoRoundMusicShouldPlay = FALSE; } else { - PlaySound(SOUND_ENVIRONMENT_MERRYGOROUNDCREAKING); + PlaySound(SOUND_ENV_MERRY_GO_ROUND_CREAKING); } } } @@ -68,13 +68,13 @@ static void handle_merry_go_round_music(void) { void bhv_merry_go_round_loop(void) { // Surprisingly, the merry-go-round is what's responsible // for playing the howling wind sound in BBH. - if (o->oMerryGoRoundMarioIsOutside == FALSE) { + if (!o->oMerryGoRoundMarioIsOutside) { if (gMarioCurrentRoom == BBH_OUTSIDE_ROOM) { // Set to TRUE o->oMerryGoRoundMarioIsOutside++; } } else { - play_sound(SOUND_CH6_HOWLINGWIND, gDefaultSoundArgs); + play_sound(SOUND_AIR_HOWLING_WIND, gDefaultSoundArgs); if ( // There are objects outside BBH, such as corkboxes. diff --git a/src/game/behaviors/beta_chest.inc.c b/src/game/behaviors/beta_chest.inc.c index db8cb10..51872fa 100644 --- a/src/game/behaviors/beta_chest.inc.c +++ b/src/game/behaviors/beta_chest.inc.c @@ -53,7 +53,7 @@ void bhv_beta_chest_lid_loop(void) { if (o->oTimer == 0) { // Spawn the bubble 80 units in the -Y direction and 120 units in the +Z direction. spawn_object_relative(0, 0, -80, 120, o, MODEL_BUBBLE, bhvWaterAirBubble); - play_sound(SOUND_GENERAL_CLAMSHELL1, o->header.gfx.cameraToObject); + play_sound(SOUND_GENERAL_CLAM_SHELL1, o->header.gfx.cameraToObject); } // Rotate the lid 0x400 (1024) angle units per frame backwards. diff --git a/src/game/behaviors/beta_trampoline.inc.c b/src/game/behaviors/beta_trampoline.inc.c index 078ef5b..efeaf12 100644 --- a/src/game/behaviors/beta_trampoline.inc.c +++ b/src/game/behaviors/beta_trampoline.inc.c @@ -1,7 +1,7 @@ /** * Behavior for bhvBetaTrampolineTop and bhvBetaTrampolineSpring. * This was a trampoline that was never finished. The model and collision - * are nearly complete finished, but the code was abandoned very early on + * are nearly finished, but the code was abandoned very early on * in its development. The trampoline consists of 3 objects: the top, * the spring, and the base. The base is a static object with no behavior. */ diff --git a/src/game/behaviors/bird.inc.c b/src/game/behaviors/bird.inc.c index 1b4f70b..c6ef8e1 100644 --- a/src/game/behaviors/bird.inc.c +++ b/src/game/behaviors/bird.inc.c @@ -21,7 +21,7 @@ static void bird_act_inactive(void) { if (o->oBehParams2ndByte != BIRD_BP_SPAWNED) { s32 i; - PlaySound2(SOUND_GENERAL_BIRDSFLYAWAY); + PlaySound2(SOUND_GENERAL_BIRDS_FLY_AWAY); for (i = 0; i < 6; i++) { spawn_object(o, MODEL_BIRDS, bhvBird); diff --git a/src/game/behaviors/blue_coin.inc.c b/src/game/behaviors/blue_coin.inc.c index 88e266e..8429648 100644 --- a/src/game/behaviors/blue_coin.inc.c +++ b/src/game/behaviors/blue_coin.inc.c @@ -77,7 +77,7 @@ void bhv_blue_coin_switch_loop(void) { // Set gravity to 0 so it doesn't accelerate when receding. o->oGravity = 0.0f; - PlaySound2(SOUND_GENERAL_SWITCHDOOROPEN); + PlaySound2(SOUND_GENERAL_SWITCH_DOOR_OPEN); } } @@ -97,7 +97,8 @@ void bhv_blue_coin_switch_loop(void) { // ??? o->oPosY = gMarioObject->oPosY - 40.0f; - // Spawn particles + // Spawn particles. There's a function that calls this same function + // with the same arguments, func_802A3004, why didn't they just call that? func_802AA618(0, 0, 46.0f); } else { // Have collision while receding @@ -110,9 +111,9 @@ void bhv_blue_coin_switch_loop(void) { case BLUE_COIN_SWITCH_ACT_TICKING: // Tick faster when the blue coins start blinking if (o->oTimer < 200) { - play_sound(SOUND_CH8_SWITCH5, gDefaultSoundArgs); + play_sound(SOUND_GENERAL2_SWITCH_TICK_FAST, gDefaultSoundArgs); } else { - play_sound(SOUND_CH8_SWITCH6, gDefaultSoundArgs); + play_sound(SOUND_GENERAL2_SWITCH_TICK_SLOW, gDefaultSoundArgs); } // Delete the switch (which stops the sound) after the last coin is collected, diff --git a/src/game/behaviors/bobomb.inc.c b/src/game/behaviors/bobomb.inc.c index e519b02..88777db 100644 --- a/src/game/behaviors/bobomb.inc.c +++ b/src/game/behaviors/bobomb.inc.c @@ -90,7 +90,7 @@ void BobombChaseMarioLoop(void) { collisionFlags = ObjectStep(); if (sp1a == 5 || sp1a == 16) - PlaySound2(SOUND_OBJECT_BOBOMBWALK); + PlaySound2(SOUND_OBJ_BOBOMB_WALK); obj_turn_toward_object(o, gMarioObject, 16, 0x800); ObjCheckFloorDeath(collisionFlags, D_803600E0); @@ -263,7 +263,7 @@ void bhv_bobomb_loop(void) { == 0) /* oBobombFuseTimer % 2 or oBobombFuseTimer % 8 */ spawn_object(o, MODEL_SMOKE, bhvBobombFuseSmoke); - PlaySound(SOUND_CH6_BOBOMBLITFUSE); + PlaySound(SOUND_AIR_BOBOMB_LIT_FUSE); o->oBobombFuseTimer++; } @@ -296,7 +296,7 @@ void BobombBuddyIdleLoop(void) { collisionFlags = ObjectStep(); if ((sp1a == 5) || (sp1a == 16)) - PlaySound2(SOUND_OBJECT_BOBOMBWALK); + PlaySound2(SOUND_OBJ_BOBOMB_WALK); if (o->oDistanceToMario < 1000.0f) o->oMoveAngleYaw = approach_s16_symmetric(o->oMoveAngleYaw, o->oAngleToMario, 0x140); @@ -305,20 +305,25 @@ void BobombBuddyIdleLoop(void) { o->oAction = BOBOMB_BUDDY_ACT_TURN_TO_TALK; } -// sp30 = arg0 -// sp34 = arg1 - -void BobombBuddyCannonLoop(s16 arg0, s16 arg1) { - struct Object *sp2c; - s16 sp2a, sp28; +/** + * Function for the Bob-omb Buddy cannon guy. + * dialogFirstText is the first dialogID called when Bob-omb Buddy + * starts to talk to Mario to prepare the cannon(s) for him. + * Then the camera goes to the nearest cannon, to play the "prepare cannon" cutscene + * dialogSecondText is called after Bob-omb Buddy has the cannon(s) ready and + * then tells Mario that is "Ready for blastoff". + */ +void BobombBuddyCannonLoop(s16 dialogFirstText, s16 dialogSecondText) { + struct Object *cannonClosed; + s16 buddyText, cutscene; switch (o->oBobombBuddyCannonStatus) { case BOBOMB_BUDDY_CANNON_UNOPENED: - sp2a = func_8028F8E0(162, o, arg0); - if (sp2a != 0) { + buddyText = cutscene_object_with_dialog(CUTSCENE_DIALOG_1, o, dialogFirstText); + if (buddyText != 0) { save_file_set_cannon_unlocked(); - sp2c = obj_nearest_object_with_behavior(bhvCannonClosed); - if (sp2c != 0) + cannonClosed = obj_nearest_object_with_behavior(bhvCannonClosed); + if (cannonClosed != 0) o->oBobombBuddyCannonStatus = BOBOMB_BUDDY_CANNON_OPENING; else o->oBobombBuddyCannonStatus = BOBOMB_BUDDY_CANNON_STOP_TALKING; @@ -326,15 +331,15 @@ void BobombBuddyCannonLoop(s16 arg0, s16 arg1) { break; case BOBOMB_BUDDY_CANNON_OPENING: - sp2c = obj_nearest_object_with_behavior(bhvCannonClosed); - sp28 = func_8028F9E8(150, sp2c); - if (sp28 == -1) + cannonClosed = obj_nearest_object_with_behavior(bhvCannonClosed); + cutscene = cutscene_object(CUTSCENE_PREPARE_CANNON, cannonClosed); + if (cutscene == -1) o->oBobombBuddyCannonStatus = BOBOMB_BUDDY_CANNON_OPENED; break; case BOBOMB_BUDDY_CANNON_OPENED: - sp2a = func_8028F8E0(162, o, arg1); - if (sp2a != 0) + buddyText = cutscene_object_with_dialog(CUTSCENE_DIALOG_1, o, dialogSecondText); + if (buddyText != 0) o->oBobombBuddyCannonStatus = BOBOMB_BUDDY_CANNON_STOP_TALKING; break; @@ -356,7 +361,7 @@ void BobombBuddyTalkLoop(void) { switch (o->oBobombBuddyRole) { case BOBOMB_BUDDY_ROLE_ADVICE: - if (func_8028F8E0(162, o, o->oBehParams2ndByte) != BOBOMB_BUDDY_BP_STYPE_GENERIC) { + if (cutscene_object_with_dialog(CUTSCENE_DIALOG_1, o, o->oBehParams2ndByte) != BOBOMB_BUDDY_BP_STYPE_GENERIC) { set_mario_npc_dialog(0); o->activeFlags &= ~0x20; /* bit 5 */ @@ -379,7 +384,7 @@ void BobombBuddyTalkLoop(void) { void BobombBuddyTurnToTalkLoop(void) { s16 sp1e = o->header.gfx.unk38.animFrame; if ((sp1e == 5) || (sp1e == 16)) - PlaySound2(SOUND_OBJECT_BOBOMBWALK); + PlaySound2(SOUND_OBJ_BOBOMB_WALK); o->oMoveAngleYaw = approach_s16_symmetric(o->oMoveAngleYaw, o->oAngleToMario, 0x1000); if ((s16) o->oMoveAngleYaw == (s16) o->oAngleToMario) diff --git a/src/game/behaviors/bomp.inc.c b/src/game/behaviors/bomp.inc.c index 7473084..8626546 100644 --- a/src/game/behaviors/bomp.inc.c +++ b/src/game/behaviors/bomp.inc.c @@ -24,7 +24,7 @@ void bhv_small_bomp_loop(void) { if (o->oTimer == 15.0) { o->oAction = BOMP_ACT_EXTEND; o->oForwardVel = 40.0f; - PlaySound2(SOUND_OBJECT_UNKNOWN2); + PlaySound2(SOUND_OBJ_UNKNOWN2); } break; @@ -38,7 +38,7 @@ void bhv_small_bomp_loop(void) { o->oAction = BOMP_ACT_RETRACT; o->oForwardVel = 10.0f; o->oMoveAngleYaw -= 0x8000; - PlaySound2(SOUND_OBJECT_UNKNOWN2); + PlaySound2(SOUND_OBJ_UNKNOWN2); } break; @@ -80,7 +80,7 @@ void bhv_large_bomp_loop(void) { if (o->oTimer == 15.0) { o->oAction = BOMP_ACT_EXTEND; o->oForwardVel = 10.0f; - PlaySound2(SOUND_OBJECT_UNKNOWN2); + PlaySound2(SOUND_OBJ_UNKNOWN2); } break; @@ -94,7 +94,7 @@ void bhv_large_bomp_loop(void) { o->oAction = BOMP_ACT_RETRACT; o->oForwardVel = 10.0f; o->oMoveAngleYaw -= 0x8000; - PlaySound2(SOUND_OBJECT_UNKNOWN2); + PlaySound2(SOUND_OBJ_UNKNOWN2); } break; diff --git a/src/game/behaviors/boo.inc.c b/src/game/behaviors/boo.inc.c index 89958a3..d0ae46a 100644 --- a/src/game/behaviors/boo.inc.c +++ b/src/game/behaviors/boo.inc.c @@ -1,31 +1,35 @@ // boo.c.inc -struct ObjectHitbox sBooGivingStarHitbox = { - /* interactType: */ 0, - /* downOffset: */ 0, +static struct ObjectHitbox sBooGivingStarHitbox = { + /* interactType: */ 0, + /* downOffset: */ 0, /* damageOrCoinValue: */ 3, - /* health: */ 3, - /* numLootCoins: */ 0, - /* radius: */ 140, - /* height: */ 80, - /* hurtboxRadius: */ 40, - /* hurtboxHeight: */ 60, + /* health: */ 3, + /* numLootCoins: */ 0, + /* radius: */ 140, + /* height: */ 80, + /* hurtboxRadius: */ 40, + /* hurtboxHeight: */ 60, }; // Relative positions -s16 sCourtyardBooTripletPositions[][3] = { { 0, 50, 0 }, { 210, 110, 210 }, { -210, 70, -210 } }; +static s16 sCourtyardBooTripletPositions[][3] = { + {0, 50, 0}, + {210, 110, 210}, + {-210, 70, -210} +}; -void boo_stop(void) { +static void boo_stop(void) { o->oForwardVel = 0.0f; o->oVelY = 0.0f; o->oGravity = 0.0f; } void bhv_boo_init(void) { - o->oBooUnk110 = o->oMoveAngleYaw; + o->oBooInitialMoveYaw = o->oMoveAngleYaw; } -s32 boo_should_be_stopped(void) { +static s32 boo_should_be_stopped(void) { if (obj_has_behavior(bhvMerryGoRoundBigBoo) || obj_has_behavior(bhvMerryGoRoundBoo)) { if (gMarioOnMerryGoRound == FALSE) { return TRUE; @@ -47,7 +51,7 @@ s32 boo_should_be_stopped(void) { return FALSE; } -s32 boo_should_be_active(void) { +static s32 boo_should_be_active(void) { f32 activationRadius; if (obj_has_behavior(bhvBalconyBigBoo)) { @@ -67,8 +71,10 @@ s32 boo_should_be_active(void) { return TRUE; } } else if (!boo_should_be_stopped()) { - if (o->oDistanceToMario < activationRadius - && (o->oRoom == gMarioCurrentRoom || gMarioCurrentRoom == 0)) { + if ( + o->oDistanceToMario < activationRadius && + (o->oRoom == gMarioCurrentRoom || gMarioCurrentRoom == 0) + ) { return TRUE; } } @@ -85,15 +91,21 @@ void bhv_courtyard_boo_triplet_init(void) { } else { for (i = 0; i < 3; i++) { boo = spawn_object_relative( - 0x01, sCourtyardBooTripletPositions[i][0], sCourtyardBooTripletPositions[i][1], - sCourtyardBooTripletPositions[i][2], o, MODEL_BOO, bhvGhostHuntBoo); + 0x01, + sCourtyardBooTripletPositions[i][0], + sCourtyardBooTripletPositions[i][1], + sCourtyardBooTripletPositions[i][2], + o, + MODEL_BOO, + bhvGhostHuntBoo + ); boo->oMoveAngleYaw = RandomU16(); } } } -void boo_approach_target_opacity_and_update_scale(void) { +static void boo_approach_target_opacity_and_update_scale(void) { f32 scale; if (o->oBooTargetOpacity != o->oOpacity) { @@ -112,16 +124,14 @@ void boo_approach_target_opacity_and_update_scale(void) { } } - // doubles - scale = (o->oOpacity / 255.0f * 0.4 + 0.6) * o->oBooBaseScale; + scale = (o->oOpacity/255.0f * 0.4 + 0.6) * o->oBooBaseScale; scale_object(o, scale); // why no obj_scale? was obj_scale written later? } -void boo_oscillate(s32 ignoreOpacity) { +static void boo_oscillate(s32 ignoreOpacity) { o->oFaceAnglePitch = sins(o->oBooOscillationTimer) * 0x400; if (o->oOpacity == 0xFF || ignoreOpacity == TRUE) { - // more doubles o->header.gfx.scale[0] = sins(o->oBooOscillationTimer) * 0.08 + o->oBooBaseScale; o->header.gfx.scale[1] = -sins(o->oBooOscillationTimer) * 0.08 + o->oBooBaseScale; o->header.gfx.scale[2] = o->header.gfx.scale[0]; @@ -130,8 +140,7 @@ void boo_oscillate(s32 ignoreOpacity) { } } -// vanish/appear when mario's facing to/away -s32 func_802C3008(void) { +static s32 boo_vanish_or_appear(void) { s16 relativeAngleToMario = abs_angle_diff(o->oAngleToMario, o->oMoveAngleYaw); s16 relativeMarioFaceAngle = abs_angle_diff(o->oMoveAngleYaw, gMarioObject->oFaceAngleYaw); // magic? @@ -141,11 +150,13 @@ s32 func_802C3008(void) { o->oVelY = 0.0f; - if (relativeAngleToMario > relativeAngleToMarioThreshhold - || relativeMarioFaceAngle < relativeMarioFaceAngleThreshhold) { + if ( + relativeAngleToMario > relativeAngleToMarioThreshhold || + relativeMarioFaceAngle < relativeMarioFaceAngleThreshhold + ) { if (o->oOpacity == 40) { o->oBooTargetOpacity = 255; - PlaySound2(SOUND_BOO_LAUGH_LONG); + PlaySound2(SOUND_OBJ_BOO_LAUGH_LONG); } if (o->oOpacity > 180) { @@ -158,95 +169,105 @@ s32 func_802C3008(void) { return doneAppearing; } -void func_802C313C(s32 a0) { +static void boo_set_move_yaw_for_during_hit(s32 hurt) { obj_become_intangible(); o->oFlags &= ~OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW; - o->oBooUnk104 = (f32) o->oMoveAngleYaw; + o->oBooMoveYawBeforeHit = (f32) o->oMoveAngleYaw; - if (a0 != FALSE) { - o->oBooMoveYawAfterHit = gMarioObject->oMoveAngleYaw; - } else if (coss((s16) o->oMoveAngleYaw - (s16) o->oAngleToMario) < 0.0f) { - o->oBooMoveYawAfterHit = o->oMoveAngleYaw; + if (hurt != FALSE) { + o->oBooMoveYawDuringHit = gMarioObject->oMoveAngleYaw; + } else if (coss((s16)o->oMoveAngleYaw - (s16)o->oAngleToMario) < 0.0f) { + o->oBooMoveYawDuringHit = o->oMoveAngleYaw; } else { - o->oBooMoveYawAfterHit = (s16)(o->oMoveAngleYaw + 0x8000); + o->oBooMoveYawDuringHit = (s16)(o->oMoveAngleYaw + 0x8000); } } -// move after boo is hit? -void func_802C3238(s32 roll, f32 fVel) { - s32 sp4 = o->oTimer * 0x800 + 0x800; +static void boo_move_during_hit(s32 roll, f32 fVel) { + // Boos seem to have been supposed to oscillate up then down then back again + // when hit. However it seems the programmers forgot to scale the cosine, + // so the Y velocity goes from 1 to -1 and back to 1 over 32 frames. + // This is such a small change that the Y position only changes by 5 units. + // It's completely unnoticable in-game. + s32 oscillationVel = o->oTimer * 0x800 + 0x800; + o->oForwardVel = fVel; - o->oVelY = coss(sp4); - o->oMoveAngleYaw = o->oBooMoveYawAfterHit; + o->oVelY = coss(oscillationVel); + o->oMoveAngleYaw = o->oBooMoveYawDuringHit; if (roll != FALSE) { - o->oFaceAngleYaw += D_8032F0CC[o->oTimer]; + o->oFaceAngleYaw += D_8032F0CC[o->oTimer]; o->oFaceAngleRoll += D_8032F0CC[o->oTimer]; } } -void func_802C3304(void) { - s32 sp4 = o->oTimer * 0x2000 + 0xFFFC2000; - o->oFaceAngleYaw += coss(sp4) * 0x400; +static void big_boo_shake_after_hit(void) { + // Oscillate yaw + s32 oscillationVel = o->oTimer * 0x2000 - 0x3E000; + o->oFaceAngleYaw += coss(oscillationVel) * 0x400; } -void func_802C3384(void) { - o->oMoveAngleYaw = o->oBooUnk104; +static void boo_reset_after_hit(void) { + o->oMoveAngleYaw = o->oBooMoveYawBeforeHit; o->oFlags |= OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW; o->oInteractStatus = 0; } -// called iff boo/big boo/cage boo is in action 2, which only occurs if it was non-attack-ly interacted -// with/bounced on? -s32 func_802C33D0(f32 a0) { +// called iff boo/big boo/cage boo is in action 2, which only occurs if it was non-attack-ly interacted with/bounced on? +static s32 boo_update_after_bounced_on(f32 a0) { boo_stop(); if (o->oTimer == 0) { - func_802C313C(FALSE); + boo_set_move_yaw_for_during_hit(FALSE); } if (o->oTimer < 32) { - func_802C3238(FALSE, D_8032F0CC[o->oTimer] / 5000.0f * a0); + boo_move_during_hit(FALSE, D_8032F0CC[o->oTimer]/5000.0f * a0); } else { obj_become_tangible(); - func_802C3384(); + boo_reset_after_hit(); o->oAction = 1; - return 1; + return TRUE; } - return 0; + return FALSE; } // called iff big boo nonlethally hit -s32 func_802C34B4(f32 a0) { +static s32 big_boo_update_during_nonlethal_hit(f32 a0) { boo_stop(); - if (o->oTimer == 0) - func_802C313C(TRUE); - if (o->oTimer < 32) - func_802C3238(TRUE, D_8032F0CC[o->oTimer] / 5000.0f * a0); - else if (o->oTimer < 48) - func_802C3304(); - else { - obj_become_tangible(); - func_802C3384(); - o->oAction = 1; - return 1; + + if (o->oTimer == 0) { + boo_set_move_yaw_for_during_hit(TRUE); } - return 0; + + if (o->oTimer < 32) { + boo_move_during_hit(TRUE, D_8032F0CC[o->oTimer]/5000.0f * a0); + } else if (o->oTimer < 48) { + big_boo_shake_after_hit(); + } else { + obj_become_tangible(); + boo_reset_after_hit(); + + o->oAction = 1; + + return TRUE; + } + + return FALSE; } -// func_802C35C0 is called every frame once mario lethally hits the boo until the boo is deleted -// boo_die? boo_dying? returns whether boo has completed death animation -// sets oBooDeathStatus -s32 func_802C35C0(void) { +// called every frame once mario lethally hits the boo until the boo is deleted, +// returns whether death is complete +static s32 boo_update_during_death(void) { struct Object *parentBigBoo; if (o->oTimer == 0) { o->oForwardVel = 40.0f; o->oMoveAngleYaw = gMarioObject->oMoveAngleYaw; o->oBooDeathStatus = BOO_DEATH_STATUS_DYING; - o->oFlags &= ~8; + o->oFlags &= ~OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW; } else { if (o->oTimer == 5) { o->oBooTargetOpacity = 0; @@ -255,19 +276,19 @@ s32 func_802C35C0(void) { if (o->oTimer > 30 || o->oMoveFlags & 0x200) { func_802A3004(); o->oBooDeathStatus = BOO_DEATH_STATUS_DEAD; -#ifndef VERSION_JP + if (o->oBooParentBigBoo != NULL) { parentBigBoo = o->oBooParentBigBoo; + +#ifndef VERSION_JP if (!obj_has_behavior(bhvBoo)) { parentBigBoo->oBigBooNumMinionBoosKilled++; } - } #else - if (o->oBooParentBigBoo != NULL) { - parentBigBoo = o->oBooParentBigBoo; parentBigBoo->oBigBooNumMinionBoosKilled++; - } #endif + } + return TRUE; } } @@ -279,7 +300,7 @@ s32 func_802C35C0(void) { return FALSE; } -s32 obj_has_attack_type(u32 attackType) { +static s32 obj_has_attack_type(u32 attackType) { if ((o->oInteractStatus & INT_STATUS_ATTACK_MASK) == attackType) { return TRUE; } else { @@ -287,73 +308,95 @@ s32 obj_has_attack_type(u32 attackType) { } } -s32 func_802C3778(void) { - s32 sp1C = 0; +static s32 boo_get_attack_status(void) { + s32 attackStatus = BOO_NOT_ATTACKED; + if (o->oInteractStatus & INT_STATUS_INTERACTED) { - if ((o->oInteractStatus & INT_STATUS_WAS_ATTACKED) - && obj_has_attack_type(ATTACK_FROM_ABOVE) == FALSE) { + if ((o->oInteractStatus & INT_STATUS_WAS_ATTACKED) && obj_has_attack_type(ATTACK_FROM_ABOVE) == FALSE) { obj_become_intangible(); + o->oInteractStatus = 0; - PlaySound2(SOUND_BOO_LAUGH_SHORT); - sp1C = 1; + + PlaySound2(SOUND_OBJ_BOO_LAUGH_SHORT); + + attackStatus = BOO_ATTACKED; } else { - PlaySound2(SOUND_OBJECT_BOOBOUNCETOP); + PlaySound2(SOUND_OBJ_BOO_BOUNCE_TOP); + o->oInteractStatus = 0; - sp1C = -1; + + attackStatus = BOO_BOUNCED_ON; } } - return sp1C; + + return attackStatus; } // boo idle/chasing movement? -void func_802C3830(f32 a0, s16 a1, f32 a2) { +static void boo_chase_mario(f32 a0, s16 a1, f32 a2) { f32 sp1C; s16 sp1A; - if (func_802C3008()) { + + if (boo_vanish_or_appear()) { o->oInteractType = 0x8000; - if (obj_lateral_dist_from_mario_to_home() > 1500.0f) + + if (obj_lateral_dist_from_mario_to_home() > 1500.0f) { sp1A = obj_angle_to_home(); - else + } else { sp1A = o->oAngleToMario; + } + obj_rotate_yaw_toward(sp1A, a1); o->oVelY = 0.0f; + if (mario_is_in_air_action() == 0) { sp1C = o->oPosY - gMarioObject->oPosY; - if (a0 < sp1C && sp1C < 500.0f) + if (a0 < sp1C && sp1C < 500.0f) { o->oVelY = func_802A0BF4(o->oPosY, gMarioObject->oPosY + 50.0f, 10.f, 2.0f); + } } - func_8029F684(10.0f - o->oBooUnk10C, a2); - if (o->oForwardVel != 0.0f) + + func_8029F684(10.0f - o->oBooNegatedAggressiveness, a2); + + if (o->oForwardVel != 0.0f) { boo_oscillate(FALSE); + } } else { o->oInteractType = 0; + // why is boo_stop not used here o->oForwardVel = 0.0f; o->oVelY = 0.0f; o->oGravity = 0.0f; } } -void ActionBoo0(void) { - o->activeFlags |= 0x40; - if (o->oBehParams2ndByte == 2) +static void ActionBoo0(void) { + o->activeFlags |= ACTIVE_FLAG_MOVE_THROUGH_GRATE; + + if (o->oBehParams2ndByte == 2) { o->oRoom = 10; + } + obj_set_pos_to_home(); - o->oMoveAngleYaw = o->oBooUnk110; + o->oMoveAngleYaw = o->oBooInitialMoveYaw; boo_stop(); + o->oBooParentBigBoo = obj_nearest_object_with_behavior(bhvGhostHuntBigBoo); o->oBooBaseScale = 1.0f; o->oBooTargetOpacity = 0xFF; + if (boo_should_be_active()) { // Condition is met if the object is bhvBalconyBigBoo or bhvMerryGoRoundBoo if (o->oBehParams2ndByte == 2) { o->oBooParentBigBoo = NULL; o->oAction = 5; - } else + } else { o->oAction = 1; + } } } -void ActionBoo5(void) { +static void ActionBoo5(void) { if (o->oTimer < 30) { o->oVelY = 0.0f; o->oForwardVel = 13.0f; @@ -365,34 +408,45 @@ void ActionBoo5(void) { } } -void ActionBoo1(void) { - s32 sp1C; +static void ActionBoo1(void) { + s32 attackStatus; + if (o->oTimer == 0) { - o->oBooUnk10C = -RandomFloat() * 5.0f; - o->oUnk1B0_S16 = (s32)(RandomFloat() * 128.0f); + o->oBooNegatedAggressiveness = -RandomFloat() * 5.0f; + o->oBooTurningSpeed = (s32)(RandomFloat() * 128.0f); } - func_802C3830(-100.0f, o->oUnk1B0_S16 + 0x180, 0.5f); - sp1C = func_802C3778(); - if (boo_should_be_stopped()) + + boo_chase_mario(-100.0f, o->oBooTurningSpeed + 0x180, 0.5f); + attackStatus = boo_get_attack_status(); + + if (boo_should_be_stopped()) { o->oAction = 0; - if (sp1C == -1) + } + + if (attackStatus == BOO_BOUNCED_ON) { o->oAction = 2; - if (sp1C == 1) + } + + if (attackStatus == BOO_ATTACKED) { o->oAction = 3; - if (sp1C == 1) - create_sound_spawner(SOUND_OBJECT_DYINGENEMY1); + } + + if (attackStatus == BOO_ATTACKED) { + create_sound_spawner(SOUND_OBJ_DYING_ENEMY1); + } } -void ActionBoo2(void) { - if (func_802C33D0(20.0f)) +static void ActionBoo2(void) { + if (boo_update_after_bounced_on(20.0f)) { o->oAction = 1; + } } -void ActionBoo3(void) { - if (func_802C35C0()) { - if (o->oBehParams2ndByte != 0) +static void ActionBoo3(void) { + if (boo_update_during_death()) { + if (o->oBehParams2ndByte != 0) { mark_object_for_deletion(o); - else { + } else { o->oAction = 4; obj_disable(); } @@ -400,61 +454,78 @@ void ActionBoo3(void) { } // Called when a Go on a Ghost Hunt boo dies -void ActionBoo4(void) { +static void ActionBoo4(void) { s32 dialogID; // If there are no remaining "minion" boos, show the dialog of the Big Boo - if (obj_nearest_object_with_behavior(bhvGhostHuntBoo) == NULL) + if (obj_nearest_object_with_behavior(bhvGhostHuntBoo) == NULL) { dialogID = 108; - else + } else { dialogID = 107; + } - if (obj_update_dialog_unk1(2, 2, dialogID, 0)) { - create_sound_spawner(SOUND_OBJECT_DYINGENEMY1); + if (obj_update_dialog(2, 2, dialogID, 0)) { + create_sound_spawner(SOUND_OBJ_DYING_ENEMY1); mark_object_for_deletion(o); - if (dialogID == 108) // If the Big Boo should spawn, play the jingle + + if (dialogID == 108) { // If the Big Boo should spawn, play the jingle play_puzzle_jingle(); + } } } -void (*sBooActions[])(void) = { - ActionBoo0, ActionBoo1, ActionBoo2, ActionBoo3, ActionBoo4, ActionBoo5 +static void (*sBooActions[])(void) = { + ActionBoo0, + ActionBoo1, + ActionBoo2, + ActionBoo3, + ActionBoo4, + ActionBoo5 }; void bhv_boo_loop(void) { - // PARTIAL_UPDATE + //PARTIAL_UPDATE + obj_update_floor_and_walls(); obj_call_action_function(sBooActions); obj_move_standard(78); boo_approach_target_opacity_and_update_scale(); + if (object_has_behavior(o->parentObj, bhvMerryGoRoundBooManager)) { - if (o->activeFlags == 0) - o->parentObj->oMerryGoRoundBooManagerNumMinionBoosKilled++; + if (o->activeFlags == 0) { + o->parentObj->oMerryGoRoundBooManagerNumBoosKilled++; + } } + o->oInteractStatus = 0; } -void ActionBooGivingStar0(void) { +static void ActionBooGivingStar0(void) { if (obj_has_behavior(bhvBalconyBigBoo)) { - func_802C49E0(); + obj_set_secondary_camera_focus(); // number of killed boos set > 5 so that boo always loads // redundant? this is also done in behavior_data.s o->oBigBooNumMinionBoosKilled = 10; } + o->oBooParentBigBoo = NULL; + #ifndef VERSION_JP - if (boo_should_be_active() && gDebugInfo[5][0] + 5 <= o->oBigBooNumMinionBoosKilled) + if (boo_should_be_active() && gDebugInfo[5][0] + 5 <= o->oBigBooNumMinionBoosKilled) { #else - if (boo_should_be_active() && o->oBigBooNumMinionBoosKilled >= 5) + if (boo_should_be_active() && o->oBigBooNumMinionBoosKilled >= 5) { #endif - { o->oAction = 1; + obj_set_pos_to_home(); - o->oMoveAngleYaw = o->oBooUnk110; + o->oMoveAngleYaw = o->oBooInitialMoveYaw; + obj_unhide(); + o->oBooTargetOpacity = 0xFF; o->oBooBaseScale = 3.0f; o->oHealth = 3; + obj_scale(3.0f); obj_become_tangible(); } else { @@ -464,10 +535,11 @@ void ActionBooGivingStar0(void) { } } -void ActionBooGivingStar1(void) { - s32 sp24; +static void ActionBooGivingStar1(void) { + s32 attackStatus; s16 sp22; f32 sp1C; + if (o->oHealth == 3) { sp22 = 0x180; sp1C = 0.5f; @@ -478,194 +550,254 @@ void ActionBooGivingStar1(void) { sp22 = 0x300; sp1C = 0.8f; } - func_802C3830(-100.0f, sp22, sp1C); - sp24 = func_802C3778(); + + boo_chase_mario(-100.0f, sp22, sp1C); + + attackStatus = boo_get_attack_status(); + + // redundant; this check is in boo_should_be_stopped if (obj_has_behavior(bhvMerryGoRoundBigBoo)) { - if (gMarioOnMerryGoRound == FALSE) + if (gMarioOnMerryGoRound == FALSE) { o->oAction = 0; - } else if (boo_should_be_stopped()) + } + } else if (boo_should_be_stopped()) { o->oAction = 0; - if (sp24 == -1) + } + + if (attackStatus == BOO_BOUNCED_ON) { o->oAction = 2; - if (sp24 == 1) + } + + if (attackStatus == BOO_ATTACKED) { o->oAction = 3; - if (sp24 == 1) - create_sound_spawner(SOUND_OBJECT_THWOMP); + } + + if (attackStatus == 1) { + create_sound_spawner(SOUND_OBJ_THWOMP); + } } -void ActionBooGivingStar2(void) { - if (func_802C33D0(20.0f)) +static void ActionBooGivingStar2(void) { + if (boo_update_after_bounced_on(20.0f)) { o->oAction = 1; + } } -void func_802C41AC(void) { +static void big_boo_spawn_ghost_hunt_star(void) { create_star(980.0f, 1100.0f, 250.0f); } -void func_802C41E4(void) { +static void big_boo_spawn_balcony_star(void) { create_star(700.0f, 3200.0f, 1900.0f); } -void func_802C4220(void) { +static void big_boo_spawn_merry_go_round_star(void) { struct Object *merryGoRound; create_star(-1600.0f, -2100.0f, 205.0f); merryGoRound = obj_nearest_object_with_behavior(bhvMerryGoRound); - if (merryGoRound != NULL) + if (merryGoRound != NULL) { merryGoRound->oMerryGoRoundStopped = TRUE; + } } -void ActionBooGivingStar3(void) { - if (o->oTimer == 0) +static void ActionBooGivingStar3(void) { + if (o->oTimer == 0) { o->oHealth--; + } + if (o->oHealth == 0) { - if (func_802C35C0()) { + if (boo_update_during_death()) { obj_disable(); + o->oAction = 4; + set_object_angle(o, 0, 0, 0); - if (o->oBehParams2ndByte == 0) - func_802C41AC(); - else if (o->oBehParams2ndByte == 1) - func_802C4220(); - else - func_802C41E4(); + + if (o->oBehParams2ndByte == 0) { + big_boo_spawn_ghost_hunt_star(); + } else if (o->oBehParams2ndByte == 1) { + big_boo_spawn_merry_go_round_star(); + } else { + big_boo_spawn_balcony_star(); + } } } else { if (o->oTimer == 0) { func_802A3004(); - // double o->oBooBaseScale -= 0.5; } - if (func_802C34B4(40.0f)) + + if (big_boo_update_during_nonlethal_hit(40.0f)) { o->oAction = 1; + } } } -void ActionBooGivingStar4(void) { +static void ActionBooGivingStar4(void) { #ifndef VERSION_JP boo_stop(); #endif + if (o->oBehParams2ndByte == 0) { set_object_pos(o, 973, 0, 626); + if (o->oTimer > 60 && o->oDistanceToMario < 600.0f) { - set_object_pos(o, 973, 0, 717); - spawn_object_relative(0, 0, 0, 0, o, MODEL_BBH_STAIRCASE_STEP, bhvBooBossSpawnedBridge); + set_object_pos(o, 973, 0, 717); + + spawn_object_relative(0, 0, 0, 0, o, MODEL_BBH_STAIRCASE_STEP, bhvBooBossSpawnedBridge); spawn_object_relative(1, 0, 0, -200, o, MODEL_BBH_STAIRCASE_STEP, bhvBooBossSpawnedBridge); - spawn_object_relative(2, 0, 0, 200, o, MODEL_BBH_STAIRCASE_STEP, bhvBooBossSpawnedBridge); + spawn_object_relative(2, 0, 0, 200, o, MODEL_BBH_STAIRCASE_STEP, bhvBooBossSpawnedBridge); + mark_object_for_deletion(o); } - } else + } else { mark_object_for_deletion(o); + } } -void (*sBooGivingStarActions[])(void) = { ActionBooGivingStar0, ActionBooGivingStar1, - ActionBooGivingStar2, ActionBooGivingStar3, - ActionBooGivingStar4 }; +static void (*sBooGivingStarActions[])(void) = { + ActionBooGivingStar0, + ActionBooGivingStar1, + ActionBooGivingStar2, + ActionBooGivingStar3, + ActionBooGivingStar4 +}; void bhv_big_boo_loop(void) { - // PARTIAL_UPDATE + //PARTIAL_UPDATE + set_object_hitbox(o, &sBooGivingStarHitbox); + o->oGraphYOffset = o->oBooBaseScale * 60.0f; + obj_update_floor_and_walls(); obj_call_action_function(sBooGivingStarActions); obj_move_standard(78); + boo_approach_target_opacity_and_update_scale(); o->oInteractStatus = 0; } -void ActionBooWithCage0(void) { +static void ActionBooWithCage0(void) { o->oBooParentBigBoo = NULL; o->oBooTargetOpacity = 0xFF; o->oBooBaseScale = 2.0f; + obj_scale(2.0f); obj_become_tangible(); - if (boo_should_be_active()) + + if (boo_should_be_active()) { o->oAction = 1; + } } -void ActionBooWithCage1(void) { - s32 sp1C; +static void ActionBooWithCage1(void) { + s32 attackStatus; - func_802C3830(100.0f, 512, 0.5f); - sp1C = func_802C3778(); - if (boo_should_be_stopped()) + boo_chase_mario(100.0f, 512, 0.5f); + + attackStatus = boo_get_attack_status(); + + if (boo_should_be_stopped()) { o->oAction = 0; - if (sp1C == -1) + } + + if (attackStatus == BOO_BOUNCED_ON) { o->oAction = 2; - if (sp1C == 1) + } + + if (attackStatus == BOO_ATTACKED) { o->oAction = 3; + } } -void ActionBooWithCage2(void) { - if (func_802C33D0(20.0f)) +static void ActionBooWithCage2(void) { + if (boo_update_after_bounced_on(20.0f)) { o->oAction = 1; + } } -void ActionBooWithCage3(void) { - if (func_802C35C0()) +static void ActionBooWithCage3(void) { + if (boo_update_during_death()) { mark_object_for_deletion(o); + } } void bhv_boo_with_cage_init(void) { - struct Object *cage; - if (gHudDisplay.stars < 12) + struct Object* cage; + + if (gHudDisplay.stars < 12) { mark_object_for_deletion(o); - else { + } else { cage = spawn_object(o, MODEL_HAUNTED_CAGE, bhvBooCage); cage->oBehParams = o->oBehParams; } } -void (*sBooWithCageActions[])(void) = { ActionBooWithCage0, ActionBooWithCage1, ActionBooWithCage2, - ActionBooWithCage3 }; +static void (*sBooWithCageActions[])(void) = { + ActionBooWithCage0, + ActionBooWithCage1, + ActionBooWithCage2, + ActionBooWithCage3 +}; -void bhv_boo_with_cage_loop(void) { - // PARTIAL_UPDATE +void bhv_boo_with_cage_loop(void) +{ + //PARTIAL_UPDATE + obj_update_floor_and_walls(); obj_call_action_function(sBooWithCageActions); obj_move_standard(78); + boo_approach_target_opacity_and_update_scale(); o->oInteractStatus = 0; } void bhv_merry_go_round_boo_manager_loop(void) { - struct Object *sp24; switch (o->oAction) { case 0: if (o->oDistanceToMario < 1000.0f) { - if (o->oMerryGoRoundBooManagerNumMinionBoosKilled < 5) { - if (o->oUnknownUnkFC_S32 != 5) { - if (o->oUnknownUnkFC_S32 - o->oMerryGoRoundBooManagerNumMinionBoosKilled < 2) { + if (o->oMerryGoRoundBooManagerNumBoosKilled < 5) { + if (o->oMerryGoRoundBooManagerNumBoosSpawned != 5) { + if (o->oMerryGoRoundBooManagerNumBoosSpawned - o->oMerryGoRoundBooManagerNumBoosKilled < 2) { spawn_object(o, MODEL_BOO, bhvMerryGoRoundBoo); - o->oUnknownUnkFC_S32++; + o->oMerryGoRoundBooManagerNumBoosSpawned++; } } + o->oAction++; } - if (o->oMerryGoRoundBooManagerNumMinionBoosKilled > 4) { - sp24 = spawn_object(o, MODEL_BOO, bhvMerryGoRoundBigBoo); - copy_object_behavior_params(sp24, o); + + if (o->oMerryGoRoundBooManagerNumBoosKilled > 4) { + struct Object *boo = spawn_object(o, MODEL_BOO, bhvMerryGoRoundBigBoo); + copy_object_behavior_params(boo, o); + o->oAction = 2; + #ifndef VERSION_JP play_puzzle_jingle(); #else - play_sound(SOUND_CH8_RIGHTANSWER, gDefaultSoundArgs); + play_sound(SOUND_GENERAL2_RIGHT_ANSWER, gDefaultSoundArgs); #endif } } + break; case 1: - if (o->oTimer > 60) + if (o->oTimer > 60) { o->oAction = 0; + } + break; case 2: break; } } -void func_802C49E0(void) { +void obj_set_secondary_camera_focus(void) { gSecondCameraFocus = o; } @@ -674,80 +806,111 @@ void bhv_animated_texture_loop(void) { } void bhv_boo_in_castle_loop(void) { - s16 sp1E; + s16 targetAngle; + o->oBooBaseScale = 2.0f; + if (o->oAction == 0) { obj_hide(); - if (gHudDisplay.stars < 12) + + if (gHudDisplay.stars < 12) { mark_object_for_deletion(o); - if (gMarioCurrentRoom == 1) + } + + if (gMarioCurrentRoom == 1) { o->oAction++; + } } else if (o->oAction == 1) { obj_unhide(); + o->oOpacity = 180; - if (o->oTimer == 0) + + if (o->oTimer == 0) { obj_scale(o->oBooBaseScale); + } + if (o->oDistanceToMario < 1000.0f) { o->oAction++; - PlaySound2(SOUND_BOO_LAUGH_LONG); + PlaySound2(SOUND_OBJ_BOO_LAUGH_LONG); } + o->oForwardVel = 0.0f; - sp1E = o->oAngleToMario; + targetAngle = o->oAngleToMario; } else { - obj_obj_forward_vel_approach_upward(32.0f, 1.0f); + obj_forward_vel_approach_upward(32.0f, 1.0f); + o->oHomeX = -1000.0f; o->oHomeZ = -9000.0f; - sp1E = obj_angle_to_home(); + + targetAngle = obj_angle_to_home(); + if (o->oPosZ < -5000.0f) { - if (o->oOpacity > 0) + if (o->oOpacity > 0) { o->oOpacity -= 20; - else + } else { o->oOpacity = 0; + } } - if (o->activeFlags & 8) + + if (o->activeFlags & ACTIVE_FLAG_IN_DIFFERENT_ROOM) { o->oAction = 1; + } } + o->oVelY = 0.0f; - sp1E = obj_angle_to_home(); - obj_rotate_yaw_toward(sp1E, 0x5A8); + + targetAngle = obj_angle_to_home(); + + obj_rotate_yaw_toward(targetAngle, 0x5A8); boo_oscillate(TRUE); obj_move_using_fvel_and_gravity(); } void bhv_boo_boss_spawned_bridge_loop(void) { - f32 sp24; + f32 targetY; + switch (o->oBehParams2ndByte) { case 1: - sp24 = 0.0f; + targetY = 0.0f; break; case 0: - sp24 = -206.0f; + targetY = -206.0f; break; case 2: - sp24 = -413.0f; + targetY = -413.0f; break; } - switch (o->oAction) { + + switch(o->oAction) { case 0: o->oPosY = o->oHomeY - 620.0f; o->oAction++; + // fallthrough case 1: o->oPosY += 8.0f; - PlaySound(SOUND_ENVIRONMENT_ELEVATOR2); - if (o->oPosY > sp24) { - o->oPosY = sp24; + PlaySound(SOUND_ENV_ELEVATOR2); + + if (o->oPosY > targetY) { + o->oPosY = targetY; o->oAction++; } + break; case 2: - if (o->oTimer == 0) + if (o->oTimer == 0) { PlaySound2(SOUND_GENERAL_UNKNOWN4_LOWPRIO); - if (func_802A362C(o->oTimer)) + } + + if (func_802A362C(o->oTimer)) { o->oAction++; + } + break; case 3: - if (o->oTimer == 0 && o->oBehParams2ndByte == 1) + if (o->oTimer == 0 && o->oBehParams2ndByte == 1) { play_puzzle_jingle(); + } + break; } } diff --git a/src/game/behaviors/boo_cage.inc.c b/src/game/behaviors/boo_cage.inc.c index 32644b1..6cfc8f8 100644 --- a/src/game/behaviors/boo_cage.inc.c +++ b/src/game/behaviors/boo_cage.inc.c @@ -65,7 +65,7 @@ void bhv_boo_cage_loop(void) { // When the cage lands/bounces, play a landing/bouncing sound. if (o->oMoveFlags & OBJ_MOVE_LANDED) { - PlaySound2(SOUND_GENERAL_SOFTLANDING); + PlaySound2(SOUND_GENERAL_SOFT_LANDING); } // Once the cage stops bouncing and settles on the ground, diff --git a/src/game/behaviors/boulder.inc.c b/src/game/behaviors/boulder.inc.c index bd16481..ad43ad0 100644 --- a/src/game/behaviors/boulder.inc.c +++ b/src/game/behaviors/boulder.inc.c @@ -15,7 +15,7 @@ void func_802F05DC(void) { sp1E = func_802E4204(); if ((sp1E & 0x09) == 0x01 && o->oVelY > 10.0f) { - PlaySound2(SOUND_GENERAL_GRINDELROLL); + PlaySound2(SOUND_GENERAL_GRINDEL_ROLL); func_802A3004(); } @@ -38,7 +38,7 @@ void bhv_big_boulder_loop(void) { case 1: func_802F05DC(); func_802EFB84(1.5f); - PlaySound(SOUND_ENVIRONMENT_UNKNOWN2); + PlaySound(SOUND_ENV_UNKNOWN2); break; } diff --git a/src/game/behaviors/bowling_ball.inc.c b/src/game/behaviors/bowling_ball.inc.c index 809d54c..0846606 100644 --- a/src/game/behaviors/bowling_ball.inc.c +++ b/src/game/behaviors/bowling_ball.inc.c @@ -42,23 +42,23 @@ void func_802EDA14(void) { void func_802EDA6C(void) { switch (o->oBehParams2ndByte) { case BBALL_BP_STYPE_BOB_UPPER: - o->oBowlingBallUnkFC = segmented_to_virtual(bob_seg7_metal_ball_path0); + o->oPathedWaypointsS16 = segmented_to_virtual(bob_seg7_metal_ball_path0); break; case BBALL_BP_STYPE_TTM: - o->oBowlingBallUnkFC = segmented_to_virtual(ttm_seg7_trajectory_070170A0); + o->oPathedWaypointsS16 = segmented_to_virtual(ttm_seg7_trajectory_070170A0); break; case BBALL_BP_STYPE_BOB_LOWER: - o->oBowlingBallUnkFC = segmented_to_virtual(bob_seg7_metal_ball_path1); + o->oPathedWaypointsS16 = segmented_to_virtual(bob_seg7_metal_ball_path1); break; case BBALL_BP_STYPE_THI_LARGE: - o->oBowlingBallUnkFC = D_803315B4; + o->oPathedWaypointsS16 = D_803315B4; break; case BBALL_BP_STYPE_THI_SMALL: - o->oBowlingBallUnkFC = D_80331608; + o->oPathedWaypointsS16 = D_80331608; break; } } @@ -73,8 +73,7 @@ void bhv_bowling_ball_roll_loop(void) { //! Uninitialzed parameter, but the parameter is unused in the called function sp18 = obj_follow_path(sp18); - //! oBowlingBallInitYaw is never explicitly initialized, so it is 0. - o->oBowlingBallTargetYaw = o->oBowlingBallInitYaw; + o->oBowlingBallTargetYaw = o->oPathedTargetYaw; o->oMoveAngleYaw = approach_s16_symmetric(o->oMoveAngleYaw, o->oBowlingBallTargetYaw, 0x400); if (o->oForwardVel > 70.0) { o->oForwardVel = 70.0; @@ -92,7 +91,7 @@ void bhv_bowling_ball_roll_loop(void) { } if ((collisionFlags & OBJ_COL_FLAG_GROUNDED) && (o->oVelY > 5.0f)) - PlaySound2(SOUND_GENERAL_QUIETPOUND1_LOWPRIO); + PlaySound2(SOUND_GENERAL_QUIET_POUND1_LOWPRIO); } void bhv_bowling_ball_initializeLoop(void) { @@ -103,8 +102,7 @@ void bhv_bowling_ball_initializeLoop(void) { //! Uninitialzed parameter, but the parameter is unused in the called function sp1c = obj_follow_path(sp1c); - //! oBowlingBallInitYaw is never explicitly initialized, so it is 0. - o->oMoveAngleYaw = o->oBowlingBallInitYaw; + o->oMoveAngleYaw = o->oPathedTargetYaw; switch (o->oBehParams2ndByte) { case BBALL_BP_STYPE_BOB_UPPER: @@ -152,18 +150,18 @@ void bhv_bowling_ball_loop(void) { void bhv_generic_bowling_ball_spawner_init(void) { switch (o->oBehParams2ndByte) { case BBALL_BP_STYPE_BOB_UPPER: - o->oBBallSpwnrMaxSpawnDist = 7000.0f; - o->oBBallSpwnrSpawnOdds = 2.0f; + o->oBBallSpawnerMaxSpawnDist = 7000.0f; + o->oBBallSpawnerSpawnOdds = 2.0f; break; case BBALL_BP_STYPE_TTM: - o->oBBallSpwnrMaxSpawnDist = 8000.0f; - o->oBBallSpwnrSpawnOdds = 1.0f; + o->oBBallSpawnerMaxSpawnDist = 8000.0f; + o->oBBallSpawnerSpawnOdds = 1.0f; break; case BBALL_BP_STYPE_BOB_LOWER: - o->oBBallSpwnrMaxSpawnDist = 6000.0f; - o->oBBallSpwnrSpawnOdds = 2.0f; + o->oBBallSpawnerMaxSpawnDist = 6000.0f; + o->oBBallSpawnerSpawnOdds = 2.0f; break; } } @@ -178,10 +176,10 @@ void bhv_generic_bowling_ball_spawner_loop(void) { || (o->oPosY < gMarioObject->header.gfx.pos[1])) return; - if ((o->oTimer & o->oBBallSpwnrPeriodMinus1) == 0) /* Modulus */ + if ((o->oTimer & o->oBBallSpawnerPeriodMinus1) == 0) /* Modulus */ { - if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, o->oBBallSpwnrMaxSpawnDist)) { - if ((s32)(RandomFloat() * o->oBBallSpwnrSpawnOdds) == 0) { + if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, o->oBBallSpawnerMaxSpawnDist)) { + if ((s32)(RandomFloat() * o->oBBallSpawnerSpawnOdds) == 0) { bowlingBall = spawn_object(o, MODEL_BOWLING_BALL, bhvBowlingBall); bowlingBall->oBehParams2ndByte = o->oBehParams2ndByte; } @@ -225,7 +223,7 @@ void bhv_bob_pit_bowling_ball_loop(void) { func_802EDA14(); func_8027F440(4, o->oPosX, o->oPosY, o->oPosZ); - PlaySound(SOUND_ENVIRONMENT_UNKNOWN2); + PlaySound(SOUND_ENV_UNKNOWN2); SetObjectVisibility(o, 3000); } @@ -246,11 +244,11 @@ void bhv_free_bowling_ball_roll_loop(void) { if (o->oForwardVel > 10.0f) { func_8027F440(4, o->oPosX, o->oPosY, o->oPosZ); - PlaySound(SOUND_ENVIRONMENT_UNKNOWN2); + PlaySound(SOUND_ENV_UNKNOWN2); } if ((collisionFlags & OBJ_COL_FLAG_GROUNDED) && !(collisionFlags & OBJ_COL_FLAGS_LANDED)) - PlaySound2(SOUND_GENERAL_QUIETPOUND1_LOWPRIO); + PlaySound2(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 */ diff --git a/src/game/behaviors/bowser.inc.c b/src/game/behaviors/bowser.inc.c index b2363c8..d5645ea 100644 --- a/src/game/behaviors/bowser.inc.c +++ b/src/game/behaviors/bowser.inc.c @@ -32,10 +32,10 @@ s8 D_8032F4FC[] = { 7, 8, 9, 12, 13, 14, 15, 4, 3, 16, 17, 19, 3, 3, 3, 3 }; s16 D_8032F50C[] = { 60, 0 }; s16 D_8032F510[] = { 50, 0 }; s8 D_8032F514[] = { 24, 42, 60, -1 }; -s16 D_8032F518[3] = { 119, 120, 121 }; +s16 sBowserDefeatedDialogText[3] = { 119, 120, 121 }; s16 D_8032F520[][3] = { { 1, 10, 40 }, { 0, 0, 74 }, { -1, -10, 114 }, { 1, -20, 134 }, { -1, 20, 154 }, { 1, 40, 164 }, { -1, -40, 174 }, { 1, -80, 179 }, - { -1, 80, 184 }, { 1, 160, 186 }, { -1, -160, 186 }, { 1, 0, 0 } }; + { -1, 80, 184 }, { 1, 160, 186 }, { -1, -160, 186 }, { 1, 0, 0 }, }; void bhv_bowser_tail_anchor_loop(void) { obj_call_action_function(sBowserTailAnchorActions); @@ -58,7 +58,7 @@ void bhv_bowser_flame_spawn_loop(void) { if (bowser->header.gfx.unk38.curAnim->unk08 == sp30) sp30 = 0; if (sp30 > 45 && sp30 < 85) { - PlaySound(SOUND_CH6_BOWSERSPITFIRE); + PlaySound(SOUND_AIR_BOWSER_SPIT_FIRE); sp2C = sp1C[5 * sp30]; sp28 = sp1C[5 * sp30 + 2]; o->oPosX = bowser->oPosX + (sp28 * sp20 + sp2C * sp24); @@ -111,7 +111,7 @@ void func_802B392C(s32 *a) { if (a[0] < 4) { func_802A11B4(o, 8); func_802AA618(0, 0, 60.0f); - PlaySound2(SOUND_OBJECT_BOWSERWALK); + PlaySound2(SOUND_OBJ_BOWSER_WALK); } } } @@ -150,9 +150,9 @@ s32 func_802B3A98(void) { } void func_802B3B0C(void) { - if (o->oUnknownUnk88 == 0) + if (o->oBowserUnk88 == 0) o->oAction = 5; - else if (o->oUnknownUnk88 == 1) + else if (o->oBowserUnk88 == 1) o->oAction = 6; else if (o->oBehParams2ndByte == 1) o->oAction = 13; @@ -175,8 +175,8 @@ void ActionBowser6(void) { if (func_802B3A30()) o->oSubAction++; } else if (func_802B3A98()) { - if (o->oUnknownUnk88 == 1) - o->oUnknownUnk88 = 0; + if (o->oBowserUnk88 == 1) + o->oBowserUnk88 = 0; func_802B3B0C(); } } @@ -321,7 +321,7 @@ void ActionBowser0() // only lasts one frame void ActionBowser15(void) { o->oForwardVel = 0.0f; if (o->oTimer == 0) - PlaySound2(SOUND_OBJECT_BOWSERINHALING); + PlaySound2(SOUND_OBJ_BOWSER_INHALING); if (func_802A4AB0(6)) o->oAction = 0; } @@ -361,10 +361,10 @@ void ActionBowser16(void) { switch (o->oSubAction) { case 0: obj_become_intangible(); - o->oUnk1AC_S16 = 0; + o->oBowserUnk1AC = 0; o->oBowserUnkF8 = 30; if (o->oTimer == 0) - PlaySound2(SOUND_CH9_UNK66); + PlaySound2(SOUND_OBJ2_BOWSER_TELEPORT); if (o->oOpacity == 0) { o->oSubAction++; o->oMoveAngleYaw = o->oAngleToMario; @@ -381,12 +381,12 @@ void ActionBowser16(void) { if (o->oDistanceToMario > 500.0f) { o->oSubAction = 2; o->oMoveAngleYaw = o->oAngleToMario; // large change in angle? - PlaySound2(SOUND_CH9_UNK66); + PlaySound2(SOUND_OBJ2_BOWSER_TELEPORT); } break; case 2: o->oForwardVel = 0.0f; - o->oUnk1AC_S16 = 0xFF; + o->oBowserUnk1AC = 0xFF; if (o->oOpacity == 0xFF) o->oAction = 0; obj_become_tangible(); @@ -400,7 +400,7 @@ void ActionBowser8(void) // only in sky set_obj_animation_and_sound_state(11); frame = o->header.gfx.unk38.animFrame; if (frame > 24 && frame < 36) { - PlaySound(SOUND_CH6_BOWSERSPITFIRE); + PlaySound(SOUND_AIR_BOWSER_SPIT_FIRE); if (frame == 35) spawn_object_relative(1, 0, 0x190, 0x64, o, MODEL_RED_FLAME, bhvBlueBowserFlame); else @@ -491,7 +491,7 @@ void ActionBowser13(void) { } } else if (o->oSubAction == 1) { #ifndef VERSION_JP - if (o->oBehParams2ndByte == 2 && o->oUnknownUnkF4_S32 & 0x10000) + if (o->oBehParams2ndByte == 2 && o->oBowserUnkF4 & 0x10000) func_u_802B4AF4(); if (func_802B4A94()) { o->oBowserUnkF4 &= 0xfffeffff; @@ -676,7 +676,7 @@ void ActionBowser1(void) // unused? } void func_802B5738(void) { - o->oUnk1AC_S16 = 0; + o->oBowserUnk1AC = 0; if (o->oOpacity == 0) { o->oForwardVel = 0.0f; o->oVelY = 0.0f; @@ -710,7 +710,7 @@ void ActionBowser2(void) { if (obj_check_anim_frame(11)) { o->oMoveAngleYaw = o->oBowserAngleToCentre; o->oVelY = 150.0f; - o->oUnk1AC_S16 = 0xFF; + o->oBowserUnk1AC = 0xFF; o->oBowserUnkF8 = 0; o->oSubAction++; } else @@ -723,9 +723,9 @@ void ActionBowser2(void) { if (absf(o->oFloorHeight - o->oHomeY) < 100.0f) approach_f32_signed(&o->oForwardVel, 0, -5.0f); else - obj_obj_forward_vel_approach_upward(150.0f, 2.0f); + obj_forward_vel_approach_upward(150.0f, 2.0f); } else - obj_obj_forward_vel_approach_upward(150.0f, 2.0f); + obj_forward_vel_approach_upward(150.0f, 2.0f); } if (func_802B4A94()) { o->oDragStrength = 10.0f; @@ -760,7 +760,7 @@ void ActionBowser2(void) { void ActionBowser3(void) { if (item_in_array(o->oTimer, D_8032F514)) - PlaySound2(SOUND_OBJECT_BOWSERWALK); + PlaySound2(SOUND_OBJ_BOWSER_WALK); if (func_802A4AB0(10)) o->oAction = 0; } @@ -770,7 +770,7 @@ void func_802B5C78(void) { gSecondCameraFocus = spawn_object(o, MODEL_STAR, &bhvGrandStar); else { gSecondCameraFocus = spawn_object(o, MODEL_BOWSER_KEY, &bhvBowserKey); - PlaySound2(SOUND_CH8_UNK61); + PlaySound2(SOUND_GENERAL2_BOWSER_KEY); } gSecondCameraFocus->oAngleVelYaw = o->oAngleVelYaw; } @@ -791,7 +791,7 @@ void func_802B5DD8(void) { o->oBowserEyesShut = 1; func_802B392C(&o->oBowserUnkF8); if (o->oMoveFlags & 1) - PlaySound2(SOUND_OBJECT_BOWSERWALK); + PlaySound2(SOUND_OBJ_BOWSER_WALK); if (o->oMoveFlags & 2) { o->oForwardVel = 0.0f; o->oSubAction++; @@ -843,11 +843,11 @@ s32 func_802B6120(void) { func_8031FFB4(0, 60, 40); o->oBowserUnkF8++; } - if (obj_update_dialog_unk1(2, 18, D_8032F518[o->oBehParams2ndByte], 0)) { + if (obj_update_dialog(2, 18, sBowserDefeatedDialogText[o->oBehParams2ndByte], 0)) { o->oBowserUnkF8++; - PlaySound2(SOUND_CH8_UNK60); - func_80320040(0, 60); - func_8031F7CC(0, 1); + PlaySound2(SOUND_GENERAL2_BOWSER_EXPLODE); + sequence_player_unlower(0, 60); + sequence_player_fade_out(0, 1); } } else if (func_802B5F20()) { func_802B60B8(); @@ -862,20 +862,20 @@ s32 func_802B6120(void) { s32 func_802B6254(void) { UNUSED s32 unused; s32 ret = 0; - s32 sp1C; + s32 dialogID; if (o->oBowserUnkF8 < 2) { if (gHudDisplay.stars < 120) - sp1C = 121; + dialogID = 121; else - sp1C = 163; + dialogID = 163; if (o->oBowserUnkF8 == 0) { func_8031FFB4(0, 60, 40); o->oBowserUnkF8++; } - if (obj_update_dialog_unk1(2, 18, sp1C, 0)) { + if (obj_update_dialog(2, 18, dialogID, 0)) { obj_set_model(MODEL_BOWSER2); - func_80320040(0, 60); - func_8031F7CC(0, 1); + sequence_player_unlower(0, 60); + sequence_player_fade_out(0, 1); func_802B5C78(); o->oBowserUnkF8++; } @@ -950,7 +950,7 @@ void ActionBowser19(void) { sp28 = (o->oTimer - D_8032F520[i - 1][2]) * sp28; func_802B64E8(platform, sp28); if (sp28 != 0) - play_sound(SOUND_ENVIRONMENT_UNKNOWN4, platform->header.gfx.cameraToObject); + play_sound(SOUND_ENV_UNKNOWN4, platform->header.gfx.cameraToObject); sp1C = 0; break; } @@ -995,25 +995,25 @@ struct SoundState D_8032F5B8[] = { { 0, 0, 0, NO_SOUND }, { 0, 0, 0, NO_SOUND }, { 0, 0, 0, NO_SOUND }, { 0, 0, 0, NO_SOUND }, - { 1, 0, -1, SOUND_OBJECT_BOWSERWALK }, - { 1, 0, -1, SOUND_CH9_UNK04 }, - { 1, 0, -1, SOUND_CH9_UNK04 }, + { 1, 0, -1, SOUND_OBJ_BOWSER_WALK }, + { 1, 0, -1, SOUND_OBJ2_BOWSER_ROAR }, + { 1, 0, -1, SOUND_OBJ2_BOWSER_ROAR }, { 0, 0, 0, NO_SOUND }, { 0, 0, 0, NO_SOUND }, - { 1, 20, 40, SOUND_OBJECT_BOWSERWALK }, - { 1, 20, -1, SOUND_OBJECT_BOWSERWALK }, - { 1, 20, 40, SOUND_OBJECT_BOWSERWALK }, - { 1, 0, -1, SOUND_OBJECT_BOWSERTAILPICKUP }, - { 1, 0, -1, SOUND_OBJECT_BOWSERDEFEATED }, - { 1, 8, -1, SOUND_OBJECT_BOWSERWALK }, - { 1, 8, 17, SOUND_OBJECT_BOWSERWALK }, - { 1, 8, -10, SOUND_OBJECT_BOWSERWALK }, + { 1, 20, 40, SOUND_OBJ_BOWSER_WALK }, + { 1, 20, -1, SOUND_OBJ_BOWSER_WALK }, + { 1, 20, 40, SOUND_OBJ_BOWSER_WALK }, + { 1, 0, -1, SOUND_OBJ_BOWSER_TAIL_PICKUP }, + { 1, 0, -1, SOUND_OBJ_BOWSER_DEFEATED }, + { 1, 8, -1, SOUND_OBJ_BOWSER_WALK }, + { 1, 8, 17, SOUND_OBJ_BOWSER_WALK }, + { 1, 8, -10, SOUND_OBJ_BOWSER_WALK }, { 0, 0, 0, NO_SOUND }, - { 1, 5, -1, SOUND_OBJECT_FLAMEBLOWN }, + { 1, 5, -1, SOUND_OBJ_FLAME_BLOWN }, { 0, 0, 0, NO_SOUND }, { 0, 0, 0, NO_SOUND }, - { 1, 0, -1, SOUND_OBJECT_BOWSERTAILPICKUP }, - { 1, 0, -1, SOUND_CH9_UNK04 } }; + { 1, 0, -1, SOUND_OBJ_BOWSER_TAIL_PICKUP }, + { 1, 0, -1, SOUND_OBJ2_BOWSER_ROAR } }; s8 D_8032F690[4] = { 0, 0, 1, 0 }; s8 D_8032F694[4] = { 1, 1, 3, 0 }; extern u8 bowser_3_seg7_collision_07004B94[]; @@ -1063,7 +1063,7 @@ void func_802B697C(void) { obj_become_intangible(); switch (o->oBowserUnk10E) { case 0: - PlaySound2(SOUND_OBJECT_BOWSERTAILPICKUP); + PlaySound2(SOUND_OBJ_BOWSER_TAIL_PICKUP); func_8029FA5C(3, 1); o->oBowserUnk10E++; break; @@ -1134,8 +1134,8 @@ void bhv_bowser_loop(void) { } obj_align_gfx_with_floor(); if (o->oAction != 4) - if (o->oUnk1AC_S16 != o->oOpacity) { - if (o->oUnk1AC_S16 > o->oOpacity) { + if (o->oBowserUnk1AC != o->oOpacity) { + if (o->oBowserUnk1AC > o->oOpacity) { o->oOpacity += 20; if (o->oOpacity >= 0x100) o->oOpacity = 0xFF; @@ -1151,7 +1151,7 @@ void bhv_bowser_init(void) { s32 level; // 0 is dw, 1 is fs, 2 is sky o->oBowserUnk110 = 1; o->oOpacity = 0xFF; - o->oUnk1AC_S16 = 0xFF; + o->oBowserUnk1AC = 0xFF; if (gCurrLevelNum == LEVEL_BOWSER_2) level = 1; else if (gCurrLevelNum == LEVEL_BOWSER_3) @@ -1283,7 +1283,7 @@ Gfx *Geo18_802B7D44(s32 a0, struct GraphNode *node, UNUSED s32 a2) { sp20->fnNode.node.flags = (sp20->fnNode.node.flags & 0xFF) | 0x100; else sp20->fnNode.node.flags = (sp20->fnNode.node.flags & 0xFF) | (0x100 | 0x400); - sp28 = sp2C = alloc_display_list(16); + sp28 = sp2C = alloc_display_list(2 * sizeof(Gfx)); if (sp24->oBowserUnk1B2 != 0) { gSPClearGeometryMode(sp28++, G_LIGHTING); @@ -1304,7 +1304,7 @@ void ActionFallingBowserPlatform1(void) { UNUSED s32 unused; struct Object *sp0 = o->oPlatformUnkF8; if (sp0->platform == o) - if (sp0->oAction == 13 && sp0->oUnknownUnkF4_S32 & 0x10000) + if (sp0->oAction == 13 && sp0->oBowserUnkF4 & 0x10000) o->oAction = 2; if (sp0->oHealth == 1 && (sp0->oAction == 3 || sp0->oHeldState != HELD_FREE)) o->oSubAction = 1; @@ -1323,7 +1323,7 @@ void ActionFallingBowserPlatform2(void) { f32 sp1C; UNUSED struct Object *sp18 = o->oPlatformUnkF8; if (o->oTimer == 0 || o->oTimer == 22) - PlaySound2(SOUND_GENERAL_BOWSERPLATFORM_2); + PlaySound2(SOUND_GENERAL_BOWSER_PLATFORM_2); if (o->oTimer < 22) { set_camera_shake_2(SHAKE_2_FALLING_BITS_PLAT); o->oVelY = 8.0f; diff --git a/src/game/behaviors/bowser_bomb.inc.c b/src/game/behaviors/bowser_bomb.inc.c index 08be91e..14bca10 100644 --- a/src/game/behaviors/bowser_bomb.inc.c +++ b/src/game/behaviors/bowser_bomb.inc.c @@ -10,7 +10,7 @@ void bhv_bowser_bomb_loop(void) { if (o->oInteractStatus & INTERACT_MR_BLIZZARD) /* bit 21 */ { spawn_object(o, MODEL_BOWSER_FLAMES, bhvBowserBombExplosion); - create_sound_spawner(SOUND_GENERAL_EXPLOSION5); + create_sound_spawner(SOUND_GENERAL_BOWSER_BOMB_EXPLOSION); func_8027F440(3, o->oPosX, o->oPosY, o->oPosZ); o->activeFlags = 0; } diff --git a/src/game/behaviors/bowser_key_cutscene.inc.c b/src/game/behaviors/bowser_key_cutscene.inc.c index f6ae054..108f726 100644 --- a/src/game/behaviors/bowser_key_cutscene.inc.c +++ b/src/game/behaviors/bowser_key_cutscene.inc.c @@ -4,7 +4,7 @@ Gfx *Geo18_802BA2B0(s32 run, struct GraphNode *node, UNUSED f32 mtx[4][4]) { struct Object *sp4; if (run == TRUE) { sp4 = (struct Object *) gCurGraphNodeObject; - ((struct GraphNodeScale *) node->next)->scale = sp4->oUnknownUnkF4_F32; + ((struct GraphNodeScale *) node->next)->scale = sp4->oBowserKeyScale; } return 0; } @@ -14,17 +14,17 @@ void bhv_bowser_key_unlock_door_loop(void) { animTimer = o->header.gfx.unk38.animFrame; set_obj_animation_and_sound_state(0); if (animTimer < 38) - o->oBowserKeyUnlockDoorScale = 0.0f; + o->oBowserKeyScale = 0.0f; else if (animTimer < 49) - o->oBowserKeyUnlockDoorScale = 0.2f; + o->oBowserKeyScale = 0.2f; else if (animTimer < 58) - o->oBowserKeyUnlockDoorScale = (animTimer - 53) * 0.11875f + 0.2; // 0.11875? + o->oBowserKeyScale = (animTimer - 53) * 0.11875f + 0.2; // 0.11875? else if (animTimer < 59) - o->oBowserKeyUnlockDoorScale = 1.1f; + o->oBowserKeyScale = 1.1f; else if (animTimer < 60) - o->oBowserKeyUnlockDoorScale = 1.05f; + o->oBowserKeyScale = 1.05f; else - o->oBowserKeyUnlockDoorScale = 1.0f; + o->oBowserKeyScale = 1.0f; if (o->oTimer > 150) mark_object_for_deletion(o); } @@ -33,15 +33,15 @@ void bhv_bowser_key_course_exit_loop(void) { s32 animTimer = o->header.gfx.unk38.animFrame; set_obj_animation_and_sound_state(1); if (animTimer < 38) - o->oBowserKeyCourseExitScale = 0.2f; + o->oBowserKeyScale = 0.2f; else if (animTimer < 52) - o->oBowserKeyCourseExitScale = (animTimer - 42) * 0.042857f + 0.2; // TODO 3/70? + o->oBowserKeyScale = (animTimer - 42) * 0.042857f + 0.2; // TODO 3/70? else if (animTimer < 94) - o->oBowserKeyCourseExitScale = 0.8f; + o->oBowserKeyScale = 0.8f; else if (animTimer < 101) - o->oBowserKeyCourseExitScale = (101 - animTimer) * 0.085714f + 0.2; // TODO 6/70? + o->oBowserKeyScale = (101 - animTimer) * 0.085714f + 0.2; // TODO 6/70? else - o->oBowserKeyCourseExitScale = 0.2f; + o->oBowserKeyScale = 0.2f; if (o->oTimer > 138) mark_object_for_deletion(o); } diff --git a/src/game/behaviors/bowser_puzzle_piece.inc.c b/src/game/behaviors/bowser_puzzle_piece.inc.c index cf6e962..96ddb1c 100644 --- a/src/game/behaviors/bowser_puzzle_piece.inc.c +++ b/src/game/behaviors/bowser_puzzle_piece.inc.c @@ -199,7 +199,7 @@ void bhv_lll_bowser_puzzle_piece_move(f32 xOffset, f32 zOffset, s32 duration, UN } else { // On frame 20, play the shifting sound. if (o->oTimer == 20) - PlaySound2(SOUND_BOWSER_PUZZLE_PIECE_MOVE); + PlaySound2(SOUND_OBJ2_BOWSER_PUZZLE_PIECE_MOVE); // For the number of frames specified by duration, move the piece. if (o->oTimer < duration + 20) { diff --git a/src/game/behaviors/breakable_box.inc.c b/src/game/behaviors/breakable_box.inc.c index 4995dfd..9960aaf 100644 --- a/src/game/behaviors/breakable_box.inc.c +++ b/src/game/behaviors/breakable_box.inc.c @@ -7,6 +7,6 @@ void bhv_breakable_box_loop(void) { func_802B0E74(); if (obj_was_attacked_or_ground_pounded() != 0) { func_802A3C98(46.0f, 1); - create_sound_spawner(SOUND_GENERAL_BREAKBOX); + create_sound_spawner(SOUND_GENERAL_BREAK_BOX); } } diff --git a/src/game/behaviors/breakable_box_small.inc.c b/src/game/behaviors/breakable_box_small.inc.c index 75408c4..7379be2 100644 --- a/src/game/behaviors/breakable_box_small.inc.c +++ b/src/game/behaviors/breakable_box_small.inc.c @@ -33,10 +33,10 @@ void func_802F4DB4(void) { attack_collided_non_mario_object(o); if (sp1E == 1) - PlaySound2(SOUND_GENERAL_BOXLANDING_2); + PlaySound2(SOUND_GENERAL_BOX_LANDING_2); if (sp1E & 1) { if (o->oForwardVel > 20.0f) { - PlaySound2(SOUND_ENVIRONMENT_SLIDING); + PlaySound2(SOUND_ENV_SLIDING); func_802F4CE8(); } } @@ -45,7 +45,7 @@ void func_802F4DB4(void) { func_802A3004(); spawn_triangle_break_particles(20, 138, 0.7f, 3); ObjSpawnYellowCoins(o, 3); - create_sound_spawner(SOUND_GENERAL_BREAKBOX); + create_sound_spawner(SOUND_GENERAL_BREAK_BOX); o->activeFlags = 0; } diff --git a/src/game/behaviors/breakable_wall.inc.c b/src/game/behaviors/breakable_wall.inc.c index 34e6f50..b85b780 100644 --- a/src/game/behaviors/breakable_wall.inc.c +++ b/src/game/behaviors/breakable_wall.inc.c @@ -6,7 +6,7 @@ void bhv_wf_breakable_wall_loop(void) { if (are_objects_collided(o, gMarioObject)) { if (obj_has_behavior(bhvWfBreakableWallRight)) play_puzzle_jingle(); - create_sound_spawner(SOUND_GENERAL_EXPLOSION3); + create_sound_spawner(SOUND_GENERAL_WALL_EXPLOSION); o->oInteractType = 8; o->oDamageOrCoinValue = 1; func_802A3C98(80.0f, 0); diff --git a/src/game/behaviors/bub.inc.c b/src/game/behaviors/bub.inc.c index d9582cc..7d292df 100644 --- a/src/game/behaviors/bub.inc.c +++ b/src/game/behaviors/bub.inc.c @@ -87,7 +87,7 @@ void ActionCheepCheep2(void) { } else o->oInteractStatus = 0; if (o->oTimer == 0) - PlaySound2(SOUND_GENERAL_MOVINGWATER); + PlaySound2(SOUND_GENERAL_MOVING_WATER); if (o->oForwardVel == 0.0f) o->oForwardVel = 6.0f; dy = o->oPosY - gMarioObject->oPosY; diff --git a/src/game/behaviors/bubba.inc.c b/src/game/behaviors/bubba.inc.c index 1efaa6b..a095b5b 100644 --- a/src/game/behaviors/bubba.inc.c +++ b/src/game/behaviors/bubba.inc.c @@ -55,7 +55,7 @@ void bubba_act_1(void) { o->oAction = 0; } else if (o->oBubbaUnk100 != 0) { if (--o->oBubbaUnk100 == 0) { - PlaySound2(SOUND_OBJECT_CHOMPINGSOUND); + PlaySound2(SOUND_OBJ_BUBBA_CHOMP); o->oAction = 0; } else if (o->oBubbaUnk100 < 15) { o->oAnimState = 1; diff --git a/src/game/behaviors/bullet_bill.inc.c b/src/game/behaviors/bullet_bill.inc.c index 20bf7f7..1c61ab2 100644 --- a/src/game/behaviors/bullet_bill.inc.c +++ b/src/game/behaviors/bullet_bill.inc.c @@ -42,7 +42,7 @@ void ActionBulletBill2(void) { if (o->oDistanceToMario > 300.0f) obj_rotate_yaw_toward(o->oAngleToMario, 0x100); if (o->oTimer == 50) { - PlaySound2(SOUND_OBJECT_POUNDINGCANNON); + PlaySound2(SOUND_OBJ_POUNDING_CANNON); ShakeScreen(1); } if (o->oTimer > 150 || o->oMoveFlags & 0x200) { diff --git a/src/game/behaviors/bully.inc.c b/src/game/behaviors/bully.inc.c index 0f71d1a..3a4097f 100644 --- a/src/game/behaviors/bully.inc.c +++ b/src/game/behaviors/bully.inc.c @@ -52,14 +52,13 @@ void bhv_big_bully_init(void) { } void BullyCheckMarioCollision(void) { - if (o->oInteractStatus & INT_STATUS_INTERACTED) /* bit 15 */ - { + if (o->oInteractStatus & INT_STATUS_INTERACTED) { if (o->oBehParams2ndByte == BULLY_BP_SIZE_SMALL) - PlaySound2(SOUND_CH9_UNK1C); + PlaySound2(SOUND_OBJ2_BULLY_ATTACKED); else - PlaySound2(SOUND_CH9_UNK57); + PlaySound2(SOUND_OBJ2_LARGE_BULLY_ATTACKED); - o->oInteractStatus &= ~INT_STATUS_INTERACTED; /* bit 15 */ + o->oInteractStatus &= ~INT_STATUS_INTERACTED; o->oAction = BULLY_ACT_KNOCKBACK; o->oFlags &= ~0x8; /* bit 3 */ SetObjAnimation(3); @@ -145,9 +144,9 @@ void PlayBullyStompingSound(void) { case BULLY_ACT_PATROL: if (sp26 == 0 || sp26 == 12) { if (o->oBehParams2ndByte == BULLY_BP_SIZE_SMALL) - PlaySound2(SOUND_OBJECT_BULLYWALK); + PlaySound2(SOUND_OBJ_BULLY_WALK); else - PlaySound2(SOUND_OBJECT_BULLYWALKING); + PlaySound2(SOUND_OBJ_BULLY_WALKING); } break; @@ -155,9 +154,9 @@ void PlayBullyStompingSound(void) { case BULLY_ACT_BACK_UP: if (sp26 == 0 || sp26 == 5) { if (o->oBehParams2ndByte == BULLY_BP_SIZE_SMALL) - PlaySound2(SOUND_OBJECT_BULLYWALK); + PlaySound2(SOUND_OBJ_BULLY_WALK); else - PlaySound2(SOUND_OBJECT_BULLYWALKING); + PlaySound2(SOUND_OBJ_BULLY_WALKING); } break; } @@ -179,9 +178,9 @@ void BullyStep(void) { void BullySpawnCoin(void) { struct Object *coin = spawn_object(o, MODEL_YELLOW_COIN, bhvMovingYellowCoin); #ifdef VERSION_JP - PlaySound2(SOUND_GENERAL_COINSPURT); + PlaySound2(SOUND_GENERAL_COIN_SPURT); #else - PlaySound2(SOUND_GENERAL_COINSPURT_2); + PlaySound2(SOUND_GENERAL_COIN_SPURT_2); #endif coin->oForwardVel = 10.0f; coin->oVelY = 100.0f; @@ -349,7 +348,7 @@ void bhv_big_bully_with_minions_loop(void) { o->oAction = BULLY_ACT_PATROL; if (collisionFlags == 1) { - PlaySound2(SOUND_OBJECT_THWOMP); + PlaySound2(SOUND_OBJ_THWOMP); func_8027F440(1, o->oPosX, o->oPosY, o->oPosZ); func_802A3004(); } diff --git a/src/game/behaviors/camera_lakitu.inc.c b/src/game/behaviors/camera_lakitu.inc.c index 9100105..6daa782 100644 --- a/src/game/behaviors/camera_lakitu.inc.c +++ b/src/game/behaviors/camera_lakitu.inc.c @@ -64,7 +64,7 @@ static void camera_lakitu_intro_act_show_dialog(void) { s16 targetMovePitch; s16 targetMoveYaw; - PlaySound(SOUND_CH6_LAKITUFLY); + PlaySound(SOUND_AIR_LAKITU_FLY); // Face toward mario o->oFaceAnglePitch = obj_turn_pitch_toward_mario(120.0f, 0); @@ -115,7 +115,7 @@ static void camera_lakitu_intro_act_show_dialog(void) { } } } - } else if (obj_update_dialog_unk2(2, DIALOG_UNK2_FLAG_0, 0xA2, 0x22) != 0) { + } else if (obj_update_dialog_with_cutscene(2, DIALOG_UNK2_FLAG_0, CUTSCENE_DIALOG_1, 34) != 0) { o->oCameraLakituFinishedDialog = TRUE; } } diff --git a/src/game/behaviors/cannon.inc.c b/src/game/behaviors/cannon.inc.c index 1008d8d..65994aa 100644 --- a/src/game/behaviors/cannon.inc.c +++ b/src/game/behaviors/cannon.inc.c @@ -12,8 +12,8 @@ void ActionOpenedCannon0(void) { o->oPosZ = o->oHomeZ; o->oMoveAnglePitch = 0; o->oMoveAngleYaw = (s16)(o->oBehParams2ndByte << 8); - o->OBJECT_FIELD_S32(0x1B) = 0; - o->OBJECT_FIELD_S32(0x21) = 0; + o->oCannonUnkF4 = 0; + o->oCannonUnk10C = 0; obj_enable_rendering(); obj_become_tangible(); } @@ -25,20 +25,20 @@ void ActionOpenedCannon0(void) { & INT_STATUS_TOUCHED_BOB_OMB))) // bob-omb explodes when it gets into a cannon { o->oAction = 4; - o->OBJECT_FIELD_S32(0x21) = 1; - o->OBJECT_FIELD_S32(0x1C) = 1; + o->oCannonUnk10C = 1; + o->oCannonUnkF8 = 1; } else o->oInteractStatus = 0; } else { obj_become_intangible(); obj_disable_rendering(); - o->OBJECT_FIELD_S32(0x21) = 0; + o->oCannonUnk10C = 0; } } void ActionOpenedCannon4(void) { if (o->oTimer == 0) - PlaySound2(SOUND_OBJECT_CANNON1); + PlaySound2(SOUND_OBJ_CANNON1); o->oPosY += 5.0f; o->oPosX += (f32)((o->oTimer / 2 & 1) - 0.5) * 2; o->oPosZ += (f32)((o->oTimer / 2 & 1) - 0.5) * 2; @@ -51,7 +51,7 @@ void ActionOpenedCannon4(void) { void ActionOpenedCannon6(void) { if (o->oTimer == 0) - PlaySound2(SOUND_OBJECT_CANNON2); + PlaySound2(SOUND_OBJ_CANNON2); if (o->oTimer < 4) { o->oPosX += (f32)((o->oTimer / 2 & 1) - 0.5) * 4.0f; o->oPosZ += (f32)((o->oTimer / 2 & 1) - 0.5) * 4.0f; @@ -60,11 +60,11 @@ void ActionOpenedCannon6(void) { } else { if (o->oTimer < 22) { o->oMoveAngleYaw = - sins(o->OBJECT_FIELD_S32(0x1B)) * 0x4000 + ((s16)(o->oBehParams2ndByte << 8)); - o->OBJECT_FIELD_S32(0x1B) += 0x400; + sins(o->oCannonUnkF4) * 0x4000 + ((s16)(o->oBehParams2ndByte << 8)); + o->oCannonUnkF4 += 0x400; } else if (o->oTimer < 26) { } else { - o->OBJECT_FIELD_S32(0x1B) = 0; + o->oCannonUnkF4 = 0; o->oAction = 5; } } @@ -73,12 +73,12 @@ void ActionOpenedCannon6(void) { void ActionOpenedCannon5(void) { if (o->oTimer == 0) - PlaySound2(SOUND_OBJECT_CANNON3); + PlaySound2(SOUND_OBJ_CANNON3); if (o->oTimer < 4) { } else { if (o->oTimer < 20) { - o->OBJECT_FIELD_S32(0x1B) += 0x400; - o->oMoveAnglePitch = sins(o->OBJECT_FIELD_S32(0x1B)) * 0x2000; + o->oCannonUnkF4 += 0x400; + o->oMoveAnglePitch = sins(o->oCannonUnkF4) * 0x2000; } else if (o->oTimer < 25) { } else o->oAction = 1; @@ -89,7 +89,7 @@ void ActionOpenedCannon1(void) { UNUSED s32 unused; obj_become_intangible(); obj_disable_rendering(); - o->OBJECT_FIELD_S32(0x21) = 0; + o->oCannonUnk10C = 0; gMarioShotFromCannon = 1; } @@ -113,8 +113,8 @@ u8 unused0EA1FC[] = { 2, 0, 0, 0, 0, 0, 0, 0, 63, 128, 0, 0, 2, 0, 0, 0 void bhv_cannon_base_loop(void) { obj_call_action_function(sOpenedCannonActions); - if (o->OBJECT_FIELD_S32(0x1C)) - o->OBJECT_FIELD_S32(0x1C)++; + if (o->oCannonUnkF8) + o->oCannonUnkF8++; o->oInteractStatus = 0; } diff --git a/src/game/behaviors/cannon_door.inc.c b/src/game/behaviors/cannon_door.inc.c index c57bd6f..661eb31 100644 --- a/src/game/behaviors/cannon_door.inc.c +++ b/src/game/behaviors/cannon_door.inc.c @@ -18,7 +18,7 @@ void bhv_cannon_closed_init(void) { void CannonTrapDoorOpeningLoop(void) { if (o->oTimer == 0) - PlaySound2(SOUND_GENERAL_CANNONUP); + PlaySound2(SOUND_GENERAL_CANNON_UP); if (o->oTimer < 30) { o->oVelY = -0.5f; diff --git a/src/game/behaviors/cap.inc.c b/src/game/behaviors/cap.inc.c index c815484..05729e6 100644 --- a/src/game/behaviors/cap.inc.c +++ b/src/game/behaviors/cap.inc.c @@ -109,11 +109,11 @@ void bhv_wing_cap_init(void) { } void func_802F0D70(void) { - o->oUnknownUnkF8_S32 += 0x2000; - o->header.gfx.scale[1] = coss(o->oUnknownUnkF8_S32) * 0.3 + 0.7; - if (o->oUnknownUnkF8_S32 == 0x10000) { - o->oUnknownUnkF8_S32 = 0; - o->oUnknownUnkF4_S32 = 2; + o->oCapUnkF8 += 0x2000; + o->header.gfx.scale[1] = coss(o->oCapUnkF8) * 0.3 + 0.7; + if (o->oCapUnkF8 == 0x10000) { + o->oCapUnkF8 = 0; + o->oCapUnkF4 = 2; } } @@ -125,12 +125,12 @@ void func_802F0E0C(void) { if (sp1E & 0x01) { func_802F09C0(); if (o->oVelY != 0.0f) { - o->oUnknownUnkF4_S32 = 1; + o->oCapUnkF4 = 1; o->oVelY = 0.0f; } } - if (o->oUnknownUnkF4_S32 == 1) + if (o->oCapUnkF4 == 1) func_802F0D70(); } @@ -229,13 +229,13 @@ void func_802F1234(void) { func_802F09C0(); if (o->oVelY != 0.0f) { - o->oUnknownUnkF4_S32 = 1; + o->oCapUnkF4 = 1; o->oVelY = 0.0f; o->oFaceAnglePitch = 0; } } - if (o->oUnknownUnkF4_S32 == 1) + if (o->oCapUnkF4 == 1) func_802F0D70(); } diff --git a/src/game/behaviors/capswitch.inc.c b/src/game/behaviors/capswitch.inc.c index 1ebb223..651a9f4 100644 --- a/src/game/behaviors/capswitch.inc.c +++ b/src/game/behaviors/capswitch.inc.c @@ -19,7 +19,7 @@ void ActionActivateCapSwitch1(void) { if (obj_is_mario_on_platform()) { save_file_set_flags(D_8032F0C0[o->oBehParams2ndByte]); o->oAction = 2; - PlaySound2(SOUND_GENERAL_EXPLOSION); + PlaySound2(SOUND_GENERAL_ACTIVATE_CAP_SWITCH); } } @@ -33,7 +33,7 @@ void ActionActivateCapSwitch2(void) { spawn_triangle_break_particles(60, 139, 0.3f, o->oBehParams2ndByte); } } else { - sp1C = obj_update_dialog_unk2(1, 12, 161, 0); + sp1C = obj_update_dialog_with_cutscene(1, 0x0C, CUTSCENE_CAP_SWITCH_PRESS, 0); if (sp1C) o->oAction = 3; } diff --git a/src/game/behaviors/castle_floor_trap.inc.c b/src/game/behaviors/castle_floor_trap.inc.c index 54cf1e5..12fb3f1 100644 --- a/src/game/behaviors/castle_floor_trap.inc.c +++ b/src/game/behaviors/castle_floor_trap.inc.c @@ -26,7 +26,7 @@ void bhv_castle_floor_trap_open_detect(void) { void bhv_castle_floor_trap_open(void) { if (o->oTimer == 0) - PlaySound2(SOUND_GENERAL_UNUSED); + PlaySound2(SOUND_GENERAL_CASTLE_TRAP_OPEN); o->oAngleVelRoll -= 0x100; o->oFaceAngleRoll += o->oAngleVelRoll; if (o->oFaceAngleRoll < -0x4000) { diff --git a/src/game/behaviors/celebration_star.inc.c b/src/game/behaviors/celebration_star.inc.c index 5952af2..053b295 100644 --- a/src/game/behaviors/celebration_star.inc.c +++ b/src/game/behaviors/celebration_star.inc.c @@ -12,13 +12,13 @@ void bhv_celebration_star_init(void) { o->oFaceAnglePitch = 0; o->oFaceAngleRoll = 49152; obj_scale(0.1f); - o->oUnknownUnkF4_S32 = 1; + o->oCelebStarUnkF4 = 1; } else { o->header.gfx.sharedChild = gLoadedGraphNodes[MODEL_STAR]; o->oFaceAnglePitch = 0; o->oFaceAngleRoll = 0; obj_scale(0.4f); - o->oUnknownUnkF4_S32 = 0; + o->oCelebStarUnkF4 = 0; } #else o->header.gfx.sharedChild = gLoadedGraphNodes[MODEL_STAR]; @@ -48,7 +48,7 @@ void CelebrationStarFaceCameraLoop(void) { if (o->oTimer < 10) { #if BUGFIX_STAR_BOWSER_KEY - if (o->oUnknownUnkF4_S32 == 0) { + if (o->oCelebStarUnkF4 == 0) { obj_scale((f32) o->oTimer / 10.0); } else { obj_scale((f32) o->oTimer / 30.0); diff --git a/src/game/behaviors/chain_chomp.inc.c b/src/game/behaviors/chain_chomp.inc.c index 3877334..cf02757 100644 --- a/src/game/behaviors/chain_chomp.inc.c +++ b/src/game/behaviors/chain_chomp.inc.c @@ -182,7 +182,7 @@ static void chain_chomp_sub_act_turn(void) { if (o->oTimer > 40) { // Increase the maximum distance from the pivot and enter // the lunging sub-action. - PlaySound2(SOUND_GENERAL_CHAINCHOMP2); + PlaySound2(SOUND_GENERAL_CHAIN_CHOMP2); o->oSubAction = CHAIN_CHOMP_SUB_ACT_LUNGE; o->oChainChompMaxDistFromPivotPerChainPart = 900.0f / 5; @@ -199,7 +199,7 @@ static void chain_chomp_sub_act_turn(void) { o->oForwardVel = 0.0f; } } else { - PlaySound2(SOUND_GENERAL_CHAINCHOMP1); + PlaySound2(SOUND_GENERAL_CHAIN_CHOMP1); o->oForwardVel = 10.0f; o->oVelY = 20.0f; } @@ -261,7 +261,7 @@ static void chain_chomp_released_trigger_cutscene(void) { //! Can delay this if we get into a cutscene-unfriendly action after the // last post ground pound and before this if (set_mario_npc_dialog(2) == 2 && (o->oMoveFlags & OBJ_MOVE_MASK_ON_GROUND) - && func_8028F9E8(0xAD, o) == 1) { + && cutscene_object(CUTSCENE_STAR_SPAWN, o) == 1) { o->oChainChompReleaseStatus = CHAIN_CHOMP_RELEASED_LUNGE_AROUND; o->oTimer = 0; } @@ -289,7 +289,7 @@ static void chain_chomp_released_lunge_around(void) { } } else { if (++o->oChainChompNumLunges <= 5) { - PlaySound2(SOUND_GENERAL_CHAINCHOMP1); + PlaySound2(SOUND_GENERAL_CHAIN_CHOMP1); o->oMoveAngleYaw = o->oAngleToMario + RandomSign() * 0x2000; o->oForwardVel = 30.0f; o->oVelY = 50.0f; @@ -345,7 +345,7 @@ static void chain_chomp_released_jump_away(void) { * Release mario and transition to the unload chain action. */ static void chain_chomp_released_end_cutscene(void) { - if (func_8028F9E8(0xAD, o) == -1) { + if (cutscene_object(CUTSCENE_STAR_SPAWN, o) == -1) { set_mario_npc_dialog(0); o->oAction = CHAIN_CHOMP_ACT_UNLOAD_CHAIN; } @@ -488,7 +488,7 @@ void bhv_wooden_post_update(void) { // When ground pounded by mario, drop by -45 + -20 if (!o->oWoodenPostMarioPounding) { if ((o->oWoodenPostMarioPounding = obj_is_mario_ground_pounding_platform())) { - PlaySound2(SOUND_GENERAL_POUNDWOODPOST); + PlaySound2(SOUND_GENERAL_POUND_WOOD_POST); o->oWoodenPostSpeedY = -70.0f; } } else if (approach_f32_ptr(&o->oWoodenPostSpeedY, 0.0f, 25.0f)) { @@ -537,7 +537,7 @@ void bhv_chain_chomp_gate_init(void) { */ void bhv_chain_chomp_gate_update(void) { if (o->parentObj->oChainChompHitGate) { - func_802A3034(SOUND_GENERAL_EXPLOSION3); + func_802A3034(SOUND_GENERAL_WALL_EXPLOSION); func_8027F440(1, o->oPosX, o->oPosY, o->oPosZ); func_802AA618(0, 0x7F, 200.0f); spawn_triangle_break_particles(30, 0x8A, 3.0f, 4); diff --git a/src/game/behaviors/checkerboard_platform.inc.c b/src/game/behaviors/checkerboard_platform.inc.c index 0fd007f..1203193 100644 --- a/src/game/behaviors/checkerboard_platform.inc.c +++ b/src/game/behaviors/checkerboard_platform.inc.c @@ -24,9 +24,10 @@ void bhv_checkerboard_elevator_group_init(void) { sp38 = -D_8032F754[sp34].unk0; else sp38 = D_8032F754[sp34].unk0; + sp2C = spawn_object_relative(i, 0, i * sp3C, sp38, o, MODEL_CHECKERBOARD_PLATFORM, bhvCheckerboardPlatformSub); - sp2C->oUnk1AC_F32 = D_8032F754[sp34].unk2; + sp2C->oCheckerBoardPlatformUnk1AC = D_8032F754[sp34].unk2; func_802B8F7C(sp2C->header.gfx.scale, D_8032F754[sp34].unk1); } } @@ -53,10 +54,10 @@ void bhv_checkerboard_platform_init(void) { } void bhv_checkerboard_platform_loop(void) { - f32 sp24 = o->oUnk1AC_F32; + f32 sp24 = o->oCheckerBoardPlatformUnk1AC; o->oCheckerBoardPlatformUnkF8 = 0; if (o->oDistanceToMario < 1000.0f) - PlaySound(SOUND_ENVIRONMENT_ELEVATOR4); + PlaySound(SOUND_ENV_ELEVATOR4); switch (o->oAction) { case 0: if (o->oBehParams2ndByte == 0) diff --git a/src/game/behaviors/chuckya.inc.c b/src/game/behaviors/chuckya.inc.c index 49926a3..b671990 100644 --- a/src/game/behaviors/chuckya.inc.c +++ b/src/game/behaviors/chuckya.inc.c @@ -1,7 +1,7 @@ // chuckya.c.inc void func_802A8D18(f32 sp28, f32 sp2C, s32 sp30) { - switch (o->parentObj->oUnknownUnk88) { + switch (o->parentObj->oChuckyaUnk88) { case 0: break; case 1: @@ -11,14 +11,14 @@ void func_802A8D18(f32 sp28, f32 sp2C, s32 sp30) { gMarioObject->oInteractStatus |= (sp30 + INT_STATUS_MARIO_UNK2); gMarioStates->forwardVel = sp28; gMarioStates->vel[1] = sp2C; - o->parentObj->oUnknownUnk88 = 0; + o->parentObj->oChuckyaUnk88 = 0; break; case 3: gMarioObject->oInteractStatus |= (INT_STATUS_MARIO_UNK2 + INT_STATUS_MARIO_UNK6); // loads 2 interactions at once? gMarioStates->forwardVel = 10.0f; gMarioStates->vel[1] = 10.0f; - o->parentObj->oUnknownUnk88 = 0; + o->parentObj->oChuckyaUnk88 = 0; break; } o->oMoveAngleYaw = o->parentObj->oMoveAngleYaw; @@ -32,7 +32,7 @@ void bhv_chuckya_anchor_mario_loop(void) { s32 Unknown802A8EC8(s32 sp20, f32 sp24, f32 sp28, s32 sp2C) { s32 sp1C = 0; - if (o->OBJECT_FIELD_S32(0x1C) != 4) { + if (o->oChuckyaUnkF8 != 4) { if (sp24 < obj_lateral_dist_from_mario_to_home()) { if (obj_lateral_dist_to_home() < 200.0f) sp1C = 0; @@ -48,7 +48,7 @@ s32 Unknown802A8EC8(s32 sp20, f32 sp24, f32 sp28, s32 sp2C) { sp1C = 3; if (sp20 && func_802C5A64(&o->oAngleToMario)) { sp1C = 4; - o->OBJECT_FIELD_S32(0x1C) = 4; + o->oChuckyaUnkF8 = 4; } } else sp1C = 4; @@ -75,14 +75,14 @@ void ActionChuckya0(void) { UNUSED u8 pad[16]; s32 sp28; if (o->oTimer == 0) - o->OBJECT_FIELD_S32(0x1D) = 0; + o->oChuckyaUnkFC = 0; o->oAngleToMario = angle_to_object(o, gMarioObject); switch (sp28 = o->oSubAction) { case 0: o->oForwardVel = 0; if (obj_lateral_dist_from_mario_to_home() < 2000.0f) { obj_rotate_yaw_toward(o->oAngleToMario, 0x400); - if (o->OBJECT_FIELD_S32(0x1D) > 40 + if (o->oChuckyaUnkFC > 40 || abs_angle_diff(o->oMoveAngleYaw, o->oAngleToMario) < 0x1000) o->oSubAction = 1; } else @@ -97,7 +97,7 @@ void ActionChuckya0(void) { break; case 2: func_802A9050(&o->oForwardVel, 0, 4.0f); - if (o->OBJECT_FIELD_S32(0x1D) > 48) + if (o->oChuckyaUnkFC > 48) o->oSubAction = 0; break; case 3: @@ -113,12 +113,12 @@ void ActionChuckya0(void) { break; } if (o->oSubAction != sp28) - o->OBJECT_FIELD_S32(0x1D) = 0; + o->oChuckyaUnkFC = 0; else - o->OBJECT_FIELD_S32(0x1D)++; + o->oChuckyaUnkFC++; set_obj_animation_and_sound_state(4); if (o->oForwardVel > 1.0f) - PlaySound(SOUND_CH6_CHUCKYAMOVE); + PlaySound(SOUND_AIR_CHUCKYA_MOVE); print_debug_bottom_up("fg %d", sp3C); print_debug_bottom_up("sp %d", o->oForwardVel); } @@ -127,22 +127,22 @@ void ActionChuckya1(void) { if (o->oSubAction == 0) { if (func_802A4AB0(0)) o->oSubAction++; - o->OBJECT_FIELD_S32(0x1D) = RandomFloat() * 30.0f + 10.0f; - o->OBJECT_FIELD_S32(0x1E) = 0; + o->oChuckyaUnkFC = RandomFloat() * 30.0f + 10.0f; + o->oChuckyaUnk100 = 0; o->oForwardVel = 0.0f; } else { if (o->oSubAction == 1) { - o->OBJECT_FIELD_S32(0x1E) += player_performed_grab_escape_action(); - print_debug_bottom_up("%d", o->OBJECT_FIELD_S32(0x1E)); - if (o->OBJECT_FIELD_S32(0x1E) > 10) { - o->oUnknownUnk88 = 3; + o->oChuckyaUnk100 += player_performed_grab_escape_action(); + print_debug_bottom_up("%d", o->oChuckyaUnk100); + if (o->oChuckyaUnk100 > 10) { + o->oChuckyaUnk88 = 3; o->oAction = 3; o->oInteractStatus &= ~(INT_STATUS_GRABBED_MARIO); } else { set_obj_animation_and_sound_state(1); o->oMoveAngleYaw += INT_STATUS_GRABBED_MARIO; - if (o->OBJECT_FIELD_S32(0x1D)-- < 0) - if (func_802B0C54(50.0f, 150.0f) || o->OBJECT_FIELD_S32(0x1D) < -16) { + if (o->oChuckyaUnkFC-- < 0) + if (func_802B0C54(50.0f, 150.0f) || o->oChuckyaUnkFC < -16) { o->oSubAction++; ; } @@ -150,8 +150,8 @@ void ActionChuckya1(void) { } else { set_obj_animation_and_sound_state(3); if (obj_check_anim_frame(18)) { - PlaySound2(SOUND_OBJECT_UNKNOWN4); - o->oUnknownUnk88 = 2; + PlaySound2(SOUND_OBJ_UNKNOWN4); + o->oChuckyaUnk88 = 2; o->oAction = 3; o->oInteractStatus &= ~(INT_STATUS_GRABBED_MARIO); } @@ -171,7 +171,7 @@ void ActionChuckya2(void) { if (o->oMoveFlags & (0x200 | 0x40 | 0x20 | 0x10 | 0x8 | 0x1)) { mark_object_for_deletion(o); spawn_object_loot_yellow_coins(o, 5, 20.0f); - func_802A3034(SOUND_OBJECT_CHUCKYADEATH); + func_802A3034(SOUND_OBJ_CHUCKYA_DEATH); } } @@ -183,8 +183,8 @@ void func_802A97B8(void) { obj_move_standard(-30); if (o->oInteractStatus & INT_STATUS_GRABBED_MARIO) { o->oAction = 1; - o->oUnknownUnk88 = 1; - PlaySound2(SOUND_OBJECT_UNKNOWN3); + o->oChuckyaUnk88 = 1; + PlaySound2(SOUND_OBJ_UNKNOWN3); } } diff --git a/src/game/behaviors/clam.inc.c b/src/game/behaviors/clam.inc.c index 01c01f4..6ea3a1d 100644 --- a/src/game/behaviors/clam.inc.c +++ b/src/game/behaviors/clam.inc.c @@ -14,14 +14,14 @@ struct ObjectHitbox sClamShellHitbox = { void clam_act_0(void) { if (func_802F92EC(0, 25)) { - PlaySound2(SOUND_GENERAL_CLAMSHELL4); + PlaySound2(SOUND_GENERAL_CLAM_SHELL3); func_802ADA94(); obj_become_tangible(); o->oClamUnkF4 = 10; o->oTimer = 0; } else if (o->oTimer > 150 && o->oDistanceToMario < 500.0f) { - PlaySound2(SOUND_GENERAL_CLAMSHELL3); + PlaySound2(SOUND_GENERAL_CLAM_SHELL2); o->oAction = 1; } else if (o->oClamUnkF4 != 0) { o->oClamUnkF4 -= 1; diff --git a/src/game/behaviors/cloud.inc.c b/src/game/behaviors/cloud.inc.c index cc5a1b1..dab6f71 100644 --- a/src/game/behaviors/cloud.inc.c +++ b/src/game/behaviors/cloud.inc.c @@ -69,10 +69,10 @@ static void cloud_fwoosh_update(void) { o->oCloudBlowing = o->oTimer = 0; } else if (o->oCloudGrowSpeed < -0.1f) { // Start blowing once we start shrinking faster than -0.1 - PlaySound(SOUND_CH6_BLOWWINDORFIRE_LOWPRIO); + PlaySound(SOUND_AIR_BLOW_WIND); func_802C76E0(12, 3.0f, 0.0f, -50.0f, 120.0f); } else { - PlaySound(SOUND_ENVIRONMENT_WIND1); + PlaySound(SOUND_ENV_WIND1); } } else { // Return to normal size diff --git a/src/game/behaviors/coffin.inc.c b/src/game/behaviors/coffin.inc.c index 4be127b..1e4f99b 100644 --- a/src/game/behaviors/coffin.inc.c +++ b/src/game/behaviors/coffin.inc.c @@ -49,7 +49,7 @@ void coffin_act_0(void) { o->oAngleVelPitch = approach_s16_symmetric(o->oAngleVelPitch, -2000, 200); if (obj_face_pitch_approach(0, -o->oAngleVelPitch)) { - PlaySound2(SOUND_GENERAL_ELEVATORMOVE_2); + PlaySound2(SOUND_GENERAL_ELEVATOR_MOVE_2); obj_perform_position_op(0); o->oMoveAngleYaw = o->oFaceAngleYaw - 0x4000; @@ -73,7 +73,7 @@ void coffin_act_0(void) { && (o->oDistanceToMario > 100.0f || gMarioState->action == ACT_SQUISHED)) { if (gMarioObject->oPosY - o->oPosY < 200.0f && absf(val04) < 140.0f) { if (val00 < 150.0f && val00 > -450.0f) { - PlaySound2(SOUND_GENERAL_BUTTONPRESS_2_LOWPRIO); + PlaySound2(SOUND_GENERAL_BUTTON_PRESS_2_LOWPRIO); o->oAction = 1; } } @@ -94,7 +94,7 @@ void coffin_act_1(void) { o->oFaceAngleRoll = 0; } else if (o->oTimer > 30) { if (gGlobalTimer % 4 == 0) { - PlaySound2(SOUND_GENERAL_ELEVATORMOVE_2); + PlaySound2(SOUND_GENERAL_ELEVATOR_MOVE_2); } o->oFaceAngleRoll = 400 * (gGlobalTimer % 2) - 200; } diff --git a/src/game/behaviors/coin.inc.c b/src/game/behaviors/coin.inc.c index b3dbb57..74d74fc 100644 --- a/src/game/behaviors/coin.inc.c +++ b/src/game/behaviors/coin.inc.c @@ -49,7 +49,7 @@ void bhv_temp_coin_loop(void) { } void bhv_coin_init(void) { - o->oVelY = RandomFloat() * 10.0f + 30 + o->OBJECT_FIELD_F32(0x22); + o->oVelY = RandomFloat() * 10.0f + 30 + o->oCoinUnk110; o->oForwardVel = RandomFloat() * 10.0f; o->oMoveAngleYaw = RandomU16(); obj_set_behavior(bhvYellowCoin); @@ -76,9 +76,9 @@ void bhv_coin_loop(void) { } if (o->oTimer == 0) #ifndef VERSION_JP - PlaySound2(SOUND_GENERAL_COINSPURT_2); + PlaySound2(SOUND_GENERAL_COIN_SPURT_2); #else - PlaySound2(SOUND_GENERAL_COINSPURT); + PlaySound2(SOUND_GENERAL_COIN_SPURT); #endif if (o->oVelY < 0) obj_become_tangible(); @@ -92,13 +92,13 @@ void bhv_coin_loop(void) { } #ifndef VERSION_JP if (o->oMoveFlags & OBJ_MOVE_13) { - if (o->oUnk1B0 < 5) + if (o->oCoinUnk1B0 < 5) PlaySound2(0x30364081); - o->oUnk1B0++; + o->oCoinUnk1B0++; } #else if (o->oMoveFlags & OBJ_MOVE_13) - PlaySound2(SOUND_GENERAL_COINDROP); + PlaySound2(SOUND_GENERAL_COIN_DROP); #endif if (obj_wait_then_blink(400, 20)) mark_object_for_deletion(o); @@ -110,7 +110,7 @@ void bhv_coin_formation_spawn_loop(void) { obj_set_behavior(bhvYellowCoin); set_object_hitbox(o, &sYellowCoinHitbox); bhv_init_room(); - if (o->OBJECT_FIELD_S32(0x1C)) { + if (o->oCoinUnkF8) { o->oPosY += 300.0f; obj_update_floor_height(); if (o->oPosY < o->oFloorHeight || o->oFloorHeight < -10000.0f) @@ -124,7 +124,7 @@ void bhv_coin_formation_spawn_loop(void) { } } else { if (bhv_coin_sparkles_init()) - o->parentObj->OBJECT_FIELD_S32(0x1B) |= func_802A377C(o->oBehParams2ndByte); + o->parentObj->oCoinUnkF4 |= func_802A377C(o->oBehParams2ndByte); o->oAnimState++; } if (o->parentObj->oAction == 2) @@ -170,12 +170,12 @@ void func_802AB364(s32 sp50, s32 sp54) { if (sp3C) { sp4C = spawn_object_relative(sp50, sp40[0], sp40[1], sp40[2], o, MODEL_YELLOW_COIN, bhvCoinFormationSpawn); - sp4C->OBJECT_FIELD_S32(0x1C) = sp38; + sp4C->oCoinUnkF8 = sp38; } } void bhv_coin_formation_init(void) { - o->OBJECT_FIELD_S32(0x1B) = (o->oBehParams >> 8) & 0xFF; + o->oCoinUnkF4 = (o->oBehParams >> 8) & 0xFF; } void bhv_coin_formation_loop(void) { @@ -184,7 +184,7 @@ void bhv_coin_formation_loop(void) { case 0: if (o->oDistanceToMario < 2000.0f) { for (bitIndex = 0; bitIndex < 8; bitIndex++) { - if (!(o->OBJECT_FIELD_S32(0x1B) & (1 << bitIndex))) + if (!(o->oCoinUnkF4 & (1 << bitIndex))) func_802AB364(bitIndex, o->oBehParams2ndByte); } o->oAction++; @@ -198,15 +198,16 @@ void bhv_coin_formation_loop(void) { o->oAction = 0; break; } - set_object_respawn_info_bits(o, o->OBJECT_FIELD_S32(0x1B) - & 0xFF); // Casting to u8 doesn't seem to match + + // Casting to u8 doesn't seem to match + set_object_respawn_info_bits(o, o->oCoinUnkF4 & 0xFF); } void ActionCoinInsideBoo1(void) { obj_update_floor_and_walls(); obj_if_hit_wall_bounce_away(); if (o->oMoveFlags & OBJ_MOVE_13) - PlaySound2(SOUND_GENERAL_COINDROP); + PlaySound2(SOUND_GENERAL_COIN_DROP); if (o->oTimer > 90 || (o->oMoveFlags & OBJ_MOVE_LANDED)) { set_object_hitbox(o, &sYellowCoinHitbox); obj_become_tangible(); diff --git a/src/game/behaviors/collide_particles.inc.c b/src/game/behaviors/collide_particles.inc.c index a2aa1de..775ebd8 100644 --- a/src/game/behaviors/collide_particles.inc.c +++ b/src/game/behaviors/collide_particles.inc.c @@ -10,14 +10,14 @@ void bhv_punch_tiny_triangle_loop(void) { s16 sp1E; if (o->oTimer == 0) { sp1E = o->oMoveAngleYaw; - o->OBJECT_FIELD_F32(0x1B) = 1.28f; + o->oCollisionParticleUnkF4 = 1.28f; obj_set_pos_relative(gMarioObject, 0.0f, 60.0f, 100.0f); o->oMoveAngleYaw = sp1E; // does obj_set_pos_relative modify currentObject? } obj_move_using_fvel_and_gravity(); o->oAnimState = 5; - obj_scale(o->OBJECT_FIELD_F32(0x1B)); - o->OBJECT_FIELD_F32(0x1B) -= 0.2f; + obj_scale(o->oCollisionParticleUnkF4); + o->oCollisionParticleUnkF4 -= 0.2f; if (gDebugInfo[4][0] + 6 < o->oTimer) mark_object_for_deletion(o); } @@ -38,14 +38,14 @@ void bhv_wall_tiny_star_particle_loop(void) { s16 sp1E; if (o->oTimer == 0) { sp1E = o->oMoveAngleYaw; - o->OBJECT_FIELD_F32(0x1B) = 0.28f; + o->oCollisionParticleUnkF4 = 0.28f; obj_set_pos_relative(gMarioObject, 0.0f, 30.0f, 110.0f); o->oMoveAngleYaw = sp1E; } obj_move_using_fvel_and_gravity(); o->oAnimState = 4; - obj_scale(o->OBJECT_FIELD_F32(0x1B)); - o->OBJECT_FIELD_F32(0x1B) -= 0.015f; + obj_scale(o->oCollisionParticleUnkF4); + o->oCollisionParticleUnkF4 -= 0.015f; } void bhv_tiny_star_particles_init(void) { @@ -62,15 +62,15 @@ void bhv_tiny_star_particles_init(void) { void bhv_pound_tiny_star_particle_loop(void) { if (o->oTimer == 0) { - o->OBJECT_FIELD_F32(0x1B) = 0.28f; + o->oCollisionParticleUnkF4 = 0.28f; o->oForwardVel = 25.0f; o->oPosY -= 20.0f; o->oVelY = 14.0f; } obj_move_using_fvel_and_gravity(); o->oAnimState = 4; - obj_scale(o->OBJECT_FIELD_F32(0x1B)); - o->OBJECT_FIELD_F32(0x1B) -= 0.015f; + obj_scale(o->oCollisionParticleUnkF4); + o->oCollisionParticleUnkF4 -= 0.015f; } void bhv_pound_tiny_star_particle_init(void) { diff --git a/src/game/behaviors/controllable_platform.inc.c b/src/game/behaviors/controllable_platform.inc.c index 3fc5589..91b81bd 100644 --- a/src/game/behaviors/controllable_platform.inc.c +++ b/src/game/behaviors/controllable_platform.inc.c @@ -71,11 +71,11 @@ void bhv_controllable_platform_init(void) { } void func_802F3F80(s8 sp1B) { - o->oUnknownUnkF8_S32 = sp1B; + o->oControllablePlatformUnkF8 = sp1B; o->oTimer = 0; D_80331694 = 5; - PlaySound2(SOUND_GENERAL_QUIETPOUND1); + PlaySound2(SOUND_GENERAL_QUIET_POUND1); } void func_802F3FD8(s8 sp1B, s8 sp1C[3], Vec3f sp20, UNUSED Vec3f sp24, Vec3f sp28) { @@ -105,25 +105,25 @@ void func_802F3FD8(s8 sp1B, s8 sp1C[3], Vec3f sp20, UNUSED Vec3f sp24, Vec3f sp2 if (!is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 400)) { D_80331694 = 6; - o->oUnknownUnk100_S32 = 1; + o->oControllablePlatformUnk100 = 1; o->oTimer = 0; } } void func_802F4230(void) { - if (o->oUnknownUnkF8_S32 == 1 || o->oUnknownUnkF8_S32 == 2) { + if (o->oControllablePlatformUnkF8 == 1 || o->oControllablePlatformUnkF8 == 2) { o->oFaceAnglePitch = sins(o->oTimer * 0x1000) * 182.04444 * 10.0; - o->oPosY = o->oUnknownUnkFC_F32 + sins(o->oTimer * 0x2000) * 20.0f; + o->oPosY = o->oControllablePlatformUnkFC + sins(o->oTimer * 0x2000) * 20.0f; } else { o->oFaceAngleRoll = sins(o->oTimer * 0x1000) * 182.04444 * 10.0; - o->oPosY = o->oUnknownUnkFC_F32 + sins(o->oTimer * 0x2000) * 20.0f; + o->oPosY = o->oControllablePlatformUnkFC + sins(o->oTimer * 0x2000) * 20.0f; } if (o->oTimer == 32) { - D_80331694 = o->oUnknownUnkF8_S32; + D_80331694 = o->oControllablePlatformUnkF8; o->oFaceAnglePitch = 0; o->oFaceAngleRoll = 0; - o->oPosY = o->oUnknownUnkFC_F32; + o->oPosY = o->oControllablePlatformUnkFC; } } @@ -213,5 +213,5 @@ void bhv_controllable_platform_loop(void) { o->oPosX += o->oVelX; o->oPosZ += o->oVelZ; if (D_80331694 != 0 && D_80331694 != 6) - PlaySound(SOUND_ENVIRONMENT_ELEVATOR2); + PlaySound(SOUND_ENV_ELEVATOR2); } diff --git a/src/game/behaviors/cruiser.inc.c b/src/game/behaviors/cruiser.inc.c index eabeef3..c866ad2 100644 --- a/src/game/behaviors/cruiser.inc.c +++ b/src/game/behaviors/cruiser.inc.c @@ -15,7 +15,7 @@ void bhv_rr_cruiser_wing_loop(void) { } #ifndef VERSION_JP if (o->oTimer == 64) { - PlaySound2(SOUND_GENERAL_BOATROCK); + PlaySound2(SOUND_GENERAL_BOAT_ROCK); o->oTimer = 0; } #endif diff --git a/src/game/behaviors/decorative_pendulum.inc.c b/src/game/behaviors/decorative_pendulum.inc.c index a103245..7d05ccd 100644 --- a/src/game/behaviors/decorative_pendulum.inc.c +++ b/src/game/behaviors/decorative_pendulum.inc.c @@ -27,5 +27,5 @@ void bhv_decorative_pendulum_loop(void) { * actually one sound played twice in rapid succession. */ if (o->oAngleVelRoll == 0x10 || o->oAngleVelRoll == -0x10) - PlaySound2(SOUND_GENERAL_BIGCLOCK); + PlaySound2(SOUND_GENERAL_BIG_CLOCK); } diff --git a/src/game/behaviors/donut_platform.inc.c b/src/game/behaviors/donut_platform.inc.c index 56c94b8..c12f58c 100644 --- a/src/game/behaviors/donut_platform.inc.c +++ b/src/game/behaviors/donut_platform.inc.c @@ -50,7 +50,7 @@ void bhv_donut_platform_update(void) { mark_object_for_deletion(o); } else { func_802A3C98(150.0f, 1); - create_sound_spawner(SOUND_GENERAL_EXPLOSION4); + create_sound_spawner(SOUND_GENERAL_DONUT_PLATFORM_EXPLOSION); } } else { if (o->oGravity == 0.0f) { diff --git a/src/game/behaviors/door.inc.c b/src/game/behaviors/door.inc.c index daa68cb..4b30dbb 100644 --- a/src/game/behaviors/door.inc.c +++ b/src/game/behaviors/door.inc.c @@ -1,10 +1,10 @@ // door.c.inc -s32 D_8032F300[][2] = { { 0x40000, 3 }, { 0x80000, 4 }, { 0x10000, 1 }, { 0x20000, 2 }, { -1, 0 } }; +s32 D_8032F300[][2] = { { 0x40000, 3 }, { 0x80000, 4 }, { 0x10000, 1 }, { 0x20000, 2 }, { -1, 0 }, }; -s32 D_8032F328[] = { SOUND_GENERAL_OPENWOODDOOR, SOUND_GENERAL_OPENIRONDOOR }; +s32 D_8032F328[] = { SOUND_GENERAL_OPEN_WOOD_DOOR, SOUND_GENERAL_OPEN_IRON_DOOR }; -s32 D_8032F330[] = { SOUND_GENERAL_CLOSEWOODDOOR, SOUND_GENERAL_CLOSEIRONDOOR }; +s32 D_8032F330[] = { SOUND_GENERAL_CLOSE_WOOD_DOOR, SOUND_GENERAL_CLOSE_IRON_DOOR }; void func_802AC070(s32 sp18) { set_obj_animation_and_sound_state(sp18); @@ -78,45 +78,45 @@ void bhv_door_init(void) { struct Surface *floor; find_floor(x, o->oPosY, z, &floor); if (floor != NULL) { - o->OBJECT_FIELD_S32(0x1C) = floor->room; + o->oDoorUnkF8 = floor->room; } x = o->oPosX + sins(o->oMoveAngleYaw) * 200.0f; z = o->oPosZ + coss(o->oMoveAngleYaw) * 200.0f; find_floor(x, o->oPosY, z, &floor); if (floor != NULL) { - o->OBJECT_FIELD_S32(0x1D) = floor->room; + o->oDoorUnkFC = floor->room; } x = o->oPosX + sins(o->oMoveAngleYaw) * -200.0f; z = o->oPosZ + coss(o->oMoveAngleYaw) * -200.0f; find_floor(x, o->oPosY, z, &floor); if (floor != NULL) { - o->OBJECT_FIELD_S32(0x1E) = floor->room; + o->oDoorUnk100 = floor->room; } - if (o->OBJECT_FIELD_S32(0x1C) > 0 && o->OBJECT_FIELD_S32(0x1C) < 60) { - gDoorAdjacentRooms[o->OBJECT_FIELD_S32(0x1C)][0] = o->OBJECT_FIELD_S32(0x1D); - gDoorAdjacentRooms[o->OBJECT_FIELD_S32(0x1C)][1] = o->OBJECT_FIELD_S32(0x1E); + if (o->oDoorUnkF8 > 0 && o->oDoorUnkF8 < 60) { + gDoorAdjacentRooms[o->oDoorUnkF8][0] = o->oDoorUnkFC; + gDoorAdjacentRooms[o->oDoorUnkF8][1] = o->oDoorUnk100; } } void bhv_star_door_loop_2(void) { s32 sp4 = 0; if (gMarioCurrentRoom != 0) { - if (o->OBJECT_FIELD_S32(0x1C) == gMarioCurrentRoom) + if (o->oDoorUnkF8 == gMarioCurrentRoom) sp4 = 1; - else if (gMarioCurrentRoom == o->OBJECT_FIELD_S32(0x1D)) + else if (gMarioCurrentRoom == o->oDoorUnkFC) sp4 = 1; - else if (gMarioCurrentRoom == o->OBJECT_FIELD_S32(0x1E)) + else if (gMarioCurrentRoom == o->oDoorUnk100) sp4 = 1; - else if (gDoorAdjacentRooms[gMarioCurrentRoom][0] == o->OBJECT_FIELD_S32(0x1D)) + else if (gDoorAdjacentRooms[gMarioCurrentRoom][0] == o->oDoorUnkFC) sp4 = 1; - else if (gDoorAdjacentRooms[gMarioCurrentRoom][0] == o->OBJECT_FIELD_S32(0x1E)) + else if (gDoorAdjacentRooms[gMarioCurrentRoom][0] == o->oDoorUnk100) sp4 = 1; - else if (gDoorAdjacentRooms[gMarioCurrentRoom][1] == o->OBJECT_FIELD_S32(0x1D)) + else if (gDoorAdjacentRooms[gMarioCurrentRoom][1] == o->oDoorUnkFC) sp4 = 1; - else if (gDoorAdjacentRooms[gMarioCurrentRoom][1] == o->OBJECT_FIELD_S32(0x1E)) + else if (gDoorAdjacentRooms[gMarioCurrentRoom][1] == o->oDoorUnk100) sp4 = 1; } else sp4 = 1; @@ -127,5 +127,5 @@ void bhv_star_door_loop_2(void) { if (sp4 == 0) { o->header.gfx.node.flags &= ~1; } - o->oUnknownUnk88 = sp4; + o->oDoorUnk88 = sp4; } diff --git a/src/game/behaviors/door_key.inc.c b/src/game/behaviors/door_key.inc.c deleted file mode 100644 index 55b66df..0000000 --- a/src/game/behaviors/door_key.inc.c +++ /dev/null @@ -1,47 +0,0 @@ -// door_key.c.inc - -Gfx *Geo18_802BA2B0(s32 run, struct GraphNode *node, UNUSED f32 mtx[4][4]) { - struct Object *sp4; - if (run == TRUE) { - sp4 = (struct Object *) D_8032CFA0; - ((struct GraphNodeScaleOptionalDisplayList *) node->next)->scale = sp4->oUnknownUnkF4_F32; - } - return 0; -} - -void bhv_door_key_1_loop(void) { - s32 sp1C; - sp1C = o->header.gfx.unk38.animFrame; - set_obj_animation_and_sound_state(0); - if (sp1C < 38) - o->oDoorKey1UnkF4 = 0.0f; - else if (sp1C < 49) - o->oDoorKey1UnkF4 = 0.2f; - else if (sp1C < 58) - o->oDoorKey1UnkF4 = (sp1C - 53) * 0.11875f + 0.2; // 0.11875? - else if (sp1C < 59) - o->oDoorKey1UnkF4 = 1.1f; - else if (sp1C < 60) - o->oDoorKey1UnkF4 = 1.05f; - else - o->oDoorKey1UnkF4 = 1.0f; - if (o->oTimer > 150) - mark_object_for_deletion(o); -} - -void bhv_door_key_2_loop(void) { - s32 sp1C = o->header.gfx.unk38.animFrame; - set_obj_animation_and_sound_state(1); - if (sp1C < 38) - o->oDoorKey2UnkF4 = 0.2f; - else if (sp1C < 52) - o->oDoorKey2UnkF4 = (sp1C - 42) * 0.042857f + 0.2; // TODO 3/70? - else if (sp1C < 94) - o->oDoorKey2UnkF4 = 0.8f; - else if (sp1C < 0x65) - o->oDoorKey2UnkF4 = (101 - sp1C) * 0.085714f + 0.2; // TODO 6/70? - else - o->oDoorKey2UnkF4 = 0.2f; - if (o->oTimer > 138) - mark_object_for_deletion(o); -} diff --git a/src/game/behaviors/dorrie.inc.c b/src/game/behaviors/dorrie.inc.c index 2eea308..9a78a4c 100644 --- a/src/game/behaviors/dorrie.inc.c +++ b/src/game/behaviors/dorrie.inc.c @@ -26,7 +26,7 @@ static void dorrie_act_move(void) { set_obj_animation_and_sound_state(1); if (o->oDorrieForwardDistToMario < 320.0f && o->oDorrieGroundPounded) { - PlaySound2(SOUND_OBJECT_DORRIE); + PlaySound2(SOUND_OBJ_DORRIE); o->collisionData = segmented_to_virtual(dorrie_seg6_collision_0600FBB8); o->oAction = DORRIE_ACT_LOWER_HEAD; o->oForwardVel = 0.0f; diff --git a/src/game/behaviors/drawbridge.inc.c b/src/game/behaviors/drawbridge.inc.c index 7b7ac5e..406503b 100644 --- a/src/game/behaviors/drawbridge.inc.c +++ b/src/game/behaviors/drawbridge.inc.c @@ -36,7 +36,7 @@ void bhv_lll_drawbridge_loop(void) { // the game at regular intervals can leave the drawbridge raised indefinitely. if (o->oTimer >= 51 && (globalTimer % 8) == 0) { o->oAction = LLL_DRAWBRIDGE_ACT_LOWER; - PlaySound2(SOUND_GENERAL_BOATTILT1); + PlaySound2(SOUND_GENERAL_BOAT_TILT1); } } @@ -47,7 +47,7 @@ void bhv_lll_drawbridge_loop(void) { // the game at regular intervals can leave the drawbridge lowered indefinitely. if (o->oTimer >= 51 && (globalTimer % 8) == 0) { o->oAction = LLL_DRAWBRIDGE_ACT_RAISE; - PlaySound2(SOUND_GENERAL_BOATTILT2); + PlaySound2(SOUND_GENERAL_BOAT_TILT2); } } } diff --git a/src/game/behaviors/elevator.inc.c b/src/game/behaviors/elevator.inc.c index 0b9dbe3..d0c8bd4 100644 --- a/src/game/behaviors/elevator.inc.c +++ b/src/game/behaviors/elevator.inc.c @@ -1,41 +1,41 @@ // elevator.c.inc void func_802AD01C(void) { - PlaySound2(SOUND_GENERAL_QUIETPOUND1); + PlaySound2(SOUND_GENERAL_QUIET_POUND1); ShakeScreen(1); } void ActionElevator0(void) { o->oVelY = 0; - if (o->OBJECT_FIELD_S32(0x1E) == 2) { + if (o->oElevatorUnk100 == 2) { if (gMarioObject->platform == o) { - if (o->oPosY > o->OBJECT_FIELD_F32(0x1D)) + if (o->oPosY > o->oElevatorUnkFC) o->oAction = 2; else o->oAction = 1; } - } else if (gMarioObject->oPosY > o->OBJECT_FIELD_F32(0x1D) || o->OBJECT_FIELD_S32(0x1E) == 1) { - o->oPosY = o->OBJECT_FIELD_F32(0x1C); + } else if (gMarioObject->oPosY > o->oElevatorUnkFC || o->oElevatorUnk100 == 1) { + o->oPosY = o->oElevatorUnkF8; if (gMarioObject->platform == o) o->oAction = 2; } else { - o->oPosY = o->OBJECT_FIELD_F32(0x1B); + o->oPosY = o->oElevatorUnkF4; if (gMarioObject->platform == o) o->oAction = 1; } } void ActionElevator1(void) { - PlaySound(SOUND_ENVIRONMENT_ELEVATOR1); + PlaySound(SOUND_ENV_ELEVATOR1); if (o->oTimer == 0 && obj_is_mario_on_platform()) func_802AD01C(); approach_f32_signed(&o->oVelY, 10.0f, 2.0f); o->oPosY += o->oVelY; - if (o->oPosY > o->OBJECT_FIELD_F32(0x1C)) { - o->oPosY = o->OBJECT_FIELD_F32(0x1C); - if (o->OBJECT_FIELD_S32(0x1E) == 2 || o->OBJECT_FIELD_S32(0x1E) == 1) + if (o->oPosY > o->oElevatorUnkF8) { + o->oPosY = o->oElevatorUnkF8; + if (o->oElevatorUnk100 == 2 || o->oElevatorUnk100 == 1) o->oAction = 3; - else if (gMarioObject->oPosY < o->OBJECT_FIELD_F32(0x1D)) + else if (gMarioObject->oPosY < o->oElevatorUnkFC) o->oAction = 2; else o->oAction = 3; @@ -44,18 +44,18 @@ void ActionElevator1(void) { void ActionElevator2() // Pretty similar code to action 1 { - PlaySound(SOUND_ENVIRONMENT_ELEVATOR1); + PlaySound(SOUND_ENV_ELEVATOR1); if (o->oTimer == 0 && obj_is_mario_on_platform()) func_802AD01C(); approach_f32_signed(&o->oVelY, -10.0f, -2.0f); o->oPosY += o->oVelY; - if (o->oPosY < o->OBJECT_FIELD_F32(0x1B)) { - o->oPosY = o->OBJECT_FIELD_F32(0x1B); - if (o->OBJECT_FIELD_S32(0x1E) == 1) + if (o->oPosY < o->oElevatorUnkF4) { + o->oPosY = o->oElevatorUnkF4; + if (o->oElevatorUnk100 == 1) o->oAction = 4; - else if (o->OBJECT_FIELD_S32(0x1E) == 2) + else if (o->oElevatorUnk100 == 2) o->oAction = 3; - else if (gMarioObject->oPosY > o->OBJECT_FIELD_F32(0x1D)) + else if (gMarioObject->oPosY > o->oElevatorUnkFC) o->oAction = 1; else o->oAction = 3; @@ -66,7 +66,7 @@ void ActionElevator4() { o->oVelY = 0; if (o->oTimer == 0) { ShakeScreen(1); - PlaySound2(SOUND_GENERAL_METALPOUND); + PlaySound2(SOUND_GENERAL_METAL_POUND); } if (!mario_is_in_air_action() && !obj_is_mario_on_platform()) o->oAction = 1; @@ -77,7 +77,7 @@ void ActionElevator3() // nearly identical to action 2 o->oVelY = 0; if (o->oTimer == 0) { ShakeScreen(1); - PlaySound2(SOUND_GENERAL_METALPOUND); + PlaySound2(SOUND_GENERAL_METAL_POUND); } if (!mario_is_in_air_action() && !obj_is_mario_on_platform()) o->oAction = 0; @@ -86,15 +86,15 @@ void ActionElevator3() // nearly identical to action 2 void bhv_elevator_init(void) { s32 sp1C = D_8032F38C[o->oBehParams2ndByte * 3 + 2]; if (sp1C == 0) { - o->OBJECT_FIELD_F32(0x1B) = D_8032F38C[o->oBehParams2ndByte * 3]; - o->OBJECT_FIELD_F32(0x1C) = o->oHomeY; - o->OBJECT_FIELD_F32(0x1D) = (o->OBJECT_FIELD_F32(0x1B) + o->OBJECT_FIELD_F32(0x1C)) / 2.0f; - o->OBJECT_FIELD_S32(0x1E) = obj_has_behavior(bhvRrElevatorPlatform); + o->oElevatorUnkF4 = D_8032F38C[o->oBehParams2ndByte * 3]; + o->oElevatorUnkF8 = o->oHomeY; + o->oElevatorUnkFC = (o->oElevatorUnkF4 + o->oElevatorUnkF8) / 2.0f; + o->oElevatorUnk100 = obj_has_behavior(bhvRrElevatorPlatform); } else { - o->OBJECT_FIELD_F32(0x1B) = D_8032F38C[o->oBehParams2ndByte * 3]; - o->OBJECT_FIELD_F32(0x1C) = D_8032F38C[o->oBehParams2ndByte * 3 + 1]; - o->OBJECT_FIELD_F32(0x1D) = (o->OBJECT_FIELD_F32(0x1B) + o->OBJECT_FIELD_F32(0x1C)) / 2.0f; - o->OBJECT_FIELD_S32(0x1E) = 2; + o->oElevatorUnkF4 = D_8032F38C[o->oBehParams2ndByte * 3]; + o->oElevatorUnkF8 = D_8032F38C[o->oBehParams2ndByte * 3 + 1]; + o->oElevatorUnkFC = (o->oElevatorUnkF4 + o->oElevatorUnkF8) / 2.0f; + o->oElevatorUnk100 = 2; } } diff --git a/src/game/behaviors/end_birds_1.inc.c b/src/game/behaviors/end_birds_1.inc.c index a47c471..16c9ea8 100644 --- a/src/game/behaviors/end_birds_1.inc.c +++ b/src/game/behaviors/end_birds_1.inc.c @@ -19,7 +19,7 @@ void bhv_end_birds_1_loop(void) { if (gCurrentObject->oTimer < 100) func_8029A7DC(gCurrentObject, sp34, 0, 0, 0x20, 0x20); if ((gCurrentObject->oEndBirdUnk104 == 0.f) && (gCurrentObject->oTimer == 0)) - PlaySound2(SOUND_GENERAL_BIRDSFLYAWAY); + PlaySound2(SOUND_GENERAL_BIRDS_FLY_AWAY); if (gCutsceneTimer == 0) mark_object_for_deletion(gCurrentObject); break; diff --git a/src/game/behaviors/end_birds_2.inc.c b/src/game/behaviors/end_birds_2.inc.c index 38887b4..25b39d0 100644 --- a/src/game/behaviors/end_birds_2.inc.c +++ b/src/game/behaviors/end_birds_2.inc.c @@ -23,7 +23,7 @@ void bhv_end_birds_2_loop(void) { func_8029A7DC(gCurrentObject, sp3C, 0, 0, 8, 8); if ((gCurrentObject->oEndBirdUnk104 == 0.f) && (gCurrentObject->oTimer == 0)) - PlaySound2(SOUND_GENERAL_BIRDSFLYAWAY); + PlaySound2(SOUND_GENERAL_BIRDS_FLY_AWAY); break; } diff --git a/src/game/behaviors/enemy_lakitu.inc.c b/src/game/behaviors/enemy_lakitu.inc.c index 4a99245..00c6a20 100644 --- a/src/game/behaviors/enemy_lakitu.inc.c +++ b/src/game/behaviors/enemy_lakitu.inc.c @@ -137,7 +137,7 @@ static void enemy_lakitu_sub_act_hold_spiny(void) { */ static void enemy_lakitu_sub_act_throw_spiny(void) { if (func_802F92EC(2, 2)) { - PlaySound2(SOUND_OBJECT_EVILLAKITUTHROW); + PlaySound2(SOUND_OBJ_EVIL_LAKITU_THROW); o->prevObj = NULL; } @@ -151,7 +151,7 @@ static void enemy_lakitu_sub_act_throw_spiny(void) { * Main update function. */ static void enemy_lakitu_act_main(void) { - PlaySound(SOUND_CH6_LAKITUFLY); + PlaySound(SOUND_AIR_LAKITU_FLY); obj_update_floor_and_walls(); diff --git a/src/game/behaviors/exclamation_box.inc.c b/src/game/behaviors/exclamation_box.inc.c index 807aaf0..a27ec59 100644 --- a/src/game/behaviors/exclamation_box.inc.c +++ b/src/game/behaviors/exclamation_box.inc.c @@ -122,7 +122,7 @@ void ActionExclamationBox4(void) { func_802C0DF0(sExclamationBoxContents, o->oBehParams2ndByte); func_802AA618(0, 0, 46.0f); spawn_triangle_break_particles(20, 139, 0.3f, o->oAnimState); - create_sound_spawner(SOUND_GENERAL_BREAKBOX); + create_sound_spawner(SOUND_GENERAL_BREAK_BOX); if (o->oBehParams2ndByte < 3) { o->oAction = 5; obj_hide(); diff --git a/src/game/behaviors/explosion.inc.c b/src/game/behaviors/explosion.inc.c index 3325dba..6c56892 100644 --- a/src/game/behaviors/explosion.inc.c +++ b/src/game/behaviors/explosion.inc.c @@ -1,7 +1,7 @@ // explosion.c.inc void bhv_explosion_init(void) { - create_sound_spawner(SOUND_CH8_UNK2E); + create_sound_spawner(SOUND_GENERAL2_BOBOMB_EXPLOSION); set_camera_shake_2(SHAKE_2_UNKNOWN_1); o->oOpacity = 255; diff --git a/src/game/behaviors/express_elevator.inc.c b/src/game/behaviors/express_elevator.inc.c index 88275c9..70d5400 100644 --- a/src/game/behaviors/express_elevator.inc.c +++ b/src/game/behaviors/express_elevator.inc.c @@ -8,7 +8,7 @@ void bhv_wdw_express_elevator_loop(void) { } else if (o->oAction == 1) { o->oVelY = -20.0f; o->oPosY += o->oVelY; - PlaySound(SOUND_ENVIRONMENT_ELEVATOR4); + PlaySound(SOUND_ENV_ELEVATOR4); if (o->oTimer > 132) o->oAction++; } else if (o->oAction == 2) { @@ -17,7 +17,7 @@ void bhv_wdw_express_elevator_loop(void) { } else if (o->oAction == 3) { o->oVelY = 10.0f; o->oPosY += o->oVelY; - PlaySound(SOUND_ENVIRONMENT_ELEVATOR4); + PlaySound(SOUND_ENV_ELEVATOR4); if (o->oPosY >= o->oHomeY) { o->oPosY = o->oHomeY; o->oAction++; diff --git a/src/game/behaviors/eyerok.inc.c b/src/game/behaviors/eyerok.inc.c index 0e72050..e1b2742 100644 --- a/src/game/behaviors/eyerok.inc.c +++ b/src/game/behaviors/eyerok.inc.c @@ -34,7 +34,7 @@ static void eyerok_boss_act_sleep(void) { eyerok_spawn_hand(-1, MODEL_EYEROK_LEFT_HAND, bhvEyerokHand); eyerok_spawn_hand(1, MODEL_EYEROK_RIGHT_HAND, bhvEyerokHand); } else if (o->oDistanceToMario < 500.0f) { - PlaySound2(SOUND_OBJECT_EYEROKEXPLODE); + PlaySound2(SOUND_OBJ_EYEROK_EXPLODE); o->oAction = EYEROK_BOSS_ACT_WAKE_UP; } } @@ -63,7 +63,7 @@ static void eyerok_boss_act_wake_up(void) { } static void eyerok_boss_act_show_intro_text(void) { - if (obj_update_dialog_unk2(2, 0, 0xA2, 0x75)) { + if (obj_update_dialog_with_cutscene(2, 0, CUTSCENE_DIALOG_1, 117)) { o->oAction = EYEROK_BOSS_ACT_FIGHT; } } @@ -117,7 +117,7 @@ static void eyerok_boss_act_fight(void) { static void eyerok_boss_act_die(void) { if (o->oTimer == 60) { - if (obj_update_dialog_unk2(2, 0, 0xA2, 0x76)) { + if (obj_update_dialog_with_cutscene(2, 0, CUTSCENE_DIALOG_1, 118)) { create_star(0.0f, -900.0f, -3700.0f); } else { o->oTimer -= 1; @@ -150,7 +150,7 @@ void bhv_eyerok_boss_loop(void) { static s32 eyerok_hand_check_attacked(void) { if (o->oEyerokReceivedAttack != 0 && abs_angle_diff(o->oAngleToMario, o->oFaceAngleYaw) < 0x3000) { - PlaySound2(SOUND_CH9_UNK5A_LOWPRIO); + PlaySound2(SOUND_OBJ2_EYEROK_SOUND_SHORT); if (--o->oHealth >= 2) { o->oAction = EYEROK_HAND_ACT_ATTACKED; @@ -174,7 +174,7 @@ static s32 eyerok_hand_check_attacked(void) { } static void func_8030DBA8(void) { - PlaySound2(SOUND_OBJECT_POUNDINGLOUD); + PlaySound2(SOUND_OBJ_POUNDING_LOUD); func_8027F440(1, o->oPosX, o->oPosY, o->oPosZ); func_802ADA94(); } @@ -268,7 +268,7 @@ static void eyerok_hand_act_show_eye(void) { UNUSED s16 val06; set_obj_animation_and_sound_state(5); - func_802F9378(0, 0, SOUND_OBJECT_BRIDGEEXPLODE); + func_802F9378(0, 0, SOUND_OBJ_EYEROK_SHOW_EYE); if (!eyerok_hand_check_attacked()) { if (o->parentObj->oEyerokBossActiveHand == 0) { @@ -343,11 +343,11 @@ static void eyerok_hand_act_die(void) { if (func_802F92B0(1)) { o->parentObj->oEyerokBossUnk1AC = 0; func_802A3C98(150.0f, 1); - create_sound_spawner(SOUND_CH9_UNK5B); + create_sound_spawner(SOUND_OBJ2_EYEROK_SOUND_LONG); } if (o->oMoveFlags & 0x00000003) { - PlaySound2(SOUND_OBJECT_POUNDINGLOUD); + PlaySound2(SOUND_OBJ_POUNDING_LOUD); o->oForwardVel = 0.0f; } } diff --git a/src/game/behaviors/falling_pillar.inc.c b/src/game/behaviors/falling_pillar.inc.c index eea3083..96895b7 100644 --- a/src/game/behaviors/falling_pillar.inc.c +++ b/src/game/behaviors/falling_pillar.inc.c @@ -74,7 +74,7 @@ void bhv_falling_pillar_loop(void) { o->oAction = FALLING_PILLAR_ACT_TURNING; // Play the detaching sound. - PlaySound2(SOUND_GENERAL_POUNDROCK); + PlaySound2(SOUND_GENERAL_POUND_ROCK); } break; @@ -112,7 +112,7 @@ void bhv_falling_pillar_loop(void) { o->activeFlags = 0; // Play the hitting the ground sound. - create_sound_spawner(SOUND_GENERAL_BIGPOUND); + create_sound_spawner(SOUND_GENERAL_BIG_POUND); } break; } diff --git a/src/game/behaviors/fire_piranha_plant.inc.c b/src/game/behaviors/fire_piranha_plant.inc.c index 33351b5..0a6c0a2 100644 --- a/src/game/behaviors/fire_piranha_plant.inc.c +++ b/src/game/behaviors/fire_piranha_plant.inc.c @@ -56,7 +56,7 @@ static void fire_piranha_plant_act_hide(void) { if (func_8029F788()) { if (--o->oFirePiranhaPlantDeathSpinTimer == 0) { - PlaySound2(SOUND_EMEMY_DEFEAT_SHRINK); + PlaySound2(SOUND_OBJ_ENEMY_DEFEAT_SHRINK); } } } else if (approach_f32_ptr(&o->oFirePiranhaPlantScale, 0.0f, @@ -76,7 +76,7 @@ static void fire_piranha_plant_act_hide(void) { } } else if (sNumActiveFirePiranhaPlants < 2 && o->oTimer > 100 && o->oDistanceToMario > 100.0f && o->oDistanceToMario < 800.0f) { - PlaySound2(SOUND_OBJECT_PIRANHAPLANTAPPEAR); + PlaySound2(SOUND_OBJ_PIRANHA_PLANT_APPEAR); o->oFirePiranhaPlantActive = TRUE; sNumActiveFirePiranhaPlants += 1; @@ -98,7 +98,7 @@ static void fire_piranha_plant_act_grow(void) { if (approach_f32_ptr(&o->oFirePiranhaPlantScale, o->oFirePiranhaPlantNeutralScale, 0.04f * o->oFirePiranhaPlantNeutralScale)) { if (o->oTimer > 80) { - PlaySound2(SOUND_OBJECT_PIRANHAPLANTSHRINK); + PlaySound2(SOUND_OBJ_PIRANHA_PLANT_SHRINK); o->oAction = FIRE_PIRANHA_PLANT_ACT_HIDE; set_obj_animation_and_sound_state(0); } else if (o->oTimer < 50) { @@ -106,7 +106,7 @@ static void fire_piranha_plant_act_grow(void) { } else { // TODO: Check if we can put these conditionals on same line if (obj_is_rendering_enabled()) { if (obj_check_anim_frame(56)) { - PlaySound2(SOUND_OBJECT_FLAMEBLOWN); + PlaySound2(SOUND_OBJ_FLAME_BLOWN); obj_spit_fire(0, (s32)(30.0f * o->oFirePiranhaPlantNeutralScale), (s32)(140.0f * o->oFirePiranhaPlantNeutralScale), 2.5f * o->oFirePiranhaPlantNeutralScale, MODEL_RED_FLAME_SHADOW, diff --git a/src/game/behaviors/fire_spitter.inc.c b/src/game/behaviors/fire_spitter.inc.c index f3325ff..d26ae6d 100644 --- a/src/game/behaviors/fire_spitter.inc.c +++ b/src/game/behaviors/fire_spitter.inc.c @@ -20,7 +20,7 @@ static void fire_spitter_act_spit_fire(void) { if (scaleStatus < 0) { o->oAction = FIRE_SPITTER_ACT_IDLE; } else { - PlaySound2(SOUND_OBJECT_FLAMEBLOWN); + PlaySound2(SOUND_OBJ_FLAME_BLOWN); obj_spit_fire(0, 0, 0, 5.0f, MODEL_RED_FLAME_SHADOW, 20.0f, 15.0f, 0x1000); } } diff --git a/src/game/behaviors/fish.inc.c b/src/game/behaviors/fish.inc.c index 130794b..541d00d 100644 --- a/src/game/behaviors/fish.inc.c +++ b/src/game/behaviors/fish.inc.c @@ -5,7 +5,7 @@ void ActionFish0(void) { s32 sp38; s16 model; f32 sp30; - u32 *sp2C; + struct Animation **sp2C; struct Object *sp28; switch (o->oBehParams2ndByte) { case 0: @@ -116,7 +116,7 @@ void ActionFishGroup2(void) { else sp18 = (s32)(1.0 / (o->oDistanceToMario / 600.0)); sp18 *= 127; - PlaySound2(SOUND_GENERAL_MOVINGWATER); + PlaySound2(SOUND_GENERAL_MOVING_WATER); } if (o->oTimer < LEVEL_SA) func_8029ED98(0, 4.0f); diff --git a/src/game/behaviors/flamethrower.inc.c b/src/game/behaviors/flamethrower.inc.c index c29909e..6eaa2c4 100644 --- a/src/game/behaviors/flamethrower.inc.c +++ b/src/game/behaviors/flamethrower.inc.c @@ -60,7 +60,7 @@ void bhv_flamethrower_loop(void) { o->oFlameThowerUnk110 = sp34; flame = spawn_object_relative(o->oBehParams2ndByte, 0, 0, 0, o, model, bhvFlamethrowerFlame); flame->oForwardVel = flameVel; - PlaySound(SOUND_CH6_BLOWWINDORFIRE); + PlaySound(SOUND_AIR_BLOW_FIRE); } else if (o->oTimer > 60) o->oAction = 0; } diff --git a/src/game/behaviors/floating_platform.inc.c b/src/game/behaviors/floating_platform.inc.c index ddeb911..20ceff2 100644 --- a/src/game/behaviors/floating_platform.inc.c +++ b/src/game/behaviors/floating_platform.inc.c @@ -7,12 +7,12 @@ f32 func_802F54F8(void) { sp20 = find_water_level(o->oPosX, o->oPosZ); sp1C = find_floor(o->oPosX, o->oPosY, o->oPosZ, &sp24); - if (sp20 > sp1C + o->oUnknownUnkFC_F32) { - o->oUnknownUnkF4_S32 = 0; - return sp20 + o->oUnknownUnkFC_F32; + if (sp20 > sp1C + o->oFloatingPlatformUnkFC) { + o->oFloatingPlatformUnkF4 = 0; + return sp20 + o->oFloatingPlatformUnkFC; } else { - o->oUnknownUnkF4_S32 = 1; - return sp1C + o->oUnknownUnkFC_F32; + o->oFloatingPlatformUnkF4 = 1; + return sp1C + o->oFloatingPlatformUnkFC; } } @@ -29,27 +29,27 @@ void func_802F55CC(void) { if (o->oVelY < 0.0f) o->oVelY = 0.0f; - o->oUnknownUnkF8_F32 += o->oVelY; - if (o->oUnknownUnkF8_F32 > 90.0f) - o->oUnknownUnkF8_F32 = 90.0f; + o->oFloatingPlatformUnkF8 += o->oVelY; + if (o->oFloatingPlatformUnkF8 > 90.0f) + o->oFloatingPlatformUnkF8 = 90.0f; } else { o->oFaceAnglePitch /= 2; o->oFaceAngleRoll /= 2; - o->oUnknownUnkF8_F32 -= 5.0; + o->oFloatingPlatformUnkF8 -= 5.0; o->oVelY = 10.0f; - if (o->oUnknownUnkF8_F32 < 0.0f) - o->oUnknownUnkF8_F32 = 0.0f; + if (o->oFloatingPlatformUnkF8 < 0.0f) + o->oFloatingPlatformUnkF8 = 0.0f; } - o->oPosY = o->oHomeY - 64.0f - o->oUnknownUnkF8_F32 + sins(o->oUnknownUnk100_S32 * 0x800) * 10.0f; - o->oUnknownUnk100_S32++; - if (o->oUnknownUnk100_S32 == 32) - o->oUnknownUnk100_S32 = 0; + o->oPosY = o->oHomeY - 64.0f - o->oFloatingPlatformUnkF8 + sins(o->oFloatingPlatformUnk100 * 0x800) * 10.0f; + o->oFloatingPlatformUnk100++; + if (o->oFloatingPlatformUnk100 == 32) + o->oFloatingPlatformUnk100 = 0; } void bhv_floating_platform_loop(void) { o->oHomeY = func_802F54F8(); - if (o->oFloatingPlatformUnkFC == 0) + if (o->oFloatingPlatformUnkF4 == 0) o->oAction = 0; else o->oAction = 1; diff --git a/src/game/behaviors/fly_guy.inc.c b/src/game/behaviors/fly_guy.inc.c index b34b4c6..7224582 100644 --- a/src/game/behaviors/fly_guy.inc.c +++ b/src/game/behaviors/fly_guy.inc.c @@ -149,7 +149,7 @@ static void fly_guy_act_shoot_fire(void) { } else { // We have reached below scale 1.2 in the shrinking portion s16 fireMovePitch = obj_turn_pitch_toward_mario(0.0f, 0); - PlaySound2(SOUND_OBJECT_FLAMEBLOWN); + PlaySound2(SOUND_OBJ_FLAME_BLOWN); clamp_s16(&fireMovePitch, 0x800, 0x3000); obj_spit_fire( @@ -177,7 +177,7 @@ void bhv_fly_guy_update(void) { // PARTIAL_UPDATE (appears in non-roomed levels) if (!(o->activeFlags & ACTIVE_FLAG_IN_DIFFERENT_ROOM)) { - o->oDeathSound = SOUND_OBJECT_FLYGUYDEATH; + o->oDeathSound = SOUND_OBJ_KOOPA_FLYGUY_DEATH; obj_scale(o->header.gfx.scale[0]); treat_far_home_as_mario(2000.0f); diff --git a/src/game/behaviors/flying_bookend_switch.inc.c b/src/game/behaviors/flying_bookend_switch.inc.c index 68f08a0..1cf9de4 100644 --- a/src/game/behaviors/flying_bookend_switch.inc.c +++ b/src/game/behaviors/flying_bookend_switch.inc.c @@ -37,7 +37,7 @@ struct ObjectHitbox sBookSwitchHitbox = { void flying_bookend_act_0(void) { if (obj_is_near_to_and_facing_mario(400.0f, 0x3000)) { - PlaySound2(SOUND_OBJECT_DEFAULTDEATH); + PlaySound2(SOUND_OBJ_DEFAULT_DEATH); o->oAction = 1; o->oBookendUnkF4 = o->oFaceAnglePitch + 0x7FFF; o->oBookendUnkF8 = o->oFaceAngleRoll - 0x7FFF; @@ -99,7 +99,7 @@ void flying_bookend_act_3(void) { void bhv_flying_bookend_loop(void) { if (!(o->activeFlags & 0x0008)) { - o->oDeathSound = SOUND_OBJECT_POUNDING1; + o->oDeathSound = SOUND_OBJ_POUNDING1; obj_scale(o->header.gfx.scale[0]); switch (o->oAction) { @@ -135,7 +135,7 @@ void bhv_bookend_spawn_loop(void) { sp1C = spawn_object(o, MODEL_BOOKEND, bhvFlyingBookend); if (sp1C != NULL) { sp1C->oAction = 3; - PlaySound2(SOUND_OBJECT_DEFAULTDEATH); + PlaySound2(SOUND_OBJ_DEFAULT_DEATH); } o->oTimer = 0; } @@ -252,7 +252,7 @@ void bhv_book_switch_loop(void) { o->oAction = 1; if (o->oBookSwitchUnkF4 == 0.0f) { - PlaySound2(SOUND_OBJECT_DEFAULTDEATH); + PlaySound2(SOUND_OBJ_DEFAULT_DEATH); } if (approach_f32_ptr(&o->oBookSwitchUnkF4, 50.0f, 20.0f)) { @@ -269,13 +269,13 @@ void bhv_book_switch_loop(void) { if (approach_f32_ptr(&o->oBookSwitchUnkF4, 0.0f, 20.0f)) { if (o->oAction != 0) { if (o->parentObj->oBookSwitchManagerUnkF4 == o->oBehParams2ndByte) { - play_sound(SOUND_CH8_RIGHTANSWER, gDefaultSoundArgs); + play_sound(SOUND_GENERAL2_RIGHT_ANSWER, gDefaultSoundArgs); o->parentObj->oBookSwitchManagerUnkF4 += 1; } else { sp36 = RandomU16() & 0x1; sp34 = gMarioObject->oPosZ + 1.5f * gMarioStates[0].vel[2]; - play_sound(SOUND_MENU_CAMERABUZZ, gDefaultSoundArgs); + play_sound(SOUND_MENU_CAMERA_BUZZ, gDefaultSoundArgs); if (sp34 > 0) { sp34 = 0; } diff --git a/src/game/behaviors/goomba.inc.c b/src/game/behaviors/goomba.inc.c index 0db48b8..afcfc34 100644 --- a/src/game/behaviors/goomba.inc.c +++ b/src/game/behaviors/goomba.inc.c @@ -34,9 +34,9 @@ struct GoombaProperties { * Properties for regular, huge, and tiny goombas. */ static struct GoombaProperties sGoombaProperties[] = { - { 1.5f, SOUND_OBJECT_ENEMYDEATHHIGH, 4000, 1 }, - { 3.5f, SOUND_OBJECT_ENEMYDEATHLOW, 4000, 2 }, - { 0.5f, SOUND_OBJECT_ENEMYDEATHHIGH, 1500, 0 }, + { 1.5f, SOUND_OBJ_ENEMY_DEATH_HIGH, 4000, 1 }, + { 3.5f, SOUND_OBJ_ENEMY_DEATH_LOW, 4000, 2 }, + { 0.5f, SOUND_OBJ_ENEMY_DEATH_HIGH, 1500, 0 }, }; /** @@ -128,7 +128,7 @@ void bhv_goomba_init(void) { * Enter the jump action and set initial y velocity. */ static void goomba_begin_jump(void) { - PlaySound2(SOUND_OBJECT_GOOMBAALERT); + PlaySound2(SOUND_OBJ_GOOMBA_ALERT); o->oAction = GOOMBA_ACT_JUMP; o->oForwardVel = 0.0f; o->oVelY = 50.0f / 3.0f * o->oGoombaScale; @@ -160,7 +160,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_OBJECT_GOOMBAWALK); + func_802F9378(2, 17, SOUND_OBJ_GOOMBA_WALK); } //! By strategically hitting a wall, steep slope, or another goomba, we can diff --git a/src/game/behaviors/grand_star.inc.c b/src/game/behaviors/grand_star.inc.c index a77a50f..b980fe3 100644 --- a/src/game/behaviors/grand_star.inc.c +++ b/src/game/behaviors/grand_star.inc.c @@ -27,15 +27,15 @@ void bhv_grand_star_loop(void) { if (o->oTimer == 0) { set_object_angle(o, 0, 0, 0); o->oAngleVelYaw = 0x400; - PlaySound2(SOUND_CH8_UNK57); + PlaySound2(SOUND_GENERAL2_STAR_APPEARS); } if (o->oTimer > 70) o->oAction++; func_802B2328(3, 200, 80, -60); } else if (o->oAction == 1) { if (o->oTimer == 0) { - PlaySound2(SOUND_GENERAL_GRANDSTAR); - func_8028F9E8(173, o); + PlaySound2(SOUND_GENERAL_GRAND_STAR); + cutscene_object(CUTSCENE_STAR_SPAWN, o); o->oGrandStarUnk108 = func_802B2894(sp28, &o->oPosX, 80.0f, -2.0f); } obj_move_using_fvel_and_gravity(); @@ -45,7 +45,7 @@ void bhv_grand_star_loop(void) { o->oVelY = 60.0f; o->oForwardVel = 0.0f; o->oSubAction++; - PlaySound2(SOUND_GENERAL_GRANDSTARJUMP); + PlaySound2(SOUND_GENERAL_GRAND_STAR_JUMP); } } else if (o->oVelY < 0.0f && o->oPosY < o->oHomeY + 200.0f) { o->oPosY = o->oHomeY + 200.0f; @@ -54,7 +54,7 @@ void bhv_grand_star_loop(void) { set_mario_npc_dialog(0); o->oAction++; o->oInteractStatus = 0; - PlaySound2(SOUND_GENERAL_GRANDSTARJUMP); + PlaySound2(SOUND_GENERAL_GRAND_STAR_JUMP); } func_802B2328(3, 200, 80, -60); } else { diff --git a/src/game/behaviors/grill_door.inc.c b/src/game/behaviors/grill_door.inc.c index 7d10dc9..1be243f 100644 --- a/src/game/behaviors/grill_door.inc.c +++ b/src/game/behaviors/grill_door.inc.c @@ -7,7 +7,7 @@ struct Struct8032FCE8 D_8032FCE8[] = { { 320, MODEL_BOB_BARS_GRILLS, bob_seg7_co void bhv_openable_cage_door_loop(void) { if (gCurrentObject->oAction == 0) { - if (gCurrentObject->parentObj->oUnknownUnk88 != 0) + if (gCurrentObject->parentObj->oOpenableGrillUnk88 != 0) gCurrentObject->oAction++; } else if (gCurrentObject->oAction == 1) { if (gCurrentObject->oTimer < 64) @@ -40,8 +40,8 @@ void bhv_openable_grill_loop(void) { case 2: sp3C = o->oOpenableGrillUnkF4; if (sp3C->oAction == 2) { - o->oUnknownUnk88 = 2; - PlaySound2(SOUND_GENERAL_CAGEOPEN); + o->oOpenableGrillUnk88 = 2; + PlaySound2(SOUND_GENERAL_CAGE_OPEN); o->oAction++; if (o->oBehParams2ndByte != 0) play_puzzle_jingle(); diff --git a/src/game/behaviors/haunted_chair.inc.c b/src/game/behaviors/haunted_chair.inc.c index 03118c0..466ac7e 100644 --- a/src/game/behaviors/haunted_chair.inc.c +++ b/src/game/behaviors/haunted_chair.inc.c @@ -66,7 +66,7 @@ void haunted_chair_act_0(void) { } else { if ((o->oTimer & 0x8) != 0) { if (o->oFaceAnglePitch < 0) { - PlaySound2(SOUND_GENERAL_MOVINGBOOMAYBE); + PlaySound2(SOUND_GENERAL_HAUNTED_CHAIR_MOVE); val08 = 4.0f; } else { val08 = -4.0f; @@ -108,13 +108,13 @@ void haunted_chair_act_1(void) { } else { if (o->oHauntedChairUnkF4 != 0) { if (--o->oHauntedChairUnkF4 == 0) { - PlaySound2(SOUND_GENERAL_HAUNTEDCHAIR); + PlaySound2(SOUND_GENERAL_HAUNTED_CHAIR); o->oMoveAnglePitch = obj_turn_pitch_toward_mario(120.0f, 0); o->oMoveAngleYaw = o->oAngleToMario; obj_compute_vel_from_move_pitch(50.0f); } else if (o->oHauntedChairUnkF4 > 20) { if (gGlobalTimer % 4 == 0) { - PlaySound2(SOUND_GENERAL_SWISHAIR_2); + PlaySound2(SOUND_GENERAL_SWISH_AIR_2); } o->oFaceAngleYaw += 0x2710; } diff --git a/src/game/behaviors/heave_ho.inc.c b/src/game/behaviors/heave_ho.inc.c index 09aa53c..c29cb2d 100644 --- a/src/game/behaviors/heave_ho.inc.c +++ b/src/game/behaviors/heave_ho.inc.c @@ -1,24 +1,24 @@ // heave_ho.c.inc s16 D_8032F460[][2] = { { 30, 0 }, { 42, 1 }, { 52, 0 }, { 64, 1 }, { 74, 0 }, - { 86, 1 }, { 96, 0 }, { 108, 1 }, { 118, 0 }, { -1, 0 } }; + { 86, 1 }, { 96, 0 }, { 108, 1 }, { 118, 0 }, { -1, 0 }, }; void bhv_heave_ho_throw_mario_loop(void) { o->oParentRelativePosX = 200.0f; o->oParentRelativePosY = -50.0f; o->oParentRelativePosZ = 0.0f; o->oMoveAngleYaw = o->parentObj->oMoveAngleYaw; - switch (o->parentObj->oUnknownUnk88) { + switch (o->parentObj->oHeaveHoUnk88) { case 0: break; case 1: break; case 2: - PlaySound2(SOUND_OBJECT_HEAVEHOTOSSED); + PlaySound2(SOUND_OBJ_HEAVEHO_TOSSED); gMarioObject->oInteractStatus |= INT_STATUS_MARIO_UNK2; gMarioStates->forwardVel = -45.0f; gMarioStates->vel[1] = 95.0f; - o->parentObj->oUnknownUnk88 = 0; + o->parentObj->oHeaveHoUnk88 = 0; break; } } @@ -62,7 +62,7 @@ void ActionHeaveHo2(void) { void ActionHeaveHo3(void) { o->oForwardVel = 0.0f; if (o->oTimer == 0) - o->oUnknownUnk88 = 2; + o->oHeaveHoUnk88 = 2; if (o->oTimer == 1) { func_8029ED98(1, 1.0f); o->numCollidedObjs = 20; @@ -94,12 +94,12 @@ void func_802B18B4(void) { else o->oGraphYOffset = 0.0f; if (o->oForwardVel > 3.0f) - PlaySound(SOUND_CH6_HEAVEHOMOVE); + PlaySound(SOUND_AIR_HEAVEHO_MOVE); if (o->oAction != 0 && o->oMoveFlags & (0x40 | 0x20 | 0x10 | 0x8)) o->oAction = 0; if (o->oInteractStatus & INT_STATUS_GRABBED_MARIO) { o->oInteractStatus = 0; - o->oUnknownUnk88 = 1; + o->oHeaveHoUnk88 = 1; o->oAction = 3; } } diff --git a/src/game/behaviors/hidden_star.inc.c b/src/game/behaviors/hidden_star.inc.c index bd2809e..78f7998 100644 --- a/src/game/behaviors/hidden_star.inc.c +++ b/src/game/behaviors/hidden_star.inc.c @@ -12,13 +12,13 @@ void bhv_hidden_star_init(void) { o->activeFlags = 0; } - o->oHiddenStarSecretsCollected = 5 - sp36; + o->oHiddenStarTriggerCounter = 5 - sp36; } void bhv_hidden_star_loop(void) { switch (o->oAction) { case 0: - if (o->oHiddenStarSecretsCollected == 5) + if (o->oHiddenStarTriggerCounter == 5) o->oAction = 1; break; @@ -38,16 +38,16 @@ void bhv_hidden_star_trigger_loop(void) { if (are_objects_collided(o, gMarioObject) == 1) { hiddenStar = obj_nearest_object_with_behavior(bhvHiddenStar); if (hiddenStar != NULL) { - hiddenStar->oHiddenStarSecretsCollected++; - if (hiddenStar->oHiddenStarSecretsCollected != 5) { - SpawnOrangeNumber(hiddenStar->oHiddenStarSecretsCollected, 0, 0, 0); + hiddenStar->oHiddenStarTriggerCounter++; + if (hiddenStar->oHiddenStarTriggerCounter != 5) { + SpawnOrangeNumber(hiddenStar->oHiddenStarTriggerCounter, 0, 0, 0); } #ifdef VERSION_JP - play_sound(SOUND_MENU_STARSOUND, gDefaultSoundArgs); + play_sound(SOUND_MENU_STAR_SOUND, gDefaultSoundArgs); #else - play_sound(SOUND_MENU_COLLECTSECRET - + (((u8) hiddenStar->oHiddenStarSecretsCollected - 1) << 16), + play_sound(SOUND_MENU_COLLECT_SECRET + + (((u8) hiddenStar->oHiddenStarTriggerCounter - 1) << 16), gDefaultSoundArgs); #endif } @@ -57,10 +57,10 @@ void bhv_hidden_star_trigger_loop(void) { } void bhv_bowser_course_red_coin_star_loop(void) { - D_8036008E = o->oBowserCourseRedCoinStarCoinsCollected; + gRedCoinsCollected = o->oHiddenStarTriggerCounter; switch (o->oAction) { case 0: - if (o->oBowserCourseRedCoinStarCoinsCollected == 8) + if (o->oHiddenStarTriggerCounter == 8) o->oAction = 1; break; diff --git a/src/game/behaviors/hoot.inc.c b/src/game/behaviors/hoot.inc.c index dd4e1bc..cc3c1a0 100644 --- a/src/game/behaviors/hoot.inc.c +++ b/src/game/behaviors/hoot.inc.c @@ -73,7 +73,7 @@ void HootFreeStep(s16 fastOscY, s32 speed) { } if (sp26 == 0) - PlaySound2(SOUND_GENERAL_SWISHWATER); + PlaySound2(SOUND_GENERAL_SWISH_WATER); } void PlayerSetHootYaw(void) { @@ -108,7 +108,7 @@ void HootCarryStep(s32 speed, UNUSED f32 xPrev, UNUSED f32 zPrev) { o->oPosZ += o->oVelZ; if (sp22 == 0) - PlaySound2(SOUND_GENERAL_SWISHWATER); + PlaySound2(SOUND_GENERAL_SWISH_WATER); } // sp48 = xPrev @@ -160,7 +160,7 @@ void HootAscentLoop(f32 xPrev, f32 zPrev) { o->oMoveAnglePitch = 0xCE38; if (o->oTimer >= 29) { - PlaySound(SOUND_ENVIRONMENT_WIND2); + PlaySound(SOUND_ENV_WIND2); o->header.gfx.unk38.animFrame = 1; } @@ -188,7 +188,7 @@ void HootActionLoop(void) { if (o->oPosY < 2700.0f) { set_time_stop_flags(TIME_STOP_ENABLED | TIME_STOP_MARIO_AND_DOORS); - if (func_8028F8E0(162, o, 45)) { + if (cutscene_object_with_dialog(CUTSCENE_DIALOG_1, o, 45)) { clear_time_stop_flags(TIME_STOP_ENABLED | TIME_STOP_MARIO_AND_DOORS); o->oAction = HOOT_ACT_TIRED; @@ -255,7 +255,7 @@ void bhv_hoot_loop(void) { case HOOT_AVAIL_WANTS_TO_TALK: HootAwakeLoop(); - if (set_mario_npc_dialog(2) == 2 && func_8028F8E0(162, o, 44)) { + if (set_mario_npc_dialog(2) == 2 && cutscene_object_with_dialog(CUTSCENE_DIALOG_1, o, 44)) { set_mario_npc_dialog(0); obj_become_tangible(); diff --git a/src/game/behaviors/horizontal_grindel.inc.c b/src/game/behaviors/horizontal_grindel.inc.c index 224745b..2ace6ab 100644 --- a/src/game/behaviors/horizontal_grindel.inc.c +++ b/src/game/behaviors/horizontal_grindel.inc.c @@ -6,7 +6,7 @@ void bhv_horizontal_grindel_init(void) { void bhv_horizontal_grindel_update(void) { if (o->oMoveFlags & 0x00000003) { if (!o->oHorizontalGrindelOnGround) { - PlaySound2(SOUND_OBJECT_THWOMP); + PlaySound2(SOUND_OBJ_THWOMP); o->oHorizontalGrindelOnGround = TRUE; func_8027F440(1, o->oPosX, o->oPosY, o->oPosZ); @@ -21,7 +21,7 @@ void bhv_horizontal_grindel_update(void) { o->oHorizontalGrindelTargetYaw += 0x8000; o->oHorizontalGrindelDistToHome = 0.0f; } else { - PlaySound2(SOUND_OBJECT_KINGBOBOMBJUMP); + PlaySound2(SOUND_OBJ_KING_BOBOMB_JUMP); o->oForwardVel = 11.0f; o->oVelY = 70.0f; o->oGravity = -4.0f; diff --git a/src/game/behaviors/intro_lakitu.inc.c b/src/game/behaviors/intro_lakitu.inc.c index 3ce55f2..2f048c8 100644 --- a/src/game/behaviors/intro_lakitu.inc.c +++ b/src/game/behaviors/intro_lakitu.inc.c @@ -49,7 +49,7 @@ void bhv_intro_lakitu_loop(void) { obj_disable_rendering(); gCurrentObject->oIntroLakituUnkFC = 0.f; gCurrentObject->oIntroLakituUnkF8 = 0.f; - gCurrentObject->oUnk1AC_VPTR = + gCurrentObject->oIntroLakituUnk1AC = spawn_object_relative_with_scale(1, 0, 0, 0, 2.f, gCurrentObject, MODEL_MIST, bhvCloud); if (gCurrLevelCamera->cutscene == CUTSCENE_END_WAVING) gCurrentObject->oAction = 100; @@ -65,7 +65,7 @@ void bhv_intro_lakitu_loop(void) { gCurrentObject->oPosZ = gCurrLevelCamera->pos[2]; } if (gCutsceneTimer > 52) - PlaySound(SOUND_CH6_LAKITUFLY_HIGHPRIO); + PlaySound(SOUND_AIR_LAKITU_FLY_HIGHPRIO); if (func_8029ACAC(gCurrentObject, D_8032E3CC, D_8032E2B4) == 1) gCurrentObject->oAction += 1; @@ -109,11 +109,11 @@ void bhv_intro_lakitu_loop(void) { gCurrentObject->oFaceAngleYaw = gCurrentObject->oMoveAngleYaw + 0x4000; gCurrentObject->oMoveAnglePitch = 0x800; } - PlaySound(SOUND_CH6_LAKITUFLY_HIGHPRIO); + PlaySound(SOUND_AIR_LAKITU_FLY_HIGHPRIO); break; case 3: - PlaySound(SOUND_CH6_LAKITUFLY_HIGHPRIO); + PlaySound(SOUND_AIR_LAKITU_FLY_HIGHPRIO); vec3f_set(sp58, -1128.f, 560.f, 4664.f); gCurrentObject->oMoveAngleYaw += 0x200; gCurrentObject->oIntroLakituUnk100 = @@ -145,7 +145,7 @@ void bhv_intro_lakitu_loop(void) { if (gCurrentObject->oTimer == TIMER) { mark_object_for_deletion(gCurrentObject); - mark_object_for_deletion(gCurrentObject->oUnk1AC_VPTR); + mark_object_for_deletion(gCurrentObject->oIntroLakituUnk1AC); } #ifndef VERSION_JP if (gCurrentObject->oTimer == 14) diff --git a/src/game/behaviors/jrb_ship.inc.c b/src/game/behaviors/jrb_ship.inc.c index 42104ef..207d798 100644 --- a/src/game/behaviors/jrb_ship.inc.c +++ b/src/game/behaviors/jrb_ship.inc.c @@ -30,7 +30,7 @@ void bhv_ship_part_3_loop(void) { o->oAngleVelPitch = o->oFaceAnglePitch - sp1E; o->oAngleVelRoll = o->oFaceAngleRoll - sp1C; if (gMarioObject->oPosY > 1000.0f) - PlaySound(SOUND_ENVIRONMENT_BOATROCKING1); + PlaySound(SOUND_ENV_BOAT_ROCKING1); } void bhv_jrb_sliding_box_loop(void) { @@ -80,7 +80,7 @@ void bhv_jrb_sliding_box_loop(void) { o->oParentRelativePosZ += o->oJrbSlidingBoxUnkFC; if (gMarioObject->oPosY > 1000.0f) if (absf(o->oJrbSlidingBoxUnkFC) > 3.0f) - PlaySound(SOUND_CH6_ROUGHSLIDE); + PlaySound(SOUND_AIR_ROUGH_SLIDE); set_object_hitbox(o, &sSkullSlidingBoxHitbox); if (!(o->oJrbSlidingBoxUnkF8 & 0x7FFF)) obj_become_tangible(); diff --git a/src/game/behaviors/jumping_box.inc.c b/src/game/behaviors/jumping_box.inc.c index 2644a6b..e946427 100644 --- a/src/game/behaviors/jumping_box.inc.c +++ b/src/game/behaviors/jumping_box.inc.c @@ -63,7 +63,7 @@ void bhv_jumping_box_loop(void) { break; } if (o->oInteractStatus & INTERACT_HIT_FROM_BELOW) { - create_sound_spawner(SOUND_GENERAL_BREAKBOX); + create_sound_spawner(SOUND_GENERAL_BREAK_BOX); func_802A3C98(46.0f, 1); } o->oInteractStatus = 0; diff --git a/src/game/behaviors/kickable_board.inc.c b/src/game/behaviors/kickable_board.inc.c index 4ce1ab4..38dee84 100644 --- a/src/game/behaviors/kickable_board.inc.c +++ b/src/game/behaviors/kickable_board.inc.c @@ -21,8 +21,8 @@ s32 func_802A9A0C(UNUSED s32 sp18) { } void func_802A9B54(void) { - o->OBJECT_FIELD_S32(0x1C) = 1600; - o->OBJECT_FIELD_S32(0x1B) = 0; + o->oKickableBoardF8 = 1600; + o->oKickableBoardF4 = 0; } void bhv_kickable_board_loop(void) { @@ -39,23 +39,23 @@ void bhv_kickable_board_loop(void) { case 1: o->oFaceAnglePitch = 0; load_object_collision_model(); - o->oFaceAnglePitch = -sins(o->OBJECT_FIELD_S32(0x1B)) * o->OBJECT_FIELD_S32(0x1C); + o->oFaceAnglePitch = -sins(o->oKickableBoardF4) * o->oKickableBoardF8; if (o->oTimer > 30 && (sp24 = func_802A9A0C(0))) { if (gMarioObject->oPosY > o->oPosY + 160.0f && sp24 == 2) { o->oAction++; - PlaySound2(SOUND_GENERAL_BUTTONPRESS_2); + PlaySound2(SOUND_GENERAL_BUTTON_PRESS_2); } else o->oTimer = 0; } if (o->oTimer != 0) { - o->OBJECT_FIELD_S32(0x1C) -= 8; - if (o->OBJECT_FIELD_S32(0x1C) < 0) + o->oKickableBoardF8 -= 8; + if (o->oKickableBoardF8 < 0) o->oAction = 0; } else func_802A9B54(); - if (!(o->OBJECT_FIELD_S32(0x1B) & 0x7FFF)) - PlaySound2(SOUND_GENERAL_BUTTONPRESS_2); - o->OBJECT_FIELD_S32(0x1B) += 0x400; + if (!(o->oKickableBoardF4 & 0x7FFF)) + PlaySound2(SOUND_GENERAL_BUTTON_PRESS_2); + o->oKickableBoardF4 += 0x400; break; case 2: obj_become_intangible(); diff --git a/src/game/behaviors/king_bobomb.inc.c b/src/game/behaviors/king_bobomb.inc.c index 4bb7630..382591f 100644 --- a/src/game/behaviors/king_bobomb.inc.c +++ b/src/game/behaviors/king_bobomb.inc.c @@ -19,7 +19,7 @@ void ActionKingBobomb0(void) { o->oSubAction++; func_8031FFB4(0, 60, 40); } - } else if (obj_update_dialog_unk2(2, 1, 162, 17)) { + } else if (obj_update_dialog_with_cutscene(2, 1, CUTSCENE_DIALOG_1, 17)) { o->oAction = 2; o->oFlags |= OBJ_FLAG_HOLDABLE; } @@ -34,28 +34,27 @@ int func_802A6AF8(f32 arg0) { void ActionKingBobomb2(void) { obj_become_tangible(); - if (o->oPosY - o->oHomeY < -100.0f) // Thrown off hill - { + if (o->oPosY - o->oHomeY < -100.0f) { // Thrown off hill o->oAction = 5; obj_become_intangible(); } - if (o->OBJECT_FIELD_S32(0x1E) == 0) { + if (o->oKingBobombUnk100 == 0) { if (obj_check_anim_frame(15)) ShakeScreen(1); if (func_802A4AB0(4)) - o->OBJECT_FIELD_S32(0x1E)++; + o->oKingBobombUnk100++; } else { - if (o->OBJECT_FIELD_S32(0x1E) == 1) { + if (o->oKingBobombUnk100 == 1) { func_802A4A70(11, 7); - o->OBJECT_FIELD_S32(0x1E) = 2; + o->oKingBobombUnk100 = 2; } else set_obj_animation_and_sound_state(11); - if (o->OBJECT_FIELD_S32(0x20) == 0) { + if (o->oKingBobombUnk108 == 0) { o->oForwardVel = 3.0f; obj_rotate_yaw_toward(o->oAngleToMario, 0x100); } else { o->oForwardVel = 0.0f; - o->OBJECT_FIELD_S32(0x20)--; + o->oKingBobombUnk108--; } } if (obj_check_grabbed_mario()) @@ -69,10 +68,10 @@ void ActionKingBobomb2(void) { void ActionKingBobomb3(void) { if (o->oSubAction == 0) { o->oForwardVel = 0; - o->OBJECT_FIELD_S32(0x1F) = 0; - o->OBJECT_FIELD_S32(0x1D) = 0; + o->oKingBobombUnk104 = 0; + o->oKingBobombUnkFC = 0; if (o->oTimer == 0) - PlaySound2(SOUND_OBJECT_UNKNOWN3); + PlaySound2(SOUND_OBJ_UNKNOWN3); if (func_802A4AB0(0)) { o->oSubAction++; func_802A4A70(1, 0); @@ -80,26 +79,26 @@ void ActionKingBobomb3(void) { } else { if (o->oSubAction == 1) { set_obj_animation_and_sound_state(1); - o->OBJECT_FIELD_S32(0x1D) += player_performed_grab_escape_action(); - print_debug_bottom_up("%d", o->OBJECT_FIELD_S32(0x1D)); - if (o->OBJECT_FIELD_S32(0x1D) > 10) { - o->oUnknownUnk88 = 3; + o->oKingBobombUnkFC += player_performed_grab_escape_action(); + print_debug_bottom_up("%d", o->oKingBobombUnkFC); + if (o->oKingBobombUnkFC > 10) { + o->oKingBobombUnk88 = 3; o->oAction = 2; - o->OBJECT_FIELD_S32(0x20) = 35; + o->oKingBobombUnk108 = 35; o->oInteractStatus &= ~(INT_STATUS_GRABBED_MARIO); } else { o->oForwardVel = 3.0f; - if (o->OBJECT_FIELD_S32(0x1F) > 20 && obj_rotate_yaw_toward(0, 0x400)) { + if (o->oKingBobombUnk104 > 20 && obj_rotate_yaw_toward(0, 0x400)) { o->oSubAction++; func_802A4A70(9, 22); } } - o->OBJECT_FIELD_S32(0x1F)++; + o->oKingBobombUnk104++; } else { set_obj_animation_and_sound_state(9); if (obj_check_anim_frame(31)) { - o->oUnknownUnk88 = 2; - PlaySound2(SOUND_OBJECT_UNKNOWN4); + o->oKingBobombUnk88 = 2; + PlaySound2(SOUND_OBJ_UNKNOWN4); } else if (func_8029F788()) { o->oAction = 1; o->oInteractStatus &= ~(INT_STATUS_GRABBED_MARIO); @@ -124,17 +123,17 @@ void ActionKingBobomb1(void) { void ActionKingBobomb6(void) { if (o->oSubAction == 0) { if (o->oTimer == 0) { - o->OBJECT_FIELD_S32(0x1F) = 0; - PlaySound2(SOUND_OBJECT_BULLYTHWOMP); - PlaySound2(SOUND_CH9_UNK42); + o->oKingBobombUnk104 = 0; + PlaySound2(SOUND_OBJ_KING_BOBOMB); + PlaySound2(SOUND_OBJ2_KING_BOBOMB_DAMAGE); ShakeScreen(1); func_802AA618(0, 0, 100.0f); o->oInteractType = 8; obj_become_tangible(); } if (func_802A4AB0(2)) - o->OBJECT_FIELD_S32(0x1F)++; - if (o->OBJECT_FIELD_S32(0x1F) > 3) { + o->oKingBobombUnk104++; + if (o->oKingBobombUnk104 > 3) { o->oSubAction++; ; // Needed to match } @@ -155,8 +154,8 @@ void ActionKingBobomb6(void) { void ActionKingBobomb7(void) { set_obj_animation_and_sound_state(2); - if (obj_update_dialog_unk2(2, 2, 162, 116)) { - create_sound_spawner(SOUND_OBJECT_KINGWHOMPDEATH); + if (obj_update_dialog_with_cutscene(2, 2, CUTSCENE_DIALOG_1, 116)) { + create_sound_spawner(SOUND_OBJ_KING_WHOMP_DEATH); obj_hide(); obj_become_intangible(); func_802AA618(0, 0, 200.0f); @@ -177,15 +176,13 @@ void ActionKingBobomb8(void) { stop_background_music(SEQUENCE_ARGS(4, SEQ_EVENT_BOSS)); } -void ActionKingBobomb4() // bobomb been thrown -{ - if (o->oPosY - o->oHomeY > -100.0f) // not thrown off hill - { +void ActionKingBobomb4() { // bobomb been thrown + if (o->oPosY - o->oHomeY > -100.0f) { // not thrown off hill if (o->oMoveFlags & 1) { o->oHealth--; o->oForwardVel = 0; o->oVelY = 0; - PlaySound2(SOUND_OBJECT_BULLYTHWOMP); + PlaySound2(SOUND_OBJ_KING_BOBOMB); if (o->oHealth) o->oAction = 6; else @@ -198,7 +195,7 @@ void ActionKingBobomb4() // bobomb been thrown o->oVelY = 0; o->oSubAction++; } else if (o->oMoveFlags & 1) - PlaySound2(SOUND_OBJECT_BULLYTHWOMP); + PlaySound2(SOUND_OBJ_KING_BOBOMB); } else { if (func_802A4AB0(10)) o->oAction = 5; // Go back to top of hill @@ -207,20 +204,18 @@ void ActionKingBobomb4() // bobomb been thrown } } -void ActionKingBobomb5() // bobomb returns home -{ +void ActionKingBobomb5() { // bobomb returns home switch (o->oSubAction) { case 0: if (o->oTimer == 0) - PlaySound2(SOUND_OBJECT_KINGBOBOMBJUMP); - o->OBJECT_FIELD_S32(0x1C) = 1; + PlaySound2(SOUND_OBJ_KING_BOBOMB_JUMP); + o->oKingBobombUnkF8 = 1; func_802A4AEC(8); o->oMoveAngleYaw = obj_angle_to_home(); if (o->oPosY < o->oHomeY) o->oVelY = 100.0f; else { - func_802B2894(&o->oHomeX, &o->oPosX, 100.0f, - -4.0f); // the Vec3fs oHome and oPos are being passed by reference + func_802B2894(&o->oHomeX, &o->oPosX, 100.0f, -4.0f); o->oSubAction++; } break; @@ -231,9 +226,9 @@ void ActionKingBobomb5() // bobomb returns home o->oVelY = 0; o->oForwardVel = 0; o->oGravity = -4.0f; - o->OBJECT_FIELD_S32(0x1C) = 0; + o->oKingBobombUnkF8 = 0; set_obj_animation_and_sound_state(7); - PlaySound2(SOUND_OBJECT_BULLYTHWOMP); + PlaySound2(SOUND_OBJ_KING_BOBOMB); ShakeScreen(1); o->oSubAction++; } @@ -251,31 +246,34 @@ void ActionKingBobomb5() // bobomb returns home o->oSubAction++; break; case 4: - if (obj_update_dialog_unk2(2, 1, 162, 128)) + if (obj_update_dialog_with_cutscene(2, 1, CUTSCENE_DIALOG_1, 128)) o->oAction = 2; break; } } -void (*sKingBobombActions[])(void) = { ActionKingBobomb0, ActionKingBobomb1, ActionKingBobomb2, - ActionKingBobomb3, ActionKingBobomb4, ActionKingBobomb5, - ActionKingBobomb6, ActionKingBobomb7, ActionKingBobomb8 }; -struct SoundState sKingBobombSoundStates[] = { { 0, 0, 0, NO_SOUND }, - { 1, 1, 20, SOUND_OBJECT_POUNDING1_HIGHPRIO }, - { 0, 0, 0, NO_SOUND }, - { 0, 0, 0, NO_SOUND }, - { 1, 15, -1, SOUND_OBJECT_POUNDING1_HIGHPRIO }, - { 0, 0, 0, NO_SOUND }, - { 0, 0, 0, NO_SOUND }, - { 0, 0, 0, NO_SOUND }, - { 0, 0, 0, NO_SOUND }, - { 1, 33, -1, SOUND_OBJECT_POUNDING1_HIGHPRIO }, - { 0, 0, 0, NO_SOUND }, - { 1, 1, 15, SOUND_OBJECT_POUNDING1_HIGHPRIO } }; +void (*sKingBobombActions[])(void) = { + ActionKingBobomb0, ActionKingBobomb1, ActionKingBobomb2, ActionKingBobomb3, ActionKingBobomb4, + ActionKingBobomb5, ActionKingBobomb6, ActionKingBobomb7, ActionKingBobomb8, +}; +struct SoundState sKingBobombSoundStates[] = { + { 0, 0, 0, NO_SOUND }, + { 1, 1, 20, SOUND_OBJ_POUNDING1_HIGHPRIO }, + { 0, 0, 0, NO_SOUND }, + { 0, 0, 0, NO_SOUND }, + { 1, 15, -1, SOUND_OBJ_POUNDING1_HIGHPRIO }, + { 0, 0, 0, NO_SOUND }, + { 0, 0, 0, NO_SOUND }, + { 0, 0, 0, NO_SOUND }, + { 0, 0, 0, NO_SOUND }, + { 1, 33, -1, SOUND_OBJ_POUNDING1_HIGHPRIO }, + { 0, 0, 0, NO_SOUND }, + { 1, 1, 15, SOUND_OBJ_POUNDING1_HIGHPRIO }, +}; void func_802A7748(void) { obj_update_floor_and_walls(); - if (o->OBJECT_FIELD_S32(0x1C) == 0) + if (o->oKingBobombUnkF8 == 0) obj_move_standard(-78); else obj_move_using_fvel_and_gravity(); diff --git a/src/game/behaviors/klepto.inc.c b/src/game/behaviors/klepto.inc.c index f777d6d..e805263 100644 --- a/src/game/behaviors/klepto.inc.c +++ b/src/game/behaviors/klepto.inc.c @@ -30,12 +30,12 @@ static s32 func_8030F158(void) { func_802F932C(5); } else if (o->oSoundStateID == 5) { if (func_802F932C(0)) { - PlaySound2(SOUND_GENERAL_SWISHWATER); + PlaySound2(SOUND_GENERAL_SWISH_WATER); o->header.gfx.unk38.animFrame = 9; } } else { if (obj_check_anim_frame(9)) { - PlaySound2(SOUND_GENERAL_SWISHWATER); + PlaySound2(SOUND_GENERAL_SWISH_WATER); } return TRUE; } @@ -50,7 +50,7 @@ static void func_8030F218(void) { } else { if (o->oSoundStateID == 0) { if (obj_check_anim_frame(9)) { - PlaySound2(SOUND_GENERAL_SWISHWATER); + PlaySound2(SOUND_GENERAL_SWISH_WATER); set_obj_animation_and_sound_state(6); } } else if (--o->oKleptoUnk1AE == 0) { @@ -190,7 +190,7 @@ static void klepto_act_turn_toward_mario(void) { if (func_8030F158() && func_8029F828() && o->oKleptoDistanceToTarget > 800.0f && abs_angle_diff(o->oAngleToMario, o->oFaceAngleYaw) < 0x800 && o->oKleptoUnk1B0 < 0x400) { - PlaySound2(SOUND_OBJECT_KLEPTO1); + PlaySound2(SOUND_OBJ_KLEPTO1); o->oAction = KLEPTO_ACT_DIVE_AT_MARIO; o->oMoveAngleYaw = o->oFaceAngleYaw; o->oFlags |= 0x00000008; @@ -206,7 +206,7 @@ static void klepto_act_dive_at_mario(void) { approach_f32_ptr(&o->oKleptoSpeed, 60.0f, 10.0f); if (o->oSoundStateID == 2) { if (obj_check_anim_frame(11)) { - PlaySound2(SOUND_GENERAL_SWISHWATER); + PlaySound2(SOUND_GENERAL_SWISH_WATER); } if (func_802F932C(0)) { @@ -355,7 +355,7 @@ void bhv_klepto_update(void) { } if (obj_handle_attacks(&sKleptoHitbox, o->oAction, sKleptoAttackHandlers)) { - PlaySound2(SOUND_OBJECT_KLEPTO2); + PlaySound2(SOUND_OBJ_KLEPTO2); if (o->oAnimState == KLEPTO_ANIM_STATE_HOLDING_CAP) { save_file_clear_flags(SAVE_FLAG_CAP_ON_KLEPTO); diff --git a/src/game/behaviors/koopa.inc.c b/src/game/behaviors/koopa.inc.c index 615d81d..b1cd79e 100644 --- a/src/game/behaviors/koopa.inc.c +++ b/src/game/behaviors/koopa.inc.c @@ -92,9 +92,9 @@ void bhv_koopa_init(void) { static void koopa_play_footstep_sound(s8 animFrame1, s8 animFrame2) { s32 sound; if (o->header.gfx.scale[0] > 1.5f) { - sound = SOUND_OBJECT_UNK50342081; + sound = SOUND_OBJ_KOOPA_THE_QUICK_WALK; } else { - sound = SOUND_OBJECT_UNK50350081; + sound = SOUND_OBJ_KOOPA_WALK; } func_802F9378(animFrame1, animFrame2, sound); @@ -257,7 +257,7 @@ static void koopa_shelled_act_lying(void) { */ void shelled_koopa_attack_handler(s32 attackType) { if (o->header.gfx.scale[0] > 0.8f) { - PlaySound2(SOUND_OBJECT_KOOPADAMAGE); + PlaySound2(SOUND_OBJ_KOOPA_DAMAGE); o->oKoopaMovementType = KOOPA_BP_UNSHELLED; o->oAction = KOOPA_UNSHELLED_ACT_LYING; @@ -470,7 +470,7 @@ static void koopa_unshelled_update(void) { */ s32 obj_begin_race(s32 noTimer) { if (o->oTimer == 50) { - PlaySound2(SOUND_GENERAL_RACEGUNSHOT); + PlaySound2(SOUND_GENERAL_RACE_GUN_SHOT); if (!noTimer) { play_music(0, SEQUENCE_ARGS(4, SEQ_LEVEL_SLIDE), 0); @@ -503,7 +503,7 @@ static void koopa_the_quick_act_wait_before_race(void) { //! The next action doesn't execute until next frame, giving mario one // frame where he can jump, and thus no longer be ready to speak. // (On J, he has two frames and doing this enables time stop - see - // obj_update_dialog_unk2 for that glitch) + // obj_update_dialog_with_cutscene for that glitch) o->oAction = KOOPA_THE_QUICK_ACT_SHOW_INIT_TEXT; o->oForwardVel = 0.0f; set_obj_animation_and_sound_state(7); @@ -731,7 +731,7 @@ static void koopa_the_quick_act_after_race(void) { o->oFlags &= ~OBJ_FLAG_ACTIVE_FROM_AFAR; } } else if (o->parentObj->oKoopaRaceEndpointUnk100 > 0) { - s32 dialogResponse = obj_update_dialog_unk2(2, 1, 0xA2, o->parentObj->oKoopaRaceEndpointUnk100); + s32 dialogResponse = obj_update_dialog_with_cutscene(2, 1, CUTSCENE_DIALOG_1, o->parentObj->oKoopaRaceEndpointUnk100); if (dialogResponse != 0) { o->parentObj->oKoopaRaceEndpointUnk100 = -1; o->oTimer = 0; @@ -789,7 +789,7 @@ static void koopa_the_quick_update(void) { */ void bhv_koopa_update(void) { // PARTIAL_UPDATE - o->oDeathSound = SOUND_OBJECT_KOOPADEATH; + o->oDeathSound = SOUND_OBJ_KOOPA_FLYGUY_DEATH; if (o->oKoopaMovementType >= KOOPA_BP_KOOPA_THE_QUICK_BASE) { koopa_the_quick_update(); diff --git a/src/game/behaviors/lll_volcano_flames.inc.c b/src/game/behaviors/lll_volcano_flames.inc.c index 7318d2f..591a01f 100644 --- a/src/game/behaviors/lll_volcano_flames.inc.c +++ b/src/game/behaviors/lll_volcano_flames.inc.c @@ -21,5 +21,5 @@ void func_802BBFDC(void) { size = RandomFloat() * 6.0 + 3.0; scale_object_xyz(sp1C, size, size, size); if (RandomFloat() < 0.1) - PlaySound2(SOUND_GENERAL_EXPLOSION2); + PlaySound2(SOUND_GENERAL_VOLCANO_EXPLOSION); } diff --git a/src/game/behaviors/mad_piano.inc.c b/src/game/behaviors/mad_piano.inc.c index 9e8d4df..8433170 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) { obj_update_floor_and_walls(); set_obj_animation_and_sound_state(1); - func_802F9378(0, 0, SOUND_OBJECT_MADPIANOCHOMPING); + func_802F9378(0, 0, SOUND_OBJ_MAD_PIANO_CHOMPING); if (o->oDistanceToMario < 500.0f) { o->oTimer = 0; diff --git a/src/game/behaviors/manta_ray.inc.c b/src/game/behaviors/manta_ray.inc.c index da99862..3007bdf 100644 --- a/src/game/behaviors/manta_ray.inc.c +++ b/src/game/behaviors/manta_ray.inc.c @@ -31,14 +31,14 @@ void func_802F5E20(void) { s32 sp18; sp1E = o->header.gfx.unk38.animFrame; - gCurrentObject->oUnknownUnkFC_VOIDP = &D_803316A8; + gCurrentObject->oPathedWaypointsS16 = &D_803316A8; sp18 = obj_follow_path(sp18); - o->oUnknownUnkF8_S32 = o->oUnknownUnk10C_S32; - o->oUnknownUnkF4_S32 = o->oUnknownUnk108_S32; + o->oMantaUnkF8 = o->oPathedTargetYaw; + o->oMantaUnkF4 = o->oPathedTargetPitch; o->oForwardVel = 10.0f; - o->oMoveAngleYaw = approach_s16_symmetric(o->oMoveAngleYaw, o->oUnknownUnkF8_S32, 0x80); - o->oMoveAnglePitch = approach_s16_symmetric(o->oMoveAnglePitch, o->oUnknownUnkF4_S32, 0x80); - if ((s16) o->oUnknownUnkF8_S32 != (s16) o->oMoveAngleYaw) { + o->oMoveAngleYaw = approach_s16_symmetric(o->oMoveAngleYaw, o->oMantaUnkF8, 0x80); + o->oMoveAnglePitch = approach_s16_symmetric(o->oMoveAnglePitch, o->oMantaUnkF4, 0x80); + if ((s16) o->oMantaUnkF8 != (s16) o->oMoveAngleYaw) { o->oMoveAngleRoll -= 91; if (o->oMoveAngleRoll < -5461.3332) o->oMoveAngleRoll = -0x4000 / 3; @@ -50,7 +50,7 @@ void func_802F5E20(void) { func_802A2A38(); if (sp1E == 0) - PlaySound2(SOUND_GENERAL_MOVINGWATER); + PlaySound2(SOUND_GENERAL_MOVING_WATER); } void func_802F5FD8(void) { @@ -67,11 +67,11 @@ void func_802F5FD8(void) { sp18->oPosX = o->oPosX + 200.0f * sins(o->oMoveAngleYaw + 0x8000); sp18->oPosY = o->oPosY + 10.0f + 200.0f * sins(o->oMoveAnglePitch); sp18->oPosZ = o->oPosZ + 200.0f * coss(o->oMoveAngleYaw + 0x8000); - sp18->oUnknownUnk110_S32 = sp1C->oUnknownUnkF4_S32; + sp18->oWaterRingIndex = sp1C->oWaterRingMgrNextRingIndex; - sp1C->oUnknownUnkF4_S32++; - if (sp1C->oUnknownUnkF4_S32 > 0x2710) - sp1C->oUnknownUnkF4_S32 = 0; + sp1C->oWaterRingMgrNextRingIndex++; + if (sp1C->oWaterRingMgrNextRingIndex > 0x2710) + sp1C->oWaterRingMgrNextRingIndex = 0; } } @@ -80,7 +80,7 @@ void bhv_manta_ray_loop(void) { case 0: func_802F5E20(); func_802F5FD8(); - if (o->oUnk1AC_S32 == 5) { + if (o->oMantaUnk1AC == 5) { func_802A3004(); create_star(-3180.0f, -3600.0f, 120.0f); o->oAction = 1; diff --git a/src/game/behaviors/metal_box.inc.c b/src/game/behaviors/metal_box.inc.c index e7edba6..87abbbe 100644 --- a/src/game/behaviors/metal_box.inc.c +++ b/src/game/behaviors/metal_box.inc.c @@ -35,7 +35,7 @@ void bhv_pushable_loop(void) { o->oMoveAngleYaw = (s16)((gMarioObject->oMoveAngleYaw + 0x2000) & 0xc000); if (func_802B0C54(8.0f, 150.0f)) { o->oForwardVel = 4.0f; - PlaySound(SOUND_ENVIRONMENT_METALBOXPUSH); + PlaySound(SOUND_ENV_METAL_BOX_PUSH); } } } diff --git a/src/game/behaviors/mips.inc.c b/src/game/behaviors/mips.inc.c index e442668..b6a0ca2 100644 --- a/src/game/behaviors/mips.inc.c +++ b/src/game/behaviors/mips.inc.c @@ -53,14 +53,14 @@ s16 bhv_mips_find_furthest_waypoint_to_mario(void) { s16 furthestWaypointIndex = -1; f32 furthestWaypointDistance = -10000.0f; f32 distanceToMario; - void **pathBase; + struct Waypoint **pathBase; struct Waypoint *waypoint; pathBase = segmented_to_virtual(&inside_castle_seg7_trajectory_mips); // For each waypoint in MIPS path... for (i = 0; i < 10; i++) { - waypoint = (struct Waypoint *) segmented_to_virtual(*(pathBase + i)); + waypoint = segmented_to_virtual(*(pathBase + i)); x = waypoint->pos[0]; y = waypoint->pos[1]; z = waypoint->pos[2]; @@ -111,12 +111,12 @@ void bhv_mips_act_wait_for_nearby_mario(void) { void bhv_mips_act_follow_path(void) { s16 collisionFlags = 0; s32 followStatus; - void **pathBase; + struct Waypoint **pathBase; struct Waypoint *waypoint; // Retrieve current waypoint. pathBase = segmented_to_virtual(&inside_castle_seg7_trajectory_mips); - waypoint = (struct Waypoint *) segmented_to_virtual(*(pathBase + o->oMipsStartWaypointIndex)); + waypoint = segmented_to_virtual(*(pathBase + o->oMipsStartWaypointIndex)); // Set start waypoint and follow the path from there. o->oPathedStartWaypoint = waypoint; @@ -139,10 +139,10 @@ void bhv_mips_act_follow_path(void) { // Play sounds during walk animation. if (func_8029F788() == 1 && (collisionFlags & OBJ_COL_FLAG_UNDERWATER)) { - PlaySound2(SOUND_OBJECT_MIPSRABBITWATER); + PlaySound2(SOUND_OBJ_MIPS_RABBIT_WATER); spawn_object(o, MODEL_NONE, bhvSurfaceWaveShrinking); } else if (func_8029F788() == 1) { - PlaySound2(SOUND_OBJECT_MIPSRABBIT); + PlaySound2(SOUND_OBJ_MIPS_RABBIT); } } @@ -227,7 +227,7 @@ void bhv_mips_free(void) { * Handles MIPS being held by Mario. */ void bhv_mips_held(void) { - s16 dialogId; + s16 dialogID; o->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; SetObjAnimation(4); // Held animation. @@ -238,13 +238,13 @@ void bhv_mips_held(void) { if (o->oMipsStarStatus == MIPS_STAR_STATUS_HAVENT_SPAWNED_STAR) { // Choose dialog based on which MIPS encounter this is. if (o->oBehParams2ndByte == 0) - dialogId = 84; + dialogID = 84; else - dialogId = 162; + dialogID = 162; if (set_mario_npc_dialog(1) == 2) { o->activeFlags |= ACTIVE_FLAG_INITIATED_TIME_STOP; - if (func_8028F8E0(162, o, dialogId)) { + if (cutscene_object_with_dialog(CUTSCENE_DIALOG_1, o, dialogID)) { o->oInteractionSubtype |= INT_SUBTYPE_DROP_IMMEDIATELY; o->activeFlags &= ~ACTIVE_FLAG_INITIATED_TIME_STOP; o->oMipsStarStatus = MIPS_STAR_STATUS_SHOULD_SPAWN_STAR; diff --git a/src/game/behaviors/moneybag.inc.c b/src/game/behaviors/moneybag.inc.c index ae18920..89d00e5 100644 --- a/src/game/behaviors/moneybag.inc.c +++ b/src/game/behaviors/moneybag.inc.c @@ -149,7 +149,7 @@ void MoneybagReturnHomeLoop(void) { if (IsPointCloseToObject(o, o->oHomeX, o->oHomeY, o->oHomeZ, 100)) { spawn_object(o, MODEL_YELLOW_COIN, bhvMoneybagHidden); #ifndef VERSION_JP - PlaySound2(SOUND_GENERAL_VANISHSFX); + PlaySound2(SOUND_GENERAL_VANISH_SFX); #endif SetObjAnimation(0); o->oAction = MONEYBAG_ACT_DISAPPEAR; @@ -219,7 +219,7 @@ void bhv_moneybag_hidden_loop(void) { if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 400)) { spawn_object(o, MODEL_MONEYBAG, bhvMoneybag); #ifndef VERSION_JP - PlaySound2(SOUND_GENERAL_VANISHSFX); + PlaySound2(SOUND_GENERAL_VANISH_SFX); #endif o->oAction = FAKE_MONEYBAG_COIN_ACT_TRANSFORM; } diff --git a/src/game/behaviors/monty_mole.inc.c b/src/game/behaviors/monty_mole.inc.c index 92c8c54..95720a7 100644 --- a/src/game/behaviors/monty_mole.inc.c +++ b/src/game/behaviors/monty_mole.inc.c @@ -209,7 +209,7 @@ static void monty_mole_act_select_hole(void) { // Select a hole to pop out of if ((o->oMontyMoleCurrentHole = monty_mole_select_available_hole(minDistToMario)) != NULL) { - PlaySound2(SOUND_CH9_UNK67); + PlaySound2(SOUND_OBJ2_MONTY_MOLE_APPEAR); // Mark hole as unavailable o->oMontyMoleCurrentHole->oMontyMoleHoleCooldown = -1; @@ -291,7 +291,7 @@ static void monty_mole_act_begin_jump_into_hole(void) { */ static void monty_mole_act_throw_rock(void) { if (func_802F92EC(8, 10)) { - PlaySound2(SOUND_OBJECT_MONTYMOLEATTACK); + PlaySound2(SOUND_OBJ_MONTY_MOLE_ATTACK); o->prevObj = NULL; } @@ -371,7 +371,7 @@ static void monty_mole_act_jump_out_of_hole(void) { void bhv_monty_mole_update(void) { // PARTIAL_UPDATE - o->oDeathSound = SOUND_OBJECT_DYINGENEMY1; + o->oDeathSound = SOUND_OBJ_DYING_ENEMY1; obj_update_floor_and_walls(); o->oMontyMoleHeightRelativeToFloor = o->oPosY - o->oFloorHeight; diff --git a/src/game/behaviors/moving_coin.inc.c b/src/game/behaviors/moving_coin.inc.c index 252f77d..c0704c0 100644 --- a/src/game/behaviors/moving_coin.inc.c +++ b/src/game/behaviors/moving_coin.inc.c @@ -33,7 +33,7 @@ s32 CoinStep(s16 *collisionFlagsPtr) { if ((*collisionFlagsPtr & 0x1) != 0 && (*collisionFlagsPtr & 0x8) == 0) /* bit 0, bit 3 */ { - PlaySound2(SOUND_GENERAL_COINDROP); + PlaySound2(SOUND_GENERAL_COIN_DROP); return 1; } @@ -122,7 +122,7 @@ void bhv_moving_blue_coin_loop(void) { { o->oForwardVel += 25.0f; if ((collisionFlags & 0x8) == 0) - PlaySound2(SOUND_GENERAL_COINDROP); /* bit 3 */ + PlaySound2(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 36c3d1b..ed06f84 100644 --- a/src/game/behaviors/mr_blizzard.inc.c +++ b/src/game/behaviors/mr_blizzard.inc.c @@ -81,7 +81,7 @@ static void func_8030702C(void) { static void func_80307144(void) { if (o->oDistanceToMario < 1000.0f) { - PlaySound2(SOUND_OBJECT_SNOWSAND2); + PlaySound2(SOUND_OBJ_SNOW_SAND2); o->oAction = 2; o->oMoveAngleYaw = o->oAngleToMario; o->oMrBlizzardUnkFC = 42.0f; @@ -162,7 +162,7 @@ static void func_80307650(void) { if (clamp_f32(&o->oMrBlizzardUnk104, -0x4000, 0x4000)) { if (o->oMrBlizzardUnk108 != 0.0f) { - PlaySound2(SOUND_OBJECT_SNOWSAND1); + PlaySound2(SOUND_OBJ_SNOW_SAND1); if (o->oAnimState) { save_file_clear_flags(SAVE_FLAG_CAP_ON_MR_BLIZZARD); @@ -190,7 +190,7 @@ static void func_80307650(void) { if (o->oTimer >= 30) { if (o->oTimer == 30) { - PlaySound2(SOUND_EMEMY_DEFEAT_SHRINK); + PlaySound2(SOUND_OBJ_ENEMY_DEFEAT_SHRINK); } if (o->oMrBlizzardUnkF4 != 0.0f) { @@ -215,7 +215,7 @@ static void func_80307650(void) { static void func_80307990(void) { if (func_802F92EC(1, 7)) { - PlaySound2(SOUND_CH9_UNK44); + PlaySound2(SOUND_OBJ2_SCUTTLEBUG_ALERT); o->prevObj = o->oMrBlizzardUnkF8 = NULL; } else if (func_8029F788()) { o->oAction = 0; @@ -242,7 +242,7 @@ static void func_80307AD4(void) { obj_rotate_yaw_toward(o->oMrBlizzardUnk1AC, 3400); if (--o->oMrBlizzardUnk100 == 0) { - PlaySound2(SOUND_OBJECT_ENEMYALERT); + PlaySound2(SOUND_OBJ_MR_BLIZZARD_ALERT); if (o->oMrBlizzardUnk110 > 700) { o->oMrBlizzardUnk1AC += 0x8000; @@ -256,7 +256,7 @@ static void func_80307AD4(void) { } } } else if (o->oMoveFlags & 0x00000003) { - PlaySound2(SOUND_OBJECT_SNOWSAND1); + PlaySound2(SOUND_OBJ_SNOW_SAND1); if (o->oMrBlizzardUnk110 != 0) { o->oMrBlizzardUnk110 = (s32) obj_lateral_dist_to_home(); } else { @@ -342,7 +342,7 @@ static void func_80307FD4(void) { if (o->oAction == -1 || o->oMoveFlags & 0x0000000B) { func_80306ED4(6, 0, 5, 10, 3); - create_sound_spawner(SOUND_GENERAL_MOVINGINSAND); + create_sound_spawner(SOUND_GENERAL_MOVING_IN_SAND); mark_object_for_deletion(o); } diff --git a/src/game/behaviors/mr_i.inc.c b/src/game/behaviors/mr_i.inc.c index 8b8083a..b21db60 100644 --- a/src/game/behaviors/mr_i.inc.c +++ b/src/game/behaviors/mr_i.inc.c @@ -43,7 +43,7 @@ void func_802A525C(void) { particle->oPosY += 50.0f * sp18; particle->oPosX += sins(o->oMoveAngleYaw) * 90.0f * sp18; particle->oPosZ += coss(o->oMoveAngleYaw) * 90.0f * sp18; - PlaySound2(SOUND_OBJECT_MRISHOOT); + PlaySound2(SOUND_OBJ_MRI_SHOOT); } void bhv_mr_i_body_loop(void) { @@ -56,12 +56,12 @@ void bhv_mr_i_body_loop(void) { o->oFaceAnglePitch = o->oMoveAnglePitch; o->oGraphYOffset = o->header.gfx.scale[1] * 100.f; } - if (o->parentObj->OBJECT_FIELD_S32(0x22) != 1) - o->OBJECT_FIELD_S32(0x1a) = -1; + if (o->parentObj->oMrIUnk110 != 1) + o->oAnimState = -1; else { - o->OBJECT_FIELD_S32(0x1a)++; - if (o->OBJECT_FIELD_S32(0x1a) == 15) - o->parentObj->OBJECT_FIELD_S32(0x22) = 0; + o->oAnimState++; + if (o->oAnimState == 15) + o->parentObj->oMrIUnk110 = 0; } if (!o->parentObj->activeFlags) mark_object_for_deletion(o); @@ -79,7 +79,7 @@ void ActionMrI3(void) { sp1C = 2.0f; else sp1C = 1.0f; - if (o->OBJECT_FIELD_S32(0x1E) < 0) + if (o->oMrIUnk100 < 0) sp34 = 0x1000; else sp34 = -0x1000; @@ -88,12 +88,12 @@ void ActionMrI3(void) { sp36 = o->oMoveAngleYaw; o->oMoveAngleYaw += sp34 * coss(0x4000 * sp2C); if (sp36 < 0 && o->oMoveAngleYaw >= 0) - PlaySound2(SOUND_CH9_UNK6B); + PlaySound2(SOUND_OBJ2_MRI_SPINNING); o->oMoveAnglePitch = (1.0 - coss(0x4000 * sp2C)) * -0x4000; obj_shake_y(4.0f); } else if (o->oTimer < 96) { if (o->oTimer == 64) - PlaySound2(SOUND_OBJECT_MRIDEATH); + PlaySound2(SOUND_OBJ_MRI_DEATH); sp30 = (f32)(o->oTimer - 63) / 32; o->oMoveAngleYaw += sp34 * coss(0x4000 * sp2C); o->oMoveAnglePitch = (1.0 - coss(0x4000 * sp2C)) * -0x4000; @@ -101,8 +101,8 @@ void ActionMrI3(void) { sp20 = coss(0x4000 * sp30) * 0.4 + 0.6; obj_scale(sp20 * sp1C); } else if (o->oTimer < 104) { - } // do nothing - else if (o->oTimer < 168) { + // do nothing + } else if (o->oTimer < 168) { if (o->oTimer == 104) { obj_become_intangible(); func_802A3004(); @@ -128,53 +128,53 @@ void ActionMrI2() { sp1E = o->oMoveAngleYaw; if (o->oTimer == 0) { if (o->oBehParams2ndByte) - o->OBJECT_FIELD_S32(0x1B) = 200; + o->oMrIUnkF4 = 200; else - o->OBJECT_FIELD_S32(0x1B) = 120; - o->OBJECT_FIELD_S32(0x1D) = 0; - o->OBJECT_FIELD_S32(0x1E) = 0; - o->OBJECT_FIELD_S32(0x1F) = 0; + o->oMrIUnkF4 = 120; + o->oMrIUnkFC = 0; + o->oMrIUnk100 = 0; + o->oMrIUnk104 = 0; } obj_turn_toward_object(o, gMarioObject, 0x10, 0x800); obj_turn_toward_object(o, gMarioObject, 0x0F, 0x400); sp1C = sp1E - (s16)(o->oMoveAngleYaw); if (!sp1C) { - o->OBJECT_FIELD_S32(0x1D) = 0; - o->OBJECT_FIELD_S32(0x1E) = 0; + o->oMrIUnkFC = 0; + o->oMrIUnk100 = 0; } else if (sp1C > 0) { - if (o->OBJECT_FIELD_S32(0x1E) > 0) - o->OBJECT_FIELD_S32(0x1D) += sp1C; + if (o->oMrIUnk100 > 0) + o->oMrIUnkFC += sp1C; else - o->OBJECT_FIELD_S32(0x1D) = 0; - o->OBJECT_FIELD_S32(0x1E) = 1; + o->oMrIUnkFC = 0; + o->oMrIUnk100 = 1; } else { - if (o->OBJECT_FIELD_S32(0x1E) < 0) - o->OBJECT_FIELD_S32(0x1D) -= sp1C; + if (o->oMrIUnk100 < 0) + o->oMrIUnkFC -= sp1C; else - o->OBJECT_FIELD_S32(0x1D) = 0; - o->OBJECT_FIELD_S32(0x1E) = -1; + o->oMrIUnkFC = 0; + o->oMrIUnk100 = -1; } - if (!o->OBJECT_FIELD_S32(0x1D)) - o->OBJECT_FIELD_S32(0x1B) = 120; - if (o->OBJECT_FIELD_S32(0x1D) > 1 << 16) + if (!o->oMrIUnkFC) + o->oMrIUnkF4 = 120; + if (o->oMrIUnkFC > 1 << 16) o->oAction = 3; - o->OBJECT_FIELD_S32(0x1B) -= 1; - if (!o->OBJECT_FIELD_S32(0x1B)) { - o->OBJECT_FIELD_S32(0x1B) = 120; - o->OBJECT_FIELD_S32(0x1D) = 0; + o->oMrIUnkF4 -= 1; + if (!o->oMrIUnkF4) { + o->oMrIUnkF4 = 120; + o->oMrIUnkFC = 0; } - if (o->OBJECT_FIELD_S32(0x1D) < 5000) { - if (o->OBJECT_FIELD_S32(0x1F) == o->OBJECT_FIELD_S32(0x20)) - o->OBJECT_FIELD_S32(0x22) = 1; - if (o->OBJECT_FIELD_S32(0x1F) == o->OBJECT_FIELD_S32(0x20) + 20) { + if (o->oMrIUnkFC < 5000) { + if (o->oMrIUnk104 == o->oMrIUnk108) + o->oMrIUnk110 = 1; + if (o->oMrIUnk104 == o->oMrIUnk108 + 20) { func_802A525C(); - o->OBJECT_FIELD_S32(0x1F) = 0; - o->OBJECT_FIELD_S32(0x20) = (s32)(RandomFloat() * 50.0f + 50.0f); + o->oMrIUnk104 = 0; + o->oMrIUnk108 = (s32)(RandomFloat() * 50.0f + 50.0f); } - o->OBJECT_FIELD_S32(0x1F)++; + o->oMrIUnk104++; } else { - o->OBJECT_FIELD_S32(0x1F) = 0; - o->OBJECT_FIELD_S32(0x20) = (s32)(RandomFloat() * 50.0f + 50.0f); + o->oMrIUnk104 = 0; + o->oMrIUnk108 = (s32)(RandomFloat() * 50.0f + 50.0f); } if (o->oDistanceToMario > 800.0f) o->oAction = 1; @@ -190,9 +190,9 @@ void ActionMrI1(void) { if (o->oTimer == 0) { obj_become_tangible(); o->oMoveAnglePitch = 0; - o->OBJECT_FIELD_S32(0x1F) = 30; - o->OBJECT_FIELD_S32(0x20) = RandomFloat() * 20.0f; - if (o->OBJECT_FIELD_S32(0x20) & 1) + o->oMrIUnk104 = 30; + o->oMrIUnk108 = RandomFloat() * 20.0f; + if (o->oMrIUnk108 & 1) o->oAngleVelYaw = -256; else o->oAngleVelYaw = 256; @@ -201,16 +201,16 @@ void ActionMrI1(void) { if (o->oDistanceToMario < 700.0f) o->oAction = 2; else - o->OBJECT_FIELD_S32(0x1F)++; + o->oMrIUnk104++; } else { o->oMoveAngleYaw += o->oAngleVelYaw; - o->OBJECT_FIELD_S32(0x1F) = 30; + o->oMrIUnk104 = 30; } - if (o->OBJECT_FIELD_S32(0x1F) == o->OBJECT_FIELD_S32(0x20) + 60) - o->OBJECT_FIELD_S32(0x22) = 1; - if (o->OBJECT_FIELD_S32(0x20) + 80 < o->OBJECT_FIELD_S32(0x1F)) { - o->OBJECT_FIELD_S32(0x1F) = 0; - o->OBJECT_FIELD_S32(0x20) = RandomFloat() * 80.0f; + if (o->oMrIUnk104 == o->oMrIUnk108 + 60) + o->oMrIUnk110 = 1; + if (o->oMrIUnk108 + 80 < o->oMrIUnk104) { + o->oMrIUnk104 = 0; + o->oMrIUnk108 = RandomFloat() * 80.0f; func_802A525C(); } } diff --git a/src/game/behaviors/mushroom_1up.inc.c b/src/game/behaviors/mushroom_1up.inc.c index 957178d..692877c 100644 --- a/src/game/behaviors/mushroom_1up.inc.c +++ b/src/game/behaviors/mushroom_1up.inc.c @@ -4,7 +4,7 @@ void bhv_1up_interact(void) { UNUSED s32 sp1C; if (are_objects_collided(o, gMarioObject) == 1) { - play_sound(SOUND_GENERAL_1UP, gDefaultSoundArgs); + play_sound(SOUND_GENERAL_COLLECT_1UP, gDefaultSoundArgs); gMarioState->numLives++; o->activeFlags = 0; } @@ -72,7 +72,7 @@ void bhv_1up_walking_loop(void) { spawn_object(o, MODEL_NONE, bhvSparkleSpawn); if (o->oTimer == 0) - play_sound(SOUND_CH8_UNK63, gDefaultSoundArgs); + play_sound(SOUND_GENERAL2_1UP_APPEAR, gDefaultSoundArgs); func_802F2D40(); @@ -109,7 +109,7 @@ void bhv_1up_running_away_loop(void) { spawn_object(o, MODEL_NONE, bhvSparkleSpawn); if (o->oTimer == 0) - play_sound(SOUND_CH8_UNK63, gDefaultSoundArgs); + play_sound(SOUND_GENERAL2_1UP_APPEAR, gDefaultSoundArgs); func_802F2D40(); @@ -215,7 +215,7 @@ void bhv_1up_hidden_loop(void) { o->oVelY = 40.0f; o->oAction = 3; o->header.gfx.node.flags &= ~0x10; - play_sound(SOUND_CH8_UNK63, gDefaultSoundArgs); + play_sound(SOUND_GENERAL2_1UP_APPEAR, gDefaultSoundArgs); } break; @@ -267,7 +267,7 @@ void bhv_1up_hidden_in_pole_loop(void) { o->oVelY = 40.0f; o->oAction = 3; o->header.gfx.node.flags &= ~0x10; - play_sound(SOUND_CH8_UNK63, gDefaultSoundArgs); + play_sound(SOUND_GENERAL2_1UP_APPEAR, gDefaultSoundArgs); } break; diff --git a/src/game/behaviors/piranha_plant.inc.c b/src/game/behaviors/piranha_plant.inc.c index 7b30dd2..66b1cc4 100644 --- a/src/game/behaviors/piranha_plant.inc.c +++ b/src/game/behaviors/piranha_plant.inc.c @@ -41,7 +41,7 @@ s32 piranha_plant_check_interactions(void) { if (o->oInteractStatus & INT_STATUS_INTERACTED) { func_80321080(50); if (o->oInteractStatus & INT_STATUS_WAS_ATTACKED) { - PlaySound2(SOUND_PIRANHA_PLANT_DYING); + PlaySound2(SOUND_OBJ2_PIRANHA_PLANT_DYING); // Spawn 20 intangible purple particles that quickly dissipate. for (i = 0; i < 20; i++) { @@ -166,7 +166,7 @@ void piranha_plant_attacked(void) { */ void piranha_plant_act_shrink_and_die(void) { if (o->oTimer == 0) { - PlaySound2(SOUND_EMEMY_DEFEAT_SHRINK); + PlaySound2(SOUND_OBJ_ENEMY_DEFEAT_SHRINK); o->oPiranhaPlantScale = 1.0f; } @@ -253,7 +253,7 @@ void piranha_plant_act_biting(void) { // Play a bite sound effect on certain frames. if (item_in_array(frame, sPiranhaPlantBiteSoundFrames)) { - PlaySound2(SOUND_PIRANHA_PLANT_BITE); + PlaySound2(SOUND_OBJ2_PIRANHA_PLANT_BITE); } // Move to face the player. diff --git a/src/game/behaviors/platform_on_track.inc.c b/src/game/behaviors/platform_on_track.inc.c index 3a3c13a..0d9c1de 100644 --- a/src/game/behaviors/platform_on_track.inc.c +++ b/src/game/behaviors/platform_on_track.inc.c @@ -129,9 +129,9 @@ static void platform_on_track_act_move_along_track(void) { s16 initialAngle; if (!o->oPlatformOnTrackIsNotSkiLift) { - PlaySound(SOUND_ENVIRONMENT_ELEVATOR3); + PlaySound(SOUND_ENV_ELEVATOR3); } else if (!o->oPlatformOnTrackIsNotHMC) { - PlaySound(SOUND_ENVIRONMENT_ELEVATOR1); + PlaySound(SOUND_ENV_ELEVATOR1); } // Fall after reaching the last waypoint if desired diff --git a/src/game/behaviors/pokey.inc.c b/src/game/behaviors/pokey.inc.c index 6999979..a0ef3a0 100644 --- a/src/game/behaviors/pokey.inc.c +++ b/src/game/behaviors/pokey.inc.c @@ -290,7 +290,7 @@ static void pokey_act_unload_parts(void) { void bhv_pokey_update(void) { // PARTIAL_UPDATE - o->oDeathSound = SOUND_OBJECT_POKEYDEATH; + o->oDeathSound = SOUND_OBJ_POKEY_DEATH; switch (o->oAction) { case POKEY_ACT_UNINITIALIZED: diff --git a/src/game/behaviors/purple_switch.inc.c b/src/game/behaviors/purple_switch.inc.c index df6f7e1..47cfe77 100644 --- a/src/game/behaviors/purple_switch.inc.c +++ b/src/game/behaviors/purple_switch.inc.c @@ -29,7 +29,7 @@ void bhv_purple_switch_loop(void) { case PURPLE_SWITCH_PRESSED: func_802A3398(2, 3, 1.5f, 0.2f); if (o->oTimer == 3) { - PlaySound2(SOUND_CH8_UNK3E); + PlaySound2(SOUND_GENERAL2_PURPLE_SWITCH); o->oAction = PURPLE_SWITCH_TICKING; ShakeScreen(1); } @@ -44,9 +44,9 @@ void bhv_purple_switch_loop(void) { o->oAction++; } else { if (o->oTimer < 360) { - play_sound(SOUND_CH8_SWITCH5, gDefaultSoundArgs); + play_sound(SOUND_GENERAL2_SWITCH_TICK_FAST, gDefaultSoundArgs); } else { - play_sound(SOUND_CH8_SWITCH6, gDefaultSoundArgs); + play_sound(SOUND_GENERAL2_SWITCH_TICK_SLOW, gDefaultSoundArgs); } if (o->oTimer > 400) { o->oAction = PURPLE_SWITCH_WAIT_FOR_MARIO_TO_GET_OFF; diff --git a/src/game/behaviors/pyramid_top.inc.c b/src/game/behaviors/pyramid_top.inc.c index a304863..add8319 100644 --- a/src/game/behaviors/pyramid_top.inc.c +++ b/src/game/behaviors/pyramid_top.inc.c @@ -55,7 +55,7 @@ void bhv_pyramid_top_spinning(void) { pyramidFragment = spawn_object(o, MODEL_DIRT_ANIMATION, bhvPyramidTopFragment); pyramidFragment->oForwardVel = RandomFloat() * 10.0f + 20.0f; pyramidFragment->oMoveAngleYaw = RandomU16(); - pyramidFragment->oUnknownUnkF4_F32 = 0.8f; + pyramidFragment->oPyramidTopFragmentsScale = 0.8f; pyramidFragment->oGravity = RandomFloat() + 2.0f; } @@ -82,7 +82,7 @@ void bhv_pyramid_top_explode(void) { pyramidFragment->oForwardVel = RandomFloat() * 50 + 80; pyramidFragment->oVelY = RandomFloat() * 80 + 20; pyramidFragment->oMoveAngleYaw = RandomU16(); - pyramidFragment->oUnknownUnkF4_F32 = 3; + pyramidFragment->oPyramidTopFragmentsScale = 3; pyramidFragment->oGravity = RandomFloat() * 2 + 5; } @@ -101,7 +101,7 @@ void bhv_pyramid_top_loop(void) { case PYRAMID_TOP_ACT_SPINNING: if (o->oTimer == 0) { - PlaySound2(SOUND_CH8_UNK4B); + PlaySound2(SOUND_GENERAL2_PYRAMID_TOP_SPIN); } bhv_pyramid_top_spinning(); @@ -109,7 +109,7 @@ void bhv_pyramid_top_loop(void) { case PYRAMID_TOP_ACT_EXPLODE: if (o->oTimer == 0) { - create_sound_spawner(SOUND_CH8_UNK4C); + create_sound_spawner(SOUND_GENERAL2_PYRAMID_TOP_EXPLOSION); } bhv_pyramid_top_explode(); diff --git a/src/game/behaviors/racing_penguin.inc.c b/src/game/behaviors/racing_penguin.inc.c index 3e436cd..b20081d 100644 --- a/src/game/behaviors/racing_penguin.inc.c +++ b/src/game/behaviors/racing_penguin.inc.c @@ -69,7 +69,7 @@ static void racing_penguin_act_race(void) { targetSpeed = o->oPosY - gMarioObject->oPosY; minSpeed = 70.0f; - PlaySound(SOUND_CH6_ROUGHSLIDE); + PlaySound(SOUND_AIR_ROUGH_SLIDE); if (targetSpeed < 100.0f || (o->oPathedPrevWaypointFlags & WAYPOINT_MASK_00FF) >= 35) { if ((o->oPathedPrevWaypointFlags & WAYPOINT_MASK_00FF) >= 35) { @@ -105,7 +105,7 @@ static void racing_penguin_act_race(void) { static void racing_penguin_act_finish_race(void) { if (o->oForwardVel != 0.0f) { if (o->oTimer > 5 && (o->oMoveFlags & 0x00000200)) { - PlaySound2(SOUND_OBJECT_POUNDINGLOUD); + PlaySound2(SOUND_OBJ_POUNDING_LOUD); func_8027F440(1, o->oPosX, o->oPosY, o->oPosZ); o->oForwardVel = 0.0f; } @@ -144,7 +144,7 @@ static void racing_penguin_act_show_final_text(void) { o->oForwardVel = 4.0f; } } else if (o->oRacingPenguinFinalTextbox > 0) { - if ((textResult = obj_update_dialog_unk2(2, 1, 0xA2, o->oRacingPenguinFinalTextbox)) != 0) { + if ((textResult = obj_update_dialog_with_cutscene(2, 1, CUTSCENE_DIALOG_1, o->oRacingPenguinFinalTextbox)) != 0) { o->oRacingPenguinFinalTextbox = -1; o->oTimer = 0; } diff --git a/src/game/behaviors/recovery_heart.inc.c b/src/game/behaviors/recovery_heart.inc.c index 103c360..d730585 100644 --- a/src/game/behaviors/recovery_heart.inc.c +++ b/src/game/behaviors/recovery_heart.inc.c @@ -15,7 +15,7 @@ void bhv_recovery_heart_loop(void) { set_object_hitbox(o, &sRecoveryHeartHitbox); if (are_objects_collided(o, gMarioObject)) { if (o->oSpinningHeartPlayedSound == 0) { - PlaySound2(SOUND_GENERAL_HEARTSPIN); + PlaySound2(SOUND_GENERAL_HEART_SPIN); o->oSpinningHeartPlayedSound += 1; } diff --git a/src/game/behaviors/red_coin.inc.c b/src/game/behaviors/red_coin.inc.c index fac03c0..7c04f80 100644 --- a/src/game/behaviors/red_coin.inc.c +++ b/src/game/behaviors/red_coin.inc.c @@ -34,17 +34,17 @@ void bhv_red_coin_init(void) { void bhv_red_coin_loop(void) { if (o->oInteractStatus & INT_STATUS_INTERACTED) { if (o->parentObj != NULL) { - o->parentObj->oHiddenRedCoinStarCoinsCollected++; + o->parentObj->oHiddenStarTriggerCounter++; #ifdef VERSION_JP - create_sound_spawner(SOUND_GENERAL_REDCOIN); + create_sound_spawner(SOUND_GENERAL_RED_COIN); #endif - if (o->parentObj->oHiddenRedCoinStarCoinsCollected != 8) { - SpawnOrangeNumber(o->parentObj->oHiddenRedCoinStarCoinsCollected, 0, 0, 0); + if (o->parentObj->oHiddenStarTriggerCounter != 8) { + SpawnOrangeNumber(o->parentObj->oHiddenStarTriggerCounter, 0, 0, 0); } #ifndef VERSION_JP - play_sound(SOUND_MENU_COLLECTREDCOIN - + (((u8) o->parentObj->oHiddenRedCoinStarCoinsCollected - 1) << 16), + play_sound(SOUND_MENU_COLLECT_RED_COIN + + (((u8) o->parentObj->oHiddenStarTriggerCounter - 1) << 16), gDefaultSoundArgs); #endif } diff --git a/src/game/behaviors/rolling_log.inc.c b/src/game/behaviors/rolling_log.inc.c index e3baee1..0bb9834 100644 --- a/src/game/behaviors/rolling_log.inc.c +++ b/src/game/behaviors/rolling_log.inc.c @@ -87,16 +87,16 @@ void bhv_rolling_log_loop(void) { } void func_802F2820(void) { - o->oUnknownUnkF4_F32 += 4.0f; - o->oAngleVelPitch += o->oUnknownUnkF4_F32; + o->oRollingLogUnkF4 += 4.0f; + o->oAngleVelPitch += o->oRollingLogUnkF4; o->oFaceAnglePitch -= o->oAngleVelPitch; if (o->oFaceAnglePitch < -0x4000) { o->oFaceAnglePitch = -0x4000; o->oAngleVelPitch = 0; - o->oUnknownUnkF4_F32 = 0; + o->oRollingLogUnkF4 = 0; o->oAction = 2; - PlaySound2(SOUND_GENERAL_BIGPOUND); + PlaySound2(SOUND_GENERAL_BIG_POUND); func_8027F440(3, o->oPosX, o->oPosY, o->oPosZ); } } @@ -116,7 +116,7 @@ void bhvLllVolcanoFallingTrap_loop(void) { case 0: if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 1000)) { o->oAction = 1; - PlaySound2(SOUND_GENERAL_QUIETPOUND2); + PlaySound2(SOUND_GENERAL_QUIET_POUND2); } break; diff --git a/src/game/behaviors/rotating_platform.inc.c b/src/game/behaviors/rotating_platform.inc.c index 56ac251..58c8e93 100644 --- a/src/game/behaviors/rotating_platform.inc.c +++ b/src/game/behaviors/rotating_platform.inc.c @@ -16,7 +16,7 @@ void bhv_wf_rotating_wooden_platform_loop(void) { o->oAngleVelYaw = 0x100; if (o->oTimer > 126) o->oAction = 0; - PlaySound(SOUND_ENVIRONMENT_ELEVATOR2); + PlaySound(SOUND_ENV_ELEVATOR2); } obj_rotate_face_angle_using_vel(); } diff --git a/src/game/behaviors/scuttlebug.inc.c b/src/game/behaviors/scuttlebug.inc.c index 16f890f..198f004 100644 --- a/src/game/behaviors/scuttlebug.inc.c +++ b/src/game/behaviors/scuttlebug.inc.c @@ -28,7 +28,7 @@ void bhv_scuttlebug_loop(void) { f32 sp18; obj_update_floor_and_walls(); if (o->oSubAction != 0 - && obj_set_hitbox_and_die_if_attacked(&sScuttlebugHitbox, SOUND_OBJECT_DYINGENEMY1, + && obj_set_hitbox_and_die_if_attacked(&sScuttlebugHitbox, SOUND_OBJ_DYING_ENEMY1, o->oScuttlebugUnkF4)) o->oSubAction = 3; if (o->oSubAction != 1) @@ -36,7 +36,7 @@ void bhv_scuttlebug_loop(void) { switch (o->oSubAction) { case 0: if (o->oMoveFlags & 1) - PlaySound2(SOUND_OBJECT_GOOMBAALERT); + PlaySound2(SOUND_OBJ_GOOMBA_ALERT); if (o->oMoveFlags & 3) { o->oHomeX = o->oPosX; o->oHomeY = o->oPosY; @@ -55,7 +55,7 @@ void bhv_scuttlebug_loop(void) { if (abs_angle_diff(o->oAngleToMario, o->oMoveAngleYaw) < 0x800) { o->oScuttlebugUnkF8 = 1; o->oVelY = 20.0f; - PlaySound2(SOUND_CH9_UNK44); + PlaySound2(SOUND_OBJ2_SCUTTLEBUG_ALERT); } } else if (o->oScuttlebugUnkF8 == 1) { o->oForwardVel = 15.0f; @@ -80,7 +80,7 @@ void bhv_scuttlebug_loop(void) { o->oFlags &= ~8; o->oForwardVel = -10.0f; o->oVelY = 30.0f; - PlaySound2(SOUND_CH9_UNK44); + PlaySound2(SOUND_OBJ2_SCUTTLEBUG_ALERT); o->oSubAction++; break; case 4: @@ -106,12 +106,12 @@ void bhv_scuttlebug_loop(void) { sp18 = 3.0f; func_8029ED98(0, sp18); if (o->oMoveFlags & 3) - func_802BE2E8(1, 23, SOUND_CH9_UNK43); + func_802BE2E8(1, 23, SOUND_OBJ2_SCUTTLEBUG_WALK); if (o->parentObj != o) { if (obj_is_hidden(o)) mark_object_for_deletion(o); if (o->activeFlags == 0) - o->parentObj->oUnknownUnk88 = 1; + o->parentObj->oScuttlebugSpawnerUnk88 = 1; } obj_move_standard(-50); } @@ -120,7 +120,7 @@ void bhv_scuttlebug_spawn_loop(void) { struct Object *scuttlebug; if (o->oAction == 0) { if (o->oTimer > 30 && 500.0f < o->oDistanceToMario && o->oDistanceToMario < 1500.0f) { - PlaySound2(SOUND_CH9_UNK44); + PlaySound2(SOUND_OBJ2_SCUTTLEBUG_ALERT); scuttlebug = spawn_object(o, MODEL_SCUTTLEBUG, bhvScuttlebug); scuttlebug->oScuttlebugUnkF4 = o->oScuttlebugSpawnerUnkF4; scuttlebug->oForwardVel = 30.0f; @@ -128,8 +128,8 @@ void bhv_scuttlebug_spawn_loop(void) { o->oAction++; o->oScuttlebugUnkF4 = 1; } - } else if (o->oUnknownUnk88 != 0) { - o->oUnknownUnk88 = 0; + } else if (o->oScuttlebugSpawnerUnk88 != 0) { + o->oScuttlebugSpawnerUnk88 = 0; o->oAction = 0; } } diff --git a/src/game/behaviors/seesaw_platform.inc.c b/src/game/behaviors/seesaw_platform.inc.c index 175365f..fcece7c 100644 --- a/src/game/behaviors/seesaw_platform.inc.c +++ b/src/game/behaviors/seesaw_platform.inc.c @@ -33,7 +33,7 @@ void bhv_seesaw_platform_update(void) { o->oFaceAnglePitch += (s32) o->oSeesawPlatformPitchVel; if (absf(o->oSeesawPlatformPitchVel) > 10.0f) { - PlaySound(SOUND_ENVIRONMENT_BOATROCKING1); + PlaySound(SOUND_ENV_BOAT_ROCKING1); } if (gMarioObject->platform == o) { diff --git a/src/game/behaviors/skeeter.inc.c b/src/game/behaviors/skeeter.inc.c index 71aa278..7a0cdb7 100644 --- a/src/game/behaviors/skeeter.inc.c +++ b/src/game/behaviors/skeeter.inc.c @@ -50,7 +50,7 @@ static void skeeter_act_idle(void) { if (o->oSkeeterWaitTime != 0) { o->oSkeeterWaitTime -= 1; } else if (func_8029F788()) { - PlaySound2(SOUND_OBJECT_WALKINGWATER); + PlaySound2(SOUND_OBJ_WALKING_WATER); o->oAction = SKEETER_ACT_LUNGE; o->oForwardVel = 80.0f; o->oSkeeterUnk1AC = 0; @@ -99,7 +99,7 @@ static void skeeter_act_walk(void) { sp24 = 0.12f * o->oForwardVel; func_8029ED98(2, sp24); - func_802F9378(3, 13, SOUND_OBJECT_SKEETERWALK); + func_802F9378(3, 13, SOUND_OBJ_SKEETER_WALK); if (o->oSkeeterUnkF8 != 0) { o->oSkeeterUnkF8 = obj_resolve_collisions_and_turn(o->oSkeeterTargetAngle, 0x400); @@ -135,7 +135,7 @@ static void skeeter_act_walk(void) { } void bhv_skeeter_update(void) { - o->oDeathSound = SOUND_OBJECT_SNUFITDEATH; + o->oDeathSound = SOUND_OBJ_SNUFIT_SKEETER_DEATH; treat_far_home_as_mario(1000.0f); obj_update_floor_and_walls(); diff --git a/src/game/behaviors/snow_mound.inc.c b/src/game/behaviors/snow_mound.inc.c index 128e923..ff6faf4 100644 --- a/src/game/behaviors/snow_mound.inc.c +++ b/src/game/behaviors/snow_mound.inc.c @@ -8,7 +8,7 @@ void bhv_sliding_snow_mound_loop(void) { if (o->oTimer >= 118) o->oAction = 1; - PlaySound(SOUND_ENVIRONMENT_SINKQUICKSAND); + PlaySound(SOUND_ENV_SINK_QUICKSAND); break; case 1: diff --git a/src/game/behaviors/snowman.inc.c b/src/game/behaviors/snowman.inc.c index 8a1e4fc..1d441cb 100644 --- a/src/game/behaviors/snowman.inc.c +++ b/src/game/behaviors/snowman.inc.c @@ -44,10 +44,10 @@ void func_802EFB2C(void) { void func_802EFB84(f32 f12) { o->oFaceAnglePitch += (s16)(o->oForwardVel * (100.0f / f12)); - o->oUnknownUnkF4_F32 += o->oForwardVel * 1e-4; + o->oSnowmansBottomUnkF4 += o->oForwardVel * 1e-4; - if (o->oUnknownUnkF4_F32 > 1.0) - o->oUnknownUnkF4_F32 = 1.0f; + if (o->oSnowmansBottomUnkF4 > 1.0) + o->oSnowmansBottomUnkF4 = 1.0f; } void func_802EFC44(void) { @@ -55,10 +55,10 @@ void func_802EFC44(void) { s32 sp20; UNUSED s16 sp1E; - o->oSnowmansBottomUnkFC = segmented_to_virtual(&ccm_seg7_trajectory_snowman); + o->oPathedStartWaypoint = segmented_to_virtual(&ccm_seg7_trajectory_snowman); sp26 = func_802E4204(); sp20 = obj_follow_path(sp20); - o->oSnowmansBottomUnkF8 = o->oSnowmansBottomUnk10C; + o->oSnowmansBottomUnkF8 = o->oPathedTargetYaw; o->oMoveAngleYaw = approach_s16_symmetric(o->oMoveAngleYaw, o->oSnowmansBottomUnkF8, 0x400); if (o->oForwardVel > 70.0) @@ -66,7 +66,7 @@ void func_802EFC44(void) { if (sp20 == -1) { sp1E = (u16) o->oAngleToMario - (u16) o->oMoveAngleYaw; - if (func_802E46C0(o->oMoveAngleYaw, o->oAngleToMario, 0x2000) == 1 && o->oUnk1AC_S32 == 1) { + if (func_802E46C0(o->oMoveAngleYaw, o->oAngleToMario, 0x2000) == 1 && o->oSnowmansBottomUnk1AC == 1) { o->oSnowmansBottomUnkF8 = o->oAngleToMario; } else { o->oSnowmansBottomUnkF8 = o->oMoveAngleYaw; @@ -92,7 +92,7 @@ void func_802EFDA0(void) { o->parentObj->oAction = 2; o->parentObj->oVelY = 100.0f; - PlaySound2(SOUND_OBJECT_WATERBOMBBOUNCING2); + PlaySound2(SOUND_OBJ_SNOWMAN_BOUNCE); } if (o->oTimer == 200) { @@ -125,7 +125,7 @@ void bhv_snowmans_bottom_loop(void) { case 0: if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 400) == 1 && set_mario_npc_dialog(1) == 2) { - sp1E = func_8028F8E0(162, o, 110); + sp1E = cutscene_object_with_dialog(CUTSCENE_DIALOG_1, o, 110); if (sp1E) { o->oForwardVel = 10.0f; o->oAction = 1; @@ -137,13 +137,13 @@ void bhv_snowmans_bottom_loop(void) { case 1: func_802EFC44(); func_802EFB84(o->oSnowmansBottomUnkF4); - PlaySound(SOUND_ENVIRONMENT_UNKNOWN2); + PlaySound(SOUND_ENV_UNKNOWN2); break; case 2: func_802EFDA0(); func_802EFB84(o->oSnowmansBottomUnkF4); - PlaySound(SOUND_ENVIRONMENT_UNKNOWN2); + PlaySound(SOUND_ENV_UNKNOWN2); break; case 3: @@ -208,7 +208,7 @@ void bhv_snowmans_head_loop(void) { if (o->oPosY < -994.0f) { o->oPosY = -994.0f; o->oAction = 4; - PlaySound2(SOUND_OBJECT_EXPLODE); + PlaySound2(SOUND_OBJ_SNOWMAN_EXPLODE); play_puzzle_jingle(); } break; @@ -227,7 +227,7 @@ void bhv_snowmans_head_loop(void) { void bhv_snowmans_body_checkpoint_loop(void) { if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 800)) { - o->parentObj->oUnk1AC_S32++; + o->parentObj->oSnowmansBottomUnk1AC++; o->activeFlags = 0; } diff --git a/src/game/behaviors/snowman_wind.inc.c b/src/game/behaviors/snowman_wind.inc.c index e2d1b0f..bdd028e 100644 --- a/src/game/behaviors/snowman_wind.inc.c +++ b/src/game/behaviors/snowman_wind.inc.c @@ -15,7 +15,7 @@ void bhv_snowman_wind_blowing_loop(void) { o->oSubAction++; func_802B8F7C(&o->oPosX, pos); } else if (o->oSubAction == 1) { - if (obj_update_dialog_unk1(2, 2, 153, 0)) + if (obj_update_dialog(2, 2, 153, 0)) o->oSubAction++; } else if (o->oDistanceToMario < 1500.0f && absf(gMarioObject->oPosY - o->oHomeY) < 500.0f) { if ((sp32 = o->oAngleToMario - o->oSnowmanWindBlowingUnkF4) > 0) { @@ -30,6 +30,6 @@ void bhv_snowman_wind_blowing_loop(void) { o->oMoveAngleYaw = o->oSnowmanWindBlowingUnkF4 - 0x1500; } func_802C76E0(12, 3.0f, 0, 0, 0); - PlaySound(SOUND_CH6_BLOWWINDORFIRE_LOWPRIO); + PlaySound(SOUND_AIR_BLOW_WIND); } } diff --git a/src/game/behaviors/snufit.inc.c b/src/game/behaviors/snufit.inc.c index fb98581..af7c55c 100644 --- a/src/game/behaviors/snufit.inc.c +++ b/src/game/behaviors/snufit.inc.c @@ -32,9 +32,9 @@ Gfx *Geo18_8030D93C(s32 arg0, struct GraphNode *node, UNUSED void *arg2) { sp4 = (struct Object *) gCurGraphNodeObject; sp0 = (struct GraphNodeTranslationRotation *) node->next; - sp0->translation[0] = sp4->OBJECT_FIELD_S16(0x49, 0); - sp0->translation[1] = sp4->OBJECT_FIELD_S16(0x49, 1); - sp0->translation[2] = sp4->OBJECT_FIELD_S16(0x4A, 0); + sp0->translation[0] = sp4->oSnufitUnk1AC; + sp0->translation[1] = sp4->oSnufitUnk1AE; + sp0->translation[2] = sp4->oSnufitUnk1B0; } return NULL; @@ -48,7 +48,7 @@ Gfx *Geo18_8030D9AC(s32 arg0, struct GraphNode *node, UNUSED void *arg2) { sp4 = (struct Object *) gCurGraphNodeObject; sp0 = (struct GraphNodeScale *) node->next; - sp0->scale = sp4->OBJECT_FIELD_S16(0x4A, 1) / 1000.0f; + sp0->scale = sp4->oSnufitUnk1B2 / 1000.0f; } return NULL; @@ -79,7 +79,7 @@ void snufit_act_1(void) { o->oAction = 0; } else if (o->oSnufitUnk10C < 3 && o->oTimer >= 3) { o->oSnufitUnk10C += 1; - PlaySound2(SOUND_OBJECT_SNUFITSHOOT); + PlaySound2(SOUND_OBJ_SNUFIT_SHOOT); spawn_object_relative(0, 0, -20, 40, o, MODEL_BOWLING_BALL, bhvSnufitBalls); o->oSnufitUnkF4 = -30; o->oTimer = 0; @@ -88,7 +88,7 @@ void snufit_act_1(void) { void bhv_snufit_loop(void) { if (!(o->activeFlags & 0x0008)) { - o->oDeathSound = SOUND_OBJECT_SNUFITDEATH; + o->oDeathSound = SOUND_OBJ_SNUFIT_SKEETER_DEATH; if (o->oDistanceToMario < 800.0f) { obj_turn_pitch_toward_mario(120.0f, 2000); diff --git a/src/game/behaviors/sound_ambient.inc.c b/src/game/behaviors/sound_ambient.inc.c index efc2790..e8f708d 100644 --- a/src/game/behaviors/sound_ambient.inc.c +++ b/src/game/behaviors/sound_ambient.inc.c @@ -4,5 +4,5 @@ void bhv_ambient_sounds_init(void) { if (gCurrLevelCamera->currPreset == CAMERA_PRESET_BEHIND_MARIO) return; - play_sound(SOUND_CH6_CASTLEOUTDOORSAMBIENT, gDefaultSoundArgs); + play_sound(SOUND_AIR_CASTLE_OUTDOORS_AMBIENT, gDefaultSoundArgs); } diff --git a/src/game/behaviors/sound_birds.inc.c b/src/game/behaviors/sound_birds.inc.c index ad2e050..a62c3aa 100644 --- a/src/game/behaviors/sound_birds.inc.c +++ b/src/game/behaviors/sound_birds.inc.c @@ -6,15 +6,15 @@ void bhv_birds_sound_loop(void) { switch (o->oBehParams2ndByte) { case 0: - PlaySound(SOUND_CH9_UNK52); + PlaySound(SOUND_OBJ2_BIRD_CHIRP1); break; case 1: - PlaySound(SOUND_CH8_UNK50); + PlaySound(SOUND_GENERAL2_BIRD_CHIRP2); break; case 2: - PlaySound(SOUND_OBJECT_BIRDS2); + PlaySound(SOUND_OBJ_BIRD_CHIRP3); break; } } diff --git a/src/game/behaviors/sound_sand.inc.c b/src/game/behaviors/sound_sand.inc.c index c393025..11d2d50 100644 --- a/src/game/behaviors/sound_sand.inc.c +++ b/src/game/behaviors/sound_sand.inc.c @@ -4,5 +4,5 @@ void bhv_sand_sound_loop(void) { if (gCurrLevelCamera->currPreset == CAMERA_PRESET_BEHIND_MARIO) return; - PlaySound(SOUND_ENVIRONMENT_MOVINGSAND); + PlaySound(SOUND_ENV_MOVINGSAND); } diff --git a/src/game/behaviors/sound_volcano.inc.c b/src/game/behaviors/sound_volcano.inc.c index fc27b17..aa21d5a 100644 --- a/src/game/behaviors/sound_volcano.inc.c +++ b/src/game/behaviors/sound_volcano.inc.c @@ -1,5 +1,5 @@ // sound_volcano.inc.c void bhv_volcano_sound_loop(void) { - PlaySound(SOUND_ENVIRONMENT_DRONING1); + PlaySound(SOUND_ENV_DRONING1); } diff --git a/src/game/behaviors/sound_waterfall.inc.c b/src/game/behaviors/sound_waterfall.inc.c index 54ce1d5..89bc08d 100644 --- a/src/game/behaviors/sound_waterfall.inc.c +++ b/src/game/behaviors/sound_waterfall.inc.c @@ -1,5 +1,5 @@ // sound_waterfall.inc.c void bhv_waterfall_sound_loop(void) { - PlaySound(SOUND_ENVIRONMENT_WATERFALL2); + PlaySound(SOUND_ENV_WATERFALL2); } diff --git a/src/game/behaviors/sparkle_spawn_star.inc.c b/src/game/behaviors/sparkle_spawn_star.inc.c index ea0bf42..d0126ae 100644 --- a/src/game/behaviors/sparkle_spawn_star.inc.c +++ b/src/game/behaviors/sparkle_spawn_star.inc.c @@ -19,7 +19,7 @@ void bhv_unused_080c_init(void) { sp24 = (o->oBehParams >> 24) & 0xFF; if (func_802A377C(sp24) & save_file_get_star_flags(gCurrSaveFileNum - 1, gCurrCourseNum - 1)) obj_set_model(MODEL_TRANSPARENT_STAR); - PlaySound2(SOUND_CH8_UNK57); + PlaySound2(SOUND_GENERAL2_STAR_APPEARS); } void func_802AA788(void) { @@ -56,7 +56,7 @@ void func_802AA918(void) { void bhv_unused_080c_loop(void) { if (o->oAction == 0) { if (o->oTimer == 0) { - func_8028F9E8(173, o); + cutscene_object(CUTSCENE_STAR_SPAWN, o); set_time_stop_flags(TIME_STOP_ENABLED | TIME_STOP_MARIO_AND_DOORS); o->activeFlags |= 0x20; o->oAngleVelYaw = 0x800; @@ -69,7 +69,7 @@ void bhv_unused_080c_loop(void) { o->oGravity = -4.0f; func_802A3004(); } - PlaySound(SOUND_ENVIRONMENT_STAR); + PlaySound(SOUND_ENV_STAR); spawn_object(o, MODEL_NONE, bhvSparkleSpawn); if (o->oVelY < 0 && o->oPosY < o->oHomeY) { o->oAction++; diff --git a/src/game/behaviors/spawn_star.inc.c b/src/game/behaviors/spawn_star.inc.c index 91b759e..276ffae 100644 --- a/src/game/behaviors/spawn_star.inc.c +++ b/src/game/behaviors/spawn_star.inc.c @@ -43,9 +43,9 @@ void bhv_star_spawn_init(void) { o->oForwardVel = o->oStarSpawnDisFromHome / 30.0f; o->oStarSpawnUnkFC = o->oPosY; if (o->oBehParams2ndByte == 0 || gCurrCourseNum == 5) - func_8028F9E8(173, o); + cutscene_object(CUTSCENE_STAR_SPAWN, o); else - func_8028F9E8(176, o); + cutscene_object(CUTSCENE_SPECIAL_STAR_SPAWN, o); set_time_stop_flags(TIME_STOP_ENABLED | TIME_STOP_MARIO_AND_DOORS); o->activeFlags |= 0x20; @@ -66,7 +66,7 @@ void bhv_star_spawn_loop(void) { o->oPosY = o->oStarSpawnUnkFC + sins((o->oTimer * 0x8000) / 30) * 400.0f; o->oFaceAngleYaw += 0x1000; spawn_object(o, MODEL_NONE, bhvSparkleSpawn); - PlaySound(SOUND_ENVIRONMENT_STAR); + PlaySound(SOUND_ENV_STAR); if (o->oTimer == 30) { o->oAction = 2; o->oForwardVel = 0; @@ -83,10 +83,10 @@ void bhv_star_spawn_loop(void) { spawn_object(o, MODEL_NONE, bhvSparkleSpawn); obj_move_xyz_using_fvel_and_yaw(o); o->oFaceAngleYaw = o->oFaceAngleYaw - o->oTimer * 0x10 + 0x1000; - PlaySound(SOUND_ENVIRONMENT_STAR); + PlaySound(SOUND_ENV_STAR); if (o->oPosY < o->oHomeY) { - PlaySound2(SOUND_GENERAL_STARAPPEARS); + PlaySound2(SOUND_GENERAL_STAR_APPEARS); obj_become_tangible(); o->oPosY = o->oHomeY; o->oAction = 3; @@ -155,14 +155,14 @@ void bhv_hidden_red_coin_star_init(void) { o->activeFlags = 0; } - o->oHiddenRedCoinStarCoinsCollected = 8 - sp36; + o->oHiddenStarTriggerCounter = 8 - sp36; } void bhv_hidden_red_coin_star_loop(void) { - D_8036008E = o->oHiddenRedCoinStarCoinsCollected; + gRedCoinsCollected = o->oHiddenStarTriggerCounter; switch (o->oAction) { case 0: - if (o->oHiddenRedCoinStarCoinsCollected == 8) + if (o->oHiddenStarTriggerCounter == 8) o->oAction = 1; break; diff --git a/src/game/behaviors/spindel.inc.c b/src/game/behaviors/spindel.inc.c index 8bac153..641a49e 100644 --- a/src/game/behaviors/spindel.inc.c +++ b/src/game/behaviors/spindel.inc.c @@ -2,17 +2,17 @@ void bhv_spindel_init(void) { o->oHomeY = o->oPosY; - o->oUnknownUnkF4_S32 = 0; - o->oUnknownUnkF8_S32 = 0; + o->oSpindelUnkF4 = 0; + o->oSpindelUnkF8 = 0; } void bhv_spindel_loop(void) { f32 sp1C; s32 sp18; - if (o->oUnknownUnkF4_S32 == -1) { + if (o->oSpindelUnkF4 == -1) { if (o->oTimer == 32) { - o->oUnknownUnkF4_S32 = 0; + o->oSpindelUnkF4 = 0; o->oTimer = 0; } else { o->oVelZ = 0.0f; @@ -21,7 +21,7 @@ void bhv_spindel_loop(void) { } } - sp18 = 10 - o->oUnknownUnkF4_S32; + sp18 = 10 - o->oSpindelUnkF4; if (sp18 < 0) sp18 *= -1; @@ -32,15 +32,15 @@ void bhv_spindel_loop(void) { if (o->oTimer == sp18 + 8) { o->oTimer = 0; - o->oUnknownUnkF4_S32++; - if (o->oUnknownUnkF4_S32 == 20) { - if (o->oUnknownUnkF8_S32 == 0) { - o->oUnknownUnkF8_S32 = 1; + o->oSpindelUnkF4++; + if (o->oSpindelUnkF4 == 20) { + if (o->oSpindelUnkF8 == 0) { + o->oSpindelUnkF8 = 1; } else { - o->oUnknownUnkF8_S32 = 0; + o->oSpindelUnkF8 = 0; } - o->oUnknownUnkF4_S32 = -1; + o->oSpindelUnkF4 = -1; } } @@ -52,7 +52,7 @@ void bhv_spindel_loop(void) { sp18 = 1; if (o->oTimer < sp18 * 8) { - if (o->oUnknownUnkF8_S32 == 0) { + if (o->oSpindelUnkF8 == 0) { o->oVelZ = 20 / sp18; o->oAngleVelPitch = 1024 / sp18; } else { @@ -64,7 +64,7 @@ void bhv_spindel_loop(void) { o->oMoveAnglePitch += o->oAngleVelPitch; if (absf_2(o->oMoveAnglePitch & 0x1fff) < 800.0f && o->oAngleVelPitch != 0) { - PlaySound2(SOUND_CH8_UNK48); + PlaySound2(SOUND_GENERAL2_SPINDEL_ROLL); } sp1C = sins(o->oMoveAnglePitch * 4) * 23.0; diff --git a/src/game/behaviors/spindrift.inc.c b/src/game/behaviors/spindrift.inc.c index 3ae18fc..8db4097 100644 --- a/src/game/behaviors/spindrift.inc.c +++ b/src/game/behaviors/spindrift.inc.c @@ -14,7 +14,7 @@ struct ObjectHitbox sSpindriftHitbox = { void bhv_spindrift_loop(void) { o->activeFlags |= 0x400; - if (obj_set_hitbox_and_die_if_attacked(&sSpindriftHitbox, SOUND_OBJECT_DYINGENEMY1, 0)) + if (obj_set_hitbox_and_die_if_attacked(&sSpindriftHitbox, SOUND_OBJ_DYING_ENEMY1, 0)) obj_change_action(1); obj_update_floor_and_walls(); switch (o->oAction) { diff --git a/src/game/behaviors/spiny.inc.c b/src/game/behaviors/spiny.inc.c index 957c42e..8813d91 100644 --- a/src/game/behaviors/spiny.inc.c +++ b/src/game/behaviors/spiny.inc.c @@ -156,7 +156,7 @@ static void spiny_act_thrown_by_lakitu(void) { set_obj_animation_and_sound_state(0); if (o->oMoveFlags & OBJ_MOVE_LANDED) { - PlaySound2(SOUND_OBJECT_SPINYUNK59); + PlaySound2(SOUND_OBJ_SPINY_UNK59); obj_set_model(MODEL_SPINY); func_8029EE20(o, spiny_seg5_anims_05016EAC, 0); o->oGraphYOffset = -17.0f; diff --git a/src/game/behaviors/star_door.inc.c b/src/game/behaviors/star_door.inc.c index 1b14c62..e7fcaf7 100644 --- a/src/game/behaviors/star_door.inc.c +++ b/src/game/behaviors/star_door.inc.c @@ -21,7 +21,7 @@ void bhv_star_door_loop(void) { break; case 1: if (o->oTimer == 0 && (s16)(o->oMoveAngleYaw) >= 0) - PlaySound2(SOUND_GENERAL_STARDOOROPEN); + PlaySound2(SOUND_GENERAL_STAR_DOOR_OPEN); obj_become_intangible(); o->oUnkBC = -8.0f; func_802A4DB0(); @@ -34,7 +34,7 @@ void bhv_star_door_loop(void) { break; case 3: if (o->oTimer == 0 && (s16)(o->oMoveAngleYaw) >= 0) - PlaySound2(SOUND_GENERAL_STARDOORCLOSE); + PlaySound2(SOUND_GENERAL_STAR_DOOR_CLOSE); o->oUnkBC = 8.0f; func_802A4DB0(); if (o->oTimer >= 16) diff --git a/src/game/behaviors/sushi.inc.c b/src/game/behaviors/sushi.inc.c index 06c8452..f512276 100644 --- a/src/game/behaviors/sushi.inc.c +++ b/src/game/behaviors/sushi.inc.c @@ -14,6 +14,6 @@ void bhv_sushi_shark_loop(void) { if (o->oPosY - sp1C > -200.0f) spawn_object_with_scale(o, MODEL_WATER_WAVES, bhvWaterType, 4.0f); if ((o->oTimer & 0xF) == 0) - PlaySound2(SOUND_OBJECT_WATERSOUND); + PlaySound2(SOUND_OBJ_SUSHI_SHARK_WATER_SOUND); o->oInteractStatus = 0; } diff --git a/src/game/behaviors/switch_hidden_objects.inc.c b/src/game/behaviors/switch_hidden_objects.inc.c index 454b754..bd352fd 100644 --- a/src/game/behaviors/switch_hidden_objects.inc.c +++ b/src/game/behaviors/switch_hidden_objects.inc.c @@ -13,7 +13,7 @@ struct ObjectHitbox sBreakableBoxHitbox = { }; void func_802B0E74(void) { - o->oUnknownUnkF4_S32 = 0; + o->oHiddenObjectUnkF4 = NULL; o->oAnimState = 1; switch (o->oBehParams2ndByte) { case 0: @@ -40,7 +40,7 @@ void func_802B0F54(void) { obj_become_intangible(); if (o->oTimer == 0) func_802B0E74(); - if (o->oUnknownUnkF4_S32 == 0) + if (o->oHiddenObjectUnkF4 == NULL) o->oHiddenObjectUnkF4 = obj_nearest_object_with_behavior(bhvFloorSwitchHiddenObjects); if ((sp1C = o->oHiddenObjectUnkF4) != NULL) if (sp1C->oAction == 2) { @@ -56,7 +56,7 @@ void func_802B0F54(void) { func_802A3004(); spawn_triangle_break_particles(30, 138, 3.0f, 4); o->oAction++; - PlaySound2(SOUND_GENERAL_BREAKBOX); + PlaySound2(SOUND_GENERAL_BREAK_BOX); } load_object_collision_model(); } else { diff --git a/src/game/behaviors/swoop.inc.c b/src/game/behaviors/swoop.inc.c index e4a5b70..330a74c 100644 --- a/src/game/behaviors/swoop.inc.c +++ b/src/game/behaviors/swoop.inc.c @@ -28,7 +28,7 @@ static void swoop_act_idle(void) { if (approach_f32_ptr(&o->header.gfx.scale[0], 1.0f, 0.05f) && o->oDistanceToMario < 1500.0f) { if (obj_rotate_yaw_toward(o->oAngleToMario, 0x320)) { - PlaySound2(SOUND_CH9_UNK49); + PlaySound2(SOUND_OBJ2_SWOOP); o->oAction = SWOOP_ACT_MOVE; o->oVelY = -12.0f; } @@ -44,7 +44,7 @@ static void swoop_act_idle(void) { static void swoop_act_move(void) { func_8029ED98(0, 2.0f); if (func_8029F788()) { - PlaySound2(SOUND_OBJECT_UNKNOWN6); + PlaySound2(SOUND_OBJ_UNKNOWN6); } if (o->oForwardVel == 0.0f) { @@ -101,7 +101,7 @@ void bhv_swoop_update(void) { // No partial update (only appears in roomed levels) if (!(o->activeFlags & ACTIVE_FLAG_IN_DIFFERENT_ROOM)) { - o->oDeathSound = SOUND_OBJECT_BATDEATH; + o->oDeathSound = SOUND_OBJ_SWOOP_DEATH; obj_update_floor_and_walls(); diff --git a/src/game/behaviors/thi_top.inc.c b/src/game/behaviors/thi_top.inc.c index d2958af..ea381f2 100644 --- a/src/game/behaviors/thi_top.inc.c +++ b/src/game/behaviors/thi_top.inc.c @@ -16,23 +16,22 @@ void bhv_thi_huge_island_top_loop(void) { } void bhv_thi_tiny_island_top_loop(void) { - if (!(gTHIWaterDrained & 1)) // last bit not set - { + if (!(gTHIWaterDrained & 1)) { if (o->oAction == 0) { if (o->oDistanceToMario < 500.0f) if (gMarioStates->action == ACT_GROUND_POUND_LAND) { o->oAction++; obj_spawn_particles(&D_8032F134); spawn_triangle_break_particles(20, 138, 0.3f, 3); - PlaySound2(SOUND_GENERAL_EXPLOSION); + PlaySound2(SOUND_GENERAL_ACTIVATE_CAP_SWITCH); obj_hide(); } } else { if (o->oTimer < 50) { gEnvironmentRegions[18]--; - PlaySound(SOUND_ENVIRONMENT_WATERDRAIN); + PlaySound(SOUND_ENV_WATER_DRAIN); } else { - gTHIWaterDrained |= 1; // set last bit + gTHIWaterDrained |= 1; play_puzzle_jingle(); o->oAction += 1; } diff --git a/src/game/behaviors/thwomp.inc.c b/src/game/behaviors/thwomp.inc.c index 7670c5c..99a28d4 100644 --- a/src/game/behaviors/thwomp.inc.c +++ b/src/game/behaviors/thwomp.inc.c @@ -2,8 +2,8 @@ void ActionGrindelThwomp4(void) { if (o->oTimer == 0) - o->OBJECT_FIELD_S32(0x1B) = RandomFloat() * 10.0f + 20.0f; - if (o->oTimer > o->OBJECT_FIELD_S32(0x1B)) + o->oThwompUnkF4 = RandomFloat() * 10.0f + 20.0f; + if (o->oTimer > o->oThwompUnkF4) o->oAction = 0; } @@ -21,7 +21,7 @@ void ActionGrindelThwomp3(void) { if (o->oTimer == 0) if (o->oDistanceToMario < 1500.0f) { ShakeScreen(1); - PlaySound2(SOUND_OBJECT_THWOMP); + PlaySound2(SOUND_OBJ_THWOMP); } if (o->oTimer > 9) o->oAction = 4; @@ -29,8 +29,8 @@ void ActionGrindelThwomp3(void) { void ActionGrindelThwomp1(void) { if (o->oTimer == 0) - o->OBJECT_FIELD_S32(0x1B) = RandomFloat() * 30.0f + 10.0f; - if (o->oTimer > o->OBJECT_FIELD_S32(0x1B)) + o->oThwompUnkF4 = RandomFloat() * 30.0f + 10.0f; + if (o->oTimer > o->oThwompUnkF4) o->oAction = 2; } diff --git a/src/game/behaviors/tower_door.inc.c b/src/game/behaviors/tower_door.inc.c index e6fffb0..926560d 100644 --- a/src/game/behaviors/tower_door.inc.c +++ b/src/game/behaviors/tower_door.inc.c @@ -5,6 +5,6 @@ void bhv_tower_door_loop(void) { o->oMoveAngleYaw -= 0x4000; if (func_802A9A0C(0)) { func_802A3C98(80.0f, 0); - create_sound_spawner(SOUND_GENERAL_EXPLOSION3); + create_sound_spawner(SOUND_GENERAL_WALL_EXPLOSION); } } diff --git a/src/game/behaviors/tower_platform.inc.c b/src/game/behaviors/tower_platform.inc.c index 92fcf51..7d323b0 100644 --- a/src/game/behaviors/tower_platform.inc.c +++ b/src/game/behaviors/tower_platform.inc.c @@ -12,7 +12,7 @@ void bhv_wf_elevator_tower_platform_loop(void) { o->oAction++; break; case 1: - PlaySound(SOUND_ENVIRONMENT_ELEVATOR1); + PlaySound(SOUND_ENV_ELEVATOR1); if (o->oTimer > 140) o->oAction++; else @@ -23,7 +23,7 @@ void bhv_wf_elevator_tower_platform_loop(void) { o->oAction++; break; case 3: - PlaySound(SOUND_ENVIRONMENT_ELEVATOR1); + PlaySound(SOUND_ENV_ELEVATOR1); if (o->oTimer > 140) o->oAction = 0; else diff --git a/src/game/behaviors/treasure_chest.inc.c b/src/game/behaviors/treasure_chest.inc.c index 1d27f50..60319d3 100644 --- a/src/game/behaviors/treasure_chest.inc.c +++ b/src/game/behaviors/treasure_chest.inc.c @@ -26,11 +26,11 @@ void bhv_treasure_chest_top_loop(void) { case 1: if (o->oTimer == 0) { - if (sp34->oUnknownUnkFC_S32 == 0) { + if (sp34->oTreasureChestUnkFC == 0) { spawn_object_relative(0, 0, -80, 120, o, MODEL_BUBBLE, bhvWaterAirBubble); - play_sound(SOUND_GENERAL_CLAMSHELL1, o->header.gfx.cameraToObject); + play_sound(SOUND_GENERAL_CLAM_SHELL1, o->header.gfx.cameraToObject); } else { - play_sound(SOUND_GENERAL_OPENCHEST1, o->header.gfx.cameraToObject); + play_sound(SOUND_GENERAL_OPEN_CHEST, o->header.gfx.cameraToObject); } } @@ -67,17 +67,17 @@ void bhv_treasure_chest_bottom_loop(void) { case 0: if (func_802E46C0(o->oMoveAngleYaw, gMarioObject->header.gfx.angle[1] + 0x8000, 0x3000)) { if (is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 150)) { - if (!o->parentObj->oUnknownUnkF8_S32) { - if (o->parentObj->oUnknownUnkF4_S32 == o->oBehParams2ndByte) { - play_sound(SOUND_CH8_RIGHTANSWER, gDefaultSoundArgs); - o->parentObj->oUnknownUnkF4_S32++; + if (!o->parentObj->oTreasureChestUnkF8) { + if (o->parentObj->oTreasureChestUnkF4 == o->oBehParams2ndByte) { + play_sound(SOUND_GENERAL2_RIGHT_ANSWER, gDefaultSoundArgs); + o->parentObj->oTreasureChestUnkF4++; o->oAction = 1; } else { - o->parentObj->oUnknownUnkF4_S32 = 1; - o->parentObj->oUnknownUnkF8_S32 = 1; + o->parentObj->oTreasureChestUnkF4 = 1; + o->parentObj->oTreasureChestUnkF8 = 1; o->oAction = 2; obj_become_tangible(); - play_sound(SOUND_MENU_CAMERABUZZ, gDefaultSoundArgs); + play_sound(SOUND_MENU_CAMERA_BUZZ, gDefaultSoundArgs); } } } @@ -85,14 +85,14 @@ void bhv_treasure_chest_bottom_loop(void) { break; case 1: - if (o->parentObj->oUnknownUnkF8_S32 == 1) + if (o->parentObj->oTreasureChestUnkF8 == 1) o->oAction = 0; break; case 2: obj_become_intangible(); if (!is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, 500)) { - o->parentObj->oUnknownUnkF8_S32 = 0; + o->parentObj->oTreasureChestUnkF8 = 0; o->oAction = 0; } } @@ -113,14 +113,14 @@ void bhv_treasure_chest_ship_init(void) { func_802F6E8C(2, 650, -350, -940, -0x6001); func_802F6E8C(3, -550, -350, -770, 0x5FFF); func_802F6E8C(4, 100, -350, -1700, 0); - o->oUnknownUnkF4_S32 = 1; - o->oUnknownUnkFC_S32 = 0; + o->oTreasureChestUnkF4 = 1; + o->oTreasureChestUnkFC = 0; } void bhv_treasure_chest_ship_loop(void) { switch (o->oAction) { case 0: - if (o->oUnknownUnkF4_S32 == 5) { + if (o->oTreasureChestUnkF4 == 5) { play_puzzle_jingle(); fade_volume_scale(0, 127, 1000); o->oAction = 1; @@ -130,7 +130,7 @@ void bhv_treasure_chest_ship_loop(void) { case 1: if (gEnvironmentRegions != NULL) { gEnvironmentRegions[6] += -5; - play_sound(SOUND_ENVIRONMENT_WATERDRAIN, gDefaultSoundArgs); + play_sound(SOUND_ENV_WATER_DRAIN, gDefaultSoundArgs); set_camera_shake_2(SHAKE_2_JRB_SHIP_DRAIN); if (gEnvironmentRegions[6] < -335) { gEnvironmentRegions[6] = -335; @@ -146,14 +146,14 @@ void bhv_treasure_chest_jrb_init(void) { func_802F6E8C(2, -1150, -2812, -1550, 0x7FFF); func_802F6E8C(3, -2400, -2812, -1800, 0x7FFF); func_802F6E8C(4, -1800, -2812, -2100, 0x7FFF); - o->oTreasureChestJrbUnkF4 = 1; - o->oTreasureChestJrbUnkFC = 1; + o->oTreasureChestUnkF4 = 1; + o->oTreasureChestUnkFC = 1; } void bhv_treasure_chest_jrb_loop(void) { switch (o->oAction) { case 0: - if (o->oTreasureChestJrbUnkF4 == 5) { + if (o->oTreasureChestUnkF4 == 5) { play_puzzle_jingle(); o->oAction = 1; } @@ -185,7 +185,7 @@ void bhv_treasure_chest_init(void) { void bhv_treasure_chest_loop(void) { switch (o->oAction) { case 0: - if (o->oTreasureChestJrbUnkF4 == 5) { + if (o->oTreasureChestUnkF4 == 5) { play_puzzle_jingle(); o->oAction = 1; } diff --git a/src/game/behaviors/ttc_rotating_solid.inc.c b/src/game/behaviors/ttc_rotating_solid.inc.c index ec49f9c..dce34ad 100644 --- a/src/game/behaviors/ttc_rotating_solid.inc.c +++ b/src/game/behaviors/ttc_rotating_solid.inc.c @@ -43,7 +43,7 @@ void bhv_ttc_rotating_solid_update(void) { if (o->oTTCRotatingSolidSoundTimer != 0) { // 3. Play a sound after 6 frames if (--o->oTTCRotatingSolidSoundTimer == 0) { - PlaySound2(SOUND_CH8_UNK59); + PlaySound2(SOUND_GENERAL2_ROTATING_BLOCK_ALERT); } } else if (o->oTTCRotatingSolidVelY > 0.0f && o->oPosY >= o->oHomeY) { // 4. Rotate @@ -55,7 +55,7 @@ void bhv_ttc_rotating_solid_update(void) { o->oAngleVelRoll = o->oFaceAngleRoll - startRoll; if (o->oAngleVelRoll == 0) { - PlaySound2(SOUND_CH8_UNK40); + PlaySound2(SOUND_GENERAL2_ROTATING_BLOCK_CLICK); o->oTTCRotatingSolidNumTurns = (o->oTTCRotatingSolidNumTurns + 1) % o->oTTCRotatingSolidNumSides; diff --git a/src/game/behaviors/ttc_treadmill.inc.c b/src/game/behaviors/ttc_treadmill.inc.c index 668fd0a..79546d4 100644 --- a/src/game/behaviors/ttc_treadmill.inc.c +++ b/src/game/behaviors/ttc_treadmill.inc.c @@ -49,7 +49,7 @@ void bhv_ttc_treadmill_update(void) { if (sMasterTreadmill == o || sMasterTreadmill == NULL) { sMasterTreadmill = o; - PlaySound(SOUND_ENVIRONMENT_ELEVATOR2); + PlaySound(SOUND_ENV_ELEVATOR2); if (gTTCSpeedSetting == TTC_SPEED_RANDOM) { // Stay still for 5 frames, then accelerate toward the target speed diff --git a/src/game/behaviors/tumbling_bridge.inc.c b/src/game/behaviors/tumbling_bridge.inc.c index c2a02a5..a3c01e7 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->OBJECT_FIELD_S32(0x1B) = RandomSign() * 0x80; + o->oTumblingBridgeUnkF4 = RandomSign() * 0x80; } break; case 1: @@ -31,7 +31,7 @@ void bhv_tumbling_bridge_platform_loop(void) { if (o->oAngleVelPitch < 0x400) o->oAngleVelPitch += 0x80; if (o->oAngleVelRoll > -0x400 && o->oAngleVelRoll < 0x400) - o->oAngleVelRoll += o->OBJECT_FIELD_S32(0x1B); // acceleraration? + o->oAngleVelRoll += o->oTumblingBridgeUnkF4; // acceleration? o->oGravity = -3.0f; obj_rotate_face_angle_using_vel(); obj_move_using_fvel_and_gravity(); diff --git a/src/game/behaviors/tuxie.inc.c b/src/game/behaviors/tuxie.inc.c index bbd4924..b83b857 100644 --- a/src/game/behaviors/tuxie.inc.c +++ b/src/game/behaviors/tuxie.inc.c @@ -15,9 +15,9 @@ void play_penguin_walking_sound(s32 walk) { s32 sound; if (o->oSoundStateID == 0) { if (walk == PENGUIN_WALK_BABY) - sound = SOUND_BABY_PENGUIN_WALK; + sound = SOUND_OBJ_BABY_PENGUIN_WALK; else // PENGUIN_WALK_BIG - sound = SOUND_BIG_PENGUIN_WALK; + sound = SOUND_OBJ_BIG_PENGUIN_WALK; func_802BE2E8(1, 11, sound); } } @@ -46,7 +46,7 @@ void ActionTuxiesMother2(void) { } if (sp1C != NULL && sp24 < 300.0f && sp1C->oHeldState != HELD_FREE) { o->oAction = 1; - sp1C->oUnknownUnk88 = 1; + sp1C->oSmallPenguinUnk88 = 1; o->prevObj = sp1C; } } @@ -54,7 +54,7 @@ void ActionTuxiesMother2(void) { void ActionTuxiesMother1(void) { s32 sp2C; s32 sp28; - s32 sp24; + s32 dialogID; switch (o->oSubAction) { case 0: set_obj_animation_and_sound_state(3); @@ -62,11 +62,11 @@ void ActionTuxiesMother1(void) { sp2C = (o->oBehParams >> 0x10) & 0xFF; sp28 = (o->prevObj->oBehParams >> 0x10) & 0xFF; if (sp2C == sp28) - sp24 = 58; + dialogID = 58; else - sp24 = 59; - if (obj_update_dialog_unk2(2, 1, 162, sp24)) { - if (sp24 == 58) + dialogID = 59; + if (obj_update_dialog_with_cutscene(2, 1, CUTSCENE_DIALOG_1, dialogID)) { + if (dialogID == 58) o->oSubAction = 1; else o->oSubAction = 2; @@ -77,8 +77,15 @@ void ActionTuxiesMother1(void) { break; case 1: if (o->prevObj->oHeldState == HELD_FREE) { - ((s32 *) o->prevObj)[o->oInteractionSubtype + 34] &= - ~INT_SUBTYPE_DROP_IMMEDIATELY; // FIXME: find something more normal? + //! This line is was almost certainly supposed to be something + // like o->prevObj->oInteractionSubtype &= ~INT_SUBTYPE_DROP_IMMEDIATELY; + // however, this code uses the value of o->oInteractionSubtype + // rather than its offset to rawData. For this object, + // o->oInteractionSubtype is always 0, so the result is this: + // o->prevObj->oUnknownUnk88 &= ~INT_SUBTYPE_DROP_IMMEDIATELY + // which has no effect as o->prevObj->oUnknownUnk88 is always 0 + // or 1, which is not affected by the bitwise AND. + o->prevObj->OBJECT_FIELD_S32(o->oInteractionSubtype) &= ~INT_SUBTYPE_DROP_IMMEDIATELY; set_object_behavior(o->prevObj, bhvUnused20E0); #ifndef VERSION_JP obj_spawn_star_at_y_offset(3167.0f, -4300.0f, 5108.0f, 200.0f); @@ -90,7 +97,8 @@ void ActionTuxiesMother1(void) { break; case 2: if (o->prevObj->oHeldState == HELD_FREE) { - ((s32 *) o->prevObj)[o->oInteractionSubtype + 34] &= ~INT_SUBTYPE_DROP_IMMEDIATELY; + //! Same bug as above + o->prevObj->OBJECT_FIELD_S32(o->oInteractionSubtype) &= ~INT_SUBTYPE_DROP_IMMEDIATELY; set_object_behavior(o->prevObj, bhvPenguinBaby); o->oAction = 2; } @@ -110,7 +118,7 @@ void ActionTuxiesMother0(void) { sp2C = 1; if (sp24 != NULL && sp28 < 300.0f && sp24->oHeldState != HELD_FREE) { o->oAction = 1; - sp24->oUnknownUnk88 = 1; + sp24->oSmallPenguinUnk88 = 1; o->prevObj = sp24; } else { switch (o->oSubAction) { @@ -120,7 +128,7 @@ void ActionTuxiesMother0(void) { o->oSubAction++; break; case 1: - if (obj_update_dialog_unk2(2, 1, 162, 57)) + if (obj_update_dialog_with_cutscene(2, 1, CUTSCENE_DIALOG_1, 57)) o->oSubAction++; break; case 2: @@ -130,7 +138,7 @@ void ActionTuxiesMother0(void) { } } if (obj_check_anim_frame(1)) - PlaySound2(SOUND_BIG_PENGUIN_YELL); + PlaySound2(SOUND_OBJ_BIG_PENGUIN_YELL); } void (*sTuxiesMotherActions[])(void) = { ActionTuxiesMother0, ActionTuxiesMother1, @@ -181,7 +189,7 @@ void ActionSmallPenguin1(void) { void ActionSmallPenguin3(void) { if (o->oTimer > 5) { if (o->oTimer == 6) - PlaySound2(SOUND_BABY_PENGUIN_DIVE); + PlaySound2(SOUND_OBJ_BABY_PENGUIN_DIVE); set_obj_animation_and_sound_state(1); if (o->oTimer > 25) if (!mario_is_dive_sliding()) @@ -247,9 +255,9 @@ void (*sSmallPenguinActions[])(void) = { }; void func_802BF048(void) { - if (o->oUnknownUnk88 != 0) { + if (o->oSmallPenguinUnk88 != 0) { o->oAction = 5; - o->oUnknownUnk88 = 0; + o->oSmallPenguinUnk88 = 0; } obj_update_floor_and_walls(); obj_call_action_function(sSmallPenguinActions); @@ -269,9 +277,9 @@ void bhv_small_penguin_loop(void) { copy_object_pos(o, gMarioObject); if (gGlobalTimer % 30 == 0) #ifndef VERSION_JP - play_sound(SOUND_BABY_PENGUIN_YELL, gMarioObject->header.gfx.cameraToObject); + play_sound(SOUND_OBJ2_BABY_PENGUIN_YELL, gMarioObject->header.gfx.cameraToObject); #else - play_sound(SOUND_BABY_PENGUIN_YELL, o->header.gfx.cameraToObject); + play_sound(SOUND_OBJ2_BABY_PENGUIN_YELL, o->header.gfx.cameraToObject); #endif break; case HELD_THROWN: diff --git a/src/game/behaviors/tweester.inc.c b/src/game/behaviors/tweester.inc.c index 263495b..3b7db63 100644 --- a/src/game/behaviors/tweester.inc.c +++ b/src/game/behaviors/tweester.inc.c @@ -33,7 +33,7 @@ void ActionTweester0(void) { o->oSubAction++; o->oTimer = 0; } else { - PlaySound(SOUND_ENVIRONMENT_WIND1); + PlaySound(SOUND_ENV_WIND1); func_802C231C(o->oTimer / 60.0f); if (o->oTimer > 59) o->oAction = 1; @@ -43,7 +43,7 @@ void ActionTweester0(void) { void ActionTweester1(void) { f32 sp1C = o->oBehParams2ndByte * 0x64; o->oUnk1BC = obj_angle_to_home(); - PlaySound(SOUND_ENVIRONMENT_WIND1); + PlaySound(SOUND_ENV_WIND1); if (obj_lateral_dist_from_mario_to_home() < sp1C && o->oSubAction == 0) { o->oForwardVel = 20.0f; obj_rotate_yaw_toward(o->oAngleToMario, 0x200); diff --git a/src/game/behaviors/ukiki.inc.c b/src/game/behaviors/ukiki.inc.c index 574513e..758ec10 100644 --- a/src/game/behaviors/ukiki.inc.c +++ b/src/game/behaviors/ukiki.inc.c @@ -358,9 +358,8 @@ void ukiki_act_go_to_cage(void) { switch(o->oSubAction) { case UKIKI_SUB_ACT_CAGE_RUN_TO_CAGE: set_obj_animation_and_sound_state(UKIKI_ANIM_RUN); - // TODO: Change oUkikiPath to oPathedStartWaypoint when - // sCageUkikiPath has been converted to waypoints. - o->oUkikiPath = sCageUkikiPath; + + o->oPathedWaypointsS16 = sCageUkikiPath; if (obj_follow_path(0) != PATH_REACHED_END) { o->oForwardVel = 10.0f; @@ -385,7 +384,7 @@ void ukiki_act_go_to_cage(void) { case UKIKI_SUB_ACT_CAGE_TALK_TO_MARIO: set_obj_animation_and_sound_state(UKIKI_ANIM_HANDSTAND); - if (obj_update_dialog_unk2(3, 1, 162, 80)) { + if (obj_update_dialog_with_cutscene(3, 1, CUTSCENE_DIALOG_1, 80)) { o->oSubAction++; } break; @@ -443,17 +442,17 @@ void ukiki_act_go_to_cage(void) { * SoundState number. */ struct SoundState sUkikiSoundStates[] = { - {1, 1, 10, SOUND_UKIKI_STEP_DEFAULT}, + {1, 1, 10, SOUND_OBJ_UKIKI_STEP_DEFAULT}, {0, 0, 0, NO_SOUND}, {0, 0, 0, NO_SOUND}, {0, 0, 0, NO_SOUND}, - {1, 0, -1, SOUND_UKIKI_CHATTER_SHORT}, - {1, 0, -1, SOUND_UKIKI_CHATTER_LONG}, + {1, 0, -1, SOUND_OBJ_UKIKI_CHATTER_SHORT}, + {1, 0, -1, SOUND_OBJ_UKIKI_CHATTER_LONG}, {0, 0, 0, NO_SOUND}, {0, 0, 0, NO_SOUND}, - {1, 0, -1, SOUND_UKIKI_CHATTER_LONG}, - {1, 0, -1, SOUND_UKIKI_STEP_LEAVES}, - {1, 0, -1, SOUND_UKIKI_CHATTER_IDLE}, + {1, 0, -1, SOUND_OBJ_UKIKI_CHATTER_LONG}, + {1, 0, -1, SOUND_OBJ_UKIKI_STEP_LEAVES}, + {1, 0, -1, SOUND_OBJ_UKIKI_CHATTER_IDLE}, {0, 0, 0, NO_SOUND}, {0, 0, 0, NO_SOUND}, }; @@ -519,7 +518,7 @@ void cage_ukiki_held_loop(void) { switch(o->oUkikiTextState) { case UKIKI_TEXT_DEFAULT: if (set_mario_npc_dialog(2) == 2) { - func_802D8050(79); + create_dialog_box_with_response(79); o->oUkikiTextState = UKIKI_TEXT_CAGE_TEXTBOX; } break; @@ -569,7 +568,7 @@ void hat_ukiki_held_loop(void) { break; case UKIKI_TEXT_STEAL_HAT: - if (obj_update_dialog_unk1(2, 2, 100, 0)) { + if (obj_update_dialog(2, 2, 100, 0)) { o->oInteractionSubtype |= INT_SUBTYPE_DROP_IMMEDIATELY; o->oUkikiTextState = UKIKI_TEXT_STOLE_HAT; } @@ -579,7 +578,7 @@ void hat_ukiki_held_loop(void) { break; case UKIKI_TEXT_HAS_HAT: - if (obj_update_dialog_unk1(2, 18, 101, 0)) { + if (obj_update_dialog(2, 18, 101, 0)) { mario_retrieve_cap(); set_mario_npc_dialog(0); o->oUkikiHasHat &= ~UKIKI_HAT_ON; diff --git a/src/game/behaviors/ukiki_cage.inc.c b/src/game/behaviors/ukiki_cage.inc.c index 24f743e..1e1a7e1 100644 --- a/src/game/behaviors/ukiki_cage.inc.c +++ b/src/game/behaviors/ukiki_cage.inc.c @@ -33,7 +33,6 @@ void bhv_ukiki_cage_star_loop(void) { o->oAction++; } break; - case UKIKI_CAGE_STAR_ACT_SPAWN_STAR: mark_object_for_deletion(o); func_802A3004(); @@ -76,7 +75,6 @@ void ukiki_cage_act_fall(void) { //! (PARTIAL_UPDATE) obj_update_floor_and_walls(); obj_move_standard(78); - if (o->oMoveFlags & (OBJ_MOVE_LANDED | OBJ_MOVE_ENTERED_WATER)) { o->oAction = UKIKI_CAGE_ACT_HIDE; } diff --git a/src/game/behaviors/unagi.inc.c b/src/game/behaviors/unagi.inc.c index 976058b..15eff0c 100644 --- a/src/game/behaviors/unagi.inc.c +++ b/src/game/behaviors/unagi.inc.c @@ -14,29 +14,29 @@ struct ObjectHitbox sUnagiHitbox = { void bhv_unagi_init(void) { if (o->oBehParams2ndByte != 1) { - o->oUnagiUnkFC = segmented_to_virtual(jrb_seg7_trajectory_unagi_1); + o->oPathedStartWaypoint = segmented_to_virtual(jrb_seg7_trajectory_unagi_1); if (o->oBehParams2ndByte == 0) { o->oFaceAnglePitch = -7600; } else { o->oAction = 1; } } else { - o->oUnagiUnkFC = segmented_to_virtual(jrb_seg7_trajectory_unagi_2); + o->oPathedStartWaypoint = segmented_to_virtual(jrb_seg7_trajectory_unagi_2); o->oAction = 3; o->oAnimState = 1; o->oUnagiUnk1B0 = o->oMoveAngleYaw; } - o->oUnagiUnk100 = o->oUnagiUnkFC; + o->oPathedPrevWaypoint = o->oPathedStartWaypoint; } void unagi_act_0(void) { if (o->oDistanceToMario > 4500.0f && o->oSubAction != 0) { o->oAction = 1; - o->oPosX = o->oUnagiUnkFC[1]; - o->oPosY = o->oUnagiUnkFC[2]; - o->oPosZ = o->oUnagiUnkFC[3]; + o->oPosX = o->oPathedStartWaypoint->pos[0]; + o->oPosY = o->oPathedStartWaypoint->pos[1]; + o->oPosZ = o->oPathedStartWaypoint->pos[2]; } else if (o->oUnagiUnk1AC < 700.0f) { o->oSubAction = 1; } @@ -49,7 +49,7 @@ void unagi_act_1_4(s32 arg0) { } } else { if (func_8029F828()) { - if (o->oAction != arg0 && (o->oUnagiUnk104 & 0xFF) >= 7) { + if (o->oAction != arg0 && (o->oPathedPrevWaypointFlags & 0xFF) >= 7) { set_obj_animation_and_sound_state(3); } else { set_obj_animation_and_sound_state(2); @@ -58,7 +58,7 @@ void unagi_act_1_4(s32 arg0) { } if (obj_check_anim_frame(6)) { - PlaySound2(SOUND_GENERAL_MOVINGWATER); + PlaySound2(SOUND_GENERAL_MOVING_WATER); } if (obj_follow_path(0) == -1) { @@ -66,18 +66,18 @@ void unagi_act_1_4(s32 arg0) { } o->oMoveAnglePitch = o->oFaceAnglePitch = - approach_s16_symmetric(o->oMoveAnglePitch, o->oUnagiUnk108, 50); + approach_s16_symmetric(o->oMoveAnglePitch, o->oPathedTargetPitch, 50); - obj_rotate_yaw_toward(o->oUnagiUnk10C, 120); - obj_roll_to_match_yaw_turn(o->oUnagiUnk10C, 0x2000, 100); + obj_rotate_yaw_toward(o->oPathedTargetYaw, 120); + obj_roll_to_match_yaw_turn(o->oPathedTargetYaw, 0x2000, 100); obj_forward_vel_approach(10.0f, 0.2f); func_802A2A38(); } void unagi_act_2(void) { - o->oUnagiUnk100 = o->oUnagiUnkFC; - o->oUnagiUnk104 = 0; + o->oPathedPrevWaypoint = o->oPathedStartWaypoint; + o->oPathedPrevWaypointFlags = 0; obj_set_pos_to_home(); @@ -104,7 +104,7 @@ void unagi_act_3(void) { set_obj_animation_and_sound_state(6); if (o->oTimer > 60 && o->oUnagiUnk1AC < 1000.0f) { - PlaySound2(SOUND_OBJECT_EEL_2); + PlaySound2(SOUND_OBJ_EEL_2); o->oUnagiUnkF8 = o->oUnagiUnk110 = 30.0f; } else { o->oUnagiUnk110 = 0.0f; diff --git a/src/game/behaviors/water_bomb.inc.c b/src/game/behaviors/water_bomb.inc.c index 0905473..0f33293 100644 --- a/src/game/behaviors/water_bomb.inc.c +++ b/src/game/behaviors/water_bomb.inc.c @@ -108,7 +108,7 @@ static void water_bomb_spawn_explode_particles(s8 offsetY, s8 forwardVelRange, s * Enter the drop action with -40 y vel. */ static void water_bomb_act_init(void) { - PlaySound2(SOUND_OBJECT_SOMETHINGLANDING); + PlaySound2(SOUND_OBJ_SOMETHING_LANDING); o->oAction = WATER_BOMB_ACT_DROP; o->oMoveFlags = 0; @@ -126,7 +126,7 @@ static void water_bomb_act_drop(void) { // Explode if touched or if hit water if ((o->oInteractStatus & INT_STATUS_INTERACTED) || (o->oMoveFlags & OBJ_MOVE_ENTERED_WATER)) { - create_sound_spawner(SOUND_OBJECT_DIVINGINWATER); + create_sound_spawner(SOUND_OBJ_DIVING_IN_WATER); func_8027F440(1, o->oPosX, o->oPosY, o->oPosZ); o->oAction = WATER_BOMB_ACT_EXPLODE; } else if (o->oMoveFlags & OBJ_MOVE_MASK_ON_GROUND) { @@ -135,9 +135,9 @@ static void water_bomb_act_drop(void) { o->oWaterBombOnGround = TRUE; if ((o->oWaterBombNumBounces += 1.0f) < 3.0f) { - PlaySound2(SOUND_OBJECT_WATERBOMBBOUNCING); + PlaySound2(SOUND_OBJ_WATER_BOMB_BOUNCING); } else { - create_sound_spawner(SOUND_OBJECT_DIVINGINWATER); + create_sound_spawner(SOUND_OBJ_DIVING_IN_WATER); } func_8027F440(1, o->oPosX, o->oPosY, o->oPosZ); diff --git a/src/game/behaviors/water_bomb_cannon.inc.c b/src/game/behaviors/water_bomb_cannon.inc.c index 33b98d6..ea8be82 100644 --- a/src/game/behaviors/water_bomb_cannon.inc.c +++ b/src/game/behaviors/water_bomb_cannon.inc.c @@ -18,7 +18,7 @@ void bhv_bubble_cannon_barrel_loop(void) { copy_object_pos(o, o->parentObj); // check this - if (o->parentObj->oCannonUnkF4 != 0) { + if (o->parentObj->oWaterCannonUnkF4 != 0) { if (o->oForwardVel == 0.0f) { o->oForwardVel = 35.0f; @@ -43,7 +43,7 @@ void water_bomb_cannon_act_0(void) { obj_unhide(); o->oAction = 1; - o->oMoveAnglePitch = o->oCannonUnkFC = 0x1C00; + o->oMoveAnglePitch = o->oWaterCannonUnkFC = 0x1C00; } } @@ -51,21 +51,21 @@ void water_bomb_cannon_act_1(void) { if (o->oDistanceToMario > 2500.0f) { o->oAction = 2; } else if (o->oBehParams2ndByte == 0) { - if (o->oCannonUnkF4 != 0) { - o->oCannonUnkF4 -= 1; + if (o->oWaterCannonUnkF4 != 0) { + o->oWaterCannonUnkF4 -= 1; } else { - obj_move_pitch_approach(o->oCannonUnkFC, 0x80); - obj_face_yaw_approach(o->oCannonUnk100, 0x100); + obj_move_pitch_approach(o->oWaterCannonUnkFC, 0x80); + obj_face_yaw_approach(o->oWaterCannonUnk100, 0x100); - if ((s16) o->oFaceAngleYaw == (s16) o->oCannonUnk100) { - if (o->oCannonUnkF8 != 0) { - o->oCannonUnkF8 -= 1; + if ((s16) o->oFaceAngleYaw == (s16) o->oWaterCannonUnk100) { + if (o->oWaterCannonUnkF8 != 0) { + o->oWaterCannonUnkF8 -= 1; } else { - PlaySound2(SOUND_OBJECT_CANNON4); - o->oCannonUnkF4 = 70; - o->oCannonUnkFC = 0x1000 + 0x400 * (RandomU16() & 0x3); - o->oCannonUnk100 = -0x2000 + o->oMoveAngleYaw + 0x1000 * (RandomU16() % 5); - o->oCannonUnkF8 = 60; + PlaySound2(SOUND_OBJ_CANNON4); + o->oWaterCannonUnkF4 = 70; + o->oWaterCannonUnkFC = 0x1000 + 0x400 * (RandomU16() & 0x3); + o->oWaterCannonUnk100 = -0x2000 + o->oMoveAngleYaw + 0x1000 * (RandomU16() % 5); + o->oWaterCannonUnkF8 = 60; } } } diff --git a/src/game/behaviors/water_objs.inc.c b/src/game/behaviors/water_objs.inc.c index ca923ca..8589adf 100644 --- a/src/game/behaviors/water_objs.inc.c +++ b/src/game/behaviors/water_objs.inc.c @@ -9,22 +9,22 @@ void bhv_water_air_bubble_init(void) { void bhv_water_air_bubble_loop(void) { s32 i; - o->header.gfx.scale[0] = sins(o->OBJECT_FIELD_S32(0x1B)) * 0.5 + 4.0; - o->header.gfx.scale[1] = -sins(o->OBJECT_FIELD_S32(0x1B)) * 0.5 + 4.0; - o->OBJECT_FIELD_S32(0x1B) += 0x400; + o->header.gfx.scale[0] = sins(o->oWaterObjUnkF4) * 0.5 + 4.0; + o->header.gfx.scale[1] = -sins(o->oWaterObjUnkF4) * 0.5 + 4.0; + o->oWaterObjUnkF4 += 0x400; if (o->oTimer < 30) { obj_become_intangible(); o->oPosY += 3.0f; } else { obj_become_tangible(); - obj_obj_forward_vel_approach_upward(2.0f, 10.0f); + obj_forward_vel_approach_upward(2.0f, 10.0f); o->oMoveAngleYaw = angle_to_object(o, gMarioObject); obj_move_using_fvel_and_gravity(); } o->oPosX += RandomFloat() * 4.0f - 2.0f; o->oPosZ += RandomFloat() * 4.0f - 2.0f; if (o->oInteractStatus & INT_STATUS_INTERACTED || o->oTimer > 200) { - PlaySound2(SOUND_GENERAL_QUIETBUBBLE); + PlaySound2(SOUND_GENERAL_QUIET_BUBBLE); mark_object_for_deletion(o); for (i = 0; i < 30; i++) spawn_object(o, MODEL_BUBBLE, bhvBubbleMaybe); @@ -35,9 +35,9 @@ void bhv_water_air_bubble_loop(void) { } void bhv_bubble_wave_init(void) { - o->OBJECT_FIELD_S32(0x1D) = 0x800 + (s32)(RandomFloat() * 2048.0f); - o->OBJECT_FIELD_S32(0x1E) = 0x800 + (s32)(RandomFloat() * 2048.0f); - PlaySound2(SOUND_GENERAL_QUIETBUBBLE); + o->oWaterObjUnkFC = 0x800 + (s32)(RandomFloat() * 2048.0f); + o->oWaterObjUnk100 = 0x800 + (s32)(RandomFloat() * 2048.0f); + PlaySound2(SOUND_GENERAL_QUIET_BUBBLE); } void Unknown802A7E48(void) { @@ -48,18 +48,18 @@ 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->header.gfx.scale[0] = sins(o->OBJECT_FIELD_S32(0x1B)) * 0.2 + 1.0; - o->OBJECT_FIELD_S32(0x1B) += o->OBJECT_FIELD_S32(0x1D); - o->header.gfx.scale[1] = sins(o->OBJECT_FIELD_S32(0x1C)) * 0.2 + 1.0; - o->OBJECT_FIELD_S32(0x1C) += o->OBJECT_FIELD_S32(0x1E); + 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; + o->oWaterObjUnkF8 += o->oWaterObjUnk100; } void bhv_small_water_wave_loop(void) { f32 sp1C = find_water_level(o->oPosX, o->oPosZ); - o->header.gfx.scale[0] = sins(o->OBJECT_FIELD_S32(0x1B)) * 0.2 + 1.0; - o->OBJECT_FIELD_S32(0x1B) += o->OBJECT_FIELD_S32(0x1D); - o->header.gfx.scale[1] = sins(o->OBJECT_FIELD_S32(0x1C)) * 0.2 + 1.0; - o->OBJECT_FIELD_S32(0x1C) += o->OBJECT_FIELD_S32(0x1E); + 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; + o->oWaterObjUnkF8 += o->oWaterObjUnk100; if (o->oPosY > sp1C) { o->activeFlags = 0; o->oPosY += 5.0f; @@ -71,16 +71,16 @@ void bhv_small_water_wave_loop(void) { } void func_802A81C4(void) { - o->header.gfx.scale[0] = sins(o->OBJECT_FIELD_S32(0x1B)) * 0.5 + 2.0; - o->OBJECT_FIELD_S32(0x1B) += o->OBJECT_FIELD_S32(0x1D); - o->header.gfx.scale[1] = sins(o->OBJECT_FIELD_S32(0x1C)) * 0.5 + 2.0; - o->OBJECT_FIELD_S32(0x1C) += o->OBJECT_FIELD_S32(0x1E); + o->header.gfx.scale[0] = sins(o->oWaterObjUnkF4) * 0.5 + 2.0; + o->oWaterObjUnkF4 += o->oWaterObjUnkFC; + o->header.gfx.scale[1] = sins(o->oWaterObjUnkF8) * 0.5 + 2.0; + o->oWaterObjUnkF8 += o->oWaterObjUnk100; } void bhv_particle_init(void) { scale_object_xyz(o, 2.0f, 2.0f, 1.0f); - o->OBJECT_FIELD_S32(0x1D) = 0x800 + (s32)(RandomFloat() * 2048.0f); - o->OBJECT_FIELD_S32(0x1E) = 0x800 + (s32)(RandomFloat() * 2048.0f); + o->oWaterObjUnkFC = 0x800 + (s32)(RandomFloat() * 2048.0f); + o->oWaterObjUnk100 = 0x800 + (s32)(RandomFloat() * 2048.0f); translate_object_xyz_random(o, 100.0f); } diff --git a/src/game/behaviors/water_pillar.inc.c b/src/game/behaviors/water_pillar.inc.c index fec34e2..6fe0f48 100644 --- a/src/game/behaviors/water_pillar.inc.c +++ b/src/game/behaviors/water_pillar.inc.c @@ -34,7 +34,7 @@ void func_802B95A4(void) { } break; case 4: - PlaySound(SOUND_ENVIRONMENT_WATERDRAIN); + PlaySound(SOUND_ENV_WATER_DRAIN); if (o->oTimer < 300) { gEnvironmentLevels[2] = (s32) approach_f32_symmetric(gEnvironmentLevels[2], -2450.0f, 5.0f); diff --git a/src/game/behaviors/water_ring.inc.c b/src/game/behaviors/water_ring.inc.c index 8f2bd9c..74e6e4d 100644 --- a/src/game/behaviors/water_ring.inc.c +++ b/src/game/behaviors/water_ring.inc.c @@ -64,9 +64,9 @@ void CheckWaterRingCollection(f32 avgScale, struct Object *ringManager) { if (ringSpawner->oWaterRingSpawnerRingsCollected < 6) { SpawnOrangeNumber(ringSpawner->oWaterRingSpawnerRingsCollected, 0, -40, 0); #ifdef VERSION_JP - play_sound(SOUND_MENU_STARSOUND, gDefaultSoundArgs); + play_sound(SOUND_MENU_STAR_SOUND, gDefaultSoundArgs); #else - play_sound(SOUND_MENU_COLLECTSECRET + play_sound(SOUND_MENU_COLLECT_SECRET + (((u8) ringSpawner->oWaterRingSpawnerRingsCollected - 1) << 16), gDefaultSoundArgs); #endif diff --git a/src/game/behaviors/wdw_water_level.inc.c b/src/game/behaviors/wdw_water_level.inc.c index 7a7d1a4..f556f6c 100644 --- a/src/game/behaviors/wdw_water_level.inc.c +++ b/src/game/behaviors/wdw_water_level.inc.c @@ -41,12 +41,12 @@ void bhv_water_level_diamond_loop(void) { o->oAngleVelYaw = 0x800; } else { if (o->oTimer == 0) - PlaySound2(SOUND_GENERAL_WATERLEVELTRIG); + PlaySound2(SOUND_GENERAL_WATER_LEVEL_TRIG); else { if (*gEnvironmentLevels > o->oWaterLevelTriggerTargetWaterLevel) - PlaySound(SOUND_ENVIRONMENT_WATERDRAIN); + PlaySound(SOUND_ENV_WATER_DRAIN); else - PlaySound(SOUND_ENVIRONMENT_WATERDRAIN); // same as above + PlaySound(SOUND_ENV_WATER_DRAIN); // same as above } o->oAngleVelYaw = 0x800; } diff --git a/src/game/behaviors/whirlpool.inc.c b/src/game/behaviors/whirlpool.inc.c index 1e2e93f..3d16ede 100644 --- a/src/game/behaviors/whirlpool.inc.c +++ b/src/game/behaviors/whirlpool.inc.c @@ -57,7 +57,7 @@ void bhv_whirlpool_loop(void) { gEnvFxBubbleConfig[ENVFX_STATE_PARTICLECOUNT] = 0; } - PlaySound(SOUND_ENVIRONMENT_WATER); + PlaySound(SOUND_ENV_WATER); func_802E70A8(); } @@ -71,5 +71,5 @@ void bhv_jet_stream_loop(void) { } else gEnvFxBubbleConfig[ENVFX_STATE_PARTICLECOUNT] = 0; - PlaySound(SOUND_ENVIRONMENT_WATER); + PlaySound(SOUND_ENV_WATER); } diff --git a/src/game/behaviors/white_puff_explode.inc.c b/src/game/behaviors/white_puff_explode.inc.c index 99d8244..191aeb1 100644 --- a/src/game/behaviors/white_puff_explode.inc.c +++ b/src/game/behaviors/white_puff_explode.inc.c @@ -4,17 +4,17 @@ void bhv_white_puff_exploding_loop(void) { f32 sp24; if (o->oTimer == 0) { obj_compute_vel_xz(); - o->OBJECT_FIELD_F32(0x1B) = o->header.gfx.scale[0]; + o->oWhitePuffUnkF4 = o->header.gfx.scale[0]; switch (o->oBehParams2ndByte) { case 2: o->oOpacity = 254; - o->OBJECT_FIELD_S32(0x1C) = -21; - o->OBJECT_FIELD_S32(0x1D) = 0; + o->oWhitePuffUnkF8 = -21; + o->oWhitePuffUnkFC = 0; break; case 3: o->oOpacity = 254; - o->OBJECT_FIELD_S32(0x1C) = -13; - o->OBJECT_FIELD_S32(0x1D) = 1; + o->oWhitePuffUnkF8 = -13; + o->oWhitePuffUnkFC = 1; break; } } @@ -25,13 +25,13 @@ void bhv_white_puff_exploding_loop(void) { if (o->oTimer > 20) mark_object_for_deletion(o); if (o->oOpacity) { - o->oOpacity += o->OBJECT_FIELD_S32(0x1C); + o->oOpacity += o->oWhitePuffUnkF8; if (o->oOpacity < 2) mark_object_for_deletion(o); - if (o->OBJECT_FIELD_S32(0x1D)) - sp24 = o->OBJECT_FIELD_F32(0x1B) * ((254 - o->oOpacity) / 254.0); + if (o->oWhitePuffUnkFC) + sp24 = o->oWhitePuffUnkF4 * ((254 - o->oOpacity) / 254.0); else - sp24 = o->OBJECT_FIELD_F32(0x1B) * (o->oOpacity / 254.0); + sp24 = o->oWhitePuffUnkF4 * (o->oOpacity / 254.0); obj_scale(sp24); } } diff --git a/src/game/behaviors/whomp.inc.c b/src/game/behaviors/whomp.inc.c index 95ef68f..089d408 100644 --- a/src/game/behaviors/whomp.inc.c +++ b/src/game/behaviors/whomp.inc.c @@ -11,7 +11,7 @@ void func_802C61CC(void) { sp28 |= obj_check_anim_frame_in_range(23, 3); } if (sp28) - PlaySound2(SOUND_OBJECT_POUNDING1); + PlaySound2(SOUND_OBJ_POUNDING1); } void ActionWhomp0(void) { @@ -28,7 +28,7 @@ void ActionWhomp0(void) { obj_set_pos_to_home(); o->oHealth = 3; } - } else if (obj_update_dialog_unk2(2, 1, 162, 114)) + } else if (obj_update_dialog_with_cutscene(2, 1, CUTSCENE_DIALOG_1, 114)) o->oAction = 2; } else if (o->oDistanceToMario < 500.0f) o->oAction = 1; @@ -123,7 +123,7 @@ void ActionWhomp4(void) { void ActionWhomp5(void) { if (o->oSubAction == 0 && o->oMoveFlags & 1) { - PlaySound2(SOUND_OBJECT_BULLYTHWOMP_LOWPRIO); + PlaySound2(SOUND_OBJ_WHOMP_LOWPRIO); ShakeScreen(1); o->oVelY = 0.0f; o->oSubAction++; @@ -137,8 +137,8 @@ void func_802C6954(void) { if (o->oSubAction == 0) { if (obj_is_mario_ground_pounding_platform()) { o->oHealth--; - PlaySound2(SOUND_CH9_UNK5A); - PlaySound2(SOUND_OBJECT_KINGWHOMPDEATH); + PlaySound2(SOUND_OBJ2_WHOMP_SOUND_SHORT); + PlaySound2(SOUND_OBJ_KING_WHOMP_DEATH); if (o->oHealth == 0) o->oAction = 8; else { @@ -209,7 +209,7 @@ void ActionWhomp6(void) { void ActionWhomp8(void) { if (o->oBehParams2ndByte != 0) { - if (obj_update_dialog_unk2(2, 2, 162, 115)) { + if (obj_update_dialog_with_cutscene(2, 2, CUTSCENE_DIALOG_1, 115)) { set_object_angle(o, 0, 0, 0); obj_hide(); obj_become_intangible(); @@ -218,14 +218,14 @@ void ActionWhomp8(void) { ShakeScreen(1); o->oPosY += 100.0f; create_star(180.0f, 3880.0f, 340.0f); - PlaySound2(SOUND_OBJECT_KINGWHOMPDEATH); + PlaySound2(SOUND_OBJ_KING_WHOMP_DEATH); o->oAction = 9; } } else { func_802AA618(0, 0, 100.0f); spawn_triangle_break_particles(20, 138, 3.0f, 4); ShakeScreen(1); - create_sound_spawner(SOUND_OBJECT_THWOMP); + create_sound_spawner(SOUND_OBJ_THWOMP); mark_object_for_deletion(o); } } diff --git a/src/game/behaviors/wiggler.inc.c b/src/game/behaviors/wiggler.inc.c index 1eec8ac..0f13a8c 100644 --- a/src/game/behaviors/wiggler.inc.c +++ b/src/game/behaviors/wiggler.inc.c @@ -224,7 +224,7 @@ static void wiggler_act_walk(void) { // If Mario is positioned below the wiggler, assume he entered through the // lower cave entrance, so don't display text. - if (gMarioObject->oPosY < o->oPosY || obj_update_dialog_unk2(2, 0, 0xA2, 0x96) != 0) { + if (gMarioObject->oPosY < o->oPosY || obj_update_dialog_with_cutscene(2, 0, CUTSCENE_DIALOG_1, 150) != 0) { o->oWigglerTextStatus = WIGGLER_TEXT_STATUS_COMPLETED_DIALOG; } } else { @@ -300,7 +300,7 @@ static void wiggler_act_jumped_on(void) { // defeated) or go back to walking if (o->header.gfx.scale[1] >= 4.0f) { if (o->oTimer > 30) { - if (obj_update_dialog_unk2(2, 0, 0xA2, attackText[o->oHealth - 2]) != 0) { + if (obj_update_dialog_with_cutscene(2, 0, CUTSCENE_DIALOG_1, attackText[o->oHealth - 2]) != 0) { // Because we don't want the wiggler to disappear after being // defeated, we leave its health at 1 if (--o->oHealth == 1) { @@ -311,7 +311,7 @@ static void wiggler_act_jumped_on(void) { o->oMoveAngleYaw = o->oFaceAngleYaw; if (o->oHealth == 2) { - PlaySound2(SOUND_WIGGLER_JUMP); + PlaySound2(SOUND_OBJ_WIGGLER_JUMP); o->oForwardVel = 10.0f; o->oVelY = 70.0f; } @@ -349,7 +349,7 @@ static void wiggler_act_knockback(void) { static void wiggler_act_shrink(void) { if (o->oTimer >= 20) { if (o->oTimer == 20) { - PlaySound2(SOUND_EMEMY_DEFEAT_SHRINK); + PlaySound2(SOUND_OBJ_ENEMY_DEFEAT_SHRINK); } // 4 is the default scale, so shrink to 1/4 of regular size @@ -385,7 +385,7 @@ static void wiggler_act_fall_through_floor(void) { * Stop and enter the jumped on action. */ void wiggler_jumped_on_attack_handler(void) { - PlaySound2(SOUND_WIGGLER_ATTACKED); + PlaySound2(SOUND_OBJ_WIGGLER_ATTACKED); o->oAction = WIGGLER_ACT_JUMPED_ON; o->oForwardVel = o->oVelY = 0.0f; o->oWigglerSquishSpeed = 0.4f; @@ -409,7 +409,7 @@ void bhv_wiggler_update(void) { func_8029ED98(0, o->oWigglerWalkAnimSpeed); if (o->oWigglerWalkAnimSpeed != 0.0f) { func_802F9378(0, 13, - o->oHealth >= 4 ? SOUND_WIGGLER_LOW_PITCH : SOUND_WIGGLER_HIGH_PITCH); + o->oHealth >= 4 ? SOUND_OBJ_WIGGLER_LOW_PITCH : SOUND_OBJ_WIGGLER_HIGH_PITCH); } else { func_8029F6F0(); } diff --git a/src/game/behaviors/yoshi.inc.c b/src/game/behaviors/yoshi.inc.c index 73788c2..fe10389 100644 --- a/src/game/behaviors/yoshi.inc.c +++ b/src/game/behaviors/yoshi.inc.c @@ -28,7 +28,7 @@ void yoshi_walk_loop(void) { SetObjAnimation(1); if (sp24 == 0 || sp24 == 15) - PlaySound2(SOUND_GENERAL_YOSHIWALK); + PlaySound2(SOUND_GENERAL_YOSHI_WALK); if (o->oInteractStatus == INT_STATUS_INTERACTED) o->oAction = YOSHI_ACT_TALK; @@ -76,7 +76,7 @@ void yoshi_talk_loop(void) { SetObjAnimation(0); if (set_mario_npc_dialog(1) == 2) { o->activeFlags |= 0x20; - if (func_8028F8E0(162, o, 161)) { + if (cutscene_object_with_dialog(CUTSCENE_DIALOG_1, o, 161)) { o->activeFlags &= ~0x20; o->oInteractStatus = 0; o->oHomeX = sYoshiHomeLocations[2]; @@ -99,12 +99,12 @@ void yoshi_walk_and_jump_off_roof_loop(void) { ObjectStep(); SetObjAnimation(1); if (o->oTimer == 0) - func_8028F9E8(173, o); + cutscene_object(CUTSCENE_STAR_SPAWN, o); o->oMoveAngleYaw = approach_s16_symmetric(o->oMoveAngleYaw, o->oYoshiTargetYaw, 0x500); if (IsPointCloseToObject(o, o->oHomeX, 3174.0f, o->oHomeZ, 200)) { SetObjAnimation(2); - PlaySound2(SOUND_GENERAL_ENEMYALERT1); + PlaySound2(SOUND_GENERAL_ENEMY_ALERT1); o->oForwardVel = 50.0f; o->oVelY = 40.0f; o->oMoveAngleYaw = -0x3FFF; @@ -112,7 +112,7 @@ void yoshi_walk_and_jump_off_roof_loop(void) { } if (sp26 == 0 || sp26 == 15) { - PlaySound2(SOUND_GENERAL_YOSHIWALK); + PlaySound2(SOUND_GENERAL_YOSHI_WALK); } } @@ -132,14 +132,14 @@ void yoshi_give_present_loop(void) { s32 sp1C = gGlobalTimer; if (gHudDisplay.lives == 100) { - play_sound(SOUND_GENERAL_1UP, gDefaultSoundArgs); + play_sound(SOUND_GENERAL_COLLECT_1UP, gDefaultSoundArgs); gSpecialTripleJump = 1; o->oAction = YOSHI_ACT_WALK_JUMP_OFF_ROOF; return; } if ((sp1C & 0x03) == 0) { - play_sound(SOUND_MENU_YOSHIGAINLIVES, gDefaultSoundArgs); + play_sound(SOUND_MENU_YOSHI_GAIN_LIVES, gDefaultSoundArgs); gMarioState->numLives++; } } diff --git a/src/game/camera.c b/src/game/camera.c index 3989091..15ac293 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -1518,7 +1518,7 @@ s16 return_close_or_free_roam_cam_yaw(struct LevelCamera *c) { vec3f_get_dist_and_angle(sMarioStatusForCamera->pos, c->pos, &distFocusToCam, &sp70, &yaw); if (gCameraMovementFlags & CAM_MOVE_ZOOMED_OUT) { - if (test_or_set_mario_cam_active(0) == 1) { + if (test_or_set_mario_cam_active(0) == CAM_ANGLE_LAKITU_MARIO) { zoomDist = gCameraZoomDist + 1050; } else { zoomDist = gCameraZoomDist + 400; @@ -2241,9 +2241,9 @@ void update_camera(struct LevelCamera *c) { gCurrLevelCamera = c; update_camera_status(c); if (c->cutscene == 0) { - if (select_or_activate_mario_cam(0) == 1) { + if (select_or_activate_mario_cam(0) == CAM_ANGLE_LAKITU_MARIO) { if (gPlayer1Controller->buttonPressed & R_TRIG) { - if (test_or_set_mario_cam_active(0) == 2) { + if (test_or_set_mario_cam_active(0) == CAM_ANGLE_LAKITU_FIXED) { test_or_set_mario_cam_active(1); } else { test_or_set_mario_cam_active(2); @@ -2381,11 +2381,11 @@ void update_camera(struct LevelCamera *c) { gCheckingSurfaceCollisionsForCamera = 0; if (gCurrLevelNum != LEVEL_CASTLE) { if ((c->cutscene == 0 && (gPlayer1Controller->buttonDown & R_TRIG) - && select_or_activate_mario_cam(0) == 2) + && select_or_activate_mario_cam(0) == CAM_ANGLE_LAKITU_FIXED) || (gCameraMovementFlags & CAM_MOVE_UNKNOWN_7) || (sMarioStatusForCamera->action) == ACT_GETTING_BLOWN) { if (c->cutscene == 0 && (gPlayer1Controller->buttonPressed & R_TRIG) - && select_or_activate_mario_cam(0) == 2) { + && select_or_activate_mario_cam(0) == CAM_ANGLE_LAKITU_FIXED) { gCameraFlags1 |= CAM_FLAG_1_UNKNOWN_5; play_sound_rbutton_changed(); } @@ -2401,7 +2401,7 @@ void update_camera(struct LevelCamera *c) { } } } else { - if ((gPlayer1Controller->buttonPressed & R_TRIG) && select_or_activate_mario_cam(0) == 2) { + if ((gPlayer1Controller->buttonPressed & R_TRIG) && select_or_activate_mario_cam(0) == CAM_ANGLE_LAKITU_FIXED) { play_sound_button_change_blocked(); } } @@ -2538,7 +2538,7 @@ void init_camera(struct LevelCamera *c) { if (gCurrDemoInput == NULL) { set_camera_cutscene_table(c, CUTSCENE_ENTER_BOWSER_ARENA); } else if (gSecondCameraFocus != NULL) { - gSecondCameraFocus->OBJECT_FIELD_U32(0x00) = 2; + gSecondCameraFocus->oBowserUnk88 = 2; } #else set_camera_cutscene_table(c, CUTSCENE_ENTER_BOWSER_ARENA); @@ -2633,7 +2633,7 @@ void init_camera(struct LevelCamera *c) { extern u8 D_8032E910[20]; -void func_80287404(struct Struct80287404 *a) { +void func_80287404(struct GraphNodeCamera *a) { UNUSED u8 unused1[8]; f32 sp34; s16 sp32; @@ -2649,13 +2649,13 @@ void func_80287404(struct Struct80287404 *a) { if (gCameraMovementFlags & CAM_MOVE_PAUSE_SCREEN) { if (gFramesPaused >= 2) { if (D_8032E910[sp28] & sp24) { - a->unk28[0] = gCurrLevelCamera->xFocus; - a->unk28[1] = (sMarioStatusForCamera->pos[1] + gCurrLevelCamera->unk68) / 2.f; - a->unk28[2] = gCurrLevelCamera->zFocus; - vec3f_get_dist_and_angle(a->unk28, sMarioStatusForCamera->pos, &sp34, &sp32, &sp30); - vec3f_set_dist_and_angle(sMarioStatusForCamera->pos, a->unk1C, 6000.f, 4096, sp30); + a->to[0] = gCurrLevelCamera->xFocus; + a->to[1] = (sMarioStatusForCamera->pos[1] + gCurrLevelCamera->unk68) / 2.f; + a->to[2] = gCurrLevelCamera->zFocus; + vec3f_get_dist_and_angle(a->to, sMarioStatusForCamera->pos, &sp34, &sp32, &sp30); + vec3f_set_dist_and_angle(sMarioStatusForCamera->pos, a->from, 6000.f, 4096, sp30); if (gCurrLevelNum != LEVEL_THI) { - find_in_bounds_yaw_wdw_bob_thi(a->unk1C, a->unk28, 0); + find_in_bounds_yaw_wdw_bob_thi(a->from, a->to, 0); } } } else { @@ -2670,35 +2670,35 @@ void select_mario_cam_mode(void) { gCameraModeFlags = CAM_MODE_MARIO_SELECTED; } -void func_802875F8(struct Struct80287404 *a, struct AllocOnlyPool *b) { - s16 preset = a->unk18; - struct LevelCamera *c = alloc_only_pool_alloc(b, 108); +void func_802875F8(struct GraphNodeCamera *a, struct AllocOnlyPool *b) { + s16 preset = a->config.preset; + struct LevelCamera *c = alloc_only_pool_alloc(b, sizeof(struct LevelCamera)); - a->unk18 = (s32) c; + a->config.levelCamera = c; c->currPreset = preset; c->defPreset = preset; c->cutscene = 0; c->unk64 = 0; - c->xFocus = a->unk28[0]; - c->unk68 = a->unk28[1]; - c->zFocus = a->unk28[2]; + c->xFocus = a->to[0]; + c->unk68 = a->to[1]; + c->zFocus = a->to[2]; c->trueYaw = 0; - vec3f_copy(c->pos, a->unk1C); - vec3f_copy(c->focus, a->unk28); + vec3f_copy(c->pos, a->from); + vec3f_copy(c->focus, a->to); } -void func_802876D0(struct Struct80287404 *a) { +void func_802876D0(struct GraphNodeCamera *a) { UNUSED u8 unused[8]; - UNUSED s32 sp1C = a->unk18; + UNUSED struct LevelCamera *c = a->config.levelCamera; - a->unk3A = gCameraStatus.roll; - vec3f_copy(a->unk1C, gCameraStatus.pos); - vec3f_copy(a->unk28, gCameraStatus.focus); + a->rollScreen = gCameraStatus.roll; + vec3f_copy(a->from, gCameraStatus.pos); + vec3f_copy(a->to, gCameraStatus.focus); func_80287404(a); } -s32 geo_camera_preset_and_pos(s32 a, struct Struct80287404 *b, struct AllocOnlyPool *c) { - struct Struct80287404 *sp2C = b; +s32 geo_camera_preset_and_pos(s32 a, struct GraphNodeCamera *b, struct AllocOnlyPool *c) { + struct GraphNodeCamera *sp2C = b; UNUSED struct AllocOnlyPool *sp28 = c; switch (a) { @@ -2837,16 +2837,16 @@ s32 func_80287CFC(Vec3f a, struct CinematicCameraTable b[], s16 *c, f32 *d) { return sp6C; } -s32 select_or_activate_mario_cam(s32 a) { +s32 select_or_activate_mario_cam(s32 angle) { s32 sp1C = 2; - if (a == 1) { + if (angle == CAM_ANGLE_LAKITU_MARIO) { if (!(gCameraModeFlags & CAM_MODE_MARIO_SELECTED)) { gCameraModeFlags |= CAM_MODE_MARIO_SELECTED; } gCameraFlags1 |= CAM_FLAG_1_UNUSED_3; } - if (a == 2 && (gCameraModeFlags & CAM_MODE_MARIO_SELECTED)) { + if (angle == CAM_ANGLE_LAKITU_FIXED && (gCameraModeFlags & CAM_MODE_MARIO_SELECTED)) { test_or_set_mario_cam_active(2); gCameraModeFlags &= ~CAM_MODE_MARIO_SELECTED; gCameraFlags1 |= CAM_FLAG_1_UNUSED_4; @@ -3008,24 +3008,24 @@ s32 find_c_buttons_pressed(u16 a, u16 buttonsPressed, u16 buttonsDown) { } s32 update_camera_status(struct LevelCamera *c) { - s16 sp1E = 0; + s16 status = CAM_STATUS_NONE; if (c->cutscene != 0 - || ((gPlayer1Controller->buttonDown & R_TRIG) && select_or_activate_mario_cam(0) == 2)) { - sp1E |= 4; - } else if (test_or_set_mario_cam_active(0) == 1) { - sp1E |= 1; + || ((gPlayer1Controller->buttonDown & R_TRIG) && select_or_activate_mario_cam(0) == CAM_ANGLE_LAKITU_FIXED)) { + status |= CAM_STATUS_FIXED; + } else if (test_or_set_mario_cam_active(0) == CAM_ANGLE_LAKITU_MARIO) { + status |= CAM_STATUS_MARIO; } else { - sp1E |= 2; + status |= CAM_STATUS_LAKITU; } if (gCameraMovementFlags & CAM_MOVE_ZOOMED_OUT) { - sp1E |= 8; + status |= CAM_STATUS_C_DOWN; } if (gCameraMovementFlags & CAM_MOVE_C_UP_MODE) { - sp1E |= 0x10; + status |= CAM_STATUS_C_UP; } - set_camera_status(sp1E); - return sp1E; + set_hud_camera_status(status); + return status; } s32 find_and_return_count_wall_collisions(Vec3f pos, f32 offsetY, f32 radius) { @@ -3540,7 +3540,7 @@ s32 func_8028A0D4(Vec3f a, Vec3f b, struct Surface *surf, s16 d, s16 surfType) { return behindSurface; } -s32 is_mario_behind_surface(UNUSED s32 a, struct Surface *surf) { +s32 is_mario_behind_surface(UNUSED struct LevelCamera *c, struct Surface *surf) { s32 behindSurface = is_behind_surface(sMarioStatusForCamera->pos, surf); return behindSurface; @@ -3839,23 +3839,23 @@ void play_camera_buzz_if_c_sideways(void) { } void play_sound_cbutton_up(void) { - play_sound(SOUND_MENU_CAMERAZOOMIN, gDefaultSoundArgs); + play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gDefaultSoundArgs); } void play_sound_cbutton_down(void) { - play_sound(SOUND_MENU_CAMERAZOOMOUT, gDefaultSoundArgs); + play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gDefaultSoundArgs); } void play_sound_cbutton_side(void) { - play_sound(SOUND_MENU_CAMERATURN, gDefaultSoundArgs); + play_sound(SOUND_MENU_CAMERA_TURN, gDefaultSoundArgs); } void play_sound_button_change_blocked(void) { - play_sound(SOUND_MENU_CAMERABUZZ, gDefaultSoundArgs); + play_sound(SOUND_MENU_CAMERA_BUZZ, gDefaultSoundArgs); } void play_sound_rbutton_changed(void) { - play_sound(SOUND_MENU_CLICKCHANGEVIEW, gDefaultSoundArgs); + play_sound(SOUND_MENU_CLICK_CHANGE_VIEW, gDefaultSoundArgs); } void func_8028B36C(void) { @@ -5488,7 +5488,7 @@ s32 func_8028F2F0(struct LevelCamera *a, Vec3f pos, s16 *c, s16 d) { horWallNorm = atan2s(wall->normal.z, wall->normal.x); sp36 = horWallNorm + 0x4000; if ((func_8028A0D4(sMarioStatusForCamera->pos, pos, wall, d, SURFACE_WALL_MISC) == 0) - && (is_mario_behind_surface((u32) a, wall) == 1) + && (is_mario_behind_surface(a, wall) == 1) && (is_pos_less_than_bounds(wall, -1.f, 150.f, -1.f) == 0)) { *c = func_80289A98(yawToMario, sp36) + 0x8000; camera_approach_s16_symmetric_bool(c, horWallNorm, d); @@ -5532,8 +5532,8 @@ void find_mario_relative_geometry(struct PlayerGeometry *a) { gCheckingSurfaceCollisionsForCamera = tempCheckingSurfaceCollisionsForCamera; } -void func_8028F800(u8 a, struct Object *o) { - sTempCutsceneNumber = a; +void func_8028F800(u8 cutsceneTable, struct Object *o) { + sTempCutsceneNumber = cutsceneTable; gCutsceneNumber = 0; gCutsceneFocus = o; gCutsceneActive = FALSE; @@ -5557,14 +5557,14 @@ s32 unused_8028F860(u8 a) { } } -s16 func_8028F8E0(u8 a, struct Object *o, s16 c) { +s16 cutscene_object_with_dialog(u8 cutsceneTable, struct Object *o, s16 dialogID) { s16 sp1E = 0; if ((gCurrLevelCamera->cutscene == 0) && (sTempCutsceneNumber == 0)) { - if (gCutsceneNumber != a) { - func_8028F800(a, o); - if (c != -1) { - D_8033B320 = c; + if (gCutsceneNumber != cutsceneTable) { + func_8028F800(cutsceneTable, o); + if (dialogID != -1) { + D_8033B320 = dialogID; } else { D_8033B320 = 1; } @@ -5577,17 +5577,17 @@ s16 func_8028F8E0(u8 a, struct Object *o, s16 c) { return sp1E; } -s16 func_8028F9A4(u8 a, struct Object *o) { - s16 sp1E = func_8028F8E0(a, o, -1); +s16 cutscene_object_without_dialog(u8 cutsceneTable, struct Object *o) { + s16 sp1E = cutscene_object_with_dialog(cutsceneTable, o, -1); return sp1E; } -s16 func_8028F9E8(u8 a, struct Object *o) { +s16 cutscene_object(u8 cutsceneTable, struct Object *o) { s16 sp1E = 0; if ((gCurrLevelCamera->cutscene == 0) && (sTempCutsceneNumber == 0)) { - if (gCutsceneNumber != a) { - func_8028F800(a, o); + if (gCutsceneNumber != cutsceneTable) { + func_8028F800(cutsceneTable, o); sp1E = 1; } else { sp1E = -1; @@ -5675,7 +5675,7 @@ CmdRet CutsceneIntroPeach0_2(UNUSED struct LevelCamera *a) { CmdRet CutsceneIntroPeach2_1(UNUSED struct LevelCamera *a) { #ifndef VERSION_JP - func_80320040(0, 60); + sequence_player_unlower(0, 60); #endif func_8028B16C(); } @@ -5817,7 +5817,7 @@ void func_80290564(UNUSED struct LevelCamera *c) { } void func_80290598(UNUSED struct LevelCamera *c) { - func_80320040(0, 60); + sequence_player_unlower(0, 60); } void unused_802905C8(UNUSED struct LevelCamera *c) { @@ -6431,7 +6431,7 @@ CmdRet CutsceneEnterBowserPlatform0_4(UNUSED struct LevelCamera *c) { } CmdRet CutsceneEnterBowserPlatform0_3(UNUSED struct LevelCamera *c) { - gSecondCameraFocus->oUnknownUnk88 = 1; + gSecondCameraFocus->oBowserUnk88 = 1; } CmdRet CutsceneEnterBowserPlatform0_5(struct LevelCamera *c) { @@ -6499,7 +6499,7 @@ CmdRet bowser_fight_intro_dialog(UNUSED struct LevelCamera *c) { dialog = 93; } - func_802D7F90(dialog); + create_dialog_box(dialog); } CmdRet CutsceneEnterBowserPlatform1(struct LevelCamera *c) { @@ -6516,7 +6516,7 @@ CmdRet CutsceneEnterBowserPlatform2(struct LevelCamera *c) { init_transitional_movement(c, 20); gCameraFlags2 |= CAM_FLAG_2_UNUSED_CUTSCENE_ACTIVE; sFirstPersonCameraYaw = sMarioStatusForCamera->faceAngle[1] + 0x4000; - gSecondCameraFocus->oUnknownUnk88 = 2; + gSecondCameraFocus->oBowserUnk88 = 2; } CmdRet CutsceneEnterBowserPlatform0(struct LevelCamera *c) { @@ -7117,9 +7117,9 @@ CmdRet CutsceneDialog0_2(struct LevelCamera *c) { CmdRet CutsceneDialog0_3(struct LevelCamera *c) { if (c->cutscene == CUTSCENE_DIALOG_2) { - func_802D8050(D_8033B320); + create_dialog_box_with_response(D_8033B320); } else { - func_802D7F90(D_8033B320); + create_dialog_box(D_8033B320); } D_8033B6F0[8].unk1C[0] = 3; @@ -7415,7 +7415,7 @@ CmdRet CutsceneCapSwitchPress0_3(struct LevelCamera *c) { } CmdRet CutsceneCapSwitchPress0_6(UNUSED struct LevelCamera *c) { - func_802D8050(gCutsceneFocus->oBehParams2ndByte + 10); + create_dialog_box_with_response(gCutsceneFocus->oBehParams2ndByte + 10); } static void unused_802968E8(struct LevelCamera *c) { @@ -7514,12 +7514,12 @@ s32 func_80296DDC(struct LevelCamera *a, struct CinematicCameraTable b[], } CmdRet peach_letter_text(UNUSED struct LevelCamera *c) { - func_802D7F90(20); + create_dialog_box(20); } #ifndef VERSION_JP CmdRet play_sound_peach_reading_letter(UNUSED struct LevelCamera *c) { - play_sound(SOUND_PEACH_DEARMARIO, gDefaultSoundArgs); + play_sound(SOUND_PEACH_DEAR_MARIO, gDefaultSoundArgs); } #endif @@ -7565,7 +7565,7 @@ CmdRet CutsceneIntroPeach3_3(UNUSED struct LevelCamera *c) { } CmdRet intro_pipe_exit_text(UNUSED struct LevelCamera *c) { - func_802D7F90(33); + create_dialog_box(33); } #ifndef VERSION_JP @@ -8667,12 +8667,12 @@ void func_80299D00(s16 a, s16 b, s16 c, f32 d, f32 e, f32 f, f32 g) { } } -void func_80299DB4(struct Struct80287404 *a) { +void func_80299DB4(struct GraphNodeCamera *a) { if (D_8033B230.unk10 != 0.f) { D_8033B230.unk8 = coss(D_8033B230.unk14) * D_8033B230.unk10 / 256; D_8033B230.unk14 += D_8033B230.unk16; camera_approach_f32_symmetric_bool(&D_8033B230.unk10, 0.f, D_8033B230.unk18); - a->unk1C[0] += D_8033B230.unk8; + a->from[0] += D_8033B230.unk8; } else { D_8033B230.unk14 = 0; } @@ -8764,8 +8764,8 @@ void func_8029A288(struct MarioState *m) { D_8033B230.fieldOfView = approach_f32(D_8033B230.fieldOfView, targetFoV, 2.f, 2.f); } -s32 geo_camera_fov(s32 a, struct Struct80287404 *b, UNUSED struct AllocOnlyPool *c) { - struct Struct80287404 *sp24 = b; +s32 geo_camera_fov(s32 a, struct GraphNodeCamera *b, UNUSED struct AllocOnlyPool *c) { + struct GraphNodeCamera *sp24 = b; struct MarioState *marioState = &gMarioStates[0]; u8 sp1F = D_8033B230.unk0; @@ -8807,7 +8807,7 @@ s32 geo_camera_fov(s32 a, struct Struct80287404 *b, UNUSED struct AllocOnlyPool } } - sp24->unk1C[0] = D_8033B230.fieldOfView; + sp24->from[0] = D_8033B230.fieldOfView; func_80299DB4(sp24); return 0; } diff --git a/src/game/camera.h b/src/game/camera.h index 89139bb..2d6bbf7 100644 --- a/src/game/camera.h +++ b/src/game/camera.h @@ -56,6 +56,9 @@ #define CAM_MODE_LAKITU_WAS_ZOOMED_OUT 0x02 #define CAM_MODE_MARIO_SELECTED 0x04 +#define CAM_ANGLE_LAKITU_MARIO 1 +#define CAM_ANGLE_LAKITU_FIXED 2 + #define CAM_MOVE_RETURN_TO_MIDDLE 0x0001 #define CAM_MOVE_ZOOMED_OUT 0x0002 #define CAM_MOVE_ROTATE_RIGHT 0x0004 @@ -97,6 +100,16 @@ #define CAM_FLAG_2_UNUSED_CUTSCENE_ACTIVE 0x4000 #define CAM_FLAG_2_BEHIND_MARIO_POST_DOOR 0x8000 +#define CAM_STATUS_NONE 0 +#define CAM_STATUS_MARIO 1 << 0 +#define CAM_STATUS_LAKITU 1 << 1 +#define CAM_STATUS_FIXED 1 << 2 +#define CAM_STATUS_C_DOWN 1 << 3 +#define CAM_STATUS_C_UP 1 << 4 + +#define CAM_STATUS_MODE_GROUP (CAM_STATUS_MARIO | CAM_STATUS_LAKITU | CAM_STATUS_FIXED) +#define CAM_STATUS_C_MODE_GROUP (CAM_STATUS_C_DOWN | CAM_STATUS_C_UP) + #define SHAKE_ATTACK 1 #define SHAKE_GROUND_POUND 2 #define SHAKE_SMALL_DAMAGE 3 @@ -199,16 +212,6 @@ struct Struct8033B2B8 // unsorted -struct Struct80287404 -{ - u8 filler0[0x18]; - s32 unk18; - Vec3f unk1C; - Vec3f unk28; - u8 filler34[0x3A-0x34]; - s16 unk3A; -}; - // Camera command procedures are marked as returning s32, but none of them // actually return a value. This causes undefined behavior, which we'd rather // avoid on modern GCC. Hence, typedef. Interestingly, the void vs s32 @@ -398,7 +401,7 @@ extern void vec3f_sub(Vec3f, Vec3f); extern void object_pos_to_vec3f(Vec3f, struct Object *); extern void vec3f_to_object_pos(struct Object *, Vec3f); // static (ASM) extern s32 func_80287CFC(Vec3f, struct CinematicCameraTable[], s16 *, f32 *); -extern s32 select_or_activate_mario_cam(s32); +extern s32 select_or_activate_mario_cam(s32 angle); extern s32 test_or_set_mario_cam_active(s32); extern void set_spline_values(u8); extern void set_face_angle_from_spline(Vec3f, Vec3f); @@ -559,9 +562,9 @@ extern s32 func_8028F2F0(struct LevelCamera *, Vec3f, s16 *, s16); extern void find_mario_relative_geometry(struct PlayerGeometry *); // postdefined // extern ? func_8028F800(?); extern u8 func_8028F834(u8); -extern s16 func_8028F8E0(u8, struct Object *, s16); -extern s16 func_8028F9A4(u8, struct Object *); -extern s16 func_8028F9E8(u8, struct Object *); +extern s16 cutscene_object_with_dialog(u8 cutsceneTable, struct Object *, s16); +extern s16 cutscene_object_without_dialog(u8, struct Object *); +extern s16 cutscene_object(u8, struct Object *); // extern ? set_cam_yaw_from_focus_and_pos(?); // extern ? func_8028FABC(?); // extern ? func_8028FAE0(?); diff --git a/src/game/display.c b/src/game/display.c index ef4949b..4929901 100644 --- a/src/game/display.c +++ b/src/game/display.c @@ -5,7 +5,7 @@ #include "main.h" #include "memory.h" #include "profiler.h" -#include "buffers.h" +#include "buffers/buffers.h" #include "audio/external.h" #include "display.h" @@ -164,14 +164,14 @@ void create_task_structure(void) { s32 entries = gDisplayListHead - gGfxPool->buffer; gGfxSPTask->msgqueue = &D_80339CB8; - gGfxSPTask->msg = (OSMesg *) 2; + gGfxSPTask->msg = (OSMesg) 2; gGfxSPTask->task.t.type = M_GFXTASK; gGfxSPTask->task.t.ucode_boot = rspF3DBootStart; - gGfxSPTask->task.t.ucode_boot_size = ((u32) rspF3DBootEnd - (u32) 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; + 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; diff --git a/src/game/envfx_bubbles.c b/src/game/envfx_bubbles.c index 899f23a..9fbc6a8 100644 --- a/src/game/envfx_bubbles.c +++ b/src/game/envfx_bubbles.c @@ -182,7 +182,7 @@ void envfx_update_lava(Vec3s centerPos) { } if ((chance = (s32)(RandomFloat() * 16.0f)) == 8) { - play_sound(SOUND_GENERAL_QUIETBUBBLE2, gDefaultSoundArgs); + play_sound(SOUND_GENERAL_QUIET_BUBBLE2, gDefaultSoundArgs); } } @@ -447,7 +447,7 @@ GLOBAL_ASM("asm/non_matchings/append_bubble_vertex_buffer_eu.s") void append_bubble_vertex_buffer(Gfx *gfx, s32 index, Vec3s vertex1, Vec3s vertex2, Vec3s vertex3, Vtx *template) { s32 i = 0; - Vtx *vertBuf = (Vtx *) alloc_display_list(15 * sizeof(Vtx)); + Vtx *vertBuf = alloc_display_list(15 * sizeof(Vtx)); if (vertBuf == NULL) { return; @@ -485,18 +485,18 @@ void envfx_set_bubble_texture(s32 mode, s16 index) { switch (mode) { case ENVFX_FLOWERS: - imageArr = (void **) segmented_to_virtual(&flower_bubbles_textures_ptr_0B002008); + imageArr = segmented_to_virtual(&flower_bubbles_textures_ptr_0B002008); frame = (gEnvFxBuffer + index)->animFrame; break; case ENVFX_LAVA_BUBBLES: - imageArr = (void **) segmented_to_virtual(&lava_bubble_ptr_0B006020); + imageArr = segmented_to_virtual(&lava_bubble_ptr_0B006020); frame = (gEnvFxBuffer + index)->animFrame; break; case ENVFX_WHIRLPOOL_BUBBLES: case ENVFX_JETSTREAM_BUBBLES: - imageArr = (void **) segmented_to_virtual(&bubble_ptr_0B006848); + imageArr = segmented_to_virtual(&bubble_ptr_0B006848); frame = 0; break; } @@ -519,7 +519,7 @@ Gfx *envfx_update_bubble_particles(s32 mode, UNUSED Vec3s marioPos, Vec3s camFro Gfx *gfxStart; - gfxStart = (Gfx *) alloc_display_list( + gfxStart = alloc_display_list( ((sBubbleParticleMaxCount / 5) * 10 + sBubbleParticleMaxCount + 3) * sizeof(Gfx)); if (gfxStart == NULL) { return NULL; diff --git a/src/game/file_select.c b/src/game/file_select.c deleted file mode 100644 index 29097a7..0000000 --- a/src/game/file_select.c +++ /dev/null @@ -1,1945 +0,0 @@ -#include - -#include "sm64.h" -#include "audio/external.h" -#include "behavior_data.h" -#include "engine/behavior_script.h" -#include "game.h" -#include "ingame_menu.h" -#include "object_helpers.h" -#include "engine/math_util.h" -#include "area.h" -#include "save_file.h" -#include "spawn_object.h" -#include "file_select.h" -#include "object_list_processor.h" - -#include "text_strings.h" - -#ifndef VERSION_JP -static s16 sSoundTextX; // The current sound mode is automatically centered on US due to the large - // length difference between options. -#endif -static struct Object *sMainMenuButtons[32]; -static u8 sYesNoColor[2]; -static s8 sSelectedButtonID = MENU_BUTTON_NONE; // The button that was most recently clicked. -static s8 sCurrentMenuLevel = - MENU_LAYER_MAIN; // Whether we are on the main menu or one of the submenus. -static u8 sTextBaseAlpha = - 0; // Used for text opacifying. If it is below 250, it is constantly incremented. -static f32 sCursorPos[] = { 0, 0 }; // 2D position of the cursor on the screen. -static s16 sCursorClickingTimer = 0; // Determines which graphic to use for the cursor. -static s16 sClickPos[] = { - -10000, -10000 -}; // Equal to sCursorPos if clicked this frame, {-10000, -10000} otherwise. -static s8 sSelectedFile = - -1; // Used for determining which file has been selected during copying and erasing. -static s8 sFadeOutText = 0; // Whether to fade out text or not. -static s8 sStatusMessageId = 0; // The message currently being displayed at the top of the menu. -static u8 sTextTransparency = 0; // Used for text fading. The alpha value of text is calculated as - // sTextBaseAlpha - sTextTransparency. -static s16 sMainMenuTimer = 0; // Used to prevent buttons from being clickable as soon as a menu loads. -static s8 sSoundMode = 0; -static s8 D_801A7C04 = 0; -static s8 sAllFilesExist = 0; -static s8 D_801A7C0C = 0; -static s8 sScoreFileCoinScoreMode = 0; // Which coin score mode to use when scoring files. 0 for local - // coin highscore, 1 for highscore across all files. - -static unsigned char textReturn[] = { TEXT_RETURN }; -static unsigned char textViewScore[] = { TEXT_CHECK_SCORE }; -static unsigned char textCopyFileButton[] = { TEXT_COPY_FILE_BUTTON }; -static unsigned char textEraseFileButton[] = { TEXT_ERASE_FILE_BUTTON }; -static unsigned char textSoundModes[][8] = { { TEXT_STEREO }, { TEXT_MONO }, { TEXT_HEADSET } }; -static unsigned char textMarioA[] = { TEXT_FILE_MARIO_A }; -static unsigned char textMarioB[] = { TEXT_FILE_MARIO_B }; -static unsigned char textMarioC[] = { TEXT_FILE_MARIO_C }; -static unsigned char textMarioD[] = { TEXT_FILE_MARIO_D }; -static unsigned char textNew[] = { TEXT_NEW }; -static unsigned char starIcon[] = { 0x35, 0xff }; -static unsigned char xIcon[] = { 0x32, 0xff }; -static unsigned char textSelectFile[] = { TEXT_SELECT_FILE }; -static unsigned char textScore[] = { TEXT_SCORE }; -static unsigned char textCopy[] = { TEXT_COPY }; -static unsigned char textErase[] = { TEXT_ERASE }; -static unsigned char textCheckFile[] = { TEXT_CHECK_FILE }; -static unsigned char textNoSavedDataExists[] = { TEXT_NO_SAVED_DATA_EXISTS }; -static unsigned char textCopyFile[] = { TEXT_COPY_FILE }; -static unsigned char textCopyItToWhere[] = { TEXT_COPY_IT_TO_WHERE }; -static unsigned char textNoSavedDataExists2[] = { TEXT_NO_SAVED_DATA_EXISTS }; -static unsigned char textCopyFinished[] = { TEXT_COPYING_COMPLETED }; -static unsigned char textSavedDataExists[] = { TEXT_SAVED_DATA_EXISTS }; -static unsigned char textNoFileToCopyFrom[] = { TEXT_NO_FILE_TO_COPY_FROM }; -static unsigned char textYes[] = { TEXT_YES }; -static unsigned char textNo[] = { TEXT_NO }; - -void beh_yellow_background_menu_init(void) { - gCurrentObject->oFaceAngleYaw = 0x8000; - gCurrentObject->oMenuButtonScale = 9.0f; -} - -void beh_yellow_background_menu_loop(void) { - obj_scale(9.0f); -} - -// Test if a button was clicked -static s32 button_clicked_test(s16 x, s16 y, - f32 depth) // depth = 200.0 for main menu, 22.0 for submenus. -{ - f32 a = 52.4213; - f32 newX = ((f32) x * 160.0) / (a * depth); - f32 newY = ((f32) y * 120.0) / (a * 3.0f / 4.0f * depth); - s16 maxX = newX + 25.0f; - s16 minX = newX - 25.0f; - s16 maxY = newY + 21.0f; - s16 minY = newY - 21.0f; - - if (sClickPos[0] < maxX && minX < sClickPos[0] && sClickPos[1] < maxY && minY < sClickPos[1]) { - return TRUE; - } - - return FALSE; -} - -// Grow from main menu, used by playing files and submenus -static void bhvMenuButton_growing_from_main_menu(struct Object *button) { - if (button->oMenuButtonTimer < 16) { - button->oFaceAngleYaw += 0x800; - } - if (button->oMenuButtonTimer < 8) { - button->oFaceAnglePitch += 0x800; - } - if (button->oMenuButtonTimer >= 8 && button->oMenuButtonTimer < 16) { - button->oFaceAnglePitch -= 0x800; - } - button->oParentRelativePosX -= button->oMenuButtonOrigPosX / 16.0; - button->oParentRelativePosY -= button->oMenuButtonOrigPosY / 16.0; - if (button->oPosZ < button->oMenuButtonOrigPosZ + 17800.0) { - button->oParentRelativePosZ += 1112.5; - } - button->oMenuButtonTimer++; - if (button->oMenuButtonTimer == 16) { - button->oParentRelativePosX = 0.0f; - button->oParentRelativePosY = 0.0f; - button->oMenuButtonState = MENU_BUTTON_STATE_FULLSCREEN; - button->oMenuButtonTimer = 0; - } -} -// Shrink to main menu, used by playing files and submenus -static void bhvMenuButton_shrinking_to_main_menu(struct Object *button) { - if (button->oMenuButtonTimer < 16) { - button->oFaceAngleYaw -= 0x800; - } - if (button->oMenuButtonTimer < 8) { - button->oFaceAnglePitch -= 0x800; - } - if (button->oMenuButtonTimer >= 8 && button->oMenuButtonTimer < 16) { - button->oFaceAnglePitch += 0x800; - } - button->oParentRelativePosX += button->oMenuButtonOrigPosX / 16.0; - button->oParentRelativePosY += button->oMenuButtonOrigPosY / 16.0; - if (button->oPosZ > button->oMenuButtonOrigPosZ) { - button->oParentRelativePosZ -= 1112.5; - } - button->oMenuButtonTimer++; - if (button->oMenuButtonTimer == 16) { - button->oParentRelativePosX = button->oMenuButtonOrigPosX; - button->oParentRelativePosY = button->oMenuButtonOrigPosY; - button->oMenuButtonState = MENU_BUTTON_STATE_DEFAULT; - button->oMenuButtonTimer = 0; - } -} -// Grow from submenu, used by scoring files -static void bhvMenuButton_growing_from_submenu(struct Object *button) { - if (button->oMenuButtonTimer < 16) { - button->oFaceAngleYaw += 0x800; - } - if (button->oMenuButtonTimer < 8) { - button->oFaceAnglePitch += 0x800; - } - if (button->oMenuButtonTimer >= 8 && button->oMenuButtonTimer < 16) { - button->oFaceAnglePitch -= 0x800; - } - button->oParentRelativePosX -= button->oMenuButtonOrigPosX / 16.0; - button->oParentRelativePosY -= button->oMenuButtonOrigPosY / 16.0; - button->oParentRelativePosZ -= 116.25; - button->oMenuButtonTimer++; - if (button->oMenuButtonTimer == 16) { - button->oParentRelativePosX = 0.0f; - button->oParentRelativePosY = 0.0f; - button->oMenuButtonState = MENU_BUTTON_STATE_FULLSCREEN; - button->oMenuButtonTimer = 0; - } -} -// Shrink to submenu, used by scoring files -static void bhvMenuButton_shrinking_to_submenu(struct Object *button) { - if (button->oMenuButtonTimer < 16) { - button->oFaceAngleYaw -= 0x800; - } - if (button->oMenuButtonTimer < 8) { - button->oFaceAnglePitch -= 0x800; - } - if (button->oMenuButtonTimer >= 8 && button->oMenuButtonTimer < 16) { - button->oFaceAnglePitch += 0x800; - } - button->oParentRelativePosX += button->oMenuButtonOrigPosX / 16.0; - button->oParentRelativePosY += button->oMenuButtonOrigPosY / 16.0; - if (button->oPosZ > button->oMenuButtonOrigPosZ) { - button->oParentRelativePosZ += 116.25; - } - button->oMenuButtonTimer++; - if (button->oMenuButtonTimer == 16) { - button->oParentRelativePosX = button->oMenuButtonOrigPosX; - button->oParentRelativePosY = button->oMenuButtonOrigPosY; - button->oMenuButtonState = MENU_BUTTON_STATE_DEFAULT; - button->oMenuButtonTimer = 0; - } -} -// A small increase and decrease in size -// Used by failed copy/erase/score operations and sound mode select. -static void bhvMenuButton_zoom_in_out(struct Object *button) { - if (sCurrentMenuLevel == MENU_LAYER_MAIN) { - if (button->oMenuButtonTimer < 4) { - button->oParentRelativePosZ -= 20.0f; - } - if (button->oMenuButtonTimer >= 4) { - button->oParentRelativePosZ += 20.0f; - } - } else { - if (button->oMenuButtonTimer < 4) { - button->oParentRelativePosZ += 20.0f; - } - if (button->oMenuButtonTimer >= 4) { - button->oParentRelativePosZ -= 20.0f; - } - } - button->oMenuButtonTimer++; - if (button->oMenuButtonTimer == 8) { - button->oMenuButtonState = MENU_BUTTON_STATE_DEFAULT; - button->oMenuButtonTimer = 0; - } -} -// A small temporary increase in size -// Used while selecting a target copy file or yes/no erase prompt answer -static void bhvMenuButton_zoom_in(struct Object *button) { - button->oMenuButtonScale += 0.0022; - button->oMenuButtonTimer++; - if (button->oMenuButtonTimer == 10) { - button->oMenuButtonState = MENU_BUTTON_STATE_DEFAULT; - button->oMenuButtonTimer = 0; - } -} -// A small temporary decrease in size -// Used after selecting a target copy file or yes/no erase prompt answer to undo the zoom in. -static void bhvMenuButton_zoom_out(struct Object *button) { - button->oMenuButtonScale -= 0.0022; - button->oMenuButtonTimer++; - if (button->oMenuButtonTimer == 10) { - button->oMenuButtonState = MENU_BUTTON_STATE_DEFAULT; - button->oMenuButtonTimer = 0; - } -} - -void bhvMenuButton_init(void) { - gCurrentObject->oMenuButtonOrigPosX = gCurrentObject->oParentRelativePosX; - gCurrentObject->oMenuButtonOrigPosY = gCurrentObject->oParentRelativePosY; -} - -void bhvMenuButton_loop(void) { - switch (gCurrentObject->oMenuButtonState) { - case MENU_BUTTON_STATE_DEFAULT: // Button state - gCurrentObject->oMenuButtonOrigPosZ = gCurrentObject->oPosZ; - break; - case MENU_BUTTON_STATE_GROWING: // Switching from button to menu state - if (sCurrentMenuLevel == MENU_LAYER_MAIN) { - bhvMenuButton_growing_from_main_menu(gCurrentObject); - } - if (sCurrentMenuLevel == MENU_LAYER_SUBMENU) { - bhvMenuButton_growing_from_submenu(gCurrentObject); // Only used for score files - } - sTextBaseAlpha = 0; - sCursorClickingTimer = 4; - break; - case MENU_BUTTON_STATE_FULLSCREEN: // Menu state - break; - case MENU_BUTTON_STATE_SHRINKING: // Switching from menu to button state - if (sCurrentMenuLevel == MENU_LAYER_MAIN) { - bhvMenuButton_shrinking_to_main_menu(gCurrentObject); - } - if (sCurrentMenuLevel == MENU_LAYER_SUBMENU) { - bhvMenuButton_shrinking_to_submenu(gCurrentObject); // Only used for score files - } - sTextBaseAlpha = 0; - sCursorClickingTimer = 4; - break; - case MENU_BUTTON_STATE_ZOOM_IN_OUT: - bhvMenuButton_zoom_in_out(gCurrentObject); - sCursorClickingTimer = 4; - break; - case MENU_BUTTON_STATE_ZOOM_IN: - bhvMenuButton_zoom_in(gCurrentObject); - sCursorClickingTimer = 4; - break; - case MENU_BUTTON_STATE_ZOOM_OUT: - bhvMenuButton_zoom_out(gCurrentObject); - sCursorClickingTimer = 4; - break; - } - obj_scale(gCurrentObject->oMenuButtonScale); -} - -static void score_menu_file_exiting(struct Object *scoreFileButton, s8 scoreButtonId) { - // Begin exit - if (scoreFileButton->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN - && sCursorClickingTimer == 2) { - play_sound(SOUND_MENU_CAMERAZOOMOUT, gDefaultSoundArgs); - scoreFileButton->oMenuButtonState = MENU_BUTTON_STATE_SHRINKING; - } - // End exit - if (scoreFileButton->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT) { - sSelectedButtonID = scoreButtonId; - if (sCurrentMenuLevel == MENU_LAYER_SUBMENU) { - sCurrentMenuLevel = MENU_LAYER_MAIN; - } - } -} - -static void score_menu_create_buttons(struct Object *scoreButton) { - // File A - if (save_file_exists(0) == TRUE) { - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_A] = - spawn_object_rel_with_rot(scoreButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, - 711, 311, -100, 0, -0x8000, 0); - } else { - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_A] = - spawn_object_rel_with_rot(scoreButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, 711, - 311, -100, 0, -0x8000, 0); - } - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_A]->oMenuButtonScale = 0.11111111f; - // File B - if (save_file_exists(1) == TRUE) { - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_B] = - spawn_object_rel_with_rot(scoreButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, - -166, 311, -100, 0, -0x8000, 0); - } else { - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_B] = - spawn_object_rel_with_rot(scoreButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, - -166, 311, -100, 0, -0x8000, 0); - } - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_B]->oMenuButtonScale = 0.11111111f; - // File C - if (save_file_exists(2) == TRUE) { - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_C] = spawn_object_rel_with_rot( - scoreButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, 711, 0, -100, 0, -0x8000, 0); - } else { - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_C] = spawn_object_rel_with_rot( - scoreButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, 711, 0, -100, 0, -0x8000, 0); - } - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_C]->oMenuButtonScale = 0.11111111f; - // File D - if (save_file_exists(3) == TRUE) { - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_D] = - spawn_object_rel_with_rot(scoreButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, - -166, 0, -100, 0, -0x8000, 0); - } else { - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_D] = spawn_object_rel_with_rot( - scoreButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, -166, 0, -100, 0, -0x8000, 0); - } - sMainMenuButtons[MENU_BUTTON_SCORE_FILE_D]->oMenuButtonScale = 0.11111111f; - // Return to main menu button - sMainMenuButtons[MENU_BUTTON_SCORE_RETURN] = spawn_object_rel_with_rot( - scoreButton, MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, bhvMenuButton, 711, -388, -100, 0, -0x8000, 0); - sMainMenuButtons[MENU_BUTTON_SCORE_RETURN]->oMenuButtonScale = 0.11111111f; - // Switch to copy menu button - sMainMenuButtons[MENU_BUTTON_SCORE_COPY_FILE] = spawn_object_rel_with_rot( - scoreButton, MODEL_MAIN_MENU_BLUE_COPY_BUTTON, bhvMenuButton, 0, -388, -100, 0, -0x8000, 0); - sMainMenuButtons[MENU_BUTTON_SCORE_COPY_FILE]->oMenuButtonScale = 0.11111111f; - // Switch to erase menu button - sMainMenuButtons[MENU_BUTTON_SCORE_ERASE_FILE] = spawn_object_rel_with_rot( - scoreButton, MODEL_MAIN_MENU_RED_ERASE_BUTTON, bhvMenuButton, -711, -388, -100, 0, -0x8000, 0); - sMainMenuButtons[MENU_BUTTON_SCORE_ERASE_FILE]->oMenuButtonScale = 0.11111111f; -} - -static void score_menu_check_clicked_buttons(struct Object *scoreButton) { - if (scoreButton->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { - s32 buttonId; - - for (buttonId = 7; buttonId < 14; buttonId++) { - s16 buttonX = sMainMenuButtons[buttonId]->oPosX; - s16 buttonY = sMainMenuButtons[buttonId]->oPosY; - - if (button_clicked_test(buttonX, buttonY, 22.0f) == TRUE && sMainMenuTimer >= 31) { - // If menu button clicked - if (buttonId == MENU_BUTTON_SCORE_RETURN || buttonId == MENU_BUTTON_SCORE_COPY_FILE - || buttonId == MENU_BUTTON_SCORE_ERASE_FILE) { - play_sound(SOUND_MENU_CLICKFILESELECT, gDefaultSoundArgs); - sMainMenuButtons[buttonId]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN_OUT; - sSelectedButtonID = buttonId; - } - // If file button clicked - else { - if (sMainMenuTimer >= 31) { - // Save file exists - if (save_file_exists(buttonId - 7) == TRUE) { - play_sound(SOUND_MENU_CAMERAZOOMIN, gDefaultSoundArgs); - sMainMenuButtons[buttonId]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; - sSelectedButtonID = buttonId; - } - // Save file empty - else { - play_sound(SOUND_MENU_CAMERABUZZ, gDefaultSoundArgs); - sMainMenuButtons[buttonId]->oMenuButtonState = - MENU_BUTTON_STATE_ZOOM_IN_OUT; - if (sMainMenuTimer >= 31) { - sFadeOutText = 1; - sMainMenuTimer = 0; - } - } - } - } - sCurrentMenuLevel = MENU_LAYER_SUBMENU; - break; - } - } - } -} - -static void copy_menu_create_buttons(struct Object *copyButton) { - // File A - if (save_file_exists(0) == TRUE) { - sMainMenuButtons[MENU_BUTTON_COPY_FILE_A] = - spawn_object_rel_with_rot(copyButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, 711, - 311, -100, 0, -0x8000, 0); - } else { - sMainMenuButtons[MENU_BUTTON_COPY_FILE_A] = spawn_object_rel_with_rot( - copyButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, 711, 311, -100, 0, -0x8000, 0); - } - sMainMenuButtons[MENU_BUTTON_COPY_FILE_A]->oMenuButtonScale = 0.11111111f; - // File B - if (save_file_exists(1) == TRUE) { - sMainMenuButtons[MENU_BUTTON_COPY_FILE_B] = - spawn_object_rel_with_rot(copyButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, - -166, 311, -100, 0, -0x8000, 0); - } else { - sMainMenuButtons[MENU_BUTTON_COPY_FILE_B] = - spawn_object_rel_with_rot(copyButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, -166, - 311, -100, 0, -0x8000, 0); - } - sMainMenuButtons[MENU_BUTTON_COPY_FILE_B]->oMenuButtonScale = 0.11111111f; - // File C - if (save_file_exists(2) == TRUE) { - sMainMenuButtons[MENU_BUTTON_COPY_FILE_C] = spawn_object_rel_with_rot( - copyButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, 711, 0, -100, 0, -0x8000, 0); - } else { - sMainMenuButtons[MENU_BUTTON_COPY_FILE_C] = spawn_object_rel_with_rot( - copyButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, 711, 0, -100, 0, -0x8000, 0); - } - sMainMenuButtons[MENU_BUTTON_COPY_FILE_C]->oMenuButtonScale = 0.11111111f; - // File D - if (save_file_exists(3) == TRUE) { - sMainMenuButtons[MENU_BUTTON_COPY_FILE_D] = spawn_object_rel_with_rot( - copyButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, -166, 0, -100, 0, -0x8000, 0); - } else { - sMainMenuButtons[MENU_BUTTON_COPY_FILE_D] = spawn_object_rel_with_rot( - copyButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, -166, 0, -100, 0, -0x8000, 0); - } - sMainMenuButtons[MENU_BUTTON_COPY_FILE_D]->oMenuButtonScale = 0.11111111f; - // Return to main menu button - sMainMenuButtons[MENU_BUTTON_COPY_RETURN] = spawn_object_rel_with_rot( - copyButton, MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, bhvMenuButton, 711, -388, -100, 0, -0x8000, 0); - sMainMenuButtons[MENU_BUTTON_COPY_RETURN]->oMenuButtonScale = 0.11111111f; - // Switch to scire menu button - sMainMenuButtons[MENU_BUTTON_COPY_CHECK_SCORE] = spawn_object_rel_with_rot( - copyButton, MODEL_MAIN_MENU_GREEN_SCORE_BUTTON, bhvMenuButton, 0, -388, -100, 0, -0x8000, 0); - sMainMenuButtons[MENU_BUTTON_COPY_CHECK_SCORE]->oMenuButtonScale = 0.11111111f; - // Switch to erase menu button - sMainMenuButtons[MENU_BUTTON_COPY_ERASE_FILE] = spawn_object_rel_with_rot( - copyButton, MODEL_MAIN_MENU_RED_ERASE_BUTTON, bhvMenuButton, -711, -388, -100, 0, -0x8000, 0); - sMainMenuButtons[MENU_BUTTON_COPY_ERASE_FILE]->oMenuButtonScale = 0.11111111f; -} - -static void CopyMenuCopyFile(struct Object *copyButton, s32 copyFileButtonId) { - switch (copyButton->oMenuButtonActionPhase) { - case 0: - if (sAllFilesExist == TRUE) { - return; - } - if (save_file_exists(copyFileButtonId - 14) == TRUE) { - play_sound(SOUND_MENU_CLICKFILESELECT, gDefaultSoundArgs); - sMainMenuButtons[copyFileButtonId]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN; - sSelectedFile = copyFileButtonId - 14; - copyButton->oMenuButtonActionPhase = 1; - sFadeOutText = 1; - sMainMenuTimer = 0; - } else { - play_sound(SOUND_MENU_CAMERABUZZ, gDefaultSoundArgs); - sMainMenuButtons[copyFileButtonId]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN_OUT; - if (sMainMenuTimer >= 21) { - sFadeOutText = 1; - sMainMenuTimer = 0; - } - } - break; - case 1: - sMainMenuButtons[copyFileButtonId]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN_OUT; - if (save_file_exists(copyFileButtonId - 14) == FALSE) { - play_sound(SOUND_MENU_STARSOUND, gDefaultSoundArgs); - copyButton->oMenuButtonActionPhase = 2; - sFadeOutText = 1; - sMainMenuTimer = 0; - save_file_copy(sSelectedFile, copyFileButtonId - 14); - sMainMenuButtons[copyFileButtonId]->header.gfx.sharedChild = - gLoadedGraphNodes[MODEL_MAIN_MENU_MARIO_SAVE_BUTTON_FADE]; - sMainMenuButtons[copyFileButtonId - 14]->header.gfx.sharedChild = - gLoadedGraphNodes[MODEL_MAIN_MENU_MARIO_SAVE_BUTTON_FADE]; - } else { - if (MENU_BUTTON_COPY_FILE_A + sSelectedFile == copyFileButtonId) { - play_sound(SOUND_MENU_CAMERABUZZ, gDefaultSoundArgs); - sMainMenuButtons[MENU_BUTTON_COPY_FILE_A + sSelectedFile]->oMenuButtonState = - MENU_BUTTON_STATE_ZOOM_OUT; - copyButton->oMenuButtonActionPhase = 0; - sFadeOutText = 1; - return; - } - if (sMainMenuTimer >= 21) { - sFadeOutText = 1; - sMainMenuTimer = 0; - } - } - break; - } -} - -static void copy_menu_check_clicked_buttons(struct Object *copyButton) { - if (copyButton->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { - s32 buttonId; - - for (buttonId = 14; buttonId < 21; buttonId++) { - s16 buttonX = sMainMenuButtons[buttonId]->oPosX; - s16 buttonY = sMainMenuButtons[buttonId]->oPosY; - - if (button_clicked_test(buttonX, buttonY, 22.0f) == TRUE) { - // If menu button clicked - if (buttonId == MENU_BUTTON_COPY_RETURN || buttonId == MENU_BUTTON_COPY_CHECK_SCORE - || buttonId == MENU_BUTTON_COPY_ERASE_FILE) { - if (copyButton->oMenuButtonActionPhase == 0) { - play_sound(SOUND_MENU_CLICKFILESELECT, gDefaultSoundArgs); - sMainMenuButtons[buttonId]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN_OUT; - sSelectedButtonID = buttonId; - } - } - // If file button clicked - else { - if (sMainMenuButtons[buttonId]->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT - && sMainMenuTimer >= 31) { - CopyMenuCopyFile(copyButton, buttonId); - } - } - sCurrentMenuLevel = MENU_LAYER_SUBMENU; - break; - } - } - if (copyButton->oMenuButtonActionPhase == 2 && sMainMenuTimer >= 31) { - copyButton->oMenuButtonActionPhase = 0; - sMainMenuButtons[MENU_BUTTON_COPY_FILE_A + sSelectedFile]->oMenuButtonState = - MENU_BUTTON_STATE_ZOOM_OUT; - } - } -} - -static void erase_menu_create_buttons(struct Object *eraseButton) { - // File A - if (save_file_exists(0) == TRUE) { - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_A] = - spawn_object_rel_with_rot(eraseButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, - 711, 311, -100, 0, -0x8000, 0); - } else { - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_A] = - spawn_object_rel_with_rot(eraseButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, 711, - 311, -100, 0, -0x8000, 0); - } - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_A]->oMenuButtonScale = 0.11111111f; - // File B - if (save_file_exists(1) == TRUE) { - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_B] = - spawn_object_rel_with_rot(eraseButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, - -166, 311, -100, 0, -0x8000, 0); - } else { - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_B] = - spawn_object_rel_with_rot(eraseButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, - -166, 311, -100, 0, -0x8000, 0); - } - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_B]->oMenuButtonScale = 0.11111111f; - // File C - if (save_file_exists(2) == TRUE) { - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_C] = spawn_object_rel_with_rot( - eraseButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, 711, 0, -100, 0, -0x8000, 0); - } else { - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_C] = spawn_object_rel_with_rot( - eraseButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, 711, 0, -100, 0, -0x8000, 0); - } - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_C]->oMenuButtonScale = 0.11111111f; - // File D - if (save_file_exists(3) == TRUE) { - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_D] = - spawn_object_rel_with_rot(eraseButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, - -166, 0, -100, 0, -0x8000, 0); - } else { - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_D] = spawn_object_rel_with_rot( - eraseButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, -166, 0, -100, 0, -0x8000, 0); - } - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_D]->oMenuButtonScale = 0.11111111f; - // Return to main menu button - sMainMenuButtons[MENU_BUTTON_ERASE_RETURN] = spawn_object_rel_with_rot( - eraseButton, MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, bhvMenuButton, 711, -388, -100, 0, -0x8000, 0); - sMainMenuButtons[MENU_BUTTON_ERASE_RETURN]->oMenuButtonScale = 0.11111111f; - // Switch to score menu button - sMainMenuButtons[MENU_BUTTON_ERASE_CHECK_SCORE] = spawn_object_rel_with_rot( - eraseButton, MODEL_MAIN_MENU_GREEN_SCORE_BUTTON, bhvMenuButton, 0, -388, -100, 0, -0x8000, 0); - sMainMenuButtons[MENU_BUTTON_ERASE_CHECK_SCORE]->oMenuButtonScale = 0.11111111f; - // Switch to copy menu button - sMainMenuButtons[MENU_BUTTON_ERASE_COPY_FILE] = spawn_object_rel_with_rot( - eraseButton, MODEL_MAIN_MENU_BLUE_COPY_BUTTON, bhvMenuButton, -711, -388, -100, 0, -0x8000, 0); - sMainMenuButtons[MENU_BUTTON_ERASE_COPY_FILE]->oMenuButtonScale = 0.11111111f; -} - -static void erase_menu_erase_file(struct Object *eraseButton, s32 eraseFileButtonId) { - switch (eraseButton->oMenuButtonActionPhase) { - case 0: - if (save_file_exists(eraseFileButtonId - MENU_BUTTON_ERASE_FILE_A) == TRUE) { - play_sound(SOUND_MENU_CLICKFILESELECT, gDefaultSoundArgs); - sMainMenuButtons[eraseFileButtonId]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN; - sSelectedFile = eraseFileButtonId - MENU_BUTTON_ERASE_FILE_A; - eraseButton->oMenuButtonActionPhase = 1; - sFadeOutText = 1; - sMainMenuTimer = 0; - } else { - play_sound(SOUND_MENU_CAMERABUZZ, gDefaultSoundArgs); - sMainMenuButtons[eraseFileButtonId]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN_OUT; - if (sMainMenuTimer >= 21) { - sFadeOutText = 1; - sMainMenuTimer = 0; - } - } - break; - case 1: - if (MENU_BUTTON_ERASE_FILE_A + sSelectedFile == eraseFileButtonId) { - play_sound(SOUND_MENU_CLICKFILESELECT, gDefaultSoundArgs); - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_A + sSelectedFile]->oMenuButtonState = - MENU_BUTTON_STATE_ZOOM_OUT; - eraseButton->oMenuButtonActionPhase = 0; - sFadeOutText = 1; - } - break; - } -} - -static void erase_menu_check_clicked_buttons(struct Object *eraseButton) { - if (eraseButton->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { - s32 buttonId; - - for (buttonId = 21; buttonId < 28; buttonId++) { - s16 buttonX = sMainMenuButtons[buttonId]->oPosX; - s16 buttonY = sMainMenuButtons[buttonId]->oPosY; - - if (button_clicked_test(buttonX, buttonY, 22.0f) == TRUE) { - // If menu button clicked - if (buttonId == MENU_BUTTON_ERASE_RETURN || buttonId == MENU_BUTTON_ERASE_CHECK_SCORE - || buttonId == MENU_BUTTON_ERASE_COPY_FILE) { - if (eraseButton->oMenuButtonActionPhase == 0) { - play_sound(SOUND_MENU_CLICKFILESELECT, gDefaultSoundArgs); - sMainMenuButtons[buttonId]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN_OUT; - sSelectedButtonID = buttonId; - } - } - // If file button clicked - else { - if (sMainMenuTimer >= 31) { - erase_menu_erase_file(eraseButton, buttonId); - } - } - sCurrentMenuLevel = MENU_LAYER_SUBMENU; - break; - } - } - if (eraseButton->oMenuButtonActionPhase == 2 && sMainMenuTimer >= 31) { - eraseButton->oMenuButtonActionPhase = 0; - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_A + sSelectedFile]->oMenuButtonState = - MENU_BUTTON_STATE_ZOOM_OUT; - } - } -} - -static void sound_mode_menu_create_buttons(struct Object *soundModeButton) { - // Stereo option button - sMainMenuButtons[MENU_BUTTON_STEREO] = spawn_object_rel_with_rot( - soundModeButton, MODEL_MAIN_MENU_GENERIC_BUTTON, bhvMenuButton, 533, 0, -100, 0, -0x8000, 0); - sMainMenuButtons[MENU_BUTTON_STEREO]->oMenuButtonScale = 0.11111111f; - // Mono option button - sMainMenuButtons[MENU_BUTTON_MONO] = spawn_object_rel_with_rot( - soundModeButton, MODEL_MAIN_MENU_GENERIC_BUTTON, bhvMenuButton, 0, 0, -100, 0, -0x8000, 0); - sMainMenuButtons[MENU_BUTTON_MONO]->oMenuButtonScale = 0.11111111f; - // Headset option button - sMainMenuButtons[MENU_BUTTON_HEADSET] = spawn_object_rel_with_rot( - soundModeButton, MODEL_MAIN_MENU_GENERIC_BUTTON, bhvMenuButton, -533, 0, -100, 0, -0x8000, 0); - sMainMenuButtons[MENU_BUTTON_HEADSET]->oMenuButtonScale = 0.11111111f; - // Zoom in current selection - sMainMenuButtons[29 + sSoundMode]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN; -} - -static void sound_mode_menu_check_clicked_buttons(struct Object *soundModeButton) { - if (soundModeButton->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { - s32 buttonId; - - for (buttonId = 29; buttonId < 32; buttonId++) { - s16 buttonX = sMainMenuButtons[buttonId]->oPosX; - s16 buttonY = sMainMenuButtons[buttonId]->oPosY; - - if (button_clicked_test(buttonX, buttonY, 22.0f) == TRUE) { - // why is this check here? it will always be true. - if (buttonId == MENU_BUTTON_STEREO || buttonId == MENU_BUTTON_MONO - || buttonId == MENU_BUTTON_HEADSET) { - if (soundModeButton->oMenuButtonActionPhase == 0) { - play_sound(SOUND_MENU_CLICKFILESELECT, gDefaultSoundArgs); - sMainMenuButtons[buttonId]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN_OUT; - sSelectedButtonID = buttonId; - sSoundMode = buttonId - 29; - save_file_set_sound_mode(sSoundMode); - } - } - sCurrentMenuLevel = MENU_LAYER_SUBMENU; - break; - } - } - } -} - -static void main_menu_file_selected(struct Object *fileButton, s32 fileNum) { - if (fileButton->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { - D_801A7C0C = fileNum; - } -} - -static void return_to_main_menu(s16 prevMenuButtonId, struct Object *sourceButton) { - s32 buttonID; - - if (sourceButton->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT - && sMainMenuButtons[prevMenuButtonId]->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { - play_sound(SOUND_MENU_CAMERAZOOMOUT, gDefaultSoundArgs); - sMainMenuButtons[prevMenuButtonId]->oMenuButtonState = MENU_BUTTON_STATE_SHRINKING; - sCurrentMenuLevel = MENU_LAYER_MAIN; - } - if (sMainMenuButtons[prevMenuButtonId]->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT) { - // Hide buttons on corresponding submenu - sSelectedButtonID = MENU_BUTTON_NONE; - if (prevMenuButtonId == MENU_BUTTON_SCORE) { - for (buttonID = 7; buttonID < 14; buttonID++) { - mark_obj_for_deletion(sMainMenuButtons[buttonID]); - } - } - if (prevMenuButtonId == MENU_BUTTON_COPY) { - for (buttonID = 14; buttonID < 21; buttonID++) { - mark_obj_for_deletion(sMainMenuButtons[buttonID]); - } - } - if (prevMenuButtonId == MENU_BUTTON_ERASE) { - for (buttonID = 21; buttonID < 28; buttonID++) { - mark_obj_for_deletion(sMainMenuButtons[buttonID]); - } - } - if (prevMenuButtonId == MENU_BUTTON_SOUND_MODE) { - for (buttonID = 29; buttonID < 32; buttonID++) { - mark_obj_for_deletion(sMainMenuButtons[buttonID]); - } - } - } -} - -static void score_menu_init_from_submenu(s16 prevMenuButtonId, struct Object *sourceButton) { - s32 buttonID; - - if (sourceButton->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT - && sMainMenuButtons[prevMenuButtonId]->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { - play_sound(SOUND_MENU_CAMERAZOOMOUT, gDefaultSoundArgs); - sMainMenuButtons[prevMenuButtonId]->oMenuButtonState = MENU_BUTTON_STATE_SHRINKING; - sCurrentMenuLevel = MENU_LAYER_MAIN; - } - if (sMainMenuButtons[prevMenuButtonId]->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT) { - // Hide buttons on corresponding submenu - if (prevMenuButtonId == MENU_BUTTON_SCORE) //! Not possible, this is checking if the score menu - //! was opened from the score menu! - { - for (buttonID = 7; buttonID < 14; buttonID++) { - mark_obj_for_deletion(sMainMenuButtons[buttonID]); - } - } - if (prevMenuButtonId == MENU_BUTTON_COPY) { - for (buttonID = 14; buttonID < 21; buttonID++) { - mark_obj_for_deletion(sMainMenuButtons[buttonID]); - } - } - if (prevMenuButtonId == MENU_BUTTON_ERASE) { - for (buttonID = 21; buttonID < 28; buttonID++) { - mark_obj_for_deletion(sMainMenuButtons[buttonID]); - } - } - sSelectedButtonID = MENU_BUTTON_SCORE; - play_sound(SOUND_MENU_CAMERAZOOMIN, gDefaultSoundArgs); - sMainMenuButtons[MENU_BUTTON_SCORE]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; - score_menu_create_buttons(sMainMenuButtons[MENU_BUTTON_SCORE]); - } -} - -static void copy_menu_init_from_submenu(s16 prevMenuButtonId, struct Object *sourceButton) { - s32 buttonID; - - if (sourceButton->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT - && sMainMenuButtons[prevMenuButtonId]->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { - play_sound(SOUND_MENU_CAMERAZOOMOUT, gDefaultSoundArgs); - sMainMenuButtons[prevMenuButtonId]->oMenuButtonState = MENU_BUTTON_STATE_SHRINKING; - sCurrentMenuLevel = MENU_LAYER_MAIN; - } - if (sMainMenuButtons[prevMenuButtonId]->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT) { - // Hide buttons on corresponding submenu - if (prevMenuButtonId == MENU_BUTTON_SCORE) { - for (buttonID = 7; buttonID < 14; buttonID++) { - mark_obj_for_deletion(sMainMenuButtons[buttonID]); - } - } - if (prevMenuButtonId == MENU_BUTTON_COPY) //! Not possible, this is checking if the copy menu - //! was opened from the copy menu! - { - for (buttonID = 14; buttonID < 21; buttonID++) { - mark_obj_for_deletion(sMainMenuButtons[buttonID]); - } - } - if (prevMenuButtonId == MENU_BUTTON_ERASE) { - for (buttonID = 21; buttonID < 28; buttonID++) { - mark_obj_for_deletion(sMainMenuButtons[buttonID]); - } - } - sSelectedButtonID = MENU_BUTTON_COPY; - play_sound(SOUND_MENU_CAMERAZOOMIN, gDefaultSoundArgs); - sMainMenuButtons[MENU_BUTTON_COPY]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; - copy_menu_create_buttons(sMainMenuButtons[MENU_BUTTON_COPY]); - } -} - -static void erase_menu_init_from_submenu(s16 prevMenuButtonId, struct Object *sourceButton) { - s32 buttonID; - - if (sourceButton->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT - && sMainMenuButtons[prevMenuButtonId]->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { - play_sound(SOUND_MENU_CAMERAZOOMOUT, gDefaultSoundArgs); - sMainMenuButtons[prevMenuButtonId]->oMenuButtonState = MENU_BUTTON_STATE_SHRINKING; - sCurrentMenuLevel = MENU_LAYER_MAIN; - } - if (sMainMenuButtons[prevMenuButtonId]->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT) { - // Hide buttons on corresponding submenu - if (prevMenuButtonId == MENU_BUTTON_SCORE) { - for (buttonID = 7; buttonID < 14; buttonID++) { - mark_obj_for_deletion(sMainMenuButtons[buttonID]); - } - } - if (prevMenuButtonId == MENU_BUTTON_COPY) { - for (buttonID = 14; buttonID < 21; buttonID++) { - mark_obj_for_deletion(sMainMenuButtons[buttonID]); - } - } - if (prevMenuButtonId == MENU_BUTTON_ERASE) //! Not possible, this is checking if the erase menu - //! was opened from the erase menu! - { - for (buttonID = 21; buttonID < 28; buttonID++) { - mark_obj_for_deletion(sMainMenuButtons[buttonID]); - } - } - sSelectedButtonID = MENU_BUTTON_ERASE; - play_sound(SOUND_MENU_CAMERAZOOMIN, gDefaultSoundArgs); - sMainMenuButtons[MENU_BUTTON_ERASE]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; - erase_menu_create_buttons(sMainMenuButtons[MENU_BUTTON_ERASE]); - } -} -// Create buttons on the main menu. Unlike buttons on submenus, these are never hidden or recreated. -void bhvMenuButtonManager_init(void) { - // File A - if (save_file_exists(0) == TRUE) { - sMainMenuButtons[MENU_BUTTON_PLAY_FILE_A] = - spawn_object_rel_with_rot(gCurrentObject, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON_FADE, - bhvMenuButton, -6400, 2800, 0, 0, 0, 0); - } else { - sMainMenuButtons[MENU_BUTTON_PLAY_FILE_A] = - spawn_object_rel_with_rot(gCurrentObject, 10, bhvMenuButton, -6400, 2800, 0, 0, 0, 0); - } - sMainMenuButtons[MENU_BUTTON_PLAY_FILE_A]->oMenuButtonScale = 1.0f; - // File B - if (save_file_exists(1) == TRUE) { - sMainMenuButtons[MENU_BUTTON_PLAY_FILE_B] = - spawn_object_rel_with_rot(gCurrentObject, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON_FADE, - bhvMenuButton, 1500, 2800, 0, 0, 0, 0); - } else { - sMainMenuButtons[MENU_BUTTON_PLAY_FILE_B] = - spawn_object_rel_with_rot(gCurrentObject, MODEL_MAIN_MENU_MARIO_NEW_BUTTON_FADE, - bhvMenuButton, 1500, 2800, 0, 0, 0, 0); - } - sMainMenuButtons[MENU_BUTTON_PLAY_FILE_B]->oMenuButtonScale = 1.0f; - // File C - if (save_file_exists(2) == TRUE) { - sMainMenuButtons[MENU_BUTTON_PLAY_FILE_C] = - spawn_object_rel_with_rot(gCurrentObject, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON_FADE, - bhvMenuButton, -6400, 0, 0, 0, 0, 0); - } else { - sMainMenuButtons[MENU_BUTTON_PLAY_FILE_C] = spawn_object_rel_with_rot( - gCurrentObject, MODEL_MAIN_MENU_MARIO_NEW_BUTTON_FADE, bhvMenuButton, -6400, 0, 0, 0, 0, 0); - } - sMainMenuButtons[MENU_BUTTON_PLAY_FILE_C]->oMenuButtonScale = 1.0f; - // File D - if (save_file_exists(3) == TRUE) { - sMainMenuButtons[MENU_BUTTON_PLAY_FILE_D] = spawn_object_rel_with_rot( - gCurrentObject, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON_FADE, bhvMenuButton, 1500, 0, 0, 0, 0, 0); - } else { - sMainMenuButtons[MENU_BUTTON_PLAY_FILE_D] = spawn_object_rel_with_rot( - gCurrentObject, MODEL_MAIN_MENU_MARIO_NEW_BUTTON_FADE, bhvMenuButton, 1500, 0, 0, 0, 0, 0); - } - sMainMenuButtons[MENU_BUTTON_PLAY_FILE_D]->oMenuButtonScale = 1.0f; - // Score menu button - sMainMenuButtons[MENU_BUTTON_SCORE] = spawn_object_rel_with_rot( - gCurrentObject, MODEL_MAIN_MENU_GREEN_SCORE_BUTTON, bhvMenuButton, -6400, -3500, 0, 0, 0, 0); - sMainMenuButtons[MENU_BUTTON_SCORE]->oMenuButtonScale = 1.0f; - // Copy menu button - sMainMenuButtons[MENU_BUTTON_COPY] = spawn_object_rel_with_rot( - gCurrentObject, MODEL_MAIN_MENU_BLUE_COPY_BUTTON, bhvMenuButton, -2134, -3500, 0, 0, 0, 0); - sMainMenuButtons[MENU_BUTTON_COPY]->oMenuButtonScale = 1.0f; - // Erase menu button - sMainMenuButtons[MENU_BUTTON_ERASE] = spawn_object_rel_with_rot( - gCurrentObject, MODEL_MAIN_MENU_RED_ERASE_BUTTON, bhvMenuButton, 2134, -3500, 0, 0, 0, 0); - sMainMenuButtons[MENU_BUTTON_ERASE]->oMenuButtonScale = 1.0f; - // Sound mode menu button - sMainMenuButtons[MENU_BUTTON_SOUND_MODE] = spawn_object_rel_with_rot( - gCurrentObject, MODEL_MAIN_MENU_PURPLE_SOUND_BUTTON, bhvMenuButton, 6400, -3500, 0, 0, 0, 0); - sMainMenuButtons[MENU_BUTTON_SOUND_MODE]->oMenuButtonScale = 1.0f; - - sTextBaseAlpha = 0; -} - -#ifdef VERSION_JP -#define FILE_SELECT_SOUND SOUND_MENU_STARSOUND -#else -#define FILE_SELECT_SOUND SOUND_MENU_STARSOUNDOKEYDOKEY -#endif - -static void main_menu_check_clicked_buttons(void) { - // Sound mode menu is handled separately because the ID for the sound mode menu button not grouped - // with the IDs of the other submenus. - if (button_clicked_test(sMainMenuButtons[MENU_BUTTON_SOUND_MODE]->oPosX, - sMainMenuButtons[MENU_BUTTON_SOUND_MODE]->oPosY, 200.0f) - == TRUE) { - sMainMenuButtons[MENU_BUTTON_SOUND_MODE]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; - sSelectedButtonID = MENU_BUTTON_SOUND_MODE; - } else { - s8 buttonId; - - for (buttonId = 0; buttonId < 7; buttonId++) { - s16 buttonX = sMainMenuButtons[buttonId]->oPosX; - s16 buttonY = sMainMenuButtons[buttonId]->oPosY; - - if (button_clicked_test(buttonX, buttonY, 200.0f) == TRUE) { - sMainMenuButtons[buttonId]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; - sSelectedButtonID = buttonId; - break; - } - } - } - - switch (sSelectedButtonID) { - case MENU_BUTTON_PLAY_FILE_A: - play_sound(FILE_SELECT_SOUND, gDefaultSoundArgs); - break; - case MENU_BUTTON_PLAY_FILE_B: - play_sound(FILE_SELECT_SOUND, gDefaultSoundArgs); - break; - case MENU_BUTTON_PLAY_FILE_C: - play_sound(FILE_SELECT_SOUND, gDefaultSoundArgs); - break; - case MENU_BUTTON_PLAY_FILE_D: - play_sound(FILE_SELECT_SOUND, gDefaultSoundArgs); - break; - case MENU_BUTTON_SCORE: - play_sound(SOUND_MENU_CAMERAZOOMIN, gDefaultSoundArgs); - score_menu_create_buttons(sMainMenuButtons[MENU_BUTTON_SCORE]); - break; - case MENU_BUTTON_COPY: - play_sound(SOUND_MENU_CAMERAZOOMIN, gDefaultSoundArgs); - copy_menu_create_buttons(sMainMenuButtons[MENU_BUTTON_COPY]); - break; - case MENU_BUTTON_ERASE: - play_sound(SOUND_MENU_CAMERAZOOMIN, gDefaultSoundArgs); - erase_menu_create_buttons(sMainMenuButtons[MENU_BUTTON_ERASE]); - break; - case MENU_BUTTON_SOUND_MODE: - play_sound(SOUND_MENU_CAMERAZOOMIN, gDefaultSoundArgs); - sound_mode_menu_create_buttons(sMainMenuButtons[MENU_BUTTON_SOUND_MODE]); - break; - } - -#undef FILE_SELECT_SOUND -} - -void bhvMenuButtonManager_loop(void) { - switch (sSelectedButtonID) { - case MENU_BUTTON_NONE: - main_menu_check_clicked_buttons(); - break; - case MENU_BUTTON_PLAY_FILE_A: - main_menu_file_selected(sMainMenuButtons[MENU_BUTTON_PLAY_FILE_A], 1); - break; - case MENU_BUTTON_PLAY_FILE_B: - main_menu_file_selected(sMainMenuButtons[MENU_BUTTON_PLAY_FILE_B], 2); - break; - case MENU_BUTTON_PLAY_FILE_C: - main_menu_file_selected(sMainMenuButtons[MENU_BUTTON_PLAY_FILE_C], 3); - break; - case MENU_BUTTON_PLAY_FILE_D: - main_menu_file_selected(sMainMenuButtons[MENU_BUTTON_PLAY_FILE_D], 4); - break; - case MENU_BUTTON_SCORE: - score_menu_check_clicked_buttons(sMainMenuButtons[MENU_BUTTON_SCORE]); - break; - case MENU_BUTTON_COPY: - copy_menu_check_clicked_buttons(sMainMenuButtons[MENU_BUTTON_COPY]); - break; - case MENU_BUTTON_ERASE: - erase_menu_check_clicked_buttons(sMainMenuButtons[MENU_BUTTON_ERASE]); - break; - - case MENU_BUTTON_SCORE_FILE_A: - score_menu_file_exiting(sMainMenuButtons[MENU_BUTTON_SCORE_FILE_A], MENU_BUTTON_SCORE); - break; - case MENU_BUTTON_SCORE_FILE_B: - score_menu_file_exiting(sMainMenuButtons[MENU_BUTTON_SCORE_FILE_B], MENU_BUTTON_SCORE); - break; - case MENU_BUTTON_SCORE_FILE_C: - score_menu_file_exiting(sMainMenuButtons[MENU_BUTTON_SCORE_FILE_C], MENU_BUTTON_SCORE); - break; - case MENU_BUTTON_SCORE_FILE_D: - score_menu_file_exiting(sMainMenuButtons[MENU_BUTTON_SCORE_FILE_D], MENU_BUTTON_SCORE); - break; - case MENU_BUTTON_SCORE_RETURN: - return_to_main_menu(MENU_BUTTON_SCORE, sMainMenuButtons[MENU_BUTTON_SCORE_RETURN]); - break; - case MENU_BUTTON_SCORE_COPY_FILE: - copy_menu_init_from_submenu(MENU_BUTTON_SCORE, - sMainMenuButtons[MENU_BUTTON_SCORE_COPY_FILE]); - break; - case MENU_BUTTON_SCORE_ERASE_FILE: - erase_menu_init_from_submenu(MENU_BUTTON_SCORE, - sMainMenuButtons[MENU_BUTTON_SCORE_ERASE_FILE]); - break; - - case MENU_BUTTON_COPY_FILE_A: - break; - case MENU_BUTTON_COPY_FILE_B: - break; - case MENU_BUTTON_COPY_FILE_C: - break; - case MENU_BUTTON_COPY_FILE_D: - break; - case MENU_BUTTON_COPY_RETURN: - return_to_main_menu(MENU_BUTTON_COPY, sMainMenuButtons[MENU_BUTTON_COPY_RETURN]); - break; - case MENU_BUTTON_COPY_CHECK_SCORE: - score_menu_init_from_submenu(MENU_BUTTON_COPY, - sMainMenuButtons[MENU_BUTTON_COPY_CHECK_SCORE]); - break; - case MENU_BUTTON_COPY_ERASE_FILE: - erase_menu_init_from_submenu(MENU_BUTTON_COPY, - sMainMenuButtons[MENU_BUTTON_COPY_ERASE_FILE]); - break; - - case MENU_BUTTON_ERASE_FILE_A: - break; - case MENU_BUTTON_ERASE_FILE_B: - break; - case MENU_BUTTON_ERASE_FILE_C: - break; - case MENU_BUTTON_ERASE_FILE_D: - break; - case MENU_BUTTON_ERASE_RETURN: - return_to_main_menu(MENU_BUTTON_ERASE, sMainMenuButtons[MENU_BUTTON_ERASE_RETURN]); - break; - case MENU_BUTTON_ERASE_CHECK_SCORE: - score_menu_init_from_submenu(MENU_BUTTON_ERASE, - sMainMenuButtons[MENU_BUTTON_ERASE_CHECK_SCORE]); - break; - case MENU_BUTTON_ERASE_COPY_FILE: - copy_menu_init_from_submenu(MENU_BUTTON_ERASE, - sMainMenuButtons[MENU_BUTTON_ERASE_COPY_FILE]); - break; - - case MENU_BUTTON_SOUND_MODE: - sound_mode_menu_check_clicked_buttons(sMainMenuButtons[MENU_BUTTON_SOUND_MODE]); - break; - case MENU_BUTTON_STEREO: - return_to_main_menu(MENU_BUTTON_SOUND_MODE, sMainMenuButtons[MENU_BUTTON_STEREO]); - break; - case MENU_BUTTON_MONO: - return_to_main_menu(MENU_BUTTON_SOUND_MODE, sMainMenuButtons[MENU_BUTTON_MONO]); - break; - case MENU_BUTTON_HEADSET: - return_to_main_menu(MENU_BUTTON_SOUND_MODE, sMainMenuButtons[MENU_BUTTON_HEADSET]); - break; - } - - sClickPos[0] = -10000; - sClickPos[1] = -10000; -} - -static void handle_button_presses(void) { - // If scoring a file, pressing A just changes the coin score mode. - if (sSelectedButtonID == MENU_BUTTON_SCORE_FILE_A || sSelectedButtonID == MENU_BUTTON_SCORE_FILE_B - || sSelectedButtonID == MENU_BUTTON_SCORE_FILE_C - || sSelectedButtonID == MENU_BUTTON_SCORE_FILE_D) { - if (gPlayer3Controller->buttonPressed & (B_BUTTON | START_BUTTON)) { - sClickPos[0] = sCursorPos[0]; - sClickPos[1] = sCursorPos[1]; - sCursorClickingTimer = 1; - } else if (gPlayer3Controller->buttonPressed & A_BUTTON) { - sScoreFileCoinScoreMode = 1 - sScoreFileCoinScoreMode; - play_sound(SOUND_MENU_CLICKFILESELECT, gDefaultSoundArgs); - } - } else { - if (gPlayer3Controller->buttonPressed & (A_BUTTON | B_BUTTON | START_BUTTON)) { - sClickPos[0] = sCursorPos[0]; - sClickPos[1] = sCursorPos[1]; - sCursorClickingTimer = 1; - } - } -} - -static void handle_controller_input(void) { - s16 rawStickX = gPlayer3Controller->rawStickX; - s16 rawStickY = gPlayer3Controller->rawStickY; - - // Handle deadzone - if (rawStickY > -2 && rawStickY < 2) { - rawStickY = 0; - } - if (rawStickX > -2 && rawStickX < 2) { - rawStickX = 0; - } - - // Move cursor - sCursorPos[0] += rawStickX / 8; - sCursorPos[1] += rawStickY / 8; - - // Stop cursor from going offscreen - if (sCursorPos[0] > 132.0f) { - sCursorPos[0] = 132.0f; - } - if (sCursorPos[0] < -132.0f) { - sCursorPos[0] = -132.0f; - } - - if (sCursorPos[1] > 90.0f) { - sCursorPos[1] = 90.0f; - } - if (sCursorPos[1] < -90.0f) { - sCursorPos[1] = -90.0f; - } - - if (sCursorClickingTimer == 0) { - handle_button_presses(); - } -} - -static void draw_cursor(void) { - handle_controller_input(); - dl_add_new_translation_matrix(1, sCursorPos[0] + 160.0f - 5.0, sCursorPos[1] + 120.0f - 25.0, 0.0f); - // Get the right graphic to use for the cursor. - if (sCursorClickingTimer == 0) - // Idle - gSPDisplayList(gDisplayListHead++, main_menu_seg7_dl_070073A0); - if (sCursorClickingTimer != 0) - // Grabbing - gSPDisplayList(gDisplayListHead++, main_menu_seg7_dl_070073B8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - if (sCursorClickingTimer != 0) { - sCursorClickingTimer++; // This is a very strange way to implement a timer? It counts up and - // then resets to 0 instead of just counting down to 0. - if (sCursorClickingTimer == 5) { - sCursorClickingTimer = 0; - } - } -} -// Print colorful text -static void menu_print_title_text(s8 type, s16 x, s16 y, const unsigned char *text) { - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha - sTextTransparency); - PutString(type, x, y, text); - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); -} -// Print normal white text -static void menu_print_generic_text(s16 x, s16 y, const unsigned char *text) { - gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha - sTextTransparency); - PrintGenericText(x, y, text); - gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); -} - -static s32 update_text_fade_out(void) { - if (sFadeOutText == 1) { - sTextTransparency += 50; - if (sTextTransparency == 250) { - sFadeOutText = 0; - return TRUE; - } - } else { - if (sTextTransparency > 0) { - sTextTransparency -= 50; - } - } - return FALSE; -} - -static void display_file_star_count(s8 fileNum, s16 x, s16 y) { - u8 starCountText[4]; - s8 offset = 0; - s16 starCount; - - if (save_file_exists(fileNum) == TRUE) { - starCount = save_file_get_total_star_count(fileNum, 0, 24); - // Display star icon - PutString(2, x, y, starIcon); - // If star count is over 100, display x icon and move the star count text one digit to the - // right. - if (starCount < 100) { - PutString(2, x + 16, y, xIcon); - offset = 16; - } - // Display star count - Int2Str(starCount, starCountText); - PutString(2, x + offset + 16, y, starCountText); - } else { - // Display "new" text - PutString(2, x, y, textNew); - } -} - -static void draw_main_menu(void) { - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); - // Display "SELECT FILE" text -#ifdef VERSION_JP - PutString(1, 96, 35, textSelectFile); -#else - PutString(2, 93, 35, textSelectFile); -#endif - // Display file star counts - display_file_star_count(0, 92, 78); - display_file_star_count(1, 209, 78); - display_file_star_count(2, 92, 118); - display_file_star_count(3, 209, 118); - // Display menu names - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); - gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); -#ifdef VERSION_JP - PrintGenericText(50, 39, textScore); - PrintGenericText(115, 39, textCopy); - PrintGenericText(180, 39, textErase); - PrintGenericText(235, 39, textSoundModes[sSoundMode]); -#else - PrintGenericText(52, 39, textScore); - PrintGenericText(117, 39, textCopy); - PrintGenericText(177, 39, textErase); - sSoundTextX = get_str_x_pos_from_center(254, textSoundModes[sSoundMode], 10.0f); - PrintGenericText(sSoundTextX, 39, textSoundModes[sSoundMode]); -#endif - // Display file names - gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); - gSPDisplayList(gDisplayListHead++, main_menu_seg7_dl_0700D108); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); - PrintRegularText(92, 65, textMarioA); - PrintRegularText(207, 65, textMarioB); - PrintRegularText(92, 105, textMarioC); - PrintRegularText(207, 105, textMarioD); - gSPDisplayList(gDisplayListHead++, main_menu_seg7_dl_0700D160); -} - -static void score_menu_display_message(s8 messageID) { - switch (messageID) { -#ifdef VERSION_JP - case 0: - menu_print_title_text(1, 90, 35, textCheckFile); - break; - case 1: - menu_print_generic_text(90, 190, textNoSavedDataExists); - break; -#else - case 0: - menu_print_title_text(2, 95, 35, textCheckFile); - break; - case 1: - menu_print_generic_text(99, 190, textNoSavedDataExists); - break; -#endif - } -} - -static void draw_score_menu(void) { - // Update and display the message at the top of the menu. - if (sMainMenuTimer == 20) { - sFadeOutText = 1; - } - if (update_text_fade_out() == TRUE) { - if (sStatusMessageId == 0) { - sStatusMessageId = 1; - } else { - sStatusMessageId = 0; - } - } - score_menu_display_message(sStatusMessageId); - // Display file star counts - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); - display_file_star_count(0, 90, 76); - display_file_star_count(1, 211, 76); - display_file_star_count(2, 90, 119); - display_file_star_count(3, 211, 119); - // Display menu names - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); - gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); -#ifdef VERSION_JP - PrintGenericText(45, 35, textReturn); - PrintGenericText(128, 35, textCopyFileButton); - PrintGenericText(228, 35, textEraseFileButton); -#else - PrintGenericText(44, 35, textReturn); - PrintGenericText(135, 35, textCopyFileButton); - PrintGenericText(231, 35, textEraseFileButton); -#endif - // Display file names - gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); - gSPDisplayList(gDisplayListHead++, main_menu_seg7_dl_0700D108); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); - PrintRegularText(89, 62, textMarioA); - PrintRegularText(211, 62, textMarioB); - PrintRegularText(89, 105, textMarioC); - PrintRegularText(211, 105, textMarioD); - gSPDisplayList(gDisplayListHead++, main_menu_seg7_dl_0700D160); -} - -static void copy_menu_display_message(s8 messageId) { - switch (messageId) { -#ifdef VERSION_JP - case 0: - if (sAllFilesExist == TRUE) { - menu_print_generic_text(90, 190, textNoFileToCopyFrom); - } else { - menu_print_title_text(1, 90, 35, textCopyFile); - } - break; - case 1: - menu_print_generic_text(90, 190, textCopyItToWhere); - break; - case 2: - menu_print_generic_text(90, 190, textNoSavedDataExists2); - break; - case 3: - menu_print_generic_text(90, 190, textCopyFinished); - break; - case 4: - menu_print_generic_text(90, 190, textSavedDataExists); - break; -#else - case 0: - if (sAllFilesExist == TRUE) { - menu_print_generic_text(119, 190, textNoFileToCopyFrom); - } else { - menu_print_title_text(2, 104, 35, textCopyFile); - } - break; - case 1: - menu_print_generic_text(109, 190, textCopyItToWhere); - break; - case 2: - menu_print_generic_text(101, 190, textNoSavedDataExists2); - break; - case 3: - menu_print_generic_text(110, 190, textCopyFinished); - break; - case 4: - menu_print_generic_text(110, 190, textSavedDataExists); - break; -#endif - } -} - -static void copy_menu_update_message(void) { - switch (sMainMenuButtons[MENU_BUTTON_COPY]->oMenuButtonActionPhase) { - case 0: - if (sMainMenuTimer == 20) { - sFadeOutText = 1; - } - if (update_text_fade_out() == TRUE) { - if (sStatusMessageId == 0) { - sStatusMessageId = 2; - } else { - sStatusMessageId = 0; - } - } - break; - case 1: - if (sMainMenuTimer == 20 && sStatusMessageId == 4) { - sFadeOutText = 1; - } - if (update_text_fade_out() == TRUE) { - if (sStatusMessageId != 1) { - sStatusMessageId = 1; - } else { - sStatusMessageId = 4; - } - } - break; - case 2: - if (sMainMenuTimer == 20) { - sFadeOutText = 1; - } - if (update_text_fade_out() == TRUE) { - if (sStatusMessageId != 3) { - sStatusMessageId = 3; - } else { - sStatusMessageId = 0; - } - } - break; - } -} - -static void draw_copy_menu(void) { - // Update and display the message at the top of the menu. - copy_menu_update_message(); - copy_menu_display_message(sStatusMessageId); - // Display file star counts - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); - display_file_star_count(0, 90, 76); - display_file_star_count(1, 211, 76); - display_file_star_count(2, 90, 119); - display_file_star_count(3, 211, 119); - // Display menu names - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); - gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); -#ifdef VERSION_JP - PrintGenericText(45, 35, textReturn); - PrintGenericText(133, 35, textViewScore); - PrintGenericText(220, 35, textEraseFileButton); -#else - PrintGenericText(44, 35, textReturn); - PrintGenericText(128, 35, textViewScore); - PrintGenericText(230, 35, textEraseFileButton); -#endif - // Display file names - gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); - gSPDisplayList(gDisplayListHead++, main_menu_seg7_dl_0700D108); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); - PrintRegularText(89, 62, textMarioA); - PrintRegularText(211, 62, textMarioB); - PrintRegularText(89, 105, textMarioC); - PrintRegularText(211, 105, textMarioD); - gSPDisplayList(gDisplayListHead++, main_menu_seg7_dl_0700D160); -} - -#ifdef VERSION_JP -#define TIMER_VAR1 0xA4 -#define TIMER_VAR2 0x91 -#else -#define TIMER_VAR1 0xA9 -#define TIMER_VAR2 0x8C -#endif - -static void erase_menu_yes_no_prompt(s16 x, s16 y) { - s16 sp2E = gGlobalTimer << 12; -#ifdef VERSION_JP - s16 sp2C = sCursorPos[0] + 160.0f; -#else - s16 sp2C = sCursorPos[0] + (x + 0x46); -#endif - s16 sp2A = sCursorPos[1] + 120.0f; - - if (sp2C < TIMER_VAR1 && sp2C >= TIMER_VAR2 && sp2A < 0xD2 && sp2A >= 0xBF) { - sYesNoColor[0] = sins(sp2E) * 50.0f + 205.0f; - sYesNoColor[1] = 150; - D_801A7C04 = 1; - } else if (sp2C < 0xDA && sp2C >= 0xBD && sp2A < 0xD2 && sp2A >= 0xBF) { - sYesNoColor[0] = 150; - sYesNoColor[1] = sins(sp2E) * 50.0f + 205.0f; - D_801A7C04 = 2; - } else { - sYesNoColor[0] = 150; - sYesNoColor[1] = 150; - D_801A7C04 = 0; - } - if (sCursorClickingTimer == 2) { - if (D_801A7C04 == 1) { - play_sound(SOUND_MARIO_WAAAOOOW, gDefaultSoundArgs); - sMainMenuButtons[MENU_BUTTON_ERASE]->oMenuButtonActionPhase = 2; - sFadeOutText = 1; - sMainMenuTimer = 0; - save_file_erase(sSelectedFile); - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_A + sSelectedFile]->header.gfx.sharedChild = - gLoadedGraphNodes[MODEL_MAIN_MENU_MARIO_NEW_BUTTON_FADE]; - sMainMenuButtons[sSelectedFile]->header.gfx.sharedChild = - gLoadedGraphNodes[MODEL_MAIN_MENU_MARIO_NEW_BUTTON_FADE]; - D_801A7C04 = 0; - } else if (D_801A7C04 == 2) { - play_sound(SOUND_MENU_CLICKFILESELECT, gDefaultSoundArgs); - sMainMenuButtons[MENU_BUTTON_ERASE_FILE_A + sSelectedFile]->oMenuButtonState = - MENU_BUTTON_STATE_ZOOM_OUT; - sMainMenuButtons[MENU_BUTTON_ERASE]->oMenuButtonActionPhase = 0; - sFadeOutText = 1; - sMainMenuTimer = 0; - D_801A7C04 = 0; - } - } - gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - gDPSetEnvColor(gDisplayListHead++, sYesNoColor[0], sYesNoColor[0], sYesNoColor[0], sTextBaseAlpha); - PrintGenericText(x + 56, y, textYes); - gDPSetEnvColor(gDisplayListHead++, sYesNoColor[1], sYesNoColor[1], sYesNoColor[1], sTextBaseAlpha); - PrintGenericText(x + 98, y, textNo); - gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); -} - -#undef TIMER_VAR1 -#undef TIMER_VAR2 - -static void erase_menu_display_message(s8 messageId) { - unsigned char textEraseFile[] = { TEXT_ERASE_FILE }; - unsigned char textSure[] = { TEXT_SURE }; - unsigned char textNoSavedDataExists[] = { TEXT_NO_SAVED_DATA_EXISTS }; - unsigned char textMarioAJustErased[] = { TEXT_FILE_MARIO_A_JUST_ERASED }; - unsigned char textSavedDataExists[] = { TEXT_SAVED_DATA_EXISTS }; - - switch (messageId) { -#ifdef VERSION_JP - case 0: - menu_print_title_text(1, 96, 35, textEraseFile); - break; - case 1: - menu_print_generic_text(90, 190, textSure); - erase_menu_yes_no_prompt(90, 190); - break; - case 2: - menu_print_generic_text(90, 190, textNoSavedDataExists); - break; - case 3: - textMarioAJustErased[3] = sSelectedFile + 10; - menu_print_generic_text(90, 190, textMarioAJustErased); - break; - case 4: - menu_print_generic_text(90, 190, textSavedDataExists); - break; - } -#else - case 0: - menu_print_title_text(2, 98, 35, textEraseFile); - break; - case 1: - menu_print_generic_text(90, 190, textSure); - erase_menu_yes_no_prompt(90, 190); - break; - case 2: - menu_print_generic_text(100, 190, textNoSavedDataExists); - break; - case 3: - textMarioAJustErased[6] = sSelectedFile + 10; - menu_print_generic_text(100, 190, textMarioAJustErased); - break; - case 4: - menu_print_generic_text(100, 190, textSavedDataExists); - break; - } -#endif -} - -static void erase_menu_update_message(void) { - switch (sMainMenuButtons[MENU_BUTTON_ERASE]->oMenuButtonActionPhase) { - case 0: - if (sMainMenuTimer == 20 && sStatusMessageId == 2) { - sFadeOutText = 1; - } - if (update_text_fade_out() == TRUE) { - if (sStatusMessageId == 0) { - sStatusMessageId = 2; - } else { - sStatusMessageId = 0; - } - } - break; - case 1: - if (update_text_fade_out() == TRUE) { - if (sStatusMessageId != 1) { - sStatusMessageId = 1; - } - sCursorPos[0] = 43.0f; - sCursorPos[1] = 80.0f; - } - break; - case 2: - if (sMainMenuTimer == 20) { - sFadeOutText = 1; - } - if (update_text_fade_out() == TRUE) { - if (sStatusMessageId != 3) { - sStatusMessageId = 3; - } else { - sStatusMessageId = 0; - } - } - break; - } -} - -static void draw_erase_menu(void) { - // Update and display the message at the top of the menu. - erase_menu_update_message(); - erase_menu_display_message(sStatusMessageId); - // Display file star counts - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); - display_file_star_count(0, 90, 76); - display_file_star_count(1, 211, 76); - display_file_star_count(2, 90, 119); - display_file_star_count(3, 211, 119); - // Display menu names - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); - gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); -#ifdef VERSION_JP - PrintGenericText(45, 35, textReturn); - PrintGenericText(133, 35, textViewScore); - PrintGenericText(223, 35, textCopyFileButton); -#else - PrintGenericText(44, 35, textReturn); - PrintGenericText(127, 35, textViewScore); - PrintGenericText(233, 35, textCopyFileButton); -#endif - // Display file names - gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); - gSPDisplayList(gDisplayListHead++, main_menu_seg7_dl_0700D108); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); - PrintRegularText(89, 62, textMarioA); - PrintRegularText(211, 62, textMarioB); - PrintRegularText(89, 105, textMarioC); - PrintRegularText(211, 105, textMarioD); - gSPDisplayList(gDisplayListHead++, main_menu_seg7_dl_0700D160); -} - -static void draw_sound_mode_menu(void) { - s32 mode; -#ifndef VERSION_JP - s16 textX; -#endif - unsigned char textSoundSelect[] = { TEXT_SOUND_SELECT }; - // Display "SOUND SELECT" text - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); -#ifdef VERSION_JP - PutString(1, 96, 35, textSoundSelect); -#else - PutString(2, 88, 35, textSoundSelect); -#endif - // Display mode names - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); - gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - for (mode = 0; mode < 3; mode++) { - if (mode == sSoundMode) { - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); - } else { - gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, sTextBaseAlpha); - } -#ifdef VERSION_JP - PrintGenericText(mode * 74 + 67, 87, textSoundModes[mode]); -#else - // Mode names are centered correctly on US - textX = get_str_x_pos_from_center(mode * 74 + 87, textSoundModes[mode], 10.0f); - PrintGenericText(textX, 87, textSoundModes[mode]); -#endif - } - gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); -} - -static unsigned char textStarX[] = { TEXT_STAR_X }; - -static void score_file_print_castle_secret_stars(s8 fileNum, s16 x, s16 y) { - unsigned char secretStarsText[20]; - // Print "[star] x" - PrintRegularText(x, y, textStarX); - // Print number of castle secret stars - Int2Str(save_file_get_total_star_count(fileNum, 15, 24), secretStarsText); - PrintRegularText(x + 16, y, secretStarsText); -} - -static void score_file_print_course_coin_score(s8 fileNum, s16 courseNum, s16 x, s16 y) { - unsigned char coinScoreText[20]; - u8 stars = save_file_get_star_flags(fileNum, courseNum); - unsigned char textCoinX[] = { TEXT_COIN_X }; - unsigned char textStar[] = { TEXT_STAR }; -#ifdef VERSION_JP -#define LENGTH 5 -#else -#define LENGTH 8 -#endif - unsigned char fileNames[][LENGTH] = { - { TEXT_4DASHES }, // huh? - { TEXT_SCORE_MARIO_A }, { TEXT_SCORE_MARIO_B }, { TEXT_SCORE_MARIO_C }, { TEXT_SCORE_MARIO_D }, - }; -#undef LENGTH - // MYSCORE - if (sScoreFileCoinScoreMode == 0) { - // Print "[coin] x" - PrintRegularText(x + 25, y, textCoinX); - // Print coin score - Int2Str(save_file_get_course_coin_score(fileNum, courseNum), coinScoreText); - PrintRegularText(x + 41, y, coinScoreText); - // If collected, print 100 coin star - if (stars & (1 << 6)) { - PrintRegularText(x + 70, y, textStar); - } - } - // HISCORE - else { -#ifdef VERSION_JP - // Print "[coin] x" - PrintRegularText(x, y, textCoinX); - // Print coin highscore - Int2Str((u16) save_file_get_max_coin_score(courseNum) & 0xFFFF, coinScoreText); - PrintRegularText(x + 16, y, coinScoreText); - // Print coin highscore file - PrintRegularText(x + 45, y, - fileNames[(save_file_get_max_coin_score(courseNum) >> 16) & 0xFFFF]); -#else - // Print "[coin] x" - PrintRegularText(x + 18, y, textCoinX); - // Print coin highscore - Int2Str((u16) save_file_get_max_coin_score(courseNum) & 0xFFFF, coinScoreText); - PrintRegularText(x + 34, y, coinScoreText); - // Print coin highscore file - PrintRegularText(x + 60, y, - fileNames[(save_file_get_max_coin_score(courseNum) >> 16) & 0xFFFF]); -#endif - } -} - -static void score_file_print_course_star_score(s8 fileNum, s16 courseNum, s16 x, s16 y) { - s16 i = 0; - unsigned char starScoreText[20]; // unknown length - u8 stars = save_file_get_star_flags(fileNum, courseNum); - s8 starCount = save_file_get_course_star_count(fileNum, courseNum); - // Don't count 100 coin star - if (stars & (1 << 6)) { - starCount--; - } - // Add 1 star character for every star collected - for (i = 0; i < starCount; i++) { - starScoreText[i] = 0xFA; - } - // Terminating byte - starScoreText[i] = 0xFF; - PrintRegularText(x, y, starScoreText); -} - -static void draw_file_scores(s8 fileNum) { -// TODO: EU relocates level name table to translation segment 0x19 -#ifndef VERSION_EU - unsigned char textMario[] = { TEXT_MARIO }; -#ifdef VERSION_JP - unsigned char textFileLetter[] = { TEXT_0 }; - void **levelNameTable = segmented_to_virtual(seg2_level_name_table); - unsigned char textHiScore[] = { TEXT_HI_SCORE }; - unsigned char textMyScore[] = { TEXT_MY_SCORE }; -#else - unsigned char textHiScore[] = { TEXT_HI_SCORE_EN }; - unsigned char textMyScore[] = { TEXT_MY_SCORE }; - unsigned char textFileLetter[] = { TEXT_0 }; - void **levelNameTable = segmented_to_virtual(seg2_level_name_table); -#endif - - textFileLetter[0] = fileNum + 0x0A; // get letter of file - // Print file name at top - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); -#ifdef VERSION_JP - PutString(1, 28, 15, textMario); - PutString(2, 86, 15, textFileLetter); -#else - PutString(2, 25, 15, textMario); - PutString(2, 95, 15, textFileLetter); -#endif - // Print file star count at top - display_file_star_count(fileNum, 124, 15); - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); - gSPDisplayList(gDisplayListHead++, main_menu_seg7_dl_0700D108); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); - - //! Print course scores (for loops exist for a reason!) - -#ifdef VERSION_JP -#define PADDING 0 -#define PRINT_COURSE_SCORES(course, pad) \ - PrintRegularText(23 + (pad * 3), 35 + 12 * course, segmented_to_virtual(levelNameTable[course])); \ - score_file_print_course_star_score(fileNum, course, 152, 35 + 12 * course); \ - score_file_print_course_coin_score(fileNum, course, 213, 35 + 12 * course); -#else -#define PADDING 1 -#define PRINT_COURSE_SCORES(course, pad) \ - PrintRegularText(23 + (pad * 3), 35 + 12 * course, segmented_to_virtual(levelNameTable[course])); \ - score_file_print_course_star_score(fileNum, course, 171, 35 + 12 * course); \ - score_file_print_course_coin_score(fileNum, course, 213, 35 + 12 * course); -#endif - - PRINT_COURSE_SCORES(0, PADDING) - PRINT_COURSE_SCORES(1, PADDING) - PRINT_COURSE_SCORES(2, PADDING) - PRINT_COURSE_SCORES(3, PADDING) - PRINT_COURSE_SCORES(4, PADDING) - PRINT_COURSE_SCORES(5, PADDING) - PRINT_COURSE_SCORES(6, PADDING) - PRINT_COURSE_SCORES(7, PADDING) - PRINT_COURSE_SCORES(8, PADDING) - PRINT_COURSE_SCORES(9, 0) - PRINT_COURSE_SCORES(10, 0) - PRINT_COURSE_SCORES(11, 0) - PRINT_COURSE_SCORES(12, 0) - PRINT_COURSE_SCORES(13, 0) - PRINT_COURSE_SCORES(14, 0) - -#undef PRINT_COURSE_SCORES -#undef PADDING - -#ifdef VERSION_JP - // Print level name - PrintRegularText(23, 215, segmented_to_virtual(levelNameTable[25])); - // Print castle secret stars - score_file_print_castle_secret_stars(fileNum, 152, 215); - // Print current coin score mode - if (sScoreFileCoinScoreMode == 0) { - PrintRegularText(237, 24, textMyScore); - } else { - PrintRegularText(237, 24, textHiScore); - } -#else - // Print level name - PrintRegularText(29, 215, segmented_to_virtual(levelNameTable[25])); - // Print castle secret stars - score_file_print_castle_secret_stars(fileNum, 171, 215); - // Print current coin score mode - if (sScoreFileCoinScoreMode == 0) { - PrintRegularText(238, 24, textMyScore); - } else { - PrintRegularText(231, 24, textHiScore); - } -#endif - - gSPDisplayList(gDisplayListHead++, main_menu_seg7_dl_0700D160); -#endif // !VERSION_EU -} - -static void draw_current_menu(void) { - UNUSED s32 unused1; - UNUSED s32 unused2; - - dl_add_new_ortho_matrix(); - switch (sSelectedButtonID) { - case MENU_BUTTON_NONE: - draw_main_menu(); - break; - case MENU_BUTTON_SCORE: - draw_score_menu(); - sScoreFileCoinScoreMode = 0; - break; - case MENU_BUTTON_COPY: - draw_copy_menu(); - break; - case MENU_BUTTON_ERASE: - draw_erase_menu(); - break; - case MENU_BUTTON_SCORE_FILE_A: - draw_file_scores(0); - break; - case MENU_BUTTON_SCORE_FILE_B: - draw_file_scores(1); - break; - case MENU_BUTTON_SCORE_FILE_C: - draw_file_scores(2); - break; - case MENU_BUTTON_SCORE_FILE_D: - draw_file_scores(3); - break; - case MENU_BUTTON_SOUND_MODE: - draw_sound_mode_menu(); - break; - } - if (save_file_exists(0) == TRUE && save_file_exists(1) == TRUE && save_file_exists(2) == TRUE - && save_file_exists(3) == TRUE) { - sAllFilesExist = TRUE; - } else { - sAllFilesExist = FALSE; - } - if (sTextBaseAlpha < 250) { - sTextBaseAlpha += 10; - } - if (sMainMenuTimer < 1000) { - sMainMenuTimer += 1; - } -} - -Gfx *Geo18_80176688(s32 run, UNUSED struct GraphNode *node, UNUSED f32 mtx[4][4]) { - if (run == TRUE) { - draw_current_menu(); - draw_cursor(); - } - return NULL; -} -// Returning to file select screen after game overing -void LevelProc_801766DC(UNUSED s32 a, UNUSED s32 b) { - sSelectedButtonID = MENU_BUTTON_NONE; - sCurrentMenuLevel = MENU_LAYER_MAIN; - sTextBaseAlpha = 0; - // Place the cursor over the save file that was being played. - switch (gCurrSaveFileNum) { - case 1: - sCursorPos[0] = -94.0f; - sCursorPos[1] = 46.0f; - break; - case 2: - sCursorPos[0] = 24.0f; - sCursorPos[1] = 46.0f; - break; - case 3: - sCursorPos[0] = -94.0f; - sCursorPos[1] = 5.0f; - break; - case 4: - sCursorPos[0] = 24.0f; - sCursorPos[1] = 5.0f; - break; - } - sClickPos[0] = -10000; - sClickPos[1] = -10000; - sCursorClickingTimer = 0; - D_801A7C0C = 0; - sSelectedFile = MENU_BUTTON_NONE; - sFadeOutText = 0; - sStatusMessageId = 0; - sTextTransparency = 0; - sMainMenuTimer = 0; - D_801A7C04 = 0; - sSoundMode = save_file_get_sound_mode(); -} - -int LevelProc_801768A0(UNUSED s32 a, UNUSED s32 b) { - area_update_objects(); - return D_801A7C0C; -} diff --git a/src/game/file_select.h b/src/game/file_select.h deleted file mode 100644 index 595e215..0000000 --- a/src/game/file_select.h +++ /dev/null @@ -1,86 +0,0 @@ -#ifndef _FILE_SELECT_H -#define _FILE_SELECT_H - -#include "types.h" - -#define MENU_LAYER_MAIN 1 -#define MENU_LAYER_SUBMENU 2 - -enum MainMenuButtonStates { - MENU_BUTTON_STATE_DEFAULT, - MENU_BUTTON_STATE_GROWING, - MENU_BUTTON_STATE_FULLSCREEN, - MENU_BUTTON_STATE_SHRINKING, - MENU_BUTTON_STATE_ZOOM_IN_OUT, - MENU_BUTTON_STATE_ZOOM_IN, - MENU_BUTTON_STATE_ZOOM_OUT -}; - -enum MenuButtonTypes { - MENU_BUTTON_NONE = -1, // no button selected (on main menu screen) - - // Main Menu (SELECT FILE) - MENU_BUTTON_PLAY_FILE_A, - MENU_BUTTON_PLAY_FILE_B, - MENU_BUTTON_PLAY_FILE_C, - MENU_BUTTON_PLAY_FILE_D, - MENU_BUTTON_SCORE, - MENU_BUTTON_COPY, - MENU_BUTTON_ERASE, - - // Score Menu (CHECK FILE) - MENU_BUTTON_SCORE_FILE_A, - MENU_BUTTON_SCORE_FILE_B, - MENU_BUTTON_SCORE_FILE_C, - MENU_BUTTON_SCORE_FILE_D, - MENU_BUTTON_SCORE_RETURN, - MENU_BUTTON_SCORE_COPY_FILE, - MENU_BUTTON_SCORE_ERASE_FILE, - - // Copy Menu (COPY FILE) - MENU_BUTTON_COPY_FILE_A, - MENU_BUTTON_COPY_FILE_B, - MENU_BUTTON_COPY_FILE_C, - MENU_BUTTON_COPY_FILE_D, - MENU_BUTTON_COPY_RETURN, - MENU_BUTTON_COPY_CHECK_SCORE, - MENU_BUTTON_COPY_ERASE_FILE, - - // Erase Menu (ERASE FILE) - MENU_BUTTON_ERASE_FILE_A, - MENU_BUTTON_ERASE_FILE_B, - MENU_BUTTON_ERASE_FILE_C, - MENU_BUTTON_ERASE_FILE_D, - MENU_BUTTON_ERASE_RETURN, - MENU_BUTTON_ERASE_CHECK_SCORE, - MENU_BUTTON_ERASE_COPY_FILE, - - // Sound Mode Menu (SOUND SELECT) - MENU_BUTTON_SOUND_MODE, - MENU_BUTTON_STEREO, - MENU_BUTTON_MONO, - MENU_BUTTON_HEADSET -}; - -extern Gfx main_menu_seg7_dl_070073A0[]; -extern Gfx main_menu_seg7_dl_070073B8[]; -extern Gfx dl_rgba16_text_begin[]; -extern Gfx dl_rgba16_text_end[]; -extern Gfx dl_ia8_text_begin[]; -extern Gfx dl_ia8_text_end[]; -extern Gfx main_menu_seg7_dl_0700D108[]; -extern Gfx main_menu_seg7_dl_0700D160[]; -extern u8 seg2_level_name_table[]; -extern u32 gGlobalTimer; - -extern void beh_yellow_background_menu_init(void); -extern void beh_yellow_background_menu_loop(void); -extern void bhvMenuButton_init(void); -extern void bhvMenuButton_loop(void); -extern void bhvMenuButtonManager_init(void); -extern void bhvMenuButtonManager_loop(void); -extern Gfx *Geo18_80176688(s32 run, UNUSED struct GraphNode *node, UNUSED f32 mtx[4][4]); -extern void LevelProc_801766DC(UNUSED s32 a, UNUSED s32 b); -extern s32 LevelProc_801768A0(UNUSED s32 a, UNUSED s32 b); - -#endif /* _FILE_SELECT_H */ diff --git a/src/game/game.c b/src/game/game.c index f7ccfcd..51fe069 100644 --- a/src/game/game.c +++ b/src/game/game.c @@ -300,7 +300,7 @@ void thread5_game_loop(UNUSED void *arg) { set_vblank_handler(2, &gGameVblankHandler, &gGameVblankQueue, (OSMesg) 1); // point addr to the entry point into the level script data. - addr = (struct LevelCommand *) segmented_to_virtual(level_script_entry); + addr = segmented_to_virtual(level_script_entry); play_music(2, SEQUENCE_ARGS(0, SEQ_SOUND_PLAYER), 0); set_sound_mode(save_file_get_sound_mode()); @@ -330,7 +330,7 @@ void thread5_game_loop(UNUSED void *arg) { if (gShowDebugText) { // subtract the end of the gfx pool with the display list to obtain the // amount of free space remaining. - print_text_fmt_int(180, 20, "BUF %d", (s32) gGfxPoolEnd - (s32) gDisplayListHead); + print_text_fmt_int(180, 20, "BUF %d", gGfxPoolEnd - (u8 *) gDisplayListHead); } } } diff --git a/src/game/game.h b/src/game/game.h index 25bc8fd..9d2167b 100644 --- a/src/game/game.h +++ b/src/game/game.h @@ -2,14 +2,14 @@ #define _GAME_H_ #include "memory.h" + struct DemoInput -{ // TODO: see if timer matches with s8 - /*0x00*/ u8 timer; // until next input: if this value - // is 0 proceeding on the demo input, it - // means the demo is over. - /*0x01*/ s8 rawStickX; - /*0x02*/ s8 rawStickY; - /*0x03*/ u8 button; +{ + u8 timer; // until next input: if this value is 0 proceeding on the demo + // input, it means the demo is over. + s8 rawStickX; + s8 rawStickY; + u8 button; }; extern struct Controller gControllers[3]; diff --git a/src/game/hud.c b/src/game/hud.c index dfb494c..2c6c25d 100644 --- a/src/game/hud.c +++ b/src/game/hud.c @@ -11,38 +11,34 @@ #include "segment2.h" #include "area.h" #include "save_file.h" +#include "print.h" -/* Originally hud_print.c - * This file seems to draw the in-game HUD +/* @file hud.c + * This file implements HUD rendering and power meter animations. + * That includes stars, lives, coins, camera status, power meter, timer + * cannon reticle, and the unused keys. **/ -enum PowerMeterAnimation { - POWER_METER_HIDDEN, - POWER_METER_EMPHASIZED, - POWER_METER_DEEMPHASIZING, - POWER_METER_HIDING, - POWER_METER_VISIBLE -}; - struct PowerMeterHUD { s8 animation; s16 x; s16 y; - f32 u_E8; + f32 unused; }; -struct UnknownStruct803314F0 { - u32 u_F0; - u16 u_F4; - u16 u_F6; +struct UnusedStruct803314F0 { + u32 unused1; + u16 unused2; + u16 unused3; }; struct CameraHUD { - s16 d_F8; + s16 status; }; -// some sort of store for shown health wedges (0-8); maybe from previous frame/update? -static s16 D_803600D0; +// Stores health segmented value defined by numHealthWedges +// When the HUD is rendered this value is 8, full health. +static s16 sPowerMeterStoredHealth; static struct PowerMeterHUD sPowerMeterHUD = { POWER_METER_HIDDEN, @@ -51,21 +47,30 @@ static struct PowerMeterHUD sPowerMeterHUD = { 1.0, }; -s32 gUnknownPowerMeterVar = 0x00000000; +// Power Meter timer that keeps counting when it's visible. +// Gets reset when the health is filled and stops counting +// when the power meter is hidden. +s32 sPowerMeterVisibleTimer = 0; -static struct UnknownStruct803314F0 D_803314F0 = { 0x00000000, 0x000A, 0x0000 }; +static struct UnusedStruct803314F0 unused803314F0 = { 0x00000000, 0x000A, 0x0000 }; -static struct CameraHUD sCameraHUD = { 0x0000 }; +static struct CameraHUD sCameraHUD = { CAM_STATUS_NONE }; -void render_hud_camera(s32 x, s32 y, u8 texture[]) { +/** + * Renders a rgba16 16x16 glyph texture from a table list. + */ +void render_hud_tex_lut(s32 x, s32 y, u8 *texture) { gDPPipeSync(gDisplayListHead++); - gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, (u32) texture); + gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture); gSPDisplayList(gDisplayListHead++, &dl_hud_img_load_tex_block); gSPTextureRectangle(gDisplayListHead++, x << 2, y << 2, (x + 15) << 2, (y + 15) << 2, - G_TX_RENDERTILE, 0, 0, 0x1000, 0x400); + G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10); } -void render_hud_c_buttons(s32 x, s32 y, u8 texture[]) { +/** + * Renders a rgba16 8x8 glyph texture from a table list. + */ +void render_hud_small_tex_lut(s32 x, s32 y, u8 *texture) { gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, (G_TX_NOMIRROR | G_TX_WRAP), G_TX_NOMASK, G_TX_NOLOD, (G_TX_NOMIRROR | G_TX_WRAP), G_TX_NOMASK, G_TX_NOLOD); @@ -75,64 +80,79 @@ void render_hud_c_buttons(s32 x, s32 y, u8 texture[]) { G_TX_NOLOD); gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, 28, 28); gDPPipeSync(gDisplayListHead++); - gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, (u32) texture); + gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture); gDPLoadSync(gDisplayListHead++); gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 63, 1024); gSPTextureRectangle(gDisplayListHead++, x << 2, y << 2, (x + 7) << 2, (y + 7) << 2, G_TX_RENDERTILE, - 0, 0, 0x1000, 0x400); + 0, 0, 4 << 10, 1 << 10); } -void func_802E21A4(s16 numHealthWedges) { - u8 *(*sp34)[]; +/** + * Renders power meter health segment texture using a table list. + */ +void render_power_meter_health_segment(s16 numHealthWedges) { + u8 *(*healthLUT)[]; - sp34 = segmented_to_virtual(&power_meter_seg3_health_icons_030293E0); + healthLUT = segmented_to_virtual(&power_meter_health_segments_lut); gDPPipeSync(gDisplayListHead++); gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, - (*sp34)[numHealthWedges - 1]); + (*healthLUT)[numHealthWedges - 1]); gDPLoadSync(gDisplayListHead++); gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 1023, 256); gSP1Triangle(gDisplayListHead++, 0, 1, 2, 0); gSP1Triangle(gDisplayListHead++, 0, 2, 3, 0); } -void func_802E2304(s16 numHealthWedges) { - Mtx *sp2C; +/** + * Renders power meter display lists. + * That includes the "POWER" base and the colored health segment textures. + */ +void render_dl_power_meter(s16 numHealthWedges) { + Mtx *mtx; - sp2C = alloc_display_list(0x40); + mtx = alloc_display_list(sizeof(Mtx)); - if (sp2C == NULL) { + if (mtx == NULL) { return; } - guTranslate(sp2C, (f32) sPowerMeterHUD.x, (f32) sPowerMeterHUD.y, 0); + guTranslate(mtx, (f32) sPowerMeterHUD.x, (f32) sPowerMeterHUD.y, 0); - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(sp2C++), + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(mtx++), (G_MTX_MODELVIEW | G_MTX_MUL | G_MTX_PUSH)); - gSPDisplayList(gDisplayListHead++, &power_meter_seg3_dl_03029480); + gSPDisplayList(gDisplayListHead++, &dl_power_meter_base); if (numHealthWedges != 0) { - gSPDisplayList(gDisplayListHead++, &power_meter_seg3_dl_03029570); - func_802E21A4(numHealthWedges); - gSPDisplayList(gDisplayListHead++, &power_meter_seg3_dl_030295A0); + gSPDisplayList(gDisplayListHead++, &dl_power_meter_health_segments_begin); + render_power_meter_health_segment(numHealthWedges); + gSPDisplayList(gDisplayListHead++, &dl_power_meter_health_segments_end); } gSPPopMatrix(gDisplayListHead++, 0); } +/** + * Power meter animation called when there's less than 8 health segments + * Checks its timer to later change into deemphasizing mode. + */ void animate_power_meter_emphasized(void) { s16 hudDisplayFlags; hudDisplayFlags = gHudDisplay.flags; if (!(hudDisplayFlags & HUD_DISPLAY_FLAG_EMPHASIZE_POWER)) { - if (gUnknownPowerMeterVar == 45.0) { + if (sPowerMeterVisibleTimer == 45.0) { sPowerMeterHUD.animation = POWER_METER_DEEMPHASIZING; } } else { - gUnknownPowerMeterVar = 0; + sPowerMeterVisibleTimer = 0; } } +/** + * Power meter animation called after emphasized mode. + * Moves power meter y pos speed until it's at 200 to be visible. + */ static void animate_power_meter_deemphasizing(void) { s16 speed = 5; @@ -156,44 +176,62 @@ static void animate_power_meter_deemphasizing(void) { } } +/** + * Power meter animation called when there's 8 health segments. + * Moves power meter y pos quickly until it's at 301 to be hidden. + */ static void animate_power_meter_hiding(void) { sPowerMeterHUD.y += 20; if (sPowerMeterHUD.y >= 301) { sPowerMeterHUD.animation = POWER_METER_HIDDEN; - gUnknownPowerMeterVar = 0; + sPowerMeterVisibleTimer = 0; } } -void func_802E261C(s16 numHealthWedges) { - if (numHealthWedges < 8 && D_803600D0 == 8 && sPowerMeterHUD.animation == POWER_METER_HIDDEN) { +/** + * Handles power meter actions depending of the health segments values. + */ +void handle_power_meter_actions(s16 numHealthWedges) { + // Show power meter if health is not full, less than 8 + if (numHealthWedges < 8 && sPowerMeterStoredHealth == 8 && sPowerMeterHUD.animation == POWER_METER_HIDDEN) { sPowerMeterHUD.animation = POWER_METER_EMPHASIZED; sPowerMeterHUD.y = 166; } - if (numHealthWedges == 8 && D_803600D0 == 7) { - gUnknownPowerMeterVar = 0; + // Show power meter if health is full, has 8 + if (numHealthWedges == 8 && sPowerMeterStoredHealth == 7) { + sPowerMeterVisibleTimer = 0; } - if (numHealthWedges == 8 && gUnknownPowerMeterVar > 45.0) { + + // After health is full, hide power meter + if (numHealthWedges == 8 && sPowerMeterVisibleTimer > 45.0) { sPowerMeterHUD.animation = POWER_METER_HIDING; } - D_803600D0 = numHealthWedges; + // Update to match health value + sPowerMeterStoredHealth = numHealthWedges; - if (gPlayerStatusForCamera->action & 0x2000) { + // If mario is swimming, keep showing power meter + if (gPlayerStatusForCamera->action & ACT_FLAG_SWIMMING) { if (sPowerMeterHUD.animation == POWER_METER_HIDDEN || sPowerMeterHUD.animation == POWER_METER_EMPHASIZED) { sPowerMeterHUD.animation = POWER_METER_DEEMPHASIZING; sPowerMeterHUD.y = 166; } - gUnknownPowerMeterVar = 0; + sPowerMeterVisibleTimer = 0; } } -void render_hud_hp(void) { +/** + * Renders the power meter that shows when Mario is in underwater + * or has taken damage and has less than 8 health segments. + * And calls a power meter animation function depending of the value defined. + */ +void render_hud_power_meter(void) { s16 shownHealthWedges = gHudDisplay.wedges; if (sPowerMeterHUD.animation != POWER_METER_HIDING) { - func_802E261C(shownHealthWedges); + handle_power_meter_actions(shownHealthWedges); } if (sPowerMeterHUD.animation == POWER_METER_HIDDEN) { @@ -214,9 +252,9 @@ void render_hud_hp(void) { break; } - func_802E2304(shownHealthWedges); + render_dl_power_meter(shownHealthWedges); - gUnknownPowerMeterVar += 1; + sPowerMeterVisibleTimer += 1; } #ifdef VERSION_JP @@ -225,12 +263,18 @@ void render_hud_hp(void) { #define HUD_TOP_Y 209 #endif +/** + * Renders the amount of lives Mario has. + */ void render_hud_mario_lives(void) { print_text(22, HUD_TOP_Y, ","); // 'Mario Head' glyph print_text(38, HUD_TOP_Y, "*"); // 'X' glyph print_text_fmt_int(54, HUD_TOP_Y, "%d", gHudDisplay.lives); } +/** + * Renders the amount of coins collected. + */ void render_hud_coins(void) { print_text(168, HUD_TOP_Y, "+"); // 'Coin' glyph print_text(184, HUD_TOP_Y, "*"); // 'X' glyph @@ -243,10 +287,14 @@ void render_hud_coins(void) { #define HUD_STARS_X 242 #endif +/** + * Renders the amount of stars collected. + * Disables "X" glyph when Mario has 100 stars or more. + */ void render_hud_stars(void) { s8 showX = 0; - if (D_803305CC == 1 && gGlobalTimer & 0x00000008) { + if (gHudFlash == 1 && gGlobalTimer & 0x08) { return; } @@ -261,22 +309,29 @@ void render_hud_stars(void) { print_text_fmt_int(((showX * 14) + (HUD_STARS_X + 16)), HUD_TOP_Y, "%d", gHudDisplay.stars); } -void func_802E29D4() { +/** + * Unused function that renders the amount of keys collected. + * Leftover function from the beta version of the game. + */ +void render_hud_keys(void) { s16 i; for (i = 0; i < gHudDisplay.keys; i++) { - print_text((i * 16) + 220, 142, "/"); // unused glyph (originally for a key?) + print_text((i * 16) + 220, 142, "/"); // unused glyph - beta key } } +/** + * Renders the timer when Mario start sliding in PSS. + */ void render_hud_timer(void) { - u8 *(*hudPrintLUT)[58]; + u8 *(*hudLUT)[58]; u16 timerValFrames; u16 timerMins; u16 timerSecs; u16 timerFracSecs; - hudPrintLUT = segmented_to_virtual(&seg2_hud_lut); + hudLUT = segmented_to_virtual(&main_hud_lut); timerValFrames = gHudDisplay.timer; #ifdef VERSION_EU switch (eu_get_language()) { @@ -302,55 +357,67 @@ void render_hud_timer(void) { print_text_fmt_int(249, 185, "%02d", timerSecs); print_text_fmt_int(283, 185, "%d", timerFracSecs); gSPDisplayList(gDisplayListHead++, dl_hud_img_begin); - render_hud_camera(239, 32, (*hudPrintLUT)[56]); - render_hud_camera(274, 32, (*hudPrintLUT)[57]); + render_hud_tex_lut(239, 32, (*hudLUT)[GLYPH_APOSTROPHE]); + render_hud_tex_lut(274, 32, (*hudLUT)[GLYPH_DOUBLE_QUOTE]); gSPDisplayList(gDisplayListHead++, dl_hud_img_end); } -void set_camera_status(s16 a0) { - sCameraHUD.d_F8 = a0; +/** + * Sets HUD status camera value depending of the actions + * defined in update_camera_status. + */ +void set_hud_camera_status(s16 status) { + sCameraHUD.status = status; } -void show_camera_status(void) { +/** + * Renders camera HUD glyphs using a table list, depending of + * the camera status called, a defined glyph is rendered. + */ +void render_hud_camera_status(void) { u8 *(*cameraLUT)[6]; s32 x; s32 y; - cameraLUT = segmented_to_virtual(&seg2_hud_camera_lut); + cameraLUT = segmented_to_virtual(&main_hud_camera_lut); x = 266; y = 205; - if (sCameraHUD.d_F8 == 0) { + if (sCameraHUD.status == CAM_STATUS_NONE) { return; } gSPDisplayList(gDisplayListHead++, dl_hud_img_begin); - render_hud_camera(x, y, (*cameraLUT)[0]); + render_hud_tex_lut(x, y, (*cameraLUT)[GLYPH_CAM_CAMERA]); - switch (sCameraHUD.d_F8 & 0x07) { - case 1 << 0: // 1 - render_hud_camera(x + 16, y, (*cameraLUT)[1]); + switch (sCameraHUD.status & CAM_STATUS_MODE_GROUP) { + case CAM_STATUS_MARIO: + render_hud_tex_lut(x + 16, y, (*cameraLUT)[GLYPH_CAM_MARIO_HEAD]); break; - case 1 << 1: // 2 - render_hud_camera(x + 16, y, (*cameraLUT)[2]); + case CAM_STATUS_LAKITU: + render_hud_tex_lut(x + 16, y, (*cameraLUT)[GLYPH_CAM_LAKITU_HEAD]); break; - case 1 << 2: // 4 - render_hud_camera(x + 16, y, (*cameraLUT)[3]); + case CAM_STATUS_FIXED: + render_hud_tex_lut(x + 16, y, (*cameraLUT)[GLYPH_CAM_FIXED]); break; } - switch (sCameraHUD.d_F8 & 0x18) { - case 1 << 3: // 8 - render_hud_c_buttons(x + 4, y + 16, (*cameraLUT)[5]); + switch (sCameraHUD.status & CAM_STATUS_C_MODE_GROUP) { + case CAM_STATUS_C_DOWN: + render_hud_small_tex_lut(x + 4, y + 16, (*cameraLUT)[GLYPH_CAM_ARROW_DOWN]); break; - case 1 << 4: // 16 - render_hud_c_buttons(x + 4, y - 8, (*cameraLUT)[4]); + case CAM_STATUS_C_UP: + render_hud_small_tex_lut(x + 4, y - 8, (*cameraLUT)[GLYPH_CAM_ARROW_UP]); break; } gSPDisplayList(gDisplayListHead++, dl_hud_img_end); } +/** + * Render HUD strings using hudDisplayFlags with it's render functions, + * excluding the cannon reticle which detects a camera preset for it. + */ void render_hud(void) { s16 hudDisplayFlags; #ifdef VERSION_EU @@ -361,25 +428,26 @@ void render_hud(void) { if (hudDisplayFlags == HUD_DISPLAY_NONE) { sPowerMeterHUD.animation = POWER_METER_HIDDEN; - D_803600D0 = 8; - gUnknownPowerMeterVar = 0; + sPowerMeterStoredHealth = 8; + sPowerMeterVisibleTimer = 0; } 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; } - func_802D6440(); + 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), 1); #else - dl_add_new_ortho_matrix(); + create_dl_ortho_matrix(); #endif if (gCurrentArea != NULL && gCurrentArea->camera->currPreset == CAMERA_PRESET_INSIDE_CANNON) { - RenderHudCannonReticle(); + render_hud_cannon_reticle(); } if (hudDisplayFlags & HUD_DISPLAY_FLAG_LIVES) { @@ -394,13 +462,13 @@ void render_hud(void) { render_hud_stars(); } - if (hudDisplayFlags & HUD_DISPLAY_FLAG_UNKNOWN_0010) { - func_802E29D4(); + if (hudDisplayFlags & HUD_DISPLAY_FLAG_KEYS) { + render_hud_keys(); } if (hudDisplayFlags & HUD_DISPLAY_FLAG_CAMERA_AND_POWER) { - render_hud_hp(); - show_camera_status(); + render_hud_power_meter(); + render_hud_camera_status(); } if (hudDisplayFlags & HUD_DISPLAY_FLAG_TIMER) { diff --git a/src/game/hud.h b/src/game/hud.h index 1dea3c7..975819a 100644 --- a/src/game/hud.h +++ b/src/game/hud.h @@ -1,31 +1,33 @@ -#ifndef _HUD_PRINT_H -#define _HUD_PRINT_H +#ifndef HUD_H +#define HUD_H #include "types.h" -/* Segment 3 */ -extern u8 *power_meter_seg3_health_icons_030293E0[]; -extern Gfx* power_meter_seg3_dl_03029480; //u8 []? -extern Gfx* power_meter_seg3_dl_03029570; //u8 []? -extern Gfx* power_meter_seg3_dl_030295A0; //u8 []? +enum PowerMeterAnimation { + POWER_METER_HIDDEN, + POWER_METER_EMPHASIZED, + POWER_METER_DEEMPHASIZING, + POWER_METER_HIDING, + POWER_METER_VISIBLE +}; -/* Functions */ -extern void render_hud_camera(s32, s32, u8[]); -extern void render_hud_c_buttons(s32, s32, u8[]); -extern void func_802E21A4(s16); -extern void func_802E2304(s16); -extern void func_802E24A8(void); -extern void func_802E2520(void); -extern void func_802E25D4(void); -extern void func_802E261C(s16 numHealthWedges); -extern void render_hud_hp(void); -extern void render_hud_mario_lives(void); -extern void render_hud_coins(void); -extern void render_hud_stars(void); -extern void func_802E29D4(void); -extern void render_hud_timer(void); -extern void set_camera_status(s16); -extern void show_camera_status(void); +enum CameraHUDLut { + GLYPH_CAM_CAMERA, + GLYPH_CAM_MARIO_HEAD, + GLYPH_CAM_LAKITU_HEAD, + GLYPH_CAM_FIXED, + GLYPH_CAM_ARROW_UP, + GLYPH_CAM_ARROW_DOWN +}; + +// Segment 3 +extern u8 *power_meter_health_segments_lut[]; +extern Gfx* dl_power_meter_base; +extern Gfx* dl_power_meter_health_segments_begin; +extern Gfx* dl_power_meter_health_segments_end; + +// Functions +extern void set_hud_camera_status(s16 status); extern void render_hud(void); -#endif /* _HUD_PRINT_H */ +#endif /* HUD_H */ diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index 188de6b..59a4def 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -14,6 +14,7 @@ #include "segment7.h" #include "eu_translation.h" #include "ingame_menu.h" +#include "print.h" #include "engine/math_util.h" extern Gfx *gDisplayListHead; @@ -29,97 +30,35 @@ extern Gfx coin_seg3_dl_030079B8[]; extern u8 main_menu_seg7_table_0700ABD0[]; extern Gfx castle_grounds_seg7_dl_0700EA58[]; -u16 D_80360080; +u16 gDialogColorFadeTimer; s8 gLastDialogLineNum; s32 gDialogVariable; -u16 D_80360088; +u16 gDialogTextAlpha; s16 gCutsceneMsgXOffset; s16 gCutsceneMsgYOffset; -s8 D_8036008E; +s8 gRedCoinsCollected; extern u8 gLastCompletedCourseNum; extern u8 gLastCompletedStarNum; -extern s32 select_or_activate_mario_cam(s32); - enum DialogBoxState { DIALOG_STATE_OPENING, - DIALOG_STATE_WAITBUTTON, - DIALOG_STATE_SCROLLING, + DIALOG_STATE_VERTICAL, + DIALOG_STATE_HORIZONTAL, DIALOG_STATE_CLOSING }; +enum DialogBoxPageState { + DIALOG_PAGE_STATE_NONE, + DIALOG_PAGE_STATE_SCROLL, + DIALOG_PAGE_STATE_END +}; + enum DialogBoxType { DIALOG_TYPE_ROTATE, // used in NPCs and level messages DIALOG_TYPE_ZOOM // used in signposts and wall signs and etc }; -#define ASCII_TO_DIALOG(asc) \ - (((asc) >= '0' && (asc) <= '9') ? ((asc) - '0') : \ - ((asc) >= 'A' && (asc) <= 'Z') ? ((asc) - 'A' + 0x0A) : \ - ((asc) >= 'a' && (asc) <= 'z') ? ((asc) - 'a' + 0x24) : 0x00) - -enum HudSpecialChars { - HUD_CHAR_SYM_X = 0x32, - HUD_CHAR_SYM_COIN = 0x33, - HUD_CHAR_SYM_MARIO = 0x34, - HUD_CHAR_SYM_STAR = 0x35, -#ifdef VERSION_EU - HUD_CHAR_A_UMLAUT = 0x3A, - HUD_CHAR_O_UMLAUT = 0x3B, - HUD_CHAR_U_UMLAUT = 0x3C, -#endif - HUD_CHAR_SPACE = 0x9E -}; - -// definitions for some of the special characters defined in charmap.txt -enum DialogSpecialChars { -#ifdef VERSION_EU - DIALOG_CHAR_LOWER_A_GRAVE = 0x60, // 'a' grave - DIALOG_CHAR_LOWER_A_CIRCUMFLEX = 0x61, // 'a' circumflex - DIALOG_CHAR_LOWER_A_UMLAUT = 0x62, // 'a' umlaut - DIALOG_CHAR_UPPER_A_GRAVE = 0x64, // 'A' grave - DIALOG_CHAR_UPPER_A_CIRCUMFLEX = 0x65, // 'A' circumflex - DIALOG_CHAR_UPPER_A_UMLAUT = 0x66, // 'A' umlaut - DIALOG_CHAR_LOWER_E_GRAVE = 0x70, // 'e' grave - DIALOG_CHAR_LOWER_E_CIRCUMFLEX = 0x71, // 'e' circumflex - DIALOG_CHAR_LOWER_E_UMLAUT = 0x72, // 'e' umlaut - DIALOG_CHAR_LOWER_E_ACUTE = 0x73, // 'e' acute - DIALOG_CHAR_UPPER_E_GRAVE = 0x74, // 'E' grave - DIALOG_CHAR_UPPER_E_CIRCUMFLEX = 0x75, // 'E' circumflex - DIALOG_CHAR_UPPER_E_UMLAUT = 0x76, // 'E' umlaut - DIALOG_CHAR_UPPER_E_ACUTE = 0x77, // 'E' acute - DIALOG_CHAR_LOWER_U_GRAVE = 0x80, // 'u' grave - DIALOG_CHAR_LOWER_U_CIRCUMFLEX = 0x81, // 'u' circumflex - DIALOG_CHAR_LOWER_U_UMLAUT = 0x82, // 'u' umlaut - DIALOG_CHAR_UPPER_U_GRAVE = 0x84, // 'U' grave - DIALOG_CHAR_UPPER_U_CIRCUMFLEX = 0x85, // 'U' circumflex - DIALOG_CHAR_UPPER_U_UMLAUT = 0x86, // 'U' umlaut - DIALOG_CHAR_LOWER_O_CIRCUMFLEX = 0x91, // 'o' circumflex - DIALOG_CHAR_LOWER_O_UMLAUT = 0x92, // 'o' umlaut - DIALOG_CHAR_UPPER_O_CIRCUMFLEX = 0x95, // 'O' circumflex - DIALOG_CHAR_UPPER_O_UMLAUT = 0x96, // 'O' umlaut - DIALOG_CHAR_LOWER_I_CIRCUMFLEX = 0xA1, // 'i' circumflex - DIALOG_CHAR_LOWER_I_UMLAUT = 0xA2, // 'i' umlaut - DIALOG_CHAR_I_NO_DIA = 0xEB, // 'i' without diacritic - DIALOG_CHAR_DOUBLE_LOW_QUOTE = 0xF0, // German opening quotation mark -#endif -#if defined(VERSION_US) || defined(VERSION_EU) - DIALOG_CHAR_MULTI_THE = 0xD1, // 'the' - DIALOG_CHAR_MULTI_YOU = 0xD2, // 'you' -#endif - DIALOG_CHAR_HANDAKUTEN = 0x6E, - DIALOG_CHAR_COMMA = 0x6F, - DIALOG_CHAR_SPACE = 0x9E, - DIALOG_CHAR_STAR_COUNT = 0xE0, // number of stars - DIALOG_CHAR_PREFIX_DAKUTEN = 0xF0, // prefix for kana with dakuten - DIALOG_CHAR_PREFIX_HANDAKUTEN = 0xF1, // prefix for kana with handakuten - DIALOG_CHAR_STAR_FILLED = 0xFA, - DIALOG_CHAR_STAR_OPEN = 0xFD, - DIALOG_CHAR_NEWLINE = 0xFE, - DIALOG_CHAR_TERMINATOR = 0xFF -}; - enum DialogMark { DIALOG_MARK_NONE = 0, DIALOG_MARK_DAKUTEN = 1, DIALOG_MARK_HANDAKUTEN = 2 }; #define DEFAULT_DIALOG_BOX_ANGLE 90.0f @@ -165,11 +104,11 @@ s16 gDialogScrollOffsetY = 0; s8 gDialogBoxType = DIALOG_TYPE_ROTATE; s16 gDialogID = -1; s16 gLastDialogPageStrPos = 0; -s16 D_8033042C = 0; // EU: D_802FD64C -s8 D_80330430 = 1; -s8 D_80330434 = 0; -u8 D_80330438 = 0; -u8 D_8033043C = 0; +s16 gDialogTextPos = 0; // EU: D_802FD64C +s8 gDialogLineNum = 1; +s8 gLastDialogResponse = 0; +u8 gMenuHoldKeyIndex = 0; +u8 gMenuHoldKeyTimer = 0; s32 gDialogResponse = 0; #ifdef VERSION_EU @@ -179,14 +118,7 @@ s16 gDialogY; // D_8032F69C s32 gInGameLanguage; #endif -#ifdef VERSION_JP -#define MAX_STRING_WIDTH 18 -#else -#define MAX_STRING_WIDTH 16 -#endif - -// dl_add_new_identity_matrix? -void func_802D6440(void) { +void create_dl_identity_matrix(void) { Mtx *matrix = (Mtx *) alloc_display_list(sizeof(Mtx)); if (matrix == NULL) { @@ -217,7 +149,7 @@ void func_802D6440(void) { gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(matrix), G_MTX_LOAD | G_MTX_PROJECTION); } -void dl_add_new_translation_matrix(s8 pushOp, f32 x, f32 y, f32 z) { +void create_dl_translation_matrix(s8 pushOp, f32 x, f32 y, f32 z) { Mtx *matrix = (Mtx *) alloc_display_list(sizeof(Mtx)); if (matrix == NULL) { @@ -233,7 +165,7 @@ void dl_add_new_translation_matrix(s8 pushOp, f32 x, f32 y, f32 z) { gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(matrix), G_MTX_NOPUSH); } -void dl_add_new_rotation_matrix(s8 pushOp, f32 a, f32 x, f32 y, f32 z) { +void create_dl_rotation_matrix(s8 pushOp, f32 a, f32 x, f32 y, f32 z) { Mtx *matrix = (Mtx *) alloc_display_list(sizeof(Mtx)); if (matrix == NULL) { @@ -249,7 +181,7 @@ void dl_add_new_rotation_matrix(s8 pushOp, f32 a, f32 x, f32 y, f32 z) { gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(matrix), G_MTX_NOPUSH); } -void dl_add_new_scale_matrix(s8 pushOp, f32 x, f32 y, f32 z) { +void create_dl_scale_matrix(s8 pushOp, f32 x, f32 y, f32 z) { Mtx *matrix = (Mtx *) alloc_display_list(sizeof(Mtx)); if (matrix == NULL) { @@ -265,16 +197,16 @@ void dl_add_new_scale_matrix(s8 pushOp, f32 x, f32 y, f32 z) { gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(matrix), G_MTX_NOPUSH); } -void dl_add_new_ortho_matrix(void) { +void create_dl_ortho_matrix(void) { Mtx *matrix = (Mtx *) alloc_display_list(sizeof(Mtx)); if (matrix == NULL) { return; } - func_802D6440(); + create_dl_identity_matrix(); - guOrtho(matrix, 0.0f, 320.0f, 0.0f, 240.0f, -10.0f, 10.0f, 1.0f); + 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++), 0x0000FFFF); @@ -282,8 +214,7 @@ void dl_add_new_ortho_matrix(void) { gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(matrix), G_MTX_PROJECTION) } -// dl_add_new_ia8_tex_from_i1 -static u8 *func_802D69A0(u16 *in, s16 width, s16 height) { +static u8 *alloc_ia8_text_from_i1(u16 *in, s16 width, s16 height) { s32 inPos; u16 bitMask; u8 *out; @@ -315,17 +246,17 @@ static u8 *func_802D69A0(u16 *in, s16 width, s16 height) { } void render_generic_char(u8 c) { - void **smallFontLUT; + void **fontLUT; void *packedTexture; #ifdef VERSION_JP void *unpackedTexture; #endif - smallFontLUT = segmented_to_virtual(seg2_small_font_lut); - packedTexture = segmented_to_virtual(smallFontLUT[c]); + fontLUT = segmented_to_virtual(main_font_lut); + packedTexture = segmented_to_virtual(fontLUT[c]); #ifdef VERSION_JP - unpackedTexture = func_802D69A0(packedTexture, 8, 16); + unpackedTexture = alloc_ia8_text_from_i1(packedTexture, 8, 16); gDPPipeSync(gDisplayListHead++); gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_8b, 1, VIRTUAL_TO_PHYSICAL(unpackedTexture)); @@ -338,7 +269,7 @@ void render_generic_char(u8 c) { gSPDisplayList(gDisplayListHead++, dl_ia8_render_char); #ifdef VERSION_EU gSPTextureRectangleFlip(gDisplayListHead++, gDialogX << 2, (gDialogY - 16) << 2, - (gDialogX + 8) << 2, gDialogY << 2, 0, 0x200, 0x100, 0x400, 0x400); + (gDialogX + 8) << 2, gDialogY << 2, G_TX_RENDERTILE, 16 << 5, 8 << 5, 1 << 10, 1 << 10); #endif } @@ -372,19 +303,19 @@ u8 *alloc_ia4_tex_from_i1(u8 *in, s16 width, s16 height) { } void render_generic_char_at_pos(s16 xPos, s16 yPos, u8 c) { - void **smallFontLUT; + void **fontLUT; void *packedTexture; void *unpackedTexture; - smallFontLUT = segmented_to_virtual(seg2_small_font_lut); - packedTexture = segmented_to_virtual(smallFontLUT[c]); + fontLUT = segmented_to_virtual(main_font_lut); + packedTexture = segmented_to_virtual(fontLUT[c]); unpackedTexture = alloc_ia4_tex_from_i1(packedTexture, 8, 8); gDPPipeSync(gDisplayListHead++); gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, VIRTUAL_TO_PHYSICAL(unpackedTexture)); gSPDisplayList(gDisplayListHead++, dl_ia8_render_char); gSPTextureRectangleFlip(gDisplayListHead++, xPos << 2, (yPos - 16) << 2, (xPos + 8) << 2, yPos << 2, - 0, 0x200, 0x100, 0x400, 0x400); + G_TX_RENDERTILE, 16 << 5, 8 << 5, 1 << 10, 1 << 10); } void render_lowercase_diacritic(s16 *xPos, s16 *yPos, u8 letter, u8 diacritic) { @@ -417,9 +348,9 @@ enum MutliStringIDs { STRING_THE, STRING_YOU }; * 1: 'you' */ #ifdef VERSION_US -void put_multi_text_string(s8 multiTextID) // US: 802D76C8 +void render_multi_text_string(s8 multiTextID) // US: 802D76C8 #elif defined(VERSION_EU) -void put_multi_text_string(s16 *xPos, s16 *yPos, s8 multiTextID) // EU: 802AD650 +void render_multi_text_string(s16 *xPos, s16 *yPos, s8 multiTextID) // EU: 802AD650 #endif { s8 i; @@ -431,7 +362,7 @@ void put_multi_text_string(s16 *xPos, s16 *yPos, s8 multiTextID) // EU: 802AD650 for (i = 0; i < textLengths[multiTextID].length; i++) { #ifdef VERSION_US render_generic_char(textLengths[multiTextID].str[i]); - dl_add_new_translation_matrix(2, (f32)(gDialogCharWidths[textLengths[multiTextID].str[i]]), 0.0f, 0.0f); + create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[textLengths[multiTextID].str[i]]), 0.0f, 0.0f); #elif defined(VERSION_EU) render_generic_char_at_pos(*xPos, *yPos, textLengths[multiTextID].str[i]); *xPos += gDialogCharWidths[textLengths[multiTextID].str[i]]; @@ -440,7 +371,17 @@ void put_multi_text_string(s16 *xPos, s16 *yPos, s8 multiTextID) // EU: 802AD650 } #endif -void PrintGenericText(s16 x, s16 y, const u8 *str) { +#ifdef VERSION_JP +#define MAX_STRING_WIDTH 18 +#else +#define MAX_STRING_WIDTH 16 +#endif + +/** + * Prints a generic white string. + * In JP/EU a IA1 texture is used but in US a IA4 texture is used. + */ +void print_generic_string(s16 x, s16 y, const u8 *str) { UNUSED s8 mark = DIALOG_MARK_NONE; // unused in EU s32 strPos = 0; u8 lineNum = 1; @@ -450,8 +391,7 @@ void PrintGenericText(s16 x, s16 y, const u8 *str) { #endif #ifndef VERSION_EU - // create_new_translation_matrix - dl_add_new_translation_matrix(MENU_MTX_PUSH, x, y, 0.0f); + create_dl_translation_matrix(MENU_MTX_PUSH, x, y, 0.0f); #endif while (str[strPos] != DIALOG_CHAR_TERMINATOR) { @@ -513,45 +453,45 @@ void PrintGenericText(s16 x, s16 y, const u8 *str) { break; case DIALOG_CHAR_NEWLINE: gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - dl_add_new_translation_matrix(MENU_MTX_PUSH, x, y - (lineNum * MAX_STRING_WIDTH), 0.0f); + create_dl_translation_matrix(MENU_MTX_PUSH, x, y - (lineNum * MAX_STRING_WIDTH), 0.0f); lineNum++; break; case DIALOG_CHAR_HANDAKUTEN: - dl_add_new_translation_matrix(MENU_MTX_PUSH, -2.0f, -5.0f, 0.0f); + create_dl_translation_matrix(MENU_MTX_PUSH, -2.0f, -5.0f, 0.0f); render_generic_char(DIALOG_CHAR_PREFIX_HANDAKUTEN); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); break; #endif #ifndef VERSION_JP - case 0xD0: // '/' + case DIALOG_CHAR_SLASH: #ifdef VERSION_US - dl_add_new_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[DIALOG_CHAR_SPACE] * 2), 0.0f, 0.0f); + create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[DIALOG_CHAR_SPACE] * 2), 0.0f, 0.0f); #elif defined(VERSION_EU) xCoord += gDialogCharWidths[DIALOG_CHAR_SPACE] * 2; #endif break; case DIALOG_CHAR_MULTI_THE: #ifdef VERSION_EU - put_multi_text_string(&xCoord, &yCoord, STRING_THE); + render_multi_text_string(&xCoord, &yCoord, STRING_THE); #else - put_multi_text_string(STRING_THE); + render_multi_text_string(STRING_THE); #endif break; case DIALOG_CHAR_MULTI_YOU: #ifdef VERSION_EU - put_multi_text_string(&xCoord, &yCoord, STRING_YOU); + render_multi_text_string(&xCoord, &yCoord, STRING_YOU); #else - put_multi_text_string(STRING_YOU); + render_multi_text_string(STRING_YOU); #endif break; #endif #ifndef VERSION_EU case DIALOG_CHAR_SPACE: #ifdef VERSION_JP - dl_add_new_translation_matrix(MENU_MTX_NOPUSH, 5.0f, 0.0f, 0.0f); + create_dl_translation_matrix(MENU_MTX_NOPUSH, 5.0f, 0.0f, 0.0f); break; #else - dl_add_new_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[DIALOG_CHAR_SPACE]), 0.0f, 0.0f); + create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[DIALOG_CHAR_SPACE]), 0.0f, 0.0f); #endif #endif break; // ? needed to match @@ -563,16 +503,16 @@ void PrintGenericText(s16 x, s16 y, const u8 *str) { #else render_generic_char(str[strPos]); if (mark != DIALOG_MARK_NONE) { - dl_add_new_translation_matrix(MENU_MTX_PUSH, 5.0f, 5.0f, 0.0f); + create_dl_translation_matrix(MENU_MTX_PUSH, 5.0f, 5.0f, 0.0f); render_generic_char(mark + 0xEF); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); mark = DIALOG_MARK_NONE; } #ifdef VERSION_JP - dl_add_new_translation_matrix(MENU_MTX_NOPUSH, 10.0f, 0.0f, 0.0f); + create_dl_translation_matrix(MENU_MTX_NOPUSH, 10.0f, 0.0f, 0.0f); #else - dl_add_new_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[str[strPos]]), 0.0f, 0.0f); + create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[str[strPos]]), 0.0f, 0.0f); break; // what an odd difference. US added a useless break here. #endif #endif @@ -587,33 +527,35 @@ void PrintGenericText(s16 x, s16 y, const u8 *str) { } #ifdef VERSION_EU -void put_hud_char_umlaut(s16 x, s16 y, u8 chr) { - void **fontLUT = segmented_to_virtual(seg2_hud_lut); // 0-9 A-Z Alphanumeric Font +void print_hud_char_umlaut(s16 x, s16 y, u8 chr) { + void **fontLUT = segmented_to_virtual(main_hud_lut); gDPPipeSync(gDisplayListHead++); gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, fontLUT[chr]); gSPDisplayList(gDisplayListHead++, dl_rgba16_load_tex_block); - gSPTextureRectangle(gDisplayListHead++, x << 2, y << 2, (x + 16) << 2, (y + 16) << 2, 0, 0, 0, 0x400, 0x400); + gSPTextureRectangle(gDisplayListHead++, x << 2, y << 2, (x + 16) << 2, (y + 16) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); - gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, fontLUT[HUD_CHAR_A_UMLAUT]); + gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, fontLUT[GLYPH_UMLAUT]); gSPDisplayList(gDisplayListHead++, dl_rgba16_load_tex_block); - gSPTextureRectangle(gDisplayListHead++, x << 2, (y - 4) << 2, (x + 16) << 2, (y + 12) << 2, 0, 0, 0, 0x400, 0x400); + gSPTextureRectangle(gDisplayListHead++, x << 2, (y - 4) << 2, (x + 16) << 2, (y + 12) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); } #endif -// put_hud_menu_string -void PutString(s8 font, s16 x, s16 y, const u8 *str) { +/** + * Prints a hud string depending of the hud table list defined. + */ +void print_hud_lut_string(s8 hudLUT, s16 x, s16 y, const u8 *str) { s32 strPos = 0; - void **fontLUT1 = segmented_to_virtual(main_menu_seg7_table_0700ABD0); // japanese color font - void **fontLUT2 = segmented_to_virtual(seg2_hud_lut); // 0-9 A-Z Alphanumeric Font + void **hudLUT1 = segmented_to_virtual(menu_hud_lut); // Japanese Menu HUD Color font + void **hudLUT2 = segmented_to_virtual(main_hud_lut); // 0-9 A-Z HUD Color Font u32 curX = x; u32 curY = y; - u32 xStride; + u32 xStride; // X separation - if (font == 1) { + if (hudLUT == HUD_LUT_JPMENU) { xStride = 16; - } else { + } else { // HUD_LUT_GLOBAL #ifdef VERSION_JP xStride = 14; #else @@ -621,28 +563,28 @@ void PutString(s8 font, s16 x, s16 y, const u8 *str) { #endif } - while (str[strPos] != DIALOG_CHAR_TERMINATOR) { + while (str[strPos] != GLOBAR_CHAR_TERMINATOR) { #ifdef VERSION_EU switch (str[strPos]) { - case HUD_CHAR_SPACE: + case GLOBAL_CHAR_SPACE: curX += xStride / 2; break; case HUD_CHAR_A_UMLAUT: - put_hud_char_umlaut(curX, curY, ASCII_TO_DIALOG('A')); + print_hud_char_umlaut(curX, curY, ASCII_TO_DIALOG('A')); curX += xStride; break; case HUD_CHAR_O_UMLAUT: - put_hud_char_umlaut(curX, curY, ASCII_TO_DIALOG('O')); + print_hud_char_umlaut(curX, curY, ASCII_TO_DIALOG('O')); curX += xStride; break; case HUD_CHAR_U_UMLAUT: - put_hud_char_umlaut(curX, curY, ASCII_TO_DIALOG('U')); + print_hud_char_umlaut(curX, curY, ASCII_TO_DIALOG('U')); curX += xStride; break; default: #endif #ifdef VERSION_US - if (str[strPos] == HUD_CHAR_SPACE) { + if (str[strPos] == GLOBAL_CHAR_SPACE) { if (0) //! dead code { } @@ -652,15 +594,15 @@ void PutString(s8 font, s16 x, s16 y, const u8 *str) { #endif gDPPipeSync(gDisplayListHead++); - if (font == 1) - gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, fontLUT1[str[strPos]]); + if (hudLUT == HUD_LUT_JPMENU) + gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, hudLUT1[str[strPos]]); - if (font == 2) - gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, fontLUT2[str[strPos]]); + if (hudLUT == HUD_LUT_GLOBAL) + gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, hudLUT2[str[strPos]]); gSPDisplayList(gDisplayListHead++, dl_rgba16_load_tex_block); gSPTextureRectangle(gDisplayListHead++, curX << 2, curY << 2, (curX + 16) << 2, - (curY + 16) << 2, 0, 0, 0, 0x400, 0x400); + (curY + 16) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); curX += xStride; #ifdef VERSION_EU @@ -675,41 +617,41 @@ void PutString(s8 font, s16 x, s16 y, const u8 *str) { } #ifdef VERSION_EU -void put_menu_char_umlaut(s16 x, s16 y, u8 chr) { - void **fontLUT = segmented_to_virtual(main_menu_seg7_table_0700CD08); +void print_menu_char_umlaut(s16 x, s16 y, u8 chr) { + void **fontLUT = segmented_to_virtual(menu_font_lut); gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_8b, 1, fontLUT[chr]); gDPLoadSync(gDisplayListHead++); gDPLoadBlock(gDisplayListHead++, 7, 0, 0, (0x40 - 1), 0x800); - gSPTextureRectangle(gDisplayListHead++, x << 2, y << 2, (x + 8) << 2, (y + 8) << 2, 0, 0, 0, 0x400, 0x400); + gSPTextureRectangle(gDisplayListHead++, x << 2, y << 2, (x + 8) << 2, (y + 8) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); - gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_8b, 1, fontLUT[0xE9]); + gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_8b, 1, fontLUT[DIALOG_CHAR_UMLAUT]); gDPLoadSync(gDisplayListHead++); gDPLoadBlock(gDisplayListHead++, 7, 0, 0, (0x40 - 1), 0x800); - gSPTextureRectangle(gDisplayListHead++, x << 2, (y - 4) << 2, (x + 8) << 2, (y + 4) << 2, 0, 0, 0, 0x400, 0x400); + gSPTextureRectangle(gDisplayListHead++, x << 2, (y - 4) << 2, (x + 8) << 2, (y + 4) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); } #endif -void PrintRegularText(s16 x, s16 y, const u8 *str) { +void print_menu_generic_string(s16 x, s16 y, const u8 *str) { UNUSED s8 mark = DIALOG_MARK_NONE; // unused in EU s32 strPos = 0; s32 curX = x; s32 curY = y; - void **fontLUT = segmented_to_virtual(main_menu_seg7_table_0700CD08); + void **fontLUT = segmented_to_virtual(menu_font_lut); while (str[strPos] != DIALOG_CHAR_TERMINATOR) { switch (str[strPos]) { #ifdef VERSION_EU case DIALOG_CHAR_UPPER_A_UMLAUT: - put_menu_char_umlaut(curX, curY, ASCII_TO_DIALOG('A')); + print_menu_char_umlaut(curX, curY, ASCII_TO_DIALOG('A')); curX += gDialogCharWidths[str[strPos]]; break; case DIALOG_CHAR_UPPER_U_UMLAUT: - put_menu_char_umlaut(curX, curY, ASCII_TO_DIALOG('U')); + print_menu_char_umlaut(curX, curY, ASCII_TO_DIALOG('U')); curX += gDialogCharWidths[str[strPos]]; break; case DIALOG_CHAR_UPPER_O_UMLAUT: - put_menu_char_umlaut(curX, curY, ASCII_TO_DIALOG('O')); + print_menu_char_umlaut(curX, curY, ASCII_TO_DIALOG('O')); curX += gDialogCharWidths[str[strPos]]; break; #else @@ -720,7 +662,7 @@ void PrintRegularText(s16 x, s16 y, const u8 *str) { mark = DIALOG_MARK_HANDAKUTEN; break; #endif - case HUD_CHAR_SPACE: + case DIALOG_CHAR_SPACE: curX += 4; break; default: @@ -728,7 +670,7 @@ void PrintRegularText(s16 x, s16 y, const u8 *str) { gDPLoadSync(gDisplayListHead++); gDPLoadBlock(gDisplayListHead++, 7, 0, 0, (0x40 - 1), 0x800); gSPTextureRectangle(gDisplayListHead++, curX << 2, curY << 2, (curX + 8) << 2, - (curY + 8) << 2, 0, 0, 0, 0x400, 0x400); + (curY + 8) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); #ifndef VERSION_EU if (mark != DIALOG_MARK_NONE) { @@ -736,7 +678,7 @@ void PrintRegularText(s16 x, s16 y, const u8 *str) { gDPLoadSync(gDisplayListHead++); gDPLoadBlock(gDisplayListHead++, 7, 0, 0, (0x40 - 1), 0x800); gSPTextureRectangle(gDisplayListHead++, (curX + 6) << 2, (curY - 7) << 2, - (curX + 14) << 2, (curY + 1) << 2, 0, 0, 0, 0x400, 0x400); + (curX + 14) << 2, (curY + 1) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); mark = DIALOG_MARK_NONE; } @@ -751,9 +693,9 @@ void PrintRegularText(s16 x, s16 y, const u8 *str) { } } -void print_credits_str_dialog(s16 x, s16 y, const u8 *str) { +void print_credits_string(s16 x, s16 y, const u8 *str) { s32 strPos = 0; - void **fontLUT = segmented_to_virtual(seg2_credits_font_lut); + void **fontLUT = segmented_to_virtual(main_credits_font_lut); u32 curX = x; u32 curY = y; @@ -762,9 +704,9 @@ void print_credits_str_dialog(s16 x, s16 y, const u8 *str) { gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 2, 0, 0, 0, 2, 3, 0, 2, 3, 0); gDPSetTileSize(gDisplayListHead++, 0, 0, 0, (8 - 1) << 2, (8 - 1) << 2); - while (str[strPos] != DIALOG_CHAR_TERMINATOR) { + while (str[strPos] != GLOBAR_CHAR_TERMINATOR) { switch (str[strPos]) { - case DIALOG_CHAR_SPACE: + case GLOBAL_CHAR_SPACE: curX += 4; break; default: @@ -773,7 +715,7 @@ void print_credits_str_dialog(s16 x, s16 y, const u8 *str) { gDPLoadSync(gDisplayListHead++); gDPLoadBlock(gDisplayListHead++, 7, 0, 0, (0x40 - 1), 0x400); gSPTextureRectangle(gDisplayListHead++, curX << 2, curY << 2, (curX + 8) << 2, - (curY + 8) << 2, 0, 0, 0, 0x400, 0x400); + (curY + 8) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); curX += 7; break; } @@ -781,56 +723,56 @@ void print_credits_str_dialog(s16 x, s16 y, const u8 *str) { } } -void handleMenuScrolling(s8 scrollDirection, s8 *currentIndex, s8 minIndex, s8 maxIndex) { - u8 sp1f = 0; +void handle_menu_scrolling(s8 scrollDirection, s8 *currentIndex, s8 minIndex, s8 maxIndex) { + u8 index = 0; if (scrollDirection == MENU_SCROLL_VERTICAL) { if (gPlayer3Controller->rawStickY > 60) { - sp1f++; + index++; } if (gPlayer3Controller->rawStickY < -60) { - sp1f += 2; + index += 2; } } else if (scrollDirection == MENU_SCROLL_HORIZONTAL) { if (gPlayer3Controller->rawStickX > 60) { - sp1f += 2; + index += 2; } if (gPlayer3Controller->rawStickX < -60) { - sp1f++; + index++; } } - if (((sp1f ^ D_80330438) & sp1f) == 2) { + if (((index ^ gMenuHoldKeyIndex) & index) == 2) { if (currentIndex[0] == maxIndex) { //! Probably originally a >=, but later replaced with an == and an else statement. currentIndex[0] = maxIndex; } else { - play_sound(SOUND_MENU_CHANGESELECT, gDefaultSoundArgs); + play_sound(SOUND_MENU_CHANGE_SELECT, gDefaultSoundArgs); currentIndex[0]++; } } - if (((sp1f ^ D_80330438) & sp1f) == 1) { + if (((index ^ gMenuHoldKeyIndex) & index) == 1) { if (currentIndex[0] == minIndex) { // Same applies to here as above } else { - play_sound(SOUND_MENU_CHANGESELECT, gDefaultSoundArgs); + play_sound(SOUND_MENU_CHANGE_SELECT, gDefaultSoundArgs); currentIndex[0]--; } } - if (D_8033043C == 10) { - D_8033043C = 8; - D_80330438 = 0; + if (gMenuHoldKeyTimer == 10) { + gMenuHoldKeyTimer = 8; + gMenuHoldKeyIndex = 0; } else { - D_8033043C++; - D_80330438 = sp1f; + gMenuHoldKeyTimer++; + gMenuHoldKeyIndex = index; } - if ((sp1f & 3) == 0) { - D_8033043C = 0; + if ((index & 3) == 0) { + gMenuHoldKeyTimer = 0; } } @@ -874,7 +816,7 @@ s16 get_str_x_pos_from_center_scale(s16 centerPos, u8 *str, f32 scale) { #endif #ifndef VERSION_JP -s16 get_str_width(u8 *str) { +s16 get_string_width(u8 *str) { s16 strPos = 0; s16 width = 0; @@ -886,45 +828,45 @@ s16 get_str_width(u8 *str) { } #endif -u8 gHudSymCoin[] = { HUD_CHAR_SYM_COIN, 0xFF }; -u8 gHudSymX[] = { HUD_CHAR_SYM_X, 0xFF }; +u8 gHudSymCoin[] = { GLYPH_COIN, GLYPH_SPACE }; +u8 gHudSymX[] = { GLYPH_MULTIPLY, GLYPH_SPACE }; -void ShowCoins(s32 useCourseCoinScore, s8 sp27, s8 sp2b, s16 x, s16 y) { +void print_hud_my_score_coins(s32 useCourseCoinScore, s8 fileNum, s8 courseNum, s16 x, s16 y) { u8 strNumCoins[4]; s16 numCoins; if (!useCourseCoinScore) { - numCoins = (u16)(save_file_get_max_coin_score(sp2b) & 0xFFFF); + numCoins = (u16)(save_file_get_max_coin_score(courseNum) & 0xFFFF); } else { - numCoins = save_file_get_course_coin_score(sp27, sp2b); + numCoins = save_file_get_course_coin_score(fileNum, courseNum); } if (numCoins != 0) { - PutString(2, x, y, gHudSymCoin); - PutString(2, x + 16, y, gHudSymX); - Int2Str(numCoins, strNumCoins); - PutString(2, x + 32, y, strNumCoins); + print_hud_lut_string(HUD_LUT_GLOBAL, x, y, gHudSymCoin); + print_hud_lut_string(HUD_LUT_GLOBAL, x + 16, y, gHudSymX); + int_to_str(numCoins, strNumCoins); + print_hud_lut_string(HUD_LUT_GLOBAL, x + 32, y, strNumCoins); } } -void ShowStars(s8 sp2b, s8 sp2f, s16 x, s16 y) { +void print_hud_my_score_stars(s8 fileNum, s8 courseNum, s16 x, s16 y) { u8 strStarCount[4]; s16 starCount; - u8 textSymStar[] = { HUD_CHAR_SYM_STAR, 0xFF }; + u8 textSymStar[] = { GLYPH_STAR, GLYPH_SPACE }; UNUSED u16 unused; - u8 textSymX[] = { HUD_CHAR_SYM_X, 0xFF }; + u8 textSymX[] = { GLYPH_MULTIPLY, GLYPH_SPACE }; - starCount = save_file_get_course_star_count(sp2b, sp2f); + starCount = save_file_get_course_star_count(fileNum, courseNum); if (starCount != 0) { - PutString(2, x, y, textSymStar); - PutString(2, x + 16, y, textSymX); - Int2Str(starCount, strStarCount); - PutString(2, x + 32, y, strStarCount); + print_hud_lut_string(HUD_LUT_GLOBAL, x, y, textSymStar); + print_hud_lut_string(HUD_LUT_GLOBAL, x + 16, y, textSymX); + int_to_str(starCount, strStarCount); + print_hud_lut_string(HUD_LUT_GLOBAL, x + 32, y, strStarCount); } } -void Int2Str(s32 num, u8 *dst) { +void int_to_str(s32 num, u8 *dst) { s32 digit1; s32 digit2; s32 digit3; @@ -957,38 +899,37 @@ s16 get_dialog_id(void) { return gDialogID; } -void func_802D7F90(s16 a0) { +void create_dialog_box(s16 dialog) { if (gDialogID == -1) { - gDialogID = a0; + gDialogID = dialog; gDialogBoxType = DIALOG_TYPE_ROTATE; } } -void func_802D7FCC(s16 a0, s32 a1) { +void create_dialog_box_with_var(s16 dialog, s32 dialogVar) { if (gDialogID == -1) { - gDialogID = a0; - gDialogVariable = a1; + gDialogID = dialog; + gDialogVariable = dialogVar; gDialogBoxType = DIALOG_TYPE_ROTATE; } } -void CreateTextBox(s16 a0) { +void create_dialog_inverted_box(s16 dialog) { if (gDialogID == -1) { - gDialogID = a0; + gDialogID = dialog; gDialogBoxType = DIALOG_TYPE_ZOOM; } } -void func_802D8050(s16 a0) { +void create_dialog_box_with_response(s16 dialog) { if (gDialogID == -1) { - gDialogID = a0; + gDialogID = dialog; gDialogBoxType = DIALOG_TYPE_ROTATE; - D_80330434 = 1; + gLastDialogResponse = 1; } } -// reset_dialog_state? -void func_802D8098(void) { +void reset_dialog_render_state(void) { level_set_transition(0, 0); if (gDialogBoxType == DIALOG_TYPE_ZOOM) { @@ -999,8 +940,8 @@ void func_802D8098(void) { gDialogBoxOpenTimer = 90.0f; gDialogBoxState = DIALOG_STATE_OPENING; gDialogID = -1; - D_8033042C = 0; - D_80330434 = 0; + gDialogTextPos = 0; + gLastDialogResponse = 0; gLastDialogPageStrPos = 0; gDialogResponse = 0; } @@ -1015,47 +956,47 @@ void func_802D8098(void) { #define Y_VAL2 5.0f #endif -void func_802D8134(struct DialogEntry *dialog, s8 sp47) { +void render_dialog_box_type(struct DialogEntry *dialog, s8 linesPerBox) { UNUSED s32 unused; - dl_add_new_translation_matrix(2, dialog->leftOffset, dialog->width, 0); + create_dl_translation_matrix(MENU_MTX_NOPUSH, dialog->leftOffset, dialog->width, 0); switch (gDialogBoxType) { - case DIALOG_TYPE_ROTATE: + case DIALOG_TYPE_ROTATE: // Renders a dialog black box with zoom and rotation if (gDialogBoxState == DIALOG_STATE_OPENING || gDialogBoxState == DIALOG_STATE_CLOSING) { - dl_add_new_scale_matrix(2, 1.0 / gDialogBoxScale, 1.0 / gDialogBoxScale, 1.0f); - dl_add_new_rotation_matrix(2, gDialogBoxOpenTimer * 4.0f, 0, 0, 1.0f); // convert the speed into angle + create_dl_scale_matrix(MENU_MTX_NOPUSH, 1.0 / gDialogBoxScale, 1.0 / gDialogBoxScale, 1.0f); + // convert the speed into angle + create_dl_rotation_matrix(MENU_MTX_NOPUSH, gDialogBoxOpenTimer * 4.0f, 0, 0, 1.0f); } gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, 0x96); break; - case DIALOG_TYPE_ZOOM: + case DIALOG_TYPE_ZOOM: // Renders a dialog white box with zoom if (gDialogBoxState == DIALOG_STATE_OPENING || gDialogBoxState == DIALOG_STATE_CLOSING) { - dl_add_new_translation_matrix(2, 65.0 - (65.0 / gDialogBoxScale), + create_dl_translation_matrix(MENU_MTX_NOPUSH, 65.0 - (65.0 / gDialogBoxScale), (40.0 / gDialogBoxScale) - 40, 0); - dl_add_new_scale_matrix(2, 1.0 / gDialogBoxScale, 1.0 / gDialogBoxScale, 1.0f); + create_dl_scale_matrix(MENU_MTX_NOPUSH, 1.0 / gDialogBoxScale, 1.0 / gDialogBoxScale, 1.0f); } gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 0x96); break; } - dl_add_new_translation_matrix(1, X_VAL1, Y_VAL1, 0); - dl_add_new_scale_matrix(2, 1.1f, ((f32) sp47 / Y_VAL2) + 0.1, 1.0f); + create_dl_translation_matrix(MENU_MTX_PUSH, X_VAL1, Y_VAL1, 0); + create_dl_scale_matrix(MENU_MTX_NOPUSH, 1.1f, ((f32) linesPerBox / Y_VAL2) + 0.1, 1.0f); gSPDisplayList(gDisplayListHead++, dl_draw_text_bg_box); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); } -// EU: func_802AEFF8 -void func_802D8450(s8 a0, s8 a1) { - u8 sp17; +void change_and_flash_dialog_text_color_lines(s8 colorMode, s8 lineNum) { + u8 colorFade; - if (a0 == 1) { - if (a1 == 1) { + if (colorMode == 1) { + if (lineNum == 1) { gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); } else { - if (a1 == D_80330430) { - sp17 = (gSineTable[D_80360080 >> 4] * 50.0f) + 200.0f; - gDPSetEnvColor(gDisplayListHead++, sp17, sp17, sp17, 255); + if (lineNum == gDialogLineNum) { + colorFade = (gSineTable[gDialogColorFadeTimer >> 4] * 50.0f) + 200.0f; + gDPSetEnvColor(gDisplayListHead++, colorFade, colorFade, colorFade, 255); } else { gDPSetEnvColor(gDisplayListHead++, 200, 200, 200, 255); } @@ -1072,14 +1013,14 @@ void func_802D8450(s8 a0, s8 a1) { } #ifdef VERSION_EU -void func_eu_802AF1B8(struct DialogEntry *dialog, s16 x, s16 y, u8 c) { +void render_generic_dialog_char_at_pos(struct DialogEntry *dialog, s16 x, s16 y, u8 c) { s16 width; // sp26 s16 height; // sp24 s16 tmpX; s16 tmpY; s16 xCoord; // sp1E s16 yCoord; // sp1C - void **smallFontLUT; + void **fontLUT; void *packedTexture; void *unpackedTexture; @@ -1090,14 +1031,14 @@ void func_eu_802AF1B8(struct DialogEntry *dialog, s16 x, s16 y, u8 c) { xCoord = (tmpX + (x / gDialogBoxScale)); yCoord = (tmpY + (y / gDialogBoxScale)); - smallFontLUT = segmented_to_virtual(seg2_small_font_lut); - packedTexture = segmented_to_virtual(smallFontLUT[c]); + fontLUT = segmented_to_virtual(main_font_lut); + packedTexture = segmented_to_virtual(fontLUT[c]); unpackedTexture = alloc_ia4_tex_from_i1(packedTexture, 8, 8); gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, VIRTUAL_TO_PHYSICAL(unpackedTexture)); gSPDisplayList(gDisplayListHead++, dl_ia8_render_char); gSPTextureRectangleFlip(gDisplayListHead++, xCoord << 2, (yCoord - height) << 2, - (xCoord + width) << 2, yCoord << 2, 0, 0x200, 0x100, 0x400, 0x400); + (xCoord + width) << 2, yCoord << 2, G_TX_RENDERTILE, 16 << 5, 8 << 5, 1 << 10, 1 << 10); } #endif @@ -1110,49 +1051,49 @@ void func_eu_802AF1B8(struct DialogEntry *dialog, s16 x, s16 y, u8 c) { #endif #ifdef VERSION_EU -void func_802D8690(s8 lineNum, s8 sp27, s8 *sp28, s8 *sp2c) +void handle_dialog_scroll_page_state(s8 lineNum, s8 totalLines, s8 *pageState, s8 *xMatrix) #else -void func_802D8690(s8 lineNum, s8 sp27, s8 *sp28, s8 *sp2c, s16 *sp30) +void handle_dialog_scroll_page_state(s8 lineNum, s8 totalLines, s8 *pageState, s8 *xMatrix, s16 *linePos) #endif { #ifndef VERSION_EU gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); #endif - if (lineNum == sp27) { - sp28[0] = 1; + if (lineNum == totalLines) { + pageState[0] = DIALOG_PAGE_STATE_SCROLL; return; } #ifdef VERSION_EU gDialogY += 16; #else - dl_add_new_translation_matrix(1, X_VAL3, 2 - (lineNum * Y_VAL3), 0); + create_dl_translation_matrix(MENU_MTX_PUSH, X_VAL3, 2 - (lineNum * Y_VAL3), 0); - sp30[0] = 0; + linePos[0] = 0; #endif - sp2c[0] = 1; + xMatrix[0] = 1; } #ifdef VERSION_JP -void func_802D875C(s8 *sp20, s16 *sp24) { - if (sp24[0] != 0) { - dl_add_new_translation_matrix(2, sp20[0] * 10, 0, 0); +void adjust_handakuten_char_pos(s8 *xMatrix, s16 *linePos) { + if (linePos[0] != 0) { + create_dl_translation_matrix(MENU_MTX_NOPUSH, xMatrix[0] * 10, 0, 0); } - dl_add_new_translation_matrix(1, -2.0f, -5.0f, 0); + create_dl_translation_matrix(MENU_MTX_PUSH, -2.0f, -5.0f, 0); render_generic_char(DIALOG_CHAR_PREFIX_HANDAKUTEN); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - sp24[0]++; - sp20[0] = 1; + linePos[0]++; + xMatrix[0] = 1; } #endif #ifdef VERSION_EU -void func_eu_802AF478(struct DialogEntry *dialog, s8 *sp24) +void render_star_count_dialog_text(struct DialogEntry *dialog, s8 *linePos) #else -void func_802D8830(s8 *sp20, s16 *sp24) +void render_star_count_dialog_text(s8 *xMatrix, s16 *linePos) #endif { s8 tensDigit = gDialogVariable / 10; @@ -1160,59 +1101,59 @@ void func_802D8830(s8 *sp20, s16 *sp24) if (tensDigit != 0) { #ifdef VERSION_JP - dl_add_new_translation_matrix(2, sp20[0] * 10, 0, 0); + create_dl_translation_matrix(MENU_MTX_NOPUSH, xMatrix[0] * 10, 0, 0); render_generic_char(tensDigit); #elif defined(VERSION_EU) - func_eu_802AF1B8(dialog, gDialogX, gDialogY, tensDigit); + render_generic_dialog_char_at_pos(dialog, gDialogX, gDialogY, tensDigit); gDialogX += gDialogCharWidths[tensDigit]; - sp24[0] = 1; + linePos[0] = 1; #else - if (sp20[0] != 1) { - dl_add_new_translation_matrix(2, (f32)(gDialogCharWidths[DIALOG_CHAR_SPACE] * sp20[0]), 0, 0); + if (xMatrix[0] != 1) { + create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[DIALOG_CHAR_SPACE] * xMatrix[0]), 0, 0); } render_generic_char(tensDigit); - dl_add_new_translation_matrix(2, (f32) gDialogCharWidths[tensDigit], 0, 0); - sp20[0] = 1; - sp24[0]++; + create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32) gDialogCharWidths[tensDigit], 0, 0); + xMatrix[0] = 1; + linePos[0]++; #endif } #ifndef VERSION_EU else { #ifdef VERSION_JP - sp20[0]++; + xMatrix[0]++; #endif } #endif #ifdef VERSION_EU - func_eu_802AF1B8(dialog, gDialogX, gDialogY, onesDigit); + render_generic_dialog_char_at_pos(dialog, gDialogX, gDialogY, onesDigit); gDialogX += gDialogCharWidths[onesDigit]; - sp24[0] = 1; + linePos[0] = 1; #else #ifdef VERSION_JP - dl_add_new_translation_matrix(2, sp20[0] * 10, 0, 0); + create_dl_translation_matrix(MENU_MTX_NOPUSH, xMatrix[0] * 10, 0, 0); render_generic_char(onesDigit); #else - if (sp20[0] != 1) { - dl_add_new_translation_matrix(2, (f32)(gDialogCharWidths[DIALOG_CHAR_SPACE] * (sp20[0] - 1)), 0, 0); + if (xMatrix[0] != 1) { + create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[DIALOG_CHAR_SPACE] * (xMatrix[0] - 1)), 0, 0); } render_generic_char(onesDigit); - dl_add_new_translation_matrix(2, (f32) gDialogCharWidths[onesDigit], 0, 0); + create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32) gDialogCharWidths[onesDigit], 0, 0); #endif - sp24[0]++; - sp20[0] = 1; + linePos[0]++; + xMatrix[0] = 1; #endif } #ifndef VERSION_JP #ifdef VERSION_EU -void func_eu_802AF590(s8 multiTextId, s8 a1, s8 a3, UNUSED s16 a2, s8 lowerBound, struct DialogEntry *dialog) +void render_multi_text_string_lines(s8 multiTextId, s8 lineNum, s8 linesPerBox, UNUSED s16 linePos, s8 lowerBound, struct DialogEntry *dialog) #else -void func_u_802D9634(s8 multiTextId, s8 a1, s16 *a2, s8 a3, s8 sp10, s8 lowerBound) +void render_multi_text_string_lines(s8 multiTextId, s8 lineNum, s16 *linePos, s8 linesPerBox, s8 xMatrix, s8 lowerBound) #endif { s8 i; @@ -1221,116 +1162,118 @@ void func_u_802D9634(s8 multiTextId, s8 a1, s16 *a2, s8 a3, s8 sp10, s8 lowerBou { 3, { TEXT_YOU_RAW } }, }; - if (a1 >= lowerBound && a1 <= (lowerBound + a3)) { + if (lineNum >= lowerBound && lineNum <= (lowerBound + linesPerBox)) { #ifdef VERSION_US - if (a2[0] != 0 || (sp10 != 1)) { - dl_add_new_translation_matrix(2, (gDialogCharWidths[DIALOG_CHAR_SPACE] * (sp10 - 1)), 0, 0); + if (linePos[0] != 0 || (xMatrix != 1)) { + create_dl_translation_matrix(MENU_MTX_NOPUSH, (gDialogCharWidths[DIALOG_CHAR_SPACE] * (xMatrix - 1)), 0, 0); } #endif for (i = 0; i < textLengths[multiTextId].length; i++) { #ifdef VERSION_EU - func_eu_802AF1B8(dialog, gDialogX, gDialogY, textLengths[multiTextId].str[i]); + render_generic_dialog_char_at_pos(dialog, gDialogX, gDialogY, textLengths[multiTextId].str[i]); gDialogX += gDialogCharWidths[textLengths[multiTextId].str[i]]; #else render_generic_char(textLengths[multiTextId].str[i]); - dl_add_new_translation_matrix(2, (gDialogCharWidths[textLengths[multiTextId].str[i]]), 0, 0); + create_dl_translation_matrix(MENU_MTX_NOPUSH, (gDialogCharWidths[textLengths[multiTextId].str[i]]), 0, 0); #endif } } #ifdef VERSION_US - a2 += textLengths[multiTextId].length; + linePos += textLengths[multiTextId].length; #endif } #endif #ifdef VERSION_EU -void func_eu_802AF6D4(struct DialogEntry *dialog, u8 chr, u8 diacritic) { - func_eu_802AF1B8(dialog, gDialogX, gDialogY, chr); - func_eu_802AF1B8(dialog, gDialogX, gDialogY, diacritic + 0xE7); +void render_dialog_lowercase_diacritic(struct DialogEntry *dialog, u8 chr, u8 diacritic) { + render_generic_dialog_char_at_pos(dialog, gDialogX, gDialogY, chr); + render_generic_dialog_char_at_pos(dialog, gDialogX, gDialogY, diacritic + 0xE7); gDialogX += gDialogCharWidths[chr]; } -void func_eu_802AF758(struct DialogEntry *dialog, u8 chr, u8 diacritic) { - func_eu_802AF1B8(dialog, gDialogX, gDialogY, chr); - func_eu_802AF1B8(dialog, gDialogX, gDialogY - 4, diacritic + 0xE3); +void render_dialog_uppercase_diacritic(struct DialogEntry *dialog, u8 chr, u8 diacritic) { + render_generic_dialog_char_at_pos(dialog, gDialogX, gDialogY, chr); + render_generic_dialog_char_at_pos(dialog, gDialogX, gDialogY - 4, diacritic + 0xE3); gDialogX += gDialogCharWidths[chr]; } #endif -u32 func_802D8954(s16 a0) { - if (a0 < 0) { - a0 = 0; +u32 ensure_nonnegative(s16 value) { + if (value < 0) { + value = 0; } - return a0; + return value; } #if defined(VERSION_EU) && !defined(NON_MATCHING) // TODO: EU is not quite matching -void func_802D8980(s8 sp63, struct DialogEntry *dialog, s8 sp5B); -GLOBAL_ASM("asm/non_matchings/func_802AF808_eu.s") +void handle_dialog_text_and_pages(s8 colorMode, struct DialogEntry *dialog, s8 lowerBound); +GLOBAL_ASM("asm/non_matchings/handle_dialog_text_and_pages_eu.s") #else #ifdef VERSION_JP -void func_802D8980(s8 sp63, struct DialogEntry *dialog) +void handle_dialog_text_and_pages(s8 colorMode, struct DialogEntry *dialog) #else -void func_802D8980(s8 sp63, struct DialogEntry *dialog, s8 sp5B) +void handle_dialog_text_and_pages(s8 colorMode, struct DialogEntry *dialog, s8 lowerBound) #endif { - UNUSED s32 u0, u1; // a guess? + UNUSED s32 pad[2]; - u8 strChar; // sp4F; + u8 strChar; - u8 *str = (u8 *) segmented_to_virtual(dialog->str); // sp48 - s8 lineNum = 1; // sp47 in US + u8 *str = segmented_to_virtual(dialog->str); + s8 lineNum = 1; s8 totalLines; - s8 sp4d_45 = 0; // EU sp5d + s8 pageState = DIALOG_PAGE_STATE_NONE; UNUSED s8 mark = DIALOG_MARK_NONE; // unused in US, EU - s8 sp4b_43 = 1; + s8 xMatrix = 1; - s8 linesPerBox = dialog->linesPerBox; // sp42 + s8 linesPerBox = dialog->linesPerBox; - s16 strIdx; // sp40, EU: s7 + s16 strIdx; #ifndef VERSION_EU - s16 linePos; // sp3E - - linePos = 0; + s16 linePos = 0; #endif - if (gDialogBoxState == DIALOG_STATE_SCROLLING) { - totalLines = (linesPerBox * 2) + 1; // if scrolling, consider the number of lines for both - // the current page and the page being scrolled to. + if (gDialogBoxState == DIALOG_STATE_HORIZONTAL) { + // If scrolling, consider the number of lines for both + // the current page and the page being scrolled to. + totalLines = linesPerBox * 2 + 1; } else { totalLines = linesPerBox + 1; } gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - strIdx = D_8033042C; + strIdx = gDialogTextPos; #ifdef VERSION_EU gDialogX = 0; + + // If this is turned into "gDialogY2 = 14;" with a symbol gDialogY2 that + // alises gDialogY the code matches... gDialogY = 14; #endif - if (gDialogBoxState == DIALOG_STATE_SCROLLING) { + if (gDialogBoxState == DIALOG_STATE_HORIZONTAL) { #ifdef VERSION_EU gDialogY -= gDialogScrollOffsetY; #else - dl_add_new_translation_matrix(2, 0, (f32) gDialogScrollOffsetY, 0); + create_dl_translation_matrix(MENU_MTX_NOPUSH, 0, (f32) gDialogScrollOffsetY, 0); #endif } #ifndef VERSION_EU - dl_add_new_translation_matrix(1, X_VAL3, 2 - lineNum * Y_VAL3, 0); + create_dl_translation_matrix(MENU_MTX_PUSH, X_VAL3, 2 - lineNum * Y_VAL3, 0); #endif - while (sp4d_45 == 0) { - func_802D8450(sp63, lineNum); + while (pageState == DIALOG_PAGE_STATE_NONE) { + change_and_flash_dialog_text_color_lines(colorMode, lineNum); strChar = str[strIdx]; switch (strChar) { case DIALOG_CHAR_TERMINATOR: - sp4d_45 = 2; + pageState = DIALOG_PAGE_STATE_END; #ifndef VERSION_EU gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); #endif @@ -1338,56 +1281,56 @@ void func_802D8980(s8 sp63, struct DialogEntry *dialog, s8 sp5B) case DIALOG_CHAR_NEWLINE: lineNum++; #ifdef VERSION_EU - func_802D8690(lineNum, totalLines, &sp4d_45, &sp4b_43); + handle_dialog_scroll_page_state(lineNum, totalLines, &pageState, &xMatrix); gDialogX = 0; #else - func_802D8690(lineNum, totalLines, &sp4d_45, &sp4b_43, &linePos); + handle_dialog_scroll_page_state(lineNum, totalLines, &pageState, &xMatrix, &linePos); #endif break; #ifdef VERSION_EU case DIALOG_CHAR_LOWER_A_GRAVE: case DIALOG_CHAR_LOWER_A_CIRCUMFLEX: case DIALOG_CHAR_LOWER_A_UMLAUT: - func_eu_802AF6D4(dialog, ASCII_TO_DIALOG('a'), strChar & 0xF); + render_dialog_lowercase_diacritic(dialog, ASCII_TO_DIALOG('a'), strChar & 0xF); break; case DIALOG_CHAR_UPPER_A_GRAVE: case DIALOG_CHAR_UPPER_A_CIRCUMFLEX: case DIALOG_CHAR_UPPER_A_UMLAUT: - func_eu_802AF758(dialog, ASCII_TO_DIALOG('A'), strChar & 0xF); + render_dialog_uppercase_diacritic(dialog, ASCII_TO_DIALOG('A'), strChar & 0xF); break; case DIALOG_CHAR_LOWER_E_GRAVE: case DIALOG_CHAR_LOWER_E_CIRCUMFLEX: case DIALOG_CHAR_LOWER_E_UMLAUT: case DIALOG_CHAR_LOWER_E_ACUTE: - func_eu_802AF6D4(dialog, ASCII_TO_DIALOG('e'), strChar & 0xF); + render_dialog_lowercase_diacritic(dialog, ASCII_TO_DIALOG('e'), strChar & 0xF); break; case DIALOG_CHAR_UPPER_E_GRAVE: case DIALOG_CHAR_UPPER_E_CIRCUMFLEX: case DIALOG_CHAR_UPPER_E_UMLAUT: case DIALOG_CHAR_UPPER_E_ACUTE: - func_eu_802AF758(dialog, ASCII_TO_DIALOG('E'), strChar & 0xF); + render_dialog_uppercase_diacritic(dialog, ASCII_TO_DIALOG('E'), strChar & 0xF); break; case DIALOG_CHAR_LOWER_U_GRAVE: case DIALOG_CHAR_LOWER_U_CIRCUMFLEX: case DIALOG_CHAR_LOWER_U_UMLAUT: - func_eu_802AF6D4(dialog, ASCII_TO_DIALOG('u'), strChar & 0xF); + render_dialog_lowercase_diacritic(dialog, ASCII_TO_DIALOG('u'), strChar & 0xF); break; case DIALOG_CHAR_UPPER_U_GRAVE: case DIALOG_CHAR_UPPER_U_CIRCUMFLEX: case DIALOG_CHAR_UPPER_U_UMLAUT: - func_eu_802AF758(dialog, ASCII_TO_DIALOG('U'), strChar & 0xF); + render_dialog_uppercase_diacritic(dialog, ASCII_TO_DIALOG('U'), strChar & 0xF); break; case DIALOG_CHAR_LOWER_O_CIRCUMFLEX: case DIALOG_CHAR_LOWER_O_UMLAUT: - func_eu_802AF6D4(dialog, ASCII_TO_DIALOG('o'), strChar & 0xF); + render_dialog_lowercase_diacritic(dialog, ASCII_TO_DIALOG('o'), strChar & 0xF); break; case DIALOG_CHAR_UPPER_O_CIRCUMFLEX: case DIALOG_CHAR_UPPER_O_UMLAUT: - func_eu_802AF758(dialog, ASCII_TO_DIALOG('O'), strChar & 0xF); + render_dialog_uppercase_diacritic(dialog, ASCII_TO_DIALOG('O'), strChar & 0xF); break; case DIALOG_CHAR_LOWER_I_CIRCUMFLEX: case DIALOG_CHAR_LOWER_I_UMLAUT: - func_eu_802AF6D4(dialog, DIALOG_CHAR_I_NO_DIA, strChar & 0xF); + render_dialog_lowercase_diacritic(dialog, DIALOG_CHAR_I_NO_DIA, strChar & 0xF); break; #else case DIALOG_CHAR_PREFIX_DAKUTEN: @@ -1404,102 +1347,102 @@ void func_802D8980(s8 sp63, struct DialogEntry *dialog, s8 sp5B) #ifdef VERSION_JP if (linePos != 0) { #endif - sp4b_43++; + xMatrix++; #ifdef VERSION_JP } #endif linePos++; - + #endif break; #ifdef VERSION_JP case DIALOG_CHAR_HANDAKUTEN: - func_802D875C(&sp4b_43, &linePos); + adjust_handakuten_char_pos(&xMatrix, &linePos); break; #else - case 0xD0: // '/' + case DIALOG_CHAR_SLASH: #ifdef VERSION_EU gDialogX += gDialogCharWidths[DIALOG_CHAR_SPACE] * 2; #else - sp4b_43 += 2; + xMatrix += 2; linePos += 2; #endif break; case DIALOG_CHAR_MULTI_THE: #ifdef VERSION_EU - func_eu_802AF590(0, lineNum, linesPerBox, sp4b_43, sp5B, dialog); + render_multi_text_string_lines(STRING_THE, lineNum, linesPerBox, xMatrix, lowerBound, dialog); #else - func_u_802D9634(0, lineNum, &linePos, linesPerBox, sp4b_43, sp5B); + render_multi_text_string_lines(STRING_THE, lineNum, &linePos, linesPerBox, xMatrix, lowerBound); #endif - sp4b_43 = 1; + xMatrix = 1; break; case DIALOG_CHAR_MULTI_YOU: #ifdef VERSION_EU - func_eu_802AF590(1, lineNum, linesPerBox, sp4b_43, sp5B, dialog); + render_multi_text_string_lines(STRING_YOU, lineNum, linesPerBox, xMatrix, lowerBound, dialog); #else - func_u_802D9634(1, lineNum, &linePos, linesPerBox, sp4b_43, sp5B); + render_multi_text_string_lines(STRING_YOU, lineNum, &linePos, linesPerBox, xMatrix, lowerBound); #endif - sp4b_43 = 1; + xMatrix = 1; break; #endif case DIALOG_CHAR_STAR_COUNT: #ifdef VERSION_EU - func_eu_802AF478(dialog, &sp4b_43); + render_star_count_dialog_text(dialog, &xMatrix); #else - func_802D8830(&sp4b_43, &linePos); + render_star_count_dialog_text(&xMatrix, &linePos); #endif break; #ifdef VERSION_EU case DIALOG_CHAR_DOUBLE_LOW_QUOTE: - func_eu_802AF1B8(dialog, gDialogX, gDialogY + 8, 0xF6); + render_generic_dialog_char_at_pos(dialog, gDialogX, gDialogY + 8, 0xF6); gDialogX += gDialogCharWidths[0xF6]; break; #endif default: // any other character #ifdef VERSION_JP if (linePos != 0) { - dl_add_new_translation_matrix(2, sp4b_43 * 10, 0, 0); + create_dl_translation_matrix(MENU_MTX_NOPUSH, xMatrix * 10, 0, 0); } render_generic_char(strChar); - sp4b_43 = 1; + xMatrix = 1; linePos++; if (mark != 0) { - dl_add_new_translation_matrix(1, 5.0f, 7.0f, 0); + create_dl_translation_matrix(MENU_MTX_PUSH, 5.0f, 7.0f, 0); render_generic_char(mark + 0xEF); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); mark = 0; } -#else - if (lineNum >= sp5B && lineNum <= (sp5B + linesPerBox)) { -#ifdef VERSION_EU - func_eu_802AF1B8(dialog, gDialogX, gDialogY, strChar); - gDialogX += gDialogCharWidths[strChar]; -#else - if (linePos || sp4b_43 != 1) { - dl_add_new_translation_matrix( - 2, (f32)(gDialogCharWidths[DIALOG_CHAR_SPACE] * (sp4b_43 - 1)), 0, 0); +#elif defined(VERSION_US) + if (lineNum >= lowerBound && lineNum <= lowerBound + linesPerBox) { + if (linePos || xMatrix != 1) { + create_dl_translation_matrix( + MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[DIALOG_CHAR_SPACE] * (xMatrix - 1)), 0, 0); } render_generic_char(strChar); - dl_add_new_translation_matrix(2, (f32)(gDialogCharWidths[strChar]), 0, 0); - sp4b_43 = 1; + create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[strChar]), 0, 0); + xMatrix = 1; linePos++; -#endif } +#else // VERSION_EU + if (lineNum >= lowerBound && lineNum <= lowerBound + linesPerBox) { + render_generic_dialog_char_at_pos(dialog, gDialogX, gDialogY, strChar); + } + gDialogX += gDialogCharWidths[strChar]; #endif } #ifdef VERSION_JP if (linePos == 12) { if (str[strIdx + 1] == DIALOG_CHAR_HANDAKUTEN) { - func_802D875C(&sp4b_43, &linePos); + adjust_handakuten_char_pos(&xMatrix, &linePos); strIdx++; } if (str[strIdx + 1] == DIALOG_CHAR_COMMA) { - dl_add_new_translation_matrix(2, sp4b_43 * 10, 0, 0); + create_dl_translation_matrix(MENU_MTX_NOPUSH, xMatrix * 10, 0, 0); render_generic_char(DIALOG_CHAR_COMMA); strIdx++; } @@ -1509,12 +1452,12 @@ void func_802D8980(s8 sp63, struct DialogEntry *dialog, s8 sp5B) } if (str[strIdx + 1] == DIALOG_CHAR_TERMINATOR) { - sp4d_45 = 2; + pageState = DIALOG_PAGE_STATE_END; gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); break; // exit loop } else { lineNum++; - func_802D8690(lineNum, totalLines, &sp4d_45, &sp4b_43, &linePos); + handle_dialog_scroll_page_state(lineNum, totalLines, &pageState, &xMatrix, &linePos); } } #endif @@ -1523,8 +1466,8 @@ void func_802D8980(s8 sp63, struct DialogEntry *dialog, s8 sp5B) } gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); - if (gDialogBoxState == DIALOG_STATE_WAITBUTTON) { - if (sp4d_45 == 2) { + if (gDialogBoxState == DIALOG_STATE_VERTICAL) { + if (pageState == DIALOG_PAGE_STATE_END) { gLastDialogPageStrPos = -1; } else { gLastDialogPageStrPos = strIdx; @@ -1547,12 +1490,12 @@ void func_802D8980(s8 sp63, struct DialogEntry *dialog, s8 sp5B) #define Y_VAL4_2 16 #endif -void func_802D8ED4(void) { - if (gDialogBoxState == DIALOG_STATE_WAITBUTTON) { - handleMenuScrolling(MENU_SCROLL_HORIZONTAL, &D_80330430, 1, 2); +void render_dialog_triangle_choice(void) { + if (gDialogBoxState == DIALOG_STATE_VERTICAL) { + handle_menu_scrolling(MENU_SCROLL_HORIZONTAL, &gDialogLineNum, 1, 2); } - dl_add_new_translation_matrix(2, (D_80330430 * X_VAL4_1) - X_VAL4_2, Y_VAL4_1 - (gLastDialogLineNum * Y_VAL4_2), 0); + create_dl_translation_matrix(MENU_MTX_NOPUSH, (gDialogLineNum * X_VAL4_1) - X_VAL4_2, Y_VAL4_1 - (gLastDialogLineNum * Y_VAL4_2), 0); if (gDialogBoxType == DIALOG_TYPE_ROTATE) { gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); @@ -1580,20 +1523,20 @@ void func_802D8ED4(void) { #define X_Y_VAL6 0.8f #endif -void func_802D9030(s8 sp3b) { - s32 sp34 = gGlobalTimer; +void render_dialog_string_color(s8 linesPerBox) { + s32 timer = gGlobalTimer; - if (sp34 & 0x08) { + if (timer & 0x08) { return; } - dl_add_new_translation_matrix(1, X_VAL5, (sp3b * Y_VAL5_1) + Y_VAL5_2, 0); - dl_add_new_scale_matrix(2, X_Y_VAL6, X_Y_VAL6, 1.0f); - dl_add_new_rotation_matrix(2, -DEFAULT_DIALOG_BOX_ANGLE, 0, 0, 1.0f); + create_dl_translation_matrix(MENU_MTX_PUSH, X_VAL5, (linesPerBox * Y_VAL5_1) + Y_VAL5_2, 0); + create_dl_scale_matrix(MENU_MTX_NOPUSH, X_Y_VAL6, X_Y_VAL6, 1.0f); + create_dl_rotation_matrix(MENU_MTX_NOPUSH, -DEFAULT_DIALOG_BOX_ANGLE, 0, 0, 1.0f); - if (gDialogBoxType == DIALOG_TYPE_ROTATE) { + if (gDialogBoxType == DIALOG_TYPE_ROTATE) { // White Text gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); - } else { + } else { // Black Text gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, 255); } @@ -1601,56 +1544,61 @@ void func_802D9030(s8 sp3b) { gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); } -void func_802D91C0(s16 sp4a) { - // dialog ID tables - s16 sp3c[] = { 0x0011, 0x0072, 0x0080, 0x0075, 0x0096 }; - s16 sp34[] = { 0x0005, 0x0009, 0x0037, 0x00A4 }; - s16 sp28[] = { 0x000A, 0x000B, 0x000C, 0x000D, 0x000E }; -#ifdef VERSION_JP - s16 sp20[] = { 0x0011, 0x0073, 0x0076, 0x0098 }; +void handle_special_dialog_text(s16 dialogID) { // dialog ID tables, in order + // King Bob-omb (Start), Whomp (Start), King Bob-omb (throw him out), Eyerock (Start), Wiggler (Start) + s16 dialogBossStart[] = { 17, 114, 128, 117, 150 }; + // Koopa the Quick (BOB), Koopa the Quick (THI), Penguin Race, Fat Penguin Race (120 stars) + s16 dialogRaceSound[] = { 5, 9, 55, 164 }; + // Red Switch, Green Switch, Blue Switch, 100 coins star, Bowser Red Coin Star + s16 dialogStarSound[] = { 10, 11, 12, 13, 14 }; + // King Bob-omb (Start), Whomp (Defeated), King Bob-omb (Defeated, missing in JP), Eyerock (Defeated), Wiggler (Defeated) +#if BUGFIX_KING_BOB_OMB_FADE_MUSIC + s16 dialogBossStop[] = { 17, 115, 116, 118, 152 }; #else - s16 sp20[] = { 0x0011, 0x0073, 0x0074, 0x0076, 0x0098 }; + //! @bug JP misses King Bob-omb defeated dialog "116", meaning that the boss music will still + //! play after King Bob-omb is defeated until BOB loads it's music after the star cutscene + s16 dialogBossStop[] = { 17, 115, 118, 152 }; #endif s16 i; - for (i = 0; i < (s16) ARRAY_COUNT(sp3c); i++) { - if (sp3c[i] == sp4a) { - func_80320040(0, 60); + 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); return; } } - for (i = 0; i < (s16) ARRAY_COUNT(sp34); i++) { - if (sp34[i] == sp4a && D_80330430 == 1) { + for (i = 0; i < (s16) ARRAY_COUNT(dialogRaceSound); i++) { + if (dialogRaceSound[i] == dialogID && gDialogLineNum == 1) { play_race_fanfare(); return; } } - for (i = 0; i < (s16) ARRAY_COUNT(sp28); i++) { - if (sp28[i] == sp4a && D_80330430 == 1) { - play_sound(SOUND_MENU_STARSOUND, gDefaultSoundArgs); + for (i = 0; i < (s16) ARRAY_COUNT(dialogStarSound); i++) { + if (dialogStarSound[i] == dialogID && gDialogLineNum == 1) { + play_sound(SOUND_MENU_STAR_SOUND, gDefaultSoundArgs); return; } } - for (i = 0; i < (s16) ARRAY_COUNT(sp20); i++) { - if (sp20[i] == sp4a) { - func_8031F7CC(0, 1); + for (i = 0; i < (s16) ARRAY_COUNT(dialogBossStop); i++) { + if (dialogBossStop[i] == dialogID) { + sequence_player_fade_out(0, 1); return; } } } -s16 D_8033047C = -1; +s16 gMenuMode = -1; u8 gEndCutsceneStrEn0[] = { TEXT_FILE_MARIO_EXCLAMATION }; u8 gEndCutsceneStrEn1[] = { TEXT_POWER_STARS_RESTORED }; u8 gEndCutsceneStrEn2[] = { TEXT_THANKS_TO_YOU }; u8 gEndCutsceneStrEn3[] = { TEXT_THANK_YOU_MARIO }; u8 gEndCutsceneStrEn4[] = { TEXT_SOMETHING_SPECIAL }; -u8 gEndCutsceneStrEn5[] = { TEXT_COME_ON_EVERYBODY }; +u8 gEndCutsceneStrEn5[] = { TEXT_LISTEN_EVERYBODY }; u8 gEndCutsceneStrEn6[] = { TEXT_LETS_HAVE_CAKE }; u8 gEndCutsceneStrEn7[] = { TEXT_FOR_MARIO }; u8 gEndCutsceneStrEn8[] = { TEXT_FILE_MARIO_QUESTION }; @@ -1725,8 +1673,8 @@ u16 gCutsceneMsgFade = 0; s16 gCutsceneMsgIndex = -1; s16 gCutsceneMsgDuration = -1; s16 gCutsceneMsgTimer = 0; -s8 D_80330530 = 1; -s8 D_80330534 = 1; +s8 gDialogCameraAngleIndex = CAM_ANGLE_LAKITU_MARIO; +s8 gDialogCourseActNum = 1; #ifdef VERSION_JP #define DIAG_VAL1 20 @@ -1743,14 +1691,14 @@ s8 D_80330534 = 1; #define DIAG_VAL2 240 // JP & US #endif -void func_802D93E0(void) { +void render_dialog_entries(void) { #ifdef VERSION_EU - s8 sp2F; + s8 lowerBound; #endif void **dialogTable; struct DialogEntry *dialog; #ifdef VERSION_US - s8 sp2F; + s8 lowerBound; #endif #ifdef VERSION_EU gInGameLanguage = eu_get_language(); @@ -1785,7 +1733,7 @@ void func_802D93E0(void) { case DIALOG_STATE_OPENING: if (gDialogBoxOpenTimer == DEFAULT_DIALOG_BOX_ANGLE) { play_dialog_sound(gDialogID); - play_sound(SOUND_MENU_MESSAGEAPPEAR, gDefaultSoundArgs); + play_sound(SOUND_MENU_MESSAGE_APPEAR, gDefaultSoundArgs); } if (gDialogBoxType == DIALOG_TYPE_ROTATE) { @@ -1797,52 +1745,52 @@ void func_802D93E0(void) { } if (gDialogBoxOpenTimer == 0.0f) { - gDialogBoxState = DIALOG_STATE_WAITBUTTON; - D_80330430 = 1; + gDialogBoxState = DIALOG_STATE_VERTICAL; + gDialogLineNum = 1; } #ifndef VERSION_JP - sp2F = 1; + lowerBound = 1; #endif break; - case DIALOG_STATE_WAITBUTTON: + case DIALOG_STATE_VERTICAL: gDialogBoxOpenTimer = 0.0f; if ((gPlayer3Controller->buttonPressed & A_BUTTON) || (gPlayer3Controller->buttonPressed & B_BUTTON)) { if (gLastDialogPageStrPos == -1) { - func_802D91C0(gDialogID); + handle_special_dialog_text(gDialogID); gDialogBoxState = DIALOG_STATE_CLOSING; } else { - gDialogBoxState = DIALOG_STATE_SCROLLING; - play_sound(SOUND_MENU_MESSAGENEXTPAGE, gDefaultSoundArgs); + gDialogBoxState = DIALOG_STATE_HORIZONTAL; + play_sound(SOUND_MENU_MESSAGE_NEXT_PAGE, gDefaultSoundArgs); } } #ifndef VERSION_JP - sp2F = 1; + lowerBound = 1; #endif break; - case DIALOG_STATE_SCROLLING: + case DIALOG_STATE_HORIZONTAL: gDialogScrollOffsetY += dialog->linesPerBox * 2; if (gDialogScrollOffsetY >= dialog->linesPerBox * DIAG_VAL1) { - D_8033042C = gLastDialogPageStrPos; - gDialogBoxState = DIALOG_STATE_WAITBUTTON; + gDialogTextPos = gLastDialogPageStrPos; + gDialogBoxState = DIALOG_STATE_VERTICAL; gDialogScrollOffsetY = 0; } #ifndef VERSION_JP - sp2F = (gDialogScrollOffsetY / 16) + 1; + lowerBound = (gDialogScrollOffsetY / 16) + 1; #endif break; case DIALOG_STATE_CLOSING: if (gDialogBoxOpenTimer == 20.0f) { level_set_transition(0, 0); - play_sound(SOUND_MENU_MESSAGEDISAPPEAR, gDefaultSoundArgs); + play_sound(SOUND_MENU_MESSAGE_DISAPPEAR, gDefaultSoundArgs); if (gDialogBoxType == DIALOG_TYPE_ZOOM) { stop_mario(2); } - gDialogResponse = D_80330430; + gDialogResponse = gDialogLineNum; } gDialogBoxOpenTimer = gDialogBoxOpenTimer + 10.0f; @@ -1851,48 +1799,49 @@ void func_802D93E0(void) { if (gDialogBoxOpenTimer == DEFAULT_DIALOG_BOX_ANGLE) { gDialogBoxState = DIALOG_STATE_OPENING; gDialogID = -1; - D_8033042C = 0; - D_80330434 = 0; + gDialogTextPos = 0; + gLastDialogResponse = 0; gLastDialogPageStrPos = 0; gDialogResponse = 0; } #ifndef VERSION_JP - sp2F = 1; + lowerBound = 1; #endif break; } - func_802D8134(dialog, dialog->linesPerBox); + render_dialog_box_type(dialog, dialog->linesPerBox); - gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, func_802D8954(dialog->leftOffset), - func_802D8954(DIAG_VAL2 - dialog->width), + gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, ensure_nonnegative(dialog->leftOffset), + ensure_nonnegative(DIAG_VAL2 - dialog->width), #ifdef VERSION_EU - func_802D8954(dialog->leftOffset + DIAG_VAL3 / gDialogBoxScale), - func_802D8954((240 - dialog->width) + ((dialog->linesPerBox * 80) / DIAG_VAL4) / gDialogBoxScale)); + ensure_nonnegative(dialog->leftOffset + DIAG_VAL3 / gDialogBoxScale), + ensure_nonnegative((240 - dialog->width) + ((dialog->linesPerBox * 80) / DIAG_VAL4) / gDialogBoxScale)); #else - func_802D8954(DIAG_VAL3 + dialog->leftOffset), - func_802D8954(240 + ((dialog->linesPerBox * 80) / DIAG_VAL4) - dialog->width)); + ensure_nonnegative(DIAG_VAL3 + dialog->leftOffset), + ensure_nonnegative(240 + ((dialog->linesPerBox * 80) / DIAG_VAL4) - dialog->width)); #endif #ifdef VERSION_JP - func_802D8980(0, dialog); + handle_dialog_text_and_pages(0, dialog); #else - func_802D8980(0, dialog, sp2F); + handle_dialog_text_and_pages(0, dialog, lowerBound); #endif - if (gLastDialogPageStrPos == -1 && D_80330434 == 1) { - func_802D8ED4(); + if (gLastDialogPageStrPos == -1 && gLastDialogResponse == 1) { + render_dialog_triangle_choice(); } - gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 2, 2, 316, 236); + gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 2, 2, SCREEN_WIDTH - BORDER_HEIGHT/2, SCREEN_HEIGHT - BORDER_HEIGHT/2); - if (gLastDialogPageStrPos != -1 && gDialogBoxState == DIALOG_STATE_WAITBUTTON) { - func_802D9030(dialog->linesPerBox); + if (gLastDialogPageStrPos != -1 && gDialogBoxState == DIALOG_STATE_VERTICAL) { + render_dialog_string_color(dialog->linesPerBox); } } -void func_802D9A14(s16 a0) { - if (D_8033047C == -1) { - D_8033047C = a0; +// Calls a gMenuMode value defined by render_menus_and_dialogs cases +void set_menu_mode(s16 mode) { + if (gMenuMode == -1) { + gMenuMode = mode; } } @@ -1900,12 +1849,12 @@ void reset_cutscene_msg_fade(void) { gCutsceneMsgFade = 0; } -void func_802D9A60(void) { +void dl_rgba16_begin_cutscene_msg_fade(void) { gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gCutsceneMsgFade); } -void func_802D9AE8(void) { +void dl_rgba16_stop_cutscene_msg_fade(void) { gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); if (gCutsceneMsgFade < 250) { @@ -1925,7 +1874,7 @@ u8 ascii_to_credits_char(u8 c) { } if (c == ' ') { - return DIALOG_CHAR_SPACE; + return GLOBAL_CHAR_SPACE; } if (c == '.') { return 0x24; @@ -1940,7 +1889,7 @@ u8 ascii_to_credits_char(u8 c) { return ASCII_TO_DIALOG('6'); } - return DIALOG_CHAR_SPACE; + return GLOBAL_CHAR_SPACE; } void print_credits_str_ascii(s16 x, s16 y, const char *str) { @@ -1953,9 +1902,9 @@ void print_credits_str_ascii(s16 x, s16 y, const char *str) { c = str[pos]; } - creditStr[pos] = DIALOG_CHAR_TERMINATOR; + creditStr[pos] = GLOBAR_CHAR_TERMINATOR; - print_credits_str_dialog(x, y, creditStr); + print_credits_string(x, y, creditStr); } void set_cutscene_message(s16 xOffset, s16 yOffset, s16 msgIndex, s16 msgDuration) { @@ -1978,7 +1927,7 @@ void do_cutscene_handler(void) { return; } - dl_add_new_ortho_matrix(); + create_dl_ortho_matrix(); gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gCutsceneMsgFade); @@ -1987,22 +1936,22 @@ void do_cutscene_handler(void) { switch (eu_get_language()) { case LANGUAGE_ENGLISH: x = get_str_x_pos_from_center(gCutsceneMsgXOffset, gEndCutsceneStringsEn[gCutsceneMsgIndex], 10.0f); - PrintGenericText(x, 240 - gCutsceneMsgYOffset, gEndCutsceneStringsEn[gCutsceneMsgIndex]); + print_generic_string(x, 240 - gCutsceneMsgYOffset, gEndCutsceneStringsEn[gCutsceneMsgIndex]); break; case LANGUAGE_FRENCH: x = get_str_x_pos_from_center(gCutsceneMsgXOffset, gEndCutsceneStringsFr[gCutsceneMsgIndex], 10.0f); - PrintGenericText(x, 240 - gCutsceneMsgYOffset, gEndCutsceneStringsFr[gCutsceneMsgIndex + 8]); + print_generic_string(x, 240 - gCutsceneMsgYOffset, gEndCutsceneStringsFr[gCutsceneMsgIndex + 8]); break; case LANGUAGE_GERMAN: x = get_str_x_pos_from_center(gCutsceneMsgXOffset, gEndCutsceneStringsDe[gCutsceneMsgIndex], 10.0f); - PrintGenericText(x, 240 - gCutsceneMsgYOffset, gEndCutsceneStringsDe[gCutsceneMsgIndex + 16]); + print_generic_string(x, 240 - gCutsceneMsgYOffset, gEndCutsceneStringsDe[gCutsceneMsgIndex + 16]); break; } #else // get the x coordinate of where the cutscene string starts. x = get_str_x_pos_from_center(gCutsceneMsgXOffset, gEndCutsceneStringsEn[gCutsceneMsgIndex], 10.0f); - PrintGenericText(x, 240 - gCutsceneMsgYOffset, gEndCutsceneStringsEn[gCutsceneMsgIndex]); + print_generic_string(x, 240 - gCutsceneMsgYOffset, gEndCutsceneStringsEn[gCutsceneMsgIndex]); #endif gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); @@ -2052,6 +2001,7 @@ extern Gfx castle_grounds_seg7_us_dl_0700F2E8[]; #define STR_X 38 #define STR_Y 142 #endif + // "Dear Mario" message handler void print_peach_letter_message(void) { void **dialogTable; @@ -2077,7 +2027,7 @@ void print_peach_letter_message(void) { str = segmented_to_virtual(dialog->str); - dl_add_new_translation_matrix(1, 97.0f, 118.0f, 0); + create_dl_translation_matrix(MENU_MTX_PUSH, 97.0f, 118.0f, 0); gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gCutsceneMsgFade); gSPDisplayList(gDisplayListHead++, castle_grounds_seg7_dl_0700EA58); @@ -2085,12 +2035,12 @@ void print_peach_letter_message(void) { gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); gDPSetEnvColor(gDisplayListHead++, 20, 20, 20, gCutsceneMsgFade); - PrintGenericText(STR_X, STR_Y, str); + print_generic_string(STR_X, STR_Y, str); #ifdef VERSION_JP gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); +#endif gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); -#else - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); +#ifndef VERSION_JP gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); gDPSetEnvColor(gDisplayListHead++, 200, 80, 120, gCutsceneMsgFade); gSPDisplayList(gDisplayListHead++, castle_grounds_seg7_us_dl_0700F2E8); @@ -2124,57 +2074,61 @@ void print_peach_letter_message(void) { gCutsceneMsgTimer++; } -void RenderHudCannonReticle(void) { - dl_add_new_translation_matrix(1, 160.0f, 120.0f, 0); +/** + * Renders the cannon reticle when Mario is inside a cannon. + * Formed by four triangles. + */ +void render_hud_cannon_reticle(void) { + create_dl_translation_matrix(MENU_MTX_PUSH, 160.0f, 120.0f, 0); gDPSetEnvColor(gDisplayListHead++, 50, 50, 50, 180); - dl_add_new_translation_matrix(1, -20.0f, -8.0f, 0); + create_dl_translation_matrix(MENU_MTX_PUSH, -20.0f, -8.0f, 0); gSPDisplayList(gDisplayListHead++, dl_draw_triangle); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - dl_add_new_translation_matrix(1, 20.0f, 8.0f, 0); - dl_add_new_rotation_matrix(2, 180.0f, 0, 0, 1.0f); + create_dl_translation_matrix(MENU_MTX_PUSH, 20.0f, 8.0f, 0); + create_dl_rotation_matrix(MENU_MTX_NOPUSH, 180.0f, 0, 0, 1.0f); gSPDisplayList(gDisplayListHead++, dl_draw_triangle); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - dl_add_new_translation_matrix(1, 8.0f, -20.0f, 0); - dl_add_new_rotation_matrix(2, DEFAULT_DIALOG_BOX_ANGLE, 0, 0, 1.0f); + create_dl_translation_matrix(MENU_MTX_PUSH, 8.0f, -20.0f, 0); + create_dl_rotation_matrix(MENU_MTX_NOPUSH, DEFAULT_DIALOG_BOX_ANGLE, 0, 0, 1.0f); gSPDisplayList(gDisplayListHead++, dl_draw_triangle); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - dl_add_new_translation_matrix(1, -8.0f, 20.0f, 0); - dl_add_new_rotation_matrix(2, -DEFAULT_DIALOG_BOX_ANGLE, 0, 0, 1.0f); + create_dl_translation_matrix(MENU_MTX_PUSH, -8.0f, 20.0f, 0); + create_dl_rotation_matrix(MENU_MTX_NOPUSH, -DEFAULT_DIALOG_BOX_ANGLE, 0, 0, 1.0f); gSPDisplayList(gDisplayListHead++, dl_draw_triangle); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); } -void func_802DA4DC(void) { - D_8036008E = 0; +void reset_red_coins_collected(void) { + gRedCoinsCollected = 0; } -void func_802DA4F4(void) { - if (select_or_activate_mario_cam(0) == 1) { - D_80330530 = 1; +void change_dialog_camera_angle(void) { + if (select_or_activate_mario_cam(0) == CAM_ANGLE_LAKITU_MARIO) { + gDialogCameraAngleIndex = CAM_ANGLE_LAKITU_MARIO; } else { - D_80330530 = 2; + gDialogCameraAngleIndex = CAM_ANGLE_LAKITU_FIXED; } } -void ShadeScreen(void) { - dl_add_new_translation_matrix(1, 0, 240.0f, 0); - dl_add_new_scale_matrix(2, 2.6f, 3.4f, 1.0f); +void shade_screen(void) { + create_dl_translation_matrix(MENU_MTX_PUSH, 0, 240.0f, 0); + create_dl_scale_matrix(MENU_MTX_NOPUSH, 2.6f, 3.4f, 1.0f); gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, 110); gSPDisplayList(gDisplayListHead++, dl_draw_text_bg_box); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); } -void PrintAnimatedRedCoin(s16 sp4a, s16 sp4e) { +void print_animated_red_coin(s16 x, s16 y) { s32 timer = gGlobalTimer; - dl_add_new_translation_matrix(1, sp4a, sp4e, 0); - dl_add_new_scale_matrix(2, 0.2f, 0.2f, 1.0f); + create_dl_translation_matrix(MENU_MTX_PUSH, x, y, 0); + create_dl_scale_matrix(MENU_MTX_NOPUSH, 0.2f, 0.2f, 1.0f); gDPSetRenderMode(gDisplayListHead++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); switch (timer & 6) { @@ -2196,11 +2150,11 @@ void PrintAnimatedRedCoin(s16 sp4a, s16 sp4e) { gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); } -void func_802DA874(void) { - s8 sp1f; +void render_pause_red_coins(void) { + s8 x; - for (sp1f = 0; sp1f < D_8036008E; sp1f++) { - PrintAnimatedRedCoin(290 - sp1f * 20, 16); + for (x = 0; x < gRedCoinsCollected; x++) { + print_animated_red_coin(290 - x * 20, 16); } } @@ -2221,14 +2175,22 @@ u8 gTextCourseArr[][7] = { // D_802FDA10 #define TXT_STAR_X 89 #define ACT_NAME_X 107 #define LVL_NAME_X 108 +#define MYSCORE_X 48 #else #define TXT_STAR_X 98 #define ACT_NAME_X 116 #define LVL_NAME_X 117 +#define MYSCORE_X 62 #endif -void func_802DA8EC(void) { + +void render_pause_my_score_coins(void) { #ifdef VERSION_EU - u8 textMyScore[][10] = { { TEXT_MY_SCORE }, { TEXT_MY_SCORE_FR }, { TEXT_MY_SCORE_DE } }; + u8 textMyScore[][10] = { + { TEXT_MY_SCORE }, + { TEXT_MY_SCORE_FR }, + { TEXT_MY_SCORE_DE } + }; +#define textMyScore textMyScore[gInGameLanguage] #else u8 textCourse[] = { TEXT_COURSE }; u8 textMyScore[] = { TEXT_MY_SCORE }; @@ -2270,64 +2232,59 @@ void func_802DA8EC(void) { #endif gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, D_80360088); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); if (courseIndex < COURSE_STAGES_COUNT) { - ShowCoins(1, gCurrSaveFileNum - 1, courseIndex, 178, 103); - ShowStars(gCurrSaveFileNum - 1, courseIndex, 118, 103); + print_hud_my_score_coins(1, gCurrSaveFileNum - 1, courseIndex, 178, 103); + print_hud_my_score_stars(gCurrSaveFileNum - 1, courseIndex, 118, 103); } gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, D_80360088); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); if (courseIndex < COURSE_STAGES_COUNT && save_file_get_course_star_count(gCurrSaveFileNum - 1, courseIndex) != 0) { -#ifdef VERSION_EU - PrintGenericText(48, 121, textMyScore[gInGameLanguage]); -#else - PrintGenericText(62, 121, textMyScore); -#endif + print_generic_string(MYSCORE_X, 121, textMyScore); } levelName = segmented_to_virtual(levelNameTbl[courseIndex]); if (courseIndex < COURSE_STAGES_COUNT) { #ifdef VERSION_EU - PrintGenericText(48, 157, gTextCourseArr[gInGameLanguage]); + print_generic_string(48, 157, gTextCourseArr[gInGameLanguage]); #else - PrintGenericText(63, 157, textCourse); + print_generic_string(63, 157, textCourse); #endif - Int2Str(gCurrCourseNum, strCourseNum); + int_to_str(gCurrCourseNum, strCourseNum); #ifdef VERSION_EU - PrintGenericText(get_str_width(gTextCourseArr[gInGameLanguage]) + 51, 157, strCourseNum); + print_generic_string(get_string_width(gTextCourseArr[gInGameLanguage]) + 51, 157, strCourseNum); #else - PrintGenericText(CRS_NUM_X1, 157, strCourseNum); + print_generic_string(CRS_NUM_X1, 157, strCourseNum); #endif - actName = segmented_to_virtual(actNameTbl[(gCurrCourseNum - 1) * 6 + D_80330534 - 1]); + actName = segmented_to_virtual(actNameTbl[(gCurrCourseNum - 1) * 6 + gDialogCourseActNum - 1]); - if (starFlags & (1 << (D_80330534 - 1))) { - PrintGenericText(TXT_STAR_X, 140, textStar); + if (starFlags & (1 << (gDialogCourseActNum - 1))) { + print_generic_string(TXT_STAR_X, 140, textStar); } else { - PrintGenericText(TXT_STAR_X, 140, textUnfilledStar); + print_generic_string(TXT_STAR_X, 140, textUnfilledStar); } - - PrintGenericText(ACT_NAME_X, 140, actName); + print_generic_string(ACT_NAME_X, 140, actName); #ifndef VERSION_JP - PrintGenericText(LVL_NAME_X, 157, &levelName[3]); + print_generic_string(LVL_NAME_X, 157, &levelName[3]); #endif } #ifndef VERSION_JP else { #ifdef VERSION_US - PrintGenericText(94, 157, &levelName[3]); + print_generic_string(94, 157, &levelName[3]); #elif defined(VERSION_EU) - PrintGenericText(get_str_x_pos_from_center(159, &levelName[3], 10.0f), 157, &levelName[3]); + print_generic_string(get_str_x_pos_from_center(159, &levelName[3], 10.0f), 157, &levelName[3]); #endif } #else - PrintGenericText(117, 157, &levelName[3]); + print_generic_string(117, 157, &levelName[3]); #endif gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); } @@ -2342,7 +2299,7 @@ void func_802DA8EC(void) { #define Y_VAL7 2 #endif -void PauseScreenCameraMenu(s16 sp72, s16 sp76, s8 *sp78, s16 sp7e) { +void render_pause_camera_options(s16 x, s16 y, s8 *index, s16 xIndex) { u8 textLakituMario[] = { TEXT_LAKITU_MARIO }; u8 textLakituStop[] = { TEXT_LAKITU_STOP }; #ifdef VERSION_EU @@ -2356,36 +2313,30 @@ void PauseScreenCameraMenu(s16 sp72, s16 sp76, s8 *sp78, s16 sp7e) { { TEXT_NORMAL_FIXED_FR }, { TEXT_NORMAL_FIXED_DE }, }; +#define textNormalUpClose textNormalUpClose[gInGameLanguage] +#define textNormalFixed textNormalFixed[gInGameLanguage] #else u8 textNormalUpClose[] = { TEXT_NORMAL_UPCLOSE }; u8 textNormalFixed[] = { TEXT_NORMAL_FIXED }; #endif - handleMenuScrolling(MENU_SCROLL_HORIZONTAL, sp78, 1, 2); + handle_menu_scrolling(MENU_SCROLL_HORIZONTAL, index, 1, 2); gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, D_80360088); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); - PrintGenericText(sp72 + 14, sp76 + 2, textLakituMario); -#ifdef VERSION_EU - PrintGenericText(sp72 + TXT1_X, sp76 - 13, textNormalUpClose[gInGameLanguage]); -#else - PrintGenericText(sp72 + TXT1_X, sp76 - 13, textNormalUpClose); -#endif - PrintGenericText(sp72 + 124, sp76 + 2, textLakituStop); -#ifdef VERSION_EU - PrintGenericText(sp72 + TXT2_X, sp76 - 13, textNormalFixed[gInGameLanguage]); -#else - PrintGenericText(sp72 + TXT2_X, sp76 - 13, textNormalFixed); -#endif + print_generic_string(x + 14, y + 2, textLakituMario); + print_generic_string(x + TXT1_X, y - 13, textNormalUpClose); + print_generic_string(x + 124, y + 2, textLakituStop); + print_generic_string(x + TXT2_X, y - 13, textNormalFixed); gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); - dl_add_new_translation_matrix(1, ((sp78[0] - 1) * sp7e) + sp72, sp76 + Y_VAL7, 0); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, D_80360088); + create_dl_translation_matrix(MENU_MTX_PUSH, ((index[0] - 1) * xIndex) + x, y + Y_VAL7, 0); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); gSPDisplayList(gDisplayListHead++, dl_draw_triangle); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - switch (sp78[0]) { + switch (index[0]) { case 1: select_or_activate_mario_cam(1); break; @@ -2403,7 +2354,7 @@ void PauseScreenCameraMenu(s16 sp72, s16 sp76, s8 *sp78, s16 sp7e) { #define Y_VAL8 2 #endif -void PauseScreen2(s16 sp62, s16 sp66, s8 *sp68, s16 sp6e) { +void render_pause_course_options(s16 x, s16 y, s8 *index, s16 yIndex) { #ifdef VERSION_EU u8 textContinue[][10] = { { TEXT_CONTINUE }, @@ -2416,140 +2367,134 @@ void PauseScreen2(s16 sp62, s16 sp66, s8 *sp68, s16 sp6e) { { TEXT_EXIT_COURSE_DE } }; u8 textCameraAngleR[][24] = { - { TEXT_CAMERA_ANGLE_R_EN }, + { TEXT_CAMERA_ANGLE_R }, { TEXT_CAMERA_ANGLE_R_FR }, { TEXT_CAMERA_ANGLE_R_DE } }; +#define textContinue textContinue[gInGameLanguage] +#define textExitCourse textExitCourse[gInGameLanguage] +#define textCameraAngleR textCameraAngleR[gInGameLanguage] #else u8 textContinue[] = { TEXT_CONTINUE }; u8 textExitCourse[] = { TEXT_EXIT_COURSE }; u8 textCameraAngleR[] = { TEXT_CAMERA_ANGLE_R }; #endif - handleMenuScrolling(MENU_SCROLL_VERTICAL, sp68, 1, 3); + handle_menu_scrolling(MENU_SCROLL_VERTICAL, index, 1, 3); gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, D_80360088); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); -#ifdef VERSION_EU - PrintGenericText(sp62 + 10, sp66 - 2, textContinue[gInGameLanguage]); - PrintGenericText(sp62 + 10, sp66 - 17, textExitCourse[gInGameLanguage]); -#else - PrintGenericText(sp62 + 10, sp66 - 2, textContinue); - PrintGenericText(sp62 + 10, sp66 - 17, textExitCourse); -#endif + print_generic_string(x + 10, y - 2, textContinue); + print_generic_string(x + 10, y - 17, textExitCourse); - if (sp68[0] != 3) { -#ifdef VERSION_EU - PrintGenericText(sp62 + 10, sp66 - 33, textCameraAngleR[gInGameLanguage]); -#else - PrintGenericText(sp62 + 10, sp66 - 33, textCameraAngleR); -#endif + if (index[0] != 3) { + print_generic_string(x + 10, y - 33, textCameraAngleR); gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); - dl_add_new_translation_matrix(1, sp62 - X_VAL8, (sp66 - ((sp68[0] - 1) * sp6e)) - Y_VAL8, 0); + create_dl_translation_matrix(MENU_MTX_PUSH, x - X_VAL8, (y - ((index[0] - 1) * yIndex)) - Y_VAL8, 0); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, D_80360088); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); gSPDisplayList(gDisplayListHead++, dl_draw_triangle); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); } - if (sp68[0] == 3) { - PauseScreenCameraMenu(sp62 - 42, sp66 - 42, &D_80330530, 110); + if (index[0] == 3) { + render_pause_camera_options(x - 42, y - 42, &gDialogCameraAngleIndex, 110); } } -void PauseCastleMenuBox(s16 sp42, s16 sp46) { - dl_add_new_translation_matrix(1, sp42 - 78, sp46 - 32, 0); - dl_add_new_scale_matrix(2, 1.2f, 0.8f, 1.0f); +void render_pause_castle_menu_box(s16 x, s16 y) { + create_dl_translation_matrix(MENU_MTX_PUSH, x - 78, y - 32, 0); + create_dl_scale_matrix(MENU_MTX_NOPUSH, 1.2f, 0.8f, 1.0f); gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, 105); gSPDisplayList(gDisplayListHead++, dl_draw_text_bg_box); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - dl_add_new_translation_matrix(1, sp42 + 6, sp46 - 28, 0); - dl_add_new_rotation_matrix(2, DEFAULT_DIALOG_BOX_ANGLE, 0, 0, 1.0f); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, D_80360088); + create_dl_translation_matrix(MENU_MTX_PUSH, x + 6, y - 28, 0); + create_dl_rotation_matrix(MENU_MTX_NOPUSH, DEFAULT_DIALOG_BOX_ANGLE, 0, 0, 1.0f); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); gSPDisplayList(gDisplayListHead++, dl_draw_triangle); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - dl_add_new_translation_matrix(1, sp42 - 9, sp46 - 101, 0); - dl_add_new_rotation_matrix(2, 270.0f, 0, 0, 1.0f); + create_dl_translation_matrix(MENU_MTX_PUSH, x - 9, y - 101, 0); + create_dl_rotation_matrix(MENU_MTX_NOPUSH, 270.0f, 0, 0, 1.0f); gSPDisplayList(gDisplayListHead++, dl_draw_triangle); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); } -void func_802DB540(void) { - u8 sp07; +void highlight_last_course_complete_stars(void) { + u8 courseDone; if (gLastCompletedCourseNum == 0) { - sp07 = 0; + courseDone = 0; } else { - sp07 = gLastCompletedCourseNum - 1; + courseDone = gLastCompletedCourseNum - 1; - if (sp07 >= COURSE_STAGES_COUNT) { - sp07 = COURSE_STAGES_COUNT; + if (courseDone >= COURSE_STAGES_COUNT) { + courseDone = COURSE_STAGES_COUNT; } } - D_80330430 = sp07; + gDialogLineNum = courseDone; } -void PauseScreen1(void) { - u8 sp28[] = { TEXT_PAUSE }; +void print_hud_pause_colorful_str(void) { + u8 textPause[] = { TEXT_PAUSE }; gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, D_80360088); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); #ifdef VERSION_EU - PutString(2, get_str_x_pos_from_center_scale(160, sp28, 12.0f), 81, sp28); + print_hud_lut_string(HUD_LUT_GLOBAL, get_str_x_pos_from_center_scale(160, textPause, 12.0f), 81, textPause); #else - PutString(2, 123, 81, sp28); + print_hud_lut_string(HUD_LUT_GLOBAL, 123, 81, textPause); #endif gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); } -void func_802DB698(s16 sp4a, s16 sp4e, s16 sp52, s16 sp56) { - s16 sp46 = 0; +void render_pause_castle_course_stars(s16 x, s16 y, s16 fileNum, s16 courseNum) { + s16 hasStar = 0; - u8 sp28[COURSE_STAGES_COUNT * 2]; + u8 str[COURSE_STAGES_COUNT * 2]; u8 textStar[] = { TEXT_STAR }; - u8 sp23 = save_file_get_star_flags(sp52, sp56); - u16 sp20 = save_file_get_course_star_count(sp52, sp56); + u8 starFlags = save_file_get_star_flags(fileNum, courseNum); + u16 starCount = save_file_get_course_star_count(fileNum, courseNum); - u16 sp1e = 0; + u16 nextStar = 0; - if (sp23 & 0x40) { - sp20--; - PrintGenericText(sp4a + 89, sp4e - 5, textStar); + if (starFlags & 0x40) { + starCount--; + print_generic_string(x + 89, y - 5, textStar); } - while (sp46 != sp20) { - if (sp23 & (1 << sp1e)) { - sp28[sp1e * 2] = DIALOG_CHAR_STAR_FILLED; - sp46++; + while (hasStar != starCount) { + if (starFlags & (1 << nextStar)) { + str[nextStar * 2] = DIALOG_CHAR_STAR_FILLED; + hasStar++; } else { - sp28[sp1e * 2] = DIALOG_CHAR_STAR_OPEN; + str[nextStar * 2] = DIALOG_CHAR_STAR_OPEN; } - sp28[sp1e * 2 + 1] = DIALOG_CHAR_SPACE; - sp1e++; + str[nextStar * 2 + 1] = DIALOG_CHAR_SPACE; + nextStar++; } - if (sp20 == sp1e && sp20 != 6) { - sp28[sp1e * 2] = DIALOG_CHAR_STAR_OPEN; - sp28[sp1e * 2 + 1] = DIALOG_CHAR_SPACE; - sp1e++; + if (starCount == nextStar && starCount != 6) { + str[nextStar * 2] = DIALOG_CHAR_STAR_OPEN; + str[nextStar * 2 + 1] = DIALOG_CHAR_SPACE; + nextStar++; } - sp28[sp1e * 2] = DIALOG_CHAR_TERMINATOR; + str[nextStar * 2] = DIALOG_CHAR_TERMINATOR; - PrintGenericText(sp4a + 14, sp4e + 13, sp28); + print_generic_string(x + 14, y + 13, str); } -void func_802DB840(s16 x, s16 y) { +void render_pause_castle_main_strings(s16 x, s16 y) { #ifdef VERSION_EU void **levelNameTbl; #else @@ -2566,7 +2511,7 @@ void func_802DB840(s16 x, s16 y) { void *levelName; u8 strVal[8]; - s16 sp3a = D_80330430; + s16 starNum = gDialogLineNum; #ifdef VERSION_EU switch (gInGameLanguage) { @@ -2582,71 +2527,71 @@ void func_802DB840(s16 x, s16 y) { } #endif - handleMenuScrolling(MENU_SCROLL_VERTICAL, &D_80330430, -1, COURSE_STAGES_COUNT + 1); + handle_menu_scrolling(MENU_SCROLL_VERTICAL, &gDialogLineNum, -1, COURSE_STAGES_COUNT + 1); - if (D_80330430 == COURSE_STAGES_COUNT + 1) { - D_80330430 = 0; + if (gDialogLineNum == COURSE_STAGES_COUNT + 1) { + gDialogLineNum = 0; } - if (D_80330430 == -1) { - D_80330430 = COURSE_STAGES_COUNT; + if (gDialogLineNum == -1) { + gDialogLineNum = COURSE_STAGES_COUNT; } - if (D_80330430 != COURSE_STAGES_COUNT) { - while (save_file_get_course_star_count(gCurrSaveFileNum - 1, D_80330430) == 0) { - if (D_80330430 >= sp3a) { - D_80330430++; + if (gDialogLineNum != COURSE_STAGES_COUNT) { + while (save_file_get_course_star_count(gCurrSaveFileNum - 1, gDialogLineNum) == 0) { + if (gDialogLineNum >= starNum) { + gDialogLineNum++; } else { - D_80330430--; + gDialogLineNum--; } - if (D_80330430 == COURSE_STAGES_COUNT || D_80330430 == -1) { - D_80330430 = COURSE_STAGES_COUNT; + if (gDialogLineNum == COURSE_STAGES_COUNT || gDialogLineNum == -1) { + gDialogLineNum = COURSE_STAGES_COUNT; break; } } } gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, D_80360088); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); - if (D_80330430 < COURSE_STAGES_COUNT) { - levelName = segmented_to_virtual(levelNameTbl[D_80330430]); - func_802DB698(x, y, gCurrSaveFileNum - 1, D_80330430); - PrintGenericText(x + 34, y - 5, textCoin); + if (gDialogLineNum < COURSE_STAGES_COUNT) { + levelName = segmented_to_virtual(levelNameTbl[gDialogLineNum]); + render_pause_castle_course_stars(x, y, gCurrSaveFileNum - 1, gDialogLineNum); + print_generic_string(x + 34, y - 5, textCoin); #ifdef VERSION_EU - PrintGenericText(x + 44, y - 5, textX); + print_generic_string(x + 44, y - 5, textX); #endif - Int2Str(save_file_get_course_coin_score(gCurrSaveFileNum - 1, D_80330430), strVal); - PrintGenericText(x + 54, y - 5, strVal); + int_to_str(save_file_get_course_coin_score(gCurrSaveFileNum - 1, gDialogLineNum), strVal); + print_generic_string(x + 54, y - 5, strVal); #ifdef VERSION_EU - PrintGenericText(x - 17, y + 30, levelName); + print_generic_string(x - 17, y + 30, levelName); #endif } else { u8 textStarX[] = { TEXT_STAR_X }; levelName = segmented_to_virtual(levelNameTbl[COURSE_MAX]); - PrintGenericText(x + 40, y + 13, textStarX); - Int2Str(save_file_get_total_star_count(gCurrSaveFileNum - 1, COURSE_BONUS_STAGES - 1, COURSE_MAX - 1), strVal); - PrintGenericText(x + 60, y + 13, strVal); + print_generic_string(x + 40, y + 13, textStarX); + int_to_str(save_file_get_total_star_count(gCurrSaveFileNum - 1, COURSE_BONUS_STAGES - 1, COURSE_MAX - 1), strVal); + print_generic_string(x + 60, y + 13, strVal); #ifdef VERSION_EU - PrintGenericText(get_str_x_pos_from_center(x + 51, levelName, 10.0f), y + 30, levelName); + print_generic_string(get_str_x_pos_from_center(x + 51, levelName, 10.0f), y + 30, levelName); #endif } #ifndef VERSION_EU - PrintGenericText(x - 9, y + 30, levelName); + print_generic_string(x - 9, y + 30, levelName); #endif gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); } -s8 D_803305C0 = 0; -s32 D_803305C4 = 0; -s32 D_803305C8 = 0; // gCourseCompleteMenuCoins -s8 D_803305CC = 0; +s8 gCourseCompleteCoinsEqual = 0; +s32 gCourseDoneMenuTimer = 0; +s32 gCourseCompleteCoins = 0; +s8 gHudFlash = 0; -s16 func_802DBBB0(void) { - s16 sp26; +s16 render_pause_courses_and_castle(void) { + s16 num; #ifdef VERSION_EU gInGameLanguage = eu_get_language(); @@ -2654,30 +2599,30 @@ s16 func_802DBBB0(void) { switch (gDialogBoxState) { case DIALOG_STATE_OPENING: - D_80330430 = 1; - D_80360088 = 0; + gDialogLineNum = 1; + gDialogTextAlpha = 0; level_set_transition(-1, 0); #ifdef VERSION_JP - play_sound(SOUND_MENU_PAUSE1, gDefaultSoundArgs); + play_sound(SOUND_MENU_PAUSE, gDefaultSoundArgs); #else - play_sound(SOUND_MENU_PAUSE1_HIGHPRIO, gDefaultSoundArgs); + play_sound(SOUND_MENU_PAUSE_HIGHPRIO, gDefaultSoundArgs); #endif if (gCurrCourseNum >= COURSE_MIN && gCurrCourseNum <= COURSE_MAX) { - func_802DA4F4(); - gDialogBoxState = DIALOG_STATE_WAITBUTTON; + change_dialog_camera_angle(); + gDialogBoxState = DIALOG_STATE_VERTICAL; } else { - func_802DB540(); - gDialogBoxState = DIALOG_STATE_SCROLLING; + highlight_last_course_complete_stars(); + gDialogBoxState = DIALOG_STATE_HORIZONTAL; } break; - case DIALOG_STATE_WAITBUTTON: - ShadeScreen(); - func_802DA8EC(); - func_802DA874(); + case DIALOG_STATE_VERTICAL: + shade_screen(); + render_pause_my_score_coins(); + render_pause_red_coins(); if (gMarioStates[0].action & ACT_FLAG_PAUSE_EXIT) { - PauseScreen2(99, 93, &D_80330430, 15); + render_pause_course_options(99, 93, &gDialogLineNum, 15); } #ifdef VERSION_EU @@ -2688,24 +2633,24 @@ s16 func_802DBBB0(void) { #endif { level_set_transition(0, 0); - play_sound(SOUND_MENU_PAUSE2, gDefaultSoundArgs); + play_sound(SOUND_MENU_PAUSE_2, gDefaultSoundArgs); gDialogBoxState = DIALOG_STATE_OPENING; - D_8033047C = -1; + gMenuMode = -1; - if (D_80330430 == 2) { - sp26 = D_80330430; + if (gDialogLineNum == 2) { + num = gDialogLineNum; } else { - sp26 = 1; + num = 1; } - return sp26; + return num; } break; - case DIALOG_STATE_SCROLLING: - ShadeScreen(); - PauseScreen1(); - PauseCastleMenuBox(160, 143); - func_802DB840(104, 60); + case DIALOG_STATE_HORIZONTAL: + shade_screen(); + print_hud_pause_colorful_str(); + render_pause_castle_menu_box(160, 143); + render_pause_castle_main_strings(104, 60); #ifdef VERSION_EU if (gPlayer3Controller->buttonPressed & (A_BUTTON | Z_TRIG | START_BUTTON)) @@ -2715,8 +2660,8 @@ s16 func_802DBBB0(void) { #endif { level_set_transition(0, 0); - play_sound(SOUND_MENU_PAUSE2, gDefaultSoundArgs); - D_8033047C = -1; + play_sound(SOUND_MENU_PAUSE_2, gDefaultSoundArgs); + gMenuMode = -1; gDialogBoxState = DIALOG_STATE_OPENING; return 1; @@ -2724,8 +2669,8 @@ s16 func_802DBBB0(void) { break; } - if (D_80360088 < 250) { - D_80360088 += 25; + if (gDialogTextAlpha < 250) { + gDialogTextAlpha += 25; } return 0; @@ -2741,91 +2686,94 @@ s16 func_802DBBB0(void) { #define TXT_CONGRATS_X 70 #endif -void func_802DBE2C(s8 sp4b) { +#define HUD_PRINT_HISCORE 0 +#define HUD_PRINT_CONGRATULATIONS 1 + +void print_hud_course_complete_string(s8 str) { #ifdef VERSION_EU u8 textHiScore[][15] = { - { TEXT_HI_SCORE_EN }, - { TEXT_HI_SCORE_FR }, - { TEXT_HI_SCORE_DE } + { TEXT_HUD_HI_SCORE }, + { TEXT_HUD_HI_SCORE_FR }, + { TEXT_HUD_HI_SCORE_DE } }; u8 textCongratulations[][16] = { - { TEXT_CONGRATULATIONS }, - { TEXT_CONGRATULATIONS_FR }, - { TEXT_CONGRATULATIONS_DE } + { TEXT_HUD_CONGRATULATIONS }, + { TEXT_HUD_CONGRATULATIONS_FR }, + { TEXT_HUD_CONGRATULATIONS_DE } }; #else - u8 textHiScore[] = { TEXT_HI_SCORE_EN }; - u8 textCongratulations[] = { TEXT_CONGRATULATIONS }; + u8 textHiScore[] = { TEXT_HUD_HI_SCORE }; + u8 textCongratulations[] = { TEXT_HUD_CONGRATULATIONS }; #endif - u8 sp27 = sins(D_80360080) * 50.0f + 200.0f; + u8 colorFade = sins(gDialogColorFadeTimer) * 50.0f + 200.0f; gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); - gDPSetEnvColor(gDisplayListHead++, sp27, sp27, sp27, 255); + gDPSetEnvColor(gDisplayListHead++, colorFade, colorFade, colorFade, 255); - if (sp4b == 0) { + if (str == HUD_PRINT_HISCORE) { #ifdef VERSION_EU - PutString(2, get_str_x_pos_from_center_scale(160, textHiScore[gInGameLanguage], 12.0f), + print_hud_lut_string(HUD_LUT_GLOBAL, get_str_x_pos_from_center_scale(160, textHiScore[gInGameLanguage], 12.0f), 36, textHiScore[gInGameLanguage]); #else - PutString(2, TXT_HISCORE_X, TXT_HISCORE_Y, textHiScore); + print_hud_lut_string(HUD_LUT_GLOBAL, TXT_HISCORE_X, TXT_HISCORE_Y, textHiScore); #endif - } else { + } else { // HUD_PRINT_CONGRATULATIONS #ifdef VERSION_EU - PutString(2, get_str_x_pos_from_center_scale(160, textCongratulations[gInGameLanguage], 12.0f), + print_hud_lut_string(HUD_LUT_GLOBAL, get_str_x_pos_from_center_scale(160, textCongratulations[gInGameLanguage], 12.0f), 67, textCongratulations[gInGameLanguage]); #else - PutString(2, TXT_CONGRATS_X, 67, textCongratulations); + print_hud_lut_string(HUD_LUT_GLOBAL, TXT_CONGRATS_X, 67, textCongratulations); #endif } gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); } -void func_802DC050(s16 sp32, s16 sp36) { - u8 sp2c[4]; - u8 hudTextSymCoin[] = { HUD_CHAR_SYM_COIN, 0xFF }; - u8 hudTextSymX[] = { HUD_CHAR_SYM_X, 0xFF }; +void print_hud_course_complete_coins(s16 x, s16 y) { + u8 courseCompleteCoinsStr[4]; + u8 hudTextSymCoin[] = { GLYPH_COIN, GLYPH_SPACE }; + u8 hudTextSymX[] = { GLYPH_MULTIPLY, GLYPH_SPACE }; gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); - PutString(2, sp32, sp36, hudTextSymCoin); - PutString(2, sp32 + 16, sp36, hudTextSymX); + print_hud_lut_string(HUD_LUT_GLOBAL, x, y, hudTextSymCoin); + print_hud_lut_string(HUD_LUT_GLOBAL, x + 16, y, hudTextSymX); - Int2Str(D_803305C8, sp2c); - PutString(2, sp32 + 32, sp36, sp2c); + int_to_str(gCourseCompleteCoins, courseCompleteCoinsStr); + print_hud_lut_string(HUD_LUT_GLOBAL, x + 32, y, courseCompleteCoinsStr); gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); - if (D_803305C8 >= gHudDisplay.coins) { - D_803305C0 = 1; - D_803305C8 = gHudDisplay.coins; + if (gCourseCompleteCoins >= gHudDisplay.coins) { + gCourseCompleteCoinsEqual = 1; + gCourseCompleteCoins = gHudDisplay.coins; if (gGotFileCoinHiScore != 0) { - func_802DBE2C(0); + print_hud_course_complete_string(HUD_PRINT_HISCORE); } } else { - if ((D_803305C4 & 1) || gHudDisplay.coins > 70) { - D_803305C8++; - play_sound(SOUND_MENU_YOSHIGAINLIVES, gDefaultSoundArgs); + if ((gCourseDoneMenuTimer & 1) || gHudDisplay.coins > 70) { + gCourseCompleteCoins++; + play_sound(SOUND_MENU_YOSHI_GAIN_LIVES, gDefaultSoundArgs); - if (D_803305C8 == 50 || D_803305C8 == 100 || D_803305C8 == 150) { - play_sound(SOUND_GENERAL_1UP, gDefaultSoundArgs); + if (gCourseCompleteCoins == 50 || gCourseCompleteCoins == 100 || gCourseCompleteCoins == 150) { + play_sound(SOUND_GENERAL_COLLECT_1UP, gDefaultSoundArgs); gMarioState[0].numLives++; } } - if (gHudDisplay.coins == D_803305C8 && gGotFileCoinHiScore != 0) { - play_sound(SOUND_MENU_MARIOCASTLEWARP2, gDefaultSoundArgs); + if (gHudDisplay.coins == gCourseCompleteCoins && gGotFileCoinHiScore != 0) { + play_sound(SOUND_MENU_MARIO_CASTLE_WARP2, gDefaultSoundArgs); } } } -void func_802DC2B4(s32 sp18, u8 sp1f) { - if (gHudDisplay.coins == D_803305C8 && (gCurrCourseStarFlags & sp1f) == 0 && D_803305CC == 0) { +void play_star_fanfare_and_flash_hud(s32 arg, u8 starNum) { + if (gHudDisplay.coins == gCourseCompleteCoins && (gCurrCourseStarFlags & starNum) == 0 && gHudFlash == 0) { play_star_fanfare(); - D_803305CC = sp18; + gHudFlash = arg; } } @@ -2844,25 +2792,25 @@ void func_802DC2B4(s32 sp18, u8 sp1f) { #else #define CRS_NUM_X2 104 #define CRS_NUM_X3 102 -#define TXT_CLEAR_X1 get_str_width(name) + 81 -#define TXT_CLEAR_X2 get_str_width(name) + 79 +#define TXT_CLEAR_X1 get_string_width(name) + 81 +#define TXT_CLEAR_X2 get_string_width(name) + 79 #endif -void func_802DC330(void) { +void render_course_complete_lvl_info_and_hud_str(void) { #ifdef VERSION_JP - u8 textSymStar[] = { HUD_CHAR_SYM_STAR, 0xFF }; + u8 textSymStar[] = { GLYPH_STAR, GLYPH_SPACE }; u8 textCourse[] = { TEXT_COURSE }; u8 textCatch[] = { TEXT_CATCH }; u8 textClear[] = { TEXT_CLEAR }; #elif defined(VERSION_EU) UNUSED u8 textClear[] = { TEXT_CLEAR }; // unused in EU - u8 textSymStar[] = { HUD_CHAR_SYM_STAR, 0xFF }; + u8 textSymStar[] = { GLYPH_STAR, GLYPH_SPACE }; #define textCourse gTextCourseArr[gInGameLanguage] #else u8 textCourse[] = { TEXT_COURSE }; UNUSED u8 textCatch[] = { TEXT_CATCH }; // unused in US UNUSED u8 textClear[] = { TEXT_CLEAR }; - u8 textSymStar[] = { HUD_CHAR_SYM_STAR, 0xFF }; + u8 textSymStar[] = { GLYPH_STAR, GLYPH_SPACE }; #endif void **actNameTbl; @@ -2893,8 +2841,8 @@ void func_802DC330(void) { #endif if (gLastCompletedCourseNum <= COURSE_STAGES_MAX) { - func_802DC050(118, 103); - func_802DC2B4(1, 1 << (gLastCompletedStarNum - 1)); + print_hud_course_complete_coins(118, 103); + play_star_fanfare_and_flash_hud(1, 1 << (gLastCompletedStarNum - 1)); if (gLastCompletedStarNum == 7) { name = segmented_to_virtual(actNameTbl[COURSE_STAGES_MAX * 6 + 1]); @@ -2903,55 +2851,55 @@ void func_802DC330(void) { } gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - Int2Str(gLastCompletedCourseNum, strCourseNum); - gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, D_80360088); - PrintGenericText(65, 165, textCourse); - PrintGenericText(CRS_NUM_X2, 165, strCourseNum); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, D_80360088); - PrintGenericText(63, 167, textCourse); - PrintGenericText(CRS_NUM_X3, 167, strCourseNum); + int_to_str(gLastCompletedCourseNum, strCourseNum); + gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, gDialogTextAlpha); + print_generic_string(65, 165, textCourse); + print_generic_string(CRS_NUM_X2, 165, strCourseNum); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); + print_generic_string(63, 167, textCourse); + print_generic_string(CRS_NUM_X3, 167, strCourseNum); gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); } else if (gLastCompletedCourseNum == COURSE_BITDW || gLastCompletedCourseNum == COURSE_BITFS) { name = segmented_to_virtual(levelNameTbl[gLastCompletedCourseNum - 1]); gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, D_80360088); + gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, gDialogTextAlpha); #ifdef VERSION_EU centerX = get_str_x_pos_from_center(153, name, 12.0f); #endif - PrintGenericText(TXT_NAME_X1, 130, name); + print_generic_string(TXT_NAME_X1, 130, name); #ifndef VERSION_EU - PrintGenericText(TXT_CLEAR_X1, 130, textClear); + print_generic_string(TXT_CLEAR_X1, 130, textClear); #endif - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, D_80360088); - PrintGenericText(TXT_NAME_X2, 132, name); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); + print_generic_string(TXT_NAME_X2, 132, name); #ifndef VERSION_EU - PrintGenericText(TXT_CLEAR_X2, 132, textClear); + print_generic_string(TXT_CLEAR_X2, 132, textClear); #endif gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); - func_802DBE2C(1); - func_802DC050(118, 111); - func_802DC2B4(2, 0); + print_hud_course_complete_string(HUD_PRINT_CONGRATULATIONS); + print_hud_course_complete_coins(118, 111); + play_star_fanfare_and_flash_hud(2, 0); //! 2 isn't defined, originally for key hud? return; } else { name = segmented_to_virtual(actNameTbl[COURSE_STAGES_MAX * 6]); - func_802DC050(118, 103); - func_802DC2B4(1, 1 << (gLastCompletedStarNum - 1)); + print_hud_course_complete_coins(118, 103); + play_star_fanfare_and_flash_hud(1, 1 << (gLastCompletedStarNum - 1)); } gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, D_80360088); - PutString(2, 55, 77, textSymStar); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); + print_hud_lut_string(HUD_LUT_GLOBAL, 55, 77, textSymStar); gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, D_80360088); - PrintGenericText(76, 145, name); + gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, gDialogTextAlpha); + print_generic_string(76, 145, name); #ifdef VERSION_JP - PrintGenericText(220, 145, textCatch); + print_generic_string(220, 145, textCatch); #endif - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, D_80360088); - PrintGenericText(74, 147, name); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); + print_generic_string(74, 147, name); #ifdef VERSION_JP - PrintGenericText(218, 147, textCatch); + print_generic_string(218, 147, textCatch); #endif gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); } @@ -2975,10 +2923,10 @@ void func_802DC330(void) { #ifdef VERSION_EU #define X_VAL9 xOffset - 12 -void render_save_confirmation(s16 y, s8 *sp68, s16 sp6e) +void render_save_confirmation(s16 y, s8 *index, s16 sp6e) #else #define X_VAL9 x -void render_save_confirmation(s16 x, s16 y, s8 *sp68, s16 sp6e) +void render_save_confirmation(s16 x, s16 y, s8 *index, s16 sp6e) #endif { #ifdef VERSION_EU @@ -3000,7 +2948,6 @@ void render_save_confirmation(s16 x, s16 y, s8 *sp68, s16 sp6e) #define textSaveAndContinue textSaveAndContinueArr[gInGameLanguage] #define textSaveAndQuit textSaveAndQuitArr[gInGameLanguage] #define textContinueWithoutSave textContinueWithoutSaveArr[gInGameLanguage] - s16 xOffset = get_str_x_pos_from_center(160, textContinueWithoutSaveArr[gInGameLanguage], 12.0f); #else u8 textSaveAndContinue[] = { TEXT_SAVE_AND_CONTINUE }; @@ -3008,51 +2955,51 @@ void render_save_confirmation(s16 x, s16 y, s8 *sp68, s16 sp6e) u8 textContinueWithoutSave[] = { TEXT_CONTINUE_WITHOUT_SAVING }; #endif - handleMenuScrolling(MENU_SCROLL_VERTICAL, sp68, 1, 3); + handle_menu_scrolling(MENU_SCROLL_VERTICAL, index, 1, 3); gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, D_80360088); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); - PrintGenericText(TXT_SAVEOPTIONS_X, y + TXT_SAVECONT_Y, textSaveAndContinue); - PrintGenericText(TXT_SAVEOPTIONS_X, y - TXT_SAVEQUIT_Y, textSaveAndQuit); - PrintGenericText(TXT_SAVEOPTIONS_X, y - TXT_CONTNOSAVE_Y, textContinueWithoutSave); + print_generic_string(TXT_SAVEOPTIONS_X, y + TXT_SAVECONT_Y, textSaveAndContinue); + print_generic_string(TXT_SAVEOPTIONS_X, y - TXT_SAVEQUIT_Y, textSaveAndQuit); + print_generic_string(TXT_SAVEOPTIONS_X, y - TXT_CONTNOSAVE_Y, textContinueWithoutSave); gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); - dl_add_new_translation_matrix(1, X_VAL9, y - ((sp68[0] - 1) * sp6e), 0); + create_dl_translation_matrix(MENU_MTX_PUSH, X_VAL9, y - ((index[0] - 1) * sp6e), 0); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, D_80360088); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); gSPDisplayList(gDisplayListHead++, dl_draw_triangle); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); } -s16 func_802DCBD4(void) { - s16 sp26; +s16 render_course_complete_screen(void) { + s16 num; #ifdef VERSION_EU gInGameLanguage = eu_get_language(); #endif switch (gDialogBoxState) { case DIALOG_STATE_OPENING: - func_802DC330(); - if (D_803305C4 > 100 && D_803305C0 == 1) { - gDialogBoxState = DIALOG_STATE_WAITBUTTON; + render_course_complete_lvl_info_and_hud_str(); + if (gCourseDoneMenuTimer > 100 && gCourseCompleteCoinsEqual == 1) { + gDialogBoxState = DIALOG_STATE_VERTICAL; level_set_transition(-1, 0); - D_80360088 = 0; - D_80330430 = 1; + gDialogTextAlpha = 0; + gDialogLineNum = 1; } break; - case DIALOG_STATE_WAITBUTTON: - ShadeScreen(); - func_802DC330(); + case DIALOG_STATE_VERTICAL: + shade_screen(); + render_course_complete_lvl_info_and_hud_str(); #ifdef VERSION_EU - render_save_confirmation(86, &D_80330430, 20); + render_save_confirmation(86, &gDialogLineNum, 20); #else - render_save_confirmation(100, 86, &D_80330430, 20); + render_save_confirmation(100, 86, &gDialogLineNum, 20); #endif - if (D_803305C4 > 110 + if (gCourseDoneMenuTimer > 110 && (gPlayer3Controller->buttonPressed & A_BUTTON || gPlayer3Controller->buttonPressed & START_BUTTON #ifdef VERSION_EU @@ -3060,63 +3007,62 @@ s16 func_802DCBD4(void) { #endif )) { level_set_transition(0, 0); - play_sound(SOUND_MENU_STARSOUND, gDefaultSoundArgs); + play_sound(SOUND_MENU_STAR_SOUND, gDefaultSoundArgs); gDialogBoxState = DIALOG_STATE_OPENING; - D_8033047C = -1; - sp26 = D_80330430; - D_803305C4 = 0; - D_803305C8 = 0; - D_803305C0 = 0; - D_803305CC = 0; + gMenuMode = -1; + num = gDialogLineNum; + gCourseDoneMenuTimer = 0; + gCourseCompleteCoins = 0; + gCourseCompleteCoinsEqual = 0; + gHudFlash = 0; - return sp26; + return num; } break; } - if (D_80360088 < 250) { - D_80360088 += 25; + if (gDialogTextAlpha < 250) { + gDialogTextAlpha += 25; } - D_803305C4++; + gCourseDoneMenuTimer++; return 0; } -s16 func_802DCD98() { - s16 sp26 = 0; +// Only case 1 and 2 are used +s16 render_menus_and_dialogs() { + s16 mode = 0; - dl_add_new_ortho_matrix(); + create_dl_ortho_matrix(); - if (D_8033047C != -1) { - switch (D_8033047C) { + if (gMenuMode != -1) { + switch (gMenuMode) { case 0: - sp26 = func_802DBBB0(); + mode = render_pause_courses_and_castle(); break; case 1: - sp26 = func_802DBBB0(); + mode = render_pause_courses_and_castle(); break; case 2: - sp26 = func_802DCBD4(); + mode = render_course_complete_screen(); break; case 3: - sp26 = func_802DCBD4(); + mode = render_course_complete_screen(); break; } - D_80360080 = (s16) D_80360080 + 0x1000; + gDialogColorFadeTimer = (s16) gDialogColorFadeTimer + 0x1000; } else if (gDialogID != -1) { - // is the "Dear Mario, please come - // to the castle" message? + // Peach message "Dear Mario" new game dialog if (gDialogID == 20) { print_peach_letter_message(); // the peach message needs to be // repositioned seperately - return sp26; + return mode; } - func_802D93E0(); - D_80360080 = (s16) D_80360080 + 0x1000; + render_dialog_entries(); + gDialogColorFadeTimer = (s16) gDialogColorFadeTimer + 0x1000; } - - return sp26; + return mode; } diff --git a/src/game/ingame_menu.h b/src/game/ingame_menu.h index 2c82ea1..2239b4c 100644 --- a/src/game/ingame_menu.h +++ b/src/game/ingame_menu.h @@ -3,49 +3,124 @@ #include "types.h" -#define MENU_MTX_PUSH 1 +#define ASCII_TO_DIALOG(asc) \ + (((asc) >= '0' && (asc) <= '9') ? ((asc) - '0') : \ + ((asc) >= 'A' && (asc) <= 'Z') ? ((asc) - 'A' + 0x0A) : \ + ((asc) >= 'a' && (asc) <= 'z') ? ((asc) - 'a' + 0x24) : 0x00) + + +#define MENU_MTX_PUSH 1 #define MENU_MTX_NOPUSH 2 -#define MENU_SCROLL_VERTICAL 1 +#define MENU_SCROLL_VERTICAL 1 #define MENU_SCROLL_HORIZONTAL 2 -extern s8 D_80330534; -extern s8 D_803305CC; +// Japanese File Select uses an unique table +// to print specific Japanese HUD chars +#define HUD_LUT_JPMENU 1 +#define HUD_LUT_GLOBAL 2 + +// For file select JP HUD difference +#ifdef VERSION_JP +#define HUD_LUT_DIFF HUD_LUT_JPMENU +#else +#define HUD_LUT_DIFF HUD_LUT_GLOBAL +#endif + +#define RENDER_PAUSE_SCREEN 1 +#define RENDER_COURSE_DONE_SCREEN 2 + + +extern s8 gDialogCourseActNum; +extern s8 gHudFlash; struct DialogEntry { - /*0x00*/ u32 unk00; // unused + /*0x00*/ u32 unused; /*0x04*/ s8 linesPerBox; /*0x06*/ s16 leftOffset; /*0x08*/ s16 width; /*0x0C*/ u8 *str; }; -enum HudFontType { - FONT_JAPANESE = 1, - FONT_ENGLISH +// EU only +enum HudSpecialHUDChars { + HUD_CHAR_A_UMLAUT = 0x3A, + HUD_CHAR_O_UMLAUT = 0x3B, + HUD_CHAR_U_UMLAUT = 0x3C +}; + +enum SpecialFontChars { + GLOBAL_CHAR_SPACE = 0x9E, + GLOBAR_CHAR_TERMINATOR = 0xFF +}; + +// definitions for some of the special characters defined in charmap.txt +enum DialogSpecialChars { +#ifdef VERSION_EU + DIALOG_CHAR_LOWER_A_GRAVE = 0x60, // 'a' grave + DIALOG_CHAR_LOWER_A_CIRCUMFLEX = 0x61, // 'a' circumflex + DIALOG_CHAR_LOWER_A_UMLAUT = 0x62, // 'a' umlaut + DIALOG_CHAR_UPPER_A_GRAVE = 0x64, // 'A' grave + DIALOG_CHAR_UPPER_A_CIRCUMFLEX = 0x65, // 'A' circumflex + DIALOG_CHAR_UPPER_A_UMLAUT = 0x66, // 'A' umlaut + DIALOG_CHAR_LOWER_E_GRAVE = 0x70, // 'e' grave + DIALOG_CHAR_LOWER_E_CIRCUMFLEX = 0x71, // 'e' circumflex + DIALOG_CHAR_LOWER_E_UMLAUT = 0x72, // 'e' umlaut + DIALOG_CHAR_LOWER_E_ACUTE = 0x73, // 'e' acute + DIALOG_CHAR_UPPER_E_GRAVE = 0x74, // 'E' grave + DIALOG_CHAR_UPPER_E_CIRCUMFLEX = 0x75, // 'E' circumflex + DIALOG_CHAR_UPPER_E_UMLAUT = 0x76, // 'E' umlaut + DIALOG_CHAR_UPPER_E_ACUTE = 0x77, // 'E' acute + DIALOG_CHAR_LOWER_U_GRAVE = 0x80, // 'u' grave + DIALOG_CHAR_LOWER_U_CIRCUMFLEX = 0x81, // 'u' circumflex + DIALOG_CHAR_LOWER_U_UMLAUT = 0x82, // 'u' umlaut + DIALOG_CHAR_UPPER_U_GRAVE = 0x84, // 'U' grave + DIALOG_CHAR_UPPER_U_CIRCUMFLEX = 0x85, // 'U' circumflex + DIALOG_CHAR_UPPER_U_UMLAUT = 0x86, // 'U' umlaut + DIALOG_CHAR_LOWER_O_CIRCUMFLEX = 0x91, // 'o' circumflex + DIALOG_CHAR_LOWER_O_UMLAUT = 0x92, // 'o' umlaut + DIALOG_CHAR_UPPER_O_CIRCUMFLEX = 0x95, // 'O' circumflex + DIALOG_CHAR_UPPER_O_UMLAUT = 0x96, // 'O' umlaut + DIALOG_CHAR_LOWER_I_CIRCUMFLEX = 0xA1, // 'i' circumflex + DIALOG_CHAR_LOWER_I_UMLAUT = 0xA2, // 'i' umlaut + DIALOG_CHAR_I_NO_DIA = 0xEB, // 'i' without diacritic + DIALOG_CHAR_DOUBLE_LOW_QUOTE = 0xF0, // German opening quotation mark +#endif +#if defined(VERSION_US) || defined(VERSION_EU) + DIALOG_CHAR_SLASH = 0xD0, + DIALOG_CHAR_MULTI_THE = 0xD1, // 'the' + DIALOG_CHAR_MULTI_YOU = 0xD2, // 'you' +#endif + DIALOG_CHAR_HANDAKUTEN = 0x6E, + DIALOG_CHAR_COMMA = 0x6F, + DIALOG_CHAR_SPACE = 0x9E, + DIALOG_CHAR_STAR_COUNT = 0xE0, // number of stars + DIALOG_CHAR_UMLAUT = 0xE9, + DIALOG_CHAR_PREFIX_DAKUTEN = 0xF0, // prefix for kana or hira with dakuten + DIALOG_CHAR_PREFIX_HANDAKUTEN = 0xF1, // prefix for kana or hira with handakuten + DIALOG_CHAR_STAR_FILLED = 0xFA, + DIALOG_CHAR_STAR_OPEN = 0xFD, + DIALOG_CHAR_NEWLINE = 0xFE, + DIALOG_CHAR_TERMINATOR = 0xFF }; extern s32 gDialogResponse; -extern u16 D_80360080; +extern u16 gDialogColorFadeTimer; extern s8 gLastDialogLineNum; extern s32 gDialogVariable; -extern u16 D_80360088; +extern u16 gDialogTextAlpha; extern s16 gCutsceneMsgXOffset; extern s16 gCutsceneMsgYOffset; -extern s8 D_8036008E; +extern s8 gRedCoinsCollected; -extern void func_802D6440(void); -extern void dl_add_new_translation_matrix(s8 pushOp, f32 x, f32 y, f32 z); -extern void dl_add_new_rotation_matrix(s8 pushOp, f32 a, f32 x, f32 y, f32 z); -extern void dl_add_new_scale_matrix(s8 pushOp, f32 x, f32 y, f32 z); -extern void dl_add_new_ortho_matrix(void); -extern void func_802D6AFC(u8 c); -extern void PrintGenericText(s16 x, s16 y, const u8 *str); -extern void PutString(s8 font, s16 x, s16 y, const u8 *str); -extern void PrintRegularText(s16 x, s16 y, const u8 *str); -extern void print_credits_str_dialog(s16 x, s16 y, const u8 *str); -extern void handleMenuScrolling(s8 scrollDirection, s8 *currentIndex, s8 minIndex, s8 maxIndex); +extern void create_dl_identity_matrix(void); +extern void create_dl_translation_matrix(s8 pushOp, f32 x, f32 y, f32 z); +extern void create_dl_ortho_matrix(void); +extern void print_generic_string(s16 x, s16 y, const u8 *str); +extern void print_hud_lut_string(s8 fontLut, s16 x, s16 y, const u8 *str); +extern void print_menu_generic_string(s16 x, s16 y, const u8 *str); +extern void handle_menu_scrolling(s8 scrollDirection, s8 *currentIndex, s8 minIndex, s8 maxIndex); #if defined(VERSION_US) || defined(VERSION_EU) extern s16 get_str_x_pos_from_center(s16 centerPos, u8 *str, f32 scale); #endif @@ -56,50 +131,23 @@ extern s16 get_str_x_pos_from_center(s16 centerPos, u8 *str, f32 scale); #endif extern s16 get_str_x_pos_from_center_scale(s16 centerPos, u8 *str, f32 scale); #endif -extern void ShowCoins(s32 useCourseCoinScore, s8 sp27, s8 sp2b, s16 x, s16 y); -extern void ShowStars(s8 sp2b, s8 sp2f, s16 x, s16 y); -extern void Int2Str(s32 num, u8 *dst); +extern void print_hud_my_score_coins(s32 useCourseCoinScore, s8 fileNum, s8 courseNum, s16 x, s16 y); +extern void int_to_str(s32 num, u8 *dst); extern s16 get_dialog_id(void); -extern void func_802D7F90(s16 a0); -extern void func_802D7FCC(s16 a0, s32 a1); -extern void CreateTextBox(s16 a0); -extern void func_802D8050(s16 a0); -extern void func_802D8098(void); -extern void func_802D8134(struct DialogEntry *sp40, s8 sp47); -extern void func_802D8450(s8 a0, s8 a1); -extern void func_802D875C(s8 *sp20, s16 *sp24); -extern u32 func_802D8954(s16 a0); -extern void func_802D8ED4(void); -extern void func_802D9030(s8 sp3b); -extern void func_802D91C0(s16 sp4a); -extern void func_802D93E0(void); -extern void func_802D9A14(s16); +extern void create_dialog_box(s16 dialog); +extern void create_dialog_box_with_var(s16 dialog, s32 dialogVar); +extern void create_dialog_inverted_box(s16 dialog); +extern void create_dialog_box_with_response(s16 dialog); +extern void reset_dialog_render_state(void); +extern void set_menu_mode(s16 mode); extern void reset_cutscene_msg_fade(void); -extern void func_802D9A60(void); -extern void func_802D9AE8(void); +extern void dl_rgba16_begin_cutscene_msg_fade(void); +extern void dl_rgba16_stop_cutscene_msg_fade(void); extern void print_credits_str_ascii(s16 x, s16 y, const char *str); extern void set_cutscene_message(s16 xOffset, s16 yOffset, s16 msgIndex, s16 msgDuration); extern void do_cutscene_handler(void); -extern void RenderHudCannonReticle(void); -extern void func_802DA4DC(void); -extern void func_802DA4F4(void); -extern void ShadeScreen(void); -extern void PrintAnimatedRedCoin(s16 sp4a, s16 sp4e); -extern void func_802DA874(void); -extern void func_802DA8EC(void); -extern void PauseScreenCameraMenu(s16 sp72, s16 sp76, s8 *sp78, s16 sp7e); -extern void PauseScreen2(s16 sp62, s16 sp66, s8 *sp68, s16 sp6e); -extern void PauseCastleMenuBox(s16 sp42, s16 sp46); -extern void func_802DB540(void); -extern void PauseScreen1(void); -extern void func_802DB698(s16 sp4a, s16 sp4e, s16 sp52, s16 sp56); -extern void func_802DB840(s16 sp52, s16 sp56); -extern s16 func_802DBBB0(void); -extern void func_802DBE2C(s8 sp43); -extern void func_802DC050(s16 sp32, s16 sp36); -extern void func_802DC2B4(s32 sp18, u8 sp1f); -extern void func_802DC330(void); -extern s16 func_802DCBD4(void); -extern s16 func_802DCD98(void); +extern void render_hud_cannon_reticle(void); +extern void reset_red_coins_collected(void); +extern s16 render_menus_and_dialogs(void); #endif /* INGAME_MENU_H */ diff --git a/src/game/interaction.c b/src/game/interaction.c index 2cfac39..0834cca 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -774,7 +774,7 @@ u32 interact_star_or_key(struct MarioState *m, UNUSED u32 interactType, struct O func_8024924C(126); } - play_sound(SOUND_MENU_STARSOUND, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MENU_STAR_SOUND, m->marioObj->header.gfx.cameraToObject); #ifndef VERSION_JP update_mario_sound_and_camera(m); // func_802521A0 @@ -834,8 +834,8 @@ u32 interact_warp(struct MarioState *m, UNUSED u32 interactType, struct Object * m->usedObj = o; play_sound(o->collisionData == segmented_to_virtual(warp_pipe_seg3_collision_03009AC8) - ? SOUND_MENU_ENTERPIPE - : SOUND_MENU_MARIOHOLE, + ? SOUND_MENU_ENTER_PIPE + : SOUND_MENU_ENTER_HOLE, m->marioObj->header.gfx.cameraToObject); mario_stop_riding_object(m); @@ -1105,11 +1105,11 @@ u32 interact_flame(struct MarioState *m, UNUSED u32 interactType, struct Object if ((m->action & (ACT_FLAG_SWIMMING | ACT_FLAG_METAL_WATER)) || m->waterLevel - m->pos[1] > 50.0f) { - play_sound(SOUND_GENERAL_FLAMEOUT, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_GENERAL_FLAME_OUT, m->marioObj->header.gfx.cameraToObject); } else { m->marioObj->oMarioBurnTimer = 0; update_mario_sound_and_camera(m); - play_sound(SOUND_MARIO_ONFIRE, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_ON_FIRE, m->marioObj->header.gfx.cameraToObject); if ((m->action & ACT_FLAG_AIR) && m->vel[1] <= 0.0f) { burningAction = ACT_BURNING_FALL; @@ -1193,7 +1193,7 @@ u32 interact_bully(struct MarioState *m, UNUSED u32 interactType, struct Object update_mario_sound_and_camera(m); play_sound(SOUND_MARIO_EEUH, m->marioObj->header.gfx.cameraToObject); - play_sound(SOUND_OBJECT_BULLYMETAL, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_OBJ_BULLY_METAL, m->marioObj->header.gfx.cameraToObject); push_mario_out_of_object(m, o, 5.0f); drop_and_set_mario_action(m, bully_knock_back_mario(m), 0); @@ -1270,7 +1270,7 @@ u32 interact_hit_from_below(struct MarioState *m, UNUSED u32 interactType, struc bounce_off_object(m, o, 80.0f); reset_mario_pitch(m); #ifndef VERSION_JP - play_sound(SOUND_MARIO_BOING, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_TWIRL_BOUNCE, m->marioObj->header.gfx.cameraToObject); #endif return drop_and_set_mario_action(m, ACT_TWIRLING, 0); } else { @@ -1304,7 +1304,7 @@ u32 interact_bounce_top(struct MarioState *m, UNUSED u32 interactType, struct Ob bounce_off_object(m, o, 80.0f); reset_mario_pitch(m); #ifndef VERSION_JP - play_sound(SOUND_MARIO_BOING, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_TWIRL_BOUNCE, m->marioObj->header.gfx.cameraToObject); #endif return drop_and_set_mario_action(m, ACT_TWIRLING, 0); } else { @@ -1510,8 +1510,8 @@ u32 interact_cap(struct MarioState *m, UNUSED u32 interactType, struct Object *o m->flags |= MARIO_CAP_ON_HEAD; } - play_sound(SOUND_MENU_STARSOUND, m->marioObj->header.gfx.cameraToObject); - play_sound(SOUND_MARIO_HEREWEGO, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MENU_STAR_SOUND, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_HERE_WE_GO, m->marioObj->header.gfx.cameraToObject); if (capMusic != 0) { play_cap_music(capMusic); diff --git a/src/game/level_update.c b/src/game/level_update.c index ba3063e..9d59e99 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -224,22 +224,22 @@ void nop_802497FC(void) { void func_8024980C(u32 arg) { s32 gotAchievement; - u32 val8 = gCurrentArea->dialog[arg]; + u32 dialogID = gCurrentArea->dialog[arg]; - switch (val8) { - case 0x81: + switch (dialogID) { + case 129: gotAchievement = save_file_get_flags() & SAVE_FLAG_HAVE_VANISH_CAP; break; - case 0x82: + case 130: gotAchievement = save_file_get_flags() & SAVE_FLAG_HAVE_METAL_CAP; break; - case 0x83: + case 131: gotAchievement = save_file_get_flags() & SAVE_FLAG_HAVE_WING_CAP; break; - case 0xFF: + case 255: gotAchievement = TRUE; break; @@ -250,7 +250,7 @@ void func_8024980C(u32 arg) { if (!gotAchievement) { level_set_transition(-1, NULL); - func_802D7F90(val8); + create_dialog_box(dialogID); } } @@ -428,12 +428,12 @@ void init_mario_after_warp(void) { && sWarpDest.nodeId == 31 #endif ) - play_sound(SOUND_MENU_MARIOCASTLEWARP, gDefaultSoundArgs); + play_sound(SOUND_MENU_MARIO_CASTLE_WARP, gDefaultSoundArgs); #ifndef VERSION_JP if (sWarpDest.levelNum == 16 && sWarpDest.areaIdx == 1 && (sWarpDest.nodeId == 7 || sWarpDest.nodeId == 10 || sWarpDest.nodeId == 20 || sWarpDest.nodeId == 30)) { - play_sound(SOUND_MENU_MARIOCASTLEWARP, gDefaultSoundArgs); + play_sound(SOUND_MENU_MARIO_CASTLE_WARP, gDefaultSoundArgs); } #endif } @@ -661,7 +661,7 @@ void initiate_painting_warp(void) { gMarioState->marioObj->header.gfx.node.flags &= ~0x0001; - play_sound(SOUND_MENU_STARSOUND, gDefaultSoundArgs); + play_sound(SOUND_MENU_STAR_SOUND, gDefaultSoundArgs); func_802491FC(398); } } @@ -713,7 +713,7 @@ s16 level_trigger_warp(struct MarioState *m, s32 warpOp) { sDelayedWarpTimer = 48; sSourceWarpNodeId = WARP_NODE_DEATH; play_transition(WARP_TRANSITION_FADE_INTO_BOWSER, 0x30, 0x00, 0x00, 0x00); - play_sound(SOUND_MENU_BOWSERLAUGH, gDefaultSoundArgs); + play_sound(SOUND_MENU_BOWSER_LAUGH, gDefaultSoundArgs); break; case WARP_OP_WARP_FLOOR: @@ -734,7 +734,7 @@ s16 level_trigger_warp(struct MarioState *m, s32 warpOp) { sSourceWarpNodeId = WARP_NODE_F2; play_transition(WARP_TRANSITION_FADE_INTO_COLOR, 0x1E, 0xFF, 0xFF, 0xFF); #ifndef VERSION_JP - play_sound(SOUND_MENU_STARSOUND, gDefaultSoundArgs); + play_sound(SOUND_MENU_STAR_SOUND, gDefaultSoundArgs); #endif break; @@ -799,7 +799,7 @@ void initiate_delayed_warp(void) { s32 destWarpNode; if (sDelayedWarpOp != WARP_OP_NONE && --sDelayedWarpTimer == 0) { - func_802D8098(); + reset_dialog_render_state(); if (gDebugLevelSelect && (sDelayedWarpOp & WARP_OP_TRIGGERS_LEVEL_SELECT)) { func_8024975C(-9); @@ -876,9 +876,9 @@ void update_hud_values(void) { if (gGlobalTimer & 0x00000001) { u32 coinSound; if (gMarioState->action & (ACT_FLAG_SWIMMING | ACT_FLAG_METAL_WATER)) { - coinSound = SOUND_GENERAL_COINWATER1; + coinSound = SOUND_GENERAL_COIN_WATER; } else { - coinSound = SOUND_GENERAL_COIN2; + coinSound = SOUND_GENERAL_COIN; } gHudDisplay.coins += 1; @@ -909,7 +909,7 @@ void update_hud_values(void) { gHudDisplay.keys = gMarioState->numKeys; if (numHealthWedges > gHudDisplay.wedges) { - play_sound(SOUND_MENU_POWERMETER, gDefaultSoundArgs); + play_sound(SOUND_MENU_POWER_METER, gDefaultSoundArgs); } gHudDisplay.wedges = numHealthWedges; @@ -983,9 +983,9 @@ s32 play_mode_normal(void) { } s32 play_mode_paused(void) { - if (D_8033A75E == 0) { - func_802D9A14(1); - } else if (D_8033A75E == 1) { + if (gPauseScreenMode == 0) { + set_menu_mode(RENDER_PAUSE_SCREEN); + } else if (gPauseScreenMode == 1) { func_80248CB8(1); gCameraMovementFlags &= ~CAM_MOVE_PAUSE_SCREEN; set_play_mode(PLAY_MODE_NORMAL); @@ -1199,7 +1199,7 @@ s32 init_level(void) { * Initialize the current level if initOrUpdate is 0, or update the level if it * is 1. */ -s32 lvl_init_or_update(s16 initOrUpdate, UNUSED s32 arg1) { +s32 lvl_init_or_update(s16 initOrUpdate, UNUSED s32 unused) { s32 result = 0; switch (initOrUpdate) { @@ -1290,6 +1290,6 @@ s32 lvl_set_current_level(UNUSED s16 arg0, s32 levelNum) { * Play the "thank you so much for to playing my game" sound. */ s32 lvl_play_the_end_screen_sound(UNUSED s16 arg0, UNUSED s32 arg1) { - play_sound(SOUND_MENU_THANKYOUPLAYINGMYGAME, gDefaultSoundArgs); + play_sound(SOUND_MENU_THANK_YOU_PLAYING_MY_GAME, gDefaultSoundArgs); return 1; } diff --git a/src/game/level_update.h b/src/game/level_update.h index 06602f1..5083463 100644 --- a/src/game/level_update.h +++ b/src/game/level_update.h @@ -105,13 +105,13 @@ enum HUDDisplayFlag { HUD_DISPLAY_FLAG_COIN_COUNT = 0x0002, HUD_DISPLAY_FLAG_STAR_COUNT = 0x0004, HUD_DISPLAY_FLAG_CAMERA_AND_POWER = 0x0008, - HUD_DISPLAY_FLAG_UNKNOWN_0010 = 0x0010, + HUD_DISPLAY_FLAG_KEYS = 0x0010, HUD_DISPLAY_FLAG_UNKNOWN_0020 = 0x0020, HUD_DISPLAY_FLAG_TIMER = 0x0040, HUD_DISPLAY_FLAG_EMPHASIZE_POWER = 0x8000, HUD_DISPLAY_NONE = 0x0000, - HUD_DISPLAY_DEFAULT = HUD_DISPLAY_FLAG_LIVES | HUD_DISPLAY_FLAG_COIN_COUNT | HUD_DISPLAY_FLAG_STAR_COUNT | HUD_DISPLAY_FLAG_CAMERA_AND_POWER | HUD_DISPLAY_FLAG_UNKNOWN_0010 | HUD_DISPLAY_FLAG_UNKNOWN_0020 + HUD_DISPLAY_DEFAULT = HUD_DISPLAY_FLAG_LIVES | HUD_DISPLAY_FLAG_COIN_COUNT | HUD_DISPLAY_FLAG_STAR_COUNT | HUD_DISPLAY_FLAG_CAMERA_AND_POWER | HUD_DISPLAY_FLAG_KEYS | HUD_DISPLAY_FLAG_UNKNOWN_0020 }; diff --git a/src/game/macro_special_objects.c b/src/game/macro_special_objects.c index 533d176..6a85976 100644 --- a/src/game/macro_special_objects.c +++ b/src/game/macro_special_objects.c @@ -74,9 +74,9 @@ void spawn_macro_abs_special(u32 model, u32 *behavior, s16 x, s16 y, s16 z, s16 spawn_object_abs_with_rot(&gMacroObjectDefaultParent, 0, model, behavior, x, y, z, 0, 0, 0); // Are all three of these values unused? - newObj->oUnknownUnk108_F32 = (f32) unkA; - newObj->oUnknownUnk10C_F32 = (f32) unkB; - newObj->oUnknownUnk110_F32 = (f32) unkC; + newObj->oMacroUnk108 = (f32) unkA; + newObj->oMacroUnk10C = (f32) unkB; + newObj->oMacroUnk110 = (f32) unkC; } static void Unknown802E142C(u32 (*a0)[], s16 a1[]) { @@ -306,13 +306,13 @@ void spawn_special_objects(s16 areaIndex, s16 **specialObjList) { break; case SPTYPE_UNKNOWN: extraParams[0] = - **specialObjList; // Unknown, gets put into obj->oUnknownUnk108_F32 as a float + **specialObjList; // Unknown, gets put into obj->oMacroUnk108 as a float (*specialObjList)++; extraParams[1] = - **specialObjList; // Unknown, gets put into obj->oUnknownUnk10C_F32 as a float + **specialObjList; // Unknown, gets put into obj->oMacroUnk10C as a float (*specialObjList)++; extraParams[2] = - **specialObjList; // Unknown, gets put into obj->oUnknownUnk110_F32 as a f32 + **specialObjList; // Unknown, gets put into obj->oMacroUnk110 as a float (*specialObjList)++; spawn_macro_abs_special(model, behavior, x, y, z, extraParams[0], extraParams[1], extraParams[2]); diff --git a/src/game/main.c b/src/game/main.c index e2e6d64..222ef55 100644 --- a/src/game/main.c +++ b/src/game/main.c @@ -7,7 +7,7 @@ #include "sound_init.h" #include "profiler.h" #include "game.h" -#include "buffers.h" +#include "buffers/buffers.h" #include "segments.h" #include "main.h" @@ -319,7 +319,7 @@ void thread3_main(UNUSED void *arg) { OSMesg msg; osRecvMesg(&gIntrMesgQueue, &msg, OS_MESG_BLOCK); - switch ((u32) msg) { + switch ((uintptr_t) msg) { case MESG_VI_VBLANK: handle_vblank(); break; @@ -362,7 +362,7 @@ void SendMessage(OSMesg *msg) { void dispatch_audio_sptask(struct SPTask *spTask) { if (sAudioEnabled != 0 && spTask != NULL) { osWritebackDCacheAll(); - osSendMesg(&gSPTaskMesgQueue, (OSMesg) spTask, OS_MESG_NOBLOCK); + osSendMesg(&gSPTaskMesgQueue, spTask, OS_MESG_NOBLOCK); } } diff --git a/src/game/mario.c b/src/game/mario.c index 72a34e2..cdaebff 100644 --- a/src/game/mario.c +++ b/src/game/mario.c @@ -64,8 +64,8 @@ s16 set_mario_animation(struct MarioState *m, s32 targetAnimID) { struct Animation *targetAnim = m->animation->targetAnim; if (func_80278AD4(m->animation, targetAnimID)) { - targetAnim->values = (void *) VIRTUAL_TO_PHYSICAL((s8 *) targetAnim + (s32) targetAnim->values); - targetAnim->index = (void *) VIRTUAL_TO_PHYSICAL((s8 *) targetAnim + (s32) targetAnim->index); + targetAnim->values = (void *) VIRTUAL_TO_PHYSICAL((u8 *) targetAnim + (uintptr_t) targetAnim->values); + targetAnim->index = (void *) VIRTUAL_TO_PHYSICAL((u8 *) targetAnim + (uintptr_t) targetAnim->index); } if (o->header.gfx.unk38.animID != targetAnimID) { @@ -97,8 +97,8 @@ s16 set_mario_anim_with_accel(struct MarioState *m, s32 targetAnimID, s32 accel) struct Animation *targetAnim = m->animation->targetAnim; if (func_80278AD4(m->animation, targetAnimID)) { - targetAnim->values = (void *) VIRTUAL_TO_PHYSICAL((s8 *) targetAnim + (s32) targetAnim->values); - targetAnim->index = (void *) VIRTUAL_TO_PHYSICAL((s8 *) targetAnim + (s32) targetAnim->index); + targetAnim->values = (void *) VIRTUAL_TO_PHYSICAL((u8 *) targetAnim + (uintptr_t) targetAnim->values); + targetAnim->index = (void *) VIRTUAL_TO_PHYSICAL((u8 *) targetAnim + (uintptr_t) targetAnim->index); } if (o->header.gfx.unk38.animID != targetAnimID) { @@ -183,8 +183,8 @@ s16 find_mario_anim_flags_and_translation(struct Object *obj, s32 yaw, Vec3s tra struct Animation *curAnim = (void *) obj->header.gfx.unk38.curAnim; s16 animFrame = geo_update_animation_frame(&obj->header.gfx.unk38, NULL); - u16 *animIndex = (u16 *) segmented_to_virtual(curAnim->index); - s16 *animValues = (s16 *) segmented_to_virtual(curAnim->values); + u16 *animIndex = segmented_to_virtual(curAnim->index); + s16 *animValues = segmented_to_virtual(curAnim->values); f32 s = (f32) sins(yaw); f32 c = (f32) coss(yaw); @@ -243,23 +243,23 @@ void play_sound_if_no_flag(struct MarioState *m, u32 soundBits, u32 flags) { } /** - * Plays an action sound if one has not been played since the last action change. + * Plays a jump sound if one has not been played since the last action change. */ -void play_mario_action_sound(struct MarioState *m) { - if (!(m->flags & MARIO_ACTION_NOISE_PLAYED)) { +void play_mario_jump_sound(struct MarioState *m) { + if (!(m->flags & MARIO_MARIO_SOUND_PLAYED)) { #ifndef VERSION_JP if (m->action == ACT_TRIPLE_JUMP) { - play_sound(SOUND_MARIO_YAHOO2 + ((D_80226EB8 % 5) << 0x10), + play_sound(SOUND_MARIO_YAHOO_WAHA_YIPPEE + ((D_80226EB8 % 5) << 16), m->marioObj->header.gfx.cameraToObject); } else { #endif - play_sound(SOUND_MARIO_YAH + ((D_80226EB8 % 3) << 0x10), + play_sound(SOUND_MARIO_YAH_WAH_HOO + ((D_80226EB8 % 3) << 16), m->marioObj->header.gfx.cameraToObject); #ifndef VERSION_JP } #endif - m->flags |= MARIO_ACTION_NOISE_PLAYED; + m->flags |= MARIO_MARIO_SOUND_PLAYED; } } @@ -268,59 +268,61 @@ void play_mario_action_sound(struct MarioState *m) { */ void adjust_sound_for_speed(struct MarioState *m) { s32 absForwardVel = (m->forwardVel > 0.0f) ? m->forwardVel : -m->forwardVel; - func_80320A4C(1, (absForwardVel >= 101) ? 100 : absForwardVel); + func_80320A4C(1, (absForwardVel > 100) ? 100 : absForwardVel); } /** * Spawns particles if the step sound says to, then either plays a step sound or relevant other sound. */ void play_sound_and_spawn_particles(struct MarioState *m, u32 soundBits, u32 waveParticleType) { - if (m->stepSound == 0x20000) { + if (m->terrainSoundAddend == (SOUND_TERRAIN_WATER << 16)) { if (waveParticleType != 0) { m->particleFlags |= PARTICLE_12; } else { m->particleFlags |= PARTICLE_8; } } else { - if (m->stepSound == 0x70000) { + if (m->terrainSoundAddend == (SOUND_TERRAIN_SAND << 16)) { m->particleFlags |= PARTICLE_15; - } else if (m->stepSound == 0x50000) { + } else if (m->terrainSoundAddend == (SOUND_TERRAIN_SNOW << 16)) { m->particleFlags |= PARTICLE_14; } } if ((m->flags & MARIO_METAL_CAP) || soundBits == SOUND_ACTION_UNKNOWN443 - || soundBits == SOUND_MARIO_HOO6) { + || soundBits == SOUND_MARIO_PUNCH_HOO) { play_sound(soundBits, m->marioObj->header.gfx.cameraToObject); } else { - play_sound((m->stepSound + soundBits), m->marioObj->header.gfx.cameraToObject); + play_sound(m->terrainSoundAddend + soundBits, m->marioObj->header.gfx.cameraToObject); } } /** * Plays an environmental sound if one has not been played since the last action change. */ -void play_mario_environment_sound(struct MarioState *m, u32 soundBits, u32 waveParticleType) { - if ((m->flags & MARIO_ENVIRONMENT_NOISE_PLAYED) == 0) { +void play_mario_action_sound(struct MarioState *m, u32 soundBits, u32 waveParticleType) { + if ((m->flags & MARIO_ACTION_SOUND_PLAYED) == 0) { play_sound_and_spawn_particles(m, soundBits, waveParticleType); - m->flags |= MARIO_ENVIRONMENT_NOISE_PLAYED; + m->flags |= MARIO_ACTION_SOUND_PLAYED; } } -/** - * Plays a step sound, accounting for metal cap. - */ -void play_mario_step_sound(struct MarioState *m, u32 soundBits) { - play_sound_and_spawn_particles( - m, (m->flags & MARIO_METAL_CAP) ? SOUND_ACTION_UNKNOWN429 : soundBits, 1); -} - /** * Plays a landing sound, accounting for metal cap. */ void play_mario_landing_sound(struct MarioState *m, u32 soundBits) { - play_mario_environment_sound(m, (m->flags & MARIO_METAL_CAP) ? SOUND_ACTION_UNKNOWN429 : soundBits, - 1); + play_sound_and_spawn_particles( + m, (m->flags & MARIO_METAL_CAP) ? SOUND_ACTION_METAL_LANDING : soundBits, 1); +} + +/** + * Plays a landing sound, accounting for metal cap. Unlike play_mario_landing_sound, + * this function uses play_mario_action_sound, making sure the sound is only + * played once per action. + */ +void play_mario_landing_sound_once(struct MarioState *m, u32 soundBits) { + play_mario_action_sound(m, (m->flags & MARIO_METAL_CAP) ? SOUND_ACTION_METAL_LANDING : soundBits, + 1); } /** @@ -328,34 +330,36 @@ void play_mario_landing_sound(struct MarioState *m, u32 soundBits) { */ void play_mario_heavy_landing_sound(struct MarioState *m, u32 soundBits) { play_sound_and_spawn_particles( - m, (m->flags & MARIO_METAL_CAP) ? SOUND_ACTION_UNKNOWN42B : soundBits, 1); + m, (m->flags & MARIO_METAL_CAP) ? SOUND_ACTION_METAL_HEAVY_LANDING : soundBits, 1); } /** - * Plays a knockback sound, accounting for metal cap. + * Plays a heavy landing (ground pound, etc.) sound, accounting for metal cap. + * Unlike play_mario_heavy_landing_sound, this function uses play_mario_action_sound, + * making sure the sound is only played once per action. */ -void play_mario_knockback_sound(struct MarioState *m, u32 soundBits) { - play_mario_environment_sound(m, (m->flags & MARIO_METAL_CAP) ? SOUND_ACTION_UNKNOWN42B : soundBits, - 1); +void play_mario_heavy_landing_sound_once(struct MarioState *m, u32 soundBits) { + play_mario_action_sound( + m, (m->flags & MARIO_METAL_CAP) ? SOUND_ACTION_METAL_HEAVY_LANDING : soundBits, 1); } /** - * Plays an environment and action noise relevant to what was passed into the function. + * Plays action and mario sounds relevant to what was passed into the function. */ -void play_mario_sound(struct MarioState *m, s32 primarySoundBits, s32 scondarySoundBits) { - if (primarySoundBits == SOUND_TERRAIN_1) { - play_mario_environment_sound( - m, (m->flags & MARIO_METAL_CAP) ? SOUND_ACTION_UNKNOWN428 : SOUND_TERRAIN_1, 1); +void play_mario_sound(struct MarioState *m, s32 actionSound, s32 marioSound) { + if (actionSound == SOUND_ACTION_TERRAIN_JUMP) { + play_mario_action_sound( + m, (m->flags & MARIO_METAL_CAP) ? SOUND_ACTION_METAL_JUMP : SOUND_ACTION_TERRAIN_JUMP, 1); } else { - play_sound_if_no_flag(m, primarySoundBits, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, actionSound, MARIO_ACTION_SOUND_PLAYED); } - if (scondarySoundBits == 0) { - play_mario_action_sound(m); + if (marioSound == 0) { + play_mario_jump_sound(m); } - if (scondarySoundBits != -1) { - play_sound_if_no_flag(m, scondarySoundBits, MARIO_ACTION_NOISE_PLAYED); + if (marioSound != -1) { + play_sound_if_no_flag(m, marioSound, MARIO_MARIO_SOUND_PLAYED); } } @@ -426,50 +430,62 @@ s32 mario_get_floor_class(struct MarioState *m) { return floorClass; } -/** - * The step noises organized by terrain types by surface classes. - * See audio_defines.h for more information. - */ -s8 sTerrainStepNoises[7][6] = { { 0, 3, 1, 1, 1, 0 }, { 3, 3, 3, 3, 1, 1 }, { 5, 6, 5, 6, 3, 3 }, - { 7, 3, 7, 7, 3, 3 }, { 4, 4, 4, 4, 3, 3 }, { 0, 3, 1, 6, 3, 6 }, - { 3, 3, 3, 3, 6, 6 } }; +// clang-format off +s8 sTerrainSounds[7][6] = { + // default, hard, slippery, + // very slippery, noisy default, noisy slippery + { SOUND_TERRAIN_DEFAULT, SOUND_TERRAIN_STONE, SOUND_TERRAIN_GRASS, + SOUND_TERRAIN_GRASS, SOUND_TERRAIN_GRASS, SOUND_TERRAIN_DEFAULT }, // TERRAIN_GRASS + { SOUND_TERRAIN_STONE, SOUND_TERRAIN_STONE, SOUND_TERRAIN_STONE, + SOUND_TERRAIN_STONE, SOUND_TERRAIN_GRASS, SOUND_TERRAIN_GRASS }, // TERRAIN_STONE + { SOUND_TERRAIN_SNOW, SOUND_TERRAIN_ICE, SOUND_TERRAIN_SNOW, + SOUND_TERRAIN_ICE, SOUND_TERRAIN_STONE, SOUND_TERRAIN_STONE }, // TERRAIN_SNOW + { SOUND_TERRAIN_SAND, SOUND_TERRAIN_STONE, SOUND_TERRAIN_SAND, + SOUND_TERRAIN_SAND, SOUND_TERRAIN_STONE, SOUND_TERRAIN_STONE }, // TERRAIN_SAND + { SOUND_TERRAIN_SPOOKY, SOUND_TERRAIN_SPOOKY, SOUND_TERRAIN_SPOOKY, + SOUND_TERRAIN_SPOOKY, SOUND_TERRAIN_STONE, SOUND_TERRAIN_STONE }, // TERRAIN_SPOOKY + { SOUND_TERRAIN_DEFAULT, SOUND_TERRAIN_STONE, SOUND_TERRAIN_GRASS, + SOUND_TERRAIN_ICE, SOUND_TERRAIN_STONE, SOUND_TERRAIN_ICE }, // TERRAIN_WATER + { SOUND_TERRAIN_STONE, SOUND_TERRAIN_STONE, SOUND_TERRAIN_STONE, + SOUND_TERRAIN_STONE, SOUND_TERRAIN_ICE, SOUND_TERRAIN_ICE }, // TERRAIN_SLIDE +}; +// clang-format on /** - * Finds and returns Mario's step noise/type. Depends on surfaces and terrain. + * Computes a value that should be added to terrain sounds before playing them. + * This depends on surfaces and terrain. */ -u32 mario_get_step_noise(struct MarioState *m) { - s16 noiseType; +u32 mario_get_terrain_sound_addend(struct MarioState *m) { + s16 floorSoundType; s16 terrainType = m->area->terrainType & TERRAIN_MASK; - s32 stepNoise = 0; + s32 ret = SOUND_TERRAIN_DEFAULT << 16; s32 floorType; if (m->floor) { floorType = m->floor->type; - // Sets for a water step noise, excluding LLL since it uses water in the volcano. if ((gCurrLevelNum != LEVEL_LLL) && (m->floorHeight < (m->waterLevel - 10))) { - stepNoise = 0x20000; - } - // Sets for a quicksand step noise. - else if (SURFACE_IS_QUICKSAND(floorType)) { - stepNoise = 0x70000; + // Water terrain sound, excluding LLL since it uses water in the volcano. + ret = SOUND_TERRAIN_WATER << 16; + } else if (SURFACE_IS_QUICKSAND(floorType)) { + ret = SOUND_TERRAIN_SAND << 16; } else { switch (floorType) { default: - noiseType = 0; + floorSoundType = 0; break; case SURFACE_NOT_SLIPPERY: case SURFACE_HARD: case SURFACE_HARD_NOT_SLIPPERY: case SURFACE_SWITCH: - noiseType = 1; + floorSoundType = 1; break; case SURFACE_SLIPPERY: case SURFACE_HARD_SLIPPERY: case SURFACE_NO_CAM_COL_SLIPPERY: - noiseType = 2; + floorSoundType = 2; break; case SURFACE_VERY_SLIPPERY: @@ -479,23 +495,23 @@ u32 mario_get_step_noise(struct MarioState *m) { case SURFACE_NOISE_VERY_SLIPPERY_74: case SURFACE_NOISE_VERY_SLIPPERY: case SURFACE_NO_CAM_COL_VERY_SLIPPERY: - noiseType = 3; + floorSoundType = 3; break; case SURFACE_NOISE_DEFAULT: - noiseType = 4; + floorSoundType = 4; break; case SURFACE_NOISE_SLIPPERY: - noiseType = 5; + floorSoundType = 5; break; } - stepNoise = sTerrainStepNoises[terrainType][noiseType] << 0x10; + ret = sTerrainSounds[terrainType][floorSoundType] << 16; } } - return stepNoise; + return ret; } /** @@ -890,7 +906,7 @@ static u32 set_mario_action_moving(struct MarioState *m, u32 action, UNUSED u32 } } - m->marioObj->OBJECT_FIELD_S32(0x22) = 0; + m->marioObj->oMarioWalkingPitch = 0; break; case ACT_HOLD_WALKING: @@ -980,7 +996,7 @@ u32 set_mario_action(struct MarioState *m, u32 action, u32 actionArg) { } // Resets the sound played flags, meaning Mario can play those sound types again. - m->flags &= ~(MARIO_ENVIRONMENT_NOISE_PLAYED | MARIO_ACTION_NOISE_PLAYED); + m->flags &= ~(MARIO_ACTION_SOUND_PLAYED | MARIO_MARIO_SOUND_PLAYED); if (!(m->action & ACT_FLAG_AIR)) { m->flags &= ~MARIO_UNKNOWN_18; @@ -1321,7 +1337,7 @@ void update_mario_geometry_inputs(struct MarioState *m) { if (m->floor) { m->floorAngle = atan2s(m->floor->normal.z, m->floor->normal.x); - m->stepSound = mario_get_step_noise(m); + m->terrainSoundAddend = mario_get_terrain_sound_addend(m); if ((m->pos[1] > m->waterLevel - 40) && mario_floor_is_slippery(m)) { m->input |= INPUT_ABOVE_SLIDE; @@ -1478,7 +1494,7 @@ 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_UNKNOWN_UNK1C18, gDefaultSoundArgs); + play_sound(SOUND_MOVING_ALMOST_DROWNING, gDefaultSoundArgs); } } } @@ -1721,14 +1737,14 @@ s32 execute_mario_action(UNUSED struct Object *o) { if (gMarioState->floor->type == SURFACE_HORIZONTAL_WIND) { func_802ADC20(0, (gMarioState->floor->force << 8)); #ifndef VERSION_JP - play_sound(SOUND_ENVIRONMENT_WIND2, gMarioState->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_ENV_WIND2, gMarioState->marioObj->header.gfx.cameraToObject); #endif } if (gMarioState->floor->type == SURFACE_VERTICAL_WIND) { func_802ADC20(1, 0); #ifndef VERSION_JP - play_sound(SOUND_ENVIRONMENT_WIND2, gMarioState->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_ENV_WIND2, gMarioState->marioObj->header.gfx.cameraToObject); #endif } @@ -1822,7 +1838,7 @@ void init_mario(void) { capObject->oPosY = capPos[1]; capObject->oPosZ = capPos[2]; - capObject->oForwardVel2 = 0; + capObject->oForwardVelS32 = 0; capObject->oMoveAngleYaw = 0; } diff --git a/src/game/mario.h b/src/game/mario.h index a3a0eac..e218e89 100644 --- a/src/game/mario.h +++ b/src/game/mario.h @@ -18,18 +18,18 @@ extern s16 find_mario_anim_flags_and_translation(struct Object *o, s32 yaw, Vec3 extern void update_mario_pos_for_anim(struct MarioState *m); extern s16 return_mario_anim_y_translation(struct MarioState *m); extern void play_sound_if_no_flag(struct MarioState *m, u32 soundBits, u32 flags); -extern void play_mario_action_sound(struct MarioState *m); +extern void play_mario_jump_sound(struct MarioState *m); extern void adjust_sound_for_speed(struct MarioState *m); extern void play_sound_and_spawn_particles(struct MarioState *m, u32 soundBits, u32 waveParticleType); -extern void play_mario_environment_sound(struct MarioState *m, u32 soundBits, u32 waveParticleType); -extern void play_mario_step_sound(struct MarioState *m, u32 soundBits); +extern void play_mario_action_sound(struct MarioState *m, u32 soundBits, u32 waveParticleType); extern void play_mario_landing_sound(struct MarioState *m, u32 soundBits); +extern void play_mario_landing_sound_once(struct MarioState *m, u32 soundBits); extern void play_mario_heavy_landing_sound(struct MarioState *m, u32 soundBits); -extern void play_mario_knockback_sound(struct MarioState *m, u32 soundBits); +extern void play_mario_heavy_landing_sound_once(struct MarioState *m, u32 soundBits); extern void play_mario_sound(struct MarioState *m, s32 primarySoundBits, s32 scondarySoundBits); extern void mario_set_forward_vel(struct MarioState *m, f32 speed); extern s32 mario_get_floor_class(struct MarioState *m); -extern u32 mario_get_step_noise(struct MarioState *m); +extern u32 mario_get_terrain_sound_addend(struct MarioState *m); extern struct Surface *resolve_and_return_wall_collisions(Vec3f pos, f32 offset, f32 radius); extern f32 vec3f_find_ceil(Vec3f pos, f32 height, struct Surface **ceil); extern s32 mario_facing_downhill(struct MarioState *m, s32 turnYaw); diff --git a/src/game/mario_actions_airborne.c b/src/game/mario_actions_airborne.c index 02c4b6a..68bd155 100644 --- a/src/game/mario_actions_airborne.c +++ b/src/game/mario_actions_airborne.c @@ -34,9 +34,9 @@ void play_far_fall_sound(struct MarioState *m) { #ifndef VERSION_JP void func_u_8026A090(struct MarioState *m) { if (m->actionArg == 0 && (m->forwardVel <= -28.0f || m->forwardVel >= 28.0f)) { - play_sound_if_no_flag(m, SOUND_MARIO_DOH, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_DOH, MARIO_MARIO_SOUND_PLAYED); } else { - play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED); } } #endif @@ -52,7 +52,7 @@ s32 lava_boost_on_wall(struct MarioState *m) { m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 12 : 18; } - play_sound(SOUND_MARIO_ONFIRE, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_ON_FIRE, m->marioObj->header.gfx.cameraToObject); update_mario_sound_and_camera(m); return drop_and_set_mario_action(m, ACT_LAVA_BOOST, 1); } @@ -124,7 +124,7 @@ 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 |= 0x00010000; + m->particleFlags |= PARTICLE_16; drop_and_set_mario_action(m, ACT_FEET_STUCK_IN_GROUND, 0); return TRUE; } @@ -161,7 +161,7 @@ s32 check_horizontal_wind(struct MarioState *m) { m->forwardVel = speed * coss(m->faceAngle[1] - m->slideYaw); #ifdef VERSION_JP - play_sound(SOUND_ENVIRONMENT_WIND2, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_ENV_WIND2, m->marioObj->header.gfx.cameraToObject); #endif return TRUE; } @@ -386,7 +386,7 @@ u32 common_air_action_step(struct MarioState *m, u32 landAction, s32 animation, } if (m->forwardVel >= 38.0f) { - m->particleFlags |= 0x00000002; + m->particleFlags |= PARTICLE_1; set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); } else { if (m->forwardVel > 8.0f) { @@ -426,7 +426,7 @@ s32 act_jump(struct MarioState *m) { return set_mario_action(m, ACT_GROUND_POUND, 0); } - play_mario_sound(m, SOUND_TERRAIN_1, 0); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0); common_air_action_step(m, ACT_JUMP_LAND, MARIO_ANIM_SINGLE_JUMP, AIR_STEP_CHECK_LEDGE_GRAB | AIR_STEP_CHECK_HANG); return FALSE; @@ -449,7 +449,7 @@ s32 act_double_jump(struct MarioState *m) { return set_mario_action(m, ACT_GROUND_POUND, 0); } - play_mario_sound(m, SOUND_TERRAIN_1, SOUND_MARIO_HOOHOO); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, SOUND_MARIO_HOOHOO); common_air_action_step(m, ACT_DOUBLE_JUMP_LAND, animation, AIR_STEP_CHECK_LEDGE_GRAB | AIR_STEP_CHECK_HANG); return FALSE; @@ -469,9 +469,9 @@ s32 act_triple_jump(struct MarioState *m) { } #ifndef VERSION_JP - play_mario_sound(m, SOUND_TERRAIN_1, 0); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0); #else - play_mario_sound(m, SOUND_TERRAIN_1, SOUND_MARIO_YAHOO); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, SOUND_MARIO_YAHOO); #endif common_air_action_step(m, ACT_TRIPLE_JUMP_LAND, MARIO_ANIM_TRIPLE_JUMP, 0); @@ -484,7 +484,7 @@ s32 act_backflip(struct MarioState *m) { return set_mario_action(m, ACT_GROUND_POUND, 0); } - play_mario_sound(m, SOUND_TERRAIN_1, SOUND_MARIO_YAH); + 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); play_flip_sounds(m, 2, 3, 17); return FALSE; @@ -530,7 +530,7 @@ s32 act_hold_jump(struct MarioState *m) { return drop_and_set_mario_action(m, ACT_GROUND_POUND, 0); } - play_mario_sound(m, SOUND_TERRAIN_1, 0); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0); common_air_action_step(m, ACT_HOLD_JUMP_LAND, MARIO_ANIM_JUMP_WITH_LIGHT_OBJ, AIR_STEP_CHECK_LEDGE_GRAB); return FALSE; @@ -569,7 +569,7 @@ s32 act_side_flip(struct MarioState *m) { return set_mario_action(m, ACT_GROUND_POUND, 0); } - play_mario_sound(m, SOUND_TERRAIN_1, 0); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0); if (common_air_action_step(m, ACT_SIDE_FLIP_LAND, MARIO_ANIM_SLIDEFLIP, AIR_STEP_CHECK_LEDGE_GRAB) != AIR_STEP_GRABBED_LEDGE) { @@ -592,7 +592,7 @@ s32 act_wall_kick_air(struct MarioState *m) { return set_mario_action(m, ACT_GROUND_POUND, 0); } - play_mario_action_sound(m); + play_mario_jump_sound(m); common_air_action_step(m, ACT_JUMP_LAND, MARIO_ANIM_SLIDEJUMP, AIR_STEP_CHECK_LEDGE_GRAB); return FALSE; } @@ -605,10 +605,10 @@ s32 act_long_jump(struct MarioState *m) { animation = MARIO_ANIM_SLOW_LONGJUMP; } - play_mario_sound(m, SOUND_TERRAIN_1, SOUND_MARIO_YAHOO); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, SOUND_MARIO_YAHOO); if (m->floor->type == SURFACE_VERTICAL_WIND && m->actionState == 0) { - play_sound(SOUND_MARIO_HEREWEGO, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_HERE_WE_GO, m->marioObj->header.gfx.cameraToObject); m->actionState = 1; } @@ -617,7 +617,7 @@ s32 act_long_jump(struct MarioState *m) { } s32 act_riding_shell_air(struct MarioState *m) { - play_mario_sound(m, SOUND_TERRAIN_1, 0); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0); set_mario_animation(m, MARIO_ANIM_JUMP_RIDING_SHELL); update_air_without_turn(m); @@ -659,7 +659,7 @@ s32 act_twirling(struct MarioState *m) { } if (startTwirlYaw > m->twirlYaw) { - play_sound(SOUND_ACTION_UNKNOWN438, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_ACTION_SWISH2_2, m->marioObj->header.gfx.cameraToObject); } update_lava_boost_or_twirling(m); @@ -686,7 +686,7 @@ s32 act_dive(struct MarioState *m) { if (m->actionArg == 0) { play_mario_sound(m, SOUND_ACTION_UNKNOWN435, SOUND_MARIO_HOOHOO); } else { - play_mario_sound(m, SOUND_TERRAIN_1, 0); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0); } set_mario_animation(m, MARIO_ANIM_DIVE); @@ -718,7 +718,7 @@ s32 act_dive(struct MarioState *m) { #else play_sound(SOUND_MARIO_OOOF2, m->marioObj->header.gfx.cameraToObject); #endif - m->particleFlags |= 0x00010000; + m->particleFlags |= PARTICLE_16; 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) { @@ -738,7 +738,7 @@ s32 act_dive(struct MarioState *m) { m->vel[1] = 0.0f; } - m->particleFlags |= 0x00000002; + m->particleFlags |= PARTICLE_1; drop_and_set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); break; @@ -755,7 +755,7 @@ s32 act_air_throw(struct MarioState *m) { mario_throw_held_object(m); } - play_sound_if_no_flag(m, SOUND_MARIO_WAH2, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_WAH2, MARIO_MARIO_SOUND_PLAYED); set_mario_animation(m, MARIO_ANIM_THROW_LIGHT_OBJECT); update_air_without_turn(m); @@ -847,7 +847,7 @@ s32 act_steep_jump(struct MarioState *m) { return set_mario_action(m, ACT_DIVE, 0); } - play_mario_sound(m, SOUND_TERRAIN_1, 0); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0); mario_set_forward_vel(m, 0.98f * m->forwardVel); switch (perform_air_step(m, 0)) { @@ -876,7 +876,7 @@ s32 act_ground_pound(struct MarioState *m) { u32 stepResult; f32 yOffset; - play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN435, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN435, MARIO_ACTION_SOUND_PLAYED); if (m->actionState == 0) { if (m->actionTimer < 10) { @@ -899,7 +899,7 @@ s32 act_ground_pound(struct MarioState *m) { m->actionTimer += 1; if (m->actionTimer >= m->marioObj->header.gfx.unk38.curAnim->unk08 + 4) { - play_sound(SOUND_MARIO_WAH3, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_GROUND_POUND_WAH, m->marioObj->header.gfx.cameraToObject); m->actionState = 1; } } else { @@ -913,12 +913,12 @@ s32 act_ground_pound(struct MarioState *m) { #else play_sound(SOUND_MARIO_OOOF2, m->marioObj->header.gfx.cameraToObject); #endif - m->particleFlags |= 0x00010000; + m->particleFlags |= PARTICLE_16; set_mario_action(m, ACT_BUTT_STUCK_IN_GROUND, 0); } else { - play_mario_heavy_landing_sound(m, SOUND_ACTION_UNKNOWN460); + play_mario_heavy_landing_sound(m, SOUND_ACTION_TERRAIN_HEAVY_LANDING); if (!check_fall_damage(m, ACT_HARD_BACKWARD_GROUND_KB)) { - m->particleFlags |= 0x00010010; + m->particleFlags |= PARTICLE_16 | PARTICLE_4; set_mario_action(m, ACT_GROUND_POUND_LAND, 0); } } @@ -929,7 +929,7 @@ s32 act_ground_pound(struct MarioState *m) { m->vel[1] = 0.0f; } - m->particleFlags |= 0x00000002; + m->particleFlags |= PARTICLE_1; set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); } } @@ -938,17 +938,17 @@ s32 act_ground_pound(struct MarioState *m) { } s32 act_burning_jump(struct MarioState *m) { - play_mario_sound(m, SOUND_TERRAIN_1, m->actionArg == 0 ? 0 : -1); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, m->actionArg == 0 ? 0 : -1); mario_set_forward_vel(m, m->forwardVel); if (perform_air_step(m, 0) == AIR_STEP_LANDED) { - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); set_mario_action(m, ACT_BURNING_GROUND, 0); } set_mario_animation(m, m->actionArg == 0 ? MARIO_ANIM_SINGLE_JUMP : MARIO_ANIM_FIRE_LAVA_BURN); - m->particleFlags |= 0x00000800; - play_sound(SOUND_UNKNOWN_UNK1410, m->marioObj->header.gfx.cameraToObject); + m->particleFlags |= PARTICLE_11; + play_sound(SOUND_MOVING_LAVA_BURN, m->marioObj->header.gfx.cameraToObject); m->marioObj->oMarioBurnTimer += 3; @@ -963,12 +963,12 @@ s32 act_burning_fall(struct MarioState *m) { mario_set_forward_vel(m, m->forwardVel); if (perform_air_step(m, 0) == AIR_STEP_LANDED) { - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); set_mario_action(m, ACT_BURNING_GROUND, 0); } set_mario_animation(m, MARIO_ANIM_GENERAL_FALL); - m->particleFlags |= 0x00000800; + m->particleFlags |= PARTICLE_11; m->marioObj->oMarioBurnTimer += 3; m->health -= 10; @@ -1009,7 +1009,7 @@ s32 act_crazy_box_bounce(struct MarioState *m) { m->actionTimer = 1; } - play_mario_sound(m, SOUND_TERRAIN_1, 0); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0); set_mario_animation(m, MARIO_ANIM_DIVE); update_air_without_turn(m); @@ -1023,7 +1023,7 @@ s32 act_crazy_box_bounce(struct MarioState *m) { m->heldObj = NULL; set_mario_action(m, ACT_STOMACH_SLIDE, 0); } - m->particleFlags |= 0x00010000; + m->particleFlags |= PARTICLE_16; break; case AIR_STEP_HIT_WALL: @@ -1101,7 +1101,7 @@ s32 act_backward_air_kb(struct MarioState *m) { #ifndef VERSION_JP func_u_8026A090(m); #else - play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED); #endif common_air_knockback_step(m, ACT_BACKWARD_GROUND_KB, ACT_HARD_BACKWARD_GROUND_KB, 0x0002, -16.0f); return FALSE; @@ -1115,7 +1115,7 @@ s32 act_forward_air_kb(struct MarioState *m) { #ifndef VERSION_JP func_u_8026A090(m); #else - play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED); #endif common_air_knockback_step(m, ACT_FORWARD_GROUND_KB, ACT_HARD_FORWARD_GROUND_KB, 0x002D, 16.0f); return FALSE; @@ -1125,7 +1125,7 @@ s32 act_hard_backward_air_kb(struct MarioState *m) { #ifndef VERSION_JP func_u_8026A090(m); #else - play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED); #endif common_air_knockback_step(m, ACT_HARD_BACKWARD_GROUND_KB, ACT_HARD_BACKWARD_GROUND_KB, 0x0002, -16.0f); @@ -1136,7 +1136,7 @@ s32 act_hard_forward_air_kb(struct MarioState *m) { #ifndef VERSION_JP func_u_8026A090(m); #else - play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED); #endif common_air_knockback_step(m, ACT_HARD_FORWARD_GROUND_KB, ACT_HARD_FORWARD_GROUND_KB, 0x002D, 16.0f); return FALSE; @@ -1150,7 +1150,7 @@ s32 act_thrown_backward(struct MarioState *m) { landAction = ACT_BACKWARD_GROUND_KB; } - play_sound_if_no_flag(m, SOUND_MARIO_WAAAOOOW, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_WAAAOOOW, MARIO_MARIO_SOUND_PLAYED); common_air_knockback_step(m, landAction, ACT_HARD_BACKWARD_GROUND_KB, 0x0002, m->forwardVel); @@ -1168,7 +1168,7 @@ s32 act_thrown_forward(struct MarioState *m) { landAction = ACT_FORWARD_GROUND_KB; } - play_sound_if_no_flag(m, SOUND_MARIO_WAAAOOOW, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_WAAAOOOW, MARIO_MARIO_SOUND_PLAYED); if (common_air_knockback_step(m, landAction, ACT_HARD_FORWARD_GROUND_KB, 0x002D, m->forwardVel) == AIR_STEP_NONE) { @@ -1192,7 +1192,7 @@ s32 act_soft_bonk(struct MarioState *m) { #ifndef VERSION_JP func_u_8026A090(m); #else - play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED); #endif common_air_knockback_step(m, ACT_FREEFALL_LAND, ACT_HARD_BACKWARD_GROUND_KB, 0x0056, m->forwardVel); @@ -1222,7 +1222,7 @@ s32 act_getting_blown(struct MarioState *m) { mario_set_forward_vel(m, m->forwardVel); #ifdef VERSION_JP - play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED); #endif set_mario_animation(m, MARIO_ANIM_BACKWARD_AIR_KB); @@ -1263,7 +1263,7 @@ s32 act_air_hit_wall(struct MarioState *m) { m->vel[1] = 0.0f; } - m->particleFlags |= 0x00000002; + m->particleFlags |= PARTICLE_1; return set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); } else { m->wallKickTimer = 5; @@ -1294,7 +1294,7 @@ s32 act_forward_rollout(struct MarioState *m) { m->actionState = 1; } - play_mario_sound(m, SOUND_TERRAIN_1, 0); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0); update_air_without_turn(m); @@ -1311,7 +1311,7 @@ s32 act_forward_rollout(struct MarioState *m) { case AIR_STEP_LANDED: set_mario_action(m, ACT_FREEFALL_LAND_STOP, 0); - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); break; case AIR_STEP_HIT_WALL: @@ -1335,7 +1335,7 @@ s32 act_backward_rollout(struct MarioState *m) { m->actionState = 1; } - play_mario_sound(m, SOUND_TERRAIN_1, 0); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0); update_air_without_turn(m); @@ -1352,7 +1352,7 @@ s32 act_backward_rollout(struct MarioState *m) { case AIR_STEP_LANDED: set_mario_action(m, ACT_FREEFALL_LAND_STOP, 0); - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); break; case AIR_STEP_HIT_WALL: @@ -1385,14 +1385,14 @@ s32 act_butt_slide_air(struct MarioState *m) { } else { set_mario_action(m, ACT_BUTT_SLIDE, 0); } - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); break; case AIR_STEP_HIT_WALL: if (m->vel[1] > 0.0f) { m->vel[1] = 0.0f; } - m->particleFlags |= 0x00000002; + m->particleFlags |= PARTICLE_1; set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); break; @@ -1410,7 +1410,7 @@ s32 act_hold_butt_slide_air(struct MarioState *m) { return drop_and_set_mario_action(m, ACT_HOLD_FREEFALL, 1); } - if (++(m->actionTimer) > 30 && m->pos[1] - m->floorHeight > 500.0f) { + if (++m->actionTimer > 30 && m->pos[1] - m->floorHeight > 500.0f) { return set_mario_action(m, ACT_HOLD_FREEFALL, 1); } @@ -1424,7 +1424,7 @@ s32 act_hold_butt_slide_air(struct MarioState *m) { } else { set_mario_action(m, ACT_HOLD_BUTT_SLIDE, 0); } - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); break; case AIR_STEP_HIT_WALL: @@ -1433,7 +1433,7 @@ s32 act_hold_butt_slide_air(struct MarioState *m) { } mario_drop_held_object(m); - m->particleFlags |= 0x00000002; + m->particleFlags |= PARTICLE_1; set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); break; @@ -1447,7 +1447,7 @@ s32 act_hold_butt_slide_air(struct MarioState *m) { } s32 act_lava_boost(struct MarioState *m) { - play_sound_if_no_flag(m, SOUND_MARIO_ONFIRE, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_ON_FIRE, MARIO_MARIO_SOUND_PLAYED); if (!(m->input & INPUT_NONZERO_ANALOG)) { m->forwardVel = approach_f32(m->forwardVel, 0.0f, 0.35f, 0.35f); @@ -1463,9 +1463,9 @@ s32 act_lava_boost(struct MarioState *m) { m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 12 : 18; } m->vel[1] = 84.0f; - play_sound(SOUND_MARIO_ONFIRE, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_ON_FIRE, m->marioObj->header.gfx.cameraToObject); } else { - play_mario_heavy_landing_sound(m, SOUND_TERRAIN_4); + play_mario_heavy_landing_sound(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND); if (m->actionState < 2 && m->vel[1] < 0.0f) { m->vel[1] = -m->vel[1] * 0.4f; mario_set_forward_vel(m, m->forwardVel * 0.5f); @@ -1488,9 +1488,9 @@ 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 |= 0x00000800; + m->particleFlags |= PARTICLE_11; if (m->actionState == 0) { - play_sound(SOUND_UNKNOWN_UNK1410, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MOVING_LAVA_BURN, m->marioObj->header.gfx.cameraToObject); } } @@ -1504,7 +1504,7 @@ s32 act_lava_boost(struct MarioState *m) { s32 act_slide_kick(struct MarioState *m) { if (m->actionState == 0 && m->actionTimer == 0) { - play_mario_sound(m, SOUND_TERRAIN_1, SOUND_MARIO_HOOHOO); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, SOUND_MARIO_HOOHOO); set_mario_animation(m, MARIO_ANIM_SLIDE_KICK); } @@ -1532,7 +1532,7 @@ s32 act_slide_kick(struct MarioState *m) { } else { set_mario_action(m, ACT_SLIDE_KICK_SLIDE, 0); } - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); break; case AIR_STEP_HIT_WALL: @@ -1540,7 +1540,7 @@ s32 act_slide_kick(struct MarioState *m) { m->vel[1] = 0.0f; } - m->particleFlags |= 0x00000002; + m->particleFlags |= PARTICLE_1; set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); break; @@ -1557,7 +1557,7 @@ s32 act_jump_kick(struct MarioState *m) { s32 animFrame; if (m->actionState == 0) { - play_sound_if_no_flag(m, SOUND_MARIO_HOO6, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_PUNCH_HOO, MARIO_ACTION_SOUND_PLAYED); m->marioObj->header.gfx.unk38.animID = -1; set_mario_animation(m, MARIO_ANIM_AIR_KICK); m->actionState = 1; @@ -1595,7 +1595,7 @@ s32 act_shot_from_cannon(struct MarioState *m) { mario_set_forward_vel(m, m->forwardVel); - play_sound_if_no_flag(m, SOUND_MARIO_YAHOO, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_YAHOO, MARIO_MARIO_SOUND_PLAYED); switch (perform_air_step(m, 0)) { case AIR_STEP_NONE: @@ -1618,7 +1618,7 @@ s32 act_shot_from_cannon(struct MarioState *m) { m->vel[1] = 0.0f; } - m->particleFlags |= 0x00000002; + m->particleFlags |= PARTICLE_1; set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); func_80285BD8(m->area->camera, m->area->camera->defPreset, 1); break; @@ -1637,7 +1637,7 @@ s32 act_shot_from_cannon(struct MarioState *m) { } if (m->vel[1] > 0.0f) { - m->particleFlags |= 0x00000001; + m->particleFlags |= PARTICLE_DUST; } return FALSE; } @@ -1716,7 +1716,7 @@ s32 act_flying(struct MarioState *m) { : SOUND_ACTION_UNKNOWN445, m->marioObj->header.gfx.cameraToObject); - m->particleFlags |= 0x00000002; + m->particleFlags |= PARTICLE_1; set_mario_action(m, ACT_BACKWARD_AIR_KB, 0); func_80285BD8(m->area->camera, m->area->camera->defPreset, 1); } else { @@ -1744,18 +1744,18 @@ s32 act_flying(struct MarioState *m) { } if (m->faceAngle[0] > 0x800 && m->forwardVel >= 48.0f) { - m->particleFlags |= 0x00000001; + m->particleFlags |= PARTICLE_DUST; } if (startPitch <= 0 && m->faceAngle[0] > 0 && m->forwardVel >= 48.0f) { play_sound(SOUND_ACTION_UNKNOWN456, m->marioObj->header.gfx.cameraToObject); #ifndef VERSION_JP - play_sound(SOUND_MARIO_YAHOO2 + ((D_80226EB8 % 5) << 16), + play_sound(SOUND_MARIO_YAHOO_WAHA_YIPPEE + ((D_80226EB8 % 5) << 16), m->marioObj->header.gfx.cameraToObject); #endif } - play_sound(SOUND_UNKNOWN_UNK1417, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MOVING_FLYING, m->marioObj->header.gfx.cameraToObject); adjust_sound_for_speed(m); return FALSE; } @@ -1765,7 +1765,7 @@ s32 act_riding_hoot(struct MarioState *m) { m->usedObj->oInteractStatus = 0; m->usedObj->oHootMarioReleaseTime = gGlobalTimer; - play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED); return set_mario_action(m, ACT_FREEFALL, 0); } @@ -1811,7 +1811,7 @@ s32 act_flying_triple_jump(struct MarioState *m) { } #endif - play_mario_sound(m, SOUND_TERRAIN_1, SOUND_MARIO_YAHOO); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, SOUND_MARIO_YAHOO); if (m->actionState == 0) { set_mario_animation(m, MARIO_ANIM_TRIPLE_JUMP_FLY); @@ -1867,7 +1867,7 @@ s32 act_flying_triple_jump(struct MarioState *m) { } s32 act_top_of_pole_jump(struct MarioState *m) { - play_mario_action_sound(m); + play_mario_jump_sound(m); common_air_action_step(m, ACT_FREEFALL_LAND, MARIO_ANIM_HANDSTAND_JUMP, AIR_STEP_CHECK_LEDGE_GRAB); return FALSE; } @@ -1876,7 +1876,7 @@ s32 act_vertical_wind(struct MarioState *m) { s16 intendedDYaw = m->intendedYaw - m->faceAngle[1]; f32 intendedMag = m->intendedMag / 32.0f; - play_sound_if_no_flag(m, SOUND_MARIO_HEREWEGO, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_HERE_WE_GO, MARIO_MARIO_SOUND_PLAYED); if (m->actionState == 0) { set_mario_animation(m, MARIO_ANIM_FORWARD_SPINNING_FLIP); if (m->marioObj->header.gfx.unk38.animFrame == 1) { @@ -1916,7 +1916,7 @@ s32 act_special_triple_jump(struct MarioState *m) { return set_mario_action(m, ACT_GROUND_POUND, 0); } - play_mario_sound(m, SOUND_TERRAIN_1, SOUND_MARIO_YAHOO); + play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, SOUND_MARIO_YAHOO); update_air_without_turn(m); @@ -1927,7 +1927,7 @@ s32 act_special_triple_jump(struct MarioState *m) { } else { set_mario_action(m, ACT_FREEFALL_LAND_STOP, 0); } - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); break; case AIR_STEP_HIT_WALL: @@ -1943,7 +1943,7 @@ s32 act_special_triple_jump(struct MarioState *m) { set_mario_animation(m, MARIO_ANIM_GENERAL_FALL); } - m->particleFlags |= 0x00000008; + m->particleFlags |= PARTICLE_SPARKLES; return FALSE; } diff --git a/src/game/mario_actions_automatic.c b/src/game/mario_actions_automatic.c index 75f6fd2..ed62f8a 100644 --- a/src/game/mario_actions_automatic.c +++ b/src/game/mario_actions_automatic.c @@ -44,11 +44,11 @@ void play_climbing_sounds(struct MarioState *m, s32 b) { if (b == 1) { if (is_anim_past_frame(m, 1) != 0) { - play_sound(isOnTree ? SOUND_ACTION_CLIMBUPTREE : SOUND_ACTION_UNKNOWN441, + play_sound(isOnTree ? SOUND_ACTION_CLIMB_UP_TREE : SOUND_ACTION_CLIMB_UP_POLE, m->marioObj->header.gfx.cameraToObject); } } else { - play_sound(isOnTree ? SOUND_UNKNOWN_UNK1412 : SOUND_UNKNOWN_UNK1411, + play_sound(isOnTree ? SOUND_MOVING_SLIDE_DOWN_TREE : SOUND_MOVING_SLIDE_DOWN_POLE, m->marioObj->header.gfx.cameraToObject); } } @@ -220,7 +220,7 @@ s32 act_climbing_pole(struct MarioState *m) { } s32 act_grab_pole_slow(struct MarioState *m) { - play_sound_if_no_flag(m, SOUND_MARIO_WHOA, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_WHOA, MARIO_MARIO_SOUND_PLAYED); if (set_pole_position(m, 0.0f) == POLE_NONE) { set_mario_animation(m, MARIO_ANIM_GRAB_POLE_SHORT); @@ -236,7 +236,7 @@ s32 act_grab_pole_slow(struct MarioState *m) { s32 act_grab_pole_fast(struct MarioState *m) { struct Object *marioObj = m->marioObj; - play_sound_if_no_flag(m, SOUND_MARIO_WHOA, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_WHOA, MARIO_MARIO_SOUND_PLAYED); m->faceAngle[1] += marioObj->oMarioPoleYawVel; marioObj->oMarioPoleYawVel = marioObj->oMarioPoleYawVel * 8 / 10; @@ -400,7 +400,7 @@ s32 act_start_hanging(struct MarioState *m) { } set_mario_animation(m, MARIO_ANIM_HANG_ON_CEILING); - play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN42D, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_ACTION_HANGING_STEP, MARIO_ACTION_SOUND_PLAYED); update_hang_stationary(m); if (is_anim_at_end(m)) { @@ -458,7 +458,7 @@ s32 act_hang_moving(struct MarioState *m) { } if (m->marioObj->header.gfx.unk38.animFrame == 12) { - play_sound(SOUND_ACTION_UNKNOWN42D, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_ACTION_HANGING_STEP, m->marioObj->header.gfx.cameraToObject); } if (is_anim_past_end(m)) { @@ -577,7 +577,7 @@ s32 act_ledge_grab(struct MarioState *m) { } if (m->actionArg == 0) { - play_sound_if_no_flag(m, SOUND_MARIO_WHOA, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_WHOA, MARIO_MARIO_SOUND_PLAYED); } stop_and_set_height_to_floor(m); @@ -599,7 +599,7 @@ s32 act_ledge_climb_slow(struct MarioState *m) { } if (m->actionTimer == 10) { - play_sound_if_no_flag(m, SOUND_MARIO_EEUH, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_EEUH, MARIO_MARIO_SOUND_PLAYED); } update_ledge_climb(m, MARIO_ANIM_SLOW_LEDGE_GRAB, ACT_IDLE); @@ -617,7 +617,7 @@ s32 act_ledge_climb_down(struct MarioState *m) { return let_go_of_ledge(m); } - play_sound_if_no_flag(m, SOUND_MARIO_WHOA, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_WHOA, MARIO_MARIO_SOUND_PLAYED); update_ledge_climb(m, MARIO_ANIM_CLIMB_DOWN_LEDGE, ACT_LEDGE_GRAB); m->actionArg = 1; @@ -630,12 +630,12 @@ s32 act_ledge_climb_fast(struct MarioState *m) { return let_go_of_ledge(m); } - play_sound_if_no_flag(m, SOUND_MARIO_UH2, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_UH2, MARIO_MARIO_SOUND_PLAYED); update_ledge_climb(m, MARIO_ANIM_FAST_LEDGE_GRAB, ACT_IDLE); if (m->marioObj->header.gfx.unk38.animFrame == 8) { - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); } func_8025F188(m); @@ -722,7 +722,7 @@ s32 act_in_cannon(struct MarioState *m) { m->pos[2] += 120.0f * coss(m->faceAngle[0]) * coss(m->faceAngle[1]); play_sound(SOUND_ACTION_UNKNOWN456, m->marioObj->header.gfx.cameraToObject); - play_sound(SOUND_OBJECT_POUNDINGCANNON, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_OBJ_POUNDING_CANNON, m->marioObj->header.gfx.cameraToObject); m->marioObj->header.gfx.node.flags |= 0x0001; @@ -731,7 +731,7 @@ s32 act_in_cannon(struct MarioState *m) { return FALSE; } else { if (m->faceAngle[0] != startFacePitch || m->faceAngle[1] != startFaceYaw) { - play_sound(SOUND_MOVING_UNKNOWN19, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MOVING_AIM_CANNON, m->marioObj->header.gfx.cameraToObject); } } } @@ -812,7 +812,7 @@ s32 act_tornado_twirling(struct MarioState *m) { // Play sound on angle overflow if (prevTwirlYaw > m->twirlYaw) { - play_sound(SOUND_ACTION_UNKNOWN438, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_ACTION_SWISH2_2, m->marioObj->header.gfx.cameraToObject); } vec3f_copy(m->marioObj->header.gfx.pos, m->pos); diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index 2d976a2..bae0384 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -131,8 +131,7 @@ void print_displaying_credits_entry(void) { lineHeight = 16; #endif - // init printing credits text? - func_802D9A60(); + dl_rgba16_begin_cutscene_msg_fade(); print_credits_str_ascii(28, strY, titleStr); #ifndef VERSION_JP @@ -174,8 +173,7 @@ void print_displaying_credits_entry(void) { currStrPtr++; } - // update credits fade? - func_802D9AE8(); + dl_rgba16_stop_cutscene_msg_fade(); sDispCreditsEntry = NULL; } } @@ -258,18 +256,18 @@ void handle_save_menu(struct MarioState *m) { s32 dialogID; // wait for the menu to show up // mario_finished_animation(m) ? (not my file, not my problem) - if (is_anim_past_end(m) && D_8033A760 != 0) { + if (is_anim_past_end(m) && gSaveOptSelectIndex != 0) { // save and continue / save and quit - if (D_8033A760 == SAVE_OPT_SAVE_AND_CONTINUE || D_8033A760 == SAVE_OPT_SAVE_AND_QUIT) { + if (gSaveOptSelectIndex == SAVE_OPT_SAVE_AND_CONTINUE || gSaveOptSelectIndex == SAVE_OPT_SAVE_AND_QUIT) { save_file_do_save(gCurrSaveFileNum - 1); - if (D_8033A760 == SAVE_OPT_SAVE_AND_QUIT) { + if (gSaveOptSelectIndex == SAVE_OPT_SAVE_AND_QUIT) { func_80249788(-2, 0); // reset game } } // not quitting - if (D_8033A760 != SAVE_OPT_SAVE_AND_QUIT) { + if (gSaveOptSelectIndex != SAVE_OPT_SAVE_AND_QUIT) { disable_time_stop(); m->faceAngle[1] += 0x8000; // figure out what dialog to show, if we should @@ -467,9 +465,9 @@ s32 act_reading_automatic_dialog(struct MarioState *m) { if (m->actionState == 9) { actionArg = m->actionArg; if (GET_HIGH_U16_OF_32(actionArg) == 0) { - func_802D7F90(GET_LOW_U16_OF_32(actionArg)); + create_dialog_box(GET_LOW_U16_OF_32(actionArg)); } else { - func_802D7FCC(GET_HIGH_U16_OF_32(actionArg), GET_LOW_U16_OF_32(actionArg)); + create_dialog_box_with_var(GET_HIGH_U16_OF_32(actionArg), GET_LOW_U16_OF_32(actionArg)); } } // wait until dialog is done @@ -506,7 +504,7 @@ s32 act_reading_automatic_dialog(struct MarioState *m) { s32 act_reading_sign(struct MarioState *m) { struct Object *marioObj = m->marioObj; - play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN45B, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN45B, MARIO_ACTION_SOUND_PLAYED); switch (m->actionState) { // start dialog @@ -524,7 +522,7 @@ s32 act_reading_sign(struct MarioState *m) { m->pos[2] += marioObj->oMarioReadingSignDPosZ / 11.0f; // create the text box if (m->actionTimer++ == 10) { - CreateTextBox(m->usedObj->oBehParams2ndByte); + create_dialog_inverted_box(m->usedObj->oBehParams2ndByte); m->actionState = 2; } break; @@ -618,7 +616,7 @@ void general_star_dance_handler(struct MarioState *m, s32 isInWater) { break; case 42: - play_sound(SOUND_MARIO_HEREWEGO, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_HERE_WE_GO, m->marioObj->header.gfx.cameraToObject); break; case 80: @@ -626,7 +624,7 @@ void general_star_dance_handler(struct MarioState *m, s32 isInWater) { level_trigger_warp(m, WARP_OP_STAR_EXIT); } else { enable_time_stop(); - func_802D8050(gLastCompletedStarNum == 7 ? 13 : 14); + create_dialog_box_with_response(gLastCompletedStarNum == 7 ? 13 : 14); m->actionState = 1; } break; @@ -681,7 +679,7 @@ s32 act_fall_after_star_grab(struct MarioState *m) { return set_mario_action(m, ACT_STAR_DANCE_WATER, m->actionArg); } if (perform_air_step(m, 1) == AIR_STEP_LANDED) { - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); set_mario_action(m, m->actionArg & 1 ? ACT_STAR_DANCE_NO_EXIT : ACT_STAR_DANCE_EXIT, m->actionArg); } @@ -705,38 +703,38 @@ s32 act_standing_death(struct MarioState *m) { return set_mario_action(m, ACT_SUFFOCATION, 0); } - play_sound_if_no_flag(m, SOUND_MARIO_DYING, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_DYING, MARIO_ACTION_SOUND_PLAYED); common_death_handler(m, MARIO_ANIM_DYING_FALL_OVER, 80); if (m->marioObj->header.gfx.unk38.animFrame == 77) { - play_mario_step_sound(m, SOUND_TERRAIN_4); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND); } return FALSE; } s32 act_electrocution(struct MarioState *m) { - play_sound_if_no_flag(m, SOUND_MARIO_DYING, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_DYING, MARIO_ACTION_SOUND_PLAYED); common_death_handler(m, MARIO_ANIM_ELECTROCUTION, 43); return FALSE; } s32 act_suffocation(struct MarioState *m) { - play_sound_if_no_flag(m, SOUND_MARIO_DYING, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_DYING, MARIO_ACTION_SOUND_PLAYED); common_death_handler(m, MARIO_ANIM_SUFFOCATING, 86); return FALSE; } s32 act_death_on_back(struct MarioState *m) { - play_sound_if_no_flag(m, SOUND_MARIO_DYING, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_DYING, MARIO_ACTION_SOUND_PLAYED); if (common_death_handler(m, MARIO_ANIM_DYING_ON_BACK, 54) == 40) { - play_mario_heavy_landing_sound(m, SOUND_TERRAIN_4); + play_mario_heavy_landing_sound(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND); } return FALSE; } s32 act_death_on_stomach(struct MarioState *m) { - play_sound_if_no_flag(m, SOUND_MARIO_DYING, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_DYING, MARIO_ACTION_SOUND_PLAYED); if (common_death_handler(m, MARIO_ANIM_DYING_ON_STOMACH, 37) == 37) { - play_mario_heavy_landing_sound(m, SOUND_TERRAIN_4); + play_mario_heavy_landing_sound(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND); } return FALSE; } @@ -749,7 +747,7 @@ s32 act_quicksand_death(struct MarioState *m) { } if (m->actionState == 1) { if (m->quicksandDepth >= 100.0f) { - play_sound_if_no_flag(m, SOUND_MARIO_WAAAOOOW, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_WAAAOOOW, MARIO_ACTION_SOUND_PLAYED); } if ((m->quicksandDepth += 5.0f) >= 180.0f) { level_trigger_warp(m, WARP_OP_DEATH); @@ -757,12 +755,12 @@ s32 act_quicksand_death(struct MarioState *m) { } } stationary_ground_step(m); - play_sound(SOUND_UNKNOWN_UNK1414, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MOVING_QUICKSAND_DEATH, m->marioObj->header.gfx.cameraToObject); return FALSE; } s32 act_eaten_by_bubba(struct MarioState *m) { - play_sound_if_no_flag(m, SOUND_MARIO_DYING, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_DYING, MARIO_ACTION_SOUND_PLAYED); set_mario_animation(m, MARIO_ANIM_A_POSE); m->marioObj->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE; m->health = 0xFF; @@ -994,19 +992,19 @@ s32 act_emerge_from_pipe(struct MarioState *m) { marioObj->header.gfx.node.flags |= GRAPH_RENDER_ACTIVE; - play_sound_if_no_flag(m, SOUND_MARIO_YAHOO, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_YAHOO, MARIO_MARIO_SOUND_PLAYED); if (gCurrLevelNum == 13) { if (gCurrAreaIndex == 2) { - play_sound_if_no_flag(m, SOUND_MENU_EXITPIPE, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MENU_EXIT_PIPE, MARIO_ACTION_SOUND_PLAYED); } else { - play_sound_if_no_flag(m, SOUND_MENU_ENTERPIPE, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MENU_ENTER_PIPE, MARIO_ACTION_SOUND_PLAYED); } } if (launch_mario_until_land(m, ACT_JUMP_LAND_STOP, MARIO_ANIM_SINGLE_JUMP, 8.0f)) { mario_set_forward_vel(m, 0.0f); - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); } return FALSE; } @@ -1023,7 +1021,7 @@ s32 act_spawn_spin_airborne(struct MarioState *m) { // landed on floor, play spawn land animation if (perform_air_step(m, 0.0) == AIR_STEP_LANDED) { - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); set_mario_action(m, ACT_SPAWN_SPIN_LANDING, 0); } @@ -1089,7 +1087,7 @@ s32 act_falling_exit_airborne(struct MarioState *m) { s32 act_exit_land_save_dialog(struct MarioState *m) { s32 animFrame; stationary_ground_step(m); - play_mario_landing_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound_once(m, SOUND_ACTION_TERRAIN_LANDING); switch (m->actionState) { // determine type of exit case 0: @@ -1101,8 +1099,8 @@ s32 act_exit_land_save_dialog(struct MarioState *m) { enable_time_stop(); } - func_802D9A14(2); - D_8033A760 = 0; + set_menu_mode(RENDER_COURSE_DONE_SCREEN); + gSaveOptSelectIndex = 0; m->actionState = 3; // star exit with cap if (!(m->flags & MARIO_CAP_ON_HEAD)) { @@ -1126,7 +1124,7 @@ s32 act_exit_land_save_dialog(struct MarioState *m) { play_sound(SOUND_ACTION_SWISH1, m->marioObj->header.gfx.cameraToObject); //! fall through case 83: - play_sound(SOUND_ACTION_PATBACK, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_ACTION_PAT_BACK, m->marioObj->header.gfx.cameraToObject); //! fall through case 111: play_sound(SOUND_ACTION_UNKNOWN45C, m->marioObj->header.gfx.cameraToObject); @@ -1156,7 +1154,7 @@ s32 act_exit_land_save_dialog(struct MarioState *m) { case 37: // fall through case 53: - play_sound(SOUND_ACTION_BRUSHHAIR, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_ACTION_BRUSH_HAIR, m->marioObj->header.gfx.cameraToObject); break; case 82: cutscene_put_cap_on(m); @@ -1223,7 +1221,7 @@ s32 act_falling_death_exit(struct MarioState *m) { s32 act_special_exit_airborne(struct MarioState *m) { struct Object *marioObj = m->marioObj; - play_sound_if_no_flag(m, SOUND_MARIO_YAHOO, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_YAHOO, MARIO_MARIO_SOUND_PLAYED); if (m->actionTimer++ < 11) { marioObj->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE; @@ -1274,7 +1272,7 @@ s32 act_spawn_no_spin_airborne(struct MarioState *m) { } s32 act_spawn_no_spin_landing(struct MarioState *m) { - play_mario_landing_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound_once(m, SOUND_ACTION_TERRAIN_LANDING); set_mario_animation(m, MARIO_ANIM_GENERAL_LAND); stop_and_set_height_to_floor(m); if (is_anim_at_end(m)) { @@ -1344,7 +1342,7 @@ s32 act_bbh_enter_spin(struct MarioState *m) { m->actionState = 3; } } else { - play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN446, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN446, MARIO_ACTION_SOUND_PLAYED); set_mario_animation(m, MARIO_ANIM_DIVE); m->marioObj->header.gfx.angle[0] = atan2s(m->forwardVel, -m->vel[1]); } @@ -1370,9 +1368,9 @@ s32 act_bbh_enter_jump(struct MarioState *m) { f32 cageDZ; f32 cageDist; - play_mario_environment_sound( - m, m->flags & MARIO_METAL_CAP ? SOUND_ACTION_UNKNOWN428 : SOUND_TERRAIN_1, 1); - play_mario_action_sound(m); + play_mario_action_sound( + m, m->flags & MARIO_METAL_CAP ? SOUND_ACTION_METAL_JUMP : SOUND_ACTION_TERRAIN_JUMP, 1); + play_mario_jump_sound(m); if (m->actionState == 0) { cageDX = m->usedObj->oPosX - m->pos[0]; @@ -1398,7 +1396,7 @@ s32 act_bbh_enter_jump(struct MarioState *m) { } s32 act_teleport_fade_out(struct MarioState *m) { - play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN457, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN457, MARIO_ACTION_SOUND_PLAYED); set_mario_animation(m, m->prevAction == ACT_CROUCHING ? MARIO_ANIM_CROUCHING : MARIO_ANIM_FIRST_PERSON); m->flags |= MARIO_TELEPORTING; @@ -1417,7 +1415,7 @@ s32 act_teleport_fade_out(struct MarioState *m) { } s32 act_teleport_fade_in(struct MarioState *m) { - play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN457, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN457, MARIO_ACTION_SOUND_PLAYED); set_mario_animation(m, MARIO_ANIM_FIRST_PERSON); if (m->actionTimer < 32) { @@ -1447,8 +1445,8 @@ s32 act_teleport_fade_in(struct MarioState *m) { // act shocked :omega: s32 act_shocked(struct MarioState *m) { - play_sound_if_no_flag(m, SOUND_MARIO_WAAAOOOW, MARIO_ENVIRONMENT_NOISE_PLAYED); - play_sound(SOUND_UNKNOWN_UNK1416, m->marioObj->header.gfx.cameraToObject); + play_sound_if_no_flag(m, SOUND_MARIO_WAAAOOOW, MARIO_ACTION_SOUND_PLAYED); + play_sound(SOUND_MOVING_SHOCKED, m->marioObj->header.gfx.cameraToObject); set_camera_shake(SHAKE_SHOCK); if (set_mario_animation(m, MARIO_ANIM_SHOCKED) == 0) { @@ -1459,7 +1457,7 @@ s32 act_shocked(struct MarioState *m) { if (m->actionArg == 0) { mario_set_forward_vel(m, 0.0f); if (perform_air_step(m, 1) == AIR_STEP_LANDED) { - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); m->actionArg = 1; } } else { @@ -1473,11 +1471,6 @@ s32 act_shocked(struct MarioState *m) { return FALSE; } -// no one will get the joke behind this so just ignore it - -// ok this has to be squish -// -// ...:squish: s32 act_squished(struct MarioState *m) { UNUSED s32 pad; f32 squishAmount; @@ -1507,7 +1500,7 @@ s32 act_squished(struct MarioState *m) { if (!(m->flags & MARIO_METAL_CAP) && m->invincTimer == 0) { // cap on: 3 units; cap off: 4.5 units m->hurtCounter += m->flags & MARIO_CAP_ON_HEAD ? 12 : 18; - play_sound_if_no_flag(m, SOUND_MARIO_ATTACKED, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_ATTACKED, MARIO_MARIO_SOUND_PLAYED); } // Both of the 1.8's are really floats, but one of them has to @@ -1612,13 +1605,13 @@ void stuck_in_ground_handler(struct MarioState *m, s32 animation, s32 unstuckFra stop_and_set_height_to_floor(m); if (animFrame == -1) { - play_sound_and_spawn_particles(m, SOUND_TERRAIN_6, 1); + play_sound_and_spawn_particles(m, SOUND_ACTION_TERRAIN_STUCK_IN_GROUND, 1); } else if (animFrame == unstuckFrame) { play_sound_and_spawn_particles(m, SOUND_ACTION_UNKNOWN443, 1); } else if (animFrame == target2 || animFrame == target3) { - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); } if (is_anim_at_end(m)) { @@ -1674,7 +1667,7 @@ static void intro_cutscene_raise_pipe(struct MarioState *m) { sIntroWarpPipeObj->oPosY = camera_approach_f32_symmetric(sIntroWarpPipeObj->oPosY, 260.0f, 10.0f); if (m->actionTimer == 0) { - play_sound(SOUND_MENU_EXITPIPE, sIntroWarpPipeObj->header.gfx.cameraToObject); + play_sound(SOUND_MENU_EXIT_PIPE, sIntroWarpPipeObj->header.gfx.cameraToObject); } if (m->actionTimer++ == 38) { @@ -1691,16 +1684,16 @@ static void intro_cutscene_jump_out_of_pipe(struct MarioState *m) { if (m->actionTimer++ >= 118) { m->marioObj->header.gfx.node.flags |= GRAPH_RENDER_ACTIVE; - play_sound_if_no_flag(m, SOUND_MARIO_YAHOO, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_YAHOO, MARIO_MARIO_SOUND_PLAYED); #ifndef VERSION_JP - play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN444_3, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN444_3, MARIO_ACTION_SOUND_PLAYED); #endif set_mario_animation(m, MARIO_ANIM_SINGLE_JUMP); mario_set_forward_vel(m, 10.0f); if (perform_air_step(m, 0) == AIR_STEP_LANDED) { sound_banks_enable(2, 0x0330); - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); #ifndef VERSION_JP play_sound(SOUND_MARIO_HAHA, m->marioObj->header.gfx.cameraToObject); #endif @@ -1721,7 +1714,7 @@ static void intro_cutscene_land_outside_pipe(struct MarioState *m) { static void intro_cutscene_lower_pipe(struct MarioState *m) { if (m->actionTimer++ == 0) { - play_sound(SOUND_MENU_ENTERPIPE, sIntroWarpPipeObj->header.gfx.cameraToObject); + play_sound(SOUND_MENU_ENTER_PIPE, sIntroWarpPipeObj->header.gfx.cameraToObject); set_mario_animation(m, MARIO_ANIM_FIRST_PERSON); } @@ -1795,7 +1788,7 @@ static void jumbo_star_cutscene_falling(struct MarioState *m) { if (perform_air_step(m, 1) == AIR_STEP_LANDED) { play_cutscene_music(SEQUENCE_ARGS(15, SEQ_EVENT_CUTSCENE_VICTORY)); - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); m->actionState++; } } else { @@ -1817,13 +1810,13 @@ static s32 jumbo_star_cutscene_taking_off(struct MarioState *m) { marioObj->rawData.asF32[0x22] = 0.0f; if (is_anim_past_end(m)) { - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); m->actionState++; } } else { animFrame = set_mario_animation(m, MARIO_ANIM_FINAL_BOWSER_WING_CAP_TAKE_OFF); if (animFrame == 3 || animFrame == 28 || animFrame == 60) { - play_sound_and_spawn_particles(m, SOUND_TERRAIN_1, 1); + play_sound_and_spawn_particles(m, SOUND_ACTION_TERRAIN_JUMP, 1); } if (animFrame >= 3) { marioObj->rawData.asF32[0x22] -= 32.0f; @@ -1831,7 +1824,7 @@ static s32 jumbo_star_cutscene_taking_off(struct MarioState *m) { switch (animFrame) { case 3: - play_sound(SOUND_MARIO_YAH + (D_80226EB8 % 3 << 16), + play_sound(SOUND_MARIO_YAH_WAH_HOO + (D_80226EB8 % 3 << 16), m->marioObj->header.gfx.cameraToObject); break; @@ -1979,7 +1972,7 @@ static void end_peach_cutscene_mario_falling(struct MarioState *m) { mario_set_forward_vel(m, 0.0f); if (perform_air_step(m, 0) == AIR_STEP_LANDED) { - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); advance_cutscene_step(m); } } @@ -2017,7 +2010,7 @@ static void end_peach_cutscene_summon_jumbo_star(struct MarioState *m) { sEndJumboStarObj->oFaceAngleYaw += 0x0400; generate_yellow_sparkles(0, 2528, -1800, 250.0f); - play_sound(SOUND_CH6_PEACHTWINKLE, sEndJumboStarObj->header.gfx.cameraToObject); + play_sound(SOUND_AIR_PEACH_TWINKLE, sEndJumboStarObj->header.gfx.cameraToObject); } // free peach from the stained glass window @@ -2026,7 +2019,7 @@ static void end_peach_cutscene_spawn_peach(struct MarioState *m) { play_transition(WARP_TRANSITION_FADE_INTO_COLOR, 14, 255, 255, 255); } if (m->actionTimer == 2) { - play_sound(SOUND_MENU_STARSOUND, gDefaultSoundArgs); + play_sound(SOUND_MENU_STAR_SOUND, gDefaultSoundArgs); } if (m->actionTimer == 44) { play_transition(WARP_TRANSITION_FADE_FROM_COLOR, 192, 255, 255, 255); @@ -2065,7 +2058,7 @@ static void end_peach_cutscene_spawn_peach(struct MarioState *m) { } // probably added sounds later and missed the previous >= 40 check if (m->actionTimer >= 40) { - play_sound(SOUND_CH6_PEACHTWINKLE, sEndPeachObj->header.gfx.cameraToObject); + play_sound(SOUND_AIR_PEACH_TWINKLE, sEndPeachObj->header.gfx.cameraToObject); } } @@ -2088,7 +2081,7 @@ static void end_peach_cutscene_descend_peach(struct MarioState *m) { sEndPeachObj->oPosY = 906.0f; } - play_sound(SOUND_CH6_PEACHTWINKLE, sEndPeachObj->header.gfx.cameraToObject); + play_sound(SOUND_AIR_PEACH_TWINKLE, sEndPeachObj->header.gfx.cameraToObject); if (m->actionTimer >= 584) { advance_cutscene_step(m); @@ -2168,7 +2161,7 @@ static void end_peach_cutscene_dialog_1(struct MarioState *m) { case 290: set_cutscene_message(160, 227, 1, 60); #ifndef VERSION_JP - play_sound(SOUND_PEACH_POWEROFTHESTARS, sEndPeachObj->header.gfx.cameraToObject); + play_sound(SOUND_PEACH_POWER_OF_THE_STARS, sEndPeachObj->header.gfx.cameraToObject); #endif break; @@ -2189,7 +2182,7 @@ static void end_peach_cutscene_dialog_2(struct MarioState *m) { case 29: set_cutscene_message(160, 227, 2, 30); #ifndef VERSION_JP - play_sound(SOUND_PEACH_THANKSTOYOU, sEndPeachObj->header.gfx.cameraToObject); + play_sound(SOUND_PEACH_THANKS_TO_YOU, sEndPeachObj->header.gfx.cameraToObject); #endif break; @@ -2200,14 +2193,14 @@ static void end_peach_cutscene_dialog_2(struct MarioState *m) { case 75: set_cutscene_message(160, 227, 3, 30); #ifndef VERSION_JP - play_sound(SOUND_PEACH_THANKYOUMARIO, sEndPeachObj->header.gfx.cameraToObject); + play_sound(SOUND_PEACH_THANK_YOU_MARIO, sEndPeachObj->header.gfx.cameraToObject); #endif break; case 130: set_cutscene_message(160, 227, 4, 40); #ifndef VERSION_JP - play_sound(SOUND_PEACH_SOMETHINGSPECIAL, sEndPeachObj->header.gfx.cameraToObject); + play_sound(SOUND_PEACH_SOMETHING_SPECIAL, sEndPeachObj->header.gfx.cameraToObject); #endif break; @@ -2267,7 +2260,7 @@ static void end_peach_cutscene_star_dance(struct MarioState *m) { cutscene_put_cap_on(m); } if (animFrame == 88) { - play_sound(SOUND_MARIO_HEREWEGO, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_HERE_WE_GO, m->marioObj->header.gfx.cameraToObject); } if (animFrame >= 98) { m->marioBodyState->handState = MARIO_HAND_PEACE_SIGN; @@ -2296,7 +2289,7 @@ static void end_peach_cutscene_star_dance(struct MarioState *m) { case 140: #ifndef VERSION_JP - func_80320040(0, 60); + sequence_player_unlower(0, 60); #endif play_cutscene_music(SEQUENCE_ARGS(15, SEQ_EVENT_CUTSCENE_CREDITS)); break; @@ -2326,7 +2319,7 @@ static void end_peach_cutscene_dialog_3(struct MarioState *m) { D_8032CBE8 = 1; set_cutscene_message(160, 227, 5, 30); #ifndef VERSION_JP - play_sound(SOUND_PEACH_BAKEACAKE, sEndPeachObj->header.gfx.cameraToObject); + play_sound(SOUND_PEACH_BAKE_A_CAKE, sEndPeachObj->header.gfx.cameraToObject); #endif break; @@ -2337,7 +2330,7 @@ static void end_peach_cutscene_dialog_3(struct MarioState *m) { case 130: set_cutscene_message(160, 227, 7, 50); #ifndef VERSION_JP - play_sound(SOUND_PEACH_FORMARIO, sEndPeachObj->header.gfx.cameraToObject); + play_sound(SOUND_PEACH_FOR_MARIO, sEndPeachObj->header.gfx.cameraToObject); #endif break; } diff --git a/src/game/mario_actions_moving.c b/src/game/mario_actions_moving.c index 817b8fc..032d4ca 100644 --- a/src/game/mario_actions_moving.c +++ b/src/game/mario_actions_moving.c @@ -66,20 +66,20 @@ s16 func_80263A50(struct MarioState *m) { return -pitch; } -void func_80263AD4(struct MarioState *m, s16 arg1, s16 arg2) { - if (is_anim_past_frame(m, arg1) || is_anim_past_frame(m, arg2)) { +void func_80263AD4(struct MarioState *m, s16 frame1, s16 frame2) { + if (is_anim_past_frame(m, frame1) || is_anim_past_frame(m, frame2)) { if (m->flags & MARIO_METAL_CAP) { - if (m->marioObj->header.gfx.unk38.animID == 0x0092) { - play_sound_and_spawn_particles(m, SOUND_ACTION_UNKNOWN42F, 0); + if (m->marioObj->header.gfx.unk38.animID == MARIO_ANIM_TIPTOE) { + play_sound_and_spawn_particles(m, SOUND_ACTION_METAL_STEP_TIPTOE, 0); } else { - play_sound_and_spawn_particles(m, SOUND_ACTION_UNKNOWN42A, 0); + play_sound_and_spawn_particles(m, SOUND_ACTION_METAL_STEP, 0); } } else if (m->quicksandDepth > 50.0f) { - play_sound(SOUND_ACTION_UNKNOWN42E, m->marioObj->header.gfx.cameraToObject); - } else if (m->marioObj->header.gfx.unk38.animID == 0x0092) { - play_sound_and_spawn_particles(m, SOUND_TERRAIN_5, 0); + play_sound(SOUND_ACTION_QUICKSAND_STEP, m->marioObj->header.gfx.cameraToObject); + } else if (m->marioObj->header.gfx.unk38.animID == MARIO_ANIM_TIPTOE) { + play_sound_and_spawn_particles(m, SOUND_ACTION_TERRAIN_STEP_TIPTOE, 0); } else { - play_sound_and_spawn_particles(m, SOUND_TERRAIN_3, 0); + play_sound_and_spawn_particles(m, SOUND_ACTION_TERRAIN_STEP, 0); } } } @@ -530,7 +530,7 @@ void func_802652F0(struct MarioState *m) { if (m->quicksandDepth > 50.0f) { val14 = (s32)(val04 / 4.0f * 0x10000); set_mario_anim_with_accel(m, MARIO_ANIM_MOVE_IN_QUICKSAND, val14); - func_80263AD4(m, 0x0013, 0x005D); + func_80263AD4(m, 19, 93); m->actionTimer = 0; } else { while (val0C) { @@ -543,8 +543,8 @@ void func_802652F0(struct MarioState *m) { val14 = 0x1000; } set_mario_anim_with_accel(m, MARIO_ANIM_START_TIPTOE, val14); - func_80263AD4(m, 0x0007, 0x0016); - if (is_anim_past_frame(m, 0x0017)) { + func_80263AD4(m, 7, 22); + if (is_anim_past_frame(m, 23)) { m->actionTimer = 2; } @@ -560,7 +560,7 @@ void func_802652F0(struct MarioState *m) { val14 = 0x1000; } set_mario_anim_with_accel(m, MARIO_ANIM_TIPTOE, val14); - func_80263AD4(m, 0x000E, 0x0048); + func_80263AD4(m, 14, 72); val0C = FALSE; } @@ -574,7 +574,7 @@ void func_802652F0(struct MarioState *m) { } else { val14 = (s32)(val04 / 4.0f * 0x10000); set_mario_anim_with_accel(m, MARIO_ANIM_WALKING, val14); - func_80263AD4(m, 0x000A, 0x0031); + func_80263AD4(m, 10, 49); val0C = FALSE; } @@ -586,7 +586,7 @@ void func_802652F0(struct MarioState *m) { } else { val14 = (s32)(val04 / 4.0f * 0x10000); set_mario_anim_with_accel(m, MARIO_ANIM_RUNNING, val14); - func_80263AD4(m, 0x0009, 0x002D); + func_80263AD4(m, 9, 45); targetPitch = func_80263A50(m); val0C = FALSE; @@ -620,7 +620,7 @@ void func_8026570C(struct MarioState *m) { } else { val0C = (s32)(val04 * 0x10000); set_mario_anim_with_accel(m, MARIO_ANIM_SLOW_WALK_WITH_LIGHT_OBJ, val0C); - func_80263AD4(m, 0x000C, 0x003E); + func_80263AD4(m, 12, 62); val08 = FALSE; } @@ -634,7 +634,7 @@ void func_8026570C(struct MarioState *m) { } else { val0C = (s32)(val04 * 0x10000); set_mario_anim_with_accel(m, MARIO_ANIM_WALK_WITH_LIGHT_OBJ, val0C); - func_80263AD4(m, 0x000C, 0x003E); + func_80263AD4(m, 12, 62); val08 = FALSE; } @@ -646,7 +646,7 @@ void func_8026570C(struct MarioState *m) { } else { val0C = (s32)(val04 / 2.0f * 0x10000); set_mario_anim_with_accel(m, MARIO_ANIM_RUN_WITH_LIGHT_OBJ, val0C); - func_80263AD4(m, 0x000A, 0x0031); + func_80263AD4(m, 10, 49); val08 = FALSE; } @@ -658,7 +658,7 @@ void func_8026570C(struct MarioState *m) { void func_80265980(struct MarioState *m) { s32 val04 = (s32)(m->intendedMag * 0x10000); set_mario_anim_with_accel(m, MARIO_ANIM_WALK_WITH_HEAVY_OBJ, val04); - func_80263AD4(m, 0x001A, 0x004F); + func_80263AD4(m, 26, 79); } void func_802659E8(struct MarioState *m, Vec3f startPos) { @@ -681,7 +681,7 @@ void func_802659E8(struct MarioState *m, Vec3f startPos) { if (m->wall == NULL || dWallAngle <= -0x71C8 || dWallAngle >= 0x71C8) { m->flags |= MARIO_UNKNOWN_31; set_mario_animation(m, MARIO_ANIM_PUSHING); - func_80263AD4(m, 0x0006, 0x0012); + func_80263AD4(m, 6, 18); } else { if (dWallAngle < 0) { set_mario_anim_with_accel(m, MARIO_ANIM_SIDESTEP_RIGHT, val04); @@ -690,7 +690,7 @@ void func_802659E8(struct MarioState *m, Vec3f startPos) { } if (m->marioObj->header.gfx.unk38.animFrame < 20) { - play_sound(SOUND_UNKNOWN_UNK1400 + m->stepSound, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MOVING_TERRAIN_SLIDE + m->terrainSoundAddend, m->marioObj->header.gfx.cameraToObject); m->particleFlags |= PARTICLE_DUST; } @@ -704,12 +704,12 @@ void func_802659E8(struct MarioState *m, Vec3f startPos) { void func_80265C28(struct MarioState *m, s16 startYaw) { struct MarioBodyState *val0C = m->marioBodyState; UNUSED struct Object *marioObj = m->marioObj; - s16 val06 = m->marioObj->header.gfx.unk38.animID; + s16 animID = m->marioObj->header.gfx.unk38.animID; s16 dYaw; s16 val02; s16 val00; - if (val06 == 0x0048 || val06 == 0x0072) { + if (animID == MARIO_ANIM_WALKING || animID == MARIO_ANIM_RUNNING) { dYaw = m->faceAngle[1] - startYaw; val02 = -(s16)(dYaw * m->forwardVel / 12.0f); val00 = (s16)(m->forwardVel * 170.0f); @@ -972,7 +972,7 @@ s32 act_turning_around(struct MarioState *m) { return begin_walking_action(m, 8.0f, ACT_FINISH_TURNING_AROUND, 0); } - play_sound(SOUND_UNKNOWN_UNK1400 + m->stepSound, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MOVING_TERRAIN_SLIDE + m->terrainSoundAddend, m->marioObj->header.gfx.cameraToObject); adjust_sound_for_speed(m); @@ -1055,7 +1055,7 @@ s32 act_braking(struct MarioState *m) { break; } - play_sound(SOUND_UNKNOWN_UNK1400 + m->stepSound, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MOVING_TERRAIN_SLIDE + m->terrainSoundAddend, m->marioObj->header.gfx.cameraToObject); adjust_sound_for_speed(m); set_mario_animation(m, MARIO_ANIM_SKID_ON_GROUND); return FALSE; @@ -1107,7 +1107,7 @@ s32 act_decelerating(struct MarioState *m) { if (slopeClass == SURFACE_CLASS_VERY_SLIPPERY) { set_mario_animation(m, MARIO_ANIM_IDLE_HEAD_LEFT); - play_sound(SOUND_UNKNOWN_UNK1400 + m->stepSound, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MOVING_TERRAIN_SLIDE + m->terrainSoundAddend, m->marioObj->header.gfx.cameraToObject); adjust_sound_for_speed(m); m->particleFlags |= PARTICLE_DUST; } else { @@ -1116,7 +1116,7 @@ s32 act_decelerating(struct MarioState *m) { } set_mario_anim_with_accel(m, MARIO_ANIM_WALKING, val0C); - func_80263AD4(m, 0x000A, 0x0031); + func_80263AD4(m, 10, 49); } return FALSE; @@ -1172,7 +1172,7 @@ s32 act_hold_decelerating(struct MarioState *m) { if (slopeClass == SURFACE_CLASS_VERY_SLIPPERY) { set_mario_animation(m, MARIO_ANIM_IDLE_WITH_LIGHT_OBJ); - play_sound(SOUND_UNKNOWN_UNK1400 + m->stepSound, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MOVING_TERRAIN_SLIDE + m->terrainSoundAddend, m->marioObj->header.gfx.cameraToObject); adjust_sound_for_speed(m); m->particleFlags |= PARTICLE_DUST; } else { @@ -1181,7 +1181,7 @@ s32 act_hold_decelerating(struct MarioState *m) { } set_mario_anim_with_accel(m, MARIO_ANIM_WALK_WITH_LIGHT_OBJ, val0C); - func_80263AD4(m, 0x000C, 0x003E); + func_80263AD4(m, 12, 62); } return FALSE; @@ -1221,9 +1221,10 @@ s32 act_riding_shell_ground(struct MarioState *m) { func_80265DBC(m, startYaw); if (m->floor->type == SURFACE_BURNING) { - play_sound(SOUND_UNKNOWN_UNK1428, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MOVING_RIDING_SHELL_LAVA, m->marioObj->header.gfx.cameraToObject); } else { - play_sound(SOUND_UNKNOWN_UNK1420 + m->stepSound, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MOVING_TERRAIN_RIDING_SHELL + m->terrainSoundAddend, + m->marioObj->header.gfx.cameraToObject); } adjust_sound_for_speed(m); @@ -1279,7 +1280,7 @@ s32 act_crawling(struct MarioState *m) { val04 = (s32)(m->intendedMag * 2.0f * 0x10000); set_mario_anim_with_accel(m, MARIO_ANIM_CRAWLING, val04); - func_80263AD4(m, 0x001A, 0x004F); + func_80263AD4(m, 26, 79); return FALSE; } @@ -1294,7 +1295,7 @@ s32 act_burning_ground(struct MarioState *m) { } if (m->waterLevel - m->floorHeight > 50.0f) { - play_sound(SOUND_GENERAL_FLAMEOUT, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_GENERAL_FLAME_OUT, m->marioObj->header.gfx.cameraToObject); return set_mario_action(m, ACT_WALKING, 0); } @@ -1319,10 +1320,10 @@ s32 act_burning_ground(struct MarioState *m) { } set_mario_anim_with_accel(m, MARIO_ANIM_RUNNING, (s32)(m->forwardVel / 2.0f * 0x10000)); - func_80263AD4(m, 0x0009, 0x002D); + func_80263AD4(m, 9, 45); m->particleFlags |= PARTICLE_11; - play_sound(SOUND_UNKNOWN_UNK1410, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MOVING_LAVA_BURN, m->marioObj->header.gfx.cameraToObject); m->health -= 10; if (m->health < 0x100) { @@ -1343,7 +1344,7 @@ void common_slide_action(struct MarioState *m, u32 endAction, u32 airAction, s32 Vec3f val14; vec3f_copy(val14, m->pos); - play_sound(SOUND_UNKNOWN_UNK1400 + m->stepSound, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MOVING_TERRAIN_SLIDE + m->terrainSoundAddend, m->marioObj->header.gfx.cameraToObject); adjust_sound_for_speed(m); @@ -1488,7 +1489,7 @@ s32 act_slide_kick_slide(struct MarioState *m) { break; } - play_sound(SOUND_UNKNOWN_UNK1400 + m->stepSound, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MOVING_TERRAIN_SLIDE + m->terrainSoundAddend, m->marioObj->header.gfx.cameraToObject); m->particleFlags |= PARTICLE_DUST; return FALSE; } @@ -1533,7 +1534,7 @@ s32 act_dive_slide(struct MarioState *m) { 0); } - play_mario_landing_sound(m, SOUND_TERRAIN_4); + play_mario_landing_sound_once(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND); //! If the dive slide ends on the same frame that we pick up on object, // mario will not be in the dive slide action for the call to @@ -1559,16 +1560,16 @@ s32 common_ground_knockback_action(struct MarioState *m, s32 animation, s32 arg2 s32 val04; if (arg3) { - play_mario_knockback_sound(m, SOUND_TERRAIN_4); + play_mario_heavy_landing_sound_once(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND); } if (arg4 > 0) { - play_sound_if_no_flag(m, SOUND_MARIO_ATTACKED, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_ATTACKED, MARIO_MARIO_SOUND_PLAYED); } else { #ifdef VERSION_JP - play_sound_if_no_flag(m, SOUND_MARIO_OOOF, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_OOOF, MARIO_MARIO_SOUND_PLAYED); #else - play_sound_if_no_flag(m, SOUND_MARIO_OOOF2, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_OOOF2, MARIO_MARIO_SOUND_PLAYED); #endif } @@ -1617,12 +1618,12 @@ s32 act_hard_backward_ground_kb(struct MarioState *m) { #ifndef VERSION_JP if (val04 == 0x36 && m->prevAction == ACT_SPECIAL_DEATH_EXIT) { - play_sound(SOUND_MARIO_MAMAMIA, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_MAMA_MIA, m->marioObj->header.gfx.cameraToObject); } #endif if (val04 == 0x45) { - play_mario_landing_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound_once(m, SOUND_ACTION_TERRAIN_LANDING); } return FALSE; @@ -1660,7 +1661,7 @@ s32 act_soft_forward_ground_kb(struct MarioState *m) { s32 act_ground_bonk(struct MarioState *m) { s32 val04 = common_ground_knockback_action(m, MARIO_ANIM_GROUND_BONK, 0x20, TRUE, m->actionArg); if (val04 == 0x20) { - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); } return FALSE; } @@ -1669,15 +1670,15 @@ s32 act_death_exit_land(struct MarioState *m) { s32 val04; apply_landing_accel(m, 0.9f); - play_mario_knockback_sound(m, SOUND_TERRAIN_4); + play_mario_heavy_landing_sound_once(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND); val04 = set_mario_animation(m, MARIO_ANIM_FALL_OVER_BACKWARDS); if (val04 == 0x36) { - play_sound(SOUND_MARIO_MAMAMIA, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_MAMA_MIA, m->marioObj->header.gfx.cameraToObject); } if (val04 == 0x44) { - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); } if (is_anim_at_end(m)) { @@ -1714,7 +1715,7 @@ u32 common_landing_action(struct MarioState *m, s16 animation, u32 airAction) { } set_mario_animation(m, animation); - play_mario_landing_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound_once(m, SOUND_ACTION_TERRAIN_LANDING); if (m->floor->type >= SURFACE_SHALLOW_QUICKSAND && m->floor->type <= SURFACE_MOVING_QUICKSAND) { m->quicksandDepth += (4 - m->actionTimer) * 3.5f - 0.5f; @@ -1822,7 +1823,7 @@ s32 act_long_jump_land(struct MarioState *m) { } if (!(m->input & INPUT_NONZERO_ANALOG)) { - play_sound_if_no_flag(m, SOUND_MARIO_UH2_2, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_UH2_2, MARIO_MARIO_SOUND_PLAYED); } common_landing_action(m, @@ -1848,7 +1849,7 @@ s32 act_triple_jump_land(struct MarioState *m) { } if (!(m->input & INPUT_NONZERO_ANALOG)) { - play_sound_if_no_flag(m, SOUND_MARIO_HAHA, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_HAHA, MARIO_MARIO_SOUND_PLAYED); } common_landing_action(m, MARIO_ANIM_TRIPLE_JUMP_LAND, ACT_FREEFALL); @@ -1865,7 +1866,7 @@ s32 act_backflip_land(struct MarioState *m) { } if (!(m->input & INPUT_NONZERO_ANALOG)) { - play_sound_if_no_flag(m, SOUND_MARIO_HAHA, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_HAHA, MARIO_MARIO_SOUND_PLAYED); } common_landing_action(m, MARIO_ANIM_TRIPLE_JUMP_LAND, ACT_FREEFALL); @@ -1880,7 +1881,7 @@ s32 quicksand_jump_land_action(struct MarioState *m, s32 animation1, s32 animati m->quicksandDepth = 1.1f; } - play_mario_action_sound(m); + play_mario_jump_sound(m); set_mario_animation(m, animation1); } else { if (m->actionTimer >= 13) { diff --git a/src/game/mario_actions_object.c b/src/game/mario_actions_object.c index 22b8ec1..41e3e73 100644 --- a/src/game/mario_actions_object.c +++ b/src/game/mario_actions_object.c @@ -36,7 +36,7 @@ s32 mario_update_punch_sequence(struct MarioState *m) { switch (m->actionArg) { case 0: - play_sound(SOUND_MARIO_YAH2, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_PUNCH_YAH, m->marioObj->header.gfx.cameraToObject); // Fall-through: case 1: set_mario_animation(m, MARIO_ANIM_FIRST_PUNCH); @@ -76,7 +76,7 @@ s32 mario_update_punch_sequence(struct MarioState *m) { break; case 3: - play_sound(SOUND_MARIO_WAH4, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_PUNCH_WAH, m->marioObj->header.gfx.cameraToObject); // Fall-through: case 4: set_mario_animation(m, MARIO_ANIM_SECOND_PUNCH); @@ -111,7 +111,7 @@ s32 mario_update_punch_sequence(struct MarioState *m) { break; case 6: - play_mario_environment_sound(m, SOUND_MARIO_HOO6, 1); + play_mario_action_sound(m, SOUND_MARIO_PUNCH_HOO, 1); animFrame = set_mario_animation(m, MARIO_ANIM_GROUND_KICK); if (animFrame == 0) { m->marioBodyState->unk0B = 134; @@ -127,7 +127,7 @@ s32 mario_update_punch_sequence(struct MarioState *m) { break; case 9: - play_mario_environment_sound(m, SOUND_MARIO_HOO6, 1); + play_mario_action_sound(m, SOUND_MARIO_PUNCH_HOO, 1); set_mario_animation(m, MARIO_ANIM_BREAKDANCE); animFrame = m->marioObj->header.gfx.unk38.animFrame; @@ -186,7 +186,7 @@ s32 act_picking_up(struct MarioState *m) { // to unload. This allows you to pick up a vacant or newly loaded object // slot (cloning via fake object). mario_grab_used_object(m); - play_sound_if_no_flag(m, SOUND_MARIO_HRMM, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_HRMM, MARIO_MARIO_SOUND_PLAYED); m->actionState = 1; } @@ -259,8 +259,8 @@ s32 act_throwing(struct MarioState *m) { if (++m->actionTimer == 7) { mario_throw_held_object(m); - play_sound_if_no_flag(m, SOUND_MARIO_WAH2, MARIO_ACTION_NOISE_PLAYED); - play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN435, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_WAH2, MARIO_MARIO_SOUND_PLAYED); + play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN435, MARIO_ACTION_SOUND_PLAYED); } animated_stationary_ground_step(m, MARIO_ANIM_GROUND_THROW, ACT_IDLE); @@ -278,8 +278,8 @@ s32 act_heavy_throw(struct MarioState *m) { if (++m->actionTimer == 13) { mario_drop_held_object(m); - play_sound_if_no_flag(m, SOUND_MARIO_WAH2, MARIO_ACTION_NOISE_PLAYED); - play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN435, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_WAH2, MARIO_MARIO_SOUND_PLAYED); + play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN435, MARIO_ACTION_SOUND_PLAYED); } animated_stationary_ground_step(m, MARIO_ANIM_HEAVY_THROW, ACT_IDLE); @@ -327,12 +327,12 @@ s32 act_holding_bowser(struct MarioState *m) { if (m->input & INPUT_B_PRESSED) { #ifndef VERSION_JP if (m->angleVel[1] <= -0xE00 || m->angleVel[1] >= 0xE00) { - play_sound(SOUND_MARIO_SOLONGABOWSER, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_SO_LONGA_BOWSER, m->marioObj->header.gfx.cameraToObject); } else { - play_sound(SOUND_MARIO_HEREWEGO, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_HERE_WE_GO, m->marioObj->header.gfx.cameraToObject); } #else - play_sound(SOUND_MARIO_HEREWEGO, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_HERE_WE_GO, m->marioObj->header.gfx.cameraToObject); #endif return set_mario_action(m, ACT_RELEASING_BOWSER, 0); } @@ -384,10 +384,10 @@ s32 act_holding_bowser(struct MarioState *m) { // play sound on overflow if (m->angleVel[1] <= -0x100 && spin < m->faceAngle[1]) { - play_sound(SOUND_OBJECT_BOWSERSPINNING, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_OBJ_BOWSER_SPINNING, m->marioObj->header.gfx.cameraToObject); } if (m->angleVel[1] >= 0x100 && spin > m->faceAngle[1]) { - play_sound(SOUND_OBJECT_BOWSERSPINNING, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_OBJ_BOWSER_SPINNING, m->marioObj->header.gfx.cameraToObject); } stationary_ground_step(m); diff --git a/src/game/mario_actions_stationary.c b/src/game/mario_actions_stationary.c index 66452fc..e55011e 100644 --- a/src/game/mario_actions_stationary.c +++ b/src/game/mario_actions_stationary.c @@ -230,9 +230,9 @@ s32 act_start_sleeping(struct MarioState *m) { break; } - func_80260BC4(m, 1, 0x29, SOUND_ACTION_PATBACK); - func_80260BC4(m, 1, 0x31, SOUND_ACTION_PATBACK); - func_80260BC4(m, 3, 0x0F, (m->stepSound + SOUND_TERRAIN_4)); + func_80260BC4(m, 1, 41, SOUND_ACTION_PAT_BACK); + func_80260BC4(m, 1, 49, SOUND_ACTION_PAT_BACK); + func_80260BC4(m, 3, 15, m->terrainSoundAddend + SOUND_ACTION_TERRAIN_BODY_HIT_GROUND); if (is_anim_at_end(m)) { m->actionState++; @@ -247,12 +247,12 @@ s32 act_start_sleeping(struct MarioState *m) { if (m->actionState == 1) { if (sp24 == -1) { - play_sound(SOUND_MARIO_IMATIRED, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_IMA_TIRED, m->marioObj->header.gfx.cameraToObject); } } #else if (m->actionState == 2) { - play_sound_if_no_flag(m, SOUND_MARIO_YAWNING, MARIO_ACTION_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_YAWNING, MARIO_MARIO_SOUND_PLAYED); } #endif @@ -302,7 +302,7 @@ s32 act_sleeping(struct MarioState *m) { } case 1: { if (set_mario_animation(m, MARIO_ANIM_SLEEP_START_LYING) == 18) { - play_mario_heavy_landing_sound(m, SOUND_TERRAIN_4); + play_mario_heavy_landing_sound(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND); } if (is_anim_at_end(m)) { @@ -313,7 +313,7 @@ s32 act_sleeping(struct MarioState *m) { case 2: { sp24 = set_mario_animation(m, MARIO_ANIM_SLEEP_LYING); #ifndef VERSION_JP - play_sound_if_no_flag(m, SOUND_MARIO_SNORING3, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_SNORING3, MARIO_ACTION_SOUND_PLAYED); #else if (sp24 == 2) { play_sound(SOUND_MARIO_SNORING2, m->marioObj->header.gfx.cameraToObject); @@ -389,10 +389,10 @@ s32 act_shivering(struct MarioState *m) { sp24 = set_mario_animation(m, MARIO_ANIM_SHIVERING_WARMING_HAND); if (sp24 == 0x31) { m->particleFlags |= PARTICLE_17; - play_sound(SOUND_MARIO_HOO2, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_MARIO_PANTING_COLD, m->marioObj->header.gfx.cameraToObject); } if (sp24 == 7 || sp24 == 0x51) { - play_sound(SOUND_ACTION_UNKNOWN62C, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_ACTION_CLAP_HANDS_COLD, m->marioObj->header.gfx.cameraToObject); } if (is_anim_past_end(m)) { m->actionState = 1; @@ -402,7 +402,7 @@ s32 act_shivering(struct MarioState *m) { case 1: { sp24 = set_mario_animation(m, MARIO_ANIM_SHIVERING); if (sp24 == 9 || sp24 == 0x19 || sp24 == 0x2C) { - play_sound(SOUND_ACTION_UNKNOWN62C, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_ACTION_CLAP_HANDS_COLD, m->marioObj->header.gfx.cameraToObject); } break; } @@ -427,17 +427,17 @@ s32 act_coughing(struct MarioState *m) { stationary_ground_step(m); sp1C = set_mario_animation(m, MARIO_ANIM_COUGHING); if (sp1C == 0x19 || sp1C == 0x23) { - play_sound(SOUND_MARIO_COUGHING4, m->marioObj->header.gfx.cameraToObject); - } - - if (sp1C == 0x32 || sp1C == 0x3A) { play_sound(SOUND_MARIO_COUGHING3, m->marioObj->header.gfx.cameraToObject); } - if (sp1C == 0x47 || sp1C == 0x50) { + if (sp1C == 0x32 || sp1C == 0x3A) { play_sound(SOUND_MARIO_COUGHING2, m->marioObj->header.gfx.cameraToObject); } + if (sp1C == 0x47 || sp1C == 0x50) { + play_sound(SOUND_MARIO_COUGHING1, m->marioObj->header.gfx.cameraToObject); + } + return 0; } @@ -582,7 +582,7 @@ s32 act_panting(struct MarioState *m) { } if (set_mario_animation(m, MARIO_ANIM_WALK_PANTING) == 1) { - play_sound(SOUND_MARIO_HOO3 + ((D_80226EB8 % 3U) << 0x10), + play_sound(SOUND_MARIO_PANTING + ((D_80226EB8 % 3U) << 0x10), m->marioObj->header.gfx.cameraToObject); } @@ -655,7 +655,7 @@ s32 act_butt_slide_stop(struct MarioState *m) { func_80261D70(m, MARIO_ANIM_STOP_SLIDE, ACT_IDLE); if (m->marioObj->header.gfx.unk38.animFrame == 6) { - play_mario_step_sound(m, SOUND_TERRAIN_2); + play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING); } return 0; diff --git a/src/game/mario_actions_submerged.c b/src/game/mario_actions_submerged.c index 8c7ce4a..011ea2e 100644 --- a/src/game/mario_actions_submerged.c +++ b/src/game/mario_actions_submerged.c @@ -787,7 +787,7 @@ static s32 act_water_throw(struct MarioState *m) { func_80270504(m); set_mario_animation(m, MARIO_ANIM_WATER_THROW_OBJ); - play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN433, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN433, MARIO_ACTION_SOUND_PLAYED); m->marioBodyState->unk12[0] = approach_s32(m->marioBodyState->unk12[0], 0, 0x200, 0x200); @@ -815,7 +815,7 @@ static s32 act_water_punch(struct MarioState *m) { m->marioBodyState->unk12[0] = approach_s32(m->marioBodyState->unk12[0], 0, 0x200, 0x200); - play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN433, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_ACTION_UNKNOWN433, MARIO_ACTION_SOUND_PLAYED); switch (m->actionState) { case 0: @@ -875,8 +875,8 @@ static s32 act_forward_water_kb(struct MarioState *m) { } static s32 act_water_shocked(struct MarioState *m) { - play_sound_if_no_flag(m, SOUND_MARIO_WAAAOOOW, MARIO_ENVIRONMENT_NOISE_PLAYED); - play_sound(SOUND_UNKNOWN_UNK1416, m->marioObj->header.gfx.cameraToObject); + play_sound_if_no_flag(m, SOUND_MARIO_WAAAOOOW, MARIO_ACTION_SOUND_PLAYED); + play_sound(SOUND_MOVING_SHOCKED, m->marioObj->header.gfx.cameraToObject); set_camera_shake(SHAKE_SHOCK); if (set_mario_animation(m, MARIO_ANIM_SHOCKED) == 0) { @@ -914,7 +914,7 @@ static s32 act_drowning(struct MarioState *m) { break; } - play_sound_if_no_flag(m, SOUND_MARIO_DROWNING, MARIO_ENVIRONMENT_NOISE_PLAYED); + play_sound_if_no_flag(m, SOUND_MARIO_DROWNING, MARIO_ACTION_SOUND_PLAYED); stationary_slow_down(m); perform_water_step(m); @@ -947,9 +947,9 @@ static s32 act_water_plunge(struct MarioState *m) { } if (m->flags & MARIO_METAL_CAP) { - stateFlags |= 0x00000004; + stateFlags |= 4; } else if ((m->prevAction & ACT_FLAG_DIVING) || (m->input & INPUT_A_DOWN)) { - stateFlags |= 0x00000002; + stateFlags |= 2; } m->actionTimer++; @@ -964,7 +964,7 @@ static s32 act_water_plunge(struct MarioState *m) { play_sound(SOUND_MARIO_HAHA_2, m->marioObj->header.gfx.cameraToObject); } - m->particleFlags |= 0x00000040; + m->particleFlags |= PARTICLE_6; m->actionState = 1; } @@ -1013,7 +1013,7 @@ static s32 act_water_plunge(struct MarioState *m) { break; } - m->particleFlags |= 0x00000200; + m->particleFlags |= PARTICLE_9; return FALSE; } @@ -1075,18 +1075,18 @@ static s32 act_caught_in_whirlpool(struct MarioState *m) { } static void func_80272FA8(struct MarioState *m, u32 arg) { - if (!(m->flags & MARIO_ENVIRONMENT_NOISE_PLAYED)) { - m->particleFlags |= 0x00010000; + if (!(m->flags & MARIO_ACTION_SOUND_PLAYED)) { + m->particleFlags |= PARTICLE_16; } play_sound_if_no_flag(m, arg ? SOUND_ACTION_UNKNOWN451 : SOUND_ACTION_UNKNOWN450, - MARIO_ENVIRONMENT_NOISE_PLAYED); + MARIO_ACTION_SOUND_PLAYED); } static void play_metal_water_walking_sound(struct MarioState *m) { if (is_anim_past_frame(m, 10) || is_anim_past_frame(m, 49)) { play_sound(SOUND_ACTION_UNKNOWN452, m->marioObj->header.gfx.cameraToObject); - m->particleFlags |= 0x00000001; + m->particleFlags |= PARTICLE_DUST; } } @@ -1176,7 +1176,7 @@ static s32 act_metal_water_standing(struct MarioState *m) { stop_and_set_height_to_floor(m); if (m->pos[1] >= m->waterLevel - 150) { - m->particleFlags |= 0x00000080; + m->particleFlags |= PARTICLE_7; } return FALSE; diff --git a/src/game/mario_misc.c b/src/game/mario_misc.c index 0c384cb..521b383 100644 --- a/src/game/mario_misc.c +++ b/src/game/mario_misc.c @@ -80,7 +80,7 @@ static void bhvToadMessage_opaque(void) { } static void bhvToadMessage_talking(void) { - if (obj_update_dialog_unk2(3, 1, 162, gCurrentObject->oToadMessageDialogNum) != 0) { + if (obj_update_dialog_with_cutscene(3, 1, CUTSCENE_DIALOG_1, gCurrentObject->oToadMessageDialogNum) != 0) { gCurrentObject->oToadMessageRecentlyTalked = 1; gCurrentObject->oToadMessageState = TOAD_MESSAGE_FADING; switch (gCurrentObject->oToadMessageDialogNum) { @@ -218,7 +218,7 @@ void bhvUnlockDoorStar_loop(void) { gCurrentObject->oMoveAngleYaw += gCurrentObject->oUnlockDoorStarYawVel; // Apply yaw velocity if (++gCurrentObject->oUnlockDoorStarTimer == 30) { - play_sound(SOUND_MENU_STARSOUND, + play_sound(SOUND_MENU_STAR_SOUND, gCurrentObject->header.gfx.cameraToObject); // Play final sound obj_hide(); // Hide the object gCurrentObject->oUnlockDoorStarTimer = 0; @@ -246,7 +246,7 @@ void bhvUnlockDoorStar_loop(void) { // This means that the code will execute when the star completes a full revolution. if (prevYaw > (s16) gCurrentObject->oMoveAngleYaw) { play_sound( - SOUND_GENERAL_SHORTSTAR, + SOUND_GENERAL_SHORT_STAR, gCurrentObject->header.gfx.cameraToObject); // Play a sound every time the star spins once } } diff --git a/src/game/mario_step.c b/src/game/mario_step.c index 2af5c93..d5e8851 100644 --- a/src/game/mario_step.c +++ b/src/game/mario_step.c @@ -212,7 +212,7 @@ u32 mario_update_windy_ground(struct MarioState *m) { m->vel[2] += pushSpeed * coss(pushAngle); #if VERSION_JP - play_sound(SOUND_ENVIRONMENT_WIND2, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_ENV_WIND2, m->marioObj->header.gfx.cameraToObject); #endif return 1; } @@ -335,7 +335,7 @@ s32 perform_ground_step(struct MarioState *m) { } } - m->stepSound = mario_get_step_noise(m); + m->terrainSoundAddend = mario_get_terrain_sound_addend(m); vec3f_copy(m->marioObj->header.gfx.pos, m->pos); vec3s_set(m->marioObj->header.gfx.angle, 0, m->faceAngle[1], 0); @@ -601,7 +601,7 @@ void apply_vertical_wind(struct MarioState *m) { } #ifdef VERSION_JP - play_sound(SOUND_ENVIRONMENT_WIND2, m->marioObj->header.gfx.cameraToObject); + play_sound(SOUND_ENV_WIND2, m->marioObj->header.gfx.cameraToObject); #endif } } @@ -641,7 +641,7 @@ s32 perform_air_step(struct MarioState *m, u32 stepArg) { m->peakHeight = m->pos[1]; } - m->stepSound = mario_get_step_noise(m); + m->terrainSoundAddend = mario_get_terrain_sound_addend(m); if (m->action != ACT_FLYING) { apply_gravity(m); diff --git a/src/game/memory.c b/src/game/memory.c index d328a53..064b259 100644 --- a/src/game/memory.c +++ b/src/game/memory.c @@ -42,7 +42,7 @@ struct MemoryBlock { u32 size; }; -static u32 sSegmentTable[32]; +static uintptr_t sSegmentTable[32]; static u32 sPoolFreeSpace; static u8 *sPoolStart; @@ -54,8 +54,8 @@ struct MemoryPool *D_8033A124; static struct MainPoolState *gMainPoolState = NULL; -u32 set_segment_base_addr(s32 segment, void *addr) { - sSegmentTable[segment] = (u32) addr & 0x1FFFFFFF; +uintptr_t set_segment_base_addr(s32 segment, void *addr) { + sSegmentTable[segment] = (uintptr_t) addr & 0x1FFFFFFF; return sSegmentTable[segment]; } @@ -64,14 +64,14 @@ void *get_segment_base_addr(s32 segment) { } void *segmented_to_virtual(void *addr) { - u32 segment = (u32) addr >> 24; - u32 offset = (u32) addr & 0x00FFFFFF; + u32 segment = (uintptr_t) addr >> 24; + u32 offset = (uintptr_t) addr & 0x00FFFFFF; return (void *) ((sSegmentTable[segment] + offset) | 0x80000000); } void *virtual_to_segmented(s32 segment, void *addr) { - u32 offset = ((u32) addr & 0x1FFFFFFF) - sSegmentTable[segment]; + uintptr_t offset = ((uintptr_t) addr & 0x1FFFFFFF) - sSegmentTable[segment]; return (void *) ((segment << 24) + offset); } @@ -89,8 +89,8 @@ void move_segment_table_to_dmem(void) { * freeing the object that was most recently allocated from a side. */ void main_pool_init(void *start, void *end) { - sPoolStart = (u8 *) ALIGN16((u32) start) + 16; - sPoolEnd = (u8 *) ALIGN16((u32) end - 15) - 16; + sPoolStart = (u8 *) ALIGN16((uintptr_t) start) + 16; + sPoolEnd = (u8 *) ALIGN16((uintptr_t) end - 15) - 16; sPoolFreeSpace = sPoolEnd - sPoolStart; sPoolListHeadL = (struct MainPoolBlock *) (sPoolStart - 16); @@ -114,14 +114,14 @@ void *main_pool_alloc(u32 size, u32 side) { if (size != 0 && sPoolFreeSpace >= size) { sPoolFreeSpace -= size; if (side == MEMORY_POOL_LEFT) { - newListHead = (struct MainPoolBlock *) ((u32) sPoolListHeadL + size); + newListHead = (struct MainPoolBlock *) ((u8 *) sPoolListHeadL + size); sPoolListHeadL->next = newListHead; newListHead->prev = sPoolListHeadL; newListHead->next = NULL; addr = (u8 *) sPoolListHeadL + 16; sPoolListHeadL = newListHead; } else { - newListHead = (struct MainPoolBlock *) ((u32) sPoolListHeadR - size); + newListHead = (struct MainPoolBlock *) ((u8 *) sPoolListHeadR - size); sPoolListHeadR->prev = newListHead; newListHead->next = sPoolListHeadR; newListHead->prev = NULL; @@ -147,14 +147,14 @@ u32 main_pool_free(void *addr) { } sPoolListHeadL = block; sPoolListHeadL->next = NULL; - sPoolFreeSpace += (u32) oldListHead - (u32) sPoolListHeadL; + sPoolFreeSpace += (u8 *) oldListHead - (u8 *) sPoolListHeadL; } else { while (oldListHead->prev != NULL) { oldListHead = oldListHead->prev; } sPoolListHeadR = block->next; sPoolListHeadR->prev = NULL; - sPoolFreeSpace += (u32) sPoolListHeadR - (u32) oldListHead; + sPoolFreeSpace += (u8 *) sPoolListHeadR - (u8 *) oldListHead; } return sPoolFreeSpace; } @@ -225,7 +225,7 @@ static void dma_read(u8 *dest, u8 *srcStart, u8 *srcEnd) { while (size != 0) { u32 copySize = (size >= 0x1000) ? 0x1000 : size; - osPiStartDma(&gDmaIoMesg, OS_MESG_PRI_NORMAL, OS_READ, (u32) srcStart, dest, copySize, + osPiStartDma(&gDmaIoMesg, OS_MESG_PRI_NORMAL, OS_READ, (uintptr_t) srcStart, dest, copySize, &gDmaMesgQueue); osRecvMesg(&gDmaMesgQueue, &D_80339BEC, OS_MESG_BLOCK); @@ -355,13 +355,13 @@ struct AllocOnlyPool *alloc_only_pool_init(u32 size, u32 side) { struct AllocOnlyPool *subPool = NULL; size = ALIGN4(size); - addr = main_pool_alloc(size + 16, side); + addr = main_pool_alloc(size + sizeof(struct AllocOnlyPool), side); if (addr != NULL) { subPool = (struct AllocOnlyPool *) addr; subPool->totalSpace = size; subPool->usedSpace = 0; - subPool->startPtr = (u8 *) addr + 16; - subPool->freePtr = (u8 *) addr + 16; + subPool->startPtr = (u8 *) addr + sizeof(struct AllocOnlyPool); + subPool->freePtr = (u8 *) addr + sizeof(struct AllocOnlyPool); } return subPool; } @@ -392,7 +392,7 @@ struct AllocOnlyPool *alloc_only_pool_resize(struct AllocOnlyPool *pool, u32 siz struct AllocOnlyPool *newPool; size = ALIGN4(size); - newPool = main_pool_realloc(pool, size + 16); + newPool = main_pool_realloc(pool, size + sizeof(struct AllocOnlyPool)); if (newPool != NULL) { pool->totalSpace = size; } @@ -410,13 +410,13 @@ struct MemoryPool *mem_pool_init(u32 size, u32 side) { struct MemoryPool *pool = NULL; size = ALIGN4(size); - addr = main_pool_alloc(size + 16, side); + addr = main_pool_alloc(size + ALIGN16(sizeof(struct MemoryPool)), side); if (addr != NULL) { pool = (struct MemoryPool *) addr; pool->totalSpace = size; - pool->firstBlock = (struct MemoryBlock *) ((u8 *) addr + 16); - pool->freeList = (struct MemoryBlock *) ((u8 *) addr + 16); + pool->firstBlock = (struct MemoryBlock *) ((u8 *) addr + ALIGN16(sizeof(struct MemoryPool))); + pool->freeList = (struct MemoryBlock *) ((u8 *) addr + ALIGN16(sizeof(struct MemoryPool))); block = pool->firstBlock; block->next = NULL; @@ -432,7 +432,7 @@ void *mem_pool_alloc(struct MemoryPool *pool, u32 size) { struct MemoryBlock *freeBlock = (struct MemoryBlock *) &pool->freeList; void *addr = NULL; - size = ALIGN4(size) + 8; + size = ALIGN4(size) + sizeof(struct MemoryBlock); while (freeBlock->next != NULL) { if (freeBlock->next->size >= size) { addr = (u8 *) freeBlock->next + sizeof(struct MemoryBlock); @@ -507,38 +507,39 @@ void *alloc_display_list(u32 size) { } static struct MarioAnimDmaRelatedThing *func_802789F0(u8 *srcAddr) { - struct MarioAnimDmaRelatedThing *sp1C = dynamic_dma_read(srcAddr, srcAddr + 4, MEMORY_POOL_LEFT); - u32 size = (sp1C->unk0 + 1) * 8; + struct MarioAnimDmaRelatedThing *sp1C = dynamic_dma_read(srcAddr, srcAddr + sizeof(u32), + MEMORY_POOL_LEFT); + u32 size = sp1C->count * sizeof(struct MarioAnimSub) + sizeof(u32) + sizeof(u8 *); main_pool_free(sp1C); sp1C = dynamic_dma_read(srcAddr, srcAddr + size, MEMORY_POOL_LEFT); - sp1C->unk4 = (u32) srcAddr; + sp1C->srcAddr = srcAddr; return sp1C; } -void func_80278A78(struct MarioAnimation *a, void *b, void *c) { +void func_80278A78(struct MarioAnimation *a, void *b, struct Animation *target) { if (b != NULL) { a->animDmaTable = func_802789F0(b); } - a->currentDma = 0; - a->targetAnim = c; + a->currentAnimAddr = NULL; + a->targetAnim = target; } -s32 func_80278AD4(struct MarioAnimation *a, u32 b) { - s32 sp24 = 0; +s32 func_80278AD4(struct MarioAnimation *a, u32 index) { + s32 ret = FALSE; struct MarioAnimDmaRelatedThing *sp20 = a->animDmaTable; - u32 sp1C; - u32 sp18; + u8 *addr; + u32 size; - if (b < sp20->unk0) { - sp1C = sp20[0].unk4 + sp20[b + 1].unk0; - sp18 = sp20[b + 1].unk4; + if (index < sp20->count) { + addr = sp20->srcAddr + sp20->anim[index].offset; + size = sp20->anim[index].size; - if (a->currentDma != sp1C) { - dma_read((void *) a->targetAnim, (void *) sp1C, (void *) (sp1C + sp18)); - a->currentDma = sp1C; - sp24 = 1; + if (a->currentAnimAddr != addr) { + dma_read((u8 *) a->targetAnim, addr, addr + size); + a->currentAnimAddr = addr; + ret = TRUE; } } - return sp24; + return ret; } diff --git a/src/game/memory.h b/src/game/memory.h index c996121..2ead248 100644 --- a/src/game/memory.h +++ b/src/game/memory.h @@ -23,7 +23,7 @@ struct MemoryPool; extern struct MemoryPool *D_8033A124; #endif -u32 set_segment_base_addr(s32 segment, void *addr); +uintptr_t set_segment_base_addr(s32 segment, void *addr); void *get_segment_base_addr(s32 segment); void *segmented_to_virtual(void *addr); void *virtual_to_segmented(s32 segment, void *addr); @@ -52,7 +52,7 @@ void *mem_pool_alloc(struct MemoryPool *pool, u32 size); void mem_pool_free(struct MemoryPool *pool, void *addr); void *alloc_display_list(u32 size); -void func_80278A78(struct MarioAnimation *a, void *b, void *c); +void func_80278A78(struct MarioAnimation *a, void *b, struct Animation *target); s32 func_80278AD4(struct MarioAnimation *a, u32 b); #endif diff --git a/src/game/moving_texture.c b/src/game/moving_texture.c index b9a4a32..643cb5a 100644 --- a/src/game/moving_texture.c +++ b/src/game/moving_texture.c @@ -447,8 +447,7 @@ Gfx *movtex_gen_from_quad(s16 y, struct MovtexQuad *quad) { movtex_make_quad_vertex(verts, 1, x2, y, z2, rot, 16384, scale, alpha); movtex_make_quad_vertex(verts, 2, x3, y, z3, rot, -32768, scale, alpha); movtex_make_quad_vertex(verts, 3, x4, y, z4, rot, -16384, scale, alpha); - } else // ROTATE_COUNTER_CLOCKWISE - { + } else { // ROTATE_COUNTER_CLOCKWISE movtex_make_quad_vertex(verts, 0, x1, y, z1, rot, 0, scale, alpha); movtex_make_quad_vertex(verts, 1, x2, y, z2, rot, -16384, scale, alpha); movtex_make_quad_vertex(verts, 2, x3, y, z3, rot, -32768, scale, alpha); @@ -457,28 +456,31 @@ Gfx *movtex_gen_from_quad(s16 y, struct MovtexQuad *quad) { // Only add commands to change the texture when necessary if (textureId != gMovetexLastTextureId) { - if (textureId == TEXTURE_MIST) // an G_IM_FMT_IA texture - { + if (textureId == TEXTURE_MIST) { // an G_IM_FMT_IA texture if (0) { } - gDPSetTextureImage(gfx++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, gMovtexIdToTexture[textureId]) - gDPTileSync(gfx++) - gDPSetTile(gfx++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, 7, 0, G_TX_WRAP, G_TX_NOMASK, - G_TX_NOLOD, G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD) gDPLoadSync(gfx++) - gDPLoadBlock(gfx++, 7, 0, 0, 1023, 256) - } else // any rgba16 texture - { - gDPSetTextureImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gMovtexIdToTexture[textureId]) - gDPTileSync(gfx++) - gDPSetTile(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, 7, 0, G_TX_WRAP, G_TX_NOMASK, - G_TX_NOLOD, G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD) gDPLoadSync(gfx++) - gDPLoadBlock(gfx++, 7, 0, 0, 1023, 256) if (0) { + gDPSetTextureImage(gfx++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, gMovtexIdToTexture[textureId]); + gDPTileSync(gfx++); + gDPSetTile(gfx++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, 7, 0, G_TX_WRAP, G_TX_NOMASK, + G_TX_NOLOD, G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); + gDPLoadSync(gfx++); + gDPLoadBlock(gfx++, 7, 0, 0, 1023, 256); + } else { // any rgba16 texture + gDPSetTextureImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gMovtexIdToTexture[textureId]); + gDPTileSync(gfx++); + gDPSetTile(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, 7, 0, G_TX_WRAP, G_TX_NOMASK, + G_TX_NOLOD, G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); + gDPLoadSync(gfx++); + gDPLoadBlock(gfx++, 7, 0, 0, 1023, 256); + if (0) { } } gMovetexLastTextureId = textureId; } - gSPVertex(gfx++, 0x80000000 + (u32) verts, 4, 0) gSPDisplayList(gfx++, dl_draw_quad_verts_0123) - gSPEndDisplayList(gfx) return gfxHead; + gSPVertex(gfx++, VIRTUAL_TO_PHYSICAL2(verts), 4, 0); + gSPDisplayList(gfx++, dl_draw_quad_verts_0123); + gSPEndDisplayList(gfx); + return gfxHead; } /** @@ -502,8 +504,9 @@ Gfx *movtex_gen_from_quad_array(s16 y, void *quadArrSegmented) { // quadArr is an array of s16, so sizeof(MovtexQuad) gets divided by 2 subList = movtex_gen_from_quad( y, (struct MovtexQuad *) (&quadArr[i * (sizeof(struct MovtexQuad) / 2) + 1])); - if (subList != NULL) - gSPDisplayList(gfx++, VIRTUAL_TO_PHYSICAL(subList)) + if (subList != NULL) { + gSPDisplayList(gfx++, VIRTUAL_TO_PHYSICAL(subList)); + } } gSPEndDisplayList(gfx); return gfxHead; @@ -620,13 +623,17 @@ void *get_quad_collection_from_id(u32 id) { void movtex_change_texture_format(u32 quadCollectionId, Gfx **gfx) { switch (quadCollectionId) { case HMC_MOVTEX_TOXIC_MAZE_MIST: - gSPDisplayList((*gfx)++, dl_waterbox_ia16_begin) break; + gSPDisplayList((*gfx)++, dl_waterbox_ia16_begin); + break; case SSL_MOVTEX_TOXBOX_QUICKSAND_MIST: - gSPDisplayList((*gfx)++, dl_waterbox_ia16_begin) break; + gSPDisplayList((*gfx)++, dl_waterbox_ia16_begin); + break; case JRB_MOVTEX_INTIAL_MIST: - gSPDisplayList((*gfx)++, dl_waterbox_ia16_begin) break; + gSPDisplayList((*gfx)++, dl_waterbox_ia16_begin); + break; default: - gSPDisplayList((*gfx)++, dl_waterbox_rgba16_begin) break; + gSPDisplayList((*gfx)++, dl_waterbox_rgba16_begin); + break; } } @@ -833,14 +840,19 @@ Gfx *movtex_gen_list(s16 *movtexVerts, struct MovtexObject *movtexList, s8 attrL movtex_write_vertex_index(verts, i, movtexVerts, movtexList, attrLayout); } - gSPDisplayList(gfx++, movtexList->beginDl) gDPSetTextureImage( - gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gMovtexIdToTexture[movtexList->textureId]) - gDPTileSync(gfx++) gDPSetTile(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, 7, 0, G_TX_WRAP, - G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD) - gDPLoadSync(gfx++) gDPLoadBlock(gfx++, 7, 0, 0, 1023, 256) - gSPVertex(gfx++, 0x80000000 + (u32) verts, movtexList->vtx_count, 0) - gSPDisplayList(gfx++, movtexList->triDl) gSPDisplayList(gfx++, movtexList->endDl) - gSPEndDisplayList(gfx) return gfxHead; + gSPDisplayList(gfx++, movtexList->beginDl); + gDPSetTextureImage( + gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gMovtexIdToTexture[movtexList->textureId]); + gDPTileSync(gfx++); + gDPSetTile(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, 7, 0, G_TX_WRAP, + G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD); + gDPLoadSync(gfx++); + gDPLoadBlock(gfx++, 7, 0, 0, 1023, 256); + gSPVertex(gfx++, VIRTUAL_TO_PHYSICAL2(verts), movtexList->vtx_count, 0); + gSPDisplayList(gfx++, movtexList->triDl); + gSPDisplayList(gfx++, movtexList->endDl); + gSPEndDisplayList(gfx); + return gfxHead; } /** diff --git a/src/game/obj_behaviors.c b/src/game/obj_behaviors.c index b17d4ae..34c31c5 100644 --- a/src/game/obj_behaviors.c +++ b/src/game/obj_behaviors.c @@ -54,8 +54,8 @@ void func_802E2F40(void) { D_80331508 = 0; } -struct Struct802E2F58 *func_802E2F58(s32 arg0, struct Object *arg1, UNUSED s32 arg2) { - struct Struct802E2F58 *sp34; +Gfx *func_802E2F58(s32 arg0, struct Object *arg1, UNUSED s32 arg2) { + Gfx *sp34; Gfx *sp30; struct Object *sp2c; struct Object *sp28; @@ -72,8 +72,8 @@ struct Struct802E2F58 *func_802E2F58(s32 arg0, struct Object *arg1, UNUSED s32 a sp2c = (struct Object *) gCurGraphNodeHeldObject->objNode; } - sp34 = (struct Struct802E2F58 *) alloc_display_list(0x18); - sp30 = (Gfx *) sp34; + sp34 = alloc_display_list(3 * sizeof(Gfx)); + sp30 = sp34; sp28->header.gfx.node.flags = (sp28->header.gfx.node.flags & 0xFF) | 0x500; // sets bits 8, 10 and zeros upper byte @@ -183,7 +183,7 @@ s32 TurnObjAwayFromAwkwardFloor(struct Surface *objFloor, f32 floorY, f32 objVel void ObjOrientGraph(struct Object *obj, f32 normalX, f32 normalY, f32 normalZ) { Vec3f sp2c, sp20; - f32(*throwMatrix)[4][4]; // TODO: use Mtx type + Mat4 *throwMatrix; if (D_80331500 == 0) { return; @@ -191,7 +191,7 @@ void ObjOrientGraph(struct Object *obj, f32 normalX, f32 normalY, f32 normalZ) { if ((obj->header.gfx.node.flags & 0x4) != 0) { return; // bit 2 } - throwMatrix = (f32(*)[4][4]) alloc_display_list(0x40); + throwMatrix = alloc_display_list(sizeof(*throwMatrix)); if (throwMatrix == NULL) { return; } @@ -360,7 +360,7 @@ void ObjSplash(s32 waterY, s32 objY) { if ((f32)(waterY + 30) > o->oPosY && o->oPosY > (f32)(waterY - 30)) { spawn_object(o, MODEL_WATER_WAVES_SURF, bhvObjectWaterWave); if (o->oVelY < -20.0f) { - PlaySound2(SOUND_OBJECT_DIVINGINTOWATER); + PlaySound2(SOUND_OBJ_DIVING_INTO_WATER); } } if ((objY + 50) < waterY && (globalTimer & 0x1F) == 0) { @@ -634,7 +634,7 @@ s8 func_802E49A4(s16 arg0) { // sp28 = arg2 // sp2c = arg3 -s16 func_802E4A38(s32 *arg0, s16 arg1, f32 arg2, s32 arg3) { +s16 func_802E4A38(s32 *arg0, s16 dialogID, f32 arg2, s32 arg3) { s16 sp1e; if ((is_point_within_radius_of_mario(o->oPosX, o->oPosY, o->oPosZ, (s32) arg2) == 1 @@ -643,7 +643,7 @@ s16 func_802E4A38(s32 *arg0, s16 arg1, f32 arg2, s32 arg3) { || (*arg0 == 1)) { *arg0 = 1; if (set_mario_npc_dialog(arg3) == 2) { - sp1e = func_8028F8E0(162, o, arg1); + sp1e = cutscene_object_with_dialog(CUTSCENE_DIALOG_1, o, dialogID); if (sp1e != 0) { set_mario_npc_dialog(0); *arg0 = 0; @@ -689,7 +689,7 @@ s32 ObjLavaDeath(void) { } if ((o->oTimer % 8) == 0) { - PlaySound2(SOUND_OBJECT_BULLYEXPLODE_2); + PlaySound2(SOUND_OBJ_BULLY_EXPLODE_2); deathSmoke = spawn_object(o, MODEL_SMOKE, bhvBobombBullyDeathSmoke); deathSmoke->oPosX += RandomFloat() * 20.0f; deathSmoke->oPosY += RandomFloat() * 20.0f; diff --git a/src/game/obj_behaviors.h b/src/game/obj_behaviors.h index 0402d6a..f1968b8 100644 --- a/src/game/obj_behaviors.h +++ b/src/game/obj_behaviors.h @@ -5,13 +5,6 @@ #include "object_helpers2.h" #include "engine/surface_collision.h" -struct Struct802E2F58 -{ - s32 unk0[2]; - s32 unk8[2]; - u8 filler10[0x8]; -}; - extern struct Surface *D_803600E0; extern s8 D_80331500; @@ -25,7 +18,7 @@ extern u8 ttm_seg7_trajectory_070170A0[]; extern u8 bob_seg7_metal_ball_path1[]; void func_802E2F40(void); -struct Struct802E2F58 *func_802E2F58(s32 arg0, struct Object *arg1, UNUSED s32 arg2); /* unused */ +Gfx *func_802E2F58(s32 arg0, struct Object *arg1, UNUSED s32 arg2); /* unused */ f32 absf_2(f32 f); void TurnObjAwayFromSurface(f32 objVelX, f32 objVelZ, f32 nX, UNUSED f32 nY, f32 nZ, f32 *objYawX, f32 *objYawZ); s32 ObjFindWall(f32 objNewX, f32 objY, f32 objNewZ, f32 objVelX, f32 objVelZ); diff --git a/src/game/obj_behaviors_2.c b/src/game/obj_behaviors_2.c index 466658d..7a1c5c6 100644 --- a/src/game/obj_behaviors_2.c +++ b/src/game/obj_behaviors_2.c @@ -29,8 +29,8 @@ #include "save_file.h" #include "room.h" -extern u32 wiggler_seg5_anims_0500C874[]; -extern u32 spiny_egg_seg5_anims_050157E4[]; +extern struct Animation *wiggler_seg5_anims_0500C874[]; +extern struct Animation *spiny_egg_seg5_anims_050157E4[]; extern struct ObjectNode *gObjectLists; extern u8 jrb_seg7_trajectory_unagi_1[]; extern u8 jrb_seg7_trajectory_unagi_2[]; @@ -103,7 +103,7 @@ extern u8 rr_seg7_collision_07029924[]; extern u8 bits_seg7_collision_0701AD54[]; extern u8 bitfs_seg7_collision_070157E0[]; extern u8 bitfs_seg7_collision_07015124[]; -extern u32 spiny_seg5_anims_05016EAC[]; +extern struct Animation *spiny_seg5_anims_05016EAC[]; #define POS_OP_SAVE_POSITION 0 #define POS_OP_COMPUTE_VELOCITY 1 @@ -138,9 +138,9 @@ static s16 obj_get_pitch_from_vel(void) { * If the player declines the race, then disable time stop and allow mario to * move again. */ -static s32 obj_update_race_proposition_dialog(s16 arg0) { +static s32 obj_update_race_proposition_dialog(s16 dialogID) { s32 dialogResponse = - obj_update_dialog_unk2(2, DIALOG_UNK2_FLAG_0 | DIALOG_UNK2_LEAVE_TIME_STOP_ENABLED, 0xA3, arg0); + obj_update_dialog_with_cutscene(2, DIALOG_UNK2_FLAG_0 | DIALOG_UNK2_LEAVE_TIME_STOP_ENABLED, CUTSCENE_DIALOG_2, dialogID); if (dialogResponse == 2) { set_mario_npc_dialog(0); @@ -656,7 +656,7 @@ static s32 obj_resolve_collisions_and_turn(s16 targetYaw, s16 turnSpeed) { static void obj_die_if_health_non_positive(void) { if (o->oHealth <= 0) { if (o->oDeathSound == 0) { - func_802A3034(SOUND_OBJECT_DEFAULTDEATH); + func_802A3034(SOUND_OBJ_DEFAULT_DEATH); } else if (o->oDeathSound > 0) { func_802A3034(o->oDeathSound); } else { @@ -706,7 +706,7 @@ static void obj_set_knockback_action(s32 attackType) { } static void obj_set_squished_action(void) { - PlaySound2(SOUND_OBJECT_STOMPED); + PlaySound2(SOUND_OBJ_STOMPED); o->oAction = OBJ_ACT_SQUISHED; } @@ -719,9 +719,9 @@ static s32 obj_die_if_above_lava_and_health_non_positive(void) { } else if (!(o->oMoveFlags & OBJ_MOVE_ABOVE_LAVA)) { if (o->oMoveFlags & OBJ_MOVE_ENTERED_WATER) { if (o->oWallHitboxRadius < 200.0f) { - PlaySound2(SOUND_OBJECT_DIVINGINTOWATER); + PlaySound2(SOUND_OBJ_DIVING_INTO_WATER); } else { - PlaySound2(SOUND_OBJECT_DIVINGINWATER); + PlaySound2(SOUND_OBJ_DIVING_IN_WATER); } } return FALSE; diff --git a/src/game/object_helpers.c b/src/game/object_helpers.c index 88ea68b..1170f27 100644 --- a/src/game/object_helpers.c +++ b/src/game/object_helpers.c @@ -302,7 +302,7 @@ f32 dist_between_objects(struct Object *obj1, struct Object *obj2) { return sqrtf(dx * dx + dy * dy + dz * dz); } -void obj_obj_forward_vel_approach_upward(f32 target, f32 increment) { +void obj_forward_vel_approach_upward(f32 target, f32 increment) { if (o->oForwardVel >= target) { o->oForwardVel = target; } else { @@ -528,9 +528,9 @@ struct Object *spawn_water_splash(struct Object *parent, struct WaterSplashParam struct Object *spawn_object_at_origin(struct Object *parent, UNUSED s32 unusedArg, u32 model, void *behavior) { struct Object *obj; - u32 *behaviorAddr; + uintptr_t *behaviorAddr; - behaviorAddr = (u32 *) segmented_to_virtual(behavior); + behaviorAddr = segmented_to_virtual(behavior); obj = create_object(behaviorAddr); obj->parentObj = parent; @@ -646,7 +646,7 @@ void func_8029EA0C(struct Object *a0) { } void Unknown8029EA34(struct Object *sp20, u32 sp24) { - u32 *sp1C; + struct Animation **sp1C; sp1C = o->oAnimations; geo_obj_init_animation(&sp20->header.gfx, sp24 + sp1C); @@ -727,25 +727,25 @@ void obj_scale(f32 scale) { } void SetObjAnimation(s32 arg0) { - u32 *sp1C = o->oAnimations; + struct Animation **sp1C = o->oAnimations; geo_obj_init_animation(&o->header.gfx, sp1C + arg0); } void set_obj_animation_and_sound_state(s32 arg0) { - u32 *sp1C = o->oAnimations; + struct Animation **sp1C = o->oAnimations; geo_obj_init_animation(&o->header.gfx, sp1C + arg0); o->oSoundStateID = arg0; } void func_8029ED98(u32 a0, f32 a1) { - u32 *sp1C = o->oAnimations; + struct Animation **sp1C = o->oAnimations; s32 sp18 = (s32)(a1 * 65536.0f); geo_obj_init_animation_accel(&o->header.gfx, sp1C + a0, sp18); o->oSoundStateID = a0; } -void func_8029EE20(struct Object *a0, u32 *a1, u32 a2) { - u32 *sp1C = a1; +void func_8029EE20(struct Object *a0, struct Animation **a1, u32 a2) { + struct Animation **sp1C = a1; a0->oAnimations = a1; geo_obj_init_animation(&a0->header.gfx, sp1C + a2); a0->oSoundStateID = a2; @@ -815,7 +815,7 @@ void obj_set_facing_to_move_angles(struct Object *a0) { a0->oFaceAngleRoll = a0->oMoveAngleRoll; } -u32 get_object_list_from_behavior(u32 *behavior) { +u32 get_object_list_from_behavior(uintptr_t *behavior) { u32 objectList; // If the first behavior command is "begin", then get the object list header @@ -851,7 +851,7 @@ f32 obj_dist_to_nearest_object_with_behavior(void *behavior) { } struct Object *obj_find_nearest_object_with_behavior(void *behavior, f32 *dist) { - u32 *behaviorAddr = (u32 *) segmented_to_virtual(behavior); + uintptr_t *behaviorAddr = segmented_to_virtual(behavior); struct Object *closestObj = NULL; struct Object *obj; struct ObjectNode *listHead; @@ -902,7 +902,7 @@ s32 count_unimportant_objects(void) { } s32 count_objects_with_behavior(void *behavior) { - u32 *behaviorAddr = (u32 *) segmented_to_virtual(behavior); + uintptr_t *behaviorAddr = segmented_to_virtual(behavior); struct ObjectNode *listHead = &gObjectLists[get_object_list_from_behavior(behaviorAddr)]; struct ObjectNode *obj = listHead->next; s32 count = 0; @@ -919,7 +919,7 @@ s32 count_objects_with_behavior(void *behavior) { } struct Object *obj_find_nearby_held_actor(void *behavior, f32 maxDist) { - u32 *behaviorAddr = (u32 *) segmented_to_virtual(behavior); + uintptr_t *behaviorAddr = segmented_to_virtual(behavior); struct ObjectNode *listHead; struct Object *obj; struct Object *foundObj; @@ -1625,7 +1625,7 @@ static void spawn_object_loot_coins(struct Object *obj, s32 numCoins, f32 sp30, coin = spawn_object(obj, model, coinBehavior); translate_object_xz_random(coin, posJitter); coin->oPosY = spawnHeight; - coin->oUnknownUnk110_F32 = sp30; + coin->oCoinUnk110 = sp30; } } @@ -2240,34 +2240,34 @@ void BehDustSmokeLoop(void) { o->oPosY += o->oVelY; o->oPosZ += o->oVelZ; - if (o->oUnknownUnkF4_S32 == 10) { + if (o->oSmokeTimer == 10) { mark_object_for_deletion(o); } - o->oUnknownUnkF4_S32++; + o->oSmokeTimer++; } static void nop_802A3294(void) { } s32 func_802A32A4(s8 *a0) { - o->oUnk1AC_VPTR = a0; - o->oUnk1B0 = 0; + o->oToxBoxUnk1AC = a0; + o->oToxBoxUnk1B0 = 0; - return *(s8 *) o->oUnk1AC_VPTR; + return *(s8 *) o->oToxBoxUnk1AC; } s32 func_802A32E0(void) { s8 spF; - s8 *sp8 = o->oUnk1AC_VPTR; - s32 sp4 = o->oUnk1B0 + 1; + s8 *sp8 = o->oToxBoxUnk1AC; + s32 sp4 = o->oToxBoxUnk1B0 + 1; if (sp8[sp4] != -1) { spF = sp8[sp4]; - o->oUnk1B0++; + o->oToxBoxUnk1B0++; } else { spF = sp8[0]; - o->oUnk1B0 = 0; + o->oToxBoxUnk1B0 = 0; } return spF; @@ -2341,7 +2341,7 @@ s32 obj_call_action_function(void (*actionFunctions[])(void)) { static struct Object *func_802A36D8(s32 sp20, s32 sp24) { struct Object *sp1C = spawn_object(o, MODEL_STAR, bhvUnused080C); - sp1C->oUnk1B0 = sp24; + sp1C->oSparkleSpawnUnk1B0 = sp24; sp1C->oBehParams = o->oBehParams; sp1C->oBehParams2ndByte = sp20; @@ -2584,7 +2584,7 @@ static void obj_end_dialog(s32 dialogFlags, s32 dialogResult) { } } -s32 obj_update_dialog_unk1(s32 arg0, s32 dialogFlags, s32 dialogID, UNUSED s32 unusedArg) { +s32 obj_update_dialog(s32 actionArg, s32 dialogFlags, s32 dialogID, UNUSED s32 unused) { s32 dialogResponse = 0; UNUSED s32 doneTurning = TRUE; @@ -2616,26 +2616,26 @@ s32 obj_update_dialog_unk1(s32 arg0, s32 dialogFlags, s32 dialogID, UNUSED s32 u #endif case DIALOG_UNK1_INTERRUPT_MARIO_ACTION: - if (set_mario_npc_dialog(arg0) == 2) { + if (set_mario_npc_dialog(actionArg) == 2) { o->oDialogState++; } break; case DIALOG_UNK1_BEGIN_DIALOG: - if (dialogFlags & DIALOG_UNK1_FLAG_2) { - func_802D8050(dialogID); - } else if (dialogFlags & DIALOG_UNK1_FLAG_1) { - func_802D7F90(dialogID); + if (dialogFlags & DIALOG_UNK1_FLAG_RESPONSE) { + create_dialog_box_with_response(dialogID); + } else if (dialogFlags & DIALOG_UNK1_FLAG_DEFAULT) { + create_dialog_box(dialogID); } o->oDialogState++; break; case DIALOG_UNK1_AWAIT_DIALOG: - if (dialogFlags & DIALOG_UNK1_FLAG_2) { + if (dialogFlags & DIALOG_UNK1_FLAG_RESPONSE) { if (gDialogResponse != 0) { obj_end_dialog(dialogFlags, gDialogResponse); } - } else if (dialogFlags & DIALOG_UNK1_FLAG_1) { + } else if (dialogFlags & DIALOG_UNK1_FLAG_DEFAULT) { if (get_dialog_id() == -1) { obj_end_dialog(dialogFlags, 3); } @@ -2661,7 +2661,7 @@ s32 obj_update_dialog_unk1(s32 arg0, s32 dialogFlags, s32 dialogID, UNUSED s32 u return dialogResponse; } -s32 obj_update_dialog_unk2(s32 arg0, s32 dialogFlags, s32 dialogID, s32 arg3) { +s32 obj_update_dialog_with_cutscene(s32 actionArg, s32 dialogFlags, s32 cutsceneTable, s32 dialogID) { s32 dialogResponse = 0; s32 doneTurning = TRUE; @@ -2701,7 +2701,7 @@ s32 obj_update_dialog_unk2(s32 arg0, s32 dialogFlags, s32 dialogID, s32 arg3) { } } - if (set_mario_npc_dialog(arg0) == 2 && doneTurning) { + if (set_mario_npc_dialog(actionArg) == 2 && doneTurning) { o->oDialogResponse = 0; o->oDialogState++; } else { @@ -2710,12 +2710,12 @@ s32 obj_update_dialog_unk2(s32 arg0, s32 dialogFlags, s32 dialogID, s32 arg3) { break; case DIALOG_UNK2_AWAIT_DIALOG: - if (dialogID == 0xA1) { - if ((o->oDialogResponse = func_8028F9A4(dialogID, o)) != 0) { + if (cutsceneTable == CUTSCENE_CAP_SWITCH_PRESS) { + if ((o->oDialogResponse = cutscene_object_without_dialog(cutsceneTable, o)) != 0) { o->oDialogState++; } } else { - if ((o->oDialogResponse = func_8028F8E0(dialogID, o, arg3)) != 0) { + if ((o->oDialogResponse = cutscene_object_with_dialog(cutsceneTable, o, dialogID)) != 0) { o->oDialogState++; } } @@ -2840,7 +2840,7 @@ void func_802A4AEC(s32 sp18) { s32 obj_check_grabbed_mario(void) { if (o->oInteractStatus & INT_STATUS_GRABBED_MARIO) { - o->oUnknownUnk88 = 1; + o->oKingBobombUnk88 = 1; obj_become_intangible(); return TRUE; } diff --git a/src/game/object_helpers.h b/src/game/object_helpers.h index 6e4c763..3b2e833 100644 --- a/src/game/object_helpers.h +++ b/src/game/object_helpers.h @@ -175,7 +175,7 @@ extern void func_8029D704(Mat4,Mat4,Mat4); void set_object_held_state(struct Object *, void *); extern f32 lateral_dist_between_objects(struct Object *, struct Object *); extern f32 dist_between_objects(struct Object *, struct Object *); -extern void obj_obj_forward_vel_approach_upward(f32,f32); +extern void obj_forward_vel_approach_upward(f32,f32); extern s32 approach_f32_signed(f32*,f32,f32); extern f32 approach_f32_symmetric(f32,f32,f32); extern s16 approach_s16_symmetric(s16 arg0, s16 arg1, s16 arg2); @@ -213,7 +213,7 @@ extern void obj_scale(f32); extern void set_obj_animation_and_sound_state(s32); extern void func_8029ED98(u32, f32); extern void SetObjAnimation(s32 arg0); -void func_8029EE20(struct Object *a0, u32 *a1, u32 a2); +void func_8029EE20(struct Object *a0, struct Animation **a1, u32 a2); // extern ? obj_enable_rendering_and_become_tangible(?); extern void obj_enable_rendering(void); // extern ? obj_disable_rendering_and_become_intangible(?); @@ -225,7 +225,7 @@ extern void obj_set_pos_relative(struct Object *MarioObj, f32, f32, f32); extern void obj_enable_rendering_2(void); // extern ? obj_unused_init_on_floor(?); extern void obj_set_facing_to_move_angles(struct Object *); -u32 get_object_list_from_behavior(u32 *a0); +u32 get_object_list_from_behavior(uintptr_t *behavior); extern struct Object *obj_nearest_object_with_behavior(void *); f32 obj_dist_to_nearest_object_with_behavior(void*); extern struct Object *obj_find_nearest_object_with_behavior(void *, f32 *); diff --git a/src/game/object_helpers2.h b/src/game/object_helpers2.h index 240e87c..a8e7d6b 100644 --- a/src/game/object_helpers2.h +++ b/src/game/object_helpers2.h @@ -65,8 +65,8 @@ void clear_time_stop_flags(s32); s32 func_802A3FF8(f32,f32,s32); extern s32 obj_is_mario_in_range_and_ready_to_speak(f32 sp18, f32 sp1C); // extern ? obj_end_dialog(?); -s32 obj_update_dialog_unk1(s32,s32,s32,s32); -s32 obj_update_dialog_unk2(s32 arg0, s32 dialogFlags, s32 dialogID, s32 arg3); +s32 obj_update_dialog(s32 arg0, s32 dialogFlags, s32 dialogID, s32 unused); +s32 obj_update_dialog_with_cutscene(s32 arg0, s32 dialogFlags, s32 cutsceneTable, s32 dialogID); s32 obj_has_model(u16); extern void obj_align_gfx_with_floor(void); // extern ? mario_is_within_rectangle(?); diff --git a/src/game/object_list_processor.c b/src/game/object_list_processor.c index 243dfa0..4cff963 100644 --- a/src/game/object_list_processor.c +++ b/src/game/object_list_processor.c @@ -112,7 +112,7 @@ struct Object *gCurrentObject; /** * The next object behavior command to be executed. */ -u32 *gBehCommand; +uintptr_t *gBehCommand; /** * The number of objects that were processed last frame, which may miss some @@ -471,7 +471,7 @@ void spawn_objects_from_info(UNUSED s32 unused, struct SpawnInfo *spawnInfo) { object->oBehParams2ndByte = ((spawnInfo->behaviorArg) >> 16) & 0xFF; object->behavior = script; - object->unk1C8 = 0; + object->unused1 = 0; // Record death/collection in the SpawnInfo object->respawnInfoType = RESPAWN_INFO_TYPE_32; diff --git a/src/game/object_list_processor.h b/src/game/object_list_processor.h index 50ff06b..d32a92b 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 u32 *gBehCommand; +extern uintptr_t *gBehCommand; extern s16 gPrevFrameObjectCount; extern s32 gSurfaceNodesAllocated; diff --git a/src/game/paintings.c b/src/game/paintings.c index 3cc2bca..d6014b7 100644 --- a/src/game/paintings.c +++ b/src/game/paintings.c @@ -10,6 +10,7 @@ #include "geo_misc.h" #include "area.h" #include "prevent_bss_reordering.h" +#include "segment2.h" #include "paintings.h" s16 gPaintingMarioFloorType; @@ -646,11 +647,11 @@ void *func_802D3CF0(u8 *img, s16 b, s16 c, s16 *d, s16 e, s16 f, u8 g) { Gfx *func_802D43FC(struct PaintingData *painting) { float sp4C = painting->vSize / DEFAULT_HEIGHT; - void *sp48 = alloc_display_list(64); - void *sp44 = alloc_display_list(64); - void *sp40 = alloc_display_list(64); - void *sp3C = alloc_display_list(64); - void *sp38 = alloc_display_list(40); + Mtx *sp48 = alloc_display_list(sizeof(Mtx)); + Mtx *sp44 = alloc_display_list(sizeof(Mtx)); + Mtx *sp40 = alloc_display_list(sizeof(Mtx)); + Mtx *sp3C = alloc_display_list(sizeof(Mtx)); + Gfx *sp38 = alloc_display_list(5 * sizeof(Gfx)); Gfx *sp34 = sp38; if (sp48 == NULL || sp44 == NULL || sp40 == NULL || sp38 == NULL) { @@ -680,7 +681,7 @@ Gfx *func_802D45FC(struct PaintingData *painting) { s16 tHeight = painting->textureHeight; s16 **meshArray = segmented_to_virtual(painting->meshData); u8 **tArray = segmented_to_virtual(painting->textureArray); - Gfx *sp48 = alloc_display_list(faceCount * 8 + 48); + Gfx *sp48 = alloc_display_list((faceCount + 6) * sizeof(Gfx)); Gfx *sp44 = sp48; if (sp48 == NULL) { @@ -713,7 +714,7 @@ Gfx *func_802D4874(struct PaintingData *painting) { s16 tHeight = painting->textureHeight; s16 **meshArray = segmented_to_virtual(painting->meshData); u8 **tArray = segmented_to_virtual(painting->textureArray); - Gfx *sp48 = alloc_display_list(56); + Gfx *sp48 = alloc_display_list(7 * sizeof(Gfx)); Gfx *sp44 = sp48; if (sp48 == NULL) { @@ -759,7 +760,7 @@ Gfx *display_painting_rippling(struct PaintingData *painting) { } Gfx *display_painting_not_rippling(struct PaintingData *painting) { - Gfx *sp2C = alloc_display_list(32); + Gfx *sp2C = alloc_display_list(4 * sizeof(Gfx)); Gfx *sp28 = sp2C; if (sp2C == NULL) { diff --git a/src/game/paintings.h b/src/game/paintings.h index eb2132d..3f6ae4f 100644 --- a/src/game/paintings.h +++ b/src/game/paintings.h @@ -1,5 +1,5 @@ -#ifndef _PAINTINGS_H -#define _PAINTINGS_H +#ifndef PAINTINGS_H +#define PAINTINGS_H #include "prevent_bss_reordering.h" @@ -88,14 +88,6 @@ struct PaintingData extern struct MemoryPool *D_8033A124; -extern u8 dl_paintings_draw_ripples[]; -extern u8 dl_paintings_rippling_begin[]; -extern u8 dl_paintings_rippling_end[]; -extern u8 dl_paintings_env_mapped_begin[]; -extern u8 dl_paintings_env_mapped_end[]; -extern u8 seg2_triangle_mesh[]; -extern u8 seg2_mesh_order[]; - extern struct PaintingData cotmc_painting[]; extern struct PaintingData bob_painting[]; @@ -132,4 +124,4 @@ extern float (*D_8035FFA4)[3]; extern struct PaintingData *ripplingPainting; extern s8 dddStatus; -#endif /* _PAINTINGS_H */ +#endif /* PAINTINGS_H */ diff --git a/src/game/print.c b/src/game/print.c index 811be8b..5fe5e10 100644 --- a/src/game/print.c +++ b/src/game/print.c @@ -359,7 +359,7 @@ s8 char_to_glyph_index(char c) { * Adds an individual glyph to be rendered. */ void add_glyph_texture(s8 glyphIndex) { - u32 *glyphs = segmented_to_virtual(seg2_hud_lut); + u32 *glyphs = segmented_to_virtual(main_hud_lut); gDPPipeSync(gDisplayListHead++); gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, glyphs[glyphIndex]); @@ -400,7 +400,7 @@ void render_textrect(s32 x, s32 y, s32 pos) { rectX = rectBaseX; rectY = rectBaseY; gSPTextureRectangle(gDisplayListHead++, rectX << 2, rectY << 2, (rectX + 15) << 2, - (rectY + 15) << 2, 0, 0, 0, 4096, 1024); + (rectY + 15) << 2, G_TX_RENDERTILE, 0, 0, 4 << 10, 1 << 10); } /** @@ -424,7 +424,7 @@ void render_text_labels(void) { return; } - guOrtho(mtx, 0.0f, 320.0f, 0.0f, 240.0f, -10.0f, 10.0f, 1.0f); + guOrtho(mtx, 0.0f, SCREEN_WIDTH, 0.0f, SCREEN_HEIGHT, -10.0f, 10.0f, 1.0f); gSPPerspNormalize((Gfx *) (gDisplayListHead++), 0x0000FFFF); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(mtx), G_MTX_PROJECTION | G_MTX_LOAD); gSPDisplayList(gDisplayListHead++, dl_hud_img_begin); diff --git a/src/game/print.h b/src/game/print.h index 7690508..8dd1901 100644 --- a/src/game/print.h +++ b/src/game/print.h @@ -21,6 +21,8 @@ #define GLYPH_STAR 53 #define GLYPH_PERIOD 54 #define GLYPH_BETA_KEY 55 +#define GLYPH_APOSTROPHE 56 +#define GLYPH_DOUBLE_QUOTE 57 #define GLYPH_UMLAUT 58 extern void print_text_fmt_int(s32 x, s32 y, const char *str, s32 n); diff --git a/src/game/rendering_graph_node.c b/src/game/rendering_graph_node.c index a2c6181..b1a44e4 100644 --- a/src/game/rendering_graph_node.c +++ b/src/game/rendering_graph_node.c @@ -1030,7 +1030,8 @@ void geo_process_root(struct GraphNodeRoot *node, Vp *b, Vp *c, s32 clearColor) Mtx *initialMatrix; Vp *viewport = alloc_display_list(sizeof(*viewport)); - gDisplayListHeap = alloc_only_pool_init(main_pool_available() - 16, MEMORY_POOL_LEFT); + gDisplayListHeap = alloc_only_pool_init(main_pool_available() - sizeof(struct AllocOnlyPool), + MEMORY_POOL_LEFT); initialMatrix = alloc_display_list(sizeof(*initialMatrix)); gMatStackIndex = 0; gCurAnimType = 0; diff --git a/src/game/save_file.h b/src/game/save_file.h index 1bde56a..95b88c4 100644 --- a/src/game/save_file.h +++ b/src/game/save_file.h @@ -34,6 +34,13 @@ struct SaveFile struct SaveBlockSignature signature; }; +enum SaveFileIndex { + SAVE_FILE_A, + SAVE_FILE_B, + SAVE_FILE_C, + SAVE_FILE_D +}; + struct MainMenuSaveData { // Each save file has a 2 bit "age" for each course. The higher this value, diff --git a/src/game/segment2.h b/src/game/segment2.h index bc64acd..4485722 100644 --- a/src/game/segment2.h +++ b/src/game/segment2.h @@ -1,5 +1,5 @@ -#ifndef _SEGMENT2_H -#define _SEGMENT2_H +#ifndef SEGMENT2_H +#define SEGMENT2_H #include "types.h" @@ -36,29 +36,24 @@ extern u8 dl_skybox_end[]; extern u8 dl_waterbox_ia16_begin[]; extern Gfx dl_waterbox_rgba16_begin[]; extern Gfx dl_waterbox_end[]; -// extern ? dl_paintings_draw_ripples; -// extern ? dl_paintings_rippling_begin; -// extern ? dl_paintings_rippling_end; -// extern ? dl_paintings_env_mapped_begin; -// extern ? dl_paintings_env_mapped_end; -// extern ? seg2_dl_02014A60; -// extern ? seg2_mesh_order; -extern u8* seg2_hud_lut[58]; +extern u8 dl_paintings_draw_ripples[]; +extern u8 dl_paintings_rippling_begin[]; +extern u8 dl_paintings_rippling_end[]; +extern u8 dl_paintings_env_mapped_begin[]; +extern u8 dl_paintings_env_mapped_end[]; +extern u8 seg2_triangle_mesh[]; +extern u8 seg2_mesh_order[]; +extern u8* main_hud_lut[58]; extern u8 dl_hud_img_load_tex_block[]; extern u8 dl_hud_img_begin[]; extern u8 dl_hud_img_end[]; -extern void *seg2_small_font_lut[]; +extern void *main_font_lut[]; extern Gfx dl_ia8_render_char[]; extern Gfx dl_rgba16_load_tex_block[]; -extern void *seg2_credits_font_lut[]; -extern u8* seg2_hud_camera_lut[6]; +extern void *main_credits_font_lut[]; +extern u8* main_hud_camera_lut[6]; extern Gfx dl_draw_text_bg_box[]; -// extern ? dl_ia8_text_begin; -// extern ? dl_ia8_text_end; extern Gfx dl_draw_triangle[]; extern void *seg2_dialog_table[]; -// extern ? dl_rgba16_text_end; -// extern ? seg2_act_name_table; -// extern ? seg2_level_name_table; -#endif /* _SEGMENT2_H */ +#endif /* SEGMENT2_H */ diff --git a/src/game/segment7.h b/src/game/segment7.h index e5b93e9..a43c5a1 100644 --- a/src/game/segment7.h +++ b/src/game/segment7.h @@ -1,13 +1,16 @@ -#ifndef _SEGMENT_7_H -#define _SEGMENT_7_H +#ifndef SEGMENT_7_H +#define SEGMENT_7_H #include "types.h" // from main menu segment 7 -extern u32 main_menu_seg7_table_0700CD08[]; -extern u8 main_menu_seg7_dl_0700D108[]; -extern u8 main_menu_seg7_dl_0700D160[]; -extern u8 main_menu_seg7_dl_0700F228[]; +extern u8 dl_menu_idle_hand[]; +extern u8 dl_menu_grabbing_hand[]; +extern u8 menu_hud_lut[]; +extern u8 menu_font_lut[]; +extern u8 dl_menu_ia8_text_begin[]; +extern u8 dl_menu_ia8_text_end[]; +extern u8 dl_menu_rgba16_wood_course[]; // from intro_segment7 extern Gfx *intro_seg7_dl_0700B3A0; @@ -15,4 +18,4 @@ extern Gfx *intro_seg7_dl_0700C6A0; extern f32 intro_seg7_table_0700C790[]; extern f32 intro_seg7_table_0700C880[]; -#endif /* _SEGMENT_7_H */ +#endif /* SEGMENT_7_H */ diff --git a/src/game/shadow.c b/src/game/shadow.c index 5a56528..d264e8e 100644 --- a/src/game/shadow.c +++ b/src/game/shadow.c @@ -734,8 +734,8 @@ Gfx *create_shadow_circle_assuming_flat_ground(f32 xPos, f32 yPos, f32 zPos, s16 * underneath the shadow is totally flat. */ Gfx *create_shadow_rectangle(f32 halfWidth, f32 halfLength, f32 relY, u8 solidity) { - Vtx *verts = alloc_display_list(64); - Gfx *displayList = alloc_display_list(40); + Vtx *verts = alloc_display_list(4 * sizeof(Vtx)); + Gfx *displayList = alloc_display_list(5 * sizeof(Gfx)); f32 frontLeftX, frontLeftZ, frontRightX, frontRightZ, backLeftX, backLeftZ, backRightX, backRightZ; if (verts == NULL || displayList == NULL) { diff --git a/src/game/skybox.c b/src/game/skybox.c index ffd54a6..a05e314 100644 --- a/src/game/skybox.c +++ b/src/game/skybox.c @@ -154,8 +154,8 @@ void *func_802CF188(s8 a) { } Gfx *func_802CF2A8(s8 a, s8 b, s8 c) { - s32 sp3C = 68; - void *sp38 = alloc_display_list(sp3C * 8); + s32 sp3C = 5 + 3*3*7; + void *sp38 = alloc_display_list(sp3C * sizeof(Gfx)); Gfx *dlist = sp38; if (sp38 == NULL) { diff --git a/src/game/sound_init.c b/src/game/sound_init.c index 1071437..c1cf9e7 100644 --- a/src/game/sound_init.c +++ b/src/game/sound_init.c @@ -30,42 +30,44 @@ static u8 sPlayingInfiniteStairs = FALSE; static u8 unused8032C6D8[16] = { 0 }; static s16 sSoundMenuModeToSoundMode[] = { SOUND_MODE_STEREO, SOUND_MODE_MONO, SOUND_MODE_HEADSET }; // Only the 20th array element is used. -static u32 menuSoundsExtra[] = { SOUND_UNKNOWN_UNK1400, - SOUND_UNKNOWN_UNK1401, - SOUND_UNKNOWN_UNK1402, - SOUND_UNKNOWN_UNK1403, - SOUND_UNKNOWN_UNK1404, - SOUND_UNKNOWN_UNK1405, - SOUND_UNKNOWN_UNK1406, - SOUND_UNKNOWN_UNK1410, - SOUND_UNKNOWN_UNK1412, - SOUND_UNKNOWN_UNK1411, - SOUND_UNKNOWN_UNK1414, - SOUND_UNKNOWN_UNK1420, - NO_SOUND, - SOUND_ENVIRONMENT_BOATROCKING1, - SOUND_ENVIRONMENT_ELEVATOR3, - SOUND_ENVIRONMENT_UNKNOWN2, - SOUND_ENVIRONMENT_WATERFALL1, - SOUND_ENVIRONMENT_WATERFALL2, - SOUND_ENVIRONMENT_ELEVATOR1, - SOUND_ENVIRONMENT_DRONING1, - SOUND_ENVIRONMENT_DRONING2, - SOUND_ENVIRONMENT_ELEVATOR2, - SOUND_ENVIRONMENT_WIND1, - SOUND_ENVIRONMENT_WATER, - SOUND_CH6_BOWSERSPITFIRE, - SOUND_MOVING_UNKNOWN19, - SOUND_CH6_LAKITUFLY, - SOUND_CH6_AMPBUZZ, - SOUND_CH6_CASTLEOUTDOORSAMBIENT, - SOUND_CH9_UNK52, - SOUND_CH8_UNK50, - SOUND_OBJECT_BIRDS2, - SOUND_ENVIRONMENT_ELEVATOR2, - SOUND_CH6_BLOWWINDORFIRE_LOWPRIO, - SOUND_CH6_BLOWWINDORFIRE, - SOUND_ENVIRONMENT_ELEVATOR4 }; +static u32 menuSoundsExtra[] = { + SOUND_MOVING_TERRAIN_SLIDE + (0 << 16), + SOUND_MOVING_TERRAIN_SLIDE + (1 << 16), + SOUND_MOVING_TERRAIN_SLIDE + (2 << 16), + SOUND_MOVING_TERRAIN_SLIDE + (3 << 16), + SOUND_MOVING_TERRAIN_SLIDE + (4 << 16), + SOUND_MOVING_TERRAIN_SLIDE + (5 << 16), + SOUND_MOVING_TERRAIN_SLIDE + (6 << 16), + SOUND_MOVING_LAVA_BURN, + SOUND_MOVING_SLIDE_DOWN_TREE, + SOUND_MOVING_SLIDE_DOWN_POLE, + SOUND_MOVING_QUICKSAND_DEATH, + SOUND_MOVING_TERRAIN_RIDING_SHELL, + NO_SOUND, + SOUND_ENV_BOAT_ROCKING1, + SOUND_ENV_ELEVATOR3, + SOUND_ENV_UNKNOWN2, + SOUND_ENV_WATERFALL1, + SOUND_ENV_WATERFALL2, + SOUND_ENV_ELEVATOR1, + SOUND_ENV_DRONING1, + SOUND_ENV_DRONING2, + SOUND_ENV_ELEVATOR2, + SOUND_ENV_WIND1, + SOUND_ENV_WATER, + SOUND_AIR_BOWSER_SPIT_FIRE, + SOUND_MOVING_AIM_CANNON, + SOUND_AIR_LAKITU_FLY, + SOUND_AIR_AMP_BUZZ, + SOUND_AIR_CASTLE_OUTDOORS_AMBIENT, + SOUND_OBJ2_BIRD_CHIRP1, + SOUND_GENERAL2_BIRD_CHIRP2, + SOUND_OBJ_BIRD_CHIRP3, + SOUND_ENV_ELEVATOR2, + SOUND_AIR_BLOW_WIND, + SOUND_AIR_BLOW_FIRE, + SOUND_ENV_ELEVATOR4, +}; static s8 paintingEjectSoundPlayed = FALSE; static void play_menu_sounds_extra(int a, void *b); @@ -94,7 +96,7 @@ void func_80248CB8(s32 a) // harden volume set_sound_disabled(FALSE); break; case 2: - func_80320040(0, 60); // unsoften? + sequence_player_unlower(0, 60); break; } D_8032C6C0 &= ~a; @@ -128,21 +130,21 @@ void set_sound_mode(u16 soundMode) { */ void play_menu_sounds(s16 soundMenuFlags) { if (soundMenuFlags & SOUND_MENU_FLAG_HANDAPPEAR) { - play_sound(SOUND_MENU_HANDAPPEAR, gDefaultSoundArgs); + play_sound(SOUND_MENU_HAND_APPEAR, gDefaultSoundArgs); } else if (soundMenuFlags & SOUND_MENU_FLAG_HANDISAPPEAR) { - play_sound(SOUND_MENU_HANDDISAPPEAR, gDefaultSoundArgs); + play_sound(SOUND_MENU_HAND_DISAPPEAR, gDefaultSoundArgs); } else if (soundMenuFlags & SOUND_MENU_FLAG_UNKNOWN1) { - play_sound(SOUND_MENU_UNKNOWN1, gDefaultSoundArgs); + play_sound(SOUND_MENU_UNK0C, gDefaultSoundArgs); } else if (soundMenuFlags & SOUND_MENU_FLAG_PINCHMARIOFACE) { - play_sound(SOUND_MENU_PINCHMARIOFACE, gDefaultSoundArgs); + play_sound(SOUND_MENU_PINCH_MARIO_FACE, gDefaultSoundArgs); } else if (soundMenuFlags & SOUND_MENU_FLAG_PINCHMARIOFACE2) { - play_sound(SOUND_MENU_PINCHMARIOFACE, gDefaultSoundArgs); + play_sound(SOUND_MENU_PINCH_MARIO_FACE, gDefaultSoundArgs); } else if (soundMenuFlags & SOUND_MENU_FLAG_LETGOMARIOFACE) { - play_sound(SOUND_MENU_LETGOMARIOFACE, gDefaultSoundArgs); + play_sound(SOUND_MENU_LET_GO_MARIO_FACE, gDefaultSoundArgs); } else if (soundMenuFlags & SOUND_MENU_FLAG_CAMERAZOOMIN) { - play_sound(SOUND_MENU_CAMERAZOOMIN, gDefaultSoundArgs); + play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gDefaultSoundArgs); } else if (soundMenuFlags & SOUND_MENU_FLAG_CAMERAZOOMOUT) { - play_sound(SOUND_MENU_CAMERAZOOMOUT, gDefaultSoundArgs); + play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gDefaultSoundArgs); } if (soundMenuFlags & 0x100) { @@ -212,7 +214,7 @@ void func_802491FC(s16 fadeOutTime) { } void func_8024924C(s16 fadeTimer) { - func_8031F7CC(0, fadeTimer); + sequence_player_fade_out(0, fadeTimer); sCurrentMusic = MUSIC_NONE; sCurrentShellMusic = MUSIC_NONE; sCurrentCapMusic = MUSIC_NONE; diff --git a/src/game/spawn_object.c b/src/game/spawn_object.c index d11a0d9..344ace3 100644 --- a/src/game/spawn_object.c +++ b/src/game/spawn_object.c @@ -247,7 +247,7 @@ static struct Object *allocate_object(struct ObjectNode *objList) { obj->rawData.asU32[i] = 0; } - obj->unk1C8 = 0; + obj->unused1 = 0; obj->stackIndex = 0; obj->unk1F4 = 0; @@ -256,7 +256,7 @@ static struct Object *allocate_object(struct ObjectNode *objList) { obj->hurtboxRadius = 0.0f; obj->hurtboxHeight = 0.0f; obj->hitboxDownOffset = 0.0f; - obj->unk210 = 0; + obj->unused2 = 0; obj->platform = NULL; obj->collisionData = NULL; @@ -307,7 +307,7 @@ static void snap_object_to_floor(struct Object *obj) { * Spawn an object at the origin with the behavior script at virtual address * behScript. */ -struct Object *create_object(u32 *behScript) { +struct Object *create_object(uintptr_t *behScript) { s32 objListIndex; struct Object *obj; struct ObjectNode *objList; diff --git a/src/game/spawn_object.h b/src/game/spawn_object.h index 8b64cb6..778eea2 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(u32 *behScript); +struct Object *create_object(uintptr_t *behScript); void mark_obj_for_deletion(struct Object *obj); #endif /* _SPAWN_OBJECT_H */ diff --git a/src/game/star_select.c b/src/game/star_select.c deleted file mode 100644 index 07305f4..0000000 --- a/src/game/star_select.c +++ /dev/null @@ -1,286 +0,0 @@ -#include - -#include "sm64.h" -#include "game.h" -#include "memory.h" -#include "area.h" -#include "save_file.h" -#include "object_helpers.h" -#include "engine/behavior_script.h" -#include "ingame_menu.h" -#include "text_strings.h" -#include "audio/external.h" -#include "level_update.h" -#include "segment2.h" -#include "segment7.h" -#include "star_select.h" -#include "model_ids.h" -#include "object_list_processor.h" - -static struct Object *sStarSelectIcons[8]; -static s8 sCurrentMission; // The mission the course is loaded as, affects whether some objects spawn. - -static u8 sObtainedStars; // Number of obtained stars, excluding the coin star. -static s8 sVisibleStars; // Total number of stars that appear in the act selector menu -static u8 sDefaultSelectedAct; // Act selected when the menu is first opened. - -extern u8 bhvStarInActSelector[]; - -static s8 sSelectedAct = 0; -static s8 sSelectedStarIndex = 0; -static s32 sActSelectorMenuTimer = 0; // Delays the time until you can select an act. - -void BehStarActSelectorLoop(void) { - switch (gCurrentObject->oStarSelectorType) { - case STAR_SELECTOR_NOT_SELECTED: - gCurrentObject->oStarSelectorSize -= 0.1; - if (gCurrentObject->oStarSelectorSize < 1.0) { - gCurrentObject->oStarSelectorSize = 1.0; - } - gCurrentObject->oFaceAngleYaw = 0; - break; - case STAR_SELECTOR_SELECTED: - gCurrentObject->oStarSelectorSize += 0.1; - if (gCurrentObject->oStarSelectorSize > 1.3) { - gCurrentObject->oStarSelectorSize = 1.3; - } - gCurrentObject->oFaceAngleYaw += 0x800; - break; - case STAR_SELECTOR_100_COINS: - gCurrentObject->oFaceAngleYaw += 0x800; - break; - } - - obj_scale(gCurrentObject->oStarSelectorSize); - gCurrentObject->oStarSelectorTimer++; // unused timer field? only ever referenced here -} - -void Show100CoinStar(u8 stars) { - if (stars & (1 << 6)) { - // If the 100 coin star has been collected, create a new star selector next to the coin score. - sStarSelectIcons[6] = spawn_object_abs_with_rot(gCurrentObject, 0, MODEL_STAR, - bhvStarInActSelector, 370, 24, -300, 0, 0, 0); - sStarSelectIcons[6]->oStarSelectorSize = 0.8; - sStarSelectIcons[6]->oStarSelectorType = STAR_SELECTOR_100_COINS; - } -} - -void BehActSelectorInit(void) { - s16 i = 0; - s32 selectorModelIDs[10]; - u8 stars = save_file_get_star_flags(gCurrSaveFileNum - 1, gCurrCourseNum - 1); - - sVisibleStars = 0; - while (i != sObtainedStars) { - if (stars & (1 << sVisibleStars)) { // Star has been collected - selectorModelIDs[sVisibleStars] = MODEL_STAR; - i++; - } else { // Star has not been collected - selectorModelIDs[sVisibleStars] = MODEL_TRANSPARENT_STAR; - // If this is the first star that has not been collected, set - // the default selection to this star. - if (sDefaultSelectedAct == 0) { - sDefaultSelectedAct = sVisibleStars + 1; - sSelectedStarIndex = sVisibleStars; - } - } - sVisibleStars++; - } - - // If the stars have been collected in order so far, show the next star. - if (sVisibleStars == sObtainedStars && sVisibleStars != 6) { - selectorModelIDs[sVisibleStars] = MODEL_TRANSPARENT_STAR; - sDefaultSelectedAct = sVisibleStars + 1; - sSelectedStarIndex = sVisibleStars; - sVisibleStars++; - } - - // If all stars have been collected, set the default selection to the last star. - if (sObtainedStars == 6) { - sDefaultSelectedAct = sVisibleStars; - } - - //! Useless, since sDefaultSelectedAct has already been set in this - //! scenario by the code that shows the next uncollected star. - if (sObtainedStars == 0) { - sDefaultSelectedAct = 1; - } - - for (i = 0; i < sVisibleStars; i++) { // Spawn star selector objects - sStarSelectIcons[i] = - spawn_object_abs_with_rot(gCurrentObject, 0, selectorModelIDs[i], bhvStarInActSelector, - 75 + sVisibleStars * -75 + i * 152, 248, -300, 0, 0, 0); - sStarSelectIcons[i]->oStarSelectorSize = 1.0f; - } - - Show100CoinStar(stars); -} - -void BehActSelectorLoop(void) { - s8 i; - u8 starIndexCounter; - u8 stars = save_file_get_star_flags(gCurrSaveFileNum - 1, gCurrCourseNum - 1); - - if (sObtainedStars != 6) { - // Sometimes, stars are not selectable even if they appear on the screen. - // This code filters selectable and non-selectable stars. - sSelectedAct = 0; - handleMenuScrolling(MENU_SCROLL_HORIZONTAL, &sSelectedStarIndex, 0, sObtainedStars); - starIndexCounter = sSelectedStarIndex; - for (i = 0; i < sVisibleStars; i++) { - // Can the star be selected (is it either already completed or the first non-completed mission) - if ((stars & (1 << i)) || i + 1 == sDefaultSelectedAct) { - if (starIndexCounter == 0) { // We have reached the sSelectedStarIndex-th selectable star. - sSelectedAct = i; - break; - } - starIndexCounter--; - } - } - } else { - // If all stars are collected then they are all selectable. - handleMenuScrolling(MENU_SCROLL_HORIZONTAL, &sSelectedStarIndex, 0, sVisibleStars - 1); - sSelectedAct = sSelectedStarIndex; - } - - for (i = 0; i < sVisibleStars; i++) { - if (sSelectedAct == i) { - sStarSelectIcons[i]->oStarSelectorType = STAR_SELECTOR_SELECTED; - } else { - sStarSelectIcons[i]->oStarSelectorType = STAR_SELECTOR_NOT_SELECTED; - } - } -} - -static void ShowCourseNumber(void) { - u8 courseNum[4]; - - dl_add_new_translation_matrix(1, 158.0f, 81.0f, 0.0f); - - gSPDisplayList(gDisplayListHead++, main_menu_seg7_dl_0700F228); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); - - Int2Str(gCurrCourseNum, courseNum); - if (gCurrCourseNum < 10) { - PutString(2, 152, 158, courseNum); - } else { - PutString(2, 143, 158, courseNum); - } - - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); -} - -static void ShowActSelectorMenu(void) { -// TODO: EU relocates level and act name tables to translation segment 0x19 -#ifndef VERSION_EU -#ifdef VERSION_JP - unsigned char myScore[] = { TEXT_MY_SCORE }; -#else - unsigned char myScore[] = { TEXT_MYSCORE }; -#endif - unsigned char starNumbers[] = { TEXT_0 }; - u32 *levelNameTbl = (u32 *) segmented_to_virtual(seg2_level_name_table); - u8 *currLevelName = (u8 *) segmented_to_virtual((void *) levelNameTbl[gCurrCourseNum - 1]); - u32 *actNameTbl = (u32 *) segmented_to_virtual(seg2_act_name_table); - u8 *selectedActName; - s16 x; - s16 x2; - s8 i; - - dl_add_new_ortho_matrix(); - - // Display the coin highscore. - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); - gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); - - ShowCoins(1, gCurrSaveFileNum - 1, gCurrCourseNum - 1, 155, 106); - - gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); - gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); - gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, 255); - - // Display the "MY SCORE" text - if (save_file_get_course_coin_score(gCurrSaveFileNum - 1, gCurrCourseNum - 1) != 0) { - PrintGenericText(102, 118, myScore); - } - - // Display the level name; add 3 to skip the number and spacing to get to the actual string to center. - x = get_str_x_pos_from_center(160, currLevelName + 3, 10.0f); - PrintGenericText(x, 33, currLevelName + 3); - - // Display the course number. - gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); - - ShowCourseNumber(); - - gSPDisplayList(gDisplayListHead++, main_menu_seg7_dl_0700D108); - gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, 255); - - // Display the name of the selected act. - if (sVisibleStars != 0) { - selectedActName = (u8 *) segmented_to_virtual((void *) (actNameTbl[(gCurrCourseNum - 1) * 6 + sSelectedAct])); -#ifdef VERSION_JP - x2 = get_str_x_pos_from_center(158, selectedActName, 8.0f); -#else - x2 = get_str_x_pos_from_center(163, selectedActName, 8.0f); -#endif - PrintRegularText(x2, 81, selectedActName); - } - - // Display the numbers above each star. - for (i = 1; i <= sVisibleStars; i++) { - starNumbers[0] = i; - PrintRegularText(i * 34 - sVisibleStars * 17 + 0x8B, 38, starNumbers); - } - - gSPDisplayList(gDisplayListHead++, main_menu_seg7_dl_0700D160); -#endif // !VERSION_EU -} - -//! @bug Another geo function missing the third param. Harmless in practice due to o32 convention. -Gfx *Geo18_80177518(s16 run, UNUSED struct GraphNode *node) { - if (run == TRUE) { - ShowActSelectorMenu(); - } - return NULL; -} - -void LevelProc_80177560(UNUSED s32 a, UNUSED s32 b) { - u8 stars = save_file_get_star_flags(gCurrSaveFileNum - 1, gCurrCourseNum - 1); - - sCurrentMission = 0; - sDefaultSelectedAct = 0; - sVisibleStars = 0; - sActSelectorMenuTimer = 0; - sObtainedStars = save_file_get_course_star_count(gCurrSaveFileNum - 1, gCurrCourseNum - 1); - - // Don't count 100 coin star - if (stars & (1 << 6)) { - sObtainedStars--; - } -} - -int LevelProc_80177610(UNUSED s32 a, UNUSED s32 b) { - if (sActSelectorMenuTimer >= 11) { - if ((gPlayer3Controller->buttonPressed & A_BUTTON) - || (gPlayer3Controller->buttonPressed & START_BUTTON) - || (gPlayer3Controller->buttonPressed & B_BUTTON)) { -#ifdef VERSION_JP - play_sound(SOUND_MENU_STARSOUND, gDefaultSoundArgs); -#else - play_sound(SOUND_MENU_STARSOUNDLETSAGO, gDefaultSoundArgs); -#endif - if (sDefaultSelectedAct > sSelectedAct) { - sCurrentMission = sSelectedAct + 1; - } else { - sCurrentMission = sDefaultSelectedAct; - } - D_80330534 = sSelectedAct + 1; - } - } - area_update_objects(); - sActSelectorMenuTimer++; - return sCurrentMission; -} diff --git a/src/game/star_select.h b/src/game/star_select.h deleted file mode 100644 index 16ee6eb..0000000 --- a/src/game/star_select.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _STAR_SELECT_H -#define _STAR_SELECT_H - -enum StarSelectorTypes -{ - STAR_SELECTOR_NOT_SELECTED, - STAR_SELECTOR_SELECTED, - STAR_SELECTOR_100_COINS -}; - -// extern ? BehStarActSelectorLoop(?); -// extern ? Show100CoinStar(?); -// extern ? BehActSelectorInit(?); -// extern ? BehActSelectorLoop(?); -// extern ? Geo18_80177518(?); -// extern ? LevelProc_80177560(?); -// extern ? LevelProc_80177610(?); - -#endif /* _STAR_SELECT_H */ diff --git a/src/goddard/draw_objects.c b/src/goddard/draw_objects.c index 0be78a2..b2b5d6d 100644 --- a/src/goddard/draw_objects.c +++ b/src/goddard/draw_objects.c @@ -350,12 +350,12 @@ void check_face_bad_vtx(struct ObjFace *face) { for (i = 0; i < face->vtxCount; i++) { vtx = face->vertices[i]; // These seem to be checks against bad conversions, or an outdated vertex structure..? - if ((s32) vtx == 39) { + if ((uintptr_t) vtx == 39) { gd_printf("bad1\n"); return; } - if ((s32) vtx->gbiVerts == 0x3F800000) { - fatal_printf("bad2 %x,%d,%d,%d\n", (u32) vtx, vtx->unk3C, vtx->id, vtx->header.type); + if ((uintptr_t) vtx->gbiVerts == 0x3F800000) { + fatal_printf("bad2 %x,%d,%d,%d\n", (u32) (uintptr_t) vtx, vtx->unk3C, vtx->id, vtx->header.type); } } } @@ -1259,7 +1259,7 @@ void find_thisface_verts(struct ObjFace *face, struct ObjGroup *verts) { if (link->obj->type == OBJ_TYPE_VERTICES || link->obj->type == OBJ_TYPE_PARTICLES) { // it seems that the vertices in a face are first pointer-sized indices // to a given vertix or particle link in the second argument's group. - if (linkVtxIdx++ == (u32) face->vertices[i]) { + if (linkVtxIdx++ == (u32) (uintptr_t) face->vertices[i]) { break; } } diff --git a/src/goddard/dynlist_proc.h b/src/goddard/dynlist_proc.h index c913b36..82fa43b 100644 --- a/src/goddard/dynlist_proc.h +++ b/src/goddard/dynlist_proc.h @@ -13,7 +13,7 @@ typedef void *DynId; /// as the id can be either a number or a string. /// @{ #define DynIdAsStr(id) ((char *)(id)) -#define DynIdAsInt(id) ((u32)(id)) +#define DynIdAsInt(id) ((u32)(uintptr_t)(id)) #define AsDynId(unk) ((DynId)(unk)) /// @} /// @} diff --git a/src/goddard/gd_main.c b/src/goddard/gd_main.c index 7348ac7..a9f1a84 100644 --- a/src/goddard/gd_main.c +++ b/src/goddard/gd_main.c @@ -27,7 +27,7 @@ struct GdControl gGdCtrlPrev; // @ 801B9A18; previous frame's controller info u32 __main__(void) { UNUSED u32 pad1C; - gd_printf("%x, %x\n", (u32) &D_801A8058, (u32) &gGdMoveScene); + gd_printf("%x, %x\n", (u32) (uintptr_t) &D_801A8058, (u32) (uintptr_t) &gGdMoveScene); add_to_stacktrace("main"); gd_init(); diff --git a/src/goddard/old_menu.c b/src/goddard/old_menu.c index 37ebc87..37308fa 100644 --- a/src/goddard/old_menu.c +++ b/src/goddard/old_menu.c @@ -29,7 +29,7 @@ void func_8018BCB8(struct ObjGadget *); /* 239EC0 -> 239F78 */ void get_objvalue(union ObjVarVal *dst, enum ValPtrType type, void *base, s32 offset) { - union ObjVarVal *objAddr = (void *) ((u32) base + offset); + union ObjVarVal *objAddr = (void *) ((u8 *) base + offset); switch (type) { case OBJ_VALUE_INT: @@ -68,7 +68,7 @@ void cat_grp_name_to_buf(struct ObjGroup *group) { char buf[0x100]; // sp18 if (group->debugPrint == 1) { - sprintf(buf, "| %s %%x%d", group->name, (u32) group); + sprintf(buf, "| %s %%x%d", group->name, (u32) (uintptr_t) group); gd_strcat(sMenuStrBuf, buf); // gd_strcat? } } @@ -125,7 +125,7 @@ struct ObjGadget *make_gadget(UNUSED s32 a0, s32 a1) { /* 23A32C -> 23A3E4 */ void set_objvalue(union ObjVarVal *src, enum ValPtrType type, void *base, s32 offset) { - union ObjVarVal *dst = (void *) ((u32) base + offset); + union ObjVarVal *dst = (void *) ((u8 *) base + offset); switch (type) { case OBJ_VALUE_INT: dst->i = src->i; diff --git a/src/goddard/renderer.c b/src/goddard/renderer.c index d21af31..27cb852 100644 --- a/src/goddard/renderer.c +++ b/src/goddard/renderer.c @@ -21,10 +21,6 @@ #include "gd_math.h" #include "shape_helper.h" -// types and defines -typedef s32 intptr_t; -typedef u32 uintptr_t; - #define MAX_GD_DLS 1000 #define OS_MESG_SI_COMPLETE 0x33333333 @@ -2927,7 +2923,7 @@ void gd_put_sprite(u16 *sprite, s32 x, s32 y, s32 wx, s32 wy) { G_TX_NOMASK, G_TX_NOLOD, (G_TX_NOMIRROR | G_TX_WRAP), G_TX_NOMASK, G_TX_NOLOD); gDPSetTileSize(next_gfx(), 0, 0, 0, 124, 124); gSPTextureRectangle(next_gfx(), x << 2, (y + r) << 2, (x + 0x20) << 2, (y + r + 0x20) << 2, - 0, 0, 0, 1024, 1024); + G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); } } @@ -3173,7 +3169,7 @@ struct GdObj *load_dynlist(struct DynList *dynlist) { } for (i = 0; i < sp34; i++) { - osMapTLB(i, OS_PM_64K, (void *) (0x04000000 + (i * 2 * 0x10000)), + osMapTLB(i, OS_PM_64K, (void *) (uintptr_t) (0x04000000 + (i * 2 * 0x10000)), GD_LOWER_24(((uintptr_t) allocSegSpace) + (i * 2 * 0x10000)), GD_LOWER_24(((uintptr_t) allocSegSpace) + (i * 2 * 0x10000) + 0x10000), -1); } diff --git a/src/goddard/skin.c b/src/goddard/skin.c index 7c503ea..882d5ce 100644 --- a/src/goddard/skin.c +++ b/src/goddard/skin.c @@ -492,16 +492,16 @@ void gd_print_net(struct ObjNet *net) { gd_printf("MaxRadius: %f\n", net->unkE4); gd_print_mtx("Matrix:", &net->mat128); if (net->unk1A8 != NULL) { - gd_printf("ShapePtr: %x (%s)\n", (u32) net->unk1A8, net->unk1A8->name); + gd_printf("ShapePtr: %x (%s)\n", (u32) (uintptr_t) net->unk1A8, net->unk1A8->name); } else { gd_printf("ShapePtr: NULL\n"); } gd_print_vec("Scale:", &net->unk1AC); gd_printf("Mass: %f\n", net->unk1B8); gd_printf("NumModes: %d\n", net->unk1BC); - gd_printf("NodeGroup: %x\n", (u32) net->unk1C8); - gd_printf("PlaneGroup: %x\n", (u32) net->unk1CC); - gd_printf("VertexGroup: %x\n", (u32) net->unk1D0); + gd_printf("NodeGroup: %x\n", (u32) (uintptr_t) net->unk1C8); + gd_printf("PlaneGroup: %x\n", (u32) (uintptr_t) net->unk1CC); + gd_printf("VertexGroup: %x\n", (u32) (uintptr_t) net->unk1D0); } /* 2422E0 -> 2422F8; orig name: func_80193B10 */ diff --git a/src/menu/file_select.c b/src/menu/file_select.c new file mode 100644 index 0000000..d3ec0b5 --- /dev/null +++ b/src/menu/file_select.c @@ -0,0 +1,2236 @@ +#include + +#include "sm64.h" +#include "audio/external.h" +#include "game/game.h" +#include "game/ingame_menu.h" +#include "game/object_helpers.h" +#include "game/area.h" +#include "game/save_file.h" +#include "game/spawn_object.h" +#include "game/object_list_processor.h" +#include "game/segment2.h" +#include "game/segment7.h" +#include "game/print.h" +#include "engine/behavior_script.h" +#include "engine/graph_node.h" +#include "engine/math_util.h" +#include "behavior_data.h" +#include "text_strings.h" +#include "file_select.h" + +/** + * @file file_select.c + * This file implements how the file select and it's menus render and function. + * That includes button IDs rendered as object models, strings, hand cursor, + * special menu messages and phases, button states and button clicked checks. + */ + +// The current sound mode is automatically centered on US due to +// the large length difference between options. +#ifndef VERSION_JP +static s16 sSoundTextX; +#endif + +// Amount of main menu buttons defined in the code called by spawn_object_rel_with_rot. +// See file_select.h for the names in MenuButtonTypes. +static struct Object *sMainMenuButtons[32]; + +// Used to defined yes/no fade colors after a file is selected in the erase menu. +// sYesNoColor[0]: YES | sYesNoColor[1]: NO +static u8 sYesNoColor[2]; + +// The button that is selected when it is clicked. +static s8 sSelectedButtonID = MENU_BUTTON_NONE; + +// Whether we are on the main menu or one of the submenus. +static s8 sCurrentMenuLevel = MENU_LAYER_MAIN; + +// Used for text opacifying. If it is below 250, it is constantly incremented. +static u8 sTextBaseAlpha = 0; + +// 2D position of the cursor on the screen. +// sCursorPos[0]: X | sCursorPos[1]: Y +static f32 sCursorPos[] = {0, 0}; + +// Determines which graphic to use for the cursor. +static s16 sCursorClickingTimer = 0; + +// Equal to sCursorPos if the cursor gets clicked, {-10000, -10000} otherwise. +static s16 sClickPos[] = {-10000, -10000}; + +// Used for determining which file has been selected during copying and erasing. +static s8 sSelectedFileIndex = -1; + +// Whether to fade out text or not. +static s8 sFadeOutText = FALSE; + +// The message currently being displayed at the top of a menu. +static s8 sStatusMessageID = 0; + +// Used for text fading. The alpha value of text is calculated as +// sTextBaseAlpha - sTextFadeAlpha. +static u8 sTextFadeAlpha = 0; + +// File select timer that keeps counting until it reaches 1000. +// Used to prevent buttons from being clickable as soon as a menu loads. +// Gets reset when you click an empty save, existing saves in copy and erase menus +// and when you click yes/no in the erase confirmation prompt. +static s16 sMainMenuTimer = 0; + +// Sound mode menu buttonID, has different values compared to gSoundMode in audio. +// 0: gSoundMode = 0 (Stereo) | 1: gSoundMode = 3 (Mono) | 2: gSoundMode = 1 (Headset) +static s8 sSoundMode = 0; + +// Tracks which button will be pressed in the erase confirmation prompt (yes/no). +static s8 sEraseYesNoHoverState = MENU_ERASE_HOVER_NONE; + +// Used for the copy menu, defines if the game as all 4 save slots with data. +// if TRUE, it doesn't allow copying more files. +static s8 sAllFilesExist = FALSE; + +// Defines the value of the save slot selected in the menu. +// Mario A: 1 | Mario B: 2 | Mario C: 3 | Mario D: 4 +static s8 sSelectedFileNum = 0; + +// Which coin score mode to use when scoring files. 0 for local +// coin high score, 1 for high score across all files. +static s8 sScoreFileCoinScoreMode = 0; + +static unsigned char textReturn[] = { TEXT_RETURN }; +static unsigned char textViewScore[] = { TEXT_CHECK_SCORE }; +static unsigned char textCopyFileButton[] = { TEXT_COPY_FILE_BUTTON }; +static unsigned char textEraseFileButton[] = { TEXT_ERASE_FILE_BUTTON }; +static unsigned char textSoundModes[][8] = { { TEXT_STEREO }, { TEXT_MONO }, { TEXT_HEADSET } }; +static unsigned char textMarioA[] = { TEXT_FILE_MARIO_A }; +static unsigned char textMarioB[] = { TEXT_FILE_MARIO_B }; +static unsigned char textMarioC[] = { TEXT_FILE_MARIO_C }; +static unsigned char textMarioD[] = { TEXT_FILE_MARIO_D }; +static unsigned char textNew[] = { TEXT_NEW }; +static unsigned char starIcon[] = { GLYPH_STAR, GLYPH_SPACE }; +static unsigned char xIcon[] = { GLYPH_MULTIPLY, GLYPH_SPACE }; +static unsigned char textSelectFile[] = { TEXT_SELECT_FILE }; +static unsigned char textScore[] = { TEXT_SCORE }; +static unsigned char textCopy[] = { TEXT_COPY }; +static unsigned char textErase[] = { TEXT_ERASE }; +static unsigned char textCheckFile[] = { TEXT_CHECK_FILE }; +static unsigned char textNoSavedDataExists[] = { TEXT_NO_SAVED_DATA_EXISTS }; +static unsigned char textCopyFile[] = { TEXT_COPY_FILE }; +static unsigned char textCopyItToWhere[] = { TEXT_COPY_IT_TO_WHERE }; +static unsigned char textNoSavedDataExistsCopy[] = { TEXT_NO_SAVED_DATA_EXISTS }; +static unsigned char textCopyCompleted[] = { TEXT_COPYING_COMPLETED }; +static unsigned char textSavedDataExists[] = { TEXT_SAVED_DATA_EXISTS }; +static unsigned char textNoFileToCopyFrom[] = { TEXT_NO_FILE_TO_COPY_FROM }; +static unsigned char textYes[] = { TEXT_YES }; +static unsigned char textNo[] = { TEXT_NO }; + +/** + * Yellow Background Menu Initial Action + * Rotates the background at 180 grades and it's scale. + * Although the scale is properly applied in the loop function. + */ +void beh_yellow_background_menu_init(void) { + gCurrentObject->oFaceAngleYaw = 0x8000; + gCurrentObject->oMenuButtonScale = 9.0f; +} + +/** + * Yellow Background Menu Loop Action + * Properly scales the background in the main menu. + */ +void beh_yellow_background_menu_loop(void) { + obj_scale(9.0f); +} + +/** + * Check if a button was clicked. + * depth = 200.0 for main menu, 22.0 for submenus. + */ +static s32 check_clicked_button(s16 x, s16 y, f32 depth) { + f32 a = 52.4213; + f32 newX = ((f32) x * 160.0) / (a * depth); + f32 newY = ((f32) y * 120.0) / (a * 3.0f / 4.0f * depth); + s16 maxX = newX + 25.0f; + s16 minX = newX - 25.0f; + s16 maxY = newY + 21.0f; + s16 minY = newY - 21.0f; + + if (sClickPos[0] < maxX && minX < sClickPos[0] && sClickPos[1] < maxY && minY < sClickPos[1]) { + return TRUE; + } + return FALSE; +} + +/** + * Grow from main menu, used by selecting files and menus. + */ +static void bhv_menu_button_growing_from_main_menu(struct Object *button) { + if (button->oMenuButtonTimer < 16) { + button->oFaceAngleYaw += 0x800; + } + if (button->oMenuButtonTimer < 8) { + button->oFaceAnglePitch += 0x800; + } + if (button->oMenuButtonTimer >= 8 && button->oMenuButtonTimer < 16) { + button->oFaceAnglePitch -= 0x800; + } + button->oParentRelativePosX -= button->oMenuButtonOrigPosX / 16.0; + button->oParentRelativePosY -= button->oMenuButtonOrigPosY / 16.0; + if (button->oPosZ < button->oMenuButtonOrigPosZ + 17800.0) { + button->oParentRelativePosZ += 1112.5; + } + button->oMenuButtonTimer++; + if (button->oMenuButtonTimer == 16) { + button->oParentRelativePosX = 0.0f; + button->oParentRelativePosY = 0.0f; + button->oMenuButtonState = MENU_BUTTON_STATE_FULLSCREEN; + button->oMenuButtonTimer = 0; + } +} + +/** + * Shrink back to main menu, used to return back while inside menus. + */ +static void bhv_menu_button_shrinking_to_main_menu(struct Object *button) { + if (button->oMenuButtonTimer < 16) { + button->oFaceAngleYaw -= 0x800; + } + if (button->oMenuButtonTimer < 8) { + button->oFaceAnglePitch -= 0x800; + } + if (button->oMenuButtonTimer >= 8 && button->oMenuButtonTimer < 16) { + button->oFaceAnglePitch += 0x800; + } + button->oParentRelativePosX += button->oMenuButtonOrigPosX / 16.0; + button->oParentRelativePosY += button->oMenuButtonOrigPosY / 16.0; + if (button->oPosZ > button->oMenuButtonOrigPosZ) { + button->oParentRelativePosZ -= 1112.5; + } + button->oMenuButtonTimer++; + if (button->oMenuButtonTimer == 16) { + button->oParentRelativePosX = button->oMenuButtonOrigPosX; + button->oParentRelativePosY = button->oMenuButtonOrigPosY; + button->oMenuButtonState = MENU_BUTTON_STATE_DEFAULT; + button->oMenuButtonTimer = 0; + } +} + +/** + * Grow from submenu, used by selecting a file in the score menu. + */ +static void bhv_menu_button_growing_from_submenu(struct Object *button) { + if (button->oMenuButtonTimer < 16) { + button->oFaceAngleYaw += 0x800; + } + if (button->oMenuButtonTimer < 8) { + button->oFaceAnglePitch += 0x800; + } + if (button->oMenuButtonTimer >= 8 && button->oMenuButtonTimer < 16) { + button->oFaceAnglePitch -= 0x800; + } + button->oParentRelativePosX -= button->oMenuButtonOrigPosX / 16.0; + button->oParentRelativePosY -= button->oMenuButtonOrigPosY / 16.0; + button->oParentRelativePosZ -= 116.25; + button->oMenuButtonTimer++; + if (button->oMenuButtonTimer == 16) { + button->oParentRelativePosX = 0.0f; + button->oParentRelativePosY = 0.0f; + button->oMenuButtonState = MENU_BUTTON_STATE_FULLSCREEN; + button->oMenuButtonTimer = 0; + } +} + +/** + * Shrink back to submenu, used to return back while inside a score save menu. + */ +static void bhv_menu_button_shrinking_to_submenu(struct Object *button) { + if (button->oMenuButtonTimer < 16) { + button->oFaceAngleYaw -= 0x800; + } + if (button->oMenuButtonTimer < 8) { + button->oFaceAnglePitch -= 0x800; + } + if (button->oMenuButtonTimer >= 8 && button->oMenuButtonTimer < 16) { + button->oFaceAnglePitch += 0x800; + } + button->oParentRelativePosX += button->oMenuButtonOrigPosX / 16.0; + button->oParentRelativePosY += button->oMenuButtonOrigPosY / 16.0; + if (button->oPosZ > button->oMenuButtonOrigPosZ) { + button->oParentRelativePosZ += 116.25; + } + button->oMenuButtonTimer++; + if (button->oMenuButtonTimer == 16) { + button->oParentRelativePosX = button->oMenuButtonOrigPosX; + button->oParentRelativePosY = button->oMenuButtonOrigPosY; + button->oMenuButtonState = MENU_BUTTON_STATE_DEFAULT; + button->oMenuButtonTimer = 0; + } +} + +/** + * A small increase and decrease in size. + * Used by failed copy/erase/score operations and sound mode select. + */ +static void bhv_menu_button_zoom_in_out(struct Object *button) { + if (sCurrentMenuLevel == MENU_LAYER_MAIN) { + if (button->oMenuButtonTimer < 4) { + button->oParentRelativePosZ -= 20.0f; + } + if (button->oMenuButtonTimer >= 4) { + button->oParentRelativePosZ += 20.0f; + } + } else { + if (button->oMenuButtonTimer < 4) { + button->oParentRelativePosZ += 20.0f; + } + if (button->oMenuButtonTimer >= 4) { + button->oParentRelativePosZ -= 20.0f; + } + } + button->oMenuButtonTimer++; + if (button->oMenuButtonTimer == 8) { + button->oMenuButtonState = MENU_BUTTON_STATE_DEFAULT; + button->oMenuButtonTimer = 0; + } +} + +/** + * A small temporary increase in size. + * Used while selecting a target copy/erase file or yes/no erase confirmation prompt. + */ +static void bhv_menu_button_zoom_in(struct Object *button) { + button->oMenuButtonScale += 0.0022; + button->oMenuButtonTimer++; + if (button->oMenuButtonTimer == 10) { + button->oMenuButtonState = MENU_BUTTON_STATE_DEFAULT; + button->oMenuButtonTimer = 0; + } +} + +/** + * A small temporary decrease in size. + * Used after selecting a target copy/erase file or + * yes/no erase confirmation prompt to undo the zoom in. + */ +static void bhv_menu_button_zoom_out(struct Object *button) { + button->oMenuButtonScale -= 0.0022; + button->oMenuButtonTimer++; + if (button->oMenuButtonTimer == 10) { + button->oMenuButtonState = MENU_BUTTON_STATE_DEFAULT; + button->oMenuButtonTimer = 0; + } +} + +/** + * Menu Buttons Menu Initial Action + * Aligns menu buttons so they can stay in their original + * positions when you choose a button. + */ +void bhv_menu_button_init(void) { + gCurrentObject->oMenuButtonOrigPosX = gCurrentObject->oParentRelativePosX; + gCurrentObject->oMenuButtonOrigPosY = gCurrentObject->oParentRelativePosY; +} + +/** + * Menu Buttons Menu Loop Action + * Handles the functions of the button states and + * object scale for each button. + */ +void bhv_menu_button_loop(void) { + switch (gCurrentObject->oMenuButtonState) { + case MENU_BUTTON_STATE_DEFAULT: // Button state + gCurrentObject->oMenuButtonOrigPosZ = gCurrentObject->oPosZ; + break; + case MENU_BUTTON_STATE_GROWING: // Switching from button to menu state + if (sCurrentMenuLevel == MENU_LAYER_MAIN) { + bhv_menu_button_growing_from_main_menu(gCurrentObject); + } + if (sCurrentMenuLevel == MENU_LAYER_SUBMENU) { + bhv_menu_button_growing_from_submenu(gCurrentObject); // Only used for score files + } + sTextBaseAlpha = 0; + sCursorClickingTimer = 4; + break; + case MENU_BUTTON_STATE_FULLSCREEN: // Menu state + break; + case MENU_BUTTON_STATE_SHRINKING: // Switching from menu to button state + if (sCurrentMenuLevel == MENU_LAYER_MAIN) { + bhv_menu_button_shrinking_to_main_menu(gCurrentObject); + } + if (sCurrentMenuLevel == MENU_LAYER_SUBMENU) { + bhv_menu_button_shrinking_to_submenu(gCurrentObject); // Only used for score files + } + sTextBaseAlpha = 0; + sCursorClickingTimer = 4; + break; + case MENU_BUTTON_STATE_ZOOM_IN_OUT: + bhv_menu_button_zoom_in_out(gCurrentObject); + sCursorClickingTimer = 4; + break; + case MENU_BUTTON_STATE_ZOOM_IN: + bhv_menu_button_zoom_in(gCurrentObject); + sCursorClickingTimer = 4; + break; + case MENU_BUTTON_STATE_ZOOM_OUT: + bhv_menu_button_zoom_out(gCurrentObject); + sCursorClickingTimer = 4; + break; + } + obj_scale(gCurrentObject->oMenuButtonScale); +} + +/** + * Handles how to exit the score file menu using button states. + */ +static void exit_score_file_to_score_menu(struct Object *scoreFileButton, s8 scoreButtonID) { + // Begin exit + if (scoreFileButton->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN + && sCursorClickingTimer == 2) { + play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gDefaultSoundArgs); + scoreFileButton->oMenuButtonState = MENU_BUTTON_STATE_SHRINKING; + } + // End exit + if (scoreFileButton->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT) { + sSelectedButtonID = scoreButtonID; + if (sCurrentMenuLevel == MENU_LAYER_SUBMENU) { + sCurrentMenuLevel = MENU_LAYER_MAIN; + } + } +} + +/** + * Render buttons for the score menu. + * Also check if the save file exists to render a different Mario button. + */ +static void render_score_menu_buttons(struct Object *scoreButton) { + // File A + if (save_file_exists(SAVE_FILE_A) == TRUE) { + sMainMenuButtons[MENU_BUTTON_SCORE_FILE_A] = + spawn_object_rel_with_rot(scoreButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, + 711, 311, -100, 0, -0x8000, 0); + } else { + sMainMenuButtons[MENU_BUTTON_SCORE_FILE_A] = + spawn_object_rel_with_rot(scoreButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, 711, + 311, -100, 0, -0x8000, 0); + } + sMainMenuButtons[MENU_BUTTON_SCORE_FILE_A]->oMenuButtonScale = 0.11111111f; + // File B + if (save_file_exists(SAVE_FILE_B) == TRUE) { + sMainMenuButtons[MENU_BUTTON_SCORE_FILE_B] = + spawn_object_rel_with_rot(scoreButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, + -166, 311, -100, 0, -0x8000, 0); + } else { + sMainMenuButtons[MENU_BUTTON_SCORE_FILE_B] = + spawn_object_rel_with_rot(scoreButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, + -166, 311, -100, 0, -0x8000, 0); + } + sMainMenuButtons[MENU_BUTTON_SCORE_FILE_B]->oMenuButtonScale = 0.11111111f; + // File C + if (save_file_exists(SAVE_FILE_C) == TRUE) { + sMainMenuButtons[MENU_BUTTON_SCORE_FILE_C] = spawn_object_rel_with_rot( + scoreButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, 711, 0, -100, 0, -0x8000, 0); + } else { + sMainMenuButtons[MENU_BUTTON_SCORE_FILE_C] = spawn_object_rel_with_rot( + scoreButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, 711, 0, -100, 0, -0x8000, 0); + } + sMainMenuButtons[MENU_BUTTON_SCORE_FILE_C]->oMenuButtonScale = 0.11111111f; + // File D + if (save_file_exists(SAVE_FILE_D) == TRUE) { + sMainMenuButtons[MENU_BUTTON_SCORE_FILE_D] = + spawn_object_rel_with_rot(scoreButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, + -166, 0, -100, 0, -0x8000, 0); + } else { + sMainMenuButtons[MENU_BUTTON_SCORE_FILE_D] = spawn_object_rel_with_rot( + scoreButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, -166, 0, -100, 0, -0x8000, 0); + } + sMainMenuButtons[MENU_BUTTON_SCORE_FILE_D]->oMenuButtonScale = 0.11111111f; + // Return to main menu button + sMainMenuButtons[MENU_BUTTON_SCORE_RETURN] = spawn_object_rel_with_rot( + scoreButton, MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, bhvMenuButton, 711, -388, -100, 0, -0x8000, 0); + sMainMenuButtons[MENU_BUTTON_SCORE_RETURN]->oMenuButtonScale = 0.11111111f; + // Switch to copy menu button + sMainMenuButtons[MENU_BUTTON_SCORE_COPY_FILE] = spawn_object_rel_with_rot( + scoreButton, MODEL_MAIN_MENU_BLUE_COPY_BUTTON, bhvMenuButton, 0, -388, -100, 0, -0x8000, 0); + sMainMenuButtons[MENU_BUTTON_SCORE_COPY_FILE]->oMenuButtonScale = 0.11111111f; + // Switch to erase menu button + sMainMenuButtons[MENU_BUTTON_SCORE_ERASE_FILE] = spawn_object_rel_with_rot( + scoreButton, MODEL_MAIN_MENU_RED_ERASE_BUTTON, bhvMenuButton, -711, -388, -100, 0, -0x8000, 0); + sMainMenuButtons[MENU_BUTTON_SCORE_ERASE_FILE]->oMenuButtonScale = 0.11111111f; +} + +/** + * In the score menu, checks if a button was clicked to play a sound, button state and other functions. + */ +static void check_score_menu_clicked_buttons(struct Object *scoreButton) { + if (scoreButton->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { + s32 buttonID; + // Configure score menu button group + for (buttonID = MENU_BUTTON_SCORE_MIN; buttonID < MENU_BUTTON_SCORE_MAX; buttonID++) { + s16 buttonX = sMainMenuButtons[buttonID]->oPosX; + s16 buttonY = sMainMenuButtons[buttonID]->oPosY; + + if (check_clicked_button(buttonX, buttonY, 22.0f) == TRUE && sMainMenuTimer >= 31) { + // If menu button clicked, select it + if (buttonID == MENU_BUTTON_SCORE_RETURN || buttonID == MENU_BUTTON_SCORE_COPY_FILE + || buttonID == MENU_BUTTON_SCORE_ERASE_FILE) { + play_sound(SOUND_MENU_CLICK_FILE_SELECT, gDefaultSoundArgs); + sMainMenuButtons[buttonID]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN_OUT; + sSelectedButtonID = buttonID; + } + else { // Check if a save file is clicked + if (sMainMenuTimer >= 31) { + // If clicked in a existing save file, select it too see it's score + if (save_file_exists(buttonID - MENU_BUTTON_SCORE_MIN) == TRUE) { + play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gDefaultSoundArgs); + sMainMenuButtons[buttonID]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; + sSelectedButtonID = buttonID; + } + else { + // If clicked in a non-existing save file, play buzz sound + play_sound(SOUND_MENU_CAMERA_BUZZ, gDefaultSoundArgs); + sMainMenuButtons[buttonID]->oMenuButtonState = + MENU_BUTTON_STATE_ZOOM_IN_OUT; + if (sMainMenuTimer >= 31) { + sFadeOutText = TRUE; + sMainMenuTimer = 0; + } + } + } + } + sCurrentMenuLevel = MENU_LAYER_SUBMENU; + break; + } + } + } +} + +/** + * Render buttons for the copy menu. + * Also check if the save file exists to render a different Mario button. + */ +static void render_copy_menu_buttons(struct Object *copyButton) { + // File A + if (save_file_exists(SAVE_FILE_A) == TRUE) { + sMainMenuButtons[MENU_BUTTON_COPY_FILE_A] = + spawn_object_rel_with_rot(copyButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, 711, + 311, -100, 0, -0x8000, 0); + } else { + sMainMenuButtons[MENU_BUTTON_COPY_FILE_A] = spawn_object_rel_with_rot( + copyButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, 711, 311, -100, 0, -0x8000, 0); + } + sMainMenuButtons[MENU_BUTTON_COPY_FILE_A]->oMenuButtonScale = 0.11111111f; + // File B + if (save_file_exists(SAVE_FILE_B) == TRUE) { + sMainMenuButtons[MENU_BUTTON_COPY_FILE_B] = + spawn_object_rel_with_rot(copyButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, + -166, 311, -100, 0, -0x8000, 0); + } else { + sMainMenuButtons[MENU_BUTTON_COPY_FILE_B] = + spawn_object_rel_with_rot(copyButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, -166, + 311, -100, 0, -0x8000, 0); + } + sMainMenuButtons[MENU_BUTTON_COPY_FILE_B]->oMenuButtonScale = 0.11111111f; + // File C + if (save_file_exists(SAVE_FILE_C) == TRUE) { + sMainMenuButtons[MENU_BUTTON_COPY_FILE_C] = spawn_object_rel_with_rot( + copyButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, 711, 0, -100, 0, -0x8000, 0); + } else { + sMainMenuButtons[MENU_BUTTON_COPY_FILE_C] = spawn_object_rel_with_rot( + copyButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, 711, 0, -100, 0, -0x8000, 0); + } + sMainMenuButtons[MENU_BUTTON_COPY_FILE_C]->oMenuButtonScale = 0.11111111f; + // File D + if (save_file_exists(SAVE_FILE_D) == TRUE) { + sMainMenuButtons[MENU_BUTTON_COPY_FILE_D] = spawn_object_rel_with_rot( + copyButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, -166, 0, -100, 0, -0x8000, 0); + } else { + sMainMenuButtons[MENU_BUTTON_COPY_FILE_D] = spawn_object_rel_with_rot( + copyButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, -166, 0, -100, 0, -0x8000, 0); + } + sMainMenuButtons[MENU_BUTTON_COPY_FILE_D]->oMenuButtonScale = 0.11111111f; + // Return to main menu button + sMainMenuButtons[MENU_BUTTON_COPY_RETURN] = spawn_object_rel_with_rot( + copyButton, MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, bhvMenuButton, 711, -388, -100, 0, -0x8000, 0); + sMainMenuButtons[MENU_BUTTON_COPY_RETURN]->oMenuButtonScale = 0.11111111f; + // Switch to scire menu button + sMainMenuButtons[MENU_BUTTON_COPY_CHECK_SCORE] = spawn_object_rel_with_rot( + copyButton, MODEL_MAIN_MENU_GREEN_SCORE_BUTTON, bhvMenuButton, 0, -388, -100, 0, -0x8000, 0); + sMainMenuButtons[MENU_BUTTON_COPY_CHECK_SCORE]->oMenuButtonScale = 0.11111111f; + // Switch to erase menu button + sMainMenuButtons[MENU_BUTTON_COPY_ERASE_FILE] = spawn_object_rel_with_rot( + copyButton, MODEL_MAIN_MENU_RED_ERASE_BUTTON, bhvMenuButton, -711, -388, -100, 0, -0x8000, 0); + sMainMenuButtons[MENU_BUTTON_COPY_ERASE_FILE]->oMenuButtonScale = 0.11111111f; +} + +/** + * Copy Menu phase actions that handles what to do when a file button is clicked. + */ +static void copy_action_file_button(struct Object *copyButton, s32 copyFileButtonID) { + switch (copyButton->oMenuButtonActionPhase) { + case COPY_PHASE_MAIN: // Copy Menu Main Phase + if (sAllFilesExist == TRUE) { // Don't enable copy if all save files exists + return; + } + if (save_file_exists(copyFileButtonID - MENU_BUTTON_COPY_MIN) == TRUE) { + // If clicked in a existing save file, ask where it wants to copy + play_sound(SOUND_MENU_CLICK_FILE_SELECT, gDefaultSoundArgs); + sMainMenuButtons[copyFileButtonID]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN; + sSelectedFileIndex = copyFileButtonID - MENU_BUTTON_COPY_MIN; + copyButton->oMenuButtonActionPhase = COPY_PHASE_COPY_WHERE; + sFadeOutText = TRUE; + sMainMenuTimer = 0; + } else { + // If clicked in a non-existing save file, play buzz sound + play_sound(SOUND_MENU_CAMERA_BUZZ, gDefaultSoundArgs); + sMainMenuButtons[copyFileButtonID]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN_OUT; + if (sMainMenuTimer >= 21) { + sFadeOutText = TRUE; + sMainMenuTimer = 0; + } + } + break; + case COPY_PHASE_COPY_WHERE: // Copy Menu "COPY IT TO WHERE?" Phase (after a file is selected) + sMainMenuButtons[copyFileButtonID]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN_OUT; + if (save_file_exists(copyFileButtonID - MENU_BUTTON_COPY_MIN) == FALSE) { + // If clicked in a non-existing save file, copy the file + play_sound(SOUND_MENU_STAR_SOUND, gDefaultSoundArgs); + copyButton->oMenuButtonActionPhase = COPY_PHASE_COPY_COMPLETE; + sFadeOutText = TRUE; + sMainMenuTimer = 0; + save_file_copy(sSelectedFileIndex, copyFileButtonID - MENU_BUTTON_COPY_MIN); + sMainMenuButtons[copyFileButtonID]->header.gfx.sharedChild = + gLoadedGraphNodes[MODEL_MAIN_MENU_MARIO_SAVE_BUTTON_FADE]; + sMainMenuButtons[copyFileButtonID - MENU_BUTTON_COPY_MIN]->header.gfx.sharedChild = + gLoadedGraphNodes[MODEL_MAIN_MENU_MARIO_SAVE_BUTTON_FADE]; + } else { + // If clicked in a existing save file, play buzz sound + if (MENU_BUTTON_COPY_FILE_A + sSelectedFileIndex == copyFileButtonID) { + play_sound(SOUND_MENU_CAMERA_BUZZ, gDefaultSoundArgs); + sMainMenuButtons[MENU_BUTTON_COPY_FILE_A + sSelectedFileIndex]->oMenuButtonState = + MENU_BUTTON_STATE_ZOOM_OUT; + copyButton->oMenuButtonActionPhase = COPY_PHASE_MAIN; + sFadeOutText = TRUE; + return; + } + if (sMainMenuTimer >= 21) { + sFadeOutText = TRUE; + sMainMenuTimer = 0; + } + } + break; + } +} + +/** + * In the copy menu, checks if a button was clicked to play a sound, button state and other functions. + */ +static void check_copy_menu_clicked_buttons(struct Object *copyButton) { + if (copyButton->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { + s32 buttonID; + // Configure copy menu button group + for (buttonID = MENU_BUTTON_COPY_MIN; buttonID < MENU_BUTTON_COPY_MAX; buttonID++) { + s16 buttonX = sMainMenuButtons[buttonID]->oPosX; + s16 buttonY = sMainMenuButtons[buttonID]->oPosY; + + if (check_clicked_button(buttonX, buttonY, 22.0f) == TRUE) { + // If menu button clicked, select it + if (buttonID == MENU_BUTTON_COPY_RETURN || buttonID == MENU_BUTTON_COPY_CHECK_SCORE + || buttonID == MENU_BUTTON_COPY_ERASE_FILE) { + if (copyButton->oMenuButtonActionPhase == COPY_PHASE_MAIN) { + play_sound(SOUND_MENU_CLICK_FILE_SELECT, gDefaultSoundArgs); + sMainMenuButtons[buttonID]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN_OUT; + sSelectedButtonID = buttonID; + } + } + else { + // Check if a file button is clicked to play a copy action + if (sMainMenuButtons[buttonID]->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT + && sMainMenuTimer >= 31) { + copy_action_file_button(copyButton, buttonID); + } + } + sCurrentMenuLevel = MENU_LAYER_SUBMENU; + break; + } + } + // After copy is complete, return to main copy phase + if (copyButton->oMenuButtonActionPhase == COPY_PHASE_COPY_COMPLETE && sMainMenuTimer >= 31) { + copyButton->oMenuButtonActionPhase = COPY_PHASE_MAIN; + sMainMenuButtons[MENU_BUTTON_COPY_MIN + sSelectedFileIndex]->oMenuButtonState = + MENU_BUTTON_STATE_ZOOM_OUT; + } + } +} + +/** + * Render buttons for the erase menu. + * Also check if the save file exists to render a different Mario button. + */ +static void render_erase_menu_buttons(struct Object *eraseButton) { + // File A + if (save_file_exists(SAVE_FILE_A) == TRUE) { + sMainMenuButtons[MENU_BUTTON_ERASE_FILE_A] = + spawn_object_rel_with_rot(eraseButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, + 711, 311, -100, 0, -0x8000, 0); + } else { + sMainMenuButtons[MENU_BUTTON_ERASE_FILE_A] = + spawn_object_rel_with_rot(eraseButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, 711, + 311, -100, 0, -0x8000, 0); + } + sMainMenuButtons[MENU_BUTTON_ERASE_FILE_A]->oMenuButtonScale = 0.11111111f; + // File B + if (save_file_exists(SAVE_FILE_B) == TRUE) { + sMainMenuButtons[MENU_BUTTON_ERASE_FILE_B] = + spawn_object_rel_with_rot(eraseButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, + -166, 311, -100, 0, -0x8000, 0); + } else { + sMainMenuButtons[MENU_BUTTON_ERASE_FILE_B] = + spawn_object_rel_with_rot(eraseButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, + -166, 311, -100, 0, -0x8000, 0); + } + sMainMenuButtons[MENU_BUTTON_ERASE_FILE_B]->oMenuButtonScale = 0.11111111f; + // File C + if (save_file_exists(SAVE_FILE_C) == TRUE) { + sMainMenuButtons[MENU_BUTTON_ERASE_FILE_C] = spawn_object_rel_with_rot( + eraseButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, 711, 0, -100, 0, -0x8000, 0); + } else { + sMainMenuButtons[MENU_BUTTON_ERASE_FILE_C] = spawn_object_rel_with_rot( + eraseButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, 711, 0, -100, 0, -0x8000, 0); + } + sMainMenuButtons[MENU_BUTTON_ERASE_FILE_C]->oMenuButtonScale = 0.11111111f; + // File D + if (save_file_exists(SAVE_FILE_D) == TRUE) { + sMainMenuButtons[MENU_BUTTON_ERASE_FILE_D] = + spawn_object_rel_with_rot(eraseButton, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON, bhvMenuButton, + -166, 0, -100, 0, -0x8000, 0); + } else { + sMainMenuButtons[MENU_BUTTON_ERASE_FILE_D] = spawn_object_rel_with_rot( + eraseButton, MODEL_MAIN_MENU_MARIO_NEW_BUTTON, bhvMenuButton, -166, 0, -100, 0, -0x8000, 0); + } + sMainMenuButtons[MENU_BUTTON_ERASE_FILE_D]->oMenuButtonScale = 0.11111111f; + // Return to main menu button + sMainMenuButtons[MENU_BUTTON_ERASE_RETURN] = spawn_object_rel_with_rot( + eraseButton, MODEL_MAIN_MENU_YELLOW_FILE_BUTTON, bhvMenuButton, 711, -388, -100, 0, -0x8000, 0); + sMainMenuButtons[MENU_BUTTON_ERASE_RETURN]->oMenuButtonScale = 0.11111111f; + // Switch to score menu button + sMainMenuButtons[MENU_BUTTON_ERASE_CHECK_SCORE] = spawn_object_rel_with_rot( + eraseButton, MODEL_MAIN_MENU_GREEN_SCORE_BUTTON, bhvMenuButton, 0, -388, -100, 0, -0x8000, 0); + sMainMenuButtons[MENU_BUTTON_ERASE_CHECK_SCORE]->oMenuButtonScale = 0.11111111f; + // Switch to copy menu button + sMainMenuButtons[MENU_BUTTON_ERASE_COPY_FILE] = spawn_object_rel_with_rot( + eraseButton, MODEL_MAIN_MENU_BLUE_COPY_BUTTON, bhvMenuButton, -711, -388, -100, 0, -0x8000, 0); + sMainMenuButtons[MENU_BUTTON_ERASE_COPY_FILE]->oMenuButtonScale = 0.11111111f; +} + +/** + * Erase Menu phase actions that handles what to do when a file button is clicked. + */ +static void erase_action_file_button(struct Object *eraseButton, s32 eraseFileButtonID) { + switch (eraseButton->oMenuButtonActionPhase) { + case ERASE_PHASE_MAIN: // Erase Menu Main Phase + if (save_file_exists(eraseFileButtonID - MENU_BUTTON_ERASE_MIN) == TRUE) { + // If clicked in a existing save file, ask if it wants to delete it + play_sound(SOUND_MENU_CLICK_FILE_SELECT, gDefaultSoundArgs); + sMainMenuButtons[eraseFileButtonID]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN; + sSelectedFileIndex = eraseFileButtonID - MENU_BUTTON_ERASE_MIN; + eraseButton->oMenuButtonActionPhase = ERASE_PHASE_PROMPT; + sFadeOutText = TRUE; + sMainMenuTimer = 0; + } else { + // If clicked in a non-existing save file, play buzz sound + play_sound(SOUND_MENU_CAMERA_BUZZ, gDefaultSoundArgs); + sMainMenuButtons[eraseFileButtonID]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN_OUT; + if (sMainMenuTimer >= 21) { + sFadeOutText = TRUE; + sMainMenuTimer = 0; + } + } + break; + case ERASE_PHASE_PROMPT: // Erase Menu "SURE? YES NO" Phase (after a file is selected) + if (MENU_BUTTON_ERASE_MIN + sSelectedFileIndex == eraseFileButtonID) { + // If clicked in a existing save file, play click sound and zoom out button + // Note: The prompt functions are actually called when the ERASE_MSG_PROMPT + // message is displayed with print_erase_menu_prompt + play_sound(SOUND_MENU_CLICK_FILE_SELECT, gDefaultSoundArgs); + sMainMenuButtons[MENU_BUTTON_ERASE_MIN + sSelectedFileIndex]->oMenuButtonState = + MENU_BUTTON_STATE_ZOOM_OUT; + eraseButton->oMenuButtonActionPhase = ERASE_PHASE_MAIN; + sFadeOutText = TRUE; + } + break; + } +} + +/** + * In the erase menu, checks if a button was clicked to play a sound, button state and other functions. + */ +static void check_erase_menu_clicked_buttons(struct Object *eraseButton) { + if (eraseButton->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { + s32 buttonID; + // Configure erase menu button group + for (buttonID = MENU_BUTTON_ERASE_MIN; buttonID < MENU_BUTTON_ERASE_MAX; buttonID++) { + s16 buttonX = sMainMenuButtons[buttonID]->oPosX; + s16 buttonY = sMainMenuButtons[buttonID]->oPosY; + + if (check_clicked_button(buttonX, buttonY, 22.0f) == TRUE) { + // If menu button clicked, select it + if (buttonID == MENU_BUTTON_ERASE_RETURN || buttonID == MENU_BUTTON_ERASE_CHECK_SCORE + || buttonID == MENU_BUTTON_ERASE_COPY_FILE) { + if (eraseButton->oMenuButtonActionPhase == ERASE_PHASE_MAIN) { + play_sound(SOUND_MENU_CLICK_FILE_SELECT, gDefaultSoundArgs); + sMainMenuButtons[buttonID]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN_OUT; + sSelectedButtonID = buttonID; + } + } + else { + // Check if a file button is clicked to play an erase action + if (sMainMenuTimer >= 31) { + erase_action_file_button(eraseButton, buttonID); + } + } + sCurrentMenuLevel = MENU_LAYER_SUBMENU; + break; + } + } + // After erase is complete, return to main erase phase + if (eraseButton->oMenuButtonActionPhase == ERASE_PHASE_MARIO_ERASED && sMainMenuTimer >= 31) { + eraseButton->oMenuButtonActionPhase = ERASE_PHASE_MAIN; + sMainMenuButtons[MENU_BUTTON_ERASE_MIN + sSelectedFileIndex]->oMenuButtonState = + MENU_BUTTON_STATE_ZOOM_OUT; + } + } +} + +/** + * Render buttons for the sound mode menu. + */ +static void render_sound_mode_menu_buttons(struct Object *soundModeButton) { + // Stereo option button + sMainMenuButtons[MENU_BUTTON_STEREO] = spawn_object_rel_with_rot( + soundModeButton, MODEL_MAIN_MENU_GENERIC_BUTTON, bhvMenuButton, 533, 0, -100, 0, -0x8000, 0); + sMainMenuButtons[MENU_BUTTON_STEREO]->oMenuButtonScale = 0.11111111f; + // Mono option button + sMainMenuButtons[MENU_BUTTON_MONO] = spawn_object_rel_with_rot( + soundModeButton, MODEL_MAIN_MENU_GENERIC_BUTTON, bhvMenuButton, 0, 0, -100, 0, -0x8000, 0); + sMainMenuButtons[MENU_BUTTON_MONO]->oMenuButtonScale = 0.11111111f; + // Headset option button + sMainMenuButtons[MENU_BUTTON_HEADSET] = spawn_object_rel_with_rot( + soundModeButton, MODEL_MAIN_MENU_GENERIC_BUTTON, bhvMenuButton, -533, 0, -100, 0, -0x8000, 0); + sMainMenuButtons[MENU_BUTTON_HEADSET]->oMenuButtonScale = 0.11111111f; + // Zoom in current selection + sMainMenuButtons[MENU_BUTTON_SOUND_MIN + sSoundMode]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN; +} + +/** + * In the sound mode menu, checks if a button was clicked to change sound mode & button state. + */ +static void check_sound_mode_menu_clicked_buttons(struct Object *soundModeButton) { + if (soundModeButton->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { + s32 buttonID; + // Configure sound mode menu button group + for (buttonID = MENU_BUTTON_SOUND_MIN; buttonID < MENU_BUTTON_SOUND_MAX; buttonID++) { + s16 buttonX = sMainMenuButtons[buttonID]->oPosX; + s16 buttonY = sMainMenuButtons[buttonID]->oPosY; + + if (check_clicked_button(buttonX, buttonY, 22.0f) == TRUE) { + // If sound mode button clicked, select it + // The check will always be true because of the group configured above + if (buttonID == MENU_BUTTON_STEREO || buttonID == MENU_BUTTON_MONO + || buttonID == MENU_BUTTON_HEADSET) { + if (soundModeButton->oMenuButtonActionPhase == SOUND_MODE_PHASE_MAIN) { + play_sound(SOUND_MENU_CLICK_FILE_SELECT, gDefaultSoundArgs); + sMainMenuButtons[buttonID]->oMenuButtonState = MENU_BUTTON_STATE_ZOOM_IN_OUT; + sSelectedButtonID = buttonID; + sSoundMode = buttonID - MENU_BUTTON_SOUND_MIN; + save_file_set_sound_mode(sSoundMode); + } + } + sCurrentMenuLevel = MENU_LAYER_SUBMENU; + break; + } + } + } +} + +/** + * Loads a save file selected after it goes into a full screen state + * retuning sSelectedFileNum to a save value defined in fileNum. + */ +static void load_main_menu_save_file(struct Object *fileButton, s32 fileNum) { + if (fileButton->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { + sSelectedFileNum = fileNum; + } +} + +/** + * Returns from the previous menu back to the main menu using + * the return button (or sound mode) as source button. + */ +static void return_to_main_menu(s16 prevMenuButtonID, struct Object *sourceButton) { + s32 buttonID; + // If the source button is in default state and the previous menu in full screen, + // play zoom out sound and shrink previous menu + if (sourceButton->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT + && sMainMenuButtons[prevMenuButtonID]->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { + play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gDefaultSoundArgs); + sMainMenuButtons[prevMenuButtonID]->oMenuButtonState = MENU_BUTTON_STATE_SHRINKING; + sCurrentMenuLevel = MENU_LAYER_MAIN; + } + // If the previous button is in default state, return back to the main menu + if (sMainMenuButtons[prevMenuButtonID]->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT) { + sSelectedButtonID = MENU_BUTTON_NONE; + // Hide buttons of corresponding button menu groups + if (prevMenuButtonID == MENU_BUTTON_SCORE) { + for (buttonID = MENU_BUTTON_SCORE_MIN; buttonID < MENU_BUTTON_SCORE_MAX; buttonID++) { + mark_obj_for_deletion(sMainMenuButtons[buttonID]); + } + } + if (prevMenuButtonID == MENU_BUTTON_COPY) { + for (buttonID = MENU_BUTTON_COPY_MIN; buttonID < MENU_BUTTON_COPY_MAX; buttonID++) { + mark_obj_for_deletion(sMainMenuButtons[buttonID]); + } + } + if (prevMenuButtonID == MENU_BUTTON_ERASE) { + for (buttonID = MENU_BUTTON_ERASE_MIN; buttonID < MENU_BUTTON_ERASE_MAX; buttonID++) { + mark_obj_for_deletion(sMainMenuButtons[buttonID]); + } + } + if (prevMenuButtonID == MENU_BUTTON_SOUND_MODE) { + for (buttonID = MENU_BUTTON_SOUND_MIN; buttonID < MENU_BUTTON_SOUND_MAX; buttonID++) { + mark_obj_for_deletion(sMainMenuButtons[buttonID]); + } + } + } +} + +/** + * Loads score menu from the previous menu using "CHECK SCORE" as source button. + */ +static void load_score_menu_from_submenu(s16 prevMenuButtonID, struct Object *sourceButton) { + s32 buttonID; + // If the source button is in default state and the previous menu in full screen, + // play zoom out sound and shrink previous menu + if (sourceButton->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT + && sMainMenuButtons[prevMenuButtonID]->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { + play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gDefaultSoundArgs); + sMainMenuButtons[prevMenuButtonID]->oMenuButtonState = MENU_BUTTON_STATE_SHRINKING; + sCurrentMenuLevel = MENU_LAYER_MAIN; + } + // If the previous button is in default state + if (sMainMenuButtons[prevMenuButtonID]->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT) { + // Hide buttons of corresponding button menu groups + if (prevMenuButtonID == MENU_BUTTON_SCORE) //! Not possible, this is checking if the score menu + //! was opened from the score menu! + { + for (buttonID = MENU_BUTTON_SCORE_MIN; buttonID < MENU_BUTTON_SCORE_MAX; buttonID++) { + mark_obj_for_deletion(sMainMenuButtons[buttonID]); + } + } + if (prevMenuButtonID == MENU_BUTTON_COPY) { + for (buttonID = MENU_BUTTON_COPY_MIN; buttonID < MENU_BUTTON_COPY_MAX; buttonID++) { + mark_obj_for_deletion(sMainMenuButtons[buttonID]); + } + } + if (prevMenuButtonID == MENU_BUTTON_ERASE) { + for (buttonID = MENU_BUTTON_ERASE_MIN; buttonID < MENU_BUTTON_ERASE_MAX; buttonID++) { + mark_obj_for_deletion(sMainMenuButtons[buttonID]); + } + } + // Play zoom in sound, select score menu and render it's buttons + sSelectedButtonID = MENU_BUTTON_SCORE; + play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gDefaultSoundArgs); + sMainMenuButtons[MENU_BUTTON_SCORE]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; + render_score_menu_buttons(sMainMenuButtons[MENU_BUTTON_SCORE]); + } +} + +/** + * Loads copy menu from the previous menu using "COPY FILE" as source button. + */ +static void load_copy_menu_from_submenu(s16 prevMenuButtonID, struct Object *sourceButton) { + s32 buttonID; + // If the source button is in default state and the previous menu in full screen, + // play zoom out sound and shrink previous menu + if (sourceButton->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT + && sMainMenuButtons[prevMenuButtonID]->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { + play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gDefaultSoundArgs); + sMainMenuButtons[prevMenuButtonID]->oMenuButtonState = MENU_BUTTON_STATE_SHRINKING; + sCurrentMenuLevel = MENU_LAYER_MAIN; + } + // If the previous button is in default state + if (sMainMenuButtons[prevMenuButtonID]->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT) { + // Hide buttons of corresponding button menu groups + if (prevMenuButtonID == MENU_BUTTON_SCORE) { + for (buttonID = MENU_BUTTON_SCORE_MIN; buttonID < MENU_BUTTON_SCORE_MAX; buttonID++) { + mark_obj_for_deletion(sMainMenuButtons[buttonID]); + } + } + if (prevMenuButtonID == MENU_BUTTON_COPY) //! Not possible, this is checking if the copy menu + //! was opened from the copy menu! + { + for (buttonID = MENU_BUTTON_COPY_MIN; buttonID < MENU_BUTTON_COPY_MAX; buttonID++) { + mark_obj_for_deletion(sMainMenuButtons[buttonID]); + } + } + if (prevMenuButtonID == MENU_BUTTON_ERASE) { + for (buttonID = MENU_BUTTON_ERASE_MIN; buttonID < MENU_BUTTON_ERASE_MAX; buttonID++) { + mark_obj_for_deletion(sMainMenuButtons[buttonID]); + } + } + // Play zoom in sound, select copy menu and render it's buttons + sSelectedButtonID = MENU_BUTTON_COPY; + play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gDefaultSoundArgs); + sMainMenuButtons[MENU_BUTTON_COPY]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; + render_copy_menu_buttons(sMainMenuButtons[MENU_BUTTON_COPY]); + } +} + +/** + * Loads erase menu from the previous menu using "ERASE FILE" as source button. + */ +static void load_erase_menu_from_submenu(s16 prevMenuButtonID, struct Object *sourceButton) { + s32 buttonID; + // If the source button is in default state and the previous menu in full screen, + // play zoom out sound and shrink previous menu + if (sourceButton->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT + && sMainMenuButtons[prevMenuButtonID]->oMenuButtonState == MENU_BUTTON_STATE_FULLSCREEN) { + play_sound(SOUND_MENU_CAMERA_ZOOM_OUT, gDefaultSoundArgs); + sMainMenuButtons[prevMenuButtonID]->oMenuButtonState = MENU_BUTTON_STATE_SHRINKING; + sCurrentMenuLevel = MENU_LAYER_MAIN; + } + // If the previous button is in default state + if (sMainMenuButtons[prevMenuButtonID]->oMenuButtonState == MENU_BUTTON_STATE_DEFAULT) { + // Hide buttons of corresponding button menu groups + if (prevMenuButtonID == MENU_BUTTON_SCORE) { + for (buttonID = MENU_BUTTON_SCORE_MIN; buttonID < MENU_BUTTON_SCORE_MAX; buttonID++) { + mark_obj_for_deletion(sMainMenuButtons[buttonID]); + } + } + if (prevMenuButtonID == MENU_BUTTON_COPY) { + for (buttonID = MENU_BUTTON_COPY_MIN; buttonID < MENU_BUTTON_COPY_MAX; buttonID++) { + mark_obj_for_deletion(sMainMenuButtons[buttonID]); + } + } + if (prevMenuButtonID == MENU_BUTTON_ERASE) //! Not possible, this is checking if the erase menu + //! was opened from the erase menu! + { + for (buttonID = MENU_BUTTON_ERASE_MIN; buttonID < MENU_BUTTON_ERASE_MAX; buttonID++) { + mark_obj_for_deletion(sMainMenuButtons[buttonID]); + } + } + // Play zoom in sound, select erase menu and render it's buttons + sSelectedButtonID = MENU_BUTTON_ERASE; + play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gDefaultSoundArgs); + sMainMenuButtons[MENU_BUTTON_ERASE]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; + render_erase_menu_buttons(sMainMenuButtons[MENU_BUTTON_ERASE]); + } +} + + +/** + * Menu Buttons Menu Manager Initial Action + * Creates models of the buttons in the menu. For the Mario buttons it + * checks if a save file exists to render an specific button model for it. + * Unlike buttons on submenus, these are never hidden or recreated. + */ +void bhv_menu_button_manager_init(void) { + // File A + if (save_file_exists(SAVE_FILE_A) == TRUE) { + sMainMenuButtons[MENU_BUTTON_PLAY_FILE_A] = + spawn_object_rel_with_rot(gCurrentObject, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON_FADE, + bhvMenuButton, -6400, 2800, 0, 0, 0, 0); + } else { + sMainMenuButtons[MENU_BUTTON_PLAY_FILE_A] = + spawn_object_rel_with_rot(gCurrentObject, MODEL_MAIN_MENU_MARIO_NEW_BUTTON_FADE, + bhvMenuButton, -6400, 2800, 0, 0, 0, 0); + } + sMainMenuButtons[MENU_BUTTON_PLAY_FILE_A]->oMenuButtonScale = 1.0f; + // File B + if (save_file_exists(SAVE_FILE_B) == TRUE) { + sMainMenuButtons[MENU_BUTTON_PLAY_FILE_B] = + spawn_object_rel_with_rot(gCurrentObject, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON_FADE, + bhvMenuButton, 1500, 2800, 0, 0, 0, 0); + } else { + sMainMenuButtons[MENU_BUTTON_PLAY_FILE_B] = + spawn_object_rel_with_rot(gCurrentObject, MODEL_MAIN_MENU_MARIO_NEW_BUTTON_FADE, + bhvMenuButton, 1500, 2800, 0, 0, 0, 0); + } + sMainMenuButtons[MENU_BUTTON_PLAY_FILE_B]->oMenuButtonScale = 1.0f; + // File C + if (save_file_exists(SAVE_FILE_C) == TRUE) { + sMainMenuButtons[MENU_BUTTON_PLAY_FILE_C] = + spawn_object_rel_with_rot(gCurrentObject, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON_FADE, + bhvMenuButton, -6400, 0, 0, 0, 0, 0); + } else { + sMainMenuButtons[MENU_BUTTON_PLAY_FILE_C] = spawn_object_rel_with_rot( + gCurrentObject, MODEL_MAIN_MENU_MARIO_NEW_BUTTON_FADE, bhvMenuButton, -6400, 0, 0, 0, 0, 0); + } + sMainMenuButtons[MENU_BUTTON_PLAY_FILE_C]->oMenuButtonScale = 1.0f; + // File D + if (save_file_exists(SAVE_FILE_D) == TRUE) { + sMainMenuButtons[MENU_BUTTON_PLAY_FILE_D] = spawn_object_rel_with_rot( + gCurrentObject, MODEL_MAIN_MENU_MARIO_SAVE_BUTTON_FADE, bhvMenuButton, 1500, 0, 0, 0, 0, 0); + } else { + sMainMenuButtons[MENU_BUTTON_PLAY_FILE_D] = spawn_object_rel_with_rot( + gCurrentObject, MODEL_MAIN_MENU_MARIO_NEW_BUTTON_FADE, bhvMenuButton, 1500, 0, 0, 0, 0, 0); + } + sMainMenuButtons[MENU_BUTTON_PLAY_FILE_D]->oMenuButtonScale = 1.0f; + // Score menu button + sMainMenuButtons[MENU_BUTTON_SCORE] = spawn_object_rel_with_rot( + gCurrentObject, MODEL_MAIN_MENU_GREEN_SCORE_BUTTON, bhvMenuButton, -6400, -3500, 0, 0, 0, 0); + sMainMenuButtons[MENU_BUTTON_SCORE]->oMenuButtonScale = 1.0f; + // Copy menu button + sMainMenuButtons[MENU_BUTTON_COPY] = spawn_object_rel_with_rot( + gCurrentObject, MODEL_MAIN_MENU_BLUE_COPY_BUTTON, bhvMenuButton, -2134, -3500, 0, 0, 0, 0); + sMainMenuButtons[MENU_BUTTON_COPY]->oMenuButtonScale = 1.0f; + // Erase menu button + sMainMenuButtons[MENU_BUTTON_ERASE] = spawn_object_rel_with_rot( + gCurrentObject, MODEL_MAIN_MENU_RED_ERASE_BUTTON, bhvMenuButton, 2134, -3500, 0, 0, 0, 0); + sMainMenuButtons[MENU_BUTTON_ERASE]->oMenuButtonScale = 1.0f; + // Sound mode menu button + sMainMenuButtons[MENU_BUTTON_SOUND_MODE] = spawn_object_rel_with_rot( + gCurrentObject, MODEL_MAIN_MENU_PURPLE_SOUND_BUTTON, bhvMenuButton, 6400, -3500, 0, 0, 0, 0); + sMainMenuButtons[MENU_BUTTON_SOUND_MODE]->oMenuButtonScale = 1.0f; + + sTextBaseAlpha = 0; +} + +#ifdef VERSION_JP +#define SAVE_FILE_SOUND SOUND_MENU_STAR_SOUND +#else +#define SAVE_FILE_SOUND SOUND_MENU_STAR_SOUND_OKEY_DOKEY +#endif + +/** + * In the main menu, check if a button was clicked to play it's button growing state. + * Also play a sound and/or render buttons depending of the button ID selected. + */ +static void check_main_menu_clicked_buttons(void) { + // Sound mode menu is handled separately because the button ID for it + // is not grouped with the IDs of the other submenus. + if (check_clicked_button(sMainMenuButtons[MENU_BUTTON_SOUND_MODE]->oPosX, + sMainMenuButtons[MENU_BUTTON_SOUND_MODE]->oPosY, 200.0f) == TRUE) { + sMainMenuButtons[MENU_BUTTON_SOUND_MODE]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; + sSelectedButtonID = MENU_BUTTON_SOUND_MODE; + } else { + // Main Menu buttons + s8 buttonID; + // Configure Main Menu button group + for (buttonID = MENU_BUTTON_MAIN_MIN; buttonID < MENU_BUTTON_MAIN_MAX; buttonID++) { + s16 buttonX = sMainMenuButtons[buttonID]->oPosX; + s16 buttonY = sMainMenuButtons[buttonID]->oPosY; + + if (check_clicked_button(buttonX, buttonY, 200.0f) == TRUE) { + // If menu button clicked, select it + sMainMenuButtons[buttonID]->oMenuButtonState = MENU_BUTTON_STATE_GROWING; + sSelectedButtonID = buttonID; + break; + } + } + } + + // Play sound of the save file clicked + switch (sSelectedButtonID) { + case MENU_BUTTON_PLAY_FILE_A: + play_sound(SAVE_FILE_SOUND, gDefaultSoundArgs); + break; + case MENU_BUTTON_PLAY_FILE_B: + play_sound(SAVE_FILE_SOUND, gDefaultSoundArgs); + break; + case MENU_BUTTON_PLAY_FILE_C: + play_sound(SAVE_FILE_SOUND, gDefaultSoundArgs); + break; + case MENU_BUTTON_PLAY_FILE_D: + play_sound(SAVE_FILE_SOUND, gDefaultSoundArgs); + break; + // Play sound of the button clicked and render buttons of that menu. + case MENU_BUTTON_SCORE: + play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gDefaultSoundArgs); + render_score_menu_buttons(sMainMenuButtons[MENU_BUTTON_SCORE]); + break; + case MENU_BUTTON_COPY: + play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gDefaultSoundArgs); + render_copy_menu_buttons(sMainMenuButtons[MENU_BUTTON_COPY]); + break; + case MENU_BUTTON_ERASE: + play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gDefaultSoundArgs); + render_erase_menu_buttons(sMainMenuButtons[MENU_BUTTON_ERASE]); + break; + case MENU_BUTTON_SOUND_MODE: + play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gDefaultSoundArgs); + render_sound_mode_menu_buttons(sMainMenuButtons[MENU_BUTTON_SOUND_MODE]); + break; + } +} +#undef SAVE_FILE_SOUND + +/** + * Menu Buttons Menu Manager Loop Action + * Calls a menu function depending of the button chosen. + * sSelectedButtonID is MENU_BUTTON_NONE when the file select + * is loaded, and that checks what buttonID is clicked in the main menu. + */ +void bhv_menu_button_manager_loop(void) { + switch (sSelectedButtonID) { + case MENU_BUTTON_NONE: + check_main_menu_clicked_buttons(); + break; + case MENU_BUTTON_PLAY_FILE_A: + load_main_menu_save_file(sMainMenuButtons[MENU_BUTTON_PLAY_FILE_A], 1); + break; + case MENU_BUTTON_PLAY_FILE_B: + load_main_menu_save_file(sMainMenuButtons[MENU_BUTTON_PLAY_FILE_B], 2); + break; + case MENU_BUTTON_PLAY_FILE_C: + load_main_menu_save_file(sMainMenuButtons[MENU_BUTTON_PLAY_FILE_C], 3); + break; + case MENU_BUTTON_PLAY_FILE_D: + load_main_menu_save_file(sMainMenuButtons[MENU_BUTTON_PLAY_FILE_D], 4); + break; + case MENU_BUTTON_SCORE: + check_score_menu_clicked_buttons(sMainMenuButtons[MENU_BUTTON_SCORE]); + break; + case MENU_BUTTON_COPY: + check_copy_menu_clicked_buttons(sMainMenuButtons[MENU_BUTTON_COPY]); + break; + case MENU_BUTTON_ERASE: + check_erase_menu_clicked_buttons(sMainMenuButtons[MENU_BUTTON_ERASE]); + break; + + case MENU_BUTTON_SCORE_FILE_A: + exit_score_file_to_score_menu(sMainMenuButtons[MENU_BUTTON_SCORE_FILE_A], MENU_BUTTON_SCORE); + break; + case MENU_BUTTON_SCORE_FILE_B: + exit_score_file_to_score_menu(sMainMenuButtons[MENU_BUTTON_SCORE_FILE_B], MENU_BUTTON_SCORE); + break; + case MENU_BUTTON_SCORE_FILE_C: + exit_score_file_to_score_menu(sMainMenuButtons[MENU_BUTTON_SCORE_FILE_C], MENU_BUTTON_SCORE); + break; + case MENU_BUTTON_SCORE_FILE_D: + exit_score_file_to_score_menu(sMainMenuButtons[MENU_BUTTON_SCORE_FILE_D], MENU_BUTTON_SCORE); + break; + case MENU_BUTTON_SCORE_RETURN: + return_to_main_menu(MENU_BUTTON_SCORE, sMainMenuButtons[MENU_BUTTON_SCORE_RETURN]); + break; + case MENU_BUTTON_SCORE_COPY_FILE: + load_copy_menu_from_submenu(MENU_BUTTON_SCORE, + sMainMenuButtons[MENU_BUTTON_SCORE_COPY_FILE]); + break; + case MENU_BUTTON_SCORE_ERASE_FILE: + load_erase_menu_from_submenu(MENU_BUTTON_SCORE, + sMainMenuButtons[MENU_BUTTON_SCORE_ERASE_FILE]); + break; + + case MENU_BUTTON_COPY_FILE_A: + break; + case MENU_BUTTON_COPY_FILE_B: + break; + case MENU_BUTTON_COPY_FILE_C: + break; + case MENU_BUTTON_COPY_FILE_D: + break; + case MENU_BUTTON_COPY_RETURN: + return_to_main_menu(MENU_BUTTON_COPY, sMainMenuButtons[MENU_BUTTON_COPY_RETURN]); + break; + case MENU_BUTTON_COPY_CHECK_SCORE: + load_score_menu_from_submenu(MENU_BUTTON_COPY, + sMainMenuButtons[MENU_BUTTON_COPY_CHECK_SCORE]); + break; + case MENU_BUTTON_COPY_ERASE_FILE: + load_erase_menu_from_submenu(MENU_BUTTON_COPY, + sMainMenuButtons[MENU_BUTTON_COPY_ERASE_FILE]); + break; + + case MENU_BUTTON_ERASE_FILE_A: + break; + case MENU_BUTTON_ERASE_FILE_B: + break; + case MENU_BUTTON_ERASE_FILE_C: + break; + case MENU_BUTTON_ERASE_FILE_D: + break; + case MENU_BUTTON_ERASE_RETURN: + return_to_main_menu(MENU_BUTTON_ERASE, sMainMenuButtons[MENU_BUTTON_ERASE_RETURN]); + break; + case MENU_BUTTON_ERASE_CHECK_SCORE: + load_score_menu_from_submenu(MENU_BUTTON_ERASE, + sMainMenuButtons[MENU_BUTTON_ERASE_CHECK_SCORE]); + break; + case MENU_BUTTON_ERASE_COPY_FILE: + load_copy_menu_from_submenu(MENU_BUTTON_ERASE, + sMainMenuButtons[MENU_BUTTON_ERASE_COPY_FILE]); + break; + + case MENU_BUTTON_SOUND_MODE: + check_sound_mode_menu_clicked_buttons(sMainMenuButtons[MENU_BUTTON_SOUND_MODE]); + break; + case MENU_BUTTON_STEREO: + return_to_main_menu(MENU_BUTTON_SOUND_MODE, sMainMenuButtons[MENU_BUTTON_STEREO]); + break; + case MENU_BUTTON_MONO: + return_to_main_menu(MENU_BUTTON_SOUND_MODE, sMainMenuButtons[MENU_BUTTON_MONO]); + break; + case MENU_BUTTON_HEADSET: + return_to_main_menu(MENU_BUTTON_SOUND_MODE, sMainMenuButtons[MENU_BUTTON_HEADSET]); + break; + } + + sClickPos[0] = -10000; + sClickPos[1] = -10000; +} + +/** + * Cursor function that handles button inputs. + * If the cursor is clicked, sClickPos uses the same value as sCursorPos. + */ +static void handle_cursor_button_input(void) { + // If scoring a file, pressing A just changes the coin score mode. + if (sSelectedButtonID == MENU_BUTTON_SCORE_FILE_A || sSelectedButtonID == MENU_BUTTON_SCORE_FILE_B + || sSelectedButtonID == MENU_BUTTON_SCORE_FILE_C + || sSelectedButtonID == MENU_BUTTON_SCORE_FILE_D) { + if (gPlayer3Controller->buttonPressed & (B_BUTTON | START_BUTTON)) { + sClickPos[0] = sCursorPos[0]; + sClickPos[1] = sCursorPos[1]; + sCursorClickingTimer = 1; + } else if (gPlayer3Controller->buttonPressed & A_BUTTON) { + sScoreFileCoinScoreMode = 1 - sScoreFileCoinScoreMode; + play_sound(SOUND_MENU_CLICK_FILE_SELECT, gDefaultSoundArgs); + } + } else { // If cursor is clicked + if (gPlayer3Controller->buttonPressed & (A_BUTTON | B_BUTTON | START_BUTTON)) { + sClickPos[0] = sCursorPos[0]; + sClickPos[1] = sCursorPos[1]; + sCursorClickingTimer = 1; + } + } +} + +/** + * Cursor function that handles analog stick input and button presses with a function near the end. + */ +static void handle_controller_cursor_input(void) { + s16 rawStickX = gPlayer3Controller->rawStickX; + s16 rawStickY = gPlayer3Controller->rawStickY; + + // Handle deadzone + if (rawStickY > -2 && rawStickY < 2) { + rawStickY = 0; + } + if (rawStickX > -2 && rawStickX < 2) { + rawStickX = 0; + } + + // Move cursor + sCursorPos[0] += rawStickX / 8; + sCursorPos[1] += rawStickY / 8; + + // Stop cursor from going offscreen + if (sCursorPos[0] > 132.0f) { + sCursorPos[0] = 132.0f; + } + if (sCursorPos[0] < -132.0f) { + sCursorPos[0] = -132.0f; + } + + if (sCursorPos[1] > 90.0f) { + sCursorPos[1] = 90.0f; + } + if (sCursorPos[1] < -90.0f) { + sCursorPos[1] = -90.0f; + } + + if (sCursorClickingTimer == 0) { + handle_cursor_button_input(); + } +} + +/** + * Prints the cursor (Mario Hand, different to the one in the Mario screen) + * and loads it's controller inputs in handle_controller_cursor_input + * to be usable on the file select. + */ +static void print_menu_cursor(void) { + handle_controller_cursor_input(); + create_dl_translation_matrix(MENU_MTX_PUSH, sCursorPos[0] + 160.0f - 5.0, sCursorPos[1] + 120.0f - 25.0, 0.0f); + // Get the right graphic to use for the cursor. + if (sCursorClickingTimer == 0) + // Idle + gSPDisplayList(gDisplayListHead++, dl_menu_idle_hand); + if (sCursorClickingTimer != 0) + // Grabbing + gSPDisplayList(gDisplayListHead++, dl_menu_grabbing_hand); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + if (sCursorClickingTimer != 0) { + sCursorClickingTimer++; // This is a very strange way to implement a timer? It counts up and + // then resets to 0 instead of just counting down to 0. + if (sCursorClickingTimer == 5) { + sCursorClickingTimer = 0; + } + } +} + +/** + * Prints a hud string depending of the hud table list defined with text fade properties. + */ +static void print_hud_lut_string_fade(s8 hudLUT, s16 x, s16 y, const unsigned char *text) { + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha - sTextFadeAlpha); + print_hud_lut_string(hudLUT, x, y, text); + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); +} + +/** + * Prints a generic white string with text fade properties. + */ +static void print_generic_string_fade(s16 x, s16 y, const unsigned char *text) { + gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha - sTextFadeAlpha); + print_generic_string(x, y, text); + gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); +} + +/** + * Updates text fade at the top of a menu. + */ +static s32 update_text_fade_out(void) { + if (sFadeOutText == TRUE) { + sTextFadeAlpha += 50; + if (sTextFadeAlpha == 250) { + sFadeOutText = FALSE; + return TRUE; + } + } else { + if (sTextFadeAlpha > 0) { + sTextFadeAlpha -= 50; + } + } + return FALSE; +} + +/** + * Prints the amount of stars of a save file. + * If a save doesn't exist, print "NEW" instead. + */ +static void print_save_file_star_count(s8 fileIndex, s16 x, s16 y) { + u8 starCountText[4]; + s8 offset = 0; + s16 starCount; + + if (save_file_exists(fileIndex) == TRUE) { + starCount = save_file_get_total_star_count(fileIndex, 0, 24); + // Print star icon + print_hud_lut_string(HUD_LUT_GLOBAL, x, y, starIcon); + // If star count is less than 100, print x icon and move + // the star count text one digit to the right. + if (starCount < 100) { + print_hud_lut_string(HUD_LUT_GLOBAL, x + 16, y, xIcon); + offset = 16; + } + // Print star count + int_to_str(starCount, starCountText); + print_hud_lut_string(HUD_LUT_GLOBAL, x + offset + 16, y, starCountText); + } else { + // Print "new" text + print_hud_lut_string(HUD_LUT_GLOBAL, x, y, textNew); + } +} + +#ifdef VERSION_JP +#define SELECT_FILE_X 96 +#define SCORE_X 50 +#define COPY_X 115 +#define ERASE_X 180 +#define SOUNDMODE_X1 235 +#else +#define SELECT_FILE_X 93 +#define SCORE_X 52 +#define COPY_X 117 +#define ERASE_X 177 +#define SOUNDMODE_X1 sSoundTextX +#endif + +/** + * Prints main menu strings that shows on the yellow background menu screen. + */ +static void print_main_menu_strings(void) { + // Print "SELECT FILE" text + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + print_hud_lut_string(HUD_LUT_DIFF, SELECT_FILE_X, 35, textSelectFile); + // Print file star counts + print_save_file_star_count(SAVE_FILE_A, 92, 78); + print_save_file_star_count(SAVE_FILE_B, 209, 78); + print_save_file_star_count(SAVE_FILE_C, 92, 118); + print_save_file_star_count(SAVE_FILE_D, 209, 118); + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); + // Print menu names + gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + print_generic_string(SCORE_X, 39, textScore); + print_generic_string(COPY_X, 39, textCopy); + print_generic_string(ERASE_X, 39, textErase); +#ifndef VERSION_JP + sSoundTextX = get_str_x_pos_from_center(254, textSoundModes[sSoundMode], 10.0f); +#endif + print_generic_string(SOUNDMODE_X1, 39, textSoundModes[sSoundMode]); + gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); + // Print file names + gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + print_menu_generic_string(92, 65, textMarioA); + print_menu_generic_string(207, 65, textMarioB); + print_menu_generic_string(92, 105, textMarioC); + print_menu_generic_string(207, 105, textMarioD); + gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_end); +} + +#ifdef VERSION_JP +#define CHECK_FILE_X 90 +#define NOSAVE_DATA_X1 90 +#else +#define CHECK_FILE_X 95 +#define NOSAVE_DATA_X1 99 +#endif + +/** + * Defines IDs for the top message of the score menu and displays it if the ID is called in messageID. + */ +static void score_menu_display_message(s8 messageID) { + switch (messageID) { + case SCORE_MSG_CHECK_FILE: + print_hud_lut_string_fade(HUD_LUT_DIFF, CHECK_FILE_X, 35, textCheckFile); + break; + case SCORE_MSG_NOSAVE_DATA: + print_generic_string_fade(NOSAVE_DATA_X1, 190, textNoSavedDataExists); + break; + } +} + +#ifdef VERSION_JP +#define RETURN_X 45 +#define COPYFILE_X1 128 +#define ERASEFILE_X1 228 +#else +#define RETURN_X 44 +#define COPYFILE_X1 135 +#define ERASEFILE_X1 231 +#endif + +/** + * Prints score menu strings that shows on the green background menu screen. + */ +static void print_score_menu_strings(void) { + // Update and print the message at the top of the menu. + if (sMainMenuTimer == 20) { + sFadeOutText = TRUE; + } + if (update_text_fade_out() == TRUE) { + if (sStatusMessageID == SCORE_MSG_CHECK_FILE) { + sStatusMessageID = SCORE_MSG_NOSAVE_DATA; + } else { + sStatusMessageID = SCORE_MSG_CHECK_FILE; + } + } + // Print messageID called above + score_menu_display_message(sStatusMessageID); + // Print file star counts + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + print_save_file_star_count(SAVE_FILE_A, 90, 76); + print_save_file_star_count(SAVE_FILE_B, 211, 76); + print_save_file_star_count(SAVE_FILE_C, 90, 119); + print_save_file_star_count(SAVE_FILE_D, 211, 119); + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); + // Print menu names + gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + print_generic_string(RETURN_X, 35, textReturn); + print_generic_string(COPYFILE_X1, 35, textCopyFileButton); + print_generic_string(ERASEFILE_X1, 35, textEraseFileButton); + gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); + // Print file names + gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + print_menu_generic_string(89, 62, textMarioA); + print_menu_generic_string(211, 62, textMarioB); + print_menu_generic_string(89, 105, textMarioC); + print_menu_generic_string(211, 105, textMarioD); + gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_end); +} + +#ifdef VERSION_JP +#define NOFILE_COPY_X 90 +#define COPY_FILE_X 90 +#define COPYIT_WHERE_X 90 +#define NOSAVE_DATA_X2 90 +#define COPYCOMPLETE_X 90 +#define SAVE_EXISTS_X1 90 +#else +#define NOFILE_COPY_X 119 +#define COPY_FILE_X 104 +#define COPYIT_WHERE_X 109 +#define NOSAVE_DATA_X2 101 +#define COPYCOMPLETE_X 110 +#define SAVE_EXISTS_X1 110 +#endif + +/** + * Defines IDs for the top message of the copy menu and displays it if the ID is called in messageID. + */ +static void copy_menu_display_message(s8 messageID) { + switch (messageID) { + case COPY_MSG_MAIN_TEXT: + if (sAllFilesExist == TRUE) { + print_generic_string_fade(NOFILE_COPY_X, 190, textNoFileToCopyFrom); + } else { + print_hud_lut_string_fade(HUD_LUT_DIFF, COPY_FILE_X, 35, textCopyFile); + } + break; + case COPY_MSG_COPY_WHERE: + print_generic_string_fade(COPYIT_WHERE_X, 190, textCopyItToWhere); + break; + case COPY_MSG_NOSAVE_EXISTS: + print_generic_string_fade(NOSAVE_DATA_X2, 190, textNoSavedDataExistsCopy); + break; + case COPY_MSG_COPY_COMPLETE: + print_generic_string_fade(COPYCOMPLETE_X, 190, textCopyCompleted); + break; + case COPY_MSG_SAVE_EXISTS: + print_generic_string_fade(SAVE_EXISTS_X1, 190, textSavedDataExists); + break; + } +} + +/** + * Updates messageIDs of the copy menu depending of the copy phase value defined. + */ +static void copy_menu_update_message(void) { + switch (sMainMenuButtons[MENU_BUTTON_COPY]->oMenuButtonActionPhase) { + case COPY_PHASE_MAIN: + if (sMainMenuTimer == 20) { + sFadeOutText = TRUE; + } + if (update_text_fade_out() == TRUE) { + if (sStatusMessageID == COPY_MSG_MAIN_TEXT) { + sStatusMessageID = COPY_MSG_NOSAVE_EXISTS; + } else { + sStatusMessageID = COPY_MSG_MAIN_TEXT; + } + } + break; + case COPY_PHASE_COPY_WHERE: + if (sMainMenuTimer == 20 && sStatusMessageID == COPY_MSG_SAVE_EXISTS) { + sFadeOutText = TRUE; + } + if (update_text_fade_out() == TRUE) { + if (sStatusMessageID != COPY_MSG_COPY_WHERE) { + sStatusMessageID = COPY_MSG_COPY_WHERE; + } else { + sStatusMessageID = COPY_MSG_SAVE_EXISTS; + } + } + break; + case COPY_PHASE_COPY_COMPLETE: + if (sMainMenuTimer == 20) { + sFadeOutText = TRUE; + } + if (update_text_fade_out() == TRUE) { + if (sStatusMessageID != COPY_MSG_COPY_COMPLETE) { + sStatusMessageID = COPY_MSG_COPY_COMPLETE; + } else { + sStatusMessageID = COPY_MSG_MAIN_TEXT; + } + } + break; + } +} + +#ifdef VERSION_JP +#define VIEWSCORE_X1 133 +#define ERASEFILE_X2 220 +#else +#define VIEWSCORE_X1 128 +#define ERASEFILE_X2 230 +#endif + +/** + * Prints copy menu strings that shows on the blue background menu screen. + */ +static void print_copy_menu_strings(void) { + // Update and print the message at the top of the menu. + copy_menu_update_message(); + // Print messageID called inside a copy_menu_update_message case + copy_menu_display_message(sStatusMessageID); + // Print file star counts + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + print_save_file_star_count(SAVE_FILE_A, 90, 76); + print_save_file_star_count(SAVE_FILE_B, 211, 76); + print_save_file_star_count(SAVE_FILE_C, 90, 119); + print_save_file_star_count(SAVE_FILE_D, 211, 119); + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); + // Print menu names + gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + print_generic_string(RETURN_X, 35, textReturn); + print_generic_string(VIEWSCORE_X1, 35, textViewScore); + print_generic_string(ERASEFILE_X2, 35, textEraseFileButton); + gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); + // Print file names + gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + print_menu_generic_string(89, 62, textMarioA); + print_menu_generic_string(211, 62, textMarioB); + print_menu_generic_string(89, 105, textMarioC); + print_menu_generic_string(211, 105, textMarioD); + gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_end); +} + +#ifdef VERSION_JP +#define CURSOR_X 160.0f +#define MENU_ERASE_YES_MIN_X 0x91 +#define MENU_ERASE_YES_MAX_X 0xA4 +#else +#define CURSOR_X (x + 0x46) +#define MENU_ERASE_YES_MIN_X 0x8C +#define MENU_ERASE_YES_MAX_X 0xA9 +#endif + +#define MENU_ERASE_YES_NO_MIN_Y 0xBF +#define MENU_ERASE_YES_NO_MAX_Y 0xD2 +#define MENU_ERASE_NO_MIN_X 0xBD +#define MENU_ERASE_NO_MAX_X 0xDA + +/** + * Prints the "YES NO" prompt and checks if one of the prompts are hovered to do it's functions. + */ +static void print_erase_menu_prompt(s16 x, s16 y) { + s16 colorFade = gGlobalTimer << 12; + + s16 cursorX = sCursorPos[0] + CURSOR_X; + s16 cursorY = sCursorPos[1] + 120.0f; + + if (cursorX < MENU_ERASE_YES_MAX_X && cursorX >= MENU_ERASE_YES_MIN_X && + cursorY < MENU_ERASE_YES_NO_MAX_Y && cursorY >= MENU_ERASE_YES_NO_MIN_Y) { + // Fade "YES" string color but keep "NO" gray + sYesNoColor[0] = sins(colorFade) * 50.0f + 205.0f; + sYesNoColor[1] = 150; + sEraseYesNoHoverState = MENU_ERASE_HOVER_YES; + } else if (cursorX < MENU_ERASE_NO_MAX_X && cursorX >= MENU_ERASE_NO_MIN_X + && cursorY < MENU_ERASE_YES_NO_MAX_Y && cursorY >= MENU_ERASE_YES_NO_MIN_Y) { + // Fade "NO" string color but keep "YES" gray + sYesNoColor[0] = 150; + sYesNoColor[1] = sins(colorFade) * 50.0f + 205.0f; + sEraseYesNoHoverState = MENU_ERASE_HOVER_NO; + } else { + // Don't fade both strings and keep them gray + sYesNoColor[0] = 150; + sYesNoColor[1] = 150; + sEraseYesNoHoverState = MENU_ERASE_HOVER_NONE; + } + // If the cursor is clicked... + if (sCursorClickingTimer == 2) { + // ..and is hovering "YES", delete file + if (sEraseYesNoHoverState == MENU_ERASE_HOVER_YES) { + play_sound(SOUND_MARIO_WAAAOOOW, gDefaultSoundArgs); + sMainMenuButtons[MENU_BUTTON_ERASE]->oMenuButtonActionPhase = ERASE_PHASE_MARIO_ERASED; + sFadeOutText = TRUE; + sMainMenuTimer = 0; + save_file_erase(sSelectedFileIndex); + sMainMenuButtons[MENU_BUTTON_ERASE_MIN + sSelectedFileIndex]->header.gfx.sharedChild = + gLoadedGraphNodes[MODEL_MAIN_MENU_MARIO_NEW_BUTTON_FADE]; + sMainMenuButtons[sSelectedFileIndex]->header.gfx.sharedChild = + gLoadedGraphNodes[MODEL_MAIN_MENU_MARIO_NEW_BUTTON_FADE]; + sEraseYesNoHoverState = MENU_ERASE_HOVER_NONE; + // ..and is hovering "NO", return back to main phase + } else if (sEraseYesNoHoverState == MENU_ERASE_HOVER_NO) { + play_sound(SOUND_MENU_CLICK_FILE_SELECT, gDefaultSoundArgs); + sMainMenuButtons[MENU_BUTTON_ERASE_MIN + sSelectedFileIndex]->oMenuButtonState = + MENU_BUTTON_STATE_ZOOM_OUT; + sMainMenuButtons[MENU_BUTTON_ERASE]->oMenuButtonActionPhase = ERASE_PHASE_MAIN; + sFadeOutText = TRUE; + sMainMenuTimer = 0; + sEraseYesNoHoverState = MENU_ERASE_HOVER_NONE; + } + } + // Print "YES NO" strings + gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); + gDPSetEnvColor(gDisplayListHead++, sYesNoColor[0], sYesNoColor[0], sYesNoColor[0], sTextBaseAlpha); + print_generic_string(x + 56, y, textYes); + gDPSetEnvColor(gDisplayListHead++, sYesNoColor[1], sYesNoColor[1], sYesNoColor[1], sTextBaseAlpha); + print_generic_string(x + 98, y, textNo); + gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); +} + +#ifdef VERSION_JP +#define ERASE_FILE_X 96 +#define NOSAVE_DATA_X3 90 +#define MARIO_ERASED_VAR 3 +#define MARIO_ERASED_X 90 +#define SAVE_EXISTS_X2 90 +#else +#define ERASE_FILE_X 98 +#define NOSAVE_DATA_X3 100 +#define MARIO_ERASED_VAR 6 +#define MARIO_ERASED_X 100 +#define SAVE_EXISTS_X2 100 +#endif + +/** + * Defines IDs for the top message of the erase menu and displays it if the ID is called in messageID. + */ +static void erase_menu_display_message(s8 messageID) { + unsigned char textEraseFile[] = { TEXT_ERASE_FILE }; + unsigned char textSure[] = { TEXT_SURE }; + unsigned char textNoSavedDataExists[] = { TEXT_NO_SAVED_DATA_EXISTS }; + unsigned char textMarioAJustErased[] = { TEXT_FILE_MARIO_A_JUST_ERASED }; + unsigned char textSavedDataExists[] = { TEXT_SAVED_DATA_EXISTS }; + + switch (messageID) { + case ERASE_MSG_MAIN_TEXT: + print_hud_lut_string_fade(HUD_LUT_DIFF, ERASE_FILE_X, 35, textEraseFile); + break; + case ERASE_MSG_PROMPT: + print_generic_string_fade(90, 190, textSure); + print_erase_menu_prompt(90, 190); // YES NO, has functions for it too + break; + case ERASE_MSG_NOSAVE_EXISTS: + print_generic_string_fade(NOSAVE_DATA_X3, 190, textNoSavedDataExists); + break; + case ERASE_MSG_MARIO_ERASED: + textMarioAJustErased[MARIO_ERASED_VAR] = sSelectedFileIndex + 10; + print_generic_string_fade(MARIO_ERASED_X, 190, textMarioAJustErased); + break; + case ERASE_MSG_SAVE_EXISTS: // unused + print_generic_string_fade(SAVE_EXISTS_X2, 190, textSavedDataExists); + break; + } +} + +/** + * Updates messageIDs of the erase menu depending of the erase phase value defined. + */ +static void erase_menu_update_message(void) { + switch (sMainMenuButtons[MENU_BUTTON_ERASE]->oMenuButtonActionPhase) { + case ERASE_PHASE_MAIN: + if (sMainMenuTimer == 20 && sStatusMessageID == ERASE_MSG_NOSAVE_EXISTS) { + sFadeOutText = TRUE; + } + if (update_text_fade_out() == TRUE) { + if (sStatusMessageID == ERASE_MSG_MAIN_TEXT) { + sStatusMessageID = ERASE_MSG_NOSAVE_EXISTS; + } else { + sStatusMessageID = ERASE_MSG_MAIN_TEXT; + } + } + break; + case ERASE_PHASE_PROMPT: + if (update_text_fade_out() == TRUE) { + if (sStatusMessageID != ERASE_MSG_PROMPT) { + sStatusMessageID = ERASE_MSG_PROMPT; + } + sCursorPos[0] = 43.0f; + sCursorPos[1] = 80.0f; + } + break; + case ERASE_PHASE_MARIO_ERASED: + if (sMainMenuTimer == 20) { + sFadeOutText = TRUE; + } + if (update_text_fade_out() == TRUE) { + if (sStatusMessageID != ERASE_MSG_MARIO_ERASED) { + sStatusMessageID = ERASE_MSG_MARIO_ERASED; + } else { + sStatusMessageID = ERASE_MSG_MAIN_TEXT; + } + } + break; + } +} + +#ifdef VERSION_JP +#define VIEWSCORE_X2 133 +#define COPYFILE_X2 223 +#else +#define VIEWSCORE_X2 127 +#define COPYFILE_X2 233 +#endif + +/** + * Prints erase menu strings that shows on the red background menu screen. + */ +static void print_erase_menu_strings(void) { + // Update and print the message at the top of the menu. + erase_menu_update_message(); + // Print messageID called inside a erase_menu_update_message case + erase_menu_display_message(sStatusMessageID); + // Print file star counts + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + print_save_file_star_count(SAVE_FILE_A, 90, 76); + print_save_file_star_count(SAVE_FILE_B, 211, 76); + print_save_file_star_count(SAVE_FILE_C, 90, 119); + print_save_file_star_count(SAVE_FILE_D, 211, 119); + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); + // Print menu names + gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + print_generic_string(RETURN_X, 35, textReturn); + print_generic_string(VIEWSCORE_X2, 35, textViewScore); + print_generic_string(COPYFILE_X2, 35, textCopyFileButton); + gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); + // Print file names + gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + print_menu_generic_string(89, 62, textMarioA); + print_menu_generic_string(211, 62, textMarioB); + print_menu_generic_string(89, 105, textMarioC); + print_menu_generic_string(211, 105, textMarioD); + gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_end); +} + +#ifdef VERSION_JP +#define SOUND_SELECT_X 96 +#define SOUNDMODE_X2 mode * 74 + 67 +#else +#define SOUND_SELECT_X 88 +#define SOUNDMODE_X2 textX +#endif + +/** + * Prints sound mode menu strings that shows on the purple background menu screen. + */ +static void print_sound_mode_menu_strings(void) { + s32 mode; +#ifndef VERSION_JP + s16 textX; +#endif + unsigned char textSoundSelect[] = { TEXT_SOUND_SELECT }; + // Print "SOUND SELECT" text + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + print_hud_lut_string(HUD_LUT_DIFF, SOUND_SELECT_X, 35, textSoundSelect); + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); + // Print mode names + gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); + for (mode = 0; mode < 3; mode++) { + if (mode == sSoundMode) { + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + } else { + gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, sTextBaseAlpha); + } +#ifdef VERSION_US + // Mode names are centered correctly on US + textX = get_str_x_pos_from_center(mode * 74 + 87, textSoundModes[mode], 10.0f); +#endif + print_generic_string(SOUNDMODE_X2, 87, textSoundModes[mode]); + } + gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); +} + +static unsigned char textStarX[] = { TEXT_STAR_X }; + +/** + * Prints castle secret stars collected in a score menu save file. + */ +static void print_score_file_castle_secret_stars(s8 fileIndex, s16 x, s16 y) { + unsigned char secretStarsText[20]; + // Print "[star] x" + print_menu_generic_string(x, y, textStarX); + // Print number of castle secret stars + int_to_str(save_file_get_total_star_count(fileIndex, 15, 24), secretStarsText); + print_menu_generic_string(x + 16, y, secretStarsText); +} + +/** + * Prints course coins collected in a score menu save file. + */ +static void print_score_file_course_coin_score(s8 fileIndex, s16 courseIndex, s16 x, s16 y) { + unsigned char coinScoreText[20]; + u8 stars = save_file_get_star_flags(fileIndex, courseIndex); + unsigned char textCoinX[] = { TEXT_COIN_X }; + unsigned char textStar[] = { TEXT_STAR }; +#ifdef VERSION_JP +#define LENGTH 5 +#else +#define LENGTH 8 +#endif + unsigned char fileNames[][LENGTH] = { + { TEXT_4DASHES }, // huh? + { TEXT_SCORE_MARIO_A }, { TEXT_SCORE_MARIO_B }, { TEXT_SCORE_MARIO_C }, { TEXT_SCORE_MARIO_D }, + }; +#undef LENGTH + // MYSCORE + if (sScoreFileCoinScoreMode == 0) { + // Print "[coin] x" + print_menu_generic_string(x + 25, y, textCoinX); + // Print coin score + int_to_str(save_file_get_course_coin_score(fileIndex, courseIndex), coinScoreText); + print_menu_generic_string(x + 41, y, coinScoreText); + // If collected, print 100 coin star + if (stars & (1 << 6)) { + print_menu_generic_string(x + 70, y, textStar); + } + } + // HISCORE + else { +#ifdef VERSION_JP + // Print "[coin] x" + print_menu_generic_string(x, y, textCoinX); + // Print coin highscore + int_to_str((u16) save_file_get_max_coin_score(courseIndex) & 0xFFFF, coinScoreText); + print_menu_generic_string(x + 16, y, coinScoreText); + // Print coin highscore file + print_menu_generic_string(x + 45, y, + fileNames[(save_file_get_max_coin_score(courseIndex) >> 16) & 0xFFFF]); +#else + // Print "[coin] x" + print_menu_generic_string(x + 18, y, textCoinX); + // Print coin highscore + int_to_str((u16) save_file_get_max_coin_score(courseIndex) & 0xFFFF, coinScoreText); + print_menu_generic_string(x + 34, y, coinScoreText); + // Print coin highscore file + print_menu_generic_string(x + 60, y, + fileNames[(save_file_get_max_coin_score(courseIndex) >> 16) & 0xFFFF]); +#endif + } +} + +/** + * Prints stars collected in a score menu save file. + */ +static void print_score_file_star_score(s8 fileIndex, s16 courseIndex, s16 x, s16 y) { + s16 i = 0; + unsigned char starScoreText[20]; // unknown length + u8 stars = save_file_get_star_flags(fileIndex, courseIndex); + s8 starCount = save_file_get_course_star_count(fileIndex, courseIndex); + // Don't count 100 coin star + if (stars & (1 << 6)) { + starCount--; + } + // Add 1 star character for every star collected + for (i = 0; i < starCount; i++) { + starScoreText[i] = DIALOG_CHAR_STAR_FILLED; + } + // Terminating byte + starScoreText[i] = DIALOG_CHAR_TERMINATOR; + print_menu_generic_string(x, y, starScoreText); +} + +#ifdef VERSION_JP +#define MARIO_X 28 +#define FILE_LETTER_X 86 +#define LEVEL_NAME_X 23 +#define SECRET_STARS_X 152 +#define MYSCORE_X 237 +#define HISCORE_X 237 +#else +#define MARIO_X 25 +#define FILE_LETTER_X 95 +#define LEVEL_NAME_X 29 +#define SECRET_STARS_X 171 +#define MYSCORE_X 238 +#define HISCORE_X 231 +#endif + +/** + * Prints save file score strings that shows when a save file is chosen inside the score menu. + */ +static void print_save_file_scores(s8 fileIndex) { +// TODO: EU relocates level name table to translation segment 0x19 +#ifndef VERSION_EU + unsigned char textMario[] = { TEXT_MARIO }; +#ifdef VERSION_JP + unsigned char textFileLetter[] = { TEXT_ZERO }; + void **levelNameTable = segmented_to_virtual(seg2_level_name_table); +#endif + unsigned char textHiScore[] = { TEXT_HI_SCORE }; + unsigned char textMyScore[] = { TEXT_MY_SCORE }; +#ifdef VERSION_US + unsigned char textFileLetter[] = { TEXT_ZERO }; + void **levelNameTable = segmented_to_virtual(seg2_level_name_table); +#endif + + textFileLetter[0] = fileIndex + ASCII_TO_DIALOG('A'); // get letter of file selected + // Print file name at top + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + print_hud_lut_string(HUD_LUT_DIFF, MARIO_X, 15, textMario); + print_hud_lut_string(HUD_LUT_GLOBAL, FILE_LETTER_X, 15, textFileLetter); + // Print save file star count at top + print_save_file_star_count(fileIndex, 124, 15); + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); + // Print course scores + gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, sTextBaseAlpha); + +//! Huge print list, for loops exist for a reason! +// PADCHAR is used to difference an x position value between +// JP and US when the course number is only one digit. +#ifdef VERSION_JP +#define PADCHAR 0 +#define PRINT_COURSE_SCORES(courseIndex, pad) \ + print_menu_generic_string(23 + (pad * 3), 35 + 12 * courseIndex, segmented_to_virtual(levelNameTable[courseIndex])); \ + print_score_file_star_score(fileIndex, courseIndex, 152, 35 + 12 * courseIndex); \ + print_score_file_course_coin_score(fileIndex, courseIndex, 213, 35 + 12 * courseIndex); +#else +#define PADCHAR 1 +#define PRINT_COURSE_SCORES(courseIndex, pad) \ + print_menu_generic_string(23 + (pad * 3), 35 + 12 * courseIndex, segmented_to_virtual(levelNameTable[courseIndex])); \ + print_score_file_star_score(fileIndex, courseIndex, 171, 35 + 12 * courseIndex); \ + print_score_file_course_coin_score(fileIndex, courseIndex, 213, 35 + 12 * courseIndex); +#endif + + // Course values are indexed, from Bob-omb Battlefield to Rainbow Ride + PRINT_COURSE_SCORES(0, PADCHAR) // BOB + PRINT_COURSE_SCORES(1, PADCHAR) // WF + PRINT_COURSE_SCORES(2, PADCHAR) // JRB + PRINT_COURSE_SCORES(3, PADCHAR) // CCM + PRINT_COURSE_SCORES(4, PADCHAR) // BBH + PRINT_COURSE_SCORES(5, PADCHAR) // HMC + PRINT_COURSE_SCORES(6, PADCHAR) // LLL + PRINT_COURSE_SCORES(7, PADCHAR) // SSL + PRINT_COURSE_SCORES(8, PADCHAR) // DDD + PRINT_COURSE_SCORES(9, 0) // SL + PRINT_COURSE_SCORES(10, 0) // WDW + PRINT_COURSE_SCORES(11, 0) // TTM + PRINT_COURSE_SCORES(12, 0) // THI + PRINT_COURSE_SCORES(13, 0) // TTC + PRINT_COURSE_SCORES(14, 0) // RR + +#undef PRINT_COURSE_SCORES +#undef PADCHAR + + // Print level name + print_menu_generic_string(LEVEL_NAME_X, 215, segmented_to_virtual(levelNameTable[25])); + // Print castle secret stars + print_score_file_castle_secret_stars(fileIndex, SECRET_STARS_X, 215); + // Print current coin score mode + if (sScoreFileCoinScoreMode == 0) { + print_menu_generic_string(MYSCORE_X, 24, textMyScore); + } else { + print_menu_generic_string(HISCORE_X, 24, textHiScore); + } + + gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_end); +#endif // !VERSION_EU +} + +/** + * Prints file select strings depending on the menu selected. + * Also checks if all saves exists and defines text and main menu timers. + */ +static void print_file_select_strings(void) { + UNUSED s32 unused1; + UNUSED s32 unused2; + + create_dl_ortho_matrix(); + switch (sSelectedButtonID) { + case MENU_BUTTON_NONE: + print_main_menu_strings(); + break; + case MENU_BUTTON_SCORE: + print_score_menu_strings(); + sScoreFileCoinScoreMode = 0; + break; + case MENU_BUTTON_COPY: + print_copy_menu_strings(); + break; + case MENU_BUTTON_ERASE: + print_erase_menu_strings(); + break; + case MENU_BUTTON_SCORE_FILE_A: + print_save_file_scores(SAVE_FILE_A); + break; + case MENU_BUTTON_SCORE_FILE_B: + print_save_file_scores(SAVE_FILE_B); + break; + case MENU_BUTTON_SCORE_FILE_C: + print_save_file_scores(SAVE_FILE_C); + break; + case MENU_BUTTON_SCORE_FILE_D: + print_save_file_scores(SAVE_FILE_D); + break; + case MENU_BUTTON_SOUND_MODE: + print_sound_mode_menu_strings(); + break; + } + // If all 4 save file exists, define true to sAllFilesExist to prevent more copies in copy menu + if (save_file_exists(SAVE_FILE_A) == TRUE && save_file_exists(SAVE_FILE_B) == TRUE && save_file_exists(SAVE_FILE_C) == TRUE + && save_file_exists(SAVE_FILE_D) == TRUE) { + sAllFilesExist = TRUE; + } else { + sAllFilesExist = FALSE; + } + // Timers for menu alpha text and the main menu itself + if (sTextBaseAlpha < 250) { + sTextBaseAlpha += 10; + } + if (sMainMenuTimer < 1000) { + sMainMenuTimer += 1; + } +} + +/** + * Geo function that prints file select strings and the cursor. + */ +Gfx *geo_file_select_strings_and_menu_cursor(s32 callContext, UNUSED struct GraphNode *node, UNUSED f32 mtx[4][4]) { + if (callContext == GEO_CONTEXT_RENDER) { + print_file_select_strings(); + print_menu_cursor(); + } + return NULL; +} + +/** + * Initiates file select values after Mario Screen. + * Relocates cursor position of the last save if the game goes back to the Mario Screen + * either completing a course choosing "SAVE & QUIT" or having a game over. + */ +void lvl_init_menu_values_and_cursor_pos(UNUSED s32 arg, UNUSED s32 unused) { + sSelectedButtonID = MENU_BUTTON_NONE; + sCurrentMenuLevel = MENU_LAYER_MAIN; + sTextBaseAlpha = 0; + // Place the cursor over the save file that was being played. + // gCurrSaveFileNum is 1 by default when the game boots, as such + // the cursor will point on Mario A save file. + switch (gCurrSaveFileNum) { + case 1: // File A + sCursorPos[0] = -94.0f; + sCursorPos[1] = 46.0f; + break; + case 2: // File B + sCursorPos[0] = 24.0f; + sCursorPos[1] = 46.0f; + break; + case 3: // File C + sCursorPos[0] = -94.0f; + sCursorPos[1] = 5.0f; + break; + case 4: // File D + sCursorPos[0] = 24.0f; + sCursorPos[1] = 5.0f; + break; + } + sClickPos[0] = -10000; + sClickPos[1] = -10000; + sCursorClickingTimer = 0; + sSelectedFileNum = 0; + sSelectedFileIndex = MENU_BUTTON_NONE; + sFadeOutText = FALSE; + sStatusMessageID = 0; + sTextFadeAlpha = 0; + sMainMenuTimer = 0; + sEraseYesNoHoverState = MENU_ERASE_HOVER_NONE; + sSoundMode = save_file_get_sound_mode(); +} + +/** + * Updates file select menu button objects so they can be interacted. + * When a save file is selected, it returns fileNum value + * defined in load_main_menu_save_file. + */ +int lvl_update_obj_and_load_file_selected(UNUSED s32 arg, UNUSED s32 unused) { + area_update_objects(); + return sSelectedFileNum; +} diff --git a/src/menu/file_select.h b/src/menu/file_select.h new file mode 100644 index 0000000..39b4d08 --- /dev/null +++ b/src/menu/file_select.h @@ -0,0 +1,128 @@ +#ifndef FILE_SELECT_H +#define FILE_SELECT_H + +#include "types.h" + +#define MENU_LAYER_MAIN 1 +#define MENU_LAYER_SUBMENU 2 + +#define MENU_ERASE_HOVER_NONE 0 +#define MENU_ERASE_HOVER_YES 1 +#define MENU_ERASE_HOVER_NO 2 + +enum MainMenuButtonStates { + MENU_BUTTON_STATE_DEFAULT, + MENU_BUTTON_STATE_GROWING, + MENU_BUTTON_STATE_FULLSCREEN, + MENU_BUTTON_STATE_SHRINKING, + MENU_BUTTON_STATE_ZOOM_IN_OUT, + MENU_BUTTON_STATE_ZOOM_IN, + MENU_BUTTON_STATE_ZOOM_OUT +}; + +enum MenuButtonTypes { + MENU_BUTTON_NONE = -1, // no button selected (on main menu screen) + + // Main Menu (SELECT FILE) + MENU_BUTTON_MAIN_MIN, + MENU_BUTTON_PLAY_FILE_A = MENU_BUTTON_MAIN_MIN, + MENU_BUTTON_PLAY_FILE_B, + MENU_BUTTON_PLAY_FILE_C, + MENU_BUTTON_PLAY_FILE_D, + MENU_BUTTON_SCORE, + MENU_BUTTON_COPY, + MENU_BUTTON_ERASE, + MENU_BUTTON_MAIN_MAX, + + // Score Menu (CHECK FILE) + MENU_BUTTON_SCORE_MIN = MENU_BUTTON_MAIN_MAX, + MENU_BUTTON_SCORE_FILE_A = MENU_BUTTON_SCORE_MIN, + MENU_BUTTON_SCORE_FILE_B, + MENU_BUTTON_SCORE_FILE_C, + MENU_BUTTON_SCORE_FILE_D, + MENU_BUTTON_SCORE_RETURN, + MENU_BUTTON_SCORE_COPY_FILE, + MENU_BUTTON_SCORE_ERASE_FILE, + MENU_BUTTON_SCORE_MAX, + + // Copy Menu (COPY FILE) + MENU_BUTTON_COPY_MIN = MENU_BUTTON_SCORE_MAX, + MENU_BUTTON_COPY_FILE_A = MENU_BUTTON_COPY_MIN, + MENU_BUTTON_COPY_FILE_B, + MENU_BUTTON_COPY_FILE_C, + MENU_BUTTON_COPY_FILE_D, + MENU_BUTTON_COPY_RETURN, + MENU_BUTTON_COPY_CHECK_SCORE, + MENU_BUTTON_COPY_ERASE_FILE, + MENU_BUTTON_COPY_MAX, + + // Erase Menu (ERASE FILE) + MENU_BUTTON_ERASE_MIN = MENU_BUTTON_COPY_MAX, + MENU_BUTTON_ERASE_FILE_A = MENU_BUTTON_ERASE_MIN, + MENU_BUTTON_ERASE_FILE_B, + MENU_BUTTON_ERASE_FILE_C, + MENU_BUTTON_ERASE_FILE_D, + MENU_BUTTON_ERASE_RETURN, + MENU_BUTTON_ERASE_CHECK_SCORE, + MENU_BUTTON_ERASE_COPY_FILE, + MENU_BUTTON_ERASE_MAX, + + // Sound Mode Menu (SOUND SELECT) + MENU_BUTTON_SOUND_MODE = MENU_BUTTON_ERASE_MAX, + MENU_BUTTON_SOUND_MIN, + MENU_BUTTON_STEREO = MENU_BUTTON_SOUND_MIN, + MENU_BUTTON_MONO, + MENU_BUTTON_HEADSET, + MENU_BUTTON_SOUND_MAX +}; + +enum ScoreMenuMessageID { + SCORE_MSG_CHECK_FILE, + SCORE_MSG_NOSAVE_DATA +}; + +enum CopyMenuMessageID { + COPY_MSG_MAIN_TEXT, + COPY_MSG_COPY_WHERE, + COPY_MSG_NOSAVE_EXISTS, + COPY_MSG_COPY_COMPLETE, + COPY_MSG_SAVE_EXISTS +}; + +enum CopyMenuActionPhase { + COPY_PHASE_MAIN, + COPY_PHASE_COPY_WHERE, + COPY_PHASE_COPY_COMPLETE +}; + +enum EraseMenuMessageID { + ERASE_MSG_MAIN_TEXT, + ERASE_MSG_PROMPT, + ERASE_MSG_NOSAVE_EXISTS, + ERASE_MSG_MARIO_ERASED, + ERASE_MSG_SAVE_EXISTS +}; + +enum EraseMenuActionPhase { + ERASE_PHASE_MAIN, + ERASE_PHASE_PROMPT, + ERASE_PHASE_MARIO_ERASED +}; + +enum SoundModeMenuActionPhase { + SOUND_MODE_PHASE_MAIN +}; + +extern u32 gGlobalTimer; + +extern void beh_yellow_background_menu_init(void); +extern void beh_yellow_background_menu_loop(void); +extern void bhv_menu_button_init(void); +extern void bhv_menu_button_loop(void); +extern void bhv_menu_button_manager_init(void); +extern void bhv_menu_button_manager_loop(void); +extern Gfx *geo_menu_strings_and_cursor(s32 run, UNUSED struct GraphNode *node, UNUSED f32 mtx[4][4]); +extern void lvl_init_menu_values_and_cursor_pos(UNUSED s32 arg, UNUSED s32 unused); +extern s32 lvl_update_menu_obj_and_load_file_selected(UNUSED s32 arg, UNUSED s32 unused); + +#endif /* FILE_SELECT_H */ diff --git a/src/game/intro_geo.c b/src/menu/intro_geo.c similarity index 99% rename from src/game/intro_geo.c rename to src/menu/intro_geo.c index 3e3f1d8..4979f16 100644 --- a/src/game/intro_geo.c +++ b/src/menu/intro_geo.c @@ -1,9 +1,9 @@ #include "ultra64.h" #include "sm64.h" #include "types.h" -#include "memory.h" -#include "segment2.h" -#include "segment7.h" +#include "game/memory.h" +#include "game/segment2.h" +#include "game/segment7.h" #include "intro_geo.h" // frame counts for the zoom in, hold, and zoom out of title model diff --git a/src/game/intro_geo.h b/src/menu/intro_geo.h similarity index 100% rename from src/game/intro_geo.h rename to src/menu/intro_geo.h diff --git a/src/game/level_select_menu.c b/src/menu/level_select_menu.c similarity index 51% rename from src/game/level_select_menu.c rename to src/menu/level_select_menu.c index c17a568..07340cf 100644 --- a/src/game/level_select_menu.c +++ b/src/menu/level_select_menu.c @@ -1,85 +1,87 @@ #include #include "sm64.h" -#include "game.h" -#include "main.h" -#include "engine/math_util.h" -#include "memory.h" -#include "area.h" -#include "save_file.h" #include "audio/external.h" +#include "game/game.h" +#include "game/main.h" +#include "game/memory.h" +#include "game/area.h" +#include "game/save_file.h" +#include "game/level_update.h" +#include "game/sound_init.h" +#include "game/print.h" +#include "game/display.h" #include "seq_ids.h" -#include "level_update.h" -#include "sound_init.h" -#include "print.h" -#include "display.h" +#include "engine/math_util.h" #define PRESS_START_DEMO_TIMER 800 -static char gLevelSelect_StageNamesText[64][16] = { "", - "", - "", - "TERESA OBAKE", - "YYAMA1 % YSLD1", - "SELECT ROOM", - "HORROR DUNGEON", - "SABAKU % PYRMD", - "BATTLE FIELD", - "YUKIYAMA2", - "POOL KAI", - "WTDG % TINBOTU", - "BIG WORLD", - "CLOCK TOWER", - "RAINBOW CRUISE", - "MAIN MAP", - "EXT1 YOKO SCRL", - "EXT7 HORI MINI", - "EXT2 TIKA LAVA", - "EXT9 SUISOU", - "EXT3 HEAVEN", - "FIREB1 % INVLC", - "WATER LAND", - "MOUNTAIN", - "ENDING", - "URANIWA", - "EXT4 MINI SLID", - "IN THE FALL", - "EXT6 MARIO FLY", - "KUPPA1", - "EXT8 BLUE SKY", - "", - "KUPPA2", - "KUPPA3", - "", - "DONKEY % SLID2", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" }; +static char gLevelSelect_StageNamesText[64][16] = { + "", + "", + "", + "TERESA OBAKE", + "YYAMA1 % YSLD1", + "SELECT ROOM", + "HORROR DUNGEON", + "SABAKU % PYRMD", + "BATTLE FIELD", + "YUKIYAMA2", + "POOL KAI", + "WTDG % TINBOTU", + "BIG WORLD", + "CLOCK TOWER", + "RAINBOW CRUISE", + "MAIN MAP", + "EXT1 YOKO SCRL", + "EXT7 HORI MINI", + "EXT2 TIKA LAVA", + "EXT9 SUISOU", + "EXT3 HEAVEN", + "FIREB1 % INVLC", + "WATER LAND", + "MOUNTAIN", + "ENDING", + "URANIWA", + "EXT4 MINI SLID", + "IN THE FALL", + "EXT6 MARIO FLY", + "KUPPA1", + "EXT8 BLUE SKY", + "", + "KUPPA2", + "KUPPA3", + "", + "DONKEY % SLID2", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", +}; static u16 gDemoCountdown = 0; #ifndef VERSION_JP @@ -108,16 +110,13 @@ int run_press_start_demo_timer(s32 timer) { // if the next demo sequence ID is the count limit, reset it back to // the first sequence. - // FIXME: Why the fuck doesn't this match? - // if((++gDemoInputListID) == gDemo.animDmaTable[0].unk0) - if ((++gDemoInputListID) == gDemo.animDmaTable->unk0) { + if (++gDemoInputListID == gDemo.animDmaTable->count) { gDemoInputListID = 0; } - gCurrDemoInput = ((struct DemoInput *) gDemo.targetAnim) - + 1; // add 1 (+4) to the pointer to skip the demoID. - timer = (s8)((struct DemoInput *) gDemo.targetAnim) - ->timer; // TODO: see if making timer s8 matches + // add 1 (+4) to the pointer to skip the demoID. + gCurrDemoInput = ((struct DemoInput *) gDemo.targetAnim) + 1; + timer = (s8)((struct DemoInput *) gDemo.targetAnim)->timer; gCurrSaveFileNum = 1; gCurrActNum = 1; } @@ -158,7 +157,7 @@ s16 level_select_input_loop(void) { // if the stage was changed, play the sound for changing a stage. if (stageChanged) { - play_sound(SOUND_GENERAL_EXITPAINTING4, gDefaultSoundArgs); + play_sound(SOUND_GENERAL_LEVEL_SELECT_CHANGE, gDefaultSoundArgs); } // TODO: enum counts for the stage lists @@ -187,7 +186,7 @@ s16 level_select_input_loop(void) { gDebugLevelSelect = 0; return -1; } - play_sound(SOUND_MENU_STARSOUND, gDefaultSoundArgs); + play_sound(SOUND_MENU_STAR_SOUND, gDefaultSoundArgs); return gCurrLevelNum; } return 0; @@ -201,7 +200,7 @@ int func_8016F3CC(void) { if (gGlobalTimer < 0x81) { play_sound(SOUND_MARIO_HELLO, gDefaultSoundArgs); } else { - play_sound(SOUND_MARIO_PRESSSTARTTOPLAY, gDefaultSoundArgs); + play_sound(SOUND_MARIO_PRESS_START_TO_PLAY, gDefaultSoundArgs); } D_U_801A7C34 = 0; } @@ -210,10 +209,10 @@ int func_8016F3CC(void) { if (gPlayer1Controller->buttonPressed & START_BUTTON) { #ifdef VERSION_JP - play_sound(SOUND_MENU_STARSOUND, gDefaultSoundArgs); + play_sound(SOUND_MENU_STAR_SOUND, gDefaultSoundArgs); sp1C = 100 + gDebugLevelSelect; #else - play_sound(SOUND_MENU_STARSOUND, gDefaultSoundArgs); + play_sound(SOUND_MENU_STAR_SOUND, gDefaultSoundArgs); sp1C = 100 + gDebugLevelSelect; D_U_801A7C34 = 1; #endif @@ -226,7 +225,7 @@ int func_8016F444(void) { #ifndef VERSION_JP if (gameOverNotPlayed == 1) { - play_sound(SOUND_MARIO_GAMEOVER, gDefaultSoundArgs); + play_sound(SOUND_MARIO_GAME_OVER, gDefaultSoundArgs); gameOverNotPlayed = 0; } #endif @@ -234,7 +233,7 @@ int func_8016F444(void) { print_intro_text(); if (gPlayer1Controller->buttonPressed & START_BUTTON) { - play_sound(SOUND_MENU_STARSOUND, gDefaultSoundArgs); + play_sound(SOUND_MENU_STAR_SOUND, gDefaultSoundArgs); sp1C = 100 + gDebugLevelSelect; #ifndef VERSION_JP gameOverNotPlayed = 1; @@ -245,7 +244,7 @@ int func_8016F444(void) { int func_8016F4BC(void) { set_background_music(0, SEQ_SOUND_PLAYER, 0); - play_sound(SOUND_MENU_COINITSAMEMARIO, gDefaultSoundArgs); + play_sound(SOUND_MENU_COIN_ITS_A_ME_MARIO, gDefaultSoundArgs); return 1; } diff --git a/src/game/level_select_menu.h b/src/menu/level_select_menu.h similarity index 100% rename from src/game/level_select_menu.h rename to src/menu/level_select_menu.h diff --git a/src/menu/star_select.c b/src/menu/star_select.c new file mode 100644 index 0000000..3981953 --- /dev/null +++ b/src/menu/star_select.c @@ -0,0 +1,344 @@ +#include + +#include "sm64.h" +#include "audio/external.h" +#include "game/game.h" +#include "game/memory.h" +#include "game/area.h" +#include "game/save_file.h" +#include "game/object_helpers.h" +#include "game/ingame_menu.h" +#include "game/level_update.h" +#include "game/segment2.h" +#include "game/segment7.h" +#include "game/object_list_processor.h" +#include "engine/behavior_script.h" +#include "engine/graph_node.h" +#include "behavior_data.h" +#include "text_strings.h" +#include "star_select.h" + +/** + * @file star_select.c + * This file implements how the star select screen (act selector) function. + * That includes handles what stars can be selected, star selector types, + * strings, act values, and star selector model rendering if a star is collected or not. + */ + +// Star Selector count models printed in the act selector menu. +static struct Object *sStarSelectorModels[8]; + +// The act the course is loaded as, affects whether some objects spawn. +static s8 sLoadedActNum; + +// Number of obtained stars, excluding the coin star. +static u8 sObtainedStars; + +// Total number of stars that appear in the act selector menu. +static s8 sVisibleStars; + +// Act selected when the act menu is first opened. +static u8 sInitSelectedActNum; + +// Index value of the act selected in the act menu. +static s8 sSelectedActIndex = 0; + +// Index value of the star that is selectable in the act menu. +// Excluding the next star, it doesn't count other transparent stars. +static s8 sSelectableStarIndex = 0; + +// Act Selector menu timer that keeps counting until you choose an act. +static s32 sActSelectorMenuTimer = 0; + +/** + * Act Selector Star Type Loop Action + * Defines a select type for a star in the act selector. + */ +void bhv_act_selector_star_type_loop(void) { + switch (gCurrentObject->oStarSelectorType) { + // If a star is not selected, don't rotate or change size + case STAR_SELECTOR_NOT_SELECTED: + gCurrentObject->oStarSelectorSize -= 0.1; + if (gCurrentObject->oStarSelectorSize < 1.0) { + gCurrentObject->oStarSelectorSize = 1.0; + } + gCurrentObject->oFaceAngleYaw = 0; + break; + // If a star is selected, rotate and slightly increase size + case STAR_SELECTOR_SELECTED: + gCurrentObject->oStarSelectorSize += 0.1; + if (gCurrentObject->oStarSelectorSize > 1.3) { + gCurrentObject->oStarSelectorSize = 1.3; + } + gCurrentObject->oFaceAngleYaw += 0x800; + break; + // If the 100 coin star is selected, rotate + case STAR_SELECTOR_100_COINS: + gCurrentObject->oFaceAngleYaw += 0x800; + break; + } + // Scale act selector stars depending of the type selected + obj_scale(gCurrentObject->oStarSelectorSize); + // Unused timer, only referenced here. Probably replaced by sActSelectorMenuTimer + gCurrentObject->oStarSelectorTimer++; +} + +/** + * Renders the 100 coin star with an special star selector type. + */ +void render_100_coin_star(u8 stars) { + if (stars & (1 << 6)) { + // If the 100 coin star has been collected, create a new star selector next to the coin score. + sStarSelectorModels[6] = spawn_object_abs_with_rot(gCurrentObject, 0, MODEL_STAR, + bhvActSelectorStarType, 370, 24, -300, 0, 0, 0); + sStarSelectorModels[6]->oStarSelectorSize = 0.8; + sStarSelectorModels[6]->oStarSelectorType = STAR_SELECTOR_100_COINS; + } +} + +/** + * Act Selector Init Action + * Checks how many stars has been obtained in a course, to render + * the correct star models, the 100 coin star and also handles + * checks of what star should be next in sInitSelectedActNum. + */ +void bhv_act_selector_init(void) { + s16 i = 0; + s32 selectorModelIDs[10]; + u8 stars = save_file_get_star_flags(gCurrSaveFileNum - 1, gCurrCourseNum - 1); + + sVisibleStars = 0; + while (i != sObtainedStars) { + if (stars & (1 << sVisibleStars)) { // Star has been collected + selectorModelIDs[sVisibleStars] = MODEL_STAR; + i++; + } else { // Star has not been collected + selectorModelIDs[sVisibleStars] = MODEL_TRANSPARENT_STAR; + // If this is the first star that has not been collected, set + // the default selection to this star. + if (sInitSelectedActNum == 0) { + sInitSelectedActNum = sVisibleStars + 1; + sSelectableStarIndex = sVisibleStars; + } + } + sVisibleStars++; + } + + // If the stars have been collected in order so far, show the next star. + if (sVisibleStars == sObtainedStars && sVisibleStars != 6) { + selectorModelIDs[sVisibleStars] = MODEL_TRANSPARENT_STAR; + sInitSelectedActNum = sVisibleStars + 1; + sSelectableStarIndex = sVisibleStars; + sVisibleStars++; + } + + // If all stars have been collected, set the default selection to the last star. + if (sObtainedStars == 6) { + sInitSelectedActNum = sVisibleStars; + } + + //! Useless, since sInitSelectedActNum has already been set in this + //! scenario by the code that shows the next uncollected star. + if (sObtainedStars == 0) { + sInitSelectedActNum = 1; + } + + // Render star selector objects + for (i = 0; i < sVisibleStars; i++) { + sStarSelectorModels[i] = + spawn_object_abs_with_rot(gCurrentObject, 0, selectorModelIDs[i], bhvActSelectorStarType, + 75 + sVisibleStars * -75 + i * 152, 248, -300, 0, 0, 0); + sStarSelectorModels[i]->oStarSelectorSize = 1.0f; + } + + render_100_coin_star(stars); +} + +/** + * Act Selector Loop Action + * Handles star selector scrolling depending of what stars are + * selectable, whenever all 6 stars are obtained or not. + * Also handles 2 star selector types whenever the star is selected + * or not, the types are defined in bhv_act_selector_star_type_loop. + */ +void bhv_act_selector_loop(void) { + s8 i; + u8 starIndexCounter; + u8 stars = save_file_get_star_flags(gCurrSaveFileNum - 1, gCurrCourseNum - 1); + + if (sObtainedStars != 6) { + // Sometimes, stars are not selectable even if they appear on the screen. + // This code filters selectable and non-selectable stars. + sSelectedActIndex = 0; + handle_menu_scrolling(MENU_SCROLL_HORIZONTAL, &sSelectableStarIndex, 0, sObtainedStars); + starIndexCounter = sSelectableStarIndex; + for (i = 0; i < sVisibleStars; i++) { + // Can the star be selected (is it either already completed or the first non-completed mission) + if ((stars & (1 << i)) || i + 1 == sInitSelectedActNum) { + if (starIndexCounter == 0) { // We have reached the sSelectableStarIndex-th selectable star. + sSelectedActIndex = i; + break; + } + starIndexCounter--; + } + } + } else { + // If all stars are collected then they are all selectable. + handle_menu_scrolling(MENU_SCROLL_HORIZONTAL, &sSelectableStarIndex, 0, sVisibleStars - 1); + sSelectedActIndex = sSelectableStarIndex; + } + + // Star selector type handler + for (i = 0; i < sVisibleStars; i++) { + if (sSelectedActIndex == i) { + sStarSelectorModels[i]->oStarSelectorType = STAR_SELECTOR_SELECTED; + } else { + sStarSelectorModels[i]->oStarSelectorType = STAR_SELECTOR_NOT_SELECTED; + } + } +} + +/** + * Print the course number selected with the wood rgba16 course texture. + */ +static void print_course_number(void) { + u8 courseNum[4]; + + create_dl_translation_matrix(MENU_MTX_PUSH, 158.0f, 81.0f, 0.0f); + + gSPDisplayList(gDisplayListHead++, dl_menu_rgba16_wood_course); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); + + int_to_str(gCurrCourseNum, courseNum); + + if (gCurrCourseNum < 10) { // 1 digit number + print_hud_lut_string(HUD_LUT_GLOBAL, 152, 158, courseNum); + } else { // 2 digit number + print_hud_lut_string(HUD_LUT_GLOBAL, 143, 158, courseNum); + } + + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); +} + +#ifdef VERSION_JP +#define ACT_NAME_X 158 +#else +#define ACT_NAME_X 163 +#endif + +/** + * Print act selector strings, some with special checks. + */ +static void print_act_selector_strings(void) { +// TODO: EU relocates level and act name tables to translation segment 0x19 +#ifndef VERSION_EU + unsigned char myScore[] = { TEXT_MYSCORE }; + unsigned char starNumbers[] = { TEXT_ZERO }; + u8 **levelNameTbl = segmented_to_virtual(seg2_level_name_table); + u8 *currLevelName = segmented_to_virtual(levelNameTbl[gCurrCourseNum - 1]); + u8 **actNameTbl = segmented_to_virtual(seg2_act_name_table); + u8 *selectedActName; + s16 lvlNameX; + s16 actNameX; + s8 i; + + create_dl_ortho_matrix(); + + // Print the coin highscore. + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_begin); + gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); + print_hud_my_score_coins(1, gCurrSaveFileNum - 1, gCurrCourseNum - 1, 155, 106); + gSPDisplayList(gDisplayListHead++, dl_rgba16_text_end); + + gSPDisplayList(gDisplayListHead++, dl_ia8_text_begin); + gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, 255); + // Print the "MY SCORE" text if the coin score is more than 0 + if (save_file_get_course_coin_score(gCurrSaveFileNum - 1, gCurrCourseNum - 1) != 0) { + print_generic_string(102, 118, myScore); + } + // Print the level name; add 3 to skip the number and spacing to get to the actual string to center. + lvlNameX = get_str_x_pos_from_center(160, currLevelName + 3, 10.0f); + print_generic_string(lvlNameX, 33, currLevelName + 3); + gSPDisplayList(gDisplayListHead++, dl_ia8_text_end); + + print_course_number(); + + gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_begin); + gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, 255); + // Print the name of the selected act. + if (sVisibleStars != 0) { + selectedActName = segmented_to_virtual(actNameTbl[(gCurrCourseNum - 1) * 6 + sSelectedActIndex]); + actNameX = get_str_x_pos_from_center(ACT_NAME_X, selectedActName, 8.0f); + print_menu_generic_string(actNameX, 81, selectedActName); + } + + // Print the numbers above each star. + for (i = 1; i <= sVisibleStars; i++) { + starNumbers[0] = i; + print_menu_generic_string(i * 34 - sVisibleStars * 17 + 139, 38, starNumbers); + } + + gSPDisplayList(gDisplayListHead++, dl_menu_ia8_text_end); +#endif // !VERSION_EU +} + +/** + * Geo function that Print act selector strings. + *!@bug: This geo function is missing the third param. Harmless in practice due to o32 convention. + */ +Gfx *geo_act_selector_strings(s16 callContext, UNUSED struct GraphNode *node) { + if (callContext == GEO_CONTEXT_RENDER) { + print_act_selector_strings(); + } + return NULL; +} + +/** + * Initiates act selector values before entering a main course. + * Also load how much stars a course has, without counting the 100 coin star. + */ +void lvl_init_act_selector_values_and_stars(UNUSED s32 arg, UNUSED s32 unused) { + u8 stars = save_file_get_star_flags(gCurrSaveFileNum - 1, gCurrCourseNum - 1); + + sLoadedActNum = 0; + sInitSelectedActNum = 0; + sVisibleStars = 0; + sActSelectorMenuTimer = 0; + sObtainedStars = save_file_get_course_star_count(gCurrSaveFileNum - 1, gCurrCourseNum - 1); + + // Don't count 100 coin star + if (stars & (1 << 6)) { + sObtainedStars--; + } +} + +/** + * Loads act selector button actions with selected act value checks. + * Also updates objects and returns act number selected after is choosen. + */ +int lvl_update_obj_and_load_act_button_actions(UNUSED s32 arg, UNUSED s32 unused) { + if (sActSelectorMenuTimer >= 11) { + // If any of these buttons are pressed, play sound and go to course act + if ((gPlayer3Controller->buttonPressed & A_BUTTON) + || (gPlayer3Controller->buttonPressed & START_BUTTON) + || (gPlayer3Controller->buttonPressed & B_BUTTON)) { +#ifdef VERSION_JP + play_sound(SOUND_MENU_STAR_SOUND, gDefaultSoundArgs); +#else + play_sound(SOUND_MENU_STAR_SOUND_LETS_A_GO, gDefaultSoundArgs); +#endif + if (sInitSelectedActNum > sSelectedActIndex) { + sLoadedActNum = sSelectedActIndex + 1; + } else { + sLoadedActNum = sInitSelectedActNum; + } + gDialogCourseActNum = sSelectedActIndex + 1; + } + } + + area_update_objects(); + sActSelectorMenuTimer++; + return sLoadedActNum; +} diff --git a/src/menu/star_select.h b/src/menu/star_select.h new file mode 100644 index 0000000..57b6bd1 --- /dev/null +++ b/src/menu/star_select.h @@ -0,0 +1,11 @@ +#ifndef STAR_SELECT_H +#define STAR_SELECT_H + +enum StarSelectorTypes +{ + STAR_SELECTOR_NOT_SELECTED, + STAR_SELECTOR_SELECTED, + STAR_SELECTOR_100_COINS +}; + +#endif /* STAR_SELECT_H */ diff --git a/tools/textconv.c b/tools/textconv.c index 24cb34c..5159775 100644 --- a/tools/textconv.c +++ b/tools/textconv.c @@ -254,7 +254,7 @@ static int count_line_num(const char *start, const char *pos) return lineNum; } -static char *convert_string(char *pos, FILE *fout, const char *inputFileName, char *start) +static char *convert_string(char *pos, FILE *fout, const char *inputFileName, char *start, int uncompressed) { int hasString = 0; @@ -291,10 +291,11 @@ static char *convert_string(char *pos, FILE *fout, const char *inputFileName, ch // Find a charmap entry of longest length possible starting from this position while (*pos != '"') { - if (length == ARRAY_COUNT(entry->unicode)) + if ((uncompressed && length == 1) || length == ARRAY_COUNT(entry->unicode)) { // Stop searching after length 3; we only support strings of lengths up - // to that right now. + // to that right now. Unless uncompressed is set, in which we ignore multi + // texts by discarding entries longer than 1. break; } @@ -402,15 +403,21 @@ static void convert_file(const char *infilename, const char *outfilename) pos++; } // check for _( sequence - else if (*pos == '_' && (pos == in || !is_identifier_char(pos[-1]))) + else if ((*pos == '_') && (pos == in || !is_identifier_char(pos[-1]))) { + int uncompressed = 0; end = pos; pos++; + if (*pos == '_') // an extra _ signifies uncompressed strings. Enable uncompressed flag + { + pos++; + uncompressed = 1; + } if (*pos == '(') { pos++; fwrite(start, end - start, 1, fout); - pos = convert_string(pos, fout, infilename, in); + pos = convert_string(pos, fout, infilename, in, uncompressed); start = pos; } }