From f99e242d97602a67ddcb107627f56effc4afd065 Mon Sep 17 00:00:00 2001 From: coco875 <59367621+coco875@users.noreply.github.com> Date: Mon, 4 Mar 2024 17:02:45 +0100 Subject: [PATCH 01/10] Document render/update objects (#565) * Document objects related code. * Including render/update objects code * Various renamings --- .../code_80005FD0/func_80009B60.s | 6 +- .../code_8006E9C0/func_8006FA94.s | 8 +- .../code_80091750/func_8009F5E0.s | 2 +- .../code_80091750/func_800A1FB0.s | 8 +- .../code_80091750/func_800A5738.s | 14 +- .../func_8004C6FC.s | 2 +- .../func_8004D654.s | 0 .../func_8004F168.s | 2 +- .../func_80050E34.s | 0 .../func_800789AC.s | 0 .../func_8007B040.s | 0 .../func_8007C360.s | 4 +- .../func_8007C4A4.s | 4 +- .../func_80080E8C.s | 0 .../func_80081FF4.s | 0 .../func_80082F1C.s | 2 +- .../func_80086074.s | 0 ctx_includes.c | 4 +- docs/actors/actors.md | 2 +- docs/basics/controlflow.md | 4 +- include/actor_types.h | 167 +-- include/bomb_kart.h | 2 +- include/objects.h | 19 +- include/vehicles.h | 8 +- mk64.ld | 10 +- src/actors/boat.inc.c | 3 - src/actors/paddle_boat/render.inc.c | 45 + src/actors/paddle_boat/update.inc.c | 11 + src/code_800029B0.c | 8 +- src/code_80004740.c | 24 +- src/code_80005FD0.c | 202 ++-- src/code_80005FD0.h | 8 +- src/code_80057C60.c | 533 +++++----- src/code_80057C60.h | 62 +- src/code_8006E9C0.c | 38 +- src/code_8006E9C0.h | 6 +- src/code_80086E70.c | 440 ++++---- src/code_80086E70.h | 32 +- src/code_80091750.c | 855 ++++++++-------- src/code_80091750.h | 20 +- src/common_textures.h | 194 ++-- src/data/common_textures.inc.c | 188 ++-- src/debug/all_variables.h | 4 +- src/effects.c | 4 +- src/ending/ceremony_and_credits.c | 2 +- src/ending/code_80280000.c | 6 +- src/ending/code_80281780.c | 2 +- src/ending/code_80281C40.c | 5 +- src/ending/podium_ceremony_actors.c | 4 +- src/ending/podium_ceremony_actors.h | 2 +- src/main.c | 52 +- src/math_util_2.c | 14 +- src/math_util_2.h | 6 +- src/menus.c | 28 +- src/player_controller.c | 6 +- src/racing/actors.c | 202 ++-- src/racing/actors.h | 17 +- src/racing/actors_extended.c | 2 +- src/racing/math_util.c | 52 +- src/racing/math_util.h | 4 +- src/racing/race_logic.c | 4 +- src/racing/render_courses.c | 28 +- src/racing/skybox_and_splitscreen.c | 130 +-- src/racing/skybox_and_splitscreen.h | 18 +- src/{hud_renderer.c => render_objects.c} | 648 ++++++------ src/{hud_renderer.h => render_objects.h} | 115 ++- src/render_player.c | 2 +- src/{code_80071F00.c => update_objects.c} | 951 +++++++++--------- src/{code_80071F00.h => update_objects.h} | 68 +- tools/doxygen_syms.md | 760 +++++++------- tools/yaml/mk64.eu1.yaml | 2 +- tools/yaml/mk64.us.yaml | 2 +- 72 files changed, 3063 insertions(+), 3014 deletions(-) rename asm/non_matchings/{hud_renderer => render_objects}/func_8004C6FC.s (98%) rename asm/non_matchings/{hud_renderer => render_objects}/func_8004D654.s (100%) rename asm/non_matchings/{hud_renderer => render_objects}/func_8004F168.s (99%) rename asm/non_matchings/{hud_renderer => render_objects}/func_80050E34.s (100%) rename asm/non_matchings/{code_80071F00 => update_objects}/func_800789AC.s (100%) rename asm/non_matchings/{code_80071F00 => update_objects}/func_8007B040.s (100%) rename asm/non_matchings/{code_80071F00 => update_objects}/func_8007C360.s (94%) rename asm/non_matchings/{code_80071F00 => update_objects}/func_8007C4A4.s (94%) rename asm/non_matchings/{code_80071F00 => update_objects}/func_80080E8C.s (100%) rename asm/non_matchings/{code_80071F00 => update_objects}/func_80081FF4.s (100%) rename asm/non_matchings/{code_80071F00 => update_objects}/func_80082F1C.s (98%) rename asm/non_matchings/{code_80071F00 => update_objects}/func_80086074.s (100%) delete mode 100644 src/actors/boat.inc.c create mode 100644 src/actors/paddle_boat/render.inc.c create mode 100644 src/actors/paddle_boat/update.inc.c rename src/{hud_renderer.c => render_objects.c} (88%) rename src/{hud_renderer.h => render_objects.h} (87%) rename src/{code_80071F00.c => update_objects.c} (89%) rename src/{code_80071F00.h => update_objects.h} (90%) diff --git a/asm/non_matchings/code_80005FD0/func_80009B60.s b/asm/non_matchings/code_80005FD0/func_80009B60.s index f4c9b7d09..33b3c51e1 100644 --- a/asm/non_matchings/code_80005FD0/func_80009B60.s +++ b/asm/non_matchings/code_80005FD0/func_80009B60.s @@ -652,7 +652,7 @@ glabel func_80009B60 .L8000A488: /* 00B088 8000A488 00E02825 */ move $a1, $a3 /* 00B08C 8000A48C AFA8003C */ sw $t0, 0x3c($sp) -/* 00B090 8000A490 0C0AD489 */ jal get_angle_between_points +/* 00B090 8000A490 0C0AD489 */ jal get_angle_between_two_vectors /* 00B094 8000A494 24C40014 */ addiu $a0, $a2, 0x14 /* 00B098 8000A498 8FA60040 */ lw $a2, 0x40($sp) /* 00B09C 8000A49C 8FA8003C */ lw $t0, 0x3c($sp) @@ -718,7 +718,7 @@ glabel func_80009B60 /* 00B16C 8000A56C 1040008A */ beqz $v0, .L8000A798 /* 00B170 8000A570 8FAE0040 */ lw $t6, 0x40($sp) /* 00B174 8000A574 25C40020 */ addiu $a0, $t6, 0x20 -/* 00B178 8000A578 0C0AD489 */ jal get_angle_between_points +/* 00B178 8000A578 0C0AD489 */ jal get_angle_between_two_vectors /* 00B17C 8000A57C 25C50014 */ addiu $a1, $t6, 0x14 /* 00B180 8000A580 8FAC0034 */ lw $t4, 0x34($sp) /* 00B184 8000A584 3C188016 */ lui $t8, %hi(D_80163300) # $t8, 0x8016 @@ -1172,7 +1172,7 @@ glabel func_80009B60 /* 00B7F8 8000ABF8 C4A80008 */ lwc1 $f8, 8($a1) /* 00B7FC 8000ABFC AFA80020 */ sw $t0, 0x20($sp) /* 00B800 8000AC00 8FA4001C */ lw $a0, 0x1c($sp) -/* 00B804 8000AC04 0C0AD489 */ jal get_angle_between_points +/* 00B804 8000AC04 0C0AD489 */ jal get_angle_between_two_vectors /* 00B808 8000AC08 E4680000 */ swc1 $f8, ($v1) /* 00B80C 8000AC0C 3C013FC0 */ li $at, 0x3FC00000 # 1.500000 /* 00B810 8000AC10 44810000 */ mtc1 $at, $f0 diff --git a/asm/non_matchings/code_8006E9C0/func_8006FA94.s b/asm/non_matchings/code_8006E9C0/func_8006FA94.s index 64b860318..a4e9acbcf 100644 --- a/asm/non_matchings/code_8006E9C0/func_8006FA94.s +++ b/asm/non_matchings/code_8006E9C0/func_8006FA94.s @@ -324,10 +324,10 @@ glabel func_8006FA94 /* 070B5C 8006FF5C 3C198019 */ lui $t9, %hi(D_8018D214) # $t9, 0x8019 /* 070B60 8006FF60 AC38D214 */ sw $t8, %lo(D_8018D214)($at) /* 070B64 8006FF64 8F39D214 */ lw $t9, %lo(D_8018D214)($t9) -/* 070B68 8006FF68 3C018016 */ lui $at, %hi(D_801657B0) # $at, 0x8016 -/* 070B6C 8006FF6C 3C0E8016 */ lui $t6, %hi(D_801657B0) # $t6, 0x8016 -/* 070B70 8006FF70 A03957B0 */ sb $t9, %lo(D_801657B0)($at) -/* 070B74 8006FF74 81CE57B0 */ lb $t6, %lo(D_801657B0)($t6) +/* 070B68 8006FF68 3C018016 */ lui $at, %hi(gHUDDisable) # $at, 0x8016 +/* 070B6C 8006FF6C 3C0E8016 */ lui $t6, %hi(gHUDDisable) # $t6, 0x8016 +/* 070B70 8006FF70 A03957B0 */ sb $t9, %lo(gHUDDisable)($at) +/* 070B74 8006FF74 81CE57B0 */ lb $t6, %lo(gHUDDisable)($t6) /* 070B78 8006FF78 3C018016 */ lui $at, %hi(D_801657AE) # $at, 0x8016 /* 070B7C 8006FF7C 3C0F8019 */ lui $t7, %hi(D_8018D2F8) # $t7, 0x8019 /* 070B80 8006FF80 A02E57AE */ sb $t6, %lo(D_801657AE)($at) diff --git a/asm/non_matchings/code_80091750/func_8009F5E0.s b/asm/non_matchings/code_80091750/func_8009F5E0.s index e9df46a51..9ac5ff934 100644 --- a/asm/non_matchings/code_80091750/func_8009F5E0.s +++ b/asm/non_matchings/code_80091750/func_8009F5E0.s @@ -1331,7 +1331,7 @@ glabel L800A073C /* 0A1344 800A0744 10000060 */ b .L800A08C8 /* 0A1348 800A0748 8FBF0034 */ lw $ra, 0x34($sp) glabel L800A074C -/* 0A134C 800A074C 0C0292CE */ jal func_800A4B38 +/* 0A134C 800A074C 0C0292CE */ jal render_pause_menu /* 0A1350 800A0750 02202025 */ move $a0, $s1 /* 0A1354 800A0754 1000005C */ b .L800A08C8 /* 0A1358 800A0758 8FBF0034 */ lw $ra, 0x34($sp) diff --git a/asm/non_matchings/code_80091750/func_800A1FB0.s b/asm/non_matchings/code_80091750/func_800A1FB0.s index 316bd067b..77e8d38a5 100644 --- a/asm/non_matchings/code_80091750/func_800A1FB0.s +++ b/asm/non_matchings/code_80091750/func_800A1FB0.s @@ -103,7 +103,7 @@ glabel L800A2054 /* 0A2C78 800A2078 24130004 */ li $s3, 4 .L800A207C: /* 0A2C7C 800A207C 02402825 */ move $a1, $s2 -/* 0A2C80 800A2080 0C024889 */ jal func_80092224 +/* 0A2C80 800A2080 0C024889 */ jal set_text_color_rainbow_if_selected /* 0A2C84 800A2084 24060003 */ li $a2, 3 /* 0A2C88 800A2088 24040032 */ li $a0, 50 /* 0A2C8C 800A208C 02002825 */ move $a1, $s0 @@ -173,7 +173,7 @@ glabel L800A2118 /* 0A2D80 800A2180 2484FFE2 */ addiu $a0, $a0, -0x1e .L800A2184: /* 0A2D84 800A2184 02402825 */ move $a1, $s2 -/* 0A2D88 800A2188 0C024889 */ jal func_80092224 +/* 0A2D88 800A2188 0C024889 */ jal set_text_color_rainbow_if_selected /* 0A2D8C 800A218C 24060001 */ li $a2, 1 /* 0A2D90 800A2190 24040084 */ li $a0, 132 /* 0A2D94 800A2194 02002825 */ move $a1, $s0 @@ -408,7 +408,7 @@ glabel L800A23DC /* 0A30E4 800A24E4 8339EDEC */ lb $t9, %lo(D_8018EDEC)($t9) /* 0A30E8 800A24E8 02002825 */ move $a1, $s0 /* 0A30EC 800A24EC 24060001 */ li $a2, 1 -/* 0A30F0 800A24F0 0C024870 */ jal func_800921C0 +/* 0A30F0 800A24F0 0C024870 */ jal text_rainbow_effect /* 0A30F4 800A24F4 03352023 */ subu $a0, $t9, $s5 /* 0A30F8 800A24F8 3C088019 */ lui $t0, %hi(D_8018EDEC) # $t0, 0x8019 /* 0A30FC 800A24FC 8108EDEC */ lb $t0, %lo(D_8018EDEC)($t0) @@ -735,7 +735,7 @@ glabel L800A26A8 /* 0A3584 800A2984 A7B100E0 */ sh $s1, 0xe0($sp) /* 0A3588 800A2988 A7AF00E2 */ sh $t7, 0xe2($sp) .L800A298C: -/* 0A358C 800A298C 0C024870 */ jal func_800921C0 +/* 0A358C 800A298C 0C024870 */ jal text_rainbow_effect /* 0A3590 800A2990 24060003 */ li $a2, 3 /* 0A3594 800A2994 02202025 */ move $a0, $s1 /* 0A3598 800A2998 240500D2 */ li $a1, 210 diff --git a/asm/non_matchings/code_80091750/func_800A5738.s b/asm/non_matchings/code_80091750/func_800A5738.s index 8bcf2b4ef..098b370bc 100644 --- a/asm/non_matchings/code_80091750/func_800A5738.s +++ b/asm/non_matchings/code_80091750/func_800A5738.s @@ -85,8 +85,8 @@ glabel func_800A5738 /* 0A6374 800A5774 54200228 */ bnel $at, $zero, .L800A6018 /* 0A6378 800A5778 8FBF0044 */ lw $ra, 0x44($sp) /* 0A637C 800A577C 8DEFC54C */ lw $t7, %lo(gGlobalTimer)($t7) -/* 0A6380 800A5780 3C11800E */ lui $s1, %hi(D_800E775C) # $s1, 0x800e -/* 0A6384 800A5784 2631775C */ addiu $s1, %lo(D_800E775C) # addiu $s1, $s1, 0x775c +/* 0A6380 800A5780 3C11800E */ lui $s1, %hi(gTextPauseButton) # $s1, 0x800e +/* 0A6384 800A5784 2631775C */ addiu $s1, %lo(gTextPauseButton) # addiu $s1, $s1, 0x775c /* 0A6388 800A5788 05E10003 */ bgez $t7, .L800A5798 /* 0A638C 800A578C 000FC103 */ sra $t8, $t7, 4 /* 0A6390 800A5790 25E1000F */ addiu $at, $t7, 0xf @@ -327,9 +327,9 @@ glabel L800A5940 /* 0A6724 800A5B24 0C024E7F */ jal text_draw /* 0A6728 800A5B28 E7B40014 */ swc1 $f20, 0x14($sp) /* 0A672C 800A5B2C 3C013F40 */ li $at, 0x3F400000 # 0.750000 -/* 0A6730 800A5B30 3C02800E */ lui $v0, %hi(D_800E775C) # $v0, 0x800e +/* 0A6730 800A5B30 3C02800E */ lui $v0, %hi(gTextPauseButton) # $v0, 0x800e /* 0A6734 800A5B34 4481A000 */ mtc1 $at, $f20 -/* 0A6738 800A5B38 2442775C */ addiu $v0, %lo(D_800E775C) # addiu $v0, $v0, 0x775c +/* 0A6738 800A5B38 2442775C */ addiu $v0, %lo(gTextPauseButton) # addiu $v0, $v0, 0x775c /* 0A673C 800A5B3C 00008825 */ move $s1, $zero /* 0A6740 800A5B40 00008025 */ move $s0, $zero /* 0A6744 800A5B44 24120006 */ li $s2, 6 @@ -338,7 +338,7 @@ glabel L800A5940 /* 0A674C 800A5B4C AFA20050 */ sw $v0, 0x50($sp) /* 0A6750 800A5B50 02202825 */ move $a1, $s1 /* 0A6754 800A5B54 24060001 */ li $a2, 1 -/* 0A6758 800A5B58 0C024870 */ jal func_800921C0 +/* 0A6758 800A5B58 0C024870 */ jal text_rainbow_effect /* 0A675C 800A5B5C 2484FFF5 */ addiu $a0, $a0, -0xb /* 0A6760 800A5B60 3C0E800F */ lui $t6, %hi(D_800E8538 + 2) # $t6, 0x800f /* 0A6764 800A5B64 8FA20050 */ lw $v0, 0x50($sp) @@ -425,7 +425,7 @@ glabel L800A5C18 /* 0A6894 800A5C94 8E640004 */ lw $a0, 4($s3) /* 0A6898 800A5C98 02202825 */ move $a1, $s1 /* 0A689C 800A5C9C 24060001 */ li $a2, 1 -/* 0A68A0 800A5CA0 0C024870 */ jal func_800921C0 +/* 0A68A0 800A5CA0 0C024870 */ jal text_rainbow_effect /* 0A68A4 800A5CA4 2484FFE2 */ addiu $a0, $a0, -0x1e /* 0A68A8 800A5CA8 26240001 */ addiu $a0, $s1, 1 /* 0A68AC 800A5CAC AFA40054 */ sw $a0, 0x54($sp) @@ -556,7 +556,7 @@ glabel L800A5E00 /* 0A6A7C 800A5E7C AFA20050 */ sw $v0, 0x50($sp) /* 0A6A80 800A5E80 02202825 */ move $a1, $s1 /* 0A6A84 800A5E84 24060001 */ li $a2, 1 -/* 0A6A88 800A5E88 0C024870 */ jal func_800921C0 +/* 0A6A88 800A5E88 0C024870 */ jal text_rainbow_effect /* 0A6A8C 800A5E8C 2484FFDD */ addiu $a0, $a0, -0x23 /* 0A6A90 800A5E90 8FA20050 */ lw $v0, 0x50($sp) /* 0A6A94 800A5E94 8E6F000C */ lw $t7, 0xc($s3) diff --git a/asm/non_matchings/hud_renderer/func_8004C6FC.s b/asm/non_matchings/render_objects/func_8004C6FC.s similarity index 98% rename from asm/non_matchings/hud_renderer/func_8004C6FC.s rename to asm/non_matchings/render_objects/func_8004C6FC.s index 9915b3988..e26f8868e 100644 --- a/asm/non_matchings/hud_renderer/func_8004C6FC.s +++ b/asm/non_matchings/render_objects/func_8004C6FC.s @@ -74,7 +74,7 @@ glabel func_8004C6FC /* 04D410 8004C810 02003025 */ move $a2, $s0 /* 04D414 8004C814 00008812 */ mflo $s1 /* 04D418 8004C818 00116880 */ sll $t5, $s1, 2 -/* 04D41C 8004C81C 0C010F0A */ jal func_80043C28 +/* 04D41C 8004C81C 0C010F0A */ jal load_texture_tile_rgba32_nomirror /* 04D420 8004C820 01A08825 */ move $s1, $t5 /* 04D424 8004C824 240E0001 */ li $t6, 1 /* 04D428 8004C828 AFAE0010 */ sw $t6, 0x10($sp) diff --git a/asm/non_matchings/hud_renderer/func_8004D654.s b/asm/non_matchings/render_objects/func_8004D654.s similarity index 100% rename from asm/non_matchings/hud_renderer/func_8004D654.s rename to asm/non_matchings/render_objects/func_8004D654.s diff --git a/asm/non_matchings/hud_renderer/func_8004F168.s b/asm/non_matchings/render_objects/func_8004F168.s similarity index 99% rename from asm/non_matchings/hud_renderer/func_8004F168.s rename to asm/non_matchings/render_objects/func_8004F168.s index 503ba1c7a..9e763f137 100644 --- a/asm/non_matchings/hud_renderer/func_8004F168.s +++ b/asm/non_matchings/render_objects/func_8004F168.s @@ -157,7 +157,7 @@ glabel func_8004F168 /* 04FFC4 8004F3C4 8FBF002C */ lw $ra, 0x2c($sp) .L8004F3C8: /* 04FFC8 8004F3C8 25CED0D8 */ addiu $t6, %lo(common_texture_minimap_progress_dot) # addiu $t6, $t6, -0x2f28 -/* 04FFCC 8004F3CC 0C0130D9 */ jal func_8004C364 +/* 04FFCC 8004F3CC 0C0130D9 */ jal draw_hud_2d_texture /* 04FFD0 8004F3D0 AFAE0010 */ sw $t6, 0x10($sp) .L8004F3D4: /* 04FFD4 8004F3D4 8FBF002C */ lw $ra, 0x2c($sp) diff --git a/asm/non_matchings/hud_renderer/func_80050E34.s b/asm/non_matchings/render_objects/func_80050E34.s similarity index 100% rename from asm/non_matchings/hud_renderer/func_80050E34.s rename to asm/non_matchings/render_objects/func_80050E34.s diff --git a/asm/non_matchings/code_80071F00/func_800789AC.s b/asm/non_matchings/update_objects/func_800789AC.s similarity index 100% rename from asm/non_matchings/code_80071F00/func_800789AC.s rename to asm/non_matchings/update_objects/func_800789AC.s diff --git a/asm/non_matchings/code_80071F00/func_8007B040.s b/asm/non_matchings/update_objects/func_8007B040.s similarity index 100% rename from asm/non_matchings/code_80071F00/func_8007B040.s rename to asm/non_matchings/update_objects/func_8007B040.s diff --git a/asm/non_matchings/code_80071F00/func_8007C360.s b/asm/non_matchings/update_objects/func_8007C360.s similarity index 94% rename from asm/non_matchings/code_80071F00/func_8007C360.s rename to asm/non_matchings/update_objects/func_8007C360.s index b792c6fa0..abed9a642 100644 --- a/asm/non_matchings/code_80071F00/func_8007C360.s +++ b/asm/non_matchings/update_objects/func_8007C360.s @@ -30,7 +30,7 @@ glabel func_8007C360 /* 07CFCC 8007C3CC 01403825 */ move $a3, $t2 /* 07CFD0 8007C3D0 24050080 */ li $a1, 128 /* 07CFD4 8007C3D4 AFA60020 */ sw $a2, 0x20($sp) -/* 07CFD8 8007C3D8 0C01C87A */ jal set_object_flag_unk_054_false +/* 07CFD8 8007C3D8 0C01C87A */ jal set_object_flag_status_false /* 07CFDC 8007C3DC AFAA001C */ sw $t2, 0x1c($sp) /* 07CFE0 8007C3E0 8FA60020 */ lw $a2, 0x20($sp) /* 07CFE4 8007C3E4 8FA7001C */ lw $a3, 0x1c($sp) @@ -38,7 +38,7 @@ glabel func_8007C360 /* 07CFEC 8007C3EC A0C700D2 */ sb $a3, 0xd2($a2) .L8007C3F0: /* 07CFF0 8007C3F0 AFA60020 */ sw $a2, 0x20($sp) -/* 07CFF4 8007C3F4 0C01C870 */ jal set_object_flag_unk_054_true +/* 07CFF4 8007C3F4 0C01C870 */ jal set_object_flag_status_true /* 07CFF8 8007C3F8 AFA7001C */ sw $a3, 0x1c($sp) /* 07CFFC 8007C3FC 8FA7001C */ lw $a3, 0x1c($sp) /* 07D000 8007C400 8FA60020 */ lw $a2, 0x20($sp) diff --git a/asm/non_matchings/code_80071F00/func_8007C4A4.s b/asm/non_matchings/update_objects/func_8007C4A4.s similarity index 94% rename from asm/non_matchings/code_80071F00/func_8007C4A4.s rename to asm/non_matchings/update_objects/func_8007C4A4.s index a305f3d8e..e652742aa 100644 --- a/asm/non_matchings/code_80071F00/func_8007C4A4.s +++ b/asm/non_matchings/update_objects/func_8007C4A4.s @@ -24,7 +24,7 @@ glabel func_8007C4A4 /* 07D0F8 8007C4F8 01003025 */ move $a2, $t0 /* 07D0FC 8007C4FC 24050080 */ li $a1, 128 /* 07D100 8007C500 AFA30020 */ sw $v1, 0x20($sp) -/* 07D104 8007C504 0C01C87A */ jal set_object_flag_unk_054_false +/* 07D104 8007C504 0C01C87A */ jal set_object_flag_status_false /* 07D108 8007C508 AFA8001C */ sw $t0, 0x1c($sp) /* 07D10C 8007C50C 8FA30020 */ lw $v1, 0x20($sp) /* 07D110 8007C510 8FA6001C */ lw $a2, 0x1c($sp) @@ -33,7 +33,7 @@ glabel func_8007C4A4 .L8007C51C: /* 07D11C 8007C51C 24050080 */ li $a1, 128 /* 07D120 8007C520 AFA30020 */ sw $v1, 0x20($sp) -/* 07D124 8007C524 0C01C870 */ jal set_object_flag_unk_054_true +/* 07D124 8007C524 0C01C870 */ jal set_object_flag_status_true /* 07D128 8007C528 AFA6001C */ sw $a2, 0x1c($sp) /* 07D12C 8007C52C 8FA6001C */ lw $a2, 0x1c($sp) /* 07D130 8007C530 8FA30020 */ lw $v1, 0x20($sp) diff --git a/asm/non_matchings/code_80071F00/func_80080E8C.s b/asm/non_matchings/update_objects/func_80080E8C.s similarity index 100% rename from asm/non_matchings/code_80071F00/func_80080E8C.s rename to asm/non_matchings/update_objects/func_80080E8C.s diff --git a/asm/non_matchings/code_80071F00/func_80081FF4.s b/asm/non_matchings/update_objects/func_80081FF4.s similarity index 100% rename from asm/non_matchings/code_80071F00/func_80081FF4.s rename to asm/non_matchings/update_objects/func_80081FF4.s diff --git a/asm/non_matchings/code_80071F00/func_80082F1C.s b/asm/non_matchings/update_objects/func_80082F1C.s similarity index 98% rename from asm/non_matchings/code_80071F00/func_80082F1C.s rename to asm/non_matchings/update_objects/func_80082F1C.s index 2ca4daae5..c1ca1f90e 100644 --- a/asm/non_matchings/code_80071F00/func_80082F1C.s +++ b/asm/non_matchings/update_objects/func_80082F1C.s @@ -56,7 +56,7 @@ glabel func_80082F1C /* 083BD8 80082FD8 44050000 */ mfc1 $a1, $f0 /* 083BDC 80082FDC 44060000 */ mfc1 $a2, $f0 /* 083BE0 80082FE0 44070000 */ mfc1 $a3, $f0 -/* 083BE4 80082FE4 0C022E03 */ jal func_8008B80C +/* 083BE4 80082FE4 0C022E03 */ jal set_obj_origin_offset /* 083BE8 80082FE8 00000000 */ nop /* 083BEC 80082FEC 8FA20024 */ lw $v0, 0x24($sp) /* 083BF0 80082FF0 02002025 */ move $a0, $s0 diff --git a/asm/non_matchings/code_80071F00/func_80086074.s b/asm/non_matchings/update_objects/func_80086074.s similarity index 100% rename from asm/non_matchings/code_80071F00/func_80086074.s rename to asm/non_matchings/update_objects/func_80086074.s diff --git a/ctx_includes.c b/ctx_includes.c index ab94fe4a2..2af785461 100644 --- a/ctx_includes.c +++ b/ctx_includes.c @@ -70,7 +70,7 @@ #include "src/code_8003DC40.h" #include "src/code_80057C60.h" #include "src/code_8006E9C0.h" -#include "src/code_80071F00.h" +#include "src/update_objects.h" #include "src/code_80086E70.h" #include "src/code_80091440.h" #include "src/code_80091750.h" @@ -89,7 +89,7 @@ #include "src/ending/code_80281C40.h" #include "src/ending/credits.h" #include "src/ending/podium_ceremony_actors.h" -#include "src/hud_renderer.h" +#include "src/render_objects.h" #include "src/kart_dma.h" #include "src/main.h" #include "src/math_util_2.h" diff --git a/docs/actors/actors.md b/docs/actors/actors.md index 31dbd9c71..b60a46b0f 100644 --- a/docs/actors/actors.md +++ b/docs/actors/actors.md @@ -30,7 +30,7 @@ void actor_name(Camera, Mat4, actor) { ``` Check actor_types.h for a full list of options. You can create a new actor struct for your actor and customize it or use a predefined one. All actor structs must retain the same size. Generally, the types in the struct may be modified so long as `type` and `flags` stay the same as those are used elsewhere. -See `update_obj_railroad_crossing` for an example of how a timer may be setup and used. +See `update_actor_railroad_crossing` for an example of how a timer may be setup and used. Audio may be activated using the following method: @ref func_800C98B8 diff --git a/docs/basics/controlflow.md b/docs/basics/controlflow.md index 4fb5247bf..d53d46357 100644 --- a/docs/basics/controlflow.md +++ b/docs/basics/controlflow.md @@ -89,7 +89,7 @@ Object related code resides in |file|desc| |---|---| |[code_80057C60](@ref code_80057C60.c)|Objects| -|[code_80071F00](@ref code_80071F00.c)|Objects| +|[update_objects](@ref update_objects.c)|Objects| |[code_80086E70](@ref code_80086E70.c)|Objects| Documentation of the specifics still in-progress. See [actors](actorsmenu.html) for more information. @@ -114,7 +114,7 @@ Course related code resides in ## UI & Other 2D Screen data |file|desc| |---|---| -|[hud_renderer](@ref hud_renderer.c)|ItemWindows| +|[render_objects](@ref render_objects.c)|ItemWindows| ## Engine |file|desc| diff --git a/include/actor_types.h b/include/actor_types.h index ccf405c72..1579a5300 100644 --- a/include/actor_types.h +++ b/include/actor_types.h @@ -9,70 +9,71 @@ //#pragma GCC diagnostic ignored "-Wmicrosoft-extension" //#pragma GCC diagnostic ignored "-Wmissing-member-name-in-structure-/-union" -/* -gActorList should be understood to be populated by generic Actor structs. -However, for human readability, many functions interacting with actor list elements expect one of the many -specialized types found in this file. - -Note that specialized types must be the same size as a plain Actor. Don't be mislead into thinking that -because its a separate type that it can modified separately from plain Actor. If you modify/add an actor type -and its size is different from plain Actor's, you WILL run into buggy (potentially crash inducing) behaviour. - -Specialized structs are customizable so long as the following member specifications are met: - -In general: - 0x00 -> s16 type - 0x02 -> s16 flags - 0x30 -> Collision unk30 - -If player can collide with the actor: - 0x0C -> f32 boundingBoxSize - -If the actor makes sound (necessary for doppler/volume stuff): - 0x18 -> Vec3f pos - 0x24 -> Vec3f velocity - -Other members are more flexible, and even the non-general specifications can be ignored IF AND ONLY IF you know -exactly what you're doing. -*/ - -#define ACTOR_TREE_MARIO_RACEWAY 0x02 -#define ACTOR_TREE_YOSHI_VALLEY 0x03 -#define ACTOR_TREE_ROYAL_RACEWAY 0x04 -#define ACTOR_FALLING_ROCK 0x05 -#define ACTOR_BANANA 0x06 -#define ACTOR_GREEN_SHELL 0x07 -#define ACTOR_RED_SHELL 0x08 -#define ACTOR_YOSHI_VALLEY_EGG 0x09 -#define ACTOR_PIRANHA_PLANT 0x0A -#define ACTOR_ITEM_BOX 0x0C -#define ACTOR_FAKE_ITEM_BOX 0x0D -#define ACTOR_BANANA_BUNCH 0x0E -#define ACTOR_TRAIN_ENGINE 0x0F -#define ACTOR_TRAIN_TENDER 0x10 -#define ACTOR_TRAIN_PASSENGER_CAR 0x11 -#define ACTOR_COW 0x12 -#define ACTOR_TREE_MOO_MOO_FARM 0x13 -#define ACTOR_TRIPLE_GREEN_SHELL 0x15 -#define ACTOR_TRIPLE_RED_SHELL 0x16 -#define ACTOR_MARIO_RACEWAY_SIGN 0x17 -#define ACTOR_PALM_TREE 0x19 -#define ACTOR_TREE_BOWSERS_CASTLE 0x1C -#define ACTOR_TREE_FRAPPE_SNOWLAND 0x1D -#define ACTOR_CACTUS1_KALAMARI_DESERT 0x1E -#define ACTOR_CACTUS2_KALAMARI_DESERT 0x1F -#define ACTOR_CACTUS3_KALAMARI_DESERT 0x20 -#define ACTOR_BUSH_BOWSERS_CASTLE 0x21 -#define ACTOR_WARIO_STADIUM_SIGN 0x23 -#define ACTOR_BOX_TRUCK 0x25 -#define ACTOR_PADDLE_WHEEL_BOAT 0x26 -#define ACTOR_RAILROAD_CROSSING 0x27 -#define ACTOR_SCHOOL_BUS 0x28 -#define ACTOR_TANKER_TRUCK 0x29 -#define ACTOR_BLUE_SPINY_SHELL 0x2A -#define ACTOR_HOT_AIR_BALLOON_ITEM_BOX 0x2B -#define ACTOR_CAR 0x2C -#define ACTOR_KIWANO_FRUIT 0x2D +/** + * gActorList should be understood to be populated by generic Actor structs. + * However, for human readability, many functions interacting with actor list elements expect one of the many + * specialized types found in this file. + * + * Note that specialized types must be the same size as a plain Actor. Don't be mislead into thinking that + * because its a separate type that it can modified separately from plain Actor. If you modify/add an actor type + * and its size is different from plain Actor's, you WILL run into buggy (potentially crash inducing) behaviour. + * + * Specialized structs are customizable so long as the following member specifications are met: + * + * In general: + * 0x00 -> s16 type + * 0x02 -> s16 flags + * 0x30 -> Collision unk30 + * + * If player can collide with the actor: + * 0x0C -> f32 boundingBoxSize + * + * If the actor makes sound (necessary for doppler/volume stuff): + * 0x18 -> Vec3f pos + * 0x24 -> Vec3f velocity + * + * Other members are more flexible, and even the non-general specifications can be ignored IF AND ONLY IF you know + * exactly what you're doing. + */ +enum ActorType { + ACTOR_TREE_MARIO_RACEWAY = 0x02, + ACTOR_TREE_YOSHI_VALLEY, + ACTOR_TREE_ROYAL_RACEWAY, + ACTOR_FALLING_ROCK, + ACTOR_BANANA, + ACTOR_GREEN_SHELL, + ACTOR_RED_SHELL, + ACTOR_YOSHI_VALLEY_EGG, + ACTOR_PIRANHA_PLANT, + ACTOR_ITEM_BOX = 0x0C, + ACTOR_FAKE_ITEM_BOX, + ACTOR_BANANA_BUNCH, + ACTOR_TRAIN_ENGINE, + ACTOR_TRAIN_TENDER, + ACTOR_TRAIN_PASSENGER_CAR, + ACTOR_COW, + ACTOR_TREE_MOO_MOO_FARM, + ACTOR_TRIPLE_GREEN_SHELL = 0x15, + ACTOR_TRIPLE_RED_SHELL, + ACTOR_MARIO_SIGN, + ACTOR_PALM_TREE = 0x19, + ACTOR_TREE_BOWSERS_CASTLE = 0x1C, + ACTOR_TREE_FRAPPE_SNOWLAND, + ACTOR_CACTUS1_KALAMARI_DESERT, + ACTOR_CACTUS2_KALAMARI_DESERT, + ACTOR_CACTUS3_KALAMARI_DESERT, + ACTOR_BUSH_BOWSERS_CASTLE, + ACTOR_WARIO_SIGN = 0x23, + ACTOR_BOX_TRUCK = 0x25, + ACTOR_PADDLE_BOAT, + ACTOR_RAILROAD_CROSSING, + ACTOR_SCHOOL_BUS, + ACTOR_TANKER_TRUCK, + ACTOR_BLUE_SPINY_SHELL, + ACTOR_HOT_AIR_BALLOON_ITEM_BOX, + ACTOR_CAR, + ACTOR_KIWANO_FRUIT, +}; #define ACTOR_LIST_SIZE 100 @@ -80,23 +81,29 @@ exactly what you're doing. #define ACTOR_IS_NOT_EXPIRED 0xF // The actor possesses some kind of collision and can be removed // Actor shell->state (green, red and blue) -#define HELD_SHELL 0 // Single shell that has not been dropped. (probably holding Z). -#define RELEASED_SHELL 1 // This is the short window where single shells aren't being held or launched. -#define MOVING_SHELL 2 // Moving towards its target after being shot. -#define RED_SHELL_LOCK_ON 3 // Red shell is targeting. -#define TRIPLE_GREEN_SHELL 4 // Loses triple shell state when shot. -#define GREEN_SHELL_HIT_A_RACER 5 // A racer has been hit by a green shell. -#define TRIPLE_RED_SHELL 6 // Loses triple shell state when shot. -#define DESTROYED_SHELL 7 // Collision with the shell. -#define BLUE_SHELL_LOCK_ON 8 // A blue shell has found a target and is hastily approaching it. -#define BLUE_SHELL_TARGET_ELIMINATED 9 // Mission completed, well done boss. +enum ShellState { + HELD_SHELL, // Single shell that has not been dropped. (probably holding Z). + RELEASED_SHELL, // This is the short window where single shells aren't being held or launched. + MOVING_SHELL, // Moving towards its target after being shot. + RED_SHELL_LOCK_ON, // Red shell is targeting. + TRIPLE_GREEN_SHELL, // Loses triple shell state when shot. + GREEN_SHELL_HIT_A_RACER, // A racer has been hit by a green shell. + TRIPLE_RED_SHELL, // Loses triple shell state when shot. + DESTROYED_SHELL, // Collision with the shell. + BLUE_SHELL_LOCK_ON, // A blue shell has found a target and is hastily approaching it. + BLUE_SHELL_TARGET_ELIMINATED, // Mission completed, well done boss. +}; + // Actor banana->state -#define HELD_BANANA 0 // Single banana that has not been dropped. -#define DROPPED_BANANA 1 // A banana in the state of being dropped on the ground (it only last for a few frames). -#define FIRST_BANANA_BUNCH_BANANA 2 // The first banana of the banana bunch -#define BANANA_BUNCH_BANANA 3 // Every banana of the banana bunch except the first one. -#define BANANA_ON_GROUND 4 // A banana sitting on the ground. -#define DESTROYED_BANANA 5 // Collision with the banana. +enum BananaState { + HELD_BANANA, // Single banana that has not been dropped. + DROPPED_BANANA, // A banana in the state of being dropped on the ground (it only last for a few frames). + FIRST_BANANA_BUNCH_BANANA, // The first banana of the banana bunch + BANANA_BUNCH_BANANA, // Every banana of the banana bunch except the first one. + BANANA_ON_GROUND, // A banana sitting on the ground. + DESTROYED_BANANA, // Collision with the banana. +}; + // Actor fakeItemBox->state #define HELD_FAKE_ITEM_BOX 0 // Item box is being held be Z. #define FAKE_ITEM_BOX_ON_GROUND 1 // Item box is on the ground. diff --git a/include/bomb_kart.h b/include/bomb_kart.h index df8fa073f..9987099af 100644 --- a/include/bomb_kart.h +++ b/include/bomb_kart.h @@ -52,7 +52,7 @@ typedef struct { } BombKart; // size = 0x54 //! Indexes for the objects associated with the Bomb Karts -extern s32 D_80183DD8[NUM_BOMB_KARTS_MAX]; +extern s32 gIndexObjectBombKart[NUM_BOMB_KARTS_MAX]; extern BombKart gBombKarts[NUM_BOMB_KARTS_MAX]; extern Collision D_80164038[NUM_BOMB_KARTS_MAX]; diff --git a/include/objects.h b/include/objects.h index 84d71873d..88dc9a7a8 100644 --- a/include/objects.h +++ b/include/objects.h @@ -13,14 +13,14 @@ typedef struct /* 0x04 */ Vec3f pos; /* 0x10 */ Vec3f origin_pos; /* 0x1C */ Vec3f unk_01C; - /* 0x28 */ Vec3f unk_028; + /* 0x28 */ Vec3f offset; /* 0x34 */ f32 unk_034; - /* 0x38 */ Vec3f velocity; + /* 0x38 */ Vec3f velocity; // acceleration /* 0x44 */ f32 unk_044; /* 0x48 */ s32 unk_048; /* 0x4C */ s32 unk_04C; /* 0x50 */ s32 unk_050; - /* 0x54 */ s32 unk_054; + /* 0x54 */ s32 status; /* 0x58 */ s32 unk_058; /* 0x5C */ s32 unk_05C; /* 0x60 */ u8 *activeTLUT; @@ -42,7 +42,7 @@ typedef struct /* 0x9A */ u16 unk_09A; /* 0x9C */ s16 unk_09C; /* 0x9E */ s16 unk_09E; - /* 0xA0 */ s16 unk_0A0; + /* 0xA0 */ s16 primAlpha; /* 0xA2 */ s16 unk_0A2; /* 0xA4 */ s16 type; /* 0xA6 */ s16 state; @@ -89,14 +89,14 @@ typedef struct /* 0x04 */ Vec3f pos; /* 0x10 */ Vec3f origin_pos; /* 0x1C */ Vec3f unk_01C; - /* 0x28 */ Vec3f unk_028; + /* 0x28 */ Vec3f offset; /* 0x34 */ f32 unk_034; /* 0x38 */ Vec3f velocity; /* 0x44 */ f32 unk_044; /* 0x48 */ s32 unk_048; /* 0x4C */ s32 unk_04C; /* 0x50 */ s32 unk_050; - /* 0x54 */ s32 unk_054; + /* 0x54 */ s32 status; /* 0x58 */ s32 unk_058; /* 0x5C */ s32 unk_05C; /* 0x60 */ u8 *activeTLUT; @@ -118,7 +118,7 @@ typedef struct /* 0x9A */ u16 unk_09A; /* 0x9C */ s16 unk_09C; /* 0x9E */ s16 unk_09E; - /* 0xA0 */ s16 unk_0A0; + /* 0xA0 */ s16 primAlpha; /* 0xA2 */ s16 unk_0A2; /* 0xA4 */ s16 currentItem; /* 0xA6 */ s16 itemDisplayState; // Usually a state tracker @@ -159,6 +159,11 @@ typedef struct // This are other lists of indices in gObjectList. +/** + * @brief Status flags for objects + */ +#define VISIBLE 0x00040000 + /** * Use unknown. An object is reserved and its index is saved to * this variable, but it appears to go unreferenced diff --git a/include/vehicles.h b/include/vehicles.h index 8c8bf2ef5..ff1fa3b35 100644 --- a/include/vehicles.h +++ b/include/vehicles.h @@ -11,8 +11,8 @@ #define LOCOMOTIVE_ONLY 0 // It seems like there's room for 2 Ferries, but only 1 is ever active -#define NUM_ACTIVE_PADDLE_WHEEL_BOATS 1 -#define NUM_PADDLE_WHEEL_BOATS 2 +#define NUM_ACTIVE_PADDLE_BOATS 1 +#define NUM_PADDLE_BOATS 2 #define NUM_RACE_BOX_TRUCKS 7 #define NUM_RACE_SCHOOL_BUSES 7 @@ -59,7 +59,7 @@ typedef struct { * Probably audio related **/ /* 0x28 */ s32 someFlags; -} PaddleWheelBoatStuff; // size = 0x2C +} PaddleBoatStuff; // size = 0x2C typedef struct { /* 0x00 */ s16 unused; // Gets set to 0, but doesn't seem to have any purpose @@ -85,7 +85,7 @@ typedef struct { extern TrainStuff gTrainList[]; // This is an array, maybe they intended to have multiple boats at some point in development? -extern PaddleWheelBoatStuff gFerries[]; +extern PaddleBoatStuff gPaddleBoats[]; // Lists for different vehicles in Toad's Turnpike extern VehicleStuff gBoxTruckList[]; diff --git a/mk64.ld b/mk64.ld index c5d10071b..49aacb1d4 100644 --- a/mk64.ld +++ b/mk64.ld @@ -57,10 +57,10 @@ SECTIONS BUILD_DIR/asm/tkmk00_decode.o(.text); BUILD_DIR/src/gbiMacro.o(.text); BUILD_DIR/src/math_util_2.o(.text); - BUILD_DIR/src/hud_renderer.o(.text); + BUILD_DIR/src/render_objects.o(.text); BUILD_DIR/src/code_80057C60.o(.text); BUILD_DIR/src/code_8006E9C0.o(.text); - BUILD_DIR/src/code_80071F00.o(.text); + BUILD_DIR/src/update_objects.o(.text); BUILD_DIR/src/code_80086E70.o(.text); BUILD_DIR/src/effects.o(.text); BUILD_DIR/src/code_80091440.o(.text); @@ -216,7 +216,7 @@ SECTIONS BUILD_DIR/src/data/kart_attributes.inc.o(.data); BUILD_DIR/src/player_controller.o(.data); BUILD_DIR/src/spawn_players.o(.data); - BUILD_DIR/src/code_80071F00.o(.data); + BUILD_DIR/src/update_objects.o(.data); BUILD_DIR/src/data/data_800E45C0.o(.data); BUILD_DIR/src/code_80057C60.o(.data); BUILD_DIR/src/data/some_data.o(.data); @@ -264,10 +264,10 @@ SECTIONS BUILD_DIR/src/player_controller.o(.rodata); BUILD_DIR/src/spawn_players.o(.rodata); BUILD_DIR/src/code_8003DC40.o(.rodata); - BUILD_DIR/src/hud_renderer.o(.rodata); + BUILD_DIR/src/render_objects.o(.rodata); BUILD_DIR/src/code_80057C60.o(.rodata); BUILD_DIR/src/code_8006E9C0.o(.rodata); - BUILD_DIR/src/code_80071F00.o(.rodata); + BUILD_DIR/src/update_objects.o(.rodata); BUILD_DIR/src/code_80086E70.o(.rodata); BUILD_DIR/src/effects.o(.rodata); BUILD_DIR/src/code_80091750.jp.o(.rodata); diff --git a/src/actors/boat.inc.c b/src/actors/boat.inc.c deleted file mode 100644 index 99ccb609a..000000000 --- a/src/actors/boat.inc.c +++ /dev/null @@ -1,3 +0,0 @@ -void update_actor_paddle_wheel(struct PaddleWheelBoat *boat) { - boat->wheelRot += 0x38E; -} diff --git a/src/actors/paddle_boat/render.inc.c b/src/actors/paddle_boat/render.inc.c new file mode 100644 index 000000000..bfb20dcb4 --- /dev/null +++ b/src/actors/paddle_boat/render.inc.c @@ -0,0 +1,45 @@ +#include +#include +#include +#include "camera.h" +#include "main.h" +#include "actors.h" +#include "courses/all_course_data.h" +#include + +// This likely attaches the paddle wheel to the boat +void render_actor_paddle_boat(Camera *arg0, struct PaddleWheelBoat *boat, UNUSED Mat4 arg2, u16 pathCounter) { + UNUSED s32 pad[3]; + Vec3f sp120; + Mat4 spE0; + Mat4 spA0; + Mat4 sp60; + f32 temp; + + if ((pathCounter > 20) && (pathCounter < 25)) { return; } + + temp = is_within_render_distance(arg0->pos, boat->pos, arg0->rot[1], 90000.0f, gCameraZoom[arg0 - camera1], 9000000.0f); + + if (temp < 0.0f) { return; } + + gSPSetLights1(gDisplayListHead++, D_800DC610[1]); + gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_LIGHTING | G_SHADING_SMOOTH); + + mtxf_pos_rotation_xyz(spE0, boat->pos, boat->boatRot); + if (render_set_position(spE0, 1) != 0) { + + gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_E730); + gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_E058); + + mtxf_rotate_x(spE0, boat->wheelRot); + vec3f_set(sp120, 0, 16.0f, -255.0f); + mtxf_translate(spA0, sp120); + mtxf_multiplication(sp60, spE0, spA0); + if (render_set_position(sp60, 3) != 0) { + gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); + gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_FC28); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); + } + } +} \ No newline at end of file diff --git a/src/actors/paddle_boat/update.inc.c b/src/actors/paddle_boat/update.inc.c new file mode 100644 index 000000000..ddb1f720e --- /dev/null +++ b/src/actors/paddle_boat/update.inc.c @@ -0,0 +1,11 @@ +#include +#include + +/** + * @brief Rotates paddle boat's wheel. + * + * @param boat + */ +void update_actor_paddle_boat(struct PaddleWheelBoat *boat) { + boat->wheelRot += 0x38E; +} diff --git a/src/code_800029B0.c b/src/code_800029B0.c index fcbbc4094..ec8cc038e 100644 --- a/src/code_800029B0.c +++ b/src/code_800029B0.c @@ -200,7 +200,7 @@ void setup_race(void) { func_802969F8(); func_80005310(); func_8003D080(); - init_object_list(); + init_hud(); D_800DC510 = 0; gNumSpawnedShells = 0; D_800DC5B8 = 0; @@ -353,11 +353,11 @@ void func_80003040(void) { break; case COURSE_WARIO_STADIUM: vec3f_set(position, -131.0f, 83.0f, 286.0f); - addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_STADIUM_SIGN); + addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN); vec3f_set(position, -2353.0f, 72.0f, -1608.0f); - addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_STADIUM_SIGN); + addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN); vec3f_set(position, -2622.0f, 79.0f, 739.0f); - addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_STADIUM_SIGN); + addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN); // d_course_wario_stadium_packed_dl_C50 find_vtx_and_set_colours(0x07000C50, 0x64, 0xFF, 0xFF, 0xFF); // d_course_wario_stadium_packed_dl_BD8 diff --git a/src/code_80004740.c b/src/code_80004740.c index 135461e61..c94a681f5 100644 --- a/src/code_80004740.c +++ b/src/code_80004740.c @@ -103,7 +103,7 @@ void func_80004A1C(animation_type_1 *arg0, s16 *arg1, animation_type_3_triplet a } } -void func_80004C30(animation_type_1 *arg0, animation_type_2 *arg1, s16 arg2) { +void func_80004C30(animation_type_1 *arg0, animation_type_2 *arg1, s16 timeCycle) { UNUSED u32 *temp; s16 *sp40; s32 some_offset; @@ -116,8 +116,8 @@ void func_80004C30(animation_type_1 *arg0, animation_type_2 *arg1, s16 arg2) { D_80162D7A = 0; D_80162D76 = 0; for (someIndex = 0; someIndex < 3; someIndex++) { - if (arg2 < (*temp_v0)[someIndex].some_limiter) { - some_offset = arg2; + if (timeCycle < (*temp_v0)[someIndex].some_limiter) { + some_offset = timeCycle; } else { some_offset = 0; } @@ -142,7 +142,7 @@ void func_80004C30(animation_type_1 *arg0, animation_type_2 *arg1, s16 arg2) { gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); D_80162D7A -= 1; } - func_80004A1C(arg0, sp40, *temp_v0, (s32) arg2); + func_80004A1C(arg0, sp40, *temp_v0, (s32) timeCycle); D_80162D78 = 0; temp_v0++; break; @@ -151,7 +151,7 @@ void func_80004C30(animation_type_1 *arg0, animation_type_2 *arg1, s16 arg2) { } while (new_var != 3); } -s16 func_80004DFC(animation_type_1 *arg0, animation_type_2 **arg1, s16 arg2, s16 arg3) { +s16 func_80004DFC(animation_type_1 *arg0, animation_type_2 **arg1, s16 arg2, s16 timeCycle) { animation_type_1 *sp24; animation_type_2 *temp_v0; animation_type_2 **sp20; @@ -159,15 +159,15 @@ s16 func_80004DFC(animation_type_1 *arg0, animation_type_2 **arg1, s16 arg2, s16 sp24 = segmented_to_virtual(arg0); sp20 = segmented_to_virtual(arg1); // Convert the array's address temp_v0 = segmented_to_virtual(sp20[arg2]); // Convert an array element's address - if (arg3 >= temp_v0->animation_length) { - arg3 = 0; + if (timeCycle >= temp_v0->animation_length) { + timeCycle = 0; } - func_80004C30(sp24, temp_v0, arg3); - arg3++; - if (arg3 >= temp_v0->animation_length) { - arg3 = 0; + func_80004C30(sp24, temp_v0, timeCycle); + timeCycle++; + if (timeCycle >= temp_v0->animation_length) { + timeCycle = 0; } - return arg3; + return timeCycle; } s16 func_80004EAC(void *addr, s16 offset) { diff --git a/src/code_80005FD0.c b/src/code_80005FD0.c index fab1074ad..5edf1ca7b 100644 --- a/src/code_80005FD0.c +++ b/src/code_80005FD0.c @@ -12,11 +12,11 @@ #include "actors_extended.h" #include "render_player.h" #include "player_controller.h" -#include "code_80071F00.h" +#include "update_objects.h" #include "collision.h" #include #include "vehicles.h" -#include "hud_renderer.h" +#include "render_objects.h" #include "code_80057C60.h" #include "bomb_kart.h" #include "courses/all_course_data.h" @@ -139,7 +139,7 @@ s32 D_8016359C; TrainStuff gTrainList[NUM_TRAINS]; u16 isCrossingTriggeredByIndex[2]; u16 D_801637BC[2]; -PaddleWheelBoatStuff gFerries[NUM_PADDLE_WHEEL_BOATS]; +PaddleBoatStuff gPaddleBoats[NUM_PADDLE_BOATS]; VehicleStuff gBoxTruckList[NUM_RACE_BOX_TRUCKS]; VehicleStuff gSchoolBusList[NUM_RACE_SCHOOL_BUSES]; VehicleStuff gTankerTruckList[NUM_RACE_TANKER_TRUCKS]; @@ -551,7 +551,7 @@ s16 func_80005FD0(Vec3f arg0, Vec3f arg1) { s16 temp_ret; s16 phi_v1; - temp_ret = get_angle_between_points(arg0, arg1); + temp_ret = get_angle_between_two_vectors(arg0, arg1); phi_v1 = temp_ret; if (gIsMirrorMode != 0) { phi_v1 = -temp_ret; @@ -1608,9 +1608,9 @@ block_25: GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000929C.s") #endif -void func_800097E0(void) { +void update_vehicles(void) { s32 i; - func_8000EF20(); + generate_player_smoke(); D_8016337C++; if (gCurrentCourseId == COURSE_AWARD_CEREMONY) { @@ -1629,10 +1629,10 @@ void func_800097E0(void) { switch(gCurrentCourseId) { case COURSE_KALAMARI_DESERT: - func_80012AC0(); + update_vehicle_trains(); break; case COURSE_DK_JUNGLE: - func_800133C4(); + update_vehicle_paddle_boats(); break; case COURSE_TOADS_TURNPIKE: func_8001487C(); @@ -1876,7 +1876,7 @@ void func_80009B60(s32 playerId) { func_8000BBD8(stackPadding1A, D_80163090[playerId], D_80163448); } } - player->rotation[1] = -get_angle_between_points(player->pos, D_80162FA0); + player->rotation[1] = -get_angle_between_two_vectors(player->pos, D_80162FA0); } else { player->rotation[1] = D_80164590[D_80163448][(D_801630E0 + 4) % D_80164430]; } @@ -1889,7 +1889,7 @@ void func_80009B60(s32 playerId) { player->effects |= 0x10; } if (D_801630E8[playerId] != 0) { - D_80163300[playerId] = -get_angle_between_points(&player->copy_rotation_x, player->pos); + D_80163300[playerId] = -get_angle_between_two_vectors(&player->copy_rotation_x, player->pos); var_a0_2 = (D_801631DC[(D_80162FCE + 2) % D_80164430] * 0x168) / 65535; var_a1 = (D_80163300[playerId] * 0x168) / 65535; if (var_a0_2 < -0xB4) { @@ -1995,8 +1995,8 @@ void func_80009B60(s32 playerId) { // MISMATCH2 // This fixes part of the register allocation problems, makes fixing others // harder though. Needs more investigation - // var_a2 = (-get_angle_between_points(player->pos, D_80162FA0)) - (var_a1 = player->rotation[1]); - stackPadding19 = -get_angle_between_points(player->pos, D_80162FA0) - player->rotation[1]; + // var_a2 = (-get_angle_between_two_vectors(player->pos, D_80162FA0)) - (var_a1 = player->rotation[1]); + stackPadding19 = -get_angle_between_two_vectors(player->pos, D_80162FA0) - player->rotation[1]; var_a1 = stackPadding19; var_a2 = var_a1; if ((s16) temp_f2 < var_a1) { @@ -3174,7 +3174,7 @@ void func_8000DF8C(s32 bombKartId) { D_80162FC0[0] = temp_v0_2->posX + sp118; D_80162FC0[1] = temp_v0_2->posY; D_80162FC0[2] = temp_v0_2->posZ + temp_f0_3; - spC2 = (get_angle_between_points(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520; + spC2 = (get_angle_between_two_vectors(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520; break; case 2: var_s1 = (var_s1 + 4) % 360; @@ -3194,7 +3194,7 @@ void func_8000DF8C(s32 bombKartId) { D_80162FC0[0] = temp_v0_2->posX + sp118; D_80162FC0[1] = temp_v0_2->posY; D_80162FC0[2] = temp_v0_2->posZ + temp_f0_3; - spC2 = (get_angle_between_points(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520; + spC2 = (get_angle_between_two_vectors(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520; break; case 3: var_f20 = bombKart->yPos + 3.5f; @@ -3218,7 +3218,7 @@ void func_8000DF8C(s32 bombKartId) { D_80162FC0[0] = temp_v0_4->posX; D_80162FC0[1] = temp_v0_4->posY; D_80162FC0[2] = temp_v0_4->posZ; - spC2 = (get_angle_between_points(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520; + spC2 = (get_angle_between_two_vectors(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520; } else { D_80162FB0[0] = var_f22; D_80162FB0[1] = var_f20; @@ -3226,7 +3226,7 @@ void func_8000DF8C(s32 bombKartId) { D_80162FC0[0] = -2409.197f; D_80162FC0[1] = 0.0f; D_80162FC0[2] = -355.254f; - spC2 = (get_angle_between_points(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520; + spC2 = (get_angle_between_two_vectors(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520; } temp_f14 = ((D_80162FB0[0] + D_80162FC0[0]) * 0.5f) - var_f22; temp_f16 = ((D_80162FB0[2] + D_80162FC0[2]) * 0.5f) - var_f24; @@ -3256,7 +3256,7 @@ void func_8000DF8C(s32 bombKartId) { D_80162FC0[1] = temp_v0_4->posY; D_80162FC0[2] = temp_v0_4->posZ; var_f20 += 3.0f - (var_s1 * 0.3f); - spC2 = (get_angle_between_points(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520; + spC2 = (get_angle_between_two_vectors(D_80162FB0, D_80162FC0) * 0xFFFF) / 65520; break; default: break; @@ -3383,7 +3383,7 @@ void func_8000EEDC(void) { } } -void func_8000EF20(void) { +void generate_player_smoke(void) { s32 someIndex; f32 var_f20; struct Actor *temp_s1; @@ -3395,33 +3395,33 @@ void func_8000EF20(void) { temp_s1 = &gActorList[var_s0->actorIndex]; var_s0->unk14++; switch (var_s0->unk10) { - case 0: - if (var_s0->unk14 < 0xA) { - var_f20 = 0.3f; - } else { - var_f20 = 0.9f; - } - break; - case 1: - if (var_s0->unk14 < 0xA) { - var_f20 = 0.15f; - } else { - var_f20 = 0.45f; - } - break; - case 2: - if (var_s0->unk14 < 0xA) { - var_f20 = 0.15f; - } else { - var_f20 = 0.45f; - } - break; - default: - var_f20 = 1.0f; - break; + case 0: + if (var_s0->unk14 < 0xA) { + var_f20 = 0.3f; + } else { + var_f20 = 0.9f; + } + break; + case 1: + if (var_s0->unk14 < 0xA) { + var_f20 = 0.15f; + } else { + var_f20 = 0.45f; + } + break; + case 2: + if (var_s0->unk14 < 0xA) { + var_f20 = 0.15f; + } else { + var_f20 = 0.45f; + } + break; + default: + var_f20 = 1.0f; + break; } if (!(var_s0->unk14 & 1)) { - func_80076D70(temp_s1->pos, ((random_int(30) + 20) * var_f20) / 50.0f, var_s0->unk10); + init_smoke_particle(temp_s1->pos, ((random_int(30) + 20) * var_f20) / 50.0f, var_s0->unk10); } } } @@ -3930,7 +3930,7 @@ s16 func_80010CB0(s32 pathIndex, s32 waypointIndex) { sp24[0] = temp_v0->posX; sp24[1] = temp_v0->posY; sp24[2] = temp_v0->posZ; - ret = get_angle_between_points(sp30, sp24); + ret = get_angle_between_two_vectors(sp30, sp24); return -ret; } @@ -4452,7 +4452,7 @@ void init_course_vehicles(void) { VehicleStuff *tempSchoolBus; VehicleStuff *tempTankerTruck; VehicleStuff *tempCar; - PaddleWheelBoatStuff *tempPaddleWheelBoat; + PaddleBoatStuff *tempPaddleWheelBoat; Vec3s paddleWheelBoatRot; s32 loopIndex; s32 loopIndex2; @@ -4497,8 +4497,8 @@ void init_course_vehicles(void) { } break; case COURSE_DK_JUNGLE: - for(loopIndex = 0; loopIndex < NUM_ACTIVE_PADDLE_WHEEL_BOATS; loopIndex++) { - tempPaddleWheelBoat = &gFerries[loopIndex]; + for(loopIndex = 0; loopIndex < NUM_ACTIVE_PADDLE_BOATS; loopIndex++) { + tempPaddleWheelBoat = &gPaddleBoats[loopIndex]; if(tempPaddleWheelBoat->isActive == 1) { origXPos = tempPaddleWheelBoat->position[0]; origZPos = tempPaddleWheelBoat->position[2]; @@ -4506,7 +4506,7 @@ void init_course_vehicles(void) { tempPaddleWheelBoat->velocity[0] = tempPaddleWheelBoat->position[0] - origXPos; tempPaddleWheelBoat->velocity[2] = tempPaddleWheelBoat->position[2] - origZPos; vec3s_set(paddleWheelBoatRot, 0, tempPaddleWheelBoat->rotY, 0); - tempPaddleWheelBoat->actorIndex = addActorToEmptySlot(tempPaddleWheelBoat->position, paddleWheelBoatRot, tempPaddleWheelBoat->velocity, ACTOR_PADDLE_WHEEL_BOAT); + tempPaddleWheelBoat->actorIndex = addActorToEmptySlot(tempPaddleWheelBoat->position, paddleWheelBoatRot, tempPaddleWheelBoat->velocity, ACTOR_PADDLE_BOAT); } } break; @@ -4632,7 +4632,7 @@ void func_80012A48(TrainCarStuff *trainCar, s16 arg1) { trainCarActor->velocity[2] = trainCar->velocity[2]; } -void func_80012AC0(void) { +void update_vehicle_trains(void) { UNUSED s32 pad[3]; f32 temp_f20; TrainCarStuff *car; @@ -4812,13 +4812,13 @@ void func_800131DC(s32 playerId) { } void func_800132F4(void) { - PaddleWheelBoatStuff *var_a1; + PaddleBoatStuff *var_a1; s32 i; PathNoY *temp_a2; u16 temp; - for (i = 0; i < NUM_ACTIVE_PADDLE_WHEEL_BOATS; i++) { + for (i = 0; i < NUM_ACTIVE_PADDLE_BOATS; i++) { temp = i * 0xB4; - var_a1 = &gFerries[i]; + var_a1 = &gPaddleBoats[i]; temp_a2 = &D_80163598[temp]; var_a1->position[0] = temp_a2->x; var_a1->position[1] = D_80162EB2; @@ -4840,11 +4840,11 @@ void func_800132F4(void) { D_801630FC = 0; } -void func_800133C4(void) { - PaddleWheelBoatStuff *ferry; +void update_vehicle_paddle_boats(void) { + PaddleBoatStuff *paddleBoat; PathNoY *waypoint; s32 i; - struct Actor *ferryActor; + struct Actor *paddleBoatActor; f32 temp_f26; f32 temp_f28; f32 temp_f30; @@ -4857,92 +4857,92 @@ void func_800133C4(void) { Vec3f sp78; s32 pad2; D_801630FC += 1; - for (i = 0; i < NUM_ACTIVE_PADDLE_WHEEL_BOATS; i++) { - ferry = &gFerries[i]; - if (ferry->isActive == 1) { - temp_f26 = ferry->position[0]; - temp_f28 = ferry->position[1]; - temp_f30 = ferry->position[2]; - func_8000DBAC(ferry->position, &ferry->waypointIndex, ferry->someMultiplier); - ferry->someFlags = func_800061DC(ferry->position, 2000.0f, ferry->someFlags); - if ((((s16) D_801630FC % 10) == 0) && (ferry->someFlags != 0)) { - sp78[0] = (f32) ((f64) ferry->position[0] - 30.0); - sp78[1] = (f32) ((f64) ferry->position[1] + 180.0); - sp78[2] = (f32) ((f64) ferry->position[2] + 45.0); - func_80006114(sp78, ferry->position, ferry->rotY); + for (i = 0; i < NUM_ACTIVE_PADDLE_BOATS; i++) { + paddleBoat = &gPaddleBoats[i]; + if (paddleBoat->isActive == 1) { + temp_f26 = paddleBoat->position[0]; + temp_f28 = paddleBoat->position[1]; + temp_f30 = paddleBoat->position[2]; + func_8000DBAC(paddleBoat->position, &paddleBoat->waypointIndex, paddleBoat->someMultiplier); + paddleBoat->someFlags = func_800061DC(paddleBoat->position, 2000.0f, paddleBoat->someFlags); + if ((((s16) D_801630FC % 10) == 0) && (paddleBoat->someFlags != 0)) { + sp78[0] = (f32) ((f64) paddleBoat->position[0] - 30.0); + sp78[1] = (f32) ((f64) paddleBoat->position[1] + 180.0); + sp78[2] = (f32) ((f64) paddleBoat->position[2] + 45.0); + func_80006114(sp78, paddleBoat->position, paddleBoat->rotY); func_80075A6C(i, sp78, 1.1f); - sp78[0] = (f32) ((f64) ferry->position[0] + 30.0); - sp78[1] = (f32) ((f64) ferry->position[1] + 180.0); - sp78[2] = (f32) ((f64) ferry->position[2] + 45.0); - func_80006114(sp78, ferry->position, ferry->rotY); + sp78[0] = (f32) ((f64) paddleBoat->position[0] + 30.0); + sp78[1] = (f32) ((f64) paddleBoat->position[1] + 180.0); + sp78[2] = (f32) ((f64) paddleBoat->position[2] + 45.0); + func_80006114(sp78, paddleBoat->position, paddleBoat->rotY); func_80075A6C(i, sp78, 1.1f); } if (random_int(100) == 0) { if (random_int(2) == 0) { - func_800C98B8(ferry->position, ferry->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x47)); + func_800C98B8(paddleBoat->position, paddleBoat->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x47)); } else { - func_800C98B8(ferry->position, ferry->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x48)); + func_800C98B8(paddleBoat->position, paddleBoat->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x48)); } } sp94[0] = temp_f26; sp94[1] = temp_f28; sp94[2] = temp_f30; - waypoint = &D_80163598[(ferry->waypointIndex + 5) % D_8016359C]; + waypoint = &D_80163598[(paddleBoat->waypointIndex + 5) % D_8016359C]; sp88[0] = (f32) waypoint->x; sp88[1] = (f32) D_80162EB0; sp88[2] = (f32) waypoint->z; temp_a1 = func_80005FD0(sp94, sp88); - temp = temp_a1 - ferry->rotY; + temp = temp_a1 - paddleBoat->rotY; var_v1 = temp; if (var_v1 < 0) { var_v1 = -var_v1; } if (var_v1 >= 0x1771) { - if (ferry->someMultiplier > 0.2) { - ferry->someMultiplier -= 0.04; + if (paddleBoat->someMultiplier > 0.2) { + paddleBoat->someMultiplier -= 0.04; } if (var_v1 >= 0x3D) { var_v1 = 0x003C; } } else { - if (ferry->someMultiplier < 2.0) { - ferry->someMultiplier += 0.02; + if (paddleBoat->someMultiplier < 2.0) { + paddleBoat->someMultiplier += 0.02; } if (var_v1 >= 0x1F) { var_v1 = 0x001E; } } if (temp >= 0x8000) { - ferry->rotY -= var_v1; + paddleBoat->rotY -= var_v1; } else if (temp > 0) { - ferry->rotY += var_v1; + paddleBoat->rotY += var_v1; } else if (temp < -0x7FFF) { - ferry->rotY += var_v1; + paddleBoat->rotY += var_v1; } else if (temp < 0) { - ferry->rotY -= var_v1; + paddleBoat->rotY -= var_v1; } - ferry->velocity[0] = ferry->position[0] - temp_f26; - ferry->velocity[1] = ferry->position[1] - temp_f28; - ferry->velocity[2] = ferry->position[2] - temp_f30; - ferryActor = &gActorList[ferry->actorIndex]; - ferryActor->pos[0] = ferry->position[0]; - ferryActor->pos[1] = ferry->position[1]; - ferryActor->pos[2] = ferry->position[2]; + paddleBoat->velocity[0] = paddleBoat->position[0] - temp_f26; + paddleBoat->velocity[1] = paddleBoat->position[1] - temp_f28; + paddleBoat->velocity[2] = paddleBoat->position[2] - temp_f30; + paddleBoatActor = &gActorList[paddleBoat->actorIndex]; + paddleBoatActor->pos[0] = paddleBoat->position[0]; + paddleBoatActor->pos[1] = paddleBoat->position[1]; + paddleBoatActor->pos[2] = paddleBoat->position[2]; if (gIsMirrorMode != 0) { - ferryActor->rot[1] = -ferry->rotY; + paddleBoatActor->rot[1] = -paddleBoat->rotY; } else { - ferryActor->rot[1] = ferry->rotY; + paddleBoatActor->rot[1] = paddleBoat->rotY; } - ferryActor->velocity[0] = ferry->velocity[0]; - ferryActor->velocity[1] = ferry->velocity[1]; - ferryActor->velocity[2] = ferry->velocity[2]; + paddleBoatActor->velocity[0] = paddleBoat->velocity[0]; + paddleBoatActor->velocity[1] = paddleBoat->velocity[1]; + paddleBoatActor->velocity[2] = paddleBoat->velocity[2]; } } } void func_80013854(Player *player) { s32 someIndex; - PaddleWheelBoatStuff *tempPaddleWheelBoat; + PaddleBoatStuff *tempPaddleWheelBoat; f32 x_diff; f32 y_diff; f32 z_diff; @@ -4954,8 +4954,8 @@ void func_80013854(Player *player) { playerX = player->pos[0]; playerY = player->pos[1]; playerZ = player->pos[2]; - for (someIndex = 0; someIndex < NUM_ACTIVE_PADDLE_WHEEL_BOATS; someIndex++) { - tempPaddleWheelBoat = &gFerries[someIndex]; + for (someIndex = 0; someIndex < NUM_ACTIVE_PADDLE_BOATS; someIndex++) { + tempPaddleWheelBoat = &gPaddleBoats[someIndex]; if (tempPaddleWheelBoat->isActive == 1) { x_diff = playerX - tempPaddleWheelBoat->position[0]; y_diff = playerY - tempPaddleWheelBoat->position[1]; @@ -5091,7 +5091,7 @@ void func_80013D20(VehicleStuff *vehicle) { sp34[0] = vehicle->position[1]; sp34[1] = 0.0f; sp34[2] = sqrtf((temp_f0_3 * temp_f0_3) + (temp_f2_2 * temp_f2_2)); - thing = get_angle_between_points(sp40, sp34); + thing = get_angle_between_two_vectors(sp40, sp34); adjust_angle(&vehicle->rotation[0], -thing, 100); vehicle->velocity[0] = vehicle->position[0] - sp5C; vehicle->velocity[1] = vehicle->position[1] - sp58; @@ -8176,7 +8176,7 @@ void func_8001C14C(void) { void func_8001C3C4(s32 cameraId) { if (gCurrentCourseId == COURSE_AWARD_CEREMONY) { if (gBombKarts[0].waypointIndex >= 16) { - func_80057114(3); + func_80057114(PLAYER_FOUR); } } else { if (gModeSelection == VERSUS) { diff --git a/src/code_80005FD0.h b/src/code_80005FD0.h index 228b0e6c8..15b6db5d1 100644 --- a/src/code_80005FD0.h +++ b/src/code_80005FD0.h @@ -83,7 +83,7 @@ void func_80009000(s32); void func_800090F0(s32, Player*); f32 func_80009258(s32, f32, f32); void func_8000929C(s32, Player*); -void func_800097E0(void); +void update_vehicles(void); void func_800098FC(s32, Player*); void func_800099EC(s32, Player*); void func_80009B60(s32); @@ -123,7 +123,7 @@ s32 func_8000EDC8(s32); s32 func_8000EE10(s32); void func_8000EE58(s32); void func_8000EEDC(void); -void func_8000EF20(void); +void generate_player_smoke(void); void func_8000F0E0(void); void func_8000F124(void); @@ -159,13 +159,13 @@ void init_course_vehicles(void); void func_80012780(TrainCarStuff*, s16*, u16); void func_800127E0(void); void func_80012A48(TrainCarStuff*, s16); -void func_80012AC0(void); +void update_vehicle_trains(void); void func_80012DC0(s32, Player*); void func_80013054(void); void func_800131DC(s32); void func_800132F4(void); -void func_800133C4(void); +void update_vehicle_paddle_boats(void); void func_80013854(Player*); void func_800139E4(f32, f32, s32, s32, VehicleStuff*, TrackWaypoint*); f32 func_80013C74(s16, s16); diff --git a/src/code_80057C60.c b/src/code_80057C60.c index 6d0a77c14..c2063d198 100644 --- a/src/code_80057C60.c +++ b/src/code_80057C60.c @@ -18,9 +18,9 @@ #include "math_util_2.h" #include "code_80005FD0.h" #include "render_player.h" -#include "hud_renderer.h" +#include "render_objects.h" #include "code_8006E9C0.h" -#include "code_80071F00.h" +#include "update_objects.h" #include "code_80086E70.h" #include "effects.h" #include "src/data/data_800E8700.h" @@ -33,7 +33,6 @@ #include "data/other_textures.h" #include "spawn_players.h" #include "sounds.h" -#include "code_80071F00.h" #include "data/some_data.h" @@ -135,7 +134,7 @@ UNUSED s16 D_801657A8[3]; s8 D_801657AE; UNUSED s8 D_801657AF; //! HUD related -s8 D_801657B0; +s8 gHUDDisable; UNUSED s8 D_801657B1; s8 D_801657B2; UNUSED s8 D_801657B3; @@ -238,7 +237,7 @@ f32 D_80183DA8[4]; s32 gIndexLakituList[4]; f32 D_80183DC8[4]; //! Indexes for the objects associated with the Bomb Karts -s32 D_80183DD8[NUM_BOMB_KARTS_MAX]; +s32 gIndexObjectBombKart[NUM_BOMB_KARTS_MAX]; UNUSED s32 D_80183DF8[16]; //! Next free spot in gObjectParticle1? Wraps back around to 0 if it gets bigger than gObjectParticle1_SIZE s32 gNextFreeObjectParticle1; @@ -490,11 +489,11 @@ void func_80057FC4(u32 arg0) { UNUSED Gfx *temp_v1; - if ((D_801657B0 != 0)) { + if ((gHUDDisable != 0)) { return; } gSPDisplayList(gDisplayListHead++, &D_0D0076F8); - func_80041EF4(); + set_matrix_hud_screen(); if ((D_801657C8 != 0)){ return; @@ -520,10 +519,10 @@ void func_80057FC4(u32 arg0) { } -void func_80058090(u32 arg0) { +void render_object(u32 arg0) { UNUSED Gfx *temp_v1; - if (D_801657B0 != 0) { + if (gHUDDisable != 0) { return; } @@ -535,104 +534,104 @@ void func_80058090(u32 arg0) { switch (arg0) { - case 0: - func_800581C8(); + case RENDER_SCREEN_MODE_1P_PLAYER_ONE: + render_object_p1(); break; - case 1: - func_800581C8(); + case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE: + render_object_p1(); break; - case 2: - func_800582CC(); + case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO: + render_object_p2(); break; - case 3: - func_800581C8(); + case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE: + render_object_p1(); break; - case 4: - func_800582CC(); + case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO: + render_object_p2(); break; case 5: - func_800581C8(); + render_object_p1(); break; case 6: - func_800582CC(); + render_object_p2(); break; case 7: - func_80058394(); + render_object_p3(); break; - case 8: - func_800581C8(); + case RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE: + render_object_p1(); break; - case 9: - func_800582CC(); + case RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO: + render_object_p2(); break; - case 10: - func_80058394(); + case RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE: + render_object_p3(); break; - case 11: - func_8005845C(); + case RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR: + render_object_p4(); break; } } -void func_800581C8(void) { +void render_object_p1(void) { gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[0]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[0]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); - func_8001C3C4(0); + func_8001C3C4(PLAYER_ONE); if (gGamestate == ENDING) { - func_80055F48(0); - func_80056160(0); - func_8005217C(0); - func_80054BE8(0); + func_80055F48(PLAYER_ONE); + func_80056160(PLAYER_ONE); + func_8005217C(PLAYER_ONE); + func_80054BE8(PLAYER_ONE); return; } if (!gDemoMode) { - func_800532A4(0); + render_lakitu(PLAYER_ONE); } - func_800588F4(0); + render_object_for_player(PLAYER_ONE); } -void func_800582CC(void) { +void render_object_p2(void) { gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[1]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); - func_8001C3C4(1); + func_8001C3C4(PLAYER_TWO); if (!gDemoMode) { - func_800532A4(1); + render_lakitu(PLAYER_TWO); } - func_800588F4(1); + render_object_for_player(PLAYER_TWO); } -void func_80058394(void) { +void render_object_p3(void) { gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[2]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[2]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); - func_8001C3C4(2); + func_8001C3C4(PLAYER_THREE); if (!gDemoMode) { - func_800532A4(2); + render_lakitu(PLAYER_THREE); } - func_800588F4(2); + render_object_for_player(PLAYER_THREE); } -void func_8005845C(void) { +void render_object_p4(void) { gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[3]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[3]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); - func_8001C3C4(3); + func_8001C3C4(PLAYER_FOUR); if ((!gDemoMode) && (gPlayerCountSelection1 == 4)) { - func_800532A4(3); + render_lakitu(PLAYER_FOUR); } - func_800588F4(3); + render_object_for_player(PLAYER_FOUR); } -void func_80058538(u32 arg0) { +void render_player_snow_effect(u32 arg0) { UNUSED Gfx *temp_v1; - if (D_801657B0 != 0) { + if (gHUDDisable != 0) { return; } @@ -642,67 +641,67 @@ void func_80058538(u32 arg0) { return; } switch (arg0) { - case 0: - func_80058640(); + case RENDER_SCREEN_MODE_1P_PLAYER_ONE: + render_player_snow_effect_one(); break; - case 1: - func_80058640(); + case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE: + render_player_snow_effect_one(); break; - case 2: - func_800586FC(); + case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO: + render_player_snow_effect_two(); break; - case 3: - func_80058640(); + case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE: + render_player_snow_effect_one(); break; - case 4: - func_800586FC(); + case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO: + render_player_snow_effect_two(); break; - case 8: - func_80058640(); + case RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE: + render_player_snow_effect_one(); break; - case 9: - func_800586FC(); + case RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO: + render_player_snow_effect_two(); break; - case 10: - func_800587A4(); + case RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE: + render_player_snow_effect_three(); break; - case 11: - func_8005884C(); + case RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR: + render_player_snow_effect_four(); break; } } -void func_80058640(void) { +void render_player_snow_effect_one(void) { gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[0]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[0]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); if (gGamestate != ENDING) { - func_80058B58(0); + render_snowing_effect(PLAYER_ONE); } } -void func_800586FC(void) { +void render_player_snow_effect_two(void) { gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[1]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); - func_80058B58(1); + render_snowing_effect(PLAYER_TWO); } -void func_800587A4(void) { +void render_player_snow_effect_three(void) { gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[2]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[2]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); - func_80058B58(2); + render_snowing_effect(PLAYER_THREE); } -void func_8005884C(void) { +void render_player_snow_effect_four(void) { gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[3]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[3]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); - func_80058B58(3); + render_snowing_effect(PLAYER_FOUR); } -void func_800588F4(s32 cameraId) { +void render_object_for_player(s32 cameraId) { switch (gCurrentCourseId) { case COURSE_MARIO_RACEWAY: @@ -710,68 +709,68 @@ void func_800588F4(s32 cameraId) { case COURSE_CHOCO_MOUNTAIN: break; case COURSE_BOWSER_CASTLE: - func_80053870(cameraId); - func_80054664(cameraId); + render_object_thwomps(cameraId); + render_object_bowser_flame(cameraId); break; case COURSE_BANSHEE_BOARDWALK: if (gGamestate != CREDITS_SEQUENCE) { - func_800527D8(cameraId); - func_80052590(cameraId); + render_object_trash_bin(cameraId); + render_object_bat(cameraId); func_8005217C(cameraId); - func_800524B4(cameraId); + render_object_boos(cameraId); } break; case COURSE_YOSHI_VALLEY: func_80055228(cameraId); if (gGamestate != CREDITS_SEQUENCE) { - func_8005568C(cameraId); + render_object_hedgehogs(cameraId); } break; case COURSE_FRAPPE_SNOWLAND: if (gGamestate != CREDITS_SEQUENCE) { - func_8005327C(cameraId); + render_object_snowmans(cameraId); } break; case COURSE_KOOPA_BEACH: if (gGamestate != CREDITS_SEQUENCE) { - func_80055528(cameraId); + render_object_crabs(cameraId); } if (gGamestate != CREDITS_SEQUENCE) { if ((gPlayerCount == 1) || (gPlayerCount == 2)) { - func_80055380(cameraId); + render_object_seagulls(cameraId); } } else { - func_80055380(cameraId); + render_object_seagulls(cameraId); } break; case COURSE_ROYAL_RACEWAY: break; case COURSE_LUIGI_RACEWAY: if (D_80165898 != 0) { - func_80055E68(cameraId); + render_object_hot_air_balloon(cameraId); } break; case COURSE_MOO_MOO_FARM: if (gGamestate != CREDITS_SEQUENCE) { - func_800550A4(cameraId); + render_object_moles(cameraId); } break; case COURSE_TOADS_TURNPIKE: break; case COURSE_KALAMARI_DESERT: - func_800541BC(cameraId); + render_object_train_smoke_particles(cameraId); break; case COURSE_SHERBET_LAND: if (gGamestate != CREDITS_SEQUENCE) { func_80052E30(cameraId); } - func_8005592C(cameraId); + render_object_train_penguins(cameraId); break; case COURSE_RAINBOW_ROAD: if (gGamestate != CREDITS_SEQUENCE) { - func_80056188(cameraId); - func_80055C38(cameraId); + render_object_neon(cameraId); + render_object_chain_chomps(cameraId); } break; case COURSE_WARIO_STADIUM: @@ -784,35 +783,35 @@ void func_800588F4(s32 cameraId) { break; case COURSE_DK_JUNGLE: if (gGamestate != CREDITS_SEQUENCE) { - func_80054414(cameraId); + render_object_paddle_boat_smoke_particles(cameraId); } break; } - func_80054938(cameraId); - func_80051638(cameraId); + render_object_smoke_particles(cameraId); + render_object_leaf_particle(cameraId); if (D_80165730 != 0) { func_80053E6C(cameraId); } if (gModeSelection == BATTLE) { - func_80056AC0(cameraId); + render_object_bomb_kart(cameraId); } } -void func_80058B58(s32 arg0) { +void render_snowing_effect(s32 arg0) { switch(gCurrentCourseId) { case COURSE_FRAPPE_SNOWLAND: if (gGamestate != 9) { if ((D_8015F894 == 0) && (gPlayerCountSelection1 == 1)) { - func_800517C8(); + render_object_snowflakes_particles(); } } else { - func_800517C8(); + render_object_snowflakes_particles(); } break; case COURSE_SHERBET_LAND: - func_80052C60(arg0); + render_ice_block(arg0); break; } } @@ -828,59 +827,59 @@ void func_80058C20(u32 arg0) { if (D_8018D22C == 0) { switch (arg0) { - case 0: + case RENDER_SCREEN_MODE_1P_PLAYER_ONE: func_80058F48(); break; - case 1: + case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE: if (!gDemoMode) { func_80059358(); break; } break; - case 2: + case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO: if (!gDemoMode) { func_800593F0(); break; } break; - case 3: + case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE: if (!gDemoMode) { func_800594F0(); break; } break; - case 4: + case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO: if (!gDemoMode) { func_80059528(); break; } break; - case 8: + case RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE: if (!gDemoMode) { func_800596A8(); break; } break; - case 9: + case RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO: if (!gDemoMode) { func_80059710(); break; } break; - case 10: + case RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE: if (!gDemoMode) { func_80059750(); break; } break; - case 11: + case RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR: if ((!gDemoMode) && (gPlayerCountSelection1 == 4)) { func_800597B8(); } @@ -889,67 +888,67 @@ void func_80058C20(u32 arg0) { } } -void func_80058DB4(u32 arg0) { +void render_hud(u32 arg0) { D_8018D21C = arg0; gSPDisplayList(gDisplayListHead++, &D_0D0076F8); if (D_8018D22C == 0) { switch (arg0) { - case 0: + case RENDER_SCREEN_MODE_1P_PLAYER_ONE: func_80058F78(); break; - case 1: + case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE: if (!gDemoMode) { - func_80059360(); + render_hud_2p_horizontal_player_two_horizontal_player_one(); break; } break; - case 2: + case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO: if (!gDemoMode) { - func_800593F8(); + render_hud_2p_horizontal_player_two(); break; } break; - case 3: + case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE: if (!gDemoMode) { - func_800594F8(); + render_hud_2p_vertical_player_one(); break; } break; - case 4: + case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO: if (!gDemoMode) { - func_80059530(); + render_hud_2p_vertical_player_two(); break; } break; - case 8: + case RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE: if (!gDemoMode) { - func_800596D8(); + render_hud_1p_multi(); break; } break; - case 9: + case RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO: if (!gDemoMode) { - func_80059718(); + render_hud_2p_multi(); break; } break; - case 10: + case RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE: if (!gDemoMode) { - func_80059780(); + render_hud_3p_multi(); break; } break; - case 11: + case RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR: if ((!gDemoMode) && (gPlayerCountSelection1 == 4)) { - func_800597E8(); + render_hud_4p_multi(); } break; } @@ -957,19 +956,19 @@ void func_80058DB4(u32 arg0) { } void func_80058F48(void) { - if (D_801657B0 == 0) { - func_80041EF4(); + if (gHUDDisable == 0) { + set_matrix_hud_screen(); } } void func_80058F78(void) { - if (D_801657B0 == 0) { - func_80041EF4(); + if (gHUDDisable == 0) { + set_matrix_hud_screen(); if ((!gDemoMode) && (gIsHUDVisible != 0) && (D_801657D8 == 0)) { - func_8004E638(0); + draw_item_window(PLAYER_ONE); if (D_801657E4 != 2) { - func_8004FA78(0); - func_8004E78C(0); + render_hud_timer(PLAYER_ONE); + draw_simplified_lap_count(PLAYER_ONE); func_8004EB38(0); if (D_801657E6 != FALSE) { func_8004ED40(0); @@ -1038,7 +1037,7 @@ void func_800590D4(void) { void func_800591B4(void) { - if ((D_801657B0 == 0) && (D_800DC5B8 != 0)) { + if ((gHUDDisable == 0) && (D_800DC5B8 != 0)) { func_80057C60(); gSPDisplayList(gDisplayListHead++, &D_0D0076F8); @@ -1079,13 +1078,13 @@ void func_80059358(void) { } -void func_80059360(void) { - if (D_801657B0 == 0) { - func_8004FA78(0); +void render_hud_2p_horizontal_player_two_horizontal_player_one(void) { + if (gHUDDisable == 0) { + render_hud_timer(PLAYER_ONE); if (playerHUD[PLAYER_ONE].lapCount != 3) { - func_8004CB60(playerHUD[PLAYER_ONE].lapX, playerHUD[PLAYER_ONE].lapY, (u8*) common_texture_hud_lap); - func_8004FC78(playerHUD[PLAYER_ONE].lapX + 0xC, playerHUD[PLAYER_ONE].lapY - 4, playerHUD[PLAYER_ONE].alsoLapCount); - func_8004E638(0); + draw_hud_2d_texture_32x8(playerHUD[PLAYER_ONE].lapX, playerHUD[PLAYER_ONE].lapY, common_texture_hud_lap); // draw the lap word + draw_lap_count(playerHUD[PLAYER_ONE].lapX + 0xC, playerHUD[PLAYER_ONE].lapY - 4, playerHUD[PLAYER_ONE].alsoLapCount); + draw_item_window(PLAYER_ONE); } } } @@ -1094,32 +1093,32 @@ void func_800593F0(void) { } -void func_800593F8(void) { - if (D_801657B0 == 0) { - func_8004FA78(1); +void render_hud_2p_horizontal_player_two(void) { + if (gHUDDisable == 0) { + render_hud_timer(PLAYER_TWO); if (playerHUD[PLAYER_TWO].lapCount != 3) { - func_8004CB60(playerHUD[PLAYER_TWO].lapX, playerHUD[PLAYER_TWO].lapY, (u8*) common_texture_hud_lap); - func_8004FC78(playerHUD[PLAYER_TWO].lapX + 0xC, playerHUD[PLAYER_TWO].lapY - 4, playerHUD[PLAYER_TWO].alsoLapCount); - func_8004E638(1); + draw_hud_2d_texture_32x8(playerHUD[PLAYER_TWO].lapX, playerHUD[PLAYER_TWO].lapY, common_texture_hud_lap); + draw_lap_count(playerHUD[PLAYER_TWO].lapX + 0xC, playerHUD[PLAYER_TWO].lapY - 4, playerHUD[PLAYER_TWO].alsoLapCount); + draw_item_window(PLAYER_TWO); } } } -void func_80059488(s32 arg0) { - if ((gModeSelection != BATTLE) && (D_80165800[arg0] == 0) && (gIsHUDVisible != 0)) { - func_8004FA78(arg0); - func_8004E78C(arg0); +void draw_simplified_hud(s32 playerId) { + if ((gModeSelection != BATTLE) && (D_80165800[playerId] == 0) && (gIsHUDVisible != 0)) { + render_hud_timer(playerId); + draw_simplified_lap_count(playerId); } - func_8004E638(arg0); + draw_item_window(playerId); } void func_800594F0(void) { } -void func_800594F8(void) { - if (D_801657B0 == 0) { - func_80059488(0); +void render_hud_2p_vertical_player_one(void) { + if (gHUDDisable == 0) { + draw_simplified_hud(PLAYER_ONE); } } @@ -1127,17 +1126,17 @@ void func_80059528(void) { } -void func_80059530(void) { - if (D_801657B0 == 0) { - func_80059488(1); +void render_hud_2p_vertical_player_two(void) { + if (gHUDDisable == 0) { + draw_simplified_hud(PLAYER_TWO); } } -void func_80059560(s32 playerId) { +void render_hud_lap_3p_4p(s32 playerId) { if (gModeSelection != BATTLE) { if (D_801657F8 && gIsHUDVisible) { - func_8004CB60(playerHUD[playerId].lapX, playerHUD[playerId].lapY, (u8*) common_texture_hud_lap); - func_8004FC78(playerHUD[playerId].lapX - 12, playerHUD[playerId].lapY + 4, playerHUD[playerId].alsoLapCount); + draw_hud_2d_texture_32x8(playerHUD[playerId].lapX, playerHUD[playerId].lapY, (u8*) common_texture_hud_lap); + draw_lap_count(playerHUD[playerId].lapX - 12, playerHUD[playerId].lapY + 4, playerHUD[playerId].alsoLapCount); } if (D_801657E4 == 2) { if (playerHUD[playerId].unk_74 && D_80165608) { @@ -1149,15 +1148,15 @@ void func_80059560(s32 playerId) { } void func_800596A8(void) { - if (D_801657B0 == 0) { - func_80041EF4(); + if (gHUDDisable == 0) { + set_matrix_hud_screen(); } } -void func_800596D8(void) { - if (D_801657B0 == 0) { - func_80041EF4(); - func_80059560(0); +void render_hud_1p_multi(void) { + if (gHUDDisable == 0) { + set_matrix_hud_screen(); + render_hud_lap_3p_4p(PLAYER_ONE); } } @@ -1165,36 +1164,36 @@ void func_80059710(void) { } -void func_80059718(void) { - if (D_801657B0 == 0) { - func_80041EF4(); - func_80059560(1); +void render_hud_2p_multi(void) { + if (gHUDDisable == 0) { + set_matrix_hud_screen(); + render_hud_lap_3p_4p(PLAYER_TWO); } } void func_80059750(void) { - if (D_801657B0 == 0) { - func_80041EF4(); + if (gHUDDisable == 0) { + set_matrix_hud_screen(); } } -void func_80059780(void) { - if (D_801657B0 == 0) { - func_80041EF4(); - func_80059560(2); +void render_hud_3p_multi(void) { + if (gHUDDisable == 0) { + set_matrix_hud_screen(); + render_hud_lap_3p_4p(PLAYER_THREE); } } void func_800597B8(void) { - if (D_801657B0 == 0) { - func_80041EF4(); + if (gHUDDisable == 0) { + set_matrix_hud_screen(); } } -void func_800597E8(void) { - if (D_801657B0 == 0) { - func_80041EF4(); - func_80059560(3); +void render_hud_4p_multi(void) { + if (gHUDDisable == 0) { + set_matrix_hud_screen(); + render_hud_lap_3p_4p(PLAYER_FOUR); } } @@ -1250,7 +1249,7 @@ void func_8005995C(void) { void func_80059A88(s32 playerId) { func_80059820(playerId); if (!gDemoMode) { - update_obj_laikitu(playerId); + update_object_lakitu(playerId); func_8007BB9C(playerId); } } @@ -1337,7 +1336,7 @@ void func_80059D00(void) { func_80059820(PLAYER_TWO); func_80078C70(2); } - update_obj(); + update_object(); break; case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL: randomize_seed_from_controller(PLAYER_ONE); @@ -1356,7 +1355,7 @@ void func_80059D00(void) { } func_80078C70(2); func_8005D1F4(1); - update_obj(); + update_object(); break; case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL: randomize_seed_from_controller(PLAYER_ONE); @@ -1375,7 +1374,7 @@ void func_80059D00(void) { } func_80078C70(4); func_8005D1F4(1); - update_obj(); + update_object(); break; case SCREEN_MODE_3P_4P_SPLITSCREEN: randomize_seed_from_controller(PLAYER_ONE); @@ -1408,7 +1407,7 @@ void func_80059D00(void) { } func_8005D1F4(3); } - update_obj(); + update_object(); break; } func_800744CC(); @@ -1425,12 +1424,12 @@ void func_8005A070(void) { if (gGamestate == ENDING) { func_80086604(); func_80086D80(); - func_8007C2F8(1); + update_cheep_cheep(1); func_80077640(); } else if (gGamestate == CREDITS_SEQUENCE) { func_80059820(PLAYER_ONE); func_80078C70(0); - update_obj(); + update_object(); } else { func_80059D00(); } @@ -1469,22 +1468,22 @@ void func_8005A14C(s32 playerId) { if (player->effects & 0x03000000) { func_80087D24(objectIndex, 6.0f, 1.5f, 0.0f); } else { - f32_step_towards(&gObjectList[objectIndex].unk_028[1], 0.0f, 1.0f); + f32_step_towards(&gObjectList[objectIndex].offset[1], 0.0f, 1.0f); } if ((player->type & PLAYER_INVISIBLE_OR_BOMB) || (player->effects & BOO_EFFECT)) { - gObjectList[objectIndex].unk_0A0 = 0x0050; + gObjectList[objectIndex].primAlpha = 0x0050; } else { - gObjectList[objectIndex].unk_0A0 = 0x00FF; + gObjectList[objectIndex].primAlpha = 0x00FF; } if (lapCount >= 3) { gObjectList[objectIndex].direction_angle[2] = 0; gObjectList[objectIndex].direction_angle[1] = 0; gObjectList[objectIndex].direction_angle[0] = 0; - gObjectList[objectIndex].unk_028[2] = 0.0f; - gObjectList[objectIndex].unk_028[1] = 0.0f; - gObjectList[objectIndex].unk_028[0] = 0.0f; + gObjectList[objectIndex].offset[2] = 0.0f; + gObjectList[objectIndex].offset[1] = 0.0f; + gObjectList[objectIndex].offset[0] = 0.0f; gObjectList[objectIndex].sizeScaling = 0.6f; - gObjectList[objectIndex].unk_0A0 = 0x00FF; + gObjectList[objectIndex].primAlpha = 0x00FF; } } } @@ -1579,81 +1578,81 @@ void func_8005A71C(void) { } } -void update_obj(void) { +void update_object(void) { switch (gCurrentCourseId) { - case COURSE_MARIO_RACEWAY: - case COURSE_CHOCO_MOUNTAIN: - break; - case COURSE_BOWSER_CASTLE: - func_80081208(); - update_particle_bowser_castle(); - break; - case COURSE_BANSHEE_BOARDWALK: - if (gGamestate != CREDITS_SEQUENCE) { - func_8007E1AC(); - func_8007E4C4(); - if (gModeSelection != TIME_TRIALS) { - func_8007DB44(); + case COURSE_MARIO_RACEWAY: + case COURSE_CHOCO_MOUNTAIN: + break; + case COURSE_BOWSER_CASTLE: + func_80081208(); + update_flame_particle(); + break; + case COURSE_BANSHEE_BOARDWALK: + if (gGamestate != CREDITS_SEQUENCE) { + update_trash_bin(); + func_8007E4C4(); + if (gModeSelection != TIME_TRIALS) { + update_bat(); + } + wrapper_update_boos(); + update_cheep_cheep(0); } - func_8007C340(); - func_8007C2F8(0); - } - break; - case COURSE_YOSHI_VALLEY: - func_80083080(); - if (gGamestate != CREDITS_SEQUENCE) { - func_800834B8(); - } - break; - case COURSE_FRAPPE_SNOWLAND: - if (gGamestate != CREDITS_SEQUENCE) { - func_80083D60(); - } - func_80078838(); - break; - case COURSE_KOOPA_BEACH: - if (gGamestate != CREDITS_SEQUENCE) { - func_80082E5C(); - } - if ((gPlayerCount == 1) || (gPlayerCount == 2) || (gGamestate == CREDITS_SEQUENCE)) { - func_80082870(); - } - break; - case COURSE_LUIGI_RACEWAY: - if (D_80165898 != 0) { - func_800857C0(); - } - break; - case COURSE_MOO_MOO_FARM: - if (gGamestate != CREDITS_SEQUENCE) { - func_800821FC(); - } - break; - case COURSE_KALAMARI_DESERT: - func_80075838(); - break; - case COURSE_SHERBET_LAND: - if (gGamestate != CREDITS_SEQUENCE) { - func_800842C8(); - } - func_80085214(); - break; - case COURSE_RAINBOW_ROAD: - if (gGamestate != CREDITS_SEQUENCE) { - update_neon(); - func_80085AA8(); - } - break; - case COURSE_DK_JUNGLE: - func_80075CA8(); - break; + break; + case COURSE_YOSHI_VALLEY: + func_80083080(); + if (gGamestate != CREDITS_SEQUENCE) { + update_hedgehogs(); + } + break; + case COURSE_FRAPPE_SNOWLAND: + if (gGamestate != CREDITS_SEQUENCE) { + update_snowmen(); + } + update_snowflakes(); + break; + case COURSE_KOOPA_BEACH: + if (gGamestate != CREDITS_SEQUENCE) { + update_crabs(); + } + if ((gPlayerCount == 1) || (gPlayerCount == 2) || (gGamestate == CREDITS_SEQUENCE)) { + update_seagulls(); + } + break; + case COURSE_LUIGI_RACEWAY: + if (D_80165898 != 0) { + update_hot_air_balloon(); + } + break; + case COURSE_MOO_MOO_FARM: + if (gGamestate != CREDITS_SEQUENCE) { + update_moles(); + } + break; + case COURSE_KALAMARI_DESERT: + update_train_smoke(); + break; + case COURSE_SHERBET_LAND: + if (gGamestate != CREDITS_SEQUENCE) { + func_800842C8(); + } + update_penguins(); + break; + case COURSE_RAINBOW_ROAD: + if (gGamestate != CREDITS_SEQUENCE) { + update_neon(); + update_chain_chomps(); + } + break; + case COURSE_DK_JUNGLE: + update_ferries_smoke_particle(); + break; } if (D_80165730 != 0) { func_80074EE8(); } func_80076F2C(); if ((s16) gCurrentCourseId != COURSE_FRAPPE_SNOWLAND) { - func_80077C9C(); + update_leaf(); } } diff --git a/src/code_80057C60.h b/src/code_80057C60.h index 09dc7e935..adec3a860 100644 --- a/src/code_80057C60.h +++ b/src/code_80057C60.h @@ -7,6 +7,16 @@ // code_80057C60 +#define RENDER_SCREEN_MODE_1P_PLAYER_ONE PLAYER_ONE+SCREEN_MODE_1P +#define RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE PLAYER_ONE+SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL +#define RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO PLAYER_TWO+SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL +#define RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE PLAYER_ONE+SCREEN_MODE_2P_SPLITSCREEN_VERTICAL+1 +#define RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO PLAYER_TWO+SCREEN_MODE_2P_SPLITSCREEN_VERTICAL+1 +#define RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE PLAYER_ONE+SCREEN_MODE_3P_4P_SPLITSCREEN+5 +#define RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO PLAYER_TWO+SCREEN_MODE_3P_4P_SPLITSCREEN+5 +#define RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE PLAYER_THREE+SCREEN_MODE_3P_4P_SPLITSCREEN+5 +#define RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR PLAYER_FOUR+SCREEN_MODE_3P_4P_SPLITSCREEN+5 + typedef struct { char unk_00[0x4]; Vec3f unk_04; @@ -23,21 +33,21 @@ void func_80057CE4(void); void func_80057DD0(void); void func_80057FC4(u32); -void func_80058090(u32); -void func_800581C8(void); -void func_800582CC(void); -void func_80058394(void); -void func_8005845C(void); -void func_80058538(u32); -void func_80058640(void); -void func_800586FC(void); -void func_800587A4(void); -void func_8005884C(void); -void func_800588F4(s32); -void func_80058B58(s32); +void render_object(u32); +void render_object_p1(void); +void render_object_p2(void); +void render_object_p3(void); +void render_object_p4(void); +void render_player_snow_effect(u32); +void render_player_snow_effect_one(void); +void render_player_snow_effect_two(void); +void render_player_snow_effect_three(void); +void render_player_snow_effect_four(void); +void render_object_for_player(s32); +void render_snowing_effect(s32); void func_80058BF4(void); void func_80058C20(u32); -void func_80058DB4(u32); +void render_hud(u32); void func_80058F48(void); void func_80058F78(void); void func_80059AC8(void); @@ -47,23 +57,23 @@ void func_8005902C(void); void func_800590D4(void); void func_800591B4(void); void func_80059358(void); -void func_80059360(void); +void render_hud_2p_horizontal_player_two_horizontal_player_one(void); void func_800593F0(void); -void func_800593F8(void); -void func_80059488(s32); +void render_hud_2p_horizontal_player_two(void); +void draw_simplified_hud(s32); void func_800594F0(void); -void func_800594F8(void); +void render_hud_2p_vertical_player_one(void); void func_80059528(void); -void func_80059530(void); -void func_80059560(s32); +void render_hud_2p_vertical_player_two(void); +void render_hud_lap_3p_4p(s32); void func_800596A8(void); -void func_800596D8(void); +void render_hud_1p_multi(void); void func_80059710(void); -void func_80059718(void); +void render_hud_2p_multi(void); void func_80059750(void); -void func_80059780(void); +void render_hud_3p_multi(void); void func_800597B8(void); -void func_800597E8(void); +void render_hud_4p_multi(void); void func_80059820(s32); void randomize_seed_from_controller(s32); void func_8005994C(void); @@ -77,7 +87,7 @@ void func_8005A14C(s32); void func_8005A380(void); void func_8005A3C0(void); void func_8005A71C(void); -void update_obj(void); +void update_object(void); void func_8005A99C(void); void func_8005AA34(void); void func_8005AA4C(void); @@ -311,7 +321,7 @@ extern s8 D_8016579C; extern u16 D_8016579E; extern u16 D_801657A2; extern s8 D_801657AE; -extern s8 D_801657B0; +extern s8 gHUDDisable; extern s8 D_801657B2; extern s8 D_801657B4; extern s8 D_801657B8[]; @@ -380,7 +390,7 @@ extern f32 D_80183DA8[]; // extern s32 gIndexLakituList[]; -> objects.h extern f32 D_80183DC8[]; -// extern s32 D_80183DD8[]; -> bomb_kart.h +// extern s32 gIndexObjectBombKart[]; -> bomb_kart.h // extern s32 gNextFreeObjectParticle1; -> objects.h extern Vec3f D_80183E40; diff --git a/src/code_8006E9C0.c b/src/code_8006E9C0.c index 6168b681c..bbbb9b036 100644 --- a/src/code_8006E9C0.c +++ b/src/code_8006E9C0.c @@ -8,7 +8,7 @@ #include "code_80057C60.h" #include "code_8006E9C0.h" #include "code_80086E70.h" -#include "code_80071F00.h" +#include "update_objects.h" #include "objects.h" #include "bomb_kart.h" #include "save.h" @@ -20,10 +20,10 @@ #include "main.h" #include "menus.h" #include "data/other_textures.h" -#include "hud_renderer.h" +#include "render_objects.h" #include "code_80091750.h" -void init_object_list(void) { +void init_hud(void) { reset_object_variable(); func_8006FA94(); @@ -543,8 +543,8 @@ void func_8006FA94(void) { D_801657B2 = 0; D_801657D8 = D_801657B2; D_8018D214 = D_801657D8; - D_801657B0 = D_8018D214; - D_801657AE = D_801657B0; + gHUDDisable = D_8018D214; + D_801657AE = gHUDDisable; D_8018D20C = 0; D_8018D2F8 = 0; D_8018D2F0 = D_8018D2F8; @@ -600,7 +600,7 @@ void init_object_list_index(void) { } for(loopIndex = 0; loopIndex < NUM_BOMB_KARTS_VERSUS; loopIndex++) { - find_unused_obj_index(&D_80183DD8[loopIndex]); + find_unused_obj_index(&gIndexObjectBombKart[loopIndex]); } } @@ -616,7 +616,7 @@ void func_80070250(s32 objectIndex, s32 arg1, StarSpawn *arg2) { temp_v0->sizeScaling = (f32) arg2->pos[2] / 100.0; temp_v0->activeTexture = &D_8018D220[arg2->id]; func_80073404(objectIndex, 0x40U, 0x20U, &D_0D005FB0); - temp_v0->unk_0A0 = 0x00FF; + temp_v0->primAlpha = 0x00FF; } void func_80070328(StarSpawn *arg0) { @@ -780,7 +780,7 @@ void init_course_object(void) { gObjectList[objectId].origin_pos[0] = gThowmpSpawnList[i].startX * xOrientation; gObjectList[objectId].origin_pos[2] = gThowmpSpawnList[i].startZ; gObjectList[objectId].unk_0D5 = gThowmpSpawnList[i].unk_4; - gObjectList[objectId].unk_0A0 = gThowmpSpawnList[i].unk_6; + gObjectList[objectId].primAlpha = gThowmpSpawnList[i].unk_6; } // Handle the big statue's fire breath objectId = indexObjectList2[0]; @@ -805,7 +805,7 @@ void init_course_object(void) { } break; case COURSE_BANSHEE_BOARDWALK: - if (gGamestate != 9) { + if (gGamestate != CREDITS_SEQUENCE) { objectId = indexObjectList1[0]; init_texture_object(objectId, d_course_banshee_boardwalk_bat_tlut, *d_course_banshee_boardwalk_bat, 0x20U, (u16) 0x00000040); gObjectList[objectId].orientation[0] = 0; @@ -816,10 +816,10 @@ void init_course_object(void) { } break; case COURSE_YOSHI_VALLEY: - for (i = 0; i < 4; i++) { + for (i = 0; i < NUM_YV_FLAG_POLES; i++) { init_object(indexObjectList1[i], 0); } - if (gGamestate != 9) { + if (gGamestate != CREDITS_SEQUENCE) { for (i = 0; i < NUM_HEDGEHOGS; i++) { objectId = indexObjectList2[i]; init_object(objectId, 0); @@ -836,7 +836,7 @@ void init_course_object(void) { for (i = 0; i < NUM_SNOWFLAKES; i++) { find_unused_obj_index(&gObjectParticle1[i]); } - if (gGamestate != 9) { + if (gGamestate != CREDITS_SEQUENCE) { for (i = 0; i < NUM_SNOWMEN; i++) { objectId = indexObjectList2[i]; init_object(objectId, 0); @@ -853,7 +853,7 @@ void init_course_object(void) { } break; case COURSE_KOOPA_BEACH: - if (gGamestate != 9) { + if (gGamestate != CREDITS_SEQUENCE) { for (i = 0; i < NUM_CRABS; i++) { objectId = indexObjectList1[i]; init_object(objectId, 0); @@ -875,7 +875,7 @@ void init_course_object(void) { } break; case COURSE_ROYAL_RACEWAY: - if (gGamestate != 9) { + if (gGamestate != CREDITS_SEQUENCE) { if (gModeSelection == GRAND_PRIX) { func_80070714(); } @@ -886,7 +886,7 @@ void init_course_object(void) { } break; case COURSE_LUIGI_RACEWAY: - if (gGamestate != 9) { + if (gGamestate != CREDITS_SEQUENCE) { if (gModeSelection == GRAND_PRIX) { func_80070714(); } @@ -899,7 +899,7 @@ void init_course_object(void) { } break; case COURSE_MOO_MOO_FARM: - if (gGamestate != 9) { + if (gGamestate != CREDITS_SEQUENCE) { if ((gPlayerCount == 1) || ((gPlayerCount == 2) && (gModeSelection == VERSUS))) { switch (gCCSelection) { /* switch 2; irregular */ case CC_50: /* switch 2 */ @@ -955,7 +955,7 @@ void init_course_object(void) { } break; case COURSE_KALAMARI_DESERT: - if (gGamestate != 9) { + if (gGamestate != CREDITS_SEQUENCE) { find_unused_obj_index(&D_8018CF10); init_object(D_8018CF10, 0); for (i = 0; i < 50; i++) { @@ -975,7 +975,7 @@ void init_course_object(void) { } break; case COURSE_RAINBOW_ROAD: - if (gGamestate != 9) { + if (gGamestate != CREDITS_SEQUENCE) { for (i = 0; i < NUM_NEON_SIGNS; i++) { init_object(indexObjectList1[i], 0); } @@ -986,7 +986,7 @@ void init_course_object(void) { break; case COURSE_DK_JUNGLE: for (i = 0; i < NUM_TORCHES; i++) { - func_800770F0(i); + init_smoke_particles(i); // wtf? if (D_8018CF10){} } diff --git a/src/code_8006E9C0.h b/src/code_8006E9C0.h index d6b646cd9..f948e1145 100644 --- a/src/code_8006E9C0.h +++ b/src/code_8006E9C0.h @@ -2,9 +2,9 @@ #define CODE_8006E9C0_H #include "common_structs.h" -#include "code_80071F00.h" +#include "update_objects.h" -void init_object_list(void); +void init_hud(void); void reset_object_variable(void); void func_8006EB10(void); void clear_object_list(void); @@ -35,7 +35,7 @@ extern s16 D_800E5520[]; extern s16 D_800E5548[]; extern u8 *gCourseOutlineTextures[0x14]; // 800e54d0 -// These are found in data_code_80071F00 +// These are found in data_update_objects extern StarSpawn D_800E6A38[]; /* unable to generate initializer */ extern StarSpawn D_800E6AA8[]; /* unable to generate initializer */ extern StarSpawn D_800E6B00[]; /* unable to generate initializer */ diff --git a/src/code_80086E70.c b/src/code_80086E70.c index a542edf54..869fd78d1 100644 --- a/src/code_80086E70.c +++ b/src/code_80086E70.c @@ -9,7 +9,7 @@ #include "math_util.h" #include "math_util_2.h" #include "racing/memory.h" -#include "code_80071F00.h" +#include "update_objects.h" #include "collision.h" #include "audio/external.h" #include "main.h" @@ -18,13 +18,13 @@ void func_80086E70(s32 objectIndex) { gObjectList[objectIndex].unk_0AE = 1;// * 0xE0)) = 1; - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 8); } void func_80086EAC(s32 objectIndex, s32 arg1, s16 arg2) { gObjectList[objectIndex].unk_0DD = arg1; gObjectList[objectIndex].unk_0AE = arg2; - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 8); } void func_80086EF0(s32 objectIndex) { @@ -41,7 +41,7 @@ void func_80086F60(s32 objectIndex) { gObjectList[objectIndex].unk_0AE = 0; gObjectList[objectIndex].unk_0DD = 0; gObjectList[objectIndex].unk_0DE = 0; - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 8); } bool func_80086FA4(s32 objectIndex) { @@ -53,12 +53,12 @@ bool func_80086FA4(s32 objectIndex) { } void func_80086FD4(s32 objectIndex) { - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 8); gObjectList[objectIndex].unk_0AE += 1; } void func_8008701C(s32 objectIndex, s32 arg1) { - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 8); gObjectList[objectIndex].unk_0AE = arg1; } @@ -66,13 +66,13 @@ s32 func_80087060(s32 objectIndex, s32 arg1) { s32 sp1C; sp1C = 0; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) { - set_object_flag_unk_054_true(objectIndex, 8); + if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) { + set_object_flag_status_true(objectIndex, 8); gObjectList[objectIndex].unk_0B0 = arg1; } gObjectList[objectIndex].unk_0B0--; if (gObjectList[objectIndex].unk_0B0 < 0) { - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 8); sp1C = 1; } return sp1C; @@ -82,13 +82,13 @@ s32 func_80087104(s32 objectIndex, u16 arg1) { s32 sp24; sp24 = 0; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) { - set_object_flag_unk_054_true(objectIndex, 8); + if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) { + set_object_flag_status_true(objectIndex, 8); gObjectList[objectIndex].unk_0B0 = random_int(arg1); } gObjectList[objectIndex].unk_0B0--; if (gObjectList[objectIndex].unk_0B0 < 0) { - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 8); sp24 = 1; } return sp24; @@ -98,13 +98,13 @@ s32 func_800871AC(s32 objectIndex, s32 arg1) { s32 sp24; sp24 = 0; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) { - set_object_flag_unk_054_true(objectIndex, 8); + if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) { + set_object_flag_status_true(objectIndex, 8); gObjectList[objectIndex].unk_0B0 = (s16) arg1; } gObjectList[objectIndex].unk_0B0--; if (gObjectList[objectIndex].unk_0B0 < 0) { - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 8); func_80086FD4(objectIndex); sp24 = 1; } @@ -112,12 +112,12 @@ s32 func_800871AC(s32 objectIndex, s32 arg1) { } UNUSED void func_80087258(s32 objectIndex, UNUSED s32 arg1, f32 arg2) { - gObjectList[objectIndex].unk_028[1] += arg2; - gObjectList[objectIndex].unk_028[2] -= arg2; + gObjectList[objectIndex].offset[1] += arg2; + gObjectList[objectIndex].offset[2] -= arg2; } -UNUSED s32 func_80087294(s32 objectIndex, Player *player) { - return func_80041770(player->pos[0], gObjectList[objectIndex].pos[0], player->pos[2], gObjectList[objectIndex].pos[2]); +UNUSED s32 get_angle_between_player_object(s32 objectIndex, Player *player) { + return get_angle_between_xy(player->pos[0], gObjectList[objectIndex].pos[0], player->pos[2], gObjectList[objectIndex].pos[2]); } s32 angle_between_object_camera(s32 objectIndex, Camera *camera) { @@ -173,41 +173,41 @@ void func_80087620(s32 objectIndex) { } void func_800876A0(s32 objectIndex) { - gObjectList[objectIndex].unk_028[0] += gObjectList[objectIndex].unk_034 * sins(gObjectList[objectIndex].direction_angle[1]); - gObjectList[objectIndex].unk_028[2] += gObjectList[objectIndex].unk_034 * coss(gObjectList[objectIndex].direction_angle[1]); + gObjectList[objectIndex].offset[0] += gObjectList[objectIndex].unk_034 * sins(gObjectList[objectIndex].direction_angle[1]); + gObjectList[objectIndex].offset[2] += gObjectList[objectIndex].unk_034 * coss(gObjectList[objectIndex].direction_angle[1]); } -void func_80087710(s32 objectIndex) { - gObjectList[objectIndex].unk_028[0] += gObjectList[objectIndex].velocity[0]; - gObjectList[objectIndex].unk_028[1] += gObjectList[objectIndex].velocity[1]; - gObjectList[objectIndex].unk_028[2] += gObjectList[objectIndex].velocity[2]; +void object_add_velocity_offset_xyz(s32 objectIndex) { + gObjectList[objectIndex].offset[0] += gObjectList[objectIndex].velocity[0]; + gObjectList[objectIndex].offset[1] += gObjectList[objectIndex].velocity[1]; + gObjectList[objectIndex].offset[2] += gObjectList[objectIndex].velocity[2]; } -void func_8008775C(s32 objectIndex) { - gObjectList[objectIndex].unk_028[0] += gObjectList[objectIndex].velocity[0]; - gObjectList[objectIndex].unk_028[2] += gObjectList[objectIndex].velocity[2]; +void object_add_velocity_offset_xz(s32 objectIndex) { + gObjectList[objectIndex].offset[0] += gObjectList[objectIndex].velocity[0]; + gObjectList[objectIndex].offset[2] += gObjectList[objectIndex].velocity[2]; } -UNUSED void func_80087798(s32 objectIndex) { - gObjectList[objectIndex].unk_028[0] += gObjectList[objectIndex].velocity[0]; +UNUSED void object_add_velocity_offset_x(s32 objectIndex) { + gObjectList[objectIndex].offset[0] += gObjectList[objectIndex].velocity[0]; } -void func_800877C4(s32 objectIndex) { - gObjectList[objectIndex].unk_028[1] += gObjectList[objectIndex].velocity[1]; +void object_add_velocity_offset_y(s32 objectIndex) { + gObjectList[objectIndex].offset[1] += gObjectList[objectIndex].velocity[1]; } -UNUSED void func_800877F0(s32 objectIndex) { - gObjectList[objectIndex].unk_028[2] += gObjectList[objectIndex].velocity[2]; +UNUSED void object_add_velocity_offset_z(s32 objectIndex) { + gObjectList[objectIndex].offset[2] += gObjectList[objectIndex].velocity[2]; } void func_8008781C(s32 arg0) { func_8008751C(arg0); - func_8008775C(arg0); + object_add_velocity_offset_xz(arg0); } void func_80087844(s32 arg0) { func_8008757C(arg0); - func_80087710(arg0); + object_add_velocity_offset_xyz(arg0); } f32 func_8008786C(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { @@ -218,17 +218,17 @@ s32 func_8008789C(s32 objectIndex, s32 arg1) { s32 sp24; sp24 = 0; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) { - set_object_flag_unk_054_true(objectIndex, 8); + if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) { + set_object_flag_status_true(objectIndex, 8); func_8008751C(objectIndex); gObjectList[objectIndex].unk_0B0 = arg1; } gObjectList[objectIndex].unk_0B0--; if (gObjectList[objectIndex].unk_0B0 < 0) { - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 8); sp24 = 1; } else { - func_8008775C(objectIndex); + object_add_velocity_offset_xz(objectIndex); } return sp24; } @@ -237,17 +237,17 @@ s32 func_80087954(s32 objectIndex, s32 arg1) { s32 sp24; sp24 = 0; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) { - set_object_flag_unk_054_true(objectIndex, 8); + if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) { + set_object_flag_status_true(objectIndex, 8); func_80087620(objectIndex); gObjectList[objectIndex].unk_0B0 = arg1; } gObjectList[objectIndex].unk_0B0--; if (gObjectList[objectIndex].unk_0B0 < 0) { - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 8); sp24 = 1; } else { - func_8008775C(objectIndex); + object_add_velocity_offset_xz(objectIndex); } return sp24; } @@ -259,8 +259,8 @@ bool func_80087A0C(s32 objectIndex, s16 arg1, s16 arg2, s16 arg3, s16 arg4) { bool sp2C; sp2C = FALSE; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) { - set_object_flag_unk_054_true(objectIndex, 8); + if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) { + set_object_flag_status_true(objectIndex, 8); temp_v0 = arg2 - arg1; temp_a0 = arg4 - arg3; dist = sqrtf((temp_v0 * temp_v0) + (temp_a0 * temp_a0)); @@ -271,10 +271,10 @@ bool func_80087A0C(s32 objectIndex, s16 arg1, s16 arg2, s16 arg3, s16 arg4) { } gObjectList[objectIndex].unk_0B0--; if (gObjectList[objectIndex].unk_0B0 < 0) { - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 8); sp2C = TRUE; } else { - func_8008775C(objectIndex); + object_add_velocity_offset_xz(objectIndex); } return sp2C; } @@ -283,13 +283,13 @@ s32 func_80087B84(s32 objectIndex, f32 arg1, f32 arg2) { s32 sp24; sp24 = 0; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) { - set_object_flag_unk_054_true(objectIndex, 8); + if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) { + set_object_flag_status_true(objectIndex, 8); gObjectList[objectIndex].velocity[1] = -arg1; } - func_800877C4(objectIndex); + object_add_velocity_offset_y(objectIndex); if (gObjectList[objectIndex].pos[1] <= arg2) { - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 8); func_80086FD4(objectIndex); sp24 = 1; } @@ -300,19 +300,19 @@ s32 func_80087C48(s32 objectIndex, f32 arg1, f32 arg2, s32 arg3) { s32 sp24; sp24 = 0; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != FALSE) { - set_object_flag_unk_054_true(objectIndex, 8); + if (is_obj_index_flag_status_inactive(objectIndex, 8) != FALSE) { + set_object_flag_status_true(objectIndex, 8); gObjectList[objectIndex].velocity[1] = arg1; gObjectList[objectIndex].unk_0B0 = (s16) arg3; } gObjectList[objectIndex].unk_0B0--; if (gObjectList[objectIndex].unk_0B0 < 0) { - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 8); func_80086FD4(objectIndex); sp24 = 1; } else { gObjectList[objectIndex].velocity[1] -= arg2; - func_800877C4(objectIndex); + object_add_velocity_offset_y(objectIndex); } return sp24; } @@ -321,15 +321,15 @@ s32 func_80087D24(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3) { s32 sp24; sp24 = 0; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != 0) { - set_object_flag_unk_054_true(objectIndex, 8); + if (is_obj_index_flag_status_inactive(objectIndex, 8) != 0) { + set_object_flag_status_true(objectIndex, 8); gObjectList[objectIndex].velocity[1] = arg1; } gObjectList[objectIndex].velocity[1] -= arg2; - func_800877C4(objectIndex); - if (gObjectList[objectIndex].unk_028[1] <= arg3) { - set_object_flag_unk_054_false(objectIndex, 8); - gObjectList[objectIndex].unk_028[1] = arg3; + object_add_velocity_offset_y(objectIndex); + if (gObjectList[objectIndex].offset[1] <= arg3) { + set_object_flag_status_false(objectIndex, 8); + gObjectList[objectIndex].offset[1] = arg3; func_80086FD4(objectIndex); sp24 = 1; } @@ -341,11 +341,11 @@ bool func_80087E08(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3, s16 arg4, s32 UNUSED s32 pad; sp2C = FALSE; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != 0) { - set_object_flag_unk_054_true(objectIndex, 8); - gObjectList[objectIndex].unk_028[2] = 0.0f; - gObjectList[objectIndex].unk_028[1] = 0.0f; - gObjectList[objectIndex].unk_028[0] = 0.0f; + if (is_obj_index_flag_status_inactive(objectIndex, 8) != 0) { + set_object_flag_status_true(objectIndex, 8); + gObjectList[objectIndex].offset[2] = 0.0f; + gObjectList[objectIndex].offset[1] = 0.0f; + gObjectList[objectIndex].offset[0] = 0.0f; gObjectList[objectIndex].unk_034 = arg3; gObjectList[objectIndex].velocity[1] = arg1; gObjectList[objectIndex].direction_angle[1] = arg4; @@ -354,12 +354,12 @@ bool func_80087E08(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3, s16 arg4, s32 } gObjectList[objectIndex].unk_0B0--; if (gObjectList[objectIndex].unk_0B0 < 0) { - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 8); func_80086FD4(objectIndex); sp2C = TRUE; } else { gObjectList[objectIndex].velocity[1] -= arg2; - func_80087710(objectIndex); + object_add_velocity_offset_xyz(objectIndex); } return sp2C; } @@ -369,24 +369,24 @@ UNUSED s32 func_80087F14(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3, s16 arg4 UNUSED s32 stackPadding; sp2C = 0; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != 0) { - set_object_flag_unk_054_true(objectIndex, 8); - gObjectList[objectIndex].unk_028[2] = 0.0f; - gObjectList[objectIndex].unk_028[1] = 0.0f; - gObjectList[objectIndex].unk_028[0] = 0.0f; + if (is_obj_index_flag_status_inactive(objectIndex, 8) != 0) { + set_object_flag_status_true(objectIndex, 8); + gObjectList[objectIndex].offset[2] = 0.0f; + gObjectList[objectIndex].offset[1] = 0.0f; + gObjectList[objectIndex].offset[0] = 0.0f; gObjectList[objectIndex].unk_034 = arg3; gObjectList[objectIndex].velocity[1] = arg1; gObjectList[objectIndex].direction_angle[1] = arg4; func_8008751C(objectIndex); gObjectList[objectIndex].unk_0B0 = gVBlankTimer; } - if (gObjectList[objectIndex].unk_028[1] <= arg5) { - set_object_flag_unk_054_false(objectIndex, 8); + if (gObjectList[objectIndex].offset[1] <= arg5) { + set_object_flag_status_false(objectIndex, 8); func_80086FD4(objectIndex); sp2C = 1; } else { gObjectList[objectIndex].velocity[1] -= arg2; - func_80087710(objectIndex); + object_add_velocity_offset_xyz(objectIndex); } return sp2C; } @@ -395,13 +395,13 @@ void func_80088038(s32 objectIndex, f32 arg1, u16 arg2) { f32 temp_f4; f32 sp20; - temp_f4 = gObjectList[objectIndex].unk_028[0]; - sp20 = gObjectList[objectIndex].unk_028[2]; + temp_f4 = gObjectList[objectIndex].offset[0]; + sp20 = gObjectList[objectIndex].offset[2]; gObjectList[objectIndex].unk_0C4 += arg2; - gObjectList[objectIndex].unk_028[0] = sins(gObjectList[objectIndex].unk_0C4) * arg1; - gObjectList[objectIndex].unk_028[2] = coss(gObjectList[objectIndex].unk_0C4) * arg1; - gObjectList[objectIndex].velocity[0] = gObjectList[objectIndex].unk_028[0] - temp_f4; - gObjectList[objectIndex].velocity[2] = gObjectList[objectIndex].unk_028[2] - sp20; + gObjectList[objectIndex].offset[0] = sins(gObjectList[objectIndex].unk_0C4) * arg1; + gObjectList[objectIndex].offset[2] = coss(gObjectList[objectIndex].unk_0C4) * arg1; + gObjectList[objectIndex].velocity[0] = gObjectList[objectIndex].offset[0] - temp_f4; + gObjectList[objectIndex].velocity[2] = gObjectList[objectIndex].offset[2] - sp20; } UNUSED void func_800880DC(void) { @@ -449,9 +449,9 @@ void func_80088228(s32 objectIndex) { but for some unholy reason that doesn't match */ temp_v0->unk_084[8] = *((s16*)temp_v0->controlPoints - 1); - temp_v0->unk_028[0] = temp_v0->controlPoints[0].pos[0]; - temp_v0->unk_028[1] = temp_v0->controlPoints[0].pos[1]; - temp_v0->unk_028[2] = temp_v0->controlPoints[0].pos[2]; + temp_v0->offset[0] = temp_v0->controlPoints[0].pos[0]; + temp_v0->offset[1] = temp_v0->controlPoints[0].pos[1]; + temp_v0->offset[2] = temp_v0->controlPoints[0].pos[2]; func_80086FD4(objectIndex); } @@ -463,9 +463,9 @@ s32 func_800882B0(s32 objectIndex, s32 arg1) { s32 var_v1; var_v1 = 0; - temp_f0 = (s32)((D_80165760[1] - gObjectList[objectIndex].unk_028[0]) * (D_80165760[1] - gObjectList[objectIndex].unk_028[0])); - temp_f12 = (s32)((D_80165770[1] - gObjectList[objectIndex].unk_028[1]) * (D_80165770[1] - gObjectList[objectIndex].unk_028[1])); - temp_f2 = (s32)((D_80165780[1] - gObjectList[objectIndex].unk_028[2]) * (D_80165780[1] - gObjectList[objectIndex].unk_028[2])); + temp_f0 = (s32)((D_80165760[1] - gObjectList[objectIndex].offset[0]) * (D_80165760[1] - gObjectList[objectIndex].offset[0])); + temp_f12 = (s32)((D_80165770[1] - gObjectList[objectIndex].offset[1]) * (D_80165770[1] - gObjectList[objectIndex].offset[1])); + temp_f2 = (s32)((D_80165780[1] - gObjectList[objectIndex].offset[2]) * (D_80165780[1] - gObjectList[objectIndex].offset[2])); if ((temp_f0 + temp_f12 + temp_f2 - (arg1 * arg1)) <= 0) { var_v1 = 1; } @@ -509,12 +509,12 @@ s32 func_8008847C(s32 objectIndex) { s32 sp2C; sp2C = 0; - set_object_flag_unk_054_false(objectIndex, 0x00800000); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000400) != 0) { + set_object_flag_status_false(objectIndex, 0x00800000); + if (is_obj_flag_status_active(objectIndex, 0x00000400) != 0) { func_802ADDC8(&D_8018C3B0, 10.0f, gObjectList[objectIndex].pos[0], 20.0f, gObjectList[objectIndex].pos[2]); if (D_8018C3B0.unk34 == 1) { sp2C = 1; - set_object_flag_unk_054_true(objectIndex, 0x00800000); + set_object_flag_status_true(objectIndex, 0x00800000); } gObjectList[objectIndex].unk_044 = func_802ABE30(gObjectList[objectIndex].pos[0], 0.0f, gObjectList[objectIndex].pos[2], D_8018C3B0.unk3A); } @@ -525,12 +525,12 @@ s32 func_80088538(s32 objectIndex) { s32 sp2C; sp2C = 0; - set_object_flag_unk_054_false(objectIndex, 0x00800000); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000400) != 0) { + set_object_flag_status_false(objectIndex, 0x00800000); + if (is_obj_flag_status_active(objectIndex, 0x00000400) != 0) { func_802ADDC8(&D_8018C3B0, 10.0f, gObjectList[objectIndex].pos[0], 20.0f, gObjectList[objectIndex].pos[2]); if (D_8018C3B0.unk34 == 1) { sp2C = 1; - set_object_flag_unk_054_true(objectIndex, 0x00800000); + set_object_flag_status_true(objectIndex, 0x00800000); } gObjectList[objectIndex].unk_044 = func_802ABE30(gObjectList[objectIndex].pos[0], 0.0f, gObjectList[objectIndex].pos[2], D_8018C3B0.unk3A); gObjectList[objectIndex].unk_0B8[0] = atan2s(D_8018C3B0.orientationVector[2], D_8018C3B0.orientationVector[1]) + 0x4000; @@ -543,12 +543,12 @@ s32 func_8008861C(s32 objectIndex) { s32 sp2C; sp2C = 0; - set_object_flag_unk_054_false(objectIndex, 0x00800000); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000400) != 0) { + set_object_flag_status_false(objectIndex, 0x00800000); + if (is_obj_flag_status_active(objectIndex, 0x00000400) != 0) { func_802ADDC8(&D_8018C3B0, 10.0f, gObjectList[objectIndex].pos[0], 20.0f, gObjectList[objectIndex].pos[2]); if (D_8018C3B0.unk34 == 1) { sp2C = 1; - set_object_flag_unk_054_true(objectIndex, 0x00800000); + set_object_flag_status_true(objectIndex, 0x00800000); } gObjectList[objectIndex].unk_044 = func_802ABE30(gObjectList[objectIndex].pos[0], 0.0f, gObjectList[objectIndex].pos[2], D_8018C3B0.unk3A); gObjectList[objectIndex].unk_01C[0] = D_8018C3B0.orientationVector[0]; @@ -561,26 +561,26 @@ s32 func_8008861C(s32 objectIndex) { void func_800886F4(s32 objectIndex) { func_802ADDC8(&D_8018C3B0, 10.0f, gObjectList[objectIndex].pos[0], 20.0f, gObjectList[objectIndex].pos[2]); if (D_8018C3B0.unk34 == 1) { - set_object_flag_unk_054_true(objectIndex, 0x00800000); + set_object_flag_status_true(objectIndex, 0x00800000); gObjectList[objectIndex].unk_044 = func_802ABE30(gObjectList[objectIndex].pos[0], 0.0f, gObjectList[objectIndex].pos[2], D_8018C3B0.unk3A); gObjectList[objectIndex].unk_0B8[0] = atan2s(D_8018C3B0.orientationVector[2], D_8018C3B0.orientationVector[1]) + 0x4000; gObjectList[objectIndex].unk_0B8[2] = atan2s(D_8018C3B0.orientationVector[0], D_8018C3B0.orientationVector[1]); return; } - set_object_flag_unk_054_false(objectIndex, 0x00800000); + set_object_flag_status_false(objectIndex, 0x00800000); } void func_800887C0(s32 objectIndex) { func_802ADDC8(&D_8018C3B0, 10.0f, gObjectList[objectIndex].pos[0], 20.0f, gObjectList[objectIndex].pos[2]); if (D_8018C3B0.unk34 == 1) { - set_object_flag_unk_054_true(objectIndex, 0x00800000); + set_object_flag_status_true(objectIndex, 0x00800000); gObjectList[objectIndex].unk_044 = func_802ABE30(gObjectList[objectIndex].pos[0], 0.0f, gObjectList[objectIndex].pos[2], D_8018C3B0.unk3A); gObjectList[objectIndex].velocity[0] = D_8018C3B0.orientationVector[0]; gObjectList[objectIndex].velocity[1] = D_8018C3B0.orientationVector[1]; gObjectList[objectIndex].velocity[2] = D_8018C3B0.orientationVector[2]; return; } - set_object_flag_unk_054_false(objectIndex, 0x00800000); + set_object_flag_status_false(objectIndex, 0x00800000); } /** @@ -1038,7 +1038,7 @@ void func_80089474(s32 objectIndex, s32 playerId, f32 arg2, f32 arg3, u32 soundB Player *player; player = &gPlayerOne[playerId]; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) { func_80072180(); } if ((func_8008933C(player, objectIndex, arg2, arg3) >= 4.0) && ((player->type & PLAYER_CPU) != PLAYER_CPU)) { @@ -1063,10 +1063,10 @@ s32 func_800895E4(s32 objectIndex) { var_s6 = 0; player = gPlayerOne; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) { for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) { if ((gObjectList[objectIndex].state != 0) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) { - if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) { func_80072180(); } var_s6 = 1; @@ -1081,11 +1081,11 @@ void func_800896D4(s32 objectIndex, f32 arg1, f32 arg2) { s32 var_s1; player = gPlayerOne; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) { for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) { if ((gObjectList[objectIndex].state != 0) && !(player->effects & (STAR_EFFECT | BOO_EFFECT)) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) { func_8008933C(player, objectIndex, arg1, arg2 * 1.1); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) { func_80072180(); } } @@ -1098,15 +1098,15 @@ void func_80089820(s32 objectIndex, f32 arg1, f32 arg2, u32 arg3) { s32 var_s1; player = gPlayerOne; - set_object_flag_unk_054_false(objectIndex, 0x02000000); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) { + set_object_flag_status_false(objectIndex, 0x02000000); + if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) { for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) { if ((gObjectList[objectIndex].state != 0) && !(player->effects & BOO_EFFECT)) { if ((player->type & PLAYER_EXISTS) && !(player->type & PLAYER_INVISIBLE_OR_BOMB) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) { if (player->effects & STAR_EFFECT) { - set_object_flag_unk_054_true(objectIndex, 0x02000000); + set_object_flag_status_true(objectIndex, 0x02000000); } else { - if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) { func_80072180(); } if ((func_8008933C(player, objectIndex, arg1, arg2 * 1.1) >= 4.0) && ((player->type & PLAYER_CPU) != PLAYER_CPU)) { @@ -1124,11 +1124,11 @@ void func_80089A04(s32 objectIndex, f32 arg1, f32 arg2) { s32 var_s1; player = gPlayerOne; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) { for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) { if ((gObjectList[objectIndex].state != 0) && !(player->effects & (BOO_EFFECT | STAR_EFFECT)) && (has_collided_with_player(objectIndex, player) != 0)) { func_8008933C(player, objectIndex, arg1, arg2 * 1.1); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) { func_80072180(); } } @@ -1145,12 +1145,12 @@ s32 func_80089B50(s32 objectIndex) { test = 0; sp40 = 0; player = gPlayerOne; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) { for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++, test++) { if ((gObjectList[objectIndex].state != 0) && !(player->effects & 0x81000000) && (player->type & PLAYER_EXISTS) && !(player->type & PLAYER_INVISIBLE_OR_BOMB) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) { if (!(player->effects & STAR_EFFECT)) { player->soundEffects |= REVERSE_SOUND_EFFECT; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) { func_80072180(); } } else { @@ -1170,13 +1170,13 @@ s32 func_80089CBC(s32 objectIndex, f32 arg1) { var_s7 = 0; player = gPlayerOne; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) { for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) { if ((gObjectList[objectIndex].state != 0) && !(player->effects & 0x81000000)) { if ((player->type & PLAYER_EXISTS) && !(player->type & PLAYER_INVISIBLE_OR_BOMB) && (has_collided_with_player_and_within_height(objectIndex, player, arg1) != 0)) { if (!(player->effects & STAR_EFFECT)) { player->soundEffects |= REVERSE_SOUND_EFFECT; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) { func_80072180(); } } @@ -1195,7 +1195,7 @@ s32 func_80089E18(s32 objectIndex) { var_s6 = 0; player = gPlayerOne; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) { for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) { if ((gObjectList[objectIndex].state != 0) && !(player->effects & 0x800000C0) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) { if (player->effects & STAR_EFFECT) { @@ -1216,12 +1216,12 @@ s32 func_80089F24(s32 objectIndex) { var_s7 = 0; player = gPlayerOne; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) { for (var_s1 = 0; var_s1 < D_8018D158; var_s1++, player++) { if ((gObjectList[objectIndex].state != 0) && !(player->effects & 0x800002C0)) { if ((player->type & PLAYER_EXISTS) && !(player->type & PLAYER_INVISIBLE_OR_BOMB) && (has_collided_horizontally_with_player(objectIndex, player) != 0)) { var_s7 = 1; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) { func_80072180(); } player->soundEffects |= 0x200000; @@ -1262,14 +1262,14 @@ s32 func_8008A0B4(s32 objectIndex, Player *player, Camera *camera, u16 arg3) { return var_t0; } -s32 func_8008A140(s32 objectIndex, Camera *camera, u16 arg2) { +bool is_object_visible_on_camera(s32 objectIndex, Camera *camera, u16 angle) { u16 temp_t2; s32 var_t0; - var_t0 = 0; - temp_t2 = (func_80041770(camera->pos[0], gObjectList[objectIndex].pos[0], camera->pos[2], gObjectList[objectIndex].pos[2]) + ((s32) arg2 / 2)) - camera->rot[1]; - if ((temp_t2 >= 0) && (arg2 >= temp_t2)) { - var_t0 = 1; + var_t0 = FALSE; + temp_t2 = (get_angle_between_xy(camera->pos[0], gObjectList[objectIndex].pos[0], camera->pos[2], gObjectList[objectIndex].pos[2]) + ((s32) angle / 2)) - camera->rot[1]; + if ((temp_t2 >= 0) && (angle >= temp_t2)) { + var_t0 = TRUE; } return var_t0; } @@ -1280,7 +1280,7 @@ void func_8008A1D0(s32 objectIndex, s32 cameraId, s32 arg2, s32 arg3) { Camera *camera; camera = &camera1[cameraId]; - set_object_flag_unk_054_false(objectIndex, 0x00140000); + set_object_flag_status_false(objectIndex, 0x00100000 | VISIBLE); temp_v0 = get_horizontal_distance_to_camera(objectIndex, camera); if (temp_v0 < 0x2711U) { var_a2 = 0x5555; @@ -1289,10 +1289,10 @@ void func_8008A1D0(s32 objectIndex, s32 cameraId, s32 arg2, s32 arg3) { } else { var_a2 = 0x2AAB; } - if ((func_8008A140(objectIndex, camera, var_a2) != 0) && ((u32) (arg3 * arg3) >= temp_v0)) { - set_object_flag_unk_054_true(objectIndex, 0x00040000); + if ((is_object_visible_on_camera(objectIndex, camera, var_a2) != 0) && ((u32) (arg3 * arg3) >= temp_v0)) { + set_object_flag_status_true(objectIndex, VISIBLE); if (temp_v0 >= (u32) (arg2 * arg2)) { - set_object_flag_unk_054_true(objectIndex, 0x00100000); + set_object_flag_status_true(objectIndex, 0x00100000); } } } @@ -1304,7 +1304,7 @@ UNUSED void func_8008A2CC(s32 objectIndex, s32 cameraId, u16 arg2) { u16 var_a2; camera = &camera1[cameraId]; - set_object_flag_unk_054_false(objectIndex, 0x00040000); + set_object_flag_status_false(objectIndex, VISIBLE); if (no_init < 0x2711U) { var_a2 = 0x5555; } else if (no_init < 0x9C41U) { @@ -1312,40 +1312,40 @@ UNUSED void func_8008A2CC(s32 objectIndex, s32 cameraId, u16 arg2) { } else { var_a2 = arg2; } - if (func_8008A140(objectIndex, camera, var_a2) != 0) { - set_object_flag_unk_054_true(objectIndex, 0x00040000); + if (is_object_visible_on_camera(objectIndex, camera, var_a2) != 0) { + set_object_flag_status_true(objectIndex, VISIBLE); } } s32 func_8008A364(s32 objectIndex, s32 cameraId, u16 arg2, s32 arg3) { Camera *camera; - u32 var_v1; + u32 dist; u16 var_a2; camera = &camera1[cameraId]; - set_object_flag_unk_054_false(objectIndex, 0x00060000); - var_v1 = get_horizontal_distance_to_camera(objectIndex, camera); - if (var_v1 < (arg3 * arg3)) { - set_object_flag_unk_054_true(objectIndex, 0x00020000); - if (var_v1 < 0x2711U) { + set_object_flag_status_false(objectIndex, 0x00020000 | VISIBLE); + dist = get_horizontal_distance_to_camera(objectIndex, camera); + if (dist < (arg3 * arg3)) { + set_object_flag_status_true(objectIndex, 0x00020000); + if (dist < 0x2711U) { var_a2 = 0x5555; - } else if (var_v1 < 0x9C41U) { + } else if (dist < 0x9C41U) { var_a2 = 0x4000; } else { var_a2 = arg2; } - if (func_8008A140(objectIndex, camera, var_a2) != 0) { - set_object_flag_unk_054_true(objectIndex, 0x00040000); + if (is_object_visible_on_camera(objectIndex, camera, var_a2) != 0) { + set_object_flag_status_true(objectIndex, VISIBLE); } } - return var_v1; + return dist; } void func_8008A454(s32 objectIndex, s32 cameraId, s32 arg2) { if (get_horizontal_distance_to_camera(objectIndex, &camera1[cameraId]) < (u32) (arg2 * arg2)) { - set_object_flag_unk_054_true(objectIndex, 0x00000020); + set_object_flag_status_true(objectIndex, 0x00000020); } else { - set_object_flag_unk_054_false(objectIndex, 0x00000020); + set_object_flag_status_false(objectIndex, 0x00000020); } } @@ -1353,16 +1353,16 @@ void func_8008A4CC(s32 objectIndex) { s32 loopIndex; Camera *camera; - set_object_flag_unk_054_false(objectIndex, 0x00070000); + set_object_flag_status_false(objectIndex, 0x00070000); for (loopIndex = 0, camera = camera1; loopIndex < gPlayerCountSelection1; loopIndex++, camera++) { if (gObjectList[objectIndex].state != 0) { if ((D_8018CF68[loopIndex] >= (gObjectList[objectIndex].unk_0DF - 1)) && ((gObjectList[objectIndex].unk_0DF + 1) >= D_8018CF68[loopIndex])) { - set_object_flag_unk_054_true(objectIndex, 0x00010000); + set_object_flag_status_true(objectIndex, 0x00010000); if (D_8018CF68[loopIndex] == gObjectList[objectIndex].unk_0DF) { - set_object_flag_unk_054_true(objectIndex, 0x00020000); + set_object_flag_status_true(objectIndex, 0x00020000); } - if (func_8008A140(objectIndex, camera, 0x2AABU) != 0) { - set_object_flag_unk_054_true(objectIndex, 0x00040000); + if (is_object_visible_on_camera(objectIndex, camera, 0x2AABU) != 0) { + set_object_flag_status_true(objectIndex, VISIBLE); } } } @@ -1373,10 +1373,10 @@ UNUSED void func_8008A610(s32 objectIndex) { s32 loopIndex; Camera *camera; - set_object_flag_unk_054_false(objectIndex, 0x00040000); + set_object_flag_status_false(objectIndex, VISIBLE); for (camera = camera1, loopIndex = 0; loopIndex < gPlayerCountSelection1; loopIndex++, camera++) { - if ((gObjectList[objectIndex].state != 0) && (func_8008A140(objectIndex, camera, 0x2AABU) != 0)) { - set_object_flag_unk_054_true(objectIndex, 0x00040000); + if ((gObjectList[objectIndex].state != 0) && (is_object_visible_on_camera(objectIndex, camera, 0x2AABU) != 0)) { + set_object_flag_status_true(objectIndex, VISIBLE); } } } @@ -1386,17 +1386,17 @@ void func_8008A6DC(s32 objectIndex, f32 arg1) { s32 loopIndex; Camera *camera; - set_object_flag_unk_054_false(objectIndex, 0x00060000); + set_object_flag_status_false(objectIndex, 0x00060000); for (camera = camera1, loopIndex = 0; loopIndex < gPlayerCountSelection1; loopIndex++, camera++) { if ((gObjectList[objectIndex].state != 0) && (is_within_horizontal_distance_to_camera(objectIndex, camera, arg1) != 0)) { - set_object_flag_unk_054_true(objectIndex, 0x00020000); + set_object_flag_status_true(objectIndex, 0x00020000); if (arg1 <= 500.0) { var_a2 = 0x4000; } else { var_a2 = 0x2AAB; } - if (func_8008A140(objectIndex, camera, var_a2) != 0) { - set_object_flag_unk_054_true(objectIndex, 0x00040000); + if (is_object_visible_on_camera(objectIndex, camera, var_a2) != 0) { + set_object_flag_status_true(objectIndex, VISIBLE); } } } @@ -1468,9 +1468,9 @@ void func_8008AA3C(s32 objectIndex) { but for some unholy reason that doesn't match */ temp_v0->unk_084[8] = *((s16*)temp_v0->controlPoints - 1); - temp_v0->unk_028[0] = temp_v0->controlPoints[0].pos[0]; - temp_v0->unk_028[1] = temp_v0->controlPoints[0].pos[1]; - temp_v0->unk_028[2] = temp_v0->controlPoints[0].pos[2]; + temp_v0->offset[0] = temp_v0->controlPoints[0].pos[0]; + temp_v0->offset[1] = temp_v0->controlPoints[0].pos[1]; + temp_v0->offset[2] = temp_v0->controlPoints[0].pos[2]; temp_v0->unk_09A = (s16) (10000 / temp_v0->controlPoints[0].velocity); func_8008A920(objectIndex); func_80086FD4(objectIndex); @@ -1481,9 +1481,9 @@ void func_8008AB10(s32 objectIndex) { Objects *temp_v0; temp_v0 = &gObjectList[objectIndex]; - temp_v0->unk_028[0] += temp_v0->velocity[0]; - temp_v0->unk_028[1] += temp_v0->velocity[1]; - temp_v0->unk_028[2] += temp_v0->velocity[2]; + temp_v0->offset[0] += temp_v0->velocity[0]; + temp_v0->offset[1] += temp_v0->velocity[1]; + temp_v0->offset[2] += temp_v0->velocity[2]; temp_v0->timer += (u16)temp_v0->unk_09A; if (temp_v0->timer >= 0x2710) { temp_v0->unk_084[9] = (u16)temp_v0->unk_084[9] + 1; @@ -1611,9 +1611,9 @@ void func_8008B038(s32 objectIndex) { Objects *temp_v0; temp_v0 = &gObjectList[objectIndex]; - temp_v0->unk_028[0] = (D_80183DA8[0] * D_80165760[0]) + (D_80183DA8[1] * D_80165760[1]) + (D_80183DA8[2] * D_80165760[2]) + (D_80183DA8[3] * D_80165760[3]); - temp_v0->unk_028[1] = (D_80183DA8[0] * D_80165770[0]) + (D_80183DA8[1] * D_80165770[1]) + (D_80183DA8[2] * D_80165770[2]) + (D_80183DA8[3] * D_80165770[3]); - temp_v0->unk_028[2] = (D_80183DA8[0] * D_80165780[0]) + (D_80183DA8[1] * D_80165780[1]) + (D_80183DA8[2] * D_80165780[2]) + (D_80183DA8[3] * D_80165780[3]); + temp_v0->offset[0] = (D_80183DA8[0] * D_80165760[0]) + (D_80183DA8[1] * D_80165760[1]) + (D_80183DA8[2] * D_80165760[2]) + (D_80183DA8[3] * D_80165760[3]); + temp_v0->offset[1] = (D_80183DA8[0] * D_80165770[0]) + (D_80183DA8[1] * D_80165770[1]) + (D_80183DA8[2] * D_80165770[2]) + (D_80183DA8[3] * D_80165770[3]); + temp_v0->offset[2] = (D_80183DA8[0] * D_80165780[0]) + (D_80183DA8[1] * D_80165780[1]) + (D_80183DA8[2] * D_80165780[2]) + (D_80183DA8[3] * D_80165780[3]); } void func_8008B17C(s32 objectIndex, f32 arg1) { @@ -1686,7 +1686,7 @@ void func_8008B3E4(s32 objectIndex) { Objects *temp_v0; SplineData *spline; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 8) != 0) { + if (is_obj_index_flag_status_inactive(objectIndex, 8) != 0) { temp_v0 = &gObjectList[objectIndex]; temp_v0->unk_084[9] = 0; temp_v0->timer = 0; @@ -1698,7 +1698,7 @@ void func_8008B3E4(s32 objectIndex) { */ temp_v0->unk_084[8] = *(((s16*)temp_v0->controlPoints) - 1); - set_object_flag_unk_054_true(objectIndex, 8); + set_object_flag_status_true(objectIndex, 8); } } @@ -1726,7 +1726,7 @@ void func_8008B478(s32 objectIndex, s32 arg1) { sp34 = ((f32)gObjectList[objectIndex].timer / 10000.0); // Calculate the curve at `t` func_8008B17C(objectIndex, sp34); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x800) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x800) != 0) { // Calculate the curve's derivative at `t` func_8008AFE0(objectIndex, sp34); } @@ -1765,7 +1765,7 @@ void func_8008B6A4(s32 objectIndex) { // Have to do it this way due to the u16 cast temp_v0->unk_084[9] = (u16) temp_v0->unk_084[9] + 1; if ((u16)temp_v0->unk_084[9] == (u16)temp_v0->unk_084[8]) { - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 8); } else { func_8008B44C(objectIndex); } @@ -1801,18 +1801,18 @@ void set_obj_origin_pos(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3) { gObjectList[objectIndex].origin_pos[2] = arg3; } -void func_8008B80C(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3) { - gObjectList[objectIndex].unk_028[0] = arg1; - gObjectList[objectIndex].unk_028[1] = arg2; - gObjectList[objectIndex].unk_028[2] = arg3; +void set_obj_origin_offset(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3) { + gObjectList[objectIndex].offset[0] = arg1; + gObjectList[objectIndex].offset[1] = arg2; + gObjectList[objectIndex].offset[2] = arg3; } void func_8008B844(s32 objectIndex) { f32 temp_f0 = gObjectList[objectIndex].origin_pos[0]; - gObjectList[objectIndex].pos[0] = gObjectList[objectIndex].unk_028[0] + temp_f0; - gObjectList[objectIndex].pos[1] = gObjectList[objectIndex].unk_028[1] + temp_f0; - gObjectList[objectIndex].pos[2] = gObjectList[objectIndex].unk_028[2] + temp_f0; + gObjectList[objectIndex].pos[0] = gObjectList[objectIndex].offset[0] + temp_f0; + gObjectList[objectIndex].pos[1] = gObjectList[objectIndex].offset[1] + temp_f0; + gObjectList[objectIndex].pos[2] = gObjectList[objectIndex].offset[2] + temp_f0; } void set_obj_direction_angle(s32 objectIndex, u16 arg1, u16 arg2, u16 arg3) { @@ -1849,63 +1849,63 @@ void func_8008B928(s32 objectIndex, s16 arg1, s16 arg2, s16 arg3, SplineData *sp temp_s0->direction_angle[0] = get_x_direction_angle(objectIndex); } -UNUSED void func_8008BA40(s32 objectIndex, s16 arg1, u16 arg2) { - s16 test; +UNUSED void object_origin_pos_randomize_around_x(s32 objectIndex, s16 x, u16 arg2) { + s16 offset_x; - test = random_int(arg2) - (arg2 / 2); - gObjectList[objectIndex].origin_pos[0] = arg1 + test; + offset_x = random_int(arg2) - (arg2 / 2); + gObjectList[objectIndex].origin_pos[0] = x + offset_x; } -void func_8008BAB4(s32 objectIndex, s16 arg1, u16 arg2) { - s16 test; +void object_origin_pos_randomize_around_y(s32 objectIndex, s16 y, u16 arg2) { + s16 offset_y; - test = random_int(arg2) - (arg2 / 2); - gObjectList[objectIndex].origin_pos[1] = arg1 + test; + offset_y = random_int(arg2) - (arg2 / 2); + gObjectList[objectIndex].origin_pos[1] = y + offset_y; } -UNUSED void func_8008BB28(s32 objectIndex, s16 arg1, u16 arg2) { - s16 test; +UNUSED void object_origin_pos_randomize_around_z(s32 objectIndex, s16 z, u16 arg2) { + s16 offset_z; - test = random_int(arg2) - (arg2 / 2); - gObjectList[objectIndex].origin_pos[2] = arg1 + test; + offset_z = random_int(arg2) - (arg2 / 2); + gObjectList[objectIndex].origin_pos[2] = z + offset_z; } -UNUSED void func_8008BB9C(s32 objectIndex, s16 arg1, s16 arg2, u16 arg3, u16 arg4) { - s16 sp1E; - s16 temp_v0; +UNUSED void object_origin_pos_randomize_around_xy(s32 objectIndex, s16 x, s16 y, u16 arg3, u16 arg4) { + s16 offset_x; + s16 offset_y; - sp1E = random_int(arg3) - ((s32) arg3 / 2); - temp_v0 = random_int(arg4) - ((s32) arg4 / 2); - gObjectList[objectIndex].origin_pos[0] = arg1 + sp1E; - gObjectList[objectIndex].origin_pos[1] = arg2 + temp_v0; + offset_x = random_int(arg3) - ((s32) arg3 / 2); + offset_y = random_int(arg4) - ((s32) arg4 / 2); + gObjectList[objectIndex].origin_pos[0] = x + offset_x; + gObjectList[objectIndex].origin_pos[1] = y + offset_y; } -UNUSED void func_8008BC58(s32 objectIndex, s16 arg1, s16 arg2, u16 arg3, u16 arg4) { - s16 sp1E; - s16 temp_v0; +UNUSED void object_origin_pos_randomize_around_xz(s32 objectIndex, s16 x, s16 z, u16 arg3, u16 arg4) { + s16 offset_x; + s16 offset_z; - sp1E = random_int(arg3) - ((s32) arg3 / 2); - temp_v0 = random_int(arg4) - ((s32) arg4 / 2); - gObjectList[objectIndex].origin_pos[0] = arg1 + sp1E; - gObjectList[objectIndex].origin_pos[2] = arg2 + temp_v0; + offset_x = random_int(arg3) - ((s32) arg3 / 2); + offset_z = random_int(arg4) - ((s32) arg4 / 2); + gObjectList[objectIndex].origin_pos[0] = x + offset_x; + gObjectList[objectIndex].origin_pos[2] = z + offset_z; } -void func_8008BD14(s32 objectIndex, s16 arg1, s16 arg2, s16 arg3, u16 arg4, u16 arg5, u16 arg6) { - s16 sp1E; - s16 sp1C; - s16 temp_v0; +void object_origin_pos_randomize_around_xyz(s32 objectIndex, s16 x, s16 y, s16 z, u16 arg4, u16 arg5, u16 arg6) { + s16 offset_x; + s16 offset_y; + s16 offset_z; - sp1E = random_int(arg4) - ((s32) arg4 / 2); - sp1C = random_int(arg5) - ((s32) arg5 / 2); - temp_v0 = random_int(arg6) - ((s32) arg6 / 2); - gObjectList[objectIndex].origin_pos[0] = arg1 + sp1E; - gObjectList[objectIndex].origin_pos[1] = arg2 + sp1C; - gObjectList[objectIndex].origin_pos[2] = arg3 + temp_v0; + offset_x = random_int(arg4) - ((s32) arg4 / 2); + offset_y = random_int(arg5) - ((s32) arg5 / 2); + offset_z = random_int(arg6) - ((s32) arg6 / 2); + gObjectList[objectIndex].origin_pos[0] = x + offset_x; + gObjectList[objectIndex].origin_pos[1] = y + offset_y; + gObjectList[objectIndex].origin_pos[2] = z + offset_z; } -void func_8008BE0C(s32 objectIndex, s16 arg1, u16 arg2) { - gObjectList[objectIndex].origin_pos[0] = gPlayerOneCopy->pos[0] + (sins(arg2) * arg1); - gObjectList[objectIndex].origin_pos[2] = gPlayerOneCopy->pos[2] + (coss(arg2) * arg1); +void object_origin_pos_around_player_one(s32 objectIndex, s16 dist, u16 angle) { + gObjectList[objectIndex].origin_pos[0] = gPlayerOneCopy->pos[0] + (sins(angle) * dist); + gObjectList[objectIndex].origin_pos[2] = gPlayerOneCopy->pos[2] + (coss(angle) * dist); } UNUSED void func_8008BEA4(s32 objectIndex, u16 arg1, u16 arg2) { @@ -1914,13 +1914,13 @@ UNUSED void func_8008BEA4(s32 objectIndex, u16 arg1, u16 arg2) { thing = random_int(arg1); thing2 = camera1->rot[1] + random_int(arg2) - ((s32) arg2 / 2); - func_8008BE0C(objectIndex, thing, thing2); + object_origin_pos_around_player_one(objectIndex, thing, thing2); } -void func_8008BF18(s32 objectIndex) { - gObjectList[objectIndex].pos[0] = gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].unk_028[0]; - gObjectList[objectIndex].pos[1] = gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].unk_028[1]; - gObjectList[objectIndex].pos[2] = gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].unk_028[2]; +void object_calculate_new_pos_offset(s32 objectIndex) { + gObjectList[objectIndex].pos[0] = gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].offset[0]; + gObjectList[objectIndex].pos[1] = gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].offset[1]; + gObjectList[objectIndex].pos[2] = gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].offset[2]; } void func_8008BF64(s32 objectIndex) { diff --git a/src/code_80086E70.h b/src/code_80086E70.h index 6e309c1b0..a68e01797 100644 --- a/src/code_80086E70.h +++ b/src/code_80086E70.h @@ -17,7 +17,7 @@ s32 func_80087060(s32, s32); s32 func_80087104(s32, u16); s32 func_800871AC(s32, s32); void func_80087258(s32, s32, f32); -s32 func_80087294(s32, Player*); +s32 get_angle_between_player_object(s32, Player*); s32 angle_between_object_camera(s32, Camera*); u16 get_x_direction_angle(s32); s32 get_y_direction_angle(s32); @@ -30,11 +30,11 @@ void func_8008751C(s32); void func_8008757C(s32); void func_80087620(s32); void func_800876A0(s32); -void func_80087710(s32); -void func_8008775C(s32); -void func_80087798(s32); -void func_800877C4(s32); -void func_800877F0(s32); +void object_add_velocity_offset_xyz(s32); +void object_add_velocity_offset_xz(s32); +void object_add_velocity_offset_x(s32); +void object_add_velocity_offset_y(s32); +void object_add_velocity_offset_z(s32); void func_8008781C(s32); void func_80087844(s32); f32 func_8008786C(f32, f32, f32, f32, f32); @@ -93,7 +93,7 @@ s32 func_80089E18(s32); s32 func_80089F24(s32); s32 func_8008A060(s32, Camera*, u16); s32 func_8008A0B4(s32, Player*, Camera*, u16); -s32 func_8008A140(s32, Camera*, u16); +s32 is_object_visible_on_camera(s32, Camera*, u16); void func_8008A1D0(s32, s32, s32, s32); void func_8008A2CC(s32, s32, u16); s32 func_8008A364(s32, s32, u16, s32); @@ -145,22 +145,22 @@ void func_8008B6A4(s32); void func_8008B724(s32); void func_8008B78C(s32); void set_obj_origin_pos(s32, f32, f32, f32); -void func_8008B80C(s32, f32, f32, f32); +void set_obj_origin_offset(s32, f32, f32, f32); void func_8008B844(s32); void set_obj_direction_angle(s32, u16, u16, u16); void set_obj_orientation(s32, u16, u16, u16); void set_obj_velocity(s32, f32, f32, f32); void func_8008B928(s32, s16, s16, s16, SplineData*); -void func_8008BA40(s32, s16, u16); -void func_8008BAB4(s32, s16, u16); -void func_8008BB28(s32, s16, u16); -void func_8008BB9C(s32, s16, s16, u16, u16); -void func_8008BC58(s32, s16, s16, u16, u16); -void func_8008BD14(s32, s16, s16, s16, u16, u16, u16); -void func_8008BE0C(s32, s16, u16); +void object_origin_pos_randomize_around_x(s32, s16, u16); +void object_origin_pos_randomize_around_y(s32, s16, u16); +void object_origin_pos_randomize_around_z(s32, s16, u16); +void object_origin_pos_randomize_around_xy(s32, s16, s16, u16, u16); +void object_origin_pos_randomize_around_xz(s32, s16, s16, u16, u16); +void object_origin_pos_randomize_around_xyz(s32, s16, s16, s16, u16, u16, u16); +void object_origin_pos_around_player_one(s32, s16, u16); void func_8008BEA4(s32, u16, u16); void func_8008BFC0(s32); -void func_8008BF18(s32); +void object_calculate_new_pos_offset(s32); void func_8008BF64(s32); void func_8008BFFC(s32); void func_8008C1B8(s32); diff --git a/src/code_80091750.c b/src/code_80091750.c index c95d14b3a..b03d86051 100644 --- a/src/code_80091750.c +++ b/src/code_80091750.c @@ -18,7 +18,7 @@ #include "code_80281780.h" #include "memory.h" #include "audio/external.h" -#include "hud_renderer.h" +#include "render_objects.h" #include "staff_ghosts.h" #include "common_textures.h" #include "textures.h" @@ -600,7 +600,7 @@ char *D_800E7744[] = { " ", }; -char *D_800E775C[] = { +char *gTextPauseButton[] = { "CONTINUE GAME", "RETRY", "COURSE CHANGE", @@ -1666,7 +1666,8 @@ void func_800921B4(void) { D_8018D9D9 = 0; } -void func_800921C0(s32 test, s32 target, s32 alternative_color) { +// if selected and detect kind menu +void text_rainbow_effect(s32 test, s32 target, s32 alternative_color) { if (test == target) { if (func_800B4520() != 0) { set_text_color(gGlobalTimer % 3); @@ -1678,7 +1679,7 @@ void func_800921C0(s32 test, s32 target, s32 alternative_color) { } } -void func_80092224(s32 test, s32 target, s32 alternative_color) { +void set_text_color_rainbow_if_selected(s32 test, s32 target, s32 alternative_color) { if (test == target) { set_text_color(TEXT_BLUE_GREEN_RED_CYCLE_2); } else { @@ -1800,8 +1801,8 @@ void func_800925A0(void) { void func_800925CC(void) { struct_8018D9E0_entry *temp = find_8018D9E0_entry_dupe(0xAF); - if (temp->unk4 == 2) { - temp->unk4 = 3; + if (temp->cursor == 2) { + temp->cursor = 3; } } @@ -2177,7 +2178,7 @@ UNUSED void func_800930E4(s32 arg0, s32 arg1, char *arg2) { } // "tracking" is a uniform spacing between all characters in a given word -void print_text0(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale, s32 arg6) { +void print_text0(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY, s32 mode) { s32 stringWidth = 0; s32 glyphIndex; @@ -2187,7 +2188,7 @@ void print_text0(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 glyphIndex = char_to_glyph_index(text); if (glyphIndex >= 0) { func_80099184((MkTexture *)segmented_to_virtual_dupe((const void *) gGlyphTextureLUT[glyphIndex])); - gDisplayListHead = func_8009BEF0(gDisplayListHead, (MkTexture *) segmented_to_virtual_dupe((const void *) gGlyphTextureLUT[glyphIndex]), column + (stringWidth * x_scale), row, arg6, x_scale, y_scale); + gDisplayListHead = print_letter(gDisplayListHead, (MkTexture *) segmented_to_virtual_dupe((const void *) gGlyphTextureLUT[glyphIndex]), column + (stringWidth * scaleX), row, mode, scaleX , scaleY); stringWidth += gGlyphDisplayWidth[glyphIndex] + tracking; } else if ((glyphIndex != -2) && (glyphIndex == -1)) { @@ -2207,16 +2208,16 @@ void print_text0(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 gSPDisplayList(gDisplayListHead++, D_020077D8); } -void func_80093324(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) { - print_text0(column, row, text, tracking, x_scale, y_scale, 1); +void func_80093324(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) { + print_text0(column, row, text, tracking, scaleX , scaleY, 1); } -void func_80093358(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) { - print_text0(column, row, text, tracking, x_scale, y_scale, 2); +void func_80093358(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) { + print_text0(column, row, text, tracking, scaleX , scaleY, 2); } // "tracking" is a uniform spacing between all characters in a given word -void print_text1(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale, s32 arg6) { +void print_text1(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY, s32 arg6) { char *temp_string = text; s32 stringWidth = 0; s32 glyphIndex; @@ -2225,10 +2226,10 @@ void print_text1(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 while(*temp_string != 0) { glyphIndex = char_to_glyph_index(temp_string); if (glyphIndex >= 0) { - stringWidth += ((gGlyphDisplayWidth[glyphIndex] + tracking) * x_scale); + stringWidth += ((gGlyphDisplayWidth[glyphIndex] + tracking) * scaleX); } else if ((glyphIndex != -2) && (glyphIndex == -1)) { - stringWidth += ((tracking + 7) * x_scale); + stringWidth += ((tracking + 7) * scaleX); } else{ return; @@ -2268,11 +2269,11 @@ void print_text1(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 glyphIndex = char_to_glyph_index(text); if (glyphIndex >= 0) { func_80099184(segmented_to_virtual_dupe(gGlyphTextureLUT[glyphIndex])); - gDisplayListHead = func_8009BEF0(gDisplayListHead, segmented_to_virtual_dupe(gGlyphTextureLUT[glyphIndex]), column, row, sp60, x_scale, y_scale); - column = column + (s32)((gGlyphDisplayWidth[glyphIndex] + tracking) * x_scale); + gDisplayListHead = print_letter(gDisplayListHead, segmented_to_virtual_dupe(gGlyphTextureLUT[glyphIndex]), column, row, sp60, scaleX, scaleY); + column = column + (s32)((gGlyphDisplayWidth[glyphIndex] + tracking) * scaleX); } else if ((glyphIndex != -2) && (glyphIndex == -1)) { - column = column + (s32)((tracking + 7) * x_scale); + column = column + (s32)((tracking + 7) * scaleX); } else{ gSPDisplayList(gDisplayListHead++, D_020077D8); @@ -2287,23 +2288,23 @@ void print_text1(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 gSPDisplayList(gDisplayListHead++, D_020077D8); } -void func_800936B8(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) { - print_text1(column, row, text, tracking, x_scale, y_scale, 1); +void func_800936B8(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) { + print_text1(column, row, text, tracking, scaleX, scaleY, 1); } -void draw_text(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) { - print_text1(column, row, text, tracking, x_scale, y_scale, 2); +void draw_text(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) { + print_text1(column, row, text, tracking, scaleX, scaleY, 2); } -void func_80093720(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) { - print_text1(column, row, text, tracking, x_scale, y_scale, 3); +void func_80093720(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) { + print_text1(column, row, text, tracking, scaleX, scaleY, 3); } -void func_80093754(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) { - print_text1(column, row, text, tracking, x_scale, y_scale, 4); +void func_80093754(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) { + print_text1(column, row, text, tracking, scaleX, scaleY, 4); } -void print_text2(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale, s32 arg6) { +void print_text2(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY, s32 arg6) { MkTexture *glyphTexture; s32 characterWidth; s32 glyphIndex; @@ -2315,16 +2316,16 @@ void print_text2(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 if (glyphIndex >= 0) { glyphTexture = (MkTexture *) segmented_to_virtual_dupe((const void *)gGlyphTextureLUT[glyphIndex]); func_80099184(glyphTexture); - gDisplayListHead = func_8009BEF0(gDisplayListHead, glyphTexture, column - (gGlyphDisplayWidth[glyphIndex] / 2), row, arg6, x_scale, y_scale); + gDisplayListHead = print_letter(gDisplayListHead, glyphTexture, column - (gGlyphDisplayWidth[glyphIndex] / 2), row, arg6, scaleX, scaleY); if ((glyphIndex >= 0xD5) && (glyphIndex < 0xE0)) { characterWidth = 0x20; } else { characterWidth = 0xC; } - column = column + (s32)((characterWidth + tracking) * x_scale); + column = column + (s32)((characterWidth + tracking) * scaleX); } else if ((glyphIndex != -2) && (glyphIndex == -1)) { - column = column + (s32)((tracking + 7) * x_scale); + column = column + (s32)((tracking + 7) * scaleX); } else{ gSPDisplayList(gDisplayListHead++, D_020077D8); @@ -2341,12 +2342,12 @@ void print_text2(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 gSPDisplayList(gDisplayListHead++, D_020077D8); } -void func_800939C8(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) { - print_text2(column, row, text, tracking, x_scale, y_scale, 1); +void func_800939C8(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) { + print_text2(column, row, text, tracking, scaleX, scaleY, 1); } -void text_draw(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32 y_scale) { - print_text2(column, row, text, tracking, x_scale, y_scale, 2); +void text_draw(s32 column, s32 row, char *text, s32 tracking, f32 scaleX, f32 scaleY) { + print_text2(column, row, text, tracking, scaleX, scaleY, 2); } void func_80093A30(s32 arg0) { @@ -2358,23 +2359,23 @@ void func_80093A5C(u32 arg0) { func_8009C918(); } switch (arg0) { - case 0: + case RENDER_SCREEN_MODE_1P_PLAYER_ONE: func_800940EC((s32) D_800F0B1C[arg0]); break; - case 1: - case 2: - case 3: - case 4: + case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE: + case RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO: + case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE: + case RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO: if (D_8015F788 == 0) { func_80093C1C((s32) D_800F0B1C[arg0]); } else { func_800940EC((s32) D_800F0B1C[arg0]); } break; - case 8: - case 9: - case 10: - case 11: + case RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE: + case RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO: + case RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE: + case RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR: if (D_8015F788 == 3) { func_800940EC((s32) D_800F0B1C[arg0]); } else { @@ -5456,7 +5457,7 @@ void func_8009B538(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { u16 *func_8009B8C4(u64 *arg0) { UNUSED s32 pad[2]; - s32 sp4; + s32 offset; s32 found; s32 someIndex; @@ -5464,13 +5465,13 @@ u16 *func_8009B8C4(u64 *arg0) { for (someIndex = 0; someIndex < gNumD_8018E118Entries; someIndex++) { if (arg0 == D_8018E118[someIndex].textureData) { found = 1; - sp4 = D_8018E118[someIndex].offset; + offset = D_8018E118[someIndex].offset; break; } } if (found != 0) { - return &D_8018D9B0[sp4]; + return &D_8018D9B0[offset]; } return NULL; } @@ -5596,14 +5597,14 @@ Gfx *func_8009BC9C(Gfx *arg0, MkTexture *arg1, s32 arg2, s32 arg3, s32 arg4, s32 return arg0; } -Gfx *func_8009BEF0(Gfx *arg0, MkTexture *arg1, f32 arg2, f32 arg3, s32 arg4, f32 arg5, f32 arg6) { +Gfx *print_letter(Gfx *arg0, MkTexture *glyphTexture, f32 arg2, f32 arg3, s32 mode, f32 scaleX, f32 scaleY) { s32 var_v0; s32 temp_v0_2; f32 thing0; f32 thing1; MkTexture *var_s0; - var_s0 = segmented_to_virtual_dupe(arg1); + var_s0 = segmented_to_virtual_dupe(glyphTexture); while (var_s0->textureData != NULL) { var_v0 = 0; @@ -5611,7 +5612,7 @@ Gfx *func_8009BEF0(Gfx *arg0, MkTexture *arg1, f32 arg2, f32 arg3, s32 arg4, f32 if (thing0 > 320.0f) { var_v0 = 1; } - thing0 += var_s0->width * arg5; + thing0 += var_s0->width * scaleX; if (thing0 < 0.0f) { var_v0 += 1; } @@ -5619,7 +5620,7 @@ Gfx *func_8009BEF0(Gfx *arg0, MkTexture *arg1, f32 arg2, f32 arg3, s32 arg4, f32 if (thing1 < 0.0f) { var_v0 += 1; } - thing1 -= var_s0->height * arg6; + thing1 -= var_s0->height * scaleY; if (thing1 > 240.0f) { var_v0 += 1; } @@ -5629,14 +5630,14 @@ Gfx *func_8009BEF0(Gfx *arg0, MkTexture *arg1, f32 arg2, f32 arg3, s32 arg4, f32 } else { temp_v0_2 = func_8009B8C4(var_s0->textureData); if (temp_v0_2 != 0) { - switch (arg4) { /* irregular */ + switch (mode) { /* irregular */ case 1: gSPDisplayList(arg0++, D_020077F8); - arg0 = func_80095BD0(arg0, (u8 *) temp_v0_2, var_s0->dX + arg2, var_s0->dY + arg3, var_s0->width, var_s0->height, arg5, arg6); + arg0 = func_80095BD0(arg0, (u8 *) temp_v0_2, var_s0->dX + arg2, var_s0->dY + arg3, var_s0->width, var_s0->height, scaleX, scaleY); break; case 2: gSPDisplayList(arg0++, D_02007818); - arg0 = func_80095BD0(arg0, (u8 *) temp_v0_2, var_s0->dX + arg2, var_s0->dY + arg3, var_s0->width, var_s0->height, arg5, arg6); + arg0 = func_80095BD0(arg0, (u8 *) temp_v0_2, var_s0->dX + arg2, var_s0->dY + arg3, var_s0->width, var_s0->height, scaleX, scaleY); break; } } @@ -5939,7 +5940,7 @@ func_8009CE64_label1: var_a1 = 0; temp_v0 = find_8018D9E0_entry(0x000000B0); if (temp_v0 != NULL) { - switch (temp_v0->unk4) { /* switch 8; irregular */ + switch (temp_v0->cursor) { /* switch 8; irregular */ case 10: /* switch 8 */ func_802903B0(); break; @@ -5958,7 +5959,7 @@ func_8009CE64_label1: var_a1 = 0; temp_v0 = find_8018D9E0_entry(0x000000AC); if (temp_v0 != NULL) { - switch (temp_v0->unk4) { /* switch 7; irregular */ + switch (temp_v0->cursor) { /* switch 7; irregular */ case 11: /* switch 7 */ func_802903B0(); D_8016556E = 1; @@ -5972,7 +5973,7 @@ func_8009CE64_label1: var_a1 = 0; temp_v0 = find_8018D9E0_entry(0x000000C7); if (temp_v0 != NULL) { - switch (temp_v0->unk4) { /* switch 1 */ + switch (temp_v0->cursor) { /* switch 1 */ case 12: /* switch 1 */ func_802903B0(); var_a1 = 1; @@ -6006,7 +6007,7 @@ func_8009CE64_label1: } temp_v0 = find_8018D9E0_entry(0x000000BD); if (temp_v0 != NULL) { - switch (temp_v0->unk4) { /* switch 2 */ + switch (temp_v0->cursor) { /* switch 2 */ case 11: /* switch 2 */ D_8015F892 = 1; D_8015F890 = 0; @@ -6620,7 +6621,7 @@ void add_8018D9E0_entry(s32 type, s32 column, s32 row, s8 priority) { var_ra++; } var_ra->type = type; - var_ra->unk4 = 0; + var_ra->cursor = 0; var_ra->unk8 = 0; var_ra->column = column; var_ra->row = row; @@ -6923,7 +6924,7 @@ void add_8018D9E0_entry(s32 type, s32 column, s32 row, s8 priority) { } break; case 0xF0: - var_ra->unk4 = (s32) gSoundMode; + var_ra->cursor = (s32) gSoundMode; break; case 0xF1: func_800996BC(segmented_to_virtual_dupe(D_02004638), 0); @@ -7400,7 +7401,7 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { case 0xB2: /* switch 6 */ case 0xB3: /* switch 6 */ case 0xB4: /* switch 6 */ - if (arg0->unk4 != 0) { + if (arg0->cursor != 0) { spA8 = arg0->type - 0xB1; gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E7D54[D_800EFD64[gCharacterSelections[spA8]]]), arg0->column, arg0->row); func_8009A7EC(arg0->D_8018DEE0_index, arg0->column, arg0->row, spA8, arg0->unk1C); @@ -7417,7 +7418,7 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { func_800A4A24(arg0); break; case 0xC7: /* switch 6 */ - func_800A4B38(arg0); + render_pause_menu(arg0); break; case 0xBD: /* switch 6 */ func_800A5738(arg0); @@ -7462,7 +7463,7 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { func_800A761C(arg0); break; case 0x130: /* switch 6 */ - if (arg0->unk4 != 0) { + if (arg0->cursor != 0) { gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E7D54[D_800EFD64[D_802874D8.unk1E]]), arg0->column, arg0->row); func_8009A7EC(arg0->D_8018DEE0_index, arg0->column, arg0->row, 0, arg0->unk1C); } @@ -7685,7 +7686,7 @@ void func_800A0EB8(struct_8018D9E0_entry *arg0, s32 arg1) { } void func_800A0FA4(struct_8018D9E0_entry *arg0, s32 arg1) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: case 2: case 3: @@ -7704,13 +7705,13 @@ void func_800A10CC(struct_8018D9E0_entry *arg0) { s32 var_s1; s32 index; - switch (arg0->unk4) { + switch (arg0->cursor) { case 2: case 3: case 4: case 5: gDisplayListHead = draw_box_fill(gDisplayListHead, 0x0000001E, 0x00000032, 0x00000122, 0x0000006E, 0, 0, 0, 0x000000FF); - index = arg0->unk4 - 2; + index = arg0->cursor - 2; set_text_color(3); for (var_s1 = 0; var_s1 < 4; var_s1++) { // In a perfect world this would be `D_800E7940[index][var_s1]` @@ -7732,7 +7733,7 @@ void func_800A11D0(struct_8018D9E0_entry *arg0, s32 arg1, s32 arg2) { } void func_800A12BC(struct_8018D9E0_entry *arg0, MkTexture *arg1) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: case 2: case 4: @@ -7748,7 +7749,7 @@ void func_800A12BC(struct_8018D9E0_entry *arg0, MkTexture *arg1) { void func_800A1350(struct_8018D9E0_entry *arg0) { s32 thing; if (func_800AAFCC(arg0->type - 0x2B) < 0) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: case 2: case 4: @@ -7764,7 +7765,7 @@ void func_800A1350(struct_8018D9E0_entry *arg0) { } void func_800A143C(struct_8018D9E0_entry *arg0, s32 arg1) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: case 2: case 3: @@ -7784,7 +7785,7 @@ void func_800A1500(struct_8018D9E0_entry *arg0) { var_a1 = 0; temp_v0 = find_8018D9E0_entry_dupe(0x00000064); - switch (temp_v0->unk4) { /* irregular */ + switch (temp_v0->cursor) { /* irregular */ case 0: case 1: break; @@ -8001,7 +8002,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) { case 0x17: /* switch 1 */ case 0x18: /* switch 1 */ for (var_s2 = 0; var_s2 < 4; var_s2++) { - func_80092224(D_8018EDEC - 0x15, var_s2, 3); + set_text_color_rainbow_if_selected(D_8018EDEC - 0x15, var_s2, TEXT_YELLOW); func_80093324(0x00000032, 0x55 + (0x23 * var_s2), D_800E7868[var_s2], 0, 0.9f, 1.0f); if (var_s2 == (D_8018EDEC - 0x15)) { spE0.column = 0x0032; @@ -8018,7 +8019,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) { func_80093324(0x00000028, 0x55 + (0x14 * var_s2), D_800E7878[var_s2], 0, 1.0f, 1.0f); } for (var_s2 = 0; var_s2 < 2; var_s2++) { - func_80092224(D_8018EDEC - 0x1E, var_s2, 1); + set_text_color_rainbow_if_selected(D_8018EDEC - 0x1E, var_s2, TEXT_GREEN); func_80093324(0x00000084, 0x96 + (0x19 * var_s2), D_800E7840[var_s2], 0, 1.0f, 1.0f); if (var_s2 == (D_8018EDEC - 0x1E)) { spE0.column = 0x0084; @@ -8093,7 +8094,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) { draw_text(0x5C + (0x82 * var_s1), 0x0000007D, D_800E7918[var_s1], 0, 0.75f, 0.75f); for (var_s2 = 0; var_s2 < 2; var_s2++) { if (var_s1 != var_s4) { - func_800921C0(D_8018EDEC - var_s5, var_s2, 1); + text_rainbow_effect(D_8018EDEC - var_s5, var_s2, TEXT_GREEN); if (var_s2 == (D_8018EDEC - var_s5)) { spE0.column = 0x20 + (0x89 * var_s1); spE0.row = 0x96 + (0x1E * var_s2); @@ -8158,7 +8159,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) { spE0.column = 0x6E + (0x32 * var_s2); spE0.row = 0x00D2; } - func_800921C0((D_8018EDEC - 0x38), var_s2, 3); + text_rainbow_effect((D_8018EDEC - 0x38), var_s2, TEXT_YELLOW); func_80093324(0x6E + (0x32 * var_s2), 0x000000D2, D_800E7930[var_s2], 0, 0.75f, 0.75f); } break; @@ -8335,8 +8336,8 @@ void func_800A34A8(struct_8018D9E0_entry *arg0) { s32 rank; s32 test; - if (arg0->unk4 != 0) { - if (arg0->unk4 < 9) { + if (arg0->cursor != 0) { + if (arg0->cursor < 9) { for (rank = 0; rank < 8; rank++) { sp80[rank] = gPlayers[gGPCurrentRacePlayerIdByRank[rank]].characterId; } @@ -8351,7 +8352,7 @@ void func_800A34A8(struct_8018D9E0_entry *arg0) { convert_number_to_ascii(gCupCourseSelection + 1, sp78); func_80093324(arg0->column + 0x61, (0x28 & 0xFFFFFFFF) - arg0->row, &sp78[1], 0, 0.7f, 0.7f); for (rank = 0; rank < 4; rank++) { - test = arg0->unk4; + test = arg0->cursor; if ((test != 8) && (test != 9)) { var_v0 = 0; } else { @@ -8362,7 +8363,7 @@ void func_800A34A8(struct_8018D9E0_entry *arg0) { } } if (var_v0 == 0) { - if (arg0->unk4 < 9) { + if (arg0->cursor < 9) { var_v0 = gGPCurrentRacePlayerIdByRank[rank]; var_v1 = 0; } else { @@ -8379,7 +8380,7 @@ void func_800A34A8(struct_8018D9E0_entry *arg0) { } } for (rank = 4; rank < NUM_PLAYERS; rank++) { - test = arg0->unk4; + test = arg0->cursor; if ((test != 8) && (test != 9)) { var_v0 = 0; } else { @@ -8390,7 +8391,7 @@ void func_800A34A8(struct_8018D9E0_entry *arg0) { } } if (var_v0 == 0) { - if (arg0->unk4 < 9) { + if (arg0->cursor < 9) { var_v0 = gGPCurrentRacePlayerIdByRank[rank]; } else { var_v0 = D_80164478[sp80[rank]]; @@ -8449,7 +8450,7 @@ void func_800A3ADC(struct_8018D9E0_entry *arg0, s32 arg1, s32 arg2, s32 characte char sp34[4]; s32 phi_v1; - if (arg0->unk4 < 9) { + if (arg0->cursor < 9) { convert_number_to_ascii(arg4 + 1, sp34); } else { for (phi_v1 = arg4; phi_v1 > 0; phi_v1--) { @@ -8464,7 +8465,7 @@ void func_800A3ADC(struct_8018D9E0_entry *arg0, s32 arg1, s32 arg2, s32 characte func_80093324(arg1 + 0xA, arg2, D_800E76A8[characterId], 0, 0.7f, 0.7f); convert_number_to_ascii(gGPPointsByCharacterId[characterId], sp34); func_800939C8(arg1 + 0x47, arg2, sp34, 0, 0.7f, 0.7f); - if ((arg4 < 4) && (arg0->unk4 < 9)) { + if ((arg4 < 4) && (arg0->cursor < 9)) { convert_number_to_ascii(D_8018D9BC[arg4], sp34); sp34[0] = '+'; func_80093324(arg1 + 0x5A, arg2, sp34, 0, 0.7f, 0.7f); @@ -8506,7 +8507,7 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) { Unk_D_800E70A0 *var_v0_5; char sp60[3]; - var_v0 = arg0->unk4; + var_v0 = arg0->cursor; if (var_v0 == 0) return; if (var_v0 == 0x0000001F) return; @@ -8517,7 +8518,7 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) { for (var_s1 = 0; var_s1 < 4; var_s1++) { func_800A4550(var_s1, arg0->column + 0x26, ((0xF * var_s1) - arg0->row) + 0x37); } - switch (arg0->unk4) { /* switch 1 */ + switch (arg0->cursor) { /* switch 1 */ case 1: /* switch 1 */ case 5: /* switch 1 */ case 6: /* switch 1 */ @@ -8528,7 +8529,7 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) { case 30: /* switch 1 */ for (var_s1 = 0; var_s1 < 6; var_s1++) { var_v1 = 0; - func_800921C0(arg0->unk4 - 5, var_s1, 1); + text_rainbow_effect(arg0->cursor - 5, var_s1, 1); switch (var_s1) { /* switch 3; irregular */ case 4: /* switch 3 */ if (D_80162DF8 == 1) { @@ -8544,9 +8545,9 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) { if (var_v1 != 0) { set_text_color(0); gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, 0x96); - func_80093358(0xB2 - arg0->column, arg0->row + (0xD * var_s1) + 0x93, D_800E775C[var_s1 + 1], 0, 0.75f, 0.75f); + func_80093358(0xB2 - arg0->column, arg0->row + (0xD * var_s1) + 0x93, gTextPauseButton[var_s1 + 1], 0, 0.75f, 0.75f); } else { - func_80093324(0xB2 - arg0->column, arg0->row + (0xD * var_s1) + 0x93, D_800E775C[var_s1 + 1], 0, 0.75f, 0.75f); + func_80093324(0xB2 - arg0->column, arg0->row + (0xD * var_s1) + 0x93, gTextPauseButton[var_s1 + 1], 0, 0.75f, 0.75f); } } break; @@ -8557,7 +8558,7 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) { case 15: /* switch 1 */ case 16: /* switch 1 */ set_text_color(3); - var_v1 = arg0->unk4 - 11; + var_v1 = arg0->cursor - 11; for (var_s1 = 0; var_s1 < 7; var_s1++) { func_80093324(0x000000A2, 0x8C + (0xD * var_s1), D_800E798C[(var_v1 * 7) + var_s1], 0, 0.6f, 0.6f); } @@ -8569,7 +8570,7 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) { func_80093324(0x000000A5, arg0->row + (0xD * var_s1) + 0x8C, D_800E7A3C[var_s1], 0, 0.7f, 0.7f); } for (var_s1 = 0; var_s1 < 2; var_s1++) { - func_800921C0(arg0->unk4 - 0x11, var_s1, 1); + text_rainbow_effect(arg0->cursor - 0x11, var_s1, 1); convert_number_to_ascii(var_s1 + 1, sp60); func_80093324(0xB1 - arg0->column, 0xAA + (0x1E * var_s1), &sp60[1], 0, 0.6f, 0.6f); if (D_8018EE10[var_s1].ghostDataSaved == 0) { @@ -8593,7 +8594,7 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) { func_80093324(0x000000A3, arg0->row + (0xD * var_s1) + 0x8C, D_800E7A60[var_s1], 0, 0.67f, 0.67f); } for (var_s1 = 0; var_s1 < 2; var_s1++) { - func_800921C0(arg0->unk4 - 0x14, var_s1, 1); + text_rainbow_effect(arg0->cursor - 0x14, var_s1, 1); func_80093324(0xC8 - arg0->column, 0xB9 + (0xF * var_s1), D_800E7A6C[var_s1], 0, 0.75f, 0.75f); } break; @@ -8610,22 +8611,22 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) { } break; } - switch (arg0->unk4) { /* switch 2 */ + switch (arg0->cursor) { /* switch 2 */ case 5: /* switch 2 */ case 6: /* switch 2 */ case 7: /* switch 2 */ case 8: /* switch 2 */ case 9: /* switch 2 */ case 10: /* switch 2 */ - var_v0_5 = &D_800E7390[arg0->unk4 - 5]; + var_v0_5 = &D_800E7390[arg0->cursor - 5]; break; case 17: /* switch 2 */ case 18: /* switch 2 */ - var_v0_5 = &D_800E73C0[arg0->unk4 - 17]; + var_v0_5 = &D_800E73C0[arg0->cursor - 17]; break; case 20: /* switch 2 */ case 21: /* switch 2 */ - var_v0_5 = &D_800E73D0[arg0->unk4 - 20]; + var_v0_5 = &D_800E73D0[arg0->cursor - 20]; break; case 30: /* switch 2 */ var_v0_5 = &D_800E7390[arg0->unk1C - 5]; @@ -8768,26 +8769,26 @@ void func_800A4A24(struct_8018D9E0_entry *arg0) { draw_text(arg0->column - 3, arg0->row, D_800E7780, 0, 0.85f, 0.85f); } -void func_800A4B38(struct_8018D9E0_entry *arg0) { +void render_pause_menu(struct_8018D9E0_entry *arg0) { if (gIsGamePaused != 0) { switch (gModeSelection) { case TIME_TRIALS: - func_800A4BC8(arg0); + render_pause_menu_time_trials(arg0); break; case VERSUS: - func_800A4EF8(arg0); + render_pause_menu_versus(arg0); break; case GRAND_PRIX: - func_800A5084(arg0); + render_pause_grand_prix(arg0); break; case BATTLE: - func_800A5360(arg0); + render_pause_battle(arg0); break; } } } -void func_800A4BC8(struct_8018D9E0_entry *arg0) { +void render_pause_menu_time_trials(struct_8018D9E0_entry *arg0) { s32 stackPadding0; s32 stackPadding1; s32 stackPadding2; @@ -8823,12 +8824,12 @@ void func_800A4BC8(struct_8018D9E0_entry *arg0) { get_time_record_centiseconds(temp_a0, sp68); func_800939C8(0x000000B3, 0x00000089, sp68, 0, 0.8f, 0.8f); for (var_s0 = 0; var_s0 < 5; var_s0++) { - func_800921C0(arg0->unk4 - 11, var_s0, 1); - func_80093324(D_800E8538[zero].column, D_800E8538[zero].row + (13 * var_s0), D_800E775C[var_s0], 0, 0.75f, 0.75f); + text_rainbow_effect(arg0->cursor - 11, var_s0, TEXT_GREEN); + func_80093324(D_800E8538[zero].column, D_800E8538[zero].row + (13 * var_s0), gTextPauseButton[var_s0], 0, 0.75f, 0.75f); } } -void func_800A4EF8(struct_8018D9E0_entry *arg0) { +void render_pause_menu_versus(struct_8018D9E0_entry *arg0) { s16 temp_t0; s16 temp_v1; s32 temp_t3; @@ -8851,12 +8852,12 @@ void func_800A4EF8(struct_8018D9E0_entry *arg0) { } else { var_s1 = var_s0; } - func_800921C0(arg0->unk4 - 0x15, var_s0, 3); - func_80093324(temp_s3->column - 2, temp_s3->row + (13 * var_s0), D_800E775C[var_s1], 0, 0.75f, 0.75f); + text_rainbow_effect(arg0->cursor - 0x15, var_s0, TEXT_YELLOW); + func_80093324(temp_s3->column - 2, temp_s3->row + (13 * var_s0), gTextPauseButton[var_s1], 0, 0.75f, 0.75f); } } -void func_800A5084(struct_8018D9E0_entry *arg0) { +void render_pause_grand_prix(struct_8018D9E0_entry *arg0) { s32 temp_t0; s32 temp_v1; s32 temp_s0; @@ -8884,12 +8885,12 @@ void func_800A5084(struct_8018D9E0_entry *arg0) { set_text_color(TEXT_YELLOW); draw_text(160, temp_s3->row - 30, D_800E7574[gCupCourseOrder[gCupSelection][gCupCourseSelection]], 0, 1.0f, 1.0f); for (var_s0 = 0; var_s0 < 2; var_s0++) { - func_800921C0(arg0->unk4 - 31, var_s0, 3); - func_80093324(temp_s3->column, temp_s3->row + (var_s0 * 13), D_800E775C[var_s0 * 4], 0, 0.75f, 0.75f); + text_rainbow_effect(arg0->cursor - 31, var_s0, TEXT_YELLOW); + func_80093324(temp_s3->column, temp_s3->row + (var_s0 * 13), gTextPauseButton[var_s0 * 4], 0, 0.75f, 0.75f); } } -void func_800A5360(struct_8018D9E0_entry *arg0) { +void render_pause_battle(struct_8018D9E0_entry *arg0) { struct UnkStruct_800DC5EC *temp_v0; s16 temp_t0; s16 temp_v1; @@ -8912,8 +8913,8 @@ void func_800A5360(struct_8018D9E0_entry *arg0) { } else { var_s1 = var_a1; } - func_800921C0(arg0->unk4 - 0x29, var_a1, 3); - func_80093324(temp_s3->column - 2, temp_s3->row + 13 * var_a1, D_800E775C[var_s1], 0, 0.75f, 0.75f); + text_rainbow_effect(arg0->cursor - 0x29, var_a1, TEXT_YELLOW); + func_80093324(temp_s3->column - 2, temp_s3->row + 13 * var_a1, gTextPauseButton[var_s1], 0, 0.75f, 0.75f); } } @@ -8952,7 +8953,7 @@ void func_800A54EC(void) { } whyTheSequel = D_800F0B50[why]; sp50.column = var_v1->column - 8; - sp50.row = (var_v1->row + ((sp48->unk4 - whyTheSequel) * 0xD)) - 8; + sp50.row = (var_v1->row + ((sp48->cursor - whyTheSequel) * 0xD)) - 8; func_800A66A8(sp48, &sp50); } #else @@ -8979,12 +8980,12 @@ void func_800A5738(struct_8018D9E0_entry *arg0) { s32 zero = 0; char sp5C[3]; - var_v1 = arg0->unk4; + var_v1 = arg0->cursor; if (var_v1 == 0) { if ((arg0->unk1C >= 0x1E) && ((gGlobalTimer / 16) % 2)) { - gDisplayListHead = draw_box(gDisplayListHead, 0x000000C0, 0x00000021, (s32) (get_string_width(D_800E775C[5]) * 0.8f) + 0xC6, 0x00000032, 0, 0, 0, 0x00000096); + gDisplayListHead = draw_box(gDisplayListHead, 0x000000C0, 0x00000021, (s32) (get_string_width(gTextPauseButton[5]) * 0.8f) + 0xC6, 0x00000032, 0, 0, 0, 0x00000096); set_text_color(1); - func_80093324(0x000000BF, 0x00000030, D_800E775C[5], 0, 0.8f, 0.8f); + func_80093324(0x000000BF, 0x00000030, gTextPauseButton[5], 0, 0.8f, 0.8f); } } else { if (var_v1 == 1) { @@ -8998,7 +8999,7 @@ void func_800A5738(struct_8018D9E0_entry *arg0) { gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, var_s2); set_text_color(3); func_80093754(0x000000A0, 0x00000050, D_800E7574[gCupCourseOrder[gCupSelection][gCupCourseSelection]], 0, 1.0f, 1.0f); - switch (arg0->unk4) { /* switch 1 */ + switch (arg0->cursor) { /* switch 1 */ case 1: /* switch 1 */ case 11: /* switch 1 */ case 12: /* switch 1 */ @@ -9030,8 +9031,8 @@ void func_800A5738(struct_8018D9E0_entry *arg0) { get_time_record_centiseconds(temp_a0, sp84); text_draw(0x000000B3, 0x00000089, sp84, 0, 0.8f, 0.8f); for (var_s1 = 0; var_s1 < 6; var_s1++) { - func_800921C0(arg0->unk4 - 0xB, var_s1, 1); - func_80093358(D_800E8538[zero].column, D_800E8538[zero].row + (0xD * var_s1), D_800E775C[var_s1 + 1], 0, 0.75f, 0.75f); + text_rainbow_effect(arg0->cursor - 0xB, var_s1, TEXT_GREEN); + func_80093358(D_800E8538[zero].column, D_800E8538[zero].row + (0xD * var_s1), gTextPauseButton[var_s1 + 1], 0, 0.75f, 0.75f); } break; case 21: /* switch 1 */ @@ -9041,7 +9042,7 @@ void func_800A5738(struct_8018D9E0_entry *arg0) { case 25: /* switch 1 */ case 26: /* switch 1 */ set_text_color(3); - temp_v0 = arg0->unk4 - 0x15; + temp_v0 = arg0->cursor - 0x15; for (var_s1 = 0; var_s1 < 7; var_s1++) { func_80093324(0x0000004D, 0x6E + (0xD * var_s1), D_800E798C[(temp_v0 * 7) + var_s1], 0, 0.8f, 0.8f); } @@ -9053,7 +9054,7 @@ void func_800A5738(struct_8018D9E0_entry *arg0) { func_80093324(0x0000005A, arg0->row + (0xD * var_s1) + 0x6E, D_800E7A3C[var_s1], 0, 0.8f, 0.8f); } for (var_s1 = 0; var_s1 < 2; var_s1++) { - func_800921C0(arg0->unk4 - 0x1E, var_s1, 1); + text_rainbow_effect(arg0->cursor - 0x1E, var_s1, TEXT_GREEN); convert_number_to_ascii(var_s1 + 1, sp5C); func_80093324(0x5A - arg0->column, (0x96 + (0x14 * var_s1)), &sp5C[1], 0, 0.75f, 0.75f); if (D_8018EE10[var_s1].ghostDataSaved == 0) { @@ -9076,7 +9077,7 @@ void func_800A5738(struct_8018D9E0_entry *arg0) { func_80093324(0x00000055, arg0->row + (0xD * var_s1) + 0x6E, D_800E7A60[var_s1], 0, 0.8f, 0.8f); } for (var_s1 = 0; var_s1 < 2; var_s1++) { - func_800921C0(arg0->unk4 - 0x23, var_s1, 1); + text_rainbow_effect(arg0->cursor - 0x23, var_s1, TEXT_GREEN); func_80093324(0x7D - arg0->column, 0x9B + (0xF * var_s1), D_800E7A6C[var_s1], 0, 0.8f, 0.8f); } break; @@ -9093,22 +9094,22 @@ void func_800A5738(struct_8018D9E0_entry *arg0) { } break; } - switch (arg0->unk4) { /* switch 2 */ + switch (arg0->cursor) { /* switch 2 */ case 11: /* switch 2 */ case 12: /* switch 2 */ case 13: /* switch 2 */ case 14: /* switch 2 */ case 15: /* switch 2 */ case 16: /* switch 2 */ - var_v0_9 = &D_800E73E0[arg0->unk4 - 11]; + var_v0_9 = &D_800E73E0[arg0->cursor - 11]; break; case 30: /* switch 2 */ case 31: /* switch 2 */ - var_v0_9 = &D_800E7410[arg0->unk4 - 30]; + var_v0_9 = &D_800E7410[arg0->cursor - 30]; break; case 35: /* switch 2 */ case 36: /* switch 2 */ - var_v0_9 = &D_800E7420[arg0->unk4 - 35]; + var_v0_9 = &D_800E7420[arg0->cursor - 35]; break; default: return; @@ -9145,23 +9146,23 @@ void func_800A6154(struct_8018D9E0_entry *arg0) { s32 var_s0; s32 var_s1; - if (arg0->unk4 == 0) { + if (arg0->cursor == 0) { gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, arg0->unk1C); set_text_color(3); gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, (arg0->unk1C * 0xFF) / 100); for (var_s1 = 0, var_s0 = 0x96; var_s0 < 0xBE; var_s1++, var_s0 += 0x14) { - func_80093358(0x0000008C, var_s0, D_800E775C[(var_s1 * 3) + 1], 0, 1.0f, 1.0f); + func_80093358(0x0000008C, var_s0, gTextPauseButton[(var_s1 * 3) + 1], 0, 1.0f, 1.0f); } } else { gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, 0x00000064); for (var_s1 = 0, var_s0 = 0x96; var_s1 < 2; var_s1++, var_s0 += 0x14) { - func_800921C0(arg0->unk4 - 0xB, var_s1, 3); - func_80093324(0x0000008C, var_s0, D_800E775C[(var_s1 * 3) + 1], 0, 1.0f, 1.0f); + text_rainbow_effect(arg0->cursor - 0xB, var_s1, TEXT_YELLOW); + func_80093324(0x0000008C, var_s0, gTextPauseButton[(var_s1 * 3) + 1], 0, 1.0f, 1.0f); } } - if (arg0->unk4 >= 0xB) { + if (arg0->cursor >= 0xB) { sp6C.column = 0x0084; - sp6C.row = (arg0->unk4 * 0x14) - 0x4E; + sp6C.row = (arg0->cursor * 0x14) - 0x4E; func_800A66A8(arg0, &sp6C); } if (arg0->unk20 > 0) { @@ -9177,7 +9178,7 @@ void func_800A638C(struct_8018D9E0_entry *arg0) { s32 var_s1; s8 **var_s2; - if (arg0->unk4 == 0) { + if (arg0->cursor == 0) { gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, arg0->unk1C); set_text_color(5); gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, (arg0->unk1C * 0xFF) / 100); @@ -9187,7 +9188,7 @@ void func_800A638C(struct_8018D9E0_entry *arg0) { set_text_color(5); draw_text(0x000000A0, arg0->row + 0x1E, D_800E7778[gModeSelection / 3], 0, 1.0f, 1.0f); } - switch (arg0->unk4) { /* irregular */ + switch (arg0->cursor) { /* irregular */ default: var_a1 = 0x000000FF; break; @@ -9213,12 +9214,12 @@ void func_800A638C(struct_8018D9E0_entry *arg0) { default: break; } - if (arg0->unk4 >= 10) { + if (arg0->cursor >= 10) { for (var_s1 = 0; var_s1 < 4; var_s1++) { - func_800921C0(arg0->unk4 - 0xA, var_s1, 1); - func_80093324(0x00000069, 0xAE + (0xF * var_s1), D_800E775C[var_s1 + 1], 0, 0.8f, 0.8f); + text_rainbow_effect(arg0->cursor - 0xA, var_s1, TEXT_GREEN); + func_80093324(0x00000069, 0xAE + (0xF * var_s1), gTextPauseButton[var_s1 + 1], 0, 0.8f, 0.8f); } - func_800A66A8(arg0, &D_800E7360[arg0->unk4 - 10]); + func_800A66A8(arg0, &D_800E7360[arg0->cursor - 10]); } } @@ -9439,7 +9440,7 @@ void func_800A70E8(struct_8018D9E0_entry *arg0) { s32 loopIndex; s32 stringIndex; - if (arg0->unk4 == 1) { + if (arg0->cursor == 1) { var_s0 = get_string_width(D_800E7A34[0]) * 0.45f; temp_f6 = get_string_width(D_800E7A34[1]) * 0.45f; if (var_s0 < temp_f6) { @@ -9460,7 +9461,7 @@ void func_800A70E8(struct_8018D9E0_entry *arg0) { // Shading layer of the grand prix podium result screen void func_800A7258(struct_8018D9E0_entry *arg0) { - if (arg0->unk4 == 0) { + if (arg0->cursor == 0) { // If shading layer is fading in gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x13F, 0xEF, 0, 0, 0, arg0->unk1C); } else { @@ -9677,10 +9678,10 @@ void func_800A7A4C(s32 arg0) { func_800A97BC(var_s1); break; case 0x5: /* switch 8 */ - switch (var_s1->unk4) { /* switch 9; irregular */ + switch (var_s1->cursor) { /* switch 9; irregular */ case 0: /* switch 9 */ if (gControllerFive->button & R_TRIG) { - var_s1->unk4 = (s32) 1U; + var_s1->cursor = (s32) 1U; play_sound2(SOUND_ACTION_PING); } else { var_s1->visible = 0; @@ -10439,7 +10440,7 @@ void func_800A94C8(struct_8018D9E0_entry *arg0, s32 columnTarget, s32 arg2) { void func_800A954C(struct_8018D9E0_entry *arg0) { // Cycle lasts 26 (0x1A) frames - if (arg0->unk4 == 0) { + if (arg0->cursor == 0) { // Move highlight from yellow to red arg0->unk20 = (s32) (u32) ((((f32) (0xC - arg0->unk1C) * 127.0f) / 12.0f) + 128.0f); } else { @@ -10450,7 +10451,7 @@ void func_800A954C(struct_8018D9E0_entry *arg0) { if (arg0->unk1C >= 0xC) { // Every 13 (0xC) frames reverse direction arg0->unk1C = 0; - arg0->unk4 ^= 1; + arg0->cursor ^= 1; } } @@ -10479,8 +10480,8 @@ void func_800A9710(struct_8018D9E0_entry *arg0) { phi_v0 = 0; break; } - if (phi_v0 != arg0->unk4) { - arg0->unk4 = phi_v0; + if (phi_v0 != arg0->cursor) { + arg0->cursor = phi_v0; func_8009A594(arg0->D_8018DEE0_index, 0, segmented_to_virtual_dupe_2(D_800E7D34[phi_v0])); } } @@ -10597,7 +10598,7 @@ void func_800A97BC(struct_8018D9E0_entry *arg0, u32 arg3) { } } if ((u32) var_v1_2 < (u32) (D_800E86C4 + 4)) { - var_v1_2->unk3 = (s8) var_v1_2->unk4; + var_v1_2->unk3 = (s8) var_v1_2->cursor; } else { temp_v0_8 = var_v1_2->unk2; if ((temp_v0_8 == 0x10) || (temp_v0_8 == 0)) { @@ -10672,13 +10673,13 @@ void func_800A9A98(struct_8018D9E0_entry *arg0) { } void func_800A9B9C(struct_8018D9E0_entry *arg0) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: func_800AA280(arg0); break; case 1: func_800AA280(arg0); - arg0->unk4 = 4; + arg0->cursor = 4; /* fallthrough */ case 4: if (arg0->unk1C > 0) { @@ -10688,11 +10689,11 @@ void func_800A9B9C(struct_8018D9E0_entry *arg0) { } } else { arg0->unk1C = 0; - arg0->unk4 = 0; + arg0->cursor = 0; } break; case 2: - arg0->unk4 = 3; + arg0->cursor = 3; break; case 3: default: @@ -10701,22 +10702,22 @@ void func_800A9B9C(struct_8018D9E0_entry *arg0) { } void func_800A9C40(struct_8018D9E0_entry *arg0) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: func_800AA280(arg0); if ((gPlayerCount + 0xA) == arg0->type) { - arg0->unk4 = 2; + arg0->cursor = 2; } else { - arg0->unk4 = 1; + arg0->cursor = 1; } break; case 4: if ((gPlayerCount + 0xA) == arg0->type) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->unk1C = 0; break; } - arg0->unk4 = 1; + arg0->cursor = 1; case 1: func_800AA280(arg0); if ((gMainMenuSelectionDepth == CONFIRM_OK_SELECTION_FROM_BACK_OUT) || (gMainMenuSelectionDepth == TIME_TRIALS_DATA_SELECTION_FROM_BACK_OUT)) { @@ -10732,7 +10733,7 @@ void func_800A9C40(struct_8018D9E0_entry *arg0) { break; case 3: if ((gPlayerCount + 0xA) == arg0->type) { - arg0->unk4 = 2; + arg0->cursor = 2; } break; case 2: @@ -10750,7 +10751,7 @@ void func_800A9D5C(struct_8018D9E0_entry *arg0) { arg0->priority = 6; } - switch (arg0->unk4) { + switch (arg0->cursor) { case 2: if ((gMainMenuSelectionDepth == CONFIRM_OK_SELECTION_FROM_BACK_OUT) || (gMainMenuSelectionDepth == TIME_TRIALS_DATA_SELECTION_FROM_BACK_OUT)) { arg0->column = 0x00000080; @@ -10763,7 +10764,7 @@ void func_800A9D5C(struct_8018D9E0_entry *arg0) { temp_v0 = &D_800E70A0[arg0->type - 0xA]; func_800A91D8(arg0, temp_v0->column, temp_v0->row); if ((arg0->column == temp_v0->column) && (arg0->row == temp_v0->row)) { - arg0->unk4 = 0; + arg0->cursor = 0; } /* fallthrough */ case 0: @@ -10806,7 +10807,7 @@ void func_800A9E58(struct_8018D9E0_entry *arg0) { } temp_a1 = gGameModeFromNumPlayersAndRowSelection[gPlayerCount][D_800E86AC[gPlayerCount - 1]]; - switch (arg0->unk4) { /* switch 5; irregular */ + switch (arg0->cursor) { /* switch 5; irregular */ case 0: /* switch 5 */ if ((temp_a1 != sp20) && (temp_a1 != sp1C)) { arg0->visible = 0; @@ -10821,7 +10822,7 @@ void func_800A9E58(struct_8018D9E0_entry *arg0) { arg0->column = temp_v0->column; arg0->row = (D_800E86AC[gPlayerCount - 1] * 0x12) + temp_v0->row + 0x41; arg0->unk1C = 0; - arg0->unk4 = 1; + arg0->cursor = 1; break; case CONFIRM_OK_SELECTION_FROM_BACK_OUT: /* switch 2 */ case TIME_TRIALS_DATA_SELECTION_FROM_BACK_OUT: /* switch 2 */ @@ -10831,7 +10832,7 @@ void func_800A9E58(struct_8018D9E0_entry *arg0) { arg0->row = (D_800E86AC[gPlayerCount - 1] * 0x12) + temp_v0->row + temp_v1_2->row; arg0->unk1C = arg0->row - temp_v0->row; arg0->visible = 1; - arg0->unk4 = 2; + arg0->cursor = 2; break; default: /* switch 2 */ arg0->visible = 0; @@ -10848,10 +10849,10 @@ void func_800A9E58(struct_8018D9E0_entry *arg0) { case TIME_TRIALS_DATA_SELECTION_FROM_BACK_OUT: /* switch 3 */ if ((temp_a1 != sp20) && (temp_a1 != sp1C)) { arg0->visible = 0; - arg0->unk4 = 0; + arg0->cursor = 0; } else { if (arg0->unk20 != D_800E86AC[gPlayerCount - 1]) { - arg0->unk4 = 0; + arg0->cursor = 0; } temp_v0 = func_800AAE68(); arg0->column = temp_v0->column + arg0->unk1C; @@ -10859,14 +10860,14 @@ void func_800A9E58(struct_8018D9E0_entry *arg0) { func_800A92E8(arg0, temp_v0->column + temp_v1_2->column); arg0->unk1C = arg0->column - temp_v0->column; if (arg0->unk1C == temp_v1_2->column) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->unk1C = arg0->row - temp_v0->row; } } break; default: /* switch 3 */ arg0->visible = 0; - arg0->unk4 = 0; + arg0->cursor = 0; break; } break; @@ -10879,10 +10880,10 @@ void func_800A9E58(struct_8018D9E0_entry *arg0) { case TIME_TRIALS_DATA_SELECTION_FROM_BACK_OUT: /* switch 4 */ if ((temp_a1 != sp20) && (temp_a1 != sp1C)) { arg0->visible = 0; - arg0->unk4 = 0; + arg0->cursor = 0; } else { if (arg0->unk20 != D_800E86AC[gPlayerCount - 1]) { - arg0->unk4 = 0; + arg0->cursor = 0; } temp_v0 = func_800AAE68(); temp_v1_2 = &D_800E70E8[arg0->type - sp24]; @@ -10894,7 +10895,7 @@ void func_800A9E58(struct_8018D9E0_entry *arg0) { break; default: /* switch 4 */ arg0->visible = 0; - arg0->unk4 = 0; + arg0->cursor = 0; break; } break; @@ -10923,13 +10924,13 @@ void func_800AA2EC(struct_8018D9E0_entry *arg0) { case DATA_SELECTION: case PLAYER_NUM_SELECTION: case GAME_MODE_SELECTION: - arg0->unk4 = 0; + arg0->cursor = 0; break; case GAME_MODE_CC_OR_TIME_TRIALS_OPTIONS_SELECTION: case CONFIRM_OK_SELECTION: case CONFIRM_OK_SELECTION_FROM_BACK_OUT: case TIME_TRIALS_DATA_SELECTION_FROM_BACK_OUT: - if (arg0->unk4 != 0) break; + if (arg0->cursor != 0) break; if (gPlayerCount != 1) break; if (D_800E86AC[gPlayerCount - 1] != 1) break; @@ -10939,7 +10940,7 @@ void func_800AA2EC(struct_8018D9E0_entry *arg0) { case 5: /* switch 1 */ break; case 0: /* switch 1 */ - arg0->unk4 = 1; + arg0->cursor = 1; var_t1 = 1; break; case 2: /* switch 1 */ @@ -10953,7 +10954,7 @@ void func_800AA2EC(struct_8018D9E0_entry *arg0) { if (var_t1 == 0) { if (gControllerPak1State == 0) { if (check_for_controller_pak(0) == 0) { - arg0->unk4 = 2; + arg0->cursor = 2; break; } temp_v0 = osPfsInit(&gSIEventMesgQueue, &gControllerPak1FileHandle, 0); @@ -10961,14 +10962,14 @@ void func_800AA2EC(struct_8018D9E0_entry *arg0) { switch (temp_v0) { case PFS_ERR_NOPACK: case PFS_ERR_DEVICE: - arg0->unk4 = 2; + arg0->cursor = 2; break; case PFS_ERR_ID_FATAL: - arg0->unk4 = 3; + arg0->cursor = 3; break; case PFS_ERR_CONTRFAIL: default: - arg0->unk4 = 3; + arg0->cursor = 3; break; } return; @@ -10976,28 +10977,28 @@ void func_800AA2EC(struct_8018D9E0_entry *arg0) { gControllerPak1State = 1; } if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) == 0) { - arg0->unk4 = 1; + arg0->cursor = 1; break; } if (osPfsNumFiles(&gControllerPak1FileHandle, &gControllerPak1NumFilesUsed, &gControllerPak1MaxWriteableFiles) != 0) { - arg0->unk4 = 3; + arg0->cursor = 3; break; } if (osPfsFreeBlocks(&gControllerPak1FileHandle, &gControllerPak1NumPagesFree) != 0) { - arg0->unk4 = 3; + arg0->cursor = 3; break; } gControllerPak1NumPagesFree = (s32) gControllerPak1NumPagesFree >> 8; } if (gControllerPak1MaxWriteableFiles >= gControllerPak1NumFilesUsed) { - arg0->unk4 = 5; + arg0->cursor = 5; break; } if (gControllerPak1NumPagesFree >= 0x79) { - arg0->unk4 = 1; + arg0->cursor = 1; break; } - arg0->unk4 = 5; + arg0->cursor = 5; } break; default: @@ -11102,9 +11103,9 @@ void func_800AA69C(struct_8018D9E0_entry *arg0) { } void func_800AAA9C(struct_8018D9E0_entry *arg0) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 3: - arg0->unk4 = 1; + arg0->cursor = 1; /* fallthrough */ case 1: if (D_8018EDEE == 3) { @@ -11120,15 +11121,15 @@ void func_800AAA9C(struct_8018D9E0_entry *arg0) { /* fallthrough */ case 0: if (func_800AAFCC(arg0->type - 0x2B) >= 0) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->unk1C = 0; } else { - arg0->unk4 = 1; + arg0->cursor = 1; } break; case 4: if (func_800AAFCC(arg0->type - 0x2B) >= 0) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->unk1C = 0; } break; @@ -11139,14 +11140,14 @@ void func_800AAA9C(struct_8018D9E0_entry *arg0) { } void func_800AAB90(struct_8018D9E0_entry *arg0) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 1: if (arg0->unk1C > 0) { - arg0->unk4 = 3; + arg0->cursor = 3; } break; case 2: - arg0->unk4 = 4; + arg0->cursor = 4; break; case 3: if (arg0->unk1C > 0) { @@ -11156,7 +11157,7 @@ void func_800AAB90(struct_8018D9E0_entry *arg0) { } } else { arg0->unk1C = 0; - arg0->unk4 = 0; + arg0->cursor = 0; } break; case 0: @@ -11175,7 +11176,7 @@ void func_800AAC18(struct_8018D9E0_entry *arg0) { Unk_D_800E70A0 *var_t0; temp_a1 = arg0->type - 0x2B; - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: if (D_8018EDEE == 3) { temp_v0 = func_800AAFCC(temp_a1); @@ -11183,7 +11184,7 @@ void func_800AAC18(struct_8018D9E0_entry *arg0) { var_t0 = &D_800E7188[(gScreenModeSelection * 4) + temp_v0]; arg0->column = (s32) var_t0->column; arg0->row = (s32) var_t0->row; - arg0->unk4 = 2; + arg0->cursor = 2; arg0->unk8 = 2; func_8009A594(arg0->D_8018DEE0_index, 0, segmented_to_virtual_dupe_2(D_800E8340[temp_a1])); } @@ -11197,7 +11198,7 @@ void func_800AAC18(struct_8018D9E0_entry *arg0) { break; case 2: case 4: - if (arg0->unk4 == 2) { + if (arg0->cursor == 2) { temp_v0 = func_800AAFCC(temp_a1); if (temp_v0 >= 0) { var_t0 = &D_800E7188[(gScreenModeSelection * 4) + temp_v0]; @@ -11205,11 +11206,11 @@ void func_800AAC18(struct_8018D9E0_entry *arg0) { } else { var_t0 = &D_800E7108[0][temp_a1]; if ((var_t0->column == arg0->column) && (var_t0->row == arg0->row)) { - arg0->unk4 = 0; + arg0->cursor = 0; return; } } - if ((arg0->unk4 != 2) || (arg0->unk8 != 1)) { + if ((arg0->cursor != 2) || (arg0->unk8 != 1)) { func_800A91D8(arg0, (s32) var_t0->column, (s32) var_t0->row); } break; @@ -11321,7 +11322,7 @@ escape: s32 func_800AAF70(s32 arg0) { struct_8018D9E0_entry *temp; temp = func_800AAEB4(arg0); - return temp->unk4; + return temp->cursor; } void func_800AAF94(struct_8018D9E0_entry *arg0, s32 arg1) { @@ -11351,9 +11352,9 @@ s32 func_800AAFCC(s32 arg0) { } void func_800AB020(struct_8018D9E0_entry *arg0) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 1: - arg0->unk4 = 4; + arg0->cursor = 4; /* fallthrough */ case 4: if (arg0->unk1C > 0) { @@ -11363,11 +11364,11 @@ void func_800AB020(struct_8018D9E0_entry *arg0) { } } else { arg0->unk1C = 0; - arg0->unk4 = 0; + arg0->cursor = 0; } break; case 2: - arg0->unk4 = 3; + arg0->cursor = 3; break; case 0: case 3: @@ -11377,21 +11378,21 @@ void func_800AB020(struct_8018D9E0_entry *arg0) { } void func_800AB098(struct_8018D9E0_entry *arg0) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: if ((gCupSelection + 0x53) == arg0->type) { - arg0->unk4 = 2; + arg0->cursor = 2; } else { - arg0->unk4 = 1; + arg0->cursor = 1; } break; case 4: if ((gCupSelection + 0x53) == arg0->type) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->unk1C = 0; break; } else { - arg0->unk4 = 1; + arg0->cursor = 1; } // Purposeful fallthrough case 1: @@ -11404,7 +11405,7 @@ void func_800AB098(struct_8018D9E0_entry *arg0) { break; case 3: if ((gCupSelection + 0x53) == arg0->type) { - arg0->unk4 = 2; + arg0->cursor = 2; } break; case 2: @@ -11422,7 +11423,7 @@ void func_800AB164(struct_8018D9E0_entry *arg0) { arg0->priority = 4; } - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: thing = &D_800E7148[arg0->type - 0x53]; arg0->column = thing->column; @@ -11435,7 +11436,7 @@ void func_800AB164(struct_8018D9E0_entry *arg0) { thing = &D_800E7148[arg0->type - 0x53]; func_800A91D8(arg0, thing->column, thing->row); if ((arg0->column == thing->column) && (arg0->row == thing->row)) { - arg0->unk4 = 0; + arg0->cursor = 0; } break; case 1: @@ -11476,7 +11477,7 @@ void func_800AB314(struct_8018D9E0_entry *arg0) { } if (gModeSelection != 0) { if (D_8018EDEC != 1U) { - arg0->unk4 = 0; + arg0->cursor = 0; arg0->unk20 = 0; for (var_a1 = 0; var_a1 < 4; var_a1++) { if (gCupCourseSelection == var_a1) { @@ -11490,20 +11491,20 @@ void func_800AB314(struct_8018D9E0_entry *arg0) { } } } else { - arg0->unk4 = 3; + arg0->cursor = 3; for (var_a1 = 0; var_a1 < 4; var_a1++) { sp24[var_a1]->visible = 1; sp24[var_a1]->priority = 6; } } } else { - var_v0 = arg0->unk4; + var_v0 = arg0->cursor; switch (var_v0) { /* irregular */ case 0: if ((arg0->unk1C / 4) == gCupSelection) { arg0->unk20++; if (arg0->unk20 >= 0x33) { - arg0->unk4 = 1; + arg0->cursor = 1; arg0->unk20 = 0; arg0->unk1C = (gCupSelection * 4); arg0->unk1C++; @@ -11513,14 +11514,14 @@ void func_800AB314(struct_8018D9E0_entry *arg0) { arg0->unk1C = gCupSelection * 4; } if (D_8018EDEC == 3) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->unk20 = 0; } - var_v0 = arg0->unk4; + var_v0 = arg0->cursor; break; case 1: if ((arg0->unk1C / 4) != gCupSelection) { - arg0->unk4 = 0; + arg0->cursor = 0; var_v0 = 0; arg0->unk20 = 0; arg0->unk1C = 0; @@ -11529,32 +11530,32 @@ void func_800AB314(struct_8018D9E0_entry *arg0) { if (arg0->unk20 >= 0x1F) { arg0->unk20 = 0; arg0->unk1C = (gCupSelection * 4) + (((arg0->unk1C % 4) + 1) % 4); - var_v0 = arg0->unk4; + var_v0 = arg0->cursor; } else { if (D_8018EDEC == 3) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->unk20 = 0; } - var_v0 = arg0->unk4; + var_v0 = arg0->cursor; } } break; case 2: arg0->unk20++; if (arg0->unk20 >= 0x1A) { - arg0->unk4 = 3; + arg0->cursor = 3; arg0->unk20 = 0; } if (D_8018EDEC != 3) { - arg0->unk4 = 0; + arg0->cursor = 0; arg0->unk20 = 0; arg0->unk1C = 0; } - var_v0 = arg0->unk4; + var_v0 = arg0->cursor; break; case 3: if (D_8018EDEC != 3) { - arg0->unk4 = 0; + arg0->cursor = 0; arg0->unk20 = 0; arg0->unk1C = 0; var_v0 = 0; @@ -11630,18 +11631,18 @@ void func_800AB9B0(struct_8018D9E0_entry *arg0) { arg0->column = (s32) D_800E7268->column; arg0->row = D_800E7268->row; } - temp_v1 = &D_800E7268[arg0->unk4]; - switch (arg0->unk4) { /* irregular */ + temp_v1 = &D_800E7268[arg0->cursor]; + switch (arg0->cursor) { /* irregular */ case 0: func_800A91D8(arg0, (s32) temp_v1->column, (s32) temp_v1->row); if (D_8018EDEC == 3) { - arg0->unk4 = 1; + arg0->cursor = 1; } break; case 1: func_800A91D8(arg0, (s32) temp_v1->column, (s32) temp_v1->row); if (D_8018EDEC == 1) { - arg0->unk4 = 0; + arg0->cursor = 0; } break; } @@ -11715,10 +11716,10 @@ void func_800ABC38(struct_8018D9E0_entry *arg0) { void func_800ABCF4(struct_8018D9E0_entry *arg0) { f64 temp_f0; - switch (arg0->unk4) { /* irregular */ + switch (arg0->cursor) { /* irregular */ case 0: arg0->column = 0; - arg0->unk4 = 1; + arg0->cursor = 1; arg0->unk20 = (get_string_width(gCupNames[D_800DC540]) / 2) + 0xA0; /* fallthrough */ case 1: @@ -11729,7 +11730,7 @@ void func_800ABCF4(struct_8018D9E0_entry *arg0) { } arg0->unk24 = (f32) (((f64) arg0->unk1C * 0.05) + 1.0); if (arg0->column >= (arg0->unk20 - 0x14)) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->D_8018DEE0_index = 0; } break; @@ -11775,10 +11776,10 @@ void func_800ABEAC(struct_8018D9E0_entry *arg0) { } void func_800ABF68(struct_8018D9E0_entry *arg0) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: arg0->column = 0x140; - arg0->unk4 = 1; + arg0->cursor = 1; arg0->unk20 = 0xA0 - (get_string_width(D_800E7524[gCurrentCourseId]) / 2); /* fallthrough */ case 1: @@ -11789,7 +11790,7 @@ void func_800ABF68(struct_8018D9E0_entry *arg0) { } arg0->unk24 = (arg0->unk1C * 0.05) + 1.0; if ((arg0->unk20 + 0x14) >= arg0->column) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->D_8018DEE0_index = 0; } break; @@ -11806,10 +11807,10 @@ void func_800ABF68(struct_8018D9E0_entry *arg0) { } void func_800AC128(struct_8018D9E0_entry *arg0) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: arg0->column = 0x00000140; - arg0->unk4 = 1; + arg0->cursor = 1; /* fallthrough */ case 1: func_800A940C(arg0, 0x00000064); @@ -11819,7 +11820,7 @@ void func_800AC128(struct_8018D9E0_entry *arg0) { } arg0->unk24 = (f32) (((f64) arg0->unk1C * 0.07) + 0.6); if (arg0->column == 0x00000064) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->D_8018DEE0_index = 0; } break; @@ -11828,7 +11829,7 @@ void func_800AC128(struct_8018D9E0_entry *arg0) { arg0->unk1C = 0; arg0->unk24 = (f32) (1.5 - ((arg0->D_8018DEE0_index - 0xF) * 0.004 * (arg0->D_8018DEE0_index - 0xF))); if ((arg0->D_8018DEE0_index >= 0x10) && ((f64) arg0->unk24 < 0.8)) { - arg0->unk4 = 3; + arg0->cursor = 3; arg0->D_8018DEE0_index = 0; } break; @@ -11850,23 +11851,23 @@ void func_800AC300(struct_8018D9E0_entry *arg0) { } void func_800AC324(struct_8018D9E0_entry *arg0) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: arg0->column = 0x14A; - arg0->unk4 = 1; + arg0->cursor = 1; func_800921B4(); break; case 1: func_800A9208(arg0, 0xA0); if (arg0->column == 0xA0) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->unk20 = 0; } break; case 2: arg0->unk20++; if (((D_8018D9D8 != 0) || (arg0->unk20 >= 0x5B)) && (D_800DDB24 != 0)) { - arg0->unk4 = 3; + arg0->cursor = 3; arg0->unk1C = arg0->column; add_8018D9E0_entry(0xAB, 0, 0, 0); } @@ -11893,10 +11894,10 @@ void func_800AC458(struct_8018D9E0_entry *arg0) { s32 var_a1; s32 var_t1; - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: arg0->column = -0x000000A0; - arg0->unk4 = 1; + arg0->cursor = 1; for (var_a1 = 0; var_a1 < 4; var_a1++) { D_8018D9BC[var_a1] = gGPPointRewards[var_a1]; } @@ -11916,7 +11917,7 @@ void func_800AC458(struct_8018D9E0_entry *arg0) { } else { arg0->unk20 = 0; arg0->column = 0; - arg0->unk4 = 2; + arg0->cursor = 2; arg0->unk1C = 0; D_800DC5EC->screenStartX = 0x00F0; D_800DC5F0->screenStartX = 0x0050; @@ -11926,7 +11927,7 @@ void func_800AC458(struct_8018D9E0_entry *arg0) { arg0->column = 0; arg0->unk1C++; if (((D_8018D9D8 != 0) || (arg0->unk1C >= 0x1F)) && (D_800DDB24 != 0)) { - arg0->unk4 = 3; + arg0->cursor = 3; arg0->unk1C = 0; arg0->unk20 = 0; } @@ -11936,7 +11937,7 @@ void func_800AC458(struct_8018D9E0_entry *arg0) { case 5: case 6: var_t1 = 0; - var_a1 = arg0->unk4 - 3; + var_a1 = arg0->cursor - 3; arg0->unk1C++; if (((arg0->unk1C % 3) == 0) || (D_8018D9D8 != 0)) { if (D_8018D9BC[var_a1] > 0) { @@ -11956,17 +11957,17 @@ void func_800AC458(struct_8018D9E0_entry *arg0) { if (var_t1 != 0) { arg0->unk20 = 0; arg0->unk1C = 0; - if (arg0->unk4 < 6) { - arg0->unk4++; + if (arg0->cursor < 6) { + arg0->cursor++; } else { - arg0->unk4 = 7; + arg0->cursor = 7; } } break; case 7: arg0->unk1C++; if ((((D_8018D9D8 != 0) && (arg0->unk1C >= 0xB)) || (arg0->unk1C >= 0x3D)) && (D_800DDB24 != 0)) { - arg0->unk4 = 8; + arg0->cursor = 8; arg0->unk1C = 0; } break; @@ -11976,7 +11977,7 @@ void func_800AC458(struct_8018D9E0_entry *arg0) { arg0->unk1C += 5; } if (arg0->unk1C >= 0x29) { - arg0->unk4 = 9; + arg0->cursor = 9; } break; case 9: @@ -11985,7 +11986,7 @@ void func_800AC458(struct_8018D9E0_entry *arg0) { arg0->unk1C -= 5; } if (arg0->unk1C <= 0) { - arg0->unk4 = 0x0000000A; + arg0->cursor = 0x0000000A; arg0->unk1C = 0; if (gCupCourseSelection == 3) { for (var_a1 = 0; var_a1 < 8; var_a1++) { @@ -12000,14 +12001,14 @@ void func_800AC458(struct_8018D9E0_entry *arg0) { case 10: arg0->unk1C++; if (arg0->unk1C > 0) { - arg0->unk4 = 0x0000000B; + arg0->cursor = 0x0000000B; arg0->unk1C = 0; func_800921B4(); } break; case 11: if ((D_8018D9D8 != 0) && (D_800DDB24 != 0)) { - arg0->unk4 = 0x0000000C; + arg0->cursor = 0x0000000C; arg0->unk20 = arg0->row; play_sound2(SOUND_ACTION_NEXT_COURSE); } @@ -12020,7 +12021,7 @@ void func_800AC458(struct_8018D9E0_entry *arg0) { D_800DC5F0->screenStartY -= 0x10; } else { arg0->unk20 = 0; - arg0->unk4 = 0x0000000D; + arg0->cursor = 0x0000000D; arg0->unk1C = 0; D_800DC5EC->screenStartY = 0x012C; D_800DC5F0->screenStartY = -0x003C; @@ -12038,16 +12039,16 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AC458.s") #endif void func_800AC978(struct_8018D9E0_entry *arg0) { - switch (arg0->unk4) { /* irregular */ + switch (arg0->cursor) { /* irregular */ case 0: arg0->column = 0x14A; - arg0->unk4 = 1; + arg0->cursor = 1; arg0->unk1C = 0xFF; break; case 1: func_800A9208(arg0, 0xA0); if (arg0->column == 0xA0) { - arg0->unk4 = 2; + arg0->cursor = 2; } break; case 2: @@ -12061,13 +12062,13 @@ void func_800AC978(struct_8018D9E0_entry *arg0) { } void func_800ACA14(struct_8018D9E0_entry *arg0) { - switch (arg0->unk4) { /* irregular */ + switch (arg0->cursor) { /* irregular */ case 0: if (arg0->unk20 >= 0xB) { arg0->unk1C += 3; } if (arg0->unk1C >= 0x65) { - arg0->unk4 = 0x0000000B; + arg0->cursor = 0x0000000B; arg0->unk1C = 0; } break; @@ -12076,8 +12077,8 @@ void func_800ACA14(struct_8018D9E0_entry *arg0) { if (func_800B4520()) break; if ((gControllerFive->buttonPressed | gControllerFive->stickPressed) & 0x800) { - if (arg0->unk4 >= 0xC) { - arg0->unk4--; + if (arg0->cursor >= 0xC) { + arg0->cursor--; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12086,8 +12087,8 @@ void func_800ACA14(struct_8018D9E0_entry *arg0) { } } if ((gControllerFive->buttonPressed | gControllerFive->stickPressed) & 0x400) { - if (arg0->unk4 < 0xC) { - arg0->unk4++; + if (arg0->cursor < 0xC) { + arg0->cursor++; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12115,11 +12116,11 @@ void func_800ACA14(struct_8018D9E0_entry *arg0) { void func_800ACC50(struct_8018D9E0_entry *arg0) { s32 var_s0; - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: arg0->unk1C += 3; if (arg0->unk1C >= 0x65) { - arg0->unk4 = 1; + arg0->cursor = 1; arg0->unk1C = 0; for (var_s0 = 0; var_s0 < gPlayerCount; var_s0++) { add_8018D9E0_entry(var_s0 + 0xB1, 0, 0, (s8) (5 - var_s0)); @@ -12127,17 +12128,17 @@ void func_800ACC50(struct_8018D9E0_entry *arg0) { } break; case 1: - if (find_8018D9E0_entry_dupe(0x000000B1)->unk4 >= 2) { - arg0->unk4 = 2; + if (find_8018D9E0_entry_dupe(0x000000B1)->cursor >= 2) { + arg0->cursor = 2; } break; case 2: arg0->unk1C += 0x20; if (arg0->unk1C >= 0x100) { if (gModeSelection == VERSUS) { - arg0->unk4 = (s32) D_8018EDF4; + arg0->cursor = (s32) D_8018EDF4; } else { - arg0->unk4 = (s32) D_8018EDF6; + arg0->cursor = (s32) D_8018EDF6; } arg0->unk1C = 0; } @@ -12148,8 +12149,8 @@ void func_800ACC50(struct_8018D9E0_entry *arg0) { case 13: if (func_800B4520() == 0) { if ((gControllerFive->buttonPressed | gControllerFive->stickPressed) & 0x800) { - if (arg0->unk4 >= 0xB) { - arg0->unk4--; + if (arg0->cursor >= 0xB) { + arg0->cursor--; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12158,8 +12159,8 @@ void func_800ACC50(struct_8018D9E0_entry *arg0) { } } if ((gControllerFive->buttonPressed | gControllerFive->stickPressed) & 0x400) { - if (arg0->unk4 < 0xD) { - arg0->unk4++; + if (arg0->cursor < 0xD) { + arg0->cursor++; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12171,9 +12172,9 @@ void func_800ACC50(struct_8018D9E0_entry *arg0) { func_8009DFE0(0x0000001E); play_sound2(SOUND_MENU_OK_CLICKED); if (gModeSelection == VERSUS) { - D_8018EDF4 = (s8) arg0->unk4; + D_8018EDF4 = (s8) arg0->cursor; } else { - D_8018EDF6 = (s8) arg0->unk4; + D_8018EDF6 = (s8) arg0->cursor; } if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12195,18 +12196,18 @@ void func_800ACF40(struct_8018D9E0_entry *arg0) { temp_a2 = arg0->type - 0xB1; temp_a1 = D_800EFD64[gCharacterSelections[arg0->type - 0xB1]]; - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: arg0->column = D_800E72F8.column; arg0->row = D_800E72F8.row; - arg0->unk4 = 1; + arg0->cursor = 1; break; case 1: temp_v0_2 = &D_800E7300[((gPlayerCount - 2) * 4) + temp_a2]; func_800A9208(arg0, temp_v0_2->column); func_800A9278(arg0, temp_v0_2->row); if (arg0->column == temp_v0_2->column) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->unk20 = 0; } break; @@ -12227,9 +12228,9 @@ void func_800ACF40(struct_8018D9E0_entry *arg0) { if (var_v1 == 0) { arg0->unk20++; if (arg0->unk20 >= 0x1F) { - if (find_8018D9E0_entry_dupe(0x000000B0)->unk4 >= 2) { + if (find_8018D9E0_entry_dupe(0x000000B0)->cursor >= 2) { func_8009A640(arg0->D_8018DEE0_index, 0, temp_a2, segmented_to_virtual_dupe_2(gCharacterCelebrateAnimation[temp_a1])); - arg0->unk4 = 3; + arg0->cursor = 3; func_800CA24C(temp_a2); func_800C90F4(temp_a2, (gCharacterSelections[temp_a2] * 0x10) + 0x29008007); } @@ -12239,7 +12240,7 @@ void func_800ACF40(struct_8018D9E0_entry *arg0) { case 3: if (D_8018DEE0[arg0->D_8018DEE0_index].sequenceIndex >= D_800E8440[temp_a1]) { func_8009A640(arg0->D_8018DEE0_index, 0, temp_a2, segmented_to_virtual_dupe_2(D_800E83A0[temp_a1])); - arg0->unk4 = 4; + arg0->cursor = 4; } break; case 4: @@ -12249,30 +12250,30 @@ void func_800ACF40(struct_8018D9E0_entry *arg0) { } void func_800AD1A4(struct_8018D9E0_entry *arg0) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: arg0->column = 0x0000014A; - arg0->unk4 = 1; + arg0->cursor = 1; func_800921B4(); add_8018D9E0_entry(0x000000BB, 0, 0, 0); break; case 1: func_800A9208(arg0, 0x000000A0); if (arg0->column == 0x000000A0) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->unk20 = 0; } break; case 2: arg0->unk20++; if (arg0->unk20 >= 0x15) { - arg0->unk4 = 3; + arg0->cursor = 3; } break; case 3: if (D_8018D9D8 != 0) { func_800921B4(); - arg0->unk4 = 4; + arg0->cursor = 4; arg0->unk1C = arg0->column; add_8018D9E0_entry(0x000000BA, 0, 0, 0); } @@ -12300,10 +12301,10 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { s32 var_a1; s32 index; - switch (arg0->unk4) { /* switch 3; irregular */ + switch (arg0->cursor) { /* switch 3; irregular */ case 0: /* switch 3 */ arg0->column = -0x000000A0; - arg0->unk4 = 1; + arg0->cursor = 1; for (index = 0; index < 4; index++) { D_8018D9BC[index] = gGPPointRewards[index]; } @@ -12323,9 +12324,9 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { } else { arg0->unk20 = 0; arg0->column = 0; - arg0->unk4 = D_8018EDF5; - if ((arg0->unk4 == 9) && (D_80162DF8 == 1)) { - arg0->unk4--; + arg0->cursor = D_8018EDF5; + if ((arg0->cursor == 9) && (D_80162DF8 == 1)) { + arg0->cursor--; } D_800DC5EC->screenStartX = 0x00F0; D_800DC5F0->screenStartX = 0x0050; @@ -12339,10 +12340,10 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { case 10: /* switch 3 */ if (func_800B4520() == 0) { if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) { - if (arg0->unk4 >= 6) { - arg0->unk4--; - if ((D_80162DF8 == 1) && (arg0->unk4 == 9)) { - arg0->unk4--; + if (arg0->cursor >= 6) { + arg0->cursor--; + if ((D_80162DF8 == 1) && (arg0->cursor == 9)) { + arg0->cursor--; } play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { @@ -12352,13 +12353,13 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { } } if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x400) { - if (arg0->unk4 < 0xA) { - arg0->unk4++; - if ((D_80162DF8 == 1) && (arg0->unk4 == 9)) { - arg0->unk4++; + if (arg0->cursor < 0xA) { + arg0->cursor++; + if ((D_80162DF8 == 1) && (arg0->cursor == 9)) { + arg0->cursor++; } - if ((arg0->unk4 == 0x0000000A) && (D_80162DD4 != 0)) { - arg0->unk4 -= 2; + if ((arg0->cursor == 0x0000000A) && (D_80162DD4 != 0)) { + arg0->cursor -= 2; } else { play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { @@ -12369,7 +12370,7 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { } } if (gControllerOne->buttonPressed & 0x9000) { - if (arg0->unk4 == 0x0000000A) { + if (arg0->cursor == 0x0000000A) { var_v1 = 0; if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12381,7 +12382,7 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { break; case 0: /* switch 4 */ func_800B6708(); - arg0->unk4 = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x11; + arg0->cursor = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x11; var_v1 = 1; play_sound2(SOUND_MENU_SELECT); break; @@ -12397,26 +12398,26 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { if (gControllerPak1State == 0) { switch (func_800B5F30()) { /* switch 2 */ case -1: /* switch 2 */ - arg0->unk4 = 0x0000000B; + arg0->cursor = 0x0000000B; var_v1 = 1; break; case -3: /* switch 2 */ case -2: /* switch 2 */ - arg0->unk4 = 0x0000000C; + arg0->cursor = 0x0000000C; var_v1 = 1; break; case 1: /* switch 2 */ case 11: /* switch 2 */ - arg0->unk4 = 0x0000000B; + arg0->cursor = 0x0000000B; var_v1 = 1; break; case 10: /* switch 2 */ - arg0->unk4 = 0x0000000C; + arg0->cursor = 0x0000000C; var_v1 = 1; break; default: /* switch 2 */ var_v1 = 1; - arg0->unk4 = 0x0000000C; + arg0->cursor = 0x0000000C; break; case 0: break; @@ -12427,29 +12428,29 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { } if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) == 0) { func_800B6708(); - arg0->unk4 = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x11; + arg0->cursor = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x11; play_sound2(SOUND_MENU_SELECT); return; } } if (gControllerPak1MaxWriteableFiles >= gControllerPak1NumFilesUsed) { - arg0->unk4 = 0x0000000E; + arg0->cursor = 0x0000000E; play_sound2(SOUND_MENU_FILE_NOT_FOUND); return; } if (gControllerPak1NumPagesFree >= 0x79) { - arg0->unk4 = 0x00000013; + arg0->cursor = 0x00000013; arg0->unk1C = 0; play_sound2(SOUND_MENU_SELECT); return; } - arg0->unk4 = 0x0000000E; + arg0->cursor = 0x0000000E; play_sound2(SOUND_MENU_FILE_NOT_FOUND); } } else { - arg0->unk1C = arg0->unk4; - D_8018EDF5 = arg0->unk4; - arg0->unk4 = 0x0000001E; + arg0->unk1C = arg0->cursor; + D_8018EDF5 = arg0->cursor; + arg0->cursor = 0x0000001E; arg0->unk20 = arg0->row; play_sound2(SOUND_ACTION_NEXT_COURSE); if (arg0->unk24 < 4.2) { @@ -12467,7 +12468,7 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { case 16: /* switch 1 */ case 26: /* switch 1 */ if (gControllerOne->buttonPressed & 0xD000) { - arg0->unk4 = 0x0000000A; + arg0->cursor = 0x0000000A; play_sound2(SOUND_MENU_GO_BACK); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12476,11 +12477,11 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { break; case 17: /* switch 1 */ case 18: /* switch 1 */ - arg0->unk20 = arg0->unk4 - 0x11; + arg0->unk20 = arg0->cursor - 0x11; if (func_800B639C((gCupSelection * 4) + gCupCourseSelection) != arg0->unk20) { if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) { - if (arg0->unk4 >= 0x12) { - arg0->unk4--; + if (arg0->cursor >= 0x12) { + arg0->cursor--; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12489,8 +12490,8 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { } } if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x400) { - if (arg0->unk4 < 0x12) { - arg0->unk4++; + if (arg0->cursor < 0x12) { + arg0->cursor++; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12500,19 +12501,19 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { } } if (gControllerOne->buttonPressed & 0x4000) { - arg0->unk4 = 0x0000000A; + arg0->cursor = 0x0000000A; play_sound2(SOUND_MENU_GO_BACK); return; } if (gControllerOne->buttonPressed & 0x9000) { thing = &D_8018EE10[arg0->unk20]; if (thing->ghostDataSaved == 0) { - arg0->unk4 = 0x00000019; + arg0->cursor = 0x00000019; arg0->unk1C = 0; } else if (func_800B63F0(arg0->unk20) == 0) { - arg0->unk4 = 0x00000010; + arg0->cursor = 0x00000010; } else { - arg0->unk4 = 0x00000014; + arg0->cursor = 0x00000014; } play_sound2(SOUND_MENU_SELECT); if (arg0->unk24 < 4.2) { @@ -12522,19 +12523,19 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { break; case 19: /* switch 1 */ if ((arg0->unk1C == 1) && (func_800B6A68() != 0)) { - arg0->unk4 = 0x0000000F; + arg0->cursor = 0x0000000F; return; } else { arg0->unk1C++; if (arg0->unk1C >= 2) { - arg0->unk4 = 0x00000011; + arg0->cursor = 0x00000011; } } break; case 20: /* switch 1 */ case 21: /* switch 1 */ - if (((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) && (arg0->unk4 >= 0x15)) { - arg0->unk4--; + if (((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) && (arg0->cursor >= 0x15)) { + arg0->cursor--; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12542,8 +12543,8 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { arg0->unk8 = -1; } if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x400) { - if (arg0->unk4 < 0x15) { - arg0->unk4++; + if (arg0->cursor < 0x15) { + arg0->cursor++; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12552,20 +12553,20 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { } } if (gControllerOne->buttonPressed & 0x4000) { - arg0->unk4 = arg0->unk20 + 0x11; + arg0->cursor = arg0->unk20 + 0x11; play_sound2(SOUND_MENU_GO_BACK); return; } if (gControllerOne->buttonPressed & 0x9000) { - if (arg0->unk4 == 0x00000015) { - arg0->unk4 = 0x00000019; + if (arg0->cursor == 0x00000015) { + arg0->cursor = 0x00000019; arg0->unk1C = 0; play_sound2(SOUND_MENU_SELECT); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; } } else { - arg0->unk4 = arg0->unk20 + 0x11; + arg0->cursor = arg0->unk20 + 0x11; play_sound2(SOUND_MENU_GO_BACK); return; } @@ -12574,19 +12575,19 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { case 25: /* switch 1 */ if (arg0->unk1C == 1) { if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) != 0) { - arg0->unk4 = 0x0000001A; + arg0->cursor = 0x0000001A; play_sound2(SOUND_MENU_FILE_NOT_FOUND); return; } if (func_800B6178(arg0->unk20) != 0) { - arg0->unk4 = 0x0000001A; + arg0->cursor = 0x0000001A; play_sound2(SOUND_MENU_FILE_NOT_FOUND); return; } } arg0->unk1C++; if (arg0->unk1C >= 2) { - arg0->unk4 = 0x0000000A; + arg0->cursor = 0x0000000A; return; } break; @@ -12620,7 +12621,7 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { break; } arg0->unk20 = 0; - arg0->unk4 = 0x0000001F; + arg0->cursor = 0x0000001F; D_800DC5EC->screenStartY = 0x012C; D_800DC5F0->screenStartY = -0x003C; D_8015F894 = 4; @@ -12641,9 +12642,9 @@ void func_800ADF48(struct_8018D9E0_entry *arg0) { struct Controller *controller; if (gIsGamePaused != 0) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: - arg0->unk4 = D_800F0B50[gModeSelection]; + arg0->cursor = D_800F0B50[gModeSelection]; break; case 11: case 12: @@ -12663,8 +12664,8 @@ void func_800ADF48(struct_8018D9E0_entry *arg0) { if (func_800B4520() == 0) { controller = &gControllers[gIsGamePaused - 1]; if ((controller->buttonPressed | controller->stickPressed) & 0x800) { - if (D_800F0B50[gModeSelection] < arg0->unk4) { - arg0->unk4--; + if (D_800F0B50[gModeSelection] < arg0->cursor) { + arg0->cursor--; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12673,8 +12674,8 @@ void func_800ADF48(struct_8018D9E0_entry *arg0) { } } if ((controller->buttonPressed | controller->stickPressed) & 0x400) { - if (arg0->unk4 < D_800F0B54[gModeSelection]) { - arg0->unk4++; + if (arg0->cursor < D_800F0B54[gModeSelection]) { + arg0->cursor++; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12683,15 +12684,15 @@ void func_800ADF48(struct_8018D9E0_entry *arg0) { } } if (controller->buttonPressed & B_BUTTON) { - if (arg0->unk4 != D_800F0B50[gModeSelection]) { - arg0->unk4 = D_800F0B50[gModeSelection]; + if (arg0->cursor != D_800F0B50[gModeSelection]) { + arg0->cursor = D_800F0B50[gModeSelection]; play_sound2(SOUND_MENU_GO_BACK); return; } } if (controller->buttonPressed & (START_BUTTON | A_BUTTON)) { - if (arg0->unk4 == D_800F0B50[gModeSelection]) { - arg0->unk4 = 0; + if (arg0->cursor == D_800F0B50[gModeSelection]) { + arg0->cursor = 0; gIsGamePaused = 0; func_8028DF38(); func_800C9F90(0U); @@ -12710,7 +12711,7 @@ void func_800ADF48(struct_8018D9E0_entry *arg0) { break; } } else { - arg0->unk4 = 0; + arg0->cursor = 0; } } @@ -12718,19 +12719,19 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { struct_8018EE10_entry *thing; s32 var_v1; - if (arg0->unk4 != 0) { + if (arg0->cursor != 0) { D_800DC5B8 = 0; } - switch (arg0->unk4) { /* switch 1 */ + switch (arg0->cursor) { /* switch 1 */ case 0: /* switch 1 */ if (arg0->unk1C < 0x1E) { arg0->unk1C++; } if (gControllerOne->buttonPressed & 0x1000) { - arg0->unk4 = 0x0000000F; + arg0->cursor = 0x0000000F; play_sound2(SOUND_ACTION_GO_BACK_2); } else if (playerHUD[PLAYER_ONE].raceCompleteBool != 0) { - arg0->unk4 = 1; + arg0->cursor = 1; arg0->unk1C = 0; } break; @@ -12739,7 +12740,7 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { case 1: /* switch 1 */ arg0->unk1C += 3; if (arg0->unk1C >= 0x8D) { - arg0->unk4 = 0x0000000F; + arg0->cursor = 0x0000000F; } break; case 11: /* switch 1 */ @@ -12750,8 +12751,8 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { case 16: /* switch 1 */ if (func_800B4520() == 0) { if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) { - if (arg0->unk4 >= 0xC) { - arg0->unk4--; + if (arg0->cursor >= 0xC) { + arg0->cursor--; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12760,8 +12761,8 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { } } if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x400) { - if (arg0->unk4 < 0x10) { - arg0->unk4++; + if (arg0->cursor < 0x10) { + arg0->cursor++; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12770,7 +12771,7 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { } } if (gControllerOne->buttonPressed & 0x9000) { - if (arg0->unk4 == 0x00000010) { + if (arg0->cursor == 0x00000010) { var_v1 = 0; if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12782,7 +12783,7 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { break; case PFS_NO_ERROR: /* switch 3 */ func_800B6708(); - arg0->unk4 = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x1E; + arg0->cursor = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x1E; var_v1 = 1; break; case PFS_ERR_NEW_PACK: /* switch 3 */ @@ -12800,26 +12801,26 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { if (gControllerPak1State == 0) { switch (func_800B5F30()) { /* switch 2 */ case PFS_INVALID_DATA: /* switch 2 */ - arg0->unk4 = 0x00000015; + arg0->cursor = 0x00000015; var_v1 = 1; break; case PFS_FREE_BLOCKS_ERROR: /* switch 2 */ case PFS_NUM_FILES_ERROR: /* switch 2 */ - arg0->unk4 = 0x00000016; + arg0->cursor = 0x00000016; var_v1 = 1; break; case PFS_ERR_NOPACK: /* switch 2 */ case PFS_ERR_DEVICE: /* switch 2 */ - arg0->unk4 = 0x00000015; + arg0->cursor = 0x00000015; var_v1 = 1; break; case PFS_ERR_ID_FATAL: /* switch 2 */ - arg0->unk4 = 0x00000016; + arg0->cursor = 0x00000016; var_v1 = 1; break; default: /* switch 2 */ var_v1 = 1; - arg0->unk4 = 0x00000016; + arg0->cursor = 0x00000016; break; case 0: break; @@ -12830,20 +12831,20 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { } if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) == 0) { func_800B6708(); - arg0->unk4 = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x1E; + arg0->cursor = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x1E; play_sound2(SOUND_MENU_SELECT); return; } } if (gControllerPak1MaxWriteableFiles >= gControllerPak1NumFilesUsed) { - arg0->unk4 = 0x00000018; + arg0->cursor = 0x00000018; play_sound2(SOUND_MENU_FILE_NOT_FOUND); } else if (gControllerPak1NumPagesFree >= 0x79) { - arg0->unk4 = 0x00000020; + arg0->cursor = 0x00000020; arg0->unk1C = 0; play_sound2(SOUND_MENU_SELECT); } else { - arg0->unk4 = 0x00000018; + arg0->cursor = 0x00000018; play_sound2(SOUND_MENU_FILE_NOT_FOUND); } } else { @@ -12866,7 +12867,7 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { case 26: /* switch 1 */ case 41: /* switch 1 */ if (gControllerOne->buttonPressed & 0xD000) { - arg0->unk4 = 0x00000010; + arg0->cursor = 0x00000010; play_sound2(SOUND_MENU_GO_BACK); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12875,11 +12876,11 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { break; case 30: /* switch 1 */ case 31: /* switch 1 */ - arg0->unk20 = (u32) arg0->unk4 - 0x1E; + arg0->unk20 = (u32) arg0->cursor - 0x1E; if (func_800B639C((gCupSelection * 4) + gCupCourseSelection) != arg0->unk20) { if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) { - if (arg0->unk4 >= 0x1F) { - arg0->unk4--; + if (arg0->cursor >= 0x1F) { + arg0->cursor--; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12888,8 +12889,8 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { } } if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x400) { - if (arg0->unk4 < 0x1F) { - arg0->unk4++; + if (arg0->cursor < 0x1F) { + arg0->cursor++; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12899,17 +12900,17 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { } } if (gControllerOne->buttonPressed & 0x4000) { - arg0->unk4 = 0x00000010; + arg0->cursor = 0x00000010; play_sound2(SOUND_MENU_GO_BACK); } else if (gControllerOne->buttonPressed & 0x9000) { thing = &D_8018EE10[arg0->unk20]; if (thing->ghostDataSaved == 0) { - arg0->unk4 = 0x00000028; + arg0->cursor = 0x00000028; arg0->unk1C = 0; } else if (func_800B63F0(arg0->unk20) == 0) { - arg0->unk4 = 0x0000001A; + arg0->cursor = 0x0000001A; } else { - arg0->unk4 = 0x00000023; + arg0->cursor = 0x00000023; } play_sound2(SOUND_MENU_SELECT); if (arg0->unk24 < 4.2) { @@ -12919,18 +12920,18 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { break; case 32: /* switch 1 */ if ((arg0->unk1C == 1) && (func_800B6A68() != 0)) { - arg0->unk4 = 0x00000019; + arg0->cursor = 0x00000019; } else { arg0->unk1C++; if (arg0->unk1C >= 2) { - arg0->unk4 = 0x0000001E; + arg0->cursor = 0x0000001E; } } break; case 35: /* switch 1 */ case 36: /* switch 1 */ - if (((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) && ((s32) (u32) arg0->unk4 >= 0x24)) { - arg0->unk4--; + if (((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) && ((s32) (u32) arg0->cursor >= 0x24)) { + arg0->cursor--; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12938,8 +12939,8 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { arg0->unk8 = -1; } if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x400) { - if (arg0->unk4 < 0x24) { - arg0->unk4++; + if (arg0->cursor < 0x24) { + arg0->cursor++; play_sound2(SOUND_MENU_CURSOR_MOVE); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; @@ -12948,18 +12949,18 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { } } if (gControllerOne->buttonPressed & 0x4000) { - arg0->unk4 = arg0->unk20 + 0x1E; + arg0->cursor = arg0->unk20 + 0x1E; play_sound2(SOUND_MENU_GO_BACK); } else if (gControllerOne->buttonPressed & 0x9000) { - if (arg0->unk4 == 0x00000024) { - arg0->unk4 = 0x00000028; + if (arg0->cursor == 0x00000024) { + arg0->cursor = 0x00000028; arg0->unk1C = 0; play_sound2(SOUND_MENU_SELECT); if (arg0->unk24 < 4.2) { arg0->unk24 += 4.0; } } else { - arg0->unk4 = arg0->unk20 + 0x1E; + arg0->cursor = arg0->unk20 + 0x1E; play_sound2(SOUND_MENU_GO_BACK); } } @@ -12967,43 +12968,43 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { case 40: /* switch 1 */ if (arg0->unk1C == 1) { if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) != 0) { - arg0->unk4 = 0x00000029; + arg0->cursor = 0x00000029; play_sound2(SOUND_MENU_FILE_NOT_FOUND); return; } if (func_800B6178(arg0->unk20) != 0) { - arg0->unk4 = 0x00000029; + arg0->cursor = 0x00000029; play_sound2(SOUND_MENU_FILE_NOT_FOUND); return; } } arg0->unk1C++; if (arg0->unk1C >= 2) { - arg0->unk4 = 0x00000010; + arg0->cursor = 0x00000010; } break; } } void func_800AEC54(struct_8018D9E0_entry *arg0) { - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: arg0->column = (get_string_width(D_800E7780) / 2) + 0x140; arg0->row = 0x000000DA; - arg0->unk4 = 1; + arg0->cursor = 1; func_800C90F4(0U, (D_80162DE4 * 0x10) + 0x29008001); break; case 1: func_800A9208(arg0, 0x000000A0); if (arg0->column == 0x000000A0) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->unk1C = 0; } break; case 2: arg0->unk1C++; if (arg0->unk1C >= 0x3D) { - arg0->unk4 = 3; + arg0->cursor = 3; arg0->unk1C = 0; } break; @@ -13016,8 +13017,8 @@ void func_800AEC54(struct_8018D9E0_entry *arg0) { // Purposeful fallthrough case 3: func_800A94C8(arg0, 0x000000A0, -1); - if (((arg0->column + 0x14) == -(get_string_width(D_800E7780) / 2)) && (arg0->unk4 == 3)) { - arg0->unk4 = 4; + if (((arg0->column + 0x14) == -(get_string_width(D_800E7780) / 2)) && (arg0->cursor == 3)) { + arg0->cursor = 4; } break; default: @@ -13076,13 +13077,13 @@ void func_800AEF14(struct_8018D9E0_entry *arg0) { void func_800AEF74(struct_8018D9E0_entry *arg0) { - switch (arg0->unk4) { /* irregular */ + switch (arg0->cursor) { /* irregular */ case 0: if (D_80162DF8 == 1) { - arg0->unk4 = 1; + arg0->cursor = 1; arg0->unk1C = 0; } else if (playerHUD[PLAYER_ONE].raceCompleteBool == (s8) 1) { - arg0->unk4 = 2; + arg0->cursor = 2; } break; case 2: @@ -13090,7 +13091,7 @@ void func_800AEF74(struct_8018D9E0_entry *arg0) { case 1: arg0->unk1C += 1; if (playerHUD[PLAYER_ONE].raceCompleteBool == 1) { - arg0->unk4 = 2; + arg0->cursor = 2; } break; } @@ -13099,12 +13100,12 @@ void func_800AEF74(struct_8018D9E0_entry *arg0) { void func_800AF004(struct_8018D9E0_entry *arg0) { s32 temp_t1; - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: arg0->unk1C += 3; if (arg0->unk1C >= 0x65) { arg0->unk1C = 0; - arg0->unk4 = 1; + arg0->cursor = 1; gCupSelection %= 4; gCCSelection %= 4; add_8018D9E0_entry(0x0000012C, 0, 0, 4); @@ -13117,14 +13118,14 @@ void func_800AF004(struct_8018D9E0_entry *arg0) { arg0->unk1C += 1; if (arg0->unk1C >= 9) { arg0->unk1C = 0; - arg0->unk4++; - add_8018D9E0_entry(arg0->unk4 + 0x12B, 0, 0, 4); + arg0->cursor++; + add_8018D9E0_entry(arg0->cursor + 0x12B, 0, 0, 4); } break; case 5: arg0->unk1C += 1; if ((arg0->unk1C >= 0x65) && ((gControllerFive->buttonPressed != 0) || (gControllerFive->stickPressed != 0))) { - arg0->unk4 = 6; + arg0->cursor = 6; arg0->unk1C = 0; if (D_802874D8.unk1D < 3) { play_sound2(SOUND_MENU_OK_CLICKED); @@ -13137,7 +13138,7 @@ void func_800AF004(struct_8018D9E0_entry *arg0) { func_8009DFE0(0x0000001E); func_800CA330(0x19U); func_800CA388(0x19U); - arg0->unk4 = 7; + arg0->cursor = 7; break; case 7: default: @@ -13149,18 +13150,18 @@ void func_800AF1AC(struct_8018D9E0_entry *arg0) { Unk_D_800E70A0 *temp_v0_2; s32 idx = arg0->type - 0x12C; - switch (arg0->unk4) { /* irregular */ + switch (arg0->cursor) { /* irregular */ case 0: temp_v0_2 = &D_800E7458[idx]; arg0->column = temp_v0_2->column; arg0->row = temp_v0_2->row; - arg0->unk4 = 1; + arg0->cursor = 1; break; case 1: temp_v0_2 = &D_800E7480[idx]; func_800A91D8(arg0, temp_v0_2->column, temp_v0_2->row); if ((arg0->column == temp_v0_2->column) && (arg0->row == temp_v0_2->row)) { - arg0->unk4 = 2; + arg0->cursor = 2; } break; case 2: @@ -13177,18 +13178,18 @@ void func_800AF270(struct_8018D9E0_entry *arg0) { temp_v1 = arg0->type - 0x12C; sp30 = D_802874D8.unk1E; temp_v0 = D_800EFD64[sp30]; - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: thing = &D_800E7458[temp_v1]; arg0->column = thing->column; arg0->row = thing->row; - arg0->unk4 = 1; + arg0->cursor = 1; break; case 1: thing = &D_800E7480[temp_v1]; func_800A91D8(arg0, thing->column, thing->row); if ((arg0->column == thing->column) && (arg0->row == thing->row)) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->unk20 = 0; } break; @@ -13196,12 +13197,12 @@ void func_800AF270(struct_8018D9E0_entry *arg0) { arg0->unk20++; if (arg0->unk20 >= 0x1F) { if (D_802874D8.unk1D >= 3) { - arg0->unk4 = 4; + arg0->cursor = 4; func_800CA0B8(); func_800C90F4(0U, (sp30 * 0x10) + 0x29008003); func_800CA0A0(); } else { - arg0->unk4 = 3; + arg0->cursor = 3; func_8009A640(arg0->D_8018DEE0_index, 0, sp30, segmented_to_virtual_dupe_2(gCharacterCelebrateAnimation[temp_v0])); func_800CA0B8(); func_800C90F4(0U, (sp30 * 0x10) + 0x29008007); @@ -13212,7 +13213,7 @@ void func_800AF270(struct_8018D9E0_entry *arg0) { case 3: if (D_8018DEE0[arg0->D_8018DEE0_index].sequenceIndex >= D_800E8440[temp_v0]) { func_8009A640(arg0->D_8018DEE0_index, 0, sp30, segmented_to_virtual_dupe_2(D_800E83A0[temp_v0])); - arg0->unk4 = 4; + arg0->cursor = 4; } break; case 4: @@ -13238,10 +13239,10 @@ void func_800AF4DC(struct_8018D9E0_entry *arg0) { temp_v0 = arg0->type - 0x190; temp_v1 = &D_802850C0[temp_v0]; arg0->row = temp_v1->row; - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: arg0->column = temp_v1->startingColumn; - arg0->unk4 = 1; + arg0->cursor = 1; arg0->unk20 = temp_v1->columnExtra + (get_string_width(D_802854B0[temp_v0]) * temp_v1->textScaling / 2); /* fallthrough */ case 1: @@ -13252,7 +13253,7 @@ void func_800AF4DC(struct_8018D9E0_entry *arg0) { } arg0->unk24 = (arg0->unk1C * 0.05) + 1.0; if (arg0->column >= (arg0->unk20 - 0x14)) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->D_8018DEE0_index = 0; } break; @@ -13263,12 +13264,12 @@ void func_800AF4DC(struct_8018D9E0_entry *arg0) { arg0->unk24 = ((arg0->D_8018DEE0_index - 0xA) * 0.0085 * (arg0->D_8018DEE0_index - 0xA)) + 0.4; if ((arg0->D_8018DEE0_index >= 9) && ((f64) arg0->unk24 > 1)) { arg0->unk24 = 1.0f; - arg0->unk4 = 3; + arg0->cursor = 3; } break; case 3: if ((u8) D_8018ED91 != 0) { - arg0->unk4 = 4; + arg0->cursor = 4; } break; case 4: @@ -13290,10 +13291,10 @@ void func_800AF740(struct_8018D9E0_entry *arg0) { temp_v0 = arg0->type - 0x190; temp_v1 = &D_802850C0[temp_v0]; arg0->row = temp_v1->row; - switch (arg0->unk4) { + switch (arg0->cursor) { case 0: arg0->column = temp_v1->startingColumn; - arg0->unk4 = 1; + arg0->cursor = 1; arg0->unk20 = temp_v1->columnExtra - (get_string_width(D_802854B0[temp_v0]) * temp_v1->textScaling / 2); /* fallthrough */ case 1: @@ -13304,7 +13305,7 @@ void func_800AF740(struct_8018D9E0_entry *arg0) { } arg0->unk24 = (arg0->unk1C * 0.05) + 1.0; if ((arg0->unk20 + 0x14) >= arg0->column) { - arg0->unk4 = 2; + arg0->cursor = 2; arg0->D_8018DEE0_index = 0; } break; @@ -13315,12 +13316,12 @@ void func_800AF740(struct_8018D9E0_entry *arg0) { arg0->unk24 = ((arg0->D_8018DEE0_index - 0xA) * 0.0085 * (arg0->D_8018DEE0_index - 0xA)) + 0.4; if ((arg0->D_8018DEE0_index >= 9) && ((f64) arg0->unk24 > 1)) { arg0->unk24 = 1.0f; - arg0->unk4 = 3; + arg0->cursor = 3; } break; case 3: if ((u8) D_8018ED91 != 0) { - arg0->unk4 = 4; + arg0->cursor = 4; } break; case 4: diff --git a/src/code_80091750.h b/src/code_80091750.h index 5f721756c..0ddc39ffb 100644 --- a/src/code_80091750.h +++ b/src/code_80091750.h @@ -11,7 +11,7 @@ extern u32 _course_mario_raceway_dl_mio0SegmentRomStart[]; typedef struct { /* 0x00 */ s32 type; // id maybe? - /* 0x04 */ s32 unk4; // sound mode, maybe some other stuff + /* 0x04 */ s32 cursor; // sound mode, maybe some other stuff /* 0x08 */ s32 unk8; // This is used but I can't tell what for /* 0x0C */ s32 column; /* 0x10 */ s32 row; @@ -90,8 +90,8 @@ void func_80091EE4(void); void func_80091FA4(void); void func_80092148(void); void func_800921B4(void); -void func_800921C0(s32, s32, s32); -void func_80092224(s32, s32, s32); +void text_rainbow_effect(s32, s32, s32); +void set_text_color_rainbow_if_selected(s32, s32, s32); void func_80092258(void); void func_80092290(s32, s32*, s32*); void func_80092500(void); @@ -193,7 +193,7 @@ void func_8009B998(void); Gfx *func_8009B9D0(Gfx*, MkTexture*); Gfx *func_8009BA74(Gfx*, MkTexture*, s32, s32); Gfx *func_8009BC9C(Gfx*, MkTexture*, s32, s32, s32, s32); -Gfx *func_8009BEF0(Gfx*, MkTexture*, f32, f32, s32, f32,f32); +Gfx *print_letter(Gfx*, MkTexture*, f32, f32, s32, f32,f32); Gfx *func_8009C204(Gfx*, MkTexture*, s32, s32, s32); Gfx *func_8009C434(Gfx*, struct_8018DEE0_entry*, s32, s32, s32); Gfx *func_8009C708(Gfx*, struct_8018DEE0_entry *, s32, s32, s32, s32); @@ -266,11 +266,11 @@ void func_800A3E60(struct_8018D9E0_entry*); void func_800A4550(s32, s32, s32); void func_800A474C(s32, s32, s32); void func_800A4A24(struct_8018D9E0_entry*); -void func_800A4B38(struct_8018D9E0_entry*); -void func_800A4BC8(struct_8018D9E0_entry*); -void func_800A4EF8(struct_8018D9E0_entry*); -void func_800A5084(struct_8018D9E0_entry*); -void func_800A5360(struct_8018D9E0_entry*); +void render_pause_menu(struct_8018D9E0_entry*); +void render_pause_menu_time_trials(struct_8018D9E0_entry*); +void render_pause_menu_versus(struct_8018D9E0_entry*); +void render_pause_grand_prix(struct_8018D9E0_entry*); +void render_pause_battle(struct_8018D9E0_entry*); void func_800A54EC(void); void func_800A5738(struct_8018D9E0_entry*); void func_800A6034(struct_8018D9E0_entry*); @@ -498,7 +498,7 @@ extern char *D_800E7728[]; extern char *D_800E7730; extern char *D_800E7734[]; extern char *D_800E7744[]; -extern char *D_800E775C[]; +extern char *gTextPauseButton[]; extern char *D_800E7778[]; extern char D_800E7780[]; extern char *D_800E77A0[]; diff --git a/src/common_textures.h b/src/common_textures.h index ca306736e..469d6f01f 100644 --- a/src/common_textures.h +++ b/src/common_textures.h @@ -12,8 +12,8 @@ typedef struct { /** @cond */ -extern s8 common_tlut_finish_line_banner[]; -extern s8 common_texture_particle_fire[]; +extern u8 common_tlut_finish_line_banner[]; +extern u8 common_texture_particle_fire[]; extern Vtx D_0D001200[]; extern Vtx D_0D001210[]; extern Vtx D_0D001240[]; @@ -52,7 +52,7 @@ extern Vtx D_0D001E28[]; extern Vtx D_0D001E58[]; extern Vtx D_0D001E88[]; extern Vtx D_0D001EB8[]; -extern s8 common_texture_item_box_question_mark[]; +extern u8 common_texture_item_box_question_mark[]; extern Gfx D_0D002EE8[]; extern Vtx common_fake_item_box_question_mark_vertices[]; extern Gfx common_model_fake_itembox[]; @@ -70,13 +70,13 @@ extern Gfx D_0D003278[]; extern Gfx D_0D003288[]; extern Vtx common_vtx_banana[]; extern Vtx common_vtx_flat_banana[]; -extern s8 common_texture_banana[]; -extern s8 common_texture_flat_banana[]; +extern u8 common_texture_banana[]; +extern u8 common_texture_flat_banana[]; extern Gfx common_model_banana[]; extern Gfx common_model_flat_banana[]; -extern s8 common_tlut_trees_import[]; -extern s8 common_tlut_green_shell[]; -extern s8 common_tlut_blue_shell[]; +extern u8 common_tlut_trees_import[]; +extern u8 common_tlut_green_shell[]; +extern u8 common_tlut_blue_shell[]; extern Vtx D_0D005238[]; extern Vtx D_0D005278[]; extern Gfx D_0D0052B8[]; @@ -141,10 +141,10 @@ extern Gfx D_0D0069F8[]; extern Gfx D_0D006A10[]; extern Gfx D_0D006A28[]; extern Gfx D_0D006A40[]; -extern s8 D_0D006A58[]; -extern s8 D_0D006AD8[]; -extern s8 common_tlut_debug_font[]; -extern s8 common_texture_debug_font[]; +extern u8 D_0D006A58[]; +extern u8 D_0D006AD8[]; +extern u8 common_tlut_debug_font[]; +extern u8 common_texture_debug_font[]; extern Gfx D_0D0076F8[]; extern Gfx D_0D007780[]; extern Gfx D_0D0077A0[]; @@ -254,29 +254,29 @@ extern f32 D_0D009568[][4]; extern f32 D_0D0096B8[][4]; extern f32 D_0D009808[][4]; extern s32 unkPad; -extern s8 common_texture_speedometer[]; -extern s8 common_texture_speedometer_needle[]; -extern s8 common_texture_hud_lap[]; +extern u8 common_texture_speedometer[]; +extern u8 common_texture_speedometer_needle[]; +extern u8 common_texture_hud_lap[]; extern u8 common_texture_hud_123[]; -extern s8 common_texture_hud_lap_time[]; -extern s8 common_texture_hud_lap_1_on_3[]; -extern s8 common_texture_hud_lap_2_on_3[]; -extern s8 common_texture_hud_lap_3_on_3[]; -extern s8 common_texture_hud_total_time[]; -extern s8 common_texture_hud_time[]; +extern u8 common_texture_hud_lap_time[]; +extern u8 common_texture_hud_lap_1_on_3[]; +extern u8 common_texture_hud_lap_2_on_3[]; +extern u8 common_texture_hud_lap_3_on_3[]; +extern u8 common_texture_hud_total_time[]; +extern u8 common_texture_hud_time[]; extern u8 common_texture_hud_normal_digit[]; extern u8 common_texture_hud_place[][4096]; -extern s8 D_0D00E258[]; -extern s8 D_0D00F258[]; -extern s8 D_0D010258[]; -extern s8 D_0D011258[]; -extern s8 D_0D012258[]; -extern s8 D_0D013258[]; -extern s8 D_0D014258[]; +extern u8 D_0D00E258[]; +extern u8 D_0D00F258[]; +extern u8 D_0D010258[]; +extern u8 D_0D011258[]; +extern u8 D_0D012258[]; +extern u8 D_0D013258[]; +extern u8 D_0D014258[]; extern u8 D_0D015258[][2048]; -extern s8 D_0D015A58[]; -extern s8 D_0D016258[]; -extern s8 D_0D016A58[]; +extern u8 D_0D015A58[]; +extern u8 D_0D016258[]; +extern u8 D_0D016A58[]; extern u8 common_tlut_player_emblem[]; extern s16 tlutPad[]; extern u8 common_texture_player_emblem[][2048]; @@ -285,57 +285,57 @@ extern u8 common_texture_hud_type_C_rank_font[][256]; extern u8 common_tlut_hud_type_C_rank_tiny_font[]; extern u8 common_texture_hud_type_C_rank_tiny_font[][64]; extern u8 common_texture_character_portrait_border[]; -extern s8 common_tlut_portrait_mario[]; -extern s8 common_tlut_portrait_luigi[]; -extern s8 common_tlut_portrait_peach[]; -extern s8 common_tlut_portrait_toad[]; -extern s8 common_tlut_portrait_yoshi[]; -extern s8 common_tlut_portrait_donkey_kong[]; -extern s8 common_tlut_portrait_wario[]; -extern s8 common_tlut_portrait_bowser[]; -extern s8 common_tlut_portrait_bomb_kart_and_question_mark[]; -extern s8 common_texture_portrait_mario[]; -extern s8 common_texture_portrait_luigi[]; -extern s8 common_texture_portrait_peach[]; -extern s8 common_texture_portrait_toad[]; -extern s8 common_texture_portrait_yoshi[]; -extern s8 common_texture_portrait_donkey_kong[]; -extern s8 common_texture_portrait_wario[]; +extern u8 common_tlut_portrait_mario[]; +extern u8 common_tlut_portrait_luigi[]; +extern u8 common_tlut_portrait_peach[]; +extern u8 common_tlut_portrait_toad[]; +extern u8 common_tlut_portrait_yoshi[]; +extern u8 common_tlut_portrait_donkey_kong[]; +extern u8 common_tlut_portrait_wario[]; +extern u8 common_tlut_portrait_bowser[]; +extern u8 common_tlut_portrait_bomb_kart_and_question_mark[]; +extern u8 common_texture_portrait_mario[]; +extern u8 common_texture_portrait_luigi[]; +extern u8 common_texture_portrait_peach[]; +extern u8 common_texture_portrait_toad[]; +extern u8 common_texture_portrait_yoshi[]; +extern u8 common_texture_portrait_donkey_kong[]; +extern u8 common_texture_portrait_wario[]; extern u8 common_texture_portrait_bowser[]; extern u8 common_texture_portrait_bomb_kart[]; extern u8 common_texture_portrait_question_mark[]; -extern s8 common_tlut_item_window_none[]; -extern s8 common_tlut_item_window_banana[]; -extern s8 common_tlut_item_window_banana_bunch[]; -extern s8 common_tlut_item_window_mushroom[]; -extern s8 common_tlut_item_window_double_mushroom[]; -extern s8 common_tlut_item_window_triple_mushroom[]; -extern s8 common_tlut_item_window_super_mushroom[]; -extern s8 common_tlut_item_window_blue_shell[]; -extern s8 common_tlut_item_window_boo[]; -extern s8 common_tlut_item_window_green_shell[]; -extern s8 common_tlut_item_window_triple_green_shell[]; -extern s8 common_tlut_item_window_red_shell[]; -extern s8 common_tlut_item_window_triple_red_shell[]; -extern s8 common_tlut_item_window_star[]; -extern s8 common_tlut_item_window_thunder_bolt[]; -extern s8 common_tlut_item_window_fake_item_box[]; +extern u8 common_tlut_item_window_none[]; +extern u8 common_tlut_item_window_banana[]; +extern u8 common_tlut_item_window_banana_bunch[]; +extern u8 common_tlut_item_window_mushroom[]; +extern u8 common_tlut_item_window_double_mushroom[]; +extern u8 common_tlut_item_window_triple_mushroom[]; +extern u8 common_tlut_item_window_super_mushroom[]; +extern u8 common_tlut_item_window_blue_shell[]; +extern u8 common_tlut_item_window_boo[]; +extern u8 common_tlut_item_window_green_shell[]; +extern u8 common_tlut_item_window_triple_green_shell[]; +extern u8 common_tlut_item_window_red_shell[]; +extern u8 common_tlut_item_window_triple_red_shell[]; +extern u8 common_tlut_item_window_star[]; +extern u8 common_tlut_item_window_thunder_bolt[]; +extern u8 common_tlut_item_window_fake_item_box[]; extern u8 common_texture_item_window_none[]; -extern s8 common_texture_item_window_banana[]; -extern s8 common_texture_item_window_banana_bunch[]; -extern s8 common_texture_item_window_mushroom[]; -extern s8 common_texture_item_window_double_mushroom[]; -extern s8 common_texture_item_window_triple_mushroom[]; -extern s8 common_texture_item_window_super_mushroom[]; -extern s8 common_texture_item_window_blue_shell[]; -extern s8 common_texture_item_window_boo[]; -extern s8 common_texture_item_window_green_shell[]; -extern s8 common_texture_item_window_triple_green_shell[]; -extern s8 common_texture_item_window_red_shell[]; -extern s8 common_texture_item_window_triple_red_shell[]; -extern s8 common_texture_item_window_star[]; -extern s8 common_texture_item_window_thunder_bolt[]; -extern s8 common_texture_item_window_fake_item_box[]; +extern u8 common_texture_item_window_banana[]; +extern u8 common_texture_item_window_banana_bunch[]; +extern u8 common_texture_item_window_mushroom[]; +extern u8 common_texture_item_window_double_mushroom[]; +extern u8 common_texture_item_window_triple_mushroom[]; +extern u8 common_texture_item_window_super_mushroom[]; +extern u8 common_texture_item_window_blue_shell[]; +extern u8 common_texture_item_window_boo[]; +extern u8 common_texture_item_window_green_shell[]; +extern u8 common_texture_item_window_triple_green_shell[]; +extern u8 common_texture_item_window_red_shell[]; +extern u8 common_texture_item_window_triple_red_shell[]; +extern u8 common_texture_item_window_star[]; +extern u8 common_texture_item_window_thunder_bolt[]; +extern u8 common_texture_item_window_fake_item_box[]; extern u8 common_tlut_lakitu_countdown[][512]; extern u8 common_tlut_lakitu_checkered_flag[]; extern u8 common_tlut_lakitu_second_lap[]; @@ -344,31 +344,31 @@ extern u8 common_tlut_lakitu_reverse[]; extern u8 common_tlut_lakitu_fishing[]; extern u8 common_texture_particle_leaf[]; -extern s8 common_tlut_traffic_light[]; -extern s8 common_texture_traffic_light_01[]; -extern s8 common_texture_traffic_light_02[]; -extern s8 common_texture_traffic_light_03[]; -extern s8 common_texture_traffic_light_04[]; -extern s8 common_texture_traffic_light_05[]; -extern s8 common_texture_traffic_light_06[]; -extern s8 common_texture_traffic_light_07[]; -extern s8 common_texture_traffic_light_08[]; -extern s8 common_texture_traffic_light_09[]; -extern s8 common_texture_traffic_light_10[]; -extern s8 common_texture_unused_particle_leaf[]; +extern u8 common_tlut_traffic_light[]; +extern u8 common_texture_traffic_light_01[]; +extern u8 common_texture_traffic_light_02[]; +extern u8 common_texture_traffic_light_03[]; +extern u8 common_texture_traffic_light_04[]; +extern u8 common_texture_traffic_light_05[]; +extern u8 common_texture_traffic_light_06[]; +extern u8 common_texture_traffic_light_07[]; +extern u8 common_texture_traffic_light_08[]; +extern u8 common_texture_traffic_light_09[]; +extern u8 common_texture_traffic_light_10[]; +extern u8 common_texture_unused_particle_leaf[]; extern u8 D_0D0293D8[]; -extern s8 D_0D029458[]; +extern u8 D_0D029458[]; extern u8 common_texture_bomb[][1024]; -extern s8 D_0D029C58[]; -extern s8 D_0D02A058[]; -extern s8 D_0D02A458[]; +extern u8 D_0D029C58[]; +extern u8 D_0D02A058[]; +extern u8 D_0D02A458[]; extern u8 common_tlut_bomb[]; extern u8 D_0D02AA58[]; extern u8 common_texture_particle_spark[][1024]; extern u8 common_texture_particle_smoke[][1024]; -extern s8 common_texture_minimap_finish_line[]; -extern s8 common_texture_minimap_kart_character[][128]; -extern s8 common_texture_minimap_progress_dot[]; +extern u8 common_texture_minimap_finish_line[]; +extern u8 common_texture_minimap_kart_character[][128]; +extern u8 common_texture_minimap_progress_dot[]; /** @endcond */ diff --git a/src/data/common_textures.inc.c b/src/data/common_textures.inc.c index 39c9389c5..086af810e 100644 --- a/src/data/common_textures.inc.c +++ b/src/data/common_textures.inc.c @@ -18,23 +18,23 @@ // Somehow these symbols need to be linked in. For now, raw addresses are used. /* -extern s8 D_03004000[]; -extern s8 D_03004800[]; -extern s8 D_03005000[]; -extern s8 D_03005800[]; -extern s8 D_03006000[]; -extern s8 D_03006800[]; -extern s8 D_03007000[]; -extern s8 D_03007800[]; -extern s8 D_03008000[]; -extern s8 D_03008800[]; +extern u8 D_03004000[]; +extern u8 D_03004800[]; +extern u8 D_03005000[]; +extern u8 D_03005800[]; +extern u8 D_03006000[]; +extern u8 D_03006800[]; +extern u8 D_03007000[]; +extern u8 D_03007800[]; +extern u8 D_03008000[]; +extern u8 D_03008800[]; */ -s8 common_tlut_finish_line_banner[] = { // tlut +u8 common_tlut_finish_line_banner[] = { // tlut #include "assets/finish_line_banner/common_tlut_finish_line_banner.inc.c" }; -s8 common_texture_particle_fire[] = { // tlut +u8 common_texture_particle_fire[] = { // tlut #include "textures/common/common_texture_particle_fire.rgba16.inc.c" }; @@ -396,7 +396,7 @@ Vtx D_0D001EB8[] = { }; // D_0D001EE8 -s8 common_texture_item_box_question_mark[] = { +u8 common_texture_item_box_question_mark[] = { #include "textures/common/common_texture_item_box_question_mark.rgba16.inc.c" }; @@ -578,11 +578,11 @@ Vtx common_vtx_flat_banana[] = { // D_0D003348 -s8 common_texture_banana[] = { +u8 common_texture_banana[] = { #include "textures/common/common_texture_banana.rgba16.inc.c" }; -s8 common_texture_flat_banana[] = { +u8 common_texture_flat_banana[] = { #include "textures/common/common_texture_flat_banana.rgba16.inc.c" }; @@ -632,15 +632,15 @@ Gfx common_model_flat_banana[] = { // tlut size 8x29 //! @todo What is this? -s8 common_tlut_trees_import[] = { +u8 common_tlut_trees_import[] = { #include "assets/trees/common_tlut_trees_import.inc.c" }; -s8 common_tlut_green_shell[] = { +u8 common_tlut_green_shell[] = { #include "assets/greenshell/common_tlut_green_shell.inc.c" }; // 5038 -s8 common_tlut_blue_shell[] = { +u8 common_tlut_blue_shell[] = { #include "assets/blueshell/common_tlut_blue_shell.inc.c" }; @@ -1269,20 +1269,20 @@ Gfx D_0D006A40[] = { // Texture Block shadow i4 -s8 D_0D006A58[] = { +u8 D_0D006A58[] = { #include "textures/common/132B50_06A58.i4.inc.c" }; -s8 D_0D006AD8[] = { +u8 D_0D006AD8[] = { #include "textures/common/132B50_06AD8.ia8.inc.c" }; // tlut -s8 common_tlut_debug_font[] = { +u8 common_tlut_debug_font[] = { #include "assets/debug_font/common_tlut_debug_font.inc.c" }; -s8 common_texture_debug_font[] = { +u8 common_texture_debug_font[] = { #include "assets/debug_font/common_texture_debug_font.inc.c" }; @@ -2566,17 +2566,17 @@ f32 D_0D009808[][4] = { }; // Odometer speedometer -s8 common_texture_speedometer[] = { +u8 common_texture_speedometer[] = { #include "textures/common/common_texture_speedometer.i4.inc.c" }; // i8? odometer needle -s8 common_texture_speedometer_needle[] = { +u8 common_texture_speedometer_needle[] = { #include "textures/common/common_texture_speedometer_needle.i4.inc.c" }; // Lap UI Texture -s8 common_texture_hud_lap[] = { +u8 common_texture_hud_lap[] = { #include "textures/common/common_texture_hud_lap.rgba16.inc.c" }; @@ -2586,32 +2586,32 @@ u8 common_texture_hud_123[] = { }; // Lap -s8 common_texture_hud_lap_time[] = { +u8 common_texture_hud_lap_time[] = { #include "textures/common/common_texture_hud_lap_time.rgba16.inc.c" }; // 1/3 -s8 common_texture_hud_lap_1_on_3[] = { +u8 common_texture_hud_lap_1_on_3[] = { #include "textures/common/common_texture_hud_lap_1_on_3.rgba16.inc.c" }; // 2/3 -s8 common_texture_hud_lap_2_on_3[] = { +u8 common_texture_hud_lap_2_on_3[] = { #include "textures/common/common_texture_hud_lap_2_on_3.rgba16.inc.c" }; // 3/3 -s8 common_texture_hud_lap_3_on_3[] = { +u8 common_texture_hud_lap_3_on_3[] = { #include "textures/common/common_texture_hud_lap_3_on_3.rgba16.inc.c" }; // total -s8 common_texture_hud_total_time[] = { +u8 common_texture_hud_total_time[] = { #include "textures/common/common_texture_hud_total_time.rgba16.inc.c" }; // time -s8 common_texture_hud_time[] = { +u8 common_texture_hud_time[] = { #include "textures/common/common_texture_hud_time.rgba16.inc.c" }; @@ -2773,83 +2773,83 @@ u8 common_texture_character_portrait_border[] = { }; // 1A4D8 mario tlut -s8 common_tlut_portrait_mario[] = { +u8 common_tlut_portrait_mario[] = { #include "assets/character_portraits/common_tlut_portrait_mario.inc.c" }; // 1A6D8 luigi tlut -s8 common_tlut_portrait_luigi[] = { +u8 common_tlut_portrait_luigi[] = { #include "assets/character_portraits/common_tlut_portrait_luigi.inc.c" }; // 1A8D8 peach tlut -s8 common_tlut_portrait_peach[] = { +u8 common_tlut_portrait_peach[] = { #include "assets/character_portraits/common_tlut_portrait_peach.inc.c" }; // 1AAD8 toad tlut -s8 common_tlut_portrait_toad[] = { +u8 common_tlut_portrait_toad[] = { #include "assets/character_portraits/common_tlut_portrait_toad.inc.c" }; // 1ACD8 yoshi tlut -s8 common_tlut_portrait_yoshi[] = { +u8 common_tlut_portrait_yoshi[] = { #include "assets/character_portraits/common_tlut_portrait_yoshi.inc.c" }; // 1AED8 dk tlut -s8 common_tlut_portrait_donkey_kong[] = { +u8 common_tlut_portrait_donkey_kong[] = { #include "assets/character_portraits/common_tlut_portrait_donkey_kong.inc.c" }; // 1B0D8 wario tlut -s8 common_tlut_portrait_wario[] = { +u8 common_tlut_portrait_wario[] = { #include "assets/character_portraits/common_tlut_portrait_wario.inc.c" }; // 1B2D8 bowser tlut -s8 common_tlut_portrait_bowser[] = { +u8 common_tlut_portrait_bowser[] = { #include "assets/character_portraits/common_tlut_portrait_bowser.inc.c" }; // 1B4D8 bob-omb tlut and question mark? -s8 common_tlut_portrait_bomb_kart_and_question_mark[] = { +u8 common_tlut_portrait_bomb_kart_and_question_mark[] = { #include "assets/character_portraits/common_tlut_portrait_bomb_kart_and_question_mark.inc.c" }; // Mario -s8 common_texture_portrait_mario[] = { +u8 common_texture_portrait_mario[] = { #include "assets/character_portraits/common_texture_portrait_mario.inc.c" }; // Luigi -s8 common_texture_portrait_luigi[] = { +u8 common_texture_portrait_luigi[] = { #include "assets/character_portraits/common_texture_portrait_luigi.inc.c" }; // Peach -s8 common_texture_portrait_peach[] = { +u8 common_texture_portrait_peach[] = { #include "assets/character_portraits/common_texture_portrait_peach.inc.c" }; // Toad -s8 common_texture_portrait_toad[] = { +u8 common_texture_portrait_toad[] = { #include "assets/character_portraits/common_texture_portrait_toad.inc.c" }; // Yoshi -s8 common_texture_portrait_yoshi[] = { +u8 common_texture_portrait_yoshi[] = { #include "assets/character_portraits/common_texture_portrait_yoshi.inc.c" }; // Donkey Kong -s8 common_texture_portrait_donkey_kong[] = { +u8 common_texture_portrait_donkey_kong[] = { #include "assets/character_portraits/common_texture_portrait_donkey_kong.inc.c" }; // Wario -s8 common_texture_portrait_wario[] = { +u8 common_texture_portrait_wario[] = { #include "assets/character_portraits/common_texture_portrait_wario.inc.c" }; @@ -2869,67 +2869,67 @@ u8 common_texture_portrait_question_mark[] = { }; // 1DED8 tlut item frames -s8 common_tlut_item_window_none[] = { +u8 common_tlut_item_window_none[] = { #include "assets/item_window/common_tlut_item_window_none.inc.c" }; -s8 common_tlut_item_window_banana[] = { +u8 common_tlut_item_window_banana[] = { #include "assets/item_window/common_tlut_item_window_banana.inc.c" }; -s8 common_tlut_item_window_banana_bunch[] = { +u8 common_tlut_item_window_banana_bunch[] = { #include "assets/item_window/common_tlut_item_window_banana_bunch.inc.c" }; -s8 common_tlut_item_window_mushroom[] = { +u8 common_tlut_item_window_mushroom[] = { #include "assets/item_window/common_tlut_item_window_mushroom.inc.c" }; -s8 common_tlut_item_window_double_mushroom[] = { +u8 common_tlut_item_window_double_mushroom[] = { #include "assets/item_window/common_tlut_item_window_double_mushroom.inc.c" }; -s8 common_tlut_item_window_triple_mushroom[] = { +u8 common_tlut_item_window_triple_mushroom[] = { #include "assets/item_window/common_tlut_item_window_triple_mushroom.inc.c" }; -s8 common_tlut_item_window_super_mushroom[] = { +u8 common_tlut_item_window_super_mushroom[] = { #include "assets/item_window/common_tlut_item_window_super_mushroom.inc.c" }; -s8 common_tlut_item_window_blue_shell[] = { +u8 common_tlut_item_window_blue_shell[] = { #include "assets/item_window/common_tlut_item_window_blue_shell.inc.c" }; -s8 common_tlut_item_window_boo[] = { +u8 common_tlut_item_window_boo[] = { #include "assets/item_window/common_tlut_item_window_boo.inc.c" }; -s8 common_tlut_item_window_green_shell[] = { +u8 common_tlut_item_window_green_shell[] = { #include "assets/item_window/common_tlut_item_window_green_shell.inc.c" }; -s8 common_tlut_item_window_triple_green_shell[] = { +u8 common_tlut_item_window_triple_green_shell[] = { #include "assets/item_window/common_tlut_item_window_triple_green_shell.inc.c" }; -s8 common_tlut_item_window_red_shell[] = { +u8 common_tlut_item_window_red_shell[] = { #include "assets/item_window/common_tlut_item_window_red_shell.inc.c" }; -s8 common_tlut_item_window_triple_red_shell[] = { +u8 common_tlut_item_window_triple_red_shell[] = { #include "assets/item_window/common_tlut_item_window_triple_red_shell.inc.c" }; -s8 common_tlut_item_window_star[] = { +u8 common_tlut_item_window_star[] = { #include "assets/item_window/common_tlut_item_window_star.inc.c" }; -s8 common_tlut_item_window_thunder_bolt[] = { +u8 common_tlut_item_window_thunder_bolt[] = { #include "assets/item_window/common_tlut_item_window_thunder_bolt.inc.c" }; -s8 common_tlut_item_window_fake_item_box[] = { +u8 common_tlut_item_window_fake_item_box[] = { #include "assets/item_window/common_tlut_item_window_fake_item_box.inc.c" }; @@ -2938,63 +2938,63 @@ u8 common_texture_item_window_none[] = { #include "assets/item_window/common_texture_item_window_none.inc.c" }; -s8 common_texture_item_window_banana[] = { +u8 common_texture_item_window_banana[] = { #include "assets/item_window/common_texture_item_window_banana.inc.c" }; -s8 common_texture_item_window_banana_bunch[] = { +u8 common_texture_item_window_banana_bunch[] = { #include "assets/item_window/common_texture_item_window_banana_bunch.inc.c" }; -s8 common_texture_item_window_mushroom[] = { +u8 common_texture_item_window_mushroom[] = { #include "assets/item_window/common_texture_item_window_mushroom.inc.c" }; -s8 common_texture_item_window_double_mushroom[] = { +u8 common_texture_item_window_double_mushroom[] = { #include "assets/item_window/common_texture_item_window_double_mushroom.inc.c" }; -s8 common_texture_item_window_triple_mushroom[] = { +u8 common_texture_item_window_triple_mushroom[] = { #include "assets/item_window/common_texture_item_window_triple_mushroom.inc.c" }; -s8 common_texture_item_window_super_mushroom[] = { +u8 common_texture_item_window_super_mushroom[] = { #include "assets/item_window/common_texture_item_window_super_mushroom.inc.c" }; -s8 common_texture_item_window_blue_shell[] = { +u8 common_texture_item_window_blue_shell[] = { #include "assets/item_window/common_texture_item_window_blue_shell.inc.c" }; -s8 common_texture_item_window_boo[] = { +u8 common_texture_item_window_boo[] = { #include "assets/item_window/common_texture_item_window_boo.inc.c" }; -s8 common_texture_item_window_green_shell[] = { +u8 common_texture_item_window_green_shell[] = { #include "assets/item_window/common_texture_item_window_green_shell.inc.c" }; -s8 common_texture_item_window_triple_green_shell[] = { +u8 common_texture_item_window_triple_green_shell[] = { #include "assets/item_window/common_texture_item_window_triple_green_shell.inc.c" }; -s8 common_texture_item_window_red_shell[] = { +u8 common_texture_item_window_red_shell[] = { #include "assets/item_window/common_texture_item_window_red_shell.inc.c" }; -s8 common_texture_item_window_triple_red_shell[] = { +u8 common_texture_item_window_triple_red_shell[] = { #include "assets/item_window/common_texture_item_window_triple_red_shell.inc.c" }; -s8 common_texture_item_window_star[] = { +u8 common_texture_item_window_star[] = { #include "assets/item_window/common_texture_item_window_star.inc.c" }; -s8 common_texture_item_window_thunder_bolt[] = { +u8 common_texture_item_window_thunder_bolt[] = { #include "assets/item_window/common_texture_item_window_thunder_bolt.inc.c" }; -s8 common_texture_item_window_fake_item_box[] = { +u8 common_texture_item_window_fake_item_box[] = { #include "assets/item_window/common_texture_item_window_fake_item_box.inc.c" }; @@ -3039,49 +3039,49 @@ u8 common_tlut_lakitu_fishing[] = { }; // unused traffic light tlut -UNUSED s8 common_tlut_traffic_light[] = { +UNUSED u8 common_tlut_traffic_light[] = { #include "assets/unused_traffic_light/common_tlut_traffic_light.inc.c" }; // unused traffic light textures -UNUSED s8 common_texture_traffic_light_01[] = { +UNUSED u8 common_texture_traffic_light_01[] = { #include "assets/unused_traffic_light/common_texture_traffic_light_01.inc.c" }; -UNUSED s8 common_texture_traffic_light_02[] = { +UNUSED u8 common_texture_traffic_light_02[] = { #include "assets/unused_traffic_light/common_texture_traffic_light_02.inc.c" }; -UNUSED s8 common_texture_traffic_light_03[] = { +UNUSED u8 common_texture_traffic_light_03[] = { #include "assets/unused_traffic_light/common_texture_traffic_light_03.inc.c" }; -UNUSED s8 common_texture_traffic_light_04[] = { +UNUSED u8 common_texture_traffic_light_04[] = { #include "assets/unused_traffic_light/common_texture_traffic_light_04.inc.c" }; -UNUSED s8 common_texture_traffic_light_05[] = { +UNUSED u8 common_texture_traffic_light_05[] = { #include "assets/unused_traffic_light/common_texture_traffic_light_05.inc.c" }; -UNUSED s8 common_texture_traffic_light_06[] = { +UNUSED u8 common_texture_traffic_light_06[] = { #include "assets/unused_traffic_light/common_texture_traffic_light_06.inc.c" }; -UNUSED s8 common_texture_traffic_light_07[] = { +UNUSED u8 common_texture_traffic_light_07[] = { #include "assets/unused_traffic_light/common_texture_traffic_light_07.inc.c" }; -UNUSED s8 common_texture_traffic_light_08[] = { +UNUSED u8 common_texture_traffic_light_08[] = { #include "assets/unused_traffic_light/common_texture_traffic_light_08.inc.c" }; -UNUSED s8 common_texture_traffic_light_09[] = { +UNUSED u8 common_texture_traffic_light_09[] = { #include "assets/unused_traffic_light/common_texture_traffic_light_09.inc.c" }; -UNUSED s8 common_texture_traffic_light_10[] = { +UNUSED u8 common_texture_traffic_light_10[] = { #include "assets/unused_traffic_light/common_texture_traffic_light_10.inc.c" }; @@ -3091,7 +3091,7 @@ u8 common_texture_particle_leaf[] = { }; // leaf -UNUSED s8 common_texture_unused_particle_leaf[] = { +UNUSED u8 common_texture_unused_particle_leaf[] = { #include "textures/common/common_texture_unused_particle_leaf.rgba16.inc.c" }; @@ -3102,7 +3102,7 @@ u8 D_0D0293D8[] = { }; // Smoke? -s8 D_0D029458[] = { +u8 D_0D029458[] = { #include "textures/common/132B50_29458.i8.inc.c" }; @@ -3163,11 +3163,11 @@ u8 common_texture_particle_smoke[][1024] = { }; // minimap cars -s8 common_texture_minimap_finish_line[] = { +u8 common_texture_minimap_finish_line[] = { #include "assets/minimap_icons/common_texture_minimap_finish_line.inc.c" }; -s8 common_texture_minimap_kart_character[][128] = { +u8 common_texture_minimap_kart_character[][128] = { { // Mario #include "assets/minimap_icons/common_texture_minimap_kart_mario.inc.c" }, @@ -3194,6 +3194,6 @@ s8 common_texture_minimap_kart_character[][128] = { }, }; -s8 common_texture_minimap_progress_dot[] = { +u8 common_texture_minimap_progress_dot[] = { #include "assets/minimap_icons/common_texture_minimap_progress_dot.inc.c" }; diff --git a/src/debug/all_variables.h b/src/debug/all_variables.h index 4f01b72bc..5cbab34ac 100644 --- a/src/debug/all_variables.h +++ b/src/debug/all_variables.h @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/effects.c b/src/effects.c index 280d61105..85aa3d44f 100644 --- a/src/effects.c +++ b/src/effects.c @@ -11,7 +11,7 @@ #include "code_80005FD0.h" #include "render_player.h" #include "player_controller.h" -#include "hud_renderer.h" +#include "render_objects.h" #include "code_80057C60.h" #include "effects.h" #include "audio/external.h" @@ -1908,7 +1908,7 @@ void func_80090970(Player *player, s8 playerId, s8 arg2) { case 2: func_80090178(player, playerId, sp44, sp38); // Fakematch found by Verti, who knows what's going on here - player->rotation[1] = (u16) -get_angle_between_points(sp44, sp38) & 0xFFFF; + player->rotation[1] = (u16) -get_angle_between_two_vectors(sp44, sp38) & 0xFFFF; player->pos[0] = sp44[0]; player->pos[1] = sp44[1] + 40.0f; player->pos[2] = sp44[2]; diff --git a/src/ending/ceremony_and_credits.c b/src/ending/ceremony_and_credits.c index 2a80e20bb..05a4479d5 100644 --- a/src/ending/ceremony_and_credits.c +++ b/src/ending/ceremony_and_credits.c @@ -682,7 +682,7 @@ void play_sound_congratulation(UNUSED struct CinematicCamera *camera) { } /** - * Played in ceremony opening with ballons. + * Played in ceremony opening with balloons. */ void play_sound_balloon_pop(UNUSED struct CinematicCamera *camera) { play_sound2(SOUND_CEREMONY_BALLOON_POP); diff --git a/src/ending/code_80280000.c b/src/ending/code_80280000.c index d2053e62f..d3e7a1a8b 100644 --- a/src/ending/code_80280000.c +++ b/src/ending/code_80280000.c @@ -63,8 +63,8 @@ void func_80280038(void) { render_set_position(matrix, 0); render_course(D_800DC5EC); render_course_actors(D_800DC5EC); - func_80058090(0); - func_80058538(0); + render_object(PLAYER_ONE+SCREEN_MODE_1P); + render_player_snow_effect(PLAYER_ONE+SCREEN_MODE_1P); transition_sliding_borders(); func_80281C40(); init_rdp(); @@ -165,7 +165,7 @@ void load_credits(void) { camera->up[2] = 0.0f; init_cinematic_camera(); func_80003040(); - init_object_list(); + init_hud(); func_80093E60(); func_80092688(); if (D_800DC5EC) {} diff --git a/src/ending/code_80281780.c b/src/ending/code_80281780.c index 7cb2db881..f95eb767f 100644 --- a/src/ending/code_80281780.c +++ b/src/ending/code_80281780.c @@ -157,7 +157,7 @@ void load_ceremony_cutscene(void) { debug_switch_character_ceremony_cutscene(); func_802818BC(); func_8003D080(); - init_object_list(); + init_hud(); func_8001C05C(); balloons_and_fireworks_init(); func_802816B8(); diff --git a/src/ending/code_80281C40.c b/src/ending/code_80281C40.c index 19312c7ad..aa36464f1 100644 --- a/src/ending/code_80281C40.c +++ b/src/ending/code_80281C40.c @@ -6,13 +6,14 @@ #include "main.h" #include "math_util.h" #include "skybox_and_splitscreen.h" -#include "hud_renderer.h" +#include "render_objects.h" #include "code_80057C60.h" #include "code_80091750.h" #include "podium_ceremony_actors.h" #include "ceremony_and_credits.h" #include "podium_ceremony_actors.h" #include "render_player.h" +#include "defines.h" struct UnkStruct80287560 { s16 unk0; @@ -79,7 +80,7 @@ void func_80281D00(void) { render_players_on_screen_one(); gSPDisplayList(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_80284EE0)); update_actors_loop(); - func_80058090(0); + render_object(PLAYER_ONE+SCREEN_MODE_1P); func_80021B0C(); gSPDisplayList(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_80284EE0)); func_80093F10(); diff --git a/src/ending/podium_ceremony_actors.c b/src/ending/podium_ceremony_actors.c index ce0e879d4..9c6421eb1 100644 --- a/src/ending/podium_ceremony_actors.c +++ b/src/ending/podium_ceremony_actors.c @@ -9,7 +9,7 @@ #include "memory.h" #include "common_textures.h" #include "render_player.h" -#include "hud_renderer.h" +#include "render_objects.h" #include "podium_ceremony_actors.h" #include "camera_junk.h" #include "player_controller.h" @@ -471,7 +471,7 @@ void podium_ceremony_loop(void) { func_8005A070(); if (D_802874D8.unk1C != 0) { func_8001C14C(); - func_800097E0(); + update_vehicles(); } func_80281D00(); func_80281540(); diff --git a/src/ending/podium_ceremony_actors.h b/src/ending/podium_ceremony_actors.h index b21eb455e..85c3549e5 100644 --- a/src/ending/podium_ceremony_actors.h +++ b/src/ending/podium_ceremony_actors.h @@ -3,7 +3,7 @@ #include "common_structs.h" -enum ActorType { +enum CeremonyActorType { Initial, Balloon, FireworkCone, diff --git a/src/main.c b/src/main.c index 044e050a7..007944509 100644 --- a/src/main.c +++ b/src/main.c @@ -18,7 +18,7 @@ #include "profiler.h" #include "race_logic.h" #include "skybox_and_splitscreen.h" -#include "hud_renderer.h" +#include "render_objects.h" #include "effects.h" #include "code_80281780.h" #include "audio/external.h" @@ -612,7 +612,7 @@ void race_logic_loop(void) { sNumVBlanks = 0; profiler_log_thread5_time(LEVEL_SCRIPT_EXECUTE); D_8015F788 = 0; - func_802A59A4(); + render_player_one_1p_screen(); if (!gEnableDebugMode) { D_800DC514 = FALSE; } else { @@ -684,11 +684,11 @@ void race_logic_loop(void) { } D_8015F788 = 0; if (gPlayerWinningIndex == 0) { - func_802A5FAC(); - func_802A5CB4(); + render_player_two_2p_screen_vertical(); + render_player_one_2p_screen_vertical(); } else { - func_802A5CB4(); - func_802A5FAC(); + render_player_one_2p_screen_vertical(); + render_player_two_2p_screen_vertical(); } break; @@ -730,11 +730,11 @@ void race_logic_loop(void) { } D_8015F788 = 0; if (gPlayerWinningIndex == 0) { - func_802A65B8(); - func_802A62A4(); + render_player_two_2p_screen_horizontal(); + render_player_one_2p_screen_horizontal(); } else { - func_802A62A4(); - func_802A65B8(); + render_player_one_2p_screen_horizontal(); + render_player_two_2p_screen_horizontal(); } break; @@ -802,25 +802,25 @@ void race_logic_loop(void) { } D_8015F788 = 0; if (gPlayerWinningIndex == 0) { - func_802A6BB0(); - func_802A6E94(); - func_802A7178(); - func_802A68CC(); + render_player_two_3p_4p_screen(); + render_player_three_3p_4p_screen(); + render_player_four_3p_4p_screen(); + render_player_one_3p_4p_screen(); } else if (gPlayerWinningIndex == 1) { - func_802A68CC(); - func_802A6E94(); - func_802A7178(); - func_802A6BB0(); + render_player_one_3p_4p_screen(); + render_player_three_3p_4p_screen(); + render_player_four_3p_4p_screen(); + render_player_two_3p_4p_screen(); } else if (gPlayerWinningIndex == 2) { - func_802A68CC(); - func_802A6BB0(); - func_802A7178(); - func_802A6E94(); + render_player_one_3p_4p_screen(); + render_player_two_3p_4p_screen(); + render_player_four_3p_4p_screen(); + render_player_three_3p_4p_screen(); } else { - func_802A68CC(); - func_802A6BB0(); - func_802A6E94(); - func_802A7178(); + render_player_one_3p_4p_screen(); + render_player_two_3p_4p_screen(); + render_player_three_3p_4p_screen(); + render_player_four_3p_4p_screen(); } break; } diff --git a/src/math_util_2.c b/src/math_util_2.c index 314e9789c..1122b209c 100644 --- a/src/math_util_2.c +++ b/src/math_util_2.c @@ -400,8 +400,8 @@ f32 func_80041724(f32 x, f32 z, u16 angle) { return (coss(angle) * z) + (sinAngle * x); } -s32 func_80041770(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { - return atan2s(arg1 - arg0, arg3 - arg2); +s32 get_angle_between_xy(f32 x1, f32 x2, f32 y1, f32 y2) { + return atan2s(x2 - x1, y2 - y1); } u16 func_800417B4(u16 angle1, u16 angle2) { @@ -450,14 +450,14 @@ s32 func_80041924(Collision *arg0, Vec3f arg1) { return ret; } -s32 func_80041980(Vec3f arg0, Camera *arg1, u16 arg2) { +bool is_particle_on_screen(Vec3f arg0, Camera *arg1, u16 arg2) { u16 temp_t9; s32 ret; - ret = 0; - temp_t9 = (func_80041770(arg1->pos[0], arg0[0], arg1->pos[2], arg0[2]) + (arg2 / 2)) - arg1->rot[1]; + ret = FALSE; + temp_t9 = (get_angle_between_xy(arg1->pos[0], arg0[0], arg1->pos[2], arg0[2]) + (arg2 / 2)) - arg1->rot[1]; if ((temp_t9 >= 0) && (arg2 >= temp_t9)) { - ret = 1; + ret = TRUE; } return ret; } @@ -630,7 +630,7 @@ void func_80041D34(void) { } } -void func_80041EF4(void) { +void set_matrix_hud_screen(void) { gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxOrtho), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); } diff --git a/src/math_util_2.h b/src/math_util_2.h index 3dca9e629..725fa7627 100644 --- a/src/math_util_2.h +++ b/src/math_util_2.h @@ -54,12 +54,12 @@ Vec3f *vec3f_cross_product(Vec3f, Vec3f, Vec3f); s32 func_80041658(f32, f32); f32 func_800416D8(f32, f32, u16); f32 func_80041724(f32, f32, u16); -s32 func_80041770(f32, f32, f32, f32); +s32 get_angle_between_xy(f32, f32, f32, f32); u16 func_800417B4(u16, u16); s32 func_800418AC(f32, f32, Vec3f); s32 func_800418E8(f32, f32, Vec3f); s32 func_80041924(Collision*, Vec3f); -s32 func_80041980(Vec3f, Camera*, u16); +s32 is_particle_on_screen(Vec3f, Camera*, u16); void func_800419F8(void); void mtfx_translation_x_y(Mat4, s32, s32); void mtxf_u16_rotate_z(Mat4, u16); @@ -68,7 +68,7 @@ void mtxf_rotate_z_scale_x_y(Mat4, u16, f32); void mtxf_translation_x_y_rotate_z_scale_x_y(Mat4, s32, s32, u16, f32); void func_80041D24(void); void func_80041D34(void); -void func_80041EF4(void); +void set_matrix_hud_screen(void); void func_80042330(s32, s32, u16, f32); void mtxf_set_matrix_transformation(Mat4, Vec3f, Vec3su, f32); void mtxf_set_matrix_scale_transl(Mat4, Vec3f, Vec3f, f32); diff --git a/src/menus.c b/src/menus.c index 7f62f4433..79971632f 100644 --- a/src/menus.c +++ b/src/menus.c @@ -258,20 +258,20 @@ void options_menu_act(struct Controller *controller, u16 arg1) { sp2C = TRUE; sp38->unk8 = -1; } - if (sp2C && gSoundMode != sp38->unk4) { + if (sp2C && gSoundMode != sp38->cursor) { gSaveData.main.soundMode = gSoundMode; write_save_data_grand_prix_points_and_sound_mode(); update_save_data_backup(); - sp38->unk4 = gSoundMode; + sp38->cursor = gSoundMode; } if (btnAndStick & B_BUTTON) { func_8009E280(); play_sound2(SOUND_MENU_GO_BACK); - if (gSoundMode != sp38->unk4) { + if (gSoundMode != sp38->cursor) { gSaveData.main.soundMode = gSoundMode; write_save_data_grand_prix_points_and_sound_mode(); update_save_data_backup(); - sp38->unk4 = gSoundMode; + sp38->cursor = gSoundMode; } return; } @@ -305,7 +305,7 @@ void options_menu_act(struct Controller *controller, u16 arg1) { switch (sp2C) { case PFS_INVALID_DATA: D_8018EDEC = 0x46; - sp38->unk4 = 0; + sp38->cursor = 0; play_sound2(SOUND_MENU_SELECT); break; case PFS_NO_ERROR: @@ -486,7 +486,7 @@ void options_menu_act(struct Controller *controller, u16 arg1) { D_8018EDEC = 0x38; } else { D_8018EDEC = 0x3A; - sp38->unk4 = 0; + sp38->cursor = 0; } play_sound2(SOUND_MENU_SELECT); } @@ -540,7 +540,7 @@ void options_menu_act(struct Controller *controller, u16 arg1) { } else { D_8018EDEC = 0x3A; play_sound2(SOUND_MENU_SELECT); - sp38->unk4 = 0; + sp38->cursor = 0; } } // return? @@ -549,9 +549,9 @@ void options_menu_act(struct Controller *controller, u16 arg1) { case 0x3A: { if (arg1 == 0) { - sp38->unk4 += 1; + sp38->cursor += 1; } - if (sp38->unk4 >= 3) { + if (sp38->cursor >= 3) { D_8018EDEC = 0x3B; } break; @@ -584,9 +584,9 @@ void options_menu_act(struct Controller *controller, u16 arg1) { case 0x46: { if (arg1 == 0) { - sp38->unk4 += 1; + sp38->cursor += 1; } - if (sp38->unk4 >= 3) { + if (sp38->cursor >= 3) { D_8018EDEC = 0x47; } break; @@ -1986,12 +1986,12 @@ void func_800B44BC(void) { } // Likely checks that the user is actually in the menus and not racing. -s32 func_800B4520(void) { +bool func_800B4520(void) { if ((D_8018E7B0 == 2) || (D_8018E7B0 == 3) || (D_8018E7B0 == 4) || (D_8018E7B0 == 7)) { - return 1; + return TRUE; } - return 0; + return FALSE; } UNUSED void func_800B4560(s32 arg0, s32 arg1) { diff --git a/src/player_controller.c b/src/player_controller.c index d3695f48c..e13ded918 100644 --- a/src/player_controller.c +++ b/src/player_controller.c @@ -1696,7 +1696,7 @@ void func_8002B9CC(Player *player, s8 arg1, UNUSED s32 arg2) { func_8008C73C(player, arg1); } } - temp = (-(s16)get_angle_between_points(player->pos, &player->copy_rotation_x)); + temp = (-(s16)get_angle_between_two_vectors(player->pos, &player->copy_rotation_x)); temp2 = (player->rotation[1] - player->unk_0C0); temp = temp - temp2; player->unk_234 = temp / 182; @@ -1739,7 +1739,7 @@ void func_8002BB9C(Player *player, f32 *arg1, f32 *arg2, UNUSED s8 arg3, UNUSED mtxf_translate_vec3f_mat3(sp4C, sp64); - var_v0 = -(s16)get_angle_between_points(sp58, sp4C); + var_v0 = -(s16)get_angle_between_two_vectors(sp58, sp4C); t0 = player->rotation[1]; var_v0 = 0x10000 + (t0 - var_v0); var_v0 /= 182; @@ -2160,7 +2160,7 @@ void func_8002D028(Player *player, s8 arg1) { sp4C[1] = 0; sp4C[2] = D_80165230[D_80165270[arg1]]; - temp = -(s16)get_angle_between_points(player->pos, sp4C); + temp = -(s16)get_angle_between_two_vectors(player->pos, sp4C); temp2 = player->rotation[1]; temp = (temp - temp2); diff --git a/src/racing/actors.c b/src/racing/actors.c index 34b7d9240..a64022cf2 100644 --- a/src/racing/actors.c +++ b/src/racing/actors.c @@ -17,7 +17,7 @@ #include "waypoints.h" #include "macros.h" #include "code_80005FD0.h" -#include "code_80071F00.h" +#include "update_objects.h" #include "effects.h" #include "collision.h" #include "audio/external.h" @@ -33,7 +33,7 @@ u8 *D_802BA054; u8 *D_802BA058; -struct Actor *D_802BA05C; +struct Actor *gActorHotAirBalloonItemBox; s8 gTLUTRedShell[512]; // tlut 256 u16 D_802BA260; @@ -414,7 +414,7 @@ void func_8029794C(Vec3f arg0, Vec3s arg1, f32 arg2) { Mat4 sp20; arg0[1] += 2.0f; - func_802B5F74(sp20, arg0, arg1); + mtxf_pos_rotation_xyz(sp20, arg0, arg1); mtxf_scale(sp20, arg2); if (render_set_position(sp20, 0) != 0) { @@ -571,7 +571,7 @@ void update_actor_kiwano_fruit(struct KiwanoFruit *fruit) { } } -#include "actors/boat.inc.c" +#include "actors/paddle_boat/update.inc.c" #include "actors/train.inc.c" @@ -893,7 +893,7 @@ void func_80298D7C(Camera *camera, Mat4 arg1, UNUSED struct Actor *actor) { test &= 0xF; test = (s16)test; if (test == 6) { - func_802B5F74(sp90, spD4, sp88); + mtxf_pos_rotation_xyz(sp90, spD4, sp88); if (!(gMatrixObjectCount < MTX_OBJECT_POOL_SIZE)) { break; } render_set_position(sp90, 0); goto dummylabel; @@ -1302,12 +1302,12 @@ void render_actor_banana(Camera *camera, UNUSED Mat4 arg1, struct BananaActor *b func_802972B8(camera, (struct Actor *) banana); if (banana->state == 5) { - func_802B5F74(sp3C, banana->pos, banana->rot); + mtxf_pos_rotation_xyz(sp3C, banana->pos, banana->rot); } else { sp7C[0] = 0; sp7C[1] = 0; sp7C[2] = 0; - func_802B5F74(sp3C, banana->pos, sp7C); + mtxf_pos_rotation_xyz(sp3C, banana->pos, sp7C); } maxObjectsReached = render_set_position(sp3C, 0) == 0; @@ -1405,41 +1405,7 @@ UNUSED void func_8029AE14() { } -// This likely attaches the paddle wheel to the boat -void func_8029AE1C(Camera *arg0, struct PaddleWheelBoat *boat, UNUSED Mat4 arg2, u16 arg3) { - UNUSED s32 pad[3]; - Vec3f sp120; - Mat4 spE0; - Mat4 spA0; - Mat4 sp60; - f32 temp; - - if ((arg3 > 20) && (arg3 < 25)) { return; } - temp = is_within_render_distance(arg0->pos, boat->pos, arg0->rot[1], 90000.0f, gCameraZoom[arg0 - camera1], 9000000.0f); - - if (temp < 0.0f) { return; } - - gSPSetLights1(gDisplayListHead++, D_800DC610[1]); - gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_LIGHTING | G_SHADING_SMOOTH); - - func_802B5F74(spE0, boat->pos, boat->boatRot); - if (render_set_position(spE0, 1) != 0) { - - gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_E730); - gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_E058); - - mtxf_rotate_x(spE0, boat->wheelRot); - vec3f_set(sp120, 0, 16.0f, -255.0f); - mtxf_translate(spA0, sp120); - mtxf_multiplication(sp60, spE0, spA0); - if (render_set_position(sp60, 3) != 0) { - gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); - gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_FC28); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); - } - } -} +#include "actors/paddle_boat/render.inc.c" void func_8029B06C(Camera *arg0, struct Actor *arg1) { UNUSED s32 pad[6]; @@ -1451,7 +1417,7 @@ void func_8029B06C(Camera *arg0, struct Actor *arg1) { gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - func_802B5F74(spD8, arg1->pos, arg1->rot); + mtxf_pos_rotation_xyz(spD8, arg1->pos, arg1->rot); if (render_set_position(spD8, 0) != 0) { switch(arg1->state) { @@ -1495,7 +1461,7 @@ void func_8029B2E4(Camera *arg0, struct Actor *arg1) { gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - func_802B5F74(spC8, arg1->pos, arg1->rot); + mtxf_pos_rotation_xyz(spC8, arg1->pos, arg1->rot); if (render_set_position(spC8, 0) != 0) { if (gActiveScreenMode == SCREEN_MODE_1P) { @@ -1526,7 +1492,7 @@ void func_8029B4E0(Camera *arg0, struct Actor *arg1) { gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - func_802B5F74(spC8, arg1->pos, arg1->rot); + mtxf_pos_rotation_xyz(spC8, arg1->pos, arg1->rot); mtxf_scale(spC8, 0.1f); if (render_set_position(spC8, 0) != 0) { @@ -1558,7 +1524,7 @@ void func_8029B6EC(Camera *camera, struct Actor* arg1) { gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - func_802B5F74(spC8, arg1->pos, arg1->rot); + mtxf_pos_rotation_xyz(spC8, arg1->pos, arg1->rot); if (render_set_position(spC8, 0) != 0) { if (gActiveScreenMode == SCREEN_MODE_1P) { @@ -1580,7 +1546,7 @@ void func_8029B6EC(Camera *camera, struct Actor* arg1) { } // Spins train wheels? -void func_8029B8E8(Camera *camera, struct TrainCar *actor) { +void render_actor_train_engine(Camera *camera, struct TrainCar *actor) { UNUSED s32 pad[2]; s32 maxObjectsReached; Vec3f sp160; @@ -1594,7 +1560,7 @@ void func_8029B8E8(Camera *camera, struct TrainCar *actor) { gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - func_802B5F74(sp120, actor->pos, actor->rot); + mtxf_pos_rotation_xyz(sp120, actor->pos, actor->rot); maxObjectsReached = render_set_position(sp120, 0) == 0; if (maxObjectsReached) { return; } @@ -1706,7 +1672,7 @@ void func_8029B8E8(Camera *camera, struct TrainCar *actor) { gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); } -void func_8029BFB0(Camera *camera, struct TrainCar *actor) { +void render_actor_train_tender(Camera *camera, struct TrainCar *actor) { Mat4 sp120; Vec3f sp160; Mat4 spE0; @@ -1718,7 +1684,7 @@ void func_8029BFB0(Camera *camera, struct TrainCar *actor) { gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - func_802B5F74(sp120, actor->pos, actor->rot); + mtxf_pos_rotation_xyz(sp120, actor->pos, actor->rot); if (render_set_position(sp120, 0) == 0) { return; } if (temp_f0 < 250000.0f) { @@ -1776,7 +1742,7 @@ void func_8029BFB0(Camera *camera, struct TrainCar *actor) { gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); } -void func_8029C3CC(Camera *camera, struct TrainCar *actor) { +void render_actor_passenger_car(Camera *camera, struct TrainCar *actor) { Mat4 sp120; Vec3f sp160; Mat4 spE0; @@ -1788,7 +1754,7 @@ void func_8029C3CC(Camera *camera, struct TrainCar *actor) { gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - func_802B5F74(sp120, actor->pos, actor->rot); + mtxf_pos_rotation_xyz(sp120, actor->pos, actor->rot); if (render_set_position(sp120, 0) == 0) { return; } @@ -1915,14 +1881,14 @@ void render_actor_falling_rock(Camera *camera, struct FallingRock *rock) { sp98[1] = 0; sp98[2] = 0; sp8C[1] = temp_f0 + 2.0f; - func_802B5F74(sp4C, sp8C, sp98); + mtxf_pos_rotation_xyz(sp4C, sp8C, sp98); if (render_set_position(sp4C, 0) == 0) { return; } gSPDisplayList(gDisplayListHead++, d_course_choco_mountain_dl_6F88); } } - func_802B5F74(sp4C, rock->pos, rock->rot); + mtxf_pos_rotation_xyz(sp4C, rock->pos, rock->rot); if (render_set_position(sp4C, 0) == 0) { return; } @@ -2170,10 +2136,10 @@ void place_course_actors(void) { place_all_item_boxes(d_course_mario_raceway_item_box_spawns); vec3f_set(position, 150.0f, 40.0f, -1300.0f); position[0] *= gCourseDirection; - addActorToEmptySlot(position, rotation, velocity, ACTOR_MARIO_RACEWAY_SIGN); + addActorToEmptySlot(position, rotation, velocity, ACTOR_MARIO_SIGN); vec3f_set(position, 2520.0f, 0.0f, 1240.0f); position[0] *= gCourseDirection; - actor = &gActorList[addActorToEmptySlot(position, rotation, velocity, ACTOR_MARIO_RACEWAY_SIGN)]; + actor = &gActorList[addActorToEmptySlot(position, rotation, velocity, ACTOR_MARIO_SIGN)]; actor->flags |= 0x4000; break; case COURSE_CHOCO_MOUNTAIN: @@ -2252,13 +2218,13 @@ void place_course_actors(void) { place_all_item_boxes(d_course_wario_stadium_item_box_spawns); vec3f_set(position, -131.0f, 83.0f, 286.0f); position[0] *= gCourseDirection; - addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_STADIUM_SIGN); + addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN); vec3f_set(position, -2353.0f, 72.0f, -1608.0f); position[0] *= gCourseDirection; - addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_STADIUM_SIGN); + addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN); vec3f_set(position, -2622.0f, 79.0f, 739.0f); position[0] *= gCourseDirection; - addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_STADIUM_SIGN); + addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN); break; case COURSE_BLOCK_FORT: place_all_item_boxes(d_course_block_fort_item_box_spawns); @@ -2696,7 +2662,7 @@ s32 func_8029F2FC(Player *player, struct PiranhaPlant *plant) { return 0; } -s32 func_8029F408(Player *player, struct YoshiValleyEgg *egg) { +bool func_8029F408(Player *player, struct YoshiValleyEgg *egg) { UNUSED f32 pad[5]; f32 z_dist; f32 xz_dist; @@ -2708,31 +2674,36 @@ s32 func_8029F408(Player *player, struct YoshiValleyEgg *egg) { x_dist = egg->pos[0] - player->pos[0]; if ((x_dist < thing2) && (x_dist < -thing)) { - return 0; + return FALSE; } if (x_dist > thing) { - return 0; + return FALSE; } + z_dist = egg->pos[2] - player->pos[2]; if ((z_dist < thing2) && (z_dist < -thing)) { - return 0; + return FALSE; } if (z_dist > thing) { - return 0; + return FALSE; } + xz_dist = sqrtf((x_dist * x_dist) + (z_dist * z_dist)); if (xz_dist > thing) { - return 0; + return FALSE; } func_802977B0(player); + y_dist = player->pos[1] - egg->pos[1]; if (y_dist < thing2) { - return 0; + return FALSE; } + totalBox = player->boundingBoxSize + egg->boundingBoxSize; if (totalBox < xz_dist) { - return 0; + return FALSE; } + if ((player->type & PLAYER_HUMAN) != 0) { if ((player->effects & STAR_EFFECT) != 0) { egg->flags |= 0x400; @@ -2748,7 +2719,8 @@ s32 func_8029F408(Player *player, struct YoshiValleyEgg *egg) { } else { func_8008DABC(player, player - gPlayerOne); } - return 1; + + return TRUE; } s32 func_8029F69C(Player *player, struct Actor *actor) { @@ -2816,7 +2788,7 @@ s32 func_8029F69C(Player *player, struct Actor *actor) { sp20[1] = actor->pos[1]; sp20[2] = actor->pos[2]; if (((gCurrentCourseId == COURSE_MARIO_RACEWAY) || (gCurrentCourseId == COURSE_YOSHI_VALLEY) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY) || (gCurrentCourseId == COURSE_LUIGI_RACEWAY)) && (player->unk_094 > 1.0f)) { - func_80077AB0(sp20, 0); + spawn_leaf(sp20, 0); } if (xz_dist < 0.1f) { sqrtf((sp48 * sp48) + (sp44 * sp44)); @@ -3156,7 +3128,7 @@ void func_802A0450(Player *player, struct Actor *actor) { } break; case ACTOR_BANANA: - if (player->effects & 0x800008C0) { break; } + if (player->effects & (BOO_EFFECT | 0x8C0)) { break; } if (player->soundEffects & 1) { break; } temp_v1 = actor->rot[0]; if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (func_8029FB80(player, actor) != 1)) { break; } @@ -3227,7 +3199,7 @@ void func_802A0450(Player *player, struct Actor *actor) { func_8029F2FC(player, (struct PiranhaPlant *) actor); } break; - case ACTOR_MARIO_RACEWAY_SIGN: + case ACTOR_MARIO_SIGN: if (!(player->effects & BOO_EFFECT)) { func_8029F1F8(player, actor); } @@ -3498,21 +3470,21 @@ void update_actor_fake_item_box(struct FakeItemBox *fake_item_box) { } } -void func_802A14BC(f32 arg0, f32 arg1, f32 arg2) { - Vec3f sp34; - Vec3f sp28; - Vec3s sp20; - s16 temp_a0; +void func_802A14BC(f32 x, f32 y, f32 z) { + Vec3f pos; + Vec3f velocity; + Vec3s rot; + s16 id; if (gModeSelection == TIME_TRIALS) { return; } - vec3s_set(sp20, 0, 0, 0); - vec3f_set(sp28, 0, 0, 0); - sp34[0] = arg0; - sp34[1] = arg1; - sp34[2] = arg2; - temp_a0 = addActorToEmptySlot(sp34, sp20, sp28, 43); - D_802BA05C = &gActorList[temp_a0]; + vec3s_set(rot, 0, 0, 0); + vec3f_set(velocity, 0, 0, 0); + pos[0] = x; + pos[1] = y; + pos[2] = z; + id = addActorToEmptySlot(pos, rot, velocity, ACTOR_HOT_AIR_BALLOON_ITEM_BOX); + gActorHotAirBalloonItemBox = &gActorList[id]; } void update_actor_item_box_hot_air_balloon(struct ItemBox *itemBox) { @@ -3602,14 +3574,14 @@ void func_802A171C(Camera *camera, struct FakeItemBox *fakeItemBox) { someRot[0] = 0; someRot[1] = fakeItemBox->rot[1]; someRot[2] = 0; - func_802B5F74(someMatrix2, fakeItemBox->pos, someRot); + mtxf_pos_rotation_xyz(someMatrix2, fakeItemBox->pos, someRot); mtxf_scale(someMatrix2, fakeItemBox->sizeScaling); if (fakeItemBox->state != 2) { if (!render_set_position(someMatrix2, 0)) { return; } gSPDisplayList(gDisplayListHead++, common_model_fake_itembox); - func_802B5F74(someMatrix2, fakeItemBox->pos, fakeItemBox->rot); + mtxf_pos_rotation_xyz(someMatrix2, fakeItemBox->pos, fakeItemBox->rot); mtxf_scale(someMatrix2, fakeItemBox->sizeScaling); if (!render_set_position(someMatrix2, 0)) { return; } @@ -3634,7 +3606,7 @@ void func_802A171C(Camera *camera, struct FakeItemBox *fakeItemBox) { gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); gDPSetBlendMask(gDisplayListHead++, 0xFF); thing = fakeItemBox->someTimer; - func_802B5F74(someMatrix2, fakeItemBox->pos, fakeItemBox->rot); + mtxf_pos_rotation_xyz(someMatrix2, fakeItemBox->pos, fakeItemBox->rot); if (thing < 10.0f) { someMultiplier = 1.0f; } else { @@ -3736,28 +3708,28 @@ void func_802A1EA0(Camera *camera, struct ItemBox *item_box) { someVec2[0] = item_box->pos[0]; someVec2[1] = item_box->resetDistance + 2.0f; someVec2[2] = item_box->pos[2]; - func_802B5F74(someMatrix1, someVec2, someRot); + mtxf_pos_rotation_xyz(someMatrix1, someVec2, someRot); if (!render_set_position(someMatrix1, 0)) { return; } gSPDisplayList(gDisplayListHead++, D_0D002EE8); someRot[1] = item_box->rot[1] * 2; someVec2[1] = item_box->pos[1]; - func_802B5F74(someMatrix1, someVec2, someRot); + mtxf_pos_rotation_xyz(someMatrix1, someVec2, someRot); if (!render_set_position(someMatrix1, 0)) { return; } gSPDisplayList(gDisplayListHead++, itemBoxQuestionMarkModel); } if (item_box->state == 5) { - func_802B5F74(someMatrix1, item_box->pos, item_box->rot); + mtxf_pos_rotation_xyz(someMatrix1, item_box->pos, item_box->rot); if (!render_set_position(someMatrix1, 0)) { return; } gSPDisplayList(gDisplayListHead++, itemBoxQuestionMarkModel); } if (item_box->state != 3) { - func_802B5F74(someMatrix1, item_box->pos, item_box->rot); + mtxf_pos_rotation_xyz(someMatrix1, item_box->pos, item_box->rot); if (!render_set_position(someMatrix1, 0)) { return; } @@ -3782,7 +3754,7 @@ void func_802A1EA0(Camera *camera, struct ItemBox *item_box) { gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); gDPSetBlendMask(gDisplayListHead++, 0xFF); thing = item_box->someTimer; - func_802B5F74(someMatrix1, item_box->pos, item_box->rot); + mtxf_pos_rotation_xyz(someMatrix1, item_box->pos, item_box->rot); if (thing < 10.0f) { someMultiplier = 1.0f; } else { @@ -3858,7 +3830,7 @@ void func_802A1EA0(Camera *camera, struct ItemBox *item_box) { } } -void func_802A269C(Camera *arg0, struct Actor *arg1) { +void render_actor_wario_sign(Camera *arg0, struct Actor *arg1) { Mat4 sp38; f32 unk = is_within_render_distance(arg0->pos, arg1->pos, arg0->rot[1], 0, gCameraZoom[arg0 - camera1], 16000000.0f); @@ -3866,7 +3838,7 @@ void func_802A269C(Camera *arg0, struct Actor *arg1) { gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH); gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - func_802B5F74(sp38, arg1->pos, arg1->rot); + mtxf_pos_rotation_xyz(sp38, arg1->pos, arg1->rot); if (render_set_position(sp38, 0) != 0) { gSPDisplayList(gDisplayListHead++, d_course_wario_stadium_dl_sign); @@ -3902,7 +3874,7 @@ void func_802A27A0(Camera *arg0, Mat4 arg1, struct YoshiValleyEgg *egg, u16 arg3 sp5C[0] = 0; sp5C[1] = egg->eggRot; sp5C[2] = 0; - func_802B5F74(sp60, egg->pos, sp5C); + mtxf_pos_rotation_xyz(sp60, egg->pos, sp5C); if (render_set_position(sp60, 0) == 0) { return; } gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING); @@ -3919,7 +3891,7 @@ void func_802A27A0(Camera *arg0, Mat4 arg1, struct YoshiValleyEgg *egg, u16 arg3 } } -void func_802A29BC(Camera *arg0, UNUSED Mat4 arg1, struct Actor *arg2) { +void render_actor_mario_sign(Camera *arg0, UNUSED Mat4 arg1, struct Actor *arg2) { Mat4 sp40; f32 unk; s16 temp = arg2->flags; @@ -3930,7 +3902,7 @@ void func_802A29BC(Camera *arg0, UNUSED Mat4 arg1, struct Actor *arg2) { if (!(unk < 0.0f)) { gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH); gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - func_802B5F74(sp40, arg2->pos, arg2->rot); + mtxf_pos_rotation_xyz(sp40, arg2->pos, arg2->rot); if (render_set_position(sp40, 0) != 0) { gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_dl_sign); } @@ -3943,7 +3915,7 @@ void func_802A2AD0(Camera *arg0, struct RailroadCrossing *rr_crossing) { f32 unk = is_within_render_distance(arg0->pos, rr_crossing->pos, arg0->rot[1], 0.0f, gCameraZoom[arg0 - camera1], 4000000.0f); if (!(unk < 0.0f)) { - func_802B5F74(sp40, rr_crossing->pos, rr_crossing->rot); + mtxf_pos_rotation_xyz(sp40, rr_crossing->pos, rr_crossing->rot); if (render_set_position(sp40, 0) != 0) { gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING); @@ -3980,7 +3952,7 @@ void func_802A2C78(Camera *arg0, UNUSED Mat4 arg1, struct Actor *arg2) { if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { func_8029794C(arg2->pos, arg2->rot, 2.0f); } - func_802B5F74(sp68, arg2->pos, spA8); + mtxf_pos_rotation_xyz(sp68, arg2->pos, spA8); if (render_set_position(sp68, 0) != 0) { gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE); @@ -4014,7 +3986,7 @@ void func_802A2C78(Camera *arg0, UNUSED Mat4 arg1, struct Actor *arg2) { } void func_802A2F34(struct UnkStruct_800DC5EC *arg0) { - Camera *temp_s1 = arg0->camera; + Camera *camera = arg0->camera; struct Actor *actor; s32 i; D_8015F8DC = 0; @@ -4028,13 +4000,13 @@ void func_802A2F34(struct UnkStruct_800DC5EC *arg0) { switch(actor->type) { case ACTOR_FAKE_ITEM_BOX: - func_802A171C(temp_s1, (struct FakeItemBox *) actor); + func_802A171C(camera, (struct FakeItemBox *) actor); break; case ACTOR_ITEM_BOX: - func_802A1EA0(temp_s1, (struct ItemBox *) actor); + func_802A1EA0(camera, (struct ItemBox *) actor); break; case ACTOR_HOT_AIR_BALLOON_ITEM_BOX: - func_802A1EA0(temp_s1, (struct ItemBox *) actor); + func_802A1EA0(camera, (struct ItemBox *) actor); break; } } @@ -4138,13 +4110,13 @@ void render_course_actors(struct UnkStruct_800DC5EC *arg0) { render_actor_piranha_plant(camera, D_801502C0, (struct PiranhaPlant *) actor); break; case ACTOR_TRAIN_ENGINE: - func_8029B8E8(camera, (struct TrainCar *) actor); + render_actor_train_engine(camera, (struct TrainCar *) actor); break; case ACTOR_TRAIN_TENDER: - func_8029BFB0(camera, (struct TrainCar *) actor); + render_actor_train_tender(camera, (struct TrainCar *) actor); break; case ACTOR_TRAIN_PASSENGER_CAR: - func_8029C3CC(camera, (struct TrainCar *) actor); + render_actor_passenger_car(camera, (struct TrainCar *) actor); break; case ACTOR_COW: render_actor_cow(camera, D_801502C0, actor); @@ -4152,17 +4124,17 @@ void render_course_actors(struct UnkStruct_800DC5EC *arg0) { case 0x14: func_8029AC18(camera, D_801502C0, actor); break; - case ACTOR_MARIO_RACEWAY_SIGN: - func_802A29BC(camera, D_801502C0, actor); + case ACTOR_MARIO_SIGN: + render_actor_mario_sign(camera, D_801502C0, actor); break; - case ACTOR_WARIO_STADIUM_SIGN: - func_802A269C(camera, actor); + case ACTOR_WARIO_SIGN: + render_actor_wario_sign(camera, actor); break; case ACTOR_PALM_TREE: func_802A2C78(camera, D_801502C0, actor); break; - case ACTOR_PADDLE_WHEEL_BOAT: - func_8029AE1C(camera, (struct PaddleWheelBoat *) actor, D_801502C0, pathCounter); + case ACTOR_PADDLE_BOAT: + render_actor_paddle_boat(camera, (struct PaddleWheelBoat *) actor, D_801502C0, pathCounter); break; case ACTOR_BOX_TRUCK: func_8029B06C(camera, actor); @@ -4223,8 +4195,8 @@ void update_course_actors(void) { case ACTOR_BANANA: update_actor_banana((struct BananaActor *) actor); break; - case ACTOR_PADDLE_WHEEL_BOAT: - update_actor_paddle_wheel((struct PaddleWheelBoat *) actor); + case ACTOR_PADDLE_BOAT: + update_actor_paddle_boat((struct PaddleWheelBoat *) actor); break; case ACTOR_TRAIN_ENGINE: update_actor_train_engine((struct TrainCar *) actor); @@ -4256,10 +4228,10 @@ void update_course_actors(void) { case ACTOR_TRIPLE_RED_SHELL: update_actor_triple_shell((TripleShellParent *) actor, ACTOR_RED_SHELL); break; - case ACTOR_MARIO_RACEWAY_SIGN: + case ACTOR_MARIO_SIGN: update_actor_mario_raceway_sign(actor); break; - case ACTOR_WARIO_STADIUM_SIGN: + case ACTOR_WARIO_SIGN: update_actor_wario_stadium_sign(actor); break; case ACTOR_RAILROAD_CROSSING: diff --git a/src/racing/actors.h b/src/racing/actors.h index 746ded6e6..bc7eca7cb 100644 --- a/src/racing/actors.h +++ b/src/racing/actors.h @@ -21,7 +21,7 @@ void render_actor_cow(Camera*, Mat4, struct Actor*); void update_actor_yoshi_valley_egg(struct YoshiValleyEgg*); void update_actor_trees_cacti_shrubs(struct Actor*); void update_actor_kiwano_fruit(struct KiwanoFruit*); -void update_actor_paddle_wheel(struct PaddleWheelBoat*); +void update_actor_paddle_boat(struct PaddleWheelBoat*); void update_actor_train_engine(struct TrainCar*); void update_actor_train_car1(struct TrainCar*); void update_actor_train_car2(struct TrainCar*); @@ -53,14 +53,14 @@ void update_actor_wario_stadium_sign(struct Actor*); void update_actor_railroad_crossing(struct RailroadCrossing*); void update_actor_mario_raceway_sign(struct Actor*); void func_8029AC18(Camera*, Mat4, struct Actor*); -void func_8029AE1C(Camera*, struct PaddleWheelBoat*, Mat4, u16); +void render_actor_paddle_boat(Camera*, struct PaddleWheelBoat*, Mat4, u16); void func_8029B06C(Camera*, struct Actor*); void func_8029B2E4(Camera*, struct Actor*); void func_8029B4E0(Camera*, struct Actor*); void func_8029B6EC(Camera*, struct Actor*); -void func_8029B8E8(Camera*, struct TrainCar*); -void func_8029BFB0(Camera*, struct TrainCar*); -void func_8029C3CC(Camera*, struct TrainCar*); +void render_actor_train_engine(Camera*, struct TrainCar*); +void render_actor_train_tender(Camera*, struct TrainCar*); +void render_actor_passenger_car(Camera*, struct TrainCar*); void render_actor_falling_rock(Camera*, struct FallingRock*); void place_piranha_plants(struct ActorSpawnData*); void place_palm_trees(struct ActorSpawnData*); @@ -98,9 +98,9 @@ void update_actor_item_box_hot_air_balloon(struct ItemBox*); void update_actor_item_box(struct ItemBox*); void func_802A171C(Camera*, struct FakeItemBox*); void func_802A1EA0(Camera*, struct ItemBox*); -void func_802A269C(Camera*, struct Actor*); +void render_actor_wario_sign(Camera*, struct Actor*); void func_802A27A0(Camera*, Mat4, struct YoshiValleyEgg*, u16); -void func_802A29BC(Camera*, Mat4, struct Actor*); +void render_actor_mario_sign(Camera*, Mat4, struct Actor*); void func_802A2AD0(Camera*, struct RailroadCrossing*); void func_802A2C78(Camera*, Mat4, struct Actor*); void func_802A2F34(struct UnkStruct_800DC5EC*); @@ -114,7 +114,7 @@ extern void func_800C99E0(Vec3f, s32); extern u8 *D_802BA050; extern u8 *D_802BA054; extern u8 *D_802BA058; -extern struct Actor *D_802BA05C; +extern struct Actor *gActorHotAirBalloonItemBox; extern s8 gTLUTRedShell[]; // tlut 256 extern u16 D_802BA260; // Box Truck sub-type? @@ -124,7 +124,6 @@ extern s16 gCurrentCourseId; extern u16 isCrossingTriggeredByIndex[]; extern Lights1 D_800DC610[]; -extern s8 common_tlut_trees_import[]; extern Gfx D_0D005338[]; extern Gfx D_0D005368[]; extern Gfx D_0D007B20[]; diff --git a/src/racing/actors_extended.c b/src/racing/actors_extended.c index af5063bec..afc795e09 100644 --- a/src/racing/actors_extended.c +++ b/src/racing/actors_extended.c @@ -12,7 +12,7 @@ #include "actors.h" #include "actors_extended.h" #include "audio/external.h" -#include "code_80071F00.h" +#include "update_objects.h" #include "effects.h" #include "sounds.h" diff --git a/src/racing/math_util.c b/src/racing/math_util.c index d28aade3f..c4b6e3169 100644 --- a/src/racing/math_util.c +++ b/src/racing/math_util.c @@ -78,7 +78,7 @@ f32 func_802B51E8(Vec3f arg0, Vec3f arg1) { return (sub_x * sub_x) + (sub_y * sub_y) + sub_z + sub_z; } -s32 get_angle_between_points(Vec3f arg0, Vec3f arg1) { +s32 get_angle_between_two_vectors(Vec3f arg0, Vec3f arg1) { f32 temp_v1; f32 temp_v2; temp_v1 = arg1[0] - arg0[0]; @@ -87,7 +87,7 @@ s32 get_angle_between_points(Vec3f arg0, Vec3f arg1) { return atan2s(temp_v1, temp_v2); } -// get_angle_between_points +// get_angle_between_two_vectors u32 func_802B5258(Vec3f arg0, Vec3s arg1) { f32 temp_v1; f32 temp_v2; @@ -483,7 +483,7 @@ void mtxf_scale(Mat4 mat, f32 coef) { } // look like create a translation and rotation matrix with arg1 position and arg2 rotation -void func_802B5F74(Mat4 arg0, Vec3f arg1, Vec3s arg2) { +void mtxf_pos_rotation_xyz(Mat4 out, Vec3f pos, Vec3s orientation) { f32 sine1; f32 cosine1; f32 sine2; @@ -491,28 +491,28 @@ void func_802B5F74(Mat4 arg0, Vec3f arg1, Vec3s arg2) { f32 sine3; f32 cosine3; - sine1 = sins(arg2[0]); - cosine1 = coss(arg2[0]); - sine2 = sins(arg2[1]); - cosine2 = coss(arg2[1]); - sine3 = sins(arg2[2]); - cosine3 = coss(arg2[2]); - arg0[0][0] = (cosine2 * cosine3) + ((sine1 * sine2) * sine3); - arg0[1][0] = (-cosine2 * sine3) + ((sine1 * sine2) * cosine3); - arg0[2][0] = cosine1 * sine2; - arg0[3][0] = arg1[0]; - arg0[0][1] = cosine1 * sine3; - arg0[1][1] = cosine1 * cosine3; - arg0[2][1] = -sine1; - arg0[3][1] = arg1[1]; - arg0[0][2] = (-sine2 * cosine3) + ((sine1 * cosine2) * sine3); - arg0[1][2] = (sine2 * sine3) + ((sine1 * cosine2) * cosine3); - arg0[2][2] = cosine1 * cosine2; - arg0[3][2] = arg1[2]; - arg0[0][3] = 0.0f; - arg0[1][3] = 0.0f; - arg0[2][3] = 0.0f; - arg0[3][3] = 1.0f; + sine1 = sins(orientation[0]); + cosine1 = coss(orientation[0]); + sine2 = sins(orientation[1]); + cosine2 = coss(orientation[1]); + sine3 = sins(orientation[2]); + cosine3 = coss(orientation[2]); + out[0][0] = (cosine2 * cosine3) + ((sine1 * sine2) * sine3); + out[1][0] = (-cosine2 * sine3) + ((sine1 * sine2) * cosine3); + out[2][0] = cosine1 * sine2; + out[3][0] = pos[0]; + out[0][1] = cosine1 * sine3; + out[1][1] = cosine1 * cosine3; + out[2][1] = -sine1; + out[3][1] = pos[1]; + out[0][2] = (-sine2 * cosine3) + ((sine1 * cosine2) * sine3); + out[1][2] = (sine2 * sine3) + ((sine1 * cosine2) * cosine3); + out[2][2] = cosine1 * cosine2; + out[3][2] = pos[2]; + out[0][3] = 0.0f; + out[1][3] = 0.0f; + out[2][3] = 0.0f; + out[3][3] = 1.0f; } UNUSED void func_802B60B4(Mat4 arg0, Vec3s arg1, Vec3s arg2) { @@ -1143,7 +1143,7 @@ f32 is_within_render_distance(Vec3f cameraPos, Vec3f objectPos, u16 orientationY return -1.0f; } - angleObject = get_angle_between_points(cameraPos, objectPos); + angleObject = get_angle_between_two_vectors(cameraPos, objectPos); minus_fov_angle = (orientationY - extended_fov); plus_fov_angle = (orientationY + extended_fov); diff --git a/src/racing/math_util.h b/src/racing/math_util.h index cdc27d5ad..06f76fc7d 100644 --- a/src/racing/math_util.h +++ b/src/racing/math_util.h @@ -19,7 +19,7 @@ double fabs(double x); s32 func_802B4F60(s32, Vec3f, s32, f32, f32); s32 render_set_position(Mat4, s32); f32 func_802B51E8(Vec3f, Vec3f); -s32 get_angle_between_points(Vec3f, Vec3f); +s32 get_angle_between_two_vectors(Vec3f, Vec3f); u32 func_802B5258(Vec3f, Vec3s); void vec3f_set(Vec3f, f32, f32, f32); void vec3s_set(Vec3s, s16, s16, s16); @@ -40,7 +40,7 @@ void func_802B5CAC(s16, s16, Vec3f); void func_802B5D30(s16, s16, s32); void func_802B5D64(uintptr_t, s16, s16, s32); void mtxf_scale(Mat4, f32); -void func_802B5F74(Mat4, Vec3f, Vec3s); +void mtxf_pos_rotation_xyz(Mat4, Vec3f, Vec3s); void mtxf_translate_vec3f_mat3(Vec3f, Mat3); void mtxf_translate_vec3f_mat4(Vec3f, Mat4); void func_802B64C4(Vec3f, s16); diff --git a/src/racing/race_logic.c b/src/racing/race_logic.c index 1363ea806..c7d1fa35b 100644 --- a/src/racing/race_logic.c +++ b/src/racing/race_logic.c @@ -11,7 +11,7 @@ #include "main.h" #include "code_800029B0.h" #include "code_80057C60.h" -#include "code_80071F00.h" +#include "update_objects.h" #include "code_80091750.h" #include "code_80005FD0.h" #include "spawn_players.h" @@ -670,7 +670,7 @@ void func_8028F474(void) { } case 1: case 2: - func_800097E0(); + update_vehicles(); break; } } diff --git a/src/racing/render_courses.c b/src/racing/render_courses.c index b0036359c..35781e821 100644 --- a/src/racing/render_courses.c +++ b/src/racing/render_courses.c @@ -199,7 +199,7 @@ void func_802911C4(void) { } } -void func_8029122C(struct UnkStruct_800DC5EC *arg0, s32 arg1) { +void func_8029122C(struct UnkStruct_800DC5EC *arg0, s32 playerId) { UNUSED s32 pad; Player *player = arg0->player; Mat4 matrix; @@ -212,22 +212,22 @@ void func_8029122C(struct UnkStruct_800DC5EC *arg0, s32 arg1) { pathCounter = (u16) arg0->pathCounter; cameraRot = (u16) arg0->camera->rot[1]; playerDirection = arg0->playerDirection; - switch (arg1) { - case 0: - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[0]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[0]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + switch (playerId) { + case PLAYER_ONE: + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[PLAYER_ONE]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[PLAYER_ONE]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); break; - case 1: - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[1]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + case PLAYER_TWO: + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[PLAYER_TWO]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[PLAYER_TWO]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); break; - case 2: - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[2]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[2]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + case PLAYER_THREE: + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[PLAYER_THREE]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[PLAYER_THREE]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); break; - case 3: - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[3]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[3]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); + case PLAYER_FOUR: + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPersp[PLAYER_FOUR]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxLookAt[PLAYER_FOUR]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); break; } mtxf_identity(matrix); diff --git a/src/racing/skybox_and_splitscreen.c b/src/racing/skybox_and_splitscreen.c index bdd56833a..d48899662 100644 --- a/src/racing/skybox_and_splitscreen.c +++ b/src/racing/skybox_and_splitscreen.c @@ -766,7 +766,7 @@ void func_802A5760(void) { } } -void func_802A59A4(void) { +void render_player_one_1p_screen(void) { Camera *camera = &cameras[0]; UNUSED s32 pad[4]; u16 perspNorm; @@ -810,23 +810,23 @@ void func_802A59A4(void) { render_set_position(matrix, 0); } render_course_actors(D_800DC5EC); - func_80058090(0); + render_object(RENDER_SCREEN_MODE_1P_PLAYER_ONE); render_players_on_screen_one(); - func_8029122C(D_800DC5EC, 0); + func_8029122C(D_800DC5EC, PLAYER_ONE); func_80021B0C(); func_802A2F34(D_800DC5EC); - func_80058538(0); + render_player_snow_effect(RENDER_SCREEN_MODE_1P_PLAYER_ONE); func_80058BF4(); if (D_800DC5B8 != 0) { - func_80058C20(0); + func_80058C20(RENDER_SCREEN_MODE_1P_PLAYER_ONE); } - func_80093A5C(0); + func_80093A5C(RENDER_SCREEN_MODE_1P_PLAYER_ONE); if (D_800DC5B8 != 0) { - func_80058DB4(0); + render_hud(RENDER_SCREEN_MODE_1P_PLAYER_ONE); } } -void func_802A5CB4(void) { +void render_player_one_2p_screen_vertical(void) { Camera *camera = &cameras[0]; UNUSED s32 pad[2]; u16 perspNorm; @@ -866,24 +866,24 @@ void func_802A5CB4(void) { render_set_position(matrix, 0); } render_course_actors(D_800DC5EC); - func_80058090(1); + render_object(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE); render_players_on_screen_one(); - func_8029122C(D_800DC5EC, 0); + func_8029122C(D_800DC5EC, PLAYER_ONE); func_80021B0C(); func_802A2F34(D_800DC5EC); - func_80058538(1); + render_player_snow_effect(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE); func_80058BF4(); if (D_800DC5B8 != 0) { - func_80058C20(1); + func_80058C20(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE); } - func_80093A5C(1); + func_80093A5C(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE); if (D_800DC5B8 != 0) { - func_80058DB4(1); + render_hud(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE); } D_8015F788 += 1; } -void func_802A5FAC(void) { +void render_player_two_2p_screen_vertical(void) { Camera *camera = &cameras[1]; UNUSED s32 pad[2]; u16 perspNorm; @@ -920,24 +920,24 @@ void func_802A5FAC(void) { render_set_position(matrix, 0); } render_course_actors(D_800DC5F0); - func_80058090(2); + render_object(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO); render_players_on_screen_two(); - func_8029122C(D_800DC5F0, 1); + func_8029122C(D_800DC5F0, PLAYER_TWO); func_80021C78(); func_802A2F34(D_800DC5F0); func_80058BF4(); - func_80058538(2); + render_player_snow_effect(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO); if (D_800DC5B8 != 0) { - func_80058C20(2); + func_80058C20(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO); } - func_80093A5C(2); + func_80093A5C(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO); if (D_800DC5B8 != 0) { - func_80058DB4(2); + render_hud(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO); } D_8015F788 += 1; } -void func_802A62A4(void) { +void render_player_one_2p_screen_horizontal(void) { Camera *camera = &cameras[0]; UNUSED s32 pad[2]; u16 perspNorm; @@ -978,24 +978,24 @@ void func_802A62A4(void) { render_set_position(matrix, 0); } render_course_actors(D_800DC5EC); - func_80058090(3); + render_object(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE); render_players_on_screen_one(); - func_8029122C(D_800DC5EC, 0); + func_8029122C(D_800DC5EC, PLAYER_ONE); func_80021B0C(); func_802A2F34(D_800DC5EC); - func_80058538(3); + render_player_snow_effect(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE); func_80058BF4(); if (D_800DC5B8 != 0) { - func_80058C20(3); + func_80058C20(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE); } - func_80093A5C(3); + func_80093A5C(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE); if (D_800DC5B8 != 0) { - func_80058DB4(3); + render_hud(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE); } D_8015F788 += 1; } -void func_802A65B8(void) { +void render_player_two_2p_screen_horizontal(void) { Camera *camera = &cameras[1]; UNUSED s32 pad[2]; u16 perspNorm; @@ -1035,24 +1035,24 @@ void func_802A65B8(void) { render_set_position(matrix, 0); } render_course_actors(D_800DC5F0); - func_80058090(4); + render_object(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO); render_players_on_screen_two(); - func_8029122C(D_800DC5F0, 1); + func_8029122C(D_800DC5F0, PLAYER_TWO); func_80021C78(); func_802A2F34(D_800DC5F0); - func_80058538(4); + render_player_snow_effect(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO); func_80058BF4(); if (D_800DC5B8 != 0) { - func_80058C20(4); + func_80058C20(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO); } - func_80093A5C(4); + func_80093A5C(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO); if (D_800DC5B8 != 0) { - func_80058DB4(4); + render_hud(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO); } D_8015F788 += 1; } -void func_802A68CC(void) { +void render_player_one_3p_4p_screen(void) { Camera *camera = camera1; UNUSED s32 pad[2]; u16 perspNorm; @@ -1089,24 +1089,24 @@ void func_802A68CC(void) { render_set_position(matrix, 0); } render_course_actors(D_800DC5EC); - func_80058090(8); + render_object(RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE); render_players_on_screen_one(); - func_8029122C(D_800DC5EC, 0); + func_8029122C(D_800DC5EC, PLAYER_ONE); func_80021B0C(); func_802A2F34(D_800DC5EC); - func_80058538(8); + render_player_snow_effect(RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE); func_80058BF4(); if (D_800DC5B8 != 0) { - func_80058C20(8); + func_80058C20(RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE); } - func_80093A5C(8); + func_80093A5C(RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE); if (D_800DC5B8 != 0) { - func_80058DB4(8); + render_hud(RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE); } D_8015F788 += 1; } -void func_802A6BB0(void) { +void render_player_two_3p_4p_screen(void) { Camera *camera = camera2; UNUSED s32 pad[2]; u16 perspNorm; @@ -1143,24 +1143,24 @@ void func_802A6BB0(void) { render_set_position(matrix, 0); } render_course_actors(D_800DC5F0); - func_80058090(9); + render_object(RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO); render_players_on_screen_two(); - func_8029122C(D_800DC5F0, 1); + func_8029122C(D_800DC5F0, PLAYER_TWO); func_80021C78(); func_802A2F34(D_800DC5F0); - func_80058538(9); + render_player_snow_effect(RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO); func_80058BF4(); if (D_800DC5B8 != 0) { - func_80058C20(9); + func_80058C20(RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO); } - func_80093A5C(9); + func_80093A5C(RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO); if (D_800DC5B8 != 0) { - func_80058DB4(9); + render_hud(RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO); } D_8015F788 += 1; } -void func_802A6E94(void) { +void render_player_three_3p_4p_screen(void) { Camera *camera = camera3; UNUSED s32 pad[2]; u16 perspNorm; @@ -1198,24 +1198,24 @@ void func_802A6E94(void) { render_set_position(matrix, 0); } render_course_actors(D_800DC5F4); - func_80058090(10); + render_object(RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE); render_players_on_screen_three(); - func_8029122C(D_800DC5F4, 2); + func_8029122C(D_800DC5F4, PLAYER_THREE); func_80021D40(); func_802A2F34(D_800DC5F4); - func_80058538(10); + render_player_snow_effect(RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE); func_80058BF4(); if (D_800DC5B8 != 0) { - func_80058C20(10); + func_80058C20(RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE); } - func_80093A5C(10); + func_80093A5C(RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE); if (D_800DC5B8 != 0) { - func_80058DB4(10); + render_hud(RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE); } D_8015F788 += 1; } -void func_802A7178(void) { +void render_player_four_3p_4p_screen(void) { Camera *camera = camera4; UNUSED s32 pad[2]; u16 perspNorm; @@ -1227,9 +1227,9 @@ void func_802A7178(void) { func_802A5760(); if (gPlayerCountSelection1 == 3) { - func_80093A5C(11); + func_80093A5C(RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR); if (D_800DC5B8 != 0) { - func_80058DB4(11); + render_hud(RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR); } D_8015F788 += 1; return; @@ -1261,19 +1261,19 @@ void func_802A7178(void) { render_set_position(matrix, 0); } render_course_actors(D_800DC5F8); - func_80058090(11); + render_object(RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR); render_players_on_screen_four(); - func_8029122C(D_800DC5F8, 3); + func_8029122C(D_800DC5F8, PLAYER_FOUR); func_80021DA8(); func_802A2F34(D_800DC5F8); - func_80058538(11); + render_player_snow_effect(RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR); func_80058BF4(); if (D_800DC5B8 != 0) { - func_80058C20(11); + func_80058C20(RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR); } - func_80093A5C(0xB); + func_80093A5C(RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR); if (D_800DC5B8 != 0) { - func_80058DB4(11); + render_hud(RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR); } D_8015F788 += 1; } diff --git a/src/racing/skybox_and_splitscreen.h b/src/racing/skybox_and_splitscreen.h index c3faffc11..ec2d7d8b3 100644 --- a/src/racing/skybox_and_splitscreen.h +++ b/src/racing/skybox_and_splitscreen.h @@ -40,15 +40,15 @@ void func_802A54A8(void); void func_802A5590(void); void func_802A5678(void); void func_802A5760(void); -void func_802A59A4(void); -void func_802A5CB4(void); -void func_802A5FAC(void); -void func_802A62A4(void); -void func_802A65B8(void); -void func_802A68CC(void); -void func_802A6BB0(void); -void func_802A6E94(void); -void func_802A7178(void); +void render_player_one_1p_screen(void); +void render_player_one_2p_screen_vertical(void); +void render_player_two_2p_screen_vertical(void); +void render_player_one_2p_screen_horizontal(void); +void render_player_two_2p_screen_horizontal(void); +void render_player_one_3p_4p_screen(void); +void render_player_two_3p_4p_screen(void); +void render_player_three_3p_4p_screen(void); +void render_player_four_3p_4p_screen(void); void func_802A74BC(void); void copy_framebuffer(s32, s32, s32, s32, u16*, u16*); void func_802A7728(void); diff --git a/src/hud_renderer.c b/src/render_objects.c similarity index 88% rename from src/hud_renderer.c rename to src/render_objects.c index 021ab3792..8696dc912 100644 --- a/src/hud_renderer.c +++ b/src/render_objects.c @@ -1,5 +1,5 @@ /** - * @file hud_renderer.c renders hud elements + * @file render_objects.c renders hud elements * A more suitable name may be print.c **/ @@ -22,8 +22,8 @@ #include "code_80005FD0.h" #include "code_80057C60.h" #include "code_8006E9C0.h" -#include "hud_renderer.h" -#include "code_80071F00.h" +#include "render_objects.h" +#include "update_objects.h" #include "code_80091750.h" #include "collision.h" #include "main.h" @@ -167,56 +167,56 @@ s32 func_80043A54(s32 arg0) { return phi_v1; } -void func_80043A84(u8 *texture, s32 width, s32 height) { +void load_texture_block_rgba32_nomirror(u8 *texture, s32 width, s32 height) { gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, height, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } -void func_80043C28(u8 *texture, s32 width, s32 height) { +void load_texture_tile_rgba32_nomirror(u8 *texture, s32 width, s32 height) { gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, height, 0, 0, width - 1, height - 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } -void func_80043D50(u8 *texture, s32 width, s32 height) { +void load_texture_block_rgba16_mirror(u8 *texture, s32 width, s32 height) { gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } -void func_80043EF8(u8 *texture, s32 width, s32 height, s32 someMask) { +void load_texture_block_rgba16_nomirror(u8 *texture, s32 width, s32 height, s32 someMask) { gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, someMask, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } -void func_800440B8(u8 *texture, s32 width, s32 height) { +void load_texture_tile_rgba16_nomirror(u8 *texture, s32 width, s32 height) { gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, 0, width - 1, height - 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } -void func_800441E0(u8 *texture, s32 width, s32 height) { +void load_texture_block_ia16_nomirror(u8 *texture, s32 width, s32 height) { gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } -void func_80044388(u8 *texture, s32 width, s32 height) { +void load_texture_tile_ia16_nomirror(u8 *texture, s32 width, s32 height) { gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0, 0, width - 1, height - 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } -void func_800444B0(u8 *texture, s32 width, s32 height) { +void load_texture_block_ia8_nomirror(u8 *texture, s32 width, s32 height) { gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } -void func_80044658(u8 *texture, s32 width, s32 height) { +void load_texture_tile_ia8_nomirror(u8 *texture, s32 width, s32 height) { gDPLoadTextureTile(gDisplayListHead++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, 0, width - 1, height - 1, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } -void func_8004477C(u8 *texture, s32 width, s32 height) { +void load_texture_block_i8_nomirror(u8 *texture, s32 width, s32 height) { gDPLoadTextureBlock(gDisplayListHead++, texture, G_IM_FMT_I, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } @@ -352,7 +352,7 @@ void func_80045D0C(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height) { u8 *img = texture; for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { - func_80043D50(img, width, height); + load_texture_block_rgba16_mirror(img, width, height); func_80045B2C(&arg1[vertexIndex]); img += width * height * 2; vertexIndex += 4; @@ -366,7 +366,7 @@ void func_80045E10(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height) { u8 *img = texture; for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { - func_80043D50(img, width, height); + load_texture_block_rgba16_mirror(img, width, height); func_80045B2C(&arg1[vertexIndex]); img += width * (height - 1) * 2; vertexIndex += 4; @@ -380,7 +380,7 @@ void func_80045F18(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height, s32 u8 *img = texture; for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { - func_80043EF8(img, width, height, someMask); + load_texture_block_rgba16_nomirror(img, width, height, someMask); func_80045B2C(&arg1[vertexIndex]); img += width * (height - 1) * 2; vertexIndex += 4; @@ -419,7 +419,7 @@ void func_800461A4(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height) { u8 *img = texture; for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { - func_80043A84(img, width, height); + load_texture_block_rgba32_nomirror(img, width, height); func_80045B2C(&arg1[vertexIndex]); img += width * height * 4; vertexIndex += 4; @@ -433,7 +433,7 @@ void func_800462A8(u8 *texture, Vtx *arg1, s32 width, s32 arg3, s32 height) { u8 *img = texture; for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { - func_80043A84(img, width, height); + load_texture_block_rgba32_nomirror(img, width, height); func_80045B2C(&arg1[vertexIndex]); img += width * (height - 1) * 4; vertexIndex += 4; @@ -483,7 +483,7 @@ UNUSED void func_80046634(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 * void func_800466B0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *texture, Vtx* arg5, s32 arg6, s32 arg7) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007948); - func_80043D50(texture, arg6, arg7); + load_texture_block_rgba16_mirror(texture, arg6, arg7); func_80045B74(arg5); } @@ -528,7 +528,7 @@ UNUSED void func_80046954(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *a void func_80046A00(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *texture, Vtx *arg4, s32 arg5, s32 arg6) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007948); - func_80043D50(texture, arg5, arg6); + load_texture_block_rgba16_mirror(texture, arg5, arg6); func_80045B74(arg4); } @@ -578,7 +578,7 @@ UNUSED void func_80046DF4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, u8 * func_800465B8(arg0, arg1, arg2, arg3, arg4, texture, D_0D0060B0, 64, 64, 64, 32); } -void func_80046E60(u8 *tlut, u8 *texture, s32 width, s32 height) { +void load_texture_and_tlut(u8 *tlut, u8 *texture, s32 width, s32 height) { gSPDisplayList(gDisplayListHead++, D_0D007D78); gDPLoadTLUT_pal256(gDisplayListHead++, tlut); rsp_load_texture(texture, width, height); @@ -755,7 +755,7 @@ UNUSED void func_80048038(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *textu func_80047068(tlut, texture, arg5, arg6, arg7, arg8, arg9); } -void func_800480B4(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +void draw_2d_texture_at(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { rsp_set_matrix_transformation(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007D78); draw_rectangle_texture_overlap(tlut, texture, arg5, arg6, arg7, arg8, arg9); @@ -891,7 +891,7 @@ UNUSED void func_80048BE8(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *textu } UNUSED void func_80048C3C(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5) { - func_800480B4(arg0, arg1, arg2, tlut, texture, arg5, 64, 64, 64, 32); + draw_2d_texture_at(arg0, arg1, arg2, tlut, texture, arg5, 64, 64, 64, 32); } UNUSED void func_80048C90(Vec3f arg0, Vec3su arg1, f32 arg2, s32 arg3, u8 *tlut, u8 *texture, Vtx *arg6) { @@ -923,7 +923,7 @@ UNUSED void func_80048ED0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, u8 *tlut, u8 * } UNUSED void func_80048F38(Vec3f arg0, Vec3su arg1, f32 arg2, u8 *tlut, u8 *texture, Vtx *arg5) { - func_800480B4(arg0, arg1, arg2, tlut, texture, arg5, 72, 48, 72, 24); + draw_2d_texture_at(arg0, arg1, arg2, tlut, texture, arg5, 72, 48, 72, 24); } void func_80048F8C(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 height) { @@ -934,7 +934,7 @@ void func_80048F8C(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 he for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { for (widthIndex = 0; widthIndex < arg2 / width; widthIndex++) { - func_800441E0(img, width, height); + load_texture_block_ia16_nomirror(img, width, height); gSPVertex(gDisplayListHead++, &arg1[vertexIndex], 4, 0); gSPDisplayList(gDisplayListHead++, common_rectangle_display); img += width * height * 2; @@ -952,7 +952,7 @@ void func_80049130(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 he for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { for (widthIndex = 0; widthIndex < arg2 / width; widthIndex++) { - func_80044388(img, width, height); + load_texture_tile_ia16_nomirror(img, width, height); gSPVertex(gDisplayListHead++, &arg1[vertexIndex], 4, 0); gSPDisplayList(gDisplayListHead++, common_rectangle_display); img += width * height * 2; @@ -970,7 +970,7 @@ void func_800492D4(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 he for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { for (widthIndex = 0; widthIndex < arg2 / width; widthIndex++) { - func_800444B0(img, width, height); + load_texture_block_ia8_nomirror(img, width, height); gSPVertex(gDisplayListHead++, &arg1[vertexIndex], 4, 0); gSPDisplayList(gDisplayListHead++, common_rectangle_display); img += width * height; @@ -988,7 +988,7 @@ void func_80049478(u8 *texture, Vtx *arg1, s32 arg2, s32 arg3, s32 width, s32 he for (heightIndex = 0; heightIndex < arg3 / height; heightIndex++) { for (widthIndex = 0; widthIndex < arg2 / width; widthIndex++) { - func_80044658(img, width, height); + load_texture_tile_ia8_nomirror(img, width, height); gSPVertex(gDisplayListHead++, &arg1[vertexIndex], 4, 0); gSPDisplayList(gDisplayListHead++, common_rectangle_display); img += width * height; @@ -1204,7 +1204,7 @@ void func_8004A630(Collision *arg0, Vec3f arg1, f32 arg2) { void func_8004A6EC(s32 objectIndex, f32 scale) { Objects *temp_v0; - if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00000020) != 0) && (is_obj_index_flag_unk_054_active(objectIndex, 0x00800000) != 0)) { + if ((is_obj_flag_status_active(objectIndex, 0x00000020) != 0) && (is_obj_flag_status_active(objectIndex, 0x00800000) != 0)) { temp_v0 = &gObjectList[objectIndex]; D_80183E50[0] = temp_v0->pos[0]; D_80183E50[1] = temp_v0->unk_044 + 0.8; @@ -1217,7 +1217,7 @@ void func_8004A6EC(s32 objectIndex, f32 scale) { void func_8004A7AC(s32 objectIndex, f32 arg1) { Objects *temp_v0; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000020) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00000020) != 0) { temp_v0 = &gObjectList[objectIndex]; D_80183E50[0] = temp_v0->pos[0]; D_80183E50[1] = temp_v0->unk_044 + 0.8; @@ -1234,7 +1234,7 @@ void func_8004A870(s32 objectIndex, f32 arg1) { Mat4 sp30; Objects *temp_v0; - if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00000020) != 0) && (is_obj_index_flag_unk_054_active(objectIndex, 0x00800000) != 0)) { + if ((is_obj_flag_status_active(objectIndex, 0x00000020) != 0) && (is_obj_flag_status_active(objectIndex, 0x00800000) != 0)) { temp_v0 = &gObjectList[objectIndex]; D_80183E50[0] = temp_v0->pos[0]; D_80183E50[1] = temp_v0->unk_044 + 0.8; @@ -1336,7 +1336,7 @@ UNUSED void func_8004B180(s32 red, s32 green, s32 blue, s32 alpha) { gDPSetEnvColor(gDisplayListHead++, red, green, blue, alpha); } -void func_8004B1C8(s32 primRed, s32 primGreen, s32 primBlue, s32 envRed, s32 envGreen, s32 envBlue, s32 primAlpha) { +void set_color_render(s32 primRed, s32 primGreen, s32 primBlue, s32 envRed, s32 envGreen, s32 envBlue, s32 primAlpha) { gDPSetPrimColor(gDisplayListHead++, 0, 0, primRed, primGreen, primBlue, primAlpha); gDPSetEnvColor(gDisplayListHead++, envRed, envGreen, envBlue, 0xFF); } @@ -1520,8 +1520,8 @@ void func_8004BB3C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, f32 arg4) { s32 var_t1; s32 xl; s32 yl; - s32 thing0; - s32 thing1; + UNUSED s32 thing0; + UNUSED s32 thing1; var_t0 = (arg2 * 4 * arg4) + 0.5; var_t1 = (arg3 * 4 * arg4) + 0.5; @@ -1587,7 +1587,7 @@ void func_8004C268(u32 arg0, u32 arg1, u8 *texture, u32 width, u32 arg4, u32 hei img2 = texture; for (i = 0; (u32)i < (arg4 / height); i++) { - func_80043D50(img2, width, height); + load_texture_block_rgba16_mirror(img2, width, height); func_8004B97C(arg0, arg1, width, height, arg6); //! @todo fakematch? #ifdef AVOID_UB @@ -1605,12 +1605,12 @@ UNUSED void func_8004C354() { UNUSED void func_8004C35C() { } -void func_8004C364(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) { +void draw_hud_2d_texture(s32 x, s32 y, u32 width, u32 height, u8 *texture) { gSPDisplayList(gDisplayListHead++, D_0D008108); gSPDisplayList(gDisplayListHead++, D_0D007EF8); gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD); - func_80043D50(texture, arg2, arg3); - func_8004B97C(arg0 - (arg2 >> 1), arg1 - (arg3 >> 1), arg2, arg3, 0); + load_texture_block_rgba16_mirror(texture, width, height); + func_8004B97C(x - (width >> 1), y - (height >> 1), width, height, 0); gSPDisplayList(gDisplayListHead++, D_0D007EB8); } @@ -1618,7 +1618,7 @@ void func_8004C450(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) { gSPDisplayList(gDisplayListHead++, D_0D007F38); func_8004B614(D_801656C0, D_801656D0, D_801656E0, 0x80, 0x80, 0x80, 0xFF); - func_80043D50(texture, arg2, arg3); + load_texture_block_rgba16_mirror(texture, arg2, arg3); func_8004B97C(arg0 - (arg2 >> 1), arg1 - (arg3 >> 1), arg2, arg3, 1); gSPDisplayList(gDisplayListHead++, D_0D007EB8); } @@ -1628,7 +1628,7 @@ UNUSED void func_8004C53C(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) { gSPDisplayList(gDisplayListHead++, D_0D008108); gSPDisplayList(gDisplayListHead++, D_0D007EF8); gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD); - func_800440B8(texture, arg2, arg3); + load_texture_tile_rgba16_nomirror(texture, arg2, arg3); func_8004B97C(arg0 - (arg2 >> 1), arg1 - (arg3 >> 1), arg2, arg3, 0); gSPDisplayList(gDisplayListHead++, D_0D007EB8); } @@ -1637,7 +1637,7 @@ void func_8004C628(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) { gSPDisplayList(gDisplayListHead++, D_0D007EF8); gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD); - func_80043A84(texture, arg2, arg3); + load_texture_block_rgba32_nomirror(texture, arg2, arg3); func_8004B97C(arg0 - (arg2 >> 1), arg1 - (arg3 >> 1), arg2, arg3, 1); gSPDisplayList(gDisplayListHead++, D_0D007EB8); } @@ -1675,7 +1675,7 @@ void func_8004C6FC(s16 arg0, s16 arg1, s8 *arg2, u32 arg3, u32 arg4) { if ((s32) var_t2 > 0) { do { temp_t5 = arg3 * var_s0 * 4; - func_80043C28(var_s5, (s32) arg3, (s32) var_s0); + load_texture_tile_rgba32_nomirror(var_s5, (s32) arg3, (s32) var_s0); func_8004B950(arg0 - (arg3 >> 1), var_s4, (s32) arg3, (s32) var_s0, 1); temp_v0_3 = var_s6 - temp_t5; var_s5 += temp_t5; @@ -1691,7 +1691,7 @@ void func_8004C6FC(s16 arg0, s16 arg1, s8 *arg2, u32 arg3, u32 arg4) { gSPDisplayList(gDisplayListHead++, D_0D007EB8); } #else -GLOBAL_ASM("asm/non_matchings/hud_renderer/func_8004C6FC.s") +GLOBAL_ASM("asm/non_matchings/render_objects/func_8004C6FC.s") #endif void func_8004C8D4(s16 arg0, s16 arg1) { @@ -1714,52 +1714,52 @@ void func_8004C9D8(s32 arg0, s32 arg1, s32 arg2, u8 *texture, s32 arg4, s32 arg5 void func_8004CA58(s32 arg0, s32 arg1, f32 arg2, u8 *texture, s32 arg4, s32 arg5) { gSPDisplayList(gDisplayListHead++, D_0D007F78); - func_80043D50(texture, arg4, arg5); + load_texture_block_rgba16_mirror(texture, arg4, arg5); func_8004BB3C(arg0, arg1, arg4, arg5, arg2); } -void func_8004CAD0(s32 arg0, s32 arg1, u8 *texture) { - func_8004C364(arg0, arg1, 8, 8, texture); +void draw_hud_2d_texture_8x8(s32 x, s32 y, u8 *texture) { + draw_hud_2d_texture(x, y, 8, 8, texture); } -UNUSED void func_8004CB00(s32 arg0, s32 arg1, u8 *texture) { - func_8004C364(arg0, arg1, 8, 16, texture); +UNUSED void draw_hud_2d_texture_8x16(s32 x, s32 y, u8 *texture) { + draw_hud_2d_texture(x, y, 8, 16, texture); } -UNUSED void func_8004CB30(s32 arg0, s32 arg1, u8 *texture) { - func_8004C364(arg0, arg1, 16, 16, texture); +UNUSED void draw_hud_2d_texture_16x16(s32 x, s32 y, u8 *texture) { + draw_hud_2d_texture(x, y, 16, 16, texture); } -void func_8004CB60(s32 arg0, s32 arg1, u8 *texture) { - func_8004C364(arg0, arg1, 32, 8, texture); +void draw_hud_2d_texture_32x8(s32 x, s32 y, u8 *texture) { + draw_hud_2d_texture(x, y, 32, 8, texture); } -void func_8004CB90(s32 arg0, s32 arg1, u8 *texture) { - func_8004C364(arg0, arg1, 32, 16, texture); +void draw_hud_2d_texture_32x16(s32 x, s32 y, u8 *texture) { + draw_hud_2d_texture(x, y, 32, 16, texture); } UNUSED void func_8004CBC0(s32 arg0, s32 arg1, f32 arg2, u8 *texture) { func_8004CA58(arg0, arg1, arg2, texture, 32, 16); } -UNUSED void func_8004CBF4(s32 arg0, s32 arg1, u8 *texture) { - func_8004C364(arg0, arg1, 32, 32, texture); +UNUSED void draw_hud_2d_texture_32x32(s32 x, s32 y, u8 *texture) { + draw_hud_2d_texture(x, y, 32, 32, texture); } UNUSED void func_8004CC24(s32 arg0, s32 arg1, u8 *texture) { func_8004C628(arg0, arg1, 32, 32, texture); } -UNUSED void func_8004CC54(s32 arg0, s32 arg1, u8 *texture) { - func_8004C364(arg0, arg1, 40, 32, texture); +UNUSED void draw_hud_2d_texture_40x32(s32 x, s32 y, u8 *texture) { + draw_hud_2d_texture(x, y, 40, 32, texture); } -UNUSED void func_8004CC84(s32 arg0, s32 arg1, u8 *texture) { - func_8004C91C(arg0, arg1, texture, 48, 48, 24); +UNUSED void func_8004CC84(s32 x, s32 y, u8 *texture) { + func_8004C91C(x, y, texture, 48, 48, 24); } -UNUSED void func_8004CCB4(s32 arg0, s32 arg1, u8 *texture) { - func_8004C364(arg0, arg1, 64, 32, texture); +UNUSED void func_8004CCB4(s32 x, s32 y, u8 *texture) { + draw_hud_2d_texture(x, y, 64, 32, texture); } UNUSED void func_8004CCE4(s32 arg0, s32 arg1, f32 arg2, u8 *texture) { @@ -1780,7 +1780,7 @@ UNUSED void func_8004CD48(s32 arg0, s32 arg1, UNUSED u8 *texture, s32 width, s32 gSPDisplayList(gDisplayListHead++, D_0D007FE0); for (i = 0; i < arg4 / height; i++) { - func_800441E0(img, width, height); + load_texture_block_ia16_nomirror(img, width, height); func_8004B97C(arg0 - (width / 2), var_s0, width, height, 1); img += width * height * 2; var_s0 += height; @@ -1793,7 +1793,7 @@ UNUSED void func_8004CE8C(s32 arg0, s32 arg1, u8 *texture, s32 width, s32 arg4, u8 *img = texture; for (i = 0; i < arg4 / height; i++) { - func_800444B0(img, width, height); + load_texture_block_ia8_nomirror(img, width, height); func_8004B97C(arg0 - (width / 2), var_s0, width, height, 1); img += width * height; var_s0 += height; @@ -1915,7 +1915,7 @@ UNUSED void func_8004D654(s32 arg0, s32 arg1, u8 *texture, f32 arg3, s32 arg4, s } } #else -GLOBAL_ASM("asm/non_matchings/hud_renderer/func_8004D654.s") +GLOBAL_ASM("asm/non_matchings/render_objects/func_8004D654.s") #endif void func_8004D7B4(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) { @@ -1943,7 +1943,7 @@ void func_8004D7B4(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) { temp_s0 = var_s1; temp_s5 = (s32) ((sins(temp_s0) * temp_f20) + (f32) (arg0 - (arg3 / 2))); sins(temp_s0); - func_800441E0(img, arg3, 1); + load_texture_block_ia16_nomirror(img, arg3, 1); func_8004B97C(temp_s5, var_s3, arg3, 1, 1); var_s1 += temp_s7; @@ -1978,7 +1978,7 @@ void func_8004D93C(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) { temp_s0 = var_s1; temp_s6 = (s32) ((sins(temp_s0) * temp_f20) + (f32) (arg0 - (var))); sins(temp_s0); - func_800444B0(img, arg3, 1); + load_texture_block_ia8_nomirror(img, arg3, 1); func_8004B97C(temp_s6, var_s4, arg3, 1, 1); var_s1 += temp_s7; img = &img[arg3]; @@ -2203,7 +2203,7 @@ UNUSED void func_8004E604(s32 arg0, s32 arg1, u8 *tlut, u8 *texture) { func_8004E240(arg0, arg1, tlut, texture, SCREEN_WIDTH, SCREEN_HEIGHT, 6); } -void func_8004E638(s32 playerId) { +void draw_item_window(s32 playerId) { s32 objectIndex; Objects *temp_v1; hud_player *temp_v0; @@ -2229,9 +2229,9 @@ void func_8004E6C4(s32 playerId) { } } -void func_8004E78C(s32 playerId) { - func_8004CB60((s32) playerHUD[playerId].lapX, playerHUD[playerId].lapY + 3, (s32) common_texture_hud_lap); - func_8004CB90(playerHUD[playerId].lapX + 0x1C, (s32) playerHUD[playerId].lapY, D_800E4570[playerHUD[playerId].alsoLapCount]); +void draw_simplified_lap_count(s32 playerId) { + draw_hud_2d_texture_32x8((s32) playerHUD[playerId].lapX, playerHUD[playerId].lapY + 3, common_texture_hud_lap); + draw_hud_2d_texture_32x16(playerHUD[playerId].lapX + 0x1C, (s32) playerHUD[playerId].lapY, gHudLapTextures[playerHUD[playerId].alsoLapCount]); } void func_8004E800(s32 playerId) { @@ -2271,26 +2271,26 @@ void func_8004EB38(s32 playerId) { temp_s0 = &playerHUD[playerId]; if ((u8) temp_s0->unk_7B != 0) { - func_8004C9D8(temp_s0->lap1CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000080, (s32) common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010); + func_8004C9D8(temp_s0->lap1CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000080, common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010); func_8004F950((s32) temp_s0->lap1CompletionTimeX, (s32) temp_s0->timerY, 0x00000080, (s32) temp_s0->someTimer); } if ((u8) temp_s0->unk_7C != 0) { - func_8004C9D8(temp_s0->lap2CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000050, (s32) common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010); + func_8004C9D8(temp_s0->lap2CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000050, common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010); func_8004F950((s32) temp_s0->lap2CompletionTimeX, (s32) temp_s0->timerY, 0x00000050, (s32) temp_s0->someTimer); } if ((u8) temp_s0->unk_7E != 0) { - func_8004C9D8((s32) temp_s0->lapAfterImage1X, temp_s0->lapY + 3, 0x00000080, (s32) common_texture_hud_lap, 0x00000020, 8, 0x00000020, 8); - func_8004C9D8(temp_s0->lapAfterImage1X + 0x1C, (s32) temp_s0->lapY, 0x00000080, D_800E4570[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010); + func_8004C9D8((s32) temp_s0->lapAfterImage1X, temp_s0->lapY + 3, 0x00000080, common_texture_hud_lap, 0x00000020, 8, 0x00000020, 8); + func_8004C9D8(temp_s0->lapAfterImage1X + 0x1C, (s32) temp_s0->lapY, 0x00000080, gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010); } if ((u8) temp_s0->unk_7F != 0) { - func_8004C9D8((s32) temp_s0->lapAfterImage2X, temp_s0->lapY + 3, 0x00000050, (s32) common_texture_hud_lap, 0x00000020, 8, 0x00000020, 8); - func_8004C9D8(temp_s0->lapAfterImage2X + 0x1C, (s32) temp_s0->lapY, 0x00000050, D_800E4570[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010); + func_8004C9D8((s32) temp_s0->lapAfterImage2X, temp_s0->lapY + 3, 0x00000050, common_texture_hud_lap, 0x00000020, 8, 0x00000020, 8); + func_8004C9D8(temp_s0->lapAfterImage2X + 0x1C, (s32) temp_s0->lapY, 0x00000050, gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010); } } void func_8004ED40(s32 arg0) { - func_8004A2F4(playerHUD[arg0].speedometerX, playerHUD[arg0].speedometerY, 0U, 1.0f, D_8018D300, D_8018D308, D_8018D310, 0xFF, (u8* ) common_texture_speedometer, D_0D0064B0, 0x40, 0x60, 0x40, 0x30); - func_8004A258(D_8018CFEC, D_8018CFF4, D_8016579E, 1.0f, (u8* ) common_texture_speedometer_needle, &D_0D005FF0, 0x40, 0x20, 0x40, 0x20); + func_8004A2F4(playerHUD[arg0].speedometerX, playerHUD[arg0].speedometerY, 0U, 1.0f, D_8018D300, D_8018D308, D_8018D310, 0xFF, common_texture_speedometer, D_0D0064B0, 0x40, 0x60, 0x40, 0x30); + func_8004A258(D_8018CFEC, D_8018CFF4, D_8016579E, 1.0f, common_texture_speedometer_needle, &D_0D005FF0, 0x40, 0x20, 0x40, 0x20); } void func_8004EE54(s32 arg0) { @@ -2327,7 +2327,7 @@ void func_8004F020(s32 arg0) { var_f0 = var_f0 + 4.0; break; } - func_8004CAD0(var_f2, var_f0, common_texture_minimap_finish_line); + draw_hud_2d_texture_8x8(var_f2, var_f0, common_texture_minimap_finish_line); } #ifdef NON_MATCHING @@ -2356,18 +2356,18 @@ void func_8004F168(s32 arg0, s32 playerId, s32 characterId) { func_8004C450((s32) temp_a0, (s32) temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot); //return; } else { - func_8004C364((s32) temp_a0, (s32) temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot); + draw_hud_2d_texture((s32) temp_a0, (s32) temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot); } } } } #else -GLOBAL_ASM("asm/non_matchings/hud_renderer/func_8004F168.s") +GLOBAL_ASM("asm/non_matchings/render_objects/func_8004F168.s") #endif // WTF is up with the gPlayerOne access in this function? void func_8004F3E4(s32 arg0) { - Player *player; + UNUSED Player *player; s32 playerId; s32 idx; @@ -2426,8 +2426,8 @@ s32 func_8004F674(s32 *arg0, s32 arg1) { } void func_8004F6D0(s32 arg0) { - s32 stackPadding0; - s32 stackPadding1; + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; s32 sp24; sp24 = arg0; @@ -2458,7 +2458,7 @@ void print_timer(s32 arg0, s32 arg1, s32 arg2) { gSPDisplayList(gDisplayListHead++, D_0D008108); gSPDisplayList(gDisplayListHead++, D_0D007EF8); gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD); - func_80043D50(common_texture_hud_normal_digit, 104, 16); + load_texture_block_rgba16_mirror(common_texture_hud_normal_digit, 104, 16); func_8004F6D0(arg2); func_8004F774(arg0, arg1); gSPDisplayList(gDisplayListHead++, D_0D007EB8); @@ -2477,20 +2477,20 @@ void func_8004F8CC(s32 arg0, s32 arg1) { void func_8004F950(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { gSPDisplayList(gDisplayListHead++, D_0D007F38); set_transparency(arg2); - func_80043D50(common_texture_hud_normal_digit, 104, 16); + load_texture_block_rgba16_mirror(common_texture_hud_normal_digit, 104, 16); func_8004F6D0(arg3); func_8004F8CC(arg0, arg1); } -void func_8004F9CC(s32 arg0, s32 arg1, s32 arg2) { +void print_timer_rainbow(s32 arg0, s32 arg1, s32 arg2) { gSPDisplayList(gDisplayListHead++, D_0D007F38); func_8004B614(D_801656C0, D_801656D0, D_801656E0, 128, 128, 128, 255); - func_80043D50(common_texture_hud_normal_digit, 104, 16); + load_texture_block_rgba16_mirror(common_texture_hud_normal_digit, 104, 16); func_8004F6D0(arg2); func_8004F8CC(arg0, arg1); } -void func_8004FA78(s32 playerId) { +void render_hud_timer(s32 playerId) { s32 var_s0; if ((gModeSelection != 2) && (gModeSelection != 3)) { @@ -2500,24 +2500,24 @@ void func_8004FA78(s32 playerId) { if (D_80165658[var_s0] == 0) { print_timer(playerHUD[playerId].lapCompletionTimeXs[var_s0], playerHUD[playerId].timerY + (var_s0*0x10), playerHUD[playerId].lapDurations[var_s0]); } else { - func_8004F9CC(playerHUD[playerId].lapCompletionTimeXs[var_s0], playerHUD[playerId].timerY + (var_s0*0x10), playerHUD[playerId].lapDurations[var_s0]); + print_timer_rainbow(playerHUD[playerId].lapCompletionTimeXs[var_s0], playerHUD[playerId].timerY + (var_s0*0x10), playerHUD[playerId].lapDurations[var_s0]); } } - func_8004CB90(playerHUD[playerId].totalTimeX - 0x13, playerHUD[playerId].timerY + 0x38, common_texture_hud_total_time); + draw_hud_2d_texture_32x16(playerHUD[playerId].totalTimeX - 0x13, playerHUD[playerId].timerY + 0x38, common_texture_hud_total_time); if (D_801657E5 != 0) { - func_8004F9CC(playerHUD[playerId].totalTimeX, playerHUD[playerId].timerY + 0x30, playerHUD[playerId].someTimer); + print_timer_rainbow(playerHUD[playerId].totalTimeX, playerHUD[playerId].timerY + 0x30, playerHUD[playerId].someTimer); } else { print_timer(playerHUD[playerId].totalTimeX, playerHUD[playerId].timerY + 0x30, playerHUD[playerId].someTimer); } } } else { if (playerHUD[playerId].blinkTimer == 0) { - func_8004CB90(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, common_texture_hud_time); + draw_hud_2d_texture_32x16(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, common_texture_hud_time); print_timer(playerHUD[playerId].timerX, playerHUD[playerId].timerY, playerHUD[playerId].someTimer); } else { - func_8004CB90(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, common_texture_hud_lap_time); + draw_hud_2d_texture_32x16(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, common_texture_hud_lap_time); if (D_801657E3 != 0) { - func_8004F9CC(playerHUD[playerId].timerX, playerHUD[playerId].timerY, playerHUD[playerId].someTimer1); + print_timer_rainbow(playerHUD[playerId].timerX, playerHUD[playerId].timerY, playerHUD[playerId].someTimer1); } else if (playerHUD[playerId].blinkState == 0) { print_timer(playerHUD[playerId].timerX, playerHUD[playerId].timerY, playerHUD[playerId].someTimer1); } @@ -2526,14 +2526,15 @@ void func_8004FA78(s32 playerId) { } } -void func_8004FC78(s16 arg0, s16 arg1, s8 arg2) { +void draw_lap_count(s16 lapX, s16 lapY, s8 lap) { gSPDisplayList(gDisplayListHead++, D_0D008108); gSPDisplayList(gDisplayListHead++, D_0D007EF8); gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD); - func_80043D50(common_texture_hud_123, 32, 8); - func_8004BA98(arg0, arg1, 8, 8, arg2 * 8, 0, 0); - func_8004BA98(arg0 + 8, arg1, 8, 8, 24, 0, 0); - func_8004BA98(arg0 + 16, arg1, 8, 8, 16, 0, 0); + load_texture_block_rgba16_mirror(common_texture_hud_123, 32, 8); + // Display current lap. Ex. 1/3 + func_8004BA98(lapX , lapY, 8, 8, lap * 8, 0, 0); // display the digit + func_8004BA98(lapX + 8 , lapY, 8, 8, 24, 0, 0); // display the / + func_8004BA98(lapX + 16, lapY, 8, 8, 16, 0, 0); // display the 3 gSPDisplayList(gDisplayListHead++, D_0D007EB8); } @@ -2696,7 +2697,7 @@ void func_800508C0(void) { s32 sp4C; s32 temp_v1; s16 var_s0; - s16 stackPadding; + UNUSED s16 stackPadding; u16 var_s0_2; u16 var_s1; u16 var_s2; @@ -2775,10 +2776,10 @@ void func_800508C0(void) { } void func_80050C68(void) { - s32 stackPadding0; + UNUSED s32 stackPadding0; s32 sp88; s32 sp84; - s32 stackPadding1; + UNUSED s32 stackPadding1; s32 var_s1; for (var_s1 = 0; var_s1 < NUM_BOMB_KARTS_VERSUS; var_s1++) { @@ -2801,7 +2802,7 @@ void func_80050E34(s32 playerId, s32 arg1) { s32 objectIndex; s32 spD0; s32 spCC; - s32 stackPadding; + UNUSED s32 stackPadding; s32 spC4; s32 lapCount; s32 characterId; @@ -2833,24 +2834,24 @@ void func_80050E34(s32 playerId, s32 arg1) { gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_portrait_bomb_kart_and_question_mark); rsp_load_texture(common_texture_portrait_question_mark, 0x00000020, 0x00000020); object = &gObjectList[objectIndex]; - object->pos[0] = object->unk_028[0] + ((f32) (spD0 + 0x20)); - object->pos[1] = object->unk_028[1] + ((f32) (spC4 + spCC)); - object->pos[2] = object->unk_028[2]; + object->pos[0] = object->offset[0] + ((f32) (spD0 + 0x20)); + object->pos[1] = object->offset[1] + ((f32) (spC4 + spCC)); + object->pos[2] = object->offset[2]; rsp_set_matrix_transformation(object->pos, object->direction_angle, object->sizeScaling); gSPDisplayList(gDisplayListHead++, D_0D0069E0); } else { gDPLoadTLUT_pal256(gDisplayListHead++, gPortraitTLUTs[characterId]); gSPDisplayList(gDisplayListHead++, D_0D007DB8); if (player->effects & STAR_EFFECT) { - func_8004B614((s32) D_801656C0, (s32) D_801656D0, (s32) D_801656E0, 0x00000080, 0x00000080, 0x00000080, (s32) gObjectList[objectIndex].unk_0A0); + func_8004B614((s32) D_801656C0, (s32) D_801656D0, (s32) D_801656E0, 0x00000080, 0x00000080, 0x00000080, (s32) gObjectList[objectIndex].primAlpha); } else { - set_transparency((s32) gObjectList[objectIndex].unk_0A0); + set_transparency((s32) gObjectList[objectIndex].primAlpha); } rsp_load_texture(gPortraitTextures[characterId], 0x00000020, 0x00000020); object = &gObjectList[objectIndex]; - object->pos[0] = object->unk_028[0] + ((f32) (spD0 + 0x20)); - object->pos[1] = object->unk_028[1] + ((f32) (spC4 + spCC)); - object->pos[2] = object->unk_028[2]; + object->pos[0] = object->offset[0] + ((f32) (spD0 + 0x20)); + object->pos[1] = object->offset[1] + ((f32) (spC4 + spCC)); + object->pos[2] = object->offset[2]; rsp_set_matrix_transformation(object->pos, object->direction_angle, object->sizeScaling); if (spB8 != 0) { gSPDisplayList(gDisplayListHead++, D_0D0069F8); @@ -2875,7 +2876,7 @@ void func_80050E34(s32 playerId, s32 arg1) { } } #else -GLOBAL_ASM("asm/non_matchings/hud_renderer/func_80050E34.s") +GLOBAL_ASM("asm/non_matchings/render_objects/func_80050E34.s") #endif void func_800514BC(void) { @@ -2907,14 +2908,14 @@ void func_800514BC(void) { gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_80051638(UNUSED s32 arg0) { +void render_object_leaf_particle(UNUSED s32 cameraId) { s32 someIndex; s32 leafIndex; Objects *object; gSPDisplayList(gDisplayListHead++, D_0D0079C8); gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH); - func_80043D50(common_texture_particle_leaf, 0x00000020, 0x00000010); + load_texture_block_rgba16_mirror(common_texture_particle_leaf, 0x00000020, 0x00000010); for(someIndex = 0; someIndex < gLeafParticle_SIZE; someIndex++) { leafIndex = gLeafParticle[someIndex]; if (leafIndex != -1) { @@ -2929,7 +2930,7 @@ void func_80051638(UNUSED s32 arg0) { gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_800517C8(void) { +void render_object_snowflakes_particles(void) { s32 someIndex; s32 snowflakeIndex; @@ -2947,8 +2948,8 @@ void func_800517C8(void) { } void func_800518F8(s32 objectIndex, s16 arg1, s16 arg2) { - s32 pad[1]; - if (gObjectList[objectIndex].unk_054 & 0x10) { + UNUSED s32 pad[1]; + if (gObjectList[objectIndex].status & 0x10) { if (D_8018D228 != gObjectList[objectIndex].unk_0D5) { D_8018D228 = gObjectList[objectIndex].unk_0D5; func_80044DA0(gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].textureWidth, gObjectList[objectIndex].textureHeight); @@ -2960,12 +2961,12 @@ void func_800518F8(s32 objectIndex, s16 arg1, s16 arg2) { } void func_800519D4(s32 objectIndex, s16 arg1, s16 arg2) { - if (gObjectList[objectIndex].unk_054 & 0x10) { + if (gObjectList[objectIndex].status & 0x10) { if (D_8018D228 != gObjectList[objectIndex].unk_0D5) { D_8018D228 = gObjectList[objectIndex].unk_0D5; func_80044DA0(gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].textureWidth, gObjectList[objectIndex].textureHeight); } - func_8004B138(0x000000FF, 0x000000FF, 0x000000FF, gObjectList[objectIndex].unk_0A0); + func_8004B138(0x000000FF, 0x000000FF, 0x000000FF, gObjectList[objectIndex].primAlpha); func_80042330(arg1, arg2, 0U, gObjectList[objectIndex].sizeScaling); gSPVertex(gDisplayListHead++, gObjectList[objectIndex].vertex, 4, 0); gSPDisplayList(gDisplayListHead++, common_rectangle_display); @@ -3092,14 +3093,14 @@ void func_800520C0(s32 arg0) { } } -void func_8005217C(s32 arg0) { +void func_8005217C(UNUSED s32 arg0) { Objects *object; s32 temp_a3; temp_a3 = indexObjectList2[0]; object = &gObjectList[temp_a3]; if (object->state >= 2) { - if (is_obj_index_flag_unk_054_active(temp_a3, 0x00000010) != 0) { + if (is_obj_flag_status_active(temp_a3, 0x00000010) != 0) { rsp_set_matrix_transformation(object->pos, object->direction_angle, object->sizeScaling); func_800520C0(temp_a3); @@ -3127,29 +3128,29 @@ void func_800523B8(s32 objectIndex, s32 arg1, u32 arg2) { object = &gObjectList[objectIndex]; object->orientation[1] = func_800418AC(object->pos[0], object->pos[2], camera->pos); - func_800484BC(object->pos, object->orientation, object->sizeScaling, object->unk_0A0, (u8 *) object->activeTLUT, object->activeTexture, object->vertex, 0x00000030, 0x00000028, 0x00000030, 0x00000028); - if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00000020) != 0) && (arg2 < 0x15F91U)) { + func_800484BC(object->pos, object->orientation, object->sizeScaling, object->primAlpha, (u8 *) object->activeTLUT, object->activeTexture, object->vertex, 0x00000030, 0x00000028, 0x00000030, 0x00000028); + if ((is_obj_flag_status_active(objectIndex, 0x00000020) != 0) && (arg2 < 0x15F91U)) { func_8004A630(&D_8018C830, object->pos, 0.4f); } } -void func_800524B4(s32 arg0) { +void render_object_boos(s32 arg0) { u32 temp_s2; s32 someIndex; s32 objectIndex; - for (someIndex = 0; someIndex < 10; someIndex++) { + for (someIndex = 0; someIndex < NUM_BOOS; someIndex++) { objectIndex = indexObjectList3[someIndex]; if (gObjectList[objectIndex].state >= 2) { temp_s2 = func_8008A364(objectIndex, arg0, 0x4000U, 0x00000320); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) { + if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { func_800523B8(objectIndex, arg0, temp_s2); } } } } -void func_80052590(s32 cameraId) { +void render_object_bat(s32 cameraId) { s32 var_s2; s32 objectIndex; Camera *temp_s7; @@ -3184,13 +3185,13 @@ void func_80052590(s32 cameraId) { gSPTexture(gDisplayListHead++, 0x0001, 0x0001, 0, G_TX_RENDERTILE, G_OFF); } -void func_800527D8(s32 cameraId) { +void render_object_trash_bin(s32 cameraId) { s32 objectIndex; Objects *object; objectIndex = indexObjectList1[1]; func_8008A364(objectIndex, cameraId, 0x5555U, 0x00000320); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) { + if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { object = &gObjectList[objectIndex]; if (object->state >= 2) { func_80043220(object->pos, object->orientation, object->sizeScaling, object->model); @@ -3226,11 +3227,11 @@ void func_800528EC(s32 arg0) { gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA); gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH); gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_LIGHTING | G_SHADING_SMOOTH); - func_800441E0(d_course_sherbet_land_ice, 0x00000020, 0x00000020); + load_texture_block_ia16_nomirror(d_course_sherbet_land_ice, 0x00000020, 0x00000020); if (gPlayerCountSelection1 < 3) { for (var_s3 = 0; var_s3 < gObjectParticle2_SIZE; var_s3++) { objectIndex = gObjectParticle2[var_s3]; - if (objectIndex != -1) { + if (objectIndex != NULL_OBJECT_ID) { object = &gObjectList[objectIndex]; if (object->state > 0) { rsp_set_matrix_transformation(object->pos, D_80183E80, object->sizeScaling); @@ -3242,7 +3243,7 @@ void func_800528EC(s32 arg0) { } else { for (var_s3 = 0; var_s3 < gObjectParticle2_SIZE; var_s3++) { objectIndex = gObjectParticle2[var_s3]; - if (objectIndex != -1) { + if (objectIndex != NULL_OBJECT_ID) { object = &gObjectList[objectIndex]; if ((object->state > 0) && (arg0 == object->unk_084[7]) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) { rsp_set_matrix_transformation(object->pos, D_80183E80, object->sizeScaling); @@ -3257,7 +3258,7 @@ void func_800528EC(s32 arg0) { gSPTexture(gDisplayListHead++, 0x0001, 0x0001, 0, G_TX_RENDERTILE, G_OFF); } -void func_80052C60(s32 arg0) { +void render_ice_block(s32 arg0) { s32 playerId; s32 objectIndex; @@ -3269,7 +3270,7 @@ void func_80052C60(s32 arg0) { for (playerId = 0; playerId < gPlayerCountSelection1; playerId++) { objectIndex = gIndexLakituList[playerId]; if (objectIndex) {} - if (func_80072320(objectIndex, 4) != 0) { + if (func_80072320(objectIndex, 4) != FALSE) { func_8005285C(playerId); } func_80072320(objectIndex, 0x00000010); @@ -3291,7 +3292,7 @@ void func_80052D70(s32 playerId) { } } -void func_80052E30(s32 arg0) { +void func_80052E30(UNUSED s32 arg0) { s32 var_s0; D_800E4620.l[0].l.dir[0] = D_80165840[0]; @@ -3309,22 +3310,22 @@ void func_80052E30(s32 arg0) { } } -void func_80052F20(s32 cameraId) { - s32 stackPadding[2]; +void render_object_snowmans_list_2(s32 cameraId) { + UNUSED s32 stackPadding[2]; Camera *sp44; s32 someIndex; s32 objectIndex; Objects *object; sp44 = &camera1[cameraId]; - func_80046E60(d_course_frappe_snowland_snow_tlut, d_course_frappe_snowland_snow, 0x00000020, 0x00000020); + load_texture_and_tlut(d_course_frappe_snowland_snow_tlut, d_course_frappe_snowland_snow, 0x00000020, 0x00000020); for (someIndex = 0; someIndex < gObjectParticle2_SIZE; someIndex++) { objectIndex = gObjectParticle2[someIndex]; - if (objectIndex != -1) { + if (objectIndex != NULL_OBJECT_ID) { object = &gObjectList[objectIndex]; if (object->state > 0) { func_8008A364(objectIndex, cameraId, 0x2AABU, 0x000001F4); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) { + if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { object->orientation[1] = func_800418AC(object->pos[0], object->pos[2], sp44->pos); rsp_set_matrix_gObjectList(objectIndex); gSPDisplayList(gDisplayListHead++, D_0D0069E0); @@ -3335,39 +3336,39 @@ void func_80052F20(s32 cameraId) { gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_8005309C(s32 cameraId) { +void render_object_snowmans_list_1(s32 cameraId) { s32 var_s4; s32 objectIndex; Camera *camera; camera = &camera1[cameraId]; - for (var_s4 = 0; var_s4 < 0x13; var_s4++) { + for (var_s4 = 0; var_s4 < NUM_SNOWMEN; var_s4++) { objectIndex = indexObjectList1[var_s4]; if (gObjectList[objectIndex].state >= 2) { func_8008A364(objectIndex, cameraId, 0x2AABU, 0x00000258); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) { + if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { D_80183E80[0] = (s16) gObjectList[objectIndex].orientation[0]; D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); D_80183E80[2] = (u16) gObjectList[objectIndex].orientation[2]; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000010) != 0) { - func_800480B4(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 0x00000040, 0x00000040, 0x00000040, 0x00000020); + if (is_obj_flag_status_active(objectIndex, 0x00000010) != 0) { + draw_2d_texture_at(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 0x00000040, 0x00000040, 0x00000040, 0x00000020); } objectIndex = indexObjectList2[var_s4]; D_80183E80[0] = (s16) gObjectList[objectIndex].orientation[0]; D_80183E80[2] = (u16) gObjectList[objectIndex].orientation[2]; - func_800480B4(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 0x00000040, 0x00000040, 0x00000040, 0x00000020); + draw_2d_texture_at(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 0x00000040, 0x00000040, 0x00000040, 0x00000020); } } } } -void func_8005327C(s32 arg0) { - func_8005309C(arg0); - func_80052F20(arg0); +void render_object_snowmans(s32 arg0) { + render_object_snowmans_list_1(arg0); + render_object_snowmans_list_2(arg0); } -void func_800532A4(s32 cameraId) { - s32 stackPadding; +void render_lakitu(s32 cameraId) { + UNUSED s32 stackPadding; Camera *camera; f32 var_f0; f32 var_f2; @@ -3376,15 +3377,15 @@ void func_800532A4(s32 cameraId) { objectIndex = gIndexLakituList[cameraId]; camera = &camera1[cameraId]; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000010) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00000010) != 0) { object = &gObjectList[objectIndex]; object->orientation[0] = 0; object->orientation[1] = func_800418AC(object->pos[0], object->pos[2], camera->pos); object->orientation[2] = 0x8000; if (func_80072354(objectIndex, 2) != 0) { - func_800480B4(object->pos, object->orientation, object->sizeScaling, (u8 *) object->activeTLUT, object->activeTexture, object->vertex, (s32) object->textureWidth, (s32) object->textureHeight, (s32) object->textureWidth, (s32) object->textureHeight / 2); + draw_2d_texture_at(object->pos, object->orientation, object->sizeScaling, (u8 *) object->activeTLUT, object->activeTexture, object->vertex, (s32) object->textureWidth, (s32) object->textureHeight, (s32) object->textureWidth, (s32) object->textureHeight / 2); } else { - func_800485C4(object->pos, object->orientation, object->sizeScaling, (s32) object->unk_0A0, (u8 *) object->activeTLUT, object->activeTexture, object->vertex, (s32) object->textureWidth, (s32) object->textureHeight, (s32) object->textureWidth, (s32) object->textureHeight / 2); + func_800485C4(object->pos, object->orientation, object->sizeScaling, (s32) object->primAlpha, (u8 *) object->activeTLUT, object->activeTexture, object->vertex, (s32) object->textureWidth, (s32) object->textureHeight, (s32) object->textureWidth, (s32) object->textureHeight / 2); } if (gScreenModeSelection == SCREEN_MODE_1P) { var_f0 = object->pos[0] - D_8018CF14->pos[0]; @@ -3402,7 +3403,7 @@ void func_800532A4(s32 cameraId) { } } -void func_800534A4(s32 arg0) { +void func_800534A4(UNUSED s32 arg0) { func_800419F8(); D_800E4638.l[0].l.dir[0] = D_80165840[0]; D_800E4638.l[0].l.dir[1] = D_80165840[1]; @@ -3437,7 +3438,7 @@ void func_800534E8(s32 objectIndex) { } } -void func_800536C8(s32 objectIndex) { +void render_object_thwomps_model(s32 objectIndex) { if ((gObjectList[objectIndex].state >= 2) && (func_80072354(objectIndex, 0x00000040) != 0)) { func_8004A7AC(objectIndex, 1.75f); rsp_set_matrix_transformation(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, gObjectList[objectIndex].sizeScaling); @@ -3450,33 +3451,34 @@ void func_800536C8(s32 objectIndex) { } } -void func_80053870(s32 cameraId) { - s32 temp_s1; - s32 var_s2; - s32 stackPadding0; +void render_object_thwomps(s32 cameraId) { + s32 objectIndex; + s32 i; + UNUSED s32 stackPadding0; s16 minusone, plusone; Camera *camera; Objects *object; camera = &camera1[cameraId]; - if (cameraId == 0) { - for (var_s2 = 0; var_s2 < gNumActiveThwomps; var_s2++) { - temp_s1 = indexObjectList1[var_s2]; - set_object_flag_unk_054_false(temp_s1, 0x00070000); - func_800722CC(temp_s1, 0x00000110); + if (cameraId == PLAYER_ONE) { + for (i = 0; i < gNumActiveThwomps; i++) { + objectIndex = indexObjectList1[i]; + set_object_flag_status_false(objectIndex, 0x00070000); + func_800722CC(objectIndex, 0x00000110); } } - func_800534A4(temp_s1); - for (var_s2 = 0; var_s2 < gNumActiveThwomps; var_s2++) { - temp_s1 = indexObjectList1[var_s2]; - minusone = gObjectList[temp_s1].unk_0DF - 1; - plusone = gObjectList[temp_s1].unk_0DF + 1; + + func_800534A4(objectIndex); + for (i = 0; i < gNumActiveThwomps; i++) { + objectIndex = indexObjectList1[i]; + minusone = gObjectList[objectIndex].unk_0DF - 1; + plusone = gObjectList[objectIndex].unk_0DF + 1; if (gGamestate != 9) { - if ((D_8018CF68[cameraId] >= minusone) && (plusone >= D_8018CF68[cameraId]) && (func_8008A140(temp_s1, camera, 0x8000U) != 0)) { - func_800536C8(temp_s1); + if ((D_8018CF68[cameraId] >= minusone) && (plusone >= D_8018CF68[cameraId]) && (is_object_visible_on_camera(objectIndex, camera, 0x8000U) != 0)) { + render_object_thwomps_model(objectIndex); } } else { - func_800536C8(temp_s1); + render_object_thwomps_model(objectIndex); } } gSPDisplayList(gDisplayListHead++, D_0D0079C8); @@ -3486,11 +3488,11 @@ void func_80053870(s32 cameraId) { gSPLight(gDisplayListHead++, &D_800E4668.a, LIGHT_2); gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH); gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_LIGHTING | G_SHADING_SMOOTH); - func_80043D50(d_course_bowsers_castle_thwomp_side, 0x00000020, 0x00000020); - for (var_s2 = 0; var_s2 < gObjectParticle3_SIZE; var_s2++) { - temp_s1 = gObjectParticle3[var_s2]; - if (temp_s1 != -1) { - object = &gObjectList[temp_s1]; + load_texture_block_rgba16_mirror(d_course_bowsers_castle_thwomp_side, 0x00000020, 0x00000020); + for (i = 0; i < gObjectParticle3_SIZE; i++) { + objectIndex = gObjectParticle3[i]; + if (objectIndex != NULL_OBJECT_ID) { + object = &gObjectList[objectIndex]; if ((object->state > 0) && (object->unk_0D5 == 3) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) { rsp_set_matrix_transformation(object->pos, object->orientation, object->sizeScaling); gSPVertex(gDisplayListHead++, D_0D005C00, 3, 0); @@ -3502,16 +3504,16 @@ void func_80053870(s32 cameraId) { gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); gSPTexture(gDisplayListHead++, 0x0001, 0x0001, 0, G_TX_RENDERTILE, G_OFF); gSPDisplayList(gDisplayListHead++, D_0D007AE0); - func_800444B0(D_8018D490, 0x00000020, 0x00000020); + load_texture_block_ia8_nomirror(D_8018D490, 0x00000020, 0x00000020); func_8004B3C8(0); D_80183E80[0] = 0; D_80183E80[2] = 0x8000; - for (var_s2 = 0; var_s2 < gObjectParticle2_SIZE; var_s2++) { - temp_s1 = gObjectParticle2[var_s2]; - if (temp_s1 != -1) { - object = &gObjectList[temp_s1]; + for (i = 0; i < gObjectParticle2_SIZE; i++) { + objectIndex = gObjectParticle2[i]; + if (objectIndex != NULL_OBJECT_ID) { + object = &gObjectList[objectIndex]; if ((object->state >= 2) && (object->unk_0D5 == 2) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) { - func_8004B138(0x000000FF, 0x000000FF, 0x000000FF, (s32) object->unk_0A0); + func_8004B138(0x000000FF, 0x000000FF, 0x000000FF, (s32) object->primAlpha); D_80183E80[1] = func_800418AC(object->pos[0], object->pos[2], camera->pos); func_800431B0(object->pos, D_80183E80, object->sizeScaling, D_0D005AE0); } @@ -3526,7 +3528,7 @@ void func_80053D74(s32 objectIndex, UNUSED s32 arg1, s32 vertexIndex) { temp_v0 = &gObjectList[objectIndex]; D_80183E80[2] = (s16) (temp_v0->unk_084[6] + 0x8000); rsp_set_matrix_transformation(temp_v0->pos, (u16 *) D_80183E80, temp_v0->sizeScaling); - func_8004B1C8((s32) temp_v0->unk_084[0], (s32) temp_v0->unk_084[1], (s32) temp_v0->unk_084[2], (s32) temp_v0->unk_084[3], (s32) temp_v0->unk_084[4], (s32) temp_v0->unk_084[5], (s32) temp_v0->unk_0A0); + set_color_render((s32) temp_v0->unk_084[0], (s32) temp_v0->unk_084[1], (s32) temp_v0->unk_084[2], (s32) temp_v0->unk_084[3], (s32) temp_v0->unk_084[4], (s32) temp_v0->unk_084[5], (s32) temp_v0->primAlpha); gSPVertex(gDisplayListHead++, &D_0D0060B0[vertexIndex], 4, 0); gSPDisplayList(gDisplayListHead++, common_rectangle_display); } @@ -3544,27 +3546,27 @@ void func_80053E6C(s32 arg0) { rsp_load_texture(D_8018D4BC, 0x40, 0x20); for (var_s1 = 0; var_s1 < D_80165738; var_s1++) { objectIndex = gObjectParticle3[var_s1]; - if ((objectIndex != -1) && (gObjectList[objectIndex].state >= 2)) { + if ((objectIndex != NULL_OBJECT_ID) && (gObjectList[objectIndex].state >= 2)) { func_80053D74(objectIndex, arg0, 0); } } rsp_load_texture(D_8018D4C0, 0x40, 0x20); for (var_s1 = 0; var_s1 < D_80165738; var_s1++) { objectIndex = gObjectParticle3[var_s1]; - if ((objectIndex != -1) && (gObjectList[objectIndex].state >= 2)) { + if ((objectIndex != NULL_OBJECT_ID) && (gObjectList[objectIndex].state >= 2)) { func_80053D74(objectIndex, arg0, 4); } } } -void func_800540CC(s32 objectIndex, s32 cameraId) { +void render_object_train_smoke_particle(s32 objectIndex, s32 cameraId) { Camera *camera; camera = &camera1[cameraId]; - if (objectIndex != -1) { + if (objectIndex != NULL_OBJECT_ID) { if ((gObjectList[objectIndex].state >= 2) && (gObjectList[objectIndex].unk_0D5 == 1) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) { - func_8004B1C8((s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, 0, 0, 0, (s32) gObjectList[objectIndex].unk_0A0); + set_color_render((s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, 0, 0, 0, (s32) gObjectList[objectIndex].primAlpha); D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling, D_0D005AE0); } @@ -3572,15 +3574,15 @@ void func_800540CC(s32 objectIndex, s32 cameraId) { } // Train smoke? -void func_800541BC(s32 cameraId) { - s32 pad; - s32 j; +void render_object_train_smoke_particles(s32 cameraId) { + UNUSED s32 pad; + UNUSED s32 j; Camera *camera; s32 i; camera = &camera1[cameraId]; gSPDisplayList(gDisplayListHead++, D_0D007AE0); - func_8004477C(D_0D029458, 32, 32); + load_texture_block_i8_nomirror(D_0D029458, 32, 32); func_8004B72C(255, 255, 255, 255, 255, 255, 255); D_80183E80[0] = 0; D_80183E80[2] = 0x8000; @@ -3588,38 +3590,38 @@ void func_800541BC(s32 cameraId) { // Render smoke for any number of trains. Don't know enough about these variables yet. #ifdef AVOID_UB_WIP for (j = 0; j < NUM_TRAINS; j++) { - if ((gTrainList[j].someFlags != 0) && (func_80041980(&gTrainList[j].locomotive.position, camera, 0x4000U) != 0)) { + if ((gTrainList[j].someFlags != 0) && (is_particle_on_screen(&gTrainList[j].locomotive.position, camera, 0x4000U) != 0)) { for (i = 0; i < 128; i++) { // Need to make a way to increase this array for each train. - func_800540CC(gObjectParticle2[i], cameraId); + render_object_train_smoke_particle(gObjectParticle2[i], cameraId); } } } #else - if ((gTrainList[0].someFlags != 0) && (func_80041980(&gTrainList[0].locomotive.position, camera, 0x4000U) != 0)) { + if ((gTrainList[0].someFlags != 0) && (is_particle_on_screen(gTrainList[0].locomotive.position, camera, 0x4000U) != 0)) { for (i = 0; i < gObjectParticle2_SIZE; i++) { - func_800540CC(gObjectParticle2[i], cameraId); + render_object_train_smoke_particle(gObjectParticle2[i], cameraId); } } - if ((gTrainList[1].someFlags != 0) && (func_80041980(&gTrainList[1].locomotive.position, camera, 0x4000U) != 0)) { + if ((gTrainList[1].someFlags != 0) && (is_particle_on_screen(gTrainList[1].locomotive.position, camera, 0x4000U) != 0)) { for (i = 0; i < gObjectParticle3_SIZE; i++) { - func_800540CC(gObjectParticle3[i], cameraId); + render_object_train_smoke_particle(gObjectParticle3[i], cameraId); } } #endif } -void func_80054324(s32 objectIndex, s32 cameraId) { +void render_object_paddle_boat_smoke_particle(s32 objectIndex, s32 cameraId) { Camera *camera; camera = &camera1[cameraId]; - if (objectIndex != -1) { + if (objectIndex != NULL_OBJECT_ID) { if ((gObjectList[objectIndex].state >= 2) && (gObjectList[objectIndex].unk_0D5 == 6) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) { - func_8004B1C8((s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, gObjectList[objectIndex].unk_0A2, gObjectList[objectIndex].unk_0A2, gObjectList[objectIndex].unk_0A2, (s32) gObjectList[objectIndex].unk_0A0); + set_color_render((s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, (s32) gObjectList[objectIndex].type, gObjectList[objectIndex].unk_0A2, gObjectList[objectIndex].unk_0A2, gObjectList[objectIndex].unk_0A2, (s32) gObjectList[objectIndex].primAlpha); D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling, D_0D005AE0); } @@ -3627,31 +3629,31 @@ void func_80054324(s32 objectIndex, s32 cameraId) { } // Likely smoke related. -void func_80054414(s32 cameraId) { - s32 pad[2]; +void render_object_paddle_boat_smoke_particles(s32 cameraId) { + UNUSED s32 pad[2]; Camera *camera; s32 i; camera = &camera1[cameraId]; gSPDisplayList(gDisplayListHead++, D_0D007AE0); - func_8004477C(D_0D029458, 32, 32); + load_texture_block_i8_nomirror(D_0D029458, 32, 32); func_8004B72C(255, 255, 255, 255, 255, 255, 255); D_80183E80[0] = 0; D_80183E80[2] = 0x8000; - if ((gFerries[0].someFlags != 0) && (func_80041980(gFerries[0].position, camera, 0x4000U) != 0)) { + if ((gPaddleBoats[0].someFlags != 0) && (is_particle_on_screen(gPaddleBoats[0].position, camera, 0x4000U) != 0)) { for (i = 0; i < gObjectParticle2_SIZE; i++) { - func_80054324(gObjectParticle2[i], cameraId); + render_object_paddle_boat_smoke_particle(gObjectParticle2[i], cameraId); } } - if ((gFerries[1].someFlags != 0) && (func_80041980(gFerries[1].position, camera, 0x4000U) != 0)) { + if ((gPaddleBoats[1].someFlags != 0) && (is_particle_on_screen(gPaddleBoats[1].position, camera, 0x4000U) != 0)) { for (i = 0; i < gObjectParticle3_SIZE; i++) { - func_80054324(gObjectParticle3[i], cameraId); + render_object_paddle_boat_smoke_particle(gObjectParticle3[i], cameraId); } } } -void func_8005457C(s32 objectIndex, s32 cameraId) { +void render_object_bowser_flame_particle(s32 objectIndex, s32 cameraId) { Camera *camera; Objects *temp_s0; @@ -3659,28 +3661,28 @@ void func_8005457C(s32 objectIndex, s32 cameraId) { if (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX) { temp_s0 = &gObjectList[objectIndex]; if (temp_s0->unk_0D5 == 9) { - func_8004B72C(255, (s32) temp_s0->type, 0, (s32) temp_s0->unk_0A2, 0, 0, (s32) temp_s0->unk_0A0); + func_8004B72C(0xFF, (s32) temp_s0->type, 0, (s32) temp_s0->unk_0A2, 0, 0, (s32) temp_s0->primAlpha); } else { - func_8004B138(255, (s32) temp_s0->type, 0, (s32) temp_s0->unk_0A0); + func_8004B138(0xFF, (s32) temp_s0->type, 0, (s32) temp_s0->primAlpha); } D_80183E80[1] = func_800418AC(temp_s0->pos[0], temp_s0->pos[2], camera->pos); func_800431B0(temp_s0->pos, D_80183E80, temp_s0->sizeScaling, D_0D005AE0); } } -void func_80054664(s32 cameraId) { +void render_object_bowser_flame(s32 cameraId) { s32 var_s0; s32 objectIndex; gSPDisplayList(gDisplayListHead++, D_0D007AE0); - func_8004477C(common_texture_particle_smoke[D_80165598], 0x00000020, 0x00000020); + load_texture_block_i8_nomirror(common_texture_particle_smoke[D_80165598], 0x00000020, 0x00000020); func_8004B414(0, 0, 0, 0x000000FF); D_80183E80[0] = 0; D_80183E80[2] = 0x8000; for (var_s0 = 0; var_s0 < gObjectParticle1_SIZE; var_s0++) { objectIndex = gObjectParticle1[var_s0]; - if ((objectIndex != -1) && (gObjectList[objectIndex].state >= 3)) { - func_8005457C(objectIndex, cameraId); + if ((objectIndex != NULL_OBJECT_ID) && (gObjectList[objectIndex].state >= 3)) { + render_object_bowser_flame_particle(objectIndex, cameraId); } } } @@ -3688,28 +3690,28 @@ void func_80054664(s32 cameraId) { void func_8005477C(s32 objectIndex, u8 arg1, Vec3f arg2) { if (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX) { switch (arg1) { /* irregular */ - case 0: - func_8004B1C8(0x000000E6, 0x000000FF, 0x000000FF, 0, 0, 0x000000FF, (s32) gObjectList[objectIndex].unk_0A0); - break; - case 1: - func_8004B1C8(0x000000FF, 0x000000FF, 0x00000096, 0x000000FF, 0, 0, (s32) gObjectList[objectIndex].unk_0A0); - break; - case 2: - func_8004B1C8(0x000000FF, 0x000000E6, 0x000000FF, 0x000000FF, 0, 0x00000096, (s32) gObjectList[objectIndex].unk_0A0); - break; - case 3: - func_8004B1C8(0x000000FF, 0x000000FF, 0x0000001E, 0x000000FF, 0, 0, (s32) gObjectList[objectIndex].unk_0A0); - break; - default: - break; + case 0: + set_color_render(0xE6, 0xFF, 0xFF, 0x00, 0x00, 0xFF, (s32) gObjectList[objectIndex].primAlpha); + break; + case 1: + set_color_render(0xFF, 0xFF, 0x96, 0xFF, 0x00, 0x00, (s32) gObjectList[objectIndex].primAlpha); + break; + case 2: + set_color_render(0xFF, 0xE6, 0xFF, 0xFF, 0x00, 0x96, (s32) gObjectList[objectIndex].primAlpha); + break; + case 3: + set_color_render(0xFF, 0xFF, 0x1E, 0xFF, 0x00, 0x00, (s32) gObjectList[objectIndex].primAlpha); + break; + default: + break; } D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], arg2); func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling, D_0D005AE0); } } -void func_80054938(s32 cameraId) { - s32 stackPadding[2]; +void render_object_smoke_particles(s32 cameraId) { + UNUSED s32 stackPadding[2]; Camera *sp54; s32 var_s0; s32 objectIndex; @@ -3717,13 +3719,13 @@ void func_80054938(s32 cameraId) { sp54 = &camera1[cameraId]; gSPDisplayList(gDisplayListHead++, D_0D007AE0); - func_8004477C(common_texture_particle_smoke[D_80165598], 32, 32); + load_texture_block_i8_nomirror(common_texture_particle_smoke[D_80165598], 32, 32); func_8004B72C(255, 255, 255, 255, 255, 255, 255); D_80183E80[0] = 0; D_80183E80[2] = 0x8000; for (var_s0 = 0; var_s0 < gObjectParticle4_SIZE; var_s0++) { objectIndex = gObjectParticle4[var_s0]; - if (objectIndex != -1) { + if (objectIndex != NULL_OBJECT_ID) { object = &gObjectList[objectIndex]; if (object->state >= 2) { if (object->unk_0D8 == 3) { @@ -3731,7 +3733,7 @@ void func_80054938(s32 cameraId) { } else { func_8008A364(objectIndex, cameraId, 0x4000U, 0x000001F4); } - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) { + if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { func_8005477C(objectIndex, object->unk_0D8, sp54->pos); } } @@ -3743,7 +3745,7 @@ void func_80054AFC(s32 objectIndex, Vec3f arg1) { D_80183E80[0] = func_800418E8(gObjectList[objectIndex].pos[2], gObjectList[objectIndex].pos[1], arg1); D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], arg1); D_80183E80[2] = (u16) gObjectList[objectIndex].orientation[2]; - func_8004B138((s32) gObjectList[objectIndex].unk_084[0], (s32) gObjectList[objectIndex].unk_084[1], (s32) gObjectList[objectIndex].unk_084[2], (s32) gObjectList[objectIndex].unk_0A0); + func_8004B138((s32) gObjectList[objectIndex].unk_084[0], (s32) gObjectList[objectIndex].unk_084[1], (s32) gObjectList[objectIndex].unk_084[2], (s32) gObjectList[objectIndex].primAlpha); rsp_set_matrix_transformation(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling); gSPVertex(gDisplayListHead++, D_0D005AE0, 4, 0); gSPDisplayList(gDisplayListHead++, common_rectangle_display); @@ -3756,7 +3758,7 @@ void func_80054BE8(s32 cameraId) { camera = &camera1[cameraId]; gSPDisplayList(gDisplayListHead++, D_0D007AE0); - func_800444B0(D_8018D488, 0x00000020, 0x00000020); + load_texture_block_ia8_nomirror(D_8018D488, 0x00000020, 0x00000020); func_8004B35C(0x000000FF, 0x000000FF, 0, 0x000000FF); D_80183E80[0] = 0; for (var_s0 = 0; var_s0 < gObjectParticle3_SIZE; var_s0++) { @@ -3773,7 +3775,7 @@ void func_80054D00(s32 objectIndex, s32 cameraId) { camera = &camera1[cameraId]; if (gObjectList[objectIndex].state >= 3) { func_8008A364(objectIndex, cameraId, 0x2AABU, 0x0000012C); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) { + if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { D_80183E80[0] = (s16) gObjectList[objectIndex].orientation[0]; D_80183E80[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); D_80183E80[2] = (u16) gObjectList[objectIndex].orientation[2]; @@ -3784,7 +3786,7 @@ void func_80054D00(s32 objectIndex, s32 cameraId) { void func_80054E10(s32 objectIndex) { if (gObjectList[objectIndex].state > 0) { - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00800000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00800000) != 0) { D_80183E50[0] = gObjectList[objectIndex].pos[0]; D_80183E50[1] = gObjectList[objectIndex].unk_044 + 0.8; D_80183E50[2] = gObjectList[objectIndex].pos[2]; @@ -3813,13 +3815,13 @@ void func_80054F04(s32 cameraId) { sp44 = &camera1[cameraId]; gSPDisplayList(gDisplayListHead++, D_0D0079C8); - func_80043D50(d_course_moo_moo_farm_mole_dirt, 0x00000010, 0x00000010); + load_texture_block_rgba16_mirror(d_course_moo_moo_farm_mole_dirt, 0x00000010, 0x00000010); for (var_s2 = 0; var_s2 < gObjectParticle2_SIZE; var_s2++) { objectIndex = gObjectParticle2[var_s2]; object = &gObjectList[objectIndex]; if (object->state > 0) { func_8008A364(objectIndex, cameraId, 0x2AABU, 0x000000C8); - if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) { + if ((is_obj_flag_status_active(objectIndex, VISIBLE) != 0) && (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX)) { object->orientation[1] = func_800418AC(object->pos[0], object->pos[2], sp44->pos); rsp_set_matrix_gObjectList(objectIndex); gSPDisplayList(gDisplayListHead++, D_0D006980); @@ -3829,20 +3831,20 @@ void func_80054F04(s32 cameraId) { gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -void func_800550A4(s32 arg0) { - s32 var_s0; +void render_object_moles(s32 cameraId) { + s32 i; - for (var_s0 = 0; var_s0 < 8; var_s0++) { - func_80054D00(indexObjectList1[var_s0], arg0); + for (i = 0; i < NUM_GROUP1_MOLES; i++) { + func_80054D00(indexObjectList1[i], cameraId); } - for (var_s0 = 0; var_s0 < 11; var_s0++) { - func_80054D00(indexObjectList2[var_s0], arg0); + for (i = 0; i < NUM_GROUP2_MOLES; i++) { + func_80054D00(indexObjectList2[i], cameraId); } - for (var_s0 = 0; var_s0 < 12; var_s0++) { - func_80054D00(indexObjectList3[var_s0], arg0); + for (i = 0; i < NUM_GROUP3_MOLES; i++) { + func_80054D00(indexObjectList3[i], cameraId); } - func_80054EB8(arg0); - func_80054F04(arg0); + func_80054EB8(cameraId); + func_80054F04(cameraId); } void func_80055164(s32 objectIndex) { @@ -3864,7 +3866,7 @@ void func_80055228(s32 cameraId) { for (var_s1 = 0; var_s1 < 4; var_s1++) { temp_s0 = indexObjectList1[var_s1]; func_8008A364(temp_s0, cameraId, 0x4000U, 0x000005DC); - if (is_obj_index_flag_unk_054_active(temp_s0, 0x00040000) != 0) { + if (is_obj_flag_status_active(temp_s0, VISIBLE) != 0) { func_80055164(temp_s0); } } @@ -3882,42 +3884,42 @@ void func_800552BC(s32 objectIndex) { } } -void func_80055380(s32 arg0) { +void render_object_seagulls(s32 arg0) { s32 i; s32 var_s1; - for (i = 0; i < 10; i++) { + for (i = 0; i < NUM_SEAGULLS; i++) { var_s1 = indexObjectList2[i]; if (func_8008A364(var_s1, arg0, 0x5555U, 0x000005DC) < 0x9C401) { D_80165908 = 1; func_800722A4(var_s1, 2); } - if (is_obj_index_flag_unk_054_active(var_s1, 0x00040000) != 0) { + if (is_obj_flag_status_active(var_s1, VISIBLE) != 0) { func_800552BC(var_s1); } } } -void func_80055458(s32 objectIndex, s32 cameraId) { +void draw_crabs(s32 objectIndex, s32 cameraId) { Camera *camera; if (gObjectList[objectIndex].state >= 2) { camera = &camera1[cameraId]; func_8004A6EC(objectIndex, 0.5f); gObjectList[objectIndex].orientation[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); - func_800480B4(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, D_0D0060B0, 0x00000040, 0x00000040, 0x00000040, 0x00000020); + draw_2d_texture_at(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, D_0D0060B0, 0x00000040, 0x00000040, 0x00000040, 0x00000020); } } -void func_80055528(s32 arg0) { +void render_object_crabs(s32 arg0) { s32 someIndex; s32 test; - for (someIndex = 0; someIndex < 10; someIndex++) { + for (someIndex = 0; someIndex < NUM_CRABS; someIndex++) { test = indexObjectList1[someIndex]; func_8008A364(test, arg0, 0x2AABU, 0x00000320); - if (is_obj_index_flag_unk_054_active(test, 0x00040000) != 0) { - func_80055458(test, arg0); + if (is_obj_flag_status_active(test, VISIBLE) != 0) { + draw_crabs(test, arg0); } } } @@ -3929,27 +3931,27 @@ void func_800555BC(s32 objectIndex, s32 cameraId) { camera = &camera1[cameraId]; func_8004A870(objectIndex, 0.7f); gObjectList[objectIndex].orientation[1] = func_800418AC(gObjectList[objectIndex].pos[0], gObjectList[objectIndex].pos[2], camera->pos); - func_800480B4(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 64, 64, 64, 32); + draw_2d_texture_at(gObjectList[objectIndex].pos, gObjectList[objectIndex].orientation, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 64, 64, 64, 32); } } -void func_8005568C(s32 arg0) { +void render_object_hedgehogs(s32 arg0) { s32 test; u32 something; s32 someIndex; - for (someIndex = 0; someIndex < 15; someIndex++) { + for (someIndex = 0; someIndex < NUM_HEDGEHOGS; someIndex++) { test = indexObjectList2[someIndex]; something = func_8008A364(test, arg0, 0x4000U, 0x000003E8); - if (is_obj_index_flag_unk_054_active(test, 0x00040000) != 0) { - set_object_flag_unk_054_true(test, 0x00200000); + if (is_obj_flag_status_active(test, VISIBLE) != 0) { + set_object_flag_status_true(test, 0x00200000); if (something < 0x2711U) { - set_object_flag_unk_054_true(test, 0x00000020); + set_object_flag_status_true(test, 0x00000020); } else { - set_object_flag_unk_054_false(test, 0x00000020); + set_object_flag_status_false(test, 0x00000020); } if (something < 0x57E41U) { - set_object_flag_unk_054_true(test, 0x00400000); + set_object_flag_status_true(test, 0x00400000); } if (something < 0x52211U) { func_800555BC(test, arg0); @@ -3968,7 +3970,7 @@ void func_800557B4(s32 objectIndex, u32 arg1, u32 arg2) { object = &gObjectList[objectIndex]; if (object->state >= 2) { - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000020) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00000020) != 0) { if (func_80072320(objectIndex, 4) != 0) { if (arg2 >= arg1) { sp34[0] = object->pos[0]; @@ -3988,8 +3990,8 @@ void func_800557B4(s32 objectIndex, u32 arg1, u32 arg2) { } } -void func_8005592C(s32 cameraId) { - s32 var_s2; +void render_object_train_penguins(s32 cameraId) { + s32 i; s32 objectIndex; s32 temp_s1; s32 var_a3; @@ -4003,12 +4005,12 @@ void func_8005592C(s32 cameraId) { } else { var_s3 = 0x00015F90; } - for (var_s2 = 0; var_s2 < 15; var_s2++) { - objectIndex = indexObjectList1[var_s2]; + for (i = 0; i < NUM_PENGUINS; i++) { + objectIndex = indexObjectList1[i]; if (gObjectList[objectIndex].state >= 2) { if (gPlayerCountSelection1 == 1) { var_s1 = 0x4000; - if (var_s2 == 0) { + if (i == 0) { var_a3 = 0x000005DC; } else if (func_80072320(objectIndex, 8) != 0) { var_a3 = 0x00000320; @@ -4025,7 +4027,7 @@ void func_8005592C(s32 cameraId) { } } temp_s1 = func_8008A364(objectIndex, cameraId, var_s1, var_a3); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) { + if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { func_800557B4(objectIndex, (u32) temp_s1, var_s3); } } @@ -4037,7 +4039,7 @@ void func_80055AB8(s32 objectIndex, s32 cameraId) { camera = &camera1[cameraId]; if (gObjectList[objectIndex].state >= 2) { - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00100000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00100000) != 0) { D_80183E40[0] = gObjectList[objectIndex].pos[0]; D_80183E40[1] = gObjectList[objectIndex].pos[1] + 16.0; D_80183E40[2] = gObjectList[objectIndex].pos[2]; @@ -4053,14 +4055,14 @@ void func_80055AB8(s32 objectIndex, s32 cameraId) { } } -void func_80055C38(s32 cameraId) { +void render_object_chain_chomps(s32 cameraId) { s32 var_s1; s32 objectIndex; for (var_s1 = 0; var_s1 < 3; var_s1++) { objectIndex = indexObjectList2[var_s1]; func_8008A1D0(objectIndex, cameraId, 0x000005DC, 0x000009C4); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) { + if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { func_80055AB8(objectIndex, cameraId); } } @@ -4076,7 +4078,7 @@ void func_80055CCC(s32 objectIndex, s32 cameraId) { func_8008A454(objectIndex, cameraId, 0x0000012C); test = gObjectList[objectIndex].pos[1] - gObjectList[objectIndex].unk_044; func_8004A6EC(objectIndex, (20.0 / test) + 0.5); - if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x00100000) != 0) { + if (is_obj_index_flag_status_inactive(objectIndex, 0x00100000) != 0) { func_80043328(gObjectList[objectIndex].pos, (u16 *) gObjectList[objectIndex].direction_angle, gObjectList[objectIndex].sizeScaling, d_course_luigi_raceway_dl_F960); gSPDisplayList(gDisplayListHead++, d_course_luigi_raceway_dl_F650); } else { @@ -4092,16 +4094,16 @@ void func_80055CCC(s32 objectIndex, s32 cameraId) { } } -void func_80055E68(s32 arg0) { +void render_object_hot_air_balloon(s32 arg0) { s32 objectIndex; objectIndex = indexObjectList1[0]; if (gGamestate != 9) { func_8008A1D0(objectIndex, arg0, 0x000005DC, 0x00000BB8); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) { + if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { func_80055CCC(objectIndex, arg0); } } else { - set_object_flag_unk_054_false(objectIndex, 0x00100000); + set_object_flag_status_false(objectIndex, 0x00100000); func_80055CCC(objectIndex, arg0); } } @@ -4147,7 +4149,7 @@ void func_80056160(s32 arg0) { func_80055FA0(indexObjectList1[3], arg0); } -void func_80056188(s32 cameraId) { +void render_object_neon(s32 cameraId) { Camera *camera; s32 var_s2; s32 objectIndex; @@ -4158,9 +4160,9 @@ void func_80056188(s32 cameraId) { objectIndex = indexObjectList1[var_s2]; if (D_8018E838[cameraId] == 0) { object = &gObjectList[objectIndex]; - if ((object->state >= 2) && (is_obj_index_flag_unk_054_inactive(objectIndex, 0x00080000) != 0) && (func_8008A140(objectIndex, camera, 0x2AABU) != 0)) { + if ((object->state >= 2) && (is_obj_index_flag_status_inactive(objectIndex, 0x00080000) != 0) && (is_object_visible_on_camera(objectIndex, camera, 0x2AABU) != 0)) { object->orientation[1] = angle_between_object_camera(objectIndex, camera); - func_800480B4(object->pos, object->orientation, object->sizeScaling, (u8 *) object->activeTLUT, object->activeTexture, D_0D0060B0, 0x00000040, 0x00000040, 0x00000040, 0x00000020); + draw_2d_texture_at(object->pos, object->orientation, object->sizeScaling, (u8 *) object->activeTLUT, object->activeTexture, D_0D0060B0, 0x00000040, 0x00000040, 0x00000040, 0x00000020); } } } @@ -4215,7 +4217,7 @@ void func_800563DC(s32 objectIndex, s32 cameraId, s32 arg2) { void func_8005669C(s32 objectIndex, UNUSED s32 arg1, s32 arg2) { gSPDisplayList(gDisplayListHead++, D_0D0079E8); func_8004B310(arg2); - func_80043D50(D_0D02AA58, 0x00000010, 0x00000010); + load_texture_block_rgba16_mirror(D_0D02AA58, 0x00000010, 0x00000010); D_80183E40[1] = gObjectList[objectIndex].pos[1] - 2.0; D_80183E40[0] = gObjectList[objectIndex].pos[0] + 2.0; D_80183E40[2] = gObjectList[objectIndex].pos[2] + 2.0; @@ -4246,27 +4248,27 @@ void func_800568A0(s32 objectIndex, s32 playerId) { gSPDisplayList(gDisplayListHead++, D_0D007B98); } -void func_800569F4(s32 arg0) { +void func_800569F4(s32 playerIndex) { s32 objectIndex; - objectIndex = D_80183DD8[arg0]; + objectIndex = gIndexObjectBombKart[playerIndex]; init_object(objectIndex, 0); - gObjectList[objectIndex].unk_0A0 = 0; + gObjectList[objectIndex].primAlpha = 0; } -void func_80056A40(s32 arg0, s32 arg1) { +void func_80056A40(s32 playerIndex, s32 arg1) { s32 objectIndex; - objectIndex = D_80183DD8[arg0]; + objectIndex = gIndexObjectBombKart[playerIndex]; init_object(objectIndex, 0); - gObjectList[objectIndex].unk_0A0 = (s16) arg1; + gObjectList[objectIndex].primAlpha = (s16) arg1; } -void func_80056A94(s32 arg0) { - func_80072428(D_80183DD8[arg0]); +void func_80056A94(s32 playerIndex) { + func_80072428(gIndexObjectBombKart[playerIndex]); } -void func_80056AC0(s32 cameraId) { +void render_object_bomb_kart(s32 cameraId) { Player *temp_v0; s32 temp_s1; s32 temp_s0; @@ -4274,10 +4276,10 @@ void func_80056AC0(s32 cameraId) { Objects *temp_v1; for (payerId = 0; payerId < NUM_BOMB_KARTS_BATTLE; payerId++) { - temp_s0 = D_80183DD8[payerId]; + temp_s0 = gIndexObjectBombKart[payerId]; temp_v1 = &gObjectList[temp_s0]; if (temp_v1->state != 0) { - temp_s1 = temp_v1->unk_0A0; + temp_s1 = temp_v1->primAlpha; temp_v0 = &gPlayerOne[payerId]; temp_v1->pos[0] = temp_v0->pos[0]; temp_v1->pos[1] = temp_v0->pos[1] - 2.0; @@ -4291,7 +4293,7 @@ void func_80056AC0(s32 cameraId) { } void func_80056BF0(s32 bombIndex) { - s32 stackPadding; + UNUSED s32 stackPadding; u8 thing; s32 temp_s0; s32 temp_v0; @@ -4304,7 +4306,7 @@ void func_80056BF0(s32 bombIndex) { D_80183E40[0] = sp40.bombPos[0]; D_80183E40[1] = sp40.bombPos[1] + 1.0; D_80183E40[2] = sp40.bombPos[2]; - func_800480B4(D_80183E40, D_80183E80, 0.25f, common_tlut_bomb, bombFrame, D_0D005AE0, 0x20, 0x20, 0x20, 0x20); + draw_2d_texture_at(D_80183E40, D_80183E80, 0.25f, common_tlut_bomb, bombFrame, D_0D005AE0, 0x20, 0x20, 0x20, 0x20); temp_s0 = D_8018D400; gSPDisplayList(gDisplayListHead++, D_0D007B00); func_8004B414(0, 0, 0, 0xFF); @@ -4320,13 +4322,13 @@ void func_80056BF0(s32 bombIndex) { } void func_80056E24(s32 bombIndex, Vec3f arg1) { - s32 stackPadding[2]; + UNUSED s32 stackPadding[2]; BombKart sp2C = gBombKarts[bombIndex]; D_80183E80[0] = 0; D_80183E80[2] = 0x8000; gSPDisplayList(gDisplayListHead++, D_0D0079C8); - func_80043D50(D_0D02AA58, 0x00000010, 0x00000010); + load_texture_block_rgba16_mirror(D_0D02AA58, 0x00000010, 0x00000010); D_80183E80[1] = func_800418AC(sp2C.wheel1Pos[0], sp2C.wheel1Pos[2], arg1); func_800431B0(sp2C.wheel1Pos, D_80183E80, 0.15f, common_vtx_rectangle); D_80183E80[1] = func_800418AC(sp2C.wheel2Pos[0], sp2C.wheel2Pos[2], arg1); @@ -4353,48 +4355,48 @@ void func_80056FCC(s32 bombIndex) { } void func_80057114(s32 cameraId) { - Camera *temp_s7; + Camera *camera; s32 objectIndex; s32 temp_s4; - s32 var_s2; + s32 i; s32 state; BombKart *var_s1_2; if (gGamestate == 5) { cameraId = 0; } - temp_s7 = &camera1[cameraId]; - if (cameraId == 0) { - for (var_s2 = 0; var_s2 < NUM_BOMB_KARTS_VERSUS; var_s2++) { - objectIndex = D_80183DD8[var_s2]; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00200000) != 0) { - gBombKarts[var_s2].unk_4A = 0; + camera = &camera1[cameraId]; + if (cameraId == PLAYER_ONE) { + for (i = 0; i < NUM_BOMB_KARTS_VERSUS; i++) { + objectIndex = gIndexObjectBombKart[i]; + if (is_obj_flag_status_active(objectIndex, 0x00200000) != 0) { + gBombKarts[i].unk_4A = 0; } else if (gGamestate != 5) { - gBombKarts[var_s2].unk_4A = 1; + gBombKarts[i].unk_4A = 1; } - set_object_flag_unk_054_false(objectIndex, 0x00200000); + set_object_flag_status_false(objectIndex, 0x00200000); } } - for (var_s2 = 0; var_s2 < NUM_BOMB_KARTS_VERSUS; var_s2++) { - var_s1_2 = &gBombKarts[var_s2]; + for (i = 0; i < NUM_BOMB_KARTS_VERSUS; i++) { + var_s1_2 = &gBombKarts[i]; // huh??? state = var_s1_2->state; if (var_s1_2->state != BOMB_STATE_INACTIVE) { - objectIndex = D_80183DD8[var_s2]; + objectIndex = gIndexObjectBombKart[i]; gObjectList[objectIndex].pos[0] = var_s1_2->bombPos[0]; gObjectList[objectIndex].pos[1] = var_s1_2->bombPos[1]; gObjectList[objectIndex].pos[2] = var_s1_2->bombPos[2]; temp_s4 = func_8008A364(objectIndex, cameraId, 0x31C4U, 0x000001F4); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) { - set_object_flag_unk_054_true(objectIndex, 0x00200000); + if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { + set_object_flag_status_true(objectIndex, 0x00200000); D_80183E80[0] = 0; - D_80183E80[1] = func_800418AC(var_s1_2->bombPos[0], var_s1_2->bombPos[2], temp_s7->pos); + D_80183E80[1] = func_800418AC(var_s1_2->bombPos[0], var_s1_2->bombPos[2], camera->pos); D_80183E80[2] = 0x8000; func_800563DC(objectIndex, cameraId, 0x000000FF); - func_80056E24(var_s2, temp_s7->pos); + func_80056E24(i, camera->pos); if (((u32) temp_s4 < 0x4E21U) && (state != BOMB_STATE_EXPLODED)) { - func_80056FCC(var_s2); + func_80056FCC(i); } } } diff --git a/src/hud_renderer.h b/src/render_objects.h similarity index 87% rename from src/hud_renderer.h rename to src/render_objects.h index 20c34f496..8eb66a754 100644 --- a/src/hud_renderer.h +++ b/src/render_objects.h @@ -1,5 +1,5 @@ -#ifndef hud_renderer_H -#define hud_renderer_H +#ifndef RENDER_OBJECTS_H +#define RENDER_OBJECTS_H #include "common_structs.h" #include "main.h" @@ -22,17 +22,17 @@ void func_800437F8(s32, s32, u16, f32, Vtx*, s32); void func_800438C4(s32, s32, u16, f32, Vtx*, s32); void func_8004398C(s32, s32, u16, f32, Vtx*, s32); s32 func_80043A54(s32); -void func_80043A84(u8*, s32, s32); -void func_80043C28(u8*, s32, s32); -void func_80043D50(u8*, s32, s32); -void func_80043EF8(u8*, s32, s32, s32); +void load_texture_block_rgba32_nomirror(u8*, s32, s32); +void load_texture_tile_rgba32_nomirror(u8*, s32, s32); +void load_texture_block_rgba16_mirror(u8*, s32, s32); +void load_texture_block_rgba16_nomirror(u8*, s32, s32, s32); -void func_800440B8(u8*, s32, s32); -void func_800441E0(u8*, s32, s32); -void func_80044388(u8*, s32, s32); -void func_800444B0(u8*, s32, s32); -void func_80044658(u8*, s32, s32); -void func_8004477C(u8*, s32, s32); +void load_texture_tile_rgba16_nomirror(u8*, s32, s32); +void load_texture_block_ia16_nomirror(u8*, s32, s32); +void load_texture_tile_ia16_nomirror(u8*, s32, s32); +void load_texture_block_ia8_nomirror(u8*, s32, s32); +void load_texture_tile_ia8_nomirror(u8*, s32, s32); +void load_texture_block_i8_nomirror(u8*, s32, s32); void func_80044AB8(u8*, s32, s32); void func_80044BF8(u8*, s32, s32); @@ -74,7 +74,7 @@ void func_80046CDC(s32, s32, u16, f32, u8*); void func_80046D40(Vec3f, Vec3su, f32, u8*); void func_80046D90(s32, s32, u16, f32, u8*); void func_80046DF4(s32, s32, u16, f32, s32, u8*); -void func_80046E60(u8*, u8*, s32, s32); +void load_texture_and_tlut(u8*, u8*, s32, s32); void func_80046F60(u8*, u8*, s32, s32, s32); void func_80047068(u8*, u8*, Vtx*, s32, s32, s32, s32); @@ -98,7 +98,7 @@ void func_80047F40(Vec3f, Vec3su, f32, u8*, u8*, Vtx*, s32, s32, s32, s32); void func_80047FBC(Vec3f, Vec3su, f32, u8*, u8*, Vtx*, s32, s32, s32, s32); void func_80048038(Vec3f, Vec3su, f32, u8*, u8*, Vtx*, s32, s32, s32, s32); -void func_800480B4(Vec3f, Vec3su, f32, u8*, u8*, Vtx*, s32, s32, s32, s32); +void draw_2d_texture_at(Vec3f, Vec3su, f32, u8*, u8*, Vtx*, s32, s32, s32, s32); void func_80048130(Vec3f, Vec3su, f32, u8*, u8*, Vtx*, s32, s32, s32, s32, s32); void func_800481B4(Vec3f, Vec3su, f32, u8*, u8*, Vtx*, s32, s32, s32); void func_80048228(Vec3f, Vec3su, f32, s32, u8*, u8*, Vtx*, s32, s32, s32, s32); @@ -189,7 +189,7 @@ void func_8004B02C(void); void func_8004B05C(u8*); void func_8004B138(s32, s32, s32, s32); void func_8004B180(s32, s32, s32, s32); -void func_8004B1C8(s32, s32, s32, s32, s32, s32, s32); +void set_color_render(s32, s32, s32, s32, s32, s32, s32); void func_8004B254(s32, s32, s32); void set_transparency(s32); void func_8004B310(s32); @@ -214,7 +214,7 @@ void func_8004C024(s16, s16, s16, u16, u16, u16, u16); void func_8004C148(s16, s16, s16, u16, u16, u16, u16); void func_8004C354(void); void func_8004C35C(void); -void func_8004C364(s32, s32, u32, u32, u8*); +void draw_hud_2d_texture(s32, s32, u32, u32, u8*); void func_8004C450(s32, s32, u32, u32, u8*); void func_8004C53C(s32, s32, u32, u32, u8*); void func_8004C628(s32, s32, u32, u32, u8*); @@ -222,15 +222,15 @@ void func_8004C8D4(s16, s16); void func_8004C91C(s32, s32, u8*, s32, s32, s32); void func_8004C9D8(s32, s32, s32, u8*, s32, s32, s32, s32); void func_8004CA58(s32, s32, f32, u8*, s32, s32); -void func_8004CAD0(s32, s32, u8*); -void func_8004CB00(s32, s32, u8*); -void func_8004CB30(s32, s32, u8*); -void func_8004CB60(s32, s32, u8*); -void func_8004CB90(s32, s32, u8*); +void draw_hud_2d_texture_8x8(s32, s32, u8*); +void draw_hud_2d_texture_8x16(s32, s32, u8*); +void draw_hud_2d_texture_16x16(s32, s32, u8*); +void draw_hud_2d_texture_32x8(s32, s32, u8*); +void draw_hud_2d_texture_32x16(s32, s32, u8*); void func_8004CBC0(s32, s32, f32, u8*); -void func_8004CBF4(s32, s32, u8*); +void draw_hud_2d_texture_32x32(s32, s32, u8*); void func_8004CC24(s32, s32, u8*); -void func_8004CC54(s32, s32, u8*); +void draw_hud_2d_texture_40x32(s32, s32, u8*); void func_8004CC84(s32, s32, u8*); void func_8004CCB4(s32, s32, u8*); void func_8004CCE4(s32, s32, f32, u8*); @@ -282,9 +282,9 @@ void func_8004E568(s32, s32, u8*, u8*); void func_8004E59C(s32, s32, s32, u8*, u8*); void func_8004E5D8(s32, s32, u8*, u8*); void func_8004E604(s32, s32, u8*, u8*); -void func_8004E638(s32); +void draw_item_window(s32); void func_8004E6C4(s32); -void func_8004E78C(s32); +void draw_simplified_lap_count(s32); void func_8004E800(s32); void func_8004E998(s32); void func_8004EB30(s32); @@ -300,9 +300,9 @@ void func_8004F3E4(s32); s32 func_8004F674(s32*, s32); void print_timer(s32, s32, s32); void func_8004F950(s32, s32, s32, s32); -void func_8004F9CC(s32, s32, s32); -void func_8004FA78(s32); -void func_8004FC78(s16, s16, s8); +void print_timer_rainbow(s32, s32, s32); +void render_hud_timer(s32); +void draw_lap_count(s16, s16, s8); void func_8004FDB4(f32, f32, s16, s16, s16, s32, s32, s32, s32); void func_80050320(void); @@ -313,8 +313,8 @@ void func_80050C68(void); void func_80050E34(s32, s32); void func_800514BC(void); -void func_80051638(s32); -void func_800517C8(void); +void render_object_leaf_particle(s32); +void render_object_snowflakes_particles(void); void func_800518F8(s32, s16, s16); void func_800519D4(s32, s16, s16); void func_80051ABC(s16, s32); @@ -328,35 +328,34 @@ void func_80052080(void); void func_800520C0(s32); void func_8005217C(s32); void func_800523B8(s32, s32, u32); -void func_800524B4(s32); -void func_800524B4(s32); -void func_80052590(s32); -void func_800527D8(s32); +void render_object_boos(s32); +void render_object_bat(s32); +void render_object_trash_bin(s32); void func_8005285C(s32); void func_800528EC(s32); -void func_80052C60(s32); +void render_ice_block(s32); void func_80052D70(s32); void func_80052E30(s32); -void func_80052F20(s32); +void render_object_snowmans_list_2(s32); -void func_8005309C(s32); -void func_8005327C(s32); -void func_800532A4(s32); +void render_object_snowmans_list_1(s32); +void render_object_snowmans(s32); +void render_lakitu(s32); void func_800534A4(s32); void func_800534E8(s32); -void func_800536C8(s32); -void func_80053870(s32); +void render_object_thwomps_model(s32); +void render_object_thwomps(s32); void func_80053D74(s32, s32, s32); void func_80053E6C(s32); -void func_800540CC(s32, s32); -void func_800541BC(s32); -void func_80054324(s32, s32); -void func_80054414(s32); -void func_8005457C(s32, s32); -void func_80054664(s32); +void render_object_train_smoke_particle(s32, s32); +void render_object_train_smoke_particles(s32); +void render_object_paddle_boat_smoke_particle(s32, s32); +void render_object_paddle_boat_smoke_particles(s32); +void render_object_bowser_flame_particle(s32, s32); +void render_object_bowser_flame(s32); void func_8005477C(s32, u8, Vec3f); -void func_80054938(s32); +void render_object_smoke_particles(s32); void func_80054AFC(s32, Vec3f); void func_80054BE8(s32); void func_80054D00(s32, s32); @@ -364,28 +363,28 @@ void func_80054E10(s32); void func_80054EB8(s32); void func_80054F04(s32); -void func_800550A4(s32); +void render_object_moles(s32); void func_80055164(s32); void func_80055228(s32); void func_800552BC(s32); -void func_80055380(s32); -void func_80055458(s32, s32); -void func_80055528(s32); +void render_object_seagulls(s32); +void draw_crabs(s32, s32); +void render_object_crabs(s32); void func_800555BC(s32, s32); -void func_8005568C(s32); +void render_object_hedgehogs(s32); void func_800557AC(void); void func_800557B4(s32, u32, u32); -void func_8005592C(s32); +void render_object_train_penguins(s32); void func_80055AB8(s32, s32); -void func_80055C38(s32); +void render_object_chain_chomps(s32); void func_80055CCC(s32, s32); -void func_80055E68(s32); +void render_object_hot_air_balloon(s32); void func_80055EF4(s32, s32); void func_80055F48(s32); void func_80055FA0(s32, s32); void func_80056160(s32); -void func_80056188(s32); +void render_object_neon(s32); void func_800562E4(s32, s32, s32); void func_800563DC(s32, s32, s32); void func_800568A0(s32, s32); @@ -393,7 +392,7 @@ void func_8005669C(s32, s32, s32); void func_800569F4(s32); void func_80056A40(s32, s32); void func_80056A94(s32); -void func_80056AC0(s32); +void render_object_bomb_kart(s32); void func_80056E24(s32, Vec3f); void func_80056FCC(s32); diff --git a/src/render_player.c b/src/render_player.c index e6e4a221d..542049bad 100644 --- a/src/render_player.c +++ b/src/render_player.c @@ -16,7 +16,7 @@ #include "buffers.h" #include "waypoints.h" #include "player_controller.h" -#include "hud_renderer.h" +#include "render_objects.h" #include "common_textures.h" #include "skybox_and_splitscreen.h" #include "spawn_players.h" diff --git a/src/code_80071F00.c b/src/update_objects.c similarity index 89% rename from src/code_80071F00.c rename to src/update_objects.c index 2115740db..8f0dea1b4 100644 --- a/src/code_80071F00.c +++ b/src/update_objects.c @@ -3,13 +3,13 @@ #include #include -#include "code_80071F00.h" +#include "update_objects.h" #include "main.h" #include "memory.h" #include "camera.h" #include "math_util.h" #include "math_util_2.h" -#include "hud_renderer.h" +#include "render_objects.h" #include "objects.h" #include "waypoints.h" #include "code_800029B0.h" @@ -81,7 +81,7 @@ u8 *gItemWindowTextures[] = { common_texture_item_window_mushroom, common_texture_item_window_double_mushroom, common_texture_item_window_triple_mushroom, common_texture_item_window_super_mushroom }; -u8 *D_800E4570[] = { +u8 *gHudLapTextures[] = { common_texture_hud_lap_1_on_3, common_texture_hud_lap_2_on_3, common_texture_hud_lap_3_on_3 }; @@ -182,7 +182,7 @@ void func_80072120(s32 *arg0, s32 arg1) { s32 i; for (i = 0; i < arg1; i++) { - set_object_flag_unk_054_false(*arg0, 0x00600000); + set_object_flag_status_false(*arg0, 0x00600000); arg0++; } } @@ -196,29 +196,29 @@ void func_80072180(void) { } } -void set_object_flag_unk_054_true(s32 objectIndex, s32 flag) { - gObjectList[objectIndex].unk_054 |= flag; +void set_object_flag_status_true(s32 objectIndex, s32 flag) { + gObjectList[objectIndex].status |= flag; } -void set_object_flag_unk_054_false(s32 objectIndex, s32 flag) { - gObjectList[objectIndex].unk_054 &= ~flag; +void set_object_flag_status_false(s32 objectIndex, s32 flag) { + gObjectList[objectIndex].status &= ~flag; } UNUSED void func_80072214(s32 objectIndex, s32 arg1) { - gObjectList[objectIndex].unk_054 ^= arg1; + gObjectList[objectIndex].status ^= arg1; } -bool is_obj_index_flag_unk_054_active(s32 objectIndex, s32 arg1) { +bool is_obj_flag_status_active(s32 objectIndex, s32 arg1) { s32 phi_v1 = FALSE; - if ((gObjectList[objectIndex].unk_054 & arg1) != 0) { + if ((gObjectList[objectIndex].status & arg1) != 0) { phi_v1 = TRUE; } return phi_v1; } -s32 is_obj_index_flag_unk_054_inactive(s32 objectIndex, s32 arg1) { +s32 is_obj_index_flag_status_inactive(s32 objectIndex, s32 arg1) { s32 phi_v1 = 0; - if ((gObjectList[objectIndex].unk_054 & arg1) == 0) { + if ((gObjectList[objectIndex].status & arg1) == 0) { phi_v1 = 1; } return phi_v1; @@ -236,12 +236,12 @@ UNUSED void func_800722F8(s32 objectIndex, s32 arg1) { gObjectList[objectIndex].unk_058 ^= arg1; } -s32 func_80072320(s32 objectIndex, s32 arg1) { - s32 phi_v1 = 0; +bool func_80072320(s32 objectIndex, s32 arg1) { + s32 b = FALSE; if ((gObjectList[objectIndex].unk_058 & arg1) != 0) { - phi_v1 = 1; + b = TRUE; } - return phi_v1; + return b; } bool func_80072354(s32 objectIndex, s32 arg1) { @@ -257,7 +257,7 @@ void set_object_unk_0CB(s32 objectIndex, s32 arg1) { } void init_object(s32 objectIndex, s32 arg1) { - gObjectList[objectIndex].unk_054 = 0; + gObjectList[objectIndex].status = 0; gObjectList[objectIndex].unk_058 = 0; gObjectList[objectIndex].unk_05C = 0; gObjectList[objectIndex].unk_0CD = 0; @@ -275,7 +275,7 @@ void func_80072428(s32 objectIndex) { gObjectList[objectIndex].state = 0; gObjectList[objectIndex].unk_0D8 = 0; set_object_unk_0CB(objectIndex, 0); - gObjectList[objectIndex].unk_054 = 0; + gObjectList[objectIndex].status = 0; gObjectList[objectIndex].unk_058 = 0; gObjectList[objectIndex].unk_05C = 0; func_80086F60(objectIndex); @@ -283,7 +283,7 @@ void func_80072428(s32 objectIndex) { void func_80072488(s32 objectIndex) { set_object_unk_0CB(objectIndex, 0); - set_object_flag_unk_054_false(objectIndex, 0x2000); + set_object_flag_status_false(objectIndex, 0x2000); gObjectList[objectIndex].state++; } @@ -303,8 +303,8 @@ s16 func_80072530(s32 objectIndex) { void func_80072568(s32 objectIndex, s32 arg1) { set_object_unk_0CB(objectIndex, 0); - set_object_flag_unk_054_false(objectIndex, 0x2000); - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 0x2000); + set_object_flag_status_false(objectIndex, 8); func_80072488(objectIndex); func_800724F8(objectIndex, gObjectList[objectIndex].state); gObjectList[objectIndex].state = arg1; @@ -312,8 +312,8 @@ void func_80072568(s32 objectIndex, s32 arg1) { void func_800725E8(s32 objectIndex, s32 arg1, s32 arg2) { set_object_unk_0CB(objectIndex, 0); - set_object_flag_unk_054_false(objectIndex, 0x2000); - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 0x2000); + set_object_flag_status_false(objectIndex, 8); gObjectList[objectIndex].state = arg2; func_800724F8(objectIndex, gObjectList[objectIndex].state); gObjectList[objectIndex].state = arg1; @@ -323,14 +323,14 @@ s16 func_80072530(s32); // extern void func_8007266C(s32 objectIndex) { set_object_unk_0CB(objectIndex, 0); - set_object_flag_unk_054_false(objectIndex, 0x2000); - set_object_flag_unk_054_false(objectIndex, 8); + set_object_flag_status_false(objectIndex, 0x2000); + set_object_flag_status_false(objectIndex, 8); gObjectList[objectIndex].state = func_80072530(objectIndex); } void func_800726CC(s32 objectIndex, s32 arg1) { set_object_unk_0CB(objectIndex, 0); - set_object_flag_unk_054_false(objectIndex, 0x2000); + set_object_flag_status_false(objectIndex, 0x2000); gObjectList[objectIndex].state = arg1; } @@ -476,14 +476,14 @@ s32 func_80072B48(s32 objectIndex, s32 arg1) { phi_v1 = 0; if (gObjectList[objectIndex].unk_0CB == 0) { set_object_unk_0CB(objectIndex, 1); - set_object_flag_unk_054_true(objectIndex, 0x80000); + set_object_flag_status_true(objectIndex, 0x80000); gObjectList[objectIndex].itemDisplay = D_8018D140; gObjectList[objectIndex].unk_050 = arg1; } gObjectList[objectIndex].unk_050--; if (gObjectList[objectIndex].unk_050 < 0) { - set_object_flag_unk_054_false(objectIndex, 0x80000); + set_object_flag_status_false(objectIndex, 0x80000); set_object_unk_0CB(objectIndex, 0); func_80072488(objectIndex); phi_v1 = 1; @@ -493,21 +493,21 @@ s32 func_80072B48(s32 objectIndex, s32 arg1) { } void func_80072C00(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3) { - if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x2000) != 0) { + if (is_obj_index_flag_status_inactive(objectIndex, 0x2000) != 0) { gObjectList[objectIndex].unk_050 = arg2; gObjectList[objectIndex].itemDisplay = arg1; gObjectList[objectIndex].unk_0D4 = 1; gObjectList[objectIndex].unk_0CC = arg3; - set_object_flag_unk_054_true(objectIndex, 0x2000); + set_object_flag_status_true(objectIndex, 0x2000); } else { gObjectList[objectIndex].unk_050--; if (gObjectList[objectIndex].unk_050 < 0) { gObjectList[objectIndex].unk_050 = arg2; gObjectList[objectIndex].unk_0D4--; if ((gObjectList[objectIndex].unk_0D4 & 1) != 0) { - set_object_flag_unk_054_false(objectIndex, 0x80000); + set_object_flag_status_false(objectIndex, 0x80000); } else { - set_object_flag_unk_054_true(objectIndex, 0x80000); + set_object_flag_status_true(objectIndex, 0x80000); } if (gObjectList[objectIndex].unk_0D4 < 0) { @@ -518,7 +518,7 @@ void func_80072C00(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3) { } if (gObjectList[objectIndex].unk_0CC == 0) { - set_object_flag_unk_054_false(objectIndex, 0x2000); + set_object_flag_status_false(objectIndex, 0x2000); func_80072488(objectIndex); } } @@ -527,12 +527,12 @@ void func_80072C00(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3) { } void func_80072D3C(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { - if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x2000) != 0) { + if (is_obj_index_flag_status_inactive(objectIndex, 0x2000) != 0) { gObjectList[objectIndex].unk_050 = arg3; gObjectList[objectIndex].itemDisplay = arg1; gObjectList[objectIndex].unk_0D4 = 1; gObjectList[objectIndex].unk_0CC = arg4; - set_object_flag_unk_054_true(objectIndex, 0x2000); + set_object_flag_status_true(objectIndex, 0x2000); return; } @@ -553,7 +553,7 @@ void func_80072D3C(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { } if (gObjectList[objectIndex].unk_0CC == 0) { - set_object_flag_unk_054_false(objectIndex, 0x2000); + set_object_flag_status_false(objectIndex, 0x2000); func_80072488(objectIndex); } } @@ -564,12 +564,12 @@ s32 func_80072E54(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 a s32 sp24; sp24 = 0; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x2000) != 0) { + if (is_obj_index_flag_status_inactive(objectIndex, 0x2000) != 0) { gObjectList[objectIndex].itemDisplay = arg1; gObjectList[objectIndex].unk_050 = arg4; gObjectList[objectIndex].unk_0CC = arg5; set_object_unk_0CB(objectIndex, 1); - set_object_flag_unk_054_true(objectIndex, 0x2000); + set_object_flag_status_true(objectIndex, 0x2000); } else { gObjectList[objectIndex].unk_050--; if (gObjectList[objectIndex].unk_050 <= 0) { @@ -582,7 +582,7 @@ s32 func_80072E54(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 a } if (gObjectList[objectIndex].unk_0CC == 0) { gObjectList[objectIndex].itemDisplay = arg2; - set_object_flag_unk_054_false(objectIndex, 0x2000); + set_object_flag_status_false(objectIndex, 0x2000); set_object_unk_0CB(objectIndex, 0); func_80072488(objectIndex); sp24 = 1; @@ -599,12 +599,12 @@ bool func_80072F88(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 s32 sp24; sp24 = FALSE; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x2000) != 0) { + if (is_obj_index_flag_status_inactive(objectIndex, 0x2000) != 0) { gObjectList[objectIndex].itemDisplay = arg1; gObjectList[objectIndex].unk_050 = arg4; gObjectList[objectIndex].unk_0CC = arg5; set_object_unk_0CB(objectIndex, 1); - set_object_flag_unk_054_true(objectIndex, 0x2000); + set_object_flag_status_true(objectIndex, 0x2000); } else { gObjectList[objectIndex].unk_050--; if (gObjectList[objectIndex].unk_050 <= 0) { @@ -616,7 +616,7 @@ bool func_80072F88(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 } if (gObjectList[objectIndex].unk_0CC == 0) { gObjectList[objectIndex].itemDisplay = arg2; - set_object_flag_unk_054_false(objectIndex, 0x2000); + set_object_flag_status_false(objectIndex, 0x2000); set_object_unk_0CB(objectIndex, 0); func_80072488(objectIndex); sp24 = TRUE; @@ -633,22 +633,22 @@ bool func_800730BC(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 s32 sp24; sp24 = FALSE; - if (is_obj_index_flag_unk_054_inactive(objectIndex ,0x2000) != 0) { + if (is_obj_index_flag_status_inactive(objectIndex ,0x2000) != 0) { gObjectList[objectIndex].itemDisplay = arg1; gObjectList[objectIndex].unk_050 = arg4; gObjectList[objectIndex].unk_0CC = arg5; set_object_unk_0CB(objectIndex, 1); - set_object_flag_unk_054_true(objectIndex, 0x2000); - set_object_flag_unk_054_false(objectIndex, 0x4000); + set_object_flag_status_true(objectIndex, 0x2000); + set_object_flag_status_false(objectIndex, 0x4000); } else { gObjectList[objectIndex].unk_050--; if (gObjectList[objectIndex].unk_050 <= 0) { gObjectList[objectIndex].unk_050 = arg4; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x4000) != 0) { + if (is_obj_index_flag_status_inactive(objectIndex, 0x4000) != 0) { gObjectList[objectIndex].itemDisplay += arg3; if (gObjectList[objectIndex].itemDisplay >= arg2) { gObjectList[objectIndex].itemDisplay = arg2; - set_object_flag_unk_054_true(objectIndex, 0x4000); + set_object_flag_status_true(objectIndex, 0x4000); } } else { gObjectList[objectIndex].itemDisplay -= arg3; @@ -659,14 +659,14 @@ bool func_800730BC(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 } if (gObjectList[objectIndex].unk_0CC == 0) { - set_object_flag_unk_054_false(objectIndex, 0x80); - set_object_flag_unk_054_false(objectIndex, 0x2000); + set_object_flag_status_false(objectIndex, 0x80); + set_object_flag_status_false(objectIndex, 0x2000); set_object_unk_0CB(objectIndex, 0); func_80072488(objectIndex); sp24 = TRUE; } else { - set_object_flag_unk_054_false(objectIndex, 0x4000); - set_object_flag_unk_054_true(objectIndex, 0x80); + set_object_flag_status_false(objectIndex, 0x4000); + set_object_flag_status_true(objectIndex, 0x80); } } } @@ -679,22 +679,22 @@ s32 func_8007326C(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 a s32 sp24; sp24 = 0; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x2000) != 0) { + if (is_obj_index_flag_status_inactive(objectIndex, 0x2000) != 0) { gObjectList[objectIndex].itemDisplay = arg1; gObjectList[objectIndex].unk_050 = arg4; gObjectList[objectIndex].unk_0CC = arg5; set_object_unk_0CB(objectIndex, 1); - set_object_flag_unk_054_true(objectIndex, 0x2000); - set_object_flag_unk_054_false(objectIndex, 0x4000); + set_object_flag_status_true(objectIndex, 0x2000); + set_object_flag_status_false(objectIndex, 0x4000); } else { gObjectList[objectIndex].unk_050--; if (gObjectList[objectIndex].unk_050 <= 0) { gObjectList[objectIndex].unk_050 = arg4; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x4000) != 0) { + if (is_obj_index_flag_status_inactive(objectIndex, 0x4000) != 0) { gObjectList[objectIndex].itemDisplay -= arg3; if (arg2 >= gObjectList[objectIndex].itemDisplay) { gObjectList[objectIndex].itemDisplay = arg2; - set_object_flag_unk_054_true(objectIndex, 0x4000); + set_object_flag_status_true(objectIndex, 0x4000); } } else { gObjectList[objectIndex].itemDisplay += arg3; @@ -704,12 +704,12 @@ s32 func_8007326C(s32 objectIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 a gObjectList[objectIndex].unk_0CC--; } if (gObjectList[objectIndex].unk_0CC == 0) { - set_object_flag_unk_054_false(objectIndex, 0x2000); + set_object_flag_status_false(objectIndex, 0x2000); set_object_unk_0CB(objectIndex, 0); func_80072488(objectIndex); sp24 = 1; } else { - set_object_flag_unk_054_false(objectIndex, 0x4000); + set_object_flag_status_false(objectIndex, 0x4000); } } } @@ -724,7 +724,7 @@ void func_80073404(s32 objectIndex, u8 arg1, u8 arg2, Vtx *arg3) { gObjectList[objectIndex].textureHeight = arg2; gObjectList[objectIndex].itemDisplay = 0; gObjectList[objectIndex].unk_0D3 = -1; - gObjectList[objectIndex].unk_054 = 0; + gObjectList[objectIndex].status = 0; } void init_texture_object(s32 objectIndex, u8 *texture, u8* arg2, u8 arg3, u16 arg4) { @@ -734,7 +734,7 @@ void init_texture_object(s32 objectIndex, u8 *texture, u8* arg2, u8 arg3, u16 ar gObjectList[objectIndex].textureHeight = arg4; gObjectList[objectIndex].itemDisplay = 0; gObjectList[objectIndex].unk_0D3 = -1; - gObjectList[objectIndex].unk_054 = 0; + gObjectList[objectIndex].status = 0; } UNUSED void func_8007348C(s32 objectIndex, u8 *arg1, u8 arg2, u8 arg3, Vtx *arg4) { @@ -745,7 +745,7 @@ UNUSED void func_8007348C(s32 objectIndex, u8 *arg1, u8 arg2, u8 arg3, Vtx *arg4 gObjectList[objectIndex].vertex = arg4; gObjectList[objectIndex].itemDisplay = 0; gObjectList[objectIndex].unk_0D3 = -1; - gObjectList[objectIndex].unk_054 = 0; + gObjectList[objectIndex].status = 0; } UNUSED void func_800734D4() { @@ -776,7 +776,7 @@ UNUSED void func_80073570(s32 objectIndex) { } void func_800735BC(s32 objectIndex, Gfx *arg1, f32 arg2) { - gObjectList[objectIndex].unk_054 = 0; + gObjectList[objectIndex].status = 0; gObjectList[objectIndex].model = arg1; gObjectList[objectIndex].sizeScaling = arg2; func_80072488(objectIndex); @@ -786,26 +786,26 @@ void func_80073600(s32 objectIndex) { set_object_unk_0CB(objectIndex, 0); gObjectList[objectIndex].unk_0D6 = 0; gObjectList[objectIndex].unk_04C = -1; - set_object_flag_unk_054_false(objectIndex, 0x8000); + set_object_flag_status_false(objectIndex, 0x8000); } void func_80073654(s32 objectIndex) { - set_object_flag_unk_054_false(objectIndex, 0x8000); + set_object_flag_status_false(objectIndex, 0x8000); ++gObjectList[objectIndex].unk_0D6; } UNUSED void func_8007369C(s32 objectIndex, s32 arg1) { - set_object_flag_unk_054_false(objectIndex, 0x8000); + set_object_flag_status_false(objectIndex, 0x8000); gObjectList[objectIndex].unk_0D6 = arg1; } void func_800736E0(s32 objectIndex) { - set_object_flag_unk_054_false(objectIndex, 0x8000); + set_object_flag_status_false(objectIndex, 0x8000); gObjectList[objectIndex].unk_0D6 = 1; } void func_80073720(s32 objectIndex) { - set_object_flag_unk_054_false(objectIndex, 0x8000); + set_object_flag_status_false(objectIndex, 0x8000); gObjectList[objectIndex].unk_0D6 = 0; } @@ -813,13 +813,13 @@ bool func_8007375C(s32 objectIndex, s32 arg1) { s32 sp24; sp24 = FALSE; - if (is_obj_index_flag_unk_054_inactive(objectIndex, 0x00008000) != 0) { + if (is_obj_index_flag_status_inactive(objectIndex, 0x00008000) != 0) { gObjectList[objectIndex].unk_04C = arg1; - set_object_flag_unk_054_true(objectIndex, 0x00008000); + set_object_flag_status_true(objectIndex, 0x00008000); } gObjectList[objectIndex].unk_04C--; if (gObjectList[objectIndex].unk_04C < 0) { - set_object_flag_unk_054_false(objectIndex, 0x00008000); + set_object_flag_status_false(objectIndex, 0x00008000); func_80073654(objectIndex); sp24 = TRUE; } @@ -1184,11 +1184,11 @@ void func_80074344(s32 objectIndex, f32* arg1, f32 arg2, f32 arg3, f32 arg4, s32 } void func_80074478(s32 objectIndex) { - gObjectList[objectIndex].unk_054 |= 1; + gObjectList[objectIndex].status |= 1; } void func_800744A0(s32 objectIndex) { - gObjectList[objectIndex].unk_054 &= ~1; + gObjectList[objectIndex].status &= ~1; } void func_800744CC(void) { @@ -1212,14 +1212,14 @@ void func_80074574(u8 *arg0, void *arg1, u16 arg2, u16 arg3) { void func_800745C8(s32 objectIndex, s32 arg1) { s32 phi_a1; - if ((gObjectList[objectIndex].unk_054 & 1) != 0) { + if ((gObjectList[objectIndex].status & 1) != 0) { phi_a1 = 0; if (gObjectList[objectIndex].tlutList != gObjectList[objectIndex].activeTLUT) { gObjectList[objectIndex].activeTLUT = gObjectList[objectIndex].tlutList; } - gObjectList[objectIndex].unk_054 ^= 2; - if ((gObjectList[objectIndex].unk_054 & 2) != 0) { + gObjectList[objectIndex].status ^= 2; + if ((gObjectList[objectIndex].status & 2) != 0) { phi_a1 = 1; } @@ -1231,12 +1231,12 @@ void func_800745C8(s32 objectIndex, s32 arg1) { void func_8007466C(s32 objectIndex, s32 arg1) { s32 phi_a1; - if ((gObjectList[objectIndex].unk_054 & 1) != 0) { + if ((gObjectList[objectIndex].status & 1) != 0) { // I have no idea why this typecase works gObjectList[objectIndex].activeTLUT = (u32*)gObjectList[objectIndex].tlutList + (gObjectList[objectIndex].unk_0D3 << 7) ; - gObjectList[objectIndex].unk_054 ^= 2; + gObjectList[objectIndex].status ^= 2; phi_a1 = 0; - if ((gObjectList[objectIndex].unk_054 & 2) != 0) { + if ((gObjectList[objectIndex].status & 2) != 0) { phi_a1 = 1; } gObjectList[objectIndex].activeTexture = (u8 *) (gObjectList[objectIndex].textureWidth * gObjectList[objectIndex].textureHeight * phi_a1) + arg1; @@ -1247,11 +1247,11 @@ void func_8007466C(s32 objectIndex, s32 arg1) { void func_80074704(s32 objectIndex, s32 arg1) { s32 phi_a1; - if ((gObjectList[objectIndex].unk_054 & 1) != 0) { + if ((gObjectList[objectIndex].status & 1) != 0) { gObjectList[objectIndex].activeTLUT = gObjectList[objectIndex].tlutList; - gObjectList[objectIndex].unk_054 ^= 2; + gObjectList[objectIndex].status ^= 2; phi_a1 = 0; - if ((gObjectList[objectIndex].unk_054 & 2) != 0) { + if ((gObjectList[objectIndex].status & 2) != 0) { phi_a1 = 1; } gObjectList[objectIndex].activeTexture = (u8 *) (gObjectList[objectIndex].textureWidth * gObjectList[objectIndex].textureHeight * phi_a1) + arg1; @@ -1262,9 +1262,9 @@ void func_80074704(s32 objectIndex, s32 arg1) { u8 *func_80074790(s32 objectIndex, u8 *arg1) { s32 phi_a2; - gObjectList[objectIndex].unk_054 ^= 4; + gObjectList[objectIndex].status ^= 4; phi_a2 = 0; - if ((gObjectList[objectIndex].unk_054 & 4) != 0) { + if ((gObjectList[objectIndex].status & 4) != 0) { phi_a2 = 1; } return (gObjectList[objectIndex].textureWidth * gObjectList[objectIndex].textureHeight * phi_a2) + arg1; @@ -1336,7 +1336,7 @@ void func_80074924(s32 objectIndex) { temp_s0->origin_pos[2] = (f32) (((f64) D_80165728 + 200.0) - (f64) sp24); break; } - func_8008B80C(objectIndex, 0, 0, 0); + set_obj_origin_offset(objectIndex, 0, 0, 0); if (gPlayerCount == 1) { temp_s0->velocity[1] = (f32) (((f64) (f32) (sp2C % 4) * 0.25) + 0.8); } else { @@ -1355,18 +1355,18 @@ void func_80074924(s32 objectIndex) { } else { temp_s0->unk_084[7] = -0x100 - (sp20 / 32); } - temp_s0->unk_0A0 = 0x00E6; + temp_s0->primAlpha = 0x00E6; func_80072488(objectIndex); } void func_80074D94(s32 objectIndex) { if (gObjectList[objectIndex].unk_0AE == 1) { - if ((D_80165740 <= gObjectList[objectIndex].unk_028[1]) && (s16_step_down_towards(&gObjectList[objectIndex].unk_0A0, 0, 8) != 0)) { + if ((D_80165740 <= gObjectList[objectIndex].offset[1]) && (s16_step_down_towards(&gObjectList[objectIndex].primAlpha, 0, 8) != 0)) { func_80086F60(objectIndex); } - func_800877C4(objectIndex); + object_add_velocity_offset_y(objectIndex); } - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } void func_80074E28(s32 objectIndex) { @@ -1424,7 +1424,7 @@ void func_80074FD8(s32 objectIndex) { if (func_80087E08(objectIndex, gObjectList[objectIndex].velocity[1], 0.12f, gObjectList[objectIndex].unk_034, gObjectList[objectIndex].direction_angle[1], 0x00000064) != 0) { func_80072488(objectIndex); } - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); gObjectList[objectIndex].orientation[0] += D_8016582C[0]; gObjectList[objectIndex].orientation[1] += D_8016582C[1]; gObjectList[objectIndex].orientation[2] += D_8016582C[2]; @@ -1549,13 +1549,13 @@ void func_80075698(s32 objectIndex) { gObjectList[objectIndex].unk_0D5 = 1; gObjectList[objectIndex].activeTexture = D_8018D490; gObjectList[objectIndex].textureList = D_8018D490; - gObjectList[objectIndex].unk_0A0 = 0xFF; + gObjectList[objectIndex].primAlpha = 0xFF; gObjectList[objectIndex].direction_angle[1] = 0; gObjectList[objectIndex].orientation[0] = 0; gObjectList[objectIndex].orientation[2] = 0; - gObjectList[objectIndex].unk_028[0] = 0.0f; - gObjectList[objectIndex].unk_028[1] = 0.0f; - gObjectList[objectIndex].unk_028[2] = 0.0f; + gObjectList[objectIndex].offset[0] = 0.0f; + gObjectList[objectIndex].offset[1] = 0.0f; + gObjectList[objectIndex].offset[2] = 0.0f; gObjectList[objectIndex].sizeScaling = 0.5f; func_80072488(objectIndex); } @@ -1567,9 +1567,9 @@ void func_80075714(s32 objectIndex) { break; case 2: gObjectList[objectIndex].velocity[1] -= 0.03; - f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 100.0f, gObjectList[objectIndex].velocity[1]); + f32_step_up_towards(&gObjectList[objectIndex].offset[1], 100.0f, gObjectList[objectIndex].velocity[1]); func_8007415C(objectIndex, &gObjectList[objectIndex].sizeScaling, 0.55f, 1.0f, 0.1f, 1, 0); - if (func_80073B00(objectIndex, &gObjectList[objectIndex].unk_0A0, 0xFF, 0x1E, 7, 0, 0) != 0) { + if (func_80073B00(objectIndex, &gObjectList[objectIndex].primAlpha, 0xFF, 0x1E, 7, 0, 0) != 0) { func_80072488(objectIndex); } break; @@ -1580,10 +1580,10 @@ void func_80075714(s32 objectIndex) { break; } - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } -void func_80075838(void) { +void update_train_smoke(void) { s32 pad[2]; s32 count; s32 i; @@ -1670,13 +1670,13 @@ void func_80075B08(s32 objectIndex) { gObjectList[objectIndex].unk_0D5 = 6; gObjectList[objectIndex].activeTexture = D_8018D490; gObjectList[objectIndex].textureList = D_8018D490; - gObjectList[objectIndex].unk_0A0 = 0xFF; + gObjectList[objectIndex].primAlpha = 0xFF; gObjectList[objectIndex].direction_angle[1] = 0; gObjectList[objectIndex].orientation[0] = 0; gObjectList[objectIndex].orientation[2] = 0; - gObjectList[objectIndex].unk_028[0] = 0.0f; - gObjectList[objectIndex].unk_028[1] = 0.0f; - gObjectList[objectIndex].unk_028[2] = 0.0f; + gObjectList[objectIndex].offset[0] = 0.0f; + gObjectList[objectIndex].offset[1] = 0.0f; + gObjectList[objectIndex].offset[2] = 0.0f; gObjectList[objectIndex].sizeScaling = 0.5f; func_80072488(objectIndex); } @@ -1688,9 +1688,9 @@ void func_80075B84(s32 objectIndex) { break; case 2: gObjectList[objectIndex].velocity[1] -= 0.03; - f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 100.0f, gObjectList[objectIndex].velocity[1]); + f32_step_up_towards(&gObjectList[objectIndex].offset[1], 100.0f, gObjectList[objectIndex].velocity[1]); func_8007415C(objectIndex, &gObjectList[objectIndex].sizeScaling, 0.55f, 1.0f, 0.1f, 1, 0); - if (func_80073B00(objectIndex, &gObjectList[objectIndex].unk_0A0, 0xFF, 0x1E, 7, 0, 0) != 0) { + if (func_80073B00(objectIndex, &gObjectList[objectIndex].primAlpha, 0xFF, 0x1E, 7, 0, 0) != 0) { func_80072488(objectIndex); } break; @@ -1701,10 +1701,10 @@ void func_80075B84(s32 objectIndex) { break; } - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } -void func_80075CA8(void) { +void update_ferries_smoke_particle(void) { s32 pad[2]; s32 count; s32 i; @@ -1716,7 +1716,7 @@ void func_80075CA8(void) { if (D_80165790 != 0) { D_80165790 -= 1; } - if ((gFerries[0].someFlags != 0) || (D_8016578C != 0)) { + if ((gPaddleBoats[0].someFlags != 0) || (D_8016578C != 0)) { count = 0; for (i = 0; i < 128; i++) { temp_a0 = gObjectParticle2[i]; @@ -1735,7 +1735,7 @@ void func_80075CA8(void) { D_8016578C = 100; } } - if ((gFerries[1].someFlags != 0) || (D_80165790 != 0)) { + if ((gPaddleBoats[1].someFlags != 0) || (D_80165790 != 0)) { count = 0; for (i = 0; i < 128; i++) { temp_a0 = gObjectParticle3[i]; @@ -1810,7 +1810,7 @@ void func_8007601C(s32 objectIndex) { if (gObjectList[objectIndex].unk_04C == 0) { func_8008A6DC(objectIndex, 300.0f); - if ((is_obj_index_flag_unk_054_active(objectIndex, 0x40000) != 0) && (func_80072354(objectIndex, 1) != 0)) { + if ((is_obj_flag_status_active(objectIndex, VISIBLE) != 0) && (func_80072354(objectIndex, 1) != 0)) { func_800722A4(objectIndex, 1); func_80075F98(gObjectList[objectIndex].pos, gObjectList[objectIndex].direction_angle[1], 1.0f); func_800C9D80(gObjectList[objectIndex].pos, gObjectList[objectIndex].velocity, SOUND_ARG_LOAD(0x51, 0x02, 0x80, 0x0A)); @@ -1884,9 +1884,9 @@ void func_8007634C(s32 objectIndex) { temp_v0 = &gObjectList[objectIndex]; temp_v0->activeTexture = common_texture_particle_smoke; temp_v0->textureList = common_texture_particle_smoke; - temp_v0->unk_0A0 = 0x00FF; + temp_v0->primAlpha = 0x00FF; set_obj_orientation(objectIndex, 0U, 0U, 0U); - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); func_80072488(objectIndex); } @@ -1914,7 +1914,7 @@ void func_800763CC(s32 objectIndex) { s16_step_towards(&temp_s0->type, 0, 0x0018); s16_step_towards(&temp_s0->unk_0A2, 0x0080, 0x000C); } - if ((temp_s0->unk_0AE >= 2) && (func_80073B00(objectIndex, &temp_s0->unk_0A0, 0x000000FF, 0x00000050, 0x00000020, 0, 0) != 0)) { + if ((temp_s0->unk_0AE >= 2) && (func_80073B00(objectIndex, &temp_s0->primAlpha, 0x000000FF, 0x00000050, 0x00000020, 0, 0) != 0)) { func_80072488(objectIndex); } break; @@ -1947,7 +1947,7 @@ void func_80076538(s32 objectIndex) { } if (gObjectList[objectIndex].unk_0AE > 0) { func_80087844(objectIndex); - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } } @@ -1969,7 +1969,7 @@ void func_8007661C(void) { } if (gObjectList[objectIndex].unk_04C == 0) { func_8008A6DC(objectIndex, 750.0f); - if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) && (func_80072354(objectIndex, 1) != 0)) { + if ((is_obj_flag_status_active(objectIndex, VISIBLE) != 0) && (func_80072354(objectIndex, 1) != 0)) { func_800722A4(objectIndex, 1); func_800762DC(gObjectList[objectIndex].pos, 1.0f); func_800C9D80(gObjectList[objectIndex].pos, gObjectList[objectIndex].velocity, 0x51038009U); @@ -2054,9 +2054,9 @@ void func_80076958(s32 objectIndex) { temp_v0 = &gObjectList[objectIndex]; temp_v0->activeTexture = common_texture_particle_smoke; temp_v0->textureList = common_texture_particle_smoke; - temp_v0->unk_0A0 = 0x00FF; + temp_v0->primAlpha = 0x00FF; set_obj_orientation(objectIndex, 0U, 0U, 0U); - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); func_80072488(objectIndex); } @@ -2078,7 +2078,7 @@ void func_800769D8(s32 objectIndex) { case 3: f32_step_towards(&temp_s0->sizeScaling, 2.0f, 0.05f); s16_step_towards(&temp_s0->type, 0, 0x0018); - if ((temp_s0->unk_0AE >= 2) && (func_80073B00(objectIndex, &temp_s0->unk_0A0, 0x000000FF, 0x00000050, 0x00000020, 0, 0) != 0)) { + if ((temp_s0->unk_0AE >= 2) && (func_80073B00(objectIndex, &temp_s0->primAlpha, 0x000000FF, 0x00000050, 0x00000020, 0, 0) != 0)) { func_80072488(objectIndex); } break; @@ -2103,8 +2103,8 @@ void func_80076AEC(s32 objectIndex) { } } if (gObjectList[objectIndex].unk_0AE > 0) { - func_800877C4(objectIndex); - func_8008BF18(objectIndex); + object_add_velocity_offset_y(objectIndex); + object_calculate_new_pos_offset(objectIndex); } } @@ -2112,7 +2112,7 @@ void func_80076B7C(void) { } -void update_particle_bowser_castle(void) { +void update_flame_particle(void) { s32 someIndex; s32 objectIndex; Objects *object; @@ -2139,7 +2139,7 @@ void update_particle_bowser_castle(void) { } } -void func_80076C9C(s32 objectIndex, Vec3f arg1, s16 arg2) { +void init_object_smoke_paticle(s32 objectIndex, Vec3f arg1, s16 arg2) { Objects *temp_v0; init_object(objectIndex, (s32) arg2); @@ -2152,15 +2152,15 @@ void func_80076C9C(s32 objectIndex, Vec3f arg1, s16 arg2) { temp_v0->type = 0x00FF; temp_v0->unk_034 = 0.0f; set_obj_orientation(objectIndex, 0U, 0U, 0U); - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); } -void func_80076D70(Vec3f arg0, UNUSED f32 arg1, s16 arg2) { +void init_smoke_particle(Vec3f arg0, UNUSED f32 arg1, s16 arg2) { s32 objectIndex; objectIndex = add_unused_obj_index(gObjectParticle4, &gNextFreeObjectParticle4, gObjectParticle4_SIZE); if (objectIndex != NULL_OBJECT_ID) { - func_80076C9C(objectIndex, arg0, arg2); + init_object_smoke_paticle(objectIndex, arg0, arg2); } } @@ -2177,7 +2177,7 @@ void func_80076E14(s32 objectIndex) { func_80076DC4(objectIndex); break; case 2: - if ((gObjectList[objectIndex].unk_0AE >= 2) && (func_80073B00(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x000000FF, 0x00000050, 0x00000020, 0, 0) != 0)) { + if ((gObjectList[objectIndex].unk_0AE >= 2) && (func_80073B00(objectIndex, &gObjectList[objectIndex].primAlpha, 0x000000FF, 0x00000050, 0x00000020, 0, 0) != 0)) { func_80072488(objectIndex); } break; @@ -2194,7 +2194,7 @@ void func_80076ED8(s32 objectIndex) { if ((gObjectList[objectIndex].unk_0AE != 0) && (gObjectList[objectIndex].unk_0AE == 1)) { func_80086FD4(objectIndex); } - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } void func_80076F2C(void) { @@ -2217,7 +2217,7 @@ void func_80076F2C(void) { } } -void func_80076FEC(s32 objectIndex, s32 flameIndex) { +void init_object_smoke_particle(s32 objectIndex, s32 flameIndex) { init_object(objectIndex, 3); gObjectList[objectIndex].unk_0D5 = 0xB; @@ -2231,17 +2231,17 @@ void func_80076FEC(s32 objectIndex, s32 flameIndex) { gObjectList[objectIndex].unk_034 = 0; gObjectList[objectIndex].type = 255; gObjectList[objectIndex].unk_0A2 = 255; - gObjectList[objectIndex].unk_0A0 = 255; + gObjectList[objectIndex].primAlpha = 255; set_obj_orientation(objectIndex, 0, 0, 0); - func_8008B80C(objectIndex, 0, 0, 0); + set_obj_origin_offset(objectIndex, 0, 0, 0); } -void func_800770F0(s32 arg0) { +void init_smoke_particles(s32 arg0) { s32 objectIndex; objectIndex = add_unused_obj_index(gObjectParticle4, &gNextFreeObjectParticle4, gObjectParticle4_SIZE); if (objectIndex != NULL_OBJECT_ID) { - func_80076FEC(objectIndex, arg0); + init_object_smoke_particle(objectIndex, arg0); } } @@ -2254,7 +2254,7 @@ void func_80077138(s32 objectIndex, Vec3f arg1, s32 arg2) { gObjectList[objectIndex].sizeScaling = 0.05f; set_obj_origin_pos(objectIndex, arg1[0], arg1[1], arg1[2]); set_obj_orientation(objectIndex, 0U, 0U, 0U); - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); switch (arg2) { case 0: gObjectList[objectIndex].velocity[1] = -1.0f; @@ -2287,7 +2287,7 @@ void func_80077138(s32 objectIndex, Vec3f arg1, s32 arg2) { gObjectList[objectIndex].unk_084[4] = temp_v0_3; gObjectList[objectIndex].unk_048 = 1; } - gObjectList[objectIndex].unk_0A0 = 0x00FF; + gObjectList[objectIndex].primAlpha = 0x00FF; gObjectList[objectIndex].unk_084[3] = random_int(0x0800U) + 0x400; if ((gObjectList[objectIndex].direction_angle[1] < 0x3000) || (gObjectList[objectIndex].direction_angle[1] >= 0xB001)) { gObjectList[objectIndex].unk_084[3] = -gObjectList[objectIndex].unk_084[3]; @@ -2320,7 +2320,7 @@ void func_80077450(s32 objectIndex) { break; case 2: f32_step_up_towards(&gObjectList[objectIndex].sizeScaling, 0.1f, 0.01f); - if ((gObjectList[objectIndex].pos[1] <= gObjectList[objectIndex].unk_084[5]) && (func_80073B00(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x000000FF, 0, 0x00000010, 0, 0) != 0)) { + if ((gObjectList[objectIndex].pos[1] <= gObjectList[objectIndex].unk_084[5]) && (func_80073B00(objectIndex, &gObjectList[objectIndex].primAlpha, 0x000000FF, 0, 0x00000010, 0, 0) != 0)) { func_80086F60(objectIndex); func_80072428(objectIndex); } @@ -2348,8 +2348,8 @@ void func_80077584(s32 objectIndex) { } } temp_v0->orientation[2] += temp_v0->unk_084[3]; - func_80087710(objectIndex); - func_8008BF18(objectIndex); + object_add_velocity_offset_xyz(objectIndex); + object_calculate_new_pos_offset(objectIndex); } void func_80077640(void) { @@ -2372,7 +2372,7 @@ void func_80077640(void) { } } -void init_leaf_particle(s32 objectIndex, Vec3f arg1, s32 num) { +void init_object_leaf_particle(s32 objectIndex, Vec3f arg1, s32 num) { UNUSED s32 stackPadding1; UNUSED u16 stackPadding0; u16 temp_s0; @@ -2387,22 +2387,22 @@ void init_leaf_particle(s32 objectIndex, Vec3f arg1, s32 num) { gObjectList[objectIndex].unk_044 = arg1[1]; switch (gCurrentCourseId) { case COURSE_MARIO_RACEWAY: - func_8008BD14(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x14, 0x1E, 0x14); + object_origin_pos_randomize_around_xyz(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x14, 0x1E, 0x14); gObjectList[objectIndex].unk_034 = 1.5f; gObjectList[objectIndex].velocity[1] = 1.5f; break; case COURSE_YOSHI_VALLEY: - func_8008BD14(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x14, 0x1E, 0x14); + object_origin_pos_randomize_around_xyz(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x14, 0x1E, 0x14); gObjectList[objectIndex].unk_034 = 2.0f; gObjectList[objectIndex].velocity[1] = 2.0f; break; case COURSE_ROYAL_RACEWAY: - func_8008BD14(objectIndex, arg1[0], arg1[1] + 30.0, arg1[2], 0x10, 0x28, 0x10); + object_origin_pos_randomize_around_xyz(objectIndex, arg1[0], arg1[1] + 30.0, arg1[2], 0x10, 0x28, 0x10); gObjectList[objectIndex].unk_034 = 2.0f; gObjectList[objectIndex].velocity[1] = 2.0f; break; case COURSE_LUIGI_RACEWAY: - func_8008BD14(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x14, 0x1E, 0x14); + object_origin_pos_randomize_around_xyz(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x14, 0x1E, 0x14); gObjectList[objectIndex].unk_034 = 1.5f; gObjectList[objectIndex].velocity[1] = 1.0f; break; @@ -2414,21 +2414,21 @@ void init_leaf_particle(s32 objectIndex, Vec3f arg1, s32 num) { set_obj_orientation(objectIndex, temp_s0, sp3E, sp3C); } -s32 func_80077A54(Vec3f arg0, s32 num) { +s32 init_leaf_particle(Vec3f arg0, s32 num) { s32 objectIndex; objectIndex = add_unused_obj_index(gLeafParticle, &gNextFreeLeafParticle, gLeafParticle_SIZE); if (objectIndex != NULL_OBJECT_ID) { - init_leaf_particle(objectIndex, arg0, num); + init_object_leaf_particle(objectIndex, arg0, num); } return objectIndex; } -void func_80077AB0(Vec3f arg0, UNUSED s32 arg1) { +void spawn_leaf(Vec3f arg0, UNUSED s32 arg1) { s32 i; for (i = 0; i < gLeafParticle_SPAWN_SIZE; i++) { - if (func_80077A54(arg0, i) == NULL_OBJECT_ID) break; + if (init_leaf_particle(arg0, i) == NULL_OBJECT_ID) break; } } @@ -2469,12 +2469,12 @@ void func_80077BCC(s32 objectIndex) { } break; } - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); gObjectList[objectIndex].orientation[0] += 0x1000; gObjectList[objectIndex].orientation[1] += 0x1000; } -void func_80077C9C(void) { +void update_leaf(void) { s32 someIndex; s32 leafIndex; Objects *object; @@ -2524,9 +2524,9 @@ void func_80077E20(s32 objectIndex) { temp_v0->textureHeight = 0x10; temp_v0->textureWidth = temp_v0->textureHeight; temp_v0->sizeScaling = 0.15f; - set_object_flag_unk_054_true(objectIndex, 0x00000010); + set_object_flag_status_true(objectIndex, 0x00000010); func_80086EF0(objectIndex); - temp_v0->unk_0A0 = 0x00FF; + temp_v0->primAlpha = 0x00FF; temp_v0->unk_0D5 = 0; temp_v0->type = 0; func_80072488(objectIndex); @@ -2537,11 +2537,11 @@ void func_80077EB8(s32 objectIndex, u16 arg1, Camera *camera) { temp_v0 = camera->rot[1] - arg1; if ((temp_v0 >= D_8018D210) || (D_8018D208 >= temp_v0)) { - gObjectList[objectIndex].unk_028[0] = D_8018D218 + (D_8018D1E8 * (f32) temp_v0); - set_object_flag_unk_054_true(objectIndex, 0x00000010); + gObjectList[objectIndex].offset[0] = D_8018D218 + (D_8018D1E8 * (f32) temp_v0); + set_object_flag_status_true(objectIndex, 0x00000010); return; } - set_object_flag_unk_054_false(objectIndex, 0x00000010); + set_object_flag_status_false(objectIndex, 0x00000010); } void func_80077F64(s32 objectIndex, Camera *camera) { @@ -2551,18 +2551,18 @@ void func_80077F64(s32 objectIndex, Camera *camera) { switch (gObjectList[objectIndex].unk_0AE) { /* irregular */ case 1: gObjectList[objectIndex].direction_angle[1] = (camera->rot[1] + random_int(0x4000U)) - 0x2000; - func_8008BAB4(objectIndex, 0x00B4, 0x0014U); + object_origin_pos_randomize_around_y(objectIndex, 0x00B4, 0x0014U); rand = random_int(0x0064U); gObjectList[objectIndex].velocity[1] = (f32) (-0.75 - (f64) (f32) (rand * 0.01)); - gObjectList[objectIndex].unk_028[0] = 0.0f; - gObjectList[objectIndex].unk_028[1] = 0.0f; + gObjectList[objectIndex].offset[0] = 0.0f; + gObjectList[objectIndex].offset[1] = 0.0f; func_80086FD4(objectIndex); return; case 2: func_80077EB8(objectIndex, gObjectList[objectIndex].direction_angle[1], camera); - func_800877C4(objectIndex); - func_8008BF18(objectIndex); + object_add_velocity_offset_y(objectIndex); + object_calculate_new_pos_offset(objectIndex); func_8008BFC0(objectIndex); if (gObjectList[objectIndex].pos[1] <= 0.0f) { func_80086FD4(objectIndex); @@ -2642,8 +2642,8 @@ void func_80078288(s32 objectIndex) { gObjectList[objectIndex].unk_0C4 = random_int(0x0400U) + 0x100; gObjectList[objectIndex].unk_01C[0] = (f32) (((f32) random_int(0x0064U) * 0.03) + 2.0); gObjectList[objectIndex].velocity[1] = (f32) (-0.3 - (f64) (f32) (random_int(0x0032U) * 0.01)); - gObjectList[objectIndex].unk_028[0] = 0.0f; - gObjectList[objectIndex].unk_028[1] = 0.0f; + gObjectList[objectIndex].offset[0] = 0.0f; + gObjectList[objectIndex].offset[1] = 0.0f; func_80086FD4(objectIndex); } else { sp3C = random_int(0x0064U) + 0x28; @@ -2654,16 +2654,16 @@ void func_80078288(s32 objectIndex) { gObjectList[objectIndex].unk_0C4 = random_int(0x0400U) + 0x100; gObjectList[objectIndex].unk_01C[0] = (f32) (((f32) random_int(0x0064U) * 0.03) + 2.0); gObjectList[objectIndex].velocity[1] = (f32) (-0.6 - (f64) (f32) (random_int(0x0032U) * 0.01)); - gObjectList[objectIndex].unk_028[0] = 0.0f; - gObjectList[objectIndex].unk_028[1] = 0.0f; + gObjectList[objectIndex].offset[0] = 0.0f; + gObjectList[objectIndex].offset[1] = 0.0f; func_80086FD4(objectIndex); } break; case 2: - func_800877C4(objectIndex); + object_add_velocity_offset_y(objectIndex); gObjectList[objectIndex].direction_angle[0] += gObjectList[objectIndex].unk_0C4; - gObjectList[objectIndex].unk_028[0] = sins(gObjectList[objectIndex].direction_angle[0]) * gObjectList[objectIndex].unk_01C[0]; - func_8008BF18(objectIndex); + gObjectList[objectIndex].offset[0] = sins(gObjectList[objectIndex].direction_angle[0]) * gObjectList[objectIndex].unk_01C[0]; + object_calculate_new_pos_offset(objectIndex); if ((f64) gObjectList[objectIndex].pos[1] <= 0.0) { func_80086FD4(objectIndex); } @@ -2709,7 +2709,7 @@ void func_80078790(void) { } } -void func_80078838(void) { +void update_snowflakes(void) { s32 someIndex; s32 snowflakeIndex; @@ -2735,10 +2735,10 @@ void func_800788F8(s32 objectIndex, u16 rot, Camera *camera) { temp_v0 = camera->rot[1] + rot; if ((temp_v0 >= D_8018D210) && (D_8018D208 >= temp_v0)) { gObjectList[objectIndex].unk_09C = (D_8018D218 + (D_8018D1E8 * temp_v0)); - set_object_flag_unk_054_true(objectIndex, 0x00000010); + set_object_flag_status_true(objectIndex, 0x00000010); return; } - set_object_flag_unk_054_false(objectIndex, 0x00000010); + set_object_flag_status_false(objectIndex, 0x00000010); } #ifdef MIPS_TO_C @@ -2765,7 +2765,7 @@ void func_800789AC(s32 arg0, Camera *arg1, s16 (*arg2)[4]) { */ } #else -GLOBAL_ASM("asm/non_matchings/code_80071F00/func_800789AC.s") +GLOBAL_ASM("asm/non_matchings/update_objects/func_800789AC.s") #endif typedef struct { @@ -2788,19 +2788,19 @@ void func_80078A44(s32 arg0, Camera *camera, u16 rot[][4]) { func_800788F8(objectIndex, *(u16 *)(rot + i), camera); switch (i % 5U) { case 0: - func_80073CB0(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x00000028, 0x000000B4, 0x000000FF, 0, -1); + func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, 0x00000028, 0x000000B4, 0x000000FF, 0, -1); break; case 1: - func_80073CB0(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x00000080, 0x000000FF, 0x000000FF, 0, -1); + func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, 0x00000080, 0x000000FF, 0x000000FF, 0, -1); break; case 2: - func_80073CB0(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x00000050, 0x000000C8, 0x000000FF, 0, -1); + func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, 0x00000050, 0x000000C8, 0x000000FF, 0, -1); break; case 3: - func_80073CB0(objectIndex, &gObjectList[objectIndex].unk_0A0, 0, 0x0000009B, 0x000000FF, 0, -1); + func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, 0, 0x0000009B, 0x000000FF, 0, -1); break; case 4: - func_80073CB0(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x0000005A, 0x00000080, 0x000000FF, 0, -1); + func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, 0x0000005A, 0x00000080, 0x000000FF, 0, -1); break; } } @@ -2972,7 +2972,7 @@ void func_800791F0(s32 objectIndex, s32 playerId) { func_800C9018(playerId, SOUND_ARG_LOAD(0x01, 0x00, 0xFA, 0x28)); } -void init_obj_laikitu_red_flag_countdown(s32 objectIndex, s32 arg1) { +void init_obj_lakitu_red_flag_countdown(s32 objectIndex, s32 arg1) { if (arg1 == 0) { D_801656F0 = 0; D_8018D168 = 0; @@ -2980,18 +2980,18 @@ void init_obj_laikitu_red_flag_countdown(s32 objectIndex, s32 arg1) { init_texture_object(objectIndex, (u8 *) common_tlut_lakitu_countdown, gTextureLakituNoLights1, 0x38U, (u16) 0x00000048); gObjectList[objectIndex].vertex = D_0D005EB0; gObjectList[objectIndex].sizeScaling = 0.15f; - set_object_flag_unk_054_false(objectIndex, 0x00000010); + set_object_flag_status_false(objectIndex, 0x00000010); func_80072488(objectIndex); gObjectList[objectIndex].unk_048 = D_8018D180; } -void update_obj_laikitu_countdown(s32 objectIndex, s32 arg1) { +void update_object_lakitu_countdown(s32 objectIndex, s32 arg1) { UNUSED s32 pad; switch (gObjectList[objectIndex].state) { case 0: break; case 1: - init_obj_laikitu_red_flag_countdown(objectIndex, arg1); + init_obj_lakitu_red_flag_countdown(objectIndex, arg1); break; case 2: func_8007278C(objectIndex, gObjectList[objectIndex].unk_048); @@ -3000,7 +3000,7 @@ void update_obj_laikitu_countdown(s32 objectIndex, s32 arg1) { } break; case 3: - set_object_flag_unk_054_true(objectIndex, 0x00000010); + set_object_flag_status_true(objectIndex, 0x00000010); func_80086F10(objectIndex, 1, &D_800E67B8); func_80072488(objectIndex); break; @@ -3064,7 +3064,7 @@ void update_obj_laikitu_countdown(s32 objectIndex, s32 arg1) { } } -void init_obj_laikitu_red_flag(s32 objectIndex, s32 playerIndex) { +void init_obj_lakitu_red_flag(s32 objectIndex, s32 playerIndex) { Objects *temp_v0; func_800791F0(objectIndex, playerIndex); @@ -3077,19 +3077,19 @@ void init_obj_laikitu_red_flag(s32 objectIndex, s32 playerIndex) { temp_v0->pos[0] = 5000.0f; temp_v0->sizeScaling = 0.15f; func_80086F10(objectIndex, 2, &D_800E6834); - set_object_flag_unk_054_false(objectIndex, 0x00000010); + set_object_flag_status_false(objectIndex, 0x00000010); func_80072488(objectIndex); } -void update_obj_laikitu_red_flag(s32 objectIndex, s32 playerIndex) { +void update_object_lakitu_red_flag(s32 objectIndex, s32 playerIndex) { switch (gObjectList[objectIndex].state) { case 0: break; case 1: - init_obj_laikitu_red_flag(objectIndex, playerIndex); + init_obj_lakitu_red_flag(objectIndex, playerIndex); break; case 2: - set_object_flag_unk_054_true(objectIndex, 0x00000010); + set_object_flag_status_true(objectIndex, 0x00000010); func_80072488(objectIndex); break; case 3: @@ -3137,19 +3137,19 @@ void func_80079860(s32 playerId) { void func_8007993C(s32 objectIndex, Player *player) { if (player->unk_0CA & 4) { func_800722A4(objectIndex, 2); - gObjectList[objectIndex].unk_0A0 = player->unk_0C6; + gObjectList[objectIndex].primAlpha = player->unk_0C6; return; } func_800722CC(objectIndex, 2); } -void init_obj_laikitu_red_flag_fishing(s32 objectIndex, s32 arg1) { +void init_obj_lakitu_red_flag_fishing(s32 objectIndex, s32 arg1) { func_800791F0(objectIndex, arg1); init_texture_object(objectIndex, common_tlut_lakitu_fishing, gTextureLakituFishing1, 0x38U, (u16) 0x00000048); gObjectList[objectIndex].vertex = D_0D005F30; gObjectList[objectIndex].sizeScaling = 0.15f; func_80086E70(objectIndex); - set_object_flag_unk_054_false(objectIndex, 0x00000010); + set_object_flag_status_false(objectIndex, 0x00000010); func_80073720(objectIndex); func_80072488(objectIndex); func_800C8F80((u8)arg1, 0x0100FA28); @@ -3163,35 +3163,35 @@ void func_80079A5C(s32 objectIndex, UNUSED Player *player) { gObjectList[objectIndex].origin_pos[2] = 0.0f; gObjectList[objectIndex].origin_pos[1] = 0.0f; gObjectList[objectIndex].origin_pos[0] = 0.0f; - gObjectList[objectIndex].unk_028[2] = 0.0f; - gObjectList[objectIndex].unk_028[0] = 0.0f; - gObjectList[objectIndex].unk_028[1] = 80.0f; + gObjectList[objectIndex].offset[2] = 0.0f; + gObjectList[objectIndex].offset[0] = 0.0f; + gObjectList[objectIndex].offset[1] = 80.0f; func_80086FD4(objectIndex); break; case 2: - if (f32_step_down_towards(&gObjectList[objectIndex].unk_028[1], 5.0f, 1.0f) != 0) { + if (f32_step_down_towards(&gObjectList[objectIndex].offset[1], 5.0f, 1.0f) != 0) { func_80086F60(objectIndex); } break; case 3: - if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 100.0f, 1.0f) != 0) { + if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], 100.0f, 1.0f) != 0) { func_80086F60(objectIndex); } break; } } -void update_obj_laikitu_fishing(s32 objectIndex, s32 playerId) { +void update_object_lakitu_fishing(s32 objectIndex, s32 playerId) { Player *player = &gPlayerOne[playerId]; switch (gObjectList[objectIndex].state) { /* switch 1; irregular */ case 0: /* switch 1 */ break; case 1: /* switch 1 */ - init_obj_laikitu_red_flag_fishing(objectIndex, playerId); + init_obj_lakitu_red_flag_fishing(objectIndex, playerId); break; case 2: /* switch 1 */ - set_object_flag_unk_054_true(objectIndex, 0x00000010); + set_object_flag_status_true(objectIndex, 0x00000010); func_800736E0(objectIndex); func_80072488(objectIndex); break; @@ -3235,7 +3235,7 @@ void update_obj_laikitu_fishing(s32 objectIndex, s32 playerId) { func_80079A5C(objectIndex, player); } -void update_obj_laikitu_fishing2(s32 objectIndex, s32 playerId) { +void update_object_lakitu_fishing2(s32 objectIndex, s32 playerId) { Player *temp_s1; @@ -3244,10 +3244,10 @@ void update_obj_laikitu_fishing2(s32 objectIndex, s32 playerId) { case 0: /* switch 1 */ break; case 1: /* switch 1 */ - init_obj_laikitu_red_flag_fishing(objectIndex, playerId); + init_obj_lakitu_red_flag_fishing(objectIndex, playerId); break; case 2: /* switch 1 */ - set_object_flag_unk_054_true(objectIndex, 0x00000010); + set_object_flag_status_true(objectIndex, 0x00000010); func_800736E0(objectIndex); temp_s1->unk_0CA |= 0x80; func_80072488(objectIndex); @@ -3326,12 +3326,12 @@ void func_8007A060(s32 objectIndex, s32 playerIndex) { temp_v0->pos[1] = 5000.0f; temp_v0->pos[0] = 5000.0f; temp_v0->sizeScaling = 0.15f; - set_object_flag_unk_054_false(objectIndex, 0x00000010); + set_object_flag_status_false(objectIndex, 0x00000010); func_80086F10(objectIndex, 5, &D_800E694C); func_80072488(objectIndex); } -void update_obj_laikitu_second_lap(s32 objectIndex, s32 playerIndex) { +void update_object_lakitu_second_lap(s32 objectIndex, s32 playerIndex) { switch (gObjectList[objectIndex].state) { case 0: break; @@ -3339,7 +3339,7 @@ void update_obj_laikitu_second_lap(s32 objectIndex, s32 playerIndex) { func_8007A060(objectIndex, playerIndex); break; case 2: - set_object_flag_unk_054_true(objectIndex, 0x00000010); + set_object_flag_status_true(objectIndex, 0x00000010); func_80072488(objectIndex); break; case 3: @@ -3374,12 +3374,12 @@ void func_8007A228(s32 objectIndex, s32 playerIndex) { temp_v0->pos[1] = 5000.0f; temp_v0->pos[0] = 5000.0f; temp_v0->sizeScaling = 0.15f; - set_object_flag_unk_054_false(objectIndex, 0x00000010); + set_object_flag_status_false(objectIndex, 0x00000010); func_80086F10(objectIndex, 5, &D_800E694C); func_80072488(objectIndex); } -void update_obj_laikitu_final_lap(s32 objectIndex, s32 playerIndex) { +void update_object_lakitu_final_lap(s32 objectIndex, s32 playerIndex) { switch (gObjectList[objectIndex].state) { case 0: break; @@ -3387,7 +3387,7 @@ void update_obj_laikitu_final_lap(s32 objectIndex, s32 playerIndex) { func_8007A228(objectIndex, playerIndex); break; case 2: - set_object_flag_unk_054_true(objectIndex, 0x00000010); + set_object_flag_status_true(objectIndex, 0x00000010); func_80072488(objectIndex); break; case 3: @@ -3420,14 +3420,14 @@ void func_8007A3F0(s32 objectIndex, s32 arg1) { gObjectList[objectIndex].pos[1] = var; gObjectList[objectIndex].pos[0] = var; gObjectList[objectIndex].sizeScaling = 0.15f; - set_object_flag_unk_054_false(objectIndex, 0x00000010); + set_object_flag_status_false(objectIndex, 0x00000010); func_80086F10(objectIndex, 6, &D_800E69B0); gObjectList[objectIndex].unk_0D6 = 0; func_80072488(objectIndex); func_800C8F80((u8)arg1, 0x0100FA28); } -void update_obj_laikitu_reverse(s32 objectIndex, s32 playerId) { +void update_object_lakitu_reverse(s32 objectIndex, s32 playerId) { Player *sp2C = &gPlayerOne[playerId]; switch (gObjectList[objectIndex].state) { @@ -3437,7 +3437,7 @@ void update_obj_laikitu_reverse(s32 objectIndex, s32 playerId) { func_8007A3F0(objectIndex, playerId); break; case 2: - set_object_flag_unk_054_true(objectIndex, 0x00000010); + set_object_flag_status_true(objectIndex, 0x00000010); gObjectList[objectIndex].unk_0D6 = 1; func_80072488(objectIndex); break; @@ -3472,18 +3472,18 @@ void func_8007A66C(s32 objectIndex, Player *player, Camera *camera) { u16 temp_t8; temp_t8 = 0x8000 - camera->rot[1]; - gObjectList[objectIndex].pos[0] = (player->pos[0] + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].unk_028[0]))) - (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].unk_028[2])); - gObjectList[objectIndex].pos[1] = player->unk_074 + gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].unk_028[1]; - gObjectList[objectIndex].pos[2] = (player->pos[2] + (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].unk_028[0]))) + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].unk_028[2])); + gObjectList[objectIndex].pos[0] = (player->pos[0] + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].offset[0]))) - (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].offset[2])); + gObjectList[objectIndex].pos[1] = player->unk_074 + gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].offset[1]; + gObjectList[objectIndex].pos[2] = (player->pos[2] + (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].offset[0]))) + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].offset[2])); } void func_8007A778(s32 objectIndex, Player *player, Camera *camera) { u16 temp_t8; temp_t8 = 0x8000 - camera->rot[1]; - gObjectList[objectIndex].pos[0] = (player->pos[0] + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].unk_028[0]))) - (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].unk_028[2])); - gObjectList[objectIndex].pos[1] = player->pos[1] + gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].unk_028[1]; - gObjectList[objectIndex].pos[2] = (player->pos[2] + (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].unk_028[0]))) + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].unk_028[2])); + gObjectList[objectIndex].pos[0] = (player->pos[0] + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].offset[0]))) - (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].offset[2])); + gObjectList[objectIndex].pos[1] = player->pos[1] + gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].offset[1]; + gObjectList[objectIndex].pos[2] = (player->pos[2] + (sins(temp_t8) * (gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].offset[0]))) + (coss(temp_t8) * (gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].offset[2])); } UNUSED void func_8007A884(void) { @@ -3509,37 +3509,37 @@ void func_8007A910(s32 arg0) { func_80079860(arg0); } -void update_obj_laikitu(s32 playerId) { +void update_object_lakitu(s32 playerId) { s32 objectIndex = gIndexLakituList[playerId]; switch (gObjectList[objectIndex].unk_0D8) { case 0: break; case 1: - update_obj_laikitu_countdown(objectIndex, playerId); + update_object_lakitu_countdown(objectIndex, playerId); func_8008BFFC(objectIndex); break; case 2: - update_obj_laikitu_red_flag(objectIndex, playerId); + update_object_lakitu_red_flag(objectIndex, playerId); func_8008BFFC(objectIndex); break; case 3: - update_obj_laikitu_fishing(objectIndex, playerId); + update_object_lakitu_fishing(objectIndex, playerId); break; case 4: - update_obj_laikitu_second_lap(objectIndex, playerId); + update_object_lakitu_second_lap(objectIndex, playerId); func_8008BFFC(objectIndex); break; case 5: - update_obj_laikitu_final_lap(objectIndex, playerId); + update_object_lakitu_final_lap(objectIndex, playerId); func_8008BFFC(objectIndex); break; case 6: - update_obj_laikitu_reverse(objectIndex, playerId); + update_object_lakitu_reverse(objectIndex, playerId); func_8008BFFC(objectIndex); break; case 7: - update_obj_laikitu_fishing2(objectIndex, playerId); + update_object_lakitu_fishing2(objectIndex, playerId); break; } } @@ -3754,7 +3754,7 @@ s32 func_8007B040(s32 objectIndex, s32 playerId) { return var_t3; } #else -GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007B040.s") +GLOBAL_ASM("asm/non_matchings/update_objects/func_8007B040.s") #endif void func_8007B254(s32 objectIndex, s32 arg1) { @@ -3990,7 +3990,7 @@ void func_8007BBBC(s32 objectIndex) { switch (temp_s1->state) { /* irregular */ case 1: func_800735BC(objectIndex, d_course_banshee_boardwalk_dl_cheep_cheep, 2.0f); - set_object_flag_unk_054_true(objectIndex, 0x00000010); + set_object_flag_status_true(objectIndex, 0x00000010); temp_s1->unk_0D5 = 0; break; case 2: @@ -4027,14 +4027,14 @@ void func_8007BD04(s32 playerId) { } } -void func_8007BDA8(void) { +void update_cheep_cheep_race(void) { UNUSED s32 pad; s32 objectIndex; func_8007BD04(0); objectIndex = indexObjectList2[0]; func_8007BBBC(objectIndex); - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } void init_var_cheep_cheep(s32 objectIndex) { @@ -4042,12 +4042,12 @@ void init_var_cheep_cheep(s32 objectIndex) { temp_v0 = &gObjectList[objectIndex]; temp_v0->unk_0D5 = 1; - temp_v0->unk_054 = 0; + temp_v0->status = 0; temp_v0->model = d_course_banshee_boardwalk_dl_cheep_cheep; temp_v0->sizeScaling = 0.2f; func_80072488(objectIndex); set_obj_origin_pos(objectIndex, D_800E634C[0][0], D_800E634C[0][1] + 55.0, D_800E634C[0][2]); - func_8008B80C(objectIndex, 0.0f, 30.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 30.0f, 0.0f); set_obj_direction_angle(objectIndex, 0U, 0x3800U, 0U); } @@ -4061,7 +4061,7 @@ void func_8007BEC8(s32 objectIndex) { break; case 2: if (func_8007278C(objectIndex, 0x0000003C) != 0) { - set_object_flag_unk_054_true(objectIndex, 0x00000010); + set_object_flag_status_true(objectIndex, 0x00000010); func_80086E70(objectIndex); } break; @@ -4095,8 +4095,8 @@ void func_8007BFB0(s32 objectIndex) { break; case 1: temp_s0->velocity[1] = -0.2f; - if ((f64) temp_s0->unk_028[1] <= 0.0) { - temp_s0->unk_028[1] = 0.0f; + if ((f64) temp_s0->offset[1] <= 0.0) { + temp_s0->offset[1] = 0.0f; temp_s0->velocity[1] = 0.0f; func_80086F60(objectIndex); } @@ -4141,7 +4141,7 @@ void func_8007BFB0(s32 objectIndex) { case 7: temp_s0->sizeScaling = (f32) ((f64) temp_s0->sizeScaling - 0.05); if ((f64) temp_s0->sizeScaling <= 0.01) { - set_object_flag_unk_054_false(objectIndex, 0x00000010); + set_object_flag_status_false(objectIndex, 0x00000010); temp_s0->sizeScaling = 0.000001f; func_80086FD4(objectIndex); } @@ -4153,11 +4153,11 @@ void func_8007BFB0(s32 objectIndex) { if (temp_s0->unk_0AE < 0xA) { func_80074344(objectIndex, &temp_s0->sizeScaling, 0.2f, 0.21f, 0.001f, 0, -1); } - func_800877C4(objectIndex); - func_8008BF18(objectIndex); + object_add_velocity_offset_y(objectIndex); + object_calculate_new_pos_offset(objectIndex); } -void func_8007C280(void) { +void update_cheep_cheep_ending(void) { s32 objectIndex; objectIndex = indexObjectList2[0]; @@ -4171,19 +4171,19 @@ void func_8007C280(void) { } } -void func_8007C2F8(s32 arg0) { +void update_cheep_cheep(s32 arg0) { switch (arg0) { case 0: - func_8007BDA8(); + update_cheep_cheep_race(); break; case 1: - func_8007C280(); + update_cheep_cheep_ending(); break; } } -void func_8007C340(void) { - func_8007CC00(); +void wrapper_update_boos(void) { + update_boos(); } #ifdef MIPS_TO_C @@ -4206,17 +4206,17 @@ void func_8007C360(s32 objectIndex, Camera *camera) { if (temp_t2 < 0x13) { sp20 = temp_a2; sp1C = temp_t2; - set_object_flag_unk_054_false(objectIndex, 0x00000080); + set_object_flag_status_false(objectIndex, 0x00000080); temp_a2->itemDisplay = (s8) sp1C; return; } sp20 = temp_a2; sp1C = temp_t2; - set_object_flag_unk_054_true(objectIndex, 0x00000080); + set_object_flag_status_true(objectIndex, 0x00000080); temp_a2->itemDisplay = 0x24 - temp_t2; } #else -GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007C360.s") +GLOBAL_ASM("asm/non_matchings/update_objects/func_8007C360.s") #endif void func_8007C420(s32 objectIndex, Player *player, Camera *camera) { @@ -4253,17 +4253,17 @@ void func_8007C4A4(s32 objectIndex) { if (temp_t0 < 0x13) { sp20 = temp_v1; sp1C = temp_t0; - set_object_flag_unk_054_false(objectIndex, 0x00000080); + set_object_flag_status_false(objectIndex, 0x00000080); temp_v1->itemDisplay = (s8) sp1C; return; } sp20 = temp_v1; sp1C = temp_t0; - set_object_flag_unk_054_true(objectIndex, 0x00000080); + set_object_flag_status_true(objectIndex, 0x00000080); temp_v1->itemDisplay = 0x24 - temp_t0; } #else -GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007C4A4.s") +GLOBAL_ASM("asm/non_matchings/update_objects/func_8007C4A4.s") #endif void func_8007C550(s32 objectIndex) { @@ -4279,15 +4279,15 @@ void func_8007C5B4(s32 objectIndex) { temp_s0->pos[0] = 0.0f; temp_s0->pos[1] = 0.0f; temp_s0->pos[2] = 0.0f; - set_object_flag_unk_054_true(objectIndex, 0x00000020); + set_object_flag_status_true(objectIndex, 0x00000020); func_80072488(objectIndex); - temp_s0->unk_0A0 = 0; + temp_s0->primAlpha = 0; func_80073844(objectIndex); temp_s0->sizeScaling = 0.15f; temp_s0->unk_034 = 1.0f; func_80073FD4(objectIndex); func_80086EF0(objectIndex); - set_object_flag_unk_054_true(objectIndex, 0x00000800); + set_object_flag_status_true(objectIndex, 0x00000800); temp_s0->orientation[0] = 0; temp_s0->orientation[2] = 0x8000; } @@ -4305,13 +4305,13 @@ void func_8007C684(s32 objectIndex) { case 0: break; case 1: - func_80073998(objectIndex, &gObjectList[objectIndex].unk_0A0, 0, 0x00000050, 2, 1, 0); + func_80073998(objectIndex, &gObjectList[objectIndex].primAlpha, 0, 0x00000050, 2, 1, 0); break; case 2: - func_80073CB0(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x00000050, 0x00000078, 1, 0, -1); + func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, 0x00000050, 0x00000078, 1, 0, -1); break; case 3: - func_80073DC0(objectIndex, &gObjectList[objectIndex].unk_0A0, 0, 2); + func_80073DC0(objectIndex, &gObjectList[objectIndex].primAlpha, 0, 2); break; case 4: func_80072428(objectIndex); @@ -4438,7 +4438,7 @@ void func_8007CA70(void) { } } -void func_8007CC00(void) { +void update_boos(void) { u16 temp_t4; s32 someIndex; s32 objectIndex; @@ -4456,11 +4456,11 @@ void func_8007CC00(void) { player = &gPlayerOne[object->unk_0D1]; camera = &camera1[object->unk_0D1]; temp_t4 = (0x8000 - camera->rot[1]); - object->pos[0] = player->pos[0] + (coss(temp_t4) * (object->origin_pos[0] + object->unk_028[0])) - (sins(temp_t4) * (object->origin_pos[2] + object->unk_028[2])); - object->pos[1] = 6.5 + player->unk_074 + object->origin_pos[1] + object->unk_028[1]; - object->pos[2] = player->pos[2] + (sins(temp_t4) * (object->origin_pos[0] + object->unk_028[0])) + (coss(temp_t4) * (object->origin_pos[2] + object->unk_028[2])); + object->pos[0] = player->pos[0] + (coss(temp_t4) * (object->origin_pos[0] + object->offset[0])) - (sins(temp_t4) * (object->origin_pos[2] + object->offset[2])); + object->pos[1] = 6.5 + player->unk_074 + object->origin_pos[1] + object->offset[1]; + object->pos[2] = player->pos[2] + (sins(temp_t4) * (object->origin_pos[0] + object->offset[0])) + (coss(temp_t4) * (object->origin_pos[2] + object->offset[2])); func_8007C550(objectIndex); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000080) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00000080) != 0) { object->vertex = D_800E44B0; } else { object->vertex = D_800E4470; @@ -4480,7 +4480,7 @@ void func_8007CE0C(s32 objectIndex) { temp_s0->pos[2] = 0.0f; temp_s0->sizeScaling = 0.15f; func_80072488(objectIndex); - temp_s0->unk_0A0 = 0; + temp_s0->primAlpha = 0; func_80073844(objectIndex); func_80086EF0(objectIndex); temp_s0->direction_angle[2] = 0x8000; @@ -4514,16 +4514,16 @@ void func_8007CEDC(s32 objectIndex) { func_80073514(objectIndex); switch (temp_s0->unk_0DC) { /* switch 2 */ case 1: /* switch 2 */ - func_80073998(objectIndex, &temp_s0->unk_0A0, 0x00000028, 0x00000050, 4, 0, 0); + func_80073998(objectIndex, &temp_s0->primAlpha, 0x00000028, 0x00000050, 4, 0, 0); break; case 2: /* switch 2 */ - func_80073CB0(objectIndex, &temp_s0->unk_0A0, 0x00000050, 0x000000B4, 2, 0, -1); + func_80073CB0(objectIndex, &temp_s0->primAlpha, 0x00000050, 0x000000B4, 2, 0, -1); if ((temp_s0->unk_0AE == 0) || (temp_s0->state == 3)) { temp_s0->unk_0DC += 1; } break; case 3: /* switch 2 */ - func_80073DC0(objectIndex, &temp_s0->unk_0A0, 0, 4); + func_80073DC0(objectIndex, &temp_s0->primAlpha, 0, 4); break; case 4: /* switch 2 */ func_80073884(objectIndex); @@ -4572,11 +4572,11 @@ void func_8007D070(void) { if (gObjectList[objectIndex].state != 0) { func_8007CEDC(objectIndex); func_8008B724(objectIndex); - gObjectList[objectIndex].pos[0] = gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].unk_028[0]; - gObjectList[objectIndex].pos[1] = D_8018CF1C->unk_074 + gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].unk_028[1]; - gObjectList[objectIndex].pos[2] = gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].unk_028[2]; + gObjectList[objectIndex].pos[0] = gObjectList[objectIndex].origin_pos[0] + gObjectList[objectIndex].offset[0]; + gObjectList[objectIndex].pos[1] = D_8018CF1C->unk_074 + gObjectList[objectIndex].origin_pos[1] + gObjectList[objectIndex].offset[1]; + gObjectList[objectIndex].pos[2] = gObjectList[objectIndex].origin_pos[2] + gObjectList[objectIndex].offset[2]; func_8007C420(objectIndex, D_8018CF1C, D_8018CF14); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000080) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00000080) != 0) { gObjectList[objectIndex].vertex = D_800E44B0; } else { gObjectList[objectIndex].vertex = D_800E4470; @@ -4606,9 +4606,9 @@ void func_8007D360(s32 objectIndex, s32 arg1) { gObjectList[objectIndex].direction_angle[0] = 0; gObjectList[objectIndex].unk_0C6 = 0; } - gObjectList[objectIndex].direction_angle[1] = func_80041770(gObjectList[objectIndex].origin_pos[0], gObjectList[objectIndex].unk_01C[0], gObjectList[objectIndex].origin_pos[2], gObjectList[objectIndex].unk_01C[2]); + gObjectList[objectIndex].direction_angle[1] = get_angle_between_xy(gObjectList[objectIndex].origin_pos[0], gObjectList[objectIndex].unk_01C[0], gObjectList[objectIndex].origin_pos[2], gObjectList[objectIndex].unk_01C[2]); gObjectList[objectIndex].direction_angle[2] = 0; - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); gObjectList[objectIndex].unk_0B0 = 0; if (gCCSelection < CC_150) { gObjectList[objectIndex].unk_034 = (random_int(4U) + 4.0); @@ -4625,7 +4625,7 @@ void func_8007D6A8(s32 objectIndex, s32 arg1) { temp_v0->unk_0D5 = 0x0D; func_8007D360(objectIndex, arg1); temp_v0->sizeScaling = 0.1f; - set_object_flag_unk_054_true(objectIndex, 0x00000200); + set_object_flag_status_true(objectIndex, 0x00000200); temp_v0->boundingBoxSize = 3; } @@ -4659,7 +4659,7 @@ s32 func_8007D804(s32 objectIndex) { someCount = 0; for (loopIndex = 0; loopIndex < gPlayerCountSelection1; loopIndex++) { - if (func_8008A140(objectIndex, &camera1[loopIndex], 0x4000U) != 0) { + if (is_object_visible_on_camera(objectIndex, &camera1[loopIndex], 0x4000U) != 0) { someCount += 1; } } @@ -4705,7 +4705,7 @@ void func_8007D8D4(s32 objectIndex, s32 arg1) { void func_8007DA4C(s32 objectIndex) { func_8008781C(objectIndex); - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } void func_8007DA74(s32 objectIndex) { @@ -4717,7 +4717,7 @@ void func_8007DA74(s32 objectIndex) { } gObjectList[objectIndex].direction_angle[0] = func_800417B4(gObjectList[objectIndex].direction_angle[0], gObjectList[objectIndex].unk_0C6); func_80087844(objectIndex); - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } void func_8007DAF8(s32 objectIndex, s32 arg1) { @@ -4731,7 +4731,7 @@ void func_8007DAF8(s32 objectIndex, s32 arg1) { } } -void func_8007DB44(void) { +void update_bat(void) { s32 var_s2; s32 temp_s0; Objects *temp_s1; @@ -4746,8 +4746,8 @@ void func_8007DB44(void) { func_80072E54(temp_s0, 0, 3, 1, 0, -1); func_80073514(temp_s0); temp_s1 = &gObjectList[temp_s0]; - func_80073CB0(temp_s0, &temp_s1->unk_0A0, -0x00001000, 0x00001000, 0x00000400, 0, -1); - temp_s1->orientation[2] = temp_s1->unk_0A0 + 0x8000; + func_80073CB0(temp_s0, &temp_s1->primAlpha, -0x00001000, 0x00001000, 0x00000400, 0, -1); + temp_s1->orientation[2] = temp_s1->primAlpha + 0x8000; if ((D_8018CFB0 != 0) || (D_8018CFC8 != 0)) { D_8018CFD8 = 0; for (var_s2 = 0; var_s2 < 40; var_s2++) { @@ -4814,7 +4814,7 @@ void func_8007DDC0(s32 objectIndex) { sp2C = 1150.0f; } func_8008A6DC(objectIndex, sp2C); - if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) && (func_80072354(objectIndex, 1) != 0)) { + if ((is_obj_flag_status_active(objectIndex, VISIBLE) != 0) && (func_80072354(objectIndex, 1) != 0)) { func_800722A4(objectIndex, 1); func_800C9D80(temp_s0->pos, temp_s0->velocity, SOUND_ARG_LOAD(0x51, 0x02, 0x80, 0x06)); func_800726CC(objectIndex, 3); @@ -4874,8 +4874,8 @@ void func_8007E00C(s32 objectIndex) { func_8007D714(1); } } - func_80073CB0(objectIndex, &gObjectList[objectIndex].unk_0A0, -0x00002000, 0, 0x00000400, 0, -1); - gObjectList[objectIndex].orientation[2] = gObjectList[objectIndex].unk_0A0; + func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, -0x00002000, 0, 0x00000400, 0, -1); + gObjectList[objectIndex].orientation[2] = gObjectList[objectIndex].primAlpha; if (gObjectList[objectIndex].unk_084[7] == 0) { func_800C98B8(gObjectList[objectIndex].pos, gObjectList[objectIndex].velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x90, 0x4E)); gObjectList[objectIndex].unk_084[7] = 0x0014; @@ -4902,7 +4902,7 @@ void func_8007E00C(s32 objectIndex) { } } -void func_8007E1AC(void) { +void update_trash_bin(void) { s32 objectIndex = indexObjectList1[1]; func_8007E00C(objectIndex); if (gModeSelection != TIME_TRIALS) { @@ -4932,7 +4932,7 @@ void func_8007E1F4(s32 objectIndex) { sp2C = 700.0f; } func_8008A6DC(objectIndex, sp2C); - if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) && (func_80072354(objectIndex, 1) != 0)) { + if ((is_obj_flag_status_active(objectIndex, VISIBLE) != 0) && (func_80072354(objectIndex, 1) != 0)) { func_800722A4(objectIndex, 1); func_800C9D80(temp_s0->pos, temp_s0->velocity, SOUND_ARG_LOAD(0x51, 0x02, 0x80, 0x06)); func_800726CC(objectIndex, 3); @@ -5031,26 +5031,26 @@ s32 func_8007E59C(s32 objectIndex) { void func_8007E63C(s32 objectIndex) { switch (gObjectList[objectIndex].state) { /* irregular */ case 0x32: - if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], gObjectList[objectIndex].unk_01C[1] + 15.0, 1.5f) != 0) { - set_object_flag_unk_054_true(objectIndex, 0x00000200); + if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], gObjectList[objectIndex].unk_01C[1] + 15.0, 1.5f) != 0) { + set_object_flag_status_true(objectIndex, 0x00000200); func_800722A4(objectIndex, 1); func_800722CC(objectIndex, 2); func_80072488(objectIndex); } break; case 0x33: - if (f32_step_down_towards(&gObjectList[objectIndex].unk_028[1], 0.0f, 2.0f) != 0) { - if (gObjectList[objectIndex].unk_028[1] >= 16.0f) { + if (f32_step_down_towards(&gObjectList[objectIndex].offset[1], 0.0f, 2.0f) != 0) { + if (gObjectList[objectIndex].offset[1] >= 16.0f) { gObjectList[objectIndex].itemDisplay = 0; - } else if (gObjectList[objectIndex].unk_028[1] >= 8.0f) { + } else if (gObjectList[objectIndex].offset[1] >= 8.0f) { gObjectList[objectIndex].itemDisplay = 1; } else { gObjectList[objectIndex].itemDisplay = 2; } func_800722CC(objectIndex, 1); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00010000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00010000) != 0) { func_800722A4(objectIndex, 0x00000010); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) { + if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { func_800722A4(objectIndex, 0x00000020); } } @@ -5068,13 +5068,13 @@ void func_8007E63C(s32 objectIndex) { func_80072AAC(objectIndex, 2, 0x00000032); break; case 0x36: - if (gObjectList[objectIndex].unk_028[1] >= 20.0f) { + if (gObjectList[objectIndex].offset[1] >= 20.0f) { gObjectList[objectIndex].itemDisplay = 0; - } else if (gObjectList[objectIndex].unk_028[1] >= 18.0f) { + } else if (gObjectList[objectIndex].offset[1] >= 18.0f) { gObjectList[objectIndex].itemDisplay = 1; } - if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], gObjectList[objectIndex].unk_01C[1], 0.5f) != 0) { - set_object_flag_unk_054_false(objectIndex, 0x00000200); + if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], gObjectList[objectIndex].unk_01C[1], 0.5f) != 0) { + set_object_flag_status_false(objectIndex, 0x00000200); func_8007266C(objectIndex); } break; @@ -5085,15 +5085,15 @@ void func_8007E63C(s32 objectIndex) { func_8007278C(objectIndex, 0x0000001E); break; case 0x66: - if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 20.0f, 1.5f) != 0) { + if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], 20.0f, 1.5f) != 0) { func_80072488(objectIndex); } break; case 0x67: - if (f32_step_down_towards(&gObjectList[objectIndex].unk_028[1], 0.0f, 1.5f) != 0) { - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00020000) != 0) { + if (f32_step_down_towards(&gObjectList[objectIndex].offset[1], 0.0f, 1.5f) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00020000) != 0) { func_800722A4(objectIndex, 0x00000010); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) { + if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { func_800722A4(objectIndex, 0x00000020); } } @@ -5101,15 +5101,15 @@ void func_8007E63C(s32 objectIndex) { } break; case 0x68: - if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 12.0f, 1.5f) != 0) { + if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], 12.0f, 1.5f) != 0) { func_80072488(objectIndex); } break; case 0x69: - if (f32_step_down_towards(&gObjectList[objectIndex].unk_028[1], 0.0f, 1.5f) != 0) { - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00020000) != 0) { + if (f32_step_down_towards(&gObjectList[objectIndex].offset[1], 0.0f, 1.5f) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00020000) != 0) { func_800722A4(objectIndex, 0x00000010); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) { + if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { func_800722A4(objectIndex, 0x00000020); } } @@ -5123,20 +5123,20 @@ void func_8007E63C(s32 objectIndex) { } break; case 0x6B: - if (gObjectList[objectIndex].unk_028[1] >= 22.0f) { + if (gObjectList[objectIndex].offset[1] >= 22.0f) { gObjectList[objectIndex].itemDisplay = 0; - } else if (gObjectList[objectIndex].unk_028[1] >= 20.0f) { + } else if (gObjectList[objectIndex].offset[1] >= 20.0f) { gObjectList[objectIndex].itemDisplay = 1; - } else if (gObjectList[objectIndex].unk_028[1] >= 18.0f) { + } else if (gObjectList[objectIndex].offset[1] >= 18.0f) { gObjectList[objectIndex].itemDisplay = 2; - } else if (gObjectList[objectIndex].unk_028[1] >= 16.0f) { + } else if (gObjectList[objectIndex].offset[1] >= 16.0f) { gObjectList[objectIndex].itemDisplay = 3; - } else if (gObjectList[objectIndex].unk_028[1] >= 14.0f) { + } else if (gObjectList[objectIndex].offset[1] >= 14.0f) { gObjectList[objectIndex].itemDisplay = 4; } else { func_800730BC(objectIndex, 3, 5, 1, 6, -1); } - if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], gObjectList[objectIndex].unk_01C[1], 0.5f) != 0) { + if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], gObjectList[objectIndex].unk_01C[1], 0.5f) != 0) { set_object_unk_0CB(objectIndex, 0); func_80072488(objectIndex); } @@ -5144,7 +5144,7 @@ void func_8007E63C(s32 objectIndex) { case 0x6C: if (func_8007278C(objectIndex, 0x00000064) != 0) { func_800722CC(objectIndex, 2); - set_object_flag_unk_054_false(objectIndex, 0x00000200); + set_object_flag_status_false(objectIndex, 0x00000200); func_8007266C(objectIndex); } break; @@ -5170,7 +5170,7 @@ void func_8007EC30(s32 objectIndex) { temp_s1 = &gObjectList[objectIndex]; temp_s1->unk_044 = 0.0f; temp_s1->origin_pos[1] = 0.0f; - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); if (gIsMirrorMode != 0) { set_obj_direction_angle(objectIndex, 0U, 0x4000U, 0U); set_obj_orientation(objectIndex, 0U, 0x4000U, 0U); @@ -5183,7 +5183,7 @@ void func_8007EC30(s32 objectIndex) { temp_s1->boundingBoxSize = 0x000C; temp_s1->sizeScaling = 1.0f; temp_s1->unk_01C[1] = 30.0f; - set_object_flag_unk_054_true(objectIndex, 0x05000220); + set_object_flag_status_true(objectIndex, 0x05000220); temp_s1->type = 0; temp_s1->unk_0DF = 6; func_800724DC(objectIndex); @@ -5213,7 +5213,7 @@ void func_8007ED6C(s32 objectIndex) { break; } func_8007E63C(objectIndex); - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); gObjectList[objectIndex].direction_angle[1] = gObjectList[objectIndex].orientation[1]; func_80073514(objectIndex); } @@ -5226,13 +5226,13 @@ void func_8007EE5C(s32 objectIndex) { temp_s0->sizeScaling = 1.0f; temp_s0->model = d_course_bowsers_castle_dl_thwomp; temp_s0->boundingBoxSize = 0x000C; - set_object_flag_unk_054_true(objectIndex, 0x04000220); + set_object_flag_status_true(objectIndex, 0x04000220); temp_s0->type = 0; temp_s0->unk_0DF = 6; func_80086E70(objectIndex); temp_s0->unk_044 = 0.0f; temp_s0->origin_pos[1] = 0.0f; - func_8008B80C(objectIndex, 0.0f, 20.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 20.0f, 0.0f); temp_s0->unk_01C[1] = 20.0f; if (gIsMirrorMode != 0) { set_obj_direction_angle(objectIndex, 0U, 0x4000U, 0U); @@ -5242,7 +5242,7 @@ void func_8007EE5C(s32 objectIndex) { set_obj_orientation(objectIndex, 0U, 0xC000U, 0U); } temp_s0->unk_0AE = 1; - if (temp_s0->unk_0A0 == 0) { + if (temp_s0->primAlpha == 0) { temp_s0->unk_0DD = 1; } else { temp_s0->unk_0DD = 2; @@ -5259,7 +5259,7 @@ void func_8007EFBC(s32 objectIndex) { } break; case 2: - if (f32_step_towards(gObjectList[objectIndex].unk_028, gObjectList[objectIndex].unk_01C[0], 4.0f) != 0) { + if (f32_step_towards(gObjectList[objectIndex].offset, gObjectList[objectIndex].unk_01C[0], 4.0f) != 0) { func_80086FD4(objectIndex); } break; @@ -5275,7 +5275,7 @@ void func_8007EFBC(s32 objectIndex) { } break; case 6: - if (f32_step_down_towards(&gObjectList[objectIndex].unk_028[2], -100.0f, 2.0f) != 0) { + if (f32_step_down_towards(&gObjectList[objectIndex].offset[2], -100.0f, 2.0f) != 0) { func_80086FD4(objectIndex); } break; @@ -5291,7 +5291,7 @@ void func_8007EFBC(s32 objectIndex) { } break; case 10: - if (f32_step_towards(gObjectList[objectIndex].unk_028, 0.0f, 4.0f) != 0) { + if (f32_step_towards(gObjectList[objectIndex].offset, 0.0f, 4.0f) != 0) { func_80086FD4(objectIndex); } break; @@ -5307,7 +5307,7 @@ void func_8007EFBC(s32 objectIndex) { } break; case 14: - if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[2], 0.0f, 2.0f) != 0) { + if (f32_step_up_towards(&gObjectList[objectIndex].offset[2], 0.0f, 2.0f) != 0) { func_80086FD4(objectIndex); } break; @@ -5335,7 +5335,7 @@ void func_8007F280(s32 objectIndex) { } break; case 2: - if (f32_step_towards(gObjectList[objectIndex].unk_028, gObjectList[objectIndex].unk_01C[0], 4.0f) != 0) { + if (f32_step_towards(gObjectList[objectIndex].offset, gObjectList[objectIndex].unk_01C[0], 4.0f) != 0) { func_80086FD4(objectIndex); } break; @@ -5351,7 +5351,7 @@ void func_8007F280(s32 objectIndex) { } break; case 6: - if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[2], 100.0f, 2.0f) != 0) { + if (f32_step_up_towards(&gObjectList[objectIndex].offset[2], 100.0f, 2.0f) != 0) { func_80086FD4(objectIndex); } break; @@ -5367,7 +5367,7 @@ void func_8007F280(s32 objectIndex) { } break; case 10: - if (f32_step_towards(gObjectList[objectIndex].unk_028, 0.0f, 4.0f) != 0) { + if (f32_step_towards(gObjectList[objectIndex].offset, 0.0f, 4.0f) != 0) { func_80086FD4(objectIndex); } break; @@ -5383,7 +5383,7 @@ void func_8007F280(s32 objectIndex) { } break; case 14: - if (f32_step_down_towards(&gObjectList[objectIndex].unk_028[2], 0.0f, 2.0f) != 0) { + if (f32_step_down_towards(&gObjectList[objectIndex].offset[2], 0.0f, 2.0f) != 0) { func_80086FD4(objectIndex); } break; @@ -5431,7 +5431,7 @@ void func_8007F5A8(s32 objectIndex) { } func_8007E63C(objectIndex); func_8007F544(objectIndex); - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); func_80073514(objectIndex); } @@ -5525,11 +5525,11 @@ void func_8007FA08(s32 objectIndex) { temp_s0->model = d_course_bowsers_castle_dl_thwomp; temp_s0->boundingBoxSize = 0x000C; temp_s0->sizeScaling = 1.0f; - set_object_flag_unk_054_true(objectIndex, 0x04000220); + set_object_flag_status_true(objectIndex, 0x04000220); temp_s0->type = 0; temp_s0->unk_044 = 0.0f; temp_s0->origin_pos[1] = 0.0f; - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); set_obj_direction_angle(objectIndex, 0U, 0U, 0U); if (gIsMirrorMode != 0) { set_obj_orientation(objectIndex, 0U, 0xC000U, 0U); @@ -5540,7 +5540,7 @@ void func_8007FA08(s32 objectIndex) { temp_s0->direction_angle[1] = temp_s0->orientation[1]; temp_s0->unk_0DD = 1; temp_s0->unk_0DF = 8; - temp_s0->unk_028[1] = 15.0f; + temp_s0->offset[1] = 15.0f; temp_s0->unk_01C[1] = 15.0f; func_80072488(objectIndex); } @@ -5554,8 +5554,8 @@ void func_8007FB48(s32 objectIndex) { switch (gObjectList[objectIndex].unk_0AE) { case 1: gObjectList[objectIndex].unk_0B0 = 0x00A0; - gObjectList[objectIndex].unk_028[0] = 0.0f; - gObjectList[objectIndex].unk_028[2] = 0.0f; + gObjectList[objectIndex].offset[0] = 0.0f; + gObjectList[objectIndex].offset[2] = 0.0f; gObjectList[objectIndex].velocity[2] = 0.0f; func_80086FD4(objectIndex); break; @@ -5570,14 +5570,14 @@ void func_8007FB48(s32 objectIndex) { } } if (gObjectList[objectIndex].velocity[2] >= 0.0) { - if (gObjectList[objectIndex].unk_028[2] >= 40.0) { + if (gObjectList[objectIndex].offset[2] >= 40.0) { gObjectList[objectIndex].velocity[2] = -1.5f; } - } else if ((f64) gObjectList[objectIndex].unk_028[2] <= -40.0) { + } else if ((f64) gObjectList[objectIndex].offset[2] <= -40.0) { gObjectList[objectIndex].velocity[2] = 1.5f; } } - func_8008775C(objectIndex); + object_add_velocity_offset_xz(objectIndex); if (gObjectList[objectIndex].unk_0B0 < 0x65) { gObjectList[objectIndex].orientation[1] = func_800417B4(gObjectList[objectIndex].orientation[1], (gObjectList[objectIndex].direction_angle[1] + 0x8000)); if (gObjectList[objectIndex].unk_0B0 == 0x0064) { @@ -5586,10 +5586,10 @@ void func_8007FB48(s32 objectIndex) { } var_v0 = 0; if (gIsMirrorMode != 0) { - if (gObjectList[objectIndex].unk_028[0] <= -1000.0) { + if (gObjectList[objectIndex].offset[0] <= -1000.0) { var_v0 = 1; } - } else if (gObjectList[objectIndex].unk_028[0] >= 1000.0) { + } else if (gObjectList[objectIndex].offset[0] >= 1000.0) { var_v0 = 1; } gObjectList[objectIndex].unk_0B0--; @@ -5600,9 +5600,9 @@ void func_8007FB48(s32 objectIndex) { } break; case 4: - f32_step_towards(&gObjectList[objectIndex].unk_028[2], 0.0f, 2.0f); - f32_step_towards(gObjectList[objectIndex].unk_028, 0.0f, 5.0f); - if ((gObjectList[objectIndex].unk_028[0] + gObjectList[objectIndex].unk_028[2]) == 0.0) { + f32_step_towards(&gObjectList[objectIndex].offset[2], 0.0f, 2.0f); + f32_step_towards(gObjectList[objectIndex].offset, 0.0f, 5.0f); + if ((gObjectList[objectIndex].offset[0] + gObjectList[objectIndex].offset[2]) == 0.0) { func_80086FD4(objectIndex); } break; @@ -5627,7 +5627,7 @@ void func_8007FEA4(s32 objectIndex) { temp_v1 = &gObjectList[objectIndex]; switch (temp_v1->unk_0AE) { case 1: - if (f32_step_towards(&temp_v1->unk_028[0], temp_v1->unk_01C[0], 5.0f) != 0) { + if (f32_step_towards(&temp_v1->offset[0], temp_v1->unk_01C[0], 5.0f) != 0) { func_800726CC(objectIndex, 3); func_80086FD4(objectIndex); break; @@ -5636,7 +5636,7 @@ void func_8007FEA4(s32 objectIndex) { case 2: break; case 3: - if (f32_step_towards(&temp_v1->unk_028[0], 0.0f, 5.0f) != 0) { + if (f32_step_towards(&temp_v1->offset[0], 0.0f, 5.0f) != 0) { func_80086FD4(objectIndex); func_800722CC(objectIndex, 8); } @@ -5673,7 +5673,7 @@ void func_8007FFC0(s32 objectIndex) { } func_8007E63C(objectIndex); func_8007FF5C(objectIndex); - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); func_80073514(objectIndex); } @@ -5685,20 +5685,20 @@ void func_80080078(s32 objectIndex) { temp_s0->model = d_course_bowsers_castle_dl_thwomp; temp_s0->boundingBoxSize = 0x000C; temp_s0->sizeScaling = 1.0f; - set_object_flag_unk_054_true(objectIndex, 0x04000220); + set_object_flag_status_true(objectIndex, 0x04000220); temp_s0->type = 2; temp_s0->unk_0DF = 8; set_obj_direction_angle(objectIndex, 0U, 0U, 0U); temp_s0->unk_044 = 0.0f; temp_s0->origin_pos[1] = 0.0f; - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); temp_s0->unk_01C[1] = 30.0f; if (gIsMirrorMode != 0) { set_obj_orientation(objectIndex, 0U, 0x4000U, 0U); } else { set_obj_orientation(objectIndex, 0U, 0xC000U, 0U); } - switch (temp_s0->unk_0A0) { /* irregular */ + switch (temp_s0->primAlpha) { /* irregular */ case 0: temp_s0->unk_050 = 2; break; @@ -5738,7 +5738,7 @@ void func_800801FC(s32 objectIndex) { break; } func_8007E63C(objectIndex); - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); func_80073514(objectIndex); } @@ -5752,22 +5752,22 @@ void func_800802C0(s32 objectIndex) { temp_s0->itemDisplay = 0; temp_s0->boundingBoxSize = 0x000C; temp_s0->sizeScaling = 1.5f; - set_object_flag_unk_054_true(objectIndex, 0x05000220); + set_object_flag_status_true(objectIndex, 0x05000220); temp_s0->type = 1; temp_s0->unk_0DF = 6; - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); set_obj_direction_angle(objectIndex, 0U, 0U, 0U); temp_s0->unk_044 = 0.0f; temp_s0->origin_pos[1] = 0.0f; - temp_s0->unk_028[1] = 10.0f; + temp_s0->offset[1] = 10.0f; temp_s0->unk_01C[1] = 10.0f; if (gIsMirrorMode != 0) { set_obj_orientation(objectIndex, 0U, 0x4000U, 0U); } else { set_obj_orientation(objectIndex, 0U, 0xC000U, 0U); } - temp_s0->unk_028[0] = 0.0f; - temp_s0->unk_028[2] = 0.0f; + temp_s0->offset[0] = 0.0f; + temp_s0->offset[2] = 0.0f; func_800724DC(objectIndex); func_80072488(objectIndex); } @@ -5781,7 +5781,7 @@ void func_80080408(s32 objectIndex) { break; case 2: func_8008A6DC(objectIndex, 100.0f); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) { + if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { func_800C98B8(gObjectList[objectIndex].pos, gObjectList[objectIndex].velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x45)); func_80072488(objectIndex); } @@ -5797,7 +5797,7 @@ void func_80080408(s32 objectIndex) { } break; } - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); func_80073514(objectIndex); } @@ -5810,11 +5810,11 @@ void func_80080524(s32 objectIndex) { temp_s0->boundingBoxSize = 0x000C; temp_s0->itemDisplay = 0; temp_s0->sizeScaling = 1.0f; - set_object_flag_unk_054_true(objectIndex, 0x04000220); + set_object_flag_status_true(objectIndex, 0x04000220); temp_s0->type = 0; temp_s0->unk_0DF = 0x0A; func_80086E70(objectIndex); - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); temp_s0->unk_044 = 70.0f; temp_s0->origin_pos[1] = 70.0f; temp_s0->unk_01C[1] = 0.0f; @@ -5824,7 +5824,7 @@ void func_80080524(s32 objectIndex) { } else { set_obj_orientation(objectIndex, 0U, 0x4000U, 0U); } - switch (temp_s0->unk_0A0) { /* irregular */ + switch (temp_s0->primAlpha) { /* irregular */ case 0: temp_s0->unk_0DD = 2; temp_s0->velocity[2] = -1.0f; @@ -5843,13 +5843,13 @@ void func_800806BC(s32 objectIndex) { case 0: break; case 1: - if (f32_step_towards(&gObjectList[objectIndex].unk_028[2], 250.0f, gObjectList[objectIndex].velocity[2]) != 0) { + if (f32_step_towards(&gObjectList[objectIndex].offset[2], 250.0f, gObjectList[objectIndex].velocity[2]) != 0) { gObjectList[objectIndex].velocity[2] = -gObjectList[objectIndex].velocity[2]; func_80086FD4(objectIndex); } break; case 2: - if (f32_step_towards(&gObjectList[objectIndex].unk_028[2], 0.0f, gObjectList[objectIndex].velocity[2]) != 0) { + if (f32_step_towards(&gObjectList[objectIndex].offset[2], 0.0f, gObjectList[objectIndex].velocity[2]) != 0) { gObjectList[objectIndex].velocity[2] = -gObjectList[objectIndex].velocity[2]; func_8008701C(objectIndex, 1); } @@ -5862,13 +5862,13 @@ void func_8008078C(s32 objectIndex) { case 0: break; case 1: - if (f32_step_towards(&gObjectList[objectIndex].unk_028[2], -250.0f, gObjectList[objectIndex].velocity[2]) != 0) { + if (f32_step_towards(&gObjectList[objectIndex].offset[2], -250.0f, gObjectList[objectIndex].velocity[2]) != 0) { gObjectList[objectIndex].velocity[2] = -gObjectList[objectIndex].velocity[2]; func_80086FD4(objectIndex); } break; case 2: - if (f32_step_towards(&gObjectList[objectIndex].unk_028[2], 0.0f, gObjectList[objectIndex].velocity[2]) != 0) { + if (f32_step_towards(&gObjectList[objectIndex].offset[2], 0.0f, gObjectList[objectIndex].velocity[2]) != 0) { gObjectList[objectIndex].velocity[2] = -gObjectList[objectIndex].velocity[2]; func_8008701C(objectIndex, 1); } @@ -5885,7 +5885,7 @@ void func_8008085C(s32 objectIndex) { func_8008078C(objectIndex); break; } - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } void func_800808CC(s32 objectIndex) { @@ -5936,7 +5936,7 @@ void func_80080B28(s32 objectIndex, s32 playerId) { Player *temp_s0; temp_s0 = &gPlayerOne[playerId]; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00000200) != 0) { if (!(temp_s0->soundEffects & 0x100)) { temp_f0 = func_80088F54(objectIndex, temp_s0); if ((temp_f0 <= 9.0) && !(temp_s0->effects & 0x04000000) && (has_collided_horizontally_with_player(objectIndex, temp_s0) != 0)) { @@ -5951,7 +5951,7 @@ void func_80080B28(s32 objectIndex, s32 playerId) { } func_80080DE4(objectIndex); func_80075304(gObjectList[objectIndex].pos, 3, 3, D_8018D3C4); - set_object_flag_unk_054_false(objectIndex, 0x00000200); + set_object_flag_status_false(objectIndex, 0x00000200); func_800722A4(objectIndex, 0x00000040); func_80086F60(objectIndex); func_800726CC(objectIndex, 0x000000C8); @@ -5959,7 +5959,7 @@ void func_80080B28(s32 objectIndex, s32 playerId) { } } else if ((temp_f0 <= 17.5) && (func_80072320(objectIndex, 1) != 0) && (is_within_horizontal_distance_of_player(objectIndex, temp_s0, (temp_s0->unk_094 * 0.5) + 7.0) != 0)) { if ((temp_s0->type & 0x8000) && !(temp_s0->type & 0x100)) { - if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) { func_80072180(); } func_800722A4(objectIndex, 2); @@ -6012,7 +6012,7 @@ void func_80080E8C(s32 objectIndex1, s32 objectIndex2, s32 arg2) { gObjectList[objectIndex1].velocity[2] = coss(anAngle) * 0.6; } #else -GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80080E8C.s") +GLOBAL_ASM("asm/non_matchings/update_objects/func_80080E8C.s") #endif void func_80080FEC(s32 arg0) { @@ -6032,13 +6032,13 @@ void func_80081080(s32 objectIndex) { temp_v0 = &gObjectList[objectIndex]; temp_v0->activeTexture = D_8018D490; temp_v0->textureList = D_8018D490; - temp_v0->unk_0A0 = 0x00FF; + temp_v0->primAlpha = 0x00FF; temp_v0->direction_angle[1] = 0; temp_v0->orientation[0] = 0; temp_v0->orientation[2] = 0; - temp_v0->unk_028[0] = 0.0f; - temp_v0->unk_028[1] = 0.0f; - temp_v0->unk_028[2] = 0.0f; + temp_v0->offset[0] = 0.0f; + temp_v0->offset[1] = 0.0f; + temp_v0->offset[2] = 0.0f; temp_v0->sizeScaling = 0.25f; func_80072488(objectIndex); } @@ -6051,10 +6051,10 @@ void func_800810F4(s32 objectIndex) { func_80081080(objectIndex); break; case 2: - func_8008775C(objectIndex); - f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 14.0f, 0.5f); + object_add_velocity_offset_xz(objectIndex); + f32_step_up_towards(&gObjectList[objectIndex].offset[1], 14.0f, 0.5f); func_8007415C(objectIndex, &gObjectList[objectIndex].sizeScaling, 0.25f, 0.75f, 0.025f, 1, 0); - if (func_80073B00(objectIndex, &gObjectList[objectIndex].unk_0A0, 0x000000FF, 0, 4, 0, 0) != 0) { + if (func_80073B00(objectIndex, &gObjectList[objectIndex].primAlpha, 0x000000FF, 0, 4, 0, 0) != 0) { func_80072488(objectIndex); } break; @@ -6062,9 +6062,10 @@ void func_800810F4(s32 objectIndex) { func_80072428(objectIndex); break; } - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } +// update twomp I think void func_80081208(void) { } @@ -6117,10 +6118,10 @@ void func_80081210(void) { if (!(player->effects & BOO_EFFECT)) { func_80080B28(objectIndex, var_s4); } - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00020000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00020000) != 0) { func_80080A14(objectIndex, player); } - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00010000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00010000) != 0) { func_80080A4C(objectIndex, var_s4); } } @@ -6187,7 +6188,7 @@ void func_80081790(s32 objectIndex) { if (func_80087E08(objectIndex, gObjectList[objectIndex].velocity[1], 0.3f, gObjectList[objectIndex].unk_034, gObjectList[objectIndex].orientation[1], 0x00000032) != 0) { func_80072488(objectIndex); } - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); break; case 2: func_80072428(objectIndex); @@ -6200,19 +6201,19 @@ void func_80081848(s32 objectIndex) { init_texture_object(objectIndex, d_course_moo_moo_farm_mole_tlut, (u8*) d_course_moo_moo_farm_mole_frames, 0x20U, (u16) 0x00000040); gObjectList[objectIndex].sizeScaling = 0.15f; gObjectList[objectIndex].itemDisplay = 0; - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); set_obj_direction_angle(objectIndex, 0U, 0U, 0U); set_obj_orientation(objectIndex, 0U, 0U, 0x8000U); gObjectList[objectIndex].boundingBoxSize = 6; gObjectList[objectIndex].velocity[1] = 4.0f; - set_object_flag_unk_054_true(objectIndex, 0x04000000); + set_object_flag_status_true(objectIndex, 0x04000000); func_80072488(objectIndex); } void func_80081924(s32 objectIndex) { switch (gObjectList[objectIndex].unk_0AE) { case 1: - if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 9.0f, 0.7f) != 0) { + if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], 9.0f, 0.7f) != 0) { func_80086FD4(objectIndex); } break; @@ -6220,7 +6221,7 @@ void func_80081924(s32 objectIndex) { func_800871AC(objectIndex, 0x0000000A); break; case 3: - if (f32_step_down_towards(&gObjectList[objectIndex].unk_028[1], 3.0f, 1.0f) != 0) { + if (f32_step_down_towards(&gObjectList[objectIndex].offset[1], 3.0f, 1.0f) != 0) { func_80086F60(objectIndex); } break; @@ -6234,7 +6235,7 @@ void func_80081924(s32 objectIndex) { gObjectList[objectIndex].orientation[2] += 0x1000; gObjectList[objectIndex].velocity[1] -= 0.184; func_8008751C(objectIndex); - func_80087710(objectIndex); + object_add_velocity_offset_xyz(objectIndex); if (gObjectList[objectIndex].pos[1] <= -10.0) { func_80086F60(objectIndex); } @@ -6256,7 +6257,7 @@ void func_80081A88(s32 objectIndex) { func_80081924(objectIndex); break; } - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } void func_80081AFC(s32 objectIndex, s32 arg1) { @@ -6272,7 +6273,7 @@ void func_80081AFC(s32 objectIndex, s32 arg1) { if (temp_s0->unk_04C == 0) { func_80086EAC(objectIndex, 2, 1); func_80072488(objectIndex); - set_object_flag_unk_054_true(objectIndex, 0x00000200); + set_object_flag_status_true(objectIndex, 0x00000200); } else { temp_s0->unk_04C--; } @@ -6298,7 +6299,7 @@ void func_80081AFC(s32 objectIndex, s32 arg1) { break; case 0x64: if (temp_s0->unk_0AE == 0) { - set_object_flag_unk_054_false(objectIndex, 0x00000200); + set_object_flag_status_false(objectIndex, 0x00000200); func_80072428(objectIndex); switch (arg1) { /* switch 1; irregular */ case 1: /* switch 1 */ @@ -6334,11 +6335,11 @@ void func_80081D34(s32 objectIndex) { var_s1 = gPlayerOne; var_s4 = camera1; for (var_s2 = 0; var_s2 < D_8018D158; var_s2++, var_s1++, var_s4++) { - if ((is_obj_index_flag_unk_054_active(objectIndex, 0x00000200) != 0) && !(var_s1->effects & 0x80000000) && (has_collided_with_player(objectIndex, var_s1) != 0)) { + if ((is_obj_flag_status_active(objectIndex, 0x00000200) != 0) && !(var_s1->effects & 0x80000000) && (has_collided_with_player(objectIndex, var_s1) != 0)) { if ((var_s1->type & 0x8000) && !(var_s1->type & 0x100)) { var_s5 = 1; temp_s0 = &gObjectList[objectIndex]; - if (is_obj_index_flag_unk_054_active(objectIndex, 0x04000000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x04000000) != 0) { func_80072180(); } if (var_s1->effects & 0x200) { @@ -6360,10 +6361,10 @@ void func_80081D34(s32 objectIndex) { } if (var_s5 != 0) { temp_s0 = &gObjectList[objectIndex]; - set_object_flag_unk_054_false(objectIndex, 0x00000200); + set_object_flag_status_false(objectIndex, 0x00000200); func_80086F60(objectIndex); set_obj_origin_pos(objectIndex, temp_s0->pos[0], temp_s0->pos[1], temp_s0->pos[2]); - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); func_80086EAC(objectIndex, 2, 0x000A); func_800726CC(objectIndex, 0x0000000A); } @@ -6428,7 +6429,7 @@ void func_80081FF4(s32 objectIndex, s32 arg1) { gObjectList[objectIndex].origin_pos[2] = gMoleSpawns[var_v1][offset + 2]; } #else -GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80081FF4.s") +GLOBAL_ASM("asm/non_matchings/update_objects/func_80081FF4.s") #endif void func_800821AC(s32 objectIndex, s32 arg1) { @@ -6439,7 +6440,7 @@ void func_800821AC(s32 objectIndex, s32 arg1) { } } -void func_800821FC(void) { +void update_moles(void) { s32 var_s1; s32 objectIndex; UNUSED s32 stackPadding; @@ -6510,7 +6511,7 @@ void func_8008241C(s32 objectIndex, s32 arg1) { gObjectList[objectIndex].unk_034 = 1.0f; func_80086EF0(objectIndex); gObjectList[objectIndex].spline = D_800E633C[arg1 % 4]; - set_object_flag_unk_054_true(objectIndex, 0x00000800); + set_object_flag_status_true(objectIndex, 0x00000800); func_80072488(objectIndex); } @@ -6530,29 +6531,29 @@ void func_8008275C(s32 objectIndex) { switch (gObjectList[objectIndex].unk_0DD) { /* irregular */ case 1: func_8008B78C(objectIndex); - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); break; case 2: func_8008B78C(objectIndex); vec3f_copy(gObjectList[objectIndex].unk_01C, gObjectList[objectIndex].pos); - func_8000D940(gObjectList[objectIndex].origin_pos, (s16 *) &gObjectList[objectIndex].unk_0C6, gObjectList[objectIndex].unk_034, 0.0f, 0); - gObjectList[objectIndex].unk_028[0] *= 2.0; - gObjectList[objectIndex].unk_028[1] *= 2.5; - gObjectList[objectIndex].unk_028[2] *= 2.0; - func_8008BF18(objectIndex); - gObjectList[objectIndex].direction_angle[1] = get_angle_between_points(gObjectList[objectIndex].unk_01C, gObjectList[objectIndex].pos); + func_8000D940(gObjectList[objectIndex].origin_pos, &gObjectList[objectIndex].unk_0C6, gObjectList[objectIndex].unk_034, 0.0f, 0); + gObjectList[objectIndex].offset[0] *= 2.0; + gObjectList[objectIndex].offset[1] *= 2.5; + gObjectList[objectIndex].offset[2] *= 2.0; + object_calculate_new_pos_offset(objectIndex); + gObjectList[objectIndex].direction_angle[1] = get_angle_between_two_vectors(gObjectList[objectIndex].unk_01C, gObjectList[objectIndex].pos); break; } func_800873F4(objectIndex); } -void func_80082870(void) { +void update_seagulls(void) { Objects *temp_s1; UNUSED s32 *var_s4; s32 temp_s0; s32 var_s3; - for (var_s3 = 0; var_s3 < 10; var_s3++) { + for (var_s3 = 0; var_s3 < NUM_SEAGULLS; var_s3++) { temp_s0 = indexObjectList2[var_s3]; temp_s1 = &gObjectList[temp_s0]; @@ -6567,7 +6568,7 @@ void func_80082870(void) { D_80183E40[0] = 0.0f; D_80183E40[1] = 0.0f; D_80183E40[2] = 0.0f; - if (gGamestate != 9) { + if (gGamestate != CREDITS_SEQUENCE) { func_800C98B8(temp_s1->pos, D_80183E40, SOUND_ARG_LOAD(0x19, 0x01, 0x70, 0x43)); } else { temp_s0 = indexObjectList2[1]; @@ -6603,12 +6604,12 @@ void init_ktb_crab(s32 objectIndex) { object->itemDisplay = 0; func_80072488(objectIndex); object->boundingBoxSize = 1; - set_object_flag_unk_054_true(objectIndex, 0x04000420); + set_object_flag_status_true(objectIndex, 0x04000420); func_80086EAC(objectIndex, 0, 1); - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); set_obj_orientation(objectIndex, 0U, 0U, 0x8000U); object->unk_034 = 1.5f; - set_object_flag_unk_054_true(objectIndex, 0x00000200); + set_object_flag_status_true(objectIndex, 0x00000200); } void func_80082B34(s32 objectIndex, UNUSED s32 unused) { @@ -6664,8 +6665,8 @@ void func_80082C30(s32 objectIndex) { } break; } - func_8008BF18(objectIndex); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) { + object_calculate_new_pos_offset(objectIndex); + if (is_obj_flag_status_active(objectIndex, VISIBLE) != 0) { func_80088538(objectIndex); gObjectList[objectIndex].pos[1] = (f32) (gObjectList[objectIndex].unk_044 + 2.5); } @@ -6677,7 +6678,7 @@ void func_80082E18(s32 objectIndex) { } } -void func_80082E5C(void) { +void update_crabs(void) { s32 objectIndex; s32 var_s1; @@ -6701,11 +6702,11 @@ void func_80082F1C(s32 objectIndex, s32 arg1) { gObjectList[objectIndex].sizeScaling = 0.027f; func_80072488(objectIndex); set_obj_origin_pos(objectIndex, D_800E5DF4[arg1].pos[0] * xOrientation, D_800E5DF4[arg1].pos[1], D_800E5DF4[arg1].pos[2]); - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); set_obj_direction_angle(objectIndex, 0U, D_800E5DF4[arg1].rot, 0U); } #else -GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80082F1C.s") +GLOBAL_ASM("asm/non_matchings/update_objects/func_80082F1C.s") #endif void func_80083018(s32 objectIndex, s32 arg1) { @@ -6720,7 +6721,7 @@ void func_80083018(s32 objectIndex, s32 arg1) { } void func_80083060(s32 objectIndex) { - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } void func_80083080(void) { @@ -6747,11 +6748,11 @@ void func_8008311C(s32 objectIndex, s32 arg1) { temp_s0->sizeScaling = 0.2f; temp_s0->itemDisplay = 0; func_80072488(objectIndex); - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); set_obj_orientation(objectIndex, 0U, 0U, 0x8000U); temp_s0->unk_034 = ((arg1 % 6) * 0.1) + 0.5; func_80086E70(objectIndex); - set_object_flag_unk_054_true(objectIndex, 0x04000600); + set_object_flag_status_true(objectIndex, 0x04000600); temp_s0->boundingBoxSize = 2; } @@ -6778,9 +6779,9 @@ void func_80083248(s32 objectIndex) { } break; } - func_8008BF18(objectIndex); - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00200000) != 0) { - if (is_obj_index_flag_unk_054_active(objectIndex, 0x00400000) != 0) { + object_calculate_new_pos_offset(objectIndex); + if (is_obj_flag_status_active(objectIndex, 0x00200000) != 0) { + if (is_obj_flag_status_active(objectIndex, 0x00400000) != 0) { func_8008861C(objectIndex); } gObjectList[objectIndex].pos[1] = gObjectList[objectIndex].unk_044 + 6.0; @@ -6811,11 +6812,11 @@ void func_80083474(s32 objectIndex) { } } -void func_800834B8(void) { +void update_hedgehogs(void) { s32 temp_s1; s32 var_s0; - for (var_s0 = 0; var_s0 < 0xF; var_s0++) { + for (var_s0 = 0; var_s0 < NUM_HEDGEHOGS; var_s0++) { temp_s1 = indexObjectList2[var_s0]; func_800833D0(temp_s1, var_s0); func_80083248(temp_s1); @@ -6843,7 +6844,7 @@ void func_80083538(s32 objectIndex, Vec3f arg1, s32 arg2, s32 arg3) { temp_s0->origin_pos[0] = arg1[0]; temp_s0->origin_pos[1] = arg1[1]; temp_s0->origin_pos[2] = arg1[2]; - temp_s0->unk_0A0 = random_int(0x4000U) + 0x1000; + temp_s0->primAlpha = random_int(0x4000U) + 0x1000; } void func_800836F0(Vec3f arg0) { @@ -6871,8 +6872,8 @@ void func_8008379C(s32 objectIndex) { func_80072428(objectIndex); break; } - func_8008BF18(objectIndex); - gObjectList[objectIndex].orientation[2] += gObjectList[objectIndex].unk_0A0; + object_calculate_new_pos_offset(objectIndex); + gObjectList[objectIndex].orientation[2] += gObjectList[objectIndex].primAlpha; } void func_80083868(s32 objectIndex) { @@ -6884,14 +6885,14 @@ void func_80083868(s32 objectIndex) { temp_s0->sizeScaling = 0.1f; temp_s0->itemDisplay = 0; func_80072488(objectIndex); - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); temp_s0->orientation[0] = 0; temp_s0->orientation[1] = 0; temp_s0->orientation[2] = 0x8000; - temp_s0->unk_0A0 = random_int(0x2000U) - 0x1000; + temp_s0->primAlpha = random_int(0x2000U) - 0x1000; func_80086E70(objectIndex); temp_s0->unk_034 = 1.5f; - set_object_flag_unk_054_true(objectIndex, 0x00000200); + set_object_flag_status_true(objectIndex, 0x00000200); } void func_80083948(s32 objectIndex) { @@ -6912,7 +6913,7 @@ void func_80083948(s32 objectIndex) { func_80087D24(objectIndex, 0.0f, 0.2f, -7.0f); break; case 20: - if (f32_step_up_towards(&gObjectList[objectIndex].unk_028[1], 0.0f, 0.2f) != 0) { + if (f32_step_up_towards(&gObjectList[objectIndex].offset[1], 0.0f, 0.2f) != 0) { func_80073800(objectIndex, 0); func_8008701C(objectIndex, 1); } @@ -6921,9 +6922,9 @@ void func_80083948(s32 objectIndex) { default: break; } - func_8008BF18(objectIndex); - func_80073D0C(objectIndex, &gObjectList[objectIndex].unk_0A0, -0x00001000, 0x00001000, 0x00000400, 1, -1); - gObjectList[objectIndex].orientation[2] = gObjectList[objectIndex].unk_0A0 + 0x8000; + object_calculate_new_pos_offset(objectIndex); + func_80073D0C(objectIndex, &gObjectList[objectIndex].primAlpha, -0x00001000, 0x00001000, 0x00000400, 1, -1); + gObjectList[objectIndex].orientation[2] = gObjectList[objectIndex].primAlpha + 0x8000; } void func_80083A94(s32 objectIndex) { @@ -6946,17 +6947,17 @@ void func_80083B0C(s32 objectIndex) { gObjectList[objectIndex].sizeScaling = 0.1f; gObjectList[objectIndex].itemDisplay = 0; func_80072488(objectIndex); - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); gObjectList[objectIndex].orientation[0] = 0; gObjectList[objectIndex].orientation[1] = 0; gObjectList[objectIndex].orientation[2] = 0x8000; gObjectList[objectIndex].boundingBoxSize = 2; gObjectList[objectIndex].unk_034 = 1.5f; - set_object_flag_unk_054_true(objectIndex, 0x04000210); + set_object_flag_status_true(objectIndex, 0x04000210); } void func_80083BE4(s32 objectIndex) { - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } void func_80083C04(s32 objectIndex) { @@ -6979,7 +6980,7 @@ void func_80083C04(s32 objectIndex) { break; case 11: if (func_8007278C(objectIndex, 0x0000000A) != 0) { - set_object_flag_unk_054_true(objectIndex, 0x00000010); + set_object_flag_status_true(objectIndex, 0x00000010); temp_s1->sizeScaling = 0.001f; } break; @@ -6990,7 +6991,7 @@ void func_80083C04(s32 objectIndex) { break; case 13: func_800726CC(objectIndex, 2); - set_object_flag_unk_054_false(objectIndex, 0x00001000); + set_object_flag_status_false(objectIndex, 0x00001000); break; } if (temp_s1->state >= 2) { @@ -6999,7 +7000,7 @@ void func_80083C04(s32 objectIndex) { func_80083BE4(objectIndex); } -void func_80083D60(void) { +void update_snowmen(void) { s32 var_s0; s32 var_s3; s32 var_s4; @@ -7018,16 +7019,16 @@ void func_80083D60(void) { if (var_s0) {} // ?? } - for (var_s0 = 0; var_s0 < 19; var_s0++) { + for (var_s0 = 0; var_s0 < NUM_SNOWMEN; var_s0++) { var_s4 = indexObjectList1[var_s0]; var_s3 = indexObjectList2[var_s0]; func_80083A94(var_s3); func_80083C04(var_s4); - if (is_obj_index_flag_unk_054_inactive(var_s4, 0x00001000) != 0) { + if (is_obj_index_flag_status_inactive(var_s4, 0x00001000) != 0) { temp_s1 = &gObjectList[var_s4]; if ((func_8008A8B0(temp_s1->unk_0D5 - 1, temp_s1->unk_0D5 + 1) != 0) && (func_80089B50(var_s4) != 0)) { - set_object_flag_unk_054_true(var_s4, 0x00001000); - set_object_flag_unk_054_false(var_s4, 0x00000010); + set_object_flag_status_true(var_s4, 0x00001000); + set_object_flag_status_false(var_s4, 0x00000010); func_800726CC(var_s4, 0x0000000A); func_8008701C(var_s3, 0x0000000A); func_800836F0(temp_s1->pos); @@ -7047,7 +7048,7 @@ void func_80083F18(s32 objectIndex) { if (func_80087E08(objectIndex, gObjectList[objectIndex].velocity[1], 0.12f, gObjectList[objectIndex].unk_034, gObjectList[objectIndex].direction_angle[1], 0x00000064) != 0) { func_80072488(objectIndex); } - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); break; case 2: func_80086F60(objectIndex); @@ -7131,7 +7132,7 @@ void func_80084430(s32 objectIndex, UNUSED s32 arg1) { temp_s0->unk_0DD = 1; func_80086EF0(objectIndex); temp_s0->spline = D_800E672C[0]; - set_object_flag_unk_054_true(objectIndex, 0x04000800); + set_object_flag_status_true(objectIndex, 0x04000800); temp_s0->type = func_80004EAC(d_course_sherbet_land_unk_data11, 0); func_80072488(objectIndex); } @@ -7161,7 +7162,7 @@ void func_800845C8(s32 objectIndex, s32 arg1) { temp_s0->boundingBoxSize = 4; temp_s0->unk_09C = 2; temp_s0->unk_04C = random_int(0x012CU); - set_object_flag_unk_054_true(objectIndex, 0x04000220); + set_object_flag_status_true(objectIndex, 0x04000220); if ((arg1 > 0) && (arg1 < 9)) { if ((arg1 == 1) || (arg1 == 2)) { set_obj_origin_pos(objectIndex, xOrientation * -2960.0, -80.0f, 1521.0f); @@ -7380,7 +7381,7 @@ void func_80084D2C(s32 objectIndex, s32 arg1) { break; } func_8008781C(objectIndex); - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } void func_80085024(void) { @@ -7389,13 +7390,13 @@ void func_80085024(void) { void func_8008502C(s32 objectIndex, UNUSED s32 arg1) { func_80088038(objectIndex, gObjectList[objectIndex].unk_01C[1], gObjectList[objectIndex].unk_0C6); - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); func_800873F4(objectIndex); } void func_80085080(s32 objectIndex) { func_8008B78C(objectIndex); - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); func_800873F4(objectIndex); } @@ -7444,12 +7445,12 @@ void func_800850B0(s32 objectIndex, s32 arg1) { } } -void func_80085214(void) { +void update_penguins(void) { UNUSED s32 var_s2; s32 objectIndex; s32 var_s1; - for (var_s1 = 0; var_s1 < 0xF; var_s1++) { + for (var_s1 = 0; var_s1 < NUM_PENGUINS; var_s1++) { objectIndex = indexObjectList1[var_s1]; if (gObjectList[objectIndex].state != 0) { if (var_s1 == 0) { @@ -7466,22 +7467,22 @@ void func_80085214(void) { } else { func_80089820(objectIndex, 1.5f, 1.25f, 0x1900A046U); } - if ((is_obj_index_flag_unk_054_active(objectIndex, 0x02000000) != 0) && (func_80072354(objectIndex, 0x00000020) != 0)) { + if ((is_obj_flag_status_active(objectIndex, 0x02000000) != 0) && (func_80072354(objectIndex, 0x00000020) != 0)) { func_800722A4(objectIndex, 0x00000060); - set_object_flag_unk_054_false(objectIndex, 0x02000000); + set_object_flag_status_false(objectIndex, 0x02000000); } } } -void func_800853DC(s32 objectIndex) { +void init_hot_air_balloon(s32 objectIndex) { gObjectList[objectIndex].sizeScaling = 1.0f; gObjectList[objectIndex].model = d_course_luigi_raceway_dl_F960; if (gGamestate != 9) { set_obj_origin_pos(objectIndex, xOrientation * -176.0, 0.0f, -2323.0f); - func_8008B80C(objectIndex, 0.0f, 300.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 300.0f, 0.0f); } else { set_obj_origin_pos(objectIndex, xOrientation * -1250.0, 0.0f, 1110.0f); - func_8008B80C(objectIndex, 0.0f, 300.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 300.0f, 0.0f); } func_8008B844(objectIndex); func_800886F4(objectIndex); @@ -7494,7 +7495,7 @@ void func_800853DC(s32 objectIndex) { void func_80085534(s32 objectIndex) { switch (gObjectList[objectIndex].unk_0AE) { case 1: - if (gObjectList[objectIndex].unk_028[1] <= 18.0) { + if (gObjectList[objectIndex].offset[1] <= 18.0) { func_80086FD4(objectIndex); } break; @@ -7538,14 +7539,14 @@ void func_80085534(s32 objectIndex) { } break; } - func_800877C4(objectIndex); + object_add_velocity_offset_y(objectIndex); gObjectList[objectIndex].direction_angle[1] += 0x100; } void func_80085768(s32 objectIndex) { switch (gObjectList[objectIndex].state) { /* irregular */ case 1: - func_800853DC(objectIndex); + init_hot_air_balloon(objectIndex); break; case 0: case 2: @@ -7553,18 +7554,18 @@ void func_80085768(s32 objectIndex) { } } -void func_800857C0(void) { +void update_hot_air_balloon(void) { s32 objectIndex; objectIndex = indexObjectList1[0]; if (gObjectList[objectIndex].state != 0) { func_80085768(objectIndex); func_80085534(objectIndex); - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); if (gObjectList[objectIndex].state >= 2) { - D_802BA05C->pos[0] = gObjectList[objectIndex].pos[0]; - D_802BA05C->pos[1] = gObjectList[objectIndex].pos[1] - 10.0; - D_802BA05C->pos[2] = gObjectList[objectIndex].pos[2]; + gActorHotAirBalloonItemBox->pos[0] = gObjectList[objectIndex].pos[0]; + gActorHotAirBalloonItemBox->pos[1] = gObjectList[objectIndex].pos[1] - 10.0; + gActorHotAirBalloonItemBox->pos[2] = gObjectList[objectIndex].pos[2]; } } } @@ -7579,11 +7580,11 @@ void func_80085878(s32 objectIndex, s32 arg1) { temp_s0->vertex = (Vtx *) d_rainbow_road_unk3; temp_s0->sizeScaling = 0.03f; temp_s0->boundingBoxSize = 0x000A; - set_object_flag_unk_054_true(objectIndex, 0x04000200); + set_object_flag_status_true(objectIndex, 0x04000200); temp_s0->unk_084[8] = (arg1 * 0x12C) + 0x1F4; set_obj_origin_pos(objectIndex, 0.0f, -15.0f, 0.0f); temp_v0 = &D_80164490[(u16)temp_s0->unk_084[8]]; - func_8008B80C(objectIndex, temp_v0->posX, temp_v0->posY, temp_v0->posZ); + set_obj_origin_offset(objectIndex, temp_v0->posX, temp_v0->posY, temp_v0->posZ); set_obj_direction_angle(objectIndex, 0U, 0U, 0U); temp_s0->unk_034 = 4.0f; temp_s0->type = func_80004EAC(d_rainbow_road_unk3, 0); @@ -7610,20 +7611,20 @@ void func_800859C8(s32 objectIndex, s32 arg1) { func_80074344(objectIndex, &temp_s0->unk_044, -0.8f, 0.8f, 0.03f, 0, -1); } -void func_80085AA8(void) { +void update_chain_chomps(void) { s32 objectIndex; s32 var_s4; Objects *temp_s0; - for (var_s4 = 0; var_s4 < 3; var_s4++) { + for (var_s4 = 0; var_s4 < NUM_CHAIN_CHOMPS; var_s4++) { objectIndex = indexObjectList2[var_s4]; temp_s0 = &gObjectList[objectIndex]; if (temp_s0->state != 0) { func_800859C8(objectIndex, var_s4); - vec3f_copy(temp_s0->unk_01C, temp_s0->unk_028); - func_8000D940(temp_s0->unk_028, &temp_s0->unk_084[8], temp_s0->unk_034, temp_s0->unk_044, 0); - temp_s0->direction_angle[1] = get_angle_between_points(temp_s0->unk_01C, temp_s0->unk_028); - func_8008BF18(objectIndex); + vec3f_copy(temp_s0->unk_01C, temp_s0->offset); + func_8000D940(temp_s0->offset, &temp_s0->unk_084[8], temp_s0->unk_034, temp_s0->unk_044, 0); + temp_s0->direction_angle[1] = get_angle_between_two_vectors(temp_s0->unk_01C, temp_s0->offset); + object_calculate_new_pos_offset(objectIndex); func_80089CBC(objectIndex, 30.0f); } } @@ -7631,7 +7632,7 @@ void func_80085AA8(void) { void func_80085BB4(s32 objectIndex) { gObjectList[objectIndex].sizeScaling = 8.0f; - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); set_obj_orientation(objectIndex, 0U, 0U, 0x8000U); func_80072488(objectIndex); } @@ -7754,7 +7755,7 @@ void func_80086074(s32 objectIndex, s32 arg1) { func_80085BB4(objectIndex); } #else -GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80086074.s") +GLOBAL_ASM("asm/non_matchings/update_objects/func_80086074.s") #endif void func_80086110(s32 objectIndex, s32 arg1) { @@ -7767,7 +7768,7 @@ void func_80086110(s32 objectIndex, s32 arg1) { } } -void update_obj_neon(s32 objectIndex, s32 id) { +void update_object_neon(s32 objectIndex, s32 id) { switch (id) { /* irregular */ case 0: func_80085CA0(objectIndex); @@ -7791,10 +7792,10 @@ void update_neon(void) { for (id = 0; id < NUM_NEON_SIGNS; id++) { objectIndex = indexObjectList1[id]; if (gObjectList[objectIndex].state != 0) { - update_obj_neon(objectIndex, id); + update_object_neon(objectIndex, id); if (gObjectList[objectIndex].state >= 2) { update_neon_texture(objectIndex); - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } } } @@ -7819,7 +7820,7 @@ void func_8008629C(s32 objectIndex, s32 arg1) { } gObjectList[objectIndex].sizeScaling = 1.0f; set_obj_origin_pos(objectIndex, D_800E634C[0][0] - 1.5, D_800E634C[0][1], D_800E634C[0][2]); - func_8008B80C(objectIndex, 0.0f, -10.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, -10.0f, 0.0f); set_obj_direction_angle(objectIndex, 0U, 0xF8E4U, 0U); gObjectList[objectIndex].unk_048 = 0; func_80072488(objectIndex); @@ -7834,18 +7835,18 @@ void func_80086424(s32 objectIndex) { func_80086FD4(objectIndex); break; case 2: - if (gObjectList[objectIndex].unk_028[1] >= -2.0) { + if (gObjectList[objectIndex].offset[1] >= -2.0) { gObjectList[objectIndex].velocity[1] -= 0.1; } - func_800877C4(objectIndex); - if (gObjectList[objectIndex].unk_028[1] >= 0.0) { - gObjectList[objectIndex].unk_028[1] = 0.0f; + object_add_velocity_offset_y(objectIndex); + if (gObjectList[objectIndex].offset[1] >= 0.0) { + gObjectList[objectIndex].offset[1] = 0.0f; gObjectList[objectIndex].velocity[1] = 0.0f; func_80086F60(objectIndex); } break; } - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } void func_80086528(s32 objectIndex, s32 arg1) { @@ -7925,7 +7926,7 @@ void func_80086700(s32 objectIndex) { } gObjectList[objectIndex].sizeScaling = 0.005f; set_obj_origin_pos(objectIndex, gObjectList[indexObjectList2[0]].pos[0], gObjectList[indexObjectList2[0]].pos[1] + 16.0, gObjectList[indexObjectList2[0]].pos[2]); - func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); + set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); set_obj_direction_angle(objectIndex, 0U, 0U, 0U); gObjectList[objectIndex].unk_084[1] = 0x0200; func_80072488(objectIndex); @@ -7957,7 +7958,7 @@ void func_80086940(s32 objectIndex) { temp_s0->velocity[1] = -0.4f; func_80086FD4(objectIndex); temp_s0->origin_pos[1] = 90.0f; - temp_s0->unk_028[1] = 60.0f; + temp_s0->offset[1] = 60.0f; switch (D_802874D8.unk1D) { /* switch 1; irregular */ case 1: /* switch 1 */ temp_s0->origin_pos[0] -= 3.0; @@ -7970,11 +7971,11 @@ void func_80086940(s32 objectIndex) { } break; case 5: - if ((f64) temp_s0->unk_028[1] <= 8.0) { + if ((f64) temp_s0->offset[1] <= 8.0) { f32_step_towards(&temp_s0->velocity[1], -0.1f, -0.01f); } - func_800877C4(objectIndex); - if ((f64) temp_s0->unk_028[1] <= 0.0) { + object_add_velocity_offset_y(objectIndex); + if ((f64) temp_s0->offset[1] <= 0.0) { func_80086FD4(objectIndex); } break; @@ -7998,7 +7999,7 @@ void func_80086940(s32 objectIndex) { temp_s0->direction_angle[0] += 0x400; temp_s0->direction_angle[1] -= 0x200; } - func_8008BF18(objectIndex); + object_calculate_new_pos_offset(objectIndex); } void func_80086C14(s32 objectIndex) { diff --git a/src/code_80071F00.h b/src/update_objects.h similarity index 90% rename from src/code_80071F00.h rename to src/update_objects.h index 18d353b0d..4350d5125 100644 --- a/src/code_80071F00.h +++ b/src/update_objects.h @@ -1,5 +1,5 @@ -#ifndef CODE_80071F00_H -#define CODE_80071F00_H +#ifndef UPDATE_OBJECTS_H +#define UPDATE_OBJECTS_H #include "code_80004740.h" #include "common_structs.h" @@ -16,11 +16,11 @@ s32 add_unused_obj_index(s32*, s32*, s32); void delete_object_wrapper(s32*); void func_80072120(s32*, s32); void func_80072180(void); -void set_object_flag_unk_054_true(s32, s32); -void set_object_flag_unk_054_false(s32, s32); +void set_object_flag_status_true(s32, s32); +void set_object_flag_status_false(s32, s32); void func_80072214(s32, s32); -s32 is_obj_index_flag_unk_054_active(s32, s32); -s32 is_obj_index_flag_unk_054_inactive(s32, s32); +s32 is_obj_flag_status_active(s32, s32); +s32 is_obj_index_flag_status_inactive(s32, s32); void func_800722A4(s32, s32); void func_800722CC(s32, s32); void func_800722F8(s32, s32); @@ -148,33 +148,33 @@ void func_80076958(s32); void func_800769D8(s32); void func_80076AEC(s32); void func_80076B7C(void); -void update_particle_bowser_castle(void); -void func_80076C9C(s32, Vec3f, s16); -void func_80076D70(Vec3f, f32, s16); +void update_flame_particle(void); +void init_object_smoke_paticle(s32, Vec3f, s16); +void init_smoke_particle(Vec3f, f32, s16); void func_80076DC4(s32); void func_80076E14(s32); void func_80076ED8(s32); void func_80076F2C(void); -void func_80076FEC(s32, s32); -void func_800770F0(s32); +void init_object_smoke_particle(s32, s32); +void init_smoke_particles(s32); void func_800773D8(f32*, s32); void func_80077428(s32); void func_80077450(s32); void func_80077584(s32); void func_80077640(void); -void init_leaf_particle(s32, Vec3f, s32); -s32 func_80077A54(Vec3f, s32); -void func_80077AB0(Vec3f, s32); +void init_object_leaf_particle(s32, Vec3f, s32); +s32 init_leaf_particle(Vec3f, s32); +void spawn_leaf(Vec3f, s32); void func_80077B14(s32); void func_80077B3C(s32); void func_80077BCC(s32); -void func_80077C9C(void); +void update_leaf(void); void func_80077E20(s32); void func_80078220(s32); void func_80078288(s32); void func_800786EC(s32); void func_80078790(void); -void func_80078838(void); +void update_snowflakes(void); void func_800788F8(s32, u16, Camera*); void func_800789AC(s32, Camera*, Vec4s*); void func_80078C68(void); @@ -195,7 +195,7 @@ void func_8007A778(s32, Player*, Camera*); void func_8007A884(void); void func_8007A88C(s32); void func_8007A910(s32); -void update_obj_laikitu(s32); +void update_object_lakitu(s32); void func_8007AA44(s32); void func_8007ABFC(s32, s32); void consume_item(s32); @@ -209,13 +209,13 @@ void func_8007B34C(s32); void func_8007BB9C(s32); void func_8007BBBC(s32); void func_8007BD04(s32); -void func_8007BDA8(void); +void update_cheep_cheep_race(void); void init_var_cheep_cheep(s32); void func_8007BEC8(s32); void func_8007BFB0(s32); -void func_8007C280(void); -void func_8007C2F8(s32); -void func_8007C340(void); +void update_cheep_cheep_ending(void); +void update_cheep_cheep(s32); +void wrapper_update_boos(void); void func_8007C360(s32, Camera*); void func_8007C420(s32, Player*, Camera*); void func_8007C4A4(s32); @@ -227,7 +227,7 @@ void func_8007C7B4(s32, s32); void func_8007C91C(s32); s32 func_8007C9F8(void); void func_8007CA70(void); -void func_8007CC00(void); +void update_boos(void); void func_8007CE0C(s32); void func_8007CEDC(s32); void func_8007D070(void); @@ -241,11 +241,11 @@ void func_8007D8D4(s32, s32); void func_8007DA4C(s32); void func_8007DA74(s32); void func_8007DAF8(s32, s32); -void func_8007DB44(void); +void update_bat(void); void func_8007DDC0(s32); void init_bb_trash_bin(s32); void func_8007E00C(s32); -void func_8007E1AC(void); +void update_trash_bin(void); void func_8007E1F4(s32); void func_8007E358(s32); void func_8007E3EC(s32); @@ -297,16 +297,16 @@ void func_80081AFC(s32, s32); void func_80081D34(s32); void func_80081FF4(s32, s32); void func_800821AC(s32, s32); -void func_800821FC(void); +void update_moles(void); void func_8008241C(s32, s32); void func_80082714(s32, s32); void func_8008275C(s32); -void func_80082870(void); +void update_seagulls(void); void init_ktb_crab(s32); void func_80082B34(s32, s32); void func_80082C30(s32); void func_80082E18(s32); -void func_80082E5C(void); +void update_crabs(void); void func_80082F1C(s32, s32); void func_80083018(s32, s32); void func_80083060(s32); @@ -315,7 +315,7 @@ void func_8008311C(s32, s32); void func_80083248(s32); void func_800833D0(s32, s32); void func_80083474(s32); -void func_800834B8(void); +void update_hedgehogs(void); void func_80083538(s32, Vec3f, s32, s32); void func_800836F0(Vec3f); void func_8008379C(s32); @@ -325,7 +325,7 @@ void func_80083A94(s32); void func_80083B0C(s32); void func_80083BE4(s32); void func_80083C04(s32); -void func_80083D60(void); +void update_snowmen(void); void func_80083F18(s32); void func_80083FD0(s32, s32, s32); void func_8008421C(s32, s32); @@ -339,13 +339,13 @@ void func_80085024(void); void func_8008502C(s32, s32); void func_80085080(s32); void func_800850B0(s32, s32); -void func_800853DC(s32); +void init_hot_air_balloon(s32); void func_80085534(s32); void func_80085768(s32); -void func_800857C0(void); +void update_hot_air_balloon(void); void func_80085878(s32, s32); void func_800859C8(s32, s32); -void func_80085AA8(void); +void update_chain_chomps(void); void func_80085BB4(s32); void init_obj_neon_mushroom(s32); void func_80085CA0(s32); @@ -355,7 +355,7 @@ void func_80085EF8(s32); void func_80085F74(s32); void func_80086074(s32, s32); void func_80086110(s32, s32); -void update_obj_neon(s32, s32); +void update_object_neon(s32, s32); void update_neon(void); void func_8008629C(s32, s32); void func_80086424(s32); @@ -376,7 +376,7 @@ extern Vtx D_800E4470[]; extern Vtx D_800E44B0[]; extern u8 *gItemWindowTLUTs[]; extern u8 *gItemWindowTextures[]; -extern u8 *D_800E4570[]; +extern u8 *gHudLapTextures[]; extern u8 *gPortraitTLUTs[]; extern u8 *gPortraitTextures[]; diff --git a/tools/doxygen_syms.md b/tools/doxygen_syms.md index 78d6071e2..6610aa22e 100644 --- a/tools/doxygen_syms.md +++ b/tools/doxygen_syms.md @@ -112,7 +112,7 @@ Variable Name | Memory Address [func_800090F0](@ref func_800090F0) | 0x800090F0 [func_80009258](@ref func_80009258) | 0x80009258 [func_8000929C](@ref func_8000929C) | 0x8000929C -[func_800097E0](@ref func_800097E0) | 0x800097E0 +[update_vehicles](@ref update_vehicles) | 0x800097E0 [func_800098FC](@ref func_800098FC) | 0x800098FC [func_800099EC](@ref func_800099EC) | 0x800099EC [func_80009B60](@ref func_80009B60) | 0x80009B60 @@ -148,7 +148,7 @@ Variable Name | Memory Address [func_8000EE10](@ref func_8000EE10) | 0x8000EE10 [func_8000EE58](@ref func_8000EE58) | 0x8000EE58 [func_8000EEDC](@ref func_8000EEDC) | 0x8000EEDC -[func_8000EF20](@ref func_8000EF20) | 0x8000EF20 +[generate_player_smoke](@ref generate_player_smoke) | 0x8000EF20 [func_8000F0E0](@ref func_8000F0E0) | 0x8000F0E0 [func_8000F124](@ref func_8000F124) | 0x8000F124 [func_8000F2BC](@ref func_8000F2BC) | 0x8000F2BC @@ -180,12 +180,12 @@ Variable Name | Memory Address [func_80012780](@ref func_80012780) | 0x80012780 [func_800127E0](@ref func_800127E0) | 0x800127E0 [func_80012A48](@ref func_80012A48) | 0x80012A48 -[func_80012AC0](@ref func_80012AC0) | 0x80012AC0 +[update_vehicle_trains](@ref update_vehicle_trains) | 0x80012AC0 [func_80012DC0](@ref func_80012DC0) | 0x80012DC0 [func_80013054](@ref func_80013054) | 0x80013054 [func_800131DC](@ref func_800131DC) | 0x800131DC [func_800132F4](@ref func_800132F4) | 0x800132F4 -[func_800133C4](@ref func_800133C4) | 0x800133C4 +[update_vehicle_paddle_boats](@ref update_vehicle_paddle_boats) | 0x800133C4 [func_80013854](@ref func_80013854) | 0x80013854 [func_800139E4](@ref func_800139E4) | 0x800139E4 [func_80013C74](@ref func_80013C74) | 0x80013C74 @@ -506,12 +506,12 @@ Variable Name | Memory Address [func_800416AC](@ref func_800416AC) | 0x800416AC [func_800416D8](@ref func_800416D8) | 0x800416D8 [func_80041724](@ref func_80041724) | 0x80041724 -[func_80041770](@ref func_80041770) | 0x80041770 +[get_angle_between_xy](@ref get_angle_between_xy) | 0x80041770 [func_800417B4](@ref func_800417B4) | 0x800417B4 [func_800418AC](@ref func_800418AC) | 0x800418AC [func_800418E8](@ref func_800418E8) | 0x800418E8 [func_80041924](@ref func_80041924) | 0x80041924 -[func_80041980](@ref func_80041980) | 0x80041980 +[is_particle_on_screen](@ref is_particle_on_screen) | 0x80041980 [func_800419F8](@ref func_800419F8) | 0x800419F8 [func_80041A70](@ref func_80041A70) | 0x80041A70 [mtfx_translation_x_y](@ref mtfx_translation_x_y) | 0x80041A78 @@ -521,7 +521,7 @@ Variable Name | Memory Address [mtxf_translation_x_y_rotate_z_scale_x_y](@ref mtxf_translation_x_y_rotate_z_scale_x_y) | 0x80041C64 [func_80041D24](@ref func_80041D24) | 0x80041D24 [func_80041D34](@ref func_80041D34) | 0x80041D34 -[func_80041EF4](@ref func_80041EF4) | 0x80041EF4 +[set_matrix_hud_screen](@ref set_matrix_hud_screen) | 0x80041EF4 [func_80041F54](@ref func_80041F54) | 0x80041F54 [func_80042000](@ref func_80042000) | 0x80042000 [func_800420A8](@ref func_800420A8) | 0x800420A8 @@ -560,16 +560,16 @@ Variable Name | Memory Address [func_800438C4](@ref func_800438C4) | 0x800438C4 [func_8004398C](@ref func_8004398C) | 0x8004398C [func_80043A54](@ref func_80043A54) | 0x80043A54 -[func_80043A84](@ref func_80043A84) | 0x80043A84 -[func_80043C28](@ref func_80043C28) | 0x80043C28 -[func_80043D50](@ref func_80043D50) | 0x80043D50 -[func_80043EF8](@ref func_80043EF8) | 0x80043EF8 -[func_800440B8](@ref func_800440B8) | 0x800440B8 -[func_800441E0](@ref func_800441E0) | 0x800441E0 -[func_80044388](@ref func_80044388) | 0x80044388 -[func_800444B0](@ref func_800444B0) | 0x800444B0 -[func_80044658](@ref func_80044658) | 0x80044658 -[func_8004477C](@ref func_8004477C) | 0x8004477C +[load_texture_block_rgba32_nomirror](@ref load_texture_block_rgba32_nomirror) | 0x80043A84 +[load_texture_tile_rgba32_nomirror](@ref load_texture_tile_rgba32_nomirror) | 0x80043C28 +[load_texture_block_rgba16_mirror](@ref load_texture_block_rgba16_mirror) | 0x80043D50 +[load_texture_block_rgba16_nomirror](@ref load_texture_block_rgba16_nomirror) | 0x80043EF8 +[load_texture_tile_rgba16_nomirror](@ref load_texture_tile_rgba16_nomirror) | 0x800440B8 +[load_texture_block_ia16_nomirror](@ref load_texture_block_ia16_nomirror) | 0x800441E0 +[load_texture_tile_ia16_nomirror](@ref load_texture_tile_ia16_nomirror) | 0x80044388 +[load_texture_block_ia8_nomirror](@ref load_texture_block_ia8_nomirror) | 0x800444B0 +[load_texture_tile_ia8_nomirror](@ref load_texture_tile_ia8_nomirror) | 0x80044658 +[load_texture_block_i8_nomirror](@ref load_texture_block_i8_nomirror) | 0x8004477C [func_80044924](@ref func_80044924) | 0x80044924 [func_80044AB8](@ref func_80044AB8) | 0x80044AB8 [func_80044BF8](@ref func_80044BF8) | 0x80044BF8 @@ -615,7 +615,7 @@ Variable Name | Memory Address [func_80046D40](@ref func_80046D40) | 0x80046D40 [func_80046D90](@ref func_80046D90) | 0x80046D90 [func_80046DF4](@ref func_80046DF4) | 0x80046DF4 -[func_80046E60](@ref func_80046E60) | 0x80046E60 +[load_texture_and_tlut](@ref load_texture_and_tlut) | 0x80046E60 [func_80046F60](@ref func_80046F60) | 0x80046F60 [func_80047068](@ref func_80047068) | 0x80047068 [draw_rectangle_texture_overlap](@ref draw_rectangle_texture_overlap) | 0x80047270 @@ -637,7 +637,7 @@ Variable Name | Memory Address [func_80047F40](@ref func_80047F40) | 0x80047F40 [func_80047FBC](@ref func_80047FBC) | 0x80047FBC [func_80048038](@ref func_80048038) | 0x80048038 -[func_800480B4](@ref func_800480B4) | 0x800480B4 +[draw_2d_texture_at](@ref draw_2d_texture_at) | 0x800480B4 [func_80048130](@ref func_80048130) | 0x80048130 [func_800481B4](@ref func_800481B4) | 0x800481B4 [func_80048228](@ref func_80048228) | 0x80048228 @@ -725,7 +725,7 @@ Variable Name | Memory Address [func_8004B05C](@ref func_8004B05C) | 0x8004B05C [func_8004B138](@ref func_8004B138) | 0x8004B138 [func_8004B180](@ref func_8004B180) | 0x8004B180 -[func_8004B1C8](@ref func_8004B1C8) | 0x8004B1C8 +[set_color_render](@ref set_color_render) | 0x8004B1C8 [func_8004B254](@ref func_8004B254) | 0x8004B254 [set_transparency](@ref set_transparency) | 0x8004B2BC [func_8004B310](@ref func_8004B310) | 0x8004B310 @@ -752,7 +752,7 @@ Variable Name | Memory Address [func_8004C268](@ref func_8004C268) | 0x8004C268 [func_8004C354](@ref func_8004C354) | 0x8004C354 [func_8004C35C](@ref func_8004C35C) | 0x8004C35C -[func_8004C364](@ref func_8004C364) | 0x8004C364 +[draw_hud_2d_texture](@ref draw_hud_2d_texture) | 0x8004C364 [func_8004C450](@ref func_8004C450) | 0x8004C450 [func_8004C53C](@ref func_8004C53C) | 0x8004C53C [func_8004C628](@ref func_8004C628) | 0x8004C628 @@ -761,15 +761,15 @@ Variable Name | Memory Address [func_8004C91C](@ref func_8004C91C) | 0x8004C91C [func_8004C9D8](@ref func_8004C9D8) | 0x8004C9D8 [func_8004CA58](@ref func_8004CA58) | 0x8004CA58 -[func_8004CAD0](@ref func_8004CAD0) | 0x8004CAD0 -[func_8004CB00](@ref func_8004CB00) | 0x8004CB00 -[func_8004CB30](@ref func_8004CB30) | 0x8004CB30 -[func_8004CB60](@ref func_8004CB60) | 0x8004CB60 -[func_8004CB90](@ref func_8004CB90) | 0x8004CB90 +[draw_hud_2d_texture_8x8](@ref draw_hud_2d_texture_8x8) | 0x8004CAD0 +[draw_hud_2d_texture_8x16](@ref draw_hud_2d_texture_8x16) | 0x8004CB00 +[draw_hud_2d_texture_16x16](@ref draw_hud_2d_texture_16x16) | 0x8004CB30 +[draw_hud_2d_texture_32x8](@ref draw_hud_2d_texture_32x8) | 0x8004CB60 +[draw_hud_2d_texture_32x16](@ref draw_hud_2d_texture_32x16) | 0x8004CB90 [func_8004CBC0](@ref func_8004CBC0) | 0x8004CBC0 -[func_8004CBF4](@ref func_8004CBF4) | 0x8004CBF4 +[draw_hud_2d_texture_32x32](@ref draw_hud_2d_texture_32x32) | 0x8004CBF4 [func_8004CC24](@ref func_8004CC24) | 0x8004CC24 -[func_8004CC54](@ref func_8004CC54) | 0x8004CC54 +[draw_hud_2d_texture_40x32](@ref draw_hud_2d_texture_40x32) | 0x8004CC54 [func_8004CC84](@ref func_8004CC84) | 0x8004CC84 [func_8004CCB4](@ref func_8004CCB4) | 0x8004CCB4 [func_8004CCE4](@ref func_8004CCE4) | 0x8004CCE4 @@ -823,9 +823,9 @@ Variable Name | Memory Address [func_8004E59C](@ref func_8004E59C) | 0x8004E59C [func_8004E5D8](@ref func_8004E5D8) | 0x8004E5D8 [func_8004E604](@ref func_8004E604) | 0x8004E604 -[func_8004E638](@ref func_8004E638) | 0x8004E638 +[draw_item_window](@ref draw_item_window) | 0x8004E638 [func_8004E6C4](@ref func_8004E6C4) | 0x8004E6C4 -[func_8004E78C](@ref func_8004E78C) | 0x8004E78C +[draw_simplified_lap_count](@ref draw_simplified_lap_count) | 0x8004E78C [func_8004E800](@ref func_8004E800) | 0x8004E800 [func_8004E998](@ref func_8004E998) | 0x8004E998 [func_8004EB30](@ref func_8004EB30) | 0x8004EB30 @@ -842,9 +842,9 @@ Variable Name | Memory Address [print_timer](@ref print_timer) | 0x8004F7F4 [func_8004F8CC](@ref func_8004F8CC) | 0x8004F8CC [func_8004F950](@ref func_8004F950) | 0x8004F950 -[func_8004F9CC](@ref func_8004F9CC) | 0x8004F9CC -[func_8004FA78](@ref func_8004FA78) | 0x8004FA78 -[func_8004FC78](@ref func_8004FC78) | 0x8004FC78 +[print_timer_rainbow](@ref print_timer_rainbow) | 0x8004F9CC +[render_hud_timer](@ref render_hud_timer) | 0x8004FA78 +[draw_lap_count](@ref draw_lap_count) | 0x8004FC78 [func_8004FDB4](@ref func_8004FDB4) | 0x8004FDB4 [func_80050320](@ref func_80050320) | 0x80050320 [func_80050644](@ref func_80050644) | 0x80050644 @@ -853,8 +853,8 @@ Variable Name | Memory Address [func_80050C68](@ref func_80050C68) | 0x80050C68 [func_80050E34](@ref func_80050E34) | 0x80050E34 [func_800514BC](@ref func_800514BC) | 0x800514BC -[func_80051638](@ref func_80051638) | 0x80051638 -[func_800517C8](@ref func_800517C8) | 0x800517C8 +[render_object_leaf_particle](@ref render_object_leaf_particle) | 0x80051638 +[render_object_snowflakes_particles](@ref render_object_snowflakes_particles) | 0x800517C8 [func_800518F8](@ref func_800518F8) | 0x800518F8 [func_800519D4](@ref func_800519D4) | 0x800519D4 [func_80051ABC](@ref func_80051ABC) | 0x80051ABC @@ -867,59 +867,59 @@ Variable Name | Memory Address [func_800520C0](@ref func_800520C0) | 0x800520C0 [func_8005217C](@ref func_8005217C) | 0x8005217C [func_800523B8](@ref func_800523B8) | 0x800523B8 -[func_800524B4](@ref func_800524B4) | 0x800524B4 -[func_80052590](@ref func_80052590) | 0x80052590 -[func_800527D8](@ref func_800527D8) | 0x800527D8 +[render_object_boos](@ref render_object_boos) | 0x800524B4 +[render_object_bat](@ref render_object_bat) | 0x80052590 +[render_object_trash_bin](@ref render_object_trash_bin) | 0x800527D8 [func_8005285C](@ref func_8005285C) | 0x8005285C [func_800528EC](@ref func_800528EC) | 0x800528EC -[func_80052C60](@ref func_80052C60) | 0x80052C60 +[render_ice_block](@ref render_ice_block) | 0x80052C60 [func_80052D70](@ref func_80052D70) | 0x80052D70 [func_80052E30](@ref func_80052E30) | 0x80052E30 -[func_80052F20](@ref func_80052F20) | 0x80052F20 -[func_8005309C](@ref func_8005309C) | 0x8005309C -[func_8005327C](@ref func_8005327C) | 0x8005327C -[func_800532A4](@ref func_800532A4) | 0x800532A4 +[render_object_snowmans_list_2](@ref render_object_snowmans_list_2) | 0x80052F20 +[render_object_snowmans_list_1](@ref render_object_snowmans_list_1) | 0x8005309C +[render_object_snowmans](@ref render_object_snowmans) | 0x8005327C +[render_lakitu](@ref render_lakitu) | 0x800532A4 [func_800534A4](@ref func_800534A4) | 0x800534A4 [func_800534E8](@ref func_800534E8) | 0x800534E8 -[func_800536C8](@ref func_800536C8) | 0x800536C8 -[func_80053870](@ref func_80053870) | 0x80053870 +[render_object_thwomps_model](@ref render_object_thwomps_model) | 0x800536C8 +[render_object_thwomps](@ref render_object_thwomps) | 0x80053870 [func_80053D74](@ref func_80053D74) | 0x80053D74 [func_80053E6C](@ref func_80053E6C) | 0x80053E6C -[func_800540CC](@ref func_800540CC) | 0x800540CC -[func_800541BC](@ref func_800541BC) | 0x800541BC -[func_80054324](@ref func_80054324) | 0x80054324 -[func_80054414](@ref func_80054414) | 0x80054414 -[func_8005457C](@ref func_8005457C) | 0x8005457C -[func_80054664](@ref func_80054664) | 0x80054664 +[render_object_train_smoke_particle](@ref render_object_train_smoke_particle) | 0x800540CC +[render_object_train_smoke_particles](@ref render_object_train_smoke_particles) | 0x800541BC +[render_object_paddle_boat_smoke_particle](@ref render_object_paddle_boat_smoke_particle) | 0x80054324 +[render_object_paddle_boat_smoke_particles](@ref render_object_paddle_boat_smoke_particles) | 0x80054414 +[render_object_bowser_flame_particle](@ref render_object_bowser_flame_particle) | 0x8005457C +[render_object_bowser_flame](@ref render_object_bowser_flame) | 0x80054664 [func_8005477C](@ref func_8005477C) | 0x8005477C -[func_80054938](@ref func_80054938) | 0x80054938 +[render_object_smoke_particles](@ref render_object_smoke_particles) | 0x80054938 [func_80054AFC](@ref func_80054AFC) | 0x80054AFC [func_80054BE8](@ref func_80054BE8) | 0x80054BE8 [func_80054D00](@ref func_80054D00) | 0x80054D00 [func_80054E10](@ref func_80054E10) | 0x80054E10 [func_80054EB8](@ref func_80054EB8) | 0x80054EB8 [func_80054F04](@ref func_80054F04) | 0x80054F04 -[func_800550A4](@ref func_800550A4) | 0x800550A4 +[render_object_moles](@ref render_object_moles) | 0x800550A4 [func_80055164](@ref func_80055164) | 0x80055164 [func_80055228](@ref func_80055228) | 0x80055228 [func_800552BC](@ref func_800552BC) | 0x800552BC -[func_80055380](@ref func_80055380) | 0x80055380 -[func_80055458](@ref func_80055458) | 0x80055458 -[func_80055528](@ref func_80055528) | 0x80055528 +[render_object_seagulls](@ref render_object_seagulls) | 0x80055380 +[draw_crabs](@ref draw_crabs) | 0x80055458 +[render_object_crabs](@ref render_object_crabs) | 0x80055528 [func_800555BC](@ref func_800555BC) | 0x800555BC -[func_8005568C](@ref func_8005568C) | 0x8005568C +[render_object_hedgehogs](@ref render_object_hedgehogs) | 0x8005568C [func_800557AC](@ref func_800557AC) | 0x800557AC [func_800557B4](@ref func_800557B4) | 0x800557B4 -[func_8005592C](@ref func_8005592C) | 0x8005592C +[render_object_train_penguins](@ref render_object_train_penguins) | 0x8005592C [func_80055AB8](@ref func_80055AB8) | 0x80055AB8 -[func_80055C38](@ref func_80055C38) | 0x80055C38 +[render_object_chain_chomps](@ref render_object_chain_chomps) | 0x80055C38 [func_80055CCC](@ref func_80055CCC) | 0x80055CCC -[func_80055E68](@ref func_80055E68) | 0x80055E68 +[render_object_hot_air_balloon](@ref render_object_hot_air_balloon) | 0x80055E68 [func_80055EF4](@ref func_80055EF4) | 0x80055EF4 [func_80055F48](@ref func_80055F48) | 0x80055F48 [func_80055FA0](@ref func_80055FA0) | 0x80055FA0 [func_80056160](@ref func_80056160) | 0x80056160 -[func_80056188](@ref func_80056188) | 0x80056188 +[render_object_neon](@ref render_object_neon) | 0x80056188 [func_800562E4](@ref func_800562E4) | 0x800562E4 [func_800563DC](@ref func_800563DC) | 0x800563DC [func_8005669C](@ref func_8005669C) | 0x8005669C @@ -927,7 +927,7 @@ Variable Name | Memory Address [func_800569F4](@ref func_800569F4) | 0x800569F4 [func_80056A40](@ref func_80056A40) | 0x80056A40 [func_80056A94](@ref func_80056A94) | 0x80056A94 -[func_80056AC0](@ref func_80056AC0) | 0x80056AC0 +[render_object_bomb_kart](@ref render_object_bomb_kart) | 0x80056AC0 [func_80056BF0](@ref func_80056BF0) | 0x80056BF0 [func_80056E24](@ref func_80056E24) | 0x80056E24 [func_80056FCC](@ref func_80056FCC) | 0x80056FCC @@ -965,21 +965,21 @@ Variable Name | Memory Address [func_80057CE4](@ref func_80057CE4) | 0x80057CE4 [func_80057DD0](@ref func_80057DD0) | 0x80057DD0 [func_80057FC4](@ref func_80057FC4) | 0x80057FC4 -[func_80058090](@ref func_80058090) | 0x80058090 -[func_800581C8](@ref func_800581C8) | 0x800581C8 -[func_800582CC](@ref func_800582CC) | 0x800582CC -[func_80058394](@ref func_80058394) | 0x80058394 -[func_8005845C](@ref func_8005845C) | 0x8005845C -[func_80058538](@ref func_80058538) | 0x80058538 -[func_80058640](@ref func_80058640) | 0x80058640 -[func_800586FC](@ref func_800586FC) | 0x800586FC -[func_800587A4](@ref func_800587A4) | 0x800587A4 -[func_8005884C](@ref func_8005884C) | 0x8005884C -[func_800588F4](@ref func_800588F4) | 0x800588F4 -[func_80058B58](@ref func_80058B58) | 0x80058B58 +[render_object](@ref render_object) | 0x80058090 +[render_object_p1](@ref render_object_p1) | 0x800581C8 +[render_object_p2](@ref render_object_p2) | 0x800582CC +[render_object_p3](@ref render_object_p3) | 0x80058394 +[render_object_p4](@ref render_object_p4) | 0x8005845C +[render_player_snow_effect](@ref render_player_snow_effect) | 0x80058538 +[render_player_snow_effect_one](@ref render_player_snow_effect_one) | 0x80058640 +[render_player_snow_effect_two](@ref render_player_snow_effect_two) | 0x800586FC +[render_player_snow_effect_three](@ref render_player_snow_effect_three) | 0x800587A4 +[render_player_snow_effect_four](@ref render_player_snow_effect_four) | 0x8005884C +[render_object_for_player](@ref render_object_for_player) | 0x800588F4 +[render_snowing_effect](@ref render_snowing_effect) | 0x80058B58 [func_80058BF4](@ref func_80058BF4) | 0x80058BF4 [func_80058C20](@ref func_80058C20) | 0x80058C20 -[func_80058DB4](@ref func_80058DB4) | 0x80058DB4 +[render_hud](@ref render_hud) | 0x80058DB4 [func_80058F48](@ref func_80058F48) | 0x80058F48 [func_80058F78](@ref func_80058F78) | 0x80058F78 [func_80059024](@ref func_80059024) | 0x80059024 @@ -987,23 +987,23 @@ Variable Name | Memory Address [func_800590D4](@ref func_800590D4) | 0x800590D4 [func_800591B4](@ref func_800591B4) | 0x800591B4 [func_80059358](@ref func_80059358) | 0x80059358 -[func_80059360](@ref func_80059360) | 0x80059360 +[render_hud_2p_horizontal_player_two_horizontal_player_one](@ref render_hud_2p_horizontal_player_two_horizontal_player_one) | 0x80059360 [func_800593F0](@ref func_800593F0) | 0x800593F0 -[func_800593F8](@ref func_800593F8) | 0x800593F8 -[func_80059488](@ref func_80059488) | 0x80059488 +[render_hud_2p_horizontal_player_two](@ref render_hud_2p_horizontal_player_two) | 0x800593F8 +[draw_simplified_hud](@ref draw_simplified_hud) | 0x80059488 [func_800594F0](@ref func_800594F0) | 0x800594F0 -[func_800594F8](@ref func_800594F8) | 0x800594F8 +[render_hud_2p_vertical_player_one](@ref render_hud_2p_vertical_player_one) | 0x800594F8 [func_80059528](@ref func_80059528) | 0x80059528 -[func_80059530](@ref func_80059530) | 0x80059530 -[func_80059560](@ref func_80059560) | 0x80059560 +[render_hud_2p_vertical_player_two](@ref render_hud_2p_vertical_player_two) | 0x80059530 +[render_hud_lap_3p_4p](@ref render_hud_lap_3p_4p) | 0x80059560 [func_800596A8](@ref func_800596A8) | 0x800596A8 -[func_800596D8](@ref func_800596D8) | 0x800596D8 +[render_hud_1p_multi](@ref render_hud_1p_multi) | 0x800596D8 [func_80059710](@ref func_80059710) | 0x80059710 -[func_80059718](@ref func_80059718) | 0x80059718 +[render_hud_2p_multi](@ref render_hud_2p_multi) | 0x80059718 [func_80059750](@ref func_80059750) | 0x80059750 -[func_80059780](@ref func_80059780) | 0x80059780 +[render_hud_3p_multi](@ref render_hud_3p_multi) | 0x80059780 [func_800597B8](@ref func_800597B8) | 0x800597B8 -[func_800597E8](@ref func_800597E8) | 0x800597E8 +[render_hud_4p_multi](@ref render_hud_4p_multi) | 0x800597E8 [func_80059820](@ref func_80059820) | 0x80059820 [randomize_seed_from_controller](@ref randomize_seed_from_controller) | 0x800598D4 [func_8005994C](@ref func_8005994C) | 0x8005994C @@ -1017,7 +1017,7 @@ Variable Name | Memory Address [func_8005A380](@ref func_8005A380) | 0x8005A380 [func_8005A3C0](@ref func_8005A3C0) | 0x8005A3C0 [func_8005A71C](@ref func_8005A71C) | 0x8005A71C -[update_obj](@ref update_obj) | 0x8005A74C +[update_object](@ref update_object) | 0x8005A74C [func_8005A99C](@ref func_8005A99C) | 0x8005A99C [func_8005AA34](@ref func_8005AA34) | 0x8005AA34 [func_8005AA4C](@ref func_8005AA4C) | 0x8005AA4C @@ -1164,7 +1164,7 @@ Variable Name | Memory Address [func_8006E848](@ref func_8006E848) | 0x8006E848 [func_8006E8C4](@ref func_8006E8C4) | 0x8006E8C4 [func_8006E940](@ref func_8006E940) | 0x8006E940 -[init_object_list](@ref init_object_list) | 0x8006E9C0 +[init_hud](@ref init_hud) | 0x8006E9C0 [reset_object_variable](@ref reset_object_variable) | 0x8006EA5C [func_8006EB10](@ref func_8006EB10) | 0x8006EB10 [clear_object_list](@ref clear_object_list) | 0x8006ED60 @@ -1197,11 +1197,11 @@ Variable Name | Memory Address [delete_object_wrapper](@ref delete_object_wrapper) | 0x80072100 [func_80072120](@ref func_80072120) | 0x80072120 [func_80072180](@ref func_80072180) | 0x80072180 -[set_object_flag_unk_054_true](@ref set_object_flag_unk_054_true) | 0x800721C0 -[set_object_flag_unk_054_false](@ref set_object_flag_unk_054_false) | 0x800721E8 +[set_object_flag_status_true](@ref set_object_flag_status_true) | 0x800721C0 +[set_object_flag_status_false](@ref set_object_flag_status_false) | 0x800721E8 [func_80072214](@ref func_80072214) | 0x80072214 -[is_obj_index_flag_unk_054_active](@ref is_obj_index_flag_unk_054_active) | 0x8007223C -[is_obj_index_flag_unk_054_inactive](@ref is_obj_index_flag_unk_054_inactive) | 0x80072270 +[is_obj_flag_status_active](@ref is_obj_flag_status_active) | 0x8007223C +[is_obj_index_flag_status_inactive](@ref is_obj_index_flag_status_inactive) | 0x80072270 [func_800722A4](@ref func_800722A4) | 0x800722A4 [func_800722CC](@ref func_800722CC) | 0x800722CC [func_800722F8](@ref func_800722F8) | 0x800722F8 @@ -1307,12 +1307,12 @@ Variable Name | Memory Address [func_800755FC](@ref func_800755FC) | 0x800755FC [func_80075698](@ref func_80075698) | 0x80075698 [func_80075714](@ref func_80075714) | 0x80075714 -[func_80075838](@ref func_80075838) | 0x80075838 +[update_train_smoke](@ref update_train_smoke) | 0x80075838 [func_800759EC](@ref func_800759EC) | 0x800759EC [func_80075A6C](@ref func_80075A6C) | 0x80075A6C [func_80075B08](@ref func_80075B08) | 0x80075B08 [func_80075B84](@ref func_80075B84) | 0x80075B84 -[func_80075CA8](@ref func_80075CA8) | 0x80075CA8 +[update_ferries_smoke_particle](@ref update_ferries_smoke_particle) | 0x80075CA8 [func_80075E5C](@ref func_80075E5C) | 0x80075E5C [func_80075F28](@ref func_80075F28) | 0x80075F28 [func_80075F98](@ref func_80075F98) | 0x80075F98 @@ -1332,28 +1332,28 @@ Variable Name | Memory Address [func_800769D8](@ref func_800769D8) | 0x800769D8 [func_80076AEC](@ref func_80076AEC) | 0x80076AEC [func_80076B7C](@ref func_80076B7C) | 0x80076B7C -[update_particle_bowser_castle](@ref update_particle_bowser_castle) | 0x80076B84 -[func_80076C9C](@ref func_80076C9C) | 0x80076C9C -[func_80076D70](@ref func_80076D70) | 0x80076D70 +[update_flame_particle](@ref update_flame_particle) | 0x80076B84 +[init_object_smoke_paticle](@ref init_object_smoke_paticle) | 0x80076C9C +[init_smoke_particle](@ref init_smoke_particle) | 0x80076D70 [func_80076DC4](@ref func_80076DC4) | 0x80076DC4 [func_80076E14](@ref func_80076E14) | 0x80076E14 [func_80076ED8](@ref func_80076ED8) | 0x80076ED8 [func_80076F2C](@ref func_80076F2C) | 0x80076F2C -[func_80076FEC](@ref func_80076FEC) | 0x80076FEC -[func_800770F0](@ref func_800770F0) | 0x800770F0 +[init_object_smoke_particle](@ref init_object_smoke_particle) | 0x80076FEC +[init_smoke_particles](@ref init_smoke_particles) | 0x800770F0 [func_80077138](@ref func_80077138) | 0x80077138 [func_800773D8](@ref func_800773D8) | 0x800773D8 [func_80077428](@ref func_80077428) | 0x80077428 [func_80077450](@ref func_80077450) | 0x80077450 [func_80077584](@ref func_80077584) | 0x80077584 [func_80077640](@ref func_80077640) | 0x80077640 -[init_leaf_particle](@ref init_leaf_particle) | 0x80077700 -[func_80077A54](@ref func_80077A54) | 0x80077A54 -[func_80077AB0](@ref func_80077AB0) | 0x80077AB0 +[init_object_leaf_particle](@ref init_object_leaf_particle) | 0x80077700 +[init_leaf_particle](@ref init_leaf_particle) | 0x80077A54 +[spawn_leaf](@ref spawn_leaf) | 0x80077AB0 [func_80077B14](@ref func_80077B14) | 0x80077B14 [func_80077B3C](@ref func_80077B3C) | 0x80077B3C [func_80077BCC](@ref func_80077BCC) | 0x80077BCC -[func_80077C9C](@ref func_80077C9C) | 0x80077C9C +[update_leaf](@ref update_leaf) | 0x80077C9C [func_80077D5C](@ref func_80077D5C) | 0x80077D5C [func_80077E20](@ref func_80077E20) | 0x80077E20 [func_80077EB8](@ref func_80077EB8) | 0x80077EB8 @@ -1364,7 +1364,7 @@ Variable Name | Memory Address [func_80078288](@ref func_80078288) | 0x80078288 [func_800786EC](@ref func_800786EC) | 0x800786EC [func_80078790](@ref func_80078790) | 0x80078790 -[func_80078838](@ref func_80078838) | 0x80078838 +[update_snowflakes](@ref update_snowflakes) | 0x80078838 [func_800788F8](@ref func_800788F8) | 0x800788F8 [func_800789AC](@ref func_800789AC) | 0x800789AC [func_80078A44](@ref func_80078A44) | 0x80078A44 @@ -1377,29 +1377,29 @@ Variable Name | Memory Address [func_800790E4](@ref func_800790E4) | 0x800790E4 [func_80079114](@ref func_80079114) | 0x80079114 [func_800791F0](@ref func_800791F0) | 0x800791F0 -[init_obj_laikitu_red_flag_countdown](@ref init_obj_laikitu_red_flag_countdown) | 0x800792D8 -[update_obj_laikitu_countdown](@ref update_obj_laikitu_countdown) | 0x80079380 -[init_obj_laikitu_red_flag](@ref init_obj_laikitu_red_flag) | 0x8007963C -[update_obj_laikitu_red_flag](@ref update_obj_laikitu_red_flag) | 0x80079700 +[init_obj_lakitu_red_flag_countdown](@ref init_obj_lakitu_red_flag_countdown) | 0x800792D8 +[update_object_lakitu_countdown](@ref update_object_lakitu_countdown) | 0x80079380 +[init_obj_lakitu_red_flag](@ref init_obj_lakitu_red_flag) | 0x8007963C +[update_object_lakitu_red_flag](@ref update_object_lakitu_red_flag) | 0x80079700 [func_800797AC](@ref func_800797AC) | 0x800797AC [func_80079860](@ref func_80079860) | 0x80079860 [func_8007993C](@ref func_8007993C) | 0x8007993C -[init_obj_laikitu_red_flag_fishing](@ref init_obj_laikitu_red_flag_fishing) | 0x800799A8 +[init_obj_lakitu_red_flag_fishing](@ref init_obj_lakitu_red_flag_fishing) | 0x800799A8 [func_80079A5C](@ref func_80079A5C) | 0x80079A5C -[update_obj_laikitu_fishing](@ref update_obj_laikitu_fishing) | 0x80079B40 -[update_obj_laikitu_fishing2](@ref update_obj_laikitu_fishing2) | 0x80079D44 +[update_object_lakitu_fishing](@ref update_object_lakitu_fishing) | 0x80079B40 +[update_object_lakitu_fishing2](@ref update_object_lakitu_fishing2) | 0x80079D44 [func_8007A060](@ref func_8007A060) | 0x8007A060 -[update_obj_laikitu_second_lap](@ref update_obj_laikitu_second_lap) | 0x8007A124 +[update_object_lakitu_second_lap](@ref update_object_lakitu_second_lap) | 0x8007A124 [func_8007A228](@ref func_8007A228) | 0x8007A228 -[update_obj_laikitu_final_lap](@ref update_obj_laikitu_final_lap) | 0x8007A2EC +[update_object_lakitu_final_lap](@ref update_object_lakitu_final_lap) | 0x8007A2EC [func_8007A3F0](@ref func_8007A3F0) | 0x8007A3F0 -[update_obj_laikitu_reverse](@ref update_obj_laikitu_reverse) | 0x8007A4D4 +[update_object_lakitu_reverse](@ref update_object_lakitu_reverse) | 0x8007A4D4 [func_8007A66C](@ref func_8007A66C) | 0x8007A66C [func_8007A778](@ref func_8007A778) | 0x8007A778 [func_8007A884](@ref func_8007A884) | 0x8007A884 [func_8007A88C](@ref func_8007A88C) | 0x8007A88C [func_8007A910](@ref func_8007A910) | 0x8007A910 -[update_obj_laikitu](@ref update_obj_laikitu) | 0x8007A948 +[update_object_lakitu](@ref update_object_lakitu) | 0x8007A948 [func_8007AA44](@ref func_8007AA44) | 0x8007AA44 [func_8007ABFC](@ref func_8007ABFC) | 0x8007ABFC [consume_item](@ref consume_item) | 0x8007AC9C @@ -1413,13 +1413,13 @@ Variable Name | Memory Address [func_8007BB9C](@ref func_8007BB9C) | 0x8007BB9C [func_8007BBBC](@ref func_8007BBBC) | 0x8007BBBC [func_8007BD04](@ref func_8007BD04) | 0x8007BD04 -[func_8007BDA8](@ref func_8007BDA8) | 0x8007BDA8 +[update_cheep_cheep_race](@ref update_cheep_cheep_race) | 0x8007BDA8 [init_var_cheep_cheep](@ref init_var_cheep_cheep) | 0x8007BDE0 [func_8007BEC8](@ref func_8007BEC8) | 0x8007BEC8 [func_8007BFB0](@ref func_8007BFB0) | 0x8007BFB0 -[func_8007C280](@ref func_8007C280) | 0x8007C280 -[func_8007C2F8](@ref func_8007C2F8) | 0x8007C2F8 -[func_8007C340](@ref func_8007C340) | 0x8007C340 +[update_cheep_cheep_ending](@ref update_cheep_cheep_ending) | 0x8007C280 +[update_cheep_cheep](@ref update_cheep_cheep) | 0x8007C2F8 +[wrapper_update_boos](@ref wrapper_update_boos) | 0x8007C340 [func_8007C360](@ref func_8007C360) | 0x8007C360 [func_8007C420](@ref func_8007C420) | 0x8007C420 [func_8007C49C](@ref func_8007C49C) | 0x8007C49C @@ -1431,7 +1431,7 @@ Variable Name | Memory Address [func_8007C91C](@ref func_8007C91C) | 0x8007C91C [func_8007C9F8](@ref func_8007C9F8) | 0x8007C9F8 [func_8007CA70](@ref func_8007CA70) | 0x8007CA70 -[func_8007CC00](@ref func_8007CC00) | 0x8007CC00 +[update_boos](@ref update_boos) | 0x8007CC00 [func_8007CE0C](@ref func_8007CE0C) | 0x8007CE0C [func_8007CEDC](@ref func_8007CEDC) | 0x8007CEDC [func_8007D070](@ref func_8007D070) | 0x8007D070 @@ -1445,11 +1445,11 @@ Variable Name | Memory Address [func_8007DA4C](@ref func_8007DA4C) | 0x8007DA4C [func_8007DA74](@ref func_8007DA74) | 0x8007DA74 [func_8007DAF8](@ref func_8007DAF8) | 0x8007DAF8 -[func_8007DB44](@ref func_8007DB44) | 0x8007DB44 +[update_bat](@ref update_bat) | 0x8007DB44 [func_8007DDC0](@ref func_8007DDC0) | 0x8007DDC0 [init_bb_trash_bin](@ref init_bb_trash_bin) | 0x8007DF20 [func_8007E00C](@ref func_8007E00C) | 0x8007E00C -[func_8007E1AC](@ref func_8007E1AC) | 0x8007E1AC +[update_trash_bin](@ref update_trash_bin) | 0x8007E1AC [func_8007E1F4](@ref func_8007E1F4) | 0x8007E1F4 [func_8007E358](@ref func_8007E358) | 0x8007E358 [func_8007E3EC](@ref func_8007E3EC) | 0x8007E3EC @@ -1501,16 +1501,16 @@ Variable Name | Memory Address [func_80081D34](@ref func_80081D34) | 0x80081D34 [func_80081FF4](@ref func_80081FF4) | 0x80081FF4 [func_800821AC](@ref func_800821AC) | 0x800821AC -[func_800821FC](@ref func_800821FC) | 0x800821FC +[update_moles](@ref update_moles) | 0x800821FC [func_8008241C](@ref func_8008241C) | 0x8008241C [func_80082714](@ref func_80082714) | 0x80082714 [func_8008275C](@ref func_8008275C) | 0x8008275C -[func_80082870](@ref func_80082870) | 0x80082870 +[update_seagulls](@ref update_seagulls) | 0x80082870 [init_ktb_crab](@ref init_ktb_crab) | 0x80082A4C [func_80082B34](@ref func_80082B34) | 0x80082B34 [func_80082C30](@ref func_80082C30) | 0x80082C30 [func_80082E18](@ref func_80082E18) | 0x80082E18 -[func_80082E5C](@ref func_80082E5C) | 0x80082E5C +[update_crabs](@ref update_crabs) | 0x80082E5C [func_80082F1C](@ref func_80082F1C) | 0x80082F1C [func_80083018](@ref func_80083018) | 0x80083018 [func_80083060](@ref func_80083060) | 0x80083060 @@ -1519,7 +1519,7 @@ Variable Name | Memory Address [func_80083248](@ref func_80083248) | 0x80083248 [func_800833D0](@ref func_800833D0) | 0x800833D0 [func_80083474](@ref func_80083474) | 0x80083474 -[func_800834B8](@ref func_800834B8) | 0x800834B8 +[update_hedgehogs](@ref update_hedgehogs) | 0x800834B8 [func_80083538](@ref func_80083538) | 0x80083538 [func_800836F0](@ref func_800836F0) | 0x800836F0 [func_8008379C](@ref func_8008379C) | 0x8008379C @@ -1529,7 +1529,7 @@ Variable Name | Memory Address [func_80083B0C](@ref func_80083B0C) | 0x80083B0C [func_80083BE4](@ref func_80083BE4) | 0x80083BE4 [func_80083C04](@ref func_80083C04) | 0x80083C04 -[func_80083D60](@ref func_80083D60) | 0x80083D60 +[update_snowmen](@ref update_snowmen) | 0x80083D60 [func_80083F18](@ref func_80083F18) | 0x80083F18 [func_80083FD0](@ref func_80083FD0) | 0x80083FD0 [func_8008421C](@ref func_8008421C) | 0x8008421C @@ -1543,14 +1543,14 @@ Variable Name | Memory Address [func_8008502C](@ref func_8008502C) | 0x8008502C [func_80085080](@ref func_80085080) | 0x80085080 [func_800850B0](@ref func_800850B0) | 0x800850B0 -[func_80085214](@ref func_80085214) | 0x80085214 -[func_800853DC](@ref func_800853DC) | 0x800853DC +[update_penguins](@ref update_penguins) | 0x80085214 +[init_hot_air_balloon](@ref init_hot_air_balloon) | 0x800853DC [func_80085534](@ref func_80085534) | 0x80085534 [func_80085768](@ref func_80085768) | 0x80085768 -[func_800857C0](@ref func_800857C0) | 0x800857C0 +[update_hot_air_balloon](@ref update_hot_air_balloon) | 0x800857C0 [func_80085878](@ref func_80085878) | 0x80085878 [func_800859C8](@ref func_800859C8) | 0x800859C8 -[func_80085AA8](@ref func_80085AA8) | 0x80085AA8 +[update_chain_chomps](@ref update_chain_chomps) | 0x80085AA8 [func_80085BB4](@ref func_80085BB4) | 0x80085BB4 [init_obj_neon_mushroom](@ref init_obj_neon_mushroom) | 0x80085C20 [func_80085CA0](@ref func_80085CA0) | 0x80085CA0 @@ -1560,7 +1560,7 @@ Variable Name | Memory Address [func_80085F74](@ref func_80085F74) | 0x80085F74 [func_80086074](@ref func_80086074) | 0x80086074 [func_80086110](@ref func_80086110) | 0x80086110 -[update_obj_neon](@ref update_obj_neon) | 0x80086158 +[update_object_neon](@ref update_object_neon) | 0x80086158 [update_neon](@ref update_neon) | 0x800861E0 [func_8008629C](@ref func_8008629C) | 0x8008629C [func_80086424](@ref func_80086424) | 0x80086424 @@ -1583,7 +1583,7 @@ Variable Name | Memory Address [func_80087104](@ref func_80087104) | 0x80087104 [func_800871AC](@ref func_800871AC) | 0x800871AC [func_80087258](@ref func_80087258) | 0x80087258 -[func_80087294](@ref func_80087294) | 0x80087294 +[get_angle_between_player_object](@ref get_angle_between_player_object) | 0x80087294 [angle_between_object_camera](@ref angle_between_object_camera) | 0x800872D8 [get_x_direction_angle](@ref get_x_direction_angle) | 0x80087324 [get_y_direction_angle](@ref get_y_direction_angle) | 0x80087368 @@ -1596,11 +1596,11 @@ Variable Name | Memory Address [func_8008757C](@ref func_8008757C) | 0x8008757C [func_80087620](@ref func_80087620) | 0x80087620 [func_800876A0](@ref func_800876A0) | 0x800876A0 -[func_80087710](@ref func_80087710) | 0x80087710 -[func_8008775C](@ref func_8008775C) | 0x8008775C -[func_80087798](@ref func_80087798) | 0x80087798 -[func_800877C4](@ref func_800877C4) | 0x800877C4 -[func_800877F0](@ref func_800877F0) | 0x800877F0 +[object_add_velocity_offset_xyz](@ref object_add_velocity_offset_xyz) | 0x80087710 +[object_add_velocity_offset_xz](@ref object_add_velocity_offset_xz) | 0x8008775C +[object_add_velocity_offset_x](@ref object_add_velocity_offset_x) | 0x80087798 +[object_add_velocity_offset_y](@ref object_add_velocity_offset_y) | 0x800877C4 +[object_add_velocity_offset_z](@ref object_add_velocity_offset_z) | 0x800877F0 [func_8008781C](@ref func_8008781C) | 0x8008781C [func_80087844](@ref func_80087844) | 0x80087844 [func_8008786C](@ref func_8008786C) | 0x8008786C @@ -1659,7 +1659,7 @@ Variable Name | Memory Address [func_80089F24](@ref func_80089F24) | 0x80089F24 [func_8008A060](@ref func_8008A060) | 0x8008A060 [func_8008A0B4](@ref func_8008A0B4) | 0x8008A0B4 -[func_8008A140](@ref func_8008A140) | 0x8008A140 +[is_object_visible_on_camera](@ref is_object_visible_on_camera) | 0x8008A140 [func_8008A1D0](@ref func_8008A1D0) | 0x8008A1D0 [func_8008A2CC](@ref func_8008A2CC) | 0x8008A2CC [func_8008A364](@ref func_8008A364) | 0x8008A364 @@ -1711,21 +1711,21 @@ Variable Name | Memory Address [func_8008B724](@ref func_8008B724) | 0x8008B724 [func_8008B78C](@ref func_8008B78C) | 0x8008B78C [set_obj_origin_pos](@ref set_obj_origin_pos) | 0x8008B7D4 -[func_8008B80C](@ref func_8008B80C) | 0x8008B80C +[set_obj_origin_offset](@ref set_obj_origin_offset) | 0x8008B80C [func_8008B844](@ref func_8008B844) | 0x8008B844 [set_obj_direction_angle](@ref set_obj_direction_angle) | 0x8008B888 [set_obj_orientation](@ref set_obj_orientation) | 0x8008B8BC [set_obj_velocity](@ref set_obj_velocity) | 0x8008B8F0 [func_8008B928](@ref func_8008B928) | 0x8008B928 -[func_8008BA40](@ref func_8008BA40) | 0x8008BA40 -[func_8008BAB4](@ref func_8008BAB4) | 0x8008BAB4 -[func_8008BB28](@ref func_8008BB28) | 0x8008BB28 -[func_8008BB9C](@ref func_8008BB9C) | 0x8008BB9C -[func_8008BC58](@ref func_8008BC58) | 0x8008BC58 -[func_8008BD14](@ref func_8008BD14) | 0x8008BD14 -[func_8008BE0C](@ref func_8008BE0C) | 0x8008BE0C +[object_origin_pos_randomize_around_x](@ref object_origin_pos_randomize_around_x) | 0x8008BA40 +[object_origin_pos_randomize_around_y](@ref object_origin_pos_randomize_around_y) | 0x8008BAB4 +[object_origin_pos_randomize_around_z](@ref object_origin_pos_randomize_around_z) | 0x8008BB28 +[object_origin_pos_randomize_around_xy](@ref object_origin_pos_randomize_around_xy) | 0x8008BB9C +[object_origin_pos_randomize_around_xz](@ref object_origin_pos_randomize_around_xz) | 0x8008BC58 +[object_origin_pos_randomize_around_xyz](@ref object_origin_pos_randomize_around_xyz) | 0x8008BD14 +[object_origin_pos_around_player_one](@ref object_origin_pos_around_player_one) | 0x8008BE0C [func_8008BEA4](@ref func_8008BEA4) | 0x8008BEA4 -[func_8008BF18](@ref func_8008BF18) | 0x8008BF18 +[object_calculate_new_pos_offset](@ref object_calculate_new_pos_offset) | 0x8008BF18 [func_8008BF64](@ref func_8008BF64) | 0x8008BF64 [func_8008BFC0](@ref func_8008BFC0) | 0x8008BFC0 [func_8008BFFC](@ref func_8008BFFC) | 0x8008BFFC @@ -1856,8 +1856,8 @@ Variable Name | Memory Address [func_80091FA4](@ref func_80091FA4) | 0x80091FA4 [func_80092148](@ref func_80092148) | 0x80092148 [func_800921B4](@ref func_800921B4) | 0x800921B4 -[func_800921C0](@ref func_800921C0) | 0x800921C0 -[func_80092224](@ref func_80092224) | 0x80092224 +[text_rainbow_effect](@ref text_rainbow_effect) | 0x800921C0 +[set_text_color_rainbow_if_selected](@ref set_text_color_rainbow_if_selected) | 0x80092224 [func_80092258](@ref func_80092258) | 0x80092258 [func_80092290](@ref func_80092290) | 0x80092290 [func_80092500](@ref func_80092500) | 0x80092500 @@ -1961,7 +1961,7 @@ Variable Name | Memory Address [func_8009B9D0](@ref func_8009B9D0) | 0x8009B9D0 [func_8009BA74](@ref func_8009BA74) | 0x8009BA74 [func_8009BC9C](@ref func_8009BC9C) | 0x8009BC9C -[func_8009BEF0](@ref func_8009BEF0) | 0x8009BEF0 +[print_letter](@ref print_letter) | 0x8009BEF0 [func_8009C204](@ref func_8009C204) | 0x8009C204 [func_8009C434](@ref func_8009C434) | 0x8009C434 [func_8009C708](@ref func_8009C708) | 0x8009C708 @@ -2035,11 +2035,11 @@ Variable Name | Memory Address [func_800A4550](@ref func_800A4550) | 0x800A4550 [func_800A474C](@ref func_800A474C) | 0x800A474C [func_800A4A24](@ref func_800A4A24) | 0x800A4A24 -[func_800A4B38](@ref func_800A4B38) | 0x800A4B38 -[func_800A4BC8](@ref func_800A4BC8) | 0x800A4BC8 -[func_800A4EF8](@ref func_800A4EF8) | 0x800A4EF8 -[func_800A5084](@ref func_800A5084) | 0x800A5084 -[func_800A5360](@ref func_800A5360) | 0x800A5360 +[render_pause_menu](@ref render_pause_menu) | 0x800A4B38 +[render_pause_menu_time_trials](@ref render_pause_menu_time_trials) | 0x800A4BC8 +[render_pause_menu_versus](@ref render_pause_menu_versus) | 0x800A4EF8 +[render_pause_grand_prix](@ref render_pause_grand_prix) | 0x800A5084 +[render_pause_battle](@ref render_pause_battle) | 0x800A5360 [func_800A54EC](@ref func_800A54EC) | 0x800A54EC [func_800A5738](@ref func_800A5738) | 0x800A5738 [func_800A6034](@ref func_800A6034) | 0x800A6034 @@ -2580,10 +2580,10 @@ Variable Name | Memory Address [rspF3DBootStart](@ref rspF3DBootStart) | 0x800D8F70 [rspF3DBootEnd](@ref rspF3DBootEnd) | 0x800D9040 [gspF3DEXTextStart](@ref gspF3DEXTextStart) | 0x800D9040 -[gspF3DEXTextEnd](@ref gspF3DEXTextEnd) | 0x800DA420 [gspF3DLXTextStart](@ref gspF3DLXTextStart) | 0x800DA420 -[gspF3DLXTextEnd](@ref gspF3DLXTextEnd) | 0x800DB830 +[gspF3DEXTextEnd](@ref gspF3DEXTextEnd) | 0x800DA420 [rspAspMainStart](@ref rspAspMainStart) | 0x800DB830 +[gspF3DLXTextEnd](@ref gspF3DLXTextEnd) | 0x800DB830 [rspAspMainEnd](@ref rspAspMainEnd) | 0x800DC4A0 [gVblankHandler1](@ref gVblankHandler1) | 0x800DC4A0 [gVblankHandler2](@ref gVblankHandler2) | 0x800DC4A4 @@ -3097,7 +3097,7 @@ Variable Name | Memory Address [D_800E44B0](@ref D_800E44B0) | 0x800E44B0 [gItemWindowTLUTs](@ref gItemWindowTLUTs) | 0x800E44F0 [gItemWindowTextures](@ref gItemWindowTextures) | 0x800E4530 -[D_800E4570](@ref D_800E4570) | 0x800E4570 +[gHudLapTextures](@ref gHudLapTextures) | 0x800E4570 [gPortraitTLUTs](@ref gPortraitTLUTs) | 0x800E457C [gPortraitTextures](@ref gPortraitTextures) | 0x800E459C [D_800E45C0](@ref D_800E45C0) | 0x800E45C0 @@ -3243,7 +3243,7 @@ Variable Name | Memory Address [D_800E7730](@ref D_800E7730) | 0x800E7730 [D_800E7734](@ref D_800E7734) | 0x800E7734 [D_800E7744](@ref D_800E7744) | 0x800E7744 -[D_800E775C](@ref D_800E775C) | 0x800E775C +[gTextPauseButton](@ref gTextPauseButton) | 0x800E775C [D_800E7778](@ref D_800E7778) | 0x800E7778 [D_800E7780](@ref D_800E7780) | 0x800E7780 [D_800E77A0](@ref D_800E77A0) | 0x800E77A0 @@ -3729,8 +3729,8 @@ Variable Name | Memory Address [gspF3DEXDataStart](@ref gspF3DEXDataStart) | 0x800F3D00 [gspF3DEXDataEnd](@ref gspF3DEXDataEnd) | 0x800F4500 [gspF3DLXDataStart](@ref gspF3DLXDataStart) | 0x800F4500 -[rspAspMainDataStart](@ref rspAspMainDataStart) | 0x800F4D00 [gspF3DLXDataEnd](@ref gspF3DLXDataEnd) | 0x800F4D00 +[rspAspMainDataStart](@ref rspAspMainDataStart) | 0x800F4D00 [rspAspMainDataEnd](@ref rspAspMainDataEnd) | 0x800F5000 [sSawtoothWaves](@ref sSawtoothWaves) | 0x800F5000 [sTriangleWaves](@ref sTriangleWaves) | 0x800F5200 @@ -4042,7 +4042,7 @@ Variable Name | Memory Address [gTrainList](@ref gTrainList) | 0x801635A0 [isCrossingTriggeredByIndex](@ref isCrossingTriggeredByIndex) | 0x801637B8 [D_801637BC](@ref D_801637BC) | 0x801637BC -[gFerries](@ref gFerries) | 0x801637C0 +[gPaddleBoats](@ref gPaddleBoats) | 0x801637C0 [gBoxTruckList](@ref gBoxTruckList) | 0x80163818 [gSchoolBusList](@ref gSchoolBusList) | 0x80163988 [gTankerTruckList](@ref gTankerTruckList) | 0x80163AF8 @@ -4281,7 +4281,7 @@ Variable Name | Memory Address [D_801657A8](@ref D_801657A8) | 0x801657A8 [D_801657AE](@ref D_801657AE) | 0x801657AE [D_801657AF](@ref D_801657AF) | 0x801657AF -[D_801657B0](@ref D_801657B0) | 0x801657B0 +[gHUDDisable](@ref gHUDDisable) | 0x801657B0 [D_801657B1](@ref D_801657B1) | 0x801657B1 [D_801657B2](@ref D_801657B2) | 0x801657B2 [D_801657B3](@ref D_801657B3) | 0x801657B3 @@ -4378,7 +4378,7 @@ Variable Name | Memory Address [D_80183DA8](@ref D_80183DA8) | 0x80183DA8 [gIndexLakituList](@ref gIndexLakituList) | 0x80183DB8 [D_80183DC8](@ref D_80183DC8) | 0x80183DC8 -[D_80183DD8](@ref D_80183DD8) | 0x80183DD8 +[gIndexObjectBombKart](@ref gIndexObjectBombKart) | 0x80183DD8 [D_80183DF8](@ref D_80183DF8) | 0x80183DF8 [gNextFreeObjectParticle1](@ref gNextFreeObjectParticle1) | 0x80183E38 [D_80183E40](@ref D_80183E40) | 0x80183E40 @@ -4885,7 +4885,7 @@ Variable Name | Memory Address [update_actor_yoshi_valley_egg](@ref update_actor_yoshi_valley_egg) | 0x80297BFC [update_actor_trees_cacti_shrubs](@ref update_actor_trees_cacti_shrubs) | 0x80297D04 [update_actor_kiwano_fruit](@ref update_actor_kiwano_fruit) | 0x80297D5C -[update_actor_paddle_wheel](@ref update_actor_paddle_wheel) | 0x8029816C +[update_actor_paddle_boat](@ref update_actor_paddle_boat) | 0x8029816C [update_actor_train_engine](@ref update_actor_train_engine) | 0x8029817C [update_actor_train_car1](@ref update_actor_train_car1) | 0x802981CC [update_actor_train_car2](@ref update_actor_train_car2) | 0x802981DC @@ -4919,14 +4919,14 @@ Variable Name | Memory Address [func_8029ABD4](@ref func_8029ABD4) | 0x8029ABD4 [func_8029AC18](@ref func_8029AC18) | 0x8029AC18 [func_8029AE14](@ref func_8029AE14) | 0x8029AE14 -[func_8029AE1C](@ref func_8029AE1C) | 0x8029AE1C +[render_actor_paddle_boat](@ref render_actor_paddle_boat) | 0x8029AE1C [func_8029B06C](@ref func_8029B06C) | 0x8029B06C [func_8029B2E4](@ref func_8029B2E4) | 0x8029B2E4 [func_8029B4E0](@ref func_8029B4E0) | 0x8029B4E0 [func_8029B6EC](@ref func_8029B6EC) | 0x8029B6EC -[func_8029B8E8](@ref func_8029B8E8) | 0x8029B8E8 -[func_8029BFB0](@ref func_8029BFB0) | 0x8029BFB0 -[func_8029C3CC](@ref func_8029C3CC) | 0x8029C3CC +[render_actor_train_engine](@ref render_actor_train_engine) | 0x8029B8E8 +[render_actor_train_tender](@ref render_actor_train_tender) | 0x8029BFB0 +[render_actor_passenger_car](@ref render_actor_passenger_car) | 0x8029C3CC [render_actor_falling_rock](@ref render_actor_falling_rock) | 0x8029CA90 [place_piranha_plants](@ref place_piranha_plants) | 0x8029CC14 [place_palm_trees](@ref place_palm_trees) | 0x8029CD80 @@ -4965,9 +4965,9 @@ Variable Name | Memory Address [update_actor_item_box](@ref update_actor_item_box) | 0x802A1600 [func_802A171C](@ref func_802A171C) | 0x802A171C [func_802A1EA0](@ref func_802A1EA0) | 0x802A1EA0 -[func_802A269C](@ref func_802A269C) | 0x802A269C +[render_actor_wario_sign](@ref render_actor_wario_sign) | 0x802A269C [func_802A27A0](@ref func_802A27A0) | 0x802A27A0 -[func_802A29BC](@ref func_802A29BC) | 0x802A29BC +[render_actor_mario_sign](@ref render_actor_mario_sign) | 0x802A29BC [func_802A2AD0](@ref func_802A2AD0) | 0x802A2AD0 [func_802A2C78](@ref func_802A2C78) | 0x802A2C78 [func_802A2F34](@ref func_802A2F34) | 0x802A2F34 @@ -5005,15 +5005,15 @@ Variable Name | Memory Address [func_802A5590](@ref func_802A5590) | 0x802A5590 [func_802A5678](@ref func_802A5678) | 0x802A5678 [func_802A5760](@ref func_802A5760) | 0x802A5760 -[func_802A59A4](@ref func_802A59A4) | 0x802A59A4 -[func_802A5CB4](@ref func_802A5CB4) | 0x802A5CB4 -[func_802A5FAC](@ref func_802A5FAC) | 0x802A5FAC -[func_802A62A4](@ref func_802A62A4) | 0x802A62A4 -[func_802A65B8](@ref func_802A65B8) | 0x802A65B8 -[func_802A68CC](@ref func_802A68CC) | 0x802A68CC -[func_802A6BB0](@ref func_802A6BB0) | 0x802A6BB0 -[func_802A6E94](@ref func_802A6E94) | 0x802A6E94 -[func_802A7178](@ref func_802A7178) | 0x802A7178 +[render_player_one_1p_screen](@ref render_player_one_1p_screen) | 0x802A59A4 +[render_player_one_2p_screen_vertical](@ref render_player_one_2p_screen_vertical) | 0x802A5CB4 +[render_player_two_2p_screen_vertical](@ref render_player_two_2p_screen_vertical) | 0x802A5FAC +[render_player_one_2p_screen_horizontal](@ref render_player_one_2p_screen_horizontal) | 0x802A62A4 +[render_player_two_2p_screen_horizontal](@ref render_player_two_2p_screen_horizontal) | 0x802A65B8 +[render_player_one_3p_4p_screen](@ref render_player_one_3p_4p_screen) | 0x802A68CC +[render_player_two_3p_4p_screen](@ref render_player_two_3p_4p_screen) | 0x802A6BB0 +[render_player_three_3p_4p_screen](@ref render_player_three_3p_4p_screen) | 0x802A6E94 +[render_player_four_3p_4p_screen](@ref render_player_four_3p_4p_screen) | 0x802A7178 [func_802A74BC](@ref func_802A74BC) | 0x802A74BC [copy_framebuffer](@ref copy_framebuffer) | 0x802A7658 [func_802A7728](@ref func_802A7728) | 0x802A7728 @@ -5154,7 +5154,7 @@ Variable Name | Memory Address [func_802B4FF0](@ref func_802B4FF0) | 0x802B4FF0 [render_set_position](@ref render_set_position) | 0x802B4FF8 [func_802B51E8](@ref func_802B51E8) | 0x802B51E8 -[get_angle_between_points](@ref get_angle_between_points) | 0x802B5224 +[get_angle_between_two_vectors](@ref get_angle_between_two_vectors) | 0x802B5224 [func_802B5258](@ref func_802B5258) | 0x802B5258 [vec3f_set](@ref vec3f_set) | 0x802B529C [vec3s_set](@ref vec3s_set) | 0x802B52BC @@ -5177,7 +5177,7 @@ Variable Name | Memory Address [func_802B5D30](@ref func_802B5D30) | 0x802B5D30 [func_802B5D64](@ref func_802B5D64) | 0x802B5D64 [mtxf_scale](@ref mtxf_scale) | 0x802B5F00 -[func_802B5F74](@ref func_802B5F74) | 0x802B5F74 +[mtxf_pos_rotation_xyz](@ref mtxf_pos_rotation_xyz) | 0x802B5F74 [func_802B60B4](@ref func_802B60B4) | 0x802B60B4 [func_802B6214](@ref func_802B6214) | 0x802B6214 [func_802B6374](@ref func_802B6374) | 0x802B6374 @@ -5250,7 +5250,7 @@ Variable Name | Memory Address [D_802BA050](@ref D_802BA050) | 0x802BA050 [D_802BA054](@ref D_802BA054) | 0x802BA054 [D_802BA058](@ref D_802BA058) | 0x802BA058 -[D_802BA05C](@ref D_802BA05C) | 0x802BA05C +[gActorHotAirBalloonItemBox](@ref gActorHotAirBalloonItemBox) | 0x802BA05C [gTLUTRedShell](@ref gTLUTRedShell) | 0x802BA060 [D_802BA260](@ref D_802BA260) | 0x802BA260 [sGfxSeekPosition](@ref sGfxSeekPosition) | 0x802BA270 @@ -18716,66 +18716,66 @@ Variable Name | Memory Address [gCosineTable](@ref gCosineTable) | 0x802BB370 [gArctanTable](@ref gArctanTable) | 0x802BF370 [gTextureMarioFace00](@ref gTextureMarioFace00) | 0x0A000000 -[gTextureMarioFace00_end](@ref gTextureMarioFace00_end) | 0x0A000CD4 [gTextureMarioFace01](@ref gTextureMarioFace01) | 0x0A000CD4 -[gTextureMarioFace01_end](@ref gTextureMarioFace01_end) | 0x0A001994 +[gTextureMarioFace00_end](@ref gTextureMarioFace00_end) | 0x0A000CD4 [gTextureMarioFace02](@ref gTextureMarioFace02) | 0x0A001994 -[gTextureMarioFace02_end](@ref gTextureMarioFace02_end) | 0x0A002650 +[gTextureMarioFace01_end](@ref gTextureMarioFace01_end) | 0x0A001994 [gTextureMarioFace03](@ref gTextureMarioFace03) | 0x0A002650 -[gTextureMarioFace04](@ref gTextureMarioFace04) | 0x0A0032BC +[gTextureMarioFace02_end](@ref gTextureMarioFace02_end) | 0x0A002650 [gTextureMarioFace03_end](@ref gTextureMarioFace03_end) | 0x0A0032BC -[gTextureMarioFace04_end](@ref gTextureMarioFace04_end) | 0x0A003F08 +[gTextureMarioFace04](@ref gTextureMarioFace04) | 0x0A0032BC [gTextureMarioFace05](@ref gTextureMarioFace05) | 0x0A003F08 -[gTextureMarioFace05_end](@ref gTextureMarioFace05_end) | 0x0A004B48 +[gTextureMarioFace04_end](@ref gTextureMarioFace04_end) | 0x0A003F08 [gTextureMarioFace06](@ref gTextureMarioFace06) | 0x0A004B48 +[gTextureMarioFace05_end](@ref gTextureMarioFace05_end) | 0x0A004B48 [gTextureMarioFace07](@ref gTextureMarioFace07) | 0x0A00585C [gTextureMarioFace06_end](@ref gTextureMarioFace06_end) | 0x0A00585C [gTextureMarioFace08](@ref gTextureMarioFace08) | 0x0A006568 [gTextureMarioFace07_end](@ref gTextureMarioFace07_end) | 0x0A006568 -[gTextureMarioFace09](@ref gTextureMarioFace09) | 0x0A00726C [gTextureMarioFace08_end](@ref gTextureMarioFace08_end) | 0x0A00726C -[gTextureMarioFace10](@ref gTextureMarioFace10) | 0x0A007F4C +[gTextureMarioFace09](@ref gTextureMarioFace09) | 0x0A00726C [gTextureMarioFace09_end](@ref gTextureMarioFace09_end) | 0x0A007F4C +[gTextureMarioFace10](@ref gTextureMarioFace10) | 0x0A007F4C [gTextureMarioFace11](@ref gTextureMarioFace11) | 0x0A008C48 [gTextureMarioFace10_end](@ref gTextureMarioFace10_end) | 0x0A008C48 -[gTextureMarioFace12](@ref gTextureMarioFace12) | 0x0A009944 [gTextureMarioFace11_end](@ref gTextureMarioFace11_end) | 0x0A009944 +[gTextureMarioFace12](@ref gTextureMarioFace12) | 0x0A009944 [gTextureMarioFace13](@ref gTextureMarioFace13) | 0x0A00A688 [gTextureMarioFace12_end](@ref gTextureMarioFace12_end) | 0x0A00A688 -[gTextureMarioFace13_end](@ref gTextureMarioFace13_end) | 0x0A00B3DC [gTextureMarioFace14](@ref gTextureMarioFace14) | 0x0A00B3DC -[gTextureMarioFace14_end](@ref gTextureMarioFace14_end) | 0x0A00C180 +[gTextureMarioFace13_end](@ref gTextureMarioFace13_end) | 0x0A00B3DC [gTextureMarioFace15](@ref gTextureMarioFace15) | 0x0A00C180 -[gTextureMarioFace15_end](@ref gTextureMarioFace15_end) | 0x0A00CF20 +[gTextureMarioFace14_end](@ref gTextureMarioFace14_end) | 0x0A00C180 [gTextureMarioFace16](@ref gTextureMarioFace16) | 0x0A00CF20 +[gTextureMarioFace15_end](@ref gTextureMarioFace15_end) | 0x0A00CF20 [gTextureLuigiFace00](@ref gTextureLuigiFace00) | 0x0A00DA64 [gTextureMarioFace16_end](@ref gTextureMarioFace16_end) | 0x0A00DA64 -[gTextureLuigiFace01](@ref gTextureLuigiFace01) | 0x0A00E680 [gTextureLuigiFace00_end](@ref gTextureLuigiFace00_end) | 0x0A00E680 +[gTextureLuigiFace01](@ref gTextureLuigiFace01) | 0x0A00E680 [gTextureLuigiFace01_end](@ref gTextureLuigiFace01_end) | 0x0A00F2A0 [gTextureLuigiFace02](@ref gTextureLuigiFace02) | 0x0A00F2A0 -[gTextureLuigiFace02_end](@ref gTextureLuigiFace02_end) | 0x0A00FEC0 [gTextureLuigiFace03](@ref gTextureLuigiFace03) | 0x0A00FEC0 +[gTextureLuigiFace02_end](@ref gTextureLuigiFace02_end) | 0x0A00FEC0 [gTextureLuigiFace03_end](@ref gTextureLuigiFace03_end) | 0x0A010AA8 [gTextureLuigiFace04](@ref gTextureLuigiFace04) | 0x0A010AA8 -[gTextureLuigiFace04_end](@ref gTextureLuigiFace04_end) | 0x0A011690 [gTextureLuigiFace05](@ref gTextureLuigiFace05) | 0x0A011690 +[gTextureLuigiFace04_end](@ref gTextureLuigiFace04_end) | 0x0A011690 [gTextureLuigiFace06](@ref gTextureLuigiFace06) | 0x0A01225C [gTextureLuigiFace05_end](@ref gTextureLuigiFace05_end) | 0x0A01225C [gTextureLuigiFace06_end](@ref gTextureLuigiFace06_end) | 0x0A012E84 [gTextureLuigiFace07](@ref gTextureLuigiFace07) | 0x0A012E84 -[gTextureLuigiFace08](@ref gTextureLuigiFace08) | 0x0A013AB8 [gTextureLuigiFace07_end](@ref gTextureLuigiFace07_end) | 0x0A013AB8 -[gTextureLuigiFace09](@ref gTextureLuigiFace09) | 0x0A014744 +[gTextureLuigiFace08](@ref gTextureLuigiFace08) | 0x0A013AB8 [gTextureLuigiFace08_end](@ref gTextureLuigiFace08_end) | 0x0A014744 -[gTextureLuigiFace10](@ref gTextureLuigiFace10) | 0x0A0153C4 +[gTextureLuigiFace09](@ref gTextureLuigiFace09) | 0x0A014744 [gTextureLuigiFace09_end](@ref gTextureLuigiFace09_end) | 0x0A0153C4 -[gTextureLuigiFace10_end](@ref gTextureLuigiFace10_end) | 0x0A016054 +[gTextureLuigiFace10](@ref gTextureLuigiFace10) | 0x0A0153C4 [gTextureLuigiFace11](@ref gTextureLuigiFace11) | 0x0A016054 +[gTextureLuigiFace10_end](@ref gTextureLuigiFace10_end) | 0x0A016054 [gTextureLuigiFace11_end](@ref gTextureLuigiFace11_end) | 0x0A016D14 [gTextureLuigiFace12](@ref gTextureLuigiFace12) | 0x0A016D14 -[gTextureLuigiFace12_end](@ref gTextureLuigiFace12_end) | 0x0A017A44 [gTextureLuigiFace13](@ref gTextureLuigiFace13) | 0x0A017A44 +[gTextureLuigiFace12_end](@ref gTextureLuigiFace12_end) | 0x0A017A44 [gTextureLuigiFace14](@ref gTextureLuigiFace14) | 0x0A018770 [gTextureLuigiFace13_end](@ref gTextureLuigiFace13_end) | 0x0A018770 [gTextureLuigiFace15](@ref gTextureLuigiFace15) | 0x0A0194B8 @@ -18784,68 +18784,68 @@ Variable Name | Memory Address [gTextureLuigiFace16](@ref gTextureLuigiFace16) | 0x0A01A20C [gTextureLuigiFace16_end](@ref gTextureLuigiFace16_end) | 0x0A01AC44 [gTexturePeachFace00](@ref gTexturePeachFace00) | 0x0A01AC44 -[gTexturePeachFace00_end](@ref gTexturePeachFace00_end) | 0x0A01BAFC [gTexturePeachFace01](@ref gTexturePeachFace01) | 0x0A01BAFC +[gTexturePeachFace00_end](@ref gTexturePeachFace00_end) | 0x0A01BAFC [gTexturePeachFace01_end](@ref gTexturePeachFace01_end) | 0x0A01C9A8 [gTexturePeachFace02](@ref gTexturePeachFace02) | 0x0A01C9A8 -[gTexturePeachFace02_end](@ref gTexturePeachFace02_end) | 0x0A01D864 [gTexturePeachFace03](@ref gTexturePeachFace03) | 0x0A01D864 +[gTexturePeachFace02_end](@ref gTexturePeachFace02_end) | 0x0A01D864 [gTexturePeachFace04](@ref gTexturePeachFace04) | 0x0A01E71C [gTexturePeachFace03_end](@ref gTexturePeachFace03_end) | 0x0A01E71C -[gTexturePeachFace05](@ref gTexturePeachFace05) | 0x0A01F5A4 [gTexturePeachFace04_end](@ref gTexturePeachFace04_end) | 0x0A01F5A4 -[gTexturePeachFace06](@ref gTexturePeachFace06) | 0x0A020444 +[gTexturePeachFace05](@ref gTexturePeachFace05) | 0x0A01F5A4 [gTexturePeachFace05_end](@ref gTexturePeachFace05_end) | 0x0A020444 -[gTexturePeachFace07](@ref gTexturePeachFace07) | 0x0A02130C +[gTexturePeachFace06](@ref gTexturePeachFace06) | 0x0A020444 [gTexturePeachFace06_end](@ref gTexturePeachFace06_end) | 0x0A02130C -[gTexturePeachFace07_end](@ref gTexturePeachFace07_end) | 0x0A0221FC +[gTexturePeachFace07](@ref gTexturePeachFace07) | 0x0A02130C [gTexturePeachFace08](@ref gTexturePeachFace08) | 0x0A0221FC +[gTexturePeachFace07_end](@ref gTexturePeachFace07_end) | 0x0A0221FC [gTexturePeachFace08_end](@ref gTexturePeachFace08_end) | 0x0A02310C [gTexturePeachFace09](@ref gTexturePeachFace09) | 0x0A02310C [gTexturePeachFace09_end](@ref gTexturePeachFace09_end) | 0x0A0240C0 [gTexturePeachFace10](@ref gTexturePeachFace10) | 0x0A0240C0 -[gTexturePeachFace10_end](@ref gTexturePeachFace10_end) | 0x0A0250A4 [gTexturePeachFace11](@ref gTexturePeachFace11) | 0x0A0250A4 +[gTexturePeachFace10_end](@ref gTexturePeachFace10_end) | 0x0A0250A4 [gTexturePeachFace11_end](@ref gTexturePeachFace11_end) | 0x0A0260F0 [gTexturePeachFace12](@ref gTexturePeachFace12) | 0x0A0260F0 [gTexturePeachFace13](@ref gTexturePeachFace13) | 0x0A027128 [gTexturePeachFace12_end](@ref gTexturePeachFace12_end) | 0x0A027128 -[gTexturePeachFace14](@ref gTexturePeachFace14) | 0x0A02810C [gTexturePeachFace13_end](@ref gTexturePeachFace13_end) | 0x0A02810C -[gTexturePeachFace15](@ref gTexturePeachFace15) | 0x0A0290A0 +[gTexturePeachFace14](@ref gTexturePeachFace14) | 0x0A02810C [gTexturePeachFace14_end](@ref gTexturePeachFace14_end) | 0x0A0290A0 -[gTexturePeachFace15_end](@ref gTexturePeachFace15_end) | 0x0A02A028 +[gTexturePeachFace15](@ref gTexturePeachFace15) | 0x0A0290A0 [gTexturePeachFace16](@ref gTexturePeachFace16) | 0x0A02A028 +[gTexturePeachFace15_end](@ref gTexturePeachFace15_end) | 0x0A02A028 [gTexturePeachFace16_end](@ref gTexturePeachFace16_end) | 0x0A02AED0 [gTextureToadFace00](@ref gTextureToadFace00) | 0x0A02AED0 -[gTextureToadFace00_end](@ref gTextureToadFace00_end) | 0x0A02B88C [gTextureToadFace01](@ref gTextureToadFace01) | 0x0A02B88C +[gTextureToadFace00_end](@ref gTextureToadFace00_end) | 0x0A02B88C [gTextureToadFace02](@ref gTextureToadFace02) | 0x0A02C240 [gTextureToadFace01_end](@ref gTextureToadFace01_end) | 0x0A02C240 [gTextureToadFace02_end](@ref gTextureToadFace02_end) | 0x0A02CBFC [gTextureToadFace03](@ref gTextureToadFace03) | 0x0A02CBFC -[gTextureToadFace03_end](@ref gTextureToadFace03_end) | 0x0A02D5B4 [gTextureToadFace04](@ref gTextureToadFace04) | 0x0A02D5B4 -[gTextureToadFace05](@ref gTextureToadFace05) | 0x0A02DF70 +[gTextureToadFace03_end](@ref gTextureToadFace03_end) | 0x0A02D5B4 [gTextureToadFace04_end](@ref gTextureToadFace04_end) | 0x0A02DF70 +[gTextureToadFace05](@ref gTextureToadFace05) | 0x0A02DF70 [gTextureToadFace06](@ref gTextureToadFace06) | 0x0A02E910 [gTextureToadFace05_end](@ref gTextureToadFace05_end) | 0x0A02E910 [gTextureToadFace06_end](@ref gTextureToadFace06_end) | 0x0A02F2A8 [gTextureToadFace07](@ref gTextureToadFace07) | 0x0A02F2A8 [gTextureToadFace07_end](@ref gTextureToadFace07_end) | 0x0A02FC74 [gTextureToadFace08](@ref gTextureToadFace08) | 0x0A02FC74 -[gTextureToadFace09](@ref gTextureToadFace09) | 0x0A030628 [gTextureToadFace08_end](@ref gTextureToadFace08_end) | 0x0A030628 -[gTextureToadFace10](@ref gTextureToadFace10) | 0x0A031010 +[gTextureToadFace09](@ref gTextureToadFace09) | 0x0A030628 [gTextureToadFace09_end](@ref gTextureToadFace09_end) | 0x0A031010 -[gTextureToadFace11](@ref gTextureToadFace11) | 0x0A031A24 +[gTextureToadFace10](@ref gTextureToadFace10) | 0x0A031010 [gTextureToadFace10_end](@ref gTextureToadFace10_end) | 0x0A031A24 +[gTextureToadFace11](@ref gTextureToadFace11) | 0x0A031A24 [gTextureToadFace12](@ref gTextureToadFace12) | 0x0A03247C [gTextureToadFace11_end](@ref gTextureToadFace11_end) | 0x0A03247C [gTextureToadFace13](@ref gTextureToadFace13) | 0x0A032EDC [gTextureToadFace12_end](@ref gTextureToadFace12_end) | 0x0A032EDC -[gTextureToadFace14](@ref gTextureToadFace14) | 0x0A03395C [gTextureToadFace13_end](@ref gTextureToadFace13_end) | 0x0A03395C +[gTextureToadFace14](@ref gTextureToadFace14) | 0x0A03395C [gTextureToadFace15](@ref gTextureToadFace15) | 0x0A0343D0 [gTextureToadFace14_end](@ref gTextureToadFace14_end) | 0x0A0343D0 [gTextureToadFace15_end](@ref gTextureToadFace15_end) | 0x0A034E30 @@ -18854,94 +18854,94 @@ Variable Name | Memory Address [gTextureToadFace16_end](@ref gTextureToadFace16_end) | 0x0A035794 [gTextureYoshiFace00_end](@ref gTextureYoshiFace00_end) | 0x0A036280 [gTextureYoshiFace01](@ref gTextureYoshiFace01) | 0x0A036280 -[gTextureYoshiFace01_end](@ref gTextureYoshiFace01_end) | 0x0A036D64 [gTextureYoshiFace02](@ref gTextureYoshiFace02) | 0x0A036D64 -[gTextureYoshiFace02_end](@ref gTextureYoshiFace02_end) | 0x0A037844 +[gTextureYoshiFace01_end](@ref gTextureYoshiFace01_end) | 0x0A036D64 [gTextureYoshiFace03](@ref gTextureYoshiFace03) | 0x0A037844 +[gTextureYoshiFace02_end](@ref gTextureYoshiFace02_end) | 0x0A037844 [gTextureYoshiFace04](@ref gTextureYoshiFace04) | 0x0A0382F8 [gTextureYoshiFace03_end](@ref gTextureYoshiFace03_end) | 0x0A0382F8 [gTextureYoshiFace04_end](@ref gTextureYoshiFace04_end) | 0x0A038D68 [gTextureYoshiFace05](@ref gTextureYoshiFace05) | 0x0A038D68 [gTextureYoshiFace05_end](@ref gTextureYoshiFace05_end) | 0x0A0397B0 [gTextureYoshiFace06](@ref gTextureYoshiFace06) | 0x0A0397B0 -[gTextureYoshiFace07](@ref gTextureYoshiFace07) | 0x0A03A2D4 [gTextureYoshiFace06_end](@ref gTextureYoshiFace06_end) | 0x0A03A2D4 -[gTextureYoshiFace08](@ref gTextureYoshiFace08) | 0x0A03AD00 +[gTextureYoshiFace07](@ref gTextureYoshiFace07) | 0x0A03A2D4 [gTextureYoshiFace07_end](@ref gTextureYoshiFace07_end) | 0x0A03AD00 -[gTextureYoshiFace08_end](@ref gTextureYoshiFace08_end) | 0x0A03B6BC +[gTextureYoshiFace08](@ref gTextureYoshiFace08) | 0x0A03AD00 [gTextureYoshiFace09](@ref gTextureYoshiFace09) | 0x0A03B6BC -[gTextureYoshiFace09_end](@ref gTextureYoshiFace09_end) | 0x0A03C068 +[gTextureYoshiFace08_end](@ref gTextureYoshiFace08_end) | 0x0A03B6BC [gTextureYoshiFace10](@ref gTextureYoshiFace10) | 0x0A03C068 -[gTextureYoshiFace10_end](@ref gTextureYoshiFace10_end) | 0x0A03CA28 +[gTextureYoshiFace09_end](@ref gTextureYoshiFace09_end) | 0x0A03C068 [gTextureYoshiFace11](@ref gTextureYoshiFace11) | 0x0A03CA28 -[gTextureYoshiFace12](@ref gTextureYoshiFace12) | 0x0A03D438 +[gTextureYoshiFace10_end](@ref gTextureYoshiFace10_end) | 0x0A03CA28 [gTextureYoshiFace11_end](@ref gTextureYoshiFace11_end) | 0x0A03D438 -[gTextureYoshiFace13](@ref gTextureYoshiFace13) | 0x0A03DE94 +[gTextureYoshiFace12](@ref gTextureYoshiFace12) | 0x0A03D438 [gTextureYoshiFace12_end](@ref gTextureYoshiFace12_end) | 0x0A03DE94 +[gTextureYoshiFace13](@ref gTextureYoshiFace13) | 0x0A03DE94 [gTextureYoshiFace14](@ref gTextureYoshiFace14) | 0x0A03E974 [gTextureYoshiFace13_end](@ref gTextureYoshiFace13_end) | 0x0A03E974 -[gTextureYoshiFace14_end](@ref gTextureYoshiFace14_end) | 0x0A03F47C [gTextureYoshiFace15](@ref gTextureYoshiFace15) | 0x0A03F47C +[gTextureYoshiFace14_end](@ref gTextureYoshiFace14_end) | 0x0A03F47C [gTextureYoshiFace15_end](@ref gTextureYoshiFace15_end) | 0x0A03FF94 [gTextureYoshiFace16](@ref gTextureYoshiFace16) | 0x0A03FF94 [gTextureYoshiFace16_end](@ref gTextureYoshiFace16_end) | 0x0A040ABC [gTextureDkFace00](@ref gTextureDkFace00) | 0x0A040ABC -[gTextureDkFace00_end](@ref gTextureDkFace00_end) | 0x0A0418A8 [gTextureDkFace01](@ref gTextureDkFace01) | 0x0A0418A8 -[gTextureDkFace02](@ref gTextureDkFace02) | 0x0A0426B0 +[gTextureDkFace00_end](@ref gTextureDkFace00_end) | 0x0A0418A8 [gTextureDkFace01_end](@ref gTextureDkFace01_end) | 0x0A0426B0 -[gTextureDkFace03](@ref gTextureDkFace03) | 0x0A043490 +[gTextureDkFace02](@ref gTextureDkFace02) | 0x0A0426B0 [gTextureDkFace02_end](@ref gTextureDkFace02_end) | 0x0A043490 -[gTextureDkFace04](@ref gTextureDkFace04) | 0x0A044240 +[gTextureDkFace03](@ref gTextureDkFace03) | 0x0A043490 [gTextureDkFace03_end](@ref gTextureDkFace03_end) | 0x0A044240 +[gTextureDkFace04](@ref gTextureDkFace04) | 0x0A044240 [gTextureDkFace05](@ref gTextureDkFace05) | 0x0A044FE8 [gTextureDkFace04_end](@ref gTextureDkFace04_end) | 0x0A044FE8 -[gTextureDkFace05_end](@ref gTextureDkFace05_end) | 0x0A045DCC [gTextureDkFace06](@ref gTextureDkFace06) | 0x0A045DCC +[gTextureDkFace05_end](@ref gTextureDkFace05_end) | 0x0A045DCC [gTextureDkFace06_end](@ref gTextureDkFace06_end) | 0x0A046BF8 [gTextureDkFace07](@ref gTextureDkFace07) | 0x0A046BF8 -[gTextureDkFace07_end](@ref gTextureDkFace07_end) | 0x0A047A8C [gTextureDkFace08](@ref gTextureDkFace08) | 0x0A047A8C -[gTextureDkFace08_end](@ref gTextureDkFace08_end) | 0x0A048968 +[gTextureDkFace07_end](@ref gTextureDkFace07_end) | 0x0A047A8C [gTextureDkFace09](@ref gTextureDkFace09) | 0x0A048968 +[gTextureDkFace08_end](@ref gTextureDkFace08_end) | 0x0A048968 [gTextureDkFace10](@ref gTextureDkFace10) | 0x0A0498B0 [gTextureDkFace09_end](@ref gTextureDkFace09_end) | 0x0A0498B0 [gTextureDkFace10_end](@ref gTextureDkFace10_end) | 0x0A04A7E8 [gTextureDkFace11](@ref gTextureDkFace11) | 0x0A04A7E8 -[gTextureDkFace11_end](@ref gTextureDkFace11_end) | 0x0A04B76C [gTextureDkFace12](@ref gTextureDkFace12) | 0x0A04B76C +[gTextureDkFace11_end](@ref gTextureDkFace11_end) | 0x0A04B76C [gTextureDkFace13](@ref gTextureDkFace13) | 0x0A04C770 [gTextureDkFace12_end](@ref gTextureDkFace12_end) | 0x0A04C770 [gTextureDkFace13_end](@ref gTextureDkFace13_end) | 0x0A04D730 [gTextureDkFace14](@ref gTextureDkFace14) | 0x0A04D730 -[gTextureDkFace14_end](@ref gTextureDkFace14_end) | 0x0A04E67C [gTextureDkFace15](@ref gTextureDkFace15) | 0x0A04E67C -[gTextureDkFace16](@ref gTextureDkFace16) | 0x0A04F57C +[gTextureDkFace14_end](@ref gTextureDkFace14_end) | 0x0A04E67C [gTextureDkFace15_end](@ref gTextureDkFace15_end) | 0x0A04F57C -[gTextureDkFace16_end](@ref gTextureDkFace16_end) | 0x0A0504D0 +[gTextureDkFace16](@ref gTextureDkFace16) | 0x0A04F57C [gTextureWarioFace00](@ref gTextureWarioFace00) | 0x0A0504D0 -[gTextureWarioFace01](@ref gTextureWarioFace01) | 0x0A051630 +[gTextureDkFace16_end](@ref gTextureDkFace16_end) | 0x0A0504D0 [gTextureWarioFace00_end](@ref gTextureWarioFace00_end) | 0x0A051630 +[gTextureWarioFace01](@ref gTextureWarioFace01) | 0x0A051630 [gTextureWarioFace01_end](@ref gTextureWarioFace01_end) | 0x0A052774 [gTextureWarioFace02](@ref gTextureWarioFace02) | 0x0A052774 [gTextureWarioFace03](@ref gTextureWarioFace03) | 0x0A0538C8 [gTextureWarioFace02_end](@ref gTextureWarioFace02_end) | 0x0A0538C8 -[gTextureWarioFace04](@ref gTextureWarioFace04) | 0x0A054A30 [gTextureWarioFace03_end](@ref gTextureWarioFace03_end) | 0x0A054A30 +[gTextureWarioFace04](@ref gTextureWarioFace04) | 0x0A054A30 [gTextureWarioFace05](@ref gTextureWarioFace05) | 0x0A055B84 [gTextureWarioFace04_end](@ref gTextureWarioFace04_end) | 0x0A055B84 [gTextureWarioFace05_end](@ref gTextureWarioFace05_end) | 0x0A056CE0 [gTextureWarioFace06](@ref gTextureWarioFace06) | 0x0A056CE0 -[gTextureWarioFace06_end](@ref gTextureWarioFace06_end) | 0x0A057E54 [gTextureWarioFace07](@ref gTextureWarioFace07) | 0x0A057E54 -[gTextureWarioFace07_end](@ref gTextureWarioFace07_end) | 0x0A05902C +[gTextureWarioFace06_end](@ref gTextureWarioFace06_end) | 0x0A057E54 [gTextureWarioFace08](@ref gTextureWarioFace08) | 0x0A05902C +[gTextureWarioFace07_end](@ref gTextureWarioFace07_end) | 0x0A05902C [gTextureWarioFace09](@ref gTextureWarioFace09) | 0x0A05A254 [gTextureWarioFace08_end](@ref gTextureWarioFace08_end) | 0x0A05A254 [gTextureWarioFace09_end](@ref gTextureWarioFace09_end) | 0x0A05B4C0 [gTextureWarioFace10](@ref gTextureWarioFace10) | 0x0A05B4C0 -[gTextureWarioFace11](@ref gTextureWarioFace11) | 0x0A05C7A0 [gTextureWarioFace10_end](@ref gTextureWarioFace10_end) | 0x0A05C7A0 +[gTextureWarioFace11](@ref gTextureWarioFace11) | 0x0A05C7A0 [gTextureWarioFace11_end](@ref gTextureWarioFace11_end) | 0x0A05DAA8 [gTextureWarioFace12](@ref gTextureWarioFace12) | 0x0A05DAA8 [gTextureWarioFace12_end](@ref gTextureWarioFace12_end) | 0x0A05ED8C @@ -18950,34 +18950,34 @@ Variable Name | Memory Address [gTextureWarioFace14](@ref gTextureWarioFace14) | 0x0A0600B0 [gTextureWarioFace14_end](@ref gTextureWarioFace14_end) | 0x0A06139C [gTextureWarioFace15](@ref gTextureWarioFace15) | 0x0A06139C -[gTextureWarioFace16](@ref gTextureWarioFace16) | 0x0A062668 [gTextureWarioFace15_end](@ref gTextureWarioFace15_end) | 0x0A062668 +[gTextureWarioFace16](@ref gTextureWarioFace16) | 0x0A062668 [gTextureWarioFace16_end](@ref gTextureWarioFace16_end) | 0x0A0637E0 [gTextureBowserFace00](@ref gTextureBowserFace00) | 0x0A0637E0 [gTextureBowserFace00_end](@ref gTextureBowserFace00_end) | 0x0A064AC8 [gTextureBowserFace01](@ref gTextureBowserFace01) | 0x0A064AC8 -[gTextureBowserFace01_end](@ref gTextureBowserFace01_end) | 0x0A065D7C [gTextureBowserFace02](@ref gTextureBowserFace02) | 0x0A065D7C -[gTextureBowserFace02_end](@ref gTextureBowserFace02_end) | 0x0A067044 +[gTextureBowserFace01_end](@ref gTextureBowserFace01_end) | 0x0A065D7C [gTextureBowserFace03](@ref gTextureBowserFace03) | 0x0A067044 +[gTextureBowserFace02_end](@ref gTextureBowserFace02_end) | 0x0A067044 [gTextureBowserFace03_end](@ref gTextureBowserFace03_end) | 0x0A068310 [gTextureBowserFace04](@ref gTextureBowserFace04) | 0x0A068310 -[gTextureBowserFace05](@ref gTextureBowserFace05) | 0x0A0695B4 [gTextureBowserFace04_end](@ref gTextureBowserFace04_end) | 0x0A0695B4 +[gTextureBowserFace05](@ref gTextureBowserFace05) | 0x0A0695B4 [gTextureBowserFace06](@ref gTextureBowserFace06) | 0x0A06A840 [gTextureBowserFace05_end](@ref gTextureBowserFace05_end) | 0x0A06A840 -[gTextureBowserFace07](@ref gTextureBowserFace07) | 0x0A06BB1C [gTextureBowserFace06_end](@ref gTextureBowserFace06_end) | 0x0A06BB1C +[gTextureBowserFace07](@ref gTextureBowserFace07) | 0x0A06BB1C [gTextureBowserFace08](@ref gTextureBowserFace08) | 0x0A06CE04 [gTextureBowserFace07_end](@ref gTextureBowserFace07_end) | 0x0A06CE04 -[gTextureBowserFace08_end](@ref gTextureBowserFace08_end) | 0x0A06E0F4 [gTextureBowserFace09](@ref gTextureBowserFace09) | 0x0A06E0F4 +[gTextureBowserFace08_end](@ref gTextureBowserFace08_end) | 0x0A06E0F4 [gTextureBowserFace09_end](@ref gTextureBowserFace09_end) | 0x0A06F410 [gTextureBowserFace10](@ref gTextureBowserFace10) | 0x0A06F410 [gTextureBowserFace10_end](@ref gTextureBowserFace10_end) | 0x0A0706DC [gTextureBowserFace11](@ref gTextureBowserFace11) | 0x0A0706DC -[gTextureBowserFace12](@ref gTextureBowserFace12) | 0x0A071A18 [gTextureBowserFace11_end](@ref gTextureBowserFace11_end) | 0x0A071A18 +[gTextureBowserFace12](@ref gTextureBowserFace12) | 0x0A071A18 [gTextureBowserFace13](@ref gTextureBowserFace13) | 0x0A072DBC [gTextureBowserFace12_end](@ref gTextureBowserFace12_end) | 0x0A072DBC [gTextureBowserFace14](@ref gTextureBowserFace14) | 0x0A074138 @@ -19012,12 +19012,12 @@ Variable Name | Memory Address [gTextureTrophySilver](@ref gTextureTrophySilver) | 0x0A0AEFEC [gTextureTrophySilver_end](@ref gTextureTrophySilver_end) | 0x0A0AF614 [gTextureTrophyBronze](@ref gTextureTrophyBronze) | 0x0A0AF614 -[gTextureTrophyBronze_end](@ref gTextureTrophyBronze_end) | 0x0A0AFC00 [gTextureCupGold](@ref gTextureCupGold) | 0x0A0AFC00 +[gTextureTrophyBronze_end](@ref gTextureTrophyBronze_end) | 0x0A0AFC00 [gTextureCupSilver](@ref gTextureCupSilver) | 0x0A0B058C [gTextureCupGold_end](@ref gTextureCupGold_end) | 0x0A0B058C -[gTextureCupSilver_end](@ref gTextureCupSilver_end) | 0x0A0B0F10 [gTextureCupBronze](@ref gTextureCupBronze) | 0x0A0B0F10 +[gTextureCupSilver_end](@ref gTextureCupSilver_end) | 0x0A0B0F10 [gTextureCupBronze_end](@ref gTextureCupBronze_end) | 0x0A0B17B4 [gTexturePushStartButton](@ref gTexturePushStartButton) | 0x0A0B17B4 [gTextureCopyright1996](@ref gTextureCopyright1996) | 0x0A0B2B94 @@ -19029,16 +19029,16 @@ Variable Name | Memory Address [gTexture7E56E4](@ref gTexture7E56E4) | 0x0A0BBCB4 [gTexture7E56E4_end](@ref gTexture7E56E4_end) | 0x0A0BCE1F [gTextureSmallFont0](@ref gTextureSmallFont0) | 0x0A0BCE20 -[gTextureSmallFont0_end](@ref gTextureSmallFont0_end) | 0x0A0BCEB0 [gTextureSmallFont1](@ref gTextureSmallFont1) | 0x0A0BCEB0 +[gTextureSmallFont0_end](@ref gTextureSmallFont0_end) | 0x0A0BCEB0 [gTextureSmallFont2](@ref gTextureSmallFont2) | 0x0A0BCF08 [gTextureSmallFont1_end](@ref gTextureSmallFont1_end) | 0x0A0BCF08 -[gTextureSmallFont3](@ref gTextureSmallFont3) | 0x0A0BCFA0 [gTextureSmallFont2_end](@ref gTextureSmallFont2_end) | 0x0A0BCFA0 +[gTextureSmallFont3](@ref gTextureSmallFont3) | 0x0A0BCFA0 [gTextureSmallFont3_end](@ref gTextureSmallFont3_end) | 0x0A0BD034 [gTextureSmallFont4](@ref gTextureSmallFont4) | 0x0A0BD034 -[gTextureSmallFont4_end](@ref gTextureSmallFont4_end) | 0x0A0BD0BC [gTextureSmallFont5](@ref gTextureSmallFont5) | 0x0A0BD0BC +[gTextureSmallFont4_end](@ref gTextureSmallFont4_end) | 0x0A0BD0BC [gTextureSmallFont6](@ref gTextureSmallFont6) | 0x0A0BD154 [gTextureSmallFont5_end](@ref gTextureSmallFont5_end) | 0x0A0BD154 [gTextureSmallFont6_end](@ref gTextureSmallFont6_end) | 0x0A0BD1F0 @@ -19047,52 +19047,52 @@ Variable Name | Memory Address [gTextureSmallFont7_end](@ref gTextureSmallFont7_end) | 0x0A0BD260 [gTextureSmallFont9](@ref gTextureSmallFont9) | 0x0A0BD2F0 [gTextureSmallFont8_end](@ref gTextureSmallFont8_end) | 0x0A0BD2F0 -[gTextureN64ControllerPakDataSelect](@ref gTextureN64ControllerPakDataSelect) | 0x0A0BD390 [gTextureSmallFont9_end](@ref gTextureSmallFont9_end) | 0x0A0BD390 -[gTextureEraseDataRecordConfirmation](@ref gTextureEraseDataRecordConfirmation) | 0x0A0BE4B8 +[gTextureN64ControllerPakDataSelect](@ref gTextureN64ControllerPakDataSelect) | 0x0A0BD390 [gTextureN64ControllerPakDataSelect_end](@ref gTextureN64ControllerPakDataSelect_end) | 0x0A0BE4B8 +[gTextureEraseDataRecordConfirmation](@ref gTextureEraseDataRecordConfirmation) | 0x0A0BE4B8 [gTextureEraseDataRecordConfirmation_end](@ref gTextureEraseDataRecordConfirmation_end) | 0x0A0BF4AC [gTextureRecordNotErased](@ref gTextureRecordNotErased) | 0x0A0BF4AC -[gTexturePlaceN64ControllerPakIntoController1](@ref gTexturePlaceN64ControllerPakIntoController1) | 0x0A0BFD7C [gTextureRecordNotErased_end](@ref gTextureRecordNotErased_end) | 0x0A0BFD7C -[gTexturePleaseReinsertOriginalN64ControllerPak](@ref gTexturePleaseReinsertOriginalN64ControllerPak) | 0x0A0C09C8 +[gTexturePlaceN64ControllerPakIntoController1](@ref gTexturePlaceN64ControllerPakIntoController1) | 0x0A0BFD7C [gTexturePlaceN64ControllerPakIntoController1_end](@ref gTexturePlaceN64ControllerPakIntoController1_end) | 0x0A0C09C8 -[gTexturePleaseReinsertOriginalN64ControllerPak_end](@ref gTexturePleaseReinsertOriginalN64ControllerPak_end) | 0x0A0C16A0 +[gTexturePleaseReinsertOriginalN64ControllerPak](@ref gTexturePleaseReinsertOriginalN64ControllerPak) | 0x0A0C09C8 [gTextureErasingSelectedRecord](@ref gTextureErasingSelectedRecord) | 0x0A0C16A0 +[gTexturePleaseReinsertOriginalN64ControllerPak_end](@ref gTexturePleaseReinsertOriginalN64ControllerPak_end) | 0x0A0C16A0 [gTextureSelectRecord](@ref gTextureSelectRecord) | 0x0A0C22A4 [gTextureErasingSelectedRecord_end](@ref gTextureErasingSelectedRecord_end) | 0x0A0C22A4 [gTextureTextEnd](@ref gTextureTextEnd) | 0x0A0C261C [gTextureSelectRecord_end](@ref gTextureSelectRecord_end) | 0x0A0C261C -[gTextureTextEnd_end](@ref gTextureTextEnd_end) | 0x0A0C274C [gTextureTableOfContents](@ref gTextureTableOfContents) | 0x0A0C274C -[gTextureTableOfContents_end](@ref gTextureTableOfContents_end) | 0x0A0C2B78 +[gTextureTextEnd_end](@ref gTextureTextEnd_end) | 0x0A0C274C [gTextureTextHash](@ref gTextureTextHash) | 0x0A0C2B78 +[gTextureTableOfContents_end](@ref gTextureTableOfContents_end) | 0x0A0C2B78 [gTextureTextHash_end](@ref gTextureTextHash_end) | 0x0A0C2BF8 [gTextureTextGameData](@ref gTextureTextGameData) | 0x0A0C2BF8 -[gTextureTextPages](@ref gTextureTextPages) | 0x0A0C2EBC [gTextureTextGameData_end](@ref gTextureTextGameData_end) | 0x0A0C2EBC -[gTextureTextPagesFree](@ref gTextureTextPagesFree) | 0x0A0C307C +[gTextureTextPages](@ref gTextureTextPages) | 0x0A0C2EBC [gTextureTextPages_end](@ref gTextureTextPages_end) | 0x0A0C307C +[gTextureTextPagesFree](@ref gTextureTextPagesFree) | 0x0A0C307C [gTextureTextPagesFree_end](@ref gTextureTextPagesFree_end) | 0x0A0C3340 [gTextureTextErase](@ref gTextureTextErase) | 0x0A0C3340 -[gTextureTextErase_end](@ref gTextureTextErase_end) | 0x0A0C34E0 [gTextureTextQuit](@ref gTextureTextQuit) | 0x0A0C34E0 +[gTextureTextErase_end](@ref gTextureTextErase_end) | 0x0A0C34E0 [gTextureTextQuit_end](@ref gTextureTextQuit_end) | 0x0A0C3628 [gTexture7ED058](@ref gTexture7ED058) | 0x0A0C3628 [gTexture7ED290](@ref gTexture7ED290) | 0x0A0C3860 [gTexture7ED058_end](@ref gTexture7ED058_end) | 0x0A0C3860 [gTexture7ED50C](@ref gTexture7ED50C) | 0x0A0C3ADC [gTexture7ED290_end](@ref gTexture7ED290_end) | 0x0A0C3ADC -[gTexture7ED6A4](@ref gTexture7ED6A4) | 0x0A0C3C74 [gTexture7ED50C_end](@ref gTexture7ED50C_end) | 0x0A0C3C74 -[gTextureTinyFont0](@ref gTextureTinyFont0) | 0x0A0C4004 +[gTexture7ED6A4](@ref gTexture7ED6A4) | 0x0A0C3C74 [gTexture7ED6A4_end](@ref gTexture7ED6A4_end) | 0x0A0C4004 +[gTextureTinyFont0](@ref gTextureTinyFont0) | 0x0A0C4004 [gTextureTinyFont0_end](@ref gTextureTinyFont0_end) | 0x0A0C4078 [gTextureTinyFont1](@ref gTextureTinyFont1) | 0x0A0C4078 [gTextureTinyFont1_end](@ref gTextureTinyFont1_end) | 0x0A0C40C0 [gTextureTinyFont2](@ref gTextureTinyFont2) | 0x0A0C40C0 -[gTextureTinyFont3](@ref gTextureTinyFont3) | 0x0A0C4134 [gTextureTinyFont2_end](@ref gTextureTinyFont2_end) | 0x0A0C4134 +[gTextureTinyFont3](@ref gTextureTinyFont3) | 0x0A0C4134 [gTextureTinyFont3_end](@ref gTextureTinyFont3_end) | 0x0A0C41A4 [gTextureTinyFont4](@ref gTextureTinyFont4) | 0x0A0C41A4 [gTextureTinyFont5](@ref gTextureTinyFont5) | 0x0A0C4200 @@ -19103,70 +19103,70 @@ Variable Name | Memory Address [gTextureTinyFont7](@ref gTextureTinyFont7) | 0x0A0C42E8 [gTextureTinyFont8](@ref gTextureTinyFont8) | 0x0A0C4348 [gTextureTinyFont7_end](@ref gTextureTinyFont7_end) | 0x0A0C4348 -[gTextureTinyFont9](@ref gTextureTinyFont9) | 0x0A0C43C0 [gTextureTinyFont8_end](@ref gTextureTinyFont8_end) | 0x0A0C43C0 -[gTextureTinyFont9_end](@ref gTextureTinyFont9_end) | 0x0A0C4434 +[gTextureTinyFont9](@ref gTextureTinyFont9) | 0x0A0C43C0 [gTextureTinyFontA](@ref gTextureTinyFontA) | 0x0A0C4434 +[gTextureTinyFont9_end](@ref gTextureTinyFont9_end) | 0x0A0C4434 [gTextureTinyFontA_end](@ref gTextureTinyFontA_end) | 0x0A0C44A0 [gTextureTinyFontB](@ref gTextureTinyFontB) | 0x0A0C44A0 [gTextureTinyFontC](@ref gTextureTinyFontC) | 0x0A0C451C [gTextureTinyFontB_end](@ref gTextureTinyFontB_end) | 0x0A0C451C [gTextureTinyFontD](@ref gTextureTinyFontD) | 0x0A0C4590 [gTextureTinyFontC_end](@ref gTextureTinyFontC_end) | 0x0A0C4590 -[gTextureTinyFontE](@ref gTextureTinyFontE) | 0x0A0C4600 [gTextureTinyFontD_end](@ref gTextureTinyFontD_end) | 0x0A0C4600 -[gTextureTinyFontF](@ref gTextureTinyFontF) | 0x0A0C4674 +[gTextureTinyFontE](@ref gTextureTinyFontE) | 0x0A0C4600 [gTextureTinyFontE_end](@ref gTextureTinyFontE_end) | 0x0A0C4674 -[gTextureTinyFontG](@ref gTextureTinyFontG) | 0x0A0C46D8 +[gTextureTinyFontF](@ref gTextureTinyFontF) | 0x0A0C4674 [gTextureTinyFontF_end](@ref gTextureTinyFontF_end) | 0x0A0C46D8 -[gTextureTinyFontH](@ref gTextureTinyFontH) | 0x0A0C474C +[gTextureTinyFontG](@ref gTextureTinyFontG) | 0x0A0C46D8 [gTextureTinyFontG_end](@ref gTextureTinyFontG_end) | 0x0A0C474C -[gTextureTinyFontH_end](@ref gTextureTinyFontH_end) | 0x0A0C47C4 +[gTextureTinyFontH](@ref gTextureTinyFontH) | 0x0A0C474C [gTextureTinyFontI](@ref gTextureTinyFontI) | 0x0A0C47C4 -[gTextureTinyFontI_end](@ref gTextureTinyFontI_end) | 0x0A0C480C +[gTextureTinyFontH_end](@ref gTextureTinyFontH_end) | 0x0A0C47C4 [gTextureTinyFontJ](@ref gTextureTinyFontJ) | 0x0A0C480C +[gTextureTinyFontI_end](@ref gTextureTinyFontI_end) | 0x0A0C480C [gTextureTinyFontK](@ref gTextureTinyFontK) | 0x0A0C4860 [gTextureTinyFontJ_end](@ref gTextureTinyFontJ_end) | 0x0A0C4860 -[gTextureTinyFontL](@ref gTextureTinyFontL) | 0x0A0C48D0 [gTextureTinyFontK_end](@ref gTextureTinyFontK_end) | 0x0A0C48D0 -[gTextureTinyFontM](@ref gTextureTinyFontM) | 0x0A0C491C +[gTextureTinyFontL](@ref gTextureTinyFontL) | 0x0A0C48D0 [gTextureTinyFontL_end](@ref gTextureTinyFontL_end) | 0x0A0C491C -[gTextureTinyFontN](@ref gTextureTinyFontN) | 0x0A0C4998 +[gTextureTinyFontM](@ref gTextureTinyFontM) | 0x0A0C491C [gTextureTinyFontM_end](@ref gTextureTinyFontM_end) | 0x0A0C4998 -[gTextureTinyFontN_end](@ref gTextureTinyFontN_end) | 0x0A0C4A14 +[gTextureTinyFontN](@ref gTextureTinyFontN) | 0x0A0C4998 [gTextureTinyFontO](@ref gTextureTinyFontO) | 0x0A0C4A14 -[gTextureTinyFontP](@ref gTextureTinyFontP) | 0x0A0C4A8C +[gTextureTinyFontN_end](@ref gTextureTinyFontN_end) | 0x0A0C4A14 [gTextureTinyFontO_end](@ref gTextureTinyFontO_end) | 0x0A0C4A8C -[gTextureTinyFontP_end](@ref gTextureTinyFontP_end) | 0x0A0C4AF8 +[gTextureTinyFontP](@ref gTextureTinyFontP) | 0x0A0C4A8C [gTextureTinyFontQ](@ref gTextureTinyFontQ) | 0x0A0C4AF8 +[gTextureTinyFontP_end](@ref gTextureTinyFontP_end) | 0x0A0C4AF8 [gTextureTinyFontQ_end](@ref gTextureTinyFontQ_end) | 0x0A0C4B70 [gTextureTinyFontR](@ref gTextureTinyFontR) | 0x0A0C4B70 [gTextureTinyFontR_end](@ref gTextureTinyFontR_end) | 0x0A0C4BE4 [gTextureTinyFontS](@ref gTextureTinyFontS) | 0x0A0C4BE4 -[gTextureTinyFontS_end](@ref gTextureTinyFontS_end) | 0x0A0C4C54 [gTextureTinyFontT](@ref gTextureTinyFontT) | 0x0A0C4C54 +[gTextureTinyFontS_end](@ref gTextureTinyFontS_end) | 0x0A0C4C54 [gTextureTinyFontU](@ref gTextureTinyFontU) | 0x0A0C4CA8 [gTextureTinyFontT_end](@ref gTextureTinyFontT_end) | 0x0A0C4CA8 -[gTextureTinyFontV](@ref gTextureTinyFontV) | 0x0A0C4D0C [gTextureTinyFontU_end](@ref gTextureTinyFontU_end) | 0x0A0C4D0C +[gTextureTinyFontV](@ref gTextureTinyFontV) | 0x0A0C4D0C [gTextureTinyFontW](@ref gTextureTinyFontW) | 0x0A0C4D6C [gTextureTinyFontV_end](@ref gTextureTinyFontV_end) | 0x0A0C4D6C -[gTextureTinyFontX](@ref gTextureTinyFontX) | 0x0A0C4DE8 [gTextureTinyFontW_end](@ref gTextureTinyFontW_end) | 0x0A0C4DE8 +[gTextureTinyFontX](@ref gTextureTinyFontX) | 0x0A0C4DE8 [gTextureTinyFontX_end](@ref gTextureTinyFontX_end) | 0x0A0C4E54 [gTextureTinyFontY](@ref gTextureTinyFontY) | 0x0A0C4E54 [gTextureTinyFontY_end](@ref gTextureTinyFontY_end) | 0x0A0C4EA4 [gTextureTinyFontZ](@ref gTextureTinyFontZ) | 0x0A0C4EA4 -[gTextureTinyFontExclamationMark](@ref gTextureTinyFontExclamationMark) | 0x0A0C4F0C [gTextureTinyFontZ_end](@ref gTextureTinyFontZ_end) | 0x0A0C4F0C +[gTextureTinyFontExclamationMark](@ref gTextureTinyFontExclamationMark) | 0x0A0C4F0C [gTextureTinyFontDoubleQuote](@ref gTextureTinyFontDoubleQuote) | 0x0A0C4F54 [gTextureTinyFontExclamationMark_end](@ref gTextureTinyFontExclamationMark_end) | 0x0A0C4F54 -[gTextureTinyFontDoubleQuote_end](@ref gTextureTinyFontDoubleQuote_end) | 0x0A0C4F8C [gTextureTinyFontHash](@ref gTextureTinyFontHash) | 0x0A0C4F8C +[gTextureTinyFontDoubleQuote_end](@ref gTextureTinyFontDoubleQuote_end) | 0x0A0C4F8C [gTextureTinyFontHash_end](@ref gTextureTinyFontHash_end) | 0x0A0C4FFC [gTextureTinyFontSingleQuote](@ref gTextureTinyFontSingleQuote) | 0x0A0C4FFC -[gTextureTinyFontAsterisk](@ref gTextureTinyFontAsterisk) | 0x0A0C502C [gTextureTinyFontSingleQuote_end](@ref gTextureTinyFontSingleQuote_end) | 0x0A0C502C +[gTextureTinyFontAsterisk](@ref gTextureTinyFontAsterisk) | 0x0A0C502C [gTextureTinyFontPlus](@ref gTextureTinyFontPlus) | 0x0A0C5098 [gTextureTinyFontAsterisk_end](@ref gTextureTinyFontAsterisk_end) | 0x0A0C5098 [gTextureTinyFontPlus_end](@ref gTextureTinyFontPlus_end) | 0x0A0C50E8 @@ -19177,60 +19177,60 @@ Variable Name | Memory Address [gTextureTinyFontMinus_end](@ref gTextureTinyFontMinus_end) | 0x0A0C514C [gTextureTinyFontForwardSlash](@ref gTextureTinyFontForwardSlash) | 0x0A0C517C [gTextureTinyFontComma_end](@ref gTextureTinyFontComma_end) | 0x0A0C517C -[gTextureTinyFontForwardSlash_end](@ref gTextureTinyFontForwardSlash_end) | 0x0A0C51CC [gTextureTinyFontColon](@ref gTextureTinyFontColon) | 0x0A0C51CC -[gTextureTinyFontColon_end](@ref gTextureTinyFontColon_end) | 0x0A0C5204 +[gTextureTinyFontForwardSlash_end](@ref gTextureTinyFontForwardSlash_end) | 0x0A0C51CC [gTexture7EEC34](@ref gTexture7EEC34) | 0x0A0C5204 -[gTextureTinyFontQuestion](@ref gTextureTinyFontQuestion) | 0x0A0C5254 +[gTextureTinyFontColon_end](@ref gTextureTinyFontColon_end) | 0x0A0C5204 [gTexture7EEC34_end](@ref gTexture7EEC34_end) | 0x0A0C5254 -[gTexture7EECE4](@ref gTexture7EECE4) | 0x0A0C52B4 +[gTextureTinyFontQuestion](@ref gTextureTinyFontQuestion) | 0x0A0C5254 [gTextureTinyFontQuestion_end](@ref gTextureTinyFontQuestion_end) | 0x0A0C52B4 +[gTexture7EECE4](@ref gTexture7EECE4) | 0x0A0C52B4 [gTexture7EECE4_end](@ref gTexture7EECE4_end) | 0x0A0C5344 [gTexture7EED74](@ref gTexture7EED74) | 0x0A0C5344 -[gTexture7EED74_end](@ref gTexture7EED74_end) | 0x0A0C5380 [gTexture7EEDB0](@ref gTexture7EEDB0) | 0x0A0C5380 -[gTexture7EEDB0_end](@ref gTexture7EEDB0_end) | 0x0A0C53B8 +[gTexture7EED74_end](@ref gTexture7EED74_end) | 0x0A0C5380 [gTexture7EEDE8](@ref gTexture7EEDE8) | 0x0A0C53B8 -[gTexture7EEE20](@ref gTexture7EEE20) | 0x0A0C53F0 +[gTexture7EEDB0_end](@ref gTexture7EEDB0_end) | 0x0A0C53B8 [gTexture7EEDE8_end](@ref gTexture7EEDE8_end) | 0x0A0C53F0 +[gTexture7EEE20](@ref gTexture7EEE20) | 0x0A0C53F0 [gTexture7EEE7C](@ref gTexture7EEE7C) | 0x0A0C544C [gTexture7EEE20_end](@ref gTexture7EEE20_end) | 0x0A0C544C -[gTexture7EEE7C_end](@ref gTexture7EEE7C_end) | 0x0A0C54A0 [gTexture7EEED0](@ref gTexture7EEED0) | 0x0A0C54A0 -[gTexture7EEED0_end](@ref gTexture7EEED0_end) | 0x0A0C550C +[gTexture7EEE7C_end](@ref gTexture7EEE7C_end) | 0x0A0C54A0 [gTexture7EEF3C](@ref gTexture7EEF3C) | 0x0A0C550C -[gTexture7EEF90](@ref gTexture7EEF90) | 0x0A0C5560 +[gTexture7EEED0_end](@ref gTexture7EEED0_end) | 0x0A0C550C [gTexture7EEF3C_end](@ref gTexture7EEF3C_end) | 0x0A0C5560 -[gTexture7EEFF4](@ref gTexture7EEFF4) | 0x0A0C55C4 +[gTexture7EEF90](@ref gTexture7EEF90) | 0x0A0C5560 [gTexture7EEF90_end](@ref gTexture7EEF90_end) | 0x0A0C55C4 -[gTexture7EEFF4_end](@ref gTexture7EEFF4_end) | 0x0A0C5628 +[gTexture7EEFF4](@ref gTexture7EEFF4) | 0x0A0C55C4 [gTexture7EF058](@ref gTexture7EF058) | 0x0A0C5628 -[gTexture7EF0B4](@ref gTexture7EF0B4) | 0x0A0C5684 +[gTexture7EEFF4_end](@ref gTexture7EEFF4_end) | 0x0A0C5628 [gTexture7EF058_end](@ref gTexture7EF058_end) | 0x0A0C5684 -[gTexture7EF110](@ref gTexture7EF110) | 0x0A0C56E0 +[gTexture7EF0B4](@ref gTexture7EF0B4) | 0x0A0C5684 [gTexture7EF0B4_end](@ref gTexture7EF0B4_end) | 0x0A0C56E0 +[gTexture7EF110](@ref gTexture7EF110) | 0x0A0C56E0 [gTexture7EF17C](@ref gTexture7EF17C) | 0x0A0C574C [gTexture7EF110_end](@ref gTexture7EF110_end) | 0x0A0C574C -[gTexture7EF1F0](@ref gTexture7EF1F0) | 0x0A0C57C0 [gTexture7EF17C_end](@ref gTexture7EF17C_end) | 0x0A0C57C0 -[gTexture7EF250](@ref gTexture7EF250) | 0x0A0C5820 +[gTexture7EF1F0](@ref gTexture7EF1F0) | 0x0A0C57C0 [gTexture7EF1F0_end](@ref gTexture7EF1F0_end) | 0x0A0C5820 -[gTexture7EF250_end](@ref gTexture7EF250_end) | 0x0A0C5888 +[gTexture7EF250](@ref gTexture7EF250) | 0x0A0C5820 [gTexture7EF2B8](@ref gTexture7EF2B8) | 0x0A0C5888 +[gTexture7EF250_end](@ref gTexture7EF250_end) | 0x0A0C5888 [gTexture7EF314](@ref gTexture7EF314) | 0x0A0C58E4 [gTexture7EF2B8_end](@ref gTexture7EF2B8_end) | 0x0A0C58E4 [gTexture7EF388](@ref gTexture7EF388) | 0x0A0C5958 [gTexture7EF314_end](@ref gTexture7EF314_end) | 0x0A0C5958 [gTexture7EF388_end](@ref gTexture7EF388_end) | 0x0A0C59C8 [gTexture7EF3F8](@ref gTexture7EF3F8) | 0x0A0C59C8 -[gTexture7EF3F8_end](@ref gTexture7EF3F8_end) | 0x0A0C5A40 [gTexture7EF470](@ref gTexture7EF470) | 0x0A0C5A40 -[gTexture7EF4E4](@ref gTexture7EF4E4) | 0x0A0C5AB4 +[gTexture7EF3F8_end](@ref gTexture7EF3F8_end) | 0x0A0C5A40 [gTexture7EF470_end](@ref gTexture7EF470_end) | 0x0A0C5AB4 +[gTexture7EF4E4](@ref gTexture7EF4E4) | 0x0A0C5AB4 [gTexture7EF554](@ref gTexture7EF554) | 0x0A0C5B24 [gTexture7EF4E4_end](@ref gTexture7EF4E4_end) | 0x0A0C5B24 -[gTexture7EF554_end](@ref gTexture7EF554_end) | 0x0A0C5B90 [gTexture7EF5C0](@ref gTexture7EF5C0) | 0x0A0C5B90 +[gTexture7EF554_end](@ref gTexture7EF554_end) | 0x0A0C5B90 [gTexture7EF620](@ref gTexture7EF620) | 0x0A0C5BF0 [gTexture7EF5C0_end](@ref gTexture7EF5C0_end) | 0x0A0C5BF0 [gTexture7EF620_end](@ref gTexture7EF620_end) | 0x0A0C5C64 @@ -19241,20 +19241,20 @@ Variable Name | Memory Address [gTexture7EF77C](@ref gTexture7EF77C) | 0x0A0C5D4C [gTexture7EF7E8](@ref gTexture7EF7E8) | 0x0A0C5DB8 [gTexture7EF77C_end](@ref gTexture7EF77C_end) | 0x0A0C5DB8 -[gTexture7EF7E8_end](@ref gTexture7EF7E8_end) | 0x0A0C5E2C [gTexture7EF85C](@ref gTexture7EF85C) | 0x0A0C5E2C +[gTexture7EF7E8_end](@ref gTexture7EF7E8_end) | 0x0A0C5E2C [gTexture7EF8C8](@ref gTexture7EF8C8) | 0x0A0C5E98 [gTexture7EF85C_end](@ref gTexture7EF85C_end) | 0x0A0C5E98 [gTexture7EF93C](@ref gTexture7EF93C) | 0x0A0C5F0C [gTexture7EF8C8_end](@ref gTexture7EF8C8_end) | 0x0A0C5F0C -[gTexture7EF93C_end](@ref gTexture7EF93C_end) | 0x0A0C5F84 [gTexture7EF9B4](@ref gTexture7EF9B4) | 0x0A0C5F84 -[gTexture7EF9B4_end](@ref gTexture7EF9B4_end) | 0x0A0C5FFC +[gTexture7EF93C_end](@ref gTexture7EF93C_end) | 0x0A0C5F84 [gTexture7EFA2C](@ref gTexture7EFA2C) | 0x0A0C5FFC +[gTexture7EF9B4_end](@ref gTexture7EF9B4_end) | 0x0A0C5FFC [gTexture7EFA2C_end](@ref gTexture7EFA2C_end) | 0x0A0C6078 [gTexture7EFAA8](@ref gTexture7EFAA8) | 0x0A0C6078 -[gTexture7EFB00](@ref gTexture7EFB00) | 0x0A0C60D0 [gTexture7EFAA8_end](@ref gTexture7EFAA8_end) | 0x0A0C60D0 +[gTexture7EFB00](@ref gTexture7EFB00) | 0x0A0C60D0 [gTexture7EFB00_end](@ref gTexture7EFB00_end) | 0x0A0C6134 [gTexture7EFB64](@ref gTexture7EFB64) | 0x0A0C6134 [gTexture7EFB64_end](@ref gTexture7EFB64_end) | 0x0A0C618C @@ -19265,68 +19265,68 @@ Variable Name | Memory Address [gTexture7EFCAC](@ref gTexture7EFCAC) | 0x0A0C627C [gTexture7EFD00](@ref gTexture7EFD00) | 0x0A0C62D0 [gTexture7EFCAC_end](@ref gTexture7EFCAC_end) | 0x0A0C62D0 -[gTexture7EFD00_end](@ref gTexture7EFD00_end) | 0x0A0C6330 [gTexture7EFD60](@ref gTexture7EFD60) | 0x0A0C6330 +[gTexture7EFD00_end](@ref gTexture7EFD00_end) | 0x0A0C6330 [gTexture7EFDD4](@ref gTexture7EFDD4) | 0x0A0C63A4 [gTexture7EFD60_end](@ref gTexture7EFD60_end) | 0x0A0C63A4 [gTexture7EFE48](@ref gTexture7EFE48) | 0x0A0C6418 [gTexture7EFDD4_end](@ref gTexture7EFDD4_end) | 0x0A0C6418 [gTexture7EFE48_end](@ref gTexture7EFE48_end) | 0x0A0C6470 [gTexture7EFEA0](@ref gTexture7EFEA0) | 0x0A0C6470 -[gTexture7EFF2C](@ref gTexture7EFF2C) | 0x0A0C64FC [gTexture7EFEA0_end](@ref gTexture7EFEA0_end) | 0x0A0C64FC -[gTexture7EFF90](@ref gTexture7EFF90) | 0x0A0C6560 +[gTexture7EFF2C](@ref gTexture7EFF2C) | 0x0A0C64FC [gTexture7EFF2C_end](@ref gTexture7EFF2C_end) | 0x0A0C6560 -[gTexture7F0000](@ref gTexture7F0000) | 0x0A0C65D0 +[gTexture7EFF90](@ref gTexture7EFF90) | 0x0A0C6560 [gTexture7EFF90_end](@ref gTexture7EFF90_end) | 0x0A0C65D0 -[gTexture7F0000_end](@ref gTexture7F0000_end) | 0x0A0C663C +[gTexture7F0000](@ref gTexture7F0000) | 0x0A0C65D0 [gTexture7F006C](@ref gTexture7F006C) | 0x0A0C663C +[gTexture7F0000_end](@ref gTexture7F0000_end) | 0x0A0C663C [gTexture7F00D8](@ref gTexture7F00D8) | 0x0A0C66A8 [gTexture7F006C_end](@ref gTexture7F006C_end) | 0x0A0C66A8 [gTexture7F00D8_end](@ref gTexture7F00D8_end) | 0x0A0C6728 [gTexture7F0158](@ref gTexture7F0158) | 0x0A0C6728 [gTexture7F01D0](@ref gTexture7F01D0) | 0x0A0C67A0 [gTexture7F0158_end](@ref gTexture7F0158_end) | 0x0A0C67A0 -[gTexture7F023C](@ref gTexture7F023C) | 0x0A0C680C [gTexture7F01D0_end](@ref gTexture7F01D0_end) | 0x0A0C680C -[gTexture7F02B4](@ref gTexture7F02B4) | 0x0A0C6884 +[gTexture7F023C](@ref gTexture7F023C) | 0x0A0C680C [gTexture7F023C_end](@ref gTexture7F023C_end) | 0x0A0C6884 +[gTexture7F02B4](@ref gTexture7F02B4) | 0x0A0C6884 [gTexture7F02B4_end](@ref gTexture7F02B4_end) | 0x0A0C68FC [gTexture7F032C](@ref gTexture7F032C) | 0x0A0C68FC -[gTexture7F0390](@ref gTexture7F0390) | 0x0A0C6960 [gTexture7F032C_end](@ref gTexture7F032C_end) | 0x0A0C6960 +[gTexture7F0390](@ref gTexture7F0390) | 0x0A0C6960 [gTexture7F0404](@ref gTexture7F0404) | 0x0A0C69D4 [gTexture7F0390_end](@ref gTexture7F0390_end) | 0x0A0C69D4 [gTexture7F0470](@ref gTexture7F0470) | 0x0A0C6A40 [gTexture7F0404_end](@ref gTexture7F0404_end) | 0x0A0C6A40 -[gTexture7F04EC](@ref gTexture7F04EC) | 0x0A0C6ABC [gTexture7F0470_end](@ref gTexture7F0470_end) | 0x0A0C6ABC -[gTexture7F055C](@ref gTexture7F055C) | 0x0A0C6B2C +[gTexture7F04EC](@ref gTexture7F04EC) | 0x0A0C6ABC [gTexture7F04EC_end](@ref gTexture7F04EC_end) | 0x0A0C6B2C -[gTexture7F055C_end](@ref gTexture7F055C_end) | 0x0A0C6BC0 +[gTexture7F055C](@ref gTexture7F055C) | 0x0A0C6B2C [gTexture7F05F0](@ref gTexture7F05F0) | 0x0A0C6BC0 +[gTexture7F055C_end](@ref gTexture7F055C_end) | 0x0A0C6BC0 [gTexture7F0670](@ref gTexture7F0670) | 0x0A0C6C40 [gTexture7F05F0_end](@ref gTexture7F05F0_end) | 0x0A0C6C40 -[gTexture7F0670_end](@ref gTexture7F0670_end) | 0x0A0C6CBC [gTexture7F06EC](@ref gTexture7F06EC) | 0x0A0C6CBC +[gTexture7F0670_end](@ref gTexture7F0670_end) | 0x0A0C6CBC [gTexture7F06EC_end](@ref gTexture7F06EC_end) | 0x0A0C6D38 [gTexture7F0768](@ref gTexture7F0768) | 0x0A0C6D38 -[gTexture7F0768_end](@ref gTexture7F0768_end) | 0x0A0C6DB0 [gTexture7F07E0](@ref gTexture7F07E0) | 0x0A0C6DB0 +[gTexture7F0768_end](@ref gTexture7F0768_end) | 0x0A0C6DB0 [gTexture7F07E0_end](@ref gTexture7F07E0_end) | 0x0A0C6E28 [gTexture7F0858](@ref gTexture7F0858) | 0x0A0C6E28 -[gTexture7F0858_end](@ref gTexture7F0858_end) | 0x0A0C6EA8 [gTexture7F08D8](@ref gTexture7F08D8) | 0x0A0C6EA8 +[gTexture7F0858_end](@ref gTexture7F0858_end) | 0x0A0C6EA8 [gTexture7F0948](@ref gTexture7F0948) | 0x0A0C6F18 [gTexture7F08D8_end](@ref gTexture7F08D8_end) | 0x0A0C6F18 -[gTexture7F09D0](@ref gTexture7F09D0) | 0x0A0C6FA0 [gTexture7F0948_end](@ref gTexture7F0948_end) | 0x0A0C6FA0 +[gTexture7F09D0](@ref gTexture7F09D0) | 0x0A0C6FA0 [gTexture7F09D0_end](@ref gTexture7F09D0_end) | 0x0A0C700C [gTexture7F0A3C](@ref gTexture7F0A3C) | 0x0A0C700C [gTexture7F0A3C_end](@ref gTexture7F0A3C_end) | 0x0A0C708C [gTexture7F0ABC](@ref gTexture7F0ABC) | 0x0A0C708C -[gTexture7F0ABC_end](@ref gTexture7F0ABC_end) | 0x0A0C7104 [gTexture7F0B34](@ref gTexture7F0B34) | 0x0A0C7104 +[gTexture7F0ABC_end](@ref gTexture7F0ABC_end) | 0x0A0C7104 [gTexture7F0B34_end](@ref gTexture7F0B34_end) | 0x0A0C7180 [gTexture7F0BB0](@ref gTexture7F0BB0) | 0x0A0C7180 [gTexture7F0BB0_end](@ref gTexture7F0BB0_end) | 0x0A0C71F4 @@ -19335,24 +19335,24 @@ Variable Name | Memory Address [gTexture7F0C24_end](@ref gTexture7F0C24_end) | 0x0A0C7264 [gTexture7F0C94_end](@ref gTexture7F0C94_end) | 0x0A0C72DC [gTexture7F0D0C](@ref gTexture7F0D0C) | 0x0A0C72DC -[gTexture7F0D0C_end](@ref gTexture7F0D0C_end) | 0x0A0C735C [gTexture7F0D8C](@ref gTexture7F0D8C) | 0x0A0C735C -[gTexture7F0DEC](@ref gTexture7F0DEC) | 0x0A0C73BC +[gTexture7F0D0C_end](@ref gTexture7F0D0C_end) | 0x0A0C735C [gTexture7F0D8C_end](@ref gTexture7F0D8C_end) | 0x0A0C73BC +[gTexture7F0DEC](@ref gTexture7F0DEC) | 0x0A0C73BC [gTexture7F0E5C](@ref gTexture7F0E5C) | 0x0A0C742C [gTexture7F0DEC_end](@ref gTexture7F0DEC_end) | 0x0A0C742C -[gTexture7F0E5C_end](@ref gTexture7F0E5C_end) | 0x0A0C74B4 [gTexture7F0EE4](@ref gTexture7F0EE4) | 0x0A0C74B4 -[gTexture7F0F5C](@ref gTexture7F0F5C) | 0x0A0C752C +[gTexture7F0E5C_end](@ref gTexture7F0E5C_end) | 0x0A0C74B4 [gTexture7F0EE4_end](@ref gTexture7F0EE4_end) | 0x0A0C752C -[gTexture7F0F5C_end](@ref gTexture7F0F5C_end) | 0x0A0C75A8 +[gTexture7F0F5C](@ref gTexture7F0F5C) | 0x0A0C752C [gTexture7F0FD8](@ref gTexture7F0FD8) | 0x0A0C75A8 +[gTexture7F0F5C_end](@ref gTexture7F0F5C_end) | 0x0A0C75A8 [gTexture7F0FD8_end](@ref gTexture7F0FD8_end) | 0x0A0C7608 [gTexture7F1038](@ref gTexture7F1038) | 0x0A0C7608 -[gTexture7F109C](@ref gTexture7F109C) | 0x0A0C766C [gTexture7F1038_end](@ref gTexture7F1038_end) | 0x0A0C766C -[gTexture7F109C_end](@ref gTexture7F109C_end) | 0x0A0C76F4 +[gTexture7F109C](@ref gTexture7F109C) | 0x0A0C766C [gTexture7F1124](@ref gTexture7F1124) | 0x0A0C76F4 +[gTexture7F109C_end](@ref gTexture7F109C_end) | 0x0A0C76F4 [gTexture7F11F4](@ref gTexture7F11F4) | 0x0A0C77C4 [gTexture7F12C4](@ref gTexture7F12C4) | 0x0A0C7894 [gTexture7F1394](@ref gTexture7F1394) | 0x0A0C7964 @@ -19590,54 +19590,54 @@ Variable Name | Memory Address [gTexturePlayerSelect](@ref gTexturePlayerSelect) | 0x0B000000 [gTexturePlayerSelect_end](@ref gTexturePlayerSelect_end) | 0x0B000C00 [gTextureOption](@ref gTextureOption) | 0x0B000C00 -[gTextureNameDK](@ref gTextureNameDK) | 0x0B001500 [gTextureOption_end](@ref gTextureOption_end) | 0x0B001500 -[gTextureNameDK_end](@ref gTextureNameDK_end) | 0x0B001700 +[gTextureNameDK](@ref gTextureNameDK) | 0x0B001500 [gTextureNameToad](@ref gTextureNameToad) | 0x0B001700 +[gTextureNameDK_end](@ref gTextureNameDK_end) | 0x0B001700 [gTextureNameToad_end](@ref gTextureNameToad_end) | 0x0B001900 [gTextureNameBowser](@ref gTextureNameBowser) | 0x0B001900 -[gTextureNameBowser_end](@ref gTextureNameBowser_end) | 0x0B001B00 [gTextureNameLuigi](@ref gTextureNameLuigi) | 0x0B001B00 -[gTextureNameMario](@ref gTextureNameMario) | 0x0B001D00 +[gTextureNameBowser_end](@ref gTextureNameBowser_end) | 0x0B001B00 [gTextureNameLuigi_end](@ref gTextureNameLuigi_end) | 0x0B001D00 -[gTextureNamePeach](@ref gTextureNamePeach) | 0x0B001F00 +[gTextureNameMario](@ref gTextureNameMario) | 0x0B001D00 [gTextureNameMario_end](@ref gTextureNameMario_end) | 0x0B001F00 -[gTextureNameWario](@ref gTextureNameWario) | 0x0B002100 +[gTextureNamePeach](@ref gTextureNamePeach) | 0x0B001F00 [gTextureNamePeach_end](@ref gTextureNamePeach_end) | 0x0B002100 +[gTextureNameWario](@ref gTextureNameWario) | 0x0B002100 [gTextureNameYoshi](@ref gTextureNameYoshi) | 0x0B002300 [gTextureNameWario_end](@ref gTextureNameWario_end) | 0x0B002300 -[gTextureNameYoshi_end](@ref gTextureNameYoshi_end) | 0x0B002500 [gTextureTitleMarioRaceway](@ref gTextureTitleMarioRaceway) | 0x0B002500 +[gTextureNameYoshi_end](@ref gTextureNameYoshi_end) | 0x0B002500 [gTextureTitleChocoMountain](@ref gTextureTitleChocoMountain) | 0x0B002A00 [gTextureTitleMarioRaceway_end](@ref gTextureTitleMarioRaceway_end) | 0x0B002A00 -[gTextureTitleChocoMountain_end](@ref gTextureTitleChocoMountain_end) | 0x0B002F00 [gTextureTitleBowsersCastle](@ref gTextureTitleBowsersCastle) | 0x0B002F00 +[gTextureTitleChocoMountain_end](@ref gTextureTitleChocoMountain_end) | 0x0B002F00 [gTextureTitleBowsersCastle_end](@ref gTextureTitleBowsersCastle_end) | 0x0B003400 [gTextureTitleBansheeBoardwalk](@ref gTextureTitleBansheeBoardwalk) | 0x0B003400 -[gTextureTitleBansheeBoardwalk_end](@ref gTextureTitleBansheeBoardwalk_end) | 0x0B003A00 [gTextureTitleYoshiValley](@ref gTextureTitleYoshiValley) | 0x0B003A00 +[gTextureTitleBansheeBoardwalk_end](@ref gTextureTitleBansheeBoardwalk_end) | 0x0B003A00 [gTextureTitleYoshiValley_end](@ref gTextureTitleYoshiValley_end) | 0x0B003E00 [gTextureTitleFrappeSnowland](@ref gTextureTitleFrappeSnowland) | 0x0B003E00 -[gTextureTitleKoopaTroopaBeach](@ref gTextureTitleKoopaTroopaBeach) | 0x0B004300 [gTextureTitleFrappeSnowland_end](@ref gTextureTitleFrappeSnowland_end) | 0x0B004300 +[gTextureTitleKoopaTroopaBeach](@ref gTextureTitleKoopaTroopaBeach) | 0x0B004300 [gTextureTitleKoopaTroopaBeach_end](@ref gTextureTitleKoopaTroopaBeach_end) | 0x0B004800 [gTextureTitleRoyalRaceway](@ref gTextureTitleRoyalRaceway) | 0x0B004800 [gTextureTitleRoyalRaceway_end](@ref gTextureTitleRoyalRaceway_end) | 0x0B004C00 [gTextureTitleLuigiRaceway](@ref gTextureTitleLuigiRaceway) | 0x0B004C00 [gTextureTitleMooMooFarm](@ref gTextureTitleMooMooFarm) | 0x0B005000 [gTextureTitleLuigiRaceway_end](@ref gTextureTitleLuigiRaceway_end) | 0x0B005000 -[gTextureTitleMooMooFarm_end](@ref gTextureTitleMooMooFarm_end) | 0x0B005400 [gTextureTitleToadsTurnpike](@ref gTextureTitleToadsTurnpike) | 0x0B005400 -[gTextureTitleKalimariDesert](@ref gTextureTitleKalimariDesert) | 0x0B005900 +[gTextureTitleMooMooFarm_end](@ref gTextureTitleMooMooFarm_end) | 0x0B005400 [gTextureTitleToadsTurnpike_end](@ref gTextureTitleToadsTurnpike_end) | 0x0B005900 -[gTextureTitleKalimariDesert_end](@ref gTextureTitleKalimariDesert_end) | 0x0B005D00 +[gTextureTitleKalimariDesert](@ref gTextureTitleKalimariDesert) | 0x0B005900 [gTextureTitleSherbetLand](@ref gTextureTitleSherbetLand) | 0x0B005D00 -[gTextureTitleSherbetLand_end](@ref gTextureTitleSherbetLand_end) | 0x0B006100 +[gTextureTitleKalimariDesert_end](@ref gTextureTitleKalimariDesert_end) | 0x0B005D00 [gTextureTitleRainbowRoad](@ref gTextureTitleRainbowRoad) | 0x0B006100 +[gTextureTitleSherbetLand_end](@ref gTextureTitleSherbetLand_end) | 0x0B006100 [gTextureTitleWarioStadium](@ref gTextureTitleWarioStadium) | 0x0B006500 [gTextureTitleRainbowRoad_end](@ref gTextureTitleRainbowRoad_end) | 0x0B006500 -[gTextureTitleWarioStadium_end](@ref gTextureTitleWarioStadium_end) | 0x0B006A00 [gTextureTitleBlockFort](@ref gTextureTitleBlockFort) | 0x0B006A00 +[gTextureTitleWarioStadium_end](@ref gTextureTitleWarioStadium_end) | 0x0B006A00 [gTextureTitleBlockFort_end](@ref gTextureTitleBlockFort_end) | 0x0B006D00 [gTextureTitleSkyscraper](@ref gTextureTitleSkyscraper) | 0x0B006D00 [gTextureTitleDoubleDeck](@ref gTextureTitleDoubleDeck) | 0x0B007100 @@ -19652,22 +19652,22 @@ Variable Name | Memory Address [gTextureMapSelect_end](@ref gTextureMapSelect_end) | 0x0B008A00 [gTextureMenuMushroomCup](@ref gTextureMenuMushroomCup) | 0x0B008E00 [gTextureMenuFlowerCup_end](@ref gTextureMenuFlowerCup_end) | 0x0B008E00 -[gTextureMenuMushroomCup_end](@ref gTextureMenuMushroomCup_end) | 0x0B009200 [gTextureMenuStarCup](@ref gTextureMenuStarCup) | 0x0B009200 +[gTextureMenuMushroomCup_end](@ref gTextureMenuMushroomCup_end) | 0x0B009200 [gTextureMenuSpecialCup](@ref gTextureMenuSpecialCup) | 0x0B009600 [gTextureMenuStarCup_end](@ref gTextureMenuStarCup_end) | 0x0B009600 [gTextureGameSelect](@ref gTextureGameSelect) | 0x0B009A00 [gTextureMenuSpecialCup_end](@ref gTextureMenuSpecialCup_end) | 0x0B009A00 -[gTextureMenu1PGame](@ref gTextureMenu1PGame) | 0x0B00A600 [gTextureGameSelect_end](@ref gTextureGameSelect_end) | 0x0B00A600 -[gTextureMenu1PGame_end](@ref gTextureMenu1PGame_end) | 0x0B00AB00 +[gTextureMenu1PGame](@ref gTextureMenu1PGame) | 0x0B00A600 [gTextureMenu2PGame](@ref gTextureMenu2PGame) | 0x0B00AB00 -[gTextureMenu3PGame](@ref gTextureMenu3PGame) | 0x0B00B200 +[gTextureMenu1PGame_end](@ref gTextureMenu1PGame_end) | 0x0B00AB00 [gTextureMenu2PGame_end](@ref gTextureMenu2PGame_end) | 0x0B00B200 -[gTextureMenu4PGame](@ref gTextureMenu4PGame) | 0x0B00BC00 +[gTextureMenu3PGame](@ref gTextureMenu3PGame) | 0x0B00B200 [gTextureMenu3PGame_end](@ref gTextureMenu3PGame_end) | 0x0B00BC00 -[gTextureMenu4PGame_end](@ref gTextureMenu4PGame_end) | 0x0B00C700 +[gTextureMenu4PGame](@ref gTextureMenu4PGame) | 0x0B00BC00 [gTextureMenuModeBattle](@ref gTextureMenuModeBattle) | 0x0B00C700 +[gTextureMenu4PGame_end](@ref gTextureMenu4PGame_end) | 0x0B00C700 [gTextureMenuModeTimeTrials](@ref gTextureMenuModeTimeTrials) | 0x0B00CA00 [gTextureMenuModeBattle_end](@ref gTextureMenuModeBattle_end) | 0x0B00CA00 [gTextureMenuModeMarioGP](@ref gTextureMenuModeMarioGP) | 0x0B00CE00 @@ -19678,36 +19678,36 @@ Variable Name | Memory Address [gTextureMenuModeVS_end](@ref gTextureMenuModeVS_end) | 0x0B00D500 [gTextureMenuLOption_end](@ref gTextureMenuLOption_end) | 0x0B00D800 [gTextureMenuRData](@ref gTextureMenuRData) | 0x0B00D800 -[gTextureMenuRData_end](@ref gTextureMenuRData_end) | 0x0B00DB00 [gTextureMenu50cc](@ref gTextureMenu50cc) | 0x0B00DB00 -[gTextureMenu50cc_end](@ref gTextureMenu50cc_end) | 0x0B00DD00 +[gTextureMenuRData_end](@ref gTextureMenuRData_end) | 0x0B00DB00 [gTextureMenu100cc](@ref gTextureMenu100cc) | 0x0B00DD00 -[gTextureMenu150cc](@ref gTextureMenu150cc) | 0x0B00DF00 +[gTextureMenu50cc_end](@ref gTextureMenu50cc_end) | 0x0B00DD00 [gTextureMenu100cc_end](@ref gTextureMenu100cc_end) | 0x0B00DF00 +[gTextureMenu150cc](@ref gTextureMenu150cc) | 0x0B00DF00 [gTextureMenuExtra](@ref gTextureMenuExtra) | 0x0B00E100 [gTextureMenu150cc_end](@ref gTextureMenu150cc_end) | 0x0B00E100 [gTextureMenuWithoutItem](@ref gTextureMenuWithoutItem) | 0x0B00E300 [gTextureMenuExtra_end](@ref gTextureMenuExtra_end) | 0x0B00E300 [gTextureMenuWithoutItem_end](@ref gTextureMenuWithoutItem_end) | 0x0B00E600 [gTextureMenuWithItem](@ref gTextureMenuWithItem) | 0x0B00E600 -[gTextureMenuWithItem_end](@ref gTextureMenuWithItem_end) | 0x0B00E900 [gTextureMenuBegin](@ref gTextureMenuBegin) | 0x0B00E900 +[gTextureMenuWithItem_end](@ref gTextureMenuWithItem_end) | 0x0B00E900 [gTextureMenuGhost](@ref gTextureMenuGhost) | 0x0B00EB00 [gTextureMenuBegin_end](@ref gTextureMenuBegin_end) | 0x0B00EB00 [gTextureMenuData](@ref gTextureMenuData) | 0x0B00ED00 [gTextureMenuGhost_end](@ref gTextureMenuGhost_end) | 0x0B00ED00 [gTextureMenuData_end](@ref gTextureMenuData_end) | 0x0B00EF00 [gTextureMenuOK](@ref gTextureMenuOK) | 0x0B00EF00 -[gTextureBackgroundBlueSky](@ref gTextureBackgroundBlueSky) | 0x0B00F100 [gTextureMenuOK_end](@ref gTextureMenuOK_end) | 0x0B00F100 +[gTextureBackgroundBlueSky](@ref gTextureBackgroundBlueSky) | 0x0B00F100 [gTextureBackgroundBlueSky_end](@ref gTextureBackgroundBlueSky_end) | 0x0B01BF00 [gTextureBackgroundSunset](@ref gTextureBackgroundSunset) | 0x0B01BF00 -[gTextureGreenGoldStripe](@ref gTextureGreenGoldStripe) | 0x0B025300 [gTextureBackgroundSunset_end](@ref gTextureBackgroundSunset_end) | 0x0B025300 -[gTextureGoldStripe](@ref gTextureGoldStripe) | 0x0B025F00 +[gTextureGreenGoldStripe](@ref gTextureGreenGoldStripe) | 0x0B025300 [gTextureGreenGoldStripe_end](@ref gTextureGreenGoldStripe_end) | 0x0B025F00 -[gTextureWhiteStripe](@ref gTextureWhiteStripe) | 0x0B026600 +[gTextureGoldStripe](@ref gTextureGoldStripe) | 0x0B025F00 [gTextureGoldStripe_end](@ref gTextureGoldStripe_end) | 0x0B026600 +[gTextureWhiteStripe](@ref gTextureWhiteStripe) | 0x0B026600 [gTexturePinkBar](@ref gTexturePinkBar) | 0x0B026700 [gTextureWhiteStripe_end](@ref gTextureWhiteStripe_end) | 0x0B026700 [gTexturePinkBar_end](@ref gTexturePinkBar_end) | 0x0B026C00 @@ -19802,64 +19802,64 @@ Variable Name | Memory Address [d_course_big_donut_packed](@ref d_course_big_donut_packed) | 0x0F001B84 [music_sequence_table_header](@ref music_sequence_table_header) | 0x0025FD00 [music_sequence_table](@ref music_sequence_table) | 0x0025FD04 -[music_sequence_table_end](@ref music_sequence_table_end) | 0x0025FE00 [seq_00](@ref seq_00) | 0x0025FE00 +[music_sequence_table_end](@ref music_sequence_table_end) | 0x0025FE00 [seq_01](@ref seq_01) | 0x00262630 [seq_00_end](@ref seq_00_end) | 0x00262630 -[seq_02](@ref seq_02) | 0x00264160 [seq_01_end](@ref seq_01_end) | 0x00264160 +[seq_02](@ref seq_02) | 0x00264160 [seq_02_end](@ref seq_02_end) | 0x00264EC0 [seq_03](@ref seq_03) | 0x00264EC0 [seq_03_end](@ref seq_03_end) | 0x002668D0 [seq_04](@ref seq_04) | 0x002668D0 -[seq_04_end](@ref seq_04_end) | 0x00268570 [seq_05](@ref seq_05) | 0x00268570 +[seq_04_end](@ref seq_04_end) | 0x00268570 [seq_05_end](@ref seq_05_end) | 0x0026A4E0 [seq_06](@ref seq_06) | 0x0026A4E0 -[seq_06_end](@ref seq_06_end) | 0x0026C3C0 [seq_07](@ref seq_07) | 0x0026C3C0 +[seq_06_end](@ref seq_06_end) | 0x0026C3C0 [seq_07_end](@ref seq_07_end) | 0x0026DA90 [seq_08](@ref seq_08) | 0x0026DA90 -[seq_08_end](@ref seq_08_end) | 0x0026FE60 [seq_09](@ref seq_09) | 0x0026FE60 +[seq_08_end](@ref seq_08_end) | 0x0026FE60 [seq_09_end](@ref seq_09_end) | 0x00271660 [seq_0A](@ref seq_0A) | 0x00271660 [seq_0B](@ref seq_0B) | 0x00273140 [seq_0A_end](@ref seq_0A_end) | 0x00273140 [seq_0C](@ref seq_0C) | 0x00273730 [seq_0B_end](@ref seq_0B_end) | 0x00273730 -[seq_0D](@ref seq_0D) | 0x00273B00 [seq_0C_end](@ref seq_0C_end) | 0x00273B00 -[seq_0D_end](@ref seq_0D_end) | 0x00273E60 +[seq_0D](@ref seq_0D) | 0x00273B00 [seq_0E](@ref seq_0E) | 0x00273E60 +[seq_0D_end](@ref seq_0D_end) | 0x00273E60 [seq_0E_end](@ref seq_0E_end) | 0x00274140 [seq_0F](@ref seq_0F) | 0x00274140 [seq_0F_end](@ref seq_0F_end) | 0x00274600 [seq_10](@ref seq_10) | 0x00274600 [seq_10_end](@ref seq_10_end) | 0x00275A10 [seq_11](@ref seq_11) | 0x00275A10 -[seq_11_end](@ref seq_11_end) | 0x002760F0 [seq_12](@ref seq_12) | 0x002760F0 -[seq_13](@ref seq_13) | 0x002793E0 +[seq_11_end](@ref seq_11_end) | 0x002760F0 [seq_12_end](@ref seq_12_end) | 0x002793E0 +[seq_13](@ref seq_13) | 0x002793E0 [seq_14](@ref seq_14) | 0x00279AA0 [seq_13_end](@ref seq_13_end) | 0x00279AA0 [seq_15](@ref seq_15) | 0x00279F50 [seq_14_end](@ref seq_14_end) | 0x00279F50 -[seq_15_end](@ref seq_15_end) | 0x0027B0B0 [seq_16](@ref seq_16) | 0x0027B0B0 -[seq_17](@ref seq_17) | 0x0027B3C0 +[seq_15_end](@ref seq_15_end) | 0x0027B0B0 [seq_16_end](@ref seq_16_end) | 0x0027B3C0 +[seq_17](@ref seq_17) | 0x0027B3C0 [seq_17_end](@ref seq_17_end) | 0x0027C670 [seq_18](@ref seq_18) | 0x0027C670 [seq_19](@ref seq_19) | 0x0027CC70 [seq_18_end](@ref seq_18_end) | 0x0027CC70 -[seq_1A](@ref seq_1A) | 0x0027E350 [seq_19_end](@ref seq_19_end) | 0x0027E350 -[seq_1A_end](@ref seq_1A_end) | 0x0027EE20 +[seq_1A](@ref seq_1A) | 0x0027E350 [seq_1B](@ref seq_1B) | 0x0027EE20 -[seq_1B_end](@ref seq_1B_end) | 0x0027FAA0 +[seq_1A_end](@ref seq_1A_end) | 0x0027EE20 [seq_1C](@ref seq_1C) | 0x0027FAA0 +[seq_1B_end](@ref seq_1B_end) | 0x0027FAA0 [seq_1D](@ref seq_1D) | 0x002821F0 [seq_1C_end](@ref seq_1C_end) | 0x002821F0 [seq_1D_end](@ref seq_1D_end) | 0x00282E70 diff --git a/tools/yaml/mk64.eu1.yaml b/tools/yaml/mk64.eu1.yaml index 53de2044b..6cd4e543a 100644 --- a/tools/yaml/mk64.eu1.yaml +++ b/tools/yaml/mk64.eu1.yaml @@ -66,7 +66,7 @@ segments: - [0x43D90, c, code_800431B0] - [0x58840, c, code_80057C60] - [0x6F5A0, c, code_8006E9C0] - - [0x72AE0, c, code_80071F00] + - [0x72AE0, c, update_objects] - [0x87A50, c, code_80086E70] - [0x8CDB0, c, effects] - [0x920A0, c, code_800914A0] diff --git a/tools/yaml/mk64.us.yaml b/tools/yaml/mk64.us.yaml index c51741873..8c8cc764c 100644 --- a/tools/yaml/mk64.us.yaml +++ b/tools/yaml/mk64.us.yaml @@ -65,7 +65,7 @@ segments: - [0x43DB0, c, code_800431B0] - [0x58860, c, code_80057C60] - [0x6F5C0, c, code_8006E9C0] - - [0x72B00, c, code_80071F00] + - [0x72B00, c, update_objects] - [0x87A70, c, code_80086E70] - [0x8CDD0, c, effects] - [0x920C0, c, code_800914A0] From 18e7c8939b202006e054f25924524447896f61f3 Mon Sep 17 00:00:00 2001 From: Tyler McGavran Date: Mon, 4 Mar 2024 11:26:36 -0500 Subject: [PATCH 02/10] Matches in code_80005FD0 (#580) Signed-off-by: Taggerung Co-authored-by: Taggerung --- .../code_80005FD0/func_80015C94.s | 419 ---- .../code_80005FD0/func_80016494.s | 528 ------ .../code_80005FD0/func_80016C3C.s | 290 --- .../code_80005FD0/func_80017054.s | 3 + .../code_80005FD0/func_800178F4.s | 422 ----- .../code_80005FD0/func_800180F0.s | 421 ---- .../code_80005FD0/func_800188F4.s | 590 ------ src/code_80005FD0.c | 1686 ++++++----------- src/code_80005FD0.h | 5 + tools/doxygen_syms.md | 26 - 10 files changed, 572 insertions(+), 3818 deletions(-) delete mode 100644 asm/non_matchings/code_80005FD0/func_80015C94.s delete mode 100644 asm/non_matchings/code_80005FD0/func_80016494.s delete mode 100644 asm/non_matchings/code_80005FD0/func_80016C3C.s delete mode 100644 asm/non_matchings/code_80005FD0/func_800178F4.s delete mode 100644 asm/non_matchings/code_80005FD0/func_800180F0.s delete mode 100644 asm/non_matchings/code_80005FD0/func_800188F4.s diff --git a/asm/non_matchings/code_80005FD0/func_80015C94.s b/asm/non_matchings/code_80005FD0/func_80015C94.s deleted file mode 100644 index a3d60d22e..000000000 --- a/asm/non_matchings/code_80005FD0/func_80015C94.s +++ /dev/null @@ -1,419 +0,0 @@ -.section .late_rodata - -glabel D_800ED230 -.double 3000.0 - -.section .text - -glabel func_80015C94 -/* 016894 80015C94 27BDFF48 */ addiu $sp, $sp, -0xb8 -/* 016898 80015C98 AFBF0034 */ sw $ra, 0x34($sp) -/* 01689C 80015C9C AFB20030 */ sw $s2, 0x30($sp) -/* 0168A0 80015CA0 AFB1002C */ sw $s1, 0x2c($sp) -/* 0168A4 80015CA4 AFB00028 */ sw $s0, 0x28($sp) -/* 0168A8 80015CA8 F7B40020 */ sdc1 $f20, 0x20($sp) -/* 0168AC 80015CAC AFA500BC */ sw $a1, 0xbc($sp) -/* 0168B0 80015CB0 AFA600C0 */ sw $a2, 0xc0($sp) -/* 0168B4 80015CB4 848300AE */ lh $v1, 0xae($a0) -/* 0168B8 80015CB8 3C018016 */ lui $at, %hi(D_80163238) # $at, 0x8016 -/* 0168BC 80015CBC 3C08800E */ lui $t0, %hi(gPlayerOne) -/* 0168C0 80015CC0 000370C0 */ sll $t6, $v1, 3 -/* 0168C4 80015CC4 AC233238 */ sw $v1, %lo(D_80163238)($at) -/* 0168C8 80015CC8 01C37023 */ subu $t6, $t6, $v1 -/* 0168CC 80015CCC 000E7100 */ sll $t6, $t6, 4 -/* 0168D0 80015CD0 3C098016 */ lui $t1, %hi(gPathIndexByPlayerId) # 0x8016 -/* 0168D4 80015CD4 8C860008 */ lw $a2, 8($a0) -/* 0168D8 80015CD8 C48E0004 */ lwc1 $f14, 4($a0) -/* 0168DC 80015CDC C48C0000 */ lwc1 $f12, ($a0) -/* 0168E0 80015CE0 01C37023 */ subu $t6, $t6, $v1 -/* 0168E4 80015CE4 00038840 */ sll $s1, $v1, 1 -/* 0168E8 80015CE8 8D08C4DC */ lw $t0, %lo(gPlayerOne)($t0) -/* 0168EC 80015CEC 000E7080 */ sll $t6, $t6, 2 -/* 0168F0 80015CF0 01314821 */ addu $t1, $t1, $s1 -/* 0168F4 80015CF4 952945B0 */ lhu $t1, %lo(gPathIndexByPlayerId)($t1) # 0x45b0($t1) -/* 0168F8 80015CF8 3C0F8016 */ lui $t7, %hi(gNearestWaypointByCameraId) # $t7, 0x8016 -/* 0168FC 80015CFC 01C37023 */ subu $t6, $t6, $v1 -/* 016900 80015D00 000E70C0 */ sll $t6, $t6, 3 -/* 016904 80015D04 25EF4668 */ addiu $t7, %lo(gNearestWaypointByCameraId) # addiu $t7, $t7, 0x4668 -/* 016908 80015D08 00071040 */ sll $v0, $a3, 1 -/* 01690C 80015D0C 00E09025 */ move $s2, $a3 -/* 016910 80015D10 004F2821 */ addu $a1, $v0, $t7 -/* 016914 80015D14 010E4021 */ addu $t0, $t0, $t6 -/* 016918 80015D18 00808025 */ move $s0, $a0 -/* 01691C 80015D1C AFA800A0 */ sw $t0, 0xa0($sp) -/* 016920 80015D20 84A70000 */ lh $a3, ($a1) -/* 016924 80015D24 AFA50058 */ sw $a1, 0x58($sp) -/* 016928 80015D28 AFA2005C */ sw $v0, 0x5c($sp) -/* 01692C 80015D2C AFA3009C */ sw $v1, 0x9c($sp) -/* 016930 80015D30 AFA90010 */ sw $t1, 0x10($sp) -/* 016934 80015D34 0C0034CF */ jal func_8000D33C -/* 016938 80015D38 AFA90068 */ sw $t1, 0x68($sp) -/* 01693C 80015D3C 8FAB0058 */ lw $t3, 0x58($sp) -/* 016940 80015D40 8FB80068 */ lw $t8, 0x68($sp) -/* 016944 80015D44 3C0C8016 */ lui $t4, %hi(gWaypointCountByPathIndex) # $t4, 0x8016 -/* 016948 80015D48 3C088016 */ lui $t0, %hi(gNearestWaypointByPlayerId) # 0x8016 -/* 01694C 80015D4C 258C45C8 */ addiu $t4, %lo(gWaypointCountByPathIndex) # addiu $t4, $t4, 0x45c8 -/* 016950 80015D50 A5620000 */ sh $v0, ($t3) -/* 016954 80015D54 0018C840 */ sll $t9, $t8, 1 -/* 016958 80015D58 01114021 */ addu $t0, $t0, $s1 -/* 01695C 80015D5C 032C5021 */ addu $t2, $t9, $t4 -/* 016960 80015D60 85084438 */ lh $t0, %lo(gNearestWaypointByPlayerId)($t0) # 0x4438($t0) -/* 016964 80015D64 954D0000 */ lhu $t5, ($t2) -/* 016968 80015D68 85690000 */ lh $t1, ($t3) -/* 01696C 80015D6C AFAA0054 */ sw $t2, 0x54($sp) -/* 016970 80015D70 24060032 */ li $a2, 50 -/* 016974 80015D74 2407000F */ li $a3, 15 -/* 016978 80015D78 3104FFFF */ andi $a0, $t0, 0xffff -/* 01697C 80015D7C AFAD0010 */ sw $t5, 0x10($sp) -/* 016980 80015D80 0C001EFE */ jal func_80007BF8 -/* 016984 80015D84 3125FFFF */ andi $a1, $t1, 0xffff -/* 016988 80015D88 1C400013 */ bgtz $v0, .L80015DD8 -/* 01698C 80015D8C 8FA3009C */ lw $v1, 0x9c($sp) -/* 016990 80015D90 8FAF005C */ lw $t7, 0x5c($sp) -/* 016994 80015D94 3C0E8016 */ lui $t6, %hi(D_80164688) # $t6, 0x8016 -/* 016998 80015D98 25CE4688 */ addiu $t6, %lo(D_80164688) # addiu $t6, $t6, 0x4688 -/* 01699C 80015D9C 00128880 */ sll $s1, $s2, 2 -/* 0169A0 80015DA0 3C068016 */ lui $a2, %hi(D_80164680) # 0x8016 -/* 0169A4 80015DA4 022E3821 */ addu $a3, $s1, $t6 -/* 0169A8 80015DA8 00CF3021 */ addu $a2, $a2, $t7 -/* 0169AC 80015DAC 84C64680 */ lh $a2, %lo(D_80164680)($a2) # 0x4680($a2) -/* 0169B0 80015DB0 8CE50000 */ lw $a1, ($a3) -/* 0169B4 80015DB4 AFA70050 */ sw $a3, 0x50($sp) -/* 0169B8 80015DB8 0C0068D2 */ jal func_8001A348 -/* 0169BC 80015DBC 02402025 */ move $a0, $s2 -/* 0169C0 80015DC0 8FA70050 */ lw $a3, 0x50($sp) -/* 0169C4 80015DC4 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 0169C8 80015DC8 44811800 */ mtc1 $at, $f3 -/* 0169CC 80015DCC 44801000 */ mtc1 $zero, $f2 -/* 0169D0 80015DD0 1000003C */ b .L80015EC4 -/* 0169D4 80015DD4 C4EC0000 */ lwc1 $f12, ($a3) -.L80015DD8: -/* 0169D8 80015DD8 3C01BFE0 */ li $at, 0xBFE00000 # -1.750000 -/* 0169DC 80015DDC 44811800 */ mtc1 $at, $f3 -/* 0169E0 80015DE0 3C018016 */ lui $at, %hi(D_80163068) -/* 0169E4 80015DE4 0003C080 */ sll $t8, $v1, 2 -/* 0169E8 80015DE8 00380821 */ addu $at, $at, $t8 -/* 0169EC 80015DEC C4243068 */ lwc1 $f4, %lo(D_80163068)($at) -/* 0169F0 80015DF0 44801000 */ mtc1 $zero, $f2 -/* 0169F4 80015DF4 46002021 */ cvt.d.s $f0, $f4 -/* 0169F8 80015DF8 4622003C */ c.lt.d $f0, $f2 -/* 0169FC 80015DFC 00000000 */ nop -/* 016A00 80015E00 45020017 */ bc1fl .L80015E60 -/* 016A04 80015E04 3C013FE0 */ lui $at, 0x3fe0 -/* 016A08 80015E08 3C198016 */ lui $t9, %hi(D_80164688) # $t9, 0x8016 -/* 016A0C 80015E0C 27394688 */ addiu $t9, %lo(D_80164688) # addiu $t9, $t9, 0x4688 -/* 016A10 80015E10 00128880 */ sll $s1, $s2, 2 -/* 016A14 80015E14 02393821 */ addu $a3, $s1, $t9 -/* 016A18 80015E18 C4E60000 */ lwc1 $f6, ($a3) -/* 016A1C 80015E1C 46003221 */ cvt.d.s $f8, $f6 -/* 016A20 80015E20 4622403C */ c.lt.d $f8, $f2 -/* 016A24 80015E24 00000000 */ nop -/* 016A28 80015E28 4502000D */ bc1fl .L80015E60 -/* 016A2C 80015E2C 3C013FE0 */ lui $at, 0x3fe0 -/* 016A30 80015E30 02402025 */ move $a0, $s2 -/* 016A34 80015E34 3C053F80 */ lui $a1, 0x3f80 -/* 016A38 80015E38 24060007 */ li $a2, 7 -/* 016A3C 80015E3C 0C0068D2 */ jal func_8001A348 -/* 016A40 80015E40 AFA70050 */ sw $a3, 0x50($sp) -/* 016A44 80015E44 8FA70050 */ lw $a3, 0x50($sp) -/* 016A48 80015E48 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 016A4C 80015E4C 44811800 */ mtc1 $at, $f3 -/* 016A50 80015E50 44801000 */ mtc1 $zero, $f2 -/* 016A54 80015E54 1000001B */ b .L80015EC4 -/* 016A58 80015E58 C4EC0000 */ lwc1 $f12, ($a3) -/* 016A5C 80015E5C 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -.L80015E60: -/* 016A60 80015E60 44811800 */ mtc1 $at, $f3 -/* 016A64 80015E64 44801000 */ mtc1 $zero, $f2 -/* 016A68 80015E68 3C0C8016 */ lui $t4, %hi(D_80164688) # $t4, 0x8016 -/* 016A6C 80015E6C 258C4688 */ addiu $t4, %lo(D_80164688) # addiu $t4, $t4, 0x4688 -/* 016A70 80015E70 4620103C */ c.lt.d $f2, $f0 -/* 016A74 80015E74 00128880 */ sll $s1, $s2, 2 -/* 016A78 80015E78 022C3821 */ addu $a3, $s1, $t4 -/* 016A7C 80015E7C C4EC0000 */ lwc1 $f12, ($a3) -/* 016A80 80015E80 45020011 */ bc1fl .L80015EC8 -/* 016A84 80015E84 8FAE0054 */ lw $t6, 0x54($sp) -/* 016A88 80015E88 460062A1 */ cvt.d.s $f10, $f12 -/* 016A8C 80015E8C 462A103C */ c.lt.d $f2, $f10 -/* 016A90 80015E90 00000000 */ nop -/* 016A94 80015E94 4502000C */ bc1fl .L80015EC8 -/* 016A98 80015E98 8FAE0054 */ lw $t6, 0x54($sp) -/* 016A9C 80015E9C 02402025 */ move $a0, $s2 -/* 016AA0 80015EA0 3C05BF80 */ lui $a1, 0xbf80 -/* 016AA4 80015EA4 24060006 */ li $a2, 6 -/* 016AA8 80015EA8 0C0068D2 */ jal func_8001A348 -/* 016AAC 80015EAC AFA70050 */ sw $a3, 0x50($sp) -/* 016AB0 80015EB0 8FA70050 */ lw $a3, 0x50($sp) -/* 016AB4 80015EB4 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 016AB8 80015EB8 44811800 */ mtc1 $at, $f3 -/* 016ABC 80015EBC 44801000 */ mtc1 $zero, $f2 -/* 016AC0 80015EC0 C4EC0000 */ lwc1 $f12, ($a3) -.L80015EC4: -/* 016AC4 80015EC4 8FAE0054 */ lw $t6, 0x54($sp) -.L80015EC8: -/* 016AC8 80015EC8 8FAD0058 */ lw $t5, 0x58($sp) -/* 016ACC 80015ECC 87A6006A */ lh $a2, 0x6a($sp) -/* 016AD0 80015ED0 95C30000 */ lhu $v1, ($t6) -/* 016AD4 80015ED4 85A20000 */ lh $v0, ($t5) -/* 016AD8 80015ED8 44056000 */ mfc1 $a1, $f12 -/* 016ADC 80015EDC AFA70050 */ sw $a3, 0x50($sp) -/* 016AE0 80015EE0 244F0001 */ addiu $t7, $v0, 1 -/* 016AE4 80015EE4 01E3001A */ div $zero, $t7, $v1 -/* 016AE8 80015EE8 244C0002 */ addiu $t4, $v0, 2 -/* 016AEC 80015EEC 00004010 */ mfhi $t0 -/* 016AF0 80015EF0 0008C400 */ sll $t8, $t0, 0x10 -/* 016AF4 80015EF4 14600002 */ bnez $v1, .L80015F00 -/* 016AF8 80015EF8 00000000 */ nop -/* 016AFC 80015EFC 0007000D */ break 7 -.L80015F00: -/* 016B00 80015F00 2401FFFF */ li $at, -1 -/* 016B04 80015F04 14610004 */ bne $v1, $at, .L80015F18 -/* 016B08 80015F08 3C018000 */ lui $at, 0x8000 -/* 016B0C 80015F0C 15E10002 */ bne $t7, $at, .L80015F18 -/* 016B10 80015F10 00000000 */ nop -/* 016B14 80015F14 0006000D */ break 6 -.L80015F18: -/* 016B18 80015F18 0183001A */ div $zero, $t4, $v1 -/* 016B1C 80015F1C 0018CC03 */ sra $t9, $t8, 0x10 -/* 016B20 80015F20 03204025 */ move $t0, $t9 -/* 016B24 80015F24 00006810 */ mfhi $t5 -/* 016B28 80015F28 A7AD0078 */ sh $t5, 0x78($sp) -/* 016B2C 80015F2C 14600002 */ bnez $v1, .L80015F38 -/* 016B30 80015F30 00000000 */ nop -/* 016B34 80015F34 0007000D */ break 7 -.L80015F38: -/* 016B38 80015F38 2401FFFF */ li $at, -1 -/* 016B3C 80015F3C 14610004 */ bne $v1, $at, .L80015F50 -/* 016B40 80015F40 3C018000 */ li $at, 0x80000000 # -0.000000 -/* 016B44 80015F44 15810002 */ bne $t4, $at, .L80015F50 -/* 016B48 80015F48 00000000 */ nop -/* 016B4C 80015F4C 0006000D */ break 6 -.L80015F50: -/* 016B50 80015F50 3104FFFF */ andi $a0, $t0, 0xffff -/* 016B54 80015F54 A7A8007A */ sh $t0, 0x7a($sp) -/* 016B58 80015F58 0C002EF6 */ jal func_8000BBD8 -/* 016B5C 80015F5C AFA60044 */ sw $a2, 0x44($sp) -/* 016B60 80015F60 3C038016 */ lui $v1, %hi(D_80162FA0) # $v1, 0x8016 -/* 016B64 80015F64 24632FA0 */ addiu $v1, %lo(D_80162FA0) # addiu $v1, $v1, 0x2fa0 -/* 016B68 80015F68 C4640000 */ lwc1 $f4, ($v1) -/* 016B6C 80015F6C 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 016B70 80015F70 44811800 */ mtc1 $at, $f3 -/* 016B74 80015F74 44801000 */ mtc1 $zero, $f2 -/* 016B78 80015F78 C46A0008 */ lwc1 $f10, 8($v1) -/* 016B7C 80015F7C 460021A1 */ cvt.d.s $f6, $f4 -/* 016B80 80015F80 8FA70050 */ lw $a3, 0x50($sp) -/* 016B84 80015F84 46223202 */ mul.d $f8, $f6, $f2 -/* 016B88 80015F88 46005121 */ cvt.d.s $f4, $f10 -/* 016B8C 80015F8C 8FA60044 */ lw $a2, 0x44($sp) -/* 016B90 80015F90 97A40078 */ lhu $a0, 0x78($sp) -/* 016B94 80015F94 46222182 */ mul.d $f6, $f4, $f2 -/* 016B98 80015F98 8CE50000 */ lw $a1, ($a3) -/* 016B9C 80015F9C 46204520 */ cvt.s.d $f20, $f8 -/* 016BA0 80015FA0 462034A0 */ cvt.s.d $f18, $f6 -/* 016BA4 80015FA4 0C002EF6 */ jal func_8000BBD8 -/* 016BA8 80015FA8 E7B20090 */ swc1 $f18, 0x90($sp) -/* 016BAC 80015FAC 3C038016 */ lui $v1, %hi(D_80162FA0) # $v1, 0x8016 -/* 016BB0 80015FB0 24632FA0 */ addiu $v1, %lo(D_80162FA0) # addiu $v1, $v1, 0x2fa0 -/* 016BB4 80015FB4 C46A0000 */ lwc1 $f10, ($v1) -/* 016BB8 80015FB8 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 016BBC 80015FBC 44811800 */ mtc1 $at, $f3 -/* 016BC0 80015FC0 44801000 */ mtc1 $zero, $f2 -/* 016BC4 80015FC4 46005121 */ cvt.d.s $f4, $f10 -/* 016BC8 80015FC8 4600A221 */ cvt.d.s $f8, $f20 -/* 016BCC 80015FCC 46222182 */ mul.d $f6, $f4, $f2 -/* 016BD0 80015FD0 8FAE0068 */ lw $t6, 0x68($sp) -/* 016BD4 80015FD4 3C028016 */ lui $v0, %hi(D_80164550) # 0x8016 -/* 016BD8 80015FD8 87B80078 */ lh $t8, 0x78($sp) -/* 016BDC 80015FDC 000E7880 */ sll $t7, $t6, 2 -/* 016BE0 80015FE0 004F1021 */ addu $v0, $v0, $t7 -/* 016BE4 80015FE4 8C424550 */ lw $v0, %lo(D_80164550)($v0) # 0x4550($v0) -/* 016BE8 80015FE8 87AE007A */ lh $t6, 0x7a($sp) -/* 016BEC 80015FEC 46264280 */ add.d $f10, $f8, $f6 -/* 016BF0 80015FF0 C4680008 */ lwc1 $f8, 8($v1) -/* 016BF4 80015FF4 0018C8C0 */ sll $t9, $t8, 3 -/* 016BF8 80015FF8 00596021 */ addu $t4, $v0, $t9 -/* 016BFC 80015FFC 460041A1 */ cvt.d.s $f6, $f8 -/* 016C00 80016000 46205520 */ cvt.s.d $f20, $f10 -/* 016C04 80016004 46223282 */ mul.d $f10, $f6, $f2 -/* 016C08 80016008 000E78C0 */ sll $t7, $t6, 3 -/* 016C0C 8001600C 004FC021 */ addu $t8, $v0, $t7 -/* 016C10 80016010 C7B20090 */ lwc1 $f18, 0x90($sp) -/* 016C14 80016014 87190002 */ lh $t9, 2($t8) -/* 016C18 80016018 858D0002 */ lh $t5, 2($t4) -/* 016C1C 8001601C 3C0E8016 */ lui $t6, %hi(D_801645F8) # $t6, 0x8016 -/* 016C20 80016020 46009121 */ cvt.d.s $f4, $f18 -/* 016C24 80016024 01B96021 */ addu $t4, $t5, $t9 -/* 016C28 80016028 448C3000 */ mtc1 $t4, $f6 -/* 016C2C 8001602C 462A2200 */ add.d $f8, $f4, $f10 -/* 016C30 80016030 44805000 */ mtc1 $zero, $f10 -/* 016C34 80016034 44815800 */ mtc1 $at, $f11 -/* 016C38 80016038 46803121 */ cvt.d.w $f4, $f6 -/* 016C3C 8001603C 25CE45F8 */ addiu $t6, %lo(D_801645F8) # addiu $t6, $t6, 0x45f8 -/* 016C40 80016040 022E3821 */ addu $a3, $s1, $t6 -/* 016C44 80016044 3C0F8016 */ lui $t7, %hi(D_80164618) # $t7, 0x8016 -/* 016C48 80016048 462044A0 */ cvt.s.d $f18, $f8 -/* 016C4C 8001604C 462A2202 */ mul.d $f8, $f4, $f10 -/* 016C50 80016050 C4E40000 */ lwc1 $f4, ($a3) -/* 016C54 80016054 25EF4618 */ addiu $t7, %lo(D_80164618) # addiu $t7, $t7, 0x4618 -/* 016C58 80016058 022F4021 */ addu $t0, $s1, $t7 -/* 016C5C 8001605C C50A0000 */ lwc1 $f10, ($t0) -/* 016C60 80016060 3C188016 */ lui $t8, %hi(D_80164638) # $t8, 0x8016 -/* 016C64 80016064 4604A381 */ sub.s $f14, $f20, $f4 -/* 016C68 80016068 27184638 */ addiu $t8, %lo(D_80164638) # addiu $t8, $t8, 0x4638 -/* 016C6C 8001606C 02384821 */ addu $t1, $s1, $t8 -/* 016C70 80016070 462041A0 */ cvt.s.d $f6, $f8 -/* 016C74 80016074 460E7102 */ mul.s $f4, $f14, $f14 -/* 016C78 80016078 C5280000 */ lwc1 $f8, ($t1) -/* 016C7C 8001607C AFA90054 */ sw $t1, 0x54($sp) -/* 016C80 80016080 E7A60094 */ swc1 $f6, 0x94($sp) -/* 016C84 80016084 E7AE008C */ swc1 $f14, 0x8c($sp) -/* 016C88 80016088 460A3401 */ sub.s $f16, $f6, $f10 -/* 016C8C 8001608C AFA80058 */ sw $t0, 0x58($sp) -/* 016C90 80016090 AFA7005C */ sw $a3, 0x5c($sp) -/* 016C94 80016094 46089001 */ sub.s $f0, $f18, $f8 -/* 016C98 80016098 46108182 */ mul.s $f6, $f16, $f16 -/* 016C9C 8001609C E7B00088 */ swc1 $f16, 0x88($sp) -/* 016CA0 800160A0 46000202 */ mul.s $f8, $f0, $f0 -/* 016CA4 800160A4 E7A00084 */ swc1 $f0, 0x84($sp) -/* 016CA8 800160A8 46062280 */ add.s $f10, $f4, $f6 -/* 016CAC 800160AC 0C033850 */ jal sqrtf -/* 016CB0 800160B0 46085300 */ add.s $f12, $f10, $f8 -/* 016CB4 800160B4 44802800 */ mtc1 $zero, $f5 -/* 016CB8 800160B8 44802000 */ mtc1 $zero, $f4 -/* 016CBC 800160BC 460001A1 */ cvt.d.s $f6, $f0 -/* 016CC0 800160C0 8FA7005C */ lw $a3, 0x5c($sp) -/* 016CC4 800160C4 46262032 */ c.eq.d $f4, $f6 -/* 016CC8 800160C8 8FA80058 */ lw $t0, 0x58($sp) -/* 016CCC 800160CC 8FA90054 */ lw $t1, 0x54($sp) -/* 016CD0 800160D0 C7AE008C */ lwc1 $f14, 0x8c($sp) -/* 016CD4 800160D4 45010013 */ bc1t .L80016124 -/* 016CD8 800160D8 C7B00088 */ lwc1 $f16, 0x88($sp) -/* 016CDC 800160DC 3C018016 */ lui $at, %hi(D_80164648) -/* 016CE0 800160E0 00310821 */ addu $at, $at, $s1 -/* 016CE4 800160E4 C4224648 */ lwc1 $f2, %lo(D_80164648)($at) -/* 016CE8 800160E8 C4E40000 */ lwc1 $f4, ($a3) -/* 016CEC 800160EC 460E1282 */ mul.s $f10, $f2, $f14 -/* 016CF0 800160F0 46005203 */ div.s $f8, $f10, $f0 -/* 016CF4 800160F4 46101182 */ mul.s $f6, $f2, $f16 -/* 016CF8 800160F8 46003283 */ div.s $f10, $f6, $f0 -/* 016CFC 800160FC C7A60084 */ lwc1 $f6, 0x84($sp) -/* 016D00 80016100 46044500 */ add.s $f20, $f8, $f4 -/* 016D04 80016104 C5080000 */ lwc1 $f8, ($t0) -/* 016D08 80016108 46085100 */ add.s $f4, $f10, $f8 -/* 016D0C 8001610C 46061282 */ mul.s $f10, $f2, $f6 -/* 016D10 80016110 E7A40094 */ swc1 $f4, 0x94($sp) -/* 016D14 80016114 C5240000 */ lwc1 $f4, ($t1) -/* 016D18 80016118 46005203 */ div.s $f8, $f10, $f0 -/* 016D1C 8001611C 10000005 */ b .L80016134 -/* 016D20 80016120 46044480 */ add.s $f18, $f8, $f4 -.L80016124: -/* 016D24 80016124 C5060000 */ lwc1 $f6, ($t0) -/* 016D28 80016128 C4F40000 */ lwc1 $f20, ($a3) -/* 016D2C 8001612C C5320000 */ lwc1 $f18, ($t1) -/* 016D30 80016130 E7A60094 */ swc1 $f6, 0x94($sp) -.L80016134: -/* 016D34 80016134 E6140000 */ swc1 $f20, ($s0) -/* 016D38 80016138 E6120008 */ swc1 $f18, 8($s0) -/* 016D3C 8001613C C7AA0094 */ lwc1 $f10, 0x94($sp) -/* 016D40 80016140 3C01403E */ li $at, 0x403E0000 # 2.968750 -/* 016D44 80016144 44814800 */ mtc1 $at, $f9 -/* 016D48 80016148 44804000 */ mtc1 $zero, $f8 -/* 016D4C 8001614C 46005421 */ cvt.d.s $f16, $f10 -/* 016D50 80016150 44069000 */ mfc1 $a2, $f18 -/* 016D54 80016154 46288100 */ add.d $f4, $f16, $f8 -/* 016D58 80016158 F7B00038 */ sdc1 $f16, 0x38($sp) -/* 016D5C 8001615C E7B20090 */ swc1 $f18, 0x90($sp) -/* 016D60 80016160 AFA90054 */ sw $t1, 0x54($sp) -/* 016D64 80016164 462023A0 */ cvt.s.d $f14, $f4 -/* 016D68 80016168 AFA80058 */ sw $t0, 0x58($sp) -/* 016D6C 8001616C AFA7005C */ sw $a3, 0x5c($sp) -/* 016D70 80016170 0C0AB870 */ jal func_802AE1C0 -/* 016D74 80016174 4600A306 */ mov.s $f12, $f20 -/* 016D78 80016178 3C014034 */ li $at, 0x40340000 # 2.812500 -/* 016D7C 8001617C D7B00038 */ ldc1 $f16, 0x38($sp) -/* 016D80 80016180 44813800 */ mtc1 $at, $f7 -/* 016D84 80016184 44803000 */ mtc1 $zero, $f6 -/* 016D88 80016188 460000A1 */ cvt.d.s $f2, $f0 -/* 016D8C 8001618C 8FA7005C */ lw $a3, 0x5c($sp) -/* 016D90 80016190 46268281 */ sub.d $f10, $f16, $f6 -/* 016D94 80016194 8FA80058 */ lw $t0, 0x58($sp) -/* 016D98 80016198 8FA90054 */ lw $t1, 0x54($sp) -/* 016D9C 8001619C C7B20090 */ lwc1 $f18, 0x90($sp) -/* 016DA0 800161A0 462A103C */ c.lt.d $f2, $f10 -/* 016DA4 800161A4 3C01800F */ lui $at, %hi(D_800ED230) -/* 016DA8 800161A8 45030008 */ bc1tl .L800161CC -/* 016DAC 800161AC 3C014024 */ li $at, 0x40240000 # 2.562500 -/* 016DB0 800161B0 D428D230 */ ldc1 $f8, %lo(D_800ED230)($at) -/* 016DB4 800161B4 3C014020 */ li $at, 0x40200000 # 2.500000 -/* 016DB8 800161B8 4622403E */ c.le.d $f8, $f2 -/* 016DBC 800161BC 00000000 */ nop -/* 016DC0 800161C0 4502000A */ bc1fl .L800161EC -/* 016DC4 800161C4 44814800 */ mtc1 $at, $f9 -/* 016DC8 800161C8 3C014024 */ li $at, 0x40240000 # 2.562500 -.L800161CC: -/* 016DCC 800161CC 44812800 */ mtc1 $at, $f5 -/* 016DD0 800161D0 44802000 */ mtc1 $zero, $f4 -/* 016DD4 800161D4 00000000 */ nop -/* 016DD8 800161D8 46248180 */ add.d $f6, $f16, $f4 -/* 016DDC 800161DC 462032A0 */ cvt.s.d $f10, $f6 -/* 016DE0 800161E0 10000007 */ b .L80016200 -/* 016DE4 800161E4 E60A0004 */ swc1 $f10, 4($s0) -/* 016DE8 800161E8 44814800 */ mtc1 $at, $f9 -.L800161EC: -/* 016DEC 800161EC 44804000 */ mtc1 $zero, $f8 -/* 016DF0 800161F0 00000000 */ nop -/* 016DF4 800161F4 46281100 */ add.d $f4, $f2, $f8 -/* 016DF8 800161F8 462021A0 */ cvt.s.d $f6, $f4 -/* 016DFC 800161FC E6060004 */ swc1 $f6, 4($s0) -.L80016200: -/* 016E00 80016200 C7AA0094 */ lwc1 $f10, 0x94($sp) -/* 016E04 80016204 8FA200A0 */ lw $v0, 0xa0($sp) -/* 016E08 80016208 E4F40000 */ swc1 $f20, ($a3) -/* 016E0C 8001620C E5320000 */ swc1 $f18, ($t1) -/* 016E10 80016210 E50A0000 */ swc1 $f10, ($t0) -/* 016E14 80016214 C4480014 */ lwc1 $f8, 0x14($v0) -/* 016E18 80016218 3C014018 */ li $at, 0x40180000 # 2.375000 -/* 016E1C 8001621C 44815800 */ mtc1 $at, $f11 -/* 016E20 80016220 E608000C */ swc1 $f8, 0xc($s0) -/* 016E24 80016224 C4440018 */ lwc1 $f4, 0x18($v0) -/* 016E28 80016228 44805000 */ mtc1 $zero, $f10 -/* 016E2C 8001622C 02402025 */ move $a0, $s2 -/* 016E30 80016230 460021A1 */ cvt.d.s $f6, $f4 -/* 016E34 80016234 462A3200 */ add.d $f8, $f6, $f10 -/* 016E38 80016238 46204120 */ cvt.s.d $f4, $f8 -/* 016E3C 8001623C E6040010 */ swc1 $f4, 0x10($s0) -/* 016E40 80016240 C446001C */ lwc1 $f6, 0x1c($v0) -/* 016E44 80016244 E6060014 */ swc1 $f6, 0x14($s0) -/* 016E48 80016248 0C00534C */ jal func_80014D30 -/* 016E4C 8001624C 8FA50068 */ lw $a1, 0x68($sp) -/* 016E50 80016250 C60A000C */ lwc1 $f10, 0xc($s0) -/* 016E54 80016254 C6080000 */ lwc1 $f8, ($s0) -/* 016E58 80016258 C6040010 */ lwc1 $f4, 0x10($s0) -/* 016E5C 8001625C C6060004 */ lwc1 $f6, 4($s0) -/* 016E60 80016260 46085501 */ sub.s $f20, $f10, $f8 -/* 016E64 80016264 46062281 */ sub.s $f10, $f4, $f6 -/* 016E68 80016268 4600A306 */ mov.s $f12, $f20 -/* 016E6C 8001626C E7AA00A8 */ swc1 $f10, 0xa8($sp) -/* 016E70 80016270 C6040008 */ lwc1 $f4, 8($s0) -/* 016E74 80016274 C6080014 */ lwc1 $f8, 0x14($s0) -/* 016E78 80016278 46044381 */ sub.s $f14, $f8, $f4 -/* 016E7C 8001627C 0C0ADE0C */ jal atan2s -/* 016E80 80016280 E7AE00A4 */ swc1 $f14, 0xa4($sp) -/* 016E84 80016284 4614A182 */ mul.s $f6, $f20, $f20 -/* 016E88 80016288 C7AE00A4 */ lwc1 $f14, 0xa4($sp) -/* 016E8C 8001628C A6020026 */ sh $v0, 0x26($s0) -/* 016E90 80016290 460E7282 */ mul.s $f10, $f14, $f14 -/* 016E94 80016294 0C033850 */ jal sqrtf -/* 016E98 80016298 460A3300 */ add.s $f12, $f6, $f10 -/* 016E9C 8001629C 46000306 */ mov.s $f12, $f0 -/* 016EA0 800162A0 0C0ADE0C */ jal atan2s -/* 016EA4 800162A4 C7AE00A8 */ lwc1 $f14, 0xa8($sp) -/* 016EA8 800162A8 A6020024 */ sh $v0, 0x24($s0) -/* 016EAC 800162AC A6000028 */ sh $zero, 0x28($s0) -/* 016EB0 800162B0 8FBF0034 */ lw $ra, 0x34($sp) -/* 016EB4 800162B4 8FB20030 */ lw $s2, 0x30($sp) -/* 016EB8 800162B8 8FB1002C */ lw $s1, 0x2c($sp) -/* 016EBC 800162BC 8FB00028 */ lw $s0, 0x28($sp) -/* 016EC0 800162C0 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 016EC4 800162C4 03E00008 */ jr $ra -/* 016EC8 800162C8 27BD00B8 */ addiu $sp, $sp, 0xb8 diff --git a/asm/non_matchings/code_80005FD0/func_80016494.s b/asm/non_matchings/code_80005FD0/func_80016494.s deleted file mode 100644 index 23404a819..000000000 --- a/asm/non_matchings/code_80005FD0/func_80016494.s +++ /dev/null @@ -1,528 +0,0 @@ -.section .late_rodata - -glabel D_800ED238 -.double 0.01 - -glabel D_800ED240 -.double 0.01 - -glabel D_800ED248 -.double 0.4 - -glabel D_800ED250 -.double 0.4 - -glabel D_800ED258 -.double 3000.0 - -.section .text - -glabel func_80016494 -/* 017094 80016494 27BDFF48 */ addiu $sp, $sp, -0xb8 -/* 017098 80016498 AFA500BC */ sw $a1, 0xbc($sp) -/* 01709C 8001649C 00072880 */ sll $a1, $a3, 2 -/* 0170A0 800164A0 3C0F8016 */ lui $t7, %hi(D_80164648) # $t7, 0x8016 -/* 0170A4 800164A4 3C188016 */ lui $t8, %hi(D_80164658) # $t8, 0x8016 -/* 0170A8 800164A8 27184658 */ addiu $t8, %lo(D_80164658) # addiu $t8, $t8, 0x4658 -/* 0170AC 800164AC 25EF4648 */ addiu $t7, %lo(D_80164648) # addiu $t7, $t7, 0x4648 -/* 0170B0 800164B0 00AF6821 */ addu $t5, $a1, $t7 -/* 0170B4 800164B4 00B86021 */ addu $t4, $a1, $t8 -/* 0170B8 800164B8 C5840000 */ lwc1 $f4, ($t4) -/* 0170BC 800164BC C5A20000 */ lwc1 $f2, ($t5) -/* 0170C0 800164C0 3C013F00 */ li $at, 0x3F000000 # 0.500000 -/* 0170C4 800164C4 44814000 */ mtc1 $at, $f8 -/* 0170C8 800164C8 46022181 */ sub.s $f6, $f4, $f2 -/* 0170CC 800164CC AFBF0024 */ sw $ra, 0x24($sp) -/* 0170D0 800164D0 AFB00020 */ sw $s0, 0x20($sp) -/* 0170D4 800164D4 AFA600C0 */ sw $a2, 0xc0($sp) -/* 0170D8 800164D8 46083282 */ mul.s $f10, $f6, $f8 -/* 0170DC 800164DC AFA700C4 */ sw $a3, 0xc4($sp) -/* 0170E0 800164E0 848300AE */ lh $v1, 0xae($a0) -/* 0170E4 800164E4 3C0A800E */ lui $t2, %hi(gPlayerOne) -/* 0170E8 800164E8 8D4AC4DC */ lw $t2, %lo(gPlayerOne)($t2) -/* 0170EC 800164EC 3C018016 */ lui $at, %hi(D_80163238) # $at, 0x8016 -/* 0170F0 800164F0 0003F8C0 */ sll $ra, $v1, 3 -/* 0170F4 800164F4 460A1100 */ add.s $f4, $f2, $f10 -/* 0170F8 800164F8 03E3F823 */ subu $ra, $ra, $v1 -/* 0170FC 800164FC 001FF900 */ sll $ra, $ra, 4 -/* 017100 80016500 03E3F823 */ subu $ra, $ra, $v1 -/* 017104 80016504 E5A40000 */ swc1 $f4, ($t5) -/* 017108 80016508 AC233238 */ sw $v1, %lo(D_80163238)($at) -/* 01710C 8001650C 8C860008 */ lw $a2, 8($a0) -/* 017110 80016510 C48E0004 */ lwc1 $f14, 4($a0) -/* 017114 80016514 C48C0000 */ lwc1 $f12, ($a0) -/* 017118 80016518 3C0B8016 */ lui $t3, %hi(gPathIndexByPlayerId) # 0x8016 -/* 01711C 8001651C 001FF880 */ sll $ra, $ra, 2 -/* 017120 80016520 00034040 */ sll $t0, $v1, 1 -/* 017124 80016524 01685821 */ addu $t3, $t3, $t0 -/* 017128 80016528 03E3F823 */ subu $ra, $ra, $v1 -/* 01712C 8001652C 956B45B0 */ lhu $t3, %lo(gPathIndexByPlayerId)($t3) # 0x45b0($t3) -/* 017130 80016530 001FF8C0 */ sll $ra, $ra, 3 -/* 017134 80016534 3C0E8016 */ lui $t6, %hi(gNearestWaypointByCameraId) # $t6, 0x8016 -/* 017138 80016538 25CE4668 */ addiu $t6, %lo(gNearestWaypointByCameraId) # addiu $t6, $t6, 0x4668 -/* 01713C 8001653C 00071040 */ sll $v0, $a3, 1 -/* 017140 80016540 004E4821 */ addu $t1, $v0, $t6 -/* 017144 80016544 AFBF004C */ sw $ra, 0x4c($sp) -/* 017148 80016548 015F5021 */ addu $t2, $t2, $ra -/* 01714C 8001654C 00808025 */ move $s0, $a0 -/* 017150 80016550 AFAA00A0 */ sw $t2, 0xa0($sp) -/* 017154 80016554 85270000 */ lh $a3, ($t1) -/* 017158 80016558 AFA90044 */ sw $t1, 0x44($sp) -/* 01715C 8001655C AFA20048 */ sw $v0, 0x48($sp) -/* 017160 80016560 AFA80050 */ sw $t0, 0x50($sp) -/* 017164 80016564 AFAD0058 */ sw $t5, 0x58($sp) -/* 017168 80016568 AFAC0054 */ sw $t4, 0x54($sp) -/* 01716C 8001656C AFA5005C */ sw $a1, 0x5c($sp) -/* 017170 80016570 AFA3009C */ sw $v1, 0x9c($sp) -/* 017174 80016574 AFAB0010 */ sw $t3, 0x10($sp) -/* 017178 80016578 0C0034CF */ jal func_8000D33C -/* 01717C 8001657C AFAB0068 */ sw $t3, 0x68($sp) -/* 017180 80016580 8FA3009C */ lw $v1, 0x9c($sp) -/* 017184 80016584 8FAF0044 */ lw $t7, 0x44($sp) -/* 017188 80016588 8FA80050 */ lw $t0, 0x50($sp) -/* 01718C 8001658C 3C198016 */ lui $t9, %hi(D_80163068) # $t9, 0x8016 -/* 017190 80016590 27393068 */ addiu $t9, %lo(D_80163068) # addiu $t9, $t9, 0x3068 -/* 017194 80016594 0003C080 */ sll $t8, $v1, 2 -/* 017198 80016598 A5E20000 */ sh $v0, ($t7) -/* 01719C 8001659C 8FAE005C */ lw $t6, 0x5c($sp) -/* 0171A0 800165A0 03194821 */ addu $t1, $t8, $t9 -/* 0171A4 800165A4 3C188016 */ lui $t8, %hi(D_80164688) # $t8, 0x8016 -/* 0171A8 800165A8 27184688 */ addiu $t8, %lo(D_80164688) # addiu $t8, $t8, 0x4688 -/* 0171AC 800165AC 01D86821 */ addu $t5, $t6, $t8 -/* 0171B0 800165B0 C5A80000 */ lwc1 $f8, ($t5) -/* 0171B4 800165B4 C5260000 */ lwc1 $f6, ($t1) -/* 0171B8 800165B8 8FB90068 */ lw $t9, 0x68($sp) -/* 0171BC 800165BC 3C188016 */ lui $t8, %hi(gWaypointCountByPathIndex) # $t8, 0x8016 -/* 0171C0 800165C0 46083081 */ sub.s $f2, $f6, $f8 -/* 0171C4 800165C4 85EB0000 */ lh $t3, ($t7) -/* 0171C8 800165C8 271845C8 */ addiu $t8, %lo(gWaypointCountByPathIndex) # addiu $t8, $t8, 0x45c8 -/* 0171CC 800165CC 00197040 */ sll $t6, $t9, 1 -/* 0171D0 800165D0 01D87821 */ addu $t7, $t6, $t8 -/* 0171D4 800165D4 46021082 */ mul.s $f2, $f2, $f2 -/* 0171D8 800165D8 AFAF0038 */ sw $t7, 0x38($sp) -/* 0171DC 800165DC 95F90000 */ lhu $t9, ($t7) -/* 0171E0 800165E0 3C0A8016 */ lui $t2, %hi(gNearestWaypointByPlayerId) # 0x8016 -/* 0171E4 800165E4 01485021 */ addu $t2, $t2, $t0 -/* 0171E8 800165E8 854A4438 */ lh $t2, %lo(gNearestWaypointByPlayerId)($t2) # 0x4438($t2) -/* 0171EC 800165EC AFAD003C */ sw $t5, 0x3c($sp) -/* 0171F0 800165F0 E7A20064 */ swc1 $f2, 0x64($sp) -/* 0171F4 800165F4 AFA90040 */ sw $t1, 0x40($sp) -/* 0171F8 800165F8 2406000F */ li $a2, 15 -/* 0171FC 800165FC 2407000F */ li $a3, 15 -/* 017200 80016600 A7AB00B6 */ sh $t3, 0xb6($sp) -/* 017204 80016604 3165FFFF */ andi $a1, $t3, 0xffff -/* 017208 80016608 AFB90010 */ sw $t9, 0x10($sp) -/* 01720C 8001660C 3144FFFF */ andi $a0, $t2, 0xffff -/* 017210 80016610 0C001EFE */ jal func_80007BF8 -/* 017214 80016614 A7AA00B4 */ sh $t2, 0xb4($sp) -/* 017218 80016618 8FA90040 */ lw $t1, 0x40($sp) -/* 01721C 8001661C 87AA00B4 */ lh $t2, 0xb4($sp) -/* 017220 80016620 87AB00B6 */ lh $t3, 0xb6($sp) -/* 017224 80016624 8FAC0054 */ lw $t4, 0x54($sp) -/* 017228 80016628 8FAD003C */ lw $t5, 0x3c($sp) -/* 01722C 8001662C 8FBF004C */ lw $ra, 0x4c($sp) -/* 017230 80016630 1C40000E */ bgtz $v0, .L8001666C -/* 017234 80016634 C7A20064 */ lwc1 $f2, 0x64($sp) -/* 017238 80016638 8FAE0048 */ lw $t6, 0x48($sp) -/* 01723C 8001663C 3C068016 */ lui $a2, %hi(D_80164680) # 0x8016 -/* 017240 80016640 8FA400C4 */ lw $a0, 0xc4($sp) -/* 017244 80016644 00CE3021 */ addu $a2, $a2, $t6 -/* 017248 80016648 84C64680 */ lh $a2, %lo(D_80164680)($a2) # 0x4680($a2) -/* 01724C 8001664C 8DA50000 */ lw $a1, ($t5) -/* 017250 80016650 0C0068D2 */ jal func_8001A348 -/* 017254 80016654 AFAD003C */ sw $t5, 0x3c($sp) -/* 017258 80016658 8FAD003C */ lw $t5, 0x3c($sp) -/* 01725C 8001665C 44807800 */ mtc1 $zero, $f15 -/* 017260 80016660 44807000 */ mtc1 $zero, $f14 -/* 017264 80016664 1000006D */ b .L8001681C -/* 017268 80016668 C5AC0000 */ lwc1 $f12, ($t5) -.L8001666C: -/* 01726C 8001666C C52A0000 */ lwc1 $f10, ($t1) -/* 017270 80016670 44807800 */ mtc1 $zero, $f15 -/* 017274 80016674 44807000 */ mtc1 $zero, $f14 -/* 017278 80016678 46005021 */ cvt.d.s $f0, $f10 -/* 01727C 8001667C 462E003C */ c.lt.d $f0, $f14 -/* 017280 80016680 00000000 */ nop -/* 017284 80016684 45020019 */ bc1fl .L800166EC -/* 017288 80016688 4620703C */ c.lt.d $f14, $f0 -/* 01728C 8001668C C5A40000 */ lwc1 $f4, ($t5) -/* 017290 80016690 3C01800F */ lui $at, %hi(D_800ED238) -/* 017294 80016694 460021A1 */ cvt.d.s $f6, $f4 -/* 017298 80016698 462E303C */ c.lt.d $f6, $f14 -/* 01729C 8001669C 00000000 */ nop -/* 0172A0 800166A0 45020012 */ bc1fl .L800166EC -/* 0172A4 800166A4 4620703C */ c.lt.d $f14, $f0 -/* 0172A8 800166A8 D42AD238 */ ldc1 $f10, %lo(D_800ED238)($at) -/* 0172AC 800166AC 46001221 */ cvt.d.s $f8, $f2 -/* 0172B0 800166B0 462A403C */ c.lt.d $f8, $f10 -/* 0172B4 800166B4 00000000 */ nop -/* 0172B8 800166B8 4502000C */ bc1fl .L800166EC -/* 0172BC 800166BC 4620703C */ c.lt.d $f14, $f0 -/* 0172C0 800166C0 8FA400C4 */ lw $a0, 0xc4($sp) -/* 0172C4 800166C4 3C053F80 */ lui $a1, 0x3f80 -/* 0172C8 800166C8 24060005 */ li $a2, 5 -/* 0172CC 800166CC 0C0068D2 */ jal func_8001A348 -/* 0172D0 800166D0 AFAD003C */ sw $t5, 0x3c($sp) -/* 0172D4 800166D4 8FAD003C */ lw $t5, 0x3c($sp) -/* 0172D8 800166D8 44807800 */ mtc1 $zero, $f15 -/* 0172DC 800166DC 44807000 */ mtc1 $zero, $f14 -/* 0172E0 800166E0 1000004E */ b .L8001681C -/* 0172E4 800166E4 C5AC0000 */ lwc1 $f12, ($t5) -/* 0172E8 800166E8 4620703C */ c.lt.d $f14, $f0 -.L800166EC: -/* 0172EC 800166EC C5AC0000 */ lwc1 $f12, ($t5) -/* 0172F0 800166F0 45020018 */ bc1fl .L80016754 -/* 0172F4 800166F4 016A082A */ slt $at, $t3, $t2 -/* 0172F8 800166F8 46006121 */ cvt.d.s $f4, $f12 -/* 0172FC 800166FC 3C01800F */ lui $at, %hi(D_800ED240) -/* 017300 80016700 4624703C */ c.lt.d $f14, $f4 -/* 017304 80016704 00000000 */ nop -/* 017308 80016708 45020012 */ bc1fl .L80016754 -/* 01730C 8001670C 016A082A */ slt $at, $t3, $t2 -/* 017310 80016710 D428D240 */ ldc1 $f8, %lo(D_800ED240)($at) -/* 017314 80016714 460011A1 */ cvt.d.s $f6, $f2 -/* 017318 80016718 4628303C */ c.lt.d $f6, $f8 -/* 01731C 8001671C 00000000 */ nop -/* 017320 80016720 4502000C */ bc1fl .L80016754 -/* 017324 80016724 016A082A */ slt $at, $t3, $t2 -/* 017328 80016728 8FA400C4 */ lw $a0, 0xc4($sp) -/* 01732C 8001672C 3C05BF80 */ lui $a1, 0xbf80 -/* 017330 80016730 24060004 */ li $a2, 4 -/* 017334 80016734 0C0068D2 */ jal func_8001A348 -/* 017338 80016738 AFAD003C */ sw $t5, 0x3c($sp) -/* 01733C 8001673C 8FAD003C */ lw $t5, 0x3c($sp) -/* 017340 80016740 44807800 */ mtc1 $zero, $f15 -/* 017344 80016744 44807000 */ mtc1 $zero, $f14 -/* 017348 80016748 10000034 */ b .L8001681C -/* 01734C 8001674C C5AC0000 */ lwc1 $f12, ($t5) -/* 017350 80016750 016A082A */ slt $at, $t3, $t2 -.L80016754: -/* 017354 80016754 1020000C */ beqz $at, .L80016788 -/* 017358 80016758 014BC023 */ subu $t8, $t2, $t3 -/* 01735C 8001675C 2B01000A */ slti $at, $t8, 0xa -/* 017360 80016760 10200009 */ beqz $at, .L80016788 -/* 017364 80016764 3C01800F */ lui $at, %hi(gPlayers+0x94) -/* 017368 80016768 003F0821 */ addu $at, $at, $ra -/* 01736C 8001676C C42A6A24 */ lwc1 $f10, %lo(gPlayers+0x94)($at) -/* 017370 80016770 3C01800F */ lui $at, %hi(D_800ED248) -/* 017374 80016774 D426D248 */ ldc1 $f6, %lo(D_800ED248)($at) -/* 017378 80016778 46005121 */ cvt.d.s $f4, $f10 -/* 01737C 8001677C 46262200 */ add.d $f8, $f4, $f6 -/* 017380 80016780 462042A0 */ cvt.s.d $f10, $f8 -/* 017384 80016784 E58A0000 */ swc1 $f10, ($t4) -.L80016788: -/* 017388 80016788 014B082A */ slt $at, $t2, $t3 -/* 01738C 8001678C 5020000E */ beql $at, $zero, .L800167C8 -/* 017390 80016790 C5860000 */ lwc1 $f6, ($t4) -/* 017394 80016794 016A7823 */ subu $t7, $t3, $t2 -/* 017398 80016798 29E1000A */ slti $at, $t7, 0xa -/* 01739C 8001679C 10200009 */ beqz $at, .L800167C4 -/* 0173A0 800167A0 3C01800F */ lui $at, %hi(gPlayers+0x94) -/* 0173A4 800167A4 003F0821 */ addu $at, $at, $ra -/* 0173A8 800167A8 C4246A24 */ lwc1 $f4, %lo(gPlayers+0x94)($at) -/* 0173AC 800167AC 3C01800F */ lui $at, %hi(D_800ED250) -/* 0173B0 800167B0 D428D250 */ ldc1 $f8, %lo(D_800ED250)($at) -/* 0173B4 800167B4 460021A1 */ cvt.d.s $f6, $f4 -/* 0173B8 800167B8 46283281 */ sub.d $f10, $f6, $f8 -/* 0173BC 800167BC 46205120 */ cvt.s.d $f4, $f10 -/* 0173C0 800167C0 E5840000 */ swc1 $f4, ($t4) -.L800167C4: -/* 0173C4 800167C4 C5860000 */ lwc1 $f6, ($t4) -.L800167C8: -/* 0173C8 800167C8 3C014024 */ li $at, 0x40240000 # 2.562500 -/* 0173CC 800167CC 44814800 */ mtc1 $at, $f9 -/* 0173D0 800167D0 44804000 */ mtc1 $zero, $f8 -/* 0173D4 800167D4 46003021 */ cvt.d.s $f0, $f6 -/* 0173D8 800167D8 4620403C */ c.lt.d $f8, $f0 -/* 0173DC 800167DC 00000000 */ nop -/* 0173E0 800167E0 45020008 */ bc1fl .L80016804 -/* 0173E4 800167E4 462E003C */ c.lt.d $f0, $f14 -/* 0173E8 800167E8 3C014120 */ li $at, 0x41200000 # 10.000000 -/* 0173EC 800167EC 44815000 */ mtc1 $at, $f10 -/* 0173F0 800167F0 00000000 */ nop -/* 0173F4 800167F4 E58A0000 */ swc1 $f10, ($t4) -/* 0173F8 800167F8 C5840000 */ lwc1 $f4, ($t4) -/* 0173FC 800167FC 46002021 */ cvt.d.s $f0, $f4 -/* 017400 80016800 462E003C */ c.lt.d $f0, $f14 -.L80016804: -/* 017404 80016804 00000000 */ nop -/* 017408 80016808 45020005 */ bc1fl .L80016820 -/* 01740C 8001680C 8FAE0038 */ lw $t6, 0x38($sp) -/* 017410 80016810 44803000 */ mtc1 $zero, $f6 -/* 017414 80016814 00000000 */ nop -/* 017418 80016818 E5860000 */ swc1 $f6, ($t4) -.L8001681C: -/* 01741C 8001681C 8FAE0038 */ lw $t6, 0x38($sp) -.L80016820: -/* 017420 80016820 8FB90044 */ lw $t9, 0x44($sp) -/* 017424 80016824 87A6006A */ lh $a2, 0x6a($sp) -/* 017428 80016828 95C30000 */ lhu $v1, ($t6) -/* 01742C 8001682C 87220000 */ lh $v0, ($t9) -/* 017430 80016830 44056000 */ mfc1 $a1, $f12 -/* 017434 80016834 AFAD003C */ sw $t5, 0x3c($sp) -/* 017438 80016838 24580001 */ addiu $t8, $v0, 1 -/* 01743C 8001683C 0303001A */ div $zero, $t8, $v1 -/* 017440 80016840 244E0002 */ addiu $t6, $v0, 2 -/* 017444 80016844 00003810 */ mfhi $a3 -/* 017448 80016848 00077C00 */ sll $t7, $a3, 0x10 -/* 01744C 8001684C 14600002 */ bnez $v1, .L80016858 -/* 017450 80016850 00000000 */ nop -/* 017454 80016854 0007000D */ break 7 -.L80016858: -/* 017458 80016858 2401FFFF */ li $at, -1 -/* 01745C 8001685C 14610004 */ bne $v1, $at, .L80016870 -/* 017460 80016860 3C018000 */ lui $at, 0x8000 -/* 017464 80016864 17010002 */ bne $t8, $at, .L80016870 -/* 017468 80016868 00000000 */ nop -/* 01746C 8001686C 0006000D */ break 6 -.L80016870: -/* 017470 80016870 01C3001A */ div $zero, $t6, $v1 -/* 017474 80016874 000FCC03 */ sra $t9, $t7, 0x10 -/* 017478 80016878 03203825 */ move $a3, $t9 -/* 01747C 8001687C 0000C010 */ mfhi $t8 -/* 017480 80016880 A7B80078 */ sh $t8, 0x78($sp) -/* 017484 80016884 14600002 */ bnez $v1, .L80016890 -/* 017488 80016888 00000000 */ nop -/* 01748C 8001688C 0007000D */ break 7 -.L80016890: -/* 017490 80016890 2401FFFF */ li $at, -1 -/* 017494 80016894 14610004 */ bne $v1, $at, .L800168A8 -/* 017498 80016898 3C018000 */ li $at, 0x80000000 # -0.000000 -/* 01749C 8001689C 15C10002 */ bne $t6, $at, .L800168A8 -/* 0174A0 800168A0 00000000 */ nop -/* 0174A4 800168A4 0006000D */ break 6 -.L800168A8: -/* 0174A8 800168A8 30E4FFFF */ andi $a0, $a3, 0xffff -/* 0174AC 800168AC A7A7007A */ sh $a3, 0x7a($sp) -/* 0174B0 800168B0 0C002EF6 */ jal func_8000BBD8 -/* 0174B4 800168B4 AFA60054 */ sw $a2, 0x54($sp) -/* 0174B8 800168B8 3C038016 */ lui $v1, %hi(D_80162FA0) # $v1, 0x8016 -/* 0174BC 800168BC 24632FA0 */ addiu $v1, %lo(D_80162FA0) # addiu $v1, $v1, 0x2fa0 -/* 0174C0 800168C0 C4680000 */ lwc1 $f8, ($v1) -/* 0174C4 800168C4 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 0174C8 800168C8 44810800 */ mtc1 $at, $f1 -/* 0174CC 800168CC 44800000 */ mtc1 $zero, $f0 -/* 0174D0 800168D0 460042A1 */ cvt.d.s $f10, $f8 -/* 0174D4 800168D4 C4680008 */ lwc1 $f8, 8($v1) -/* 0174D8 800168D8 46205102 */ mul.d $f4, $f10, $f0 -/* 0174DC 800168DC 8FAD003C */ lw $t5, 0x3c($sp) -/* 0174E0 800168E0 460042A1 */ cvt.d.s $f10, $f8 -/* 0174E4 800168E4 8FA60054 */ lw $a2, 0x54($sp) -/* 0174E8 800168E8 97A40078 */ lhu $a0, 0x78($sp) -/* 0174EC 800168EC 8DA50000 */ lw $a1, ($t5) -/* 0174F0 800168F0 462021A0 */ cvt.s.d $f6, $f4 -/* 0174F4 800168F4 46205102 */ mul.d $f4, $f10, $f0 -/* 0174F8 800168F8 E7A60098 */ swc1 $f6, 0x98($sp) -/* 0174FC 800168FC 462024A0 */ cvt.s.d $f18, $f4 -/* 017500 80016900 0C002EF6 */ jal func_8000BBD8 -/* 017504 80016904 E7B20090 */ swc1 $f18, 0x90($sp) -/* 017508 80016908 3C038016 */ lui $v1, %hi(D_80162FA0) # $v1, 0x8016 -/* 01750C 8001690C 24632FA0 */ addiu $v1, %lo(D_80162FA0) # addiu $v1, $v1, 0x2fa0 -/* 017510 80016910 C46A0000 */ lwc1 $f10, ($v1) -/* 017514 80016914 C7A60098 */ lwc1 $f6, 0x98($sp) -/* 017518 80016918 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 01751C 8001691C 44810800 */ mtc1 $at, $f1 -/* 017520 80016920 44800000 */ mtc1 $zero, $f0 -/* 017524 80016924 46005121 */ cvt.d.s $f4, $f10 -/* 017528 80016928 46003221 */ cvt.d.s $f8, $f6 -/* 01752C 8001692C 46202182 */ mul.d $f6, $f4, $f0 -/* 017530 80016930 8FAF0068 */ lw $t7, 0x68($sp) -/* 017534 80016934 87AE0078 */ lh $t6, 0x78($sp) -/* 017538 80016938 3C028016 */ lui $v0, %hi(D_80164550) # 0x8016 -/* 01753C 8001693C 000FC880 */ sll $t9, $t7, 2 -/* 017540 80016940 00591021 */ addu $v0, $v0, $t9 -/* 017544 80016944 8C424550 */ lw $v0, %lo(D_80164550)($v0) # 0x4550($v0) -/* 017548 80016948 000EC0C0 */ sll $t8, $t6, 3 -/* 01754C 8001694C 46264280 */ add.d $f10, $f8, $f6 -/* 017550 80016950 C4660008 */ lwc1 $f6, 8($v1) -/* 017554 80016954 87AE007A */ lh $t6, 0x7a($sp) -/* 017558 80016958 00587821 */ addu $t7, $v0, $t8 -/* 01755C 8001695C 46205120 */ cvt.s.d $f4, $f10 -/* 017560 80016960 C7B20090 */ lwc1 $f18, 0x90($sp) -/* 017564 80016964 000EC0C0 */ sll $t8, $t6, 3 -/* 017568 80016968 460032A1 */ cvt.d.s $f10, $f6 -/* 01756C 8001696C E7A40098 */ swc1 $f4, 0x98($sp) -/* 017570 80016970 46205182 */ mul.d $f6, $f10, $f0 -/* 017574 80016974 85F90002 */ lh $t9, 2($t7) -/* 017578 80016978 00587821 */ addu $t7, $v0, $t8 -/* 01757C 8001697C 85EE0002 */ lh $t6, 2($t7) -/* 017580 80016980 46009221 */ cvt.d.s $f8, $f18 -/* 017584 80016984 8FA4005C */ lw $a0, 0x5c($sp) -/* 017588 80016988 032EC021 */ addu $t8, $t9, $t6 -/* 01758C 8001698C 3C0F8016 */ lui $t7, %hi(D_801645F8) # $t7, 0x8016 -/* 017590 80016990 46264280 */ add.d $f10, $f8, $f6 -/* 017594 80016994 44984000 */ mtc1 $t8, $f8 -/* 017598 80016998 25EF45F8 */ addiu $t7, %lo(D_801645F8) # addiu $t7, $t7, 0x45f8 -/* 01759C 8001699C 008F3821 */ addu $a3, $a0, $t7 -/* 0175A0 800169A0 468041A1 */ cvt.d.w $f6, $f8 -/* 0175A4 800169A4 3C198016 */ lui $t9, %hi(D_80164618) # $t9, 0x8016 -/* 0175A8 800169A8 27394618 */ addiu $t9, %lo(D_80164618) # addiu $t9, $t9, 0x4618 -/* 0175AC 800169AC 00994021 */ addu $t0, $a0, $t9 -/* 0175B0 800169B0 462054A0 */ cvt.s.d $f18, $f10 -/* 0175B4 800169B4 44805000 */ mtc1 $zero, $f10 -/* 0175B8 800169B8 44815800 */ mtc1 $at, $f11 -/* 0175BC 800169BC 3C0E8016 */ lui $t6, %hi(D_80164638) # $t6, 0x8016 -/* 0175C0 800169C0 25CE4638 */ addiu $t6, %lo(D_80164638) # addiu $t6, $t6, 0x4638 -/* 0175C4 800169C4 462A3202 */ mul.d $f8, $f6, $f10 -/* 0175C8 800169C8 C4EA0000 */ lwc1 $f10, ($a3) -/* 0175CC 800169CC 008E4821 */ addu $t1, $a0, $t6 -/* 0175D0 800169D0 AFA9004C */ sw $t1, 0x4c($sp) -/* 0175D4 800169D4 AFA80050 */ sw $t0, 0x50($sp) -/* 0175D8 800169D8 AFA70054 */ sw $a3, 0x54($sp) -/* 0175DC 800169DC 460A2381 */ sub.s $f14, $f4, $f10 -/* 0175E0 800169E0 C5240000 */ lwc1 $f4, ($t1) -/* 0175E4 800169E4 462041A0 */ cvt.s.d $f6, $f8 -/* 0175E8 800169E8 C5080000 */ lwc1 $f8, ($t0) -/* 0175EC 800169EC 460E7282 */ mul.s $f10, $f14, $f14 -/* 0175F0 800169F0 46049081 */ sub.s $f2, $f18, $f4 -/* 0175F4 800169F4 E7A60094 */ swc1 $f6, 0x94($sp) -/* 0175F8 800169F8 E7AE008C */ swc1 $f14, 0x8c($sp) -/* 0175FC 800169FC 46083401 */ sub.s $f16, $f6, $f8 -/* 017600 80016A00 E7A20084 */ swc1 $f2, 0x84($sp) -/* 017604 80016A04 46108182 */ mul.s $f6, $f16, $f16 -/* 017608 80016A08 E7B00088 */ swc1 $f16, 0x88($sp) -/* 01760C 80016A0C 46021102 */ mul.s $f4, $f2, $f2 -/* 017610 80016A10 46065200 */ add.s $f8, $f10, $f6 -/* 017614 80016A14 0C033850 */ jal sqrtf -/* 017618 80016A18 46044300 */ add.s $f12, $f8, $f4 -/* 01761C 80016A1C 44805800 */ mtc1 $zero, $f11 -/* 017620 80016A20 44805000 */ mtc1 $zero, $f10 -/* 017624 80016A24 460001A1 */ cvt.d.s $f6, $f0 -/* 017628 80016A28 8FA70054 */ lw $a3, 0x54($sp) -/* 01762C 80016A2C 46265032 */ c.eq.d $f10, $f6 -/* 017630 80016A30 8FA80050 */ lw $t0, 0x50($sp) -/* 017634 80016A34 8FA9004C */ lw $t1, 0x4c($sp) -/* 017638 80016A38 C7AE008C */ lwc1 $f14, 0x8c($sp) -/* 01763C 80016A3C 45010013 */ bc1t .L80016A8C -/* 017640 80016A40 C7B00088 */ lwc1 $f16, 0x88($sp) -/* 017644 80016A44 8FB80058 */ lw $t8, 0x58($sp) -/* 017648 80016A48 C4EA0000 */ lwc1 $f10, ($a3) -/* 01764C 80016A4C C7020000 */ lwc1 $f2, ($t8) -/* 017650 80016A50 460E1202 */ mul.s $f8, $f2, $f14 -/* 017654 80016A54 46004103 */ div.s $f4, $f8, $f0 -/* 017658 80016A58 46101182 */ mul.s $f6, $f2, $f16 -/* 01765C 80016A5C 46003203 */ div.s $f8, $f6, $f0 -/* 017660 80016A60 C7A60084 */ lwc1 $f6, 0x84($sp) -/* 017664 80016A64 460A2300 */ add.s $f12, $f4, $f10 -/* 017668 80016A68 C5040000 */ lwc1 $f4, ($t0) -/* 01766C 80016A6C E7AC0098 */ swc1 $f12, 0x98($sp) -/* 017670 80016A70 46044280 */ add.s $f10, $f8, $f4 -/* 017674 80016A74 46061202 */ mul.s $f8, $f2, $f6 -/* 017678 80016A78 E7AA0094 */ swc1 $f10, 0x94($sp) -/* 01767C 80016A7C C52A0000 */ lwc1 $f10, ($t1) -/* 017680 80016A80 46004103 */ div.s $f4, $f8, $f0 -/* 017684 80016A84 10000006 */ b .L80016AA0 -/* 017688 80016A88 460A2480 */ add.s $f18, $f4, $f10 -.L80016A8C: -/* 01768C 80016A8C C4E60000 */ lwc1 $f6, ($a3) -/* 017690 80016A90 C5080000 */ lwc1 $f8, ($t0) -/* 017694 80016A94 C5320000 */ lwc1 $f18, ($t1) -/* 017698 80016A98 E7A60098 */ swc1 $f6, 0x98($sp) -/* 01769C 80016A9C E7A80094 */ swc1 $f8, 0x94($sp) -.L80016AA0: -/* 0176A0 80016AA0 C7AC0098 */ lwc1 $f12, 0x98($sp) -/* 0176A4 80016AA4 E6120008 */ swc1 $f18, 8($s0) -/* 0176A8 80016AA8 3C01403E */ li $at, 0x403E0000 # 2.968750 -/* 0176AC 80016AAC E60C0000 */ swc1 $f12, ($s0) -/* 0176B0 80016AB0 C7A40094 */ lwc1 $f4, 0x94($sp) -/* 0176B4 80016AB4 44815800 */ mtc1 $at, $f11 -/* 0176B8 80016AB8 44805000 */ mtc1 $zero, $f10 -/* 0176BC 80016ABC 46002421 */ cvt.d.s $f16, $f4 -/* 0176C0 80016AC0 44069000 */ mfc1 $a2, $f18 -/* 0176C4 80016AC4 462A8180 */ add.d $f6, $f16, $f10 -/* 0176C8 80016AC8 F7B00028 */ sdc1 $f16, 0x28($sp) -/* 0176CC 80016ACC E7B20090 */ swc1 $f18, 0x90($sp) -/* 0176D0 80016AD0 AFA9004C */ sw $t1, 0x4c($sp) -/* 0176D4 80016AD4 462033A0 */ cvt.s.d $f14, $f6 -/* 0176D8 80016AD8 AFA80050 */ sw $t0, 0x50($sp) -/* 0176DC 80016ADC 0C0AB870 */ jal func_802AE1C0 -/* 0176E0 80016AE0 AFA70054 */ sw $a3, 0x54($sp) -/* 0176E4 80016AE4 3C014034 */ li $at, 0x40340000 # 2.812500 -/* 0176E8 80016AE8 D7B00028 */ ldc1 $f16, 0x28($sp) -/* 0176EC 80016AEC 44814800 */ mtc1 $at, $f9 -/* 0176F0 80016AF0 44804000 */ mtc1 $zero, $f8 -/* 0176F4 80016AF4 460000A1 */ cvt.d.s $f2, $f0 -/* 0176F8 80016AF8 8FA70054 */ lw $a3, 0x54($sp) -/* 0176FC 80016AFC 46288101 */ sub.d $f4, $f16, $f8 -/* 017700 80016B00 8FA80050 */ lw $t0, 0x50($sp) -/* 017704 80016B04 8FA9004C */ lw $t1, 0x4c($sp) -/* 017708 80016B08 C7B20090 */ lwc1 $f18, 0x90($sp) -/* 01770C 80016B0C 4624103C */ c.lt.d $f2, $f4 -/* 017710 80016B10 3C01800F */ lui $at, %hi(D_800ED258) -/* 017714 80016B14 45030008 */ bc1tl .L80016B38 -/* 017718 80016B18 3C014024 */ li $at, 0x40240000 # 2.562500 -/* 01771C 80016B1C D42AD258 */ ldc1 $f10, %lo(D_800ED258)($at) -/* 017720 80016B20 3C014024 */ li $at, 0x40240000 # 2.562500 -/* 017724 80016B24 4622503E */ c.le.d $f10, $f2 -/* 017728 80016B28 00000000 */ nop -/* 01772C 80016B2C 4502000A */ bc1fl .L80016B58 -/* 017730 80016B30 44815800 */ mtc1 $at, $f11 -/* 017734 80016B34 3C014024 */ li $at, 0x40240000 # 2.562500 -.L80016B38: -/* 017738 80016B38 44813800 */ mtc1 $at, $f7 -/* 01773C 80016B3C 44803000 */ mtc1 $zero, $f6 -/* 017740 80016B40 00000000 */ nop -/* 017744 80016B44 46268200 */ add.d $f8, $f16, $f6 -/* 017748 80016B48 46204120 */ cvt.s.d $f4, $f8 -/* 01774C 80016B4C 10000007 */ b .L80016B6C -/* 017750 80016B50 E6040004 */ swc1 $f4, 4($s0) -/* 017754 80016B54 44815800 */ mtc1 $at, $f11 -.L80016B58: -/* 017758 80016B58 44805000 */ mtc1 $zero, $f10 -/* 01775C 80016B5C 00000000 */ nop -/* 017760 80016B60 462A1180 */ add.d $f6, $f2, $f10 -/* 017764 80016B64 46203220 */ cvt.s.d $f8, $f6 -/* 017768 80016B68 E6080004 */ swc1 $f8, 4($s0) -.L80016B6C: -/* 01776C 80016B6C C7A40098 */ lwc1 $f4, 0x98($sp) -/* 017770 80016B70 C7AA0094 */ lwc1 $f10, 0x94($sp) -/* 017774 80016B74 8FA200A0 */ lw $v0, 0xa0($sp) -/* 017778 80016B78 E5320000 */ swc1 $f18, ($t1) -/* 01777C 80016B7C E4E40000 */ swc1 $f4, ($a3) -/* 017780 80016B80 E50A0000 */ swc1 $f10, ($t0) -/* 017784 80016B84 C4460014 */ lwc1 $f6, 0x14($v0) -/* 017788 80016B88 3C014018 */ li $at, 0x40180000 # 2.375000 -/* 01778C 80016B8C 44815800 */ mtc1 $at, $f11 -/* 017790 80016B90 E606000C */ swc1 $f6, 0xc($s0) -/* 017794 80016B94 C4480018 */ lwc1 $f8, 0x18($v0) -/* 017798 80016B98 44805000 */ mtc1 $zero, $f10 -/* 01779C 80016B9C 46004121 */ cvt.d.s $f4, $f8 -/* 0177A0 80016BA0 462A2180 */ add.d $f6, $f4, $f10 -/* 0177A4 80016BA4 46203220 */ cvt.s.d $f8, $f6 -/* 0177A8 80016BA8 E6080010 */ swc1 $f8, 0x10($s0) -/* 0177AC 80016BAC C444001C */ lwc1 $f4, 0x1c($v0) -/* 0177B0 80016BB0 E6040014 */ swc1 $f4, 0x14($s0) -/* 0177B4 80016BB4 8FA50068 */ lw $a1, 0x68($sp) -/* 0177B8 80016BB8 0C00534C */ jal func_80014D30 -/* 0177BC 80016BBC 8FA400C4 */ lw $a0, 0xc4($sp) -/* 0177C0 80016BC0 C60A000C */ lwc1 $f10, 0xc($s0) -/* 0177C4 80016BC4 C6060000 */ lwc1 $f6, ($s0) -/* 0177C8 80016BC8 C6080010 */ lwc1 $f8, 0x10($s0) -/* 0177CC 80016BCC C6040004 */ lwc1 $f4, 4($s0) -/* 0177D0 80016BD0 46065301 */ sub.s $f12, $f10, $f6 -/* 0177D4 80016BD4 46044281 */ sub.s $f10, $f8, $f4 -/* 0177D8 80016BD8 E7AA00A8 */ swc1 $f10, 0xa8($sp) -/* 0177DC 80016BDC C6080008 */ lwc1 $f8, 8($s0) -/* 0177E0 80016BE0 C6060014 */ lwc1 $f6, 0x14($s0) -/* 0177E4 80016BE4 E7AC00AC */ swc1 $f12, 0xac($sp) -/* 0177E8 80016BE8 46083381 */ sub.s $f14, $f6, $f8 -/* 0177EC 80016BEC 0C0ADE0C */ jal atan2s -/* 0177F0 80016BF0 E7AE00A4 */ swc1 $f14, 0xa4($sp) -/* 0177F4 80016BF4 C7A000AC */ lwc1 $f0, 0xac($sp) -/* 0177F8 80016BF8 C7AE00A4 */ lwc1 $f14, 0xa4($sp) -/* 0177FC 80016BFC A6020026 */ sh $v0, 0x26($s0) -/* 017800 80016C00 46000102 */ mul.s $f4, $f0, $f0 -/* 017804 80016C04 00000000 */ nop -/* 017808 80016C08 460E7282 */ mul.s $f10, $f14, $f14 -/* 01780C 80016C0C 0C033850 */ jal sqrtf -/* 017810 80016C10 460A2300 */ add.s $f12, $f4, $f10 -/* 017814 80016C14 46000306 */ mov.s $f12, $f0 -/* 017818 80016C18 0C0ADE0C */ jal atan2s -/* 01781C 80016C1C C7AE00A8 */ lwc1 $f14, 0xa8($sp) -/* 017820 80016C20 A6020024 */ sh $v0, 0x24($s0) -/* 017824 80016C24 A6000028 */ sh $zero, 0x28($s0) -/* 017828 80016C28 8FBF0024 */ lw $ra, 0x24($sp) -/* 01782C 80016C2C 8FB00020 */ lw $s0, 0x20($sp) -/* 017830 80016C30 27BD00B8 */ addiu $sp, $sp, 0xb8 -/* 017834 80016C34 03E00008 */ jr $ra -/* 017838 80016C38 00000000 */ nop diff --git a/asm/non_matchings/code_80005FD0/func_80016C3C.s b/asm/non_matchings/code_80005FD0/func_80016C3C.s deleted file mode 100644 index a3ed541e3..000000000 --- a/asm/non_matchings/code_80005FD0/func_80016C3C.s +++ /dev/null @@ -1,290 +0,0 @@ -.section .late_rodata - -glabel D_800ED260 -.float 0.1 - -glabel D_800ED264 -.float -0.1 - -glabel D_800ED268 -.float 16.666666031 -.word 0x00000000 - -.section .text - -glabel func_80016C3C -/* 01783C 80016C3C 27BDFF98 */ addiu $sp, $sp, -0x68 -/* 017840 80016C40 AFBF0024 */ sw $ra, 0x24($sp) -/* 017844 80016C44 AFA40068 */ sw $a0, 0x68($sp) -/* 017848 80016C48 AFB20020 */ sw $s2, 0x20($sp) -/* 01784C 80016C4C AFB1001C */ sw $s1, 0x1c($sp) -/* 017850 80016C50 AFB00018 */ sw $s0, 0x18($sp) -/* 017854 80016C54 AFA5006C */ sw $a1, 0x6c($sp) -/* 017858 80016C58 AFA60070 */ sw $a2, 0x70($sp) -/* 01785C 80016C5C 0C0ADF8D */ jal random_int -/* 017860 80016C60 24040064 */ li $a0, 100 -/* 017864 80016C64 28410032 */ slti $at, $v0, 0x32 -/* 017868 80016C68 1020000B */ beqz $at, .L80016C98 -/* 01786C 80016C6C 3C0C8016 */ lui $t4, %hi(D_80163DD8) # $t4, 0x8016 -/* 017870 80016C70 8FA70070 */ lw $a3, 0x70($sp) -/* 017874 80016C74 3C0F8016 */ lui $t7, %hi(D_80164688) # $t7, 0x8016 -/* 017878 80016C78 3C01800F */ lui $at, %hi(D_800ED260) # $at, 0x800f -/* 01787C 80016C7C C424D260 */ lwc1 $f4, %lo(D_800ED260)($at) -/* 017880 80016C80 25EF4688 */ addiu $t7, %lo(D_80164688) # addiu $t7, $t7, 0x4688 -/* 017884 80016C84 00077080 */ sll $t6, $a3, 2 -/* 017888 80016C88 01CF9021 */ addu $s2, $t6, $t7 -/* 01788C 80016C8C 01C03825 */ move $a3, $t6 -/* 017890 80016C90 1000000A */ b .L80016CBC -/* 017894 80016C94 E6440000 */ swc1 $f4, ($s2) -.L80016C98: -/* 017898 80016C98 8FA70070 */ lw $a3, 0x70($sp) -/* 01789C 80016C9C 3C01800F */ lui $at, %hi(D_800ED264) # $at, 0x800f -/* 0178A0 80016CA0 C426D264 */ lwc1 $f6, %lo(D_800ED264)($at) -/* 0178A4 80016CA4 3C198016 */ lui $t9, %hi(D_80164688) # $t9, 0x8016 -/* 0178A8 80016CA8 27394688 */ addiu $t9, %lo(D_80164688) # addiu $t9, $t9, 0x4688 -/* 0178AC 80016CAC 0007C080 */ sll $t8, $a3, 2 -/* 0178B0 80016CB0 03199021 */ addu $s2, $t8, $t9 -/* 0178B4 80016CB4 03003825 */ move $a3, $t8 -/* 0178B8 80016CB8 E6460000 */ swc1 $f6, ($s2) -.L80016CBC: -/* 0178BC 80016CBC 258C3DD8 */ addiu $t4, %lo(D_80163DD8) # addiu $t4, $t4, 0x3dd8 -/* 0178C0 80016CC0 00EC1821 */ addu $v1, $a3, $t4 -/* 0178C4 80016CC4 AC600000 */ sw $zero, ($v1) -/* 0178C8 80016CC8 3C0D800E */ lui $t5, %hi(gCurrentCourseId) -/* 0178CC 80016CCC 85ADC5A0 */ lh $t5, %lo(gCurrentCourseId)($t5) -/* 0178D0 80016CD0 24010004 */ li $at, 4 -/* 0178D4 80016CD4 55A1000B */ bnel $t5, $at, .L80016D04 -/* 0178D8 80016CD8 8C6E0000 */ lw $t6, ($v1) -/* 0178DC 80016CDC 24040004 */ li $a0, 4 -/* 0178E0 80016CE0 AFA30034 */ sw $v1, 0x34($sp) -/* 0178E4 80016CE4 0C0ADF8D */ jal random_int -/* 0178E8 80016CE8 AFA7003C */ sw $a3, 0x3c($sp) -/* 0178EC 80016CEC 8FA30034 */ lw $v1, 0x34($sp) -/* 0178F0 80016CF0 44804000 */ mtc1 $zero, $f8 -/* 0178F4 80016CF4 8FA7003C */ lw $a3, 0x3c($sp) -/* 0178F8 80016CF8 AC620000 */ sw $v0, ($v1) -/* 0178FC 80016CFC E6480000 */ swc1 $f8, ($s2) -/* 017900 80016D00 8C6E0000 */ lw $t6, ($v1) -.L80016D04: -/* 017904 80016D04 8FB80070 */ lw $t8, 0x70($sp) -/* 017908 80016D08 3C0C8016 */ lui $t4, %hi(gNearestWaypointByCameraId) # $t4, 0x8016 -/* 01790C 80016D0C 3C108016 */ lui $s0, %hi(gWaypointCountByPathIndex) # 0x8016 -/* 017910 80016D10 258C4668 */ addiu $t4, %lo(gNearestWaypointByCameraId) # addiu $t4, $t4, 0x4668 -/* 017914 80016D14 000E7840 */ sll $t7, $t6, 1 -/* 017918 80016D18 0018C840 */ sll $t9, $t8, 1 -/* 01791C 80016D1C 020F8021 */ addu $s0, $s0, $t7 -/* 017920 80016D20 032C8821 */ addu $s1, $t9, $t4 -/* 017924 80016D24 961045C8 */ lhu $s0, %lo(gWaypointCountByPathIndex)($s0) # 0x45c8($s0) -/* 017928 80016D28 862D0000 */ lh $t5, ($s1) -/* 01792C 80016D2C 8E450000 */ lw $a1, ($s2) -/* 017930 80016D30 00003025 */ move $a2, $zero -/* 017934 80016D34 01B0001A */ div $zero, $t5, $s0 -/* 017938 80016D38 00007010 */ mfhi $t6 -/* 01793C 80016D3C A62E0000 */ sh $t6, ($s1) -/* 017940 80016D40 16000002 */ bnez $s0, .L80016D4C -/* 017944 80016D44 00000000 */ nop -/* 017948 80016D48 0007000D */ break 7 -.L80016D4C: -/* 01794C 80016D4C 2401FFFF */ li $at, -1 -/* 017950 80016D50 16010004 */ bne $s0, $at, .L80016D64 -/* 017954 80016D54 3C018000 */ lui $at, 0x8000 -/* 017958 80016D58 15A10002 */ bne $t5, $at, .L80016D64 -/* 01795C 80016D5C 00000000 */ nop -/* 017960 80016D60 0006000D */ break 6 -.L80016D64: -/* 017964 80016D64 31C4FFFF */ andi $a0, $t6, 0xffff -/* 017968 80016D68 0C002EF6 */ jal func_8000BBD8 -/* 01796C 80016D6C AFA7003C */ sw $a3, 0x3c($sp) -/* 017970 80016D70 8FA7003C */ lw $a3, 0x3c($sp) -/* 017974 80016D74 86230000 */ lh $v1, ($s1) -/* 017978 80016D78 3C188016 */ lui $t8, %hi(D_80164618) # $t8, 0x8016 -/* 01797C 80016D7C 27184618 */ addiu $t8, %lo(D_80164618) # addiu $t8, $t8, 0x4618 -/* 017980 80016D80 00F85021 */ addu $t2, $a3, $t8 -/* 017984 80016D84 2478000A */ addiu $t8, $v1, 0xa -/* 017988 80016D88 0310001A */ div $zero, $t8, $s0 -/* 01798C 80016D8C 3C088016 */ lui $t0, %hi(D_80162FA0) # $t0, 0x8016 -/* 017990 80016D90 25082FA0 */ addiu $t0, %lo(D_80162FA0) # addiu $t0, $t0, 0x2fa0 -/* 017994 80016D94 C50A0000 */ lwc1 $f10, ($t0) -/* 017998 80016D98 3C0F8016 */ lui $t7, %hi(D_801645F8) # $t7, 0x8016 -/* 01799C 80016D9C 25EF45F8 */ addiu $t7, %lo(D_801645F8) # addiu $t7, $t7, 0x45f8 -/* 0179A0 80016DA0 00EF1021 */ addu $v0, $a3, $t7 -/* 0179A4 80016DA4 3C198016 */ lui $t9, %hi(D_80164550) # $t9, 0x8016 -/* 0179A8 80016DA8 E44A0000 */ swc1 $f10, ($v0) -/* 0179AC 80016DAC 8F394550 */ lw $t9, %lo(D_80164550)($t9) -/* 0179B0 80016DB0 000360C0 */ sll $t4, $v1, 3 -/* 0179B4 80016DB4 00004810 */ mfhi $t1 -/* 0179B8 80016DB8 032C6821 */ addu $t5, $t9, $t4 -/* 0179BC 80016DBC 85AE0002 */ lh $t6, 2($t5) -/* 0179C0 80016DC0 246D000B */ addiu $t5, $v1, 0xb -/* 0179C4 80016DC4 01B0001A */ div $zero, $t5, $s0 -/* 0179C8 80016DC8 448E8000 */ mtc1 $t6, $f16 -/* 0179CC 80016DCC C5040008 */ lwc1 $f4, 8($t0) -/* 0179D0 80016DD0 3C0F8016 */ lui $t7, %hi(D_80164638) # $t7, 0x8016 -/* 0179D4 80016DD4 468084A0 */ cvt.s.w $f18, $f16 -/* 0179D8 80016DD8 25EF4638 */ addiu $t7, %lo(D_80164638) # addiu $t7, $t7, 0x4638 -/* 0179DC 80016DDC 00EF5821 */ addu $t3, $a3, $t7 -/* 0179E0 80016DE0 3C01800F */ lui $at, %hi(D_800ED268) # $at, 0x800f -/* 0179E4 80016DE4 E5640000 */ swc1 $f4, ($t3) -/* 0179E8 80016DE8 44804000 */ mtc1 $zero, $f8 -/* 0179EC 80016DEC E5520000 */ swc1 $f18, ($t2) -/* 0179F0 80016DF0 C426D268 */ lwc1 $f6, %lo(D_800ED268)($at) -/* 0179F4 80016DF4 3C018016 */ lui $at, %hi(D_80164658) -/* 0179F8 80016DF8 00270821 */ addu $at, $at, $a3 -/* 0179FC 80016DFC E4264658 */ swc1 $f6, %lo(D_80164658)($at) -/* 017A00 80016E00 3C018016 */ lui $at, %hi(D_80164648) -/* 017A04 80016E04 00270821 */ addu $at, $at, $a3 -/* 017A08 80016E08 E4284648 */ swc1 $f8, %lo(D_80164648)($at) -/* 017A0C 80016E0C 16000002 */ bnez $s0, .L80016E18 -/* 017A10 80016E10 00000000 */ nop -/* 017A14 80016E14 0007000D */ break 7 -.L80016E18: -/* 017A18 80016E18 2401FFFF */ li $at, -1 -/* 017A1C 80016E1C 16010004 */ bne $s0, $at, .L80016E30 -/* 017A20 80016E20 3C018000 */ lui $at, 0x8000 -/* 017A24 80016E24 17010002 */ bne $t8, $at, .L80016E30 -/* 017A28 80016E28 00000000 */ nop -/* 017A2C 80016E2C 0006000D */ break 6 -.L80016E30: -/* 017A30 80016E30 0009CC00 */ sll $t9, $t1, 0x10 -/* 017A34 80016E34 00196403 */ sra $t4, $t9, 0x10 -/* 017A38 80016E38 01804825 */ move $t1, $t4 -/* 017A3C 80016E3C 16000002 */ bnez $s0, .L80016E48 -/* 017A40 80016E40 00000000 */ nop -/* 017A44 80016E44 0007000D */ break 7 -.L80016E48: -/* 017A48 80016E48 2401FFFF */ li $at, -1 -/* 017A4C 80016E4C 16010004 */ bne $s0, $at, .L80016E60 -/* 017A50 80016E50 3C018000 */ lui $at, 0x8000 -/* 017A54 80016E54 15A10002 */ bne $t5, $at, .L80016E60 -/* 017A58 80016E58 00000000 */ nop -/* 017A5C 80016E5C 0006000D */ break 6 -.L80016E60: -/* 017A60 80016E60 00007010 */ mfhi $t6 -/* 017A64 80016E64 A7AE0044 */ sh $t6, 0x44($sp) -/* 017A68 80016E68 3124FFFF */ andi $a0, $t1, 0xffff -/* 017A6C 80016E6C 8E450000 */ lw $a1, ($s2) -/* 017A70 80016E70 AFAB0028 */ sw $t3, 0x28($sp) -/* 017A74 80016E74 AFAA002C */ sw $t2, 0x2c($sp) -/* 017A78 80016E78 AFA20034 */ sw $v0, 0x34($sp) -/* 017A7C 80016E7C 0C002EF6 */ jal func_8000BBD8 -/* 017A80 80016E80 00003025 */ move $a2, $zero -/* 017A84 80016E84 3C088016 */ lui $t0, %hi(D_80162FA0) # $t0, 0x8016 -/* 017A88 80016E88 25082FA0 */ addiu $t0, %lo(D_80162FA0) # addiu $t0, $t0, 0x2fa0 -/* 017A8C 80016E8C C50A0000 */ lwc1 $f10, ($t0) -/* 017A90 80016E90 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 017A94 80016E94 44810800 */ mtc1 $at, $f1 -/* 017A98 80016E98 44800000 */ mtc1 $zero, $f0 -/* 017A9C 80016E9C C5040008 */ lwc1 $f4, 8($t0) -/* 017AA0 80016EA0 46005421 */ cvt.d.s $f16, $f10 -/* 017AA4 80016EA4 97A40044 */ lhu $a0, 0x44($sp) -/* 017AA8 80016EA8 46208482 */ mul.d $f18, $f16, $f0 -/* 017AAC 80016EAC 460021A1 */ cvt.d.s $f6, $f4 -/* 017AB0 80016EB0 8E450000 */ lw $a1, ($s2) -/* 017AB4 80016EB4 00003025 */ move $a2, $zero -/* 017AB8 80016EB8 46203202 */ mul.d $f8, $f6, $f0 -/* 017ABC 80016EBC 462090A0 */ cvt.s.d $f2, $f18 -/* 017AC0 80016EC0 46204320 */ cvt.s.d $f12, $f8 -/* 017AC4 80016EC4 E7A2005C */ swc1 $f2, 0x5c($sp) -/* 017AC8 80016EC8 0C002EF6 */ jal func_8000BBD8 -/* 017ACC 80016ECC E7AC0054 */ swc1 $f12, 0x54($sp) -/* 017AD0 80016ED0 86230000 */ lh $v1, ($s1) -/* 017AD4 80016ED4 3C088016 */ lui $t0, %hi(D_80162FA0) # $t0, 0x8016 -/* 017AD8 80016ED8 25082FA0 */ addiu $t0, %lo(D_80162FA0) # addiu $t0, $t0, 0x2fa0 -/* 017ADC 80016EDC 246F0005 */ addiu $t7, $v1, 5 -/* 017AE0 80016EE0 01F0001A */ div $zero, $t7, $s0 -/* 017AE4 80016EE4 00004810 */ mfhi $t1 -/* 017AE8 80016EE8 246C0006 */ addiu $t4, $v1, 6 -/* 017AEC 80016EEC C5100000 */ lwc1 $f16, ($t0) -/* 017AF0 80016EF0 0190001A */ div $zero, $t4, $s0 -/* 017AF4 80016EF4 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 017AF8 80016EF8 44810800 */ mtc1 $at, $f1 -/* 017AFC 80016EFC 44800000 */ mtc1 $zero, $f0 -/* 017B00 80016F00 460084A1 */ cvt.d.s $f18, $f16 -/* 017B04 80016F04 00002010 */ mfhi $a0 -/* 017B08 80016F08 46209102 */ mul.d $f4, $f18, $f0 -/* 017B0C 80016F0C C7A2005C */ lwc1 $f2, 0x5c($sp) -/* 017B10 80016F10 0009C400 */ sll $t8, $t1, 0x10 -/* 017B14 80016F14 00046C00 */ sll $t5, $a0, 0x10 -/* 017B18 80016F18 0018CC03 */ sra $t9, $t8, 0x10 -/* 017B1C 80016F1C 000D7403 */ sra $t6, $t5, 0x10 -/* 017B20 80016F20 03204825 */ move $t1, $t9 -/* 017B24 80016F24 460012A1 */ cvt.d.s $f10, $f2 -/* 017B28 80016F28 000EC0C0 */ sll $t8, $t6, 3 -/* 017B2C 80016F2C 01C02025 */ move $a0, $t6 -/* 017B30 80016F30 000968C0 */ sll $t5, $t1, 3 -/* 017B34 80016F34 46245180 */ add.d $f6, $f10, $f4 -/* 017B38 80016F38 C5100008 */ lwc1 $f16, 8($t0) -/* 017B3C 80016F3C C7AC0054 */ lwc1 $f12, 0x54($sp) -/* 017B40 80016F40 462030A0 */ cvt.s.d $f2, $f6 -/* 017B44 80016F44 460084A1 */ cvt.d.s $f18, $f16 -/* 017B48 80016F48 46006221 */ cvt.d.s $f8, $f12 -/* 017B4C 80016F4C 46209282 */ mul.d $f10, $f18, $f0 -/* 017B50 80016F50 462A4100 */ add.d $f4, $f8, $f10 -/* 017B54 80016F54 44805000 */ mtc1 $zero, $f10 -/* 017B58 80016F58 46202320 */ cvt.s.d $f12, $f4 -/* 017B5C 80016F5C 16000002 */ bnez $s0, .L80016F68 -/* 017B60 80016F60 00000000 */ nop -/* 017B64 80016F64 0007000D */ break 7 -.L80016F68: -/* 017B68 80016F68 2401FFFF */ li $at, -1 -/* 017B6C 80016F6C 16010004 */ bne $s0, $at, .L80016F80 -/* 017B70 80016F70 3C018000 */ lui $at, 0x8000 -/* 017B74 80016F74 15E10002 */ bne $t7, $at, .L80016F80 -/* 017B78 80016F78 00000000 */ nop -/* 017B7C 80016F7C 0006000D */ break 6 -.L80016F80: -/* 017B80 80016F80 3C0F8016 */ lui $t7, %hi(D_80164550) # $t7, 0x8016 -/* 017B84 80016F84 8DEF4550 */ lw $t7, %lo(D_80164550)($t7) -/* 017B88 80016F88 16000002 */ bnez $s0, .L80016F94 -/* 017B8C 80016F8C 00000000 */ nop -/* 017B90 80016F90 0007000D */ break 7 -.L80016F94: -/* 017B94 80016F94 2401FFFF */ li $at, -1 -/* 017B98 80016F98 16010004 */ bne $s0, $at, .L80016FAC -/* 017B9C 80016F9C 3C018000 */ lui $at, 0x8000 -/* 017BA0 80016FA0 15810002 */ bne $t4, $at, .L80016FAC -/* 017BA4 80016FA4 00000000 */ nop -/* 017BA8 80016FA8 0006000D */ break 6 -.L80016FAC: -/* 017BAC 80016FAC 01F8C821 */ addu $t9, $t7, $t8 -/* 017BB0 80016FB0 01ED7021 */ addu $t6, $t7, $t5 -/* 017BB4 80016FB4 85D80002 */ lh $t8, 2($t6) -/* 017BB8 80016FB8 872C0002 */ lh $t4, 2($t9) -/* 017BBC 80016FBC 3C013F00 */ li $at, 0x3F000000 # 0.500000 -/* 017BC0 80016FC0 44819000 */ mtc1 $at, $f18 -/* 017BC4 80016FC4 0198C821 */ addu $t9, $t4, $t8 -/* 017BC8 80016FC8 44993000 */ mtc1 $t9, $f6 -/* 017BCC 80016FCC 3C014020 */ li $at, 0x40200000 # 2.500000 -/* 017BD0 80016FD0 8FAF0070 */ lw $t7, 0x70($sp) -/* 017BD4 80016FD4 46803420 */ cvt.s.w $f16, $f6 -/* 017BD8 80016FD8 44815800 */ mtc1 $at, $f11 -/* 017BDC 80016FDC 000F6880 */ sll $t5, $t7, 2 -/* 017BE0 80016FE0 01AF6823 */ subu $t5, $t5, $t7 -/* 017BE4 80016FE4 000D68C0 */ sll $t5, $t5, 3 -/* 017BE8 80016FE8 3C0E8016 */ lui $t6, %hi(cameras) # $t6, 0x8016 -/* 017BEC 80016FEC 46128382 */ mul.s $f14, $f16, $f18 -/* 017BF0 80016FF0 01AF6823 */ subu $t5, $t5, $t7 -/* 017BF4 80016FF4 000D68C0 */ sll $t5, $t5, 3 -/* 017BF8 80016FF8 25CE46F0 */ addiu $t6, %lo(cameras) # addiu $t6, $t6, 0x46f0 -/* 017BFC 80016FFC 01AE1021 */ addu $v0, $t5, $t6 -/* 017C00 80017000 E442000C */ swc1 $f2, 0xc($v0) -/* 017C04 80017004 E44C0014 */ swc1 $f12, 0x14($v0) -/* 017C08 80017008 46007221 */ cvt.d.s $f8, $f14 -/* 017C0C 8001700C 462A4100 */ add.d $f4, $f8, $f10 -/* 017C10 80017010 462021A0 */ cvt.s.d $f6, $f4 -/* 017C14 80017014 E4460010 */ swc1 $f6, 0x10($v0) -/* 017C18 80017018 8FAC0034 */ lw $t4, 0x34($sp) -/* 017C1C 8001701C C5900000 */ lwc1 $f16, ($t4) -/* 017C20 80017020 E4500000 */ swc1 $f16, ($v0) -/* 017C24 80017024 8FB8002C */ lw $t8, 0x2c($sp) -/* 017C28 80017028 C7120000 */ lwc1 $f18, ($t8) -/* 017C2C 8001702C E4520004 */ swc1 $f18, 4($v0) -/* 017C30 80017030 8FB90028 */ lw $t9, 0x28($sp) -/* 017C34 80017034 C7280000 */ lwc1 $f8, ($t9) -/* 017C38 80017038 E4480008 */ swc1 $f8, 8($v0) -/* 017C3C 8001703C 8FBF0024 */ lw $ra, 0x24($sp) -/* 017C40 80017040 8FB20020 */ lw $s2, 0x20($sp) -/* 017C44 80017044 8FB1001C */ lw $s1, 0x1c($sp) -/* 017C48 80017048 8FB00018 */ lw $s0, 0x18($sp) -/* 017C4C 8001704C 03E00008 */ jr $ra -/* 017C50 80017050 27BD0068 */ addiu $sp, $sp, 0x68 diff --git a/asm/non_matchings/code_80005FD0/func_80017054.s b/asm/non_matchings/code_80005FD0/func_80017054.s index 4befbf325..de71136a5 100644 --- a/asm/non_matchings/code_80005FD0/func_80017054.s +++ b/asm/non_matchings/code_80005FD0/func_80017054.s @@ -6,6 +6,9 @@ glabel D_800ED270 glabel D_800ED278 .double 10000.0 +glabel D_800ED280 +.double 10000.0 + .section .text glabel func_80017054 diff --git a/asm/non_matchings/code_80005FD0/func_800178F4.s b/asm/non_matchings/code_80005FD0/func_800178F4.s deleted file mode 100644 index d8420ea69..000000000 --- a/asm/non_matchings/code_80005FD0/func_800178F4.s +++ /dev/null @@ -1,422 +0,0 @@ -.section .late_rodata - -# This one doesn't appear to be used in anywhere? -glabel D_800ED280 -.double 10000.0 - -glabel D_800ED288 -.double 0.1 - -glabel D_800ED290 -.double 0.1 - -.section .text - -glabel func_800178F4 -/* 0184F4 800178F4 27BDFF60 */ addiu $sp, $sp, -0xa0 -/* 0184F8 800178F8 AFBF0024 */ sw $ra, 0x24($sp) -/* 0184FC 800178FC AFB00020 */ sw $s0, 0x20($sp) -/* 018500 80017900 AFA500A4 */ sw $a1, 0xa4($sp) -/* 018504 80017904 AFA600A8 */ sw $a2, 0xa8($sp) -/* 018508 80017908 AFA700AC */ sw $a3, 0xac($sp) -/* 01850C 8001790C 848200AE */ lh $v0, 0xae($a0) -/* 018510 80017910 3C018016 */ lui $at, %hi(D_80163068) -/* 018514 80017914 00076080 */ sll $t4, $a3, 2 -/* 018518 80017918 0002C080 */ sll $t8, $v0, 2 -/* 01851C 8001791C 00380821 */ addu $at, $at, $t8 -/* 018520 80017920 C4243068 */ lwc1 $f4, %lo(D_80163068)($at) -/* 018524 80017924 3C0F8016 */ lui $t7, %hi(D_80164688) # $t7, 0x8016 -/* 018528 80017928 3C198016 */ lui $t9, %hi(D_80164648) # $t9, 0x8016 -/* 01852C 8001792C 3C0D800E */ lui $t5, %hi(gPlayerOne) -/* 018530 80017930 25EF4688 */ addiu $t7, %lo(D_80164688) # addiu $t7, $t7, 0x4688 -/* 018534 80017934 27394648 */ addiu $t9, %lo(D_80164648) # addiu $t9, $t9, 0x4648 -/* 018538 80017938 3C188016 */ lui $t8, %hi(D_80164658) # $t8, 0x8016 -/* 01853C 8001793C 8DADC4DC */ lw $t5, %lo(gPlayerOne)($t5) -/* 018540 80017940 018F2821 */ addu $a1, $t4, $t7 -/* 018544 80017944 27184658 */ addiu $t8, %lo(D_80164658) # addiu $t8, $t8, 0x4658 -/* 018548 80017948 01997021 */ addu $t6, $t4, $t9 -/* 01854C 8001794C AFAE003C */ sw $t6, 0x3c($sp) -/* 018550 80017950 01981821 */ addu $v1, $t4, $t8 -/* 018554 80017954 E4A40000 */ swc1 $f4, ($a1) -/* 018558 80017958 C5D00000 */ lwc1 $f16, ($t6) -/* 01855C 8001795C C4660000 */ lwc1 $f6, ($v1) -/* 018560 80017960 3C013F00 */ li $at, 0x3F000000 # 0.500000 -/* 018564 80017964 44815000 */ mtc1 $at, $f10 -/* 018568 80017968 46103201 */ sub.s $f8, $f6, $f16 -/* 01856C 8001796C 3C1F8016 */ lui $ra, %hi(gPathIndexByPlayerId) # 0x8016 -/* 018570 80017970 00025040 */ sll $t2, $v0, 1 -/* 018574 80017974 03EAF821 */ addu $ra, $ra, $t2 -/* 018578 80017978 460A4102 */ mul.s $f4, $f8, $f10 -/* 01857C 8001797C 3C018016 */ lui $at, %hi(D_80163238) # $at, 0x8016 -/* 018580 80017980 000258C0 */ sll $t3, $v0, 3 -/* 018584 80017984 01625823 */ subu $t3, $t3, $v0 -/* 018588 80017988 000B5900 */ sll $t3, $t3, 4 -/* 01858C 8001798C 01625823 */ subu $t3, $t3, $v0 -/* 018590 80017990 000B5880 */ sll $t3, $t3, 2 -/* 018594 80017994 46048180 */ add.s $f6, $f16, $f4 -/* 018598 80017998 3C0F8016 */ lui $t7, %hi(gNearestWaypointByCameraId) # $t7, 0x8016 -/* 01859C 8001799C 01625823 */ subu $t3, $t3, $v0 -/* 0185A0 800179A0 000B58C0 */ sll $t3, $t3, 3 -/* 0185A4 800179A4 E5C60000 */ swc1 $f6, ($t6) -/* 0185A8 800179A8 97FF45B0 */ lhu $ra, %lo(gPathIndexByPlayerId)($ra) # 0x45b0($ra) -/* 0185AC 800179AC 3C0E8016 */ lui $t6, %hi(gWaypointCountByPathIndex) # 0x8016 -/* 0185B0 800179B0 AC223238 */ sw $v0, %lo(D_80163238)($at) -/* 0185B4 800179B4 001FC840 */ sll $t9, $ra, 1 -/* 0185B8 800179B8 01D97021 */ addu $t6, $t6, $t9 -/* 0185BC 800179BC 95CE45C8 */ lhu $t6, %lo(gWaypointCountByPathIndex)($t6) # 0x45c8($t6) -/* 0185C0 800179C0 8FA800AC */ lw $t0, 0xac($sp) -/* 0185C4 800179C4 25EF4668 */ addiu $t7, %lo(gNearestWaypointByCameraId) # addiu $t7, $t7, 0x4668 -/* 0185C8 800179C8 AFAE004C */ sw $t6, 0x4c($sp) -/* 0185CC 800179CC 8C860008 */ lw $a2, 8($a0) -/* 0185D0 800179D0 C48E0004 */ lwc1 $f14, 4($a0) -/* 0185D4 800179D4 C48C0000 */ lwc1 $f12, ($a0) -/* 0185D8 800179D8 0008C040 */ sll $t8, $t0, 1 -/* 0185DC 800179DC 030F4821 */ addu $t1, $t8, $t7 -/* 0185E0 800179E0 01AB6821 */ addu $t5, $t5, $t3 -/* 0185E4 800179E4 AFBF0050 */ sw $ra, 0x50($sp) -/* 0185E8 800179E8 AFBF0010 */ sw $ra, 0x10($sp) -/* 0185EC 800179EC 00808025 */ move $s0, $a0 -/* 0185F0 800179F0 AFAD0088 */ sw $t5, 0x88($sp) -/* 0185F4 800179F4 85270000 */ lh $a3, ($t1) -/* 0185F8 800179F8 AFA90028 */ sw $t1, 0x28($sp) -/* 0185FC 800179FC 03004025 */ move $t0, $t8 -/* 018600 80017A00 AFB8002C */ sw $t8, 0x2c($sp) -/* 018604 80017A04 AFAC0044 */ sw $t4, 0x44($sp) -/* 018608 80017A08 AFAB0030 */ sw $t3, 0x30($sp) -/* 01860C 80017A0C AFAA0034 */ sw $t2, 0x34($sp) -/* 018610 80017A10 AFA50040 */ sw $a1, 0x40($sp) -/* 018614 80017A14 0C0034CF */ jal func_8000D33C -/* 018618 80017A18 AFA30038 */ sw $v1, 0x38($sp) -/* 01861C 80017A1C 8FAA0034 */ lw $t2, 0x34($sp) -/* 018620 80017A20 8FBF0028 */ lw $ra, 0x28($sp) -/* 018624 80017A24 3C198016 */ lui $t9, %hi(gNearestWaypointByPlayerId) # 0x8016 -/* 018628 80017A28 032AC821 */ addu $t9, $t9, $t2 -/* 01862C 80017A2C A7E20000 */ sh $v0, ($ra) -/* 018630 80017A30 8FAD004C */ lw $t5, 0x4c($sp) -/* 018634 80017A34 97394438 */ lhu $t9, %lo(gNearestWaypointByPlayerId)($t9) # 0x4438($t9) -/* 018638 80017A38 87E90000 */ lh $t1, ($ra) -/* 01863C 80017A3C 8FA30038 */ lw $v1, 0x38($sp) -/* 018640 80017A40 272E0003 */ addiu $t6, $t9, 3 -/* 018644 80017A44 01CD001A */ div $zero, $t6, $t5 -/* 018648 80017A48 00007810 */ mfhi $t7 -/* 01864C 80017A4C 8FAB0030 */ lw $t3, 0x30($sp) -/* 018650 80017A50 8FAC0044 */ lw $t4, 0x44($sp) -/* 018654 80017A54 15A00002 */ bnez $t5, .L80017A60 -/* 018658 80017A58 00000000 */ nop -/* 01865C 80017A5C 0007000D */ break 7 -.L80017A60: -/* 018660 80017A60 2401FFFF */ li $at, -1 -/* 018664 80017A64 15A10004 */ bne $t5, $at, .L80017A78 -/* 018668 80017A68 3C018000 */ lui $at, 0x8000 -/* 01866C 80017A6C 15C10002 */ bne $t6, $at, .L80017A78 -/* 018670 80017A70 00000000 */ nop -/* 018674 80017A74 0006000D */ break 6 -.L80017A78: -/* 018678 80017A78 31E4FFFF */ andi $a0, $t7, 0xffff -/* 01867C 80017A7C A7AF009C */ sh $t7, 0x9c($sp) -/* 018680 80017A80 2406000D */ li $a2, 13 -/* 018684 80017A84 24070001 */ li $a3, 1 -/* 018688 80017A88 AFAD0010 */ sw $t5, 0x10($sp) -/* 01868C 80017A8C 3125FFFF */ andi $a1, $t1, 0xffff -/* 018690 80017A90 0C001EFE */ jal func_80007BF8 -/* 018694 80017A94 A7A9009E */ sh $t1, 0x9e($sp) -/* 018698 80017A98 8FA30038 */ lw $v1, 0x38($sp) -/* 01869C 80017A9C 87A8009C */ lh $t0, 0x9c($sp) -/* 0186A0 80017AA0 87A9009E */ lh $t1, 0x9e($sp) -/* 0186A4 80017AA4 8FAB0030 */ lw $t3, 0x30($sp) -/* 0186A8 80017AA8 1C40000C */ bgtz $v0, .L80017ADC -/* 0186AC 80017AAC 8FAC0044 */ lw $t4, 0x44($sp) -/* 0186B0 80017AB0 8FB90040 */ lw $t9, 0x40($sp) -/* 0186B4 80017AB4 8FAE002C */ lw $t6, 0x2c($sp) -/* 0186B8 80017AB8 3C068016 */ lui $a2, %hi(D_80164680) # 0x8016 -/* 0186BC 80017ABC 8F250000 */ lw $a1, ($t9) -/* 0186C0 80017AC0 00CE3021 */ addu $a2, $a2, $t6 -/* 0186C4 80017AC4 84C64680 */ lh $a2, %lo(D_80164680)($a2) # 0x4680($a2) -/* 0186C8 80017AC8 AFAC0044 */ sw $t4, 0x44($sp) -/* 0186CC 80017ACC 0C0068D2 */ jal func_8001A348 -/* 0186D0 80017AD0 8FA400AC */ lw $a0, 0xac($sp) -/* 0186D4 80017AD4 10000036 */ b .L80017BB0 -/* 0186D8 80017AD8 8FAC0044 */ lw $t4, 0x44($sp) -.L80017ADC: -/* 0186DC 80017ADC 0128082A */ slt $at, $t1, $t0 -/* 0186E0 80017AE0 5020000E */ beql $at, $zero, .L80017B1C -/* 0186E4 80017AE4 0109082A */ slt $at, $t0, $t1 -/* 0186E8 80017AE8 0109C023 */ subu $t8, $t0, $t1 -/* 0186EC 80017AEC 2B010003 */ slti $at, $t8, 3 -/* 0186F0 80017AF0 10200009 */ beqz $at, .L80017B18 -/* 0186F4 80017AF4 3C01800F */ lui $at, %hi(gPlayers+0x94) -/* 0186F8 80017AF8 002B0821 */ addu $at, $at, $t3 -/* 0186FC 80017AFC C4286A24 */ lwc1 $f8, %lo(gPlayers+0x94)($at) -/* 018700 80017B00 3C01800F */ lui $at, %hi(D_800ED288) -/* 018704 80017B04 D424D288 */ ldc1 $f4, %lo(D_800ED288)($at) -/* 018708 80017B08 460042A1 */ cvt.d.s $f10, $f8 -/* 01870C 80017B0C 46245180 */ add.d $f6, $f10, $f4 -/* 018710 80017B10 46203220 */ cvt.s.d $f8, $f6 -/* 018714 80017B14 E4680000 */ swc1 $f8, ($v1) -.L80017B18: -/* 018718 80017B18 0109082A */ slt $at, $t0, $t1 -.L80017B1C: -/* 01871C 80017B1C 5020000E */ beql $at, $zero, .L80017B58 -/* 018720 80017B20 C4640000 */ lwc1 $f4, ($v1) -/* 018724 80017B24 01287823 */ subu $t7, $t1, $t0 -/* 018728 80017B28 29E10003 */ slti $at, $t7, 3 -/* 01872C 80017B2C 10200009 */ beqz $at, .L80017B54 -/* 018730 80017B30 3C01800F */ lui $at, %hi(gPlayers+0x94) -/* 018734 80017B34 002B0821 */ addu $at, $at, $t3 -/* 018738 80017B38 C42A6A24 */ lwc1 $f10, %lo(gPlayers+0x94)($at) -/* 01873C 80017B3C 3C01800F */ lui $at, %hi(D_800ED290) -/* 018740 80017B40 D426D290 */ ldc1 $f6, %lo(D_800ED290)($at) -/* 018744 80017B44 46005121 */ cvt.d.s $f4, $f10 -/* 018748 80017B48 46262201 */ sub.d $f8, $f4, $f6 -/* 01874C 80017B4C 462042A0 */ cvt.s.d $f10, $f8 -/* 018750 80017B50 E46A0000 */ swc1 $f10, ($v1) -.L80017B54: -/* 018754 80017B54 C4640000 */ lwc1 $f4, ($v1) -.L80017B58: -/* 018758 80017B58 3C014024 */ li $at, 0x40240000 # 2.562500 -/* 01875C 80017B5C 44813800 */ mtc1 $at, $f7 -/* 018760 80017B60 44803000 */ mtc1 $zero, $f6 -/* 018764 80017B64 46002021 */ cvt.d.s $f0, $f4 -/* 018768 80017B68 44802000 */ mtc1 $zero, $f4 -/* 01876C 80017B6C 4620303C */ c.lt.d $f6, $f0 -/* 018770 80017B70 44802800 */ mtc1 $zero, $f5 -/* 018774 80017B74 45020008 */ bc1fl .L80017B98 -/* 018778 80017B78 4624003C */ c.lt.d $f0, $f4 -/* 01877C 80017B7C 3C014120 */ li $at, 0x41200000 # 10.000000 -/* 018780 80017B80 44814000 */ mtc1 $at, $f8 -/* 018784 80017B84 00000000 */ nop -/* 018788 80017B88 E4680000 */ swc1 $f8, ($v1) -/* 01878C 80017B8C C46A0000 */ lwc1 $f10, ($v1) -/* 018790 80017B90 46005021 */ cvt.d.s $f0, $f10 -/* 018794 80017B94 4624003C */ c.lt.d $f0, $f4 -.L80017B98: -/* 018798 80017B98 00000000 */ nop -/* 01879C 80017B9C 45020005 */ bc1fl .L80017BB4 -/* 0187A0 80017BA0 8FA7004C */ lw $a3, 0x4c($sp) -/* 0187A4 80017BA4 44803000 */ mtc1 $zero, $f6 -/* 0187A8 80017BA8 00000000 */ nop -/* 0187AC 80017BAC E4660000 */ swc1 $f6, ($v1) -.L80017BB0: -/* 0187B0 80017BB0 8FA7004C */ lw $a3, 0x4c($sp) -.L80017BB4: -/* 0187B4 80017BB4 8FB90028 */ lw $t9, 0x28($sp) -/* 0187B8 80017BB8 87A60052 */ lh $a2, 0x52($sp) -/* 0187BC 80017BBC 87220000 */ lh $v0, ($t9) -/* 0187C0 80017BC0 244E0001 */ addiu $t6, $v0, 1 -/* 0187C4 80017BC4 01C7001A */ div $zero, $t6, $a3 -/* 0187C8 80017BC8 00001810 */ mfhi $v1 -/* 0187CC 80017BCC 24590002 */ addiu $t9, $v0, 2 -/* 0187D0 80017BD0 14E00002 */ bnez $a3, .L80017BDC -/* 0187D4 80017BD4 00000000 */ nop -/* 0187D8 80017BD8 0007000D */ break 7 -.L80017BDC: -/* 0187DC 80017BDC 2401FFFF */ li $at, -1 -/* 0187E0 80017BE0 14E10004 */ bne $a3, $at, .L80017BF4 -/* 0187E4 80017BE4 3C018000 */ lui $at, 0x8000 -/* 0187E8 80017BE8 15C10002 */ bne $t6, $at, .L80017BF4 -/* 0187EC 80017BEC 00000000 */ nop -/* 0187F0 80017BF0 0006000D */ break 6 -.L80017BF4: -/* 0187F4 80017BF4 0327001A */ div $zero, $t9, $a3 -/* 0187F8 80017BF8 0003C400 */ sll $t8, $v1, 0x10 -/* 0187FC 80017BFC 00187C03 */ sra $t7, $t8, 0x10 -/* 018800 80017C00 8FB80040 */ lw $t8, 0x40($sp) -/* 018804 80017C04 00007010 */ mfhi $t6 -/* 018808 80017C08 A7AE0060 */ sh $t6, 0x60($sp) -/* 01880C 80017C0C 8F050000 */ lw $a1, ($t8) -/* 018810 80017C10 01E01825 */ move $v1, $t7 -/* 018814 80017C14 14E00002 */ bnez $a3, .L80017C20 -/* 018818 80017C18 00000000 */ nop -/* 01881C 80017C1C 0007000D */ break 7 -.L80017C20: -/* 018820 80017C20 2401FFFF */ li $at, -1 -/* 018824 80017C24 14E10004 */ bne $a3, $at, .L80017C38 -/* 018828 80017C28 3C018000 */ li $at, 0x80000000 # -0.000000 -/* 01882C 80017C2C 17210002 */ bne $t9, $at, .L80017C38 -/* 018830 80017C30 00000000 */ nop -/* 018834 80017C34 0006000D */ break 6 -.L80017C38: -/* 018838 80017C38 3064FFFF */ andi $a0, $v1, 0xffff -/* 01883C 80017C3C A7A30062 */ sh $v1, 0x62($sp) -/* 018840 80017C40 AFAC0044 */ sw $t4, 0x44($sp) -/* 018844 80017C44 0C002EF6 */ jal func_8000BBD8 -/* 018848 80017C48 AFA60038 */ sw $a2, 0x38($sp) -/* 01884C 80017C4C 3C088016 */ lui $t0, %hi(D_80162FA0) # $t0, 0x8016 -/* 018850 80017C50 25082FA0 */ addiu $t0, %lo(D_80162FA0) # addiu $t0, $t0, 0x2fa0 -/* 018854 80017C54 C5080000 */ lwc1 $f8, ($t0) -/* 018858 80017C58 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 01885C 80017C5C 44810800 */ mtc1 $at, $f1 -/* 018860 80017C60 44800000 */ mtc1 $zero, $f0 -/* 018864 80017C64 C5060008 */ lwc1 $f6, 8($t0) -/* 018868 80017C68 460042A1 */ cvt.d.s $f10, $f8 -/* 01886C 80017C6C 8FAF0040 */ lw $t7, 0x40($sp) -/* 018870 80017C70 46205102 */ mul.d $f4, $f10, $f0 -/* 018874 80017C74 46003221 */ cvt.d.s $f8, $f6 -/* 018878 80017C78 8DE50000 */ lw $a1, ($t7) -/* 01887C 80017C7C 8FA60038 */ lw $a2, 0x38($sp) -/* 018880 80017C80 46204282 */ mul.d $f10, $f8, $f0 -/* 018884 80017C84 97A40060 */ lhu $a0, 0x60($sp) -/* 018888 80017C88 462020A0 */ cvt.s.d $f2, $f4 -/* 01888C 80017C8C 462053A0 */ cvt.s.d $f14, $f10 -/* 018890 80017C90 E7A20080 */ swc1 $f2, 0x80($sp) -/* 018894 80017C94 0C002EF6 */ jal func_8000BBD8 -/* 018898 80017C98 E7AE0078 */ swc1 $f14, 0x78($sp) -/* 01889C 80017C9C 3C088016 */ lui $t0, %hi(D_80162FA0) # $t0, 0x8016 -/* 0188A0 80017CA0 25082FA0 */ addiu $t0, %lo(D_80162FA0) # addiu $t0, $t0, 0x2fa0 -/* 0188A4 80017CA4 C5060000 */ lwc1 $f6, ($t0) -/* 0188A8 80017CA8 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 0188AC 80017CAC 44810800 */ mtc1 $at, $f1 -/* 0188B0 80017CB0 44800000 */ mtc1 $zero, $f0 -/* 0188B4 80017CB4 46003221 */ cvt.d.s $f8, $f6 -/* 0188B8 80017CB8 C7A20080 */ lwc1 $f2, 0x80($sp) -/* 0188BC 80017CBC 46204282 */ mul.d $f10, $f8, $f0 -/* 0188C0 80017CC0 8FB90050 */ lw $t9, 0x50($sp) -/* 0188C4 80017CC4 46001121 */ cvt.d.s $f4, $f2 -/* 0188C8 80017CC8 87B80060 */ lh $t8, 0x60($sp) -/* 0188CC 80017CCC 3C028016 */ lui $v0, %hi(D_80164550) # 0x8016 -/* 0188D0 80017CD0 00197080 */ sll $t6, $t9, 2 -/* 0188D4 80017CD4 004E1021 */ addu $v0, $v0, $t6 -/* 0188D8 80017CD8 8C424550 */ lw $v0, %lo(D_80164550)($v0) # 0x4550($v0) -/* 0188DC 80017CDC 462A2180 */ add.d $f6, $f4, $f10 -/* 0188E0 80017CE0 C5040008 */ lwc1 $f4, 8($t0) -/* 0188E4 80017CE4 001878C0 */ sll $t7, $t8, 3 -/* 0188E8 80017CE8 87B80062 */ lh $t8, 0x62($sp) -/* 0188EC 80017CEC 460022A1 */ cvt.d.s $f10, $f4 -/* 0188F0 80017CF0 462030A0 */ cvt.s.d $f2, $f6 -/* 0188F4 80017CF4 004FC821 */ addu $t9, $v0, $t7 -/* 0188F8 80017CF8 46205182 */ mul.d $f6, $f10, $f0 -/* 0188FC 80017CFC 872E0002 */ lh $t6, 2($t9) -/* 018900 80017D00 001878C0 */ sll $t7, $t8, 3 -/* 018904 80017D04 004FC821 */ addu $t9, $v0, $t7 -/* 018908 80017D08 C7AE0078 */ lwc1 $f14, 0x78($sp) -/* 01890C 80017D0C 87380002 */ lh $t8, 2($t9) -/* 018910 80017D10 8FAC0044 */ lw $t4, 0x44($sp) -/* 018914 80017D14 46007221 */ cvt.d.s $f8, $f14 -/* 018918 80017D18 01D87821 */ addu $t7, $t6, $t8 -/* 01891C 80017D1C 448F5000 */ mtc1 $t7, $f10 -/* 018920 80017D20 46264100 */ add.d $f4, $f8, $f6 -/* 018924 80017D24 44803000 */ mtc1 $zero, $f6 -/* 018928 80017D28 44813800 */ mtc1 $at, $f7 -/* 01892C 80017D2C 46805221 */ cvt.d.w $f8, $f10 -/* 018930 80017D30 3C0E8016 */ lui $t6, %hi(D_80164618) # $t6, 0x8016 -/* 018934 80017D34 25CE4618 */ addiu $t6, %lo(D_80164618) # addiu $t6, $t6, 0x4618 -/* 018938 80017D38 018E3021 */ addu $a2, $t4, $t6 -/* 01893C 80017D3C 462023A0 */ cvt.s.d $f14, $f4 -/* 018940 80017D40 46264102 */ mul.d $f4, $f8, $f6 -/* 018944 80017D44 C4C80000 */ lwc1 $f8, ($a2) -/* 018948 80017D48 3C198016 */ lui $t9, %hi(D_801645F8) # $t9, 0x8016 -/* 01894C 80017D4C 273945F8 */ addiu $t9, %lo(D_801645F8) # addiu $t9, $t9, 0x45f8 -/* 018950 80017D50 01991821 */ addu $v1, $t4, $t9 -/* 018954 80017D54 C46A0000 */ lwc1 $f10, ($v1) -/* 018958 80017D58 3C188016 */ lui $t8, %hi(D_80164638) # $t8, 0x8016 -/* 01895C 80017D5C 27184638 */ addiu $t8, %lo(D_80164638) # addiu $t8, $t8, 0x4638 -/* 018960 80017D60 462024A0 */ cvt.s.d $f18, $f4 -/* 018964 80017D64 01983821 */ addu $a3, $t4, $t8 -/* 018968 80017D68 C4E40000 */ lwc1 $f4, ($a3) -/* 01896C 80017D6C 460A1401 */ sub.s $f16, $f2, $f10 -/* 018970 80017D70 AFA70034 */ sw $a3, 0x34($sp) -/* 018974 80017D74 AFA30040 */ sw $v1, 0x40($sp) -/* 018978 80017D78 46089181 */ sub.s $f6, $f18, $f8 -/* 01897C 80017D7C E7B00074 */ swc1 $f16, 0x74($sp) -/* 018980 80017D80 AFA60038 */ sw $a2, 0x38($sp) -/* 018984 80017D84 46047281 */ sub.s $f10, $f14, $f4 -/* 018988 80017D88 E7A60070 */ swc1 $f6, 0x70($sp) -/* 01898C 80017D8C C7A80070 */ lwc1 $f8, 0x70($sp) -/* 018990 80017D90 E7AA006C */ swc1 $f10, 0x6c($sp) -/* 018994 80017D94 46084182 */ mul.s $f6, $f8, $f8 -/* 018998 80017D98 C7A8006C */ lwc1 $f8, 0x6c($sp) -/* 01899C 80017D9C 46108102 */ mul.s $f4, $f16, $f16 -/* 0189A0 80017DA0 46062280 */ add.s $f10, $f4, $f6 -/* 0189A4 80017DA4 46084102 */ mul.s $f4, $f8, $f8 -/* 0189A8 80017DA8 0C033850 */ jal sqrtf -/* 0189AC 80017DAC 46045300 */ add.s $f12, $f10, $f4 -/* 0189B0 80017DB0 44803800 */ mtc1 $zero, $f7 -/* 0189B4 80017DB4 44803000 */ mtc1 $zero, $f6 -/* 0189B8 80017DB8 46000221 */ cvt.d.s $f8, $f0 -/* 0189BC 80017DBC 8FA30040 */ lw $v1, 0x40($sp) -/* 0189C0 80017DC0 46283032 */ c.eq.d $f6, $f8 -/* 0189C4 80017DC4 8FA60038 */ lw $a2, 0x38($sp) -/* 0189C8 80017DC8 8FA70034 */ lw $a3, 0x34($sp) -/* 0189CC 80017DCC 8FAF003C */ lw $t7, 0x3c($sp) -/* 0189D0 80017DD0 45010012 */ bc1t .L80017E1C -/* 0189D4 80017DD4 3C014024 */ li $at, 0x40240000 # 2.562500 -/* 0189D8 80017DD8 C5F00000 */ lwc1 $f16, ($t7) -/* 0189DC 80017DDC C7AA0074 */ lwc1 $f10, 0x74($sp) -/* 0189E0 80017DE0 C4680000 */ lwc1 $f8, ($v1) -/* 0189E4 80017DE4 460A8102 */ mul.s $f4, $f16, $f10 -/* 0189E8 80017DE8 C7AA0070 */ lwc1 $f10, 0x70($sp) -/* 0189EC 80017DEC 46002183 */ div.s $f6, $f4, $f0 -/* 0189F0 80017DF0 460A8102 */ mul.s $f4, $f16, $f10 -/* 0189F4 80017DF4 C7AA006C */ lwc1 $f10, 0x6c($sp) -/* 0189F8 80017DF8 46083080 */ add.s $f2, $f6, $f8 -/* 0189FC 80017DFC C4C80000 */ lwc1 $f8, ($a2) -/* 018A00 80017E00 46002183 */ div.s $f6, $f4, $f0 -/* 018A04 80017E04 460A8102 */ mul.s $f4, $f16, $f10 -/* 018A08 80017E08 46083480 */ add.s $f18, $f6, $f8 -/* 018A0C 80017E0C C4E80000 */ lwc1 $f8, ($a3) -/* 018A10 80017E10 46002183 */ div.s $f6, $f4, $f0 -/* 018A14 80017E14 10000004 */ b .L80017E28 -/* 018A18 80017E18 46083380 */ add.s $f14, $f6, $f8 -.L80017E1C: -/* 018A1C 80017E1C C4620000 */ lwc1 $f2, ($v1) -/* 018A20 80017E20 C4D20000 */ lwc1 $f18, ($a2) -/* 018A24 80017E24 C4EE0000 */ lwc1 $f14, ($a3) -.L80017E28: -/* 018A28 80017E28 44812800 */ mtc1 $at, $f5 -/* 018A2C 80017E2C 44802000 */ mtc1 $zero, $f4 -/* 018A30 80017E30 460092A1 */ cvt.d.s $f10, $f18 -/* 018A34 80017E34 8FA20088 */ lw $v0, 0x88($sp) -/* 018A38 80017E38 46245180 */ add.d $f6, $f10, $f4 -/* 018A3C 80017E3C E6020000 */ swc1 $f2, ($s0) -/* 018A40 80017E40 E60E0008 */ swc1 $f14, 8($s0) -/* 018A44 80017E44 3C014018 */ li $at, 0x40180000 # 2.375000 -/* 018A48 80017E48 46203220 */ cvt.s.d $f8, $f6 -/* 018A4C 80017E4C 44814800 */ mtc1 $at, $f9 -/* 018A50 80017E50 E6080004 */ swc1 $f8, 4($s0) -/* 018A54 80017E54 E4620000 */ swc1 $f2, ($v1) -/* 018A58 80017E58 E4D20000 */ swc1 $f18, ($a2) -/* 018A5C 80017E5C E4EE0000 */ swc1 $f14, ($a3) -/* 018A60 80017E60 C44A0014 */ lwc1 $f10, 0x14($v0) -/* 018A64 80017E64 44804000 */ mtc1 $zero, $f8 -/* 018A68 80017E68 E60A000C */ swc1 $f10, 0xc($s0) -/* 018A6C 80017E6C C4440018 */ lwc1 $f4, 0x18($v0) -/* 018A70 80017E70 460021A1 */ cvt.d.s $f6, $f4 -/* 018A74 80017E74 46283280 */ add.d $f10, $f6, $f8 -/* 018A78 80017E78 46205120 */ cvt.s.d $f4, $f10 -/* 018A7C 80017E7C E6040010 */ swc1 $f4, 0x10($s0) -/* 018A80 80017E80 C446001C */ lwc1 $f6, 0x1c($v0) -/* 018A84 80017E84 E6060014 */ swc1 $f6, 0x14($s0) -/* 018A88 80017E88 8FA50050 */ lw $a1, 0x50($sp) -/* 018A8C 80017E8C 0C00534C */ jal func_80014D30 -/* 018A90 80017E90 8FA400AC */ lw $a0, 0xac($sp) -/* 018A94 80017E94 C608000C */ lwc1 $f8, 0xc($s0) -/* 018A98 80017E98 C60A0000 */ lwc1 $f10, ($s0) -/* 018A9C 80017E9C C6040010 */ lwc1 $f4, 0x10($s0) -/* 018AA0 80017EA0 C6060004 */ lwc1 $f6, 4($s0) -/* 018AA4 80017EA4 460A4301 */ sub.s $f12, $f8, $f10 -/* 018AA8 80017EA8 46062201 */ sub.s $f8, $f4, $f6 -/* 018AAC 80017EAC E7A80090 */ swc1 $f8, 0x90($sp) -/* 018AB0 80017EB0 C6040008 */ lwc1 $f4, 8($s0) -/* 018AB4 80017EB4 C60A0014 */ lwc1 $f10, 0x14($s0) -/* 018AB8 80017EB8 E7AC0094 */ swc1 $f12, 0x94($sp) -/* 018ABC 80017EBC 46045381 */ sub.s $f14, $f10, $f4 -/* 018AC0 80017EC0 0C0ADE0C */ jal atan2s -/* 018AC4 80017EC4 E7AE008C */ swc1 $f14, 0x8c($sp) -/* 018AC8 80017EC8 C7A00094 */ lwc1 $f0, 0x94($sp) -/* 018ACC 80017ECC C7AE008C */ lwc1 $f14, 0x8c($sp) -/* 018AD0 80017ED0 A6020026 */ sh $v0, 0x26($s0) -/* 018AD4 80017ED4 46000182 */ mul.s $f6, $f0, $f0 -/* 018AD8 80017ED8 00000000 */ nop -/* 018ADC 80017EDC 460E7202 */ mul.s $f8, $f14, $f14 -/* 018AE0 80017EE0 0C033850 */ jal sqrtf -/* 018AE4 80017EE4 46083300 */ add.s $f12, $f6, $f8 -/* 018AE8 80017EE8 46000306 */ mov.s $f12, $f0 -/* 018AEC 80017EEC 0C0ADE0C */ jal atan2s -/* 018AF0 80017EF0 C7AE0090 */ lwc1 $f14, 0x90($sp) -/* 018AF4 80017EF4 A6020024 */ sh $v0, 0x24($s0) -/* 018AF8 80017EF8 A6000028 */ sh $zero, 0x28($s0) -/* 018AFC 80017EFC 8FBF0024 */ lw $ra, 0x24($sp) -/* 018B00 80017F00 8FB00020 */ lw $s0, 0x20($sp) -/* 018B04 80017F04 27BD00A0 */ addiu $sp, $sp, 0xa0 -/* 018B08 80017F08 03E00008 */ jr $ra -/* 018B0C 80017F0C 00000000 */ nop diff --git a/asm/non_matchings/code_80005FD0/func_800180F0.s b/asm/non_matchings/code_80005FD0/func_800180F0.s deleted file mode 100644 index c1441bc80..000000000 --- a/asm/non_matchings/code_80005FD0/func_800180F0.s +++ /dev/null @@ -1,421 +0,0 @@ -.section .late_rodata - -glabel D_800ED298 -.double 0.1 - -glabel D_800ED2A0 -.double 0.1 - -.section .text - -glabel func_800180F0 -/* 018CF0 800180F0 27BDFF60 */ addiu $sp, $sp, -0xa0 -/* 018CF4 800180F4 AFBF0024 */ sw $ra, 0x24($sp) -/* 018CF8 800180F8 AFB10020 */ sw $s1, 0x20($sp) -/* 018CFC 800180FC AFB0001C */ sw $s0, 0x1c($sp) -/* 018D00 80018100 AFA500A4 */ sw $a1, 0xa4($sp) -/* 018D04 80018104 AFA600A8 */ sw $a2, 0xa8($sp) -/* 018D08 80018108 AFA700AC */ sw $a3, 0xac($sp) -/* 018D0C 8001810C 848200AE */ lh $v0, 0xae($a0) -/* 018D10 80018110 3C018016 */ lui $at, %hi(D_80163068) -/* 018D14 80018114 00076880 */ sll $t5, $a3, 2 -/* 018D18 80018118 0002C080 */ sll $t8, $v0, 2 -/* 018D1C 8001811C 00380821 */ addu $at, $at, $t8 -/* 018D20 80018120 C4243068 */ lwc1 $f4, %lo(D_80163068)($at) -/* 018D24 80018124 3C0F8016 */ lui $t7, %hi(D_80164688) # $t7, 0x8016 -/* 018D28 80018128 3C198016 */ lui $t9, %hi(D_80164648) # $t9, 0x8016 -/* 018D2C 8001812C 3C11800E */ lui $s1, %hi(gPlayerOne) -/* 018D30 80018130 25EF4688 */ addiu $t7, %lo(D_80164688) # addiu $t7, $t7, 0x4688 -/* 018D34 80018134 27394648 */ addiu $t9, %lo(D_80164648) # addiu $t9, $t9, 0x4648 -/* 018D38 80018138 3C188016 */ lui $t8, %hi(D_80164658) # $t8, 0x8016 -/* 018D3C 8001813C 8E31C4DC */ lw $s1, %lo(gPlayerOne)($s1) -/* 018D40 80018140 01AF2821 */ addu $a1, $t5, $t7 -/* 018D44 80018144 27184658 */ addiu $t8, %lo(D_80164658) # addiu $t8, $t8, 0x4658 -/* 018D48 80018148 01B97021 */ addu $t6, $t5, $t9 -/* 018D4C 8001814C AFAE003C */ sw $t6, 0x3c($sp) -/* 018D50 80018150 01B81821 */ addu $v1, $t5, $t8 -/* 018D54 80018154 E4A40000 */ swc1 $f4, ($a1) -/* 018D58 80018158 C5D00000 */ lwc1 $f16, ($t6) -/* 018D5C 8001815C C4660000 */ lwc1 $f6, ($v1) -/* 018D60 80018160 3C013F00 */ li $at, 0x3F000000 # 0.500000 -/* 018D64 80018164 44815000 */ mtc1 $at, $f10 -/* 018D68 80018168 46103201 */ sub.s $f8, $f6, $f16 -/* 018D6C 8001816C 3C018016 */ lui $at, %hi(D_80163238) # $at, 0x8016 -/* 018D70 80018170 3C1F8016 */ lui $ra, %hi(gPathIndexByPlayerId) # 0x8016 -/* 018D74 80018174 00025040 */ sll $t2, $v0, 1 -/* 018D78 80018178 460A4102 */ mul.s $f4, $f8, $f10 -/* 018D7C 8001817C 03EAF821 */ addu $ra, $ra, $t2 -/* 018D80 80018180 000258C0 */ sll $t3, $v0, 3 -/* 018D84 80018184 01625823 */ subu $t3, $t3, $v0 -/* 018D88 80018188 000B5900 */ sll $t3, $t3, 4 -/* 018D8C 8001818C 3C0C8016 */ lui $t4, %hi(gWaypointCountByPathIndex) # 0x8016 -/* 018D90 80018190 01625823 */ subu $t3, $t3, $v0 -/* 018D94 80018194 46048180 */ add.s $f6, $f16, $f4 -/* 018D98 80018198 000B5880 */ sll $t3, $t3, 2 -/* 018D9C 8001819C 3C188016 */ lui $t8, %hi(gNearestWaypointByCameraId) # $t8, 0x8016 -/* 018DA0 800181A0 27184668 */ addiu $t8, %lo(gNearestWaypointByCameraId) # addiu $t8, $t8, 0x4668 -/* 018DA4 800181A4 E5C60000 */ swc1 $f6, ($t6) -/* 018DA8 800181A8 AC223238 */ sw $v0, %lo(D_80163238)($at) -/* 018DAC 800181AC 8C860008 */ lw $a2, 8($a0) -/* 018DB0 800181B0 C48E0004 */ lwc1 $f14, 4($a0) -/* 018DB4 800181B4 C48C0000 */ lwc1 $f12, ($a0) -/* 018DB8 800181B8 97FF45B0 */ lhu $ra, %lo(gPathIndexByPlayerId)($ra) # 0x45b0($ra) -/* 018DBC 800181BC 8FA800AC */ lw $t0, 0xac($sp) -/* 018DC0 800181C0 01625823 */ subu $t3, $t3, $v0 -/* 018DC4 800181C4 001FC840 */ sll $t9, $ra, 1 -/* 018DC8 800181C8 01996021 */ addu $t4, $t4, $t9 -/* 018DCC 800181CC 958C45C8 */ lhu $t4, %lo(gWaypointCountByPathIndex)($t4) # 0x45c8($t4) -/* 018DD0 800181D0 00087040 */ sll $t6, $t0, 1 -/* 018DD4 800181D4 000B58C0 */ sll $t3, $t3, 3 -/* 018DD8 800181D8 01D84821 */ addu $t1, $t6, $t8 -/* 018DDC 800181DC AFBF0010 */ sw $ra, 0x10($sp) -/* 018DE0 800181E0 AFBF0050 */ sw $ra, 0x50($sp) -/* 018DE4 800181E4 00808025 */ move $s0, $a0 -/* 018DE8 800181E8 85270000 */ lh $a3, ($t1) -/* 018DEC 800181EC AFA90028 */ sw $t1, 0x28($sp) -/* 018DF0 800181F0 AFAB0030 */ sw $t3, 0x30($sp) -/* 018DF4 800181F4 01C04025 */ move $t0, $t6 -/* 018DF8 800181F8 AFAE002C */ sw $t6, 0x2c($sp) -/* 018DFC 800181FC AFAD0044 */ sw $t5, 0x44($sp) -/* 018E00 80018200 AFAA0034 */ sw $t2, 0x34($sp) -/* 018E04 80018204 AFA50040 */ sw $a1, 0x40($sp) -/* 018E08 80018208 AFA30038 */ sw $v1, 0x38($sp) -/* 018E0C 8001820C 022B8821 */ addu $s1, $s1, $t3 -/* 018E10 80018210 0C0034CF */ jal func_8000D33C -/* 018E14 80018214 AFAC004C */ sw $t4, 0x4c($sp) -/* 018E18 80018218 8FAA0034 */ lw $t2, 0x34($sp) -/* 018E1C 8001821C 8FBF0028 */ lw $ra, 0x28($sp) -/* 018E20 80018220 3C0F8016 */ lui $t7, %hi(gNearestWaypointByPlayerId) # 0x8016 -/* 018E24 80018224 01EA7821 */ addu $t7, $t7, $t2 -/* 018E28 80018228 A7E20000 */ sh $v0, ($ra) -/* 018E2C 8001822C 8FAC004C */ lw $t4, 0x4c($sp) -/* 018E30 80018230 95EF4438 */ lhu $t7, %lo(gNearestWaypointByPlayerId)($t7) # 0x4438($t7) -/* 018E34 80018234 87E90000 */ lh $t1, ($ra) -/* 018E38 80018238 8FA30038 */ lw $v1, 0x38($sp) -/* 018E3C 8001823C 01ECC821 */ addu $t9, $t7, $t4 -/* 018E40 80018240 272EFFFE */ addiu $t6, $t9, -2 -/* 018E44 80018244 01CC001A */ div $zero, $t6, $t4 -/* 018E48 80018248 00007810 */ mfhi $t7 -/* 018E4C 8001824C 8FAB0030 */ lw $t3, 0x30($sp) -/* 018E50 80018250 8FAD0044 */ lw $t5, 0x44($sp) -/* 018E54 80018254 15800002 */ bnez $t4, .L80018260 -/* 018E58 80018258 00000000 */ nop -/* 018E5C 8001825C 0007000D */ break 7 -.L80018260: -/* 018E60 80018260 2401FFFF */ li $at, -1 -/* 018E64 80018264 15810004 */ bne $t4, $at, .L80018278 -/* 018E68 80018268 3C018000 */ lui $at, 0x8000 -/* 018E6C 8001826C 15C10002 */ bne $t6, $at, .L80018278 -/* 018E70 80018270 00000000 */ nop -/* 018E74 80018274 0006000D */ break 6 -.L80018278: -/* 018E78 80018278 31E4FFFF */ andi $a0, $t7, 0xffff -/* 018E7C 8001827C A7AF009C */ sh $t7, 0x9c($sp) -/* 018E80 80018280 24060001 */ li $a2, 1 -/* 018E84 80018284 2407000A */ li $a3, 10 -/* 018E88 80018288 AFAC0010 */ sw $t4, 0x10($sp) -/* 018E8C 8001828C 3125FFFF */ andi $a1, $t1, 0xffff -/* 018E90 80018290 0C001EFE */ jal func_80007BF8 -/* 018E94 80018294 A7A9009E */ sh $t1, 0x9e($sp) -/* 018E98 80018298 8FA30038 */ lw $v1, 0x38($sp) -/* 018E9C 8001829C 87A8009C */ lh $t0, 0x9c($sp) -/* 018EA0 800182A0 87A9009E */ lh $t1, 0x9e($sp) -/* 018EA4 800182A4 8FAB0030 */ lw $t3, 0x30($sp) -/* 018EA8 800182A8 8FAC004C */ lw $t4, 0x4c($sp) -/* 018EAC 800182AC 1C40000E */ bgtz $v0, .L800182E8 -/* 018EB0 800182B0 8FAD0044 */ lw $t5, 0x44($sp) -/* 018EB4 800182B4 8FB90040 */ lw $t9, 0x40($sp) -/* 018EB8 800182B8 8FAE002C */ lw $t6, 0x2c($sp) -/* 018EBC 800182BC 3C068016 */ lui $a2, %hi(D_80164680) # 0x8016 -/* 018EC0 800182C0 8F250000 */ lw $a1, ($t9) -/* 018EC4 800182C4 00CE3021 */ addu $a2, $a2, $t6 -/* 018EC8 800182C8 84C64680 */ lh $a2, %lo(D_80164680)($a2) # 0x4680($a2) -/* 018ECC 800182CC AFAD0044 */ sw $t5, 0x44($sp) -/* 018ED0 800182D0 AFAC004C */ sw $t4, 0x4c($sp) -/* 018ED4 800182D4 0C0068D2 */ jal func_8001A348 -/* 018ED8 800182D8 8FA400AC */ lw $a0, 0xac($sp) -/* 018EDC 800182DC 8FAC004C */ lw $t4, 0x4c($sp) -/* 018EE0 800182E0 10000036 */ b .L800183BC -/* 018EE4 800182E4 8FAD0044 */ lw $t5, 0x44($sp) -.L800182E8: -/* 018EE8 800182E8 0128082A */ slt $at, $t1, $t0 -/* 018EEC 800182EC 5020000E */ beql $at, $zero, .L80018328 -/* 018EF0 800182F0 0109082A */ slt $at, $t0, $t1 -/* 018EF4 800182F4 0109C023 */ subu $t8, $t0, $t1 -/* 018EF8 800182F8 2B010003 */ slti $at, $t8, 3 -/* 018EFC 800182FC 10200009 */ beqz $at, .L80018324 -/* 018F00 80018300 3C01800F */ lui $at, %hi(gPlayers+0x94) -/* 018F04 80018304 002B0821 */ addu $at, $at, $t3 -/* 018F08 80018308 C4286A24 */ lwc1 $f8, %lo(gPlayers+0x94)($at) -/* 018F0C 8001830C 3C01800F */ lui $at, %hi(D_800ED298) -/* 018F10 80018310 D424D298 */ ldc1 $f4, %lo(D_800ED298)($at) -/* 018F14 80018314 460042A1 */ cvt.d.s $f10, $f8 -/* 018F18 80018318 46245180 */ add.d $f6, $f10, $f4 -/* 018F1C 8001831C 46203220 */ cvt.s.d $f8, $f6 -/* 018F20 80018320 E4680000 */ swc1 $f8, ($v1) -.L80018324: -/* 018F24 80018324 0109082A */ slt $at, $t0, $t1 -.L80018328: -/* 018F28 80018328 5020000E */ beql $at, $zero, .L80018364 -/* 018F2C 8001832C C4640000 */ lwc1 $f4, ($v1) -/* 018F30 80018330 01287823 */ subu $t7, $t1, $t0 -/* 018F34 80018334 29E10003 */ slti $at, $t7, 3 -/* 018F38 80018338 10200009 */ beqz $at, .L80018360 -/* 018F3C 8001833C 3C01800F */ lui $at, %hi(gPlayers+0x94) -/* 018F40 80018340 002B0821 */ addu $at, $at, $t3 -/* 018F44 80018344 C42A6A24 */ lwc1 $f10, %lo(gPlayers+0x94)($at) -/* 018F48 80018348 3C01800F */ lui $at, %hi(D_800ED2A0) -/* 018F4C 8001834C D426D2A0 */ ldc1 $f6, %lo(D_800ED2A0)($at) -/* 018F50 80018350 46005121 */ cvt.d.s $f4, $f10 -/* 018F54 80018354 46262201 */ sub.d $f8, $f4, $f6 -/* 018F58 80018358 462042A0 */ cvt.s.d $f10, $f8 -/* 018F5C 8001835C E46A0000 */ swc1 $f10, ($v1) -.L80018360: -/* 018F60 80018360 C4640000 */ lwc1 $f4, ($v1) -.L80018364: -/* 018F64 80018364 3C014024 */ li $at, 0x40240000 # 2.562500 -/* 018F68 80018368 44813800 */ mtc1 $at, $f7 -/* 018F6C 8001836C 44803000 */ mtc1 $zero, $f6 -/* 018F70 80018370 46002021 */ cvt.d.s $f0, $f4 -/* 018F74 80018374 44802000 */ mtc1 $zero, $f4 -/* 018F78 80018378 4620303C */ c.lt.d $f6, $f0 -/* 018F7C 8001837C 44802800 */ mtc1 $zero, $f5 -/* 018F80 80018380 45020008 */ bc1fl .L800183A4 -/* 018F84 80018384 4624003C */ c.lt.d $f0, $f4 -/* 018F88 80018388 3C014120 */ li $at, 0x41200000 # 10.000000 -/* 018F8C 8001838C 44814000 */ mtc1 $at, $f8 -/* 018F90 80018390 00000000 */ nop -/* 018F94 80018394 E4680000 */ swc1 $f8, ($v1) -/* 018F98 80018398 C46A0000 */ lwc1 $f10, ($v1) -/* 018F9C 8001839C 46005021 */ cvt.d.s $f0, $f10 -/* 018FA0 800183A0 4624003C */ c.lt.d $f0, $f4 -.L800183A4: -/* 018FA4 800183A4 00000000 */ nop -/* 018FA8 800183A8 45020005 */ bc1fl .L800183C0 -/* 018FAC 800183AC 8FB90028 */ lw $t9, 0x28($sp) -/* 018FB0 800183B0 44803000 */ mtc1 $zero, $f6 -/* 018FB4 800183B4 00000000 */ nop -/* 018FB8 800183B8 E4660000 */ swc1 $f6, ($v1) -.L800183BC: -/* 018FBC 800183BC 8FB90028 */ lw $t9, 0x28($sp) -.L800183C0: -/* 018FC0 800183C0 87A60052 */ lh $a2, 0x52($sp) -/* 018FC4 800183C4 87220000 */ lh $v0, ($t9) -/* 018FC8 800183C8 244E0001 */ addiu $t6, $v0, 1 -/* 018FCC 800183CC 01CC001A */ div $zero, $t6, $t4 -/* 018FD0 800183D0 00001810 */ mfhi $v1 -/* 018FD4 800183D4 24590002 */ addiu $t9, $v0, 2 -/* 018FD8 800183D8 15800002 */ bnez $t4, .L800183E4 -/* 018FDC 800183DC 00000000 */ nop -/* 018FE0 800183E0 0007000D */ break 7 -.L800183E4: -/* 018FE4 800183E4 2401FFFF */ li $at, -1 -/* 018FE8 800183E8 15810004 */ bne $t4, $at, .L800183FC -/* 018FEC 800183EC 3C018000 */ lui $at, 0x8000 -/* 018FF0 800183F0 15C10002 */ bne $t6, $at, .L800183FC -/* 018FF4 800183F4 00000000 */ nop -/* 018FF8 800183F8 0006000D */ break 6 -.L800183FC: -/* 018FFC 800183FC 032C001A */ div $zero, $t9, $t4 -/* 019000 80018400 0003C400 */ sll $t8, $v1, 0x10 -/* 019004 80018404 00187C03 */ sra $t7, $t8, 0x10 -/* 019008 80018408 8FB80040 */ lw $t8, 0x40($sp) -/* 01900C 8001840C 00007010 */ mfhi $t6 -/* 019010 80018410 A7AE0060 */ sh $t6, 0x60($sp) -/* 019014 80018414 8F050000 */ lw $a1, ($t8) -/* 019018 80018418 01E01825 */ move $v1, $t7 -/* 01901C 8001841C 15800002 */ bnez $t4, .L80018428 -/* 019020 80018420 00000000 */ nop -/* 019024 80018424 0007000D */ break 7 -.L80018428: -/* 019028 80018428 2401FFFF */ li $at, -1 -/* 01902C 8001842C 15810004 */ bne $t4, $at, .L80018440 -/* 019030 80018430 3C018000 */ li $at, 0x80000000 # -0.000000 -/* 019034 80018434 17210002 */ bne $t9, $at, .L80018440 -/* 019038 80018438 00000000 */ nop -/* 01903C 8001843C 0006000D */ break 6 -.L80018440: -/* 019040 80018440 3064FFFF */ andi $a0, $v1, 0xffff -/* 019044 80018444 A7A30062 */ sh $v1, 0x62($sp) -/* 019048 80018448 AFAD0044 */ sw $t5, 0x44($sp) -/* 01904C 8001844C 0C002EF6 */ jal func_8000BBD8 -/* 019050 80018450 AFA60038 */ sw $a2, 0x38($sp) -/* 019054 80018454 3C088016 */ lui $t0, %hi(D_80162FA0) # $t0, 0x8016 -/* 019058 80018458 25082FA0 */ addiu $t0, %lo(D_80162FA0) # addiu $t0, $t0, 0x2fa0 -/* 01905C 8001845C C5080000 */ lwc1 $f8, ($t0) -/* 019060 80018460 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 019064 80018464 44810800 */ mtc1 $at, $f1 -/* 019068 80018468 44800000 */ mtc1 $zero, $f0 -/* 01906C 8001846C C5060008 */ lwc1 $f6, 8($t0) -/* 019070 80018470 460042A1 */ cvt.d.s $f10, $f8 -/* 019074 80018474 8FAF0040 */ lw $t7, 0x40($sp) -/* 019078 80018478 46205102 */ mul.d $f4, $f10, $f0 -/* 01907C 8001847C 46003221 */ cvt.d.s $f8, $f6 -/* 019080 80018480 8DE50000 */ lw $a1, ($t7) -/* 019084 80018484 8FA60038 */ lw $a2, 0x38($sp) -/* 019088 80018488 46204282 */ mul.d $f10, $f8, $f0 -/* 01908C 8001848C 97A40060 */ lhu $a0, 0x60($sp) -/* 019090 80018490 462020A0 */ cvt.s.d $f2, $f4 -/* 019094 80018494 462053A0 */ cvt.s.d $f14, $f10 -/* 019098 80018498 E7A20080 */ swc1 $f2, 0x80($sp) -/* 01909C 8001849C 0C002EF6 */ jal func_8000BBD8 -/* 0190A0 800184A0 E7AE0078 */ swc1 $f14, 0x78($sp) -/* 0190A4 800184A4 3C088016 */ lui $t0, %hi(D_80162FA0) # $t0, 0x8016 -/* 0190A8 800184A8 25082FA0 */ addiu $t0, %lo(D_80162FA0) # addiu $t0, $t0, 0x2fa0 -/* 0190AC 800184AC C5060000 */ lwc1 $f6, ($t0) -/* 0190B0 800184B0 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 0190B4 800184B4 44810800 */ mtc1 $at, $f1 -/* 0190B8 800184B8 44800000 */ mtc1 $zero, $f0 -/* 0190BC 800184BC 46003221 */ cvt.d.s $f8, $f6 -/* 0190C0 800184C0 C7A20080 */ lwc1 $f2, 0x80($sp) -/* 0190C4 800184C4 46204282 */ mul.d $f10, $f8, $f0 -/* 0190C8 800184C8 8FB90050 */ lw $t9, 0x50($sp) -/* 0190CC 800184CC 46001121 */ cvt.d.s $f4, $f2 -/* 0190D0 800184D0 87B80060 */ lh $t8, 0x60($sp) -/* 0190D4 800184D4 3C028016 */ lui $v0, %hi(D_80164550) # 0x8016 -/* 0190D8 800184D8 00197080 */ sll $t6, $t9, 2 -/* 0190DC 800184DC 004E1021 */ addu $v0, $v0, $t6 -/* 0190E0 800184E0 8C424550 */ lw $v0, %lo(D_80164550)($v0) # 0x4550($v0) -/* 0190E4 800184E4 462A2180 */ add.d $f6, $f4, $f10 -/* 0190E8 800184E8 C5040008 */ lwc1 $f4, 8($t0) -/* 0190EC 800184EC 001878C0 */ sll $t7, $t8, 3 -/* 0190F0 800184F0 87B80062 */ lh $t8, 0x62($sp) -/* 0190F4 800184F4 460022A1 */ cvt.d.s $f10, $f4 -/* 0190F8 800184F8 462030A0 */ cvt.s.d $f2, $f6 -/* 0190FC 800184FC 004FC821 */ addu $t9, $v0, $t7 -/* 019100 80018500 46205182 */ mul.d $f6, $f10, $f0 -/* 019104 80018504 872E0002 */ lh $t6, 2($t9) -/* 019108 80018508 001878C0 */ sll $t7, $t8, 3 -/* 01910C 8001850C 004FC821 */ addu $t9, $v0, $t7 -/* 019110 80018510 C7AE0078 */ lwc1 $f14, 0x78($sp) -/* 019114 80018514 87380002 */ lh $t8, 2($t9) -/* 019118 80018518 8FAD0044 */ lw $t5, 0x44($sp) -/* 01911C 8001851C 46007221 */ cvt.d.s $f8, $f14 -/* 019120 80018520 01D87821 */ addu $t7, $t6, $t8 -/* 019124 80018524 448F5000 */ mtc1 $t7, $f10 -/* 019128 80018528 46264100 */ add.d $f4, $f8, $f6 -/* 01912C 8001852C 44803000 */ mtc1 $zero, $f6 -/* 019130 80018530 44813800 */ mtc1 $at, $f7 -/* 019134 80018534 46805221 */ cvt.d.w $f8, $f10 -/* 019138 80018538 3C0E8016 */ lui $t6, %hi(D_80164618) # $t6, 0x8016 -/* 01913C 8001853C 25CE4618 */ addiu $t6, %lo(D_80164618) # addiu $t6, $t6, 0x4618 -/* 019140 80018540 01AE3021 */ addu $a2, $t5, $t6 -/* 019144 80018544 462023A0 */ cvt.s.d $f14, $f4 -/* 019148 80018548 46264102 */ mul.d $f4, $f8, $f6 -/* 01914C 8001854C C4C80000 */ lwc1 $f8, ($a2) -/* 019150 80018550 3C198016 */ lui $t9, %hi(D_801645F8) # $t9, 0x8016 -/* 019154 80018554 273945F8 */ addiu $t9, %lo(D_801645F8) # addiu $t9, $t9, 0x45f8 -/* 019158 80018558 01B91821 */ addu $v1, $t5, $t9 -/* 01915C 8001855C C46A0000 */ lwc1 $f10, ($v1) -/* 019160 80018560 3C188016 */ lui $t8, %hi(D_80164638) # $t8, 0x8016 -/* 019164 80018564 27184638 */ addiu $t8, %lo(D_80164638) # addiu $t8, $t8, 0x4638 -/* 019168 80018568 462024A0 */ cvt.s.d $f18, $f4 -/* 01916C 8001856C 01B83821 */ addu $a3, $t5, $t8 -/* 019170 80018570 C4E40000 */ lwc1 $f4, ($a3) -/* 019174 80018574 460A1401 */ sub.s $f16, $f2, $f10 -/* 019178 80018578 AFA70034 */ sw $a3, 0x34($sp) -/* 01917C 8001857C AFA30040 */ sw $v1, 0x40($sp) -/* 019180 80018580 46089181 */ sub.s $f6, $f18, $f8 -/* 019184 80018584 E7B00074 */ swc1 $f16, 0x74($sp) -/* 019188 80018588 AFA60038 */ sw $a2, 0x38($sp) -/* 01918C 8001858C 46047281 */ sub.s $f10, $f14, $f4 -/* 019190 80018590 E7A60070 */ swc1 $f6, 0x70($sp) -/* 019194 80018594 C7A80070 */ lwc1 $f8, 0x70($sp) -/* 019198 80018598 E7AA006C */ swc1 $f10, 0x6c($sp) -/* 01919C 8001859C 46084182 */ mul.s $f6, $f8, $f8 -/* 0191A0 800185A0 C7A8006C */ lwc1 $f8, 0x6c($sp) -/* 0191A4 800185A4 46108102 */ mul.s $f4, $f16, $f16 -/* 0191A8 800185A8 46062280 */ add.s $f10, $f4, $f6 -/* 0191AC 800185AC 46084102 */ mul.s $f4, $f8, $f8 -/* 0191B0 800185B0 0C033850 */ jal sqrtf -/* 0191B4 800185B4 46045300 */ add.s $f12, $f10, $f4 -/* 0191B8 800185B8 44803800 */ mtc1 $zero, $f7 -/* 0191BC 800185BC 44803000 */ mtc1 $zero, $f6 -/* 0191C0 800185C0 46000221 */ cvt.d.s $f8, $f0 -/* 0191C4 800185C4 8FA30040 */ lw $v1, 0x40($sp) -/* 0191C8 800185C8 46283032 */ c.eq.d $f6, $f8 -/* 0191CC 800185CC 8FA60038 */ lw $a2, 0x38($sp) -/* 0191D0 800185D0 8FA70034 */ lw $a3, 0x34($sp) -/* 0191D4 800185D4 8FAF003C */ lw $t7, 0x3c($sp) -/* 0191D8 800185D8 45010012 */ bc1t .L80018624 -/* 0191DC 800185DC 3C014024 */ li $at, 0x40240000 # 2.562500 -/* 0191E0 800185E0 C5F00000 */ lwc1 $f16, ($t7) -/* 0191E4 800185E4 C7AA0074 */ lwc1 $f10, 0x74($sp) -/* 0191E8 800185E8 C4680000 */ lwc1 $f8, ($v1) -/* 0191EC 800185EC 460A8102 */ mul.s $f4, $f16, $f10 -/* 0191F0 800185F0 C7AA0070 */ lwc1 $f10, 0x70($sp) -/* 0191F4 800185F4 46002183 */ div.s $f6, $f4, $f0 -/* 0191F8 800185F8 460A8102 */ mul.s $f4, $f16, $f10 -/* 0191FC 800185FC C7AA006C */ lwc1 $f10, 0x6c($sp) -/* 019200 80018600 46083080 */ add.s $f2, $f6, $f8 -/* 019204 80018604 C4C80000 */ lwc1 $f8, ($a2) -/* 019208 80018608 46002183 */ div.s $f6, $f4, $f0 -/* 01920C 8001860C 460A8102 */ mul.s $f4, $f16, $f10 -/* 019210 80018610 46083480 */ add.s $f18, $f6, $f8 -/* 019214 80018614 C4E80000 */ lwc1 $f8, ($a3) -/* 019218 80018618 46002183 */ div.s $f6, $f4, $f0 -/* 01921C 8001861C 10000004 */ b .L80018630 -/* 019220 80018620 46083380 */ add.s $f14, $f6, $f8 -.L80018624: -/* 019224 80018624 C4620000 */ lwc1 $f2, ($v1) -/* 019228 80018628 C4D20000 */ lwc1 $f18, ($a2) -/* 01922C 8001862C C4EE0000 */ lwc1 $f14, ($a3) -.L80018630: -/* 019230 80018630 E6020000 */ swc1 $f2, ($s0) -/* 019234 80018634 E60E0008 */ swc1 $f14, 8($s0) -/* 019238 80018638 C62A0018 */ lwc1 $f10, 0x18($s1) -/* 01923C 8001863C 44813800 */ mtc1 $at, $f7 -/* 019240 80018640 44803000 */ mtc1 $zero, $f6 -/* 019244 80018644 46005121 */ cvt.d.s $f4, $f10 -/* 019248 80018648 3C014018 */ li $at, 0x40180000 # 2.375000 -/* 01924C 8001864C 46262200 */ add.d $f8, $f4, $f6 -/* 019250 80018650 462042A0 */ cvt.s.d $f10, $f8 -/* 019254 80018654 44815800 */ mtc1 $at, $f11 -/* 019258 80018658 E60A0004 */ swc1 $f10, 4($s0) -/* 01925C 8001865C E4620000 */ swc1 $f2, ($v1) -/* 019260 80018660 E4D20000 */ swc1 $f18, ($a2) -/* 019264 80018664 E4EE0000 */ swc1 $f14, ($a3) -/* 019268 80018668 C6240014 */ lwc1 $f4, 0x14($s1) -/* 01926C 8001866C 44805000 */ mtc1 $zero, $f10 -/* 019270 80018670 E604000C */ swc1 $f4, 0xc($s0) -/* 019274 80018674 C6260018 */ lwc1 $f6, 0x18($s1) -/* 019278 80018678 46003221 */ cvt.d.s $f8, $f6 -/* 01927C 8001867C 462A4100 */ add.d $f4, $f8, $f10 -/* 019280 80018680 462021A0 */ cvt.s.d $f6, $f4 -/* 019284 80018684 E6060010 */ swc1 $f6, 0x10($s0) -/* 019288 80018688 C628001C */ lwc1 $f8, 0x1c($s1) -/* 01928C 8001868C E6080014 */ swc1 $f8, 0x14($s0) -/* 019290 80018690 8FA50050 */ lw $a1, 0x50($sp) -/* 019294 80018694 0C00534C */ jal func_80014D30 -/* 019298 80018698 8FA400AC */ lw $a0, 0xac($sp) -/* 01929C 8001869C C60A000C */ lwc1 $f10, 0xc($s0) -/* 0192A0 800186A0 C6040000 */ lwc1 $f4, ($s0) -/* 0192A4 800186A4 C6060010 */ lwc1 $f6, 0x10($s0) -/* 0192A8 800186A8 C6080004 */ lwc1 $f8, 4($s0) -/* 0192AC 800186AC 46045301 */ sub.s $f12, $f10, $f4 -/* 0192B0 800186B0 46083281 */ sub.s $f10, $f6, $f8 -/* 0192B4 800186B4 E7AA0090 */ swc1 $f10, 0x90($sp) -/* 0192B8 800186B8 C6060008 */ lwc1 $f6, 8($s0) -/* 0192BC 800186BC C6040014 */ lwc1 $f4, 0x14($s0) -/* 0192C0 800186C0 E7AC0094 */ swc1 $f12, 0x94($sp) -/* 0192C4 800186C4 46062381 */ sub.s $f14, $f4, $f6 -/* 0192C8 800186C8 0C0ADE0C */ jal atan2s -/* 0192CC 800186CC E7AE008C */ swc1 $f14, 0x8c($sp) -/* 0192D0 800186D0 C7A00094 */ lwc1 $f0, 0x94($sp) -/* 0192D4 800186D4 C7AE008C */ lwc1 $f14, 0x8c($sp) -/* 0192D8 800186D8 A6020026 */ sh $v0, 0x26($s0) -/* 0192DC 800186DC 46000202 */ mul.s $f8, $f0, $f0 -/* 0192E0 800186E0 00000000 */ nop -/* 0192E4 800186E4 460E7282 */ mul.s $f10, $f14, $f14 -/* 0192E8 800186E8 0C033850 */ jal sqrtf -/* 0192EC 800186EC 460A4300 */ add.s $f12, $f8, $f10 -/* 0192F0 800186F0 46000306 */ mov.s $f12, $f0 -/* 0192F4 800186F4 0C0ADE0C */ jal atan2s -/* 0192F8 800186F8 C7AE0090 */ lwc1 $f14, 0x90($sp) -/* 0192FC 800186FC A6020024 */ sh $v0, 0x24($s0) -/* 019300 80018700 A6000028 */ sh $zero, 0x28($s0) -/* 019304 80018704 8FBF0024 */ lw $ra, 0x24($sp) -/* 019308 80018708 8FB10020 */ lw $s1, 0x20($sp) -/* 01930C 8001870C 8FB0001C */ lw $s0, 0x1c($sp) -/* 019310 80018710 03E00008 */ jr $ra -/* 019314 80018714 27BD00A0 */ addiu $sp, $sp, 0xa0 diff --git a/asm/non_matchings/code_80005FD0/func_800188F4.s b/asm/non_matchings/code_80005FD0/func_800188F4.s deleted file mode 100644 index 269d6d757..000000000 --- a/asm/non_matchings/code_80005FD0/func_800188F4.s +++ /dev/null @@ -1,590 +0,0 @@ -.section .late_rodata - -glabel D_800ED2A8 -.double 0.2 - -glabel D_800ED2B0 -.double 0.7 - -glabel D_800ED2B8 -.double 0.01 - -glabel D_800ED2C0 -.double -0.9 - -glabel D_800ED2C8 -.float -0.9 -.word 0x00000000 - -glabel D_800ED2D0 -.double 0.8 - -glabel D_800ED2D8 -.double 0.2 - -glabel D_800ED2E0 -.double 1.3 - -glabel D_800ED2E8 -.double 0.01 - -glabel D_800ED2F0 -.double 0.9 - -glabel D_800ED2F8 -.float 0.9 -.word 0x00000000 - -glabel D_800ED300 -.double 1.2 - -glabel D_800ED308 -.double 3000.0 - -.section .text - -glabel func_800188F4 -/* 0194F4 800188F4 27BDFF48 */ addiu $sp, $sp, -0xb8 -/* 0194F8 800188F8 3C0E800E */ lui $t6, %hi(gPlayerOne) -/* 0194FC 800188FC 8DCEC4DC */ lw $t6, %lo(gPlayerOne)($t6) -/* 019500 80018900 AFBF0024 */ sw $ra, 0x24($sp) -/* 019504 80018904 AFB00020 */ sw $s0, 0x20($sp) -/* 019508 80018908 AFA500BC */ sw $a1, 0xbc($sp) -/* 01950C 8001890C AFA600C0 */ sw $a2, 0xc0($sp) -/* 019510 80018910 AFA700C4 */ sw $a3, 0xc4($sp) -/* 019514 80018914 AFAE00A0 */ sw $t6, 0xa0($sp) -/* 019518 80018918 848500AE */ lh $a1, 0xae($a0) -/* 01951C 8001891C 3C0F8016 */ lui $t7, %hi(gPathIndexByPlayerId) # 0x8016 -/* 019520 80018920 3C038016 */ lui $v1, %hi(D_8016448C) # $v1, 0x8016 -/* 019524 80018924 00051040 */ sll $v0, $a1, 1 -/* 019528 80018928 000548C0 */ sll $t1, $a1, 3 -/* 01952C 8001892C 01E27821 */ addu $t7, $t7, $v0 -/* 019530 80018930 01254823 */ subu $t1, $t1, $a1 -/* 019534 80018934 95EF45B0 */ lhu $t7, %lo(gPathIndexByPlayerId)($t7) # 0x45b0($t7) -/* 019538 80018938 00094900 */ sll $t1, $t1, 4 -/* 01953C 8001893C 01254823 */ subu $t1, $t1, $a1 -/* 019540 80018940 00094880 */ sll $t1, $t1, 2 -/* 019544 80018944 01254823 */ subu $t1, $t1, $a1 -/* 019548 80018948 2463448C */ addiu $v1, %lo(D_8016448C) # addiu $v1, $v1, 0x448c -/* 01954C 8001894C 000948C0 */ sll $t1, $t1, 3 -/* 019550 80018950 3C01800F */ lui $at, %hi(gPlayers+0x94) -/* 019554 80018954 AFAF0068 */ sw $t7, 0x68($sp) -/* 019558 80018958 000FC840 */ sll $t9, $t7, 1 -/* 01955C 8001895C 8C780000 */ lw $t8, ($v1) -/* 019560 80018960 3C0A8016 */ lui $t2, %hi(gWaypointCountByPathIndex) # 0x8016 -/* 019564 80018964 3C0F8016 */ lui $t7, %hi(D_80164648) # $t7, 0x8016 -/* 019568 80018968 00290821 */ addu $at, $at, $t1 -/* 01956C 8001896C C42C6A24 */ lwc1 $f12, %lo(gPlayers+0x94)($at) -/* 019570 80018970 01595021 */ addu $t2, $t2, $t9 -/* 019574 80018974 25EF4648 */ addiu $t7, %lo(D_80164648) # addiu $t7, $t7, 0x4648 -/* 019578 80018978 00076080 */ sll $t4, $a3, 2 -/* 01957C 8001897C 954A45C8 */ lhu $t2, %lo(gWaypointCountByPathIndex)($t2) # 0x45c8($t2) -/* 019580 80018980 018F6821 */ addu $t5, $t4, $t7 -/* 019584 80018984 00808025 */ move $s0, $a0 -/* 019588 80018988 17000054 */ bnez $t8, .L80018ADC -/* 01958C 8001898C E5AC0000 */ swc1 $f12, ($t5) -/* 019590 80018990 3C0F8016 */ lui $t7, %hi(gNearestWaypointByPlayerId) # $t7, 0x8016 -/* 019594 80018994 25EF4438 */ addiu $t7, %lo(gNearestWaypointByPlayerId) # addiu $t7, $t7, 0x4438 -/* 019598 80018998 3C0E8016 */ lui $t6, %hi(gNearestWaypointByCameraId) # $t6, 0x8016 -/* 01959C 8001899C 25CE4668 */ addiu $t6, %lo(gNearestWaypointByCameraId) # addiu $t6, $t6, 0x4668 -/* 0195A0 800189A0 004FC021 */ addu $t8, $v0, $t7 -/* 0195A4 800189A4 0007C840 */ sll $t9, $a3, 1 -/* 0195A8 800189A8 032E5821 */ addu $t3, $t9, $t6 -/* 0195AC 800189AC AFB8003C */ sw $t8, 0x3c($sp) -/* 0195B0 800189B0 970E0000 */ lhu $t6, ($t8) -/* 0195B4 800189B4 0320F825 */ move $ra, $t9 -/* 0195B8 800189B8 0300C825 */ move $t9, $t8 -/* 0195BC 800189BC 01CA7821 */ addu $t7, $t6, $t2 -/* 0195C0 800189C0 25F8FFFA */ addiu $t8, $t7, -6 -/* 0195C4 800189C4 030A001A */ div $zero, $t8, $t2 -/* 0195C8 800189C8 85670000 */ lh $a3, ($t3) -/* 0195CC 800189CC 15400002 */ bnez $t2, .L800189D8 -/* 0195D0 800189D0 00000000 */ nop -/* 0195D4 800189D4 0007000D */ break 7 -.L800189D8: -/* 0195D8 800189D8 2401FFFF */ li $at, -1 -/* 0195DC 800189DC 15410004 */ bne $t2, $at, .L800189F0 -/* 0195E0 800189E0 3C018000 */ lui $at, 0x8000 -/* 0195E4 800189E4 17010002 */ bne $t8, $at, .L800189F0 -/* 0195E8 800189E8 00000000 */ nop -/* 0195EC 800189EC 0006000D */ break 6 -.L800189F0: -/* 0195F0 800189F0 0000C810 */ mfhi $t9 -/* 0195F4 800189F4 3C0F8016 */ lui $t7, %hi(D_80164688) # $t7, 0x8016 -/* 0195F8 800189F8 14F90003 */ bne $a3, $t9, .L80018A08 -/* 0195FC 800189FC 25EF4688 */ addiu $t7, %lo(D_80164688) # addiu $t7, $t7, 0x4688 -/* 019600 80018A00 240E0001 */ li $t6, 1 -/* 019604 80018A04 AC6E0000 */ sw $t6, ($v1) -.L80018A08: -/* 019608 80018A08 0005C080 */ sll $t8, $a1, 2 -/* 01960C 80018A0C 3C018016 */ lui $at, %hi(D_80163068) -/* 019610 80018A10 00380821 */ addu $at, $at, $t8 -/* 019614 80018A14 C4263068 */ lwc1 $f6, %lo(D_80163068)($at) -/* 019618 80018A18 3C01800F */ lui $at, %hi(D_800ED2A8) -/* 01961C 80018A1C D428D2A8 */ ldc1 $f8, %lo(D_800ED2A8)($at) -/* 019620 80018A20 460030A1 */ cvt.d.s $f2, $f6 -/* 019624 80018A24 018F1821 */ addu $v1, $t4, $t7 -/* 019628 80018A28 C4640000 */ lwc1 $f4, ($v1) -/* 01962C 80018A2C 46281281 */ sub.d $f10, $f2, $f8 -/* 019630 80018A30 3C01800F */ lui $at, %hi(D_800ED2B0) -/* 019634 80018A34 46002021 */ cvt.d.s $f0, $f4 -/* 019638 80018A38 462A003C */ c.lt.d $f0, $f10 -/* 01963C 80018A3C 00000000 */ nop -/* 019640 80018A40 45020007 */ bc1fl .L80018A60 -/* 019644 80018A44 3C013FE0 */ lui $at, 0x3fe0 -/* 019648 80018A48 D426D2B0 */ ldc1 $f6, %lo(D_800ED2B0)($at) -/* 01964C 80018A4C 46006121 */ cvt.d.s $f4, $f12 -/* 019650 80018A50 46262202 */ mul.d $f8, $f4, $f6 -/* 019654 80018A54 462042A0 */ cvt.s.d $f10, $f8 -/* 019658 80018A58 E5AA0000 */ swc1 $f10, ($t5) -/* 01965C 80018A5C 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -.L80018A60: -/* 019660 80018A60 44812800 */ mtc1 $at, $f5 -/* 019664 80018A64 44802000 */ mtc1 $zero, $f4 -/* 019668 80018A68 3C01800F */ lui $at, %hi(D_800ED2B8) -/* 01966C 80018A6C 46241181 */ sub.d $f6, $f2, $f4 -/* 019670 80018A70 4620303C */ c.lt.d $f6, $f0 -/* 019674 80018A74 00000000 */ nop -/* 019678 80018A78 45000007 */ bc1f .L80018A98 -/* 01967C 80018A7C 00000000 */ nop -/* 019680 80018A80 D428D2B8 */ ldc1 $f8, %lo(D_800ED2B8)($at) -/* 019684 80018A84 46280281 */ sub.d $f10, $f0, $f8 -/* 019688 80018A88 46205120 */ cvt.s.d $f4, $f10 -/* 01968C 80018A8C E4640000 */ swc1 $f4, ($v1) -/* 019690 80018A90 C4660000 */ lwc1 $f6, ($v1) -/* 019694 80018A94 46003021 */ cvt.d.s $f0, $f6 -.L80018A98: -/* 019698 80018A98 3C01800F */ lui $at, %hi(D_800ED2C0) -/* 01969C 80018A9C D428D2C0 */ ldc1 $f8, %lo(D_800ED2C0)($at) -/* 0196A0 80018AA0 3C01800F */ lui $at, %hi(D_800ED2C8) # $at, 0x800f -/* 0196A4 80018AA4 4628003C */ c.lt.d $f0, $f8 -/* 0196A8 80018AA8 00000000 */ nop -/* 0196AC 80018AAC 45000009 */ bc1f .L80018AD4 -/* 0196B0 80018AB0 00000000 */ nop -/* 0196B4 80018AB4 C42AD2C8 */ lwc1 $f10, %lo(D_800ED2C8)($at) -/* 0196B8 80018AB8 3C01800F */ lui $at, %hi(D_800ED2D0) -/* 0196BC 80018ABC 46006121 */ cvt.d.s $f4, $f12 -/* 0196C0 80018AC0 E46A0000 */ swc1 $f10, ($v1) -/* 0196C4 80018AC4 D426D2D0 */ ldc1 $f6, %lo(D_800ED2D0)($at) -/* 0196C8 80018AC8 46262202 */ mul.d $f8, $f4, $f6 -/* 0196CC 80018ACC 462042A0 */ cvt.s.d $f10, $f8 -/* 0196D0 80018AD0 E5AA0000 */ swc1 $f10, ($t5) -.L80018AD4: -/* 0196D4 80018AD4 10000051 */ b .L80018C1C -/* 0196D8 80018AD8 AFA70040 */ sw $a3, 0x40($sp) -.L80018ADC: -/* 0196DC 80018ADC 8FBF00C4 */ lw $ra, 0xc4($sp) -/* 0196E0 80018AE0 3C0F8016 */ lui $t7, %hi(gNearestWaypointByPlayerId) # $t7, 0x8016 -/* 0196E4 80018AE4 25EF4438 */ addiu $t7, %lo(gNearestWaypointByPlayerId) # addiu $t7, $t7, 0x4438 -/* 0196E8 80018AE8 3C0E8016 */ lui $t6, %hi(gNearestWaypointByCameraId) # $t6, 0x8016 -/* 0196EC 80018AEC 25CE4668 */ addiu $t6, %lo(gNearestWaypointByCameraId) # addiu $t6, $t6, 0x4668 -/* 0196F0 80018AF0 004FC021 */ addu $t8, $v0, $t7 -/* 0196F4 80018AF4 001FC840 */ sll $t9, $ra, 1 -/* 0196F8 80018AF8 032E5821 */ addu $t3, $t9, $t6 -/* 0196FC 80018AFC AFB8003C */ sw $t8, 0x3c($sp) -/* 019700 80018B00 970E0000 */ lhu $t6, ($t8) -/* 019704 80018B04 85680000 */ lh $t0, ($t3) -/* 019708 80018B08 0320F825 */ move $ra, $t9 -/* 01970C 80018B0C 25CF0006 */ addiu $t7, $t6, 6 -/* 019710 80018B10 01EA001A */ div $zero, $t7, $t2 -/* 019714 80018B14 0300C825 */ move $t9, $t8 -/* 019718 80018B18 15400002 */ bnez $t2, .L80018B24 -/* 01971C 80018B1C 00000000 */ nop -/* 019720 80018B20 0007000D */ break 7 -.L80018B24: -/* 019724 80018B24 2401FFFF */ li $at, -1 -/* 019728 80018B28 15410004 */ bne $t2, $at, .L80018B3C -/* 01972C 80018B2C 3C018000 */ lui $at, 0x8000 -/* 019730 80018B30 15E10002 */ bne $t7, $at, .L80018B3C -/* 019734 80018B34 00000000 */ nop -/* 019738 80018B38 0006000D */ break 6 -.L80018B3C: -/* 01973C 80018B3C 0000C010 */ mfhi $t8 -/* 019740 80018B40 3C018016 */ lui $at, %hi(D_80163068) -/* 019744 80018B44 15180002 */ bne $t0, $t8, .L80018B50 -/* 019748 80018B48 0005C880 */ sll $t9, $a1, 2 -/* 01974C 80018B4C AC600000 */ sw $zero, ($v1) -.L80018B50: -/* 019750 80018B50 00390821 */ addu $at, $at, $t9 -/* 019754 80018B54 C4243068 */ lwc1 $f4, %lo(D_80163068)($at) -/* 019758 80018B58 3C01800F */ lui $at, %hi(D_800ED2D8) -/* 01975C 80018B5C 3C0E8016 */ lui $t6, %hi(D_80164688) # $t6, 0x8016 -/* 019760 80018B60 D428D2D8 */ ldc1 $f8, %lo(D_800ED2D8)($at) -/* 019764 80018B64 25CE4688 */ addiu $t6, %lo(D_80164688) # addiu $t6, $t6, 0x4688 -/* 019768 80018B68 460020A1 */ cvt.d.s $f2, $f4 -/* 01976C 80018B6C 018E1821 */ addu $v1, $t4, $t6 -/* 019770 80018B70 C4660000 */ lwc1 $f6, ($v1) -/* 019774 80018B74 46281280 */ add.d $f10, $f2, $f8 -/* 019778 80018B78 46003021 */ cvt.d.s $f0, $f6 -/* 01977C 80018B7C 4620503C */ c.lt.d $f10, $f0 -/* 019780 80018B80 00000000 */ nop -/* 019784 80018B84 45000006 */ bc1f .L80018BA0 -/* 019788 80018B88 3C01800F */ lui $at, %hi(D_800ED2E0) -/* 01978C 80018B8C D426D2E0 */ ldc1 $f6, %lo(D_800ED2E0)($at) -/* 019790 80018B90 46006121 */ cvt.d.s $f4, $f12 -/* 019794 80018B94 46262202 */ mul.d $f8, $f4, $f6 -/* 019798 80018B98 462042A0 */ cvt.s.d $f10, $f8 -/* 01979C 80018B9C E5AA0000 */ swc1 $f10, ($t5) -.L80018BA0: -/* 0197A0 80018BA0 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 0197A4 80018BA4 44812800 */ mtc1 $at, $f5 -/* 0197A8 80018BA8 44802000 */ mtc1 $zero, $f4 -/* 0197AC 80018BAC 00000000 */ nop -/* 0197B0 80018BB0 46241180 */ add.d $f6, $f2, $f4 -/* 0197B4 80018BB4 4626003C */ c.lt.d $f0, $f6 -/* 0197B8 80018BB8 00000000 */ nop -/* 0197BC 80018BBC 45000007 */ bc1f .L80018BDC -/* 0197C0 80018BC0 3C01800F */ lui $at, %hi(D_800ED2E8) -/* 0197C4 80018BC4 D428D2E8 */ ldc1 $f8, %lo(D_800ED2E8)($at) -/* 0197C8 80018BC8 46280280 */ add.d $f10, $f0, $f8 -/* 0197CC 80018BCC 46205120 */ cvt.s.d $f4, $f10 -/* 0197D0 80018BD0 E4640000 */ swc1 $f4, ($v1) -/* 0197D4 80018BD4 C4660000 */ lwc1 $f6, ($v1) -/* 0197D8 80018BD8 46003021 */ cvt.d.s $f0, $f6 -.L80018BDC: -/* 0197DC 80018BDC 3C01800F */ lui $at, %hi(D_800ED2F0) -/* 0197E0 80018BE0 D428D2F0 */ ldc1 $f8, %lo(D_800ED2F0)($at) -/* 0197E4 80018BE4 AFA80040 */ sw $t0, 0x40($sp) -/* 0197E8 80018BE8 4620403C */ c.lt.d $f8, $f0 -/* 0197EC 80018BEC 00000000 */ nop -/* 0197F0 80018BF0 4500000A */ bc1f .L80018C1C -/* 0197F4 80018BF4 3C01800F */ lui $at, %hi(D_800ED2F8) # $at, 0x800f -/* 0197F8 80018BF8 C42AD2F8 */ lwc1 $f10, %lo(D_800ED2F8)($at) -/* 0197FC 80018BFC 3C01800F */ lui $at, %hi(D_800ED300) -/* 019800 80018C00 46006121 */ cvt.d.s $f4, $f12 -/* 019804 80018C04 E46A0000 */ swc1 $f10, ($v1) -/* 019808 80018C08 D426D300 */ ldc1 $f6, %lo(D_800ED300)($at) -/* 01980C 80018C0C AFA80040 */ sw $t0, 0x40($sp) -/* 019810 80018C10 46262202 */ mul.d $f8, $f4, $f6 -/* 019814 80018C14 462042A0 */ cvt.s.d $f10, $f8 -/* 019818 80018C18 E5AA0000 */ swc1 $f10, ($t5) -.L80018C1C: -/* 01981C 80018C1C 8FAF00A0 */ lw $t7, 0xa0($sp) -/* 019820 80018C20 3C018016 */ lui $at, %hi(D_80163238) # $at, 0x8016 -/* 019824 80018C24 AC253238 */ sw $a1, %lo(D_80163238)($at) -/* 019828 80018C28 01E9C021 */ addu $t8, $t7, $t1 -/* 01982C 80018C2C AFB800A0 */ sw $t8, 0xa0($sp) -/* 019830 80018C30 8E060008 */ lw $a2, 8($s0) -/* 019834 80018C34 C60E0004 */ lwc1 $f14, 4($s0) -/* 019838 80018C38 C60C0000 */ lwc1 $f12, ($s0) -/* 01983C 80018C3C 8FB90068 */ lw $t9, 0x68($sp) -/* 019840 80018C40 AFBF0048 */ sw $ra, 0x48($sp) -/* 019844 80018C44 8FA70040 */ lw $a3, 0x40($sp) -/* 019848 80018C48 AFAD0054 */ sw $t5, 0x54($sp) -/* 01984C 80018C4C AFAC0058 */ sw $t4, 0x58($sp) -/* 019850 80018C50 AFAB0044 */ sw $t3, 0x44($sp) -/* 019854 80018C54 AFAA0064 */ sw $t2, 0x64($sp) -/* 019858 80018C58 AFA3005C */ sw $v1, 0x5c($sp) -/* 01985C 80018C5C 0C0034CF */ jal func_8000D33C -/* 019860 80018C60 AFB90010 */ sw $t9, 0x10($sp) -/* 019864 80018C64 8FAB0044 */ lw $t3, 0x44($sp) -/* 019868 80018C68 8FAE003C */ lw $t6, 0x3c($sp) -/* 01986C 80018C6C 8FAA0064 */ lw $t2, 0x64($sp) -/* 019870 80018C70 A5620000 */ sh $v0, ($t3) -/* 019874 80018C74 85690000 */ lh $t1, ($t3) -/* 019878 80018C78 85C80000 */ lh $t0, ($t6) -/* 01987C 80018C7C 2406000F */ li $a2, 15 -/* 019880 80018C80 2407000F */ li $a3, 15 -/* 019884 80018C84 AFAA0010 */ sw $t2, 0x10($sp) -/* 019888 80018C88 3125FFFF */ andi $a1, $t1, 0xffff -/* 01988C 80018C8C 0C001EFE */ jal func_80007BF8 -/* 019890 80018C90 3104FFFF */ andi $a0, $t0, 0xffff -/* 019894 80018C94 8FA3005C */ lw $v1, 0x5c($sp) -/* 019898 80018C98 8FAA0064 */ lw $t2, 0x64($sp) -/* 01989C 80018C9C 8FAB0044 */ lw $t3, 0x44($sp) -/* 0198A0 80018CA0 8FAC0058 */ lw $t4, 0x58($sp) -/* 0198A4 80018CA4 8FAD0054 */ lw $t5, 0x54($sp) -/* 0198A8 80018CA8 1C400011 */ bgtz $v0, .L80018CF0 -/* 0198AC 80018CAC 8FBF0048 */ lw $ra, 0x48($sp) -/* 0198B0 80018CB0 3C068016 */ lui $a2, %hi(D_80164680) # 0x8016 -/* 0198B4 80018CB4 00DF3021 */ addu $a2, $a2, $ra -/* 0198B8 80018CB8 84C64680 */ lh $a2, %lo(D_80164680)($a2) # 0x4680($a2) -/* 0198BC 80018CBC 8FA400C4 */ lw $a0, 0xc4($sp) -/* 0198C0 80018CC0 8C650000 */ lw $a1, ($v1) -/* 0198C4 80018CC4 AFA3005C */ sw $v1, 0x5c($sp) -/* 0198C8 80018CC8 AFAA0064 */ sw $t2, 0x64($sp) -/* 0198CC 80018CCC AFAB0044 */ sw $t3, 0x44($sp) -/* 0198D0 80018CD0 AFAC0058 */ sw $t4, 0x58($sp) -/* 0198D4 80018CD4 0C0068D2 */ jal func_8001A348 -/* 0198D8 80018CD8 AFAD0054 */ sw $t5, 0x54($sp) -/* 0198DC 80018CDC 8FA3005C */ lw $v1, 0x5c($sp) -/* 0198E0 80018CE0 8FAA0064 */ lw $t2, 0x64($sp) -/* 0198E4 80018CE4 8FAB0044 */ lw $t3, 0x44($sp) -/* 0198E8 80018CE8 8FAC0058 */ lw $t4, 0x58($sp) -/* 0198EC 80018CEC 8FAD0054 */ lw $t5, 0x54($sp) -.L80018CF0: -/* 0198F0 80018CF0 85680000 */ lh $t0, ($t3) -/* 0198F4 80018CF4 87A7006A */ lh $a3, 0x6a($sp) -/* 0198F8 80018CF8 8C650000 */ lw $a1, ($v1) -/* 0198FC 80018CFC 250F0001 */ addiu $t7, $t0, 1 -/* 019900 80018D00 01EA001A */ div $zero, $t7, $t2 -/* 019904 80018D04 250E0002 */ addiu $t6, $t0, 2 -/* 019908 80018D08 00001010 */ mfhi $v0 -/* 01990C 80018D0C 0002C400 */ sll $t8, $v0, 0x10 -/* 019910 80018D10 15400002 */ bnez $t2, .L80018D1C -/* 019914 80018D14 00000000 */ nop -/* 019918 80018D18 0007000D */ break 7 -.L80018D1C: -/* 01991C 80018D1C 2401FFFF */ li $at, -1 -/* 019920 80018D20 15410004 */ bne $t2, $at, .L80018D34 -/* 019924 80018D24 3C018000 */ li $at, 0x80000000 # -0.000000 -/* 019928 80018D28 15E10002 */ bne $t7, $at, .L80018D34 -/* 01992C 80018D2C 00000000 */ nop -/* 019930 80018D30 0006000D */ break 6 -.L80018D34: -/* 019934 80018D34 01CA001A */ div $zero, $t6, $t2 -/* 019938 80018D38 0018CC03 */ sra $t9, $t8, 0x10 -/* 01993C 80018D3C 03201025 */ move $v0, $t9 -/* 019940 80018D40 15400002 */ bnez $t2, .L80018D4C -/* 019944 80018D44 00000000 */ nop -/* 019948 80018D48 0007000D */ break 7 -.L80018D4C: -/* 01994C 80018D4C 2401FFFF */ li $at, -1 -/* 019950 80018D50 15410004 */ bne $t2, $at, .L80018D64 -/* 019954 80018D54 3C018000 */ li $at, 0x80000000 # -0.000000 -/* 019958 80018D58 15C10002 */ bne $t6, $at, .L80018D64 -/* 01995C 80018D5C 00000000 */ nop -/* 019960 80018D60 0006000D */ break 6 -.L80018D64: -/* 019964 80018D64 00007810 */ mfhi $t7 -/* 019968 80018D68 A7AF0078 */ sh $t7, 0x78($sp) -/* 01996C 80018D6C 3044FFFF */ andi $a0, $v0, 0xffff -/* 019970 80018D70 A7A2007A */ sh $v0, 0x7a($sp) -/* 019974 80018D74 3C064270 */ lui $a2, 0x4270 -/* 019978 80018D78 AFA3005C */ sw $v1, 0x5c($sp) -/* 01997C 80018D7C AFAC0058 */ sw $t4, 0x58($sp) -/* 019980 80018D80 AFAD0054 */ sw $t5, 0x54($sp) -/* 019984 80018D84 0C002E85 */ jal func_8000BA14 -/* 019988 80018D88 AFA70050 */ sw $a3, 0x50($sp) -/* 01998C 80018D8C 3C088016 */ lui $t0, %hi(D_80162FA0) # $t0, 0x8016 -/* 019990 80018D90 25082FA0 */ addiu $t0, %lo(D_80162FA0) # addiu $t0, $t0, 0x2fa0 -/* 019994 80018D94 C5040000 */ lwc1 $f4, ($t0) -/* 019998 80018D98 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 01999C 80018D9C 44810800 */ mtc1 $at, $f1 -/* 0199A0 80018DA0 44800000 */ mtc1 $zero, $f0 -/* 0199A4 80018DA4 460021A1 */ cvt.d.s $f6, $f4 -/* 0199A8 80018DA8 C5040008 */ lwc1 $f4, 8($t0) -/* 0199AC 80018DAC 46203202 */ mul.d $f8, $f6, $f0 -/* 0199B0 80018DB0 8FA3005C */ lw $v1, 0x5c($sp) -/* 0199B4 80018DB4 460021A1 */ cvt.d.s $f6, $f4 -/* 0199B8 80018DB8 8FA70050 */ lw $a3, 0x50($sp) -/* 0199BC 80018DBC 97A40078 */ lhu $a0, 0x78($sp) -/* 0199C0 80018DC0 3C064270 */ lui $a2, 0x4270 -/* 0199C4 80018DC4 8C650000 */ lw $a1, ($v1) -/* 0199C8 80018DC8 462042A0 */ cvt.s.d $f10, $f8 -/* 0199CC 80018DCC 46203202 */ mul.d $f8, $f6, $f0 -/* 0199D0 80018DD0 E7AA0098 */ swc1 $f10, 0x98($sp) -/* 0199D4 80018DD4 462044A0 */ cvt.s.d $f18, $f8 -/* 0199D8 80018DD8 0C002E85 */ jal func_8000BA14 -/* 0199DC 80018DDC E7B20090 */ swc1 $f18, 0x90($sp) -/* 0199E0 80018DE0 3C088016 */ lui $t0, %hi(D_80162FA0) # $t0, 0x8016 -/* 0199E4 80018DE4 25082FA0 */ addiu $t0, %lo(D_80162FA0) # addiu $t0, $t0, 0x2fa0 -/* 0199E8 80018DE8 C50A0000 */ lwc1 $f10, ($t0) -/* 0199EC 80018DEC 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 0199F0 80018DF0 44813800 */ mtc1 $at, $f7 -/* 0199F4 80018DF4 44803000 */ mtc1 $zero, $f6 -/* 0199F8 80018DF8 46005121 */ cvt.d.s $f4, $f10 -/* 0199FC 80018DFC C7AA0098 */ lwc1 $f10, 0x98($sp) -/* 019A00 80018E00 46262202 */ mul.d $f8, $f4, $f6 -/* 019A04 80018E04 8FB80068 */ lw $t8, 0x68($sp) -/* 019A08 80018E08 46005121 */ cvt.d.s $f4, $f10 -/* 019A0C 80018E0C 87AE0078 */ lh $t6, 0x78($sp) -/* 019A10 80018E10 3C028016 */ lui $v0, %hi(D_80164550) # 0x8016 -/* 019A14 80018E14 0018C880 */ sll $t9, $t8, 2 -/* 019A18 80018E18 00591021 */ addu $v0, $v0, $t9 -/* 019A1C 80018E1C 8C424550 */ lw $v0, %lo(D_80164550)($v0) # 0x4550($v0) -/* 019A20 80018E20 46282180 */ add.d $f6, $f4, $f8 -/* 019A24 80018E24 C5040008 */ lwc1 $f4, 8($t0) -/* 019A28 80018E28 000E78C0 */ sll $t7, $t6, 3 -/* 019A2C 80018E2C 87AE007A */ lh $t6, 0x7a($sp) -/* 019A30 80018E30 462032A0 */ cvt.s.d $f10, $f6 -/* 019A34 80018E34 44803000 */ mtc1 $zero, $f6 -/* 019A38 80018E38 44813800 */ mtc1 $at, $f7 -/* 019A3C 80018E3C 46002221 */ cvt.d.s $f8, $f4 -/* 019A40 80018E40 004FC021 */ addu $t8, $v0, $t7 -/* 019A44 80018E44 46264102 */ mul.d $f4, $f8, $f6 -/* 019A48 80018E48 C7B20090 */ lwc1 $f18, 0x90($sp) -/* 019A4C 80018E4C E7AA0098 */ swc1 $f10, 0x98($sp) -/* 019A50 80018E50 87190002 */ lh $t9, 2($t8) -/* 019A54 80018E54 000E78C0 */ sll $t7, $t6, 3 -/* 019A58 80018E58 004FC021 */ addu $t8, $v0, $t7 -/* 019A5C 80018E5C 870E0002 */ lh $t6, 2($t8) -/* 019A60 80018E60 46009221 */ cvt.d.s $f8, $f18 -/* 019A64 80018E64 8FAC0058 */ lw $t4, 0x58($sp) -/* 019A68 80018E68 46244180 */ add.d $f6, $f8, $f4 -/* 019A6C 80018E6C 032E7821 */ addu $t7, $t9, $t6 -/* 019A70 80018E70 448F4000 */ mtc1 $t7, $f8 -/* 019A74 80018E74 3C188016 */ lui $t8, %hi(D_801645F8) # $t8, 0x8016 -/* 019A78 80018E78 462034A0 */ cvt.s.d $f18, $f6 -/* 019A7C 80018E7C 44803000 */ mtc1 $zero, $f6 -/* 019A80 80018E80 44813800 */ mtc1 $at, $f7 -/* 019A84 80018E84 46804121 */ cvt.d.w $f4, $f8 -/* 019A88 80018E88 271845F8 */ addiu $t8, %lo(D_801645F8) # addiu $t8, $t8, 0x45f8 -/* 019A8C 80018E8C 01981821 */ addu $v1, $t4, $t8 -/* 019A90 80018E90 3C198016 */ lui $t9, %hi(D_80164618) # $t9, 0x8016 -/* 019A94 80018E94 27394618 */ addiu $t9, %lo(D_80164618) # addiu $t9, $t9, 0x4618 -/* 019A98 80018E98 46262202 */ mul.d $f8, $f4, $f6 -/* 019A9C 80018E9C C4640000 */ lwc1 $f4, ($v1) -/* 019AA0 80018EA0 01993821 */ addu $a3, $t4, $t9 -/* 019AA4 80018EA4 C4E60000 */ lwc1 $f6, ($a3) -/* 019AA8 80018EA8 3C0E8016 */ lui $t6, %hi(D_80164638) # $t6, 0x8016 -/* 019AAC 80018EAC 25CE4638 */ addiu $t6, %lo(D_80164638) # addiu $t6, $t6, 0x4638 -/* 019AB0 80018EB0 46045381 */ sub.s $f14, $f10, $f4 -/* 019AB4 80018EB4 018E4821 */ addu $t1, $t4, $t6 -/* 019AB8 80018EB8 AFA9004C */ sw $t1, 0x4c($sp) -/* 019ABC 80018EBC 462040A0 */ cvt.s.d $f2, $f8 -/* 019AC0 80018EC0 460E7282 */ mul.s $f10, $f14, $f14 -/* 019AC4 80018EC4 C5280000 */ lwc1 $f8, ($t1) -/* 019AC8 80018EC8 E7AE008C */ swc1 $f14, 0x8c($sp) -/* 019ACC 80018ECC AFA70050 */ sw $a3, 0x50($sp) -/* 019AD0 80018ED0 AFA3005C */ sw $v1, 0x5c($sp) -/* 019AD4 80018ED4 46061401 */ sub.s $f16, $f2, $f6 -/* 019AD8 80018ED8 46089001 */ sub.s $f0, $f18, $f8 -/* 019ADC 80018EDC 46108102 */ mul.s $f4, $f16, $f16 -/* 019AE0 80018EE0 E7B00088 */ swc1 $f16, 0x88($sp) -/* 019AE4 80018EE4 46000202 */ mul.s $f8, $f0, $f0 -/* 019AE8 80018EE8 E7A00084 */ swc1 $f0, 0x84($sp) -/* 019AEC 80018EEC 46045180 */ add.s $f6, $f10, $f4 -/* 019AF0 80018EF0 0C033850 */ jal sqrtf -/* 019AF4 80018EF4 46083300 */ add.s $f12, $f6, $f8 -/* 019AF8 80018EF8 44805800 */ mtc1 $zero, $f11 -/* 019AFC 80018EFC 44805000 */ mtc1 $zero, $f10 -/* 019B00 80018F00 46000121 */ cvt.d.s $f4, $f0 -/* 019B04 80018F04 8FA3005C */ lw $v1, 0x5c($sp) -/* 019B08 80018F08 46245032 */ c.eq.d $f10, $f4 -/* 019B0C 80018F0C 8FA70050 */ lw $a3, 0x50($sp) -/* 019B10 80018F10 8FA9004C */ lw $t1, 0x4c($sp) -/* 019B14 80018F14 8FAD0054 */ lw $t5, 0x54($sp) -/* 019B18 80018F18 C7AE008C */ lwc1 $f14, 0x8c($sp) -/* 019B1C 80018F1C 45010012 */ bc1t .L80018F68 -/* 019B20 80018F20 C7B00088 */ lwc1 $f16, 0x88($sp) -/* 019B24 80018F24 C5A20000 */ lwc1 $f2, ($t5) -/* 019B28 80018F28 C46A0000 */ lwc1 $f10, ($v1) -/* 019B2C 80018F2C 460E1182 */ mul.s $f6, $f2, $f14 -/* 019B30 80018F30 46003203 */ div.s $f8, $f6, $f0 -/* 019B34 80018F34 46101102 */ mul.s $f4, $f2, $f16 -/* 019B38 80018F38 46002183 */ div.s $f6, $f4, $f0 -/* 019B3C 80018F3C C7A40084 */ lwc1 $f4, 0x84($sp) -/* 019B40 80018F40 460A4300 */ add.s $f12, $f8, $f10 -/* 019B44 80018F44 C4E80000 */ lwc1 $f8, ($a3) -/* 019B48 80018F48 E7AC0098 */ swc1 $f12, 0x98($sp) -/* 019B4C 80018F4C 46083280 */ add.s $f10, $f6, $f8 -/* 019B50 80018F50 46041182 */ mul.s $f6, $f2, $f4 -/* 019B54 80018F54 E7AA0094 */ swc1 $f10, 0x94($sp) -/* 019B58 80018F58 C52A0000 */ lwc1 $f10, ($t1) -/* 019B5C 80018F5C 46003203 */ div.s $f8, $f6, $f0 -/* 019B60 80018F60 10000006 */ b .L80018F7C -/* 019B64 80018F64 460A4480 */ add.s $f18, $f8, $f10 -.L80018F68: -/* 019B68 80018F68 C4640000 */ lwc1 $f4, ($v1) -/* 019B6C 80018F6C C4E60000 */ lwc1 $f6, ($a3) -/* 019B70 80018F70 C5320000 */ lwc1 $f18, ($t1) -/* 019B74 80018F74 E7A40098 */ swc1 $f4, 0x98($sp) -/* 019B78 80018F78 E7A60094 */ swc1 $f6, 0x94($sp) -.L80018F7C: -/* 019B7C 80018F7C C7AC0098 */ lwc1 $f12, 0x98($sp) -/* 019B80 80018F80 E6120008 */ swc1 $f18, 8($s0) -/* 019B84 80018F84 3C01403E */ li $at, 0x403E0000 # 2.968750 -/* 019B88 80018F88 E60C0000 */ swc1 $f12, ($s0) -/* 019B8C 80018F8C C7A80094 */ lwc1 $f8, 0x94($sp) -/* 019B90 80018F90 44815800 */ mtc1 $at, $f11 -/* 019B94 80018F94 44805000 */ mtc1 $zero, $f10 -/* 019B98 80018F98 46004421 */ cvt.d.s $f16, $f8 -/* 019B9C 80018F9C 44069000 */ mfc1 $a2, $f18 -/* 019BA0 80018FA0 462A8100 */ add.d $f4, $f16, $f10 -/* 019BA4 80018FA4 F7B00028 */ sdc1 $f16, 0x28($sp) -/* 019BA8 80018FA8 E7B20090 */ swc1 $f18, 0x90($sp) -/* 019BAC 80018FAC AFA9004C */ sw $t1, 0x4c($sp) -/* 019BB0 80018FB0 462023A0 */ cvt.s.d $f14, $f4 -/* 019BB4 80018FB4 AFA70050 */ sw $a3, 0x50($sp) -/* 019BB8 80018FB8 0C0AB870 */ jal func_802AE1C0 -/* 019BBC 80018FBC AFA3005C */ sw $v1, 0x5c($sp) -/* 019BC0 80018FC0 3C014034 */ li $at, 0x40340000 # 2.812500 -/* 019BC4 80018FC4 D7B00028 */ ldc1 $f16, 0x28($sp) -/* 019BC8 80018FC8 44813800 */ mtc1 $at, $f7 -/* 019BCC 80018FCC 44803000 */ mtc1 $zero, $f6 -/* 019BD0 80018FD0 460000A1 */ cvt.d.s $f2, $f0 -/* 019BD4 80018FD4 8FA3005C */ lw $v1, 0x5c($sp) -/* 019BD8 80018FD8 46268201 */ sub.d $f8, $f16, $f6 -/* 019BDC 80018FDC 8FA70050 */ lw $a3, 0x50($sp) -/* 019BE0 80018FE0 8FA9004C */ lw $t1, 0x4c($sp) -/* 019BE4 80018FE4 C7B20090 */ lwc1 $f18, 0x90($sp) -/* 019BE8 80018FE8 4628103C */ c.lt.d $f2, $f8 -/* 019BEC 80018FEC 00000000 */ nop -/* 019BF0 80018FF0 45010007 */ bc1t .L80019010 -/* 019BF4 80018FF4 3C01800F */ lui $at, %hi(D_800ED308) -/* 019BF8 80018FF8 D42AD308 */ ldc1 $f10, %lo(D_800ED308)($at) -/* 019BFC 80018FFC 3C014020 */ li $at, 0x40200000 # 2.500000 -/* 019C00 80019000 4622503E */ c.le.d $f10, $f2 -/* 019C04 80019004 00000000 */ nop -/* 019C08 80019008 4502000A */ bc1fl .L80019034 -/* 019C0C 8001900C 44815800 */ mtc1 $at, $f11 -.L80019010: -/* 019C10 80019010 3C014024 */ li $at, 0x40240000 # 2.562500 -/* 019C14 80019014 44812800 */ mtc1 $at, $f5 -/* 019C18 80019018 44802000 */ mtc1 $zero, $f4 -/* 019C1C 8001901C 00000000 */ nop -/* 019C20 80019020 46248180 */ add.d $f6, $f16, $f4 -/* 019C24 80019024 46203220 */ cvt.s.d $f8, $f6 -/* 019C28 80019028 10000007 */ b .L80019048 -/* 019C2C 8001902C E6080004 */ swc1 $f8, 4($s0) -/* 019C30 80019030 44815800 */ mtc1 $at, $f11 -.L80019034: -/* 019C34 80019034 44805000 */ mtc1 $zero, $f10 -/* 019C38 80019038 00000000 */ nop -/* 019C3C 8001903C 462A1100 */ add.d $f4, $f2, $f10 -/* 019C40 80019040 462021A0 */ cvt.s.d $f6, $f4 -/* 019C44 80019044 E6060004 */ swc1 $f6, 4($s0) -.L80019048: -/* 019C48 80019048 C7A80098 */ lwc1 $f8, 0x98($sp) -/* 019C4C 8001904C C7AA0094 */ lwc1 $f10, 0x94($sp) -/* 019C50 80019050 8FA200A0 */ lw $v0, 0xa0($sp) -/* 019C54 80019054 E5320000 */ swc1 $f18, ($t1) -/* 019C58 80019058 E4680000 */ swc1 $f8, ($v1) -/* 019C5C 8001905C E4EA0000 */ swc1 $f10, ($a3) -/* 019C60 80019060 C4440014 */ lwc1 $f4, 0x14($v0) -/* 019C64 80019064 3C014018 */ li $at, 0x40180000 # 2.375000 -/* 019C68 80019068 44815800 */ mtc1 $at, $f11 -/* 019C6C 8001906C E604000C */ swc1 $f4, 0xc($s0) -/* 019C70 80019070 C4460018 */ lwc1 $f6, 0x18($v0) -/* 019C74 80019074 44805000 */ mtc1 $zero, $f10 -/* 019C78 80019078 46003221 */ cvt.d.s $f8, $f6 -/* 019C7C 8001907C 462A4100 */ add.d $f4, $f8, $f10 -/* 019C80 80019080 462021A0 */ cvt.s.d $f6, $f4 -/* 019C84 80019084 E6060010 */ swc1 $f6, 0x10($s0) -/* 019C88 80019088 C448001C */ lwc1 $f8, 0x1c($v0) -/* 019C8C 8001908C E6080014 */ swc1 $f8, 0x14($s0) -/* 019C90 80019090 8FA50068 */ lw $a1, 0x68($sp) -/* 019C94 80019094 0C00534C */ jal func_80014D30 -/* 019C98 80019098 8FA400C4 */ lw $a0, 0xc4($sp) -/* 019C9C 8001909C C60A000C */ lwc1 $f10, 0xc($s0) -/* 019CA0 800190A0 C6040000 */ lwc1 $f4, ($s0) -/* 019CA4 800190A4 C6060010 */ lwc1 $f6, 0x10($s0) -/* 019CA8 800190A8 C6080004 */ lwc1 $f8, 4($s0) -/* 019CAC 800190AC 46045301 */ sub.s $f12, $f10, $f4 -/* 019CB0 800190B0 46083281 */ sub.s $f10, $f6, $f8 -/* 019CB4 800190B4 E7AA00A8 */ swc1 $f10, 0xa8($sp) -/* 019CB8 800190B8 C6060008 */ lwc1 $f6, 8($s0) -/* 019CBC 800190BC C6040014 */ lwc1 $f4, 0x14($s0) -/* 019CC0 800190C0 E7AC00AC */ swc1 $f12, 0xac($sp) -/* 019CC4 800190C4 46062381 */ sub.s $f14, $f4, $f6 -/* 019CC8 800190C8 0C0ADE0C */ jal atan2s -/* 019CCC 800190CC E7AE00A4 */ swc1 $f14, 0xa4($sp) -/* 019CD0 800190D0 C7A000AC */ lwc1 $f0, 0xac($sp) -/* 019CD4 800190D4 C7AE00A4 */ lwc1 $f14, 0xa4($sp) -/* 019CD8 800190D8 A6020026 */ sh $v0, 0x26($s0) -/* 019CDC 800190DC 46000202 */ mul.s $f8, $f0, $f0 -/* 019CE0 800190E0 00000000 */ nop -/* 019CE4 800190E4 460E7282 */ mul.s $f10, $f14, $f14 -/* 019CE8 800190E8 0C033850 */ jal sqrtf -/* 019CEC 800190EC 460A4300 */ add.s $f12, $f8, $f10 -/* 019CF0 800190F0 46000306 */ mov.s $f12, $f0 -/* 019CF4 800190F4 0C0ADE0C */ jal atan2s -/* 019CF8 800190F8 C7AE00A8 */ lwc1 $f14, 0xa8($sp) -/* 019CFC 800190FC A6020024 */ sh $v0, 0x24($s0) -/* 019D00 80019100 A6000028 */ sh $zero, 0x28($s0) -/* 019D04 80019104 8FBF0024 */ lw $ra, 0x24($sp) -/* 019D08 80019108 8FB00020 */ lw $s0, 0x20($sp) -/* 019D0C 8001910C 27BD00B8 */ addiu $sp, $sp, 0xb8 -/* 019D10 80019110 03E00008 */ jr $ra -/* 019D14 80019114 00000000 */ nop diff --git a/src/code_80005FD0.c b/src/code_80005FD0.c index 5edf1ca7b..d1b1cee1f 100644 --- a/src/code_80005FD0.c +++ b/src/code_80005FD0.c @@ -1163,10 +1163,10 @@ void func_80008424(s32 playerId, f32 arg1, Player *player) { } #ifdef MIPS_TO_C -//generated by m2c commit a39b70e85329b0bcaeb4350510ddb23dc9840dce on Jan-01-2024 -static s16 D_800DCAF4; /* unable to generate initializer: not enough data */ -static s16 D_800DCB34; /* unable to generate initializer: not enough data */ -s16 *D_800DCBB4[0x15] = { +//generated by m2c commit 05102b12b75400ad2be8bd0872404237b36e1702 on Feb-20-2024 +static ? D_800DCAF4; /* unable to generate initializer: unknown type */ +static ? D_800DCB34; /* unable to generate initializer: unknown type */ +static ? *D_800DCBB4[0x15] = { &D_800DCB34, &D_800DCAF4, &D_800DCAF4, @@ -1197,8 +1197,6 @@ s32 func_800088D8(s32 arg0, s16 arg1, s16 arg2) { f32 temp_f0; f32 temp_f0_2; f32 temp_f0_3; - s16 *temp_a2_2; - s16 *temp_a3; s16 temp_t5_2; s16 temp_v0; s16 var_a0_4; @@ -1220,6 +1218,8 @@ s32 func_800088D8(s32 arg0, s16 arg1, s16 arg2) { s32 var_a1_4; u16 *var_a0_3; u16 temp_t7; + void *temp_a2_2; + void *temp_a3; var_a1 = arg1; temp_t5 = &D_80163128[arg0]; @@ -1235,7 +1235,7 @@ s32 func_800088D8(s32 arg0, s16 arg1, s16 arg2) { if (var_a1 >= 4) { var_a1 = 3; } - if (D_80163330[arg0] == (u16) 1) { + if (D_80163330[arg0] == 1) { return 1; } temp_t1 = &gPlayers[arg0]; @@ -1243,9 +1243,9 @@ s32 func_800088D8(s32 arg0, s16 arg1, s16 arg2) { return 1; } temp_t2 = var_a1 * 8; - temp_a3 = &D_800DCBB4[gCurrentCourseId][temp_t2]; + temp_a3 = D_800DCBB4[gCurrentCourseId] + (temp_t2 * 2); if (arg2 == 0) { - if (gDemoMode == (u16) 1) { + if (gDemoMode == 1) { temp_a2 = D_80164450[arg0].unk2 - D_80164450[*(D_80164378 + 0xE)].unk2; var_a1_2 = temp_a2; if (temp_a2 < 0) { @@ -1320,11 +1320,11 @@ s32 func_800088D8(s32 arg0, s16 arg1, s16 arg2) { goto block_55; } if (temp_t2 < 0x18) { - temp_a2_2 = &temp_a3[var_t1]; + temp_a2_2 = temp_a3 + (var_t1 * 2); temp_f0_3 = gLapCompletionPercentByPlayerId[arg0]; var_a0_5 = (s32) (((f32) temp_a2_2->unk10 * temp_f0_3) + ((f32) temp_a2_2->unk0 * (1.0f - temp_f0_3))); } else { - var_a0_5 = (s32) temp_a3[var_t1].unk0; + var_a0_5 = (s32) *(temp_a3 + (var_t1 * 2)); } *temp_t5 = var_a1_4; *temp_t4 = var_a0_5; @@ -1454,155 +1454,109 @@ f32 func_80009258(UNUSED s32 playerId, f32 arg1, f32 arg2) { return gCourseTimer - ( (0.01666666f * temp_f2) / (temp_f2 + temp_f12) ); } -#ifdef MIPS_TO_C -//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Dec-28-2023 +#ifdef NON_MATCHING +// Weird stack issue, can't figure out how to get rid of it void func_8000929C(s32 playerId, Player *player) { - f32 sp4C; - f32 sp44; - f32 sp38; - s16 sp34; - u16 *sp30; /* compiler-managed */ - u16 *sp2C; - f32 temp_f0; - f32 temp_f12; - s16 temp_a3; - s16 var_t0; - s32 *temp_v0; - s32 *temp_v0_2; - s32 *var_v0; - s32 temp_t1; - s32 temp_t2; - s32 temp_t5; - s32 temp_t7; - s32 temp_t9; - s32 var_a3; + f32 tempPos0; + f32 tempPos1; + f32 tempPos2; + s32 var_v0; s32 var_v1; - u16 *temp_t0; - u16 *temp_v1; - u16 temp_v0_3; - u16 temp_v0_4; + f32 someTemp0; + s16 stackPadding0; + s16 var_t0; + s32 stackPadding1; - temp_f0 = player->pos[2]; - temp_f12 = player->pos[0]; + tempPos0 = player->pos[0]; + tempPos1 = player->pos[1]; + tempPos2 = player->pos[2]; D_801630E2 = 0; - temp_v1 = &D_80163240[playerId]; - *temp_v1 = 0; - temp_t0 = &gNearestWaypointByPlayerId[playerId]; - sp30 = temp_t0; - sp2C = temp_v1; - sp44 = temp_f0; - sp4C = temp_f12; - D_80162FCE = func_8000CD24(temp_f12, player->pos[1], temp_f0, (s16) *temp_t0, player, playerId, D_80163448); - temp_a3 = D_80162FCE; - D_801630E0 = (u16) temp_a3; - if (temp_a3 != *temp_t0) { - *temp_t0 = (u16) temp_a3; + D_80163240[playerId] = 0; + D_80162FCE = func_8000CD24(tempPos0, tempPos1, tempPos2, gNearestWaypointByPlayerId[playerId], player, playerId, D_80163448); + D_801630E0 = D_80162FCE; + if (gNearestWaypointByPlayerId[playerId] != D_80162FCE) { + gNearestWaypointByPlayerId[playerId] = D_80162FCE; D_801630E2 = 1; - sp4C = temp_f12; func_80008F38(playerId); } if (gCurrentCourseId == 0x0014) { - func_8000B95C(playerId, temp_a3 & 0xFFFF, D_80163448); + func_8000B95C(playerId, D_80162FCE, D_80163448); return; } - if ((temp_a3 < 0x14) || ((gWaypointCountByPathIndex[D_80163448] - 0x14) < temp_a3) || (gCurrentCourseId == 0x000B)) { + if ((D_80162FCE < 0x14) || ((gWaypointCountByPathIndex[D_80163448] - 0x14) < D_80162FCE) || (gCurrentCourseId == 0x000B)) { var_v1 = 0; var_t0 = 0; if (gCurrentCourseId == 0x000B) { D_801634EC = 0; - if (player->effects & STAR_EFFECT) { + if (player->effects & 0x200) { D_801634EC = 1; } if (gIsMirrorMode != 0) { - var_a3 = playerId * 4; - if (temp_f12 < 300.0f) { + if (tempPos0 < 300.0f) { var_v1 = 1; var_t0 = 1; - } else if ((temp_f12 < 1300.0f) && (gLapCountByPlayerId[playerId] < 2) && (var_a3 = playerId * 4, (D_801634EC == 1))) { + } else if ((tempPos0 < 1300.0f) && (gLapCountByPlayerId[playerId] < 2) && ((D_801634EC == 1))) { var_v1 = 1; var_t0 = 1; - } else { - goto block_23; } } else { - var_a3 = playerId * 4; - if (temp_f12 > -300.0f) { + if (tempPos0 > -300.0f) { var_v1 = 1; var_t0 = 1; } else { - if ((temp_f12 > -1300.0f) && (gLapCountByPlayerId[playerId] < 2) && (D_801634EC == 1)) { + if ((tempPos0 > -1300.0f) && (gLapCountByPlayerId[playerId] < 2) && (D_801634EC == 1)) { var_v1 = 1; var_t0 = 1; } -block_23: - goto block_25; } } } else { var_v1 = 1; var_t0 = 1; -block_25: - var_a3 = playerId * 4; } - sp38 = *(D_80163450 + var_a3); - if ((var_v1 != 0) && (sp44 <= D_8016344C)) { - temp_v0 = var_a3 + gLapCountByPlayerId; - if (D_8016344C < sp38) { - temp_t1 = *temp_v0 + 1; - *temp_v0 = temp_t1; - if ((gModeSelection == 0) && (temp_t1 == 5)) { - var_v0 = gLapCountByPlayerId; - if (*(D_80164408 + var_a3) == 7) { - do { - temp_t5 = var_v0->unk0; - temp_t7 = var_v0->unk4; - temp_t9 = var_v0->unk8; - temp_t2 = var_v0->unkC; - var_v0 += 0x10; - var_v0->unk-4 = (s32) (temp_t2 - 1); - var_v0->unk-8 = (s32) (temp_t9 - 1); - var_v0->unk-C = (s32) (temp_t7 - 1); - var_v0->unk-10 = (s32) (temp_t5 - 1); - } while (var_v0 != (gLapCountByPlayerId + 0x20)); + someTemp0 = D_80163450[playerId]; + if ((var_v1 != 0) && (tempPos2 <= D_8016344C)) { + if (D_8016344C < someTemp0) { + gLapCountByPlayerId[playerId]++; + if ((gModeSelection == 0) && (gLapCountByPlayerId[playerId] == 5)) { + if (D_80164408[playerId] == 7) { + for (var_v0 = 0; var_v0 < 8; var_v0++) { gLapCountByPlayerId[var_v0]--; } } } - *sp2C = 1; - sp34 = var_t0; - sp30 = var_a3; + D_80163240[playerId] = 1; func_80008F38(playerId); func_80011AE4(playerId); - *(&D_801642D8->unk_06 + (playerId * 0x10)) = 0; + D_801642D8[playerId].unk_06 = 0; if ((D_8016348C == 0) && !(player->type & 0x800)) { - sp30 = var_a3; - sp34 = var_t0; - *(gTimePlayerLastTouchedFinishLine + var_a3) = func_80009258(playerId, sp38, sp44); + gTimePlayerLastTouchedFinishLine[playerId] = func_80009258(playerId, someTemp0, tempPos2); } } } - if ((var_t0 != 0) && (sp38 <= D_8016344C)) { - temp_v0_2 = var_a3 + gLapCountByPlayerId; - if (D_8016344C < sp44) { - *temp_v0_2 -= 1; - func_80008F38(playerId); - } + if ((var_t0 != 0) && (someTemp0 <= D_8016344C) && (D_8016344C < tempPos2)) { + gLapCountByPlayerId[playerId]--; + func_80008F38(playerId); } } - D_80163450[playerId] = sp44; - if ((gCurrentCourseId == 4) && (D_801630E2 == 1) && ((func_80009000(playerId), temp_v0_3 = player->type, ((temp_v0_3 & 0x4000) == 0)) || (temp_v0_3 & 0x1000))) { - func_800090F0(playerId, player); + D_80163450[playerId] = tempPos2; + if ((gCurrentCourseId == 4) && (D_801630E2 == 1)) { + func_80009000(playerId); + if (((player->type & 0x4000) == 0) || (player->type & 0x1000)) { + func_800090F0(playerId, player); + } } - temp_v0_4 = player->type; - if ((temp_v0_4 & 0x4000) && !(temp_v0_4 & 0x1000)) { + if ((player->type & 0x4000) && !(player->type & 0x1000)) { func_800065D0(playerId, player); if ((gModeSelection == 0) && (gPlayerCount == 2) && (playerId == 0)) { - if (*D_80164408 < *(D_80164408 + 4)) { + if (D_80164408[0] < D_80164408[1]) { D_80163478 = 0; } else { D_80163478 = 1; } } + } else { + //???? } - func_8000B95C(playerId, D_80162FCE & 0xFFFF, D_80163448); + func_8000B95C(playerId, D_80162FCE, D_80163448); } #else GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000929C.s") @@ -5729,167 +5683,89 @@ void func_80015A9C(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { camera->pos[2] = D_80164638[cameraId]; } -#ifdef MIPS_TO_C -//generated by m2c commit 08138748803d75e73e4a94bb0c619a273754ee9c on Oct-11-2023 void func_80015C94(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { - f32 spA8; - f32 spA4; - Player *spA0; - s32 sp9C; - f32 sp94; - f32 sp90; - f32 sp8C; - f32 sp88; - f32 sp84; - s16 sp7A; - u16 sp78; - s32 sp68; - s32 sp5C; /* compiler-managed */ - s16 *sp58; - u16 *sp54; - f32 *sp50; - s32 sp44; - f64 sp38; - TrackWaypoint *temp_v0_2; - f32 *temp_a3; - f32 *temp_a3_2; - f32 *temp_a3_3; - f32 *temp_a3_4; - f32 temp_f0_2; - f32 temp_f0_3; - f32 temp_f14; - f32 temp_f14_2; - f32 temp_f16; - f32 temp_f18; - f32 temp_f20; - f32 temp_f20_2; - f32 temp_f2; - f32 temp_f6; - f32 var_f12; + s16 playerWaypoint; + s16 cameraWaypoint; + s32 stackPadding0; + f32 xdiff2; + f32 ydiff2; + f32 zdiff2; + Player *player; + s32 playerId; + f32 midX; + f32 midY; + f32 midZ; + f32 xdiff; + f32 ydiff; + f32 zdiff; + f32 distance; + s32 stackPadding1; + s16 waypoint1; + s16 waypoint2; f32 var_f18; f32 var_f20; - f64 temp_f0; - f64 temp_f16_2; - f64 temp_f2_2; - s16 *temp_a1; - s16 *temp_t0; - s16 temp_v0; - s16 temp_v1; - s32 temp_hi; - s32 var_s1; - u16 *temp_t1_2; - u16 *temp_t2; - u16 temp_t1; - u16 temp_v1_2; + f32 temp_f2_2; + s32 pathIndex; - temp_v1 = camera->playerId; - D_80163238 = (s32) temp_v1; - temp_t1 = gPathIndexByPlayerId[temp_v1]; - temp_a1 = &gNearestWaypointByCameraId[cameraId]; - spA0 = &gPlayerOne[temp_v1]; - sp58 = temp_a1; - sp5C = cameraId * 2; - sp9C = (s32) temp_v1; - sp68 = (s32) temp_t1; - *sp58 = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], *temp_a1, (s32) temp_t1); - temp_t2 = &gWaypointCountByPathIndex[sp68]; - sp54 = temp_t2; - if (func_80007BF8((s16) gNearestWaypointByPlayerId[temp_v1] & 0xFFFF, *sp58 & 0xFFFF, 0x0032U, 0x000FU, (u16) (s32) *temp_t2) <= 0) { - var_s1 = cameraId * 4; - temp_a3 = &D_80164688[cameraId]; - sp50 = temp_a3; - func_8001A348(cameraId, *temp_a3, (s32) *(D_80164680 + sp5C)); - goto block_8; - } - temp_f0 = (f64) D_80163068[temp_v1]; - if (temp_f0 < -0.5) { - var_s1 = cameraId * 4; - temp_a3_2 = &D_80164688[cameraId]; - if ((f64) *temp_a3_2 < -0.5) { - sp50 = temp_a3_2; - func_8001A348(cameraId, 1.0f, 7); - goto block_8; - } - } - var_s1 = cameraId * 4; - temp_a3_3 = &D_80164688[cameraId]; - var_f12 = *temp_a3_3; - if ((temp_f0 > 0.5) && ((f64) var_f12 > 0.5)) { - sp50 = temp_a3_3; + playerId = camera->playerId; + player = gPlayerOne; + player += playerId; + D_80163238 = playerId; + pathIndex = gPathIndexByPlayerId[playerId]; + gNearestWaypointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], gNearestWaypointByCameraId[cameraId], pathIndex); + playerWaypoint = gNearestWaypointByPlayerId[playerId]; + cameraWaypoint = gNearestWaypointByCameraId[cameraId]; + if (func_80007BF8(playerWaypoint, cameraWaypoint, 0x0032U, 0x000FU, gWaypointCountByPathIndex[pathIndex]) <= 0) { + func_8001A348(cameraId, D_80164688[cameraId], D_80164680[cameraId]); + } else if ((D_80163068[playerId] < -0.5) && (D_80164688[cameraId] < -0.5)) { + func_8001A348(cameraId, 1.0f, 7); + } else if ((D_80163068[playerId] > 0.5) && (D_80164688[cameraId] > 0.5)) { func_8001A348(cameraId, -1.0f, 6); -block_8: - var_f12 = D_80164688[cameraId]; } - temp_v1_2 = *sp54; - temp_v0 = *sp58; - sp50 = &D_80164688[cameraId]; - temp_hi = (s32) (temp_v0 + 1) % (s32) temp_v1_2; - sp78 = (u16) ((s32) (temp_v0 + 2) % (s32) temp_v1_2); - sp7A = (s16) temp_hi; - sp44 = (s32) unksp6A; - func_8000BBD8((s16) temp_hi & 0xFFFF, var_f12, unksp6A); - temp_f20 = (f32) ((f64) D_80162FA0->unk0 * 0.5); - temp_f18 = (f32) ((f64) D_80162FA0->unk8 * 0.5); - sp90 = temp_f18; - func_8000BBD8(sp78, D_80164688[cameraId], unksp6A); - temp_v0_2 = D_80164550[sp68]; - temp_a3_4 = var_s1 + D_801645F8; - temp_t0 = var_s1 + D_80164618; - temp_f14 = (f32) ((f64) temp_f20 + ((f64) D_80162FA0->unk0 * 0.5)) - *temp_a3_4; - temp_t1_2 = var_s1 + D_80164638; - temp_f6 = (f32) ((f64) (temp_v0_2[(s16) sp78].posY + temp_v0_2[sp7A].posY) * 0.5); - sp54 = temp_t1_2; - sp94 = temp_f6; - sp8C = temp_f14; - temp_f16 = temp_f6 - *temp_t0; - sp58 = temp_t0; - sp5C = temp_a3_4; - temp_f0_2 = (f32) ((f64) temp_f18 + ((f64) D_80162FA0->unk8 * 0.5)) - *temp_t1_2; - sp88 = temp_f16; - sp84 = temp_f0_2; - temp_f0_3 = sqrtf((temp_f14 * temp_f14) + (temp_f16 * temp_f16) + (temp_f0_2 * temp_f0_2)); - if ((f64) temp_f0_3 != 0.0) { - temp_f2 = *(D_80164648 + var_s1); - var_f20 = ((temp_f2 * temp_f14) / temp_f0_3) + *temp_a3_4; - sp94 = ((temp_f2 * temp_f16) / temp_f0_3) + *temp_t0; - var_f18 = ((temp_f2 * sp84) / temp_f0_3) + *temp_t1_2; + waypoint1 = (gNearestWaypointByCameraId[cameraId] + 1) % gWaypointCountByPathIndex[pathIndex]; + waypoint2 = (gNearestWaypointByCameraId[cameraId] + 2) % gWaypointCountByPathIndex[pathIndex]; + func_8000BBD8(waypoint1, D_80164688[cameraId], pathIndex); + midX = D_80162FA0[0] * 0.5; + midZ = D_80162FA0[2] * 0.5; + func_8000BBD8(waypoint2, D_80164688[cameraId], pathIndex); + midX += D_80162FA0[0] * 0.5; + midZ += D_80162FA0[2] * 0.5; + midY = (D_80164550[pathIndex][waypoint1].posY + D_80164550[pathIndex][waypoint2].posY) / 2.0; + xdiff = midX - D_801645F8[cameraId]; + ydiff = midY - D_80164618[cameraId]; + zdiff = midZ - D_80164638[cameraId]; + distance = sqrtf((xdiff * xdiff) + (ydiff * ydiff) + (zdiff * zdiff)); + if (distance != 0.0) { + midX = D_801645F8[cameraId] + ((D_80164648[cameraId] * xdiff) / distance); + midY = D_80164618[cameraId] + ((D_80164648[cameraId] * ydiff) / distance); + midZ = D_80164638[cameraId] + ((D_80164648[cameraId] * zdiff) / distance); } else { - var_f20 = *temp_a3_4; - var_f18 = *temp_t1_2; - sp94 = *temp_t0; + midX = D_801645F8[cameraId]; + midY = D_80164618[cameraId]; + midZ = D_80164638[cameraId]; } - camera->pos[0] = var_f20; - camera->pos[2] = var_f18; - temp_f16_2 = (f64) sp94; - sp38 = temp_f16_2; - sp90 = var_f18; - sp54 = temp_t1_2; - sp58 = temp_t0; - sp5C = temp_a3_4; - temp_f2_2 = (f64) func_802AE1C0(var_f20, (f32) (temp_f16_2 + 30.0), var_f18); - if ((temp_f2_2 < (temp_f16_2 - 20.0)) || (temp_f2_2 >= 3000.0)) { - camera->pos[1] = (f32) (temp_f16_2 + 10.0); + camera->pos[0] = midX; + camera->pos[2] = midZ; + temp_f2_2 = func_802AE1C0(midX, (midY + 30.0), midZ); + if ((temp_f2_2 < (midY - 20.0)) || (temp_f2_2 >= 3000.0)) { + camera->pos[1] = midY + 10.0; } else { - camera->pos[1] = (f32) (temp_f2_2 + 8.0); + camera->pos[1] = temp_f2_2 + 8.0; } - *temp_a3_4 = var_f20; - *temp_t1_2 = var_f18; - *temp_t0 = sp94; - camera->lookAt[0] = spA0->pos[0]; - camera->lookAt[1] = (f32) ((f64) spA0->pos[1] + 6.0); - camera->lookAt[2] = spA0->pos[2]; - func_80014D30(cameraId, sp68); - temp_f20_2 = camera->lookAt[0] - camera->pos[0]; - spA8 = camera->lookAt[1] - camera->pos[1]; - temp_f14_2 = camera->lookAt[2] - camera->pos[2]; - spA4 = temp_f14_2; - camera->rot[1] = atan2s(temp_f20_2, temp_f14_2); - camera->rot[0] = atan2s(sqrtf((temp_f20_2 * temp_f20_2) + (temp_f14_2 * temp_f14_2)), spA8); + D_801645F8[cameraId] = midX; + D_80164618[cameraId] = midY; + D_80164638[cameraId] = midZ; + camera->lookAt[0] = player->pos[0]; + camera->lookAt[1] = player->pos[1] + 6.0; + camera->lookAt[2] = player->pos[2]; + func_80014D30(cameraId, pathIndex); + xdiff2 = camera->lookAt[0] - camera->pos[0]; + ydiff2 = camera->lookAt[1] - camera->pos[1]; + zdiff2 = camera->lookAt[2] - camera->pos[2]; + camera->rot[1] = atan2s(xdiff2, zdiff2); + camera->rot[0] = atan2s(sqrtf((xdiff2 * xdiff2) + (zdiff2 * zdiff2)), ydiff2); camera->rot[2] = 0; } -#else -GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80015C94.s") -#endif void func_800162CC(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { Camera* camera = cameras + cameraId; @@ -5912,457 +5788,265 @@ void func_800162CC(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { camera->pos[2] = D_80164638[cameraId]; } -#ifdef MIPS_TO_C -//generated by m2c commit 08138748803d75e73e4a94bb0c619a273754ee9c on Oct-11-2023 void func_80016494(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { - s16 spB6; - s16 spB4; - f32 spAC; - f32 spA8; - f32 spA4; - Player *spA0; - s32 sp9C; + s16 cameraWaypoint; + s16 playerWaypoint; + s32 stackPadding0; + f32 xdiff2; + f32 ydiff2; + f32 zdiff2; + Player *player; + s32 playerId; + f32 midX; + f32 midY; + f32 midZ; + f32 xdiff; + f32 ydiff; + f32 zdiff; + f32 distance; f32 sp98; + s16 waypoint1; + s16 waypoint2; f32 sp94; f32 sp90; - f32 sp8C; - f32 sp88; - f32 sp84; - s16 sp7A; - u16 sp78; - s32 sp68; - f32 sp64; - s32 sp5C; - f32 *sp58; - f32 *sp54; - s32 sp50; /* compiler-managed */ - s32 sp4C; /* compiler-managed */ - s32 sp48; - s16 *sp44; - f32 *sp40; - f32 *sp3C; - u16 *sp38; - f64 sp28; - TrackWaypoint *temp_v0_2; - f32 *temp_a3; - f32 *temp_t0; - f32 *temp_t1_2; - f32 *temp_t1_3; - f32 *temp_t4; - f32 *temp_t5; - f32 *temp_t5_2; - f32 temp_f0_2; - f32 temp_f12; - f32 temp_f14; - f32 temp_f14_2; - f32 temp_f16; - f32 temp_f18; - f32 temp_f2; - f32 temp_f2_2; - f32 temp_f2_3; - f32 temp_f2_4; + s32 stackPadding1; + s32 pathIndex; f32 temp_f2_5; - f32 temp_f4; - f32 temp_f6; - f32 temp_f6_2; - f32 var_f12; - f32 var_f18; - f64 temp_f0; - f64 temp_f16_2; - f64 temp_f2_6; - f64 var_f0; - s16 *temp_t1; - s16 temp_t2; - s16 temp_t3_2; - s16 temp_v0; - s16 temp_v1; - s32 temp_hi; - s32 temp_ra; - u16 *temp_t7; - u16 temp_t3; - u16 temp_v1_2; - temp_t5 = &D_80164648[cameraId]; - temp_t4 = &D_80164658[cameraId]; - temp_f2 = *temp_t5; - temp_v1 = camera->playerId; - *temp_t5 = temp_f2 + ((*temp_t4 - temp_f2) * 0.5f); - D_80163238 = (s32) temp_v1; - temp_t3 = gPathIndexByPlayerId[temp_v1]; - temp_ra = temp_v1 * 0xDD8; - temp_t1 = &gNearestWaypointByCameraId[cameraId]; - sp4C = temp_ra; - spA0 = &gPlayerOne[temp_v1]; - sp44 = temp_t1; - sp48 = cameraId * 2; - sp50 = temp_v1 * 2; - sp58 = temp_t5; - sp54 = temp_t4; - sp5C = cameraId * 4; - sp9C = (s32) temp_v1; - sp68 = (s32) temp_t3; - *sp44 = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], *temp_t1, (s32) temp_t3); - temp_t1_2 = &D_80163068[temp_v1]; - temp_t5_2 = sp5C + D_80164688; - temp_f2_2 = *temp_t1_2 - *temp_t5_2; - temp_t3_2 = *sp44; - temp_t7 = &gWaypointCountByPathIndex[sp68]; - temp_f2_3 = temp_f2_2 * temp_f2_2; - sp38 = temp_t7; - temp_t2 = (s16) gNearestWaypointByPlayerId[temp_v1]; - sp3C = temp_t5_2; - sp64 = temp_f2_3; - sp40 = temp_t1_2; - spB6 = temp_t3_2; - spB4 = temp_t2; - if (func_80007BF8(temp_t2 & 0xFFFF, temp_t3_2 & 0xFFFF, 0x000FU, 0x000FU, (u16) (s32) *temp_t7) <= 0) { - sp3C = temp_t5_2; - func_8001A348(cameraId, *temp_t5_2, (s32) *(D_80164680 + sp48)); - var_f12 = *temp_t5_2; + playerId = camera->playerId; + player = gPlayerOne; + D_80164648[cameraId] += ((D_80164658[cameraId] - D_80164648[cameraId]) * 0.5f); + D_80163238 = playerId; + pathIndex = gPathIndexByPlayerId[playerId]; + player += playerId; + gNearestWaypointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], gNearestWaypointByCameraId[cameraId], pathIndex); + temp_f2_5 = (D_80163068[playerId] - D_80164688[cameraId]); + temp_f2_5 *= temp_f2_5; + playerWaypoint = gNearestWaypointByPlayerId[playerId]; + cameraWaypoint = gNearestWaypointByCameraId[cameraId]; + if (func_80007BF8(playerWaypoint, cameraWaypoint, 0x000FU, 0x000FU, gWaypointCountByPathIndex[pathIndex]) <= 0) { + func_8001A348(cameraId, D_80164688[cameraId], D_80164680[cameraId]); } else { - temp_f0 = (f64) *temp_t1_2; - if ((temp_f0 < 0.0) && ((f64) *temp_t5_2 < 0.0) && ((f64) temp_f2_3 < 0.01)) { - sp3C = temp_t5_2; + if ((D_80163068[playerId] < 0.0) && (D_80164688[cameraId] < 0.0) && (temp_f2_5 < 0.01)) { func_8001A348(cameraId, 1.0f, 5); - var_f12 = *temp_t5_2; } else { - var_f12 = *temp_t5_2; - if ((temp_f0 > 0.0) && ((f64) var_f12 > 0.0) && ((f64) temp_f2_3 < 0.01)) { - sp3C = temp_t5_2; + if ((D_80163068[playerId] > 0.0) && (D_80164688[cameraId] > 0.0) && (temp_f2_5 < 0.01)) { func_8001A348(cameraId, -1.0f, 4); - var_f12 = *temp_t5_2; } else { - if ((temp_t3_2 < temp_t2) && ((temp_t2 - temp_t3_2) < 0xA)) { - *temp_t4 = (f32) ((f64) *(&gPlayers->unk_094 + temp_ra) + 0.4); + if ((cameraWaypoint < playerWaypoint) && ((playerWaypoint - cameraWaypoint) < 0xA)) { + D_80164658[cameraId] = gPlayers[playerId].unk_094 + 0.4; } - if ((temp_t2 < temp_t3_2) && ((temp_t3_2 - temp_t2) < 0xA)) { - *temp_t4 = (f32) ((f64) *(&gPlayers->unk_094 + temp_ra) - 0.4); + if ((playerWaypoint < cameraWaypoint) && ((cameraWaypoint - playerWaypoint) < 0xA)) { + D_80164658[cameraId] = gPlayers[playerId].unk_094 - 0.4; } - var_f0 = (f64) *temp_t4; - if (var_f0 > 10.0) { - *temp_t4 = 10.0f; - var_f0 = (f64) *temp_t4; + if (D_80164658[cameraId] > 10.0) { + D_80164658[cameraId] = 10.0f; } - if (var_f0 < 0.0) { - *temp_t4 = 0.0f; + if (D_80164658[cameraId] < 0.0) { + D_80164658[cameraId] = 0.0f; } } } } - temp_v1_2 = *sp38; - temp_v0 = *sp44; - sp3C = temp_t5_2; - temp_hi = (s32) (temp_v0 + 1) % (s32) temp_v1_2; - sp78 = (u16) ((s32) (temp_v0 + 2) % (s32) temp_v1_2); - sp7A = (s16) temp_hi; - sp54 = (f32 *) unksp6A; - func_8000BBD8((s16) temp_hi & 0xFFFF, var_f12, unksp6A); - temp_f6 = (f32) ((f64) D_80162FA0->unk0 * 0.5); - sp98 = temp_f6; - temp_f18 = (f32) ((f64) D_80162FA0->unk8 * 0.5); - sp90 = temp_f18; - func_8000BBD8(sp78, *temp_t5_2, unksp6A); - temp_v0_2 = D_80164550[sp68]; - temp_f4 = (f32) ((f64) temp_f6 + ((f64) D_80162FA0->unk0 * 0.5)); - sp98 = temp_f4; - temp_a3 = sp5C + D_801645F8; - temp_t0 = sp5C + D_80164618; - temp_t1_3 = sp5C + D_80164638; - sp4C = temp_t1_3; - sp50 = temp_t0; - sp54 = temp_a3; - temp_f14 = temp_f4 - *temp_a3; - temp_f6_2 = (f32) ((f64) (temp_v0_2[(s16) sp78].posY + temp_v0_2[sp7A].posY) * 0.5); - temp_f2_4 = (f32) ((f64) temp_f18 + ((f64) D_80162FA0->unk8 * 0.5)) - *temp_t1_3; - sp94 = temp_f6_2; - sp8C = temp_f14; - temp_f16 = temp_f6_2 - *temp_t0; - sp84 = temp_f2_4; - sp88 = temp_f16; - temp_f0_2 = sqrtf((temp_f14 * temp_f14) + (temp_f16 * temp_f16) + (temp_f2_4 * temp_f2_4)); - if ((f64) temp_f0_2 != 0.0) { - temp_f2_5 = *sp58; - sp98 = ((temp_f2_5 * temp_f14) / temp_f0_2) + *temp_a3; - sp94 = ((temp_f2_5 * temp_f16) / temp_f0_2) + *temp_t0; - var_f18 = ((temp_f2_5 * sp84) / temp_f0_2) + *temp_t1_3; + waypoint1 = (gNearestWaypointByCameraId[cameraId] + 1) % gWaypointCountByPathIndex[pathIndex]; + waypoint2 = (gNearestWaypointByCameraId[cameraId] + 2) % gWaypointCountByPathIndex[pathIndex]; + func_8000BBD8(waypoint1, D_80164688[cameraId], pathIndex); + midX = D_80162FA0[0] * 0.5; + midZ = D_80162FA0[2] * 0.5; + func_8000BBD8(waypoint2, D_80164688[cameraId], pathIndex); + midX += D_80162FA0[0] * 0.5; + midZ += D_80162FA0[2] * 0.5; + midY = (D_80164550[pathIndex][waypoint1].posY + D_80164550[pathIndex][waypoint2].posY) / 2.0; + xdiff = midX - D_801645F8[cameraId]; + ydiff = midY - D_80164618[cameraId]; + zdiff = midZ - D_80164638[cameraId]; + distance = sqrtf((xdiff * xdiff) + (ydiff * ydiff) + (zdiff * zdiff)); + if (distance != 0.0) { + midX = D_801645F8[cameraId] + ((D_80164648[cameraId] * xdiff) / distance); + midY = D_80164618[cameraId] + ((D_80164648[cameraId] * ydiff) / distance); + midZ = D_80164638[cameraId] + ((D_80164648[cameraId] * zdiff) / distance); } else { - var_f18 = *temp_t1_3; - sp98 = *temp_a3; - sp94 = *temp_t0; + midX = D_801645F8[cameraId]; + midY = D_80164618[cameraId]; + midZ = D_80164638[cameraId]; } - camera->pos[2] = var_f18; - camera->pos[0] = sp98; - temp_f16_2 = (f64) sp94; - sp28 = temp_f16_2; - sp90 = var_f18; - sp4C = temp_t1_3; - sp50 = temp_t0; - sp54 = temp_a3; - temp_f2_6 = (f64) func_802AE1C0(sp98, (f32) (temp_f16_2 + 30.0), var_f18); - if ((temp_f2_6 < (temp_f16_2 - 20.0)) || (temp_f2_6 >= 3000.0)) { - camera->pos[1] = (f32) (temp_f16_2 + 10.0); + camera->pos[0] = midX; + camera->pos[2] = midZ; + temp_f2_5 = func_802AE1C0(midX, midY + 30.0, midZ); + if ((temp_f2_5 < (midY - 20.0)) || (temp_f2_5 >= 3000.0)) { + camera->pos[1] = midY + 10.0; } else { - camera->pos[1] = (f32) (temp_f2_6 + 10.0); + camera->pos[1] = temp_f2_5 + 10.0; } - *temp_t1_3 = var_f18; - *temp_a3 = sp98; - *temp_t0 = sp94; - camera->lookAt[0] = spA0->pos[0]; - camera->lookAt[1] = (f32) ((f64) spA0->pos[1] + 6.0); - camera->lookAt[2] = spA0->pos[2]; - func_80014D30(cameraId, sp68); - temp_f12 = camera->lookAt[0] - camera->pos[0]; - spA8 = camera->lookAt[1] - camera->pos[1]; - spAC = temp_f12; - temp_f14_2 = camera->lookAt[2] - camera->pos[2]; - spA4 = temp_f14_2; - camera->rot[1] = atan2s(temp_f12, temp_f14_2); - camera->rot[0] = atan2s(sqrtf((spAC * spAC) + (temp_f14_2 * temp_f14_2)), spA8); + D_801645F8[cameraId] = midX; + D_80164618[cameraId] = midY; + D_80164638[cameraId] = midZ; + camera->lookAt[0] = player->pos[0]; + camera->lookAt[1] = player->pos[1] + 6.0; + camera->lookAt[2] = player->pos[2]; + func_80014D30(cameraId, pathIndex); + xdiff2 = camera->lookAt[0] - camera->pos[0]; + ydiff2 = camera->lookAt[1] - camera->pos[1]; + zdiff2 = camera->lookAt[2] - camera->pos[2]; + camera->rot[1] = atan2s(xdiff2, zdiff2); + camera->rot[0] = atan2s(sqrtf((xdiff2 * xdiff2) + (zdiff2 * zdiff2)), ydiff2); camera->rot[2] = 0; } -#else -GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80016494.s") -#endif -#ifdef MIPS_TO_C -// https://decomp.me/scratch/WDOs5 lots of diffs -//generated by m2c commit a39b70e85329b0bcaeb4350510ddb23dc9840dce on Jan-03-2024 -void func_80016C3C(s32 arg0, f32 arg1, s32 cameraId) { - f32 sp5C; - f32 sp54; - u16 sp44; - s32 sp3C; - s32 *sp34; - f32 *sp2C; - f32 *sp28; - Camera *temp_v0_2; - f32 *temp_t2; - f32 *temp_t3; - //f32 *var_s2; - f32 temp_f12; +void func_80016C3C(s32 playerId, f32 arg1, s32 cameraId) { + s32 stackPadding0; + s32 stackPadding1; f32 temp_f2; - s16 *temp_s1; - s16 temp_v1_2; - s16 temp_v1_3; - s32 *temp_v0; - s32 *temp_v1; - u16 temp_hi; - s32 var_a3; - u16 temp_s0; + s32 stackPadding2; + f32 temp_f12; + TrackWaypoint **path; + f32 sp54; + s32 temp_s0; + s16 sp48; + s16 sp44; + Camera *camera; - if (random_int(100) < 50) { - //var_s2 = &D_80164688[cameraId]; - //var_a3 = cameraId * 4; + if (random_int(0x0064U) < 0x32) { D_80164688[cameraId] = 0.1f; } else { - //var_s2 = &D_80164688[cameraId]; - //var_a3 = cameraId * 4; D_80164688[cameraId] = -0.1f; } - //temp_v1 = D_80163DD8[cameraId]; D_80163DD8[cameraId] = 0; - - if (gCurrentCourseId == COURSE_YOSHI_VALLEY) { - sp34 = &D_80163DD8[cameraId]; - sp3C = cameraId; + if (gCurrentCourseId == 4) { D_80163DD8[cameraId] = random_int(4U); D_80164688[cameraId] = 0.0f; } - temp_s1 = &gNearestWaypointByCameraId[cameraId]; temp_s0 = gWaypointCountByPathIndex[D_80163DD8[cameraId]]; - temp_hi = (s16) *temp_s1 % (s32) temp_s0; - *temp_s1 = (s16) temp_hi; - sp3C = var_a3; - func_8000BBD8(temp_hi & 0xFFFF, D_80164688[cameraId], 0); - temp_v1_2 = *temp_s1; - temp_t2 = D_80164618[cameraId]; - temp_v0 = D_801645F8[cameraId]; - *temp_v0 = D_80162FA0[0]; - temp_t3 = D_80164638[cameraId]; - *temp_t3 = D_80162FA0[2]; - *temp_t2 = (f32) (*D_80164550)[temp_v1_2].posY; - *(D_80164658 + var_a3) = 16.666666f; - *(D_80164648 + var_a3) = 0.0f; - sp44 = (u16) ((s32) (temp_v1_2 + 0xB) % (s32) temp_s0); - sp28 = temp_t3; - sp2C = temp_t2; - sp34 = temp_v0; - func_8000BBD8((s16) ((s32) (temp_v1_2 + 0xA) % (s32) temp_s0) & 0xFFFF, D_80164688[cameraId], 0); - temp_f2 = (f32) ((f64) D_80162FA0[0] * 0.5); - temp_f12 = (f32) ((f64) D_80162FA0[2] * 0.5); - sp5C = temp_f2; - sp54 = temp_f12; + gNearestWaypointByCameraId[cameraId] %= temp_s0; + func_8000BBD8(gNearestWaypointByCameraId[cameraId], D_80164688[cameraId], 0); + D_801645F8[cameraId] = D_80162FA0[0]; + D_80164618[cameraId] = D_80164550[0][gNearestWaypointByCameraId[cameraId]].posY; + path = D_80164550; + D_80164638[cameraId] = D_80162FA0[2]; + D_80164658[cameraId] = 16.666666f; + D_80164648[cameraId] = 0.0f; + sp48 = (gNearestWaypointByCameraId[cameraId] + 0xA) % temp_s0; + sp44 = (gNearestWaypointByCameraId[cameraId] + 0xB) % temp_s0; + func_8000BBD8(sp48, D_80164688[cameraId], 0); + temp_f2 = D_80162FA0[0] * 0.5; + temp_f12 = D_80162FA0[2] * 0.5; func_8000BBD8(sp44, D_80164688[cameraId], 0); - temp_v1_3 = *temp_s1; - temp_v0_2 = &cameras[cameraId]; - temp_v0_2->lookAt[0] = (f32) ((f64) temp_f2 + ((f64) D_80162FA0[0] * 0.5)); - temp_v0_2->lookAt[2] = (f32) ((f64) temp_f12 + ((f64) D_80162FA0[2] * 0.5)); - temp_v0_2->lookAt[1] = (f32) ((f64) ((f32) ((*D_80164550)[(s16) ((s32) (temp_v1_3 + 6) % (s32) temp_s0)].posY + (*D_80164550)[(s16) ((s32) (temp_v1_3 + 5) % (s32) temp_s0)].posY) * 0.5f) + 8.0); - temp_v0_2->pos[0] = (bitwise f32) *sp34; - temp_v0_2->pos[1] = *sp2C; - temp_v0_2->pos[2] = *sp28; + temp_f2 += D_80162FA0[0] * 0.5; + temp_f12 += D_80162FA0[2] * 0.5; + sp48 = (gNearestWaypointByCameraId[cameraId] + 0x5) % temp_s0; + sp44 = (gNearestWaypointByCameraId[cameraId] + 0x6) % temp_s0; + sp54 = (path[0][sp48].posY + path[0][sp44].posY) * 0.5f; + camera = cameras; + camera += cameraId; + camera->lookAt[0] = temp_f2; + camera->lookAt[2] = temp_f12; + camera->lookAt[1] = sp54 + 8.0; + camera->pos[0] = D_801645F8[cameraId]; + camera->pos[1] = D_80164618[cameraId]; + camera->pos[2] = D_80164638[cameraId]; } -#else -GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80016C3C.s") -#endif -#ifdef MIPS_TO_C -//generated by m2c commit 08138748803d75e73e4a94bb0c619a273754ee9c on Oct-11-2023 -//s16 gCurrentCourseId; /* unable to generate initializer */ - -void func_80017054(Camera *camera, Player *player, s8 index, s32 cameraId) { +#ifdef NON_MATCHING +// https://decomp.me/scratch/Ck7hV +// Really crazy diff, permuter only able to find fakematches for improvements (and they're big improvements) +// There's something really, really wrong with the empty `if` statement +void func_80017054(Camera *camera, Player *player, s32 index, s32 cameraId) { + s32 stackPadding0; + s32 stackPadding1; f32 spAC; f32 spA8; f32 spA4; + s32 stackPadding2; + s32 stackPadding3; f32 sp98; f32 sp94; f32 sp90; f32 sp8C; f32 sp88; f32 sp84; - f32 sp80; - f32 sp7C; - f32 sp78; + f32 stackPadding4; + f32 stackPadding5; + f32 stackPadding6; + s32 stackPadding7; + s32 stackPadding8; s16 sp6E; - u16 sp6C; - s32 sp5C; + s16 sp6C; + s32 stackPadding9; + s32 stackPaddingA; + s32 stackPaddingB; + s32 pathIndex; + s32 stackPaddingC; s32 sp58; s16 sp56; - //s32 sp4C; - f32 *sp48; - //s32 *sp44; - //s16 *sp40; - f32 *sp3C; - TrackWaypoint **sp2C; - TrackWaypoint **temp_t2_2; - TrackWaypoint *temp_t0_2; - TrackWaypoint *temp_t0_3; - f32 *temp_a2; - //f32 *temp_t1; + s32 playerId; f32 temp_f0; - f32 temp_f10; - f32 temp_f12; - f32 temp_f14; - f32 temp_f14_2; - f32 temp_f16; - f32 temp_f18; - f32 temp_f2; - f32 temp_f2_2; - f32 temp_f2_3; - f32 temp_f8; - f32 var_f14; - f32 var_f16; - f64 temp_f0_2; - s16 *temp_a1_2; - s16 *temp_t0; - s16 temp_a3; - s16 temp_a3_2; - s16 temp_a3_3; - s16 temp_a3_4; - s32 *temp_a0; - //s32 *temp_a1; - //s32 *temp_v1; - s32 temp_hi; - s32 temp_t2; - s32 temp_v0; - //temp_t1 = &D_80164648[cameraId]; - temp_f2 = D_80164648[cameraId]; - //temp_a1 = &D_80163DD8[cameraId]; - temp_t2 = D_80163DD8[cameraId]; - D_80164648[cameraId] = temp_f2 + ((D_80164658[cameraId] - temp_f2) * 0.5f); - temp_t0 = &gNearestWaypointByCameraId[cameraId]; - D_80163238 = (s32) camera->playerId; - temp_a3 = *temp_t0; - sp58 = (s32) gWaypointCountByPathIndex[temp_t2]; - sp56 = temp_a3; - sp48 = D_80164648[cameraId]; - //sp40 = temp_t0; - //sp44 = D_80163DD8[cameraId]; - //sp4C = cameraId * 4; - sp5C = temp_t2; - gNearestWaypointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], temp_a3, temp_t2); + playerId = camera->playerId; + pathIndex = D_80163DD8[cameraId]; + D_80164648[cameraId] += (D_80164658[cameraId] - D_80164648[cameraId]) * 0.5f; + sp58 = gWaypointCountByPathIndex[pathIndex]; + D_80163238 = playerId; + sp56 = gNearestWaypointByCameraId[cameraId]; + gNearestWaypointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], gNearestWaypointByCameraId[cameraId], pathIndex); if (gCurrentCourseId == 4) { - //temp_a3_2 = //*sp40; if ((sp56 != gNearestWaypointByCameraId[cameraId]) && (gNearestWaypointByCameraId[cameraId] == 1)) { - D_80163DD8[cameraId] = random_int(4); - //D_80163DD8[cameraId] = temp_v0; - sp5C = D_80163DD8[cameraId]; - gNearestWaypointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], gNearestWaypointByCameraId[cameraId], sp5C); + pathIndex = (D_80163DD8[cameraId] = random_int(4U)); + gNearestWaypointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], gNearestWaypointByCameraId[cameraId], pathIndex); } } - temp_a3_3 = gNearestWaypointByCameraId[cameraId]; - //temp_v1 = D_80164688[cameraId]; - sp6C = (u16) ((s32) (temp_a3_3 + 11) % sp58); - D_80163DD8[cameraId] = D_80164688[cameraId]; - //sp3C = (f32 *) unksp5E; - func_8000BBD8((s16) ((s32) (temp_a3_3 + 10) % sp58) & 0xFFFF, D_80164688[cameraId], sp5C); - sp8C = (f32) ((f64) D_80162FA0->unk0 * 0.5); - sp84 = (f32) ((f64) D_80162FA0->unk8 * 0.5); - func_8000BBD8(sp6C, D_80163DD8[cameraId], sp5C); - sp8C = (f32) ((f64) sp8C + ((f64) D_80162FA0->unk0 * 0.5)); - sp84 = (f32) ((f64) sp84 + ((f64) D_80162FA0->unk8 * 0.5)); - temp_a3_4 = gNearestWaypointByCameraId[cameraId]; - temp_t2_2 = &D_80164550[sp5C]; - temp_t0_2 = *temp_t2_2; - temp_hi = (s32) (temp_a3_4 + 1) % sp58; - sp88 = (f32) (temp_t0_2[(s16) ((s32) (temp_a3_4 + 6) % sp58)].posY + temp_t0_2[(s16) ((s32) (temp_a3_4 + 5) % sp58)].posY) * 0.5f; - sp2C = temp_t2_2; - sp6C = (u16) ((s32) (temp_a3_4 + 2) % sp58); - sp6E = (s16) temp_hi; - func_8000BBD8((s16) temp_hi & 0xFFFF, D_80163DD8[cameraId], sp5C); - temp_f14 = (f32) ((f64) D_80162FA0->unk0 * 0.5); - temp_f16 = (f32) ((f64) D_80162FA0->unk8 * 0.5); - sp98 = temp_f14; - sp90 = temp_f16; - func_8000BBD8(sp6C, D_80163DD8[cameraId], sp5C); - temp_t0_3 = *sp2C; - temp_a0 = D_801645F8[cameraId]; - temp_f10 = (f32) (temp_t0_3[(s16) sp6C].posY + temp_t0_3[(s16) temp_hi].posY) * 0.5f; - temp_a1_2 = D_80164618[cameraId]; - temp_f18 = (f32) ((f64) temp_f14 + ((f64) D_80162FA0->unk0 * 0.5)) - *temp_a0; - sp94 = temp_f10; - temp_f2_2 = temp_f10 - *temp_a1_2; - temp_a2 = D_80164638[cameraId]; - sp3C = temp_a2; - sp7C = temp_f2_2; - temp_f8 = (f32) ((f64) temp_f16 + ((f64) D_80162FA0->unk8 * 0.5)) - *temp_a2; - sp80 = temp_f18; - gNearestWaypointByCameraId[cameraId] = temp_a1_2; - D_80163DD8[cameraId] = temp_a0; - sp78 = temp_f8; - temp_f0 = sqrtf((temp_f18 * temp_f18) + (temp_f2_2 * temp_f2_2) + (temp_f8 * temp_f8)); - if ((f64) temp_f0 != 0.0) { - temp_f2_3 = *sp48; - var_f14 = ((temp_f2_3 * temp_f18) / temp_f0) + (bitwise f32) *temp_a0; - sp94 = ((temp_f2_3 * sp7C) / temp_f0) + *temp_a1_2; - var_f16 = ((temp_f2_3 * sp78) / temp_f0) + *temp_a2; + sp6E = (gNearestWaypointByCameraId[cameraId] + 0xA) % sp58; + sp6C = (gNearestWaypointByCameraId[cameraId] + 0xB) % sp58; + func_8000BBD8(sp6E, D_80164688[cameraId], pathIndex); + sp8C = D_80162FA0[0] * 0.5; + sp84 = D_80162FA0[2] * 0.5; + func_8000BBD8(sp6C, D_80164688[cameraId], pathIndex); + sp8C += D_80162FA0[0] * 0.5; + sp84 += D_80162FA0[2] * 0.5; + sp6E = (gNearestWaypointByCameraId[cameraId] + 5) % sp58; + sp6C = (gNearestWaypointByCameraId[cameraId] + 6) % sp58; + sp88 = (D_80164550[pathIndex][sp6E].posY + D_80164550[pathIndex][sp6C].posY) * 0.5f; + sp6E = (gNearestWaypointByCameraId[cameraId] + 1) % sp58; + sp6C = (gNearestWaypointByCameraId[cameraId] + 2) % sp58; + func_8000BBD8(sp6E, D_80164688[cameraId], pathIndex); + sp98 = D_80162FA0[0] * 0.5; + sp90 = D_80162FA0[2] * 0.5; + func_8000BBD8(sp6C, D_80164688[cameraId], pathIndex); + sp98 += D_80162FA0[0] * 0.5; + sp90 += D_80162FA0[2] * 0.5; + sp94 = (D_80164550[pathIndex][sp6E].posY + D_80164550[pathIndex][sp6C].posY) * 0.5f; + stackPadding4 = sp98 - D_801645F8[cameraId]; + stackPadding5 = sp90 - D_80164618[cameraId]; + stackPadding6 = sp94 - D_80164638[cameraId]; + temp_f0 = sqrtf(((sp98 * sp98) + (sp94 * sp94)) + (sp90 * sp90)); + if (temp_f0 != 0.0) { + sp98 = D_801645F8[cameraId] + ((D_80164648[cameraId] * stackPadding4) / temp_f0); + sp94 = D_80164618[cameraId] + ((D_80164648[cameraId] * stackPadding5) / temp_f0); + sp90 = D_80164638[cameraId] + ((D_80164648[cameraId] * stackPadding6) / temp_f0); } else { - var_f14 = (bitwise f32) *temp_a0; - var_f16 = *temp_a2; - sp94 = *temp_a1_2; + sp98 = D_801645F8[cameraId]; + sp94 = D_80164618[cameraId]; + sp90 = D_80164638[cameraId]; } - temp_f0_2 = (f64) var_f14; - if (!(temp_f0_2 < -10000.0) && (temp_f0_2 > 10000.0)) { - + // This empty if statement is a huge source of problems. I have no idea what's going on + if ((!(sp98 < (-10000.0))) && (sp98 > 10000.0)) { + if (sp98 && sp98) {} } - camera->pos[0] = var_f14; - camera->pos[2] = var_f16; - camera->pos[1] = (f32) ((f64) sp94 + 10.0); - *temp_a0 = (bitwise s32) var_f14; - *temp_a2 = var_f16; - *temp_a1_2 = sp94; + camera->pos[0] = sp98; + if (1) {} if (1) {} if (1) {} if (1) {} + camera->pos[1] = sp94 + 10.0; + camera->pos[2] = sp90; + D_801645F8[cameraId] = sp98; + D_80164638[cameraId] = sp90; + D_80164618[cameraId] = sp94; camera->lookAt[0] = sp8C; + camera->lookAt[1] = sp88 + 8.0; camera->lookAt[2] = sp84; - camera->lookAt[1] = (f32) ((f64) sp88 + 8.0); - func_80014D30(cameraId, sp5C); - temp_f12 = camera->lookAt[0] - camera->pos[0]; + func_80014D30(cameraId, pathIndex); + spAC = camera->lookAt[0] - camera->pos[0]; spA8 = camera->lookAt[1] - camera->pos[1]; - spAC = temp_f12; - temp_f14_2 = camera->lookAt[2] - camera->pos[2]; - spA4 = temp_f14_2; - camera->rot[1] = atan2s(temp_f12, temp_f14_2); - camera->rot[0] = atan2s(sqrtf((spAC * spAC) + (temp_f14_2 * temp_f14_2)), spA8); + spA4 = camera->lookAt[2] - camera->pos[2]; + camera->rot[1] = atan2s(spAC, spA4); + camera->rot[0] = atan2s(sqrtf((spAC * spAC) + (spA4 * spA4)), spA8); camera->rot[2] = 0; } #else @@ -6391,164 +6075,97 @@ void func_80017720(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { camera->pos[2] = D_80164638[cameraId]; } -#ifdef MIPS_TO_C -//generated by m2c commit 08138748803d75e73e4a94bb0c619a273754ee9c on Oct-11-2023 void func_800178F4(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { - s16 sp9E; - s16 sp9C; - f32 sp94; - f32 sp90; - f32 sp8C; - Player *sp88; - f32 sp80; - f32 sp78; - f32 sp74; - f32 sp70; - f32 sp6C; - s16 sp62; - u16 sp60; - s32 sp50; - s32 sp4C; - s32 sp44; - f32 *sp40; - f32 *sp3C; - f32 *sp38; - s32 sp34; /* compiler-managed */ - s32 sp30; - s32 sp2C; - s16 *sp28; - TrackWaypoint *temp_v0_3; - f32 *temp_a1; - f32 *temp_a2; - f32 *temp_a3; - f32 *temp_t6; - f32 *temp_v1; - f32 *temp_v1_2; - f32 temp_f0; - f32 temp_f12; - f32 temp_f14; - f32 temp_f14_2; - f32 temp_f16; - f32 temp_f16_2; - f32 temp_f16_3; - f32 temp_f2; - f32 var_f14; - f32 var_f18; + s16 cameraWaypoint; + s16 playerWaypoint; + f32 stackPadding0; + f32 xdiff2; + f32 ydiff2; + f32 zdiff2; + Player *player; + f32 distance; + f32 midX; + f32 midY; + f32 midZ; + f32 xdiff; + f32 ydiff; + f32 zdiff; f32 var_f2; - f64 var_f0; - s16 *temp_t1; - s16 temp_t1_2; - s16 temp_v0; - s16 temp_v0_2; - s32 temp_hi; - s32 temp_hi_2; - s32 temp_t3; - s32 temp_t4; - u16 temp_ra; + f32 var_f18; + s16 waypoint1; + s16 waypoint2; + f32 stackPadding1; + f32 var_f14; + s32 playerId; + s32 pathIndex; + s32 waypointCount; - temp_v0 = camera->playerId; - temp_t4 = cameraId * 4; - temp_a1 = &D_80164688[cameraId]; - temp_t6 = &D_80164648[cameraId]; - sp3C = temp_t6; - temp_v1 = &D_80164658[cameraId]; - *temp_a1 = D_80163068[temp_v0]; - temp_f16 = *temp_t6; - temp_t3 = temp_v0 * 0xDD8; - *temp_t6 = temp_f16 + ((*temp_v1 - temp_f16) * 0.5f); - temp_ra = gPathIndexByPlayerId[temp_v0]; - D_80163238 = (s32) temp_v0; - sp4C = (s32) gWaypointCountByPathIndex[temp_ra]; - temp_t1 = &gNearestWaypointByCameraId[cameraId]; - sp50 = (s32) temp_ra; - sp88 = &gPlayerOne[temp_v0]; - sp28 = temp_t1; - sp2C = cameraId * 2; - sp44 = temp_t4; - sp30 = temp_t3; - sp34 = temp_v0 * 2; - sp40 = temp_a1; - sp38 = temp_v1; - *sp28 = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], *temp_t1, (s32) temp_ra); - temp_t1_2 = *sp28; - temp_hi = (s32) (gNearestWaypointByPlayerId[temp_v0] + 3) % sp4C; - sp9C = (s16) temp_hi; - sp9E = temp_t1_2; - if (func_80007BF8(temp_hi & 0xFFFF, temp_t1_2 & 0xFFFF, 0x000DU, 1U, (u16) sp4C) <= 0) { - sp44 = temp_t4; - func_8001A348(cameraId, *sp40, (s32) *(D_80164680 + sp2C)); + playerId = camera->playerId; + player = gPlayerOne; + D_80164688[cameraId] = D_80163068[playerId]; + D_80164648[cameraId] += ((D_80164658[cameraId] - D_80164648[cameraId]) / 2.0f); + D_80163238 = playerId; + pathIndex = gPathIndexByPlayerId[playerId]; + player += playerId; + waypointCount = gWaypointCountByPathIndex[pathIndex]; + gNearestWaypointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], gNearestWaypointByCameraId[cameraId], pathIndex); + playerWaypoint = (gNearestWaypointByPlayerId[playerId] + 3) % waypointCount; + cameraWaypoint = gNearestWaypointByCameraId[cameraId]; + if (func_80007BF8(playerWaypoint, cameraWaypoint, 0x000DU, 1U, waypointCount) <= 0) { + func_8001A348(cameraId, D_80164688[cameraId], D_80164680[cameraId]); } else { - if ((temp_t1_2 < sp9C) && ((sp9C - temp_t1_2) < 3)) { - *temp_v1 = (f32) ((f64) *(&gPlayers->unk_094 + temp_t3) + 0.1); + if ((cameraWaypoint < playerWaypoint) && ((playerWaypoint - cameraWaypoint) < 3)) { + D_80164658[cameraId] = gPlayers[playerId].unk_094 + 0.1; } - if ((sp9C < temp_t1_2) && ((temp_t1_2 - sp9C) < 3)) { - *temp_v1 = (f32) ((f64) *(&gPlayers->unk_094 + temp_t3) - 0.1); + if ((playerWaypoint < cameraWaypoint) && ((cameraWaypoint - playerWaypoint) < 3)) { + D_80164658[cameraId] = gPlayers[playerId].unk_094 - 0.1; } - var_f0 = (f64) *temp_v1; - if (var_f0 > 10.0) { - *temp_v1 = 10.0f; - var_f0 = (f64) *temp_v1; + if (D_80164658[cameraId] > 10.0) { + D_80164658[cameraId] = 10.0f; } - if (var_f0 < 0.0) { - *temp_v1 = 0.0f; + if (D_80164658[cameraId] < 0.0) { + D_80164658[cameraId] = 0.0f; } } - temp_v0_2 = *sp28; - temp_hi_2 = (s32) (temp_v0_2 + 1) % sp4C; - sp60 = (u16) ((s32) (temp_v0_2 + 2) % sp4C); - sp62 = (s16) temp_hi_2; - sp44 = temp_t4; - sp38 = (f32 *) unksp52; - func_8000BBD8((s16) temp_hi_2 & 0xFFFF, *sp40, unksp52); - temp_f2 = (f32) ((f64) D_80162FA0->unk0 * 0.5); - temp_f14 = (f32) ((f64) D_80162FA0->unk8 * 0.5); - sp80 = temp_f2; - sp78 = temp_f14; - func_8000BBD8(sp60, *sp40, unksp52); - temp_v0_3 = D_80164550[sp50]; - temp_a2 = &D_80164618[cameraId]; - temp_v1_2 = &D_801645F8[cameraId]; - temp_a3 = &D_80164638[cameraId]; - temp_f16_2 = (f32) ((f64) temp_f2 + ((f64) D_80162FA0->unk0 * 0.5)) - *temp_v1_2; - sp34 = temp_a3; - sp40 = temp_v1_2; - sp74 = temp_f16_2; - sp38 = temp_a2; - sp70 = (f32) ((f64) (temp_v0_3[(s16) sp60].posY + temp_v0_3[sp62].posY) * 0.5) - *temp_a2; - sp6C = (f32) ((f64) temp_f14 + ((f64) D_80162FA0->unk8 * 0.5)) - *temp_a3; - temp_f0 = sqrtf((temp_f16_2 * temp_f16_2) + (sp70 * sp70) + (sp6C * sp6C)); - if ((f64) temp_f0 != 0.0) { - temp_f16_3 = *sp3C; - var_f2 = ((temp_f16_3 * sp74) / temp_f0) + *temp_v1_2; - var_f18 = ((temp_f16_3 * sp70) / temp_f0) + *temp_a2; - var_f14 = ((temp_f16_3 * sp6C) / temp_f0) + *temp_a3; + waypoint1 = (gNearestWaypointByCameraId[cameraId] + 1) % waypointCount; + waypoint2 = (gNearestWaypointByCameraId[cameraId] + 2) % waypointCount; + func_8000BBD8(waypoint1, D_80164688[cameraId], pathIndex); + midX = D_80162FA0[0] * 0.5; + midZ = D_80162FA0[2] * 0.5; + func_8000BBD8(waypoint2, D_80164688[cameraId], pathIndex); + midX += D_80162FA0[0] * 0.5; + midZ += D_80162FA0[2] * 0.5; + midY = (D_80164550[pathIndex][waypoint1].posY + D_80164550[pathIndex][waypoint2].posY) / 2.0; + xdiff = midX - D_801645F8[cameraId]; + ydiff = midY - D_80164618[cameraId]; + zdiff = midZ - D_80164638[cameraId]; + distance = sqrtf((xdiff * xdiff) + (ydiff * ydiff) + (zdiff * zdiff)); + if (distance != 0.0) { + midX = D_801645F8[cameraId] + ((D_80164648[cameraId] * xdiff) / distance); + midY = D_80164618[cameraId] + ((D_80164648[cameraId] * ydiff) / distance); + midZ = D_80164638[cameraId] + ((D_80164648[cameraId] * zdiff) / distance); } else { - var_f2 = *temp_v1_2; - var_f18 = *temp_a2; - var_f14 = *temp_a3; + midX = D_801645F8[cameraId]; + midY = D_80164618[cameraId]; + midZ = D_80164638[cameraId]; } - camera->pos[0] = var_f2; - camera->pos[2] = var_f14; - camera->pos[1] = (f32) ((f64) var_f18 + 10.0); - *temp_v1_2 = var_f2; - *temp_a2 = var_f18; - *temp_a3 = var_f14; - camera->lookAt[0] = sp88->pos[0]; - camera->lookAt[1] = (f32) ((f64) sp88->pos[1] + 6.0); - camera->lookAt[2] = sp88->pos[2]; - func_80014D30(cameraId, sp50); - temp_f12 = camera->lookAt[0] - camera->pos[0]; - sp90 = camera->lookAt[1] - camera->pos[1]; - sp94 = temp_f12; - temp_f14_2 = camera->lookAt[2] - camera->pos[2]; - sp8C = temp_f14_2; - camera->rot[1] = atan2s(temp_f12, temp_f14_2); - camera->rot[0] = atan2s(sqrtf((sp94 * sp94) + (temp_f14_2 * temp_f14_2)), sp90); + camera->pos[0] = midX; + camera->pos[2] = midZ; + camera->pos[1] = midY + 10.0; + D_801645F8[cameraId] = midX; + D_80164618[cameraId] = midY; + D_80164638[cameraId] = midZ; + camera->lookAt[0] = player->pos[0]; + camera->lookAt[1] = player->pos[1] + 6.0; + camera->lookAt[2] = player->pos[2]; + func_80014D30(cameraId, pathIndex); + xdiff2 = camera->lookAt[0] - camera->pos[0]; + ydiff2 = camera->lookAt[1] - camera->pos[1]; + zdiff2 = camera->lookAt[2] - camera->pos[2]; + camera->rot[1] = atan2s(xdiff2, zdiff2); + camera->rot[0] = atan2s(sqrtf((xdiff2 * xdiff2) + (zdiff2 * zdiff2)), ydiff2); camera->rot[2] = 0; } -#else -GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_800178F4.s") -#endif void func_80017F10(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { Camera* camera = cameras + cameraId; @@ -6572,167 +6189,97 @@ void func_80017F10(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { camera->pos[2] = D_80164638[cameraId]; } -#ifdef MIPS_TO_C -//generated by m2c commit 08138748803d75e73e4a94bb0c619a273754ee9c on Oct-11-2023 void func_800180F0(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { - s16 sp9E; - s16 sp9C; + s16 cameraWaypoint; + s16 playerWaypoint; + s32 stackPadding3; f32 sp94; f32 sp90; f32 sp8C; - f32 sp80; - f32 sp78; - f32 sp74; - f32 sp70; - f32 sp6C; - s16 sp62; - u16 sp60; - s32 sp50; - s32 sp4C; - s32 sp44; - f32 *sp40; - f32 *sp3C; - f32 *sp38; - s32 sp34; /* compiler-managed */ - s32 sp30; - s32 sp2C; - s16 *sp28; - Player *temp_s1; - TrackWaypoint *temp_v0_3; - f32 *temp_a1; - f32 *temp_a2; - f32 *temp_a3; - f32 *temp_t6; - f32 *temp_v1; - f32 *temp_v1_2; - f32 temp_f0; - f32 temp_f12; - f32 temp_f14; - f32 temp_f14_2; - f32 temp_f16; - f32 temp_f16_2; - f32 temp_f16_3; - f32 temp_f2; - f32 var_f14; - f32 var_f18; + s32 stackPadding4; + f32 distance; + f32 midX; + f32 midY; + f32 midZ; + f32 xdiff; + f32 ydiff; + f32 zdiff; + Player *player; + s32 playerId; + s16 waypoint1; + s16 waypoint2; f32 var_f2; - f64 var_f0; - s16 *temp_t1; - s16 temp_t1_2; - s16 temp_v0; - s16 temp_v0_2; - s32 temp_hi; - s32 temp_hi_2; - s32 temp_t3; - s32 temp_t5; - u16 temp_ra; - u16 temp_t4; + f32 var_f18; + f32 var_f14; + s32 pathIndex; + s32 waypointCount; - temp_v0 = camera->playerId; - temp_t5 = cameraId * 4; - temp_a1 = &D_80164688[cameraId]; - temp_t6 = &D_80164648[cameraId]; - sp3C = temp_t6; - temp_v1 = &D_80164658[cameraId]; - *temp_a1 = D_80163068[temp_v0]; - temp_f16 = *temp_t6; - *temp_t6 = temp_f16 + ((*temp_v1 - temp_f16) * 0.5f); - D_80163238 = (s32) temp_v0; - temp_ra = gPathIndexByPlayerId[temp_v0]; - temp_t4 = gWaypointCountByPathIndex[temp_ra]; - temp_t3 = temp_v0 * 0xDD8; - temp_t1 = &gNearestWaypointByCameraId[cameraId]; - sp50 = (s32) temp_ra; - sp28 = temp_t1; - sp30 = temp_t3; - sp2C = cameraId * 2; - sp44 = temp_t5; - sp34 = temp_v0 * 2; - sp40 = temp_a1; - sp38 = temp_v1; - temp_s1 = &gPlayerOne[temp_v0]; - sp4C = (s32) temp_t4; - *sp28 = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], *temp_t1, (s32) temp_ra); - temp_t1_2 = *sp28; - temp_hi = (s32) ((gNearestWaypointByPlayerId[temp_v0] + temp_t4) - 2) % (s32) temp_t4; - sp9C = (s16) temp_hi; - sp9E = temp_t1_2; - if (func_80007BF8(temp_hi & 0xFFFF, temp_t1_2 & 0xFFFF, 1U, 0x000AU, (u16) (s32) temp_t4) <= 0) { - sp44 = temp_t5; - sp4C = (s32) temp_t4; - func_8001A348(cameraId, *sp40, (s32) *(D_80164680 + sp2C)); + playerId = camera->playerId; + player = gPlayerOne; + D_80164688[cameraId] = D_80163068[playerId]; + D_80164648[cameraId] += ((D_80164658[cameraId] - D_80164648[cameraId]) * 0.5f); + D_80163238 = playerId; + pathIndex = gPathIndexByPlayerId[playerId]; + waypointCount = gWaypointCountByPathIndex[pathIndex]; + player += playerId; + gNearestWaypointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], gNearestWaypointByCameraId[cameraId], pathIndex); + playerWaypoint = ((gNearestWaypointByPlayerId[playerId] + waypointCount) - 2) % waypointCount; + cameraWaypoint = gNearestWaypointByCameraId[cameraId]; + if (func_80007BF8(playerWaypoint, cameraWaypoint, 1U, 0x000AU, waypointCount) <= 0) { + func_8001A348(cameraId, D_80164688[cameraId], D_80164680[cameraId]); } else { - if ((temp_t1_2 < sp9C) && ((sp9C - temp_t1_2) < 3)) { - *temp_v1 = (f32) ((f64) *(&gPlayers->unk_094 + temp_t3) + 0.1); + if ((cameraWaypoint < playerWaypoint) && ((playerWaypoint - cameraWaypoint) < 3)) { + D_80164658[cameraId] = gPlayers[playerId].unk_094 + 0.1; } - if ((sp9C < temp_t1_2) && ((temp_t1_2 - sp9C) < 3)) { - *temp_v1 = (f32) ((f64) *(&gPlayers->unk_094 + temp_t3) - 0.1); + if ((playerWaypoint < cameraWaypoint) && ((cameraWaypoint - playerWaypoint) < 3)) { + D_80164658[cameraId] = gPlayers[playerId].unk_094 - 0.1; } - var_f0 = (f64) *temp_v1; - if (var_f0 > 10.0) { - *temp_v1 = 10.0f; - var_f0 = (f64) *temp_v1; + if (D_80164658[cameraId] > 10.0) { + D_80164658[cameraId] = 10.0f; } - if (var_f0 < 0.0) { - *temp_v1 = 0.0f; + if (D_80164658[cameraId] < 0.0) { + D_80164658[cameraId] = 0.0f; } } - temp_v0_2 = *sp28; - temp_hi_2 = (s32) (temp_v0_2 + 1) % (s32) temp_t4; - sp60 = (u16) ((s32) (temp_v0_2 + 2) % (s32) temp_t4); - sp62 = (s16) temp_hi_2; - sp44 = temp_t5; - sp38 = (f32 *) unksp52; - func_8000BBD8((s16) temp_hi_2 & 0xFFFF, *sp40, unksp52); - temp_f2 = (f32) ((f64) D_80162FA0->unk0 * 0.5); - temp_f14 = (f32) ((f64) D_80162FA0->unk8 * 0.5); - sp80 = temp_f2; - sp78 = temp_f14; - func_8000BBD8(sp60, *sp40, unksp52); - temp_v0_3 = D_80164550[sp50]; - temp_a2 = &D_80164618[cameraId]; - temp_v1_2 = &D_801645F8[cameraId]; - temp_a3 = &D_80164638[cameraId]; - temp_f16_2 = (f32) ((f64) temp_f2 + ((f64) D_80162FA0->unk0 * 0.5)) - *temp_v1_2; - sp34 = temp_a3; - sp40 = temp_v1_2; - sp74 = temp_f16_2; - sp38 = temp_a2; - sp70 = (f32) ((f64) (temp_v0_3[(s16) sp60].posY + temp_v0_3[sp62].posY) * 0.5) - *temp_a2; - sp6C = (f32) ((f64) temp_f14 + ((f64) D_80162FA0->unk8 * 0.5)) - *temp_a3; - temp_f0 = sqrtf((temp_f16_2 * temp_f16_2) + (sp70 * sp70) + (sp6C * sp6C)); - if ((f64) temp_f0 != 0.0) { - temp_f16_3 = *sp3C; - var_f2 = ((temp_f16_3 * sp74) / temp_f0) + *temp_v1_2; - var_f18 = ((temp_f16_3 * sp70) / temp_f0) + *temp_a2; - var_f14 = ((temp_f16_3 * sp6C) / temp_f0) + *temp_a3; + waypoint1 = (gNearestWaypointByCameraId[cameraId] + 1) % waypointCount; + waypoint2 = (gNearestWaypointByCameraId[cameraId] + 2) % waypointCount; + func_8000BBD8(waypoint1, D_80164688[cameraId], pathIndex); + midX = D_80162FA0[0] * 0.5; + midZ = D_80162FA0[2] * 0.5; + func_8000BBD8(waypoint2, D_80164688[cameraId], pathIndex); + midX += D_80162FA0[0] * 0.5; + midZ += D_80162FA0[2] * 0.5; + midY = (D_80164550[pathIndex][waypoint1].posY + D_80164550[pathIndex][waypoint2].posY) / 2.0; + xdiff = midX - D_801645F8[cameraId]; + ydiff = midY - D_80164618[cameraId]; + zdiff = midZ - D_80164638[cameraId]; + distance = sqrtf((xdiff * xdiff) + (ydiff * ydiff) + (zdiff * zdiff)); + if (distance != 0.0) { + midX = D_801645F8[cameraId] +((D_80164648[cameraId] * xdiff) / distance); + midY = D_80164618[cameraId] +((D_80164648[cameraId] * ydiff) / distance); + midZ = D_80164638[cameraId] +((D_80164648[cameraId] * zdiff) / distance); } else { - var_f2 = *temp_v1_2; - var_f18 = *temp_a2; - var_f14 = *temp_a3; + midX = D_801645F8[cameraId]; + midY = D_80164618[cameraId]; + midZ = D_80164638[cameraId]; } - camera->pos[0] = var_f2; - camera->pos[2] = var_f14; - camera->pos[1] = (f32) ((f64) temp_s1->pos[1] + 10.0); - *temp_v1_2 = var_f2; - *temp_a2 = var_f18; - *temp_a3 = var_f14; - camera->lookAt[0] = temp_s1->pos[0]; - camera->lookAt[1] = (f32) ((f64) temp_s1->pos[1] + 6.0); - camera->lookAt[2] = temp_s1->pos[2]; - func_80014D30(cameraId, sp50); - temp_f12 = camera->lookAt[0] - camera->pos[0]; + camera->pos[0] = midX; + camera->pos[2] = midZ; + camera->pos[1] = player->pos[1] + 10.0; + D_801645F8[cameraId] = midX; + D_80164618[cameraId] = midY; + D_80164638[cameraId] = midZ; + camera->lookAt[0] = player->pos[0]; + camera->lookAt[1] = player->pos[1] + 6.0; + camera->lookAt[2] = player->pos[2]; + func_80014D30(cameraId, pathIndex); + sp94 = camera->lookAt[0] - camera->pos[0]; sp90 = camera->lookAt[1] - camera->pos[1]; - sp94 = temp_f12; - temp_f14_2 = camera->lookAt[2] - camera->pos[2]; - sp8C = temp_f14_2; - camera->rot[1] = atan2s(temp_f12, temp_f14_2); - camera->rot[0] = atan2s(sqrtf((sp94 * sp94) + (temp_f14_2 * temp_f14_2)), sp90); + sp8C = camera->lookAt[2] - camera->pos[2]; + camera->rot[1] = atan2s(sp94, sp8C); + camera->rot[0] = atan2s(sqrtf((sp94 * sp94) + (sp8C * sp8C)), sp90); camera->rot[2] = 0; } -#else -GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_800180F0.s") -#endif void func_80018718(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { Camera* camera = cameras + cameraId; @@ -6755,222 +6302,117 @@ void func_80018718(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { camera->pos[2] = D_80164638[cameraId]; } -#ifdef MIPS_TO_C -//generated by m2c commit 08138748803d75e73e4a94bb0c619a273754ee9c on Oct-11-2023 -extern s32 D_80163238; - void func_800188F4(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { + s16 cameraWaypoint; + s16 playerWaypoint; + s32 stackPadding0; f32 spAC; f32 spA8; f32 spA4; - Player *spA0; - f32 sp98; - f32 sp94; - f32 sp90; - f32 sp8C; - f32 sp88; - f32 sp84; - s16 sp7A; - u16 sp78; - s32 sp68; - s32 sp64; - f32 *sp5C; - s32 sp58; - f32 *sp54; - f32 *sp50; - f32 *sp4C; - s32 sp48; - s16 *sp44; - s32 sp40; - u16 *sp3C; - f64 sp28; - TrackWaypoint *temp_v0; - f32 *temp_a3_2; - f32 *temp_t1; - f32 *temp_t5; - f32 *temp_v1; - f32 *temp_v1_2; - f32 *temp_v1_3; - f32 temp_f0; - f32 temp_f0_2; - f32 temp_f10; - f32 temp_f10_2; - f32 temp_f12; - f32 temp_f12_2; - f32 temp_f14; - f32 temp_f14_2; - f32 temp_f16; - f32 temp_f18; - f32 temp_f2_3; - f32 var_f18; - f64 temp_f16_2; - f64 temp_f2; - f64 temp_f2_2; - f64 temp_f2_4; - f64 var_f0; - f64 var_f0_2; - s16 *var_t3; - s16 temp_a1; - s16 temp_a3; - s16 temp_t0; - s16 temp_t0_2; - s32 temp_hi; - s32 temp_t4; - s32 var_ra; - u16 *temp_t8; - u16 *temp_t8_2; - u16 temp_t2; - u16 temp_t7; + Player *player; + f32 distance; + f32 midX; + f32 midY; + f32 midZ; + f32 xdiff; + f32 ydiff; + f32 zdiff; + f32 sp64; + f32 sp60; + s16 waypoint1; + s16 waypoint2; + f32 sp5C; + f32 temp_f2_4; + s32 playerId; + s32 pathIndex; + s32 waypointCount; - spA0 = gPlayerOne; - temp_a1 = camera->playerId; - temp_t7 = gPathIndexByPlayerId[temp_a1]; - sp68 = (s32) temp_t7; - temp_f12 = *(&gPlayers->unk_094 + (temp_a1 * 0xDD8)); - temp_t4 = cameraId * 4; - temp_t2 = gWaypointCountByPathIndex[temp_t7]; - temp_t5 = &D_80164648[cameraId]; - *temp_t5 = temp_f12; + player = gPlayerOne; + playerId = camera->playerId; + pathIndex = gPathIndexByPlayerId[playerId]; + waypointCount = gWaypointCountByPathIndex[pathIndex]; + D_80164648[cameraId] = gPlayers[playerId].unk_094; if (D_8016448C == 0) { - temp_t8 = &gNearestWaypointByPlayerId[temp_a1]; - var_t3 = &gNearestWaypointByCameraId[cameraId]; - sp3C = temp_t8; - var_ra = cameraId * 2; - temp_a3 = *var_t3; - if (temp_a3 == ((s32) ((*temp_t8 + temp_t2) - 6) % (s32) temp_t2)) { + if (gNearestWaypointByCameraId[cameraId] == (((gNearestWaypointByPlayerId[playerId] + waypointCount) - 6) % waypointCount)) { D_8016448C = 1; } - temp_f2 = (f64) D_80163068[temp_a1]; - temp_v1 = &D_80164688[cameraId]; - var_f0 = (f64) *temp_v1; - if (var_f0 < (temp_f2 - 0.2)) { - *temp_t5 = (f32) ((f64) temp_f12 * 0.7); + if (D_80164688[cameraId] < (D_80163068[playerId] - 0.2)) { + D_80164648[cameraId] = gPlayers[playerId].unk_094 * 0.7; } - if ((temp_f2 - 0.5) < var_f0) { - *temp_v1 = (f32) (var_f0 - 0.01); - var_f0 = (f64) *temp_v1; + if ((D_80163068[playerId] - 0.5) < D_80164688[cameraId]) { + D_80164688[cameraId] -= 0.01; } - if (var_f0 < -0.9) { - *temp_v1 = -0.9f; - *temp_t5 = (f32) ((f64) temp_f12 * 0.8); + if (D_80164688[cameraId] < -0.9) { + D_80164688[cameraId] = -0.9f; + D_80164648[cameraId] = gPlayers[playerId].unk_094 * 0.8; } - sp40 = (s32) temp_a3; } else { - temp_t8_2 = &gNearestWaypointByPlayerId[temp_a1]; - var_t3 = &gNearestWaypointByCameraId[cameraId]; - sp3C = temp_t8_2; - temp_t0 = *var_t3; - var_ra = cameraId * 2; - if (temp_t0 == ((s32) (*temp_t8_2 + 6) % (s32) temp_t2)) { + if (gNearestWaypointByCameraId[cameraId] == ((gNearestWaypointByPlayerId[playerId] + 6) % waypointCount)) { D_8016448C = 0; } - temp_f2_2 = (f64) D_80163068[temp_a1]; - temp_v1_2 = &D_80164688[cameraId]; - var_f0_2 = (f64) *temp_v1_2; - if ((temp_f2_2 + 0.2) < var_f0_2) { - *temp_t5 = (f32) ((f64) temp_f12 * 1.3); + if ((D_80163068[playerId] + 0.2) < D_80164688[cameraId]) { + D_80164648[cameraId] = gPlayers[playerId].unk_094 * 1.3; } - if (var_f0_2 < (temp_f2_2 + 0.5)) { - *temp_v1_2 = (f32) (var_f0_2 + 0.01); - var_f0_2 = (f64) *temp_v1_2; + if (D_80164688[cameraId] < (D_80163068[playerId] + 0.5)) { + D_80164688[cameraId] += 0.01; } - sp40 = (s32) temp_t0; - if (var_f0_2 > 0.9) { - *temp_v1_2 = 0.9f; - sp40 = (s32) temp_t0; - *temp_t5 = (f32) ((f64) temp_f12 * 1.2); + if (D_80164688[cameraId] > 0.9) { + D_80164688[cameraId] = 0.9f; + D_80164648[cameraId] = gPlayers[playerId].unk_094 * 1.2; } } - D_80163238 = (s32) temp_a1; - spA0 = &spA0[temp_a1]; - sp48 = var_ra; - sp54 = temp_t5; - sp58 = temp_t4; - sp44 = var_t3; - sp64 = (s32) temp_t2; - sp5C = &D_80164688[cameraId]; - *var_t3 = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], (s16) sp40, sp68); - if (func_80007BF8((s16) *sp3C & 0xFFFF, *var_t3 & 0xFFFF, 0x000FU, 0x000FU, (u16) (s32) temp_t2) <= 0) { - sp5C = &D_80164688[cameraId]; - sp64 = (s32) temp_t2; - sp44 = var_t3; - sp58 = temp_t4; - sp54 = temp_t5; - func_8001A348(cameraId, D_80164688[cameraId], (s32) *(D_80164680 + var_ra)); + D_80163238 = playerId; + player += playerId; + gNearestWaypointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], gNearestWaypointByCameraId[cameraId], pathIndex); + playerWaypoint = gNearestWaypointByPlayerId[playerId]; + cameraWaypoint = gNearestWaypointByCameraId[cameraId]; + if (func_80007BF8(playerWaypoint, cameraWaypoint, 0x000FU, 0x000FU, waypointCount) <= 0) { + func_8001A348(cameraId, D_80164688[cameraId], D_80164680[cameraId]); } - temp_t0_2 = *var_t3; - temp_hi = (s32) (temp_t0_2 + 1) % (s32) temp_t2; - sp78 = (u16) ((s32) (temp_t0_2 + 2) % (s32) temp_t2); - sp7A = (s16) temp_hi; - sp5C = &D_80164688[cameraId]; - sp58 = temp_t4; - sp54 = temp_t5; - sp50 = (f32 *) unksp6A; - func_8000BA14((s16) temp_hi & 0xFFFF, D_80164688[cameraId], 60.0f, unksp6A); - temp_f10 = (f32) ((f64) D_80162FA0->unk0 * 0.5); - sp98 = temp_f10; - temp_f18 = (f32) ((f64) D_80162FA0->unk8 * 0.5); - sp90 = temp_f18; - func_8000BA14(sp78, D_80164688[cameraId], 60.0f, unksp6A); - temp_v0 = D_80164550[sp68]; - temp_f10_2 = (f32) ((f64) temp_f10 + ((f64) D_80162FA0->unk0 * 0.5)); - sp98 = temp_f10_2; - temp_v1_3 = &D_801645F8[cameraId]; - temp_a3_2 = &D_80164618[cameraId]; - temp_f14 = temp_f10_2 - *temp_v1_3; - temp_t1 = &D_80164638[cameraId]; - sp4C = temp_t1; - sp8C = temp_f14; - sp50 = temp_a3_2; - sp5C = temp_v1_3; - temp_f16 = (f32) ((f64) (temp_v0[(s16) sp78].posY + temp_v0[sp7A].posY) * 0.5) - *temp_a3_2; - temp_f0 = (f32) ((f64) temp_f18 + ((f64) D_80162FA0->unk8 * 0.5)) - *temp_t1; - sp88 = temp_f16; - sp84 = temp_f0; - temp_f0_2 = sqrtf((temp_f14 * temp_f14) + (temp_f16 * temp_f16) + (temp_f0 * temp_f0)); - if ((f64) temp_f0_2 != 0.0) { - temp_f2_3 = *temp_t5; - sp98 = ((temp_f2_3 * temp_f14) / temp_f0_2) + *temp_v1_3; - sp94 = ((temp_f2_3 * temp_f16) / temp_f0_2) + *temp_a3_2; - var_f18 = ((temp_f2_3 * sp84) / temp_f0_2) + *temp_t1; + waypoint1 = (gNearestWaypointByCameraId[cameraId] + 1) % waypointCount; + waypoint2 = (gNearestWaypointByCameraId[cameraId] + 2) % waypointCount; + func_8000BA14(waypoint1, D_80164688[cameraId], 60.0f, pathIndex); + midX = D_80162FA0[0] * 0.5; + midZ = D_80162FA0[2] * 0.5; + func_8000BA14(waypoint2, D_80164688[cameraId], 60.0f, pathIndex); + midX += D_80162FA0[0] * 0.5; + midZ += D_80162FA0[2] * 0.5; + midY = (D_80164550[pathIndex][waypoint1].posY + D_80164550[pathIndex][waypoint2].posY) / 2.0; + xdiff = midX - D_801645F8[cameraId]; + ydiff = midY - D_80164618[cameraId]; + zdiff = midZ - D_80164638[cameraId]; + distance = sqrtf((xdiff * xdiff) + (ydiff * ydiff) + (zdiff * zdiff)); + if (distance != 0.0) { + midX = D_801645F8[cameraId] + ((D_80164648[cameraId] * xdiff) / distance); + midY = D_80164618[cameraId] + ((D_80164648[cameraId] * ydiff) / distance); + midZ = D_80164638[cameraId] + ((D_80164648[cameraId] * zdiff) / distance); } else { - var_f18 = *temp_t1; - sp98 = *temp_v1_3; - sp94 = *temp_a3_2; + midX = D_801645F8[cameraId]; + midY = D_80164618[cameraId]; + midZ = D_80164638[cameraId]; } - camera->pos[2] = var_f18; - camera->pos[0] = sp98; - temp_f16_2 = (f64) sp94; - sp28 = temp_f16_2; - sp90 = var_f18; - sp4C = temp_t1; - sp50 = temp_a3_2; - sp5C = temp_v1_3; - temp_f2_4 = (f64) func_802AE1C0(sp98, (f32) (temp_f16_2 + 30.0), var_f18); - if ((temp_f2_4 < (temp_f16_2 - 20.0)) || (temp_f2_4 >= 3000.0)) { - camera->pos[1] = (f32) (temp_f16_2 + 10.0); + camera->pos[0] = midX; + camera->pos[2] = midZ; + temp_f2_4 = func_802AE1C0(midX, midY + 30.0, midZ); + if ((temp_f2_4 < (midY - 20.0)) || (temp_f2_4 >= 3000.0)) { + camera->pos[1] = midY + 10.0; } else { - camera->pos[1] = (f32) (temp_f2_4 + 8.0); + camera->pos[1] = temp_f2_4 + 8.0; } - *temp_t1 = var_f18; - *temp_v1_3 = sp98; - *temp_a3_2 = sp94; - camera->lookAt[0] = spA0->pos[0]; - camera->lookAt[1] = (f32) ((f64) spA0->pos[1] + 6.0); - camera->lookAt[2] = spA0->pos[2]; - func_80014D30(cameraId, sp68); - temp_f12_2 = camera->lookAt[0] - camera->pos[0]; + D_801645F8[cameraId] = midX; + D_80164618[cameraId] = midY; + D_80164638[cameraId] = midZ; + camera->lookAt[0] = player->pos[0]; + camera->lookAt[1] = player->pos[1] + 6.0; + camera->lookAt[2] = player->pos[2]; + func_80014D30(cameraId, pathIndex); + spAC = camera->lookAt[0] - camera->pos[0]; spA8 = camera->lookAt[1] - camera->pos[1]; - spAC = temp_f12_2; - temp_f14_2 = camera->lookAt[2] - camera->pos[2]; - spA4 = temp_f14_2; - camera->rot[1] = atan2s(temp_f12_2, temp_f14_2); - camera->rot[0] = atan2s(sqrtf((spAC * spAC) + (temp_f14_2 * temp_f14_2)), spA8); + spA4 = camera->lookAt[2] - camera->pos[2]; + camera->rot[1] = atan2s(spAC, spA4); + camera->rot[0] = atan2s(sqrtf((spAC * spAC) + (spA4 * spA4)), spA8); camera->rot[2] = 0; } -#else -GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_800188F4.s") -#endif void func_80019118(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { Camera* camera = cameras + cameraId; diff --git a/src/code_80005FD0.h b/src/code_80005FD0.h index 15b6db5d1..e7920dd97 100644 --- a/src/code_80005FD0.h +++ b/src/code_80005FD0.h @@ -201,14 +201,19 @@ void func_80015390(Camera*, Player*, s32); void func_80015544(s32, f32, s32, s32); void func_8001577C(Camera*, UNUSED Player*, s32, s32); void func_80015A9C(s32, f32, s32, s16); +void func_80015C94(Camera*, s32, s32, s32); void func_800162CC(s32, f32, s32, s16); +void func_80016494(Camera*, s32, s32, s32); void func_80016C3C(s32, f32, s32); void func_80017720(s32, f32, s32, s16); +void func_800178F4(Camera*, s32, s32, s32); void func_80017F10(s32, f32, s32, s16); +void func_800180F0(Camera*, s32, s32, s32); void func_80018718(s32, f32, s32, s16); +void func_800188F4(Camera*, s32, s32, s32); void func_80019118(s32, f32, s32, s16); void func_8001933C(Camera*, UNUSED Player*, s32, s32); diff --git a/tools/doxygen_syms.md b/tools/doxygen_syms.md index 6610aa22e..ed8220111 100644 --- a/tools/doxygen_syms.md +++ b/tools/doxygen_syms.md @@ -3621,35 +3621,9 @@ Variable Name | Memory Address [D_800ECFCC](@ref D_800ECFCC) | 0x800ECFCC [D_800ECFD0](@ref D_800ECFD0) | 0x800ECFD0 [D_800ECFD4](@ref D_800ECFD4) | 0x800ECFD4 -[D_800ED230](@ref D_800ED230) | 0x800ED230 -[D_800ED238](@ref D_800ED238) | 0x800ED238 -[D_800ED240](@ref D_800ED240) | 0x800ED240 -[D_800ED248](@ref D_800ED248) | 0x800ED248 -[D_800ED250](@ref D_800ED250) | 0x800ED250 -[D_800ED258](@ref D_800ED258) | 0x800ED258 -[D_800ED260](@ref D_800ED260) | 0x800ED260 -[D_800ED264](@ref D_800ED264) | 0x800ED264 -[D_800ED268](@ref D_800ED268) | 0x800ED268 [D_800ED270](@ref D_800ED270) | 0x800ED270 [D_800ED278](@ref D_800ED278) | 0x800ED278 [D_800ED280](@ref D_800ED280) | 0x800ED280 -[D_800ED288](@ref D_800ED288) | 0x800ED288 -[D_800ED290](@ref D_800ED290) | 0x800ED290 -[D_800ED298](@ref D_800ED298) | 0x800ED298 -[D_800ED2A0](@ref D_800ED2A0) | 0x800ED2A0 -[D_800ED2A8](@ref D_800ED2A8) | 0x800ED2A8 -[D_800ED2B0](@ref D_800ED2B0) | 0x800ED2B0 -[D_800ED2B8](@ref D_800ED2B8) | 0x800ED2B8 -[D_800ED2C0](@ref D_800ED2C0) | 0x800ED2C0 -[D_800ED2C8](@ref D_800ED2C8) | 0x800ED2C8 -[D_800ED2D0](@ref D_800ED2D0) | 0x800ED2D0 -[D_800ED2D8](@ref D_800ED2D8) | 0x800ED2D8 -[D_800ED2E0](@ref D_800ED2E0) | 0x800ED2E0 -[D_800ED2E8](@ref D_800ED2E8) | 0x800ED2E8 -[D_800ED2F0](@ref D_800ED2F0) | 0x800ED2F0 -[D_800ED2F8](@ref D_800ED2F8) | 0x800ED2F8 -[D_800ED300](@ref D_800ED300) | 0x800ED300 -[D_800ED308](@ref D_800ED308) | 0x800ED308 [D_800ED498](@ref D_800ED498) | 0x800ED498 [D_800EF0B8](@ref D_800EF0B8) | 0x800EF0B8 [D_800EF0C0](@ref D_800EF0C0) | 0x800EF0C0 From 0ac8284fb26ddafcff799fa1011d8b3a7bdeb558 Mon Sep 17 00:00:00 2001 From: Matthew <25674682+spazzylemons@users.noreply.github.com> Date: Mon, 4 Mar 2024 13:03:41 -0500 Subject: [PATCH 03/10] Match func_802B5B14 (#581) * Match func_802B5B14 --- .../racing/math_util/func_802B5B14.s | 103 ------------------ src/racing/math_util.c | 83 +++++--------- src/racing/math_util.h | 1 + 3 files changed, 31 insertions(+), 156 deletions(-) delete mode 100644 asm/non_matchings/racing/math_util/func_802B5B14.s diff --git a/asm/non_matchings/racing/math_util/func_802B5B14.s b/asm/non_matchings/racing/math_util/func_802B5B14.s deleted file mode 100644 index 1346869d1..000000000 --- a/asm/non_matchings/racing/math_util/func_802B5B14.s +++ /dev/null @@ -1,103 +0,0 @@ -glabel func_802B5B14 -/* 11F124 802B5B14 27BDFF78 */ addiu $sp, $sp, -0x88 -/* 11F128 802B5B18 AFB10020 */ sw $s1, 0x20($sp) -/* 11F12C 802B5B1C 00808825 */ move $s1, $a0 -/* 11F130 802B5B20 AFBF0024 */ sw $ra, 0x24($sp) -/* 11F134 802B5B24 AFB0001C */ sw $s0, 0x1c($sp) -/* 11F138 802B5B28 F7B40010 */ sdc1 $f20, 0x10($sp) -/* 11F13C 802B5B2C 00A08025 */ move $s0, $a1 -/* 11F140 802B5B30 0C0AE006 */ jal sins -/* 11F144 802B5B34 94A40000 */ lhu $a0, ($a1) -/* 11F148 802B5B38 E7A00038 */ swc1 $f0, 0x38($sp) -/* 11F14C 802B5B3C 0C0AE00E */ jal coss -/* 11F150 802B5B40 96040000 */ lhu $a0, ($s0) -/* 11F154 802B5B44 46000506 */ mov.s $f20, $f0 -/* 11F158 802B5B48 0C0AE006 */ jal sins -/* 11F15C 802B5B4C 96040002 */ lhu $a0, 2($s0) -/* 11F160 802B5B50 96040002 */ lhu $a0, 2($s0) -/* 11F164 802B5B54 0C0AE00E */ jal coss -/* 11F168 802B5B58 E7A00030 */ swc1 $f0, 0x30($sp) -/* 11F16C 802B5B5C 96040004 */ lhu $a0, 4($s0) -/* 11F170 802B5B60 0C0AE006 */ jal sins -/* 11F174 802B5B64 E7A0002C */ swc1 $f0, 0x2c($sp) -/* 11F178 802B5B68 96040004 */ lhu $a0, 4($s0) -/* 11F17C 802B5B6C 0C0AE00E */ jal coss -/* 11F180 802B5B70 E7A00028 */ swc1 $f0, 0x28($sp) -/* 11F184 802B5B74 C7AE0030 */ lwc1 $f14, 0x30($sp) -/* 11F188 802B5B78 C7A80038 */ lwc1 $f8, 0x38($sp) -/* 11F18C 802B5B7C C7B0002C */ lwc1 $f16, 0x2c($sp) -/* 11F190 802B5B80 C6240000 */ lwc1 $f4, ($s1) -/* 11F194 802B5B84 460E4302 */ mul.s $f12, $f8, $f14 -/* 11F198 802B5B88 C7A20028 */ lwc1 $f2, 0x28($sp) -/* 11F19C 802B5B8C E7A4003C */ swc1 $f4, 0x3c($sp) -/* 11F1A0 802B5B90 46008282 */ mul.s $f10, $f16, $f0 -/* 11F1A4 802B5B94 C6260004 */ lwc1 $f6, 4($s1) -/* 11F1A8 802B5B98 46026102 */ mul.s $f4, $f12, $f2 -/* 11F1AC 802B5B9C E7A60040 */ swc1 $f6, 0x40($sp) -/* 11F1B0 802B5BA0 46045180 */ add.s $f6, $f10, $f4 -/* 11F1B4 802B5BA4 46008287 */ neg.s $f10, $f16 -/* 11F1B8 802B5BA8 E7A60048 */ swc1 $f6, 0x48($sp) -/* 11F1BC 802B5BAC 46025102 */ mul.s $f4, $f10, $f2 -/* 11F1C0 802B5BB0 00000000 */ nop -/* 11F1C4 802B5BB4 46006282 */ mul.s $f10, $f12, $f0 -/* 11F1C8 802B5BB8 460A2100 */ add.s $f4, $f4, $f10 -/* 11F1CC 802B5BBC 460EA282 */ mul.s $f10, $f20, $f14 -/* 11F1D0 802B5BC0 E7A40058 */ swc1 $f4, 0x58($sp) -/* 11F1D4 802B5BC4 4602A102 */ mul.s $f4, $f20, $f2 -/* 11F1D8 802B5BC8 E7AA0068 */ swc1 $f10, 0x68($sp) -/* 11F1DC 802B5BCC 4600A282 */ mul.s $f10, $f20, $f0 -/* 11F1E0 802B5BD0 E7A4004C */ swc1 $f4, 0x4c($sp) -/* 11F1E4 802B5BD4 46104482 */ mul.s $f18, $f8, $f16 -/* 11F1E8 802B5BD8 46004107 */ neg.s $f4, $f8 -/* 11F1EC 802B5BDC E7AA005C */ swc1 $f10, 0x5c($sp) -/* 11F1F0 802B5BE0 46007287 */ neg.s $f10, $f14 -/* 11F1F4 802B5BE4 E7A4006C */ swc1 $f4, 0x6c($sp) -/* 11F1F8 802B5BE8 46005102 */ mul.s $f4, $f10, $f0 -/* 11F1FC 802B5BEC 00000000 */ nop -/* 11F200 802B5BF0 46029202 */ mul.s $f8, $f18, $f2 -/* 11F204 802B5BF4 46082280 */ add.s $f10, $f4, $f8 -/* 11F208 802B5BF8 46027102 */ mul.s $f4, $f14, $f2 -/* 11F20C 802B5BFC 00000000 */ nop -/* 11F210 802B5C00 46009202 */ mul.s $f8, $f18, $f0 -/* 11F214 802B5C04 E7AA0050 */ swc1 $f10, 0x50($sp) -/* 11F218 802B5C08 46082100 */ add.s $f4, $f4, $f8 -/* 11F21C 802B5C0C 4610A202 */ mul.s $f8, $f20, $f16 -/* 11F220 802B5C10 E7A40060 */ swc1 $f4, 0x60($sp) -/* 11F224 802B5C14 C7A4003C */ lwc1 $f4, 0x3c($sp) -/* 11F228 802B5C18 E7A80070 */ swc1 $f8, 0x70($sp) -/* 11F22C 802B5C1C 46062202 */ mul.s $f8, $f4, $f6 -/* 11F230 802B5C20 C7A6004C */ lwc1 $f6, 0x4c($sp) -/* 11F234 802B5C24 C7A40040 */ lwc1 $f4, 0x40($sp) -/* 11F238 802B5C28 46062182 */ mul.s $f6, $f4, $f6 -/* 11F23C 802B5C2C 46064200 */ add.s $f8, $f8, $f6 -/* 11F240 802B5C30 46045182 */ mul.s $f6, $f10, $f4 -/* 11F244 802B5C34 46083280 */ add.s $f10, $f6, $f8 -/* 11F248 802B5C38 E62A0000 */ swc1 $f10, ($s1) -/* 11F24C 802B5C3C C7A4003C */ lwc1 $f4, 0x3c($sp) -/* 11F250 802B5C40 C7A60058 */ lwc1 $f6, 0x58($sp) -/* 11F254 802B5C44 C7AA0040 */ lwc1 $f10, 0x40($sp) -/* 11F258 802B5C48 46062202 */ mul.s $f8, $f4, $f6 -/* 11F25C 802B5C4C C7A4005C */ lwc1 $f4, 0x5c($sp) -/* 11F260 802B5C50 46045182 */ mul.s $f6, $f10, $f4 -/* 11F264 802B5C54 46064100 */ add.s $f4, $f8, $f6 -/* 11F268 802B5C58 C7A80060 */ lwc1 $f8, 0x60($sp) -/* 11F26C 802B5C5C 460A4182 */ mul.s $f6, $f8, $f10 -/* 11F270 802B5C60 46043200 */ add.s $f8, $f6, $f4 -/* 11F274 802B5C64 E6280004 */ swc1 $f8, 4($s1) -/* 11F278 802B5C68 C7A60068 */ lwc1 $f6, 0x68($sp) -/* 11F27C 802B5C6C C7AA003C */ lwc1 $f10, 0x3c($sp) -/* 11F280 802B5C70 C7A80040 */ lwc1 $f8, 0x40($sp) -/* 11F284 802B5C74 46065102 */ mul.s $f4, $f10, $f6 -/* 11F288 802B5C78 C7AA006C */ lwc1 $f10, 0x6c($sp) -/* 11F28C 802B5C7C 460A4182 */ mul.s $f6, $f8, $f10 -/* 11F290 802B5C80 46062280 */ add.s $f10, $f4, $f6 -/* 11F294 802B5C84 C7A40070 */ lwc1 $f4, 0x70($sp) -/* 11F298 802B5C88 46082182 */ mul.s $f6, $f4, $f8 -/* 11F29C 802B5C8C 460A3100 */ add.s $f4, $f6, $f10 -/* 11F2A0 802B5C90 E6240008 */ swc1 $f4, 8($s1) -/* 11F2A4 802B5C94 8FBF0024 */ lw $ra, 0x24($sp) -/* 11F2A8 802B5C98 8FB10020 */ lw $s1, 0x20($sp) -/* 11F2AC 802B5C9C 8FB0001C */ lw $s0, 0x1c($sp) -/* 11F2B0 802B5CA0 D7B40010 */ ldc1 $f20, 0x10($sp) -/* 11F2B4 802B5CA4 03E00008 */ jr $ra -/* 11F2B8 802B5CA8 27BD0088 */ addiu $sp, $sp, 0x88 diff --git a/src/racing/math_util.c b/src/racing/math_util.c index c4b6e3169..aef024671 100644 --- a/src/racing/math_util.c +++ b/src/racing/math_util.c @@ -372,61 +372,38 @@ void mtxf_s16_rotate_z(Mat4 mat, s16 angle) { */ } -#ifdef MIPS_TO_C -//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Oct-29-2023 -void func_802B5B14(f32 *arg0, s16 *arg1) { - f32 sp70; - f32 sp6C; - f32 sp68; - f32 sp60; - f32 sp5C; - f32 sp58; - f32 sp50; - f32 sp4C; - f32 sp48; - f32 sp40; - f32 sp3C; - f32 sp38; - f32 sp30; - f32 sp2C; - f32 sp28; - f32 temp_f0; - f32 temp_f10; - f32 temp_f12; - f32 temp_f18; - f32 temp_f20; - f32 temp_f4; - f32 temp_f6; +void func_802B5B14(Vec3f b, Vec3s rotate) { + Mat4 mtx; + Vec3f copy; - sp38 = sins((u16) arg1->unk0); - temp_f20 = coss((u16) arg1->unk0); - sp30 = sins(arg1->unk2); - sp2C = coss(arg1->unk2); - sp28 = sins(arg1->unk4); - temp_f0 = coss(arg1->unk4); - temp_f4 = arg0->unk0; - temp_f12 = sp38 * sp30; - sp3C = temp_f4; - sp40 = arg0->unk4; - temp_f6 = (sp2C * temp_f0) + (temp_f12 * sp28); - sp48 = temp_f6; - sp58 = (-sp2C * sp28) + (temp_f12 * temp_f0); - sp68 = temp_f20 * sp30; - sp4C = temp_f20 * sp28; - temp_f18 = sp38 * sp2C; - sp5C = temp_f20 * temp_f0; - sp6C = -sp38; - temp_f10 = (-sp30 * temp_f0) + (temp_f18 * sp28); - sp50 = temp_f10; - sp60 = (sp30 * sp28) + (temp_f18 * temp_f0); - sp70 = temp_f20 * sp2C; - arg0->unk0 = (temp_f10 * sp40) + ((temp_f4 * temp_f6) + (sp40 * sp4C)); - arg0->unk4 = (f32) ((sp60 * sp40) + ((temp_f4 * sp58) + (sp40 * sp5C))); - arg0->unk8 = (f32) ((sp70 * sp40) + ((sp3C * sp68) + (sp40 * sp6C))); + f32 sx = sins(rotate[0]); + f32 cx = coss(rotate[0]); + + f32 sy = sins(rotate[1]); + f32 cy = coss(rotate[1]); + + f32 sz = sins(rotate[2]); + f32 cz = coss(rotate[2]); + + copy[0] = b[0]; + copy[1] = b[1]; + + mtx[0][0] = cy * cz + sx * sy * sz; + mtx[1][0] = -cy * sz + sx * sy * cz; + mtx[2][0] = cx * sy; + + mtx[0][1] = cx * sz; + mtx[1][1] = cx * cz; + mtx[2][1] = -sx; + + mtx[0][2] = -sy * cz + sx * cy * sz; + mtx[1][2] = sy * sz + sx * cy * cz; + mtx[2][2] = cx * cy; + + b[0] = copy[0] * mtx[0][0] + copy[1] * mtx[0][1] + copy[1] * mtx[0][2]; + b[1] = copy[0] * mtx[1][0] + copy[1] * mtx[1][1] + copy[1] * mtx[1][2]; + b[2] = copy[0] * mtx[2][0] + copy[1] * mtx[2][1] + copy[1] * mtx[2][2]; } -#else -GLOBAL_ASM("asm/non_matchings/racing/math_util/func_802B5B14.s") -#endif void func_802B5CAC(s16 arg0, s16 arg1, Vec3f arg2) { f32 sp2C = sins(arg1); diff --git a/src/racing/math_util.h b/src/racing/math_util.h index 06f76fc7d..794028219 100644 --- a/src/racing/math_util.h +++ b/src/racing/math_util.h @@ -36,6 +36,7 @@ void func_802B5564(Mat4, u16*, f32, f32, f32, f32, f32); void mtxf_rotate_x(Mat4, s16); void mtxf_rotate_y(Mat4, s16); void mtxf_s16_rotate_z(Mat4, s16); +void func_802B5B14(Vec3f b, Vec3s rotate); // unused void func_802B5CAC(s16, s16, Vec3f); void func_802B5D30(s16, s16, s32); void func_802B5D64(uintptr_t, s16, s16, s32); From 6f4decf6b346d65da28f07dd541aef2844baacb5 Mon Sep 17 00:00:00 2001 From: Tyler McGavran Date: Mon, 4 Mar 2024 21:28:31 -0500 Subject: [PATCH 04/10] Update StarSpawn to StarCloudData (#578) * Update StarSpawn to StarCloudData Add and better specify the struct used to control how stars and clouds are handled in various courses. --- .../update_objects/func_800789AC.s | 41 -- include/objects.h | 23 +- src/code_8006E9C0.c | 64 +-- src/code_8006E9C0.h | 18 +- src/data/some_data.c | 334 +++++++------- src/data/some_data.h | 16 +- src/update_objects.c | 81 ++-- src/update_objects.h | 3 +- tools/doxygen_syms.md | 430 +++++++++--------- 9 files changed, 474 insertions(+), 536 deletions(-) delete mode 100644 asm/non_matchings/update_objects/func_800789AC.s diff --git a/asm/non_matchings/update_objects/func_800789AC.s b/asm/non_matchings/update_objects/func_800789AC.s deleted file mode 100644 index 9a4416b72..000000000 --- a/asm/non_matchings/update_objects/func_800789AC.s +++ /dev/null @@ -1,41 +0,0 @@ -glabel func_800789AC -/* 0795AC 800789AC 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 0795B0 800789B0 AFB40028 */ sw $s4, 0x28($sp) -/* 0795B4 800789B4 3C148019 */ lui $s4, %hi(D_8018D1F0) # $s4, 0x8019 -/* 0795B8 800789B8 2694D1F0 */ addiu $s4, %lo(D_8018D1F0) # addiu $s4, $s4, -0x2e10 -/* 0795BC 800789BC 8E8E0000 */ lw $t6, ($s4) -/* 0795C0 800789C0 AFB30024 */ sw $s3, 0x24($sp) -/* 0795C4 800789C4 AFB20020 */ sw $s2, 0x20($sp) -/* 0795C8 800789C8 AFB00018 */ sw $s0, 0x18($sp) -/* 0795CC 800789CC 00C09025 */ move $s2, $a2 -/* 0795D0 800789D0 00A09825 */ move $s3, $a1 -/* 0795D4 800789D4 AFBF002C */ sw $ra, 0x2c($sp) -/* 0795D8 800789D8 AFB1001C */ sw $s1, 0x1c($sp) -/* 0795DC 800789DC 19C00011 */ blez $t6, .L80078A24 -/* 0795E0 800789E0 00008025 */ move $s0, $zero -/* 0795E4 800789E4 3C188019 */ lui $t8, %hi(D_8018CC80) # $t8, 0x8019 -/* 0795E8 800789E8 2718CC80 */ addiu $t8, %lo(D_8018CC80) # addiu $t8, $t8, -0x3380 -/* 0795EC 800789EC 00047880 */ sll $t7, $a0, 2 -/* 0795F0 800789F0 01F88821 */ addu $s1, $t7, $t8 -/* 0795F4 800789F4 0010C8C0 */ sll $t9, $s0, 3 -.L800789F8: -/* 0795F8 800789F8 03324021 */ addu $t0, $t9, $s2 -/* 0795FC 800789FC 8E240000 */ lw $a0, ($s1) -/* 079600 80078A00 95050000 */ lhu $a1, ($t0) -/* 079604 80078A04 0C01E23E */ jal func_800788F8 -/* 079608 80078A08 02603025 */ move $a2, $s3 -/* 07960C 80078A0C 8E890000 */ lw $t1, ($s4) -/* 079610 80078A10 26100001 */ addiu $s0, $s0, 1 -/* 079614 80078A14 26310004 */ addiu $s1, $s1, 4 -/* 079618 80078A18 0209082A */ slt $at, $s0, $t1 -/* 07961C 80078A1C 5420FFF6 */ bnel $at, $zero, .L800789F8 -/* 079620 80078A20 0010C8C0 */ sll $t9, $s0, 3 -.L80078A24: -/* 079624 80078A24 8FBF002C */ lw $ra, 0x2c($sp) -/* 079628 80078A28 8FB00018 */ lw $s0, 0x18($sp) -/* 07962C 80078A2C 8FB1001C */ lw $s1, 0x1c($sp) -/* 079630 80078A30 8FB20020 */ lw $s2, 0x20($sp) -/* 079634 80078A34 8FB30024 */ lw $s3, 0x24($sp) -/* 079638 80078A38 8FB40028 */ lw $s4, 0x28($sp) -/* 07963C 80078A3C 03E00008 */ jr $ra -/* 079640 80078A40 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/include/objects.h b/include/objects.h index 88dc9a7a8..e3c5dd73a 100644 --- a/include/objects.h +++ b/include/objects.h @@ -289,13 +289,6 @@ extern Vec3s gHedgehogPatrolPoints[]; */ extern s32 indexObjectList2[]; -// This struct is used by a lot of different objects -// Stars, clouds, exahust smoke (I think?) -typedef struct { - Vec3su pos; - u16 id; -} StarSpawn; - #define NUM_BOOS 0xA #define NUM_FIRE_BREATHS 4 @@ -407,6 +400,22 @@ extern s32 gLeafParticle[]; //! Next free spot in gLeafParticle? Wraps back around to 0 if it gets bigger than gLeafParticle_SIZE extern s32 gNextFreeLeafParticle; +// Struct used for clouds and stars +// See `func_80070328` and `func_80070250` for cloud initialization +// See `func_800704A0` and `func_800703E0` for star initialization +typedef struct { + // rotY and posY seem relative to the camera. + // See `func_800788F8` to see how rotY is used to decide whether and where to display clouds/stars + // See `func_80078A44` and `func_800789AC` to see how stars and clouds (respectively) are looped over + /* 0x00 */ u16 rotY; + /* 0x02 */ u16 posY; + // Can be bigger than 100! + /* 0x04 */ u16 scalePercent; + // There are a couple different cloud shapes, this decides which one is used + // For stars, this is always 0 since they don't have multiple textures + /* 0x06 */ u16 subType; +} StarData, CloudData; // size = 0x8 + #define D_8018CC80_SIZE 0x64 /** diff --git a/src/code_8006E9C0.c b/src/code_8006E9C0.c index bbbb9b036..3eda50bb9 100644 --- a/src/code_8006E9C0.c +++ b/src/code_8006E9C0.c @@ -22,6 +22,7 @@ #include "data/other_textures.h" #include "render_objects.h" #include "code_80091750.h" +#include "src/data/some_data.h" void init_hud(void) { @@ -604,30 +605,30 @@ void init_object_list_index(void) { } } -void func_80070250(s32 objectIndex, s32 arg1, StarSpawn *arg2) { +void init_cloud_object(s32 objectIndex, s32 arg1, CloudData *arg2) { ItemWindowObjects *temp_v0; init_object(objectIndex, arg1); temp_v0 = &gObjectList[objectIndex]; - temp_v0->unk_0D5 = arg2->id; + temp_v0->unk_0D5 = arg2->subType; temp_v0->currentItem = ITEM_NONE; - temp_v0->direction_angle[1] = arg2->pos[0]; - temp_v0->unk_09E = arg2->pos[1]; - temp_v0->sizeScaling = (f32) arg2->pos[2] / 100.0; - temp_v0->activeTexture = &D_8018D220[arg2->id]; + temp_v0->direction_angle[1] = arg2->rotY; + temp_v0->unk_09E = arg2->posY; + temp_v0->sizeScaling = (f32) arg2->scalePercent / 100.0; + temp_v0->activeTexture = &D_8018D220[arg2->subType]; func_80073404(objectIndex, 0x40U, 0x20U, &D_0D005FB0); temp_v0->primAlpha = 0x00FF; } -void func_80070328(StarSpawn *arg0) { +void init_clouds(CloudData *cloudList) { s32 var_s0 = 0; - StarSpawn *test = arg0; + CloudData *test = &cloudList[0]; do { if(1) {} - func_80070250(find_unused_obj_index(&D_8018CC80[D_8018D1F8 + var_s0]), 1, test); + init_cloud_object(find_unused_obj_index(&D_8018CC80[D_8018D1F8 + var_s0]), 1, test); var_s0++; test++; - } while (test->pos[0] != 0xFFFF); + } while (test->rotY != 0xFFFF); D_8018D1F8 += var_s0; D_8018D1F0 = var_s0; D_8018D230 = 0; @@ -642,34 +643,34 @@ void func_80070328(StarSpawn *arg0) { * The stars in Wario's Stadium, Toad's Turnpike, and Rainbow Road are not part of the skybox. * They are instead objects that seemingly hover in the air around the player * They have no true x/y/z position, instead they seem to be kept in a position relative to the - * player they hang around. There is however an x/y position for where they should be on screen + * player they hang around. There is however an y rotation and y position for where they should be on screen * when they are visbile (unk_09E[0] and [1]). * sizeScaling is some sort of size scaling on the start texture. * unk_0A2 is an alpha value, used to make the star twinkle. **/ -void func_800703E0(s32 objectIndex, s32 arg1, StarSpawn *arg2) { +void init_star_object(s32 objectIndex, s32 arg1, StarData *arg2) { ItemWindowObjects *temp_v0; init_object(objectIndex, arg1); temp_v0 = &gObjectList[objectIndex]; - temp_v0->unk_0D5 = arg2->id; // No idea, all 0's for stars + temp_v0->unk_0D5 = arg2->subType; temp_v0->currentItem = ITEM_BANANA; - temp_v0->direction_angle[1] = arg2->pos[0]; // No idea - temp_v0->unk_09E = arg2->pos[1]; // screen Y position - temp_v0->sizeScaling = (f32)arg2->pos[2] / 100.0; // some type of scaling on the texture + temp_v0->direction_angle[1] = arg2->rotY; + temp_v0->unk_09E = arg2->posY; // screen Y position + temp_v0->sizeScaling = (f32) arg2->scalePercent / 100.0; // some type of scaling on the texture temp_v0->activeTexture = D_0D0293D8; func_80073404(objectIndex, 0x10U, 0x10U, common_vtx_rectangle); } -void func_800704A0(StarSpawn *arg0) { +void init_stars(StarData *starList) { s32 var_s0 = 0; - StarSpawn *test = arg0; + StarData *test = &starList[0]; do { if(1) {} - func_800703E0(find_unused_obj_index(&D_8018CC80[D_8018D1F8 + var_s0]), 1, test); + init_star_object(find_unused_obj_index(&D_8018CC80[D_8018D1F8 + var_s0]), 1, test); var_s0++; test++; - } while (test->pos[0] != 0xFFFF); + } while (test->rotY != 0xFFFF); D_8018D1F8 += var_s0; D_8018D1F0 = var_s0; D_8018D230 = 1; @@ -681,10 +682,11 @@ void func_8007055C(void) { switch (gCurrentCourseId) { case COURSE_MARIO_RACEWAY: - func_80070328(&D_800E6C10); + // Uses Kalimari Desert's clouds for initialization? + init_clouds(gKalimariDesertClouds); break; case COURSE_YOSHI_VALLEY: - func_80070328(&D_800E6AA8); + init_clouds(gYoshiValleyMooMooFarmClouds); break; case COURSE_FRAPPE_SNOWLAND: if (gPlayerCount == 1) { @@ -699,31 +701,31 @@ void func_8007055C(void) { D_8018D1F0 = var_s0; break; case COURSE_KOOPA_BEACH: - func_80070328(D_800E6B00); + init_clouds(gKoopaTroopaBeachClouds); break; case COURSE_ROYAL_RACEWAY: - func_80070328(D_800E6B38); + init_clouds(gRoyalRacewayClouds); break; case COURSE_LUIGI_RACEWAY: - func_80070328(D_800E6A38); + init_clouds(gLuigiRacewayClouds); break; case COURSE_MOO_MOO_FARM: - func_80070328(D_800E6AA8); + init_clouds(gYoshiValleyMooMooFarmClouds); break; case COURSE_TOADS_TURNPIKE: - func_800704A0(D_800E6C80); + init_stars(gToadsTurnpikeRainbowRoadStars); break; case COURSE_KALAMARI_DESERT: - func_80070328(D_800E6C10); + init_clouds(gKalimariDesertClouds); break; case COURSE_SHERBET_LAND: - func_80070328(D_800E6BA8); + init_clouds(gSherbetLandClouds); break; case COURSE_RAINBOW_ROAD: - func_800704A0(D_800E6C80); + init_stars(gToadsTurnpikeRainbowRoadStars); break; case COURSE_WARIO_STADIUM: - func_800704A0(D_800E6DE0); + init_stars(gWarioStadiumStars); break; } func_8008C23C(); diff --git a/src/code_8006E9C0.h b/src/code_8006E9C0.h index f948e1145..175cf7792 100644 --- a/src/code_8006E9C0.h +++ b/src/code_8006E9C0.h @@ -19,10 +19,10 @@ void func_8006F8CC(void); void func_8006FA94(void); void func_80070148(void); void init_object_list_index(void); -void func_80070250(s32, s32, StarSpawn*); -void func_80070328(StarSpawn*); -void func_800703E0(s32, s32, StarSpawn*); -void func_800704A0(StarSpawn*); +void init_cloud_object(s32, s32, CloudData*); +void init_clouds(CloudData*); +void init_star_object(s32, s32, StarData*); +void init_stars(StarData*); void func_8007055C(void); void func_80070714(void); void init_course_object(void); @@ -35,14 +35,4 @@ extern s16 D_800E5520[]; extern s16 D_800E5548[]; extern u8 *gCourseOutlineTextures[0x14]; // 800e54d0 -// These are found in data_update_objects -extern StarSpawn D_800E6A38[]; /* unable to generate initializer */ -extern StarSpawn D_800E6AA8[]; /* unable to generate initializer */ -extern StarSpawn D_800E6B00[]; /* unable to generate initializer */ -extern StarSpawn D_800E6B38[]; /* unable to generate initializer */ -extern StarSpawn D_800E6BA8[]; /* unable to generate initializer */ -extern StarSpawn D_800E6C10[]; /* unable to generate initializer */ -extern StarSpawn D_800E6C80[]; /* unable to generate initializer */ -extern StarSpawn D_800E6DE0[]; /* unable to generate initializer */ - #endif diff --git a/src/data/some_data.c b/src/data/some_data.c index cf51e665d..b267c63e7 100644 --- a/src/data/some_data.c +++ b/src/data/some_data.c @@ -1071,187 +1071,187 @@ SplineData8 D_800E69F4 = { } }; -StarSpawn D_800E6A38[] = { - {{ 0x04fa, 0xfff6, 0x0096 }, 0x0000 }, - {{ 0x4718, 0x003c, 0x007d }, 0x0000 }, - {{ 0x5550, 0x0046, 0x0096 }, 0x0000 }, - {{ 0x954c, 0x002d, 0x004b }, 0x0000 }, - {{ 0xae2e, 0x0028, 0x004b }, 0x0000 }, - {{ 0x0e38, 0x001e, 0x0032 }, 0x0001 }, - {{ 0xa384, 0x0032, 0x0064 }, 0x0001 }, - {{ 0xd548, 0x001e, 0x0032 }, 0x0001 }, - {{ 0x31c4, 0x0032, 0x0064 }, 0x0002 }, - {{ 0x7ff8, 0x0037, 0x0064 }, 0x0002 }, - {{ 0xaaa0, 0x004b, 0x0096 }, 0x0002 }, - {{ 0xb8d8, 0xfff9, 0x0064 }, 0x0002 }, - {{ 0xee2a, 0x003c, 0x0050 }, 0x0002 }, - {{ 0xffff, 0x0000, 0x0000 }, 0x0000 }, +CloudData gLuigiRacewayClouds[] = { + { 0x04fa, 0xfff6, 0x0096, 0x0000 }, + { 0x4718, 0x003c, 0x007d, 0x0000 }, + { 0x5550, 0x0046, 0x0096, 0x0000 }, + { 0x954c, 0x002d, 0x004b, 0x0000 }, + { 0xae2e, 0x0028, 0x004b, 0x0000 }, + { 0x0e38, 0x001e, 0x0032, 0x0001 }, + { 0xa384, 0x0032, 0x0064, 0x0001 }, + { 0xd548, 0x001e, 0x0032, 0x0001 }, + { 0x31c4, 0x0032, 0x0064, 0x0002 }, + { 0x7ff8, 0x0037, 0x0064, 0x0002 }, + { 0xaaa0, 0x004b, 0x0096, 0x0002 }, + { 0xb8d8, 0xfff9, 0x0064, 0x0002 }, + { 0xee2a, 0x003c, 0x0050, 0x0002 }, + { 0xffff, 0x0000, 0x0000, 0x0000 }, }; -StarSpawn D_800E6AA8[] = { - {{ 0x00b6, 0x0050, 0x0041 }, 0x0000 }, - {{ 0x4718, 0x003c, 0x0064 }, 0x0000 }, - {{ 0x18e2, 0x0032, 0x004b }, 0x0000 }, - {{ 0x7ff8, 0x0037, 0x0064 }, 0x0000 }, - {{ 0x9ff6, 0x002d, 0x0032 }, 0x0000 }, - {{ 0xc710, 0x0046, 0x003c }, 0x0000 }, - {{ 0x0aaa, 0x001e, 0x0064 }, 0x0001 }, - {{ 0x5c6c, 0x0046, 0x0046 }, 0x0001 }, - {{ 0x31c4, 0x0028, 0x0050 }, 0x0002 }, - {{ 0xf1b8, 0x0028, 0x004b }, 0x0002 }, - {{ 0xffff, 0x0000, 0x0000 }, 0x0000 }, +CloudData gYoshiValleyMooMooFarmClouds[] = { + { 0x00b6, 0x0050, 0x0041, 0x0000 }, + { 0x4718, 0x003c, 0x0064, 0x0000 }, + { 0x18e2, 0x0032, 0x004b, 0x0000 }, + { 0x7ff8, 0x0037, 0x0064, 0x0000 }, + { 0x9ff6, 0x002d, 0x0032, 0x0000 }, + { 0xc710, 0x0046, 0x003c, 0x0000 }, + { 0x0aaa, 0x001e, 0x0064, 0x0001 }, + { 0x5c6c, 0x0046, 0x0046, 0x0001 }, + { 0x31c4, 0x0028, 0x0050, 0x0002 }, + { 0xf1b8, 0x0028, 0x004b, 0x0002 }, + { 0xffff, 0x0000, 0x0000, 0x0000 }, }; -StarSpawn D_800E6B00[] = { - {{ 0x1554, 0x001e, 0x00c8 }, 0x0000 }, - {{ 0xce2c, 0x001e, 0x00c8 }, 0x0000 }, - {{ 0xa384, 0x001e, 0x00c8 }, 0x0001 }, - {{ 0x070c, 0x001e, 0x00c8 }, 0x0001 }, - {{ 0x4718, 0x001e, 0x00c8 }, 0x0002 }, - {{ 0x8714, 0x001e, 0x00c8 }, 0x0003 }, - {{ 0xffff, 0x0000, 0x0000 }, 0x0000 }, +CloudData gKoopaTroopaBeachClouds[] = { + { 0x1554, 0x001e, 0x00c8, 0x0000 }, + { 0xce2c, 0x001e, 0x00c8, 0x0000 }, + { 0xa384, 0x001e, 0x00c8, 0x0001 }, + { 0x070c, 0x001e, 0x00c8, 0x0001 }, + { 0x4718, 0x001e, 0x00c8, 0x0002 }, + { 0x8714, 0x001e, 0x00c8, 0x0003 }, + { 0xffff, 0x0000, 0x0000, 0x0000 }, }; -StarSpawn D_800E6B38[] = { - {{ 0x60b0, 0x003c, 0x007d }, 0x0000 }, - {{ 0xb8d8, 0x0037, 0x0064 }, 0x0000 }, - {{ 0xd548, 0x000a, 0x0082 }, 0x0000 }, - {{ 0xf1b8, 0x0023, 0x0064 }, 0x0000 }, - {{ 0x04fa, 0x0046, 0x0096 }, 0x0001 }, - {{ 0x4718, 0x003c, 0x007d }, 0x0001 }, - {{ 0x954c, 0x002d, 0x004b }, 0x0001 }, - {{ 0x0e38, 0x001e, 0x0032 }, 0x0002 }, - {{ 0x8880, 0x0046, 0x0096 }, 0x0002 }, - {{ 0x31c4, 0x0032, 0x0064 }, 0x0003 }, - {{ 0x5056, 0x0028, 0x004b }, 0x0003 }, - {{ 0x7ff8, 0x0037, 0x0064 }, 0x0003 }, - {{ 0xaaa0, 0x004b, 0x0096 }, 0x0003 }, - {{ 0xffff, 0x0000, 0x0000 }, 0x0000 }, +CloudData gRoyalRacewayClouds[] = { + { 0x60b0, 0x003c, 0x007d, 0x0000 }, + { 0xb8d8, 0x0037, 0x0064, 0x0000 }, + { 0xd548, 0x000a, 0x0082, 0x0000 }, + { 0xf1b8, 0x0023, 0x0064, 0x0000 }, + { 0x04fa, 0x0046, 0x0096, 0x0001 }, + { 0x4718, 0x003c, 0x007d, 0x0001 }, + { 0x954c, 0x002d, 0x004b, 0x0001 }, + { 0x0e38, 0x001e, 0x0032, 0x0002 }, + { 0x8880, 0x0046, 0x0096, 0x0002 }, + { 0x31c4, 0x0032, 0x0064, 0x0003 }, + { 0x5056, 0x0028, 0x004b, 0x0003 }, + { 0x7ff8, 0x0037, 0x0064, 0x0003 }, + { 0xaaa0, 0x004b, 0x0096, 0x0003 }, + { 0xffff, 0x0000, 0x0000, 0x0000 }, }; -StarSpawn D_800E6BA8[] = { - {{ 0x4718, 0x003c, 0x007d }, 0x0000 }, - {{ 0x5550, 0x0046, 0x0096 }, 0x0000 }, - {{ 0x954c, 0x002d, 0x004b }, 0x0000 }, - {{ 0xf546, 0x0028, 0x004b }, 0x0000 }, - {{ 0x0e38, 0x001e, 0x0032 }, 0x0001 }, - {{ 0x0222, 0x0032, 0x0064 }, 0x0002 }, - {{ 0x1ffe, 0x0028, 0x004b }, 0x0002 }, - {{ 0x31c4, 0x0032, 0x0064 }, 0x0002 }, - {{ 0x7ff8, 0x0037, 0x0064 }, 0x0002 }, - {{ 0xaaa0, 0x004b, 0x0096 }, 0x0002 }, - {{ 0xb8d8, 0x0037, 0x0064 }, 0x0002 }, - {{ 0xdff2, 0x001e, 0x0032 }, 0x0002 }, - {{ 0xffff, 0x0000, 0x0000 }, 0x0000 }, +CloudData gSherbetLandClouds[] = { + { 0x4718, 0x003c, 0x007d, 0x0000 }, + { 0x5550, 0x0046, 0x0096, 0x0000 }, + { 0x954c, 0x002d, 0x004b, 0x0000 }, + { 0xf546, 0x0028, 0x004b, 0x0000 }, + { 0x0e38, 0x001e, 0x0032, 0x0001 }, + { 0x0222, 0x0032, 0x0064, 0x0002 }, + { 0x1ffe, 0x0028, 0x004b, 0x0002 }, + { 0x31c4, 0x0032, 0x0064, 0x0002 }, + { 0x7ff8, 0x0037, 0x0064, 0x0002 }, + { 0xaaa0, 0x004b, 0x0096, 0x0002 }, + { 0xb8d8, 0x0037, 0x0064, 0x0002 }, + { 0xdff2, 0x001e, 0x0032, 0x0002 }, + { 0xffff, 0x0000, 0x0000, 0x0000 }, }; -StarSpawn D_800E6C10[] = { - {{ 0x1ffe, 0x0028, 0x004b }, 0x0000 }, - {{ 0x60b0, 0x003c, 0x007d }, 0x0000 }, - {{ 0xb8d8, 0x0037, 0x0064 }, 0x0000 }, - {{ 0x4718, 0x003c, 0x007d }, 0x0001 }, - {{ 0x954c, 0x002d, 0x004b }, 0x0001 }, - {{ 0xf546, 0x0028, 0x004b }, 0x0001 }, - {{ 0x0e38, 0x001e, 0x0032 }, 0x0002 }, - {{ 0xa384, 0x0032, 0x0064 }, 0x0002 }, - {{ 0xddd0, 0x0046, 0x0096 }, 0x0002 }, - {{ 0x0222, 0x0032, 0x0064 }, 0x0003 }, - {{ 0x31c4, 0x0032, 0x0064 }, 0x0003 }, - {{ 0x7ff8, 0x0037, 0x0064 }, 0x0003 }, - {{ 0xaaa0, 0x004b, 0x0096 }, 0x0003 }, - {{ 0xffff, 0x0000, 0x0000 }, 0x0000 }, +CloudData gKalimariDesertClouds[] = { + { 0x1ffe, 0x0028, 0x004b, 0x0000 }, + { 0x60b0, 0x003c, 0x007d, 0x0000 }, + { 0xb8d8, 0x0037, 0x0064, 0x0000 }, + { 0x4718, 0x003c, 0x007d, 0x0001 }, + { 0x954c, 0x002d, 0x004b, 0x0001 }, + { 0xf546, 0x0028, 0x004b, 0x0001 }, + { 0x0e38, 0x001e, 0x0032, 0x0002 }, + { 0xa384, 0x0032, 0x0064, 0x0002 }, + { 0xddd0, 0x0046, 0x0096, 0x0002 }, + { 0x0222, 0x0032, 0x0064, 0x0003 }, + { 0x31c4, 0x0032, 0x0064, 0x0003 }, + { 0x7ff8, 0x0037, 0x0064, 0x0003 }, + { 0xaaa0, 0x004b, 0x0096, 0x0003 }, + { 0xffff, 0x0000, 0x0000, 0x0000 }, }; -StarSpawn D_800E6C80[] = { - {{ 0x0222, 0x0032, 0x000a }, 0x0000 }, - {{ 0x04fa, 0x0046, 0x000f }, 0x0000 }, - {{ 0x093e, 0x000a, 0x0014 }, 0x0000 }, - {{ 0x0e38, 0x001e, 0x000f }, 0x0000 }, - {{ 0x11c6, 0x0028, 0x0014 }, 0x0000 }, - {{ 0x1554, 0xfff6, 0x000f }, 0x0000 }, - {{ 0x1ddc, 0x000a, 0x0011 }, 0x0000 }, - {{ 0x1ffe, 0x0030, 0x0019 }, 0x0000 }, - {{ 0x271a, 0x0046, 0x0014 }, 0x0000 }, - {{ 0x27d0, 0xfff1, 0x0016 }, 0x0000 }, - {{ 0x2c14, 0x0014, 0x000f }, 0x0000 }, - {{ 0x31c4, 0x0032, 0x0016 }, 0x0000 }, - {{ 0x327a, 0x0000, 0x000a }, 0x0000 }, - {{ 0x3a4c, 0x000f, 0x0016 }, 0x0000 }, - {{ 0x3ffc, 0x002d, 0x0011 }, 0x0000 }, - {{ 0x40b2, 0xffdd, 0x0016 }, 0x0000 }, - {{ 0x4440, 0x0037, 0x0014 }, 0x0000 }, - {{ 0x4718, 0x003c, 0x000c }, 0x0000 }, - {{ 0x4718, 0x0050, 0x000c }, 0x0000 }, - {{ 0x4aa6, 0xfff6, 0x000f }, 0x0000 }, - {{ 0x5056, 0x0028, 0x000a }, 0x0000 }, - {{ 0x5550, 0x0046, 0x000f }, 0x0000 }, - {{ 0x60b0, 0x003c, 0x0016 }, 0x0000 }, - {{ 0x6388, 0xffdd, 0x0019 }, 0x0000 }, - {{ 0x64f4, 0x0023, 0x0011 }, 0x0000 }, - {{ 0x6aa4, 0x004b, 0x0014 }, 0x0000 }, - {{ 0x7054, 0x002d, 0x0019 }, 0x0000 }, - {{ 0x7498, 0x0014, 0x0012 }, 0x0000 }, - {{ 0x7bb4, 0xfff1, 0x001b }, 0x0000 }, - {{ 0x7ff8, 0x0037, 0x000a }, 0x0000 }, - {{ 0x8386, 0x0041, 0x0014 }, 0x0000 }, - {{ 0x8880, 0x0046, 0x000f }, 0x0000 }, - {{ 0x954c, 0x002d, 0x0011 }, 0x0000 }, - {{ 0x98da, 0x003c, 0x000f }, 0x0000 }, - {{ 0x9dd4, 0x0000, 0x000a }, 0x0000 }, - {{ 0xa384, 0x0046, 0x000f }, 0x0000 }, - {{ 0xa43a, 0x0032, 0x0017 }, 0x0000 }, - {{ 0xaaa0, 0x004b, 0x000f }, 0x0000 }, - {{ 0xae2e, 0x0028, 0x0011 }, 0x0000 }, - {{ 0xb1bc, 0x0023, 0x0014 }, 0x0000 }, - {{ 0xb8d8, 0xfff1, 0x000a }, 0x0000 }, - {{ 0xbc66, 0xffe2, 0x000f }, 0x0000 }, - {{ 0xc710, 0x001e, 0x000c }, 0x0000 }, - {{ 0xffff, 0x0000, 0x0000 }, 0x0000 }, +StarData gToadsTurnpikeRainbowRoadStars[] = { + { 0x0222, 0x0032, 0x000a, 0x0000 }, + { 0x04fa, 0x0046, 0x000f, 0x0000 }, + { 0x093e, 0x000a, 0x0014, 0x0000 }, + { 0x0e38, 0x001e, 0x000f, 0x0000 }, + { 0x11c6, 0x0028, 0x0014, 0x0000 }, + { 0x1554, 0xfff6, 0x000f, 0x0000 }, + { 0x1ddc, 0x000a, 0x0011, 0x0000 }, + { 0x1ffe, 0x0030, 0x0019, 0x0000 }, + { 0x271a, 0x0046, 0x0014, 0x0000 }, + { 0x27d0, 0xfff1, 0x0016, 0x0000 }, + { 0x2c14, 0x0014, 0x000f, 0x0000 }, + { 0x31c4, 0x0032, 0x0016, 0x0000 }, + { 0x327a, 0x0000, 0x000a, 0x0000 }, + { 0x3a4c, 0x000f, 0x0016, 0x0000 }, + { 0x3ffc, 0x002d, 0x0011, 0x0000 }, + { 0x40b2, 0xffdd, 0x0016, 0x0000 }, + { 0x4440, 0x0037, 0x0014, 0x0000 }, + { 0x4718, 0x003c, 0x000c, 0x0000 }, + { 0x4718, 0x0050, 0x000c, 0x0000 }, + { 0x4aa6, 0xfff6, 0x000f, 0x0000 }, + { 0x5056, 0x0028, 0x000a, 0x0000 }, + { 0x5550, 0x0046, 0x000f, 0x0000 }, + { 0x60b0, 0x003c, 0x0016, 0x0000 }, + { 0x6388, 0xffdd, 0x0019, 0x0000 }, + { 0x64f4, 0x0023, 0x0011, 0x0000 }, + { 0x6aa4, 0x004b, 0x0014, 0x0000 }, + { 0x7054, 0x002d, 0x0019, 0x0000 }, + { 0x7498, 0x0014, 0x0012, 0x0000 }, + { 0x7bb4, 0xfff1, 0x001b, 0x0000 }, + { 0x7ff8, 0x0037, 0x000a, 0x0000 }, + { 0x8386, 0x0041, 0x0014, 0x0000 }, + { 0x8880, 0x0046, 0x000f, 0x0000 }, + { 0x954c, 0x002d, 0x0011, 0x0000 }, + { 0x98da, 0x003c, 0x000f, 0x0000 }, + { 0x9dd4, 0x0000, 0x000a, 0x0000 }, + { 0xa384, 0x0046, 0x000f, 0x0000 }, + { 0xa43a, 0x0032, 0x0017, 0x0000 }, + { 0xaaa0, 0x004b, 0x000f, 0x0000 }, + { 0xae2e, 0x0028, 0x0011, 0x0000 }, + { 0xb1bc, 0x0023, 0x0014, 0x0000 }, + { 0xb8d8, 0xfff1, 0x000a, 0x0000 }, + { 0xbc66, 0xffe2, 0x000f, 0x0000 }, + { 0xc710, 0x001e, 0x000c, 0x0000 }, + { 0xffff, 0x0000, 0x0000, 0x0000 }, }; -StarSpawn D_800E6DE0[] = { - {{ 0x0222, 0x0050, 0x000a }, 0x0000 }, - {{ 0x04fa, 0x0064, 0x000f }, 0x0000 }, - {{ 0x093e, 0x005a, 0x0014 }, 0x0000 }, - {{ 0x0e38, 0x003c, 0x000f }, 0x0000 }, - {{ 0x11c6, 0x0046, 0x0014 }, 0x0000 }, - {{ 0x1554, 0x0078, 0x000f }, 0x0000 }, - {{ 0x1c70, 0x001e, 0x0011 }, 0x0000 }, - {{ 0x1ffe, 0x0046, 0x0011 }, 0x0000 }, - {{ 0x271a, 0x0064, 0x0014 }, 0x0000 }, - {{ 0x2c14, 0x0032, 0x000f }, 0x0000 }, - {{ 0x31c4, 0x0050, 0x000a }, 0x0000 }, - {{ 0x3996, 0x0019, 0x000c }, 0x0000 }, - {{ 0x3a4c, 0x0037, 0x0016 }, 0x0000 }, - {{ 0x3bb8, 0x0019, 0x000c }, 0x0000 }, - {{ 0x3ffc, 0x004b, 0x0011 }, 0x0000 }, - {{ 0x4440, 0x0055, 0x0014 }, 0x0000 }, - {{ 0x4718, 0x005a, 0x000c }, 0x0000 }, - {{ 0x4aa6, 0x003c, 0x000f }, 0x0000 }, - {{ 0x5056, 0x0046, 0x000a }, 0x0000 }, - {{ 0x5550, 0x0064, 0x000f }, 0x0000 }, - {{ 0x60b0, 0x005a, 0x0016 }, 0x0000 }, - {{ 0x64f4, 0x0041, 0x0014 }, 0x0000 }, - {{ 0x6aa4, 0x0069, 0x0014 }, 0x0000 }, - {{ 0x7054, 0x004b, 0x0014 }, 0x0000 }, - {{ 0x71c0, 0x0078, 0x0012 }, 0x0000 }, - {{ 0x7498, 0x003c, 0x0012 }, 0x0000 }, - {{ 0x7ff8, 0x0055, 0x000a }, 0x0000 }, - {{ 0x8714, 0x0073, 0x000a }, 0x0000 }, - {{ 0x8880, 0x0064, 0x000f }, 0x0000 }, - {{ 0x954c, 0x004b, 0x0011 }, 0x0000 }, - {{ 0x98da, 0x003c, 0x000f }, 0x0000 }, - {{ 0x9dd4, 0x0032, 0x000a }, 0x0000 }, - {{ 0xa384, 0x0050, 0x000a }, 0x0000 }, - {{ 0xa43a, 0x006e, 0x000a }, 0x0000 }, - {{ 0xaaa0, 0x0069, 0x000f }, 0x0000 }, - {{ 0xae2e, 0x0046, 0x0011 }, 0x0000 }, - {{ 0xb1bc, 0x0041, 0x0014 }, 0x0000 }, - {{ 0xb8d8, 0x0055, 0x000a }, 0x0000 }, - {{ 0xbc66, 0x003c, 0x000f }, 0x0000 }, - {{ 0xc710, 0x0064, 0x000a }, 0x0000 }, - {{ 0xffff, 0x0000, 0x0000 }, 0x0000 }, - {{ 0x0000, 0x0000, 0x0000 }, 0x0000 }, +StarData gWarioStadiumStars[] = { + { 0x0222, 0x0050, 0x000a, 0x0000 }, + { 0x04fa, 0x0064, 0x000f, 0x0000 }, + { 0x093e, 0x005a, 0x0014, 0x0000 }, + { 0x0e38, 0x003c, 0x000f, 0x0000 }, + { 0x11c6, 0x0046, 0x0014, 0x0000 }, + { 0x1554, 0x0078, 0x000f, 0x0000 }, + { 0x1c70, 0x001e, 0x0011, 0x0000 }, + { 0x1ffe, 0x0046, 0x0011, 0x0000 }, + { 0x271a, 0x0064, 0x0014, 0x0000 }, + { 0x2c14, 0x0032, 0x000f, 0x0000 }, + { 0x31c4, 0x0050, 0x000a, 0x0000 }, + { 0x3996, 0x0019, 0x000c, 0x0000 }, + { 0x3a4c, 0x0037, 0x0016, 0x0000 }, + { 0x3bb8, 0x0019, 0x000c, 0x0000 }, + { 0x3ffc, 0x004b, 0x0011, 0x0000 }, + { 0x4440, 0x0055, 0x0014, 0x0000 }, + { 0x4718, 0x005a, 0x000c, 0x0000 }, + { 0x4aa6, 0x003c, 0x000f, 0x0000 }, + { 0x5056, 0x0046, 0x000a, 0x0000 }, + { 0x5550, 0x0064, 0x000f, 0x0000 }, + { 0x60b0, 0x005a, 0x0016, 0x0000 }, + { 0x64f4, 0x0041, 0x0014, 0x0000 }, + { 0x6aa4, 0x0069, 0x0014, 0x0000 }, + { 0x7054, 0x004b, 0x0014, 0x0000 }, + { 0x71c0, 0x0078, 0x0012, 0x0000 }, + { 0x7498, 0x003c, 0x0012, 0x0000 }, + { 0x7ff8, 0x0055, 0x000a, 0x0000 }, + { 0x8714, 0x0073, 0x000a, 0x0000 }, + { 0x8880, 0x0064, 0x000f, 0x0000 }, + { 0x954c, 0x004b, 0x0011, 0x0000 }, + { 0x98da, 0x003c, 0x000f, 0x0000 }, + { 0x9dd4, 0x0032, 0x000a, 0x0000 }, + { 0xa384, 0x0050, 0x000a, 0x0000 }, + { 0xa43a, 0x006e, 0x000a, 0x0000 }, + { 0xaaa0, 0x0069, 0x000f, 0x0000 }, + { 0xae2e, 0x0046, 0x0011, 0x0000 }, + { 0xb1bc, 0x0041, 0x0014, 0x0000 }, + { 0xb8d8, 0x0055, 0x000a, 0x0000 }, + { 0xbc66, 0x003c, 0x000f, 0x0000 }, + { 0xc710, 0x0064, 0x000a, 0x0000 }, + { 0xffff, 0x0000, 0x0000, 0x0000 }, + { 0x0000, 0x0000, 0x0000, 0x0000 }, }; u8 D_800E6F30[][3] = { diff --git a/src/data/some_data.h b/src/data/some_data.h index da56ef091..881393de5 100644 --- a/src/data/some_data.h +++ b/src/data/some_data.h @@ -76,14 +76,14 @@ extern SplineDataUnused13 D_800E68E0; extern SplineData12 D_800E694C; extern SplineData8 D_800E69B0; extern SplineData8 D_800E69F4; -extern StarSpawn D_800E6A38[]; -extern StarSpawn D_800E6AA8[]; -extern StarSpawn D_800E6B00[]; -extern StarSpawn D_800E6B38[]; -extern StarSpawn D_800E6BA8[]; -extern StarSpawn D_800E6C10[]; -extern StarSpawn D_800E6C80[]; -extern StarSpawn D_800E6DE0[]; +extern CloudData gLuigiRacewayClouds[]; +extern CloudData gYoshiValleyMooMooFarmClouds[]; +extern CloudData gKoopaTroopaBeachClouds[]; +extern CloudData gRoyalRacewayClouds[]; +extern CloudData gSherbetLandClouds[]; +extern CloudData gKalimariDesertClouds[]; +extern StarData gToadsTurnpikeRainbowRoadStars[]; +extern StarData gWarioStadiumStars[]; extern u8 D_800E6F30[][3]; extern u8 D_800E6F48[][3]; diff --git a/src/update_objects.c b/src/update_objects.c index 8f0dea1b4..37037b091 100644 --- a/src/update_objects.c +++ b/src/update_objects.c @@ -2741,52 +2741,28 @@ void func_800788F8(s32 objectIndex, u16 rot, Camera *camera) { set_object_flag_status_false(objectIndex, 0x00000010); } -#ifdef MIPS_TO_C -//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Nov-13-2023 -void func_800789AC(s32 arg0, Camera *arg1, s16 (*arg2)[4]) { - s32 *var_s1; - s32 var_s0; +void update_clouds(s32 arg0, Camera *arg1, CloudData *cloudList) { + s32 cloudIndex; + s32 objectIndex; + CloudData *cloud; - var_s0 = 0; - if (D_8018D1F0 > 0) { - var_s1 = &D_8018CC80[arg0]; - do { - func_800788F8(*var_s1, (u16) *arg2[var_s0], arg1); - var_s0 += 1; - var_s1 += 4; - } while (var_s0 < D_8018D1F0); + for (cloudIndex = 0; cloudIndex < D_8018D1F0; cloudIndex++) { + cloud = &cloudList[cloudIndex]; + objectIndex = D_8018CC80[arg0 + cloudIndex]; + func_800788F8(objectIndex, cloud->rotY, arg1); } - /* - s32 var_s0; - - for (var_s0 = 0; var_s0 < D_8018D1F0; var_s0++) { - func_800788F8(D_8018CC80[arg0 + var_s0], arg2[0][var_s0], arg1); - } - */ } -#else -GLOBAL_ASM("asm/non_matchings/update_objects/func_800789AC.s") -#endif -typedef struct { - Vec3su unk0; - u16 pad; - Vec3su unkA; - u16 pad2; -} test; +void update_stars(s32 arg0, Camera *camera, StarData *starList) { + s32 starIndex; + s32 objectIndex; + StarData *star; -typedef u16 testA[44][4]; - -void func_80078A44(s32 arg0, Camera *camera, u16 rot[][4]) { - s32 objectIndex; - s32 i; - - for (i = 0; i < D_8018D1F0; i++, arg0++) { - objectIndex = D_8018CC80[arg0]; - - // rot[i][0] - func_800788F8(objectIndex, *(u16 *)(rot + i), camera); - switch (i % 5U) { + for (starIndex = 0; starIndex < D_8018D1F0; starIndex++) { + star = &starList[starIndex]; + objectIndex = D_8018CC80[arg0 + starIndex]; + func_800788F8(objectIndex, star->rotY, camera); + switch (starIndex % 5U) { case 0: func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, 0x00000028, 0x000000B4, 0x000000FF, 0, -1); break; @@ -2849,40 +2825,41 @@ void func_80078C70(s32 arg0) { D_8018D218 = 0xA0; switch (gCurrentCourseId) { /* switch 2 */ case COURSE_MARIO_RACEWAY: /* switch 2 */ - func_800789AC(sp1C, camera, D_800E6A38); + // Uses Luigi Raceway's clouds for display purposes? + update_clouds(sp1C, camera, gLuigiRacewayClouds); break; case COURSE_YOSHI_VALLEY: /* switch 2 */ - func_800789AC(sp1C, camera, D_800E6AA8); + update_clouds(sp1C, camera, gYoshiValleyMooMooFarmClouds); break; case COURSE_FRAPPE_SNOWLAND: /* switch 2 */ func_80078170(sp1C, camera); break; case COURSE_KOOPA_BEACH: /* switch 2 */ - func_800789AC(sp1C, camera, D_800E6B00); + update_clouds(sp1C, camera, gKoopaTroopaBeachClouds); break; case COURSE_ROYAL_RACEWAY: /* switch 2 */ - func_800789AC(sp1C, camera, D_800E6B38); + update_clouds(sp1C, camera, gRoyalRacewayClouds); break; case COURSE_LUIGI_RACEWAY: /* switch 2 */ - func_800789AC(sp1C, camera, D_800E6A38); + update_clouds(sp1C, camera, gLuigiRacewayClouds); break; case COURSE_MOO_MOO_FARM: /* switch 2 */ - func_800789AC(sp1C, camera, D_800E6AA8); + update_clouds(sp1C, camera, gYoshiValleyMooMooFarmClouds); break; case COURSE_TOADS_TURNPIKE: /* switch 2 */ - func_80078A44(sp1C, camera, D_800E6C80); + update_stars(sp1C, camera, gToadsTurnpikeRainbowRoadStars); break; case COURSE_KALAMARI_DESERT: /* switch 2 */ - func_800789AC(sp1C, camera, D_800E6C10); + update_clouds(sp1C, camera, gKalimariDesertClouds); break; case COURSE_SHERBET_LAND: /* switch 2 */ - func_800789AC(sp1C, camera, D_800E6BA8); + update_clouds(sp1C, camera, gSherbetLandClouds); break; case COURSE_RAINBOW_ROAD: /* switch 2 */ - func_80078A44(sp1C, camera, D_800E6C80); + update_stars(sp1C, camera, gToadsTurnpikeRainbowRoadStars); break; case COURSE_WARIO_STADIUM: /* switch 2 */ - func_80078A44(sp1C, camera, D_800E6DE0); + update_stars(sp1C, camera, gWarioStadiumStars); break; } } diff --git a/src/update_objects.h b/src/update_objects.h index 4350d5125..890029484 100644 --- a/src/update_objects.h +++ b/src/update_objects.h @@ -176,7 +176,8 @@ void func_800786EC(s32); void func_80078790(void); void update_snowflakes(void); void func_800788F8(s32, u16, Camera*); -void func_800789AC(s32, Camera*, Vec4s*); +void update_clouds(s32, Camera*, CloudData*); +void update_stars(s32, Camera*, StarData*); void func_80078C68(void); void func_80078C70(s32); void func_80078F64(void); diff --git a/tools/doxygen_syms.md b/tools/doxygen_syms.md index ed8220111..7cf2f868f 100644 --- a/tools/doxygen_syms.md +++ b/tools/doxygen_syms.md @@ -1179,10 +1179,10 @@ Variable Name | Memory Address [func_8006FA94](@ref func_8006FA94) | 0x8006FA94 [func_80070148](@ref func_80070148) | 0x80070148 [init_object_list_index](@ref init_object_list_index) | 0x80070190 -[func_80070250](@ref func_80070250) | 0x80070250 -[func_80070328](@ref func_80070328) | 0x80070328 -[func_800703E0](@ref func_800703E0) | 0x800703E0 -[func_800704A0](@ref func_800704A0) | 0x800704A0 +[init_cloud_object](@ref init_cloud_object) | 0x80070250 +[init_clouds](@ref init_clouds) | 0x80070328 +[init_star_object](@ref init_star_object) | 0x800703E0 +[init_stars](@ref init_stars) | 0x800704A0 [func_8007055C](@ref func_8007055C) | 0x8007055C [func_80070714](@ref func_80070714) | 0x80070714 [init_course_object](@ref init_course_object) | 0x80070780 @@ -1366,8 +1366,8 @@ Variable Name | Memory Address [func_80078790](@ref func_80078790) | 0x80078790 [update_snowflakes](@ref update_snowflakes) | 0x80078838 [func_800788F8](@ref func_800788F8) | 0x800788F8 -[func_800789AC](@ref func_800789AC) | 0x800789AC -[func_80078A44](@ref func_80078A44) | 0x80078A44 +[update_clouds](@ref update_clouds) | 0x800789AC +[update_stars](@ref update_stars) | 0x80078A44 [func_80078C68](@ref func_80078C68) | 0x80078C68 [func_80078C70](@ref func_80078C70) | 0x80078C70 [func_80078F64](@ref func_80078F64) | 0x80078F64 @@ -2580,10 +2580,10 @@ Variable Name | Memory Address [rspF3DBootStart](@ref rspF3DBootStart) | 0x800D8F70 [rspF3DBootEnd](@ref rspF3DBootEnd) | 0x800D9040 [gspF3DEXTextStart](@ref gspF3DEXTextStart) | 0x800D9040 -[gspF3DLXTextStart](@ref gspF3DLXTextStart) | 0x800DA420 [gspF3DEXTextEnd](@ref gspF3DEXTextEnd) | 0x800DA420 -[rspAspMainStart](@ref rspAspMainStart) | 0x800DB830 +[gspF3DLXTextStart](@ref gspF3DLXTextStart) | 0x800DA420 [gspF3DLXTextEnd](@ref gspF3DLXTextEnd) | 0x800DB830 +[rspAspMainStart](@ref rspAspMainStart) | 0x800DB830 [rspAspMainEnd](@ref rspAspMainEnd) | 0x800DC4A0 [gVblankHandler1](@ref gVblankHandler1) | 0x800DC4A0 [gVblankHandler2](@ref gVblankHandler2) | 0x800DC4A4 @@ -3187,14 +3187,14 @@ Variable Name | Memory Address [D_800E694C](@ref D_800E694C) | 0x800E694C [D_800E69B0](@ref D_800E69B0) | 0x800E69B0 [D_800E69F4](@ref D_800E69F4) | 0x800E69F4 -[D_800E6A38](@ref D_800E6A38) | 0x800E6A38 -[D_800E6AA8](@ref D_800E6AA8) | 0x800E6AA8 -[D_800E6B00](@ref D_800E6B00) | 0x800E6B00 -[D_800E6B38](@ref D_800E6B38) | 0x800E6B38 -[D_800E6BA8](@ref D_800E6BA8) | 0x800E6BA8 -[D_800E6C10](@ref D_800E6C10) | 0x800E6C10 -[D_800E6C80](@ref D_800E6C80) | 0x800E6C80 -[D_800E6DE0](@ref D_800E6DE0) | 0x800E6DE0 +[gLuigiRacewayClouds](@ref gLuigiRacewayClouds) | 0x800E6A38 +[gYoshiValleyMooMooFarmClouds](@ref gYoshiValleyMooMooFarmClouds) | 0x800E6AA8 +[gKoopaTroopaBeachClouds](@ref gKoopaTroopaBeachClouds) | 0x800E6B00 +[gRoyalRacewayClouds](@ref gRoyalRacewayClouds) | 0x800E6B38 +[gSherbetLandClouds](@ref gSherbetLandClouds) | 0x800E6BA8 +[gKalimariDesertClouds](@ref gKalimariDesertClouds) | 0x800E6C10 +[gToadsTurnpikeRainbowRoadStars](@ref gToadsTurnpikeRainbowRoadStars) | 0x800E6C80 +[gWarioStadiumStars](@ref gWarioStadiumStars) | 0x800E6DE0 [D_800E6F30](@ref D_800E6F30) | 0x800E6F30 [D_800E6F48](@ref D_800E6F48) | 0x800E6F48 [D_800E70A0](@ref D_800E70A0) | 0x800E70A0 @@ -3703,8 +3703,8 @@ Variable Name | Memory Address [gspF3DEXDataStart](@ref gspF3DEXDataStart) | 0x800F3D00 [gspF3DEXDataEnd](@ref gspF3DEXDataEnd) | 0x800F4500 [gspF3DLXDataStart](@ref gspF3DLXDataStart) | 0x800F4500 -[gspF3DLXDataEnd](@ref gspF3DLXDataEnd) | 0x800F4D00 [rspAspMainDataStart](@ref rspAspMainDataStart) | 0x800F4D00 +[gspF3DLXDataEnd](@ref gspF3DLXDataEnd) | 0x800F4D00 [rspAspMainDataEnd](@ref rspAspMainDataEnd) | 0x800F5000 [sSawtoothWaves](@ref sSawtoothWaves) | 0x800F5000 [sTriangleWaves](@ref sTriangleWaves) | 0x800F5200 @@ -18690,66 +18690,66 @@ Variable Name | Memory Address [gCosineTable](@ref gCosineTable) | 0x802BB370 [gArctanTable](@ref gArctanTable) | 0x802BF370 [gTextureMarioFace00](@ref gTextureMarioFace00) | 0x0A000000 -[gTextureMarioFace01](@ref gTextureMarioFace01) | 0x0A000CD4 [gTextureMarioFace00_end](@ref gTextureMarioFace00_end) | 0x0A000CD4 -[gTextureMarioFace02](@ref gTextureMarioFace02) | 0x0A001994 +[gTextureMarioFace01](@ref gTextureMarioFace01) | 0x0A000CD4 [gTextureMarioFace01_end](@ref gTextureMarioFace01_end) | 0x0A001994 -[gTextureMarioFace03](@ref gTextureMarioFace03) | 0x0A002650 +[gTextureMarioFace02](@ref gTextureMarioFace02) | 0x0A001994 [gTextureMarioFace02_end](@ref gTextureMarioFace02_end) | 0x0A002650 -[gTextureMarioFace03_end](@ref gTextureMarioFace03_end) | 0x0A0032BC +[gTextureMarioFace03](@ref gTextureMarioFace03) | 0x0A002650 [gTextureMarioFace04](@ref gTextureMarioFace04) | 0x0A0032BC -[gTextureMarioFace05](@ref gTextureMarioFace05) | 0x0A003F08 +[gTextureMarioFace03_end](@ref gTextureMarioFace03_end) | 0x0A0032BC [gTextureMarioFace04_end](@ref gTextureMarioFace04_end) | 0x0A003F08 -[gTextureMarioFace06](@ref gTextureMarioFace06) | 0x0A004B48 +[gTextureMarioFace05](@ref gTextureMarioFace05) | 0x0A003F08 [gTextureMarioFace05_end](@ref gTextureMarioFace05_end) | 0x0A004B48 +[gTextureMarioFace06](@ref gTextureMarioFace06) | 0x0A004B48 [gTextureMarioFace07](@ref gTextureMarioFace07) | 0x0A00585C [gTextureMarioFace06_end](@ref gTextureMarioFace06_end) | 0x0A00585C [gTextureMarioFace08](@ref gTextureMarioFace08) | 0x0A006568 [gTextureMarioFace07_end](@ref gTextureMarioFace07_end) | 0x0A006568 -[gTextureMarioFace08_end](@ref gTextureMarioFace08_end) | 0x0A00726C [gTextureMarioFace09](@ref gTextureMarioFace09) | 0x0A00726C -[gTextureMarioFace09_end](@ref gTextureMarioFace09_end) | 0x0A007F4C +[gTextureMarioFace08_end](@ref gTextureMarioFace08_end) | 0x0A00726C [gTextureMarioFace10](@ref gTextureMarioFace10) | 0x0A007F4C +[gTextureMarioFace09_end](@ref gTextureMarioFace09_end) | 0x0A007F4C [gTextureMarioFace11](@ref gTextureMarioFace11) | 0x0A008C48 [gTextureMarioFace10_end](@ref gTextureMarioFace10_end) | 0x0A008C48 -[gTextureMarioFace11_end](@ref gTextureMarioFace11_end) | 0x0A009944 [gTextureMarioFace12](@ref gTextureMarioFace12) | 0x0A009944 +[gTextureMarioFace11_end](@ref gTextureMarioFace11_end) | 0x0A009944 [gTextureMarioFace13](@ref gTextureMarioFace13) | 0x0A00A688 [gTextureMarioFace12_end](@ref gTextureMarioFace12_end) | 0x0A00A688 -[gTextureMarioFace14](@ref gTextureMarioFace14) | 0x0A00B3DC [gTextureMarioFace13_end](@ref gTextureMarioFace13_end) | 0x0A00B3DC -[gTextureMarioFace15](@ref gTextureMarioFace15) | 0x0A00C180 +[gTextureMarioFace14](@ref gTextureMarioFace14) | 0x0A00B3DC [gTextureMarioFace14_end](@ref gTextureMarioFace14_end) | 0x0A00C180 -[gTextureMarioFace16](@ref gTextureMarioFace16) | 0x0A00CF20 +[gTextureMarioFace15](@ref gTextureMarioFace15) | 0x0A00C180 [gTextureMarioFace15_end](@ref gTextureMarioFace15_end) | 0x0A00CF20 +[gTextureMarioFace16](@ref gTextureMarioFace16) | 0x0A00CF20 [gTextureLuigiFace00](@ref gTextureLuigiFace00) | 0x0A00DA64 [gTextureMarioFace16_end](@ref gTextureMarioFace16_end) | 0x0A00DA64 -[gTextureLuigiFace00_end](@ref gTextureLuigiFace00_end) | 0x0A00E680 [gTextureLuigiFace01](@ref gTextureLuigiFace01) | 0x0A00E680 +[gTextureLuigiFace00_end](@ref gTextureLuigiFace00_end) | 0x0A00E680 [gTextureLuigiFace01_end](@ref gTextureLuigiFace01_end) | 0x0A00F2A0 [gTextureLuigiFace02](@ref gTextureLuigiFace02) | 0x0A00F2A0 -[gTextureLuigiFace03](@ref gTextureLuigiFace03) | 0x0A00FEC0 [gTextureLuigiFace02_end](@ref gTextureLuigiFace02_end) | 0x0A00FEC0 +[gTextureLuigiFace03](@ref gTextureLuigiFace03) | 0x0A00FEC0 [gTextureLuigiFace03_end](@ref gTextureLuigiFace03_end) | 0x0A010AA8 [gTextureLuigiFace04](@ref gTextureLuigiFace04) | 0x0A010AA8 -[gTextureLuigiFace05](@ref gTextureLuigiFace05) | 0x0A011690 [gTextureLuigiFace04_end](@ref gTextureLuigiFace04_end) | 0x0A011690 +[gTextureLuigiFace05](@ref gTextureLuigiFace05) | 0x0A011690 [gTextureLuigiFace06](@ref gTextureLuigiFace06) | 0x0A01225C [gTextureLuigiFace05_end](@ref gTextureLuigiFace05_end) | 0x0A01225C [gTextureLuigiFace06_end](@ref gTextureLuigiFace06_end) | 0x0A012E84 [gTextureLuigiFace07](@ref gTextureLuigiFace07) | 0x0A012E84 -[gTextureLuigiFace07_end](@ref gTextureLuigiFace07_end) | 0x0A013AB8 [gTextureLuigiFace08](@ref gTextureLuigiFace08) | 0x0A013AB8 -[gTextureLuigiFace08_end](@ref gTextureLuigiFace08_end) | 0x0A014744 +[gTextureLuigiFace07_end](@ref gTextureLuigiFace07_end) | 0x0A013AB8 [gTextureLuigiFace09](@ref gTextureLuigiFace09) | 0x0A014744 -[gTextureLuigiFace09_end](@ref gTextureLuigiFace09_end) | 0x0A0153C4 +[gTextureLuigiFace08_end](@ref gTextureLuigiFace08_end) | 0x0A014744 [gTextureLuigiFace10](@ref gTextureLuigiFace10) | 0x0A0153C4 -[gTextureLuigiFace11](@ref gTextureLuigiFace11) | 0x0A016054 +[gTextureLuigiFace09_end](@ref gTextureLuigiFace09_end) | 0x0A0153C4 [gTextureLuigiFace10_end](@ref gTextureLuigiFace10_end) | 0x0A016054 +[gTextureLuigiFace11](@ref gTextureLuigiFace11) | 0x0A016054 [gTextureLuigiFace11_end](@ref gTextureLuigiFace11_end) | 0x0A016D14 [gTextureLuigiFace12](@ref gTextureLuigiFace12) | 0x0A016D14 -[gTextureLuigiFace13](@ref gTextureLuigiFace13) | 0x0A017A44 [gTextureLuigiFace12_end](@ref gTextureLuigiFace12_end) | 0x0A017A44 +[gTextureLuigiFace13](@ref gTextureLuigiFace13) | 0x0A017A44 [gTextureLuigiFace14](@ref gTextureLuigiFace14) | 0x0A018770 [gTextureLuigiFace13_end](@ref gTextureLuigiFace13_end) | 0x0A018770 [gTextureLuigiFace15](@ref gTextureLuigiFace15) | 0x0A0194B8 @@ -18758,68 +18758,68 @@ Variable Name | Memory Address [gTextureLuigiFace16](@ref gTextureLuigiFace16) | 0x0A01A20C [gTextureLuigiFace16_end](@ref gTextureLuigiFace16_end) | 0x0A01AC44 [gTexturePeachFace00](@ref gTexturePeachFace00) | 0x0A01AC44 -[gTexturePeachFace01](@ref gTexturePeachFace01) | 0x0A01BAFC [gTexturePeachFace00_end](@ref gTexturePeachFace00_end) | 0x0A01BAFC +[gTexturePeachFace01](@ref gTexturePeachFace01) | 0x0A01BAFC [gTexturePeachFace01_end](@ref gTexturePeachFace01_end) | 0x0A01C9A8 [gTexturePeachFace02](@ref gTexturePeachFace02) | 0x0A01C9A8 -[gTexturePeachFace03](@ref gTexturePeachFace03) | 0x0A01D864 [gTexturePeachFace02_end](@ref gTexturePeachFace02_end) | 0x0A01D864 +[gTexturePeachFace03](@ref gTexturePeachFace03) | 0x0A01D864 [gTexturePeachFace04](@ref gTexturePeachFace04) | 0x0A01E71C [gTexturePeachFace03_end](@ref gTexturePeachFace03_end) | 0x0A01E71C -[gTexturePeachFace04_end](@ref gTexturePeachFace04_end) | 0x0A01F5A4 [gTexturePeachFace05](@ref gTexturePeachFace05) | 0x0A01F5A4 -[gTexturePeachFace05_end](@ref gTexturePeachFace05_end) | 0x0A020444 +[gTexturePeachFace04_end](@ref gTexturePeachFace04_end) | 0x0A01F5A4 [gTexturePeachFace06](@ref gTexturePeachFace06) | 0x0A020444 -[gTexturePeachFace06_end](@ref gTexturePeachFace06_end) | 0x0A02130C +[gTexturePeachFace05_end](@ref gTexturePeachFace05_end) | 0x0A020444 [gTexturePeachFace07](@ref gTexturePeachFace07) | 0x0A02130C -[gTexturePeachFace08](@ref gTexturePeachFace08) | 0x0A0221FC +[gTexturePeachFace06_end](@ref gTexturePeachFace06_end) | 0x0A02130C [gTexturePeachFace07_end](@ref gTexturePeachFace07_end) | 0x0A0221FC +[gTexturePeachFace08](@ref gTexturePeachFace08) | 0x0A0221FC [gTexturePeachFace08_end](@ref gTexturePeachFace08_end) | 0x0A02310C [gTexturePeachFace09](@ref gTexturePeachFace09) | 0x0A02310C [gTexturePeachFace09_end](@ref gTexturePeachFace09_end) | 0x0A0240C0 [gTexturePeachFace10](@ref gTexturePeachFace10) | 0x0A0240C0 -[gTexturePeachFace11](@ref gTexturePeachFace11) | 0x0A0250A4 [gTexturePeachFace10_end](@ref gTexturePeachFace10_end) | 0x0A0250A4 +[gTexturePeachFace11](@ref gTexturePeachFace11) | 0x0A0250A4 [gTexturePeachFace11_end](@ref gTexturePeachFace11_end) | 0x0A0260F0 [gTexturePeachFace12](@ref gTexturePeachFace12) | 0x0A0260F0 [gTexturePeachFace13](@ref gTexturePeachFace13) | 0x0A027128 [gTexturePeachFace12_end](@ref gTexturePeachFace12_end) | 0x0A027128 -[gTexturePeachFace13_end](@ref gTexturePeachFace13_end) | 0x0A02810C [gTexturePeachFace14](@ref gTexturePeachFace14) | 0x0A02810C -[gTexturePeachFace14_end](@ref gTexturePeachFace14_end) | 0x0A0290A0 +[gTexturePeachFace13_end](@ref gTexturePeachFace13_end) | 0x0A02810C [gTexturePeachFace15](@ref gTexturePeachFace15) | 0x0A0290A0 -[gTexturePeachFace16](@ref gTexturePeachFace16) | 0x0A02A028 +[gTexturePeachFace14_end](@ref gTexturePeachFace14_end) | 0x0A0290A0 [gTexturePeachFace15_end](@ref gTexturePeachFace15_end) | 0x0A02A028 +[gTexturePeachFace16](@ref gTexturePeachFace16) | 0x0A02A028 [gTexturePeachFace16_end](@ref gTexturePeachFace16_end) | 0x0A02AED0 [gTextureToadFace00](@ref gTextureToadFace00) | 0x0A02AED0 -[gTextureToadFace01](@ref gTextureToadFace01) | 0x0A02B88C [gTextureToadFace00_end](@ref gTextureToadFace00_end) | 0x0A02B88C +[gTextureToadFace01](@ref gTextureToadFace01) | 0x0A02B88C [gTextureToadFace02](@ref gTextureToadFace02) | 0x0A02C240 [gTextureToadFace01_end](@ref gTextureToadFace01_end) | 0x0A02C240 [gTextureToadFace02_end](@ref gTextureToadFace02_end) | 0x0A02CBFC [gTextureToadFace03](@ref gTextureToadFace03) | 0x0A02CBFC -[gTextureToadFace04](@ref gTextureToadFace04) | 0x0A02D5B4 [gTextureToadFace03_end](@ref gTextureToadFace03_end) | 0x0A02D5B4 -[gTextureToadFace04_end](@ref gTextureToadFace04_end) | 0x0A02DF70 +[gTextureToadFace04](@ref gTextureToadFace04) | 0x0A02D5B4 [gTextureToadFace05](@ref gTextureToadFace05) | 0x0A02DF70 +[gTextureToadFace04_end](@ref gTextureToadFace04_end) | 0x0A02DF70 [gTextureToadFace06](@ref gTextureToadFace06) | 0x0A02E910 [gTextureToadFace05_end](@ref gTextureToadFace05_end) | 0x0A02E910 [gTextureToadFace06_end](@ref gTextureToadFace06_end) | 0x0A02F2A8 [gTextureToadFace07](@ref gTextureToadFace07) | 0x0A02F2A8 [gTextureToadFace07_end](@ref gTextureToadFace07_end) | 0x0A02FC74 [gTextureToadFace08](@ref gTextureToadFace08) | 0x0A02FC74 -[gTextureToadFace08_end](@ref gTextureToadFace08_end) | 0x0A030628 [gTextureToadFace09](@ref gTextureToadFace09) | 0x0A030628 -[gTextureToadFace09_end](@ref gTextureToadFace09_end) | 0x0A031010 +[gTextureToadFace08_end](@ref gTextureToadFace08_end) | 0x0A030628 [gTextureToadFace10](@ref gTextureToadFace10) | 0x0A031010 -[gTextureToadFace10_end](@ref gTextureToadFace10_end) | 0x0A031A24 +[gTextureToadFace09_end](@ref gTextureToadFace09_end) | 0x0A031010 [gTextureToadFace11](@ref gTextureToadFace11) | 0x0A031A24 +[gTextureToadFace10_end](@ref gTextureToadFace10_end) | 0x0A031A24 [gTextureToadFace12](@ref gTextureToadFace12) | 0x0A03247C [gTextureToadFace11_end](@ref gTextureToadFace11_end) | 0x0A03247C [gTextureToadFace13](@ref gTextureToadFace13) | 0x0A032EDC [gTextureToadFace12_end](@ref gTextureToadFace12_end) | 0x0A032EDC -[gTextureToadFace13_end](@ref gTextureToadFace13_end) | 0x0A03395C [gTextureToadFace14](@ref gTextureToadFace14) | 0x0A03395C +[gTextureToadFace13_end](@ref gTextureToadFace13_end) | 0x0A03395C [gTextureToadFace15](@ref gTextureToadFace15) | 0x0A0343D0 [gTextureToadFace14_end](@ref gTextureToadFace14_end) | 0x0A0343D0 [gTextureToadFace15_end](@ref gTextureToadFace15_end) | 0x0A034E30 @@ -18828,94 +18828,94 @@ Variable Name | Memory Address [gTextureToadFace16_end](@ref gTextureToadFace16_end) | 0x0A035794 [gTextureYoshiFace00_end](@ref gTextureYoshiFace00_end) | 0x0A036280 [gTextureYoshiFace01](@ref gTextureYoshiFace01) | 0x0A036280 -[gTextureYoshiFace02](@ref gTextureYoshiFace02) | 0x0A036D64 [gTextureYoshiFace01_end](@ref gTextureYoshiFace01_end) | 0x0A036D64 -[gTextureYoshiFace03](@ref gTextureYoshiFace03) | 0x0A037844 +[gTextureYoshiFace02](@ref gTextureYoshiFace02) | 0x0A036D64 [gTextureYoshiFace02_end](@ref gTextureYoshiFace02_end) | 0x0A037844 +[gTextureYoshiFace03](@ref gTextureYoshiFace03) | 0x0A037844 [gTextureYoshiFace04](@ref gTextureYoshiFace04) | 0x0A0382F8 [gTextureYoshiFace03_end](@ref gTextureYoshiFace03_end) | 0x0A0382F8 [gTextureYoshiFace04_end](@ref gTextureYoshiFace04_end) | 0x0A038D68 [gTextureYoshiFace05](@ref gTextureYoshiFace05) | 0x0A038D68 [gTextureYoshiFace05_end](@ref gTextureYoshiFace05_end) | 0x0A0397B0 [gTextureYoshiFace06](@ref gTextureYoshiFace06) | 0x0A0397B0 -[gTextureYoshiFace06_end](@ref gTextureYoshiFace06_end) | 0x0A03A2D4 [gTextureYoshiFace07](@ref gTextureYoshiFace07) | 0x0A03A2D4 -[gTextureYoshiFace07_end](@ref gTextureYoshiFace07_end) | 0x0A03AD00 +[gTextureYoshiFace06_end](@ref gTextureYoshiFace06_end) | 0x0A03A2D4 [gTextureYoshiFace08](@ref gTextureYoshiFace08) | 0x0A03AD00 -[gTextureYoshiFace09](@ref gTextureYoshiFace09) | 0x0A03B6BC +[gTextureYoshiFace07_end](@ref gTextureYoshiFace07_end) | 0x0A03AD00 [gTextureYoshiFace08_end](@ref gTextureYoshiFace08_end) | 0x0A03B6BC -[gTextureYoshiFace10](@ref gTextureYoshiFace10) | 0x0A03C068 +[gTextureYoshiFace09](@ref gTextureYoshiFace09) | 0x0A03B6BC [gTextureYoshiFace09_end](@ref gTextureYoshiFace09_end) | 0x0A03C068 -[gTextureYoshiFace11](@ref gTextureYoshiFace11) | 0x0A03CA28 +[gTextureYoshiFace10](@ref gTextureYoshiFace10) | 0x0A03C068 [gTextureYoshiFace10_end](@ref gTextureYoshiFace10_end) | 0x0A03CA28 -[gTextureYoshiFace11_end](@ref gTextureYoshiFace11_end) | 0x0A03D438 +[gTextureYoshiFace11](@ref gTextureYoshiFace11) | 0x0A03CA28 [gTextureYoshiFace12](@ref gTextureYoshiFace12) | 0x0A03D438 -[gTextureYoshiFace12_end](@ref gTextureYoshiFace12_end) | 0x0A03DE94 +[gTextureYoshiFace11_end](@ref gTextureYoshiFace11_end) | 0x0A03D438 [gTextureYoshiFace13](@ref gTextureYoshiFace13) | 0x0A03DE94 +[gTextureYoshiFace12_end](@ref gTextureYoshiFace12_end) | 0x0A03DE94 [gTextureYoshiFace14](@ref gTextureYoshiFace14) | 0x0A03E974 [gTextureYoshiFace13_end](@ref gTextureYoshiFace13_end) | 0x0A03E974 -[gTextureYoshiFace15](@ref gTextureYoshiFace15) | 0x0A03F47C [gTextureYoshiFace14_end](@ref gTextureYoshiFace14_end) | 0x0A03F47C +[gTextureYoshiFace15](@ref gTextureYoshiFace15) | 0x0A03F47C [gTextureYoshiFace15_end](@ref gTextureYoshiFace15_end) | 0x0A03FF94 [gTextureYoshiFace16](@ref gTextureYoshiFace16) | 0x0A03FF94 [gTextureYoshiFace16_end](@ref gTextureYoshiFace16_end) | 0x0A040ABC [gTextureDkFace00](@ref gTextureDkFace00) | 0x0A040ABC -[gTextureDkFace01](@ref gTextureDkFace01) | 0x0A0418A8 [gTextureDkFace00_end](@ref gTextureDkFace00_end) | 0x0A0418A8 -[gTextureDkFace01_end](@ref gTextureDkFace01_end) | 0x0A0426B0 +[gTextureDkFace01](@ref gTextureDkFace01) | 0x0A0418A8 [gTextureDkFace02](@ref gTextureDkFace02) | 0x0A0426B0 -[gTextureDkFace02_end](@ref gTextureDkFace02_end) | 0x0A043490 +[gTextureDkFace01_end](@ref gTextureDkFace01_end) | 0x0A0426B0 [gTextureDkFace03](@ref gTextureDkFace03) | 0x0A043490 -[gTextureDkFace03_end](@ref gTextureDkFace03_end) | 0x0A044240 +[gTextureDkFace02_end](@ref gTextureDkFace02_end) | 0x0A043490 [gTextureDkFace04](@ref gTextureDkFace04) | 0x0A044240 +[gTextureDkFace03_end](@ref gTextureDkFace03_end) | 0x0A044240 [gTextureDkFace05](@ref gTextureDkFace05) | 0x0A044FE8 [gTextureDkFace04_end](@ref gTextureDkFace04_end) | 0x0A044FE8 -[gTextureDkFace06](@ref gTextureDkFace06) | 0x0A045DCC [gTextureDkFace05_end](@ref gTextureDkFace05_end) | 0x0A045DCC +[gTextureDkFace06](@ref gTextureDkFace06) | 0x0A045DCC [gTextureDkFace06_end](@ref gTextureDkFace06_end) | 0x0A046BF8 [gTextureDkFace07](@ref gTextureDkFace07) | 0x0A046BF8 -[gTextureDkFace08](@ref gTextureDkFace08) | 0x0A047A8C [gTextureDkFace07_end](@ref gTextureDkFace07_end) | 0x0A047A8C -[gTextureDkFace09](@ref gTextureDkFace09) | 0x0A048968 +[gTextureDkFace08](@ref gTextureDkFace08) | 0x0A047A8C [gTextureDkFace08_end](@ref gTextureDkFace08_end) | 0x0A048968 +[gTextureDkFace09](@ref gTextureDkFace09) | 0x0A048968 [gTextureDkFace10](@ref gTextureDkFace10) | 0x0A0498B0 [gTextureDkFace09_end](@ref gTextureDkFace09_end) | 0x0A0498B0 [gTextureDkFace10_end](@ref gTextureDkFace10_end) | 0x0A04A7E8 [gTextureDkFace11](@ref gTextureDkFace11) | 0x0A04A7E8 -[gTextureDkFace12](@ref gTextureDkFace12) | 0x0A04B76C [gTextureDkFace11_end](@ref gTextureDkFace11_end) | 0x0A04B76C +[gTextureDkFace12](@ref gTextureDkFace12) | 0x0A04B76C [gTextureDkFace13](@ref gTextureDkFace13) | 0x0A04C770 [gTextureDkFace12_end](@ref gTextureDkFace12_end) | 0x0A04C770 [gTextureDkFace13_end](@ref gTextureDkFace13_end) | 0x0A04D730 [gTextureDkFace14](@ref gTextureDkFace14) | 0x0A04D730 -[gTextureDkFace15](@ref gTextureDkFace15) | 0x0A04E67C [gTextureDkFace14_end](@ref gTextureDkFace14_end) | 0x0A04E67C -[gTextureDkFace15_end](@ref gTextureDkFace15_end) | 0x0A04F57C +[gTextureDkFace15](@ref gTextureDkFace15) | 0x0A04E67C [gTextureDkFace16](@ref gTextureDkFace16) | 0x0A04F57C -[gTextureWarioFace00](@ref gTextureWarioFace00) | 0x0A0504D0 +[gTextureDkFace15_end](@ref gTextureDkFace15_end) | 0x0A04F57C [gTextureDkFace16_end](@ref gTextureDkFace16_end) | 0x0A0504D0 -[gTextureWarioFace00_end](@ref gTextureWarioFace00_end) | 0x0A051630 +[gTextureWarioFace00](@ref gTextureWarioFace00) | 0x0A0504D0 [gTextureWarioFace01](@ref gTextureWarioFace01) | 0x0A051630 +[gTextureWarioFace00_end](@ref gTextureWarioFace00_end) | 0x0A051630 [gTextureWarioFace01_end](@ref gTextureWarioFace01_end) | 0x0A052774 [gTextureWarioFace02](@ref gTextureWarioFace02) | 0x0A052774 [gTextureWarioFace03](@ref gTextureWarioFace03) | 0x0A0538C8 [gTextureWarioFace02_end](@ref gTextureWarioFace02_end) | 0x0A0538C8 -[gTextureWarioFace03_end](@ref gTextureWarioFace03_end) | 0x0A054A30 [gTextureWarioFace04](@ref gTextureWarioFace04) | 0x0A054A30 +[gTextureWarioFace03_end](@ref gTextureWarioFace03_end) | 0x0A054A30 [gTextureWarioFace05](@ref gTextureWarioFace05) | 0x0A055B84 [gTextureWarioFace04_end](@ref gTextureWarioFace04_end) | 0x0A055B84 [gTextureWarioFace05_end](@ref gTextureWarioFace05_end) | 0x0A056CE0 [gTextureWarioFace06](@ref gTextureWarioFace06) | 0x0A056CE0 -[gTextureWarioFace07](@ref gTextureWarioFace07) | 0x0A057E54 [gTextureWarioFace06_end](@ref gTextureWarioFace06_end) | 0x0A057E54 -[gTextureWarioFace08](@ref gTextureWarioFace08) | 0x0A05902C +[gTextureWarioFace07](@ref gTextureWarioFace07) | 0x0A057E54 [gTextureWarioFace07_end](@ref gTextureWarioFace07_end) | 0x0A05902C +[gTextureWarioFace08](@ref gTextureWarioFace08) | 0x0A05902C [gTextureWarioFace09](@ref gTextureWarioFace09) | 0x0A05A254 [gTextureWarioFace08_end](@ref gTextureWarioFace08_end) | 0x0A05A254 [gTextureWarioFace09_end](@ref gTextureWarioFace09_end) | 0x0A05B4C0 [gTextureWarioFace10](@ref gTextureWarioFace10) | 0x0A05B4C0 -[gTextureWarioFace10_end](@ref gTextureWarioFace10_end) | 0x0A05C7A0 [gTextureWarioFace11](@ref gTextureWarioFace11) | 0x0A05C7A0 +[gTextureWarioFace10_end](@ref gTextureWarioFace10_end) | 0x0A05C7A0 [gTextureWarioFace11_end](@ref gTextureWarioFace11_end) | 0x0A05DAA8 [gTextureWarioFace12](@ref gTextureWarioFace12) | 0x0A05DAA8 [gTextureWarioFace12_end](@ref gTextureWarioFace12_end) | 0x0A05ED8C @@ -18924,34 +18924,34 @@ Variable Name | Memory Address [gTextureWarioFace14](@ref gTextureWarioFace14) | 0x0A0600B0 [gTextureWarioFace14_end](@ref gTextureWarioFace14_end) | 0x0A06139C [gTextureWarioFace15](@ref gTextureWarioFace15) | 0x0A06139C -[gTextureWarioFace15_end](@ref gTextureWarioFace15_end) | 0x0A062668 [gTextureWarioFace16](@ref gTextureWarioFace16) | 0x0A062668 +[gTextureWarioFace15_end](@ref gTextureWarioFace15_end) | 0x0A062668 [gTextureWarioFace16_end](@ref gTextureWarioFace16_end) | 0x0A0637E0 [gTextureBowserFace00](@ref gTextureBowserFace00) | 0x0A0637E0 [gTextureBowserFace00_end](@ref gTextureBowserFace00_end) | 0x0A064AC8 [gTextureBowserFace01](@ref gTextureBowserFace01) | 0x0A064AC8 -[gTextureBowserFace02](@ref gTextureBowserFace02) | 0x0A065D7C [gTextureBowserFace01_end](@ref gTextureBowserFace01_end) | 0x0A065D7C -[gTextureBowserFace03](@ref gTextureBowserFace03) | 0x0A067044 +[gTextureBowserFace02](@ref gTextureBowserFace02) | 0x0A065D7C [gTextureBowserFace02_end](@ref gTextureBowserFace02_end) | 0x0A067044 +[gTextureBowserFace03](@ref gTextureBowserFace03) | 0x0A067044 [gTextureBowserFace03_end](@ref gTextureBowserFace03_end) | 0x0A068310 [gTextureBowserFace04](@ref gTextureBowserFace04) | 0x0A068310 -[gTextureBowserFace04_end](@ref gTextureBowserFace04_end) | 0x0A0695B4 [gTextureBowserFace05](@ref gTextureBowserFace05) | 0x0A0695B4 +[gTextureBowserFace04_end](@ref gTextureBowserFace04_end) | 0x0A0695B4 [gTextureBowserFace06](@ref gTextureBowserFace06) | 0x0A06A840 [gTextureBowserFace05_end](@ref gTextureBowserFace05_end) | 0x0A06A840 -[gTextureBowserFace06_end](@ref gTextureBowserFace06_end) | 0x0A06BB1C [gTextureBowserFace07](@ref gTextureBowserFace07) | 0x0A06BB1C +[gTextureBowserFace06_end](@ref gTextureBowserFace06_end) | 0x0A06BB1C [gTextureBowserFace08](@ref gTextureBowserFace08) | 0x0A06CE04 [gTextureBowserFace07_end](@ref gTextureBowserFace07_end) | 0x0A06CE04 -[gTextureBowserFace09](@ref gTextureBowserFace09) | 0x0A06E0F4 [gTextureBowserFace08_end](@ref gTextureBowserFace08_end) | 0x0A06E0F4 +[gTextureBowserFace09](@ref gTextureBowserFace09) | 0x0A06E0F4 [gTextureBowserFace09_end](@ref gTextureBowserFace09_end) | 0x0A06F410 [gTextureBowserFace10](@ref gTextureBowserFace10) | 0x0A06F410 [gTextureBowserFace10_end](@ref gTextureBowserFace10_end) | 0x0A0706DC [gTextureBowserFace11](@ref gTextureBowserFace11) | 0x0A0706DC -[gTextureBowserFace11_end](@ref gTextureBowserFace11_end) | 0x0A071A18 [gTextureBowserFace12](@ref gTextureBowserFace12) | 0x0A071A18 +[gTextureBowserFace11_end](@ref gTextureBowserFace11_end) | 0x0A071A18 [gTextureBowserFace13](@ref gTextureBowserFace13) | 0x0A072DBC [gTextureBowserFace12_end](@ref gTextureBowserFace12_end) | 0x0A072DBC [gTextureBowserFace14](@ref gTextureBowserFace14) | 0x0A074138 @@ -18986,12 +18986,12 @@ Variable Name | Memory Address [gTextureTrophySilver](@ref gTextureTrophySilver) | 0x0A0AEFEC [gTextureTrophySilver_end](@ref gTextureTrophySilver_end) | 0x0A0AF614 [gTextureTrophyBronze](@ref gTextureTrophyBronze) | 0x0A0AF614 -[gTextureCupGold](@ref gTextureCupGold) | 0x0A0AFC00 [gTextureTrophyBronze_end](@ref gTextureTrophyBronze_end) | 0x0A0AFC00 +[gTextureCupGold](@ref gTextureCupGold) | 0x0A0AFC00 [gTextureCupSilver](@ref gTextureCupSilver) | 0x0A0B058C [gTextureCupGold_end](@ref gTextureCupGold_end) | 0x0A0B058C -[gTextureCupBronze](@ref gTextureCupBronze) | 0x0A0B0F10 [gTextureCupSilver_end](@ref gTextureCupSilver_end) | 0x0A0B0F10 +[gTextureCupBronze](@ref gTextureCupBronze) | 0x0A0B0F10 [gTextureCupBronze_end](@ref gTextureCupBronze_end) | 0x0A0B17B4 [gTexturePushStartButton](@ref gTexturePushStartButton) | 0x0A0B17B4 [gTextureCopyright1996](@ref gTextureCopyright1996) | 0x0A0B2B94 @@ -19003,16 +19003,16 @@ Variable Name | Memory Address [gTexture7E56E4](@ref gTexture7E56E4) | 0x0A0BBCB4 [gTexture7E56E4_end](@ref gTexture7E56E4_end) | 0x0A0BCE1F [gTextureSmallFont0](@ref gTextureSmallFont0) | 0x0A0BCE20 -[gTextureSmallFont1](@ref gTextureSmallFont1) | 0x0A0BCEB0 [gTextureSmallFont0_end](@ref gTextureSmallFont0_end) | 0x0A0BCEB0 +[gTextureSmallFont1](@ref gTextureSmallFont1) | 0x0A0BCEB0 [gTextureSmallFont2](@ref gTextureSmallFont2) | 0x0A0BCF08 [gTextureSmallFont1_end](@ref gTextureSmallFont1_end) | 0x0A0BCF08 -[gTextureSmallFont2_end](@ref gTextureSmallFont2_end) | 0x0A0BCFA0 [gTextureSmallFont3](@ref gTextureSmallFont3) | 0x0A0BCFA0 +[gTextureSmallFont2_end](@ref gTextureSmallFont2_end) | 0x0A0BCFA0 [gTextureSmallFont3_end](@ref gTextureSmallFont3_end) | 0x0A0BD034 [gTextureSmallFont4](@ref gTextureSmallFont4) | 0x0A0BD034 -[gTextureSmallFont5](@ref gTextureSmallFont5) | 0x0A0BD0BC [gTextureSmallFont4_end](@ref gTextureSmallFont4_end) | 0x0A0BD0BC +[gTextureSmallFont5](@ref gTextureSmallFont5) | 0x0A0BD0BC [gTextureSmallFont6](@ref gTextureSmallFont6) | 0x0A0BD154 [gTextureSmallFont5_end](@ref gTextureSmallFont5_end) | 0x0A0BD154 [gTextureSmallFont6_end](@ref gTextureSmallFont6_end) | 0x0A0BD1F0 @@ -19021,52 +19021,52 @@ Variable Name | Memory Address [gTextureSmallFont7_end](@ref gTextureSmallFont7_end) | 0x0A0BD260 [gTextureSmallFont9](@ref gTextureSmallFont9) | 0x0A0BD2F0 [gTextureSmallFont8_end](@ref gTextureSmallFont8_end) | 0x0A0BD2F0 -[gTextureSmallFont9_end](@ref gTextureSmallFont9_end) | 0x0A0BD390 [gTextureN64ControllerPakDataSelect](@ref gTextureN64ControllerPakDataSelect) | 0x0A0BD390 -[gTextureN64ControllerPakDataSelect_end](@ref gTextureN64ControllerPakDataSelect_end) | 0x0A0BE4B8 +[gTextureSmallFont9_end](@ref gTextureSmallFont9_end) | 0x0A0BD390 [gTextureEraseDataRecordConfirmation](@ref gTextureEraseDataRecordConfirmation) | 0x0A0BE4B8 +[gTextureN64ControllerPakDataSelect_end](@ref gTextureN64ControllerPakDataSelect_end) | 0x0A0BE4B8 [gTextureEraseDataRecordConfirmation_end](@ref gTextureEraseDataRecordConfirmation_end) | 0x0A0BF4AC [gTextureRecordNotErased](@ref gTextureRecordNotErased) | 0x0A0BF4AC -[gTextureRecordNotErased_end](@ref gTextureRecordNotErased_end) | 0x0A0BFD7C [gTexturePlaceN64ControllerPakIntoController1](@ref gTexturePlaceN64ControllerPakIntoController1) | 0x0A0BFD7C -[gTexturePlaceN64ControllerPakIntoController1_end](@ref gTexturePlaceN64ControllerPakIntoController1_end) | 0x0A0C09C8 +[gTextureRecordNotErased_end](@ref gTextureRecordNotErased_end) | 0x0A0BFD7C [gTexturePleaseReinsertOriginalN64ControllerPak](@ref gTexturePleaseReinsertOriginalN64ControllerPak) | 0x0A0C09C8 -[gTextureErasingSelectedRecord](@ref gTextureErasingSelectedRecord) | 0x0A0C16A0 +[gTexturePlaceN64ControllerPakIntoController1_end](@ref gTexturePlaceN64ControllerPakIntoController1_end) | 0x0A0C09C8 [gTexturePleaseReinsertOriginalN64ControllerPak_end](@ref gTexturePleaseReinsertOriginalN64ControllerPak_end) | 0x0A0C16A0 +[gTextureErasingSelectedRecord](@ref gTextureErasingSelectedRecord) | 0x0A0C16A0 [gTextureSelectRecord](@ref gTextureSelectRecord) | 0x0A0C22A4 [gTextureErasingSelectedRecord_end](@ref gTextureErasingSelectedRecord_end) | 0x0A0C22A4 [gTextureTextEnd](@ref gTextureTextEnd) | 0x0A0C261C [gTextureSelectRecord_end](@ref gTextureSelectRecord_end) | 0x0A0C261C -[gTextureTableOfContents](@ref gTextureTableOfContents) | 0x0A0C274C [gTextureTextEnd_end](@ref gTextureTextEnd_end) | 0x0A0C274C -[gTextureTextHash](@ref gTextureTextHash) | 0x0A0C2B78 +[gTextureTableOfContents](@ref gTextureTableOfContents) | 0x0A0C274C [gTextureTableOfContents_end](@ref gTextureTableOfContents_end) | 0x0A0C2B78 +[gTextureTextHash](@ref gTextureTextHash) | 0x0A0C2B78 [gTextureTextHash_end](@ref gTextureTextHash_end) | 0x0A0C2BF8 [gTextureTextGameData](@ref gTextureTextGameData) | 0x0A0C2BF8 -[gTextureTextGameData_end](@ref gTextureTextGameData_end) | 0x0A0C2EBC [gTextureTextPages](@ref gTextureTextPages) | 0x0A0C2EBC -[gTextureTextPages_end](@ref gTextureTextPages_end) | 0x0A0C307C +[gTextureTextGameData_end](@ref gTextureTextGameData_end) | 0x0A0C2EBC [gTextureTextPagesFree](@ref gTextureTextPagesFree) | 0x0A0C307C +[gTextureTextPages_end](@ref gTextureTextPages_end) | 0x0A0C307C [gTextureTextPagesFree_end](@ref gTextureTextPagesFree_end) | 0x0A0C3340 [gTextureTextErase](@ref gTextureTextErase) | 0x0A0C3340 -[gTextureTextQuit](@ref gTextureTextQuit) | 0x0A0C34E0 [gTextureTextErase_end](@ref gTextureTextErase_end) | 0x0A0C34E0 +[gTextureTextQuit](@ref gTextureTextQuit) | 0x0A0C34E0 [gTextureTextQuit_end](@ref gTextureTextQuit_end) | 0x0A0C3628 [gTexture7ED058](@ref gTexture7ED058) | 0x0A0C3628 [gTexture7ED290](@ref gTexture7ED290) | 0x0A0C3860 [gTexture7ED058_end](@ref gTexture7ED058_end) | 0x0A0C3860 [gTexture7ED50C](@ref gTexture7ED50C) | 0x0A0C3ADC [gTexture7ED290_end](@ref gTexture7ED290_end) | 0x0A0C3ADC -[gTexture7ED50C_end](@ref gTexture7ED50C_end) | 0x0A0C3C74 [gTexture7ED6A4](@ref gTexture7ED6A4) | 0x0A0C3C74 -[gTexture7ED6A4_end](@ref gTexture7ED6A4_end) | 0x0A0C4004 +[gTexture7ED50C_end](@ref gTexture7ED50C_end) | 0x0A0C3C74 [gTextureTinyFont0](@ref gTextureTinyFont0) | 0x0A0C4004 +[gTexture7ED6A4_end](@ref gTexture7ED6A4_end) | 0x0A0C4004 [gTextureTinyFont0_end](@ref gTextureTinyFont0_end) | 0x0A0C4078 [gTextureTinyFont1](@ref gTextureTinyFont1) | 0x0A0C4078 [gTextureTinyFont1_end](@ref gTextureTinyFont1_end) | 0x0A0C40C0 [gTextureTinyFont2](@ref gTextureTinyFont2) | 0x0A0C40C0 -[gTextureTinyFont2_end](@ref gTextureTinyFont2_end) | 0x0A0C4134 [gTextureTinyFont3](@ref gTextureTinyFont3) | 0x0A0C4134 +[gTextureTinyFont2_end](@ref gTextureTinyFont2_end) | 0x0A0C4134 [gTextureTinyFont3_end](@ref gTextureTinyFont3_end) | 0x0A0C41A4 [gTextureTinyFont4](@ref gTextureTinyFont4) | 0x0A0C41A4 [gTextureTinyFont5](@ref gTextureTinyFont5) | 0x0A0C4200 @@ -19077,70 +19077,70 @@ Variable Name | Memory Address [gTextureTinyFont7](@ref gTextureTinyFont7) | 0x0A0C42E8 [gTextureTinyFont8](@ref gTextureTinyFont8) | 0x0A0C4348 [gTextureTinyFont7_end](@ref gTextureTinyFont7_end) | 0x0A0C4348 -[gTextureTinyFont8_end](@ref gTextureTinyFont8_end) | 0x0A0C43C0 [gTextureTinyFont9](@ref gTextureTinyFont9) | 0x0A0C43C0 -[gTextureTinyFontA](@ref gTextureTinyFontA) | 0x0A0C4434 +[gTextureTinyFont8_end](@ref gTextureTinyFont8_end) | 0x0A0C43C0 [gTextureTinyFont9_end](@ref gTextureTinyFont9_end) | 0x0A0C4434 +[gTextureTinyFontA](@ref gTextureTinyFontA) | 0x0A0C4434 [gTextureTinyFontA_end](@ref gTextureTinyFontA_end) | 0x0A0C44A0 [gTextureTinyFontB](@ref gTextureTinyFontB) | 0x0A0C44A0 [gTextureTinyFontC](@ref gTextureTinyFontC) | 0x0A0C451C [gTextureTinyFontB_end](@ref gTextureTinyFontB_end) | 0x0A0C451C [gTextureTinyFontD](@ref gTextureTinyFontD) | 0x0A0C4590 [gTextureTinyFontC_end](@ref gTextureTinyFontC_end) | 0x0A0C4590 -[gTextureTinyFontD_end](@ref gTextureTinyFontD_end) | 0x0A0C4600 [gTextureTinyFontE](@ref gTextureTinyFontE) | 0x0A0C4600 -[gTextureTinyFontE_end](@ref gTextureTinyFontE_end) | 0x0A0C4674 +[gTextureTinyFontD_end](@ref gTextureTinyFontD_end) | 0x0A0C4600 [gTextureTinyFontF](@ref gTextureTinyFontF) | 0x0A0C4674 -[gTextureTinyFontF_end](@ref gTextureTinyFontF_end) | 0x0A0C46D8 +[gTextureTinyFontE_end](@ref gTextureTinyFontE_end) | 0x0A0C4674 [gTextureTinyFontG](@ref gTextureTinyFontG) | 0x0A0C46D8 -[gTextureTinyFontG_end](@ref gTextureTinyFontG_end) | 0x0A0C474C +[gTextureTinyFontF_end](@ref gTextureTinyFontF_end) | 0x0A0C46D8 [gTextureTinyFontH](@ref gTextureTinyFontH) | 0x0A0C474C -[gTextureTinyFontI](@ref gTextureTinyFontI) | 0x0A0C47C4 +[gTextureTinyFontG_end](@ref gTextureTinyFontG_end) | 0x0A0C474C [gTextureTinyFontH_end](@ref gTextureTinyFontH_end) | 0x0A0C47C4 -[gTextureTinyFontJ](@ref gTextureTinyFontJ) | 0x0A0C480C +[gTextureTinyFontI](@ref gTextureTinyFontI) | 0x0A0C47C4 [gTextureTinyFontI_end](@ref gTextureTinyFontI_end) | 0x0A0C480C +[gTextureTinyFontJ](@ref gTextureTinyFontJ) | 0x0A0C480C [gTextureTinyFontK](@ref gTextureTinyFontK) | 0x0A0C4860 [gTextureTinyFontJ_end](@ref gTextureTinyFontJ_end) | 0x0A0C4860 -[gTextureTinyFontK_end](@ref gTextureTinyFontK_end) | 0x0A0C48D0 [gTextureTinyFontL](@ref gTextureTinyFontL) | 0x0A0C48D0 -[gTextureTinyFontL_end](@ref gTextureTinyFontL_end) | 0x0A0C491C +[gTextureTinyFontK_end](@ref gTextureTinyFontK_end) | 0x0A0C48D0 [gTextureTinyFontM](@ref gTextureTinyFontM) | 0x0A0C491C -[gTextureTinyFontM_end](@ref gTextureTinyFontM_end) | 0x0A0C4998 +[gTextureTinyFontL_end](@ref gTextureTinyFontL_end) | 0x0A0C491C [gTextureTinyFontN](@ref gTextureTinyFontN) | 0x0A0C4998 -[gTextureTinyFontO](@ref gTextureTinyFontO) | 0x0A0C4A14 +[gTextureTinyFontM_end](@ref gTextureTinyFontM_end) | 0x0A0C4998 [gTextureTinyFontN_end](@ref gTextureTinyFontN_end) | 0x0A0C4A14 -[gTextureTinyFontO_end](@ref gTextureTinyFontO_end) | 0x0A0C4A8C +[gTextureTinyFontO](@ref gTextureTinyFontO) | 0x0A0C4A14 [gTextureTinyFontP](@ref gTextureTinyFontP) | 0x0A0C4A8C -[gTextureTinyFontQ](@ref gTextureTinyFontQ) | 0x0A0C4AF8 +[gTextureTinyFontO_end](@ref gTextureTinyFontO_end) | 0x0A0C4A8C [gTextureTinyFontP_end](@ref gTextureTinyFontP_end) | 0x0A0C4AF8 +[gTextureTinyFontQ](@ref gTextureTinyFontQ) | 0x0A0C4AF8 [gTextureTinyFontQ_end](@ref gTextureTinyFontQ_end) | 0x0A0C4B70 [gTextureTinyFontR](@ref gTextureTinyFontR) | 0x0A0C4B70 [gTextureTinyFontR_end](@ref gTextureTinyFontR_end) | 0x0A0C4BE4 [gTextureTinyFontS](@ref gTextureTinyFontS) | 0x0A0C4BE4 -[gTextureTinyFontT](@ref gTextureTinyFontT) | 0x0A0C4C54 [gTextureTinyFontS_end](@ref gTextureTinyFontS_end) | 0x0A0C4C54 +[gTextureTinyFontT](@ref gTextureTinyFontT) | 0x0A0C4C54 [gTextureTinyFontU](@ref gTextureTinyFontU) | 0x0A0C4CA8 [gTextureTinyFontT_end](@ref gTextureTinyFontT_end) | 0x0A0C4CA8 -[gTextureTinyFontU_end](@ref gTextureTinyFontU_end) | 0x0A0C4D0C [gTextureTinyFontV](@ref gTextureTinyFontV) | 0x0A0C4D0C +[gTextureTinyFontU_end](@ref gTextureTinyFontU_end) | 0x0A0C4D0C [gTextureTinyFontW](@ref gTextureTinyFontW) | 0x0A0C4D6C [gTextureTinyFontV_end](@ref gTextureTinyFontV_end) | 0x0A0C4D6C -[gTextureTinyFontW_end](@ref gTextureTinyFontW_end) | 0x0A0C4DE8 [gTextureTinyFontX](@ref gTextureTinyFontX) | 0x0A0C4DE8 +[gTextureTinyFontW_end](@ref gTextureTinyFontW_end) | 0x0A0C4DE8 [gTextureTinyFontX_end](@ref gTextureTinyFontX_end) | 0x0A0C4E54 [gTextureTinyFontY](@ref gTextureTinyFontY) | 0x0A0C4E54 [gTextureTinyFontY_end](@ref gTextureTinyFontY_end) | 0x0A0C4EA4 [gTextureTinyFontZ](@ref gTextureTinyFontZ) | 0x0A0C4EA4 -[gTextureTinyFontZ_end](@ref gTextureTinyFontZ_end) | 0x0A0C4F0C [gTextureTinyFontExclamationMark](@ref gTextureTinyFontExclamationMark) | 0x0A0C4F0C +[gTextureTinyFontZ_end](@ref gTextureTinyFontZ_end) | 0x0A0C4F0C [gTextureTinyFontDoubleQuote](@ref gTextureTinyFontDoubleQuote) | 0x0A0C4F54 [gTextureTinyFontExclamationMark_end](@ref gTextureTinyFontExclamationMark_end) | 0x0A0C4F54 -[gTextureTinyFontHash](@ref gTextureTinyFontHash) | 0x0A0C4F8C [gTextureTinyFontDoubleQuote_end](@ref gTextureTinyFontDoubleQuote_end) | 0x0A0C4F8C +[gTextureTinyFontHash](@ref gTextureTinyFontHash) | 0x0A0C4F8C [gTextureTinyFontHash_end](@ref gTextureTinyFontHash_end) | 0x0A0C4FFC [gTextureTinyFontSingleQuote](@ref gTextureTinyFontSingleQuote) | 0x0A0C4FFC -[gTextureTinyFontSingleQuote_end](@ref gTextureTinyFontSingleQuote_end) | 0x0A0C502C [gTextureTinyFontAsterisk](@ref gTextureTinyFontAsterisk) | 0x0A0C502C +[gTextureTinyFontSingleQuote_end](@ref gTextureTinyFontSingleQuote_end) | 0x0A0C502C [gTextureTinyFontPlus](@ref gTextureTinyFontPlus) | 0x0A0C5098 [gTextureTinyFontAsterisk_end](@ref gTextureTinyFontAsterisk_end) | 0x0A0C5098 [gTextureTinyFontPlus_end](@ref gTextureTinyFontPlus_end) | 0x0A0C50E8 @@ -19151,60 +19151,60 @@ Variable Name | Memory Address [gTextureTinyFontMinus_end](@ref gTextureTinyFontMinus_end) | 0x0A0C514C [gTextureTinyFontForwardSlash](@ref gTextureTinyFontForwardSlash) | 0x0A0C517C [gTextureTinyFontComma_end](@ref gTextureTinyFontComma_end) | 0x0A0C517C -[gTextureTinyFontColon](@ref gTextureTinyFontColon) | 0x0A0C51CC [gTextureTinyFontForwardSlash_end](@ref gTextureTinyFontForwardSlash_end) | 0x0A0C51CC -[gTexture7EEC34](@ref gTexture7EEC34) | 0x0A0C5204 +[gTextureTinyFontColon](@ref gTextureTinyFontColon) | 0x0A0C51CC [gTextureTinyFontColon_end](@ref gTextureTinyFontColon_end) | 0x0A0C5204 -[gTexture7EEC34_end](@ref gTexture7EEC34_end) | 0x0A0C5254 +[gTexture7EEC34](@ref gTexture7EEC34) | 0x0A0C5204 [gTextureTinyFontQuestion](@ref gTextureTinyFontQuestion) | 0x0A0C5254 -[gTextureTinyFontQuestion_end](@ref gTextureTinyFontQuestion_end) | 0x0A0C52B4 +[gTexture7EEC34_end](@ref gTexture7EEC34_end) | 0x0A0C5254 [gTexture7EECE4](@ref gTexture7EECE4) | 0x0A0C52B4 +[gTextureTinyFontQuestion_end](@ref gTextureTinyFontQuestion_end) | 0x0A0C52B4 [gTexture7EECE4_end](@ref gTexture7EECE4_end) | 0x0A0C5344 [gTexture7EED74](@ref gTexture7EED74) | 0x0A0C5344 -[gTexture7EEDB0](@ref gTexture7EEDB0) | 0x0A0C5380 [gTexture7EED74_end](@ref gTexture7EED74_end) | 0x0A0C5380 -[gTexture7EEDE8](@ref gTexture7EEDE8) | 0x0A0C53B8 +[gTexture7EEDB0](@ref gTexture7EEDB0) | 0x0A0C5380 [gTexture7EEDB0_end](@ref gTexture7EEDB0_end) | 0x0A0C53B8 -[gTexture7EEDE8_end](@ref gTexture7EEDE8_end) | 0x0A0C53F0 +[gTexture7EEDE8](@ref gTexture7EEDE8) | 0x0A0C53B8 [gTexture7EEE20](@ref gTexture7EEE20) | 0x0A0C53F0 +[gTexture7EEDE8_end](@ref gTexture7EEDE8_end) | 0x0A0C53F0 [gTexture7EEE7C](@ref gTexture7EEE7C) | 0x0A0C544C [gTexture7EEE20_end](@ref gTexture7EEE20_end) | 0x0A0C544C -[gTexture7EEED0](@ref gTexture7EEED0) | 0x0A0C54A0 [gTexture7EEE7C_end](@ref gTexture7EEE7C_end) | 0x0A0C54A0 -[gTexture7EEF3C](@ref gTexture7EEF3C) | 0x0A0C550C +[gTexture7EEED0](@ref gTexture7EEED0) | 0x0A0C54A0 [gTexture7EEED0_end](@ref gTexture7EEED0_end) | 0x0A0C550C -[gTexture7EEF3C_end](@ref gTexture7EEF3C_end) | 0x0A0C5560 +[gTexture7EEF3C](@ref gTexture7EEF3C) | 0x0A0C550C [gTexture7EEF90](@ref gTexture7EEF90) | 0x0A0C5560 -[gTexture7EEF90_end](@ref gTexture7EEF90_end) | 0x0A0C55C4 +[gTexture7EEF3C_end](@ref gTexture7EEF3C_end) | 0x0A0C5560 [gTexture7EEFF4](@ref gTexture7EEFF4) | 0x0A0C55C4 -[gTexture7EF058](@ref gTexture7EF058) | 0x0A0C5628 +[gTexture7EEF90_end](@ref gTexture7EEF90_end) | 0x0A0C55C4 [gTexture7EEFF4_end](@ref gTexture7EEFF4_end) | 0x0A0C5628 -[gTexture7EF058_end](@ref gTexture7EF058_end) | 0x0A0C5684 +[gTexture7EF058](@ref gTexture7EF058) | 0x0A0C5628 [gTexture7EF0B4](@ref gTexture7EF0B4) | 0x0A0C5684 -[gTexture7EF0B4_end](@ref gTexture7EF0B4_end) | 0x0A0C56E0 +[gTexture7EF058_end](@ref gTexture7EF058_end) | 0x0A0C5684 [gTexture7EF110](@ref gTexture7EF110) | 0x0A0C56E0 +[gTexture7EF0B4_end](@ref gTexture7EF0B4_end) | 0x0A0C56E0 [gTexture7EF17C](@ref gTexture7EF17C) | 0x0A0C574C [gTexture7EF110_end](@ref gTexture7EF110_end) | 0x0A0C574C -[gTexture7EF17C_end](@ref gTexture7EF17C_end) | 0x0A0C57C0 [gTexture7EF1F0](@ref gTexture7EF1F0) | 0x0A0C57C0 -[gTexture7EF1F0_end](@ref gTexture7EF1F0_end) | 0x0A0C5820 +[gTexture7EF17C_end](@ref gTexture7EF17C_end) | 0x0A0C57C0 [gTexture7EF250](@ref gTexture7EF250) | 0x0A0C5820 -[gTexture7EF2B8](@ref gTexture7EF2B8) | 0x0A0C5888 +[gTexture7EF1F0_end](@ref gTexture7EF1F0_end) | 0x0A0C5820 [gTexture7EF250_end](@ref gTexture7EF250_end) | 0x0A0C5888 +[gTexture7EF2B8](@ref gTexture7EF2B8) | 0x0A0C5888 [gTexture7EF314](@ref gTexture7EF314) | 0x0A0C58E4 [gTexture7EF2B8_end](@ref gTexture7EF2B8_end) | 0x0A0C58E4 [gTexture7EF388](@ref gTexture7EF388) | 0x0A0C5958 [gTexture7EF314_end](@ref gTexture7EF314_end) | 0x0A0C5958 [gTexture7EF388_end](@ref gTexture7EF388_end) | 0x0A0C59C8 [gTexture7EF3F8](@ref gTexture7EF3F8) | 0x0A0C59C8 -[gTexture7EF470](@ref gTexture7EF470) | 0x0A0C5A40 [gTexture7EF3F8_end](@ref gTexture7EF3F8_end) | 0x0A0C5A40 -[gTexture7EF470_end](@ref gTexture7EF470_end) | 0x0A0C5AB4 +[gTexture7EF470](@ref gTexture7EF470) | 0x0A0C5A40 [gTexture7EF4E4](@ref gTexture7EF4E4) | 0x0A0C5AB4 +[gTexture7EF470_end](@ref gTexture7EF470_end) | 0x0A0C5AB4 [gTexture7EF554](@ref gTexture7EF554) | 0x0A0C5B24 [gTexture7EF4E4_end](@ref gTexture7EF4E4_end) | 0x0A0C5B24 -[gTexture7EF5C0](@ref gTexture7EF5C0) | 0x0A0C5B90 [gTexture7EF554_end](@ref gTexture7EF554_end) | 0x0A0C5B90 +[gTexture7EF5C0](@ref gTexture7EF5C0) | 0x0A0C5B90 [gTexture7EF620](@ref gTexture7EF620) | 0x0A0C5BF0 [gTexture7EF5C0_end](@ref gTexture7EF5C0_end) | 0x0A0C5BF0 [gTexture7EF620_end](@ref gTexture7EF620_end) | 0x0A0C5C64 @@ -19215,20 +19215,20 @@ Variable Name | Memory Address [gTexture7EF77C](@ref gTexture7EF77C) | 0x0A0C5D4C [gTexture7EF7E8](@ref gTexture7EF7E8) | 0x0A0C5DB8 [gTexture7EF77C_end](@ref gTexture7EF77C_end) | 0x0A0C5DB8 -[gTexture7EF85C](@ref gTexture7EF85C) | 0x0A0C5E2C [gTexture7EF7E8_end](@ref gTexture7EF7E8_end) | 0x0A0C5E2C +[gTexture7EF85C](@ref gTexture7EF85C) | 0x0A0C5E2C [gTexture7EF8C8](@ref gTexture7EF8C8) | 0x0A0C5E98 [gTexture7EF85C_end](@ref gTexture7EF85C_end) | 0x0A0C5E98 [gTexture7EF93C](@ref gTexture7EF93C) | 0x0A0C5F0C [gTexture7EF8C8_end](@ref gTexture7EF8C8_end) | 0x0A0C5F0C -[gTexture7EF9B4](@ref gTexture7EF9B4) | 0x0A0C5F84 [gTexture7EF93C_end](@ref gTexture7EF93C_end) | 0x0A0C5F84 -[gTexture7EFA2C](@ref gTexture7EFA2C) | 0x0A0C5FFC +[gTexture7EF9B4](@ref gTexture7EF9B4) | 0x0A0C5F84 [gTexture7EF9B4_end](@ref gTexture7EF9B4_end) | 0x0A0C5FFC +[gTexture7EFA2C](@ref gTexture7EFA2C) | 0x0A0C5FFC [gTexture7EFA2C_end](@ref gTexture7EFA2C_end) | 0x0A0C6078 [gTexture7EFAA8](@ref gTexture7EFAA8) | 0x0A0C6078 -[gTexture7EFAA8_end](@ref gTexture7EFAA8_end) | 0x0A0C60D0 [gTexture7EFB00](@ref gTexture7EFB00) | 0x0A0C60D0 +[gTexture7EFAA8_end](@ref gTexture7EFAA8_end) | 0x0A0C60D0 [gTexture7EFB00_end](@ref gTexture7EFB00_end) | 0x0A0C6134 [gTexture7EFB64](@ref gTexture7EFB64) | 0x0A0C6134 [gTexture7EFB64_end](@ref gTexture7EFB64_end) | 0x0A0C618C @@ -19239,68 +19239,68 @@ Variable Name | Memory Address [gTexture7EFCAC](@ref gTexture7EFCAC) | 0x0A0C627C [gTexture7EFD00](@ref gTexture7EFD00) | 0x0A0C62D0 [gTexture7EFCAC_end](@ref gTexture7EFCAC_end) | 0x0A0C62D0 -[gTexture7EFD60](@ref gTexture7EFD60) | 0x0A0C6330 [gTexture7EFD00_end](@ref gTexture7EFD00_end) | 0x0A0C6330 +[gTexture7EFD60](@ref gTexture7EFD60) | 0x0A0C6330 [gTexture7EFDD4](@ref gTexture7EFDD4) | 0x0A0C63A4 [gTexture7EFD60_end](@ref gTexture7EFD60_end) | 0x0A0C63A4 [gTexture7EFE48](@ref gTexture7EFE48) | 0x0A0C6418 [gTexture7EFDD4_end](@ref gTexture7EFDD4_end) | 0x0A0C6418 [gTexture7EFE48_end](@ref gTexture7EFE48_end) | 0x0A0C6470 [gTexture7EFEA0](@ref gTexture7EFEA0) | 0x0A0C6470 -[gTexture7EFEA0_end](@ref gTexture7EFEA0_end) | 0x0A0C64FC [gTexture7EFF2C](@ref gTexture7EFF2C) | 0x0A0C64FC -[gTexture7EFF2C_end](@ref gTexture7EFF2C_end) | 0x0A0C6560 +[gTexture7EFEA0_end](@ref gTexture7EFEA0_end) | 0x0A0C64FC [gTexture7EFF90](@ref gTexture7EFF90) | 0x0A0C6560 -[gTexture7EFF90_end](@ref gTexture7EFF90_end) | 0x0A0C65D0 +[gTexture7EFF2C_end](@ref gTexture7EFF2C_end) | 0x0A0C6560 [gTexture7F0000](@ref gTexture7F0000) | 0x0A0C65D0 -[gTexture7F006C](@ref gTexture7F006C) | 0x0A0C663C +[gTexture7EFF90_end](@ref gTexture7EFF90_end) | 0x0A0C65D0 [gTexture7F0000_end](@ref gTexture7F0000_end) | 0x0A0C663C +[gTexture7F006C](@ref gTexture7F006C) | 0x0A0C663C [gTexture7F00D8](@ref gTexture7F00D8) | 0x0A0C66A8 [gTexture7F006C_end](@ref gTexture7F006C_end) | 0x0A0C66A8 [gTexture7F00D8_end](@ref gTexture7F00D8_end) | 0x0A0C6728 [gTexture7F0158](@ref gTexture7F0158) | 0x0A0C6728 [gTexture7F01D0](@ref gTexture7F01D0) | 0x0A0C67A0 [gTexture7F0158_end](@ref gTexture7F0158_end) | 0x0A0C67A0 -[gTexture7F01D0_end](@ref gTexture7F01D0_end) | 0x0A0C680C [gTexture7F023C](@ref gTexture7F023C) | 0x0A0C680C -[gTexture7F023C_end](@ref gTexture7F023C_end) | 0x0A0C6884 +[gTexture7F01D0_end](@ref gTexture7F01D0_end) | 0x0A0C680C [gTexture7F02B4](@ref gTexture7F02B4) | 0x0A0C6884 +[gTexture7F023C_end](@ref gTexture7F023C_end) | 0x0A0C6884 [gTexture7F02B4_end](@ref gTexture7F02B4_end) | 0x0A0C68FC [gTexture7F032C](@ref gTexture7F032C) | 0x0A0C68FC -[gTexture7F032C_end](@ref gTexture7F032C_end) | 0x0A0C6960 [gTexture7F0390](@ref gTexture7F0390) | 0x0A0C6960 +[gTexture7F032C_end](@ref gTexture7F032C_end) | 0x0A0C6960 [gTexture7F0404](@ref gTexture7F0404) | 0x0A0C69D4 [gTexture7F0390_end](@ref gTexture7F0390_end) | 0x0A0C69D4 [gTexture7F0470](@ref gTexture7F0470) | 0x0A0C6A40 [gTexture7F0404_end](@ref gTexture7F0404_end) | 0x0A0C6A40 -[gTexture7F0470_end](@ref gTexture7F0470_end) | 0x0A0C6ABC [gTexture7F04EC](@ref gTexture7F04EC) | 0x0A0C6ABC -[gTexture7F04EC_end](@ref gTexture7F04EC_end) | 0x0A0C6B2C +[gTexture7F0470_end](@ref gTexture7F0470_end) | 0x0A0C6ABC [gTexture7F055C](@ref gTexture7F055C) | 0x0A0C6B2C -[gTexture7F05F0](@ref gTexture7F05F0) | 0x0A0C6BC0 +[gTexture7F04EC_end](@ref gTexture7F04EC_end) | 0x0A0C6B2C [gTexture7F055C_end](@ref gTexture7F055C_end) | 0x0A0C6BC0 +[gTexture7F05F0](@ref gTexture7F05F0) | 0x0A0C6BC0 [gTexture7F0670](@ref gTexture7F0670) | 0x0A0C6C40 [gTexture7F05F0_end](@ref gTexture7F05F0_end) | 0x0A0C6C40 -[gTexture7F06EC](@ref gTexture7F06EC) | 0x0A0C6CBC [gTexture7F0670_end](@ref gTexture7F0670_end) | 0x0A0C6CBC +[gTexture7F06EC](@ref gTexture7F06EC) | 0x0A0C6CBC [gTexture7F06EC_end](@ref gTexture7F06EC_end) | 0x0A0C6D38 [gTexture7F0768](@ref gTexture7F0768) | 0x0A0C6D38 -[gTexture7F07E0](@ref gTexture7F07E0) | 0x0A0C6DB0 [gTexture7F0768_end](@ref gTexture7F0768_end) | 0x0A0C6DB0 +[gTexture7F07E0](@ref gTexture7F07E0) | 0x0A0C6DB0 [gTexture7F07E0_end](@ref gTexture7F07E0_end) | 0x0A0C6E28 [gTexture7F0858](@ref gTexture7F0858) | 0x0A0C6E28 -[gTexture7F08D8](@ref gTexture7F08D8) | 0x0A0C6EA8 [gTexture7F0858_end](@ref gTexture7F0858_end) | 0x0A0C6EA8 +[gTexture7F08D8](@ref gTexture7F08D8) | 0x0A0C6EA8 [gTexture7F0948](@ref gTexture7F0948) | 0x0A0C6F18 [gTexture7F08D8_end](@ref gTexture7F08D8_end) | 0x0A0C6F18 -[gTexture7F0948_end](@ref gTexture7F0948_end) | 0x0A0C6FA0 [gTexture7F09D0](@ref gTexture7F09D0) | 0x0A0C6FA0 +[gTexture7F0948_end](@ref gTexture7F0948_end) | 0x0A0C6FA0 [gTexture7F09D0_end](@ref gTexture7F09D0_end) | 0x0A0C700C [gTexture7F0A3C](@ref gTexture7F0A3C) | 0x0A0C700C [gTexture7F0A3C_end](@ref gTexture7F0A3C_end) | 0x0A0C708C [gTexture7F0ABC](@ref gTexture7F0ABC) | 0x0A0C708C -[gTexture7F0B34](@ref gTexture7F0B34) | 0x0A0C7104 [gTexture7F0ABC_end](@ref gTexture7F0ABC_end) | 0x0A0C7104 +[gTexture7F0B34](@ref gTexture7F0B34) | 0x0A0C7104 [gTexture7F0B34_end](@ref gTexture7F0B34_end) | 0x0A0C7180 [gTexture7F0BB0](@ref gTexture7F0BB0) | 0x0A0C7180 [gTexture7F0BB0_end](@ref gTexture7F0BB0_end) | 0x0A0C71F4 @@ -19309,24 +19309,24 @@ Variable Name | Memory Address [gTexture7F0C24_end](@ref gTexture7F0C24_end) | 0x0A0C7264 [gTexture7F0C94_end](@ref gTexture7F0C94_end) | 0x0A0C72DC [gTexture7F0D0C](@ref gTexture7F0D0C) | 0x0A0C72DC -[gTexture7F0D8C](@ref gTexture7F0D8C) | 0x0A0C735C [gTexture7F0D0C_end](@ref gTexture7F0D0C_end) | 0x0A0C735C -[gTexture7F0D8C_end](@ref gTexture7F0D8C_end) | 0x0A0C73BC +[gTexture7F0D8C](@ref gTexture7F0D8C) | 0x0A0C735C [gTexture7F0DEC](@ref gTexture7F0DEC) | 0x0A0C73BC +[gTexture7F0D8C_end](@ref gTexture7F0D8C_end) | 0x0A0C73BC [gTexture7F0E5C](@ref gTexture7F0E5C) | 0x0A0C742C [gTexture7F0DEC_end](@ref gTexture7F0DEC_end) | 0x0A0C742C -[gTexture7F0EE4](@ref gTexture7F0EE4) | 0x0A0C74B4 [gTexture7F0E5C_end](@ref gTexture7F0E5C_end) | 0x0A0C74B4 -[gTexture7F0EE4_end](@ref gTexture7F0EE4_end) | 0x0A0C752C +[gTexture7F0EE4](@ref gTexture7F0EE4) | 0x0A0C74B4 [gTexture7F0F5C](@ref gTexture7F0F5C) | 0x0A0C752C -[gTexture7F0FD8](@ref gTexture7F0FD8) | 0x0A0C75A8 +[gTexture7F0EE4_end](@ref gTexture7F0EE4_end) | 0x0A0C752C [gTexture7F0F5C_end](@ref gTexture7F0F5C_end) | 0x0A0C75A8 +[gTexture7F0FD8](@ref gTexture7F0FD8) | 0x0A0C75A8 [gTexture7F0FD8_end](@ref gTexture7F0FD8_end) | 0x0A0C7608 [gTexture7F1038](@ref gTexture7F1038) | 0x0A0C7608 -[gTexture7F1038_end](@ref gTexture7F1038_end) | 0x0A0C766C [gTexture7F109C](@ref gTexture7F109C) | 0x0A0C766C -[gTexture7F1124](@ref gTexture7F1124) | 0x0A0C76F4 +[gTexture7F1038_end](@ref gTexture7F1038_end) | 0x0A0C766C [gTexture7F109C_end](@ref gTexture7F109C_end) | 0x0A0C76F4 +[gTexture7F1124](@ref gTexture7F1124) | 0x0A0C76F4 [gTexture7F11F4](@ref gTexture7F11F4) | 0x0A0C77C4 [gTexture7F12C4](@ref gTexture7F12C4) | 0x0A0C7894 [gTexture7F1394](@ref gTexture7F1394) | 0x0A0C7964 @@ -19564,54 +19564,54 @@ Variable Name | Memory Address [gTexturePlayerSelect](@ref gTexturePlayerSelect) | 0x0B000000 [gTexturePlayerSelect_end](@ref gTexturePlayerSelect_end) | 0x0B000C00 [gTextureOption](@ref gTextureOption) | 0x0B000C00 -[gTextureOption_end](@ref gTextureOption_end) | 0x0B001500 [gTextureNameDK](@ref gTextureNameDK) | 0x0B001500 -[gTextureNameToad](@ref gTextureNameToad) | 0x0B001700 +[gTextureOption_end](@ref gTextureOption_end) | 0x0B001500 [gTextureNameDK_end](@ref gTextureNameDK_end) | 0x0B001700 +[gTextureNameToad](@ref gTextureNameToad) | 0x0B001700 [gTextureNameToad_end](@ref gTextureNameToad_end) | 0x0B001900 [gTextureNameBowser](@ref gTextureNameBowser) | 0x0B001900 -[gTextureNameLuigi](@ref gTextureNameLuigi) | 0x0B001B00 [gTextureNameBowser_end](@ref gTextureNameBowser_end) | 0x0B001B00 -[gTextureNameLuigi_end](@ref gTextureNameLuigi_end) | 0x0B001D00 +[gTextureNameLuigi](@ref gTextureNameLuigi) | 0x0B001B00 [gTextureNameMario](@ref gTextureNameMario) | 0x0B001D00 -[gTextureNameMario_end](@ref gTextureNameMario_end) | 0x0B001F00 +[gTextureNameLuigi_end](@ref gTextureNameLuigi_end) | 0x0B001D00 [gTextureNamePeach](@ref gTextureNamePeach) | 0x0B001F00 -[gTextureNamePeach_end](@ref gTextureNamePeach_end) | 0x0B002100 +[gTextureNameMario_end](@ref gTextureNameMario_end) | 0x0B001F00 [gTextureNameWario](@ref gTextureNameWario) | 0x0B002100 +[gTextureNamePeach_end](@ref gTextureNamePeach_end) | 0x0B002100 [gTextureNameYoshi](@ref gTextureNameYoshi) | 0x0B002300 [gTextureNameWario_end](@ref gTextureNameWario_end) | 0x0B002300 -[gTextureTitleMarioRaceway](@ref gTextureTitleMarioRaceway) | 0x0B002500 [gTextureNameYoshi_end](@ref gTextureNameYoshi_end) | 0x0B002500 +[gTextureTitleMarioRaceway](@ref gTextureTitleMarioRaceway) | 0x0B002500 [gTextureTitleChocoMountain](@ref gTextureTitleChocoMountain) | 0x0B002A00 [gTextureTitleMarioRaceway_end](@ref gTextureTitleMarioRaceway_end) | 0x0B002A00 -[gTextureTitleBowsersCastle](@ref gTextureTitleBowsersCastle) | 0x0B002F00 [gTextureTitleChocoMountain_end](@ref gTextureTitleChocoMountain_end) | 0x0B002F00 +[gTextureTitleBowsersCastle](@ref gTextureTitleBowsersCastle) | 0x0B002F00 [gTextureTitleBowsersCastle_end](@ref gTextureTitleBowsersCastle_end) | 0x0B003400 [gTextureTitleBansheeBoardwalk](@ref gTextureTitleBansheeBoardwalk) | 0x0B003400 -[gTextureTitleYoshiValley](@ref gTextureTitleYoshiValley) | 0x0B003A00 [gTextureTitleBansheeBoardwalk_end](@ref gTextureTitleBansheeBoardwalk_end) | 0x0B003A00 +[gTextureTitleYoshiValley](@ref gTextureTitleYoshiValley) | 0x0B003A00 [gTextureTitleYoshiValley_end](@ref gTextureTitleYoshiValley_end) | 0x0B003E00 [gTextureTitleFrappeSnowland](@ref gTextureTitleFrappeSnowland) | 0x0B003E00 -[gTextureTitleFrappeSnowland_end](@ref gTextureTitleFrappeSnowland_end) | 0x0B004300 [gTextureTitleKoopaTroopaBeach](@ref gTextureTitleKoopaTroopaBeach) | 0x0B004300 +[gTextureTitleFrappeSnowland_end](@ref gTextureTitleFrappeSnowland_end) | 0x0B004300 [gTextureTitleKoopaTroopaBeach_end](@ref gTextureTitleKoopaTroopaBeach_end) | 0x0B004800 [gTextureTitleRoyalRaceway](@ref gTextureTitleRoyalRaceway) | 0x0B004800 [gTextureTitleRoyalRaceway_end](@ref gTextureTitleRoyalRaceway_end) | 0x0B004C00 [gTextureTitleLuigiRaceway](@ref gTextureTitleLuigiRaceway) | 0x0B004C00 [gTextureTitleMooMooFarm](@ref gTextureTitleMooMooFarm) | 0x0B005000 [gTextureTitleLuigiRaceway_end](@ref gTextureTitleLuigiRaceway_end) | 0x0B005000 -[gTextureTitleToadsTurnpike](@ref gTextureTitleToadsTurnpike) | 0x0B005400 [gTextureTitleMooMooFarm_end](@ref gTextureTitleMooMooFarm_end) | 0x0B005400 -[gTextureTitleToadsTurnpike_end](@ref gTextureTitleToadsTurnpike_end) | 0x0B005900 +[gTextureTitleToadsTurnpike](@ref gTextureTitleToadsTurnpike) | 0x0B005400 [gTextureTitleKalimariDesert](@ref gTextureTitleKalimariDesert) | 0x0B005900 -[gTextureTitleSherbetLand](@ref gTextureTitleSherbetLand) | 0x0B005D00 +[gTextureTitleToadsTurnpike_end](@ref gTextureTitleToadsTurnpike_end) | 0x0B005900 [gTextureTitleKalimariDesert_end](@ref gTextureTitleKalimariDesert_end) | 0x0B005D00 -[gTextureTitleRainbowRoad](@ref gTextureTitleRainbowRoad) | 0x0B006100 +[gTextureTitleSherbetLand](@ref gTextureTitleSherbetLand) | 0x0B005D00 [gTextureTitleSherbetLand_end](@ref gTextureTitleSherbetLand_end) | 0x0B006100 +[gTextureTitleRainbowRoad](@ref gTextureTitleRainbowRoad) | 0x0B006100 [gTextureTitleWarioStadium](@ref gTextureTitleWarioStadium) | 0x0B006500 [gTextureTitleRainbowRoad_end](@ref gTextureTitleRainbowRoad_end) | 0x0B006500 -[gTextureTitleBlockFort](@ref gTextureTitleBlockFort) | 0x0B006A00 [gTextureTitleWarioStadium_end](@ref gTextureTitleWarioStadium_end) | 0x0B006A00 +[gTextureTitleBlockFort](@ref gTextureTitleBlockFort) | 0x0B006A00 [gTextureTitleBlockFort_end](@ref gTextureTitleBlockFort_end) | 0x0B006D00 [gTextureTitleSkyscraper](@ref gTextureTitleSkyscraper) | 0x0B006D00 [gTextureTitleDoubleDeck](@ref gTextureTitleDoubleDeck) | 0x0B007100 @@ -19626,22 +19626,22 @@ Variable Name | Memory Address [gTextureMapSelect_end](@ref gTextureMapSelect_end) | 0x0B008A00 [gTextureMenuMushroomCup](@ref gTextureMenuMushroomCup) | 0x0B008E00 [gTextureMenuFlowerCup_end](@ref gTextureMenuFlowerCup_end) | 0x0B008E00 -[gTextureMenuStarCup](@ref gTextureMenuStarCup) | 0x0B009200 [gTextureMenuMushroomCup_end](@ref gTextureMenuMushroomCup_end) | 0x0B009200 +[gTextureMenuStarCup](@ref gTextureMenuStarCup) | 0x0B009200 [gTextureMenuSpecialCup](@ref gTextureMenuSpecialCup) | 0x0B009600 [gTextureMenuStarCup_end](@ref gTextureMenuStarCup_end) | 0x0B009600 [gTextureGameSelect](@ref gTextureGameSelect) | 0x0B009A00 [gTextureMenuSpecialCup_end](@ref gTextureMenuSpecialCup_end) | 0x0B009A00 -[gTextureGameSelect_end](@ref gTextureGameSelect_end) | 0x0B00A600 [gTextureMenu1PGame](@ref gTextureMenu1PGame) | 0x0B00A600 -[gTextureMenu2PGame](@ref gTextureMenu2PGame) | 0x0B00AB00 +[gTextureGameSelect_end](@ref gTextureGameSelect_end) | 0x0B00A600 [gTextureMenu1PGame_end](@ref gTextureMenu1PGame_end) | 0x0B00AB00 -[gTextureMenu2PGame_end](@ref gTextureMenu2PGame_end) | 0x0B00B200 +[gTextureMenu2PGame](@ref gTextureMenu2PGame) | 0x0B00AB00 [gTextureMenu3PGame](@ref gTextureMenu3PGame) | 0x0B00B200 -[gTextureMenu3PGame_end](@ref gTextureMenu3PGame_end) | 0x0B00BC00 +[gTextureMenu2PGame_end](@ref gTextureMenu2PGame_end) | 0x0B00B200 [gTextureMenu4PGame](@ref gTextureMenu4PGame) | 0x0B00BC00 -[gTextureMenuModeBattle](@ref gTextureMenuModeBattle) | 0x0B00C700 +[gTextureMenu3PGame_end](@ref gTextureMenu3PGame_end) | 0x0B00BC00 [gTextureMenu4PGame_end](@ref gTextureMenu4PGame_end) | 0x0B00C700 +[gTextureMenuModeBattle](@ref gTextureMenuModeBattle) | 0x0B00C700 [gTextureMenuModeTimeTrials](@ref gTextureMenuModeTimeTrials) | 0x0B00CA00 [gTextureMenuModeBattle_end](@ref gTextureMenuModeBattle_end) | 0x0B00CA00 [gTextureMenuModeMarioGP](@ref gTextureMenuModeMarioGP) | 0x0B00CE00 @@ -19652,36 +19652,36 @@ Variable Name | Memory Address [gTextureMenuModeVS_end](@ref gTextureMenuModeVS_end) | 0x0B00D500 [gTextureMenuLOption_end](@ref gTextureMenuLOption_end) | 0x0B00D800 [gTextureMenuRData](@ref gTextureMenuRData) | 0x0B00D800 -[gTextureMenu50cc](@ref gTextureMenu50cc) | 0x0B00DB00 [gTextureMenuRData_end](@ref gTextureMenuRData_end) | 0x0B00DB00 -[gTextureMenu100cc](@ref gTextureMenu100cc) | 0x0B00DD00 +[gTextureMenu50cc](@ref gTextureMenu50cc) | 0x0B00DB00 [gTextureMenu50cc_end](@ref gTextureMenu50cc_end) | 0x0B00DD00 -[gTextureMenu100cc_end](@ref gTextureMenu100cc_end) | 0x0B00DF00 +[gTextureMenu100cc](@ref gTextureMenu100cc) | 0x0B00DD00 [gTextureMenu150cc](@ref gTextureMenu150cc) | 0x0B00DF00 +[gTextureMenu100cc_end](@ref gTextureMenu100cc_end) | 0x0B00DF00 [gTextureMenuExtra](@ref gTextureMenuExtra) | 0x0B00E100 [gTextureMenu150cc_end](@ref gTextureMenu150cc_end) | 0x0B00E100 [gTextureMenuWithoutItem](@ref gTextureMenuWithoutItem) | 0x0B00E300 [gTextureMenuExtra_end](@ref gTextureMenuExtra_end) | 0x0B00E300 [gTextureMenuWithoutItem_end](@ref gTextureMenuWithoutItem_end) | 0x0B00E600 [gTextureMenuWithItem](@ref gTextureMenuWithItem) | 0x0B00E600 -[gTextureMenuBegin](@ref gTextureMenuBegin) | 0x0B00E900 [gTextureMenuWithItem_end](@ref gTextureMenuWithItem_end) | 0x0B00E900 +[gTextureMenuBegin](@ref gTextureMenuBegin) | 0x0B00E900 [gTextureMenuGhost](@ref gTextureMenuGhost) | 0x0B00EB00 [gTextureMenuBegin_end](@ref gTextureMenuBegin_end) | 0x0B00EB00 [gTextureMenuData](@ref gTextureMenuData) | 0x0B00ED00 [gTextureMenuGhost_end](@ref gTextureMenuGhost_end) | 0x0B00ED00 [gTextureMenuData_end](@ref gTextureMenuData_end) | 0x0B00EF00 [gTextureMenuOK](@ref gTextureMenuOK) | 0x0B00EF00 -[gTextureMenuOK_end](@ref gTextureMenuOK_end) | 0x0B00F100 [gTextureBackgroundBlueSky](@ref gTextureBackgroundBlueSky) | 0x0B00F100 +[gTextureMenuOK_end](@ref gTextureMenuOK_end) | 0x0B00F100 [gTextureBackgroundBlueSky_end](@ref gTextureBackgroundBlueSky_end) | 0x0B01BF00 [gTextureBackgroundSunset](@ref gTextureBackgroundSunset) | 0x0B01BF00 -[gTextureBackgroundSunset_end](@ref gTextureBackgroundSunset_end) | 0x0B025300 [gTextureGreenGoldStripe](@ref gTextureGreenGoldStripe) | 0x0B025300 -[gTextureGreenGoldStripe_end](@ref gTextureGreenGoldStripe_end) | 0x0B025F00 +[gTextureBackgroundSunset_end](@ref gTextureBackgroundSunset_end) | 0x0B025300 [gTextureGoldStripe](@ref gTextureGoldStripe) | 0x0B025F00 -[gTextureGoldStripe_end](@ref gTextureGoldStripe_end) | 0x0B026600 +[gTextureGreenGoldStripe_end](@ref gTextureGreenGoldStripe_end) | 0x0B025F00 [gTextureWhiteStripe](@ref gTextureWhiteStripe) | 0x0B026600 +[gTextureGoldStripe_end](@ref gTextureGoldStripe_end) | 0x0B026600 [gTexturePinkBar](@ref gTexturePinkBar) | 0x0B026700 [gTextureWhiteStripe_end](@ref gTextureWhiteStripe_end) | 0x0B026700 [gTexturePinkBar_end](@ref gTexturePinkBar_end) | 0x0B026C00 @@ -19776,64 +19776,64 @@ Variable Name | Memory Address [d_course_big_donut_packed](@ref d_course_big_donut_packed) | 0x0F001B84 [music_sequence_table_header](@ref music_sequence_table_header) | 0x0025FD00 [music_sequence_table](@ref music_sequence_table) | 0x0025FD04 -[seq_00](@ref seq_00) | 0x0025FE00 [music_sequence_table_end](@ref music_sequence_table_end) | 0x0025FE00 +[seq_00](@ref seq_00) | 0x0025FE00 [seq_01](@ref seq_01) | 0x00262630 [seq_00_end](@ref seq_00_end) | 0x00262630 -[seq_01_end](@ref seq_01_end) | 0x00264160 [seq_02](@ref seq_02) | 0x00264160 +[seq_01_end](@ref seq_01_end) | 0x00264160 [seq_02_end](@ref seq_02_end) | 0x00264EC0 [seq_03](@ref seq_03) | 0x00264EC0 [seq_03_end](@ref seq_03_end) | 0x002668D0 [seq_04](@ref seq_04) | 0x002668D0 -[seq_05](@ref seq_05) | 0x00268570 [seq_04_end](@ref seq_04_end) | 0x00268570 +[seq_05](@ref seq_05) | 0x00268570 [seq_05_end](@ref seq_05_end) | 0x0026A4E0 [seq_06](@ref seq_06) | 0x0026A4E0 -[seq_07](@ref seq_07) | 0x0026C3C0 [seq_06_end](@ref seq_06_end) | 0x0026C3C0 +[seq_07](@ref seq_07) | 0x0026C3C0 [seq_07_end](@ref seq_07_end) | 0x0026DA90 [seq_08](@ref seq_08) | 0x0026DA90 -[seq_09](@ref seq_09) | 0x0026FE60 [seq_08_end](@ref seq_08_end) | 0x0026FE60 +[seq_09](@ref seq_09) | 0x0026FE60 [seq_09_end](@ref seq_09_end) | 0x00271660 [seq_0A](@ref seq_0A) | 0x00271660 [seq_0B](@ref seq_0B) | 0x00273140 [seq_0A_end](@ref seq_0A_end) | 0x00273140 [seq_0C](@ref seq_0C) | 0x00273730 [seq_0B_end](@ref seq_0B_end) | 0x00273730 -[seq_0C_end](@ref seq_0C_end) | 0x00273B00 [seq_0D](@ref seq_0D) | 0x00273B00 -[seq_0E](@ref seq_0E) | 0x00273E60 +[seq_0C_end](@ref seq_0C_end) | 0x00273B00 [seq_0D_end](@ref seq_0D_end) | 0x00273E60 +[seq_0E](@ref seq_0E) | 0x00273E60 [seq_0E_end](@ref seq_0E_end) | 0x00274140 [seq_0F](@ref seq_0F) | 0x00274140 [seq_0F_end](@ref seq_0F_end) | 0x00274600 [seq_10](@ref seq_10) | 0x00274600 [seq_10_end](@ref seq_10_end) | 0x00275A10 [seq_11](@ref seq_11) | 0x00275A10 -[seq_12](@ref seq_12) | 0x002760F0 [seq_11_end](@ref seq_11_end) | 0x002760F0 -[seq_12_end](@ref seq_12_end) | 0x002793E0 +[seq_12](@ref seq_12) | 0x002760F0 [seq_13](@ref seq_13) | 0x002793E0 +[seq_12_end](@ref seq_12_end) | 0x002793E0 [seq_14](@ref seq_14) | 0x00279AA0 [seq_13_end](@ref seq_13_end) | 0x00279AA0 [seq_15](@ref seq_15) | 0x00279F50 [seq_14_end](@ref seq_14_end) | 0x00279F50 -[seq_16](@ref seq_16) | 0x0027B0B0 [seq_15_end](@ref seq_15_end) | 0x0027B0B0 -[seq_16_end](@ref seq_16_end) | 0x0027B3C0 +[seq_16](@ref seq_16) | 0x0027B0B0 [seq_17](@ref seq_17) | 0x0027B3C0 +[seq_16_end](@ref seq_16_end) | 0x0027B3C0 [seq_17_end](@ref seq_17_end) | 0x0027C670 [seq_18](@ref seq_18) | 0x0027C670 [seq_19](@ref seq_19) | 0x0027CC70 [seq_18_end](@ref seq_18_end) | 0x0027CC70 -[seq_19_end](@ref seq_19_end) | 0x0027E350 [seq_1A](@ref seq_1A) | 0x0027E350 -[seq_1B](@ref seq_1B) | 0x0027EE20 +[seq_19_end](@ref seq_19_end) | 0x0027E350 [seq_1A_end](@ref seq_1A_end) | 0x0027EE20 -[seq_1C](@ref seq_1C) | 0x0027FAA0 +[seq_1B](@ref seq_1B) | 0x0027EE20 [seq_1B_end](@ref seq_1B_end) | 0x0027FAA0 +[seq_1C](@ref seq_1C) | 0x0027FAA0 [seq_1D](@ref seq_1D) | 0x002821F0 [seq_1C_end](@ref seq_1C_end) | 0x002821F0 [seq_1D_end](@ref seq_1D_end) | 0x00282E70 From 65f03934bb3abda83c33cebb9737fdf31f156236 Mon Sep 17 00:00:00 2001 From: Tyler McGavran Date: Sun, 24 Mar 2024 12:02:30 -0400 Subject: [PATCH 05/10] Update some attempts for audio/external (#585) Added some decompme links, also updated the attempt for a function that SpazzyLemon made progress on Signed-off-by: Taggerung Co-authored-by: Taggerung --- src/audio/external.c | 540 ++++++++++++++++--------------------------- src/audio/external.h | 11 +- src/code_800AF9B0.c | 37 +-- 3 files changed, 212 insertions(+), 376 deletions(-) diff --git a/src/audio/external.c b/src/audio/external.c index 66295fd0e..6b7408d64 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -32,7 +32,7 @@ u8 D_80192AB8[SOUND_BANK_COUNT][8][8]; u8 D_80192C38; ubool8 sSoundBankDisabled[SOUND_BANK_COUNT]; struct ChannelVolumeScaleFade D_80192C48[SOUND_BANK_COUNT]; -u8 D_80192CA8[3][10]; +struct_D_80192CA8_entry D_80192CA8[3][5]; u8 D_80192CC6[3]; u32 D_80192CD0[256]; struct_D_801930D0_entry D_801930D0[3]; @@ -315,6 +315,7 @@ s8 func_800C15D0(u8 bank, u8 soundId, u8 channel) { // This is likely functionally equivallent. #ifdef NON_MATCHING +// https://decomp.me/scratch/99CQl s8 func_800C16E8(f32 arg0, f32 arg1, u8 cameraId) { f32 var_f0; f32 var_f14; @@ -712,14 +713,20 @@ void func_800C2474(void) { } #ifdef NON_MATCHING +// https://decomp.me/scratch/B9kUf +// No idea what's up with this function. `arg1_copy` is a huge improvement but feels very silly +// Presumably there's some macro being used to do all the or'ing (creating soundbits), that might +// matter for match purposes void func_800C284C(u8 arg0, u8 arg1, u8 arg2, u16 arg3) { u8 var_v1; + u8 *arg1_copy = &arg1; if ((D_800EA1EC == 0) || (arg0 == 2)) { - func_800CBBB8(0x82000000 | (arg0 << 0x10) | (arg1 << 8), arg3); - D_801930D0[arg0].unk_248 = arg1 | (arg2 << 8); + if (1) {} + func_800CBBB8(0x82000000 | (arg0 << 0x10) | (*arg1_copy << 8), arg3); + D_801930D0[arg0].unk_248 = *arg1_copy | (arg2 << 8); if (D_801930D0[arg0].unk_000 != 1.0f) { - func_800CBB88((arg0 << 0x10) | 0x41000000, D_801930D0[arg0].unk_000); + func_800CBB88(0x41000000 | (arg0 << 0x10), D_801930D0[arg0].unk_000); } D_801930D0[arg0].unk_028 = 0; D_801930D0[arg0].unk_018 = 0; @@ -743,357 +750,196 @@ void func_800C29B4(u8 arg0, u16 arg1) { D_801930D0[arg0].unk_248 = 0xFFFF; } -#ifdef MIPS_TO_C -//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Oct-18-2023 +#ifdef NON_MATCHING +/** + * https://decomp.me/scratch/TS7EW + * The last big thing is the for loop in `case 10`. For some reason the 0 used for loop initialization is saved to 2 variables? + * I speculate that this is functionally equivalent although its hard to tell with all the register allocation differences + * `arg0` is almost certainly `soundbits`, so all the `why*` variables are probably the results of macros pulling out + * the different parts of the full sound specification. +**/ void func_800C2A2C(u32 arg0) { - u8 sp5B; - u32 sp4C; - s32 sp48; - s32 sp44; - s32 sp3C; - u8 *sp34; - f32 temp_f0; - f32 temp_f0_2; - f32 temp_f0_3; - f32 temp_f2; - f32 temp_f4; - f32 var_f16; - f32 var_f8; - s32 temp_a0; - s32 temp_a0_5; - s32 temp_a1; - s32 temp_a2_3; - s32 temp_a2_4; - s32 temp_a2_5; - s32 temp_a3; - s32 temp_a3_3; - s32 temp_at; - s32 temp_at_2; - s32 temp_t6_2; - s32 temp_t7_2; - s32 temp_t8_2; - s32 temp_t8_3; - s32 temp_t8_4; - s32 temp_t8_5; - s32 temp_t8_6; - s32 temp_t8_8; - s32 temp_v0_6; - s32 temp_v1; - s32 temp_v1_2; - s32 temp_v1_3; - s32 var_a1; - s32 var_a1_3; - s32 var_a3; - s32 var_t0; - s32 var_v0; - s32 var_v0_2; - s32 var_v1; - s32 var_v1_2; - s32 var_v1_3; - s32 var_v1_4; - s32 var_v1_5; - s8 var_a2; - struct_D_801930D0_entry *temp_a0_4; - struct_D_801930D0_entry *temp_t6_3; + u16 var_a3; + u16 var_a0; + s32 var_a2; + u8 var_a1; + u8 var_t0; + u8 var_v1; struct_D_801930D0_entry *temp_v0_3; - struct_D_801930D0_entry *temp_v0_5; - struct_D_801930D0_entry *temp_v0_7; - u32 temp_a3_2; - u32 temp_t6; - u32 temp_t6_4; - u32 temp_t7; - u32 temp_t8; - u32 temp_t8_7; - u32 temp_t9_2; - u32 var_a0; - u32 var_a1_2; - u8 *temp_a2; - u8 *temp_a2_2; - u8 *temp_t4; - u8 *temp_t4_2; - u8 *temp_v0_2; - u8 temp_t0; - u8 temp_t1; - u8 temp_t1_2; - u8 temp_t9; - u8 var_t0_2; - u8 var_t3; - u8 var_v1_6; - void *temp_a0_2; - void *temp_a0_3; - void *temp_a1_2; - void *temp_a1_3; - void *temp_v0; - void *temp_v0_4; + u8 test; + u8 why; + u16 why2; + u8 why3; + u8 why4; + u8 why5; + u8 temp_a1; - temp_t8 = (arg0 >> 0x1C) & 0xFF; - temp_t6 = (u32) (arg0 & 0x0F000000) >> 0x18; - temp_a1 = temp_t6 & 0xFF; - switch (temp_t8) { - case 0: - func_800C284C(temp_t6 & 0xFF, arg0 & 0xFF, ((u32) (arg0 & 0xFF00) >> 8) & 0xFF, ((u32) (arg0 & 0xFF0000) >> 0xD) & 0xFFFF); - return; - case 1: - func_800C29B4(temp_t6 & 0xFF, ((u32) (arg0 & 0xFF0000) >> 0xD) & 0xFFFF); - return; - case 2: - temp_t8_2 = temp_t6 & 0xFF; - temp_t4 = &D_80192CC6[temp_t8_2]; - sp3C = temp_t8_2; - temp_t1 = *temp_t4; - var_v1 = 0; - var_t3 = temp_t1; - if ((s32) temp_t1 > 0) { - temp_a0 = arg0 & 0xFF; - sp48 = temp_a0; - loop_6: - if (temp_a0 == *(D_80192CA8[temp_t8_2] + (var_v1 * 2))) { - if (var_v1 == 0) { - func_800C284C(unksp3F, unksp4B, ((u32) (arg0 & 0xFF00) >> 8) & 0xFF, ((u32) (arg0 & 0xFF0000) >> 0xD) & 0xFFFF); - return; - } - } else { - temp_t6_2 = (var_v1 + 1) & 0xFF; - var_v1 = temp_t6_2; - if (temp_t6_2 >= (s32) D_80192CC6[temp_a1]) { - var_v1 = 0; - goto block_11; - } - goto loop_6; + test = arg0 & 0xFF; + why = (arg0 & 0xFF00) >> 8; + why2 = (arg0 & 0xFF0000) >> 0xD; + why3 = (arg0 & 0xFF0000) >> 0xF; + why4 = (arg0 & 0xFF0000) >> 0x10; + why5 = (arg0 & 0xF00) >> 8; + temp_a1 = (arg0 & 0x0F000000) >> 0x18; + switch ((arg0 >> 0x1C) & 0xFF) { + case 0: + func_800C284C(temp_a1, arg0 & 0xFF, why, why2); + break; + case 1: + func_800C29B4(temp_a1, why2); + break; + case 2: + for (var_v1 = 0; var_v1 < D_80192CC6[temp_a1]; var_v1++) { + if (test == D_80192CA8[temp_a1][var_v1].thing0) { + if (var_v1 == 0) { + func_800C284C(temp_a1, test, why, why2); } + return; + } + } + var_t0 = D_80192CC6[temp_a1]; + for (var_v1 = 0; var_v1 < D_80192CC6[temp_a1]; var_v1++) { + if (why >= D_80192CA8[temp_a1][var_v1].thing1) { + var_t0 = var_v1; + var_v1 = D_80192CC6[temp_a1]; + } + } + if ((var_t0 != D_80192CC6[temp_a1]) || (var_t0 == 0)) { + if (D_80192CC6[temp_a1] < 5) { + D_80192CC6[temp_a1]++; + } + for (var_v1 = D_80192CC6[temp_a1] - 1; var_v1 != var_t0; var_v1--) { + D_80192CA8[temp_a1][var_v1].thing1 = D_80192CA8[temp_a1][var_v1 - 1].thing1; + D_80192CA8[temp_a1][var_v1].thing0 = D_80192CA8[temp_a1][var_v1 - 1].thing0; + } + D_80192CA8[temp_a1][var_t0].thing1 = why; + D_80192CA8[temp_a1][var_t0].thing0 = test; + } + if (var_t0 == 0) { + func_800C284C(temp_a1, test, why, why2); + } + break; + case 3: + var_t0 = D_80192CC6[temp_a1]; + for (var_v1 = 0; var_v1 < D_80192CC6[temp_a1]; var_v1++) { + if (test == D_80192CA8[temp_a1][var_v1].thing0) { + var_t0 = var_v1; + var_v1 = D_80192CC6[temp_a1]; + } + } + if (var_t0 != D_80192CC6[temp_a1]) { + for (var_v1 = var_t0; var_v1 < D_80192CC6[temp_a1] - 1; var_v1++) { + D_80192CA8[temp_a1][var_v1].thing1 = D_80192CA8[temp_a1][var_v1 + 1].thing1; + D_80192CA8[temp_a1][var_v1].thing0 = D_80192CA8[temp_a1][var_v1 + 1].thing0; + } + D_80192CC6[temp_a1]--; + } + if (var_t0 == 0) { + func_800C29B4(temp_a1, why2); + if (D_80192CC6[temp_a1] != 0) { + func_800C284C(temp_a1, D_80192CA8[temp_a1][0].thing0, D_80192CA8[temp_a1][0].thing1, why2); + } + } + break; + case 4: + var_a1 = why3; + if (var_a1 == 0) { + var_a1++; + } + + temp_v0_3 = &D_801930D0[temp_a1 & 0xFF]; + temp_v0_3->unk_004 = (arg0 & 0xFF) / 127.0f; + if (temp_v0_3->unk_000 != temp_v0_3->unk_004) { + temp_v0_3->unk_008 = (temp_v0_3->unk_000 - temp_v0_3->unk_004) / var_a1; + temp_v0_3->unk_00C = var_a1; + } + break; + case 5: + var_a1 = why3; + if (var_a1 == 0) { + var_a1++; + } + + temp_v0_3 = &D_801930D0[var_a1 & 0xFF]; + for (var_v1 = 0; var_v1 < 0x10; var_v1++) { + temp_v0_3->unk_044[var_v1].unk_14 = ((arg0 & 0xFFFF) / 1000.0f); + temp_v0_3->unk_044[var_v1].unk_18 = (temp_v0_3->unk_044[var_v1].unk_10 - temp_v0_3->unk_044[var_v1].unk_14) / var_a1; + temp_v0_3->unk_044[var_v1].unk_1C = var_a1; + } + D_801930D0[var_a1].unk_244 = 0xFFFF; + break; + case 6: + var_a1 = why3; + if (var_a1 == 0) { + var_a1++; + } + var_v1 = ((arg0 & 0xF00) >> 8) & 0xFF; + + D_801930D0[var_a1 & 0xFF].unk_044[var_v1].unk_04 = test / 127.0f; + if (D_801930D0[var_a1 & 0xFF].unk_044[var_v1].unk_00 != D_801930D0[var_a1 & 0xFF].unk_044[var_v1].unk_04) { + D_801930D0[var_a1 & 0xFF].unk_044[var_v1].unk_08 = (D_801930D0[var_a1 & 0xFF].unk_044[var_v1].unk_00 - D_801930D0[var_a1 & 0xFF].unk_044[var_v1].unk_04) / var_a1; + D_801930D0[var_a1 & 0xFF].unk_044[var_v1].unk_0C = var_a1; + D_801930D0[var_a1 & 0xFF].unk_244 |= 1 << var_v1; + } + break; + case 7: + func_800CBBE8(0x46000000 | (temp_a1 & 0xFF) << 0x10 | (why4 & 0xFF) << 8, (u64)arg0); + break; + case 8: + if (!(D_801930D0[temp_a1].unk_24A & (1 << why5))) { + func_800CBBE8(0x06000000 | ((temp_a1 & 0xFF) << 0x10) | (why5 & 0xFF) << 8 | (why4 & 0xFF), (u64)arg0); + } + break; + case 9: + D_801930D0[temp_a1].unk_24A = arg0; + break; + case 10: + var_a0 = 1; + var_a3 = arg0 & 0xFFFF; + for (var_v1 = 0; var_v1 < 0x10; var_v1++) { + if (var_a3 & var_a0) { + var_a2 = 1; } else { - block_11: - var_t0 = temp_t1 & 0xFF; - if ((s32) var_t3 > 0) { - do { - if ((((u32) (arg0 & 0xFF00) >> 8) & 0xFF) >= (s32) (D_80192CA8[sp3C] + (var_v1 * 2))->unk1) { - var_t0 = var_v1 & 0xFF; - var_v1 = temp_t1 & 0xFF; - } - temp_t8_3 = (var_v1 + 1) & 0xFF; - var_v1 = temp_t8_3; - } while (temp_t8_3 < (s32) D_80192CC6[temp_a1]); - } - if ((var_t0 != var_t3) || (var_t0 == 0)) { - temp_a2 = D_80192CA8[sp3C]; - if ((s32) var_t3 < 5) { - temp_t9 = temp_t1 + 1; - *temp_t4 = temp_t9; - var_t3 = temp_t9 & 0xFF; - } - var_v0 = (var_t3 - 1) & 0xFF; - var_v1_2 = var_v0; - if (var_t0 != var_v0) { - do { - temp_a1_2 = temp_a2 + (var_v0 * 2); - temp_a0_2 = temp_a2 + (var_v1_2 * 2); - temp_a0_2->unk1 = (u8) temp_a1_2->unk-1; - var_v0 = (var_v1_2 - 1) & 0xFF; - var_v1_2 = var_v0; - temp_a0_2->unk0 = (u8) temp_a1_2->unk-2; - } while (var_t0 != var_v0); - } - temp_v0 = temp_a2 + (var_t0 * 2); - temp_v0->unk1 = (s8) (((u32) (arg0 & 0xFF00) >> 8) & 0xFF); - temp_v0->unk0 = (s8) (arg0 & 0xFF); - } - if (var_t0 == 0) { - func_800C284C(unksp3F, arg0 & 0xFF, ((u32) (arg0 & 0xFF00) >> 8) & 0xFF, ((u32) (arg0 & 0xFF0000) >> 0xD) & 0xFFFF); - return; - } - default: - return; + var_a2 = 0; } + func_800CBBE8(((temp_a1 & 0xFF) << 0x10) | 0x08000000 | ((var_v1 & 0xFF) << 8), var_a2); + var_a0 *= 2; + } + break; + case 11: + D_801930D0[temp_a1].unk_014 = arg0; + break; + case 12: + temp_v0_3 = &D_801930D0[temp_a1 & 0xFF]; + if ((((arg0 & 0xF00000) >> 0x14) & 0xFF) != 0xF) { + var_t0 = temp_v0_3->unk_041++; + if (var_t0 < 5) { + temp_v0_3->unk_02C[var_t0] = arg0; + temp_v0_3->unk_040 = 2; + } + } else { + temp_v0_3->unk_041 = 0; + } + break; + case 14: + switch (why5) { /* switch 1; irregular */ + case 0: /* switch 1 */ + func_800CBBB8(0xF0000000U, D_800EA1F0[arg0 & 0xFF]); break; - case 3: - temp_t8_4 = temp_t6 & 0xFF; - temp_t4_2 = &D_80192CC6[temp_t8_4]; - sp3C = temp_t8_4; - temp_t1_2 = *temp_t4_2; - var_v1_3 = 0; - var_t0_2 = temp_t1_2; - if ((s32) temp_t1_2 > 0) { - do { - if ((arg0 & 0xFF) == *(D_80192CA8[temp_t8_4] + (var_v1_3 * 2))) { - var_t0_2 = var_v1_3 & 0xFF; - var_v1_3 = temp_t1_2 & 0xFF; - } - temp_t8_5 = (var_v1_3 + 1) & 0xFF; - var_v1_3 = temp_t8_5; - } while (temp_t8_5 < (s32) D_80192CC6[temp_a1]); - } - if (var_t0_2 != temp_t1_2) { - temp_a3 = temp_t1_2 - 1; - var_v1_4 = var_t0_2 & 0xFF; - if ((s32) var_t0_2 < temp_a3) { - temp_a2_2 = D_80192CA8[sp3C]; - var_v0_2 = var_v1_4; - do { - temp_a1_3 = temp_a2_2 + (var_v0_2 * 2); - temp_a0_3 = temp_a2_2 + (var_v1_4 * 2); - temp_a0_3->unk1 = (u8) temp_a1_3->unk3; - var_v0_2 = (var_v1_4 + 1) & 0xFF; - var_v1_4 = var_v0_2; - temp_a0_3->unk0 = (u8) temp_a1_3->unk2; - } while (var_v0_2 < temp_a3); - } - *temp_t4_2 = temp_t1_2 - 1; - } - if (var_t0_2 == 0) { - temp_a3_2 = ((u32) (arg0 & 0xFF0000) >> 0xD) & 0xFFFF; - sp4C = temp_a3_2; - sp34 = temp_t4_2; - func_800C29B4(unksp3F, temp_a3_2 & 0xFFFF); - if (*temp_t4_2 != 0) { - temp_v0_2 = D_80192CA8[sp3C]; - func_800C284C((u8) sp3C, temp_v0_2->unk0, temp_v0_2->unk1, (u16) temp_a3_2); - return; - } - } - break; - case 4: - temp_t9_2 = (u32) (arg0 & 0xFF0000) >> 0xF; - temp_v1 = temp_t9_2 & 0xFF; - var_a1 = temp_t9_2 & 0xFF; - if (temp_v1 == 0) { - var_a1 = (temp_v1 + 1) & 0xFF; - } - temp_v0_3 = &D_801930D0[temp_t6 & 0xFF]; - temp_f2 = temp_v0_3->unk_000; - temp_f0 = (f32) (arg0 & 0xFF) / 127.0f; - temp_v0_3->unk_004 = temp_f0; - if (temp_f2 != temp_f0) { - var_f8 = (f32) var_a1; - if (var_a1 < 0) { - var_f8 += 4294967296.0f; - } - temp_v0_3->unk_00C = (u16) var_a1; - temp_v0_3->unk_008 = (temp_f2 - temp_v0_3->unk_004) / var_f8; - return; - } - break; - case 5: - temp_t7 = (u32) (arg0 & 0xFF0000) >> 0xF; - temp_v1_2 = temp_t7 & 0xFF; - var_a1_2 = temp_t7 & 0xFF; - if (temp_v1_2 == 0) { - var_a1_2 = (temp_v1_2 + 1) & 0xFF; - } - var_v1_5 = 0; - temp_a2_3 = temp_t6 & 0xFF; - temp_a0_4 = &D_801930D0[temp_a2_3]; - temp_f0_2 = (f32) (arg0 & 0xFFFF) / 1000.0f; - do { - temp_v0_4 = temp_a0_4 + (var_v1_5 << 5); - temp_t8_6 = (var_v1_5 + 1) & 0xFF; - temp_f4 = temp_a0_4->unk_044[var_v1_5].unk_10 - temp_f0_2; - temp_at = temp_t8_6 < 0x10; - var_v1_5 = temp_t8_6; - temp_v0_4->unk58 = temp_f0_2; - temp_v0_4->unk60 = (s16) var_a1_2; - temp_v0_4->unk5C = (f32) (temp_f4 / (f32) var_a1_2); - } while (temp_at != 0); - D_801930D0[temp_a2_3].unk_244 = 0xFFFF; - return; - case 6: - temp_t8_7 = (u32) (arg0 & 0xFF0000) >> 0xF; - temp_v1_3 = temp_t8_7 & 0xFF; - var_a1_3 = temp_t8_7 & 0xFF; - if (temp_v1_3 == 0) { - var_a1_3 = (temp_v1_3 + 1) & 0xFF; - } - temp_a3_3 = temp_t6 & 0xFF; - temp_a2_4 = ((u32) (arg0 & 0xF00) >> 8) & 0xFF; - temp_t6_3 = &D_801930D0[temp_a3_3]; - temp_f0_3 = (f32) (arg0 & 0xFF) / 127.0f; - temp_t6_3->unk_044[temp_a2_4].unk4 = temp_f0_3; - if (temp_t6_3->unk_044[temp_a2_4].unk_00 != temp_f0_3) { - temp_v0_5 = &D_801930D0[temp_a3_3]; - var_f16 = (f32) var_a1_3; - if (var_a1_3 < 0) { - var_f16 += 4294967296.0f; - } - temp_v0_5->unk_044[temp_a2_4].unk_0C = (u16) var_a1_3; - temp_v0_5->unk_044[temp_a2_4].unk_08 = (temp_v0_5->unk_044[temp_a2_4].unk_00 - temp_v0_5->unk_044[temp_a2_4].unk4) / var_f16; - temp_v0_5->unk_244 |= 1 << temp_a2_4; - return; - } - break; - case 7: - func_800CBBE8(((temp_t6 & 0xFF) << 0x10) | 0x46000000 | ((((u32) (arg0 & 0xFF0000) >> 0x10) & 0xFF) << 8), (s8) arg0); - return; - case 8: - temp_v0_6 = temp_t6 & 0xFF; - temp_a2_5 = ((u32) (arg0 & 0xF00) >> 8) & 0xFF; - if (!(D_801930D0[temp_v0_6].unk_24A & (1 << temp_a2_5))) { - func_800CBBE8(((temp_v0_6 & 0xFF) << 0x10) | 0x06000000 | ((temp_a2_5 & 0xFF) << 8) | (((u32) (arg0 & 0xFF0000) >> 0x10) & 0xFF), (s8) arg0); - return; - } - break; - case 9: - D_801930D0[temp_t6 & 0xFF].unk_24A = arg0; - return; - case 10: - var_a0 = 1; - sp48 = ((temp_t6 & 0xFF) << 0x10) | 0x08000000; - var_a3 = arg0 & 0xFFFF; - var_v1_6 = 0; - do { - if (var_a3 & var_a0) { - var_a2 = 1; - } else { - var_a2 = 0; - } - sp4C = var_a0; - sp5B = var_v1_6; - sp44 = var_a3; - func_800CBBE8(sp48 | ((var_v1_6 & 0xFF) << 8), var_a2); - temp_t8_8 = (var_v1_6 + 1) & 0xFF; - temp_at_2 = temp_t8_8 < 0x10; - var_v1_6 = (u8) temp_t8_8; - var_a0 = (var_a0 * 2) & 0xFFFF; - } while (temp_at_2 != 0); - return; - case 11: - D_801930D0[temp_t6 & 0xFF].unk_014 = (s32) arg0; - return; - case 12: - if ((((u32) (arg0 & 0xF00000) >> 0x14) & 0xFF) != 0xF) { - temp_v0_7 = &D_801930D0[temp_t6 & 0xFF]; - temp_t0 = temp_v0_7->unk_041; - temp_v0_7->unk_041 = temp_t0 + 1; - if ((s32) temp_t0 < 5) { - temp_v0_7->unk_02C[temp_t0] = (u32) arg0; - temp_v0_7->unk_040 = 2; - return; - } - } else { - D_801930D0[temp_t6 & 0xFF].unk_041 = 0; - return; - } - break; - case 14: - temp_t7_2 = ((u32) (arg0 & 0xF00) >> 8) & 0xFF; - switch (temp_t7_2) { /* switch 1; irregular */ - case 0: /* switch 1 */ - func_800CBBB8(0xF0000000U, (u32) D_800EA1F0[arg0 & 0xFF]); - return; - case 1: /* switch 1 */ - D_800EA1EC = arg0 & 1; - return; - } - break; - case 15: - temp_t6_4 = (u32) (arg0 & 0xFF00) >> 8; - D_800EA1C0 = (u8) temp_t6_4; - temp_a0_5 = arg0 & 0xFF; - sp48 = temp_a0_5; - sp4C = temp_t6_4; - audio_reset_session_eu((void *) temp_a0_5); - *D_800EA1F4 = (u8) sp48; - func_800CBBE8(0x46020000U, (s8) sp4C); - func_800C5C40(); + case 1: /* switch 1 */ + D_800EA1EC = arg0 & 1; break; + } + break; + case 15: + D_800EA1C0 = (arg0 & 0xFF00) >> 8; + audio_reset_session_eu((void *) test); + D_800EA1F4[0] = test; + func_800CBBE8(0x46020000U, why); + func_800C5C40(); + break; + default: + break; } } #else diff --git a/src/audio/external.h b/src/audio/external.h index caf2455bf..14c4c7640 100644 --- a/src/audio/external.h +++ b/src/audio/external.h @@ -126,13 +126,13 @@ struct Unk_800EA06C { typedef struct { /* 0x00 */ f32 unk_00; - /* 0x04 */ u16 unk_04; + /* 0x04 */ f32 unk_04; /* 0x06 */ // u16 compilerPadding; /* 0x08 */ f32 unk_08; /* 0x0C */ u16 unk_0C; /* 0x0E */ // u16 compilerPadding; /* 0x10 */ f32 unk_10; - /* 0x14 */ u16 unk_14; + /* 0x14 */ f32 unk_14; /* 0x16 */ // u16 compilerPadding; /* 0x18 */ f32 unk_18; /* 0x1C */ u16 unk_1C; @@ -188,6 +188,11 @@ typedef struct { u8 unk9; } UnkStruct8018EF18; // size = 0xC +typedef struct { + u8 thing0; + u8 thing1; +} struct_D_80192CA8_entry; + /** @cond */ void func_800C94A4(u8); @@ -342,7 +347,7 @@ extern u8 D_80192AB8[SOUND_BANK_COUNT][8][8]; extern u8 D_80192C38; extern u8 sSoundBankDisabled[SOUND_BANK_COUNT]; extern struct ChannelVolumeScaleFade D_80192C48[SOUND_BANK_COUNT]; -extern u8 D_80192CA8[3][10]; +extern struct_D_80192CA8_entry D_80192CA8[3][5]; extern u8 D_80192CC6[3]; extern u32 D_80192CD0[256]; extern struct_D_801930D0_entry D_801930D0[3]; diff --git a/src/code_800AF9B0.c b/src/code_800AF9B0.c index f7b64c056..a719a7adb 100644 --- a/src/code_800AF9B0.c +++ b/src/code_800AF9B0.c @@ -196,11 +196,12 @@ void func_800AFF58(Vtx *arg0) { } #ifdef NON_MATCHING +// Credit to SpazzyLemon for the updated and better attempt void func_800B0004(void) { + Vtx* vtxs; + s32 res1, res2; + UNUSED u32 pad[0x5]; s32 i, j; - Vtx *spBC; - UNUSED u32 pad[0x10]; - u32 sp64; // offset? gSPLight(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_800E8688), LIGHT_1); gSPLight(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_800E8680), LIGHT_2); @@ -210,34 +211,18 @@ void func_800B0004(void) { gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING); - spBC = D_8018EDB4 % 2 ? (void *)D_8018EDB8 : (void *)D_8018EDBC; - + vtxs = D_8018EDB4 % 2 ? D_8018EDB8 : D_8018EDBC; D_8018EDB2 = 0x9C0; - - for (i = 0, sp64 = 0; i < 10; i++, sp64 += 0x30) { - // L800B018C + for (i = 0; i < 10; i++) { for (j = 0; j < 12; j++) { - f32 res1, res2; - // L800B01A0 - res1 = sins((u16)(D_8018EDB0 - (j * D_8018EDB2))) * 84.0f * (f32)j * 0.18f; - res2 = sins((u16)(D_8018EDB0 - ((j+1) * D_8018EDB2))) * 84.0f * (f32)(j+1) * 0.18f; - func_800AF9E4( - spBC + j + sp64, - j, - i, - 84, - res1, - res2, - j * 84, - 84 - ); + res1 = sins(D_8018EDB0 - (j * D_8018EDB2)) * 84.0f * j * 0.18f; + res2 = sins(D_8018EDB0 - ((j + 1) * D_8018EDB2)) * 84.0f * (j + 1) * 0.18f; + func_800AF9E4(&(&vtxs[j * 4])[i * 48], j, i, 84, res1, res2, (j * 84), 84); } } - // will probably have to retype this function - func_800AFF58((void *)spBC); + func_800AFF58(vtxs); D_8018EDB0 += D_8018EDB2; - D_8018EDB4 += 1; - + ++D_8018EDB4; gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); gSPNumLights(gDisplayListHead++, NUMLIGHTS_1); gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); From 893ecbe83862528e98b674532cf6024b30df6a54 Mon Sep 17 00:00:00 2001 From: Tyler McGavran Date: Mon, 25 Mar 2024 13:25:13 -0400 Subject: [PATCH 06/10] Turn D_802BFB80 into a union (#582) * Turn D_802BFB80 into a union As much as I hate it, it does make more matches possible Got a few more, unrelated matches Signed-off-by: Taggerung * Update based on comment Signed-off-by: Taggerung * Update to address comment Signed-off-by: Taggerung --------- Signed-off-by: Taggerung Co-authored-by: Taggerung --- .../code_80091750/func_80099958.s | 79 -- .../code_80091750/func_80099EC4.s | 74 -- .../code_80091750/func_8009C708.s | 143 ---- .../code_80091750/func_800A0B80.s | 172 ----- .../code_80091750/func_800A54EC.s | 154 ---- .../code_80091750/func_800A5738.s | 678 ------------------ permuter_settings.toml | 2 +- src/buffers.h | 18 +- src/code_80091750.c | 453 ++++++------ src/code_80091750.h | 10 + src/data/buffers.c | 2 +- src/render_player.c | 32 +- src/spawn_players.c | 4 +- src/staff_ghosts.c | 20 +- tools/doxygen_syms.md | 14 +- 15 files changed, 268 insertions(+), 1587 deletions(-) delete mode 100644 asm/non_matchings/code_80091750/func_80099958.s delete mode 100644 asm/non_matchings/code_80091750/func_8009C708.s delete mode 100644 asm/non_matchings/code_80091750/func_800A0B80.s delete mode 100644 asm/non_matchings/code_80091750/func_800A54EC.s delete mode 100644 asm/non_matchings/code_80091750/func_800A5738.s diff --git a/asm/non_matchings/code_80091750/func_80099958.s b/asm/non_matchings/code_80091750/func_80099958.s deleted file mode 100644 index 93cefabb3..000000000 --- a/asm/non_matchings/code_80091750/func_80099958.s +++ /dev/null @@ -1,79 +0,0 @@ -glabel func_80099958 -/* 09A558 80099958 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 09A55C 8009995C AFBF0024 */ sw $ra, 0x24($sp) -/* 09A560 80099960 AFB1001C */ sw $s1, 0x1c($sp) -/* 09A564 80099964 00A08825 */ move $s1, $a1 -/* 09A568 80099968 AFB20020 */ sw $s2, 0x20($sp) -/* 09A56C 8009996C AFB00018 */ sw $s0, 0x18($sp) -/* 09A570 80099970 0C026449 */ jal segmented_to_virtual_dupe -/* 09A574 80099974 AFA60030 */ sw $a2, 0x30($sp) -/* 09A578 80099978 8C4E0004 */ lw $t6, 4($v0) -/* 09A57C 8009997C 00408025 */ move $s0, $v0 -/* 09A580 80099980 8FAF0030 */ lw $t7, 0x30($sp) -/* 09A584 80099984 11C00034 */ beqz $t6, .L80099A58 -/* 09A588 80099988 01C02025 */ move $a0, $t6 -/* 09A58C 8009998C 000FC400 */ sll $t8, $t7, 0x10 -/* 09A590 80099990 06210003 */ bgez $s1, .L800999A0 -/* 09A594 80099994 0011C843 */ sra $t9, $s1, 1 -/* 09A598 80099998 26210001 */ addiu $at, $s1, 1 -/* 09A59C 8009999C 0001C843 */ sra $t9, $at, 1 -.L800999A0: -/* 09A5A0 800999A0 001943C0 */ sll $t0, $t9, 0xf -/* 09A5A4 800999A4 03084821 */ addu $t1, $t8, $t0 -/* 09A5A8 800999A8 06210004 */ bgez $s1, .L800999BC -/* 09A5AC 800999AC 322A0001 */ andi $t2, $s1, 1 -/* 09A5B0 800999B0 11400002 */ beqz $t2, .L800999BC -/* 09A5B4 800999B4 00000000 */ nop -/* 09A5B8 800999B8 254AFFFE */ addiu $t2, $t2, -2 -.L800999BC: -/* 09A5BC 800999BC 000A5B40 */ sll $t3, $t2, 0xd -/* 09A5C0 800999C0 012B6021 */ addu $t4, $t1, $t3 -/* 09A5C4 800999C4 3C0E802C */ lui $t6, %hi(D_802BFB80) # $t6, 0x802c -/* 09A5C8 800999C8 25CEFB80 */ addiu $t6, %lo(D_802BFB80) # addiu $t6, $t6, -0x480 -/* 09A5CC 800999CC 258D4000 */ addiu $t5, $t4, 0x4000 -/* 09A5D0 800999D0 3C118019 */ lui $s1, %hi(D_8018D9B4) # $s1, 0x8019 -/* 09A5D4 800999D4 2631D9B4 */ addiu $s1, %lo(D_8018D9B4) # addiu $s1, $s1, -0x264c -/* 09A5D8 800999D8 01AE9021 */ addu $s2, $t5, $t6 -/* 09A5DC 800999DC 96020010 */ lhu $v0, 0x10($s0) -.L800999E0: -/* 09A5E0 800999E0 24051400 */ li $a1, 5120 -/* 09A5E4 800999E4 10400003 */ beqz $v0, .L800999F4 -/* 09A5E8 800999E8 00000000 */ nop -/* 09A5EC 800999EC 10000001 */ b .L800999F4 -/* 09A5F0 800999F0 3045FFFF */ andi $a1, $v0, 0xffff -.L800999F4: -/* 09A5F4 800999F4 00A01025 */ move $v0, $a1 -/* 09A5F8 800999F8 04410004 */ bgez $v0, .L80099A0C -/* 09A5FC 800999FC 304F0007 */ andi $t7, $v0, 7 -/* 09A600 80099A00 11E00002 */ beqz $t7, .L80099A0C -/* 09A604 80099A04 00000000 */ nop -/* 09A608 80099A08 25EFFFF8 */ addiu $t7, $t7, -8 -.L80099A0C: -/* 09A60C 80099A0C 11E00009 */ beqz $t7, .L80099A34 -/* 09A610 80099A10 00000000 */ nop -/* 09A614 80099A14 04410003 */ bgez $v0, .L80099A24 -/* 09A618 80099A18 000228C3 */ sra $a1, $v0, 3 -/* 09A61C 80099A1C 24410007 */ addiu $at, $v0, 7 -/* 09A620 80099A20 000128C3 */ sra $a1, $at, 3 -.L80099A24: -/* 09A624 80099A24 0005C8C0 */ sll $t9, $a1, 3 -/* 09A628 80099A28 27250008 */ addiu $a1, $t9, 8 -/* 09A62C 80099A2C 30B8FFFF */ andi $t8, $a1, 0xffff -/* 09A630 80099A30 03002825 */ move $a1, $t8 -.L80099A34: -/* 09A634 80099A34 0C026400 */ jal dma_copy_base_729a30 -/* 09A638 80099A38 8E260000 */ lw $a2, ($s1) -/* 09A63C 80099A3C 8E240000 */ lw $a0, ($s1) -/* 09A640 80099A40 0C010034 */ jal mio0decode -/* 09A644 80099A44 02402825 */ move $a1, $s2 -/* 09A648 80099A48 8E040018 */ lw $a0, 0x18($s0) -/* 09A64C 80099A4C 26100014 */ addiu $s0, $s0, 0x14 -/* 09A650 80099A50 5480FFE3 */ bnel $a0, $zero, .L800999E0 -/* 09A654 80099A54 96020010 */ lhu $v0, 0x10($s0) -.L80099A58: -/* 09A658 80099A58 8FBF0024 */ lw $ra, 0x24($sp) -/* 09A65C 80099A5C 8FB00018 */ lw $s0, 0x18($sp) -/* 09A660 80099A60 8FB1001C */ lw $s1, 0x1c($sp) -/* 09A664 80099A64 8FB20020 */ lw $s2, 0x20($sp) -/* 09A668 80099A68 03E00008 */ jr $ra -/* 09A66C 80099A6C 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/non_matchings/code_80091750/func_80099EC4.s b/asm/non_matchings/code_80091750/func_80099EC4.s index bcf1a90c9..df6081783 100644 --- a/asm/non_matchings/code_80091750/func_80099EC4.s +++ b/asm/non_matchings/code_80091750/func_80099EC4.s @@ -242,77 +242,3 @@ glabel func_80099EC4 /* 09AE2C 8009A22C 8FBE0048 */ lw $fp, 0x48($sp) /* 09AE30 8009A230 03E00008 */ jr $ra /* 09AE34 8009A234 27BD0090 */ addiu $sp, $sp, 0x90 - -/* 09AE38 8009A238 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 09AE3C 8009A23C AFBF0014 */ sw $ra, 0x14($sp) -/* 09AE40 8009A240 8C980004 */ lw $t8, 4($a0) -/* 09AE44 8009A244 3C0F8019 */ lui $t7, %hi(D_8018E118) # $t7, 0x8019 -/* 09AE48 8009A248 25EFE118 */ addiu $t7, %lo(D_8018E118) # addiu $t7, $t7, -0x1ee8 -/* 09AE4C 8009A24C AFB80024 */ sw $t8, 0x24($sp) -/* 09AE50 8009A250 94870010 */ lhu $a3, 0x10($a0) -/* 09AE54 8009A254 000570C0 */ sll $t6, $a1, 3 -/* 09AE58 8009A258 01CF1021 */ addu $v0, $t6, $t7 -/* 09AE5C 8009A25C 8C430004 */ lw $v1, 4($v0) -/* 09AE60 8009A260 04E10004 */ bgez $a3, .L8009A274 -/* 09AE64 8009A264 30F90007 */ andi $t9, $a3, 7 -/* 09AE68 8009A268 13200002 */ beqz $t9, .L8009A274 -/* 09AE6C 8009A26C 00000000 */ nop -/* 09AE70 8009A270 2739FFF8 */ addiu $t9, $t9, -8 -.L8009A274: -/* 09AE74 8009A274 13200007 */ beqz $t9, .L8009A294 -/* 09AE78 8009A278 8FA40024 */ lw $a0, 0x24($sp) -/* 09AE7C 8009A27C 04E10003 */ bgez $a3, .L8009A28C -/* 09AE80 8009A280 000740C3 */ sra $t0, $a3, 3 -/* 09AE84 8009A284 24E10007 */ addiu $at, $a3, 7 -/* 09AE88 8009A288 000140C3 */ sra $t0, $at, 3 -.L8009A28C: -/* 09AE8C 8009A28C 000848C0 */ sll $t1, $t0, 3 -/* 09AE90 8009A290 25270008 */ addiu $a3, $t1, 8 -.L8009A294: -/* 09AE94 8009A294 3C068019 */ lui $a2, %hi(D_8018D9B4) # $a2, 0x8019 -/* 09AE98 8009A298 8CC6D9B4 */ lw $a2, %lo(D_8018D9B4)($a2) -/* 09AE9C 8009A29C 00E02825 */ move $a1, $a3 -/* 09AEA0 8009A2A0 AFA2001C */ sw $v0, 0x1c($sp) -/* 09AEA4 8009A2A4 0C026422 */ jal dma_copy_base_7fa3c0 -/* 09AEA8 8009A2A8 AFA30028 */ sw $v1, 0x28($sp) -/* 09AEAC 8009A2AC 8FA30028 */ lw $v1, 0x28($sp) -/* 09AEB0 8009A2B0 3C0B8019 */ lui $t3, %hi(D_8018D9B0) # $t3, 0x8019 -/* 09AEB4 8009A2B4 8D6BD9B0 */ lw $t3, %lo(D_8018D9B0)($t3) -/* 09AEB8 8009A2B8 3C048019 */ lui $a0, %hi(D_8018D9B4) # $a0, 0x8019 -/* 09AEBC 8009A2BC 3C058019 */ lui $a1, %hi(D_8018D9B8) # $a1, 0x8019 -/* 09AEC0 8009A2C0 00035040 */ sll $t2, $v1, 1 -/* 09AEC4 8009A2C4 8CA5D9B8 */ lw $a1, %lo(D_8018D9B8)($a1) -/* 09AEC8 8009A2C8 8C84D9B4 */ lw $a0, %lo(D_8018D9B4)($a0) -/* 09AECC 8009A2CC 24070001 */ li $a3, 1 -/* 09AED0 8009A2D0 0C010174 */ jal tkmk00decode -/* 09AED4 8009A2D4 014B3021 */ addu $a2, $t2, $t3 -/* 09AED8 8009A2D8 8FBF0014 */ lw $ra, 0x14($sp) -/* 09AEDC 8009A2DC 8FA2001C */ lw $v0, 0x1c($sp) -/* 09AEE0 8009A2E0 8FAC0024 */ lw $t4, 0x24($sp) -/* 09AEE4 8009A2E4 27BD0030 */ addiu $sp, $sp, 0x30 -/* 09AEE8 8009A2E8 03E00008 */ jr $ra -/* 09AEEC 8009A2EC AC4C0000 */ sw $t4, ($v0) - -/* 09AEF0 8009A2F0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 09AEF4 8009A2F4 AFBF001C */ sw $ra, 0x1c($sp) -/* 09AEF8 8009A2F8 0C026455 */ jal segmented_to_virtual_dupe_2 -/* 09AEFC 8009A2FC AFB00018 */ sw $s0, 0x18($sp) -/* 09AF00 8009A300 8C440000 */ lw $a0, ($v0) -/* 09AF04 8009A304 00408025 */ move $s0, $v0 -/* 09AF08 8009A308 5080000A */ beql $a0, $zero, .L8009A334 -/* 09AF0C 8009A30C 8FBF001C */ lw $ra, 0x1c($sp) -.L8009A310: -/* 09AF10 8009A310 50800008 */ beql $a0, $zero, .L8009A334 -/* 09AF14 8009A314 8FBF001C */ lw $ra, 0x1c($sp) -/* 09AF18 8009A318 0C0265AF */ jal func_800996BC -/* 09AF1C 8009A31C 00002825 */ move $a1, $zero -/* 09AF20 8009A320 8E040008 */ lw $a0, 8($s0) -/* 09AF24 8009A324 26100008 */ addiu $s0, $s0, 8 -/* 09AF28 8009A328 1480FFF9 */ bnez $a0, .L8009A310 -/* 09AF2C 8009A32C 00000000 */ nop -/* 09AF30 8009A330 8FBF001C */ lw $ra, 0x1c($sp) -.L8009A334: -/* 09AF34 8009A334 8FB00018 */ lw $s0, 0x18($sp) -/* 09AF38 8009A338 27BD0020 */ addiu $sp, $sp, 0x20 -/* 09AF3C 8009A33C 03E00008 */ jr $ra -/* 09AF40 8009A340 00000000 */ nop diff --git a/asm/non_matchings/code_80091750/func_8009C708.s b/asm/non_matchings/code_80091750/func_8009C708.s deleted file mode 100644 index cb7536fe2..000000000 --- a/asm/non_matchings/code_80091750/func_8009C708.s +++ /dev/null @@ -1,143 +0,0 @@ -glabel func_8009C708 -/* 09D308 8009C708 27BDFFA0 */ addiu $sp, $sp, -0x60 -/* 09D30C 8009C70C AFBF005C */ sw $ra, 0x5c($sp) -/* 09D310 8009C710 AFBE0058 */ sw $fp, 0x58($sp) -/* 09D314 8009C714 AFB70054 */ sw $s7, 0x54($sp) -/* 09D318 8009C718 AFB60050 */ sw $s6, 0x50($sp) -/* 09D31C 8009C71C AFB5004C */ sw $s5, 0x4c($sp) -/* 09D320 8009C720 AFB40048 */ sw $s4, 0x48($sp) -/* 09D324 8009C724 AFB30044 */ sw $s3, 0x44($sp) -/* 09D328 8009C728 AFB20040 */ sw $s2, 0x40($sp) -/* 09D32C 8009C72C AFB1003C */ sw $s1, 0x3c($sp) -/* 09D330 8009C730 AFB00038 */ sw $s0, 0x38($sp) -/* 09D334 8009C734 AFA60068 */ sw $a2, 0x68($sp) -/* 09D338 8009C738 AFA7006C */ sw $a3, 0x6c($sp) -/* 09D33C 8009C73C 8CAF0004 */ lw $t7, 4($a1) -/* 09D340 8009C740 8CAE0000 */ lw $t6, ($a1) -/* 09D344 8009C744 00808025 */ move $s0, $a0 -/* 09D348 8009C748 000FC0C0 */ sll $t8, $t7, 3 -/* 09D34C 8009C74C 01D8C821 */ addu $t9, $t6, $t8 -/* 09D350 8009C750 8F240000 */ lw $a0, ($t9) -/* 09D354 8009C754 0C026449 */ jal segmented_to_virtual_dupe -/* 09D358 8009C758 AFA50064 */ sw $a1, 0x64($sp) -/* 09D35C 8009C75C 8C490004 */ lw $t1, 4($v0) -/* 09D360 8009C760 00408825 */ move $s1, $v0 -/* 09D364 8009C764 241E0003 */ li $fp, 3 -/* 09D368 8009C768 1120005E */ beqz $t1, .L8009C8E4 -/* 09D36C 8009C76C 24170002 */ li $s7, 2 -/* 09D370 8009C770 3C150200 */ lui $s5, %hi(D_02007728) # $s5, 0x200 -/* 09D374 8009C774 26B57728 */ addiu $s5, %lo(D_02007728) # addiu $s5, $s5, 0x7728 -/* 09D378 8009C778 24160001 */ li $s6, 1 -/* 09D37C 8009C77C 8FB40070 */ lw $s4, 0x70($sp) -/* 09D380 8009C780 8FB30074 */ lw $s3, 0x74($sp) -/* 09D384 8009C784 3C120600 */ lui $s2, 0x600 -/* 09D388 8009C788 86220000 */ lh $v0, ($s1) -.L8009C78C: -/* 09D38C 8009C78C 3C0A0200 */ lui $t2, %hi(D_02007708) # $t2, 0x200 -/* 09D390 8009C790 00004025 */ move $t0, $zero -/* 09D394 8009C794 1040000C */ beqz $v0, .L8009C7C8 -/* 09D398 8009C798 254A7708 */ addiu $t2, %lo(D_02007708) # addiu $t2, $t2, 0x7708 -/* 09D39C 8009C79C 50560010 */ beql $v0, $s6, .L8009C7E0 -/* 09D3A0 8009C7A0 02001025 */ move $v0, $s0 -/* 09D3A4 8009C7A4 10570012 */ beq $v0, $s7, .L8009C7F0 -/* 09D3A8 8009C7A8 3C0B0200 */ lui $t3, %hi(D_02007748) # $t3, 0x200 -/* 09D3AC 8009C7AC 105E0016 */ beq $v0, $fp, .L8009C808 -/* 09D3B0 8009C7B0 3C0C0200 */ lui $t4, %hi(D_02007768) # $t4, 0x200 -/* 09D3B4 8009C7B4 02001025 */ move $v0, $s0 -/* 09D3B8 8009C7B8 AC520000 */ sw $s2, ($v0) -/* 09D3BC 8009C7BC AC550004 */ sw $s5, 4($v0) -/* 09D3C0 8009C7C0 10000017 */ b .L8009C820 -/* 09D3C4 8009C7C4 26100008 */ addiu $s0, $s0, 8 -.L8009C7C8: -/* 09D3C8 8009C7C8 02001025 */ move $v0, $s0 -/* 09D3CC 8009C7CC AC520000 */ sw $s2, ($v0) -/* 09D3D0 8009C7D0 AC4A0004 */ sw $t2, 4($v0) -/* 09D3D4 8009C7D4 10000012 */ b .L8009C820 -/* 09D3D8 8009C7D8 26100008 */ addiu $s0, $s0, 8 -/* 09D3DC 8009C7DC 02001025 */ move $v0, $s0 -.L8009C7E0: -/* 09D3E0 8009C7E0 AC520000 */ sw $s2, ($v0) -/* 09D3E4 8009C7E4 AC550004 */ sw $s5, 4($v0) -/* 09D3E8 8009C7E8 1000000D */ b .L8009C820 -/* 09D3EC 8009C7EC 26100008 */ addiu $s0, $s0, 8 -.L8009C7F0: -/* 09D3F0 8009C7F0 02001025 */ move $v0, $s0 -/* 09D3F4 8009C7F4 256B7748 */ addiu $t3, %lo(D_02007748) # addiu $t3, $t3, 0x7748 -/* 09D3F8 8009C7F8 AC4B0004 */ sw $t3, 4($v0) -/* 09D3FC 8009C7FC AC520000 */ sw $s2, ($v0) -/* 09D400 8009C800 10000007 */ b .L8009C820 -/* 09D404 8009C804 26100008 */ addiu $s0, $s0, 8 -.L8009C808: -/* 09D408 8009C808 02001025 */ move $v0, $s0 -/* 09D40C 8009C80C 258C7768 */ addiu $t4, %lo(D_02007768) # addiu $t4, $t4, 0x7768 -/* 09D410 8009C810 AC4C0004 */ sw $t4, 4($v0) -/* 09D414 8009C814 AC520000 */ sw $s2, ($v0) -/* 09D418 8009C818 26100008 */ addiu $s0, $s0, 8 -/* 09D41C 8009C81C 03C04025 */ move $t0, $fp -.L8009C820: -/* 09D420 8009C820 0660002C */ bltz $s3, .L8009C8D4 -/* 09D424 8009C824 02002025 */ move $a0, $s0 -/* 09D428 8009C828 96220008 */ lhu $v0, 8($s1) -/* 09D42C 8009C82C 8FAE0068 */ lw $t6, 0x68($sp) -/* 09D430 8009C830 8FA9006C */ lw $t1, 0x6c($sp) -/* 09D434 8009C834 AFA20010 */ sw $v0, 0x10($sp) -/* 09D438 8009C838 9623000A */ lhu $v1, 0xa($s1) -/* 09D43C 8009C83C 8FAB0064 */ lw $t3, 0x64($sp) -/* 09D440 8009C840 00082E00 */ sll $a1, $t0, 0x18 -/* 09D444 8009C844 AFA30014 */ sw $v1, 0x14($sp) -/* 09D448 8009C848 962F000C */ lhu $t7, 0xc($s1) -/* 09D44C 8009C84C 00056E03 */ sra $t5, $a1, 0x18 -/* 09D450 8009C850 01A02825 */ move $a1, $t5 -/* 09D454 8009C854 01EEC021 */ addu $t8, $t7, $t6 -/* 09D458 8009C858 AFB80018 */ sw $t8, 0x18($sp) -/* 09D45C 8009C85C 9639000E */ lhu $t9, 0xe($s1) -/* 09D460 8009C860 00003025 */ move $a2, $zero -/* 09D464 8009C864 00003825 */ move $a3, $zero -/* 09D468 8009C868 03295021 */ addu $t2, $t9, $t1 -/* 09D46C 8009C86C AFAA001C */ sw $t2, 0x1c($sp) -/* 09D470 8009C870 8D6C0014 */ lw $t4, 0x14($t3) -/* 09D474 8009C874 AFB3002C */ sw $s3, 0x2c($sp) -/* 09D478 8009C878 AFA20024 */ sw $v0, 0x24($sp) -/* 09D47C 8009C87C 000C6C00 */ sll $t5, $t4, 0x10 -/* 09D480 8009C880 06810003 */ bgez $s4, .L8009C890 -/* 09D484 8009C884 00147843 */ sra $t7, $s4, 1 -/* 09D488 8009C888 26810001 */ addiu $at, $s4, 1 -/* 09D48C 8009C88C 00017843 */ sra $t7, $at, 1 -.L8009C890: -/* 09D490 8009C890 000F73C0 */ sll $t6, $t7, 0xf -/* 09D494 8009C894 01AEC021 */ addu $t8, $t5, $t6 -/* 09D498 8009C898 06810004 */ bgez $s4, .L8009C8AC -/* 09D49C 8009C89C 32990001 */ andi $t9, $s4, 1 -/* 09D4A0 8009C8A0 13200002 */ beqz $t9, .L8009C8AC -/* 09D4A4 8009C8A4 00000000 */ nop -/* 09D4A8 8009C8A8 2739FFFE */ addiu $t9, $t9, -2 -.L8009C8AC: -/* 09D4AC 8009C8AC 00194B40 */ sll $t1, $t9, 0xd -/* 09D4B0 8009C8B0 03095021 */ addu $t2, $t8, $t1 -/* 09D4B4 8009C8B4 3C0C802C */ lui $t4, %hi(D_802BFB80) # $t4, 0x802c -/* 09D4B8 8009C8B8 258CFB80 */ addiu $t4, %lo(D_802BFB80) # addiu $t4, $t4, -0x480 -/* 09D4BC 8009C8BC 254B4000 */ addiu $t3, $t2, 0x4000 -/* 09D4C0 8009C8C0 016C7821 */ addu $t7, $t3, $t4 -/* 09D4C4 8009C8C4 AFAF0020 */ sw $t7, 0x20($sp) -/* 09D4C8 8009C8C8 0C025F96 */ jal func_80097E58 -/* 09D4CC 8009C8CC AFA30028 */ sw $v1, 0x28($sp) -/* 09D4D0 8009C8D0 00408025 */ move $s0, $v0 -.L8009C8D4: -/* 09D4D4 8009C8D4 8E2D0018 */ lw $t5, 0x18($s1) -/* 09D4D8 8009C8D8 26310014 */ addiu $s1, $s1, 0x14 -/* 09D4DC 8009C8DC 55A0FFAB */ bnel $t5, $zero, .L8009C78C -/* 09D4E0 8009C8E0 86220000 */ lh $v0, ($s1) -.L8009C8E4: -/* 09D4E4 8009C8E4 8FBF005C */ lw $ra, 0x5c($sp) -/* 09D4E8 8009C8E8 02001025 */ move $v0, $s0 -/* 09D4EC 8009C8EC 8FB00038 */ lw $s0, 0x38($sp) -/* 09D4F0 8009C8F0 8FB1003C */ lw $s1, 0x3c($sp) -/* 09D4F4 8009C8F4 8FB20040 */ lw $s2, 0x40($sp) -/* 09D4F8 8009C8F8 8FB30044 */ lw $s3, 0x44($sp) -/* 09D4FC 8009C8FC 8FB40048 */ lw $s4, 0x48($sp) -/* 09D500 8009C900 8FB5004C */ lw $s5, 0x4c($sp) -/* 09D504 8009C904 8FB60050 */ lw $s6, 0x50($sp) -/* 09D508 8009C908 8FB70054 */ lw $s7, 0x54($sp) -/* 09D50C 8009C90C 8FBE0058 */ lw $fp, 0x58($sp) -/* 09D510 8009C910 03E00008 */ jr $ra -/* 09D514 8009C914 27BD0060 */ addiu $sp, $sp, 0x60 diff --git a/asm/non_matchings/code_80091750/func_800A0B80.s b/asm/non_matchings/code_80091750/func_800A0B80.s deleted file mode 100644 index f769c3613..000000000 --- a/asm/non_matchings/code_80091750/func_800A0B80.s +++ /dev/null @@ -1,172 +0,0 @@ -glabel func_800A0B80 -/* 0A1780 800A0B80 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* 0A1784 800A0B84 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 0A1788 800A0B88 8C630298 */ lw $v1, %lo(gDisplayListHead)($v1) -/* 0A178C 800A0B8C AFBE0038 */ sw $fp, 0x38($sp) -/* 0A1790 800A0B90 AFB70034 */ sw $s7, 0x34($sp) -/* 0A1794 800A0B94 AFB60030 */ sw $s6, 0x30($sp) -/* 0A1798 800A0B98 AFB5002C */ sw $s5, 0x2c($sp) -/* 0A179C 800A0B9C AFB30024 */ sw $s3, 0x24($sp) -/* 0A17A0 800A0BA0 3C018015 */ lui $at, %hi(gDisplayListHead) # $at, 0x8015 -/* 0A17A4 800A0BA4 246E0008 */ addiu $t6, $v1, 8 -/* 0A17A8 800A0BA8 AFBF003C */ sw $ra, 0x3c($sp) -/* 0A17AC 800A0BAC AFB40028 */ sw $s4, 0x28($sp) -/* 0A17B0 800A0BB0 AFB20020 */ sw $s2, 0x20($sp) -/* 0A17B4 800A0BB4 AFB1001C */ sw $s1, 0x1c($sp) -/* 0A17B8 800A0BB8 AFB00018 */ sw $s0, 0x18($sp) -/* 0A17BC 800A0BBC AC2E0298 */ sw $t6, %lo(gDisplayListHead)($at) -/* 0A17C0 800A0BC0 3C0FFA00 */ lui $t7, 0xfa00 -/* 0A17C4 800A0BC4 241832FF */ li $t8, 13055 -/* 0A17C8 800A0BC8 3C16800F */ lui $s6, %hi(D_800E86C4) # $s6, 0x800f -/* 0A17CC 800A0BCC 0080B825 */ move $s7, $a0 -/* 0A17D0 800A0BD0 26D686C4 */ addiu $s6, %lo(D_800E86C4) # addiu $s6, $s6, -0x793c -/* 0A17D4 800A0BD4 2413000A */ li $s3, 10 -/* 0A17D8 800A0BD8 0000A825 */ move $s5, $zero -/* 0A17DC 800A0BDC 241E0009 */ li $fp, 9 -/* 0A17E0 800A0BE0 AC780004 */ sw $t8, 4($v1) -/* 0A17E4 800A0BE4 AC6F0000 */ sw $t7, ($v1) -.L800A0BE8: -/* 0A17E8 800A0BE8 82C20000 */ lb $v0, ($s6) -/* 0A17EC 800A0BEC 00158880 */ sll $s1, $s5, 2 -/* 0A17F0 800A0BF0 02358821 */ addu $s1, $s1, $s5 -/* 0A17F4 800A0BF4 10400068 */ beqz $v0, .L800A0D98 -/* 0A17F8 800A0BF8 00408025 */ move $s0, $v0 -/* 0A17FC 800A0BFC 8EF90010 */ lw $t9, 0x10($s7) -/* 0A1800 800A0C00 00118840 */ sll $s1, $s1, 1 -/* 0A1804 800A0C04 2841000A */ slti $at, $v0, 0xa -/* 0A1808 800A0C08 03313021 */ addu $a2, $t9, $s1 -/* 0A180C 800A0C0C 10200008 */ beqz $at, .L800A0C30 -/* 0A1810 800A0C10 24C60001 */ addiu $a2, $a2, 1 -/* 0A1814 800A0C14 26040010 */ addiu $a0, $s0, 0x10 -/* 0A1818 800A0C18 308800FF */ andi $t0, $a0, 0xff -/* 0A181C 800A0C1C 01002025 */ move $a0, $t0 -/* 0A1820 800A0C20 0C028236 */ jal func_800A08D8 -/* 0A1824 800A0C24 24050032 */ li $a1, 50 -/* 0A1828 800A0C28 10000018 */ b .L800A0C8C -/* 0A182C 800A0C2C 82C20000 */ lb $v0, ($s6) -.L800A0C30: -/* 0A1830 800A0C30 0213001A */ div $zero, $s0, $s3 -/* 0A1834 800A0C34 16600002 */ bnez $s3, .L800A0C40 -/* 0A1838 800A0C38 00000000 */ nop -/* 0A183C 800A0C3C 0007000D */ break 7 -.L800A0C40: -/* 0A1840 800A0C40 2401FFFF */ li $at, -1 -/* 0A1844 800A0C44 16610004 */ bne $s3, $at, .L800A0C58 -/* 0A1848 800A0C48 3C018000 */ lui $at, 0x8000 -/* 0A184C 800A0C4C 16010002 */ bne $s0, $at, .L800A0C58 -/* 0A1850 800A0C50 00000000 */ nop -/* 0A1854 800A0C54 0006000D */ break 6 -.L800A0C58: -/* 0A1858 800A0C58 00008010 */ mfhi $s0 -/* 0A185C 800A0C5C 26040010 */ addiu $a0, $s0, 0x10 -/* 0A1860 800A0C60 308900FF */ andi $t1, $a0, 0xff -/* 0A1864 800A0C64 01202025 */ move $a0, $t1 -/* 0A1868 800A0C68 0C028236 */ jal func_800A08D8 -/* 0A186C 800A0C6C 24050035 */ li $a1, 53 -/* 0A1870 800A0C70 8EEA0010 */ lw $t2, 0x10($s7) -/* 0A1874 800A0C74 24040011 */ li $a0, 17 -/* 0A1878 800A0C78 2405002F */ li $a1, 47 -/* 0A187C 800A0C7C 01513021 */ addu $a2, $t2, $s1 -/* 0A1880 800A0C80 0C028236 */ jal func_800A08D8 -/* 0A1884 800A0C84 24C60001 */ addiu $a2, $a2, 1 -/* 0A1888 800A0C88 82C20000 */ lb $v0, ($s6) -.L800A0C8C: -/* 0A188C 800A0C8C 3C0D8019 */ lui $t5, %hi(pfsState+0x1FC) # 0x8019 -/* 0A1890 800A0C90 8EEB0010 */ lw $t3, 0x10($s7) -/* 0A1894 800A0C94 00026080 */ sll $t4, $v0, 2 -/* 0A1898 800A0C98 01AC6821 */ addu $t5, $t5, $t4 -/* 0A189C 800A0C9C 8DADEB34 */ lw $t5, %lo(pfsState+0x1FC)($t5) # -0x14cc($t5) -/* 0A18A0 800A0CA0 01719021 */ addu $s2, $t3, $s1 -/* 0A18A4 800A0CA4 26520001 */ addiu $s2, $s2, 1 -/* 0A18A8 800A0CA8 15A0003B */ bnez $t5, .L800A0D98 -/* 0A18AC 800A0CAC 2406004F */ li $a2, 79 -/* 0A18B0 800A0CB0 00027140 */ sll $t6, $v0, 5 -/* 0A18B4 800A0CB4 3C188019 */ lui $t8, %hi(pfsState) # $t8, 0x8019 -/* 0A18B8 800A0CB8 2718E938 */ addiu $t8, %lo(pfsState) # addiu $t8, $t8, -0x16c8 -/* 0A18BC 800A0CBC 25CFFFE0 */ addiu $t7, $t6, -0x20 -/* 0A18C0 800A0CC0 01F8A021 */ addu $s4, $t7, $t8 -/* 0A18C4 800A0CC4 2684000E */ addiu $a0, $s4, 0xe -/* 0A18C8 800A0CC8 24050010 */ li $a1, 16 -/* 0A18CC 800A0CCC 0C028257 */ jal func_800A095C -/* 0A18D0 800A0CD0 02403825 */ move $a3, $s2 -/* 0A18D4 800A0CD4 8299000A */ lb $t9, 0xa($s4) -/* 0A18D8 800A0CD8 00408025 */ move $s0, $v0 -/* 0A18DC 800A0CDC 001088C0 */ sll $s1, $s0, 3 -/* 0A18E0 800A0CE0 5320000A */ beql $t9, $zero, .L800A0D0C -/* 0A18E4 800A0CE4 8E900000 */ lw $s0, ($s4) -/* 0A18E8 800A0CE8 2404003C */ li $a0, 60 -/* 0A18EC 800A0CEC 2625004F */ addiu $a1, $s1, 0x4f -/* 0A18F0 800A0CF0 0C028236 */ jal func_800A08D8 -/* 0A18F4 800A0CF4 02403025 */ move $a2, $s2 -/* 0A18F8 800A0CF8 9284000A */ lbu $a0, 0xa($s4) -/* 0A18FC 800A0CFC 26250057 */ addiu $a1, $s1, 0x57 -/* 0A1900 800A0D00 0C028236 */ jal func_800A08D8 -/* 0A1904 800A0D04 02403025 */ move $a2, $s2 -/* 0A1908 800A0D08 8E900000 */ lw $s0, ($s4) -.L800A0D0C: -/* 0A190C 800A0D0C 24110010 */ li $s1, 16 -/* 0A1910 800A0D10 261000FF */ addiu $s0, $s0, 0xff -/* 0A1914 800A0D14 00104202 */ srl $t0, $s0, 8 -/* 0A1918 800A0D18 01008025 */ move $s0, $t0 -.L800A0D1C: -/* 0A191C 800A0D1C 0213001A */ div $zero, $s0, $s3 -/* 0A1920 800A0D20 00002010 */ mfhi $a0 -/* 0A1924 800A0D24 24840010 */ addiu $a0, $a0, 0x10 -/* 0A1928 800A0D28 308900FF */ andi $t1, $a0, 0xff -/* 0A192C 800A0D2C 16600002 */ bnez $s3, .L800A0D38 -/* 0A1930 800A0D30 00000000 */ nop -/* 0A1934 800A0D34 0007000D */ break 7 -.L800A0D38: -/* 0A1938 800A0D38 2401FFFF */ li $at, -1 -/* 0A193C 800A0D3C 16610004 */ bne $s3, $at, .L800A0D50 -/* 0A1940 800A0D40 3C018000 */ lui $at, 0x8000 -/* 0A1944 800A0D44 16010002 */ bne $s0, $at, .L800A0D50 -/* 0A1948 800A0D48 00000000 */ nop -/* 0A194C 800A0D4C 0006000D */ break 6 -.L800A0D50: -/* 0A1950 800A0D50 01202025 */ move $a0, $t1 -/* 0A1954 800A0D54 262500FD */ addiu $a1, $s1, 0xfd -/* 0A1958 800A0D58 0C028236 */ jal func_800A08D8 -/* 0A195C 800A0D5C 02403025 */ move $a2, $s2 -/* 0A1960 800A0D60 0213001A */ div $zero, $s0, $s3 -/* 0A1964 800A0D64 16600002 */ bnez $s3, .L800A0D70 -/* 0A1968 800A0D68 00000000 */ nop -/* 0A196C 800A0D6C 0007000D */ break 7 -.L800A0D70: -/* 0A1970 800A0D70 2401FFFF */ li $at, -1 -/* 0A1974 800A0D74 16610004 */ bne $s3, $at, .L800A0D88 -/* 0A1978 800A0D78 3C018000 */ lui $at, 0x8000 -/* 0A197C 800A0D7C 16010002 */ bne $s0, $at, .L800A0D88 -/* 0A1980 800A0D80 00000000 */ nop -/* 0A1984 800A0D84 0006000D */ break 6 -.L800A0D88: -/* 0A1988 800A0D88 00008012 */ mflo $s0 -/* 0A198C 800A0D8C 2631FFF8 */ addiu $s1, $s1, -8 -/* 0A1990 800A0D90 1600FFE2 */ bnez $s0, .L800A0D1C -/* 0A1994 800A0D94 00000000 */ nop -.L800A0D98: -/* 0A1998 800A0D98 26B50001 */ addiu $s5, $s5, 1 -/* 0A199C 800A0D9C 16BEFF92 */ bne $s5, $fp, .L800A0BE8 -/* 0A19A0 800A0DA0 26D60001 */ addiu $s6, $s6, 1 -/* 0A19A4 800A0DA4 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 0A19A8 800A0DA8 8C630298 */ lw $v1, %lo(gDisplayListHead)($v1) -/* 0A19AC 800A0DAC 3C018015 */ lui $at, %hi(gDisplayListHead) # $at, 0x8015 -/* 0A19B0 800A0DB0 3C0C004F */ lui $t4, (0x004FC3BC >> 16) # lui $t4, 0x4f -/* 0A19B4 800A0DB4 246A0008 */ addiu $t2, $v1, 8 -/* 0A19B8 800A0DB8 AC2A0298 */ sw $t2, %lo(gDisplayListHead)($at) -/* 0A19BC 800A0DBC 358CC3BC */ ori $t4, (0x004FC3BC & 0xFFFF) # ori $t4, $t4, 0xc3bc -/* 0A19C0 800A0DC0 3C0BED00 */ lui $t3, 0xed00 -/* 0A19C4 800A0DC4 AC6B0000 */ sw $t3, ($v1) -/* 0A19C8 800A0DC8 AC6C0004 */ sw $t4, 4($v1) -/* 0A19CC 800A0DCC 8FBF003C */ lw $ra, 0x3c($sp) -/* 0A19D0 800A0DD0 8FBE0038 */ lw $fp, 0x38($sp) -/* 0A19D4 800A0DD4 8FB70034 */ lw $s7, 0x34($sp) -/* 0A19D8 800A0DD8 8FB60030 */ lw $s6, 0x30($sp) -/* 0A19DC 800A0DDC 8FB5002C */ lw $s5, 0x2c($sp) -/* 0A19E0 800A0DE0 8FB40028 */ lw $s4, 0x28($sp) -/* 0A19E4 800A0DE4 8FB30024 */ lw $s3, 0x24($sp) -/* 0A19E8 800A0DE8 8FB20020 */ lw $s2, 0x20($sp) -/* 0A19EC 800A0DEC 8FB1001C */ lw $s1, 0x1c($sp) -/* 0A19F0 800A0DF0 8FB00018 */ lw $s0, 0x18($sp) -/* 0A19F4 800A0DF4 03E00008 */ jr $ra -/* 0A19F8 800A0DF8 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/asm/non_matchings/code_80091750/func_800A54EC.s b/asm/non_matchings/code_80091750/func_800A54EC.s deleted file mode 100644 index c90a54f61..000000000 --- a/asm/non_matchings/code_80091750/func_800A54EC.s +++ /dev/null @@ -1,154 +0,0 @@ -glabel func_800A54EC -/* 0A60EC 800A54EC 3C0B800E */ lui $t3, %hi(gIsGamePaused) # $t3, 0x800e -/* 0A60F0 800A54F0 256BC5FC */ addiu $t3, %lo(gIsGamePaused) # addiu $t3, $t3, -0x3a04 -/* 0A60F4 800A54F4 956E0000 */ lhu $t6, ($t3) -/* 0A60F8 800A54F8 27BDFFA8 */ addiu $sp, $sp, -0x58 -/* 0A60FC 800A54FC AFBF0024 */ sw $ra, 0x24($sp) -/* 0A6100 800A5500 11C00089 */ beqz $t6, .L800A5728 -/* 0A6104 800A5504 3C0A800E */ lui $t2, %hi(gModeSelection) # $t2, 0x800e -/* 0A6108 800A5508 8D4AC53C */ lw $t2, %lo(gModeSelection)($t2) -/* 0A610C 800A550C 240400C7 */ li $a0, 199 -/* 0A6110 800A5510 0C02ABCC */ jal find_8018D9E0_entry -/* 0A6114 800A5514 AFAA0040 */ sw $t2, 0x40($sp) -/* 0A6118 800A5518 3C088015 */ lui $t0, %hi(gDisplayListHead) # $t0, 0x8015 -/* 0A611C 800A551C 25080298 */ addiu $t0, %lo(gDisplayListHead) # addiu $t0, $t0, 0x298 -/* 0A6120 800A5520 8D030000 */ lw $v1, ($t0) -/* 0A6124 800A5524 3C19802C */ lui $t9, %hi(D_802B8880) # $t9, 0x802c -/* 0A6128 800A5528 3C011FFF */ lui $at, (0x1FFFFFFF >> 16) # lui $at, 0x1fff -/* 0A612C 800A552C 246F0008 */ addiu $t7, $v1, 8 -/* 0A6130 800A5530 8FAA0040 */ lw $t2, 0x40($sp) -/* 0A6134 800A5534 AFA20048 */ sw $v0, 0x48($sp) -/* 0A6138 800A5538 AD0F0000 */ sw $t7, ($t0) -/* 0A613C 800A553C 3421FFFF */ ori $at, (0x1FFFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0A6140 800A5540 27398880 */ addiu $t9, %lo(D_802B8880) # addiu $t9, $t9, -0x7780 -/* 0A6144 800A5544 3C180380 */ lui $t8, (0x03800010 >> 16) # lui $t8, 0x380 -/* 0A6148 800A5548 3C098016 */ lui $t1, %hi(gMatrixEffectCount) # $t1, 0x8016 -/* 0A614C 800A554C 37180010 */ ori $t8, (0x03800010 & 0xFFFF) # ori $t8, $t8, 0x10 -/* 0A6150 800A5550 03216024 */ and $t4, $t9, $at -/* 0A6154 800A5554 25294AF0 */ addiu $t1, %lo(gMatrixEffectCount) # addiu $t1, $t1, 0x4af0 -/* 0A6158 800A5558 AC6C0004 */ sw $t4, 4($v1) -/* 0A615C 800A555C AC780000 */ sw $t8, ($v1) -/* 0A6160 800A5560 852E0000 */ lh $t6, ($t1) -/* 0A6164 800A5564 3C0D8015 */ lui $t5, %hi(gGfxPool) # $t5, 0x8015 -/* 0A6168 800A5568 8DADEF40 */ lw $t5, %lo(gGfxPool)($t5) -/* 0A616C 800A556C 000E7980 */ sll $t7, $t6, 6 -/* 0A6170 800A5570 3401FAC0 */ li $at, 64192 -/* 0A6174 800A5574 01AF2021 */ addu $a0, $t5, $t7 -/* 0A6178 800A5578 00812021 */ addu $a0, $a0, $at -/* 0A617C 800A557C 3C01C2C8 */ li $at, 0xC2C80000 # -100.000000 -/* 0A6180 800A5580 44812000 */ mtc1 $at, $f4 -/* 0A6184 800A5584 3C0142C8 */ li $at, 0x42C80000 # 100.000000 -/* 0A6188 800A5588 44800000 */ mtc1 $zero, $f0 -/* 0A618C 800A558C 44813000 */ mtc1 $at, $f6 -/* 0A6190 800A5590 3C013F80 */ li $at, 0x3F800000 # 1.000000 -/* 0A6194 800A5594 44814000 */ mtc1 $at, $f8 -/* 0A6198 800A5598 3C06439F */ lui $a2, (0x439F8000 >> 16) # lui $a2, 0x439f -/* 0A619C 800A559C 44050000 */ mfc1 $a1, $f0 -/* 0A61A0 800A55A0 34C68000 */ ori $a2, (0x439F8000 & 0xFFFF) # ori $a2, $a2, 0x8000 -/* 0A61A4 800A55A4 3C07436F */ lui $a3, 0x436f -/* 0A61A8 800A55A8 AFAA0040 */ sw $t2, 0x40($sp) -/* 0A61AC 800A55AC E7A40014 */ swc1 $f4, 0x14($sp) -/* 0A61B0 800A55B0 E7A00010 */ swc1 $f0, 0x10($sp) -/* 0A61B4 800A55B4 E7A60018 */ swc1 $f6, 0x18($sp) -/* 0A61B8 800A55B8 0C0338A9 */ jal guOrtho -/* 0A61BC 800A55BC E7A8001C */ swc1 $f8, 0x1c($sp) -/* 0A61C0 800A55C0 3C088015 */ lui $t0, %hi(gDisplayListHead) # $t0, 0x8015 -/* 0A61C4 800A55C4 25080298 */ addiu $t0, %lo(gDisplayListHead) # addiu $t0, $t0, 0x298 -/* 0A61C8 800A55C8 8D030000 */ lw $v1, ($t0) -/* 0A61CC 800A55CC 3C190103 */ lui $t9, (0x01030040 >> 16) # lui $t9, 0x103 -/* 0A61D0 800A55D0 8FAA0040 */ lw $t2, 0x40($sp) -/* 0A61D4 800A55D4 24780008 */ addiu $t8, $v1, 8 -/* 0A61D8 800A55D8 8FA40048 */ lw $a0, 0x48($sp) -/* 0A61DC 800A55DC 3C098016 */ lui $t1, %hi(gMatrixEffectCount) # $t1, 0x8016 -/* 0A61E0 800A55E0 AD180000 */ sw $t8, ($t0) -/* 0A61E4 800A55E4 37390040 */ ori $t9, (0x01030040 & 0xFFFF) # ori $t9, $t9, 0x40 -/* 0A61E8 800A55E8 25294AF0 */ addiu $t1, %lo(gMatrixEffectCount) # addiu $t1, $t1, 0x4af0 -/* 0A61EC 800A55EC AC790000 */ sw $t9, ($v1) -/* 0A61F0 800A55F0 852E0000 */ lh $t6, ($t1) -/* 0A61F4 800A55F4 3C0C8015 */ lui $t4, %hi(gGfxPool) # $t4, 0x8015 -/* 0A61F8 800A55F8 8D8CEF40 */ lw $t4, %lo(gGfxPool)($t4) -/* 0A61FC 800A55FC 000E6980 */ sll $t5, $t6, 6 -/* 0A6200 800A5600 3401FAC0 */ li $at, 64192 -/* 0A6204 800A5604 018D7821 */ addu $t7, $t4, $t5 -/* 0A6208 800A5608 01E1C021 */ addu $t8, $t7, $at -/* 0A620C 800A560C 3C011FFF */ lui $at, (0x1FFFFFFF >> 16) # lui $at, 0x1fff -/* 0A6210 800A5610 3421FFFF */ ori $at, (0x1FFFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0A6214 800A5614 0301C824 */ and $t9, $t8, $at -/* 0A6218 800A5618 AC790004 */ sw $t9, 4($v1) -/* 0A621C 800A561C 852E0000 */ lh $t6, ($t1) -/* 0A6220 800A5620 3C0B800E */ lui $t3, %hi(gIsGamePaused) # $t3, 0x800e -/* 0A6224 800A5624 256BC5FC */ addiu $t3, %lo(gIsGamePaused) # addiu $t3, $t3, -0x3a04 -/* 0A6228 800A5628 25CC0001 */ addiu $t4, $t6, 1 -/* 0A622C 800A562C 11400018 */ beqz $t2, .L800A5690 -/* 0A6230 800A5630 A52C0000 */ sh $t4, ($t1) -/* 0A6234 800A5634 24010001 */ li $at, 1 -/* 0A6238 800A5638 11410009 */ beq $t2, $at, .L800A5660 -/* 0A623C 800A563C 3C03800F */ lui $v1, %hi(D_800E8538) # 0x800f -/* 0A6240 800A5640 24010002 */ li $at, 2 -/* 0A6244 800A5644 11410008 */ beq $t2, $at, .L800A5668 -/* 0A6248 800A5648 3C0D800E */ lui $t5, %hi(gScreenModeSelection) # $t5, 0x800e -/* 0A624C 800A564C 24010003 */ li $at, 3 -/* 0A6250 800A5650 1141001A */ beq $t2, $at, .L800A56BC -/* 0A6254 800A5654 3C0C800E */ lui $t4, %hi(gScreenModeSelection) -/* 0A6258 800A5658 10000021 */ b .L800A56E0 -/* 0A625C 800A565C 8FA3004C */ lw $v1, 0x4c($sp) -.L800A5660: -/* 0A6260 800A5660 1000001F */ b .L800A56E0 -/* 0A6264 800A5664 24638538 */ addiu $v1, $v1, %lo(D_800E8538) # -0x7ac8 -.L800A5668: -/* 0A6268 800A5668 8DAFC530 */ lw $t7, %lo(gScreenModeSelection)($t5) -/* 0A626C 800A566C 95790000 */ lhu $t9, ($t3) -/* 0A6270 800A5670 000FC140 */ sll $t8, $t7, 5 -/* 0A6274 800A5674 001970C0 */ sll $t6, $t9, 3 -/* 0A6278 800A5678 030E6021 */ addu $t4, $t8, $t6 -/* 0A627C 800A567C 3C0F800F */ lui $t7, %hi(D_800E8540) # $t7, 0x800f -/* 0A6280 800A5680 25EF8540 */ addiu $t7, %lo(D_800E8540) # addiu $t7, $t7, -0x7ac0 -/* 0A6284 800A5684 258DFFF8 */ addiu $t5, $t4, -8 -/* 0A6288 800A5688 10000015 */ b .L800A56E0 -/* 0A628C 800A568C 01AF1821 */ addu $v1, $t5, $t7 -.L800A5690: -/* 0A6290 800A5690 3C19800E */ lui $t9, %hi(gScreenModeSelection) # $t9, 0x800e -/* 0A6294 800A5694 8F38C530 */ lw $t8, %lo(gScreenModeSelection)($t9) -/* 0A6298 800A5698 956C0000 */ lhu $t4, ($t3) -/* 0A629C 800A569C 00187140 */ sll $t6, $t8, 5 -/* 0A62A0 800A56A0 000C68C0 */ sll $t5, $t4, 3 -/* 0A62A4 800A56A4 01CD7821 */ addu $t7, $t6, $t5 -/* 0A62A8 800A56A8 3C18800F */ lui $t8, %hi(D_800E85C0) # $t8, 0x800f -/* 0A62AC 800A56AC 271885C0 */ addiu $t8, %lo(D_800E85C0) # addiu $t8, $t8, -0x7a40 -/* 0A62B0 800A56B0 25F9FFF8 */ addiu $t9, $t7, -8 -/* 0A62B4 800A56B4 1000000A */ b .L800A56E0 -/* 0A62B8 800A56B8 03381821 */ addu $v1, $t9, $t8 -.L800A56BC: -/* 0A62BC 800A56BC 8D8EC530 */ lw $t6, %lo(gScreenModeSelection)($t4) -/* 0A62C0 800A56C0 956F0000 */ lhu $t7, ($t3) -/* 0A62C4 800A56C4 000E6940 */ sll $t5, $t6, 5 -/* 0A62C8 800A56C8 000FC8C0 */ sll $t9, $t7, 3 -/* 0A62CC 800A56CC 01B9C021 */ addu $t8, $t5, $t9 -/* 0A62D0 800A56D0 3C0E800F */ lui $t6, %hi(D_800E8600) # $t6, 0x800f -/* 0A62D4 800A56D4 25CE8600 */ addiu $t6, %lo(D_800E8600) # addiu $t6, $t6, -0x7a00 -/* 0A62D8 800A56D8 270CFFF8 */ addiu $t4, $t8, -8 -/* 0A62DC 800A56DC 018E1821 */ addu $v1, $t4, $t6 -.L800A56E0: -/* 0A62E0 800A56E0 846F0000 */ lh $t7, ($v1) -/* 0A62E4 800A56E4 3C02800F */ lui $v0, %hi(D_800F0B50) # 0x800f -/* 0A62E8 800A56E8 004A1021 */ addu $v0, $v0, $t2 -/* 0A62EC 800A56EC 25EDFFF8 */ addiu $t5, $t7, -8 -/* 0A62F0 800A56F0 A7AD0050 */ sh $t5, 0x50($sp) -/* 0A62F4 800A56F4 80420B50 */ lb $v0, %lo(D_800F0B50)($v0) # 0xb50($v0) -/* 0A62F8 800A56F8 8C980004 */ lw $t8, 4($a0) -/* 0A62FC 800A56FC 84790002 */ lh $t9, 2($v1) -/* 0A6300 800A5700 27A50050 */ addiu $a1, $sp, 0x50 -/* 0A6304 800A5704 03026023 */ subu $t4, $t8, $v0 -/* 0A6308 800A5708 000C7080 */ sll $t6, $t4, 2 -/* 0A630C 800A570C 01CC7023 */ subu $t6, $t6, $t4 -/* 0A6310 800A5710 000E7080 */ sll $t6, $t6, 2 -/* 0A6314 800A5714 01CC7021 */ addu $t6, $t6, $t4 -/* 0A6318 800A5718 032E7821 */ addu $t7, $t9, $t6 -/* 0A631C 800A571C 25EDFFF8 */ addiu $t5, $t7, -8 -/* 0A6320 800A5720 0C0299AA */ jal func_800A66A8 -/* 0A6324 800A5724 A7AD0052 */ sh $t5, 0x52($sp) -.L800A5728: -/* 0A6328 800A5728 8FBF0024 */ lw $ra, 0x24($sp) -/* 0A632C 800A572C 27BD0058 */ addiu $sp, $sp, 0x58 -/* 0A6330 800A5730 03E00008 */ jr $ra -/* 0A6334 800A5734 00000000 */ nop diff --git a/asm/non_matchings/code_80091750/func_800A5738.s b/asm/non_matchings/code_80091750/func_800A5738.s deleted file mode 100644 index 098b370bc..000000000 --- a/asm/non_matchings/code_80091750/func_800A5738.s +++ /dev/null @@ -1,678 +0,0 @@ -.section .rodata - -glabel D_800F0C6C -.asciiz "'" -.balign 4 - -glabel D_800F0C70 -.asciiz "\"" -.balign 4 - -glabel D_800F0C74 -.asciiz "'" -.balign 4 - -glabel D_800F0C78 -.asciiz "\"" -.balign 4 - -.section .late_rodata - -glabel D_800F1DD8 -.float 0.8 - -glabel jpt_800F1DDC -.word L800A5940, L800A5F90, L800A5F90, L800A5F90 -.word L800A5F90, L800A5F90, L800A5F90, L800A5F90 -.word L800A5F90, L800A5F90, L800A5940, L800A5940 -.word L800A5940, L800A5940, L800A5940, L800A5940 -.word L800A5F90, L800A5F90, L800A5F90, L800A5F90 -.word L800A5BA8, L800A5BA8, L800A5BA8, L800A5BA8 -.word L800A5BA8, L800A5BA8, L800A5F90, L800A5F90 -.word L800A5F90, L800A5C18, L800A5C18, L800A5DA0 -.word L800A5F90, L800A5F90, L800A5E00, L800A5E00 -.word L800A5F90, L800A5F90, L800A5F90, L800A5ED4 -.word L800A5F34 - -glabel D_800F1E80 -.float 0.8 - -glabel D_800F1E84 -.float 0.8 - -glabel D_800F1E88 -.float 0.8 - -glabel D_800F1E8C -.float 0.8 - -glabel D_800F1E90 -.float 0.8 - -glabel D_800F1E94 -.float 0.8 - -glabel D_800F1E98 -.float 0.8 - -glabel jpt_800F1E9C -.word L800A5FB4, L800A5FB4, L800A5FB4, L800A5FB4 -.word L800A5FB4, L800A5FB4, L800A6014, L800A6014 -.word L800A6014, L800A6014, L800A6014, L800A6014 -.word L800A6014, L800A6014, L800A6014, L800A6014 -.word L800A6014, L800A6014, L800A6014, L800A5FCC -.word L800A5FCC, L800A6014, L800A6014, L800A6014 -.word L800A5FE4, L800A5FE4 - -.section .text - -glabel func_800A5738 -/* 0A6338 800A5738 27BDFF60 */ addiu $sp, $sp, -0xa0 -/* 0A633C 800A573C AFBF0044 */ sw $ra, 0x44($sp) -/* 0A6340 800A5740 AFB30040 */ sw $s3, 0x40($sp) -/* 0A6344 800A5744 AFB2003C */ sw $s2, 0x3c($sp) -/* 0A6348 800A5748 AFB10038 */ sw $s1, 0x38($sp) -/* 0A634C 800A574C AFB00034 */ sw $s0, 0x34($sp) -/* 0A6350 800A5750 F7B40028 */ sdc1 $f20, 0x28($sp) -/* 0A6354 800A5754 8C830004 */ lw $v1, 4($a0) -/* 0A6358 800A5758 00809825 */ move $s3, $a0 -/* 0A635C 800A575C 24010001 */ li $at, 1 -/* 0A6360 800A5760 14600037 */ bnez $v1, .L800A5840 -/* 0A6364 800A5764 3C108015 */ lui $s0, %hi(gDisplayListHead) # 0x8015 -/* 0A6368 800A5768 8C8E001C */ lw $t6, 0x1c($a0) -/* 0A636C 800A576C 3C0F800E */ lui $t7, %hi(gGlobalTimer) # $t7, 0x800e -/* 0A6370 800A5770 29C1001E */ slti $at, $t6, 0x1e -/* 0A6374 800A5774 54200228 */ bnel $at, $zero, .L800A6018 -/* 0A6378 800A5778 8FBF0044 */ lw $ra, 0x44($sp) -/* 0A637C 800A577C 8DEFC54C */ lw $t7, %lo(gGlobalTimer)($t7) -/* 0A6380 800A5780 3C11800E */ lui $s1, %hi(gTextPauseButton) # $s1, 0x800e -/* 0A6384 800A5784 2631775C */ addiu $s1, %lo(gTextPauseButton) # addiu $s1, $s1, 0x775c -/* 0A6388 800A5788 05E10003 */ bgez $t7, .L800A5798 -/* 0A638C 800A578C 000FC103 */ sra $t8, $t7, 4 -/* 0A6390 800A5790 25E1000F */ addiu $at, $t7, 0xf -/* 0A6394 800A5794 0001C103 */ sra $t8, $at, 4 -.L800A5798: -/* 0A6398 800A5798 07010004 */ bgez $t8, .L800A57AC -/* 0A639C 800A579C 33190001 */ andi $t9, $t8, 1 -/* 0A63A0 800A57A0 13200002 */ beqz $t9, .L800A57AC -/* 0A63A4 800A57A4 00000000 */ nop -/* 0A63A8 800A57A8 2739FFFE */ addiu $t9, $t9, -2 -.L800A57AC: -/* 0A63AC 800A57AC 5320021A */ beql $t9, $zero, .L800A6018 -/* 0A63B0 800A57B0 8FBF0044 */ lw $ra, 0x44($sp) -/* 0A63B4 800A57B4 0C024C0D */ jal get_string_width -/* 0A63B8 800A57B8 8E240014 */ lw $a0, 0x14($s1) -/* 0A63BC 800A57BC 44822000 */ mtc1 $v0, $f4 -/* 0A63C0 800A57C0 3C01800F */ lui $at, %hi(D_800F1DD8) # $at, 0x800f -/* 0A63C4 800A57C4 C4341DD8 */ lwc1 $f20, %lo(D_800F1DD8)($at) -/* 0A63C8 800A57C8 468021A0 */ cvt.s.w $f6, $f4 -/* 0A63CC 800A57CC 3C108015 */ lui $s0, %hi(gDisplayListHead) # $s0, 0x8015 -/* 0A63D0 800A57D0 26100298 */ addiu $s0, %lo(gDisplayListHead) # addiu $s0, $s0, 0x298 -/* 0A63D4 800A57D4 24090032 */ li $t1, 50 -/* 0A63D8 800A57D8 240A0096 */ li $t2, 150 -/* 0A63DC 800A57DC AFAA0020 */ sw $t2, 0x20($sp) -/* 0A63E0 800A57E0 46143202 */ mul.s $f8, $f6, $f20 -/* 0A63E4 800A57E4 AFA90010 */ sw $t1, 0x10($sp) -/* 0A63E8 800A57E8 8E040000 */ lw $a0, ($s0) -/* 0A63EC 800A57EC 240500C0 */ li $a1, 192 -/* 0A63F0 800A57F0 24060021 */ li $a2, 33 -/* 0A63F4 800A57F4 AFA00014 */ sw $zero, 0x14($sp) -/* 0A63F8 800A57F8 AFA00018 */ sw $zero, 0x18($sp) -/* 0A63FC 800A57FC 4600428D */ trunc.w.s $f10, $f8 -/* 0A6400 800A5800 AFA0001C */ sw $zero, 0x1c($sp) -/* 0A6404 800A5804 44075000 */ mfc1 $a3, $f10 -/* 0A6408 800A5808 0C02637E */ jal draw_box -/* 0A640C 800A580C 24E700C6 */ addiu $a3, $a3, 0xc6 -/* 0A6410 800A5810 AE020000 */ sw $v0, ($s0) -/* 0A6414 800A5814 0C024C36 */ jal set_text_color -/* 0A6418 800A5818 24040001 */ li $a0, 1 -/* 0A641C 800A581C 240400BF */ li $a0, 191 -/* 0A6420 800A5820 24050030 */ li $a1, 48 -/* 0A6424 800A5824 8E260014 */ lw $a2, 0x14($s1) -/* 0A6428 800A5828 00003825 */ move $a3, $zero -/* 0A642C 800A582C E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A6430 800A5830 0C024CC9 */ jal func_80093324 -/* 0A6434 800A5834 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A6438 800A5838 100001F7 */ b .L800A6018 -/* 0A643C 800A583C 8FBF0044 */ lw $ra, 0x44($sp) -.L800A5840: -/* 0A6440 800A5840 14610009 */ bne $v1, $at, .L800A5868 -/* 0A6444 800A5844 26100298 */ addiu $s0, $s0, %lo(gDisplayListHead) # 0x298 -/* 0A6448 800A5848 8E71001C */ lw $s1, 0x1c($s3) -/* 0A644C 800A584C 2401008C */ li $at, 140 -/* 0A6450 800A5850 00119200 */ sll $s2, $s1, 8 -/* 0A6454 800A5854 02519023 */ subu $s2, $s2, $s1 -/* 0A6458 800A5858 0241001A */ div $zero, $s2, $at -/* 0A645C 800A585C 00009012 */ mflo $s2 -/* 0A6460 800A5860 10000004 */ b .L800A5874 -/* 0A6464 800A5864 240C00EF */ li $t4, 239 -.L800A5868: -/* 0A6468 800A5868 2411008C */ li $s1, 140 -/* 0A646C 800A586C 241200FF */ li $s2, 255 -/* 0A6470 800A5870 240C00EF */ li $t4, 239 -.L800A5874: -/* 0A6474 800A5874 AFAC0010 */ sw $t4, 0x10($sp) -/* 0A6478 800A5878 8E040000 */ lw $a0, ($s0) -/* 0A647C 800A587C 00002825 */ move $a1, $zero -/* 0A6480 800A5880 00003025 */ move $a2, $zero -/* 0A6484 800A5884 2407013F */ li $a3, 319 -/* 0A6488 800A5888 AFA00014 */ sw $zero, 0x14($sp) -/* 0A648C 800A588C AFA00018 */ sw $zero, 0x18($sp) -/* 0A6490 800A5890 AFA0001C */ sw $zero, 0x1c($sp) -/* 0A6494 800A5894 0C02637E */ jal draw_box -/* 0A6498 800A5898 AFB10020 */ sw $s1, 0x20($sp) -/* 0A649C 800A589C AE020000 */ sw $v0, ($s0) -/* 0A64A0 800A58A0 244D0008 */ addiu $t5, $v0, 8 -/* 0A64A4 800A58A4 AE0D0000 */ sw $t5, ($s0) -/* 0A64A8 800A58A8 3C0EFA00 */ lui $t6, 0xfa00 -/* 0A64AC 800A58AC 324F00FF */ andi $t7, $s2, 0xff -/* 0A64B0 800A58B0 AC4F0004 */ sw $t7, 4($v0) -/* 0A64B4 800A58B4 AC4E0000 */ sw $t6, ($v0) -/* 0A64B8 800A58B8 0C024C36 */ jal set_text_color -/* 0A64BC 800A58BC 24040003 */ li $a0, 3 -/* 0A64C0 800A58C0 3C188019 */ lui $t8, %hi(gCupSelection) # $t8, 0x8019 -/* 0A64C4 800A58C4 3C088019 */ lui $t0, %hi(gCupCourseSelection) # $t0, 0x8019 -/* 0A64C8 800A58C8 8108EE0B */ lb $t0, %lo(gCupCourseSelection)($t0) -/* 0A64CC 800A58CC 8318EE09 */ lb $t8, %lo(gCupSelection)($t8) -/* 0A64D0 800A58D0 3C0B800F */ lui $t3, %hi(gCupCourseOrder) -/* 0A64D4 800A58D4 00084840 */ sll $t1, $t0, 1 -/* 0A64D8 800A58D8 0018C8C0 */ sll $t9, $t8, 3 -/* 0A64DC 800A58DC 03295021 */ addu $t2, $t9, $t1 -/* 0A64E0 800A58E0 016A5821 */ addu $t3, $t3, $t2 -/* 0A64E4 800A58E4 856B2BB4 */ lh $t3, %lo(gCupCourseOrder)($t3) -/* 0A64E8 800A58E8 3C013F80 */ li $at, 0x3F800000 # 1.000000 -/* 0A64EC 800A58EC 44810000 */ mtc1 $at, $f0 -/* 0A64F0 800A58F0 3C06800E */ lui $a2, %hi(D_800E7574) -/* 0A64F4 800A58F4 000B6080 */ sll $t4, $t3, 2 -/* 0A64F8 800A58F8 00CC3021 */ addu $a2, $a2, $t4 -/* 0A64FC 800A58FC 8CC67574 */ lw $a2, %lo(D_800E7574)($a2) -/* 0A6500 800A5900 240400A0 */ li $a0, 160 -/* 0A6504 800A5904 24050050 */ li $a1, 80 -/* 0A6508 800A5908 00003825 */ move $a3, $zero -/* 0A650C 800A590C E7A00010 */ swc1 $f0, 0x10($sp) -/* 0A6510 800A5910 0C024DD5 */ jal func_80093754 -/* 0A6514 800A5914 E7A00014 */ swc1 $f0, 0x14($sp) -/* 0A6518 800A5918 8E630004 */ lw $v1, 4($s3) -/* 0A651C 800A591C 246DFFFF */ addiu $t5, $v1, -1 -/* 0A6520 800A5920 2DA10029 */ sltiu $at, $t5, 0x29 -/* 0A6524 800A5924 1020019A */ beqz $at, .L800A5F90 -/* 0A6528 800A5928 000D6880 */ sll $t5, $t5, 2 -/* 0A652C 800A592C 3C01800F */ lui $at, %hi(jpt_800F1DDC) -/* 0A6530 800A5930 002D0821 */ addu $at, $at, $t5 -/* 0A6534 800A5934 8C2D1DDC */ lw $t5, %lo(jpt_800F1DDC)($at) -/* 0A6538 800A5938 01A00008 */ jr $t5 -/* 0A653C 800A593C 00000000 */ nop -glabel L800A5940 -/* 0A6540 800A5940 0C024C36 */ jal set_text_color -/* 0A6544 800A5944 24040002 */ li $a0, 2 -/* 0A6548 800A5948 3C01800F */ lui $at, %hi(D_800F1E80) # $at, 0x800f -/* 0A654C 800A594C C4341E80 */ lwc1 $f20, %lo(D_800F1E80)($at) -/* 0A6550 800A5950 3C12800E */ lui $s2, %hi(D_800E7728) # $s2, 0x800e -/* 0A6554 800A5954 26527728 */ addiu $s2, %lo(D_800E7728) # addiu $s2, $s2, 0x7728 -/* 0A6558 800A5958 8E460000 */ lw $a2, ($s2) -/* 0A655C 800A595C 2404009D */ li $a0, 157 -/* 0A6560 800A5960 24050060 */ li $a1, 96 -/* 0A6564 800A5964 00003825 */ move $a3, $zero -/* 0A6568 800A5968 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A656C 800A596C 0C024DD5 */ jal func_80093754 -/* 0A6570 800A5970 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A6574 800A5974 0C02D389 */ jal func_800B4E24 -/* 0A6578 800A5978 00002025 */ move $a0, $zero -/* 0A657C 800A597C 3C01000F */ lui $at, (0x000FFFFF >> 16) # lui $at, 0xf -/* 0A6580 800A5980 3421FFFF */ ori $at, (0x000FFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0A6584 800A5984 27B00084 */ addiu $s0, $sp, 0x84 -/* 0A6588 800A5988 00412024 */ and $a0, $v0, $at -/* 0A658C 800A598C 00808825 */ move $s1, $a0 -/* 0A6590 800A5990 0C029E3D */ jal get_time_record_minutes -/* 0A6594 800A5994 02002825 */ move $a1, $s0 -/* 0A6598 800A5998 2404007F */ li $a0, 127 -/* 0A659C 800A599C 2405006D */ li $a1, 109 -/* 0A65A0 800A59A0 02003025 */ move $a2, $s0 -/* 0A65A4 800A59A4 00003825 */ move $a3, $zero -/* 0A65A8 800A59A8 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A65AC 800A59AC 0C024E7F */ jal text_draw -/* 0A65B0 800A59B0 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A65B4 800A59B4 3C06800F */ lui $a2, %hi(D_800F0C6C) # $a2, 0x800f -/* 0A65B8 800A59B8 24C60C6C */ addiu $a2, %lo(D_800F0C6C) # addiu $a2, $a2, 0xc6c -/* 0A65BC 800A59BC 2404008E */ li $a0, 142 -/* 0A65C0 800A59C0 2405006D */ li $a1, 109 -/* 0A65C4 800A59C4 00003825 */ move $a3, $zero -/* 0A65C8 800A59C8 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A65CC 800A59CC 0C024CD6 */ jal func_80093358 -/* 0A65D0 800A59D0 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A65D4 800A59D4 02202025 */ move $a0, $s1 -/* 0A65D8 800A59D8 0C029E51 */ jal get_time_record_seconds -/* 0A65DC 800A59DC 02002825 */ move $a1, $s0 -/* 0A65E0 800A59E0 24040098 */ li $a0, 152 -/* 0A65E4 800A59E4 2405006D */ li $a1, 109 -/* 0A65E8 800A59E8 02003025 */ move $a2, $s0 -/* 0A65EC 800A59EC 00003825 */ move $a3, $zero -/* 0A65F0 800A59F0 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A65F4 800A59F4 0C024E7F */ jal text_draw -/* 0A65F8 800A59F8 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A65FC 800A59FC 3C06800F */ lui $a2, %hi(D_800F0C70) # $a2, 0x800f -/* 0A6600 800A5A00 24C60C70 */ addiu $a2, %lo(D_800F0C70) # addiu $a2, $a2, 0xc70 -/* 0A6604 800A5A04 240400A7 */ li $a0, 167 -/* 0A6608 800A5A08 2405006D */ li $a1, 109 -/* 0A660C 800A5A0C 00003825 */ move $a3, $zero -/* 0A6610 800A5A10 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A6614 800A5A14 0C024CD6 */ jal func_80093358 -/* 0A6618 800A5A18 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A661C 800A5A1C 02202025 */ move $a0, $s1 -/* 0A6620 800A5A20 0C029E69 */ jal get_time_record_centiseconds -/* 0A6624 800A5A24 02002825 */ move $a1, $s0 -/* 0A6628 800A5A28 240400B3 */ li $a0, 179 -/* 0A662C 800A5A2C 2405006D */ li $a1, 109 -/* 0A6630 800A5A30 02003025 */ move $a2, $s0 -/* 0A6634 800A5A34 00003825 */ move $a3, $zero -/* 0A6638 800A5A38 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A663C 800A5A3C 0C024E7F */ jal text_draw -/* 0A6640 800A5A40 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A6644 800A5A44 2404009D */ li $a0, 157 -/* 0A6648 800A5A48 2405007C */ li $a1, 124 -/* 0A664C 800A5A4C 8E460004 */ lw $a2, 4($s2) -/* 0A6650 800A5A50 00003825 */ move $a3, $zero -/* 0A6654 800A5A54 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A6658 800A5A58 0C024DD5 */ jal func_80093754 -/* 0A665C 800A5A5C E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A6660 800A5A60 0C02D3CB */ jal func_800B4F2C -/* 0A6664 800A5A64 00000000 */ nop -/* 0A6668 800A5A68 3C01000F */ lui $at, (0x000FFFFF >> 16) # lui $at, 0xf -/* 0A666C 800A5A6C 3421FFFF */ ori $at, (0x000FFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 0A6670 800A5A70 00412024 */ and $a0, $v0, $at -/* 0A6674 800A5A74 00808825 */ move $s1, $a0 -/* 0A6678 800A5A78 0C029E3D */ jal get_time_record_minutes -/* 0A667C 800A5A7C 02002825 */ move $a1, $s0 -/* 0A6680 800A5A80 2404007F */ li $a0, 127 -/* 0A6684 800A5A84 24050089 */ li $a1, 137 -/* 0A6688 800A5A88 02003025 */ move $a2, $s0 -/* 0A668C 800A5A8C 00003825 */ move $a3, $zero -/* 0A6690 800A5A90 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A6694 800A5A94 0C024E7F */ jal text_draw -/* 0A6698 800A5A98 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A669C 800A5A9C 3C06800F */ lui $a2, %hi(D_800F0C74) # $a2, 0x800f -/* 0A66A0 800A5AA0 24C60C74 */ addiu $a2, %lo(D_800F0C74) # addiu $a2, $a2, 0xc74 -/* 0A66A4 800A5AA4 2404008E */ li $a0, 142 -/* 0A66A8 800A5AA8 24050089 */ li $a1, 137 -/* 0A66AC 800A5AAC 00003825 */ move $a3, $zero -/* 0A66B0 800A5AB0 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A66B4 800A5AB4 0C024CD6 */ jal func_80093358 -/* 0A66B8 800A5AB8 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A66BC 800A5ABC 02202025 */ move $a0, $s1 -/* 0A66C0 800A5AC0 0C029E51 */ jal get_time_record_seconds -/* 0A66C4 800A5AC4 02002825 */ move $a1, $s0 -/* 0A66C8 800A5AC8 24040098 */ li $a0, 152 -/* 0A66CC 800A5ACC 24050089 */ li $a1, 137 -/* 0A66D0 800A5AD0 02003025 */ move $a2, $s0 -/* 0A66D4 800A5AD4 00003825 */ move $a3, $zero -/* 0A66D8 800A5AD8 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A66DC 800A5ADC 0C024E7F */ jal text_draw -/* 0A66E0 800A5AE0 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A66E4 800A5AE4 3C06800F */ lui $a2, %hi(D_800F0C78) # $a2, 0x800f -/* 0A66E8 800A5AE8 24C60C78 */ addiu $a2, %lo(D_800F0C78) # addiu $a2, $a2, 0xc78 -/* 0A66EC 800A5AEC 240400A7 */ li $a0, 167 -/* 0A66F0 800A5AF0 24050089 */ li $a1, 137 -/* 0A66F4 800A5AF4 00003825 */ move $a3, $zero -/* 0A66F8 800A5AF8 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A66FC 800A5AFC 0C024CD6 */ jal func_80093358 -/* 0A6700 800A5B00 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A6704 800A5B04 02202025 */ move $a0, $s1 -/* 0A6708 800A5B08 0C029E69 */ jal get_time_record_centiseconds -/* 0A670C 800A5B0C 02002825 */ move $a1, $s0 -/* 0A6710 800A5B10 240400B3 */ li $a0, 179 -/* 0A6714 800A5B14 24050089 */ li $a1, 137 -/* 0A6718 800A5B18 02003025 */ move $a2, $s0 -/* 0A671C 800A5B1C 00003825 */ move $a3, $zero -/* 0A6720 800A5B20 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A6724 800A5B24 0C024E7F */ jal text_draw -/* 0A6728 800A5B28 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A672C 800A5B2C 3C013F40 */ li $at, 0x3F400000 # 0.750000 -/* 0A6730 800A5B30 3C02800E */ lui $v0, %hi(gTextPauseButton) # $v0, 0x800e -/* 0A6734 800A5B34 4481A000 */ mtc1 $at, $f20 -/* 0A6738 800A5B38 2442775C */ addiu $v0, %lo(gTextPauseButton) # addiu $v0, $v0, 0x775c -/* 0A673C 800A5B3C 00008825 */ move $s1, $zero -/* 0A6740 800A5B40 00008025 */ move $s0, $zero -/* 0A6744 800A5B44 24120006 */ li $s2, 6 -.L800A5B48: -/* 0A6748 800A5B48 8E640004 */ lw $a0, 4($s3) -/* 0A674C 800A5B4C AFA20050 */ sw $v0, 0x50($sp) -/* 0A6750 800A5B50 02202825 */ move $a1, $s1 -/* 0A6754 800A5B54 24060001 */ li $a2, 1 -/* 0A6758 800A5B58 0C024870 */ jal text_rainbow_effect -/* 0A675C 800A5B5C 2484FFF5 */ addiu $a0, $a0, -0xb -/* 0A6760 800A5B60 3C0E800F */ lui $t6, %hi(D_800E8538 + 2) # $t6, 0x800f -/* 0A6764 800A5B64 8FA20050 */ lw $v0, 0x50($sp) -/* 0A6768 800A5B68 85CE853A */ lh $t6, %lo(D_800E8538 + 2)($t6) -/* 0A676C 800A5B6C 3C04800F */ lui $a0, %hi(D_800E8538) # $a0, 0x800f -/* 0A6770 800A5B70 84848538 */ lh $a0, %lo(D_800E8538)($a0) -/* 0A6774 800A5B74 00003825 */ move $a3, $zero -/* 0A6778 800A5B78 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A677C 800A5B7C E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A6780 800A5B80 8C460004 */ lw $a2, 4($v0) -/* 0A6784 800A5B84 0C024CD6 */ jal func_80093358 -/* 0A6788 800A5B88 01D02821 */ addu $a1, $t6, $s0 -/* 0A678C 800A5B8C 8FA20050 */ lw $v0, 0x50($sp) -/* 0A6790 800A5B90 26310001 */ addiu $s1, $s1, 1 -/* 0A6794 800A5B94 2610000D */ addiu $s0, $s0, 0xd -/* 0A6798 800A5B98 1632FFEB */ bne $s1, $s2, .L800A5B48 -/* 0A679C 800A5B9C 24420004 */ addiu $v0, $v0, 4 -/* 0A67A0 800A5BA0 100000FB */ b .L800A5F90 -/* 0A67A4 800A5BA4 8E630004 */ lw $v1, 4($s3) -glabel L800A5BA8 -/* 0A67A8 800A5BA8 0C024C36 */ jal set_text_color -/* 0A67AC 800A5BAC 24040003 */ li $a0, 3 -/* 0A67B0 800A5BB0 8E630004 */ lw $v1, 4($s3) -/* 0A67B4 800A5BB4 3C08800E */ lui $t0, %hi(D_800E798C) # $t0, 0x800e -/* 0A67B8 800A5BB8 2508798C */ addiu $t0, %lo(D_800E798C) # addiu $t0, $t0, 0x798c -/* 0A67BC 800A5BBC 2463FFEB */ addiu $v1, $v1, -0x15 -/* 0A67C0 800A5BC0 000378C0 */ sll $t7, $v1, 3 -/* 0A67C4 800A5BC4 01E37823 */ subu $t7, $t7, $v1 -/* 0A67C8 800A5BC8 000FC080 */ sll $t8, $t7, 2 -/* 0A67CC 800A5BCC 3C01800F */ lui $at, %hi(D_800F1E84) # $at, 0x800f -/* 0A67D0 800A5BD0 C4341E84 */ lwc1 $f20, %lo(D_800F1E84)($at) -/* 0A67D4 800A5BD4 03081021 */ addu $v0, $t8, $t0 -/* 0A67D8 800A5BD8 2410006E */ li $s0, 110 -/* 0A67DC 800A5BDC 241100C9 */ li $s1, 201 -.L800A5BE0: -/* 0A67E0 800A5BE0 2404004D */ li $a0, 77 -/* 0A67E4 800A5BE4 02002825 */ move $a1, $s0 -/* 0A67E8 800A5BE8 8C460000 */ lw $a2, ($v0) -/* 0A67EC 800A5BEC 00003825 */ move $a3, $zero -/* 0A67F0 800A5BF0 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A67F4 800A5BF4 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A67F8 800A5BF8 0C024CC9 */ jal func_80093324 -/* 0A67FC 800A5BFC AFA20050 */ sw $v0, 0x50($sp) -/* 0A6800 800A5C00 8FA20050 */ lw $v0, 0x50($sp) -/* 0A6804 800A5C04 2610000D */ addiu $s0, $s0, 0xd -/* 0A6808 800A5C08 1611FFF5 */ bne $s0, $s1, .L800A5BE0 -/* 0A680C 800A5C0C 24420004 */ addiu $v0, $v0, 4 -/* 0A6810 800A5C10 100000DF */ b .L800A5F90 -/* 0A6814 800A5C14 8E630004 */ lw $v1, 4($s3) -glabel L800A5C18 -/* 0A6818 800A5C18 0C024C36 */ jal set_text_color -/* 0A681C 800A5C1C 24040001 */ li $a0, 1 -/* 0A6820 800A5C20 3C02800E */ lui $v0, %hi(D_800E7A3C) # $v0, 0x800e -/* 0A6824 800A5C24 3C01800F */ lui $at, %hi(D_800F1E88) # $at, 0x800f -/* 0A6828 800A5C28 3C11800E */ lui $s1, %hi(D_800E7A44) # $s1, 0x800e -/* 0A682C 800A5C2C 26317A44 */ addiu $s1, %lo(D_800E7A44) # addiu $s1, $s1, 0x7a44 -/* 0A6830 800A5C30 C4341E88 */ lwc1 $f20, %lo(D_800F1E88)($at) -/* 0A6834 800A5C34 24427A3C */ addiu $v0, %lo(D_800E7A3C) # addiu $v0, $v0, 0x7a3c -/* 0A6838 800A5C38 00008025 */ move $s0, $zero -/* 0A683C 800A5C3C 8E790010 */ lw $t9, 0x10($s3) -.L800A5C40: -/* 0A6840 800A5C40 AFA20050 */ sw $v0, 0x50($sp) -/* 0A6844 800A5C44 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A6848 800A5C48 03302821 */ addu $a1, $t9, $s0 -/* 0A684C 800A5C4C 24A5006E */ addiu $a1, $a1, 0x6e -/* 0A6850 800A5C50 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A6854 800A5C54 2404005A */ li $a0, 90 -/* 0A6858 800A5C58 8C460000 */ lw $a2, ($v0) -/* 0A685C 800A5C5C 0C024CC9 */ jal func_80093324 -/* 0A6860 800A5C60 00003825 */ move $a3, $zero -/* 0A6864 800A5C64 8FA20050 */ lw $v0, 0x50($sp) -/* 0A6868 800A5C68 2610000D */ addiu $s0, $s0, 0xd -/* 0A686C 800A5C6C 24420004 */ addiu $v0, $v0, 4 -/* 0A6870 800A5C70 0051082B */ sltu $at, $v0, $s1 -/* 0A6874 800A5C74 5420FFF2 */ bnel $at, $zero, .L800A5C40 -/* 0A6878 800A5C78 8E790010 */ lw $t9, 0x10($s3) -/* 0A687C 800A5C7C 3C013F40 */ li $at, 0x3F400000 # 0.750000 -/* 0A6880 800A5C80 3C128019 */ lui $s2, %hi(D_8018EE10) # $s2, 0x8019 -/* 0A6884 800A5C84 4481A000 */ mtc1 $at, $f20 -/* 0A6888 800A5C88 2652EE10 */ addiu $s2, %lo(D_8018EE10) # addiu $s2, $s2, -0x11f0 -/* 0A688C 800A5C8C 00008825 */ move $s1, $zero -/* 0A6890 800A5C90 24100096 */ li $s0, 150 -.L800A5C94: -/* 0A6894 800A5C94 8E640004 */ lw $a0, 4($s3) -/* 0A6898 800A5C98 02202825 */ move $a1, $s1 -/* 0A689C 800A5C9C 24060001 */ li $a2, 1 -/* 0A68A0 800A5CA0 0C024870 */ jal text_rainbow_effect -/* 0A68A4 800A5CA4 2484FFE2 */ addiu $a0, $a0, -0x1e -/* 0A68A8 800A5CA8 26240001 */ addiu $a0, $s1, 1 -/* 0A68AC 800A5CAC AFA40054 */ sw $a0, 0x54($sp) -/* 0A68B0 800A5CB0 0C029E25 */ jal convert_number_to_ascii -/* 0A68B4 800A5CB4 27A5005C */ addiu $a1, $sp, 0x5c -/* 0A68B8 800A5CB8 8E69000C */ lw $t1, 0xc($s3) -/* 0A68BC 800A5CBC 240A005A */ li $t2, 90 -/* 0A68C0 800A5CC0 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A68C4 800A5CC4 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A68C8 800A5CC8 02002825 */ move $a1, $s0 -/* 0A68CC 800A5CCC 27A6005D */ addiu $a2, $sp, 0x5d -/* 0A68D0 800A5CD0 00003825 */ move $a3, $zero -/* 0A68D4 800A5CD4 0C024CC9 */ jal func_80093324 -/* 0A68D8 800A5CD8 01492023 */ subu $a0, $t2, $t1 -/* 0A68DC 800A5CDC 924B0004 */ lbu $t3, 4($s2) -/* 0A68E0 800A5CE0 240F0069 */ li $t7, 105 -/* 0A68E4 800A5CE4 02002825 */ move $a1, $s0 -/* 0A68E8 800A5CE8 1560000D */ bnez $t3, .L800A5D20 -/* 0A68EC 800A5CEC 3C06800E */ lui $a2, %hi(D_800E75C4) -/* 0A68F0 800A5CF0 8E6C000C */ lw $t4, 0xc($s3) -/* 0A68F4 800A5CF4 240D0069 */ li $t5, 105 -/* 0A68F8 800A5CF8 3C06800E */ lui $a2, %hi(D_800E7A44) # $a2, 0x800e -/* 0A68FC 800A5CFC 8CC67A44 */ lw $a2, %lo(D_800E7A44)($a2) -/* 0A6900 800A5D00 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A6904 800A5D04 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A6908 800A5D08 02002825 */ move $a1, $s0 -/* 0A690C 800A5D0C 00003825 */ move $a3, $zero -/* 0A6910 800A5D10 0C024CC9 */ jal func_80093324 -/* 0A6914 800A5D14 01AC2023 */ subu $a0, $t5, $t4 -/* 0A6918 800A5D18 1000001B */ b .L800A5D88 -/* 0A691C 800A5D1C 8FB10054 */ lw $s1, 0x54($sp) -.L800A5D20: -/* 0A6920 800A5D20 82420005 */ lb $v0, 5($s2) -/* 0A6924 800A5D24 3C0B800F */ lui $t3, %hi(gCupCourseOrder) -/* 0A6928 800A5D28 8E6E000C */ lw $t6, 0xc($s3) -/* 0A692C 800A5D2C E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A6930 800A5D30 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A6934 800A5D34 00003825 */ move $a3, $zero -/* 0A6938 800A5D38 01EE2023 */ subu $a0, $t7, $t6 -/* 0A693C 800A5D3C 04410003 */ bgez $v0, .L800A5D4C -/* 0A6940 800A5D40 0002C083 */ sra $t8, $v0, 2 -/* 0A6944 800A5D44 24410003 */ addiu $at, $v0, 3 -/* 0A6948 800A5D48 0001C083 */ sra $t8, $at, 2 -.L800A5D4C: -/* 0A694C 800A5D4C 001840C0 */ sll $t0, $t8, 3 -/* 0A6950 800A5D50 04410004 */ bgez $v0, .L800A5D64 -/* 0A6954 800A5D54 30590003 */ andi $t9, $v0, 3 -/* 0A6958 800A5D58 13200002 */ beqz $t9, .L800A5D64 -/* 0A695C 800A5D5C 00000000 */ nop -/* 0A6960 800A5D60 2739FFFC */ addiu $t9, $t9, -4 -.L800A5D64: -/* 0A6964 800A5D64 00195040 */ sll $t2, $t9, 1 -/* 0A6968 800A5D68 010A4821 */ addu $t1, $t0, $t2 -/* 0A696C 800A5D6C 01695821 */ addu $t3, $t3, $t1 -/* 0A6970 800A5D70 856B2BB4 */ lh $t3, %lo(gCupCourseOrder)($t3) -/* 0A6974 800A5D74 000B6880 */ sll $t5, $t3, 2 -/* 0A6978 800A5D78 00CD3021 */ addu $a2, $a2, $t5 -/* 0A697C 800A5D7C 0C024CC9 */ jal func_80093324 -/* 0A6980 800A5D80 8CC675C4 */ lw $a2, %lo(D_800E75C4)($a2) -/* 0A6984 800A5D84 8FB10054 */ lw $s1, 0x54($sp) -.L800A5D88: -/* 0A6988 800A5D88 24010002 */ li $at, 2 -/* 0A698C 800A5D8C 26100014 */ addiu $s0, $s0, 0x14 -/* 0A6990 800A5D90 1621FFC0 */ bne $s1, $at, .L800A5C94 -/* 0A6994 800A5D94 26520080 */ addiu $s2, $s2, 0x80 -/* 0A6998 800A5D98 1000007D */ b .L800A5F90 -/* 0A699C 800A5D9C 8E630004 */ lw $v1, 4($s3) -glabel L800A5DA0 -/* 0A69A0 800A5DA0 0C024C36 */ jal set_text_color -/* 0A69A4 800A5DA4 24040003 */ li $a0, 3 -/* 0A69A8 800A5DA8 3C02800E */ lui $v0, %hi(D_800E7A48) # $v0, 0x800e -/* 0A69AC 800A5DAC 3C01800F */ lui $at, %hi(D_800F1E8C) # $at, 0x800f -/* 0A69B0 800A5DB0 3C11800E */ lui $s1, %hi(D_800E7A54) # $s1, 0x800e -/* 0A69B4 800A5DB4 26317A54 */ addiu $s1, %lo(D_800E7A54) # addiu $s1, $s1, 0x7a54 -/* 0A69B8 800A5DB8 C4341E8C */ lwc1 $f20, %lo(D_800F1E8C)($at) -/* 0A69BC 800A5DBC 24427A48 */ addiu $v0, %lo(D_800E7A48) # addiu $v0, $v0, 0x7a48 -/* 0A69C0 800A5DC0 2410006E */ li $s0, 110 -/* 0A69C4 800A5DC4 24040064 */ li $a0, 100 -.L800A5DC8: -/* 0A69C8 800A5DC8 02002825 */ move $a1, $s0 -/* 0A69CC 800A5DCC 8C460000 */ lw $a2, ($v0) -/* 0A69D0 800A5DD0 00003825 */ move $a3, $zero -/* 0A69D4 800A5DD4 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A69D8 800A5DD8 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A69DC 800A5DDC 0C024CC9 */ jal func_80093324 -/* 0A69E0 800A5DE0 AFA20050 */ sw $v0, 0x50($sp) -/* 0A69E4 800A5DE4 8FA20050 */ lw $v0, 0x50($sp) -/* 0A69E8 800A5DE8 2610000D */ addiu $s0, $s0, 0xd -/* 0A69EC 800A5DEC 24420004 */ addiu $v0, $v0, 4 -/* 0A69F0 800A5DF0 5451FFF5 */ bnel $v0, $s1, .L800A5DC8 -/* 0A69F4 800A5DF4 24040064 */ li $a0, 100 -/* 0A69F8 800A5DF8 10000065 */ b .L800A5F90 -/* 0A69FC 800A5DFC 8E630004 */ lw $v1, 4($s3) -glabel L800A5E00 -/* 0A6A00 800A5E00 0C024C36 */ jal set_text_color -/* 0A6A04 800A5E04 24040003 */ li $a0, 3 -/* 0A6A08 800A5E08 3C02800E */ lui $v0, %hi(D_800E7A60) # $v0, 0x800e -/* 0A6A0C 800A5E0C 3C01800F */ lui $at, %hi(D_800F1E90) # $at, 0x800f -/* 0A6A10 800A5E10 3C11800E */ lui $s1, %hi(D_800E7A6C) # $s1, 0x800e -/* 0A6A14 800A5E14 26317A6C */ addiu $s1, %lo(D_800E7A6C) # addiu $s1, $s1, 0x7a6c -/* 0A6A18 800A5E18 C4341E90 */ lwc1 $f20, %lo(D_800F1E90)($at) -/* 0A6A1C 800A5E1C 24427A60 */ addiu $v0, %lo(D_800E7A60) # addiu $v0, $v0, 0x7a60 -/* 0A6A20 800A5E20 00008025 */ move $s0, $zero -/* 0A6A24 800A5E24 8E6C0010 */ lw $t4, 0x10($s3) -.L800A5E28: -/* 0A6A28 800A5E28 AFA20050 */ sw $v0, 0x50($sp) -/* 0A6A2C 800A5E2C E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A6A30 800A5E30 01902821 */ addu $a1, $t4, $s0 -/* 0A6A34 800A5E34 24A5006E */ addiu $a1, $a1, 0x6e -/* 0A6A38 800A5E38 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A6A3C 800A5E3C 24040055 */ li $a0, 85 -/* 0A6A40 800A5E40 8C460000 */ lw $a2, ($v0) -/* 0A6A44 800A5E44 0C024CC9 */ jal func_80093324 -/* 0A6A48 800A5E48 00003825 */ move $a3, $zero -/* 0A6A4C 800A5E4C 8FA20050 */ lw $v0, 0x50($sp) -/* 0A6A50 800A5E50 2610000D */ addiu $s0, $s0, 0xd -/* 0A6A54 800A5E54 24420004 */ addiu $v0, $v0, 4 -/* 0A6A58 800A5E58 0051082B */ sltu $at, $v0, $s1 -/* 0A6A5C 800A5E5C 5420FFF2 */ bnel $at, $zero, .L800A5E28 -/* 0A6A60 800A5E60 8E6C0010 */ lw $t4, 0x10($s3) -/* 0A6A64 800A5E64 3C02800E */ lui $v0, %hi(D_800E7A6C) # $v0, 0x800e -/* 0A6A68 800A5E68 24427A6C */ addiu $v0, %lo(D_800E7A6C) # addiu $v0, $v0, 0x7a6c -/* 0A6A6C 800A5E6C 00008825 */ move $s1, $zero -/* 0A6A70 800A5E70 2410009B */ li $s0, 155 -/* 0A6A74 800A5E74 2412007D */ li $s2, 125 -.L800A5E78: -/* 0A6A78 800A5E78 8E640004 */ lw $a0, 4($s3) -/* 0A6A7C 800A5E7C AFA20050 */ sw $v0, 0x50($sp) -/* 0A6A80 800A5E80 02202825 */ move $a1, $s1 -/* 0A6A84 800A5E84 24060001 */ li $a2, 1 -/* 0A6A88 800A5E88 0C024870 */ jal text_rainbow_effect -/* 0A6A8C 800A5E8C 2484FFDD */ addiu $a0, $a0, -0x23 -/* 0A6A90 800A5E90 8FA20050 */ lw $v0, 0x50($sp) -/* 0A6A94 800A5E94 8E6F000C */ lw $t7, 0xc($s3) -/* 0A6A98 800A5E98 E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A6A9C 800A5E9C E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A6AA0 800A5EA0 02002825 */ move $a1, $s0 -/* 0A6AA4 800A5EA4 00003825 */ move $a3, $zero -/* 0A6AA8 800A5EA8 8C460000 */ lw $a2, ($v0) -/* 0A6AAC 800A5EAC 0C024CC9 */ jal func_80093324 -/* 0A6AB0 800A5EB0 024F2023 */ subu $a0, $s2, $t7 -/* 0A6AB4 800A5EB4 8FA20050 */ lw $v0, 0x50($sp) -/* 0A6AB8 800A5EB8 26310001 */ addiu $s1, $s1, 1 -/* 0A6ABC 800A5EBC 24010002 */ li $at, 2 -/* 0A6AC0 800A5EC0 2610000F */ addiu $s0, $s0, 0xf -/* 0A6AC4 800A5EC4 1621FFEC */ bne $s1, $at, .L800A5E78 -/* 0A6AC8 800A5EC8 24420004 */ addiu $v0, $v0, 4 -/* 0A6ACC 800A5ECC 10000030 */ b .L800A5F90 -/* 0A6AD0 800A5ED0 8E630004 */ lw $v1, 4($s3) -glabel L800A5ED4 -/* 0A6AD4 800A5ED4 0C024C36 */ jal set_text_color -/* 0A6AD8 800A5ED8 24040003 */ li $a0, 3 -/* 0A6ADC 800A5EDC 3C02800E */ lui $v0, %hi(D_800E7A74) # $v0, 0x800e -/* 0A6AE0 800A5EE0 3C01800F */ lui $at, %hi(D_800F1E94) # $at, 0x800f -/* 0A6AE4 800A5EE4 3C11800E */ lui $s1, %hi(D_800E7A80) # $s1, 0x800e -/* 0A6AE8 800A5EE8 26317A80 */ addiu $s1, %lo(D_800E7A80) # addiu $s1, $s1, 0x7a80 -/* 0A6AEC 800A5EEC C4341E94 */ lwc1 $f20, %lo(D_800F1E94)($at) -/* 0A6AF0 800A5EF0 24427A74 */ addiu $v0, %lo(D_800E7A74) # addiu $v0, $v0, 0x7a74 -/* 0A6AF4 800A5EF4 2410006E */ li $s0, 110 -/* 0A6AF8 800A5EF8 24040055 */ li $a0, 85 -.L800A5EFC: -/* 0A6AFC 800A5EFC 02002825 */ move $a1, $s0 -/* 0A6B00 800A5F00 8C460000 */ lw $a2, ($v0) -/* 0A6B04 800A5F04 00003825 */ move $a3, $zero -/* 0A6B08 800A5F08 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A6B0C 800A5F0C E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A6B10 800A5F10 0C024CC9 */ jal func_80093324 -/* 0A6B14 800A5F14 AFA20050 */ sw $v0, 0x50($sp) -/* 0A6B18 800A5F18 8FA20050 */ lw $v0, 0x50($sp) -/* 0A6B1C 800A5F1C 2610000D */ addiu $s0, $s0, 0xd -/* 0A6B20 800A5F20 24420004 */ addiu $v0, $v0, 4 -/* 0A6B24 800A5F24 5451FFF5 */ bnel $v0, $s1, .L800A5EFC -/* 0A6B28 800A5F28 24040055 */ li $a0, 85 -/* 0A6B2C 800A5F2C 10000018 */ b .L800A5F90 -/* 0A6B30 800A5F30 8E630004 */ lw $v1, 4($s3) -glabel L800A5F34 -/* 0A6B34 800A5F34 0C024C36 */ jal set_text_color -/* 0A6B38 800A5F38 24040003 */ li $a0, 3 -/* 0A6B3C 800A5F3C 3C02800E */ lui $v0, %hi(D_800E7A80) # $v0, 0x800e -/* 0A6B40 800A5F40 3C01800F */ lui $at, %hi(D_800F1E98) # $at, 0x800f -/* 0A6B44 800A5F44 3C11800E */ lui $s1, %hi(D_800E7A88) # $s1, 0x800e -/* 0A6B48 800A5F48 26317A88 */ addiu $s1, %lo(D_800E7A88) # addiu $s1, $s1, 0x7a88 -/* 0A6B4C 800A5F4C C4341E98 */ lwc1 $f20, %lo(D_800F1E98)($at) -/* 0A6B50 800A5F50 24427A80 */ addiu $v0, %lo(D_800E7A80) # addiu $v0, $v0, 0x7a80 -/* 0A6B54 800A5F54 2410006E */ li $s0, 110 -/* 0A6B58 800A5F58 2404005D */ li $a0, 93 -.L800A5F5C: -/* 0A6B5C 800A5F5C 02002825 */ move $a1, $s0 -/* 0A6B60 800A5F60 8C460000 */ lw $a2, ($v0) -/* 0A6B64 800A5F64 00003825 */ move $a3, $zero -/* 0A6B68 800A5F68 E7B40010 */ swc1 $f20, 0x10($sp) -/* 0A6B6C 800A5F6C E7B40014 */ swc1 $f20, 0x14($sp) -/* 0A6B70 800A5F70 0C024CC9 */ jal func_80093324 -/* 0A6B74 800A5F74 AFA20050 */ sw $v0, 0x50($sp) -/* 0A6B78 800A5F78 8FA20050 */ lw $v0, 0x50($sp) -/* 0A6B7C 800A5F7C 2610000D */ addiu $s0, $s0, 0xd -/* 0A6B80 800A5F80 24420004 */ addiu $v0, $v0, 4 -/* 0A6B84 800A5F84 5451FFF5 */ bnel $v0, $s1, .L800A5F5C -/* 0A6B88 800A5F88 2404005D */ li $a0, 93 -/* 0A6B8C 800A5F8C 8E630004 */ lw $v1, 4($s3) -.L800A5F90: -glabel L800A5F90 -/* 0A6B90 800A5F90 246EFFF5 */ addiu $t6, $v1, -0xb -/* 0A6B94 800A5F94 2DC1001A */ sltiu $at, $t6, 0x1a -/* 0A6B98 800A5F98 1020001E */ beqz $at, .L800A6014 -/* 0A6B9C 800A5F9C 000E7080 */ sll $t6, $t6, 2 -/* 0A6BA0 800A5FA0 3C01800F */ lui $at, %hi(jpt_800F1E9C) -/* 0A6BA4 800A5FA4 002E0821 */ addu $at, $at, $t6 -/* 0A6BA8 800A5FA8 8C2E1E9C */ lw $t6, %lo(jpt_800F1E9C)($at) -/* 0A6BAC 800A5FAC 01C00008 */ jr $t6 -/* 0A6BB0 800A5FB0 00000000 */ nop -glabel L800A5FB4 -/* 0A6BB4 800A5FB4 0003C0C0 */ sll $t8, $v1, 3 -/* 0A6BB8 800A5FB8 3C08800E */ lui $t0, %hi(D_800E73E0) # $t0, 0x800e -/* 0A6BBC 800A5FBC 250873E0 */ addiu $t0, %lo(D_800E73E0) # addiu $t0, $t0, 0x73e0 -/* 0A6BC0 800A5FC0 2719FFA8 */ addiu $t9, $t8, -0x58 -/* 0A6BC4 800A5FC4 1000000C */ b .L800A5FF8 -/* 0A6BC8 800A5FC8 03281021 */ addu $v0, $t9, $t0 -glabel L800A5FCC -/* 0A6BCC 800A5FCC 000350C0 */ sll $t2, $v1, 3 -/* 0A6BD0 800A5FD0 3C0B800E */ lui $t3, %hi(D_800E7410) # $t3, 0x800e -/* 0A6BD4 800A5FD4 256B7410 */ addiu $t3, %lo(D_800E7410) # addiu $t3, $t3, 0x7410 -/* 0A6BD8 800A5FD8 2549FF10 */ addiu $t1, $t2, -0xf0 -/* 0A6BDC 800A5FDC 10000006 */ b .L800A5FF8 -/* 0A6BE0 800A5FE0 012B1021 */ addu $v0, $t1, $t3 -glabel L800A5FE4 -/* 0A6BE4 800A5FE4 000368C0 */ sll $t5, $v1, 3 -/* 0A6BE8 800A5FE8 3C0F800E */ lui $t7, %hi(D_800E7420) # $t7, 0x800e -/* 0A6BEC 800A5FEC 25EF7420 */ addiu $t7, %lo(D_800E7420) # addiu $t7, $t7, 0x7420 -/* 0A6BF0 800A5FF0 25ACFEE8 */ addiu $t4, $t5, -0x118 -/* 0A6BF4 800A5FF4 018F1021 */ addu $v0, $t4, $t7 -.L800A5FF8: -/* 0A6BF8 800A5FF8 844E0000 */ lh $t6, ($v0) -/* 0A6BFC 800A5FFC 02602025 */ move $a0, $s3 -/* 0A6C00 800A6000 27A50098 */ addiu $a1, $sp, 0x98 -/* 0A6C04 800A6004 A7AE0098 */ sh $t6, 0x98($sp) -/* 0A6C08 800A6008 84580002 */ lh $t8, 2($v0) -/* 0A6C0C 800A600C 0C0299AA */ jal func_800A66A8 -/* 0A6C10 800A6010 A7B8009A */ sh $t8, 0x9a($sp) -.L800A6014: -glabel L800A6014 -/* 0A6C14 800A6014 8FBF0044 */ lw $ra, 0x44($sp) -.L800A6018: -/* 0A6C18 800A6018 D7B40028 */ ldc1 $f20, 0x28($sp) -/* 0A6C1C 800A601C 8FB00034 */ lw $s0, 0x34($sp) -/* 0A6C20 800A6020 8FB10038 */ lw $s1, 0x38($sp) -/* 0A6C24 800A6024 8FB2003C */ lw $s2, 0x3c($sp) -/* 0A6C28 800A6028 8FB30040 */ lw $s3, 0x40($sp) -/* 0A6C2C 800A602C 03E00008 */ jr $ra -/* 0A6C30 800A6030 27BD00A0 */ addiu $sp, $sp, 0xa0 diff --git a/permuter_settings.toml b/permuter_settings.toml index f168fd746..96202e62e 100644 --- a/permuter_settings.toml +++ b/permuter_settings.toml @@ -4,7 +4,7 @@ compiler_type = "ido" [decompme.compilers] -"tools/ido5.3_recomp/cc" = "ido5.3" +"tools/ido-recomp/linux/cc" = "ido5.3" [preserve_macros] "gs?DP.*" = "void" diff --git a/src/buffers.h b/src/buffers.h index e4733579a..51c949536 100644 --- a/src/buffers.h +++ b/src/buffers.h @@ -15,7 +15,21 @@ */ typedef struct { u8 pixel_index_array[0x1000]; -} struct_D_802BFB80; // size = 0x1000 +} struct_D_802BFB80_8; // size = 0x1000 + +typedef struct { + u8 pixel_index_array[0x2000]; +} struct_D_802BFB80_4; // size = 0x1000 + +/* + * In render_player, spawn_players, and staff_ghosts D_802BFB80 is the arraySize8 entry + * But in code_80091750 its the arraySize4 entry + * The only way to unify those 2 things is to use a union +*/ +typedef union { + struct_D_802BFB80_4 arraySize4[2][2][4]; + struct_D_802BFB80_8 arraySize8[2][2][8]; +} union_D_802BFB80; /* * Texture prior to be being decoded via mio0decode @@ -55,7 +69,7 @@ typedef struct { extern u16 gRandomSeed16; extern u8 randomSeedPadding[216]; -extern struct_D_802BFB80 D_802BFB80[][2][8]; +extern union_D_802BFB80 D_802BFB80; extern struct_D_802DFB80 D_802DFB80[][2][8]; /** diff --git a/src/code_80091750.c b/src/code_80091750.c index b03d86051..16849d710 100644 --- a/src/code_80091750.c +++ b/src/code_80091750.c @@ -95,10 +95,11 @@ SaveData gSaveData; u8 D_8018ED90; u8 D_8018ED91; s32 s8018ED94; + f32 D_8018ED98; // Rotation f32 D_8018ED9C; // Rotation - f32 D_8018EDA0; // Rotation + f32 D_8018EDA4; f32 D_8018EDA8; f32 D_8018EDAC; @@ -4867,13 +4868,6 @@ void func_800996BC(MkTexture *arg0, s32 arg1) { GLOBAL_ASM("asm/non_matchings/code_80091750/func_800996BC.s") #endif -#ifdef MIPS_TO_C -// Note that as it stands this function is NOT functionally identical -// However the diff is tiny and there's not really much left to be done -// A potential match found by Vetri: https://decomp.me/scratch/fnW6S -// The only problem with it is that it requires modifying D_802BFB80's dimesnions -// and that seems really really wrong. But a match is a match, so it demands -// more investigation. void func_80099958(MkTexture *arg0, s32 arg1, s32 arg2) { u16 var_a1; u8 *thing; @@ -4891,14 +4885,10 @@ void func_80099958(MkTexture *arg0, s32 arg1, s32 arg2) { var_a1 = ((var_a1 / 8) * 8) + 8; } dma_copy_base_729a30(temp_v0->textureData, var_a1, D_8018D9B4); - // `arg1 % 2` needs to be multiplied by 2, but doing that causes a large diff - mio0decode(D_8018D9B4, D_802BFB80[arg2][arg1 / 2][(arg1 % 2) + 4].pixel_index_array); + mio0decode(D_8018D9B4, D_802BFB80.arraySize4[arg2][arg1 / 2][(arg1 % 2) + 2].pixel_index_array); temp_v0++; } } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_80099958.s") -#endif // Possibly a debug print function? void func_80099A70(void) { @@ -4918,94 +4908,89 @@ void func_80099A94(MkTexture *arg0, s32 arg1) { var_v1->unk_4 = arg1; } -#ifdef MIPS_TO_C -//generated by m2c commit a39b70e85329b0bcaeb4350510ddb23dc9840dce on Feb-04-2024 +#ifdef NON_MATCHING +// https://decomp.me/scratch/rxEoi +// Something's up with the handling of `_textures_0aSegmentRomStart`, I don't know how to fix it void func_80099AEC(void) { - OSIoMesg sp6C; - void *sp68; + s8 var_s4; + s32 var_s0; + s32 stackPadding0; + s32 stackPadding1; + s32 huh; + OSIoMesg sp68; + OSMesg sp64; + u8 *test; s32 sp60; - u8 *sp58; MkTexture *temp_s2; - s32 temp_t7; - s8 var_s5; - struct_8018E060_entry *temp_s1; struct_8018E060_entry *var_s1; - u16 temp_v1; - u16 temp_v1_2; - u16 temp_v1_3; - u16 var_s0; - u16 var_s0_2; - u16 var_s0_3; - void *temp_v0; - void *temp_v0_2; if (gGamestate == 4) { sp60 = 0x00000500; } else { sp60 = 0x00001000; } + + var_s4 = 0; var_s1 = D_8018E060; - temp_s2 = D_8018E060->texture; - var_s5 = 0; - if (temp_s2 != NULL) { - temp_v1 = temp_s2->size; + temp_s2 = var_s1->texture; + + if (temp_s2 == NULL) return; + + huh = temp_s2->size; + if (huh != 0) { + var_s0 = huh; + } else { var_s0 = 0x1400; - if (temp_v1 != 0) { - var_s0 = temp_v1; - } - if (((s32) var_s0 % 8) != 0) { - var_s0 = (((s32) var_s0 / 8) * 8) + 8; - } - osInvalDCache(D_8018D9B4, (u32) var_s0); - sp58 = _textures_0aSegmentRomStart; - osPiStartDma(&sp6C, 0, 0, (u32) &_textures_0aSegmentRomStart[(s32) temp_s2->textureData & 0xFFFFFF], D_8018D9B4, (u32) var_s0, &gDmaMesgQueue); - osRecvMesg(&gDmaMesgQueue, &sp68, 1); -loop_9: - temp_v0 = var_s1->unk8; - if (temp_v0 == NULL) { - var_s5 += 1; + } + if (var_s0 % 8) { + var_s0 = ((var_s0 / 8) * 8) + 8; + } + osInvalDCache(D_8018D9B4, var_s0); + osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4, var_s0, &gDmaMesgQueue); + osRecvMesg(&gDmaMesgQueue, &sp64, 1); + while (1) { + if ((var_s1 + 1)->texture == NULL) { + var_s4 += 1; } else { - temp_v1_2 = temp_v0->unk10; - temp_t7 = sp60 * 4; - if (temp_v1_2 != 0) { - var_s0_2 = temp_v1_2; + temp_s2 = (var_s1 + 1)->texture; + huh = (var_s1 + 1)->texture->size; + if (huh != 0) { + var_s0 = huh; } else { - var_s0_2 = 0x1400; + var_s0 = 0x1400; } - if (((s32) var_s0_2 % 8) != 0) { - var_s0_2 = (((s32) var_s0_2 / 8) * 8) + 8; + if (var_s0 % 8) { + var_s0 = ((var_s0 / 8) * 8) + 8; } - osInvalDCache(temp_t7 + D_8018D9B4, (u32) var_s0_2); - osPiStartDma(&sp6C, 0, 0, (u32) &sp58[temp_v0->unk4 & 0xFFFFFF], temp_t7 + D_8018D9B4, (u32) var_s0_2, &gDmaMesgQueue); + osInvalDCache(D_8018D9B4 + sp60*4, var_s0); + osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4 + sp60*4, var_s0, &gDmaMesgQueue); } - mio0decode(D_8018D9B4, (u8 *) &D_8018D9B0[D_8018E118[var_s1->unk_4].offset]); + mio0decode(D_8018D9B4, &D_8018D9B0[D_8018E118[var_s1->unk_4].offset]); var_s1->texture = NULL; - temp_s1 = var_s1 + 8; - if (var_s5 == 0) { - osRecvMesg(&gDmaMesgQueue, &sp68, 1); - temp_v0_2 = temp_s1->unk8; - if (temp_v0_2 == NULL) { - var_s5 += 1; + var_s1++; + if (var_s4 != 0) break; + osRecvMesg(&gDmaMesgQueue, &sp64, 1); + if ((var_s1 + 1)->texture == NULL) { + var_s4 += 1; + } else { + temp_s2 = (var_s1 + 1)->texture; + huh = (var_s1 + 1)->texture->size; + if (huh != 0) { + var_s0 = huh; } else { - temp_v1_3 = temp_v0_2->unk10; - var_s0_3 = 0x1400; - if (temp_v1_3 != 0) { - var_s0_3 = temp_v1_3; - } - if (((s32) var_s0_3 % 8) != 0) { - var_s0_3 = (((s32) var_s0_3 / 8) * 8) + 8; - } - osInvalDCache(D_8018D9B4, (u32) var_s0_3); - osPiStartDma(&sp6C, 0, 0, (u32) &sp58[temp_v0_2->unk4 & 0xFFFFFF], D_8018D9B4, (u32) var_s0_3, &gDmaMesgQueue); + var_s0 = 0x1400; } - mio0decode((sp60 * 4) + D_8018D9B4, (u8 *) &D_8018D9B0[D_8018E118[temp_s1->unk_4].offset]); - temp_s1->texture = NULL; - var_s1 = temp_s1 + 8; - if (var_s5 == 0) { - osRecvMesg(&gDmaMesgQueue, &sp68, 1); - goto loop_9; + if (var_s0 % 8) { + var_s0 = ((var_s0 / 8) * 8) + 8; } + osInvalDCache(D_8018D9B4, var_s0); + osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4, var_s0, &gDmaMesgQueue); } + mio0decode(D_8018D9B4 + sp60*4, &D_8018D9B0[D_8018E118[var_s1->unk_4].offset]); + var_s1->texture = NULL; + var_s1++; + if (var_s4 != 0) break; + osRecvMesg(&gDmaMesgQueue, &sp64, 1); } } #else @@ -5028,93 +5013,124 @@ void func_80099E60(MkTexture *arg0, s32 arg1, s32 arg2) { var_v1->unk6 = arg2; } -#ifdef MIPS_TO_C -//generated by m2c commit a39b70e85329b0bcaeb4350510ddb23dc9840dce on Feb-04-2024 +#ifdef NON_MATCHING +// https://decomp.me/scratch/rUXbD +// Some fakematch nonsense, may or may not be necessary +// Issue is with instruction ordering near the first `osPiStartDma` call void func_80099EC4(void) { - OSIoMesg sp68; - void *sp64; - MkTexture *temp_s2; - s16 temp_v0_2; - s16 temp_v0_4; s8 var_s4; - struct_8018E0E8_entry *temp_s1; + s32 var_s0; + s32 stackPadding0; + s32 stackPadding1; + OSIoMesg sp68; + OSMesg sp64; + s32 huh; + u8 *test; + MkTexture *temp_s2; struct_8018E0E8_entry *var_s1; - u16 temp_v1; - u16 temp_v1_2; - u16 temp_v1_3; - u16 var_s0; - u16 var_s0_2; - u16 var_s0_3; - void *temp_v0; - void *temp_v0_3; - var_s1 = D_8018E0E8; - temp_s2 = D_8018E0E8->mk64Texture; var_s4 = 0; - if (temp_s2 != NULL) { - temp_v1 = temp_s2->size; + var_s1 = D_8018E0E8; + temp_s2 = var_s1->mk64Texture; + + if (temp_s2 == NULL) return; + + huh = temp_s2->size; + if (huh != 0) { + var_s0 = huh; + } else { var_s0 = 0x1400; - if (temp_v1 != 0) { - var_s0 = temp_v1; - } - if (((s32) var_s0 % 8) != 0) { - var_s0 = (((s32) var_s0 / 8) * 8) + 8; - } - osInvalDCache(D_8018D9B4, (u32) var_s0); - osPiStartDma(&sp68, 0, 0, (u32) &_textures_0aSegmentRomStart[(s32) temp_s2->textureData & 0xFFFFFF], D_8018D9B4, (u32) var_s0, &gDmaMesgQueue); - osRecvMesg(&gDmaMesgQueue, &sp64, 1); -loop_6: - temp_v0 = var_s1->unk8; - if (temp_v0 == NULL) { + } + if (var_s0 % 8) { + var_s0 = ((var_s0 / 8) * 8) + 8; + } + osInvalDCache(D_8018D9B4, var_s0); + test = &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)]; + osPiStartDma(&sp68, 0, 0, test, D_8018D9B4, var_s0, &gDmaMesgQueue); + if ((var_s0 && var_s0) && var_s0) {} + // osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4, var_s0, &gDmaMesgQueue); + osRecvMesg(&gDmaMesgQueue, &sp64, 1); + while (1) { + if ((var_s1 + 1)->mk64Texture == NULL) { var_s4 += 1; } else { - temp_v1_2 = temp_v0->unk10; - var_s0_2 = 0x1400; - if (temp_v1_2 != 0) { - var_s0_2 = temp_v1_2; - } - if (((s32) var_s0_2 % 8) != 0) { - var_s0_2 = (((s32) var_s0_2 / 8) * 8) + 8; - } - osInvalDCache(D_8018D9B4 + 0x1400, (u32) var_s0_2); - osPiStartDma(&sp68, 0, 0, (u32) &_textures_0aSegmentRomStart[temp_v0->unk4 & 0xFFFFFF], D_8018D9B4 + 0x1400, (u32) var_s0_2, &gDmaMesgQueue); - } - temp_v0_2 = var_s1->unk4; - mio0decode(D_8018D9B4, D_802BFB80[var_s1->unk6][temp_v0_2 / 2] + ((temp_v0_2 % 2) << 0xD) + 0x4000); - var_s1->mk64Texture = NULL; - temp_s1 = var_s1 + 8; - if (var_s4 == 0) { - osRecvMesg(&gDmaMesgQueue, &sp64, 1); - temp_v0_3 = temp_s1->unk8; - if (temp_v0_3 == NULL) { - var_s4 += 1; + temp_s2 = (var_s1 + 1)->mk64Texture; + huh = (var_s1 + 1)->mk64Texture->size; + if (huh != 0) { + var_s0 = huh; } else { - temp_v1_3 = temp_v0_3->unk10; - var_s0_3 = 0x1400; - if (temp_v1_3 != 0) { - var_s0_3 = temp_v1_3; - } - if (((s32) var_s0_3 % 8) != 0) { - var_s0_3 = (((s32) var_s0_3 / 8) * 8) + 8; - } - osInvalDCache(D_8018D9B4, (u32) var_s0_3); - osPiStartDma(&sp68, 0, 0, (u32) &_textures_0aSegmentRomStart[temp_v0_3->unk4 & 0xFFFFFF], D_8018D9B4, (u32) var_s0_3, &gDmaMesgQueue); + var_s0 = 0x1400; } - temp_v0_4 = temp_s1->unk4; - mio0decode(D_8018D9B4 + 0x1400, D_802BFB80[temp_s1->unk6][temp_v0_4 / 2] + ((temp_v0_4 % 2) << 0xD) + 0x4000); - temp_s1->mk64Texture = NULL; - var_s1 = temp_s1 + 8; - if (var_s4 == 0) { - osRecvMesg(&gDmaMesgQueue, &sp64, 1); - goto loop_6; + if (var_s0 % 8) { + var_s0 = ((var_s0 / 8) * 8) + 8; } + osInvalDCache(D_8018D9B4 + 0x1400, var_s0); + osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4 + 0x1400, var_s0, &gDmaMesgQueue); } + mio0decode(D_8018D9B4, D_802BFB80.arraySize4[var_s1->unk6][var_s1->unk4 / 2][(var_s1->unk4 % 2) + 2].pixel_index_array); + var_s1->mk64Texture = NULL; + var_s1++; + if (var_s4 != 0) break; + osRecvMesg(&gDmaMesgQueue, &sp64, 1); + if ((var_s1 + 1)->mk64Texture == NULL) { + var_s4 += 1; + } else { + temp_s2 = (var_s1 + 1)->mk64Texture; + huh = (var_s1 + 1)->mk64Texture->size; + if (huh != 0) { + var_s0 = huh; + } else { + var_s0 = 0x1400; + } + if (var_s0 % 8) { + var_s0 = ((var_s0 / 8) * 8) + 8; + } + osInvalDCache(D_8018D9B4, var_s0); + osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4, var_s0, &gDmaMesgQueue); + } + mio0decode(D_8018D9B4 + 0x1400, D_802BFB80.arraySize4[var_s1->unk6][var_s1->unk4 / 2][(var_s1->unk4 % 2) + 2].pixel_index_array); + var_s1->mk64Texture = NULL; + var_s1++; + if (var_s4 != 0) break; + osRecvMesg(&gDmaMesgQueue, &sp64, 1); } } #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_80099EC4.s") #endif +void func_8009A238(MkTexture *arg0, s32 arg1) { + s32 var_a3; + s32 temp_v1; + u64 *sp24; + struct_8018E118_entry *temp_v0; + + temp_v1 = D_8018E118[arg1].offset; + sp24 = arg0->textureData; + var_a3 = arg0->size; + if (var_a3 % 8) { + var_a3 = ((var_a3 / 8) * 8) + 8; + } + dma_copy_base_7fa3c0(sp24, var_a3, D_8018D9B4); + tkmk00decode(D_8018D9B4, D_8018D9B8, &D_8018D9B0[temp_v1], 1); + D_8018E118[arg1].textureData = sp24; +} + +void func_8009A2F0(struct_8018E0E8_entry *arg0) { + MkTexture *var_a0; + struct_8018E0E8_entry *temp_v0; + + temp_v0 = segmented_to_virtual_dupe_2(arg0); + var_a0 = temp_v0->mk64Texture; + while (var_a0 != NULL) { + if (var_a0 == NULL) break; + func_800996BC(var_a0, 0); + if (1) {} + temp_v0++; + var_a0 = temp_v0->mk64Texture; + } +} + void func_8009A344(void) { s32 index; for(index = 0; index < D_8018DEE0_SIZE; index++) { @@ -5732,9 +5748,6 @@ Gfx *func_8009C434(Gfx *arg0, struct_8018DEE0_entry *arg1, s32 arg2, s32 arg3, s return arg0; } -#ifdef NON_MATCHING -// https://decomp.me/scratch/TK1UV -// Some register allocation differences when accessing `D_802BFB80` Gfx *func_8009C708(Gfx *arg0, struct_8018DEE0_entry *arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) { s32 var_t0; s32 thing; @@ -5764,15 +5777,12 @@ Gfx *func_8009C708(Gfx *arg0, struct_8018DEE0_entry *arg1, s32 arg2, s32 arg3, s break; } if (arg5 >= 0) { - arg0 = func_80097E58(arg0, var_t0, 0, 0U, var_s1->width, var_s1->height, var_s1->dX + arg2, var_s1->dY + arg3, D_802BFB80[arg1->unk14][arg4 / 2][((arg4 % 2) + 2) * 2].pixel_index_array, var_s1->width, var_s1->height, (u32) arg5); + arg0 = func_80097E58(arg0, var_t0, 0, 0U, var_s1->width, var_s1->height, var_s1->dX + arg2, var_s1->dY + arg3, D_802BFB80.arraySize4[arg1->unk14][arg4 / 2][(arg4 % 2) + 2].pixel_index_array, var_s1->width, var_s1->height, (u32) arg5); } var_s1++; } return arg0; } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009C708.s") -#endif void func_8009C918(void) { s32 someIndex; @@ -7596,10 +7606,6 @@ void func_800A0AD0(UNUSED struct_8018D9E0_entry *arg0) { } } -#ifdef NON_MATCHING -// There's something going on with the accessing of D_800E86C4 that's causing lots of issues -// Also, the `(D_800E86C4[var_s5] % 10) + 0x10` stuff is doing something weird with the %, -// lots of instruction ordering issues void func_800A0B80(struct_8018D9E0_entry *arg0) { s32 temp_a2; s32 temp_s1; @@ -7614,19 +7620,21 @@ void func_800A0B80(struct_8018D9E0_entry *arg0) { if (D_800E86C4[var_s5] == 0) continue; temp_s1 = var_s5 * 0xA; - if (D_800E86C4[var_s5] < 0xA) { - func_800A08D8((D_800E86C4[var_s5] + 0x10), 0x00000032, arg0->row + temp_s1 + 1); + var_s0 = D_800E86C4[var_s5]; + if (var_s0 < 0xA) { + func_800A08D8(var_s0 + 0x10, 0x00000032, arg0->row + temp_s1 + 1); } else { - func_800A08D8(((D_800E86C4[var_s5] % 10) + 0x10), 0x00000035, arg0->row + temp_s1 + 1); + var_s0 %= 10; + func_800A08D8(var_s0 + 0x10, 0x00000035, arg0->row + temp_s1 + 1); func_800A08D8(0x11U, 0x0000002F, arg0->row + temp_s1 + 1); } temp_s2 = arg0->row + temp_s1 + 1; if (pfsError[D_800E86C4[var_s5] - 1] == 0) { temp_s4 = &pfsState[D_800E86C4[var_s5] - 1]; - temp_s1 = func_800A095C(temp_s4->game_name, 0x00000010, 0x0000004F, temp_s2) * 8; + var_s0 = func_800A095C(temp_s4->game_name, 0x00000010, 0x0000004F, temp_s2); if (temp_s4->ext_name[0] != 0) { - func_800A08D8(0x3CU, temp_s1 + 0x4F, temp_s2); - func_800A08D8(temp_s4->ext_name[0], temp_s1 + 0x57, temp_s2); + func_800A08D8(0x3CU, (var_s0 * 8) + 0x4F, temp_s2); + func_800A08D8(temp_s4->ext_name[0], (var_s0 * 8) + 0x57, temp_s2); } var_s1 = 0x10; var_s0 = (temp_s4->file_size + 0xFF) >> 8; @@ -7640,9 +7648,6 @@ void func_800A0B80(struct_8018D9E0_entry *arg0) { } gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, 0, 319, 239); } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A0B80.s") -#endif void func_800A0DFC(void) { s32 temp_t6; @@ -8918,20 +8923,19 @@ void render_pause_battle(struct_8018D9E0_entry *arg0) { } } -#ifdef NON_MATCHING -// Pretty big diff honestly. Mostly register allocation stuff though void func_800A54EC(void) { Unk_D_800E70A0 sp50; - s32 why; - s32 whyTheSequel; - Unk_D_800E70A0 *huh; Unk_D_800E70A0 *var_v1; struct_8018D9E0_entry *sp48; + s32 whyTheSequel; + s32 why; + Unk_D_800E70A0 *huh; if (gIsGamePaused == 0) return; why = gModeSelection; sp48 = find_8018D9E0_entry(0x000000C7); + if (why) {} // ????? gSPViewport(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(D_802B8880)); guOrtho(&gGfxPool->mtxEffect[gMatrixEffectCount], 0.0f, 319.0f, 239.0f, 0.0f, -100.0f, 100.0f, 1.0f); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxEffect[gMatrixEffectCount++]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); @@ -8942,13 +8946,13 @@ void func_800A54EC(void) { var_v1 = &D_800E8538[0]; break; case 2: - var_v1 = &D_800E8540[(gIsGamePaused - 1) + (gScreenModeSelection * 4)]; + var_v1 = &D_800E8540[(gScreenModeSelection * 4) + (gIsGamePaused - 1)]; break; case 0: - var_v1 = &D_800E85C0[(gIsGamePaused - 1) + (gScreenModeSelection * 4)]; + var_v1 = &D_800E85C0[(gScreenModeSelection * 4) + (gIsGamePaused - 1)]; break; case 3: - var_v1 = &D_800E8600[(gIsGamePaused - 1) + (gScreenModeSelection * 4)]; + var_v1 = &D_800E8600[(gScreenModeSelection * 4) + (gIsGamePaused - 1)]; break; } whyTheSequel = D_800F0B50[why]; @@ -8956,39 +8960,34 @@ void func_800A54EC(void) { sp50.row = (var_v1->row + ((sp48->cursor - whyTheSequel) * 0xD)) - 8; func_800A66A8(sp48, &sp50); } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A54EC.s") -#endif -#ifdef NON_MATCHING -// https://decomp.me/scratch/esKnl -// `var_v1` is ending up in `v0` instead of `v1`. For some reason :( void func_800A5738(struct_8018D9E0_entry *arg0) { Unk_D_800E70A0 sp98; - char **stackPadding0; + s32 stackPadding0; s32 stackPadding1; s32 stackPadding2; - s32 stackPadding3; + f32 why; char sp84[3]; + s32 stackPadding3; s32 stackPadding4; - Unk_D_800E70A0 *var_v0_9; s32 temp_a0; s32 var_v1; s32 var_s1; s32 var_s2; s32 temp_v0; s32 zero = 0; + Unk_D_800E70A0 *var_v0_9; char sp5C[3]; - var_v1 = arg0->cursor; - if (var_v1 == 0) { + if (arg0->cursor == 0) { if ((arg0->unk1C >= 0x1E) && ((gGlobalTimer / 16) % 2)) { - gDisplayListHead = draw_box(gDisplayListHead, 0x000000C0, 0x00000021, (s32) (get_string_width(gTextPauseButton[5]) * 0.8f) + 0xC6, 0x00000032, 0, 0, 0, 0x00000096); + why = get_string_width(gTextPauseButton[5]) * 0.8f; + gDisplayListHead = draw_box(gDisplayListHead, 0x000000C0, 0x00000021, (s32) (why) + 0xC6, 0x00000032, 0, 0, 0, 0x00000096); set_text_color(1); func_80093324(0x000000BF, 0x00000030, gTextPauseButton[5], 0, 0.8f, 0.8f); } } else { - if (var_v1 == 1) { + if (arg0->cursor == 1) { var_s1 = arg0->unk1C; var_s2 = (s32) (arg0->unk1C * 0xFF) / 140; } else { @@ -9109,6 +9108,7 @@ void func_800A5738(struct_8018D9E0_entry *arg0) { break; case 35: /* switch 2 */ case 36: /* switch 2 */ + if (0) { } // wtf? var_v0_9 = &D_800E7420[arg0->cursor - 35]; break; default: @@ -9119,9 +9119,6 @@ void func_800A5738(struct_8018D9E0_entry *arg0) { func_800A66A8(arg0, &sp98); } } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A5738.s") -#endif void func_800A6034(struct_8018D9E0_entry *arg0) { char *text; @@ -9223,77 +9220,47 @@ void func_800A638C(struct_8018D9E0_entry *arg0) { } } -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -// ? guMtxCatL(Mtx *, Mtx *, Mtx *); /* extern */ - -void func_800A66A8(struct_8018D9E0_entry *arg0, s16 *arg1) { - Gfx *temp_v0; - Gfx *temp_v0_2; - Gfx *temp_v0_3; - Gfx *temp_v0_4; - Gfx *temp_v0_5; - Gfx *temp_v0_6; +#ifdef NON_MATCHING +// https://decomp.me/scratch/GUqCE +// All the math stuff at the top is messed up +void func_800A66A8(struct_8018D9E0_entry *arg0, Unk_D_800E70A0 *arg1) { Mtx *temp_s0; Mtx *temp_s1; - f32 temp_f0_2; + f32 temp_f2; f32 temp_f12; f32 temp_f14; - f32 temp_f2; - f64 temp_f0; temp_s1 = &gGfxPool->mtxEffect[gMatrixEffectCount]; - temp_f0 = (f64) arg0->unk24; - if (temp_f0 > 1.5) { - arg0->unk24 = (f32) (temp_f0 * 0.95); + if (arg0->unk24 > 1.5) { + arg0->unk24 *= 0.95; } else { arg0->unk24 = 1.5f; } - temp_f0_2 = arg0->unk24; - temp_f2 = temp_f0_2 * 3.0f * (f32) arg0->unk8; - temp_f12 = temp_f0_2 * 4.0f; - temp_f14 = temp_f0_2 * 2.0f; - D_8018EDA0 += temp_f14; + temp_f2 = arg0->unk24 * 3.0f * arg0->unk8; + temp_f12 = arg0->unk24 * 4.0f; + temp_f14 = arg0->unk24 * 2.0f; D_8018EDA4 = temp_f2; D_8018EDA8 = temp_f12; D_8018EDAC = temp_f14; - D_8018ED98 += temp_f2; - D_8018ED9C += temp_f12; + D_8018ED98 += D_8018EDA4; + D_8018ED9C += D_8018EDA8; + D_8018EDA0 += D_8018EDAC; guScale(temp_s1, 1.2f, 1.2f, 1.2f); - temp_s0 = temp_s1 + 0x40; + temp_s0 = temp_s1 + 1; guRotate(temp_s0, D_8018ED9C, 0.0f, 1.0f, 0.0f); guMtxCatL(temp_s1, temp_s0, temp_s1); guRotate(temp_s0, D_8018EDA0, 0.0f, 0.0f, 1.0f); guMtxCatL(temp_s1, temp_s0, temp_s1); guRotate(temp_s0, D_8018ED98, 1.0f, 0.0f, 0.0f); guMtxCatL(temp_s1, temp_s0, temp_s1); - guTranslate(temp_s0, (f32) arg1->unk0, (f32) arg1->unk2, 0.0f); + guTranslate(temp_s0, arg1->column, arg1->row, 0.0f); guMtxCatL(temp_s1, temp_s0, temp_s1); - temp_v0 = gDisplayListHead; - gDisplayListHead = temp_v0 + 8; - temp_v0->words.w0 = 0x01020040; - temp_v0->words.w1 = (s32) (&gGfxPool->mtxEffect[gMatrixEffectCount]) & 0x1FFFFFFF; - temp_v0_2 = gDisplayListHead; - gMatrixEffectCount += 1; - gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->words.w0 = 0xB6000000; - temp_v0_2->words.w1 = 0x00020000; - temp_v0_3 = gDisplayListHead; - gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->words.w1 = 0xFF33FFFF; - temp_v0_3->words.w0 = 0xFC121824; - temp_v0_4 = gDisplayListHead; - gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->words.w1 = 0; - temp_v0_4->words.w0 = 0xC0000000; - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->words.w1 = 0x00504340; - temp_v0_5->words.w0 = 0xB900031D; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->words.w0 = 0x06000000; - temp_v0_6->words.w1 = (u32) D_0D003090; + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxEffect[gMatrixEffectCount]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA); + gDPNoOp(gDisplayListHead++); + gDPSetRenderMode(gDisplayListHead++, G_RM_CLD_SURF, G_RM_CLD_SURF2); + gSPDisplayList(gDisplayListHead++, D_0D003090); } #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A66A8.s") diff --git a/src/code_80091750.h b/src/code_80091750.h index 0ddc39ffb..f09255be3 100644 --- a/src/code_80091750.h +++ b/src/code_80091750.h @@ -171,6 +171,8 @@ void func_80099EC4(void); void func_80099A70(void); void func_80099A94(MkTexture *, s32); void func_80099AEC(void); +void func_8009A238(MkTexture*, s32); +void func_8009A2F0(struct_8018E0E8_entry*); void func_8009A344(void); s32 func_8009A374(MkAnimation*); s32 func_8009A478(MkAnimation*, s32); @@ -599,4 +601,12 @@ extern s32 gControllerPak1NumPagesFree; extern s32 gControllerPak1FileNote; extern s32 gControllerPak2FileNote; +extern f32 D_8018ED98; +extern f32 D_8018ED9C; +extern f32 D_8018EDA0; + +extern f32 D_8018EDA4; +extern f32 D_8018EDA8; +extern f32 D_8018EDAC; + #endif diff --git a/src/data/buffers.c b/src/data/buffers.c index 0144513cf..b755fad6c 100644 --- a/src/data/buffers.c +++ b/src/data/buffers.c @@ -13,7 +13,7 @@ u8 frameBufferPadding[0x5750]; u8 frameBufferPadding[0x5810]; #endif -struct_D_802BFB80 D_802BFB80[2][2][8]; +union_D_802BFB80 D_802BFB80; struct_D_802DFB80 D_802DFB80[2][2][8]; #ifdef AVOID_UB struct_D_802F1F80 D_802F1F80[2][4][8]; diff --git a/src/render_player.c b/src/render_player.c index 542049bad..35f838286 100644 --- a/src/render_player.c +++ b/src/render_player.c @@ -265,12 +265,12 @@ void func_80020524(void) { func_80027560(D_80164AD0[i], D_80164AB0[i], D_80164AC0[i], D_80164AC0[i], D_801651D0[D_80164AC0[i]][D_80164AB0[i]]); mio0decode(D_802DFB80[D_801651D0[D_80164AC0[i - 1]][D_80164AB0[i - 1]]][D_80164AC0[i - 1]][D_80164AB0[i - 1]].unk_00, - D_802BFB80[D_801651D0[D_80164AC0[i - 1]][D_80164AB0[i - 1]]][D_80164AC0[i - 1]][D_80164AB0[i - 1]].pixel_index_array); + D_802BFB80.arraySize8[D_801651D0[D_80164AC0[i - 1]][D_80164AB0[i - 1]]][D_80164AC0[i - 1]][D_80164AB0[i - 1]].pixel_index_array); osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK); } mio0decode(D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].unk_00, - D_802BFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].pixel_index_array); + D_802BFB80.arraySize8[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].pixel_index_array); } void func_8002088C(void) { @@ -291,11 +291,11 @@ void func_8002088C(void) { for (var_s0 = 1; var_s0 < gPlayersToRenderCount; var_s0++) { func_80027560(D_80164AD0[var_s0], D_80164AB0[var_s0], D_80164AC0[var_s0], D_80164AC0[var_s0], D_801651D0[D_80164AC0[var_s0]][D_80164AB0[var_s0]]); mio0decode(D_802DFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]].unk_00, - D_802BFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]].pixel_index_array); + D_802BFB80.arraySize8[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]].pixel_index_array); osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK); } mio0decode(D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].unk_00, - D_802BFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].pixel_index_array); + D_802BFB80.arraySize8[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].pixel_index_array); } void func_80020BF4(void) { @@ -310,11 +310,11 @@ void func_80020BF4(void) { for (var_s0 = 1; var_s0 < gPlayersToRenderCount; var_s0++) { func_80027560(D_80164AD0[var_s0], D_80164AB0[var_s0] + 4, D_80164AC0[var_s0], D_80164AC0[var_s0] - 2, D_801651D0[D_80164AC0[var_s0]][D_80164AB0[var_s0]]); mio0decode(D_802DFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].unk_00, - D_802BFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].pixel_index_array); + D_802BFB80.arraySize8[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].pixel_index_array); osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK); } mio0decode(D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].unk_00, - D_802BFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].pixel_index_array); + D_802BFB80.arraySize8[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].pixel_index_array); } void func_80020F1C(void) { @@ -329,11 +329,11 @@ void func_80020F1C(void) { for (var_s0 = 1; var_s0 < gPlayersToRenderCount; var_s0++) { func_80027560(D_80164AD0[var_s0], D_80164AB0[var_s0] + 4, D_80164AC0[var_s0], D_80164AC0[var_s0] - 2, D_801651D0[D_80164AC0[var_s0]][D_80164AB0[var_s0]]); mio0decode(D_802DFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].unk_00, - D_802BFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].pixel_index_array); + D_802BFB80.arraySize8[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].pixel_index_array); osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK); } mio0decode(D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].unk_00, - D_802BFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].pixel_index_array); + D_802BFB80.arraySize8[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].pixel_index_array); } void try_render_player(Player *player, s8 playerId, s8 arg2) { @@ -1392,11 +1392,11 @@ void kart_render(Player *player, s8 playerId, s8 arg2, s8 arg3) { gPlayerPalette = &D_802F1F80[D_801651D0[arg2][playerId]][arg2][playerId * 0x100]; #endif if ((arg2 == 0) || (arg2 == 1)) { - D_80164B08 = &D_802BFB80[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0]; - D_80164B0C = &D_802BFB80[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0x7C0]; + D_80164B08 = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0]; + D_80164B0C = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0x7C0]; } else { - D_80164B08 = &D_802BFB80[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0]; - D_80164B0C = &D_802BFB80[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0x7C0]; + D_80164B08 = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0]; + D_80164B0C = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0x7C0]; } mtxf_translate_rotate(sp1A4, sp154, sp14C); mtxf_scale2(sp1A4, gCharacterSize[player->characterId] * player->size); @@ -1510,11 +1510,11 @@ void ghost_render(Player *player, s8 playerId, s8 arg2, s8 arg3) { gPlayerPalette = &D_802F1F80[D_801651D0[arg2][playerId]][arg2][playerId * 0x100]; #endif if ((arg2 == 0) || (arg2 == 1)) { - D_80164B08 = &D_802BFB80[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0]; - D_80164B0C = &D_802BFB80[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0x7C0]; + D_80164B08 = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0]; + D_80164B0C = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0x7C0]; } else { - D_80164B08 = &D_802BFB80[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0]; - D_80164B0C = &D_802BFB80[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0x7C0]; + D_80164B08 = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0]; + D_80164B0C = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2 - 1][playerId - 4].pixel_index_array[0x7C0]; } mtxf_translate_rotate(sp12C, spDC, spD4); diff --git a/src/spawn_players.c b/src/spawn_players.c index d6664f1c5..e76677a37 100644 --- a/src/spawn_players.c +++ b/src/spawn_players.c @@ -1078,12 +1078,12 @@ void func_8003CD98(Player *player, Camera *camera, s8 playerId, s8 arg3) { load_kart_palette(player, playerId, arg3, 0); load_kart_palette(player, playerId, arg3, 1); load_kart_texture(player, playerId, arg3, arg3, 0); - mio0decode((u8 *) &D_802DFB80[0][arg3][playerId], (u8 *) &D_802BFB80[0][arg3][playerId]); + mio0decode((u8 *) &D_802DFB80[0][arg3][playerId], (u8 *) &D_802BFB80.arraySize8[0][arg3][playerId]); } else { load_kart_palette(player, playerId, arg3, 0); load_kart_palette(player, playerId, arg3, 1); load_kart_texture(player, (s8) (playerId + 4), arg3, (s8) (arg3 - 2), 0); - mio0decode((u8 *) &D_802DFB80[0][arg3 - 2][playerId + 4], (u8 *) &D_802BFB80[0][arg3 - 2][playerId + 4]); + mio0decode((u8 *) &D_802DFB80[0][arg3 - 2][playerId + 4], (u8 *) &D_802BFB80.arraySize8[0][arg3 - 2][playerId + 4]); } D_801650D0[arg3][playerId] = player->animFrameSelector[arg3]; diff --git a/src/staff_ghosts.c b/src/staff_ghosts.c index 9ccfa04e4..8fe043e87 100644 --- a/src/staff_ghosts.c +++ b/src/staff_ghosts.c @@ -58,8 +58,8 @@ s32 D_80162DFC; s32 D_80162E00; -u32 *D_800DC710 = (u32 *) &D_802BFB80[0][2][3]; -u32 *D_800DC714 = (u32 *) &D_802BFB80[1][1][3]; +u32 *D_800DC710 = (u32 *) &D_802BFB80.arraySize8[0][2][3]; +u32 *D_800DC714 = (u32 *) &D_802BFB80.arraySize8[1][1][3]; extern u8 _kart_texturesSegmentRomStart; @@ -70,7 +70,7 @@ extern StaffGhost *d_royal_raceway_staff_ghost; extern StaffGhost *d_luigi_raceway_staff_ghost; void func_80004EF0(void) { - D_80162DA4 = (u32 *) &D_802BFB80[0][2][3]; + D_80162DA4 = (u32 *) &D_802BFB80.arraySize8[0][2][3]; osInvalDCache(&D_80162DA4[0], 0x4000); osPiStartDma(&gDmaIoMesg, 0, 0, (uintptr_t) ((D_80162DC4 & 0xFFFFFF) + &_kart_texturesSegmentRomStart), D_80162DA4, 0x4000, &gDmaMesgQueue); osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK); @@ -79,13 +79,13 @@ void func_80004EF0(void) { } void func_80004FB0(void) { - D_80162DB4 = (u32 *) &D_802BFB80[0][D_80162DD0][3]; + D_80162DB4 = (u32 *) &D_802BFB80.arraySize8[0][D_80162DD0][3]; D_80162DAC = *D_80162DB4 & 0xFF0000; D_80162DB0 = 0; } void func_80004FF8(void) { - D_80162D94 = (u32 *) &D_802BFB80[0][D_80162DC8][3]; + D_80162D94 = (u32 *) &D_802BFB80.arraySize8[0][D_80162DC8][3]; D_80162D8C = (s32) *D_80162D94 & 0xFF0000; D_80162D90 = 0; } @@ -162,7 +162,7 @@ s32 func_800051C4(void) { } void func_8000522C(void) { - D_80162D94 = (u32 *) &D_802BFB80[0][D_80162DC8][3]; + D_80162D94 = (u32 *) &D_802BFB80.arraySize8[0][D_80162DC8][3]; mio0decode((u8 *) D_800DC714, (u8 *) D_80162D94); D_80162D8C = (s32) (*D_80162D94 & 0xFF0000); D_80162D90 = 0; @@ -180,7 +180,7 @@ void func_800052A4(void) { D_80162DCC = 0; } temp_v0 = D_80162DB8; - D_80162D80 = (void *) &D_802BFB80[0][D_80162DC8][3]; + D_80162D80 = (void *) &D_802BFB80.arraySize8[0][D_80162DC8][3]; D_80162D84 = temp_v0; D_80162D86 = temp_v0; } @@ -213,7 +213,7 @@ void func_80005310(void) { } else { D_80162DD8 = 1U; - D_80162DBC = (u32 *) &D_802BFB80[0][D_80162DCC][3]; + D_80162DBC = (u32 *) &D_802BFB80.arraySize8[0][D_80162DCC][3]; D_80162DBC[0] = -1; D_80162DB8 = 0; D_80162DDC = 0; @@ -498,7 +498,7 @@ void func_80005B18(void) { func_80005AE8(gPlayerTwo); func_80005AE8(gPlayerThree); } else { - D_80162D80 = D_802BFB80[0][D_80162DC8][3].pixel_index_array; + D_80162D80 = D_802BFB80.arraySize8[0][D_80162DC8][3].pixel_index_array; D_80162D84 = D_80162D86; D_80162DD0 = D_80162DCC; D_80162DE8 = gPlayerOne->characterId; @@ -510,7 +510,7 @@ void func_80005B18(void) { } } else { if ((gLapCountByPlayerId[0] == 3) && (D_80162DDC == 0) && (D_80162DF8 == 1)) { - D_80162D80 = D_802BFB80[0][D_80162DC8][3].pixel_index_array; + D_80162D80 = D_802BFB80.arraySize8[0][D_80162DC8][3].pixel_index_array; D_80162D84 = D_80162D86; D_80162DDC = 1; } diff --git a/tools/doxygen_syms.md b/tools/doxygen_syms.md index 7cf2f868f..9f033ac32 100644 --- a/tools/doxygen_syms.md +++ b/tools/doxygen_syms.md @@ -1939,6 +1939,8 @@ Variable Name | Memory Address [func_80099E54](@ref func_80099E54) | 0x80099E54 [func_80099E60](@ref func_80099E60) | 0x80099E60 [func_80099EC4](@ref func_80099EC4) | 0x80099EC4 +[func_8009A238](@ref func_8009A238) | 0x8009A238 +[func_8009A2F0](@ref func_8009A2F0) | 0x8009A2F0 [func_8009A344](@ref func_8009A344) | 0x8009A344 [func_8009A374](@ref func_8009A374) | 0x8009A374 [func_8009A478](@ref func_8009A478) | 0x8009A478 @@ -3640,10 +3642,6 @@ Variable Name | Memory Address [D_800F0C18](@ref D_800F0C18) | 0x800F0C18 [D_800F0C54](@ref D_800F0C54) | 0x800F0C54 [D_800F0C58](@ref D_800F0C58) | 0x800F0C58 -[D_800F0C6C](@ref D_800F0C6C) | 0x800F0C6C -[D_800F0C70](@ref D_800F0C70) | 0x800F0C70 -[D_800F0C74](@ref D_800F0C74) | 0x800F0C74 -[D_800F0C78](@ref D_800F0C78) | 0x800F0C78 [D_800F0CA0](@ref D_800F0CA0) | 0x800F0CA0 [D_800F0CD0](@ref D_800F0CD0) | 0x800F0CD0 [D_800F15E0](@ref D_800F15E0) | 0x800F15E0 @@ -3662,14 +3660,6 @@ Variable Name | Memory Address [D_800F1C40](@ref D_800F1C40) | 0x800F1C40 [D_800F1C44](@ref D_800F1C44) | 0x800F1C44 [D_800F1DC8](@ref D_800F1DC8) | 0x800F1DC8 -[D_800F1DD8](@ref D_800F1DD8) | 0x800F1DD8 -[D_800F1E80](@ref D_800F1E80) | 0x800F1E80 -[D_800F1E84](@ref D_800F1E84) | 0x800F1E84 -[D_800F1E88](@ref D_800F1E88) | 0x800F1E88 -[D_800F1E8C](@ref D_800F1E8C) | 0x800F1E8C -[D_800F1E90](@ref D_800F1E90) | 0x800F1E90 -[D_800F1E94](@ref D_800F1E94) | 0x800F1E94 -[D_800F1E98](@ref D_800F1E98) | 0x800F1E98 [D_800F1F18](@ref D_800F1F18) | 0x800F1F18 [D_800F1F20](@ref D_800F1F20) | 0x800F1F20 [D_800F2B38](@ref D_800F2B38) | 0x800F2B38 From 6af653ad3decee10076179d8c2e869b604087fc5 Mon Sep 17 00:00:00 2001 From: Tyler McGavran Date: Tue, 2 Apr 2024 15:00:35 -0400 Subject: [PATCH 07/10] Update some attempts, got a couple matches (#591) * Update some attempts, got a couple matches * More matches and updates Signed-off-by: Taggerung --- .../code_80091750/func_80097E58.s | 163 --- .../code_80091750/func_800987D0.s | 286 ----- .../code_80091750/func_800A8564.s | 109 -- .../render_objects/func_8004D654.s | 96 -- .../update_objects/func_8007B040.s | 144 --- .../update_objects/func_80081FF4.s | 120 -- include/objects.h | 8 +- src/code_80005FD0.c | 4 - src/code_8006E9C0.c | 6 +- src/code_80091750.c | 1071 +++++------------ src/code_80091750.h | 21 +- src/data/some_data.c | 68 +- src/data/some_data.h | 4 +- src/render_objects.c | 139 ++- src/update_objects.c | 127 +- tools/doxygen_syms.md | 3 +- 16 files changed, 481 insertions(+), 1888 deletions(-) delete mode 100644 asm/non_matchings/code_80091750/func_800987D0.s delete mode 100644 asm/non_matchings/code_80091750/func_800A8564.s delete mode 100644 asm/non_matchings/render_objects/func_8004D654.s delete mode 100644 asm/non_matchings/update_objects/func_8007B040.s delete mode 100644 asm/non_matchings/update_objects/func_80081FF4.s diff --git a/asm/non_matchings/code_80091750/func_80097E58.s b/asm/non_matchings/code_80091750/func_80097E58.s index ce725abcb..3cac9a60d 100644 --- a/asm/non_matchings/code_80091750/func_80097E58.s +++ b/asm/non_matchings/code_80091750/func_80097E58.s @@ -465,166 +465,3 @@ glabel func_80097E58 /* 09914C 8009854C 8FBE0028 */ lw $fp, 0x28($sp) /* 099150 80098550 03E00008 */ jr $ra /* 099154 80098554 27BD00F8 */ addiu $sp, $sp, 0xf8 - -/* 099158 80098558 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* 09915C 8009855C 8FAE0050 */ lw $t6, 0x50($sp) -/* 099160 80098560 AFB00008 */ sw $s0, 8($sp) -/* 099164 80098564 8FB00054 */ lw $s0, 0x54($sp) -/* 099168 80098568 AFB5001C */ sw $s5, 0x1c($sp) -/* 09916C 8009856C 00CE082B */ sltu $at, $a2, $t6 -/* 099170 80098570 00E0A825 */ move $s5, $a3 -/* 099174 80098574 AFBF002C */ sw $ra, 0x2c($sp) -/* 099178 80098578 AFBE0028 */ sw $fp, 0x28($sp) -/* 09917C 8009857C AFB70024 */ sw $s7, 0x24($sp) -/* 099180 80098580 AFB60020 */ sw $s6, 0x20($sp) -/* 099184 80098584 AFB40018 */ sw $s4, 0x18($sp) -/* 099188 80098588 AFB30014 */ sw $s3, 0x14($sp) -/* 09918C 8009858C AFB20010 */ sw $s2, 0x10($sp) -/* 099190 80098590 AFB1000C */ sw $s1, 0xc($sp) -/* 099194 80098594 AFA50044 */ sw $a1, 0x44($sp) -/* 099198 80098598 00C01025 */ move $v0, $a2 -/* 09919C 8009859C 1020007F */ beqz $at, .L8009879C -/* 0991A0 800985A0 AFB00034 */ sw $s0, 0x34($sp) -/* 0991A4 800985A4 3C1E0701 */ lui $fp, (0x07014050 >> 16) # lui $fp, 0x701 -/* 0991A8 800985A8 3C168019 */ lui $s6, %hi(D_8018D9B0) # $s6, 0x8019 -/* 0991AC 800985AC 26D6D9B0 */ addiu $s6, %lo(D_8018D9B0) # addiu $s6, $s6, -0x2650 -/* 0991B0 800985B0 37DE4050 */ ori $fp, (0x07014050 & 0xFFFF) # ori $fp, $fp, 0x4050 -/* 0991B4 800985B4 3C1FE600 */ lui $ra, 0xe600 -/* 0991B8 800985B8 3C17F510 */ lui $s7, 0xf510 -.L800985BC: -/* 0991BC 800985BC 8FAF0044 */ lw $t7, 0x44($sp) -/* 0991C0 800985C0 01F5082B */ sltu $at, $t7, $s5 -/* 0991C4 800985C4 1020006D */ beqz $at, .L8009877C -/* 0991C8 800985C8 01E03825 */ move $a3, $t7 -/* 0991CC 800985CC 8FB10060 */ lw $s1, 0x60($sp) -/* 0991D0 800985D0 AFA20038 */ sw $v0, 0x38($sp) -/* 0991D4 800985D4 8FA30038 */ lw $v1, 0x38($sp) -/* 0991D8 800985D8 8FA20058 */ lw $v0, 0x58($sp) -/* 0991DC 800985DC 2631FFFF */ addiu $s1, $s1, -1 -/* 0991E0 800985E0 32380FFF */ andi $t8, $s1, 0xfff -/* 0991E4 800985E4 3C01FD10 */ lui $at, 0xfd10 -/* 0991E8 800985E8 03018825 */ or $s1, $t8, $at -/* 0991EC 800985EC 01EF9023 */ subu $s2, $t7, $t7 -/* 0991F0 800985F0 246D0020 */ addiu $t5, $v1, 0x20 -/* 0991F4 800985F4 000DC080 */ sll $t8, $t5, 2 -/* 0991F8 800985F8 00127040 */ sll $t6, $s2, 1 -/* 0991FC 800985FC 25D20049 */ addiu $s2, $t6, 0x49 -/* 099200 80098600 330D0FFF */ andi $t5, $t8, 0xfff -/* 099204 80098604 00036080 */ sll $t4, $v1, 2 -/* 099208 80098608 24530020 */ addiu $s3, $v0, 0x20 -/* 09920C 8009860C 0002A080 */ sll $s4, $v0, 2 -/* 099210 80098610 32980FFF */ andi $t8, $s4, 0xfff -/* 099214 80098614 00137080 */ sll $t6, $s3, 2 -/* 099218 80098618 318F0FFF */ andi $t7, $t4, 0xfff -/* 09921C 8009861C 01E06025 */ move $t4, $t7 -/* 099220 80098620 31D30FFF */ andi $s3, $t6, 0xfff -/* 099224 80098624 0300A025 */ move $s4, $t8 -.L80098628: -/* 099228 80098628 00801025 */ move $v0, $a0 -/* 09922C 8009862C AC510000 */ sw $s1, ($v0) -/* 099230 80098630 8ED90000 */ lw $t9, ($s6) -/* 099234 80098634 24840008 */ addiu $a0, $a0, 8 -/* 099238 80098638 001270C2 */ srl $t6, $s2, 3 -/* 09923C 8009863C AC590004 */ sw $t9, 4($v0) -/* 099240 80098640 31CF01FF */ andi $t7, $t6, 0x1ff -/* 099244 80098644 00801825 */ move $v1, $a0 -/* 099248 80098648 00075080 */ sll $t2, $a3, 2 -/* 09924C 8009864C 31590FFF */ andi $t9, $t2, 0xfff -/* 099250 80098650 24840008 */ addiu $a0, $a0, 8 -/* 099254 80098654 000FC240 */ sll $t8, $t7, 9 -/* 099258 80098658 03174025 */ or $t0, $t8, $s7 -/* 09925C 8009865C 00802825 */ move $a1, $a0 -/* 099260 80098660 00195300 */ sll $t2, $t9, 0xc -/* 099264 80098664 3C01F400 */ lui $at, 0xf400 -/* 099268 80098668 24EB0020 */ addiu $t3, $a3, 0x20 -/* 09926C 8009866C 000B1080 */ sll $v0, $t3, 2 -/* 099270 80098670 01417825 */ or $t7, $t2, $at -/* 099274 80098674 24840008 */ addiu $a0, $a0, 8 -/* 099278 80098678 AC680000 */ sw $t0, ($v1) -/* 09927C 8009867C AC7E0004 */ sw $fp, 4($v1) -/* 099280 80098680 00804825 */ move $t1, $a0 -/* 099284 80098684 01ECC025 */ or $t8, $t7, $t4 -/* 099288 80098688 30590FFF */ andi $t9, $v0, 0xfff -/* 09928C 8009868C 00191300 */ sll $v0, $t9, 0xc -/* 099290 80098690 ACA00004 */ sw $zero, 4($a1) -/* 099294 80098694 ACBF0000 */ sw $ra, ($a1) -/* 099298 80098698 3C010700 */ lui $at, 0x700 -/* 09929C 8009869C 00417825 */ or $t7, $v0, $at -/* 0992A0 800986A0 AD380000 */ sw $t8, ($t1) -/* 0992A4 800986A4 24840008 */ addiu $a0, $a0, 8 -/* 0992A8 800986A8 00801825 */ move $v1, $a0 -/* 0992AC 800986AC 01EDC025 */ or $t8, $t7, $t5 -/* 0992B0 800986B0 AD380004 */ sw $t8, 4($t1) -/* 0992B4 800986B4 3C19E700 */ lui $t9, 0xe700 -/* 0992B8 800986B8 AC790000 */ sw $t9, ($v1) -/* 0992BC 800986BC 24840008 */ addiu $a0, $a0, 8 -/* 0992C0 800986C0 00802825 */ move $a1, $a0 -/* 0992C4 800986C4 AC600004 */ sw $zero, 4($v1) -/* 0992C8 800986C8 3C01F200 */ lui $at, 0xf200 -/* 0992CC 800986CC 3C0E0001 */ lui $t6, (0x00014050 >> 16) # lui $t6, 1 -/* 0992D0 800986D0 35CE4050 */ ori $t6, (0x00014050 & 0xFFFF) # ori $t6, $t6, 0x4050 -/* 0992D4 800986D4 01417825 */ or $t7, $t2, $at -/* 0992D8 800986D8 01ECC025 */ or $t8, $t7, $t4 -/* 0992DC 800986DC ACAE0004 */ sw $t6, 4($a1) -/* 0992E0 800986E0 24840008 */ addiu $a0, $a0, 8 -/* 0992E4 800986E4 26030020 */ addiu $v1, $s0, 0x20 -/* 0992E8 800986E8 00803025 */ move $a2, $a0 -/* 0992EC 800986EC ACA80000 */ sw $t0, ($a1) -/* 0992F0 800986F0 00037080 */ sll $t6, $v1, 2 -/* 0992F4 800986F4 ACD80000 */ sw $t8, ($a2) -/* 0992F8 800986F8 004DC825 */ or $t9, $v0, $t5 -/* 0992FC 800986FC 31CF0FFF */ andi $t7, $t6, 0xfff -/* 099300 80098700 ACD90004 */ sw $t9, 4($a2) -/* 099304 80098704 000FC300 */ sll $t8, $t7, 0xc -/* 099308 80098708 3C01E400 */ lui $at, 0xe400 -/* 09930C 8009870C 24840008 */ addiu $a0, $a0, 8 -/* 099310 80098710 0301C825 */ or $t9, $t8, $at -/* 099314 80098714 03337025 */ or $t6, $t9, $s3 -/* 099318 80098718 00801025 */ move $v0, $a0 -/* 09931C 8009871C 00107880 */ sll $t7, $s0, 2 -/* 099320 80098720 31F80FFF */ andi $t8, $t7, 0xfff -/* 099324 80098724 0018CB00 */ sll $t9, $t8, 0xc -/* 099328 80098728 AC4E0000 */ sw $t6, ($v0) -/* 09932C 8009872C 24840008 */ addiu $a0, $a0, 8 -/* 099330 80098730 00802825 */ move $a1, $a0 -/* 099334 80098734 03347025 */ or $t6, $t9, $s4 -/* 099338 80098738 AC4E0004 */ sw $t6, 4($v0) -/* 09933C 8009873C 24840008 */ addiu $a0, $a0, 8 -/* 099340 80098740 00803025 */ move $a2, $a0 -/* 099344 80098744 3C190400 */ lui $t9, (0x04000400 >> 16) # lui $t9, 0x400 -/* 099348 80098748 3C0FB300 */ lui $t7, 0xb300 -/* 09934C 8009874C 0175082B */ sltu $at, $t3, $s5 -/* 099350 80098750 ACAF0000 */ sw $t7, ($a1) -/* 099354 80098754 37390400 */ ori $t9, (0x04000400 & 0xFFFF) # ori $t9, $t9, 0x400 -/* 099358 80098758 ACA00004 */ sw $zero, 4($a1) -/* 09935C 8009875C 3C18B200 */ lui $t8, 0xb200 -/* 099360 80098760 01603825 */ move $a3, $t3 -/* 099364 80098764 ACD80000 */ sw $t8, ($a2) -/* 099368 80098768 ACD90004 */ sw $t9, 4($a2) -/* 09936C 8009876C 24840008 */ addiu $a0, $a0, 8 -/* 099370 80098770 1420FFAD */ bnez $at, .L80098628 -/* 099374 80098774 00608025 */ move $s0, $v1 -/* 099378 80098778 8FA20038 */ lw $v0, 0x38($sp) -.L8009877C: -/* 09937C 8009877C 8FB80050 */ lw $t8, 0x50($sp) -/* 099380 80098780 8FAE0058 */ lw $t6, 0x58($sp) -/* 099384 80098784 24420020 */ addiu $v0, $v0, 0x20 -/* 099388 80098788 0058082B */ sltu $at, $v0, $t8 -/* 09938C 8009878C 25CF0020 */ addiu $t7, $t6, 0x20 -/* 099390 80098790 8FB00034 */ lw $s0, 0x34($sp) -/* 099394 80098794 1420FF89 */ bnez $at, .L800985BC -/* 099398 80098798 AFAF0058 */ sw $t7, 0x58($sp) -.L8009879C: -/* 09939C 8009879C 8FBF002C */ lw $ra, 0x2c($sp) -/* 0993A0 800987A0 8FB00008 */ lw $s0, 8($sp) -/* 0993A4 800987A4 8FB1000C */ lw $s1, 0xc($sp) -/* 0993A8 800987A8 8FB20010 */ lw $s2, 0x10($sp) -/* 0993AC 800987AC 8FB30014 */ lw $s3, 0x14($sp) -/* 0993B0 800987B0 8FB40018 */ lw $s4, 0x18($sp) -/* 0993B4 800987B4 8FB5001C */ lw $s5, 0x1c($sp) -/* 0993B8 800987B8 8FB60020 */ lw $s6, 0x20($sp) -/* 0993BC 800987BC 8FB70024 */ lw $s7, 0x24($sp) -/* 0993C0 800987C0 8FBE0028 */ lw $fp, 0x28($sp) -/* 0993C4 800987C4 27BD0040 */ addiu $sp, $sp, 0x40 -/* 0993C8 800987C8 03E00008 */ jr $ra -/* 0993CC 800987CC 00801025 */ move $v0, $a0 diff --git a/asm/non_matchings/code_80091750/func_800987D0.s b/asm/non_matchings/code_80091750/func_800987D0.s deleted file mode 100644 index f7618b842..000000000 --- a/asm/non_matchings/code_80091750/func_800987D0.s +++ /dev/null @@ -1,286 +0,0 @@ -glabel func_800987D0 -/* 0993D0 800987D0 27BDFF98 */ addiu $sp, $sp, -0x68 -/* 0993D4 800987D4 AFB10034 */ sw $s1, 0x34($sp) -/* 0993D8 800987D8 3C118019 */ lui $s1, %hi(D_8018E7B8) # $s1, 0x8019 -/* 0993DC 800987DC 2631E7B8 */ addiu $s1, %lo(D_8018E7B8) # addiu $s1, $s1, -0x1848 -/* 0993E0 800987E0 8E220000 */ lw $v0, ($s1) -/* 0993E4 800987E4 AFB3003C */ sw $s3, 0x3c($sp) -/* 0993E8 800987E8 AFB00030 */ sw $s0, 0x30($sp) -/* 0993EC 800987EC 00808025 */ move $s0, $a0 -/* 0993F0 800987F0 00C09825 */ move $s3, $a2 -/* 0993F4 800987F4 AFBF0054 */ sw $ra, 0x54($sp) -/* 0993F8 800987F8 AFBE0050 */ sw $fp, 0x50($sp) -/* 0993FC 800987FC AFB7004C */ sw $s7, 0x4c($sp) -/* 099400 80098800 AFB60048 */ sw $s6, 0x48($sp) -/* 099404 80098804 AFB50044 */ sw $s5, 0x44($sp) -/* 099408 80098808 AFB40040 */ sw $s4, 0x40($sp) -/* 09940C 8009880C AFB20038 */ sw $s2, 0x38($sp) -/* 099410 80098810 F7B80028 */ sdc1 $f24, 0x28($sp) -/* 099414 80098814 F7B60020 */ sdc1 $f22, 0x20($sp) -/* 099418 80098818 F7B40018 */ sdc1 $f20, 0x18($sp) -/* 09941C 8009881C AFA5006C */ sw $a1, 0x6c($sp) -/* 099420 80098820 14400004 */ bnez $v0, .L80098834 -/* 099424 80098824 AFA70074 */ sw $a3, 0x74($sp) -/* 099428 80098828 240E0001 */ li $t6, 1 -/* 09942C 8009882C AE2E0000 */ sw $t6, ($s1) -/* 099430 80098830 01C01025 */ move $v0, $t6 -.L80098834: -/* 099434 80098834 3C148019 */ lui $s4, %hi(D_8018E7D0) # $s4, 0x8019 -/* 099438 80098838 2694E7D0 */ addiu $s4, %lo(D_8018E7D0) # addiu $s4, $s4, -0x1830 -/* 09943C 8009883C 8E8F0000 */ lw $t7, ($s4) -/* 099440 80098840 24124E20 */ li $s2, 20000 -/* 099444 80098844 01F20019 */ multu $t7, $s2 -/* 099448 80098848 0000C012 */ mflo $t8 -/* 09944C 8009884C 00000000 */ nop -/* 099450 80098850 00000000 */ nop -/* 099454 80098854 0302001B */ divu $zero, $t8, $v0 -/* 099458 80098858 0000C812 */ mflo $t9 -/* 09945C 8009885C 14400002 */ bnez $v0, .L80098868 -/* 099460 80098860 00000000 */ nop -/* 099464 80098864 0007000D */ break 7 -.L80098868: -/* 099468 80098868 0332001B */ divu $zero, $t9, $s2 -/* 09946C 8009886C 00002010 */ mfhi $a0 -/* 099470 80098870 308EFFFF */ andi $t6, $a0, 0xffff -/* 099474 80098874 16400002 */ bnez $s2, .L80098880 -/* 099478 80098878 00000000 */ nop -/* 09947C 8009887C 0007000D */ break 7 -.L80098880: -/* 099480 80098880 01C02025 */ move $a0, $t6 -/* 099484 80098884 0C0AE006 */ jal sins -/* 099488 80098888 00000000 */ nop -/* 09948C 8009888C 8E8F0000 */ lw $t7, ($s4) -/* 099490 80098890 8E390000 */ lw $t9, ($s1) -/* 099494 80098894 46000606 */ mov.s $f24, $f0 -/* 099498 80098898 01F20019 */ multu $t7, $s2 -/* 09949C 8009889C 0000C012 */ mflo $t8 -/* 0994A0 800988A0 00000000 */ nop -/* 0994A4 800988A4 00000000 */ nop -/* 0994A8 800988A8 0319001B */ divu $zero, $t8, $t9 -/* 0994AC 800988AC 00007012 */ mflo $t6 -/* 0994B0 800988B0 17200002 */ bnez $t9, .L800988BC -/* 0994B4 800988B4 00000000 */ nop -/* 0994B8 800988B8 0007000D */ break 7 -.L800988BC: -/* 0994BC 800988BC 01D2001B */ divu $zero, $t6, $s2 -/* 0994C0 800988C0 00002010 */ mfhi $a0 -/* 0994C4 800988C4 308FFFFF */ andi $t7, $a0, 0xffff -/* 0994C8 800988C8 16400002 */ bnez $s2, .L800988D4 -/* 0994CC 800988CC 00000000 */ nop -/* 0994D0 800988D0 0007000D */ break 7 -.L800988D4: -/* 0994D4 800988D4 01E02025 */ move $a0, $t7 -/* 0994D8 800988D8 0C0AE00E */ jal coss -/* 0994DC 800988DC 00000000 */ nop -/* 0994E0 800988E0 8E980000 */ lw $t8, ($s4) -/* 0994E4 800988E4 8FAD007C */ lw $t5, 0x7c($sp) -/* 0994E8 800988E8 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 0994EC 800988EC 44982000 */ mtc1 $t8, $f4 -/* 0994F0 800988F0 3C1EE700 */ lui $fp, 0xe700 -/* 0994F4 800988F4 07010004 */ bgez $t8, .L80098908 -/* 0994F8 800988F8 468021A0 */ cvt.s.w $f6, $f4 -/* 0994FC 800988FC 44814000 */ mtc1 $at, $f8 -/* 099500 80098900 00000000 */ nop -/* 099504 80098904 46083180 */ add.s $f6, $f6, $f8 -.L80098908: -/* 099508 80098908 8E390000 */ lw $t9, ($s1) -/* 09950C 8009890C 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 099510 80098910 44812800 */ mtc1 $at, $f5 -/* 099514 80098914 44802000 */ mtc1 $zero, $f4 -/* 099518 80098918 460032A1 */ cvt.d.s $f10, $f6 -/* 09951C 8009891C 44993000 */ mtc1 $t9, $f6 -/* 099520 80098920 46245202 */ mul.d $f8, $f10, $f4 -/* 099524 80098924 3C0141F0 */ li $at, 0x41F00000 # 30.000000 -/* 099528 80098928 3C170700 */ lui $s7, 0x700 -/* 09952C 8009892C 3C16F400 */ lui $s6, 0xf400 -/* 099530 80098930 3C15E600 */ lui $s5, 0xe600 -/* 099534 80098934 3C140701 */ lui $s4, (0x07014050 >> 16) # lui $s4, 0x701 -/* 099538 80098938 07210005 */ bgez $t9, .L80098950 -/* 09953C 8009893C 468032A1 */ cvt.d.w $f10, $f6 -/* 099540 80098940 44812800 */ mtc1 $at, $f5 -/* 099544 80098944 44802000 */ mtc1 $zero, $f4 -/* 099548 80098948 00000000 */ nop -/* 09954C 8009894C 46245280 */ add.d $f10, $f10, $f4 -.L80098950: -/* 099550 80098950 462A4183 */ div.d $f6, $f8, $f10 -/* 099554 80098954 3C013FF0 */ li $at, 0x3FF00000 # 1.875000 -/* 099558 80098958 44812800 */ mtc1 $at, $f5 -/* 09955C 8009895C 44802000 */ mtc1 $zero, $f4 -/* 099560 80098960 8FAE0078 */ lw $t6, 0x78($sp) -/* 099564 80098964 02601025 */ move $v0, $s3 -/* 099568 80098968 AFAD005C */ sw $t5, 0x5c($sp) -/* 09956C 8009896C 026E082B */ sltu $at, $s3, $t6 -/* 099570 80098970 3C13F510 */ lui $s3, 0xf510 -/* 099574 80098974 36944050 */ ori $s4, (0x07014050 & 0xFFFF) # ori $s4, $s4, 0x4050 -/* 099578 80098978 3C128019 */ lui $s2, %hi(D_8018D9B0) # $s2, 0x8019 -/* 09957C 8009897C 46243200 */ add.d $f8, $f6, $f4 -/* 099580 80098980 10200095 */ beqz $at, .L80098BD8 -/* 099584 80098984 462044A0 */ cvt.s.d $f18, $f8 -/* 099588 80098988 3C0142F0 */ li $at, 0x42F00000 # 120.000000 -/* 09958C 8009898C 4481B000 */ mtc1 $at, $f22 -/* 099590 80098990 3C014320 */ li $at, 0x43200000 # 160.000000 -/* 099594 80098994 4481A000 */ mtc1 $at, $f20 -/* 099598 80098998 2652D9B0 */ addiu $s2, %lo(D_8018D9B0) # addiu $s2, $s2, -0x2650 -.L8009899C: -/* 09959C 8009899C 8FAF006C */ lw $t7, 0x6c($sp) -/* 0995A0 800989A0 8FB80074 */ lw $t8, 0x74($sp) -/* 0995A4 800989A4 00025880 */ sll $t3, $v0, 2 -/* 0995A8 800989A8 01E03025 */ move $a2, $t7 -/* 0995AC 800989AC 01F8082B */ sltu $at, $t7, $t8 -/* 0995B0 800989B0 10200081 */ beqz $at, .L80098BB8 -/* 0995B4 800989B4 01EF8823 */ subu $s1, $t7, $t7 -/* 0995B8 800989B8 AFA20060 */ sw $v0, 0x60($sp) -/* 0995BC 800989BC 244C0020 */ addiu $t4, $v0, 0x20 -/* 0995C0 800989C0 8FA20080 */ lw $v0, 0x80($sp) -/* 0995C4 800989C4 8FBF0088 */ lw $ra, 0x88($sp) -/* 0995C8 800989C8 3C01FD10 */ lui $at, 0xfd10 -/* 0995CC 800989CC 2442FF88 */ addiu $v0, $v0, -0x78 -/* 0995D0 800989D0 44825000 */ mtc1 $v0, $f10 -/* 0995D4 800989D4 44822000 */ mtc1 $v0, $f4 -/* 0995D8 800989D8 27FFFFFF */ addiu $ra, $ra, -1 -/* 0995DC 800989DC 468051A0 */ cvt.s.w $f6, $f10 -/* 0995E0 800989E0 33F90FFF */ andi $t9, $ra, 0xfff -/* 0995E4 800989E4 0321F825 */ or $ra, $t9, $at -/* 0995E8 800989E8 000CC880 */ sll $t9, $t4, 2 -/* 0995EC 800989EC 00117840 */ sll $t7, $s1, 1 -/* 0995F0 800989F0 46802220 */ cvt.s.w $f8, $f4 -/* 0995F4 800989F4 4606C302 */ mul.s $f12, $f24, $f6 -/* 0995F8 800989F8 31780FFF */ andi $t8, $t3, 0xfff -/* 0995FC 800989FC 03005825 */ move $t3, $t8 -/* 099600 80098A00 25F10049 */ addiu $s1, $t7, 0x49 -/* 099604 80098A04 332C0FFF */ andi $t4, $t9, 0xfff -/* 099608 80098A08 46080402 */ mul.s $f16, $f0, $f8 -/* 09960C 80098A0C 4600C387 */ neg.s $f14, $f24 -/* 099610 80098A10 02001025 */ move $v0, $s0 -.L80098A14: -/* 099614 80098A14 AC5F0000 */ sw $ra, ($v0) -/* 099618 80098A18 8E4F0000 */ lw $t7, ($s2) -/* 09961C 80098A1C 26100008 */ addiu $s0, $s0, 8 -/* 099620 80098A20 0011C0C3 */ sra $t8, $s1, 3 -/* 099624 80098A24 AC4F0004 */ sw $t7, 4($v0) -/* 099628 80098A28 331901FF */ andi $t9, $t8, 0x1ff -/* 09962C 80098A2C 02001825 */ move $v1, $s0 -/* 099630 80098A30 00064880 */ sll $t1, $a2, 2 -/* 099634 80098A34 312F0FFF */ andi $t7, $t1, 0xfff -/* 099638 80098A38 26100008 */ addiu $s0, $s0, 8 -/* 09963C 80098A3C 00197240 */ sll $t6, $t9, 9 -/* 099640 80098A40 01D33825 */ or $a3, $t6, $s3 -/* 099644 80098A44 02002025 */ move $a0, $s0 -/* 099648 80098A48 000F4B00 */ sll $t1, $t7, 0xc -/* 09964C 80098A4C 24CA0020 */ addiu $t2, $a2, 0x20 -/* 099650 80098A50 000A1080 */ sll $v0, $t2, 2 -/* 099654 80098A54 0136C825 */ or $t9, $t1, $s6 -/* 099658 80098A58 26100008 */ addiu $s0, $s0, 8 -/* 09965C 80098A5C AC670000 */ sw $a3, ($v1) -/* 099660 80098A60 AC740004 */ sw $s4, 4($v1) -/* 099664 80098A64 02004025 */ move $t0, $s0 -/* 099668 80098A68 032B7025 */ or $t6, $t9, $t3 -/* 09966C 80098A6C 304F0FFF */ andi $t7, $v0, 0xfff -/* 099670 80098A70 000F1300 */ sll $v0, $t7, 0xc -/* 099674 80098A74 AC800004 */ sw $zero, 4($a0) -/* 099678 80098A78 AC950000 */ sw $s5, ($a0) -/* 09967C 80098A7C AD0E0000 */ sw $t6, ($t0) -/* 099680 80098A80 0057C825 */ or $t9, $v0, $s7 -/* 099684 80098A84 26100008 */ addiu $s0, $s0, 8 -/* 099688 80098A88 02001825 */ move $v1, $s0 -/* 09968C 80098A8C 032C7025 */ or $t6, $t9, $t4 -/* 099690 80098A90 AD0E0004 */ sw $t6, 4($t0) -/* 099694 80098A94 26100008 */ addiu $s0, $s0, 8 -/* 099698 80098A98 3C0F0001 */ lui $t7, (0x00014050 >> 16) # lui $t7, 1 -/* 09969C 80098A9C 35EF4050 */ ori $t7, (0x00014050 & 0xFFFF) # ori $t7, $t7, 0x4050 -/* 0996A0 80098AA0 02002025 */ move $a0, $s0 -/* 0996A4 80098AA4 AC600004 */ sw $zero, 4($v1) -/* 0996A8 80098AA8 AC7E0000 */ sw $fp, ($v1) -/* 0996AC 80098AAC AC8F0004 */ sw $t7, 4($a0) -/* 0996B0 80098AB0 25AFFF60 */ addiu $t7, $t5, -0xa0 -/* 0996B4 80098AB4 448F5000 */ mtc1 $t7, $f10 -/* 0996B8 80098AB8 AC870000 */ sw $a3, ($a0) -/* 0996BC 80098ABC 26100008 */ addiu $s0, $s0, 8 -/* 0996C0 80098AC0 468050A0 */ cvt.s.w $f2, $f10 -/* 0996C4 80098AC4 3C01F200 */ lui $at, 0xf200 -/* 0996C8 80098AC8 0121C025 */ or $t8, $t1, $at -/* 0996CC 80098ACC 02002825 */ move $a1, $s0 -/* 0996D0 80098AD0 004C7025 */ or $t6, $v0, $t4 -/* 0996D4 80098AD4 ACAE0004 */ sw $t6, 4($a1) -/* 0996D8 80098AD8 46001182 */ mul.s $f6, $f2, $f0 -/* 0996DC 80098ADC 030BC825 */ or $t9, $t8, $t3 -/* 0996E0 80098AE0 ACB90000 */ sw $t9, ($a1) -/* 0996E4 80098AE4 3C01E400 */ lui $at, 0xe400 -/* 0996E8 80098AE8 26100008 */ addiu $s0, $s0, 8 -/* 0996EC 80098AEC 02001025 */ move $v0, $s0 -/* 0996F0 80098AF0 26100008 */ addiu $s0, $s0, 8 -/* 0996F4 80098AF4 460C3100 */ add.s $f4, $f6, $f12 -/* 0996F8 80098AF8 02001825 */ move $v1, $s0 -/* 0996FC 80098AFC 26100008 */ addiu $s0, $s0, 8 -/* 099700 80098B00 02003825 */ move $a3, $s0 -/* 099704 80098B04 46122202 */ mul.s $f8, $f4, $f18 -/* 099708 80098B08 01403025 */ move $a2, $t2 -/* 09970C 80098B0C 26100008 */ addiu $s0, $s0, 8 -/* 099710 80098B10 46027102 */ mul.s $f4, $f14, $f2 -/* 099714 80098B14 25AD0020 */ addiu $t5, $t5, 0x20 -/* 099718 80098B18 46144280 */ add.s $f10, $f8, $f20 -/* 09971C 80098B1C 46102200 */ add.s $f8, $f4, $f16 -/* 099720 80098B20 4600518D */ trunc.w.s $f6, $f10 -/* 099724 80098B24 46124282 */ mul.s $f10, $f8, $f18 -/* 099728 80098B28 44043000 */ mfc1 $a0, $f6 -/* 09972C 80098B2C 00000000 */ nop -/* 099730 80098B30 248E0020 */ addiu $t6, $a0, 0x20 -/* 099734 80098B34 46165180 */ add.s $f6, $f10, $f22 -/* 099738 80098B38 000E7880 */ sll $t7, $t6, 2 -/* 09973C 80098B3C 31F80FFF */ andi $t8, $t7, 0xfff -/* 099740 80098B40 0018CB00 */ sll $t9, $t8, 0xc -/* 099744 80098B44 4600310D */ trunc.w.s $f4, $f6 -/* 099748 80098B48 03217025 */ or $t6, $t9, $at -/* 09974C 80098B4C 44052000 */ mfc1 $a1, $f4 -/* 099750 80098B50 00000000 */ nop -/* 099754 80098B54 24AF0020 */ addiu $t7, $a1, 0x20 -/* 099758 80098B58 000FC080 */ sll $t8, $t7, 2 -/* 09975C 80098B5C 33190FFF */ andi $t9, $t8, 0xfff -/* 099760 80098B60 01D97825 */ or $t7, $t6, $t9 -/* 099764 80098B64 0004C080 */ sll $t8, $a0, 2 -/* 099768 80098B68 330E0FFF */ andi $t6, $t8, 0xfff -/* 09976C 80098B6C AC4F0000 */ sw $t7, ($v0) -/* 099770 80098B70 00057880 */ sll $t7, $a1, 2 -/* 099774 80098B74 31F80FFF */ andi $t8, $t7, 0xfff -/* 099778 80098B78 000ECB00 */ sll $t9, $t6, 0xc -/* 09977C 80098B7C 03387025 */ or $t6, $t9, $t8 -/* 099780 80098B80 AC4E0004 */ sw $t6, 4($v0) -/* 099784 80098B84 3C0FB300 */ lui $t7, 0xb300 -/* 099788 80098B88 AC6F0000 */ sw $t7, ($v1) -/* 09978C 80098B8C AC600004 */ sw $zero, 4($v1) -/* 099790 80098B90 3C180400 */ lui $t8, (0x04000400 >> 16) # lui $t8, 0x400 -/* 099794 80098B94 37180400 */ ori $t8, (0x04000400 & 0xFFFF) # ori $t8, $t8, 0x400 -/* 099798 80098B98 3C19B200 */ lui $t9, 0xb200 -/* 09979C 80098B9C ACF90000 */ sw $t9, ($a3) -/* 0997A0 80098BA0 ACF80004 */ sw $t8, 4($a3) -/* 0997A4 80098BA4 8FAE0074 */ lw $t6, 0x74($sp) -/* 0997A8 80098BA8 014E082B */ sltu $at, $t2, $t6 -/* 0997AC 80098BAC 5420FF99 */ bnel $at, $zero, .L80098A14 -/* 0997B0 80098BB0 02001025 */ move $v0, $s0 -/* 0997B4 80098BB4 8FA20060 */ lw $v0, 0x60($sp) -.L80098BB8: -/* 0997B8 80098BB8 8FB80078 */ lw $t8, 0x78($sp) -/* 0997BC 80098BBC 8FAF0080 */ lw $t7, 0x80($sp) -/* 0997C0 80098BC0 24420020 */ addiu $v0, $v0, 0x20 -/* 0997C4 80098BC4 0058082B */ sltu $at, $v0, $t8 -/* 0997C8 80098BC8 25F90020 */ addiu $t9, $t7, 0x20 -/* 0997CC 80098BCC 8FAD005C */ lw $t5, 0x5c($sp) -/* 0997D0 80098BD0 1420FF72 */ bnez $at, .L8009899C -/* 0997D4 80098BD4 AFB90080 */ sw $t9, 0x80($sp) -.L80098BD8: -/* 0997D8 80098BD8 8FBF0054 */ lw $ra, 0x54($sp) -/* 0997DC 80098BDC 02001025 */ move $v0, $s0 -/* 0997E0 80098BE0 8FB00030 */ lw $s0, 0x30($sp) -/* 0997E4 80098BE4 D7B40018 */ ldc1 $f20, 0x18($sp) -/* 0997E8 80098BE8 D7B60020 */ ldc1 $f22, 0x20($sp) -/* 0997EC 80098BEC D7B80028 */ ldc1 $f24, 0x28($sp) -/* 0997F0 80098BF0 8FB10034 */ lw $s1, 0x34($sp) -/* 0997F4 80098BF4 8FB20038 */ lw $s2, 0x38($sp) -/* 0997F8 80098BF8 8FB3003C */ lw $s3, 0x3c($sp) -/* 0997FC 80098BFC 8FB40040 */ lw $s4, 0x40($sp) -/* 099800 80098C00 8FB50044 */ lw $s5, 0x44($sp) -/* 099804 80098C04 8FB60048 */ lw $s6, 0x48($sp) -/* 099808 80098C08 8FB7004C */ lw $s7, 0x4c($sp) -/* 09980C 80098C0C 8FBE0050 */ lw $fp, 0x50($sp) -/* 099810 80098C10 03E00008 */ jr $ra -/* 099814 80098C14 27BD0068 */ addiu $sp, $sp, 0x68 diff --git a/asm/non_matchings/code_80091750/func_800A8564.s b/asm/non_matchings/code_80091750/func_800A8564.s deleted file mode 100644 index 4970d4099..000000000 --- a/asm/non_matchings/code_80091750/func_800A8564.s +++ /dev/null @@ -1,109 +0,0 @@ -glabel func_800A8564 -/* 0A9164 800A8564 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 0A9168 800A8568 AFBF002C */ sw $ra, 0x2c($sp) -/* 0A916C 800A856C 8C820000 */ lw $v0, ($a0) -/* 0A9170 800A8570 2401000F */ li $at, 15 -/* 0A9174 800A8574 00803825 */ move $a3, $a0 -/* 0A9178 800A8578 10410008 */ beq $v0, $at, .L800A859C -/* 0A917C 800A857C 00002825 */ move $a1, $zero -/* 0A9180 800A8580 24010033 */ li $at, 51 -/* 0A9184 800A8584 10410010 */ beq $v0, $at, .L800A85C8 -/* 0A9188 800A8588 2401005D */ li $at, 93 -/* 0A918C 800A858C 10410019 */ beq $v0, $at, .L800A85F4 -/* 0A9190 800A8590 3C0E8019 */ lui $t6, %hi(D_8018EDEC) # $t6, 0x8019 -/* 0A9194 800A8594 10000051 */ b .L800A86DC -/* 0A9198 800A8598 8FBF002C */ lw $ra, 0x2c($sp) -.L800A859C: -/* 0A919C 800A859C 3C028019 */ lui $v0, %hi(gMainMenuSelectionDepth) # $v0, 0x8019 -/* 0A91A0 800A85A0 8042EDED */ lb $v0, %lo(gMainMenuSelectionDepth)($v0) -/* 0A91A4 800A85A4 3C040200 */ lui $a0, %hi(D_0200487C) # $a0, 0x200 -/* 0A91A8 800A85A8 24010006 */ li $at, 6 -/* 0A91AC 800A85AC 10410004 */ beq $v0, $at, .L800A85C0 -/* 0A91B0 800A85B0 2484487C */ addiu $a0, %lo(D_0200487C) # addiu $a0, $a0, 0x487c -/* 0A91B4 800A85B4 24010007 */ li $at, 7 -/* 0A91B8 800A85B8 54410015 */ bnel $v0, $at, .L800A8610 -/* 0A91BC 800A85BC 8CE2001C */ lw $v0, 0x1c($a3) -.L800A85C0: -/* 0A91C0 800A85C0 10000012 */ b .L800A860C -/* 0A91C4 800A85C4 24050001 */ li $a1, 1 -.L800A85C8: -/* 0A91C8 800A85C8 3C028019 */ lui $v0, %hi(D_8018EDEE) # $v0, 0x8019 -/* 0A91CC 800A85CC 8042EDEE */ lb $v0, %lo(D_8018EDEE)($v0) -/* 0A91D0 800A85D0 3C040200 */ lui $a0, %hi(D_02004B74) # $a0, 0x200 -/* 0A91D4 800A85D4 24010002 */ li $at, 2 -/* 0A91D8 800A85D8 10410004 */ beq $v0, $at, .L800A85EC -/* 0A91DC 800A85DC 24844B74 */ addiu $a0, %lo(D_02004B74) # addiu $a0, $a0, 0x4b74 -/* 0A91E0 800A85E0 24010003 */ li $at, 3 -/* 0A91E4 800A85E4 5441000A */ bnel $v0, $at, .L800A8610 -/* 0A91E8 800A85E8 8CE2001C */ lw $v0, 0x1c($a3) -.L800A85EC: -/* 0A91EC 800A85EC 10000007 */ b .L800A860C -/* 0A91F0 800A85F0 24050001 */ li $a1, 1 -.L800A85F4: -/* 0A91F4 800A85F4 81CEEDEC */ lb $t6, %lo(D_8018EDEC)($t6) -/* 0A91F8 800A85F8 3C040200 */ lui $a0, %hi(D_02004E80) # $a0, 0x200 -/* 0A91FC 800A85FC 24010003 */ li $at, 3 -/* 0A9200 800A8600 15C10002 */ bne $t6, $at, .L800A860C -/* 0A9204 800A8604 24844E80 */ addiu $a0, %lo(D_02004E80) # addiu $a0, $a0, 0x4e80 -/* 0A9208 800A8608 24050001 */ li $a1, 1 -.L800A860C: -/* 0A920C 800A860C 8CE2001C */ lw $v0, 0x1c($a3) -.L800A8610: -/* 0A9210 800A8610 28410020 */ slti $at, $v0, 0x20 -/* 0A9214 800A8614 10200030 */ beqz $at, .L800A86D8 -/* 0A9218 800A8618 00021940 */ sll $v1, $v0, 5 -/* 0A921C 800A861C 04610003 */ bgez $v1, .L800A862C -/* 0A9220 800A8620 00037983 */ sra $t7, $v1, 6 -/* 0A9224 800A8624 2461003F */ addiu $at, $v1, 0x3f -/* 0A9228 800A8628 00017983 */ sra $t7, $at, 6 -.L800A862C: -/* 0A922C 800A862C AFAF0034 */ sw $t7, 0x34($sp) -/* 0A9230 800A8630 AFA50030 */ sw $a1, 0x30($sp) -/* 0A9234 800A8634 0C026449 */ jal segmented_to_virtual_dupe -/* 0A9238 800A8638 AFA70038 */ sw $a3, 0x38($sp) -/* 0A923C 800A863C 8FA70038 */ lw $a3, 0x38($sp) -/* 0A9240 800A8640 8FA50030 */ lw $a1, 0x30($sp) -/* 0A9244 800A8644 9459000C */ lhu $t9, 0xc($v0) -/* 0A9248 800A8648 944A000E */ lhu $t2, 0xe($v0) -/* 0A924C 800A864C 8CF8000C */ lw $t8, 0xc($a3) -/* 0A9250 800A8650 8CE90010 */ lw $t1, 0x10($a3) -/* 0A9254 800A8654 8FA30034 */ lw $v1, 0x34($sp) -/* 0A9258 800A8658 03194021 */ addu $t0, $t8, $t9 -/* 0A925C 800A865C 10A0000C */ beqz $a1, .L800A8690 -/* 0A9260 800A8660 012A3021 */ addu $a2, $t1, $t2 -/* 0A9264 800A8664 3C048015 */ lui $a0, %hi(gDisplayListHead) # $a0, 0x8015 -/* 0A9268 800A8668 01033823 */ subu $a3, $t0, $v1 -/* 0A926C 800A866C 24CB0012 */ addiu $t3, $a2, 0x12 -/* 0A9270 800A8670 AFAB0010 */ sw $t3, 0x10($sp) -/* 0A9274 800A8674 24E7001E */ addiu $a3, $a3, 0x1e -/* 0A9278 800A8678 8C840298 */ lw $a0, %lo(gDisplayListHead)($a0) -/* 0A927C 800A867C 0C025668 */ jal draw_flash_select_case_slow -/* 0A9280 800A8680 01032821 */ addu $a1, $t0, $v1 -/* 0A9284 800A8684 3C018015 */ lui $at, %hi(gDisplayListHead) # $at, 0x8015 -/* 0A9288 800A8688 10000013 */ b .L800A86D8 -/* 0A928C 800A868C AC220298 */ sw $v0, %lo(gDisplayListHead)($at) -.L800A8690: -/* 0A9290 800A8690 3C048015 */ lui $a0, %hi(gDisplayListHead) # $a0, 0x8015 -/* 0A9294 800A8694 01033823 */ subu $a3, $t0, $v1 -/* 0A9298 800A8698 24CC0012 */ addiu $t4, $a2, 0x12 -/* 0A929C 800A869C 240D0001 */ li $t5, 1 -/* 0A92A0 800A86A0 240E0001 */ li $t6, 1 -/* 0A92A4 800A86A4 240F0001 */ li $t7, 1 -/* 0A92A8 800A86A8 241800FF */ li $t8, 255 -/* 0A92AC 800A86AC AFB80020 */ sw $t8, 0x20($sp) -/* 0A92B0 800A86B0 AFAF001C */ sw $t7, 0x1c($sp) -/* 0A92B4 800A86B4 AFAE0018 */ sw $t6, 0x18($sp) -/* 0A92B8 800A86B8 AFAD0014 */ sw $t5, 0x14($sp) -/* 0A92BC 800A86BC AFAC0010 */ sw $t4, 0x10($sp) -/* 0A92C0 800A86C0 24E7001E */ addiu $a3, $a3, 0x1e -/* 0A92C4 800A86C4 8C840298 */ lw $a0, %lo(gDisplayListHead)($a0) -/* 0A92C8 800A86C8 0C026306 */ jal draw_box_fill -/* 0A92CC 800A86CC 01032821 */ addu $a1, $t0, $v1 -/* 0A92D0 800A86D0 3C018015 */ lui $at, %hi(gDisplayListHead) # $at, 0x8015 -/* 0A92D4 800A86D4 AC220298 */ sw $v0, %lo(gDisplayListHead)($at) -.L800A86D8: -/* 0A92D8 800A86D8 8FBF002C */ lw $ra, 0x2c($sp) -.L800A86DC: -/* 0A92DC 800A86DC 27BD0038 */ addiu $sp, $sp, 0x38 -/* 0A92E0 800A86E0 03E00008 */ jr $ra -/* 0A92E4 800A86E4 00000000 */ nop diff --git a/asm/non_matchings/render_objects/func_8004D654.s b/asm/non_matchings/render_objects/func_8004D654.s deleted file mode 100644 index 4191028a2..000000000 --- a/asm/non_matchings/render_objects/func_8004D654.s +++ /dev/null @@ -1,96 +0,0 @@ - -glabel func_8004D654 -/* 04E254 8004D654 27BDFFB0 */ addiu $sp, $sp, -0x50 -/* 04E258 8004D658 3C088015 */ lui $t0, %hi(gDisplayListHead) # $t0, 0x8015 -/* 04E25C 8004D65C 25080298 */ addiu $t0, %lo(gDisplayListHead) # addiu $t0, $t0, 0x298 -/* 04E260 8004D660 AFBE0048 */ sw $fp, 0x48($sp) -/* 04E264 8004D664 8FBE0074 */ lw $fp, 0x74($sp) -/* 04E268 8004D668 8D030000 */ lw $v1, ($t0) -/* 04E26C 8004D66C F7B40020 */ sdc1 $f20, 0x20($sp) -/* 04E270 8004D670 AFBF004C */ sw $ra, 0x4c($sp) -/* 04E274 8004D674 246F0008 */ addiu $t7, $v1, 8 -/* 04E278 8004D678 AFB70044 */ sw $s7, 0x44($sp) -/* 04E27C 8004D67C AFB60040 */ sw $s6, 0x40($sp) -/* 04E280 8004D680 AFB5003C */ sw $s5, 0x3c($sp) -/* 04E284 8004D684 AFB40038 */ sw $s4, 0x38($sp) -/* 04E288 8004D688 AFB30034 */ sw $s3, 0x34($sp) -/* 04E28C 8004D68C AFB20030 */ sw $s2, 0x30($sp) -/* 04E290 8004D690 AFB1002C */ sw $s1, 0x2c($sp) -/* 04E294 8004D694 AFB00028 */ sw $s0, 0x28($sp) -/* 04E298 8004D698 AFA40050 */ sw $a0, 0x50($sp) -/* 04E29C 8004D69C AFA60058 */ sw $a2, 0x58($sp) -/* 04E2A0 8004D6A0 AD0F0000 */ sw $t7, ($t0) -/* 04E2A4 8004D6A4 3C190D01 */ lui $t9, %hi(D_0D008000) # $t9, 0xd01 -/* 04E2A8 8004D6A8 27398000 */ addiu $t9, %lo(D_0D008000) # addiu $t9, $t9, -0x8000 -/* 04E2AC 8004D6AC 3C180600 */ lui $t8, 0x600 -/* 04E2B0 8004D6B0 4487A000 */ mtc1 $a3, $f20 -/* 04E2B4 8004D6B4 AC780000 */ sw $t8, ($v1) -/* 04E2B8 8004D6B8 AC790004 */ sw $t9, 4($v1) -/* 04E2BC 8004D6BC 00C03825 */ move $a3, $a2 -/* 04E2C0 8004D6C0 00A0B825 */ move $s7, $a1 -/* 04E2C4 8004D6C4 07C10003 */ bgez $fp, .L8004D6D4 -/* 04E2C8 8004D6C8 001E7043 */ sra $t6, $fp, 1 -/* 04E2CC 8004D6CC 27C10001 */ addiu $at, $fp, 1 -/* 04E2D0 8004D6D0 00017043 */ sra $t6, $at, 1 -.L8004D6D4: -/* 04E2D4 8004D6D4 02EEA023 */ subu $s4, $s7, $t6 -/* 04E2D8 8004D6D8 00E09025 */ move $s2, $a3 -/* 04E2DC 8004D6DC 8FA50064 */ lw $a1, 0x64($sp) -/* 04E2E0 8004D6E0 8FA60068 */ lw $a2, 0x68($sp) -/* 04E2E4 8004D6E4 0C012D20 */ jal func_8004B480 -/* 04E2E8 8004D6E8 8FA40060 */ lw $a0, 0x60($sp) -/* 04E2EC 8004D6EC 8FB1007C */ lw $s1, 0x7c($sp) -/* 04E2F0 8004D6F0 00008025 */ move $s0, $zero -/* 04E2F4 8004D6F4 8FB30070 */ lw $s3, 0x70($sp) -/* 04E2F8 8004D6F8 03D1001A */ div $zero, $fp, $s1 -/* 04E2FC 8004D6FC 0000A812 */ mflo $s5 -/* 04E300 8004D700 16200002 */ bnez $s1, .L8004D70C -/* 04E304 8004D704 00000000 */ nop -/* 04E308 8004D708 0007000D */ break 7 -.L8004D70C: -/* 04E30C 8004D70C 2401FFFF */ li $at, -1 -/* 04E310 8004D710 16210004 */ bne $s1, $at, .L8004D724 -/* 04E314 8004D714 3C018000 */ lui $at, 0x8000 -/* 04E318 8004D718 17C10002 */ bne $fp, $at, .L8004D724 -/* 04E31C 8004D71C 00000000 */ nop -/* 04E320 8004D720 0006000D */ break 6 -.L8004D724: -/* 04E324 8004D724 5AA00017 */ blezl $s5, .L8004D784 -/* 04E328 8004D728 8FBF004C */ lw $ra, 0x4c($sp) -/* 04E32C 8004D72C 02710019 */ multu $s3, $s1 -/* 04E330 8004D730 0000B012 */ mflo $s6 -/* 04E334 8004D734 06C10003 */ bgez $s6, .L8004D744 -/* 04E338 8004D738 00164843 */ sra $t1, $s6, 1 -/* 04E33C 8004D73C 26C10001 */ addiu $at, $s6, 1 -/* 04E340 8004D740 00014843 */ sra $t1, $at, 1 -.L8004D744: -/* 04E344 8004D744 0120B025 */ move $s6, $t1 -.L8004D748: -/* 04E348 8004D748 02402025 */ move $a0, $s2 -/* 04E34C 8004D74C 02602825 */ move $a1, $s3 -/* 04E350 8004D750 0C0113CD */ jal func_80044F34 -/* 04E354 8004D754 02203025 */ move $a2, $s1 -/* 04E358 8004D758 8FA40050 */ lw $a0, 0x50($sp) -/* 04E35C 8004D75C 02E02825 */ move $a1, $s7 -/* 04E360 8004D760 02603025 */ move $a2, $s3 -/* 04E364 8004D764 03C03825 */ move $a3, $fp -/* 04E368 8004D768 0C012ECF */ jal func_8004BB3C -/* 04E36C 8004D76C E7B40010 */ swc1 $f20, 0x10($sp) -/* 04E370 8004D770 26100001 */ addiu $s0, $s0, 1 -/* 04E374 8004D774 02569021 */ addu $s2, $s2, $s6 -/* 04E378 8004D778 1615FFF3 */ bne $s0, $s5, .L8004D748 -/* 04E37C 8004D77C 0291A021 */ addu $s4, $s4, $s1 -/* 04E380 8004D780 8FBF004C */ lw $ra, 0x4c($sp) -.L8004D784: -/* 04E384 8004D784 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 04E388 8004D788 8FB00028 */ lw $s0, 0x28($sp) -/* 04E38C 8004D78C 8FB1002C */ lw $s1, 0x2c($sp) -/* 04E390 8004D790 8FB20030 */ lw $s2, 0x30($sp) -/* 04E394 8004D794 8FB30034 */ lw $s3, 0x34($sp) -/* 04E398 8004D798 8FB40038 */ lw $s4, 0x38($sp) -/* 04E39C 8004D79C 8FB5003C */ lw $s5, 0x3c($sp) -/* 04E3A0 8004D7A0 8FB60040 */ lw $s6, 0x40($sp) -/* 04E3A4 8004D7A4 8FB70044 */ lw $s7, 0x44($sp) -/* 04E3A8 8004D7A8 8FBE0048 */ lw $fp, 0x48($sp) -/* 04E3AC 8004D7AC 03E00008 */ jr $ra -/* 04E3B0 8004D7B0 27BD0050 */ addiu $sp, $sp, 0x50 diff --git a/asm/non_matchings/update_objects/func_8007B040.s b/asm/non_matchings/update_objects/func_8007B040.s deleted file mode 100644 index 87576cc57..000000000 --- a/asm/non_matchings/update_objects/func_8007B040.s +++ /dev/null @@ -1,144 +0,0 @@ -glabel func_8007B040 -/* 07BC40 8007B040 3C0E800E */ lui $t6, %hi(gModeSelection) # $t6, 0x800e -/* 07BC44 8007B044 8DCEC53C */ lw $t6, %lo(gModeSelection)($t6) -/* 07BC48 8007B048 27BDFF88 */ addiu $sp, $sp, -0x78 -/* 07BC4C 8007B04C AFB00018 */ sw $s0, 0x18($sp) -/* 07BC50 8007B050 00A08025 */ move $s0, $a1 -/* 07BC54 8007B054 AFBF001C */ sw $ra, 0x1c($sp) -/* 07BC58 8007B058 AFA40078 */ sw $a0, 0x78($sp) -/* 07BC5C 8007B05C 00003825 */ move $a3, $zero -/* 07BC60 8007B060 15C00020 */ bnez $t6, .L8007B0E4 -/* 07BC64 8007B064 00005825 */ move $t3, $zero -/* 07BC68 8007B068 0C0ADF8D */ jal random_int -/* 07BC6C 8007B06C 24040064 */ li $a0, 100 -/* 07BC70 8007B070 28410051 */ slti $at, $v0, 0x51 -/* 07BC74 8007B074 1020000B */ beqz $at, .L8007B0A4 -/* 07BC78 8007B078 320400FF */ andi $a0, $s0, 0xff -/* 07BC7C 8007B07C 00101080 */ sll $v0, $s0, 2 -/* 07BC80 8007B080 3C048016 */ lui $a0, %hi(gLapCountByPlayerId + 0x2) # 0x8016 -/* 07BC84 8007B084 3C058016 */ lui $a1, %hi(gGPCurrentRaceRankByPlayerId + 0x2) # 0x8016 -/* 07BC88 8007B088 00A22821 */ addu $a1, $a1, $v0 -/* 07BC8C 8007B08C 00822021 */ addu $a0, $a0, $v0 -/* 07BC90 8007B090 84844392 */ lh $a0, %lo(gLapCountByPlayerId + 0x2)($a0) # 0x4392($a0) -/* 07BC94 8007B094 0C01EBD0 */ jal gen_random_item_human -/* 07BC98 8007B098 84A543BA */ lh $a1, %lo(gGPCurrentRaceRankByPlayerId + 0x2)($a1) # 0x43ba($a1) -/* 07BC9C 8007B09C 10000006 */ b .L8007B0B8 -/* 07BCA0 8007B0A0 00401825 */ move $v1, $v0 -.L8007B0A4: -/* 07BCA4 8007B0A4 3C051900 */ lui $a1, (0x1900A058 >> 16) # lui $a1, 0x1900 -/* 07BCA8 8007B0A8 34A5A058 */ ori $a1, (0x1900A058 & 0xFFFF) # ori $a1, $a1, 0xa058 -/* 07BCAC 8007B0AC 0C032418 */ jal func_800C9060 -/* 07BCB0 8007B0B0 AFA00060 */ sw $zero, 0x60($sp) -/* 07BCB4 8007B0B4 8FA30060 */ lw $v1, 0x60($sp) -.L8007B0B8: -/* 07BCB8 8007B0B8 8FAF0078 */ lw $t7, 0x78($sp) -/* 07BCBC 8007B0BC 240D00E0 */ li $t5, 224 -/* 07BCC0 8007B0C0 3C0C8016 */ lui $t4, %hi(gObjectList) # $t4, 0x8016 -/* 07BCC4 8007B0C4 01ED0019 */ multu $t7, $t5 -/* 07BCC8 8007B0C8 258C5C18 */ addiu $t4, %lo(gObjectList) # addiu $t4, $t4, 0x5c18 -/* 07BCCC 8007B0CC 240B0001 */ li $t3, 1 -/* 07BCD0 8007B0D0 0000C012 */ mflo $t8 -/* 07BCD4 8007B0D4 01983821 */ addu $a3, $t4, $t8 -/* 07BCD8 8007B0D8 A4E300A2 */ sh $v1, 0xa2($a3) -/* 07BCDC 8007B0DC 10000058 */ b .L8007B240 -/* 07BCE0 8007B0E0 A0E300D2 */ sb $v1, 0xd2($a3) -.L8007B0E4: -/* 07BCE4 8007B0E4 3C08800E */ lui $t0, %hi(gPlayerCountSelection1) # $t0, 0x800e -/* 07BCE8 8007B0E8 8D08C538 */ lw $t0, %lo(gPlayerCountSelection1)($t0) -/* 07BCEC 8007B0EC 00001825 */ move $v1, $zero -/* 07BCF0 8007B0F0 19000019 */ blez $t0, .L8007B158 -/* 07BCF4 8007B0F4 3C048018 */ lui $a0, %hi(gItemWindowObjectByPlayerId) # $a0, 0x8018 -/* 07BCF8 8007B0F8 3C0C8016 */ lui $t4, %hi(gObjectList) # $t4, 0x8016 -/* 07BCFC 8007B0FC 258C5C18 */ addiu $t4, %lo(gObjectList) # addiu $t4, $t4, 0x5c18 -/* 07BD00 8007B100 24843E88 */ addiu $a0, %lo(gItemWindowObjectByPlayerId) # addiu $a0, $a0, 0x3e88 -/* 07BD04 8007B104 240D00E0 */ li $t5, 224 -/* 07BD08 8007B108 27AA0040 */ addiu $t2, $sp, 0x40 -/* 07BD0C 8007B10C 27A90050 */ addiu $t1, $sp, 0x50 -.L8007B110: -/* 07BD10 8007B110 1070000D */ beq $v1, $s0, .L8007B148 -/* 07BD14 8007B114 8C860000 */ lw $a2, ($a0) -/* 07BD18 8007B118 00CD0019 */ multu $a2, $t5 -/* 07BD1C 8007B11C 00071080 */ sll $v0, $a3, 2 -/* 07BD20 8007B120 0122C821 */ addu $t9, $t1, $v0 -/* 07BD24 8007B124 01427021 */ addu $t6, $t2, $v0 -/* 07BD28 8007B128 00007812 */ mflo $t7 -/* 07BD2C 8007B12C 018FC021 */ addu $t8, $t4, $t7 -/* 07BD30 8007B130 870500A4 */ lh $a1, 0xa4($t8) -/* 07BD34 8007B134 50A00005 */ beql $a1, $zero, .L8007B14C -/* 07BD38 8007B138 24630001 */ addiu $v1, $v1, 1 -/* 07BD3C 8007B13C AF230000 */ sw $v1, ($t9) -/* 07BD40 8007B140 ADC50000 */ sw $a1, ($t6) -/* 07BD44 8007B144 24E70001 */ addiu $a3, $a3, 1 -.L8007B148: -/* 07BD48 8007B148 24630001 */ addiu $v1, $v1, 1 -.L8007B14C: -/* 07BD4C 8007B14C 0068082A */ slt $at, $v1, $t0 -/* 07BD50 8007B150 1420FFEF */ bnez $at, .L8007B110 -/* 07BD54 8007B154 24840004 */ addiu $a0, $a0, 4 -.L8007B158: -/* 07BD58 8007B158 50E0003A */ beql $a3, $zero, .L8007B244 -/* 07BD5C 8007B15C 8FBF001C */ lw $ra, 0x1c($sp) -/* 07BD60 8007B160 0C0ADF8D */ jal random_int -/* 07BD64 8007B164 30E4FFFF */ andi $a0, $a3, 0xffff -/* 07BD68 8007B168 8FB80078 */ lw $t8, 0x78($sp) -/* 07BD6C 8007B16C 240D00E0 */ li $t5, 224 -/* 07BD70 8007B170 27A90050 */ addiu $t1, $sp, 0x50 -/* 07BD74 8007B174 030D0019 */ multu $t8, $t5 -/* 07BD78 8007B178 00025880 */ sll $t3, $v0, 2 -/* 07BD7C 8007B17C 012B7021 */ addu $t6, $t1, $t3 -/* 07BD80 8007B180 8DC30000 */ lw $v1, ($t6) -/* 07BD84 8007B184 27AA0040 */ addiu $t2, $sp, 0x40 -/* 07BD88 8007B188 3C0C8016 */ lui $t4, %hi(gObjectList) # $t4, 0x8016 -/* 07BD8C 8007B18C 258C5C18 */ addiu $t4, %lo(gObjectList) # addiu $t4, $t4, 0x5c18 -/* 07BD90 8007B190 014B7821 */ addu $t7, $t2, $t3 -/* 07BD94 8007B194 85E80002 */ lh $t0, 2($t7) -/* 07BD98 8007B198 0003C0C0 */ sll $t8, $v1, 3 -/* 07BD9C 8007B19C 0000C812 */ mflo $t9 -/* 07BDA0 8007B1A0 01993821 */ addu $a3, $t4, $t9 -/* 07BDA4 8007B1A4 0303C023 */ subu $t8, $t8, $v1 -/* 07BDA8 8007B1A8 0018C100 */ sll $t8, $t8, 4 -/* 07BDAC 8007B1AC 3C19800E */ lui $t9, %hi(gPlayerOne) # $t9, 0x800e -/* 07BDB0 8007B1B0 A0E300D1 */ sb $v1, 0xd1($a3) -/* 07BDB4 8007B1B4 0303C023 */ subu $t8, $t8, $v1 -/* 07BDB8 8007B1B8 A4E800A2 */ sh $t0, 0xa2($a3) -/* 07BDBC 8007B1BC A0E800D2 */ sb $t0, 0xd2($a3) -/* 07BDC0 8007B1C0 8F39C4DC */ lw $t9, %lo(gPlayerOne)($t9) -/* 07BDC4 8007B1C4 3C068018 */ lui $a2, %hi(gItemWindowObjectByPlayerId) # 0x8018 -/* 07BDC8 8007B1C8 0018C080 */ sll $t8, $t8, 2 -/* 07BDCC 8007B1CC 00037880 */ sll $t7, $v1, 2 -/* 07BDD0 8007B1D0 00CF3021 */ addu $a2, $a2, $t7 -/* 07BDD4 8007B1D4 0303C023 */ subu $t8, $t8, $v1 -/* 07BDD8 8007B1D8 8CC43E88 */ lw $a0, %lo(gItemWindowObjectByPlayerId)($a2) # 0x3e88($a2) -/* 07BDDC 8007B1DC 0018C0C0 */ sll $t8, $t8, 3 -/* 07BDE0 8007B1E0 03197021 */ addu $t6, $t8, $t9 -/* 07BDE4 8007B1E4 AFAE0038 */ sw $t6, 0x38($sp) -/* 07BDE8 8007B1E8 24050001 */ li $a1, 1 -/* 07BDEC 8007B1EC 0C01C8A9 */ jal func_800722A4 -/* 07BDF0 8007B1F0 AFA40064 */ sw $a0, 0x64($sp) -/* 07BDF4 8007B1F4 8FA40064 */ lw $a0, 0x64($sp) -/* 07BDF8 8007B1F8 240D00E0 */ li $t5, 224 -/* 07BDFC 8007B1FC 3C0C8016 */ lui $t4, %hi(gObjectList) # $t4, 0x8016 -/* 07BE00 8007B200 008D0019 */ multu $a0, $t5 -/* 07BE04 8007B204 258C5C18 */ addiu $t4, %lo(gObjectList) # addiu $t4, $t4, 0x5c18 -/* 07BE08 8007B208 8FB80038 */ lw $t8, 0x38($sp) -/* 07BE0C 8007B20C 24050002 */ li $a1, 2 -/* 07BE10 8007B210 00007812 */ mflo $t7 -/* 07BE14 8007B214 018F8021 */ addu $s0, $t4, $t7 -/* 07BE18 8007B218 A60000A4 */ sh $zero, 0xa4($s0) -/* 07BE1C 8007B21C 0C01C8C8 */ jal func_80072320 -/* 07BE20 8007B220 A7000010 */ sh $zero, 0x10($t8) -/* 07BE24 8007B224 10400005 */ beqz $v0, .L8007B23C -/* 07BE28 8007B228 8FA60064 */ lw $a2, 0x64($sp) -/* 07BE2C 8007B22C 00C02025 */ move $a0, $a2 -/* 07BE30 8007B230 0C01C8B3 */ jal func_800722CC -/* 07BE34 8007B234 24050002 */ li $a1, 2 -/* 07BE38 8007B238 A6000098 */ sh $zero, 0x98($s0) -.L8007B23C: -/* 07BE3C 8007B23C 240B0001 */ li $t3, 1 -.L8007B240: -/* 07BE40 8007B240 8FBF001C */ lw $ra, 0x1c($sp) -.L8007B244: -/* 07BE44 8007B244 8FB00018 */ lw $s0, 0x18($sp) -/* 07BE48 8007B248 27BD0078 */ addiu $sp, $sp, 0x78 -/* 07BE4C 8007B24C 03E00008 */ jr $ra -/* 07BE50 8007B250 01601025 */ move $v0, $t3 diff --git a/asm/non_matchings/update_objects/func_80081FF4.s b/asm/non_matchings/update_objects/func_80081FF4.s deleted file mode 100644 index 932ca1b9a..000000000 --- a/asm/non_matchings/update_objects/func_80081FF4.s +++ /dev/null @@ -1,120 +0,0 @@ -glabel func_80081FF4 -/* 082BF4 80081FF4 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 082BF8 80081FF8 AFBF0014 */ sw $ra, 0x14($sp) -/* 082BFC 80081FFC AFA5003C */ sw $a1, 0x3c($sp) -/* 082C00 80082000 AFA40038 */ sw $a0, 0x38($sp) -/* 082C04 80082004 0C01C8E9 */ jal init_object -/* 082C08 80082008 00002825 */ move $a1, $zero -/* 082C0C 8008200C 0C0ADF8D */ jal random_int -/* 082C10 80082010 2404001E */ li $a0, 30 -/* 082C14 80082014 8FAE0038 */ lw $t6, 0x38($sp) -/* 082C18 80082018 8FA3003C */ lw $v1, 0x3c($sp) -/* 082C1C 8008201C 3C188016 */ lui $t8, %hi(gObjectList) # $t8, 0x8016 -/* 082C20 80082020 000E78C0 */ sll $t7, $t6, 3 -/* 082C24 80082024 01EE7823 */ subu $t7, $t7, $t6 -/* 082C28 80082028 000F7940 */ sll $t7, $t7, 5 -/* 082C2C 8008202C 27185C18 */ addiu $t8, %lo(gObjectList) # addiu $t8, $t8, 0x5c18 -/* 082C30 80082030 01F83821 */ addu $a3, $t7, $t8 -/* 082C34 80082034 24590005 */ addiu $t9, $v0, 5 -/* 082C38 80082038 24010001 */ li $at, 1 -/* 082C3C 8008203C 10610009 */ beq $v1, $at, .L80082064 -/* 082C40 80082040 ACF9004C */ sw $t9, 0x4c($a3) -/* 082C44 80082044 24010002 */ li $at, 2 -/* 082C48 80082048 1061000D */ beq $v1, $at, .L80082080 -/* 082C4C 8008204C 3C068019 */ lui $a2, %hi(D_8018D1A8) # 0x8019 -/* 082C50 80082050 24010003 */ li $at, 3 -/* 082C54 80082054 10610011 */ beq $v1, $at, .L8008209C -/* 082C58 80082058 3C068019 */ lui $a2, %hi(D_8018D1B8) # 0x8019 -/* 082C5C 8008205C 10000016 */ b .L800820B8 -/* 082C60 80082060 8FA5002C */ lw $a1, 0x2c($sp) -.L80082064: -/* 082C64 80082064 3C068019 */ lui $a2, %hi(D_8018D198) # $a2, 0x8019 -/* 082C68 80082068 24C6D198 */ addiu $a2, %lo(D_8018D198) # addiu $a2, $a2, -0x2e68 -/* 082C6C 8008206C 24050008 */ li $a1, 8 -/* 082C70 80082070 A7A00028 */ sh $zero, 0x28($sp) -/* 082C74 80082074 AFA5002C */ sw $a1, 0x2c($sp) -/* 082C78 80082078 1000000E */ b .L800820B4 -/* 082C7C 8008207C AFA60020 */ sw $a2, 0x20($sp) -.L80082080: -/* 082C80 80082080 24C6D1A8 */ addiu $a2, $a2, %lo(D_8018D1A8) # -0x2e58 -/* 082C84 80082084 2405000B */ li $a1, 11 -/* 082C88 80082088 24080018 */ li $t0, 24 -/* 082C8C 8008208C A7A80028 */ sh $t0, 0x28($sp) -/* 082C90 80082090 AFA5002C */ sw $a1, 0x2c($sp) -/* 082C94 80082094 10000007 */ b .L800820B4 -/* 082C98 80082098 AFA60020 */ sw $a2, 0x20($sp) -.L8008209C: -/* 082C9C 8008209C 24C6D1B8 */ addiu $a2, $a2, %lo(D_8018D1B8) # -0x2e48 -/* 082CA0 800820A0 2405000C */ li $a1, 12 -/* 082CA4 800820A4 24090039 */ li $t1, 57 -/* 082CA8 800820A8 A7A90028 */ sh $t1, 0x28($sp) -/* 082CAC 800820AC AFA5002C */ sw $a1, 0x2c($sp) -/* 082CB0 800820B0 AFA60020 */ sw $a2, 0x20($sp) -.L800820B4: -/* 082CB4 800820B4 8FA5002C */ lw $a1, 0x2c($sp) -.L800820B8: -/* 082CB8 800820B8 AFA70018 */ sw $a3, 0x18($sp) -/* 082CBC 800820BC 0C0ADF8D */ jal random_int -/* 082CC0 800820C0 30A4FFFF */ andi $a0, $a1, 0xffff -/* 082CC4 800820C4 8FA5002C */ lw $a1, 0x2c($sp) -/* 082CC8 800820C8 00021C00 */ sll $v1, $v0, 0x10 -/* 082CCC 800820CC 00035403 */ sra $t2, $v1, 0x10 -/* 082CD0 800820D0 01401825 */ move $v1, $t2 -/* 082CD4 800820D4 8FA60020 */ lw $a2, 0x20($sp) -/* 082CD8 800820D8 8FA70018 */ lw $a3, 0x18($sp) -/* 082CDC 800820DC 18A00013 */ blez $a1, .L8008212C -/* 082CE0 800820E0 00002025 */ move $a0, $zero -/* 082CE4 800820E4 00661021 */ addu $v0, $v1, $a2 -.L800820E8: -/* 082CE8 800820E8 804B0000 */ lb $t3, ($v0) -/* 082CEC 800820EC 24840001 */ addiu $a0, $a0, 1 -/* 082CF0 800820F0 51600009 */ beql $t3, $zero, .L80082118 -/* 082CF4 800820F4 240E0001 */ li $t6, 1 -/* 082CF8 800820F8 24630001 */ addiu $v1, $v1, 1 -/* 082CFC 800820FC 00036400 */ sll $t4, $v1, 0x10 -/* 082D00 80082100 000C1C03 */ sra $v1, $t4, 0x10 -/* 082D04 80082104 14650007 */ bne $v1, $a1, .L80082124 -/* 082D08 80082108 00000000 */ nop -/* 082D0C 8008210C 10000005 */ b .L80082124 -/* 082D10 80082110 00001825 */ move $v1, $zero -/* 082D14 80082114 240E0001 */ li $t6, 1 -.L80082118: -/* 082D18 80082118 A04E0000 */ sb $t6, ($v0) -/* 082D1C 8008211C 10000003 */ b .L8008212C -/* 082D20 80082120 A4E300A4 */ sh $v1, 0xa4($a3) -.L80082124: -/* 082D24 80082124 5485FFF0 */ bnel $a0, $a1, .L800820E8 -/* 082D28 80082128 00661021 */ addu $v0, $v1, $a2 -.L8008212C: -/* 082D2C 8008212C 87AF0028 */ lh $t7, 0x28($sp) -/* 082D30 80082130 0003C880 */ sll $t9, $v1, 2 -/* 082D34 80082134 0323C823 */ subu $t9, $t9, $v1 -/* 082D38 80082138 00194040 */ sll $t0, $t9, 1 -/* 082D3C 8008213C 3C0A800E */ lui $t2, %hi(gMoleSpawns) # $t2, 0x800e -/* 082D40 80082140 000FC040 */ sll $t8, $t7, 1 -/* 082D44 80082144 03084821 */ addu $t1, $t8, $t0 -/* 082D48 80082148 254A6360 */ addiu $t2, %lo(gMoleSpawns) # addiu $t2, $t2, 0x6360 -/* 082D4C 8008214C 012A1021 */ addu $v0, $t1, $t2 -/* 082D50 80082150 844B0000 */ lh $t3, ($v0) -/* 082D54 80082154 3C018019 */ lui $at, %hi(xOrientation) # $at, 0x8019 -/* 082D58 80082158 C428D01C */ lwc1 $f8, %lo(xOrientation)($at) -/* 082D5C 8008215C 448B2000 */ mtc1 $t3, $f4 -/* 082D60 80082160 844C0002 */ lh $t4, 2($v0) -/* 082D64 80082164 844D0004 */ lh $t5, 4($v0) -/* 082D68 80082168 468021A0 */ cvt.s.w $f6, $f4 -/* 082D6C 8008216C 448C8000 */ mtc1 $t4, $f16 -/* 082D70 80082170 3C014022 */ li $at, 0x40220000 # 2.531250 -/* 082D74 80082174 44812800 */ mtc1 $at, $f5 -/* 082D78 80082178 44802000 */ mtc1 $zero, $f4 -/* 082D7C 8008217C 468084A1 */ cvt.d.w $f18, $f16 -/* 082D80 80082180 46083282 */ mul.s $f10, $f6, $f8 -/* 082D84 80082184 8FBF0014 */ lw $ra, 0x14($sp) -/* 082D88 80082188 27BD0038 */ addiu $sp, $sp, 0x38 -/* 082D8C 8008218C 46249181 */ sub.d $f6, $f18, $f4 -/* 082D90 80082190 E4EA0010 */ swc1 $f10, 0x10($a3) -/* 082D94 80082194 448D5000 */ mtc1 $t5, $f10 -/* 082D98 80082198 46203220 */ cvt.s.d $f8, $f6 -/* 082D9C 8008219C 46805420 */ cvt.s.w $f16, $f10 -/* 082DA0 800821A0 E4E80014 */ swc1 $f8, 0x14($a3) -/* 082DA4 800821A4 03E00008 */ jr $ra -/* 082DA8 800821A8 E4F00018 */ swc1 $f16, 0x18($a3) diff --git a/include/objects.h b/include/objects.h index e3c5dd73a..86fc2af02 100644 --- a/include/objects.h +++ b/include/objects.h @@ -311,13 +311,17 @@ extern s32 indexObjectList3[]; extern s32 indexObjectList4[]; #define gObjectParticle1_SIZE 128 -#define NUM_MAX_MOLES 0x1F #define NUM_GROUP1_MOLES 8 #define NUM_GROUP2_MOLES 11 #define NUM_GROUP3_MOLES 12 +#define NUM_TOTAL_MOLES (NUM_GROUP1_MOLES + NUM_GROUP2_MOLES + NUM_GROUP3_MOLES) #define NUM_SNOWFLAKES 0x32 -extern Vec3s gMoleSpawns[]; +typedef union { + Vec3s asVec3sList[NUM_TOTAL_MOLES]; + s16 asFlatList[NUM_TOTAL_MOLES*3]; +} MoleSpawnUnion; +extern MoleSpawnUnion gMoleSpawns; /** * Exact use unknown, something related to the mole groups diff --git a/src/code_80005FD0.c b/src/code_80005FD0.c index d1b1cee1f..e574dc8c7 100644 --- a/src/code_80005FD0.c +++ b/src/code_80005FD0.c @@ -930,10 +930,6 @@ s32 func_80007BF8(u16 arg0, u16 arg1, u16 arg2, u16 arg3, u16 arg4) { #ifdef NON_MATCHING // Likely func equiv // https://decomp.me/scratch/Te4u1 -extern u16 D_80163344[]; -extern s16 D_80163478; -extern s16 D_801634C0[]; - void func_80007D04(s32 playerId, Player *player) { s16 temp_t1; s16 temp_t2; diff --git a/src/code_8006E9C0.c b/src/code_8006E9C0.c index 3eda50bb9..45b0b7de8 100644 --- a/src/code_8006E9C0.c +++ b/src/code_8006E9C0.c @@ -942,12 +942,12 @@ void init_course_object(void) { D_8018D1B8[i] = 0; find_unused_obj_index(&indexObjectList1[i]); } - for (i = 0; i < NUM_MAX_MOLES; i++) { + for (i = 0; i < NUM_TOTAL_MOLES; i++) { find_unused_obj_index(&gObjectParticle1[i]); objectId = gObjectParticle1[i]; init_object(objectId, 0); - gObjectList[objectId].pos[0] = gMoleSpawns[i][0] * xOrientation; - gObjectList[objectId].pos[2] = gMoleSpawns[i][2]; + gObjectList[objectId].pos[0] = gMoleSpawns.asVec3sList[i][0] * xOrientation; + gObjectList[objectId].pos[2] = gMoleSpawns.asVec3sList[i][2]; func_800887C0(objectId); gObjectList[objectId].sizeScaling = 0.7f; } diff --git a/src/code_80091750.c b/src/code_80091750.c index 16849d710..2f7956a33 100644 --- a/src/code_80091750.c +++ b/src/code_80091750.c @@ -64,7 +64,7 @@ struct_8018E768_entry D_8018E768[D_8018E768_SIZE]; s32 gCycleFlashMenu; s8 D_8018E7AC[4]; s8 D_8018E7B0; -s32 D_8018E7B8[4]; +u32 D_8018E7B8[4]; u32 D_8018E7C8; u32 D_8018E7D0[4]; s32 D_8018E7E0; @@ -1172,13 +1172,12 @@ MkTexture *D_800E8294[] = { MkTexture *D_800E82B4[] = { D_02004A5C, D_02004A98, D_02004AD4, D_02004B10, - D_02004B9C, }; -MkTexture *D_800E82C8[] = { - D_02004BC4, D_02004BEC, D_02004C14, D_02004C3C, - D_02004C64, D_02004C8C, D_02004CF0, D_02004D54, - D_02004DB8, D_02004E1C, D_02004E80, +MkTexture *D_800E82C4[] = { + D_02004B9C, D_02004BC4, D_02004BEC, D_02004C14, + D_02004C3C, D_02004C64, D_02004C8C, D_02004CF0, + D_02004D54, D_02004DB8, D_02004E1C, D_02004E80, }; MkTexture *D_800E82F4[] = { @@ -3494,252 +3493,106 @@ block_39: GLOBAL_ASM("asm/non_matchings/code_80091750/func_800963F0.s") #endif -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -extern ? D_0B002A00; +#ifdef NON_MATCHING +// https://decomp.me/scratch/zyWcm +// I think I have the GIB macros right, but everything else is suspect -Gfx *func_80096CD8(Gfx *displayListHead, s32 arg1, s32 arg2, u32 arg3, u32 arg4) { - s32 spD4; - s32 spD0; /* compiler-managed */ +// I don't know what this actually meant to be. Its plausible that its meant to be a reference to `gTextureTitleChocoMountain` +// That would be weird though because this function doesn't draw that picture at all. So its plausible that its instead +// using it as some form semi-random data for the static pattern? +extern u8 D_0B002A00; + +// This function is responsible for drawing a near unnoticeable static pattern +// over the course images when loading the cup selection screen +// Try locking the word at `8018DC80` to see something like 0x20 just before confirming character selection to make it last longer +Gfx *func_80096CD8(Gfx *displayListHead, s32 arg1, s32 arg2, u32 width, u32 arg4) { s32 spCC; - s32 spC8; - s32 spC4; - s32 sp84; - u32 sp80; - u32 sp7C; - u32 sp78; - s32 sp58; - Gfx *temp_s0; - Gfx *temp_s0_2; - Gfx *temp_s0_3; - Gfx *temp_s0_4; - Gfx *temp_s0_5; - Gfx *temp_s0_6; - Gfx *temp_s0_7; - Gfx *temp_s0_8; - Gfx *temp_s0_9; - Gfx *temp_v0_2; - Gfx *var_s0; - s32 temp_a0; - s32 temp_a1; - s32 temp_a2; - s32 temp_at; - s32 temp_at_2; - s32 temp_lo; - s32 temp_t4; - s32 temp_t8; - s32 temp_t8_2; - s32 temp_v0; - s32 temp_v0_3; - s32 temp_v0_4; - s32 temp_v1; + s32 masks; + s32 maskt; s32 temp_v1_2; - s32 temp_v1_3; - s32 temp_v1_4; s32 var_fp; s32 var_s1_2; s32 var_s1_3; - s32 var_s2; - s32 var_s2_2; - s32 var_s3; - s32 var_s3_2; - s32 var_s4; - s32 var_t3; - s32 var_t4; s32 var_t5; s32 var_v0; - u32 temp_a3; u32 temp_t2; u32 temp_t6; - u32 temp_t7; - u32 var_a1; - u32 var_a1_2; - u32 var_ra; - u32 var_ra_2; - u32 var_s1; + s32 var_a1; + s32 var_ra; + s32 var_s1; u32 var_s4_2; - u32 var_s6; - u32 var_s7; + s32 temp_v0; - var_s0 = displayListHead; - var_s2 = arg2; - var_s4 = arg1; var_ra = 1; - spC8 = 0; - spC4 = 0; - if (arg3 >= 2U) { + masks = 0; + maskt = 0; + if (width >= 2U) { do { - temp_t7 = var_ra * 2; - var_ra = temp_t7; - } while (temp_t7 < arg3); + var_ra *= 2; + } while (var_ra < width); } - temp_lo = 0x400 / (s32) var_ra; - var_a1 = arg4; - spCC = temp_lo; - if (var_a1 < (u32) (temp_lo / 2)) { - var_v0 = temp_lo / 2; + spCC = 0x400 / var_ra; + if (arg4 < (spCC / 2)) { do { - temp_v1 = var_v0; - var_v0 = temp_v1 / 2; - } while (var_a1 < (u32) var_v0); - spCC = temp_v1; + spCC /= 2; + } while (arg4 < spCC); } var_s1 = var_ra; - if ((s32) var_ra >= 2) { - do { - temp_t8 = (s32) var_s1 / 2; - temp_at = temp_t8 < 2; - var_s1 = (u32) temp_t8; - spC8 += 1; - } while (temp_at == 0); + while (var_s1 >= 2) { + var_s1 /= 2; + masks += 1; } var_s1_2 = spCC; - if (var_s1_2 >= 2) { - do { - temp_t8_2 = var_s1_2 / 2; - temp_at_2 = temp_t8_2 < 2; - var_s1_2 = temp_t8_2; - spC4 += 1; - } while (temp_at_2 == 0); + while (var_s1_2 >= 2) { + var_s1_2 /= 2; + maskt += 1; } - if (var_s4 < 0) { - arg3 -= var_s4; - var_s4 = 0; - } else if ((u32) (var_s4 + arg3) >= 0x141U) { - arg3 = 0x140 - var_s4; + if (arg1 < 0) { + width -= arg1; + arg1 = 0; + } else if ((arg1 + width) > 0x140) { + width = 0x140 - arg1; } - if (var_s2 < 0) { - var_a1 -= var_s2; - var_s2 = 0; - } else if ((u32) (var_s2 + var_a1) >= 0xF1U) { - var_a1 = 0xF0 - var_s2; + if (arg2 < 0) { + arg4 -= arg2; + arg2 = 0; + } else if ((arg2 + arg4) > 0xF0) { + arg4 = 0xF0 - arg2; } - if (arg3 == 0) { - - } else if (var_a1 == 0) { - - } else { - spD0 = (s32) var_ra; - var_s3 = var_s2 + var_a1; - temp_t4 = var_s4 + arg3; - sp84 = temp_t4; + if (width == 0) return displayListHead; + else if (arg4 == 0) return displayListHead; + else { temp_v0 = random_int(0x0064U); - temp_v0_2 = draw_box(var_s0, var_s4, var_s2, sp84, var_s3, 0, 0, 0, temp_v0); - var_t4 = temp_t4; - var_ra_2 = var_ra; - temp_v1_2 = (temp_v0 + 0x96) & 0xFF; - temp_v0_2->words.w0 = 0xE7000000; - temp_v0_2->unk8 = 0xB900031D; - temp_v0_2->unkC = 0x00504240; - temp_v0_2->unk10 = 0xFA000000; - temp_v0_2->words.w1 = 0; - temp_v0_2->unk14 = (s32) ((temp_v1_2 << 0x18) | (temp_v1_2 << 0x10) | (temp_v1_2 << 8) | temp_v1_2); - temp_v0_2->unk1C = 0xFF2FFFFF; - temp_v0_2->unk18 = 0xFC119623; - var_s0 = temp_v0_2 + 0x20; - var_fp = var_s2; - if ((u32) var_s2 < (u32) var_s3) { -loop_23: + displayListHead = draw_box(displayListHead, arg1, arg2, arg1 + width, arg2 + arg4, 0, 0, 0, temp_v0); + temp_v0 += 0x96; + gDPPipeSync(displayListHead++); + gDPSetRenderMode(displayListHead++, G_RM_XLU_SURF, G_RM_XLU_SURF2); + gDPSetPrimColor(displayListHead++, 0, 0, temp_v0, temp_v0, temp_v0, temp_v0); + gDPSetCombineMode(displayListHead++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); + for (var_fp = arg2; var_fp < (arg2 + arg4); var_fp += spCC) { var_t5 = spCC; - var_s1_3 = var_s4; - temp_t6 = spCC + var_fp; - sp7C = temp_t6; - if ((u32) var_s3 < temp_t6) { - var_t5 = var_s3 - var_fp; - if (var_t5 != 0) { - var_s1_3 = var_s4; - goto block_26; - } - } else { -block_26: - if ((u32) var_s4 < (u32) var_t4) { - sp80 = (u32) var_s3; - arg1 = var_s4; -loop_28: - temp_t2 = var_ra_2 + var_s1_3; - if ((u32) var_t4 < temp_t2) { - var_s4_2 = var_t4 - var_s1_3; - if (var_s4_2 == 0) { - var_s4 = arg1; - var_s3 = (s32) sp80; - } else { - var_a1_2 = ((arg3 - 1) & 0xFFF) | 0xFD700000; - temp_v0_3 = (spC4 & 0xF) << 0xE; - temp_v1_3 = (spC8 & 0xF) * 0x10; - var_s6 = temp_v0_3 | 0x07000000 | temp_v1_3; - var_t3 = (var_fp << 5) & 0xFFFF; - var_s2_2 = (var_fp * 4) & 0xFFF; - var_s3_2 = ((var_fp + var_t5) * 4) & 0xFFF; - var_s7 = temp_v0_3 | temp_v1_3; - goto block_33; - } - } else { - var_a1_2 = ((arg3 - 1) & 0xFFF) | 0xFD700000; - temp_v0_4 = (spC4 & 0xF) << 0xE; - temp_v1_4 = (spC8 & 0xF) * 0x10; - var_s6 = temp_v0_4 | 0x07000000 | temp_v1_4; - var_t3 = (var_fp << 5) & 0xFFFF; - var_s2_2 = (var_fp * 4) & 0xFFF; - var_s3_2 = ((var_fp + var_t5) * 4) & 0xFFF; - var_s7 = temp_v0_4 | temp_v1_4; - var_s4_2 = var_ra_2; -block_33: - var_s0->words.w0 = var_a1_2; - spD0 = var_ra_2; - spD4 = var_t5; - sp84 = var_t4; - sp58 = var_t3; - sp78 = temp_t2; - temp_s0 = var_s0 + 8; - temp_a2 = var_s1_3 + var_s4_2; - var_s0->words.w1 = (u32) ((random_int(0x0080U) * 2) + &D_0B002A00); - temp_s0_2 = temp_s0 + 8; - temp_a3 = ((((u32) (((temp_a2 - var_s1_3) * 2) + 9) >> 3) & 0x1FF) << 9) | 0xF5700000; - temp_s0->words.w0 = temp_a3; - temp_s0->words.w1 = var_s6; - temp_s0_2->words.w0 = 0xE6000000; - temp_a1 = ((var_s1_3 * 4) & 0xFFF) << 0xC; - temp_s0_2->words.w1 = 0; - temp_s0_3 = temp_s0_2 + 8; - temp_a0 = ((temp_a2 * 4) & 0xFFF) << 0xC; - temp_s0_3->words.w0 = temp_a1 | 0xF4000000 | var_s2_2; - temp_s0_4 = temp_s0_3 + 8; - temp_s0_3->words.w1 = temp_a0 | 0x07000000 | var_s3_2; - temp_s0_5 = temp_s0_4 + 8; - temp_s0_4->words.w0 = 0xE7000000; - temp_s0_4->words.w1 = 0; - temp_s0_6 = temp_s0_5 + 8; - temp_s0_5->words.w1 = var_s7; - temp_s0_5->words.w0 = temp_a3; - temp_s0_7 = temp_s0_6 + 8; - temp_s0_6->words.w1 = temp_a0 | var_s3_2; - temp_s0_6->words.w0 = temp_a1 | 0xF2000000 | var_s2_2; - temp_s0_8 = temp_s0_7 + 8; - temp_s0_7->words.w1 = temp_a1 | var_s2_2; - temp_s0_7->words.w0 = temp_a0 | 0xE4000000 | var_s3_2; - temp_s0_8->words.w0 = 0xB3000000; - temp_s0_9 = temp_s0_8 + 8; - temp_s0_8->words.w1 = (var_s1_3 << 0x15) | var_t3; - temp_s0_9->words.w0 = 0xB2000000; - temp_s0_9->words.w1 = 0x04000400; - var_s0 = temp_s0_9 + 8; - var_s1_3 = (s32) temp_t2; - if (temp_t2 >= (u32) var_t4) { - var_s4 = arg1; - var_s3 = (s32) sp80; - } else { - goto loop_28; - } - } - } - var_fp = (s32) sp7C; - if ((u32) var_fp < (u32) var_s3) { - goto loop_23; + temp_t6 = var_fp + spCC; + if ((arg2 + arg4) < temp_t6) { + var_t5 = (arg2 + arg4) - var_fp; + if (var_t5 == 0) return displayListHead; + } + for (var_s1_3 = arg1; var_s1_3 < (arg1 + width); var_s1_3 += var_ra) { + var_s4_2 = var_ra; + temp_t2 = var_s1_3 + var_ra; + if ((arg1 + width) < temp_t2) { + var_s4_2 = (arg1 + width) - var_s1_3; + if (var_s4_2 == 0) return displayListHead; } + gDPLoadTextureTile(displayListHead++, (random_int(0x0080U) * 2) + &D_0B002A00, G_IM_FMT_IA, G_IM_SIZ_16b, width, 0, + var_s1_3, var_fp, var_s1_3 + var_s4_2, var_fp + var_t5, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, masks, maskt, G_TX_NOLOD, G_TX_NOLOD); + + gSPTextureRectangle(displayListHead++, var_s1_3 * 4, var_fp * 4, (var_s1_3 + var_s4_2) * 4, (var_fp + var_t5) * 4, 0, var_s1_3 << 5, var_fp << 5, 1024, 1024); + } } } - return var_s0; + return displayListHead; } #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_80096CD8.s") @@ -4071,476 +3924,132 @@ Gfx *func_80097A14(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, s32 arg4, return displayListHead; } -#ifdef MIPS_TO_C -//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Dec-21-2023 +#ifdef NON_MATCHING +// https://decomp.me/scratch/EAuX4 +// I'm fairly certain I've got the GBI macros correct, don't know what the source of the diff is +// While there may be register allocation issues, I suspect the instruction ordering issues are the actual problems Gfx *func_80097AE4(Gfx *displayListHead, s8 fmt, s32 arg2, s32 arg3, u8 *arg4, s32 arg5) { - s32 sp34; - Gfx *temp_a0; - Gfx *temp_a0_10; - Gfx *temp_a0_11; - Gfx *temp_a0_12; - Gfx *temp_a0_13; - Gfx *temp_a0_14; - Gfx *temp_a0_15; - Gfx *temp_a0_16; - Gfx *temp_a0_17; - Gfx *temp_a0_18; - Gfx *temp_a0_19; - Gfx *temp_a0_2; - Gfx *temp_a0_3; - Gfx *temp_a0_4; - Gfx *temp_a0_5; - Gfx *temp_a0_6; - Gfx *temp_a0_7; - Gfx *temp_a0_8; - Gfx *temp_a0_9; - Gfx *var_a0; - s32 temp_s1; - s32 temp_t1; - s32 temp_t6; - s32 temp_t7_2; - s32 temp_t8; - s32 temp_t8_3; - s32 temp_t9; - s32 temp_v1; s32 var_a2; - s32 var_s0; - s32 var_s2; - u32 temp_s4; - u32 temp_t7; - u32 temp_t8_2; + s32 stackPadding0; + s32 arg2Copy; + s32 dsdx; - var_a0 = displayListHead; - var_s0 = arg2; - var_s2 = arg3; - if (arg5 >= 0x20) { + if (arg5 >= 0x20) return displayListHead; - } else { - temp_t8 = (fmt & 7) << 0x15; - temp_s4 = temp_t8 | 0xFD000000 | 0x100000 | 0x3F; - temp_t8_2 = temp_t8 | 0xF5000000 | 0x100000 | 0x1200; - sp34 = var_s0; - var_a2 = 0; - temp_t7 = (((0x8000 / (s32) (0x20 - arg5)) & 0xFFFF) << 0x10) | 0x400; - do { - temp_a0 = var_a0 + 8; - var_a0->words.w0 = temp_s4; - var_a0->words.w1 = (u32) arg4; - temp_a0_2 = temp_a0 + 8; - temp_t6 = (var_a2 * 4) & 0xFFF; - temp_a0_3 = temp_a0_2 + 8; - temp_a0->words.w1 = 0x07014050; - temp_a0->words.w0 = temp_t8_2; - temp_s1 = var_a2 + 0x20; - temp_t9 = (temp_s1 * 4) & 0xFFF; - temp_a0_2->words.w1 = 0; - temp_a0_2->words.w0 = 0xE6000000; - temp_a0_4 = temp_a0_3 + 8; - temp_a0_3->words.w1 = temp_t9 | 0x07080000; - temp_a0_3->words.w0 = temp_t6 | 0xF4000000; - temp_a0_5 = temp_a0_4 + 8; - temp_a0_4->words.w1 = 0; - temp_a0_4->words.w0 = 0xE7000000; - temp_a0_5->words.w1 = 0x00014050; - temp_a0_5->words.w0 = temp_t8_2; - temp_a0_6 = temp_a0_5 + 8; - temp_v1 = var_s0 + 0x20; - temp_t1 = var_s2 + 0x20; - temp_a0_6->words.w0 = temp_t6 | 0xF2000000; - temp_a0_6->words.w1 = temp_t9 | 0x80000; - temp_t7_2 = (temp_t1 * 4) & 0xFFF; - temp_a0_7 = temp_a0_6 + 8; - temp_t8_3 = (var_s2 * 4) & 0xFFF; - temp_a0_7->words.w0 = (((temp_v1 * 4) & 0xFFF) << 0xC) | 0xE4000000 | temp_t7_2; - temp_a0_8 = temp_a0_7 + 8; - temp_a0_7->words.w1 = ((((var_s0 + arg5) * 4) & 0xFFF) << 0xC) | temp_t8_3; - temp_a0_9 = temp_a0_8 + 8; - temp_a0_8->words.w0 = 0xB3000000; - temp_a0_10 = temp_a0_9 + 8; - temp_a0_8->words.w1 = 0; - temp_a0_9->words.w0 = 0xB2000000; - temp_a0_9->words.w1 = temp_t7; - temp_a0_11 = temp_a0_10 + 8; - temp_a0_10->words.w1 = (u32) arg4; - temp_a0_10->words.w0 = temp_s4; - temp_a0_12 = temp_a0_11 + 8; - temp_a0_11->words.w1 = 0x07014050; - temp_a0_11->words.w0 = temp_t8_2; - temp_a0_13 = temp_a0_12 + 8; - temp_a0_12->words.w1 = 0; - temp_a0_12->words.w0 = 0xE6000000; - temp_a0_14 = temp_a0_13 + 8; - temp_a0_13->words.w1 = temp_t9 | 0x07100000; - temp_a0_13->words.w0 = temp_t6 | 0xF4080000; - temp_a0_15 = temp_a0_14 + 8; - temp_a0_14->words.w1 = 0; - temp_a0_14->words.w0 = 0xE7000000; - temp_a0_15->words.w1 = 0x00014050; - temp_a0_16 = temp_a0_15 + 8; - temp_a0_15->words.w0 = temp_t8_2; - temp_a0_16->words.w0 = temp_t6 | 0xF2080000; - temp_a0_16->words.w1 = temp_t9 | 0x100000; - temp_a0_17 = temp_a0_16 + 8; - temp_a0_17->words.w0 = (((((temp_v1 - arg5) + 0x20) * 4) & 0xFFF) << 0xC) | 0xE4000000 | temp_t7_2; - temp_a0_18 = temp_a0_17 + 8; - temp_a0_17->words.w1 = (((temp_v1 * 4) & 0xFFF) << 0xC) | temp_t8_3; - temp_a0_19 = temp_a0_18 + 8; - temp_a0_18->words.w0 = 0xB3000000; - temp_a0_18->words.w1 = 0; - temp_a0_19->words.w0 = 0xB2000000; - temp_a0_19->words.w1 = temp_t7; - /* - gDPLoadTextureTile(displayListHead++, arg4, fmt, G_IM_SIZ_16b, 64, 0, 0, var_a2, 32, (var_a2 + 1) * 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(displayListHead++, arg2 + arg5, arg3 + 32*var_a2, arg2 + 32, arg3 + 32, G_TX_RENDERTILE, 0, 0, 0x8000 / (32 - arg5), 4); - - gDPLoadTextureTile(displayListHead++, arg4, fmt, G_IM_SIZ_16b, 64, 0, 32, 0, 64, 0, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(displayListHead++, arg2 + 32, arg3 + 32*var_a2, (arg2 + 32 - arg5) + 32, arg3 + 32, G_TX_RENDERTILE, 0, 0, 0x8000 / (32 - arg5), 4); - */ - var_a2 = temp_s1; - var_a0 = temp_a0_19 + 8; - var_s0 = sp34; - var_s2 = temp_t1; - } while (temp_s1 != 0x40); + arg2Copy = arg2; + dsdx = 0x8000 / (0x20 - arg5); + for (var_a2 = 0; var_a2 < 0x40; var_a2 += 0x20) { + gDPLoadTextureTile(displayListHead++, arg4, fmt, G_IM_SIZ_16b, 64, 0, 0, var_a2, 32, var_a2 + 0x20, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(displayListHead++, (arg2 + arg5) << 2, arg3 << 2, (arg2 + 0x20) << 2, (arg3 + 0x20) << 2, 0, 0, 0, dsdx, 1024); + arg2 += 0x20; + gDPLoadTextureTile(displayListHead++, arg4, fmt, G_IM_SIZ_16b, 64, 0, 32, var_a2, 64, var_a2 + 0x20, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(displayListHead++, arg2 << 2, arg3 << 2, ((arg2 - arg5) + 0x20) << 2, (arg3 + 0x20) << 2, 0, 0, 0, dsdx, 1024); + arg2 = arg2Copy; + arg3 += 0x20; } - return var_a0; + return displayListHead; } #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_80097AE4.s") #endif -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -Gfx *func_80097E58(Gfx *displayListHead, s8 arg1, s32 arg2, u32 arg3, u32 arg5, s32 arg6, s32 arg7, s32 arg8, u32 arg9, s32 argB, s32 argB, s32 argB) { - s32 spEC; +#ifdef NON_MATCHING +// https://decomp.me/scratch/U4QaQ +// I'm fairly certain I have the GBI macros correct, so the massive diff is probably +// the result of somemath ordering issues. +Gfx *func_80097E58(Gfx *displayListHead, s8 fmt, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, u8 *someTexture, u32 width, s32 argA, u32 argB) { + u32 ult; s32 spDC; s32 sp80; - s32 sp60; - u32 sp5C; - s32 sp40; - u32 sp3C; - s32 sp30; - Gfx *temp_a0; - Gfx *temp_a0_10; - Gfx *temp_a0_11; - Gfx *temp_a0_12; - Gfx *temp_a0_13; - Gfx *temp_a0_14; - Gfx *temp_a0_15; - Gfx *temp_a0_16; - Gfx *temp_a0_17; - Gfx *temp_a0_18; - Gfx *temp_a0_19; - Gfx *temp_a0_2; - Gfx *temp_a0_3; - Gfx *temp_a0_4; - Gfx *temp_a0_5; - Gfx *temp_a0_6; - Gfx *temp_a0_7; - Gfx *temp_a0_8; - Gfx *temp_a0_9; - Gfx *var_a0; - s32 temp_a3; - s32 temp_s0; - s32 temp_t1; - s32 temp_t2; - s32 temp_t6; - s32 temp_t6_2; - s32 temp_t6_3; - s32 temp_t7; - s32 temp_t7_2; - s32 temp_t7_3; - s32 temp_t7_4; - s32 temp_t8; - s32 temp_t9; - s32 temp_t9_2; - s32 temp_v0; s32 temp_v1; - s32 temp_v1_2; - s32 var_s0; s32 var_s1; s32 var_s2; - s32 var_s4; s32 var_s5; - s32 var_s6; - s32 var_s7; - s32 var_t3; - s32 var_v0; - u32 temp_a1; - u32 temp_t0; - u32 var_fp; - u32 var_ra; - u32 var_s3; - u32 var_t2; - u32 var_t4; + u32 lrs; + s32 arg6Copy; - var_a0 = displayListHead; - if (argB >= 0x20) { + if ((s32)width >= 0x20) return displayListHead; - } else { - var_s4 = arg7; - temp_t0 = (u32) argB >> 1; - temp_t7 = argB - temp_t0; - sp80 = temp_t7; - spDC = temp_t7; - var_t4 = arg3; - spEC = var_s4; - if (arg3 < (u32) arg6) { -loop_3: - if ((u32) arg6 < (u32) (var_t4 + 0x20)) { - temp_v0 = arg6 - var_t4; - var_s2 = temp_v0; - if (temp_v0 != 0) { - temp_t9 = (arg1 & 7) << 0x15; - temp_v1 = 0x20 - argB; - sp30 = argB; - var_s3 = temp_t9 | 0xFD000000 | 0x100000 | ((argB - 1) & 0xFFF); - temp_t6 = temp_t9 | 0xF5000000 | 0x100000; - var_s5 = (s32) (spDC * temp_v1) / 32; - sp60 = temp_t0 << 0x15; - temp_t6_2 = ((temp_t0 * 4) & 0xFFF) << 0xC; - sp5C = (((s32) ((sp80 << 5) << 0xA) / (s32) (sp80 * temp_v1)) << 0x10) | 0x400; - var_s6 = temp_t6_2 | 0xF2000000; - temp_t7_2 = ((argB * 4) & 0xFFF) << 0xC; - var_v0 = temp_t6_2; - var_s7 = temp_t7_2 | 0x07000000; - var_t3 = temp_t7_2; - var_fp = temp_t6 | ((((u32) (((argB - temp_t0) * 2) + 9) >> 3) & 0x1FF) << 9); - var_ra = temp_t6 | ((((u32) (((argB - temp_t0) * 2) + 9) >> 3) & 0x1FF) << 9); - sp40 = var_v0 | 0xF4000000; - sp3C = (((s32) ((temp_t0 << 5) << 0xA) / (s32) (temp_t0 * temp_v1)) << 0x10) | 0x400; - var_s1 = (s32) (temp_t0 * argB) / 32; - var_s0 = var_v0 | 0x07000000; - var_t2 = temp_t6 | ((((u32) ((temp_t0 * 2) + 9) >> 3) & 0x1FF) << 9); - goto block_7; - } - } else { - temp_v1_2 = 0x20 - argB; - temp_t8 = (arg1 & 7) << 0x15; - sp30 = argB; - var_s3 = temp_t8 | 0xFD000000 | 0x100000 | ((argB - 1) & 0xFFF); - temp_t7_3 = temp_t8 | 0xF5000000 | 0x100000; - var_s2 = 0x20; - var_s5 = (s32) (spDC * temp_v1_2) / 32; - sp60 = temp_t0 << 0x15; - temp_t7_4 = ((temp_t0 * 4) & 0xFFF) << 0xC; - sp5C = (((s32) ((sp80 << 5) << 0xA) / (s32) (sp80 * temp_v1_2)) << 0x10) | 0x400; - var_s6 = temp_t7_4 | 0xF2000000; - temp_t6_3 = ((argB * 4) & 0xFFF) << 0xC; - var_v0 = temp_t7_4; - var_s7 = temp_t6_3 | 0x07000000; - var_t3 = temp_t6_3; - var_fp = temp_t7_3 | ((((u32) (((argB - temp_t0) * 2) + 9) >> 3) & 0x1FF) << 9); - var_ra = temp_t7_3 | ((((u32) (((argB - temp_t0) * 2) + 9) >> 3) & 0x1FF) << 9); - sp40 = var_v0 | 0xF4000000; - sp3C = (((s32) ((temp_t0 << 5) << 0xA) / (s32) (temp_t0 * temp_v1_2)) << 0x10) | 0x400; - var_s1 = (s32) (temp_t0 * argB) / 32; - var_s0 = var_v0 | 0x07000000; - var_t2 = temp_t7_3 | ((((u32) ((temp_t0 * 2) + 9) >> 3) & 0x1FF) << 9); -block_7: - var_a0->words.w0 = var_s3; - temp_a0 = var_a0 + 8; - var_a0->words.w1 = arg9; - temp_a0->words.w1 = 0x07014050; - temp_a0_2 = temp_a0 + 8; - temp_a0->words.w0 = var_t2; - temp_t9_2 = (var_t4 * 4) & 0xFFF; - temp_a0_3 = temp_a0_2 + 8; - temp_a0_2->words.w0 = 0xE6000000; - temp_a3 = ((var_t4 + var_s2) * 4) & 0xFFF; - temp_a0_2->words.w1 = 0; - temp_a0_3->words.w0 = temp_t9_2 | 0xF4000000; - temp_a0_4 = temp_a0_3 + 8; - temp_a0_3->words.w1 = var_s0 | temp_a3; - temp_a0_5 = temp_a0_4 + 8; - temp_a0_4->words.w0 = 0xE7000000; - temp_a0_4->words.w1 = 0; - temp_a0_6 = temp_a0_5 + 8; - temp_a0_5->words.w1 = 0x00014050; - temp_a0_5->words.w0 = var_t2; - temp_a0_6->words.w1 = var_v0 | temp_a3; - temp_a0_6->words.w0 = temp_t9_2 | 0xF2000000; - temp_s0 = var_s4 + temp_t0; - temp_t1 = ((arg8 + var_s2) * 4) & 0xFFF; - temp_a0_7 = temp_a0_6 + 8; - temp_a0_7->words.w0 = (((temp_s0 * 4) & 0xFFF) << 0xC) | 0xE4000000 | temp_t1; - temp_t2 = (arg8 * 4) & 0xFFF; - temp_a0_7->words.w1 = ((((var_s1 + var_s4) * 4) & 0xFFF) << 0xC) | temp_t2; - temp_a0_8 = temp_a0_7 + 8; - temp_a1 = (var_t4 << 5) & 0xFFFF; - temp_a0_9 = temp_a0_8 + 8; - temp_a0_8->words.w0 = 0xB3000000; - temp_a0_8->words.w1 = temp_a1; - temp_a0_9->words.w0 = 0xB2000000; - temp_a0_10 = temp_a0_9 + 8; - temp_a0_9->words.w1 = sp3C; - temp_a0_10->words.w0 = var_s3; - temp_a0_11 = temp_a0_10 + 8; - temp_a0_10->words.w1 = arg9; - temp_a0_12 = temp_a0_11 + 8; - temp_a0_11->words.w1 = 0x07014050; - temp_a0_11->words.w0 = var_ra; - temp_a0_12->words.w0 = 0xE6000000; - temp_a0_12->words.w1 = 0; - temp_a0_13 = temp_a0_12 + 8; - temp_a0_14 = temp_a0_13 + 8; - temp_a0_13->words.w0 = sp40 | temp_t9_2; - temp_a0_13->words.w1 = var_s7 | temp_a3; - temp_a0_15 = temp_a0_14 + 8; - temp_a0_14->words.w0 = 0xE7000000; - temp_a0_14->words.w1 = 0; - temp_a0_15->words.w1 = 0x00014050; - temp_a0_16 = temp_a0_15 + 8; - temp_a0_15->words.w0 = var_fp; - temp_a0_16->words.w0 = var_s6 | temp_t9_2; - temp_a0_16->words.w1 = var_t3 | temp_a3; - temp_a0_17 = temp_a0_16 + 8; - temp_a0_17->words.w0 = ((((var_s5 + temp_s0) * 4) & 0xFFF) << 0xC) | 0xE4000000 | temp_t1; - temp_a0_17->words.w1 = (((temp_s0 * 4) & 0xFFF) << 0xC) | temp_t2; - temp_a0_18 = temp_a0_17 + 8; - temp_a0_18->words.w0 = 0xB3000000; - temp_a0_19 = temp_a0_18 + 8; - temp_a0_18->words.w1 = sp60 | temp_a1; - temp_a0_19->words.w0 = 0xB2000000; - var_t4 += 0x20; - var_a0 = temp_a0_19 + 8; - temp_a0_19->words.w1 = sp5C; - var_s4 = spEC; - arg8 += 0x20; - if (var_t4 < (u32) arg6) { - goto loop_3; - } - } + lrs = width >> 1; + spDC = sp80 = width - lrs; + arg6Copy = arg6; + for (ult = arg3; ult < arg5; ult += 0x20) { + if (arg5 < (ult + 0x20)) { // Less than 0x20 left to reach target + var_s2 = arg5 - ult; // Leftover amount to reach target + if (var_s2 == 0) break; // Actually at target + } else { + var_s2 = 0x20; // Go the full 0x20 on this step } + temp_v1 = 0x20 - argB; + var_s1 = (lrs * argB) / 32; + var_s5 = (spDC * temp_v1) / 32; + + gDPLoadTextureTile(displayListHead++, someTexture, fmt, G_IM_SIZ_16b, width, 0, 0, ult, lrs, ult + var_s2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(displayListHead++, (arg6 + var_s1) << 2, arg7 << 2, (arg6 + lrs) << 2, (arg7 + var_s2) << 2, 0, 0, ult << 5, (s32)((lrs << 5) << 0xA) / (s32)(lrs * temp_v1), 1024); + + arg6 += lrs; + gDPLoadTextureTile(displayListHead++, someTexture, fmt, G_IM_SIZ_16b, width, 0, lrs, ult, width, ult + var_s2, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(displayListHead++, arg6 << 2, arg7 << 2, (arg6 + var_s5) << 2, (arg7 + var_s2) << 2, 0, lrs << 5, ult << 5, ((sp80 << 5) << 0xA) / (sp80 * temp_v1), 1024); + arg6 = arg6Copy; + arg7 += 0x20; } - return var_a0; + return displayListHead; } #else GLOBAL_ASM("asm/non_matchings/code_80091750/func_80097E58.s") #endif -#ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -extern u32 D_8018E7B8; -extern s32 D_8018E7D0; +Gfx *func_80098558(Gfx *displayListHead, u32 arg1, u32 arg2, u32 arg3, u32 arg4, u32 arg5, u32 arg6, s32 arg7, s32 arg8) { + u32 var_a3; + u32 var_v0; + s32 arg5Copy; -Gfx *func_800987D0(Gfx *displayListHead, u32 arg1, u32 arg2, u32 arg3, u32 arg4, s32 arg5, s32 arg6, s32 arg8, s32 arg8) { - u32 sp60; - s32 sp5C; - Gfx *temp_s0; - Gfx *temp_s0_2; - Gfx *temp_s0_3; - Gfx *temp_s0_4; - Gfx *temp_s0_5; - Gfx *temp_s0_6; - Gfx *temp_s0_7; - Gfx *temp_s0_8; - Gfx *temp_s0_9; - Gfx *var_s0; + arg5Copy = arg5; + for (var_v0 = arg2; var_v0 < arg4; var_v0 += 0x20) { + for (var_a3 = arg1; var_a3 < arg3; var_a3 += 0x20) { + gDPLoadTextureTile(displayListHead++, D_8018D9B0, G_IM_FMT_RGBA, G_IM_SIZ_16b, arg8, 0, var_a3, var_v0, var_a3 + 0x20, var_v0 + 0x20, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(displayListHead++, arg5 << 2, arg6 << 2, (arg5 + 0x20) << 2, (arg6 + 0x20) << 2, 0, 0, 0, 1024, 1024); + arg5 += 0x20; + } + arg5 = arg5Copy; + arg6 += 0x20; + } + return displayListHead; +} + +Gfx *func_800987D0(Gfx *displayListHead, u32 arg1, u32 arg2, u32 width, u32 height, s32 column, s32 row, s32 arg7, u32 textureWidth, s32 textureHeight) { + s32 var_a2; + s32 var_v0_2; + s32 columnCopy; + s32 temp_f4_2; + s32 stackPadding0; + s32 temp_f6; f32 temp_f0; f32 temp_f18; f32 temp_f24; - f32 temp_f2; - f32 temp_f4; - f32 temp_f8; - f32 var_f6; - f64 var_f10; - s32 temp_f4_2; - s32 temp_f6; - s32 temp_t1; - s32 temp_t4; - s32 temp_t8; - s32 temp_v0; - s32 temp_v0_2; - s32 var_t5; - u32 temp_a3; - u32 temp_t2; - u32 var_a2; - u32 var_v0; - u32 var_v0_2; - var_v0 = D_8018E7B8; - var_s0 = displayListHead; - if (var_v0 == 0) { - D_8018E7B8 = 1; - var_v0 = 1; + if (D_8018E7B8[0] == 0) { + D_8018E7B8[0] = 1; } - temp_f24 = sins(((u32) ((u32) (D_8018E7D0 * 0x4E20U) / var_v0) % 20000U) & 0xFFFF); - temp_f0 = coss(((u32) ((u32) (D_8018E7D0 * 0x4E20U) / (u32) D_8018E7B8) % 20000U) & 0xFFFF); - var_t5 = arg5; - var_f6 = (f32) D_8018E7D0; - if (D_8018E7D0 < 0) { - var_f6 += 4294967296.0f; + temp_f24 = sins(((D_8018E7D0[0] * 0x4E20) / D_8018E7B8[0]) % 20000U); + temp_f0 = coss(((D_8018E7D0[0] * 0x4E20) / D_8018E7B8[0]) % 20000U); + temp_f18 = (((f32)D_8018E7D0[0] * 0.5) / D_8018E7B8[0]) + 1.0; + columnCopy = column; + for (var_v0_2 = arg2; var_v0_2 < height; var_v0_2 += 0x20) { + for (var_a2 = arg1; var_a2 < width; var_a2 += 0x20) { + gDPLoadTextureTile(displayListHead++, D_8018D9B0, G_IM_FMT_RGBA, G_IM_SIZ_16b, textureWidth, 0, + var_a2, var_v0_2, var_a2 + 0x20, var_v0_2 + 0x20, 0, + G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); + temp_f6 = (temp_f18 * ((temp_f0 * (column - 0xA0)) + (temp_f24 * (row - 0x78)))) + 160.0f; + temp_f4_2 = (temp_f18 * ((-temp_f24 * (column - 0xA0)) + (temp_f0 * (row - 0x78)))) + 120.0f; + gSPTextureRectangle(displayListHead++, temp_f6 * 4, temp_f4_2 * 4, (temp_f6 + 0x20^0) * 4, (temp_f4_2 + 0x20^0) * 4, 0, 0, 0, 1024, 1024); + column += 0x20; + } + column = columnCopy; + row += 0x20; } - var_f10 = (f64) D_8018E7B8; - if ((s32) D_8018E7B8 < 0) { - var_f10 += 4294967296.0; - } - var_v0_2 = arg2; - sp5C = var_t5; - temp_f18 = (f32) ((((f64) var_f6 * 0.5) / var_f10) + 1.0); - if (arg2 < arg4) { - do { - var_a2 = arg1; - if (arg1 < arg3) { - sp60 = var_v0_2; - temp_v0 = arg6 - 0x78; - temp_t8 = (var_v0_2 * 4) & 0xFFF; - temp_t4 = ((var_v0_2 + 0x20) * 4) & 0xFFF; - do { - var_s0->words.w0 = ((arg8 - 1) & 0xFFF) | 0xFD100000; - temp_s0 = var_s0 + 8; - var_s0->words.w1 = (u32) D_8018D9B0; - temp_s0_2 = temp_s0 + 8; - temp_a3 = ((((s32) ((arg1 * 0 * 2) + 0x49) >> 3) & 0x1FF) << 9) | 0xF5100000; - temp_t1 = ((var_a2 * 4) & 0xFFF) << 0xC; - temp_t2 = var_a2 + 0x20; - temp_s0_3 = temp_s0_2 + 8; - temp_s0->words.w0 = temp_a3; - temp_s0->words.w1 = 0x07014050; - temp_v0_2 = ((temp_t2 * 4) & 0xFFF) << 0xC; - temp_s0_2->words.w1 = 0; - temp_s0_2->words.w0 = 0xE6000000; - temp_s0_3->words.w0 = temp_t1 | 0xF4000000 | temp_t8; - temp_s0_4 = temp_s0_3 + 8; - temp_s0_3->words.w1 = temp_v0_2 | 0x07000000 | temp_t4; - temp_s0_5 = temp_s0_4 + 8; - temp_s0_4->words.w1 = 0; - temp_s0_4->words.w0 = 0xE7000000; - temp_s0_5->words.w1 = 0x00014050; - temp_s0_5->words.w0 = temp_a3; - temp_s0_6 = temp_s0_5 + 8; - temp_f2 = (f32) (var_t5 - 0xA0); - temp_s0_6->words.w1 = temp_v0_2 | temp_t4; - temp_s0_6->words.w0 = temp_t1 | 0xF2000000 | temp_t8; - temp_s0_7 = temp_s0_6 + 8; - temp_s0_8 = temp_s0_7 + 8; - temp_s0_9 = temp_s0_8 + 8; - temp_f8 = ((temp_f2 * temp_f0) + (temp_f24 * (f32) temp_v0)) * temp_f18; - var_a2 = temp_t2; - var_s0 = temp_s0_9 + 8; - temp_f4 = -temp_f24 * temp_f2; - var_t5 += 0x20; - temp_f6 = (s32) (temp_f8 + 160.0f); - temp_f4_2 = (s32) (((temp_f4 + (temp_f0 * (f32) temp_v0)) * temp_f18) + 120.0f); - temp_s0_7->words.w0 = ((((temp_f6 + 0x20) * 4) & 0xFFF) << 0xC) | 0xE4000000 | (((temp_f4_2 + 0x20) * 4) & 0xFFF); - temp_s0_7->words.w1 = (((temp_f6 * 4) & 0xFFF) << 0xC) | ((temp_f4_2 * 4) & 0xFFF); - temp_s0_8->words.w0 = 0xB3000000; - temp_s0_8->words.w1 = 0; - temp_s0_9->words.w0 = 0xB2000000; - temp_s0_9->words.w1 = 0x04000400; - } while (temp_t2 < arg3); - var_v0_2 = sp60; - } - var_v0_2 += 0x20; - var_t5 = sp5C; - arg6 += 0x20; - } while (var_v0_2 < arg4); - } - return var_s0; + return displayListHead; } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_800987D0.s") -#endif // draw a box filled with a solid color Gfx *draw_box_fill(Gfx *displayListHead, s32 ulx, s32 uly, s32 lrx, s32 lry, s32 red, s32 green, s32 blue, s32 alpha) { @@ -6802,7 +6311,7 @@ void add_8018D9E0_entry(s32 type, s32 column, s32 row, s8 priority) { case 0x5A: case 0x5B: case 0x5C: - func_800996BC(segmented_to_virtual_dupe(D_800E82C8[type - 0x53]), 0); + func_800996BC(segmented_to_virtual_dupe(D_800E82C4[type - 0x52]), 0); break; case 0x5F: case 0x60: @@ -7029,34 +6538,30 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/add_8018D9E0_entry.s") #endif #ifdef NON_MATCHING -// Lots of work left to be done. -// There's a pretty huge diff in the `case 0x4` block concerning all the math -// being done. Not sure what's up there yet. -// spAC and spA8 are used in `case 0x8C` without being intitialized. I don't know if that's -// a result of wonky decompilation or if that's real. +// https://decomp.me/scratch/MatRp +// Biggest diff left is in the case 0x12 though 0x19 handling. Not really sure what's going on there +// There's also a diff in the handling of D_800E77A0 in case 0x4. Not sure what's going on there either void func_8009F5E0(struct_8018D9E0_entry *arg0) { - s32 spAC; - s32 spA8; + s32 var_a1; + s32 var_v1; s32 stackPadding0; - MkTexture *sp9C; s32 stackPadding1; + MkTexture *sp9C; s32 stackPadding2; - s32 stackPadding3; - s32 stackPadding4; - char sp80[3]; - f32 var_f0; s32 temp_a0; - s32 stackPadding5; s32 temp_t2; - s32 temp_t4; s32 temp_t5; s32 temp_t9; - s32 temp_v0_4; - s32 temp_v1_3; - s32 var_a1; + s32 temp_v1; + char sp80[3]; s32 var_t0; - s32 var_v1; s32 var_a2; + f32 why = 0.75f; + s32 one = 1; + f32 floatone = 1; + s32 stackPadding3; + s32 stackPadding4; + f32 var_f0; if ((s8) arg0->visible != 0) { gDPPipeSync(gDisplayListHead++); @@ -7114,39 +6619,39 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { } break; case 0x5: /* switch 6 */ - temp_t4 = (s32) ((f32) (get_string_width(D_800E7574[0]) + 5) * 0.9f) / 2; - gDisplayListHead = draw_box(gDisplayListHead, 0xA0 - temp_t4, 0x0000007B, temp_t4 + 0xA0, 0x000000A4, 0, 0, 0, 0x00000096); + var_t0 = (s32) ((f32) (get_string_width(D_800E7574[0]) + 5) * 0.9f) / 2; + gDisplayListHead = draw_box(gDisplayListHead, 0xA0 - var_t0, 0x0000007B, var_t0 + 0xA0, 0x000000A4, 0, 0, 0, 0x00000096); set_text_color(1); draw_text(0x0000009B, 0x0000008C, D_800E7574[0], 0, 0.9f, 0.9f); - temp_v1_3 = func_800B4EB4(0, 7) & 0xFFFFF; - if (temp_v1_3 < 0x1EAA) { + temp_v1 = func_800B4EB4(0, 7) & 0xFFFFF; + if (temp_v1 < 0x1EAA) { set_text_color((s32) gGlobalTimer % 2); - } else if (temp_v1_3 < 0x2329) { + } else if (temp_v1 < 0x2329) { set_text_color((s32) gGlobalTimer % 3); } else { set_text_color(3); } - get_time_record_minutes(temp_v1_3, sp80); + get_time_record_minutes(temp_v1, sp80); func_800939C8(0x00000077, 0x000000A0, sp80, 0, 1.0f, 1.0f); func_80093324(0x0000008B, 0x000000A0, "'", 0, 1.0f, 1.0f); - get_time_record_seconds(temp_v1_3, sp80); + get_time_record_seconds(temp_v1, sp80); func_800939C8(0x00000094, 0x000000A0, sp80, 0, 1.0f, 1.0f); func_80093324(0x000000A7, 0x000000A0, "\"", 0, 1.0f, 1.0f); - get_time_record_centiseconds(temp_v1_3, sp80); + get_time_record_centiseconds(temp_v1, sp80); func_800939C8(0x000000B4, 0x000000A0, sp80, 0, 1.0f, 1.0f); break; case 0x4: /* switch 6 */ var_t0 = get_string_width(D_800E77A0[0]); - temp_v0_4 = get_string_width(D_800E77A0[1]); - if (var_t0 < temp_v0_4) { - var_t0 = temp_v0_4; + temp_v1 = get_string_width(D_800E77A0[1]); + if (var_t0 < temp_v1) { + var_t0 = temp_v1; } - temp_t2 = (s32) (var_t0 * 0.75f) / 2; - temp_t5 = (s32) (((0.75f * 2.0f) + 0.5) * 16.0) / 2; + temp_t2 = (s32) (var_t0 * why) / 2; + temp_t5 = (s32) (((why * 2) + 0.5) * 16.0) / 2; gDisplayListHead = draw_box(gDisplayListHead, 0xA0 - temp_t2, 0xB6 - temp_t5, temp_t2 + 0xA0, temp_t5 + 0xB6, 0, 0, 0, 0x00000096); set_text_color(4); - for (var_v1 = 0; var_v1 < 2; var_v1++) { - draw_text(0xA0 - (1.0f * 0.75f), (s32) (0xB4 + ((f32) (var_v1 * 0x12) * 0.75f)), D_800E77A0[var_v1], 0, 0.75f, 0.75f); + for (temp_t9 = 0; temp_t9 < 2; temp_t9++) { + draw_text(0xA0*one - floatone*why, (s32) (0xB4*one + ((f32) (temp_t9 * 0x12) * why)), D_800E77A0[temp_t9], 0, why, why); } break; case 0x23: /* switch 6 */ @@ -7161,9 +6666,9 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { case 0xC: /* switch 6 */ case 0xD: /* switch 6 */ case 0xE: /* switch 6 */ - temp_a0 = arg0->type - 0xB; - func_800A8270(temp_a0, arg0); - func_800A0FA4(arg0, temp_a0); + var_a1 = arg0->type - 0xB; + func_800A8270(var_a1, arg0); + func_800A0FA4(arg0, var_a1); break; case 0xF: /* switch 6 */ func_800A8564(arg0); @@ -7171,17 +6676,17 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { break; case 0x10: /* switch 6 */ case 0x11: /* switch 6 */ - temp_a0 = arg0->type - 0xF; + var_a1 = arg0->type - 0xF; if (arg0->unk1C < 0x20) { - temp_t9 = (s32) (arg0->unk1C * 0x3A) / 64; - if (temp_a0 == gMainMenuSelectionDepth) { + temp_t9 = (arg0->unk1C * 0x3A) / 64; + if (var_a1 == gMainMenuSelectionDepth) { gDisplayListHead = draw_flash_select_case_fast(gDisplayListHead, arg0->column + temp_t9, arg0->row, (arg0->column - temp_t9) + 0x39, arg0->row + 0x12); } else { gDisplayListHead = draw_box_fill(gDisplayListHead, arg0->column + temp_t9, arg0->row, (arg0->column - temp_t9) + 0x39, arg0->row + 0x12, 1, 1, 1, 0x000000FF); } } - temp_a0 = arg0->type - 0xA; - gDisplayListHead = func_8009BC9C(gDisplayListHead, D_800E8254[temp_a0], arg0->column, arg0->row, 2, arg0->unk1C); + var_v1 = arg0->type - 0xA; + gDisplayListHead = func_8009BC9C(gDisplayListHead, D_800E8254[var_v1], arg0->column, arg0->row, 2, arg0->unk1C); break; case 0x12: /* switch 6 */ case 0x13: /* switch 6 */ @@ -7191,44 +6696,44 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { case 0x17: /* switch 6 */ case 0x18: /* switch 6 */ case 0x19: /* switch 6 */ - var_a2 = D_800E86B0[gPlayerCount - 1][D_800E86AC[gPlayerCount - 1]]; + var_v1 = D_800E86B0[gPlayerCount - 1][D_800E86AC[gPlayerCount - 1]]; var_a1 = gGameModeFromNumPlayersAndRowSelection[gPlayerCount][D_800E86AC[gPlayerCount - 1]]; switch (arg0->type) { /* switch 5 */ - case 18: /* switch 5 */ - case 19: /* switch 5 */ - case 20: /* switch 5 */ - case 21: /* switch 5 */ + case 0x12: /* switch 5 */ + case 0x13: /* switch 5 */ + case 0x14: /* switch 5 */ + case 0x15: /* switch 5 */ if ((var_a1 != 0) && (var_a1 != 2)) { - var_a2 = -1; + var_v1 = -1; } var_a1 = 18; sp9C = segmented_to_virtual_dupe(D_800E824C[arg0->type]); break; - case 22: /* switch 5 */ - case 23: /* switch 5 */ + case 0x16: /* switch 5 */ + case 0x17: /* switch 5 */ if (var_a1 != 2) { - var_a2 = -1; + var_v1 = -1; } else { var_a1 = 22; sp9C = segmented_to_virtual_dupe(D_800E824C[arg0->type]); } break; - case 24: /* switch 5 */ - case 25: /* switch 5 */ + case 0x18: /* switch 5 */ + case 0x19: /* switch 5 */ if (var_a1 != 1) { - var_a2 = -1; + var_v1 = -1; } else { var_a1 = 24; sp9C = segmented_to_virtual_dupe(D_800E824C[arg0->type]); } break; } - if (var_a2 != -1) { - if ((gMainMenuSelectionDepth >= 5) && (var_a2 == (arg0->type - var_a1))) { + if (var_v1 != -1) { + if ((gMainMenuSelectionDepth >= 5) && (var_v1 == (arg0->type - var_a1))) { if (gMainMenuSelectionDepth >= 6) { gDisplayListHead = draw_box_fill(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x3F, arg0->row + 0x11, 0x000000FF, 0x000000F9, 0x000000DC, 0x000000FF); } else { - gDisplayListHead = draw_flash_select_case_slow(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x3F, arg0->row + 0x11); + gDisplayListHead = draw_flash_select_case_slow(gDisplayListHead, arg0->column^0, arg0->row^0, arg0->column + 0x3F, arg0->row + 0x11); } } else { gDisplayListHead = draw_box_fill(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x3F, arg0->row + 0x11, 1, 1, 1, 0x000000FF); @@ -7286,11 +6791,11 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { case 0x5B: /* switch 6 */ case 0x5C: /* switch 6 */ func_800A8A98(arg0); - gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E82C8[arg0->type - 0x53]), arg0->column, arg0->row); + gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E82C4[arg0->type - 0x52]), arg0->column, arg0->row); func_800A8CA4(arg0); break; case 0x52: /* switch 6 */ - gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E82C8[arg0->type - 0x53]), arg0->column, arg0->row); + gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E82C4[arg0->type - 0x52]), arg0->column, arg0->row); break; case 0x5F: /* switch 6 */ case 0x60: /* switch 6 */ @@ -7302,9 +6807,9 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { case 0x54: /* switch 6 */ case 0x55: /* switch 6 */ case 0x56: /* switch 6 */ - temp_a0 = arg0->type - 0x53; - func_800A890C(temp_a0, arg0); - func_800A143C(arg0, temp_a0); + var_a1 = arg0->type - 0x53; + func_800A890C(var_a1, arg0); + func_800A143C(arg0, var_a1); break; case 0x5D: /* switch 6 */ func_800A8564(arg0); @@ -7339,16 +6844,16 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { case 0x79: /* switch 6 */ case 0x7A: /* switch 6 */ case 0x7B: /* switch 6 */ - temp_a0 = arg0->type - 0x78; - func_800A90D4(temp_a0, arg0); - func_800A143C(arg0, temp_a0); + var_a1 = arg0->type - 0x78; + func_800A90D4(var_a1, arg0); + func_800A143C(arg0, var_a1); break; case 0x8C: /* switch 6 */ - if ((gMainMenuSelectionDepth >= 5) && (spAC == (arg0->type - spA8))) { + if ((gMainMenuSelectionDepth >= 5) && (var_a1 == (arg0->type - var_v1))) { if (gMainMenuSelectionDepth >= 6) { gDisplayListHead = draw_box_fill(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x3F, arg0->row + 0x11, 0x000000FF, 0x000000F9, 0x000000DC, 0x000000FF); } else { - gDisplayListHead = draw_flash_select_case_slow(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x3F, arg0->row + 0x11); + gDisplayListHead = draw_flash_select_case_slow(gDisplayListHead, arg0->column^0, arg0->row^0, arg0->column + 0x3F, arg0->row + 0x11); } } else { gDisplayListHead = draw_box_fill(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x3F, arg0->row + 0x11, 1, 1, 1, 0x000000FF); @@ -7412,10 +6917,10 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { case 0xB3: /* switch 6 */ case 0xB4: /* switch 6 */ if (arg0->cursor != 0) { - spA8 = arg0->type - 0xB1; - gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E7D54[D_800EFD64[gCharacterSelections[spA8]]]), arg0->column, arg0->row); - func_8009A7EC(arg0->D_8018DEE0_index, arg0->column, arg0->row, spA8, arg0->unk1C); - func_800A11D0(arg0, spA8, 0x000000FF); + var_v1 = arg0->type - 0xB1; + gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E7D54[D_800EFD64[gCharacterSelections[var_v1]]]), arg0->column, arg0->row); + func_8009A7EC(arg0->D_8018DEE0_index, arg0->column, arg0->row, var_v1, arg0->unk1C); + func_800A11D0(arg0, var_v1, 0x000000FF); } break; case 0xB9: /* switch 6 */ @@ -7774,11 +7279,11 @@ void func_800A143C(struct_8018D9E0_entry *arg0, s32 arg1) { case 0: case 2: case 3: - gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E82C8[arg1]), arg0->column, arg0->row); + gDisplayListHead = func_8009BA74(gDisplayListHead, segmented_to_virtual_dupe(D_800E82C4[arg1 + 1]), arg0->column, arg0->row); break; case 1: case 4: - gDisplayListHead = func_8009BC9C(gDisplayListHead, segmented_to_virtual_dupe(D_800E82C8[arg1]), arg0->column, arg0->row, 2, arg0->unk1C); + gDisplayListHead = func_8009BC9C(gDisplayListHead, segmented_to_virtual_dupe(D_800E82C4[arg1 + 1]), arg0->column, arg0->row, 2, arg0->unk1C); break; } } @@ -8043,9 +7548,9 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) { case 0x2C: /* switch 1 */ case 0x2D: /* switch 1 */ set_text_color(2); - temp_v0 = D_8018EDEC - 0x2A; + var_s1 = D_8018EDEC - 0x2A; for (var_s2 = 0; var_s2 < 3; var_s2++) { - func_80093324(0x00000032, 0x55 + (0x14 * var_s2), D_800E78D0[(temp_v0 * 3) + var_s2], 0, 0.9f, 0.9f); + func_80093324(0x00000032, 0x55 + (0x14 * var_s2), D_800E78D0[(var_s1 * 3) + var_s2], 0, 0.9f, 0.9f); } break; case 0x34: /* switch 1 */ @@ -8053,17 +7558,17 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) { case 0x36: /* switch 1 */ case 0x37: /* switch 1 */ set_text_color(2); - temp_v0 = D_8018EDEC - 0x34; + var_s1 = D_8018EDEC - 0x34; for (var_s2 = 0; var_s2 < 4; var_s2++) { - func_80093324(0x00000023, 0x55 + (0x14 * var_s2), D_800E7890[(temp_v0 * 4) + var_s2], 0, 0.8f, 0.8f); + func_80093324(0x00000023, 0x55 + (0x14 * var_s2), D_800E7890[(var_s1 * 4) + var_s2], 0, 0.8f, 0.8f); } break; case 0x41: /* switch 1 */ case 0x42: /* switch 1 */ set_text_color(2); - temp_v0 = D_8018EDEC - 0x41; + var_s1 = D_8018EDEC - 0x41; for (var_s2 = 0; var_s2 < 3; var_s2++) { - func_80093324(0x00000041, 0x55 + (0x14 * var_s2), D_800E7900[(temp_v0 * 3) + var_s2], 0, 0.9f, 0.9f); + func_80093324(0x00000041, 0x55 + (0x14 * var_s2), D_800E7900[(var_s1 * 3) + var_s2], 0, 0.9f, 0.9f); } break; case 0x46: /* switch 1 */ @@ -10042,16 +9547,12 @@ void func_800A8270(s32 arg0, struct_8018D9E0_entry *arg1) { } } -#ifdef NON_MATCHING -// https://decomp.me/scratch/BgXsO -// There's too much stuff on stack, but it doesn't seem like -// any temp variables can be removed. void func_800A8564(struct_8018D9E0_entry *arg0) { - s32 temp_t0; - s32 temp_a2; s32 sp34; s32 var_a1; MkTexture *var_a0; + s32 temp_a2; + s32 temp_t0; var_a1 = 0; switch (arg0->type) { /* irregular */ @@ -10088,9 +9589,6 @@ void func_800A8564(struct_8018D9E0_entry *arg0) { } } } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A8564.s") -#endif void func_800A86E8(struct_8018D9E0_entry *arg0) { gDisplayListHead = draw_box_fill(gDisplayListHead, arg0->column, arg0->row, arg0->column + 0x64, arg0->row + 0x27, 1, 1, 1, 0xFF); @@ -10454,8 +9952,8 @@ void func_800A9710(struct_8018D9E0_entry *arg0) { } #ifdef MIPS_TO_C -//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-02-2023 -void func_800A97BC(struct_8018D9E0_entry *arg0, u32 arg3) { +//generated by m2c commit 3c194b80148d233bd38495ca3456dc7b201a0302 on Mar-22-2024 +void func_800A97BC(struct_8018D9E0_entry *arg0) { s32 temp_t4; s32 temp_t7; s8 *var_v1; @@ -10523,6 +10021,19 @@ void func_800A97BC(struct_8018D9E0_entry *arg0, u32 arg3) { } var_v1 -= 4; } while (var_v1 != D_800E86C4); + + // for (var_v1 = 0; var_v1 < 8; var_v1++) { + // huh = 8 - var_v1; + // if (D_800E86C4[huh] >= D_800E86C4[var_v1 + 2]) { + // D_800E86C4[huh] = D_800E86C4[huh - 1]; + // } else { + // if ((D_800E86C4[huh + 1] == 1) || (D_800E86C4[huh + 1] == 0)) { + // D_800E86C4[huh] = 0; + // } else { + // D_800E86C4[huh] = D_800E86C4[huh + 1] + 1; + // } + // } + // } D_800E86C4->unk8 = 0; D_800E86C4->unk0 = D_800E86C4->unk8; } @@ -10565,7 +10076,7 @@ void func_800A97BC(struct_8018D9E0_entry *arg0, u32 arg3) { } } if ((u32) var_v1_2 < (u32) (D_800E86C4 + 4)) { - var_v1_2->unk3 = (s8) var_v1_2->cursor; + var_v1_2->unk3 = (s8) var_v1_2->unk4; } else { temp_v0_8 = var_v1_2->unk2; if ((temp_v0_8 == 0x10) || (temp_v0_8 == 0)) { @@ -10576,6 +10087,17 @@ void func_800A97BC(struct_8018D9E0_entry *arg0, u32 arg3) { } var_v1_2 += 4; } while (var_v1_2 != (D_800E86C4 + 8)); + // for (var_v1 = 0; var_v1 < 8; var_v1++) { + // if (D_800E86C4[var_v1] < D_800E86C4[7 - var_v1]) { + // D_800E86C4[var_v1] = D_800E86C4[var_v1 + 1]; + // } else { + // if ((D_800E86C4[var_v1 - 1] == 16) || (D_800E86C4[var_v1 - 1] == 0)) { + // D_800E86C4[var_v1] = 0; + // } else { + // D_800E86C4[var_v1] = D_800E86C4[var_v1 - 1] + 1; + // } + // } + // } D_800E86C4->unk8 = 0; D_800E86C4->unk0 = D_800E86C4->unk8; } @@ -11430,25 +10952,27 @@ void func_800AB290(struct_8018D9E0_entry *arg0) { } } -#ifdef MIPS_TO_C +#ifdef NON_MATCHING // Decent work has been done, but not quite right // https://decomp.me/scratch/YLbkC void func_800AB314(struct_8018D9E0_entry *arg0) { s32 var_a1; - s32 one; - u32 var_v0; + s32 one = 1; + s32 four = 4; struct_8018D9E0_entry *sp24[4]; + s32 var_v0; for (var_a1 = 0; var_a1 < 4; var_a1++) { sp24[var_a1] = find_8018D9E0_entry_dupe(var_a1 + 0x5F); } - if (gModeSelection != 0) { - if (D_8018EDEC != 1U) { + switch (gModeSelection) { + default: + if (D_8018EDEC != one) { arg0->cursor = 0; arg0->unk20 = 0; for (var_a1 = 0; var_a1 < 4; var_a1++) { if (gCupCourseSelection == var_a1) { - sp24[var_a1]->visible = 1; + sp24[var_a1]->visible = one; if (arg0->unk1C != var_a1) { arg0->unk1C = var_a1; } @@ -11460,21 +10984,21 @@ void func_800AB314(struct_8018D9E0_entry *arg0) { } else { arg0->cursor = 3; for (var_a1 = 0; var_a1 < 4; var_a1++) { - sp24[var_a1]->visible = 1; + sp24[var_a1]->visible = one; sp24[var_a1]->priority = 6; } } - } else { - var_v0 = arg0->cursor; - switch (var_v0) { /* irregular */ + break; + case 0: + switch (arg0->cursor) { /* irregular */ case 0: if ((arg0->unk1C / 4) == gCupSelection) { arg0->unk20++; if (arg0->unk20 >= 0x33) { - arg0->cursor = 1; + arg0->cursor = one; arg0->unk20 = 0; - arg0->unk1C = (gCupSelection * 4); - arg0->unk1C++; + var_v0 = gCupSelection * 4; + arg0->unk1C = var_v0 + 1; } } else { arg0->unk20 = 0; @@ -11484,26 +11008,22 @@ void func_800AB314(struct_8018D9E0_entry *arg0) { arg0->cursor = 2; arg0->unk20 = 0; } - var_v0 = arg0->cursor; break; case 1: if ((arg0->unk1C / 4) != gCupSelection) { arg0->cursor = 0; - var_v0 = 0; arg0->unk20 = 0; arg0->unk1C = 0; } else { arg0->unk20++; if (arg0->unk20 >= 0x1F) { arg0->unk20 = 0; - arg0->unk1C = (gCupSelection * 4) + (((arg0->unk1C % 4) + 1) % 4); - var_v0 = arg0->cursor; + arg0->unk1C = (gCupSelection * 4) + (((arg0->unk1C % 4) + one) % 4); } else { if (D_8018EDEC == 3) { arg0->cursor = 2; arg0->unk20 = 0; } - var_v0 = arg0->cursor; } } break; @@ -11518,23 +11038,21 @@ void func_800AB314(struct_8018D9E0_entry *arg0) { arg0->unk20 = 0; arg0->unk1C = 0; } - var_v0 = arg0->cursor; break; case 3: if (D_8018EDEC != 3) { arg0->cursor = 0; arg0->unk20 = 0; arg0->unk1C = 0; - var_v0 = 0; } break; } - switch (var_v0) { + switch (arg0->cursor) { case 0: case 1: for (var_a1 = 0; var_a1 < 4; var_a1++) { if ((arg0->unk1C % 4) == var_a1) { - sp24[var_a1]->visible = 1; + sp24[var_a1]->visible = one; } else { sp24[var_a1]->visible = 0; } @@ -11546,22 +11064,23 @@ void func_800AB314(struct_8018D9E0_entry *arg0) { if (var_a1 == (arg0->unk1C % 4)) { sp24[var_a1]->priority = 6; } else if(arg0->unk20 < (var_a1 * 5)) { - sp24[var_a1]->priority = 4; + sp24[var_a1]->priority = four; } else { sp24[var_a1]->priority = 8; } - sp24[var_a1]->visible = 1; + sp24[var_a1]->visible = one; } break; case 3: for (var_a1 = 0; var_a1 < 4; var_a1++) { - sp24[var_a1]->visible = 1; + sp24[var_a1]->visible = one; sp24[var_a1]->priority = 6; } break; default: break; } + break; } } #else diff --git a/src/code_80091750.h b/src/code_80091750.h index f09255be3..6c660fb95 100644 --- a/src/code_80091750.h +++ b/src/code_80091750.h @@ -9,6 +9,18 @@ extern u32 _course_mario_raceway_dl_mio0SegmentRomStart[]; /* File specific types */ +/* +Known `types` for `struct_8018D9E0_entry` +0x53: "Mushroom Cup" box on the cup selection screen +0x54: "Flower Cup" box on the cup selection screen +0x55: "Star Cup" box on the cup selection screen +0x56: "Special Cup" box on the cup selection screen +0x5E: A box of static over the course images as the cup selection screen loads in. + It is near unnoticeable though as in practice it doesn't last long enough to be seen. + Try locking the word at `8018DC80` to see something like 0x20 just before confirming character selection to make it last longer + See `func_80096CD8` for the actual drawing of the static +*/ + typedef struct { /* 0x00 */ s32 type; // id maybe? /* 0x04 */ s32 cursor; // sound mode, maybe some other stuff @@ -151,8 +163,9 @@ Gfx *func_80096CD8(Gfx*, s32, s32, u32, u32); Gfx *func_80097274(Gfx*, s8, s32, s32, s32, s32, s32, s32, s32, s32, s32, u32, u32, u32); Gfx *func_80097A14(Gfx*, s8, s32, s32, s32, s32, s32, s32, s32, u32, u32); Gfx *func_80097AE4(Gfx*, s8, s32, s32, u8*, s32); -Gfx *func_80097E58(Gfx*, s8, s32, u32, u32, s32, s32, s32, s32, s32, s32, u32); -Gfx *func_800987D0(Gfx*, u32, u32, u32, u32, s32, s32, s32, s32, s32); +Gfx *func_80097E58(Gfx*, s8, s32, s32, s32, s32, s32, s32, u8*, u32, s32, u32); +Gfx *func_80098558(Gfx*, u32, u32, u32, u32, u32, u32, s32, s32); +Gfx *func_800987D0(Gfx*, u32, u32, u32, u32, s32, s32, s32, u32, s32); Gfx *draw_box_fill(Gfx*, s32, s32, s32, s32, s32, s32, s32, s32); Gfx *draw_box(Gfx*, s32, s32, s32, s32, s32, s32, s32, s32); Gfx *func_80098FC8(Gfx*, s32, s32, s32, s32); @@ -431,7 +444,7 @@ extern struct_8018E768_entry D_8018E768[D_8018E768_SIZE]; extern s32 gCycleFlashMenu; extern s8 D_8018E7AC[]; extern s8 D_8018E7B0; -extern s32 D_8018E7B8[]; +extern u32 D_8018E7B8[]; extern u32 D_8018E7C8; extern u32 D_8018E7D0[]; extern s32 D_8018E7E0; @@ -570,7 +583,7 @@ extern MkTexture *D_800E8254[]; extern MkTexture *D_800E8274[]; extern MkTexture *D_800E8294[]; extern MkTexture *D_800E82B4[]; -extern MkTexture *D_800E82C8[]; +extern MkTexture *D_800E82C4[]; extern MkTexture *D_800E82F4[]; extern MkAnimation *D_800E8320[]; extern MkAnimation *D_800E8340[]; diff --git a/src/data/some_data.c b/src/data/some_data.c index b267c63e7..f927fa3df 100644 --- a/src/data/some_data.c +++ b/src/data/some_data.c @@ -351,7 +351,7 @@ f32 D_800E594C[][2] = { { -0.0, 0.0 }, }; -u16 D_800E597C[] = { 0x0000, 0x0000, 0x4000, 0x8000, 0x8000, 0xc000 }; +s16 D_800E597C[] = { 0x0000, 0x0000, 0x4000, 0x8000, 0x8000, 0xc000 }; // Seems to be related to the Boos in Banshee Boardwalk SplineData23 D_800E5988 = { @@ -766,38 +766,40 @@ Vec3s D_800E634C[] = { { 0xf380, 0x0013, 0xfe14 }, }; -Vec3s gMoleSpawns[] = { - { 0x0303, 0x0014, 0xf81a }, - { 0x0327, 0x000f, 0xf7f1 }, - { 0x034f, 0x0012, 0xf808 }, - { 0x0391, 0x000e, 0xf7fa }, - { 0x03ab, 0x0015, 0xf833 }, - { 0x03ad, 0x0011, 0xf818 }, - { 0x03e2, 0x0011, 0xf836 }, - { 0x035f, 0x0016, 0xf826 }, - { 0x05dc, 0x0002, 0x0474 }, - { 0x05e6, 0x000f, 0x041a }, - { 0x0649, 0x0015, 0x03a7 }, - { 0x0509, 0x0003, 0x04f5 }, - { 0x05bc, 0x0016, 0x0416 }, - { 0x0564, 0x000c, 0x0482 }, - { 0x0511, 0x0013, 0x0492 }, - { 0x0635, 0x000b, 0x03ec }, - { 0x0586, 0x0003, 0x04a1 }, - { 0x057d, 0x0004, 0x04e6 }, - { 0x05b7, 0x0008, 0x045e }, - { 0x02bd, 0x0002, 0x04ff }, - { 0x032b, 0x0008, 0x04fe }, - { 0x0317, 0x0010, 0x04cd }, - { 0x036c, 0x000f, 0x04f2 }, - { 0x03d8, 0x0017, 0x04e0 }, - { 0x037b, 0x0014, 0x04da }, - { 0x0398, 0x000f, 0x0518 }, - { 0x0337, 0x0006, 0x052f }, - { 0x02cd, 0x0008, 0x04d7 }, - { 0x02b7, 0x0013, 0x0498 }, - { 0x0274, 0x0008, 0x04a7 }, - { 0x02d4, 0x0004, 0x053b }, +MoleSpawnUnion gMoleSpawns = { + { + { 0x0303, 0x0014, 0xf81a }, + { 0x0327, 0x000f, 0xf7f1 }, + { 0x034f, 0x0012, 0xf808 }, + { 0x0391, 0x000e, 0xf7fa }, + { 0x03ab, 0x0015, 0xf833 }, + { 0x03ad, 0x0011, 0xf818 }, + { 0x03e2, 0x0011, 0xf836 }, + { 0x035f, 0x0016, 0xf826 }, + { 0x05dc, 0x0002, 0x0474 }, + { 0x05e6, 0x000f, 0x041a }, + { 0x0649, 0x0015, 0x03a7 }, + { 0x0509, 0x0003, 0x04f5 }, + { 0x05bc, 0x0016, 0x0416 }, + { 0x0564, 0x000c, 0x0482 }, + { 0x0511, 0x0013, 0x0492 }, + { 0x0635, 0x000b, 0x03ec }, + { 0x0586, 0x0003, 0x04a1 }, + { 0x057d, 0x0004, 0x04e6 }, + { 0x05b7, 0x0008, 0x045e }, + { 0x02bd, 0x0002, 0x04ff }, + { 0x032b, 0x0008, 0x04fe }, + { 0x0317, 0x0010, 0x04cd }, + { 0x036c, 0x000f, 0x04f2 }, + { 0x03d8, 0x0017, 0x04e0 }, + { 0x037b, 0x0014, 0x04da }, + { 0x0398, 0x000f, 0x0518 }, + { 0x0337, 0x0006, 0x052f }, + { 0x02cd, 0x0008, 0x04d7 }, + { 0x02b7, 0x0013, 0x0498 }, + { 0x0274, 0x0008, 0x04a7 }, + { 0x02d4, 0x0004, 0x053b }, + } }; // Referenced by D_800E6724, which is unused diff --git a/src/data/some_data.h b/src/data/some_data.h index 881393de5..dd961fbe1 100644 --- a/src/data/some_data.h +++ b/src/data/some_data.h @@ -37,7 +37,7 @@ extern ThwompSpawn gThwompSpawns100CCExtra[]; extern ThwompSpawn gThomwpSpawns150CC[]; extern f32 D_800E594C[][2]; extern u64 D_800E5974; -extern u16 D_800E597C[]; +extern s16 D_800E597C[]; extern SplineData23 D_800E5988; extern SplineData24 D_800E5A44; extern SplineData25 D_800E5B08; @@ -60,7 +60,7 @@ extern SplineData25 D_800E61B4; extern SplineData23 D_800E6280; extern SplineData *D_800E633C[]; extern Vec3s D_800E634C[]; -extern Vec3s gMoleSpawns[]; +extern MoleSpawnUnion gMoleSpawns; extern SplineData23 D_800E641C; extern SplineData24 D_800E64D8; extern SplineData25 D_800E659C; diff --git a/src/render_objects.c b/src/render_objects.c index 8696dc912..8cef03f3c 100644 --- a/src/render_objects.c +++ b/src/render_objects.c @@ -1642,52 +1642,47 @@ void func_8004C628(s32 arg0, s32 arg1, u32 arg2, u32 arg3, u8 *texture) { gSPDisplayList(gDisplayListHead++, D_0D007EB8); } -#ifdef MIPS_TO_C -//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b -void func_8004C6FC(s16 arg0, s16 arg1, s8 *arg2, u32 arg3, u32 arg4) { - Gfx *temp_v0; - Gfx *temp_v0_2; - Gfx *temp_v0_4; - s32 temp_t5; +#ifdef NON_MATCHING +// https://decomp.me/scratch/TqXqn +// There's a weird fakematch concerning `athing`, don't know that to make of. Can't quite get it over the finish line though +void func_8004C6FC(s16 arg0, s16 arg1, u8 *texture, u32 width, u32 arg4) { s32 temp_v0_3; s32 var_s3; s32 var_s4; - s8 *var_s5; - u32 temp_t3; + s32 athing; + s32 temp_t3; u32 temp_t8; - u32 var_s0; - u32 var_s6; - u32 var_t2; + s32 heigth; + s32 var_s6; + u8 *textureCopy; - var_s4 = arg1 - (arg4 >> 1); + athing = arg0 - (width / 2); + var_s4 = arg1 - (arg4 / 2); + textureCopy = texture; gSPDisplayList(gDisplayListHead++, D_0D007EF8); - temp_t8 = arg3 * arg4 * 4; - temp_t3 = temp_t8 >> 0xC; - var_s5 = arg2; - var_s6 = temp_t8; - var_t2 = temp_t3; gDPSetRenderMode(gDisplayListHead++, G_RM_XLU_SURF, G_RM_XLU_SURF2); - if (temp_t8 & 0xFFF) { - var_t2 = temp_t3 + 1; + temp_t8 = width * arg4 * 4; + temp_t3 = temp_t8 / 4096; + if (temp_t8 % 4096) { + temp_t3++; } - var_s0 = arg4 / var_t2; - var_s3 = 0; - if ((s32) var_t2 > 0) { - do { - temp_t5 = arg3 * var_s0 * 4; - load_texture_tile_rgba32_nomirror(var_s5, (s32) arg3, (s32) var_s0); - func_8004B950(arg0 - (arg3 >> 1), var_s4, (s32) arg3, (s32) var_s0, 1); - temp_v0_3 = var_s6 - temp_t5; - var_s5 += temp_t5; - if (temp_v0_3 < 0) { - var_s0 = var_s6 / arg3; - } else { - var_s6 = (u32) temp_v0_3; - } - var_s3 += 1; - var_s4 += var_s0; - } while (var_s3 < (s32) var_t2); + heigth = arg4 / temp_t3; + var_s6 = temp_t3; + for (var_s3 = 0; var_s3 < var_s6; var_s3++) { + load_texture_tile_rgba32_nomirror(textureCopy, width, heigth); + func_8004B950(athing, var_s4, width, heigth, 1); + temp_v0_3 = temp_t8 - (width * heigth * 4); + textureCopy += (width * heigth * 4); + if (temp_v0_3 < 0) { + heigth = temp_t8 / width; + } else { + temp_t8 = temp_v0_3; + } + // Weird fakematch that is a HUGE improvement + athing += var_s4 * 0; + var_s4 += heigth; } + gSPDisplayList(gDisplayListHead++, D_0D007EB8); } #else @@ -1893,30 +1888,22 @@ void func_8004D4E8(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4, s32 arg5 } } -#ifdef NON_MATCHING -//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b -//? func_80044F34(s8 *, s32, s32); /* extern */ - -UNUSED void func_8004D654(s32 arg0, s32 arg1, u8 *texture, f32 arg3, s32 arg4, s32 arg5, s32 arg6, UNUSED s32 arg7, s32 width, s32 arg9, UNUSED s32 argA, s32 height) { - u8 *img; - s32 var_s3; +void func_8004D654(s32 arg0, s32 arg1, u8 *texture, f32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 width, s32 arg9, s32 argA, s32 height) { s32 i; - // Something weird with (width / 2). - var_s3 = arg1 - (width / 2); - img = texture; + s32 var_s3; + u8 *textureCopy; + + var_s3 = arg1 - (arg9 / 2); + textureCopy = texture; gSPDisplayList(gDisplayListHead++, D_0D008000); func_8004B480(arg4, arg5, arg6); - - for (i = 0; i < arg9 / height; i++) { - func_80044F34(img, width, height); - func_8004BB3C(arg0, var_s3, width, arg9, arg3); - img += (width * height) / 2; + for (i = 0; i < (arg9 / height); i++) { + func_80044F34(textureCopy, width, height); + func_8004BB3C(arg0, arg1, width, arg9, arg3); + textureCopy += (width * height) / 2; var_s3 += height; } } -#else -GLOBAL_ASM("asm/non_matchings/render_objects/func_8004D654.s") -#endif void func_8004D7B4(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4) { s32 sp5C; @@ -2331,36 +2318,47 @@ void func_8004F020(s32 arg0) { } #ifdef NON_MATCHING -//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Dec-20-2023 +// https://decomp.me/scratch/FxA1w /** * characterId of 8 appears to be a type of null check or control flow alteration. */ +#define EXPLICIT_AND 1 void func_8004F168(s32 arg0, s32 playerId, s32 characterId) { + f32 thing0; + f32 thing1; + s16 temp_a0; + s16 temp_a1; Player *player = &gPlayerOne[playerId]; - s32 temp_a0; - s32 temp_a1; - if (gPlayerOne->type & PLAYER_EXISTS) { - temp_a0 = ((D_8018D2C0[arg0] + D_8018D2F0) - ((s16) D_8018D2B0 / 2)) + D_8018D2E0 + (s32) (player->pos[0] * D_8018D2A0); - temp_a1 = ((D_8018D2D8[arg0] + D_8018D2F8) - ((s16) D_8018D2B8 / 2)) + D_8018D2E8 + (s32) (player->pos[2] * D_8018D2A0); + if (player->type & (1 << 15)) { + thing0 = player->pos[0] * D_8018D2A0; + thing1 = player->pos[2] * D_8018D2A0; + temp_a0 = ((D_8018D2C0[arg0] + D_8018D2F0) - (D_8018D2B0 / 2)) + D_8018D2E0 + (s16)(thing0); + temp_a1 = ((D_8018D2D8[arg0] + D_8018D2F8) - (D_8018D2B8 / 2)) + D_8018D2E8 + (s16)(thing1); if (characterId != 8) { - if ((gGPCurrentRaceRankByPlayerId[playerId] == 0) && (gModeSelection != BATTLE) && (gModeSelection != TIME_TRIALS)) { - func_80046424((s32) temp_a0, (s32) temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, (u8 *) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); - // return; + if ((gGPCurrentRaceRankByPlayerId[playerId] == 0) && (gModeSelection != 3) && (gModeSelection != 1)) { + #if EXPLICIT_AND == 1 + func_80046424(temp_a0, temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); + #else + func_80046424(temp_a0, temp_a1, player->rotation[1] + 0x8000, 1.0f, common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); + #endif } else { - func_800463B0((s32) temp_a0, (s32) temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, (u8 *) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); + #if EXPLICIT_AND == 1 + func_800463B0(temp_a0, temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); + #else + func_800463B0(temp_a0, temp_a1, player->rotation[1] + 0x8000, 1.0f, common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); + #endif } - //return; } else { if (gGPCurrentRaceRankByPlayerId[playerId] == 0) { - func_8004C450((s32) temp_a0, (s32) temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot); - //return; + func_8004C450(temp_a0, temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot); } else { - draw_hud_2d_texture((s32) temp_a0, (s32) temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot); + func_8004C364(temp_a0, temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot); } } } } +#undef EXPLICIT_AND #else GLOBAL_ASM("asm/non_matchings/render_objects/func_8004F168.s") #endif @@ -2798,6 +2796,7 @@ void func_80050C68(void) { // Something about the handling of the `player` variable is weird. // All commands are present and correct, 2 of them are out of position +// https://decomp.me/scratch/PvJ5D void func_80050E34(s32 playerId, s32 arg1) { s32 objectIndex; s32 spD0; @@ -3802,7 +3801,7 @@ void func_80054E10(s32 objectIndex) { void func_80054EB8(UNUSED s32 unused) { s32 someIndex; - for (someIndex = 0; someIndex < NUM_MAX_MOLES; someIndex++) { + for (someIndex = 0; someIndex < NUM_TOTAL_MOLES; someIndex++) { func_80054E10(gObjectParticle1[someIndex]); } } diff --git a/src/update_objects.c b/src/update_objects.c index 37037b091..decde7c65 100644 --- a/src/update_objects.c +++ b/src/update_objects.c @@ -3669,10 +3669,6 @@ s16 func_8007AFB0(s32 objectIndex, s32 arg1) { return randomItem; } -#ifdef NON_MATCHING -// https://decomp.me/scratch/yWKlx -// More stupid register allocation nonsense - s32 func_8007B040(s32 objectIndex, s32 playerId) { s16 stackPadding; s32 temp_v1; @@ -3696,8 +3692,7 @@ s32 func_8007B040(s32 objectIndex, s32 playerId) { func_800C9060(playerId, 0x1900A058U); } var_t3 = 1; - gObjectList[objectIndex].unk_0A2 = var_v1; - gObjectList[objectIndex].itemDisplay = var_v1; + gObjectList[objectIndex].itemDisplay = gObjectList[objectIndex].unk_0A2 = var_v1; } else { for (var_v1_2 = 0; var_v1_2 < gPlayerCountSelection1; var_v1_2++) { temp_a0 = gItemWindowObjectByPlayerId[var_v1_2]; @@ -3711,11 +3706,11 @@ s32 func_8007B040(s32 objectIndex, s32 playerId) { } if (var_a3 != 0) { var_v1 = random_int(var_a3); - temp_v1 = sp50[var_v1]; - gObjectList[objectIndex].unk_0D1 = temp_v1; temp_a1 = sp40[var_v1]; gObjectList[objectIndex].unk_0A2 = temp_a1; gObjectList[objectIndex].itemDisplay = temp_a1; + temp_v1 = sp50[var_v1]; + gObjectList[objectIndex].unk_0D1 = temp_v1; temp_a0 = gItemWindowObjectByPlayerId[temp_v1]; sp38 = &gPlayerOne[temp_v1]; func_800722A4(temp_a0, 1); @@ -3730,9 +3725,6 @@ s32 func_8007B040(s32 objectIndex, s32 playerId) { } return var_t3; } -#else -GLOBAL_ASM("asm/non_matchings/update_objects/func_8007B040.s") -#endif void func_8007B254(s32 objectIndex, s32 arg1) { s8 test; // why? @@ -4163,34 +4155,30 @@ void wrapper_update_boos(void) { update_boos(); } -#ifdef MIPS_TO_C -//generated by m2c commit d9d3d6575355663122de59f6b2882d8f174e2355 on Dec-27-2022 +#ifdef NON_MATCHING +// https://decomp.me/scratch/9JBIl +// No idea what the source of the diff is void func_8007C360(s32 objectIndex, Camera *camera) { - Objects *sp20; - s32 sp1C; s32 temp_t0; - s32 temp_t2; s32 var_t1; Objects *temp_a2; temp_a2 = &gObjectList[objectIndex]; - temp_t0 = (((temp_a2->unk_0BE[1] - (u16) camera->rot[1]) + 0x8000) & 0xFFFF) * 0x24; + temp_t0 = (u16)camera->rot[1]; + temp_t0 = (((temp_a2->direction_angle[1] - temp_t0) + 0x8000) & 0xFFFF) * 0x24; var_t1 = temp_t0 >> 0x10; if (temp_t0 < 0) { - var_t1 = (s32) (temp_t0 + 0xFFFF) >> 0x10; + var_t1 = temp_t0 + 0xFFFF; + var_t1 >>= 0x10; } - temp_t2 = var_t1 & 0xFFFF; - if (temp_t2 < 0x13) { - sp20 = temp_a2; - sp1C = temp_t2; - set_object_flag_status_false(objectIndex, 0x00000080); - temp_a2->itemDisplay = (s8) sp1C; - return; + var_t1 &= 0xFFFF; + if (var_t1 < 0x13) { + set_object_flag_status_false(objectIndex, 0x80); + temp_a2->itemDisplay = var_t1; + } else { + set_object_flag_status_true(objectIndex, 0x80); + temp_a2->itemDisplay = 0x24 - var_t1; } - sp20 = temp_a2; - sp1C = temp_t2; - set_object_flag_status_true(objectIndex, 0x00000080); - temp_a2->itemDisplay = 0x24 - temp_t2; } #else GLOBAL_ASM("asm/non_matchings/update_objects/func_8007C360.s") @@ -4210,34 +4198,28 @@ UNUSED void func_8007C49C(void) { } -#ifdef MIPS_TO_C -//generated by m2c commit 9841ff34ca242f5f14b2eab2b54a7a65ac47d80f +#ifdef NON_MATCHING +// https://decomp.me/scratch/IH8Vx +// No idea what the source of the diff is void func_8007C4A4(s32 objectIndex) { - Objects *sp20; - s32 sp1C; - s32 temp_t0; s32 temp_t8; - s32 var_t9; - Objects *temp_v1; + s32 var_t1; - temp_v1 = &gObjectList[objectIndex]; - temp_t8 = temp_v1->unk_0BE[1] * 0x24; - var_t9 = temp_t8 >> 0x10; + temp_t8 = gObjectList[objectIndex].direction_angle[1] * 0x24; + var_t1 = temp_t8 >> 0x10; if (temp_t8 < 0) { - var_t9 = (s32) (temp_t8 + 0xFFFF) >> 0x10; + var_t1 = temp_t8 + 0xFFFF; + var_t1 >>= 0x10; } - temp_t0 = var_t9 & 0xFFFF; - if (temp_t0 < 0x13) { - sp20 = temp_v1; - sp1C = temp_t0; - set_object_flag_status_false(objectIndex, 0x00000080); - temp_v1->itemDisplay = (s8) sp1C; - return; + var_t1 &= 0xFFFF; + if (var_t1 < 0x13) { + set_object_flag_status_false(objectIndex, 0x80); + gObjectList[objectIndex].itemDisplay = var_t1; + } + else { + set_object_flag_status_true(objectIndex, 0x80); + gObjectList[objectIndex].itemDisplay = 0x24 - var_t1; } - sp20 = temp_v1; - sp1C = temp_t0; - set_object_flag_status_true(objectIndex, 0x00000080); - temp_v1->itemDisplay = 0x24 - temp_t0; } #else GLOBAL_ASM("asm/non_matchings/update_objects/func_8007C4A4.s") @@ -5966,9 +5948,8 @@ void func_80080DE4(s32 arg0) { } #ifdef NON_MATCHING -extern f32 D_800E594C[][2]; -extern u16 D_800E597C[6]; - +// https://decomp.me/scratch/YMJDJ +// No idea what the problem is void func_80080E8C(s32 objectIndex1, s32 objectIndex2, s32 arg2) { u16 anAngle; f32 thing0; @@ -6347,17 +6328,6 @@ void func_80081D34(s32 objectIndex) { } } -#ifdef NON_MATCHING -/** - * Nonmatching due to regalloc stuff - * The use of the `offset` variable is really really weird - * The intent of the function appears to be choose a random mole from a given - * group of moles (decided by arg1) - * `offset` then would then be offsetting the indexing into gMoleSpawns - * so that we choose the appropriate spawn location for that mole - * But as its written, `offset` is triple what it ought to be. - * So there' something kind of fucky happening - **/ void func_80081FF4(s32 objectIndex, s32 arg1) { UNUSED s32 stackPadding0; UNUSED s32 stackPadding1; @@ -6401,13 +6371,17 @@ void func_80081FF4(s32 objectIndex, s32 arg1) { break; } } - gObjectList[objectIndex].origin_pos[0] = gMoleSpawns[var_v1][offset + 0] * xOrientation; - gObjectList[objectIndex].origin_pos[1] = gMoleSpawns[var_v1][offset + 1] - 9.0; - gObjectList[objectIndex].origin_pos[2] = gMoleSpawns[var_v1][offset + 2]; + /* + Ideally `gMoleSpawns` wouldn't be a union at all and its just be a list of Vec3s + Even more ideally each mole group would have its own array for its spawns + gObjectList[objectIndex].origin_pos[0] = gMoleSpawns.asVec3sList[offset + var_v1][0] * xOrientation; + gObjectList[objectIndex].origin_pos[1] = gMoleSpawns.asVec3sList[offset + var_v1][1] - 9.0; + gObjectList[objectIndex].origin_pos[2] = gMoleSpawns.asVec3sList[offset + var_v1][2]; + */ + gObjectList[objectIndex].origin_pos[0] = gMoleSpawns.asFlatList[offset + (var_v1 * 3) + 0] * xOrientation; + gObjectList[objectIndex].origin_pos[1] = gMoleSpawns.asFlatList[offset + (var_v1 * 3) + 1] - 9.0; + gObjectList[objectIndex].origin_pos[2] = gMoleSpawns.asFlatList[offset + (var_v1 * 3) + 2]; } -#else -GLOBAL_ASM("asm/non_matchings/update_objects/func_80081FF4.s") -#endif void func_800821AC(s32 objectIndex, s32 arg1) { if (gObjectList[objectIndex].state != 0) { @@ -6671,16 +6645,19 @@ void update_crabs(void) { } #ifdef NON_MATCHING -// https://decomp.me/scratch/RquH0 -// Gollygee I sure love register allocation :^) +// https://decomp.me/scratch/PYAg4 +// Stack issue caused by the `test` variable, but removing it causes much, much larger differences void func_80082F1C(s32 objectIndex, s32 arg1) { + YVFlagPoleSpawn *test; gObjectList[objectIndex].model = (Gfx *) d_course_yoshi_valley_unk5; gObjectList[objectIndex].vertex = (Vtx *) d_course_yoshi_valley_unk4; gObjectList[objectIndex].sizeScaling = 0.027f; + if (test->rot && test->rot) {} + test = &D_800E5DF4[arg1]; func_80072488(objectIndex); - set_obj_origin_pos(objectIndex, D_800E5DF4[arg1].pos[0] * xOrientation, D_800E5DF4[arg1].pos[1], D_800E5DF4[arg1].pos[2]); + set_obj_origin_pos(objectIndex, test->pos[0] * xOrientation, test->pos[1], test->pos[2]); set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); - set_obj_direction_angle(objectIndex, 0U, D_800E5DF4[arg1].rot, 0U); + set_obj_direction_angle(objectIndex, 0U, test->rot, 0U); } #else GLOBAL_ASM("asm/non_matchings/update_objects/func_80082F1C.s") diff --git a/tools/doxygen_syms.md b/tools/doxygen_syms.md index 9f033ac32..1fd98846c 100644 --- a/tools/doxygen_syms.md +++ b/tools/doxygen_syms.md @@ -1918,6 +1918,7 @@ Variable Name | Memory Address [func_80097A14](@ref func_80097A14) | 0x80097A14 [func_80097AE4](@ref func_80097AE4) | 0x80097AE4 [func_80097E58](@ref func_80097E58) | 0x80097E58 +[func_80098558](@ref func_80098558) | 0x80098558 [func_800987D0](@ref func_800987D0) | 0x800987D0 [draw_box_fill](@ref draw_box_fill) | 0x80098C18 [draw_box](@ref draw_box) | 0x80098DF8 @@ -3310,7 +3311,7 @@ Variable Name | Memory Address [D_800E8274](@ref D_800E8274) | 0x800E8274 [D_800E8294](@ref D_800E8294) | 0x800E8294 [D_800E82B4](@ref D_800E82B4) | 0x800E82B4 -[D_800E82C8](@ref D_800E82C8) | 0x800E82C8 +[D_800E82C4](@ref D_800E82C4) | 0x800E82C4 [D_800E82F4](@ref D_800E82F4) | 0x800E82F4 [D_800E8320](@ref D_800E8320) | 0x800E8320 [D_800E8340](@ref D_800E8340) | 0x800E8340 From 40700ce9ad81afe117c651537ced8c557ec1a573 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Tue, 2 Apr 2024 13:12:38 -0600 Subject: [PATCH 08/10] Remove inc from linked file names (#593) * Remove inc from linked file names --- Makefile | 57 ++++++++++--------- assets/include/blueshell.mk | 2 +- assets/include/bomb.mk | 2 +- assets/include/character_portraits.mk | 4 +- assets/include/course_previews.mk | 2 +- assets/include/courses/banshee_boardwalk.mk | 6 +- assets/include/courses/bowsers_castle.mk | 4 +- assets/include/courses/choco_mountain.mk | 2 +- assets/include/courses/dks_jungle_parkway.mk | 4 +- assets/include/courses/frappe_snowland.mk | 6 +- assets/include/courses/kalimari_desert.mk | 2 +- assets/include/courses/koopa_troopa_beach.mk | 4 +- assets/include/courses/luigi_raceway.mk | 2 +- assets/include/courses/mario_raceway.mk | 2 +- assets/include/courses/moo_moo_farm.mk | 6 +- assets/include/courses/rainbow_road.mk | 18 +++--- assets/include/courses/royal_raceway.mk | 2 +- assets/include/courses/sherbet_land.mk | 2 +- assets/include/courses/toads_turnpike.mk | 2 +- assets/include/courses/wario_stadium.mk | 2 +- assets/include/courses/yoshi_valley.mk | 4 +- assets/include/debug_font.mk | 2 +- assets/include/ending_ceremony.mk | 2 +- assets/include/finish_line_banner.mk | 2 +- assets/include/greenshell.mk | 2 +- assets/include/hud_type_c.mk | 6 +- assets/include/item_window.mk | 2 +- assets/include/lakitu/bluelight.mk | 2 +- assets/include/lakitu/checkeredflag.mk | 2 +- assets/include/lakitu/finallap.mk | 2 +- assets/include/lakitu/fishing.mk | 2 +- assets/include/lakitu/nolights.mk | 2 +- assets/include/lakitu/redlights.mk | 2 +- assets/include/lakitu/reverse.mk | 2 +- assets/include/lakitu/secondlap.mk | 2 +- assets/include/minimap_icons.mk | 2 +- assets/include/player_emblems.mk | 2 +- assets/include/startup_logo.mk | 2 +- assets/include/trees.mk | 2 +- assets/include/unused_traffic_light.mk | 2 +- courses/all_course_data.h | 40 ++++++------- .../{course_data.inc.c => course_data.c} | 3 +- .../{course_data.inc.h => course_data.h} | 0 .../course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 2 +- .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 courses/big_donut/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 0 .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 courses/block_fort/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 0 .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 .../bowsers_castle/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 2 +- .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 .../choco_mountain/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 2 +- courses/{courseTable.inc.c => courseTable.c} | 0 .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 .../course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 0 .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 courses/double_deck/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 0 .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 .../frappe_snowland/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 0 .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 .../kalimari_desert/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 2 +- .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 .../course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 0 .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 .../luigi_raceway/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 2 +- .../{staff_ghost.incl.c => staff_ghost.inc.c} | 0 .../{course_data.inc.c => course_data.c} | 0 .../{course_data.inc.h => course_data.h} | 0 .../mario_raceway/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 2 +- .../{staff_ghost.incl.c => staff_ghost.inc.c} | 0 .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 .../moo_moo_farm/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 2 +- .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 .../rainbow_road/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 0 .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 .../royal_raceway/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 2 +- .../{staff_ghost.incl.c => staff_ghost.inc.c} | 0 .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 .../sherbet_land/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 2 +- .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 courses/skyscraper/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 0 ...{staff_ghosts.inc.c => staff_ghost_data.c} | 6 +- .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 .../toads_turnpike/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 2 +- .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 .../wario_stadium/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 2 +- .../{course_data.inc.c => course_data.c} | 2 +- .../{course_data.inc.h => course_data.h} | 0 .../yoshi_valley/course_displaylists.inc.c | 4 +- ...{course_offsets.inc.c => course_offsets.c} | 0 docs/basics/controlflow.md | 10 ++-- include/PR/gbi.h | 2 +- include/actor_types.h | 6 +- mk64.ld | 24 ++++---- src/code_80091750.c | 2 +- ...ommon_textures.inc.c => common_textures.c} | 2 +- .../{data_segment2.inc.c => data_segment2.c} | 2 +- ...art_attributes.inc.c => kart_attributes.c} | 0 src/data/path_spawn_data.c | 2 +- .../{startup_logo.inc.c => startup_logo.c} | 0 .../{startup_logo.inc.h => startup_logo.h} | 0 src/data/{textures.inc.c => textures.c} | 2 +- .../{ceremony_data.inc.c => ceremony_data.c} | 2 +- .../{ceremony_data.inc.h => ceremony_data.h} | 0 ...l_unk_80284EE0.inc.c => dl_unk_80284EE0.c} | 0 src/update_objects.c | 2 +- tools/linkonly_generator.py | 6 +- 143 files changed, 214 insertions(+), 212 deletions(-) rename courses/banshee_boardwalk/{course_data.inc.c => course_data.c} (99%) rename courses/banshee_boardwalk/{course_data.inc.h => course_data.h} (100%) rename courses/banshee_boardwalk/{course_offsets.inc.c => course_offsets.c} (99%) rename courses/big_donut/{course_data.inc.c => course_data.c} (96%) rename courses/big_donut/{course_data.inc.h => course_data.h} (100%) rename courses/big_donut/{course_offsets.inc.c => course_offsets.c} (100%) rename courses/block_fort/{course_data.inc.c => course_data.c} (96%) rename courses/block_fort/{course_data.inc.h => course_data.h} (100%) rename courses/block_fort/{course_offsets.inc.c => course_offsets.c} (100%) rename courses/bowsers_castle/{course_data.inc.c => course_data.c} (99%) rename courses/bowsers_castle/{course_data.inc.h => course_data.h} (100%) rename courses/bowsers_castle/{course_offsets.inc.c => course_offsets.c} (99%) rename courses/choco_mountain/{course_data.inc.c => course_data.c} (99%) rename courses/choco_mountain/{course_data.inc.h => course_data.h} (100%) rename courses/choco_mountain/{course_offsets.inc.c => course_offsets.c} (99%) rename courses/{courseTable.inc.c => courseTable.c} (100%) rename courses/dks_jungle_parkway/{course_data.inc.c => course_data.c} (99%) rename courses/dks_jungle_parkway/{course_data.inc.h => course_data.h} (100%) rename courses/dks_jungle_parkway/{course_offsets.inc.c => course_offsets.c} (100%) rename courses/double_deck/{course_data.inc.c => course_data.c} (96%) rename courses/double_deck/{course_data.inc.h => course_data.h} (100%) rename courses/double_deck/{course_offsets.inc.c => course_offsets.c} (100%) rename courses/frappe_snowland/{course_data.inc.c => course_data.c} (99%) rename courses/frappe_snowland/{course_data.inc.h => course_data.h} (100%) rename courses/frappe_snowland/{course_offsets.inc.c => course_offsets.c} (100%) rename courses/kalimari_desert/{course_data.inc.c => course_data.c} (99%) rename courses/kalimari_desert/{course_data.inc.h => course_data.h} (100%) rename courses/kalimari_desert/{course_offsets.inc.c => course_offsets.c} (99%) rename courses/koopa_troopa_beach/{course_data.inc.c => course_data.c} (99%) rename courses/koopa_troopa_beach/{course_data.inc.h => course_data.h} (100%) rename courses/koopa_troopa_beach/{course_offsets.inc.c => course_offsets.c} (100%) rename courses/luigi_raceway/{course_data.inc.c => course_data.c} (99%) rename courses/luigi_raceway/{course_data.inc.h => course_data.h} (100%) rename courses/luigi_raceway/{course_offsets.inc.c => course_offsets.c} (99%) rename courses/luigi_raceway/{staff_ghost.incl.c => staff_ghost.inc.c} (100%) rename courses/mario_raceway/{course_data.inc.c => course_data.c} (100%) rename courses/mario_raceway/{course_data.inc.h => course_data.h} (100%) rename courses/mario_raceway/{course_offsets.inc.c => course_offsets.c} (99%) rename courses/mario_raceway/{staff_ghost.incl.c => staff_ghost.inc.c} (100%) rename courses/moo_moo_farm/{course_data.inc.c => course_data.c} (99%) rename courses/moo_moo_farm/{course_data.inc.h => course_data.h} (100%) rename courses/moo_moo_farm/{course_offsets.inc.c => course_offsets.c} (99%) rename courses/rainbow_road/{course_data.inc.c => course_data.c} (99%) rename courses/rainbow_road/{course_data.inc.h => course_data.h} (100%) rename courses/rainbow_road/{course_offsets.inc.c => course_offsets.c} (100%) rename courses/royal_raceway/{course_data.inc.c => course_data.c} (99%) rename courses/royal_raceway/{course_data.inc.h => course_data.h} (100%) rename courses/royal_raceway/{course_offsets.inc.c => course_offsets.c} (99%) rename courses/royal_raceway/{staff_ghost.incl.c => staff_ghost.inc.c} (100%) rename courses/sherbet_land/{course_data.inc.c => course_data.c} (99%) rename courses/sherbet_land/{course_data.inc.h => course_data.h} (100%) rename courses/sherbet_land/{course_offsets.inc.c => course_offsets.c} (99%) rename courses/skyscraper/{course_data.inc.c => course_data.c} (97%) rename courses/skyscraper/{course_data.inc.h => course_data.h} (100%) rename courses/skyscraper/{course_offsets.inc.c => course_offsets.c} (100%) rename courses/{staff_ghosts.inc.c => staff_ghost_data.c} (74%) rename courses/toads_turnpike/{course_data.inc.c => course_data.c} (99%) rename courses/toads_turnpike/{course_data.inc.h => course_data.h} (100%) rename courses/toads_turnpike/{course_offsets.inc.c => course_offsets.c} (99%) rename courses/wario_stadium/{course_data.inc.c => course_data.c} (99%) rename courses/wario_stadium/{course_data.inc.h => course_data.h} (100%) rename courses/wario_stadium/{course_offsets.inc.c => course_offsets.c} (99%) rename courses/yoshi_valley/{course_data.inc.c => course_data.c} (99%) rename courses/yoshi_valley/{course_data.inc.h => course_data.h} (100%) rename courses/yoshi_valley/{course_offsets.inc.c => course_offsets.c} (100%) rename src/data/{common_textures.inc.c => common_textures.c} (99%) rename src/data/{data_segment2.inc.c => data_segment2.c} (99%) rename src/data/{kart_attributes.inc.c => kart_attributes.c} (100%) rename src/data/{startup_logo.inc.c => startup_logo.c} (100%) rename src/data/{startup_logo.inc.h => startup_logo.h} (100%) rename src/data/{textures.inc.c => textures.c} (99%) rename src/ending/{ceremony_data.inc.c => ceremony_data.c} (99%) rename src/ending/{ceremony_data.inc.h => ceremony_data.h} (100%) rename src/ending/{dl_unk_80284EE0.inc.c => dl_unk_80284EE0.c} (100%) diff --git a/Makefile b/Makefile index 52682667f..8e8b5748d 100644 --- a/Makefile +++ b/Makefile @@ -235,7 +235,9 @@ include $(MAKEFILE_SPLIT) EUC_JP_FILES := src/ending/credits.c src/code_80005FD0.c src/code_80091750.c C_FILES := $(filter-out $(EUC_JP_FILES),$(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c))) S_FILES := $(foreach dir,$(ASM_DIRS),$(wildcard $(dir)/*.s)) -COURSE_FILES := $(foreach dir,$(COURSE_DIRS),$(wildcard $(dir)/*.inc.c)) +# Include source files in courses/course_name/files.c but exclude .inc.c files. +COURSE_FILES := $(foreach dir,$(COURSE_DIRS),$(filter-out %.inc.c,$(wildcard $(dir)/*.c))) + # Object files O_FILES := \ @@ -475,7 +477,7 @@ $(TEXTURE_FILES_TLUT): $(V)$(N64GRAPHICS) -i $(BUILD_DIR)/$@.inc.c -g $@.png -f $(lastword $(subst ., ,$@)) -s u8 -c $(lastword $(subst ., ,$(subst .$(lastword $(subst ., ,$(TEXTURE_FILES_TLUT))), ,$(TEXTURE_FILES_TLUT)))) -p $(BUILD_DIR)/$@.tlut.inc.c # common textures -$(BUILD_DIR)/src/data/common_textures.inc.o: src/data/common_textures.inc.c $(TEXTURE_FILES) $(TEXTURE_FILES_TLUT) +$(BUILD_DIR)/src/data/common_textures.o: src/data/common_textures.c $(TEXTURE_FILES) $(TEXTURE_FILES_TLUT) @$(PRINT) "$(GREEN)Compiling Common Textures: $(BLUE)$@ $(NO_COL)\n" @$(CC_CHECK) $(CC_CHECK_CFLAGS) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $< $(V)$(CC) -c $(CFLAGS) -o $@ $< @@ -488,7 +490,7 @@ $(BUILD_DIR)/src/data/common_textures.inc.o: src/data/common_textures.inc.c $(TE #==============================================================================# -%/course_textures.linkonly.c %/course_textures.linkonly.h: %/course_offsets.inc.c +%/course_textures.linkonly.c %/course_textures.linkonly.h: %/course_offsets.c $(V)$(LINKONLY_GENERATOR) $(lastword $(subst /, ,$*)) # Its unclear why this is necessary. Everything I undesrtand about `make` says that just @@ -517,7 +519,7 @@ $(COURSE_DISPLAYLIST_OFILES): $(BUILD_DIR)/%/course_displaylists.inc.o: %/course # Course Geography Generation # #==============================================================================# -COURSE_GEOGRAPHY_TARGETS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/course_geography.inc.mio0.o) +COURSE_GEOGRAPHY_TARGETS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/course_geography.mio0.o) %/course_vertices.inc.elf: %/course_vertices.inc.o $(V)$(LD) -t -e 0 -Ttext=0F000000 -Map $@.map -o $@ $< --no-check-sections @@ -530,30 +532,31 @@ COURSE_GEOGRAPHY_TARGETS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/cou $(V)$(MIO0TOOL) -c $< $@ # Course vertices and displaylists are included together due to no alignment between the two files. -%/course_geography.inc.mio0.s: %/course_vertices.inc.mio0 %/course_displaylists_packed.inc.bin +%/course_geography.mio0.s: %/course_vertices.inc.mio0 %/course_displaylists_packed.inc.bin $(PRINT) ".include \"macros.inc\"\n\n.section .data\n\n.balign 4\n\nglabel d_course_$(lastword $(subst /, ,$*))_vertex\n\n.incbin \"$(@D)/course_vertices.inc.mio0\"\n\n.balign 4\n\nglabel d_course_$(lastword $(subst /, ,$*))_packed\n\n.incbin \"$(@D)/course_displaylists_packed.inc.bin\"\n\n.balign 0x10\n" > $@ + #==============================================================================# # Course Data Generation # #==============================================================================# -COURSE_DATA_ELFS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/course_data.inc.elf) +COURSE_DATA_ELFS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/course_data.elf) LDFLAGS += $(foreach elf,$(COURSE_DATA_ELFS),-R $(elf)) -COURSE_DATA_TARGETS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/course_data.inc.mio0.o) +COURSE_DATA_TARGETS := $(foreach dir,$(COURSE_DIRS),$(BUILD_DIR)/$(dir)/course_data.mio0.o) -%/course_data.inc.elf: %/course_data.inc.o %/course_displaylists.inc.elf +%/course_data.elf: %/course_data.o %/course_displaylists.inc.elf $(V)$(LD) -t -e 0 -Ttext=06000000 -Map $@.map -R $*/course_displaylists.inc.elf -o $@ $< --no-check-sections -%/course_data.inc.bin: %/course_data.inc.elf +%/course_data.bin: %/course_data.elf $(V)$(EXTRACT_DATA_FOR_MIO) $< $@ -%/course_data.inc.mio0: %/course_data.inc.bin +%/course_data.mio0: %/course_data.bin @$(PRINT) "$(GREEN)Compressing Course Data: $(BLUE)$@ $(NO_COL)\n" $(V)$(MIO0TOOL) -c $< $@ -%/course_data.inc.mio0.s: %/course_data.inc.mio0 +%/course_data.mio0.s: %/course_data.mio0 $(PRINT) ".include \"macros.inc\"\n\n.section .data\n\n.balign 4\n\n.incbin \"$<\"\n\n" > $@ @@ -619,19 +622,19 @@ endif # Compile Trophy and Podium Models # #==============================================================================# -LDFLAGS += -R $(BUILD_DIR)/src/ending/ceremony_data.inc.elf +LDFLAGS += -R $(BUILD_DIR)/src/ending/ceremony_data.elf -%/ceremony_data.inc.elf: %/ceremony_data.inc.o +%/ceremony_data.elf: %/ceremony_data.o $(V)$(LD) -t -e 0 -Ttext=0B000000 -Map $@.map -o $@ $< --no-check-sections -%/ceremony_data.inc.bin: %/ceremony_data.inc.elf +%/ceremony_data.bin: %/ceremony_data.elf $(V)$(EXTRACT_DATA_FOR_MIO) $< $@ -%/ceremony_data.inc.mio0: %/ceremony_data.inc.bin +%/ceremony_data.mio0: %/ceremony_data.bin @$(PRINT) "$(GREEN)Compressing Trophy Model: $(BLUE)$@ $(NO_COL)\n" $(V)$(MIO0TOOL) -c $< $@ -%/ceremony_data.inc.mio0.s: %/ceremony_data.inc.mio0 +%/ceremony_data.mio0.s: %/ceremony_data.mio0 $(PRINT) ".include \"macros.inc\"\n\n.data\n\n.balign 4\n\nglabel ceremony_data\n\n.incbin \"$<\"\n\n.balign 16\nglabel ceremonyData_end\n" > $@ @@ -639,38 +642,38 @@ LDFLAGS += -R $(BUILD_DIR)/src/ending/ceremony_data.inc.elf # Compile Startup Logo # #==============================================================================# -LDFLAGS += -R $(BUILD_DIR)/src/data/startup_logo.inc.elf +LDFLAGS += -R $(BUILD_DIR)/src/data/startup_logo.elf -%/startup_logo.inc.elf: %/startup_logo.inc.o +%/startup_logo.elf: %/startup_logo.o $(V)$(LD) -t -e 0 -Ttext=06000000 -Map $@.map -o $@ $< --no-check-sections -%/startup_logo.inc.bin: %/startup_logo.inc.elf +%/startup_logo.bin: %/startup_logo.elf $(V)$(EXTRACT_DATA_FOR_MIO) $< $@ -%/startup_logo.inc.mio0: %/startup_logo.inc.bin +%/startup_logo.mio0: %/startup_logo.bin @$(PRINT) "$(GREEN)Compressing Startup Logo Model: $(BLUE)$@ $(NO_COL)\n" $(V)$(MIO0TOOL) -c $< $@ -%/startup_logo.inc.mio0.s: %/startup_logo.inc.mio0 +%/startup_logo.mio0.s: %/startup_logo.mio0 $(PRINT) ".include \"macros.inc\"\n\n.data\n\n.balign 4\n\nglabel startup_logo\n\n.incbin \"$<\"\n\n.balign 16\n\nglabel startupLogo_end\n" > $@ #==============================================================================# # Compile Common Textures # #==============================================================================# -LDFLAGS += -R $(BUILD_DIR)/src/data/common_textures.inc.elf +LDFLAGS += -R $(BUILD_DIR)/src/data/common_textures.elf -%/common_textures.inc.elf: %/common_textures.inc.o +%/common_textures.elf: %/common_textures.o $(V)$(LD) -t -e 0 -Ttext=0D000000 -Map $@.map -o $@ $< --no-check-sections -%/common_textures.inc.bin: %/common_textures.inc.elf +%/common_textures.bin: %/common_textures.elf $(V)$(EXTRACT_DATA_FOR_MIO) $< $@ -%/common_textures.inc.mio0: %/common_textures.inc.bin +%/common_textures.mio0: %/common_textures.bin @$(PRINT) "$(GREEN)Compressing Common Textures: $(BLUE)$@ $(NO_COL)\n" $(V)$(MIO0TOOL) -c $< $@ -%/common_textures.inc.mio0.s: %/common_textures.inc.mio0 +%/common_textures.mio0.s: %/common_textures.mio0 $(PRINT) ".include \"macros.inc\"\n\n.section .data\n\n.balign 4\n\n.incbin \"$<\"\n\n" > $@ @@ -685,7 +688,7 @@ $(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) $(V)$(CPP) $(CPPFLAGS) -DBUILD_DIR=$(BUILD_DIR) -MMD -MP -MT $@ -MF $@.d -o $@ $< # Link MK64 ELF file -$(ELF): $(O_FILES) $(COURSE_DATA_TARGETS) $(BUILD_DIR)/$(LD_SCRIPT) $(BUILD_DIR)/src/data/startup_logo.inc.mio0.o $(BUILD_DIR)/src/ending/ceremony_data.inc.mio0.o $(BUILD_DIR)/src/data/common_textures.inc.mio0.o $(COURSE_GEOGRAPHY_TARGETS) undefined_syms.txt +$(ELF): $(O_FILES) $(COURSE_DATA_TARGETS) $(BUILD_DIR)/$(LD_SCRIPT) $(BUILD_DIR)/src/data/startup_logo.mio0.o $(BUILD_DIR)/src/ending/ceremony_data.mio0.o $(BUILD_DIR)/src/data/common_textures.mio0.o $(COURSE_GEOGRAPHY_TARGETS) undefined_syms.txt @$(PRINT) "$(GREEN)Linking ELF file: $(BLUE)$@ $(NO_COL)\n" $(V)$(LD) $(LDFLAGS) -o $@ diff --git a/assets/include/blueshell.mk b/assets/include/blueshell.mk index 02251ab6a..8eb445627 100644 --- a/assets/include/blueshell.mk +++ b/assets/include/blueshell.mk @@ -22,7 +22,7 @@ $(BLUESHELL_FRAMES:%.png=%.mio0): %.mio0 : %.bin $(BLUESHELL_FRAMES:%.png=%.bin): %.bin : %.png $(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(BLUESHELL_PALETTE) -$(BUILD_DIR)/src/data/common_textures.inc.o: $(BLUESHELL_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(BLUESHELL_PALETTE:%.png=%.inc.c) $(BLUESHELL_PALETTE:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/bomb.mk b/assets/include/bomb.mk index 54bdf7ce5..0266bf6c6 100644 --- a/assets/include/bomb.mk +++ b/assets/include/bomb.mk @@ -10,7 +10,7 @@ $(BOMB_DIR)/common_texture_bomb_4.png BOMB_EXPORT_SENTINEL := $(BOMB_DIR)/.export -$(BUILD_DIR)/src/data/common_textures.inc.o: $(BOMB_FRAMES:%.png=%.inc.c) $(BOMB_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(BOMB_FRAMES:%.png=%.inc.c) $(BOMB_PALETTE:%.png=%.inc.c) $(BOMB_FRAMES:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -Z $@ -g $< -s u8 -f ci8 -c rgba16 -p $(BOMB_PALETTE) diff --git a/assets/include/character_portraits.mk b/assets/include/character_portraits.mk index 7ba69c314..37414f8a8 100644 --- a/assets/include/character_portraits.mk +++ b/assets/include/character_portraits.mk @@ -31,8 +31,8 @@ $(PORTRAITS_DIR)/common_texture_portrait_question_mark.png PORTRAIT_EXPORT_SENTINEL := $(PORTRAITS_DIR)/.export -$(BUILD_DIR)/src/data/common_textures.inc.o: $(PORTRAIT_PNG:%.png=%.inc.c) $(PORTRAIT_PALETTES:%.png=%.inc.c) -$(BUILD_DIR)/src/data/common_textures.inc.o: $(SPECIAL_PORTRAIT_PNG:%.png=%.inc.c) $(SPECIAL_PORTRAIT_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(PORTRAIT_PNG:%.png=%.inc.c) $(PORTRAIT_PALETTES:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(SPECIAL_PORTRAIT_PNG:%.png=%.inc.c) $(SPECIAL_PORTRAIT_PALETTE:%.png=%.inc.c) $(PORTRAIT_PNG:%.png=%.inc.c): $(PORTRAITS_DIR)/common_texture_portrait_%.inc.c : $(PORTRAITS_DIR)/common_texture_portrait_%.png $(N64GRAPHICS) -Z $@ -g $< -s u8 -f ci8 -c rgba16 -p $(PORTRAITS_DIR)/common_tlut_portrait_$*.png diff --git a/assets/include/course_previews.mk b/assets/include/course_previews.mk index 1d6f84149..deedcb477 100644 --- a/assets/include/course_previews.mk +++ b/assets/include/course_previews.mk @@ -24,7 +24,7 @@ $(COURSE_PREVIEW_DIR)/gTextureCoursePreviewBigDonut.png COURSE_PREVIEW_EXPORT_SENTINEL := $(COURSE_PREVIEW_DIR)/.export -$(BUILD_DIR)/src/data/textures.inc.o: $(COURSE_PREVIEW_PNG:%.png=%.mio0) +$(BUILD_DIR)/src/data/textures.o: $(COURSE_PREVIEW_PNG:%.png=%.mio0) $(COURSE_PREVIEW_PNG:%.png=%.mio0): %.mio0 : %.bin $(MIO0TOOL) -c $< $@ diff --git a/assets/include/courses/banshee_boardwalk.mk b/assets/include/courses/banshee_boardwalk.mk index 6479abfbc..fc8d675af 100644 --- a/assets/include/courses/banshee_boardwalk.mk +++ b/assets/include/courses/banshee_boardwalk.mk @@ -65,9 +65,9 @@ $(BANSHEE_BOARDWALK_DIR)/boo_frames.bin: $(BANSHEE_BOARDWALK_BOO_FRAMES:%.png=%. $(BANSHEE_BOARDWALK_BOO_FRAMES:%.png=%.bin): %.bin : %.png $(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(BANSHEE_BOARDWALK_BOO_PALETTE) -$(BUILD_DIR)/courses/banshee_boardwalk/course_data.inc.o: $(BANSHEE_BOARDWALK_BOO_PALETTE:%.png=%.inc.c) -$(BUILD_DIR)/courses/banshee_boardwalk/course_data.inc.o: $(BANSHEE_BOARDWALK_BAT_PALETTE:%.png=%.inc.c) $(BANSHEE_BOARDWALK_BAT_FRAMES:%.png=%.inc.c) -$(BUILD_DIR)/courses/banshee_boardwalk/course_data.inc.o: $(BANSHEE_BOARDWALK_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/banshee_boardwalk/course_data.o: $(BANSHEE_BOARDWALK_BOO_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/courses/banshee_boardwalk/course_data.o: $(BANSHEE_BOARDWALK_BAT_PALETTE:%.png=%.inc.c) $(BANSHEE_BOARDWALK_BAT_FRAMES:%.png=%.inc.c) +$(BUILD_DIR)/courses/banshee_boardwalk/course_data.o: $(BANSHEE_BOARDWALK_PNG:%.png=%.inc.c) $(BANSHEE_BOARDWALK_BAT_FRAMES:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -Z $@ -g $< -s u8 -f ci8 -c rgba16 -p $(BANSHEE_BOARDWALK_BAT_PALETTE) diff --git a/assets/include/courses/bowsers_castle.mk b/assets/include/courses/bowsers_castle.mk index eb4b81a01..15506e1bb 100644 --- a/assets/include/courses/bowsers_castle.mk +++ b/assets/include/courses/bowsers_castle.mk @@ -14,8 +14,8 @@ THOWMP_SIDE_PNG := $(BOWSERS_CASTLE_DIR)/gTextureThwompSide.png BOWSERS_CASTLE_EXPORT_SENTINEL := $(BOWSERS_CASTLE_DIR)/.export -$(BUILD_DIR)/courses/bowsers_castle/course_data.inc.o: $(THWOMP_FACE_FRAMES:%.png=%.inc.c) $(THWOMP_PALETTE:%.png=%.inc.c) -$(BUILD_DIR)/courses/bowsers_castle/course_data.inc.o: $(THOWMP_SIDE_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/bowsers_castle/course_data.o: $(THWOMP_FACE_FRAMES:%.png=%.inc.c) $(THWOMP_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/courses/bowsers_castle/course_data.o: $(THOWMP_SIDE_PNG:%.png=%.inc.c) $(THOWMP_SIDE_PNG:%.png=%.inc.c) $(THWOMP_PALETTE:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/courses/choco_mountain.mk b/assets/include/courses/choco_mountain.mk index cd7efbb4f..c3455aec7 100644 --- a/assets/include/courses/choco_mountain.mk +++ b/assets/include/courses/choco_mountain.mk @@ -6,7 +6,7 @@ $(CHOCO_MOUNTAIN_DIR)/gTextureChocoMountainRock.png CHOCO_MOUNTAIN_EXPORT_SENTINEL := $(CHOCO_MOUNTAIN_DIR)/.export -$(BUILD_DIR)/courses/choco_mountain/course_data.inc.o: $(CHOCO_MOUNTAIN_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/choco_mountain/course_data.o: $(CHOCO_MOUNTAIN_PNG:%.png=%.inc.c) $(CHOCO_MOUNTAIN_PNG:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/courses/dks_jungle_parkway.mk b/assets/include/courses/dks_jungle_parkway.mk index 88e5cd706..433ef86a6 100644 --- a/assets/include/courses/dks_jungle_parkway.mk +++ b/assets/include/courses/dks_jungle_parkway.mk @@ -32,8 +32,8 @@ $(DKS_JUNGLE_PARKWAY_KIWANO_FRAMES:%.png=%.mio0): %.mio0 : %.bin $(DKS_JUNGLE_PARKWAY_KIWANO_FRAMES:%.png=%.bin): %.bin : %.png $(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(DKS_JUNGLE_PARKWAY_KIWANO_PALETTE) -$(BUILD_DIR)/courses/dks_jungle_parkway/course_data.inc.o: $(DKS_JUNGLE_PARKWAY_KIWANO_PALETTE:%.png=%.inc.c) -$(BUILD_DIR)/courses/dks_jungle_parkway/course_data.inc.o: $(DKS_JUNGLE_PARKWAY_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/dks_jungle_parkway/course_data.o: $(DKS_JUNGLE_PARKWAY_KIWANO_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/courses/dks_jungle_parkway/course_data.o: $(DKS_JUNGLE_PARKWAY_PNG:%.png=%.inc.c) $(DKS_JUNGLE_PARKWAY_PNG:%.png=%.inc.c) $(DKS_JUNGLE_PARKWAY_KIWANO_PALETTE:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/courses/frappe_snowland.mk b/assets/include/courses/frappe_snowland.mk index b9dd2a139..9f0df49b2 100644 --- a/assets/include/courses/frappe_snowland.mk +++ b/assets/include/courses/frappe_snowland.mk @@ -17,9 +17,9 @@ $(FRAPPE_SNOWLAND_DIR)/gTextureFrappeSnowlandTreeRight.png \ FRAPPE_SNOWLAND_EXPORT_SENTINEL := $(FRAPPE_SNOWLAND_DIR)/.export -$(BUILD_DIR)/courses/frappe_snowland/course_data.inc.o: $(FRAPPE_SNOWLAND_SNOWMAN_PNG:%.png=%.inc.c) $(FRAPPE_SNOWLAND_SNOW_PNG:%.png=%.inc.c) -$(BUILD_DIR)/courses/frappe_snowland/course_data.inc.o: $(FRAPPE_SNOWLAND_SNOWMAN_PALETTE:%.png=%.inc.c) $(FRAPPE_SNOWLAND_SNOW_PALETTE:%.png=%.inc.c) -$(BUILD_DIR)/courses/frappe_snowland/course_data.inc.o: $(FRAPPE_SNOWLAND_TREE_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/courses/frappe_snowland/course_data.o: $(FRAPPE_SNOWLAND_SNOWMAN_PNG:%.png=%.inc.c) $(FRAPPE_SNOWLAND_SNOW_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/frappe_snowland/course_data.o: $(FRAPPE_SNOWLAND_SNOWMAN_PALETTE:%.png=%.inc.c) $(FRAPPE_SNOWLAND_SNOW_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/courses/frappe_snowland/course_data.o: $(FRAPPE_SNOWLAND_TREE_PALETTE:%.png=%.inc.c) $(FRAPPE_SNOWLAND_SNOWMAN_PNG:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -Z $@ -g $< -s u8 -f ci8 -c rgba16 -p $(FRAPPE_SNOWLAND_SNOWMAN_PALETTE) diff --git a/assets/include/courses/kalimari_desert.mk b/assets/include/courses/kalimari_desert.mk index 879dac2a3..6d447c1a6 100644 --- a/assets/include/courses/kalimari_desert.mk +++ b/assets/include/courses/kalimari_desert.mk @@ -40,7 +40,7 @@ $(KALIMARI_DESERT_DIR)/gTextureLocomotiveBogie.png KALIMARI_DESERT_EXPORT_SENTINEL := $(KALIMARI_DESERT_DIR)/.export -$(BUILD_DIR)/courses/kalimari_desert/course_data.inc.o: $(KALIMARI_DESERT_PNG:%.png=%.inc.c) $(CACTUS_PALETTE_IMPORT:%.png=%.inc.c) +$(BUILD_DIR)/courses/kalimari_desert/course_data.o: $(KALIMARI_DESERT_PNG:%.png=%.inc.c) $(CACTUS_PALETTE_IMPORT:%.png=%.inc.c) $(KALIMARI_DESERT_PNG:%.png=%.inc.c) $(CACTUS_PALETTE_IMPORT:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/courses/koopa_troopa_beach.mk b/assets/include/courses/koopa_troopa_beach.mk index 06fdaa198..790cf8c04 100644 --- a/assets/include/courses/koopa_troopa_beach.mk +++ b/assets/include/courses/koopa_troopa_beach.mk @@ -20,8 +20,8 @@ $(KOOPA_TROOPA_BEACH_DIR)/gTextureKoopaTroopaPalmTrunk.png KOOPA_TROOPA_BEACH_EXPORT_SENTINEL := $(KOOPA_TROOPA_BEACH_DIR)/.export -$(BUILD_DIR)/courses/koopa_troopa_beach/course_data.inc.o: $(KOOPA_TROOPA_BEACH_CRAB_PALETTE:%.png=%.inc.c) $(KOOPA_TROOPA_BEACH_CRAB_FRAMES:%.png=%.inc.c) -$(BUILD_DIR)/courses/koopa_troopa_beach/course_data.inc.o: $(KOOPA_TROOPA_BEACH_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/koopa_troopa_beach/course_data.o: $(KOOPA_TROOPA_BEACH_CRAB_PALETTE:%.png=%.inc.c) $(KOOPA_TROOPA_BEACH_CRAB_FRAMES:%.png=%.inc.c) +$(BUILD_DIR)/courses/koopa_troopa_beach/course_data.o: $(KOOPA_TROOPA_BEACH_PNG:%.png=%.inc.c) $(KOOPA_TROOPA_BEACH_CRAB_FRAMES:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -Z $@ -g $< -s u8 -f ci8 -c rgba16 -p $(KOOPA_TROOPA_BEACH_CRAB_PALETTE) diff --git a/assets/include/courses/luigi_raceway.mk b/assets/include/courses/luigi_raceway.mk index 1e21e29d2..b43609882 100644 --- a/assets/include/courses/luigi_raceway.mk +++ b/assets/include/courses/luigi_raceway.mk @@ -8,7 +8,7 @@ $(LUIGI_RACEWAY_DIR)/gTextureLuigiRacewayBalloonRope.png LUIGI_RACEWAY_EXPORT_SENTINEL := $(LUIGI_RACEWAY_DIR)/.export -$(BUILD_DIR)/courses/luigi_raceway/course_data.inc.o: $(LUIGI_RACEWAY_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/luigi_raceway/course_data.o: $(LUIGI_RACEWAY_PNG:%.png=%.inc.c) $(LUIGI_RACEWAY_PNG:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/courses/mario_raceway.mk b/assets/include/courses/mario_raceway.mk index 97140fcfc..50ea257a7 100644 --- a/assets/include/courses/mario_raceway.mk +++ b/assets/include/courses/mario_raceway.mk @@ -27,7 +27,7 @@ $(PIRANHA_PLANT_FRAMES:%.png=%.mio0): %.mio0 : %.bin $(PIRANHA_PLANT_FRAMES:%.png=%.bin): %.bin : %.png $(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(MARIO_RACEWAY_PIRANHA_PLANT_PALETTE) -$(BUILD_DIR)/courses/mario_raceway/course_data.inc.o: $(MARIO_RACEWAY_PIRANHA_PLANT_PALETTE:%.png=%.inc.c) $(MARIO_RACEWAY_SIGN:%.png=%.inc.c) +$(BUILD_DIR)/courses/mario_raceway/course_data.o: $(MARIO_RACEWAY_PIRANHA_PLANT_PALETTE:%.png=%.inc.c) $(MARIO_RACEWAY_SIGN:%.png=%.inc.c) $(MARIO_RACEWAY_PIRANHA_PLANT_PALETTE:%.png=%.inc.c) $(MARIO_RACEWAY_SIGN:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/courses/moo_moo_farm.mk b/assets/include/courses/moo_moo_farm.mk index 60661f221..45fac3870 100644 --- a/assets/include/courses/moo_moo_farm.mk +++ b/assets/include/courses/moo_moo_farm.mk @@ -39,9 +39,9 @@ MOO_MOO_FARM_DIRT_PNG := $(MOO_MOO_FARM_DIR)/gTextureMooMooFarmDirt.png MOO_MOO_FARM_EXPORT_SENTINEL := $(MOO_MOO_FARM_DIR)/.export -$(BUILD_DIR)/courses/moo_moo_farm/course_data.inc.o: $(MOLE_PALETTE:%.png=%.inc.c) $(MOLE_FRAMES:%.png=%.inc.c) -$(BUILD_DIR)/courses/moo_moo_farm/course_data.inc.o: $(COW_PALETTE_IMPORT:%.png=%.inc.c) -$(BUILD_DIR)/courses/moo_moo_farm/course_data.inc.o: $(MOO_MOO_FARM_DIRT_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/moo_moo_farm/course_data.o: $(MOLE_PALETTE:%.png=%.inc.c) $(MOLE_FRAMES:%.png=%.inc.c) +$(BUILD_DIR)/courses/moo_moo_farm/course_data.o: $(COW_PALETTE_IMPORT:%.png=%.inc.c) +$(BUILD_DIR)/courses/moo_moo_farm/course_data.o: $(MOO_MOO_FARM_DIRT_PNG:%.png=%.inc.c) $(MOLE_FRAMES:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -Z $@ -g $< -s u8 -f ci8 -c rgba16 -p $(MOLE_PALETTE) diff --git a/assets/include/courses/rainbow_road.mk b/assets/include/courses/rainbow_road.mk index 682eeb4c6..f10089899 100644 --- a/assets/include/courses/rainbow_road.mk +++ b/assets/include/courses/rainbow_road.mk @@ -54,15 +54,15 @@ $(RAINBOW_ROAD_DIR)/gTextureRainbowRoadChainChompEye.png RAINBOW_ROAD_EXPORT_SENTINEL := $(RAINBOW_ROAD_DIR)/.export -$(BUILD_DIR)/courses/rainbow_road/course_data.inc.o: $(RAINBOW_ROAD_MUSHROOM_PNG:%.png=%.inc.c) -$(BUILD_DIR)/courses/rainbow_road/course_data.inc.o: $(RAINBOW_ROAD_MARIO_PNG:%.png=%.inc.c) -$(BUILD_DIR)/courses/rainbow_road/course_data.inc.o: $(RAINBOW_ROAD_BOO_PNG:%.png=%.inc.c) -$(BUILD_DIR)/courses/rainbow_road/course_data.inc.o: $(RAINBOW_ROAD_CHARACTER_PNG:%.png=%.inc.c) -$(BUILD_DIR)/courses/rainbow_road/course_data.inc.o: $(RAINBOW_ROAD_MUSHROOM_PALETTES:%.png=%.inc.c) -$(BUILD_DIR)/courses/rainbow_road/course_data.inc.o: $(RAINBOW_ROAD_MARIO_PALETTES:%.png=%.inc.c) -$(BUILD_DIR)/courses/rainbow_road/course_data.inc.o: $(RAINBOW_ROAD_BOO_PALETTES:%.png=%.inc.c) -$(BUILD_DIR)/courses/rainbow_road/course_data.inc.o: $(RAINBOW_ROAD_CHARACTER_PALETTES:%.png=%.inc.c) -$(BUILD_DIR)/courses/rainbow_road/course_data.inc.o: $(RAINBOW_ROAD_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/rainbow_road/course_data.o: $(RAINBOW_ROAD_MUSHROOM_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/rainbow_road/course_data.o: $(RAINBOW_ROAD_MARIO_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/rainbow_road/course_data.o: $(RAINBOW_ROAD_BOO_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/rainbow_road/course_data.o: $(RAINBOW_ROAD_CHARACTER_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/rainbow_road/course_data.o: $(RAINBOW_ROAD_MUSHROOM_PALETTES:%.png=%.inc.c) +$(BUILD_DIR)/courses/rainbow_road/course_data.o: $(RAINBOW_ROAD_MARIO_PALETTES:%.png=%.inc.c) +$(BUILD_DIR)/courses/rainbow_road/course_data.o: $(RAINBOW_ROAD_BOO_PALETTES:%.png=%.inc.c) +$(BUILD_DIR)/courses/rainbow_road/course_data.o: $(RAINBOW_ROAD_CHARACTER_PALETTES:%.png=%.inc.c) +$(BUILD_DIR)/courses/rainbow_road/course_data.o: $(RAINBOW_ROAD_PNG:%.png=%.inc.c) $(RAINBOW_ROAD_MUSHROOM_PNG:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -Z $@ -g $< -s u8 -f ci8 -c rgba16 -p $(RAINBOW_ROAD_DIR)/gTLUTRainbowRoadNeonMushroom4.png diff --git a/assets/include/courses/royal_raceway.mk b/assets/include/courses/royal_raceway.mk index b5f48ae91..7013554be 100644 --- a/assets/include/courses/royal_raceway.mk +++ b/assets/include/courses/royal_raceway.mk @@ -4,7 +4,7 @@ ROYAL_RACEWAY_PIRANHA_PLANT_PALETTE := $(ROYAL_RACEWAY_DIR)/gTLUTRoyalRacewayPir ROYAL_RACEWAY_EXPORT_SENTINEL := $(ROYAL_RACEWAY_DIR)/.export -$(BUILD_DIR)/courses/royal_raceway/course_data.inc.o: $(ROYAL_RACEWAY_PIRANHA_PLANT_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/courses/royal_raceway/course_data.o: $(ROYAL_RACEWAY_PIRANHA_PLANT_PALETTE:%.png=%.inc.c) $(ROYAL_RACEWAY_PIRANHA_PLANT_PALETTE:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/courses/sherbet_land.mk b/assets/include/courses/sherbet_land.mk index 0cb240700..cb7d21b6d 100644 --- a/assets/include/courses/sherbet_land.mk +++ b/assets/include/courses/sherbet_land.mk @@ -8,7 +8,7 @@ $(SHERBET_LAND_DIR)/gTexturePenguinEye.png SHERBET_LAND_EXPORT_SENTINEL := $(SHERBET_LAND_DIR)/.export -$(BUILD_DIR)/courses/sherbet_land/course_data.inc.o: $(SHERBET_LAND_ICE:%.png=%.inc.c) $(PENGUIN_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/sherbet_land/course_data.o: $(SHERBET_LAND_ICE:%.png=%.inc.c) $(PENGUIN_PNG:%.png=%.inc.c) $(SHERBET_LAND_ICE:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f ia16 diff --git a/assets/include/courses/toads_turnpike.mk b/assets/include/courses/toads_turnpike.mk index 3f9613d33..2704e99c2 100644 --- a/assets/include/courses/toads_turnpike.mk +++ b/assets/include/courses/toads_turnpike.mk @@ -38,7 +38,7 @@ $(TOADS_TURNPIKE_DIR)/gTextureToadsTurnpikeCarSideLod1.png TOADS_TURNPIKE_EXPORT_SENTINEL := $(TOADS_TURNPIKE_DIR)/.export -$(BUILD_DIR)/courses/toads_turnpike/course_data.inc.o: $(TOADS_TURNPIKE_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/toads_turnpike/course_data.o: $(TOADS_TURNPIKE_PNG:%.png=%.inc.c) $(TOADS_TURNPIKE_PNG:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/courses/wario_stadium.mk b/assets/include/courses/wario_stadium.mk index 1d168be9f..6bfb28fc2 100644 --- a/assets/include/courses/wario_stadium.mk +++ b/assets/include/courses/wario_stadium.mk @@ -8,7 +8,7 @@ $(WARIO_STADIUM_DIR)/gTextureWarioStadiumSignBottomRight.png WARIO_STADIUM_EXPORT_SENTINEL := $(WARIO_STADIUM_DIR)/.export -$(BUILD_DIR)/courses/wario_stadium/course_data.inc.o: $(WARIO_STADIUM_SIGN:%.png=%.inc.c) +$(BUILD_DIR)/courses/wario_stadium/course_data.o: $(WARIO_STADIUM_SIGN:%.png=%.inc.c) $(WARIO_STADIUM_SIGN:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/courses/yoshi_valley.mk b/assets/include/courses/yoshi_valley.mk index 188cfc3a5..454f9b467 100644 --- a/assets/include/courses/yoshi_valley.mk +++ b/assets/include/courses/yoshi_valley.mk @@ -10,8 +10,8 @@ YOSHI_VALLEY_HEDGEHOG_PNG := $(YOSHI_VALLEY_DIR)/gTextureYoshiValleyHedgehog.pn YOSHI_VALLEY_EXPORT_SENTINEL := $(YOSHI_VALLEY_DIR)/.export -$(BUILD_DIR)/courses/yoshi_valley/course_data.inc.o: $(YOSHI_VALLEY_HEDGEHOG_PALETTE:%.png=%.inc.c) $(YOSHI_VALLEY_HEDGEHOG_PNG:%.png=%.inc.c) -$(BUILD_DIR)/courses/yoshi_valley/course_data.inc.o: $(YOSHI_VALLEY_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/yoshi_valley/course_data.o: $(YOSHI_VALLEY_HEDGEHOG_PALETTE:%.png=%.inc.c) $(YOSHI_VALLEY_HEDGEHOG_PNG:%.png=%.inc.c) +$(BUILD_DIR)/courses/yoshi_valley/course_data.o: $(YOSHI_VALLEY_PNG:%.png=%.inc.c) $(YOSHI_VALLEY_HEDGEHOG_PNG:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -Z $@ -g $< -s u8 -f ci8 -c rgba16 -p $(YOSHI_VALLEY_HEDGEHOG_PALETTE) diff --git a/assets/include/debug_font.mk b/assets/include/debug_font.mk index 99eb902f1..047175d51 100644 --- a/assets/include/debug_font.mk +++ b/assets/include/debug_font.mk @@ -6,7 +6,7 @@ DEBUG_FONT_PNG := $(DEBUG_FONT_DIR)/common_texture_debug_font.png DEBUG_FONT_EXPORT_SENTINEL := $(DEBUG_FONT_DIR)/.export -$(BUILD_DIR)/src/data/common_textures.inc.o: $(DEBUG_FONT_PNG:%.png=%.inc.c) $(DEBUG_FONT_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(DEBUG_FONT_PNG:%.png=%.inc.c) $(DEBUG_FONT_PALETTE:%.png=%.inc.c) $(DEBUG_FONT_PNG:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -Z $@ -g $< -s u8 -f ci4 -c rgba16 -p $(DEBUG_FONT_PALETTE) diff --git a/assets/include/ending_ceremony.mk b/assets/include/ending_ceremony.mk index 758b58ffb..1fcb971b1 100644 --- a/assets/include/ending_ceremony.mk +++ b/assets/include/ending_ceremony.mk @@ -12,7 +12,7 @@ $(ENDING_CEREMONY)/gTexturePodium3.png ENDING_CEREMONY_EXPORT_SENTINEL := $(ENDING_CEREMONY)/.export -$(BUILD_DIR)/src/ending/ceremony_data.inc.o: $(TROHPY_PNG:%.png=%.inc.c) $(PODIUM_PNG:%.png=%.inc.c) +$(BUILD_DIR)/src/ending/ceremony_data.o: $(TROHPY_PNG:%.png=%.inc.c) $(PODIUM_PNG:%.png=%.inc.c) $(TROHPY_PNG:%.png=%.inc.c) $(PODIUM_PNG:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/finish_line_banner.mk b/assets/include/finish_line_banner.mk index 08fa6c6f3..504d52545 100644 --- a/assets/include/finish_line_banner.mk +++ b/assets/include/finish_line_banner.mk @@ -22,7 +22,7 @@ $(FINISH_LINE_BANNER_PNG:%.png=%.mio0): %.mio0 : %.bin $(FINISH_LINE_BANNER_PNG:%.png=%.bin): %.bin : %.png $(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(FINISH_LINE_BANNER_PALETTE) -$(BUILD_DIR)/src/data/common_textures.inc.o: $(FINISH_LINE_BANNER_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(FINISH_LINE_BANNER_PALETTE:%.png=%.inc.c) $(FINISH_LINE_BANNER_PALETTE:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/greenshell.mk b/assets/include/greenshell.mk index f63e0743f..ba34dbca7 100644 --- a/assets/include/greenshell.mk +++ b/assets/include/greenshell.mk @@ -22,7 +22,7 @@ $(GREENSHELL_FRAMES:%.png=%.mio0): %.mio0 : %.bin $(GREENSHELL_FRAMES:%.png=%.bin): %.bin : %.png $(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(GREENSHELL_PALETTE) -$(BUILD_DIR)/src/data/common_textures.inc.o: $(GREENSHELL_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(GREENSHELL_PALETTE:%.png=%.inc.c) $(GREENSHELL_PALETTE:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/hud_type_c.mk b/assets/include/hud_type_c.mk index 8041d6080..9c314e725 100644 --- a/assets/include/hud_type_c.mk +++ b/assets/include/hud_type_c.mk @@ -30,9 +30,9 @@ HUD_TYPE_C_PORTRAIT_BORDER_PNG := $(HUD_TYPE_C_DIR)/common_texture_character_por HUD_TYPE_C_EXPORT_SENTINEL := $(HUD_TYPE_C_DIR)/.export -$(BUILD_DIR)/src/data/common_textures.inc.o: $(HUD_TYPE_C_FONT_PNG:%.png=%.inc.c) $(HUD_TYPE_C_FONT_PALETTE:%.png=%.inc.c) -$(BUILD_DIR)/src/data/common_textures.inc.o: $(HUD_TYPE_C_TINY_FONT_PNG:%.png=%.inc.c) $(HUD_TYPE_C_TINY_FONT_PALETTE:%.png=%.inc.c) -$(BUILD_DIR)/src/data/common_textures.inc.o: $(HUD_TYPE_C_PORTRAIT_BORDER_PNG:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(HUD_TYPE_C_FONT_PNG:%.png=%.inc.c) $(HUD_TYPE_C_FONT_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(HUD_TYPE_C_TINY_FONT_PNG:%.png=%.inc.c) $(HUD_TYPE_C_TINY_FONT_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(HUD_TYPE_C_PORTRAIT_BORDER_PNG:%.png=%.inc.c) $(HUD_TYPE_C_FONT_PNG:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -Z $@ -g $< -s u8 -f ci8 -c rgba16 -p $(HUD_TYPE_C_FONT_PALETTE) diff --git a/assets/include/item_window.mk b/assets/include/item_window.mk index d396f4352..d7042b640 100644 --- a/assets/include/item_window.mk +++ b/assets/include/item_window.mk @@ -38,7 +38,7 @@ $(ITEM_WINDOW_DIR)/common_texture_item_window_fake_item_box.png ITEM_WINDOW_EXPORT_SENTINEL := $(ITEM_WINDOW_DIR)/.export -$(BUILD_DIR)/src/data/common_textures.inc.o: $(ITEM_WINDOW_PNG:%.png=%.inc.c) $(ITEM_WINDOW_PALETTES:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(ITEM_WINDOW_PNG:%.png=%.inc.c) $(ITEM_WINDOW_PALETTES:%.png=%.inc.c) $(ITEM_WINDOW_DIR)/common_texture_%.inc.c: $(ITEM_WINDOW_DIR)/common_texture_%.png $(N64GRAPHICS) -Z $@ -g $< -s u8 -f ci8 -c rgba16 -p $(ITEM_WINDOW_DIR)/common_tlut_$*.png diff --git a/assets/include/lakitu/bluelight.mk b/assets/include/lakitu/bluelight.mk index eccbaef75..8735c449e 100644 --- a/assets/include/lakitu/bluelight.mk +++ b/assets/include/lakitu/bluelight.mk @@ -19,7 +19,7 @@ $(BUILD_DIR)/$(DATA_DIR)/other_textures.o: $(BLUELIGHT_FRAMES:%.png=%.bin) $(BLUELIGHT_FRAMES:%.png=%.bin): %.bin : %.png $(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(BLUELIGHT_PALETTE) -$(BUILD_DIR)/src/data/common_textures.inc.o: $(BLUELIGHT_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(BLUELIGHT_PALETTE:%.png=%.inc.c) $(BLUELIGHT_PALETTE:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/lakitu/checkeredflag.mk b/assets/include/lakitu/checkeredflag.mk index e288914e3..1e1160eaa 100644 --- a/assets/include/lakitu/checkeredflag.mk +++ b/assets/include/lakitu/checkeredflag.mk @@ -43,7 +43,7 @@ $(BUILD_DIR)/$(DATA_DIR)/other_textures.o: $(CHECKEREDFLAG_FRAMES:%.png=%.bin) $(CHECKEREDFLAG_FRAMES:%.png=%.bin): %.bin : %.png $(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(CHECKEREDFLAG_PALETTE) -$(BUILD_DIR)/src/data/common_textures.inc.o: $(CHECKEREDFLAG_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(CHECKEREDFLAG_PALETTE:%.png=%.inc.c) $(CHECKEREDFLAG_PALETTE:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/lakitu/finallap.mk b/assets/include/lakitu/finallap.mk index 51d216c39..2cbd7ced3 100644 --- a/assets/include/lakitu/finallap.mk +++ b/assets/include/lakitu/finallap.mk @@ -27,7 +27,7 @@ $(BUILD_DIR)/$(DATA_DIR)/other_textures.o: $(FINALLAP_FRAMES:%.png=%.bin) $(FINALLAP_FRAMES:%.png=%.bin): %.bin : %.png $(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(FINALLAP_PALETTE) -$(BUILD_DIR)/src/data/common_textures.inc.o: $(FINALLAP_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(FINALLAP_PALETTE:%.png=%.inc.c) $(FINALLAP_PALETTE:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/lakitu/fishing.mk b/assets/include/lakitu/fishing.mk index b7986e069..0c927624e 100644 --- a/assets/include/lakitu/fishing.mk +++ b/assets/include/lakitu/fishing.mk @@ -15,7 +15,7 @@ $(BUILD_DIR)/$(DATA_DIR)/other_textures.o: $(FISHING_FRAMES:%.png=%.bin) $(FISHING_FRAMES:%.png=%.bin): %.bin : %.png $(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(FISHING_PALETTE) -$(BUILD_DIR)/src/data/common_textures.inc.o: $(FISHING_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(FISHING_PALETTE:%.png=%.inc.c) $(FISHING_PALETTE:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/lakitu/nolights.mk b/assets/include/lakitu/nolights.mk index 758f178bb..0094d3c52 100644 --- a/assets/include/lakitu/nolights.mk +++ b/assets/include/lakitu/nolights.mk @@ -19,7 +19,7 @@ $(BUILD_DIR)/$(DATA_DIR)/other_textures.o: $(NOLIGHTS_FRAMES:%.png=%.bin) $(NOLIGHTS_FRAMES:%.png=%.bin): %.bin : %.png $(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(NOLIGHTS_PALETTE) -$(BUILD_DIR)/src/data/common_textures.inc.o: $(NOLIGHTS_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(NOLIGHTS_PALETTE:%.png=%.inc.c) $(NOLIGHTS_PALETTE:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/lakitu/redlights.mk b/assets/include/lakitu/redlights.mk index e39f2e7b5..b34ea7945 100644 --- a/assets/include/lakitu/redlights.mk +++ b/assets/include/lakitu/redlights.mk @@ -27,7 +27,7 @@ $(BUILD_DIR)/$(DATA_DIR)/other_textures.o: $(REDLIGHTS_FRAMES:%.png=%.bin) $(REDLIGHTS_FRAMES:%.png=%.bin): %.bin : %.png $(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(REDLIGHTS_PALETTE) -$(BUILD_DIR)/src/data/common_textures.inc.o: $(REDLIGHTS_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(REDLIGHTS_PALETTE:%.png=%.inc.c) $(REDLIGHTS_PALETTE:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/lakitu/reverse.mk b/assets/include/lakitu/reverse.mk index a4ba4101e..03c88dca3 100644 --- a/assets/include/lakitu/reverse.mk +++ b/assets/include/lakitu/reverse.mk @@ -27,7 +27,7 @@ $(BUILD_DIR)/$(DATA_DIR)/other_textures.o: $(REVERSE_FRAMES:%.png=%.bin) $(REVERSE_FRAMES:%.png=%.bin): %.bin : %.png $(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(REVERSE_PALETTE) -$(BUILD_DIR)/src/data/common_textures.inc.o: $(REVERSE_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(REVERSE_PALETTE:%.png=%.inc.c) $(REVERSE_PALETTE:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/lakitu/secondlap.mk b/assets/include/lakitu/secondlap.mk index 1bb5b6da2..640184a9b 100644 --- a/assets/include/lakitu/secondlap.mk +++ b/assets/include/lakitu/secondlap.mk @@ -27,7 +27,7 @@ $(BUILD_DIR)/$(DATA_DIR)/other_textures.o: $(SECONDLAP_FRAMES:%.png=%.bin) $(SECONDLAP_FRAMES:%.png=%.bin): %.bin : %.png $(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(SECONDLAP_PALETTE) -$(BUILD_DIR)/src/data/common_textures.inc.o: $(SECONDLAP_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(SECONDLAP_PALETTE:%.png=%.inc.c) $(SECONDLAP_PALETTE:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/minimap_icons.mk b/assets/include/minimap_icons.mk index e14a8f9f8..554ceab4f 100644 --- a/assets/include/minimap_icons.mk +++ b/assets/include/minimap_icons.mk @@ -14,7 +14,7 @@ $(MINIMAP_ICONS_DIR)/common_texture_minimap_progress_dot.png MINIMAP_ICONS_EXPORT_SENTINEL := $(MINIMAP_ICONS_DIR)/.export -$(BUILD_DIR)/src/data/common_textures.inc.o: $(MINIMAP_ICONS_PNG:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(MINIMAP_ICONS_PNG:%.png=%.inc.c) $(MINIMAP_ICONS_PNG:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/player_emblems.mk b/assets/include/player_emblems.mk index f5f6ae5d7..6c9451e78 100644 --- a/assets/include/player_emblems.mk +++ b/assets/include/player_emblems.mk @@ -10,7 +10,7 @@ $(PLAYER_EMBLEM_DIR)/common_texture_player_emblem_4p.png PLAYER_EMBLEM_EXPORT_SENTINEL := $(PLAYER_EMBLEM_DIR)/.export -$(BUILD_DIR)/src/data/common_textures.inc.o: $(PLAYER_EMBLEM_PNGS:%.png=%.inc.c) $(PLAYER_EMBLEM_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(PLAYER_EMBLEM_PNGS:%.png=%.inc.c) $(PLAYER_EMBLEM_PALETTE:%.png=%.inc.c) $(PLAYER_EMBLEM_PNGS:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -Z $@ -g $< -s u8 -f ci8 -c rgba16 -p $(PLAYER_EMBLEM_PALETTE) diff --git a/assets/include/startup_logo.mk b/assets/include/startup_logo.mk index 2a16f3ad4..b8c70d485 100644 --- a/assets/include/startup_logo.mk +++ b/assets/include/startup_logo.mk @@ -4,7 +4,7 @@ REFLECTION_MAP := $(STARTUP_LOGO)/gTextureReflectionMapGold.png STARTUP_LOGO_EXPORT_SENTINEL := $(STARTUP_LOGO)/.export -$(BUILD_DIR)/src/data/startup_logo.inc.o: $(REFLECTION_MAP:%.png=%.inc.c) +$(BUILD_DIR)/src/data/startup_logo.o: $(REFLECTION_MAP:%.png=%.inc.c) $(REFLECTION_MAP:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/trees.mk b/assets/include/trees.mk index 238797cf1..7c60c4bdc 100644 --- a/assets/include/trees.mk +++ b/assets/include/trees.mk @@ -29,7 +29,7 @@ $(TREES_PNG:%.png=%.mio0): %.mio0 : %.bin $(TREES_PNG:%.png=%.bin): %.bin : %.png $(N64GRAPHICS) -Z $@ -g $< -s raw -f ci8 -c rgba16 -p $(TREES_PALETTE) -$(BUILD_DIR)/src/data/common_textures.inc.o: $(TREES_PALETTE_IMPORT:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(TREES_PALETTE_IMPORT:%.png=%.inc.c) $(TREES_PALETTE:%.png=%.inc.c) $(TREES_PALETTE_IMPORT:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -i $@ -g $< -s u8 -f rgba16 diff --git a/assets/include/unused_traffic_light.mk b/assets/include/unused_traffic_light.mk index 4608e903d..54021a70d 100644 --- a/assets/include/unused_traffic_light.mk +++ b/assets/include/unused_traffic_light.mk @@ -16,7 +16,7 @@ $(UNUSED_TRAFFIC_LIGHT_DIR)/common_texture_traffic_light_10.png UNUSED_TRAFFIC_LIGHT_EXPORT_SENTINEL := $(UNUSED_TRAFFIC_LIGHT_DIR)/.export -$(BUILD_DIR)/src/data/common_textures.inc.o: $(UNUSED_TRAFFIC_LIGHT_PNG:%.png=%.inc.c) $(UNUSED_TRAFFIC_LIGHT_PALETTE:%.png=%.inc.c) +$(BUILD_DIR)/src/data/common_textures.o: $(UNUSED_TRAFFIC_LIGHT_PNG:%.png=%.inc.c) $(UNUSED_TRAFFIC_LIGHT_PALETTE:%.png=%.inc.c) $(UNUSED_TRAFFIC_LIGHT_PNG:%.png=%.inc.c): %.inc.c : %.png $(N64GRAPHICS) -Z $@ -g $< -s u8 -f ci8 -c rgba16 -p $(UNUSED_TRAFFIC_LIGHT_PALETTE) diff --git a/courses/all_course_data.h b/courses/all_course_data.h index 3a2c16f56..bde518b5a 100644 --- a/courses/all_course_data.h +++ b/courses/all_course_data.h @@ -1,25 +1,25 @@ #ifndef ALL_COURSE_DATA_H #define ALL_COURSE_DATA_H -#include "courses/big_donut/course_data.inc.h" -#include "courses/block_fort/course_data.inc.h" -#include "courses/double_deck/course_data.inc.h" -#include "courses/skyscraper/course_data.inc.h" -#include "courses/choco_mountain/course_data.inc.h" -#include "courses/frappe_snowland/course_data.inc.h" -#include "courses/mario_raceway/course_data.inc.h" -#include "courses/toads_turnpike/course_data.inc.h" -#include "courses/kalimari_desert/course_data.inc.h" -#include "courses/koopa_troopa_beach/course_data.inc.h" -#include "courses/luigi_raceway/course_data.inc.h" -#include "courses/moo_moo_farm/course_data.inc.h" -#include "courses/banshee_boardwalk/course_data.inc.h" -#include "courses/dks_jungle_parkway/course_data.inc.h" -#include "courses/rainbow_road/course_data.inc.h" -#include "courses/yoshi_valley/course_data.inc.h" -#include "courses/bowsers_castle/course_data.inc.h" -#include "courses/royal_raceway/course_data.inc.h" -#include "courses/sherbet_land/course_data.inc.h" -#include "courses/wario_stadium/course_data.inc.h" +#include "courses/big_donut/course_data.h" +#include "courses/block_fort/course_data.h" +#include "courses/double_deck/course_data.h" +#include "courses/skyscraper/course_data.h" +#include "courses/choco_mountain/course_data.h" +#include "courses/frappe_snowland/course_data.h" +#include "courses/mario_raceway/course_data.h" +#include "courses/toads_turnpike/course_data.h" +#include "courses/kalimari_desert/course_data.h" +#include "courses/koopa_troopa_beach/course_data.h" +#include "courses/luigi_raceway/course_data.h" +#include "courses/moo_moo_farm/course_data.h" +#include "courses/banshee_boardwalk/course_data.h" +#include "courses/dks_jungle_parkway/course_data.h" +#include "courses/rainbow_road/course_data.h" +#include "courses/yoshi_valley/course_data.h" +#include "courses/bowsers_castle/course_data.h" +#include "courses/royal_raceway/course_data.h" +#include "courses/sherbet_land/course_data.h" +#include "courses/wario_stadium/course_data.h" #endif // ALL_COURSE_DATA_H diff --git a/courses/banshee_boardwalk/course_data.inc.c b/courses/banshee_boardwalk/course_data.c similarity index 99% rename from courses/banshee_boardwalk/course_data.inc.c rename to courses/banshee_boardwalk/course_data.c index 86b668e0f..69de3a934 100644 --- a/courses/banshee_boardwalk/course_data.inc.c +++ b/courses/banshee_boardwalk/course_data.c @@ -6,8 +6,7 @@ #include #include -#include - +#include "course_displaylists.inc.h" Gfx d_course_banshee_boardwalk_dl_0[] = { gsSPEndDisplayList(), diff --git a/courses/banshee_boardwalk/course_data.inc.h b/courses/banshee_boardwalk/course_data.h similarity index 100% rename from courses/banshee_boardwalk/course_data.inc.h rename to courses/banshee_boardwalk/course_data.h diff --git a/courses/banshee_boardwalk/course_displaylists.inc.c b/courses/banshee_boardwalk/course_displaylists.inc.c index 510fb055a..381f746f0 100644 --- a/courses/banshee_boardwalk/course_displaylists.inc.c +++ b/courses/banshee_boardwalk/course_displaylists.inc.c @@ -4,8 +4,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_banshee_boardwalk_packed_dl_0[] = { diff --git a/courses/banshee_boardwalk/course_offsets.inc.c b/courses/banshee_boardwalk/course_offsets.c similarity index 99% rename from courses/banshee_boardwalk/course_offsets.inc.c rename to courses/banshee_boardwalk/course_offsets.c index a1dac3d5d..39c00b570 100644 --- a/courses/banshee_boardwalk/course_offsets.inc.c +++ b/courses/banshee_boardwalk/course_offsets.c @@ -1,7 +1,7 @@ #include #include "PR/gbi.h" #include "course_offsets.h" -#include "courses/banshee_boardwalk/course_data.inc.h" +#include "courses/banshee_boardwalk/course_data.h" extern u8 gTexture6447C4[]; extern u8 gTexture676FB0[]; diff --git a/courses/big_donut/course_data.inc.c b/courses/big_donut/course_data.c similarity index 96% rename from courses/big_donut/course_data.inc.c rename to courses/big_donut/course_data.c index 73d10ad48..4909ad5b8 100644 --- a/courses/big_donut/course_data.inc.c +++ b/courses/big_donut/course_data.c @@ -4,7 +4,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_big_donut_dl[] = { gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA), diff --git a/courses/big_donut/course_data.inc.h b/courses/big_donut/course_data.h similarity index 100% rename from courses/big_donut/course_data.inc.h rename to courses/big_donut/course_data.h diff --git a/courses/big_donut/course_displaylists.inc.c b/courses/big_donut/course_displaylists.inc.c index 12c4caf77..f5184e620 100644 --- a/courses/big_donut/course_displaylists.inc.c +++ b/courses/big_donut/course_displaylists.inc.c @@ -5,8 +5,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_big_donut_packed_dl_0[] = { diff --git a/courses/big_donut/course_offsets.inc.c b/courses/big_donut/course_offsets.c similarity index 100% rename from courses/big_donut/course_offsets.inc.c rename to courses/big_donut/course_offsets.c diff --git a/courses/block_fort/course_data.inc.c b/courses/block_fort/course_data.c similarity index 96% rename from courses/block_fort/course_data.inc.c rename to courses/block_fort/course_data.c index 630519013..de1cda9bd 100644 --- a/courses/block_fort/course_data.inc.c +++ b/courses/block_fort/course_data.c @@ -3,7 +3,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_block_fort_dl[] = { gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA), diff --git a/courses/block_fort/course_data.inc.h b/courses/block_fort/course_data.h similarity index 100% rename from courses/block_fort/course_data.inc.h rename to courses/block_fort/course_data.h diff --git a/courses/block_fort/course_displaylists.inc.c b/courses/block_fort/course_displaylists.inc.c index 9bb4be9ce..762604b3d 100644 --- a/courses/block_fort/course_displaylists.inc.c +++ b/courses/block_fort/course_displaylists.inc.c @@ -4,8 +4,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_block_fort_packed_dl_0[] = { diff --git a/courses/block_fort/course_offsets.inc.c b/courses/block_fort/course_offsets.c similarity index 100% rename from courses/block_fort/course_offsets.inc.c rename to courses/block_fort/course_offsets.c diff --git a/courses/bowsers_castle/course_data.inc.c b/courses/bowsers_castle/course_data.c similarity index 99% rename from courses/bowsers_castle/course_data.inc.c rename to courses/bowsers_castle/course_data.c index 8afc7bf7b..55360bb7f 100644 --- a/courses/bowsers_castle/course_data.inc.c +++ b/courses/bowsers_castle/course_data.c @@ -6,7 +6,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_bowsers_castle_dl_0[] = { diff --git a/courses/bowsers_castle/course_data.inc.h b/courses/bowsers_castle/course_data.h similarity index 100% rename from courses/bowsers_castle/course_data.inc.h rename to courses/bowsers_castle/course_data.h diff --git a/courses/bowsers_castle/course_displaylists.inc.c b/courses/bowsers_castle/course_displaylists.inc.c index 5973cb063..7162aedff 100644 --- a/courses/bowsers_castle/course_displaylists.inc.c +++ b/courses/bowsers_castle/course_displaylists.inc.c @@ -3,8 +3,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_bowsers_castle_packed_dl_0[] = { diff --git a/courses/bowsers_castle/course_offsets.inc.c b/courses/bowsers_castle/course_offsets.c similarity index 99% rename from courses/bowsers_castle/course_offsets.inc.c rename to courses/bowsers_castle/course_offsets.c index bcb381d9c..3d840e873 100644 --- a/courses/bowsers_castle/course_offsets.inc.c +++ b/courses/bowsers_castle/course_offsets.c @@ -1,6 +1,6 @@ #include #include "course_offsets.h" -#include "courses/bowsers_castle/course_data.inc.h" +#include "course_data.h" extern u8 gTexture64313C[]; extern u8 gTexture6528DC[]; diff --git a/courses/choco_mountain/course_data.inc.c b/courses/choco_mountain/course_data.c similarity index 99% rename from courses/choco_mountain/course_data.inc.c rename to courses/choco_mountain/course_data.c index 091674118..72e927c6e 100644 --- a/courses/choco_mountain/course_data.inc.c +++ b/courses/choco_mountain/course_data.c @@ -5,7 +5,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_choco_mountain_dl_0[] = { diff --git a/courses/choco_mountain/course_data.inc.h b/courses/choco_mountain/course_data.h similarity index 100% rename from courses/choco_mountain/course_data.inc.h rename to courses/choco_mountain/course_data.h diff --git a/courses/choco_mountain/course_displaylists.inc.c b/courses/choco_mountain/course_displaylists.inc.c index 674618e03..acf65bcdb 100644 --- a/courses/choco_mountain/course_displaylists.inc.c +++ b/courses/choco_mountain/course_displaylists.inc.c @@ -3,8 +3,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_choco_mountain_packed_dl_0[] = { diff --git a/courses/choco_mountain/course_offsets.inc.c b/courses/choco_mountain/course_offsets.c similarity index 99% rename from courses/choco_mountain/course_offsets.inc.c rename to courses/choco_mountain/course_offsets.c index 29efe563c..6ccb45107 100644 --- a/courses/choco_mountain/course_offsets.inc.c +++ b/courses/choco_mountain/course_offsets.c @@ -1,6 +1,6 @@ #include #include "course_offsets.h" -#include "courses/choco_mountain/course_data.inc.h" +#include "course_data.h" extern u8 gTexture64619C[]; extern u8 gTexture64647C[]; diff --git a/courses/courseTable.inc.c b/courses/courseTable.c similarity index 100% rename from courses/courseTable.inc.c rename to courses/courseTable.c diff --git a/courses/dks_jungle_parkway/course_data.inc.c b/courses/dks_jungle_parkway/course_data.c similarity index 99% rename from courses/dks_jungle_parkway/course_data.inc.c rename to courses/dks_jungle_parkway/course_data.c index 2aaa92e74..9fb5b2807 100644 --- a/courses/dks_jungle_parkway/course_data.inc.c +++ b/courses/dks_jungle_parkway/course_data.c @@ -6,7 +6,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_dks_jungle_parkway_dl_0[] = { diff --git a/courses/dks_jungle_parkway/course_data.inc.h b/courses/dks_jungle_parkway/course_data.h similarity index 100% rename from courses/dks_jungle_parkway/course_data.inc.h rename to courses/dks_jungle_parkway/course_data.h diff --git a/courses/dks_jungle_parkway/course_displaylists.inc.c b/courses/dks_jungle_parkway/course_displaylists.inc.c index 93633aa0c..2b789d787 100644 --- a/courses/dks_jungle_parkway/course_displaylists.inc.c +++ b/courses/dks_jungle_parkway/course_displaylists.inc.c @@ -4,8 +4,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_dks_jungle_parkway_packed_dl_0[] = { diff --git a/courses/dks_jungle_parkway/course_offsets.inc.c b/courses/dks_jungle_parkway/course_offsets.c similarity index 100% rename from courses/dks_jungle_parkway/course_offsets.inc.c rename to courses/dks_jungle_parkway/course_offsets.c diff --git a/courses/double_deck/course_data.inc.c b/courses/double_deck/course_data.c similarity index 96% rename from courses/double_deck/course_data.inc.c rename to courses/double_deck/course_data.c index 38da49b43..6a3b3294a 100644 --- a/courses/double_deck/course_data.inc.c +++ b/courses/double_deck/course_data.c @@ -3,7 +3,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_double_deck_dl[] = { gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA), diff --git a/courses/double_deck/course_data.inc.h b/courses/double_deck/course_data.h similarity index 100% rename from courses/double_deck/course_data.inc.h rename to courses/double_deck/course_data.h diff --git a/courses/double_deck/course_displaylists.inc.c b/courses/double_deck/course_displaylists.inc.c index d45ab2bdb..a82236ba8 100644 --- a/courses/double_deck/course_displaylists.inc.c +++ b/courses/double_deck/course_displaylists.inc.c @@ -4,8 +4,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_double_deck_packed_dl_0[] = { diff --git a/courses/double_deck/course_offsets.inc.c b/courses/double_deck/course_offsets.c similarity index 100% rename from courses/double_deck/course_offsets.inc.c rename to courses/double_deck/course_offsets.c diff --git a/courses/frappe_snowland/course_data.inc.c b/courses/frappe_snowland/course_data.c similarity index 99% rename from courses/frappe_snowland/course_data.inc.c rename to courses/frappe_snowland/course_data.c index 942e3e25d..08b5a7872 100644 --- a/courses/frappe_snowland/course_data.inc.c +++ b/courses/frappe_snowland/course_data.c @@ -6,7 +6,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_frappe_snowland_dl_0[] = { diff --git a/courses/frappe_snowland/course_data.inc.h b/courses/frappe_snowland/course_data.h similarity index 100% rename from courses/frappe_snowland/course_data.inc.h rename to courses/frappe_snowland/course_data.h diff --git a/courses/frappe_snowland/course_displaylists.inc.c b/courses/frappe_snowland/course_displaylists.inc.c index f2c4dd288..2f8c18f2e 100644 --- a/courses/frappe_snowland/course_displaylists.inc.c +++ b/courses/frappe_snowland/course_displaylists.inc.c @@ -3,8 +3,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_frappe_snowland_packed_dl_0[] = { diff --git a/courses/frappe_snowland/course_offsets.inc.c b/courses/frappe_snowland/course_offsets.c similarity index 100% rename from courses/frappe_snowland/course_offsets.inc.c rename to courses/frappe_snowland/course_offsets.c diff --git a/courses/kalimari_desert/course_data.inc.c b/courses/kalimari_desert/course_data.c similarity index 99% rename from courses/kalimari_desert/course_data.inc.c rename to courses/kalimari_desert/course_data.c index e9f9efd9e..ed591a654 100644 --- a/courses/kalimari_desert/course_data.inc.c +++ b/courses/kalimari_desert/course_data.c @@ -6,7 +6,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_kalimari_desert_dl_0[] = { diff --git a/courses/kalimari_desert/course_data.inc.h b/courses/kalimari_desert/course_data.h similarity index 100% rename from courses/kalimari_desert/course_data.inc.h rename to courses/kalimari_desert/course_data.h diff --git a/courses/kalimari_desert/course_displaylists.inc.c b/courses/kalimari_desert/course_displaylists.inc.c index 0e8bb02df..c7d76edc4 100644 --- a/courses/kalimari_desert/course_displaylists.inc.c +++ b/courses/kalimari_desert/course_displaylists.inc.c @@ -3,8 +3,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_kalimari_desert_packed_dl_0[] = { diff --git a/courses/kalimari_desert/course_offsets.inc.c b/courses/kalimari_desert/course_offsets.c similarity index 99% rename from courses/kalimari_desert/course_offsets.inc.c rename to courses/kalimari_desert/course_offsets.c index 461a1df9c..08bd004a1 100644 --- a/courses/kalimari_desert/course_offsets.inc.c +++ b/courses/kalimari_desert/course_offsets.c @@ -1,6 +1,6 @@ #include #include "course_offsets.h" -#include "courses/kalimari_desert/course_data.inc.h" +#include "course_data.h" extern u8 gTexture6684F8[]; extern u8 gTextureSignLuigis0[]; diff --git a/courses/koopa_troopa_beach/course_data.inc.c b/courses/koopa_troopa_beach/course_data.c similarity index 99% rename from courses/koopa_troopa_beach/course_data.inc.c rename to courses/koopa_troopa_beach/course_data.c index 52bbfa504..25e28ce8b 100644 --- a/courses/koopa_troopa_beach/course_data.inc.c +++ b/courses/koopa_troopa_beach/course_data.c @@ -7,7 +7,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_koopa_troopa_beach_dl_0[] = { diff --git a/courses/koopa_troopa_beach/course_data.inc.h b/courses/koopa_troopa_beach/course_data.h similarity index 100% rename from courses/koopa_troopa_beach/course_data.inc.h rename to courses/koopa_troopa_beach/course_data.h diff --git a/courses/koopa_troopa_beach/course_displaylists.inc.c b/courses/koopa_troopa_beach/course_displaylists.inc.c index cda5897ac..27ad79b3f 100644 --- a/courses/koopa_troopa_beach/course_displaylists.inc.c +++ b/courses/koopa_troopa_beach/course_displaylists.inc.c @@ -3,8 +3,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_koopa_troopa_beach_packed_dl_0[] = { diff --git a/courses/koopa_troopa_beach/course_offsets.inc.c b/courses/koopa_troopa_beach/course_offsets.c similarity index 100% rename from courses/koopa_troopa_beach/course_offsets.inc.c rename to courses/koopa_troopa_beach/course_offsets.c diff --git a/courses/luigi_raceway/course_data.inc.c b/courses/luigi_raceway/course_data.c similarity index 99% rename from courses/luigi_raceway/course_data.inc.c rename to courses/luigi_raceway/course_data.c index aab51fca6..a496c7848 100644 --- a/courses/luigi_raceway/course_data.inc.c +++ b/courses/luigi_raceway/course_data.c @@ -6,7 +6,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_luigi_raceway_dl_0[] = { diff --git a/courses/luigi_raceway/course_data.inc.h b/courses/luigi_raceway/course_data.h similarity index 100% rename from courses/luigi_raceway/course_data.inc.h rename to courses/luigi_raceway/course_data.h diff --git a/courses/luigi_raceway/course_displaylists.inc.c b/courses/luigi_raceway/course_displaylists.inc.c index 9985dd11c..e61eae27f 100644 --- a/courses/luigi_raceway/course_displaylists.inc.c +++ b/courses/luigi_raceway/course_displaylists.inc.c @@ -3,8 +3,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_luigi_raceway_packed_dl_0[] = { diff --git a/courses/luigi_raceway/course_offsets.inc.c b/courses/luigi_raceway/course_offsets.c similarity index 99% rename from courses/luigi_raceway/course_offsets.inc.c rename to courses/luigi_raceway/course_offsets.c index c3c4364f9..ac95af599 100644 --- a/courses/luigi_raceway/course_offsets.inc.c +++ b/courses/luigi_raceway/course_offsets.c @@ -1,6 +1,6 @@ #include #include "course_offsets.h" -#include "courses/luigi_raceway/course_data.inc.h" +#include "course_data.h" extern u8 gTextureSignShellShot0[]; extern u8 gTextureSignShellShot1[]; diff --git a/courses/luigi_raceway/staff_ghost.incl.c b/courses/luigi_raceway/staff_ghost.inc.c similarity index 100% rename from courses/luigi_raceway/staff_ghost.incl.c rename to courses/luigi_raceway/staff_ghost.inc.c diff --git a/courses/mario_raceway/course_data.inc.c b/courses/mario_raceway/course_data.c similarity index 100% rename from courses/mario_raceway/course_data.inc.c rename to courses/mario_raceway/course_data.c diff --git a/courses/mario_raceway/course_data.inc.h b/courses/mario_raceway/course_data.h similarity index 100% rename from courses/mario_raceway/course_data.inc.h rename to courses/mario_raceway/course_data.h diff --git a/courses/mario_raceway/course_displaylists.inc.c b/courses/mario_raceway/course_displaylists.inc.c index b81b009b2..750285deb 100644 --- a/courses/mario_raceway/course_displaylists.inc.c +++ b/courses/mario_raceway/course_displaylists.inc.c @@ -3,8 +3,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_mario_raceway_packed_dl_0[] = { diff --git a/courses/mario_raceway/course_offsets.inc.c b/courses/mario_raceway/course_offsets.c similarity index 99% rename from courses/mario_raceway/course_offsets.inc.c rename to courses/mario_raceway/course_offsets.c index 60b9cef90..87d3e0f3a 100644 --- a/courses/mario_raceway/course_offsets.inc.c +++ b/courses/mario_raceway/course_offsets.c @@ -1,6 +1,6 @@ #include #include "course_offsets.h" -#include "courses/mario_raceway/course_data.inc.h" +#include "course_data.h" extern u8 gTextureCheckerboardYellowPink[]; extern u8 gTexture64619C[]; diff --git a/courses/mario_raceway/staff_ghost.incl.c b/courses/mario_raceway/staff_ghost.inc.c similarity index 100% rename from courses/mario_raceway/staff_ghost.incl.c rename to courses/mario_raceway/staff_ghost.inc.c diff --git a/courses/moo_moo_farm/course_data.inc.c b/courses/moo_moo_farm/course_data.c similarity index 99% rename from courses/moo_moo_farm/course_data.inc.c rename to courses/moo_moo_farm/course_data.c index 1d0c2a3ab..74936e9c5 100644 --- a/courses/moo_moo_farm/course_data.inc.c +++ b/courses/moo_moo_farm/course_data.c @@ -6,7 +6,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_moo_moo_farm_dl_0[] = { diff --git a/courses/moo_moo_farm/course_data.inc.h b/courses/moo_moo_farm/course_data.h similarity index 100% rename from courses/moo_moo_farm/course_data.inc.h rename to courses/moo_moo_farm/course_data.h diff --git a/courses/moo_moo_farm/course_displaylists.inc.c b/courses/moo_moo_farm/course_displaylists.inc.c index 74f8dff19..c4ae8da5d 100644 --- a/courses/moo_moo_farm/course_displaylists.inc.c +++ b/courses/moo_moo_farm/course_displaylists.inc.c @@ -3,8 +3,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_moo_moo_farm_packed_dl_0[] = { diff --git a/courses/moo_moo_farm/course_offsets.inc.c b/courses/moo_moo_farm/course_offsets.c similarity index 99% rename from courses/moo_moo_farm/course_offsets.inc.c rename to courses/moo_moo_farm/course_offsets.c index f75b5dd65..e31b570e4 100644 --- a/courses/moo_moo_farm/course_offsets.inc.c +++ b/courses/moo_moo_farm/course_offsets.c @@ -1,6 +1,6 @@ #include #include "course_offsets.h" -#include "courses/moo_moo_farm/course_data.inc.h" +#include "course_data.h" extern u8 gTextureWoodDoor0[]; extern u8 gTextureGrass2[]; diff --git a/courses/rainbow_road/course_data.inc.c b/courses/rainbow_road/course_data.c similarity index 99% rename from courses/rainbow_road/course_data.inc.c rename to courses/rainbow_road/course_data.c index fddda29c0..baca547cf 100644 --- a/courses/rainbow_road/course_data.inc.c +++ b/courses/rainbow_road/course_data.c @@ -7,7 +7,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_rainbow_road_dl_0[] = { diff --git a/courses/rainbow_road/course_data.inc.h b/courses/rainbow_road/course_data.h similarity index 100% rename from courses/rainbow_road/course_data.inc.h rename to courses/rainbow_road/course_data.h diff --git a/courses/rainbow_road/course_displaylists.inc.c b/courses/rainbow_road/course_displaylists.inc.c index 219e90609..4ffe95176 100644 --- a/courses/rainbow_road/course_displaylists.inc.c +++ b/courses/rainbow_road/course_displaylists.inc.c @@ -4,8 +4,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_rainbow_road_packed_dl_0[] = { diff --git a/courses/rainbow_road/course_offsets.inc.c b/courses/rainbow_road/course_offsets.c similarity index 100% rename from courses/rainbow_road/course_offsets.inc.c rename to courses/rainbow_road/course_offsets.c diff --git a/courses/royal_raceway/course_data.inc.c b/courses/royal_raceway/course_data.c similarity index 99% rename from courses/royal_raceway/course_data.inc.c rename to courses/royal_raceway/course_data.c index 3e6ff3a97..4e7e1a7b8 100644 --- a/courses/royal_raceway/course_data.inc.c +++ b/courses/royal_raceway/course_data.c @@ -6,7 +6,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_royal_raceway_dl_0[] = { diff --git a/courses/royal_raceway/course_data.inc.h b/courses/royal_raceway/course_data.h similarity index 100% rename from courses/royal_raceway/course_data.inc.h rename to courses/royal_raceway/course_data.h diff --git a/courses/royal_raceway/course_displaylists.inc.c b/courses/royal_raceway/course_displaylists.inc.c index 65ec339df..a51c7ca58 100644 --- a/courses/royal_raceway/course_displaylists.inc.c +++ b/courses/royal_raceway/course_displaylists.inc.c @@ -4,8 +4,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_royal_raceway_packed_dl_0[] = { diff --git a/courses/royal_raceway/course_offsets.inc.c b/courses/royal_raceway/course_offsets.c similarity index 99% rename from courses/royal_raceway/course_offsets.inc.c rename to courses/royal_raceway/course_offsets.c index 101713e62..8b74e33be 100644 --- a/courses/royal_raceway/course_offsets.inc.c +++ b/courses/royal_raceway/course_offsets.c @@ -1,6 +1,6 @@ #include #include "course_offsets.h" -#include "courses/royal_raceway/course_data.inc.h" +#include "course_data.h" extern u8 gTexture64619C[]; extern u8 gTexture645134[]; diff --git a/courses/royal_raceway/staff_ghost.incl.c b/courses/royal_raceway/staff_ghost.inc.c similarity index 100% rename from courses/royal_raceway/staff_ghost.incl.c rename to courses/royal_raceway/staff_ghost.inc.c diff --git a/courses/sherbet_land/course_data.inc.c b/courses/sherbet_land/course_data.c similarity index 99% rename from courses/sherbet_land/course_data.inc.c rename to courses/sherbet_land/course_data.c index a04c06bdf..264e19aae 100644 --- a/courses/sherbet_land/course_data.inc.c +++ b/courses/sherbet_land/course_data.c @@ -7,7 +7,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_sherbet_land_dl_0[] = { diff --git a/courses/sherbet_land/course_data.inc.h b/courses/sherbet_land/course_data.h similarity index 100% rename from courses/sherbet_land/course_data.inc.h rename to courses/sherbet_land/course_data.h diff --git a/courses/sherbet_land/course_displaylists.inc.c b/courses/sherbet_land/course_displaylists.inc.c index 2c1b0f0aa..6e7416e68 100644 --- a/courses/sherbet_land/course_displaylists.inc.c +++ b/courses/sherbet_land/course_displaylists.inc.c @@ -4,8 +4,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_sherbet_land_packed_dl_0[] = { diff --git a/courses/sherbet_land/course_offsets.inc.c b/courses/sherbet_land/course_offsets.c similarity index 99% rename from courses/sherbet_land/course_offsets.inc.c rename to courses/sherbet_land/course_offsets.c index 30af625fd..a55981bdf 100644 --- a/courses/sherbet_land/course_offsets.inc.c +++ b/courses/sherbet_land/course_offsets.c @@ -1,6 +1,6 @@ #include #include "course_offsets.h" -#include "courses/sherbet_land/course_data.inc.h" +#include "course_data.h" extern u8 gTexture643B3C[]; extern u8 gTexture66D024[]; diff --git a/courses/skyscraper/course_data.inc.c b/courses/skyscraper/course_data.c similarity index 97% rename from courses/skyscraper/course_data.inc.c rename to courses/skyscraper/course_data.c index b3c8592fb..03c5e996e 100644 --- a/courses/skyscraper/course_data.inc.c +++ b/courses/skyscraper/course_data.c @@ -3,7 +3,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_skyscraper_dl[] = { gsDPSetCombineMode(G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA), diff --git a/courses/skyscraper/course_data.inc.h b/courses/skyscraper/course_data.h similarity index 100% rename from courses/skyscraper/course_data.inc.h rename to courses/skyscraper/course_data.h diff --git a/courses/skyscraper/course_displaylists.inc.c b/courses/skyscraper/course_displaylists.inc.c index 109d93d32..0294b58f2 100644 --- a/courses/skyscraper/course_displaylists.inc.c +++ b/courses/skyscraper/course_displaylists.inc.c @@ -4,8 +4,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_skyscraper_packed_dl_0[] = { diff --git a/courses/skyscraper/course_offsets.inc.c b/courses/skyscraper/course_offsets.c similarity index 100% rename from courses/skyscraper/course_offsets.inc.c rename to courses/skyscraper/course_offsets.c diff --git a/courses/staff_ghosts.inc.c b/courses/staff_ghost_data.c similarity index 74% rename from courses/staff_ghosts.inc.c rename to courses/staff_ghost_data.c index a7f7e4907..47691c058 100644 --- a/courses/staff_ghosts.inc.c +++ b/courses/staff_ghost_data.c @@ -9,15 +9,15 @@ */ StaffGhost d_mario_raceway_staff_ghost[] = { - #include "courses/mario_raceway/staff_ghost.incl.c" + #include "courses/mario_raceway/staff_ghost.inc.c" }; StaffGhost d_luigi_raceway_staff_ghost[1046] = { - #include "courses/luigi_raceway/staff_ghost.incl.c" + #include "courses/luigi_raceway/staff_ghost.inc.c" }; StaffGhost d_royal_raceway_staff_ghost[] = { - #include "courses/royal_raceway/staff_ghost.incl.c" + #include "courses/royal_raceway/staff_ghost.inc.c" }; // Unknown data. Perhaps colour or lights diff --git a/courses/toads_turnpike/course_data.inc.c b/courses/toads_turnpike/course_data.c similarity index 99% rename from courses/toads_turnpike/course_data.inc.c rename to courses/toads_turnpike/course_data.c index 8ac66bca6..709ddf1ac 100644 --- a/courses/toads_turnpike/course_data.inc.c +++ b/courses/toads_turnpike/course_data.c @@ -6,7 +6,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_toads_turnpike_dl_0[] = { diff --git a/courses/toads_turnpike/course_data.inc.h b/courses/toads_turnpike/course_data.h similarity index 100% rename from courses/toads_turnpike/course_data.inc.h rename to courses/toads_turnpike/course_data.h diff --git a/courses/toads_turnpike/course_displaylists.inc.c b/courses/toads_turnpike/course_displaylists.inc.c index 22f07ce38..9c6705620 100644 --- a/courses/toads_turnpike/course_displaylists.inc.c +++ b/courses/toads_turnpike/course_displaylists.inc.c @@ -3,8 +3,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_toads_turnpike_packed_dl_0[] = { diff --git a/courses/toads_turnpike/course_offsets.inc.c b/courses/toads_turnpike/course_offsets.c similarity index 99% rename from courses/toads_turnpike/course_offsets.inc.c rename to courses/toads_turnpike/course_offsets.c index 816edc27d..d8136403f 100644 --- a/courses/toads_turnpike/course_offsets.inc.c +++ b/courses/toads_turnpike/course_offsets.c @@ -2,7 +2,7 @@ #include #include "common_textures.h" #include "course_offsets.h" -#include "courses/toads_turnpike/course_data.inc.h" +#include "course_data.h" extern u8 gTexture645134[]; extern u8 gTexture64FE68[]; diff --git a/courses/wario_stadium/course_data.inc.c b/courses/wario_stadium/course_data.c similarity index 99% rename from courses/wario_stadium/course_data.inc.c rename to courses/wario_stadium/course_data.c index 33d3e8e17..2854cfdad 100644 --- a/courses/wario_stadium/course_data.inc.c +++ b/courses/wario_stadium/course_data.c @@ -6,7 +6,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_wario_stadium_dl_0[] = { diff --git a/courses/wario_stadium/course_data.inc.h b/courses/wario_stadium/course_data.h similarity index 100% rename from courses/wario_stadium/course_data.inc.h rename to courses/wario_stadium/course_data.h diff --git a/courses/wario_stadium/course_displaylists.inc.c b/courses/wario_stadium/course_displaylists.inc.c index 47ab2f306..1b0b71ab9 100644 --- a/courses/wario_stadium/course_displaylists.inc.c +++ b/courses/wario_stadium/course_displaylists.inc.c @@ -4,8 +4,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_wario_stadium_packed_dl_0[] = { diff --git a/courses/wario_stadium/course_offsets.inc.c b/courses/wario_stadium/course_offsets.c similarity index 99% rename from courses/wario_stadium/course_offsets.inc.c rename to courses/wario_stadium/course_offsets.c index a911d4bf6..ec01ebe9f 100644 --- a/courses/wario_stadium/course_offsets.inc.c +++ b/courses/wario_stadium/course_offsets.c @@ -1,6 +1,6 @@ #include #include "course_offsets.h" -#include "courses/wario_stadium/course_data.inc.h" +#include "course_data.h" extern u8 gTexture67F15C[]; extern u8 gTexture67F450[]; diff --git a/courses/yoshi_valley/course_data.inc.c b/courses/yoshi_valley/course_data.c similarity index 99% rename from courses/yoshi_valley/course_data.inc.c rename to courses/yoshi_valley/course_data.c index f0cbeaaa9..ddac83046 100644 --- a/courses/yoshi_valley/course_data.inc.c +++ b/courses/yoshi_valley/course_data.c @@ -7,7 +7,7 @@ #include #include -#include +#include "course_displaylists.inc.h" Gfx d_course_yoshi_valley_dl_0[] = { diff --git a/courses/yoshi_valley/course_data.inc.h b/courses/yoshi_valley/course_data.h similarity index 100% rename from courses/yoshi_valley/course_data.inc.h rename to courses/yoshi_valley/course_data.h diff --git a/courses/yoshi_valley/course_displaylists.inc.c b/courses/yoshi_valley/course_displaylists.inc.c index 29c7b953a..c1efa0f59 100644 --- a/courses/yoshi_valley/course_displaylists.inc.c +++ b/courses/yoshi_valley/course_displaylists.inc.c @@ -4,8 +4,8 @@ #include #include -#include -#include +#include "course_displaylists.inc.h" +#include "course_textures.linkonly.h" Gfx d_course_yoshi_valley_packed_dl_0[] = { diff --git a/courses/yoshi_valley/course_offsets.inc.c b/courses/yoshi_valley/course_offsets.c similarity index 100% rename from courses/yoshi_valley/course_offsets.inc.c rename to courses/yoshi_valley/course_offsets.c diff --git a/docs/basics/controlflow.md b/docs/basics/controlflow.md index d53d46357..1790244c8 100644 --- a/docs/basics/controlflow.md +++ b/docs/basics/controlflow.md @@ -67,7 +67,7 @@ Racing segment loads after selecting a grand prix. Note that it is always reload |---|---| |[menus](@ref menus.c)| Menu related code | |[save](@ref save.c)| Save related | -|[startup_logo](@ref data/startup_logo.inc.c)|Startup logo| +|[startup_logo](@ref data/startup_logo.c)|Startup logo| ## Players Player related code resides in @@ -100,16 +100,16 @@ Course related code resides in |---|---| |[memory](@ref memory.c)| Loads and extracts course data| |[render_courses](@ref render_courses.c)|Renders course content| -|[common_textures](@ref common_textures.inc.c)|Content accessible to every course such as items and portraits| +|[common_textures](@ref common_textures.c)|Content accessible to every course such as items and portraits| ### Course Folder [course folder link][@ref courses] |file|desc| |---|---| -|courses/course_name/course_data.inc.c|Course data| +|courses/course_name/course_data.c|Course data| |courses/course_name/course_vertices.inc.c|Course vertices (this + _displaylists.inc.c makes the course geography)| |courses/course_name/course_displaylists.inc.c|Course displaylists (these get compressed during compile)| -|courses/course_name/course_offsets.inc.c|Textures used in the course| +|courses/course_name/course_offsets.c|Textures used in the course| ## UI & Other 2D Screen data |file|desc| @@ -134,5 +134,5 @@ Math related code resides in |---|---| |[ceremony_and_credits](@ref ceremony_and_credits.c)|Camera rails for podium ceremony and credits| |[podium_ceremony_actors](@ref podium_ceremony_actors.c)|Fireworks and balloons for podium ceremony| -|[ceremony_data](@ref ceremony_data.inc.c)|Trophies and podium models. Paths.| +|[ceremony_data](@ref ceremony_data.c)|Trophies and podium models. Paths.| |[credits](@ref credits.c)|Credits text and UI positions| diff --git a/include/PR/gbi.h b/include/PR/gbi.h index 6680268e8..a1b8eb0c0 100644 --- a/include/PR/gbi.h +++ b/include/PR/gbi.h @@ -2169,7 +2169,7 @@ typedef union { // Early revision of quadrangle command uses G_QUAD instead of G_TRI2. // It does not have a flag argument, this was added for compatibility. -// MK64: Appears to only be used in startup_logo.inc.c +// MK64: Appears to only be used in startup_logo.c #ifdef F3D_OLD /*** *** 1 Quadrangle diff --git a/include/actor_types.h b/include/actor_types.h index 1579a5300..050d96132 100644 --- a/include/actor_types.h +++ b/include/actor_types.h @@ -72,7 +72,7 @@ enum ActorType { ACTOR_BLUE_SPINY_SHELL, ACTOR_HOT_AIR_BALLOON_ITEM_BOX, ACTOR_CAR, - ACTOR_KIWANO_FRUIT, + ACTOR_KIWANO_FRUIT }; #define ACTOR_LIST_SIZE 100 @@ -91,7 +91,7 @@ enum ShellState { TRIPLE_RED_SHELL, // Loses triple shell state when shot. DESTROYED_SHELL, // Collision with the shell. BLUE_SHELL_LOCK_ON, // A blue shell has found a target and is hastily approaching it. - BLUE_SHELL_TARGET_ELIMINATED, // Mission completed, well done boss. + BLUE_SHELL_TARGET_ELIMINATED // Mission completed, well done boss. }; // Actor banana->state @@ -101,7 +101,7 @@ enum BananaState { FIRST_BANANA_BUNCH_BANANA, // The first banana of the banana bunch BANANA_BUNCH_BANANA, // Every banana of the banana bunch except the first one. BANANA_ON_GROUND, // A banana sitting on the ground. - DESTROYED_BANANA, // Collision with the banana. + DESTROYED_BANANA // Collision with the banana. }; // Actor fakeItemBox->state diff --git a/mk64.ld b/mk64.ld index 49aacb1d4..8c2cef0bd 100644 --- a/mk64.ld +++ b/mk64.ld @@ -213,7 +213,7 @@ SECTIONS BUILD_DIR/src/camera.o(.data); BUILD_DIR/src/render_player.o(.data); BUILD_DIR/src/kart_dma.o(.data); - BUILD_DIR/src/data/kart_attributes.inc.o(.data); + BUILD_DIR/src/data/kart_attributes.o(.data); BUILD_DIR/src/player_controller.o(.data); BUILD_DIR/src/spawn_players.o(.data); BUILD_DIR/src/update_objects.o(.data); @@ -368,7 +368,7 @@ SECTIONS BUILD_DIR/src/racing/actors.o(.data*); BUILD_DIR/src/racing/skybox_and_splitscreen.o(.data); BUILD_DIR/src/racing/memory.o(.data*); - BUILD_DIR/courses/courseTable.inc.o(.data); + BUILD_DIR/courses/courseTable.o(.data); BUILD_DIR/src/racing/actors_extended.o(.data); BUILD_DIR/src/racing/math_util.o(.data*); BUILD_DIR/src/racing/race_logic.o(.rodata*); @@ -415,7 +415,7 @@ SECTIONS BUILD_DIR/src/ending/ceremony_and_credits.o(.text); BUILD_DIR/src/ending/podium_ceremony_actors.o(.data); BUILD_DIR/src/ending/code_80281780.o(.data); - BUILD_DIR/src/ending/dl_unk_80284EE0.inc.o(.data); + BUILD_DIR/src/ending/dl_unk_80284EE0.o(.data); BUILD_DIR/src/ending/credits.jp.o(.data); BUILD_DIR/src/ending/ceremony_and_credits.o(.data); BUILD_DIR/src/ending/podium_ceremony_actors.o(.rodata); @@ -437,8 +437,8 @@ SECTIONS /* texture tables and DLs, set as segment 0x02 */ BEGIN_SEG(data_segment2, 0x02000000) { - BUILD_DIR/src/data/textures.inc.o(.data); - BUILD_DIR/src/data/data_segment2.inc.o(.data); + BUILD_DIR/src/data/textures.o(.data); + BUILD_DIR/src/data/data_segment2.o(.data); } END_SEG(data_segment2) @@ -446,7 +446,7 @@ SECTIONS /* common textures, decompressed and set as segment 0x0D */ BEGIN_SEG(common_textures, 0x0D000000) { - BUILD_DIR/src/data/common_textures.inc.mio0.o(.data); + BUILD_DIR/src/data/common_textures.mio0.o(.data); . = ALIGN(0x10); } END_SEG(common_textures) @@ -463,7 +463,7 @@ SECTIONS BUILD_DIR/data/karts/toad_kart.o(.data); BUILD_DIR/data/karts/donkeykong_kart.o(.data); BUILD_DIR/data/karts/bowser_kart.o(.data); - BUILD_DIR/courses/staff_ghosts.inc.o(.data); + BUILD_DIR/courses/staff_ghost_data.o(.data); } END_SEG(kart_textures) @@ -504,14 +504,14 @@ SECTIONS 0x828400 -> 0x8028DE30 (0xD0) */ BEGIN_SEG(ceremonyData, 0x0B000000) { - BUILD_DIR/src/ending/ceremony_data.inc.mio0.o(.data); + BUILD_DIR/src/ending/ceremony_data.mio0.o(.data); . = ALIGN(0x10); } END_SEG(ceremonyData) BEGIN_SEG(startupLogo, 0x06000000) { - BUILD_DIR/src/data/startup_logo.inc.mio0.o(.data); + BUILD_DIR/src/data/startup_logo.mio0.o(.data); . = ALIGN(0x10); } END_SEG(startupLogo) @@ -522,7 +522,7 @@ SECTIONS #define COURSE_DATA_SEG(dir, name) \ BEGIN_SEG(name##_mio0, 0x06000000) \ { \ - BUILD_DIR/courses/dir/course_data.inc.mio0.o(.data); \ + BUILD_DIR/courses/dir/course_data.mio0.o(.data); \ . = ALIGN(0x10); \ } \ END_SEG(name##_mio0) @@ -551,7 +551,7 @@ SECTIONS #define COURSE_OFFSETS_SEG(dir, name) \ BEGIN_SEG(name, 0x09000000) \ { \ - BUILD_DIR/courses/dir/course_offsets.inc.o(.data); \ + BUILD_DIR/courses/dir/course_offsets.o(.data); \ . = ALIGN(0x10); \ } \ END_SEG(name) @@ -582,7 +582,7 @@ SECTIONS #define COURSE_VERT_SEG(dir, name) \ BEGIN_SEG(name, 0x0F000000) \ { \ - BUILD_DIR/courses/dir/course_geography.inc.mio0.o(.data); \ + BUILD_DIR/courses/dir/course_geography.mio0.o(.data); \ . = ALIGN(0x10); \ } \ END_SEG(name) diff --git a/src/code_80091750.c b/src/code_80091750.c index 2f7956a33..371041813 100644 --- a/src/code_80091750.c +++ b/src/code_80091750.c @@ -26,7 +26,7 @@ #include "save_data.h" #include "podium_ceremony_actors.h" #include "skybox_and_splitscreen.h" -#include "src/data/startup_logo.inc.h" +#include "src/data/startup_logo.h" #include "buffers.h" #include "racing/race_logic.h" #include "ending/code_80281C40.h" diff --git a/src/data/common_textures.inc.c b/src/data/common_textures.c similarity index 99% rename from src/data/common_textures.inc.c rename to src/data/common_textures.c index 086af810e..b67c00d4a 100644 --- a/src/data/common_textures.inc.c +++ b/src/data/common_textures.c @@ -3012,7 +3012,7 @@ u8 common_tlut_lakitu_countdown[][512] = { /** * @todo Generate tlut based on the actual texture. - * The textures these tluts are for are not in common_textures.inc.c + * The textures these tluts are for are not in common_textures.c * This applies to common_tlut_lakitu_checkered_flag, common_tlut_lakitu_second_lap, * common_tlut_lakitu_final_lap, common_tlut_lakitu_reverse, common_tlut_lakitu_fishing * Appears to be animation textures. diff --git a/src/data/data_segment2.inc.c b/src/data/data_segment2.c similarity index 99% rename from src/data/data_segment2.inc.c rename to src/data/data_segment2.c index 7ce08d6e1..f87108293 100644 --- a/src/data/data_segment2.inc.c +++ b/src/data/data_segment2.c @@ -3,7 +3,7 @@ #include #include #include "data_segment2.h" -#include "src/data/startup_logo.inc.h" +#include "src/data/startup_logo.h" Gfx D_02007650[] = { gsDPPipeSync(), diff --git a/src/data/kart_attributes.inc.c b/src/data/kart_attributes.c similarity index 100% rename from src/data/kart_attributes.inc.c rename to src/data/kart_attributes.c diff --git a/src/data/path_spawn_data.c b/src/data/path_spawn_data.c index 01f070243..8f9f1be68 100644 --- a/src/data/path_spawn_data.c +++ b/src/data/path_spawn_data.c @@ -1,6 +1,6 @@ #include "data/path_spawn_data.h" #include "courses/all_course_data.h" -#include "ending/ceremony_data.inc.h" +#include "ending/ceremony_data.h" UnkCommonTextureStruct0 *D_800DC720[] = { D_0D008F28, D_0D008F80, D_0D008FB8, D_0D009058, diff --git a/src/data/startup_logo.inc.c b/src/data/startup_logo.c similarity index 100% rename from src/data/startup_logo.inc.c rename to src/data/startup_logo.c diff --git a/src/data/startup_logo.inc.h b/src/data/startup_logo.h similarity index 100% rename from src/data/startup_logo.inc.h rename to src/data/startup_logo.h diff --git a/src/data/textures.inc.c b/src/data/textures.c similarity index 99% rename from src/data/textures.inc.c rename to src/data/textures.c index 2d59c2186..e6c059452 100644 --- a/src/data/textures.inc.c +++ b/src/data/textures.c @@ -1,5 +1,5 @@ /** - * @file textures.inc.c + * @file textures.c * @brief Texture data. * start in ram 0x801978D0 * look like link to code_80091750 diff --git a/src/ending/ceremony_data.inc.c b/src/ending/ceremony_data.c similarity index 99% rename from src/ending/ceremony_data.inc.c rename to src/ending/ceremony_data.c index 2fac983a7..fb7bdbf80 100644 --- a/src/ending/ceremony_data.inc.c +++ b/src/ending/ceremony_data.c @@ -1,4 +1,4 @@ -#include "src/ending/ceremony_data.inc.h" +#include "src/ending/ceremony_data.h" Vtx silver_trophy_model[] = { diff --git a/src/ending/ceremony_data.inc.h b/src/ending/ceremony_data.h similarity index 100% rename from src/ending/ceremony_data.inc.h rename to src/ending/ceremony_data.h diff --git a/src/ending/dl_unk_80284EE0.inc.c b/src/ending/dl_unk_80284EE0.c similarity index 100% rename from src/ending/dl_unk_80284EE0.inc.c rename to src/ending/dl_unk_80284EE0.c diff --git a/src/update_objects.c b/src/update_objects.c index decde7c65..a5c0d5bb0 100644 --- a/src/update_objects.c +++ b/src/update_objects.c @@ -28,7 +28,7 @@ #include "code_80091750.h" #include "podium_ceremony_actors.h" #include "courses/all_course_data.h" -#include "src/ending/ceremony_data.inc.h" +#include "src/ending/ceremony_data.h" #include "src/ending/ceremony_and_credits.h" #include "menus.h" #include "data/other_textures.h" diff --git a/tools/linkonly_generator.py b/tools/linkonly_generator.py index f0534d064..16ef21e6d 100644 --- a/tools/linkonly_generator.py +++ b/tools/linkonly_generator.py @@ -312,14 +312,14 @@ texture_map = { # Usage: linkonly_generator.py course_name = sys.argv[1] -# This depends on the texture lists in each courses//course_offsets.inc.c +# This depends on the texture lists in each courses//course_offsets.c # look like: `{gTexture6447C4, 0x0106, 0x0800, 0x0},` texture_regex = re.compile(r"{(\S+),\s+\S+,\s+(\S+),\s+\S+}") h_string = "" c_string = "" -with open(f"courses/{course_name}/course_offsets.inc.c", "r") as offsets: +with open(f"courses/{course_name}/course_offsets.c", "r") as offsets: h_string += "#ifndef COURSE_TEXTURES_H" h_string += "\n#define COURSE_TEXTURES_H" @@ -331,7 +331,7 @@ with open(f"courses/{course_name}/course_offsets.inc.c", "r") as offsets: # Something wrong has occurred if not textures: - print(f"Failed to find any texture entries in courses/{course_name}/course_offsets.inc.c") + print(f"Failed to find any texture entries in courses/{course_name}/course_offsets.c") exit(1) current_offset = 0 From 705fb6d91579ca6661869ff14a58f7b4145c4104 Mon Sep 17 00:00:00 2001 From: Matthew <25674682+spazzylemons@users.noreply.github.com> Date: Wed, 3 Apr 2024 13:25:07 -0400 Subject: [PATCH 09/10] Match func_8009A374 (#592) * Match func_8009A374 * Clean up func_8009A478 --- .../code_80091750/func_8009A374.s | 73 ------------- src/code_80091750.c | 103 +++++++++--------- 2 files changed, 50 insertions(+), 126 deletions(-) delete mode 100644 asm/non_matchings/code_80091750/func_8009A374.s diff --git a/asm/non_matchings/code_80091750/func_8009A374.s b/asm/non_matchings/code_80091750/func_8009A374.s deleted file mode 100644 index eed400d06..000000000 --- a/asm/non_matchings/code_80091750/func_8009A374.s +++ /dev/null @@ -1,73 +0,0 @@ -glabel func_8009A374 -/* 09AF74 8009A374 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 09AF78 8009A378 AFBF0014 */ sw $ra, 0x14($sp) -/* 09AF7C 8009A37C 0C026455 */ jal segmented_to_virtual_dupe_2 -/* 09AF80 8009A380 00000000 */ nop -/* 09AF84 8009A384 3C048019 */ lui $a0, %hi(D_8018DEE0) # $a0, 0x8019 -/* 09AF88 8009A388 2484DEE0 */ addiu $a0, %lo(D_8018DEE0) # addiu $a0, $a0, -0x2120 -/* 09AF8C 8009A38C 8C8E000C */ lw $t6, 0xc($a0) -/* 09AF90 8009A390 00403025 */ move $a2, $v0 -/* 09AF94 8009A394 00002825 */ move $a1, $zero -/* 09AF98 8009A398 11C0000C */ beqz $t6, .L8009A3CC -/* 09AF9C 8009A39C 2419FFFF */ li $t9, -1 -/* 09AFA0 8009A3A0 3C038019 */ lui $v1, %hi(D_8018DEE0) # $v1, 0x8019 -/* 09AFA4 8009A3A4 2463DEE0 */ addiu $v1, %lo(D_8018DEE0) # addiu $v1, $v1, -0x2120 -/* 09AFA8 8009A3A8 24A50001 */ addiu $a1, $a1, 1 -.L8009A3AC: -/* 09AFAC 8009A3AC 28A10010 */ slti $at, $a1, 0x10 -/* 09AFB0 8009A3B0 14200003 */ bnez $at, .L8009A3C0 -/* 09AFB4 8009A3B4 24630018 */ addiu $v1, $v1, 0x18 -.L8009A3B8: -/* 09AFB8 8009A3B8 1000FFFF */ b .L8009A3B8 -/* 09AFBC 8009A3BC 00000000 */ nop -.L8009A3C0: -/* 09AFC0 8009A3C0 8C6F000C */ lw $t7, 0xc($v1) -/* 09AFC4 8009A3C4 55E0FFF9 */ bnel $t7, $zero, .L8009A3AC -/* 09AFC8 8009A3C8 24A50001 */ addiu $a1, $a1, 1 -.L8009A3CC: -/* 09AFCC 8009A3CC 0005C080 */ sll $t8, $a1, 2 -/* 09AFD0 8009A3D0 0305C023 */ subu $t8, $t8, $a1 -/* 09AFD4 8009A3D4 0018C0C0 */ sll $t8, $t8, 3 -/* 09AFD8 8009A3D8 00981821 */ addu $v1, $a0, $t8 -/* 09AFDC 8009A3DC 3C088000 */ lui $t0, 0x8000 -/* 09AFE0 8009A3E0 AC620000 */ sw $v0, ($v1) -/* 09AFE4 8009A3E4 AC790004 */ sw $t9, 4($v1) -/* 09AFE8 8009A3E8 AC600008 */ sw $zero, 8($v1) -/* 09AFEC 8009A3EC AC68000C */ sw $t0, 0xc($v1) -/* 09AFF0 8009A3F0 3C098019 */ lui $t1, %hi(gNumD_8018E118Entries) # $t1, 0x8019 -/* 09AFF4 8009A3F4 8D29E758 */ lw $t1, %lo(gNumD_8018E118Entries)($t1) -/* 09AFF8 8009A3F8 AC690010 */ sw $t1, 0x10($v1) -/* 09AFFC 8009A3FC 8C4A0000 */ lw $t2, ($v0) -/* 09B000 8009A400 5140000A */ beql $t2, $zero, .L8009A42C -/* 09B004 8009A404 8CC40008 */ lw $a0, 8($a2) -/* 09B008 8009A408 8CC40000 */ lw $a0, ($a2) -/* 09B00C 8009A40C AFA60028 */ sw $a2, 0x28($sp) -/* 09B010 8009A410 AFA50024 */ sw $a1, 0x24($sp) -/* 09B014 8009A414 0C0265A7 */ jal func_8009969C -/* 09B018 8009A418 AFA3001C */ sw $v1, 0x1c($sp) -/* 09B01C 8009A41C 8FA3001C */ lw $v1, 0x1c($sp) -/* 09B020 8009A420 8FA50024 */ lw $a1, 0x24($sp) -/* 09B024 8009A424 8FA60028 */ lw $a2, 0x28($sp) -/* 09B028 8009A428 8CC40008 */ lw $a0, 8($a2) -.L8009A42C: -/* 09B02C 8009A42C 50800008 */ beql $a0, $zero, .L8009A450 -/* 09B030 8009A430 8CC40000 */ lw $a0, ($a2) -/* 09B034 8009A434 AFA3001C */ sw $v1, 0x1c($sp) -/* 09B038 8009A438 0C0265A7 */ jal func_8009969C -/* 09B03C 8009A43C AFA50024 */ sw $a1, 0x24($sp) -/* 09B040 8009A440 8FA3001C */ lw $v1, 0x1c($sp) -/* 09B044 8009A444 10000007 */ b .L8009A464 -/* 09B048 8009A448 8FA50024 */ lw $a1, 0x24($sp) -/* 09B04C 8009A44C 8CC40000 */ lw $a0, ($a2) -.L8009A450: -/* 09B050 8009A450 AFA50024 */ sw $a1, 0x24($sp) -/* 09B054 8009A454 0C0265A7 */ jal func_8009969C -/* 09B058 8009A458 AFA3001C */ sw $v1, 0x1c($sp) -/* 09B05C 8009A45C 8FA3001C */ lw $v1, 0x1c($sp) -/* 09B060 8009A460 8FA50024 */ lw $a1, 0x24($sp) -.L8009A464: -/* 09B064 8009A464 8FBF0014 */ lw $ra, 0x14($sp) -/* 09B068 8009A468 AC600014 */ sw $zero, 0x14($v1) -/* 09B06C 8009A46C 27BD0028 */ addiu $sp, $sp, 0x28 -/* 09B070 8009A470 03E00008 */ jr $ra -/* 09B074 8009A474 00A01025 */ move $v0, $a1 diff --git a/src/code_80091750.c b/src/code_80091750.c index 371041813..9a149cf49 100644 --- a/src/code_80091750.c +++ b/src/code_80091750.c @@ -4647,73 +4647,70 @@ void func_8009A344(void) { } } -#ifdef NON_MATCHING -// https://decomp.me/scratch/BRs75 -// Too much stuff on the stack, but removing the padding -// causes some stack offsets to be wrong :/ -s32 func_8009A374(MkAnimation *arg0) { - s32 stackPadding0; - MkAnimation *temp_v0; - s32 var_a1; - struct_8018DEE0_entry *temp_v1; +s32 func_8009A374(MkAnimation *anim) { + s32 i; + struct_8018DEE0_entry *entry; - temp_v0 = segmented_to_virtual_dupe_2(arg0); - var_a1 = 0; - while (D_8018DEE0[var_a1].visible != 0) { - var_a1++; - if (var_a1 >= 0x10) { - while(TRUE); + anim = segmented_to_virtual_dupe_2(anim); + i = 0; + while (D_8018DEE0[i].visible) { + i++; + if (i >= 0x10) { + // No more space. + while (1); } } - temp_v1 = &D_8018DEE0[var_a1]; - temp_v1->textureSequence = temp_v0; - temp_v1->sequenceIndex = -1; - temp_v1->frameCountDown = 0; - temp_v1->visible = 0x80000000; - temp_v1->D_8018E118_index = gNumD_8018E118Entries; - if (temp_v0->mk64Texture != NULL) { - func_8009969C(temp_v0->mk64Texture); + + entry = &D_8018DEE0[i]; + entry->textureSequence = anim; + entry->sequenceIndex = -1; + entry->frameCountDown = 0; + entry->visible = 0x80000000; + entry->D_8018E118_index = gNumD_8018E118Entries; + + if (anim[0].mk64Texture) { + func_8009969C(anim[0].mk64Texture); } - if ((temp_v0 + 1)->mk64Texture != NULL) { - func_8009969C((temp_v0 + 1)->mk64Texture); + if (anim[1].mk64Texture) { + func_8009969C(anim[1].mk64Texture); } else { - func_8009969C(temp_v0->mk64Texture); + func_8009969C(anim[0].mk64Texture); } - temp_v1->unk14 = 0; - return var_a1; + + entry->unk14 = 0; + return i; } -#else -GLOBAL_ASM("asm/non_matchings/code_80091750/func_8009A374.s") -#endif -s32 func_8009A478(MkAnimation *arg0, s32 arg1) { - s32 var_a1; - MkAnimation *temp_v0; +s32 func_8009A478(MkAnimation* anim, s32 arg1) { + s32 i; + struct_8018DEE0_entry* entry; - temp_v0 = segmented_to_virtual_dupe_2(arg0); - var_a1 = 0; - while (D_8018DEE0[var_a1].visible != 0) { - var_a1++; - if (var_a1 >= 0x10) { - while(TRUE); + anim = segmented_to_virtual_dupe_2(anim); + i = 0; + while (D_8018DEE0[i].visible) { + i++; + if (i >= 0x10) { + // No more space. + while(1); } } - D_8018DEE0[var_a1].textureSequence = temp_v0; - D_8018DEE0[var_a1].sequenceIndex = -1; - D_8018DEE0[var_a1].frameCountDown = 0; - D_8018DEE0[var_a1].visible = 0x80000000; - D_8018DEE0[var_a1].D_8018E118_index = gNumD_8018E118Entries; - if (temp_v0->mk64Texture != NULL) { - func_80099958(temp_v0->mk64Texture, arg1, 0); + + entry = &D_8018DEE0[i]; + entry->textureSequence = anim; + entry->sequenceIndex = -1; + entry->frameCountDown = 0; + entry->visible = 0x80000000; + entry->D_8018E118_index = gNumD_8018E118Entries; + if (anim[0].mk64Texture) { + func_80099958(anim[0].mk64Texture, arg1, 0); } - if ((temp_v0 + 1)->mk64Texture != NULL) { - func_80099958((temp_v0 + 1)->mk64Texture, arg1, 1); + if (anim[1].mk64Texture) { + func_80099958(anim[1].mk64Texture, arg1, 1); } else { - func_80099958(temp_v0->mk64Texture, arg1, 1); + func_80099958(anim[0].mk64Texture, arg1, 1); } - // ????????????????????? - D_8018DEE0[var_a1].unk14 = (temp_v0->mk64Texture != ((void *) 0)) * 0; - return var_a1; + entry->unk14 = 0; + return i; } void func_8009A594(s32 arg0, s32 arg1, MkAnimation *arg2) { From 12f332614ed9ee8b684d4b0fdae91e5ef14568ff Mon Sep 17 00:00:00 2001 From: coco875 <59367621+coco875@users.noreply.github.com> Date: Wed, 3 Apr 2024 20:44:44 +0200 Subject: [PATCH 10/10] move actors code in actors folder and rename thing related to actor (#584) * Move actors into their folders * Renamings and documentation --- .../code_80005FD0/func_80009B60.s | 16 +- courses/mario_raceway/course_data.c | 16 +- courses/mario_raceway/course_data.h | 6 +- enhancements/flycam.patch | 2 +- include/actor_types.h | 42 +- include/defines.h | 2 + src/actors/banana/render.inc.c | 52 + src/actors/banana/update.inc.c | 186 + src/actors/blue_and_red_shells/render.inc.c | 26 + src/actors/blue_and_red_shells/update.inc.c | 467 +++ src/actors/box_truck/render.inc.c | 54 + src/actors/car/render.inc.c | 44 + src/actors/cow/render.inc.c | 41 + src/actors/fake_item_box/render.inc.c | 148 + src/actors/fake_item_box/update.inc.c | 92 + src/actors/falling_rock/render.inc.c | 47 + .../update.inc.c} | 21 +- src/actors/green_shell/render.inc.c | 16 + src/actors/green_shell/update.inc.c | 193 ++ src/actors/item_box/render.inc.c | 158 + src/actors/item_box/update.inc.c | 68 + src/actors/kiwano_fruit/render.inc.c | 32 + src/actors/kiwano_fruit/update.inc.c | 89 + src/actors/mario_sign/render.inc.c | 29 + src/actors/mario_sign/update.inc.c | 20 + src/actors/paddle_boat/render.inc.c | 14 +- src/actors/paddle_boat/update.inc.c | 4 +- src/actors/palm_tree/render.inc.c | 60 + src/actors/piranha_plant/render.inc.c | 117 + src/actors/piranha_plant/update.inc.c | 52 + src/actors/railroad_crossing/render.inc.c | 38 + src/actors/railroad_crossing/update.inc.c | 24 + src/actors/school_bus/render.inc.c | 44 + src/actors/tanker_truck/render.inc.c | 43 + src/actors/train.inc.c | 19 - src/actors/train/render.inc.c | 324 ++ src/actors/train/update.inc.c | 38 + src/actors/trees/render.inc.c | 329 ++ src/actors/wario_sign/render.inc.c | 27 + src/actors/wario_sign/update.inc.c | 11 + src/actors/yoshi_egg/render.inc.c | 59 + src/actors/yoshi_egg/update.inc.c | 26 + src/code_800029B0.c | 24 +- src/code_800029B0.h | 13 +- src/code_80005FD0.c | 52 +- src/code_80005FD0.h | 10 +- src/code_80057C60.c | 2 +- src/effects.c | 56 +- src/effects.h | 6 +- src/ending/code_80280000.c | 14 +- src/ending/code_80281780.c | 12 +- src/main.c | 8 +- src/player_controller.c | 22 +- src/racing/actors.c | 3065 ++++------------- src/racing/actors.h | 102 +- src/racing/actors_extended.c | 852 +---- src/racing/actors_extended.h | 10 +- src/racing/collision.c | 188 +- src/racing/collision.h | 3 + src/racing/render_courses.c | 45 +- src/racing/skybox_and_splitscreen.c | 18 +- src/render_player.c | 8 +- src/update_objects.c | 2 +- tools/doxygen_syms.md | 534 +-- 64 files changed, 4330 insertions(+), 3812 deletions(-) create mode 100644 src/actors/banana/render.inc.c create mode 100644 src/actors/banana/update.inc.c create mode 100644 src/actors/blue_and_red_shells/render.inc.c create mode 100644 src/actors/blue_and_red_shells/update.inc.c create mode 100644 src/actors/box_truck/render.inc.c create mode 100644 src/actors/car/render.inc.c create mode 100644 src/actors/cow/render.inc.c create mode 100644 src/actors/fake_item_box/render.inc.c create mode 100644 src/actors/fake_item_box/update.inc.c create mode 100644 src/actors/falling_rock/render.inc.c rename src/actors/{falling_rocks.inc.c => falling_rock/update.inc.c} (90%) create mode 100644 src/actors/green_shell/render.inc.c create mode 100644 src/actors/green_shell/update.inc.c create mode 100644 src/actors/item_box/render.inc.c create mode 100644 src/actors/item_box/update.inc.c create mode 100644 src/actors/kiwano_fruit/render.inc.c create mode 100644 src/actors/kiwano_fruit/update.inc.c create mode 100644 src/actors/mario_sign/render.inc.c create mode 100644 src/actors/mario_sign/update.inc.c create mode 100644 src/actors/palm_tree/render.inc.c create mode 100644 src/actors/piranha_plant/render.inc.c create mode 100644 src/actors/piranha_plant/update.inc.c create mode 100644 src/actors/railroad_crossing/render.inc.c create mode 100644 src/actors/railroad_crossing/update.inc.c create mode 100644 src/actors/school_bus/render.inc.c create mode 100644 src/actors/tanker_truck/render.inc.c delete mode 100644 src/actors/train.inc.c create mode 100644 src/actors/train/render.inc.c create mode 100644 src/actors/train/update.inc.c create mode 100644 src/actors/trees/render.inc.c create mode 100644 src/actors/wario_sign/render.inc.c create mode 100644 src/actors/wario_sign/update.inc.c create mode 100644 src/actors/yoshi_egg/render.inc.c create mode 100644 src/actors/yoshi_egg/update.inc.c diff --git a/asm/non_matchings/code_80005FD0/func_80009B60.s b/asm/non_matchings/code_80005FD0/func_80009B60.s index 33b3c51e1..582a97b69 100644 --- a/asm/non_matchings/code_80005FD0/func_80009B60.s +++ b/asm/non_matchings/code_80005FD0/func_80009B60.s @@ -90,18 +90,18 @@ glabel func_80009B60 .L80009C58: /* 00A858 80009C58 00D81021 */ addu $v0, $a2, $t8 /* 00A85C 80009C5C A4400000 */ sh $zero, ($v0) -/* 00A860 80009C60 3C198016 */ lui $t9, %hi(D_8015F6EA) # $t9, 0x8016 -/* 00A864 80009C64 8739F6EA */ lh $t9, %lo(D_8015F6EA)($t9) +/* 00A860 80009C60 3C198016 */ lui $t9, %hi(gCourseMinX) # $t9, 0x8016 +/* 00A864 80009C64 8739F6EA */ lh $t9, %lo(gCourseMinX)($t9) /* 00A868 80009C68 C4600014 */ lwc1 $f0, 0x14($v1) /* 00A86C 80009C6C 240A0001 */ li $t2, 1 /* 00A870 80009C70 44994000 */ mtc1 $t9, $f8 -/* 00A874 80009C74 3C0B8016 */ lui $t3, %hi(D_8015F6E8) # $t3, 0x8016 +/* 00A874 80009C74 3C0B8016 */ lui $t3, %hi(gCourseMaxX) # $t3, 0x8016 /* 00A878 80009C78 240C0002 */ li $t4, 2 /* 00A87C 80009C7C 468042A0 */ cvt.s.w $f10, $f8 -/* 00A880 80009C80 3C0D8016 */ lui $t5, %hi(D_8015F6F2) # $t5, 0x8016 +/* 00A880 80009C80 3C0D8016 */ lui $t5, %hi(gCourseMinZ) # $t5, 0x8016 /* 00A884 80009C84 240E0003 */ li $t6, 3 /* 00A888 80009C88 24180004 */ li $t8, 4 -/* 00A88C 80009C8C 3C0F8016 */ lui $t7, %hi(D_8015F6F0) # $t7, 0x8016 +/* 00A88C 80009C8C 3C0F8016 */ lui $t7, %hi(gCourseMaxZ) # $t7, 0x8016 /* 00A890 80009C90 460A003C */ c.lt.s $f0, $f10 /* 00A894 80009C94 00000000 */ nop /* 00A898 80009C98 45000003 */ bc1f .L80009CA8 @@ -109,7 +109,7 @@ glabel func_80009B60 /* 00A8A0 80009CA0 A44A0000 */ sh $t2, ($v0) /* 00A8A4 80009CA4 C4600014 */ lwc1 $f0, 0x14($v1) .L80009CA8: -/* 00A8A8 80009CA8 856BF6E8 */ lh $t3, %lo(D_8015F6E8)($t3) +/* 00A8A8 80009CA8 856BF6E8 */ lh $t3, %lo(gCourseMaxX)($t3) /* 00A8AC 80009CAC 448B8000 */ mtc1 $t3, $f16 /* 00A8B0 80009CB0 00000000 */ nop /* 00A8B4 80009CB4 468084A0 */ cvt.s.w $f18, $f16 @@ -119,7 +119,7 @@ glabel func_80009B60 /* 00A8C4 80009CC4 00000000 */ nop /* 00A8C8 80009CC8 A44C0000 */ sh $t4, ($v0) .L80009CCC: -/* 00A8CC 80009CCC 85ADF6F2 */ lh $t5, %lo(D_8015F6F2)($t5) +/* 00A8CC 80009CCC 85ADF6F2 */ lh $t5, %lo(gCourseMinZ)($t5) /* 00A8D0 80009CD0 C460001C */ lwc1 $f0, 0x1c($v1) /* 00A8D4 80009CD4 448D2000 */ mtc1 $t5, $f4 /* 00A8D8 80009CD8 00000000 */ nop @@ -131,7 +131,7 @@ glabel func_80009B60 /* 00A8F0 80009CF0 A44E0000 */ sh $t6, ($v0) /* 00A8F4 80009CF4 C460001C */ lwc1 $f0, 0x1c($v1) .L80009CF8: -/* 00A8F8 80009CF8 85EFF6F0 */ lh $t7, %lo(D_8015F6F0)($t7) +/* 00A8F8 80009CF8 85EFF6F0 */ lh $t7, %lo(gCourseMaxZ)($t7) /* 00A8FC 80009CFC 448F4000 */ mtc1 $t7, $f8 /* 00A900 80009D00 00000000 */ nop /* 00A904 80009D04 468042A0 */ cvt.s.w $f10, $f8 diff --git a/courses/mario_raceway/course_data.c b/courses/mario_raceway/course_data.c index 1fa2cccc0..1e4901a6e 100644 --- a/courses/mario_raceway/course_data.c +++ b/courses/mario_raceway/course_data.c @@ -3654,7 +3654,7 @@ Gfx d_course_mario_raceway_dl_tree[] = }; // 0x6B08 -Vtx d_course_mario_raceway_sign_model[] = { +Vtx d_course_mario_sign_model[] = { {{{ 5, 0, 0 }, 0, { 0, 0 }, {0x00, 0x00, 0xFC, 0xFF }}}, {{{ 5, 24, 0 }, 0, { 0, 0 }, {0x2D, 0x2D, 0xFF, 0xFF }}}, {{{ 0, 28, 5 }, 0, { 0, 0 }, {0x2D, 0x2D, 0xFF, 0xFF }}}, @@ -3762,12 +3762,12 @@ Vtx d_course_mario_raceway_06007008[] ={ }; // 0x7068 -u8 d_course_mario_raceway_sign_left[] = { +u8 d_course_mario_sign_left[] = { #include "assets/courses/mario_raceway/gTextureMarioRacewaySignLeft.inc.c" }; // 8284D0_08068 -u8 d_course_mario_raceway_sign_right[] = { +u8 d_course_mario_sign_right[] = { #include "assets/courses/mario_raceway/gTextureMarioRacewaySignRight.inc.c" }; @@ -3776,7 +3776,7 @@ Gfx d_course_mario_raceway_dl_9068[] = gsDPPipeSync(), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), gsSPTexture(0x0001, 0x0001, 0, G_TX_RENDERTILE, G_OFF), - gsSPVertex(d_course_mario_raceway_sign_model, 8, 0), + gsSPVertex(d_course_mario_sign_model, 8, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(4, 5, 1, 0, 4, 1, 0, 0), gsSP2Triangles(3, 2, 6, 0, 3, 6, 7, 0), @@ -3829,7 +3829,7 @@ Gfx d_course_mario_raceway_dl_9190[] = gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 6, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(G_TX_RENDERTILE, 0, 0, 0x007C, 0x00FC), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, d_course_mario_raceway_sign_left), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, d_course_mario_sign_left), gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, 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), gsDPLoadSync(), @@ -3837,7 +3837,7 @@ Gfx d_course_mario_raceway_dl_9190[] = gsSPVertex(d_course_mario_raceway_06006EE8, 6, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(1, 4, 5, 0, 1, 5, 2, 0), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, d_course_mario_raceway_sign_right), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, d_course_mario_sign_right), gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, 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), gsDPLoadSync(), @@ -3857,7 +3857,7 @@ Gfx d_course_mario_raceway_dl_9250[] = gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 6, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTileSize(G_TX_RENDERTILE, 0, 0, 0x007C, 0x00FC), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, d_course_mario_raceway_sign_left), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, d_course_mario_sign_left), gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, 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), gsDPLoadSync(), @@ -3865,7 +3865,7 @@ Gfx d_course_mario_raceway_dl_9250[] = gsSPVertex(d_course_mario_raceway_06006FA8, 6, 0), gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0), gsSP2Triangles(3, 4, 5, 0, 3, 5, 0, 0), - gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, d_course_mario_raceway_sign_right), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, d_course_mario_sign_right), gsDPTileSync(), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, 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), gsDPLoadSync(), diff --git a/courses/mario_raceway/course_data.h b/courses/mario_raceway/course_data.h index c7fc5866c..bdc5a137d 100644 --- a/courses/mario_raceway/course_data.h +++ b/courses/mario_raceway/course_data.h @@ -83,15 +83,15 @@ extern Vtx d_course_mario_raceway_piranha_plant_model[]; extern Gfx d_course_mario_raceway_dl_piranha_plant[]; extern Vtx d_course_mario_raceway_tree_model[]; extern Gfx d_course_mario_raceway_dl_tree[]; -extern Vtx d_course_mario_raceway_sign_model[]; +extern Vtx d_course_mario_sign_model[]; extern Vtx d_course_mario_raceway_06006B88[]; extern Vtx d_course_mario_raceway_06006D68[]; extern Vtx d_course_mario_raceway_06006EE8[]; extern Vtx d_course_mario_raceway_06006F48[]; extern Vtx d_course_mario_raceway_06006FA8[]; extern Vtx d_course_mario_raceway_06007008[]; -extern u8 d_course_mario_raceway_sign_left[]; -extern u8 d_course_mario_raceway_sign_right[]; +extern u8 d_course_mario_sign_left[]; +extern u8 d_course_mario_sign_right[]; extern Gfx d_course_mario_raceway_dl_9068[]; extern Gfx d_course_mario_raceway_dl_90B0[]; extern Gfx d_course_mario_raceway_dl_90C0[]; diff --git a/enhancements/flycam.patch b/enhancements/flycam.patch index 1e8b7ef4a..2567ca19e 100644 --- a/enhancements/flycam.patch +++ b/enhancements/flycam.patch @@ -421,7 +421,7 @@ index 7c90951..135e98c 100644 gCourseTimer += 0.01666666; // 1 / 60 @@ -585,7 +586,6 @@ void race_logic_loop(void) { func_802909F0(); - evaluate_player_collision(); + evaluate_collision_for_players_and_actors(); func_800382DC(); - func_8001EE98(gPlayerOneCopy, camera1, 0); func_80028F70(); diff --git a/include/actor_types.h b/include/actor_types.h index 050d96132..3c3d88745 100644 --- a/include/actor_types.h +++ b/include/actor_types.h @@ -36,16 +36,18 @@ * exactly what you're doing. */ enum ActorType { - ACTOR_TREE_MARIO_RACEWAY = 0x02, + ACTOR_UNKNOWN_0x01 = 0x01, + ACTOR_TREE_MARIO_RACEWAY, ACTOR_TREE_YOSHI_VALLEY, ACTOR_TREE_ROYAL_RACEWAY, ACTOR_FALLING_ROCK, ACTOR_BANANA, ACTOR_GREEN_SHELL, ACTOR_RED_SHELL, - ACTOR_YOSHI_VALLEY_EGG, + ACTOR_YOSHI_EGG, ACTOR_PIRANHA_PLANT, - ACTOR_ITEM_BOX = 0x0C, + ACTOR_UNKNOWN_0x0B, + ACTOR_ITEM_BOX, ACTOR_FAKE_ITEM_BOX, ACTOR_BANANA_BUNCH, ACTOR_TRAIN_ENGINE, @@ -53,18 +55,24 @@ enum ActorType { ACTOR_TRAIN_PASSENGER_CAR, ACTOR_COW, ACTOR_TREE_MOO_MOO_FARM, - ACTOR_TRIPLE_GREEN_SHELL = 0x15, + ACTOR_UNKNOWN_0x14, + ACTOR_TRIPLE_GREEN_SHELL, ACTOR_TRIPLE_RED_SHELL, ACTOR_MARIO_SIGN, - ACTOR_PALM_TREE = 0x19, - ACTOR_TREE_BOWSERS_CASTLE = 0x1C, + ACTOR_UNKNOWN_0x18, + ACTOR_PALM_TREE, + ACTOR_UNKNOWN_0x1A, + ACTOR_UNKNOWN_0x1B, + ACTOR_TREE_BOWSERS_CASTLE, ACTOR_TREE_FRAPPE_SNOWLAND, ACTOR_CACTUS1_KALAMARI_DESERT, ACTOR_CACTUS2_KALAMARI_DESERT, ACTOR_CACTUS3_KALAMARI_DESERT, ACTOR_BUSH_BOWSERS_CASTLE, - ACTOR_WARIO_SIGN = 0x23, - ACTOR_BOX_TRUCK = 0x25, + ACTOR_UNKNOWN_0x21, + ACTOR_WARIO_SIGN, + ACTOR_UNKNOWN_0x23, + ACTOR_BOX_TRUCK, ACTOR_PADDLE_BOAT, ACTOR_RAILROAD_CROSSING, ACTOR_SCHOOL_BUS, @@ -91,7 +99,7 @@ enum ShellState { TRIPLE_RED_SHELL, // Loses triple shell state when shot. DESTROYED_SHELL, // Collision with the shell. BLUE_SHELL_LOCK_ON, // A blue shell has found a target and is hastily approaching it. - BLUE_SHELL_TARGET_ELIMINATED // Mission completed, well done boss. + BLUE_SHELL_TARGET_ELIMINATED // Mission completed, well done boss. }; // Actor banana->state @@ -101,7 +109,7 @@ enum BananaState { FIRST_BANANA_BUNCH_BANANA, // The first banana of the banana bunch BANANA_BUNCH_BANANA, // Every banana of the banana bunch except the first one. BANANA_ON_GROUND, // A banana sitting on the ground. - DESTROYED_BANANA // Collision with the banana. + DESTROYED_BANANA // Collision with the banana. }; // Actor fakeItemBox->state @@ -183,7 +191,7 @@ struct ActorSpawnData { }; }; -// Required for func_80298AC0 due to diff size. +// Required for evaluate_collision_player_palm_trees due to diff size. // members unverified. data located at d_course_dks_jungle_parkway_tree_spawn /** * There are nearly 100 trees in DK Jungle Parkway. If they were put into the actor list proper @@ -261,17 +269,17 @@ struct PiranhaPlant { /* 0x30 */ Collision unk30; }; // size = 0x70 -// Copied from PiranhaPlant, may not be accurate. struct PalmTree { /* 0x00 */ s16 type; /* 0x02 */ s16 flags; - /* 0x04 */ Vec4s visibilityStates; // A per-camera visibilty state tracker + /* 0x04 */ s16 variant; // four different types of palm trees + /* 0x06 */ s16 state; + /* 0x08 */ f32 unk_08; /* 0x0C */ f32 boundingBoxSize; - /* 0x10 */ Vec3s unk10; - /* 0x16 */ s16 unk16; + /* 0x10 */ Vec3s rot; + /* 0x16 */ s16 unk_16; /* 0x18 */ Vec3f pos; - /* 0x24 */ Vec4s timers; // A per-camera timer. Might be more appropriate to call this state - /* 0x2C */ f32 unk_02C; + /* 0x24 */ Vec3f velocity; /* 0x30 */ Collision unk30; }; // size = 0x70 diff --git a/include/defines.h b/include/defines.h index 1ca7e63b9..f84fd92ad 100644 --- a/include/defines.h +++ b/include/defines.h @@ -325,6 +325,7 @@ typedef enum { * @brief sound effect of player's * for soundEffect */ +#define HIT_SOUND_EFFECT 0x100 // hitting an object #define BOOST_SOUND_EFFECT 0x200 // being boosted by trigger a mushroom #define BOO_SOUND_EFFECT 0x800 // being a boo #define STAR_SOUND_EFFECT 0x2000 // being a star @@ -344,6 +345,7 @@ typedef enum { #define BOOST_EFFECT 0x2000 // being boosted by trigger a mushroom #define BOOST_RAMP_ASPHALT_EFFECT 0x100000 // being boosted by a boost pad #define HIT_BY_ITEM_EFFECT 0x2000000 // being hit by an item +#define HIT_EFFECT 0x4000000 // hitting an object #define LIGHTNING_EFFECT 0x40000000 // being hit by lightning #define BOO_EFFECT 0x80000000 // being a boo diff --git a/src/actors/banana/render.inc.c b/src/actors/banana/render.inc.c new file mode 100644 index 000000000..e148cb767 --- /dev/null +++ b/src/actors/banana/render.inc.c @@ -0,0 +1,52 @@ +#include +#include +#include + +/** + * @brief Render the banana actor + * + * @param camera + * @param arg1 + * @param banana + */ +void render_actor_banana(Camera *camera, UNUSED Mat4 arg1, struct BananaActor *banana) { + UNUSED s32 pad[2]; + s32 maxObjectsReached; + Vec3s sp7C; + Mat4 sp3C; + + f32 temp = is_within_render_distance(camera->pos, banana->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 490000.0f); + if (temp < 0.0f) { + actor_not_rendered(camera, (struct Actor *) banana); + return; + } + + if ((banana->pos[1] > gCourseMaxY + 800.0f)) { + actor_not_rendered(camera, (struct Actor *) banana); + return; + } + if (banana->pos[1] < (gCourseMinY - 800.0f)) { + actor_not_rendered(camera, (struct Actor *) banana); + return; + } + + actor_rendered(camera, (struct Actor *) banana); + + if (banana->state == 5) { + mtxf_pos_rotation_xyz(sp3C, banana->pos, banana->rot); + } else { + sp7C[0] = 0; + sp7C[1] = 0; + sp7C[2] = 0; + mtxf_pos_rotation_xyz(sp3C, banana->pos, sp7C); + } + + maxObjectsReached = render_set_position(sp3C, 0) == 0; + if (maxObjectsReached) { return; } + + if (banana->state != 5) { + gSPDisplayList(gDisplayListHead++, &common_model_banana); + } else { + gSPDisplayList(gDisplayListHead++, &common_model_flat_banana); + } +} diff --git a/src/actors/banana/update.inc.c b/src/actors/banana/update.inc.c new file mode 100644 index 000000000..4367d8ea4 --- /dev/null +++ b/src/actors/banana/update.inc.c @@ -0,0 +1,186 @@ +#include +#include +#include +#include + +/** + * @brief Update the banana actor + * + * @param banana + */ +void update_actor_banana(struct BananaActor *banana) { + UNUSED f32 pad; + Player *player; + struct BananaActor *elderBanana; + struct Controller *controller; + Vec3f someOtherVelocity; + Vec3f someVelocity; + f32 temp_f0; + UNUSED f32 var_f8; + UNUSED f32 pad2; + UNUSED f32 pad3; + UNUSED f32 pad4[2]; + f32 temp_f12; + f32 temp_f2; + f32 temp_f14; + f32 temp_f16; + f32 unkX; + f32 unkY; + f32 unkZ; + + player = &gPlayers[banana->rot[0]]; + switch (banana->state) { + case HELD_BANANA: + temp_f2 = player->pos[0] - banana->pos[0]; + temp_f14 = player->pos[1] - banana->pos[1]; + temp_f16 = player->pos[2] - banana->pos[2]; + temp_f12 = sqrtf((temp_f2 * temp_f2) + (temp_f14 * temp_f14) + (temp_f16 * temp_f16)) / 10.0f; + if (temp_f12 == 0.0f) { + banana->pos[0] = player->pos[0] + 0.2f; + banana->pos[1] = player->pos[1] + 0.2f; + banana->pos[2] = player->pos[2] + 0.2f; + } else { + temp_f2 /= temp_f12; + temp_f14 /= temp_f12; + temp_f16 /= temp_f12; + banana->pos[0] = player->pos[0] - temp_f2; + banana->pos[1] = player->pos[1] - temp_f14 - 2.0f; + banana->pos[2] = player->pos[2] - temp_f16; + } + func_802ADDC8(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]); + func_802B4E30((struct Actor *) banana); + if ((player->type & PLAYER_HUMAN) != 0) { + if (gDemoMode) { + controller = gControllerOne; + } else { + controller = &gControllers[banana->rot[0]]; + } + if ((controller->buttonDepressed & Z_TRIG) != 0) { + controller->buttonDepressed &= ~Z_TRIG; + banana->state = 1; + banana->unk_04 = 0x00B4; + player->soundEffects &= ~HOLD_BANANA_SOUND_EFFECT; + func_800C9060(player - gPlayerOne, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x12)); + pad3 = controller->rawStickY; + if ((pad3 > 30.0f) && (controller->rawStickX < 10) && (controller->rawStickX >= -9)) { + pad3 = pad3 - ((f32) 30); + pad3 = (pad3 / 20.0f) + 0.5f; + if (player->unk_094 < 2.0f) { + temp_f0 = 4.0f; + } else { + temp_f0 = (player->unk_094 * 0.75f) + 3.5f + pad3; + } + vec3f_set(someVelocity, 0, pad3, temp_f0); + func_802B64C4(someVelocity, player->rotation[1] + player->unk_0C0); + banana->velocity[0] = someVelocity[0]; + banana->velocity[1] = someVelocity[1]; + banana->velocity[2] = someVelocity[2]; + } else { + banana->velocity[0] = 0; + banana->velocity[1] = 1.5f; + banana->velocity[2] = 0; + } + } + } + break; + case DROPPED_BANANA: + if (banana->unk_04 != 0) { + banana->unk_04 -= 1; + if (banana->unk_04 == 0) { + banana->flags &= ~0x1000; + } + } + banana->pos[0] += banana->velocity[0]; + banana->pos[2] += banana->velocity[2]; + if (banana->velocity[1] > -1.0f) { + banana->velocity[1] -= 0.15f; + } + banana->pos[1] += banana->velocity[1]; + if ((banana->pos[2] < (f32) gCourseMinZ) || ((f32) gCourseMaxZ < banana->pos[2]) || (banana->pos[0] < (f32) gCourseMinX) || ((f32) gCourseMaxX < banana->pos[0]) || (banana->pos[1] < (f32) gCourseMinY)) { + destroy_destructable_actor((struct Actor *) banana); + } else { + func_802ADDC8(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]); + banana->unk30.unk34 = 1; + if ((banana->unk30.unk34 != 0) && (banana->unk30.unk3C[2] < 0.0f)) { + someOtherVelocity[0] = -banana->unk30.orientationVector[0]; + someOtherVelocity[1] = -banana->unk30.orientationVector[1]; + someOtherVelocity[2] = -banana->unk30.orientationVector[2]; + banana->pos[0] += someOtherVelocity[0] * banana->unk30.unk3C[2]; + banana->pos[1] += someOtherVelocity[1] * banana->unk30.unk3C[2]; + banana->pos[2] += someOtherVelocity[2] * banana->unk30.unk3C[2]; + banana->flags &= ~0x1000; + banana->state = 4; + } + } + break; + case FIRST_BANANA_BUNCH_BANANA: + someVelocity[0] = 0.0f; + someVelocity[1] = 0.0f; + someVelocity[2] = -5.0f; + func_802B64C4(someVelocity, player->rotation[1] + player->unk_0C0); + unkX = player->pos[0] + someVelocity[0]; + unkY = player->pos[1] + someVelocity[1]; + unkZ = player->pos[2] + someVelocity[2]; + temp_f2 = unkX - banana->pos[0]; + temp_f14 = unkY - banana->pos[1]; + temp_f16 = unkZ - banana->pos[2]; + temp_f0 = sqrtf((temp_f2 * temp_f2) + (temp_f14 * temp_f14) + (temp_f16 * temp_f16)); + if (temp_f0 == 0.0f) { + banana->pos[0] = player->pos[0] + 0.2f; + banana->pos[1] = player->pos[1] + 0.2f; + banana->pos[2] = player->pos[2] + 0.2f; + } else { + temp_f2 /= temp_f0; + temp_f14 /= temp_f0; + temp_f16 /= temp_f0; + banana->pos[0] = someVelocity[0] + (unkX - temp_f2); + banana->pos[1] = unkY - temp_f14 - 2.0f; + banana->pos[2] = unkZ - temp_f16; + } + func_802ADDC8(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]); + func_802B4E30((struct Actor *) banana); + break; + case BANANA_BUNCH_BANANA: + elderBanana = (struct BananaActor*)&gActorList[banana->elderIndex]; + temp_f2 = elderBanana->pos[0] - banana->pos[0]; + temp_f14 = elderBanana->pos[1] - banana->pos[1]; + temp_f16 = elderBanana->pos[2] - banana->pos[2]; + temp_f12 = sqrtf((temp_f2 * temp_f2) + (temp_f14 * temp_f14) + (temp_f16 * temp_f16)) / 5.0f; + if (temp_f12 == 0.0f) { + banana->pos[0] = elderBanana->pos[0] + 0.2f; + banana->pos[1] = elderBanana->pos[1] + 0.2f; + banana->pos[2] = elderBanana->pos[2] + 0.2f; + } else { + temp_f2 /= temp_f12; + temp_f14 /= temp_f12; + temp_f16 /= temp_f12; + banana->pos[0] = elderBanana->pos[0] - temp_f2; + banana->pos[1] = elderBanana->pos[1] - temp_f14 - 2.0f; + banana->pos[2] = elderBanana->pos[2] - temp_f16; + } + var_f8 = banana->pos[2]; + func_802ADDC8(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]); + func_802B4E30((struct Actor *) banana); + break; + case DESTROYED_BANANA: + banana->velocity[1] -= 0.3f; + if (banana->velocity[1] < -5.0f) { + banana->velocity[1] = -5.0f; + } + banana->pos[1] += banana->velocity[1]; + banana->rot[0] += 0x16C; + banana->rot[1] -= 0x5B0; + banana->rot[2] += 0x38E; + banana->unk_04 -= 1; + if (banana->unk_04 == 0) { + destroy_actor((struct Actor *) banana); + } + break; + case BANANA_ON_GROUND: + banana->flags |= 0xC000; + banana->flags &= ~0x1000; + break; + default: + break; + } +} \ No newline at end of file diff --git a/src/actors/blue_and_red_shells/render.inc.c b/src/actors/blue_and_red_shells/render.inc.c new file mode 100644 index 000000000..42bf7ca82 --- /dev/null +++ b/src/actors/blue_and_red_shells/render.inc.c @@ -0,0 +1,26 @@ +#include +#include + +/** + * @brief Render the red shell actor + * + * @param camera + * @param matrix + * @param shell + */ +void render_actor_red_shell(Camera *camera, Mat4 matrix, struct ShellActor *shell) { + gDPLoadTLUT_pal256(gDisplayListHead++, &gTLUTRedShell); // set texture + render_actor_shell(camera, matrix, shell); +} + +/** + * @brief Render the blue shell actor + * + * @param camera + * @param matrix + * @param shell + */ +void render_actor_blue_shell(Camera *camera, Mat4 matrix, struct ShellActor *shell) { + gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_blue_shell); // set texture + render_actor_shell(camera, matrix, shell); +} diff --git a/src/actors/blue_and_red_shells/update.inc.c b/src/actors/blue_and_red_shells/update.inc.c new file mode 100644 index 000000000..493019132 --- /dev/null +++ b/src/actors/blue_and_red_shells/update.inc.c @@ -0,0 +1,467 @@ +#include +#include +#include +#include +#include +#include + +void func_802B3B44(struct ShellActor *shell) { + u16 currentWaypoint; + u16 nextWaypoint; + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f0_3; + f32 temp_f12_3; + f32 temp_f14_2; + f32 temp_f16_2; + f32 temp_f2; + f32 temp_f12; + f32 temp_f28; + f32 temp_f20; + f32 temp_f22; + f32 temp_f24; + f32 temp_f12_0; + f32 temp_f12_1; + f32 temp_f12_2; + f32 temp_f18_3; + f32 temp_f16_3; + f32 temp_f26; + Vec3f origPos; + + currentWaypoint = shell->pathIndex; + temp_f2 = D_80164490[currentWaypoint].posX; + temp_f12 = D_80164490[currentWaypoint].posY; + temp_f28 = D_80164490[currentWaypoint].posZ; + nextWaypoint = currentWaypoint + 1; + + if (nextWaypoint >= D_80164430) { + nextWaypoint -= D_80164430; + } + + temp_f20 = temp_f2 - shell->pos[0]; + temp_f22 = temp_f12 - shell->pos[1]; + temp_f24 = temp_f28 - shell->pos[2]; + temp_f0 = (temp_f20 * temp_f20) + (temp_f22 * temp_f22) + (temp_f24 * temp_f24); + if (temp_f0 > 400.0f) { + temp_f18_3 = D_80164490[nextWaypoint].posX; + temp_f16_3 = D_80164490[nextWaypoint].posY; + temp_f26 = D_80164490[nextWaypoint].posZ; + + temp_f12_0 = temp_f18_3 - shell->pos[0]; + temp_f12_1 = temp_f16_3 - shell->pos[1]; + temp_f12_2 = temp_f26 - shell->pos[2]; + + temp_f0_3 = (temp_f12_0 * temp_f12_0) + (temp_f12_1 * temp_f12_1) + (temp_f12_2 * temp_f12_2); + if (temp_f0_3 < temp_f0) { + shell->pathIndex = nextWaypoint; + } else { + temp_f0_2 = sqrtf(temp_f0) * 4.0f; + temp_f20 /= temp_f0_2; + temp_f22 /= temp_f0_2; + temp_f24 /= temp_f0_2; + + temp_f12_3 = shell->velocity[0]; + temp_f14_2 = shell->velocity[1]; + temp_f16_2 = shell->velocity[2]; + + temp_f12_3 += temp_f20; + temp_f14_2 += temp_f22; + temp_f16_2 += temp_f24; + temp_f0 = sqrtf((temp_f12_3 * temp_f12_3) + (temp_f14_2 * temp_f14_2) + (temp_f16_2 * temp_f16_2)); + if (temp_f0 > 6.0f) { + temp_f0 /= 6.0f; + temp_f12_3 /= temp_f0; + temp_f14_2 /= temp_f0; + temp_f16_2 /= temp_f0; + } + shell->velocity[0] = temp_f12_3; + shell->velocity[1] = temp_f14_2; + shell->velocity[2] = temp_f16_2; + + origPos[0] = shell->pos[0]; + origPos[1] = shell->pos[1]; + origPos[2] = shell->pos[2]; + + shell->pos[0] += temp_f12_3; + shell->pos[1] += temp_f14_2; + shell->pos[2] += temp_f16_2; + func_802AD950(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], origPos[0], origPos[1], origPos[2]); + func_802B4E30((struct Actor *) shell); + } + } else { + if (temp_f0 > 5.0f) { + shell->pos[0] = temp_f2; + shell->pos[1] = shell->boundingBoxSize + temp_f12; + shell->pos[2] = temp_f28; + shell->pathIndex = nextWaypoint; + } else { + temp_f18_3 = D_80164490[nextWaypoint].posX; + temp_f16_3 = D_80164490[nextWaypoint].posY; + temp_f26 = D_80164490[nextWaypoint].posZ; + + shell->pos[0] = (temp_f2 + temp_f18_3) * 0.5f; + shell->pos[1] = ((temp_f12 + temp_f16_3) * 0.5f) + shell->boundingBoxSize; + shell->pos[2] = (temp_f28 + temp_f26) * 0.5f; + + shell->velocity[0] = (temp_f18_3 - temp_f2) * 0.5f; + shell->velocity[1] = (temp_f16_3 - temp_f12) * 0.5f; + shell->velocity[2] = (temp_f26 - temp_f28) * 0.5f; + } + } +} + +void func_802B3E7C(struct ShellActor *shell, Player *player) { + f32 x_velocity; + f32 z_velocity; + f32 xz_dist; + Vec3f newPosition; + + x_velocity = player->pos[0]; + x_velocity -= shell->pos[0]; + z_velocity = player->pos[2]; + z_velocity -= shell->pos[2]; + xz_dist = sqrtf((x_velocity * x_velocity) + (z_velocity * z_velocity)) / 8; + if (xz_dist == 0.0f) { + x_velocity = 0.0f; + z_velocity = 0.0f; + } else { + x_velocity /= xz_dist; + z_velocity /= xz_dist; + } + + newPosition[0] = shell->pos[0]; + newPosition[1] = shell->pos[1]; + newPosition[2] = shell->pos[2]; + shell->pos[0] += x_velocity; + shell->pos[1] -= 2.0f; + shell->pos[2] += z_velocity; + shell->velocity[0] = x_velocity; + shell->velocity[1] = -2.0f; + shell->velocity[2] = z_velocity; + + if (player->effects & BOO_EFFECT) { + destroy_destructable_actor((struct Actor *) shell); + } else { + func_802AD950(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], newPosition[0], newPosition[1], newPosition[2]); + func_802B4E30((struct Actor *) shell); + func_802B4104(shell); + } +} + +/** + * Only used in Battle mode + * Likely trying to find the nearest player that is not the shell's owner and is not dead +**/ +s16 func_802B3FD0(Player *owner, struct ShellActor *shell) { + Player *player; + s32 playerIndex; + f32 playerToShellDistance; + s16 playerId = -1; + f32 smallestDistance = 25000000.0f; + + for (playerIndex = 0; playerIndex < 4; playerIndex++) { + player = &gPlayers[playerIndex]; + if ((player->type & PLAYER_EXISTS) == 0) {continue;} + if (player == owner) {continue; } + if (gPlayerBalloonCount[playerIndex] < 0) { continue; } + // func_802B51E8 is not quite a 3D distance function, it doubles (rather than squares) the Z difference of the positions + playerToShellDistance = func_802B51E8(player->pos, shell->pos); + if (playerToShellDistance < smallestDistance) { + smallestDistance = playerToShellDistance; + playerId = player - gPlayerOne; + } + + } + + return playerId; +} + +void func_802B4104(struct ShellActor *shell) { + if ((shell->unk30.unk3C[0] < 0.0f) && ((shell->unk30.unk48[1] < 0.25f) || (shell->unk30.unk48[1] > -0.25f))) { + destroy_destructable_actor((struct Actor *) shell); + func_800C98B8(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x54)); + shell->flags |= 0x80; + } else if ((shell->unk30.unk3C[1] < 0.0f) && ((shell->unk30.unk54[1] < 0.25f) || (shell->unk30.unk54[1] < -0.25f))) { + destroy_destructable_actor((struct Actor *) shell); + func_800C98B8(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x54)); + shell->flags |= 0x80; + } +} + +/** + * @brief Update the red and blue shell actors + * + * @param shell + */ +void update_actor_red_blue_shell(struct ShellActor *shell) { + UNUSED f32 pad9; + Player *player; + f32 temp_f0; + UNUSED f32 temp_f14; + f32 temp_f2; + s16 temp_v0; + UNUSED s16 pad3; + Vec3f somePosVel; + struct Controller *controller; + TripleShellParent *parent; + UNUSED f32 pad0; + UNUSED f32 pad1; + UNUSED f32 pad2; + UNUSED f32 pad4; + UNUSED f32 pad5; + UNUSED f32 pad6; + UNUSED f32 pad7; + UNUSED f32 pad8; + UNUSED f32 pad10; + UNUSED f32 pad11; + UNUSED f32 pad12; + UNUSED s16 pad13; + UNUSED s16 pad13_2; + UNUSED f32 pad14; + UNUSED f32 pad15; + UNUSED f32 pad16; + UNUSED f32 pad17; + Vec3f origPos; + + pad1 = shell->pos[0]; + pad0 = shell->pos[2]; + pad2 = shell->pos[1]; + pad13 = shell->type; + if ((pad0 < (f32) gCourseMinZ) || ((f32) gCourseMaxZ < pad0) || (pad1 < (f32) gCourseMinX) || ((f32) gCourseMaxX < pad1) || (pad2 < (f32) gCourseMinY)) { + destroy_destructable_actor((struct Actor *) shell); + } + + shell->rotVelocity += 0x71C; + switch (shell->state) { + case HELD_SHELL: + player = &gPlayers[shell->playerId]; + copy_collision(&player->unk_110, &shell->unk30); + somePosVel[0] = 0.0f; + somePosVel[1] = player->boundingBoxSize; + somePosVel[2] = -(player->boundingBoxSize + shell->boundingBoxSize + 2.0f); + mtxf_translate_vec3f_mat3(somePosVel, player->orientationMatrix); + shell->pos[0] = player->pos[0] + somePosVel[0]; + pad7 = player->pos[1] - somePosVel[1]; + shell->pos[2] = player->pos[2] + somePosVel[2]; + temp_f0 = func_802ABE30(shell->pos[0], pad7, shell->pos[2], player->unk_110.unk3A); + temp_f2 = pad7 - temp_f0; + + if ((temp_f2 < 5.0f) && (temp_f2 > -5.0f)) { + shell->pos[1] = shell->boundingBoxSize + temp_f0; + } else { + shell->pos[1] = pad7; + } + + if ((player->type & PLAYER_HUMAN) != 0) { + if (gDemoMode) { + controller = gControllerOne; + } else { + controller = &gControllers[shell->playerId]; + } + } else { + controller = gControllerOne; + } + + if ((controller->buttonDepressed & Z_TRIG) != 0) { + controller->buttonDepressed &= ~Z_TRIG; + shell->state = RELEASED_SHELL; + if (player->unk_0C0 > 0) { + shell->rotAngle = 0x78E3; + } else { + shell->rotAngle = -0x78E4; + } + } + break; + case RELEASED_SHELL: + player = &gPlayers[shell->playerId]; + if (shell->rotAngle > 0) { + shell->rotAngle -= 0x71C; + if (shell->rotAngle < 0) { + shell->state = MOVING_SHELL; + func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04)); + func_800C90F4(shell->playerId, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00)); + if (pad13 == ACTOR_RED_SHELL) { + add_red_shell_in_unexpired_actor_list((struct Actor*)shell - gActorList); + } else { + add_blue_shell_in_unexpired_actor_list((struct Actor*)shell - gActorList); + func_800C9D80(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x51, 0x01, 0x80, 0x08)); + } + } + } else { + shell->rotAngle += 0x71C; + if (shell->rotAngle > 0) { + shell->state = MOVING_SHELL; + func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04)); + func_800C90F4(shell->playerId, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00)); + if (pad13 == ACTOR_RED_SHELL) { + add_red_shell_in_unexpired_actor_list((struct Actor*)shell - gActorList); + } else { + add_blue_shell_in_unexpired_actor_list((struct Actor*)shell - gActorList); + func_800C9D80(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x51, 0x01, 0x80, 0x08)); + } + } + } + if (shell->state == MOVING_SHELL) { + shell->someTimer = 0x001E; + temp_f0 = 8.0f; + if (player->unk_094 > 8.0f) { + temp_f0 = player->unk_094 * 1.2f; + } + somePosVel[0] = 0.0f; + somePosVel[1] = 0.0f; + somePosVel[2] = temp_f0; + func_802B64C4(somePosVel, (s16) (player->rotation[1] + player->unk_0C0)); + shell->velocity[0] = somePosVel[0]; + shell->velocity[1] = somePosVel[1]; + shell->velocity[2] = somePosVel[2]; + } else { + somePosVel[0] = sins(shell->rotAngle) * 8.0f; + somePosVel[1] = shell->boundingBoxSize - player->boundingBoxSize; + somePosVel[2] = coss(shell->rotAngle) * 8.0f; + mtxf_translate_vec3f_mat3(somePosVel, player->orientationMatrix); + shell->pos[0] = player->pos[0] + somePosVel[0]; + shell->pos[1] = player->pos[1] + somePosVel[1]; + shell->pos[2] = player->pos[2] + somePosVel[2]; + } + break; + case MOVING_SHELL: + player = &gPlayers[shell->playerId]; + shell->someTimer -= 1; + if (shell->someTimer == 0) { + shell->flags &= 0xEFFF; + if (shell->type == ACTOR_BLUE_SPINY_SHELL) { + shell->targetPlayer = gPlayerPositionLUT[0]; + shell->state = BLUE_SHELL_LOCK_ON; + shell->shellId = 1000.0f; + temp_v0 = gNearestWaypointByPlayerId[player - gPlayerOne] + 8; + if ((s32) D_80164430 < temp_v0) { + temp_v0 -= D_80164430; + } + shell->pathIndex = temp_v0; + } else if (gModeSelection == BATTLE) { + shell->shellId = 1000.0f; + shell->targetPlayer = func_802B3FD0(player, shell); + if (shell->targetPlayer < 0) { + shell->flags = 0x8000; + shell->velocity[1] = 3.0f; + shell->pathIndex = 0; + shell->someTimer = 0x003C; + shell->state = DESTROYED_SHELL; + } else { + shell->state = RED_SHELL_LOCK_ON; + } + } else { + if (player->currentRank == 0) { + shell->state = TRIPLE_GREEN_SHELL; + shell->someTimer = 0x0258; + temp_v0 = gNearestWaypointByPlayerId[player - gPlayerOne] + 8; + if ((s32) D_80164430 < temp_v0) { + temp_v0 -= D_80164430; + } + shell->pathIndex = temp_v0; + } else if (player->currentRank >= 5) { + shell->state = GREEN_SHELL_HIT_A_RACER; + shell->shellId = 1000.0f; + temp_v0 = gNearestWaypointByPlayerId[player - gPlayerOne] + 8; + if ((s32) D_80164430 < temp_v0) { + temp_v0 -= D_80164430; + } + shell->pathIndex = temp_v0; + shell->targetPlayer = gPlayerPositionLUT[player->currentRank - 1]; + } else { + shell->state = RED_SHELL_LOCK_ON; + shell->shellId = 1000.0f; + shell->targetPlayer = gPlayerPositionLUT[player->currentRank - 1]; + } + } + } + shell->velocity[1] -= 0.5; + if (shell->velocity[1] < -2.0f) { + shell->velocity[1] = -2.0f; + } + origPos[0] = shell->pos[0]; + origPos[1] = shell->pos[1]; + origPos[2] = shell->pos[2]; + shell->pos[0] += shell->velocity[0]; + shell->pos[1] += shell->velocity[1]; + shell->pos[2] += shell->velocity[2]; + func_802AD950(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], origPos[0], origPos[1], origPos[2]); + func_802B4E30((struct Actor *) shell); + func_802B4104(shell); + break; + case RED_SHELL_LOCK_ON: + func_802B3E7C(shell, &gPlayers[shell->targetPlayer]); + break; + case TRIPLE_GREEN_SHELL: + func_802B3B44(shell); + if (shell->someTimer == 0) { + if ((shell->flags & 0xF) == 0) { + destroy_destructable_actor((struct Actor *) shell); + } else { + shell->someTimer -= 1; + } + } + break; + case GREEN_SHELL_HIT_A_RACER: + func_802B3B44(shell); + player = &gPlayers[shell->targetPlayer]; + temp_f0 = player->pos[0]; + temp_f0 -= shell->pos[0]; + temp_f2 = player->pos[2]; + temp_f2 -= shell->pos[2]; + if (((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) < 40000.0f) { + shell->state = RED_SHELL_LOCK_ON; + } + break; + case TRIPLE_RED_SHELL: + player = &gPlayers[shell->playerId]; + parent = (TripleShellParent *) &gActorList[shell->parentIndex]; + if (parent->type != ACTOR_TRIPLE_RED_SHELL) { + destroy_destructable_actor((struct Actor *) shell); + } else { + shell->rotAngle += parent->rotVelocity; + somePosVel[0] = sins(shell->rotAngle) * 8.0f; + somePosVel[1] = shell->boundingBoxSize - player->boundingBoxSize; + somePosVel[2] = coss(shell->rotAngle) * 8.0f; + mtxf_translate_vec3f_mat3(somePosVel, player->orientationMatrix); + origPos[0] = shell->pos[0]; + origPos[1] = shell->pos[1]; + origPos[2] = shell->pos[2]; + shell->pos[0] = player->pos[0] + somePosVel[0]; + shell->pos[1] = player->pos[1] + somePosVel[1]; + shell->pos[2] = player->pos[2] + somePosVel[2]; + func_802AD950(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], origPos[0], origPos[1], origPos[2]); + func_802B4E30((struct Actor *) shell); + } + break; + case DESTROYED_SHELL: + shell->velocity[1] -= 0.3f; + if (shell->velocity[1] < -5.0f) { + shell->velocity[1] = -5.0f; + } + shell->rotAngle += 0x5B0; + shell->someTimer -= 1; + shell->pos[1] += shell->velocity[1]; + if (shell->someTimer == 0) { + destroy_actor((struct Actor *) shell); + } + break; + case BLUE_SHELL_LOCK_ON: + func_802B3B44(shell); + shell->targetPlayer = gPlayerPositionLUT[0]; + player = &gPlayers[gPlayerPositionLUT[0]]; + temp_f0 = player->pos[0]; + temp_f0 -= shell->pos[0]; + temp_f2 = player->pos[2]; + temp_f2 -= shell->pos[2]; + if (((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) < 40000.0f) { + shell->state = BLUE_SHELL_TARGET_ELIMINATED; + } + break; + case 9: + func_802B3E7C(shell, &gPlayers[shell->targetPlayer]); + break; + default: + break; + } +} \ No newline at end of file diff --git a/src/actors/box_truck/render.inc.c b/src/actors/box_truck/render.inc.c new file mode 100644 index 000000000..794dd305e --- /dev/null +++ b/src/actors/box_truck/render.inc.c @@ -0,0 +1,54 @@ +#include +#include +#include +#include +#include "courses/toads_turnpike/course_data.h" + +/** + * @brief Renders the box truck actor. + * Actor used in Toad's Turnpike. + * His update are made in vehicle. + * + * @param arg0 + * @param arg1 + */ +void render_actor_box_truck(Camera *arg0, struct Actor *arg1) { + UNUSED s32 pad[6]; + Mat4 spD8; + UNUSED s32 pad2[32]; + f32 temp_f0 = is_within_render_distance(arg0->pos, arg1->pos, arg0->rot[1], 2500.0f, gCameraZoom[arg0 - camera1], 9000000.0f); + if (temp_f0 < 0.0f) { return; } + + gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + + mtxf_pos_rotation_xyz(spD8, arg1->pos, arg1->rot); + if (render_set_position(spD8, 0) != 0) { + + switch(arg1->state) { + case 0: + gSPDisplayList(gDisplayListHead++, &d_course_toads_turnpike_dl_23858); + break; + case 1: + gSPDisplayList(gDisplayListHead++, &d_course_toads_turnpike_dl_238A0); + break; + case 2: + gSPDisplayList(gDisplayListHead++, &d_course_toads_turnpike_dl_238E8); + break; + } + + if (gActiveScreenMode == SCREEN_MODE_1P) { + if (temp_f0 < 160000.0f) { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_0); + } else if (temp_f0 < 640000.0f) { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_1); + } else { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_2); + } + } else if (temp_f0 < 160000.0f) { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_1); + } else { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_2); + } + } +} diff --git a/src/actors/car/render.inc.c b/src/actors/car/render.inc.c new file mode 100644 index 000000000..b8295ef9d --- /dev/null +++ b/src/actors/car/render.inc.c @@ -0,0 +1,44 @@ +#include +#include +#include + +/** + * @brief Renders the car actor. + * Actor used in Toad's Turnpike. + * His update are made in vehicle. + * + * @param arg0 + * @param arg1 + */ +void render_actor_car(Camera *arg0, struct Actor *arg1) { + UNUSED s32 pad[6]; + Mat4 spC8; + UNUSED s32 pad2[32]; + f32 temp_f0 = is_within_render_distance(arg0->pos,arg1->pos, arg0->rot[1], 2500.0f, gCameraZoom[arg0 - camera1], 9000000.0f); + + if (!(temp_f0 < 0.0f)) { + + gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + + + mtxf_pos_rotation_xyz(spC8, arg1->pos, arg1->rot); + mtxf_scale(spC8, 0.1f); + if (render_set_position(spC8, 0) != 0) { + + if (gActiveScreenMode == SCREEN_MODE_1P) { + if (temp_f0 < 160000.0f) { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_9); + } else if (temp_f0 < 640000.0f) { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_10); + } else { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_11); + } + } else if (temp_f0 < 160000.0f) { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_10); + } else { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_11); + } + } + } +} diff --git a/src/actors/cow/render.inc.c b/src/actors/cow/render.inc.c new file mode 100644 index 000000000..3800fbbbc --- /dev/null +++ b/src/actors/cow/render.inc.c @@ -0,0 +1,41 @@ +#include +#include +#include +#include +#include "courses/moo_moo_farm/course_data.h" + +/** + * @brief Renders the cow actor. + * Actor used in Moo Moo Farm. + * + * @param camera + * @param arg1 + * @param arg2 + */ +void render_actor_cow(Camera *camera, Mat4 arg1, struct Actor *arg2) { + if (is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f) < 0) { return; } + + arg1[3][0] = arg2->pos[0]; + arg1[3][1] = arg2->pos[1]; + arg1[3][2] = arg2->pos[2]; + + if (render_set_position(arg1, 0) != 0) { + switch (arg2->state) { + case 0: + gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_dl_cow1); + break; + case 1: + gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_dl_cow2); + break; + case 2: + gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_dl_cow3); + break; + case 3: + gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_dl_cow4); + break; + case 4: + gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_dl_cow5); + break; + } + } +} diff --git a/src/actors/fake_item_box/render.inc.c b/src/actors/fake_item_box/render.inc.c new file mode 100644 index 000000000..184521575 --- /dev/null +++ b/src/actors/fake_item_box/render.inc.c @@ -0,0 +1,148 @@ +#include +#include +#include +#include + +/** + * @brief Renders the fake item box actor. + * + * @param camera + * @param fakeItemBox + */ +void render_actor_fake_item_box(Camera *camera, struct FakeItemBox *fakeItemBox) { + Vec3s someRot; + UNUSED s32 pad[3]; + Vec3f someVec; + Mat4 someMatrix2; + Mat4 someMatrix3; + UNUSED s32 pad2[12]; + f32 temp_f0_2; + f32 temp_f0_3; + f32 temp_f12; + f32 temp_f2; + f32 thing; + f32 temp_f2_2; + f32 someMultiplier; + + if (is_within_render_distance(camera->pos, fakeItemBox->pos, camera->rot[1], 2500.0f, gCameraZoom[camera - camera1], 1000000.0f) < 0) { + actor_not_rendered(camera, (struct Actor *) fakeItemBox); + return; + } + if (((f32) gCourseMaxY + 800.0f) < fakeItemBox->pos[1]) { + actor_not_rendered(camera, (struct Actor *) fakeItemBox); + return; + } + if (fakeItemBox->pos[1] < ((f32) gCourseMinY - 800.0f)) { + actor_not_rendered(camera, (struct Actor *) fakeItemBox); + return; + } + + actor_rendered(camera, (struct Actor *) fakeItemBox); + someRot[0] = 0; + someRot[1] = fakeItemBox->rot[1]; + someRot[2] = 0; + mtxf_pos_rotation_xyz(someMatrix2, fakeItemBox->pos, someRot); + mtxf_scale(someMatrix2, fakeItemBox->sizeScaling); + if (fakeItemBox->state != 2) { + + if (!render_set_position(someMatrix2, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, common_model_fake_itembox); + mtxf_pos_rotation_xyz(someMatrix2, fakeItemBox->pos, fakeItemBox->rot); + mtxf_scale(someMatrix2, fakeItemBox->sizeScaling); + + if (!render_set_position(someMatrix2, 0)) { return; } + + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA); + if ((fakeItemBox->rot[1] < 0xAA1) && (fakeItemBox->rot[1] > 0)) { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + } else if ((fakeItemBox->rot[1] >= 0x6AA5) && (fakeItemBox->rot[1] < 0x754E)) { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + } else if ((fakeItemBox->rot[1] >= 0x38E1) && (fakeItemBox->rot[1] < 0x438A)) { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + } else if ((fakeItemBox->rot[1] >= 0xC711) && (fakeItemBox->rot[1] < 0xD1BA)) { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + } else { + gDPSetBlendMask(gDisplayListHead++, 0xFF); + gDPSetRenderMode(gDisplayListHead++, G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2); + } + gSPDisplayList(gDisplayListHead++, D_0D003090); + } else { + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); + gDPSetBlendMask(gDisplayListHead++, 0xFF); + thing = fakeItemBox->someTimer; + mtxf_pos_rotation_xyz(someMatrix2, fakeItemBox->pos, fakeItemBox->rot); + if (thing < 10.0f) { + someMultiplier = 1.0f; + } else { + someMultiplier = 1.0f - ((thing - 10.0f) * 0.1f); + } + mtxf_scale(someMatrix2, someMultiplier); + if (fakeItemBox->someTimer & 1) { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + } else { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_XLU_INTER, G_RM_NOOP2); + } + temp_f2 = 2.0f * thing; + someVec[0] = 0.0f; + someVec[1] = temp_f2; + someVec[2] = thing; + add_translate_mat4_vec3f(someMatrix2, someMatrix3, someVec); + + if (!render_set_position(someMatrix3, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, D_0D003158); + temp_f2_2 = 0.8f * thing; + temp_f12 = 0.5f * thing; + someVec[0] = temp_f2_2; + someVec[1] = 2.3f * thing; + someVec[2] = temp_f12; + add_translate_mat4_vec3f(someMatrix2, someMatrix3, someVec); + + if (!render_set_position(someMatrix3, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, D_0D0031B8); + temp_f0_2 = -0.5f * thing; + someVec[0] = temp_f2_2; + someVec[1] = 1.2f * thing; + someVec[2] = temp_f0_2; + add_translate_mat4_vec3f(someMatrix2, someMatrix3, someVec); + + if (!render_set_position(someMatrix3, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, D_0D003128); + if (!(fakeItemBox->someTimer & 1)) { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + } else { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_XLU_INTER, G_RM_NOOP2); + } + someVec[0] = 0.0f; + someVec[1] = 1.8f * thing; + someVec[2] = -1.0f * thing; + add_translate_mat4_vec3f(someMatrix2, someMatrix3, someVec); + + if (!render_set_position(someMatrix3, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, D_0D0031E8); + temp_f0_3 = -0.8f * thing; + someVec[0] = temp_f0_3; + someVec[1] = 0.6f * thing; + someVec[2] = temp_f0_2; + add_translate_mat4_vec3f(someMatrix2, someMatrix3, someVec); + + if (!render_set_position(someMatrix3, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, D_0D003188); + someVec[0] = temp_f0_3; + someVec[1] = temp_f2; + someVec[2] = temp_f12; + add_translate_mat4_vec3f(someMatrix2, someMatrix3, someVec); + + if (!render_set_position(someMatrix3, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, D_0D0030F8); + gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); + } +} \ No newline at end of file diff --git a/src/actors/fake_item_box/update.inc.c b/src/actors/fake_item_box/update.inc.c new file mode 100644 index 000000000..df6d1b5ea --- /dev/null +++ b/src/actors/fake_item_box/update.inc.c @@ -0,0 +1,92 @@ +#include +#include + +/** + * @brief Updates the fake item box actor. + * + * @param fake_item_box + */ +void update_actor_fake_item_box(struct FakeItemBox *fake_item_box) { + u32 temp_v1 = fake_item_box->playerId; + Player *temp_v0_4 = &gPlayers[temp_v1]; + struct Controller *temp_v1_3; + + UNUSED s32 pad[7]; + f32 temp_f2_2; + f32 temp_f14; + f32 temp_f16; + f32 temp_f18; + UNUSED s32 pad2[3]; + + switch(fake_item_box->state) { + case 0: + fake_item_box->boundingBoxSize = fake_item_box->sizeScaling * 5.5f; + fake_item_box->rot[0] -= 0xB6; + fake_item_box->rot[1] += 0x16C; + fake_item_box->rot[2] -= 0xB6; + + temp_f14 = temp_v0_4->pos[0] - fake_item_box->pos[0]; + temp_f16 = temp_v0_4->pos[1] - fake_item_box->pos[1]; + temp_f18 = temp_v0_4->pos[2] - fake_item_box->pos[2]; + + temp_f2_2 = sqrtf((temp_f14 * temp_f14) + (temp_f16 * temp_f16) + (temp_f18 * temp_f18)) / 10.0f; + temp_f14 /= temp_f2_2; + temp_f16 /= temp_f2_2; + temp_f18 /= temp_f2_2; + fake_item_box->pos[0] = temp_v0_4->pos[0] - temp_f14; + fake_item_box->pos[1] = (temp_v0_4->pos[1] - temp_f16) - 1.0f; + fake_item_box->pos[2] = temp_v0_4->pos[2] - temp_f18; + func_802ADDC8(&fake_item_box->unk30, fake_item_box->boundingBoxSize, fake_item_box->pos[0], fake_item_box->pos[1], fake_item_box->pos[2]); + func_802B4E30((struct Actor *)fake_item_box); + temp_v1_3 = &gControllers[temp_v1]; + if ((temp_v0_4->type & 0x4000) != 0) { + + if ((temp_v1_3->buttonDepressed & Z_TRIG) != 0) { + temp_v1_3->buttonDepressed &= 0xDFFF; + func_802A1064(fake_item_box); + temp_v0_4->soundEffects &= 0xFFFBFFFF; + func_800C9060((u8)(temp_v0_4 - gPlayerOne), SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x12)); + } + } + break; + case 1: + if (fake_item_box->sizeScaling < 1.0f) { + fake_item_box->sizeScaling += 0.05f; + } else if (fake_item_box->sizeScaling >= 1.0f) { + fake_item_box->sizeScaling = 1.0f; + } + + fake_item_box->boundingBoxSize = fake_item_box->sizeScaling * 5.5f; + if (fake_item_box->targetY <= fake_item_box->pos[1]) { + fake_item_box->pos[1] = fake_item_box->targetY; + } else { + fake_item_box->pos[1] += 0.2f; + } + if ((fake_item_box->flags & 0x1000) != 0) { + if ((fake_item_box->someTimer <= 0) || (fake_item_box->someTimer >= 0x12D)) { + fake_item_box->flags &= 0xEFFF; + fake_item_box->someTimer = 0; + } else { + fake_item_box->someTimer--; + } + } + fake_item_box->rot[0] -= 0xB6; + fake_item_box->rot[1] += 0x16C; + fake_item_box->rot[2] -= 0xB6; + break; + + case 2: + if ((fake_item_box->someTimer >= 0x14) || (fake_item_box->someTimer < 0)) { + destroy_actor((struct Actor *) fake_item_box); + } else { + fake_item_box->someTimer++; + fake_item_box->rot[0] += 0x444; + fake_item_box->rot[1] -= 0x2D8; + fake_item_box->rot[2] += 0x16C; + } + break; + default: + destroy_actor((struct Actor *) fake_item_box); + break; + } +} \ No newline at end of file diff --git a/src/actors/falling_rock/render.inc.c b/src/actors/falling_rock/render.inc.c new file mode 100644 index 000000000..70854943b --- /dev/null +++ b/src/actors/falling_rock/render.inc.c @@ -0,0 +1,47 @@ +#include +#include +#include "courses/choco_mountain/course_data.h" + +/** + * @brief Renders the falling rock actor. + * Actor used in Choco Mountain. + * + * @param camera + * @param rock + */ +void render_actor_falling_rock(Camera *camera, struct FallingRock *rock) { + Vec3s sp98; + Vec3f sp8C; + Mat4 sp4C; + f32 temp_f0; + UNUSED s32 pad[4]; + + if (rock->respawnTimer != 0) { return; } + + temp_f0 = is_within_render_distance(camera->pos, rock->pos, camera->rot[1], 400.0f, gCameraZoom[camera - camera1], 4000000.0f); + + if (temp_f0 < 0.0f) { return; } + + if (temp_f0 < 250000.0f) { + + if (rock->unk30.unk34 == 1) { + sp8C[0] = rock->pos[0]; + sp8C[2] = rock->pos[2]; + temp_f0 = func_802ABE30(sp8C[0], rock->pos[1], sp8C[2], rock->unk30.unk3A); + sp98[0] = 0; + sp98[1] = 0; + sp98[2] = 0; + sp8C[1] = temp_f0 + 2.0f; + mtxf_pos_rotation_xyz(sp4C, sp8C, sp98); + if (render_set_position(sp4C, 0) == 0) { + return; + } + gSPDisplayList(gDisplayListHead++, d_course_choco_mountain_dl_6F88); + } + } + mtxf_pos_rotation_xyz(sp4C, rock->pos, rock->rot); + if (render_set_position(sp4C, 0) == 0) { + return; + } + gSPDisplayList(gDisplayListHead++, d_course_choco_mountain_dl_falling_rock); +} diff --git a/src/actors/falling_rocks.inc.c b/src/actors/falling_rock/update.inc.c similarity index 90% rename from src/actors/falling_rocks.inc.c rename to src/actors/falling_rock/update.inc.c index 0d5985128..b10a9b26f 100644 --- a/src/actors/falling_rocks.inc.c +++ b/src/actors/falling_rock/update.inc.c @@ -1,3 +1,8 @@ +#include +#include +#include +#include "courses/choco_mountain/course_data.h" + void func_8029CF0C(struct ActorSpawnData *spawnData, struct FallingRock *rock) { s32 segment = SEGMENT_NUMBER2(spawnData); s32 offset = SEGMENT_OFFSET(spawnData); @@ -12,7 +17,13 @@ void func_8029CF0C(struct ActorSpawnData *spawnData, struct FallingRock *rock) { vec3s_set(rock->rot, 0, 0, 0); } -void place_falling_rocks(struct ActorSpawnData *spawnData) { +/** + * @brief Spawns falling rocks. + * Used in Choco Mountain. + * + * @param spawnData + */ +void spawn_falling_rocks(struct ActorSpawnData *spawnData) { s32 addr = SEGMENT_NUMBER2(spawnData); s32 offset = SEGMENT_OFFSET(spawnData); // Casting this to prevent warning does not work. @@ -29,7 +40,7 @@ void place_falling_rocks(struct ActorSpawnData *spawnData) { startingPos[2] = temp_s0->pos[2]; vec3f_set(startingVelocity, 0, 0, 0); vec3s_set(startingRot, 0, 0, 0); - temp = addActorToEmptySlot(startingPos, startingRot, startingVelocity, ACTOR_FALLING_ROCK); + temp = add_actor_to_empty_slot(startingPos, startingRot, startingVelocity, ACTOR_FALLING_ROCK); temp_v1 = (struct FallingRock *) &gActorList[temp]; temp_v1->unk_06 = temp_s0->someId; @@ -38,6 +49,12 @@ void place_falling_rocks(struct ActorSpawnData *spawnData) { } } +/** + * @brief Updates the falling rock actor. + * Actor used in Choco Mountain. + * + * @param rock + */ void update_actor_falling_rocks(struct FallingRock *rock) { Vec3f unkVec; f32 pad0; diff --git a/src/actors/green_shell/render.inc.c b/src/actors/green_shell/render.inc.c new file mode 100644 index 000000000..24cf373cf --- /dev/null +++ b/src/actors/green_shell/render.inc.c @@ -0,0 +1,16 @@ +#include +#include +#include +#include "common_textures.h" + +/** + * @brief Renders the green shell actor. + * + * @param camera + * @param matrix + * @param shell + */ +void render_actor_green_shell(Camera *camera, Mat4 matrix, struct ShellActor *shell) { + gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_green_shell); // set texture + render_actor_shell(camera, matrix, shell); +} diff --git a/src/actors/green_shell/update.inc.c b/src/actors/green_shell/update.inc.c new file mode 100644 index 000000000..9fc34ab6f --- /dev/null +++ b/src/actors/green_shell/update.inc.c @@ -0,0 +1,193 @@ +#include +#include +#include +#include +#include + +/** + * @brief Updates the green shell actor. + * + * @param shell + */ +void update_actor_green_shell(struct ShellActor *shell) { + Player *player; + UNUSED f32 pad9; + UNUSED f32 padA; + Vec3f somePos2; + Vec3f somePosVel; + f32 var_f2; + struct Controller *controller; + TripleShellParent *parent; + UNUSED f32 pad0; + UNUSED f32 pad1; + UNUSED f32 pad2; + UNUSED f32 pad3; + UNUSED f32 pad4; + UNUSED f32 pad5; + UNUSED f32 pad6; + UNUSED f32 pad7; + UNUSED f32 pad8; + + pad0 = shell->pos[0]; + pad6 = shell->pos[1]; + pad1 = shell->pos[2]; + if ((pad1 < gCourseMinZ) || (gCourseMaxZ < pad1) || (pad0 < gCourseMinX) || (gCourseMaxX < pad0) || (pad6 < gCourseMinY)) { + destroy_destructable_actor((struct Actor *) shell); + } + shell->rotVelocity += 0x71C; + switch (shell->state) { + case HELD_SHELL: + player = &gPlayers[shell->playerId]; + copy_collision(&player->unk_110, &shell->unk30); + somePosVel[0] = 0.0f; + somePosVel[1] = player->boundingBoxSize; + somePosVel[2] = -(player->boundingBoxSize + shell->boundingBoxSize + 2.0f); + mtxf_translate_vec3f_mat3(somePosVel, player->orientationMatrix); + shell->pos[0] = player->pos[0] + somePosVel[0]; + pad2 = player->pos[1] - somePosVel[1]; + shell->pos[2] = player->pos[2] + somePosVel[2]; + pad0 = func_802ABE30(shell->pos[0], pad2, shell->pos[2], player->unk_110.unk3A); + pad1 = pad2 - pad0; + if ((pad1 < 5.0f) && (pad1 > -5.0f)) { + shell->pos[1] = shell->boundingBoxSize + pad0; + } else { + shell->pos[1] = pad2; + } + if ((player->type & PLAYER_HUMAN) != 0) { + controller = &gControllers[shell->playerId]; + if ((controller->buttonDepressed & Z_TRIG) != 0) { + controller->buttonDepressed &= ~Z_TRIG; + if (controller->rawStickY < -0x2D) { + var_f2 = 8.0f; + if (player->unk_094 > 8.0f) { + var_f2 = player->unk_094 * 1.2f; + } + somePosVel[0] = 0.0f; + somePosVel[1] = 0.0f; + somePosVel[2] = -var_f2; + func_802B64C4(somePosVel, player->rotation[1] + player->unk_0C0); + shell->velocity[0] = somePosVel[0]; + shell->velocity[1] = somePosVel[1]; + shell->velocity[2] = somePosVel[2]; + shell->state = 2; + func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04)); + func_800C90F4(shell->playerId, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00)); + add_green_shell_in_unexpired_actor_list((struct Actor*)shell - gActorList); + return; + } else { + shell->state = 1; + if (player->unk_0C0 > 0) { + shell->rotAngle = 0x78E3; + } else { + shell->rotAngle = -0x78E4; + } + } + } + } + break; + case RELEASED_SHELL: + player = &gPlayers[shell->playerId]; + if (shell->rotAngle > 0) { + shell->rotAngle -= 0xE38; + if (shell->rotAngle < 0) { + shell->state = 2; + shell->someTimer = 0x001E; + func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04)); + func_800C90F4(shell->playerId, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00)); + add_green_shell_in_unexpired_actor_list((struct Actor*)shell - gActorList); + } + } else { + shell->rotAngle += 0xE38; + if (shell->rotAngle > 0) { + shell->state = 2; + shell->someTimer = 0x001E; + func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04)); + func_800C90F4(shell->playerId, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00)); + add_green_shell_in_unexpired_actor_list((struct Actor*)shell - gActorList); + } + } + if (shell->state == 2) { + var_f2 = 8.0f; + if (player->unk_094 > 8.0f) { + var_f2 = player->unk_094 * 1.2f; + } + somePosVel[0] = 0.0f; + somePosVel[1] = 0.0f; + somePosVel[2] = var_f2; + func_802B64C4(somePosVel, player->rotation[1] + player->unk_0C0); + shell->velocity[0] = somePosVel[0]; + shell->velocity[1] = somePosVel[1]; + shell->velocity[2] = somePosVel[2]; + } else { + somePosVel[0] = sins(shell->rotAngle) * 6.0f; + somePosVel[1] = shell->boundingBoxSize - player->boundingBoxSize; + somePosVel[2] = coss(shell->rotAngle) * 6.0f; + mtxf_translate_vec3f_mat3(somePosVel, player->orientationMatrix); + shell->pos[0] = player->pos[0] + somePosVel[0]; + shell->pos[1] = player->pos[1] + somePosVel[1]; + shell->pos[2] = player->pos[2] + somePosVel[2]; + } + break; + case MOVING_SHELL: + if (shell->parentIndex > 0) { + shell->parentIndex -= 1; + if (shell->parentIndex == 0) { + shell->flags &= ~0x1000; + } + } + shell->velocity[1] -= 0.5f; + if (shell->velocity[1] < -2.0f) { + shell->velocity[1] = -2.0f; + } + somePos2[0] = shell->pos[0]; + somePos2[1] = shell->pos[1]; + somePos2[2] = shell->pos[2]; + shell->pos[0] += shell->velocity[0]; + shell->pos[1] += shell->velocity[1]; + shell->pos[2] += shell->velocity[2]; + func_802AD950(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], somePos2[0], somePos2[1], somePos2[2]); + func_802B4E30((struct Actor *) shell); + if ((shell->unk30.unk3C[0] < 0.0f) || (shell->unk30.unk3C[1] < 0.0f)) { + shell_collision(&shell->unk30, shell->velocity); + func_800C98B8(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x54)); + shell->flags |= 0x80; + } + break; + case TRIPLE_GREEN_SHELL: + player = &gPlayers[shell->playerId]; + parent = (TripleShellParent *) &gActorList[shell->parentIndex]; + if (parent->type != ACTOR_TRIPLE_GREEN_SHELL) { + destroy_destructable_actor((struct Actor *) shell); + } else { + shell->rotAngle += parent->rotVelocity; + somePosVel[0] = sins(shell->rotAngle) * 8.0f; + somePosVel[1] = shell->boundingBoxSize - player->boundingBoxSize; + somePosVel[2] = coss(shell->rotAngle) * 8.0f; + mtxf_translate_vec3f_mat3(somePosVel, player->orientationMatrix); + somePos2[0] = shell->pos[0]; + somePos2[1] = shell->pos[1]; + somePos2[2] = shell->pos[2]; + shell->pos[0] = player->pos[0] + somePosVel[0]; + shell->pos[1] = player->pos[1] + somePosVel[1]; + shell->pos[2] = player->pos[2] + somePosVel[2]; + func_802AD950(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], somePos2[0], somePos2[1], somePos2[2]); + func_802B4E30((struct Actor *) shell); + } + break; + case GREEN_SHELL_HIT_A_RACER: + // Somehow, this fake match affects stack management up in case 2 + shell->velocity[1] -= (0, 0.3f); + if (shell->velocity[1] < -5.0f) { + shell->velocity[1] = -5.0f; + } + shell->rotAngle += 0x5B0; + shell->someTimer -= 1; + shell->pos[1] += shell->velocity[1]; + if (shell->someTimer == 0) { + destroy_actor((struct Actor *) shell); + } + break; + default: + break; + } +} \ No newline at end of file diff --git a/src/actors/item_box/render.inc.c b/src/actors/item_box/render.inc.c new file mode 100644 index 000000000..8ccc8bf43 --- /dev/null +++ b/src/actors/item_box/render.inc.c @@ -0,0 +1,158 @@ +#include +#include +#include + +/** + * @brief Renders the item box actor. + * + * @param camera + * @param item_box + */ +void render_actor_item_box(Camera *camera, struct ItemBox *item_box) { + UNUSED s32 pad[2]; + Vec3f someVec1; + Vec3f someVec2; + Vec3s someRot; + f32 thing; + UNUSED s32 pad2; + Mat4 someMatrix1; + Mat4 someMatrix2; + UNUSED s32 pad3[4]; + f32 temp_f0; + f32 temp_f0_2; + f32 temp_f0_3; + f32 temp_f12; + f32 temp_f2; + f32 temp_f2_2; + f32 someMultiplier; + + temp_f0 = is_within_render_distance(camera->pos, item_box->pos, camera->rot[1], 0.0f, gCameraZoom[camera - camera1], 4000000.0f); + if (!(temp_f0 < 0.0f) && !(600000.0f < temp_f0)) { + if ((item_box->state == 2) && (temp_f0 < 100000.0f)) { + someRot[0] = 0; + someRot[1] = item_box->rot[1]; + someRot[2] = 0; + someVec2[0] = item_box->pos[0]; + someVec2[1] = item_box->resetDistance + 2.0f; + someVec2[2] = item_box->pos[2]; + mtxf_pos_rotation_xyz(someMatrix1, someVec2, someRot); + + if (!render_set_position(someMatrix1, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, D_0D002EE8); + someRot[1] = item_box->rot[1] * 2; + someVec2[1] = item_box->pos[1]; + mtxf_pos_rotation_xyz(someMatrix1, someVec2, someRot); + + if (!render_set_position(someMatrix1, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, itemBoxQuestionMarkModel); + } + if (item_box->state == 5) { + mtxf_pos_rotation_xyz(someMatrix1, item_box->pos, item_box->rot); + + if (!render_set_position(someMatrix1, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, itemBoxQuestionMarkModel); + } + if (item_box->state != 3) { + mtxf_pos_rotation_xyz(someMatrix1, item_box->pos, item_box->rot); + + if (!render_set_position(someMatrix1, 0)) { return; } + + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA); + if ((item_box->rot[1] < 0xAA1) && (item_box->rot[1] > 0)) { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + } else if ((item_box->rot[1] >= 0x6AA5) && (item_box->rot[1] < 0x754E)) { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + } else if ((item_box->rot[1] >= 0x38E1) && (item_box->rot[1] < 0x438A)) { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + } else if ((item_box->rot[1] >= 0xC711) && (item_box->rot[1] < 0xD1BA)) { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + } else { + gDPSetBlendMask(gDisplayListHead++, 0xFF); + gDPSetRenderMode(gDisplayListHead++, G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2); + } + gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH); + gSPDisplayList(gDisplayListHead++, D_0D003090); + } else { + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); + gDPSetBlendMask(gDisplayListHead++, 0xFF); + thing = item_box->someTimer; + mtxf_pos_rotation_xyz(someMatrix1, item_box->pos, item_box->rot); + if (thing < 10.0f) { + someMultiplier = 1.0f; + } else { + someMultiplier = 1.0f - ((thing - 10.0f) * 0.1f); + } + mtxf_scale(someMatrix1, someMultiplier); + if (item_box->someTimer & 1) { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + } else { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_XLU_INTER, G_RM_NOOP2); + } + temp_f2 = 2.0f * thing; + someVec1[0] = 0.0f; + someVec1[1] = temp_f2; + someVec1[2] = thing; + add_translate_mat4_vec3f(someMatrix1, someMatrix2, someVec1); + + if (!render_set_position(someMatrix2, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, D_0D003158); + temp_f2_2 = 0.8f * thing; + temp_f12 = 0.5f * thing; + someVec1[0] = temp_f2_2; + someVec1[1] = 2.3f * thing; + someVec1[2] = temp_f12; + add_translate_mat4_vec3f(someMatrix1, someMatrix2, someVec1); + + if (!render_set_position(someMatrix2, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, D_0D0031B8); + temp_f0_2 = -0.5f * thing; + someVec1[0] = temp_f2_2; + someVec1[1] = 1.2f * thing; + someVec1[2] = temp_f0_2; + add_translate_mat4_vec3f(someMatrix1, someMatrix2, someVec1); + + if (!render_set_position(someMatrix2, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, D_0D003128); + if (!(item_box->someTimer & 1)) { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); + } else { + gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_XLU_INTER, G_RM_NOOP2); + } + someVec1[0] = 0.0f; + someVec1[1] = 1.8f * thing; + someVec1[2] = -1.0f * thing; + add_translate_mat4_vec3f(someMatrix1, someMatrix2, someVec1); + + if (!render_set_position(someMatrix2, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, D_0D0031E8); + temp_f0_3 = -0.8f * thing; + someVec1[0] = temp_f0_3; + someVec1[1] = 0.6f * thing; + someVec1[2] = temp_f0_2; + add_translate_mat4_vec3f(someMatrix1, someMatrix2, someVec1); + + if (!render_set_position(someMatrix2, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, D_0D003188); + someVec1[0] = temp_f0_3; + someVec1[1] = temp_f2; + someVec1[2] = temp_f12; + add_translate_mat4_vec3f(someMatrix1, someMatrix2, someVec1); + + if (!render_set_position(someMatrix2, 0)) { return; } + + gSPDisplayList(gDisplayListHead++, D_0D0030F8); + gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); + } + gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); + } +} \ No newline at end of file diff --git a/src/actors/item_box/update.inc.c b/src/actors/item_box/update.inc.c new file mode 100644 index 000000000..02914498a --- /dev/null +++ b/src/actors/item_box/update.inc.c @@ -0,0 +1,68 @@ +#include + +/** + * @brief Updates the item box under the hot air balloon object. + * It used in Luigi Raceway. + * (here it's just update the rotation of the item box not the position, for the position it's in object) + * + * @param itemBox + */ +void update_actor_item_box_hot_air_balloon(struct ItemBox *itemBox) { + switch(itemBox->state) { + case 5: + itemBox->rot[0] += 0xB6; + itemBox->rot[1] -= 0x16C; + itemBox->rot[2] += 0xB6; + break; + case 3: + if (itemBox->someTimer == 0x14) { + itemBox->state = 5; + itemBox->flags = -0x4000; + } else { + itemBox->someTimer++; + itemBox->rot[0] += 0x444; + itemBox->rot[1] -= 0x2D8; + itemBox->rot[2] += 0x16C; + } + break; + } +} + +/** + * @brief Updates the item box actor. + * + * @param itemBox + */ +void update_actor_item_box(struct ItemBox *itemBox) { + switch (itemBox->state) { + case 0: + itemBox->state = 1; + break; + case 1: + if ((itemBox->pos[1] - itemBox->origY) < 8.66f) { + itemBox->pos[1] += 0.45f; + } else { + itemBox->pos[1] = itemBox->origY + 8.66f; + itemBox->state = 2; + itemBox->flags = 0xC000; + } + break; + case 2: + itemBox->rot[0] += 0xB6; + itemBox->rot[1] -= 0x16C; + itemBox->rot[2] += 0xB6; + break; + case 3: + if (itemBox->someTimer == 20) { + itemBox->state = 0; + itemBox->pos[1] = itemBox->resetDistance - 20.0f; + itemBox->flags = 0xC000; + } else { + itemBox->someTimer++; + itemBox->rot[0] += 0x444; + itemBox->rot[1] -= 0x2D8; + itemBox->rot[2] += 0x16C; + } + break; + } +} \ No newline at end of file diff --git a/src/actors/kiwano_fruit/render.inc.c b/src/actors/kiwano_fruit/render.inc.c new file mode 100644 index 000000000..b6d4c16bd --- /dev/null +++ b/src/actors/kiwano_fruit/render.inc.c @@ -0,0 +1,32 @@ +#include +#include +#include +#include "courses/dks_jungle_parkway/course_data.h" + +/** + * @brief Renders the kiwano fruit actor. + * Actor used in DK's Jungle Parkway. + * + * @param camera + * @param arg1 + * @param actor + */ +void render_actor_kiwano_fruit(UNUSED Camera *camera, Mat4 arg1, struct Actor *actor) { + uintptr_t addr; + s32 maxObjectsReached; + + if (actor->state == 0) { return; } + + arg1[3][0] = actor->pos[0]; + arg1[3][1] = actor->pos[1]; + arg1[3][2] = actor->pos[2]; + + maxObjectsReached = render_set_position(arg1, 0) == 0; + if (maxObjectsReached) { return; } + + addr = (actor->rot[0] << 0xA) + 0x03009000; // Can this be a real symbol? Doesn't match. + gDPLoadTextureBlock(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(addr), + G_IM_FMT_CI, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_CLAMP, + G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + gSPDisplayList(gDisplayListHead++, d_course_dks_jungle_parkway_dl_kiwano_fruit); +} diff --git a/src/actors/kiwano_fruit/update.inc.c b/src/actors/kiwano_fruit/update.inc.c new file mode 100644 index 000000000..41c94607e --- /dev/null +++ b/src/actors/kiwano_fruit/update.inc.c @@ -0,0 +1,89 @@ +#include +#include +#include +#include + +/** + * @brief Updates the kiwano fruit actor. + * Actor used in DK's Jungle Parkway. + * + * @param fruit + */ +void update_actor_kiwano_fruit(struct KiwanoFruit *fruit) { + Player *player; + f32 temp_f2; + f32 temp_f16; + f32 temp_f14; + f32 temp_f12; + s32 nearestWaypoint; + + player = &gPlayers[fruit->targetPlayer]; + if (((player->type & PLAYER_CPU) != 0) || (player->unk_110.unk34 == 0)) { + fruit->state = 0; + return; + } + switch (fruit->state) { /* irregular */ + case 0: + if ((get_surface_type(player->unk_110.unk3A) & 0xFF) != GRASS) { + return; + } + fruit->state = 1; + fruit->velocity[0] = 80.0f; + case 1: + nearestWaypoint = gNearestWaypointByPlayerId[(u16)(player - gPlayerOne)]; + temp_f2 = player->pos[0] - D_80164490[nearestWaypoint].posX; + temp_f16 = player->pos[1] - D_80164490[nearestWaypoint].posY; + temp_f14 = player->pos[2] - D_80164490[nearestWaypoint].posZ; + temp_f12 = fruit->velocity[0] / sqrtf((temp_f2 * temp_f2) + (temp_f16 * temp_f16) + (temp_f14 * temp_f14)); + temp_f2 *= temp_f12; + temp_f16 *= temp_f12; + temp_f14 *= temp_f12; + fruit->pos[0] = player->pos[0] + temp_f2; + fruit->pos[1] = player->pos[1] + temp_f16; + fruit->pos[2] = player->pos[2] + temp_f14; + fruit->velocity[0] -= 2.0f; + if (fruit->velocity[0] <= 0.0f) { + fruit->state = 2; + fruit->bonkTimer = 30.0f; + fruit->velocity[0] = 0.0f; + fruit->velocity[1] = 2.3f; + fruit->velocity[2] = 0.0f; + if ((player->effects & STAR_EFFECT) != 0) { + func_800C9060(player - gPlayerOne, SOUND_ARG_LOAD(0x19, 0x00, 0xA0, 0x52)); + } else { + player->effects |= 0x8000; + player->pos[0] -= temp_f2 * 4.0f; + player->pos[2] -= temp_f14 * 4.0f; + player->velocity[0] -= temp_f2 * 0.7f; + player->velocity[2] -= temp_f14 * 0.7f; + func_800C9060(player - gPlayerOne, SOUND_ARG_LOAD(0x19, 0x00, 0x70, 0x18)); + if (gModeSelection != GRAND_PRIX) { + D_80162DF8 = 1; + } + } + } + break; + case 2: + fruit->velocity[1] -= 0.3f; + fruit->pos[0] += fruit->velocity[0]; + fruit->pos[1] += fruit->velocity[1]; + fruit->pos[2] += fruit->velocity[2]; + fruit->bonkTimer -= 1.0f; + if (fruit->bonkTimer < 0.0f) { + fruit->state = 0; + } + break; + default: + break; + } + if (fruit->state != 0) { + fruit->animTimer += 1; + if (fruit->animTimer == 8) { + fruit->animTimer = 0; + fruit->animState += 1; + if (fruit->animState == 3) { + fruit->animState = 0; + } + } + } +} diff --git a/src/actors/mario_sign/render.inc.c b/src/actors/mario_sign/render.inc.c new file mode 100644 index 000000000..299470946 --- /dev/null +++ b/src/actors/mario_sign/render.inc.c @@ -0,0 +1,29 @@ +#include +#include +#include "courses/mario_raceway/course_data.h" + +/** + * @brief Renders the Mario sign actor. + * Actor used in Mario Raceway. + * + * @param arg0 + * @param arg1 + * @param arg2 + */ +void render_actor_mario_sign(Camera *arg0, UNUSED Mat4 arg1, struct Actor *arg2) { + Mat4 sp40; + f32 unk; + s16 temp = arg2->flags; + + if (temp & 0x800) { return; } + + unk = is_within_render_distance(arg0->pos, arg2->pos, arg0->rot[1], 0, gCameraZoom[arg0 - camera1], 16000000.0f); + if (!(unk < 0.0f)) { + gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH); + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + mtxf_pos_rotation_xyz(sp40, arg2->pos, arg2->rot); + if (render_set_position(sp40, 0) != 0) { + gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_dl_sign); + } + } +} diff --git a/src/actors/mario_sign/update.inc.c b/src/actors/mario_sign/update.inc.c new file mode 100644 index 000000000..82ca495f1 --- /dev/null +++ b/src/actors/mario_sign/update.inc.c @@ -0,0 +1,20 @@ +#include + +/** + * @brief Updates the Mario sign actor. + * + * @param arg0 + */ +void update_actor_mario_sign(struct Actor *arg0) { + if ((arg0->flags & 0x800) == 0) { + if ((arg0->flags & 0x400) != 0) { + arg0->pos[1] += 4.0f; + if (arg0->pos[1] > 800.0f) { + arg0->flags |= 0x800; + arg0->rot[1] += 1820; + } + } else { + arg0->rot[1] += 182; + } + } +} diff --git a/src/actors/paddle_boat/render.inc.c b/src/actors/paddle_boat/render.inc.c index bfb20dcb4..40c37b165 100644 --- a/src/actors/paddle_boat/render.inc.c +++ b/src/actors/paddle_boat/render.inc.c @@ -7,7 +7,15 @@ #include "courses/all_course_data.h" #include -// This likely attaches the paddle wheel to the boat +/** + * @brief Renders the paddle boat actor. + * Actor used in DK's Jungle Parkway. + * + * @param arg0 + * @param boat + * @param arg2 + * @param pathCounter + */ void render_actor_paddle_boat(Camera *arg0, struct PaddleWheelBoat *boat, UNUSED Mat4 arg2, u16 pathCounter) { UNUSED s32 pad[3]; Vec3f sp120; @@ -28,6 +36,7 @@ void render_actor_paddle_boat(Camera *arg0, struct PaddleWheelBoat *boat, UNUSED mtxf_pos_rotation_xyz(spE0, boat->pos, boat->boatRot); if (render_set_position(spE0, 1) != 0) { + // Render the boat gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_E730); gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_E058); @@ -36,10 +45,11 @@ void render_actor_paddle_boat(Camera *arg0, struct PaddleWheelBoat *boat, UNUSED mtxf_translate(spA0, sp120); mtxf_multiplication(sp60, spE0, spA0); if (render_set_position(sp60, 3) != 0) { + // Render the paddle wheel gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_FC28); gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); } } -} \ No newline at end of file +} diff --git a/src/actors/paddle_boat/update.inc.c b/src/actors/paddle_boat/update.inc.c index ddb1f720e..386e634d0 100644 --- a/src/actors/paddle_boat/update.inc.c +++ b/src/actors/paddle_boat/update.inc.c @@ -2,7 +2,9 @@ #include /** - * @brief Rotates paddle boat's wheel. + * @brief Updates the paddle boat actor. + * Actor used in DK's Jungle Parkway. + * Rotate only the paddle wheel, for position and rotation of the boat it's in vehicle. * * @param boat */ diff --git a/src/actors/palm_tree/render.inc.c b/src/actors/palm_tree/render.inc.c new file mode 100644 index 000000000..eb0895073 --- /dev/null +++ b/src/actors/palm_tree/render.inc.c @@ -0,0 +1,60 @@ +#include +#include +#include "courses/koopa_troopa_beach/course_data.h" + +/** + * @brief Renders the palm tree actor. + * Actor used in Koopa Troopa Beach. + * + * @param arg0 + * @param arg1 + * @param arg2 + */ +void render_actor_palm_tree(Camera *arg0, UNUSED Mat4 arg1, struct PalmTree *arg2) { + Vec3s spA8 = {0, 0, 0}; + Mat4 sp68; + f32 temp_f0; + s16 temp_v0 = arg2->flags; + + if ((temp_v0 & 0x800)) { + return; + } + + temp_f0 = is_within_render_distance(arg0->pos, arg2->pos, arg0->rot[1], 0.0f, gCameraZoom[arg0 - camera1], 4000000.0f); + + if (!(temp_f0 < 0.0f)) { + if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { + func_8029794C(arg2->pos, arg2->rot, 2.0f); + } + mtxf_pos_rotation_xyz(sp68, arg2->pos, spA8); + if (render_set_position(sp68, 0) != 0) { + + gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE); + gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING); + + switch(arg2->variant) { + case 0: + gSPDisplayList(gDisplayListHead++, &d_course_koopa_troopa_beach_dl_tree_trunk1); + gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); + gSPDisplayList(gDisplayListHead++, &d_course_koopa_troopa_beach_dl_tree_top1); + gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); + break; + + case 1: + gSPDisplayList(gDisplayListHead++, &d_course_koopa_troopa_beach_dl_tree_trunk2); + gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); + gSPDisplayList(gDisplayListHead++, &d_course_koopa_troopa_beach_dl_tree_top2); + gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); + break; + + case 2: + gSPDisplayList(gDisplayListHead++, &d_course_koopa_troopa_beach_dl_tree_trunk3); + gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); + gSPDisplayList(gDisplayListHead++, &d_course_koopa_troopa_beach_dl_tree_top3); + gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); + break; + + } + } + } +} \ No newline at end of file diff --git a/src/actors/piranha_plant/render.inc.c b/src/actors/piranha_plant/render.inc.c new file mode 100644 index 000000000..525c73b01 --- /dev/null +++ b/src/actors/piranha_plant/render.inc.c @@ -0,0 +1,117 @@ +#include +#include +#include +#include "courses/mario_raceway/course_data.h" +#include "courses/royal_raceway/course_data.h" + +/** + * @brief Renders the piranha plant actor. + * Actor used in Mario Raceway and Royal Raceway. + * + * @param arg0 + * @param arg1 + * @param arg2 + */ +void render_actor_piranha_plant(Camera *arg0, Mat4 arg1, struct PiranhaPlant *arg2) { + UNUSED s32 pad; + u8 *addr; + s16 temp_lo = arg0 - camera1; + s16 animationFrame; // unconfirmed + s16 temp = arg2->flags; + f32 temp_f0; + s32 maxObjectsReached; + + if (temp & 0x800) { return; } + + temp_f0 = is_within_render_distance(arg0->pos, arg2->pos, arg0->rot[1], 0, gCameraZoom[arg0 - camera1], 1000000.0f); + + if (temp_f0 < 0.0f) { + + switch(temp_lo) { + case 0: + arg2->visibilityStates[0] = -1; + break; + case 1: + arg2->visibilityStates[1] = -1; + break; + case 2: + arg2->visibilityStates[2] = -1; + break; + case 3: + arg2->visibilityStates[3] = -1; + break; + + } + return; + } + arg1[3][0] = arg2->pos[0]; + arg1[3][1] = arg2->pos[1]; + arg1[3][2] = arg2->pos[2]; + maxObjectsReached = render_set_position(arg1, 0) == 0; + if (maxObjectsReached) { return; } + + if (90000.0f < temp_f0) { + + switch(temp_lo) { + case 0: + arg2->visibilityStates[0] = 0; + break; + case 1: + arg2->visibilityStates[1] = 0; + break; + case 2: + arg2->visibilityStates[2] = 0; + break; + case 3: + arg2->visibilityStates[3] = 0; + break; + } + animationFrame = 0; + + } else { + switch(temp_lo) { + case 0: + arg2->visibilityStates[0] = 1; + break; + case 1: + arg2->visibilityStates[1] = 1; + break; + case 2: + arg2->visibilityStates[2] = 1; + break; + case 3: + arg2->visibilityStates[3] = 1; + break; + } + + switch(temp_lo) { + case 0: + animationFrame = arg2->timers[0]; + break; + case 1: + animationFrame = arg2->timers[1]; + break; + case 2: + animationFrame = arg2->timers[2]; + break; + case 3: + animationFrame = arg2->timers[3]; + break; + } + } + animationFrame /= 6; + + if (animationFrame > 8) { + animationFrame = 8; + } + addr = D_802BA058 + (animationFrame << 0xB); + gDPLoadTextureBlock(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(addr), G_IM_FMT_CI, G_IM_SIZ_8b, 32, 64, 0, + G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + + + if (gCurrentCourseId == COURSE_MARIO_RACEWAY) { + gSPDisplayList(gDisplayListHead++, &d_course_mario_raceway_dl_piranha_plant); + } else { + gSPDisplayList(gDisplayListHead++, &d_course_royal_raceway_dl_piranha_plant); + } +} diff --git a/src/actors/piranha_plant/update.inc.c b/src/actors/piranha_plant/update.inc.c new file mode 100644 index 000000000..4c22925f8 --- /dev/null +++ b/src/actors/piranha_plant/update.inc.c @@ -0,0 +1,52 @@ +#include + +/** + * @brief Updates the piranha plant actor. + * Actor used in Mario Raceway and Royal Raceway. + * + * @param arg0 + */ +void update_actor_piranha_plant(struct PiranhaPlant *arg0) { + if ((arg0->flags & 0x800) == 0) { + if ((arg0->flags & 0x400) != 0) { + arg0->pos[1] += 4.0f; + if (arg0->pos[1] > 800.0f) { + arg0->flags |= 0x800; + } + } else { + // This has to be an unrolled loop + if (arg0->visibilityStates[0] == 1) { + arg0->timers[0]++; + if (arg0->timers[0] > 60) { + arg0->timers[0] = 6; + } + } else { + arg0->timers[0] = 0; + } + if (arg0->visibilityStates[1] == 1) { + arg0->timers[1]++; + if (arg0->timers[1] > 60) { + arg0->timers[1] = 6; + } + } else { + arg0->timers[1] = 0; + } + if (arg0->visibilityStates[2] == 1) { + arg0->timers[2]++; + if (arg0->timers[2] > 60) { + arg0->timers[2] = 6; + } + } else { + arg0->timers[2] = 0; + } + if (arg0->visibilityStates[3] == 1) { + arg0->timers[3]++; + if (arg0->timers[3] > 60) { + arg0->timers[3] = 6; + } + } else { + arg0->timers[3] = 0; + } + } + } +} diff --git a/src/actors/railroad_crossing/render.inc.c b/src/actors/railroad_crossing/render.inc.c new file mode 100644 index 000000000..b87d6a695 --- /dev/null +++ b/src/actors/railroad_crossing/render.inc.c @@ -0,0 +1,38 @@ +#include +#include +#include +#include "courses/kalimari_desert/course_data.h" + +/** + * @brief Renders the railroad crossing actor. + * Actor used in Kalimari Desert. + * + * @param arg0 + * @param rr_crossing + */ +void render_actor_railroad_crossing(Camera *arg0, struct RailroadCrossing *rr_crossing) { + UNUSED Vec3s sp80 = {0, 0, 0}; + Mat4 sp40; + f32 unk = is_within_render_distance(arg0->pos, rr_crossing->pos, arg0->rot[1], 0.0f, gCameraZoom[arg0 - camera1], 4000000.0f); + + if (!(unk < 0.0f)) { + mtxf_pos_rotation_xyz(sp40, rr_crossing->pos, rr_crossing->rot); + + if (render_set_position(sp40, 0) != 0) { + gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING); + gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); + + if (isCrossingTriggeredByIndex[rr_crossing->crossingId]) { + + if (rr_crossing->someTimer < 20) { + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_crossing_right_active); + } else { + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_crossing_left_active); + } + } else { + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_crossing_both_inactive); + } + gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); + } + } +} diff --git a/src/actors/railroad_crossing/update.inc.c b/src/actors/railroad_crossing/update.inc.c new file mode 100644 index 000000000..e65068c5a --- /dev/null +++ b/src/actors/railroad_crossing/update.inc.c @@ -0,0 +1,24 @@ +#include + +/** + * @brief Updates the railroad crossing actor. + * Actor used in Kalimari Desert. + * Make the sound of the bell when the train is close. + * + * @param crossing + */ +void update_actor_railroad_crossing(struct RailroadCrossing *crossing) { + // If train close? + if (isCrossingTriggeredByIndex[crossing->crossingId] != 0) { + // Timer++ + crossing->someTimer++; + // Reset timer + if (crossing->someTimer > 40) { + crossing->someTimer = 1; + } + // Play Bell sound when timer hits 20 or 1. + if ((crossing->someTimer == 1) || (crossing->someTimer == 20)) { + func_800C98B8(crossing->pos, crossing->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x70, 0x16)); + } + } +} diff --git a/src/actors/school_bus/render.inc.c b/src/actors/school_bus/render.inc.c new file mode 100644 index 000000000..163e258ee --- /dev/null +++ b/src/actors/school_bus/render.inc.c @@ -0,0 +1,44 @@ +#include +#include +#include +#include + +/** + * @brief Renders the school bus actor. + * Actor used in Toad's Turnpike. + * His update are made in vehicle. + * + * @param arg0 + * @param arg1 + */ +void render_actor_school_bus(Camera *arg0, struct Actor *arg1) { + UNUSED s32 pad[6]; + Mat4 spC8; + UNUSED s32 pad2[32]; + f32 temp_f0; + + temp_f0 = is_within_render_distance(arg0->pos, arg1->pos, arg0->rot[1], 2500.0f, gCameraZoom[arg0 - camera1], 9000000.0f); + if (temp_f0 < 0.0f) { return; } + + gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + + + mtxf_pos_rotation_xyz(spC8, arg1->pos, arg1->rot); + if (render_set_position(spC8, 0) != 0) { + + if (gActiveScreenMode == SCREEN_MODE_1P) { + if (temp_f0 < 160000.0f) { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_3); + } else if (temp_f0 < 640000.0f) { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_4); + } else { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_5); + } + } else if (temp_f0 < 160000.0f) { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_4); + } else { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_5); + } + } +} diff --git a/src/actors/tanker_truck/render.inc.c b/src/actors/tanker_truck/render.inc.c new file mode 100644 index 000000000..aa6598500 --- /dev/null +++ b/src/actors/tanker_truck/render.inc.c @@ -0,0 +1,43 @@ +#include +#include +#include + +/** + * @brief Renders the tanker truck actor. + * Actor used in Toad's Turnpike. + * His update are made in vehicle. + * + * @param camera + * @param arg1 + */ +void render_actor_tanker_truck(Camera *camera, struct Actor* arg1) { + UNUSED s32 pad[6]; + Mat4 spC8; + UNUSED s32 pad2[32]; + f32 temp_f0 = is_within_render_distance(camera->pos, arg1->pos, camera->rot[1], 2500.0f, gCameraZoom[camera - camera1], 9000000.0f); + + if (!(temp_f0 < 0.0f)) { + + gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + + mtxf_pos_rotation_xyz(spC8, arg1->pos, arg1->rot); + if (render_set_position(spC8, 0) != 0) { + + if (gActiveScreenMode == SCREEN_MODE_1P) { + if (temp_f0 < 160000.0f) { + + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_6); + } else if (temp_f0 < 640000.0f) { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_7); + } else { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_8); + } + } else if (temp_f0 < 160000.0f) { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_7); + } else { + gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_8); + } + } + } +} diff --git a/src/actors/train.inc.c b/src/actors/train.inc.c deleted file mode 100644 index 4da4c55bc..000000000 --- a/src/actors/train.inc.c +++ /dev/null @@ -1,19 +0,0 @@ -// wheels -void update_actor_train_engine(struct TrainCar *arg0) { - arg0->wheelRot -= 0x666; - - if (arg0->unk_08 != 0.0f) { - arg0->unk_08 = 0.0f; - func_800C9D80(arg0->pos, arg0->velocity, 0x51018000); - } -} - -// wheels -void update_actor_train_car1(struct TrainCar *tender) { - tender->wheelRot -= 0x4FA; -} - -// wheels -void update_actor_train_car2(struct TrainCar *arg0) { - arg0->wheelRot -= 0x666; -} diff --git a/src/actors/train/render.inc.c b/src/actors/train/render.inc.c new file mode 100644 index 000000000..d4fab764a --- /dev/null +++ b/src/actors/train/render.inc.c @@ -0,0 +1,324 @@ +#include +#include +#include +#include "courses/kalimari_desert/course_data.h" + +/** + * @brief Renders the train engine actor. + * Actor used in Kalimari Desert. + * His update position are made in vehicle. + * + * @param camera + * @param actor + */ +void render_actor_train_engine(Camera *camera, struct TrainCar *actor) { + UNUSED s32 pad[2]; + s32 maxObjectsReached; + Vec3f sp160; + Mat4 sp120; + Mat4 spE0; + Mat4 spA0; + + f32 distance = is_within_render_distance(camera->pos, actor->pos, camera->rot[1], 2500.0f, gCameraZoom[camera - camera1], 9000000.0f); + + if (distance < 0.0f) { return; } + + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + + mtxf_pos_rotation_xyz(sp120, actor->pos, actor->rot); + maxObjectsReached = render_set_position(sp120, 0) == 0; + if (maxObjectsReached) { return; } + + if (distance < 122500.0f) { + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1C0F0); + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1B978); + + } else if (distance < 640000.0f) { + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1D670); + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1D160); + } else { + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1E910); + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1E480); + } + if (1440000.0f < distance) { return; } + + gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22D28); + + mtxf_rotate_x(sp120, actor->wheelRot); + vec3f_set(sp160, 17.0f, 6.0f, 32.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + maxObjectsReached = render_set_position(spA0, 3) == 0; + if (maxObjectsReached) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, actor->wheelRot); + vec3f_set(sp160, -17.0, 6.0f, 32.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + maxObjectsReached = render_set_position(spA0, 3) == 0; + if (maxObjectsReached) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x16C)); + vec3f_set(sp160, 17.0f, 6.0f, 16.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + maxObjectsReached = render_set_position(spA0, 3) == 0; + if (maxObjectsReached) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x16C)); + vec3f_set(sp160, -17.0f, 6.0f, 16.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + maxObjectsReached = render_set_position(spA0, 3) == 0; + if (maxObjectsReached) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x444)); + vec3f_set(sp160, 17.0f, 12.0f, -12.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + maxObjectsReached = render_set_position(spA0, 3) == 0; + if (maxObjectsReached) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22D70); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x444)); + vec3f_set(sp160, -17.0f, 12.0f, -12.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + maxObjectsReached = render_set_position(spA0, 3) == 0; + if (maxObjectsReached) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22D70); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x2D8)); + vec3f_set(sp160, 17.0f, 12.0f, -34.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + maxObjectsReached = render_set_position(spA0, 3) == 0; + if (maxObjectsReached) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22D70); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x2D8)); + vec3f_set(sp160, -17.0f, 12.0f, -34.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + maxObjectsReached = render_set_position(spA0, 3) == 0; + if (maxObjectsReached) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22D70); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); +} + +void render_actor_train_tender(Camera *camera, struct TrainCar *actor) { + Mat4 sp120; + Vec3f sp160; + Mat4 spE0; + Mat4 spA0; + + f32 temp_f0 = is_within_render_distance(camera->pos, actor->pos, camera->rot[1], 625.0f, gCameraZoom[camera - camera1], 9000000.0f); + + if (temp_f0 < 0.0f) { return; } + + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + + mtxf_pos_rotation_xyz(sp120, actor->pos, actor->rot); + if (render_set_position(sp120, 0) == 0) { return; } + + if (temp_f0 < 250000.0f) { + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1F228); + + } else if (temp_f0 < 1000000.0f) { + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1F708); + } else { + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1FAF8); + } + if (1440000.0f < temp_f0) { return; } + + gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22D28); + + mtxf_rotate_x(sp120, actor->wheelRot); + vec3f_set(sp160, 17.0f, 6.0f, 8.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + if (render_set_position(spA0, 3) == 0) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, actor->wheelRot); + vec3f_set(sp160, -17.0, 6.0f, 8.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + if (render_set_position(spA0, 3) == 0) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x444)); + vec3f_set(sp160, 17.0f, 6.0f, -8.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + if (render_set_position(spA0, 3) == 0) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x444)); + vec3f_set(sp160, -17.0f, 6.0f, -8.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + if (render_set_position(spA0, 3) == 0) { return; } + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); +} + +void render_actor_train_passenger_car(Camera *camera, struct TrainCar *actor) { + Mat4 sp120; + Vec3f sp160; + Mat4 spE0; + Mat4 spA0; + + f32 temp_f0 = is_within_render_distance(camera->pos, actor->pos, camera->rot[1], 2025.0f, gCameraZoom[camera - camera1], 9000000.0f); + + if (temp_f0 < 0.0f) { return; } + + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + + mtxf_pos_rotation_xyz(sp120, actor->pos, actor->rot); + + if (render_set_position(sp120, 0) == 0) { return; } + + if (temp_f0 < 250000.0f) { + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_20A20); + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_20A08); + + } else if (temp_f0 < 1000000.0f) { + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_21550); + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_21220); + } else { + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_21C90); + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_21A80); + } + if (1440000.0f < temp_f0) { return; } + + gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22D28); + + mtxf_rotate_x(sp120, actor->wheelRot); + vec3f_set(sp160, 17.0f, 6.0f, 28.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + if (render_set_position(spA0, 3) == 0) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, actor->wheelRot); + vec3f_set(sp160, -17.0, 6.0f, 28.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + if (render_set_position(spA0, 3) == 0) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x222)); + vec3f_set(sp160, 17.0f, 6.0f, 12.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + if (render_set_position(spA0, 3) == 0) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x222)); + vec3f_set(sp160, -17.0f, 6.0f, 12.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + if (render_set_position(spA0, 3) == 0) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x5B0)); + vec3f_set(sp160, 17.0f, 6.0f, -8.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + if (render_set_position(spA0, 3) == 0) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x5B0)); + vec3f_set(sp160, -17.0f, 6.0f, -8.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + if (render_set_position(spA0, 3) == 0) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x16C)); + vec3f_set(sp160, 17.0f, 6.0f, -24.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + if (render_set_position(spA0, 3) == 0) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + + mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x16C)); + vec3f_set(sp160, -17.0f, 6.0f, -24.0f); + mtxf_translate(spE0, sp160); + mtxf_multiplication(spA0, sp120, spE0); + + if (render_set_position(spA0, 3) == 0) { return; } + + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); +} diff --git a/src/actors/train/update.inc.c b/src/actors/train/update.inc.c new file mode 100644 index 000000000..024d0c9ab --- /dev/null +++ b/src/actors/train/update.inc.c @@ -0,0 +1,38 @@ +#include + +/** + * @brief Updates the train engine actor. + * Used in Kalimari Desert. + * Update wheels and make sound, for his update position it's in vehicle. + * + * @param arg0 + */ +void update_actor_train_engine(struct TrainCar *arg0) { + arg0->wheelRot -= 0x666; + + if (arg0->unk_08 != 0.0f) { + arg0->unk_08 = 0.0f; + func_800C9D80(arg0->pos, arg0->velocity, SOUND_ARG_LOAD(0x51,0x01,0x80,0x00)); + } +} + +/** + * @brief Updates the train tender actor. + * Used in Kalimari Desert. + * Update wheels, for his update position it's in vehicle. + * @param tender + */ +void update_actor_train_tender(struct TrainCar *tender) { + tender->wheelRot -= 0x4FA; +} + +/** + * @brief Updates the train passenger car actor. + * Used in Kalimari Desert. + * Update wheels, for his update position it's in vehicle. + * + * @param arg0 + */ +void update_actor_train_passenger_car(struct TrainCar *arg0) { + arg0->wheelRot -= 0x666; +} diff --git a/src/actors/trees/render.inc.c b/src/actors/trees/render.inc.c new file mode 100644 index 000000000..6e203645c --- /dev/null +++ b/src/actors/trees/render.inc.c @@ -0,0 +1,329 @@ +#include +#include +#include +#include +#include "courses/all_course_data.h" + +/** + * @brief Renders the tree actor in Mario rawceay. + * + * @param camera + * @param arg1 + * @param arg2 + */ +void render_actor_tree_mario_raceway(Camera *camera, Mat4 arg1, struct Actor *arg2) { + f32 temp_f0; + s16 temp_v0 = arg2->flags; + + if ((temp_v0 & 0x800) != 0) { return; } + + temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 16000000.0f); + + if (temp_f0 < 0.0f) { return; } + + if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { + func_8029794C(arg2->pos, arg2->rot, 3.0f); + } + arg1[3][0] = arg2->pos[0]; + arg1[3][1] = arg2->pos[1]; + arg1[3][2] = arg2->pos[2]; + + if (render_set_position(arg1, 0) != 0) { + gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import); + gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_dl_tree); + } +} + +/** + * @brief Renders the tree actor in Yoshi Valley. + * + * @param camera + * @param arg1 + * @param arg2 + */ +void render_actor_tree_yoshi_valley(Camera *camera, Mat4 arg1, struct Actor *arg2) { + f32 temp_f0; + s16 temp_v0 = arg2->flags; + + if ((temp_v0 & 0x800) != 0) { return; } + + temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); + + if (temp_f0 < 0.0f) { return; } + + if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { + func_8029794C(arg2->pos, arg2->rot, 2.79999995f); + } + arg1[3][0] = arg2->pos[0]; + arg1[3][1] = arg2->pos[1]; + arg1[3][2] = arg2->pos[2]; + + if (render_set_position(arg1, 0) != 0) { + gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import); + gSPDisplayList(gDisplayListHead++, d_course_yoshi_valley_dl_tree); + } +} + +/** + * @brief Renders the tree actor in Royal Raceway. + * + * @param camera + * @param arg1 + * @param arg2 + */ +void render_actor_tree_royal_raceway(Camera *camera, Mat4 arg1, struct Actor *arg2) { + f32 temp_f0; + s16 temp_v0 = arg2->flags; + + if ((temp_v0 & 0x800) != 0) { return; } + + temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); + + if (temp_f0 < 0.0f) { return; } + + if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { + func_8029794C(arg2->pos, arg2->rot, 2.79999995f); + } + arg1[3][0] = arg2->pos[0]; + arg1[3][1] = arg2->pos[1]; + arg1[3][2] = arg2->pos[2]; + + if (render_set_position(arg1, 0) != 0) { + gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import); + gSPDisplayList(gDisplayListHead++, d_course_royal_raceway_dl_tree); + } +} + +/** + * @brief Renders the tree actor in Moo Moo Farm. + * + * @param camera + * @param arg1 + * @param arg2 + */ +void render_actor_tree_moo_moo_farm(Camera *camera, Mat4 arg1, struct Actor *arg2) { + f32 temp_f0; + s16 temp_v0 = arg2->flags; + + if ((temp_v0 & 0x800) != 0) { return; } + + temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 6250000.0f); + + if (temp_f0 < 0.0f) { return; } + + if (((temp_v0 & 0x400) == 0) && (temp_f0 < 600.0f)) { + func_8029794C(arg2->pos, arg2->rot, 5.0f); + } + arg1[3][0] = arg2->pos[0]; + arg1[3][1] = arg2->pos[1]; + arg1[3][2] = arg2->pos[2]; + + if (render_set_position(arg1, 0) != 0) { + gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import); + gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_dl_tree); + } +} + +// have all the properties of the tree +void func_80299864(Camera *camera, Mat4 arg1, struct Actor *arg2) { + f32 temp_f0; + s16 temp_v0 = arg2->flags; + + if ((temp_v0 & 0x800) != 0) { return; } + + temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); + + if (temp_f0 < 0.0f) { return; } + + if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { + func_8029794C(arg2->pos, arg2->rot, 2.79999995f); + } + arg1[3][0] = arg2->pos[0]; + arg1[3][1] = arg2->pos[1]; + arg1[3][2] = arg2->pos[2]; + + if (render_set_position(arg1, 0) != 0) { + gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import); + // Why is a TLUT being used a DL here? That makes no sense + // Based on the TLUT being loaded above, this ought to be be another + // tree related DL, presumably one found in a course other than Moo Moo farm + // 0x0600FC70 + gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_mole_tlut); + } +} + +/** + * @brief Renders the tree actor in Bowser's Castle. + * + * @param camera + * @param arg1 + * @param arg2 + */ +void render_actor_tree_bowser_castle(Camera *camera, Mat4 arg1, struct Actor *arg2) { + f32 temp_f0; + s16 temp_v0 = arg2->flags; + + if ((temp_v0 & 0x800) != 0) { return; } + + temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); + + if (temp_f0 < 0.0f) { return; } + + if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { + func_8029794C(arg2->pos, arg2->rot, 2.79999995f); + } + arg1[3][0] = arg2->pos[0]; + arg1[3][1] = arg2->pos[1]; + arg1[3][2] = arg2->pos[2]; + + if (render_set_position(arg1, 0) != 0) { + gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import); + gSPDisplayList(gDisplayListHead++, d_course_royal_raceway_dl_castle_tree); + } +} + +/** + * @brief Renders the bush actor in Bowser's Castle. + * + * @param camera + * @param arg1 + * @param arg2 + */ +void render_actor_bush_bowser_castle(Camera *camera, Mat4 arg1, struct Actor *arg2) { + f32 temp_f0; + s16 temp_v0 = arg2->flags; + + if ((temp_v0 & 0x800) != 0) { return; } + + temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 640000.0f); + + if (temp_f0 < 0.0f) { return; } + + if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { + func_8029794C(arg2->pos, arg2->rot, 2.79999995f); + } + arg1[3][0] = arg2->pos[0]; + arg1[3][1] = arg2->pos[1]; + arg1[3][2] = arg2->pos[2]; + + if (render_set_position(arg1, 0) != 0) { + gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import); + gSPDisplayList(gDisplayListHead++, d_course_bowsers_castle_dl_bush); + } +} + +/** + * @brief Renders the tree actor in Frappe Snowland. + * + * @param camera + * @param arg1 + * @param arg2 + */ +void render_actor_tree_frappe_snowland(Camera *camera, Mat4 arg1, struct Actor *arg2) { + f32 temp_f0; + s16 temp_v0 = arg2->flags; + + if ((temp_v0 & 0x800) != 0) { return; } + + temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); + + if (temp_f0 < 0.0f) { return; } + + if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { + func_8029794C(arg2->pos, arg2->rot, 2.79999995f); + } + arg1[3][0] = arg2->pos[0]; + arg1[3][1] = arg2->pos[1]; + arg1[3][2] = arg2->pos[2]; + + if (render_set_position(arg1, 0) != 0) { + gSPDisplayList(gDisplayListHead++, d_course_frappe_snowland_dl_tree); + } +} + +/** + * @brief Renders the a first variant of cactus in Kalimari Desert. + * + * @param camera + * @param arg1 + * @param arg2 + */ +void render_actor_tree_cactus1_kalimari_desert(Camera *camera, Mat4 arg1, struct Actor *arg2) { + f32 temp_f0; + s16 temp_v0 = arg2->flags; + + if ((temp_v0 & 0x800) != 0) { return; } + + temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); + + if (temp_f0 < 0.0f) { return; } + + if (((temp_v0 & 0x400) == 0) && (temp_f0 < 40000.0f)) { + func_8029794C(arg2->pos, arg2->rot, 1.0f); + } + arg1[3][0] = arg2->pos[0]; + arg1[3][1] = arg2->pos[1]; + arg1[3][2] = arg2->pos[2]; + + if (render_set_position(arg1, 0) != 0) { + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_cactus1); + } +} + +/** + * @brief Renders the a second variant of cactus in Kalimari Desert. + * + * @param camera + * @param arg1 + * @param arg2 + */ +void render_actor_tree_cactus2_kalimari_desert(Camera *camera, Mat4 arg1, struct Actor *arg2) { + f32 temp_f0; + s16 temp_v0 = arg2->flags; + + if ((temp_v0 & 0x800) != 0) { return; } + + temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); + + if (temp_f0 < 0.0f) { return; } + + if (((temp_v0 & 0x400) == 0) && (temp_f0 < 40000.0f)) { + func_8029794C(arg2->pos, arg2->rot, 1.0f); + } + arg1[3][0] = arg2->pos[0]; + arg1[3][1] = arg2->pos[1]; + arg1[3][2] = arg2->pos[2]; + + if (render_set_position(arg1, 0) != 0) { + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_cactus2); + } +} + +/** + * @brief Renders the a third variant of cactus in Kalimari Desert. + * + * @param camera + * @param arg1 + * @param arg2 + */ +void render_actor_tree_cactus3_kalimari_desert(Camera *camera, Mat4 arg1, struct Actor *arg2) { + f32 temp_f0; + s16 temp_v0 = arg2->flags; + + if ((temp_v0 & 0x800) != 0) { return; } + + temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); + + if (temp_f0 < 0.0f) { return; } + + if (((temp_v0 & 0x400) == 0) && (temp_f0 < 40000.0f)) { + func_8029794C(arg2->pos, arg2->rot, 0.80000001f); + } + arg1[3][0] = arg2->pos[0]; + arg1[3][1] = arg2->pos[1]; + arg1[3][2] = arg2->pos[2]; + + if (render_set_position(arg1, 0) != 0) { + gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_cactus3); + } +} diff --git a/src/actors/wario_sign/render.inc.c b/src/actors/wario_sign/render.inc.c new file mode 100644 index 000000000..84216470f --- /dev/null +++ b/src/actors/wario_sign/render.inc.c @@ -0,0 +1,27 @@ +#include +#include +#include +#include "courses/wario_stadium/course_data.h" + +/** + * @brief Renders the Wario sign actor. + * Used in Wario Stadium. + * + * @param arg0 + * @param arg1 + */ +void render_actor_wario_sign(Camera *arg0, struct Actor *arg1) { + Mat4 sp38; + f32 unk = is_within_render_distance(arg0->pos, arg1->pos, arg0->rot[1], 0, gCameraZoom[arg0 - camera1], 16000000.0f); + + if (!(unk < 0.0f)) { + gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH); + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + + mtxf_pos_rotation_xyz(sp38, arg1->pos, arg1->rot); + if (render_set_position(sp38, 0) != 0) { + + gSPDisplayList(gDisplayListHead++, d_course_wario_stadium_dl_sign); + } + } +} diff --git a/src/actors/wario_sign/update.inc.c b/src/actors/wario_sign/update.inc.c new file mode 100644 index 000000000..8f4bf6d92 --- /dev/null +++ b/src/actors/wario_sign/update.inc.c @@ -0,0 +1,11 @@ +#include + +/** + * @brief Updates the Wario sign actor. + * Used in Wario Stadium. + * + * @param arg0 + */ +void update_actor_wario_sign(struct Actor *arg0) { + arg0->rot[1] += 0xB6; +} diff --git a/src/actors/yoshi_egg/render.inc.c b/src/actors/yoshi_egg/render.inc.c new file mode 100644 index 000000000..4ee09392d --- /dev/null +++ b/src/actors/yoshi_egg/render.inc.c @@ -0,0 +1,59 @@ +#include +#include +#include +#include +#include "courses/yoshi_valley/course_data.h" + +/** + * @brief Renders the Yoshi egg actor. + * Actor used in Yoshi Valley. + * + * @param arg0 + * @param arg1 + * @param egg + * @param arg3 + */ +void render_actor_yoshi_egg(Camera *arg0, Mat4 arg1, struct YoshiValleyEgg *egg, u16 arg3) { + Mat4 sp60; + Vec3s sp5C; + Vec3f sp54; + f32 temp_f0; + + if (gGamestate != CREDITS_SEQUENCE) { + temp_f0 = is_within_render_distance(arg0->pos, egg->pos, arg0->rot[1], 200.0f, gCameraZoom[arg0 - camera1], 16000000.0f); + if (temp_f0 < 0.0f) { + return; + } + } else { + arg3 = 15; + temp_f0 = 0.0f; + } + + gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH); + if ((arg3 > 12) && (arg3 < 20)) { + if (temp_f0 < 640000.0f) { + sp54[0] = egg->pos[0]; + sp54[1] = 3.0f; + sp54[2] = egg->pos[2]; + func_802976D8(sp5C); + func_8029794C(sp54, sp5C, 10.0f); + } + sp5C[0] = 0; + sp5C[1] = egg->eggRot; + sp5C[2] = 0; + mtxf_pos_rotation_xyz(sp60, egg->pos, sp5C); + if (render_set_position(sp60, 0) == 0) { return; } + + gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING); + gSPDisplayList(gDisplayListHead++, d_course_yoshi_valley_dl_16D70); + } else { + arg1[3][0] = egg->pos[0]; + arg1[3][1] = egg->pos[1]; + arg1[3][2] = egg->pos[2]; + + if (render_set_position(arg1, 0) != 0) { + gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); + gSPDisplayList(gDisplayListHead++, d_course_yoshi_valley_dl_egg_lod0); + } + } +} diff --git a/src/actors/yoshi_egg/update.inc.c b/src/actors/yoshi_egg/update.inc.c new file mode 100644 index 000000000..b96f66fa0 --- /dev/null +++ b/src/actors/yoshi_egg/update.inc.c @@ -0,0 +1,26 @@ +#include + +/** + * @brief Updates the Yoshi egg actor. + * + * @param egg + */ +void update_actor_yoshi_egg(struct YoshiValleyEgg *egg) { + egg->pathRot += 0x5B; + egg->pos[0] = egg->pathCenter[0] + (sins(egg->pathRot) * egg->pathRadius); + egg->pos[2] = egg->pathCenter[2] + (coss(egg->pathRot) * egg->pathRadius); + if ((egg->flags & 0x400) != 0) { + egg->pathCenter[1] -= 0.12; + if (egg->pathCenter[1] < -3.0f) { + egg->pathCenter[1] = -3.0f; + } + egg->pos[1] += egg->pathCenter[1]; + if (egg->pos[1] < 0.0f) { + egg->pos[1] = 0.0f; + egg->pathCenter[1] = 0.0f; + egg->flags &= ~(1 << 10); + } + egg->eggRot -= 0x4FA; + } + egg->eggRot -= 0x222; +} diff --git a/src/code_800029B0.c b/src/code_800029B0.c index ec8cc038e..86acf4c63 100644 --- a/src/code_800029B0.c +++ b/src/code_800029B0.c @@ -83,13 +83,15 @@ s32 D_8015F5A0; s32 D_8015F5A4; s32 code_800029B0_bss_pad[48]; Vtx *vtxBuffer[32]; -s16 D_8015F6E8; -s16 D_8015F6EA; -s16 D_8015F6EC; // s16 or u16? -s16 D_8015F6EE; -s16 D_8015F6F0; -s16 D_8015F6F2; +s16 gCourseMaxX; +s16 gCourseMinX; + +s16 gCourseMaxY; // s16 or u16? +s16 gCourseMinY; + +s16 gCourseMaxZ; +s16 gCourseMinZ; s16 D_8015F6F4; s16 D_8015F6F6; @@ -210,7 +212,7 @@ void setup_race(void) { func_802A74BC(); func_802A4D18(); func_80091FA4(); - func_8029E158(); + init_actors_and_load_textures(); if (gModeSelection != BATTLE) { D_8015F8D0[1] = (f32) (D_80164490->posY - 15);; @@ -320,7 +322,7 @@ void func_80003040(void) { case COURSE_YOSHI_VALLEY: vec3f_set(position, -2300.0f, 0.0f, 634.0f); position[0] *= gCourseDirection; - addActorToEmptySlot(position, rotation, velocity, ACTOR_YOSHI_VALLEY_EGG); + add_actor_to_empty_slot(position, rotation, velocity, ACTOR_YOSHI_EGG); break; case COURSE_MOO_MOO_FARM: dma_textures(gTextureTrees4Left, 0x3E8, 0x800); @@ -353,11 +355,11 @@ void func_80003040(void) { break; case COURSE_WARIO_STADIUM: vec3f_set(position, -131.0f, 83.0f, 286.0f); - addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN); + add_actor_to_empty_slot(position, rotation, velocity, ACTOR_WARIO_SIGN); vec3f_set(position, -2353.0f, 72.0f, -1608.0f); - addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN); + add_actor_to_empty_slot(position, rotation, velocity, ACTOR_WARIO_SIGN); vec3f_set(position, -2622.0f, 79.0f, 739.0f); - addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN); + add_actor_to_empty_slot(position, rotation, velocity, ACTOR_WARIO_SIGN); // d_course_wario_stadium_packed_dl_C50 find_vtx_and_set_colours(0x07000C50, 0x64, 0xFF, 0xFF, 0xFF); // d_course_wario_stadium_packed_dl_BD8 diff --git a/src/code_800029B0.h b/src/code_800029B0.h index 24aca26fa..30ee796d7 100644 --- a/src/code_800029B0.h +++ b/src/code_800029B0.h @@ -58,13 +58,14 @@ extern s32 D_8015F5A0; extern s32 D_8015F5A4; extern Vtx *vtxBuffer[]; -extern s16 D_8015F6E8; -extern s16 D_8015F6EA; -extern s16 D_8015F6EC; -extern s16 D_8015F6EE; +extern s16 gCourseMaxX; +extern s16 gCourseMinX; -extern s16 D_8015F6F0; -extern s16 D_8015F6F2; +extern s16 gCourseMaxY; +extern s16 gCourseMinY; + +extern s16 gCourseMaxZ; +extern s16 gCourseMinZ; extern s16 D_8015F6F4; extern s16 D_8015F6F6; extern u16 D_8015F6F8; diff --git a/src/code_80005FD0.c b/src/code_80005FD0.c index e574dc8c7..87e87345c 100644 --- a/src/code_80005FD0.c +++ b/src/code_80005FD0.c @@ -1602,7 +1602,7 @@ void func_800098FC(s32 arg0, Player *player) { } } if (D_801633B0[arg0] >= 0xB) { - if ((player->soundEffects & 0x400000) || (player->soundEffects & 0x01000000) || (player->soundEffects & 2) || (player->soundEffects & 4) || (player->effects & 0x04000000)) { + if ((player->soundEffects & 0x400000) || (player->soundEffects & 0x01000000) || (player->soundEffects & 2) || (player->soundEffects & 4) || (player->effects & HIT_EFFECT)) { func_800C92CC(arg0, 0x2900800BU); D_801633B0[arg0] = 0; } @@ -1640,7 +1640,7 @@ void func_800099EC(s32 playerId, Player *unused) { // Lots of register allocation differences, but messing around seems to suggest they stem from 2 specific areas // MISMATCH1: something about the loading of `playerId` is off // MISMATCH2: something about the handling of the math is off. Not sure exactly what though -// MISMATCH3: there's a small instruction ordering issue concerning `D_8015F6F0`. No idea what to do about it +// MISMATCH3: there's a small instruction ordering issue concerning `gCourseMaxX`. No idea what to do about it // FAKEMATCH1 is the best improvement I've seen yet, MISMATCH2/3 become the only issues. void func_80009B60(s32 playerId) { @@ -1698,17 +1698,17 @@ void func_80009B60(s32 playerId) { return; } D_801633E0[playerId] = 0; - if (player->pos[0] < D_8015F6EA) { + if (player->pos[0] < gCourseMinX) { D_801633E0[playerId] = 1; } - if (D_8015F6E8 < player->pos[0]) { + if (gCourseMaxX < player->pos[0]) { D_801633E0[playerId] = 2; } - if (player->pos[2] < D_8015F6F2) { + if (player->pos[2] < gCourseMinZ) { D_801633E0[playerId] = 3; } // MISMATCH3 - if (D_8015F6F0 < player->pos[2]) { + if (gCourseMaxZ < player->pos[2]) { D_801633E0[playerId] = 4; } if (!(player->unk_0CA & 2) && !(player->unk_0CA & 8)) { @@ -3264,11 +3264,11 @@ void func_8000DF8C(s32 bombKartId) { } } -s32 func_8000ED14(s32 actorIndex, s16 arg1) { +s32 add_actor_in_unexpired_actor_list(s32 actorIndex, s16 arg1) { s32 i; s32 a2 = 0; - for (i = 0; i < 8; i++) { + for (i = 0; i < NUM_PLAYERS; i++) { if (gUnexpiredActorsList[i].unkC == 0) { gUnexpiredActorsList[i].unkC = 1; @@ -3285,31 +3285,31 @@ s32 func_8000ED14(s32 actorIndex, s16 arg1) { return 0; } -s32 func_8000ED80(s32 actorIndex) { +s32 add_red_shell_in_unexpired_actor_list(s32 actorIndex) { struct Actor *actor = &gActorList[actorIndex]; - if (actor->type != 8) { + if (actor->type != ACTOR_RED_SHELL) { return -1; } - return func_8000ED14(actorIndex, 0); + return add_actor_in_unexpired_actor_list(actorIndex, 0); } -s32 func_8000EDC8(s32 actorIndex) { +s32 add_green_shell_in_unexpired_actor_list(s32 actorIndex) { struct Actor *actor = &gActorList[actorIndex]; - if (actor->type != 7) { + if (actor->type != ACTOR_GREEN_SHELL) { return -1; } - return func_8000ED14(actorIndex, 1); + return add_actor_in_unexpired_actor_list(actorIndex, 1); } -s32 func_8000EE10(s32 arg0) { +s32 add_blue_shell_in_unexpired_actor_list(s32 arg0) { struct Actor *actor = &gActorList[arg0]; - if (actor->type != 42) { + if (actor->type != ACTOR_BLUE_SPINY_SHELL) { return -1; } - return func_8000ED14(arg0, 2); + return add_actor_in_unexpired_actor_list(arg0, 2); } -void func_8000EE58(s32 actorIndex) { +void delete_actor_in_unexpired_actor_list(s32 actorIndex) { struct unexpiredActors *phi; s32 i; @@ -4419,7 +4419,7 @@ void init_course_vehicles(void) { tempLocomotive->velocity[0] = tempLocomotive->position[0] - origXPos; tempLocomotive->velocity[2] = tempLocomotive->position[2] - origZPos; vec3s_set(trainCarRot, 0, trainCarYRot, 0); - tempLocomotive->actorIndex = addActorToEmptySlot(tempLocomotive->position, trainCarRot, tempLocomotive->velocity, ACTOR_TRAIN_ENGINE); + tempLocomotive->actorIndex = add_actor_to_empty_slot(tempLocomotive->position, trainCarRot, tempLocomotive->velocity, ACTOR_TRAIN_ENGINE); tempTender = &gTrainList[loopIndex].tender; if (tempTender->isActive == 1) { @@ -4429,7 +4429,7 @@ void init_course_vehicles(void) { tempTender->velocity[0] = tempTender->position[0] - origXPos; tempTender->velocity[2] = tempTender->position[2] - origZPos; vec3s_set(trainCarRot, 0, trainCarYRot, 0); - tempTender->actorIndex = addActorToEmptySlot(tempTender->position, trainCarRot, tempTender->velocity, ACTOR_TRAIN_TENDER); + tempTender->actorIndex = add_actor_to_empty_slot(tempTender->position, trainCarRot, tempTender->velocity, ACTOR_TRAIN_TENDER); } for(loopIndex2 = 0; loopIndex2 < NUM_PASSENGER_CAR_ENTRIES; loopIndex2++) { @@ -4441,7 +4441,7 @@ void init_course_vehicles(void) { tempPassengerCar->velocity[0] = tempPassengerCar->position[0] - origXPos; tempPassengerCar->velocity[2] = tempPassengerCar->position[2] - origZPos; vec3s_set(trainCarRot, 0, trainCarYRot, 0); - tempPassengerCar->actorIndex = addActorToEmptySlot(tempPassengerCar->position, trainCarRot, tempPassengerCar->velocity, ACTOR_TRAIN_PASSENGER_CAR); + tempPassengerCar->actorIndex = add_actor_to_empty_slot(tempPassengerCar->position, trainCarRot, tempPassengerCar->velocity, ACTOR_TRAIN_PASSENGER_CAR); } } } @@ -4456,7 +4456,7 @@ void init_course_vehicles(void) { tempPaddleWheelBoat->velocity[0] = tempPaddleWheelBoat->position[0] - origXPos; tempPaddleWheelBoat->velocity[2] = tempPaddleWheelBoat->position[2] - origZPos; vec3s_set(paddleWheelBoatRot, 0, tempPaddleWheelBoat->rotY, 0); - tempPaddleWheelBoat->actorIndex = addActorToEmptySlot(tempPaddleWheelBoat->position, paddleWheelBoatRot, tempPaddleWheelBoat->velocity, ACTOR_PADDLE_BOAT); + tempPaddleWheelBoat->actorIndex = add_actor_to_empty_slot(tempPaddleWheelBoat->position, paddleWheelBoatRot, tempPaddleWheelBoat->velocity, ACTOR_PADDLE_BOAT); } } break; @@ -4464,22 +4464,22 @@ void init_course_vehicles(void) { for(loopIndex = 0; loopIndex < NUM_RACE_BOX_TRUCKS; loopIndex++) { tempBoxTruck = &gBoxTruckList[loopIndex]; func_80012220(tempBoxTruck); - tempBoxTruck->actorIndex = addActorToEmptySlot(tempBoxTruck->position, tempBoxTruck->rotation, tempBoxTruck->velocity, ACTOR_BOX_TRUCK); + tempBoxTruck->actorIndex = add_actor_to_empty_slot(tempBoxTruck->position, tempBoxTruck->rotation, tempBoxTruck->velocity, ACTOR_BOX_TRUCK); } for(loopIndex = 0; loopIndex < NUM_RACE_SCHOOL_BUSES; loopIndex++) { tempSchoolBus = &gSchoolBusList[loopIndex]; func_80012220(tempSchoolBus); - tempSchoolBus->actorIndex = addActorToEmptySlot(tempSchoolBus->position, tempSchoolBus->rotation, tempSchoolBus->velocity, ACTOR_SCHOOL_BUS); + tempSchoolBus->actorIndex = add_actor_to_empty_slot(tempSchoolBus->position, tempSchoolBus->rotation, tempSchoolBus->velocity, ACTOR_SCHOOL_BUS); } for(loopIndex = 0; loopIndex < NUM_RACE_TANKER_TRUCKS; loopIndex++) { tempTankerTruck = &gTankerTruckList[loopIndex]; func_80012220(tempTankerTruck); - tempTankerTruck->actorIndex = addActorToEmptySlot(tempTankerTruck->position, tempTankerTruck->rotation, tempTankerTruck->velocity, ACTOR_TANKER_TRUCK); + tempTankerTruck->actorIndex = add_actor_to_empty_slot(tempTankerTruck->position, tempTankerTruck->rotation, tempTankerTruck->velocity, ACTOR_TANKER_TRUCK); } for(loopIndex = 0; loopIndex < NUM_RACE_CARS; loopIndex++) { tempCar = &gCarList[loopIndex]; func_80012220(tempCar); - tempCar->actorIndex = addActorToEmptySlot(tempCar->position, tempCar->rotation, tempCar->velocity, ACTOR_CAR); + tempCar->actorIndex = add_actor_to_empty_slot(tempCar->position, tempCar->rotation, tempCar->velocity, ACTOR_CAR); } break; } diff --git a/src/code_80005FD0.h b/src/code_80005FD0.h index e7920dd97..ffa7d4f23 100644 --- a/src/code_80005FD0.h +++ b/src/code_80005FD0.h @@ -117,11 +117,11 @@ s16 func_8000DBAC(Vec3f, s16*, f32); void set_bomb_kart_spawn_positions(void); void func_8000DF8C(s32); -s32 func_8000ED14(s32, s16); -s32 func_8000ED80(s32); -s32 func_8000EDC8(s32); -s32 func_8000EE10(s32); -void func_8000EE58(s32); +s32 add_actor_in_unexpired_actor_list(s32, s16); +s32 add_red_shell_in_unexpired_actor_list(s32); +s32 add_green_shell_in_unexpired_actor_list(s32); +s32 add_blue_shell_in_unexpired_actor_list(s32); +void delete_actor_in_unexpired_actor_list(s32); void func_8000EEDC(void); void generate_player_smoke(void); diff --git a/src/code_80057C60.c b/src/code_80057C60.c index c2063d198..f89f5ede4 100644 --- a/src/code_80057C60.c +++ b/src/code_80057C60.c @@ -1460,7 +1460,7 @@ void func_8005A14C(s32 playerId) { } else { f32_step_towards(&gObjectList[objectIndex].sizeScaling, 0.6f, 0.02f); } - if (player->effects & 0x04000000) { + if (player->effects & HIT_EFFECT) { u16_step_up_towards(&gObjectList[objectIndex].direction_angle[0], 0x0C00U, 0x0100U); } else { u16_step_down_towards(&gObjectList[objectIndex].direction_angle[0], 0, 0x00000100); diff --git a/src/effects.c b/src/effects.c index 85aa3d44f..9a4fc17a0 100644 --- a/src/effects.c +++ b/src/effects.c @@ -716,10 +716,10 @@ void func_8008D9C0(Player* player) { } } -void func_8008DABC(Player *player, s8 arg1) { +void apply_hit_sound_effect(Player *player, s8 arg1) { clean_effect(player, arg1); - if ((player->effects & 0x4000000) == 0) { + if ((player->effects & HIT_EFFECT) == 0) { player->unk_DB4.unk2 = 0; player->unk_238 = 0; player->unk_DB4.unk10 = 4.5f; @@ -737,18 +737,18 @@ void func_8008DABC(Player *player, s8 arg1) { player->unk_046 |= 0x80; } - if (((player->type & PLAYER_HUMAN) != 0) && ((player->effects & 0x04000000) == 0)) { - func_800C90F4(arg1, (player->characterId * 0x10) + 0x29008005); + if (((player->type & PLAYER_HUMAN) != 0) && ((player->effects & HIT_EFFECT) == 0)) { + func_800C90F4(arg1, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x05)); } - player->effects |= 0x04000000; + player->effects |= HIT_EFFECT; if (((player->type) & 0x1000) != 0) { func_800098FC(arg1, player); } } } -void func_8008DC08(Player* player, s8 arg1) { +void apply_hit_effect(Player* player, s8 arg1) { player->unk_0C2 = 0; player->unk_0A8 = 0; player->unk_07C = 0; @@ -837,7 +837,7 @@ void func_8008DC08(Player* player, s8 arg1) { break; case 3: player->unk_DB4.unk10 = 3.0f; - player->effects &= ~0x04000000; + player->effects &= ~HIT_EFFECT; player->unk_DB4.unk2 = 0; player->effects |= 0x08000000; player->size = 1.0f; @@ -889,7 +889,7 @@ void apply_hit_rotating_sound_effect(Player* player, s8 arg1) { void apply_lightning_effect(Player *player, s8 arg1) { s16 test; - if (((player->effects & 0x8000) == 0x8000) && ((player->effects & 0x04000000) != 0x04000000)) { + if (((player->effects & 0x8000) == 0x8000) && ((player->effects & HIT_EFFECT) != HIT_EFFECT)) { player->effects &= ~0x20000; player->unk_0A8 = 0; player->unk_07C = 0; @@ -900,7 +900,7 @@ void apply_lightning_effect(Player *player, s8 arg1) { D_80165190[1][arg1] = 1; D_80165190[2][arg1] = 1; D_80165190[3][arg1] = 1; - func_8008DABC(player, arg1); + apply_hit_sound_effect(player, arg1); } else if ((player->effects & 0x20000) == 0x20000) { player->rotation[1] -= 0x5B0; D_8018D920[arg1] -= 0x5B0; @@ -1987,10 +1987,28 @@ void func_80090970(Player *player, s8 playerId, s8 arg2) { } } -s32 func_800910E4(Player *player) { +#define EFFECT_BLACKLIST_USE_ITEM LIGHTNING_EFFECT| \ + 0x10000000| \ + 0x8000000| \ + HIT_EFFECT| \ + HIT_BY_ITEM_EFFECT| \ + 0x1000000| \ + 0x800000| \ + BOOST_RAMP_ASPHALT_EFFECT|\ + 0x20000| \ + 0x10000| \ + 0x4000| \ + 0x800| \ + 0x400| \ + STAR_EFFECT| \ + 0x80| \ + 0x40| \ + BOOST_RAMP_WOOD_EFFECT + +bool prevent_item_use(Player *player) { s32 phi_v0 = 0; if ((((((player->unk_0CA & 2) == 2) || ((player->unk_0CA & 8) == 8)) || ((player->type & PLAYER_UNKNOWN_0x40) != 0)) || ((player->type & PLAYER_CINEMATIC_MODE) != 0)) || ((player->type & PLAYER_EXISTS) == 0)) { - return 1; + return TRUE; } switch (player->currentItemCopy) { @@ -1999,20 +2017,20 @@ s32 func_800910E4(Player *player) { case ITEM_TRIPLE_MUSHROOM: case ITEM_SUPER_MUSHROOM: if ((player->effects & 8) != 0) { - return 1; + return TRUE; } - phi_v0 = 0x5F934EC4; - goto func_800910E4_label; + phi_v0 = EFFECT_BLACKLIST_USE_ITEM; + goto prevent_item_use_label; case ITEM_STAR: - phi_v0 = 0xDF934EC4; + phi_v0 = BOO_EFFECT| EFFECT_BLACKLIST_USE_ITEM; case ITEM_BOO: - phi_v0 = phi_v0 | 0xDF934EC4; -func_800910E4_label: + phi_v0 = phi_v0 | (BOO_EFFECT | EFFECT_BLACKLIST_USE_ITEM); +prevent_item_use_label: default: if ((player->effects & phi_v0) != 0) { - return 1; + return TRUE; } - return 0; + return FALSE; } } diff --git a/src/effects.h b/src/effects.h index 3d2d76ff4..bf114cc17 100644 --- a/src/effects.h +++ b/src/effects.h @@ -69,8 +69,8 @@ void func_8008D7B0(Player*, s8); void func_8008D8B4(Player*, s8); void func_8008D97C(Player*); void func_8008D9C0(Player*); -void func_8008DABC(Player*, s8); -void func_8008DC08(Player*, s8); +void apply_hit_sound_effect(Player*, s8); +void apply_hit_effect(Player*, s8); void apply_hit_rotating_sound_effect(Player*, s8); void apply_lightning_effect(Player*, s8); void remove_lightning_effect(Player*, s8); @@ -111,7 +111,7 @@ void func_80090178(Player*, s8, Vec3f, Vec3f); void func_80090778(Player*); void func_80090868(Player*); void func_80090970(Player*, s8, s8); -s32 func_800910E4(Player*); +s32 prevent_item_use(Player*); void func_800911B4(Player*, s8); void func_80091298(Player*, s8); diff --git a/src/ending/code_80280000.c b/src/ending/code_80280000.c index d3e7a1a8b..d96fcb898 100644 --- a/src/ending/code_80280000.c +++ b/src/ending/code_80280000.c @@ -141,12 +141,14 @@ void load_credits(void) { load_course(gCurrentCourseId); D_8015F730 = gNextFreeMemoryAddress; set_segment_base_addr(0xB, (void *) decompress_segments((u8 *) CEREMONY_DATA_ROM_START, (u8 *) CEREMONY_DATA_ROM_END)); - D_8015F6EA = -0x15A1; - D_8015F6EE = -0x15A1; - D_8015F6F2 = -0x15A1; - D_8015F6E8 = 0x15A1; - D_8015F6EC = 0x15A1; - D_8015F6F0 = 0x15A1; + + gCourseMinX = -0x15A1; + gCourseMinY = -0x15A1; + gCourseMinZ = -0x15A1; + + gCourseMaxX = 0x15A1; + gCourseMaxY = 0x15A1; + gCourseMaxZ = 0x15A1; D_8015F59C = 0; D_8015F5A0 = 0; D_8015F58C = 0; diff --git a/src/ending/code_80281780.c b/src/ending/code_80281780.c index f95eb767f..683c72f00 100644 --- a/src/ending/code_80281780.c +++ b/src/ending/code_80281780.c @@ -117,13 +117,13 @@ void load_ceremony_cutscene(void) { set_segment_base_addr(6, (void *) decompress_segments((u8 *) &_course_banshee_boardwalk_dl_mio0SegmentRomStart, (u8 *) &_course_yoshi_valley_dl_mio0SegmentRomStart)); D_8015F8E4 = -2000.0f; - D_8015F6EA = -0x15A1; - D_8015F6EE = -0x15A1; - D_8015F6F2 = -0x15A1; + gCourseMinX = -0x15A1; + gCourseMinY = -0x15A1; + gCourseMinZ = -0x15A1; - D_8015F6E8 = 0x15A1; - D_8015F6EC = 0x15A1; - D_8015F6F0 = 0x15A1; + gCourseMaxX = 0x15A1; + gCourseMaxY = 0x15A1; + gCourseMaxZ = 0x15A1; D_8015F59C = 0; D_8015F5A0 = 0; diff --git a/src/main.c b/src/main.c index 007944509..6b6296d30 100644 --- a/src/main.c +++ b/src/main.c @@ -595,7 +595,7 @@ void race_logic_loop(void) { gCourseTimer += COURSE_TIMER_ITER; } func_802909F0(); - evaluate_player_collision(); + evaluate_collision_for_players_and_actors(); func_800382DC(); func_8001EE98(gPlayerOneCopy, camera1, 0); func_80028F70(); @@ -660,7 +660,7 @@ void race_logic_loop(void) { gCourseTimer += COURSE_TIMER_ITER; } func_802909F0(); - evaluate_player_collision(); + evaluate_collision_for_players_and_actors(); func_800382DC(); func_8001EE98(gPlayerOneCopy, camera1, 0); func_80029060(); @@ -706,7 +706,7 @@ void race_logic_loop(void) { gCourseTimer += COURSE_TIMER_ITER; } func_802909F0(); - evaluate_player_collision(); + evaluate_collision_for_players_and_actors(); func_800382DC(); func_8001EE98(gPlayerOneCopy, camera1, 0); func_80029060(); @@ -774,7 +774,7 @@ void race_logic_loop(void) { gCourseTimer += COURSE_TIMER_ITER; } func_802909F0(); - evaluate_player_collision(); + evaluate_collision_for_players_and_actors(); func_800382DC(); func_8001EE98(gPlayerOneCopy, camera1, 0); func_80029158(); diff --git a/src/player_controller.c b/src/player_controller.c index e13ded918..334f9ea5e 100644 --- a/src/player_controller.c +++ b/src/player_controller.c @@ -864,7 +864,7 @@ void func_8002934C(Player *player, Camera *camera, s8 arg2, s8 playerId) { player->unk_0CC[arg2] = func_802B7C40(temp_f0 / temp_f2) * 2; } } - if ((player->effects & 0x04000000) == 0x04000000) { + if ((player->effects & HIT_EFFECT) == HIT_EFFECT) { player->unk_0CC[arg2] = (s16) ((s32) player->unk_D9C); } if ((player->effects & 8) != 8) { @@ -879,7 +879,7 @@ void func_8002934C(Player *player, Camera *camera, s8 arg2, s8 playerId) { } player->unk_0D4[arg2] = (s16) ((s32) (((f64) func_802B7C40(var_f0 / temp_f2)) * 0.5)); } - if ((player->effects & 0x04000000) == 0x04000000) { + if ((player->effects & HIT_EFFECT) == HIT_EFFECT) { player->unk_0D4[arg2] = (s16) ((s32) player->unk_D9C); } func_80029200(player, arg2); @@ -1538,8 +1538,8 @@ void apply_sound_effect(Player *player, s8 playerId, UNUSED s8 arg2) { if ((player->soundEffects & 0x20000) == 0x20000) { func_8008D7B0(player, playerId); } - if ((player->soundEffects & 0x100) == 0x100) { - func_8008DABC(player, playerId); + if ((player->soundEffects & HIT_SOUND_EFFECT) == HIT_SOUND_EFFECT) { + apply_hit_sound_effect(player, playerId); } if ((player->soundEffects & HIT_ROTATING_SOUND_EFFECT) == HIT_ROTATING_SOUND_EFFECT) { apply_hit_rotating_sound_effect(player, playerId); @@ -1595,7 +1595,7 @@ void func_8002B5C0(Player *player, UNUSED s8 playerId, UNUSED s8 arg2) { if ((player->effects & 0x800000) == 0x800000) { player->soundEffects &= 0xFE1D0478; } - if ((player->effects & 0x04000000) == 0x04000000) { + if ((player->effects & HIT_EFFECT) == HIT_EFFECT) { player->soundEffects &= 0xFE1D0578; } if ((player->effects & 0x01000000) == 0x01000000) { @@ -2094,8 +2094,8 @@ void apply_effect(Player *player, s8 arg1, s8 arg2) { if ((player->effects & BOOST_RAMP_WOOD_EFFECT) == BOOST_RAMP_WOOD_EFFECT) { apply_boost_ramp_wood_effect(player); } - if ((s32)(player->effects & 0x04000000) == 0x04000000) { - func_8008DC08(player, arg1); + if ((s32)(player->effects & HIT_EFFECT) == HIT_EFFECT) { + apply_hit_effect(player, arg1); } if ((player->effects & LIGHTNING_EFFECT) == LIGHTNING_EFFECT) { apply_lightning_effect(player, arg1); @@ -2312,7 +2312,7 @@ void func_8002D268(Player *player, UNUSED Camera *camera, s8 arg2, s8 playerId) sp98[2] += (((((f64) ((sp184[2] + spAC) + sp160[2])) - (sp98[2] * (0.12 * ((f64) player->kartFriction)))) / 6000.0) / 30.0); } sp98[1] += (((((f64) ((sp184[1] + spB0) + sp160[1])) - (sp98[1] * (0.12 * ((f64) player->kartFriction)))) / 6000.0) / ((f64) player->unk_DAC)); - if (((((player->unk_0CA & 2) == 2) || ((player->unk_0CA & 8) == 8)) || ((player->effects & 0x04000000) == 0x04000000)) || (player->unk_0CA & 1)) { + if (((((player->unk_0CA & 2) == 2) || ((player->unk_0CA & 8) == 8)) || ((player->effects & HIT_EFFECT) == HIT_EFFECT)) || (player->unk_0CA & 1)) { sp98[0] = 0.0f; sp98[1] = 0.0f; sp98[2] = 0.0f; @@ -2334,7 +2334,7 @@ void func_8002D268(Player *player, UNUSED Camera *camera, s8 arg2, s8 playerId) if (((((player->unk_0CA & 2) != 2) && ((player->unk_0CA & 8) != 8)) - && ((player->effects & 0x04000000) != 0x04000000)) + && ((player->effects & HIT_EFFECT) != HIT_EFFECT)) && (!(player->unk_0CA & 1))) { func_8002AAC0(player); spF8 += player->kartHopVelocity; @@ -4292,7 +4292,7 @@ void func_8003680C(Player *player, s16 arg1) { (player->effects & 0x20000) || (player->effects & 0x01000000) || (player->effects & HIT_BY_ITEM_EFFECT) || - (player->effects & 0x04000000))) { + (player->effects & HIT_EFFECT))) { if (!(((player->unk_094 / 18.0f) * 216.0f) >= 110.0f)) { player->effects &= ~0x20000000; player->unk_228 = 0; @@ -4638,7 +4638,7 @@ void func_80037CFC(Player *player, struct Controller *controller, s8 arg2) { ((player->effects & 0x01000000) != 0x01000000) && ((player->effects & HIT_BY_ITEM_EFFECT) != HIT_BY_ITEM_EFFECT) && ((player->effects & 0x10000) != 0x10000) && ((player->effects & 0x20000) != 0x20000)) { - if (((player->effects & 0x04000000) != 0x04000000) && + if (((player->effects & HIT_EFFECT) != HIT_EFFECT) && ((player->effects & 8) != 8) && ((player->effects & 2) != 2) && ((player->effects & 0x10) != 0x10) && diff --git a/src/racing/actors.c b/src/racing/actors.c index a64022cf2..8d95c2096 100644 --- a/src/racing/actors.c +++ b/src/racing/actors.c @@ -45,18 +45,20 @@ void cleanup_red_and_green_shells(struct ShellActor *shell) { s32 actorIndex; struct ShellActor *compare; + // try finding the dead green shell for (actorIndex = gNumPermanentActors; actorIndex < ACTOR_LIST_SIZE; actorIndex++) { compare = (struct ShellActor *)&gActorList[actorIndex]; if ((shell != compare) && !(compare->flags & ACTOR_IS_NOT_EXPIRED) && (compare->type == ACTOR_GREEN_SHELL)) { if (compare->state == MOVING_SHELL) { - func_8000EE58(actorIndex); + delete_actor_in_unexpired_actor_list(actorIndex); } - gNumSpawnedShells -= 1; + gNumSpawnedShells--; destroy_actor((struct Actor *)compare); return; } } + // try finding the dead red shell for (actorIndex = gNumPermanentActors; actorIndex < ACTOR_LIST_SIZE; actorIndex++) { compare = (struct ShellActor *) &gActorList[actorIndex]; if ((shell != compare) && !(compare->flags & ACTOR_IS_NOT_EXPIRED) && (compare->type == ACTOR_RED_SHELL)) { @@ -67,7 +69,7 @@ void cleanup_red_and_green_shells(struct ShellActor *shell) { case GREEN_SHELL_HIT_A_RACER: case BLUE_SHELL_LOCK_ON: case BLUE_SHELL_TARGET_ELIMINATED: - func_8000EE58(actorIndex); + delete_actor_in_unexpired_actor_list(actorIndex); case DESTROYED_SHELL: gNumSpawnedShells -= 1; destroy_actor((struct Actor *)compare); @@ -78,12 +80,13 @@ void cleanup_red_and_green_shells(struct ShellActor *shell) { } } + // try finding the green shell for (actorIndex = gNumPermanentActors; actorIndex < ACTOR_LIST_SIZE; actorIndex++) { compare = (struct ShellActor *) &gActorList[actorIndex]; if ((shell != compare) && (compare->type == ACTOR_GREEN_SHELL)) { switch(compare->state) { case MOVING_SHELL: - func_8000EE58(actorIndex); + delete_actor_in_unexpired_actor_list(actorIndex); case DESTROYED_SHELL: gNumSpawnedShells -= 1; destroy_actor((struct Actor *)compare); @@ -92,6 +95,7 @@ void cleanup_red_and_green_shells(struct ShellActor *shell) { } } + // try finding the red or blue shell for (actorIndex = gNumPermanentActors; actorIndex < ACTOR_LIST_SIZE; actorIndex++) { compare = (struct ShellActor *)&gActorList[actorIndex]; if ((shell != compare) && (compare->type == ACTOR_RED_SHELL)) { @@ -102,7 +106,7 @@ void cleanup_red_and_green_shells(struct ShellActor *shell) { case GREEN_SHELL_HIT_A_RACER: case BLUE_SHELL_LOCK_ON: case BLUE_SHELL_TARGET_ELIMINATED: - func_8000EE58(actorIndex); + delete_actor_in_unexpired_actor_list(actorIndex); case DESTROYED_SHELL: gNumSpawnedShells -= 1; destroy_actor((struct Actor *)compare); @@ -125,188 +129,188 @@ void actor_init(struct Actor *actor, Vec3f startingPos, Vec3s startingRot, Vec3f actor->boundingBoxSize = 0.0f; func_802AAAAC(&actor->unk30); switch (actorType) { - case ACTOR_BOX_TRUCK: - if ((s32) D_802BA260 >= 3) { - D_802BA260 = 0; - } - actor->state = (s16) D_802BA260; - D_802BA260 += 1; - break; - case ACTOR_YOSHI_VALLEY_EGG: - actor->flags |= 0x4000; - actor->unk_08 = 70.0f; - actor->boundingBoxSize = 20.0f; - actor->velocity[0] = actor->pos[0]; - actor->velocity[1] = actor->pos[1]; - actor->velocity[2] = actor->pos[2] + 70.0f; - break; - case ACTOR_KIWANO_FRUIT: - actor->state = 0; - actor->rot[0] = 0; - actor->rot[1] = 0; - actor->rot[2] = 0; - actor->boundingBoxSize = 2.0f; - break; - case ACTOR_FALLING_ROCK: - actor->flags |= 0x4000; - actor->boundingBoxSize = 10.0f; - break; - case ACTOR_TRAIN_ENGINE: - actor->unk_08 = 10.0f; - break; - case ACTOR_BANANA: - actor->flags = actor->flags | 0x4000 | 0x1000; - actor->boundingBoxSize = 2.0f; - break; - case ACTOR_GREEN_SHELL: - gNumSpawnedShells += 1; - actor->unk_04 = 0; - actor->boundingBoxSize = 4.0f; - actor->flags = actor->flags | 0x4000 | 0x2000 | 0x1000; - if ((s32) gNumSpawnedShells >= 0x15) { - cleanup_red_and_green_shells((struct ShellActor *) actor); - } - break; - case ACTOR_RED_SHELL: - gNumSpawnedShells += 1; - actor->unk_04 = 0; - actor->boundingBoxSize = 4.0f; - actor->flags = actor->flags | 0x4000 | 0x2000 | 0x1000; - if ((s32) gNumSpawnedShells >= 0x15) { - cleanup_red_and_green_shells((struct ShellActor *) actor); - } - break; - case 2: - gNumSpawnedShells += 1; - actor->flags |= 0x4000; - actor->state = 0x0043; - actor->boundingBoxSize = 3.0f; - actor->unk_08 = 20.0f; - break; - case 3: - actor->flags |= 0x4000; - actor->state = 0x0043; - actor->boundingBoxSize = 3.0f; - actor->unk_08 = 23.0f; - break; - case 4: - actor->flags |= 0x4000; - actor->state = 0x0043; - actor->boundingBoxSize = 3.0f; - actor->unk_08 = 17.0f; - break; - case 19: - actor->state = 0x0043; - actor->flags = -0x8000; - actor->boundingBoxSize = 3.0f; - actor->unk_08 = 17.0f; - break; - case 26: - actor->flags |= 0x4000; - actor->state = 0x0043; - actor->boundingBoxSize = 3.0f; - actor->unk_08 = 17.0f; - break; - case 28: - actor->state = 0x0043; - actor->flags = -0x8000; - actor->boundingBoxSize = 3.0f; - actor->unk_08 = 17.0f; - break; - case 33: - actor->flags |= 0x4000; - actor->state = 0x0043; - actor->boundingBoxSize = 3.0f; - actor->unk_08 = 17.0f; - break; - case 29: - actor->flags |= 0x4000; - actor->state = 0x0043; - actor->boundingBoxSize = 3.0f; - actor->unk_08 = 17.0f; - break; - case 30: - actor->flags |= 0x4000; - actor->state = 0x0019; - actor->boundingBoxSize = 3.0f; - actor->unk_08 = 7.0f; - break; - case 31: - actor->flags |= 0x4000; - actor->state = 0x0019; - actor->boundingBoxSize = 3.0f; - actor->unk_08 = 7.0f; - break; - case 32: - actor->flags |= 0x4000; - actor->state = 0x0019; - actor->boundingBoxSize = 3.0f; - actor->unk_08 = 7.0f; - break; - case ACTOR_PALM_TREE: - actor->flags |= 0x4000; - actor->state = 0x003C; - actor->boundingBoxSize = 3.0f; - actor->unk_08 = 13.0f; - break; - case ACTOR_FAKE_ITEM_BOX: - actor->flags = actor->flags | 0x4000 | 0x1000; - actor->unk_08 = 0.35f; - actor->boundingBoxSize = 1.925f; - func_802ADDC8(&actor->unk30, 1.925f, actor->pos[0], actor->pos[1], actor->pos[2]); - break; - case ACTOR_HOT_AIR_BALLOON_ITEM_BOX: - actor->flags |= 0x4000; - actor->unk_04 = 0; - actor->state = 5; - actor->boundingBoxSize = 5.5f; - break; - case ACTOR_ITEM_BOX: - actor->flags |= 0x4000; - actor->unk_04 = 0; - actor->state = 0; - actor->boundingBoxSize = 5.5f; - break; - case ACTOR_PIRANHA_PLANT: - actor->flags |= 0x4000; - actor->state = 0x001E; - actor->boundingBoxSize = 5.0f; - break; - default: - break; + case ACTOR_BOX_TRUCK: + if ((s32) D_802BA260 >= 3) { + D_802BA260 = 0; + } + actor->state = (s16) D_802BA260; + D_802BA260 += 1; + break; + case ACTOR_YOSHI_EGG: + actor->flags |= 0x4000; + actor->unk_08 = 70.0f; + actor->boundingBoxSize = 20.0f; + actor->velocity[0] = actor->pos[0]; + actor->velocity[1] = actor->pos[1]; + actor->velocity[2] = actor->pos[2] + 70.0f; + break; + case ACTOR_KIWANO_FRUIT: + actor->state = 0; + actor->rot[0] = 0; + actor->rot[1] = 0; + actor->rot[2] = 0; + actor->boundingBoxSize = 2.0f; + break; + case ACTOR_FALLING_ROCK: + actor->flags |= 0x4000; + actor->boundingBoxSize = 10.0f; + break; + case ACTOR_TRAIN_ENGINE: + actor->unk_08 = 10.0f; + break; + case ACTOR_BANANA: + actor->flags = actor->flags | 0x4000 | 0x1000; + actor->boundingBoxSize = 2.0f; + break; + case ACTOR_GREEN_SHELL: + gNumSpawnedShells += 1; + actor->unk_04 = 0; + actor->boundingBoxSize = 4.0f; + actor->flags = actor->flags | 0x4000 | 0x2000 | 0x1000; + if ((s32) gNumSpawnedShells >= 0x15) { + cleanup_red_and_green_shells((struct ShellActor *) actor); + } + break; + case ACTOR_RED_SHELL: + gNumSpawnedShells += 1; + actor->unk_04 = 0; + actor->boundingBoxSize = 4.0f; + actor->flags = actor->flags | 0x4000 | 0x2000 | 0x1000; + if ((s32) gNumSpawnedShells >= 0x15) { + cleanup_red_and_green_shells((struct ShellActor *) actor); + } + break; + case ACTOR_TREE_MARIO_RACEWAY: + gNumSpawnedShells += 1; + actor->flags |= 0x4000; + actor->state = 0x0043; + actor->boundingBoxSize = 3.0f; + actor->unk_08 = 20.0f; + break; + case ACTOR_TREE_YOSHI_VALLEY: + actor->flags |= 0x4000; + actor->state = 0x0043; + actor->boundingBoxSize = 3.0f; + actor->unk_08 = 23.0f; + break; + case ACTOR_TREE_ROYAL_RACEWAY: + actor->flags |= 0x4000; + actor->state = 0x0043; + actor->boundingBoxSize = 3.0f; + actor->unk_08 = 17.0f; + break; + case ACTOR_TREE_MOO_MOO_FARM: + actor->state = 0x0043; + actor->flags = -0x8000; + actor->boundingBoxSize = 3.0f; + actor->unk_08 = 17.0f; + break; + case 26: + actor->flags |= 0x4000; + actor->state = 0x0043; + actor->boundingBoxSize = 3.0f; + actor->unk_08 = 17.0f; + break; + case 28: + actor->state = 0x0043; + actor->flags = -0x8000; + actor->boundingBoxSize = 3.0f; + actor->unk_08 = 17.0f; + break; + case 33: + actor->flags |= 0x4000; + actor->state = 0x0043; + actor->boundingBoxSize = 3.0f; + actor->unk_08 = 17.0f; + break; + case 29: + actor->flags |= 0x4000; + actor->state = 0x0043; + actor->boundingBoxSize = 3.0f; + actor->unk_08 = 17.0f; + break; + case 30: + actor->flags |= 0x4000; + actor->state = 0x0019; + actor->boundingBoxSize = 3.0f; + actor->unk_08 = 7.0f; + break; + case 31: + actor->flags |= 0x4000; + actor->state = 0x0019; + actor->boundingBoxSize = 3.0f; + actor->unk_08 = 7.0f; + break; + case 32: + actor->flags |= 0x4000; + actor->state = 0x0019; + actor->boundingBoxSize = 3.0f; + actor->unk_08 = 7.0f; + break; + case ACTOR_PALM_TREE: + actor->flags |= 0x4000; + actor->state = 0x003C; + actor->boundingBoxSize = 3.0f; + actor->unk_08 = 13.0f; + break; + case ACTOR_FAKE_ITEM_BOX: + actor->flags = actor->flags | 0x4000 | 0x1000; + actor->unk_08 = 0.35f; + actor->boundingBoxSize = 1.925f; + func_802ADDC8(&actor->unk30, 1.925f, actor->pos[0], actor->pos[1], actor->pos[2]); + break; + case ACTOR_HOT_AIR_BALLOON_ITEM_BOX: + actor->flags |= 0x4000; + actor->unk_04 = 0; + actor->state = 5; + actor->boundingBoxSize = 5.5f; + break; + case ACTOR_ITEM_BOX: + actor->flags |= 0x4000; + actor->unk_04 = 0; + actor->state = 0; + actor->boundingBoxSize = 5.5f; + break; + case ACTOR_PIRANHA_PLANT: + actor->flags |= 0x4000; + actor->state = 0x001E; + actor->boundingBoxSize = 5.0f; + break; + default: + break; } } -void func_80297230(Camera *arg0, struct Actor *arg1) { +void actor_not_rendered(Camera *arg0, struct Actor *arg1) { switch(arg0 - camera1) { - case 0: - arg1->flags &= ~1; + case PLAYER_ONE: + arg1->flags &= ~(1<flags &= ~2; + case PLAYER_TWO: + arg1->flags &= ~(1<flags &= ~4; + case PLAYER_THREE: + arg1->flags &= ~(1<flags &= ~8; + case PLAYER_FOUR: + arg1->flags &= ~(1<flags |= 1; + case PLAYER_ONE: + arg1->flags |= 1<flags |= 2; + case PLAYER_TWO: + arg1->flags |= 1<flags |= 4; + case PLAYER_THREE: + arg1->flags |= 1<flags |= 8; + case PLAYER_FOUR: + arg1->flags |= 1<boundingBoxCorners[1].unk_14 &= 0xFFFD; - arg0->boundingBoxCorners[0].unk_14 &= 0xFFFD; - arg0->boundingBoxCorners[3].unk_14 &= 0xFFFD; - arg0->boundingBoxCorners[2].unk_14 &= 0xFFFD; + arg0->boundingBoxCorners[1].unk_14 &= ~2 & 0xFFFF; + arg0->boundingBoxCorners[0].unk_14 &= ~2 & 0xFFFF; + arg0->boundingBoxCorners[3].unk_14 &= ~2 & 0xFFFF; + arg0->boundingBoxCorners[2].unk_14 &= ~2 & 0xFFFF; } // Invert green and red on green shell texture @@ -402,7 +406,7 @@ void init_red_shell_texture(void) { blue_color = color_pixel & 0x3E; alpha_color = color_pixel & 0x1; - *red_shell_texture = (red_color >> 5) | (green_color << 5) | blue_color | alpha_color; // Invert color + *red_shell_texture = (red_color >> 5) | (green_color << 5) | blue_color | alpha_color; // Invert green to red green_shell_texture++; red_shell_texture++; } @@ -410,80 +414,35 @@ void init_red_shell_texture(void) { UNUSED void func_80297944(void) {}; -void func_8029794C(Vec3f arg0, Vec3s arg1, f32 arg2) { +void func_8029794C(Vec3f pos, Vec3s rot, f32 scale) { Mat4 sp20; - arg0[1] += 2.0f; + pos[1] += 2.0f; - mtxf_pos_rotation_xyz(sp20, arg0, arg1); - mtxf_scale(sp20, arg2); + mtxf_pos_rotation_xyz(sp20, pos, rot); + mtxf_scale(sp20, scale); if (render_set_position(sp20, 0) != 0) { - gSPDisplayList(gDisplayListHead++, D_0D007B20); - arg0[1] -= 2.0f; + pos[1] -= 2.0f; } } void func_802979F8(struct Actor *arg0, UNUSED f32 arg1) { - Vec3f sp24; - Vec3s sp1C; + Vec3f pos; + Vec3s rot; if (arg0->unk30.unk34 != 0) { - func_802976EC(&arg0->unk30, sp1C); // arg0 + 0x30 - func_80297760(arg0, sp24); - func_8029794C(sp24, sp1C, 0.45f); + func_802976EC(&arg0->unk30, rot); // arg0 + 0x30 + func_80297760(arg0, pos); + func_8029794C(pos, rot, 0.45f); } } -void render_actor_cow(Camera *camera, Mat4 arg1, struct Actor *arg2) { - if (is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f) < 0) { return; } +#include "actors/cow/render.inc.c" - arg1[3][0] = arg2->pos[0]; - arg1[3][1] = arg2->pos[1]; - arg1[3][2] = arg2->pos[2]; +#include "actors/yoshi_egg/update.inc.c" - if (render_set_position(arg1, 0) != 0) { - switch (arg2->state) { - case 0: - gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_dl_cow1); - break; - case 1: - gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_dl_cow2); - break; - case 2: - gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_dl_cow3); - break; - case 3: - gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_dl_cow4); - break; - case 4: - gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_dl_cow5); - break; - } - } -} - -void update_actor_yoshi_valley_egg(struct YoshiValleyEgg *egg) { - egg->pathRot += 0x5B; - egg->pos[0] = egg->pathCenter[0] + (sins(egg->pathRot) * egg->pathRadius); - egg->pos[2] = egg->pathCenter[2] + (coss(egg->pathRot) * egg->pathRadius); - if ((egg->flags & 0x400) != 0) { - egg->pathCenter[1] -= 0.12; - if (egg->pathCenter[1] < -3.0f) { - egg->pathCenter[1] = -3.0f; - } - egg->pos[1] += egg->pathCenter[1]; - if (egg->pos[1] < 0.0f) { - egg->pos[1] = 0.0f; - egg->pathCenter[1] = 0.0f; - egg->flags &= ~(1 << 10); - } - egg->eggRot -= 0x4FA; - } - egg->eggRot -= 0x222; -} - -void update_actor_trees_cacti_shrubs(struct Actor *arg0) { +void update_actor_static_plant(struct Actor *arg0) { if (((arg0->flags & 0x800) == 0) && ((arg0->flags & 0x400) != 0)) { arg0->pos[1] = arg0->pos[1] + 4.0f; if (arg0->pos[1] > 800.0f) { @@ -492,240 +451,17 @@ void update_actor_trees_cacti_shrubs(struct Actor *arg0) { } } -void update_actor_kiwano_fruit(struct KiwanoFruit *fruit) { - Player *player; - f32 temp_f2; - f32 temp_f16; - f32 temp_f14; - f32 temp_f12; - s32 nearestWaypoint; - - player = &gPlayers[fruit->targetPlayer]; - if (((player->type & PLAYER_CPU) != 0) || (player->unk_110.unk34 == 0)) { - fruit->state = 0; - return; - } - switch (fruit->state) { /* irregular */ - case 0: - if ((get_surface_type(player->unk_110.unk3A) & 0xFF) != GRASS) { - return; - } - fruit->state = 1; - fruit->velocity[0] = 80.0f; - case 1: - nearestWaypoint = gNearestWaypointByPlayerId[(u16)(player - gPlayerOne)]; - temp_f2 = player->pos[0] - D_80164490[nearestWaypoint].posX; - temp_f16 = player->pos[1] - D_80164490[nearestWaypoint].posY; - temp_f14 = player->pos[2] - D_80164490[nearestWaypoint].posZ; - temp_f12 = fruit->velocity[0] / sqrtf((temp_f2 * temp_f2) + (temp_f16 * temp_f16) + (temp_f14 * temp_f14)); - temp_f2 *= temp_f12; - temp_f16 *= temp_f12; - temp_f14 *= temp_f12; - fruit->pos[0] = player->pos[0] + temp_f2; - fruit->pos[1] = player->pos[1] + temp_f16; - fruit->pos[2] = player->pos[2] + temp_f14; - fruit->velocity[0] -= 2.0f; - if (fruit->velocity[0] <= 0.0f) { - fruit->state = 2; - fruit->bonkTimer = 30.0f; - fruit->velocity[0] = 0.0f; - fruit->velocity[1] = 2.3f; - fruit->velocity[2] = 0.0f; - if ((player->effects & STAR_EFFECT) != 0) { - func_800C9060(player - gPlayerOne, SOUND_ARG_LOAD(0x19, 0x00, 0xA0, 0x52)); - } else { - player->effects |= 0x8000; - player->pos[0] -= temp_f2 * 4.0f; - player->pos[2] -= temp_f14 * 4.0f; - player->velocity[0] -= temp_f2 * 0.7f; - player->velocity[2] -= temp_f14 * 0.7f; - func_800C9060(player - gPlayerOne, SOUND_ARG_LOAD(0x19, 0x00, 0x70, 0x18)); - if (gModeSelection != GRAND_PRIX) { - D_80162DF8 = 1; - } - } - } - break; - case 2: - fruit->velocity[1] -= 0.3f; - fruit->pos[0] += fruit->velocity[0]; - fruit->pos[1] += fruit->velocity[1]; - fruit->pos[2] += fruit->velocity[2]; - fruit->bonkTimer -= 1.0f; - if (fruit->bonkTimer < 0.0f) { - fruit->state = 0; - } - break; - default: - break; - } - if (fruit->state != 0) { - fruit->animTimer += 1; - if (fruit->animTimer == 8) { - fruit->animTimer = 0; - fruit->animState += 1; - if (fruit->animState == 3) { - fruit->animState = 0; - } - } - } -} +#include "actors/kiwano_fruit/update.inc.c" #include "actors/paddle_boat/update.inc.c" -#include "actors/train.inc.c" +#include "actors/train/update.inc.c" -void update_actor_piranha_plant(struct PiranhaPlant *arg0) { - if ((arg0->flags & 0x800) == 0) { - if ((arg0->flags & 0x400) != 0) { - arg0->pos[1] += 4.0f; - if (arg0->pos[1] > 800.0f) { - arg0->flags |= 0x800; - } - } else { - // This has to be an unrolled loop - if (arg0->visibilityStates[0] == 1) { - arg0->timers[0]++; - if (arg0->timers[0] > 60) { - arg0->timers[0] = 6; - } - } else { - arg0->timers[0] = 0; - } - if (arg0->visibilityStates[1] == 1) { - arg0->timers[1]++; - if (arg0->timers[1] > 60) { - arg0->timers[1] = 6; - } - } else { - arg0->timers[1] = 0; - } - if (arg0->visibilityStates[2] == 1) { - arg0->timers[2]++; - if (arg0->timers[2] > 60) { - arg0->timers[2] = 6; - } - } else { - arg0->timers[2] = 0; - } - if (arg0->visibilityStates[3] == 1) { - arg0->timers[3]++; - if (arg0->timers[3] > 60) { - arg0->timers[3] = 6; - } - } else { - arg0->timers[3] = 0; - } - } - } -} +#include "actors/piranha_plant/update.inc.c" -// Mario Raceway Load piranha plant textures? -void render_actor_piranha_plant(Camera *arg0, Mat4 arg1, struct PiranhaPlant *arg2) { - UNUSED s32 pad; - u8 *addr; - s16 temp_lo = arg0 - camera1; - s16 animationFrame; // unconfirmed - s16 temp = arg2->flags; - f32 temp_f0; - s32 maxObjectsReached; +#include "actors/piranha_plant/render.inc.c" - if (temp & 0x800) { return; } - - temp_f0 = is_within_render_distance(arg0->pos, arg2->pos, arg0->rot[1], 0, gCameraZoom[arg0 - camera1], 1000000.0f); - - if (temp_f0 < 0.0f) { - - switch(temp_lo) { - case 0: - arg2->visibilityStates[0] = -1; - break; - case 1: - arg2->visibilityStates[1] = -1; - break; - case 2: - arg2->visibilityStates[2] = -1; - break; - case 3: - arg2->visibilityStates[3] = -1; - break; - - } - return; - } - arg1[3][0] = arg2->pos[0]; - arg1[3][1] = arg2->pos[1]; - arg1[3][2] = arg2->pos[2]; - maxObjectsReached = render_set_position(arg1, 0) == 0; - if (maxObjectsReached) { return; } - - if (90000.0f < temp_f0) { - - switch(temp_lo) { - case 0: - arg2->visibilityStates[0] = 0; - break; - case 1: - arg2->visibilityStates[1] = 0; - break; - case 2: - arg2->visibilityStates[2] = 0; - break; - case 3: - arg2->visibilityStates[3] = 0; - break; - } - animationFrame = 0; - - } else { - switch(temp_lo) { - case 0: - arg2->visibilityStates[0] = 1; - break; - case 1: - arg2->visibilityStates[1] = 1; - break; - case 2: - arg2->visibilityStates[2] = 1; - break; - case 3: - arg2->visibilityStates[3] = 1; - break; - } - - switch(temp_lo) { - case 0: - animationFrame = arg2->timers[0]; - break; - case 1: - animationFrame = arg2->timers[1]; - break; - case 2: - animationFrame = arg2->timers[2]; - break; - case 3: - animationFrame = arg2->timers[3]; - break; - } - } - animationFrame /= 6; - - if (animationFrame > 8) { - animationFrame = 8; - } - addr = D_802BA058 + (animationFrame << 0xB); - gDPLoadTextureBlock(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(addr), G_IM_FMT_CI, G_IM_SIZ_8b, 32, 64, 0, - G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - - - if (gCurrentCourseId == COURSE_MARIO_RACEWAY) { - gSPDisplayList(gDisplayListHead++, &d_course_mario_raceway_dl_piranha_plant); - } else { - gSPDisplayList(gDisplayListHead++, &d_course_royal_raceway_dl_piranha_plant); - } -} - -void func_802986B4(Camera *camera, Mat4 arg1, UNUSED struct Actor *actor) { +void render_cows(Camera *camera, Mat4 arg1, UNUSED struct Actor *actor) { u16 temp_s1; f32 temp_f0; struct ActorSpawnData *var_t1; @@ -743,7 +479,7 @@ void func_802986B4(Camera *camera, Mat4 arg1, UNUSED struct Actor *actor) { gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2); var_s5 = NULL; var_s1 = var_t1; - while (var_s1->pos[0] != (-0x8000)) { + while (var_s1->pos[0] != END_OF_SPAWN_DATA) { sp88[0] = var_s1->pos[0] * gCourseDirection; sp88[1] = var_s1->pos[1]; sp88[2] = var_s1->pos[2]; @@ -799,17 +535,17 @@ void func_802986B4(Camera *camera, Mat4 arg1, UNUSED struct Actor *actor) { } } -void func_80298AC0(Player *player) { - Vec3f sp64; +void evaluate_collision_player_palm_trees(Player *player) { + Vec3f pos; s32 segment = SEGMENT_NUMBER2(d_course_dks_jungle_parkway_tree_spawn); s32 offset = SEGMENT_OFFSET(d_course_dks_jungle_parkway_tree_spawn); struct UnkActorSpawnData *data = (struct UnkActorSpawnData *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset); - while (data->pos[0] != -0x8000) { - sp64[0] = data->pos[0] * gCourseDirection; - sp64[1] = data->pos[1]; - sp64[2] = data->pos[2]; - if (func_8029EEB8(player, sp64, 5.0f, 40.0f, 0.8f) == 1) { + while (data->pos[0] != END_OF_SPAWN_DATA) { + pos[0] = data->pos[0] * gCourseDirection; + pos[1] = data->pos[1]; + pos[2] = data->pos[2]; + if (query_and_resolve_collision_player_actor(player, pos, 5.0f, 40.0f, 0.8f) == COLLISION) { if ((player->effects & STAR_EFFECT) != 0) { func_800C98B8(player->pos, player->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10)); func_800C90F4((u8) (player - gPlayerOne), (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x0D)); @@ -824,13 +560,13 @@ void func_80298AC0(Player *player) { } } -void func_80298C94(void) { +void evaluate_collision_players_palm_trees(void) { s32 index; for (index = 0; index < 4; index++){ - // wtf is up with the << 0x18 >> 0x18? is it some weird type conversion? - if (((gPlayers[index].type & 0xC000) != 0) && (((get_surface_type(gPlayers[index].unk_110.unk3A) << 0x18) >> 0x18) == 8)) { - func_80298AC0(&gPlayers[index]); + // wtf is up with the << 0x18 >> 0x18? is it some weird type conversion? just use & 0xFF have the same effect to keep 8 first bit + if (((gPlayers[index].type & 0xC000) != 0) && (((get_surface_type(gPlayers[index].unk_110.unk3A) << 24) >> 24) == GRASS)) { + evaluate_collision_player_palm_trees(&gPlayers[index]); } } } @@ -840,14 +576,14 @@ void func_80298D10(void) { s32 offset = SEGMENT_OFFSET(d_course_dks_jungle_parkway_tree_spawn); struct UnkActorSpawnData *temp_v1 = (struct UnkActorSpawnData *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset); - while (temp_v1->pos[0] != -0x8000) { + while (temp_v1->pos[0] != END_OF_SPAWN_DATA) { temp_v1->pos[1] = temp_v1->unk8; temp_v1->someId &= 0xF; temp_v1++; } } -void func_80298D7C(Camera *camera, Mat4 arg1, UNUSED struct Actor *actor) { +void render_palm_trees(Camera *camera, Mat4 arg1, UNUSED struct Actor *actor) { s32 segment = SEGMENT_NUMBER2(d_course_dks_jungle_parkway_tree_spawn); s32 offset = SEGMENT_OFFSET(d_course_dks_jungle_parkway_tree_spawn); struct UnkActorSpawnData *var_s1 = (struct UnkActorSpawnData *)VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset); @@ -868,7 +604,7 @@ void func_80298D7C(Camera *camera, Mat4 arg1, UNUSED struct Actor *actor) { gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA); gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2); - while (var_s1->pos[0] != -0x8000) { + while (var_s1->pos[0] != END_OF_SPAWN_DATA) { test = var_s1->someId; if (test & 0x0800) { var_s1++; @@ -925,278 +661,9 @@ dummylabel: } } -void render_actor_tree_mario_raceway(Camera *camera, Mat4 arg1, struct Actor *arg2) { - f32 temp_f0; - s16 temp_v0 = arg2->flags; +#include "actors/trees/render.inc.c" - if ((temp_v0 & 0x800) != 0) { return; } - - temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 16000000.0f); - - if (temp_f0 < 0.0f) { return; } - - if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { - func_8029794C(arg2->pos, arg2->rot, 3.0f); - } - arg1[3][0] = arg2->pos[0]; - arg1[3][1] = arg2->pos[1]; - arg1[3][2] = arg2->pos[2]; - - if (render_set_position(arg1, 0) != 0) { - gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import); - gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_dl_tree); - } -} - -void render_actor_tree_yoshi_valley(Camera *camera, Mat4 arg1, struct Actor *arg2) { - f32 temp_f0; - s16 temp_v0 = arg2->flags; - - if ((temp_v0 & 0x800) != 0) { return; } - - temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); - - if (temp_f0 < 0.0f) { return; } - - if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { - func_8029794C(arg2->pos, arg2->rot, 2.79999995f); - } - arg1[3][0] = arg2->pos[0]; - arg1[3][1] = arg2->pos[1]; - arg1[3][2] = arg2->pos[2]; - - if (render_set_position(arg1, 0) != 0) { - gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import); - gSPDisplayList(gDisplayListHead++, d_course_yoshi_valley_dl_tree); - } -} - -void render_actor_tree_royal_raceway(Camera *camera, Mat4 arg1, struct Actor *arg2) { - f32 temp_f0; - s16 temp_v0 = arg2->flags; - - if ((temp_v0 & 0x800) != 0) { return; } - - temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); - - if (temp_f0 < 0.0f) { return; } - - if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { - func_8029794C(arg2->pos, arg2->rot, 2.79999995f); - } - arg1[3][0] = arg2->pos[0]; - arg1[3][1] = arg2->pos[1]; - arg1[3][2] = arg2->pos[2]; - - if (render_set_position(arg1, 0) != 0) { - gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import); - gSPDisplayList(gDisplayListHead++, d_course_royal_raceway_dl_tree); - } -} - -void render_actor_tree_moo_moo_farm(Camera *camera, Mat4 arg1, struct Actor *arg2) { - f32 temp_f0; - s16 temp_v0 = arg2->flags; - - if ((temp_v0 & 0x800) != 0) { return; } - - temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 6250000.0f); - - if (temp_f0 < 0.0f) { return; } - - if (((temp_v0 & 0x400) == 0) && (temp_f0 < 600.0f)) { - func_8029794C(arg2->pos, arg2->rot, 5.0f); - } - arg1[3][0] = arg2->pos[0]; - arg1[3][1] = arg2->pos[1]; - arg1[3][2] = arg2->pos[2]; - - if (render_set_position(arg1, 0) != 0) { - gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import); - gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_dl_tree); - } -} - -void func_80299864(Camera *camera, Mat4 arg1, struct Actor *arg2) { - f32 temp_f0; - s16 temp_v0 = arg2->flags; - - if ((temp_v0 & 0x800) != 0) { return; } - - temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); - - if (temp_f0 < 0.0f) { return; } - - if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { - func_8029794C(arg2->pos, arg2->rot, 2.79999995f); - } - arg1[3][0] = arg2->pos[0]; - arg1[3][1] = arg2->pos[1]; - arg1[3][2] = arg2->pos[2]; - - if (render_set_position(arg1, 0) != 0) { - gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import); - // Why is a TLUT being used a DL here? That makes no sense - // Based on the TLUT being loaded above, this ought to be be another - // tree related DL, presumably one found in a course other than Moo Moo farm - // 0x0600FC70 - gSPDisplayList(gDisplayListHead++, d_course_moo_moo_farm_mole_tlut); - } -} - -void render_actor_tree_bowser_castle(Camera *camera, Mat4 arg1, struct Actor *arg2) { - f32 temp_f0; - s16 temp_v0 = arg2->flags; - - if ((temp_v0 & 0x800) != 0) { return; } - - temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); - - if (temp_f0 < 0.0f) { return; } - - if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { - func_8029794C(arg2->pos, arg2->rot, 2.79999995f); - } - arg1[3][0] = arg2->pos[0]; - arg1[3][1] = arg2->pos[1]; - arg1[3][2] = arg2->pos[2]; - - if (render_set_position(arg1, 0) != 0) { - gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import); - gSPDisplayList(gDisplayListHead++, d_course_royal_raceway_dl_castle_tree); - } -} - -void render_actor_bush_bowser_castle(Camera *camera, Mat4 arg1, struct Actor *arg2) { - f32 temp_f0; - s16 temp_v0 = arg2->flags; - - if ((temp_v0 & 0x800) != 0) { return; } - - temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 640000.0f); - - if (temp_f0 < 0.0f) { return; } - - if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { - func_8029794C(arg2->pos, arg2->rot, 2.79999995f); - } - arg1[3][0] = arg2->pos[0]; - arg1[3][1] = arg2->pos[1]; - arg1[3][2] = arg2->pos[2]; - - if (render_set_position(arg1, 0) != 0) { - gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import); - gSPDisplayList(gDisplayListHead++, d_course_bowsers_castle_dl_bush); - } -} - -void render_actor_tree_frappe_snowland(Camera *camera, Mat4 arg1, struct Actor *arg2) { - f32 temp_f0; - s16 temp_v0 = arg2->flags; - - if ((temp_v0 & 0x800) != 0) { return; } - - temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); - - if (temp_f0 < 0.0f) { return; } - - if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { - func_8029794C(arg2->pos, arg2->rot, 2.79999995f); - } - arg1[3][0] = arg2->pos[0]; - arg1[3][1] = arg2->pos[1]; - arg1[3][2] = arg2->pos[2]; - - if (render_set_position(arg1, 0) != 0) { - gSPDisplayList(gDisplayListHead++, d_course_frappe_snowland_dl_tree); - } -} - -void render_actor_tree_cactus1_kalimari_desert(Camera *camera, Mat4 arg1, struct Actor *arg2) { - f32 temp_f0; - s16 temp_v0 = arg2->flags; - - if ((temp_v0 & 0x800) != 0) { return; } - - temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); - - if (temp_f0 < 0.0f) { return; } - - if (((temp_v0 & 0x400) == 0) && (temp_f0 < 40000.0f)) { - func_8029794C(arg2->pos, arg2->rot, 1.0f); - } - arg1[3][0] = arg2->pos[0]; - arg1[3][1] = arg2->pos[1]; - arg1[3][2] = arg2->pos[2]; - - if (render_set_position(arg1, 0) != 0) { - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_cactus1); - } -} - -void render_actor_tree_cactus2_kalimari_desert(Camera *camera, Mat4 arg1, struct Actor *arg2) { - f32 temp_f0; - s16 temp_v0 = arg2->flags; - - if ((temp_v0 & 0x800) != 0) { return; } - - temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); - - if (temp_f0 < 0.0f) { return; } - - if (((temp_v0 & 0x400) == 0) && (temp_f0 < 40000.0f)) { - func_8029794C(arg2->pos, arg2->rot, 1.0f); - } - arg1[3][0] = arg2->pos[0]; - arg1[3][1] = arg2->pos[1]; - arg1[3][2] = arg2->pos[2]; - - if (render_set_position(arg1, 0) != 0) { - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_cactus2); - } -} - -void render_actor_tree_cactus3_kalimari_desert(Camera *camera, Mat4 arg1, struct Actor *arg2) { - f32 temp_f0; - s16 temp_v0 = arg2->flags; - - if ((temp_v0 & 0x800) != 0) { return; } - - temp_f0 = is_within_render_distance(camera->pos, arg2->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 4000000.0f); - - if (temp_f0 < 0.0f) { return; } - - if (((temp_v0 & 0x400) == 0) && (temp_f0 < 40000.0f)) { - func_8029794C(arg2->pos, arg2->rot, 0.80000001f); - } - arg1[3][0] = arg2->pos[0]; - arg1[3][1] = arg2->pos[1]; - arg1[3][2] = arg2->pos[2]; - - if (render_set_position(arg1, 0) != 0) { - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_cactus3); - } -} - -void render_actor_kiwano_fruit_dks_jungle_parkway(UNUSED Camera *camera, Mat4 arg1, struct Actor *actor) { - uintptr_t addr; - s32 maxObjectsReached; - - if (actor->state == 0) { return; } - - arg1[3][0] = actor->pos[0]; - arg1[3][1] = actor->pos[1]; - arg1[3][2] = actor->pos[2]; - - maxObjectsReached = render_set_position(arg1, 0) == 0; - if (maxObjectsReached) { return; } - - addr = (actor->rot[0] << 0xA) + 0x03009000; // Can this be a real symbol? Doesn't match. - gDPLoadTextureBlock(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(addr), - G_IM_FMT_CI, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_CLAMP, - G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPDisplayList(gDisplayListHead++, d_course_dks_jungle_parkway_dl_kiwano_fruit); -} +#include "actors/kiwano_fruit/render.inc.c" void render_actor_shell(Camera *camera, Mat4 matrix, struct ShellActor *shell) { UNUSED s16 pad; @@ -1216,11 +683,11 @@ void render_actor_shell(Camera *camera, Mat4 matrix, struct ShellActor *shell) { f32 temp_f0 = is_within_render_distance(camera->pos, shell->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 490000.0f); s32 maxObjectsReached; if (temp_f0 < 0.0f) { - func_80297230(camera, (struct Actor *)shell); + actor_not_rendered(camera, (struct Actor *)shell); return; } - func_802972B8(camera, (struct Actor *) shell); + actor_rendered(camera, (struct Actor *) shell); if (temp_f0 < 40000.0f) { func_802979F8((struct Actor *) shell, 3.4f); } @@ -1261,105 +728,21 @@ UNUSED s16 D_802B8810[] = { 0x0000, 0x0000, 0xffff, 0xffff }; -void render_actor_green_shell(Camera *camera, Mat4 matrix, struct ShellActor *shell) { - gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_green_shell); // set texture - render_actor_shell(camera, matrix, shell); -} +#include "actors/green_shell/render.inc.c" -void render_actor_red_shell(Camera *camera, Mat4 matrix, struct ShellActor *shell) { - gDPLoadTLUT_pal256(gDisplayListHead++, &gTLUTRedShell); // set texture - render_actor_shell(camera, matrix, shell); -} +#include "actors/blue_and_red_shells/render.inc.c" -// Middle of a tlut access -void render_actor_blue_shell(Camera *camera, Mat4 matrix, struct ShellActor *shell) { - gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_blue_shell); // set texture - render_actor_shell(camera, matrix, shell); -} +#include "actors/banana/render.inc.c" -// A little strange this render banana -void render_actor_banana(Camera *camera, UNUSED Mat4 arg1, struct BananaActor *banana) { - UNUSED s32 pad[2]; - s32 maxObjectsReached; - Vec3s sp7C; - Mat4 sp3C; +#include "actors/wario_sign/update.inc.c" - f32 temp = is_within_render_distance(camera->pos, banana->pos, camera->rot[1], 0, gCameraZoom[camera - camera1], 490000.0f); - if (temp < 0.0f) { - func_80297230(camera, (struct Actor *) banana); - return; - } +#include "actors/railroad_crossing/update.inc.c" - if ((banana->pos[1] > D_8015F6EC + 800.0f)) { - func_80297230(camera, (struct Actor *) banana); - return; - } - if (banana->pos[1] < (D_8015F6EE - 800.0f)) { - func_80297230(camera, (struct Actor *) banana); - return; - } - - func_802972B8(camera, (struct Actor *) banana); - - if (banana->state == 5) { - mtxf_pos_rotation_xyz(sp3C, banana->pos, banana->rot); - } else { - sp7C[0] = 0; - sp7C[1] = 0; - sp7C[2] = 0; - mtxf_pos_rotation_xyz(sp3C, banana->pos, sp7C); - } - - maxObjectsReached = render_set_position(sp3C, 0) == 0; - if (maxObjectsReached) { return; } - - if (banana->state != 5) { - gSPDisplayList(gDisplayListHead++, &common_model_banana); - } else { - gSPDisplayList(gDisplayListHead++, &common_model_flat_banana); - } -} - -void update_actor_wario_stadium_sign(struct Actor *arg0) { - arg0->rot[1] += 0xB6; -} - -/** - * If train close activate bell sound according to timing - **/ -void update_actor_railroad_crossing(struct RailroadCrossing *crossing) { - // If train close? - if (isCrossingTriggeredByIndex[crossing->crossingId] != 0) { - // Timer++ - crossing->someTimer++; - // Reset timer - if (crossing->someTimer > 40) { - crossing->someTimer = 1; - } - // Play Bell sound when timer hits 20 or 1. - if ((crossing->someTimer == 1) || (crossing->someTimer == 20)) { - func_800C98B8(crossing->pos, crossing->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x70, 0x16)); - } - } -} - -void update_actor_mario_raceway_sign(struct Actor *arg0) { - if ((arg0->flags & 0x800) == 0) { - if ((arg0->flags & 0x400) != 0) { - arg0->pos[1] += 4.0f; - if (arg0->pos[1] > 800.0f) { - arg0->flags |= 0x800; - arg0->rot[1] += 1820; - } - } else { - arg0->rot[1] += 182; - } - } -} +#include "actors/mario_sign/update.inc.c" UNUSED void func_8029ABD4(f32 *pos, s16 state) { gNumActors = 0; - gActorList[func_8029ED38(pos, 0x0014)].state = state; + gActorList[spawn_actor_at_pos(pos, ACTOR_UNKNOWN_0x14)].state = state; } void func_8029AC18(Camera *camera, Mat4 arg1, struct Actor *arg2) { @@ -1407,495 +790,19 @@ UNUSED void func_8029AE14() { #include "actors/paddle_boat/render.inc.c" -void func_8029B06C(Camera *arg0, struct Actor *arg1) { - UNUSED s32 pad[6]; - Mat4 spD8; - UNUSED s32 pad2[32]; - f32 temp_f0 = is_within_render_distance(arg0->pos, arg1->pos, arg0->rot[1], 2500.0f, gCameraZoom[arg0 - camera1], 9000000.0f); - if (temp_f0 < 0.0f) { return; } +#include "actors/box_truck/render.inc.c" - gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); - gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); +#include "actors/school_bus/render.inc.c" - mtxf_pos_rotation_xyz(spD8, arg1->pos, arg1->rot); - if (render_set_position(spD8, 0) != 0) { +#include "actors/car/render.inc.c" - switch(arg1->state) { - case 0: - gSPDisplayList(gDisplayListHead++, &d_course_toads_turnpike_dl_23858); - break; - case 1: - gSPDisplayList(gDisplayListHead++, &d_course_toads_turnpike_dl_238A0); - break; - case 2: - gSPDisplayList(gDisplayListHead++, &d_course_toads_turnpike_dl_238E8); - break; - } +#include "actors/tanker_truck/render.inc.c" - if (gActiveScreenMode == SCREEN_MODE_1P) { - if (temp_f0 < 160000.0f) { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_0); - } else if (temp_f0 < 640000.0f) { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_1); - } else { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_2); - } - } else if (temp_f0 < 160000.0f) { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_1); - } else { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_2); - } - } -} +#include "actors/train/render.inc.c" -void func_8029B2E4(Camera *arg0, struct Actor *arg1) { - UNUSED s32 pad[6]; - Mat4 spC8; - UNUSED s32 pad2[32]; - f32 temp_f0; +#include "actors/falling_rock/render.inc.c" - temp_f0 = is_within_render_distance(arg0->pos, arg1->pos, arg0->rot[1], 2500.0f, gCameraZoom[arg0 - camera1], 9000000.0f); - if (temp_f0 < 0.0f) { return; } - - gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); - gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - - - mtxf_pos_rotation_xyz(spC8, arg1->pos, arg1->rot); - if (render_set_position(spC8, 0) != 0) { - - if (gActiveScreenMode == SCREEN_MODE_1P) { - if (temp_f0 < 160000.0f) { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_3); - } else if (temp_f0 < 640000.0f) { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_4); - } else { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_5); - } - } else if (temp_f0 < 160000.0f) { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_4); - } else { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_5); - } - } -} - -void func_8029B4E0(Camera *arg0, struct Actor *arg1) { - UNUSED s32 pad[6]; - Mat4 spC8; - UNUSED s32 pad2[32]; - f32 temp_f0 = is_within_render_distance(arg0->pos,arg1->pos, arg0->rot[1], 2500.0f, gCameraZoom[arg0 - camera1], 9000000.0f); - - if (!(temp_f0 < 0.0f)) { - - gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); - gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - - - mtxf_pos_rotation_xyz(spC8, arg1->pos, arg1->rot); - mtxf_scale(spC8, 0.1f); - if (render_set_position(spC8, 0) != 0) { - - if (gActiveScreenMode == SCREEN_MODE_1P) { - if (temp_f0 < 160000.0f) { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_9); - } else if (temp_f0 < 640000.0f) { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_10); - } else { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_11); - } - } else if (temp_f0 < 160000.0f) { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_10); - } else { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_11); - } - } - } -} - -void func_8029B6EC(Camera *camera, struct Actor* arg1) { - UNUSED s32 pad[6]; - Mat4 spC8; - UNUSED s32 pad2[32]; - f32 temp_f0 = is_within_render_distance(camera->pos, arg1->pos, camera->rot[1], 2500.0f, gCameraZoom[camera - camera1], 9000000.0f); - - if (!(temp_f0 < 0.0f)) { - - gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); - gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - - mtxf_pos_rotation_xyz(spC8, arg1->pos, arg1->rot); - if (render_set_position(spC8, 0) != 0) { - - if (gActiveScreenMode == SCREEN_MODE_1P) { - if (temp_f0 < 160000.0f) { - - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_6); - } else if (temp_f0 < 640000.0f) { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_7); - } else { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_8); - } - } else if (temp_f0 < 160000.0f) { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_7); - } else { - gSPDisplayList(gDisplayListHead++, &toads_turnpike_dl_8); - } - } - } -} - -// Spins train wheels? -void render_actor_train_engine(Camera *camera, struct TrainCar *actor) { - UNUSED s32 pad[2]; - s32 maxObjectsReached; - Vec3f sp160; - Mat4 sp120; - Mat4 spE0; - Mat4 spA0; - - f32 distance = is_within_render_distance(camera->pos, actor->pos, camera->rot[1], 2500.0f, gCameraZoom[camera - camera1], 9000000.0f); - - if (distance < 0.0f) { return; } - - gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - - mtxf_pos_rotation_xyz(sp120, actor->pos, actor->rot); - maxObjectsReached = render_set_position(sp120, 0) == 0; - if (maxObjectsReached) { return; } - - if (distance < 122500.0f) { - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1C0F0); - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1B978); - - } else if (distance < 640000.0f) { - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1D670); - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1D160); - } else { - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1E910); - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1E480); - } - if (1440000.0f < distance) { return; } - - gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22D28); - - mtxf_rotate_x(sp120, actor->wheelRot); - vec3f_set(sp160, 17.0f, 6.0f, 32.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - maxObjectsReached = render_set_position(spA0, 3) == 0; - if (maxObjectsReached) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, actor->wheelRot); - vec3f_set(sp160, -17.0, 6.0f, 32.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - maxObjectsReached = render_set_position(spA0, 3) == 0; - if (maxObjectsReached) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x16C)); - vec3f_set(sp160, 17.0f, 6.0f, 16.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - maxObjectsReached = render_set_position(spA0, 3) == 0; - if (maxObjectsReached) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x16C)); - vec3f_set(sp160, -17.0f, 6.0f, 16.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - maxObjectsReached = render_set_position(spA0, 3) == 0; - if (maxObjectsReached) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x444)); - vec3f_set(sp160, 17.0f, 12.0f, -12.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - maxObjectsReached = render_set_position(spA0, 3) == 0; - if (maxObjectsReached) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22D70); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x444)); - vec3f_set(sp160, -17.0f, 12.0f, -12.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - maxObjectsReached = render_set_position(spA0, 3) == 0; - if (maxObjectsReached) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22D70); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x2D8)); - vec3f_set(sp160, 17.0f, 12.0f, -34.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - maxObjectsReached = render_set_position(spA0, 3) == 0; - if (maxObjectsReached) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22D70); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x2D8)); - vec3f_set(sp160, -17.0f, 12.0f, -34.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - maxObjectsReached = render_set_position(spA0, 3) == 0; - if (maxObjectsReached) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22D70); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); -} - -void render_actor_train_tender(Camera *camera, struct TrainCar *actor) { - Mat4 sp120; - Vec3f sp160; - Mat4 spE0; - Mat4 spA0; - - f32 temp_f0 = is_within_render_distance(camera->pos, actor->pos, camera->rot[1], 625.0f, gCameraZoom[camera - camera1], 9000000.0f); - - if (temp_f0 < 0.0f) { return; } - - gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - - mtxf_pos_rotation_xyz(sp120, actor->pos, actor->rot); - if (render_set_position(sp120, 0) == 0) { return; } - - if (temp_f0 < 250000.0f) { - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1F228); - - } else if (temp_f0 < 1000000.0f) { - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1F708); - } else { - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_1FAF8); - } - if (1440000.0f < temp_f0) { return; } - - gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22D28); - - mtxf_rotate_x(sp120, actor->wheelRot); - vec3f_set(sp160, 17.0f, 6.0f, 8.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - if (render_set_position(spA0, 3) == 0) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, actor->wheelRot); - vec3f_set(sp160, -17.0, 6.0f, 8.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - if (render_set_position(spA0, 3) == 0) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x444)); - vec3f_set(sp160, 17.0f, 6.0f, -8.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - if (render_set_position(spA0, 3) == 0) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x444)); - vec3f_set(sp160, -17.0f, 6.0f, -8.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - if (render_set_position(spA0, 3) == 0) { return; } - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); -} - -void render_actor_passenger_car(Camera *camera, struct TrainCar *actor) { - Mat4 sp120; - Vec3f sp160; - Mat4 spE0; - Mat4 spA0; - - f32 temp_f0 = is_within_render_distance(camera->pos, actor->pos, camera->rot[1], 2025.0f, gCameraZoom[camera - camera1], 9000000.0f); - - if (temp_f0 < 0.0f) { return; } - - gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - - mtxf_pos_rotation_xyz(sp120, actor->pos, actor->rot); - - if (render_set_position(sp120, 0) == 0) { return; } - - if (temp_f0 < 250000.0f) { - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_20A20); - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_20A08); - - } else if (temp_f0 < 1000000.0f) { - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_21550); - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_21220); - } else { - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_21C90); - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_21A80); - } - if (1440000.0f < temp_f0) { return; } - - gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22D28); - - mtxf_rotate_x(sp120, actor->wheelRot); - vec3f_set(sp160, 17.0f, 6.0f, 28.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - if (render_set_position(spA0, 3) == 0) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, actor->wheelRot); - vec3f_set(sp160, -17.0, 6.0f, 28.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - if (render_set_position(spA0, 3) == 0) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x222)); - vec3f_set(sp160, 17.0f, 6.0f, 12.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - if (render_set_position(spA0, 3) == 0) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x222)); - vec3f_set(sp160, -17.0f, 6.0f, 12.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - if (render_set_position(spA0, 3) == 0) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x5B0)); - vec3f_set(sp160, 17.0f, 6.0f, -8.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - if (render_set_position(spA0, 3) == 0) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x5B0)); - vec3f_set(sp160, -17.0f, 6.0f, -8.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - if (render_set_position(spA0, 3) == 0) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x16C)); - vec3f_set(sp160, 17.0f, 6.0f, -24.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - if (render_set_position(spA0, 3) == 0) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - - mtxf_rotate_x(sp120, (s16) (actor->wheelRot + 0x16C)); - vec3f_set(sp160, -17.0f, 6.0f, -24.0f); - mtxf_translate(spE0, sp160); - mtxf_multiplication(spA0, sp120, spE0); - - if (render_set_position(spA0, 3) == 0) { return; } - - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_22DB8); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); -} - -void render_actor_falling_rock(Camera *camera, struct FallingRock *rock) { - Vec3s sp98; - Vec3f sp8C; - Mat4 sp4C; - f32 temp_f0; - UNUSED s32 pad[4]; - - if (rock->respawnTimer != 0) { return; } - - temp_f0 = is_within_render_distance(camera->pos, rock->pos, camera->rot[1], 400.0f, gCameraZoom[camera - camera1], 4000000.0f); - - if (temp_f0 < 0.0f) { return; } - - if (temp_f0 < 250000.0f) { - - if (rock->unk30.unk34 == 1) { - sp8C[0] = rock->pos[0]; - sp8C[2] = rock->pos[2]; - temp_f0 = func_802ABE30(sp8C[0], rock->pos[1], sp8C[2], rock->unk30.unk3A); - sp98[0] = 0; - sp98[1] = 0; - sp98[2] = 0; - sp8C[1] = temp_f0 + 2.0f; - mtxf_pos_rotation_xyz(sp4C, sp8C, sp98); - if (render_set_position(sp4C, 0) == 0) { - return; - } - gSPDisplayList(gDisplayListHead++, d_course_choco_mountain_dl_6F88); - } - } - mtxf_pos_rotation_xyz(sp4C, rock->pos, rock->rot); - if (render_set_position(sp4C, 0) == 0) { - return; - } - gSPDisplayList(gDisplayListHead++, d_course_choco_mountain_dl_falling_rock); -} - -void place_piranha_plants(struct ActorSpawnData *spawnData) { +void spawn_piranha_plants(struct ActorSpawnData *spawnData) { s32 segment = SEGMENT_NUMBER2(spawnData); s32 offset = SEGMENT_OFFSET(spawnData); struct ActorSpawnData *temp_s0 = (struct ActorSpawnData *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset); @@ -1909,11 +816,11 @@ void place_piranha_plants(struct ActorSpawnData *spawnData) { vec3f_set(startingVelocity, 0, 0, 0); vec3s_set(startingRot, 0, 0, 0); - while (temp_s0->pos[0] != -0x8000) { + while (temp_s0->pos[0] != END_OF_SPAWN_DATA) { startingPos[0] = temp_s0->pos[0] * gCourseDirection; startingPos[1] = temp_s0->pos[1]; startingPos[2] = temp_s0->pos[2]; - temp = addActorToEmptySlot(startingPos, startingRot, startingVelocity, ACTOR_PIRANHA_PLANT); + temp = add_actor_to_empty_slot(startingPos, startingRot, startingVelocity, ACTOR_PIRANHA_PLANT); temp_v1 = (struct PiranhaPlant *) &gActorList[temp]; temp_v1->visibilityStates[0] = 0; temp_v1->visibilityStates[1] = 0; @@ -1927,7 +834,7 @@ void place_piranha_plants(struct ActorSpawnData *spawnData) { } } -void place_palm_trees(struct ActorSpawnData *spawnData) { +void spawn_palm_trees(struct ActorSpawnData *spawnData) { s32 segment = SEGMENT_NUMBER2(spawnData); s32 offset = SEGMENT_OFFSET(spawnData); struct ActorSpawnData *temp_s0 = (struct ActorSpawnData *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset); @@ -1940,21 +847,21 @@ void place_palm_trees(struct ActorSpawnData *spawnData) { vec3f_set(startingVelocity, 0, 0, 0); vec3s_set(startingRot, 0, 0, 0); - while (temp_s0->pos[0] != -0x8000) { + while (temp_s0->pos[0] != END_OF_SPAWN_DATA) { startingPos[0] = temp_s0->pos[0] * gCourseDirection; startingPos[1] = temp_s0->pos[1]; startingPos[2] = temp_s0->pos[2]; - temp = addActorToEmptySlot(startingPos, startingRot, startingVelocity, ACTOR_PALM_TREE); + temp = add_actor_to_empty_slot(startingPos, startingRot, startingVelocity, ACTOR_PALM_TREE); temp_v1 = (struct PalmTree *) &gActorList[temp]; - temp_v1->visibilityStates[0] = temp_s0->someId; + temp_v1->variant = temp_s0->someId; func_802ADDC8((Collision *) &temp_v1->unk30, 5.0f, temp_v1->pos[0], temp_v1->pos[1], temp_v1->pos[2]); - func_802976EC((Collision *) &temp_v1->unk30, temp_v1->unk10); + func_802976EC((Collision *) &temp_v1->unk30, temp_v1->rot); temp_s0++; } } -#include "actors/falling_rocks.inc.c" +#include "actors/falling_rock/update.inc.c" // Trees, cacti, shrubs, etc. void spawn_foliage(struct ActorSpawnData *arg0) { @@ -1975,7 +882,7 @@ void spawn_foliage(struct ActorSpawnData *arg0) { rotation[1] = 0; rotation[2] = 0; - while (var_s3->pos[0] != (-0x8000)) { + while (var_s3->pos[0] != END_OF_SPAWN_DATA) { position[0] = var_s3->pos[0] * gCourseDirection; position[2] = var_s3->pos[2]; position[1] = var_s3->pos[1]; @@ -2024,7 +931,7 @@ void spawn_foliage(struct ActorSpawnData *arg0) { break; } - temp_s0 = &gActorList[addActorToEmptySlot(position, rotation, velocity, actorType)]; + temp_s0 = &gActorList[add_actor_to_empty_slot(position, rotation, velocity, actorType)]; if (gGamestate == CREDITS_SEQUENCE) { func_802976D8(temp_s0->rot); } else { @@ -2038,7 +945,7 @@ void spawn_foliage(struct ActorSpawnData *arg0) { } } -void place_all_item_boxes(struct ActorSpawnData *spawnData) { +void spawn_all_item_boxes(struct ActorSpawnData *spawnData) { s32 segment = SEGMENT_NUMBER2(spawnData); s32 offset = SEGMENT_OFFSET(spawnData); s16 temp_s1; @@ -2052,14 +959,14 @@ void place_all_item_boxes(struct ActorSpawnData *spawnData) { if ((gModeSelection == TIME_TRIALS) || (gPlaceItemBoxes == 0)) { return; } vec3f_set(startingVelocity, 0, 0, 0); - while(temp_s0->pos[0] != -0x8000) { + while(temp_s0->pos[0] != END_OF_SPAWN_DATA) { startingPos[0] = temp_s0->pos[0] * gCourseDirection; startingPos[1] = temp_s0->pos[1]; startingPos[2] = temp_s0->pos[2]; startingRot[0] = random_u16(); startingRot[1] = random_u16(); startingRot[2] = random_u16(); - temp_s1 = addActorToEmptySlot(startingPos, startingRot, startingVelocity, ACTOR_ITEM_BOX); + temp_s1 = add_actor_to_empty_slot(startingPos, startingRot, startingVelocity, ACTOR_ITEM_BOX); temp_f0 = func_802AE1C0(startingPos[0], startingPos[1] + 10.0f, startingPos[2]); // Should be struct ItemBox but not enough space in the stack. @@ -2096,7 +1003,7 @@ void init_kiwano_fruit(void) { if ((phi_s1->type & 0x4000) == 0) { continue; } if ((phi_s1->type & 0x100) != 0) { continue; } - phi_s0 = addActorToEmptySlot(sp64, sp50, sp58, ACTOR_KIWANO_FRUIT); + phi_s0 = add_actor_to_empty_slot(sp64, sp50, sp58, ACTOR_KIWANO_FRUIT); actor = &gActorList[phi_s0]; actor->unk_04 = i; } @@ -2120,7 +1027,7 @@ void destroy_all_actors(void) { } } -void place_course_actors(void) { +void spawn_course_actors(void) { UNUSED s32 pad; Vec3f position; Vec3f velocity = { 0.0f, 0.0f, 0.0f }; @@ -2132,122 +1039,127 @@ void place_course_actors(void) { switch (gCurrentCourseId) { case COURSE_MARIO_RACEWAY: spawn_foliage(d_course_mario_raceway_tree_spawns); - place_piranha_plants(d_course_mario_raceway_piranha_plant_spawns); - place_all_item_boxes(d_course_mario_raceway_item_box_spawns); + spawn_piranha_plants(d_course_mario_raceway_piranha_plant_spawns); + spawn_all_item_boxes(d_course_mario_raceway_item_box_spawns); vec3f_set(position, 150.0f, 40.0f, -1300.0f); position[0] *= gCourseDirection; - addActorToEmptySlot(position, rotation, velocity, ACTOR_MARIO_SIGN); + add_actor_to_empty_slot(position, rotation, velocity, ACTOR_MARIO_SIGN); vec3f_set(position, 2520.0f, 0.0f, 1240.0f); position[0] *= gCourseDirection; - actor = &gActorList[addActorToEmptySlot(position, rotation, velocity, ACTOR_MARIO_SIGN)]; + actor = &gActorList[add_actor_to_empty_slot(position, rotation, velocity, ACTOR_MARIO_SIGN)]; actor->flags |= 0x4000; break; case COURSE_CHOCO_MOUNTAIN: - place_all_item_boxes(d_course_choco_mountain_item_box_spawns); - place_falling_rocks(d_course_choco_mountain_falling_rock_spawns); + spawn_all_item_boxes(d_course_choco_mountain_item_box_spawns); + spawn_falling_rocks(d_course_choco_mountain_falling_rock_spawns); break; case COURSE_BOWSER_CASTLE: spawn_foliage(d_course_bowsers_castle_tree_spawn); - place_all_item_boxes(d_course_bowsers_castle_item_box_spawns); + spawn_all_item_boxes(d_course_bowsers_castle_item_box_spawns); break; case COURSE_BANSHEE_BOARDWALK: - place_all_item_boxes(d_course_banshee_boardwalk_item_box_spawns); + spawn_all_item_boxes(d_course_banshee_boardwalk_item_box_spawns); break; case COURSE_YOSHI_VALLEY: spawn_foliage(d_course_yoshi_valley_tree_spawn); - place_all_item_boxes(d_course_yoshi_valley_item_box_spawns); + spawn_all_item_boxes(d_course_yoshi_valley_item_box_spawns); vec3f_set(position, -2300.0f, 0.0f, 634.0f); position[0] *= gCourseDirection; - addActorToEmptySlot(position, rotation, velocity, ACTOR_YOSHI_VALLEY_EGG); + add_actor_to_empty_slot(position, rotation, velocity, ACTOR_YOSHI_EGG); break; case COURSE_FRAPPE_SNOWLAND: spawn_foliage(d_course_frappe_snowland_tree_spawns); - place_all_item_boxes(d_course_frappe_snowland_item_box_spawns); + spawn_all_item_boxes(d_course_frappe_snowland_item_box_spawns); break; case COURSE_KOOPA_BEACH: - func_802A14BC(328.0f * gCourseDirection, 70.0f, 2541.0f); - place_all_item_boxes(d_course_koopa_troopa_beach_item_box_spawns); - place_palm_trees(d_course_koopa_troopa_beach_tree_spawn); + init_actor_hot_air_balloon_item_box(328.0f * gCourseDirection, 70.0f, 2541.0f); + spawn_all_item_boxes(d_course_koopa_troopa_beach_item_box_spawns); + spawn_palm_trees(d_course_koopa_troopa_beach_tree_spawn); break; case COURSE_ROYAL_RACEWAY: spawn_foliage(d_course_royal_raceway_tree_spawn); - place_all_item_boxes(d_course_royal_raceway_item_box_spawns); - place_piranha_plants(d_course_royal_raceway_piranha_plant_spawn); + spawn_all_item_boxes(d_course_royal_raceway_item_box_spawns); + spawn_piranha_plants(d_course_royal_raceway_piranha_plant_spawn); break; case COURSE_LUIGI_RACEWAY: spawn_foliage(d_course_luigi_raceway_tree_spawn); - place_all_item_boxes(d_course_luigi_raceway_item_box_spawns); + spawn_all_item_boxes(d_course_luigi_raceway_item_box_spawns); break; case COURSE_MOO_MOO_FARM: if (gPlayerCountSelection1 != 4) { spawn_foliage(d_course_moo_moo_farm_tree_spawn); } - place_all_item_boxes(d_course_moo_moo_farm_item_box_spawns); + spawn_all_item_boxes(d_course_moo_moo_farm_item_box_spawns); break; case COURSE_TOADS_TURNPIKE: - place_all_item_boxes(d_course_toads_turnpike_item_box_spawns); + spawn_all_item_boxes(d_course_toads_turnpike_item_box_spawns); break; case COURSE_KALAMARI_DESERT: spawn_foliage(d_course_kalimari_desert_cactus_spawn); - place_all_item_boxes(d_course_kalimari_desert_item_box_spawns); + spawn_all_item_boxes(d_course_kalimari_desert_item_box_spawns); vec3f_set(position, -1680.0f, 2.0f, 35.0f); position[0] *= gCourseDirection; - rrxing = (struct RailroadCrossing *)&gActorList[addActorToEmptySlot(position, rotation, velocity, ACTOR_RAILROAD_CROSSING)]; + rrxing = (struct RailroadCrossing *)&gActorList[add_actor_to_empty_slot(position, rotation, velocity, ACTOR_RAILROAD_CROSSING)]; rrxing->crossingId = 1; vec3f_set(position, -1600.0f, 2.0f, 35.0f); position[0] *= gCourseDirection; - rrxing = (struct RailroadCrossing *)&gActorList[addActorToEmptySlot(position, rotation, velocity, ACTOR_RAILROAD_CROSSING)]; + rrxing = (struct RailroadCrossing *)&gActorList[add_actor_to_empty_slot(position, rotation, velocity, ACTOR_RAILROAD_CROSSING)]; rrxing->crossingId = 1; vec3s_set(rotation, 0, -0x2000, 0); vec3f_set(position, -2459.0f, 2.0f, 2263.0f); position[0] *= gCourseDirection; - rrxing = (struct RailroadCrossing *)&gActorList[addActorToEmptySlot(position, rotation, velocity, ACTOR_RAILROAD_CROSSING)]; + rrxing = (struct RailroadCrossing *)&gActorList[add_actor_to_empty_slot(position, rotation, velocity, ACTOR_RAILROAD_CROSSING)]; rrxing->crossingId = 0; vec3f_set(position, -2467.0f, 2.0f, 2375.0f); position[0] *= gCourseDirection; - rrxing = (struct RailroadCrossing *)&gActorList[addActorToEmptySlot(position, rotation, velocity, ACTOR_RAILROAD_CROSSING)]; + rrxing = (struct RailroadCrossing *)&gActorList[add_actor_to_empty_slot(position, rotation, velocity, ACTOR_RAILROAD_CROSSING)]; rrxing->crossingId = 0; break; case COURSE_SHERBET_LAND: - place_all_item_boxes(d_course_sherbet_land_item_box_spawns); + spawn_all_item_boxes(d_course_sherbet_land_item_box_spawns); break; case COURSE_RAINBOW_ROAD: - place_all_item_boxes(d_course_rainbow_road_item_box_spawns); + spawn_all_item_boxes(d_course_rainbow_road_item_box_spawns); break; case COURSE_WARIO_STADIUM: - place_all_item_boxes(d_course_wario_stadium_item_box_spawns); + spawn_all_item_boxes(d_course_wario_stadium_item_box_spawns); vec3f_set(position, -131.0f, 83.0f, 286.0f); position[0] *= gCourseDirection; - addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN); + add_actor_to_empty_slot(position, rotation, velocity, ACTOR_WARIO_SIGN); vec3f_set(position, -2353.0f, 72.0f, -1608.0f); position[0] *= gCourseDirection; - addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN); + add_actor_to_empty_slot(position, rotation, velocity, ACTOR_WARIO_SIGN); vec3f_set(position, -2622.0f, 79.0f, 739.0f); position[0] *= gCourseDirection; - addActorToEmptySlot(position, rotation, velocity, ACTOR_WARIO_SIGN); + add_actor_to_empty_slot(position, rotation, velocity, ACTOR_WARIO_SIGN); break; case COURSE_BLOCK_FORT: - place_all_item_boxes(d_course_block_fort_item_box_spawns); + spawn_all_item_boxes(d_course_block_fort_item_box_spawns); break; case COURSE_SKYSCRAPER: - place_all_item_boxes(d_course_skyscraper_item_box_spawns); + spawn_all_item_boxes(d_course_skyscraper_item_box_spawns); break; case COURSE_DOUBLE_DECK: - place_all_item_boxes(d_course_double_deck_item_box_spawns); + spawn_all_item_boxes(d_course_double_deck_item_box_spawns); break; case COURSE_DK_JUNGLE: - place_all_item_boxes(d_course_dks_jungle_parkway_item_box_spawns); + spawn_all_item_boxes(d_course_dks_jungle_parkway_item_box_spawns); init_kiwano_fruit(); func_80298D10(); break; case COURSE_BIG_DONUT: - place_all_item_boxes(d_course_big_donut_item_box_spawns); + spawn_all_item_boxes(d_course_big_donut_item_box_spawns); break; } gNumPermanentActors = gNumActors; } -void func_8029E158(void) { +/** + * @brief Loads actor textures, course specific actor textures. + * Calls to init_course_vehicles and place_course_actors + * + */ +void init_actors_and_load_textures(void) { set_segment_base_addr(3, (void *) gNextFreeMemoryAddress); D_802BA050 = dma_textures(gTextureGreenShell0, 0x00000257U, 0x00000400U); dma_textures(gTextureGreenShell1, 0x00000242U, 0x00000400U); @@ -2344,22 +1256,22 @@ void func_8029E158(void) { } init_red_shell_texture(); destroy_all_actors(); - place_course_actors(); + spawn_course_actors(); init_course_vehicles(); } -void func_8029E7DC(struct Actor *actor) { - s16 temp_v0 = actor->flags; +void play_sound_before_despawn(struct Actor *actor) { + s16 flags = actor->flags; - if ((temp_v0 & 0x200) != 0) { + if ((flags & 0x200) != 0) { func_800C99E0(actor->pos, SOUND_ARG_LOAD(0x19, 0x01, 0x90, 0x53)); return; } - if ((temp_v0 & 0x100) != 0) { + if ((flags & 0x100) != 0) { func_800C99E0(actor->pos, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10)); return; } - if ((temp_v0 & 0x80) != 0) { + if ((flags & 0x80) != 0) { func_800C99E0(actor->pos, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x54)); } } @@ -2377,16 +1289,17 @@ void func_8029E7DC(struct Actor *actor) { * @param Actor to destroy */ void destroy_actor(struct Actor *actor) { - func_8029E7DC(actor); + play_sound_before_despawn(actor); actor->flags = 0; actor->type = 0; gNumActors--; } -s16 func_8029E890(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { +s16 try_remove_destructable_item(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { s32 actorIndex; struct ShellActor *compare; + // try removing a red shell, green shell, banana, or a fake item box if the actor is expired for (actorIndex = gNumPermanentActors; actorIndex < ACTOR_LIST_SIZE; actorIndex++) { compare = (struct ShellActor *) &gActorList[actorIndex]; if (!(compare->flags & ACTOR_IS_NOT_EXPIRED)) { @@ -2399,9 +1312,9 @@ s16 func_8029E890(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { case GREEN_SHELL_HIT_A_RACER: case BLUE_SHELL_LOCK_ON: case BLUE_SHELL_TARGET_ELIMINATED: - func_8000EE58(actorIndex); + delete_actor_in_unexpired_actor_list(actorIndex); case DESTROYED_SHELL: - func_8029E7DC((struct Actor *) compare); + play_sound_before_despawn((struct Actor *) compare); actor_init((struct Actor *) compare, pos, rot, velocity, actorType); return actorIndex; default: @@ -2411,9 +1324,9 @@ s16 func_8029E890(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { case ACTOR_GREEN_SHELL: switch(compare->state) { case MOVING_SHELL: - func_8000EE58(actorIndex); + delete_actor_in_unexpired_actor_list(actorIndex); case DESTROYED_SHELL: - func_8029E7DC((struct Actor *) compare); + play_sound_before_despawn((struct Actor *) compare); actor_init((struct Actor *) compare, pos, rot, velocity, actorType); return actorIndex; } @@ -2423,7 +1336,7 @@ s16 func_8029E890(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { case DROPPED_BANANA: case BANANA_ON_GROUND: case DESTROYED_BANANA: - func_8029E7DC((struct Actor *) compare); + play_sound_before_despawn((struct Actor *) compare); actor_init((struct Actor *) compare, pos, rot, velocity, actorType); return actorIndex; } @@ -2432,7 +1345,7 @@ s16 func_8029E890(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { switch(compare->state) { case FAKE_ITEM_BOX_ON_GROUND: case DESTROYED_FAKE_ITEM_BOX: - func_8029E7DC((struct Actor *) compare); + play_sound_before_despawn((struct Actor *) compare); actor_init((struct Actor *) compare, pos, rot, velocity, actorType); return actorIndex; } @@ -2443,6 +1356,7 @@ s16 func_8029E890(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { } } + // will remove the oldest destructable actor in the list for (actorIndex = gNumPermanentActors; actorIndex < ACTOR_LIST_SIZE; actorIndex++) { compare = (struct ShellActor *) &gActorList[actorIndex]; switch(compare->type) { @@ -2454,9 +1368,9 @@ s16 func_8029E890(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { case GREEN_SHELL_HIT_A_RACER: case BLUE_SHELL_LOCK_ON: case BLUE_SHELL_TARGET_ELIMINATED: - func_8000EE58(actorIndex); + delete_actor_in_unexpired_actor_list(actorIndex); case DESTROYED_SHELL: - func_8029E7DC((struct Actor *) compare); + play_sound_before_despawn((struct Actor *) compare); actor_init((struct Actor *) compare, pos, rot, velocity, actorType); return actorIndex; default: @@ -2466,9 +1380,9 @@ s16 func_8029E890(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { case ACTOR_GREEN_SHELL: switch(compare->state) { case MOVING_SHELL: - func_8000EE58(actorIndex); + delete_actor_in_unexpired_actor_list(actorIndex); case DESTROYED_SHELL: - func_8029E7DC((struct Actor *) compare); + play_sound_before_despawn((struct Actor *) compare); actor_init((struct Actor *) compare, pos, rot, velocity, actorType); return actorIndex; } @@ -2478,7 +1392,7 @@ s16 func_8029E890(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { case DROPPED_BANANA: case BANANA_ON_GROUND: case DESTROYED_BANANA: - func_8029E7DC((struct Actor *) compare); + play_sound_before_despawn((struct Actor *) compare); actor_init((struct Actor *) compare, pos, rot, velocity, actorType); return actorIndex; } @@ -2487,7 +1401,7 @@ s16 func_8029E890(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { switch(compare->state) { case FAKE_ITEM_BOX_ON_GROUND: case DESTROYED_FAKE_ITEM_BOX: - func_8029E7DC((struct Actor *) compare); + play_sound_before_despawn((struct Actor *) compare); actor_init((struct Actor *) compare, pos, rot, velocity, actorType); return actorIndex; } @@ -2501,11 +1415,11 @@ s16 func_8029E890(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { } // returns actor index if any slot avaible returns -1 -s16 addActorToEmptySlot(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { +s16 add_actor_to_empty_slot(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { s32 index; if (gNumActors >= ACTOR_LIST_SIZE) { - return func_8029E890(pos, rot, velocity, actorType); + return try_remove_destructable_item(pos, rot, velocity, actorType); } for(index = 0; index < ACTOR_LIST_SIZE; index++){ if (gActorList[index].flags == 0) { @@ -2517,121 +1431,121 @@ s16 addActorToEmptySlot(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { return -1; } -s16 func_8029ED38(Vec3f pos, s16 actorType) { +UNUSED s16 spawn_actor_at_pos(Vec3f pos, s16 actorType) { Vec3f vel; Vec3s rot; vec3f_set(vel, 0.0f, 0.0f, 0.0f); vec3s_set(rot, 0, 0, 0); - return addActorToEmptySlot(pos, rot, vel, actorType); + return add_actor_to_empty_slot(pos, rot, vel, actorType); } -// I swear we have a struct that looks like this already but I cannot find it anywhere +// not ActorSpawnData but very similar in structure and use struct test { Vec3s thing; }; -UNUSED void func_8029ED98(Player *player, uintptr_t arg1) { +UNUSED void prototype_actor_spawn_data(Player *player, uintptr_t arg1) { Vec3f sp64; struct test *var_s0; s32 segment = SEGMENT_NUMBER2(arg1); s32 offset = SEGMENT_OFFSET(arg1); var_s0 = (struct test *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset); - while (var_s0->thing[0] != -0x8000) { + while (var_s0->thing[0] != END_OF_SPAWN_DATA) { sp64[0] = var_s0->thing[0] * gCourseDirection; sp64[1] = var_s0->thing[1]; sp64[2] = var_s0->thing[2]; if(arg1 & arg1){} - func_8029EEB8(player, sp64, 5.0f, 40.0f, 0.8f); + query_and_resolve_collision_player_actor(player, sp64, 5.0f, 40.0f, 0.8f); var_s0++; } } -s32 func_8029EEB8(Player *player, Vec3f pos, f32 arg2, f32 arg3, f32 arg4) { - f32 temp_f0_2; - f32 temp_f0_3; - f32 temp_f14; - f32 temp_f16; - f32 temp_f18; +bool query_and_resolve_collision_player_actor(Player *player, Vec3f pos, f32 minDist, f32 dist, f32 arg4) { + f32 yDist; + f32 sqrtDist; + f32 zDist; + f32 xVelocity; + f32 zVelocity; f32 temp_f0_4; f32 temp_f0_5; f32 temp_f0_6; - f32 temp_f20; + f32 xDist; f32 sp28; f32 temp_f2_2; - arg2 = player->boundingBoxSize + arg2; - arg3 = player->boundingBoxSize + arg3; - temp_f20 = pos[0] - player->pos[0]; - if (arg2 < temp_f20) { - return 0; + minDist = player->boundingBoxSize + minDist; + dist = player->boundingBoxSize + dist; + xDist = pos[0] - player->pos[0]; + if (minDist < xDist) { + return NO_COLLISION; } - if (temp_f20 < -arg2) { - return 0; + if (xDist < -minDist) { + return NO_COLLISION; } - temp_f0_2 = pos[1] - player->pos[1]; - if (arg3 < temp_f0_2) { - return 0; + yDist = pos[1] - player->pos[1]; + if (dist < yDist) { + return NO_COLLISION; } - if (temp_f0_2 < -arg3) { - return 0; + if (yDist < -dist) { + return NO_COLLISION; } - temp_f14 = pos[2] - player->pos[2]; - if (arg2 < temp_f14) { - return 0; + zDist = pos[2] - player->pos[2]; + if (minDist < zDist) { + return NO_COLLISION; } - if (temp_f14 < -arg2) { - return 0; + if (zDist < -minDist) { + return NO_COLLISION; } - arg3 = (temp_f20 * temp_f20) + (temp_f0_2 * temp_f0_2) + (temp_f14 * temp_f14); - if (arg3 < 0.1f) { - return 0; + dist = (xDist * xDist) + (yDist * yDist) + (zDist * zDist); + if (dist < 0.1f) { + return NO_COLLISION; } - if ((arg2 * arg2) < arg3) { - return 0; + if ((minDist * minDist) < dist) { + return NO_COLLISION; } - temp_f0_3 = sqrtf(arg3); - sp28 = temp_f0_3 - arg2; - temp_f16 = player->velocity[0]; - temp_f18 = player->velocity[2]; + sqrtDist = sqrtf(dist); + sp28 = sqrtDist - minDist; + xVelocity = player->velocity[0]; + zVelocity = player->velocity[2]; if (player->effects & STAR_EFFECT) { - return 1; + return COLLISION; } - if (temp_f0_3 < 0.1f) { - temp_f0_4 = sqrtf((temp_f16 * temp_f16) + (temp_f18 * temp_f18)); + if (sqrtDist < 0.1f) { + temp_f0_4 = sqrtf((xVelocity * xVelocity) + (zVelocity * zVelocity)); if (temp_f0_4 < 0.5f) { temp_f0_4 = 0.5f; } player->velocity[0] = 0; player->velocity[2] = 0; - player->pos[0] += (temp_f16 / temp_f0_4) * arg2; - player->pos[2] += (temp_f18 / temp_f0_4) * arg2; + player->pos[0] += (xVelocity / temp_f0_4) * minDist; + player->pos[2] += (zVelocity / temp_f0_4) * minDist; } else { player->effects |= 0x8000; - temp_f20 /= temp_f0_3; - temp_f14 /= temp_f0_3; - temp_f0_5 = sqrtf((temp_f16 * temp_f16) + (temp_f18 * temp_f18)); + xDist /= sqrtDist; + zDist /= sqrtDist; + temp_f0_5 = sqrtf((xVelocity * xVelocity) + (zVelocity * zVelocity)); if (temp_f0_5 < 0.25f) { temp_f0_6 = 1.2f; - player->pos[0] = pos[0] - (temp_f20 * arg2 * temp_f0_6); - player->pos[2] = pos[2] - (temp_f14 * arg2 * temp_f0_6); + player->pos[0] = pos[0] - (xDist * minDist * temp_f0_6); + player->pos[2] = pos[2] - (zDist * minDist * temp_f0_6); player->velocity[0] = 0.0f; player->velocity[2] = 0.0f; - return 1; + return COLLISION; } - temp_f2_2 = ((temp_f20 * temp_f16) + (temp_f14 * temp_f18)) / temp_f0_5; + temp_f2_2 = ((xDist * xVelocity) + (zDist * zVelocity)) / temp_f0_5; temp_f2_2 = temp_f0_5 * temp_f2_2 * arg4 * 1.3f; - player->velocity[0] -= temp_f20 * temp_f2_2; - player->velocity[2] -= temp_f14 * temp_f2_2; - player->pos[0] += temp_f20 * sp28 * 0.5f; - player->pos[2] += temp_f14 * sp28 * 0.5f; + player->velocity[0] -= xDist * temp_f2_2; + player->velocity[2] -= zDist * temp_f2_2; + player->pos[0] += xDist * sp28 * 0.5f; + player->pos[2] += zDist * sp28 * 0.5f; } - return 1; + return COLLISION; } -s32 func_8029F1F8(Player *player, struct Actor *marioRacewaySign) { - if (func_8029EEB8(player, marioRacewaySign->pos, 7.0f, 200.0f, 0.8f) == 1) { +bool collision_mario_sign(Player *player, struct Actor *marioRacewaySign) { + if (query_and_resolve_collision_player_actor(player, marioRacewaySign->pos, 7.0f, 200.0f, 0.8f) == COLLISION) { if ((player->type & PLAYER_HUMAN) != 0) { if ((player->effects & STAR_EFFECT) != 0) { marioRacewaySign->flags |= 0x400; @@ -2641,13 +1555,13 @@ s32 func_8029F1F8(Player *player, struct Actor *marioRacewaySign) { func_800C9060(player - gPlayerOne, SOUND_ARG_LOAD(0x19, 0x00, 0x70, 0x1A)); } } - return 1; + return TRUE; } - return 0; + return FALSE; } -s32 func_8029F2FC(Player *player, struct PiranhaPlant *plant) { - if (func_8029EEB8(player, plant->pos, plant->boundingBoxSize, plant->boundingBoxSize, 2.5f) == 1) { +bool collision_piranha_plant(Player *player, struct PiranhaPlant *plant) { + if (query_and_resolve_collision_player_actor(player, plant->pos, plant->boundingBoxSize, plant->boundingBoxSize, 2.5f) == COLLISION) { if ((player->type & PLAYER_HUMAN) != 0) { if ((player->effects & STAR_EFFECT) != 0) { plant->flags |= 0x400; @@ -2657,45 +1571,45 @@ s32 func_8029F2FC(Player *player, struct PiranhaPlant *plant) { func_800C9060(player - gPlayerOne, SOUND_ARG_LOAD(0x19, 0x00, 0xA0, 0x52)); } } - return 1; + return TRUE; } - return 0; + return FALSE; } -bool func_8029F408(Player *player, struct YoshiValleyEgg *egg) { +bool collision_yoshi_egg(Player *player, struct YoshiValleyEgg *egg) { UNUSED f32 pad[5]; f32 z_dist; f32 xz_dist; f32 x_dist; f32 y_dist; f32 totalBox; - f32 thing = 60.0f; - f32 thing2 = 0.0f; + f32 maxDist = 60.0f; + f32 minDist = 0.0f; x_dist = egg->pos[0] - player->pos[0]; - if ((x_dist < thing2) && (x_dist < -thing)) { + if ((x_dist < minDist) && (x_dist < -maxDist)) { return FALSE; } - if (x_dist > thing) { + if (x_dist > maxDist) { return FALSE; } z_dist = egg->pos[2] - player->pos[2]; - if ((z_dist < thing2) && (z_dist < -thing)) { + if ((z_dist < minDist) && (z_dist < -maxDist)) { return FALSE; } - if (z_dist > thing) { + if (z_dist > maxDist) { return FALSE; } xz_dist = sqrtf((x_dist * x_dist) + (z_dist * z_dist)); - if (xz_dist > thing) { + if (xz_dist > maxDist) { return FALSE; } func_802977B0(player); y_dist = player->pos[1] - egg->pos[1]; - if (y_dist < thing2) { + if (y_dist < minDist) { return FALSE; } @@ -2711,19 +1625,19 @@ bool func_8029F408(Player *player, struct YoshiValleyEgg *egg) { func_800C98B8(player->pos, player->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10)); func_800C90F4(player - gPlayerOne, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x0D)); } else { - func_8008DABC(player, player - gPlayerOne); + apply_hit_sound_effect(player, player - gPlayerOne); if ((gModeSelection == TIME_TRIALS) && ((player->type & PLAYER_CPU) == 0)) { D_80162DF8 = 1; } } } else { - func_8008DABC(player, player - gPlayerOne); + apply_hit_sound_effect(player, player - gPlayerOne); } return TRUE; } -s32 func_8029F69C(Player *player, struct Actor *actor) { +bool collision_tree(Player *player, struct Actor *actor) { f32 x_dist; f32 y_dist; f32 z_dist; @@ -2734,39 +1648,39 @@ s32 func_8029F69C(Player *player, struct Actor *actor) { UNUSED f32 pad[2]; f32 temp_f12; f32 temp_f0_4; - Vec3f sp20; + Vec3f actorPos; f32 temp_f2; var_f16 = actor->unk_08; x_dist = actor->pos[0] - player->pos[0]; if ((x_dist < 0.0f) && (x_dist < -var_f16)) { - return 0; + return FALSE; } if (var_f16 < x_dist) { - return 0; + return FALSE; } z_dist = actor->pos[2] - player->pos[2]; if ((z_dist < 0.0f) && (z_dist < -var_f16)) { - return 0; + return FALSE; } if (var_f16 < z_dist) { - return 0; + return FALSE; } y_dist = player->pos[1] - actor->pos[1]; if (y_dist < 0.0f) { - return 0; + return FALSE; } if ((f32) actor->state < y_dist) { - return 0; + return FALSE; } xz_dist = sqrtf((x_dist * x_dist) + (z_dist * z_dist)); if (var_f16 < xz_dist) { - return 0; + return FALSE; } func_802977B0(player); var_f16 = player->boundingBoxSize + actor->boundingBoxSize; if (var_f16 < xz_dist) { - return 0; + return FALSE; } sp48 = player->velocity[0]; sp44 = player->velocity[2]; @@ -2775,7 +1689,7 @@ s32 func_8029F69C(Player *player, struct Actor *actor) { actor->flags |= 0x400; func_800C98B8(player->pos, player->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10)); func_800C90F4(player - gPlayerOne, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x0D)); - return 1; + return TRUE; } if (!(player->type & PLAYER_INVISIBLE_OR_BOMB)) { func_800C9060(player - gPlayerOne, SOUND_ARG_LOAD(0x19, 0x00, 0x70, 0x18)); @@ -2784,29 +1698,29 @@ s32 func_8029F69C(Player *player, struct Actor *actor) { if (!(player->effects & STAR_EFFECT)) { player->effects |= 0x8000; } - sp20[0] = actor->pos[0]; - sp20[1] = actor->pos[1]; - sp20[2] = actor->pos[2]; + actorPos[0] = actor->pos[0]; + actorPos[1] = actor->pos[1]; + actorPos[2] = actor->pos[2]; if (((gCurrentCourseId == COURSE_MARIO_RACEWAY) || (gCurrentCourseId == COURSE_YOSHI_VALLEY) || (gCurrentCourseId == COURSE_ROYAL_RACEWAY) || (gCurrentCourseId == COURSE_LUIGI_RACEWAY)) && (player->unk_094 > 1.0f)) { - spawn_leaf(sp20, 0); + spawn_leaf(actorPos, 0); } if (xz_dist < 0.1f) { sqrtf((sp48 * sp48) + (sp44 * sp44)); if(xz_dist){} player->velocity[0] = 0; player->velocity[2] = 0; - player->pos[0] = sp20[0] - (x_dist * var_f16 * 1.2f); - player->pos[2] = sp20[2] - (z_dist * var_f16 * 1.2f); + player->pos[0] = actorPos[0] - (x_dist * var_f16 * 1.2f); + player->pos[2] = actorPos[2] - (z_dist * var_f16 * 1.2f); } else { temp_f0_4 = sqrtf((sp48 * sp48) + (sp44 * sp44)); x_dist /= xz_dist; z_dist /= xz_dist; if (temp_f0_4 < 0.25f) { - player->pos[0] = sp20[0] - (x_dist * var_f16 * 1.2f); - player->pos[2] = sp20[2] - (z_dist * var_f16 * 1.2f); + player->pos[0] = actorPos[0] - (x_dist * var_f16 * 1.2f); + player->pos[2] = actorPos[2] - (z_dist * var_f16 * 1.2f); player->velocity[0] = 0; player->velocity[2] = 0; - return 1; + return TRUE; } temp_f12 = ((x_dist * sp48) + (z_dist * sp44)) / temp_f0_4; temp_f12 = temp_f0_4 * temp_f12 * 1.5f; @@ -2816,88 +1730,88 @@ s32 func_8029F69C(Player *player, struct Actor *actor) { player->pos[0] += x_dist * temp_f2 * 0.5f; player->pos[2] += z_dist * temp_f2 * 0.5f; } - return 1; + return TRUE; } -s32 func_8029FB80(Player *arg0, struct Actor *arg1) { +bool query_collision_player_vs_actor_item(Player *arg0, struct Actor *arg1) { f32 temp_f0; - f32 temp_f12_2; - f32 temp_f14; - f32 temp_f16; - f32 temp_f2; + f32 dist; + f32 yDist; + f32 zDist; + f32 xDist; temp_f0 = arg0->boundingBoxSize + arg1->boundingBoxSize; - temp_f2 = arg1->pos[0] - arg0->pos[0]; - if (temp_f0 < temp_f2) { - return 0; + xDist = arg1->pos[0] - arg0->pos[0]; + if (temp_f0 < xDist) { + return NO_COLLISION; } - if (temp_f2 < -temp_f0) { - return 0; + if (xDist < -temp_f0) { + return NO_COLLISION; } - temp_f14 = arg1->pos[1] - arg0->pos[1]; - if (temp_f0 < temp_f14) { - return 0; + yDist = arg1->pos[1] - arg0->pos[1]; + if (temp_f0 < yDist) { + return NO_COLLISION; } - if (temp_f14 < -temp_f0) { - return 0; + if (yDist < -temp_f0) { + return NO_COLLISION; } - temp_f16 = arg1->pos[2] - arg0->pos[2]; - if (temp_f0 < temp_f16) { - return 0; + zDist = arg1->pos[2] - arg0->pos[2]; + if (temp_f0 < zDist) { + return NO_COLLISION; } - if (temp_f16 < -temp_f0) { - return 0; + if (zDist < -temp_f0) { + return NO_COLLISION; } - temp_f12_2 = (temp_f2 * temp_f2) + (temp_f14 * temp_f14) + (temp_f16 * temp_f16); - if (temp_f12_2 < 0.1f) { - return 0; + dist = (xDist * xDist) + (yDist * yDist) + (zDist * zDist); + if (dist < 0.1f) { + return NO_COLLISION; } - if ((temp_f0 * temp_f0) < temp_f12_2) { - return 0; + if ((temp_f0 * temp_f0) < dist) { + return NO_COLLISION; } - return 1; + return COLLISION; } -s32 func_8029FCA4(struct Actor *arg0, struct Actor *arg1) { +bool query_collision_actor_vs_actor(struct Actor *arg0, struct Actor *arg1) { f32 temp_f0; - f32 temp_f12_2; - f32 temp_f14; - f32 temp_f16; - f32 temp_f2; + f32 dist; + f32 dist_y; + f32 dist_z; + f32 dist_x; temp_f0 = arg0->boundingBoxSize + arg1->boundingBoxSize; - temp_f2 = arg0->pos[0] - arg1->pos[0]; - if (temp_f0 < temp_f2) { - return 0; + dist_x = arg0->pos[0] - arg1->pos[0]; + if (temp_f0 < dist_x) { + return NO_COLLISION; } - if (temp_f2 < -temp_f0) { - return 0; + if (dist_x < -temp_f0) { + return NO_COLLISION; } - temp_f14 = arg0->pos[1] - arg1->pos[1]; - if (temp_f0 < temp_f14) { - return 0; + dist_y = arg0->pos[1] - arg1->pos[1]; + if (temp_f0 < dist_y) { + return NO_COLLISION; } - if (temp_f14 < -temp_f0) { - return 0; + if (dist_y < -temp_f0) { + return NO_COLLISION; } - temp_f16 = arg0->pos[2] - arg1->pos[2]; - if (temp_f0 < temp_f16) { - return 0; + dist_z = arg0->pos[2] - arg1->pos[2]; + if (temp_f0 < dist_z) { + return NO_COLLISION; } - if (temp_f16 < -temp_f0) { - return 0; + if (dist_z < -temp_f0) { + return NO_COLLISION; } - temp_f12_2 = (temp_f2 * temp_f2) + (temp_f14 * temp_f14) + (temp_f16 * temp_f16); - if (temp_f12_2 < 0.1f) { - return 0; + dist = (dist_x * dist_x) + (dist_y * dist_y) + (dist_z * dist_z); + if (dist < 0.1f) { + return NO_COLLISION; } - if ((temp_f0 * temp_f0) < temp_f12_2) { - return 0; + if ((temp_f0 * temp_f0) < dist) { + return NO_COLLISION; } - return 1; + return COLLISION; } -void func_8029FDC8(struct Actor *actor) { +void destroy_destructable_actor(struct Actor *actor) { struct ShellActor *shell; struct BananaActor *banana; struct FakeItemBox *fakeItemBox; @@ -2909,7 +1823,7 @@ void func_8029FDC8(struct Actor *actor) { switch (banana->state) { case FIRST_BANANA_BUNCH_BANANA: case BANANA_BUNCH_BANANA: - func_802B0570(banana); + destroy_banana_in_banana_bunch(banana); break; case HELD_BANANA: player = &gPlayers[banana->playerId]; @@ -2918,7 +1832,7 @@ void func_8029FDC8(struct Actor *actor) { case BANANA_ON_GROUND: banana->flags = -0x8000; banana->unk_04 = 0x003C; - banana->state = 5; + banana->state = DESTROYED_BANANA; banana->velocity[1] = 3.0f; break; case DROPPED_BANANA: @@ -2932,7 +1846,7 @@ void func_8029FDC8(struct Actor *actor) { if (shell->state != GREEN_SHELL_HIT_A_RACER) { switch (shell->state) { case MOVING_SHELL: - func_8000EE58(actor - gActorList); + delete_actor_in_unexpired_actor_list(actor - gActorList); /* fallthrough */ case HELD_SHELL: case RELEASED_SHELL: @@ -2943,7 +1857,7 @@ void func_8029FDC8(struct Actor *actor) { shell->velocity[1] = 3.0f; break; case TRIPLE_GREEN_SHELL: - func_802B02B4(shell, ACTOR_GREEN_SHELL); + triple_shell_actor_collide_with_player(shell, ACTOR_GREEN_SHELL); break; default: break; @@ -2961,7 +1875,7 @@ void func_8029FDC8(struct Actor *actor) { case BLUE_SHELL_LOCK_ON: case BLUE_SHELL_TARGET_ELIMINATED: func_800C9EF4(shell->pos, SOUND_ARG_LOAD(0x51, 0x01, 0x80, 0x08)); - func_8000EE58(actor - gActorList); + delete_actor_in_unexpired_actor_list(actor - gActorList); /* fallthrough */ case HELD_SHELL: case RELEASED_SHELL: @@ -2986,7 +1900,7 @@ void func_8029FDC8(struct Actor *actor) { case GREEN_SHELL_HIT_A_RACER: case BLUE_SHELL_LOCK_ON: case BLUE_SHELL_TARGET_ELIMINATED: - func_8000EE58(actor - gActorList); + delete_actor_in_unexpired_actor_list(actor - gActorList); /* fallthrough */ case HELD_SHELL: case RELEASED_SHELL: @@ -2997,7 +1911,7 @@ void func_8029FDC8(struct Actor *actor) { shell->velocity[1] = 3.0f; break; case TRIPLE_RED_SHELL: - func_802B02B4(shell, ACTOR_RED_SHELL); + triple_shell_actor_collide_with_player(shell, ACTOR_RED_SHELL); break; default: break; @@ -3017,7 +1931,7 @@ void func_8029FDC8(struct Actor *actor) { } } -void func_802A00E8(struct Actor *arg0, struct Actor *arg1) { +void play_sound_on_destructible_actor_collision(struct Actor *arg0, struct Actor *arg1) { switch(arg0->type) { case ACTOR_GREEN_SHELL: if ((arg0->state == HELD_SHELL) || (arg0->state == TRIPLE_GREEN_SHELL)) { @@ -3084,34 +1998,34 @@ void func_802A00E8(struct Actor *arg0, struct Actor *arg1) { func_800C98B8(arg0->pos, arg0->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10)); } -void func_802A0350(struct Actor *arg0, struct Actor *arg1) { - if (func_8029FCA4(arg0, arg1) == 1) { - if ((arg0->type == ACTOR_BLUE_SPINY_SHELL) && (arg1->type == ACTOR_BLUE_SPINY_SHELL)) { - func_8029FDC8(arg0); - func_8029FDC8(arg1); - arg0->flags |= 256; - func_800C98B8(arg0->pos, arg0->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10)); +void evaluate_actor_collision_between_two_destructible_actors(struct Actor *actor1, struct Actor *actor2) { + if (query_collision_actor_vs_actor(actor1, actor2) == COLLISION) { + if ((actor1->type == ACTOR_BLUE_SPINY_SHELL) && (actor2->type == ACTOR_BLUE_SPINY_SHELL)) { + destroy_destructable_actor(actor1); + destroy_destructable_actor(actor2); + actor1->flags |= 0x100; + func_800C98B8(actor1->pos, actor1->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10)); return; } - if (arg0->type == ACTOR_BLUE_SPINY_SHELL) { - if (arg0->state == HELD_SHELL) { - func_8029FDC8(arg0); + if (actor1->type == ACTOR_BLUE_SPINY_SHELL) { + if (actor1->state == HELD_SHELL) { + destroy_destructable_actor(actor1); } } else { - func_8029FDC8(arg0); + destroy_destructable_actor(actor1); // automatically destroy if it's something different of a blueshell } - if (arg1->type == ACTOR_BLUE_SPINY_SHELL) { - if (arg1->state == HELD_SHELL) { - func_8029FDC8(arg1); + if (actor2->type == ACTOR_BLUE_SPINY_SHELL) { + if (actor2->state == HELD_SHELL) { + destroy_destructable_actor(actor2); } } else { - func_8029FDC8(arg1); + destroy_destructable_actor(actor2); // automatically destroy if it's something different of a blueshell } - func_802A00E8(arg0, arg1); + play_sound_on_destructible_actor_collision(actor1, actor2); } } -void func_802A0450(Player *player, struct Actor *actor) { +void evaluate_collision_between_player_actor(Player *player, struct Actor *actor) { UNUSED s32 pad; s16 temp_lo; UNUSED s32 pad2[2]; @@ -3122,125 +2036,17 @@ void func_802A0450(Player *player, struct Actor *actor) { temp_lo = player - gPlayerOne; switch (actor->type) { - case ACTOR_YOSHI_VALLEY_EGG: - if (!(player->effects & BOO_EFFECT) && !(player->type & PLAYER_INVISIBLE_OR_BOMB)) { - func_8029F408(player, (struct YoshiValleyEgg *) actor); - } - break; - case ACTOR_BANANA: - if (player->effects & (BOO_EFFECT | 0x8C0)) { break; } - if (player->soundEffects & 1) { break; } - temp_v1 = actor->rot[0]; - if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (func_8029FB80(player, actor) != 1)) { break; } - player->soundEffects |= 1; - owner = &gPlayers[temp_v1]; - if (owner->type & 0x4000) { - if (actor->flags & 0xF) { - if (temp_lo != temp_v1) { - func_800C90F4(temp_v1, (owner->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x06)); - } - } else { - temp_f0 = actor->pos[0] - owner->pos[0]; - temp_f2 = actor->pos[2] - owner->pos[2]; - if ((((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) < 360000.0f) && (temp_lo != temp_v1)) { - func_800C90F4(temp_v1, (owner->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x06)); - } + case ACTOR_YOSHI_EGG: + if (!(player->effects & BOO_EFFECT) && !(player->type & PLAYER_INVISIBLE_OR_BOMB)) { + collision_yoshi_egg(player, (struct YoshiValleyEgg *) actor); } - } - func_8029FDC8(actor); - break; - case ACTOR_GREEN_SHELL: - if (player->effects & 0x80000400) { break; } - if (player->soundEffects & 4) { break; } - temp_v1 = actor->rot[2]; - if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (func_8029FB80(player, actor) != 1)) { break; } - player->soundEffects |= 4; - func_800C98B8(player->pos, player->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10)); - owner = &gPlayers[temp_v1]; - if ((owner->type & 0x4000) && (temp_lo != temp_v1)) { - func_800C90F4(temp_v1, (owner->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x06)); - } - func_8029FDC8(actor); - break; - case ACTOR_BLUE_SPINY_SHELL: - if (player->soundEffects & 2) { break; } - temp_v1 = actor->rot[2]; - if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (func_8029FB80(player, actor) != 1)) { break; } - if (!(player->effects & BOO_EFFECT)) { - player->soundEffects |= 2; - func_800C98B8(player->pos, player->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10)); - } - owner = &gPlayers[temp_v1]; - if ((owner->type & 0x4000) && (temp_lo != temp_v1)) { - func_800C90F4(temp_v1, (owner->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x06)); - } - if (temp_lo == actor->unk_04) { - func_8029FDC8(actor); - } - break; - case ACTOR_RED_SHELL: - temp_v1 = actor->rot[2]; - if (player->effects & 0x01000000) { break; } - if (player->soundEffects & 2) { break; } - temp_v1 = actor->rot[2]; - if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (func_8029FB80(player, actor) != 1)) { break; } - if (!(player->effects & BOO_EFFECT)) { - player->soundEffects |= 2; - func_800C98B8(player->pos, player->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10)); - } - owner = &gPlayers[temp_v1]; - if ((owner->type & 0x4000) && (temp_lo != temp_v1)) { - func_800C90F4(temp_v1, (owner->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x06)); - } - func_8029FDC8(actor); - break; - case ACTOR_PIRANHA_PLANT: - if (!(player->effects & BOO_EFFECT)) { - func_8029F2FC(player, (struct PiranhaPlant *) actor); - } - break; - case ACTOR_MARIO_SIGN: - if (!(player->effects & BOO_EFFECT)) { - func_8029F1F8(player, actor); - } - break; - case 2: - case 3: - case 4: - case 19: - case 25: - case 26: - case 28: - case 29: - case 30: - case 31: - case 32: - case 33: - if (!(player->effects & BOO_EFFECT)) { - func_8029F69C(player, actor); - } - break; - case ACTOR_FALLING_ROCK: - if (!(player->effects & BOO_EFFECT) && !(player->type & PLAYER_INVISIBLE_OR_BOMB)) { - if (func_8029FB80(player, actor) == 1) { - func_800C98B8(actor->pos, actor->velocity, SOUND_ACTION_EXPLOSION); - if ((gModeSelection == TIME_TRIALS) && !(player->type & PLAYER_CPU)) { - D_80162DF8 = 1; - } - if (player->effects & STAR_EFFECT) { - actor->velocity[1] = 10.0f; - } else { - func_8008DABC(player, player - gPlayerOne); - } - } - } - break; - case ACTOR_FAKE_ITEM_BOX: - temp_v1 = actor->velocity[0]; - if (player->effects & BOO_EFFECT) { break; } - temp_v1 = actor->velocity[0]; - if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (func_8029FB80(player, actor) != 1)) { break; } - player->soundEffects |= REVERSE_SOUND_EFFECT; + break; + case ACTOR_BANANA: + if (player->effects & (BOO_EFFECT | 0x8C0)) { break; } + if (player->soundEffects & 1) { break; } + temp_v1 = actor->rot[0]; + if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (query_collision_player_vs_actor_item(player, actor) != COLLISION)) { break; } + player->soundEffects |= 1; owner = &gPlayers[temp_v1]; if (owner->type & 0x4000) { if (actor->flags & 0xF) { @@ -3254,46 +2060,154 @@ void func_802A0450(Player *player, struct Actor *actor) { func_800C90F4(temp_v1, (owner->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x06)); } } - if (actor->state == 0) { - owner->soundEffects &= ~0x00040000; + } + destroy_destructable_actor(actor); + break; + case ACTOR_GREEN_SHELL: + if (player->effects & 0x80000400) { break; } + if (player->soundEffects & 4) { break; } + temp_v1 = actor->rot[2]; + if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (query_collision_player_vs_actor_item(player, actor) != COLLISION)) { break; } + player->soundEffects |= 4; + func_800C98B8(player->pos, player->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10)); + owner = &gPlayers[temp_v1]; + if ((owner->type & 0x4000) && (temp_lo != temp_v1)) { + func_800C90F4(temp_v1, (owner->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x06)); + } + destroy_destructable_actor(actor); + break; + case ACTOR_BLUE_SPINY_SHELL: + if (player->soundEffects & 2) { break; } + temp_v1 = actor->rot[2]; + if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (query_collision_player_vs_actor_item(player, actor) != COLLISION)) { break; } + if (!(player->effects & BOO_EFFECT)) { + player->soundEffects |= 2; + func_800C98B8(player->pos, player->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10)); + } + owner = &gPlayers[temp_v1]; + if ((owner->type & 0x4000) && (temp_lo != temp_v1)) { + func_800C90F4(temp_v1, (owner->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x06)); + } + if (temp_lo == actor->unk_04) { + destroy_destructable_actor(actor); + } + break; + case ACTOR_RED_SHELL: + temp_v1 = actor->rot[2]; + if (player->effects & 0x01000000) { break; } + if (player->soundEffects & 2) { break; } + temp_v1 = actor->rot[2]; + if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (query_collision_player_vs_actor_item(player, actor) != COLLISION)) { break; } + if (!(player->effects & BOO_EFFECT)) { + player->soundEffects |= 2; + func_800C98B8(player->pos, player->velocity, SOUND_ARG_LOAD(0x19, 0x01, 0x80, 0x10)); + } + owner = &gPlayers[temp_v1]; + if ((owner->type & 0x4000) && (temp_lo != temp_v1)) { + func_800C90F4(temp_v1, (owner->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x06)); + } + destroy_destructable_actor(actor); + break; + case ACTOR_PIRANHA_PLANT: + if (!(player->effects & BOO_EFFECT)) { + collision_piranha_plant(player, (struct PiranhaPlant *) actor); + } + break; + case ACTOR_MARIO_SIGN: + if (!(player->effects & BOO_EFFECT)) { + collision_mario_sign(player, actor); + } + break; + case ACTOR_TREE_MARIO_RACEWAY: + case ACTOR_TREE_YOSHI_VALLEY: + case ACTOR_TREE_ROYAL_RACEWAY: + case ACTOR_TREE_MOO_MOO_FARM: + case ACTOR_PALM_TREE: + case 26: + case ACTOR_TREE_BOWSERS_CASTLE: + case ACTOR_TREE_FRAPPE_SNOWLAND: + case ACTOR_CACTUS1_KALAMARI_DESERT: + case ACTOR_CACTUS2_KALAMARI_DESERT: + case ACTOR_CACTUS3_KALAMARI_DESERT: + case ACTOR_BUSH_BOWSERS_CASTLE: + if (!(player->effects & BOO_EFFECT)) { + collision_tree(player, actor); + } + break; + case ACTOR_FALLING_ROCK: + if (!(player->effects & BOO_EFFECT) && !(player->type & PLAYER_INVISIBLE_OR_BOMB)) { + if (query_collision_player_vs_actor_item(player, actor) == COLLISION) { + func_800C98B8(actor->pos, actor->velocity, SOUND_ACTION_EXPLOSION); + if ((gModeSelection == TIME_TRIALS) && !(player->type & PLAYER_CPU)) { + D_80162DF8 = 1; + } + if (player->effects & STAR_EFFECT) { + actor->velocity[1] = 10.0f; + } else { + apply_hit_sound_effect(player, player - gPlayerOne); + } } } - actor->state = 2; - actor->flags = -0x8000; - actor->unk_04 = 0; - break; - case ACTOR_HOT_AIR_BALLOON_ITEM_BOX: - if (func_8029FB80(player, actor) == 1) { - actor->state = 3; - actor->flags = -0x8000; - actor->unk_04 = 0; - if (player->type & PLAYER_HUMAN) { - func_8007ABFC(player - gPlayerOne, 7); + break; + case ACTOR_FAKE_ITEM_BOX: + temp_v1 = actor->velocity[0]; + if (player->effects & BOO_EFFECT) { break; } + temp_v1 = actor->velocity[0]; + if (((temp_lo == temp_v1) && (actor->flags & 0x1000)) || (query_collision_player_vs_actor_item(player, actor) != COLLISION)) { break; } + player->soundEffects |= REVERSE_SOUND_EFFECT; + owner = &gPlayers[temp_v1]; + if (owner->type & 0x4000) { + if (actor->flags & 0xF) { + if (temp_lo != temp_v1) { + func_800C90F4(temp_v1, (owner->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x06)); + } + } else { + temp_f0 = actor->pos[0] - owner->pos[0]; + temp_f2 = actor->pos[2] - owner->pos[2]; + if ((((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) < 360000.0f) && (temp_lo != temp_v1)) { + func_800C90F4(temp_v1, (owner->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x06)); + } + } + if (actor->state == 0) { + owner->soundEffects &= ~0x00040000; + } + } + actor->state = 2; + actor->flags = -0x8000; + actor->unk_04 = 0; + break; + case ACTOR_HOT_AIR_BALLOON_ITEM_BOX: + if (query_collision_player_vs_actor_item(player, actor) == COLLISION) { + actor->state = 3; + actor->flags = -0x8000; + actor->unk_04 = 0; + if (player->type & PLAYER_HUMAN) { + func_8007ABFC(player - gPlayerOne, 7); + } + } else if (actor->state == 0) { + actor->state = 1; + actor->flags = -0x8000; } - } else if (actor->state == 0) { - actor->state = 1; - actor->flags = -0x8000; - } - break; - case ACTOR_ITEM_BOX: - if (func_8029FB80(player, actor) == (s32) 1) { - actor->state = 3; - actor->flags = -0x8000; - actor->unk_04 = 0; - if (player->type & PLAYER_HUMAN) { - func_8007ABFC(player - gPlayerOne, 0); + break; + case ACTOR_ITEM_BOX: + if (query_collision_player_vs_actor_item(player, actor) == COLLISION) { + actor->state = 3; + actor->flags = -0x8000; + actor->unk_04 = 0; + if (player->type & PLAYER_HUMAN) { + func_8007ABFC(player - gPlayerOne, 0); + } + } else if (actor->state == 0) { + actor->state = 1; + actor->flags = -0x8000; } - } else if (actor->state == 0) { - actor->state = 1; - actor->flags = -0x8000; - } - break; - default: - break; + break; + default: + break; } } -void evaluate_player_collision(void) { +void evaluate_collision_for_players_and_actors(void) { struct Actor *temp_a1; s32 i, j; Player *phi_s1; @@ -3303,34 +2217,34 @@ void evaluate_player_collision(void) { if (((phi_s1->type & 0x8000) != 0) && ((phi_s1->effects & 0x4000000) == 0)) { func_802977E4(phi_s1); - for (j = 0; j < ACTOR_LIST_SIZE; j++) { - temp_a1 = &gActorList[j]; + for (j = 0; j < ACTOR_LIST_SIZE; j++) { + temp_a1 = &gActorList[j]; - if ((phi_s1->effects & 0x4000000) == 0) { - // temp_v0 = temp_a1->unk2; - if (((temp_a1->flags & 0x8000) != 0) && ((temp_a1->flags & 0x4000) != 0)) { - func_802A0450(phi_s1, temp_a1); - } + if ((phi_s1->effects & 0x4000000) == 0) { + // temp_v0 = temp_a1->unk2; + if (((temp_a1->flags & 0x8000) != 0) && ((temp_a1->flags & 0x4000) != 0)) { + evaluate_collision_between_player_actor(phi_s1, temp_a1); } + } } } } } // It's look like to check collision between item and other different item -void func_802A0E44(void) { - struct Actor *phi_s0; - struct Actor *temp_a1; +void evaluate_collision_for_destructible_actors(void) { + struct Actor *actor1; + struct Actor *actor2; s32 i, j; UNUSED s32 pad; for (i = gNumPermanentActors; i < (ACTOR_LIST_SIZE - 1); i++) { - phi_s0 = &gActorList[i]; + actor1 = &gActorList[i]; - if ((phi_s0->flags & 0x8000) == 0) { continue; } - if ((phi_s0->flags & 0x4000) == 0) { continue; } + if ((actor1->flags & 0x8000) == 0) { continue; } + if ((actor1->flags & 0x4000) == 0) { continue; } - switch(phi_s0->type) { + switch(actor1->type) { case ACTOR_BANANA: case ACTOR_GREEN_SHELL: case ACTOR_RED_SHELL: @@ -3338,34 +2252,34 @@ void func_802A0E44(void) { case ACTOR_FAKE_ITEM_BOX: for (j = i + 1; j < ACTOR_LIST_SIZE; j++) { - temp_a1 = &gActorList[j]; + actor2 = &gActorList[j]; - if ((phi_s0->flags & 0x8000) == 0) {continue;} - if ((phi_s0->flags & 0x4000) == 0) {continue;} + if ((actor1->flags & 0x8000) == 0) {continue;} + if ((actor1->flags & 0x4000) == 0) {continue;} - if ((temp_a1->flags & 0x8000) == 0) { continue; } - if ((temp_a1->flags & 0x4000) == 0) { continue; } + if ((actor2->flags & 0x8000) == 0) { continue; } + if ((actor2->flags & 0x4000) == 0) { continue; } - switch(temp_a1->type) { + switch(actor2->type) { case ACTOR_BANANA: - if (phi_s0->type == ACTOR_BANANA) { continue; } - func_802A0350(phi_s0, temp_a1); + if (actor1->type == ACTOR_BANANA) { continue; } + evaluate_actor_collision_between_two_destructible_actors(actor1, actor2); break; case ACTOR_GREEN_SHELL: - if (phi_s0->type == ACTOR_GREEN_SHELL) { - if (phi_s0->rot[2] == temp_a1->rot[2]) { continue; } + if (actor1->type == ACTOR_GREEN_SHELL) { + if (actor1->rot[2] == actor2->rot[2]) { continue; } } - func_802A0350(phi_s0, temp_a1); + evaluate_actor_collision_between_two_destructible_actors(actor1, actor2); break; case ACTOR_RED_SHELL: - if (phi_s0->type == ACTOR_RED_SHELL) { - if (phi_s0->rot[2] == temp_a1->rot[2]) { continue; } + if (actor1->type == ACTOR_RED_SHELL) { + if (actor1->rot[2] == actor2->rot[2]) { continue; } } - func_802A0350(phi_s0, temp_a1); + evaluate_actor_collision_between_two_destructible_actors(actor1, actor2); break; case ACTOR_BLUE_SPINY_SHELL: case ACTOR_FAKE_ITEM_BOX: - func_802A0350(phi_s0, temp_a1); + evaluate_actor_collision_between_two_destructible_actors(actor1, actor2); break; } } @@ -3385,92 +2299,9 @@ void func_802A1064(struct FakeItemBox *fake_item_box) { } } -void update_actor_fake_item_box(struct FakeItemBox *fake_item_box) { - u32 temp_v1 = fake_item_box->playerId; - Player *temp_v0_4 = &gPlayers[temp_v1]; - struct Controller *temp_v1_3; +#include "actors/fake_item_box/update.inc.c" - UNUSED s32 pad[7]; - f32 temp_f2_2; - f32 temp_f14; - f32 temp_f16; - f32 temp_f18; - UNUSED s32 pad2[3]; - - switch(fake_item_box->state) { - case 0: - fake_item_box->boundingBoxSize = fake_item_box->sizeScaling * 5.5f; - fake_item_box->rot[0] -= 0xB6; - fake_item_box->rot[1] += 0x16C; - fake_item_box->rot[2] -= 0xB6; - - temp_f14 = temp_v0_4->pos[0] - fake_item_box->pos[0]; - temp_f16 = temp_v0_4->pos[1] - fake_item_box->pos[1]; - temp_f18 = temp_v0_4->pos[2] - fake_item_box->pos[2]; - - temp_f2_2 = sqrtf((temp_f14 * temp_f14) + (temp_f16 * temp_f16) + (temp_f18 * temp_f18)) / 10.0f; - temp_f14 /= temp_f2_2; - temp_f16 /= temp_f2_2; - temp_f18 /= temp_f2_2; - fake_item_box->pos[0] = temp_v0_4->pos[0] - temp_f14; - fake_item_box->pos[1] = (temp_v0_4->pos[1] - temp_f16) - 1.0f; - fake_item_box->pos[2] = temp_v0_4->pos[2] - temp_f18; - func_802ADDC8(&fake_item_box->unk30, fake_item_box->boundingBoxSize, fake_item_box->pos[0], fake_item_box->pos[1], fake_item_box->pos[2]); - func_802B4E30((struct Actor *)fake_item_box); - temp_v1_3 = &gControllers[temp_v1]; - if ((temp_v0_4->type & 0x4000) != 0) { - - if ((temp_v1_3->buttonDepressed & Z_TRIG) != 0) { - temp_v1_3->buttonDepressed &= 0xDFFF; - func_802A1064(fake_item_box); - temp_v0_4->soundEffects &= 0xFFFBFFFF; - func_800C9060((u8)(temp_v0_4 - gPlayerOne), SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x12)); - } - } - break; - case 1: - if (fake_item_box->sizeScaling < 1.0f) { - fake_item_box->sizeScaling += 0.05f; - } else if (fake_item_box->sizeScaling >= 1.0f) { - fake_item_box->sizeScaling = 1.0f; - } - - fake_item_box->boundingBoxSize = fake_item_box->sizeScaling * 5.5f; - if (fake_item_box->targetY <= fake_item_box->pos[1]) { - fake_item_box->pos[1] = fake_item_box->targetY; - } else { - fake_item_box->pos[1] += 0.2f; - } - if ((fake_item_box->flags & 0x1000) != 0) { - if ((fake_item_box->someTimer <= 0) || (fake_item_box->someTimer >= 0x12D)) { - fake_item_box->flags &= 0xEFFF; - fake_item_box->someTimer = 0; - } else { - fake_item_box->someTimer--; - } - } - fake_item_box->rot[0] -= 0xB6; - fake_item_box->rot[1] += 0x16C; - fake_item_box->rot[2] -= 0xB6; - break; - - case 2: - if ((fake_item_box->someTimer >= 0x14) || (fake_item_box->someTimer < 0)) { - destroy_actor((struct Actor *) fake_item_box); - } else { - fake_item_box->someTimer++; - fake_item_box->rot[0] += 0x444; - fake_item_box->rot[1] -= 0x2D8; - fake_item_box->rot[2] += 0x16C; - } - break; - default: - destroy_actor((struct Actor *) fake_item_box); - break; - } -} - -void func_802A14BC(f32 x, f32 y, f32 z) { +void init_actor_hot_air_balloon_item_box(f32 x, f32 y, f32 z) { Vec3f pos; Vec3f velocity; Vec3s rot; @@ -3483,509 +2314,27 @@ void func_802A14BC(f32 x, f32 y, f32 z) { pos[0] = x; pos[1] = y; pos[2] = z; - id = addActorToEmptySlot(pos, rot, velocity, ACTOR_HOT_AIR_BALLOON_ITEM_BOX); + id = add_actor_to_empty_slot(pos, rot, velocity, ACTOR_HOT_AIR_BALLOON_ITEM_BOX); gActorHotAirBalloonItemBox = &gActorList[id]; } -void update_actor_item_box_hot_air_balloon(struct ItemBox *itemBox) { - switch(itemBox->state) { - case 5: - itemBox->rot[0] += 0xB6; - itemBox->rot[1] -= 0x16C; - itemBox->rot[2] += 0xB6; - break; - case 3: - if (itemBox->someTimer == 0x14) { - itemBox->state = 5; - itemBox->flags = -0x4000; - } else { - itemBox->someTimer++; - itemBox->rot[0] += 0x444; - itemBox->rot[1] -= 0x2D8; - itemBox->rot[2] += 0x16C; - } - break; - } -} +#include "actors/item_box/update.inc.c" -void update_actor_item_box(struct ItemBox *itemBox) { - switch (itemBox->state) { - case 0: - itemBox->state = 1; - break; - case 1: - if ((itemBox->pos[1] - itemBox->origY) < 8.66f) { - itemBox->pos[1] += 0.45f; - } else { - itemBox->pos[1] = itemBox->origY + 8.66f; - itemBox->state = 2; - itemBox->flags = 0xC000; - } - break; - case 2: - itemBox->rot[0] += 0xB6; - itemBox->rot[1] -= 0x16C; - itemBox->rot[2] += 0xB6; - break; - case 3: - if (itemBox->someTimer == 20) { - itemBox->state = 0; - itemBox->pos[1] = itemBox->resetDistance - 20.0f; - itemBox->flags = 0xC000; - } else { - itemBox->someTimer++; - itemBox->rot[0] += 0x444; - itemBox->rot[1] -= 0x2D8; - itemBox->rot[2] += 0x16C; - } - break; - } -} +#include "actors/fake_item_box/render.inc.c" -void func_802A171C(Camera *camera, struct FakeItemBox *fakeItemBox) { - Vec3s someRot; - UNUSED s32 pad[3]; - Vec3f someVec; - Mat4 someMatrix2; - Mat4 someMatrix3; - UNUSED s32 pad2[12]; - f32 temp_f0_2; - f32 temp_f0_3; - f32 temp_f12; - f32 temp_f2; - f32 thing; - f32 temp_f2_2; - f32 someMultiplier; +#include "actors/item_box/render.inc.c" - if (is_within_render_distance(camera->pos, fakeItemBox->pos, camera->rot[1], 2500.0f, gCameraZoom[camera - camera1], 1000000.0f) < 0) { - func_80297230(camera, (struct Actor *) fakeItemBox); - return; - } - if (((f32) D_8015F6EC + 800.0f) < fakeItemBox->pos[1]) { - func_80297230(camera, (struct Actor *) fakeItemBox); - return; - } - if (fakeItemBox->pos[1] < ((f32) D_8015F6EE - 800.0f)) { - func_80297230(camera, (struct Actor *) fakeItemBox); - return; - } +#include "actors/wario_sign/render.inc.c" - func_802972B8(camera, (struct Actor *) fakeItemBox); - someRot[0] = 0; - someRot[1] = fakeItemBox->rot[1]; - someRot[2] = 0; - mtxf_pos_rotation_xyz(someMatrix2, fakeItemBox->pos, someRot); - mtxf_scale(someMatrix2, fakeItemBox->sizeScaling); - if (fakeItemBox->state != 2) { +#include "actors/yoshi_egg/render.inc.c" - if (!render_set_position(someMatrix2, 0)) { return; } +#include "actors/mario_sign/render.inc.c" - gSPDisplayList(gDisplayListHead++, common_model_fake_itembox); - mtxf_pos_rotation_xyz(someMatrix2, fakeItemBox->pos, fakeItemBox->rot); - mtxf_scale(someMatrix2, fakeItemBox->sizeScaling); +#include "actors/railroad_crossing/render.inc.c" - if (!render_set_position(someMatrix2, 0)) { return; } +#include "actors/palm_tree/render.inc.c" - gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA); - if ((fakeItemBox->rot[1] < 0xAA1) && (fakeItemBox->rot[1] > 0)) { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - } else if ((fakeItemBox->rot[1] >= 0x6AA5) && (fakeItemBox->rot[1] < 0x754E)) { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - } else if ((fakeItemBox->rot[1] >= 0x38E1) && (fakeItemBox->rot[1] < 0x438A)) { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - } else if ((fakeItemBox->rot[1] >= 0xC711) && (fakeItemBox->rot[1] < 0xD1BA)) { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - } else { - gDPSetBlendMask(gDisplayListHead++, 0xFF); - gDPSetRenderMode(gDisplayListHead++, G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2); - } - gSPDisplayList(gDisplayListHead++, D_0D003090); - } else { - gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); - gDPSetBlendMask(gDisplayListHead++, 0xFF); - thing = fakeItemBox->someTimer; - mtxf_pos_rotation_xyz(someMatrix2, fakeItemBox->pos, fakeItemBox->rot); - if (thing < 10.0f) { - someMultiplier = 1.0f; - } else { - someMultiplier = 1.0f - ((thing - 10.0f) * 0.1f); - } - mtxf_scale(someMatrix2, someMultiplier); - if (fakeItemBox->someTimer & 1) { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - } else { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_XLU_INTER, G_RM_NOOP2); - } - temp_f2 = 2.0f * thing; - someVec[0] = 0.0f; - someVec[1] = temp_f2; - someVec[2] = thing; - add_translate_mat4_vec3f(someMatrix2, someMatrix3, someVec); - - if (!render_set_position(someMatrix3, 0)) { return; } - - gSPDisplayList(gDisplayListHead++, D_0D003158); - temp_f2_2 = 0.8f * thing; - temp_f12 = 0.5f * thing; - someVec[0] = temp_f2_2; - someVec[1] = 2.3f * thing; - someVec[2] = temp_f12; - add_translate_mat4_vec3f(someMatrix2, someMatrix3, someVec); - - if (!render_set_position(someMatrix3, 0)) { return; } - - gSPDisplayList(gDisplayListHead++, D_0D0031B8); - temp_f0_2 = -0.5f * thing; - someVec[0] = temp_f2_2; - someVec[1] = 1.2f * thing; - someVec[2] = temp_f0_2; - add_translate_mat4_vec3f(someMatrix2, someMatrix3, someVec); - - if (!render_set_position(someMatrix3, 0)) { return; } - - gSPDisplayList(gDisplayListHead++, D_0D003128); - if (!(fakeItemBox->someTimer & 1)) { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - } else { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_XLU_INTER, G_RM_NOOP2); - } - someVec[0] = 0.0f; - someVec[1] = 1.8f * thing; - someVec[2] = -1.0f * thing; - add_translate_mat4_vec3f(someMatrix2, someMatrix3, someVec); - - if (!render_set_position(someMatrix3, 0)) { return; } - - gSPDisplayList(gDisplayListHead++, D_0D0031E8); - temp_f0_3 = -0.8f * thing; - someVec[0] = temp_f0_3; - someVec[1] = 0.6f * thing; - someVec[2] = temp_f0_2; - add_translate_mat4_vec3f(someMatrix2, someMatrix3, someVec); - - if (!render_set_position(someMatrix3, 0)) { return; } - - gSPDisplayList(gDisplayListHead++, D_0D003188); - someVec[0] = temp_f0_3; - someVec[1] = temp_f2; - someVec[2] = temp_f12; - add_translate_mat4_vec3f(someMatrix2, someMatrix3, someVec); - - if (!render_set_position(someMatrix3, 0)) { return; } - - gSPDisplayList(gDisplayListHead++, D_0D0030F8); - gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); - } -} - -// render item box need more info to document this properly -void func_802A1EA0(Camera *camera, struct ItemBox *item_box) { - UNUSED s32 pad[2]; - Vec3f someVec1; - Vec3f someVec2; - Vec3s someRot; - f32 thing; - UNUSED s32 pad2; - Mat4 someMatrix1; - Mat4 someMatrix2; - UNUSED s32 pad3[4]; - f32 temp_f0; - f32 temp_f0_2; - f32 temp_f0_3; - f32 temp_f12; - f32 temp_f2; - f32 temp_f2_2; - f32 someMultiplier; - - temp_f0 = is_within_render_distance(camera->pos, item_box->pos, camera->rot[1], 0.0f, gCameraZoom[camera - camera1], 4000000.0f); - if (!(temp_f0 < 0.0f) && !(600000.0f < temp_f0)) { - if ((item_box->state == 2) && (temp_f0 < 100000.0f)) { - someRot[0] = 0; - someRot[1] = item_box->rot[1]; - someRot[2] = 0; - someVec2[0] = item_box->pos[0]; - someVec2[1] = item_box->resetDistance + 2.0f; - someVec2[2] = item_box->pos[2]; - mtxf_pos_rotation_xyz(someMatrix1, someVec2, someRot); - - if (!render_set_position(someMatrix1, 0)) { return; } - - gSPDisplayList(gDisplayListHead++, D_0D002EE8); - someRot[1] = item_box->rot[1] * 2; - someVec2[1] = item_box->pos[1]; - mtxf_pos_rotation_xyz(someMatrix1, someVec2, someRot); - - if (!render_set_position(someMatrix1, 0)) { return; } - - gSPDisplayList(gDisplayListHead++, itemBoxQuestionMarkModel); - } - if (item_box->state == 5) { - mtxf_pos_rotation_xyz(someMatrix1, item_box->pos, item_box->rot); - - if (!render_set_position(someMatrix1, 0)) { return; } - - gSPDisplayList(gDisplayListHead++, itemBoxQuestionMarkModel); - } - if (item_box->state != 3) { - mtxf_pos_rotation_xyz(someMatrix1, item_box->pos, item_box->rot); - - if (!render_set_position(someMatrix1, 0)) { return; } - - gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA); - if ((item_box->rot[1] < 0xAA1) && (item_box->rot[1] > 0)) { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - } else if ((item_box->rot[1] >= 0x6AA5) && (item_box->rot[1] < 0x754E)) { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - } else if ((item_box->rot[1] >= 0x38E1) && (item_box->rot[1] < 0x438A)) { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - } else if ((item_box->rot[1] >= 0xC711) && (item_box->rot[1] < 0xD1BA)) { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - } else { - gDPSetBlendMask(gDisplayListHead++, 0xFF); - gDPSetRenderMode(gDisplayListHead++, G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2); - } - gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH); - gSPDisplayList(gDisplayListHead++, D_0D003090); - } else { - gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); - gDPSetBlendMask(gDisplayListHead++, 0xFF); - thing = item_box->someTimer; - mtxf_pos_rotation_xyz(someMatrix1, item_box->pos, item_box->rot); - if (thing < 10.0f) { - someMultiplier = 1.0f; - } else { - someMultiplier = 1.0f - ((thing - 10.0f) * 0.1f); - } - mtxf_scale(someMatrix1, someMultiplier); - if (item_box->someTimer & 1) { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - } else { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_XLU_INTER, G_RM_NOOP2); - } - temp_f2 = 2.0f * thing; - someVec1[0] = 0.0f; - someVec1[1] = temp_f2; - someVec1[2] = thing; - add_translate_mat4_vec3f(someMatrix1, someMatrix2, someVec1); - - if (!render_set_position(someMatrix2, 0)) { return; } - - gSPDisplayList(gDisplayListHead++, D_0D003158); - temp_f2_2 = 0.8f * thing; - temp_f12 = 0.5f * thing; - someVec1[0] = temp_f2_2; - someVec1[1] = 2.3f * thing; - someVec1[2] = temp_f12; - add_translate_mat4_vec3f(someMatrix1, someMatrix2, someVec1); - - if (!render_set_position(someMatrix2, 0)) { return; } - - gSPDisplayList(gDisplayListHead++, D_0D0031B8); - temp_f0_2 = -0.5f * thing; - someVec1[0] = temp_f2_2; - someVec1[1] = 1.2f * thing; - someVec1[2] = temp_f0_2; - add_translate_mat4_vec3f(someMatrix1, someMatrix2, someVec1); - - if (!render_set_position(someMatrix2, 0)) { return; } - - gSPDisplayList(gDisplayListHead++, D_0D003128); - if (!(item_box->someTimer & 1)) { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); - } else { - gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_XLU_INTER, G_RM_NOOP2); - } - someVec1[0] = 0.0f; - someVec1[1] = 1.8f * thing; - someVec1[2] = -1.0f * thing; - add_translate_mat4_vec3f(someMatrix1, someMatrix2, someVec1); - - if (!render_set_position(someMatrix2, 0)) { return; } - - gSPDisplayList(gDisplayListHead++, D_0D0031E8); - temp_f0_3 = -0.8f * thing; - someVec1[0] = temp_f0_3; - someVec1[1] = 0.6f * thing; - someVec1[2] = temp_f0_2; - add_translate_mat4_vec3f(someMatrix1, someMatrix2, someVec1); - - if (!render_set_position(someMatrix2, 0)) { return; } - - gSPDisplayList(gDisplayListHead++, D_0D003188); - someVec1[0] = temp_f0_3; - someVec1[1] = temp_f2; - someVec1[2] = temp_f12; - add_translate_mat4_vec3f(someMatrix1, someMatrix2, someVec1); - - if (!render_set_position(someMatrix2, 0)) { return; } - - gSPDisplayList(gDisplayListHead++, D_0D0030F8); - gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); - } - gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); - } -} - -void render_actor_wario_sign(Camera *arg0, struct Actor *arg1) { - Mat4 sp38; - f32 unk = is_within_render_distance(arg0->pos, arg1->pos, arg0->rot[1], 0, gCameraZoom[arg0 - camera1], 16000000.0f); - - if (!(unk < 0.0f)) { - gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH); - gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - - mtxf_pos_rotation_xyz(sp38, arg1->pos, arg1->rot); - if (render_set_position(sp38, 0) != 0) { - - gSPDisplayList(gDisplayListHead++, d_course_wario_stadium_dl_sign); - } - } -} - -void func_802A27A0(Camera *arg0, Mat4 arg1, struct YoshiValleyEgg *egg, u16 arg3) { - Mat4 sp60; - Vec3s sp5C; - Vec3f sp54; - f32 temp_f0; - - if (gGamestate != CREDITS_SEQUENCE) { - temp_f0 = is_within_render_distance(arg0->pos, egg->pos, arg0->rot[1], 200.0f, gCameraZoom[arg0 - camera1], 16000000.0f); - if (temp_f0 < 0.0f) { - return; - } - } else { - arg3 = 15; - temp_f0 = 0.0f; - } - - gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH); - if ((arg3 > 12) && (arg3 < 20)) { - if (temp_f0 < 640000.0f) { - sp54[0] = egg->pos[0]; - sp54[1] = 3.0f; - sp54[2] = egg->pos[2]; - func_802976D8(sp5C); - func_8029794C(sp54, sp5C, 10.0f); - } - sp5C[0] = 0; - sp5C[1] = egg->eggRot; - sp5C[2] = 0; - mtxf_pos_rotation_xyz(sp60, egg->pos, sp5C); - if (render_set_position(sp60, 0) == 0) { return; } - - gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING); - gSPDisplayList(gDisplayListHead++, d_course_yoshi_valley_dl_16D70); - } else { - arg1[3][0] = egg->pos[0]; - arg1[3][1] = egg->pos[1]; - arg1[3][2] = egg->pos[2]; - - if (render_set_position(arg1, 0) != 0) { - gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - gSPDisplayList(gDisplayListHead++, d_course_yoshi_valley_dl_egg_lod0); - } - } -} - -void render_actor_mario_sign(Camera *arg0, UNUSED Mat4 arg1, struct Actor *arg2) { - Mat4 sp40; - f32 unk; - s16 temp = arg2->flags; - - if (temp & 0x800) { return; } - - unk = is_within_render_distance(arg0->pos, arg2->pos, arg0->rot[1], 0, gCameraZoom[arg0 - camera1], 16000000.0f); - if (!(unk < 0.0f)) { - gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH); - gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING); - mtxf_pos_rotation_xyz(sp40, arg2->pos, arg2->rot); - if (render_set_position(sp40, 0) != 0) { - gSPDisplayList(gDisplayListHead++, d_course_mario_raceway_dl_sign); - } - } -} - -void func_802A2AD0(Camera *arg0, struct RailroadCrossing *rr_crossing) { - UNUSED Vec3s sp80 = {0, 0, 0}; - Mat4 sp40; - f32 unk = is_within_render_distance(arg0->pos, rr_crossing->pos, arg0->rot[1], 0.0f, gCameraZoom[arg0 - camera1], 4000000.0f); - - if (!(unk < 0.0f)) { - mtxf_pos_rotation_xyz(sp40, rr_crossing->pos, rr_crossing->rot); - - if (render_set_position(sp40, 0) != 0) { - gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING); - gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); - - if (isCrossingTriggeredByIndex[rr_crossing->crossingId]) { - - if (rr_crossing->someTimer < 20) { - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_crossing_right_active); - } else { - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_crossing_left_active); - } - } else { - gSPDisplayList(gDisplayListHead++, d_course_kalimari_desert_dl_crossing_both_inactive); - } - gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); - } - } -} - -void func_802A2C78(Camera *arg0, UNUSED Mat4 arg1, struct Actor *arg2) { - Vec3s spA8 = {0, 0, 0}; - Mat4 sp68; - f32 temp_f0; - s16 temp_v0 = arg2->flags; - - if ((temp_v0 & 0x800)) { - return; - } - - temp_f0 = is_within_render_distance(arg0->pos, arg2->pos, arg0->rot[1], 0.0f, gCameraZoom[arg0 - camera1], 4000000.0f); - - if (!(temp_f0 < 0.0f)) { - if (((temp_v0 & 0x400) == 0) && (temp_f0 < 250000.0f)) { - func_8029794C(arg2->pos, arg2->rot, 2.0f); - } - mtxf_pos_rotation_xyz(sp68, arg2->pos, spA8); - if (render_set_position(sp68, 0) != 0) { - - gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE); - gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING); - - switch(arg2->unk_04) { - case 0: - gSPDisplayList(gDisplayListHead++, &d_course_koopa_troopa_beach_dl_tree_trunk1); - gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); - gSPDisplayList(gDisplayListHead++, &d_course_koopa_troopa_beach_dl_tree_top1); - gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); - break; - - case 1: - gSPDisplayList(gDisplayListHead++, &d_course_koopa_troopa_beach_dl_tree_trunk2); - gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); - gSPDisplayList(gDisplayListHead++, &d_course_koopa_troopa_beach_dl_tree_top2); - gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); - break; - - case 2: - gSPDisplayList(gDisplayListHead++, &d_course_koopa_troopa_beach_dl_tree_trunk3); - gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK); - gSPDisplayList(gDisplayListHead++, &d_course_koopa_troopa_beach_dl_tree_top3); - gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); - break; - - } - } - } -} - -void func_802A2F34(struct UnkStruct_800DC5EC *arg0) { +void render_item_boxes(struct UnkStruct_800DC5EC *arg0) { Camera *camera = arg0->camera; struct Actor *actor; s32 i; @@ -4000,13 +2349,13 @@ void func_802A2F34(struct UnkStruct_800DC5EC *arg0) { switch(actor->type) { case ACTOR_FAKE_ITEM_BOX: - func_802A171C(camera, (struct FakeItemBox *) actor); + render_actor_fake_item_box(camera, (struct FakeItemBox *) actor); break; case ACTOR_ITEM_BOX: - func_802A1EA0(camera, (struct ItemBox *) actor); + render_actor_item_box(camera, (struct ItemBox *) actor); break; case ACTOR_HOT_AIR_BALLOON_ITEM_BOX: - func_802A1EA0(camera, (struct ItemBox *) actor); + render_actor_item_box(camera, (struct ItemBox *) actor); break; } } @@ -4067,7 +2416,7 @@ void render_course_actors(struct UnkStruct_800DC5EC *arg0) { case ACTOR_TREE_MOO_MOO_FARM: render_actor_tree_moo_moo_farm(camera, D_801502C0, actor); break; - case 0x1A: + case ACTOR_UNKNOWN_0x1A: func_80299864(camera, D_801502C0, actor); break; case ACTOR_TREE_BOWSERS_CASTLE: @@ -4092,7 +2441,7 @@ void render_course_actors(struct UnkStruct_800DC5EC *arg0) { render_actor_falling_rock(camera, (struct FallingRock *) actor); break; case ACTOR_KIWANO_FRUIT: - render_actor_kiwano_fruit_dks_jungle_parkway(camera, D_801502C0, actor); + render_actor_kiwano_fruit(camera, D_801502C0, actor); break; case ACTOR_BANANA: render_actor_banana(camera, D_801502C0, (struct BananaActor *) actor); @@ -4116,12 +2465,12 @@ void render_course_actors(struct UnkStruct_800DC5EC *arg0) { render_actor_train_tender(camera, (struct TrainCar *) actor); break; case ACTOR_TRAIN_PASSENGER_CAR: - render_actor_passenger_car(camera, (struct TrainCar *) actor); + render_actor_train_passenger_car(camera, (struct TrainCar *) actor); break; case ACTOR_COW: render_actor_cow(camera, D_801502C0, actor); break; - case 0x14: + case ACTOR_UNKNOWN_0x14: func_8029AC18(camera, D_801502C0, actor); break; case ACTOR_MARIO_SIGN: @@ -4131,37 +2480,37 @@ void render_course_actors(struct UnkStruct_800DC5EC *arg0) { render_actor_wario_sign(camera, actor); break; case ACTOR_PALM_TREE: - func_802A2C78(camera, D_801502C0, actor); + render_actor_palm_tree(camera, D_801502C0, (struct PalmTree *) actor); break; case ACTOR_PADDLE_BOAT: render_actor_paddle_boat(camera, (struct PaddleWheelBoat *) actor, D_801502C0, pathCounter); break; case ACTOR_BOX_TRUCK: - func_8029B06C(camera, actor); + render_actor_box_truck(camera, actor); break; case ACTOR_SCHOOL_BUS: - func_8029B2E4(camera, actor); + render_actor_school_bus(camera, actor); break; case ACTOR_TANKER_TRUCK: - func_8029B6EC(camera, actor); + render_actor_tanker_truck(camera, actor); break; case ACTOR_CAR: - func_8029B4E0(camera, actor); + render_actor_car(camera, actor); break; case ACTOR_RAILROAD_CROSSING: - func_802A2AD0(camera, (struct RailroadCrossing *) actor); + render_actor_railroad_crossing(camera, (struct RailroadCrossing *) actor); break; - case ACTOR_YOSHI_VALLEY_EGG: - func_802A27A0(camera, D_801502C0, (struct YoshiValleyEgg *) actor, pathCounter); + case ACTOR_YOSHI_EGG: + render_actor_yoshi_egg(camera, D_801502C0, (struct YoshiValleyEgg *) actor, pathCounter); break; } } switch (gCurrentCourseId) { case COURSE_MOO_MOO_FARM: - func_802986B4(camera, D_801502C0, actor); + render_cows(camera, D_801502C0, actor); break; case COURSE_DK_JUNGLE: - func_80298D7C(camera, D_801502C0, actor); + render_palm_trees(camera, D_801502C0, actor); break; } } @@ -4202,10 +2551,10 @@ void update_course_actors(void) { update_actor_train_engine((struct TrainCar *) actor); break; case ACTOR_TRAIN_TENDER: - update_actor_train_car1((struct TrainCar *) actor); + update_actor_train_tender((struct TrainCar *) actor); break; case ACTOR_TRAIN_PASSENGER_CAR: - update_actor_train_car2((struct TrainCar *) actor); + update_actor_train_passenger_car((struct TrainCar *) actor); break; case ACTOR_ITEM_BOX: update_actor_item_box((struct ItemBox *) actor); @@ -4229,10 +2578,10 @@ void update_course_actors(void) { update_actor_triple_shell((TripleShellParent *) actor, ACTOR_RED_SHELL); break; case ACTOR_MARIO_SIGN: - update_actor_mario_raceway_sign(actor); + update_actor_mario_sign(actor); break; case ACTOR_WARIO_SIGN: - update_actor_wario_stadium_sign(actor); + update_actor_wario_sign(actor); break; case ACTOR_RAILROAD_CROSSING: update_actor_railroad_crossing((struct RailroadCrossing *) actor); @@ -4242,21 +2591,21 @@ void update_course_actors(void) { case ACTOR_TREE_ROYAL_RACEWAY: case ACTOR_TREE_MOO_MOO_FARM: case ACTOR_PALM_TREE: - case 0x1A: // A plant? - case 0X1B: + case ACTOR_UNKNOWN_0x1A: // A plant? + case ACTOR_UNKNOWN_0x1B: case ACTOR_TREE_BOWSERS_CASTLE: case ACTOR_TREE_FRAPPE_SNOWLAND: case ACTOR_CACTUS1_KALAMARI_DESERT: case ACTOR_CACTUS2_KALAMARI_DESERT: case ACTOR_CACTUS3_KALAMARI_DESERT: case ACTOR_BUSH_BOWSERS_CASTLE: - update_actor_trees_cacti_shrubs(actor); + update_actor_static_plant(actor); break; - case ACTOR_YOSHI_VALLEY_EGG: - update_actor_yoshi_valley_egg((struct YoshiValleyEgg *) actor); + case ACTOR_YOSHI_EGG: + update_actor_yoshi_egg((struct YoshiValleyEgg *) actor); break; - } } - func_802A0E44(); - func_802B30EC(); + } + evaluate_collision_for_destructible_actors(); + check_player_use_item(); } diff --git a/src/racing/actors.h b/src/racing/actors.h index bc7eca7cb..0bd0b1b7c 100644 --- a/src/racing/actors.h +++ b/src/racing/actors.h @@ -4,10 +4,14 @@ #include "types.h" #include "actor_types.h" +#define END_OF_SPAWN_DATA -0x8000 + +/** @cond */ + void cleanup_red_and_green_shells(struct ShellActor*); void actor_init(struct Actor*, Vec3f, Vec3s, Vec3f, s16); -void func_80297230(Camera*, struct Actor*); -void func_802972B8(Camera*, struct Actor*); +void actor_not_rendered(Camera*, struct Actor*); +void actor_rendered(Camera*, struct Actor*); void func_80297340(Camera*); void func_802976D8(Vec3s); void func_802976EC(Collision*, Vec3s); @@ -18,20 +22,20 @@ void init_red_shell_texture(void); void func_8029794C(Vec3f, Vec3s, f32); void func_802979F8(struct Actor*, f32); void render_actor_cow(Camera*, Mat4, struct Actor*); -void update_actor_yoshi_valley_egg(struct YoshiValleyEgg*); -void update_actor_trees_cacti_shrubs(struct Actor*); +void update_actor_yoshi_egg(struct YoshiValleyEgg*); +void update_actor_static_plant(struct Actor*); void update_actor_kiwano_fruit(struct KiwanoFruit*); void update_actor_paddle_boat(struct PaddleWheelBoat*); void update_actor_train_engine(struct TrainCar*); -void update_actor_train_car1(struct TrainCar*); -void update_actor_train_car2(struct TrainCar*); +void update_actor_train_tender(struct TrainCar*); +void update_actor_train_passenger_car(struct TrainCar*); void update_actor_piranha_plant(struct PiranhaPlant*); void render_actor_piranha_plant(Camera*, Mat4, struct PiranhaPlant*); -void func_802986B4(Camera*, Mat4, struct Actor*); -void func_80298AC0(Player*); -void func_80298C94(void); +void render_cows(Camera*, Mat4, struct Actor*); +void evaluate_collision_player_palm_trees(Player*); +void evaluate_collision_players_palm_trees(void); void func_80298D10(void); -void func_80298D7C(Camera*, Mat4, struct Actor*); +void render_palm_trees(Camera*, Mat4, struct Actor*); void render_actor_tree_mario_raceway(Camera*, Mat4, struct Actor*); void render_actor_tree_yoshi_valley(Camera*, Mat4, struct Actor*); void render_actor_tree_royal_raceway(Camera*, Mat4, struct Actor*); @@ -43,67 +47,67 @@ void render_actor_tree_frappe_snowland(Camera*, Mat4, struct Actor*); void render_actor_tree_cactus1_kalimari_desert(Camera*, Mat4, struct Actor*); void render_actor_tree_cactus2_kalimari_desert(Camera*, Mat4, struct Actor*); void render_actor_tree_cactus3_kalimari_desert(Camera*, Mat4, struct Actor*); -void render_actor_kiwano_fruit_dks_jungle_parkway(Camera*, Mat4, struct Actor*); +void render_actor_kiwano_fruit(Camera*, Mat4, struct Actor*); void render_actor_shell(Camera*, Mat4, struct ShellActor*); void render_actor_green_shell(Camera*, Mat4, struct ShellActor*); void render_actor_red_shell(Camera*, Mat4, struct ShellActor*); void render_actor_blue_shell(Camera*, Mat4, struct ShellActor*); void render_actor_banana(Camera*, Mat4, struct BananaActor*); -void update_actor_wario_stadium_sign(struct Actor*); +void update_actor_wario_sign(struct Actor*); void update_actor_railroad_crossing(struct RailroadCrossing*); -void update_actor_mario_raceway_sign(struct Actor*); +void update_actor_mario_sign(struct Actor*); void func_8029AC18(Camera*, Mat4, struct Actor*); void render_actor_paddle_boat(Camera*, struct PaddleWheelBoat*, Mat4, u16); -void func_8029B06C(Camera*, struct Actor*); -void func_8029B2E4(Camera*, struct Actor*); -void func_8029B4E0(Camera*, struct Actor*); -void func_8029B6EC(Camera*, struct Actor*); +void render_actor_box_truck(Camera*, struct Actor*); +void render_actor_school_bus(Camera*, struct Actor*); +void render_actor_car(Camera*, struct Actor*); +void render_actor_tanker_truck(Camera*, struct Actor*); void render_actor_train_engine(Camera*, struct TrainCar*); void render_actor_train_tender(Camera*, struct TrainCar*); -void render_actor_passenger_car(Camera*, struct TrainCar*); +void render_actor_train_passenger_car(Camera*, struct TrainCar*); void render_actor_falling_rock(Camera*, struct FallingRock*); -void place_piranha_plants(struct ActorSpawnData*); -void place_palm_trees(struct ActorSpawnData*); +void spawn_piranha_plants(struct ActorSpawnData*); +void spawn_palm_trees(struct ActorSpawnData*); void func_8029CF0C(struct ActorSpawnData*, struct FallingRock*); -void place_falling_rocks(struct ActorSpawnData*); +void spawn_falling_rocks(struct ActorSpawnData*); void update_actor_falling_rocks(struct FallingRock*); void spawn_foliage(struct ActorSpawnData*); -void place_all_item_boxes(struct ActorSpawnData*); +void spawn_all_item_boxes(struct ActorSpawnData*); void init_kiwano_fruit(void); void destroy_all_actors(void); -void place_course_actors(void); -void func_8029E158(void); -void func_8029E7DC(struct Actor*); +void spawn_course_actors(void); +void init_actors_and_load_textures(void); +void play_sound_before_despawn(struct Actor*); void destroy_actor(struct Actor*); -s16 func_8029E890(Vec3f, Vec3s, Vec3f, s16); -s16 addActorToEmptySlot(Vec3f, Vec3s, Vec3f, s16); -s16 func_8029ED38(Vec3f, s16); -s32 func_8029EEB8(Player*, Vec3f, f32, f32, f32); -s32 func_8029F1F8(Player*, struct Actor*); -s32 func_8029F2FC(Player*, struct PiranhaPlant*); -s32 func_8029F408(Player*, struct YoshiValleyEgg*); -s32 func_8029F69C(Player*, struct Actor*); -s32 func_8029FB80(Player*, struct Actor*); -s32 func_8029FCA4(struct Actor*, struct Actor*); -void func_8029FDC8(struct Actor*); -void func_802A00E8(struct Actor*, struct Actor*); -void func_802A0350(struct Actor*, struct Actor*); -void func_802A0450(Player*, struct Actor*); -void evaluate_player_collision(void); -void func_802A0E44(void); +s16 try_remove_destructable_item(Vec3f, Vec3s, Vec3f, s16); +s16 add_actor_to_empty_slot(Vec3f, Vec3s, Vec3f, s16); +s16 spawn_actor_at_pos(Vec3f, s16); +s32 query_and_resolve_collision_player_actor(Player*, Vec3f, f32, f32, f32); +s32 collision_mario_sign(Player*, struct Actor*); +s32 collision_piranha_plant(Player*, struct PiranhaPlant*); +s32 collision_yoshi_egg(Player*, struct YoshiValleyEgg*); +s32 collision_tree(Player*, struct Actor*); +s32 query_collision_player_vs_actor_item(Player*, struct Actor*); +s32 query_collision_actor_vs_actor(struct Actor*, struct Actor*); +void destroy_destructable_actor(struct Actor*); +void play_sound_on_destructible_actor_collision(struct Actor*, struct Actor*); +void evaluate_actor_collision_between_two_destructible_actors(struct Actor*, struct Actor*); +void evaluate_collision_between_player_actor(Player*, struct Actor*); +void evaluate_collision_for_players_and_actors(void); +void evaluate_collision_for_destructible_actors(void); void func_802A1064(struct FakeItemBox*); void update_actor_fake_item_box(struct FakeItemBox*); -void func_802A14BC(f32, f32, f32); +void init_actor_hot_air_balloon_item_box(f32, f32, f32); void update_actor_item_box_hot_air_balloon(struct ItemBox*); void update_actor_item_box(struct ItemBox*); -void func_802A171C(Camera*, struct FakeItemBox*); -void func_802A1EA0(Camera*, struct ItemBox*); +void render_actor_fake_item_box(Camera*, struct FakeItemBox*); +void render_actor_item_box(Camera*, struct ItemBox*); void render_actor_wario_sign(Camera*, struct Actor*); -void func_802A27A0(Camera*, Mat4, struct YoshiValleyEgg*, u16); +void render_actor_yoshi_egg(Camera*, Mat4, struct YoshiValleyEgg*, u16); void render_actor_mario_sign(Camera*, Mat4, struct Actor*); -void func_802A2AD0(Camera*, struct RailroadCrossing*); -void func_802A2C78(Camera*, Mat4, struct Actor*); -void func_802A2F34(struct UnkStruct_800DC5EC*); +void render_actor_railroad_crossing(Camera*, struct RailroadCrossing*); +void render_actor_palm_tree(Camera*, Mat4, struct PalmTree*); +void render_item_boxes(struct UnkStruct_800DC5EC*); void render_course_actors(struct UnkStruct_800DC5EC*); void update_course_actors(void); @@ -173,4 +177,6 @@ extern s8 D_800DC628[]; extern s8 D_800DC630[]; extern s8 D_802B8864[]; +/** @endcond */ + #endif // ACTORS_H diff --git a/src/racing/actors_extended.c b/src/racing/actors_extended.c index afc795e09..a28d64215 100644 --- a/src/racing/actors_extended.c +++ b/src/racing/actors_extended.c @@ -32,7 +32,7 @@ void copy_collision(Collision *arg0, Collision *arg1) { vec3f_copy_return(arg1->orientationVector, arg0->orientationVector); } -void func_802B02B4(struct ShellActor *shell, s32 shellType) { +void triple_shell_actor_collide_with_player(struct ShellActor *shell, s32 shellType) { TripleShellParent *parent = (TripleShellParent *) &gActorList[shell->parentIndex]; parent->shellsAvailable--; @@ -95,7 +95,7 @@ void func_802B04E8(UNUSED struct BananaActor *arg0, s16 bananaIndex) { } // Handle a banana being ran over while it is still part of a banana bunch -void func_802B0570(struct BananaActor *banana) { +void destroy_banana_in_banana_bunch(struct BananaActor *banana) { struct BananaBunchParent *temp_v0_2; func_802B0464(banana->youngerIndex); @@ -439,9 +439,9 @@ void update_actor_triple_shell(TripleShellParent *parent, s16 shellType) { func_800C9060(parent->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04)); func_800C90F4(parent->playerId, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00)); if (parent->type == ACTOR_TRIPLE_RED_SHELL) { - func_8000ED80(parent->shellIndices[0]); + add_red_shell_in_unexpired_actor_list(parent->shellIndices[0]); } else { - func_8000EDC8(parent->shellIndices[0]); + add_green_shell_in_unexpired_actor_list(parent->shellIndices[0]); } parent->shellIndices[0] = -1.0f; parent->shellsAvailable -= 1; @@ -464,9 +464,9 @@ void update_actor_triple_shell(TripleShellParent *parent, s16 shellType) { func_800C90F4(parent->playerId, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00)); func_800C9060(parent->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04)); if (parent->type == ACTOR_TRIPLE_RED_SHELL) { - func_8000ED80(parent->shellIndices[1]); + add_red_shell_in_unexpired_actor_list(parent->shellIndices[1]); } else { - func_8000EDC8(parent->shellIndices[1]); + add_green_shell_in_unexpired_actor_list(parent->shellIndices[1]); } parent->shellIndices[1] = -1.0f; parent->shellsAvailable -= 1; @@ -489,9 +489,9 @@ void update_actor_triple_shell(TripleShellParent *parent, s16 shellType) { func_800C9060(parent->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04)); func_800C90F4(parent->playerId, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00)); if (parent->type == ACTOR_TRIPLE_RED_SHELL) { - func_8000ED80(parent->shellIndices[2]); + add_red_shell_in_unexpired_actor_list(parent->shellIndices[2]); } else { - func_8000EDC8(parent->shellIndices[2]); + add_green_shell_in_unexpired_actor_list(parent->shellIndices[2]); } parent->shellIndices[2] = -1.0f; parent->shellsAvailable -= 1; @@ -514,7 +514,7 @@ s32 use_banana_bunch_item(Player *player) { struct BananaBunchParent *bananaBunch; // this have a animation of spawning so see update_actor_banana_bunch - actorIndex = addActorToEmptySlot(startingPos, startingRot, startingVelocity, ACTOR_BANANA_BUNCH); + actorIndex = add_actor_to_empty_slot(startingPos, startingRot, startingVelocity, ACTOR_BANANA_BUNCH); if (actorIndex < 0) { return actorIndex; } @@ -533,7 +533,7 @@ s32 use_triple_shell_item(Player *player, s16 tripleShellType) { TripleShellParent *parent; // this have a animation of spawning so see update_actor_triple_shell - actorIndex = addActorToEmptySlot(startingPos, startingRot, startingVelocity, tripleShellType); + actorIndex = add_actor_to_empty_slot(startingPos, startingRot, startingVelocity, tripleShellType); if (actorIndex < 0) { return actorIndex; } @@ -562,7 +562,7 @@ s32 init_triple_shell(TripleShellParent *parent, Player *player, s16 shellType, startingPos[1] += player->pos[1]; startingPos[2] += player->pos[2]; - actorIndex = addActorToEmptySlot(startingPos, startingRot, startingVelocity, shellType); + actorIndex = add_actor_to_empty_slot(startingPos, startingRot, startingVelocity, shellType); if (actorIndex < 0) { parent->shellIndices[shellId] = -1.0f; return -1; @@ -613,7 +613,7 @@ s32 use_green_shell_item(Player *player) { startingPos[2] += player->pos[2]; // spawn the shell - actorIndex = addActorToEmptySlot(startingPos, startingRot, startingVelocity, ACTOR_GREEN_SHELL); + actorIndex = add_actor_to_empty_slot(startingPos, startingRot, startingVelocity, ACTOR_GREEN_SHELL); if (actorIndex < 0) { return actorIndex; } @@ -652,7 +652,7 @@ s32 use_red_shell_item(Player *player) { startingPos[2] += player->pos[2]; // spawn the shell - actorIndex = addActorToEmptySlot(startingPos, startingRot, startingVelocity, ACTOR_RED_SHELL); + actorIndex = add_actor_to_empty_slot(startingPos, startingRot, startingVelocity, ACTOR_RED_SHELL); if (actorIndex < 0) { return actorIndex; } @@ -676,182 +676,7 @@ void use_blue_shell_item(Player *player) { gActorList[use_red_shell_item(player)].type = ACTOR_BLUE_SPINY_SHELL; } -void update_actor_banana(struct BananaActor *banana) { - UNUSED f32 pad; - Player *player; - struct BananaActor *elderBanana; - struct Controller *controller; - Vec3f someOtherVelocity; - Vec3f someVelocity; - f32 temp_f0; - UNUSED f32 var_f8; - UNUSED f32 pad2; - UNUSED f32 pad3; - UNUSED f32 pad4[2]; - f32 temp_f12; - f32 temp_f2; - f32 temp_f14; - f32 temp_f16; - f32 unkX; - f32 unkY; - f32 unkZ; - - player = &gPlayers[banana->rot[0]]; - switch (banana->state) { - case HELD_BANANA: - temp_f2 = player->pos[0] - banana->pos[0]; - temp_f14 = player->pos[1] - banana->pos[1]; - temp_f16 = player->pos[2] - banana->pos[2]; - temp_f12 = sqrtf((temp_f2 * temp_f2) + (temp_f14 * temp_f14) + (temp_f16 * temp_f16)) / 10.0f; - if (temp_f12 == 0.0f) { - banana->pos[0] = player->pos[0] + 0.2f; - banana->pos[1] = player->pos[1] + 0.2f; - banana->pos[2] = player->pos[2] + 0.2f; - } else { - temp_f2 /= temp_f12; - temp_f14 /= temp_f12; - temp_f16 /= temp_f12; - banana->pos[0] = player->pos[0] - temp_f2; - banana->pos[1] = player->pos[1] - temp_f14 - 2.0f; - banana->pos[2] = player->pos[2] - temp_f16; - } - func_802ADDC8(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]); - func_802B4E30((struct Actor *) banana); - if ((player->type & PLAYER_HUMAN) != 0) { - if (gDemoMode) { - controller = gControllerOne; - } else { - controller = &gControllers[banana->rot[0]]; - } - if ((controller->buttonDepressed & Z_TRIG) != 0) { - controller->buttonDepressed &= ~Z_TRIG; - banana->state = 1; - banana->unk_04 = 0x00B4; - player->soundEffects &= ~HOLD_BANANA_SOUND_EFFECT; - func_800C9060(player - gPlayerOne, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x12)); - pad3 = controller->rawStickY; - if ((pad3 > 30.0f) && (controller->rawStickX < 10) && (controller->rawStickX >= -9)) { - pad3 = pad3 - ((f32) 30); - pad3 = (pad3 / 20.0f) + 0.5f; - if (player->unk_094 < 2.0f) { - temp_f0 = 4.0f; - } else { - temp_f0 = (player->unk_094 * 0.75f) + 3.5f + pad3; - } - vec3f_set(someVelocity, 0, pad3, temp_f0); - func_802B64C4(someVelocity, player->rotation[1] + player->unk_0C0); - banana->velocity[0] = someVelocity[0]; - banana->velocity[1] = someVelocity[1]; - banana->velocity[2] = someVelocity[2]; - } else { - banana->velocity[0] = 0; - banana->velocity[1] = 1.5f; - banana->velocity[2] = 0; - } - } - } - break; - case DROPPED_BANANA: - if (banana->unk_04 != 0) { - banana->unk_04 -= 1; - if (banana->unk_04 == 0) { - banana->flags &= ~0x1000; - } - } - banana->pos[0] += banana->velocity[0]; - banana->pos[2] += banana->velocity[2]; - if (banana->velocity[1] > -1.0f) { - banana->velocity[1] -= 0.15f; - } - banana->pos[1] += banana->velocity[1]; - if ((banana->pos[2] < (f32) D_8015F6F2) || ((f32) D_8015F6F0 < banana->pos[2]) || (banana->pos[0] < (f32) D_8015F6EA) || ((f32) D_8015F6E8 < banana->pos[0]) || (banana->pos[1] < (f32) D_8015F6EE)) { - func_8029FDC8((struct Actor *) banana); - } else { - func_802ADDC8(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]); - banana->unk30.unk34 = 1; - if ((banana->unk30.unk34 != 0) && (banana->unk30.unk3C[2] < 0.0f)) { - someOtherVelocity[0] = -banana->unk30.orientationVector[0]; - someOtherVelocity[1] = -banana->unk30.orientationVector[1]; - someOtherVelocity[2] = -banana->unk30.orientationVector[2]; - banana->pos[0] += someOtherVelocity[0] * banana->unk30.unk3C[2]; - banana->pos[1] += someOtherVelocity[1] * banana->unk30.unk3C[2]; - banana->pos[2] += someOtherVelocity[2] * banana->unk30.unk3C[2]; - banana->flags &= ~0x1000; - banana->state = 4; - } - } - break; - case FIRST_BANANA_BUNCH_BANANA: - someVelocity[0] = 0.0f; - someVelocity[1] = 0.0f; - someVelocity[2] = -5.0f; - func_802B64C4(someVelocity, player->rotation[1] + player->unk_0C0); - unkX = player->pos[0] + someVelocity[0]; - unkY = player->pos[1] + someVelocity[1]; - unkZ = player->pos[2] + someVelocity[2]; - temp_f2 = unkX - banana->pos[0]; - temp_f14 = unkY - banana->pos[1]; - temp_f16 = unkZ - banana->pos[2]; - temp_f0 = sqrtf((temp_f2 * temp_f2) + (temp_f14 * temp_f14) + (temp_f16 * temp_f16)); - if (temp_f0 == 0.0f) { - banana->pos[0] = player->pos[0] + 0.2f; - banana->pos[1] = player->pos[1] + 0.2f; - banana->pos[2] = player->pos[2] + 0.2f; - } else { - temp_f2 /= temp_f0; - temp_f14 /= temp_f0; - temp_f16 /= temp_f0; - banana->pos[0] = someVelocity[0] + (unkX - temp_f2); - banana->pos[1] = unkY - temp_f14 - 2.0f; - banana->pos[2] = unkZ - temp_f16; - } - func_802ADDC8(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]); - func_802B4E30((struct Actor *) banana); - break; - case BANANA_BUNCH_BANANA: - elderBanana = (struct BananaActor*)&gActorList[banana->elderIndex]; - temp_f2 = elderBanana->pos[0] - banana->pos[0]; - temp_f14 = elderBanana->pos[1] - banana->pos[1]; - temp_f16 = elderBanana->pos[2] - banana->pos[2]; - temp_f12 = sqrtf((temp_f2 * temp_f2) + (temp_f14 * temp_f14) + (temp_f16 * temp_f16)) / 5.0f; - if (temp_f12 == 0.0f) { - banana->pos[0] = elderBanana->pos[0] + 0.2f; - banana->pos[1] = elderBanana->pos[1] + 0.2f; - banana->pos[2] = elderBanana->pos[2] + 0.2f; - } else { - temp_f2 /= temp_f12; - temp_f14 /= temp_f12; - temp_f16 /= temp_f12; - banana->pos[0] = elderBanana->pos[0] - temp_f2; - banana->pos[1] = elderBanana->pos[1] - temp_f14 - 2.0f; - banana->pos[2] = elderBanana->pos[2] - temp_f16; - } - var_f8 = banana->pos[2]; - func_802ADDC8(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]); - func_802B4E30((struct Actor *) banana); - break; - case DESTROYED_BANANA: - banana->velocity[1] -= 0.3f; - if (banana->velocity[1] < -5.0f) { - banana->velocity[1] = -5.0f; - } - banana->pos[1] += banana->velocity[1]; - banana->rot[0] += 0x16C; - banana->rot[1] -= 0x5B0; - banana->rot[2] += 0x38E; - banana->unk_04 -= 1; - if (banana->unk_04 == 0) { - destroy_actor((struct Actor *) banana); - } - break; - case BANANA_ON_GROUND: - banana->flags |= 0xC000; - banana->flags &= ~0x1000; - break; - default: - break; - } -} +#include "actors/banana/update.inc.c" // This function could reasonably be called "spawn_bananas_for_banana_bunch" or similar void func_802B2914(struct BananaBunchParent *banana_bunch, Player *player, s16 bananaId) { @@ -877,7 +702,7 @@ void func_802B2914(struct BananaBunchParent *banana_bunch, Player *player, s16 b startingRot[0] = 0; startingRot[1] = 0; startingRot[2] = 0; - actorIndex = addActorToEmptySlot(startingPos, startingRot, startingVelocity, ACTOR_BANANA); + actorIndex = add_actor_to_empty_slot(startingPos, startingRot, startingVelocity, ACTOR_BANANA); if (actorIndex >= 0) { newBanana = (struct BananaActor*)&gActorList[actorIndex]; startingPos[0] = player->pos[0]; @@ -963,7 +788,7 @@ s32 use_fake_itembox_item(Player *player) { startingRot[2] = 0; // spawn the itembox - actorIndex = addActorToEmptySlot(startingPos, startingRot, startingVelocity, ACTOR_FAKE_ITEM_BOX); + actorIndex = add_actor_to_empty_slot(startingPos, startingRot, startingVelocity, ACTOR_FAKE_ITEM_BOX); if (actorIndex < 0) { return actorIndex; } @@ -1009,7 +834,7 @@ s32 use_banana_item(Player *player) { startingRot[1] = 0; startingRot[2] = 0; - actorIndex = addActorToEmptySlot(startingPos, startingRot, startingVelocity, ACTOR_BANANA); // spawn banana + actorIndex = add_actor_to_empty_slot(startingPos, startingRot, startingVelocity, ACTOR_BANANA); // spawn banana if (actorIndex < 0) { return actorIndex; } @@ -1099,7 +924,7 @@ void player_use_item(Player *player) { } // Check if a player is using an item? -void func_802B30EC(void) { +void check_player_use_item(void) { Player *player; struct Controller *target; struct Controller *controller; @@ -1107,7 +932,7 @@ void func_802B30EC(void) { for (player = &gPlayers[0], loopController = &gControllers[0], target = &gControllers[4]; loopController != target; player++, loopController++) { controller = loopController; - if (func_800910E4(player) == 0) { + if (prevent_item_use(player) == FALSE) { if((player->type & PLAYER_INVISIBLE_OR_BOMB) != 0){ if ((player - gPlayerTwo) == 0) { controller = gControllerSix; @@ -1130,644 +955,9 @@ void func_802B30EC(void) { } } -void update_actor_green_shell(struct ShellActor *shell) { - Player *player; - UNUSED f32 pad9; - UNUSED f32 padA; - Vec3f somePos2; - Vec3f somePosVel; - f32 var_f2; - struct Controller *controller; - TripleShellParent *parent; - UNUSED f32 pad0; - UNUSED f32 pad1; - UNUSED f32 pad2; - UNUSED f32 pad3; - UNUSED f32 pad4; - UNUSED f32 pad5; - UNUSED f32 pad6; - UNUSED f32 pad7; - UNUSED f32 pad8; +#include "actors/green_shell/update.inc.c" - pad0 = shell->pos[0]; - pad6 = shell->pos[1]; - pad1 = shell->pos[2]; - if ((pad1 < D_8015F6F2) || (D_8015F6F0 < pad1) || (pad0 < D_8015F6EA) || (D_8015F6E8 < pad0) || (pad6 < D_8015F6EE)) { - func_8029FDC8((struct Actor *) shell); - } - shell->rotVelocity += 0x71C; - switch (shell->state) { - case HELD_SHELL: - player = &gPlayers[shell->playerId]; - copy_collision(&player->unk_110, &shell->unk30); - somePosVel[0] = 0.0f; - somePosVel[1] = player->boundingBoxSize; - somePosVel[2] = -(player->boundingBoxSize + shell->boundingBoxSize + 2.0f); - mtxf_translate_vec3f_mat3(somePosVel, player->orientationMatrix); - shell->pos[0] = player->pos[0] + somePosVel[0]; - pad2 = player->pos[1] - somePosVel[1]; - shell->pos[2] = player->pos[2] + somePosVel[2]; - pad0 = func_802ABE30(shell->pos[0], pad2, shell->pos[2], player->unk_110.unk3A); - pad1 = pad2 - pad0; - if ((pad1 < 5.0f) && (pad1 > -5.0f)) { - shell->pos[1] = shell->boundingBoxSize + pad0; - } else { - shell->pos[1] = pad2; - } - if ((player->type & PLAYER_HUMAN) != 0) { - controller = &gControllers[shell->playerId]; - if ((controller->buttonDepressed & Z_TRIG) != 0) { - controller->buttonDepressed &= ~Z_TRIG; - if (controller->rawStickY < -0x2D) { - var_f2 = 8.0f; - if (player->unk_094 > 8.0f) { - var_f2 = player->unk_094 * 1.2f; - } - somePosVel[0] = 0.0f; - somePosVel[1] = 0.0f; - somePosVel[2] = -var_f2; - func_802B64C4(somePosVel, player->rotation[1] + player->unk_0C0); - shell->velocity[0] = somePosVel[0]; - shell->velocity[1] = somePosVel[1]; - shell->velocity[2] = somePosVel[2]; - shell->state = 2; - func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04)); - func_800C90F4(shell->playerId, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00)); - func_8000EDC8((struct Actor*)shell - gActorList); - return; - } else { - shell->state = 1; - if (player->unk_0C0 > 0) { - shell->rotAngle = 0x78E3; - } else { - shell->rotAngle = -0x78E4; - } - } - } - } - break; - case RELEASED_SHELL: - player = &gPlayers[shell->playerId]; - if (shell->rotAngle > 0) { - shell->rotAngle -= 0xE38; - if (shell->rotAngle < 0) { - shell->state = 2; - shell->someTimer = 0x001E; - func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04)); - func_800C90F4(shell->playerId, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00)); - func_8000EDC8((struct Actor*)shell - gActorList); - } - } else { - shell->rotAngle += 0xE38; - if (shell->rotAngle > 0) { - shell->state = 2; - shell->someTimer = 0x001E; - func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04)); - func_800C90F4(shell->playerId, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00)); - func_8000EDC8((struct Actor*)shell - gActorList); - } - } - if (shell->state == 2) { - var_f2 = 8.0f; - if (player->unk_094 > 8.0f) { - var_f2 = player->unk_094 * 1.2f; - } - somePosVel[0] = 0.0f; - somePosVel[1] = 0.0f; - somePosVel[2] = var_f2; - func_802B64C4(somePosVel, player->rotation[1] + player->unk_0C0); - shell->velocity[0] = somePosVel[0]; - shell->velocity[1] = somePosVel[1]; - shell->velocity[2] = somePosVel[2]; - } else { - somePosVel[0] = sins(shell->rotAngle) * 6.0f; - somePosVel[1] = shell->boundingBoxSize - player->boundingBoxSize; - somePosVel[2] = coss(shell->rotAngle) * 6.0f; - mtxf_translate_vec3f_mat3(somePosVel, player->orientationMatrix); - shell->pos[0] = player->pos[0] + somePosVel[0]; - shell->pos[1] = player->pos[1] + somePosVel[1]; - shell->pos[2] = player->pos[2] + somePosVel[2]; - } - break; - case MOVING_SHELL: - if (shell->parentIndex > 0) { - shell->parentIndex -= 1; - if (shell->parentIndex == 0) { - shell->flags &= ~0x1000; - } - } - shell->velocity[1] -= 0.5f; - if (shell->velocity[1] < -2.0f) { - shell->velocity[1] = -2.0f; - } - somePos2[0] = shell->pos[0]; - somePos2[1] = shell->pos[1]; - somePos2[2] = shell->pos[2]; - shell->pos[0] += shell->velocity[0]; - shell->pos[1] += shell->velocity[1]; - shell->pos[2] += shell->velocity[2]; - func_802AD950(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], somePos2[0], somePos2[1], somePos2[2]); - func_802B4E30((struct Actor *) shell); - if ((shell->unk30.unk3C[0] < 0.0f) || (shell->unk30.unk3C[1] < 0.0f)) { - shell_collision(&shell->unk30, shell->velocity); - func_800C98B8(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x54)); - shell->flags |= 0x80; - } - break; - case TRIPLE_GREEN_SHELL: - player = &gPlayers[shell->playerId]; - parent = (TripleShellParent *) &gActorList[shell->parentIndex]; - if (parent->type != ACTOR_TRIPLE_GREEN_SHELL) { - func_8029FDC8((struct Actor *) shell); - } else { - shell->rotAngle += parent->rotVelocity; - somePosVel[0] = sins(shell->rotAngle) * 8.0f; - somePosVel[1] = shell->boundingBoxSize - player->boundingBoxSize; - somePosVel[2] = coss(shell->rotAngle) * 8.0f; - mtxf_translate_vec3f_mat3(somePosVel, player->orientationMatrix); - somePos2[0] = shell->pos[0]; - somePos2[1] = shell->pos[1]; - somePos2[2] = shell->pos[2]; - shell->pos[0] = player->pos[0] + somePosVel[0]; - shell->pos[1] = player->pos[1] + somePosVel[1]; - shell->pos[2] = player->pos[2] + somePosVel[2]; - func_802AD950(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], somePos2[0], somePos2[1], somePos2[2]); - func_802B4E30((struct Actor *) shell); - } - break; - case GREEN_SHELL_HIT_A_RACER: - // Somehow, this fake match affects stack management up in case 2 - shell->velocity[1] -= (0, 0.3f); - if (shell->velocity[1] < -5.0f) { - shell->velocity[1] = -5.0f; - } - shell->rotAngle += 0x5B0; - shell->someTimer -= 1; - shell->pos[1] += shell->velocity[1]; - if (shell->someTimer == 0) { - destroy_actor((struct Actor *) shell); - } - break; - default: - break; - } -} - -void func_802B3B44(struct ShellActor *shell) { - u16 currentWaypoint; - u16 nextWaypoint; - f32 temp_f0; - f32 temp_f0_2; - f32 temp_f0_3; - f32 temp_f12_3; - f32 temp_f14_2; - f32 temp_f16_2; - f32 temp_f2; - f32 temp_f12; - f32 temp_f28; - f32 temp_f20; - f32 temp_f22; - f32 temp_f24; - f32 temp_f12_0; - f32 temp_f12_1; - f32 temp_f12_2; - f32 temp_f18_3; - f32 temp_f16_3; - f32 temp_f26; - Vec3f origPos; - - currentWaypoint = shell->pathIndex; - temp_f2 = D_80164490[currentWaypoint].posX; - temp_f12 = D_80164490[currentWaypoint].posY; - temp_f28 = D_80164490[currentWaypoint].posZ; - nextWaypoint = currentWaypoint + 1; - - if (nextWaypoint >= D_80164430) { - nextWaypoint -= D_80164430; - } - - temp_f20 = temp_f2 - shell->pos[0]; - temp_f22 = temp_f12 - shell->pos[1]; - temp_f24 = temp_f28 - shell->pos[2]; - temp_f0 = (temp_f20 * temp_f20) + (temp_f22 * temp_f22) + (temp_f24 * temp_f24); - if (temp_f0 > 400.0f) { - temp_f18_3 = D_80164490[nextWaypoint].posX; - temp_f16_3 = D_80164490[nextWaypoint].posY; - temp_f26 = D_80164490[nextWaypoint].posZ; - - temp_f12_0 = temp_f18_3 - shell->pos[0]; - temp_f12_1 = temp_f16_3 - shell->pos[1]; - temp_f12_2 = temp_f26 - shell->pos[2]; - - temp_f0_3 = (temp_f12_0 * temp_f12_0) + (temp_f12_1 * temp_f12_1) + (temp_f12_2 * temp_f12_2); - if (temp_f0_3 < temp_f0) { - shell->pathIndex = nextWaypoint; - } else { - temp_f0_2 = sqrtf(temp_f0) * 4.0f; - temp_f20 /= temp_f0_2; - temp_f22 /= temp_f0_2; - temp_f24 /= temp_f0_2; - - temp_f12_3 = shell->velocity[0]; - temp_f14_2 = shell->velocity[1]; - temp_f16_2 = shell->velocity[2]; - - temp_f12_3 += temp_f20; - temp_f14_2 += temp_f22; - temp_f16_2 += temp_f24; - temp_f0 = sqrtf((temp_f12_3 * temp_f12_3) + (temp_f14_2 * temp_f14_2) + (temp_f16_2 * temp_f16_2)); - if (temp_f0 > 6.0f) { - temp_f0 /= 6.0f; - temp_f12_3 /= temp_f0; - temp_f14_2 /= temp_f0; - temp_f16_2 /= temp_f0; - } - shell->velocity[0] = temp_f12_3; - shell->velocity[1] = temp_f14_2; - shell->velocity[2] = temp_f16_2; - - origPos[0] = shell->pos[0]; - origPos[1] = shell->pos[1]; - origPos[2] = shell->pos[2]; - - shell->pos[0] += temp_f12_3; - shell->pos[1] += temp_f14_2; - shell->pos[2] += temp_f16_2; - func_802AD950(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], origPos[0], origPos[1], origPos[2]); - func_802B4E30((struct Actor *) shell); - } - } else { - if (temp_f0 > 5.0f) { - shell->pos[0] = temp_f2; - shell->pos[1] = shell->boundingBoxSize + temp_f12; - shell->pos[2] = temp_f28; - shell->pathIndex = nextWaypoint; - } else { - temp_f18_3 = D_80164490[nextWaypoint].posX; - temp_f16_3 = D_80164490[nextWaypoint].posY; - temp_f26 = D_80164490[nextWaypoint].posZ; - - shell->pos[0] = (temp_f2 + temp_f18_3) * 0.5f; - shell->pos[1] = ((temp_f12 + temp_f16_3) * 0.5f) + shell->boundingBoxSize; - shell->pos[2] = (temp_f28 + temp_f26) * 0.5f; - - shell->velocity[0] = (temp_f18_3 - temp_f2) * 0.5f; - shell->velocity[1] = (temp_f16_3 - temp_f12) * 0.5f; - shell->velocity[2] = (temp_f26 - temp_f28) * 0.5f; - } - } -} - -void func_802B3E7C(struct ShellActor *shell, Player *player) { - f32 x_velocity; - f32 z_velocity; - f32 xz_dist; - Vec3f newPosition; - - x_velocity = player->pos[0]; - x_velocity -= shell->pos[0]; - z_velocity = player->pos[2]; - z_velocity -= shell->pos[2]; - xz_dist = sqrtf((x_velocity * x_velocity) + (z_velocity * z_velocity)) / 8; - if (xz_dist == 0.0f) { - x_velocity = 0.0f; - z_velocity = 0.0f; - } else { - x_velocity /= xz_dist; - z_velocity /= xz_dist; - } - - newPosition[0] = shell->pos[0]; - newPosition[1] = shell->pos[1]; - newPosition[2] = shell->pos[2]; - shell->pos[0] += x_velocity; - shell->pos[1] -= 2.0f; - shell->pos[2] += z_velocity; - shell->velocity[0] = x_velocity; - shell->velocity[1] = -2.0f; - shell->velocity[2] = z_velocity; - - if (player->effects & BOO_EFFECT) { - func_8029FDC8((struct Actor *) shell); - } else { - func_802AD950(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], newPosition[0], newPosition[1], newPosition[2]); - func_802B4E30((struct Actor *) shell); - func_802B4104(shell); - } -} - -/** - * Only used in Battle mode - * Likely trying to find the nearest player that is not the shell's owner and is not dead -**/ -s16 func_802B3FD0(Player *owner, struct ShellActor *shell) { - Player *player; - s32 playerIndex; - f32 playerToShellDistance; - s16 playerId = -1; - f32 smallestDistance = 25000000.0f; - - for (playerIndex = 0; playerIndex < 4; playerIndex++) { - player = &gPlayers[playerIndex]; - if ((player->type & PLAYER_EXISTS) == 0) {continue;} - if (player == owner) {continue; } - if (gPlayerBalloonCount[playerIndex] < 0) { continue; } - // func_802B51E8 is not quite a 3D distance function, it doubles (rather than squares) the Z difference of the positions - playerToShellDistance = func_802B51E8(player->pos, shell->pos); - if (playerToShellDistance < smallestDistance) { - smallestDistance = playerToShellDistance; - playerId = player - gPlayerOne; - } - - } - - return playerId; -} - -void func_802B4104(struct ShellActor *shell) { - if ((shell->unk30.unk3C[0] < 0.0f) && ((shell->unk30.unk48[1] < 0.25f) || (shell->unk30.unk48[1] > -0.25f))) { - func_8029FDC8((struct Actor *) shell); - func_800C98B8(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x54)); - shell->flags |= 0x80; - } else if ((shell->unk30.unk3C[1] < 0.0f) && ((shell->unk30.unk54[1] < 0.25f) || (shell->unk30.unk54[1] < -0.25f))) { - func_8029FDC8((struct Actor *) shell); - func_800C98B8(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x54)); - shell->flags |= 0x80; - } -} - -void update_actor_red_blue_shell(struct ShellActor *shell) { - UNUSED f32 pad9; - Player *player; - f32 temp_f0; - UNUSED f32 temp_f14; - f32 temp_f2; - s16 temp_v0; - UNUSED s16 pad3; - Vec3f somePosVel; - struct Controller *controller; - TripleShellParent *parent; - UNUSED f32 pad0; - UNUSED f32 pad1; - UNUSED f32 pad2; - UNUSED f32 pad4; - UNUSED f32 pad5; - UNUSED f32 pad6; - UNUSED f32 pad7; - UNUSED f32 pad8; - UNUSED f32 pad10; - UNUSED f32 pad11; - UNUSED f32 pad12; - UNUSED s16 pad13; - UNUSED s16 pad13_2; - UNUSED f32 pad14; - UNUSED f32 pad15; - UNUSED f32 pad16; - UNUSED f32 pad17; - Vec3f origPos; - - pad1 = shell->pos[0]; - pad0 = shell->pos[2]; - pad2 = shell->pos[1]; - pad13 = shell->type; - if ((pad0 < (f32) D_8015F6F2) || ((f32) D_8015F6F0 < pad0) || (pad1 < (f32) D_8015F6EA) || ((f32) D_8015F6E8 < pad1) || (pad2 < (f32) D_8015F6EE)) { - func_8029FDC8((struct Actor *) shell); - } - - shell->rotVelocity += 0x71C; - switch (shell->state) { - case HELD_SHELL: - player = &gPlayers[shell->playerId]; - copy_collision(&player->unk_110, &shell->unk30); - somePosVel[0] = 0.0f; - somePosVel[1] = player->boundingBoxSize; - somePosVel[2] = -(player->boundingBoxSize + shell->boundingBoxSize + 2.0f); - mtxf_translate_vec3f_mat3(somePosVel, player->orientationMatrix); - shell->pos[0] = player->pos[0] + somePosVel[0]; - pad7 = player->pos[1] - somePosVel[1]; - shell->pos[2] = player->pos[2] + somePosVel[2]; - temp_f0 = func_802ABE30(shell->pos[0], pad7, shell->pos[2], player->unk_110.unk3A); - temp_f2 = pad7 - temp_f0; - - if ((temp_f2 < 5.0f) && (temp_f2 > -5.0f)) { - shell->pos[1] = shell->boundingBoxSize + temp_f0; - } else { - shell->pos[1] = pad7; - } - - if ((player->type & PLAYER_HUMAN) != 0) { - if (gDemoMode) { - controller = gControllerOne; - } else { - controller = &gControllers[shell->playerId]; - } - } else { - controller = gControllerOne; - } - - if ((controller->buttonDepressed & Z_TRIG) != 0) { - controller->buttonDepressed &= ~Z_TRIG; - shell->state = RELEASED_SHELL; - if (player->unk_0C0 > 0) { - shell->rotAngle = 0x78E3; - } else { - shell->rotAngle = -0x78E4; - } - } - break; - case RELEASED_SHELL: - player = &gPlayers[shell->playerId]; - if (shell->rotAngle > 0) { - shell->rotAngle -= 0x71C; - if (shell->rotAngle < 0) { - shell->state = MOVING_SHELL; - func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04)); - func_800C90F4(shell->playerId, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00)); - if (pad13 == ACTOR_RED_SHELL) { - func_8000ED80((struct Actor*)shell - gActorList); - } else { - func_8000EE10((struct Actor*)shell - gActorList); - func_800C9D80(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x51, 0x01, 0x80, 0x08)); - } - } - } else { - shell->rotAngle += 0x71C; - if (shell->rotAngle > 0) { - shell->state = MOVING_SHELL; - func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04)); - func_800C90F4(shell->playerId, (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00)); - if (pad13 == ACTOR_RED_SHELL) { - func_8000ED80((struct Actor*)shell - gActorList); - } else { - func_8000EE10((struct Actor*)shell - gActorList); - func_800C9D80(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x51, 0x01, 0x80, 0x08)); - } - } - } - if (shell->state == MOVING_SHELL) { - shell->someTimer = 0x001E; - temp_f0 = 8.0f; - if (player->unk_094 > 8.0f) { - temp_f0 = player->unk_094 * 1.2f; - } - somePosVel[0] = 0.0f; - somePosVel[1] = 0.0f; - somePosVel[2] = temp_f0; - func_802B64C4(somePosVel, (s16) (player->rotation[1] + player->unk_0C0)); - shell->velocity[0] = somePosVel[0]; - shell->velocity[1] = somePosVel[1]; - shell->velocity[2] = somePosVel[2]; - } else { - somePosVel[0] = sins(shell->rotAngle) * 8.0f; - somePosVel[1] = shell->boundingBoxSize - player->boundingBoxSize; - somePosVel[2] = coss(shell->rotAngle) * 8.0f; - mtxf_translate_vec3f_mat3(somePosVel, player->orientationMatrix); - shell->pos[0] = player->pos[0] + somePosVel[0]; - shell->pos[1] = player->pos[1] + somePosVel[1]; - shell->pos[2] = player->pos[2] + somePosVel[2]; - } - break; - case MOVING_SHELL: - player = &gPlayers[shell->playerId]; - shell->someTimer -= 1; - if (shell->someTimer == 0) { - shell->flags &= 0xEFFF; - if (shell->type == ACTOR_BLUE_SPINY_SHELL) { - shell->targetPlayer = gPlayerPositionLUT[0]; - shell->state = BLUE_SHELL_LOCK_ON; - shell->shellId = 1000.0f; - temp_v0 = gNearestWaypointByPlayerId[player - gPlayerOne] + 8; - if ((s32) D_80164430 < temp_v0) { - temp_v0 -= D_80164430; - } - shell->pathIndex = temp_v0; - } else if (gModeSelection == BATTLE) { - shell->shellId = 1000.0f; - shell->targetPlayer = func_802B3FD0(player, shell); - if (shell->targetPlayer < 0) { - shell->flags = 0x8000; - shell->velocity[1] = 3.0f; - shell->pathIndex = 0; - shell->someTimer = 0x003C; - shell->state = DESTROYED_SHELL; - } else { - shell->state = RED_SHELL_LOCK_ON; - } - } else { - if (player->currentRank == 0) { - shell->state = TRIPLE_GREEN_SHELL; - shell->someTimer = 0x0258; - temp_v0 = gNearestWaypointByPlayerId[player - gPlayerOne] + 8; - if ((s32) D_80164430 < temp_v0) { - temp_v0 -= D_80164430; - } - shell->pathIndex = temp_v0; - } else if (player->currentRank >= 5) { - shell->state = GREEN_SHELL_HIT_A_RACER; - shell->shellId = 1000.0f; - temp_v0 = gNearestWaypointByPlayerId[player - gPlayerOne] + 8; - if ((s32) D_80164430 < temp_v0) { - temp_v0 -= D_80164430; - } - shell->pathIndex = temp_v0; - shell->targetPlayer = gPlayerPositionLUT[player->currentRank - 1]; - } else { - shell->state = RED_SHELL_LOCK_ON; - shell->shellId = 1000.0f; - shell->targetPlayer = gPlayerPositionLUT[player->currentRank - 1]; - } - } - } - shell->velocity[1] -= 0.5; - if (shell->velocity[1] < -2.0f) { - shell->velocity[1] = -2.0f; - } - origPos[0] = shell->pos[0]; - origPos[1] = shell->pos[1]; - origPos[2] = shell->pos[2]; - shell->pos[0] += shell->velocity[0]; - shell->pos[1] += shell->velocity[1]; - shell->pos[2] += shell->velocity[2]; - func_802AD950(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], origPos[0], origPos[1], origPos[2]); - func_802B4E30((struct Actor *) shell); - func_802B4104(shell); - break; - case RED_SHELL_LOCK_ON: - func_802B3E7C(shell, &gPlayers[shell->targetPlayer]); - break; - case TRIPLE_GREEN_SHELL: - func_802B3B44(shell); - if (shell->someTimer == 0) { - if ((shell->flags & 0xF) == 0) { - func_8029FDC8((struct Actor *) shell); - } else { - shell->someTimer -= 1; - } - } - break; - case GREEN_SHELL_HIT_A_RACER: - func_802B3B44(shell); - player = &gPlayers[shell->targetPlayer]; - temp_f0 = player->pos[0]; - temp_f0 -= shell->pos[0]; - temp_f2 = player->pos[2]; - temp_f2 -= shell->pos[2]; - if (((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) < 40000.0f) { - shell->state = RED_SHELL_LOCK_ON; - } - break; - case TRIPLE_RED_SHELL: - player = &gPlayers[shell->playerId]; - parent = (TripleShellParent *) &gActorList[shell->parentIndex]; - if (parent->type != ACTOR_TRIPLE_RED_SHELL) { - func_8029FDC8((struct Actor *) shell); - } else { - shell->rotAngle += parent->rotVelocity; - somePosVel[0] = sins(shell->rotAngle) * 8.0f; - somePosVel[1] = shell->boundingBoxSize - player->boundingBoxSize; - somePosVel[2] = coss(shell->rotAngle) * 8.0f; - mtxf_translate_vec3f_mat3(somePosVel, player->orientationMatrix); - origPos[0] = shell->pos[0]; - origPos[1] = shell->pos[1]; - origPos[2] = shell->pos[2]; - shell->pos[0] = player->pos[0] + somePosVel[0]; - shell->pos[1] = player->pos[1] + somePosVel[1]; - shell->pos[2] = player->pos[2] + somePosVel[2]; - func_802AD950(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], origPos[0], origPos[1], origPos[2]); - func_802B4E30((struct Actor *) shell); - } - break; - case DESTROYED_SHELL: - shell->velocity[1] -= 0.3f; - if (shell->velocity[1] < -5.0f) { - shell->velocity[1] = -5.0f; - } - shell->rotAngle += 0x5B0; - shell->someTimer -= 1; - shell->pos[1] += shell->velocity[1]; - if (shell->someTimer == 0) { - destroy_actor((struct Actor *) shell); - } - break; - case BLUE_SHELL_LOCK_ON: - func_802B3B44(shell); - shell->targetPlayer = gPlayerPositionLUT[0]; - player = &gPlayers[gPlayerPositionLUT[0]]; - temp_f0 = player->pos[0]; - temp_f0 -= shell->pos[0]; - temp_f2 = player->pos[2]; - temp_f2 -= shell->pos[2]; - if (((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) < 40000.0f) { - shell->state = BLUE_SHELL_TARGET_ELIMINATED; - } - break; - case 9: - func_802B3E7C(shell, &gPlayers[shell->targetPlayer]); - break; - default: - break; - } -} +#include "actors/blue_and_red_shells/update.inc.c" void func_802B4E30(struct Actor *arg0) { if ((arg0->unk30.unk3C[2] < 0.0f) && (arg0->unk30.unk34 == 1)) { diff --git a/src/racing/actors_extended.h b/src/racing/actors_extended.h index e0143668f..89aa28e5a 100644 --- a/src/racing/actors_extended.h +++ b/src/racing/actors_extended.h @@ -4,12 +4,14 @@ #include "common_structs.h" #include "actor_types.h" +/** @cond */ + void copy_collision(Collision*, Collision*); -void func_802B02B4(struct ShellActor*, s32); +void triple_shell_actor_collide_with_player(struct ShellActor*, s32); void func_802B039C(struct BananaActor*); void func_802B0464(s16); void func_802B04E8(struct BananaActor*, s16); -void func_802B0570(struct BananaActor*); +void destroy_banana_in_banana_bunch(struct BananaActor*); void func_802B0648(struct BananaBunchParent*); void func_802B0788(s16, struct BananaBunchParent*, Player*); s32 func_802B09C0(s16); @@ -28,7 +30,7 @@ s32 use_fake_itembox_item(Player*); s32 use_banana_item(Player*); void use_thunder_item(Player*); void player_use_item(Player*); -void func_802B30EC(void); +void check_player_use_item(void); void update_actor_green_shell(struct ShellActor*); void func_802B3B44(struct ShellActor*); void func_802B3E7C(struct ShellActor*, Player*); @@ -44,4 +46,6 @@ extern f32 D_802B9F68; extern s16 gPlayerBalloonCount[]; +/** @endcond */ + #endif // ACTORS_EXTENDED_H diff --git a/src/racing/collision.c b/src/racing/collision.c index a13fbea62..92bb12ac1 100644 --- a/src/racing/collision.c +++ b/src/racing/collision.c @@ -77,7 +77,7 @@ f32 func_802AAB4C(Player *player) { return 0.8f; case COURSE_SHERBET_LAND: if ((get_surface_type(player->unk_110.unk3A) & 0xFF) == SNOW) { - return (f32) (D_8015F6EE - 0xA); + return (f32) (gCourseMinY - 0xA); } return D_8015F8E4; case COURSE_DK_JUNGLE: @@ -691,10 +691,10 @@ s32 func_802AC22C(KartBoundingBoxCorner *arg0) { default: break; } - temp1 = D_8015F6E8 - D_8015F6EA; - temp2 = D_8015F6F0 - D_8015F6F2; - temp_f4 = (temp_f22 - D_8015F6EA) / (temp1 / 32); - temp_f6 = (temp_f26 - D_8015F6F2) / (temp2 / 32); + temp1 = gCourseMaxX - gCourseMinX; + temp2 = gCourseMaxZ - gCourseMinZ; + temp_f4 = (temp_f22 - gCourseMinX) / (temp1 / 32); + temp_f6 = (temp_f26 - gCourseMinZ) / (temp2 / 32); if (temp_f4 < 0) { return 0; } @@ -1279,14 +1279,14 @@ u16 func_802AD950(Collision *collision, f32 boundingBoxSize, f32 x1, f32 y1, f32 } - temp_v0_4 = (s32) D_8015F6E8 - D_8015F6EA; - temp_v1 = (s32) D_8015F6F0 - D_8015F6F2; + temp_v0_4 = (s32) gCourseMaxX - gCourseMinX; + temp_v1 = (s32) gCourseMaxZ - gCourseMinZ; temp1 = temp_v0_4 / 32; temp2 = temp_v1 / 32; - temp_f10 = (x1 - D_8015F6EA) / temp1; - temp_f16 = (z1 - D_8015F6F2) / temp2; + temp_f10 = (x1 - gCourseMinX) / temp1; + temp_f16 = (z1 - gCourseMinZ) / temp2; if (temp_f10 < 0) { return 0; @@ -1387,14 +1387,14 @@ u16 func_802ADDC8(Collision* collision, f32 boundingBoxSize, f32 posX, f32 posY, return var_s4; } - temp_f4 = (s32) D_8015F6E8 - D_8015F6EA; - temp_f6 = (s32) D_8015F6F0 - D_8015F6F2; + temp_f4 = (s32) gCourseMaxX - gCourseMinX; + temp_f6 = (s32) gCourseMaxZ - gCourseMinZ; temp1 = temp_f4 / 32; temp2 = temp_f6 / 32; - temp_f10 = (posX - D_8015F6EA) / temp1; - temp_f16 = (posZ - D_8015F6F2) / temp2; + temp_f10 = (posX - gCourseMinX) / temp1; + temp_f16 = (posZ - gCourseMinZ) / temp2; if (temp_f10 < 0) { @@ -1471,13 +1471,13 @@ f32 func_802AE1C0(f32 posX, f32 posY, f32 posZ) { s32 c; s32 d; - a = (D_8015F6E8 - D_8015F6EA); - b = (D_8015F6F0 - D_8015F6F2); + a = (gCourseMaxX - gCourseMinX); + b = (gCourseMaxZ - gCourseMinZ); c = a / 32; d = b / 32; - temp_f4 = (s16) ((posX - D_8015F6EA) / c); - temp_f6 = (s16) ((posZ - D_8015F6F2) / d); + temp_f4 = (s16) ((posX - gCourseMinX) / c); + temp_f6 = (s16) ((posZ - gCourseMinZ) / d); temp_f66 = temp_f4 + (temp_f6 * 32); iter = D_8014F110[temp_f66].unk2; @@ -1514,6 +1514,28 @@ f32 func_802AE1C0(f32 posX, f32 posY, f32 posZ) { return phi_f20; } +#define MAX3(a,b,c, out) if (a >= b) {\ + if (a >= c) {\ + out = a;\ + } else\ + out = c;\ +\ + } else if (b >= c) {\ + out = b;\ + } else\ + out = c; \ + +#define MIN3(a,b,c, out) if (a <= b) {\ + if (a <= c) {\ + out = a;\ + } else\ + out = c;\ +\ + } else if (b <= c) {\ + out = b;\ + } else\ + out = c;\ + void func_802AE434(Vtx *vtx1, Vtx *vtx2, Vtx *vtx3, s8 surfaceType, u16 sectionId) { mk64_surface_map_ram *tile = &gSurfaceMap[D_8015F588]; s16 x2; @@ -1545,12 +1567,12 @@ void func_802AE434(Vtx *vtx1, Vtx *vtx2, Vtx *vtx3, s8 surfaceType, u16 sectionI f32 normalZ; f32 distance; - s16 sp4A; - s16 sp48; - s16 sp46; - s16 sp44; - s16 sp42; - s16 sp40; + s16 maxX; + s16 maxZ; + s16 minY; + s16 minX; + s16 maxY; + s16 minZ; tile->vtxPoly1 = vtx1; tile->vtxPoly2 = vtx2; @@ -1585,73 +1607,17 @@ void func_802AE434(Vtx *vtx1, Vtx *vtx2, Vtx *vtx3, s8 surfaceType, u16 sectionI y3 = tile->vtxPoly2->v.ob[1]; z3 = tile->vtxPoly2->v.ob[2]; } - if (x1 >= x2) { - if (x1 >= x3) { - sp4A = x1; - } else - sp4A = x3; + MAX3(x1, x2, x3, maxX) - } else if (x2 >= x3) { - sp4A = x2; - } else - sp4A = x3; + MAX3(z1, z2, z3, maxZ) - if (z1 >= z2) { + MAX3(y1, y2, y3, maxY) - if (z1 >= z3) { - sp48 = z1; - } else - sp48 = z3; + MIN3(x1, x2, x3, minX) - } else if (z2 >= z3) { - sp48 = z2; - } else - sp48 = z3; + MIN3(y1, y2, y3, minY) - if (y1 >= y2) { - - if (y1 >= y3) { - sp42 = y1; - } else - sp42 = y3; - - } else if (y2 >= y3) { - sp42 = y2; - } else - sp42 = y3; - - if (x1 <= x2) { - if (x1 <= x3) { - sp44 = x1; - } else - sp44 = x3; - - } else if (x2 <= x3) { - sp44 = x2; - } else - sp44 = x3; - - if (y1 <= y2) { - if (y1 <= y3) { - sp46 = y1; - } else - sp46 = y3; - - } else if (y2 <= y3) { - sp46 = y2; - } else - sp46 = y3; - - if (z1 <= z2) { - if (z1 <= z3) { - sp40 = z1; - } else - sp40 = z3; - - } else if (z2 <= z3) { - sp40 = z2; - } else - sp40 = z3; + MIN3(z1, z2, z3, minZ) crossProductX = (((y2 - y1) * (z3 - z2)) - ((z2 - z1) * (y3 - y2))); crossProductY = (((z2 - z1) * (x3 - x2)) - ((x2 - x1) * (z3 - z2))); @@ -1689,30 +1655,30 @@ void func_802AE434(Vtx *vtx1, Vtx *vtx2, Vtx *vtx3, s8 surfaceType, u16 sectionI } } - tile->vtx21 = sp4A; - tile->vtx23 = sp48; - tile->vtx31 = sp44; - tile->vtx33 = sp40; - tile->vtx32 = sp46; - tile->vtx22 = sp42; + tile->vtx21 = maxX; + tile->vtx23 = maxZ; + tile->vtx31 = minX; + tile->vtx33 = minZ; + tile->vtx32 = minY; + tile->vtx22 = maxY; - if (sp44 < D_8015F6EA) { - D_8015F6EA = sp44; + if (minX < gCourseMinX) { + gCourseMinX = minX; } - if (sp46 < D_8015F6EE) { - D_8015F6EE = sp46; + if (minY < gCourseMinY) { + gCourseMinY = minY; } - if (sp40 < D_8015F6F2) { - D_8015F6F2 = sp40; + if (minZ < gCourseMinZ) { + gCourseMinZ = minZ; } - if (sp4A > D_8015F6E8) { - D_8015F6E8 = sp4A; + if (maxX > gCourseMaxX) { + gCourseMaxX = maxX; } - if (sp42 > D_8015F6EC) { - D_8015F6EC = sp42; + if (maxY > gCourseMaxY) { + gCourseMaxY = maxY; } - if (sp48 > D_8015F6F0) { - D_8015F6F0 = sp48; + if (maxZ > gCourseMaxZ) { + gCourseMaxZ = maxZ; } tile->height = normalX; @@ -1953,8 +1919,8 @@ void func_802AF314(void) { s32 temp1; s32 temp2; s32 index; - temp1 = (s32) D_8015F6E8 - D_8015F6EA; - temp2 = (s32) D_8015F6F0 - D_8015F6F2; + temp1 = (s32) gCourseMaxX - gCourseMinX; + temp2 = (s32) gCourseMaxZ - gCourseMinZ; temp_s6 = temp1 / 32; temp_fp = temp2 / 32; @@ -1976,8 +1942,8 @@ void func_802AF314(void) { for (k = 0; k < 32; k++) { index = k + j * 32; - temp_s1 = (D_8015F6EA + (temp_s6 * k)) - 20; - temp_s2 = (D_8015F6F2 + (temp_fp * j)) - 20; + temp_s1 = (gCourseMinX + (temp_s6 * k)) - 20; + temp_s2 = (gCourseMinZ + (temp_fp * j)) - 20; temp_a1 = temp_s1 + temp_s6 + 40; temp_a3 = temp_s2 + temp_fp + 40; @@ -2218,14 +2184,14 @@ u16 process_collision(Player *player, KartBoundingBoxCorner *corner, f32 cornerP // If the surface flags are not set then try setting them. - temp_v0_2 = (s32) D_8015F6E8 - D_8015F6EA; - temp_v1 = (s32) D_8015F6F0 - D_8015F6F2; + temp_v0_2 = (s32) gCourseMaxX - gCourseMinX; + temp_v1 = (s32) gCourseMaxZ - gCourseMinZ; temp1 = temp_v0_2 / 32; temp2 = temp_v1 / 32; - temp_f10 = (cornerPos1 - D_8015F6EA) / temp1; - temp_f16 = (cornerPos3 - D_8015F6F2) / temp2; + temp_f10 = (cornerPos1 - gCourseMinX) / temp1; + temp_f16 = (cornerPos3 - gCourseMinZ) / temp2; if (temp_f10 < 0) { return 0; } diff --git a/src/racing/collision.h b/src/racing/collision.h index cecc93f2c..9dd6859f5 100644 --- a/src/racing/collision.h +++ b/src/racing/collision.h @@ -3,6 +3,9 @@ #include "common_structs.h" +#define COLLISION 0x1 +#define NO_COLLISION 0x0 + void nullify_displaylist(uintptr_t); void func_802AAAAC(Collision*); f32 func_802AAB4C(Player*); diff --git a/src/racing/render_courses.c b/src/racing/render_courses.c index 35781e821..22c4bdd24 100644 --- a/src/racing/render_courses.c +++ b/src/racing/render_courses.c @@ -1383,11 +1383,11 @@ void func_80295BF8(s32 playerIndex) { void func_80295C6C(void) { gNextFreeMemoryAddress += ALIGN16(D_8015F588 * sizeof(mk64_surface_map_ram)); - D_8015F6E8 += 20; - D_8015F6F0 += 20; - D_8015F6EA += -20; - D_8015F6F2 += -20; - D_8015F6EE += -20; + gCourseMaxX += 20; + gCourseMaxZ += 20; + gCourseMinX += -20; + gCourseMinZ += -20; + gCourseMinY += -20; func_802AF314(); gNextFreeMemoryAddress += ALIGN16(D_8015F58A * 2); } @@ -1404,12 +1404,15 @@ void func_80295D6C(void) { void func_80295D88(void) { gNumActors = 0; - D_8015F6EA = 0; - D_8015F6EE = 0; - D_8015F6F2 = 0; - D_8015F6E8 = 0; - D_8015F6EC = 0; - D_8015F6F0 = 0; + + gCourseMinX = 0; + gCourseMinY = 0; + gCourseMinZ = 0; + + gCourseMaxX = 0; + gCourseMaxY = 0; + gCourseMaxZ = 0; + D_8015F59C = 0; D_8015F5A0 = 0; func_80295D6C(); @@ -1431,7 +1434,7 @@ void func_80295D88(void) { } parse_course_displaylists((uintptr_t) d_course_mario_raceway_addr); func_80295C6C(); - D_8015F8E4 = D_8015F6EE - 10.0f; + D_8015F8E4 = gCourseMinY - 10.0f; break; case COURSE_CHOCO_MOUNTAIN: D_800DC5BC = 1; @@ -1485,7 +1488,7 @@ void func_80295D88(void) { func_802B5D64(&d_course_yoshi_valley_lights4, -0x38F0, 0x1C70, 1); parse_course_displaylists((uintptr_t) d_course_yoshi_valley_addr); func_80295C6C(); - D_8015F8E4 = D_8015F6EE - 10.0f; + D_8015F8E4 = gCourseMinY - 10.0f; break; case COURSE_FRAPPE_SNOWLAND: parse_course_displaylists((uintptr_t) d_course_frappe_snowland_addr); @@ -1512,12 +1515,12 @@ void func_80295D88(void) { case COURSE_LUIGI_RACEWAY: parse_course_displaylists((uintptr_t) d_course_luigi_raceway_addr); func_80295C6C(); - D_8015F8E4 = D_8015F6EE - 10.0f; + D_8015F8E4 = gCourseMinY - 10.0f; break; case COURSE_MOO_MOO_FARM: parse_course_displaylists((uintptr_t) d_course_moo_moo_farm_addr); func_80295C6C(); - D_8015F8E4 = D_8015F6EE - 10.0f; + D_8015F8E4 = gCourseMinY - 10.0f; break; case COURSE_TOADS_TURNPIKE: D_801625EC = 43; @@ -1527,12 +1530,12 @@ void func_80295D88(void) { D_802B87B4 = 1000; parse_course_displaylists((uintptr_t) d_course_toads_turnpike_addr); func_80295C6C(); - D_8015F8E4 = D_8015F6EE - 10.0f; + D_8015F8E4 = gCourseMinY - 10.0f; break; case COURSE_KALAMARI_DESERT: parse_course_displaylists((uintptr_t) d_course_kalimari_desert_addr); func_80295C6C(); - D_8015F8E4 = D_8015F6EE - 10.0f; + D_8015F8E4 = gCourseMinY - 10.0f; break; case COURSE_SHERBET_LAND: parse_course_displaylists((uintptr_t) d_course_sherbet_land_addr); @@ -1562,7 +1565,7 @@ void func_80295D88(void) { case COURSE_WARIO_STADIUM: parse_course_displaylists((uintptr_t) d_course_wario_stadium_addr); func_80295C6C(); - D_8015F8E4 = D_8015F6EE - 10.0f; + D_8015F8E4 = gCourseMinY - 10.0f; // d_course_wario_stadium_packed_dl_C50 find_vtx_and_set_colours((uintptr_t)0x07000C50, 100, 255, 255, 255); // d_course_wario_stadium_packed_dl_BD8 @@ -1584,7 +1587,7 @@ void func_80295D88(void) { // d_course_block_fort_packed_dl_15C0 set_vertex_data_with_default_section_id((uintptr_t)0x070015C0, 1); func_80295C6C(); - D_8015F8E4 = D_8015F6EE - 10.0f; + D_8015F8E4 = gCourseMinY - 10.0f; break; case COURSE_SKYSCRAPER: // d_course_skyscraper_packed_dl_1110 @@ -1599,7 +1602,7 @@ void func_80295D88(void) { // d_course_double_deck_packed_dl_738 set_vertex_data_with_default_section_id((uintptr_t)0x07000738, 1); func_80295C6C(); - D_8015F8E4 = D_8015F6EE - 10.0f; + D_8015F8E4 = gCourseMinY - 10.0f; break; case COURSE_DK_JUNGLE: parse_course_displaylists((uintptr_t) d_course_dks_jungle_parkway_addr); @@ -1698,7 +1701,7 @@ void func_802966A0(void) { } // d_course_dks_jungle_parkway_packed_dl_9880 find_and_set_tile_size((uintptr_t)0x07009880, 0, D_802B87C4); - func_80298C94(); + evaluate_collision_players_palm_trees(); break; } } diff --git a/src/racing/skybox_and_splitscreen.c b/src/racing/skybox_and_splitscreen.c index d48899662..ebdaf7b96 100644 --- a/src/racing/skybox_and_splitscreen.c +++ b/src/racing/skybox_and_splitscreen.c @@ -814,7 +814,7 @@ void render_player_one_1p_screen(void) { render_players_on_screen_one(); func_8029122C(D_800DC5EC, PLAYER_ONE); func_80021B0C(); - func_802A2F34(D_800DC5EC); + render_item_boxes(D_800DC5EC); render_player_snow_effect(RENDER_SCREEN_MODE_1P_PLAYER_ONE); func_80058BF4(); if (D_800DC5B8 != 0) { @@ -870,7 +870,7 @@ void render_player_one_2p_screen_vertical(void) { render_players_on_screen_one(); func_8029122C(D_800DC5EC, PLAYER_ONE); func_80021B0C(); - func_802A2F34(D_800DC5EC); + render_item_boxes(D_800DC5EC); render_player_snow_effect(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_ONE); func_80058BF4(); if (D_800DC5B8 != 0) { @@ -924,7 +924,7 @@ void render_player_two_2p_screen_vertical(void) { render_players_on_screen_two(); func_8029122C(D_800DC5F0, PLAYER_TWO); func_80021C78(); - func_802A2F34(D_800DC5F0); + render_item_boxes(D_800DC5F0); func_80058BF4(); render_player_snow_effect(RENDER_SCREEN_MODE_2P_HORIZONTAL_PLAYER_TWO); if (D_800DC5B8 != 0) { @@ -982,7 +982,7 @@ void render_player_one_2p_screen_horizontal(void) { render_players_on_screen_one(); func_8029122C(D_800DC5EC, PLAYER_ONE); func_80021B0C(); - func_802A2F34(D_800DC5EC); + render_item_boxes(D_800DC5EC); render_player_snow_effect(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_ONE); func_80058BF4(); if (D_800DC5B8 != 0) { @@ -1039,7 +1039,7 @@ void render_player_two_2p_screen_horizontal(void) { render_players_on_screen_two(); func_8029122C(D_800DC5F0, PLAYER_TWO); func_80021C78(); - func_802A2F34(D_800DC5F0); + render_item_boxes(D_800DC5F0); render_player_snow_effect(RENDER_SCREEN_MODE_2P_VERTICAL_PLAYER_TWO); func_80058BF4(); if (D_800DC5B8 != 0) { @@ -1093,7 +1093,7 @@ void render_player_one_3p_4p_screen(void) { render_players_on_screen_one(); func_8029122C(D_800DC5EC, PLAYER_ONE); func_80021B0C(); - func_802A2F34(D_800DC5EC); + render_item_boxes(D_800DC5EC); render_player_snow_effect(RENDER_SCREEN_MODE_3P_4P_PLAYER_ONE); func_80058BF4(); if (D_800DC5B8 != 0) { @@ -1147,7 +1147,7 @@ void render_player_two_3p_4p_screen(void) { render_players_on_screen_two(); func_8029122C(D_800DC5F0, PLAYER_TWO); func_80021C78(); - func_802A2F34(D_800DC5F0); + render_item_boxes(D_800DC5F0); render_player_snow_effect(RENDER_SCREEN_MODE_3P_4P_PLAYER_TWO); func_80058BF4(); if (D_800DC5B8 != 0) { @@ -1202,7 +1202,7 @@ void render_player_three_3p_4p_screen(void) { render_players_on_screen_three(); func_8029122C(D_800DC5F4, PLAYER_THREE); func_80021D40(); - func_802A2F34(D_800DC5F4); + render_item_boxes(D_800DC5F4); render_player_snow_effect(RENDER_SCREEN_MODE_3P_4P_PLAYER_THREE); func_80058BF4(); if (D_800DC5B8 != 0) { @@ -1265,7 +1265,7 @@ void render_player_four_3p_4p_screen(void) { render_players_on_screen_four(); func_8029122C(D_800DC5F8, PLAYER_FOUR); func_80021DA8(); - func_802A2F34(D_800DC5F8); + render_item_boxes(D_800DC5F8); render_player_snow_effect(RENDER_SCREEN_MODE_3P_4P_PLAYER_FOUR); func_80058BF4(); if (D_800DC5B8 != 0) { diff --git a/src/render_player.c b/src/render_player.c index 35f838286..59e1cf0b6 100644 --- a/src/render_player.c +++ b/src/render_player.c @@ -896,8 +896,8 @@ void func_80022A98(Player* player, s8 arg1) { if ((player->type & PLAYER_EXISTS) == PLAYER_EXISTS) { func_80026A48(player, arg1); func_800235AC(player, arg1); - if (((player->effects & 0x04000000) == 0x04000000) || ((player->effects & 0x08000000) == 0x08000000)) { - if ((player->effects & 0x04000000) == 0x04000000) { + if (((player->effects & HIT_EFFECT) == HIT_EFFECT) || ((player->effects & 0x08000000) == 0x08000000)) { + if ((player->effects & HIT_EFFECT) == HIT_EFFECT) { func_80022B50(player, arg1); } if ((player->effects & 0x08000000) == 0x08000000) { @@ -1207,7 +1207,7 @@ void func_800235AC(Player *player, s8 arg1) { } void func_80023BF0(Player *player, s8 arg1, s8 arg2, s8 arg3) { - if (((player->effects & 0x4000000) == 0x4000000) || ((player->effects & 0x8000000) == 0x8000000)) { + if (((player->effects & HIT_EFFECT) == HIT_EFFECT) || ((player->effects & 0x8000000) == 0x8000000)) { func_80022CA8(player, arg1, arg2, arg3); } else { func_80022E84(player, arg1, arg2, arg3); @@ -1374,7 +1374,7 @@ void kart_render(Player *player, s8 playerId, s8 arg2, s8 arg3) { } sp14C[1] = player->unk_048[arg2]; sp14C[2] = player->unk_050[arg2]; - if (((s32)player->effects & 0x04000000) == 0x04000000) { + if (((s32)player->effects & HIT_EFFECT) == HIT_EFFECT) { func_80062B18(&sp148, &sp144, &sp140, 0.0f, 8.0f, 0.0f, -player->unk_048[arg2], player->unk_050[arg2]); sp154[1] = (player->pos[1] - player->boundingBoxSize) + player->unk_108; sp154[0] = player->pos[0] + sp148; diff --git a/src/update_objects.c b/src/update_objects.c index a5c0d5bb0..d11747c04 100644 --- a/src/update_objects.c +++ b/src/update_objects.c @@ -7442,7 +7442,7 @@ void init_hot_air_balloon(s32 objectIndex) { func_800886F4(objectIndex); func_80086EF0(objectIndex); gObjectList[objectIndex].velocity[1] = -2.0f; - func_802A14BC(0.0f, 0.0f, 0.0f); + init_actor_hot_air_balloon_item_box(0.0f, 0.0f, 0.0f); func_80072488(objectIndex); } diff --git a/tools/doxygen_syms.md b/tools/doxygen_syms.md index 1fd98846c..5a6921d79 100644 --- a/tools/doxygen_syms.md +++ b/tools/doxygen_syms.md @@ -142,11 +142,11 @@ Variable Name | Memory Address [func_8000DBAC](@ref func_8000DBAC) | 0x8000DBAC [set_bomb_kart_spawn_positions](@ref set_bomb_kart_spawn_positions) | 0x8000DD78 [func_8000DF8C](@ref func_8000DF8C) | 0x8000DF8C -[func_8000ED14](@ref func_8000ED14) | 0x8000ED14 -[func_8000ED80](@ref func_8000ED80) | 0x8000ED80 -[func_8000EDC8](@ref func_8000EDC8) | 0x8000EDC8 -[func_8000EE10](@ref func_8000EE10) | 0x8000EE10 -[func_8000EE58](@ref func_8000EE58) | 0x8000EE58 +[add_actor_in_unexpired_actor_list](@ref add_actor_in_unexpired_actor_list) | 0x8000ED14 +[add_red_shell_in_unexpired_actor_list](@ref add_red_shell_in_unexpired_actor_list) | 0x8000ED80 +[add_green_shell_in_unexpired_actor_list](@ref add_green_shell_in_unexpired_actor_list) | 0x8000EDC8 +[add_blue_shell_in_unexpired_actor_list](@ref add_blue_shell_in_unexpired_actor_list) | 0x8000EE10 +[delete_actor_in_unexpired_actor_list](@ref delete_actor_in_unexpired_actor_list) | 0x8000EE58 [func_8000EEDC](@ref func_8000EEDC) | 0x8000EEDC [generate_player_smoke](@ref generate_player_smoke) | 0x8000EF20 [func_8000F0E0](@ref func_8000F0E0) | 0x8000F0E0 @@ -1795,8 +1795,8 @@ Variable Name | Memory Address [func_8008D8B4](@ref func_8008D8B4) | 0x8008D8B4 [func_8008D97C](@ref func_8008D97C) | 0x8008D97C [func_8008D9C0](@ref func_8008D9C0) | 0x8008D9C0 -[func_8008DABC](@ref func_8008DABC) | 0x8008DABC -[func_8008DC08](@ref func_8008DC08) | 0x8008DC08 +[apply_hit_sound_effect](@ref apply_hit_sound_effect) | 0x8008DABC +[apply_hit_effect](@ref apply_hit_effect) | 0x8008DC08 [apply_hit_rotating_sound_effect](@ref apply_hit_rotating_sound_effect) | 0x8008DF98 [apply_lightning_effect](@ref apply_lightning_effect) | 0x8008E118 [remove_lightning_effect](@ref remove_lightning_effect) | 0x8008E3C0 @@ -1837,7 +1837,7 @@ Variable Name | Memory Address [func_80090778](@ref func_80090778) | 0x80090778 [func_80090868](@ref func_80090868) | 0x80090868 [func_80090970](@ref func_80090970) | 0x80090970 -[func_800910E4](@ref func_800910E4) | 0x800910E4 +[prevent_item_use](@ref prevent_item_use) | 0x800910E4 [func_800911B4](@ref func_800911B4) | 0x800911B4 [func_80091298](@ref func_80091298) | 0x80091298 [func_80091440](@ref func_80091440) | 0x80091440 @@ -2583,10 +2583,10 @@ Variable Name | Memory Address [rspF3DBootStart](@ref rspF3DBootStart) | 0x800D8F70 [rspF3DBootEnd](@ref rspF3DBootEnd) | 0x800D9040 [gspF3DEXTextStart](@ref gspF3DEXTextStart) | 0x800D9040 -[gspF3DEXTextEnd](@ref gspF3DEXTextEnd) | 0x800DA420 [gspF3DLXTextStart](@ref gspF3DLXTextStart) | 0x800DA420 -[gspF3DLXTextEnd](@ref gspF3DLXTextEnd) | 0x800DB830 +[gspF3DEXTextEnd](@ref gspF3DEXTextEnd) | 0x800DA420 [rspAspMainStart](@ref rspAspMainStart) | 0x800DB830 +[gspF3DLXTextEnd](@ref gspF3DLXTextEnd) | 0x800DB830 [rspAspMainEnd](@ref rspAspMainEnd) | 0x800DC4A0 [gVblankHandler1](@ref gVblankHandler1) | 0x800DC4A0 [gVblankHandler2](@ref gVblankHandler2) | 0x800DC4A4 @@ -3694,8 +3694,8 @@ Variable Name | Memory Address [gspF3DEXDataStart](@ref gspF3DEXDataStart) | 0x800F3D00 [gspF3DEXDataEnd](@ref gspF3DEXDataEnd) | 0x800F4500 [gspF3DLXDataStart](@ref gspF3DLXDataStart) | 0x800F4500 -[rspAspMainDataStart](@ref rspAspMainDataStart) | 0x800F4D00 [gspF3DLXDataEnd](@ref gspF3DLXDataEnd) | 0x800F4D00 +[rspAspMainDataStart](@ref rspAspMainDataStart) | 0x800F4D00 [rspAspMainDataEnd](@ref rspAspMainDataEnd) | 0x800F5000 [sSawtoothWaves](@ref sSawtoothWaves) | 0x800F5000 [sTriangleWaves](@ref sTriangleWaves) | 0x800F5200 @@ -3809,12 +3809,12 @@ Variable Name | Memory Address [D_8015F5A4](@ref D_8015F5A4) | 0x8015F5A4 [code_800029B0_bss_pad](@ref code_800029B0_bss_pad) | 0x8015F5A8 [vtxBuffer](@ref vtxBuffer) | 0x8015F668 -[D_8015F6E8](@ref D_8015F6E8) | 0x8015F6E8 -[D_8015F6EA](@ref D_8015F6EA) | 0x8015F6EA -[D_8015F6EC](@ref D_8015F6EC) | 0x8015F6EC -[D_8015F6EE](@ref D_8015F6EE) | 0x8015F6EE -[D_8015F6F0](@ref D_8015F6F0) | 0x8015F6F0 -[D_8015F6F2](@ref D_8015F6F2) | 0x8015F6F2 +[gCourseMaxX](@ref gCourseMaxX) | 0x8015F6E8 +[gCourseMinX](@ref gCourseMinX) | 0x8015F6EA +[gCourseMaxY](@ref gCourseMaxY) | 0x8015F6EC +[gCourseMinY](@ref gCourseMinY) | 0x8015F6EE +[gCourseMaxZ](@ref gCourseMaxZ) | 0x8015F6F0 +[gCourseMinZ](@ref gCourseMinZ) | 0x8015F6F2 [D_8015F6F4](@ref D_8015F6F4) | 0x8015F6F4 [D_8015F6F6](@ref D_8015F6F6) | 0x8015F6F6 [D_8015F6F8](@ref D_8015F6F8) | 0x8015F6F8 @@ -4833,8 +4833,8 @@ Variable Name | Memory Address [func_802969F8](@ref func_802969F8) | 0x802969F8 [cleanup_red_and_green_shells](@ref cleanup_red_and_green_shells) | 0x80296A50 [actor_init](@ref actor_init) | 0x80296D10 -[func_80297230](@ref func_80297230) | 0x80297230 -[func_802972B8](@ref func_802972B8) | 0x802972B8 +[actor_not_rendered](@ref actor_not_rendered) | 0x80297230 +[actor_rendered](@ref actor_rendered) | 0x802972B8 [func_80297340](@ref func_80297340) | 0x80297340 [func_80297524](@ref func_80297524) | 0x80297524 [func_802976D8](@ref func_802976D8) | 0x802976D8 @@ -4847,20 +4847,20 @@ Variable Name | Memory Address [func_8029794C](@ref func_8029794C) | 0x8029794C [func_802979F8](@ref func_802979F8) | 0x802979F8 [render_actor_cow](@ref render_actor_cow) | 0x80297A50 -[update_actor_yoshi_valley_egg](@ref update_actor_yoshi_valley_egg) | 0x80297BFC -[update_actor_trees_cacti_shrubs](@ref update_actor_trees_cacti_shrubs) | 0x80297D04 +[update_actor_yoshi_egg](@ref update_actor_yoshi_egg) | 0x80297BFC +[update_actor_static_plant](@ref update_actor_static_plant) | 0x80297D04 [update_actor_kiwano_fruit](@ref update_actor_kiwano_fruit) | 0x80297D5C [update_actor_paddle_boat](@ref update_actor_paddle_boat) | 0x8029816C [update_actor_train_engine](@ref update_actor_train_engine) | 0x8029817C -[update_actor_train_car1](@ref update_actor_train_car1) | 0x802981CC -[update_actor_train_car2](@ref update_actor_train_car2) | 0x802981DC +[update_actor_train_tender](@ref update_actor_train_tender) | 0x802981CC +[update_actor_train_passenger_car](@ref update_actor_train_passenger_car) | 0x802981DC [update_actor_piranha_plant](@ref update_actor_piranha_plant) | 0x802981EC [render_actor_piranha_plant](@ref render_actor_piranha_plant) | 0x80298328 -[func_802986B4](@ref func_802986B4) | 0x802986B4 -[func_80298AC0](@ref func_80298AC0) | 0x80298AC0 -[func_80298C94](@ref func_80298C94) | 0x80298C94 +[render_cows](@ref render_cows) | 0x802986B4 +[evaluate_collision_player_palm_trees](@ref evaluate_collision_player_palm_trees) | 0x80298AC0 +[evaluate_collision_players_palm_trees](@ref evaluate_collision_players_palm_trees) | 0x80298C94 [func_80298D10](@ref func_80298D10) | 0x80298D10 -[func_80298D7C](@ref func_80298D7C) | 0x80298D7C +[render_palm_trees](@ref render_palm_trees) | 0x80298D7C [render_actor_tree_mario_raceway](@ref render_actor_tree_mario_raceway) | 0x80299144 [render_actor_tree_yoshi_valley](@ref render_actor_tree_yoshi_valley) | 0x8029930C [render_actor_tree_royal_raceway](@ref render_actor_tree_royal_raceway) | 0x802994D4 @@ -4872,70 +4872,70 @@ Variable Name | Memory Address [render_actor_tree_cactus1_kalimari_desert](@ref render_actor_tree_cactus1_kalimari_desert) | 0x80299EDC [render_actor_tree_cactus2_kalimari_desert](@ref render_actor_tree_cactus2_kalimari_desert) | 0x80299FFC [render_actor_tree_cactus3_kalimari_desert](@ref render_actor_tree_cactus3_kalimari_desert) | 0x8029A11C -[render_actor_kiwano_fruit_dks_jungle_parkway](@ref render_actor_kiwano_fruit_dks_jungle_parkway) | 0x8029A23C +[render_actor_kiwano_fruit](@ref render_actor_kiwano_fruit) | 0x8029A23C [render_actor_shell](@ref render_actor_shell) | 0x8029A3AC [render_actor_green_shell](@ref render_actor_green_shell) | 0x8029A690 [render_actor_red_shell](@ref render_actor_red_shell) | 0x8029A75C [render_actor_blue_shell](@ref render_actor_blue_shell) | 0x8029A828 [render_actor_banana](@ref render_actor_banana) | 0x8029A8F4 -[update_actor_wario_stadium_sign](@ref update_actor_wario_stadium_sign) | 0x8029AAC8 +[update_actor_wario_sign](@ref update_actor_wario_sign) | 0x8029AAC8 [update_actor_railroad_crossing](@ref update_actor_railroad_crossing) | 0x8029AAD8 -[update_actor_mario_raceway_sign](@ref update_actor_mario_raceway_sign) | 0x8029AB60 +[update_actor_mario_sign](@ref update_actor_mario_sign) | 0x8029AB60 [func_8029ABD4](@ref func_8029ABD4) | 0x8029ABD4 [func_8029AC18](@ref func_8029AC18) | 0x8029AC18 [func_8029AE14](@ref func_8029AE14) | 0x8029AE14 [render_actor_paddle_boat](@ref render_actor_paddle_boat) | 0x8029AE1C -[func_8029B06C](@ref func_8029B06C) | 0x8029B06C -[func_8029B2E4](@ref func_8029B2E4) | 0x8029B2E4 -[func_8029B4E0](@ref func_8029B4E0) | 0x8029B4E0 -[func_8029B6EC](@ref func_8029B6EC) | 0x8029B6EC +[render_actor_box_truck](@ref render_actor_box_truck) | 0x8029B06C +[render_actor_school_bus](@ref render_actor_school_bus) | 0x8029B2E4 +[render_actor_car](@ref render_actor_car) | 0x8029B4E0 +[render_actor_tanker_truck](@ref render_actor_tanker_truck) | 0x8029B6EC [render_actor_train_engine](@ref render_actor_train_engine) | 0x8029B8E8 [render_actor_train_tender](@ref render_actor_train_tender) | 0x8029BFB0 -[render_actor_passenger_car](@ref render_actor_passenger_car) | 0x8029C3CC +[render_actor_train_passenger_car](@ref render_actor_train_passenger_car) | 0x8029C3CC [render_actor_falling_rock](@ref render_actor_falling_rock) | 0x8029CA90 -[place_piranha_plants](@ref place_piranha_plants) | 0x8029CC14 -[place_palm_trees](@ref place_palm_trees) | 0x8029CD80 +[spawn_piranha_plants](@ref spawn_piranha_plants) | 0x8029CC14 +[spawn_palm_trees](@ref spawn_palm_trees) | 0x8029CD80 [func_8029CF0C](@ref func_8029CF0C) | 0x8029CF0C -[place_falling_rocks](@ref place_falling_rocks) | 0x8029D018 +[spawn_falling_rocks](@ref spawn_falling_rocks) | 0x8029D018 [update_actor_falling_rocks](@ref update_actor_falling_rocks) | 0x8029D188 [spawn_foliage](@ref spawn_foliage) | 0x8029D584 -[place_all_item_boxes](@ref place_all_item_boxes) | 0x8029D830 +[spawn_all_item_boxes](@ref spawn_all_item_boxes) | 0x8029D830 [init_kiwano_fruit](@ref init_kiwano_fruit) | 0x8029D9F8 [destroy_all_actors](@ref destroy_all_actors) | 0x8029DAB8 -[place_course_actors](@ref place_course_actors) | 0x8029DB44 -[func_8029E158](@ref func_8029E158) | 0x8029E158 -[func_8029E7DC](@ref func_8029E7DC) | 0x8029E7DC +[spawn_course_actors](@ref spawn_course_actors) | 0x8029DB44 +[init_actors_and_load_textures](@ref init_actors_and_load_textures) | 0x8029E158 +[play_sound_before_despawn](@ref play_sound_before_despawn) | 0x8029E7DC [destroy_actor](@ref destroy_actor) | 0x8029E854 -[func_8029E890](@ref func_8029E890) | 0x8029E890 -[addActorToEmptySlot](@ref addActorToEmptySlot) | 0x8029EC88 -[func_8029ED38](@ref func_8029ED38) | 0x8029ED38 -[func_8029ED98](@ref func_8029ED98) | 0x8029ED98 -[func_8029EEB8](@ref func_8029EEB8) | 0x8029EEB8 -[func_8029F1F8](@ref func_8029F1F8) | 0x8029F1F8 -[func_8029F2FC](@ref func_8029F2FC) | 0x8029F2FC -[func_8029F408](@ref func_8029F408) | 0x8029F408 -[func_8029F69C](@ref func_8029F69C) | 0x8029F69C -[func_8029FB80](@ref func_8029FB80) | 0x8029FB80 -[func_8029FCA4](@ref func_8029FCA4) | 0x8029FCA4 -[func_8029FDC8](@ref func_8029FDC8) | 0x8029FDC8 -[func_802A00E8](@ref func_802A00E8) | 0x802A00E8 -[func_802A0350](@ref func_802A0350) | 0x802A0350 -[func_802A0450](@ref func_802A0450) | 0x802A0450 -[evaluate_player_collision](@ref evaluate_player_collision) | 0x802A0D54 -[func_802A0E44](@ref func_802A0E44) | 0x802A0E44 +[try_remove_destructable_item](@ref try_remove_destructable_item) | 0x8029E890 +[add_actor_to_empty_slot](@ref add_actor_to_empty_slot) | 0x8029EC88 +[spawn_actor_at_pos](@ref spawn_actor_at_pos) | 0x8029ED38 +[prototype_actor_spawn_data](@ref prototype_actor_spawn_data) | 0x8029ED98 +[query_and_resolve_collision_player_actor](@ref query_and_resolve_collision_player_actor) | 0x8029EEB8 +[collision_mario_sign](@ref collision_mario_sign) | 0x8029F1F8 +[collision_piranha_plant](@ref collision_piranha_plant) | 0x8029F2FC +[collision_yoshi_egg](@ref collision_yoshi_egg) | 0x8029F408 +[collision_tree](@ref collision_tree) | 0x8029F69C +[query_collision_player_vs_actor_item](@ref query_collision_player_vs_actor_item) | 0x8029FB80 +[query_collision_actor_vs_actor](@ref query_collision_actor_vs_actor) | 0x8029FCA4 +[destroy_destructable_actor](@ref destroy_destructable_actor) | 0x8029FDC8 +[play_sound_on_destructible_actor_collision](@ref play_sound_on_destructible_actor_collision) | 0x802A00E8 +[evaluate_actor_collision_between_two_destructible_actors](@ref evaluate_actor_collision_between_two_destructible_actors) | 0x802A0350 +[evaluate_collision_between_player_actor](@ref evaluate_collision_between_player_actor) | 0x802A0450 +[evaluate_collision_for_players_and_actors](@ref evaluate_collision_for_players_and_actors) | 0x802A0D54 +[evaluate_collision_for_destructible_actors](@ref evaluate_collision_for_destructible_actors) | 0x802A0E44 [func_802A1064](@ref func_802A1064) | 0x802A1064 [update_actor_fake_item_box](@ref update_actor_fake_item_box) | 0x802A10F0 -[func_802A14BC](@ref func_802A14BC) | 0x802A14BC +[init_actor_hot_air_balloon_item_box](@ref init_actor_hot_air_balloon_item_box) | 0x802A14BC [update_actor_item_box_hot_air_balloon](@ref update_actor_item_box_hot_air_balloon) | 0x802A156C [update_actor_item_box](@ref update_actor_item_box) | 0x802A1600 -[func_802A171C](@ref func_802A171C) | 0x802A171C -[func_802A1EA0](@ref func_802A1EA0) | 0x802A1EA0 +[render_actor_fake_item_box](@ref render_actor_fake_item_box) | 0x802A171C +[render_actor_item_box](@ref render_actor_item_box) | 0x802A1EA0 [render_actor_wario_sign](@ref render_actor_wario_sign) | 0x802A269C -[func_802A27A0](@ref func_802A27A0) | 0x802A27A0 +[render_actor_yoshi_egg](@ref render_actor_yoshi_egg) | 0x802A27A0 [render_actor_mario_sign](@ref render_actor_mario_sign) | 0x802A29BC -[func_802A2AD0](@ref func_802A2AD0) | 0x802A2AD0 -[func_802A2C78](@ref func_802A2C78) | 0x802A2C78 -[func_802A2F34](@ref func_802A2F34) | 0x802A2F34 +[render_actor_railroad_crossing](@ref render_actor_railroad_crossing) | 0x802A2AD0 +[render_actor_palm_tree](@ref render_actor_palm_tree) | 0x802A2C78 +[render_item_boxes](@ref render_item_boxes) | 0x802A2F34 [render_course_actors](@ref render_course_actors) | 0x802A3008 [update_course_actors](@ref update_course_actors) | 0x802A3548 [func_802A3730](@ref func_802A3730) | 0x802A3730 @@ -5084,11 +5084,11 @@ Variable Name | Memory Address [subtract_scaled_vector](@ref subtract_scaled_vector) | 0x802AF9F0 [process_collision](@ref process_collision) | 0x802AFA34 [copy_collision](@ref copy_collision) | 0x802B0210 -[func_802B02B4](@ref func_802B02B4) | 0x802B02B4 +[triple_shell_actor_collide_with_player](@ref triple_shell_actor_collide_with_player) | 0x802B02B4 [func_802B039C](@ref func_802B039C) | 0x802B039C [func_802B0464](@ref func_802B0464) | 0x802B0464 [func_802B04E8](@ref func_802B04E8) | 0x802B04E8 -[func_802B0570](@ref func_802B0570) | 0x802B0570 +[destroy_banana_in_banana_bunch](@ref destroy_banana_in_banana_bunch) | 0x802B0570 [func_802B0648](@ref func_802B0648) | 0x802B0648 [func_802B0788](@ref func_802B0788) | 0x802B0788 [func_802B09C0](@ref func_802B09C0) | 0x802B09C0 @@ -5107,7 +5107,7 @@ Variable Name | Memory Address [use_banana_item](@ref use_banana_item) | 0x802B2D70 [use_thunder_item](@ref use_thunder_item) | 0x802B2EBC [player_use_item](@ref player_use_item) | 0x802B2FA0 -[func_802B30EC](@ref func_802B30EC) | 0x802B30EC +[check_player_use_item](@ref check_player_use_item) | 0x802B30EC [update_actor_green_shell](@ref update_actor_green_shell) | 0x802B32C4 [func_802B3B44](@ref func_802B3B44) | 0x802B3B44 [func_802B3E7C](@ref func_802B3E7C) | 0x802B3E7C @@ -18681,66 +18681,66 @@ Variable Name | Memory Address [gCosineTable](@ref gCosineTable) | 0x802BB370 [gArctanTable](@ref gArctanTable) | 0x802BF370 [gTextureMarioFace00](@ref gTextureMarioFace00) | 0x0A000000 -[gTextureMarioFace00_end](@ref gTextureMarioFace00_end) | 0x0A000CD4 [gTextureMarioFace01](@ref gTextureMarioFace01) | 0x0A000CD4 -[gTextureMarioFace01_end](@ref gTextureMarioFace01_end) | 0x0A001994 +[gTextureMarioFace00_end](@ref gTextureMarioFace00_end) | 0x0A000CD4 [gTextureMarioFace02](@ref gTextureMarioFace02) | 0x0A001994 -[gTextureMarioFace02_end](@ref gTextureMarioFace02_end) | 0x0A002650 +[gTextureMarioFace01_end](@ref gTextureMarioFace01_end) | 0x0A001994 [gTextureMarioFace03](@ref gTextureMarioFace03) | 0x0A002650 -[gTextureMarioFace04](@ref gTextureMarioFace04) | 0x0A0032BC +[gTextureMarioFace02_end](@ref gTextureMarioFace02_end) | 0x0A002650 [gTextureMarioFace03_end](@ref gTextureMarioFace03_end) | 0x0A0032BC -[gTextureMarioFace04_end](@ref gTextureMarioFace04_end) | 0x0A003F08 +[gTextureMarioFace04](@ref gTextureMarioFace04) | 0x0A0032BC [gTextureMarioFace05](@ref gTextureMarioFace05) | 0x0A003F08 -[gTextureMarioFace05_end](@ref gTextureMarioFace05_end) | 0x0A004B48 +[gTextureMarioFace04_end](@ref gTextureMarioFace04_end) | 0x0A003F08 [gTextureMarioFace06](@ref gTextureMarioFace06) | 0x0A004B48 +[gTextureMarioFace05_end](@ref gTextureMarioFace05_end) | 0x0A004B48 [gTextureMarioFace07](@ref gTextureMarioFace07) | 0x0A00585C [gTextureMarioFace06_end](@ref gTextureMarioFace06_end) | 0x0A00585C [gTextureMarioFace08](@ref gTextureMarioFace08) | 0x0A006568 [gTextureMarioFace07_end](@ref gTextureMarioFace07_end) | 0x0A006568 -[gTextureMarioFace09](@ref gTextureMarioFace09) | 0x0A00726C [gTextureMarioFace08_end](@ref gTextureMarioFace08_end) | 0x0A00726C -[gTextureMarioFace10](@ref gTextureMarioFace10) | 0x0A007F4C +[gTextureMarioFace09](@ref gTextureMarioFace09) | 0x0A00726C [gTextureMarioFace09_end](@ref gTextureMarioFace09_end) | 0x0A007F4C +[gTextureMarioFace10](@ref gTextureMarioFace10) | 0x0A007F4C [gTextureMarioFace11](@ref gTextureMarioFace11) | 0x0A008C48 [gTextureMarioFace10_end](@ref gTextureMarioFace10_end) | 0x0A008C48 -[gTextureMarioFace12](@ref gTextureMarioFace12) | 0x0A009944 [gTextureMarioFace11_end](@ref gTextureMarioFace11_end) | 0x0A009944 +[gTextureMarioFace12](@ref gTextureMarioFace12) | 0x0A009944 [gTextureMarioFace13](@ref gTextureMarioFace13) | 0x0A00A688 [gTextureMarioFace12_end](@ref gTextureMarioFace12_end) | 0x0A00A688 -[gTextureMarioFace13_end](@ref gTextureMarioFace13_end) | 0x0A00B3DC [gTextureMarioFace14](@ref gTextureMarioFace14) | 0x0A00B3DC -[gTextureMarioFace14_end](@ref gTextureMarioFace14_end) | 0x0A00C180 +[gTextureMarioFace13_end](@ref gTextureMarioFace13_end) | 0x0A00B3DC [gTextureMarioFace15](@ref gTextureMarioFace15) | 0x0A00C180 -[gTextureMarioFace15_end](@ref gTextureMarioFace15_end) | 0x0A00CF20 +[gTextureMarioFace14_end](@ref gTextureMarioFace14_end) | 0x0A00C180 [gTextureMarioFace16](@ref gTextureMarioFace16) | 0x0A00CF20 +[gTextureMarioFace15_end](@ref gTextureMarioFace15_end) | 0x0A00CF20 [gTextureLuigiFace00](@ref gTextureLuigiFace00) | 0x0A00DA64 [gTextureMarioFace16_end](@ref gTextureMarioFace16_end) | 0x0A00DA64 -[gTextureLuigiFace01](@ref gTextureLuigiFace01) | 0x0A00E680 [gTextureLuigiFace00_end](@ref gTextureLuigiFace00_end) | 0x0A00E680 +[gTextureLuigiFace01](@ref gTextureLuigiFace01) | 0x0A00E680 [gTextureLuigiFace01_end](@ref gTextureLuigiFace01_end) | 0x0A00F2A0 [gTextureLuigiFace02](@ref gTextureLuigiFace02) | 0x0A00F2A0 -[gTextureLuigiFace02_end](@ref gTextureLuigiFace02_end) | 0x0A00FEC0 [gTextureLuigiFace03](@ref gTextureLuigiFace03) | 0x0A00FEC0 +[gTextureLuigiFace02_end](@ref gTextureLuigiFace02_end) | 0x0A00FEC0 [gTextureLuigiFace03_end](@ref gTextureLuigiFace03_end) | 0x0A010AA8 [gTextureLuigiFace04](@ref gTextureLuigiFace04) | 0x0A010AA8 -[gTextureLuigiFace04_end](@ref gTextureLuigiFace04_end) | 0x0A011690 [gTextureLuigiFace05](@ref gTextureLuigiFace05) | 0x0A011690 +[gTextureLuigiFace04_end](@ref gTextureLuigiFace04_end) | 0x0A011690 [gTextureLuigiFace06](@ref gTextureLuigiFace06) | 0x0A01225C [gTextureLuigiFace05_end](@ref gTextureLuigiFace05_end) | 0x0A01225C [gTextureLuigiFace06_end](@ref gTextureLuigiFace06_end) | 0x0A012E84 [gTextureLuigiFace07](@ref gTextureLuigiFace07) | 0x0A012E84 -[gTextureLuigiFace08](@ref gTextureLuigiFace08) | 0x0A013AB8 [gTextureLuigiFace07_end](@ref gTextureLuigiFace07_end) | 0x0A013AB8 -[gTextureLuigiFace09](@ref gTextureLuigiFace09) | 0x0A014744 +[gTextureLuigiFace08](@ref gTextureLuigiFace08) | 0x0A013AB8 [gTextureLuigiFace08_end](@ref gTextureLuigiFace08_end) | 0x0A014744 -[gTextureLuigiFace10](@ref gTextureLuigiFace10) | 0x0A0153C4 +[gTextureLuigiFace09](@ref gTextureLuigiFace09) | 0x0A014744 [gTextureLuigiFace09_end](@ref gTextureLuigiFace09_end) | 0x0A0153C4 -[gTextureLuigiFace10_end](@ref gTextureLuigiFace10_end) | 0x0A016054 +[gTextureLuigiFace10](@ref gTextureLuigiFace10) | 0x0A0153C4 [gTextureLuigiFace11](@ref gTextureLuigiFace11) | 0x0A016054 +[gTextureLuigiFace10_end](@ref gTextureLuigiFace10_end) | 0x0A016054 [gTextureLuigiFace11_end](@ref gTextureLuigiFace11_end) | 0x0A016D14 [gTextureLuigiFace12](@ref gTextureLuigiFace12) | 0x0A016D14 -[gTextureLuigiFace12_end](@ref gTextureLuigiFace12_end) | 0x0A017A44 [gTextureLuigiFace13](@ref gTextureLuigiFace13) | 0x0A017A44 +[gTextureLuigiFace12_end](@ref gTextureLuigiFace12_end) | 0x0A017A44 [gTextureLuigiFace14](@ref gTextureLuigiFace14) | 0x0A018770 [gTextureLuigiFace13_end](@ref gTextureLuigiFace13_end) | 0x0A018770 [gTextureLuigiFace15](@ref gTextureLuigiFace15) | 0x0A0194B8 @@ -18749,68 +18749,68 @@ Variable Name | Memory Address [gTextureLuigiFace16](@ref gTextureLuigiFace16) | 0x0A01A20C [gTextureLuigiFace16_end](@ref gTextureLuigiFace16_end) | 0x0A01AC44 [gTexturePeachFace00](@ref gTexturePeachFace00) | 0x0A01AC44 -[gTexturePeachFace00_end](@ref gTexturePeachFace00_end) | 0x0A01BAFC [gTexturePeachFace01](@ref gTexturePeachFace01) | 0x0A01BAFC +[gTexturePeachFace00_end](@ref gTexturePeachFace00_end) | 0x0A01BAFC [gTexturePeachFace01_end](@ref gTexturePeachFace01_end) | 0x0A01C9A8 [gTexturePeachFace02](@ref gTexturePeachFace02) | 0x0A01C9A8 -[gTexturePeachFace02_end](@ref gTexturePeachFace02_end) | 0x0A01D864 [gTexturePeachFace03](@ref gTexturePeachFace03) | 0x0A01D864 +[gTexturePeachFace02_end](@ref gTexturePeachFace02_end) | 0x0A01D864 [gTexturePeachFace04](@ref gTexturePeachFace04) | 0x0A01E71C [gTexturePeachFace03_end](@ref gTexturePeachFace03_end) | 0x0A01E71C -[gTexturePeachFace05](@ref gTexturePeachFace05) | 0x0A01F5A4 [gTexturePeachFace04_end](@ref gTexturePeachFace04_end) | 0x0A01F5A4 -[gTexturePeachFace06](@ref gTexturePeachFace06) | 0x0A020444 +[gTexturePeachFace05](@ref gTexturePeachFace05) | 0x0A01F5A4 [gTexturePeachFace05_end](@ref gTexturePeachFace05_end) | 0x0A020444 -[gTexturePeachFace07](@ref gTexturePeachFace07) | 0x0A02130C +[gTexturePeachFace06](@ref gTexturePeachFace06) | 0x0A020444 [gTexturePeachFace06_end](@ref gTexturePeachFace06_end) | 0x0A02130C -[gTexturePeachFace07_end](@ref gTexturePeachFace07_end) | 0x0A0221FC +[gTexturePeachFace07](@ref gTexturePeachFace07) | 0x0A02130C [gTexturePeachFace08](@ref gTexturePeachFace08) | 0x0A0221FC +[gTexturePeachFace07_end](@ref gTexturePeachFace07_end) | 0x0A0221FC [gTexturePeachFace08_end](@ref gTexturePeachFace08_end) | 0x0A02310C [gTexturePeachFace09](@ref gTexturePeachFace09) | 0x0A02310C [gTexturePeachFace09_end](@ref gTexturePeachFace09_end) | 0x0A0240C0 [gTexturePeachFace10](@ref gTexturePeachFace10) | 0x0A0240C0 -[gTexturePeachFace10_end](@ref gTexturePeachFace10_end) | 0x0A0250A4 [gTexturePeachFace11](@ref gTexturePeachFace11) | 0x0A0250A4 +[gTexturePeachFace10_end](@ref gTexturePeachFace10_end) | 0x0A0250A4 [gTexturePeachFace11_end](@ref gTexturePeachFace11_end) | 0x0A0260F0 [gTexturePeachFace12](@ref gTexturePeachFace12) | 0x0A0260F0 [gTexturePeachFace13](@ref gTexturePeachFace13) | 0x0A027128 [gTexturePeachFace12_end](@ref gTexturePeachFace12_end) | 0x0A027128 -[gTexturePeachFace14](@ref gTexturePeachFace14) | 0x0A02810C [gTexturePeachFace13_end](@ref gTexturePeachFace13_end) | 0x0A02810C -[gTexturePeachFace15](@ref gTexturePeachFace15) | 0x0A0290A0 +[gTexturePeachFace14](@ref gTexturePeachFace14) | 0x0A02810C [gTexturePeachFace14_end](@ref gTexturePeachFace14_end) | 0x0A0290A0 -[gTexturePeachFace15_end](@ref gTexturePeachFace15_end) | 0x0A02A028 +[gTexturePeachFace15](@ref gTexturePeachFace15) | 0x0A0290A0 [gTexturePeachFace16](@ref gTexturePeachFace16) | 0x0A02A028 +[gTexturePeachFace15_end](@ref gTexturePeachFace15_end) | 0x0A02A028 [gTexturePeachFace16_end](@ref gTexturePeachFace16_end) | 0x0A02AED0 [gTextureToadFace00](@ref gTextureToadFace00) | 0x0A02AED0 -[gTextureToadFace00_end](@ref gTextureToadFace00_end) | 0x0A02B88C [gTextureToadFace01](@ref gTextureToadFace01) | 0x0A02B88C +[gTextureToadFace00_end](@ref gTextureToadFace00_end) | 0x0A02B88C [gTextureToadFace02](@ref gTextureToadFace02) | 0x0A02C240 [gTextureToadFace01_end](@ref gTextureToadFace01_end) | 0x0A02C240 [gTextureToadFace02_end](@ref gTextureToadFace02_end) | 0x0A02CBFC [gTextureToadFace03](@ref gTextureToadFace03) | 0x0A02CBFC -[gTextureToadFace03_end](@ref gTextureToadFace03_end) | 0x0A02D5B4 [gTextureToadFace04](@ref gTextureToadFace04) | 0x0A02D5B4 -[gTextureToadFace05](@ref gTextureToadFace05) | 0x0A02DF70 +[gTextureToadFace03_end](@ref gTextureToadFace03_end) | 0x0A02D5B4 [gTextureToadFace04_end](@ref gTextureToadFace04_end) | 0x0A02DF70 +[gTextureToadFace05](@ref gTextureToadFace05) | 0x0A02DF70 [gTextureToadFace06](@ref gTextureToadFace06) | 0x0A02E910 [gTextureToadFace05_end](@ref gTextureToadFace05_end) | 0x0A02E910 [gTextureToadFace06_end](@ref gTextureToadFace06_end) | 0x0A02F2A8 [gTextureToadFace07](@ref gTextureToadFace07) | 0x0A02F2A8 [gTextureToadFace07_end](@ref gTextureToadFace07_end) | 0x0A02FC74 [gTextureToadFace08](@ref gTextureToadFace08) | 0x0A02FC74 -[gTextureToadFace09](@ref gTextureToadFace09) | 0x0A030628 [gTextureToadFace08_end](@ref gTextureToadFace08_end) | 0x0A030628 -[gTextureToadFace10](@ref gTextureToadFace10) | 0x0A031010 +[gTextureToadFace09](@ref gTextureToadFace09) | 0x0A030628 [gTextureToadFace09_end](@ref gTextureToadFace09_end) | 0x0A031010 -[gTextureToadFace11](@ref gTextureToadFace11) | 0x0A031A24 +[gTextureToadFace10](@ref gTextureToadFace10) | 0x0A031010 [gTextureToadFace10_end](@ref gTextureToadFace10_end) | 0x0A031A24 +[gTextureToadFace11](@ref gTextureToadFace11) | 0x0A031A24 [gTextureToadFace12](@ref gTextureToadFace12) | 0x0A03247C [gTextureToadFace11_end](@ref gTextureToadFace11_end) | 0x0A03247C [gTextureToadFace13](@ref gTextureToadFace13) | 0x0A032EDC [gTextureToadFace12_end](@ref gTextureToadFace12_end) | 0x0A032EDC -[gTextureToadFace14](@ref gTextureToadFace14) | 0x0A03395C [gTextureToadFace13_end](@ref gTextureToadFace13_end) | 0x0A03395C +[gTextureToadFace14](@ref gTextureToadFace14) | 0x0A03395C [gTextureToadFace15](@ref gTextureToadFace15) | 0x0A0343D0 [gTextureToadFace14_end](@ref gTextureToadFace14_end) | 0x0A0343D0 [gTextureToadFace15_end](@ref gTextureToadFace15_end) | 0x0A034E30 @@ -18819,94 +18819,94 @@ Variable Name | Memory Address [gTextureToadFace16_end](@ref gTextureToadFace16_end) | 0x0A035794 [gTextureYoshiFace00_end](@ref gTextureYoshiFace00_end) | 0x0A036280 [gTextureYoshiFace01](@ref gTextureYoshiFace01) | 0x0A036280 -[gTextureYoshiFace01_end](@ref gTextureYoshiFace01_end) | 0x0A036D64 [gTextureYoshiFace02](@ref gTextureYoshiFace02) | 0x0A036D64 -[gTextureYoshiFace02_end](@ref gTextureYoshiFace02_end) | 0x0A037844 +[gTextureYoshiFace01_end](@ref gTextureYoshiFace01_end) | 0x0A036D64 [gTextureYoshiFace03](@ref gTextureYoshiFace03) | 0x0A037844 +[gTextureYoshiFace02_end](@ref gTextureYoshiFace02_end) | 0x0A037844 [gTextureYoshiFace04](@ref gTextureYoshiFace04) | 0x0A0382F8 [gTextureYoshiFace03_end](@ref gTextureYoshiFace03_end) | 0x0A0382F8 [gTextureYoshiFace04_end](@ref gTextureYoshiFace04_end) | 0x0A038D68 [gTextureYoshiFace05](@ref gTextureYoshiFace05) | 0x0A038D68 [gTextureYoshiFace05_end](@ref gTextureYoshiFace05_end) | 0x0A0397B0 [gTextureYoshiFace06](@ref gTextureYoshiFace06) | 0x0A0397B0 -[gTextureYoshiFace07](@ref gTextureYoshiFace07) | 0x0A03A2D4 [gTextureYoshiFace06_end](@ref gTextureYoshiFace06_end) | 0x0A03A2D4 -[gTextureYoshiFace08](@ref gTextureYoshiFace08) | 0x0A03AD00 +[gTextureYoshiFace07](@ref gTextureYoshiFace07) | 0x0A03A2D4 [gTextureYoshiFace07_end](@ref gTextureYoshiFace07_end) | 0x0A03AD00 -[gTextureYoshiFace08_end](@ref gTextureYoshiFace08_end) | 0x0A03B6BC +[gTextureYoshiFace08](@ref gTextureYoshiFace08) | 0x0A03AD00 [gTextureYoshiFace09](@ref gTextureYoshiFace09) | 0x0A03B6BC -[gTextureYoshiFace09_end](@ref gTextureYoshiFace09_end) | 0x0A03C068 +[gTextureYoshiFace08_end](@ref gTextureYoshiFace08_end) | 0x0A03B6BC [gTextureYoshiFace10](@ref gTextureYoshiFace10) | 0x0A03C068 -[gTextureYoshiFace10_end](@ref gTextureYoshiFace10_end) | 0x0A03CA28 +[gTextureYoshiFace09_end](@ref gTextureYoshiFace09_end) | 0x0A03C068 [gTextureYoshiFace11](@ref gTextureYoshiFace11) | 0x0A03CA28 -[gTextureYoshiFace12](@ref gTextureYoshiFace12) | 0x0A03D438 +[gTextureYoshiFace10_end](@ref gTextureYoshiFace10_end) | 0x0A03CA28 [gTextureYoshiFace11_end](@ref gTextureYoshiFace11_end) | 0x0A03D438 -[gTextureYoshiFace13](@ref gTextureYoshiFace13) | 0x0A03DE94 +[gTextureYoshiFace12](@ref gTextureYoshiFace12) | 0x0A03D438 [gTextureYoshiFace12_end](@ref gTextureYoshiFace12_end) | 0x0A03DE94 +[gTextureYoshiFace13](@ref gTextureYoshiFace13) | 0x0A03DE94 [gTextureYoshiFace14](@ref gTextureYoshiFace14) | 0x0A03E974 [gTextureYoshiFace13_end](@ref gTextureYoshiFace13_end) | 0x0A03E974 -[gTextureYoshiFace14_end](@ref gTextureYoshiFace14_end) | 0x0A03F47C [gTextureYoshiFace15](@ref gTextureYoshiFace15) | 0x0A03F47C +[gTextureYoshiFace14_end](@ref gTextureYoshiFace14_end) | 0x0A03F47C [gTextureYoshiFace15_end](@ref gTextureYoshiFace15_end) | 0x0A03FF94 [gTextureYoshiFace16](@ref gTextureYoshiFace16) | 0x0A03FF94 [gTextureYoshiFace16_end](@ref gTextureYoshiFace16_end) | 0x0A040ABC [gTextureDkFace00](@ref gTextureDkFace00) | 0x0A040ABC -[gTextureDkFace00_end](@ref gTextureDkFace00_end) | 0x0A0418A8 [gTextureDkFace01](@ref gTextureDkFace01) | 0x0A0418A8 -[gTextureDkFace02](@ref gTextureDkFace02) | 0x0A0426B0 +[gTextureDkFace00_end](@ref gTextureDkFace00_end) | 0x0A0418A8 [gTextureDkFace01_end](@ref gTextureDkFace01_end) | 0x0A0426B0 -[gTextureDkFace03](@ref gTextureDkFace03) | 0x0A043490 +[gTextureDkFace02](@ref gTextureDkFace02) | 0x0A0426B0 [gTextureDkFace02_end](@ref gTextureDkFace02_end) | 0x0A043490 -[gTextureDkFace04](@ref gTextureDkFace04) | 0x0A044240 +[gTextureDkFace03](@ref gTextureDkFace03) | 0x0A043490 [gTextureDkFace03_end](@ref gTextureDkFace03_end) | 0x0A044240 +[gTextureDkFace04](@ref gTextureDkFace04) | 0x0A044240 [gTextureDkFace05](@ref gTextureDkFace05) | 0x0A044FE8 [gTextureDkFace04_end](@ref gTextureDkFace04_end) | 0x0A044FE8 -[gTextureDkFace05_end](@ref gTextureDkFace05_end) | 0x0A045DCC [gTextureDkFace06](@ref gTextureDkFace06) | 0x0A045DCC +[gTextureDkFace05_end](@ref gTextureDkFace05_end) | 0x0A045DCC [gTextureDkFace06_end](@ref gTextureDkFace06_end) | 0x0A046BF8 [gTextureDkFace07](@ref gTextureDkFace07) | 0x0A046BF8 -[gTextureDkFace07_end](@ref gTextureDkFace07_end) | 0x0A047A8C [gTextureDkFace08](@ref gTextureDkFace08) | 0x0A047A8C -[gTextureDkFace08_end](@ref gTextureDkFace08_end) | 0x0A048968 +[gTextureDkFace07_end](@ref gTextureDkFace07_end) | 0x0A047A8C [gTextureDkFace09](@ref gTextureDkFace09) | 0x0A048968 +[gTextureDkFace08_end](@ref gTextureDkFace08_end) | 0x0A048968 [gTextureDkFace10](@ref gTextureDkFace10) | 0x0A0498B0 [gTextureDkFace09_end](@ref gTextureDkFace09_end) | 0x0A0498B0 [gTextureDkFace10_end](@ref gTextureDkFace10_end) | 0x0A04A7E8 [gTextureDkFace11](@ref gTextureDkFace11) | 0x0A04A7E8 -[gTextureDkFace11_end](@ref gTextureDkFace11_end) | 0x0A04B76C [gTextureDkFace12](@ref gTextureDkFace12) | 0x0A04B76C +[gTextureDkFace11_end](@ref gTextureDkFace11_end) | 0x0A04B76C [gTextureDkFace13](@ref gTextureDkFace13) | 0x0A04C770 [gTextureDkFace12_end](@ref gTextureDkFace12_end) | 0x0A04C770 [gTextureDkFace13_end](@ref gTextureDkFace13_end) | 0x0A04D730 [gTextureDkFace14](@ref gTextureDkFace14) | 0x0A04D730 -[gTextureDkFace14_end](@ref gTextureDkFace14_end) | 0x0A04E67C [gTextureDkFace15](@ref gTextureDkFace15) | 0x0A04E67C -[gTextureDkFace16](@ref gTextureDkFace16) | 0x0A04F57C +[gTextureDkFace14_end](@ref gTextureDkFace14_end) | 0x0A04E67C [gTextureDkFace15_end](@ref gTextureDkFace15_end) | 0x0A04F57C -[gTextureDkFace16_end](@ref gTextureDkFace16_end) | 0x0A0504D0 +[gTextureDkFace16](@ref gTextureDkFace16) | 0x0A04F57C [gTextureWarioFace00](@ref gTextureWarioFace00) | 0x0A0504D0 -[gTextureWarioFace01](@ref gTextureWarioFace01) | 0x0A051630 +[gTextureDkFace16_end](@ref gTextureDkFace16_end) | 0x0A0504D0 [gTextureWarioFace00_end](@ref gTextureWarioFace00_end) | 0x0A051630 +[gTextureWarioFace01](@ref gTextureWarioFace01) | 0x0A051630 [gTextureWarioFace01_end](@ref gTextureWarioFace01_end) | 0x0A052774 [gTextureWarioFace02](@ref gTextureWarioFace02) | 0x0A052774 [gTextureWarioFace03](@ref gTextureWarioFace03) | 0x0A0538C8 [gTextureWarioFace02_end](@ref gTextureWarioFace02_end) | 0x0A0538C8 -[gTextureWarioFace04](@ref gTextureWarioFace04) | 0x0A054A30 [gTextureWarioFace03_end](@ref gTextureWarioFace03_end) | 0x0A054A30 +[gTextureWarioFace04](@ref gTextureWarioFace04) | 0x0A054A30 [gTextureWarioFace05](@ref gTextureWarioFace05) | 0x0A055B84 [gTextureWarioFace04_end](@ref gTextureWarioFace04_end) | 0x0A055B84 [gTextureWarioFace05_end](@ref gTextureWarioFace05_end) | 0x0A056CE0 [gTextureWarioFace06](@ref gTextureWarioFace06) | 0x0A056CE0 -[gTextureWarioFace06_end](@ref gTextureWarioFace06_end) | 0x0A057E54 [gTextureWarioFace07](@ref gTextureWarioFace07) | 0x0A057E54 -[gTextureWarioFace07_end](@ref gTextureWarioFace07_end) | 0x0A05902C +[gTextureWarioFace06_end](@ref gTextureWarioFace06_end) | 0x0A057E54 [gTextureWarioFace08](@ref gTextureWarioFace08) | 0x0A05902C +[gTextureWarioFace07_end](@ref gTextureWarioFace07_end) | 0x0A05902C [gTextureWarioFace09](@ref gTextureWarioFace09) | 0x0A05A254 [gTextureWarioFace08_end](@ref gTextureWarioFace08_end) | 0x0A05A254 [gTextureWarioFace09_end](@ref gTextureWarioFace09_end) | 0x0A05B4C0 [gTextureWarioFace10](@ref gTextureWarioFace10) | 0x0A05B4C0 -[gTextureWarioFace11](@ref gTextureWarioFace11) | 0x0A05C7A0 [gTextureWarioFace10_end](@ref gTextureWarioFace10_end) | 0x0A05C7A0 +[gTextureWarioFace11](@ref gTextureWarioFace11) | 0x0A05C7A0 [gTextureWarioFace11_end](@ref gTextureWarioFace11_end) | 0x0A05DAA8 [gTextureWarioFace12](@ref gTextureWarioFace12) | 0x0A05DAA8 [gTextureWarioFace12_end](@ref gTextureWarioFace12_end) | 0x0A05ED8C @@ -18915,34 +18915,34 @@ Variable Name | Memory Address [gTextureWarioFace14](@ref gTextureWarioFace14) | 0x0A0600B0 [gTextureWarioFace14_end](@ref gTextureWarioFace14_end) | 0x0A06139C [gTextureWarioFace15](@ref gTextureWarioFace15) | 0x0A06139C -[gTextureWarioFace16](@ref gTextureWarioFace16) | 0x0A062668 [gTextureWarioFace15_end](@ref gTextureWarioFace15_end) | 0x0A062668 +[gTextureWarioFace16](@ref gTextureWarioFace16) | 0x0A062668 [gTextureWarioFace16_end](@ref gTextureWarioFace16_end) | 0x0A0637E0 [gTextureBowserFace00](@ref gTextureBowserFace00) | 0x0A0637E0 [gTextureBowserFace00_end](@ref gTextureBowserFace00_end) | 0x0A064AC8 [gTextureBowserFace01](@ref gTextureBowserFace01) | 0x0A064AC8 -[gTextureBowserFace01_end](@ref gTextureBowserFace01_end) | 0x0A065D7C [gTextureBowserFace02](@ref gTextureBowserFace02) | 0x0A065D7C -[gTextureBowserFace02_end](@ref gTextureBowserFace02_end) | 0x0A067044 +[gTextureBowserFace01_end](@ref gTextureBowserFace01_end) | 0x0A065D7C [gTextureBowserFace03](@ref gTextureBowserFace03) | 0x0A067044 +[gTextureBowserFace02_end](@ref gTextureBowserFace02_end) | 0x0A067044 [gTextureBowserFace03_end](@ref gTextureBowserFace03_end) | 0x0A068310 [gTextureBowserFace04](@ref gTextureBowserFace04) | 0x0A068310 -[gTextureBowserFace05](@ref gTextureBowserFace05) | 0x0A0695B4 [gTextureBowserFace04_end](@ref gTextureBowserFace04_end) | 0x0A0695B4 +[gTextureBowserFace05](@ref gTextureBowserFace05) | 0x0A0695B4 [gTextureBowserFace06](@ref gTextureBowserFace06) | 0x0A06A840 [gTextureBowserFace05_end](@ref gTextureBowserFace05_end) | 0x0A06A840 -[gTextureBowserFace07](@ref gTextureBowserFace07) | 0x0A06BB1C [gTextureBowserFace06_end](@ref gTextureBowserFace06_end) | 0x0A06BB1C +[gTextureBowserFace07](@ref gTextureBowserFace07) | 0x0A06BB1C [gTextureBowserFace08](@ref gTextureBowserFace08) | 0x0A06CE04 [gTextureBowserFace07_end](@ref gTextureBowserFace07_end) | 0x0A06CE04 -[gTextureBowserFace08_end](@ref gTextureBowserFace08_end) | 0x0A06E0F4 [gTextureBowserFace09](@ref gTextureBowserFace09) | 0x0A06E0F4 +[gTextureBowserFace08_end](@ref gTextureBowserFace08_end) | 0x0A06E0F4 [gTextureBowserFace09_end](@ref gTextureBowserFace09_end) | 0x0A06F410 [gTextureBowserFace10](@ref gTextureBowserFace10) | 0x0A06F410 [gTextureBowserFace10_end](@ref gTextureBowserFace10_end) | 0x0A0706DC [gTextureBowserFace11](@ref gTextureBowserFace11) | 0x0A0706DC -[gTextureBowserFace12](@ref gTextureBowserFace12) | 0x0A071A18 [gTextureBowserFace11_end](@ref gTextureBowserFace11_end) | 0x0A071A18 +[gTextureBowserFace12](@ref gTextureBowserFace12) | 0x0A071A18 [gTextureBowserFace13](@ref gTextureBowserFace13) | 0x0A072DBC [gTextureBowserFace12_end](@ref gTextureBowserFace12_end) | 0x0A072DBC [gTextureBowserFace14](@ref gTextureBowserFace14) | 0x0A074138 @@ -18977,12 +18977,12 @@ Variable Name | Memory Address [gTextureTrophySilver](@ref gTextureTrophySilver) | 0x0A0AEFEC [gTextureTrophySilver_end](@ref gTextureTrophySilver_end) | 0x0A0AF614 [gTextureTrophyBronze](@ref gTextureTrophyBronze) | 0x0A0AF614 -[gTextureTrophyBronze_end](@ref gTextureTrophyBronze_end) | 0x0A0AFC00 [gTextureCupGold](@ref gTextureCupGold) | 0x0A0AFC00 +[gTextureTrophyBronze_end](@ref gTextureTrophyBronze_end) | 0x0A0AFC00 [gTextureCupSilver](@ref gTextureCupSilver) | 0x0A0B058C [gTextureCupGold_end](@ref gTextureCupGold_end) | 0x0A0B058C -[gTextureCupSilver_end](@ref gTextureCupSilver_end) | 0x0A0B0F10 [gTextureCupBronze](@ref gTextureCupBronze) | 0x0A0B0F10 +[gTextureCupSilver_end](@ref gTextureCupSilver_end) | 0x0A0B0F10 [gTextureCupBronze_end](@ref gTextureCupBronze_end) | 0x0A0B17B4 [gTexturePushStartButton](@ref gTexturePushStartButton) | 0x0A0B17B4 [gTextureCopyright1996](@ref gTextureCopyright1996) | 0x0A0B2B94 @@ -18994,16 +18994,16 @@ Variable Name | Memory Address [gTexture7E56E4](@ref gTexture7E56E4) | 0x0A0BBCB4 [gTexture7E56E4_end](@ref gTexture7E56E4_end) | 0x0A0BCE1F [gTextureSmallFont0](@ref gTextureSmallFont0) | 0x0A0BCE20 -[gTextureSmallFont0_end](@ref gTextureSmallFont0_end) | 0x0A0BCEB0 [gTextureSmallFont1](@ref gTextureSmallFont1) | 0x0A0BCEB0 +[gTextureSmallFont0_end](@ref gTextureSmallFont0_end) | 0x0A0BCEB0 [gTextureSmallFont2](@ref gTextureSmallFont2) | 0x0A0BCF08 [gTextureSmallFont1_end](@ref gTextureSmallFont1_end) | 0x0A0BCF08 -[gTextureSmallFont3](@ref gTextureSmallFont3) | 0x0A0BCFA0 [gTextureSmallFont2_end](@ref gTextureSmallFont2_end) | 0x0A0BCFA0 +[gTextureSmallFont3](@ref gTextureSmallFont3) | 0x0A0BCFA0 [gTextureSmallFont3_end](@ref gTextureSmallFont3_end) | 0x0A0BD034 [gTextureSmallFont4](@ref gTextureSmallFont4) | 0x0A0BD034 -[gTextureSmallFont4_end](@ref gTextureSmallFont4_end) | 0x0A0BD0BC [gTextureSmallFont5](@ref gTextureSmallFont5) | 0x0A0BD0BC +[gTextureSmallFont4_end](@ref gTextureSmallFont4_end) | 0x0A0BD0BC [gTextureSmallFont6](@ref gTextureSmallFont6) | 0x0A0BD154 [gTextureSmallFont5_end](@ref gTextureSmallFont5_end) | 0x0A0BD154 [gTextureSmallFont6_end](@ref gTextureSmallFont6_end) | 0x0A0BD1F0 @@ -19012,52 +19012,52 @@ Variable Name | Memory Address [gTextureSmallFont7_end](@ref gTextureSmallFont7_end) | 0x0A0BD260 [gTextureSmallFont9](@ref gTextureSmallFont9) | 0x0A0BD2F0 [gTextureSmallFont8_end](@ref gTextureSmallFont8_end) | 0x0A0BD2F0 -[gTextureN64ControllerPakDataSelect](@ref gTextureN64ControllerPakDataSelect) | 0x0A0BD390 [gTextureSmallFont9_end](@ref gTextureSmallFont9_end) | 0x0A0BD390 -[gTextureEraseDataRecordConfirmation](@ref gTextureEraseDataRecordConfirmation) | 0x0A0BE4B8 +[gTextureN64ControllerPakDataSelect](@ref gTextureN64ControllerPakDataSelect) | 0x0A0BD390 [gTextureN64ControllerPakDataSelect_end](@ref gTextureN64ControllerPakDataSelect_end) | 0x0A0BE4B8 +[gTextureEraseDataRecordConfirmation](@ref gTextureEraseDataRecordConfirmation) | 0x0A0BE4B8 [gTextureEraseDataRecordConfirmation_end](@ref gTextureEraseDataRecordConfirmation_end) | 0x0A0BF4AC [gTextureRecordNotErased](@ref gTextureRecordNotErased) | 0x0A0BF4AC -[gTexturePlaceN64ControllerPakIntoController1](@ref gTexturePlaceN64ControllerPakIntoController1) | 0x0A0BFD7C [gTextureRecordNotErased_end](@ref gTextureRecordNotErased_end) | 0x0A0BFD7C -[gTexturePleaseReinsertOriginalN64ControllerPak](@ref gTexturePleaseReinsertOriginalN64ControllerPak) | 0x0A0C09C8 +[gTexturePlaceN64ControllerPakIntoController1](@ref gTexturePlaceN64ControllerPakIntoController1) | 0x0A0BFD7C [gTexturePlaceN64ControllerPakIntoController1_end](@ref gTexturePlaceN64ControllerPakIntoController1_end) | 0x0A0C09C8 -[gTexturePleaseReinsertOriginalN64ControllerPak_end](@ref gTexturePleaseReinsertOriginalN64ControllerPak_end) | 0x0A0C16A0 +[gTexturePleaseReinsertOriginalN64ControllerPak](@ref gTexturePleaseReinsertOriginalN64ControllerPak) | 0x0A0C09C8 [gTextureErasingSelectedRecord](@ref gTextureErasingSelectedRecord) | 0x0A0C16A0 +[gTexturePleaseReinsertOriginalN64ControllerPak_end](@ref gTexturePleaseReinsertOriginalN64ControllerPak_end) | 0x0A0C16A0 [gTextureSelectRecord](@ref gTextureSelectRecord) | 0x0A0C22A4 [gTextureErasingSelectedRecord_end](@ref gTextureErasingSelectedRecord_end) | 0x0A0C22A4 [gTextureTextEnd](@ref gTextureTextEnd) | 0x0A0C261C [gTextureSelectRecord_end](@ref gTextureSelectRecord_end) | 0x0A0C261C -[gTextureTextEnd_end](@ref gTextureTextEnd_end) | 0x0A0C274C [gTextureTableOfContents](@ref gTextureTableOfContents) | 0x0A0C274C -[gTextureTableOfContents_end](@ref gTextureTableOfContents_end) | 0x0A0C2B78 +[gTextureTextEnd_end](@ref gTextureTextEnd_end) | 0x0A0C274C [gTextureTextHash](@ref gTextureTextHash) | 0x0A0C2B78 +[gTextureTableOfContents_end](@ref gTextureTableOfContents_end) | 0x0A0C2B78 [gTextureTextHash_end](@ref gTextureTextHash_end) | 0x0A0C2BF8 [gTextureTextGameData](@ref gTextureTextGameData) | 0x0A0C2BF8 -[gTextureTextPages](@ref gTextureTextPages) | 0x0A0C2EBC [gTextureTextGameData_end](@ref gTextureTextGameData_end) | 0x0A0C2EBC -[gTextureTextPagesFree](@ref gTextureTextPagesFree) | 0x0A0C307C +[gTextureTextPages](@ref gTextureTextPages) | 0x0A0C2EBC [gTextureTextPages_end](@ref gTextureTextPages_end) | 0x0A0C307C +[gTextureTextPagesFree](@ref gTextureTextPagesFree) | 0x0A0C307C [gTextureTextPagesFree_end](@ref gTextureTextPagesFree_end) | 0x0A0C3340 [gTextureTextErase](@ref gTextureTextErase) | 0x0A0C3340 -[gTextureTextErase_end](@ref gTextureTextErase_end) | 0x0A0C34E0 [gTextureTextQuit](@ref gTextureTextQuit) | 0x0A0C34E0 +[gTextureTextErase_end](@ref gTextureTextErase_end) | 0x0A0C34E0 [gTextureTextQuit_end](@ref gTextureTextQuit_end) | 0x0A0C3628 [gTexture7ED058](@ref gTexture7ED058) | 0x0A0C3628 [gTexture7ED290](@ref gTexture7ED290) | 0x0A0C3860 [gTexture7ED058_end](@ref gTexture7ED058_end) | 0x0A0C3860 [gTexture7ED50C](@ref gTexture7ED50C) | 0x0A0C3ADC [gTexture7ED290_end](@ref gTexture7ED290_end) | 0x0A0C3ADC -[gTexture7ED6A4](@ref gTexture7ED6A4) | 0x0A0C3C74 [gTexture7ED50C_end](@ref gTexture7ED50C_end) | 0x0A0C3C74 -[gTextureTinyFont0](@ref gTextureTinyFont0) | 0x0A0C4004 +[gTexture7ED6A4](@ref gTexture7ED6A4) | 0x0A0C3C74 [gTexture7ED6A4_end](@ref gTexture7ED6A4_end) | 0x0A0C4004 +[gTextureTinyFont0](@ref gTextureTinyFont0) | 0x0A0C4004 [gTextureTinyFont0_end](@ref gTextureTinyFont0_end) | 0x0A0C4078 [gTextureTinyFont1](@ref gTextureTinyFont1) | 0x0A0C4078 [gTextureTinyFont1_end](@ref gTextureTinyFont1_end) | 0x0A0C40C0 [gTextureTinyFont2](@ref gTextureTinyFont2) | 0x0A0C40C0 -[gTextureTinyFont3](@ref gTextureTinyFont3) | 0x0A0C4134 [gTextureTinyFont2_end](@ref gTextureTinyFont2_end) | 0x0A0C4134 +[gTextureTinyFont3](@ref gTextureTinyFont3) | 0x0A0C4134 [gTextureTinyFont3_end](@ref gTextureTinyFont3_end) | 0x0A0C41A4 [gTextureTinyFont4](@ref gTextureTinyFont4) | 0x0A0C41A4 [gTextureTinyFont5](@ref gTextureTinyFont5) | 0x0A0C4200 @@ -19068,70 +19068,70 @@ Variable Name | Memory Address [gTextureTinyFont7](@ref gTextureTinyFont7) | 0x0A0C42E8 [gTextureTinyFont8](@ref gTextureTinyFont8) | 0x0A0C4348 [gTextureTinyFont7_end](@ref gTextureTinyFont7_end) | 0x0A0C4348 -[gTextureTinyFont9](@ref gTextureTinyFont9) | 0x0A0C43C0 [gTextureTinyFont8_end](@ref gTextureTinyFont8_end) | 0x0A0C43C0 -[gTextureTinyFont9_end](@ref gTextureTinyFont9_end) | 0x0A0C4434 +[gTextureTinyFont9](@ref gTextureTinyFont9) | 0x0A0C43C0 [gTextureTinyFontA](@ref gTextureTinyFontA) | 0x0A0C4434 +[gTextureTinyFont9_end](@ref gTextureTinyFont9_end) | 0x0A0C4434 [gTextureTinyFontA_end](@ref gTextureTinyFontA_end) | 0x0A0C44A0 [gTextureTinyFontB](@ref gTextureTinyFontB) | 0x0A0C44A0 [gTextureTinyFontC](@ref gTextureTinyFontC) | 0x0A0C451C [gTextureTinyFontB_end](@ref gTextureTinyFontB_end) | 0x0A0C451C [gTextureTinyFontD](@ref gTextureTinyFontD) | 0x0A0C4590 [gTextureTinyFontC_end](@ref gTextureTinyFontC_end) | 0x0A0C4590 -[gTextureTinyFontE](@ref gTextureTinyFontE) | 0x0A0C4600 [gTextureTinyFontD_end](@ref gTextureTinyFontD_end) | 0x0A0C4600 -[gTextureTinyFontF](@ref gTextureTinyFontF) | 0x0A0C4674 +[gTextureTinyFontE](@ref gTextureTinyFontE) | 0x0A0C4600 [gTextureTinyFontE_end](@ref gTextureTinyFontE_end) | 0x0A0C4674 -[gTextureTinyFontG](@ref gTextureTinyFontG) | 0x0A0C46D8 +[gTextureTinyFontF](@ref gTextureTinyFontF) | 0x0A0C4674 [gTextureTinyFontF_end](@ref gTextureTinyFontF_end) | 0x0A0C46D8 -[gTextureTinyFontH](@ref gTextureTinyFontH) | 0x0A0C474C +[gTextureTinyFontG](@ref gTextureTinyFontG) | 0x0A0C46D8 [gTextureTinyFontG_end](@ref gTextureTinyFontG_end) | 0x0A0C474C -[gTextureTinyFontH_end](@ref gTextureTinyFontH_end) | 0x0A0C47C4 +[gTextureTinyFontH](@ref gTextureTinyFontH) | 0x0A0C474C [gTextureTinyFontI](@ref gTextureTinyFontI) | 0x0A0C47C4 -[gTextureTinyFontI_end](@ref gTextureTinyFontI_end) | 0x0A0C480C +[gTextureTinyFontH_end](@ref gTextureTinyFontH_end) | 0x0A0C47C4 [gTextureTinyFontJ](@ref gTextureTinyFontJ) | 0x0A0C480C +[gTextureTinyFontI_end](@ref gTextureTinyFontI_end) | 0x0A0C480C [gTextureTinyFontK](@ref gTextureTinyFontK) | 0x0A0C4860 [gTextureTinyFontJ_end](@ref gTextureTinyFontJ_end) | 0x0A0C4860 -[gTextureTinyFontL](@ref gTextureTinyFontL) | 0x0A0C48D0 [gTextureTinyFontK_end](@ref gTextureTinyFontK_end) | 0x0A0C48D0 -[gTextureTinyFontM](@ref gTextureTinyFontM) | 0x0A0C491C +[gTextureTinyFontL](@ref gTextureTinyFontL) | 0x0A0C48D0 [gTextureTinyFontL_end](@ref gTextureTinyFontL_end) | 0x0A0C491C -[gTextureTinyFontN](@ref gTextureTinyFontN) | 0x0A0C4998 +[gTextureTinyFontM](@ref gTextureTinyFontM) | 0x0A0C491C [gTextureTinyFontM_end](@ref gTextureTinyFontM_end) | 0x0A0C4998 -[gTextureTinyFontN_end](@ref gTextureTinyFontN_end) | 0x0A0C4A14 +[gTextureTinyFontN](@ref gTextureTinyFontN) | 0x0A0C4998 [gTextureTinyFontO](@ref gTextureTinyFontO) | 0x0A0C4A14 -[gTextureTinyFontP](@ref gTextureTinyFontP) | 0x0A0C4A8C +[gTextureTinyFontN_end](@ref gTextureTinyFontN_end) | 0x0A0C4A14 [gTextureTinyFontO_end](@ref gTextureTinyFontO_end) | 0x0A0C4A8C -[gTextureTinyFontP_end](@ref gTextureTinyFontP_end) | 0x0A0C4AF8 +[gTextureTinyFontP](@ref gTextureTinyFontP) | 0x0A0C4A8C [gTextureTinyFontQ](@ref gTextureTinyFontQ) | 0x0A0C4AF8 +[gTextureTinyFontP_end](@ref gTextureTinyFontP_end) | 0x0A0C4AF8 [gTextureTinyFontQ_end](@ref gTextureTinyFontQ_end) | 0x0A0C4B70 [gTextureTinyFontR](@ref gTextureTinyFontR) | 0x0A0C4B70 [gTextureTinyFontR_end](@ref gTextureTinyFontR_end) | 0x0A0C4BE4 [gTextureTinyFontS](@ref gTextureTinyFontS) | 0x0A0C4BE4 -[gTextureTinyFontS_end](@ref gTextureTinyFontS_end) | 0x0A0C4C54 [gTextureTinyFontT](@ref gTextureTinyFontT) | 0x0A0C4C54 +[gTextureTinyFontS_end](@ref gTextureTinyFontS_end) | 0x0A0C4C54 [gTextureTinyFontU](@ref gTextureTinyFontU) | 0x0A0C4CA8 [gTextureTinyFontT_end](@ref gTextureTinyFontT_end) | 0x0A0C4CA8 -[gTextureTinyFontV](@ref gTextureTinyFontV) | 0x0A0C4D0C [gTextureTinyFontU_end](@ref gTextureTinyFontU_end) | 0x0A0C4D0C +[gTextureTinyFontV](@ref gTextureTinyFontV) | 0x0A0C4D0C [gTextureTinyFontW](@ref gTextureTinyFontW) | 0x0A0C4D6C [gTextureTinyFontV_end](@ref gTextureTinyFontV_end) | 0x0A0C4D6C -[gTextureTinyFontX](@ref gTextureTinyFontX) | 0x0A0C4DE8 [gTextureTinyFontW_end](@ref gTextureTinyFontW_end) | 0x0A0C4DE8 +[gTextureTinyFontX](@ref gTextureTinyFontX) | 0x0A0C4DE8 [gTextureTinyFontX_end](@ref gTextureTinyFontX_end) | 0x0A0C4E54 [gTextureTinyFontY](@ref gTextureTinyFontY) | 0x0A0C4E54 [gTextureTinyFontY_end](@ref gTextureTinyFontY_end) | 0x0A0C4EA4 [gTextureTinyFontZ](@ref gTextureTinyFontZ) | 0x0A0C4EA4 -[gTextureTinyFontExclamationMark](@ref gTextureTinyFontExclamationMark) | 0x0A0C4F0C [gTextureTinyFontZ_end](@ref gTextureTinyFontZ_end) | 0x0A0C4F0C +[gTextureTinyFontExclamationMark](@ref gTextureTinyFontExclamationMark) | 0x0A0C4F0C [gTextureTinyFontDoubleQuote](@ref gTextureTinyFontDoubleQuote) | 0x0A0C4F54 [gTextureTinyFontExclamationMark_end](@ref gTextureTinyFontExclamationMark_end) | 0x0A0C4F54 -[gTextureTinyFontDoubleQuote_end](@ref gTextureTinyFontDoubleQuote_end) | 0x0A0C4F8C [gTextureTinyFontHash](@ref gTextureTinyFontHash) | 0x0A0C4F8C +[gTextureTinyFontDoubleQuote_end](@ref gTextureTinyFontDoubleQuote_end) | 0x0A0C4F8C [gTextureTinyFontHash_end](@ref gTextureTinyFontHash_end) | 0x0A0C4FFC [gTextureTinyFontSingleQuote](@ref gTextureTinyFontSingleQuote) | 0x0A0C4FFC -[gTextureTinyFontAsterisk](@ref gTextureTinyFontAsterisk) | 0x0A0C502C [gTextureTinyFontSingleQuote_end](@ref gTextureTinyFontSingleQuote_end) | 0x0A0C502C +[gTextureTinyFontAsterisk](@ref gTextureTinyFontAsterisk) | 0x0A0C502C [gTextureTinyFontPlus](@ref gTextureTinyFontPlus) | 0x0A0C5098 [gTextureTinyFontAsterisk_end](@ref gTextureTinyFontAsterisk_end) | 0x0A0C5098 [gTextureTinyFontPlus_end](@ref gTextureTinyFontPlus_end) | 0x0A0C50E8 @@ -19142,60 +19142,60 @@ Variable Name | Memory Address [gTextureTinyFontMinus_end](@ref gTextureTinyFontMinus_end) | 0x0A0C514C [gTextureTinyFontForwardSlash](@ref gTextureTinyFontForwardSlash) | 0x0A0C517C [gTextureTinyFontComma_end](@ref gTextureTinyFontComma_end) | 0x0A0C517C -[gTextureTinyFontForwardSlash_end](@ref gTextureTinyFontForwardSlash_end) | 0x0A0C51CC [gTextureTinyFontColon](@ref gTextureTinyFontColon) | 0x0A0C51CC -[gTextureTinyFontColon_end](@ref gTextureTinyFontColon_end) | 0x0A0C5204 +[gTextureTinyFontForwardSlash_end](@ref gTextureTinyFontForwardSlash_end) | 0x0A0C51CC [gTexture7EEC34](@ref gTexture7EEC34) | 0x0A0C5204 -[gTextureTinyFontQuestion](@ref gTextureTinyFontQuestion) | 0x0A0C5254 +[gTextureTinyFontColon_end](@ref gTextureTinyFontColon_end) | 0x0A0C5204 [gTexture7EEC34_end](@ref gTexture7EEC34_end) | 0x0A0C5254 -[gTexture7EECE4](@ref gTexture7EECE4) | 0x0A0C52B4 +[gTextureTinyFontQuestion](@ref gTextureTinyFontQuestion) | 0x0A0C5254 [gTextureTinyFontQuestion_end](@ref gTextureTinyFontQuestion_end) | 0x0A0C52B4 +[gTexture7EECE4](@ref gTexture7EECE4) | 0x0A0C52B4 [gTexture7EECE4_end](@ref gTexture7EECE4_end) | 0x0A0C5344 [gTexture7EED74](@ref gTexture7EED74) | 0x0A0C5344 -[gTexture7EED74_end](@ref gTexture7EED74_end) | 0x0A0C5380 [gTexture7EEDB0](@ref gTexture7EEDB0) | 0x0A0C5380 -[gTexture7EEDB0_end](@ref gTexture7EEDB0_end) | 0x0A0C53B8 +[gTexture7EED74_end](@ref gTexture7EED74_end) | 0x0A0C5380 [gTexture7EEDE8](@ref gTexture7EEDE8) | 0x0A0C53B8 -[gTexture7EEE20](@ref gTexture7EEE20) | 0x0A0C53F0 +[gTexture7EEDB0_end](@ref gTexture7EEDB0_end) | 0x0A0C53B8 [gTexture7EEDE8_end](@ref gTexture7EEDE8_end) | 0x0A0C53F0 +[gTexture7EEE20](@ref gTexture7EEE20) | 0x0A0C53F0 [gTexture7EEE7C](@ref gTexture7EEE7C) | 0x0A0C544C [gTexture7EEE20_end](@ref gTexture7EEE20_end) | 0x0A0C544C -[gTexture7EEE7C_end](@ref gTexture7EEE7C_end) | 0x0A0C54A0 [gTexture7EEED0](@ref gTexture7EEED0) | 0x0A0C54A0 -[gTexture7EEED0_end](@ref gTexture7EEED0_end) | 0x0A0C550C +[gTexture7EEE7C_end](@ref gTexture7EEE7C_end) | 0x0A0C54A0 [gTexture7EEF3C](@ref gTexture7EEF3C) | 0x0A0C550C -[gTexture7EEF90](@ref gTexture7EEF90) | 0x0A0C5560 +[gTexture7EEED0_end](@ref gTexture7EEED0_end) | 0x0A0C550C [gTexture7EEF3C_end](@ref gTexture7EEF3C_end) | 0x0A0C5560 -[gTexture7EEFF4](@ref gTexture7EEFF4) | 0x0A0C55C4 +[gTexture7EEF90](@ref gTexture7EEF90) | 0x0A0C5560 [gTexture7EEF90_end](@ref gTexture7EEF90_end) | 0x0A0C55C4 -[gTexture7EEFF4_end](@ref gTexture7EEFF4_end) | 0x0A0C5628 +[gTexture7EEFF4](@ref gTexture7EEFF4) | 0x0A0C55C4 [gTexture7EF058](@ref gTexture7EF058) | 0x0A0C5628 -[gTexture7EF0B4](@ref gTexture7EF0B4) | 0x0A0C5684 +[gTexture7EEFF4_end](@ref gTexture7EEFF4_end) | 0x0A0C5628 [gTexture7EF058_end](@ref gTexture7EF058_end) | 0x0A0C5684 -[gTexture7EF110](@ref gTexture7EF110) | 0x0A0C56E0 +[gTexture7EF0B4](@ref gTexture7EF0B4) | 0x0A0C5684 [gTexture7EF0B4_end](@ref gTexture7EF0B4_end) | 0x0A0C56E0 +[gTexture7EF110](@ref gTexture7EF110) | 0x0A0C56E0 [gTexture7EF17C](@ref gTexture7EF17C) | 0x0A0C574C [gTexture7EF110_end](@ref gTexture7EF110_end) | 0x0A0C574C -[gTexture7EF1F0](@ref gTexture7EF1F0) | 0x0A0C57C0 [gTexture7EF17C_end](@ref gTexture7EF17C_end) | 0x0A0C57C0 -[gTexture7EF250](@ref gTexture7EF250) | 0x0A0C5820 +[gTexture7EF1F0](@ref gTexture7EF1F0) | 0x0A0C57C0 [gTexture7EF1F0_end](@ref gTexture7EF1F0_end) | 0x0A0C5820 -[gTexture7EF250_end](@ref gTexture7EF250_end) | 0x0A0C5888 +[gTexture7EF250](@ref gTexture7EF250) | 0x0A0C5820 [gTexture7EF2B8](@ref gTexture7EF2B8) | 0x0A0C5888 +[gTexture7EF250_end](@ref gTexture7EF250_end) | 0x0A0C5888 [gTexture7EF314](@ref gTexture7EF314) | 0x0A0C58E4 [gTexture7EF2B8_end](@ref gTexture7EF2B8_end) | 0x0A0C58E4 [gTexture7EF388](@ref gTexture7EF388) | 0x0A0C5958 [gTexture7EF314_end](@ref gTexture7EF314_end) | 0x0A0C5958 [gTexture7EF388_end](@ref gTexture7EF388_end) | 0x0A0C59C8 [gTexture7EF3F8](@ref gTexture7EF3F8) | 0x0A0C59C8 -[gTexture7EF3F8_end](@ref gTexture7EF3F8_end) | 0x0A0C5A40 [gTexture7EF470](@ref gTexture7EF470) | 0x0A0C5A40 -[gTexture7EF4E4](@ref gTexture7EF4E4) | 0x0A0C5AB4 +[gTexture7EF3F8_end](@ref gTexture7EF3F8_end) | 0x0A0C5A40 [gTexture7EF470_end](@ref gTexture7EF470_end) | 0x0A0C5AB4 +[gTexture7EF4E4](@ref gTexture7EF4E4) | 0x0A0C5AB4 [gTexture7EF554](@ref gTexture7EF554) | 0x0A0C5B24 [gTexture7EF4E4_end](@ref gTexture7EF4E4_end) | 0x0A0C5B24 -[gTexture7EF554_end](@ref gTexture7EF554_end) | 0x0A0C5B90 [gTexture7EF5C0](@ref gTexture7EF5C0) | 0x0A0C5B90 +[gTexture7EF554_end](@ref gTexture7EF554_end) | 0x0A0C5B90 [gTexture7EF620](@ref gTexture7EF620) | 0x0A0C5BF0 [gTexture7EF5C0_end](@ref gTexture7EF5C0_end) | 0x0A0C5BF0 [gTexture7EF620_end](@ref gTexture7EF620_end) | 0x0A0C5C64 @@ -19206,20 +19206,20 @@ Variable Name | Memory Address [gTexture7EF77C](@ref gTexture7EF77C) | 0x0A0C5D4C [gTexture7EF7E8](@ref gTexture7EF7E8) | 0x0A0C5DB8 [gTexture7EF77C_end](@ref gTexture7EF77C_end) | 0x0A0C5DB8 -[gTexture7EF7E8_end](@ref gTexture7EF7E8_end) | 0x0A0C5E2C [gTexture7EF85C](@ref gTexture7EF85C) | 0x0A0C5E2C +[gTexture7EF7E8_end](@ref gTexture7EF7E8_end) | 0x0A0C5E2C [gTexture7EF8C8](@ref gTexture7EF8C8) | 0x0A0C5E98 [gTexture7EF85C_end](@ref gTexture7EF85C_end) | 0x0A0C5E98 [gTexture7EF93C](@ref gTexture7EF93C) | 0x0A0C5F0C [gTexture7EF8C8_end](@ref gTexture7EF8C8_end) | 0x0A0C5F0C -[gTexture7EF93C_end](@ref gTexture7EF93C_end) | 0x0A0C5F84 [gTexture7EF9B4](@ref gTexture7EF9B4) | 0x0A0C5F84 -[gTexture7EF9B4_end](@ref gTexture7EF9B4_end) | 0x0A0C5FFC +[gTexture7EF93C_end](@ref gTexture7EF93C_end) | 0x0A0C5F84 [gTexture7EFA2C](@ref gTexture7EFA2C) | 0x0A0C5FFC +[gTexture7EF9B4_end](@ref gTexture7EF9B4_end) | 0x0A0C5FFC [gTexture7EFA2C_end](@ref gTexture7EFA2C_end) | 0x0A0C6078 [gTexture7EFAA8](@ref gTexture7EFAA8) | 0x0A0C6078 -[gTexture7EFB00](@ref gTexture7EFB00) | 0x0A0C60D0 [gTexture7EFAA8_end](@ref gTexture7EFAA8_end) | 0x0A0C60D0 +[gTexture7EFB00](@ref gTexture7EFB00) | 0x0A0C60D0 [gTexture7EFB00_end](@ref gTexture7EFB00_end) | 0x0A0C6134 [gTexture7EFB64](@ref gTexture7EFB64) | 0x0A0C6134 [gTexture7EFB64_end](@ref gTexture7EFB64_end) | 0x0A0C618C @@ -19230,68 +19230,68 @@ Variable Name | Memory Address [gTexture7EFCAC](@ref gTexture7EFCAC) | 0x0A0C627C [gTexture7EFD00](@ref gTexture7EFD00) | 0x0A0C62D0 [gTexture7EFCAC_end](@ref gTexture7EFCAC_end) | 0x0A0C62D0 -[gTexture7EFD00_end](@ref gTexture7EFD00_end) | 0x0A0C6330 [gTexture7EFD60](@ref gTexture7EFD60) | 0x0A0C6330 +[gTexture7EFD00_end](@ref gTexture7EFD00_end) | 0x0A0C6330 [gTexture7EFDD4](@ref gTexture7EFDD4) | 0x0A0C63A4 [gTexture7EFD60_end](@ref gTexture7EFD60_end) | 0x0A0C63A4 [gTexture7EFE48](@ref gTexture7EFE48) | 0x0A0C6418 [gTexture7EFDD4_end](@ref gTexture7EFDD4_end) | 0x0A0C6418 [gTexture7EFE48_end](@ref gTexture7EFE48_end) | 0x0A0C6470 [gTexture7EFEA0](@ref gTexture7EFEA0) | 0x0A0C6470 -[gTexture7EFF2C](@ref gTexture7EFF2C) | 0x0A0C64FC [gTexture7EFEA0_end](@ref gTexture7EFEA0_end) | 0x0A0C64FC -[gTexture7EFF90](@ref gTexture7EFF90) | 0x0A0C6560 +[gTexture7EFF2C](@ref gTexture7EFF2C) | 0x0A0C64FC [gTexture7EFF2C_end](@ref gTexture7EFF2C_end) | 0x0A0C6560 -[gTexture7F0000](@ref gTexture7F0000) | 0x0A0C65D0 +[gTexture7EFF90](@ref gTexture7EFF90) | 0x0A0C6560 [gTexture7EFF90_end](@ref gTexture7EFF90_end) | 0x0A0C65D0 -[gTexture7F0000_end](@ref gTexture7F0000_end) | 0x0A0C663C +[gTexture7F0000](@ref gTexture7F0000) | 0x0A0C65D0 [gTexture7F006C](@ref gTexture7F006C) | 0x0A0C663C +[gTexture7F0000_end](@ref gTexture7F0000_end) | 0x0A0C663C [gTexture7F00D8](@ref gTexture7F00D8) | 0x0A0C66A8 [gTexture7F006C_end](@ref gTexture7F006C_end) | 0x0A0C66A8 [gTexture7F00D8_end](@ref gTexture7F00D8_end) | 0x0A0C6728 [gTexture7F0158](@ref gTexture7F0158) | 0x0A0C6728 [gTexture7F01D0](@ref gTexture7F01D0) | 0x0A0C67A0 [gTexture7F0158_end](@ref gTexture7F0158_end) | 0x0A0C67A0 -[gTexture7F023C](@ref gTexture7F023C) | 0x0A0C680C [gTexture7F01D0_end](@ref gTexture7F01D0_end) | 0x0A0C680C -[gTexture7F02B4](@ref gTexture7F02B4) | 0x0A0C6884 +[gTexture7F023C](@ref gTexture7F023C) | 0x0A0C680C [gTexture7F023C_end](@ref gTexture7F023C_end) | 0x0A0C6884 +[gTexture7F02B4](@ref gTexture7F02B4) | 0x0A0C6884 [gTexture7F02B4_end](@ref gTexture7F02B4_end) | 0x0A0C68FC [gTexture7F032C](@ref gTexture7F032C) | 0x0A0C68FC -[gTexture7F0390](@ref gTexture7F0390) | 0x0A0C6960 [gTexture7F032C_end](@ref gTexture7F032C_end) | 0x0A0C6960 +[gTexture7F0390](@ref gTexture7F0390) | 0x0A0C6960 [gTexture7F0404](@ref gTexture7F0404) | 0x0A0C69D4 [gTexture7F0390_end](@ref gTexture7F0390_end) | 0x0A0C69D4 [gTexture7F0470](@ref gTexture7F0470) | 0x0A0C6A40 [gTexture7F0404_end](@ref gTexture7F0404_end) | 0x0A0C6A40 -[gTexture7F04EC](@ref gTexture7F04EC) | 0x0A0C6ABC [gTexture7F0470_end](@ref gTexture7F0470_end) | 0x0A0C6ABC -[gTexture7F055C](@ref gTexture7F055C) | 0x0A0C6B2C +[gTexture7F04EC](@ref gTexture7F04EC) | 0x0A0C6ABC [gTexture7F04EC_end](@ref gTexture7F04EC_end) | 0x0A0C6B2C -[gTexture7F055C_end](@ref gTexture7F055C_end) | 0x0A0C6BC0 +[gTexture7F055C](@ref gTexture7F055C) | 0x0A0C6B2C [gTexture7F05F0](@ref gTexture7F05F0) | 0x0A0C6BC0 +[gTexture7F055C_end](@ref gTexture7F055C_end) | 0x0A0C6BC0 [gTexture7F0670](@ref gTexture7F0670) | 0x0A0C6C40 [gTexture7F05F0_end](@ref gTexture7F05F0_end) | 0x0A0C6C40 -[gTexture7F0670_end](@ref gTexture7F0670_end) | 0x0A0C6CBC [gTexture7F06EC](@ref gTexture7F06EC) | 0x0A0C6CBC +[gTexture7F0670_end](@ref gTexture7F0670_end) | 0x0A0C6CBC [gTexture7F06EC_end](@ref gTexture7F06EC_end) | 0x0A0C6D38 [gTexture7F0768](@ref gTexture7F0768) | 0x0A0C6D38 -[gTexture7F0768_end](@ref gTexture7F0768_end) | 0x0A0C6DB0 [gTexture7F07E0](@ref gTexture7F07E0) | 0x0A0C6DB0 +[gTexture7F0768_end](@ref gTexture7F0768_end) | 0x0A0C6DB0 [gTexture7F07E0_end](@ref gTexture7F07E0_end) | 0x0A0C6E28 [gTexture7F0858](@ref gTexture7F0858) | 0x0A0C6E28 -[gTexture7F0858_end](@ref gTexture7F0858_end) | 0x0A0C6EA8 [gTexture7F08D8](@ref gTexture7F08D8) | 0x0A0C6EA8 +[gTexture7F0858_end](@ref gTexture7F0858_end) | 0x0A0C6EA8 [gTexture7F0948](@ref gTexture7F0948) | 0x0A0C6F18 [gTexture7F08D8_end](@ref gTexture7F08D8_end) | 0x0A0C6F18 -[gTexture7F09D0](@ref gTexture7F09D0) | 0x0A0C6FA0 [gTexture7F0948_end](@ref gTexture7F0948_end) | 0x0A0C6FA0 +[gTexture7F09D0](@ref gTexture7F09D0) | 0x0A0C6FA0 [gTexture7F09D0_end](@ref gTexture7F09D0_end) | 0x0A0C700C [gTexture7F0A3C](@ref gTexture7F0A3C) | 0x0A0C700C [gTexture7F0A3C_end](@ref gTexture7F0A3C_end) | 0x0A0C708C [gTexture7F0ABC](@ref gTexture7F0ABC) | 0x0A0C708C -[gTexture7F0ABC_end](@ref gTexture7F0ABC_end) | 0x0A0C7104 [gTexture7F0B34](@ref gTexture7F0B34) | 0x0A0C7104 +[gTexture7F0ABC_end](@ref gTexture7F0ABC_end) | 0x0A0C7104 [gTexture7F0B34_end](@ref gTexture7F0B34_end) | 0x0A0C7180 [gTexture7F0BB0](@ref gTexture7F0BB0) | 0x0A0C7180 [gTexture7F0BB0_end](@ref gTexture7F0BB0_end) | 0x0A0C71F4 @@ -19300,24 +19300,24 @@ Variable Name | Memory Address [gTexture7F0C24_end](@ref gTexture7F0C24_end) | 0x0A0C7264 [gTexture7F0C94_end](@ref gTexture7F0C94_end) | 0x0A0C72DC [gTexture7F0D0C](@ref gTexture7F0D0C) | 0x0A0C72DC -[gTexture7F0D0C_end](@ref gTexture7F0D0C_end) | 0x0A0C735C [gTexture7F0D8C](@ref gTexture7F0D8C) | 0x0A0C735C -[gTexture7F0DEC](@ref gTexture7F0DEC) | 0x0A0C73BC +[gTexture7F0D0C_end](@ref gTexture7F0D0C_end) | 0x0A0C735C [gTexture7F0D8C_end](@ref gTexture7F0D8C_end) | 0x0A0C73BC +[gTexture7F0DEC](@ref gTexture7F0DEC) | 0x0A0C73BC [gTexture7F0E5C](@ref gTexture7F0E5C) | 0x0A0C742C [gTexture7F0DEC_end](@ref gTexture7F0DEC_end) | 0x0A0C742C -[gTexture7F0E5C_end](@ref gTexture7F0E5C_end) | 0x0A0C74B4 [gTexture7F0EE4](@ref gTexture7F0EE4) | 0x0A0C74B4 -[gTexture7F0F5C](@ref gTexture7F0F5C) | 0x0A0C752C +[gTexture7F0E5C_end](@ref gTexture7F0E5C_end) | 0x0A0C74B4 [gTexture7F0EE4_end](@ref gTexture7F0EE4_end) | 0x0A0C752C -[gTexture7F0F5C_end](@ref gTexture7F0F5C_end) | 0x0A0C75A8 +[gTexture7F0F5C](@ref gTexture7F0F5C) | 0x0A0C752C [gTexture7F0FD8](@ref gTexture7F0FD8) | 0x0A0C75A8 +[gTexture7F0F5C_end](@ref gTexture7F0F5C_end) | 0x0A0C75A8 [gTexture7F0FD8_end](@ref gTexture7F0FD8_end) | 0x0A0C7608 [gTexture7F1038](@ref gTexture7F1038) | 0x0A0C7608 -[gTexture7F109C](@ref gTexture7F109C) | 0x0A0C766C [gTexture7F1038_end](@ref gTexture7F1038_end) | 0x0A0C766C -[gTexture7F109C_end](@ref gTexture7F109C_end) | 0x0A0C76F4 +[gTexture7F109C](@ref gTexture7F109C) | 0x0A0C766C [gTexture7F1124](@ref gTexture7F1124) | 0x0A0C76F4 +[gTexture7F109C_end](@ref gTexture7F109C_end) | 0x0A0C76F4 [gTexture7F11F4](@ref gTexture7F11F4) | 0x0A0C77C4 [gTexture7F12C4](@ref gTexture7F12C4) | 0x0A0C7894 [gTexture7F1394](@ref gTexture7F1394) | 0x0A0C7964 @@ -19555,54 +19555,54 @@ Variable Name | Memory Address [gTexturePlayerSelect](@ref gTexturePlayerSelect) | 0x0B000000 [gTexturePlayerSelect_end](@ref gTexturePlayerSelect_end) | 0x0B000C00 [gTextureOption](@ref gTextureOption) | 0x0B000C00 -[gTextureNameDK](@ref gTextureNameDK) | 0x0B001500 [gTextureOption_end](@ref gTextureOption_end) | 0x0B001500 -[gTextureNameDK_end](@ref gTextureNameDK_end) | 0x0B001700 +[gTextureNameDK](@ref gTextureNameDK) | 0x0B001500 [gTextureNameToad](@ref gTextureNameToad) | 0x0B001700 +[gTextureNameDK_end](@ref gTextureNameDK_end) | 0x0B001700 [gTextureNameToad_end](@ref gTextureNameToad_end) | 0x0B001900 [gTextureNameBowser](@ref gTextureNameBowser) | 0x0B001900 -[gTextureNameBowser_end](@ref gTextureNameBowser_end) | 0x0B001B00 [gTextureNameLuigi](@ref gTextureNameLuigi) | 0x0B001B00 -[gTextureNameMario](@ref gTextureNameMario) | 0x0B001D00 +[gTextureNameBowser_end](@ref gTextureNameBowser_end) | 0x0B001B00 [gTextureNameLuigi_end](@ref gTextureNameLuigi_end) | 0x0B001D00 -[gTextureNamePeach](@ref gTextureNamePeach) | 0x0B001F00 +[gTextureNameMario](@ref gTextureNameMario) | 0x0B001D00 [gTextureNameMario_end](@ref gTextureNameMario_end) | 0x0B001F00 -[gTextureNameWario](@ref gTextureNameWario) | 0x0B002100 +[gTextureNamePeach](@ref gTextureNamePeach) | 0x0B001F00 [gTextureNamePeach_end](@ref gTextureNamePeach_end) | 0x0B002100 +[gTextureNameWario](@ref gTextureNameWario) | 0x0B002100 [gTextureNameYoshi](@ref gTextureNameYoshi) | 0x0B002300 [gTextureNameWario_end](@ref gTextureNameWario_end) | 0x0B002300 -[gTextureNameYoshi_end](@ref gTextureNameYoshi_end) | 0x0B002500 [gTextureTitleMarioRaceway](@ref gTextureTitleMarioRaceway) | 0x0B002500 +[gTextureNameYoshi_end](@ref gTextureNameYoshi_end) | 0x0B002500 [gTextureTitleChocoMountain](@ref gTextureTitleChocoMountain) | 0x0B002A00 [gTextureTitleMarioRaceway_end](@ref gTextureTitleMarioRaceway_end) | 0x0B002A00 -[gTextureTitleChocoMountain_end](@ref gTextureTitleChocoMountain_end) | 0x0B002F00 [gTextureTitleBowsersCastle](@ref gTextureTitleBowsersCastle) | 0x0B002F00 +[gTextureTitleChocoMountain_end](@ref gTextureTitleChocoMountain_end) | 0x0B002F00 [gTextureTitleBowsersCastle_end](@ref gTextureTitleBowsersCastle_end) | 0x0B003400 [gTextureTitleBansheeBoardwalk](@ref gTextureTitleBansheeBoardwalk) | 0x0B003400 -[gTextureTitleBansheeBoardwalk_end](@ref gTextureTitleBansheeBoardwalk_end) | 0x0B003A00 [gTextureTitleYoshiValley](@ref gTextureTitleYoshiValley) | 0x0B003A00 +[gTextureTitleBansheeBoardwalk_end](@ref gTextureTitleBansheeBoardwalk_end) | 0x0B003A00 [gTextureTitleYoshiValley_end](@ref gTextureTitleYoshiValley_end) | 0x0B003E00 [gTextureTitleFrappeSnowland](@ref gTextureTitleFrappeSnowland) | 0x0B003E00 -[gTextureTitleKoopaTroopaBeach](@ref gTextureTitleKoopaTroopaBeach) | 0x0B004300 [gTextureTitleFrappeSnowland_end](@ref gTextureTitleFrappeSnowland_end) | 0x0B004300 +[gTextureTitleKoopaTroopaBeach](@ref gTextureTitleKoopaTroopaBeach) | 0x0B004300 [gTextureTitleKoopaTroopaBeach_end](@ref gTextureTitleKoopaTroopaBeach_end) | 0x0B004800 [gTextureTitleRoyalRaceway](@ref gTextureTitleRoyalRaceway) | 0x0B004800 [gTextureTitleRoyalRaceway_end](@ref gTextureTitleRoyalRaceway_end) | 0x0B004C00 [gTextureTitleLuigiRaceway](@ref gTextureTitleLuigiRaceway) | 0x0B004C00 [gTextureTitleMooMooFarm](@ref gTextureTitleMooMooFarm) | 0x0B005000 [gTextureTitleLuigiRaceway_end](@ref gTextureTitleLuigiRaceway_end) | 0x0B005000 -[gTextureTitleMooMooFarm_end](@ref gTextureTitleMooMooFarm_end) | 0x0B005400 [gTextureTitleToadsTurnpike](@ref gTextureTitleToadsTurnpike) | 0x0B005400 -[gTextureTitleKalimariDesert](@ref gTextureTitleKalimariDesert) | 0x0B005900 +[gTextureTitleMooMooFarm_end](@ref gTextureTitleMooMooFarm_end) | 0x0B005400 [gTextureTitleToadsTurnpike_end](@ref gTextureTitleToadsTurnpike_end) | 0x0B005900 -[gTextureTitleKalimariDesert_end](@ref gTextureTitleKalimariDesert_end) | 0x0B005D00 +[gTextureTitleKalimariDesert](@ref gTextureTitleKalimariDesert) | 0x0B005900 [gTextureTitleSherbetLand](@ref gTextureTitleSherbetLand) | 0x0B005D00 -[gTextureTitleSherbetLand_end](@ref gTextureTitleSherbetLand_end) | 0x0B006100 +[gTextureTitleKalimariDesert_end](@ref gTextureTitleKalimariDesert_end) | 0x0B005D00 [gTextureTitleRainbowRoad](@ref gTextureTitleRainbowRoad) | 0x0B006100 +[gTextureTitleSherbetLand_end](@ref gTextureTitleSherbetLand_end) | 0x0B006100 [gTextureTitleWarioStadium](@ref gTextureTitleWarioStadium) | 0x0B006500 [gTextureTitleRainbowRoad_end](@ref gTextureTitleRainbowRoad_end) | 0x0B006500 -[gTextureTitleWarioStadium_end](@ref gTextureTitleWarioStadium_end) | 0x0B006A00 [gTextureTitleBlockFort](@ref gTextureTitleBlockFort) | 0x0B006A00 +[gTextureTitleWarioStadium_end](@ref gTextureTitleWarioStadium_end) | 0x0B006A00 [gTextureTitleBlockFort_end](@ref gTextureTitleBlockFort_end) | 0x0B006D00 [gTextureTitleSkyscraper](@ref gTextureTitleSkyscraper) | 0x0B006D00 [gTextureTitleDoubleDeck](@ref gTextureTitleDoubleDeck) | 0x0B007100 @@ -19617,22 +19617,22 @@ Variable Name | Memory Address [gTextureMapSelect_end](@ref gTextureMapSelect_end) | 0x0B008A00 [gTextureMenuMushroomCup](@ref gTextureMenuMushroomCup) | 0x0B008E00 [gTextureMenuFlowerCup_end](@ref gTextureMenuFlowerCup_end) | 0x0B008E00 -[gTextureMenuMushroomCup_end](@ref gTextureMenuMushroomCup_end) | 0x0B009200 [gTextureMenuStarCup](@ref gTextureMenuStarCup) | 0x0B009200 +[gTextureMenuMushroomCup_end](@ref gTextureMenuMushroomCup_end) | 0x0B009200 [gTextureMenuSpecialCup](@ref gTextureMenuSpecialCup) | 0x0B009600 [gTextureMenuStarCup_end](@ref gTextureMenuStarCup_end) | 0x0B009600 [gTextureGameSelect](@ref gTextureGameSelect) | 0x0B009A00 [gTextureMenuSpecialCup_end](@ref gTextureMenuSpecialCup_end) | 0x0B009A00 -[gTextureMenu1PGame](@ref gTextureMenu1PGame) | 0x0B00A600 [gTextureGameSelect_end](@ref gTextureGameSelect_end) | 0x0B00A600 -[gTextureMenu1PGame_end](@ref gTextureMenu1PGame_end) | 0x0B00AB00 +[gTextureMenu1PGame](@ref gTextureMenu1PGame) | 0x0B00A600 [gTextureMenu2PGame](@ref gTextureMenu2PGame) | 0x0B00AB00 -[gTextureMenu3PGame](@ref gTextureMenu3PGame) | 0x0B00B200 +[gTextureMenu1PGame_end](@ref gTextureMenu1PGame_end) | 0x0B00AB00 [gTextureMenu2PGame_end](@ref gTextureMenu2PGame_end) | 0x0B00B200 -[gTextureMenu4PGame](@ref gTextureMenu4PGame) | 0x0B00BC00 +[gTextureMenu3PGame](@ref gTextureMenu3PGame) | 0x0B00B200 [gTextureMenu3PGame_end](@ref gTextureMenu3PGame_end) | 0x0B00BC00 -[gTextureMenu4PGame_end](@ref gTextureMenu4PGame_end) | 0x0B00C700 +[gTextureMenu4PGame](@ref gTextureMenu4PGame) | 0x0B00BC00 [gTextureMenuModeBattle](@ref gTextureMenuModeBattle) | 0x0B00C700 +[gTextureMenu4PGame_end](@ref gTextureMenu4PGame_end) | 0x0B00C700 [gTextureMenuModeTimeTrials](@ref gTextureMenuModeTimeTrials) | 0x0B00CA00 [gTextureMenuModeBattle_end](@ref gTextureMenuModeBattle_end) | 0x0B00CA00 [gTextureMenuModeMarioGP](@ref gTextureMenuModeMarioGP) | 0x0B00CE00 @@ -19643,36 +19643,36 @@ Variable Name | Memory Address [gTextureMenuModeVS_end](@ref gTextureMenuModeVS_end) | 0x0B00D500 [gTextureMenuLOption_end](@ref gTextureMenuLOption_end) | 0x0B00D800 [gTextureMenuRData](@ref gTextureMenuRData) | 0x0B00D800 -[gTextureMenuRData_end](@ref gTextureMenuRData_end) | 0x0B00DB00 [gTextureMenu50cc](@ref gTextureMenu50cc) | 0x0B00DB00 -[gTextureMenu50cc_end](@ref gTextureMenu50cc_end) | 0x0B00DD00 +[gTextureMenuRData_end](@ref gTextureMenuRData_end) | 0x0B00DB00 [gTextureMenu100cc](@ref gTextureMenu100cc) | 0x0B00DD00 -[gTextureMenu150cc](@ref gTextureMenu150cc) | 0x0B00DF00 +[gTextureMenu50cc_end](@ref gTextureMenu50cc_end) | 0x0B00DD00 [gTextureMenu100cc_end](@ref gTextureMenu100cc_end) | 0x0B00DF00 +[gTextureMenu150cc](@ref gTextureMenu150cc) | 0x0B00DF00 [gTextureMenuExtra](@ref gTextureMenuExtra) | 0x0B00E100 [gTextureMenu150cc_end](@ref gTextureMenu150cc_end) | 0x0B00E100 [gTextureMenuWithoutItem](@ref gTextureMenuWithoutItem) | 0x0B00E300 [gTextureMenuExtra_end](@ref gTextureMenuExtra_end) | 0x0B00E300 [gTextureMenuWithoutItem_end](@ref gTextureMenuWithoutItem_end) | 0x0B00E600 [gTextureMenuWithItem](@ref gTextureMenuWithItem) | 0x0B00E600 -[gTextureMenuWithItem_end](@ref gTextureMenuWithItem_end) | 0x0B00E900 [gTextureMenuBegin](@ref gTextureMenuBegin) | 0x0B00E900 +[gTextureMenuWithItem_end](@ref gTextureMenuWithItem_end) | 0x0B00E900 [gTextureMenuGhost](@ref gTextureMenuGhost) | 0x0B00EB00 [gTextureMenuBegin_end](@ref gTextureMenuBegin_end) | 0x0B00EB00 [gTextureMenuData](@ref gTextureMenuData) | 0x0B00ED00 [gTextureMenuGhost_end](@ref gTextureMenuGhost_end) | 0x0B00ED00 [gTextureMenuData_end](@ref gTextureMenuData_end) | 0x0B00EF00 [gTextureMenuOK](@ref gTextureMenuOK) | 0x0B00EF00 -[gTextureBackgroundBlueSky](@ref gTextureBackgroundBlueSky) | 0x0B00F100 [gTextureMenuOK_end](@ref gTextureMenuOK_end) | 0x0B00F100 +[gTextureBackgroundBlueSky](@ref gTextureBackgroundBlueSky) | 0x0B00F100 [gTextureBackgroundBlueSky_end](@ref gTextureBackgroundBlueSky_end) | 0x0B01BF00 [gTextureBackgroundSunset](@ref gTextureBackgroundSunset) | 0x0B01BF00 -[gTextureGreenGoldStripe](@ref gTextureGreenGoldStripe) | 0x0B025300 [gTextureBackgroundSunset_end](@ref gTextureBackgroundSunset_end) | 0x0B025300 -[gTextureGoldStripe](@ref gTextureGoldStripe) | 0x0B025F00 +[gTextureGreenGoldStripe](@ref gTextureGreenGoldStripe) | 0x0B025300 [gTextureGreenGoldStripe_end](@ref gTextureGreenGoldStripe_end) | 0x0B025F00 -[gTextureWhiteStripe](@ref gTextureWhiteStripe) | 0x0B026600 +[gTextureGoldStripe](@ref gTextureGoldStripe) | 0x0B025F00 [gTextureGoldStripe_end](@ref gTextureGoldStripe_end) | 0x0B026600 +[gTextureWhiteStripe](@ref gTextureWhiteStripe) | 0x0B026600 [gTexturePinkBar](@ref gTexturePinkBar) | 0x0B026700 [gTextureWhiteStripe_end](@ref gTextureWhiteStripe_end) | 0x0B026700 [gTexturePinkBar_end](@ref gTexturePinkBar_end) | 0x0B026C00 @@ -19767,64 +19767,64 @@ Variable Name | Memory Address [d_course_big_donut_packed](@ref d_course_big_donut_packed) | 0x0F001B84 [music_sequence_table_header](@ref music_sequence_table_header) | 0x0025FD00 [music_sequence_table](@ref music_sequence_table) | 0x0025FD04 -[music_sequence_table_end](@ref music_sequence_table_end) | 0x0025FE00 [seq_00](@ref seq_00) | 0x0025FE00 +[music_sequence_table_end](@ref music_sequence_table_end) | 0x0025FE00 [seq_01](@ref seq_01) | 0x00262630 [seq_00_end](@ref seq_00_end) | 0x00262630 -[seq_02](@ref seq_02) | 0x00264160 [seq_01_end](@ref seq_01_end) | 0x00264160 +[seq_02](@ref seq_02) | 0x00264160 [seq_02_end](@ref seq_02_end) | 0x00264EC0 [seq_03](@ref seq_03) | 0x00264EC0 [seq_03_end](@ref seq_03_end) | 0x002668D0 [seq_04](@ref seq_04) | 0x002668D0 -[seq_04_end](@ref seq_04_end) | 0x00268570 [seq_05](@ref seq_05) | 0x00268570 +[seq_04_end](@ref seq_04_end) | 0x00268570 [seq_05_end](@ref seq_05_end) | 0x0026A4E0 [seq_06](@ref seq_06) | 0x0026A4E0 -[seq_06_end](@ref seq_06_end) | 0x0026C3C0 [seq_07](@ref seq_07) | 0x0026C3C0 +[seq_06_end](@ref seq_06_end) | 0x0026C3C0 [seq_07_end](@ref seq_07_end) | 0x0026DA90 [seq_08](@ref seq_08) | 0x0026DA90 -[seq_08_end](@ref seq_08_end) | 0x0026FE60 [seq_09](@ref seq_09) | 0x0026FE60 +[seq_08_end](@ref seq_08_end) | 0x0026FE60 [seq_09_end](@ref seq_09_end) | 0x00271660 [seq_0A](@ref seq_0A) | 0x00271660 [seq_0B](@ref seq_0B) | 0x00273140 [seq_0A_end](@ref seq_0A_end) | 0x00273140 [seq_0C](@ref seq_0C) | 0x00273730 [seq_0B_end](@ref seq_0B_end) | 0x00273730 -[seq_0D](@ref seq_0D) | 0x00273B00 [seq_0C_end](@ref seq_0C_end) | 0x00273B00 -[seq_0D_end](@ref seq_0D_end) | 0x00273E60 +[seq_0D](@ref seq_0D) | 0x00273B00 [seq_0E](@ref seq_0E) | 0x00273E60 +[seq_0D_end](@ref seq_0D_end) | 0x00273E60 [seq_0E_end](@ref seq_0E_end) | 0x00274140 [seq_0F](@ref seq_0F) | 0x00274140 [seq_0F_end](@ref seq_0F_end) | 0x00274600 [seq_10](@ref seq_10) | 0x00274600 [seq_10_end](@ref seq_10_end) | 0x00275A10 [seq_11](@ref seq_11) | 0x00275A10 -[seq_11_end](@ref seq_11_end) | 0x002760F0 [seq_12](@ref seq_12) | 0x002760F0 -[seq_13](@ref seq_13) | 0x002793E0 +[seq_11_end](@ref seq_11_end) | 0x002760F0 [seq_12_end](@ref seq_12_end) | 0x002793E0 +[seq_13](@ref seq_13) | 0x002793E0 [seq_14](@ref seq_14) | 0x00279AA0 [seq_13_end](@ref seq_13_end) | 0x00279AA0 [seq_15](@ref seq_15) | 0x00279F50 [seq_14_end](@ref seq_14_end) | 0x00279F50 -[seq_15_end](@ref seq_15_end) | 0x0027B0B0 [seq_16](@ref seq_16) | 0x0027B0B0 -[seq_17](@ref seq_17) | 0x0027B3C0 +[seq_15_end](@ref seq_15_end) | 0x0027B0B0 [seq_16_end](@ref seq_16_end) | 0x0027B3C0 +[seq_17](@ref seq_17) | 0x0027B3C0 [seq_17_end](@ref seq_17_end) | 0x0027C670 [seq_18](@ref seq_18) | 0x0027C670 [seq_19](@ref seq_19) | 0x0027CC70 [seq_18_end](@ref seq_18_end) | 0x0027CC70 -[seq_1A](@ref seq_1A) | 0x0027E350 [seq_19_end](@ref seq_19_end) | 0x0027E350 -[seq_1A_end](@ref seq_1A_end) | 0x0027EE20 +[seq_1A](@ref seq_1A) | 0x0027E350 [seq_1B](@ref seq_1B) | 0x0027EE20 -[seq_1B_end](@ref seq_1B_end) | 0x0027FAA0 +[seq_1A_end](@ref seq_1A_end) | 0x0027EE20 [seq_1C](@ref seq_1C) | 0x0027FAA0 +[seq_1B_end](@ref seq_1B_end) | 0x0027FAA0 [seq_1D](@ref seq_1D) | 0x002821F0 [seq_1C_end](@ref seq_1C_end) | 0x002821F0 [seq_1D_end](@ref seq_1D_end) | 0x00282E70