1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-27 07:07:09 +00:00

z_skin OK and z_skin_awb decomped (one barely nonmatching) (#632)

* skin_awb some functions done

* more matches

* stuff

* matching skins

* closer?

* less skin

* skin

* format

* one thing

* merge actor

Co-authored-by: gns <adamkiddle23@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
This commit is contained in:
petrie911 2021-02-12 13:41:34 -06:00 committed by GitHub
parent a30b5bbb26
commit 5f552a369c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 255 additions and 880 deletions

View file

@ -1,320 +0,0 @@
.rdata
glabel D_80140680
.asciz "../z_skin.c"
.balign 4
glabel D_8014068C
.asciz "../z_skin.c"
.balign 4
.late_rodata
glabel D_801406E0
.float 0.01
.text
glabel func_800A598C
/* B1CB2C 800A598C 27BDFEE8 */ addiu $sp, $sp, -0x118
/* B1CB30 800A5990 AFB10054 */ sw $s1, 0x54($sp)
/* B1CB34 800A5994 00C08825 */ move $s1, $a2
/* B1CB38 800A5998 AFB00050 */ sw $s0, 0x50($sp)
/* B1CB3C 800A599C 00A08025 */ move $s0, $a1
/* B1CB40 800A59A0 AFBF0074 */ sw $ra, 0x74($sp)
/* B1CB44 800A59A4 AFA40118 */ sw $a0, 0x118($sp)
/* B1CB48 800A59A8 AFA70124 */ sw $a3, 0x124($sp)
/* B1CB4C 800A59AC 3C068014 */ lui $a2, %hi(D_80140680) # $a2, 0x8014
/* B1CB50 800A59B0 AFBE0070 */ sw $fp, 0x70($sp)
/* B1CB54 800A59B4 AFB7006C */ sw $s7, 0x6c($sp)
/* B1CB58 800A59B8 AFB60068 */ sw $s6, 0x68($sp)
/* B1CB5C 800A59BC AFB50064 */ sw $s5, 0x64($sp)
/* B1CB60 800A59C0 AFB40060 */ sw $s4, 0x60($sp)
/* B1CB64 800A59C4 AFB3005C */ sw $s3, 0x5c($sp)
/* B1CB68 800A59C8 AFB20058 */ sw $s2, 0x58($sp)
/* B1CB6C 800A59CC F7BE0048 */ sdc1 $f30, 0x48($sp)
/* B1CB70 800A59D0 F7BC0040 */ sdc1 $f28, 0x40($sp)
/* B1CB74 800A59D4 F7BA0038 */ sdc1 $f26, 0x38($sp)
/* B1CB78 800A59D8 F7B80030 */ sdc1 $f24, 0x30($sp)
/* B1CB7C 800A59DC F7B60028 */ sdc1 $f22, 0x28($sp)
/* B1CB80 800A59E0 F7B40020 */ sdc1 $f20, 0x20($sp)
/* B1CB84 800A59E4 24C60680 */ addiu $a2, %lo(D_80140680) # addiu $a2, $a2, 0x680
/* B1CB88 800A59E8 240700FE */ li $a3, 254
/* B1CB8C 800A59EC 8FA50118 */ lw $a1, 0x118($sp)
/* B1CB90 800A59F0 0C031AB1 */ jal Graph_OpenDisps
/* B1CB94 800A59F4 27A400B8 */ addiu $a0, $sp, 0xb8
/* B1CB98 800A59F8 8E0E0000 */ lw $t6, ($s0)
/* B1CB9C 800A59FC 3C0A8016 */ lui $t2, %hi(gSegments) # $t2, 0x8016
/* B1CBA0 800A5A00 254A6FA8 */ addiu $t2, %lo(gSegments) # addiu $t2, $t2, 0x6fa8
/* B1CBA4 800A5A04 8DC30000 */ lw $v1, ($t6)
/* B1CBA8 800A5A08 3C0B00FF */ lui $t3, (0x00FFFFFF >> 16) # lui $t3, 0xff
/* B1CBAC 800A5A0C 356BFFFF */ ori $t3, (0x00FFFFFF & 0xFFFF) # ori $t3, $t3, 0xffff
/* B1CBB0 800A5A10 00037900 */ sll $t7, $v1, 4
/* B1CBB4 800A5A14 000FC702 */ srl $t8, $t7, 0x1c
/* B1CBB8 800A5A18 0018C880 */ sll $t9, $t8, 2
/* B1CBBC 800A5A1C 01597021 */ addu $t6, $t2, $t9
/* B1CBC0 800A5A20 8DCF0000 */ lw $t7, ($t6)
/* B1CBC4 800A5A24 006BC024 */ and $t8, $v1, $t3
/* B1CBC8 800A5A28 3C0C8000 */ lui $t4, 0x8000
/* B1CBCC 800A5A2C 01F8C821 */ addu $t9, $t7, $t8
/* B1CBD0 800A5A30 032C4021 */ addu $t0, $t9, $t4
/* B1CBD4 800A5A34 00117080 */ sll $t6, $s1, 2
/* B1CBD8 800A5A38 010E7821 */ addu $t7, $t0, $t6
/* B1CBDC 800A5A3C 8DE50000 */ lw $a1, ($t7)
/* B1CBE0 800A5A40 3C128016 */ lui $s2, %hi(D_801600C0) # $s2, 0x8016
/* B1CBE4 800A5A44 265200C0 */ addiu $s2, %lo(D_801600C0) # addiu $s2, $s2, 0xc0
/* B1CBE8 800A5A48 0005C900 */ sll $t9, $a1, 4
/* B1CBEC 800A5A4C 00197702 */ srl $t6, $t9, 0x1c
/* B1CBF0 800A5A50 000E7880 */ sll $t7, $t6, 2
/* B1CBF4 800A5A54 014FC821 */ addu $t9, $t2, $t7
/* B1CBF8 800A5A58 8F2E0000 */ lw $t6, ($t9)
/* B1CBFC 800A5A5C 00ABC024 */ and $t8, $a1, $t3
/* B1CC00 800A5A60 27B700DC */ addiu $s7, $sp, 0xdc
/* B1CC04 800A5A64 030E7821 */ addu $t7, $t8, $t6
/* B1CC08 800A5A68 01ECC821 */ addu $t9, $t7, $t4
/* B1CC0C 800A5A6C 8F26000C */ lw $a2, 0xc($t9)
/* B1CC10 800A5A70 27B500D0 */ addiu $s5, $sp, 0xd0
/* B1CC14 800A5A74 27B40088 */ addiu $s4, $sp, 0x88
/* B1CC18 800A5A78 00067100 */ sll $t6, $a2, 4
/* B1CC1C 800A5A7C 000E7F02 */ srl $t7, $t6, 0x1c
/* B1CC20 800A5A80 000FC880 */ sll $t9, $t7, 2
/* B1CC24 800A5A84 01597021 */ addu $t6, $t2, $t9
/* B1CC28 800A5A88 8DCF0000 */ lw $t7, ($t6)
/* B1CC2C 800A5A8C 00CBC024 */ and $t8, $a2, $t3
/* B1CC30 800A5A90 030FC821 */ addu $t9, $t8, $t7
/* B1CC34 800A5A94 032C2021 */ addu $a0, $t9, $t4
/* B1CC38 800A5A98 8C870004 */ lw $a3, 4($a0)
/* B1CC3C 800A5A9C 00077100 */ sll $t6, $a3, 4
/* B1CC40 800A5AA0 000EC702 */ srl $t8, $t6, 0x1c
/* B1CC44 800A5AA4 00187880 */ sll $t7, $t8, 2
/* B1CC48 800A5AA8 014FC821 */ addu $t9, $t2, $t7
/* B1CC4C 800A5AAC 8F2E0000 */ lw $t6, ($t9)
/* B1CC50 800A5AB0 00EBC024 */ and $t8, $a3, $t3
/* B1CC54 800A5AB4 8E190048 */ lw $t9, 0x48($s0)
/* B1CC58 800A5AB8 01D87821 */ addu $t7, $t6, $t8
/* B1CC5C 800A5ABC 00117080 */ sll $t6, $s1, 2
/* B1CC60 800A5AC0 01D17023 */ subu $t6, $t6, $s1
/* B1CC64 800A5AC4 000E7080 */ sll $t6, $t6, 2
/* B1CC68 800A5AC8 032E6821 */ addu $t5, $t9, $t6
/* B1CC6C 800A5ACC 91B80000 */ lbu $t8, ($t5)
/* B1CC70 800A5AD0 01ECB021 */ addu $s6, $t7, $t4
/* B1CC74 800A5AD4 00187880 */ sll $t7, $t8, 2
/* B1CC78 800A5AD8 01AFC821 */ addu $t9, $t5, $t7
/* B1CC7C 800A5ADC 8F2E0004 */ lw $t6, 4($t9)
/* B1CC80 800A5AE0 AFAE00EC */ sw $t6, 0xec($sp)
/* B1CC84 800A5AE4 94890002 */ lhu $t1, 2($a0)
/* B1CC88 800A5AE8 0009C100 */ sll $t8, $t1, 4
/* B1CC8C 800A5AEC 0316F821 */ addu $ra, $t8, $s6
/* B1CC90 800A5AF0 02DF082B */ sltu $at, $s6, $ra
/* B1CC94 800A5AF4 102000A2 */ beqz $at, .L800A5D80
/* B1CC98 800A5AF8 3C018014 */ lui $at, %hi(D_801406E0)
/* B1CC9C 800A5AFC 4480F000 */ mtc1 $zero, $f30
/* B1CCA0 800A5B00 C43C06E0 */ lwc1 $f28, %lo(D_801406E0)($at)
/* B1CCA4 800A5B04 AFAD0100 */ sw $t5, 0x100($sp)
/* B1CCA8 800A5B08 AFBF0080 */ sw $ra, 0x80($sp)
/* B1CCAC 800A5B0C 8EC20008 */ lw $v0, 8($s6)
.L800A5B10:
/* B1CCB0 800A5B10 3C068016 */ lui $a2, %hi(gSegments) # $a2, 0x8016
/* B1CCB4 800A5B14 24C66FA8 */ addiu $a2, %lo(gSegments) # addiu $a2, $a2, 0x6fa8
/* B1CCB8 800A5B18 00027900 */ sll $t7, $v0, 4
/* B1CCBC 800A5B1C 000FCF02 */ srl $t9, $t7, 0x1c
/* B1CCC0 800A5B20 00197080 */ sll $t6, $t9, 2
/* B1CCC4 800A5B24 00CEC021 */ addu $t8, $a2, $t6
/* B1CCC8 800A5B28 8F0F0000 */ lw $t7, ($t8)
/* B1CCCC 800A5B2C 3C0700FF */ lui $a3, (0x00FFFFFF >> 16) # lui $a3, 0xff
/* B1CCD0 800A5B30 8EC3000C */ lw $v1, 0xc($s6)
/* B1CCD4 800A5B34 34E7FFFF */ ori $a3, (0x00FFFFFF & 0xFFFF) # ori $a3, $a3, 0xffff
/* B1CCD8 800A5B38 0047C824 */ and $t9, $v0, $a3
/* B1CCDC 800A5B3C 01F97021 */ addu $t6, $t7, $t9
/* B1CCE0 800A5B40 0003C100 */ sll $t8, $v1, 4
/* B1CCE4 800A5B44 3C088000 */ li $t0, 0x80000000 # 0.000000
/* B1CCE8 800A5B48 00187F02 */ srl $t7, $t8, 0x1c
/* B1CCEC 800A5B4C 01C8F021 */ addu $fp, $t6, $t0
/* B1CCF0 800A5B50 000FC880 */ sll $t9, $t7, 2
/* B1CCF4 800A5B54 00D97021 */ addu $t6, $a2, $t9
/* B1CCF8 800A5B58 8DD80000 */ lw $t8, ($t6)
/* B1CCFC 800A5B5C 96C40002 */ lhu $a0, 2($s6)
/* B1CD00 800A5B60 00677824 */ and $t7, $v1, $a3
/* B1CD04 800A5B64 24050001 */ li $a1, 1
/* B1CD08 800A5B68 030FC821 */ addu $t9, $t8, $t7
/* B1CD0C 800A5B6C 14850018 */ bne $a0, $a1, .L800A5BD0
/* B1CD10 800A5B70 03289821 */ addu $s3, $t9, $t0
/* B1CD14 800A5B74 866E0002 */ lh $t6, 2($s3)
/* B1CD18 800A5B78 27A500AC */ addiu $a1, $sp, 0xac
/* B1CD1C 800A5B7C 02E03025 */ move $a2, $s7
/* B1CD20 800A5B80 448E2000 */ mtc1 $t6, $f4
/* B1CD24 800A5B84 00000000 */ nop
/* B1CD28 800A5B88 468021A0 */ cvt.s.w $f6, $f4
/* B1CD2C 800A5B8C E7A600AC */ swc1 $f6, 0xac($sp)
/* B1CD30 800A5B90 86780004 */ lh $t8, 4($s3)
/* B1CD34 800A5B94 44984000 */ mtc1 $t8, $f8
/* B1CD38 800A5B98 00000000 */ nop
/* B1CD3C 800A5B9C 468042A0 */ cvt.s.w $f10, $f8
/* B1CD40 800A5BA0 E7AA00B0 */ swc1 $f10, 0xb0($sp)
/* B1CD44 800A5BA4 866F0006 */ lh $t7, 6($s3)
/* B1CD48 800A5BA8 448F8000 */ mtc1 $t7, $f16
/* B1CD4C 800A5BAC 00000000 */ nop
/* B1CD50 800A5BB0 468084A0 */ cvt.s.w $f18, $f16
/* B1CD54 800A5BB4 E7B200B4 */ swc1 $f18, 0xb4($sp)
/* B1CD58 800A5BB8 92790000 */ lbu $t9, ($s3)
/* B1CD5C 800A5BBC 00197180 */ sll $t6, $t9, 6
/* B1CD60 800A5BC0 0C029BBD */ jal SkinMatrix_Vec3fMtxFMultXYZ
/* B1CD64 800A5BC4 024E2021 */ addu $a0, $s2, $t6
/* B1CD68 800A5BC8 1000005B */ b .L800A5D38
/* B1CD6C 800A5BCC 96CE0004 */ lhu $t6, 4($s6)
.L800A5BD0:
/* B1CD70 800A5BD0 8FB80124 */ lw $t8, 0x124($sp)
/* B1CD74 800A5BD4 02608025 */ move $s0, $s3
/* B1CD78 800A5BD8 5705001E */ bnel $t8, $a1, .L800A5C54
/* B1CD7C 800A5BDC 0004C080 */ sll $t8, $a0, 2
/* B1CD80 800A5BE0 96CF0004 */ lhu $t7, 4($s6)
/* B1CD84 800A5BE4 27A500A0 */ addiu $a1, $sp, 0xa0
/* B1CD88 800A5BE8 02E03025 */ move $a2, $s7
/* B1CD8C 800A5BEC 000FC880 */ sll $t9, $t7, 2
/* B1CD90 800A5BF0 032FC821 */ addu $t9, $t9, $t7
/* B1CD94 800A5BF4 0019C840 */ sll $t9, $t9, 1
/* B1CD98 800A5BF8 03338021 */ addu $s0, $t9, $s3
/* B1CD9C 800A5BFC 860E0002 */ lh $t6, 2($s0)
/* B1CDA0 800A5C00 448E2000 */ mtc1 $t6, $f4
/* B1CDA4 800A5C04 00000000 */ nop
/* B1CDA8 800A5C08 468021A0 */ cvt.s.w $f6, $f4
/* B1CDAC 800A5C0C E7A600A0 */ swc1 $f6, 0xa0($sp)
/* B1CDB0 800A5C10 86180004 */ lh $t8, 4($s0)
/* B1CDB4 800A5C14 44984000 */ mtc1 $t8, $f8
/* B1CDB8 800A5C18 00000000 */ nop
/* B1CDBC 800A5C1C 468042A0 */ cvt.s.w $f10, $f8
/* B1CDC0 800A5C20 E7AA00A4 */ swc1 $f10, 0xa4($sp)
/* B1CDC4 800A5C24 860F0006 */ lh $t7, 6($s0)
/* B1CDC8 800A5C28 448F8000 */ mtc1 $t7, $f16
/* B1CDCC 800A5C2C 00000000 */ nop
/* B1CDD0 800A5C30 468084A0 */ cvt.s.w $f18, $f16
/* B1CDD4 800A5C34 E7B200A8 */ swc1 $f18, 0xa8($sp)
/* B1CDD8 800A5C38 92190000 */ lbu $t9, ($s0)
/* B1CDDC 800A5C3C 00197180 */ sll $t6, $t9, 6
/* B1CDE0 800A5C40 0C029BBD */ jal SkinMatrix_Vec3fMtxFMultXYZ
/* B1CDE4 800A5C44 024E2021 */ addu $a0, $s2, $t6
/* B1CDE8 800A5C48 1000003B */ b .L800A5D38
/* B1CDEC 800A5C4C 96CE0004 */ lhu $t6, 4($s6)
/* B1CDF0 800A5C50 0004C080 */ sll $t8, $a0, 2
.L800A5C54:
/* B1CDF4 800A5C54 0304C021 */ addu $t8, $t8, $a0
/* B1CDF8 800A5C58 0018C040 */ sll $t8, $t8, 1
/* B1CDFC 800A5C5C 03138821 */ addu $s1, $t8, $s3
/* B1CE00 800A5C60 0271082B */ sltu $at, $s3, $s1
/* B1CE04 800A5C64 4600F586 */ mov.s $f22, $f30
/* B1CE08 800A5C68 4600F606 */ mov.s $f24, $f30
/* B1CE0C 800A5C6C 1020002E */ beqz $at, .L800A5D28
/* B1CE10 800A5C70 4600F686 */ mov.s $f26, $f30
.L800A5C74:
/* B1CE14 800A5C74 920F0008 */ lbu $t7, 8($s0)
/* B1CE18 800A5C78 3C014F80 */ li $at, 0x4F800000 # 0.000000
/* B1CE1C 800A5C7C 448F2000 */ mtc1 $t7, $f4
/* B1CE20 800A5C80 05E10004 */ bgez $t7, .L800A5C94
/* B1CE24 800A5C84 468021A0 */ cvt.s.w $f6, $f4
/* B1CE28 800A5C88 44814000 */ mtc1 $at, $f8
/* B1CE2C 800A5C8C 00000000 */ nop
/* B1CE30 800A5C90 46083180 */ add.s $f6, $f6, $f8
.L800A5C94:
/* B1CE34 800A5C94 86190002 */ lh $t9, 2($s0)
/* B1CE38 800A5C98 461C3502 */ mul.s $f20, $f6, $f28
/* B1CE3C 800A5C9C 02802825 */ move $a1, $s4
/* B1CE40 800A5CA0 44995000 */ mtc1 $t9, $f10
/* B1CE44 800A5CA4 02A03025 */ move $a2, $s5
/* B1CE48 800A5CA8 46805420 */ cvt.s.w $f16, $f10
/* B1CE4C 800A5CAC E7B00088 */ swc1 $f16, 0x88($sp)
/* B1CE50 800A5CB0 860E0004 */ lh $t6, 4($s0)
/* B1CE54 800A5CB4 448E9000 */ mtc1 $t6, $f18
/* B1CE58 800A5CB8 00000000 */ nop
/* B1CE5C 800A5CBC 46809120 */ cvt.s.w $f4, $f18
/* B1CE60 800A5CC0 E7A4008C */ swc1 $f4, 0x8c($sp)
/* B1CE64 800A5CC4 86180006 */ lh $t8, 6($s0)
/* B1CE68 800A5CC8 44984000 */ mtc1 $t8, $f8
/* B1CE6C 800A5CCC 00000000 */ nop
/* B1CE70 800A5CD0 468041A0 */ cvt.s.w $f6, $f8
/* B1CE74 800A5CD4 E7A60090 */ swc1 $f6, 0x90($sp)
/* B1CE78 800A5CD8 920F0000 */ lbu $t7, ($s0)
/* B1CE7C 800A5CDC 000FC980 */ sll $t9, $t7, 6
/* B1CE80 800A5CE0 0C029BBD */ jal SkinMatrix_Vec3fMtxFMultXYZ
/* B1CE84 800A5CE4 02592021 */ addu $a0, $s2, $t9
/* B1CE88 800A5CE8 C7A000D0 */ lwc1 $f0, 0xd0($sp)
/* B1CE8C 800A5CEC C7A200D4 */ lwc1 $f2, 0xd4($sp)
/* B1CE90 800A5CF0 C7AC00D8 */ lwc1 $f12, 0xd8($sp)
/* B1CE94 800A5CF4 46140002 */ mul.s $f0, $f0, $f20
/* B1CE98 800A5CF8 2610000A */ addiu $s0, $s0, 0xa
/* B1CE9C 800A5CFC 0211082B */ sltu $at, $s0, $s1
/* B1CEA0 800A5D00 46141082 */ mul.s $f2, $f2, $f20
/* B1CEA4 800A5D04 00000000 */ nop
/* B1CEA8 800A5D08 46146302 */ mul.s $f12, $f12, $f20
/* B1CEAC 800A5D0C E7A000D0 */ swc1 $f0, 0xd0($sp)
/* B1CEB0 800A5D10 4600D680 */ add.s $f26, $f26, $f0
/* B1CEB4 800A5D14 E7A200D4 */ swc1 $f2, 0xd4($sp)
/* B1CEB8 800A5D18 4602C600 */ add.s $f24, $f24, $f2
/* B1CEBC 800A5D1C E7AC00D8 */ swc1 $f12, 0xd8($sp)
/* B1CEC0 800A5D20 1420FFD4 */ bnez $at, .L800A5C74
/* B1CEC4 800A5D24 460CB580 */ add.s $f22, $f22, $f12
.L800A5D28:
/* B1CEC8 800A5D28 E7BA00DC */ swc1 $f26, 0xdc($sp)
/* B1CECC 800A5D2C E7B800E0 */ swc1 $f24, 0xe0($sp)
/* B1CED0 800A5D30 E7B600E4 */ swc1 $f22, 0xe4($sp)
/* B1CED4 800A5D34 96CE0004 */ lhu $t6, 4($s6)
.L800A5D38:
/* B1CED8 800A5D38 03C02825 */ move $a1, $fp
/* B1CEDC 800A5D3C 02C03025 */ move $a2, $s6
/* B1CEE0 800A5D40 000EC080 */ sll $t8, $t6, 2
/* B1CEE4 800A5D44 030EC021 */ addu $t8, $t8, $t6
/* B1CEE8 800A5D48 0018C040 */ sll $t8, $t8, 1
/* B1CEEC 800A5D4C 02787821 */ addu $t7, $s3, $t8
/* B1CEF0 800A5D50 91F90000 */ lbu $t9, ($t7)
/* B1CEF4 800A5D54 AFB70010 */ sw $s7, 0x10($sp)
/* B1CEF8 800A5D58 8FA700EC */ lw $a3, 0xec($sp)
/* B1CEFC 800A5D5C 00197180 */ sll $t6, $t9, 6
/* B1CF00 800A5D60 0C0295F0 */ jal func_800A57C0
/* B1CF04 800A5D64 024E2021 */ addu $a0, $s2, $t6
/* B1CF08 800A5D68 8FB80080 */ lw $t8, 0x80($sp)
/* B1CF0C 800A5D6C 26D60010 */ addiu $s6, $s6, 0x10
/* B1CF10 800A5D70 02D8082B */ sltu $at, $s6, $t8
/* B1CF14 800A5D74 5420FF66 */ bnezl $at, .L800A5B10
/* B1CF18 800A5D78 8EC20008 */ lw $v0, 8($s6)
/* B1CF1C 800A5D7C 8FAD0100 */ lw $t5, 0x100($sp)
.L800A5D80:
/* B1CF20 800A5D80 8FA50118 */ lw $a1, 0x118($sp)
/* B1CF24 800A5D84 3C19DB06 */ lui $t9, (0xDB060020 >> 16) # lui $t9, 0xdb06
/* B1CF28 800A5D88 37390020 */ ori $t9, (0xDB060020 & 0xFFFF) # ori $t9, $t9, 0x20
/* B1CF2C 800A5D8C 8CA302C0 */ lw $v1, 0x2c0($a1)
/* B1CF30 800A5D90 3C068014 */ lui $a2, %hi(D_8014068C) # $a2, 0x8014
/* B1CF34 800A5D94 24C6068C */ addiu $a2, %lo(D_8014068C) # addiu $a2, $a2, 0x68c
/* B1CF38 800A5D98 246F0008 */ addiu $t7, $v1, 8
/* B1CF3C 800A5D9C ACAF02C0 */ sw $t7, 0x2c0($a1)
/* B1CF40 800A5DA0 AC790000 */ sw $t9, ($v1)
/* B1CF44 800A5DA4 91AE0000 */ lbu $t6, ($t5)
/* B1CF48 800A5DA8 27A400B8 */ addiu $a0, $sp, 0xb8
/* B1CF4C 800A5DAC 000EC080 */ sll $t8, $t6, 2
/* B1CF50 800A5DB0 01B87821 */ addu $t7, $t5, $t8
/* B1CF54 800A5DB4 8DF90004 */ lw $t9, 4($t7)
/* B1CF58 800A5DB8 24180001 */ li $t8, 1
/* B1CF5C 800A5DBC AC790004 */ sw $t9, 4($v1)
/* B1CF60 800A5DC0 91AE0000 */ lbu $t6, ($t5)
/* B1CF64 800A5DC4 55C00004 */ bnezl $t6, .L800A5DD8
/* B1CF68 800A5DC8 A1A00000 */ sb $zero, ($t5)
/* B1CF6C 800A5DCC 10000002 */ b .L800A5DD8
/* B1CF70 800A5DD0 A1B80000 */ sb $t8, ($t5)
/* B1CF74 800A5DD4 A1A00000 */ sb $zero, ($t5)
.L800A5DD8:
/* B1CF78 800A5DD8 0C031AD5 */ jal Graph_CloseDisps
/* B1CF7C 800A5DDC 24070158 */ li $a3, 344
/* B1CF80 800A5DE0 8FBF0074 */ lw $ra, 0x74($sp)
/* B1CF84 800A5DE4 D7B40020 */ ldc1 $f20, 0x20($sp)
/* B1CF88 800A5DE8 D7B60028 */ ldc1 $f22, 0x28($sp)
/* B1CF8C 800A5DEC D7B80030 */ ldc1 $f24, 0x30($sp)
/* B1CF90 800A5DF0 D7BA0038 */ ldc1 $f26, 0x38($sp)
/* B1CF94 800A5DF4 D7BC0040 */ ldc1 $f28, 0x40($sp)
/* B1CF98 800A5DF8 D7BE0048 */ ldc1 $f30, 0x48($sp)
/* B1CF9C 800A5DFC 8FB00050 */ lw $s0, 0x50($sp)
/* B1CFA0 800A5E00 8FB10054 */ lw $s1, 0x54($sp)
/* B1CFA4 800A5E04 8FB20058 */ lw $s2, 0x58($sp)
/* B1CFA8 800A5E08 8FB3005C */ lw $s3, 0x5c($sp)
/* B1CFAC 800A5E0C 8FB40060 */ lw $s4, 0x60($sp)
/* B1CFB0 800A5E10 8FB50064 */ lw $s5, 0x64($sp)
/* B1CFB4 800A5E14 8FB60068 */ lw $s6, 0x68($sp)
/* B1CFB8 800A5E18 8FB7006C */ lw $s7, 0x6c($sp)
/* B1CFBC 800A5E1C 8FBE0070 */ lw $fp, 0x70($sp)
/* B1CFC0 800A5E20 03E00008 */ jr $ra
/* B1CFC4 800A5E24 27BD0118 */ addiu $sp, $sp, 0x118

View file

@ -1,126 +0,0 @@
glabel func_800A6460
/* B1D600 800A6460 27BDFFB8 */ addiu $sp, $sp, -0x48
/* B1D604 800A6464 AFB30014 */ sw $s3, 0x14($sp)
/* B1D608 800A6468 AFB20010 */ sw $s2, 0x10($sp)
/* B1D60C 800A646C AFB1000C */ sw $s1, 0xc($sp)
/* B1D610 800A6470 AFB00008 */ sw $s0, 8($sp)
/* B1D614 800A6474 AFA40048 */ sw $a0, 0x48($sp)
/* B1D618 800A6478 8CAE0000 */ lw $t6, ($a1)
/* B1D61C 800A647C 3C048016 */ lui $a0, %hi(gSegments) # $a0, 0x8016
/* B1D620 800A6480 24846FA8 */ addiu $a0, %lo(gSegments) # addiu $a0, $a0, 0x6fa8
/* B1D624 800A6484 8DCB0000 */ lw $t3, ($t6)
/* B1D628 800A6488 3C0700FF */ lui $a3, (0x00FFFFFF >> 16) # lui $a3, 0xff
/* B1D62C 800A648C 34E7FFFF */ ori $a3, (0x00FFFFFF & 0xFFFF) # ori $a3, $a3, 0xffff
/* B1D630 800A6490 000B7900 */ sll $t7, $t3, 4
/* B1D634 800A6494 000FC702 */ srl $t8, $t7, 0x1c
/* B1D638 800A6498 0018C880 */ sll $t9, $t8, 2
/* B1D63C 800A649C 00997021 */ addu $t6, $a0, $t9
/* B1D640 800A64A0 8DCF0000 */ lw $t7, ($t6)
/* B1D644 800A64A4 0167C024 */ and $t8, $t3, $a3
/* B1D648 800A64A8 3C088000 */ lui $t0, 0x8000
/* B1D64C 800A64AC 01F8C821 */ addu $t9, $t7, $t8
/* B1D650 800A64B0 03285021 */ addu $t2, $t9, $t0
/* B1D654 800A64B4 00067080 */ sll $t6, $a2, 2
/* B1D658 800A64B8 014E7821 */ addu $t7, $t2, $t6
/* B1D65C 800A64BC 8DEC0000 */ lw $t4, ($t7)
/* B1D660 800A64C0 2412000A */ li $s2, 10
/* B1D664 800A64C4 24130008 */ li $s3, 8
/* B1D668 800A64C8 000CC900 */ sll $t9, $t4, 4
/* B1D66C 800A64CC 00197702 */ srl $t6, $t9, 0x1c
/* B1D670 800A64D0 000E7880 */ sll $t7, $t6, 2
/* B1D674 800A64D4 008FC821 */ addu $t9, $a0, $t7
/* B1D678 800A64D8 8F2E0000 */ lw $t6, ($t9)
/* B1D67C 800A64DC 0187C024 */ and $t8, $t4, $a3
/* B1D680 800A64E0 00004825 */ move $t1, $zero
/* B1D684 800A64E4 030E7821 */ addu $t7, $t8, $t6
/* B1D688 800A64E8 01E8C821 */ addu $t9, $t7, $t0
/* B1D68C 800A64EC 8F2D000C */ lw $t5, 0xc($t9)
/* B1D690 800A64F0 000D7100 */ sll $t6, $t5, 4
/* B1D694 800A64F4 000E7F02 */ srl $t7, $t6, 0x1c
/* B1D698 800A64F8 000FC880 */ sll $t9, $t7, 2
/* B1D69C 800A64FC 00997021 */ addu $t6, $a0, $t9
/* B1D6A0 800A6500 8DCF0000 */ lw $t7, ($t6)
/* B1D6A4 800A6504 01A7C024 */ and $t8, $t5, $a3
/* B1D6A8 800A6508 030FC821 */ addu $t9, $t8, $t7
/* B1D6AC 800A650C 03281821 */ addu $v1, $t9, $t0
/* B1D6B0 800A6510 8C780004 */ lw $t8, 4($v1)
/* B1D6B4 800A6514 00187900 */ sll $t7, $t8, 4
/* B1D6B8 800A6518 000FCF02 */ srl $t9, $t7, 0x1c
/* B1D6BC 800A651C 00197080 */ sll $t6, $t9, 2
/* B1D6C0 800A6520 008E7821 */ addu $t7, $a0, $t6
/* B1D6C4 800A6524 8DF90000 */ lw $t9, ($t7)
/* B1D6C8 800A6528 AFA00044 */ sw $zero, 0x44($sp)
/* B1D6CC 800A652C 03077024 */ and $t6, $t8, $a3
/* B1D6D0 800A6530 AFB80018 */ sw $t8, 0x18($sp)
/* B1D6D4 800A6534 94780002 */ lhu $t8, 2($v1)
/* B1D6D8 800A6538 032E7821 */ addu $t7, $t9, $t6
/* B1D6DC 800A653C 01E81021 */ addu $v0, $t7, $t0
/* B1D6E0 800A6540 0018C900 */ sll $t9, $t8, 4
/* B1D6E4 800A6544 03228021 */ addu $s0, $t9, $v0
/* B1D6E8 800A6548 8CAE0048 */ lw $t6, 0x48($a1)
.L800A654C:
/* B1D6EC 800A654C 00067880 */ sll $t7, $a2, 2
/* B1D6F0 800A6550 01E67823 */ subu $t7, $t7, $a2
/* B1D6F4 800A6554 000F7880 */ sll $t7, $t7, 2
/* B1D6F8 800A6558 01CFC021 */ addu $t8, $t6, $t7
/* B1D6FC 800A655C 0309C821 */ addu $t9, $t8, $t1
/* B1D700 800A6560 0050082B */ sltu $at, $v0, $s0
/* B1D704 800A6564 8F2A0004 */ lw $t2, 4($t9)
/* B1D708 800A6568 1020002B */ beqz $at, .L800A6618
/* B1D70C 800A656C 00405825 */ move $t3, $v0
/* B1D710 800A6570 8D6D0008 */ lw $t5, 8($t3)
.L800A6574:
/* B1D714 800A6574 000D7100 */ sll $t6, $t5, 4
/* B1D718 800A6578 000E7F02 */ srl $t7, $t6, 0x1c
/* B1D71C 800A657C 000FC080 */ sll $t8, $t7, 2
/* B1D720 800A6580 0098C821 */ addu $t9, $a0, $t8
/* B1D724 800A6584 8F2E0000 */ lw $t6, ($t9)
/* B1D728 800A6588 95790000 */ lhu $t9, ($t3)
/* B1D72C 800A658C 01A77824 */ and $t7, $t5, $a3
/* B1D730 800A6590 01CFC021 */ addu $t8, $t6, $t7
/* B1D734 800A6594 03320019 */ multu $t9, $s2
/* B1D738 800A6598 03086021 */ addu $t4, $t8, $t0
/* B1D73C 800A659C 01808825 */ move $s1, $t4
/* B1D740 800A65A0 00007012 */ mflo $t6
/* B1D744 800A65A4 01CC7821 */ addu $t7, $t6, $t4
/* B1D748 800A65A8 018F082B */ sltu $at, $t4, $t7
/* B1D74C 800A65AC 50200017 */ beql $at, $zero, .L800A660C
/* B1D750 800A65B0 256B0010 */ addiu $t3, $t3, 0x10
/* B1D754 800A65B4 96380000 */ lhu $t8, ($s1)
.L800A65B8:
/* B1D758 800A65B8 2631000A */ addiu $s1, $s1, 0xa
/* B1D75C 800A65BC 0018C900 */ sll $t9, $t8, 4
/* B1D760 800A65C0 032A6821 */ addu $t5, $t9, $t2
/* B1D764 800A65C4 A5A00006 */ sh $zero, 6($t5)
/* B1D768 800A65C8 862EFFF8 */ lh $t6, -8($s1)
/* B1D76C 800A65CC A5AE0008 */ sh $t6, 8($t5)
/* B1D770 800A65D0 862FFFFA */ lh $t7, -6($s1)
/* B1D774 800A65D4 A5AF000A */ sh $t7, 0xa($t5)
/* B1D778 800A65D8 9238FFFF */ lbu $t8, -1($s1)
/* B1D77C 800A65DC A1B8000F */ sb $t8, 0xf($t5)
/* B1D780 800A65E0 95790000 */ lhu $t9, ($t3)
/* B1D784 800A65E4 03320019 */ multu $t9, $s2
/* B1D788 800A65E8 00007012 */ mflo $t6
/* B1D78C 800A65EC 01CC7821 */ addu $t7, $t6, $t4
/* B1D790 800A65F0 022F082B */ sltu $at, $s1, $t7
/* B1D794 800A65F4 5420FFF0 */ bnezl $at, .L800A65B8
/* B1D798 800A65F8 96380000 */ lhu $t8, ($s1)
/* B1D79C 800A65FC 94780002 */ lhu $t8, 2($v1)
/* B1D7A0 800A6600 0018C900 */ sll $t9, $t8, 4
/* B1D7A4 800A6604 03228021 */ addu $s0, $t9, $v0
/* B1D7A8 800A6608 256B0010 */ addiu $t3, $t3, 0x10
.L800A660C:
/* B1D7AC 800A660C 0170082B */ sltu $at, $t3, $s0
/* B1D7B0 800A6610 5420FFD8 */ bnezl $at, .L800A6574
/* B1D7B4 800A6614 8D6D0008 */ lw $t5, 8($t3)
.L800A6618:
/* B1D7B8 800A6618 25290004 */ addiu $t1, $t1, 4
/* B1D7BC 800A661C 5533FFCB */ bnel $t1, $s3, .L800A654C
/* B1D7C0 800A6620 8CAE0048 */ lw $t6, 0x48($a1)
/* B1D7C4 800A6624 8FB00008 */ lw $s0, 8($sp)
/* B1D7C8 800A6628 8FB1000C */ lw $s1, 0xc($sp)
/* B1D7CC 800A662C 8FB20010 */ lw $s2, 0x10($sp)
/* B1D7D0 800A6630 8FB30014 */ lw $s3, 0x14($sp)
/* B1D7D4 800A6634 03E00008 */ jr $ra
/* B1D7D8 800A6638 27BD0048 */ addiu $sp, $sp, 0x48

View file

@ -1,195 +0,0 @@
.rdata
glabel D_801406F0
.asciz "../z_skin_awb.c"
.balign 4
glabel D_80140700
.asciz "pskin_awb->avb_tbl != NULL"
.balign 4
glabel D_8014071C
.asciz "../z_skin_awb.c"
.balign 4
glabel D_8014072C
.asciz "../z_skin_awb.c"
.balign 4
glabel D_8014073C
.asciz "psavb->buf[0] != NULL"
.balign 4
glabel D_80140754
.asciz "../z_skin_awb.c"
.balign 4
glabel D_80140764
.asciz "../z_skin_awb.c"
.balign 4
glabel D_80140774
.asciz "psavb->buf[1] != NULL"
.balign 4
glabel D_8014078C
.asciz "../z_skin_awb.c"
.balign 4
.text
glabel func_800A663C
/* B1D7DC 800A663C 27BDFFB8 */ addiu $sp, $sp, -0x48
/* B1D7E0 800A6640 AFB60030 */ sw $s6, 0x30($sp)
/* B1D7E4 800A6644 00067100 */ sll $t6, $a2, 4
/* B1D7E8 800A6648 3C168016 */ lui $s6, %hi(gSegments) # $s6, 0x8016
/* B1D7EC 800A664C 000E7F02 */ srl $t7, $t6, 0x1c
/* B1D7F0 800A6650 26D66FA8 */ addiu $s6, %lo(gSegments) # addiu $s6, $s6, 0x6fa8
/* B1D7F4 800A6654 000FC080 */ sll $t8, $t7, 2
/* B1D7F8 800A6658 AFB70034 */ sw $s7, 0x34($sp)
/* B1D7FC 800A665C 02D8C821 */ addu $t9, $s6, $t8
/* B1D800 800A6660 8F290000 */ lw $t1, ($t9)
/* B1D804 800A6664 3C1700FF */ lui $s7, (0x00FFFFFF >> 16) # lui $s7, 0xff
/* B1D808 800A6668 36F7FFFF */ ori $s7, (0x00FFFFFF & 0xFFFF) # ori $s7, $s7, 0xffff
/* B1D80C 800A666C AFBE0038 */ sw $fp, 0x38($sp)
/* B1D810 800A6670 00D75024 */ and $t2, $a2, $s7
/* B1D814 800A6674 3C1E8000 */ lui $fp, 0x8000
/* B1D818 800A6678 012A5821 */ addu $t3, $t1, $t2
/* B1D81C 800A667C AFBF003C */ sw $ra, 0x3c($sp)
/* B1D820 800A6680 AFB5002C */ sw $s5, 0x2c($sp)
/* B1D824 800A6684 AFB40028 */ sw $s4, 0x28($sp)
/* B1D828 800A6688 AFB30024 */ sw $s3, 0x24($sp)
/* B1D82C 800A668C AFB20020 */ sw $s2, 0x20($sp)
/* B1D830 800A6690 AFB1001C */ sw $s1, 0x1c($sp)
/* B1D834 800A6694 AFB00018 */ sw $s0, 0x18($sp)
/* B1D838 800A6698 AFA40048 */ sw $a0, 0x48($sp)
/* B1D83C 800A669C AFA70054 */ sw $a3, 0x54($sp)
/* B1D840 800A66A0 017E1021 */ addu $v0, $t3, $fp
/* B1D844 800A66A4 904C0004 */ lbu $t4, 4($v0)
/* B1D848 800A66A8 ACA20000 */ sw $v0, ($a1)
/* B1D84C 800A66AC 00A0A825 */ move $s5, $a1
/* B1D850 800A66B0 ACAC0044 */ sw $t4, 0x44($a1)
/* B1D854 800A66B4 8C430000 */ lw $v1, ($v0)
/* B1D858 800A66B8 90480004 */ lbu $t0, 4($v0)
/* B1D85C 800A66BC 00C08825 */ move $s1, $a2
/* B1D860 800A66C0 00036900 */ sll $t5, $v1, 4
/* B1D864 800A66C4 000D7702 */ srl $t6, $t5, 0x1c
/* B1D868 800A66C8 000E7880 */ sll $t7, $t6, 2
/* B1D86C 800A66CC 02CFC021 */ addu $t8, $s6, $t7
/* B1D870 800A66D0 8F190000 */ lw $t9, ($t8)
/* B1D874 800A66D4 00774824 */ and $t1, $v1, $s7
/* B1D878 800A66D8 00082080 */ sll $a0, $t0, 2
/* B1D87C 800A66DC 3C058014 */ lui $a1, %hi(D_801406F0) # $a1, 0x8014
/* B1D880 800A66E0 00882023 */ subu $a0, $a0, $t0
/* B1D884 800A66E4 03295021 */ addu $t2, $t9, $t1
/* B1D888 800A66E8 015E8021 */ addu $s0, $t2, $fp
/* B1D88C 800A66EC 00042080 */ sll $a0, $a0, 2
/* B1D890 800A66F0 24A506F0 */ addiu $a1, %lo(D_801406F0) # addiu $a1, $a1, 0x6f0
/* B1D894 800A66F4 AFB10050 */ sw $s1, 0x50($sp)
/* B1D898 800A66F8 240600D4 */ li $a2, 212
/* B1D89C 800A66FC 0C01EBB8 */ jal ZeldaArena_MallocDebug
/* B1D8A0 800A6700 AFA80044 */ sw $t0, 0x44($sp)
/* B1D8A4 800A6704 14400007 */ bnez $v0, .L800A6724
/* B1D8A8 800A6708 AEA20048 */ sw $v0, 0x48($s5)
/* B1D8AC 800A670C 3C048014 */ lui $a0, %hi(D_80140700) # $a0, 0x8014
/* B1D8B0 800A6710 3C058014 */ lui $a1, %hi(D_8014071C) # $a1, 0x8014
/* B1D8B4 800A6714 24A5071C */ addiu $a1, %lo(D_8014071C) # addiu $a1, $a1, 0x71c
/* B1D8B8 800A6718 24840700 */ addiu $a0, %lo(D_80140700) # addiu $a0, $a0, 0x700
/* B1D8BC 800A671C 0C0007FC */ jal __assert
/* B1D8C0 800A6720 240600D6 */ li $a2, 214
.L800A6724:
/* B1D8C4 800A6724 8FAB0044 */ lw $t3, 0x44($sp)
/* B1D8C8 800A6728 00009025 */ move $s2, $zero
/* B1D8CC 800A672C 00009825 */ move $s3, $zero
/* B1D8D0 800A6730 19600044 */ blez $t3, .L800A6844
/* B1D8D4 800A6734 0200A025 */ move $s4, $s0
.L800A6738:
/* B1D8D8 800A6738 8E820000 */ lw $v0, ($s4)
/* B1D8DC 800A673C 8EAC0048 */ lw $t4, 0x48($s5)
/* B1D8E0 800A6740 24010004 */ li $at, 4
/* B1D8E4 800A6744 00027100 */ sll $t6, $v0, 4
/* B1D8E8 800A6748 000E7F02 */ srl $t7, $t6, 0x1c
/* B1D8EC 800A674C 000FC080 */ sll $t8, $t7, 2
/* B1D8F0 800A6750 02D8C821 */ addu $t9, $s6, $t8
/* B1D8F4 800A6754 8F290000 */ lw $t1, ($t9)
/* B1D8F8 800A6758 00576824 */ and $t5, $v0, $s7
/* B1D8FC 800A675C 01938021 */ addu $s0, $t4, $s3
/* B1D900 800A6760 01A95021 */ addu $t2, $t5, $t1
/* B1D904 800A6764 015E1821 */ addu $v1, $t2, $fp
/* B1D908 800A6768 8C6B0008 */ lw $t3, 8($v1)
/* B1D90C 800A676C 55610006 */ bnel $t3, $at, .L800A6788
/* B1D910 800A6770 A2000000 */ sb $zero, ($s0)
/* B1D914 800A6774 8C67000C */ lw $a3, 0xc($v1)
/* B1D918 800A6778 3C058014 */ lui $a1, %hi(D_8014072C) # $a1, 0x8014
/* B1D91C 800A677C 14E00005 */ bnez $a3, .L800A6794
/* B1D920 800A6780 00F76024 */ and $t4, $a3, $s7
/* B1D924 800A6784 A2000000 */ sb $zero, ($s0)
.L800A6788:
/* B1D928 800A6788 AE000004 */ sw $zero, 4($s0)
/* B1D92C 800A678C 10000028 */ b .L800A6830
/* B1D930 800A6790 AE000008 */ sw $zero, 8($s0)
.L800A6794:
/* B1D934 800A6794 00077100 */ sll $t6, $a3, 4
/* B1D938 800A6798 000E7F02 */ srl $t7, $t6, 0x1c
/* B1D93C 800A679C 000FC080 */ sll $t8, $t7, 2
/* B1D940 800A67A0 02D8C821 */ addu $t9, $s6, $t8
/* B1D944 800A67A4 8F2D0000 */ lw $t5, ($t9)
/* B1D948 800A67A8 A2000000 */ sb $zero, ($s0)
/* B1D94C 800A67AC 24A5072C */ addiu $a1, %lo(D_8014072C) # addiu $a1, $a1, 0x72c
/* B1D950 800A67B0 018D4821 */ addu $t1, $t4, $t5
/* B1D954 800A67B4 013E8821 */ addu $s1, $t1, $fp
/* B1D958 800A67B8 96240000 */ lhu $a0, ($s1)
/* B1D95C 800A67BC 240600EB */ li $a2, 235
/* B1D960 800A67C0 0C01EBB8 */ jal ZeldaArena_MallocDebug
/* B1D964 800A67C4 00042100 */ sll $a0, $a0, 4
/* B1D968 800A67C8 14400007 */ bnez $v0, .L800A67E8
/* B1D96C 800A67CC AE020004 */ sw $v0, 4($s0)
/* B1D970 800A67D0 3C048014 */ lui $a0, %hi(D_8014073C) # $a0, 0x8014
/* B1D974 800A67D4 3C058014 */ lui $a1, %hi(D_80140754) # $a1, 0x8014
/* B1D978 800A67D8 24A50754 */ addiu $a1, %lo(D_80140754) # addiu $a1, $a1, 0x754
/* B1D97C 800A67DC 2484073C */ addiu $a0, %lo(D_8014073C) # addiu $a0, $a0, 0x73c
/* B1D980 800A67E0 0C0007FC */ jal __assert
/* B1D984 800A67E4 240600ED */ li $a2, 237
.L800A67E8:
/* B1D988 800A67E8 96240000 */ lhu $a0, ($s1)
/* B1D98C 800A67EC 3C058014 */ lui $a1, %hi(D_80140764) # $a1, 0x8014
/* B1D990 800A67F0 24A50764 */ addiu $a1, %lo(D_80140764) # addiu $a1, $a1, 0x764
/* B1D994 800A67F4 240600F0 */ li $a2, 240
/* B1D998 800A67F8 0C01EBB8 */ jal ZeldaArena_MallocDebug
/* B1D99C 800A67FC 00042100 */ sll $a0, $a0, 4
/* B1D9A0 800A6800 14400007 */ bnez $v0, .L800A6820
/* B1D9A4 800A6804 AE020008 */ sw $v0, 8($s0)
/* B1D9A8 800A6808 3C048014 */ lui $a0, %hi(D_80140774) # $a0, 0x8014
/* B1D9AC 800A680C 3C058014 */ lui $a1, %hi(D_8014078C) # $a1, 0x8014
/* B1D9B0 800A6810 24A5078C */ addiu $a1, %lo(D_8014078C) # addiu $a1, $a1, 0x78c
/* B1D9B4 800A6814 24840774 */ addiu $a0, %lo(D_80140774) # addiu $a0, $a0, 0x774
/* B1D9B8 800A6818 0C0007FC */ jal __assert
/* B1D9BC 800A681C 240600F2 */ li $a2, 242
.L800A6820:
/* B1D9C0 800A6820 8FA40048 */ lw $a0, 0x48($sp)
/* B1D9C4 800A6824 02A02825 */ move $a1, $s5
/* B1D9C8 800A6828 0C029918 */ jal func_800A6460
/* B1D9CC 800A682C 02403025 */ move $a2, $s2
.L800A6830:
/* B1D9D0 800A6830 8FAA0044 */ lw $t2, 0x44($sp)
/* B1D9D4 800A6834 26520001 */ addiu $s2, $s2, 1
/* B1D9D8 800A6838 2673000C */ addiu $s3, $s3, 0xc
/* B1D9DC 800A683C 164AFFBE */ bne $s2, $t2, .L800A6738
/* B1D9E0 800A6840 26940004 */ addiu $s4, $s4, 4
.L800A6844:
/* B1D9E4 800A6844 8FA40048 */ lw $a0, 0x48($sp)
/* B1D9E8 800A6848 26A5004C */ addiu $a1, $s5, 0x4c
/* B1D9EC 800A684C 8FA60050 */ lw $a2, 0x50($sp)
/* B1D9F0 800A6850 0C02921F */ jal SkelAnime_InitSkin
/* B1D9F4 800A6854 8FA70054 */ lw $a3, 0x54($sp)
/* B1D9F8 800A6858 8FBF003C */ lw $ra, 0x3c($sp)
/* B1D9FC 800A685C 8FB00018 */ lw $s0, 0x18($sp)
/* B1DA00 800A6860 8FB1001C */ lw $s1, 0x1c($sp)
/* B1DA04 800A6864 8FB20020 */ lw $s2, 0x20($sp)
/* B1DA08 800A6868 8FB30024 */ lw $s3, 0x24($sp)
/* B1DA0C 800A686C 8FB40028 */ lw $s4, 0x28($sp)
/* B1DA10 800A6870 8FB5002C */ lw $s5, 0x2c($sp)
/* B1DA14 800A6874 8FB60030 */ lw $s6, 0x30($sp)
/* B1DA18 800A6878 8FB70034 */ lw $s7, 0x34($sp)
/* B1DA1C 800A687C 8FBE0038 */ lw $fp, 0x38($sp)
/* B1DA20 800A6880 03E00008 */ jr $ra
/* B1DA24 800A6884 27BD0048 */ addiu $sp, $sp, 0x48

View file

@ -1,87 +0,0 @@
.rdata
glabel D_8014079C
.asciz "../z_skin_awb.c"
.balign 4
glabel D_801407AC
.asciz "../z_skin_awb.c"
.balign 4
glabel D_801407BC
.asciz "../z_skin_awb.c"
.balign 4
.text
glabel func_800A6888
/* B1DA28 800A6888 27BDFFD0 */ addiu $sp, $sp, -0x30
/* B1DA2C 800A688C AFBF002C */ sw $ra, 0x2c($sp)
/* B1DA30 800A6890 AFB40028 */ sw $s4, 0x28($sp)
/* B1DA34 800A6894 AFB30024 */ sw $s3, 0x24($sp)
/* B1DA38 800A6898 AFB20020 */ sw $s2, 0x20($sp)
/* B1DA3C 800A689C AFB1001C */ sw $s1, 0x1c($sp)
/* B1DA40 800A68A0 AFB00018 */ sw $s0, 0x18($sp)
/* B1DA44 800A68A4 AFA40030 */ sw $a0, 0x30($sp)
/* B1DA48 800A68A8 8CA70048 */ lw $a3, 0x48($a1)
/* B1DA4C 800A68AC 00A08825 */ move $s1, $a1
/* B1DA50 800A68B0 50E0002F */ beql $a3, $zero, .L800A6970
/* B1DA54 800A68B4 8FBF002C */ lw $ra, 0x2c($sp)
/* B1DA58 800A68B8 8CAE0044 */ lw $t6, 0x44($a1)
/* B1DA5C 800A68BC 00009025 */ move $s2, $zero
/* B1DA60 800A68C0 00008025 */ move $s0, $zero
/* B1DA64 800A68C4 19C00020 */ blez $t6, .L800A6948
/* B1DA68 800A68C8 3C148014 */ lui $s4, %hi(D_801407AC) # $s4, 0x8014
/* B1DA6C 800A68CC 3C138014 */ lui $s3, %hi(D_8014079C) # $s3, 0x8014
/* B1DA70 800A68D0 2673079C */ addiu $s3, %lo(D_8014079C) # addiu $s3, $s3, 0x79c
/* B1DA74 800A68D4 269407AC */ addiu $s4, %lo(D_801407AC) # addiu $s4, $s4, 0x7ac
/* B1DA78 800A68D8 00F01021 */ addu $v0, $a3, $s0
.L800A68DC:
/* B1DA7C 800A68DC 8C440004 */ lw $a0, 4($v0)
/* B1DA80 800A68E0 02602825 */ move $a1, $s3
/* B1DA84 800A68E4 50800009 */ beql $a0, $zero, .L800A690C
/* B1DA88 800A68E8 8C440008 */ lw $a0, 8($v0)
/* B1DA8C 800A68EC 0C01EC35 */ jal ZeldaArena_FreeDebug
/* B1DA90 800A68F0 24060114 */ li $a2, 276
/* B1DA94 800A68F4 8E2F0048 */ lw $t7, 0x48($s1)
/* B1DA98 800A68F8 01F0C021 */ addu $t8, $t7, $s0
/* B1DA9C 800A68FC AF000004 */ sw $zero, 4($t8)
/* B1DAA0 800A6900 8E270048 */ lw $a3, 0x48($s1)
/* B1DAA4 800A6904 00F01021 */ addu $v0, $a3, $s0
/* B1DAA8 800A6908 8C440008 */ lw $a0, 8($v0)
.L800A690C:
/* B1DAAC 800A690C 02802825 */ move $a1, $s4
/* B1DAB0 800A6910 50800008 */ beql $a0, $zero, .L800A6934
/* B1DAB4 800A6914 8E290044 */ lw $t1, 0x44($s1)
/* B1DAB8 800A6918 0C01EC35 */ jal ZeldaArena_FreeDebug
/* B1DABC 800A691C 24060118 */ li $a2, 280
/* B1DAC0 800A6920 8E390048 */ lw $t9, 0x48($s1)
/* B1DAC4 800A6924 03304021 */ addu $t0, $t9, $s0
/* B1DAC8 800A6928 AD000008 */ sw $zero, 8($t0)
/* B1DACC 800A692C 8E270048 */ lw $a3, 0x48($s1)
/* B1DAD0 800A6930 8E290044 */ lw $t1, 0x44($s1)
.L800A6934:
/* B1DAD4 800A6934 26520001 */ addiu $s2, $s2, 1
/* B1DAD8 800A6938 2610000C */ addiu $s0, $s0, 0xc
/* B1DADC 800A693C 0249082A */ slt $at, $s2, $t1
/* B1DAE0 800A6940 5420FFE6 */ bnezl $at, .L800A68DC
/* B1DAE4 800A6944 00F01021 */ addu $v0, $a3, $s0
.L800A6948:
/* B1DAE8 800A6948 10E00005 */ beqz $a3, .L800A6960
/* B1DAEC 800A694C 00E02025 */ move $a0, $a3
/* B1DAF0 800A6950 3C058014 */ lui $a1, %hi(D_801407BC) # $a1, 0x8014
/* B1DAF4 800A6954 24A507BC */ addiu $a1, %lo(D_801407BC) # addiu $a1, $a1, 0x7bc
/* B1DAF8 800A6958 0C01EC35 */ jal ZeldaArena_FreeDebug
/* B1DAFC 800A695C 2406011E */ li $a2, 286
.L800A6960:
/* B1DB00 800A6960 2624004C */ addiu $a0, $s1, 0x4c
/* B1DB04 800A6964 0C0295BC */ jal SkelAnime_Free
/* B1DB08 800A6968 8FA50030 */ lw $a1, 0x30($sp)
/* B1DB0C 800A696C 8FBF002C */ lw $ra, 0x2c($sp)
.L800A6970:
/* B1DB10 800A6970 8FB00018 */ lw $s0, 0x18($sp)
/* B1DB14 800A6974 8FB1001C */ lw $s1, 0x1c($sp)
/* B1DB18 800A6978 8FB20020 */ lw $s2, 0x20($sp)
/* B1DB1C 800A697C 8FB30024 */ lw $s3, 0x24($sp)
/* B1DB20 800A6980 8FB40028 */ lw $s4, 0x28($sp)
/* B1DB24 800A6984 03E00008 */ jr $ra
/* B1DB28 800A6988 27BD0030 */ addiu $sp, $sp, 0x30

View file

@ -1,87 +0,0 @@
glabel func_800A698C
/* B1DB2C 800A698C 27BDFF88 */ addiu $sp, $sp, -0x78
/* B1DB30 800A6990 93AF008B */ lbu $t7, 0x8b($sp)
/* B1DB34 800A6994 AFBF001C */ sw $ra, 0x1c($sp)
/* B1DB38 800A6998 AFA40078 */ sw $a0, 0x78($sp)
/* B1DB3C 800A699C 000FC080 */ sll $t8, $t7, 2
/* B1DB40 800A69A0 AFA5007C */ sw $a1, 0x7c($sp)
/* B1DB44 800A69A4 AFA60080 */ sw $a2, 0x80($sp)
/* B1DB48 800A69A8 AFA70084 */ sw $a3, 0x84($sp)
/* B1DB4C 800A69AC 00B8C821 */ addu $t9, $a1, $t8
/* B1DB50 800A69B0 8F220000 */ lw $v0, ($t9)
/* B1DB54 800A69B4 3C0C8016 */ lui $t4, %hi(gSegments)
/* B1DB58 800A69B8 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff
/* B1DB5C 800A69BC 00024900 */ sll $t1, $v0, 4
/* B1DB60 800A69C0 00095702 */ srl $t2, $t1, 0x1c
/* B1DB64 800A69C4 000A5880 */ sll $t3, $t2, 2
/* B1DB68 800A69C8 018B6021 */ addu $t4, $t4, $t3
/* B1DB6C 800A69CC 8D8C6FA8 */ lw $t4, %lo(gSegments)($t4)
/* B1DB70 800A69D0 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff
/* B1DB74 800A69D4 00414024 */ and $t0, $v0, $at
/* B1DB78 800A69D8 93A30087 */ lbu $v1, 0x87($sp)
/* B1DB7C 800A69DC 3C018000 */ lui $at, 0x8000
/* B1DB80 800A69E0 010C6821 */ addu $t5, $t0, $t4
/* B1DB84 800A69E4 01A17821 */ addu $t7, $t5, $at
/* B1DB88 800A69E8 240100FF */ li $at, 255
/* B1DB8C 800A69EC 14610005 */ bne $v1, $at, .L800A6A04
/* B1DB90 800A69F0 AFAF0070 */ sw $t7, 0x70($sp)
/* B1DB94 800A69F4 0C029CBF */ jal SkinMatrix_GetClear
/* B1DB98 800A69F8 27A4006C */ addiu $a0, $sp, 0x6c
/* B1DB9C 800A69FC 10000006 */ b .L800A6A18
/* B1DBA0 800A6A00 93A9008B */ lbu $t1, 0x8b($sp)
.L800A6A04:
/* B1DBA4 800A6A04 8FB80080 */ lw $t8, 0x80($sp)
/* B1DBA8 800A6A08 00037180 */ sll $t6, $v1, 6
/* B1DBAC 800A6A0C 01D8C821 */ addu $t9, $t6, $t8
/* B1DBB0 800A6A10 AFB9006C */ sw $t9, 0x6c($sp)
/* B1DBB4 800A6A14 93A9008B */ lbu $t1, 0x8b($sp)
.L800A6A18:
/* B1DBB8 800A6A18 8FAB0080 */ lw $t3, 0x80($sp)
/* B1DBBC 800A6A1C 8FA4006C */ lw $a0, 0x6c($sp)
/* B1DBC0 800A6A20 00095180 */ sll $t2, $t1, 6
/* B1DBC4 800A6A24 014B2821 */ addu $a1, $t2, $t3
/* B1DBC8 800A6A28 AFA50024 */ sw $a1, 0x24($sp)
/* B1DBCC 800A6A2C 0C029BE8 */ jal SkinMatrix_MtxFMtxFMult
/* B1DBD0 800A6A30 27A60028 */ addiu $a2, $sp, 0x28
/* B1DBD4 800A6A34 8FA50024 */ lw $a1, 0x24($sp)
/* B1DBD8 800A6A38 0C029CD7 */ jal SkinMatrix_MtxFCopy
/* B1DBDC 800A6A3C 27A40028 */ addiu $a0, $sp, 0x28
/* B1DBE0 800A6A40 8FA80070 */ lw $t0, 0x70($sp)
/* B1DBE4 800A6A44 240100FF */ li $at, 255
/* B1DBE8 800A6A48 8FA40078 */ lw $a0, 0x78($sp)
/* B1DBEC 800A6A4C 91020006 */ lbu $v0, 6($t0)
/* B1DBF0 800A6A50 8FA5007C */ lw $a1, 0x7c($sp)
/* B1DBF4 800A6A54 8FA60080 */ lw $a2, 0x80($sp)
/* B1DBF8 800A6A58 10410007 */ beq $v0, $at, .L800A6A78
/* B1DBFC 800A6A5C 93A7008B */ lbu $a3, 0x8b($sp)
/* B1DC00 800A6A60 0C029A63 */ jal func_800A698C
/* B1DC04 800A6A64 AFA20010 */ sw $v0, 0x10($sp)
/* B1DC08 800A6A68 50400004 */ beql $v0, $zero, .L800A6A7C
/* B1DC0C 800A6A6C 8FAC0070 */ lw $t4, 0x70($sp)
/* B1DC10 800A6A70 10000011 */ b .L800A6AB8
/* B1DC14 800A6A74 8FBF001C */ lw $ra, 0x1c($sp)
.L800A6A78:
/* B1DC18 800A6A78 8FAC0070 */ lw $t4, 0x70($sp)
.L800A6A7C:
/* B1DC1C 800A6A7C 240100FF */ li $at, 255
/* B1DC20 800A6A80 8FA40078 */ lw $a0, 0x78($sp)
/* B1DC24 800A6A84 91820007 */ lbu $v0, 7($t4)
/* B1DC28 800A6A88 8FA5007C */ lw $a1, 0x7c($sp)
/* B1DC2C 800A6A8C 8FA60080 */ lw $a2, 0x80($sp)
/* B1DC30 800A6A90 10410007 */ beq $v0, $at, .L800A6AB0
/* B1DC34 800A6A94 93A70087 */ lbu $a3, 0x87($sp)
/* B1DC38 800A6A98 0C029A63 */ jal func_800A698C
/* B1DC3C 800A6A9C AFA20010 */ sw $v0, 0x10($sp)
/* B1DC40 800A6AA0 50400004 */ beql $v0, $zero, .L800A6AB4
/* B1DC44 800A6AA4 00001025 */ move $v0, $zero
/* B1DC48 800A6AA8 10000003 */ b .L800A6AB8
/* B1DC4C 800A6AAC 8FBF001C */ lw $ra, 0x1c($sp)
.L800A6AB0:
/* B1DC50 800A6AB0 00001025 */ move $v0, $zero
.L800A6AB4:
/* B1DC54 800A6AB4 8FBF001C */ lw $ra, 0x1c($sp)
.L800A6AB8:
/* B1DC58 800A6AB8 27BD0078 */ addiu $sp, $sp, 0x78
/* B1DC5C 800A6ABC 03E00008 */ jr $ra
/* B1DC60 800A6AC0 00000000 */ nop

View file

@ -1365,7 +1365,7 @@ void func_800A6460(GlobalContext* globalCtx, PSkinAwb* skin, s32 arg2);
void func_800A663C(GlobalContext* globalCtx, PSkinAwb* skin, SkeletonHeader* skeletonHeader,
AnimationHeader* animationHeader);
void func_800A6888(GlobalContext* globalCtx, PSkinAwb* skin);
s32 func_800A698C(PSkinAwb* skin, SkinLimb** limbs, Mtx* arg2, u8 arg3, u8 arg4);
s32 func_800A698C(PSkinAwb* skin, SkinLimb** limbs, MtxF* arg2, u8 arg3, u8 arg4);
s32 func_800A6AC4(PSkinAwb* skin, MtxF* arg1, Actor* actor, s32 arg3);
void SkinMatrix_Vec3fMtxFMultXYZW(MtxF* mf, Vec3f* src, Vec3f* xyzDest, f32* wDest);
void SkinMatrix_Vec3fMtxFMultXYZ(MtxF* mf, Vec3f* src, Vec3f* dest);

View file

@ -47,6 +47,11 @@
// NOTE: Once we start supporting other builds, this can be changed with an ifdef
#define REGION_NATIVE REGION_EU
typedef struct{
/* 0x00 */ char unk[0x4];
/* 0x04 */ MtxF mf;
} HorseStruct;
// Game Info aka. Static Context (dbg ram start: 80210A10)
// Data normally accessed through REG macros (see regs.h)
typedef struct {

View file

@ -51,7 +51,7 @@ typedef struct {
/* 0x06 */ u8 child;
/* 0x07 */ u8 sibling;
/* 0x08 */ s32 unk_8; // Type of data contained in segment
/* 0x0C */ UNK_PTR segment; // Segment address of data. Currently unclear what.
/* 0x0C */ void* segment; // Segment address of data. Currently unclear what.
} SkinLimb; // size = 0x10
// Model has limbs with only rigid meshes
@ -266,11 +266,12 @@ typedef struct SkelAnime {
typedef struct {
/* 0x000 */ u16 unk_0;
/* 0x002 */ char unk_2[0x4];
/* 0x002 */ s16 unk_2;
/* 0x004 */ s16 unk_4;
/* 0x006 */ s8 unk_6;
/* 0x007 */ s8 unk_7;
/* 0x008 */ s8 unk_8;
/* 0x009 */ char unk_9[0x1];
/* 0x009 */ u8 unk_9;
} Struct_800A57C0; // size = 0xA
typedef struct {
@ -282,19 +283,19 @@ typedef struct {
} Struct_800A598C_2; // size = 0xA
typedef struct {
/* 0x000 */ char unk_0[0x2];
/* 0x000 */ u16 unk_0;
/* 0x002 */ u16 unk_2;
/* 0x004 */ u32 unk_4;
/* 0x008 */ Gfx* unk_8;
} Struct_800A5E28;
/* 0x004 */ u16 unk_4;
/* 0x008 */ Struct_800A57C0* unk_8;
/* 0x00C */ Struct_800A598C_2* unk_C;
} Struct_800A598C; // size = 0x10
typedef struct {
/* 0x000 */ u16 unk_0;
/* 0x002 */ u16 unk_2;
/* 0x004 */ u16 unk_4;
/* 0x008 */ s32 unk_8;
/* 0x00C */ s32 unk_C;
} Struct_800A598C; // size = 0x10
/* 0x004 */ Struct_800A598C* unk_4;
/* 0x008 */ Gfx* unk_8;
} Struct_800A5E28;
typedef struct {
/* 0x000 */ u8 unk_0;

View file

@ -36,56 +36,64 @@ void func_800A57C0(MtxF* mtx, Struct_800A57C0* arg1, Struct_800A598C* arg2, Vtx*
}
}
#ifdef NON_MATCHING
// Regalloc, Stack
void func_800A598C(GraphicsContext* gfxCtx, PSkinAwb* skin, s32 limbIndex, s32 arg3) {
SkinLimb** limbs;
s32 temp_1;
SkinLimb** skeleton;
SkinLimb* limb;
Struct_800A5E28* data;
Struct_800A598C* phi_s6;
s32 temp_a0_2;
SkinAvb* avb;
Struct_800A598C* new_var;
s32 temp_a0_2;
f32 temp_f20;
Struct_800A57C0* temp_v0;
Struct_800A598C_2* temp_s3;
Vtx* spEC;
Struct_800A598C* temp_2;
Vec3f spDC;
Vec3f spD0;
Struct_800A598C_2* phi_s0;
OPEN_DISPS(gfxCtx, "../z_skin.c", 254);
limbs = (SkinLimb**)SEGMENTED_TO_VIRTUAL(skin->skeletonHeader->segment);
limb = (SkinLimb*)SEGMENTED_TO_VIRTUAL(limbs[limbIndex]);
data = (Struct_800A5E28*)SEGMENTED_TO_VIRTUAL(limb->segment);
phi_s6 = &((Struct_800A598C*)SEGMENTED_TO_VIRTUAL(data->unk_4))[0];
skeleton = (SkinLimb**)SEGMENTED_TO_VIRTUAL(skin->skeletonHeader->segment);
data = SEGMENTED_TO_VIRTUAL(((SkinLimb*)SEGMENTED_TO_VIRTUAL(skeleton[limbIndex]))->segment);
temp_2 = (Struct_800A598C*)SEGMENTED_TO_VIRTUAL(data->unk_4);
avb = &skin->avbTbl[limbIndex];
spEC = avb->buf[avb->unk_0];
new_var = &phi_s6[data->unk_2];
while (phi_s6 < new_var) {
temp_1 = data->unk_2;
for (phi_s6 = temp_2; phi_s6 < temp_2 + temp_1; phi_s6++) {
temp_a0_2 = phi_s6->unk_2;
temp_v0 = (Struct_800A57C0*)SEGMENTED_TO_VIRTUAL(phi_s6->unk_8);
temp_s3 = (Struct_800A598C_2*)SEGMENTED_TO_VIRTUAL(phi_s6->unk_C);
if (temp_a0_2 == 1) {
Vec3f spAC;
spAC.x = temp_s3[0].x;
spAC.y = temp_s3[0].y;
spAC.z = temp_s3[0].z;
SkinMatrix_Vec3fMtxFMultXYZ(&D_801600C0[temp_s3[0].unk_0], &spAC, &spDC);
} else if (arg3 == 1) {
Struct_800A598C_2* temp_s0 = &temp_s3[phi_s6->unk_4];
Vec3f spA0;
spA0.x = temp_s0->x;
spA0.y = temp_s0->y;
spA0.z = temp_s0->z;
SkinMatrix_Vec3fMtxFMultXYZ(&D_801600C0[temp_s0->unk_0], &spA0, &spDC);
phi_s0 = &temp_s3[phi_s6->unk_4];
spA0.x = phi_s0->x;
spA0.y = phi_s0->y;
spA0.z = phi_s0->z;
SkinMatrix_Vec3fMtxFMultXYZ(&D_801600C0[phi_s0->unk_0], &spA0, &spDC);
} else {
Struct_800A598C_2* phi_s0 = &temp_s3[0];
f32 phi_f26 = 0.0f;
f32 phi_f24 = 0.0f;
f32 phi_f22 = 0.0f;
while (phi_s0 < &temp_s3[temp_a0_2]) {
Vec3f sp88;
f32 temp_f20 = phi_s0->unk_8 * 0.01f;
Vec3f phi_f20;
Vec3f sp88;
phi_f20.x = phi_f20.y = phi_f20.z = 0.0f;
for (phi_s0 = &temp_s3[0]; phi_s0 < &temp_s3[temp_a0_2]; phi_s0++) {
temp_f20 = phi_s0->unk_8 * 0.01f;
sp88.x = phi_s0->x;
sp88.y = phi_s0->y;
sp88.z = phi_s0->z;
@ -93,38 +101,30 @@ void func_800A598C(GraphicsContext* gfxCtx, PSkinAwb* skin, s32 limbIndex, s32 a
spD0.x *= temp_f20;
spD0.y *= temp_f20;
spD0.z *= temp_f20;
phi_f26 += spD0.x;
phi_f24 += spD0.y;
phi_f22 += spD0.z;
phi_s0++;
phi_f20.x += spD0.x;
phi_f20.y += spD0.y;
phi_f20.z += spD0.z;
}
spDC.x = phi_f26;
spDC.y = phi_f24;
spDC.z = phi_f22;
spDC.x = phi_f20.x;
spDC.y = phi_f20.y;
spDC.z = phi_f20.z;
}
func_800A57C0(&D_801600C0[temp_s3[phi_s6->unk_4].unk_0], temp_v0, phi_s6, spEC, &spDC);
phi_s6++;
}
gSPSegment(POLY_OPA_DISP++, 0x08, avb->buf[avb->unk_0]);
if (avb->unk_0 == 0) {
avb->unk_0 = 1;
} else {
avb->unk_0 = 0;
}
avb->unk_0 = (avb->unk_0 == 0) ? 1 : 0;
CLOSE_DISPS(gfxCtx, "../z_skin.c", 344);
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_skin/func_800A598C.s")
#endif
void func_800A5E28(GraphicsContext* gfxCtx, PSkinAwb* skin, s32 limbIndex, s32 arg3, s32 arg4) {
SkinLimb** limbs;
SkinLimb** skeleton;
Struct_800A5E28* temp_t9;
OPEN_DISPS(gfxCtx, "../z_skin.c", 364);
limbs = (SkinLimb**)SEGMENTED_TO_VIRTUAL(skin->skeletonHeader->segment);
temp_t9 = (Struct_800A5E28*)SEGMENTED_TO_VIRTUAL(((SkinLimb*)SEGMENTED_TO_VIRTUAL(limbs[limbIndex]))->segment);
skeleton = SEGMENTED_TO_VIRTUAL(skin->skeletonHeader->segment);
temp_t9 = SEGMENTED_TO_VIRTUAL(((SkinLimb*)SEGMENTED_TO_VIRTUAL(skeleton[limbIndex]))->segment);
if (!(arg4 & 1)) {
func_800A598C(gfxCtx, skin, limbIndex, arg3);
}
@ -134,13 +134,13 @@ void func_800A5E28(GraphicsContext* gfxCtx, PSkinAwb* skin, s32 limbIndex, s32 a
void func_800A5F60(GraphicsContext* gfxCtx, PSkinAwb* skin, s32 limbIndex, Gfx* arg3, s32 arg4) {
Gfx* gfx = arg3;
SkinLimb** limbs;
SkinLimb** skeleton;
s32 pad;
OPEN_DISPS(gfxCtx, "../z_skin.c", 395);
limbs = SEGMENTED_TO_VIRTUAL(skin->skeletonHeader->segment);
skeleton = SEGMENTED_TO_VIRTUAL(skin->skeletonHeader->segment);
if (arg3 == NULL) {
gfx = (Gfx*)((SkinLimb*)SEGMENTED_TO_VIRTUAL(limbs[limbIndex]))->segment;
gfx = ((SkinLimb*)SEGMENTED_TO_VIRTUAL(skeleton[limbIndex]))->segment;
}
if (gfx != NULL) {
Mtx* mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &D_801600C0[limbIndex]);
@ -158,7 +158,7 @@ void func_800A60D8(Actor* actor, GlobalContext* globalCtx, PSkinAwb* skin, SkinC
s32 arg5, s32 arg6, s32 arg7) {
s32 i;
s32 dataType;
SkinLimb** limbs;
SkinLimb** skeleton;
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
s32 pad;
@ -166,9 +166,10 @@ void func_800A60D8(Actor* actor, GlobalContext* globalCtx, PSkinAwb* skin, SkinC
if ((arg7 & 1) == 0) {
func_800A6AC4(skin, &D_801600C0[0], actor, arg5);
}
limbs = SEGMENTED_TO_VIRTUAL(skin->skeletonHeader->segment);
skeleton = SEGMENTED_TO_VIRTUAL(skin->skeletonHeader->segment);
if ((arg7 & 2) == 0) {
Mtx* mtx;
gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &skin->mtx);
if (mtx == NULL) {
@ -178,10 +179,11 @@ void func_800A60D8(Actor* actor, GlobalContext* globalCtx, PSkinAwb* skin, SkinC
}
for (i = 0; i < skin->skeletonHeader->limbCount; i++) {
s32 phi_a0 = 1;
if (arg4 != NULL) {
phi_a0 = arg4(actor, globalCtx, i, skin);
}
dataType = ((SkinLimb*)SEGMENTED_TO_VIRTUAL(limbs[i]))->unk_8;
dataType = ((SkinLimb*)SEGMENTED_TO_VIRTUAL(skeleton[i]))->unk_8;
if (dataType == 4 && phi_a0 == 1) {
func_800A5E28(gfxCtx, skin, i, arg6, arg7);
} else if (dataType == 0xB && phi_a0 == 1) {

View file

@ -1,11 +1,191 @@
#include "global.h"
#include "overlays/actors/ovl_En_fHG/z_en_fhg.h"
#pragma GLOBAL_ASM("asm/non_matchings/code/z_skin_awb/func_800A6460.s")
void func_800A6460(GlobalContext* globalCtx, PSkinAwb* skin, s32 limbIndex) {
s32 i;
SkinLimb** skeleton = SEGMENTED_TO_VIRTUAL(skin->skeletonHeader->segment);
Struct_800A5E28* temp_v1 = SEGMENTED_TO_VIRTUAL(((SkinLimb*)SEGMENTED_TO_VIRTUAL(skeleton[limbIndex]))->segment);
Struct_800A598C* temp_v0 = SEGMENTED_TO_VIRTUAL(temp_v1->unk_4);
Struct_800A598C* phi_s0;
Struct_800A57C0* temp_s1;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_skin_awb/func_800A663C.s")
for (i = 0; i < 2; i++) {
Vtx* temp2 = skin->avbTbl[limbIndex].buf[i];
#pragma GLOBAL_ASM("asm/non_matchings/code/z_skin_awb/func_800A6888.s")
for (phi_s0 = temp_v0; phi_s0 < temp_v0 + temp_v1->unk_2; phi_s0++) {
Struct_800A57C0* phi_s1 = SEGMENTED_TO_VIRTUAL(phi_s0->unk_8);
#pragma GLOBAL_ASM("asm/non_matchings/code/z_skin_awb/func_800A698C.s")
for (temp_s1 = phi_s1; temp_s1 < phi_s1 + phi_s0->unk_0; temp_s1++) {
Vtx* temp_t5_3 = &temp2[temp_s1->unk_0];
temp_t5_3->v.flag = 0;
temp_t5_3->v.tc[0] = temp_s1->unk_2;
temp_t5_3->v.tc[1] = temp_s1->unk_4;
temp_t5_3->v.cn[3] = temp_s1->unk_9;
}
}
}
}
void func_800A663C(GlobalContext* globalCtx, PSkinAwb* skin, SkeletonHeader* skeletonHeader,
AnimationHeader* animationHeader) {
s32 limbCount;
s32 i;
SkinLimb** skeleton;
SkeletonHeader* virtSkelHeader = SEGMENTED_TO_VIRTUAL(skeletonHeader);
skin->avbCount = virtSkelHeader->limbCount;
skin->skeletonHeader = virtSkelHeader;
skeleton = SEGMENTED_TO_VIRTUAL(skin->skeletonHeader->segment);
limbCount = skin->skeletonHeader->limbCount;
skin->avbTbl = ZeldaArena_MallocDebug(limbCount * sizeof(SkinAvb), "../z_skin_awb.c", 212);
if (skin->avbTbl == NULL) {
__assert("pskin_awb->avb_tbl != NULL", "../z_skin_awb.c", 214);
}
for (i = 0; i < limbCount; i++) {
SkinAvb* avbEntry = &skin->avbTbl[i];
SkinLimb* limb = SEGMENTED_TO_VIRTUAL(skeleton[i]);
if ((limb->unk_8 != 4) || (limb->segment == NULL)) {
avbEntry->unk_0 = 0;
avbEntry->buf[0] = NULL;
avbEntry->buf[1] = NULL;
} else {
Struct_800A5E28* temp_s1 = SEGMENTED_TO_VIRTUAL(((void)0, limb->segment));
avbEntry->unk_0 = 0;
avbEntry->buf[0] = ZeldaArena_MallocDebug(temp_s1->unk_0 * sizeof(Vtx), "../z_skin_awb.c", 235);
if (avbEntry->buf[0] == 0) {
__assert("psavb->buf[0] != NULL", "../z_skin_awb.c", 237);
}
avbEntry->buf[1] = ZeldaArena_MallocDebug(temp_s1->unk_0 * sizeof(Vtx), "../z_skin_awb.c", 240);
if (avbEntry->buf[1] == 0) {
__assert("psavb->buf[1] != NULL", "../z_skin_awb.c", 242);
}
func_800A6460(globalCtx, skin, i);
}
if (1) {}
}
SkelAnime_InitSkin(globalCtx, &skin->skelAnime, skeletonHeader, animationHeader);
}
void func_800A6888(GlobalContext* globalCtx, PSkinAwb* arg1) {
s32 i;
if (arg1->avbTbl != NULL) {
for (i = 0; i < arg1->avbCount; i++) {
if (arg1->avbTbl[i].buf[0] != 0) {
ZeldaArena_FreeDebug(arg1->avbTbl[i].buf[0], "../z_skin_awb.c", 276);
arg1->avbTbl[i].buf[0] = 0;
}
if (arg1->avbTbl[i].buf[1] != 0) {
ZeldaArena_FreeDebug(arg1->avbTbl[i].buf[1], "../z_skin_awb.c", 280);
arg1->avbTbl[i].buf[1] = 0;
}
}
if (arg1->avbTbl != NULL) {
ZeldaArena_FreeDebug(arg1->avbTbl, "../z_skin_awb.c", 286);
}
SkelAnime_Free(&arg1->skelAnime, globalCtx);
}
}
s32 func_800A698C(PSkinAwb* skin, SkinLimb** skeleton, MtxF* mf, u8 parentIndex, u8 limbIndex) {
s32 pad;
SkinLimb* limb = SEGMENTED_TO_VIRTUAL(skeleton[limbIndex]);
MtxF* mtx;
s32 temp_ret;
MtxF sp28;
if (parentIndex == 0xFF) {
SkinMatrix_GetClear(&mtx);
} else {
mtx = &mf[(s32)parentIndex];
}
SkinMatrix_MtxFMtxFMult(mtx, &mf[limbIndex], &sp28);
SkinMatrix_MtxFCopy(&sp28, &mf[limbIndex]);
if (limb->child != 0xFF) {
temp_ret = func_800A698C(skin, skeleton, mf, limbIndex, limb->child);
if (temp_ret) { // func_800A698C only returns false
return temp_ret;
}
}
if (limb->sibling != 0xFF) {
temp_ret = func_800A698C(skin, skeleton, mf, parentIndex, limb->sibling);
if (temp_ret) { // func_800A698C only returns false
return temp_ret;
}
}
return false;
}
#ifdef NON_MATCHING
// Matches except for an `addiu s0, s0, 0`, which obviously does nothing.
// Likely some indexing optimization I can't figure out.
s32 func_800A6AC4(PSkinAwb* skin, MtxF* arg1, Actor* actor, s32 arg3) {
s32 i;
u32 zero = 0;
f32 yRot;
f32 xRot;
f32 zRot;
s32 temp_ret;
f32 yTransl;
f32 xTransl;
f32 zTransl;
SkinLimb** skeleton = SEGMENTED_TO_VIRTUAL(skin->skeletonHeader->segment);
Vec3s* jointRot = &skin->skelAnime.jointTable[0];
jointRot++;
xRot = jointRot[0].x;
yRot = jointRot[0].y;
zRot = jointRot[0].z;
if (arg3 != 0) {
xTransl = jointRot[-1].x;
yTransl = jointRot[-1].y;
zTransl = jointRot[-1].z;
jointRot += zero;
if (arg3 == 0x23) {
EnfHG* horse = (EnfHG*)actor;
yRot += horse->turnRot;
}
SkinMatrix_SetRotateRPYTranslate(arg1, xRot, yRot, zRot, xTransl, yTransl, zTransl);
} else {
SkinMatrix_SetRotateRPYTranslate(arg1, xRot, yRot, zRot, 0.0f, 0.0f, 0.0f);
}
jointRot++;
for (i = 1; i < skin->skeletonHeader->limbCount; i++) {
SkinLimb* limb = SEGMENTED_TO_VIRTUAL(skeleton[i]);
xTransl = limb->jointPos.x;
yTransl = limb->jointPos.y;
zTransl = limb->jointPos.z;
xRot = jointRot->x;
yRot = jointRot->y;
zRot = jointRot->z;
jointRot++;
SkinMatrix_SetRotateRPYTranslate(&arg1[i], xRot, yRot, zRot, xTransl, yTransl, zTransl);
}
SkinMatrix_SetScaleRotateYRPTranslate(
&skin->mtx, actor->scale.x, actor->scale.y, actor->scale.z, actor->shape.rot.x, actor->shape.rot.y,
actor->shape.rot.z, actor->world.pos.x, actor->world.pos.y + (actor->shape.yOffset * actor->scale.y),
actor->world.pos.z);
temp_ret = func_800A698C(skin, SEGMENTED_TO_VIRTUAL(skin->skeletonHeader->segment), arg1, 0xFF, 0);
if (!temp_ret) { // func_800A698C only returns false
return temp_ret;
}
return 0;
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_skin_awb/func_800A6AC4.s")
#endif

View file

@ -15,7 +15,9 @@ typedef struct EnfHG {
/* 0x01C8 */ char unk_1C8;
/* 0x01C9 */ u8 flyMode;
/* 0x01CA */ u8 unk_1CA;
/* 0x01CB */ char unk_1CB[0x35];
/* 0x01CB */ char unk_1CB[0x15];
/* 0x01E0 */ s16 turnRot;
/* 0x01E2 */ char unk_1E2[0x1E];
/* 0x0200 */ Vec3f unk_200;
/* 0x020C */ Vec3f unk_20C;
/* 0x0218 */ char unk_218[0x7C];