mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
Match four functions in 20ec0_len_5040.c (#555)
* Match 4 functions. * Delete func_80047A30.s * Delete func_80047928.s * Delete func_80047820.s * Delete func_800477F4.s
This commit is contained in:
parent
0b4d9252c1
commit
bc7899aaef
@ -262,9 +262,23 @@ void remove_all_status_icons(s32 iconID) {
|
||||
|
||||
INCLUDE_ASM(s32, "20ec0_len_5040", set_status_icons_properties);
|
||||
|
||||
INCLUDE_ASM(s32, "20ec0_len_5040", func_800477F4);
|
||||
void func_800477F4(s32 iconID, f32 offsetY, f32 arg2) {
|
||||
HudStatusIcon* statusIcon = &D_800A0F44[iconID];
|
||||
|
||||
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047820);
|
||||
statusIcon->offsetY = offsetY;
|
||||
statusIcon->unk_34 = arg2;
|
||||
}
|
||||
|
||||
void func_80047820(s32 iconID, s32 arg1) {
|
||||
HudStatusIcon* statusIcon = &D_800A0F44[iconID];
|
||||
|
||||
statusIcon->flags &= ~STATUS_ICON_FLAG_DEBUFF;
|
||||
if (statusIcon->status1.active != arg1) {
|
||||
remove_status_debuff(iconID);
|
||||
statusIcon->status1.active = arg1;
|
||||
statusIcon->status1.unk_02 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void remove_status_debuff(s32 iconID) {
|
||||
HudStatusIcon* statusIcon = &D_800A0F44[iconID];
|
||||
@ -285,7 +299,16 @@ void enable_status_1(s32 iconID) {
|
||||
statusIcon->flags |= STATUS_ICON_FLAG_DEBUFF;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047928);
|
||||
void func_80047928(s32 iconID, s32 arg1) {
|
||||
HudStatusIcon* statusIcon = &D_800A0F44[iconID];
|
||||
|
||||
statusIcon->flags &= ~STATUS_ICON_FLAG_STATIC;
|
||||
if (statusIcon->status2.active != arg1) {
|
||||
remove_status_static(iconID);
|
||||
statusIcon->status2.active = arg1;
|
||||
statusIcon->status2.unk_02 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void remove_status_static(s32 iconID) {
|
||||
HudStatusIcon* statusIcon = &D_800A0F44[iconID];
|
||||
@ -306,7 +329,16 @@ void enable_status_2(s32 iconID) {
|
||||
statusIcon->flags |= STATUS_ICON_FLAG_STATIC;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047A30);
|
||||
void func_80047A30(s32 iconID, s32 arg1) {
|
||||
HudStatusIcon* statusIcon = &D_800A0F44[iconID];
|
||||
|
||||
statusIcon->flags &= ~STATUS_ICON_FLAG_TRANSPARENT;
|
||||
if (statusIcon->status3.active != arg1) {
|
||||
remove_status_transparent(iconID);
|
||||
statusIcon->status3.active = arg1;
|
||||
statusIcon->status3.unk_02 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void remove_status_transparent(s32 iconID) {
|
||||
HudStatusIcon* statusIcon = &D_800A0F44[iconID];
|
||||
|
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_800477F4
|
||||
/* 22BF4 800477F4 00041040 */ sll $v0, $a0, 1
|
||||
/* 22BF8 800477F8 00441021 */ addu $v0, $v0, $a0
|
||||
/* 22BFC 800477FC 00021080 */ sll $v0, $v0, 2
|
||||
/* 22C00 80047800 00441023 */ subu $v0, $v0, $a0
|
||||
/* 22C04 80047804 3C03800A */ lui $v1, %hi(D_800A0F44)
|
||||
/* 22C08 80047808 8C630F44 */ lw $v1, %lo(D_800A0F44)($v1)
|
||||
/* 22C0C 8004780C 00021100 */ sll $v0, $v0, 4
|
||||
/* 22C10 80047810 00621821 */ addu $v1, $v1, $v0
|
||||
/* 22C14 80047814 AC650030 */ sw $a1, 0x30($v1)
|
||||
/* 22C18 80047818 03E00008 */ jr $ra
|
||||
/* 22C1C 8004781C AC660034 */ sw $a2, 0x34($v1)
|
@ -1,35 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80047820
|
||||
/* 22C20 80047820 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 22C24 80047824 0080302D */ daddu $a2, $a0, $zero
|
||||
/* 22C28 80047828 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 22C2C 8004782C 00A0882D */ daddu $s1, $a1, $zero
|
||||
/* 22C30 80047830 00061040 */ sll $v0, $a2, 1
|
||||
/* 22C34 80047834 00461021 */ addu $v0, $v0, $a2
|
||||
/* 22C38 80047838 00021080 */ sll $v0, $v0, 2
|
||||
/* 22C3C 8004783C 00461023 */ subu $v0, $v0, $a2
|
||||
/* 22C40 80047840 3C03800A */ lui $v1, %hi(D_800A0F44)
|
||||
/* 22C44 80047844 8C630F44 */ lw $v1, %lo(D_800A0F44)($v1)
|
||||
/* 22C48 80047848 00021100 */ sll $v0, $v0, 4
|
||||
/* 22C4C 8004784C AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 22C50 80047850 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 22C54 80047854 00628021 */ addu $s0, $v1, $v0
|
||||
/* 22C58 80047858 2403FFFB */ addiu $v1, $zero, -5
|
||||
/* 22C5C 8004785C 8E020000 */ lw $v0, ($s0)
|
||||
/* 22C60 80047860 82040038 */ lb $a0, 0x38($s0)
|
||||
/* 22C64 80047864 00431024 */ and $v0, $v0, $v1
|
||||
/* 22C68 80047868 10910006 */ beq $a0, $s1, .L80047884
|
||||
/* 22C6C 8004786C AE020000 */ sw $v0, ($s0)
|
||||
/* 22C70 80047870 0C011E26 */ jal remove_status_debuff
|
||||
/* 22C74 80047874 00C0202D */ daddu $a0, $a2, $zero
|
||||
/* 22C78 80047878 24020001 */ addiu $v0, $zero, 1
|
||||
/* 22C7C 8004787C A2110038 */ sb $s1, 0x38($s0)
|
||||
/* 22C80 80047880 A202003A */ sb $v0, 0x3a($s0)
|
||||
.L80047884:
|
||||
/* 22C84 80047884 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 22C88 80047888 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 22C8C 8004788C 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 22C90 80047890 03E00008 */ jr $ra
|
||||
/* 22C94 80047894 27BD0020 */ addiu $sp, $sp, 0x20
|
@ -1,35 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80047928
|
||||
/* 22D28 80047928 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 22D2C 8004792C 0080302D */ daddu $a2, $a0, $zero
|
||||
/* 22D30 80047930 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 22D34 80047934 00A0882D */ daddu $s1, $a1, $zero
|
||||
/* 22D38 80047938 00061040 */ sll $v0, $a2, 1
|
||||
/* 22D3C 8004793C 00461021 */ addu $v0, $v0, $a2
|
||||
/* 22D40 80047940 00021080 */ sll $v0, $v0, 2
|
||||
/* 22D44 80047944 00461023 */ subu $v0, $v0, $a2
|
||||
/* 22D48 80047948 3C03800A */ lui $v1, %hi(D_800A0F44)
|
||||
/* 22D4C 8004794C 8C630F44 */ lw $v1, %lo(D_800A0F44)($v1)
|
||||
/* 22D50 80047950 00021100 */ sll $v0, $v0, 4
|
||||
/* 22D54 80047954 AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 22D58 80047958 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 22D5C 8004795C 00628021 */ addu $s0, $v1, $v0
|
||||
/* 22D60 80047960 2403FFF7 */ addiu $v1, $zero, -9
|
||||
/* 22D64 80047964 8E020000 */ lw $v0, ($s0)
|
||||
/* 22D68 80047968 82040048 */ lb $a0, 0x48($s0)
|
||||
/* 22D6C 8004796C 00431024 */ and $v0, $v0, $v1
|
||||
/* 22D70 80047970 10910006 */ beq $a0, $s1, .L8004798C
|
||||
/* 22D74 80047974 AE020000 */ sw $v0, ($s0)
|
||||
/* 22D78 80047978 0C011E68 */ jal remove_status_static
|
||||
/* 22D7C 8004797C 00C0202D */ daddu $a0, $a2, $zero
|
||||
/* 22D80 80047980 24020001 */ addiu $v0, $zero, 1
|
||||
/* 22D84 80047984 A2110048 */ sb $s1, 0x48($s0)
|
||||
/* 22D88 80047988 A202004A */ sb $v0, 0x4a($s0)
|
||||
.L8004798C:
|
||||
/* 22D8C 8004798C 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 22D90 80047990 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 22D94 80047994 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 22D98 80047998 03E00008 */ jr $ra
|
||||
/* 22D9C 8004799C 27BD0020 */ addiu $sp, $sp, 0x20
|
@ -1,35 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80047A30
|
||||
/* 22E30 80047A30 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 22E34 80047A34 0080302D */ daddu $a2, $a0, $zero
|
||||
/* 22E38 80047A38 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 22E3C 80047A3C 00A0882D */ daddu $s1, $a1, $zero
|
||||
/* 22E40 80047A40 00061040 */ sll $v0, $a2, 1
|
||||
/* 22E44 80047A44 00461021 */ addu $v0, $v0, $a2
|
||||
/* 22E48 80047A48 00021080 */ sll $v0, $v0, 2
|
||||
/* 22E4C 80047A4C 00461023 */ subu $v0, $v0, $a2
|
||||
/* 22E50 80047A50 3C03800A */ lui $v1, %hi(D_800A0F44)
|
||||
/* 22E54 80047A54 8C630F44 */ lw $v1, %lo(D_800A0F44)($v1)
|
||||
/* 22E58 80047A58 00021100 */ sll $v0, $v0, 4
|
||||
/* 22E5C 80047A5C AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 22E60 80047A60 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 22E64 80047A64 00628021 */ addu $s0, $v1, $v0
|
||||
/* 22E68 80047A68 2403FFEF */ addiu $v1, $zero, -0x11
|
||||
/* 22E6C 80047A6C 8E020000 */ lw $v0, ($s0)
|
||||
/* 22E70 80047A70 82040058 */ lb $a0, 0x58($s0)
|
||||
/* 22E74 80047A74 00431024 */ and $v0, $v0, $v1
|
||||
/* 22E78 80047A78 10910006 */ beq $a0, $s1, .L80047A94
|
||||
/* 22E7C 80047A7C AE020000 */ sw $v0, ($s0)
|
||||
/* 22E80 80047A80 0C011EAA */ jal remove_status_transparent
|
||||
/* 22E84 80047A84 00C0202D */ daddu $a0, $a2, $zero
|
||||
/* 22E88 80047A88 24020001 */ addiu $v0, $zero, 1
|
||||
/* 22E8C 80047A8C A2110058 */ sb $s1, 0x58($s0)
|
||||
/* 22E90 80047A90 A202005A */ sb $v0, 0x5a($s0)
|
||||
.L80047A94:
|
||||
/* 22E94 80047A94 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 22E98 80047A98 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 22E9C 80047A9C 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 22EA0 80047AA0 03E00008 */ jr $ra
|
||||
/* 22EA4 80047AA4 27BD0020 */ addiu $sp, $sp, 0x20
|
Loading…
Reference in New Issue
Block a user