1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-29 03:34:07 +00:00

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
This commit is contained in:
louist103 2020-09-05 10:18:02 -04:00 committed by GitHub
parent bb1aacbd0b
commit eef2a005b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 546 additions and 1445 deletions

View file

@ -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

View file

@ -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

View file

@ -1,182 +0,0 @@
.rdata
glabel D_80A56F30
.asciz "\n\n"
.balign 4
glabel D_80A56F34
.asciz "\x1b[32m %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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

504
diff.py
View file

@ -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"(?<!sp, )#-?(0x[0-9a-fA-F]+|[0-9]+)\b")
arch_flags = []
forbidden = set(string.ascii_letters + "_")
branch_likely_instructions = set()
branch_instructions = {"bl", "b", "b.eq", "b.ne", "b.cs", "b.hs", "b.cc", "b.lo", "b.mi", "b.pl", "b.vs", "b.vc", "b.hi", "b.ls", "b.ge", "b.lt", "b.gt", "b.le", "cbz", "cbnz", "tbz", "tbnz"}
instructions_with_address_immediates = branch_instructions.union({"adrp"})
else:
fail("Unknown architecture.")
re_int = re.compile(r"[0-9]+")
re_comments = 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 != "<delay-slot>":
# 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] != '<delay-slot>':
# 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 = "<delay-slot>"
if mnemonic in branch_likely_instructions:
skip_next = True
row = re.sub(re_reg, "<reg>", row)
row = re.sub(re_sprel, "addr(sp)", row)
row = re.sub(re_regs, "<reg>", 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 += "<imm>"
else:
row = normalize_imms(row)
row = re.sub(re_imm, "<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, "<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 == "<delay-slot>":
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 == "<delay-slot>":
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)

3
spec
View file

@ -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

View file

@ -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);
}

View file

@ -4,11 +4,37 @@
#include <ultra64.h>
#include <global.h>
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;

View file

@ -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;