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

z_en_kakasi2.c (#427)

* Decompiles z_en_kakasi2

- EnKakasi2_Init

* Destroy

* func_80A90264

* Finishes z_en_kakasi2

* Remove unused data/reloc

* Some hex fixes

* Some fixes

* Addresses PR comments

* Rename temp to be more generic

* More var renaming, timer modulo

* Change low rotation values to decimal

Co-authored-by: i82orbom <i82orbom i82orbom@github>
This commit is contained in:
i82orbom 2020-10-04 18:15:01 +02:00 committed by GitHub
parent ca2c493374
commit 353d4d134f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 217 additions and 790 deletions

View file

@ -1,12 +0,0 @@
glabel EnKakasi2_Destroy
/* 0022C 80A9023C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00230 80A90240 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
/* 00234 80A90244 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00238 80A90248 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 0023C 80A9024C 0C0170EB */ jal Collider_DestroyCylinder
/* 00240 80A90250 24C501AC */ addiu $a1, $a2, 0x01AC ## $a1 = 000001AC
/* 00244 80A90254 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00248 80A90258 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 0024C 80A9025C 03E00008 */ jr $ra
/* 00250 80A90260 00000000 */ nop

View file

@ -1,194 +0,0 @@
.rdata
glabel D_80A909F0
.asciz "\n\n"
.balign 4
glabel D_80A909F4
.asciz "\x1b[32m \n\x1b[m"
.balign 4
glabel D_80A90A24
.asciz "\x1b[33m () %f\n\x1b[m"
.balign 4
glabel D_80A90A54
.asciz "\x1b[33m () %f\n\x1b[m"
.balign 4
glabel D_80A90A84
.asciz "\x1b[33m %f\n\x1b[m"
.balign 4
glabel D_80A90AB4
.asciz "\x1b[33m %f\n\x1b[m"
.balign 4
glabel D_80A90AE4
.asciz "\x1b[33m %f\n\x1b[m"
.balign 4
glabel D_80A90B14
.asciz "\x1b[33m SAVE %d\n\x1b[m"
.balign 4
glabel D_80A90B44
.asciz "\n\n"
.balign 4
.text
glabel EnKakasi2_Init
/* 00000 80A90010 27BDFFB8 */ addiu $sp, $sp, 0xFFB8 ## $sp = FFFFFFB8
/* 00004 80A90014 AFB00028 */ sw $s0, 0x0028($sp)
/* 00008 80A90018 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 0000C 80A9001C AFBF002C */ sw $ra, 0x002C($sp)
/* 00010 80A90020 3C0480A9 */ lui $a0, %hi(D_80A909F0) ## $a0 = 80A90000
/* 00014 80A90024 AFA5004C */ sw $a1, 0x004C($sp)
/* 00018 80A90028 0C00084C */ jal osSyncPrintf
/* 0001C 80A9002C 248409F0 */ addiu $a0, $a0, %lo(D_80A909F0) ## $a0 = 80A909F0
/* 00020 80A90030 3C0480A9 */ lui $a0, %hi(D_80A909F4) ## $a0 = 80A90000
/* 00024 80A90034 0C00084C */ jal osSyncPrintf
/* 00028 80A90038 248409F4 */ addiu $a0, $a0, %lo(D_80A909F4) ## $a0 = 80A909F4
/* 0002C 80A9003C 8602001C */ lh $v0, 0x001C($s0) ## 0000001C
/* 00030 80A90040 86190034 */ lh $t9, 0x0034($s0) ## 00000034
/* 00034 80A90044 2401003F */ addiu $at, $zero, 0x003F ## $at = 0000003F
/* 00038 80A90048 304E003F */ andi $t6, $v0, 0x003F ## $t6 = 00000000
/* 0003C 80A9004C A60E0196 */ sh $t6, 0x0196($s0) ## 00000196
/* 00040 80A90050 00027983 */ sra $t7, $v0, 6
/* 00044 80A90054 86080196 */ lh $t0, 0x0196($s0) ## 00000196
/* 00048 80A90058 31F800FF */ andi $t8, $t7, 0x00FF ## $t8 = 00000000
/* 0004C 80A9005C 44982000 */ mtc1 $t8, $f4 ## $f4 = 0.00
/* 00050 80A90060 44993000 */ mtc1 $t9, $f6 ## $f6 = 0.00
/* 00054 80A90064 2409FFFF */ addiu $t1, $zero, 0xFFFF ## $t1 = FFFFFFFF
/* 00058 80A90068 468020A0 */ cvt.s.w $f2, $f4
/* 0005C 80A9006C 15010002 */ bne $t0, $at, .L80A90078
/* 00060 80A90070 46803320 */ cvt.s.w $f12, $f6
/* 00064 80A90074 A6090196 */ sh $t1, 0x0196($s0) ## 00000196
.L80A90078:
/* 00068 80A90078 3C014220 */ lui $at, 0x4220 ## $at = 42200000
/* 0006C 80A9007C 44810000 */ mtc1 $at, $f0 ## $f0 = 40.00
/* 00070 80A90080 46001121 */ cvt.d.s $f4, $f2
/* 00074 80A90084 240A0004 */ addiu $t2, $zero, 0x0004 ## $t2 = 00000004
/* 00078 80A90088 46001202 */ mul.s $f8, $f2, $f0
/* 0007C 80A9008C A20A001F */ sb $t2, 0x001F($s0) ## 0000001F
/* 00080 80A90090 44072000 */ mfc1 $a3, $f4
/* 00084 80A90094 46006402 */ mul.s $f16, $f12, $f0
/* 00088 80A90098 44062800 */ mfc1 $a2, $f5
/* 0008C 80A9009C 3C0480A9 */ lui $a0, %hi(D_80A90A24) ## $a0 = 80A90000
/* 00090 80A900A0 24840A24 */ addiu $a0, $a0, %lo(D_80A90A24) ## $a0 = 80A90A24
/* 00094 80A900A4 46004280 */ add.s $f10, $f8, $f0
/* 00098 80A900A8 46008480 */ add.s $f18, $f16, $f0
/* 0009C 80A900AC E60A019C */ swc1 $f10, 0x019C($s0) ## 0000019C
/* 000A0 80A900B0 E61201A0 */ swc1 $f18, 0x01A0($s0) ## 000001A0
/* 000A4 80A900B4 0C00084C */ jal osSyncPrintf
/* 000A8 80A900B8 E7AC0038 */ swc1 $f12, 0x0038($sp)
/* 000AC 80A900BC C7AC0038 */ lwc1 $f12, 0x0038($sp)
/* 000B0 80A900C0 3C0480A9 */ lui $a0, %hi(D_80A90A54) ## $a0 = 80A90000
/* 000B4 80A900C4 24840A54 */ addiu $a0, $a0, %lo(D_80A90A54) ## $a0 = 80A90A54
/* 000B8 80A900C8 460061A1 */ cvt.d.s $f6, $f12
/* 000BC 80A900CC 44073000 */ mfc1 $a3, $f6
/* 000C0 80A900D0 44063800 */ mfc1 $a2, $f7
/* 000C4 80A900D4 0C00084C */ jal osSyncPrintf
/* 000C8 80A900D8 00000000 */ nop
/* 000CC 80A900DC C608019C */ lwc1 $f8, 0x019C($s0) ## 0000019C
/* 000D0 80A900E0 3C0480A9 */ lui $a0, %hi(D_80A90A84) ## $a0 = 80A90000
/* 000D4 80A900E4 24840A84 */ addiu $a0, $a0, %lo(D_80A90A84) ## $a0 = 80A90A84
/* 000D8 80A900E8 460042A1 */ cvt.d.s $f10, $f8
/* 000DC 80A900EC 44075000 */ mfc1 $a3, $f10
/* 000E0 80A900F0 44065800 */ mfc1 $a2, $f11
/* 000E4 80A900F4 0C00084C */ jal osSyncPrintf
/* 000E8 80A900F8 00000000 */ nop
/* 000EC 80A900FC C61001A0 */ lwc1 $f16, 0x01A0($s0) ## 000001A0
/* 000F0 80A90100 3C0480A9 */ lui $a0, %hi(D_80A90AB4) ## $a0 = 80A90000
/* 000F4 80A90104 24840AB4 */ addiu $a0, $a0, %lo(D_80A90AB4) ## $a0 = 80A90AB4
/* 000F8 80A90108 460084A1 */ cvt.d.s $f18, $f16
/* 000FC 80A9010C 44079000 */ mfc1 $a3, $f18
/* 00100 80A90110 44069800 */ mfc1 $a2, $f19
/* 00104 80A90114 0C00084C */ jal osSyncPrintf
/* 00108 80A90118 00000000 */ nop
/* 0010C 80A9011C C60401A4 */ lwc1 $f4, 0x01A4($s0) ## 000001A4
/* 00110 80A90120 3C0480A9 */ lui $a0, %hi(D_80A90AE4) ## $a0 = 80A90000
/* 00114 80A90124 24840AE4 */ addiu $a0, $a0, %lo(D_80A90AE4) ## $a0 = 80A90AE4
/* 00118 80A90128 460021A1 */ cvt.d.s $f6, $f4
/* 0011C 80A9012C 44073000 */ mfc1 $a3, $f6
/* 00120 80A90130 44063800 */ mfc1 $a2, $f7
/* 00124 80A90134 0C00084C */ jal osSyncPrintf
/* 00128 80A90138 00000000 */ nop
/* 0012C 80A9013C 3C0480A9 */ lui $a0, %hi(D_80A90B14) ## $a0 = 80A90000
/* 00130 80A90140 24840B14 */ addiu $a0, $a0, %lo(D_80A90B14) ## $a0 = 80A90B14
/* 00134 80A90144 0C00084C */ jal osSyncPrintf
/* 00138 80A90148 86050196 */ lh $a1, 0x0196($s0) ## 00000196
/* 0013C 80A9014C 3C0480A9 */ lui $a0, %hi(D_80A90B44) ## $a0 = 80A90000
/* 00140 80A90150 0C00084C */ jal osSyncPrintf
/* 00144 80A90154 24840B44 */ addiu $a0, $a0, %lo(D_80A90B44) ## $a0 = 80A90B44
/* 00148 80A90158 3C014270 */ lui $at, 0x4270 ## $at = 42700000
/* 0014C 80A9015C 44814000 */ mtc1 $at, $f8 ## $f8 = 60.00
/* 00150 80A90160 240B00FF */ addiu $t3, $zero, 0x00FF ## $t3 = 000000FF
/* 00154 80A90164 3C053C23 */ lui $a1, 0x3C23 ## $a1 = 3C230000
/* 00158 80A90168 A20B00AE */ sb $t3, 0x00AE($s0) ## 000000AE
/* 0015C 80A9016C 34A5D70A */ ori $a1, $a1, 0xD70A ## $a1 = 3C23D70A
/* 00160 80A90170 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00164 80A90174 0C00B58B */ jal Actor_SetScale
/* 00168 80A90178 E60801A8 */ swc1 $f8, 0x01A8($s0) ## 000001A8
/* 0016C 80A9017C 8E0C0004 */ lw $t4, 0x0004($s0) ## 00000004
/* 00170 80A90180 86050196 */ lh $a1, 0x0196($s0) ## 00000196
/* 00174 80A90184 860E00B6 */ lh $t6, 0x00B6($s0) ## 000000B6
/* 00178 80A90188 358D0400 */ ori $t5, $t4, 0x0400 ## $t5 = 00000400
/* 0017C 80A9018C AE0D0004 */ sw $t5, 0x0004($s0) ## 00000004
/* 00180 80A90190 04A0001F */ bltz $a1, .L80A90210
/* 00184 80A90194 A60E0198 */ sh $t6, 0x0198($s0) ## 00000198
/* 00188 80A90198 0C00B2D0 */ jal Flags_GetSwitch
/* 0018C 80A9019C 8FA4004C */ lw $a0, 0x004C($sp)
/* 00190 80A901A0 1040001B */ beq $v0, $zero, .L80A90210
/* 00194 80A901A4 3C0F80A9 */ lui $t7, %hi(func_80A90948) ## $t7 = 80A90000
/* 00198 80A901A8 25EF0948 */ addiu $t7, $t7, %lo(func_80A90948) ## $t7 = 80A90948
/* 0019C 80A901AC AE0F0134 */ sw $t7, 0x0134($s0) ## 00000134
/* 001A0 80A901B0 260501AC */ addiu $a1, $s0, 0x01AC ## $a1 = 000001AC
/* 001A4 80A901B4 AFA50034 */ sw $a1, 0x0034($sp)
/* 001A8 80A901B8 0C0170D9 */ jal Collider_InitCylinder
/* 001AC 80A901BC 8FA4004C */ lw $a0, 0x004C($sp)
/* 001B0 80A901C0 3C0780A9 */ lui $a3, %hi(D_80A909A0) ## $a3 = 80A90000
/* 001B4 80A901C4 8FA50034 */ lw $a1, 0x0034($sp)
/* 001B8 80A901C8 24E709A0 */ addiu $a3, $a3, %lo(D_80A909A0) ## $a3 = 80A909A0
/* 001BC 80A901CC 8FA4004C */ lw $a0, 0x004C($sp)
/* 001C0 80A901D0 0C01712B */ jal Collider_SetCylinder
/* 001C4 80A901D4 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 001C8 80A901D8 3C060600 */ lui $a2, 0x0600 ## $a2 = 06000000
/* 001CC 80A901DC 3C070600 */ lui $a3, 0x0600 ## $a3 = 06000000
/* 001D0 80A901E0 24E70214 */ addiu $a3, $a3, 0x0214 ## $a3 = 06000214
/* 001D4 80A901E4 24C665B0 */ addiu $a2, $a2, 0x65B0 ## $a2 = 060065B0
/* 001D8 80A901E8 8FA4004C */ lw $a0, 0x004C($sp)
/* 001DC 80A901EC 26050150 */ addiu $a1, $s0, 0x0150 ## $a1 = 00000150
/* 001E0 80A901F0 AFA00010 */ sw $zero, 0x0010($sp)
/* 001E4 80A901F4 AFA00014 */ sw $zero, 0x0014($sp)
/* 001E8 80A901F8 0C0291BE */ jal SkelAnime_InitSV
/* 001EC 80A901FC AFA00018 */ sw $zero, 0x0018($sp)
/* 001F0 80A90200 3C1880A9 */ lui $t8, %hi(func_80A9062C) ## $t8 = 80A90000
/* 001F4 80A90204 2718062C */ addiu $t8, $t8, %lo(func_80A9062C) ## $t8 = 80A9062C
/* 001F8 80A90208 10000007 */ beq $zero, $zero, .L80A90228
/* 001FC 80A9020C AE18014C */ sw $t8, 0x014C($s0) ## 0000014C
.L80A90210:
/* 00200 80A90210 3C01C5FA */ lui $at, 0xC5FA ## $at = C5FA0000
/* 00204 80A90214 44815000 */ mtc1 $at, $f10 ## $f10 = -8000.00
/* 00208 80A90218 3C1980A9 */ lui $t9, %hi(func_80A90264) ## $t9 = 80A90000
/* 0020C 80A9021C 27390264 */ addiu $t9, $t9, %lo(func_80A90264) ## $t9 = 80A90264
/* 00210 80A90220 AE19014C */ sw $t9, 0x014C($s0) ## 0000014C
/* 00214 80A90224 E60A00BC */ swc1 $f10, 0x00BC($s0) ## 000000BC
.L80A90228:
/* 00218 80A90228 8FBF002C */ lw $ra, 0x002C($sp)
/* 0021C 80A9022C 8FB00028 */ lw $s0, 0x0028($sp)
/* 00220 80A90230 27BD0048 */ addiu $sp, $sp, 0x0048 ## $sp = 00000000
/* 00224 80A90234 03E00008 */ jr $ra
/* 00228 80A90238 00000000 */ nop

View file

@ -1,164 +0,0 @@
.rdata
glabel D_80A90BA0
.asciz "\x1b[33m this->actor.player_distance %f\n\x1b[m"
.balign 4
glabel D_80A90BE0
.asciz "\x1b[33m this->hosei.x %f\n\x1b[m"
.balign 4
.late_rodata
glabel D_80A90C10
.word 0x0A0A0000, 0x00000000, 0x00000000, 0x00000000
.text
glabel EnKakasi2_Update
/* 00720 80A90730 27BDFFA0 */ addiu $sp, $sp, 0xFFA0 ## $sp = FFFFFFA0
/* 00724 80A90734 AFBF004C */ sw $ra, 0x004C($sp)
/* 00728 80A90738 AFB10048 */ sw $s1, 0x0048($sp)
/* 0072C 80A9073C AFB00044 */ sw $s0, 0x0044($sp)
/* 00730 80A90740 888F00B4 */ lwl $t7, 0x00B4($a0) ## 000000B4
/* 00734 80A90744 988F00B7 */ lwr $t7, 0x00B7($a0) ## 000000B7
/* 00738 80A90748 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 0073C 80A9074C 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
/* 00740 80A90750 A88F0030 */ swl $t7, 0x0030($a0) ## 00000030
/* 00744 80A90754 B88F0033 */ swr $t7, 0x0033($a0) ## 00000033
/* 00748 80A90758 948F00B8 */ lhu $t7, 0x00B8($a0) ## 000000B8
/* 0074C 80A9075C A48F0034 */ sh $t7, 0x0034($a0) ## 00000034
/* 00750 80A90760 0C00B56E */ jal Actor_SetHeight
/* 00754 80A90764 8E0501A8 */ lw $a1, 0x01A8($s0) ## 000001A8
/* 00758 80A90768 8E19014C */ lw $t9, 0x014C($s0) ## 0000014C
/* 0075C 80A9076C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00760 80A90770 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000
/* 00764 80A90774 0320F809 */ jalr $ra, $t9
/* 00768 80A90778 00000000 */ nop
/* 0076C 80A9077C 0C00B638 */ jal Actor_MoveForward
/* 00770 80A90780 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00774 80A90784 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
/* 00778 80A90788 C60600BC */ lwc1 $f6, 0x00BC($s0) ## 000000BC
/* 0077C 80A9078C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00780 80A90790 260501AC */ addiu $a1, $s0, 0x01AC ## $a1 = 000001AC
/* 00784 80A90794 46062032 */ c.eq.s $f4, $f6
/* 00788 80A90798 00000000 */ nop
/* 0078C 80A9079C 4500000E */ bc1f .L80A907D8
/* 00790 80A907A0 00000000 */ nop
/* 00794 80A907A4 0C0189B7 */ jal Collider_CylinderUpdate
/* 00798 80A907A8 AFA50050 */ sw $a1, 0x0050($sp)
/* 0079C 80A907AC 3C010001 */ lui $at, 0x0001 ## $at = 00010000
/* 007A0 80A907B0 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60
/* 007A4 80A907B4 02212821 */ addu $a1, $s1, $at
/* 007A8 80A907B8 AFA50054 */ sw $a1, 0x0054($sp)
/* 007AC 80A907BC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 007B0 80A907C0 0C01767D */ jal CollisionCheck_SetAC
## CollisionCheck_setAC
/* 007B4 80A907C4 8FA60050 */ lw $a2, 0x0050($sp)
/* 007B8 80A907C8 8FA50054 */ lw $a1, 0x0054($sp)
/* 007BC 80A907CC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 007C0 80A907D0 0C017713 */ jal CollisionCheck_SetOC
## CollisionCheck_setOT
/* 007C4 80A907D4 8FA60050 */ lw $a2, 0x0050($sp)
.L80A907D8:
/* 007C8 80A907D8 3C028016 */ lui $v0, %hi(gGameInfo)
/* 007CC 80A907DC 8C42FA90 */ lw $v0, %lo(gGameInfo)($v0)
/* 007D0 80A907E0 845812D4 */ lh $t8, 0x12D4($v0) ## 801612D4
/* 007D4 80A907E4 53000054 */ beql $t8, $zero, .L80A90938
/* 007D8 80A907E8 8FBF004C */ lw $ra, 0x004C($sp)
/* 007DC 80A907EC 844812DE */ lh $t0, 0x12DE($v0) ## 801612DE
/* 007E0 80A907F0 51000015 */ beql $t0, $zero, .L80A90848
/* 007E4 80A907F4 8E090134 */ lw $t1, 0x0134($s0) ## 00000134
/* 007E8 80A907F8 C6080090 */ lwc1 $f8, 0x0090($s0) ## 00000090
/* 007EC 80A907FC 3C0480A9 */ lui $a0, %hi(D_80A90BA0) ## $a0 = 80A90000
/* 007F0 80A90800 24840BA0 */ addiu $a0, $a0, %lo(D_80A90BA0) ## $a0 = 80A90BA0
/* 007F4 80A90804 460042A1 */ cvt.d.s $f10, $f8
/* 007F8 80A90808 44075000 */ mfc1 $a3, $f10
/* 007FC 80A9080C 44065800 */ mfc1 $a2, $f11
/* 00800 80A90810 0C00084C */ jal osSyncPrintf
/* 00804 80A90814 00000000 */ nop
/* 00808 80A90818 C610019C */ lwc1 $f16, 0x019C($s0) ## 0000019C
/* 0080C 80A9081C 3C0480A9 */ lui $a0, %hi(D_80A90BE0) ## $a0 = 80A90000
/* 00810 80A90820 24840BE0 */ addiu $a0, $a0, %lo(D_80A90BE0) ## $a0 = 80A90BE0
/* 00814 80A90824 460084A1 */ cvt.d.s $f18, $f16
/* 00818 80A90828 44079000 */ mfc1 $a3, $f18
/* 0081C 80A9082C 44069800 */ mfc1 $a2, $f19
/* 00820 80A90830 0C00084C */ jal osSyncPrintf
/* 00824 80A90834 00000000 */ nop
/* 00828 80A90838 3C0480A9 */ lui $a0, %hi(D_80A90C10) ## $a0 = 80A90000
/* 0082C 80A9083C 0C00084C */ jal osSyncPrintf
/* 00830 80A90840 24840C10 */ addiu $a0, $a0, %lo(D_80A90C10) ## $a0 = 80A90C10
/* 00834 80A90844 8E090134 */ lw $t1, 0x0134($s0) ## 00000134
.L80A90848:
/* 00838 80A90848 5520003B */ bnel $t1, $zero, .L80A90938
/* 0083C 80A9084C 8FBF004C */ lw $ra, 0x004C($sp)
/* 00840 80A90850 86020194 */ lh $v0, 0x0194($s0) ## 00000194
/* 00844 80A90854 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 00848 80A90858 240B00FF */ addiu $t3, $zero, 0x00FF ## $t3 = 000000FF
/* 0084C 80A9085C 1040001F */ beq $v0, $zero, .L80A908DC
/* 00850 80A90860 240C00FF */ addiu $t4, $zero, 0x00FF ## $t4 = 000000FF
/* 00854 80A90864 304A0001 */ andi $t2, $v0, 0x0001 ## $t2 = 00000000
/* 00858 80A90868 15400032 */ bne $t2, $zero, .L80A90934
/* 0085C 80A9086C 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 00860 80A90870 860B0032 */ lh $t3, 0x0032($s0) ## 00000032
/* 00864 80A90874 C60C0024 */ lwc1 $f12, 0x0024($s0) ## 00000024
/* 00868 80A90878 C60E0028 */ lwc1 $f14, 0x0028($s0) ## 00000028
/* 0086C 80A9087C 8E06002C */ lw $a2, 0x002C($s0) ## 0000002C
/* 00870 80A90880 86070030 */ lh $a3, 0x0030($s0) ## 00000030
/* 00874 80A90884 AFAB0010 */ sw $t3, 0x0010($sp)
/* 00878 80A90888 860C0034 */ lh $t4, 0x0034($s0) ## 00000034
/* 0087C 80A9088C 44810000 */ mtc1 $at, $f0 ## $f0 = 1.00
/* 00880 80A90890 240D0046 */ addiu $t5, $zero, 0x0046 ## $t5 = 00000046
/* 00884 80A90894 240E0046 */ addiu $t6, $zero, 0x0046 ## $t6 = 00000046
/* 00888 80A90898 240F0046 */ addiu $t7, $zero, 0x0046 ## $t7 = 00000046
/* 0088C 80A9089C 241900FF */ addiu $t9, $zero, 0x00FF ## $t9 = 000000FF
/* 00890 80A908A0 24180004 */ addiu $t8, $zero, 0x0004 ## $t8 = 00000004
/* 00894 80A908A4 AFB80034 */ sw $t8, 0x0034($sp)
/* 00898 80A908A8 AFB90030 */ sw $t9, 0x0030($sp)
/* 0089C 80A908AC AFAF002C */ sw $t7, 0x002C($sp)
/* 008A0 80A908B0 AFAE0028 */ sw $t6, 0x0028($sp)
/* 008A4 80A908B4 AFAD0024 */ sw $t5, 0x0024($sp)
/* 008A8 80A908B8 AFAC0014 */ sw $t4, 0x0014($sp)
/* 008AC 80A908BC E7A00018 */ swc1 $f0, 0x0018($sp)
/* 008B0 80A908C0 E7A0001C */ swc1 $f0, 0x001C($sp)
/* 008B4 80A908C4 E7A00020 */ swc1 $f0, 0x0020($sp)
/* 008B8 80A908C8 8E280000 */ lw $t0, 0x0000($s1) ## 00000000
/* 008BC 80A908CC 0C018FA7 */ jal DebugDisplay_AddObject
/* 008C0 80A908D0 AFA80038 */ sw $t0, 0x0038($sp)
/* 008C4 80A908D4 10000018 */ beq $zero, $zero, .L80A90938
/* 008C8 80A908D8 8FBF004C */ lw $ra, 0x004C($sp)
.L80A908DC:
/* 008CC 80A908DC 86090032 */ lh $t1, 0x0032($s0) ## 00000032
/* 008D0 80A908E0 C60C0024 */ lwc1 $f12, 0x0024($s0) ## 00000024
/* 008D4 80A908E4 C60E0028 */ lwc1 $f14, 0x0028($s0) ## 00000028
/* 008D8 80A908E8 8E06002C */ lw $a2, 0x002C($s0) ## 0000002C
/* 008DC 80A908EC 86070030 */ lh $a3, 0x0030($s0) ## 00000030
/* 008E0 80A908F0 AFA90010 */ sw $t1, 0x0010($sp)
/* 008E4 80A908F4 860A0034 */ lh $t2, 0x0034($s0) ## 00000034
/* 008E8 80A908F8 44810000 */ mtc1 $at, $f0 ## $f0 = 0.00
/* 008EC 80A908FC 240D00FF */ addiu $t5, $zero, 0x00FF ## $t5 = 000000FF
/* 008F0 80A90900 240E0004 */ addiu $t6, $zero, 0x0004 ## $t6 = 00000004
/* 008F4 80A90904 AFAE0034 */ sw $t6, 0x0034($sp)
/* 008F8 80A90908 AFAD0030 */ sw $t5, 0x0030($sp)
/* 008FC 80A9090C AFAC002C */ sw $t4, 0x002C($sp)
/* 00900 80A90910 AFAB0028 */ sw $t3, 0x0028($sp)
/* 00904 80A90914 AFA00024 */ sw $zero, 0x0024($sp)
/* 00908 80A90918 AFAA0014 */ sw $t2, 0x0014($sp)
/* 0090C 80A9091C E7A00018 */ swc1 $f0, 0x0018($sp)
/* 00910 80A90920 E7A0001C */ swc1 $f0, 0x001C($sp)
/* 00914 80A90924 E7A00020 */ swc1 $f0, 0x0020($sp)
/* 00918 80A90928 8E2F0000 */ lw $t7, 0x0000($s1) ## 00000000
/* 0091C 80A9092C 0C018FA7 */ jal DebugDisplay_AddObject
/* 00920 80A90930 AFAF0038 */ sw $t7, 0x0038($sp)
.L80A90934:
/* 00924 80A90934 8FBF004C */ lw $ra, 0x004C($sp)
.L80A90938:
/* 00928 80A90938 8FB00044 */ lw $s0, 0x0044($sp)
/* 0092C 80A9093C 8FB10048 */ lw $s1, 0x0048($sp)
/* 00930 80A90940 03E00008 */ jr $ra
/* 00934 80A90944 27BD0060 */ addiu $sp, $sp, 0x0060 ## $sp = 00000000

View file

@ -1,181 +0,0 @@
.rdata
glabel D_80A90B48
.asciz "\x1b[32m SAVE %d\n\x1b[m"
.balign 4
glabel D_80A90B74
.asciz "\x1b[32m SAVE %d\n\x1b[m"
.balign 4
.text
glabel func_80A90264
/* 00254 80A90264 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
/* 00258 80A90268 AFBF002C */ sw $ra, 0x002C($sp)
/* 0025C 80A9026C AFB10028 */ sw $s1, 0x0028($sp)
/* 00260 80A90270 AFB00024 */ sw $s0, 0x0024($sp)
/* 00264 80A90274 848E0194 */ lh $t6, 0x0194($a0) ## 00000194
/* 00268 80A90278 8CA21C44 */ lw $v0, 0x1C44($a1) ## 00001C44
/* 0026C 80A9027C 3C188016 */ lui $t8, %hi(gGameInfo)
/* 00270 80A90280 25CF0001 */ addiu $t7, $t6, 0x0001 ## $t7 = 00000001
/* 00274 80A90284 A48F0194 */ sh $t7, 0x0194($a0) ## 00000194
/* 00278 80A90288 8F18FA90 */ lw $t8, %lo(gGameInfo)($t8)
/* 0027C 80A9028C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00280 80A90290 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
/* 00284 80A90294 871912D6 */ lh $t9, 0x12D6($t8) ## 801612D6
/* 00288 80A90298 5320003F */ beql $t9, $zero, .L80A90398
/* 0028C 80A9029C C6120090 */ lwc1 $f18, 0x0090($s0) ## 00000090
/* 00290 80A902A0 C4840090 */ lwc1 $f4, 0x0090($a0) ## 00000090
/* 00294 80A902A4 C486019C */ lwc1 $f6, 0x019C($a0) ## 0000019C
/* 00298 80A902A8 4606203C */ c.lt.s $f4, $f6
/* 0029C 80A902AC 00000000 */ nop
/* 002A0 80A902B0 45020039 */ bc1fl .L80A90398
/* 002A4 80A902B4 C6120090 */ lwc1 $f18, 0x0090($s0) ## 00000090
/* 002A8 80A902B8 C4480028 */ lwc1 $f8, 0x0028($v0) ## 00000028
/* 002AC 80A902BC C48A0028 */ lwc1 $f10, 0x0028($a0) ## 00000028
/* 002B0 80A902C0 C49001A0 */ lwc1 $f16, 0x01A0($a0) ## 000001A0
/* 002B4 80A902C4 3C0880A9 */ lui $t0, %hi(func_80A90948) ## $t0 = 80A90000
/* 002B8 80A902C8 460A4001 */ sub.s $f0, $f8, $f10
/* 002BC 80A902CC 25080948 */ addiu $t0, $t0, %lo(func_80A90948) ## $t0 = 80A90948
/* 002C0 80A902D0 46000005 */ abs.s $f0, $f0
/* 002C4 80A902D4 4610003C */ c.lt.s $f0, $f16
/* 002C8 80A902D8 00000000 */ nop
/* 002CC 80A902DC 4502002E */ bc1fl .L80A90398
/* 002D0 80A902E0 C6120090 */ lwc1 $f18, 0x0090($s0) ## 00000090
/* 002D4 80A902E4 AC880134 */ sw $t0, 0x0134($a0) ## 00000134
/* 002D8 80A902E8 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 002DC 80A902EC 260501AC */ addiu $a1, $s0, 0x01AC ## $a1 = 000001AC
/* 002E0 80A902F0 0C0170D9 */ jal Collider_InitCylinder
/* 002E4 80A902F4 AFA50030 */ sw $a1, 0x0030($sp)
/* 002E8 80A902F8 3C0780A9 */ lui $a3, %hi(D_80A909A0) ## $a3 = 80A90000
/* 002EC 80A902FC 8FA50030 */ lw $a1, 0x0030($sp)
/* 002F0 80A90300 24E709A0 */ addiu $a3, $a3, %lo(D_80A909A0) ## $a3 = 80A909A0
/* 002F4 80A90304 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 002F8 80A90308 0C01712B */ jal Collider_SetCylinder
/* 002FC 80A9030C 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 00300 80A90310 3C060600 */ lui $a2, 0x0600 ## $a2 = 06000000
/* 00304 80A90314 3C070600 */ lui $a3, 0x0600 ## $a3 = 06000000
/* 00308 80A90318 24E70214 */ addiu $a3, $a3, 0x0214 ## $a3 = 06000214
/* 0030C 80A9031C 24C665B0 */ addiu $a2, $a2, 0x65B0 ## $a2 = 060065B0
/* 00310 80A90320 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00314 80A90324 26050150 */ addiu $a1, $s0, 0x0150 ## $a1 = 00000150
/* 00318 80A90328 AFA00010 */ sw $zero, 0x0010($sp)
/* 0031C 80A9032C AFA00014 */ sw $zero, 0x0014($sp)
/* 00320 80A90330 0C0291BE */ jal SkelAnime_InitSV
/* 00324 80A90334 AFA00018 */ sw $zero, 0x0018($sp)
/* 00328 80A90338 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 0032C 80A9033C 0C020120 */ jal func_80080480
/* 00330 80A90340 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 00334 80A90344 8E090004 */ lw $t1, 0x0004($s0) ## 00000004
/* 00338 80A90348 3C010800 */ lui $at, 0x0800 ## $at = 08000000
/* 0033C 80A9034C 34210001 */ ori $at, $at, 0x0001 ## $at = 08000001
/* 00340 80A90350 01215025 */ or $t2, $t1, $at ## $t2 = 08000001
/* 00344 80A90354 AE0A0004 */ sw $t2, 0x0004($s0) ## 00000004
/* 00348 80A90358 0C01E221 */ jal func_80078884
/* 0034C 80A9035C 24044802 */ addiu $a0, $zero, 0x4802 ## $a0 = 00004802
/* 00350 80A90360 86050196 */ lh $a1, 0x0196($s0) ## 00000196
/* 00354 80A90364 04A00004 */ bltz $a1, .L80A90378
/* 00358 80A90368 00000000 */ nop
/* 0035C 80A9036C 0C00B2DD */ jal Flags_SetSwitch
/* 00360 80A90370 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00364 80A90374 86050196 */ lh $a1, 0x0196($s0) ## 00000196
.L80A90378:
/* 00368 80A90378 3C0480A9 */ lui $a0, %hi(D_80A90B48) ## $a0 = 80A90000
/* 0036C 80A9037C 0C00084C */ jal osSyncPrintf
/* 00370 80A90380 24840B48 */ addiu $a0, $a0, %lo(D_80A90B48) ## $a0 = 80A90B48
/* 00374 80A90384 3C0B80A9 */ lui $t3, %hi(func_80A904D8) ## $t3 = 80A90000
/* 00378 80A90388 256B04D8 */ addiu $t3, $t3, %lo(func_80A904D8) ## $t3 = 80A904D8
/* 0037C 80A9038C 1000004D */ beq $zero, $zero, .L80A904C4
/* 00380 80A90390 AE0B014C */ sw $t3, 0x014C($s0) ## 0000014C
/* 00384 80A90394 C6120090 */ lwc1 $f18, 0x0090($s0) ## 00000090
.L80A90398:
/* 00388 80A90398 C604019C */ lwc1 $f4, 0x019C($s0) ## 0000019C
/* 0038C 80A9039C 4604903C */ c.lt.s $f18, $f4
/* 00390 80A903A0 00000000 */ nop
/* 00394 80A903A4 45020048 */ bc1fl .L80A904C8
/* 00398 80A903A8 8FBF002C */ lw $ra, 0x002C($sp)
/* 0039C 80A903AC C4460028 */ lwc1 $f6, 0x0028($v0) ## 00000028
/* 003A0 80A903B0 C6080028 */ lwc1 $f8, 0x0028($s0) ## 00000028
/* 003A4 80A903B4 C60A01A0 */ lwc1 $f10, 0x01A0($s0) ## 000001A0
/* 003A8 80A903B8 3C0C8016 */ lui $t4, %hi(gSaveContext+0xee6)
/* 003AC 80A903BC 46083001 */ sub.s $f0, $f6, $f8
/* 003B0 80A903C0 46000005 */ abs.s $f0, $f0
/* 003B4 80A903C4 460A003C */ c.lt.s $f0, $f10
/* 003B8 80A903C8 00000000 */ nop
/* 003BC 80A903CC 4502003E */ bc1fl .L80A904C8
/* 003C0 80A903D0 8FBF002C */ lw $ra, 0x002C($sp)
/* 003C4 80A903D4 958CF546 */ lhu $t4, %lo(gSaveContext+0xee6)($t4)
/* 003C8 80A903D8 3C0E0001 */ lui $t6, 0x0001 ## $t6 = 00010000
/* 003CC 80A903DC 01D17021 */ addu $t6, $t6, $s1
/* 003D0 80A903E0 318D1000 */ andi $t5, $t4, 0x1000 ## $t5 = 00000000
/* 003D4 80A903E4 51A00038 */ beql $t5, $zero, .L80A904C8
/* 003D8 80A903E8 8FBF002C */ lw $ra, 0x002C($sp)
/* 003DC 80A903EC A6000194 */ sh $zero, 0x0194($s0) ## 00000194
/* 003E0 80A903F0 95CE04C6 */ lhu $t6, 0x04C6($t6) ## 000104C6
/* 003E4 80A903F4 2401000B */ addiu $at, $zero, 0x000B ## $at = 0000000B
/* 003E8 80A903F8 55C10033 */ bnel $t6, $at, .L80A904C8
/* 003EC 80A903FC 8FBF002C */ lw $ra, 0x002C($sp)
/* 003F0 80A90400 86050196 */ lh $a1, 0x0196($s0) ## 00000196
/* 003F4 80A90404 04A00004 */ bltz $a1, .L80A90418
/* 003F8 80A90408 00000000 */ nop
/* 003FC 80A9040C 0C00B2DD */ jal Flags_SetSwitch
/* 00400 80A90410 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00404 80A90414 86050196 */ lh $a1, 0x0196($s0) ## 00000196
.L80A90418:
/* 00408 80A90418 3C0480A9 */ lui $a0, %hi(D_80A90B74) ## $a0 = 80A90000
/* 0040C 80A9041C 0C00084C */ jal osSyncPrintf
/* 00410 80A90420 24840B74 */ addiu $a0, $a0, %lo(D_80A90B74) ## $a0 = 80A90B74
/* 00414 80A90424 3C010001 */ lui $at, 0x0001 ## $at = 00010000
/* 00418 80A90428 00310821 */ addu $at, $at, $s1
/* 0041C 80A9042C 240F0004 */ addiu $t7, $zero, 0x0004 ## $t7 = 00000004
/* 00420 80A90430 3C1880A9 */ lui $t8, %hi(func_80A90948) ## $t8 = 80A90000
/* 00424 80A90434 A42F04C6 */ sh $t7, 0x04C6($at) ## 000104C6
/* 00428 80A90438 27180948 */ addiu $t8, $t8, %lo(func_80A90948) ## $t8 = 80A90948
/* 0042C 80A9043C AE180134 */ sw $t8, 0x0134($s0) ## 00000134
/* 00430 80A90440 260501AC */ addiu $a1, $s0, 0x01AC ## $a1 = 000001AC
/* 00434 80A90444 AFA50030 */ sw $a1, 0x0030($sp)
/* 00438 80A90448 0C0170D9 */ jal Collider_InitCylinder
/* 0043C 80A9044C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00440 80A90450 3C0780A9 */ lui $a3, %hi(D_80A909A0) ## $a3 = 80A90000
/* 00444 80A90454 8FA50030 */ lw $a1, 0x0030($sp)
/* 00448 80A90458 24E709A0 */ addiu $a3, $a3, %lo(D_80A909A0) ## $a3 = 80A909A0
/* 0044C 80A9045C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00450 80A90460 0C01712B */ jal Collider_SetCylinder
/* 00454 80A90464 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 00458 80A90468 3C060600 */ lui $a2, 0x0600 ## $a2 = 06000000
/* 0045C 80A9046C 3C070600 */ lui $a3, 0x0600 ## $a3 = 06000000
/* 00460 80A90470 24E70214 */ addiu $a3, $a3, 0x0214 ## $a3 = 06000214
/* 00464 80A90474 24C665B0 */ addiu $a2, $a2, 0x65B0 ## $a2 = 060065B0
/* 00468 80A90478 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 0046C 80A9047C 26050150 */ addiu $a1, $s0, 0x0150 ## $a1 = 00000150
/* 00470 80A90480 AFA00010 */ sw $zero, 0x0010($sp)
/* 00474 80A90484 AFA00014 */ sw $zero, 0x0014($sp)
/* 00478 80A90488 0C0291BE */ jal SkelAnime_InitSV
/* 0047C 80A9048C AFA00018 */ sw $zero, 0x0018($sp)
/* 00480 80A90490 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000
/* 00484 80A90494 0C020120 */ jal func_80080480
/* 00488 80A90498 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 0048C 80A9049C 0C01E221 */ jal func_80078884
/* 00490 80A904A0 24044802 */ addiu $a0, $zero, 0x4802 ## $a0 = 00004802
/* 00494 80A904A4 8E190004 */ lw $t9, 0x0004($s0) ## 00000004
/* 00498 80A904A8 3C010800 */ lui $at, 0x0800 ## $at = 08000000
/* 0049C 80A904AC 34210001 */ ori $at, $at, 0x0001 ## $at = 08000001
/* 004A0 80A904B0 3C0980A9 */ lui $t1, %hi(func_80A904D8) ## $t1 = 80A90000
/* 004A4 80A904B4 252904D8 */ addiu $t1, $t1, %lo(func_80A904D8) ## $t1 = 80A904D8
/* 004A8 80A904B8 03214025 */ or $t0, $t9, $at ## $t0 = 08000001
/* 004AC 80A904BC AE080004 */ sw $t0, 0x0004($s0) ## 00000004
/* 004B0 80A904C0 AE09014C */ sw $t1, 0x014C($s0) ## 0000014C
.L80A904C4:
/* 004B4 80A904C4 8FBF002C */ lw $ra, 0x002C($sp)
.L80A904C8:
/* 004B8 80A904C8 8FB00024 */ lw $s0, 0x0024($sp)
/* 004BC 80A904CC 8FB10028 */ lw $s1, 0x0028($sp)
/* 004C0 80A904D0 03E00008 */ jr $ra
/* 004C4 80A904D4 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000

View file

@ -1,44 +0,0 @@
glabel func_80A904D8
/* 004C8 80A904D8 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 004CC 80A904DC AFA40028 */ sw $a0, 0x0028($sp)
/* 004D0 80A904E0 AFBF0024 */ sw $ra, 0x0024($sp)
/* 004D4 80A904E4 3C040600 */ lui $a0, 0x0600 ## $a0 = 06000000
/* 004D8 80A904E8 AFA5002C */ sw $a1, 0x002C($sp)
/* 004DC 80A904EC 0C028800 */ jal SkelAnime_GetFrameCount
/* 004E0 80A904F0 24840214 */ addiu $a0, $a0, 0x0214 ## $a0 = 06000214
/* 004E4 80A904F4 44822000 */ mtc1 $v0, $f4 ## $f4 = 0.00
/* 004E8 80A904F8 3C01C120 */ lui $at, 0xC120 ## $at = C1200000
/* 004EC 80A904FC 44819000 */ mtc1 $at, $f18 ## $f18 = -10.00
/* 004F0 80A90500 468021A0 */ cvt.s.w $f6, $f4
/* 004F4 80A90504 8FA40028 */ lw $a0, 0x0028($sp)
/* 004F8 80A90508 3C050600 */ lui $a1, 0x0600 ## $a1 = 06000000
/* 004FC 80A9050C 24A50214 */ addiu $a1, $a1, 0x0214 ## $a1 = 06000214
/* 00500 80A90510 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000
/* 00504 80A90514 24070000 */ addiu $a3, $zero, 0x0000 ## $a3 = 00000000
/* 00508 80A90518 4600320D */ trunc.w.s $f8, $f6
/* 0050C 80A9051C AFA00014 */ sw $zero, 0x0014($sp)
/* 00510 80A90520 E7B20018 */ swc1 $f18, 0x0018($sp)
/* 00514 80A90524 24840150 */ addiu $a0, $a0, 0x0150 ## $a0 = 00000150
/* 00518 80A90528 440F4000 */ mfc1 $t7, $f8
/* 0051C 80A9052C 00000000 */ nop
/* 00520 80A90530 000FC400 */ sll $t8, $t7, 16
/* 00524 80A90534 0018CC03 */ sra $t9, $t8, 16
/* 00528 80A90538 44995000 */ mtc1 $t9, $f10 ## $f10 = 0.00
/* 0052C 80A9053C 00000000 */ nop
/* 00530 80A90540 46805420 */ cvt.s.w $f16, $f10
/* 00534 80A90544 0C029468 */ jal SkelAnime_ChangeAnim
/* 00538 80A90548 E7B00010 */ swc1 $f16, 0x0010($sp)
/* 0053C 80A9054C 8FA40028 */ lw $a0, 0x0028($sp)
/* 00540 80A90550 0C00BE0A */ jal Audio_PlayActorSound2
/* 00544 80A90554 240528BF */ addiu $a1, $zero, 0x28BF ## $a1 = 000028BF
/* 00548 80A90558 8FA90028 */ lw $t1, 0x0028($sp)
/* 0054C 80A9055C 3C0880A9 */ lui $t0, %hi(func_80A90578) ## $t0 = 80A90000
/* 00550 80A90560 25080578 */ addiu $t0, $t0, %lo(func_80A90578) ## $t0 = 80A90578
/* 00554 80A90564 AD28014C */ sw $t0, 0x014C($t1) ## 0000014C
/* 00558 80A90568 8FBF0024 */ lw $ra, 0x0024($sp)
/* 0055C 80A9056C 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
/* 00560 80A90570 03E00008 */ jr $ra
/* 00564 80A90574 00000000 */ nop

View file

@ -1,52 +0,0 @@
glabel func_80A90578
/* 00568 80A90578 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 0056C 80A9057C AFB00018 */ sw $s0, 0x0018($sp)
/* 00570 80A90580 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 00574 80A90584 AFBF001C */ sw $ra, 0x001C($sp)
/* 00578 80A90588 AFA50024 */ sw $a1, 0x0024($sp)
/* 0057C 80A9058C 0C02927F */ jal SkelAnime_FrameUpdateMatrix
/* 00580 80A90590 24840150 */ addiu $a0, $a0, 0x0150 ## $a0 = 00000150
/* 00584 80A90594 C6040168 */ lwc1 $f4, 0x0168($s0) ## 00000168
/* 00588 80A90598 2401000B */ addiu $at, $zero, 0x000B ## $at = 0000000B
/* 0058C 80A9059C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 00590 80A905A0 4600218D */ trunc.w.s $f6, $f4
/* 00594 80A905A4 44023000 */ mfc1 $v0, $f6
/* 00598 80A905A8 00000000 */ nop
/* 0059C 80A905AC 00021400 */ sll $v0, $v0, 16
/* 005A0 80A905B0 00021403 */ sra $v0, $v0, 16
/* 005A4 80A905B4 10410003 */ beq $v0, $at, .L80A905C4
/* 005A8 80A905B8 24010011 */ addiu $at, $zero, 0x0011 ## $at = 00000011
/* 005AC 80A905BC 54410004 */ bnel $v0, $at, .L80A905D0
/* 005B0 80A905C0 860F00B6 */ lh $t7, 0x00B6($s0) ## 000000B6
.L80A905C4:
/* 005B4 80A905C4 0C00BE0A */ jal Audio_PlayActorSound2
/* 005B8 80A905C8 2405286A */ addiu $a1, $zero, 0x286A ## $a1 = 0000286A
/* 005BC 80A905CC 860F00B6 */ lh $t7, 0x00B6($s0) ## 000000B6
.L80A905D0:
/* 005C0 80A905D0 260400BC */ addiu $a0, $s0, 0x00BC ## $a0 = 000000BC
/* 005C4 80A905D4 3C053F00 */ lui $a1, 0x3F00 ## $a1 = 3F000000
/* 005C8 80A905D8 25F80800 */ addiu $t8, $t7, 0x0800 ## $t8 = 00000800
/* 005CC 80A905DC A61800B6 */ sh $t8, 0x00B6($s0) ## 000000B6
/* 005D0 80A905E0 0C01E123 */ jal Math_SmoothDownscaleMaxF
/* 005D4 80A905E4 3C0643FA */ lui $a2, 0x43FA ## $a2 = 43FA0000
/* 005D8 80A905E8 3C01C2C8 */ lui $at, 0xC2C8 ## $at = C2C80000
/* 005DC 80A905EC 44814000 */ mtc1 $at, $f8 ## $f8 = -100.00
/* 005E0 80A905F0 C60A00BC */ lwc1 $f10, 0x00BC($s0) ## 000000BC
/* 005E4 80A905F4 3C1980A9 */ lui $t9, %hi(func_80A9062C) ## $t9 = 80A90000
/* 005E8 80A905F8 460A403C */ c.lt.s $f8, $f10
/* 005EC 80A905FC 00000000 */ nop
/* 005F0 80A90600 45020006 */ bc1fl .L80A9061C
/* 005F4 80A90604 8FBF001C */ lw $ra, 0x001C($sp)
/* 005F8 80A90608 44808000 */ mtc1 $zero, $f16 ## $f16 = 0.00
/* 005FC 80A9060C 2739062C */ addiu $t9, $t9, %lo(func_80A9062C) ## $t9 = 80A9062C
/* 00600 80A90610 AE19014C */ sw $t9, 0x014C($s0) ## 0000014C
/* 00604 80A90614 E61000BC */ swc1 $f16, 0x00BC($s0) ## 000000BC
/* 00608 80A90618 8FBF001C */ lw $ra, 0x001C($sp)
.L80A9061C:
/* 0060C 80A9061C 8FB00018 */ lw $s0, 0x0018($sp)
/* 00610 80A90620 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 00614 80A90624 03E00008 */ jr $ra
/* 00618 80A90628 00000000 */ nop

View file

@ -1,41 +0,0 @@
glabel func_80A9062C
/* 0061C 80A9062C 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 00620 80A90630 AFA40028 */ sw $a0, 0x0028($sp)
/* 00624 80A90634 AFBF0024 */ sw $ra, 0x0024($sp)
/* 00628 80A90638 3C040600 */ lui $a0, 0x0600 ## $a0 = 06000000
/* 0062C 80A9063C AFA5002C */ sw $a1, 0x002C($sp)
/* 00630 80A90640 0C028800 */ jal SkelAnime_GetFrameCount
/* 00634 80A90644 24840214 */ addiu $a0, $a0, 0x0214 ## $a0 = 06000214
/* 00638 80A90648 44822000 */ mtc1 $v0, $f4 ## $f4 = 0.00
/* 0063C 80A9064C 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
/* 00640 80A90650 3C01C120 */ lui $at, 0xC120 ## $at = C1200000
/* 00644 80A90654 468021A0 */ cvt.s.w $f6, $f4
/* 00648 80A90658 44819000 */ mtc1 $at, $f18 ## $f18 = -10.00
/* 0064C 80A9065C 8FA40028 */ lw $a0, 0x0028($sp)
/* 00650 80A90660 3C050600 */ lui $a1, 0x0600 ## $a1 = 06000000
/* 00654 80A90664 24080002 */ addiu $t0, $zero, 0x0002 ## $t0 = 00000002
/* 00658 80A90668 44060000 */ mfc1 $a2, $f0
/* 0065C 80A9066C 4600320D */ trunc.w.s $f8, $f6
/* 00660 80A90670 44070000 */ mfc1 $a3, $f0
/* 00664 80A90674 AFA80014 */ sw $t0, 0x0014($sp)
/* 00668 80A90678 24A50214 */ addiu $a1, $a1, 0x0214 ## $a1 = 06000214
/* 0066C 80A9067C 440F4000 */ mfc1 $t7, $f8
/* 00670 80A90680 24840150 */ addiu $a0, $a0, 0x0150 ## $a0 = 00000150
/* 00674 80A90684 E7B20018 */ swc1 $f18, 0x0018($sp)
/* 00678 80A90688 000FC400 */ sll $t8, $t7, 16
/* 0067C 80A9068C 0018CC03 */ sra $t9, $t8, 16
/* 00680 80A90690 44995000 */ mtc1 $t9, $f10 ## $f10 = 0.00
/* 00684 80A90694 00000000 */ nop
/* 00688 80A90698 46805420 */ cvt.s.w $f16, $f10
/* 0068C 80A9069C 0C029468 */ jal SkelAnime_ChangeAnim
/* 00690 80A906A0 E7B00010 */ swc1 $f16, 0x0010($sp)
/* 00694 80A906A4 8FAA0028 */ lw $t2, 0x0028($sp)
/* 00698 80A906A8 3C0980A9 */ lui $t1, %hi(func_80A906C4) ## $t1 = 80A90000
/* 0069C 80A906AC 252906C4 */ addiu $t1, $t1, %lo(func_80A906C4) ## $t1 = 80A906C4
/* 006A0 80A906B0 AD49014C */ sw $t1, 0x014C($t2) ## 0000014C
/* 006A4 80A906B4 8FBF0024 */ lw $ra, 0x0024($sp)
/* 006A8 80A906B8 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
/* 006AC 80A906BC 03E00008 */ jr $ra
/* 006B0 80A906C0 00000000 */ nop

View file

@ -1,32 +0,0 @@
glabel func_80A906C4
/* 006B4 80A906C4 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 006B8 80A906C8 AFBF0024 */ sw $ra, 0x0024($sp)
/* 006BC 80A906CC AFB00020 */ sw $s0, 0x0020($sp)
/* 006C0 80A906D0 AFA5002C */ sw $a1, 0x002C($sp)
/* 006C4 80A906D4 C4860168 */ lwc1 $f6, 0x0168($a0) ## 00000168
/* 006C8 80A906D8 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00
/* 006CC 80A906DC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 006D0 80A906E0 24840168 */ addiu $a0, $a0, 0x0168 ## $a0 = 00000168
/* 006D4 80A906E4 46062032 */ c.eq.s $f4, $f6
/* 006D8 80A906E8 3C053F00 */ lui $a1, 0x3F00 ## $a1 = 3F000000
/* 006DC 80A906EC 45030004 */ bc1tl .L80A90700
/* 006E0 80A906F0 86050198 */ lh $a1, 0x0198($s0) ## 00000198
/* 006E4 80A906F4 0C01E123 */ jal Math_SmoothDownscaleMaxF
/* 006E8 80A906F8 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000
/* 006EC 80A906FC 86050198 */ lh $a1, 0x0198($s0) ## 00000198
.L80A90700:
/* 006F0 80A90700 AFA00010 */ sw $zero, 0x0010($sp)
/* 006F4 80A90704 260400B6 */ addiu $a0, $s0, 0x00B6 ## $a0 = 000000B6
/* 006F8 80A90708 24060005 */ addiu $a2, $zero, 0x0005 ## $a2 = 00000005
/* 006FC 80A9070C 0C01E1A7 */ jal Math_SmoothScaleMaxMinS
/* 00700 80A90710 24070BB8 */ addiu $a3, $zero, 0x0BB8 ## $a3 = 00000BB8
/* 00704 80A90714 0C02927F */ jal SkelAnime_FrameUpdateMatrix
/* 00708 80A90718 26040150 */ addiu $a0, $s0, 0x0150 ## $a0 = 00000150
/* 0070C 80A9071C 8FBF0024 */ lw $ra, 0x0024($sp)
/* 00710 80A90720 8FB00020 */ lw $s0, 0x0020($sp)
/* 00714 80A90724 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
/* 00718 80A90728 03E00008 */ jr $ra
/* 0071C 80A9072C 00000000 */ nop

View file

@ -1,23 +0,0 @@
glabel func_80A90948
/* 00938 80A90948 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8
/* 0093C 80A9094C AFBF0024 */ sw $ra, 0x0024($sp)
/* 00940 80A90950 AFA40028 */ sw $a0, 0x0028($sp)
/* 00944 80A90954 AFA5002C */ sw $a1, 0x002C($sp)
/* 00948 80A90958 0C024F46 */ jal func_80093D18
/* 0094C 80A9095C 8CA40000 */ lw $a0, 0x0000($a1) ## 00000000
/* 00950 80A90960 8FA20028 */ lw $v0, 0x0028($sp)
/* 00954 80A90964 8FA4002C */ lw $a0, 0x002C($sp)
/* 00958 80A90968 8C450154 */ lw $a1, 0x0154($v0) ## 00000154
/* 0095C 80A9096C 8C460170 */ lw $a2, 0x0170($v0) ## 00000170
/* 00960 80A90970 90470152 */ lbu $a3, 0x0152($v0) ## 00000152
/* 00964 80A90974 AFA00014 */ sw $zero, 0x0014($sp)
/* 00968 80A90978 AFA00010 */ sw $zero, 0x0010($sp)
/* 0096C 80A9097C 0C0286B2 */ jal SkelAnime_DrawSV
/* 00970 80A90980 AFA20018 */ sw $v0, 0x0018($sp)
/* 00974 80A90984 8FBF0024 */ lw $ra, 0x0024($sp)
/* 00978 80A90988 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000
/* 0097C 80A9098C 03E00008 */ jr $ra
/* 00980 80A90990 00000000 */ nop
/* 00984 80A90994 00000000 */ nop
/* 00988 80A90998 00000000 */ nop
/* 0098C 80A9099C 00000000 */ nop

View file

@ -1,20 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .data
.balign 16
glabel D_80A909A0
.word 0x0A000939, 0x20010000, 0x00000000, 0xFFCFFFFF, 0x00000000, 0xFFCFFFFF, 0x00000000, 0x00050100, 0x00140046, 0x00000000, 0x00000000
glabel En_Kakasi2_InitVars
.word 0x01C90600, 0x0A000031, 0x01540000, 0x000001F8
.word EnKakasi2_Init
.word EnKakasi2_Destroy
.word EnKakasi2_Update
.word 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_80A90C20
.incbin "baserom/ovl_En_Kakasi2", 0xC10, 0x00000100

3
spec
View file

@ -2645,8 +2645,7 @@ endseg
beginseg
name "ovl_En_Kakasi2"
include "build/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.o"
include "build/data/overlays/actors/z_en_kakasi2.data.o"
include "build/data/overlays/actors/z_en_kakasi2.reloc.o"
include "build/src/overlays/actors/ovl_En_Kakasi2/ovl_En_Kakasi2_reloc.o"
endseg
beginseg

View file

@ -1,14 +1,36 @@
/*
* File: z_en_kakasi2.c
* Overlay: ovl_En_Kakasi2
* Description: Pierre the Scarecrow Spawn
*/
#include "z_en_kakasi2.h"
#include "vt.h"
#define FLAGS 0x0A000031
#define THIS ((EnKakasi2*)thisx)
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x00, 0x09, 0x39, 0x20, COLSHAPE_CYLINDER },
{ 0x00, { 0xFFCFFFFF, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x05, 0x01 },
{ 20, 70, 0, { 0, 0, 0 } },
};
void EnKakasi2_Init(Actor* thisx, GlobalContext* globalCtx);
void EnKakasi2_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnKakasi2_Update(Actor* thisx, GlobalContext* globalCtx);
void func_80A90948(Actor* thisx, GlobalContext* globalCtx);
void func_80A9062C(EnKakasi2* this, GlobalContext* globalCtx);
void func_80A90264(EnKakasi2* this, GlobalContext* globalCtx);
void func_80A904D8(EnKakasi2* this, GlobalContext* globalCtx);
void func_80A90578(EnKakasi2* this, GlobalContext* globalCtx);
void func_80A906C4(EnKakasi2* this, GlobalContext* globalCtx);
extern SkeletonHeader D_060065B0;
extern AnimationHeader D_06000214;
/*
const ActorInit En_Kakasi2_InitVars = {
ACTOR_EN_KAKASI2,
ACTORTYPE_PROP,
@ -20,21 +42,193 @@ const ActorInit En_Kakasi2_InitVars = {
(ActorFunc)EnKakasi2_Update,
NULL,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Kakasi2/EnKakasi2_Init.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Kakasi2/EnKakasi2_Destroy.s")
void EnKakasi2_Init(Actor* thisx, GlobalContext* globalCtx) {
EnKakasi2* this = THIS;
s32 pad;
f32 spawnRangeY;
f32 spawnRangeXZ;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Kakasi2/func_80A90264.s")
osSyncPrintf("\n\n");
// Visit Umeda
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 梅田参号見参! ☆☆☆☆☆ \n" VT_RST);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Kakasi2/func_80A904D8.s")
this->switchFlag = this->actor.params & 0x3F;
spawnRangeY = (this->actor.params >> 6) & 0xFF;
spawnRangeXZ = this->actor.posRot.rot.z;
if (this->switchFlag == 0x3F) {
this->switchFlag = -1;
}
this->actor.unk_1F = 4;
this->maxSpawnDistance.x = (spawnRangeY * 40.0f) + 40.0f;
this->maxSpawnDistance.y = (spawnRangeXZ * 40.0f) + 40.0f;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Kakasi2/func_80A90578.s")
// Former? (Argument 0)
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 元?(引数0) ☆☆☆☆ %f\n" VT_RST, spawnRangeY);
// Former? (Z angle)
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 元?(Zアングル) ☆☆ %f\n" VT_RST, spawnRangeXZ);
// Correction coordinates X
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 補正座標X ☆☆☆☆☆ %f\n" VT_RST, this->maxSpawnDistance.x);
// Correction coordinates Y
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 補正座標Y ☆☆☆☆☆ %f\n" VT_RST, this->maxSpawnDistance.y);
// Correction coordinates Z
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 補正座標Z ☆☆☆☆☆ %f\n" VT_RST, this->maxSpawnDistance.z);
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ SAVE ☆☆☆☆☆ %d\n" VT_RST, this->switchFlag);
osSyncPrintf("\n\n");
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Kakasi2/func_80A9062C.s")
this->actor.colChkInfo.mass = 0xFF;
this->height = 60.0f;
Actor_SetScale(&this->actor, 0.01f);
this->actor.flags |= 0x400;
this->unk_198 = this->actor.shape.rot.y;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Kakasi2/func_80A906C4.s")
if (this->switchFlag >= 0 && Flags_GetSwitch(globalCtx, this->switchFlag)) {
this->actor.draw = func_80A90948;
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_060065B0, &D_06000214, NULL, NULL, 0);
this->actionFunc = func_80A9062C;
} else {
this->actionFunc = func_80A90264;
this->actor.shape.unk_08 = -8000.0f;
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Kakasi2/EnKakasi2_Update.s")
void EnKakasi2_Destroy(Actor* thisx, GlobalContext* globalCtx) {
EnKakasi2* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Kakasi2/func_80A90948.s")
Collider_DestroyCylinder(globalCtx, &this->collider);
//! @bug Skelanime_Free is not called
}
void func_80A90264(EnKakasi2* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
this->unk_194++;
if ((BREG(1) != 0) && (this->actor.xzDistFromLink < this->maxSpawnDistance.x) &&
(fabsf(player->actor.posRot.pos.y - this->actor.posRot.pos.y) < this->maxSpawnDistance.y)) {
this->actor.draw = func_80A90948;
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_060065B0, &D_06000214, NULL, NULL, 0);
func_80080480(globalCtx, this);
this->actor.flags |= 0x8000001;
func_80078884(NA_SE_SY_CORRECT_CHIME);
if (this->switchFlag >= 0) {
Flags_SetSwitch(globalCtx, this->switchFlag);
}
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ SAVE 終了 ☆☆☆☆☆ %d\n" VT_RST, this->switchFlag);
this->actionFunc = func_80A904D8;
} else if ((this->actor.xzDistFromLink < this->maxSpawnDistance.x) &&
(fabsf(player->actor.posRot.pos.y - this->actor.posRot.pos.y) < this->maxSpawnDistance.y) &&
(gSaveContext.eventChkInf[9] & 0x1000)) {
this->unk_194 = 0;
if (globalCtx->msgCtx.unk_E3EE == 11) {
if (this->switchFlag >= 0) {
Flags_SetSwitch(globalCtx, this->switchFlag);
}
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ SAVE 終了 ☆☆☆☆☆ %d\n" VT_RST, this->switchFlag);
globalCtx->msgCtx.unk_E3EE = 4;
this->actor.draw = func_80A90948;
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_060065B0, &D_06000214, NULL, NULL, 0);
func_80080480(globalCtx, this);
func_80078884(NA_SE_SY_CORRECT_CHIME);
this->actor.flags |= 0x8000001;
this->actionFunc = func_80A904D8;
}
}
}
void func_80A904D8(EnKakasi2* this, GlobalContext* globalCtx) {
f32 frameCount = SkelAnime_GetFrameCount(&D_06000214.genericHeader);
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000214, 1.0f, 0.0f, (s16)frameCount, 0, -10.0f);
Audio_PlayActorSound2(&this->actor, NA_SE_EV_COME_UP_DEKU_JR);
this->actionFunc = func_80A90578;
}
void func_80A90578(EnKakasi2* this, GlobalContext* globalCtx) {
s16 currentFrame;
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
currentFrame = this->skelAnime.animCurrentFrame;
if (currentFrame == 11 || currentFrame == 17) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_KAKASHI_SWING);
}
this->actor.shape.rot.y += 0x800;
Math_SmoothDownscaleMaxF(&this->actor.shape.unk_08, 0.5f, 500.0f);
if (this->actor.shape.unk_08 > -100.0f) {
this->actionFunc = func_80A9062C;
this->actor.shape.unk_08 = 0.0f;
}
}
void func_80A9062C(EnKakasi2* this, GlobalContext* globalCtx) {
f32 frameCount = SkelAnime_GetFrameCount(&D_06000214.genericHeader);
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000214, 0.0f, 0.0f, (s16)frameCount, 2, -10.0f);
this->actionFunc = func_80A906C4;
}
void func_80A906C4(EnKakasi2* this, GlobalContext* globalCtx) {
if (this->skelAnime.animCurrentFrame != 0) {
Math_SmoothDownscaleMaxF(&this->skelAnime.animCurrentFrame, 0.5f, 1.0f);
}
Math_SmoothScaleMaxMinS(&this->actor.shape.rot.y, this->unk_198, 5, 0xBB8, 0);
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
}
void EnKakasi2_Update(Actor* thisx, GlobalContext* globalCtx) {
EnKakasi2* this = THIS;
GlobalContext* globalCtx2 = globalCtx;
this->actor.posRot.rot = this->actor.shape.rot;
Actor_SetHeight(&this->actor, this->height);
this->actionFunc(this, globalCtx2);
Actor_MoveForward(&this->actor);
if (this->actor.shape.unk_08 == 0.0f) {
Collider_CylinderUpdate(&this->actor, &this->collider);
CollisionCheck_SetAC(globalCtx2, &globalCtx2->colChkCtx, &this->collider.base);
CollisionCheck_SetOC(globalCtx2, &globalCtx2->colChkCtx, &this->collider.base);
}
if (BREG(0) != 0) {
if (BREG(5) != 0) {
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ this->actor.player_distance ☆☆☆☆☆ %f\n" VT_RST, this->actor.xzDistFromLink);
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ this->hosei.x ☆☆☆☆☆ %f\n" VT_RST, this->maxSpawnDistance.x);
osSyncPrintf("\n\n");
}
if (this->actor.draw == NULL) {
if (this->unk_194 != 0) {
if ((this->unk_194 % 2) == 0) {
DebugDisplay_AddObject(this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z,
this->actor.posRot.rot.x, this->actor.posRot.rot.y, this->actor.posRot.rot.z,
1.0f, 1.0f, 1.0f, 70, 70, 70, 255, 4, globalCtx2->state.gfxCtx);
}
} else {
DebugDisplay_AddObject(this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z,
this->actor.posRot.rot.x, this->actor.posRot.rot.y, this->actor.posRot.rot.z,
1.0f, 1.0f, 1.0f, 0, 255, 255, 255, 4, globalCtx2->state.gfxCtx);
}
}
}
}
void func_80A90948(Actor* thisx, GlobalContext* globalCtx) {
EnKakasi2* this = THIS;
func_80093D18(globalCtx->state.gfxCtx);
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, NULL,
NULL, &this->actor);
}

View file

@ -6,9 +6,18 @@
struct EnKakasi2;
typedef void (*EnKakasi2ActionFunc)(struct EnKakasi2*, GlobalContext*);
typedef struct EnKakasi2 {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0xAC];
/* 0x014C */ EnKakasi2ActionFunc actionFunc;
/* 0x0150 */ SkelAnime skelAnime;
/* 0x0194 */ s16 unk_194;
/* 0x0196 */ s16 switchFlag;
/* 0x0198 */ s16 unk_198;
/* 0x019C */ Vec3f maxSpawnDistance;
/* 0x01A8 */ f32 height;
/* 0x01AC */ ColliderCylinder collider;
} EnKakasi2; // size = 0x01F8
extern const ActorInit En_Kakasi2_InitVars;

View file

@ -870,6 +870,7 @@ D_06001080 = 0x06001080;
D_06004768 = 0x06004768;
D_0600039C = 0x0600039C;
// z_en_kakasi2
// z_en_kakasi3
D_060065B0 = 0x060065B0;
D_06000214 = 0x06000214;