From d44dd61cd6b1b19ff0825c04b1a1addf06f6253c Mon Sep 17 00:00:00 2001 From: maekclena Date: Fri, 4 Sep 2020 23:22:12 +0200 Subject: [PATCH 1/4] ovl_Effect_Ss_Extra (#339) * ovl_Effect_Ss_Extra * EffectSsExtra_Spawn * Typo * PR review * PR review --- .../func_8002A5F4.s | 28 ---- .../actors/ovl_En_Dnt_Nomal/func_809F36CC.s | 4 +- .../actors/ovl_En_G_Switch/func_80A22250.s | 2 +- .../ovl_En_Yabusame_Mark/func_80B42F74.s | 2 +- .../ovl_Effect_Ss_Extra/EffectSsExtra_Init.s | 83 ----------- .../ovl_Effect_Ss_Extra/func_809A3E00.s | 141 ------------------ .../ovl_Effect_Ss_Extra/func_809A3FF8.s | 30 ---- data/overlays/effects/z_eff_ss_extra.data.s | 18 --- data/overlays/effects/z_eff_ss_extra.reloc.s | 13 -- include/functions.h | 2 +- spec | 3 +- src/code/z_effect_soft_sprite_old_init.c | 12 +- .../ovl_Effect_Ss_Extra/z_eff_ss_extra.c | 85 ++++++++--- .../ovl_Effect_Ss_Extra/z_eff_ss_extra.h | 4 +- 14 files changed, 86 insertions(+), 341 deletions(-) delete mode 100644 asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A5F4.s delete mode 100644 asm/non_matchings/overlays/effects/ovl_Effect_Ss_Extra/EffectSsExtra_Init.s delete mode 100644 asm/non_matchings/overlays/effects/ovl_Effect_Ss_Extra/func_809A3E00.s delete mode 100644 asm/non_matchings/overlays/effects/ovl_Effect_Ss_Extra/func_809A3FF8.s delete mode 100644 data/overlays/effects/z_eff_ss_extra.data.s delete mode 100644 data/overlays/effects/z_eff_ss_extra.reloc.s diff --git a/asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A5F4.s b/asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A5F4.s deleted file mode 100644 index c69183fa44..0000000000 --- a/asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A5F4.s +++ /dev/null @@ -1,28 +0,0 @@ -glabel func_8002A5F4 -/* AA1794 8002A5F4 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* AA1798 8002A5F8 AFBF0014 */ sw $ra, 0x14($sp) -/* AA179C 8002A5FC AFA40040 */ sw $a0, 0x40($sp) -/* AA17A0 8002A600 AFA60048 */ sw $a2, 0x48($sp) -/* AA17A4 8002A604 AFA7004C */ sw $a3, 0x4c($sp) -/* AA17A8 8002A608 0C01DF90 */ jal Math_Vec3f_Copy -/* AA17AC 8002A60C 27A40018 */ addiu $a0, $sp, 0x18 -/* AA17B0 8002A610 27A40024 */ addiu $a0, $sp, 0x24 -/* AA17B4 8002A614 0C01DF90 */ jal Math_Vec3f_Copy -/* AA17B8 8002A618 8FA50048 */ lw $a1, 0x48($sp) -/* AA17BC 8002A61C 27A40030 */ addiu $a0, $sp, 0x30 -/* AA17C0 8002A620 0C01DF90 */ jal Math_Vec3f_Copy -/* AA17C4 8002A624 8FA5004C */ lw $a1, 0x4c($sp) -/* AA17C8 8002A628 87AE0052 */ lh $t6, 0x52($sp) -/* AA17CC 8002A62C 87AF0056 */ lh $t7, 0x56($sp) -/* AA17D0 8002A630 8FA40040 */ lw $a0, 0x40($sp) -/* AA17D4 8002A634 2405001E */ li $a1, 30 -/* AA17D8 8002A638 24060064 */ li $a2, 100 -/* AA17DC 8002A63C 27A70018 */ addiu $a3, $sp, 0x18 -/* AA17E0 8002A640 A7AE003C */ sh $t6, 0x3c($sp) -/* AA17E4 8002A644 0C009DE6 */ jal EffectSs_Spawn -/* AA17E8 8002A648 A7AF003E */ sh $t7, 0x3e($sp) -/* AA17EC 8002A64C 8FBF0014 */ lw $ra, 0x14($sp) -/* AA17F0 8002A650 27BD0040 */ addiu $sp, $sp, 0x40 -/* AA17F4 8002A654 03E00008 */ jr $ra -/* AA17F8 8002A658 00000000 */ nop - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F36CC.s b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F36CC.s index 92df119284..880d1e2c76 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F36CC.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Dnt_Nomal/func_809F36CC.s @@ -128,7 +128,7 @@ glabel func_809F36CC /* 005CC 809F388C C60A002C */ lwc1 $f10, 0x002C($s0) ## 0000002C /* 005D0 809F3890 AFAA0014 */ sw $t2, 0x0014($sp) /* 005D4 809F3894 AFA90010 */ sw $t1, 0x0010($sp) -/* 005D8 809F3898 0C00A97D */ jal func_8002A5F4 +/* 005D8 809F3898 0C00A97D */ jal EffectSsExtra_Spawn /* 005DC 809F389C E7AA0074 */ swc1 $f10, 0x0074($sp) /* 005E0 809F38A0 0C03E341 */ jal func_800F8D04 /* 005E4 809F38A4 24044807 */ addiu $a0, $zero, 0x4807 ## $a0 = 00004807 @@ -194,7 +194,7 @@ glabel func_809F36CC /* 006CC 809F398C C608002C */ lwc1 $f8, 0x002C($s0) ## 0000002C /* 006D0 809F3990 AFA00014 */ sw $zero, 0x0014($sp) /* 006D4 809F3994 AFA90010 */ sw $t1, 0x0010($sp) -/* 006D8 809F3998 0C00A97D */ jal func_8002A5F4 +/* 006D8 809F3998 0C00A97D */ jal EffectSsExtra_Spawn /* 006DC 809F399C E7A80074 */ swc1 $f8, 0x0074($sp) /* 006E0 809F39A0 A600026C */ sh $zero, 0x026C($s0) ## 0000026C .L809F39A4: diff --git a/asm/non_matchings/overlays/actors/ovl_En_G_Switch/func_80A22250.s b/asm/non_matchings/overlays/actors/ovl_En_G_Switch/func_80A22250.s index 8f0e4d86af..a2c178065a 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_G_Switch/func_80A22250.s +++ b/asm/non_matchings/overlays/actors/ovl_En_G_Switch/func_80A22250.s @@ -82,7 +82,7 @@ glabel func_80A22250 /* 004C4 80A22384 AFAF0010 */ sw $t7, 0x0010($sp) /* 004C8 80A22388 27A60038 */ addiu $a2, $sp, 0x0038 ## $a2 = FFFFFFD0 /* 004CC 80A2238C 27A70044 */ addiu $a3, $sp, 0x0044 ## $a3 = FFFFFFDC -/* 004D0 80A22390 0C00A97D */ jal func_8002A5F4 +/* 004D0 80A22390 0C00A97D */ jal EffectSsExtra_Spawn /* 004D4 80A22394 E7A8003C */ swc1 $f8, 0x003C($sp) /* 004D8 80A22398 86220150 */ lh $v0, 0x0150($s1) ## 00000150 .L80A2239C: diff --git a/asm/non_matchings/overlays/actors/ovl_En_Yabusame_Mark/func_80B42F74.s b/asm/non_matchings/overlays/actors/ovl_En_Yabusame_Mark/func_80B42F74.s index 617909c901..7bb37ee862 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Yabusame_Mark/func_80B42F74.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Yabusame_Mark/func_80B42F74.s @@ -302,7 +302,7 @@ glabel func_80B42F74 /* 00560 80B43320 27A50044 */ addiu $a1, $sp, 0x0044 ## $a1 = FFFFFFDC /* 00564 80B43324 27A60050 */ addiu $a2, $sp, 0x0050 ## $a2 = FFFFFFE8 /* 00568 80B43328 27A7005C */ addiu $a3, $sp, 0x005C ## $a3 = FFFFFFF4 -/* 0056C 80B4332C 0C00A97D */ jal func_8002A5F4 +/* 0056C 80B4332C 0C00A97D */ jal EffectSsExtra_Spawn /* 00570 80B43330 AFA90014 */ sw $t1, 0x0014($sp) .L80B43334: /* 00574 80B43334 8FBF001C */ lw $ra, 0x001C($sp) diff --git a/asm/non_matchings/overlays/effects/ovl_Effect_Ss_Extra/EffectSsExtra_Init.s b/asm/non_matchings/overlays/effects/ovl_Effect_Ss_Extra/EffectSsExtra_Init.s deleted file mode 100644 index c3a7773822..0000000000 --- a/asm/non_matchings/overlays/effects/ovl_Effect_Ss_Extra/EffectSsExtra_Init.s +++ /dev/null @@ -1,83 +0,0 @@ -glabel EffectSsExtra_Init -/* 000000 809A3CC0 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 000004 809A3CC4 3C010001 */ lui $at, (0x000117A4 >> 16) # lui $at, 1 -/* 000008 809A3CC8 AFA40030 */ sw $a0, 0x30($sp) -/* 00000C 809A3CCC 342117A4 */ ori $at, (0x000117A4 & 0xFFFF) # ori $at, $at, 0x17a4 -/* 000010 809A3CD0 AFBF0014 */ sw $ra, 0x14($sp) -/* 000014 809A3CD4 AFA50034 */ sw $a1, 0x34($sp) -/* 000018 809A3CD8 00812021 */ addu $a0, $a0, $at -/* 00001C 809A3CDC AFA4001C */ sw $a0, 0x1c($sp) -/* 000020 809A3CE0 24050117 */ li $a1, 279 -/* 000024 809A3CE4 AFA60038 */ sw $a2, 0x38($sp) -/* 000028 809A3CE8 0C02604B */ jal Object_GetIndex -/* 00002C 809A3CEC AFA7003C */ sw $a3, 0x3c($sp) -/* 000030 809A3CF0 8FA4001C */ lw $a0, 0x1c($sp) -/* 000034 809A3CF4 8FA60038 */ lw $a2, 0x38($sp) -/* 000038 809A3CF8 8FA7003C */ lw $a3, 0x3c($sp) -/* 00003C 809A3CFC 0440003B */ bltz $v0, .L809A3DEC -/* 000040 809A3D00 00402825 */ move $a1, $v0 -/* 000044 809A3D04 AFA20024 */ sw $v0, 0x24($sp) -/* 000048 809A3D08 AFA60038 */ sw $a2, 0x38($sp) -/* 00004C 809A3D0C 0C026062 */ jal Object_IsLoaded -/* 000050 809A3D10 AFA7003C */ sw $a3, 0x3c($sp) -/* 000054 809A3D14 8FA50024 */ lw $a1, 0x24($sp) -/* 000058 809A3D18 8FA60038 */ lw $a2, 0x38($sp) -/* 00005C 809A3D1C 10400033 */ beqz $v0, .L809A3DEC -/* 000060 809A3D20 8FA7003C */ lw $a3, 0x3c($sp) -/* 000064 809A3D24 8FAE0030 */ lw $t6, 0x30($sp) -/* 000068 809A3D28 00057900 */ sll $t7, $a1, 4 -/* 00006C 809A3D2C 01E57821 */ addu $t7, $t7, $a1 -/* 000070 809A3D30 000F7880 */ sll $t7, $t7, 2 -/* 000074 809A3D34 3C190001 */ lui $t9, 1 -/* 000078 809A3D38 01CFC021 */ addu $t8, $t6, $t7 -/* 00007C 809A3D3C 0338C821 */ addu $t9, $t9, $t8 -/* 000080 809A3D40 8F3917B4 */ lw $t9, 0x17b4($t9) -/* 000084 809A3D44 3C048016 */ lui $a0, %hi(gSegments) # $a0, 0x8016 -/* 000088 809A3D48 24846FA8 */ addiu $a0, %lo(gSegments) # addiu $a0, $a0, 0x6fa8 -/* 00008C 809A3D4C 3C018000 */ lui $at, 0x8000 -/* 000090 809A3D50 8C830018 */ lw $v1, 0x18($a0) -/* 000094 809A3D54 03214021 */ addu $t0, $t9, $at -/* 000098 809A3D58 AC880018 */ sw $t0, 0x18($a0) -/* 00009C 809A3D5C 8CEA0000 */ lw $t2, ($a3) -/* 0000A0 809A3D60 3C0F809A */ lui $t7, %hi(func_809A3E00) # $t7, 0x809a -/* 0000A4 809A3D64 3C18809A */ lui $t8, %hi(func_809A3FF8) # $t8, 0x809a -/* 0000A8 809A3D68 ACCA0000 */ sw $t2, ($a2) -/* 0000AC 809A3D6C 8CE90004 */ lw $t1, 4($a3) -/* 0000B0 809A3D70 25EF3E00 */ addiu $t7, %lo(func_809A3E00) # addiu $t7, $t7, 0x3e00 -/* 0000B4 809A3D74 27183FF8 */ addiu $t8, %lo(func_809A3FF8) # addiu $t8, $t8, 0x3ff8 -/* 0000B8 809A3D78 ACC90004 */ sw $t1, 4($a2) -/* 0000BC 809A3D7C 8CEA0008 */ lw $t2, 8($a3) -/* 0000C0 809A3D80 24190032 */ li $t9, 50 -/* 0000C4 809A3D84 24020001 */ li $v0, 1 -/* 0000C8 809A3D88 ACCA0008 */ sw $t2, 8($a2) -/* 0000CC 809A3D8C 8CEC000C */ lw $t4, 0xc($a3) -/* 0000D0 809A3D90 240A0005 */ li $t2, 5 -/* 0000D4 809A3D94 ACCC000C */ sw $t4, 0xc($a2) -/* 0000D8 809A3D98 8CEB0010 */ lw $t3, 0x10($a3) -/* 0000DC 809A3D9C ACCB0010 */ sw $t3, 0x10($a2) -/* 0000E0 809A3DA0 8CEC0014 */ lw $t4, 0x14($a3) -/* 0000E4 809A3DA4 ACCC0014 */ sw $t4, 0x14($a2) -/* 0000E8 809A3DA8 8CEE0018 */ lw $t6, 0x18($a3) -/* 0000EC 809A3DAC ACCE0018 */ sw $t6, 0x18($a2) -/* 0000F0 809A3DB0 8CED001C */ lw $t5, 0x1c($a3) -/* 0000F4 809A3DB4 ACCD001C */ sw $t5, 0x1c($a2) -/* 0000F8 809A3DB8 8CEE0020 */ lw $t6, 0x20($a3) -/* 0000FC 809A3DBC ACCF0028 */ sw $t7, 0x28($a2) -/* 000100 809A3DC0 ACD80024 */ sw $t8, 0x24($a2) -/* 000104 809A3DC4 A4D9005C */ sh $t9, 0x5c($a2) -/* 000108 809A3DC8 ACCE0020 */ sw $t6, 0x20($a2) -/* 00010C 809A3DCC 84E80026 */ lh $t0, 0x26($a3) -/* 000110 809A3DD0 A4C80044 */ sh $t0, 0x44($a2) -/* 000114 809A3DD4 84E90024 */ lh $t1, 0x24($a3) -/* 000118 809A3DD8 A4CA0042 */ sh $t2, 0x42($a2) -/* 00011C 809A3DDC A4C50040 */ sh $a1, 0x40($a2) -/* 000120 809A3DE0 A4C90046 */ sh $t1, 0x46($a2) -/* 000124 809A3DE4 10000002 */ b .L809A3DF0 -/* 000128 809A3DE8 AC830018 */ sw $v1, 0x18($a0) -.L809A3DEC: -/* 00012C 809A3DEC 00001025 */ move $v0, $zero -.L809A3DF0: -/* 000130 809A3DF0 8FBF0014 */ lw $ra, 0x14($sp) -/* 000134 809A3DF4 27BD0030 */ addiu $sp, $sp, 0x30 -/* 000138 809A3DF8 03E00008 */ jr $ra -/* 00013C 809A3DFC 00000000 */ nop diff --git a/asm/non_matchings/overlays/effects/ovl_Effect_Ss_Extra/func_809A3E00.s b/asm/non_matchings/overlays/effects/ovl_Effect_Ss_Extra/func_809A3E00.s deleted file mode 100644 index aef93af9ac..0000000000 --- a/asm/non_matchings/overlays/effects/ovl_Effect_Ss_Extra/func_809A3E00.s +++ /dev/null @@ -1,141 +0,0 @@ -.rdata -glabel D_809A4080 - .asciz "../z_eff_ss_extra.c" - .balign 4 - -glabel D_809A4094 - .asciz "../z_eff_ss_extra.c" - .balign 4 - -glabel D_809A40A8 - .asciz "../z_eff_ss_extra.c" - .balign 4 - -.text -glabel func_809A3E00 -/* 000140 809A3E00 27BDFFA0 */ addiu $sp, $sp, -0x60 -/* 000144 809A3E04 AFBF0024 */ sw $ra, 0x24($sp) -/* 000148 809A3E08 AFB20020 */ sw $s2, 0x20($sp) -/* 00014C 809A3E0C AFB1001C */ sw $s1, 0x1c($sp) -/* 000150 809A3E10 AFB00018 */ sw $s0, 0x18($sp) -/* 000154 809A3E14 AFA50064 */ sw $a1, 0x64($sp) -/* 000158 809A3E18 84CE0046 */ lh $t6, 0x46($a2) -/* 00015C 809A3E1C 3C0142C8 */ li $at, 0x42C80000 # 100.000000 -/* 000160 809A3E20 44814000 */ mtc1 $at, $f8 -/* 000164 809A3E24 448E2000 */ mtc1 $t6, $f4 -/* 000168 809A3E28 3C080001 */ lui $t0, 1 -/* 00016C 809A3E2C 00C08825 */ move $s1, $a2 -/* 000170 809A3E30 468021A0 */ cvt.s.w $f6, $f4 -/* 000174 809A3E34 00809025 */ move $s2, $a0 -/* 000178 809A3E38 240700A8 */ li $a3, 168 -/* 00017C 809A3E3C 46083283 */ div.s $f10, $f6, $f8 -/* 000180 809A3E40 E7AA0058 */ swc1 $f10, 0x58($sp) -/* 000184 809A3E44 84CF0040 */ lh $t7, 0x40($a2) -/* 000188 809A3E48 8C850000 */ lw $a1, ($a0) -/* 00018C 809A3E4C 3C06809A */ lui $a2, %hi(D_809A4080) # $a2, 0x809a -/* 000190 809A3E50 000FC100 */ sll $t8, $t7, 4 -/* 000194 809A3E54 030FC021 */ addu $t8, $t8, $t7 -/* 000198 809A3E58 0018C080 */ sll $t8, $t8, 2 -/* 00019C 809A3E5C 0098C821 */ addu $t9, $a0, $t8 -/* 0001A0 809A3E60 01194021 */ addu $t0, $t0, $t9 -/* 0001A4 809A3E64 8D0817B4 */ lw $t0, 0x17b4($t0) -/* 0001A8 809A3E68 27A40040 */ addiu $a0, $sp, 0x40 -/* 0001AC 809A3E6C 24C64080 */ addiu $a2, %lo(D_809A4080) # addiu $a2, $a2, 0x4080 -/* 0001B0 809A3E70 00A08025 */ move $s0, $a1 -/* 0001B4 809A3E74 0C031AB1 */ jal Graph_OpenDisps -/* 0001B8 809A3E78 AFA80054 */ sw $t0, 0x54($sp) -/* 0001BC 809A3E7C 8FA80054 */ lw $t0, 0x54($sp) -/* 0001C0 809A3E80 3C018000 */ lui $at, 0x8000 -/* 0001C4 809A3E84 3C0BDB06 */ lui $t3, (0xDB060018 >> 16) # lui $t3, 0xdb06 -/* 0001C8 809A3E88 01014821 */ addu $t1, $t0, $at -/* 0001CC 809A3E8C 3C018016 */ lui $at, %hi(gSegments+0x18) # $at, 0x8016 -/* 0001D0 809A3E90 AC296FC0 */ sw $t1, %lo(gSegments+0x18)($at) -/* 0001D4 809A3E94 8E0202D0 */ lw $v0, 0x2d0($s0) -/* 0001D8 809A3E98 356B0018 */ ori $t3, (0xDB060018 & 0xFFFF) # ori $t3, $t3, 0x18 -/* 0001DC 809A3E9C 00003825 */ move $a3, $zero -/* 0001E0 809A3EA0 244A0008 */ addiu $t2, $v0, 8 -/* 0001E4 809A3EA4 AE0A02D0 */ sw $t2, 0x2d0($s0) -/* 0001E8 809A3EA8 AC480004 */ sw $t0, 4($v0) -/* 0001EC 809A3EAC AC4B0000 */ sw $t3, ($v0) -/* 0001F0 809A3EB0 8E260008 */ lw $a2, 8($s1) -/* 0001F4 809A3EB4 C62E0004 */ lwc1 $f14, 4($s1) -/* 0001F8 809A3EB8 0C034261 */ jal Matrix_Translate -/* 0001FC 809A3EBC C62C0000 */ lwc1 $f12, ($s1) -/* 000200 809A3EC0 C7AC0058 */ lwc1 $f12, 0x58($sp) -/* 000204 809A3EC4 24070001 */ li $a3, 1 -/* 000208 809A3EC8 44066000 */ mfc1 $a2, $f12 -/* 00020C 809A3ECC 0C0342A3 */ jal Matrix_Scale -/* 000210 809A3ED0 46006386 */ mov.s $f14, $f12 -/* 000214 809A3ED4 0C024F61 */ jal func_80093D84 -/* 000218 809A3ED8 8E440000 */ lw $a0, ($s2) -/* 00021C 809A3EDC 3C010001 */ lui $at, (0x00011DA0 >> 16) # lui $at, 1 -/* 000220 809A3EE0 34211DA0 */ ori $at, (0x00011DA0 & 0xFFFF) # ori $at, $at, 0x1da0 -/* 000224 809A3EE4 0C0347F5 */ jal func_800D1FD4 -/* 000228 809A3EE8 02412021 */ addu $a0, $s2, $at -/* 00022C 809A3EEC 8E0202D0 */ lw $v0, 0x2d0($s0) -/* 000230 809A3EF0 3C0DDA38 */ lui $t5, (0xDA380003 >> 16) # lui $t5, 0xda38 -/* 000234 809A3EF4 35AD0003 */ ori $t5, (0xDA380003 & 0xFFFF) # ori $t5, $t5, 3 -/* 000238 809A3EF8 244C0008 */ addiu $t4, $v0, 8 -/* 00023C 809A3EFC AE0C02D0 */ sw $t4, 0x2d0($s0) -/* 000240 809A3F00 AC4D0000 */ sw $t5, ($v0) -/* 000244 809A3F04 8E440000 */ lw $a0, ($s2) -/* 000248 809A3F08 3C05809A */ lui $a1, %hi(D_809A4094) # $a1, 0x809a -/* 00024C 809A3F0C 24A54094 */ addiu $a1, %lo(D_809A4094) # addiu $a1, $a1, 0x4094 -/* 000250 809A3F10 240600BA */ li $a2, 186 -/* 000254 809A3F14 0C0346A2 */ jal Matrix_NewMtx -/* 000258 809A3F18 AFA20038 */ sw $v0, 0x38($sp) -/* 00025C 809A3F1C 8FA30038 */ lw $v1, 0x38($sp) -/* 000260 809A3F20 3C0FDB06 */ lui $t7, (0xDB060020 >> 16) # lui $t7, 0xdb06 -/* 000264 809A3F24 35EF0020 */ ori $t7, (0xDB060020 & 0xFFFF) # ori $t7, $t7, 0x20 -/* 000268 809A3F28 AC620004 */ sw $v0, 4($v1) -/* 00026C 809A3F2C 8E0202D0 */ lw $v0, 0x2d0($s0) -/* 000270 809A3F30 3C04809A */ lui $a0, %hi(D_809A4070) -/* 000274 809A3F34 3C078016 */ lui $a3, %hi(gSegments) # $a3, 0x8016 -/* 000278 809A3F38 244E0008 */ addiu $t6, $v0, 8 -/* 00027C 809A3F3C AE0E02D0 */ sw $t6, 0x2d0($s0) -/* 000280 809A3F40 AC4F0000 */ sw $t7, ($v0) -/* 000284 809A3F44 86380044 */ lh $t8, 0x44($s1) -/* 000288 809A3F48 24E76FA8 */ addiu $a3, %lo(gSegments) # addiu $a3, $a3, 0x6fa8 -/* 00028C 809A3F4C 3C0500FF */ lui $a1, (0x00FFFFFF >> 16) # lui $a1, 0xff -/* 000290 809A3F50 0018C880 */ sll $t9, $t8, 2 -/* 000294 809A3F54 00992021 */ addu $a0, $a0, $t9 -/* 000298 809A3F58 8C844070 */ lw $a0, %lo(D_809A4070)($a0) -/* 00029C 809A3F5C 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff -/* 0002A0 809A3F60 3C068000 */ lui $a2, 0x8000 -/* 0002A4 809A3F64 00045100 */ sll $t2, $a0, 4 -/* 0002A8 809A3F68 000A5F02 */ srl $t3, $t2, 0x1c -/* 0002AC 809A3F6C 000B6080 */ sll $t4, $t3, 2 -/* 0002B0 809A3F70 00EC6821 */ addu $t5, $a3, $t4 -/* 0002B4 809A3F74 8DAE0000 */ lw $t6, ($t5) -/* 0002B8 809A3F78 00854824 */ and $t1, $a0, $a1 -/* 0002BC 809A3F7C 3C040600 */ lui $a0, %hi(D_06000DC0) # $a0, 0x600 -/* 0002C0 809A3F80 012E7821 */ addu $t7, $t1, $t6 -/* 0002C4 809A3F84 01E6C021 */ addu $t8, $t7, $a2 -/* 0002C8 809A3F88 AC580004 */ sw $t8, 4($v0) -/* 0002CC 809A3F8C 8E0202D0 */ lw $v0, 0x2d0($s0) -/* 0002D0 809A3F90 24840DC0 */ addiu $a0, %lo(D_06000DC0) # addiu $a0, $a0, 0xdc0 -/* 0002D4 809A3F94 00045900 */ sll $t3, $a0, 4 -/* 0002D8 809A3F98 000B6702 */ srl $t4, $t3, 0x1c -/* 0002DC 809A3F9C 24590008 */ addiu $t9, $v0, 8 -/* 0002E0 809A3FA0 AE1902D0 */ sw $t9, 0x2d0($s0) -/* 0002E4 809A3FA4 000C6880 */ sll $t5, $t4, 2 -/* 0002E8 809A3FA8 3C0ADE00 */ lui $t2, 0xde00 -/* 0002EC 809A3FAC 00ED4821 */ addu $t1, $a3, $t5 -/* 0002F0 809A3FB0 AC4A0000 */ sw $t2, ($v0) -/* 0002F4 809A3FB4 8D2E0000 */ lw $t6, ($t1) -/* 0002F8 809A3FB8 00857824 */ and $t7, $a0, $a1 -/* 0002FC 809A3FBC 27A40040 */ addiu $a0, $sp, 0x40 -/* 000300 809A3FC0 01CFC021 */ addu $t8, $t6, $t7 -/* 000304 809A3FC4 0306C821 */ addu $t9, $t8, $a2 -/* 000308 809A3FC8 3C06809A */ lui $a2, %hi(D_809A40A8) # $a2, 0x809a -/* 00030C 809A3FCC AC590004 */ sw $t9, 4($v0) -/* 000310 809A3FD0 8E450000 */ lw $a1, ($s2) -/* 000314 809A3FD4 24C640A8 */ addiu $a2, %lo(D_809A40A8) # addiu $a2, $a2, 0x40a8 -/* 000318 809A3FD8 0C031AD5 */ jal Graph_CloseDisps -/* 00031C 809A3FDC 240700C2 */ li $a3, 194 -/* 000320 809A3FE0 8FBF0024 */ lw $ra, 0x24($sp) -/* 000324 809A3FE4 8FB00018 */ lw $s0, 0x18($sp) -/* 000328 809A3FE8 8FB1001C */ lw $s1, 0x1c($sp) -/* 00032C 809A3FEC 8FB20020 */ lw $s2, 0x20($sp) -/* 000330 809A3FF0 03E00008 */ jr $ra -/* 000334 809A3FF4 27BD0060 */ addiu $sp, $sp, 0x60 diff --git a/asm/non_matchings/overlays/effects/ovl_Effect_Ss_Extra/func_809A3FF8.s b/asm/non_matchings/overlays/effects/ovl_Effect_Ss_Extra/func_809A3FF8.s deleted file mode 100644 index e5fd50429d..0000000000 --- a/asm/non_matchings/overlays/effects/ovl_Effect_Ss_Extra/func_809A3FF8.s +++ /dev/null @@ -1,30 +0,0 @@ -glabel func_809A3FF8 -/* 00338 809A3FF8 AFA50004 */ sw $a1, 0x0004($sp) -/* 0033C 809A3FFC 84C20042 */ lh $v0, 0x0042($a2) ## 00000042 -/* 00340 809A4000 10400003 */ beq $v0, $zero, .L809A4010 -/* 00344 809A4004 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF -/* 00348 809A4008 10000004 */ beq $zero, $zero, .L809A401C -/* 0034C 809A400C A4CE0042 */ sh $t6, 0x0042($a2) ## 00000042 -.L809A4010: -/* 00350 809A4010 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00 -/* 00354 809A4014 00000000 */ nop -/* 00358 809A4018 E4C40010 */ swc1 $f4, 0x0010($a2) ## 00000010 -.L809A401C: -/* 0035C 809A401C 84CF0042 */ lh $t7, 0x0042($a2) ## 00000042 -/* 00360 809A4020 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 00364 809A4024 15E10009 */ bne $t7, $at, .L809A404C -/* 00368 809A4028 00000000 */ nop -/* 0036C 809A402C 84D80044 */ lh $t8, 0x0044($a2) ## 00000044 -/* 00370 809A4030 3C08809A */ lui $t0, %hi(D_809A4060) ## $t0 = 809A0000 -/* 00374 809A4034 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00378 809A4038 0018C840 */ sll $t9, $t8, 1 -/* 0037C 809A403C 01194021 */ addu $t0, $t0, $t9 -/* 00380 809A4040 85084060 */ lh $t0, %lo(D_809A4060)($t0) -/* 00384 809A4044 00240821 */ addu $at, $at, $a0 -/* 00388 809A4048 A428072C */ sh $t0, 0x072C($at) ## 0001072C -.L809A404C: -/* 0038C 809A404C 03E00008 */ jr $ra -/* 00390 809A4050 00000000 */ nop -/* 00394 809A4054 00000000 */ nop -/* 00398 809A4058 00000000 */ nop -/* 0039C 809A405C 00000000 */ nop diff --git a/data/overlays/effects/z_eff_ss_extra.data.s b/data/overlays/effects/z_eff_ss_extra.data.s deleted file mode 100644 index 3b30419cee..0000000000 --- a/data/overlays/effects/z_eff_ss_extra.data.s +++ /dev/null @@ -1,18 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purpose registers - -.section .data - -.balign 16 - -glabel D_809A4060 - .word 0x001E003C, 0x00640000 -glabel Effect_Ss_Extra_InitVars -.word 0x0000001E -.word EffectSsExtra_Init -glabel D_809A4070 - .word 0x06000000, 0x06000480, 0x06000900, 0x00000000 diff --git a/data/overlays/effects/z_eff_ss_extra.reloc.s b/data/overlays/effects/z_eff_ss_extra.reloc.s deleted file mode 100644 index 7d93ae68cf..0000000000 --- a/data/overlays/effects/z_eff_ss_extra.reloc.s +++ /dev/null @@ -1,13 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purpose registers - -.section .rodata - -.balign 16 - -glabel D_809A40C0 - .incbin "baserom/ovl_Effect_Ss_Extra", 0x400, 0x00000060 diff --git a/include/functions.h b/include/functions.h index b78584d8f1..5709c25b08 100644 --- a/include/functions.h +++ b/include/functions.h @@ -273,7 +273,7 @@ void EffectSsSolderSrchBall_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* v // ? func_8002A3C4(?); // ? func_8002A484(?); // ? func_8002A4D4(?); -// ? func_8002A5F4(?); +void EffectSsExtra_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scoreIdx); void func_8002A65C(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, s16 arg3, s16 arg4); void func_8002A6B8(GlobalContext* globalCtx, Vec3f* pos, Vec3f* arg2, Vec3f* arg3, u32 arg4, s32 arg5, u32 arg6, u32 arg7, u32 arg8, u32 arg9, u32 arg10, u32 arg11, u32 arg12, u32 arg13, u32 arg14, u32 arg15); diff --git a/spec b/spec index 0d1dd451fb..aded6c85ef 100644 --- a/spec +++ b/spec @@ -1778,8 +1778,7 @@ endseg beginseg name "ovl_Effect_Ss_Extra" include "build/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.o" - include "build/data/overlays/effects/z_eff_ss_extra.data.o" - include "build/data/overlays/effects/z_eff_ss_extra.reloc.o" + include "build/src/overlays/effects/ovl_Effect_Ss_Extra/ovl_Effect_Ss_Extra_reloc.o" endseg beginseg diff --git a/src/code/z_effect_soft_sprite_old_init.c b/src/code/z_effect_soft_sprite_old_init.c index 59f281a9fc..86855420df 100644 --- a/src/code/z_effect_soft_sprite_old_init.c +++ b/src/code/z_effect_soft_sprite_old_init.c @@ -4,6 +4,7 @@ #include "overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.h" #include "overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.h" #include "overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.h" +#include "overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.h" #include "overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.h" #include "overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.h" #include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h" @@ -465,7 +466,16 @@ void EffectSsSolderSrchBall_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* v // EffectSsExtra Spawn Functions -#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A5F4.s") +void EffectSsExtra_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scoreIdx) { + EffectSsExtraInitParams initParams; + + Math_Vec3f_Copy(&initParams.pos, pos); + Math_Vec3f_Copy(&initParams.velocity, velocity); + Math_Vec3f_Copy(&initParams.accel, accel); + initParams.scale = scale; + initParams.scoreIdx = scoreIdx; + EffectSs_Spawn(globalCtx, EFFECT_SS_EXTRA, 100, &initParams); +} // EffectSsFCircle Spawn Functions diff --git a/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.c b/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.c index 691c563a33..dd6a54fca1 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.c +++ b/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.c @@ -1,40 +1,87 @@ /* * File: z_eff_ss_extra.c * Overlay: ovl_Effect_Ss_Extra - * Description: + * Description: Minigame Score Points */ #include "z_eff_ss_extra.h" typedef enum { - /* 0x00 */ SS_EXTRA_0, - /* 0x01 */ SS_EXTRA_1, - /* 0x02 */ SS_EXTRA_2, - /* 0x03 */ SS_EXTRA_3, - /* 0x04 */ SS_EXTRA_4, - /* 0x05 */ SS_EXTRA_5, - /* 0x06 */ SS_EXTRA_6, - /* 0x07 */ SS_EXTRA_7, - /* 0x08 */ SS_EXTRA_8, - /* 0x09 */ SS_EXTRA_9, - /* 0x0A */ SS_EXTRA_A, - /* 0x0B */ SS_EXTRA_B, - /* 0x0C */ SS_EXTRA_C, + /* 0x00 */ SS_EXTRA_OBJ_IDX, + /* 0x01 */ SS_EXTRA_TIMER, + /* 0x02 */ SS_EXTRA_SCORE_IDX, + /* 0x03 */ SS_EXTRA_SCALE } EffectSsExtraRegs; u32 EffectSsExtra_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx); void EffectSsExtra_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this); void EffectSsExtra_Update(GlobalContext* globalCtx, u32 index, EffectSs* this); -/* +static s16 sScores[] = { 30, 60, 100 }; + EffectSsInit Effect_Ss_Extra_InitVars = { EFFECT_SS_EXTRA, EffectSsExtra_Init, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_Extra/EffectSsExtra_Init.s") +static UNK_PTR D_809A4070[] = { 0x06000000, 0x06000480, 0x06000900 }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_Extra/func_809A3E00.s") +extern Gfx D_06000DC0[]; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/effects/ovl_Effect_Ss_Extra/func_809A3FF8.s") +u32 EffectSsExtra_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) { + EffectSsExtraInitParams* initParams = (EffectSsExtraInitParams*)initParamsx; + s32 pad; + s32 objBankIndex; + u32 oldSeg6; + + objBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_YABUSAME_POINT); + + if ((objBankIndex >= 0) && Object_IsLoaded(&globalCtx->objectCtx, objBankIndex)) { + oldSeg6 = gSegments[6]; + gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[objBankIndex].segment); + this->pos = initParams->pos; + this->velocity = initParams->velocity; + this->accel = initParams->accel; + this->draw = EffectSsExtra_Draw; + this->update = EffectSsExtra_Update; + this->life = 50; + this->regs[SS_EXTRA_SCORE_IDX] = initParams->scoreIdx; + this->regs[SS_EXTRA_SCALE] = initParams->scale; + this->regs[SS_EXTRA_TIMER] = 5; + this->regs[SS_EXTRA_OBJ_IDX] = objBankIndex; + gSegments[6] = oldSeg6; + return 1; + } + + return 0; +} + +void EffectSsExtra_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { + s32 pad; + f32 scale = this->regs[SS_EXTRA_SCALE] / 100.0f; + void* object = globalCtx->objectCtx.status[this->regs[SS_EXTRA_OBJ_IDX]].segment; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_extra.c", 168); + gSegments[6] = VIRTUAL_TO_PHYSICAL(object); + gSPSegment(oGfxCtx->polyXlu.p++, 0x06, object); + Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW); + Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); + func_80093D84(globalCtx->state.gfxCtx); + func_800D1FD4(&globalCtx->mf_11DA0); + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_ss_extra.c", 186), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(D_809A4070[this->regs[SS_EXTRA_SCORE_IDX]])); + gSPDisplayList(oGfxCtx->polyXlu.p++, SEGMENTED_TO_VIRTUAL(D_06000DC0)); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_extra.c", 194); +} + +void EffectSsExtra_Update(GlobalContext* globalCtx, u32 index, EffectSs* this) { + if (this->regs[SS_EXTRA_TIMER] != 0) { + this->regs[SS_EXTRA_TIMER] -= 1; + } else { + this->velocity.y = 0.0f; + } + if (this->regs[SS_EXTRA_TIMER] == 1) { + globalCtx->interfaceCtx.unk_23C = sScores[this->regs[SS_EXTRA_SCORE_IDX]]; + } +} diff --git a/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.h b/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.h index de35e3c925..1ba601288d 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.h +++ b/src/overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.h @@ -8,6 +8,8 @@ typedef struct { /* 0x00 */ Vec3f pos; /* 0x0C */ Vec3f velocity; /* 0x18 */ Vec3f accel; -} EffectSsExtraInitParams; // size = 0x + /* 0x24 */ s16 scale; + /* 0x26 */ s16 scoreIdx; +} EffectSsExtraInitParams; // size = 0x28 #endif From 612980f90cab73253f83e3f0f9d87bfb08af32e8 Mon Sep 17 00:00:00 2001 From: i82orbom Date: Sat, 5 Sep 2020 00:28:45 +0200 Subject: [PATCH 2/4] Decompiles z_bg_spot01_objects2.c (#357) * Starts z_bg_spot01_objects2 * z_bg_spot01_objects2.c almost finished * Finishes z_bg_spot01_objects2.c * Removes unused asm * PR comments and rebased to master * Addresses PR comments #2 Co-authored-by: i82orbom Co-authored-by: i82orbom --- .../BgSpot01Objects2_Destroy.s | 4 - .../BgSpot01Objects2_Init.s | 92 ------------- .../BgSpot01Objects2_Update.s | 10 -- .../ovl_Bg_Spot01_Objects2/func_808AC22C.s | 37 ----- .../ovl_Bg_Spot01_Objects2/func_808AC2BC.s | 130 ------------------ .../ovl_Bg_Spot01_Objects2/func_808AC474.s | 4 - .../ovl_Bg_Spot01_Objects2/func_808AC4A4.s | 17 --- .../actors/z_bg_spot01_objects2.data.s | 22 --- .../actors/z_bg_spot01_objects2.reloc.s | 13 -- spec | 3 +- .../z_bg_spot01_objects2.c | 115 ++++++++++++++-- .../z_bg_spot01_objects2.h | 5 +- undefined_syms.txt | 4 + 13 files changed, 111 insertions(+), 345 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/BgSpot01Objects2_Destroy.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/BgSpot01Objects2_Init.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/BgSpot01Objects2_Update.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC22C.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC2BC.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC474.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC4A4.s delete mode 100644 data/overlays/actors/z_bg_spot01_objects2.data.s delete mode 100644 data/overlays/actors/z_bg_spot01_objects2.reloc.s diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/BgSpot01Objects2_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/BgSpot01Objects2_Destroy.s deleted file mode 100644 index af8ebfeb09..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/BgSpot01Objects2_Destroy.s +++ /dev/null @@ -1,4 +0,0 @@ -glabel BgSpot01Objects2_Destroy -/* 000E0 808AC220 AFA40000 */ sw $a0, 0x0000($sp) -/* 000E4 808AC224 03E00008 */ jr $ra -/* 000E8 808AC228 AFA50004 */ sw $a1, 0x0004($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/BgSpot01Objects2_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/BgSpot01Objects2_Init.s deleted file mode 100644 index a3740aaf3e..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/BgSpot01Objects2_Init.s +++ /dev/null @@ -1,92 +0,0 @@ -.rdata -glabel D_808AC530 - .asciz "-----------------------------バンク設定ありませんでした." - .balign 4 - - -.late_rodata -glabel jtbl_808AC58C -.word L808AC17C -.word L808AC17C -.word L808AC17C -.word L808AC188 -.word L808AC194 - -glabel jtbl_808AC5A0 -.word L808AC448 -.word L808AC448 -.word L808AC448 -.word L808AC394 -.word L808AC368 -.word 0x00000000, 0x00000000, 0x00000000 - -.text -glabel BgSpot01Objects2_Init -/* 00000 808AC140 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00004 808AC144 AFBF001C */ sw $ra, 0x001C($sp) -/* 00008 808AC148 AFB00018 */ sw $s0, 0x0018($sp) -/* 0000C 808AC14C 848E001C */ lh $t6, 0x001C($a0) ## 0000001C -/* 00010 808AC150 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00014 808AC154 00A03025 */ or $a2, $a1, $zero ## $a2 = 00000000 -/* 00018 808AC158 31CF0007 */ andi $t7, $t6, 0x0007 ## $t7 = 00000000 -/* 0001C 808AC15C 2DE10005 */ sltiu $at, $t7, 0x0005 -/* 00020 808AC160 1020000E */ beq $at, $zero, .L808AC19C -/* 00024 808AC164 000F7880 */ sll $t7, $t7, 2 -/* 00028 808AC168 3C01808B */ lui $at, %hi(jtbl_808AC58C) ## $at = 808B0000 -/* 0002C 808AC16C 002F0821 */ addu $at, $at, $t7 -/* 00030 808AC170 8C2FC58C */ lw $t7, %lo(jtbl_808AC58C)($at) -/* 00034 808AC174 01E00008 */ jr $t7 -/* 00038 808AC178 00000000 */ nop -glabel L808AC17C -/* 0003C 808AC17C 24180180 */ addiu $t8, $zero, 0x0180 ## $t8 = 00000180 -/* 00040 808AC180 10000006 */ beq $zero, $zero, .L808AC19C -/* 00044 808AC184 AE180178 */ sw $t8, 0x0178($s0) ## 00000178 -glabel L808AC188 -/* 00048 808AC188 24190181 */ addiu $t9, $zero, 0x0181 ## $t9 = 00000181 -/* 0004C 808AC18C 10000003 */ beq $zero, $zero, .L808AC19C -/* 00050 808AC190 AE190178 */ sw $t9, 0x0178($s0) ## 00000178 -glabel L808AC194 -/* 00054 808AC194 24080180 */ addiu $t0, $zero, 0x0180 ## $t0 = 00000180 -/* 00058 808AC198 AE080178 */ sw $t0, 0x0178($s0) ## 00000178 -.L808AC19C: -/* 0005C 808AC19C 8E020178 */ lw $v0, 0x0178($s0) ## 00000178 -/* 00060 808AC1A0 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00064 808AC1A4 342117A4 */ ori $at, $at, 0x17A4 ## $at = 000117A4 -/* 00068 808AC1A8 0440000F */ bltz $v0, .L808AC1E8 -/* 0006C 808AC1AC 00C12021 */ addu $a0, $a2, $at -/* 00070 808AC1B0 00022C00 */ sll $a1, $v0, 16 -/* 00074 808AC1B4 0C02604B */ jal Object_GetIndex - ## ObjectIndex -/* 00078 808AC1B8 00052C03 */ sra $a1, $a1, 16 -/* 0007C 808AC1BC A202017C */ sb $v0, 0x017C($s0) ## 0000017C -/* 00080 808AC1C0 8209017C */ lb $t1, 0x017C($s0) ## 0000017C -/* 00084 808AC1C4 3C04808B */ lui $a0, %hi(D_808AC530) ## $a0 = 808B0000 -/* 00088 808AC1C8 05210009 */ bgez $t1, .L808AC1F0 -/* 0008C 808AC1CC 00000000 */ nop -/* 00090 808AC1D0 0C00084C */ jal osSyncPrintf - -/* 00094 808AC1D4 2484C530 */ addiu $a0, $a0, %lo(D_808AC530) ## $a0 = 808AC530 -/* 00098 808AC1D8 0C00B55C */ jal Actor_Kill - -/* 0009C 808AC1DC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 000A0 808AC1E0 1000000B */ beq $zero, $zero, .L808AC210 -/* 000A4 808AC1E4 8FBF001C */ lw $ra, 0x001C($sp) -.L808AC1E8: -/* 000A8 808AC1E8 0C00B55C */ jal Actor_Kill - -/* 000AC 808AC1EC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -.L808AC1F0: -/* 000B0 808AC1F0 3C0A808B */ lui $t2, %hi(func_808AC2BC) ## $t2 = 808B0000 -/* 000B4 808AC1F4 254AC2BC */ addiu $t2, $t2, %lo(func_808AC2BC) ## $t2 = 808AC2BC -/* 000B8 808AC1F8 3C05808B */ lui $a1, %hi(D_808AC500) ## $a1 = 808B0000 -/* 000BC 808AC1FC AE0A0164 */ sw $t2, 0x0164($s0) ## 00000164 -/* 000C0 808AC200 24A5C500 */ addiu $a1, $a1, %lo(D_808AC500) ## $a1 = 808AC500 -/* 000C4 808AC204 0C01E037 */ jal Actor_ProcessInitChain - -/* 000C8 808AC208 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 000CC 808AC20C 8FBF001C */ lw $ra, 0x001C($sp) -.L808AC210: -/* 000D0 808AC210 8FB00018 */ lw $s0, 0x0018($sp) -/* 000D4 808AC214 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 000D8 808AC218 03E00008 */ jr $ra -/* 000DC 808AC21C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/BgSpot01Objects2_Update.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/BgSpot01Objects2_Update.s deleted file mode 100644 index 90e14b3884..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/BgSpot01Objects2_Update.s +++ /dev/null @@ -1,10 +0,0 @@ -glabel BgSpot01Objects2_Update -/* 00340 808AC480 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00344 808AC484 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00348 808AC488 8C990164 */ lw $t9, 0x0164($a0) ## 00000164 -/* 0034C 808AC48C 0320F809 */ jalr $ra, $t9 -/* 00350 808AC490 00000000 */ nop -/* 00354 808AC494 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00358 808AC498 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 0035C 808AC49C 03E00008 */ jr $ra -/* 00360 808AC4A0 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC22C.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC22C.s deleted file mode 100644 index 59d41af124..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC22C.s +++ /dev/null @@ -1,37 +0,0 @@ -glabel func_808AC22C -/* 000EC 808AC22C 000670C0 */ sll $t6, $a2, 3 -/* 000F0 808AC230 008E7821 */ addu $t7, $a0, $t6 -/* 000F4 808AC234 8DE80004 */ lw $t0, 0x0004($t7) ## 00000004 -/* 000F8 808AC238 3C0A8016 */ lui $t2, %hi(gSegments) -/* 000FC 808AC23C 3C0100FF */ lui $at, 0x00FF ## $at = 00FF0000 -/* 00100 808AC240 0008C100 */ sll $t8, $t0, 4 -/* 00104 808AC244 0018CF02 */ srl $t9, $t8, 28 -/* 00108 808AC248 00194880 */ sll $t1, $t9, 2 -/* 0010C 808AC24C 01495021 */ addu $t2, $t2, $t1 -/* 00110 808AC250 8D4A6FA8 */ lw $t2, %lo(gSegments)($t2) -/* 00114 808AC254 3421FFFF */ ori $at, $at, 0xFFFF ## $at = 00FFFFFF -/* 00118 808AC258 00076880 */ sll $t5, $a3, 2 -/* 0011C 808AC25C 01A76823 */ subu $t5, $t5, $a3 -/* 00120 808AC260 01015824 */ and $t3, $t0, $at -/* 00124 808AC264 000D6840 */ sll $t5, $t5, 1 -/* 00128 808AC268 014B6021 */ addu $t4, $t2, $t3 -/* 0012C 808AC26C 018D1821 */ addu $v1, $t4, $t5 -/* 00130 808AC270 3C018000 */ lui $at, 0x8000 ## $at = 80000000 -/* 00134 808AC274 00611821 */ addu $v1, $v1, $at -/* 00138 808AC278 846E0000 */ lh $t6, 0x0000($v1) ## 00000000 -/* 0013C 808AC27C 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -/* 00140 808AC280 448E2000 */ mtc1 $t6, $f4 ## $f4 = 0.00 -/* 00144 808AC284 00000000 */ nop -/* 00148 808AC288 468021A0 */ cvt.s.w $f6, $f4 -/* 0014C 808AC28C E4A60000 */ swc1 $f6, 0x0000($a1) ## 00000000 -/* 00150 808AC290 846F0002 */ lh $t7, 0x0002($v1) ## 00000002 -/* 00154 808AC294 448F4000 */ mtc1 $t7, $f8 ## $f8 = 0.00 -/* 00158 808AC298 00000000 */ nop -/* 0015C 808AC29C 468042A0 */ cvt.s.w $f10, $f8 -/* 00160 808AC2A0 E4AA0004 */ swc1 $f10, 0x0004($a1) ## 00000004 -/* 00164 808AC2A4 84780004 */ lh $t8, 0x0004($v1) ## 00000004 -/* 00168 808AC2A8 44988000 */ mtc1 $t8, $f16 ## $f16 = 0.00 -/* 0016C 808AC2AC 00000000 */ nop -/* 00170 808AC2B0 468084A0 */ cvt.s.w $f18, $f16 -/* 00174 808AC2B4 03E00008 */ jr $ra -/* 00178 808AC2B8 E4B20008 */ swc1 $f18, 0x0008($a1) ## 00000008 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC2BC.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC2BC.s deleted file mode 100644 index 5675736577..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC2BC.s +++ /dev/null @@ -1,130 +0,0 @@ -.rdata -glabel D_808AC56C - .asciz "-----バンク切り換え成功!!\n" - .balign 4 - -.text -glabel func_808AC2BC -/* 0017C 808AC2BC 27BDFFA8 */ addiu $sp, $sp, 0xFFA8 ## $sp = FFFFFFA8 -/* 00180 808AC2C0 AFB00034 */ sw $s0, 0x0034($sp) -/* 00184 808AC2C4 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00188 808AC2C8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 0018C 808AC2CC AFB10038 */ sw $s1, 0x0038($sp) -/* 00190 808AC2D0 342117A4 */ ori $at, $at, 0x17A4 ## $at = 000117A4 -/* 00194 808AC2D4 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 00198 808AC2D8 AFBF003C */ sw $ra, 0x003C($sp) -/* 0019C 808AC2DC AFA00054 */ sw $zero, 0x0054($sp) -/* 001A0 808AC2E0 00A12021 */ addu $a0, $a1, $at -/* 001A4 808AC2E4 0C026062 */ jal Object_IsLoaded - -/* 001A8 808AC2E8 8205017C */ lb $a1, 0x017C($s0) ## 0000017C -/* 001AC 808AC2EC 1040005C */ beq $v0, $zero, .L808AC460 -/* 001B0 808AC2F0 3C04808B */ lui $a0, %hi(D_808AC56C) ## $a0 = 808B0000 -/* 001B4 808AC2F4 0C00084C */ jal osSyncPrintf - -/* 001B8 808AC2F8 2484C56C */ addiu $a0, $a0, %lo(D_808AC56C) ## $a0 = 808AC56C -/* 001BC 808AC2FC 820E017C */ lb $t6, 0x017C($s0) ## 0000017C -/* 001C0 808AC300 3C190001 */ lui $t9, 0x0001 ## $t9 = 00010000 -/* 001C4 808AC304 3C018000 */ lui $at, 0x8000 ## $at = 80000000 -/* 001C8 808AC308 000E7900 */ sll $t7, $t6, 4 -/* 001CC 808AC30C 01EE7821 */ addu $t7, $t7, $t6 -/* 001D0 808AC310 000F7880 */ sll $t7, $t7, 2 -/* 001D4 808AC314 022FC021 */ addu $t8, $s1, $t7 -/* 001D8 808AC318 0338C821 */ addu $t9, $t9, $t8 -/* 001DC 808AC31C 8F3917B4 */ lw $t9, 0x17B4($t9) ## 000117B4 -/* 001E0 808AC320 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 001E4 808AC324 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 -/* 001E8 808AC328 03214021 */ addu $t0, $t9, $at -/* 001EC 808AC32C 3C018016 */ lui $at, %hi(gSegments+0x18) -/* 001F0 808AC330 AC286FC0 */ sw $t0, %lo(gSegments+0x18)($at) -/* 001F4 808AC334 8209017C */ lb $t1, 0x017C($s0) ## 0000017C -/* 001F8 808AC338 0C010D20 */ jal DynaPolyInfo_SetActorMove - -/* 001FC 808AC33C A209001E */ sb $t1, 0x001E($s0) ## 0000001E -/* 00200 808AC340 860A001C */ lh $t2, 0x001C($s0) ## 0000001C -/* 00204 808AC344 314B0007 */ andi $t3, $t2, 0x0007 ## $t3 = 00000000 -/* 00208 808AC348 2D610005 */ sltiu $at, $t3, 0x0005 -/* 0020C 808AC34C 1020003E */ beq $at, $zero, .L808AC448 -/* 00210 808AC350 000B5880 */ sll $t3, $t3, 2 -/* 00214 808AC354 3C01808B */ lui $at, %hi(jtbl_808AC5A0) ## $at = 808B0000 -/* 00218 808AC358 002B0821 */ addu $at, $at, $t3 -/* 0021C 808AC35C 8C2BC5A0 */ lw $t3, %lo(jtbl_808AC5A0)($at) -/* 00220 808AC360 01600008 */ jr $t3 -/* 00224 808AC364 00000000 */ nop -glabel L808AC368 -/* 00228 808AC368 3C040600 */ lui $a0, 0x0600 ## $a0 = 06000000 -/* 0022C 808AC36C 24841A38 */ addiu $a0, $a0, 0x1A38 ## $a0 = 06001A38 -/* 00230 808AC370 0C010620 */ jal DynaPolyInfo_Alloc - -/* 00234 808AC374 27A50054 */ addiu $a1, $sp, 0x0054 ## $a1 = FFFFFFFC -/* 00238 808AC378 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 0023C 808AC37C 26250810 */ addiu $a1, $s1, 0x0810 ## $a1 = 00000810 -/* 00240 808AC380 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 00244 808AC384 0C00FA9D */ jal DynaPolyInfo_RegisterActor - ## DynaPolyInfo_setActor -/* 00248 808AC388 8FA70054 */ lw $a3, 0x0054($sp) -/* 0024C 808AC38C 1000002E */ beq $zero, $zero, .L808AC448 -/* 00250 808AC390 AE02014C */ sw $v0, 0x014C($s0) ## 0000014C -glabel L808AC394 -/* 00254 808AC394 3C040600 */ lui $a0, 0x0600 ## $a0 = 06000000 -/* 00258 808AC398 24841C58 */ addiu $a0, $a0, 0x1C58 ## $a0 = 06001C58 -/* 0025C 808AC39C 0C010620 */ jal DynaPolyInfo_Alloc - -/* 00260 808AC3A0 27A50054 */ addiu $a1, $sp, 0x0054 ## $a1 = FFFFFFFC -/* 00264 808AC3A4 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00268 808AC3A8 26250810 */ addiu $a1, $s1, 0x0810 ## $a1 = 00000810 -/* 0026C 808AC3AC 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 00270 808AC3B0 0C00FA9D */ jal DynaPolyInfo_RegisterActor - ## DynaPolyInfo_setActor -/* 00274 808AC3B4 8FA70054 */ lw $a3, 0x0054($sp) -/* 00278 808AC3B8 AE02014C */ sw $v0, 0x014C($s0) ## 0000014C -/* 0027C 808AC3BC 3C0C8016 */ lui $t4, %hi(gSaveContext+0x10) -/* 00280 808AC3C0 8D8CE670 */ lw $t4, %lo(gSaveContext+0x10)($t4) -/* 00284 808AC3C4 3C040001 */ lui $a0, 0x0001 ## $a0 = 00010000 -/* 00288 808AC3C8 00912021 */ addu $a0, $a0, $s1 -/* 0028C 808AC3CC 1580001E */ bne $t4, $zero, .L808AC448 -/* 00290 808AC3D0 27A50040 */ addiu $a1, $sp, 0x0040 ## $a1 = FFFFFFE8 -/* 00294 808AC3D4 8606001C */ lh $a2, 0x001C($s0) ## 0000001C -/* 00298 808AC3D8 8C841E08 */ lw $a0, 0x1E08($a0) ## 00011E08 -/* 0029C 808AC3DC 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 002A0 808AC3E0 00063203 */ sra $a2, $a2, 8 -/* 002A4 808AC3E4 0C22B08B */ jal func_808AC22C -/* 002A8 808AC3E8 30C600FF */ andi $a2, $a2, 0x00FF ## $a2 = 00000000 -/* 002AC 808AC3EC C7A40040 */ lwc1 $f4, 0x0040($sp) -/* 002B0 808AC3F0 C7A60044 */ lwc1 $f6, 0x0044($sp) -/* 002B4 808AC3F4 C7A80048 */ lwc1 $f8, 0x0048($sp) -/* 002B8 808AC3F8 E7A40010 */ swc1 $f4, 0x0010($sp) -/* 002BC 808AC3FC E7A60014 */ swc1 $f6, 0x0014($sp) -/* 002C0 808AC400 E7A80018 */ swc1 $f8, 0x0018($sp) -/* 002C4 808AC404 860D0030 */ lh $t5, 0x0030($s0) ## 00000030 -/* 002C8 808AC408 26241C24 */ addiu $a0, $s1, 0x1C24 ## $a0 = 00001C24 -/* 002CC 808AC40C 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 002D0 808AC410 AFAD001C */ sw $t5, 0x001C($sp) -/* 002D4 808AC414 860E0032 */ lh $t6, 0x0032($s0) ## 00000032 -/* 002D8 808AC418 02203025 */ or $a2, $s1, $zero ## $a2 = 00000000 -/* 002DC 808AC41C 240701BC */ addiu $a3, $zero, 0x01BC ## $a3 = 000001BC -/* 002E0 808AC420 AFAE0020 */ sw $t6, 0x0020($sp) -/* 002E4 808AC424 860F0034 */ lh $t7, 0x0034($s0) ## 00000034 -/* 002E8 808AC428 AFAF0024 */ sw $t7, 0x0024($sp) -/* 002EC 808AC42C 8618001C */ lh $t8, 0x001C($s0) ## 0000001C -/* 002F0 808AC430 0018CA03 */ sra $t9, $t8, 8 -/* 002F4 808AC434 332800FF */ andi $t0, $t9, 0x00FF ## $t0 = 00000000 -/* 002F8 808AC438 00084A00 */ sll $t1, $t0, 8 -/* 002FC 808AC43C 252A0001 */ addiu $t2, $t1, 0x0001 ## $t2 = 00000001 -/* 00300 808AC440 0C00C916 */ jal Actor_SpawnAsChild - -/* 00304 808AC444 AFAA0028 */ sw $t2, 0x0028($sp) -glabel L808AC448 -.L808AC448: -/* 00308 808AC448 3C0B808B */ lui $t3, %hi(func_808AC4A4) ## $t3 = 808B0000 -/* 0030C 808AC44C 3C0C808B */ lui $t4, %hi(func_808AC474) ## $t4 = 808B0000 -/* 00310 808AC450 256BC4A4 */ addiu $t3, $t3, %lo(func_808AC4A4) ## $t3 = 808AC4A4 -/* 00314 808AC454 258CC474 */ addiu $t4, $t4, %lo(func_808AC474) ## $t4 = 808AC474 -/* 00318 808AC458 AE0B0134 */ sw $t3, 0x0134($s0) ## 00000134 -/* 0031C 808AC45C AE0C0164 */ sw $t4, 0x0164($s0) ## 00000164 -.L808AC460: -/* 00320 808AC460 8FBF003C */ lw $ra, 0x003C($sp) -/* 00324 808AC464 8FB00034 */ lw $s0, 0x0034($sp) -/* 00328 808AC468 8FB10038 */ lw $s1, 0x0038($sp) -/* 0032C 808AC46C 03E00008 */ jr $ra -/* 00330 808AC470 27BD0058 */ addiu $sp, $sp, 0x0058 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC474.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC474.s deleted file mode 100644 index 96054b4529..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC474.s +++ /dev/null @@ -1,4 +0,0 @@ -glabel func_808AC474 -/* 00334 808AC474 AFA40000 */ sw $a0, 0x0000($sp) -/* 00338 808AC478 03E00008 */ jr $ra -/* 0033C 808AC47C AFA50004 */ sw $a1, 0x0004($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC4A4.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC4A4.s deleted file mode 100644 index a2c6e5892d..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC4A4.s +++ /dev/null @@ -1,17 +0,0 @@ -glabel func_808AC4A4 -/* 00364 808AC4A4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00368 808AC4A8 AFBF0014 */ sw $ra, 0x0014($sp) -/* 0036C 808AC4AC 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000 -/* 00370 808AC4B0 84EE001C */ lh $t6, 0x001C($a3) ## 0000001C -/* 00374 808AC4B4 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00378 808AC4B8 3C05808B */ lui $a1, %hi(D_808AC510) ## $a1 = 808B0000 -/* 0037C 808AC4BC 31CF0007 */ andi $t7, $t6, 0x0007 ## $t7 = 00000000 -/* 00380 808AC4C0 000FC080 */ sll $t8, $t7, 2 -/* 00384 808AC4C4 00B82821 */ addu $a1, $a1, $t8 -/* 00388 808AC4C8 0C00D498 */ jal Gfx_DrawDListOpa - -/* 0038C 808AC4CC 8CA5C510 */ lw $a1, %lo(D_808AC510)($a1) -/* 00390 808AC4D0 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00394 808AC4D4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00398 808AC4D8 03E00008 */ jr $ra -/* 0039C 808AC4DC 00000000 */ nop diff --git a/data/overlays/actors/z_bg_spot01_objects2.data.s b/data/overlays/actors/z_bg_spot01_objects2.data.s deleted file mode 100644 index 96cf1dbe05..0000000000 --- a/data/overlays/actors/z_bg_spot01_objects2.data.s +++ /dev/null @@ -1,22 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purpose registers - -.section .data - -.balign 16 - -glabel Bg_Spot01_Objects2_InitVars - .word 0x019D0100, 0x00000010, 0x00010000, 0x00000180 -.word BgSpot01Objects2_Init -.word BgSpot01Objects2_Destroy -.word BgSpot01Objects2_Update -.word 0x00000000 -glabel D_808AC500 - .word 0xB0F43200, 0xB0F807D0, 0xB0FC05DC, 0x48500064 -glabel D_808AC510 - .word 0x06001EB0, 0x06002780, 0x06003078, 0x06001228, 0x06001528, 0x00000000, 0x00000000, 0x00000000 - diff --git a/data/overlays/actors/z_bg_spot01_objects2.reloc.s b/data/overlays/actors/z_bg_spot01_objects2.reloc.s deleted file mode 100644 index 8bab4f37c5..0000000000 --- a/data/overlays/actors/z_bg_spot01_objects2.reloc.s +++ /dev/null @@ -1,13 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purpose registers - -.section .rodata - -.balign 16 - -glabel D_808AC5C0 - .incbin "baserom/ovl_Bg_Spot01_Objects2", 0x480, 0x000000A0 diff --git a/spec b/spec index aded6c85ef..a3dcafed8e 100644 --- a/spec +++ b/spec @@ -1229,8 +1229,7 @@ endseg beginseg name "ovl_Bg_Spot01_Objects2" include "build/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.o" - include "build/data/overlays/actors/z_bg_spot01_objects2.data.o" - include "build/data/overlays/actors/z_bg_spot01_objects2.reloc.o" + include "build/src/overlays/actors/ovl_Bg_Spot01_Objects2/ovl_Bg_Spot01_Objects2_reloc.o" endseg beginseg diff --git a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c index d9dddc98a6..b284edd1e7 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c @@ -14,12 +14,10 @@ void BgSpot01Objects2_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Objects2_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Objects2_Update(Actor* thisx, GlobalContext* globalCtx); -// func_808AC22C void func_808AC2BC(BgSpot01Objects2* this, GlobalContext* globalCtx); void func_808AC474(BgSpot01Objects2* this, GlobalContext* globalCtx); -void func_808AC4A4(BgSpot01Objects2* this, GlobalContext* globalCtx); +void func_808AC4A4(Actor* thisx, GlobalContext* globalCtx); -/* const ActorInit Bg_Spot01_Objects2_InitVars = { ACTOR_BG_SPOT01_OBJECTS2, ACTORTYPE_BG, @@ -31,17 +29,112 @@ const ActorInit Bg_Spot01_Objects2_InitVars = { (ActorFunc)BgSpot01Objects2_Update, NULL, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/BgSpot01Objects2_Init.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/BgSpot01Objects2_Destroy.s") +static InitChainEntry sInitChain[] = { + ICHAIN_F32(uncullZoneForward, 12800, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneScale, 2000, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneDownward, 1500, ICHAIN_CONTINUE), + ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC22C.s") +Gfx* D_808AC510[] = { 0x06001EB0, 0x06002780, 0x06003078, 0x06001228, 0x06001528 }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC2BC.s") +extern UNK_TYPE D_06001A38; +extern UNK_TYPE D_06001C58; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC474.s") +void BgSpot01Objects2_Init(Actor* thisx, GlobalContext* globalCtx) { + BgSpot01Objects2* this = THIS; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/BgSpot01Objects2_Update.s") + switch (this->dyna.actor.params & 7) { + case 0: + case 1: + case 2: + this->objectId = OBJECT_SPOT01_MATOYA; + break; + case 3: + this->objectId = OBJECT_SPOT01_MATOYAB; + break; + case 4: + this->objectId = OBJECT_SPOT01_MATOYA; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot01_Objects2/func_808AC4A4.s") + if (this->objectId >= 0) { + this->objBankIndex = Object_GetIndex(&globalCtx->objectCtx, this->objectId); + if (this->objBankIndex < 0) { + // There was no bank setting. + osSyncPrintf("-----------------------------バンク設定ありませんでした."); + Actor_Kill(&this->dyna.actor); + return; + } + } else { + Actor_Kill(&this->dyna.actor); + } + this->actionFunc = func_808AC2BC; + Actor_ProcessInitChain(&this->dyna.actor, sInitChain); +} + +void BgSpot01Objects2_Destroy(Actor* thisx, GlobalContext* globalCtx) { +} + +s32 func_808AC22C(Path* pathList, Vec3f* pos, s32 path, s32 waypoint) { + Vec3s* pointPos = &((Vec3s*)SEGMENTED_TO_VIRTUAL((pathList + path)->points))[waypoint]; + + pos->x = pointPos->x; + pos->y = pointPos->y; + pos->z = pointPos->z; + return 0; +} + +void func_808AC2BC(BgSpot01Objects2* this, GlobalContext* globalCtx) { + s32 sp54; + Actor* thisx = &this->dyna.actor; + s32 pad; + Vec3f position; + + sp54 = 0; + if (Object_IsLoaded(&globalCtx->objectCtx, this->objBankIndex)) { + // ---- Successful bank switching!! + osSyncPrintf("-----バンク切り換え成功!!\n"); + gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->objBankIndex].segment); + + this->dyna.actor.objBankIndex = this->objBankIndex; + DynaPolyInfo_SetActorMove(&this->dyna, DPM_PLAYER); + + switch (this->dyna.actor.params & 7) { + case 4: // Shooting gallery + DynaPolyInfo_Alloc(&D_06001A38, &sp54); + this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, sp54); + break; + case 3: // Shooting Gallery, spawns Carpenter Sabooro during the day + DynaPolyInfo_Alloc(&D_06001C58, &sp54); + this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, sp54); + if (gSaveContext.nightFlag == 0) { + func_808AC22C(globalCtx->setupPathList, &position, ((s32)thisx->params >> 8) & 0xFF, 0); + Actor_SpawnAsChild(&globalCtx->actorCtx, thisx, globalCtx, ACTOR_EN_DAIKU_KAKARIKO, position.x, + position.y, position.z, thisx->posRot.rot.x, thisx->posRot.rot.y, + thisx->posRot.rot.z, ((((s32)thisx->params >> 8) & 0xFF) << 8) + 1); + } + break; + case 0: // Potion Shop Poster + case 1: // Shooting gallery Poster + case 2: // Bazaar Poster + break; + } + + this->dyna.actor.draw = func_808AC4A4; + this->actionFunc = func_808AC474; + } +} + +void func_808AC474(BgSpot01Objects2* this, GlobalContext* globalCtx) { +} + +void BgSpot01Objects2_Update(Actor* thisx, GlobalContext* globalCtx) { + BgSpot01Objects2* this = THIS; + + this->actionFunc(this, globalCtx); +} + +void func_808AC4A4(Actor* thisx, GlobalContext* globalCtx) { + Gfx_DrawDListOpa(globalCtx, D_808AC510[thisx->params & 7]); +} diff --git a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.h b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.h index 436d2ab482..f19ff5e22a 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.h +++ b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.h @@ -9,12 +9,11 @@ struct BgSpot01Objects2; typedef void (*BgSpot01Objects2ActionFunc)(struct BgSpot01Objects2*, GlobalContext*); typedef struct BgSpot01Objects2 { - /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x18]; + /* 0x0000 */ DynaPolyActor dyna; /* 0x0164 */ BgSpot01Objects2ActionFunc actionFunc; /* 0x0168 */ char unk_168[0x10]; /* 0x0178 */ s32 objectId; - /* 0x0179 */ char unk_179[0x4]; + /* 0x017C */ s8 objBankIndex; } BgSpot01Objects2; // size = 0x0180 extern const ActorInit Bg_Spot01_Objects2_InitVars; diff --git a/undefined_syms.txt b/undefined_syms.txt index c302bae50e..644671f925 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -162,6 +162,10 @@ D_06007888 = 0x06007888; // z_bg_spot01_idomizu D_060007D0 = 0x060007D0; +// z_bg_spot01_objects2 +D_06001A38 = 0x06001A38; +D_06001C58 = 0x06001C58; + // z_bg_spot09_obj D_06008010 = 0x06008010; From bb1aacbd0b5cf2b4afd51da772c2ecf7a864e6d1 Mon Sep 17 00:00:00 2001 From: fig02 Date: Sat, 5 Sep 2020 09:45:10 -0400 Subject: [PATCH 3/4] z_lights.c OK (#343) * rename some structs * changes * rename stuff and start a func * progress * progress * progress * remove unwanted file * progress * match last few funcs * done, i think * small changes * match Lights_Draw (thanks krim) * comments * cleanup * most pr suggestions * name changes * rename --- .../code/z_actor/func_8002FBAC.s | 2 +- .../code/z_kankyo/func_8006F0FC.s | 2 +- .../code/z_kankyo/func_8006F140.s | 8 +- .../code/z_kankyo/func_80075F14.s | 8 +- .../code/z_kankyo/func_800760F4.s | 4 +- .../code/z_kankyo/func_800763A8.s | 8 +- .../code/z_lights/func_80079EFC.s | 114 ----- .../code/z_lights/func_8007A0B4.s | 232 ---------- .../code/z_lights/func_8007A474.s | 43 -- .../code/z_lights/func_8007A824.s | 84 ---- .../code/z_lights/func_8007A960.s | 23 - .../code/z_lights/func_8007A9B4.s | 140 ------ .../code/z_lights/func_8007ABBC.s | 168 ------- asm/non_matchings/code/z_play/Gameplay_Draw.s | 6 +- .../ovl_Bg_Po_Syokudai/BgPoSyokudai_Destroy.s | 2 +- .../ovl_Bg_Po_Syokudai/BgPoSyokudai_Draw.s | 2 +- .../ovl_Bg_Po_Syokudai/BgPoSyokudai_Init.s | 4 +- .../BgSpot00Hanebasi_Destroy.s | 2 +- .../BgSpot00Hanebasi_Init.s | 4 +- .../ovl_Bg_Spot00_Hanebasi/func_808A9E58.s | 2 +- .../BossGanondrof_Destroy.s | 2 +- .../ovl_Boss_Ganondrof/BossGanondrof_Init.s | 4 +- .../ovl_Boss_Ganondrof/BossGanondrof_Update.s | 2 +- .../actors/ovl_Demo_6K/Demo6K_Destroy.s | 2 +- .../overlays/actors/ovl_Demo_6K/Demo6K_Init.s | 4 +- .../actors/ovl_Demo_6K/func_809674E0.s | 2 +- .../actors/ovl_Demo_6K/func_8096784C.s | 2 +- .../actors/ovl_Demo_6K/func_80967DBC.s | 2 +- .../actors/ovl_Door_Warp1/DoorWarp1_Destroy.s | 4 +- .../actors/ovl_Door_Warp1/DoorWarp1_Init.s | 8 +- .../actors/ovl_Door_Warp1/func_8099898C.s | 4 +- .../actors/ovl_Door_Warp1/func_80998C90.s | 4 +- .../actors/ovl_Door_Warp1/func_809995D4.s | 4 +- .../actors/ovl_Door_Warp1/func_80999A68.s | 4 +- .../actors/ovl_Door_Warp1/func_8099A098.s | 4 +- .../actors/ovl_Door_Warp1/func_8099A5EC.s | 4 +- .../actors/ovl_En_Bdfire/EnBdfire_Destroy.s | 2 +- .../actors/ovl_En_Bdfire/EnBdfire_Init.s | 4 +- .../actors/ovl_En_Bdfire/func_809BC2A4.s | 2 +- .../actors/ovl_En_Elf/EnElf_Destroy.s | 4 +- .../overlays/actors/ovl_En_Elf/EnElf_Init.s | 8 +- .../actors/ovl_En_Elf/func_80A03B28.s | 6 +- .../actors/ovl_En_Fhg_Fire/func_80A10220.s | 2 +- .../overlays/actors/ovl_En_Fr/EnFr_Destroy.s | 2 +- .../overlays/actors/ovl_En_Fr/EnFr_Update.s | 4 +- .../overlays/actors/ovl_En_Fr/func_80A1CD24.s | 2 +- .../overlays/actors/ovl_En_Gb/EnGb_Destroy.s | 2 +- .../overlays/actors/ovl_En_Gb/EnGb_Draw.s | 2 +- .../overlays/actors/ovl_En_Gb/EnGb_Init.s | 4 +- .../ovl_En_Ice_Hono/EnIceHono_Destroy.s | 2 +- .../actors/ovl_En_Ice_Hono/EnIceHono_Init.s | 4 +- .../actors/ovl_En_Ice_Hono/EnIceHono_Update.s | 2 +- .../ovl_En_M_Thunder/EnMThunder_Destroy.s | 2 +- .../actors/ovl_En_M_Thunder/EnMThunder_Init.s | 4 +- .../ovl_En_M_Thunder/EnMThunder_Update.s | 2 +- .../ovl_En_Po_Desert/EnPoDesert_Destroy.s | 2 +- .../actors/ovl_En_Po_Desert/EnPoDesert_Init.s | 4 +- .../actors/ovl_En_Po_Desert/func_80AD3594.s | 2 +- .../ovl_En_Po_Field/EnPoField_Destroy.s | 2 +- .../actors/ovl_En_Po_Field/EnPoField_Init.s | 4 +- .../actors/ovl_En_Po_Field/func_80AD3D68.s | 2 +- .../actors/ovl_En_Po_Field/func_80AD42B0.s | 2 +- .../actors/ovl_En_Po_Field/func_80AD54D4.s | 2 +- .../actors/ovl_En_Po_Field/func_80AD58D4.s | 2 +- .../actors/ovl_En_Po_Field/func_80AD66D0.s | 2 +- .../actors/ovl_En_Po_Field/func_80AD6C4C.s | 2 +- .../ovl_En_Po_Relay/EnPoRelay_Destroy.s | 2 +- .../actors/ovl_En_Po_Relay/EnPoRelay_Init.s | 4 +- .../actors/ovl_En_Po_Relay/func_80AD88D0.s | 2 +- .../ovl_En_Po_Sisters/EnPoSisters_Destroy.s | 2 +- .../ovl_En_Po_Sisters/EnPoSisters_Init.s | 4 +- .../actors/ovl_En_Po_Sisters/func_80AD9C24.s | 2 +- .../actors/ovl_En_Po_Sisters/func_80ADC970.s | 6 +- .../actors/ovl_En_Poh/EnPoh_Destroy.s | 2 +- .../overlays/actors/ovl_En_Poh/EnPoh_Init.s | 4 +- .../actors/ovl_En_Poh/func_80ADE6D4.s | 2 +- .../actors/ovl_En_Poh/func_80ADFA90.s | 2 +- .../actors/ovl_En_Poh/func_80ADFE80.s | 2 +- .../actors/ovl_En_Poh/func_80AE0CE8.s | 2 +- .../actors/ovl_En_Poh/func_80AE1654.s | 2 +- .../actors/ovl_Fishing/Fishing_Destroy.s | 2 +- .../actors/ovl_Fishing/Fishing_Init.s | 2 +- .../actors/ovl_Fishing/Fishing_Update.s | 2 +- .../actors/ovl_Mir_Ray/MirRay_Destroy.s | 2 +- .../overlays/actors/ovl_Mir_Ray/MirRay_Init.s | 4 +- .../actors/ovl_Mir_Ray/func_80B8D110.s | 4 +- .../ovl_Obj_Syokudai/ObjSyokudai_Destroy.s | 2 +- .../ovl_Obj_Syokudai/ObjSyokudai_Init.s | 4 +- .../ovl_Obj_Syokudai/ObjSyokudai_Update.s | 2 +- data/z_lights.data.s | 15 - include/functions.h | 54 ++- include/variables.h | 6 +- include/z64.h | 2 +- include/z64actor.h | 4 +- include/z64effect.h | 6 +- include/z64light.h | 107 ++--- spec | 1 - src/buffers/zbuffer.c | 2 +- src/code/z_actor.c | 47 +- src/code/z_collision_check.c | 12 +- src/code/z_eff_shield_particle.c | 17 +- src/code/z_effect_soft_sprite.c | 8 +- src/code/z_lights.c | 418 +++++++++++++----- src/code/z_play.c | 10 +- src/code/z_scene.c | 2 +- .../actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c | 8 +- .../actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h | 6 +- src/overlays/actors/ovl_En_Light/z_en_light.c | 26 +- src/overlays/actors/ovl_En_Light/z_en_light.h | 4 +- .../actors/ovl_Oceff_Spot/z_oceff_spot.c | 33 +- .../actors/ovl_Oceff_Spot/z_oceff_spot.h | 8 +- 111 files changed, 614 insertions(+), 1244 deletions(-) delete mode 100644 asm/non_matchings/code/z_lights/func_80079EFC.s delete mode 100644 asm/non_matchings/code/z_lights/func_8007A0B4.s delete mode 100644 asm/non_matchings/code/z_lights/func_8007A474.s delete mode 100644 asm/non_matchings/code/z_lights/func_8007A824.s delete mode 100644 asm/non_matchings/code/z_lights/func_8007A960.s delete mode 100644 asm/non_matchings/code/z_lights/func_8007A9B4.s delete mode 100644 asm/non_matchings/code/z_lights/func_8007ABBC.s delete mode 100644 data/z_lights.data.s diff --git a/asm/non_matchings/code/z_actor/func_8002FBAC.s b/asm/non_matchings/code/z_actor/func_8002FBAC.s index 3b42221d8e..053a3f38e4 100644 --- a/asm/non_matchings/code/z_actor/func_8002FBAC.s +++ b/asm/non_matchings/code/z_actor/func_8002FBAC.s @@ -627,7 +627,7 @@ glabel func_8002FBAC /* AA75E8 80030448 AFAA0014 */ sw $t2, 0x14($sp) /* AA75EC 8003044C AFAE0010 */ sw $t6, 0x10($sp) /* AA75F0 80030450 2484BC00 */ addiu $a0, %lo(D_8015BC00) # addiu $a0, $a0, -0x4400 -/* AA75F4 80030454 0C01E763 */ jal Lights_InitType0PositionalLight +/* AA75F4 80030454 0C01E763 */ jal Lights_PointNoGlowSetInfo /* AA75F8 80030458 AFAD001C */ sw $t5, 0x1c($sp) /* AA75FC 8003045C 8FAF00F8 */ lw $t7, 0xf8($sp) /* AA7600 80030460 3C068013 */ lui $a2, %hi(D_80136304) # $a2, 0x8013 diff --git a/asm/non_matchings/code/z_kankyo/func_8006F0FC.s b/asm/non_matchings/code/z_kankyo/func_8006F0FC.s index 818cea3fd4..664e097b7d 100644 --- a/asm/non_matchings/code/z_kankyo/func_8006F0FC.s +++ b/asm/non_matchings/code/z_kankyo/func_8006F0FC.s @@ -10,7 +10,7 @@ glabel func_8006F0FC /* AE62BC 8006F11C 84A5FD80 */ lh $a1, %lo(D_8015FD80)($a1) /* AE62C0 8006F120 3C018012 */ lui $at, %hi(D_8011FB44) # $at, 0x8012 /* AE62C4 8006F124 A422FB44 */ sh $v0, %lo(D_8011FB44)($at) -/* AE62C8 8006F128 0C01EA6D */ jal func_8007A9B4 +/* AE62C8 8006F128 0C01EA6D */ jal Lights_GlowCheck /* AE62CC 8006F12C 8FA4001C */ lw $a0, 0x1c($sp) /* AE62D0 8006F130 8FBF0014 */ lw $ra, 0x14($sp) /* AE62D4 8006F134 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/code/z_kankyo/func_8006F140.s b/asm/non_matchings/code/z_kankyo/func_8006F140.s index 854e83c28e..36ef86567b 100644 --- a/asm/non_matchings/code/z_kankyo/func_8006F140.s +++ b/asm/non_matchings/code/z_kankyo/func_8006F140.s @@ -53,12 +53,12 @@ glabel func_8006F140 /* AE6364 8006F1C4 AFAB0010 */ sw $t3, 0x10($sp) /* AE6368 8006F1C8 24050050 */ li $a1, 80 /* AE636C 8006F1CC 24060050 */ li $a2, 80 -/* AE6370 8006F1D0 0C01E79F */ jal Lights_InitDirectional +/* AE6370 8006F1D0 0C01E79F */ jal Lights_DirectionalSetInfo /* AE6374 8006F1D4 24070050 */ li $a3, 80 /* AE6378 8006F1D8 262507A8 */ addiu $a1, $s1, 0x7a8 /* AE637C 8006F1DC AFA50034 */ sw $a1, 0x34($sp) /* AE6380 8006F1E0 02202025 */ move $a0, $s1 -/* AE6384 8006F1E4 0C01E9D9 */ jal Lights_Insert +/* AE6384 8006F1E4 0C01E9D9 */ jal LightContext_InsertLight /* AE6388 8006F1E8 8FA60038 */ lw $a2, 0x38($sp) /* AE638C 8006F1EC 26040036 */ addiu $a0, $s0, 0x36 /* AE6390 8006F1F0 240E0050 */ li $t6, 80 @@ -70,11 +70,11 @@ glabel func_8006F140 /* AE63A8 8006F208 AFA40038 */ sw $a0, 0x38($sp) /* AE63AC 8006F20C 24050050 */ li $a1, 80 /* AE63B0 8006F210 24060050 */ li $a2, 80 -/* AE63B4 8006F214 0C01E79F */ jal Lights_InitDirectional +/* AE63B4 8006F214 0C01E79F */ jal Lights_DirectionalSetInfo /* AE63B8 8006F218 24070050 */ li $a3, 80 /* AE63BC 8006F21C 02202025 */ move $a0, $s1 /* AE63C0 8006F220 8FA50034 */ lw $a1, 0x34($sp) -/* AE63C4 8006F224 0C01E9D9 */ jal Lights_Insert +/* AE63C4 8006F224 0C01E9D9 */ jal LightContext_InsertLight /* AE63C8 8006F228 8FA60038 */ lw $a2, 0x38($sp) /* AE63CC 8006F22C 44800000 */ mtc1 $zero, $f0 /* AE63D0 8006F230 24030063 */ li $v1, 99 diff --git a/asm/non_matchings/code/z_kankyo/func_80075F14.s b/asm/non_matchings/code/z_kankyo/func_80075F14.s index 48c89c3e62..e56ad9803d 100644 --- a/asm/non_matchings/code/z_kankyo/func_80075F14.s +++ b/asm/non_matchings/code/z_kankyo/func_80075F14.s @@ -51,13 +51,13 @@ glabel func_80075F14 /* AED178 80075FD8 44079000 */ mfc1 $a3, $f18 /* AED17C 80075FDC 00000000 */ nop /* AED180 80075FE0 00073C00 */ sll $a3, $a3, 0x10 -/* AED184 80075FE4 0C01E763 */ jal Lights_InitType0PositionalLight +/* AED184 80075FE4 0C01E763 */ jal Lights_PointNoGlowSetInfo /* AED188 80075FE8 00073C03 */ sra $a3, $a3, 0x10 /* AED18C 80075FEC 8FA40038 */ lw $a0, 0x38($sp) /* AED190 80075FF0 3C068016 */ lui $a2, %hi(D_8015FD88) /* AED194 80075FF4 24C6FD88 */ addiu $a2, %lo(D_8015FD88) # addiu $a2, $a2, -0x278 /* AED198 80075FF8 248507A8 */ addiu $a1, $a0, 0x7a8 -/* AED19C 80075FFC 0C01E9D9 */ jal Lights_Insert +/* AED19C 80075FFC 0C01E9D9 */ jal LightContext_InsertLight /* AED1A0 80076000 AFA5002C */ sw $a1, 0x2c($sp) /* AED1A4 80076004 3C014120 */ li $at, 0x41200000 # 0.000000 /* AED1A8 80076008 44810000 */ mtc1 $at, $f0 @@ -107,12 +107,12 @@ glabel func_80075F14 /* AED258 800760B8 44079000 */ mfc1 $a3, $f18 /* AED25C 800760BC 00000000 */ nop /* AED260 800760C0 00073C00 */ sll $a3, $a3, 0x10 -/* AED264 800760C4 0C01E763 */ jal Lights_InitType0PositionalLight +/* AED264 800760C4 0C01E763 */ jal Lights_PointNoGlowSetInfo /* AED268 800760C8 00073C03 */ sra $a3, $a3, 0x10 /* AED26C 800760CC 3C068016 */ lui $a2, %hi(D_8015FDA0) # $a2, 0x8016 /* AED270 800760D0 24C6FDA0 */ addiu $a2, %lo(D_8015FDA0) # addiu $a2, $a2, -0x260 /* AED274 800760D4 8FA40038 */ lw $a0, 0x38($sp) -/* AED278 800760D8 0C01E9D9 */ jal Lights_Insert +/* AED278 800760D8 0C01E9D9 */ jal LightContext_InsertLight /* AED27C 800760DC 8FA5002C */ lw $a1, 0x2c($sp) /* AED280 800760E0 8FBF0024 */ lw $ra, 0x24($sp) /* AED284 800760E4 3C018016 */ lui $at, %hi(D_8015FD98) # $at, 0x8016 diff --git a/asm/non_matchings/code/z_kankyo/func_800760F4.s b/asm/non_matchings/code/z_kankyo/func_800760F4.s index 2a84f4cbea..fd30200c87 100644 --- a/asm/non_matchings/code/z_kankyo/func_800760F4.s +++ b/asm/non_matchings/code/z_kankyo/func_800760F4.s @@ -52,7 +52,7 @@ glabel func_800760F4 /* AED35C 800761BC 44079000 */ mfc1 $a3, $f18 /* AED360 800761C0 00000000 */ nop /* AED364 800761C4 00073C00 */ sll $a3, $a3, 0x10 -/* AED368 800761C8 0C01E763 */ jal Lights_InitType0PositionalLight +/* AED368 800761C8 0C01E763 */ jal Lights_PointNoGlowSetInfo /* AED36C 800761CC 00073C03 */ sra $a3, $a3, 0x10 /* AED370 800761D0 8FA30034 */ lw $v1, 0x34($sp) /* AED374 800761D4 3C014120 */ li $at, 0x41200000 # 0.000000 @@ -102,7 +102,7 @@ glabel func_800760F4 /* AED424 80076284 44079000 */ mfc1 $a3, $f18 /* AED428 80076288 00000000 */ nop /* AED42C 8007628C 00073C00 */ sll $a3, $a3, 0x10 -/* AED430 80076290 0C01E763 */ jal Lights_InitType0PositionalLight +/* AED430 80076290 0C01E763 */ jal Lights_PointNoGlowSetInfo /* AED434 80076294 00073C03 */ sra $a3, $a3, 0x10 /* AED438 80076298 3C038016 */ lui $v1, %hi(D_8015FDAE) # $v1, 0x8016 /* AED43C 8007629C 2463FDAE */ addiu $v1, %lo(D_8015FDAE) # addiu $v1, $v1, -0x252 diff --git a/asm/non_matchings/code/z_kankyo/func_800763A8.s b/asm/non_matchings/code/z_kankyo/func_800763A8.s index 5e9802b9fe..ad81f4634c 100644 --- a/asm/non_matchings/code/z_kankyo/func_800763A8.s +++ b/asm/non_matchings/code/z_kankyo/func_800763A8.s @@ -28,12 +28,12 @@ glabel func_800763A8 /* AED5A8 80076408 26B007A8 */ addiu $s0, $s5, 0x7a8 /* AED5AC 8007640C 3C068016 */ lui $a2, %hi(D_8015FD84) /* AED5B0 80076410 8CC6FD84 */ lw $a2, %lo(D_8015FD84)($a2) -/* AED5B4 80076414 0C01E9F1 */ jal Lights_Remove +/* AED5B4 80076414 0C01E9F1 */ jal LightContext_RemoveLight /* AED5B8 80076418 02002825 */ move $a1, $s0 /* AED5BC 8007641C 3C068016 */ lui $a2, %hi(D_8015FD98) /* AED5C0 80076420 8CC6FD98 */ lw $a2, %lo(D_8015FD98)($a2) /* AED5C4 80076424 02A02025 */ move $a0, $s5 -/* AED5C8 80076428 0C01E9F1 */ jal Lights_Remove +/* AED5C8 80076428 0C01E9F1 */ jal LightContext_RemoveLight /* AED5CC 8007642C 02002825 */ move $a1, $s0 /* AED5D0 80076430 10000063 */ b .L800765C0 /* AED5D4 80076434 00000000 */ nop @@ -86,7 +86,7 @@ glabel func_800763A8 /* AED68C 800764EC 44079000 */ mfc1 $a3, $f18 /* AED690 800764F0 00000000 */ nop /* AED694 800764F4 00073C00 */ sll $a3, $a3, 0x10 -/* AED698 800764F8 0C01E763 */ jal Lights_InitType0PositionalLight +/* AED698 800764F8 0C01E763 */ jal Lights_PointNoGlowSetInfo /* AED69C 800764FC 00073C03 */ sra $a3, $a3, 0x10 /* AED6A0 80076500 C6240024 */ lwc1 $f4, 0x24($s1) /* AED6A4 80076504 3C014120 */ li $at, 0x41200000 # 0.000000 @@ -134,7 +134,7 @@ glabel func_800763A8 /* AED74C 800765AC 44079000 */ mfc1 $a3, $f18 /* AED750 800765B0 00000000 */ nop /* AED754 800765B4 00073C00 */ sll $a3, $a3, 0x10 -/* AED758 800765B8 0C01E763 */ jal Lights_InitType0PositionalLight +/* AED758 800765B8 0C01E763 */ jal Lights_PointNoGlowSetInfo /* AED75C 800765BC 00073C03 */ sra $a3, $a3, 0x10 .L800765C0: /* AED760 800765C0 0C03032E */ jal func_800C0CB8 diff --git a/asm/non_matchings/code/z_lights/func_80079EFC.s b/asm/non_matchings/code/z_lights/func_80079EFC.s deleted file mode 100644 index 6d9f00f941..0000000000 --- a/asm/non_matchings/code/z_lights/func_80079EFC.s +++ /dev/null @@ -1,114 +0,0 @@ -.rdata -glabel D_8013C8A0 - .asciz "../z_lights.c" - .balign 4 - -glabel D_8013C8B0 - .asciz "../z_lights.c" - .balign 4 - -.text -glabel func_80079EFC -/* AF109C 80079EFC 27BDFF98 */ addiu $sp, $sp, -0x68 -/* AF10A0 80079F00 AFB10018 */ sw $s1, 0x18($sp) -/* AF10A4 80079F04 00808825 */ move $s1, $a0 -/* AF10A8 80079F08 AFBF001C */ sw $ra, 0x1c($sp) -/* AF10AC 80079F0C AFB00014 */ sw $s0, 0x14($sp) -/* AF10B0 80079F10 3C068014 */ lui $a2, %hi(D_8013C8A0) # $a2, 0x8014 -/* AF10B4 80079F14 00A08025 */ move $s0, $a1 -/* AF10B8 80079F18 24C6C8A0 */ addiu $a2, %lo(D_8013C8A0) # addiu $a2, $a2, -0x3760 -/* AF10BC 80079F1C 27A4004C */ addiu $a0, $sp, 0x4c -/* AF10C0 80079F20 0C031AB1 */ jal Graph_OpenDisps -/* AF10C4 80079F24 24070153 */ li $a3, 339 -/* AF10C8 80079F28 8E0302C0 */ lw $v1, 0x2c0($s0) -/* AF10CC 80079F2C 3C04DB02 */ lui $a0, 0xdb02 -/* AF10D0 80079F30 24050018 */ li $a1, 24 -/* AF10D4 80079F34 246E0008 */ addiu $t6, $v1, 8 -/* AF10D8 80079F38 AE0E02C0 */ sw $t6, 0x2c0($s0) -/* AF10DC 80079F3C AC640000 */ sw $a0, ($v1) -/* AF10E0 80079F40 922F0000 */ lbu $t7, ($s1) -/* AF10E4 80079F44 00003825 */ move $a3, $zero -/* AF10E8 80079F48 3C08DC08 */ lui $t0, 0xdc08 -/* AF10EC 80079F4C 01E50019 */ multu $t7, $a1 -/* AF10F0 80079F50 0000C012 */ mflo $t8 -/* AF10F4 80079F54 AC780004 */ sw $t8, 4($v1) -/* AF10F8 80079F58 8E0302D0 */ lw $v1, 0x2d0($s0) -/* AF10FC 80079F5C 24790008 */ addiu $t9, $v1, 8 -/* AF1100 80079F60 AE1902D0 */ sw $t9, 0x2d0($s0) -/* AF1104 80079F64 AC640000 */ sw $a0, ($v1) -/* AF1108 80079F68 92290000 */ lbu $t1, ($s1) -/* AF110C 80079F6C 26240010 */ addiu $a0, $s1, 0x10 -/* AF1110 80079F70 01250019 */ multu $t1, $a1 -/* AF1114 80079F74 24050018 */ li $a1, 24 -/* AF1118 80079F78 00005012 */ mflo $t2 -/* AF111C 80079F7C AC6A0004 */ sw $t2, 4($v1) -/* AF1120 80079F80 922B0000 */ lbu $t3, ($s1) -/* AF1124 80079F84 5960001C */ blezl $t3, .L80079FF8 -/* AF1128 80079F88 00072880 */ sll $a1, $a3, 2 -/* AF112C 80079F8C 8E0302C0 */ lw $v1, 0x2c0($s0) -.L80079F90: -/* AF1130 80079F90 24A50018 */ addiu $a1, $a1, 0x18 -/* AF1134 80079F94 24E70001 */ addiu $a3, $a3, 1 -/* AF1138 80079F98 246C0008 */ addiu $t4, $v1, 8 -/* AF113C 80079F9C AE0C02C0 */ sw $t4, 0x2c0($s0) -/* AF1140 80079FA0 00601025 */ move $v0, $v1 -/* AF1144 80079FA4 04A10003 */ bgez $a1, .L80079FB4 -/* AF1148 80079FA8 000568C3 */ sra $t5, $a1, 3 -/* AF114C 80079FAC 24A10007 */ addiu $at, $a1, 7 -/* AF1150 80079FB0 000168C3 */ sra $t5, $at, 3 -.L80079FB4: -/* AF1154 80079FB4 31AE00FF */ andi $t6, $t5, 0xff -/* AF1158 80079FB8 000E7A00 */ sll $t7, $t6, 8 -/* AF115C 80079FBC 01E83025 */ or $a2, $t7, $t0 -/* AF1160 80079FC0 34C6000A */ ori $a2, $a2, 0xa -/* AF1164 80079FC4 AC460000 */ sw $a2, ($v0) -/* AF1168 80079FC8 AC440004 */ sw $a0, 4($v0) -/* AF116C 80079FCC 8E0302D0 */ lw $v1, 0x2d0($s0) -/* AF1170 80079FD0 24780008 */ addiu $t8, $v1, 8 -/* AF1174 80079FD4 AE1802D0 */ sw $t8, 0x2d0($s0) -/* AF1178 80079FD8 AC640004 */ sw $a0, 4($v1) -/* AF117C 80079FDC AC660000 */ sw $a2, ($v1) -/* AF1180 80079FE0 92390000 */ lbu $t9, ($s1) -/* AF1184 80079FE4 24840010 */ addiu $a0, $a0, 0x10 -/* AF1188 80079FE8 00F9082A */ slt $at, $a3, $t9 -/* AF118C 80079FEC 5420FFE8 */ bnezl $at, .L80079F90 -/* AF1190 80079FF0 8E0302C0 */ lw $v1, 0x2c0($s0) -/* AF1194 80079FF4 00072880 */ sll $a1, $a3, 2 -.L80079FF8: -/* AF1198 80079FF8 00A72823 */ subu $a1, $a1, $a3 -/* AF119C 80079FFC 000528C0 */ sll $a1, $a1, 3 -/* AF11A0 8007A000 8E0302C0 */ lw $v1, 0x2c0($s0) -/* AF11A4 8007A004 24A50030 */ addiu $a1, $a1, 0x30 -/* AF11A8 8007A008 3C08DC08 */ lui $t0, 0xdc08 -/* AF11AC 8007A00C 24690008 */ addiu $t1, $v1, 8 -/* AF11B0 8007A010 AE0902C0 */ sw $t1, 0x2c0($s0) -/* AF11B4 8007A014 00601025 */ move $v0, $v1 -/* AF11B8 8007A018 04A10003 */ bgez $a1, .L8007A028 -/* AF11BC 8007A01C 000550C3 */ sra $t2, $a1, 3 -/* AF11C0 8007A020 24A10007 */ addiu $at, $a1, 7 -/* AF11C4 8007A024 000150C3 */ sra $t2, $at, 3 -.L8007A028: -/* AF11C8 8007A028 314B00FF */ andi $t3, $t2, 0xff -/* AF11CC 8007A02C 000B6200 */ sll $t4, $t3, 8 -/* AF11D0 8007A030 01883025 */ or $a2, $t4, $t0 -/* AF11D4 8007A034 34C6000A */ ori $a2, $a2, 0xa -/* AF11D8 8007A038 26240008 */ addiu $a0, $s1, 8 -/* AF11DC 8007A03C AC440004 */ sw $a0, 4($v0) -/* AF11E0 8007A040 AC460000 */ sw $a2, ($v0) -/* AF11E4 8007A044 8E0302D0 */ lw $v1, 0x2d0($s0) -/* AF11E8 8007A048 02002825 */ move $a1, $s0 -/* AF11EC 8007A04C 24070160 */ li $a3, 352 -/* AF11F0 8007A050 246D0008 */ addiu $t5, $v1, 8 -/* AF11F4 8007A054 AE0D02D0 */ sw $t5, 0x2d0($s0) -/* AF11F8 8007A058 AC660000 */ sw $a2, ($v1) -/* AF11FC 8007A05C 3C068014 */ lui $a2, %hi(D_8013C8B0) # $a2, 0x8014 -/* AF1200 8007A060 AC640004 */ sw $a0, 4($v1) -/* AF1204 8007A064 27A4004C */ addiu $a0, $sp, 0x4c -/* AF1208 8007A068 0C031AD5 */ jal Graph_CloseDisps -/* AF120C 8007A06C 24C6C8B0 */ addiu $a2, %lo(D_8013C8B0) # addiu $a2, $a2, -0x3750 -/* AF1210 8007A070 8FBF001C */ lw $ra, 0x1c($sp) -/* AF1214 8007A074 8FB00014 */ lw $s0, 0x14($sp) -/* AF1218 8007A078 8FB10018 */ lw $s1, 0x18($sp) -/* AF121C 8007A07C 03E00008 */ jr $ra -/* AF1220 8007A080 27BD0068 */ addiu $sp, $sp, 0x68 - diff --git a/asm/non_matchings/code/z_lights/func_8007A0B4.s b/asm/non_matchings/code/z_lights/func_8007A0B4.s deleted file mode 100644 index 20af26291d..0000000000 --- a/asm/non_matchings/code/z_lights/func_8007A0B4.s +++ /dev/null @@ -1,232 +0,0 @@ -glabel func_8007A0B4 -/* AF1254 8007A0B4 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* AF1258 8007A0B8 10C000D0 */ beqz $a2, .L8007A3FC -/* AF125C 8007A0BC AFBF0014 */ sw $ra, 0x14($sp) -/* AF1260 8007A0C0 84AE0000 */ lh $t6, ($a1) -/* AF1264 8007A0C4 84AF0002 */ lh $t7, 2($a1) -/* AF1268 8007A0C8 C4C80000 */ lwc1 $f8, ($a2) -/* AF126C 8007A0CC 448E2000 */ mtc1 $t6, $f4 -/* AF1270 8007A0D0 448F5000 */ mtc1 $t7, $f10 -/* AF1274 8007A0D4 84B80004 */ lh $t8, 4($a1) -/* AF1278 8007A0D8 468021A0 */ cvt.s.w $f6, $f4 -/* AF127C 8007A0DC 84B9000A */ lh $t9, 0xa($a1) -/* AF1280 8007A0E0 46805120 */ cvt.s.w $f4, $f10 -/* AF1284 8007A0E4 46083381 */ sub.s $f14, $f6, $f8 -/* AF1288 8007A0E8 44984000 */ mtc1 $t8, $f8 -/* AF128C 8007A0EC C4C60004 */ lwc1 $f6, 4($a2) -/* AF1290 8007A0F0 468042A0 */ cvt.s.w $f10, $f8 -/* AF1294 8007A0F4 460E7202 */ mul.s $f8, $f14, $f14 -/* AF1298 8007A0F8 46062401 */ sub.s $f16, $f4, $f6 -/* AF129C 8007A0FC C4C40008 */ lwc1 $f4, 8($a2) -/* AF12A0 8007A100 44993000 */ mtc1 $t9, $f6 -/* AF12A4 8007A104 46045481 */ sub.s $f18, $f10, $f4 -/* AF12A8 8007A108 46108282 */ mul.s $f10, $f16, $f16 -/* AF12AC 8007A10C 468030A0 */ cvt.s.w $f2, $f6 -/* AF12B0 8007A110 46129182 */ mul.s $f6, $f18, $f18 -/* AF12B4 8007A114 460A4100 */ add.s $f4, $f8, $f10 -/* AF12B8 8007A118 46021202 */ mul.s $f8, $f2, $f2 -/* AF12BC 8007A11C 46062300 */ add.s $f12, $f4, $f6 -/* AF12C0 8007A120 4608603C */ c.lt.s $f12, $f8 -/* AF12C4 8007A124 00000000 */ nop -/* AF12C8 8007A128 450200B5 */ bc1fl .L8007A400 -/* AF12CC 8007A12C 8FBF0014 */ lw $ra, 0x14($sp) -/* AF12D0 8007A130 AFA5003C */ sw $a1, 0x3c($sp) -/* AF12D4 8007A134 E7A20024 */ swc1 $f2, 0x24($sp) -/* AF12D8 8007A138 E7AC0018 */ swc1 $f12, 0x18($sp) -/* AF12DC 8007A13C E7AE0034 */ swc1 $f14, 0x34($sp) -/* AF12E0 8007A140 E7B00030 */ swc1 $f16, 0x30($sp) -/* AF12E4 8007A144 0C01E821 */ jal Lights_MapperGetNextFreeSlot -/* AF12E8 8007A148 E7B2002C */ swc1 $f18, 0x2c($sp) -/* AF12EC 8007A14C 8FA5003C */ lw $a1, 0x3c($sp) -/* AF12F0 8007A150 C7A20024 */ lwc1 $f2, 0x24($sp) -/* AF12F4 8007A154 C7AC0018 */ lwc1 $f12, 0x18($sp) -/* AF12F8 8007A158 C7AE0034 */ lwc1 $f14, 0x34($sp) -/* AF12FC 8007A15C C7B00030 */ lwc1 $f16, 0x30($sp) -/* AF1300 8007A160 104000A6 */ beqz $v0, .L8007A3FC -/* AF1304 8007A164 C7B2002C */ lwc1 $f18, 0x2c($sp) -/* AF1308 8007A168 46006004 */ sqrt.s $f0, $f12 -/* AF130C 8007A16C 90A80006 */ lbu $t0, 6($a1) -/* AF1310 8007A170 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* AF1314 8007A174 44815000 */ mtc1 $at, $f10 -/* AF1318 8007A178 44883000 */ mtc1 $t0, $f6 -/* AF131C 8007A17C 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* AF1320 8007A180 46803220 */ cvt.s.w $f8, $f6 -/* AF1324 8007A184 46020083 */ div.s $f2, $f0, $f2 -/* AF1328 8007A188 46021102 */ mul.s $f4, $f2, $f2 -/* AF132C 8007A18C 05010004 */ bgez $t0, .L8007A1A0 -/* AF1330 8007A190 46045081 */ sub.s $f2, $f10, $f4 -/* AF1334 8007A194 44815000 */ mtc1 $at, $f10 -/* AF1338 8007A198 00000000 */ nop -/* AF133C 8007A19C 460A4200 */ add.s $f8, $f8, $f10 -.L8007A1A0: -/* AF1340 8007A1A0 46024102 */ mul.s $f4, $f8, $f2 -/* AF1344 8007A1A4 24030001 */ li $v1, 1 -/* AF1348 8007A1A8 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* AF134C 8007A1AC 4449F800 */ cfc1 $t1, $31 -/* AF1350 8007A1B0 44C3F800 */ ctc1 $v1, $31 -/* AF1354 8007A1B4 00000000 */ nop -/* AF1358 8007A1B8 460021A4 */ cvt.w.s $f6, $f4 -/* AF135C 8007A1BC 4443F800 */ cfc1 $v1, $31 -/* AF1360 8007A1C0 00000000 */ nop -/* AF1364 8007A1C4 30630078 */ andi $v1, $v1, 0x78 -/* AF1368 8007A1C8 50600013 */ beql $v1, $zero, .L8007A218 -/* AF136C 8007A1CC 44033000 */ mfc1 $v1, $f6 -/* AF1370 8007A1D0 44813000 */ mtc1 $at, $f6 -/* AF1374 8007A1D4 24030001 */ li $v1, 1 -/* AF1378 8007A1D8 46062181 */ sub.s $f6, $f4, $f6 -/* AF137C 8007A1DC 44C3F800 */ ctc1 $v1, $31 -/* AF1380 8007A1E0 00000000 */ nop -/* AF1384 8007A1E4 460031A4 */ cvt.w.s $f6, $f6 -/* AF1388 8007A1E8 4443F800 */ cfc1 $v1, $31 -/* AF138C 8007A1EC 00000000 */ nop -/* AF1390 8007A1F0 30630078 */ andi $v1, $v1, 0x78 -/* AF1394 8007A1F4 14600005 */ bnez $v1, .L8007A20C -/* AF1398 8007A1F8 00000000 */ nop -/* AF139C 8007A1FC 44033000 */ mfc1 $v1, $f6 -/* AF13A0 8007A200 3C018000 */ li $at, 0x80000000 # 0.000000 -/* AF13A4 8007A204 10000007 */ b .L8007A224 -/* AF13A8 8007A208 00611825 */ or $v1, $v1, $at -.L8007A20C: -/* AF13AC 8007A20C 10000005 */ b .L8007A224 -/* AF13B0 8007A210 2403FFFF */ li $v1, -1 -/* AF13B4 8007A214 44033000 */ mfc1 $v1, $f6 -.L8007A218: -/* AF13B8 8007A218 00000000 */ nop -/* AF13BC 8007A21C 0460FFFB */ bltz $v1, .L8007A20C -/* AF13C0 8007A220 00000000 */ nop -.L8007A224: -/* AF13C4 8007A224 A0430004 */ sb $v1, 4($v0) -/* AF13C8 8007A228 A0430000 */ sb $v1, ($v0) -/* AF13CC 8007A22C 90AA0007 */ lbu $t2, 7($a1) -/* AF13D0 8007A230 44C9F800 */ ctc1 $t1, $31 -/* AF13D4 8007A234 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* AF13D8 8007A238 448A5000 */ mtc1 $t2, $f10 -/* AF13DC 8007A23C 05410004 */ bgez $t2, .L8007A250 -/* AF13E0 8007A240 46805220 */ cvt.s.w $f8, $f10 -/* AF13E4 8007A244 44812000 */ mtc1 $at, $f4 -/* AF13E8 8007A248 00000000 */ nop -/* AF13EC 8007A24C 46044200 */ add.s $f8, $f8, $f4 -.L8007A250: -/* AF13F0 8007A250 46024182 */ mul.s $f6, $f8, $f2 -/* AF13F4 8007A254 24030001 */ li $v1, 1 -/* AF13F8 8007A258 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* AF13FC 8007A25C 444BF800 */ cfc1 $t3, $31 -/* AF1400 8007A260 44C3F800 */ ctc1 $v1, $31 -/* AF1404 8007A264 00000000 */ nop -/* AF1408 8007A268 460032A4 */ cvt.w.s $f10, $f6 -/* AF140C 8007A26C 4443F800 */ cfc1 $v1, $31 -/* AF1410 8007A270 00000000 */ nop -/* AF1414 8007A274 30630078 */ andi $v1, $v1, 0x78 -/* AF1418 8007A278 50600013 */ beql $v1, $zero, .L8007A2C8 -/* AF141C 8007A27C 44035000 */ mfc1 $v1, $f10 -/* AF1420 8007A280 44815000 */ mtc1 $at, $f10 -/* AF1424 8007A284 24030001 */ li $v1, 1 -/* AF1428 8007A288 460A3281 */ sub.s $f10, $f6, $f10 -/* AF142C 8007A28C 44C3F800 */ ctc1 $v1, $31 -/* AF1430 8007A290 00000000 */ nop -/* AF1434 8007A294 460052A4 */ cvt.w.s $f10, $f10 -/* AF1438 8007A298 4443F800 */ cfc1 $v1, $31 -/* AF143C 8007A29C 00000000 */ nop -/* AF1440 8007A2A0 30630078 */ andi $v1, $v1, 0x78 -/* AF1444 8007A2A4 14600005 */ bnez $v1, .L8007A2BC -/* AF1448 8007A2A8 00000000 */ nop -/* AF144C 8007A2AC 44035000 */ mfc1 $v1, $f10 -/* AF1450 8007A2B0 3C018000 */ li $at, 0x80000000 # 0.000000 -/* AF1454 8007A2B4 10000007 */ b .L8007A2D4 -/* AF1458 8007A2B8 00611825 */ or $v1, $v1, $at -.L8007A2BC: -/* AF145C 8007A2BC 10000005 */ b .L8007A2D4 -/* AF1460 8007A2C0 2403FFFF */ li $v1, -1 -/* AF1464 8007A2C4 44035000 */ mfc1 $v1, $f10 -.L8007A2C8: -/* AF1468 8007A2C8 00000000 */ nop -/* AF146C 8007A2CC 0460FFFB */ bltz $v1, .L8007A2BC -/* AF1470 8007A2D0 00000000 */ nop -.L8007A2D4: -/* AF1474 8007A2D4 A0430005 */ sb $v1, 5($v0) -/* AF1478 8007A2D8 A0430001 */ sb $v1, 1($v0) -/* AF147C 8007A2DC 90AC0008 */ lbu $t4, 8($a1) -/* AF1480 8007A2E0 44CBF800 */ ctc1 $t3, $31 -/* AF1484 8007A2E4 3C014F80 */ li $at, 0x4F800000 # 0.000000 -/* AF1488 8007A2E8 448C2000 */ mtc1 $t4, $f4 -/* AF148C 8007A2EC 05810004 */ bgez $t4, .L8007A300 -/* AF1490 8007A2F0 46802220 */ cvt.s.w $f8, $f4 -/* AF1494 8007A2F4 44813000 */ mtc1 $at, $f6 -/* AF1498 8007A2F8 00000000 */ nop -/* AF149C 8007A2FC 46064200 */ add.s $f8, $f8, $f6 -.L8007A300: -/* AF14A0 8007A300 46024282 */ mul.s $f10, $f8, $f2 -/* AF14A4 8007A304 24030001 */ li $v1, 1 -/* AF14A8 8007A308 3C014F00 */ li $at, 0x4F000000 # 0.000000 -/* AF14AC 8007A30C 444DF800 */ cfc1 $t5, $31 -/* AF14B0 8007A310 44C3F800 */ ctc1 $v1, $31 -/* AF14B4 8007A314 00000000 */ nop -/* AF14B8 8007A318 46005124 */ cvt.w.s $f4, $f10 -/* AF14BC 8007A31C 4443F800 */ cfc1 $v1, $31 -/* AF14C0 8007A320 00000000 */ nop -/* AF14C4 8007A324 30630078 */ andi $v1, $v1, 0x78 -/* AF14C8 8007A328 50600013 */ beql $v1, $zero, .L8007A378 -/* AF14CC 8007A32C 44032000 */ mfc1 $v1, $f4 -/* AF14D0 8007A330 44812000 */ mtc1 $at, $f4 -/* AF14D4 8007A334 24030001 */ li $v1, 1 -/* AF14D8 8007A338 46045101 */ sub.s $f4, $f10, $f4 -/* AF14DC 8007A33C 44C3F800 */ ctc1 $v1, $31 -/* AF14E0 8007A340 00000000 */ nop -/* AF14E4 8007A344 46002124 */ cvt.w.s $f4, $f4 -/* AF14E8 8007A348 4443F800 */ cfc1 $v1, $31 -/* AF14EC 8007A34C 00000000 */ nop -/* AF14F0 8007A350 30630078 */ andi $v1, $v1, 0x78 -/* AF14F4 8007A354 14600005 */ bnez $v1, .L8007A36C -/* AF14F8 8007A358 00000000 */ nop -/* AF14FC 8007A35C 44032000 */ mfc1 $v1, $f4 -/* AF1500 8007A360 3C018000 */ li $at, 0x80000000 # 0.000000 -/* AF1504 8007A364 10000007 */ b .L8007A384 -/* AF1508 8007A368 00611825 */ or $v1, $v1, $at -.L8007A36C: -/* AF150C 8007A36C 10000005 */ b .L8007A384 -/* AF1510 8007A370 2403FFFF */ li $v1, -1 -/* AF1514 8007A374 44032000 */ mfc1 $v1, $f4 -.L8007A378: -/* AF1518 8007A378 00000000 */ nop -/* AF151C 8007A37C 0460FFFB */ bltz $v1, .L8007A36C -/* AF1520 8007A380 00000000 */ nop -.L8007A384: -/* AF1524 8007A384 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* AF1528 8007A388 44CDF800 */ ctc1 $t5, $31 -/* AF152C 8007A38C 44813000 */ mtc1 $at, $f6 -/* AF1530 8007A390 A0430006 */ sb $v1, 6($v0) -/* AF1534 8007A394 A0430002 */ sb $v1, 2($v0) -/* AF1538 8007A398 4606003C */ c.lt.s $f0, $f6 -/* AF153C 8007A39C 3C0142F0 */ li $at, 0x42F00000 # 0.000000 -/* AF1540 8007A3A0 45020006 */ bc1fl .L8007A3BC -/* AF1544 8007A3A4 44814000 */ mtc1 $at, $f8 -/* AF1548 8007A3A8 3C0142F0 */ li $at, 0x42F00000 # 0.000000 -/* AF154C 8007A3AC 44811000 */ mtc1 $at, $f2 -/* AF1550 8007A3B0 10000004 */ b .L8007A3C4 -/* AF1554 8007A3B4 00000000 */ nop -/* AF1558 8007A3B8 44814000 */ mtc1 $at, $f8 -.L8007A3BC: -/* AF155C 8007A3BC 00000000 */ nop -/* AF1560 8007A3C0 46004083 */ div.s $f2, $f8, $f0 -.L8007A3C4: -/* AF1564 8007A3C4 46027282 */ mul.s $f10, $f14, $f2 -/* AF1568 8007A3C8 4600510D */ trunc.w.s $f4, $f10 -/* AF156C 8007A3CC 46028182 */ mul.s $f6, $f16, $f2 -/* AF1570 8007A3D0 00000000 */ nop -/* AF1574 8007A3D4 46029282 */ mul.s $f10, $f18, $f2 -/* AF1578 8007A3D8 440F2000 */ mfc1 $t7, $f4 -/* AF157C 8007A3DC 00000000 */ nop -/* AF1580 8007A3E0 A04F0008 */ sb $t7, 8($v0) -/* AF1584 8007A3E4 4600320D */ trunc.w.s $f8, $f6 -/* AF1588 8007A3E8 4600510D */ trunc.w.s $f4, $f10 -/* AF158C 8007A3EC 44194000 */ mfc1 $t9, $f8 -/* AF1590 8007A3F0 44092000 */ mfc1 $t1, $f4 -/* AF1594 8007A3F4 A0590009 */ sb $t9, 9($v0) -/* AF1598 8007A3F8 A049000A */ sb $t1, 0xa($v0) -.L8007A3FC: -/* AF159C 8007A3FC 8FBF0014 */ lw $ra, 0x14($sp) -.L8007A400: -/* AF15A0 8007A400 27BD0038 */ addiu $sp, $sp, 0x38 -/* AF15A4 8007A404 03E00008 */ jr $ra -/* AF15A8 8007A408 00000000 */ nop - diff --git a/asm/non_matchings/code/z_lights/func_8007A474.s b/asm/non_matchings/code/z_lights/func_8007A474.s deleted file mode 100644 index c374453790..0000000000 --- a/asm/non_matchings/code/z_lights/func_8007A474.s +++ /dev/null @@ -1,43 +0,0 @@ -glabel func_8007A474 -/* AF1614 8007A474 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* AF1618 8007A478 3C0E8012 */ lui $t6, %hi(D_80120030) # $t6, 0x8012 -/* AF161C 8007A47C AFBF0024 */ sw $ra, 0x24($sp) -/* AF1620 8007A480 AFB30020 */ sw $s3, 0x20($sp) -/* AF1624 8007A484 AFB2001C */ sw $s2, 0x1c($sp) -/* AF1628 8007A488 AFB10018 */ sw $s1, 0x18($sp) -/* AF162C 8007A48C AFB00014 */ sw $s0, 0x14($sp) -/* AF1630 8007A490 25CE0030 */ addiu $t6, %lo(D_80120030) # addiu $t6, $t6, 0x30 -/* AF1634 8007A494 8DD80000 */ lw $t8, ($t6) -/* AF1638 8007A498 27B3002C */ addiu $s3, $sp, 0x2c -/* AF163C 8007A49C 00A08025 */ move $s0, $a1 -/* AF1640 8007A4A0 AE780000 */ sw $t8, ($s3) -/* AF1644 8007A4A4 8DCF0004 */ lw $t7, 4($t6) -/* AF1648 8007A4A8 00808825 */ move $s1, $a0 -/* AF164C 8007A4AC 00C09025 */ move $s2, $a2 -/* AF1650 8007A4B0 AE6F0004 */ sw $t7, 4($s3) -/* AF1654 8007A4B4 8DD80008 */ lw $t8, 8($t6) -/* AF1658 8007A4B8 10A0000E */ beqz $a1, .L8007A4F4 -/* AF165C 8007A4BC AE780008 */ sw $t8, 8($s3) -/* AF1660 8007A4C0 8E020000 */ lw $v0, ($s0) -.L8007A4C4: -/* AF1664 8007A4C4 02202025 */ move $a0, $s1 -/* AF1668 8007A4C8 02403025 */ move $a2, $s2 -/* AF166C 8007A4CC 90590000 */ lbu $t9, ($v0) -/* AF1670 8007A4D0 24450002 */ addiu $a1, $v0, 2 -/* AF1674 8007A4D4 00194080 */ sll $t0, $t9, 2 -/* AF1678 8007A4D8 02684821 */ addu $t1, $s3, $t0 -/* AF167C 8007A4DC 8D390000 */ lw $t9, ($t1) -/* AF1680 8007A4E0 0320F809 */ jalr $t9 -/* AF1684 8007A4E4 00000000 */ nop -/* AF1688 8007A4E8 8E100008 */ lw $s0, 8($s0) -/* AF168C 8007A4EC 5600FFF5 */ bnezl $s0, .L8007A4C4 -/* AF1690 8007A4F0 8E020000 */ lw $v0, ($s0) -.L8007A4F4: -/* AF1694 8007A4F4 8FBF0024 */ lw $ra, 0x24($sp) -/* AF1698 8007A4F8 8FB00014 */ lw $s0, 0x14($sp) -/* AF169C 8007A4FC 8FB10018 */ lw $s1, 0x18($sp) -/* AF16A0 8007A500 8FB2001C */ lw $s2, 0x1c($sp) -/* AF16A4 8007A504 8FB30020 */ lw $s3, 0x20($sp) -/* AF16A8 8007A508 03E00008 */ jr $ra -/* AF16AC 8007A50C 27BD0038 */ addiu $sp, $sp, 0x38 - diff --git a/asm/non_matchings/code/z_lights/func_8007A824.s b/asm/non_matchings/code/z_lights/func_8007A824.s deleted file mode 100644 index e1d69b551c..0000000000 --- a/asm/non_matchings/code/z_lights/func_8007A824.s +++ /dev/null @@ -1,84 +0,0 @@ -glabel func_8007A824 -/* AF19C4 8007A824 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* AF19C8 8007A828 AFBF0014 */ sw $ra, 0x14($sp) -/* AF19CC 8007A82C AFA50024 */ sw $a1, 0x24($sp) -/* AF19D0 8007A830 AFA40020 */ sw $a0, 0x20($sp) -/* AF19D4 8007A834 AFA60028 */ sw $a2, 0x28($sp) -/* AF19D8 8007A838 AFA7002C */ sw $a3, 0x2c($sp) -/* AF19DC 8007A83C 0C031A73 */ jal Graph_Alloc -/* AF19E0 8007A840 24050080 */ li $a1, 128 -/* AF19E4 8007A844 93AF0027 */ lbu $t7, 0x27($sp) -/* AF19E8 8007A848 93A30033 */ lbu $v1, 0x33($sp) -/* AF19EC 8007A84C AFA2001C */ sw $v0, 0x1c($sp) -/* AF19F0 8007A850 A04F0008 */ sb $t7, 8($v0) -/* AF19F4 8007A854 A04F000C */ sb $t7, 0xc($v0) -/* AF19F8 8007A858 93B9002B */ lbu $t9, 0x2b($sp) -/* AF19FC 8007A85C 00002025 */ move $a0, $zero -/* AF1A00 8007A860 00605825 */ move $t3, $v1 -/* AF1A04 8007A864 A059000D */ sb $t9, 0xd($v0) -/* AF1A08 8007A868 A0590009 */ sb $t9, 9($v0) -/* AF1A0C 8007A86C 93AD002F */ lbu $t5, 0x2f($sp) -/* AF1A10 8007A870 A0430000 */ sb $v1, ($v0) -/* AF1A14 8007A874 A04D000E */ sb $t5, 0xe($v0) -/* AF1A18 8007A878 18600031 */ blez $v1, .L8007A940 -/* AF1A1C 8007A87C A04D000A */ sb $t5, 0xa($v0) -/* AF1A20 8007A880 30630001 */ andi $v1, $v1, 1 -/* AF1A24 8007A884 10600011 */ beqz $v1, .L8007A8CC -/* AF1A28 8007A888 93AE0037 */ lbu $t6, 0x37($sp) -/* AF1A2C 8007A88C 93AF003B */ lbu $t7, 0x3b($sp) -/* AF1A30 8007A890 93B8003F */ lbu $t8, 0x3f($sp) -/* AF1A34 8007A894 83A80043 */ lb $t0, 0x43($sp) -/* AF1A38 8007A898 83A90047 */ lb $t1, 0x47($sp) -/* AF1A3C 8007A89C 83AA004B */ lb $t2, 0x4b($sp) -/* AF1A40 8007A8A0 24040001 */ li $a0, 1 -/* AF1A44 8007A8A4 A04E0010 */ sb $t6, 0x10($v0) -/* AF1A48 8007A8A8 A04E0014 */ sb $t6, 0x14($v0) -/* AF1A4C 8007A8AC A04F0011 */ sb $t7, 0x11($v0) -/* AF1A50 8007A8B0 A04F0015 */ sb $t7, 0x15($v0) -/* AF1A54 8007A8B4 A0580012 */ sb $t8, 0x12($v0) -/* AF1A58 8007A8B8 A0580016 */ sb $t8, 0x16($v0) -/* AF1A5C 8007A8BC A0480018 */ sb $t0, 0x18($v0) -/* AF1A60 8007A8C0 A0490019 */ sb $t1, 0x19($v0) -/* AF1A64 8007A8C4 108B001E */ beq $a0, $t3, .L8007A940 -/* AF1A68 8007A8C8 A04A001A */ sb $t2, 0x1a($v0) -.L8007A8CC: -/* AF1A6C 8007A8CC 0004C900 */ sll $t9, $a0, 4 -/* AF1A70 8007A8D0 00591821 */ addu $v1, $v0, $t9 -/* AF1A74 8007A8D4 93A50037 */ lbu $a1, 0x37($sp) -/* AF1A78 8007A8D8 93A6003B */ lbu $a2, 0x3b($sp) -/* AF1A7C 8007A8DC 93A7003F */ lbu $a3, 0x3f($sp) -/* AF1A80 8007A8E0 83A80043 */ lb $t0, 0x43($sp) -/* AF1A84 8007A8E4 83A90047 */ lb $t1, 0x47($sp) -/* AF1A88 8007A8E8 83AA004B */ lb $t2, 0x4b($sp) -.L8007A8EC: -/* AF1A8C 8007A8EC 24840002 */ addiu $a0, $a0, 2 -/* AF1A90 8007A8F0 A0650024 */ sb $a1, 0x24($v1) -/* AF1A94 8007A8F4 A0650020 */ sb $a1, 0x20($v1) -/* AF1A98 8007A8F8 A0660025 */ sb $a2, 0x25($v1) -/* AF1A9C 8007A8FC A0660021 */ sb $a2, 0x21($v1) -/* AF1AA0 8007A900 A0670026 */ sb $a3, 0x26($v1) -/* AF1AA4 8007A904 A0670022 */ sb $a3, 0x22($v1) -/* AF1AA8 8007A908 A0680028 */ sb $t0, 0x28($v1) -/* AF1AAC 8007A90C A0690029 */ sb $t1, 0x29($v1) -/* AF1AB0 8007A910 A06A002A */ sb $t2, 0x2a($v1) -/* AF1AB4 8007A914 24630020 */ addiu $v1, $v1, 0x20 -/* AF1AB8 8007A918 A065FFF4 */ sb $a1, -0xc($v1) -/* AF1ABC 8007A91C A065FFF0 */ sb $a1, -0x10($v1) -/* AF1AC0 8007A920 A066FFF5 */ sb $a2, -0xb($v1) -/* AF1AC4 8007A924 A066FFF1 */ sb $a2, -0xf($v1) -/* AF1AC8 8007A928 A067FFF6 */ sb $a3, -0xa($v1) -/* AF1ACC 8007A92C A067FFF2 */ sb $a3, -0xe($v1) -/* AF1AD0 8007A930 A068FFF8 */ sb $t0, -8($v1) -/* AF1AD4 8007A934 A069FFF9 */ sb $t1, -7($v1) -/* AF1AD8 8007A938 148BFFEC */ bne $a0, $t3, .L8007A8EC -/* AF1ADC 8007A93C A06AFFFA */ sb $t2, -6($v1) -.L8007A940: -/* AF1AE0 8007A940 8FA4001C */ lw $a0, 0x1c($sp) -/* AF1AE4 8007A944 0C01E7BF */ jal func_80079EFC -/* AF1AE8 8007A948 8FA50020 */ lw $a1, 0x20($sp) -/* AF1AEC 8007A94C 8FBF0014 */ lw $ra, 0x14($sp) -/* AF1AF0 8007A950 8FA2001C */ lw $v0, 0x1c($sp) -/* AF1AF4 8007A954 27BD0020 */ addiu $sp, $sp, 0x20 -/* AF1AF8 8007A958 03E00008 */ jr $ra -/* AF1AFC 8007A95C 00000000 */ nop - diff --git a/asm/non_matchings/code/z_lights/func_8007A960.s b/asm/non_matchings/code/z_lights/func_8007A960.s deleted file mode 100644 index a584d7e455..0000000000 --- a/asm/non_matchings/code/z_lights/func_8007A960.s +++ /dev/null @@ -1,23 +0,0 @@ -glabel func_8007A960 -/* AF1B00 8007A960 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* AF1B04 8007A964 AFBF0014 */ sw $ra, 0x14($sp) -/* AF1B08 8007A968 AFA5001C */ sw $a1, 0x1c($sp) -/* AF1B0C 8007A96C AFA60020 */ sw $a2, 0x20($sp) -/* AF1B10 8007A970 AFA70024 */ sw $a3, 0x24($sp) -/* AF1B14 8007A974 0C031A73 */ jal Graph_Alloc -/* AF1B18 8007A978 24050080 */ li $a1, 128 -/* AF1B1C 8007A97C 93AF001F */ lbu $t7, 0x1f($sp) -/* AF1B20 8007A980 A04F000C */ sb $t7, 0xc($v0) -/* AF1B24 8007A984 A04F0008 */ sb $t7, 8($v0) -/* AF1B28 8007A988 93B90023 */ lbu $t9, 0x23($sp) -/* AF1B2C 8007A98C A059000D */ sb $t9, 0xd($v0) -/* AF1B30 8007A990 A0590009 */ sb $t9, 9($v0) -/* AF1B34 8007A994 93A90027 */ lbu $t1, 0x27($sp) -/* AF1B38 8007A998 A0400000 */ sb $zero, ($v0) -/* AF1B3C 8007A99C A049000E */ sb $t1, 0xe($v0) -/* AF1B40 8007A9A0 A049000A */ sb $t1, 0xa($v0) -/* AF1B44 8007A9A4 8FBF0014 */ lw $ra, 0x14($sp) -/* AF1B48 8007A9A8 27BD0018 */ addiu $sp, $sp, 0x18 -/* AF1B4C 8007A9AC 03E00008 */ jr $ra -/* AF1B50 8007A9B0 00000000 */ nop - diff --git a/asm/non_matchings/code/z_lights/func_8007A9B4.s b/asm/non_matchings/code/z_lights/func_8007A9B4.s deleted file mode 100644 index 3d98da878d..0000000000 --- a/asm/non_matchings/code/z_lights/func_8007A9B4.s +++ /dev/null @@ -1,140 +0,0 @@ -.late_rodata -glabel D_8013C8F0 - .float 16352 - -.text -glabel func_8007A9B4 -/* AF1B54 8007A9B4 27BDFF58 */ addiu $sp, $sp, -0xa8 -/* AF1B58 8007A9B8 AFBF0064 */ sw $ra, 0x64($sp) -/* AF1B5C 8007A9BC AFBE0060 */ sw $fp, 0x60($sp) -/* AF1B60 8007A9C0 AFB7005C */ sw $s7, 0x5c($sp) -/* AF1B64 8007A9C4 AFB60058 */ sw $s6, 0x58($sp) -/* AF1B68 8007A9C8 AFB50054 */ sw $s5, 0x54($sp) -/* AF1B6C 8007A9CC AFB40050 */ sw $s4, 0x50($sp) -/* AF1B70 8007A9D0 AFB3004C */ sw $s3, 0x4c($sp) -/* AF1B74 8007A9D4 AFB20048 */ sw $s2, 0x48($sp) -/* AF1B78 8007A9D8 AFB10044 */ sw $s1, 0x44($sp) -/* AF1B7C 8007A9DC AFB00040 */ sw $s0, 0x40($sp) -/* AF1B80 8007A9E0 F7BC0038 */ sdc1 $f28, 0x38($sp) -/* AF1B84 8007A9E4 F7BA0030 */ sdc1 $f26, 0x30($sp) -/* AF1B88 8007A9E8 F7B80028 */ sdc1 $f24, 0x28($sp) -/* AF1B8C 8007A9EC F7B60020 */ sdc1 $f22, 0x20($sp) -/* AF1B90 8007A9F0 F7B40018 */ sdc1 $f20, 0x18($sp) -/* AF1B94 8007A9F4 AFA400A8 */ sw $a0, 0xa8($sp) -/* AF1B98 8007A9F8 8C9107A8 */ lw $s1, 0x7a8($a0) -/* AF1B9C 8007A9FC 3C178017 */ lui $s7, %hi(gZBuffer) # $s7, 0x8017 -/* AF1BA0 8007AA00 241E0001 */ li $fp, 1 -/* AF1BA4 8007AA04 1220005C */ beqz $s1, .L8007AB78 -/* AF1BA8 8007AA08 3C0142F0 */ li $at, 0x42F00000 # 0.000000 -/* AF1BAC 8007AA0C 4481E000 */ mtc1 $at, $f28 -/* AF1BB0 8007AA10 3C01C2F0 */ li $at, 0xC2F00000 # 0.000000 -/* AF1BB4 8007AA14 4481D000 */ mtc1 $at, $f26 -/* AF1BB8 8007AA18 3C018014 */ lui $at, %hi(D_8013C8F0) -/* AF1BBC 8007AA1C C438C8F0 */ lwc1 $f24, %lo(D_8013C8F0)($at) -/* AF1BC0 8007AA20 3C014320 */ li $at, 0x43200000 # 0.000000 -/* AF1BC4 8007AA24 4481B000 */ mtc1 $at, $f22 -/* AF1BC8 8007AA28 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* AF1BCC 8007AA2C 4481A000 */ mtc1 $at, $f20 -/* AF1BD0 8007AA30 26F759C0 */ addiu $s7, %lo(gZBuffer) # addiu $s7, $s7, 0x59c0 -/* AF1BD4 8007AA34 27B60084 */ addiu $s6, $sp, 0x84 -/* AF1BD8 8007AA38 27B50088 */ addiu $s5, $sp, 0x88 -/* AF1BDC 8007AA3C 27B40094 */ addiu $s4, $sp, 0x94 -/* AF1BE0 8007AA40 24130002 */ li $s3, 2 -/* AF1BE4 8007AA44 8E220000 */ lw $v0, ($s1) -.L8007AA48: -/* AF1BE8 8007AA48 904F0000 */ lbu $t7, ($v0) -/* AF1BEC 8007AA4C 24500002 */ addiu $s0, $v0, 2 -/* AF1BF0 8007AA50 566F0047 */ bnel $s3, $t7, .L8007AB70 -/* AF1BF4 8007AA54 8E310008 */ lw $s1, 8($s1) -/* AF1BF8 8007AA58 86180000 */ lh $t8, ($s0) -/* AF1BFC 8007AA5C 8FA400A8 */ lw $a0, 0xa8($sp) -/* AF1C00 8007AA60 02802825 */ move $a1, $s4 -/* AF1C04 8007AA64 44982000 */ mtc1 $t8, $f4 -/* AF1C08 8007AA68 02A03025 */ move $a2, $s5 -/* AF1C0C 8007AA6C 02C03825 */ move $a3, $s6 -/* AF1C10 8007AA70 468021A0 */ cvt.s.w $f6, $f4 -/* AF1C14 8007AA74 E7A60094 */ swc1 $f6, 0x94($sp) -/* AF1C18 8007AA78 86190002 */ lh $t9, 2($s0) -/* AF1C1C 8007AA7C 44994000 */ mtc1 $t9, $f8 -/* AF1C20 8007AA80 00000000 */ nop -/* AF1C24 8007AA84 468042A0 */ cvt.s.w $f10, $f8 -/* AF1C28 8007AA88 E7AA0098 */ swc1 $f10, 0x98($sp) -/* AF1C2C 8007AA8C 86080004 */ lh $t0, 4($s0) -/* AF1C30 8007AA90 44888000 */ mtc1 $t0, $f16 -/* AF1C34 8007AA94 00000000 */ nop -/* AF1C38 8007AA98 468084A0 */ cvt.s.w $f18, $f16 -/* AF1C3C 8007AA9C 0C00AF81 */ jal func_8002BE04 -/* AF1C40 8007AAA0 E7B2009C */ swc1 $f18, 0x9c($sp) -/* AF1C44 8007AAA4 A2000009 */ sb $zero, 9($s0) -/* AF1C48 8007AAA8 C7A40090 */ lwc1 $f4, 0x90($sp) -/* AF1C4C 8007AAAC C7A60088 */ lwc1 $f6, 0x88($sp) -/* AF1C50 8007AAB0 C7AE0084 */ lwc1 $f14, 0x84($sp) -/* AF1C54 8007AAB4 4604A03C */ c.lt.s $f20, $f4 -/* AF1C58 8007AAB8 00000000 */ nop -/* AF1C5C 8007AABC 4502002C */ bc1fl .L8007AB70 -/* AF1C60 8007AAC0 8E310008 */ lw $s1, 8($s1) -/* AF1C64 8007AAC4 460E3082 */ mul.s $f2, $f6, $f14 -/* AF1C68 8007AAC8 C7A8008C */ lwc1 $f8, 0x8c($sp) -/* AF1C6C 8007AACC 46001005 */ abs.s $f0, $f2 -/* AF1C70 8007AAD0 4614003C */ c.lt.s $f0, $f20 -/* AF1C74 8007AAD4 00000000 */ nop -/* AF1C78 8007AAD8 45020025 */ bc1fl .L8007AB70 -/* AF1C7C 8007AADC 8E310008 */ lw $s1, 8($s1) -/* AF1C80 8007AAE0 460E4302 */ mul.s $f12, $f8, $f14 -/* AF1C84 8007AAE4 46006005 */ abs.s $f0, $f12 -/* AF1C88 8007AAE8 4614003C */ c.lt.s $f0, $f20 -/* AF1C8C 8007AAEC 00000000 */ nop -/* AF1C90 8007AAF0 4502001F */ bc1fl .L8007AB70 -/* AF1C94 8007AAF4 8E310008 */ lw $s1, 8($s1) -/* AF1C98 8007AAF8 460E2282 */ mul.s $f10, $f4, $f14 -/* AF1C9C 8007AAFC 00000000 */ nop -/* AF1CA0 8007AB00 46185402 */ mul.s $f16, $f10, $f24 -/* AF1CA4 8007AB04 00000000 */ nop -/* AF1CA8 8007AB08 461A6182 */ mul.s $f6, $f12, $f26 -/* AF1CAC 8007AB0C 4600848D */ trunc.w.s $f18, $f16 -/* AF1CB0 8007AB10 46161282 */ mul.s $f10, $f2, $f22 -/* AF1CB4 8007AB14 461C3200 */ add.s $f8, $f6, $f28 -/* AF1CB8 8007AB18 44129000 */ mfc1 $s2, $f18 -/* AF1CBC 8007AB1C 4600410D */ trunc.w.s $f4, $f8 -/* AF1CC0 8007AB20 26523FE0 */ addiu $s2, $s2, 0x3fe0 -/* AF1CC4 8007AB24 46165400 */ add.s $f16, $f10, $f22 -/* AF1CC8 8007AB28 440B2000 */ mfc1 $t3, $f4 -/* AF1CCC 8007AB2C 4600848D */ trunc.w.s $f18, $f16 -/* AF1CD0 8007AB30 000B6080 */ sll $t4, $t3, 2 -/* AF1CD4 8007AB34 018B6021 */ addu $t4, $t4, $t3 -/* AF1CD8 8007AB38 000C61C0 */ sll $t4, $t4, 7 -/* AF1CDC 8007AB3C 440F9000 */ mfc1 $t7, $f18 -/* AF1CE0 8007AB40 02EC6821 */ addu $t5, $s7, $t4 -/* AF1CE4 8007AB44 000FC040 */ sll $t8, $t7, 1 -/* AF1CE8 8007AB48 01B8C821 */ addu $t9, $t5, $t8 -/* AF1CEC 8007AB4C 97240000 */ lhu $a0, ($t9) -/* AF1CF0 8007AB50 0C01BC28 */ jal func_8006F0A0 -/* AF1CF4 8007AB54 00042080 */ sll $a0, $a0, 2 -/* AF1CF8 8007AB58 000240C3 */ sra $t0, $v0, 3 -/* AF1CFC 8007AB5C 0248082A */ slt $at, $s2, $t0 -/* AF1D00 8007AB60 50200003 */ beql $at, $zero, .L8007AB70 -/* AF1D04 8007AB64 8E310008 */ lw $s1, 8($s1) -/* AF1D08 8007AB68 A21E0009 */ sb $fp, 9($s0) -/* AF1D0C 8007AB6C 8E310008 */ lw $s1, 8($s1) -.L8007AB70: -/* AF1D10 8007AB70 5620FFB5 */ bnezl $s1, .L8007AA48 -/* AF1D14 8007AB74 8E220000 */ lw $v0, ($s1) -.L8007AB78: -/* AF1D18 8007AB78 8FBF0064 */ lw $ra, 0x64($sp) -/* AF1D1C 8007AB7C D7B40018 */ ldc1 $f20, 0x18($sp) -/* AF1D20 8007AB80 D7B60020 */ ldc1 $f22, 0x20($sp) -/* AF1D24 8007AB84 D7B80028 */ ldc1 $f24, 0x28($sp) -/* AF1D28 8007AB88 D7BA0030 */ ldc1 $f26, 0x30($sp) -/* AF1D2C 8007AB8C D7BC0038 */ ldc1 $f28, 0x38($sp) -/* AF1D30 8007AB90 8FB00040 */ lw $s0, 0x40($sp) -/* AF1D34 8007AB94 8FB10044 */ lw $s1, 0x44($sp) -/* AF1D38 8007AB98 8FB20048 */ lw $s2, 0x48($sp) -/* AF1D3C 8007AB9C 8FB3004C */ lw $s3, 0x4c($sp) -/* AF1D40 8007ABA0 8FB40050 */ lw $s4, 0x50($sp) -/* AF1D44 8007ABA4 8FB50054 */ lw $s5, 0x54($sp) -/* AF1D48 8007ABA8 8FB60058 */ lw $s6, 0x58($sp) -/* AF1D4C 8007ABAC 8FB7005C */ lw $s7, 0x5c($sp) -/* AF1D50 8007ABB0 8FBE0060 */ lw $fp, 0x60($sp) -/* AF1D54 8007ABB4 03E00008 */ jr $ra -/* AF1D58 8007ABB8 27BD00A8 */ addiu $sp, $sp, 0xa8 - diff --git a/asm/non_matchings/code/z_lights/func_8007ABBC.s b/asm/non_matchings/code/z_lights/func_8007ABBC.s deleted file mode 100644 index 06c6a7433f..0000000000 --- a/asm/non_matchings/code/z_lights/func_8007ABBC.s +++ /dev/null @@ -1,168 +0,0 @@ -.rdata -glabel D_8013C8C0 - .asciz "../z_lights.c" - .balign 4 - -glabel D_8013C8D0 - .asciz "../z_lights.c" - .balign 4 - -glabel D_8013C8E0 - .asciz "../z_lights.c" - .balign 4 - -.late_rodata -glabel D_8013C8F4 - .float 2.6E-6 - -.text -glabel func_8007ABBC -/* AF1D5C 8007ABBC 27BDFF50 */ addiu $sp, $sp, -0xb0 -/* AF1D60 8007ABC0 AFB00028 */ sw $s0, 0x28($sp) -/* AF1D64 8007ABC4 AFBF004C */ sw $ra, 0x4c($sp) -/* AF1D68 8007ABC8 AFBE0048 */ sw $fp, 0x48($sp) -/* AF1D6C 8007ABCC AFB70044 */ sw $s7, 0x44($sp) -/* AF1D70 8007ABD0 AFB60040 */ sw $s6, 0x40($sp) -/* AF1D74 8007ABD4 AFB5003C */ sw $s5, 0x3c($sp) -/* AF1D78 8007ABD8 AFB40038 */ sw $s4, 0x38($sp) -/* AF1D7C 8007ABDC AFB30034 */ sw $s3, 0x34($sp) -/* AF1D80 8007ABE0 AFB20030 */ sw $s2, 0x30($sp) -/* AF1D84 8007ABE4 AFB1002C */ sw $s1, 0x2c($sp) -/* AF1D88 8007ABE8 F7B60020 */ sdc1 $f22, 0x20($sp) -/* AF1D8C 8007ABEC F7B40018 */ sdc1 $f20, 0x18($sp) -/* AF1D90 8007ABF0 8C850000 */ lw $a1, ($a0) -/* AF1D94 8007ABF4 00808025 */ move $s0, $a0 -/* AF1D98 8007ABF8 8C9307A8 */ lw $s3, 0x7a8($a0) -/* AF1D9C 8007ABFC 3C068014 */ lui $a2, %hi(D_8013C8C0) # $a2, 0x8014 -/* AF1DA0 8007AC00 24C6C8C0 */ addiu $a2, %lo(D_8013C8C0) # addiu $a2, $a2, -0x3740 -/* AF1DA4 8007AC04 AFB000B0 */ sw $s0, 0xb0($sp) -/* AF1DA8 8007AC08 27A40094 */ addiu $a0, $sp, 0x94 -/* AF1DAC 8007AC0C 24070377 */ li $a3, 887 -/* AF1DB0 8007AC10 0C031AB1 */ jal Graph_OpenDisps -/* AF1DB4 8007AC14 00A08825 */ move $s1, $a1 -/* AF1DB8 8007AC18 8E2702D0 */ lw $a3, 0x2d0($s1) -/* AF1DBC 8007AC1C 24EE0008 */ addiu $t6, $a3, 8 -/* AF1DC0 8007AC20 AE2E02D0 */ sw $t6, 0x2d0($s1) -/* AF1DC4 8007AC24 0C0251EB */ jal func_800947AC -/* AF1DC8 8007AC28 00E02025 */ move $a0, $a3 -/* AF1DCC 8007AC2C AE2202D0 */ sw $v0, 0x2d0($s1) -/* AF1DD0 8007AC30 244F0008 */ addiu $t7, $v0, 8 -/* AF1DD4 8007AC34 AE2F02D0 */ sw $t7, 0x2d0($s1) -/* AF1DD8 8007AC38 3C18E300 */ lui $t8, (0xE3001A01 >> 16) # lui $t8, 0xe300 -/* AF1DDC 8007AC3C 37181A01 */ ori $t8, (0xE3001A01 & 0xFFFF) # ori $t8, $t8, 0x1a01 -/* AF1DE0 8007AC40 24190020 */ li $t9, 32 -/* AF1DE4 8007AC44 AC590004 */ sw $t9, 4($v0) -/* AF1DE8 8007AC48 AC580000 */ sw $t8, ($v0) -/* AF1DEC 8007AC4C 8E2702D0 */ lw $a3, 0x2d0($s1) -/* AF1DF0 8007AC50 3C09E300 */ lui $t1, (0xE3001801 >> 16) # lui $t1, 0xe300 -/* AF1DF4 8007AC54 35291801 */ ori $t1, (0xE3001801 & 0xFFFF) # ori $t1, $t1, 0x1801 -/* AF1DF8 8007AC58 24E80008 */ addiu $t0, $a3, 8 -/* AF1DFC 8007AC5C AE2802D0 */ sw $t0, 0x2d0($s1) -/* AF1E00 8007AC60 ACE00004 */ sw $zero, 4($a3) -/* AF1E04 8007AC64 ACE90000 */ sw $t1, ($a3) -/* AF1E08 8007AC68 8E2702D0 */ lw $a3, 0x2d0($s1) -/* AF1E0C 8007AC6C 3C0B0401 */ lui $t3, %hi(D_04015720) # $t3, 0x401 -/* AF1E10 8007AC70 256B5720 */ addiu $t3, %lo(D_04015720) # addiu $t3, $t3, 0x5720 -/* AF1E14 8007AC74 24EA0008 */ addiu $t2, $a3, 8 -/* AF1E18 8007AC78 AE2A02D0 */ sw $t2, 0x2d0($s1) -/* AF1E1C 8007AC7C 3C1EDE00 */ lui $fp, 0xde00 -/* AF1E20 8007AC80 ACFE0000 */ sw $fp, ($a3) -/* AF1E24 8007AC84 1260004A */ beqz $s3, .L8007ADB0 -/* AF1E28 8007AC88 ACEB0004 */ sw $t3, 4($a3) -/* AF1E2C 8007AC8C 3C018014 */ lui $at, %hi(D_8013C8F4) -/* AF1E30 8007AC90 3C178014 */ lui $s7, %hi(D_8013C8D0) # $s7, 0x8014 -/* AF1E34 8007AC94 3C16DA38 */ lui $s6, (0xDA380003 >> 16) # lui $s6, 0xda38 -/* AF1E38 8007AC98 36D60003 */ ori $s6, (0xDA380003 & 0xFFFF) # ori $s6, $s6, 3 -/* AF1E3C 8007AC9C 26F7C8D0 */ addiu $s7, %lo(D_8013C8D0) # addiu $s7, $s7, -0x3730 -/* AF1E40 8007ACA0 C436C8F4 */ lwc1 $f22, %lo(D_8013C8F4)($at) -/* AF1E44 8007ACA4 3C15FA00 */ lui $s5, 0xfa00 -/* AF1E48 8007ACA8 24140002 */ li $s4, 2 -/* AF1E4C 8007ACAC 8E630000 */ lw $v1, ($s3) -.L8007ACB0: -/* AF1E50 8007ACB0 906C0000 */ lbu $t4, ($v1) -/* AF1E54 8007ACB4 24620002 */ addiu $v0, $v1, 2 -/* AF1E58 8007ACB8 568C003B */ bnel $s4, $t4, .L8007ADA8 -/* AF1E5C 8007ACBC 8E730008 */ lw $s3, 8($s3) -/* AF1E60 8007ACC0 904D0009 */ lbu $t5, 9($v0) -/* AF1E64 8007ACC4 51A00038 */ beql $t5, $zero, .L8007ADA8 -/* AF1E68 8007ACC8 8E730008 */ lw $s3, 8($s3) -/* AF1E6C 8007ACCC 8443000A */ lh $v1, 0xa($v0) -/* AF1E70 8007ACD0 8E2702D0 */ lw $a3, 0x2d0($s1) -/* AF1E74 8007ACD4 3C120401 */ li $s2, 0x04010000 # 0.000000 -/* AF1E78 8007ACD8 00630019 */ multu $v1, $v1 -/* AF1E7C 8007ACDC 24EF0008 */ addiu $t7, $a3, 8 -/* AF1E80 8007ACE0 AE2F02D0 */ sw $t7, 0x2d0($s1) -/* AF1E84 8007ACE4 ACF50000 */ sw $s5, ($a3) -/* AF1E88 8007ACE8 904A0006 */ lbu $t2, 6($v0) -/* AF1E8C 8007ACEC 90590008 */ lbu $t9, 8($v0) -/* AF1E90 8007ACF0 26525760 */ addiu $s2, %lo(D_04015760) # addiu $s2, $s2, 0x5760 -/* AF1E94 8007ACF4 000A5E00 */ sll $t3, $t2, 0x18 -/* AF1E98 8007ACF8 00194200 */ sll $t0, $t9, 8 -/* AF1E9C 8007ACFC 010B6025 */ or $t4, $t0, $t3 -/* AF1EA0 8007AD00 00007012 */ mflo $t6 -/* AF1EA4 8007AD04 448E2000 */ mtc1 $t6, $f4 -/* AF1EA8 8007AD08 904E0007 */ lbu $t6, 7($v0) -/* AF1EAC 8007AD0C 468021A0 */ cvt.s.w $f6, $f4 -/* AF1EB0 8007AD10 000E7C00 */ sll $t7, $t6, 0x10 -/* AF1EB4 8007AD14 018FC025 */ or $t8, $t4, $t7 -/* AF1EB8 8007AD18 37190032 */ ori $t9, $t8, 0x32 -/* AF1EBC 8007AD1C ACF90004 */ sw $t9, 4($a3) -/* AF1EC0 8007AD20 84480004 */ lh $t0, 4($v0) -/* AF1EC4 8007AD24 844A0002 */ lh $t2, 2($v0) -/* AF1EC8 8007AD28 84490000 */ lh $t1, ($v0) -/* AF1ECC 8007AD2C 44888000 */ mtc1 $t0, $f16 -/* AF1ED0 8007AD30 448A5000 */ mtc1 $t2, $f10 -/* AF1ED4 8007AD34 44894000 */ mtc1 $t1, $f8 -/* AF1ED8 8007AD38 46808420 */ cvt.s.w $f16, $f16 -/* AF1EDC 8007AD3C 46163502 */ mul.s $f20, $f6, $f22 -/* AF1EE0 8007AD40 00003825 */ move $a3, $zero -/* AF1EE4 8007AD44 44068000 */ mfc1 $a2, $f16 -/* AF1EE8 8007AD48 468053A0 */ cvt.s.w $f14, $f10 -/* AF1EEC 8007AD4C 0C034261 */ jal Matrix_Translate -/* AF1EF0 8007AD50 46804320 */ cvt.s.w $f12, $f8 -/* AF1EF4 8007AD54 4406A000 */ mfc1 $a2, $f20 -/* AF1EF8 8007AD58 4600A306 */ mov.s $f12, $f20 -/* AF1EFC 8007AD5C 4600A386 */ mov.s $f14, $f20 -/* AF1F00 8007AD60 0C0342A3 */ jal Matrix_Scale -/* AF1F04 8007AD64 24070001 */ li $a3, 1 -/* AF1F08 8007AD68 8E3002D0 */ lw $s0, 0x2d0($s1) -/* AF1F0C 8007AD6C 02E02825 */ move $a1, $s7 -/* AF1F10 8007AD70 24060396 */ li $a2, 918 -/* AF1F14 8007AD74 260B0008 */ addiu $t3, $s0, 8 -/* AF1F18 8007AD78 AE2B02D0 */ sw $t3, 0x2d0($s1) -/* AF1F1C 8007AD7C AE160000 */ sw $s6, ($s0) -/* AF1F20 8007AD80 8FAD00B0 */ lw $t5, 0xb0($sp) -/* AF1F24 8007AD84 0C0346A2 */ jal Matrix_NewMtx -/* AF1F28 8007AD88 8DA40000 */ lw $a0, ($t5) -/* AF1F2C 8007AD8C AE020004 */ sw $v0, 4($s0) -/* AF1F30 8007AD90 8E2702D0 */ lw $a3, 0x2d0($s1) -/* AF1F34 8007AD94 24EE0008 */ addiu $t6, $a3, 8 -/* AF1F38 8007AD98 AE2E02D0 */ sw $t6, 0x2d0($s1) -/* AF1F3C 8007AD9C ACF20004 */ sw $s2, 4($a3) -/* AF1F40 8007ADA0 ACFE0000 */ sw $fp, ($a3) -/* AF1F44 8007ADA4 8E730008 */ lw $s3, 8($s3) -.L8007ADA8: -/* AF1F48 8007ADA8 5660FFC1 */ bnezl $s3, .L8007ACB0 -/* AF1F4C 8007ADAC 8E630000 */ lw $v1, ($s3) -.L8007ADB0: -/* AF1F50 8007ADB0 8FAC00B0 */ lw $t4, 0xb0($sp) -/* AF1F54 8007ADB4 3C068014 */ lui $a2, %hi(D_8013C8E0) # $a2, 0x8014 -/* AF1F58 8007ADB8 24C6C8E0 */ addiu $a2, %lo(D_8013C8E0) # addiu $a2, $a2, -0x3720 -/* AF1F5C 8007ADBC 27A40094 */ addiu $a0, $sp, 0x94 -/* AF1F60 8007ADC0 2407039F */ li $a3, 927 -/* AF1F64 8007ADC4 0C031AD5 */ jal Graph_CloseDisps -/* AF1F68 8007ADC8 8D850000 */ lw $a1, ($t4) -/* AF1F6C 8007ADCC 8FBF004C */ lw $ra, 0x4c($sp) -/* AF1F70 8007ADD0 D7B40018 */ ldc1 $f20, 0x18($sp) -/* AF1F74 8007ADD4 D7B60020 */ ldc1 $f22, 0x20($sp) -/* AF1F78 8007ADD8 8FB00028 */ lw $s0, 0x28($sp) -/* AF1F7C 8007ADDC 8FB1002C */ lw $s1, 0x2c($sp) -/* AF1F80 8007ADE0 8FB20030 */ lw $s2, 0x30($sp) -/* AF1F84 8007ADE4 8FB30034 */ lw $s3, 0x34($sp) -/* AF1F88 8007ADE8 8FB40038 */ lw $s4, 0x38($sp) -/* AF1F8C 8007ADEC 8FB5003C */ lw $s5, 0x3c($sp) -/* AF1F90 8007ADF0 8FB60040 */ lw $s6, 0x40($sp) -/* AF1F94 8007ADF4 8FB70044 */ lw $s7, 0x44($sp) -/* AF1F98 8007ADF8 8FBE0048 */ lw $fp, 0x48($sp) -/* AF1F9C 8007ADFC 03E00008 */ jr $ra -/* AF1FA0 8007AE00 27BD00B0 */ addiu $sp, $sp, 0xb0 diff --git a/asm/non_matchings/code/z_play/Gameplay_Draw.s b/asm/non_matchings/code/z_play/Gameplay_Draw.s index c8d80e5c36..fa2e1d8ae0 100644 --- a/asm/non_matchings/code/z_play/Gameplay_Draw.s +++ b/asm/non_matchings/code/z_play/Gameplay_Draw.s @@ -530,15 +530,15 @@ glabel Gameplay_Draw /* B36728 800BF588 1160000E */ beqz $t3, .L800BF5C4 /* B3672C 800BF58C 260407A8 */ addiu $a0, $s0, 0x7a8 .L800BF590: -/* B36730 800BF590 0C01E9B1 */ jal Lights_CreateMapper +/* B36730 800BF590 0C01E9B1 */ jal LightContext_NewLights /* B36734 800BF594 02202825 */ move $a1, $s1 /* B36738 800BF598 AFA20228 */ sw $v0, 0x228($sp) /* B3673C 800BF59C 8E0507A8 */ lw $a1, 0x7a8($s0) /* B36740 800BF5A0 00402025 */ move $a0, $v0 -/* B36744 800BF5A4 0C01E91D */ jal func_8007A474 +/* B36744 800BF5A4 0C01E91D */ jal Lights_BindAll /* B36748 800BF5A8 00003025 */ move $a2, $zero /* B3674C 800BF5AC 8FA40228 */ lw $a0, 0x228($sp) -/* B36750 800BF5B0 0C01E7BF */ jal func_80079EFC +/* B36750 800BF5B0 0C01E7BF */ jal Lights_Draw /* B36754 800BF5B4 02202825 */ move $a1, $s1 /* B36758 800BF5B8 3C028016 */ lui $v0, %hi(gGameInfo) # $v0, 0x8016 /* B3675C 800BF5BC 8C42FA90 */ lw $v0, %lo(gGameInfo)($v0) diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Po_Syokudai/BgPoSyokudai_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Bg_Po_Syokudai/BgPoSyokudai_Destroy.s index e315207659..b1ec8fd61d 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Po_Syokudai/BgPoSyokudai_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Po_Syokudai/BgPoSyokudai_Destroy.s @@ -7,7 +7,7 @@ glabel BgPoSyokudai_Destroy /* 002B0 808A8360 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 /* 002B4 808A8364 8DC60150 */ lw $a2, 0x0150($t6) ## 00000150 /* 002B8 808A8368 AFA7001C */ sw $a3, 0x001C($sp) -/* 002BC 808A836C 0C01E9F1 */ jal Lights_Remove +/* 002BC 808A836C 0C01E9F1 */ jal LightContext_RemoveLight /* 002C0 808A8370 24A507A8 */ addiu $a1, $a1, 0x07A8 ## $a1 = 000007A8 /* 002C4 808A8374 8FA50018 */ lw $a1, 0x0018($sp) /* 002C8 808A8378 8FA4001C */ lw $a0, 0x001C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Po_Syokudai/BgPoSyokudai_Draw.s b/asm/non_matchings/overlays/actors/ovl_Bg_Po_Syokudai/BgPoSyokudai_Draw.s index 9ed203ebb1..530e2bddf9 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Po_Syokudai/BgPoSyokudai_Draw.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Po_Syokudai/BgPoSyokudai_Draw.s @@ -235,7 +235,7 @@ glabel BgPoSyokudai_Draw .L808A8734: /* 00684 808A8734 44CBF800 */ ctc1 $t3, $31 /* 00688 808A8738 30E700FF */ andi $a3, $a3, 0x00FF ## $a3 = 000000FF -/* 0068C 808A873C 0C01E796 */ jal Lights_SetPositionalLightColorAndRadius +/* 0068C 808A873C 0C01E796 */ jal Lights_PointSetColorAndRadius /* 00690 808A8740 AFAC0010 */ sw $t4, 0x0010($sp) /* 00694 808A8744 0C024F61 */ jal func_80093D84 /* 00698 808A8748 8E240000 */ lw $a0, 0x0000($s1) ## 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Po_Syokudai/BgPoSyokudai_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Po_Syokudai/BgPoSyokudai_Init.s index 1d85462429..34e87938f8 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Po_Syokudai/BgPoSyokudai_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Po_Syokudai/BgPoSyokudai_Init.s @@ -25,7 +25,7 @@ glabel BgPoSyokudai_Init /* 00044 808A80F4 26060154 */ addiu $a2, $s0, 0x0154 ## $a2 = 00000154 /* 00048 808A80F8 AFA6003C */ sw $a2, 0x003C($sp) /* 0004C 808A80FC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00050 808A8100 0C01E9D9 */ jal Lights_Insert +/* 00050 808A8100 0C01E9D9 */ jal LightContext_InsertLight /* 00054 808A8104 262507A8 */ addiu $a1, $s1, 0x07A8 ## $a1 = 000007A8 /* 00058 808A8108 C6080028 */ lwc1 $f8, 0x0028($s0) ## 00000028 /* 0005C 808A810C C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024 @@ -50,7 +50,7 @@ glabel BgPoSyokudai_Init /* 000A8 808A8158 00063403 */ sra $a2, $a2, 16 /* 000AC 808A815C AFA00014 */ sw $zero, 0x0014($sp) /* 000B0 808A8160 AFA00010 */ sw $zero, 0x0010($sp) -/* 000B4 808A8164 0C01E77C */ jal Lights_InitType2PositionalLight +/* 000B4 808A8164 0C01E77C */ jal Lights_PointGlowSetInfo /* 000B8 808A8168 8FA4003C */ lw $a0, 0x003C($sp) /* 000BC 808A816C 26050164 */ addiu $a1, $s0, 0x0164 ## $a1 = 00000164 /* 000C0 808A8170 AFA5003C */ sw $a1, 0x003C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Destroy.s index eb8b5c2e9e..88e78713ca 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Destroy.s @@ -17,7 +17,7 @@ glabel BgSpot00Hanebasi_Destroy /* 00444 808A9BC4 24E507A8 */ addiu $a1, $a3, 0x07A8 ## $a1 = 000007A8 /* 00448 808A9BC8 05E20004 */ bltzl $t7, .L808A9BDC /* 0044C 808A9BCC 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00450 808A9BD0 0C01E9F1 */ jal Lights_Remove +/* 00450 808A9BD0 0C01E9F1 */ jal LightContext_RemoveLight /* 00454 808A9BD4 8C46016C */ lw $a2, 0x016C($v0) ## 0000016C /* 00458 808A9BD8 8FBF0014 */ lw $ra, 0x0014($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Init.s index 56ec96f233..4ec23b8b70 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Init.s @@ -261,7 +261,7 @@ glabel BgSpot00Hanebasi_Init /* 00384 808A9B04 26060170 */ addiu $a2, $s0, 0x0170 ## $a2 = 00000170 /* 00388 808A9B08 0500001B */ bltz $t0, .L808A9B78 /* 0038C 808A9B0C 248507A8 */ addiu $a1, $a0, 0x07A8 ## $a1 = 000007A8 -/* 00390 808A9B10 0C01E9D9 */ jal Lights_Insert +/* 00390 808A9B10 0C01E9D9 */ jal LightContext_InsertLight /* 00394 808A9B14 AFA60048 */ sw $a2, 0x0048($sp) /* 00398 808A9B18 8609001C */ lh $t1, 0x001C($s0) ## 0000001C @@ -288,7 +288,7 @@ glabel BgSpot00Hanebasi_Init /* 003E4 808A9B64 00052C00 */ sll $a1, $a1, 16 /* 003E8 808A9B68 00052C03 */ sra $a1, $a1, 16 /* 003EC 808A9B6C AFA00018 */ sw $zero, 0x0018($sp) -/* 003F0 808A9B70 0C01E77C */ jal Lights_InitType2PositionalLight +/* 003F0 808A9B70 0C01E77C */ jal Lights_PointGlowSetInfo /* 003F4 808A9B74 AFA0001C */ sw $zero, 0x001C($sp) .L808A9B78: diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9E58.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9E58.s index 7091bc952a..73f9cd4a32 100644 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9E58.s +++ b/asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9E58.s @@ -92,7 +92,7 @@ glabel func_808A9E58 /* 00808 808A9F88 44099000 */ mfc1 $t1, $f18 /* 0080C 808A9F8C 00063400 */ sll $a2, $a2, 16 /* 00810 808A9F90 00063403 */ sra $a2, $a2, 16 -/* 00814 808A9F94 0C01E77C */ jal Lights_InitType2PositionalLight +/* 00814 808A9F94 0C01E77C */ jal Lights_PointGlowSetInfo /* 00818 808A9F98 AFA9001C */ sw $t1, 0x001C($sp) /* 0081C 808A9F9C 8FBF0024 */ lw $ra, 0x0024($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Destroy.s index 0275303947..16ac3edcf3 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Destroy.s @@ -35,7 +35,7 @@ glabel BossGanondrof_Destroy /* 0070C 80910D4C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 /* 00710 80910D50 15C10003 */ bne $t6, $at, .L80910D60 /* 00714 80910D54 262507A8 */ addiu $a1, $s1, 0x07A8 ## $a1 = 000007A8 -/* 00718 80910D58 0C01E9F1 */ jal Lights_Remove +/* 00718 80910D58 0C01E9F1 */ jal LightContext_RemoveLight /* 0071C 80910D5C 8E0604CC */ lw $a2, 0x04CC($s0) ## 000004CC .L80910D60: diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Init.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Init.s index d214212835..2aa53c957c 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Init.s @@ -51,7 +51,7 @@ glabel BossGanondrof_Init /* 004C4 80910B04 A21800AF */ sb $t8, 0x00AF($s0) ## 000000AF /* 004C8 80910B08 260604D0 */ addiu $a2, $s0, 0x04D0 ## $a2 = 000004D0 /* 004CC 80910B0C AFA60044 */ sw $a2, 0x0044($sp) -/* 004D0 80910B10 0C01E9D9 */ jal Lights_Insert +/* 004D0 80910B10 0C01E9D9 */ jal LightContext_InsertLight /* 004D4 80910B14 262507A8 */ addiu $a1, $s1, 0x07A8 ## $a1 = 000007A8 /* 004D8 80910B18 C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024 @@ -78,7 +78,7 @@ glabel BossGanondrof_Init /* 0052C 80910B6C AFAC0018 */ sw $t4, 0x0018($sp) /* 00530 80910B70 AFAB0014 */ sw $t3, 0x0014($sp) /* 00534 80910B74 AFAA0010 */ sw $t2, 0x0010($sp) -/* 00538 80910B78 0C01E763 */ jal Lights_InitType0PositionalLight +/* 00538 80910B78 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 0053C 80910B7C 8FA40044 */ lw $a0, 0x0044($sp) /* 00540 80910B80 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Update.s b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Update.s index ee06bddc55..f6b9afe740 100644 --- a/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_Boss_Ganondrof/BossGanondrof_Update.s @@ -329,7 +329,7 @@ glabel BossGanondrof_Update /* 03C74 809142B4 AFB9001C */ sw $t9, 0x001C($sp) /* 03C78 809142B8 AFA90018 */ sw $t1, 0x0018($sp) /* 03C7C 809142BC AFA80014 */ sw $t0, 0x0014($sp) -/* 03C80 809142C0 0C01E763 */ jal Lights_InitType0PositionalLight +/* 03C80 809142C0 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 03C84 809142C4 AFB80010 */ sw $t8, 0x0010($sp) .L809142C8: diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_6K/Demo6K_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Demo_6K/Demo6K_Destroy.s index 3320c4128a..40e09b7ded 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_6K/Demo6K_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_6K/Demo6K_Destroy.s @@ -5,7 +5,7 @@ glabel Demo6K_Destroy /* 0043C 80966D8C AFBF0014 */ sw $ra, 0x0014($sp) /* 00440 80966D90 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 /* 00444 80966D94 24A507A8 */ addiu $a1, $a1, 0x07A8 ## $a1 = 000007A8 -/* 00448 80966D98 0C01E9F1 */ jal Lights_Remove +/* 00448 80966D98 0C01E9F1 */ jal LightContext_RemoveLight /* 0044C 80966D9C 8DC60160 */ lw $a2, 0x0160($t6) ## 00000160 /* 00450 80966DA0 8FBF0014 */ lw $ra, 0x0014($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_6K/Demo6K_Init.s b/asm/non_matchings/overlays/actors/ovl_Demo_6K/Demo6K_Init.s index 2d06598eb5..9553545fa2 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_6K/Demo6K_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_6K/Demo6K_Init.s @@ -339,12 +339,12 @@ glabel L80966C48 /* 003F4 80966D44 AFAC001C */ sw $t4, 0x001C($sp) /* 003F8 80966D48 AFAB0018 */ sw $t3, 0x0018($sp) /* 003FC 80966D4C AFAA0014 */ sw $t2, 0x0014($sp) -/* 00400 80966D50 0C01E763 */ jal Lights_InitType0PositionalLight +/* 00400 80966D50 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 00404 80966D54 AFA90010 */ sw $t1, 0x0010($sp) /* 00408 80966D58 8FA40054 */ lw $a0, 0x0054($sp) /* 0040C 80966D5C 02003025 */ or $a2, $s0, $zero ## $a2 = 00000150 -/* 00410 80966D60 0C01E9D9 */ jal Lights_Insert +/* 00410 80966D60 0C01E9D9 */ jal LightContext_InsertLight /* 00414 80966D64 248507A8 */ addiu $a1, $a0, 0x07A8 ## $a1 = 000007A8 /* 00418 80966D68 AE220160 */ sw $v0, 0x0160($s1) ## 00000160 diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_809674E0.s b/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_809674E0.s index b3a26e9fe1..1a3b7a5692 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_809674E0.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_809674E0.s @@ -130,7 +130,7 @@ glabel func_809674E0 /* 00D2C 8096767C 00073C03 */ sra $a3, $a3, 16 /* 00D30 80967680 26040150 */ addiu $a0, $s0, 0x0150 ## $a0 = 00000150 /* 00D34 80967684 44085000 */ mfc1 $t0, $f10 -/* 00D38 80967688 0C01E763 */ jal Lights_InitType0PositionalLight +/* 00D38 80967688 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 00D3C 8096768C AFA8001C */ sw $t0, 0x001C($sp) /* 00D40 80967690 8FBF002C */ lw $ra, 0x002C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_8096784C.s b/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_8096784C.s index 42b0f025b1..dfcc8de93c 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_8096784C.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_8096784C.s @@ -131,7 +131,7 @@ glabel func_8096784C /* 0108C 809679DC 00073C03 */ sra $a3, $a3, 16 /* 01090 809679E0 00063403 */ sra $a2, $a2, 16 /* 01094 809679E4 44082000 */ mfc1 $t0, $f4 -/* 01098 809679E8 0C01E763 */ jal Lights_InitType0PositionalLight +/* 01098 809679E8 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 0109C 809679EC AFA8001C */ sw $t0, 0x001C($sp) /* 010A0 809679F0 8FBF002C */ lw $ra, 0x002C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_80967DBC.s b/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_80967DBC.s index bbe33a904f..e94dccfba1 100644 --- a/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_80967DBC.s +++ b/asm/non_matchings/overlays/actors/ovl_Demo_6K/func_80967DBC.s @@ -98,7 +98,7 @@ glabel func_80967DBC /* 01598 80967EE8 00063403 */ sra $a2, $a2, 16 /* 0159C 80967EEC 00052C03 */ sra $a1, $a1, 16 /* 015A0 80967EF0 26040150 */ addiu $a0, $s0, 0x0150 ## $a0 = 00000150 -/* 015A4 80967EF4 0C01E763 */ jal Lights_InitType0PositionalLight +/* 015A4 80967EF4 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 015A8 80967EF8 AFB8001C */ sw $t8, 0x001C($sp) .L80967EFC: diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/DoorWarp1_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/DoorWarp1_Destroy.s index ce2341a99a..c9fe12a621 100644 --- a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/DoorWarp1_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/DoorWarp1_Destroy.s @@ -8,13 +8,13 @@ glabel DoorWarp1_Destroy /* 0019C 8099891C 24A507A8 */ addiu $a1, $a1, 0x07A8 ## $a1 = 000007A8 /* 001A0 80998920 8DC601C4 */ lw $a2, 0x01C4($t6) ## 000001C4 /* 001A4 80998924 AFA7002C */ sw $a3, 0x002C($sp) -/* 001A8 80998928 0C01E9F1 */ jal Lights_Remove +/* 001A8 80998928 0C01E9F1 */ jal LightContext_RemoveLight /* 001AC 8099892C AFA50018 */ sw $a1, 0x0018($sp) /* 001B0 80998930 8FAF0028 */ lw $t7, 0x0028($sp) /* 001B4 80998934 8FA50018 */ lw $a1, 0x0018($sp) /* 001B8 80998938 8FA4002C */ lw $a0, 0x002C($sp) -/* 001BC 8099893C 0C01E9F1 */ jal Lights_Remove +/* 001BC 8099893C 0C01E9F1 */ jal LightContext_RemoveLight /* 001C0 80998940 8DE601D8 */ lw $a2, 0x01D8($t7) ## 000001D8 /* 001C4 80998944 8FA7002C */ lw $a3, 0x002C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/DoorWarp1_Init.s b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/DoorWarp1_Init.s index 3040efd43a..52545e3eff 100644 --- a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/DoorWarp1_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/DoorWarp1_Init.s @@ -55,13 +55,13 @@ glabel DoorWarp1_Init /* 000BC 8099883C 00073C00 */ sll $a3, $a3, 16 /* 000C0 80998840 00073C03 */ sra $a3, $a3, 16 /* 000C4 80998844 AFA00014 */ sw $zero, 0x0014($sp) -/* 000C8 80998848 0C01E763 */ jal Lights_InitType0PositionalLight +/* 000C8 80998848 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 000CC 8099884C AFA00010 */ sw $zero, 0x0010($sp) /* 000D0 80998850 262507A8 */ addiu $a1, $s1, 0x07A8 ## $a1 = 000007A8 /* 000D4 80998854 AFA50034 */ sw $a1, 0x0034($sp) /* 000D8 80998858 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 000DC 8099885C 0C01E9D9 */ jal Lights_Insert +/* 000DC 8099885C 0C01E9D9 */ jal LightContext_InsertLight /* 000E0 80998860 8FA60030 */ lw $a2, 0x0030($sp) /* 000E4 80998864 C6060024 */ lwc1 $f6, 0x0024($s0) ## 00000024 @@ -85,12 +85,12 @@ glabel DoorWarp1_Init /* 0012C 809988AC AFA0001C */ sw $zero, 0x001C($sp) /* 00130 809988B0 AFA00018 */ sw $zero, 0x0018($sp) /* 00134 809988B4 AFA00014 */ sw $zero, 0x0014($sp) -/* 00138 809988B8 0C01E763 */ jal Lights_InitType0PositionalLight +/* 00138 809988B8 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 0013C 809988BC AFA00010 */ sw $zero, 0x0010($sp) /* 00140 809988C0 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 /* 00144 809988C4 8FA50034 */ lw $a1, 0x0034($sp) -/* 00148 809988C8 0C01E9D9 */ jal Lights_Insert +/* 00148 809988C8 0C01E9D9 */ jal LightContext_InsertLight /* 0014C 809988CC 8FA60030 */ lw $a2, 0x0030($sp) /* 00150 809988D0 AE0201D8 */ sw $v0, 0x01D8($s0) ## 000001D8 diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_8099898C.s b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_8099898C.s index 168a4f15cd..fea0293dd5 100644 --- a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_8099898C.s +++ b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_8099898C.s @@ -134,7 +134,7 @@ glabel L80998AA0 /* 00370 80998AF0 AFA80018 */ sw $t0, 0x0018($sp) /* 00374 80998AF4 AFB90014 */ sw $t9, 0x0014($sp) /* 00378 80998AF8 AFB80010 */ sw $t8, 0x0010($sp) -/* 0037C 80998AFC 0C01E763 */ jal Lights_InitType0PositionalLight +/* 0037C 80998AFC 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 00380 80998B00 260401C8 */ addiu $a0, $s0, 0x01C8 ## $a0 = 000001C8 /* 00384 80998B04 C6080024 */ lwc1 $f8, 0x0024($s0) ## 00000024 @@ -160,7 +160,7 @@ glabel L80998AA0 /* 003D4 80998B54 AFAF0018 */ sw $t7, 0x0018($sp) /* 003D8 80998B58 AFAE0014 */ sw $t6, 0x0014($sp) /* 003DC 80998B5C AFAD0010 */ sw $t5, 0x0010($sp) -/* 003E0 80998B60 0C01E763 */ jal Lights_InitType0PositionalLight +/* 003E0 80998B60 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 003E4 80998B64 260401DC */ addiu $a0, $s0, 0x01DC ## $a0 = 000001DC /* 003E8 80998B68 8603001C */ lh $v1, 0x001C($s0) ## 0000001C diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_80998C90.s b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_80998C90.s index 968ca638a5..e1a46290e3 100644 --- a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_80998C90.s +++ b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_80998C90.s @@ -84,7 +84,7 @@ glabel func_80998C90 /* 00640 80998DC0 AFAE0018 */ sw $t6, 0x0018($sp) /* 00644 80998DC4 AFAD0014 */ sw $t5, 0x0014($sp) /* 00648 80998DC8 AFAC0010 */ sw $t4, 0x0010($sp) -/* 0064C 80998DCC 0C01E763 */ jal Lights_InitType0PositionalLight +/* 0064C 80998DCC 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 00650 80998DD0 260401C8 */ addiu $a0, $s0, 0x01C8 ## $a0 = 000001C8 /* 00654 80998DD4 C6080024 */ lwc1 $f8, 0x0024($s0) ## 00000024 @@ -110,7 +110,7 @@ glabel func_80998C90 /* 006A4 80998E24 AFAB0018 */ sw $t3, 0x0018($sp) /* 006A8 80998E28 AFAA0014 */ sw $t2, 0x0014($sp) /* 006AC 80998E2C AFA90010 */ sw $t1, 0x0010($sp) -/* 006B0 80998E30 0C01E763 */ jal Lights_InitType0PositionalLight +/* 006B0 80998E30 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 006B4 80998E34 260401DC */ addiu $a0, $s0, 0x01DC ## $a0 = 000001DC /* 006B8 80998E38 3C05809A */ lui $a1, %hi(func_8099A3A4) ## $a1 = 809A0000 diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_809995D4.s b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_809995D4.s index 1fee9cdc2f..4e1c4915bd 100644 --- a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_809995D4.s +++ b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_809995D4.s @@ -53,7 +53,7 @@ glabel func_809995D4 /* 00EFC 8099967C 00073C00 */ sll $a3, $a3, 16 /* 00F00 80999680 00073C03 */ sra $a3, $a3, 16 /* 00F04 80999684 AFB90010 */ sw $t9, 0x0010($sp) -/* 00F08 80999688 0C01E763 */ jal Lights_InitType0PositionalLight +/* 00F08 80999688 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 00F0C 8099968C 260401C8 */ addiu $a0, $s0, 0x01C8 ## $a0 = 000001C8 /* 00F10 80999690 C6120024 */ lwc1 $f18, 0x0024($s0) ## 00000024 @@ -79,7 +79,7 @@ glabel func_809995D4 /* 00F60 809996E0 AFB80018 */ sw $t8, 0x0018($sp) /* 00F64 809996E4 AFAF0014 */ sw $t7, 0x0014($sp) /* 00F68 809996E8 AFAE0010 */ sw $t6, 0x0010($sp) -/* 00F6C 809996EC 0C01E763 */ jal Lights_InitType0PositionalLight +/* 00F6C 809996EC 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 00F70 809996F0 260401DC */ addiu $a0, $s0, 0x01DC ## $a0 = 000001DC /* 00F74 809996F4 3C05809A */ lui $a1, %hi(func_80999724) ## $a1 = 809A0000 diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_80999A68.s b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_80999A68.s index dbcf64de8e..7e66188ca3 100644 --- a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_80999A68.s +++ b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_80999A68.s @@ -231,7 +231,7 @@ glabel func_80999A68 /* 015D4 80999D54 44078000 */ mfc1 $a3, $f16 /* 015D8 80999D58 00000000 */ nop /* 015DC 80999D5C 00073C00 */ sll $a3, $a3, 16 -/* 015E0 80999D60 0C01E763 */ jal Lights_InitType0PositionalLight +/* 015E0 80999D60 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 015E4 80999D64 00073C03 */ sra $a3, $a3, 16 /* 015E8 80999D68 C6520024 */ lwc1 $f18, 0x0024($s2) ## 00000024 @@ -281,7 +281,7 @@ glabel func_80999A68 /* 01698 80999E18 44078000 */ mfc1 $a3, $f16 /* 0169C 80999E1C 00000000 */ nop /* 016A0 80999E20 00073C00 */ sll $a3, $a3, 16 -/* 016A4 80999E24 0C01E763 */ jal Lights_InitType0PositionalLight +/* 016A4 80999E24 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 016A8 80999E28 00073C03 */ sra $a3, $a3, 16 /* 016AC 80999E2C 3C01809A */ lui $at, %hi(D_8099C7AC) ## $at = 809A0000 diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_8099A098.s b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_8099A098.s index 1b228f03b1..0b6c2b19cc 100644 --- a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_8099A098.s +++ b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_8099A098.s @@ -147,7 +147,7 @@ glabel func_8099A098 /* 01B14 8099A294 44078000 */ mfc1 $a3, $f16 /* 01B18 8099A298 00000000 */ nop /* 01B1C 8099A29C 00073C00 */ sll $a3, $a3, 16 -/* 01B20 8099A2A0 0C01E763 */ jal Lights_InitType0PositionalLight +/* 01B20 8099A2A0 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 01B24 8099A2A4 00073C03 */ sra $a3, $a3, 16 /* 01B28 8099A2A8 C6320024 */ lwc1 $f18, 0x0024($s1) ## 00000024 @@ -197,7 +197,7 @@ glabel func_8099A098 /* 01BD8 8099A358 44078000 */ mfc1 $a3, $f16 /* 01BDC 8099A35C 00000000 */ nop /* 01BE0 8099A360 00073C00 */ sll $a3, $a3, 16 -/* 01BE4 8099A364 0C01E763 */ jal Lights_InitType0PositionalLight +/* 01BE4 8099A364 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 01BE8 8099A368 00073C03 */ sra $a3, $a3, 16 /* 01BEC 8099A36C 3C01809A */ lui $at, %hi(D_8099C7B8) ## $at = 809A0000 diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_8099A5EC.s b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_8099A5EC.s index 868d3dd2cd..0af25810bd 100644 --- a/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_8099A5EC.s +++ b/asm/non_matchings/overlays/actors/ovl_Door_Warp1/func_8099A5EC.s @@ -471,7 +471,7 @@ glabel func_8099A5EC /* 024AC 8099AC2C 44079000 */ mfc1 $a3, $f18 /* 024B0 8099AC30 00000000 */ nop /* 024B4 8099AC34 00073C00 */ sll $a3, $a3, 16 -/* 024B8 8099AC38 0C01E763 */ jal Lights_InitType0PositionalLight +/* 024B8 8099AC38 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 024BC 8099AC3C 00073C03 */ sra $a3, $a3, 16 /* 024C0 8099AC40 8FA80034 */ lw $t0, 0x0034($sp) @@ -522,7 +522,7 @@ glabel func_8099A5EC /* 02574 8099ACF4 44079000 */ mfc1 $a3, $f18 /* 02578 8099ACF8 00000000 */ nop /* 0257C 8099ACFC 00073C00 */ sll $a3, $a3, 16 -/* 02580 8099AD00 0C01E763 */ jal Lights_InitType0PositionalLight +/* 02580 8099AD00 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 02584 8099AD04 00073C03 */ sra $a3, $a3, 16 /* 02588 8099AD08 3C01809A */ lui $at, %hi(D_8099C7D0) ## $at = 809A0000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Bdfire/EnBdfire_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_Bdfire/EnBdfire_Destroy.s index 84c788c8b9..fe06af3ec9 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Bdfire/EnBdfire_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Bdfire/EnBdfire_Destroy.s @@ -7,7 +7,7 @@ glabel EnBdfire_Destroy /* 00250 809BC280 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 /* 00254 809BC284 05C10003 */ bgez $t6, .L809BC294 /* 00258 809BC288 24A507A8 */ addiu $a1, $a1, 0x07A8 ## $a1 = 000007A8 -/* 0025C 809BC28C 0C01E9F1 */ jal Lights_Remove +/* 0025C 809BC28C 0C01E9F1 */ jal LightContext_RemoveLight /* 00260 809BC290 8CE601D0 */ lw $a2, 0x01D0($a3) ## 000001D0 .L809BC294: /* 00264 809BC294 8FBF0014 */ lw $ra, 0x0014($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Bdfire/EnBdfire_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Bdfire/EnBdfire_Init.s index f2345a77a9..78bdfcdb9c 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Bdfire/EnBdfire_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Bdfire/EnBdfire_Init.s @@ -65,11 +65,11 @@ glabel EnBdfire_Init /* 000CC 809BC0FC AFAB0018 */ sw $t3, 0x0018($sp) /* 000D0 809BC100 AFAA0014 */ sw $t2, 0x0014($sp) /* 000D4 809BC104 AFA90010 */ sw $t1, 0x0010($sp) -/* 000D8 809BC108 0C01E763 */ jal Lights_InitType0PositionalLight +/* 000D8 809BC108 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 000DC 809BC10C AFA40034 */ sw $a0, 0x0034($sp) /* 000E0 809BC110 8FA40044 */ lw $a0, 0x0044($sp) /* 000E4 809BC114 8FA60034 */ lw $a2, 0x0034($sp) -/* 000E8 809BC118 0C01E9D9 */ jal Lights_Insert +/* 000E8 809BC118 0C01E9D9 */ jal LightContext_InsertLight /* 000EC 809BC11C 248507A8 */ addiu $a1, $a0, 0x07A8 ## $a1 = 000007A8 /* 000F0 809BC120 1000004D */ beq $zero, $zero, .L809BC258 /* 000F4 809BC124 AE0201D0 */ sw $v0, 0x01D0($s0) ## 000001D0 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Bdfire/func_809BC2A4.s b/asm/non_matchings/overlays/actors/ovl_En_Bdfire/func_809BC2A4.s index fbf3a8569f..4cb9f20d29 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Bdfire/func_809BC2A4.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Bdfire/func_809BC2A4.s @@ -205,7 +205,7 @@ glabel func_809BC2A4 .L809BC574: /* 00544 809BC574 44CAF800 */ ctc1 $t2, $31 /* 00548 809BC578 30C600FF */ andi $a2, $a2, 0x00FF ## $a2 = 000000FF -/* 0054C 809BC57C 0C01E796 */ jal Lights_SetPositionalLightColorAndRadius +/* 0054C 809BC57C 0C01E796 */ jal Lights_PointSetColorAndRadius /* 00550 809BC580 AFAB0010 */ sw $t3, 0x0010($sp) /* 00554 809BC584 8FBF002C */ lw $ra, 0x002C($sp) .L809BC588: diff --git a/asm/non_matchings/overlays/actors/ovl_En_Elf/EnElf_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_Elf/EnElf_Destroy.s index 264d6a08c2..b646130db8 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Elf/EnElf_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Elf/EnElf_Destroy.s @@ -8,13 +8,13 @@ glabel EnElf_Destroy /* 00DB8 80A029E8 24A507A8 */ addiu $a1, $a1, 0x07A8 ## $a1 = 000007A8 /* 00DBC 80A029EC 8DC60274 */ lw $a2, 0x0274($t6) ## 00000274 /* 00DC0 80A029F0 AFA7002C */ sw $a3, 0x002C($sp) -/* 00DC4 80A029F4 0C01E9F1 */ jal Lights_Remove +/* 00DC4 80A029F4 0C01E9F1 */ jal LightContext_RemoveLight /* 00DC8 80A029F8 AFA5001C */ sw $a1, 0x001C($sp) /* 00DCC 80A029FC 8FAF0028 */ lw $t7, 0x0028($sp) /* 00DD0 80A02A00 8FA5001C */ lw $a1, 0x001C($sp) /* 00DD4 80A02A04 8FA4002C */ lw $a0, 0x002C($sp) -/* 00DD8 80A02A08 0C01E9F1 */ jal Lights_Remove +/* 00DD8 80A02A08 0C01E9F1 */ jal LightContext_RemoveLight /* 00DDC 80A02A0C 8DE60288 */ lw $a2, 0x0288($t7) ## 00000288 /* 00DE0 80A02A10 8FBF0014 */ lw $ra, 0x0014($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Elf/EnElf_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Elf/EnElf_Init.s index 0a5bd476cd..74934e0978 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Elf/EnElf_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Elf/EnElf_Init.s @@ -83,13 +83,13 @@ glabel EnElf_Init /* 008B0 80A024E0 AFAD0014 */ sw $t5, 0x0014($sp) /* 008B4 80A024E4 AFAC0010 */ sw $t4, 0x0010($sp) /* 008B8 80A024E8 AFA4003C */ sw $a0, 0x003C($sp) -/* 008BC 80A024EC 0C01E77C */ jal Lights_InitType2PositionalLight +/* 008BC 80A024EC 0C01E77C */ jal Lights_PointGlowSetInfo /* 008C0 80A024F0 AFA0001C */ sw $zero, 0x001C($sp) /* 008C4 80A024F4 262507A8 */ addiu $a1, $s1, 0x07A8 ## $a1 = 000007A8 /* 008C8 80A024F8 AFA50040 */ sw $a1, 0x0040($sp) /* 008CC 80A024FC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 008D0 80A02500 0C01E9D9 */ jal Lights_Insert +/* 008D0 80A02500 0C01E9D9 */ jal LightContext_InsertLight /* 008D4 80A02504 8FA6003C */ lw $a2, 0x003C($sp) /* 008D8 80A02508 C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024 @@ -116,12 +116,12 @@ glabel EnElf_Init /* 0092C 80A0255C AFA90014 */ sw $t1, 0x0014($sp) /* 00930 80A02560 AFA80010 */ sw $t0, 0x0010($sp) /* 00934 80A02564 AFA4003C */ sw $a0, 0x003C($sp) -/* 00938 80A02568 0C01E763 */ jal Lights_InitType0PositionalLight +/* 00938 80A02568 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 0093C 80A0256C AFA0001C */ sw $zero, 0x001C($sp) /* 00940 80A02570 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 /* 00944 80A02574 8FA50040 */ lw $a1, 0x0040($sp) -/* 00948 80A02578 0C01E9D9 */ jal Lights_Insert +/* 00948 80A02578 0C01E9D9 */ jal LightContext_InsertLight /* 0094C 80A0257C 8FA6003C */ lw $a2, 0x003C($sp) /* 00950 80A02580 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Elf/func_80A03B28.s b/asm/non_matchings/overlays/actors/ovl_En_Elf/func_80A03B28.s index 8fd34b638b..20f995ada4 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Elf/func_80A03B28.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Elf/func_80A03B28.s @@ -52,7 +52,7 @@ glabel func_80A03B28 /* 01FBC 80A03BEC 44064000 */ mfc1 $a2, $f8 /* 01FC0 80A03BF0 00000000 */ nop /* 01FC4 80A03BF4 00063400 */ sll $a2, $a2, 16 -/* 01FC8 80A03BF8 0C01E763 */ jal Lights_InitType0PositionalLight +/* 01FC8 80A03BF8 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 01FCC 80A03BFC 00063403 */ sra $a2, $a2, 16 /* 01FD0 80A03C00 10000019 */ beq $zero, $zero, .L80A03C68 @@ -79,7 +79,7 @@ glabel func_80A03B28 /* 02020 80A03C50 AFAE0018 */ sw $t6, 0x0018($sp) /* 02024 80A03C54 A7A30036 */ sh $v1, 0x0036($sp) /* 02028 80A03C58 AFAD0014 */ sw $t5, 0x0014($sp) -/* 0202C 80A03C5C 0C01E763 */ jal Lights_InitType0PositionalLight +/* 0202C 80A03C5C 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 02030 80A03C60 AFAC0010 */ sw $t4, 0x0010($sp) /* 02034 80A03C64 87A30036 */ lh $v1, 0x0036($sp) @@ -106,7 +106,7 @@ glabel func_80A03B28 /* 02084 80A03CB4 AFAA0014 */ sw $t2, 0x0014($sp) /* 02088 80A03CB8 AFA90010 */ sw $t1, 0x0010($sp) /* 0208C 80A03CBC AFA3001C */ sw $v1, 0x001C($sp) -/* 02090 80A03CC0 0C01E77C */ jal Lights_InitType2PositionalLight +/* 02090 80A03CC0 0C01E77C */ jal Lights_PointGlowSetInfo /* 02094 80A03CC4 26040264 */ addiu $a0, $s0, 0x0264 ## $a0 = 00000264 /* 02098 80A03CC8 C60C0064 */ lwc1 $f12, 0x0064($s0) ## 00000064 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/func_80A10220.s b/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/func_80A10220.s index 9352c73724..a1da5a4306 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/func_80A10220.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Fhg_Fire/func_80A10220.s @@ -926,7 +926,7 @@ glabel func_80A10220 /* 01C58 80A10EB8 AFAD0018 */ sw $t5, 0x0018($sp) /* 01C5C 80A10EBC AFB90014 */ sw $t9, 0x0014($sp) /* 01C60 80A10EC0 AFB80010 */ sw $t8, 0x0010($sp) -/* 01C64 80A10EC4 0C01E763 */ jal Lights_InitType0PositionalLight +/* 01C64 80A10EC4 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 01C68 80A10EC8 260401A0 */ addiu $a0, $s0, 0x01A0 ## $a0 = 000001A0 /* 01C6C 80A10ECC C6080068 */ lwc1 $f8, 0x0068($s0) ## 00000068 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Fr/EnFr_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_Fr/EnFr_Destroy.s index 6eb67381a0..4240c937d8 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Fr/EnFr_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Fr/EnFr_Destroy.s @@ -5,7 +5,7 @@ glabel EnFr_Destroy /* 005A8 80A1AF48 AFBF0014 */ sw $ra, 0x0014($sp) /* 005AC 80A1AF4C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 /* 005B0 80A1AF50 24A507A8 */ addiu $a1, $a1, 0x07A8 ## $a1 = 000007A8 -/* 005B4 80A1AF54 0C01E9F1 */ jal Lights_Remove +/* 005B4 80A1AF54 0C01E9F1 */ jal LightContext_RemoveLight /* 005B8 80A1AF58 8DC60358 */ lw $a2, 0x0358($t6) ## 00000358 /* 005BC 80A1AF5C 8FBF0014 */ lw $ra, 0x0014($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Fr/EnFr_Update.s b/asm/non_matchings/overlays/actors/ovl_En_Fr/EnFr_Update.s index 4f29dc6ddd..4476bf218a 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Fr/EnFr_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Fr/EnFr_Update.s @@ -65,7 +65,7 @@ glabel EnFr_Update /* 00378 80A1AD18 2606035C */ addiu $a2, $s0, 0x035C ## $a2 = 0000035C /* 0037C 80A1AD1C AFA60030 */ sw $a2, 0x0030($sp) /* 00380 80A1AD20 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00384 80A1AD24 0C01E9D9 */ jal Lights_Insert +/* 00384 80A1AD24 0C01E9D9 */ jal LightContext_InsertLight /* 00388 80A1AD28 262507A8 */ addiu $a1, $s1, 0x07A8 ## $a1 = 000007A8 /* 0038C 80A1AD2C C6040008 */ lwc1 $f4, 0x0008($s0) ## 00000008 @@ -92,7 +92,7 @@ glabel EnFr_Update /* 003E0 80A1AD80 AFA80018 */ sw $t0, 0x0018($sp) /* 003E4 80A1AD84 AFB90014 */ sw $t9, 0x0014($sp) /* 003E8 80A1AD88 AFB80010 */ sw $t8, 0x0010($sp) -/* 003EC 80A1AD8C 0C01E763 */ jal Lights_InitType0PositionalLight +/* 003EC 80A1AD8C 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 003F0 80A1AD90 8FA40030 */ lw $a0, 0x0030($sp) /* 003F4 80A1AD94 8FAA003C */ lw $t2, 0x003C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Fr/func_80A1CD24.s b/asm/non_matchings/overlays/actors/ovl_En_Fr/func_80A1CD24.s index 0be6e4659f..a35acd441f 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Fr/func_80A1CD24.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Fr/func_80A1CD24.s @@ -75,7 +75,7 @@ glabel func_80A1CD24 /* 02468 80A1CE08 00052C03 */ sra $a1, $a1, 16 /* 0246C 80A1CE0C AFA9001C */ sw $t1, 0x001C($sp) /* 02470 80A1CE10 AFAC0014 */ sw $t4, 0x0014($sp) -/* 02474 80A1CE14 0C01E763 */ jal Lights_InitType0PositionalLight +/* 02474 80A1CE14 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 02478 80A1CE18 AFAB0010 */ sw $t3, 0x0010($sp) /* 0247C 80A1CE1C 8FA80058 */ lw $t0, 0x0058($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Gb/EnGb_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_Gb/EnGb_Destroy.s index 7f6d859125..578a3a8c04 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Gb/EnGb_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Gb/EnGb_Destroy.s @@ -12,7 +12,7 @@ glabel EnGb_Destroy /* 00450 80A2F5D0 8FA4001C */ lw $a0, 0x001C($sp) /* 00454 80A2F5D4 8FAE0018 */ lw $t6, 0x0018($sp) /* 00458 80A2F5D8 248507A8 */ addiu $a1, $a0, 0x07A8 ## $a1 = 000007A8 -/* 0045C 80A2F5DC 0C01E9F1 */ jal Lights_Remove +/* 0045C 80A2F5DC 0C01E9F1 */ jal LightContext_RemoveLight /* 00460 80A2F5E0 8DC6036C */ lw $a2, 0x036C($t6) ## 0000036C /* 00464 80A2F5E4 8FA4001C */ lw $a0, 0x001C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Gb/EnGb_Draw.s b/asm/non_matchings/overlays/actors/ovl_En_Gb/EnGb_Draw.s index 083dfaac50..703cc0f988 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Gb/EnGb_Draw.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Gb/EnGb_Draw.s @@ -69,7 +69,7 @@ glabel EnGb_Draw /* 00E10 80A2FF90 00052C03 */ sra $a1, $a1, 16 /* 00E14 80A2FF94 00063403 */ sra $a2, $a2, 16 /* 00E18 80A2FF98 00073C03 */ sra $a3, $a3, 16 -/* 00E1C 80A2FF9C 0C01E763 */ jal Lights_InitType0PositionalLight +/* 00E1C 80A2FF9C 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 00E20 80A2FFA0 AFA9001C */ sw $t1, 0x001C($sp) /* 00E24 80A2FFA4 8E050168 */ lw $a1, 0x0168($s0) ## 00000168 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Gb/EnGb_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Gb/EnGb_Init.s index 845f1eff95..0dea0c9cb8 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Gb/EnGb_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Gb/EnGb_Init.s @@ -85,7 +85,7 @@ glabel EnGb_Init /* 0014C 80A2F2CC 26500370 */ addiu $s0, $s2, 0x0370 ## $s0 = 00000370 /* 00150 80A2F2D0 02003025 */ or $a2, $s0, $zero ## $a2 = 00000370 /* 00154 80A2F2D4 02602025 */ or $a0, $s3, $zero ## $a0 = 00000000 -/* 00158 80A2F2D8 0C01E9D9 */ jal Lights_Insert +/* 00158 80A2F2D8 0C01E9D9 */ jal LightContext_InsertLight /* 0015C 80A2F2DC 266507A8 */ addiu $a1, $s3, 0x07A8 ## $a1 = 000007A8 /* 00160 80A2F2E0 C6440008 */ lwc1 $f4, 0x0008($s2) ## 00000008 @@ -112,7 +112,7 @@ glabel EnGb_Init /* 001B4 80A2F334 AFAC0018 */ sw $t4, 0x0018($sp) /* 001B8 80A2F338 AFAB0014 */ sw $t3, 0x0014($sp) /* 001BC 80A2F33C AFAA0010 */ sw $t2, 0x0010($sp) -/* 001C0 80A2F340 0C01E763 */ jal Lights_InitType0PositionalLight +/* 001C0 80A2F340 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 001C4 80A2F344 02002025 */ or $a0, $s0, $zero ## $a0 = 00000370 /* 001C8 80A2F348 4480C000 */ mtc1 $zero, $f24 ## $f24 = 0.00 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/EnIceHono_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/EnIceHono_Destroy.s index 93b3e2b57c..9056268fa3 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/EnIceHono_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/EnIceHono_Destroy.s @@ -12,7 +12,7 @@ glabel EnIceHono_Destroy .L80A733B8: /* 003C8 80A733B8 8CE601A8 */ lw $a2, 0x01A8($a3) ## 000001A8 /* 003CC 80A733BC AFA70018 */ sw $a3, 0x0018($sp) -/* 003D0 80A733C0 0C01E9F1 */ jal Lights_Remove +/* 003D0 80A733C0 0C01E9F1 */ jal LightContext_RemoveLight /* 003D4 80A733C4 248507A8 */ addiu $a1, $a0, 0x07A8 ## $a1 = 000007A8 /* 003D8 80A733C8 8FA70018 */ lw $a3, 0x0018($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/EnIceHono_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/EnIceHono_Init.s index efe0a081a5..b42ca4240e 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/EnIceHono_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/EnIceHono_Init.s @@ -77,12 +77,12 @@ glabel EnIceHono_Init /* 0031C 80A7330C AFA80014 */ sw $t0, 0x0014($sp) /* 00320 80A73310 AFB90010 */ sw $t9, 0x0010($sp) /* 00324 80A73314 AFA40030 */ sw $a0, 0x0030($sp) -/* 00328 80A73318 0C01E763 */ jal Lights_InitType0PositionalLight +/* 00328 80A73318 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 0032C 80A7331C AFA0001C */ sw $zero, 0x001C($sp) /* 00330 80A73320 8FA40044 */ lw $a0, 0x0044($sp) /* 00334 80A73324 8FA60030 */ lw $a2, 0x0030($sp) -/* 00338 80A73328 0C01E9D9 */ jal Lights_Insert +/* 00338 80A73328 0C01E9D9 */ jal LightContext_InsertLight /* 0033C 80A7332C 248507A8 */ addiu $a1, $a0, 0x07A8 ## $a1 = 000007A8 /* 00340 80A73330 0C03F66B */ jal Math_Rand_ZeroOne diff --git a/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/EnIceHono_Update.s b/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/EnIceHono_Update.s index e78f39587e..f04463cc73 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/EnIceHono_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Ice_Hono/EnIceHono_Update.s @@ -137,7 +137,7 @@ glabel EnIceHono_Update /* 00DDC 80A73DCC 44194000 */ mfc1 $t9, $f8 /* 00DE0 80A73DD0 AFAD0010 */ sw $t5, 0x0010($sp) /* 00DE4 80A73DD4 AFAF0014 */ sw $t7, 0x0014($sp) -/* 00DE8 80A73DD8 0C01E763 */ jal Lights_InitType0PositionalLight +/* 00DE8 80A73DD8 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 00DEC 80A73DDC AFB90018 */ sw $t9, 0x0018($sp) /* 00DF0 80A73DE0 8E02014C */ lw $v0, 0x014C($s0) ## 0000014C diff --git a/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/EnMThunder_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/EnMThunder_Destroy.s index f9b3e132e5..c77361ea46 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/EnMThunder_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/EnMThunder_Destroy.s @@ -21,7 +21,7 @@ glabel EnMThunder_Destroy /* 0030C 80A9F2EC 8FB80020 */ lw $t8, 0x0020($sp) /* 00310 80A9F2F0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 /* 00314 80A9F2F4 260507A8 */ addiu $a1, $s0, 0x07A8 ## $a1 = 000007A8 -/* 00318 80A9F2F8 0C01E9F1 */ jal Lights_Remove +/* 00318 80A9F2F8 0C01E9F1 */ jal LightContext_RemoveLight /* 0031C 80A9F2FC 8F060198 */ lw $a2, 0x0198($t8) ## 00000198 /* 00320 80A9F300 8FBF001C */ lw $ra, 0x001C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/EnMThunder_Init.s b/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/EnMThunder_Init.s index e229ecca88..aa0018db99 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/EnMThunder_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/EnMThunder_Init.s @@ -45,12 +45,12 @@ glabel EnMThunder_Init /* 000AC 80A9F08C AFAB0014 */ sw $t3, 0x0014($sp) /* 000B0 80A9F090 AFAA0010 */ sw $t2, 0x0010($sp) /* 000B4 80A9F094 AFA40030 */ sw $a0, 0x0030($sp) -/* 000B8 80A9F098 0C01E763 */ jal Lights_InitType0PositionalLight +/* 000B8 80A9F098 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 000BC 80A9F09C AFA0001C */ sw $zero, 0x001C($sp) /* 000C0 80A9F0A0 8FA40044 */ lw $a0, 0x0044($sp) /* 000C4 80A9F0A4 8FA60030 */ lw $a2, 0x0030($sp) -/* 000C8 80A9F0A8 0C01E9D9 */ jal Lights_Insert +/* 000C8 80A9F0A8 0C01E9D9 */ jal LightContext_InsertLight /* 000CC 80A9F0AC 248507A8 */ addiu $a1, $a0, 0x07A8 ## $a1 = 000007A8 /* 000D0 80A9F0B0 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 diff --git a/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/EnMThunder_Update.s b/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/EnMThunder_Update.s index 362b300e77..7e350f00ae 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/EnMThunder_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_En_M_Thunder/EnMThunder_Update.s @@ -113,7 +113,7 @@ glabel EnMThunder_Update /* 00CE0 80A9FCC0 46040182 */ mul.s $f6, $f0, $f4 /* 00CE4 80A9FCC4 4600320D */ trunc.w.s $f8, $f6 /* 00CE8 80A9FCC8 440C4000 */ mfc1 $t4, $f8 -/* 00CEC 80A9FCCC 0C01E763 */ jal Lights_InitType0PositionalLight +/* 00CEC 80A9FCCC 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 00CF0 80A9FCD0 AFAC001C */ sw $t4, 0x001C($sp) /* 00CF4 80A9FCD4 8FBF002C */ lw $ra, 0x002C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Desert/EnPoDesert_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Desert/EnPoDesert_Destroy.s index 72dac60cc0..2653870c37 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Desert/EnPoDesert_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Desert/EnPoDesert_Destroy.s @@ -7,7 +7,7 @@ glabel EnPoDesert_Destroy /* 00180 80AD2E30 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 /* 00184 80AD2E34 8DC60224 */ lw $a2, 0x0224($t6) ## 00000224 /* 00188 80AD2E38 AFA7001C */ sw $a3, 0x001C($sp) -/* 0018C 80AD2E3C 0C01E9F1 */ jal Lights_Remove +/* 0018C 80AD2E3C 0C01E9F1 */ jal LightContext_RemoveLight /* 00190 80AD2E40 24A507A8 */ addiu $a1, $a1, 0x07A8 ## $a1 = 000007A8 /* 00194 80AD2E44 8FA50018 */ lw $a1, 0x0018($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Desert/EnPoDesert_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Desert/EnPoDesert_Init.s index a3d16e2ec1..de5741e8fc 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Desert/EnPoDesert_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Desert/EnPoDesert_Init.s @@ -44,7 +44,7 @@ glabel EnPoDesert_Init /* 00098 80AD2D48 26060228 */ addiu $a2, $s0, 0x0228 ## $a2 = 00000228 /* 0009C 80AD2D4C AFA60034 */ sw $a2, 0x0034($sp) /* 000A0 80AD2D50 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 000A4 80AD2D54 0C01E9D9 */ jal Lights_Insert +/* 000A4 80AD2D54 0C01E9D9 */ jal LightContext_InsertLight /* 000A8 80AD2D58 262507A8 */ addiu $a1, $s1, 0x07A8 ## $a1 = 000007A8 /* 000AC 80AD2D5C C6040008 */ lwc1 $f4, 0x0008($s0) ## 00000008 @@ -71,7 +71,7 @@ glabel EnPoDesert_Init /* 00100 80AD2DB0 AFAD0018 */ sw $t5, 0x0018($sp) /* 00104 80AD2DB4 AFAC0014 */ sw $t4, 0x0014($sp) /* 00108 80AD2DB8 AFAB0010 */ sw $t3, 0x0010($sp) -/* 0010C 80AD2DBC 0C01E763 */ jal Lights_InitType0PositionalLight +/* 0010C 80AD2DBC 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 00110 80AD2DC0 8FA40034 */ lw $a0, 0x0034($sp) /* 00114 80AD2DC4 3C068003 */ lui $a2, %hi(ActorShadow_DrawFunc_Circle) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Desert/func_80AD3594.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Desert/func_80AD3594.s index 8ee4d95229..6ffd0fdddb 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Desert/func_80AD3594.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Desert/func_80AD3594.s @@ -153,7 +153,7 @@ glabel func_80AD3594 /* 00B20 80AD37D0 00073C03 */ sra $a3, $a3, 16 /* 00B24 80AD37D4 AFA90010 */ sw $t1, 0x0010($sp) /* 00B28 80AD37D8 AFAA0014 */ sw $t2, 0x0014($sp) -/* 00B2C 80AD37DC 0C01E763 */ jal Lights_InitType0PositionalLight +/* 00B2C 80AD37DC 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 00B30 80AD37E0 AFAB0018 */ sw $t3, 0x0018($sp) .L80AD37E4: diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/EnPoField_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/EnPoField_Destroy.s index 87c46cf676..3e598b5c54 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/EnPoField_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/EnPoField_Destroy.s @@ -9,7 +9,7 @@ glabel EnPoField_Destroy /* 00224 80AD3D24 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 /* 00228 80AD3D28 8CE60230 */ lw $a2, 0x0230($a3) ## 00000230 /* 0022C 80AD3D2C AFA70018 */ sw $a3, 0x0018($sp) -/* 00230 80AD3D30 0C01E9F1 */ jal Lights_Remove +/* 00230 80AD3D30 0C01E9F1 */ jal LightContext_RemoveLight /* 00234 80AD3D34 24A507A8 */ addiu $a1, $a1, 0x07A8 ## $a1 = 000007A8 /* 00238 80AD3D38 8FA50018 */ lw $a1, 0x0018($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/EnPoField_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/EnPoField_Init.s index dfe6cc70a1..6cf8f7deab 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/EnPoField_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/EnPoField_Init.s @@ -100,7 +100,7 @@ glabel EnPoField_Init /* 00164 80AD3C64 26060234 */ addiu $a2, $s0, 0x0234 ## $a2 = 00000234 /* 00168 80AD3C68 AFA60034 */ sw $a2, 0x0034($sp) /* 0016C 80AD3C6C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00170 80AD3C70 0C01E9D9 */ jal Lights_Insert +/* 00170 80AD3C70 0C01E9D9 */ jal LightContext_InsertLight /* 00174 80AD3C74 262507A8 */ addiu $a1, $s1, 0x07A8 ## $a1 = 000007A8 /* 00178 80AD3C78 C6040008 */ lwc1 $f4, 0x0008($s0) ## 00000008 @@ -126,7 +126,7 @@ glabel EnPoField_Init /* 001C8 80AD3CC8 AFAD0014 */ sw $t5, 0x0014($sp) /* 001CC 80AD3CCC AFAC0010 */ sw $t4, 0x0010($sp) /* 001D0 80AD3CD0 AFA0001C */ sw $zero, 0x001C($sp) -/* 001D4 80AD3CD4 0C01E77C */ jal Lights_InitType2PositionalLight +/* 001D4 80AD3CD4 0C01E77C */ jal Lights_PointGlowSetInfo /* 001D8 80AD3CD8 8FA40034 */ lw $a0, 0x0034($sp) /* 001DC 80AD3CDC 3C0F8003 */ lui $t7, %hi(ActorShadow_DrawFunc_Circle) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD3D68.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD3D68.s index 7e856cdbe8..12f173054d 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD3D68.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD3D68.s @@ -18,7 +18,7 @@ glabel func_80AD3D68 /* 002A4 80AD3DA4 26040234 */ addiu $a0, $s0, 0x0234 ## $a0 = 00000234 /* 002A8 80AD3DA8 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 /* 002AC 80AD3DAC 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000 -/* 002B0 80AD3DB0 0C01E796 */ jal Lights_SetPositionalLightColorAndRadius +/* 002B0 80AD3DB0 0C01E796 */ jal Lights_PointSetColorAndRadius /* 002B4 80AD3DB4 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 /* 002B8 80AD3DB8 241800C8 */ addiu $t8, $zero, 0x00C8 ## $t8 = 000000C8 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD42B0.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD42B0.s index 28accd105b..fbef792e69 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD42B0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD42B0.s @@ -22,7 +22,7 @@ glabel func_80AD42B0 /* 00800 80AD4300 00052C00 */ sll $a1, $a1, 16 /* 00804 80AD4304 00052C03 */ sra $a1, $a1, 16 /* 00808 80AD4308 AFA00010 */ sw $zero, 0x0010($sp) -/* 0080C 80AD430C 0C01E763 */ jal Lights_InitType0PositionalLight +/* 0080C 80AD430C 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 00810 80AD4310 24840234 */ addiu $a0, $a0, 0x0234 ## $a0 = 00000234 /* 00814 80AD4314 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD54D4.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD54D4.s index 6b04f07b7a..dfaa3f80a3 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD54D4.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD54D4.s @@ -262,7 +262,7 @@ glabel func_80AD54D4 /* 01D54 80AD5854 00073C00 */ sll $a3, $a3, 16 /* 01D58 80AD5858 00073C03 */ sra $a3, $a3, 16 /* 01D5C 80AD585C AFAE0018 */ sw $t6, 0x0018($sp) -/* 01D60 80AD5860 0C01E763 */ jal Lights_InitType0PositionalLight +/* 01D60 80AD5860 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 01D64 80AD5864 AFB8001C */ sw $t8, 0x001C($sp) /* 01D68 80AD5868 8FBF002C */ lw $ra, 0x002C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD58D4.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD58D4.s index ad066cf0dd..3230392c24 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD58D4.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD58D4.s @@ -138,7 +138,7 @@ glabel func_80AD58D4 /* 01FB0 80AD5AB0 46125102 */ mul.s $f4, $f10, $f18 /* 01FB4 80AD5AB4 4600218D */ trunc.w.s $f6, $f4 /* 01FB8 80AD5AB8 44183000 */ mfc1 $t8, $f6 -/* 01FBC 80AD5ABC 0C01E763 */ jal Lights_InitType0PositionalLight +/* 01FBC 80AD5ABC 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 01FC0 80AD5AC0 AFB8001C */ sw $t8, 0x001C($sp) /* 01FC4 80AD5AC4 8FBF002C */ lw $ra, 0x002C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD66D0.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD66D0.s index 5075671806..d90017a6c0 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD66D0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD66D0.s @@ -143,7 +143,7 @@ glabel func_80AD66D0 /* 02DBC 80AD68BC 46082282 */ mul.s $f10, $f4, $f8 /* 02DC0 80AD68C0 4600540D */ trunc.w.s $f16, $f10 /* 02DC4 80AD68C4 44098000 */ mfc1 $t1, $f16 -/* 02DC8 80AD68C8 0C01E77C */ jal Lights_InitType2PositionalLight +/* 02DC8 80AD68C8 0C01E77C */ jal Lights_PointGlowSetInfo /* 02DCC 80AD68CC AFA9001C */ sw $t1, 0x001C($sp) .L80AD68D0: diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD6C4C.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD6C4C.s index 002f1e2ae3..124f8861df 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD6C4C.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Field/func_80AD6C4C.s @@ -89,7 +89,7 @@ glabel func_80AD6C4C /* 03250 80AD6D50 00063403 */ sra $a2, $a2, 16 /* 03254 80AD6D54 00073C03 */ sra $a3, $a3, 16 /* 03258 80AD6D58 AFAA001C */ sw $t2, 0x001C($sp) -/* 0325C 80AD6D5C 0C01E77C */ jal Lights_InitType2PositionalLight +/* 0325C 80AD6D5C 0C01E77C */ jal Lights_PointGlowSetInfo /* 03260 80AD6D60 AFA90018 */ sw $t1, 0x0018($sp) /* 03264 80AD6D64 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Relay/EnPoRelay_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Relay/EnPoRelay_Destroy.s index 728bb9ac38..3be9ccb751 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Relay/EnPoRelay_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Relay/EnPoRelay_Destroy.s @@ -7,7 +7,7 @@ glabel EnPoRelay_Destroy /* 00198 80AD78D8 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 /* 0019C 80AD78DC 8DC6027C */ lw $a2, 0x027C($t6) ## 0000027C /* 001A0 80AD78E0 AFA7001C */ sw $a3, 0x001C($sp) -/* 001A4 80AD78E4 0C01E9F1 */ jal Lights_Remove +/* 001A4 80AD78E4 0C01E9F1 */ jal LightContext_RemoveLight /* 001A8 80AD78E8 24A507A8 */ addiu $a1, $a1, 0x07A8 ## $a1 = 000007A8 /* 001AC 80AD78EC 8FA50018 */ lw $a1, 0x0018($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Relay/EnPoRelay_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Relay/EnPoRelay_Init.s index 910bc6d0ec..71b804a5d4 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Relay/EnPoRelay_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Relay/EnPoRelay_Init.s @@ -44,7 +44,7 @@ glabel EnPoRelay_Init /* 00098 80AD77D8 26060280 */ addiu $a2, $s0, 0x0280 ## $a2 = 00000280 /* 0009C 80AD77DC AFA60034 */ sw $a2, 0x0034($sp) /* 000A0 80AD77E0 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 000A4 80AD77E4 0C01E9D9 */ jal Lights_Insert +/* 000A4 80AD77E4 0C01E9D9 */ jal LightContext_InsertLight /* 000A8 80AD77E8 262507A8 */ addiu $a1, $s1, 0x07A8 ## $a1 = 000007A8 /* 000AC 80AD77EC C6040008 */ lwc1 $f4, 0x0008($s0) ## 00000008 @@ -71,7 +71,7 @@ glabel EnPoRelay_Init /* 00100 80AD7840 AFAC0018 */ sw $t4, 0x0018($sp) /* 00104 80AD7844 AFAB0014 */ sw $t3, 0x0014($sp) /* 00108 80AD7848 AFAA0010 */ sw $t2, 0x0010($sp) -/* 0010C 80AD784C 0C01E763 */ jal Lights_InitType0PositionalLight +/* 0010C 80AD784C 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 00110 80AD7850 8FA40034 */ lw $a0, 0x0034($sp) /* 00114 80AD7854 240E00FF */ addiu $t6, $zero, 0x00FF ## $t6 = 000000FF diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Relay/func_80AD88D0.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Relay/func_80AD88D0.s index 44ce0d4683..832fd23882 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Relay/func_80AD88D0.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Relay/func_80AD88D0.s @@ -125,7 +125,7 @@ glabel func_80AD88D0 /* 01320 80AD8A60 00052C03 */ sra $a1, $a1, 16 /* 01324 80AD8A64 AFB9001C */ sw $t9, 0x001C($sp) /* 01328 80AD8A68 25240280 */ addiu $a0, $t1, 0x0280 ## $a0 = 00000280 -/* 0132C 80AD8A6C 0C01E763 */ jal Lights_InitType0PositionalLight +/* 0132C 80AD8A6C 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 01330 80AD8A70 AFAF0018 */ sw $t7, 0x0018($sp) /* 01334 80AD8A74 1000002D */ beq $zero, $zero, .L80AD8B2C diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/EnPoSisters_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/EnPoSisters_Destroy.s index 8f8e234abb..3c80db211e 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/EnPoSisters_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/EnPoSisters_Destroy.s @@ -6,7 +6,7 @@ glabel EnPoSisters_Destroy /* 00258 80AD91E8 8CE60298 */ lw $a2, 0x0298($a3) ## 00000298 /* 0025C 80AD91EC 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 /* 00260 80AD91F0 24A507A8 */ addiu $a1, $a1, 0x07A8 ## $a1 = 000007A8 -/* 00264 80AD91F4 0C01E9F1 */ jal Lights_Remove +/* 00264 80AD91F4 0C01E9F1 */ jal LightContext_RemoveLight /* 00268 80AD91F8 AFA70018 */ sw $a3, 0x0018($sp) /* 0026C 80AD91FC 8FA70018 */ lw $a3, 0x0018($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/EnPoSisters_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/EnPoSisters_Init.s index 99f4db4514..b1a8218bc9 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/EnPoSisters_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/EnPoSisters_Init.s @@ -39,7 +39,7 @@ glabel EnPoSisters_Init /* 00088 80AD9018 2606029C */ addiu $a2, $s0, 0x029C ## $a2 = 0000029C /* 0008C 80AD901C AFA60034 */ sw $a2, 0x0034($sp) /* 00090 80AD9020 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00094 80AD9024 0C01E9D9 */ jal Lights_Insert +/* 00094 80AD9024 0C01E9D9 */ jal LightContext_InsertLight /* 00098 80AD9028 262507A8 */ addiu $a1, $s1, 0x07A8 ## $a1 = 000007A8 /* 0009C 80AD902C C6040008 */ lwc1 $f4, 0x0008($s0) ## 00000008 @@ -62,7 +62,7 @@ glabel EnPoSisters_Init /* 000E0 80AD9070 00073C03 */ sra $a3, $a3, 16 /* 000E4 80AD9074 AFA00014 */ sw $zero, 0x0014($sp) /* 000E8 80AD9078 AFA00010 */ sw $zero, 0x0010($sp) -/* 000EC 80AD907C 0C01E77C */ jal Lights_InitType2PositionalLight +/* 000EC 80AD907C 0C01E77C */ jal Lights_PointGlowSetInfo /* 000F0 80AD9080 8FA40034 */ lw $a0, 0x0034($sp) /* 000F4 80AD9084 260502AC */ addiu $a1, $s0, 0x02AC ## $a1 = 000002AC diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/func_80AD9C24.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/func_80AD9C24.s index c7f2dbcdfa..c2e7ae85ac 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/func_80AD9C24.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/func_80AD9C24.s @@ -62,7 +62,7 @@ glabel func_80AD9C24 /* 00D80 80AD9D10 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 /* 00D84 80AD9D14 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000 /* 00D88 80AD9D18 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 00D8C 80AD9D1C 0C01E796 */ jal Lights_SetPositionalLightColorAndRadius +/* 00D8C 80AD9D1C 0C01E796 */ jal Lights_PointSetColorAndRadius /* 00D90 80AD9D20 AFA00010 */ sw $zero, 0x0010($sp) /* 00D94 80AD9D24 3C0C80AE */ lui $t4, %hi(func_80ADB338) ## $t4 = 80AE0000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/func_80ADC970.s b/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/func_80ADC970.s index 7dfdd9d04d..e16b261def 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/func_80ADC970.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Po_Sisters/func_80ADC970.s @@ -300,7 +300,7 @@ glabel func_80ADC970 .L80ADCD94: /* 03E04 80ADCD94 44C9F800 */ ctc1 $t1, $31 /* 03E08 80ADCD98 AFAA0018 */ sw $t2, 0x0018($sp) -/* 03E0C 80ADCD9C 0C01E763 */ jal Lights_InitType0PositionalLight +/* 03E0C 80ADCD9C 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 03E10 80ADCDA0 AFAB001C */ sw $t3, 0x001C($sp) /* 03E14 80ADCDA4 1000009D */ beq $zero, $zero, .L80ADD01C @@ -466,14 +466,14 @@ glabel func_80ADC970 .L80ADCFF4: /* 04064 80ADCFF4 44CCF800 */ ctc1 $t4, $31 /* 04068 80ADCFF8 AFAD0018 */ sw $t5, 0x0018($sp) -/* 0406C 80ADCFFC 0C01E77C */ jal Lights_InitType2PositionalLight +/* 0406C 80ADCFFC 0C01E77C */ jal Lights_PointGlowSetInfo /* 04070 80ADD000 AFAE001C */ sw $t6, 0x001C($sp) /* 04074 80ADD004 10000005 */ beq $zero, $zero, .L80ADD01C /* 04078 80ADD008 920F0199 */ lbu $t7, 0x0199($s0) ## 00000199 .L80ADD00C: /* 0407C 80ADD00C 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 04080 80ADD010 0C01E796 */ jal Lights_SetPositionalLightColorAndRadius +/* 04080 80ADD010 0C01E796 */ jal Lights_PointSetColorAndRadius /* 04084 80ADD014 AFA00010 */ sw $zero, 0x0010($sp) /* 04088 80ADD018 920F0199 */ lbu $t7, 0x0199($s0) ## 00000199 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Poh/EnPoh_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_Poh/EnPoh_Destroy.s index a24301cc03..3c9c82ac71 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Poh/EnPoh_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Poh/EnPoh_Destroy.s @@ -7,7 +7,7 @@ glabel EnPoh_Destroy /* 00358 80ADE0A8 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 /* 0035C 80ADE0AC 8DC602A8 */ lw $a2, 0x02A8($t6) ## 000002A8 /* 00360 80ADE0B0 AFA7001C */ sw $a3, 0x001C($sp) -/* 00364 80ADE0B4 0C01E9F1 */ jal Lights_Remove +/* 00364 80ADE0B4 0C01E9F1 */ jal LightContext_RemoveLight /* 00368 80ADE0B8 24A507A8 */ addiu $a1, $a1, 0x07A8 ## $a1 = 000007A8 /* 0036C 80ADE0BC 8FA50018 */ lw $a1, 0x0018($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Poh/EnPoh_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Poh/EnPoh_Init.s index d38c6b87e9..d82b308c2c 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Poh/EnPoh_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Poh/EnPoh_Init.s @@ -77,7 +77,7 @@ glabel EnPoh_Init /* 00118 80ADDE68 260602AC */ addiu $a2, $s0, 0x02AC ## $a2 = 000002AC /* 0011C 80ADDE6C AFA60030 */ sw $a2, 0x0030($sp) /* 00120 80ADDE70 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00124 80ADDE74 0C01E9D9 */ jal Lights_Insert +/* 00124 80ADDE74 0C01E9D9 */ jal LightContext_InsertLight /* 00128 80ADDE78 262507A8 */ addiu $a1, $s1, 0x07A8 ## $a1 = 000007A8 /* 0012C 80ADDE7C C6040008 */ lwc1 $f4, 0x0008($s0) ## 00000008 @@ -103,7 +103,7 @@ glabel EnPoh_Init /* 0017C 80ADDECC AFAA0014 */ sw $t2, 0x0014($sp) /* 00180 80ADDED0 AFA90010 */ sw $t1, 0x0010($sp) /* 00184 80ADDED4 AFA0001C */ sw $zero, 0x001C($sp) -/* 00188 80ADDED8 0C01E77C */ jal Lights_InitType2PositionalLight +/* 00188 80ADDED8 0C01E77C */ jal Lights_PointGlowSetInfo /* 0018C 80ADDEDC 8FA40030 */ lw $a0, 0x0030($sp) /* 00190 80ADDEE0 8602001C */ lh $v0, 0x001C($s0) ## 0000001C diff --git a/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80ADE6D4.s b/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80ADE6D4.s index ecf058f46f..3adf75a828 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80ADE6D4.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80ADE6D4.s @@ -22,7 +22,7 @@ glabel func_80ADE6D4 /* 009D4 80ADE724 00052C00 */ sll $a1, $a1, 16 /* 009D8 80ADE728 00052C03 */ sra $a1, $a1, 16 /* 009DC 80ADE72C AFA00010 */ sw $zero, 0x0010($sp) -/* 009E0 80ADE730 0C01E763 */ jal Lights_InitType0PositionalLight +/* 009E0 80ADE730 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 009E4 80ADE734 248402AC */ addiu $a0, $a0, 0x02AC ## $a0 = 000002AC /* 009E8 80ADE738 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80ADFA90.s b/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80ADFA90.s index fc903f9363..1fb9024545 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80ADFA90.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80ADFA90.s @@ -258,7 +258,7 @@ glabel func_80ADFA90 /* 020B0 80ADFE00 00073C00 */ sll $a3, $a3, 16 /* 020B4 80ADFE04 00073C03 */ sra $a3, $a3, 16 /* 020B8 80ADFE08 AFAB0018 */ sw $t3, 0x0018($sp) -/* 020BC 80ADFE0C 0C01E763 */ jal Lights_InitType0PositionalLight +/* 020BC 80ADFE0C 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 020C0 80ADFE10 AFAD001C */ sw $t5, 0x001C($sp) /* 020C4 80ADFE14 8FBF002C */ lw $ra, 0x002C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80ADFE80.s b/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80ADFE80.s index 304cf913d8..7be9d587f2 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80ADFE80.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80ADFE80.s @@ -144,7 +144,7 @@ glabel func_80ADFE80 /* 02324 80AE0074 46125102 */ mul.s $f4, $f10, $f18 /* 02328 80AE0078 4600218D */ trunc.w.s $f6, $f4 /* 0232C 80AE007C 44193000 */ mfc1 $t9, $f6 -/* 02330 80AE0080 0C01E763 */ jal Lights_InitType0PositionalLight +/* 02330 80AE0080 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 02334 80AE0084 AFB9001C */ sw $t9, 0x001C($sp) .L80AE0088: diff --git a/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80AE0CE8.s b/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80AE0CE8.s index 9e28d99e39..4126d2bd2a 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80AE0CE8.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80AE0CE8.s @@ -136,7 +136,7 @@ glabel func_80AE0CE8 /* 0316C 80AE0EBC 46082282 */ mul.s $f10, $f4, $f8 /* 03170 80AE0EC0 4600540D */ trunc.w.s $f16, $f10 /* 03174 80AE0EC4 440B8000 */ mfc1 $t3, $f16 -/* 03178 80AE0EC8 0C01E77C */ jal Lights_InitType2PositionalLight +/* 03178 80AE0EC8 0C01E77C */ jal Lights_PointGlowSetInfo /* 0317C 80AE0ECC AFAB001C */ sw $t3, 0x001C($sp) /* 03180 80AE0ED0 8FBF002C */ lw $ra, 0x002C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80AE1654.s b/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80AE1654.s index 5ad04f7fd9..a497b5af51 100644 --- a/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80AE1654.s +++ b/asm/non_matchings/overlays/actors/ovl_En_Poh/func_80AE1654.s @@ -79,7 +79,7 @@ glabel func_80AE1654 /* 039E0 80AE1730 00063403 */ sra $a2, $a2, 16 /* 039E4 80AE1734 00073C03 */ sra $a3, $a3, 16 /* 039E8 80AE1738 AFB8001C */ sw $t8, 0x001C($sp) -/* 039EC 80AE173C 0C01E77C */ jal Lights_InitType2PositionalLight +/* 039EC 80AE173C 0C01E77C */ jal Lights_PointGlowSetInfo /* 039F0 80AE1740 AFA80018 */ sw $t0, 0x0018($sp) /* 039F4 80AE1744 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 diff --git a/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Destroy.s index 919d2769af..6c99f16d62 100644 --- a/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Destroy.s @@ -13,7 +13,7 @@ glabel Fishing_Destroy /* 01548 80B6AEE8 24E507A8 */ addiu $a1, $a3, 0x07A8 ## $a1 = 000007A8 /* 0154C 80B6AEEC 54410006 */ bnel $v0, $at, .L80B6AF08 /* 01550 80B6AEF0 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 01554 80B6AEF4 0C01E9F1 */ jal Lights_Remove +/* 01554 80B6AEF4 0C01E9F1 */ jal LightContext_RemoveLight /* 01558 80B6AEF8 8C66021C */ lw $a2, 0x021C($v1) ## 0000021C /* 0155C 80B6AEFC 10000007 */ beq $zero, $zero, .L80B6AF1C diff --git a/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Init.s b/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Init.s index f549d5050e..eba880fee2 100644 --- a/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Init.s @@ -596,7 +596,7 @@ glabel Fishing_Init /* 013B8 80B6AD58 35090009 */ ori $t1, $t0, 0x0009 ## $t1 = 00000009 /* 013BC 80B6AD5C AE490004 */ sw $t1, 0x0004($s2) ## 00000004 /* 013C0 80B6AD60 266507A8 */ addiu $a1, $s3, 0x07A8 ## $a1 = 000007A8 -/* 013C4 80B6AD64 0C01E9D9 */ jal Lights_Insert +/* 013C4 80B6AD64 0C01E9D9 */ jal LightContext_InsertLight /* 013C8 80B6AD68 26460220 */ addiu $a2, $s2, 0x0220 ## $a2 = 00000220 /* 013CC 80B6AD6C 1000004A */ beq $zero, $zero, .L80B6AE98 diff --git a/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Update.s b/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Update.s index 60bd5bd6b3..dbf26374fc 100644 --- a/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_Fishing/Fishing_Update.s @@ -839,7 +839,7 @@ glabel Fishing_Update /* 082F0 80B71C90 44074000 */ mfc1 $a3, $f8 /* 082F4 80B71C94 00000000 */ nop /* 082F8 80B71C98 00073C00 */ sll $a3, $a3, 16 -/* 082FC 80B71C9C 0C01E763 */ jal Lights_InitType0PositionalLight +/* 082FC 80B71C9C 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 08300 80B71CA0 00073C03 */ sra $a3, $a3, 16 /* 08304 80B71CA4 3C0180B8 */ lui $at, %hi(D_80B7E078) ## $at = 80B80000 diff --git a/asm/non_matchings/overlays/actors/ovl_Mir_Ray/MirRay_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Mir_Ray/MirRay_Destroy.s index 4273fd6a61..bcf9272879 100644 --- a/asm/non_matchings/overlays/actors/ovl_Mir_Ray/MirRay_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_Mir_Ray/MirRay_Destroy.s @@ -7,7 +7,7 @@ glabel MirRay_Destroy /* 00550 80B8D5A0 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 /* 00554 80B8D5A4 8DC6029C */ lw $a2, 0x029C($t6) ## 0000029C /* 00558 80B8D5A8 AFA7001C */ sw $a3, 0x001C($sp) -/* 0055C 80B8D5AC 0C01E9F1 */ jal Lights_Remove +/* 0055C 80B8D5AC 0C01E9F1 */ jal LightContext_RemoveLight /* 00560 80B8D5B0 24A507A8 */ addiu $a1, $a1, 0x07A8 ## $a1 = 000007A8 /* 00564 80B8D5B4 8FA20018 */ lw $v0, 0x0018($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Mir_Ray/MirRay_Init.s b/asm/non_matchings/overlays/actors/ovl_Mir_Ray/MirRay_Init.s index d822d1d7b4..6c4198061b 100644 --- a/asm/non_matchings/overlays/actors/ovl_Mir_Ray/MirRay_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Mir_Ray/MirRay_Init.s @@ -146,12 +146,12 @@ glabel MirRay_Init /* 003E4 80B8D434 AFAC001C */ sw $t4, 0x001C($sp) /* 003E8 80B8D438 AFAB0018 */ sw $t3, 0x0018($sp) /* 003EC 80B8D43C AFAA0014 */ sw $t2, 0x0014($sp) -/* 003F0 80B8D440 0C01E763 */ jal Lights_InitType0PositionalLight +/* 003F0 80B8D440 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 003F4 80B8D444 AFA90010 */ sw $t1, 0x0010($sp) /* 003F8 80B8D448 8FA40044 */ lw $a0, 0x0044($sp) /* 003FC 80B8D44C 8FA60030 */ lw $a2, 0x0030($sp) -/* 00400 80B8D450 0C01E9D9 */ jal Lights_Insert +/* 00400 80B8D450 0C01E9D9 */ jal LightContext_InsertLight /* 00404 80B8D454 248507A8 */ addiu $a1, $a0, 0x07A8 ## $a1 = 000007A8 /* 00408 80B8D458 3C01C406 */ lui $at, 0xC406 ## $at = C4060000 diff --git a/asm/non_matchings/overlays/actors/ovl_Mir_Ray/func_80B8D110.s b/asm/non_matchings/overlays/actors/ovl_Mir_Ray/func_80B8D110.s index 0f23fbdd92..21bf44c5e6 100644 --- a/asm/non_matchings/overlays/actors/ovl_Mir_Ray/func_80B8D110.s +++ b/asm/non_matchings/overlays/actors/ovl_Mir_Ray/func_80B8D110.s @@ -88,7 +88,7 @@ glabel func_80B8D110 /* 00204 80B8D254 922A001E */ lbu $t2, 0x001E($s1) ## 0000001E /* 00208 80B8D258 AFAA0018 */ sw $t2, 0x0018($sp) /* 0020C 80B8D25C 860B0298 */ lh $t3, 0x0298($s0) ## 00000298 -/* 00210 80B8D260 0C01E763 */ jal Lights_InitType0PositionalLight +/* 00210 80B8D260 0C01E763 */ jal Lights_PointNoGlowSetInfo /* 00214 80B8D264 AFAB001C */ sw $t3, 0x001C($sp) /* 00218 80B8D268 1000000D */ beq $zero, $zero, .L80B8D2A0 @@ -104,7 +104,7 @@ glabel func_80B8D110 /* 00238 80B8D288 9226001D */ lbu $a2, 0x001D($s1) ## 0000001D /* 0023C 80B8D28C 9227001E */ lbu $a3, 0x001E($s1) ## 0000001E /* 00240 80B8D290 260402A0 */ addiu $a0, $s0, 0x02A0 ## $a0 = 000002A0 -/* 00244 80B8D294 0C01E796 */ jal Lights_SetPositionalLightColorAndRadius +/* 00244 80B8D294 0C01E796 */ jal Lights_PointSetColorAndRadius /* 00248 80B8D298 AFAC0010 */ sw $t4, 0x0010($sp) /* 0024C 80B8D29C 8FBF002C */ lw $ra, 0x002C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Syokudai/ObjSyokudai_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Obj_Syokudai/ObjSyokudai_Destroy.s index b07e64f18e..04140081ac 100644 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Syokudai/ObjSyokudai_Destroy.s +++ b/asm/non_matchings/overlays/actors/ovl_Obj_Syokudai/ObjSyokudai_Destroy.s @@ -16,7 +16,7 @@ glabel ObjSyokudai_Destroy /* 001F0 80B9F4A0 8FA4001C */ lw $a0, 0x001C($sp) /* 001F4 80B9F4A4 8FAE0018 */ lw $t6, 0x0018($sp) /* 001F8 80B9F4A8 248507A8 */ addiu $a1, $a0, 0x07A8 ## $a1 = 000007A8 -/* 001FC 80B9F4AC 0C01E9F1 */ jal Lights_Remove +/* 001FC 80B9F4AC 0C01E9F1 */ jal LightContext_RemoveLight /* 00200 80B9F4B0 8DC601E8 */ lw $a2, 0x01E8($t6) ## 000001E8 /* 00204 80B9F4B4 8FBF0014 */ lw $ra, 0x0014($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Syokudai/ObjSyokudai_Init.s b/asm/non_matchings/overlays/actors/ovl_Obj_Syokudai/ObjSyokudai_Init.s index 4d7bec3dc1..efb2472366 100644 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Syokudai/ObjSyokudai_Init.s +++ b/asm/non_matchings/overlays/actors/ovl_Obj_Syokudai/ObjSyokudai_Init.s @@ -79,12 +79,12 @@ glabel ObjSyokudai_Init /* 0011C 80B9F3CC AFAF0018 */ sw $t7, 0x0018($sp) /* 00120 80B9F3D0 AFAE0014 */ sw $t6, 0x0014($sp) /* 00124 80B9F3D4 AFAD0010 */ sw $t5, 0x0010($sp) -/* 00128 80B9F3D8 0C01E77C */ jal Lights_InitType2PositionalLight +/* 00128 80B9F3D8 0C01E77C */ jal Lights_PointGlowSetInfo /* 0012C 80B9F3DC AFA40030 */ sw $a0, 0x0030($sp) /* 00130 80B9F3E0 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 /* 00134 80B9F3E4 262507A8 */ addiu $a1, $s1, 0x07A8 ## $a1 = 000007A8 -/* 00138 80B9F3E8 0C01E9D9 */ jal Lights_Insert +/* 00138 80B9F3E8 0C01E9D9 */ jal LightContext_InsertLight /* 0013C 80B9F3EC 8FA60030 */ lw $a2, 0x0030($sp) /* 00140 80B9F3F0 8603001C */ lh $v1, 0x001C($s0) ## 0000001C diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Syokudai/ObjSyokudai_Update.s b/asm/non_matchings/overlays/actors/ovl_Obj_Syokudai/ObjSyokudai_Update.s index 964f3a45a7..c4ffa2a9e3 100644 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Syokudai/ObjSyokudai_Update.s +++ b/asm/non_matchings/overlays/actors/ovl_Obj_Syokudai/ObjSyokudai_Update.s @@ -425,7 +425,7 @@ glabel ObjSyokudai_Update /* 00800 80B9FAB0 260401EC */ addiu $a0, $s0, 0x01EC ## $a0 = 000001EC /* 00804 80B9FAB4 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 /* 00808 80B9FAB8 00C02825 */ or $a1, $a2, $zero ## $a1 = 00000000 -/* 0080C 80B9FABC 0C01E796 */ jal Lights_SetPositionalLightColorAndRadius +/* 0080C 80B9FABC 0C01E796 */ jal Lights_PointSetColorAndRadius /* 00810 80B9FAC0 AFAE0010 */ sw $t6, 0x0010($sp) /* 00814 80B9FAC4 920F01E6 */ lbu $t7, 0x01E6($s0) ## 000001E6 diff --git a/data/z_lights.data.s b/data/z_lights.data.s deleted file mode 100644 index de5fbb81ef..0000000000 --- a/data/z_lights.data.s +++ /dev/null @@ -1,15 +0,0 @@ -.include "macro.inc" - -# assembler directives -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches -.set gp=64 # allow use of 64-bit general purpose registers - -.section .data - -.balign 16 - -glabel D_80120030 - .word func_8007A0B4 - .word func_8007A40C - .word func_8007A0B4 diff --git a/include/functions.h b/include/functions.h index 5709c25b08..b61c7de9cb 100644 --- a/include/functions.h +++ b/include/functions.h @@ -288,10 +288,10 @@ void FlagSet_Update(GlobalContext* globalCtx); void Overlay_LoadGameState(GameStateOverlay* overlayEntry); void Overlay_FreeGameState(GameStateOverlay* overlayEntry); void ActorShape_Init(ActorShape* shape, f32 arg1, void* shadowDrawFunc, f32 arg3); -void ActorShadow_DrawFunc_Circle(Actor* actor, LightMapper* lightMapper, GlobalContext* globalCtx); -void ActorShadow_DrawFunc_WhiteCircle(Actor* actor, LightMapper* lightMapper, GlobalContext* globalCtx); -void ActorShadow_DrawFunc_Squiggly(Actor* actor, LightMapper* lightMapper, GlobalContext* globalCtx); -void ActorShadow_DrawFunc_Teardrop(Actor* actor, LightMapper* lightMapper, GlobalContext* globalCtx); +void ActorShadow_DrawFunc_Circle(Actor* actor, Lights* lights, GlobalContext* globalCtx); +void ActorShadow_DrawFunc_WhiteCircle(Actor* actor, Lights* lights, GlobalContext* globalCtx); +void ActorShadow_DrawFunc_Squiggly(Actor* actor, Lights* lights, GlobalContext* globalCtx); +void ActorShadow_DrawFunc_Teardrop(Actor* actor, Lights* lights, GlobalContext* globalCtx); void func_8002BDB0(Actor* actor, s32 arg1, s32 arg2, UNK_PTR arg3, s32 arg4, UNK_PTR arg5); void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx); s32 Flags_GetSwitch(GlobalContext* globalCtx, s32 flag); @@ -903,7 +903,7 @@ void KaleidoSetup_Destroy(GlobalContext* globalCtx); // ? func_8006EE60(?); // ? func_8006EEBC(?); // ? func_8006EF10(?); -// ? func_8006F0A0(?); +s32 func_8006F0A0(s32 arg0); // ? func_8006F0D4(?); // ? func_8006F0FC(?); u8 func_8006F140(GlobalContext*, EnvironmentContext*, UNK_TYPE); @@ -975,29 +975,27 @@ void Health_InitData(GlobalContext* globalCtx); void Health_UpdateData(GlobalContext* globalCtx); void Health_Draw(GlobalContext* globalCtx); void Health_HandleCriticalAlarm(GlobalContext* globalCtx); -void Lights_InitPositionalLight(LightInfoPositional* info, s16 posX, s16 posY, s16 posZ, u8 red, u8 green, u8 blue, - s16 radius, u32 type); -void Lights_InitType0PositionalLight(LightInfoPositional* info, s16 posX, s16 posY, s16 posZ, u8 red, u8 green, u8 blue, - s16 radius); -void Lights_InitType2PositionalLight(LightInfoPositional* info, s16 posX, s16 posY, s16 posZ, u8 red, u8 green, u8 blue, - s16 radius); -void Lights_SetPositionalLightColorAndRadius(LightInfoPositional* info, u8 red, u8 green, u8 blue, s16 radius); -void Lights_InitDirectional(LightInfoDirectional* info, s8 dirX, s8 dirY, s8 dirZ, u8 red, u8 green, u8 blue); -void Lights_MapperInit(LightMapper* mapper, u8 red, u8 green, u8 blue); -// ? func_8007A0B4(?); -// ? func_8007A474(?); -z_Light* Lights_FindFreeSlot(); -void func_8007A614(GlobalContext* globalCtx, LightingContext* lightCtx); -void func_8007A698(LightingContext* lightCtx, u8 arg1, u8 arg2, u8 arg3, s16 arg4, s16 arg5); -void Lights_SetAmbientColor(LightingContext* lightCtx, u8 red, u8 green, u8 blue); -LightMapper* Lights_CreateMapper(LightingContext* lightCtx, GraphicsContext* gfxCtx); -void Lights_ClearHead(GlobalContext* globalCtx, LightingContext* lightCtx); -void Lights_RemoveAll(GlobalContext* globalCtx, LightingContext* lightCtx); -z_Light* Lights_Insert(GlobalContext* globalCtx, LightingContext* lightCtx, void* info); -void Lights_Remove(GlobalContext* globalCtx, LightingContext* lightCtx, z_Light* light); -LightMapper* func_8007A960(GraphicsContext* gfxCtx, u8 red, u8 green, u8 blue); -// ? func_8007A9B4(?); -// ? func_8007ABBC(?); +void Lights_PointSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius, s32 type); +void Lights_PointNoGlowSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius); +void Lights_PointGlowSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius); +void Lights_PointSetColorAndRadius(LightInfo* info, u8 r, u8 g, u8 b, s16 radius); +void Lights_DirectionalSetInfo(LightInfo* info, s8 x, s8 y, s8 z, u8 r, u8 g, u8 b); +void Lights_Reset(Lights* lights, u8 ambentR, u8 ambentG, u8 ambentB); +void Lights_Draw(Lights* lights, GraphicsContext* gfxCtx); +void Lights_BindAll(Lights* lights, LightNode* listHead, Vec3f* vec); +void LightContext_Init(GlobalContext* globalCtx, LightContext* lightCtx); +void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b); +void func_8007A698(LightContext* lightCtx, u8 arg1, u8 arg2, u8 arg3, s16 numLights, s16 arg5); +Lights* LightContext_NewLights(LightContext* lightCtx, GraphicsContext* gfxCtx); +void LightContext_InitList(GlobalContext* globalCtx, LightContext* lightCtx); +void LightContext_DestroyList(GlobalContext* globalCtx, LightContext* lightCtx); +LightNode* LightContext_InsertLight(GlobalContext* globalCtx, LightContext* lightCtx, LightInfo* info); +void LightContext_RemoveLight(GlobalContext* globalCtx, LightContext* lightCtx, LightNode* node); +Lights* Lights_NewAndDraw(GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambientB, u8 numLights, u8 r, u8 g, + u8 b, s8 x, s8 y, s8 z); +Lights* Lights_New(GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambientB); +void Lights_GlowCheck(GlobalContext* globalCtx); +void Lights_DrawGlow(GlobalContext* globalCtx); void ZeldaArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action); void* ZeldaArena_Malloc(u32 size); void* ZeldaArena_MallocDebug(u32 size, const char* file, s32 line); diff --git a/include/variables.h b/include/variables.h index 326e167b13..7e8a0a1cf4 100644 --- a/include/variables.h +++ b/include/variables.h @@ -36,8 +36,8 @@ extern u8 D_04006020[]; extern Gfx D_0400C820[]; extern u32 D_0400CB70; extern u32 D_04010130; -//extern ? D_04015720; -//extern ? D_04015760; +extern Gfx D_04015720[]; +extern Gfx D_04015760[]; //extern ? D_0401A0B0; extern u32 D_0401E370; //extern ? D_0402CF30; @@ -3644,7 +3644,7 @@ extern OSPifRam pifMempakBuf; //extern ? D_801759BA; //extern ? D_801759BC; //extern ? D_801759BE; -extern u16 gZBuffer[SCREEN_WIDTH * SCREEN_HEIGHT]; // 0x25800 bytes +extern u16 gZBuffer[SCREEN_HEIGHT][SCREEN_WIDTH]; // 0x25800 bytes extern u64 gGfxSPTaskOutputBuffer[0x3000]; // 0x18000 bytes extern u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE]; // 0xC00 bytes extern u8 gGfxSPTaskStack[0x400]; // 0x400 bytes diff --git a/include/z64.h b/include/z64.h index d7ee81021d..9b1ad58064 100644 --- a/include/z64.h +++ b/include/z64.h @@ -1214,7 +1214,7 @@ typedef struct GlobalContext { /* 0x007A0 */ s16 activeCamera; /* 0x007A2 */ s16 nextCamera; /* 0x007A4 */ SoundContext soundCtx; - /* 0x007A8 */ LightingContext lightCtx; + /* 0x007A8 */ LightContext lightCtx; /* 0x007B8 */ SubGlobalContext7B8 sub_7B8; /* 0x007C0 */ CollisionContext colCtx; /* 0x01C24 */ ActorContext actorCtx; diff --git a/include/z64actor.h b/include/z64actor.h index c96431d61e..620d3b535b 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -14,7 +14,7 @@ struct Actor; struct GlobalContext; // From z64light.h -struct LightMapper; +struct Lights; typedef struct { Vec3f pos; @@ -98,7 +98,7 @@ typedef struct { /* 0x00 */ Vec3s rot; // Current actor shape rotation /* 0x06 */ u8 unk_06; /* 0x08 */ f32 unk_08; // Model y axis offset. Represents model space units. collision mesh related - /* 0x0C */ void (*shadowDrawFunc)(struct Actor*, struct LightMapper*, struct GlobalContext*); + /* 0x0C */ void (*shadowDrawFunc)(struct Actor*, struct Lights*, struct GlobalContext*); /* 0x10 */ f32 unk_10; /* 0x14 */ u8 unk_14; /* 0x15 */ u8 unk_15; diff --git a/include/z64effect.h b/include/z64effect.h index cdaa6f19e0..55b36e8e8c 100644 --- a/include/z64effect.h +++ b/include/z64effect.h @@ -132,7 +132,7 @@ typedef struct { /* 0x24 */ f32 maxInitialSpeed; /* 0x28 */ f32 lengthCutoff; /* 0x2C */ u8 duration; - /* 0x2E */ LightInfoPositionalParams lightParams; + /* 0x2E */ LightPoint lightPoint; /* 0x3C */ s32 lightDecay; // halves light radius every frame when set to 1 } EffectShieldParticleInit; // size = 0x40 @@ -152,8 +152,8 @@ typedef struct { /* 0x1AC */ f32 lengthCutoff; /* 0x1B0 */ u8 duration; /* 0x1B1 */ u8 timer; - /* 0x1B2 */ LightInfoPositional lightInfo; - /* 0x1C0 */ z_Light* light; + /* 0x1B2 */ LightInfo lightInfo; + /* 0x1C0 */ LightNode* lightNode; /* 0x1C4 */ s32 lightDecay; // halves light radius every frame when set to 1 } EffectShieldParticle; // size = 0x1C8 diff --git a/include/z64light.h b/include/z64light.h index 68a2e63945..734ac23a7d 100644 --- a/include/z64light.h +++ b/include/z64light.h @@ -3,73 +3,62 @@ #include #include - -typedef struct z_Light_t { - /* 0x0 */ struct LightInfo* info; - /* 0x4 */ struct z_Light_t* prev; - /* 0x8 */ struct z_Light_t* next; -} z_Light; +#include +#include typedef struct { - /* 0x0 */ z_Light* lightsHead; - /* 0x4 */ u8 ambientRed; - /* 0x5 */ u8 ambientGreen; - /* 0x6 */ u8 ambientBlue; + /* 0x0 */ s16 x; + /* 0x2 */ s16 y; + /* 0x4 */ s16 z; + /* 0x6 */ u8 color[3]; + /* 0x9 */ u8 drawGlow; + /* 0xA */ s16 radius; +} LightPoint; // size = 0xC + +typedef struct { + /* 0x0 */ s8 x; + /* 0x1 */ s8 y; + /* 0x2 */ s8 z; + /* 0x3 */ u8 color[3]; +} LightDirectional; // size = 0x6 + +typedef union { + LightPoint point; + LightDirectional dir; +} LightParams; // size = 0xC + +typedef struct { + /* 0x0 */ u8 type; + /* 0x2 */ LightParams params; +} LightInfo; // size = 0xE + +typedef struct Lights{ + /* 0x00 */ u8 numLights; + /* 0x08 */ Lightsn l; +} Lights; // size = 0x80 + +typedef struct LightNode { + /* 0x0 */ LightInfo* info; + /* 0x4 */ struct LightNode* prev; + /* 0x8 */ struct LightNode* next; +} LightNode; // size = 0xC + +typedef struct { + /* 0x0 */ LightNode* listHead; + /* 0x4 */ Color_RGB8 ambient; /* 0x7 */ u8 unk_07; /* 0x8 */ u8 unk_08; /* 0x9 */ u8 unk_09; /* 0xA */ s16 unk_0A; /* 0xC */ s16 unk_0C; -} LightingContext; +} LightContext; // size = 0x10 -typedef struct { - /* 0x000 */ int numOccupied; - /* 0x004 */ int nextFree; - /* 0x008 */ z_Light lights[32]; -} LightsList; +typedef enum { + /* 0x00 */ LIGHT_POINT_NOGLOW, + /* 0x01 */ LIGHT_DIRECTIONAL, + /* 0x02 */ LIGHT_POINT_GLOW +} LightType; -typedef struct { - /* 0x0 */ u8 type; - /* 0x2 */ u16 params[6]; -} LightInfo; - -typedef struct { - /* 0x0 */ s8 dirX; - /* 0x1 */ s8 dirY; - /* 0x2 */ s8 dirZ; - /* 0x3 */ u8 red; - /* 0x4 */ u8 green; - /* 0x5 */ u8 blue; - /* 0x6 */ u16 pad[3]; -} LightInfoDirectionalParams; - -typedef struct { - /* 0x0 */ s16 posX; - /* 0x2 */ s16 posY; - /* 0x4 */ s16 posZ; - /* 0x6 */ u8 red; - /* 0x7 */ u8 green; - /* 0x8 */ u8 blue; - /* 0x9 */ u8 unk_09; - /* 0xA */ s16 radius; -} LightInfoPositionalParams; - -typedef struct { - /* 0x00 */ u8 numLights; - /* 0x01 */ u8 enablePosLights; - /* 0x02 */ UNK_TYPE1 pad2[6]; - /* 0x08 */ Ambient ambient; - /* 0x10 */ Light lights[7]; -} LightMapper; - -typedef struct { - /* 0x0 */ u8 type; - /* 0x2 */ LightInfoDirectionalParams params; -} LightInfoDirectional; - -typedef struct { - /* 0x0 */ u8 type; - /* 0x2 */ LightInfoPositionalParams params; -} LightInfoPositional; +typedef void (*LightsBindFunc)(Lights* lights, LightParams* params, Vec3f* vec); #endif diff --git a/spec b/spec index a3dcafed8e..6efe74be0a 100644 --- a/spec +++ b/spec @@ -321,7 +321,6 @@ beginseg include "build/src/code/z_lifemeter.o" include "build/data/z_lifemeter.data.o" include "build/src/code/z_lights.o" - include "build/data/z_lights.data.o" include "build/src/code/z_malloc.o" include "build/src/code/z_map_mark.o" include "build/src/code/z_moji.o" diff --git a/src/buffers/zbuffer.c b/src/buffers/zbuffer.c index b6dac33bd3..49cf0d8d85 100644 --- a/src/buffers/zbuffer.c +++ b/src/buffers/zbuffer.c @@ -1,4 +1,4 @@ #include // 0x25800 bytes -u16 gZBuffer[SCREEN_WIDTH * SCREEN_HEIGHT]; +u16 gZBuffer[SCREEN_HEIGHT][SCREEN_WIDTH]; diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 4f51d9485b..019c3c239f 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -12,7 +12,7 @@ void ActorShape_Init(ActorShape* shape, f32 arg1, void* shadowDrawFunc, f32 arg3 shape->unk_14 = -1; } -void func_8002B200(Actor* actor, LightMapper* lightMapper, GlobalContext* globalCtx, Gfx* dlist, Color_RGBA8* color) { +void func_8002B200(Actor* actor, Lights* lights, GlobalContext* globalCtx, Gfx* dlist, Color_RGBA8* color) { f32 temp1; f32 temp2; MtxF sp60; @@ -57,18 +57,18 @@ void func_8002B200(Actor* actor, LightMapper* lightMapper, GlobalContext* global } } -void ActorShadow_DrawFunc_Circle(Actor* actor, LightMapper* lightMapper, GlobalContext* globalCtx) { - func_8002B200(actor, lightMapper, globalCtx, &D_04049210, NULL); +void ActorShadow_DrawFunc_Circle(Actor* actor, Lights* lights, GlobalContext* globalCtx) { + func_8002B200(actor, lights, globalCtx, &D_04049210, NULL); } Color_RGBA8 D_80115F80 = { 255, 255, 255, 255 }; -void ActorShadow_DrawFunc_WhiteCircle(Actor* actor, LightMapper* lightMapper, GlobalContext* globalCtx) { - func_8002B200(actor, lightMapper, globalCtx, &D_04049210, &D_80115F80); +void ActorShadow_DrawFunc_WhiteCircle(Actor* actor, Lights* lights, GlobalContext* globalCtx) { + func_8002B200(actor, lights, globalCtx, &D_04049210, &D_80115F80); } -void ActorShadow_DrawFunc_Squiggly(Actor* actor, LightMapper* lightMapper, GlobalContext* globalCtx) { - func_8002B200(actor, lightMapper, globalCtx, &D_04049AD0, NULL); +void ActorShadow_DrawFunc_Squiggly(Actor* actor, Lights* lights, GlobalContext* globalCtx) { + func_8002B200(actor, lights, globalCtx, &D_04049AD0, NULL); } void func_8002B66C(GlobalContext* globalCtx, Light* light, MtxF* arg2, s32 arg3, f32 arg4, f32 arg5, f32 arg6) { @@ -97,7 +97,7 @@ void func_8002B66C(GlobalContext* globalCtx, Light* light, MtxF* arg2, s32 arg3, #ifdef NON_MATCHING // saved register, stack usage and minor ordering differences -void ActorShadow_DrawFunc_Teardrop(Actor* actor, LightMapper* lightMapper, GlobalContext* globalCtx) { +void ActorShadow_DrawFunc_Teardrop(Actor* actor, Lights* lights, GlobalContext* globalCtx) { MtxF spE8; f32 spE0[2]; s32 i; @@ -125,7 +125,7 @@ void ActorShadow_DrawFunc_Teardrop(Actor* actor, LightMapper* lightMapper, Globa temp_14 = actor->shape.unk_14; actor->shape.unk_10 *= 0.3f; actor->shape.unk_14 *= ((temp_f20 - 20.0f) * 0.02f) > 1.0f ? 1.0f : ((temp_f20 - 20.0f) * 0.02f); - ActorShadow_DrawFunc_Circle(actor, lightMapper, globalCtx); + ActorShadow_DrawFunc_Circle(actor, lights, globalCtx); actor->shape.unk_10 = temp_10; actor->shape.unk_14 = temp_14; } @@ -133,7 +133,7 @@ void ActorShadow_DrawFunc_Teardrop(Actor* actor, LightMapper* lightMapper, Globa if (temp_f20 < 200.0f) { phi_s7 = &actor->unk_CC[0]; spAC = &spE0[0]; - temp_s6 = lightMapper->numLights; + temp_s6 = lights->numLights; temp_s6 -= 2; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1741); @@ -151,7 +151,7 @@ void ActorShadow_DrawFunc_Teardrop(Actor* actor, LightMapper* lightMapper, Globa phi_f2 = phi_s7->y - *spAC; if ((phi_f2 >= -1.0f) && (phi_f2 < 500.0f)) { - phi_s0 = lightMapper->lights; + phi_s0 = &lights->l.l[0]; if (phi_f2 <= 0.0f) { actor->shape.unk_15++; @@ -1724,8 +1724,8 @@ s32 func_8002F9EC(GlobalContext* globalCtx, Actor* actor, UNK_TYPE arg2, UNK_TYP } // Local data used for Farore's Wind light (stored in BSS, possibly a struct?) -LightInfoPositional D_8015BC00; -z_Light* D_8015BC10; +LightInfo D_8015BC00; +LightNode* D_8015BC10; s32 D_8015BC14; f32 D_8015BC18; @@ -1754,9 +1754,9 @@ void func_8002FA60(GlobalContext* globalCtx) { lightPos.y = gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y + 80.0f; lightPos.z = gSaveContext.respawn[RESPAWN_MODE_TOP].pos.z; - Lights_InitType0PositionalLight(&D_8015BC00, lightPos.x, lightPos.y, lightPos.z, 0xFF, 0xFF, 0xFF, -1); + Lights_PointNoGlowSetInfo(&D_8015BC00, lightPos.x, lightPos.y, lightPos.z, 0xFF, 0xFF, 0xFF, -1); - D_8015BC10 = Lights_Insert(globalCtx, &globalCtx->lightCtx, &D_8015BC00); + D_8015BC10 = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, &D_8015BC00); D_8015BC14 = 0; D_8015BC18 = 0.0f; } @@ -1919,8 +1919,7 @@ void func_8002FBAC(GlobalContext* globalCtx) { lightPos.y = gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y + spD8; lightPos.z = gSaveContext.respawn[RESPAWN_MODE_TOP].pos.z; - Lights_InitType0PositionalLight(&D_8015BC00, lightPos.x, lightPos.y, lightPos.z, 0xFF, 0xFF, 0xFF, - 500.0f * spD4); + Lights_PointNoGlowSetInfo(&D_8015BC00, lightPos.x, lightPos.y, lightPos.z, 0xFF, 0xFF, 0xFF, 500.0f * spD4); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 5474); } @@ -1930,7 +1929,7 @@ void func_8002FBAC(GlobalContext* globalCtx) { #endif void func_80030488(GlobalContext* globalCtx) { - Lights_Remove(globalCtx, &globalCtx->lightCtx, D_8015BC10); + LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, D_8015BC10); } void func_800304B0(GlobalContext* globalCtx) { @@ -2150,16 +2149,16 @@ void Actor_FaultPrint(Actor* actor, char* command) { void Actor_Draw(GlobalContext* globalCtx, Actor* actor) { FaultClient faultClient; - LightMapper* lightMapper; + Lights* lights; Fault_AddClient(&faultClient, Actor_FaultPrint, actor, "Actor_draw"); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 6035); - lightMapper = Lights_CreateMapper(&globalCtx->lightCtx, globalCtx->state.gfxCtx); + lights = LightContext_NewLights(&globalCtx->lightCtx, globalCtx->state.gfxCtx); - func_8007A474(lightMapper, globalCtx->lightCtx.lightsHead, (actor->flags & 0x400000) ? NULL : &actor->posRot.pos); - func_80079EFC(lightMapper, globalCtx->state.gfxCtx); + Lights_BindAll(lights, globalCtx->lightCtx.listHead, (actor->flags & 0x400000) ? NULL : &actor->posRot.pos); + Lights_Draw(lights, globalCtx->state.gfxCtx); if (actor->flags & 0x1000) { func_800D1694(actor->posRot.pos.x + globalCtx->mainCamera.unk_80.x, @@ -2206,7 +2205,7 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) { } if (actor->shape.shadowDrawFunc != NULL) { - actor->shape.shadowDrawFunc(actor, lightMapper, globalCtx); + actor->shape.shadowDrawFunc(actor, lights, globalCtx); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 6119); @@ -2425,7 +2424,7 @@ void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) { func_8002FBAC(globalCtx); if (IREG(32) == 0) { - func_8007ABBC(globalCtx); + Lights_DrawGlow(globalCtx); } if ((HREG(64) != 1) || (HREG(75) != 0)) { diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index fca60ed13c..105db862a6 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -3068,9 +3068,9 @@ void func_80062CD4(GlobalContext* globalCtx, Vec3f* v) { init.position.x = (s32)v->x; init.position.y = (s32)v->y; init.position.z = (s32)v->z; - init.lightParams.posX = init.position.x; - init.lightParams.posY = init.position.y; - init.lightParams.posZ = init.position.z; + init.lightPoint.x = init.position.x; + init.lightPoint.y = init.position.y; + init.lightPoint.z = init.position.z; Effect_Add(globalCtx, &sp24, EFFECT_SHIELD_PARTICLE, 0, 1, &init); } @@ -3111,9 +3111,9 @@ void func_80062E14(GlobalContext* globalCtx, Vec3f* v, Vec3f* arg2) { init.position.x = (s32)v->x; init.position.y = (s32)v->y; init.position.z = (s32)v->z; - init.lightParams.posX = init.position.x; - init.lightParams.posY = init.position.y; - init.lightParams.posZ = init.position.z; + init.lightPoint.x = init.position.x; + init.lightPoint.y = init.position.y; + init.lightPoint.z = init.position.z; Effect_Add(globalCtx, &sp24, EFFECT_SHIELD_PARTICLE, 0, 1, &init); Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, arg2, 4, &D_801333E0, &D_801333E0, &D_801333E8); diff --git a/src/code/z_eff_shield_particle.c b/src/code/z_eff_shield_particle.c index 46a0b9502d..42e3cde6c5 100644 --- a/src/code/z_eff_shield_particle.c +++ b/src/code/z_eff_shield_particle.c @@ -50,11 +50,12 @@ void EffectShieldParticle_Init(void* thisx, void* initParamsx) { this->lightDecay = initParams->lightDecay; if (this->lightDecay == true) { - this->lightInfo.type = 0; - this->lightInfo.params = initParams->lightParams; - this->light = Lights_Insert(Effect_GetGlobalCtx(), &Effect_GetGlobalCtx()->lightCtx, &this->lightInfo); + this->lightInfo.type = LIGHT_POINT_NOGLOW; + this->lightInfo.params.point = initParams->lightPoint; + this->lightNode = + LightContext_InsertLight(Effect_GetGlobalCtx(), &Effect_GetGlobalCtx()->lightCtx, &this->lightInfo); } else { - this->light = NULL; + this->lightNode = NULL; } } } @@ -63,10 +64,10 @@ void EffectShieldParticle_Destroy(void* thisx) { EffectShieldParticle* this = (EffectShieldParticle*)thisx; if ((this != NULL) && (this->lightDecay == true)) { - if (this->light == Effect_GetGlobalCtx()->lightCtx.lightsHead) { - Effect_GetGlobalCtx()->lightCtx.lightsHead = this->light->next; + if (this->lightNode == Effect_GetGlobalCtx()->lightCtx.listHead) { + Effect_GetGlobalCtx()->lightCtx.listHead = this->lightNode->next; } - Lights_Remove(Effect_GetGlobalCtx(), &Effect_GetGlobalCtx()->lightCtx, this->light); + LightContext_RemoveLight(Effect_GetGlobalCtx(), &Effect_GetGlobalCtx()->lightCtx, this->lightNode); } } @@ -100,7 +101,7 @@ s32 EffectShieldParticle_Update(void* thisx) { } if (this->lightDecay == true) { - this->lightInfo.params.radius /= 2; + this->lightInfo.params.point.radius /= 2; } this->timer++; diff --git a/src/code/z_effect_soft_sprite.c b/src/code/z_effect_soft_sprite.c index 8af41a4649..6f9a16f89e 100644 --- a/src/code/z_effect_soft_sprite.c +++ b/src/code/z_effect_soft_sprite.c @@ -295,12 +295,12 @@ void EffectSs_Draw(GlobalContext* globalCtx, s32 index) { // original name: "EffectSoftSprite2_disp" void EffectSs_DrawAll(GlobalContext* globalCtx) { - LightMapper* lightMapper; + Lights* lights; s32 i; - lightMapper = Lights_CreateMapper(&globalCtx->lightCtx, globalCtx->state.gfxCtx); - func_8007A474(lightMapper, globalCtx->lightCtx.lightsHead, 0); - func_80079EFC(lightMapper, globalCtx->state.gfxCtx); + lights = LightContext_NewLights(&globalCtx->lightCtx, globalCtx->state.gfxCtx); + Lights_BindAll(lights, globalCtx->lightCtx.listHead, NULL); + Lights_Draw(lights, globalCtx->state.gfxCtx); for (i = 0; i < sEffectSsInfo.tableSize; i++) { if (sEffectSsInfo.table[i].life > -1) { diff --git a/src/code/z_lights.c b/src/code/z_lights.c index 83f0a70323..50e351aa4d 100644 --- a/src/code/z_lights.c +++ b/src/code/z_lights.c @@ -1,190 +1,396 @@ #include #include -LightsList sLightsList; +#define LIGHTS_BUFFER_SIZE 32 -void Lights_InitPositionalLight(LightInfoPositional* info, s16 posX, s16 posY, s16 posZ, u8 red, u8 green, u8 blue, - s16 radius, u32 type) { +typedef struct { + /* 0x000 */ s32 numOccupied; + /* 0x004 */ s32 searchIndex; + /* 0x008 */ LightNode buf[LIGHTS_BUFFER_SIZE]; +} LightsBuffer; // size = 0x188 + +LightsBuffer sLightsBuffer; + +void Lights_PointSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius, s32 type) { info->type = type; - info->params.posX = posX; - info->params.posY = posY; - info->params.posZ = posZ; - Lights_SetPositionalLightColorAndRadius(info, red, green, blue, radius); + info->params.point.x = x; + info->params.point.y = y; + info->params.point.z = z; + Lights_PointSetColorAndRadius(info, r, g, b, radius); } -void Lights_InitType0PositionalLight(LightInfoPositional* info, s16 posX, s16 posY, s16 posZ, u8 red, u8 green, u8 blue, - s16 radius) { - Lights_InitPositionalLight(info, posX, posY, posZ, red, green, blue, radius, 0); +void Lights_PointNoGlowSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius) { + Lights_PointSetInfo(info, x, y, z, r, g, b, radius, LIGHT_POINT_NOGLOW); } -void Lights_InitType2PositionalLight(LightInfoPositional* info, s16 posX, s16 posY, s16 posZ, u8 red, u8 green, u8 blue, - s16 radius) { - Lights_InitPositionalLight(info, posX, posY, posZ, red, green, blue, radius, 2); +void Lights_PointGlowSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius) { + Lights_PointSetInfo(info, x, y, z, r, g, b, radius, LIGHT_POINT_GLOW); } -void Lights_SetPositionalLightColorAndRadius(LightInfoPositional* info, u8 red, u8 green, u8 blue, s16 radius) { - info->params.red = red; - info->params.green = green; - info->params.blue = blue; - info->params.radius = radius; +void Lights_PointSetColorAndRadius(LightInfo* info, u8 r, u8 g, u8 b, s16 radius) { + info->params.point.color[0] = r; + info->params.point.color[1] = g; + info->params.point.color[2] = b; + info->params.point.radius = radius; } -void Lights_InitDirectional(LightInfoDirectional* info, s8 dirX, s8 dirY, s8 dirZ, u8 red, u8 green, u8 blue) { - info->type = 1; - info->params.dirX = dirX; - info->params.dirY = dirY; - info->params.dirZ = dirZ; - info->params.red = red; - info->params.green = green; - info->params.blue = blue; +void Lights_DirectionalSetInfo(LightInfo* info, s8 x, s8 y, s8 z, u8 r, u8 g, u8 b) { + info->type = LIGHT_DIRECTIONAL; + info->params.dir.x = x; + info->params.dir.y = y; + info->params.dir.z = z; + info->params.dir.color[0] = r; + info->params.dir.color[1] = g; + info->params.dir.color[2] = b; } -void Lights_MapperInit(LightMapper* mapper, u8 red, u8 green, u8 blue) { - mapper->ambient.l.col[0] = red; - mapper->ambient.l.colc[0] = red; - mapper->ambient.l.col[1] = green; - mapper->ambient.l.colc[1] = green; - mapper->ambient.l.col[2] = blue; - mapper->ambient.l.colc[2] = blue; - mapper->numLights = 0; +// unused +void Lights_Reset(Lights* lights, u8 ambentR, u8 ambentG, u8 ambentB) { + lights->l.a.l.col[0] = lights->l.a.l.colc[0] = ambentR; + lights->l.a.l.col[1] = lights->l.a.l.colc[1] = ambentG; + lights->l.a.l.col[2] = lights->l.a.l.colc[2] = ambentB; + lights->numLights = 0; } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_lights/func_80079EFC.s") +/* + * Draws every light in the provided Lights group + */ +void Lights_Draw(Lights* lights, GraphicsContext* gfxCtx) { + Light* light; + s32 i; -Light* Lights_MapperGetNextFreeSlot(LightMapper* mapper) { - if (6 < mapper->numLights) { - return NULL; + OPEN_DISPS(gfxCtx, "../z_lights.c", 339); + + gSPNumLights(oGfxCtx->polyOpa.p++, lights->numLights); + gSPNumLights(oGfxCtx->polyXlu.p++, lights->numLights); + + i = 0; + light = &lights->l.l[0]; + + while (i < lights->numLights) { + i++; + gSPLight(oGfxCtx->polyOpa.p++, light, i); + gSPLight(oGfxCtx->polyXlu.p++, light, i); + light++; } - return &mapper->lights[mapper->numLights++]; + if (0) {} + + i++; // abmient light is total number of lights + 1 + gSPLight(oGfxCtx->polyOpa.p++, &lights->l.a, i); + gSPLight(oGfxCtx->polyXlu.p++, &lights->l.a, i); + + CLOSE_DISPS(gfxCtx, "../z_lights.c", 352); } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_lights/func_8007A0B4.s") +Light* Lights_FindSlot(Lights* lights) { + if (lights->numLights >= 7) { + return NULL; + } else { + return &lights->l.l[lights->numLights++]; + } +} -void func_8007A40C(LightMapper* mapper, LightInfoDirectionalParams* params, GlobalContext* globalCtx) { - Light* light = Lights_MapperGetNextFreeSlot(mapper); +void Lights_BindPoint(Lights* lights, LightParams* params, Vec3f* vec) { + f32 xDiff; + f32 yDiff; + f32 zDiff; + f32 posDiff; + f32 scale; + Light* light; + + if (vec != NULL) { + xDiff = params->point.x - vec->x; + yDiff = params->point.y - vec->y; + zDiff = params->point.z - vec->z; + scale = params->point.radius; + posDiff = SQ(xDiff) + SQ(yDiff) + SQ(zDiff); + + if (posDiff < SQ(scale)) { + light = Lights_FindSlot(lights); + + if (light != NULL) { + posDiff = sqrtf(posDiff); + if (1) {} + scale = posDiff / scale; + scale = 1 - SQ(scale); + + light->l.col[0] = light->l.colc[0] = params->point.color[0] * scale; + light->l.col[1] = light->l.colc[1] = params->point.color[1] * scale; + light->l.col[2] = light->l.colc[2] = params->point.color[2] * scale; + + scale = (posDiff < 1.0f) ? 120.0f : 120.0f / posDiff; + + light->l.dir[0] = xDiff * scale; + light->l.dir[1] = yDiff * scale; + light->l.dir[2] = zDiff * scale; + } + } + } +} + +void Lights_BindDirectional(Lights* lights, LightParams* params, Vec3f* vec) { + Light* light = Lights_FindSlot(lights); if (light != NULL) { - light->l.col[0] = light->l.colc[0] = params->red; - light->l.col[1] = light->l.colc[1] = params->green; - light->l.col[2] = light->l.colc[2] = params->blue; - light->l.dir[0] = params->dirX; - light->l.dir[1] = params->dirY; - light->l.dir[2] = params->dirZ; + light->l.col[0] = light->l.colc[0] = params->dir.color[0]; + light->l.col[1] = light->l.colc[1] = params->dir.color[1]; + light->l.col[2] = light->l.colc[2] = params->dir.color[2]; + light->l.dir[0] = params->dir.x; + light->l.dir[1] = params->dir.y; + light->l.dir[2] = params->dir.z; } } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_lights/func_8007A474.s") +/* + * For every light in a provided list, try to find a free slot in the provided Lights group and bind + * a light to it. Then apply color and positional/directional info for each light + * based on the parameters supplied by the node. + * + * Note: Lights in a given list can only be binded to however many free slots are + * available in the Lights group. This is at most 7 slots for a new group, but could be less. + */ +void Lights_BindAll(Lights* lights, LightNode* listHead, Vec3f* vec) { + LightsBindFunc bindFuncs[] = { Lights_BindPoint, Lights_BindDirectional, Lights_BindPoint }; + LightInfo* info; -z_Light* Lights_FindFreeSlot() { - z_Light* ret; + while (listHead != NULL) { + info = listHead->info; + bindFuncs[info->type](lights, &info->params, vec); + listHead = listHead->next; + } +} - if (0x1F < sLightsList.numOccupied) { +LightNode* Lights_FindBufSlot() { + LightNode* node; + + if (sLightsBuffer.numOccupied >= LIGHTS_BUFFER_SIZE) { return NULL; } - ret = &sLightsList.lights[sLightsList.nextFree]; + node = &sLightsBuffer.buf[sLightsBuffer.searchIndex]; - while (ret->info != NULL) { - sLightsList.nextFree++; + while (node->info != NULL) { + sLightsBuffer.searchIndex++; - if (sLightsList.nextFree < 0x20) { - ret++; + if (sLightsBuffer.searchIndex < LIGHTS_BUFFER_SIZE) { + node++; } else { - sLightsList.nextFree = 0; - ret = &sLightsList.lights[0]; + sLightsBuffer.searchIndex = 0; + node = &sLightsBuffer.buf[0]; } } - sLightsList.numOccupied++; + sLightsBuffer.numOccupied++; - return ret; + return node; } // return type must not be void to match -s32 Lights_Free(z_Light* light) { +s32 Lights_FreeNode(LightNode* light) { if (light != NULL) { - sLightsList.numOccupied--; + sLightsBuffer.numOccupied--; light->info = NULL; - sLightsList.nextFree = (light - sLightsList.lights) / sizeof(z_Light); + sLightsBuffer.searchIndex = (light - sLightsBuffer.buf) / sizeof(LightNode); } } -void func_8007A614(GlobalContext* globalCtx, LightingContext* lightCtx) { - Lights_ClearHead(globalCtx, lightCtx); - Lights_SetAmbientColor(lightCtx, 80, 80, 80); - func_8007A698(lightCtx, 0, 0, 0, 0x3e4, 0x3200); - bzero(&sLightsList, sizeof(sLightsList)); +void LightContext_Init(GlobalContext* globalCtx, LightContext* lightCtx) { + LightContext_InitList(globalCtx, lightCtx); + LightContext_SetAmbientColor(lightCtx, 80, 80, 80); + func_8007A698(lightCtx, 0, 0, 0, 0x3E4, 0x3200); + bzero(&sLightsBuffer, sizeof(sLightsBuffer)); } -void Lights_SetAmbientColor(LightingContext* lightCtx, u8 red, u8 green, u8 blue) { - lightCtx->ambientRed = red; - lightCtx->ambientGreen = green; - lightCtx->ambientBlue = blue; +void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b) { + lightCtx->ambient.r = r; + lightCtx->ambient.g = g; + lightCtx->ambient.b = b; } -void func_8007A698(LightingContext* lightCtx, u8 arg1, u8 arg2, u8 arg3, s16 arg4, s16 arg5) { +void func_8007A698(LightContext* lightCtx, u8 arg1, u8 arg2, u8 arg3, s16 numLights, s16 arg5) { lightCtx->unk_07 = arg1; lightCtx->unk_08 = arg2; lightCtx->unk_09 = arg3; - lightCtx->unk_0A = arg4; + lightCtx->unk_0A = numLights; lightCtx->unk_0C = arg5; } -LightMapper* Lights_CreateMapper(LightingContext* lightCtx, GraphicsContext* gfxCtx) { - return func_8007A960(gfxCtx, lightCtx->ambientRed, lightCtx->ambientGreen, lightCtx->ambientBlue); +/* + * Allocate a new Lights group and initilize the ambient color with that provided by LightContext + */ +Lights* LightContext_NewLights(LightContext* lightCtx, GraphicsContext* gfxCtx) { + return Lights_New(gfxCtx, lightCtx->ambient.r, lightCtx->ambient.g, lightCtx->ambient.b); } -void Lights_ClearHead(GlobalContext* globalCtx, LightingContext* lightCtx) { - lightCtx->lightsHead = NULL; +void LightContext_InitList(GlobalContext* globalCtx, LightContext* lightCtx) { + lightCtx->listHead = NULL; } -void Lights_RemoveAll(GlobalContext* globalCtx, LightingContext* lightCtx) { - while (lightCtx->lightsHead != NULL) { - Lights_Remove(globalCtx, lightCtx, lightCtx->lightsHead); - lightCtx->lightsHead = lightCtx->lightsHead->next; +void LightContext_DestroyList(GlobalContext* globalCtx, LightContext* lightCtx) { + while (lightCtx->listHead != NULL) { + LightContext_RemoveLight(globalCtx, lightCtx, lightCtx->listHead); + lightCtx->listHead = lightCtx->listHead->next; } } -z_Light* Lights_Insert(GlobalContext* globalCtx, LightingContext* lightCtx, void* info) { - z_Light* light; +/* + * Insert a new light into the list pointed to by LightContext + * + * Note: Due to the limited number of slots in a Lights group, inserting too many lights in the + * list may result in older entries not being bound to a Light when calling Lights_BindAll + */ +LightNode* LightContext_InsertLight(GlobalContext* globalCtx, LightContext* lightCtx, LightInfo* info) { + LightNode* node; - light = Lights_FindFreeSlot(); - if (light != NULL) { - light->info = info; - light->prev = NULL; - light->next = lightCtx->lightsHead; + node = Lights_FindBufSlot(); - if (lightCtx->lightsHead != NULL) { - lightCtx->lightsHead->prev = light; + if (node != NULL) { + node->info = info; + node->prev = NULL; + node->next = lightCtx->listHead; + + if (lightCtx->listHead != NULL) { + lightCtx->listHead->prev = node; } - lightCtx->lightsHead = light; + lightCtx->listHead = node; } - return light; + return node; } -void Lights_Remove(GlobalContext* globalCtx, LightingContext* lightCtx, z_Light* light) { - if (light != NULL) { - if (light->prev != NULL) { - light->prev->next = light->next; +void LightContext_RemoveLight(GlobalContext* globalCtx, LightContext* lightCtx, LightNode* node) { + if (node != NULL) { + if (node->prev != NULL) { + node->prev->next = node->next; } else { - lightCtx->lightsHead = light->next; + lightCtx->listHead = node->next; } - if (light->next != NULL) { - light->next->prev = light->prev; + if (node->next != NULL) { + node->next->prev = node->prev; } - Lights_Free(light); + Lights_FreeNode(node); } } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_lights/func_8007A824.s") +// unused +Lights* Lights_NewAndDraw(GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambientB, u8 numLights, u8 r, u8 g, + u8 b, s8 x, s8 y, s8 z) { + Lights* lights; + s32 i; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_lights/func_8007A960.s") + lights = Graph_Alloc(gfxCtx, sizeof(Lights)); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_lights/func_8007A9B4.s") + lights->l.a.l.col[0] = lights->l.a.l.colc[0] = ambientR; + lights->l.a.l.col[1] = lights->l.a.l.colc[1] = ambientG; + lights->l.a.l.col[2] = lights->l.a.l.colc[2] = ambientB; + lights->numLights = numLights; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_lights/func_8007ABBC.s") + for (i = 0; i < numLights; i++) { + lights->l.l[i].l.col[0] = lights->l.l[i].l.colc[0] = r; + lights->l.l[i].l.col[1] = lights->l.l[i].l.colc[1] = g; + lights->l.l[i].l.col[2] = lights->l.l[i].l.colc[2] = b; + lights->l.l[i].l.dir[0] = x; + lights->l.l[i].l.dir[1] = y; + lights->l.l[i].l.dir[2] = z; + } + + Lights_Draw(lights, gfxCtx); + + return lights; +} + +Lights* Lights_New(GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambientB) { + Lights* lights; + + lights = Graph_Alloc(gfxCtx, sizeof(Lights)); + + lights->l.a.l.col[0] = lights->l.a.l.colc[0] = ambientR; + lights->l.a.l.col[1] = lights->l.a.l.colc[1] = ambientG; + lights->l.a.l.col[2] = lights->l.a.l.colc[2] = ambientB; + lights->numLights = 0; + + return lights; +} + +void Lights_GlowCheck(GlobalContext* globalCtx) { + LightNode* node; + LightPoint* params; + Vec3f pos; + Vec3f multDest; + f32 wDest; + f32 wX; + f32 wY; + s32 wZ; + s32 zBuf; + + node = globalCtx->lightCtx.listHead; + + while (node != NULL) { + params = &node->info->params.point; + + if (node->info->type == LIGHT_POINT_GLOW) { + pos.x = params->x; + pos.y = params->y; + pos.z = params->z; + func_8002BE04(globalCtx, &pos, &multDest, &wDest); + params->drawGlow = false; + wX = multDest.x * wDest; + wY = multDest.y * wDest; + + if ((multDest.z > 1.0f) && (fabsf(wX) < 1.0f) && (fabsf(wY) < 1.0f)) { + wZ = (s32)((multDest.z * wDest) * 16352.0f) + 16352; + zBuf = gZBuffer[(s32)((wY * -120.0f) + 120.0f)][(s32)((wX * 160.0f) + 160.0f)] * 4; + if (1) {} + if (1) {} + + if (wZ < (func_8006F0A0(zBuf) >> 3)) { + params->drawGlow = true; + } + } + } + node = node->next; + } +} + +void Lights_DrawGlow(GlobalContext* globalCtx) { + s32 pad; + LightNode* node; + + node = globalCtx->lightCtx.listHead; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_lights.c", 887); + + oGfxCtx->polyXlu.p = func_800947AC(oGfxCtx->polyXlu.p++); + gDPSetAlphaDither(oGfxCtx->polyXlu.p++, G_AD_NOISE); + gDPSetColorDither(oGfxCtx->polyXlu.p++, G_CD_MAGICSQ); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_04015720); + + while (node != NULL) { + LightInfo* info; + LightPoint* params; + f32 scale; + s32 pad[4]; + + info = node->info; + params = &info->params.point; + + if ((info->type == LIGHT_POINT_GLOW) && (params->drawGlow)) { + scale = SQ(params->radius) * 0.0000026f; + + gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, params->color[0], params->color[1], params->color[2], 50); + Matrix_Translate(params->x, params->y, params->z, MTXMODE_NEW); + Matrix_Scale(scale, scale, scale, MTXMODE_APPLY); + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_lights.c", 918), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_04015760); + } + + node = node->next; + } + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_lights.c", 927); +} diff --git a/src/code/z_play.c b/src/code/z_play.c index 1a1b8431a1..a3ab3930fa 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -1071,7 +1071,7 @@ void Gameplay_DrawOverlayElements(GlobalContext* globalCtx) { // regalloc, stack usage and minor ordering differences void Gameplay_Draw(GlobalContext* globalCtx) { GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - LightMapper* sp228; + Lights* sp228; Vec3f sp21C; OPEN_DISPS(gfxCtx, "../z_play.c", 3907); @@ -1208,9 +1208,9 @@ void Gameplay_Draw(GlobalContext* globalCtx) { } if ((HREG(80) != 10) || (HREG(90) & 8)) { - sp228 = Lights_CreateMapper(&globalCtx->lightCtx, gfxCtx); - func_8007A474(sp228, globalCtx->lightCtx.lightsHead, 0); - func_80079EFC(sp228, gfxCtx); + sp228 = LightContext_NewLights(&globalCtx->lightCtx, gfxCtx); + Lights_BindAll(sp228, globalCtx->lightCtx.listHead, NULL); + Lights_Draw(sp228, gfxCtx); } if ((HREG(80) != 10) || (HREG(84) != 0)) { @@ -1467,7 +1467,7 @@ void Gameplay_InitScene(GlobalContext* globalCtx, s32 spawn) { globalCtx->setupPathList = NULL; globalCtx->nbSetupActors = 0; Object_InitBank(globalCtx, &globalCtx->objectCtx); - func_8007A614(globalCtx, &globalCtx->lightCtx); + LightContext_Init(globalCtx, &globalCtx->lightCtx); func_80098CBC(globalCtx, &globalCtx->nbTransitionActors); func_80096FD4(globalCtx, &globalCtx->roomCtx.curRoom); YREG(15) = 0; diff --git a/src/code/z_scene.c b/src/code/z_scene.c index 436fc72c60..733d08fa44 100644 --- a/src/code/z_scene.c +++ b/src/code/z_scene.c @@ -336,7 +336,7 @@ void func_80098B74(GlobalContext* globalCtx, SceneCmd* cmd) { lightInfo = SEGMENTED_TO_VIRTUAL(cmd->lightList.segment); for (i = 0; i < cmd->lightList.num; i++) { - Lights_Insert(globalCtx, &globalCtx->lightCtx, lightInfo); + LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, lightInfo); lightInfo++; } } diff --git a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c index ca087cd740..d08a64b1d4 100644 --- a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c +++ b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c @@ -142,9 +142,9 @@ void EnFhgFire_Init(Actor* thisx, GlobalContext* globalCtx) { this->collider.dim.radius = 40; this->collider.dim.height = 50; this->collider.dim.yShift = -25; - this->light = Lights_Insert(globalCtx, &globalCtx->lightCtx, (void*)(&this->unk_1A0)); - Lights_InitType0PositionalLight(&this->unk_1A0, thisx->posRot.pos.x, thisx->posRot.pos.y, thisx->posRot.pos.z, - 0xFF, 0xFF, 0xFF, 0xFF); + this->lightNode = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, &this->lightInfo); + Lights_PointNoGlowSetInfo(&this->lightInfo, thisx->posRot.pos.x, thisx->posRot.pos.y, thisx->posRot.pos.z, 0xFF, + 0xFF, 0xFF, 0xFF); } } @@ -156,7 +156,7 @@ void EnFhgFire_Destroy(Actor* thisx, GlobalContext* globalCtx) { } if (thisx->params == 0x32) { - Lights_Remove(globalCtx, &globalCtx->lightCtx, this->light); + LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode); } } diff --git a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h index df4568bbb6..4b6e56c5d0 100644 --- a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h +++ b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h @@ -29,9 +29,9 @@ typedef struct EnFhgFire { /* 0x0188 */ f32 unk_188; /* 0x018C */ f32 unk_18C; /* 0x0190 */ char unk_190[0x0C]; - /* 0x019C */ z_Light* light; - /* 0x01A0 */ LightInfoPositional unk_1A0; - /* 0x01AE */ char padding_1AE[2]; + /* 0x019C */ LightNode* lightNode; + /* 0x01A0 */ LightInfo lightInfo; + /* 0x01AE */ char unk_1AE[2]; /* 0x01B0 */ ColliderCylinder collider; /* 0x01FC */ u8 unk_1FC; /* 0x01FD */ char unk_1FD; diff --git a/src/overlays/actors/ovl_En_Light/z_en_light.c b/src/overlays/actors/ovl_En_Light/z_en_light.c index 0de705e354..c46c1054d2 100644 --- a/src/overlays/actors/ovl_En_Light/z_en_light.c +++ b/src/overlays/actors/ovl_En_Light/z_en_light.c @@ -55,17 +55,15 @@ void EnLight_Init(Actor* thisx, GlobalContext* globalCtx) { if (gSaveContext.gameMode == 3) { // special case for the credits yOffset = (this->actor.params < 0) ? 1 : 40; - Lights_InitType0PositionalLight(&this->posLightInfo, this->actor.posRot.pos.x, - yOffset + (s16)this->actor.posRot.pos.y, this->actor.posRot.pos.z, 255, 255, - 180, -1); + Lights_PointNoGlowSetInfo(&this->lightInfo, this->actor.posRot.pos.x, yOffset + (s16)this->actor.posRot.pos.y, + this->actor.posRot.pos.z, 255, 255, 180, -1); } else { yOffset = (this->actor.params < 0) ? 1 : 40; - Lights_InitType2PositionalLight(&this->posLightInfo, this->actor.posRot.pos.x, - yOffset + (s16)this->actor.posRot.pos.y, this->actor.posRot.pos.z, 255, 255, - 180, -1); + Lights_PointGlowSetInfo(&this->lightInfo, this->actor.posRot.pos.x, yOffset + (s16)this->actor.posRot.pos.y, + this->actor.posRot.pos.z, 255, 255, 180, -1); } - this->lightNode = Lights_Insert(globalCtx, &globalCtx->lightCtx, &this->posLightInfo); + this->lightNode = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, &this->lightInfo); Actor_SetScale(&this->actor, D_80A9E840[this->actor.params & 0xF].scale * 0.0001f); this->timer = (s32)(Math_Rand_ZeroOne() * 255.0f); @@ -77,7 +75,7 @@ void EnLight_Init(Actor* thisx, GlobalContext* globalCtx) { void EnLight_Destroy(Actor* thisx, GlobalContext* globalCtx) { EnLight* this = THIS; - Lights_Remove(globalCtx, &globalCtx->lightCtx, this->lightNode); + LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode); } void EnLight_UpdatePosRot(EnLight* this, GlobalContext* globalCtx) { @@ -101,9 +99,9 @@ void EnLight_Update(Actor* thisx, GlobalContext* globalCtx) { flameParams = &D_80A9E840[this->actor.params & 0xF]; intensity = (Math_Rand_ZeroOne() * 0.5f) + 0.5f; radius = (this->actor.params < 0) ? 100 : 300; - Lights_SetPositionalLightColorAndRadius(&this->posLightInfo, (flameParams->primColor.r * intensity), - (flameParams->primColor.g * intensity), - (flameParams->primColor.b * intensity), radius); + Lights_PointSetColorAndRadius(&this->lightInfo, (flameParams->primColor.r * intensity), + (flameParams->primColor.g * intensity), (flameParams->primColor.b * intensity), + radius); EnLight_UpdatePosRot(this, globalCtx); if (this->actor.params >= 0) { @@ -144,9 +142,9 @@ void EnLight_UpdateSwitch(Actor* thisx, GlobalContext* globalCtx) { Actor_SetScale(&this->actor, ((f32)flameParams->scale * 0.0001) * scale); intensity = (Math_Rand_ZeroOne() * 0.5f) + 0.5f; - Lights_SetPositionalLightColorAndRadius(&this->posLightInfo, (flameParams->primColor.r * intensity), - (flameParams->primColor.g * intensity), - (flameParams->primColor.b * intensity), 300.0f * scale); + Lights_PointSetColorAndRadius(&this->lightInfo, (flameParams->primColor.r * intensity), + (flameParams->primColor.g * intensity), (flameParams->primColor.b * intensity), + 300.0f * scale); EnLight_UpdatePosRot(this, globalCtx); if (this->actor.params >= 0) { diff --git a/src/overlays/actors/ovl_En_Light/z_en_light.h b/src/overlays/actors/ovl_En_Light/z_en_light.h index bb1d190ad4..c780538f08 100644 --- a/src/overlays/actors/ovl_En_Light/z_en_light.h +++ b/src/overlays/actors/ovl_En_Light/z_en_light.h @@ -9,8 +9,8 @@ struct EnLight; typedef struct EnLight { /* 0x0000 */ Actor actor; /* 0x014C */ u8 timer; - /* 0x0150 */ z_Light* lightNode; - /* 0x0154 */ LightInfoPositional posLightInfo; + /* 0x0150 */ LightNode* lightNode; + /* 0x0154 */ LightInfo lightInfo; } EnLight; // size = 0x0164 extern const ActorInit En_Light_InitVars; diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c index d3f1ccce29..0cc44be673 100644 --- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c +++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c @@ -48,13 +48,13 @@ void OceffSpot_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->actor, sInitChain); OceffSpot_SetupAction(this, OceffSpot_GrowCylinder); - Lights_InitType0PositionalLight(&this->lightInfo1, this->actor.posRot.pos.x, this->actor.posRot.pos.y, - this->actor.posRot.pos.z, 0x00, 0x00, 0x00, 0); - this->light1 = Lights_Insert(globalCtx, &globalCtx->lightCtx, &this->lightInfo1); + Lights_PointNoGlowSetInfo(&this->lightInfo1, this->actor.posRot.pos.x, this->actor.posRot.pos.y, + this->actor.posRot.pos.z, 0, 0, 0, 0); + this->lightNode1 = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, &this->lightInfo1); - Lights_InitType0PositionalLight(&this->lightInfo2, this->actor.posRot.pos.x, this->actor.posRot.pos.y, - this->actor.posRot.pos.z, 0x00, 0x00, 0x00, 0); - this->light2 = Lights_Insert(globalCtx, &globalCtx->lightCtx, &this->lightInfo2); + Lights_PointNoGlowSetInfo(&this->lightInfo2, this->actor.posRot.pos.x, this->actor.posRot.pos.y, + this->actor.posRot.pos.z, 0, 0, 0, 0); + this->lightNode2 = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, &this->lightInfo2); if (YREG(15)) { this->actor.scale.y = 2.4f; } else { @@ -69,8 +69,8 @@ void OceffSpot_Destroy(Actor* thisx, GlobalContext* globalCtx) { OceffSpot* this = THIS; Player* player = PLAYER; - Lights_Remove(globalCtx, &globalCtx->lightCtx, this->light1); - Lights_Remove(globalCtx, &globalCtx->lightCtx, this->light2); + LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode1); + LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode2); func_800876C8(globalCtx); if (gSaveContext.nayrusLoveTimer && globalCtx->actorCtx.actorList[ACTORTYPE_PLAYER].length) { player->unk_692 |= 0x40; @@ -135,16 +135,15 @@ void OceffSpot_Update(Actor* thisx, GlobalContext* globalCtx) { temp = (2.0f - this->unk_174) * this->unk_174; func_800773A8(globalCtx, temp * 0.5F, 880.0f, 0.2f, 0.9f); - Lights_InitType0PositionalLight(&this->lightInfo1, (s16)this->actor.posRot.pos.x, - (s16)this->actor.posRot.pos.y + 55.0f, (s16)this->actor.posRot.pos.z, - (s32)(255.0f * temp), (s32)(255.0f * temp), (s32)(200.0f * temp), - (s16)(100.0f * temp)); + Lights_PointNoGlowSetInfo(&this->lightInfo1, (s16)this->actor.posRot.pos.x, (s16)this->actor.posRot.pos.y + 55.0f, + (s16)this->actor.posRot.pos.z, (s32)(255.0f * temp), (s32)(255.0f * temp), + (s32)(200.0f * temp), (s16)(100.0f * temp)); - Lights_InitType0PositionalLight( - &this->lightInfo2, (s16)this->actor.posRot.pos.x + Math_Sins(player->actor.shape.rot.y) * 20.0f, - (s16)this->actor.posRot.pos.y + 20.0f, - (s16)this->actor.posRot.pos.z + Math_Coss(player->actor.shape.rot.y) * 20.0f, (s32)(255.0f * temp), - (s32)(255.0f * temp), (s32)(200.0f * temp), (s16)(100.0f * temp)); + Lights_PointNoGlowSetInfo(&this->lightInfo2, + (s16)this->actor.posRot.pos.x + Math_Sins(player->actor.shape.rot.y) * 20.0f, + (s16)this->actor.posRot.pos.y + 20.0f, + (s16)this->actor.posRot.pos.z + Math_Coss(player->actor.shape.rot.y) * 20.0f, + (s32)(255.0f * temp), (s32)(255.0f * temp), (s32)(200.0f * temp), (s16)(100.0f * temp)); } void OceffSpot_Draw(Actor* thisx, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.h b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.h index 68d60b0855..ab366c3478 100644 --- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.h +++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.h @@ -10,10 +10,10 @@ typedef void (*OceffSpotActionFunc)(struct OceffSpot*, GlobalContext*); typedef struct OceffSpot { /* 0x0000 */ Actor actor; - /* 0x014C */ z_Light* light1; - /* 0x0150 */ LightInfoPositional lightInfo1; - /* 0x0160 */ z_Light* light2; - /* 0x0164 */ LightInfoPositional lightInfo2; + /* 0x014C */ LightNode* lightNode1; + /* 0x0150 */ LightInfo lightInfo1; + /* 0x0160 */ LightNode* lightNode2; + /* 0x0164 */ LightInfo lightInfo2; /* 0x0174 */ f32 unk_174; /* 0x0178 */ u16 timer; /* 0x017C */ OceffSpotActionFunc actionFunc; From eef2a005b568ed1523f0c7c5d43374d848b07261 Mon Sep 17 00:00:00 2001 From: louist103 <35883445+louist103@users.noreply.github.com> Date: Sat, 5 Sep 2020 10:18:02 -0400 Subject: [PATCH 4/4] Decomp Heishi4 All OK (#364) * Fixed upstream * Migrate data, fix header, and begin Init function * Lots of progress * Almost done * One non matching left * Decomp EnHeishi4 All OK * PR fixes * PR fixes --- .../actors/ovl_En_Heishi4/EnHeishi4_Destroy.s | 12 - .../actors/ovl_En_Heishi4/EnHeishi4_Draw.s | 24 - .../actors/ovl_En_Heishi4/EnHeishi4_Init.s | 182 ------- .../actors/ovl_En_Heishi4/EnHeishi4_Update.s | 95 ---- .../actors/ovl_En_Heishi4/func_80A56328.s | 40 -- .../actors/ovl_En_Heishi4/func_80A563BC.s | 110 ---- .../actors/ovl_En_Heishi4/func_80A56544.s | 66 --- .../actors/ovl_En_Heishi4/func_80A56614.s | 84 --- .../actors/ovl_En_Heishi4/func_80A5673C.s | 106 ---- .../actors/ovl_En_Heishi4/func_80A56874.s | 41 -- .../actors/ovl_En_Heishi4/func_80A56900.s | 40 -- .../actors/ovl_En_Heishi4/func_80A56994.s | 50 -- .../actors/ovl_En_Heishi4/func_80A56A50.s | 34 -- .../actors/ovl_En_Heishi4/func_80A56ACC.s | 32 -- .../actors/ovl_En_Heishi4/func_80A56B40.s | 108 ---- .../actors/ovl_En_Heishi4/func_80A56E14.s | 28 - data/overlays/actors/z_en_heishi4.data.s | 22 - data/overlays/actors/z_en_heishi4.reloc.s | 13 - diff.py | 506 ++++++------------ spec | 3 +- .../actors/ovl_En_Heishi4/z_en_heishi4.c | 360 ++++++++++++- .../actors/ovl_En_Heishi4/z_en_heishi4.h | 28 +- undefined_syms.txt | 7 + 23 files changed, 546 insertions(+), 1445 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Destroy.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Draw.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Init.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Update.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56328.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A563BC.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56544.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56614.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A5673C.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56874.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56900.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56994.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56A50.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56ACC.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56B40.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56E14.s delete mode 100644 data/overlays/actors/z_en_heishi4.data.s delete mode 100644 data/overlays/actors/z_en_heishi4.reloc.s diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Destroy.s deleted file mode 100644 index 111a581089..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Destroy.s +++ /dev/null @@ -1,12 +0,0 @@ -glabel EnHeishi4_Destroy -/* 00230 80A56300 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00234 80A56304 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 00238 80A56308 AFBF0014 */ sw $ra, 0x0014($sp) -/* 0023C 80A5630C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00240 80A56310 0C0170EB */ jal Collider_DestroyCylinder - -/* 00244 80A56314 24C502BC */ addiu $a1, $a2, 0x02BC ## $a1 = 000002BC -/* 00248 80A56318 8FBF0014 */ lw $ra, 0x0014($sp) -/* 0024C 80A5631C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00250 80A56320 03E00008 */ jr $ra -/* 00254 80A56324 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Draw.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Draw.s deleted file mode 100644 index 54cc969121..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Draw.s +++ /dev/null @@ -1,24 +0,0 @@ -glabel EnHeishi4_Draw -/* 00DA8 80A56E78 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00DAC 80A56E7C AFBF001C */ sw $ra, 0x001C($sp) -/* 00DB0 80A56E80 AFA40020 */ sw $a0, 0x0020($sp) -/* 00DB4 80A56E84 AFA50024 */ sw $a1, 0x0024($sp) -/* 00DB8 80A56E88 0C024F46 */ jal func_80093D18 -/* 00DBC 80A56E8C 8CA40000 */ lw $a0, 0x0000($a1) ## 00000000 -/* 00DC0 80A56E90 8FA20020 */ lw $v0, 0x0020($sp) -/* 00DC4 80A56E94 3C0780A5 */ lui $a3, %hi(func_80A56E14) ## $a3 = 80A50000 -/* 00DC8 80A56E98 24E76E14 */ addiu $a3, $a3, %lo(func_80A56E14) ## $a3 = 80A56E14 -/* 00DCC 80A56E9C 8C450150 */ lw $a1, 0x0150($v0) ## 00000150 -/* 00DD0 80A56EA0 8C46016C */ lw $a2, 0x016C($v0) ## 0000016C -/* 00DD4 80A56EA4 AFA00010 */ sw $zero, 0x0010($sp) -/* 00DD8 80A56EA8 8FA40024 */ lw $a0, 0x0024($sp) -/* 00DDC 80A56EAC 0C028572 */ jal SkelAnime_Draw - -/* 00DE0 80A56EB0 AFA20014 */ sw $v0, 0x0014($sp) -/* 00DE4 80A56EB4 8FBF001C */ lw $ra, 0x001C($sp) -/* 00DE8 80A56EB8 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00DEC 80A56EBC 03E00008 */ jr $ra -/* 00DF0 80A56EC0 00000000 */ nop -/* 00DF4 80A56EC4 00000000 */ nop -/* 00DF8 80A56EC8 00000000 */ nop -/* 00DFC 80A56ECC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Init.s deleted file mode 100644 index 51e425c94a..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Init.s +++ /dev/null @@ -1,182 +0,0 @@ -.rdata -glabel D_80A56F30 - .asciz "\n\n" - .balign 4 - -glabel D_80A56F34 - .asciz "\x1b[32m ☆☆☆☆☆ 兵士2セット完了! ☆☆☆☆☆ %d\n\x1b[m" - .balign 4 - -glabel D_80A56F6C - .asciz "\x1b[33m ☆☆☆☆☆ 識別完了! ☆☆☆☆☆ %d\n\x1b[m" - .balign 4 - -glabel D_80A56FA0 - .asciz "\x1b[35m ☆☆☆☆☆ メッセージ完了! ☆☆☆☆☆ %x\n\n\x1b[m" - .balign 4 - -glabel D_80A56FD8 - .asciz "\n\n" - .balign 4 - -.text -glabel EnHeishi4_Init -/* 00000 80A560D0 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0 -/* 00004 80A560D4 AFA50044 */ sw $a1, 0x0044($sp) -/* 00008 80A560D8 AFBF002C */ sw $ra, 0x002C($sp) -/* 0000C 80A560DC AFB00028 */ sw $s0, 0x0028($sp) -/* 00010 80A560E0 3C053C23 */ lui $a1, 0x3C23 ## $a1 = 3C230000 -/* 00014 80A560E4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00018 80A560E8 0C00B58B */ jal Actor_SetScale - -/* 0001C 80A560EC 34A5D70A */ ori $a1, $a1, 0xD70A ## $a1 = 3C23D70A -/* 00020 80A560F0 860E001C */ lh $t6, 0x001C($s0) ## 0000001C -/* 00024 80A560F4 8E080024 */ lw $t0, 0x0024($s0) ## 00000024 -/* 00028 80A560F8 8E190028 */ lw $t9, 0x0028($s0) ## 00000028 -/* 0002C 80A560FC 31CF00FF */ andi $t7, $t6, 0x00FF ## $t7 = 00000000 -/* 00030 80A56100 A60F0280 */ sh $t7, 0x0280($s0) ## 00000280 -/* 00034 80A56104 860A0280 */ lh $t2, 0x0280($s0) ## 00000280 -/* 00038 80A56108 AE08026C */ sw $t0, 0x026C($s0) ## 0000026C -/* 0003C 80A5610C 8E08002C */ lw $t0, 0x002C($s0) ## 0000002C -/* 00040 80A56110 241800FF */ addiu $t8, $zero, 0x00FF ## $t8 = 000000FF -/* 00044 80A56114 24090006 */ addiu $t1, $zero, 0x0006 ## $t1 = 00000006 -/* 00048 80A56118 24010007 */ addiu $at, $zero, 0x0007 ## $at = 00000007 -/* 0004C 80A5611C A21800AE */ sb $t8, 0x00AE($s0) ## 000000AE -/* 00050 80A56120 A209001F */ sb $t1, 0x001F($s0) ## 0000001F -/* 00054 80A56124 AE190270 */ sw $t9, 0x0270($s0) ## 00000270 -/* 00058 80A56128 15410018 */ bne $t2, $at, .L80A5618C -/* 0005C 80A5612C AE080274 */ sw $t0, 0x0274($s0) ## 00000274 -/* 00060 80A56130 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000 -/* 00064 80A56134 44810000 */ mtc1 $at, $f0 ## $f0 = 30.00 -/* 00068 80A56138 260400B4 */ addiu $a0, $s0, 0x00B4 ## $a0 = 000000B4 -/* 0006C 80A5613C 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000 -/* 00070 80A56140 44070000 */ mfc1 $a3, $f0 -/* 00074 80A56144 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000 -/* 00078 80A56148 0C00AC78 */ jal ActorShape_Init - -/* 0007C 80A5614C E6000278 */ swc1 $f0, 0x0278($s0) ## 00000278 -/* 00080 80A56150 3C060601 */ lui $a2, 0x0601 ## $a2 = 06010000 -/* 00084 80A56154 3C070601 */ lui $a3, 0x0601 ## $a3 = 06010000 -/* 00088 80A56158 260B0190 */ addiu $t3, $s0, 0x0190 ## $t3 = 00000190 -/* 0008C 80A5615C 260C01F6 */ addiu $t4, $s0, 0x01F6 ## $t4 = 000001F6 -/* 00090 80A56160 240D0011 */ addiu $t5, $zero, 0x0011 ## $t5 = 00000011 -/* 00094 80A56164 AFAD0018 */ sw $t5, 0x0018($sp) -/* 00098 80A56168 AFAC0014 */ sw $t4, 0x0014($sp) -/* 0009C 80A5616C AFAB0010 */ sw $t3, 0x0010($sp) -/* 000A0 80A56170 24E7C444 */ addiu $a3, $a3, 0xC444 ## $a3 = 0600C444 -/* 000A4 80A56174 24C6BAC8 */ addiu $a2, $a2, 0xBAC8 ## $a2 = 0600BAC8 -/* 000A8 80A56178 8FA40044 */ lw $a0, 0x0044($sp) -/* 000AC 80A5617C 0C02915F */ jal SkelAnime_Init - -/* 000B0 80A56180 2605014C */ addiu $a1, $s0, 0x014C ## $a1 = 0000014C -/* 000B4 80A56184 1000001A */ beq $zero, $zero, .L80A561F0 -/* 000B8 80A56188 260502BC */ addiu $a1, $s0, 0x02BC ## $a1 = 000002BC -.L80A5618C: -/* 000BC 80A5618C 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000 -/* 000C0 80A56190 44810000 */ mtc1 $at, $f0 ## $f0 = 30.00 -/* 000C4 80A56194 3C014270 */ lui $at, 0x4270 ## $at = 42700000 -/* 000C8 80A56198 44812000 */ mtc1 $at, $f4 ## $f4 = 60.00 -/* 000CC 80A5619C 3C068003 */ lui $a2, %hi(ActorShadow_DrawFunc_Circle) -/* 000D0 80A561A0 44070000 */ mfc1 $a3, $f0 -/* 000D4 80A561A4 24C6B5EC */ addiu $a2, %lo(ActorShadow_DrawFunc_Circle) -/* 000D8 80A561A8 260400B4 */ addiu $a0, $s0, 0x00B4 ## $a0 = 000000B4 -/* 000DC 80A561AC 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000 -/* 000E0 80A561B0 0C00AC78 */ jal ActorShape_Init - -/* 000E4 80A561B4 E6040278 */ swc1 $f4, 0x0278($s0) ## 00000278 -/* 000E8 80A561B8 3C060601 */ lui $a2, 0x0601 ## $a2 = 06010000 -/* 000EC 80A561BC 3C070600 */ lui $a3, 0x0600 ## $a3 = 06000000 -/* 000F0 80A561C0 260E0190 */ addiu $t6, $s0, 0x0190 ## $t6 = 00000190 -/* 000F4 80A561C4 260F01F6 */ addiu $t7, $s0, 0x01F6 ## $t7 = 000001F6 -/* 000F8 80A561C8 24180011 */ addiu $t8, $zero, 0x0011 ## $t8 = 00000011 -/* 000FC 80A561CC AFB80018 */ sw $t8, 0x0018($sp) -/* 00100 80A561D0 AFAF0014 */ sw $t7, 0x0014($sp) -/* 00104 80A561D4 AFAE0010 */ sw $t6, 0x0010($sp) -/* 00108 80A561D8 24E75C30 */ addiu $a3, $a3, 0x5C30 ## $a3 = 06005C30 -/* 0010C 80A561DC 24C6BAC8 */ addiu $a2, $a2, 0xBAC8 ## $a2 = 0600BAC8 -/* 00110 80A561E0 8FA40044 */ lw $a0, 0x0044($sp) -/* 00114 80A561E4 0C02915F */ jal SkelAnime_Init - -/* 00118 80A561E8 2605014C */ addiu $a1, $s0, 0x014C ## $a1 = 0000014C -/* 0011C 80A561EC 260502BC */ addiu $a1, $s0, 0x02BC ## $a1 = 000002BC -.L80A561F0: -/* 00120 80A561F0 AFA50034 */ sw $a1, 0x0034($sp) -/* 00124 80A561F4 0C0170D9 */ jal Collider_InitCylinder - -/* 00128 80A561F8 8FA40044 */ lw $a0, 0x0044($sp) -/* 0012C 80A561FC 3C0780A5 */ lui $a3, %hi(D_80A56EF8) ## $a3 = 80A50000 -/* 00130 80A56200 8FA50034 */ lw $a1, 0x0034($sp) -/* 00134 80A56204 24E76EF8 */ addiu $a3, $a3, %lo(D_80A56EF8) ## $a3 = 80A56EF8 -/* 00138 80A56208 8FA40044 */ lw $a0, 0x0044($sp) -/* 0013C 80A5620C 0C01712B */ jal Collider_SetCylinder - -/* 00140 80A56210 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 00144 80A56214 86020280 */ lh $v0, 0x0280($s0) ## 00000280 -/* 00148 80A56218 2419000F */ addiu $t9, $zero, 0x000F ## $t9 = 0000000F -/* 0014C 80A5621C 24080046 */ addiu $t0, $zero, 0x0046 ## $t0 = 00000046 -/* 00150 80A56220 A6000300 */ sh $zero, 0x0300($s0) ## 00000300 -/* 00154 80A56224 A61902FC */ sh $t9, 0x02FC($s0) ## 000002FC -/* 00158 80A56228 1040000B */ beq $v0, $zero, .L80A56258 -/* 0015C 80A5622C A60802FE */ sh $t0, 0x02FE($s0) ## 000002FE -/* 00160 80A56230 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004 -/* 00164 80A56234 10410008 */ beq $v0, $at, .L80A56258 -/* 00168 80A56238 24010007 */ addiu $at, $zero, 0x0007 ## $at = 00000007 -/* 0016C 80A5623C 1041000A */ beq $v0, $at, .L80A56268 -/* 00170 80A56240 240A001C */ addiu $t2, $zero, 0x001C ## $t2 = 0000001C -/* 00174 80A56244 24010008 */ addiu $at, $zero, 0x0008 ## $at = 00000008 -/* 00178 80A56248 1041000E */ beq $v0, $at, .L80A56284 -/* 0017C 80A5624C 3C0D80A5 */ lui $t5, %hi(func_80A56544) ## $t5 = 80A50000 -/* 00180 80A56250 1000000F */ beq $zero, $zero, .L80A56290 -/* 00184 80A56254 860E001C */ lh $t6, 0x001C($s0) ## 0000001C -.L80A56258: -/* 00188 80A56258 3C0980A5 */ lui $t1, %hi(func_80A56328) ## $t1 = 80A50000 -/* 0018C 80A5625C 25296328 */ addiu $t1, $t1, %lo(func_80A56328) ## $t1 = 80A56328 -/* 00190 80A56260 1000000A */ beq $zero, $zero, .L80A5628C -/* 00194 80A56264 AE09025C */ sw $t1, 0x025C($s0) ## 0000025C -.L80A56268: -/* 00198 80A56268 3C0C80A5 */ lui $t4, %hi(func_80A5673C) ## $t4 = 80A50000 -/* 0019C 80A5626C 240B0005 */ addiu $t3, $zero, 0x0005 ## $t3 = 00000005 -/* 001A0 80A56270 258C673C */ addiu $t4, $t4, %lo(func_80A5673C) ## $t4 = 80A5673C -/* 001A4 80A56274 A60A02FC */ sh $t2, 0x02FC($s0) ## 000002FC -/* 001A8 80A56278 A60B02FE */ sh $t3, 0x02FE($s0) ## 000002FE -/* 001AC 80A5627C 10000003 */ beq $zero, $zero, .L80A5628C -/* 001B0 80A56280 AE0C025C */ sw $t4, 0x025C($s0) ## 0000025C -.L80A56284: -/* 001B4 80A56284 25AD6544 */ addiu $t5, $t5, %lo(func_80A56544) ## $t5 = 80A56544 -/* 001B8 80A56288 AE0D025C */ sw $t5, 0x025C($s0) ## 0000025C -.L80A5628C: -/* 001BC 80A5628C 860E001C */ lh $t6, 0x001C($s0) ## 0000001C -.L80A56290: -/* 001C0 80A56290 3C0480A5 */ lui $a0, %hi(D_80A56F30) ## $a0 = 80A50000 -/* 001C4 80A56294 24846F30 */ addiu $a0, $a0, %lo(D_80A56F30) ## $a0 = 80A56F30 -/* 001C8 80A56298 000E7A03 */ sra $t7, $t6, 8 -/* 001CC 80A5629C 31F800FF */ andi $t8, $t7, 0x00FF ## $t8 = 00000000 -/* 001D0 80A562A0 0C00084C */ jal osSyncPrintf - -/* 001D4 80A562A4 A618027C */ sh $t8, 0x027C($s0) ## 0000027C -/* 001D8 80A562A8 3C0480A5 */ lui $a0, %hi(D_80A56F34) ## $a0 = 80A50000 -/* 001DC 80A562AC 24846F34 */ addiu $a0, $a0, %lo(D_80A56F34) ## $a0 = 80A56F34 -/* 001E0 80A562B0 0C00084C */ jal osSyncPrintf - -/* 001E4 80A562B4 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 001E8 80A562B8 3C0480A5 */ lui $a0, %hi(D_80A56F6C) ## $a0 = 80A50000 -/* 001EC 80A562BC 24846F6C */ addiu $a0, $a0, %lo(D_80A56F6C) ## $a0 = 80A56F6C -/* 001F0 80A562C0 0C00084C */ jal osSyncPrintf - -/* 001F4 80A562C4 86050280 */ lh $a1, 0x0280($s0) ## 00000280 -/* 001F8 80A562C8 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 001FC 80A562CC 3C0480A5 */ lui $a0, %hi(D_80A56FA0) ## $a0 = 80A50000 -/* 00200 80A562D0 24846FA0 */ addiu $a0, $a0, %lo(D_80A56FA0) ## $a0 = 80A56FA0 -/* 00204 80A562D4 00052A03 */ sra $a1, $a1, 8 -/* 00208 80A562D8 0C00084C */ jal osSyncPrintf - -/* 0020C 80A562DC 30A5000F */ andi $a1, $a1, 0x000F ## $a1 = 00000000 -/* 00210 80A562E0 3C0480A5 */ lui $a0, %hi(D_80A56FD8) ## $a0 = 80A50000 -/* 00214 80A562E4 0C00084C */ jal osSyncPrintf - -/* 00218 80A562E8 24846FD8 */ addiu $a0, $a0, %lo(D_80A56FD8) ## $a0 = 80A56FD8 -/* 0021C 80A562EC 8FBF002C */ lw $ra, 0x002C($sp) -/* 00220 80A562F0 8FB00028 */ lw $s0, 0x0028($sp) -/* 00224 80A562F4 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000 -/* 00228 80A562F8 03E00008 */ jr $ra -/* 0022C 80A562FC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Update.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Update.s deleted file mode 100644 index 0fd55e239b..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Update.s +++ /dev/null @@ -1,95 +0,0 @@ -glabel EnHeishi4_Update -/* 00BE4 80A56CB4 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8 -/* 00BE8 80A56CB8 AFB10020 */ sw $s1, 0x0020($sp) -/* 00BEC 80A56CBC AFB0001C */ sw $s0, 0x001C($sp) -/* 00BF0 80A56CC0 AFBF0024 */ sw $ra, 0x0024($sp) -/* 00BF4 80A56CC4 8CA21C44 */ lw $v0, 0x1C44($a1) ## 00001C44 -/* 00BF8 80A56CC8 C484026C */ lwc1 $f4, 0x026C($a0) ## 0000026C -/* 00BFC 80A56CCC C4860270 */ lwc1 $f6, 0x0270($a0) ## 00000270 -/* 00C00 80A56CD0 C4880274 */ lwc1 $f8, 0x0274($a0) ## 00000274 -/* 00C04 80A56CD4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00C08 80A56CD8 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 00C0C 80A56CDC E4840024 */ swc1 $f4, 0x0024($a0) ## 00000024 -/* 00C10 80A56CE0 E4860028 */ swc1 $f6, 0x0028($a0) ## 00000028 -/* 00C14 80A56CE4 E488002C */ swc1 $f8, 0x002C($a0) ## 0000002C -/* 00C18 80A56CE8 8E050278 */ lw $a1, 0x0278($s0) ## 00000278 -/* 00C1C 80A56CEC 0C00B56E */ jal Actor_SetHeight - -/* 00C20 80A56CF0 AFA2002C */ sw $v0, 0x002C($sp) -/* 00C24 80A56CF4 860E0280 */ lh $t6, 0x0280($s0) ## 00000280 -/* 00C28 80A56CF8 24010007 */ addiu $at, $zero, 0x0007 ## $at = 00000007 -/* 00C2C 80A56CFC 8FA2002C */ lw $v0, 0x002C($sp) -/* 00C30 80A56D00 11C10021 */ beq $t6, $at, .L80A56D88 -/* 00C34 80A56D04 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00C38 80A56D08 8C580024 */ lw $t8, 0x0024($v0) ## 00000024 -/* 00C3C 80A56D0C 3C198016 */ lui $t9, %hi(gSaveContext+4) -/* 00C40 80A56D10 3C014120 */ lui $at, 0x4120 ## $at = 41200000 -/* 00C44 80A56D14 AE1802A4 */ sw $t8, 0x02A4($s0) ## 000002A4 -/* 00C48 80A56D18 8C4F0028 */ lw $t7, 0x0028($v0) ## 00000028 -/* 00C4C 80A56D1C 2605028C */ addiu $a1, $s0, 0x028C ## $a1 = 0000028C -/* 00C50 80A56D20 24060002 */ addiu $a2, $zero, 0x0002 ## $a2 = 00000002 -/* 00C54 80A56D24 AE0F02A8 */ sw $t7, 0x02A8($s0) ## 000002A8 -/* 00C58 80A56D28 8C58002C */ lw $t8, 0x002C($v0) ## 0000002C -/* 00C5C 80A56D2C AE1802AC */ sw $t8, 0x02AC($s0) ## 000002AC -/* 00C60 80A56D30 8F39E664 */ lw $t9, %lo(gSaveContext+4)($t9) -/* 00C64 80A56D34 13200006 */ beq $t9, $zero, .L80A56D50 -/* 00C68 80A56D38 00000000 */ nop -/* 00C6C 80A56D3C C44A0028 */ lwc1 $f10, 0x0028($v0) ## 00000028 -/* 00C70 80A56D40 44818000 */ mtc1 $at, $f16 ## $f16 = 10.00 -/* 00C74 80A56D44 00000000 */ nop -/* 00C78 80A56D48 46105481 */ sub.s $f18, $f10, $f16 -/* 00C7C 80A56D4C E61202A8 */ swc1 $f18, 0x02A8($s0) ## 000002A8 -.L80A56D50: -/* 00C80 80A56D50 0C00D285 */ jal func_80034A14 -/* 00C84 80A56D54 24070004 */ addiu $a3, $zero, 0x0004 ## $a3 = 00000004 -/* 00C88 80A56D58 8A090294 */ lwl $t1, 0x0294($s0) ## 00000294 -/* 00C8C 80A56D5C 8A0B029A */ lwl $t3, 0x029A($s0) ## 0000029A -/* 00C90 80A56D60 9A090297 */ lwr $t1, 0x0297($s0) ## 00000297 -/* 00C94 80A56D64 9A0B029D */ lwr $t3, 0x029D($s0) ## 0000029D -/* 00C98 80A56D68 AA090260 */ swl $t1, 0x0260($s0) ## 00000260 -/* 00C9C 80A56D6C AA0B0266 */ swl $t3, 0x0266($s0) ## 00000266 -/* 00CA0 80A56D70 BA090263 */ swr $t1, 0x0263($s0) ## 00000263 -/* 00CA4 80A56D74 BA0B0269 */ swr $t3, 0x0269($s0) ## 00000269 -/* 00CA8 80A56D78 96090298 */ lhu $t1, 0x0298($s0) ## 00000298 -/* 00CAC 80A56D7C 960B029E */ lhu $t3, 0x029E($s0) ## 0000029E -/* 00CB0 80A56D80 A6090264 */ sh $t1, 0x0264($s0) ## 00000264 -/* 00CB4 80A56D84 A60B026A */ sh $t3, 0x026A($s0) ## 0000026A -.L80A56D88: -/* 00CB8 80A56D88 860C027E */ lh $t4, 0x027E($s0) ## 0000027E -/* 00CBC 80A56D8C 8E19025C */ lw $t9, 0x025C($s0) ## 0000025C -/* 00CC0 80A56D90 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00CC4 80A56D94 258D0001 */ addiu $t5, $t4, 0x0001 ## $t5 = 00000001 -/* 00CC8 80A56D98 A60D027E */ sh $t5, 0x027E($s0) ## 0000027E -/* 00CCC 80A56D9C 0320F809 */ jalr $ra, $t9 -/* 00CD0 80A56DA0 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 00CD4 80A56DA4 0C00B638 */ jal Actor_MoveForward - -/* 00CD8 80A56DA8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00CDC 80A56DAC 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000 -/* 00CE0 80A56DB0 44812000 */ mtc1 $at, $f4 ## $f4 = 30.00 -/* 00CE4 80A56DB4 240E001D */ addiu $t6, $zero, 0x001D ## $t6 = 0000001D -/* 00CE8 80A56DB8 AFAE0014 */ sw $t6, 0x0014($sp) -/* 00CEC 80A56DBC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00CF0 80A56DC0 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 00CF4 80A56DC4 3C064120 */ lui $a2, 0x4120 ## $a2 = 41200000 -/* 00CF8 80A56DC8 3C074120 */ lui $a3, 0x4120 ## $a3 = 41200000 -/* 00CFC 80A56DCC 0C00B92D */ jal func_8002E4B4 -/* 00D00 80A56DD0 E7A40010 */ swc1 $f4, 0x0010($sp) -/* 00D04 80A56DD4 260602BC */ addiu $a2, $s0, 0x02BC ## $a2 = 000002BC -/* 00D08 80A56DD8 00C02825 */ or $a1, $a2, $zero ## $a1 = 000002BC -/* 00D0C 80A56DDC AFA60028 */ sw $a2, 0x0028($sp) -/* 00D10 80A56DE0 0C0189B7 */ jal Collider_CylinderUpdate - -/* 00D14 80A56DE4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00D18 80A56DE8 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00D1C 80A56DEC 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60 -/* 00D20 80A56DF0 8FA60028 */ lw $a2, 0x0028($sp) -/* 00D24 80A56DF4 02212821 */ addu $a1, $s1, $at -/* 00D28 80A56DF8 0C017713 */ jal CollisionCheck_SetOC - ## CollisionCheck_setOT -/* 00D2C 80A56DFC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00D30 80A56E00 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00D34 80A56E04 8FB0001C */ lw $s0, 0x001C($sp) -/* 00D38 80A56E08 8FB10020 */ lw $s1, 0x0020($sp) -/* 00D3C 80A56E0C 03E00008 */ jr $ra -/* 00D40 80A56E10 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56328.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56328.s deleted file mode 100644 index 246f749a60..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56328.s +++ /dev/null @@ -1,40 +0,0 @@ -glabel func_80A56328 -/* 00258 80A56328 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 0025C 80A5632C AFA40028 */ sw $a0, 0x0028($sp) -/* 00260 80A56330 AFBF0024 */ sw $ra, 0x0024($sp) -/* 00264 80A56334 3C040600 */ lui $a0, 0x0600 ## $a0 = 06000000 -/* 00268 80A56338 AFA5002C */ sw $a1, 0x002C($sp) -/* 0026C 80A5633C 0C028800 */ jal SkelAnime_GetFrameCount - -/* 00270 80A56340 24845C30 */ addiu $a0, $a0, 0x5C30 ## $a0 = 06005C30 -/* 00274 80A56344 44822000 */ mtc1 $v0, $f4 ## $f4 = 0.00 -/* 00278 80A56348 3C01C120 */ lui $at, 0xC120 ## $at = C1200000 -/* 0027C 80A5634C 44819000 */ mtc1 $at, $f18 ## $f18 = -10.00 -/* 00280 80A56350 468021A0 */ cvt.s.w $f6, $f4 -/* 00284 80A56354 8FA40028 */ lw $a0, 0x0028($sp) -/* 00288 80A56358 3C050600 */ lui $a1, 0x0600 ## $a1 = 06000000 -/* 0028C 80A5635C 24A55C30 */ addiu $a1, $a1, 0x5C30 ## $a1 = 06005C30 -/* 00290 80A56360 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000 -/* 00294 80A56364 24070000 */ addiu $a3, $zero, 0x0000 ## $a3 = 00000000 -/* 00298 80A56368 4600320D */ trunc.w.s $f8, $f6 -/* 0029C 80A5636C AFA00014 */ sw $zero, 0x0014($sp) -/* 002A0 80A56370 E7B20018 */ swc1 $f18, 0x0018($sp) -/* 002A4 80A56374 2484014C */ addiu $a0, $a0, 0x014C ## $a0 = 0000014C -/* 002A8 80A56378 440F4000 */ mfc1 $t7, $f8 -/* 002AC 80A5637C 00000000 */ nop -/* 002B0 80A56380 000FC400 */ sll $t8, $t7, 16 -/* 002B4 80A56384 0018CC03 */ sra $t9, $t8, 16 -/* 002B8 80A56388 44995000 */ mtc1 $t9, $f10 ## $f10 = 0.00 -/* 002BC 80A5638C 00000000 */ nop -/* 002C0 80A56390 46805420 */ cvt.s.w $f16, $f10 -/* 002C4 80A56394 0C029468 */ jal SkelAnime_ChangeAnim - -/* 002C8 80A56398 E7B00010 */ swc1 $f16, 0x0010($sp) -/* 002CC 80A5639C 8FA90028 */ lw $t1, 0x0028($sp) -/* 002D0 80A563A0 3C0880A5 */ lui $t0, %hi(func_80A563BC) ## $t0 = 80A50000 -/* 002D4 80A563A4 250863BC */ addiu $t0, $t0, %lo(func_80A563BC) ## $t0 = 80A563BC -/* 002D8 80A563A8 AD28025C */ sw $t0, 0x025C($t1) ## 0000025C -/* 002DC 80A563AC 8FBF0024 */ lw $ra, 0x0024($sp) -/* 002E0 80A563B0 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 002E4 80A563B4 03E00008 */ jr $ra -/* 002E8 80A563B8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A563BC.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A563BC.s deleted file mode 100644 index 23a09eae13..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A563BC.s +++ /dev/null @@ -1,110 +0,0 @@ -glabel func_80A563BC -/* 002EC 80A563BC 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 002F0 80A563C0 AFBF0014 */ sw $ra, 0x0014($sp) -/* 002F4 80A563C4 AFA50024 */ sw $a1, 0x0024($sp) -/* 002F8 80A563C8 84820280 */ lh $v0, 0x0280($a0) ## 00000280 -/* 002FC 80A563CC 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 00300 80A563D0 A08002B4 */ sb $zero, 0x02B4($a0) ## 000002B4 -/* 00304 80A563D4 2442FFFC */ addiu $v0, $v0, 0xFFFC ## $v0 = FFFFFFFC -/* 00308 80A563D8 00021400 */ sll $v0, $v0, 16 -/* 0030C 80A563DC 00021403 */ sra $v0, $v0, 16 -/* 00310 80A563E0 04410002 */ bgez $v0, .L80A563EC -/* 00314 80A563E4 8FA40024 */ lw $a0, 0x0024($sp) -/* 00318 80A563E8 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -.L80A563EC: -/* 0031C 80A563EC 28410003 */ slti $at, $v0, 0x0003 -/* 00320 80A563F0 14200002 */ bne $at, $zero, .L80A563FC -/* 00324 80A563F4 3C0F80A5 */ lui $t7, %hi(D_80A56EF0) ## $t7 = 80A50000 -/* 00328 80A563F8 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -.L80A563FC: -/* 0032C 80A563FC 00027080 */ sll $t6, $v0, 2 -/* 00330 80A56400 25EF6EF0 */ addiu $t7, $t7, %lo(D_80A56EF0) ## $t7 = 80A56EF0 -/* 00334 80A56404 01CF1821 */ addu $v1, $t6, $t7 -/* 00338 80A56408 8C650000 */ lw $a1, 0x0000($v1) ## 00000000 -/* 0033C 80A5640C AFA30018 */ sw $v1, 0x0018($sp) -/* 00340 80A56410 0C01B0D8 */ jal Text_GetFaceReaction -/* 00344 80A56414 AFA60020 */ sw $a2, 0x0020($sp) -/* 00348 80A56418 8FA30018 */ lw $v1, 0x0018($sp) -/* 0034C 80A5641C 1040000D */ beq $v0, $zero, .L80A56454 -/* 00350 80A56420 8FA60020 */ lw $a2, 0x0020($sp) -/* 00354 80A56424 8FA40024 */ lw $a0, 0x0024($sp) -/* 00358 80A56428 8C650000 */ lw $a1, 0x0000($v1) ## 00000000 -/* 0035C 80A5642C 0C01B0D8 */ jal Text_GetFaceReaction -/* 00360 80A56430 AFA60020 */ sw $a2, 0x0020($sp) -/* 00364 80A56434 8FA60020 */ lw $a2, 0x0020($sp) -/* 00368 80A56438 3C1980A5 */ lui $t9, %hi(func_80A56B40) ## $t9 = 80A50000 -/* 0036C 80A5643C 24180001 */ addiu $t8, $zero, 0x0001 ## $t8 = 00000001 -/* 00370 80A56440 27396B40 */ addiu $t9, $t9, %lo(func_80A56B40) ## $t9 = 80A56B40 -/* 00374 80A56444 A4C2010E */ sh $v0, 0x010E($a2) ## 0000010E -/* 00378 80A56448 A0D802B4 */ sb $t8, 0x02B4($a2) ## 000002B4 -/* 0037C 80A5644C 10000039 */ beq $zero, $zero, .L80A56534 -/* 00380 80A56450 ACD9025C */ sw $t9, 0x025C($a2) ## 0000025C -.L80A56454: -/* 00384 80A56454 3C028016 */ lui $v0, %hi(gSaveContext) -/* 00388 80A56458 2442E660 */ addiu $v0, %lo(gSaveContext) -/* 0038C 80A5645C 94480EE4 */ lhu $t0, 0x0EE4($v0) ## 8015F544 -/* 00390 80A56460 3C0B80A5 */ lui $t3, %hi(func_80A56B40) ## $t3 = 80A50000 -/* 00394 80A56464 240A5065 */ addiu $t2, $zero, 0x5065 ## $t2 = 00005065 -/* 00398 80A56468 31090001 */ andi $t1, $t0, 0x0001 ## $t1 = 00000000 -/* 0039C 80A5646C 11200004 */ beq $t1, $zero, .L80A56480 -/* 003A0 80A56470 256B6B40 */ addiu $t3, $t3, %lo(func_80A56B40) ## $t3 = 80A56B40 -/* 003A4 80A56474 A4CA010E */ sh $t2, 0x010E($a2) ## 0000010E -/* 003A8 80A56478 1000002E */ beq $zero, $zero, .L80A56534 -/* 003AC 80A5647C ACCB025C */ sw $t3, 0x025C($a2) ## 0000025C -.L80A56480: -/* 003B0 80A56480 944C0EDC */ lhu $t4, 0x0EDC($v0) ## 8015F53C -/* 003B4 80A56484 3C0F80A5 */ lui $t7, %hi(func_80A56B40) ## $t7 = 80A50000 -/* 003B8 80A56488 240E5068 */ addiu $t6, $zero, 0x5068 ## $t6 = 00005068 -/* 003BC 80A5648C 318D0020 */ andi $t5, $t4, 0x0020 ## $t5 = 00000000 -/* 003C0 80A56490 11A00004 */ beq $t5, $zero, .L80A564A4 -/* 003C4 80A56494 25EF6B40 */ addiu $t7, $t7, %lo(func_80A56B40) ## $t7 = 80A56B40 -/* 003C8 80A56498 A4CE010E */ sh $t6, 0x010E($a2) ## 0000010E -/* 003CC 80A5649C 10000025 */ beq $zero, $zero, .L80A56534 -/* 003D0 80A564A0 ACCF025C */ sw $t7, 0x025C($a2) ## 0000025C -.L80A564A4: -/* 003D4 80A564A4 84D80280 */ lh $t8, 0x0280($a2) ## 00000280 -/* 003D8 80A564A8 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004 -/* 003DC 80A564AC 5701000B */ bnel $t8, $at, .L80A564DC -/* 003E0 80A564B0 8C4A0010 */ lw $t2, 0x0010($v0) ## 8015E670 -/* 003E4 80A564B4 84D90284 */ lh $t9, 0x0284($a2) ## 00000284 -/* 003E8 80A564B8 24085079 */ addiu $t0, $zero, 0x5079 ## $t0 = 00005079 -/* 003EC 80A564BC 2409507A */ addiu $t1, $zero, 0x507A ## $t1 = 0000507A -/* 003F0 80A564C0 17200003 */ bne $t9, $zero, .L80A564D0 -/* 003F4 80A564C4 00000000 */ nop -/* 003F8 80A564C8 10000017 */ beq $zero, $zero, .L80A56528 -/* 003FC 80A564CC A4C8010E */ sh $t0, 0x010E($a2) ## 0000010E -.L80A564D0: -/* 00400 80A564D0 10000015 */ beq $zero, $zero, .L80A56528 -/* 00404 80A564D4 A4C9010E */ sh $t1, 0x010E($a2) ## 0000010E -/* 00408 80A564D8 8C4A0010 */ lw $t2, 0x0010($v0) ## 8015E670 -.L80A564DC: -/* 0040C 80A564DC 5540000B */ bnel $t2, $zero, .L80A5650C -/* 00410 80A564E0 84CE0284 */ lh $t6, 0x0284($a2) ## 00000284 -/* 00414 80A564E4 84CB0284 */ lh $t3, 0x0284($a2) ## 00000284 -/* 00418 80A564E8 240C5063 */ addiu $t4, $zero, 0x5063 ## $t4 = 00005063 -/* 0041C 80A564EC 240D5064 */ addiu $t5, $zero, 0x5064 ## $t5 = 00005064 -/* 00420 80A564F0 15600003 */ bne $t3, $zero, .L80A56500 -/* 00424 80A564F4 00000000 */ nop -/* 00428 80A564F8 1000000B */ beq $zero, $zero, .L80A56528 -/* 0042C 80A564FC A4CC010E */ sh $t4, 0x010E($a2) ## 0000010E -.L80A56500: -/* 00430 80A56500 10000009 */ beq $zero, $zero, .L80A56528 -/* 00434 80A56504 A4CD010E */ sh $t5, 0x010E($a2) ## 0000010E -/* 00438 80A56508 84CE0284 */ lh $t6, 0x0284($a2) ## 00000284 -.L80A5650C: -/* 0043C 80A5650C 240F5066 */ addiu $t7, $zero, 0x5066 ## $t7 = 00005066 -/* 00440 80A56510 24185067 */ addiu $t8, $zero, 0x5067 ## $t8 = 00005067 -/* 00444 80A56514 55C00004 */ bnel $t6, $zero, .L80A56528 -/* 00448 80A56518 A4D8010E */ sh $t8, 0x010E($a2) ## 0000010E -/* 0044C 80A5651C 10000002 */ beq $zero, $zero, .L80A56528 -/* 00450 80A56520 A4CF010E */ sh $t7, 0x010E($a2) ## 0000010E -/* 00454 80A56524 A4D8010E */ sh $t8, 0x010E($a2) ## 0000010E -.L80A56528: -/* 00458 80A56528 3C1980A5 */ lui $t9, %hi(func_80A56B40) ## $t9 = 80A50000 -/* 0045C 80A5652C 27396B40 */ addiu $t9, $t9, %lo(func_80A56B40) ## $t9 = 80A56B40 -/* 00460 80A56530 ACD9025C */ sw $t9, 0x025C($a2) ## 0000025C -.L80A56534: -/* 00464 80A56534 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00468 80A56538 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 0046C 80A5653C 03E00008 */ jr $ra -/* 00470 80A56540 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56544.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56544.s deleted file mode 100644 index d675601313..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56544.s +++ /dev/null @@ -1,66 +0,0 @@ -.rdata -glabel D_80A56FDC - .asciz "\x1b[32m ☆☆☆☆☆ ぎゃぁ!オトナだー ☆☆☆☆☆ \n\x1b[m" - .balign 4 - -.text -glabel func_80A56544 -/* 00474 80A56544 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 00478 80A56548 AFA40028 */ sw $a0, 0x0028($sp) -/* 0047C 80A5654C AFBF0024 */ sw $ra, 0x0024($sp) -/* 00480 80A56550 3C040600 */ lui $a0, 0x0600 ## $a0 = 06000000 -/* 00484 80A56554 AFA5002C */ sw $a1, 0x002C($sp) -/* 00488 80A56558 0C028800 */ jal SkelAnime_GetFrameCount - -/* 0048C 80A5655C 24845C30 */ addiu $a0, $a0, 0x5C30 ## $a0 = 06005C30 -/* 00490 80A56560 44822000 */ mtc1 $v0, $f4 ## $f4 = 0.00 -/* 00494 80A56564 3C01C120 */ lui $at, 0xC120 ## $at = C1200000 -/* 00498 80A56568 44819000 */ mtc1 $at, $f18 ## $f18 = -10.00 -/* 0049C 80A5656C 468021A0 */ cvt.s.w $f6, $f4 -/* 004A0 80A56570 8FA40028 */ lw $a0, 0x0028($sp) -/* 004A4 80A56574 3C050600 */ lui $a1, 0x0600 ## $a1 = 06000000 -/* 004A8 80A56578 24A55C30 */ addiu $a1, $a1, 0x5C30 ## $a1 = 06005C30 -/* 004AC 80A5657C 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000 -/* 004B0 80A56580 24070000 */ addiu $a3, $zero, 0x0000 ## $a3 = 00000000 -/* 004B4 80A56584 4600320D */ trunc.w.s $f8, $f6 -/* 004B8 80A56588 AFA00014 */ sw $zero, 0x0014($sp) -/* 004BC 80A5658C E7B20018 */ swc1 $f18, 0x0018($sp) -/* 004C0 80A56590 2484014C */ addiu $a0, $a0, 0x014C ## $a0 = 0000014C -/* 004C4 80A56594 440F4000 */ mfc1 $t7, $f8 -/* 004C8 80A56598 00000000 */ nop -/* 004CC 80A5659C 000FC400 */ sll $t8, $t7, 16 -/* 004D0 80A565A0 0018CC03 */ sra $t9, $t8, 16 -/* 004D4 80A565A4 44995000 */ mtc1 $t9, $f10 ## $f10 = 0.00 -/* 004D8 80A565A8 00000000 */ nop -/* 004DC 80A565AC 46805420 */ cvt.s.w $f16, $f10 -/* 004E0 80A565B0 0C029468 */ jal SkelAnime_ChangeAnim - -/* 004E4 80A565B4 E7B00010 */ swc1 $f16, 0x0010($sp) -/* 004E8 80A565B8 3C088016 */ lui $t0, %hi(gSaveContext+4) -/* 004EC 80A565BC 8D08E664 */ lw $t0, %lo(gSaveContext+4)($t0) -/* 004F0 80A565C0 24010005 */ addiu $at, $zero, 0x0005 ## $at = 00000005 -/* 004F4 80A565C4 24020011 */ addiu $v0, $zero, 0x0011 ## $v0 = 00000011 -/* 004F8 80A565C8 11000003 */ beq $t0, $zero, .L80A565D8 -/* 004FC 80A565CC 8FAA0028 */ lw $t2, 0x0028($sp) -/* 00500 80A565D0 10000001 */ beq $zero, $zero, .L80A565D8 -/* 00504 80A565D4 24020005 */ addiu $v0, $zero, 0x0005 ## $v0 = 00000005 -.L80A565D8: -/* 00508 80A565D8 10410008 */ beq $v0, $at, .L80A565FC -/* 0050C 80A565DC 3C0980A5 */ lui $t1, %hi(func_80A56614) ## $t1 = 80A50000 -/* 00510 80A565E0 3C0480A5 */ lui $a0, %hi(D_80A56FDC) ## $a0 = 80A50000 -/* 00514 80A565E4 0C00084C */ jal osSyncPrintf - -/* 00518 80A565E8 24846FDC */ addiu $a0, $a0, %lo(D_80A56FDC) ## $a0 = 80A56FDC -/* 0051C 80A565EC 0C00B55C */ jal Actor_Kill - -/* 00520 80A565F0 8FA40028 */ lw $a0, 0x0028($sp) -/* 00524 80A565F4 10000004 */ beq $zero, $zero, .L80A56608 -/* 00528 80A565F8 8FBF0024 */ lw $ra, 0x0024($sp) -.L80A565FC: -/* 0052C 80A565FC 25296614 */ addiu $t1, $t1, %lo(func_80A56614) ## $t1 = 00006614 -/* 00530 80A56600 AD49025C */ sw $t1, 0x025C($t2) ## 0000025C -/* 00534 80A56604 8FBF0024 */ lw $ra, 0x0024($sp) -.L80A56608: -/* 00538 80A56608 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 0053C 80A5660C 03E00008 */ jr $ra -/* 00540 80A56610 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56614.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56614.s deleted file mode 100644 index 0e4568b8b9..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56614.s +++ /dev/null @@ -1,84 +0,0 @@ -glabel func_80A56614 -/* 00544 80A56614 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00548 80A56618 AFBF0014 */ sw $ra, 0x0014($sp) -/* 0054C 80A5661C 84820280 */ lh $v0, 0x0280($a0) ## 00000280 -/* 00550 80A56620 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 00554 80A56624 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000 -/* 00558 80A56628 2442FFFC */ addiu $v0, $v0, 0xFFFC ## $v0 = FFFFFFFC -/* 0055C 80A5662C 00021400 */ sll $v0, $v0, 16 -/* 00560 80A56630 00021403 */ sra $v0, $v0, 16 -/* 00564 80A56634 04410002 */ bgez $v0, .L80A56640 -/* 00568 80A56638 A08002B4 */ sb $zero, 0x02B4($a0) ## 000002B4 -/* 0056C 80A5663C 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -.L80A56640: -/* 00570 80A56640 28410003 */ slti $at, $v0, 0x0003 -/* 00574 80A56644 14200002 */ bne $at, $zero, .L80A56650 -/* 00578 80A56648 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000 -/* 0057C 80A5664C 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -.L80A56650: -/* 00580 80A56650 3C0F80A5 */ lui $t7, %hi(D_80A56EF0) ## $t7 = 80A50000 -/* 00584 80A56654 25EF6EF0 */ addiu $t7, $t7, %lo(D_80A56EF0) ## $t7 = 80A56EF0 -/* 00588 80A56658 00027080 */ sll $t6, $v0, 2 -/* 0058C 80A5665C 01CF1821 */ addu $v1, $t6, $t7 -/* 00590 80A56660 8C650000 */ lw $a1, 0x0000($v1) ## 00000000 -/* 00594 80A56664 AFA30018 */ sw $v1, 0x0018($sp) -/* 00598 80A56668 AFA60020 */ sw $a2, 0x0020($sp) -/* 0059C 80A5666C 0C01B0D8 */ jal Text_GetFaceReaction -/* 005A0 80A56670 AFA70024 */ sw $a3, 0x0024($sp) -/* 005A4 80A56674 8FA30018 */ lw $v1, 0x0018($sp) -/* 005A8 80A56678 8FA60020 */ lw $a2, 0x0020($sp) -/* 005AC 80A5667C 1040000D */ beq $v0, $zero, .L80A566B4 -/* 005B0 80A56680 8FA70024 */ lw $a3, 0x0024($sp) -/* 005B4 80A56684 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000 -/* 005B8 80A56688 8C650000 */ lw $a1, 0x0000($v1) ## 00000000 -/* 005BC 80A5668C 0C01B0D8 */ jal Text_GetFaceReaction -/* 005C0 80A56690 AFA60020 */ sw $a2, 0x0020($sp) -/* 005C4 80A56694 8FA60020 */ lw $a2, 0x0020($sp) -/* 005C8 80A56698 3C1980A5 */ lui $t9, %hi(func_80A56B40) ## $t9 = 80A50000 -/* 005CC 80A5669C 24180001 */ addiu $t8, $zero, 0x0001 ## $t8 = 00000001 -/* 005D0 80A566A0 27396B40 */ addiu $t9, $t9, %lo(func_80A56B40) ## $t9 = 80A56B40 -/* 005D4 80A566A4 A4C2010E */ sh $v0, 0x010E($a2) ## 0000010E -/* 005D8 80A566A8 A0D802B4 */ sb $t8, 0x02B4($a2) ## 000002B4 -/* 005DC 80A566AC 1000001F */ beq $zero, $zero, .L80A5672C -/* 005E0 80A566B0 ACD9025C */ sw $t9, 0x025C($a2) ## 0000025C -.L80A566B4: -/* 005E4 80A566B4 84E200A4 */ lh $v0, 0x00A4($a3) ## 000000A4 -/* 005E8 80A566B8 2401004D */ addiu $at, $zero, 0x004D ## $at = 0000004D -/* 005EC 80A566BC 3C0F80A5 */ lui $t7, %hi(func_80A56B40) ## $t7 = 80A50000 -/* 005F0 80A566C0 1441000B */ bne $v0, $at, .L80A566F0 -/* 005F4 80A566C4 25EF6B40 */ addiu $t7, $t7, %lo(func_80A56B40) ## $t7 = 80A56B40 -/* 005F8 80A566C8 3C088016 */ lui $t0, %hi(gSaveContext+0x10) -/* 005FC 80A566CC 8D08E670 */ lw $t0, %lo(gSaveContext+0x10)($t0) -/* 00600 80A566D0 24097004 */ addiu $t1, $zero, 0x7004 ## $t1 = 00007004 -/* 00604 80A566D4 240A709A */ addiu $t2, $zero, 0x709A ## $t2 = 0000709A -/* 00608 80A566D8 15000003 */ bne $t0, $zero, .L80A566E8 -/* 0060C 80A566DC 00000000 */ nop -/* 00610 80A566E0 10000011 */ beq $zero, $zero, .L80A56728 -/* 00614 80A566E4 A4C9010E */ sh $t1, 0x010E($a2) ## 0000010E -.L80A566E8: -/* 00618 80A566E8 1000000F */ beq $zero, $zero, .L80A56728 -/* 0061C 80A566EC A4CA010E */ sh $t2, 0x010E($a2) ## 0000010E -.L80A566F0: -/* 00620 80A566F0 24010021 */ addiu $at, $zero, 0x0021 ## $at = 00000021 -/* 00624 80A566F4 1041000B */ beq $v0, $at, .L80A56724 -/* 00628 80A566F8 240E7003 */ addiu $t6, $zero, 0x7003 ## $t6 = 00007003 -/* 0062C 80A566FC 3C0B8016 */ lui $t3, %hi(gSaveContext+0x10) -/* 00630 80A56700 8D6BE670 */ lw $t3, %lo(gSaveContext+0x10)($t3) -/* 00634 80A56704 240C7002 */ addiu $t4, $zero, 0x7002 ## $t4 = 00007002 -/* 00638 80A56708 240D7003 */ addiu $t5, $zero, 0x7003 ## $t5 = 00007003 -/* 0063C 80A5670C 15600003 */ bne $t3, $zero, .L80A5671C -/* 00640 80A56710 00000000 */ nop -/* 00644 80A56714 10000004 */ beq $zero, $zero, .L80A56728 -/* 00648 80A56718 A4CC010E */ sh $t4, 0x010E($a2) ## 0000010E -.L80A5671C: -/* 0064C 80A5671C 10000002 */ beq $zero, $zero, .L80A56728 -/* 00650 80A56720 A4CD010E */ sh $t5, 0x010E($a2) ## 0000010E -.L80A56724: -/* 00654 80A56724 A4CE010E */ sh $t6, 0x010E($a2) ## 0000010E -.L80A56728: -/* 00658 80A56728 ACCF025C */ sw $t7, 0x025C($a2) ## 0000025C -.L80A5672C: -/* 0065C 80A5672C 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00660 80A56730 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00664 80A56734 03E00008 */ jr $ra -/* 00668 80A56738 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A5673C.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A5673C.s deleted file mode 100644 index ece525bb34..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A5673C.s +++ /dev/null @@ -1,106 +0,0 @@ -.rdata -glabel D_80A57010 - .asciz "\x1b[33m ☆☆☆☆☆ マスターソード祝入手! ☆☆☆☆☆ \n\x1b[m" - .balign 4 - -glabel D_80A57048 - .asciz "\x1b[33m ☆☆☆☆☆ デモ開始! ☆☆☆☆☆ \n\x1b[m" - .balign 4 - -glabel D_80A57074 - .asciz "\x1b[34m ☆☆☆☆☆ 返事なし ☆☆☆☆☆ \n\x1b[m" - .balign 4 - -.text -glabel func_80A5673C -/* 0066C 80A5673C 3C028016 */ lui $v0, %hi(gSaveContext) -/* 00670 80A56740 2442E660 */ addiu $v0, %lo(gSaveContext) -/* 00674 80A56744 944E0EDC */ lhu $t6, 0x0EDC($v0) ## 8015F53C -/* 00678 80A56748 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 0067C 80A5674C AFB00028 */ sw $s0, 0x0028($sp) -/* 00680 80A56750 31CF0020 */ andi $t7, $t6, 0x0020 ## $t7 = 00000000 -/* 00684 80A56754 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00688 80A56758 AFBF002C */ sw $ra, 0x002C($sp) -/* 0068C 80A5675C 11E00008 */ beq $t7, $zero, .L80A56780 -/* 00690 80A56760 AFA50034 */ sw $a1, 0x0034($sp) -/* 00694 80A56764 3C0480A5 */ lui $a0, %hi(D_80A57010) ## $a0 = 80A50000 -/* 00698 80A56768 0C00084C */ jal osSyncPrintf - -/* 0069C 80A5676C 24847010 */ addiu $a0, $a0, %lo(D_80A57010) ## $a0 = 80A57010 -/* 006A0 80A56770 0C00B55C */ jal Actor_Kill - -/* 006A4 80A56774 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 006A8 80A56778 1000003A */ beq $zero, $zero, .L80A56864 -/* 006AC 80A5677C 8FBF002C */ lw $ra, 0x002C($sp) -.L80A56780: -/* 006B0 80A56780 A6000284 */ sh $zero, 0x0284($s0) ## 00000284 -/* 006B4 80A56784 94580EE4 */ lhu $t8, 0x0EE4($v0) ## 00000EE4 -/* 006B8 80A56788 33190001 */ andi $t9, $t8, 0x0001 ## $t9 = 00000000 -/* 006BC 80A5678C 13200032 */ beq $t9, $zero, .L80A56858 -/* 006C0 80A56790 00000000 */ nop -/* 006C4 80A56794 94480F04 */ lhu $t0, 0x0F04($v0) ## 00000F04 -/* 006C8 80A56798 24197008 */ addiu $t9, $zero, 0x7008 ## $t9 = 00007008 -/* 006CC 80A5679C 3C0480A5 */ lui $a0, %hi(D_80A57074) ## $a0 = 80A50000 -/* 006D0 80A567A0 31091000 */ andi $t1, $t0, 0x1000 ## $t1 = 00000000 -/* 006D4 80A567A4 15200024 */ bne $t1, $zero, .L80A56838 -/* 006D8 80A567A8 24080006 */ addiu $t0, $zero, 0x0006 ## $t0 = 00000006 -/* 006DC 80A567AC 3C040601 */ lui $a0, 0x0601 ## $a0 = 06010000 -/* 006E0 80A567B0 0C028800 */ jal SkelAnime_GetFrameCount - -/* 006E4 80A567B4 2484C444 */ addiu $a0, $a0, 0xC444 ## $a0 = 0600C444 -/* 006E8 80A567B8 44822000 */ mtc1 $v0, $f4 ## $f4 = 0.00 -/* 006EC 80A567BC 3C01C120 */ lui $at, 0xC120 ## $at = C1200000 -/* 006F0 80A567C0 44819000 */ mtc1 $at, $f18 ## $f18 = -10.00 -/* 006F4 80A567C4 468021A0 */ cvt.s.w $f6, $f4 -/* 006F8 80A567C8 3C050601 */ lui $a1, 0x0601 ## $a1 = 06010000 -/* 006FC 80A567CC 24A5C444 */ addiu $a1, $a1, 0xC444 ## $a1 = 0600C444 -/* 00700 80A567D0 2604014C */ addiu $a0, $s0, 0x014C ## $a0 = 0000014C -/* 00704 80A567D4 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000 -/* 00708 80A567D8 24070000 */ addiu $a3, $zero, 0x0000 ## $a3 = 00000000 -/* 0070C 80A567DC 4600320D */ trunc.w.s $f8, $f6 -/* 00710 80A567E0 AFA00014 */ sw $zero, 0x0014($sp) -/* 00714 80A567E4 E7B20018 */ swc1 $f18, 0x0018($sp) -/* 00718 80A567E8 440B4000 */ mfc1 $t3, $f8 -/* 0071C 80A567EC 00000000 */ nop -/* 00720 80A567F0 000B6400 */ sll $t4, $t3, 16 -/* 00724 80A567F4 000C6C03 */ sra $t5, $t4, 16 -/* 00728 80A567F8 448D5000 */ mtc1 $t5, $f10 ## $f10 = 0.00 -/* 0072C 80A567FC 00000000 */ nop -/* 00730 80A56800 46805420 */ cvt.s.w $f16, $f10 -/* 00734 80A56804 0C029468 */ jal SkelAnime_ChangeAnim - -/* 00738 80A56808 E7B00010 */ swc1 $f16, 0x0010($sp) -/* 0073C 80A5680C 240E7007 */ addiu $t6, $zero, 0x7007 ## $t6 = 00007007 -/* 00740 80A56810 240F0005 */ addiu $t7, $zero, 0x0005 ## $t7 = 00000005 -/* 00744 80A56814 24180001 */ addiu $t8, $zero, 0x0001 ## $t8 = 00000001 -/* 00748 80A56818 3C0480A5 */ lui $a0, %hi(D_80A57048) ## $a0 = 80A50000 -/* 0074C 80A5681C A60E010E */ sh $t6, 0x010E($s0) ## 0000010E -/* 00750 80A56820 A60F0282 */ sh $t7, 0x0282($s0) ## 00000282 -/* 00754 80A56824 A6180284 */ sh $t8, 0x0284($s0) ## 00000284 -/* 00758 80A56828 0C00084C */ jal osSyncPrintf - -/* 0075C 80A5682C 24847048 */ addiu $a0, $a0, %lo(D_80A57048) ## $a0 = 80A57048 -/* 00760 80A56830 10000005 */ beq $zero, $zero, .L80A56848 -/* 00764 80A56834 00000000 */ nop -.L80A56838: -/* 00768 80A56838 A619010E */ sh $t9, 0x010E($s0) ## 0000010E -/* 0076C 80A5683C A6080282 */ sh $t0, 0x0282($s0) ## 00000282 -/* 00770 80A56840 0C00084C */ jal osSyncPrintf - -/* 00774 80A56844 24847074 */ addiu $a0, $a0, %lo(D_80A57074) ## $a0 = 00007074 -.L80A56848: -/* 00778 80A56848 3C0980A5 */ lui $t1, %hi(func_80A56874) ## $t1 = 80A50000 -/* 0077C 80A5684C 25296874 */ addiu $t1, $t1, %lo(func_80A56874) ## $t1 = 80A56874 -/* 00780 80A56850 10000003 */ beq $zero, $zero, .L80A56860 -/* 00784 80A56854 AE09025C */ sw $t1, 0x025C($s0) ## 0000025C -.L80A56858: -/* 00788 80A56858 0C00B55C */ jal Actor_Kill - -/* 0078C 80A5685C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -.L80A56860: -/* 00790 80A56860 8FBF002C */ lw $ra, 0x002C($sp) -.L80A56864: -/* 00794 80A56864 8FB00028 */ lw $s0, 0x0028($sp) -/* 00798 80A56868 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 -/* 0079C 80A5686C 03E00008 */ jr $ra -/* 007A0 80A56870 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56874.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56874.s deleted file mode 100644 index 8e26e099db..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56874.s +++ /dev/null @@ -1,41 +0,0 @@ -glabel func_80A56874 -/* 007A4 80A56874 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 007A8 80A56878 AFBF0014 */ sw $ra, 0x0014($sp) -/* 007AC 80A5687C AFA5001C */ sw $a1, 0x001C($sp) -/* 007B0 80A56880 848E0284 */ lh $t6, 0x0284($a0) ## 00000284 -/* 007B4 80A56884 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000 -/* 007B8 80A56888 2484014C */ addiu $a0, $a0, 0x014C ## $a0 = 0000014C -/* 007BC 80A5688C 51C00005 */ beql $t6, $zero, .L80A568A4 -/* 007C0 80A56890 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000 -/* 007C4 80A56894 0C02927F */ jal SkelAnime_FrameUpdateMatrix - -/* 007C8 80A56898 AFA70018 */ sw $a3, 0x0018($sp) -/* 007CC 80A5689C 8FA70018 */ lw $a3, 0x0018($sp) -/* 007D0 80A568A0 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000 -.L80A568A4: -/* 007D4 80A568A4 8FA5001C */ lw $a1, 0x001C($sp) -/* 007D8 80A568A8 0C00BC65 */ jal func_8002F194 -/* 007DC 80A568AC AFA70018 */ sw $a3, 0x0018($sp) -/* 007E0 80A568B0 1040000B */ beq $v0, $zero, .L80A568E0 -/* 007E4 80A568B4 8FA70018 */ lw $a3, 0x0018($sp) -/* 007E8 80A568B8 84EF0284 */ lh $t7, 0x0284($a3) ## 00000284 -/* 007EC 80A568BC 3C1980A5 */ lui $t9, %hi(func_80A56900) ## $t9 = 80A50000 -/* 007F0 80A568C0 3C1880A5 */ lui $t8, %hi(func_80A5673C) ## $t8 = 80A50000 -/* 007F4 80A568C4 15E00004 */ bne $t7, $zero, .L80A568D8 -/* 007F8 80A568C8 27396900 */ addiu $t9, $t9, %lo(func_80A56900) ## $t9 = 80A56900 -/* 007FC 80A568CC 2718673C */ addiu $t8, $t8, %lo(func_80A5673C) ## $t8 = 80A5673C -/* 00800 80A568D0 10000007 */ beq $zero, $zero, .L80A568F0 -/* 00804 80A568D4 ACF8025C */ sw $t8, 0x025C($a3) ## 0000025C -.L80A568D8: -/* 00808 80A568D8 10000005 */ beq $zero, $zero, .L80A568F0 -/* 0080C 80A568DC ACF9025C */ sw $t9, 0x025C($a3) ## 0000025C -.L80A568E0: -/* 00810 80A568E0 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000 -/* 00814 80A568E4 8FA5001C */ lw $a1, 0x001C($sp) -/* 00818 80A568E8 0C00BCB3 */ jal func_8002F2CC -/* 0081C 80A568EC 3C0642C8 */ lui $a2, 0x42C8 ## $a2 = 42C80000 -.L80A568F0: -/* 00820 80A568F0 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00824 80A568F4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00828 80A568F8 03E00008 */ jr $ra -/* 0082C 80A568FC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56900.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56900.s deleted file mode 100644 index c99b397869..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56900.s +++ /dev/null @@ -1,40 +0,0 @@ -glabel func_80A56900 -/* 00830 80A56900 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 00834 80A56904 AFA40028 */ sw $a0, 0x0028($sp) -/* 00838 80A56908 AFBF0024 */ sw $ra, 0x0024($sp) -/* 0083C 80A5690C 3C040601 */ lui $a0, 0x0601 ## $a0 = 06010000 -/* 00840 80A56910 AFA5002C */ sw $a1, 0x002C($sp) -/* 00844 80A56914 0C028800 */ jal SkelAnime_GetFrameCount - -/* 00848 80A56918 2484C6C8 */ addiu $a0, $a0, 0xC6C8 ## $a0 = 0600C6C8 -/* 0084C 80A5691C 44822000 */ mtc1 $v0, $f4 ## $f4 = 0.00 -/* 00850 80A56920 3C01C120 */ lui $at, 0xC120 ## $at = C1200000 -/* 00854 80A56924 44819000 */ mtc1 $at, $f18 ## $f18 = -10.00 -/* 00858 80A56928 468021A0 */ cvt.s.w $f6, $f4 -/* 0085C 80A5692C 8FA40028 */ lw $a0, 0x0028($sp) -/* 00860 80A56930 3C050601 */ lui $a1, 0x0601 ## $a1 = 06010000 -/* 00864 80A56934 24A5C6C8 */ addiu $a1, $a1, 0xC6C8 ## $a1 = 0600C6C8 -/* 00868 80A56938 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000 -/* 0086C 80A5693C 24070000 */ addiu $a3, $zero, 0x0000 ## $a3 = 00000000 -/* 00870 80A56940 4600320D */ trunc.w.s $f8, $f6 -/* 00874 80A56944 AFA00014 */ sw $zero, 0x0014($sp) -/* 00878 80A56948 E7B20018 */ swc1 $f18, 0x0018($sp) -/* 0087C 80A5694C 2484014C */ addiu $a0, $a0, 0x014C ## $a0 = 0000014C -/* 00880 80A56950 440F4000 */ mfc1 $t7, $f8 -/* 00884 80A56954 00000000 */ nop -/* 00888 80A56958 000FC400 */ sll $t8, $t7, 16 -/* 0088C 80A5695C 0018CC03 */ sra $t9, $t8, 16 -/* 00890 80A56960 44995000 */ mtc1 $t9, $f10 ## $f10 = 0.00 -/* 00894 80A56964 00000000 */ nop -/* 00898 80A56968 46805420 */ cvt.s.w $f16, $f10 -/* 0089C 80A5696C 0C029468 */ jal SkelAnime_ChangeAnim - -/* 008A0 80A56970 E7B00010 */ swc1 $f16, 0x0010($sp) -/* 008A4 80A56974 8FA90028 */ lw $t1, 0x0028($sp) -/* 008A8 80A56978 3C0880A5 */ lui $t0, %hi(func_80A56994) ## $t0 = 80A50000 -/* 008AC 80A5697C 25086994 */ addiu $t0, $t0, %lo(func_80A56994) ## $t0 = 80A56994 -/* 008B0 80A56980 AD28025C */ sw $t0, 0x025C($t1) ## 0000025C -/* 008B4 80A56984 8FBF0024 */ lw $ra, 0x0024($sp) -/* 008B8 80A56988 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 008BC 80A5698C 03E00008 */ jr $ra -/* 008C0 80A56990 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56994.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56994.s deleted file mode 100644 index e144d6b295..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56994.s +++ /dev/null @@ -1,50 +0,0 @@ -glabel func_80A56994 -/* 008C4 80A56994 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 008C8 80A56998 AFB00024 */ sw $s0, 0x0024($sp) -/* 008CC 80A5699C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 008D0 80A569A0 AFBF002C */ sw $ra, 0x002C($sp) -/* 008D4 80A569A4 AFB10028 */ sw $s1, 0x0028($sp) -/* 008D8 80A569A8 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 008DC 80A569AC 0C02927F */ jal SkelAnime_FrameUpdateMatrix - -/* 008E0 80A569B0 2484014C */ addiu $a0, $a0, 0x014C ## $a0 = 0000014C -/* 008E4 80A569B4 8E0F0038 */ lw $t7, 0x0038($s0) ## 00000038 -/* 008E8 80A569B8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 008EC 80A569BC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 008F0 80A569C0 AFAF0010 */ sw $t7, 0x0010($sp) -/* 008F4 80A569C4 8E0E003C */ lw $t6, 0x003C($s0) ## 0000003C -/* 008F8 80A569C8 26060260 */ addiu $a2, $s0, 0x0260 ## $a2 = 00000260 -/* 008FC 80A569CC 26070266 */ addiu $a3, $s0, 0x0266 ## $a3 = 00000266 -/* 00900 80A569D0 AFAE0014 */ sw $t6, 0x0014($sp) -/* 00904 80A569D4 8E0F0040 */ lw $t7, 0x0040($s0) ## 00000040 -/* 00908 80A569D8 0C00E0A4 */ jal func_80038290 -/* 0090C 80A569DC AFAF0018 */ sw $t7, 0x0018($sp) -/* 00910 80A569E0 0C042F6F */ jal func_8010BDBC -/* 00914 80A569E4 262420D8 */ addiu $a0, $s1, 0x20D8 ## $a0 = 000020D8 -/* 00918 80A569E8 86180282 */ lh $t8, 0x0282($s0) ## 00000282 -/* 0091C 80A569EC 57020014 */ bnel $t8, $v0, .L80A56A40 -/* 00920 80A569F0 8FBF002C */ lw $ra, 0x002C($sp) -/* 00924 80A569F4 0C041AF2 */ jal func_80106BC8 -/* 00928 80A569F8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 0092C 80A569FC 50400010 */ beql $v0, $zero, .L80A56A40 -/* 00930 80A56A00 8FBF002C */ lw $ra, 0x002C($sp) -/* 00934 80A56A04 0C041B33 */ jal func_80106CCC -/* 00938 80A56A08 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 0093C 80A56A0C 3C028016 */ lui $v0, %hi(gSaveContext) -/* 00940 80A56A10 2442E660 */ addiu $v0, %lo(gSaveContext) -/* 00944 80A56A14 94590F04 */ lhu $t9, 0x0F04($v0) ## 8015F564 -/* 00948 80A56A18 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 0094C 80A56A1C 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 00950 80A56A20 37281000 */ ori $t0, $t9, 0x1000 ## $t0 = 00001000 -/* 00954 80A56A24 A4480F04 */ sh $t0, 0x0F04($v0) ## 8015F564 -/* 00958 80A56A28 0C00B7D5 */ jal func_8002DF54 -/* 0095C 80A56A2C 24060008 */ addiu $a2, $zero, 0x0008 ## $a2 = 00000008 -/* 00960 80A56A30 3C0980A5 */ lui $t1, %hi(func_80A56A50) ## $t1 = 80A50000 -/* 00964 80A56A34 25296A50 */ addiu $t1, $t1, %lo(func_80A56A50) ## $t1 = 80A56A50 -/* 00968 80A56A38 AE09025C */ sw $t1, 0x025C($s0) ## 0000025C -/* 0096C 80A56A3C 8FBF002C */ lw $ra, 0x002C($sp) -.L80A56A40: -/* 00970 80A56A40 8FB00024 */ lw $s0, 0x0024($sp) -/* 00974 80A56A44 8FB10028 */ lw $s1, 0x0028($sp) -/* 00978 80A56A48 03E00008 */ jr $ra -/* 0097C 80A56A4C 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56A50.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56A50.s deleted file mode 100644 index 6dd521f2c6..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56A50.s +++ /dev/null @@ -1,34 +0,0 @@ -glabel func_80A56A50 -/* 00980 80A56A50 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 00984 80A56A54 AFA40028 */ sw $a0, 0x0028($sp) -/* 00988 80A56A58 AFBF0024 */ sw $ra, 0x0024($sp) -/* 0098C 80A56A5C 3C040601 */ lui $a0, 0x0601 ## $a0 = 06010000 -/* 00990 80A56A60 AFA5002C */ sw $a1, 0x002C($sp) -/* 00994 80A56A64 0C028800 */ jal SkelAnime_GetFrameCount - -/* 00998 80A56A68 2484C374 */ addiu $a0, $a0, 0xC374 ## $a0 = 0600C374 -/* 0099C 80A56A6C 44822000 */ mtc1 $v0, $f4 ## $f4 = 0.00 -/* 009A0 80A56A70 8FA30028 */ lw $v1, 0x0028($sp) -/* 009A4 80A56A74 3C01C120 */ lui $at, 0xC120 ## $at = C1200000 -/* 009A8 80A56A78 46802020 */ cvt.s.w $f0, $f4 -/* 009AC 80A56A7C 44813000 */ mtc1 $at, $f6 ## $f6 = -10.00 -/* 009B0 80A56A80 3C050601 */ lui $a1, 0x0601 ## $a1 = 06010000 -/* 009B4 80A56A84 240E0002 */ addiu $t6, $zero, 0x0002 ## $t6 = 00000002 -/* 009B8 80A56A88 24A5C374 */ addiu $a1, $a1, 0xC374 ## $a1 = 0600C374 -/* 009BC 80A56A8C 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000 -/* 009C0 80A56A90 E4600288 */ swc1 $f0, 0x0288($v1) ## 00000288 -/* 009C4 80A56A94 AFAE0014 */ sw $t6, 0x0014($sp) -/* 009C8 80A56A98 E7A00010 */ swc1 $f0, 0x0010($sp) -/* 009CC 80A56A9C 24070000 */ addiu $a3, $zero, 0x0000 ## $a3 = 00000000 -/* 009D0 80A56AA0 2464014C */ addiu $a0, $v1, 0x014C ## $a0 = 0000014C -/* 009D4 80A56AA4 0C029468 */ jal SkelAnime_ChangeAnim - -/* 009D8 80A56AA8 E7A60018 */ swc1 $f6, 0x0018($sp) -/* 009DC 80A56AAC 8FB80028 */ lw $t8, 0x0028($sp) -/* 009E0 80A56AB0 3C0F80A5 */ lui $t7, %hi(func_80A56ACC) ## $t7 = 80A50000 -/* 009E4 80A56AB4 25EF6ACC */ addiu $t7, $t7, %lo(func_80A56ACC) ## $t7 = 80A56ACC -/* 009E8 80A56AB8 AF0F025C */ sw $t7, 0x025C($t8) ## 0000025C -/* 009EC 80A56ABC 8FBF0024 */ lw $ra, 0x0024($sp) -/* 009F0 80A56AC0 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 009F4 80A56AC4 03E00008 */ jr $ra -/* 009F8 80A56AC8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56ACC.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56ACC.s deleted file mode 100644 index 7c08852d5b..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56ACC.s +++ /dev/null @@ -1,32 +0,0 @@ -glabel func_80A56ACC -/* 009FC 80A56ACC 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00A00 80A56AD0 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00A04 80A56AD4 AFA50024 */ sw $a1, 0x0024($sp) -/* 00A08 80A56AD8 C4840164 */ lwc1 $f4, 0x0164($a0) ## 00000164 -/* 00A0C 80A56ADC 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000 -/* 00A10 80A56AE0 AFA70020 */ sw $a3, 0x0020($sp) -/* 00A14 80A56AE4 2484014C */ addiu $a0, $a0, 0x014C ## $a0 = 0000014C -/* 00A18 80A56AE8 0C02927F */ jal SkelAnime_FrameUpdateMatrix - -/* 00A1C 80A56AEC E7A4001C */ swc1 $f4, 0x001C($sp) -/* 00A20 80A56AF0 8FA70020 */ lw $a3, 0x0020($sp) -/* 00A24 80A56AF4 C7A6001C */ lwc1 $f6, 0x001C($sp) -/* 00A28 80A56AF8 8FA40024 */ lw $a0, 0x0024($sp) -/* 00A2C 80A56AFC C4E80288 */ lwc1 $f8, 0x0288($a3) ## 00000288 -/* 00A30 80A56B00 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 00A34 80A56B04 24060007 */ addiu $a2, $zero, 0x0007 ## $a2 = 00000007 -/* 00A38 80A56B08 4606403E */ c.le.s $f8, $f6 -/* 00A3C 80A56B0C 00000000 */ nop -/* 00A40 80A56B10 45020008 */ bc1fl .L80A56B34 -/* 00A44 80A56B14 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00A48 80A56B18 0C00B7D5 */ jal func_8002DF54 -/* 00A4C 80A56B1C AFA70020 */ sw $a3, 0x0020($sp) -/* 00A50 80A56B20 8FA70020 */ lw $a3, 0x0020($sp) -/* 00A54 80A56B24 3C0E80A5 */ lui $t6, %hi(func_80A5673C) ## $t6 = 80A50000 -/* 00A58 80A56B28 25CE673C */ addiu $t6, $t6, %lo(func_80A5673C) ## $t6 = 80A5673C -/* 00A5C 80A56B2C ACEE025C */ sw $t6, 0x025C($a3) ## 0000025C -/* 00A60 80A56B30 8FBF0014 */ lw $ra, 0x0014($sp) -.L80A56B34: -/* 00A64 80A56B34 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00A68 80A56B38 03E00008 */ jr $ra -/* 00A6C 80A56B3C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56B40.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56B40.s deleted file mode 100644 index 475f517c3f..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56B40.s +++ /dev/null @@ -1,108 +0,0 @@ -glabel func_80A56B40 -/* 00A70 80A56B40 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00A74 80A56B44 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00A78 80A56B48 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 00A7C 80A56B4C AFA5001C */ sw $a1, 0x001C($sp) -/* 00A80 80A56B50 AFA60018 */ sw $a2, 0x0018($sp) -/* 00A84 80A56B54 0C02927F */ jal SkelAnime_FrameUpdateMatrix - -/* 00A88 80A56B58 2484014C */ addiu $a0, $a0, 0x014C ## $a0 = 0000014C -/* 00A8C 80A56B5C 8FA60018 */ lw $a2, 0x0018($sp) -/* 00A90 80A56B60 8FA4001C */ lw $a0, 0x001C($sp) -/* 00A94 80A56B64 3C0580A5 */ lui $a1, %hi(D_80A56EF0) ## $a1 = 80A50000 -/* 00A98 80A56B68 84C30280 */ lh $v1, 0x0280($a2) ## 00000280 -/* 00A9C 80A56B6C 2463FFFC */ addiu $v1, $v1, 0xFFFC ## $v1 = FFFFFFFC -/* 00AA0 80A56B70 00031C00 */ sll $v1, $v1, 16 -/* 00AA4 80A56B74 00031C03 */ sra $v1, $v1, 16 -/* 00AA8 80A56B78 04630003 */ bgezl $v1, .L80A56B88 -/* 00AAC 80A56B7C 28610003 */ slti $at, $v1, 0x0003 -/* 00AB0 80A56B80 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000 -/* 00AB4 80A56B84 28610003 */ slti $at, $v1, 0x0003 -.L80A56B88: -/* 00AB8 80A56B88 54200003 */ bnel $at, $zero, .L80A56B98 -/* 00ABC 80A56B8C 00037080 */ sll $t6, $v1, 2 -/* 00AC0 80A56B90 24030001 */ addiu $v1, $zero, 0x0001 ## $v1 = 00000001 -/* 00AC4 80A56B94 00037080 */ sll $t6, $v1, 2 -.L80A56B98: -/* 00AC8 80A56B98 00AE2821 */ addu $a1, $a1, $t6 -/* 00ACC 80A56B9C 8CA56EF0 */ lw $a1, %lo(D_80A56EF0)($a1) -/* 00AD0 80A56BA0 0C01B0D8 */ jal Text_GetFaceReaction -/* 00AD4 80A56BA4 AFA60018 */ sw $a2, 0x0018($sp) -/* 00AD8 80A56BA8 10400013 */ beq $v0, $zero, .L80A56BF8 -/* 00ADC 80A56BAC 8FA60018 */ lw $a2, 0x0018($sp) -/* 00AE0 80A56BB0 90CF02B4 */ lbu $t7, 0x02B4($a2) ## 000002B4 -/* 00AE4 80A56BB4 55E00023 */ bnel $t7, $zero, .L80A56C44 -/* 00AE8 80A56BB8 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000 -/* 00AEC 80A56BBC 84C20280 */ lh $v0, 0x0280($a2) ## 00000280 -/* 00AF0 80A56BC0 3C1880A5 */ lui $t8, %hi(func_80A563BC) ## $t8 = 80A50000 -/* 00AF4 80A56BC4 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004 -/* 00AF8 80A56BC8 10400003 */ beq $v0, $zero, .L80A56BD8 -/* 00AFC 80A56BCC 271863BC */ addiu $t8, $t8, %lo(func_80A563BC) ## $t8 = 80A563BC -/* 00B00 80A56BD0 54410004 */ bnel $v0, $at, .L80A56BE4 -/* 00B04 80A56BD4 24010008 */ addiu $at, $zero, 0x0008 ## $at = 00000008 -.L80A56BD8: -/* 00B08 80A56BD8 10000032 */ beq $zero, $zero, .L80A56CA4 -/* 00B0C 80A56BDC ACD8025C */ sw $t8, 0x025C($a2) ## 0000025C -/* 00B10 80A56BE0 24010008 */ addiu $at, $zero, 0x0008 ## $at = 00000008 -.L80A56BE4: -/* 00B14 80A56BE4 14410016 */ bne $v0, $at, .L80A56C40 -/* 00B18 80A56BE8 3C1980A5 */ lui $t9, %hi(func_80A56614) ## $t9 = 80A50000 -/* 00B1C 80A56BEC 27396614 */ addiu $t9, $t9, %lo(func_80A56614) ## $t9 = 80A56614 -/* 00B20 80A56BF0 1000002C */ beq $zero, $zero, .L80A56CA4 -/* 00B24 80A56BF4 ACD9025C */ sw $t9, 0x025C($a2) ## 0000025C -.L80A56BF8: -/* 00B28 80A56BF8 90C802B4 */ lbu $t0, 0x02B4($a2) ## 000002B4 -/* 00B2C 80A56BFC 51000011 */ beql $t0, $zero, .L80A56C44 -/* 00B30 80A56C00 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000 -/* 00B34 80A56C04 84C20280 */ lh $v0, 0x0280($a2) ## 00000280 -/* 00B38 80A56C08 3C0980A5 */ lui $t1, %hi(func_80A563BC) ## $t1 = 80A50000 -/* 00B3C 80A56C0C 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004 -/* 00B40 80A56C10 10400003 */ beq $v0, $zero, .L80A56C20 -/* 00B44 80A56C14 252963BC */ addiu $t1, $t1, %lo(func_80A563BC) ## $t1 = 80A563BC -/* 00B48 80A56C18 54410004 */ bnel $v0, $at, .L80A56C2C -/* 00B4C 80A56C1C 24010008 */ addiu $at, $zero, 0x0008 ## $at = 00000008 -.L80A56C20: -/* 00B50 80A56C20 10000020 */ beq $zero, $zero, .L80A56CA4 -/* 00B54 80A56C24 ACC9025C */ sw $t1, 0x025C($a2) ## 0000025C -/* 00B58 80A56C28 24010008 */ addiu $at, $zero, 0x0008 ## $at = 00000008 -.L80A56C2C: -/* 00B5C 80A56C2C 14410004 */ bne $v0, $at, .L80A56C40 -/* 00B60 80A56C30 3C0A80A5 */ lui $t2, %hi(func_80A56614) ## $t2 = 80A50000 -/* 00B64 80A56C34 254A6614 */ addiu $t2, $t2, %lo(func_80A56614) ## $t2 = 80A56614 -/* 00B68 80A56C38 1000001A */ beq $zero, $zero, .L80A56CA4 -/* 00B6C 80A56C3C ACCA025C */ sw $t2, 0x025C($a2) ## 0000025C -.L80A56C40: -/* 00B70 80A56C40 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000 -.L80A56C44: -/* 00B74 80A56C44 8FA5001C */ lw $a1, 0x001C($sp) -/* 00B78 80A56C48 0C00BC65 */ jal func_8002F194 -/* 00B7C 80A56C4C AFA60018 */ sw $a2, 0x0018($sp) -/* 00B80 80A56C50 10400011 */ beq $v0, $zero, .L80A56C98 -/* 00B84 80A56C54 8FA60018 */ lw $a2, 0x0018($sp) -/* 00B88 80A56C58 84C20280 */ lh $v0, 0x0280($a2) ## 00000280 -/* 00B8C 80A56C5C 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004 -/* 00B90 80A56C60 240B0001 */ addiu $t3, $zero, 0x0001 ## $t3 = 00000001 -/* 00B94 80A56C64 10400002 */ beq $v0, $zero, .L80A56C70 -/* 00B98 80A56C68 3C0C80A5 */ lui $t4, %hi(func_80A563BC) ## $t4 = 80A50000 -/* 00B9C 80A56C6C 14410004 */ bne $v0, $at, .L80A56C80 -.L80A56C70: -/* 00BA0 80A56C70 258C63BC */ addiu $t4, $t4, %lo(func_80A563BC) ## $t4 = 80A563BC -/* 00BA4 80A56C74 A4CB0284 */ sh $t3, 0x0284($a2) ## 00000284 -/* 00BA8 80A56C78 1000000A */ beq $zero, $zero, .L80A56CA4 -/* 00BAC 80A56C7C ACCC025C */ sw $t4, 0x025C($a2) ## 0000025C -.L80A56C80: -/* 00BB0 80A56C80 24010008 */ addiu $at, $zero, 0x0008 ## $at = 00000008 -/* 00BB4 80A56C84 14410004 */ bne $v0, $at, .L80A56C98 -/* 00BB8 80A56C88 3C0D80A5 */ lui $t5, %hi(func_80A56614) ## $t5 = 80A50000 -/* 00BBC 80A56C8C 25AD6614 */ addiu $t5, $t5, %lo(func_80A56614) ## $t5 = 80A56614 -/* 00BC0 80A56C90 10000004 */ beq $zero, $zero, .L80A56CA4 -/* 00BC4 80A56C94 ACCD025C */ sw $t5, 0x025C($a2) ## 0000025C -.L80A56C98: -/* 00BC8 80A56C98 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000 -/* 00BCC 80A56C9C 0C00BCBD */ jal func_8002F2F4 -/* 00BD0 80A56CA0 8FA5001C */ lw $a1, 0x001C($sp) -.L80A56CA4: -/* 00BD4 80A56CA4 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00BD8 80A56CA8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00BDC 80A56CAC 03E00008 */ jr $ra -/* 00BE0 80A56CB0 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56E14.s b/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56E14.s deleted file mode 100644 index 03db174228..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56E14.s +++ /dev/null @@ -1,28 +0,0 @@ -glabel func_80A56E14 -/* 00D44 80A56E14 24010009 */ addiu $at, $zero, 0x0009 ## $at = 00000009 -/* 00D48 80A56E18 AFA40000 */ sw $a0, 0x0000($sp) -/* 00D4C 80A56E1C AFA60008 */ sw $a2, 0x0008($sp) -/* 00D50 80A56E20 14A10007 */ bne $a1, $at, .L80A56E40 -/* 00D54 80A56E24 AFA7000C */ sw $a3, 0x000C($sp) -/* 00D58 80A56E28 8FA20014 */ lw $v0, 0x0014($sp) -/* 00D5C 80A56E2C 8FA30010 */ lw $v1, 0x0010($sp) -/* 00D60 80A56E30 844F0268 */ lh $t7, 0x0268($v0) ## 00000268 -/* 00D64 80A56E34 846E0000 */ lh $t6, 0x0000($v1) ## 00000000 -/* 00D68 80A56E38 01CFC021 */ addu $t8, $t6, $t7 -/* 00D6C 80A56E3C A4780000 */ sh $t8, 0x0000($v1) ## 00000000 -.L80A56E40: -/* 00D70 80A56E40 24010010 */ addiu $at, $zero, 0x0010 ## $at = 00000010 -/* 00D74 80A56E44 8FA20014 */ lw $v0, 0x0014($sp) -/* 00D78 80A56E48 14A10009 */ bne $a1, $at, .L80A56E70 -/* 00D7C 80A56E4C 8FA30010 */ lw $v1, 0x0010($sp) -/* 00D80 80A56E50 84790000 */ lh $t9, 0x0000($v1) ## 00000000 -/* 00D84 80A56E54 84480262 */ lh $t0, 0x0262($v0) ## 00000262 -/* 00D88 80A56E58 846A0004 */ lh $t2, 0x0004($v1) ## 00000004 -/* 00D8C 80A56E5C 03284821 */ addu $t1, $t9, $t0 -/* 00D90 80A56E60 A4690000 */ sh $t1, 0x0000($v1) ## 00000000 -/* 00D94 80A56E64 844B0264 */ lh $t3, 0x0264($v0) ## 00000264 -/* 00D98 80A56E68 014B6021 */ addu $t4, $t2, $t3 -/* 00D9C 80A56E6C A46C0004 */ sh $t4, 0x0004($v1) ## 00000004 -.L80A56E70: -/* 00DA0 80A56E70 03E00008 */ jr $ra -/* 00DA4 80A56E74 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 diff --git a/data/overlays/actors/z_en_heishi4.data.s b/data/overlays/actors/z_en_heishi4.data.s deleted file mode 100644 index b51a355f3f..0000000000 --- a/data/overlays/actors/z_en_heishi4.data.s +++ /dev/null @@ -1,22 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purpose registers - -.section .data - -.balign 16 - -glabel En_Heishi4_InitVars - .word 0x01780400, 0x00000009, 0x00970000, 0x00000308 -.word EnHeishi4_Init -.word EnHeishi4_Destroy -.word EnHeishi4_Update -.word EnHeishi4_Draw -glabel D_80A56EF0 - .word 0x00000006, 0x00000007 -glabel D_80A56EF8 - .word 0x0A000039, 0x20010000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0x00210028, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 - diff --git a/data/overlays/actors/z_en_heishi4.reloc.s b/data/overlays/actors/z_en_heishi4.reloc.s deleted file mode 100644 index 355a318aa5..0000000000 --- a/data/overlays/actors/z_en_heishi4.reloc.s +++ /dev/null @@ -1,13 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purpose registers - -.section .rodata - -.balign 16 - -glabel D_80A570A0 - .incbin "baserom/ovl_En_Heishi4", 0xFD0, 0x00000160 diff --git a/diff.py b/diff.py index 013d935948..8dec9ef182 100755 --- a/diff.py +++ b/diff.py @@ -5,7 +5,6 @@ import os import ast import argparse import subprocess -import collections import difflib import string import itertools @@ -21,7 +20,7 @@ def fail(msg): MISSING_PREREQUISITES = ( "Missing prerequisite python module {}. " - "Run `python3 -m pip install --user colorama ansiwrap attrs watchdog python-Levenshtein cxxfilt` to install prerequisites (cxxfilt only needed with --source)." + "Run `python3 -m pip install --user colorama ansiwrap attrs watchdog python-Levenshtein` to install prerequisites (python-Levenshtein only needed for --algorithm=levenshtein)." ) try: @@ -50,21 +49,6 @@ parser.add_argument( action="store_true", help="Diff .o files rather than a whole binary. This makes it possible to see symbol names. (Recommended)", ) -parser.add_argument( - "-e", - dest="diff_elf_symbol", - help="Diff a given function in two ELFs, one being stripped and the other one non-stripped. Requires objdump from binutils 2.33+.", -) -parser.add_argument( - "--source", - action="store_true", - help="Show source code (if possible). Only works with -o and -e.", -) -parser.add_argument( - "--inlines", - action="store_true", - help="Show inline function calls (if possible). Only works with -o and -e.", -) parser.add_argument( "--base-asm", dest="base_asm", @@ -142,20 +126,11 @@ parser.add_argument( parser.add_argument( "--algorithm", dest="algorithm", - default="levenshtein", + default="difflib", choices=["levenshtein", "difflib"], help="Diff algorithm to use.", ) -parser.add_argument( - "--max-size", - "--max-lines", - dest="max_lines", - type=int, - default=1024, - help="The maximum length of the diff, in lines.", -) - # Project-specific flags, e.g. different versions/make arguments. if hasattr(diff_settings, "add_custom_arguments"): diff_settings.add_custom_arguments(parser) @@ -166,15 +141,13 @@ args = parser.parse_args() config = {} diff_settings.apply(config, args) -arch = config.get("arch", "mips") baseimg = config.get("baseimg", None) myimg = config.get("myimg", None) mapfile = config.get("mapfile", None) makeflags = config.get("makeflags", []) source_directories = config.get("source_directories", None) -objdump_executable = config.get("objdump_executable", None) -MAX_FUNCTION_SIZE_LINES = args.max_lines +MAX_FUNCTION_SIZE_LINES = 4096 MAX_FUNCTION_SIZE_BYTES = MAX_FUNCTION_SIZE_LINES * 4 COLOR_ROTATION = [ @@ -190,7 +163,7 @@ COLOR_ROTATION = [ ] BUFFER_CMD = ["tail", "-c", str(10 ** 9)] -LESS_CMD = ["less", "-SRic", "-#6"] +LESS_CMD = ["less", "-Ric"] DEBOUNCE_DELAY = 0.1 FS_WATCH_EXTENSIONS = [".c", ".h"] @@ -203,30 +176,25 @@ if args.algorithm == "levenshtein": except ModuleNotFoundError as e: fail(MISSING_PREREQUISITES.format(e.name)) -if args.source: +binutils_prefix = None + +for binutils_cand in ["mips-linux-gnu-", "mips64-elf-"]: try: - import cxxfilt - except ModuleNotFoundError as e: - fail(MISSING_PREREQUISITES.format(e.name)) + subprocess.check_call( + [binutils_cand + "objdump", "--version"], + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, + ) + binutils_prefix = binutils_cand + break + except subprocess.CalledProcessError: + pass + except FileNotFoundError: + pass -if objdump_executable is None: - for objdump_cand in ["mips-linux-gnu-objdump", "mips64-elf-objdump"]: - try: - subprocess.check_call( - [objdump_cand, "--version"], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, - ) - objdump_executable = objdump_cand - break - except subprocess.CalledProcessError: - pass - except FileNotFoundError: - pass - -if not objdump_executable: +if not binutils_prefix: fail( - "Missing binutils; please ensure mips-linux-gnu-objdump or mips64-elf-objdump exist, or configure objdump_executable." + "Missing binutils; please ensure mips-linux-gnu-objdump or mips64-elf-objdump exist." ) @@ -242,10 +210,6 @@ def eval_int(expr, emsg=None): return None -def eval_line_num(expr): - return int(expr.strip().replace(":", ""), 16) - - def run_make(target, capture_output=False): if capture_output: return subprocess.run( @@ -271,26 +235,10 @@ def restrict_to_function(dump, fn_name): return "\n".join(out) -def maybe_get_objdump_source_flags(): - if not args.source: - return [] - - flags = [ - "--source", - "--source-comment=| ", - "-l", - ] - - if args.inlines: - flags.append("--inlines") - - return flags - - def run_objdump(cmd): flags, target, restrict = cmd out = subprocess.check_output( - [objdump_executable] + arch_flags + flags + [target], universal_newlines=True + [binutils_prefix + "objdump"] + flags + [target], universal_newlines=True ) if restrict is not None: return restrict_to_function(out, restrict) @@ -343,36 +291,6 @@ def search_map_file(fn_name): return None, None -def dump_elf(): - if not baseimg or not myimg: - fail("Missing myimg/baseimg in config.") - if base_shift: - fail("--base-shift not compatible with -e") - - start_addr = eval_int(args.start, "Start address must be an integer expression.") - - if args.end is not None: - end_addr = eval_int(args.end, "End address must be an integer expression.") - else: - end_addr = start_addr + MAX_FUNCTION_SIZE_BYTES - - flags1 = [ - f"--start-address={start_addr}", - f"--stop-address={end_addr}", - ] - - flags2 = [ - f"--disassemble={args.diff_elf_symbol}", - ] - - objdump_flags = ["-drz", "-j", ".text"] - return ( - myimg, - (objdump_flags + flags1, baseimg, None), - (objdump_flags + flags2 + maybe_get_objdump_source_flags(), myimg, None), - ) - - def dump_objfile(): if base_shift: fail("--base-shift not compatible with -o") @@ -399,7 +317,7 @@ def dump_objfile(): return ( objfile, (objdump_flags, refobjfile, args.start), - (objdump_flags + maybe_get_objdump_source_flags(), objfile, args.start), + (objdump_flags, objfile, args.start), ) @@ -439,47 +357,29 @@ def ansi_ljust(s, width): return s -if arch == "mips": - re_int = re.compile(r"[0-9]+") - re_comment = re.compile(r"<.*?>") - re_reg = re.compile(r"\$?\b(a[0-3]|t[0-9]|s[0-8]|at|v[01]|f[12]?[0-9]|f3[01]|k[01]|fp|ra)\b") - re_sprel = re.compile(r"(?<=,)([0-9]+|0x[0-9a-f]+)\(sp\)") - re_large_imm = re.compile(r"-?[1-9][0-9]{2,}|-?0x[0-9a-f]{3,}") - re_imm = re.compile(r"(\b|-)([0-9]+|0x[0-9a-fA-F]+)\b(?!\(sp)|%(lo|hi)\([^)]*\)") - forbidden = set(string.ascii_letters + "_") - arch_flags = ["-m", "mips:4300"] - branch_likely_instructions = { - "beql", - "bnel", - "beqzl", - "bnezl", - "bgezl", - "bgtzl", - "blezl", - "bltzl", - "bc1tl", - "bc1fl", - } - branch_instructions = branch_likely_instructions.union( - {"b", "beq", "bne", "beqz", "bnez", "bgez", "bgtz", "blez", "bltz", "bc1t", "bc1f"} - ) - instructions_with_address_immediates = branch_instructions.union({"jal", "j"}) -elif arch == "aarch64": - re_int = re.compile(r"[0-9]+") - re_comment = re.compile(r"(<.*?>|//.*$)") - # GPRs and FP registers: X0-X30, W0-W30, [DSHQ]0..31 - # The zero registers and SP should not be in this list. - re_reg = re.compile(r"\$?\b([dshq][12]?[0-9]|[dshq]3[01]|[xw][12]?[0-9]|[xw]30)\b") - re_sprel = re.compile(r"sp, #-?(0x[0-9a-fA-F]+|[0-9]+)\b") - re_large_imm = re.compile(r"-?[1-9][0-9]{2,}|-?0x[0-9a-f]{3,}") - re_imm = re.compile(r"(?") +re_regs = re.compile(r"\$?\b(a[0-3]|t[0-9]|s[0-8]|at|v[01]|f[12]?[0-9]|f3[01]|fp)\b") +re_sprel = re.compile(r",([1-9][0-9]*|0x[1-9a-f][0-9a-f]*)\(sp\)") +re_large_imm = re.compile(r"-?[1-9][0-9]{2,}|-?0x[0-9a-f]{3,}") +re_imm = re.compile(r"(\b|-)([0-9]+|0x[0-9a-fA-F]+)\b(?!\(sp)|%(lo|hi)\([^)]*\)") +forbidden = set(string.ascii_letters + "_") +branch_likely_instructions = { + "beql", + "bnel", + "beqzl", + "bnezl", + "bgezl", + "bgtzl", + "blezl", + "bltzl", + "bc1tl", + "bc1fl", +} +branch_instructions = branch_likely_instructions.union( + {"b", "beq", "bne", "beqz", "bnez", "bgez", "bgtz", "blez", "bltz", "bc1t", "bc1f"} +) +jump_instructions = branch_instructions.union({"jal", "j"}) def hexify_int(row, pat): @@ -512,18 +412,11 @@ def parse_relocated_line(line): return before, imm, after -def process_mips_reloc(row, prev): +def process_reloc(row, prev): before, imm, after = parse_relocated_line(prev) repl = row.split()[-1] if imm != "0": - # MIPS uses relocations with addends embedded in the code as immediates. - # If there is an immediate, show it as part of the relocation. Ideally - # we'd show this addend in both %lo/%hi, but annoyingly objdump's output - # doesn't include enough information to pair up %lo's and %hi's... - # TODO: handle unambiguous cases where all addends for a symbol are the - # same, or show "+???". - mnemonic = prev.split()[0] - if mnemonic in instructions_with_address_immediates and not imm.startswith("0x"): + if before.strip() == "jal" and not imm.startswith("0x"): imm = "0x" + imm repl += "+" + imm if int(imm, 0) > 0 else imm if "R_MIPS_LO16" in row: @@ -538,63 +431,38 @@ def process_mips_reloc(row, prev): return before + repl + after -def cleanup_whitespace(line): - return "".join(f"{o:<8s}" for o in line.strip().split("\t")) - - -Line = collections.namedtuple( - "Line", - [ - "mnemonic", - "diff_row", - "original", - "line_num", - "branch_target", - "source_lines", - "comment", - ], -) - - def process(lines): + mnemonics = [] + diff_rows = [] + rows_with_imms = [] skip_next = False - source_lines = [] + originals = [] + line_nums = [] + branch_targets = [] if not args.diff_obj: lines = lines[7:] if lines and not lines[-1]: lines.pop() - output = [] for row in lines: if args.diff_obj and (">:" in row or not row): continue - if args.source and (row and row[0] != " "): - source_lines.append(row) - continue - - if "R_AARCH64_" in row: - # TODO: handle relocation - continue - if "R_MIPS_" in row: # N.B. Don't transform the diff rows, they already ignore immediates - # if output[-1].diff_row != "": - # output[-1] = output[-1].replace(diff_row=process_mips_reloc(row, output[-1].row_with_imm)) - new_original = process_mips_reloc(row, output[-1].original) - output[-1] = output[-1]._replace(original=new_original) + # if diff_rows[-1] != '': + # diff_rows[-1] = process_reloc(row, rows_with_imms[-1]) + originals[-1] = process_reloc(row, originals[-1]) continue - m_comment = re.search(re_comment, row) - comment = m_comment[0] if m_comment else None - row = re.sub(re_comment, "", row) + row = re.sub(re_comments, "", row) row = row.rstrip() tabs = row.split("\t") row = "\t".join(tabs[2:]) line_num = tabs[0].strip() row_parts = row.split("\t", 1) mnemonic = row_parts[0].strip() - if mnemonic not in instructions_with_address_immediates: + if mnemonic not in jump_instructions: row = re.sub(re_int, lambda s: hexify_int(row, s), row) original = row if skip_next: @@ -603,45 +471,38 @@ def process(lines): mnemonic = "" if mnemonic in branch_likely_instructions: skip_next = True - row = re.sub(re_reg, "", row) - row = re.sub(re_sprel, "addr(sp)", row) + row = re.sub(re_regs, "", row) + row = re.sub(re_sprel, ",addr(sp)", row) row_with_imm = row - if mnemonic in instructions_with_address_immediates: + if mnemonic in jump_instructions: row = row.strip() row, _ = split_off_branch(row) row += "" else: - row = normalize_imms(row) + row = re.sub(re_imm, "", row) - branch_target = None + mnemonics.append(mnemonic) + rows_with_imms.append(row_with_imm) + diff_rows.append(row) + originals.append(original) + line_nums.append(line_num) if mnemonic in branch_instructions: target = row_parts[1].strip().split(",")[-1] if mnemonic in branch_likely_instructions: target = hex(int(target, 16) - 4)[2:] - branch_target = target.strip() - - output.append( - Line( - mnemonic=mnemonic, - diff_row=row, - original=original, - line_num=line_num, - branch_target=branch_target, - source_lines=source_lines, - comment=comment, - ) - ) - source_lines = [] - + branch_targets.append(target) + else: + branch_targets.append(None) if args.stop_jrra and mnemonic == "jr" and row_parts[1].strip() == "ra": break - # Cleanup whitespace, after relocation fixups have happened - output = [ - line._replace(original=cleanup_whitespace(line.original)) for line in output + # Cleanup whitespace + originals = [original.strip() for original in originals] + originals = [ + "".join(f"{o:<8s}" for o in original.split("\t")) for original in originals ] - - return output + # return diff_rows, diff_rows, line_nums + return mnemonics, diff_rows, originals, line_nums, branch_targets def format_single_line_diff(line1, line2, column_width): @@ -674,14 +535,10 @@ def normalize_imms(row): return re.sub(re_imm, "", row) -def normalize_stack(row): - return re.sub(re_sprel, "addr(sp)", row) - - def split_off_branch(line): parts = line.split(",") if len(parts) < 2: - parts = line.split(None, 1) + parts = line.split() off = len(line) - len(parts[-1]) return line[:off], line[off:] @@ -744,13 +601,20 @@ def diff_sequences(seq1, seq2): def do_diff(basedump, mydump): + asm_lines1 = basedump.split("\n") + asm_lines2 = mydump.split("\n") + output = [] # TODO: status line? # output.append(sha1sum(mydump)) - lines1 = process(basedump.split("\n")) - lines2 = process(mydump.split("\n")) + mnemonics1, asm_lines1, originals1, line_nums1, branch_targets1 = process( + asm_lines1 + ) + mnemonics2, asm_lines2, originals2, line_nums2, branch_targets2 = process( + asm_lines2 + ) sc1 = SymbolColorer(0) sc2 = SymbolColorer(0) @@ -762,160 +626,130 @@ def do_diff(basedump, mydump): bts2 = set() if args.show_branches: - for (lines, btset, sc) in [ - (lines1, bts1, sc5), - (lines2, bts2, sc6), + for (bts, btset, sc) in [ + (branch_targets1, bts1, sc5), + (branch_targets2, bts2, sc6), ]: - for line in lines: - bt = line.branch_target + for bt in bts: if bt is not None: btset.add(bt + ":") sc.color_symbol(bt + ":") - for (tag, i1, i2, j1, j2) in diff_sequences( - [line.mnemonic for line in lines1], [line.mnemonic for line in lines2] - ): - for line1, line2 in itertools.zip_longest(lines1[i1:i2], lines2[j1:j2]): + for (tag, i1, i2, j1, j2) in diff_sequences(mnemonics1, mnemonics2): + lines1 = asm_lines1[i1:i2] + lines2 = asm_lines2[j1:j2] + + for k, (line1, line2) in enumerate(itertools.zip_longest(lines1, lines2)): if tag == "replace": if line1 is None: tag = "insert" elif line2 is None: tag = "delete" - elif tag == "insert": - assert line1 is None - elif tag == "delete": - assert line2 is None + + try: + original1 = originals1[i1 + k] + line_num1 = line_nums1[i1 + k] + except: + original1 = "" + line_num1 = "" + try: + original2 = originals2[j1 + k] + line_num2 = line_nums2[j1 + k] + except: + original2 = "" + line_num2 = "" line_color1 = line_color2 = sym_color = Fore.RESET line_prefix = " " - if line1 and line2 and line1.diff_row == line2.diff_row: - if maybe_normalize_large_imms( - line1.original - ) == maybe_normalize_large_imms(line2.original): - out1 = line1.original - out2 = line2.original - elif line1.diff_row == "": - out1 = f"{Style.BRIGHT}{Fore.LIGHTBLACK_EX}{line1.original}" - out2 = f"{Style.BRIGHT}{Fore.LIGHTBLACK_EX}{line2.original}" + if line1 == line2: + if maybe_normalize_large_imms(original1) == maybe_normalize_large_imms( + original2 + ): + out1 = f"{original1}" + out2 = f"{original2}" + elif line1 == "": + out1 = f"{Style.DIM}{original1}" + out2 = f"{Style.DIM}{original2}" else: - mnemonic = line1.original.split()[0] - out1, out2 = line1.original, line2.original + mnemonic = original1.split()[0] + out1, out2 = original1, original2 branch1 = branch2 = "" - if mnemonic in instructions_with_address_immediates: - out1, branch1 = split_off_branch(line1.original) - out2, branch2 = split_off_branch(line2.original) + if mnemonic in jump_instructions: + out1, branch1 = split_off_branch(original1) + out2, branch2 = split_off_branch(original2) branchless1 = out1 branchless2 = out2 out1, out2 = color_imms(out1, out2) - - same_relative_target = False - if line1.branch_target is not None and line2.branch_target is not None: - relative_target1 = eval_line_num(line1.branch_target) - eval_line_num(line1.line_num) - relative_target2 = eval_line_num(line2.branch_target) - eval_line_num(line2.line_num) - same_relative_target = relative_target1 == relative_target2 - - if not same_relative_target: - branch1, branch2 = color_branch_imms(branch1, branch2) - + branch1, branch2 = color_branch_imms(branch1, branch2) out1 += branch1 out2 += branch2 if normalize_imms(branchless1) == normalize_imms(branchless2): - if not same_relative_target: - # only imms differences - sym_color = Fore.LIGHTBLUE_EX - line_prefix = "i" + # only imms differences + sym_color = Fore.LIGHTBLUE_EX + line_prefix = "i" else: + # regs differences and maybe imms as well + line_color1 = line_color2 = sym_color = Fore.YELLOW + line_prefix = "r" out1 = re.sub( - re_sprel, lambda s: sc3.color_symbol(s.group()), out1, + re_regs, lambda s: sc1.color_symbol(s.group()), out1 ) out2 = re.sub( - re_sprel, lambda s: sc4.color_symbol(s.group()), out2, + re_regs, lambda s: sc2.color_symbol(s.group()), out2 ) - if normalize_stack(branchless1) == normalize_stack(branchless2): - # only stack differences (luckily stack and imm - # differences can't be combined in MIPS, so we - # don't have to think about that case) - sym_color = Fore.YELLOW - line_prefix = "s" - else: - # regs differences and maybe imms as well - out1 = re.sub( - re_reg, lambda s: sc1.color_symbol(s.group()), out1 - ) - out2 = re.sub( - re_reg, lambda s: sc2.color_symbol(s.group()), out2 - ) - line_color1 = line_color2 = sym_color = Fore.YELLOW - line_prefix = "r" - elif line1 and line2: + out1 = re.sub( + re_sprel, lambda s: sc3.color_symbol(s.group()), out1 + ) + out2 = re.sub( + re_sprel, lambda s: sc4.color_symbol(s.group()), out2 + ) + out1 = f"{Fore.YELLOW}{out1}{Style.RESET_ALL}" + out2 = f"{Fore.YELLOW}{out2}{Style.RESET_ALL}" + elif tag in ["replace", "equal"]: line_prefix = "|" line_color1 = Fore.LIGHTBLUE_EX line_color2 = Fore.LIGHTBLUE_EX sym_color = Fore.LIGHTBLUE_EX - out1 = line1.original - out2 = line2.original - elif line1: + out1 = f"{Fore.LIGHTBLUE_EX}{original1}{Style.RESET_ALL}" + out2 = f"{Fore.LIGHTBLUE_EX}{original2}{Style.RESET_ALL}" + elif tag == "delete": line_prefix = "<" line_color1 = line_color2 = sym_color = Fore.RED - out1 = line1.original + out1 = f"{Fore.RED}{original1}{Style.RESET_ALL}" out2 = "" - elif line2: + elif tag == "insert": line_prefix = ">" line_color1 = line_color2 = sym_color = Fore.GREEN out1 = "" - out2 = line2.original + out2 = f"{Fore.GREEN}{original2}{Style.RESET_ALL}" in_arrow1 = " " in_arrow2 = " " out_arrow1 = "" out_arrow2 = "" + line_num1 = line_num1 if out1 else "" + line_num2 = line_num2 if out2 else "" - if args.show_branches and line1: - if line1.line_num in bts1: - in_arrow1 = sc5.color_symbol(line1.line_num, "~>") + line_color1 - if line1.branch_target is not None: - out_arrow1 = " " + sc5.color_symbol(line1.branch_target + ":", "~>") - if args.show_branches and line2: - if line2.line_num in bts2: - in_arrow2 = sc6.color_symbol(line2.line_num, "~>") + line_color2 - if line2.branch_target is not None: - out_arrow2 = " " + sc6.color_symbol(line2.branch_target + ":", "~>") - - if args.source and line2 and line2.comment: - out2 += f" {line2.comment}" - - line_num1 = line1.line_num if line1 else "" - line_num2 = line2.line_num if line2 else "" - - out1 = f"{line_color1}{line_num1} {in_arrow1} {out1}{Style.RESET_ALL}{out_arrow1}" - out2 = f"{line_color2}{line_num2} {in_arrow2} {out2}{Style.RESET_ALL}{out_arrow2}" - mid = f"{sym_color}{line_prefix} " - - if line2: - for source_line in line2.source_lines: - color = Style.DIM - # File names and function names - if source_line and source_line[0] != "|": - color += Style.BRIGHT - # Function names - if source_line.endswith("():"): - # Underline. Colorama does not provide this feature, unfortunately. - color += "\u001b[4m" - try: - source_line = cxxfilt.demangle( - source_line[:-3], external_only=False - ) - except: - pass - output.append( - format_single_line_diff( - "", - f" {color}{source_line}{Style.RESET_ALL}", - args.column_width, - ) + if args.show_branches and out1: + if line_num1 in bts1: + in_arrow1 = sc5.color_symbol(line_num1, "~>") + if branch_targets1[i1 + k] is not None: + out_arrow1 = " " + sc5.color_symbol( + branch_targets1[i1 + k] + ":", "~>" + ) + if args.show_branches and out2: + if line_num2 in bts2: + in_arrow2 = sc6.color_symbol(line_num2, "~>") + if branch_targets2[j1 + k] is not None: + out_arrow2 = " " + sc6.color_symbol( + branch_targets2[j1 + k] + ":", "~>" ) - output.append(format_single_line_diff(out1, mid + out2, args.column_width)) + if sym_color == line_color2: + line_color2 = "" + out1 = f"{line_color1}{line_num1} {in_arrow1} {out1}{Style.RESET_ALL}{out_arrow1}" + out2 = f"{sym_color}{line_prefix} {line_color2}{line_num2} {in_arrow2} {out2}{Style.RESET_ALL}{out_arrow2}" + output.append(format_single_line_diff(out1, out2, args.column_width)) return output[args.skip_lines :] @@ -1078,16 +912,14 @@ class Display: def main(): - if args.diff_elf_symbol: - make_target, basecmd, mycmd = dump_elf() - elif args.diff_obj: + if args.diff_obj: make_target, basecmd, mycmd = dump_objfile() else: make_target, basecmd, mycmd = dump_binary() if args.write_asm is not None: mydump = run_objdump(mycmd) - with open(args.write_asm, "w") as f: + with open(args.write_asm) as f: f.write(mydump) print(f"Wrote assembly to {args.write_asm}.") sys.exit(0) @@ -1148,4 +980,4 @@ def main(): display.terminate() -main() +main() \ No newline at end of file diff --git a/spec b/spec index 6efe74be0a..53cba47ad0 100644 --- a/spec +++ b/spec @@ -2543,8 +2543,7 @@ endseg beginseg name "ovl_En_Heishi4" include "build/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.o" - include "build/data/overlays/actors/z_en_heishi4.data.o" - include "build/data/overlays/actors/z_en_heishi4.reloc.o" + include "build/src/overlays/actors/ovl_En_Heishi4/ovl_En_Heishi4_reloc.o" endseg beginseg diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c index cc1bbe89e8..ec8020a5bc 100644 --- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c +++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c @@ -1,4 +1,5 @@ #include "z_en_heishi4.h" +#include "vt.h" #define FLAGS 0x00000009 @@ -9,7 +10,18 @@ void EnHeishi4_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnHeishi4_Update(Actor* thisx, GlobalContext* globalCtx); void EnHeishi4_Draw(Actor* thisx, GlobalContext* globalCtx); -/* +void func_80A56544(EnHeishi4* this, GlobalContext* globalCtx); +void func_80A5673C(EnHeishi4* this, GlobalContext* globalCtx); +void func_80A56328(EnHeishi4* this, GlobalContext* globalCtx); +void func_80A563BC(EnHeishi4* this, GlobalContext* globalCtx); +void func_80A56B40(EnHeishi4* this, GlobalContext* globalCtx); +void func_80A56614(EnHeishi4* this, GlobalContext* globalCtx); +void func_80A56874(EnHeishi4* this, GlobalContext* globalCtx); +void func_80A56900(EnHeishi4* this, GlobalContext* globalCtx); +void func_80A56994(EnHeishi4* this, GlobalContext* globalCtx); +void func_80A56A50(EnHeishi4* this, GlobalContext* globalCtx); +void func_80A56ACC(EnHeishi4* this, GlobalContext* globalCtx); + const ActorInit En_Heishi4_InitVars = { ACTOR_EN_HEISHI4, ACTORTYPE_NPC, @@ -21,35 +33,347 @@ const ActorInit En_Heishi4_InitVars = { (ActorFunc)EnHeishi4_Update, (ActorFunc)EnHeishi4_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Init.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Destroy.s") +static u32 sFaceReactionSets[] = { 6, 7 }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56328.s") +static ColliderCylinderInit sCylinderInit = { + { COLTYPE_UNK10, 0x00, 0x00, 0x39, 0x20, COLSHAPE_CYLINDER }, + { 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000000, 0x00, 0x00 }, 0x00, 0x00, 0x01 }, + { 33, 40, 0, { 0, 0, 0 } }, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A563BC.s") +extern SkeletonHeader D_0600BAC8; +extern AnimationHeader D_0600C444; +extern AnimationHeader D_06005C30; +extern AnimationHeader D_0600C6C8; +extern AnimationHeader D_0600C374; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56544.s") +void EnHeishi4_Init(Actor* thisx, GlobalContext* globalCtx) { + EnHeishi4* this = THIS; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56614.s") + Actor_SetScale(thisx, 0.01f); + this->type = thisx->params & 0xFF; + thisx->colChkInfo.mass = 0xFF; + this->pos = thisx->posRot.pos; + thisx->unk_1F = 6; + if (this->type == HEISHI4_AT_MARKET_DYING) { + this->height = 30.0f; + ActorShape_Init(&thisx->shape, 0.0f, NULL, 30.0f); + SkelAnime_Init(globalCtx, &this->skelAnime, &D_0600BAC8, &D_0600C444, &this->limbDrawTable, + &this->transitionDrawTable, 17); + } else { + this->height = 60.0f; + ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f); + SkelAnime_Init(globalCtx, &this->skelAnime, &D_0600BAC8, &D_06005C30, &this->limbDrawTable, + &this->transitionDrawTable, 17); + } + Collider_InitCylinder(globalCtx, &this->collider); + Collider_SetCylinder(globalCtx, &this->collider, thisx, &sCylinderInit); + this->collider.dim.yShift = 0; + this->collider.dim.radius = 15; + this->collider.dim.height = 70; + switch (this->type) { + case HEISHI4_AT_KAKRIKO_ENTRANCE: + case HEISHI4_AT_IMPAS_HOUSE: + this->actionFunc = func_80A56328; + break; + case HEISHI4_AT_MARKET_DYING: + this->collider.dim.radius = 28; + this->collider.dim.height = 5; + this->actionFunc = func_80A5673C; + break; + case HEISHI4_AT_MARKET_NIGHT: + this->actionFunc = func_80A56544; + break; + } + this->unk_27C = ((thisx->params >> 8) & 0xFF); + osSyncPrintf("\n\n"); + osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 兵士2セット完了! ☆☆☆☆☆ %d\n" VT_RST, thisx->params); + osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 識別完了!\t ☆☆☆☆☆ %d\n" VT_RST, this->type); + osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ メッセージ完了! ☆☆☆☆☆ %x\n\n" VT_RST, (thisx->params >> 8) & 0xF); + osSyncPrintf("\n\n"); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A5673C.s") +void EnHeishi4_Destroy(Actor* thisx, GlobalContext* globalCtx) { + EnHeishi4* this = THIS; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56874.s") + Collider_DestroyCylinder(globalCtx, &this->collider); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56900.s") +void func_80A56328(EnHeishi4* this, GlobalContext* globalCtx) { + f32 frames = SkelAnime_GetFrameCount(&D_06005C30); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56994.s") + SkelAnime_ChangeAnim(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frames, 0, -10.0f); + this->actionFunc = func_80A563BC; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56A50.s") +void func_80A563BC(EnHeishi4* this, GlobalContext* globalCtx) { + s16 reactionOffset; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56ACC.s") + this->unk_2B4 = 0; + reactionOffset = this->type - 4; + if (reactionOffset < 0) { + reactionOffset = 0; + } + if (reactionOffset >= 3) { + reactionOffset = 1; + } + if (Text_GetFaceReaction(globalCtx, sFaceReactionSets[reactionOffset]) != 0) { + this->actor.textId = Text_GetFaceReaction(globalCtx, sFaceReactionSets[reactionOffset]); + this->unk_2B4 = 1; + this->actionFunc = func_80A56B40; + } else { + if (gSaveContext.eventChkInf[8] & 1) { + this->actor.textId = 0x5065; + this->actionFunc = func_80A56B40; + return; + } + if (gSaveContext.eventChkInf[4] & 0x20) { + this->actor.textId = 0x5068; + this->actionFunc = func_80A56B40; + return; + } + if (this->type == HEISHI4_AT_IMPAS_HOUSE) { + if (this->unk_284 == 0) { + this->actor.textId = 0x5079; + } else { + this->actor.textId = 0x507A; + } + } else if (!gSaveContext.nightFlag) { + if (this->unk_284 == 0) { + this->actor.textId = 0x5063; + } else { + this->actor.textId = 0x5064; + } + } else if (this->unk_284 == 0) { + this->actor.textId = 0x5066; + } else { + this->actor.textId = 0x5067; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56B40.s") + this->actionFunc = func_80A56B40; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Update.s") +void func_80A56544(EnHeishi4* this, GlobalContext* globalCtx) { + f32 frames = SkelAnime_GetFrameCount(&D_06005C30); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/func_80A56E14.s") + SkelAnime_ChangeAnim(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frames, 0, -10.0f); + if (LINK_AGE_IN_YEARS != YEARS_CHILD) { + osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ ぎゃぁ!オトナだー ☆☆☆☆☆ \n" VT_RST); + Actor_Kill(&this->actor); + } else { + this->actionFunc = func_80A56614; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Heishi4/EnHeishi4_Draw.s") +void func_80A56614(EnHeishi4* this, GlobalContext* globalCtx) { + s16 reactionOffset; + + reactionOffset = this->type - 4; + this->unk_2B4 = 0; + if (reactionOffset < 0) { + reactionOffset = 0; + } + if (reactionOffset >= 3) { + reactionOffset = 1; + } + if (Text_GetFaceReaction(globalCtx, sFaceReactionSets[reactionOffset]) != 0) { + this->actor.textId = Text_GetFaceReaction(globalCtx, sFaceReactionSets[reactionOffset]); + this->unk_2B4 = 1; + this->actionFunc = func_80A56B40; + return; + } + if (globalCtx->sceneNum == SCENE_MIHARIGOYA) { + if (gSaveContext.nightFlag == 0) { + this->actor.textId = 0x7004; + } else { + this->actor.textId = 0x709A; + } + } else if (globalCtx->sceneNum != SCENE_MARKET_NIGHT) { + if (!gSaveContext.nightFlag) { + this->actor.textId = 0x7002; + } else { + this->actor.textId = 0x7003; + } + } else { + this->actor.textId = 0x7003; + } + + this->actionFunc = func_80A56B40; +} + +void func_80A5673C(EnHeishi4* this, GlobalContext* globalCtx) { + if (gSaveContext.eventChkInf[4] & 0x20) { + osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ マスターソード祝入手! ☆☆☆☆☆ \n" VT_RST); + Actor_Kill(&this->actor); + return; + } + this->unk_284 = 0; + if (gSaveContext.eventChkInf[8] & 1) { + if (!(gSaveContext.infTable[6] & 0x1000)) { + f32 frames = SkelAnime_GetFrameCount(&D_0600C444); + SkelAnime_ChangeAnim(&this->skelAnime, &D_0600C444, 1.0f, 0.0f, (s16)frames, 0, -10.0f); + this->actor.textId = 0x7007; + this->unk_282 = 5; + this->unk_284 = 1; + osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ デモ開始! ☆☆☆☆☆ \n" VT_RST); + } else { + this->actor.textId = 0x7008; + this->unk_282 = 6; + osSyncPrintf(VT_FGCOL(BLUE) " ☆☆☆☆☆ 返事なし ☆☆☆☆☆ \n" VT_RST); + } + this->actionFunc = func_80A56874; + } else { + Actor_Kill(&this->actor); + } +} + +void func_80A56874(EnHeishi4* this, GlobalContext* globalCtx) { + if (this->unk_284 != 0) { + SkelAnime_FrameUpdateMatrix(&this->skelAnime); + } + if (func_8002F194(&this->actor, globalCtx) != 0) { + if (this->unk_284 == 0) { + this->actionFunc = func_80A5673C; + + } else { + this->actionFunc = func_80A56900; + } + } else { + func_8002F2CC(&this->actor, globalCtx, 100.0f); + } +} + +void func_80A56900(EnHeishi4* this, GlobalContext* globalCtx) { + f32 frames = SkelAnime_GetFrameCount(&D_0600C6C8); + + SkelAnime_ChangeAnim(&this->skelAnime, &D_0600C6C8, 1.0f, 0.0f, (s16)frames, 0, -10.0f); + this->actionFunc = func_80A56994; +} + +void func_80A56994(EnHeishi4* this, GlobalContext* globalCtx) { + SkelAnime_FrameUpdateMatrix(&this->skelAnime); + func_80038290(globalCtx, &this->actor, &this->unk_260.x, &this->unk_266.x, this->actor.posRot2.pos); + if (this->unk_282 == func_8010BDBC(&globalCtx->msgCtx)) { + if (func_80106BC8(globalCtx) != 0) { + func_80106CCC(globalCtx); + gSaveContext.infTable[6] |= 0x1000; + func_8002DF54(globalCtx, NULL, 8); + this->actionFunc = func_80A56A50; + } + } +} + +void func_80A56A50(EnHeishi4* this, GlobalContext* globalCtx) { + f32 frames = SkelAnime_GetFrameCount(&D_0600C374); + this->unk_288 = frames; + SkelAnime_ChangeAnim(&this->skelAnime, &D_0600C374, 1.0f, 0.0f, frames, 2, -10.0f); + this->actionFunc = func_80A56ACC; +} + +void func_80A56ACC(EnHeishi4* this, GlobalContext* globalCtx) { + f32 currentFrame = this->skelAnime.animCurrentFrame; + + SkelAnime_FrameUpdateMatrix(&this->skelAnime); + if (this->unk_288 <= currentFrame) { + func_8002DF54(globalCtx, NULL, 7); + this->actionFunc = func_80A5673C; + } +} + +void func_80A56B40(EnHeishi4* this, GlobalContext* globalCtx) { + s16 reactionOffset; + + SkelAnime_FrameUpdateMatrix(&this->skelAnime); + reactionOffset = (this->type - 4); + if (reactionOffset < 0) { + reactionOffset = 0; + } + if (reactionOffset >= 3) { + reactionOffset = 1; + } + if (Text_GetFaceReaction(globalCtx, sFaceReactionSets[reactionOffset]) != 0) { + if (this->unk_2B4 == 0) { + if ((this->type == HEISHI4_AT_KAKRIKO_ENTRANCE) || (this->type == HEISHI4_AT_IMPAS_HOUSE)) { + this->actionFunc = func_80A563BC; + return; + } + if (this->type == HEISHI4_AT_MARKET_NIGHT) { + this->actionFunc = func_80A56614; + return; + } + } + } else { + if (this->unk_2B4 != 0) { + if ((this->type == HEISHI4_AT_KAKRIKO_ENTRANCE) || (this->type == HEISHI4_AT_IMPAS_HOUSE)) { + this->actionFunc = func_80A563BC; + return; + } + if (this->type == HEISHI4_AT_MARKET_NIGHT) { + this->actionFunc = func_80A56614; + return; + } + } + } + if (func_8002F194(&this->actor, globalCtx) != 0) { + if ((this->type == HEISHI4_AT_KAKRIKO_ENTRANCE) || (this->type == HEISHI4_AT_IMPAS_HOUSE)) { + this->unk_284 = 1; + this->actionFunc = func_80A563BC; + return; + } + if (this->type == HEISHI4_AT_MARKET_NIGHT) { + this->actionFunc = func_80A56614; + return; + } + } + func_8002F2F4(&this->actor, globalCtx); +} + +void EnHeishi4_Update(Actor* thisx, GlobalContext* globalCtx) { + EnHeishi4* this = THIS; + s32 pad; + Player* player = PLAYER; + + thisx->posRot.pos.x = this->pos.x; + thisx->posRot.pos.y = this->pos.y; + thisx->posRot.pos.z = this->pos.z; + Actor_SetHeight(thisx, this->height); + if (this->type != HEISHI4_AT_MARKET_DYING) { + this->unk_28C.unk_18 = player->actor.posRot.pos; + if (LINK_IS_CHILD) { + this->unk_28C.unk_18.y = (player->actor.posRot.pos.y - 10.0f); + } + func_80034A14(thisx, &this->unk_28C, 2, 4); + this->unk_260 = this->unk_28C.unk_08; + this->unk_266 = this->unk_28C.unk_0E; + } + this->unk_27E += 1; + this->actionFunc(this, globalCtx); + Actor_MoveForward(thisx); + func_8002E4B4(globalCtx, thisx, 10.0f, 10.0f, 30.0f, 0x1D); + Collider_CylinderUpdate(&this->actor, &this->collider); + CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider); +} + +s32 EnHeishi_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, + Actor* thisx) { + EnHeishi4* this = THIS; + + if (limbIndex == 9) { + rot->x += this->unk_266.y; + } + if (limbIndex == 16) { + rot->x += this->unk_260.y; + rot->z += this->unk_260.z; + } + return 0; +} + +void EnHeishi4_Draw(Actor* thisx, GlobalContext* globalCtx) { + EnHeishi4* this = THIS; + + func_80093D18(globalCtx->state.gfxCtx); + SkelAnime_Draw(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, EnHeishi_OverrideLimbDraw, NULL, + &this->actor); +} diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h index f9b6a2a929..c4e69dfff0 100644 --- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h +++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.h @@ -4,11 +4,37 @@ #include #include +typedef enum { + /* 0x00 */ HEISHI4_AT_KAKRIKO_ENTRANCE, + /* 0x04 */ HEISHI4_AT_IMPAS_HOUSE = 4, + /* 0x07 */ HEISHI4_AT_MARKET_DYING = 7, + /* 0x08 */ HEISHI4_AT_MARKET_NIGHT +} Heishi4Type; + struct EnHeishi4; +typedef void (*EnHeishi4ActionFunc)(struct EnHeishi4*, GlobalContext*); + typedef struct EnHeishi4 { /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x1BC]; + /* 0x014C */ SkelAnime skelAnime; + /* 0x0190 */ Vec3s limbDrawTable[17]; + /* 0x01F6 */ Vec3s transitionDrawTable[17]; + /* 0x025C */ EnHeishi4ActionFunc actionFunc; + /* 0x0260 */ Vec3s unk_260; + /* 0x0266 */ Vec3s unk_266; + /* 0x026C */ Vec3f pos; + /* 0x0278 */ f32 height; + /* 0x027C */ s16 unk_27C; + /* 0x027E */ s16 unk_27E; + /* 0x0280 */ s16 type; + /* 0x0282 */ s16 unk_282; + /* 0x0284 */ s16 unk_284; + /* 0x0288 */ f32 unk_288; + /* 0x028C */ struct_80034A14_arg1 unk_28C; + /* 0x02B4 */ u8 unk_2B4; + /* 0x02B6 */ char unk_2B6[7]; + /* 0x02BC */ ColliderCylinder collider; } EnHeishi4; // size = 0x0308 extern const ActorInit En_Heishi4_InitVars; diff --git a/undefined_syms.txt b/undefined_syms.txt index 644671f925..d49dae1f07 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -719,6 +719,13 @@ D_0600BAC8 = 0x0600BAC8; D_06005C30 = 0x06005C30; D_06005880 = 0x06005880; +// z_en_heishi4 +D_0600BAC8 = 0x0600BAC8; +D_0600C444 = 0x0600C444; +D_06005C30 = 0x06005C30; +D_0600C6C8 = 0x0600C6C8; +D_0600C374 = 0x0600C374; + // z_en_floormas D_06002158 = 0x06002158; D_060039B0 = 0x060039B0;