From fb85b1d269d437c7e2fa743d3c159ee4f9abeba9 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 20 Nov 2020 00:16:08 -0500 Subject: [PATCH] another --- .../code_109660_len_1270/func_802E8A58.s | 8 ++++---- asm/nonmatchings/code_319670/func_802BD660.s | 8 ++++---- .../area_mac/mac_00/7EB340/func_80242224_7ECF34.s | 15 --------------- src/world/area_mac/mac_00/7EB340.c | 6 +++++- tools/symbol_addrs.txt | 2 +- 5 files changed, 14 insertions(+), 25 deletions(-) delete mode 100644 asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80242224_7ECF34.s diff --git a/asm/nonmatchings/code_109660_len_1270/func_802E8A58.s b/asm/nonmatchings/code_109660_len_1270/func_802E8A58.s index 15762c05f1..5b46f26299 100644 --- a/asm/nonmatchings/code_109660_len_1270/func_802E8A58.s +++ b/asm/nonmatchings/code_109660_len_1270/func_802E8A58.s @@ -19,15 +19,15 @@ glabel func_802E8A58 /* 10A310 802E8A90 080BA2B2 */ j .L802E8AC8 /* 10A314 802E8A94 00000000 */ nop .L802E8A98: -/* 10A318 802E8A98 3C028016 */ lui $v0, 0x8016 -/* 10A31C 802E8A9C 8442A552 */ lh $v0, -0x5aae($v0) +/* 10A318 802E8A98 3C028016 */ lui $v0, %hi(gCollisionStatus+0x2) +/* 10A31C 802E8A9C 8442A552 */ lh $v0, %lo(gCollisionStatus+0x2)($v0) /* 10A320 802E8AA0 1840000B */ blez $v0, .L802E8AD0 /* 10A324 802E8AA4 24020001 */ addiu $v0, $zero, 1 /* 10A328 802E8AA8 080BA2B4 */ j .L802E8AD0 /* 10A32C 802E8AAC ACA20004 */ sw $v0, 4($a1) .L802E8AB0: -/* 10A330 802E8AB0 3C028016 */ lui $v0, 0x8016 -/* 10A334 802E8AB4 8442A552 */ lh $v0, -0x5aae($v0) +/* 10A330 802E8AB0 3C028016 */ lui $v0, %hi(gCollisionStatus+0x2) +/* 10A334 802E8AB4 8442A552 */ lh $v0, %lo(gCollisionStatus+0x2)($v0) /* 10A338 802E8AB8 04410005 */ bgez $v0, .L802E8AD0 /* 10A33C 802E8ABC 24020002 */ addiu $v0, $zero, 2 /* 10A340 802E8AC0 080BA2B4 */ j .L802E8AD0 diff --git a/asm/nonmatchings/code_319670/func_802BD660.s b/asm/nonmatchings/code_319670/func_802BD660.s index 6711f880f2..f5d64b5805 100644 --- a/asm/nonmatchings/code_319670/func_802BD660.s +++ b/asm/nonmatchings/code_319670/func_802BD660.s @@ -772,14 +772,14 @@ glabel func_802BD660 /* 31A764 802BE1F4 AC620000 */ sw $v0, ($v1) /* 31A768 802BE1F8 2402FFFF */ addiu $v0, $zero, -1 /* 31A76C 802BE1FC E6020064 */ swc1 $f2, 0x64($s0) -/* 31A770 802BE200 3C018016 */ lui $at, 0x8016 -/* 31A774 802BE204 A422A552 */ sh $v0, -0x5aae($at) +/* 31A770 802BE200 3C018016 */ lui $at, %hi(gCollisionStatus+0x2) +/* 31A774 802BE204 A422A552 */ sh $v0, %lo(gCollisionStatus+0x2)($at) /* 31A778 802BE208 080AF9E3 */ j .L802BE78C /* 31A77C 802BE20C 00000000 */ nop /* 31A780 802BE210 0C0AF556 */ jal func_802BD558 /* 31A784 802BE214 24150015 */ addiu $s5, $zero, 0x15 -/* 31A788 802BE218 3C018016 */ lui $at, 0x8016 -/* 31A78C 802BE21C A422A552 */ sh $v0, -0x5aae($at) +/* 31A788 802BE218 3C018016 */ lui $at, %hi(gCollisionStatus+0x2) +/* 31A78C 802BE21C A422A552 */ sh $v0, %lo(gCollisionStatus+0x2)($at) /* 31A790 802BE220 822300B4 */ lb $v1, 0xb4($s1) /* 31A794 802BE224 10750156 */ beq $v1, $s5, .L802BE780 /* 31A798 802BE228 24020017 */ addiu $v0, $zero, 0x17 diff --git a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80242224_7ECF34.s b/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80242224_7ECF34.s deleted file mode 100644 index f5db5f7529..0000000000 --- a/asm/nonmatchings/world/area_mac/mac_00/7EB340/func_80242224_7ECF34.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242224_7ECF34 -/* 7ECF34 80242224 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 7ECF38 80242228 24020001 */ addiu $v0, $zero, 1 -/* 7ECF3C 8024222C AFBF0010 */ sw $ra, 0x10($sp) -/* 7ECF40 80242230 3C018011 */ lui $at, %hi(gPlayerData+0x2) -/* 7ECF44 80242234 A022F292 */ sb $v0, %lo(gPlayerData+0x2)($at) -/* 7ECF48 80242238 0C03A6DB */ jal sync_status_menu -/* 7ECF4C 8024223C 00000000 */ nop -/* 7ECF50 80242240 8FBF0010 */ lw $ra, 0x10($sp) -/* 7ECF54 80242244 24020002 */ addiu $v0, $zero, 2 -/* 7ECF58 80242248 03E00008 */ jr $ra -/* 7ECF5C 8024224C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/src/world/area_mac/mac_00/7EB340.c b/src/world/area_mac/mac_00/7EB340.c index 2678144c2e..0d497c8be1 100644 --- a/src/world/area_mac/mac_00/7EB340.c +++ b/src/world/area_mac/mac_00/7EB340.c @@ -84,7 +84,11 @@ INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80242178_7ECE88); INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_802421D0_7ECEE0); -INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80242224_7ECF34); +ApiStatus func_80242224_7ECF34(ScriptInstance* script, s32 isInitialCall) { + gPlayerData.curHP = 1; + sync_status_menu(); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80242250_7ECF60); diff --git a/tools/symbol_addrs.txt b/tools/symbol_addrs.txt index be3ee0c4d9..dda23ceeca 100644 --- a/tools/symbol_addrs.txt +++ b/tools/symbol_addrs.txt @@ -899,7 +899,7 @@ gMusicTargetVolume = 0x80159AE2; gMusicUnkVolume2 = 0x80159AE4; gMusicCurrentVolume = 0x80159AE6; gMusicPlayers = 0x80159AF0; -gCollisionStatus = 0x8015A550; +gCollisionStatus = 0x8015A550; // size:0x28 get_dpad_input_radial = 0x8023E000; initialize_battle = 0x8023E130; update_actor_shadows = 0x8023E404;