1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-13 04:39:36 +00:00

En_Kanban (#533)

* Darkmeiro decompilation

Bg_Gnd_Darkmeiro decompiled, matched, and documented.

* give this a shot

* fix conflict

* one more try

* could be useful

* whoops

* ZAP2 stuff

* ZAP why

* ZAP again

* matching

* more stuff

* names

* names and formatting

* vt

* header

* adjusted gfx

Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
This commit is contained in:
petrie911 2020-12-29 17:28:50 -06:00 committed by GitHub
parent 2dfa188706
commit 22758f06d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 974 additions and 2797 deletions

View file

@ -1,16 +0,0 @@
glabel EnKanban_Destroy
/* 001EC 80A9218C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 001F0 80A92190 AFBF0014 */ sw $ra, 0x0014($sp)
/* 001F4 80A92194 908E0154 */ lbu $t6, 0x0154($a0) ## 00000154
/* 001F8 80A92198 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000
/* 001FC 80A9219C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
/* 00200 80A921A0 55C00004 */ bnel $t6, $zero, .L80A921B4
/* 00204 80A921A4 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00208 80A921A8 0C0170EB */ jal Collider_DestroyCylinder
/* 0020C 80A921AC 24C501A0 */ addiu $a1, $a2, 0x01A0 ## $a1 = 000001A0
/* 00210 80A921B0 8FBF0014 */ lw $ra, 0x0014($sp)
.L80A921B4:
/* 00214 80A921B4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 00218 80A921B8 03E00008 */ jr $ra
/* 0021C 80A921BC 00000000 */ nop

View file

@ -1,657 +0,0 @@
.rdata
glabel D_80A9504C
.asciz "../z_en_kanban.c"
.balign 4
glabel D_80A95060
.asciz "../z_en_kanban.c"
.balign 4
glabel D_80A95074
.asciz "../z_en_kanban.c"
.balign 4
glabel D_80A95088
.asciz "../z_en_kanban.c"
.balign 4
glabel D_80A9509C
.asciz "../z_en_kanban.c"
.balign 4
glabel D_80A950B0
.asciz "../z_en_kanban.c"
.balign 4
.late_rodata
glabel D_80A95108
.float 3.14159274101
glabel D_80A9510C
.float 3.14159274101
glabel D_80A95110
.float 3.14159274101
glabel D_80A95114
.float 3.14159274101
glabel D_80A95118
.word 0x45898000
glabel D_80A9511C
.word 0xC53B8000
glabel D_80A95120
.word 0x3B343958
glabel D_80A95124
.float 0.01
glabel D_80A95128
.word 0xBF20D97C
glabel D_80A9512C
.float 3.14159274101
glabel D_80A95130
.float 3.14159274101
glabel D_80A95134
.float 3.14159274101
glabel D_80A95138
.float 3.14159274101
.text
glabel EnKanban_Draw
/* 01BE8 80A93B88 27BDFF60 */ addiu $sp, $sp, 0xFF60 ## $sp = FFFFFF60
/* 01BEC 80A93B8C AFB00014 */ sw $s0, 0x0014($sp)
/* 01BF0 80A93B90 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 01BF4 80A93B94 AFBF001C */ sw $ra, 0x001C($sp)
/* 01BF8 80A93B98 AFB10018 */ sw $s1, 0x0018($sp)
/* 01BFC 80A93B9C AFA500A4 */ sw $a1, 0x00A4($sp)
/* 01C00 80A93BA0 8CA40000 */ lw $a0, 0x0000($a1) ## 00000000
/* 01C04 80A93BA4 0C031A73 */ jal Graph_Alloc
/* 01C08 80A93BA8 24050400 */ addiu $a1, $zero, 0x0400 ## $a1 = 00000400
/* 01C0C 80A93BAC 8FAF00A4 */ lw $t7, 0x00A4($sp)
/* 01C10 80A93BB0 AFA2008C */ sw $v0, 0x008C($sp)
/* 01C14 80A93BB4 3C0680A9 */ lui $a2, %hi(D_80A9504C) ## $a2 = 80A90000
/* 01C18 80A93BB8 8DE50000 */ lw $a1, 0x0000($t7) ## 00000000
/* 01C1C 80A93BBC 24C6504C */ addiu $a2, $a2, %lo(D_80A9504C) ## $a2 = 80A9504C
/* 01C20 80A93BC0 27A40078 */ addiu $a0, $sp, 0x0078 ## $a0 = FFFFFFD8
/* 01C24 80A93BC4 2407067B */ addiu $a3, $zero, 0x067B ## $a3 = 0000067B
/* 01C28 80A93BC8 0C031AB1 */ jal Graph_OpenDisps
/* 01C2C 80A93BCC 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
/* 01C30 80A93BD0 8FB800A4 */ lw $t8, 0x00A4($sp)
/* 01C34 80A93BD4 0C024F46 */ jal func_80093D18
/* 01C38 80A93BD8 8F040000 */ lw $a0, 0x0000($t8) ## 00000000
/* 01C3C 80A93BDC 8FB900A4 */ lw $t9, 0x00A4($sp)
/* 01C40 80A93BE0 0C024F61 */ jal func_80093D84
/* 01C44 80A93BE4 8F240000 */ lw $a0, 0x0000($t9) ## 00000000
/* 01C48 80A93BE8 8E2702C0 */ lw $a3, 0x02C0($s1) ## 000002C0
/* 01C4C 80A93BEC 3C0B0600 */ lui $t3, %hi(D_06000C30) ## $t3 = 06000000
/* 01C50 80A93BF0 256B0C30 */ addiu $t3, $t3, %lo(D_06000C30) ## $t3 = 06000C30
/* 01C54 80A93BF4 24E90008 */ addiu $t1, $a3, 0x0008 ## $t1 = 00000008
/* 01C58 80A93BF8 AE2902C0 */ sw $t1, 0x02C0($s1) ## 000002C0
/* 01C5C 80A93BFC 3C0ADE00 */ lui $t2, 0xDE00 ## $t2 = DE000000
/* 01C60 80A93C00 ACEA0000 */ sw $t2, 0x0000($a3) ## 00000000
/* 01C64 80A93C04 ACEB0004 */ sw $t3, 0x0004($a3) ## 00000004
/* 01C68 80A93C08 920C0154 */ lbu $t4, 0x0154($s0) ## 00000154
/* 01C6C 80A93C0C 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000
/* 01C70 80A93C10 3C06C2C8 */ lui $a2, 0xC2C8 ## $a2 = C2C80000
/* 01C74 80A93C14 51800099 */ beql $t4, $zero, .L80A93E7C
/* 01C78 80A93C18 44806000 */ mtc1 $zero, $f12 ## $f12 = 0.00
/* 01C7C 80A93C1C C60C0024 */ lwc1 $f12, 0x0024($s0) ## 00000024
/* 01C80 80A93C20 C60E0028 */ lwc1 $f14, 0x0028($s0) ## 00000028
/* 01C84 80A93C24 0C034261 */ jal Matrix_Translate
/* 01C88 80A93C28 8E06002C */ lw $a2, 0x002C($s0) ## 0000002C
/* 01C8C 80A93C2C C60C0050 */ lwc1 $f12, 0x0050($s0) ## 00000050
/* 01C90 80A93C30 C60E0054 */ lwc1 $f14, 0x0054($s0) ## 00000054
/* 01C94 80A93C34 8E060058 */ lw $a2, 0x0058($s0) ## 00000058
/* 01C98 80A93C38 0C0342A3 */ jal Matrix_Scale
/* 01C9C 80A93C3C 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 01CA0 80A93C40 C60C0188 */ lwc1 $f12, 0x0188($s0) ## 00000188
/* 01CA4 80A93C44 0C0342DC */ jal Matrix_RotateX
/* 01CA8 80A93C48 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 01CAC 80A93C4C C60C0190 */ lwc1 $f12, 0x0190($s0) ## 00000190
/* 01CB0 80A93C50 0C0343B5 */ jal Matrix_RotateZ
/* 01CB4 80A93C54 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 01CB8 80A93C58 44806000 */ mtc1 $zero, $f12 ## $f12 = 0.00
/* 01CBC 80A93C5C C60E00BC */ lwc1 $f14, 0x00BC($s0) ## 000000BC
/* 01CC0 80A93C60 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 01CC4 80A93C64 44066000 */ mfc1 $a2, $f12
/* 01CC8 80A93C68 0C034261 */ jal Matrix_Translate
/* 01CCC 80A93C6C 00000000 */ nop
/* 01CD0 80A93C70 860D00B6 */ lh $t5, 0x00B6($s0) ## 000000B6
/* 01CD4 80A93C74 3C014700 */ lui $at, 0x4700 ## $at = 47000000
/* 01CD8 80A93C78 44814000 */ mtc1 $at, $f8 ## $f8 = 32768.00
/* 01CDC 80A93C7C 448D2000 */ mtc1 $t5, $f4 ## $f4 = 0.00
/* 01CE0 80A93C80 3C0180A9 */ lui $at, %hi(D_80A95108) ## $at = 80A90000
/* 01CE4 80A93C84 C4325108 */ lwc1 $f18, %lo(D_80A95108)($at)
/* 01CE8 80A93C88 468021A0 */ cvt.s.w $f6, $f4
/* 01CEC 80A93C8C 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 01CF0 80A93C90 46083283 */ div.s $f10, $f6, $f8
/* 01CF4 80A93C94 46125302 */ mul.s $f12, $f10, $f18
/* 01CF8 80A93C98 0C034348 */ jal Matrix_RotateY
/* 01CFC 80A93C9C 00000000 */ nop
/* 01D00 80A93CA0 860E00B4 */ lh $t6, 0x00B4($s0) ## 000000B4
/* 01D04 80A93CA4 3C014700 */ lui $at, 0x4700 ## $at = 47000000
/* 01D08 80A93CA8 44814000 */ mtc1 $at, $f8 ## $f8 = 32768.00
/* 01D0C 80A93CAC 448E2000 */ mtc1 $t6, $f4 ## $f4 = 0.00
/* 01D10 80A93CB0 3C0180A9 */ lui $at, %hi(D_80A9510C) ## $at = 80A90000
/* 01D14 80A93CB4 C432510C */ lwc1 $f18, %lo(D_80A9510C)($at)
/* 01D18 80A93CB8 468021A0 */ cvt.s.w $f6, $f4
/* 01D1C 80A93CBC 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 01D20 80A93CC0 46083283 */ div.s $f10, $f6, $f8
/* 01D24 80A93CC4 46125302 */ mul.s $f12, $f10, $f18
/* 01D28 80A93CC8 0C0342DC */ jal Matrix_RotateX
/* 01D2C 80A93CCC 00000000 */ nop
/* 01D30 80A93CD0 0C01DE1C */ jal Math_SinS
## sins?
/* 01D34 80A93CD4 86040168 */ lh $a0, 0x0168($s0) ## 00000168
/* 01D38 80A93CD8 C6040180 */ lwc1 $f4, 0x0180($s0) ## 00000180
/* 01D3C 80A93CDC 8604016C */ lh $a0, 0x016C($s0) ## 0000016C
/* 01D40 80A93CE0 46040002 */ mul.s $f0, $f0, $f4
/* 01D44 80A93CE4 46000085 */ abs.s $f2, $f0
/* 01D48 80A93CE8 0C01DE1C */ jal Math_SinS
## sins?
/* 01D4C 80A93CEC E7A20098 */ swc1 $f2, 0x0098($sp)
/* 01D50 80A93CF0 C606017C */ lwc1 $f6, 0x017C($s0) ## 0000017C
/* 01D54 80A93CF4 C7A20098 */ lwc1 $f2, 0x0098($sp)
/* 01D58 80A93CF8 46060002 */ mul.s $f0, $f0, $f6
/* 01D5C 80A93CFC 46000005 */ abs.s $f0, $f0
/* 01D60 80A93D00 4600103C */ c.lt.s $f2, $f0
/* 01D64 80A93D04 00000000 */ nop
/* 01D68 80A93D08 45020003 */ bc1fl .L80A93D18
/* 01D6C 80A93D0C 860F0184 */ lh $t7, 0x0184($s0) ## 00000184
/* 01D70 80A93D10 46000086 */ mov.s $f2, $f0
/* 01D74 80A93D14 860F0184 */ lh $t7, 0x0184($s0) ## 00000184
.L80A93D18:
/* 01D78 80A93D18 44806000 */ mtc1 $zero, $f12 ## $f12 = 0.00
/* 01D7C 80A93D1C 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 01D80 80A93D20 448F4000 */ mtc1 $t7, $f8 ## $f8 = 0.00
/* 01D84 80A93D24 46006386 */ mov.s $f14, $f12
/* 01D88 80A93D28 468042A0 */ cvt.s.w $f10, $f8
/* 01D8C 80A93D2C 46005487 */ neg.s $f18, $f10
/* 01D90 80A93D30 46121082 */ mul.s $f2, $f2, $f18
/* 01D94 80A93D34 44061000 */ mfc1 $a2, $f2
/* 01D98 80A93D38 0C034261 */ jal Matrix_Translate
/* 01D9C 80A93D3C 00000000 */ nop
/* 01DA0 80A93D40 86180168 */ lh $t8, 0x0168($s0) ## 00000168
/* 01DA4 80A93D44 3C014700 */ lui $at, 0x4700 ## $at = 47000000
/* 01DA8 80A93D48 44814000 */ mtc1 $at, $f8 ## $f8 = 32768.00
/* 01DAC 80A93D4C 44982000 */ mtc1 $t8, $f4 ## $f4 = 0.00
/* 01DB0 80A93D50 3C0180A9 */ lui $at, %hi(D_80A95110) ## $at = 80A90000
/* 01DB4 80A93D54 C4325110 */ lwc1 $f18, %lo(D_80A95110)($at)
/* 01DB8 80A93D58 468021A0 */ cvt.s.w $f6, $f4
/* 01DBC 80A93D5C 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 01DC0 80A93D60 46083283 */ div.s $f10, $f6, $f8
/* 01DC4 80A93D64 46125302 */ mul.s $f12, $f10, $f18
/* 01DC8 80A93D68 0C0342DC */ jal Matrix_RotateX
/* 01DCC 80A93D6C 00000000 */ nop
/* 01DD0 80A93D70 8619016C */ lh $t9, 0x016C($s0) ## 0000016C
/* 01DD4 80A93D74 3C014700 */ lui $at, 0x4700 ## $at = 47000000
/* 01DD8 80A93D78 44814000 */ mtc1 $at, $f8 ## $f8 = 32768.00
/* 01DDC 80A93D7C 44992000 */ mtc1 $t9, $f4 ## $f4 = 0.00
/* 01DE0 80A93D80 3C0180A9 */ lui $at, %hi(D_80A95114) ## $at = 80A90000
/* 01DE4 80A93D84 C4325114 */ lwc1 $f18, %lo(D_80A95114)($at)
/* 01DE8 80A93D88 468021A0 */ cvt.s.w $f6, $f4
/* 01DEC 80A93D8C 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 01DF0 80A93D90 46083283 */ div.s $f10, $f6, $f8
/* 01DF4 80A93D94 46125302 */ mul.s $f12, $f10, $f18
/* 01DF8 80A93D98 0C034348 */ jal Matrix_RotateY
/* 01DFC 80A93D9C 00000000 */ nop
/* 01E00 80A93DA0 3C0142C8 */ lui $at, 0x42C8 ## $at = 42C80000
/* 01E04 80A93DA4 44813000 */ mtc1 $at, $f6 ## $f6 = 100.00
/* 01E08 80A93DA8 C6040164 */ lwc1 $f4, 0x0164($s0) ## 00000164
/* 01E0C 80A93DAC C60C015C */ lwc1 $f12, 0x015C($s0) ## 0000015C
/* 01E10 80A93DB0 C60E0160 */ lwc1 $f14, 0x0160($s0) ## 00000160
/* 01E14 80A93DB4 46062201 */ sub.s $f8, $f4, $f6
/* 01E18 80A93DB8 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 01E1C 80A93DBC 44064000 */ mfc1 $a2, $f8
/* 01E20 80A93DC0 0C034261 */ jal Matrix_Translate
/* 01E24 80A93DC4 00000000 */ nop
/* 01E28 80A93DC8 8E2702C0 */ lw $a3, 0x02C0($s1) ## 000002C0
/* 01E2C 80A93DCC 3C0ADA38 */ lui $t2, 0xDA38 ## $t2 = DA380000
/* 01E30 80A93DD0 354A0003 */ ori $t2, $t2, 0x0003 ## $t2 = DA380003
/* 01E34 80A93DD4 24E90008 */ addiu $t1, $a3, 0x0008 ## $t1 = 00000008
/* 01E38 80A93DD8 AE2902C0 */ sw $t1, 0x02C0($s1) ## 000002C0
/* 01E3C 80A93DDC ACEA0000 */ sw $t2, 0x0000($a3) ## 00000000
/* 01E40 80A93DE0 8FAB00A4 */ lw $t3, 0x00A4($sp)
/* 01E44 80A93DE4 3C0580A9 */ lui $a1, %hi(D_80A95060) ## $a1 = 80A90000
/* 01E48 80A93DE8 24A55060 */ addiu $a1, $a1, %lo(D_80A95060) ## $a1 = 80A95060
/* 01E4C 80A93DEC 8D640000 */ lw $a0, 0x0000($t3) ## 00000000
/* 01E50 80A93DF0 240606B3 */ addiu $a2, $zero, 0x06B3 ## $a2 = 000006B3
/* 01E54 80A93DF4 0C0346A2 */ jal Matrix_NewMtx
/* 01E58 80A93DF8 AFA70070 */ sw $a3, 0x0070($sp)
/* 01E5C 80A93DFC 8FA30070 */ lw $v1, 0x0070($sp)
/* 01E60 80A93E00 3C0580A9 */ lui $a1, %hi(D_80A946D0) ## $a1 = 80A90000
/* 01E64 80A93E04 3C0480A9 */ lui $a0, %hi(D_80A944BC) ## $a0 = 80A90000
/* 01E68 80A93E08 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 01E6C 80A93E0C 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
/* 01E70 80A93E10 248444BC */ addiu $a0, $a0, %lo(D_80A944BC) ## $a0 = 80A944BC
/* 01E74 80A93E14 24A546D0 */ addiu $a1, $a1, %lo(D_80A946D0) ## $a1 = 80A946D0
/* 01E78 80A93E18 3C08DE00 */ lui $t0, 0xDE00 ## $t0 = DE000000
/* 01E7C 80A93E1C 00026040 */ sll $t4, $v0, 1
.L80A93E20:
/* 01E80 80A93E20 008C6821 */ addu $t5, $a0, $t4
/* 01E84 80A93E24 95AE0000 */ lhu $t6, 0x0000($t5) ## 00000000
/* 01E88 80A93E28 960F0156 */ lhu $t7, 0x0156($s0) ## 00000156
/* 01E8C 80A93E2C 01CFC024 */ and $t8, $t6, $t7
/* 01E90 80A93E30 5300000A */ beql $t8, $zero, .L80A93E5C
/* 01E94 80A93E34 24420001 */ addiu $v0, $v0, 0x0001 ## $v0 = 00000001
/* 01E98 80A93E38 8E2702C0 */ lw $a3, 0x02C0($s1) ## 000002C0
/* 01E9C 80A93E3C 00024880 */ sll $t1, $v0, 2
/* 01EA0 80A93E40 00A95021 */ addu $t2, $a1, $t1
/* 01EA4 80A93E44 24F90008 */ addiu $t9, $a3, 0x0008 ## $t9 = 00000008
/* 01EA8 80A93E48 AE3902C0 */ sw $t9, 0x02C0($s1) ## 000002C0
/* 01EAC 80A93E4C ACE80000 */ sw $t0, 0x0000($a3) ## 00000000
/* 01EB0 80A93E50 8D4B0000 */ lw $t3, 0x0000($t2) ## 00000000
/* 01EB4 80A93E54 ACEB0004 */ sw $t3, 0x0004($a3) ## 00000004
/* 01EB8 80A93E58 24420001 */ addiu $v0, $v0, 0x0001 ## $v0 = 00000002
.L80A93E5C:
/* 01EBC 80A93E5C 00021400 */ sll $v0, $v0, 16
/* 01EC0 80A93E60 00021403 */ sra $v0, $v0, 16
/* 01EC4 80A93E64 2841000B */ slti $at, $v0, 0x000B
/* 01EC8 80A93E68 5420FFED */ bnel $at, $zero, .L80A93E20
/* 01ECC 80A93E6C 00026040 */ sll $t4, $v0, 1
/* 01ED0 80A93E70 1000008A */ beq $zero, $zero, .L80A9409C
/* 01ED4 80A93E74 3C0143C8 */ lui $at, 0x43C8 ## $at = 43C80000
/* 01ED8 80A93E78 44806000 */ mtc1 $zero, $f12 ## $f12 = 0.00
.L80A93E7C:
/* 01EDC 80A93E7C 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 01EE0 80A93E80 0C034261 */ jal Matrix_Translate
/* 01EE4 80A93E84 46006386 */ mov.s $f14, $f12
/* 01EE8 80A93E88 8E2702C0 */ lw $a3, 0x02C0($s1) ## 000002C0
/* 01EEC 80A93E8C 3C0DDA38 */ lui $t5, 0xDA38 ## $t5 = DA380000
/* 01EF0 80A93E90 35AD0003 */ ori $t5, $t5, 0x0003 ## $t5 = DA380003
/* 01EF4 80A93E94 24EC0008 */ addiu $t4, $a3, 0x0008 ## $t4 = 00000008
/* 01EF8 80A93E98 AE2C02C0 */ sw $t4, 0x02C0($s1) ## 000002C0
/* 01EFC 80A93E9C ACED0000 */ sw $t5, 0x0000($a3) ## 00000000
/* 01F00 80A93EA0 8FAE00A4 */ lw $t6, 0x00A4($sp)
/* 01F04 80A93EA4 3C0580A9 */ lui $a1, %hi(D_80A95074) ## $a1 = 80A90000
/* 01F08 80A93EA8 24A55074 */ addiu $a1, $a1, %lo(D_80A95074) ## $a1 = 80A95074
/* 01F0C 80A93EAC 8DC40000 */ lw $a0, 0x0000($t6) ## 00000000
/* 01F10 80A93EB0 240606BD */ addiu $a2, $zero, 0x06BD ## $a2 = 000006BD
/* 01F14 80A93EB4 0C0346A2 */ jal Matrix_NewMtx
/* 01F18 80A93EB8 AFA70068 */ sw $a3, 0x0068($sp)
/* 01F1C 80A93EBC 8FA30068 */ lw $v1, 0x0068($sp)
/* 01F20 80A93EC0 3401FFFF */ ori $at, $zero, 0xFFFF ## $at = 0000FFFF
/* 01F24 80A93EC4 3C0580A9 */ lui $a1, %hi(D_80A946D0) ## $a1 = 80A90000
/* 01F28 80A93EC8 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 01F2C 80A93ECC 960F0156 */ lhu $t7, 0x0156($s0) ## 00000156
/* 01F30 80A93ED0 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
/* 01F34 80A93ED4 24A546D0 */ addiu $a1, $a1, %lo(D_80A946D0) ## $a1 = 80A946D0
/* 01F38 80A93ED8 15E1000A */ bne $t7, $at, .L80A93F04
/* 01F3C 80A93EDC 3C06DE00 */ lui $a2, 0xDE00 ## $a2 = DE000000
/* 01F40 80A93EE0 8E2702C0 */ lw $a3, 0x02C0($s1) ## 000002C0
/* 01F44 80A93EE4 3C090404 */ lui $t1, %hi(D_0403C050) ## $t1 = 04040000
/* 01F48 80A93EE8 2529C050 */ addiu $t1, $t1, %lo(D_0403C050) ## $t1 = 0403C050
/* 01F4C 80A93EEC 24F80008 */ addiu $t8, $a3, 0x0008 ## $t8 = 00000008
/* 01F50 80A93EF0 AE3802C0 */ sw $t8, 0x02C0($s1) ## 000002C0
/* 01F54 80A93EF4 3C19DE00 */ lui $t9, 0xDE00 ## $t9 = DE000000
/* 01F58 80A93EF8 ACF90000 */ sw $t9, 0x0000($a3) ## 00000000
/* 01F5C 80A93EFC 10000018 */ beq $zero, $zero, .L80A93F60
/* 01F60 80A93F00 ACE90004 */ sw $t1, 0x0004($a3) ## 00000004
.L80A93F04:
/* 01F64 80A93F04 3C0480A9 */ lui $a0, %hi(D_80A944BC) ## $a0 = 80A90000
/* 01F68 80A93F08 248444BC */ addiu $a0, $a0, %lo(D_80A944BC) ## $a0 = 80A944BC
/* 01F6C 80A93F0C 00025040 */ sll $t2, $v0, 1
.L80A93F10:
/* 01F70 80A93F10 008A5821 */ addu $t3, $a0, $t2
/* 01F74 80A93F14 956C0000 */ lhu $t4, 0x0000($t3) ## 00000000
/* 01F78 80A93F18 960D0156 */ lhu $t5, 0x0156($s0) ## 00000156
/* 01F7C 80A93F1C 018D7024 */ and $t6, $t4, $t5
/* 01F80 80A93F20 51C0000A */ beql $t6, $zero, .L80A93F4C
/* 01F84 80A93F24 24420001 */ addiu $v0, $v0, 0x0001 ## $v0 = 00000001
/* 01F88 80A93F28 8E2702C0 */ lw $a3, 0x02C0($s1) ## 000002C0
/* 01F8C 80A93F2C 0002C080 */ sll $t8, $v0, 2
/* 01F90 80A93F30 00B8C821 */ addu $t9, $a1, $t8
/* 01F94 80A93F34 24EF0008 */ addiu $t7, $a3, 0x0008 ## $t7 = 00000008
/* 01F98 80A93F38 AE2F02C0 */ sw $t7, 0x02C0($s1) ## 000002C0
/* 01F9C 80A93F3C ACE60000 */ sw $a2, 0x0000($a3) ## 00000000
/* 01FA0 80A93F40 8F290000 */ lw $t1, 0x0000($t9) ## DE000000
/* 01FA4 80A93F44 ACE90004 */ sw $t1, 0x0004($a3) ## 00000004
/* 01FA8 80A93F48 24420001 */ addiu $v0, $v0, 0x0001 ## $v0 = 00000002
.L80A93F4C:
/* 01FAC 80A93F4C 00021400 */ sll $v0, $v0, 16
/* 01FB0 80A93F50 00021403 */ sra $v0, $v0, 16
/* 01FB4 80A93F54 2841000B */ slti $at, $v0, 0x000B
/* 01FB8 80A93F58 5420FFED */ bnel $at, $zero, .L80A93F10
/* 01FBC 80A93F5C 00025040 */ sll $t2, $v0, 1
.L80A93F60:
/* 01FC0 80A93F60 860A0198 */ lh $t2, 0x0198($s0) ## 00000198
/* 01FC4 80A93F64 3C064348 */ lui $a2, 0x4348 ## $a2 = 43480000
/* 01FC8 80A93F68 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 01FCC 80A93F6C 5140004B */ beql $t2, $zero, .L80A9409C
/* 01FD0 80A93F70 3C0143C8 */ lui $at, 0x43C8 ## $at = 43C80000
/* 01FD4 80A93F74 920B0194 */ lbu $t3, 0x0194($s0) ## 00000194
/* 01FD8 80A93F78 3C01C496 */ lui $at, 0xC496 ## $at = C4960000
/* 01FDC 80A93F7C 55600005 */ bnel $t3, $zero, .L80A93F94
/* 01FE0 80A93F80 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
/* 01FE4 80A93F84 44810000 */ mtc1 $at, $f0 ## $f0 = -1200.00
/* 01FE8 80A93F88 10000003 */ beq $zero, $zero, .L80A93F98
/* 01FEC 80A93F8C 00000000 */ nop
/* 01FF0 80A93F90 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00
.L80A93F94:
/* 01FF4 80A93F94 00000000 */ nop
.L80A93F98:
/* 01FF8 80A93F98 3C0180A9 */ lui $at, %hi(D_80A95118) ## $at = 80A90000
/* 01FFC 80A93F9C C42A5118 */ lwc1 $f10, %lo(D_80A95118)($at)
/* 02000 80A93FA0 44806000 */ mtc1 $zero, $f12 ## $f12 = 0.00
/* 02004 80A93FA4 0C034261 */ jal Matrix_Translate
/* 02008 80A93FA8 46005380 */ add.s $f14, $f10, $f0
/* 0200C 80A93FAC 920C0194 */ lbu $t4, 0x0194($s0) ## 00000194
/* 02010 80A93FB0 3C0180A9 */ lui $at, %hi(D_80A94EFC) ## $at = 80A90000
/* 02014 80A93FB4 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 02018 80A93FB8 000C6880 */ sll $t5, $t4, 2
/* 0201C 80A93FBC 002D0821 */ addu $at, $at, $t5
/* 02020 80A93FC0 0C0343B5 */ jal Matrix_RotateZ
/* 02024 80A93FC4 C42C4EFC */ lwc1 $f12, %lo(D_80A94EFC)($at)
/* 02028 80A93FC8 3C014120 */ lui $at, 0x4120 ## $at = 41200000
/* 0202C 80A93FCC 44817000 */ mtc1 $at, $f14 ## $f14 = 10.00
/* 02030 80A93FD0 44806000 */ mtc1 $zero, $f12 ## $f12 = 0.00
/* 02034 80A93FD4 3C064000 */ lui $a2, 0x4000 ## $a2 = 40000000
/* 02038 80A93FD8 0C0342A3 */ jal Matrix_Scale
/* 0203C 80A93FDC 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 02040 80A93FE0 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0
/* 02044 80A93FE4 3C0FE700 */ lui $t7, 0xE700 ## $t7 = E7000000
/* 02048 80A93FE8 3C19FA00 */ lui $t9, 0xFA00 ## $t9 = FA000000
/* 0204C 80A93FEC 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008
/* 02050 80A93FF0 AE2E02D0 */ sw $t6, 0x02D0($s1) ## 000002D0
/* 02054 80A93FF4 AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000
/* 02058 80A93FF8 AC400004 */ sw $zero, 0x0004($v0) ## 00000004
/* 0205C 80A93FFC 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0
/* 02060 80A94000 2401FF00 */ addiu $at, $zero, 0xFF00 ## $at = FFFFFF00
/* 02064 80A94004 240E9600 */ addiu $t6, $zero, 0x9600 ## $t6 = FFFF9600
/* 02068 80A94008 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008
/* 0206C 80A9400C AE3802D0 */ sw $t8, 0x02D0($s1) ## 000002D0
/* 02070 80A94010 AC590000 */ sw $t9, 0x0000($v0) ## 00000000
/* 02074 80A94014 86090198 */ lh $t1, 0x0198($s0) ## 00000198
/* 02078 80A94018 3C0DFB00 */ lui $t5, 0xFB00 ## $t5 = FB000000
/* 0207C 80A9401C 3C18DA38 */ lui $t8, 0xDA38 ## $t8 = DA380000
/* 02080 80A94020 312A00FF */ andi $t2, $t1, 0x00FF ## $t2 = 00000000
/* 02084 80A94024 01415825 */ or $t3, $t2, $at ## $t3 = FFFFFF00
/* 02088 80A94028 AC4B0004 */ sw $t3, 0x0004($v0) ## 00000004
/* 0208C 80A9402C 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0
/* 02090 80A94030 37180003 */ ori $t8, $t8, 0x0003 ## $t8 = DA380003
/* 02094 80A94034 3C0580A9 */ lui $a1, %hi(D_80A95088) ## $a1 = 80A90000
/* 02098 80A94038 244C0008 */ addiu $t4, $v0, 0x0008 ## $t4 = 00000008
/* 0209C 80A9403C AE2C02D0 */ sw $t4, 0x02D0($s1) ## 000002D0
/* 020A0 80A94040 AC4D0000 */ sw $t5, 0x0000($v0) ## 00000000
/* 020A4 80A94044 AC4E0004 */ sw $t6, 0x0004($v0) ## 00000004
/* 020A8 80A94048 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0
/* 020AC 80A9404C 24A55088 */ addiu $a1, $a1, %lo(D_80A95088) ## $a1 = 80A95088
/* 020B0 80A94050 240606ED */ addiu $a2, $zero, 0x06ED ## $a2 = 000006ED
/* 020B4 80A94054 244F0008 */ addiu $t7, $v0, 0x0008 ## $t7 = 00000008
/* 020B8 80A94058 AE2F02D0 */ sw $t7, 0x02D0($s1) ## 000002D0
/* 020BC 80A9405C AC580000 */ sw $t8, 0x0000($v0) ## 00000000
/* 020C0 80A94060 8FB900A4 */ lw $t9, 0x00A4($sp)
/* 020C4 80A94064 8F240000 */ lw $a0, 0x0000($t9) ## FA000000
/* 020C8 80A94068 0C0346A2 */ jal Matrix_NewMtx
/* 020CC 80A9406C AFA2004C */ sw $v0, 0x004C($sp)
/* 020D0 80A94070 8FA3004C */ lw $v1, 0x004C($sp)
/* 020D4 80A94074 3C0B0600 */ lui $t3, %hi(D_06001630) ## $t3 = 06000000
/* 020D8 80A94078 256B1630 */ addiu $t3, $t3, %lo(D_06001630) ## $t3 = 06001630
/* 020DC 80A9407C AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 020E0 80A94080 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0
/* 020E4 80A94084 3C0ADE00 */ lui $t2, 0xDE00 ## $t2 = DE000000
/* 020E8 80A94088 24490008 */ addiu $t1, $v0, 0x0008 ## $t1 = 00000008
/* 020EC 80A9408C AE2902D0 */ sw $t1, 0x02D0($s1) ## 000002D0
/* 020F0 80A94090 AC4B0004 */ sw $t3, 0x0004($v0) ## 00000004
/* 020F4 80A94094 AC4A0000 */ sw $t2, 0x0000($v0) ## 00000000
/* 020F8 80A94098 3C0143C8 */ lui $at, 0x43C8 ## $at = 43C80000
.L80A9409C:
/* 020FC 80A9409C 44816000 */ mtc1 $at, $f12 ## $f12 = 400.00
/* 02100 80A940A0 C60200EC */ lwc1 $f2, 0x00EC($s0) ## 000000EC
/* 02104 80A940A4 460C103E */ c.le.s $f2, $f12
/* 02108 80A940A8 00000000 */ nop
/* 0210C 80A940AC 450200E2 */ bc1fl .L80A94438
/* 02110 80A940B0 8FAF00A4 */ lw $t7, 0x00A4($sp)
/* 02114 80A940B4 44808000 */ mtc1 $zero, $f16 ## $f16 = 0.00
/* 02118 80A940B8 3C0180A9 */ lui $at, %hi(D_80A9511C) ## $at = 80A90000
/* 0211C 80A940BC 4602803C */ c.lt.s $f16, $f2
/* 02120 80A940C0 00000000 */ nop
/* 02124 80A940C4 450200DC */ bc1fl .L80A94438
/* 02128 80A940C8 8FAF00A4 */ lw $t7, 0x00A4($sp)
/* 0212C 80A940CC C432511C */ lwc1 $f18, %lo(D_80A9511C)($at)
/* 02130 80A940D0 C6040080 */ lwc1 $f4, 0x0080($s0) ## 00000080
/* 02134 80A940D4 4604903C */ c.lt.s $f18, $f4
/* 02138 80A940D8 00000000 */ nop
/* 0213C 80A940DC 450200D6 */ bc1fl .L80A94438
/* 02140 80A940E0 8FAF00A4 */ lw $t7, 0x00A4($sp)
/* 02144 80A940E4 860C0176 */ lh $t4, 0x0176($s0) ## 00000176
/* 02148 80A940E8 3C048016 */ lui $a0, %hi(gSaveContext)
/* 0214C 80A940EC 2484E660 */ addiu $a0, %lo(gSaveContext)
/* 02150 80A940F0 55800005 */ bnel $t4, $zero, .L80A94108
/* 02154 80A940F4 9482000C */ lhu $v0, 0x000C($a0) ## 8015E66C
/* 02158 80A940F8 860D0178 */ lh $t5, 0x0178($s0) ## 00000178
/* 0215C 80A940FC 51A000CE */ beql $t5, $zero, .L80A94438
/* 02160 80A94100 8FAF00A4 */ lw $t7, 0x00A4($sp)
/* 02164 80A94104 9482000C */ lhu $v0, 0x000C($a0) ## 8015E66C
.L80A94108:
/* 02168 80A94108 34018000 */ ori $at, $zero, 0x8000 ## $at = 00008000
/* 0216C 80A9410C 0041082A */ slt $at, $v0, $at
/* 02170 80A94110 14200004 */ bne $at, $zero, .L80A94124
/* 02174 80A94114 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000
/* 02178 80A94118 340EFFFF */ ori $t6, $zero, 0xFFFF ## $t6 = 0000FFFF
/* 0217C 80A9411C 01C31023 */ subu $v0, $t6, $v1
/* 02180 80A94120 3042FFFF */ andi $v0, $v0, 0xFFFF ## $v0 = 00000000
.L80A94124:
/* 02184 80A94124 44823000 */ mtc1 $v0, $f6 ## $f6 = 0.00
/* 02188 80A94128 04410005 */ bgez $v0, .L80A94140
/* 0218C 80A9412C 46803220 */ cvt.s.w $f8, $f6
/* 02190 80A94130 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000
/* 02194 80A94134 44815000 */ mtc1 $at, $f10 ## $f10 = 4294967296.00
/* 02198 80A94138 00000000 */ nop
/* 0219C 80A9413C 460A4200 */ add.s $f8, $f8, $f10
.L80A94140:
/* 021A0 80A94140 3C0180A9 */ lui $at, %hi(D_80A95120) ## $at = 80A90000
/* 021A4 80A94144 C4325120 */ lwc1 $f18, %lo(D_80A95120)($at)
/* 021A8 80A94148 3C014120 */ lui $at, 0x4120 ## $at = 41200000
/* 021AC 80A9414C 44813000 */ mtc1 $at, $f6 ## $f6 = 10.00
/* 021B0 80A94150 3C014396 */ lui $at, 0x4396 ## $at = 43960000
/* 021B4 80A94154 44815000 */ mtc1 $at, $f10 ## $f10 = 300.00
/* 021B8 80A94158 46124102 */ mul.s $f4, $f8, $f18
/* 021BC 80A9415C 4602503C */ c.lt.s $f10, $f2
/* 021C0 80A94160 00000000 */ nop
/* 021C4 80A94164 45000008 */ bc1f .L80A94188
/* 021C8 80A94168 46062000 */ add.s $f0, $f4, $f6
/* 021CC 80A9416C 46026201 */ sub.s $f8, $f12, $f2
/* 021D0 80A94170 3C0180A9 */ lui $at, %hi(D_80A95124) ## $at = 80A90000
/* 021D4 80A94174 C4325124 */ lwc1 $f18, %lo(D_80A95124)($at)
/* 021D8 80A94178 46124102 */ mul.s $f4, $f8, $f18
/* 021DC 80A9417C 00000000 */ nop
/* 021E0 80A94180 46040002 */ mul.s $f0, $f0, $f4
/* 021E4 80A94184 00000000 */ nop
.L80A94188:
/* 021E8 80A94188 4600018D */ trunc.w.s $f6, $f0
/* 021EC 80A9418C 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0
/* 021F0 80A94190 3C18FA00 */ lui $t8, 0xFA00 ## $t8 = FA000000
/* 021F4 80A94194 440B3000 */ mfc1 $t3, $f6
/* 021F8 80A94198 244F0008 */ addiu $t7, $v0, 0x0008 ## $t7 = 00000008
/* 021FC 80A9419C AE2F02D0 */ sw $t7, 0x02D0($s1) ## 000002D0
/* 02200 80A941A0 316C00FF */ andi $t4, $t3, 0x00FF ## $t4 = 00000030
/* 02204 80A941A4 AC4C0004 */ sw $t4, 0x0004($v0) ## 00000004
/* 02208 80A941A8 AC580000 */ sw $t8, 0x0000($v0) ## 00000000
/* 0220C 80A941AC 920D0154 */ lbu $t5, 0x0154($s0) ## 00000154
/* 02210 80A941B0 55A00009 */ bnel $t5, $zero, .L80A941D8
/* 02214 80A941B4 C60E0080 */ lwc1 $f14, 0x0080($s0) ## 00000080
/* 02218 80A941B8 8C8E0004 */ lw $t6, 0x0004($a0) ## 8015E664
/* 0221C 80A941BC 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
/* 02220 80A941C0 55C10005 */ bnel $t6, $at, .L80A941D8
/* 02224 80A941C4 C60E0080 */ lwc1 $f14, 0x0080($s0) ## 00000080
/* 02228 80A941C8 46008086 */ mov.s $f2, $f16
/* 0222C 80A941CC 1000000A */ beq $zero, $zero, .L80A941F8
/* 02230 80A941D0 C60E0080 */ lwc1 $f14, 0x0080($s0) ## 00000080
/* 02234 80A941D4 C60E0080 */ lwc1 $f14, 0x0080($s0) ## 00000080
.L80A941D8:
/* 02238 80A941D8 C60A0028 */ lwc1 $f10, 0x0028($s0) ## 00000028
/* 0223C 80A941DC 3C01C248 */ lui $at, 0xC248 ## $at = C2480000
/* 02240 80A941E0 44819000 */ mtc1 $at, $f18 ## $f18 = -50.00
/* 02244 80A941E4 460E5201 */ sub.s $f8, $f10, $f14
/* 02248 80A941E8 3C0142C8 */ lui $at, 0x42C8 ## $at = 42C80000
/* 0224C 80A941EC 44813000 */ mtc1 $at, $f6 ## $f6 = 100.00
/* 02250 80A941F0 46124102 */ mul.s $f4, $f8, $f18
/* 02254 80A941F4 46062083 */ div.s $f2, $f4, $f6
.L80A941F8:
/* 02258 80A941F8 C60A002C */ lwc1 $f10, 0x002C($s0) ## 0000002C
/* 0225C 80A941FC C60C0024 */ lwc1 $f12, 0x0024($s0) ## 00000024
/* 02260 80A94200 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000
/* 02264 80A94204 46025200 */ add.s $f8, $f10, $f2
/* 02268 80A94208 44064000 */ mfc1 $a2, $f8
/* 0226C 80A9420C 0C034261 */ jal Matrix_Translate
/* 02270 80A94210 00000000 */ nop
/* 02274 80A94214 C60C0188 */ lwc1 $f12, 0x0188($s0) ## 00000188
/* 02278 80A94218 0C0342DC */ jal Matrix_RotateX
/* 0227C 80A9421C 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 02280 80A94220 C60C0190 */ lwc1 $f12, 0x0190($s0) ## 00000190
/* 02284 80A94224 0C0343B5 */ jal Matrix_RotateZ
/* 02288 80A94228 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 0228C 80A9422C 44807000 */ mtc1 $zero, $f14 ## $f14 = 0.00
/* 02290 80A94230 C60C0050 */ lwc1 $f12, 0x0050($s0) ## 00000050
/* 02294 80A94234 8E060058 */ lw $a2, 0x0058($s0) ## 00000058
/* 02298 80A94238 0C0342A3 */ jal Matrix_Scale
/* 0229C 80A9423C 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 022A0 80A94240 920F0154 */ lbu $t7, 0x0154($s0) ## 00000154
/* 022A4 80A94244 3C0180A9 */ lui $at, %hi(D_80A95128) ## $at = 80A90000
/* 022A8 80A94248 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 022AC 80A9424C 55E00004 */ bnel $t7, $zero, .L80A94260
/* 022B0 80A94250 861800B6 */ lh $t8, 0x00B6($s0) ## 000000B6
/* 022B4 80A94254 0C0342DC */ jal Matrix_RotateX
/* 022B8 80A94258 C42C5128 */ lwc1 $f12, %lo(D_80A95128)($at)
/* 022BC 80A9425C 861800B6 */ lh $t8, 0x00B6($s0) ## 000000B6
.L80A94260:
/* 022C0 80A94260 3C014700 */ lui $at, 0x4700 ## $at = 47000000
/* 022C4 80A94264 44813000 */ mtc1 $at, $f6 ## $f6 = 32768.00
/* 022C8 80A94268 44989000 */ mtc1 $t8, $f18 ## $f18 = 0.00
/* 022CC 80A9426C 3C0180A9 */ lui $at, %hi(D_80A9512C) ## $at = 80A90000
/* 022D0 80A94270 C428512C */ lwc1 $f8, %lo(D_80A9512C)($at)
/* 022D4 80A94274 46809120 */ cvt.s.w $f4, $f18
/* 022D8 80A94278 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 022DC 80A9427C 46062283 */ div.s $f10, $f4, $f6
/* 022E0 80A94280 46085302 */ mul.s $f12, $f10, $f8
/* 022E4 80A94284 0C034348 */ jal Matrix_RotateY
/* 022E8 80A94288 00000000 */ nop
/* 022EC 80A9428C 861900B4 */ lh $t9, 0x00B4($s0) ## 000000B4
/* 022F0 80A94290 3C014700 */ lui $at, 0x4700 ## $at = 47000000
/* 022F4 80A94294 44813000 */ mtc1 $at, $f6 ## $f6 = 32768.00
/* 022F8 80A94298 44999000 */ mtc1 $t9, $f18 ## $f18 = 0.00
/* 022FC 80A9429C 3C0180A9 */ lui $at, %hi(D_80A95130) ## $at = 80A90000
/* 02300 80A942A0 C4285130 */ lwc1 $f8, %lo(D_80A95130)($at)
/* 02304 80A942A4 46809120 */ cvt.s.w $f4, $f18
/* 02308 80A942A8 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 0230C 80A942AC 46062283 */ div.s $f10, $f4, $f6
/* 02310 80A942B0 46085302 */ mul.s $f12, $f10, $f8
/* 02314 80A942B4 0C0342DC */ jal Matrix_RotateX
/* 02318 80A942B8 00000000 */ nop
/* 0231C 80A942BC 86090168 */ lh $t1, 0x0168($s0) ## 00000168
/* 02320 80A942C0 3C014700 */ lui $at, 0x4700 ## $at = 47000000
/* 02324 80A942C4 44813000 */ mtc1 $at, $f6 ## $f6 = 32768.00
/* 02328 80A942C8 44899000 */ mtc1 $t1, $f18 ## $f18 = 0.00
/* 0232C 80A942CC 3C0180A9 */ lui $at, %hi(D_80A95134) ## $at = 80A90000
/* 02330 80A942D0 C4285134 */ lwc1 $f8, %lo(D_80A95134)($at)
/* 02334 80A942D4 46809120 */ cvt.s.w $f4, $f18
/* 02338 80A942D8 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 0233C 80A942DC 46062283 */ div.s $f10, $f4, $f6
/* 02340 80A942E0 46085302 */ mul.s $f12, $f10, $f8
/* 02344 80A942E4 0C0342DC */ jal Matrix_RotateX
/* 02348 80A942E8 00000000 */ nop
/* 0234C 80A942EC 860A016C */ lh $t2, 0x016C($s0) ## 0000016C
/* 02350 80A942F0 3C014700 */ lui $at, 0x4700 ## $at = 47000000
/* 02354 80A942F4 44813000 */ mtc1 $at, $f6 ## $f6 = 32768.00
/* 02358 80A942F8 448A9000 */ mtc1 $t2, $f18 ## $f18 = 0.00
/* 0235C 80A942FC 3C0180A9 */ lui $at, %hi(D_80A95138) ## $at = 80A90000
/* 02360 80A94300 C4285138 */ lwc1 $f8, %lo(D_80A95138)($at)
/* 02364 80A94304 46809120 */ cvt.s.w $f4, $f18
/* 02368 80A94308 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001
/* 0236C 80A9430C 46062283 */ div.s $f10, $f4, $f6
/* 02370 80A94310 46085302 */ mul.s $f12, $f10, $f8
/* 02374 80A94314 0C034348 */ jal Matrix_RotateY
/* 02378 80A94318 00000000 */ nop
/* 0237C 80A9431C C60C015C */ lwc1 $f12, 0x015C($s0) ## 0000015C
/* 02380 80A94320 C60E0160 */ lwc1 $f14, 0x0160($s0) ## 00000160
/* 02384 80A94324 8E060164 */ lw $a2, 0x0164($s0) ## 00000164
/* 02388 80A94328 0C034261 */ jal Matrix_Translate
/* 0238C 80A9432C 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001
/* 02390 80A94330 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0
/* 02394 80A94334 3C0CDA38 */ lui $t4, 0xDA38 ## $t4 = DA380000
/* 02398 80A94338 358C0003 */ ori $t4, $t4, 0x0003 ## $t4 = DA380003
/* 0239C 80A9433C 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008
/* 023A0 80A94340 AE2B02D0 */ sw $t3, 0x02D0($s1) ## 000002D0
/* 023A4 80A94344 AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000
/* 023A8 80A94348 8FAD00A4 */ lw $t5, 0x00A4($sp)
/* 023AC 80A9434C 3C0580A9 */ lui $a1, %hi(D_80A9509C) ## $a1 = 80A90000
/* 023B0 80A94350 24A5509C */ addiu $a1, $a1, %lo(D_80A9509C) ## $a1 = 80A9509C
/* 023B4 80A94354 8DA40000 */ lw $a0, 0x0000($t5) ## 00000000
/* 023B8 80A94358 24060729 */ addiu $a2, $zero, 0x0729 ## $a2 = 00000729
/* 023BC 80A9435C 0C0346A2 */ jal Matrix_NewMtx
/* 023C0 80A94360 AFA20038 */ sw $v0, 0x0038($sp)
/* 023C4 80A94364 8FA30038 */ lw $v1, 0x0038($sp)
/* 023C8 80A94368 240400FF */ addiu $a0, $zero, 0x00FF ## $a0 = 000000FF
/* 023CC 80A9436C 3C0DDB06 */ lui $t5, 0xDB06 ## $t5 = DB060000
/* 023D0 80A94370 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 023D4 80A94374 3C0380A9 */ lui $v1, %hi(D_80A946FC) ## $v1 = 80A90000
/* 023D8 80A94378 246346FC */ addiu $v1, $v1, %lo(D_80A946FC) ## $v1 = 80A946FC
/* 023DC 80A9437C 8FA5008C */ lw $a1, 0x008C($sp)
/* 023E0 80A94380 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
/* 023E4 80A94384 00027040 */ sll $t6, $v0, 1
.L80A94388:
/* 023E8 80A94388 006E7821 */ addu $t7, $v1, $t6
/* 023EC 80A9438C 95F80000 */ lhu $t8, 0x0000($t7) ## 00000000
/* 023F0 80A94390 96190156 */ lhu $t9, 0x0156($s0) ## 00000156
/* 023F4 80A94394 00A25021 */ addu $t2, $a1, $v0
/* 023F8 80A94398 00A25821 */ addu $t3, $a1, $v0
/* 023FC 80A9439C 03194824 */ and $t1, $t8, $t9
/* 02400 80A943A0 51200004 */ beql $t1, $zero, .L80A943B4
/* 02404 80A943A4 A1600000 */ sb $zero, 0x0000($t3) ## 00000000
/* 02408 80A943A8 10000002 */ beq $zero, $zero, .L80A943B4
/* 0240C 80A943AC A1440000 */ sb $a0, 0x0000($t2) ## 00000000
/* 02410 80A943B0 A1600000 */ sb $zero, 0x0000($t3) ## 00000000
.L80A943B4:
/* 02414 80A943B4 24420001 */ addiu $v0, $v0, 0x0001 ## $v0 = 00000001
/* 02418 80A943B8 00021400 */ sll $v0, $v0, 16
/* 0241C 80A943BC 00021403 */ sra $v0, $v0, 16
/* 02420 80A943C0 28410400 */ slti $at, $v0, 0x0400
/* 02424 80A943C4 5420FFF0 */ bnel $at, $zero, .L80A94388
/* 02428 80A943C8 00027040 */ sll $t6, $v0, 1
/* 0242C 80A943CC 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0
/* 02430 80A943D0 00057100 */ sll $t6, $a1, 4
/* 02434 80A943D4 000E7F02 */ srl $t7, $t6, 28
/* 02438 80A943D8 244C0008 */ addiu $t4, $v0, 0x0008 ## $t4 = 00000009
/* 0243C 80A943DC AE2C02D0 */ sw $t4, 0x02D0($s1) ## 000002D0
/* 02440 80A943E0 000FC080 */ sll $t8, $t7, 2
/* 02444 80A943E4 35AD0020 */ ori $t5, $t5, 0x0020 ## $t5 = DB060020
/* 02448 80A943E8 3C198016 */ lui $t9, %hi(gSegments)
/* 0244C 80A943EC 0338C821 */ addu $t9, $t9, $t8
/* 02450 80A943F0 3C0100FF */ lui $at, 0x00FF ## $at = 00FF0000
/* 02454 80A943F4 AC4D0000 */ sw $t5, 0x0000($v0) ## 00000001
/* 02458 80A943F8 8F396FA8 */ lw $t9, %lo(gSegments)($t9)
/* 0245C 80A943FC 3421FFFF */ ori $at, $at, 0xFFFF ## $at = 00FFFFFF
/* 02460 80A94400 00A14824 */ and $t1, $a1, $at
/* 02464 80A94404 3C018000 */ lui $at, 0x8000 ## $at = 80000000
/* 02468 80A94408 03295021 */ addu $t2, $t9, $t1
/* 0246C 80A9440C 01415821 */ addu $t3, $t2, $at
/* 02470 80A94410 AC4B0004 */ sw $t3, 0x0004($v0) ## 00000005
/* 02474 80A94414 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0
/* 02478 80A94418 3C0E80A9 */ lui $t6, %hi(D_80A94F60) ## $t6 = 80A90000
/* 0247C 80A9441C 25CE4F60 */ addiu $t6, $t6, %lo(D_80A94F60) ## $t6 = 80A94F60
/* 02480 80A94420 244C0008 */ addiu $t4, $v0, 0x0008 ## $t4 = 00000009
/* 02484 80A94424 AE2C02D0 */ sw $t4, 0x02D0($s1) ## 000002D0
/* 02488 80A94428 3C0DDE00 */ lui $t5, 0xDE00 ## $t5 = DE000000
/* 0248C 80A9442C AC4D0000 */ sw $t5, 0x0000($v0) ## 00000001
/* 02490 80A94430 AC4E0004 */ sw $t6, 0x0004($v0) ## 00000005
/* 02494 80A94434 8FAF00A4 */ lw $t7, 0x00A4($sp)
.L80A94438:
/* 02498 80A94438 3C0680A9 */ lui $a2, %hi(D_80A950B0) ## $a2 = 80A90000
/* 0249C 80A9443C 24C650B0 */ addiu $a2, $a2, %lo(D_80A950B0) ## $a2 = 80A950B0
/* 024A0 80A94440 27A40078 */ addiu $a0, $sp, 0x0078 ## $a0 = FFFFFFD8
/* 024A4 80A94444 24070741 */ addiu $a3, $zero, 0x0741 ## $a3 = 00000741
/* 024A8 80A94448 0C031AD5 */ jal Graph_CloseDisps
/* 024AC 80A9444C 8DE50000 */ lw $a1, 0x0000($t7) ## 00000000
/* 024B0 80A94450 8FBF001C */ lw $ra, 0x001C($sp)
/* 024B4 80A94454 8FB00014 */ lw $s0, 0x0014($sp)
/* 024B8 80A94458 8FB10018 */ lw $s1, 0x0018($sp)
/* 024BC 80A9445C 03E00008 */ jr $ra
/* 024C0 80A94460 27BD00A0 */ addiu $sp, $sp, 0x00A0 ## $sp = 00000000
/* 024C4 80A94464 00000000 */ nop
/* 024C8 80A94468 00000000 */ nop
/* 024CC 80A9446C 00000000 */ nop

View file

@ -1,93 +0,0 @@
.rdata
glabel D_80A94FE0
.asciz "KANBAN ARG %x\n"
.balign 4
.text
glabel EnKanban_Init
/* 000B8 80A92058 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0
/* 000BC 80A9205C AFA50034 */ sw $a1, 0x0034($sp)
/* 000C0 80A92060 AFBF0024 */ sw $ra, 0x0024($sp)
/* 000C4 80A92064 AFB00020 */ sw $s0, 0x0020($sp)
/* 000C8 80A92068 3C053C23 */ lui $a1, 0x3C23 ## $a1 = 3C230000
/* 000CC 80A9206C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
/* 000D0 80A92070 0C00B58B */ jal Actor_SetScale
/* 000D4 80A92074 34A5D70A */ ori $a1, $a1, 0xD70A ## $a1 = 3C23D70A
/* 000D8 80A92078 860E001C */ lh $t6, 0x001C($s0) ## 0000001C
/* 000DC 80A9207C 2401FFDD */ addiu $at, $zero, 0xFFDD ## $at = FFFFFFDD
/* 000E0 80A92080 51C1003E */ beql $t6, $at, .L80A9217C
/* 000E4 80A92084 8FBF0024 */ lw $ra, 0x0024($sp)
/* 000E8 80A92088 8E0F0004 */ lw $t7, 0x0004($s0) ## 00000004
/* 000EC 80A9208C A200001F */ sb $zero, 0x001F($s0) ## 0000001F
/* 000F0 80A92090 260501A0 */ addiu $a1, $s0, 0x01A0 ## $a1 = 000001A0
/* 000F4 80A92094 35F80001 */ ori $t8, $t7, 0x0001 ## $t8 = 00000001
/* 000F8 80A92098 AE180004 */ sw $t8, 0x0004($s0) ## 00000004
/* 000FC 80A9209C AFA50028 */ sw $a1, 0x0028($sp)
/* 00100 80A920A0 0C0170D9 */ jal Collider_InitCylinder
/* 00104 80A920A4 8FA40034 */ lw $a0, 0x0034($sp)
/* 00108 80A920A8 3C0780A9 */ lui $a3, %hi(D_80A94490) ## $a3 = 80A90000
/* 0010C 80A920AC 8FA50028 */ lw $a1, 0x0028($sp)
/* 00110 80A920B0 24E74490 */ addiu $a3, $a3, %lo(D_80A94490) ## $a3 = 80A94490
/* 00114 80A920B4 8FA40034 */ lw $a0, 0x0034($sp)
/* 00118 80A920B8 0C01712B */ jal Collider_SetCylinder
/* 0011C 80A920BC 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000
/* 00120 80A920C0 3C0480A9 */ lui $a0, %hi(D_80A94FE0) ## $a0 = 80A90000
/* 00124 80A920C4 24844FE0 */ addiu $a0, $a0, %lo(D_80A94FE0) ## $a0 = 80A94FE0
/* 00128 80A920C8 0C00084C */ jal osSyncPrintf
/* 0012C 80A920CC 8605001C */ lh $a1, 0x001C($s0) ## 0000001C
/* 00130 80A920D0 8602001C */ lh $v0, 0x001C($s0) ## 0000001C
/* 00134 80A920D4 24010300 */ addiu $at, $zero, 0x0300 ## $at = 00000300
/* 00138 80A920D8 240B0001 */ addiu $t3, $zero, 0x0001 ## $t3 = 00000001
/* 0013C 80A920DC 1441000B */ bne $v0, $at, .L80A9210C
/* 00140 80A920E0 340CFFFF */ ori $t4, $zero, 0xFFFF ## $t4 = 0000FFFF
/* 00144 80A920E4 3C198016 */ lui $t9, %hi(gSaveContext+4)
/* 00148 80A920E8 8F39E664 */ lw $t9, %lo(gSaveContext+4)($t9)
/* 0014C 80A920EC 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
/* 00150 80A920F0 2408409D */ addiu $t0, $zero, 0x409D ## $t0 = 0000409D
/* 00154 80A920F4 17210003 */ bne $t9, $at, .L80A92104
/* 00158 80A920F8 24094090 */ addiu $t1, $zero, 0x4090 ## $t1 = 00004090
/* 0015C 80A920FC 10000005 */ beq $zero, $zero, .L80A92114
/* 00160 80A92100 A608010E */ sh $t0, 0x010E($s0) ## 0000010E
.L80A92104:
/* 00164 80A92104 10000003 */ beq $zero, $zero, .L80A92114
/* 00168 80A92108 A609010E */ sh $t1, 0x010E($s0) ## 0000010E
.L80A9210C:
/* 0016C 80A9210C 344A0300 */ ori $t2, $v0, 0x0300 ## $t2 = 00000300
/* 00170 80A92110 A60A010E */ sh $t2, 0x010E($s0) ## 0000010E
.L80A92114:
/* 00174 80A92114 3C014120 */ lui $at, 0x4120 ## $at = 41200000
/* 00178 80A92118 44810000 */ mtc1 $at, $f0 ## $f0 = 10.00
/* 0017C 80A9211C 3C014248 */ lui $at, 0x4248 ## $at = 42480000
/* 00180 80A92120 44812000 */ mtc1 $at, $f4 ## $f4 = 50.00
/* 00184 80A92124 A60B0176 */ sh $t3, 0x0176($s0) ## 00000176
/* 00188 80A92128 A60C0156 */ sh $t4, 0x0156($s0) ## 00000156
/* 0018C 80A9212C 240D0004 */ addiu $t5, $zero, 0x0004 ## $t5 = 00000004
/* 00190 80A92130 44060000 */ mfc1 $a2, $f0
/* 00194 80A92134 44070000 */ mfc1 $a3, $f0
/* 00198 80A92138 AFAD0014 */ sw $t5, 0x0014($sp)
/* 0019C 80A9213C 8FA40034 */ lw $a0, 0x0034($sp)
/* 001A0 80A92140 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000
/* 001A4 80A92144 0C00B92D */ jal func_8002E4B4
/* 001A8 80A92148 E7A40010 */ swc1 $f4, 0x0010($sp)
/* 001AC 80A9214C 0C2A47E8 */ jal func_80A91FA0
/* 001B0 80A92150 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000
/* 001B4 80A92154 3C0E8016 */ lui $t6, %hi(gSaveContext+4)
/* 001B8 80A92158 8DCEE664 */ lw $t6, %lo(gSaveContext+4)($t6)
/* 001BC 80A9215C 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
/* 001C0 80A92160 15C10005 */ bne $t6, $at, .L80A92178
/* 001C4 80A92164 3C014170 */ lui $at, 0x4170 ## $at = 41700000
/* 001C8 80A92168 44814000 */ mtc1 $at, $f8 ## $f8 = 15.00
/* 001CC 80A9216C C6060028 */ lwc1 $f6, 0x0028($s0) ## 00000028
/* 001D0 80A92170 46083281 */ sub.s $f10, $f6, $f8
/* 001D4 80A92174 E60A0028 */ swc1 $f10, 0x0028($s0) ## 00000028
.L80A92178:
/* 001D8 80A92178 8FBF0024 */ lw $ra, 0x0024($sp)
.L80A9217C:
/* 001DC 80A9217C 8FB00020 */ lw $s0, 0x0020($sp)
/* 001E0 80A92180 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000
/* 001E4 80A92184 03E00008 */ jr $ra
/* 001E8 80A92188 00000000 */ nop

View file

@ -1,53 +0,0 @@
.late_rodata
glabel D_80A950C4
.word 0x38000100
.text
glabel func_80A91FA0
/* 00000 80A91FA0 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0
/* 00004 80A91FA4 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00008 80A91FA8 AFA40020 */ sw $a0, 0x0020($sp)
/* 0000C 80A91FAC 8C820078 */ lw $v0, 0x0078($a0) ## 00000078
/* 00010 80A91FB0 50400026 */ beql $v0, $zero, .L80A9204C
/* 00014 80A91FB4 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00018 80A91FB8 844F0008 */ lh $t7, 0x0008($v0) ## 00000008
/* 0001C 80A91FBC 3C0180A9 */ lui $at, %hi(D_80A950C4) ## $at = 80A90000
/* 00020 80A91FC0 C42250C4 */ lwc1 $f2, %lo(D_80A950C4)($at)
/* 00024 80A91FC4 448F2000 */ mtc1 $t7, $f4 ## $f4 = 0.00
/* 00028 80A91FC8 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 0002C 80A91FCC 44817000 */ mtc1 $at, $f14 ## $f14 = 1.00
/* 00030 80A91FD0 468021A0 */ cvt.s.w $f6, $f4
/* 00034 80A91FD4 46023202 */ mul.s $f8, $f6, $f2
/* 00038 80A91FD8 E7A8001C */ swc1 $f8, 0x001C($sp)
/* 0003C 80A91FDC 8458000A */ lh $t8, 0x000A($v0) ## 0000000A
/* 00040 80A91FE0 8459000C */ lh $t9, 0x000C($v0) ## 0000000C
/* 00044 80A91FE4 44985000 */ mtc1 $t8, $f10 ## $f10 = 0.00
/* 00048 80A91FE8 44992000 */ mtc1 $t9, $f4 ## $f4 = 0.00
/* 0004C 80A91FEC 468054A0 */ cvt.s.w $f18, $f10
/* 00050 80A91FF0 468021A0 */ cvt.s.w $f6, $f4
/* 00054 80A91FF4 46029402 */ mul.s $f16, $f18, $f2
/* 00058 80A91FF8 00000000 */ nop
/* 0005C 80A91FFC 46023002 */ mul.s $f0, $f6, $f2
/* 00060 80A92000 E7B00018 */ swc1 $f16, 0x0018($sp)
/* 00064 80A92004 46000207 */ neg.s $f8, $f0
/* 00068 80A92008 46104302 */ mul.s $f12, $f8, $f16
/* 0006C 80A9200C 0C03F494 */ jal Math_FAtan2F
/* 00070 80A92010 00000000 */ nop
/* 00074 80A92014 8FA80020 */ lw $t0, 0x0020($sp)
/* 00078 80A92018 46000287 */ neg.s $f10, $f0
/* 0007C 80A9201C C7B00018 */ lwc1 $f16, 0x0018($sp)
/* 00080 80A92020 E50A0188 */ swc1 $f10, 0x0188($t0) ## 00000188
/* 00084 80A92024 C7B2001C */ lwc1 $f18, 0x001C($sp)
/* 00088 80A92028 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000
/* 0008C 80A9202C 44817000 */ mtc1 $at, $f14 ## $f14 = 1.00
/* 00090 80A92030 46009107 */ neg.s $f4, $f18
/* 00094 80A92034 46102302 */ mul.s $f12, $f4, $f16
/* 00098 80A92038 0C03F494 */ jal Math_FAtan2F
/* 0009C 80A9203C 00000000 */ nop
/* 000A0 80A92040 8FA90020 */ lw $t1, 0x0020($sp)
/* 000A4 80A92044 E5200190 */ swc1 $f0, 0x0190($t1) ## 00000190
/* 000A8 80A92048 8FBF0014 */ lw $ra, 0x0014($sp)
.L80A9204C:
/* 000AC 80A9204C 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000
/* 000B0 80A92050 03E00008 */ jr $ra
/* 000B4 80A92054 00000000 */ nop

View file

@ -1,53 +0,0 @@
glabel func_80A921C0
/* 00220 80A921C0 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 00224 80A921C4 AFBF0014 */ sw $ra, 0x0014($sp)
/* 00228 80A921C8 908E019C */ lbu $t6, 0x019C($a0) ## 0000019C
/* 0022C 80A921CC 15C0001F */ bne $t6, $zero, .L80A9224C
/* 00230 80A921D0 00000000 */ nop
/* 00234 80A921D4 9082019D */ lbu $v0, 0x019D($a0) ## 0000019D
/* 00238 80A921D8 1440001A */ bne $v0, $zero, .L80A92244
/* 0023C 80A921DC 2448FFFF */ addiu $t0, $v0, 0xFFFF ## $t0 = FFFFFFFF
/* 00240 80A921E0 848F008A */ lh $t7, 0x008A($a0) ## 0000008A
/* 00244 80A921E4 849800B6 */ lh $t8, 0x00B6($a0) ## 000000B6
/* 00248 80A921E8 01F81023 */ subu $v0, $t7, $t8
/* 0024C 80A921EC 00021400 */ sll $v0, $v0, 16
/* 00250 80A921F0 00021403 */ sra $v0, $v0, 16
/* 00254 80A921F4 04400003 */ bltz $v0, .L80A92204
/* 00258 80A921F8 00021823 */ subu $v1, $zero, $v0
/* 0025C 80A921FC 10000001 */ beq $zero, $zero, .L80A92204
/* 00260 80A92200 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000
.L80A92204:
/* 00264 80A92204 28612800 */ slti $at, $v1, 0x2800
/* 00268 80A92208 50200018 */ beql $at, $zero, .L80A9226C
/* 0026C 80A9220C 8FBF0014 */ lw $ra, 0x0014($sp)
/* 00270 80A92210 AFA40018 */ sw $a0, 0x0018($sp)
/* 00274 80A92214 0C00BC65 */ jal func_8002F194
/* 00278 80A92218 AFA5001C */ sw $a1, 0x001C($sp)
/* 0027C 80A9221C 8FA40018 */ lw $a0, 0x0018($sp)
/* 00280 80A92220 10400004 */ beq $v0, $zero, .L80A92234
/* 00284 80A92224 8FA5001C */ lw $a1, 0x001C($sp)
/* 00288 80A92228 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001
/* 0028C 80A9222C 1000000E */ beq $zero, $zero, .L80A92268
/* 00290 80A92230 A099019C */ sb $t9, 0x019C($a0) ## 0000019C
.L80A92234:
/* 00294 80A92234 0C00BCB3 */ jal func_8002F2CC
/* 00298 80A92238 3C064288 */ lui $a2, 0x4288 ## $a2 = 42880000
/* 0029C 80A9223C 1000000B */ beq $zero, $zero, .L80A9226C
/* 002A0 80A92240 8FBF0014 */ lw $ra, 0x0014($sp)
.L80A92244:
/* 002A4 80A92244 10000008 */ beq $zero, $zero, .L80A92268
/* 002A8 80A92248 A088019D */ sb $t0, 0x019D($a0) ## 0000019D
.L80A9224C:
/* 002AC 80A9224C 0C00BCCD */ jal func_8002F334
/* 002B0 80A92250 AFA40018 */ sw $a0, 0x0018($sp)
/* 002B4 80A92254 10400004 */ beq $v0, $zero, .L80A92268
/* 002B8 80A92258 8FA40018 */ lw $a0, 0x0018($sp)
/* 002BC 80A9225C 24090014 */ addiu $t1, $zero, 0x0014 ## $t1 = 00000014
/* 002C0 80A92260 A080019C */ sb $zero, 0x019C($a0) ## 0000019C
/* 002C4 80A92264 A089019D */ sb $t1, 0x019D($a0) ## 0000019D
.L80A92268:
/* 002C8 80A92268 8FBF0014 */ lw $ra, 0x0014($sp)
.L80A9226C:
/* 002CC 80A9226C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000
/* 002D0 80A92270 03E00008 */ jr $ra
/* 002D4 80A92274 00000000 */ nop

File diff suppressed because one or more lines are too long

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_80A95140
.incbin "baserom/ovl_En_Kanban", 0x31A0, 0x00000210

3
spec
View file

@ -2600,8 +2600,7 @@ endseg
beginseg
name "ovl_En_Kanban"
include "build/src/overlays/actors/ovl_En_Kanban/z_en_kanban.o"
include "build/data/overlays/actors/z_en_kanban.data.o"
include "build/data/overlays/actors/z_en_kanban.reloc.o"
include "build/src/overlays/actors/ovl_En_Kanban/ovl_En_Kanban_reloc.o"
endseg
beginseg

View file

@ -1,19 +1,84 @@
/*
* File: z_en_kanban.c
* Overlay: ovl_En_Kanban
* Description: Cuttable square sign
*/
#include "z_en_kanban.h"
#include "vt.h"
#define FLAGS 0x00000019
#define THIS ((EnKanban*)thisx)
#define PART_UPPER_LEFT (1 << 0)
#define PART_LEFT_UPPER (1 << 1)
#define PART_LEFT_LOWER (1 << 2)
#define PART_RIGHT_UPPER (1 << 3)
#define PART_RIGHT_LOWER (1 << 4)
#define PART_LOWER_LEFT (1 << 5)
#define PART_UPPER_RIGHT (1 << 6)
#define PART_LOWER_RIGHT (1 << 7)
#define PART_POST_UPPER (1 << 8)
#define PART_POST_LOWER (1 << 9)
#define PART_POST_STAND (1 << 10)
#define LEFT_HALF (PART_UPPER_LEFT | PART_LEFT_UPPER | PART_LEFT_LOWER | PART_LOWER_LEFT)
#define RIGHT_HALF (PART_UPPER_RIGHT | PART_RIGHT_UPPER | PART_RIGHT_LOWER | PART_LOWER_RIGHT)
#define UPPER_HALF (PART_POST_UPPER | PART_UPPER_RIGHT | PART_RIGHT_UPPER | PART_UPPER_LEFT | PART_LEFT_UPPER)
#define UPPERLEFT_HALF (PART_POST_UPPER | PART_UPPER_RIGHT | PART_LEFT_LOWER | PART_UPPER_LEFT | PART_LEFT_UPPER)
#define UPPERRIGHT_HALF (PART_POST_UPPER | PART_UPPER_RIGHT | PART_RIGHT_UPPER | PART_UPPER_LEFT | PART_RIGHT_LOWER)
#define ALL_PARTS (LEFT_HALF | RIGHT_HALF | PART_POST_UPPER | PART_POST_LOWER)
typedef enum {
ENKANBAN_SIGN,
ENKANBAN_AIR,
ENKANBAN_UNUSED,
ENKANBAN_GROUND,
ENKANBAN_WATER,
ENKANBAN_REPAIR
} EnKanbanActionState;
typedef enum {
PIECE_WHOLE_SIGN,
PIECE_UPPER_HALF,
PIECE_LOWER_HALF,
PIECE_RIGHT_HALF,
PIECE_LEFT_HALF,
PIECE_2ND_QUAD,
PIECE_1ST_QUAD,
PIECE_3RD_QUAD,
PIECE_4TH_QUAD,
PIECE_UPPER_LEFT,
PIECE_LEFT_UPPER,
PIECE_LEFT_LOWER,
PIECE_LOWER_LEFT,
PIECE_UPPER_RIGHT,
PIECE_RIGHT_UPPER,
PIECE_RIGHT_LOWER,
PIECE_LOWER_RIGHT,
PIECE_POST_UPPER,
PIECE_POST_LOWER,
PIECE_OTHER = 100
} EnKanbanPiece;
typedef enum {
CUT_POST,
CUT_VERT_L,
CUT_HORIZ,
CUT_DIAG_L, // lower left to upper right
CUT_DIAG_R, // upper left to lower right
CUT_VERT_R
} EnKanbanCutType;
void EnKanban_Init(Actor* thisx, GlobalContext* globalCtx);
void EnKanban_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnKanban_Update(Actor* thisx, GlobalContext* globalCtx);
void EnKanban_Draw(Actor* thisx, GlobalContext* globalCtx);
extern UNK_TYPE D_0403C050;
extern UNK_TYPE D_06000C30;
extern UNK_TYPE D_06001630;
extern Gfx D_0403C050[];
extern Gfx D_06000C30[];
extern Gfx D_06001630[];
/*
const ActorInit En_Kanban_InitVars = {
ACTOR_EN_KANBAN,
ACTORTYPE_PROP,
@ -25,15 +90,813 @@ const ActorInit En_Kanban_InitVars = {
(ActorFunc)EnKanban_Update,
(ActorFunc)EnKanban_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Kanban/func_80A91FA0.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Kanban/EnKanban_Init.s")
static ColliderCylinderInit sCylinderInit = {
{ COLTYPE_UNK10, 0x11, 0x09, 0x39, 0x10, COLSHAPE_CYLINDER },
{ 0x00, { 0xFFCFFFFF, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x01, 0x01, 0x01 },
{ 20, 50, 5, { 0, 0, 0 } },
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Kanban/EnKanban_Destroy.s")
static u16 sPartFlags[] = {
PART_UPPER_LEFT, PART_LEFT_UPPER, PART_LEFT_LOWER, PART_RIGHT_UPPER, PART_RIGHT_LOWER, PART_LOWER_LEFT,
PART_UPPER_RIGHT, PART_LOWER_RIGHT, PART_POST_UPPER, PART_POST_LOWER, PART_POST_STAND,
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Kanban/func_80A921C0.s")
static Vec3f sPieceOffsets[] = {
/* WHOLE_SIGN */ { 0.0f, 44.0f, 0.0f },
/* UPPER_HALF */ { 0.0f, 50.0f, 0.0f },
/* LOWER_HALF */ { 0.0f, 38.0f, 0.0f },
/* RIGHT_HALF */ { 10.0f, 44.0f, 0.0f },
/* LEFT_HALF */ { -10.0f, 44.0f, 0.0f },
/* 2ND_QUAD */ { -10.0f, 50.0f, 0.0f },
/* 1ST_QUAD */ { 10.0f, 50.0f, 0.0f },
/* 3RD_QUAD */ { -10.0f, 38.0f, 0.0f },
/* 4TH_QUAD */ { 10.0f, 38.0f, 0.0f },
/* UPPER_LEFT */ { -7.5f, 51.0f, 0.0f },
/* LEFT_UPPER */ { -12.5f, 48.0f, 0.0f },
/* LEFT_LOWER */ { -12.5f, 40.0f, 0.0f },
/* LOWER_LEFT */ { -7.5f, 37.0f, 0.0f },
/* UPPER_RIGHT */ { 7.5f, 51.0f, 0.0f },
/* RIGHT_UPPER */ { 12.5f, 48.0f, 0.0f },
/* RIGHT_LOWER */ { 12.5f, 40.0f, 0.0f },
/* LOWER_RIGHT */ { 7.5f, 37.0f, 0.0f },
/* POST_UPPER */ { 0.0f, 50.0f, 0.0f },
/* POST_LOWER */ { 0.0f, 38.0f, 0.0f },
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Kanban/EnKanban_Update.s")
static Vec3f sPieceSizes[] = {
/* WHOLE_SIGN */ { 1500.0f, 1000.0f, 0.0f },
/* UPPER_HALF */ { 1500.0f, 500.0f, 0.0f },
/* LOWER_HALF */ { 1500.0f, 500.0f, 0.0f },
/* RIGHT_HALF */ { 700.0f, 1000.0f, 0.0f },
/* LEFT_HALF */ { 700.0f, 1000.0f, 0.0f },
/* 2ND_QUAD */ { 700.0f, 500.0f, 0.0f },
/* 1ST_QUAD */ { 700.0f, 500.0f, 0.0f },
/* 3RD_QUAD */ { 700.0f, 500.0f, 0.0f },
/* 4TH_QUAD */ { 700.0f, 500.0f, 0.0f },
/* UPPER_LEFT */ { 700.0f, 500.0f, 0.0f },
/* LEFT_UPPER */ { 700.0f, 500.0f, 0.0f },
/* LEFT_LOWER */ { 700.0f, 500.0f, 0.0f },
/* LOWER_LEFT */ { 700.0f, 500.0f, 0.0f },
/* UPPER_RIGHT */ { 700.0f, 500.0f, 0.0f },
/* RIGHT_UPPER */ { 700.0f, 500.0f, 0.0f },
/* RIGHT_LOWER */ { 700.0f, 500.0f, 0.0f },
/* LOWER_RIGHT */ { 700.0f, 500.0f, 0.0f },
/* POST_UPPER */ { 200.0f, 500.0f, 0.0f },
/* POST_LOWER */ { 200.0f, 500.0f, 0.0f },
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Kanban/EnKanban_Draw.s")
static u8 sCutTypes[] = {
/* 1H_OVER */ CUT_VERT_L, /* 2H_OVER */ CUT_VERT_L,
/* 1H_COMBO */ CUT_DIAG_R, /* 2H_COMBO */ CUT_DIAG_R,
/* 1H_LEFT */ CUT_HORIZ, /* 2H_LEFT */ CUT_HORIZ,
/* 1H_COMBO */ CUT_HORIZ, /* 2H_COMBO */ CUT_HORIZ,
/* 1H_RIGHT */ CUT_HORIZ, /* 2H_RIGHT */ CUT_HORIZ,
/* 1H_COMBO */ CUT_HORIZ, /* 2H_COMBO */ CUT_HORIZ,
/* 1H_STAB */ CUT_POST, /* 2H_STAB */ CUT_POST,
/* 1H_COMBO */ CUT_POST, /* 2H_COMBO */ CUT_POST,
/* FLIP_START */ CUT_VERT_L, /* JUMP_START */ CUT_VERT_L,
/* FLIP_END */ CUT_VERT_L, /* JUMP_END */ CUT_VERT_L,
/* BACK_LEFT */ CUT_HORIZ, /* BACK_RIGHT */ CUT_HORIZ,
/* OVER_HAMMER */ CUT_POST, /* SIDE_HAMMER */ CUT_POST,
/* 1H_SPIN_ATK */ CUT_POST, /* 2H_SPIN_ATK */ CUT_POST,
/* 1H_BIG_SPIN */ CUT_POST, /* 2H_BIG_SPIN */ CUT_POST,
};
static u16 sCutFlags[] = {
/* CUT_POST */ ALL_PARTS, /* CUT_VERT_L */ LEFT_HALF,
/* CUT_HORIZ */ UPPER_HALF, /* CUT_DIAG_L */ UPPERLEFT_HALF,
/* CUT_DIAG_R */ UPPERRIGHT_HALF, /* CUT_VERT_R */ RIGHT_HALF,
};
void EnKanban_SetFloorRot(EnKanban* this) {
if (this->actor.floorPoly != NULL) {
f32 nx = this->actor.floorPoly->norm.x * COLPOLY_NORM_FRAC;
f32 ny = this->actor.floorPoly->norm.y * COLPOLY_NORM_FRAC;
f32 nz = this->actor.floorPoly->norm.z * COLPOLY_NORM_FRAC;
this->floorRot.x = -Math_FAtan2F(-nz * ny, 1.0f);
this->floorRot.z = Math_FAtan2F(-nx * ny, 1.0f);
}
}
void EnKanban_Init(Actor* thisx, GlobalContext* globalCtx) {
EnKanban* this = THIS;
Actor_SetScale(&this->actor, 0.01f);
if (this->actor.params != ENKANBAN_PIECE) {
this->actor.unk_1F = 0;
this->actor.flags |= 1;
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
osSyncPrintf("KANBAN ARG %x\n", this->actor.params);
if (this->actor.params == ENKANBAN_FISHING) {
if (gSaveContext.linkAge == 1) {
this->actor.textId = 0x409D;
} else {
this->actor.textId = 0x4090;
}
} else {
this->actor.textId = this->actor.params | 0x300;
}
this->bounceX = 1;
this->partFlags = 0xFFFF;
func_8002E4B4(globalCtx, &this->actor, 10.0f, 10.0f, 50.0f, 4);
EnKanban_SetFloorRot(this);
if (gSaveContext.linkAge == 1) {
this->actor.posRot.pos.y -= 15.0f;
}
}
}
void EnKanban_Destroy(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnKanban* this = THIS;
if (this->actionState == ENKANBAN_SIGN) {
Collider_DestroyCylinder(globalCtx, &this->collider);
}
}
void EnKanban_Message(EnKanban* this, GlobalContext* globalCtx) {
if (!this->msgFlag) {
if (this->msgTimer == 0) {
if (ABS((s16)(this->actor.yawTowardsLink - this->actor.shape.rot.y)) < 0x2800) {
if (func_8002F194(&this->actor, globalCtx)) {
this->msgFlag = true;
} else {
func_8002F2CC(&this->actor, globalCtx, 68.0f);
}
}
} else {
this->msgTimer--;
}
} else {
if (func_8002F334(&this->actor, globalCtx)) {
this->msgFlag = false;
this->msgTimer = 20;
}
}
}
void EnKanban_Update(Actor* thisx, GlobalContext* globalCtx2) {
u8 bounced = false;
GlobalContext* globalCtx = globalCtx2;
EnKanban* this = THIS;
EnKanban* signpost;
EnKanban* piece;
Player* player = PLAYER;
Vec3f offset;
this->frameCount++;
switch (this->actionState) {
case ENKANBAN_SIGN:
if (this->invincibilityTimer != 0) {
this->invincibilityTimer--;
}
if (this->zTargetTimer != 0) {
this->zTargetTimer--;
}
if (this->zTargetTimer == 1) {
this->actor.flags &= ~1;
}
if (this->partFlags == 0xFFFF) {
EnKanban_Message(this, globalCtx);
}
if ((this->invincibilityTimer == 0) && (this->collider.base.acFlags & 2)) {
this->collider.base.acFlags &= ~2;
this->invincibilityTimer = 6;
piece = (EnKanban*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_KANBAN,
this->actor.posRot.pos.x, this->actor.posRot.pos.y,
this->actor.posRot.pos.z, this->actor.shape.rot.x,
this->actor.shape.rot.y, this->actor.shape.rot.z, ENKANBAN_PIECE);
if (piece != NULL) {
ColliderBody* hitItem = this->collider.body.acHitItem;
s16 yawDiff = this->actor.yawTowardsLink - this->actor.shape.rot.y;
u8 i;
if (hitItem->toucher.flags & 0x700) {
this->cutType = sCutTypes[player->swordAnimation];
} else {
this->cutType = CUT_POST;
}
if (ABS(yawDiff) > 0x4000) {
if (this->cutType == CUT_DIAG_R) {
this->cutType = CUT_DIAG_L;
} else if (this->cutType == CUT_VERT_L) {
this->cutType = CUT_VERT_R;
}
}
piece->partFlags = sCutFlags[this->cutType] & this->partFlags;
if (piece->partFlags == 0) {
Actor_Kill(&piece->actor);
return;
}
piece->partCount = 0;
for (i = 0; i < ARRAY_COUNT(sPartFlags); i++) {
if (sPartFlags[i] & piece->partFlags) {
piece->partCount++;
}
}
this->partFlags &= ~sCutFlags[this->cutType];
if (!(this->partFlags & ALL_PARTS)) {
this->zTargetTimer = 10;
}
if ((piece->partFlags & PART_UPPER_LEFT) && (piece->partFlags & PART_LOWER_RIGHT)) {
piece->pieceType = PIECE_WHOLE_SIGN;
} else if ((piece->partFlags & PART_LEFT_UPPER) && (piece->partFlags & PART_RIGHT_UPPER)) {
piece->pieceType = PIECE_UPPER_HALF;
} else if ((piece->partFlags & PART_LEFT_LOWER) && (piece->partFlags & PART_RIGHT_LOWER)) {
piece->pieceType = PIECE_LOWER_HALF;
} else if ((piece->partFlags & PART_UPPER_RIGHT) && (piece->partFlags & PART_LOWER_RIGHT)) {
piece->pieceType = PIECE_RIGHT_HALF;
} else if ((piece->partFlags & PART_UPPER_LEFT) && (piece->partFlags & PART_LOWER_LEFT)) {
piece->pieceType = PIECE_LEFT_HALF;
} else if ((piece->partFlags & PART_UPPER_LEFT) && (piece->partFlags & PART_LEFT_UPPER)) {
piece->pieceType = PIECE_2ND_QUAD;
} else if ((piece->partFlags & PART_UPPER_RIGHT) && (piece->partFlags & PART_RIGHT_UPPER)) {
piece->pieceType = PIECE_1ST_QUAD;
} else if ((piece->partFlags & PART_LEFT_LOWER) && (piece->partFlags & PART_LOWER_LEFT)) {
piece->pieceType = PIECE_3RD_QUAD;
} else if ((piece->partFlags & PART_RIGHT_LOWER) && (piece->partFlags & PART_LOWER_RIGHT)) {
piece->pieceType = PIECE_4TH_QUAD;
} else if (piece->partFlags & PART_UPPER_LEFT) {
piece->pieceType = PIECE_UPPER_LEFT;
} else if (piece->partFlags & PART_LEFT_UPPER) {
piece->pieceType = PIECE_LEFT_UPPER;
} else if (piece->partFlags & PART_LEFT_LOWER) {
piece->pieceType = PIECE_LEFT_LOWER;
} else if (piece->partFlags & PART_LOWER_LEFT) {
piece->pieceType = PIECE_LOWER_LEFT;
} else if (piece->partFlags & PART_UPPER_RIGHT) {
piece->pieceType = PIECE_UPPER_RIGHT;
} else if (piece->partFlags & PART_RIGHT_UPPER) {
piece->pieceType = PIECE_RIGHT_UPPER;
} else if (piece->partFlags & PART_RIGHT_LOWER) {
piece->pieceType = PIECE_RIGHT_LOWER;
} else if (piece->partFlags & PART_LOWER_RIGHT) {
piece->pieceType = PIECE_LOWER_RIGHT;
} else if (piece->partFlags & PART_POST_UPPER) {
piece->pieceType = PIECE_POST_UPPER;
} else if (piece->partFlags & PART_POST_LOWER) {
piece->pieceType = PIECE_POST_LOWER;
} else {
piece->pieceType = PIECE_OTHER;
}
if (piece->pieceType == 100) {
piece->pieceType = PIECE_WHOLE_SIGN;
}
Matrix_RotateY((this->actor.shape.rot.y / (f32)0x8000) * M_PI, MTXMODE_NEW);
Matrix_MultVec3f(&sPieceOffsets[piece->pieceType], &offset);
piece->actor.posRot.pos.x += offset.x;
piece->actor.posRot.pos.y += offset.y;
piece->actor.posRot.pos.z += offset.z;
piece->offset.x = -sPieceOffsets[piece->pieceType].x / this->actor.scale.x;
piece->offset.y = -sPieceOffsets[piece->pieceType].y / this->actor.scale.x;
piece->offset.z = -sPieceOffsets[piece->pieceType].z / this->actor.scale.x;
piece->pieceWidth = sPieceSizes[piece->pieceType].x;
piece->pieceHeight = sPieceSizes[piece->pieceType].y;
piece->actor.gravity = -1.0f;
piece->actionState = ENKANBAN_AIR;
piece->actor.posRot.rot.y = (s16)Rand_CenteredFloat(0x3000) + this->actor.yawTowardsLink + 0x8000;
piece->actor.velocity.y = Rand_ZeroFloat(2.0f) + 3.0f;
piece->actor.speedXZ = Rand_ZeroFloat(2.0f) + 3.0f;
if (piece->partCount >= 4) {
piece->bounceX = (s16)Rand_ZeroFloat(10.0f) + 6;
piece->bounceZ = (s16)Rand_ZeroFloat(10.0f) + 6;
} else {
piece->bounceX = (s16)Rand_ZeroFloat(7.0f) + 3;
piece->bounceZ = (s16)Rand_ZeroFloat(7.0f) + 3;
}
piece->spinVel.y = Rand_CenteredFloat(0x1800);
if (Rand_ZeroOne() < 0.5f) {
piece->direction = 1;
} else {
piece->direction = -1;
}
piece->airTimer = 100;
piece->actor.flags &= ~1;
piece->actor.flags |= 0x02000000;
this->cutMarkTimer = 5;
Audio_PlayActorSound2(&this->actor, NA_SE_IT_SWORD_STRIKE);
}
}
this->actor.posRot2.pos = this->actor.posRot.pos;
this->actor.posRot2.pos.y += 44.0f;
Collider_CylinderUpdate(&this->actor, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
if (this->actor.xzDistFromLink > 500.0f) {
this->actor.flags |= 1;
this->partFlags = 0xFFFF;
}
if (this->cutMarkTimer != 0) {
if (this->cutMarkTimer >= 5) {
this->cutMarkAlpha += 255;
if (this->cutMarkAlpha > 255) {
this->cutMarkAlpha = 255;
}
} else {
this->cutMarkAlpha -= 65;
if (this->cutMarkAlpha < 0) {
this->cutMarkAlpha = 0;
}
}
this->cutMarkTimer--;
}
break;
case ENKANBAN_AIR:
case ENKANBAN_UNUSED: {
u16 tempBgFlags;
f32 tempX;
f32 tempY;
f32 tempZ;
f32 tempWaterY;
u8 onGround;
Actor_MoveForward(&this->actor);
func_8002E4B4(globalCtx, &this->actor, 30.0f, 30.0f, 50.0f, 5);
tempX = this->actor.posRot.pos.x;
tempY = this->actor.posRot.pos.y;
tempZ = this->actor.posRot.pos.z;
tempBgFlags = this->actor.bgCheckFlags;
tempWaterY = this->actor.waterY;
this->actor.posRot.pos.z += ((this->actor.posRot.pos.y - this->actor.groundY) * -50.0f) / 100.0f;
func_8002E4B4(globalCtx, &this->actor, 10.0f, 10.0f, 50.0f, 4);
EnKanban_SetFloorRot(this);
this->actor.posRot.pos.x = tempX;
this->actor.posRot.pos.y = tempY;
this->actor.posRot.pos.z = tempZ;
this->actor.bgCheckFlags = tempBgFlags;
this->actor.waterY = tempWaterY;
osSyncPrintf(VT_RST);
onGround = (this->actor.bgCheckFlags & 1);
if (this->spinXFlag) {
this->spinRot.x += this->spinVel.x;
this->spinVel.x -= 0x800;
if ((this->spinRot.x <= 0) && onGround) {
this->spinRot.x = 0;
this->spinVel.x = 0;
}
} else {
this->spinRot.x -= this->spinVel.x;
this->spinVel.x -= 0x800;
if ((this->spinRot.x >= 0) && onGround) {
this->spinRot.x = 0;
this->spinVel.x = 0;
}
}
if (this->spinVel.x < -0xC00) {
this->spinVel.x = -0xC00;
}
if (this->spinZFlag) {
this->spinRot.z += this->spinVel.z;
this->spinVel.z -= 0x800;
if ((this->spinRot.z <= 0) && onGround) {
this->spinRot.z = 0;
this->spinVel.z = 0;
}
} else {
this->spinRot.z -= this->spinVel.z;
this->spinVel.z -= 0x800;
if ((this->spinRot.z >= 0) && onGround) {
this->spinRot.z = 0;
this->spinVel.z = 0;
}
}
if (this->spinVel.z < -0xC00) {
this->spinVel.z = -0xC00;
}
if (this->actor.bgCheckFlags & 8) {
this->actor.speedXZ *= -0.5f;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_WOODPLATE_BOUND);
}
if (this->actor.bgCheckFlags & 0x40) {
this->actionState = ENKANBAN_WATER;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_BOMB_DROP_WATER);
this->bounceX = this->bounceZ = 0;
this->actor.posRot.pos.y += this->actor.waterY;
EffectSsGSplash_Spawn(globalCtx, &this->actor.posRot.pos, NULL, NULL, 0, (this->partCount * 20) + 300);
EffectSsGRipple_Spawn(globalCtx, &this->actor.posRot.pos, 150, 650, 0);
EffectSsGRipple_Spawn(globalCtx, &this->actor.posRot.pos, 300, 800, 5);
this->actor.velocity.y = 0.0f;
this->actor.gravity = 0.0f;
osSyncPrintf(" WAT Y = %f\n", this->actor.waterY);
osSyncPrintf(" POS Y = %f\n", this->actor.posRot.pos.y);
osSyncPrintf(" GROUND Y = %f\n", this->actor.groundY);
break;
}
if (onGround) {
if (this->bounceCount <= 0) {
this->bounceCount++;
this->actor.velocity.y *= -0.3f;
this->actor.posRot.rot.y += (s16)Rand_CenteredFloat(16384.0f);
} else {
this->actor.velocity.y = 0.0f;
}
this->actor.speedXZ *= 0.7f;
if ((this->spinRot.x == 0) && (this->bounceX != 0)) {
this->spinVel.x = this->bounceX * 0x200;
if (this->bounceX != 0) {
this->bounceX -= 5;
if (this->bounceX <= 0) {
this->bounceX = 0;
}
}
if (Rand_ZeroOne() < 0.5f) {
this->spinXFlag = true;
} else {
this->spinXFlag = false;
}
bounced = true;
}
if ((this->spinRot.z == 0) && (this->bounceZ != 0)) {
this->spinVel.z = this->bounceZ * 0x200;
if (this->bounceZ != 0) {
this->bounceZ -= 5;
if (this->bounceZ <= 0) {
this->bounceZ = 0;
}
}
if (Rand_ZeroOne() < 0.5f) {
this->spinZFlag = true;
} else {
this->spinZFlag = false;
}
bounced = true;
}
Math_ApproachS(&this->actor.shape.rot.x, this->direction * 0x4000, 1, 0x2000);
} else {
this->actor.shape.rot.y += this->spinVel.y;
this->actor.shape.rot.x += this->direction * 0x7D0;
}
if (bounced) {
s16 dustCount;
s16 j;
Vec3f velocity = { 0.0f, 0.0f, 0.0f };
Vec3f accel;
Vec3f pos;
Audio_PlayActorSound2(&this->actor, NA_SE_EV_WOODPLATE_BOUND);
accel.x = 0.0f;
accel.y = 0.1f;
accel.z = 0.0f;
pos.y = this->actor.groundY + 3.0f;
dustCount = this->partCount * 0.5f;
for (j = 0; j < dustCount + 3; j++) {
pos.x = this->actor.posRot.pos.x + Rand_CenteredFloat((this->partCount * 0.5f) + 20.0f);
pos.z = this->actor.posRot.pos.z + Rand_CenteredFloat((this->partCount * 0.5f) + 20.0f);
func_800286CC(globalCtx, &pos, &velocity, &accel, 100, 5);
}
}
if (DECR(this->airTimer) == 0) {
this->actionState = ENKANBAN_GROUND;
}
}
case ENKANBAN_GROUND:
case ENKANBAN_WATER:
signpost = (EnKanban*)this->actor.parent;
if (signpost->partFlags == 0xFFFF) {
Actor_Kill(&this->actor);
}
Math_ApproachF(&this->actor.shape.unk_08, 100.0f, 1.0f, 5.0f);
if (this->actionState == ENKANBAN_WATER) {
s32 rippleDelay;
s32 rippleScale;
if ((player->actor.speedXZ > 0.0f) && (player->actor.posRot.pos.y < this->actor.posRot.pos.y) &&
(this->actor.xyzDistFromLinkSq < 2500.0f)) {
Math_ApproachF(&this->actor.speedXZ, player->actor.speedXZ, 1.0f, 0.2f);
if (this->actor.speedXZ > 1.0f) {
this->actor.speedXZ = 1.0f;
}
if (Math_SmoothStepToS(&this->actor.posRot.rot.y, this->actor.yawTowardsLink + 0x8000, 1, 0x1000,
0) > 0) {
this->spinVel.y = this->actor.speedXZ * 1000.0f;
} else {
this->spinVel.y = this->actor.speedXZ * -1000.0f;
}
}
if (this->actor.bgCheckFlags & 1) {
this->actor.speedXZ = 0.0f;
}
Actor_MoveForward(&this->actor);
if (this->actor.speedXZ != 0.0f) {
func_8002E4B4(globalCtx, &this->actor, 10.0f, 10.0f, 50.0f, 5);
if (this->actor.bgCheckFlags & 8) {
this->actor.speedXZ *= -0.5f;
if (this->spinVel.y > 0) {
this->spinVel.y = -0x7D0;
} else {
this->spinVel.y = 0x7D0;
}
}
Math_ApproachZeroF(&this->actor.speedXZ, 1.0f, 0.15f);
}
this->actor.shape.rot.y += this->spinVel.y;
Math_ApproachS(&this->spinVel.y, 0, 1, 0x3A);
Math_ApproachS(&this->actor.shape.rot.x, this->direction * 0x4000, 2, 0x1000);
Math_ApproachS(&this->spinRot.x, Math_SinS(2500 * this->frameCount) * 500.0f, 2, 0x1000);
Math_ApproachS(&this->spinRot.z, Math_CosS(3000 * this->frameCount) * 500.0f, 2, 0x1000);
Math_ApproachZeroF(&this->floorRot.x, 0.5f, 0.2f);
Math_ApproachZeroF(&this->floorRot.z, 0.5f, 0.2f);
if (fabsf(this->actor.speedXZ) > 1.0f) {
rippleDelay = 0;
} else if (fabsf(this->actor.speedXZ) > 0.5f) {
rippleDelay = 3;
} else {
rippleDelay = 7;
}
if (!(this->frameCount & rippleDelay)) {
if (this->partCount < 3) {
rippleScale = 0;
} else if (this->partCount < 6) {
rippleScale = 100;
} else {
rippleScale = 200;
}
EffectSsGRipple_Spawn(globalCtx, &this->actor.posRot.pos, rippleScale, rippleScale + 500, 0);
}
} else if ((globalCtx->actorCtx.unk_02 != 0) && (this->actor.xyzDistFromLinkSq < SQ(100.0f))) {
f32 hammerStrength = (100.0f - sqrtf(this->actor.xyzDistFromLinkSq)) * 0.05f;
this->actionState = ENKANBAN_AIR;
this->actor.gravity = -1.0f;
this->actor.posRot.rot.y = Rand_CenteredFloat(0x10000);
if (this->partCount >= 4) {
this->bounceX = (s16)Rand_ZeroFloat(10.0f) + 6;
this->bounceZ = (s16)Rand_ZeroFloat(10.0f) + 6;
this->actor.velocity.y = 2.0f + hammerStrength;
this->actor.speedXZ = Rand_ZeroFloat(1.0f);
} else {
this->bounceX = (s16)Rand_ZeroFloat(7.0f) + 3;
this->bounceZ = (s16)Rand_ZeroFloat(7.0f) + 3;
this->actor.velocity.y = 3.0f + hammerStrength;
this->actor.speedXZ = Rand_ZeroFloat(1.5f);
}
this->spinVel.y = Rand_CenteredFloat(0x1800);
if (Rand_ZeroOne() < 0.5f) {
this->direction = 1;
} else {
this->direction = -1;
}
this->airTimer = 70;
}
if (this->bounceX == 0) {
Actor* bomb = globalCtx->actorCtx.actorList[ACTORTYPE_EXPLOSIVES].first;
f32 dx;
f32 dy;
f32 dz;
while (bomb != NULL) {
if (bomb->params != 1) {
bomb = bomb->next;
continue;
}
dx = this->actor.posRot.pos.x - bomb->posRot.pos.x;
dy = this->actor.posRot.pos.y - bomb->posRot.pos.y;
dz = this->actor.posRot.pos.z - bomb->posRot.pos.z;
if (sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < 100.0f) {
f32 bombStrength = (100.0f - sqrtf(SQ(dx) + SQ(dy) + SQ(dz))) * 0.05f;
this->actionState = ENKANBAN_AIR;
this->actor.gravity = -1.0f;
this->actor.posRot.rot.y = Math_FAtan2F(dx, dz) * (0x8000 / M_PI);
if (this->partCount >= 4) {
this->bounceX = (s16)Rand_ZeroFloat(10.0f) + 6;
this->bounceZ = (s16)Rand_ZeroFloat(10.0f) + 6;
this->actor.velocity.y = 2.5f + bombStrength;
this->actor.speedXZ = 3.0f + bombStrength;
} else {
this->bounceX = (s16)Rand_ZeroFloat(7.0f) + 3;
this->bounceZ = (s16)Rand_ZeroFloat(7.0f) + 3;
this->actor.velocity.y = 5.0f + bombStrength;
this->actor.speedXZ = 4.0f + bombStrength;
}
this->spinVel.y = Rand_CenteredFloat(0x1800);
if (Rand_ZeroOne() < 0.5f) {
this->direction = 1;
} else {
this->direction = -1;
}
this->airTimer = 70;
}
bomb = bomb->next;
}
}
osSyncPrintf(VT_FGCOL(GREEN));
osSyncPrintf("OCARINA_MODE %d\n", globalCtx->msgCtx.unk_E3EE);
osSyncPrintf(VT_RST);
switch (this->ocarinaFlag) {
case 0:
if (globalCtx->msgCtx.unk_E3EE == 1) {
this->ocarinaFlag = 1;
}
break;
case 1:
if ((globalCtx->msgCtx.unk_E3EE == 4) && (globalCtx->msgCtx.unk_E3F2 == 8)) {
this->actionState = ENKANBAN_REPAIR;
this->bounceX = 1;
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
}
break;
}
break;
case ENKANBAN_REPAIR: {
f32 distX;
f32 distY;
f32 distZ;
s16 pDiff;
s16 yDiff;
s16 rDiff;
signpost = (EnKanban*)this->actor.parent;
if (signpost->partFlags == 0xFFFF) {
Actor_Kill(&this->actor);
}
Matrix_RotateY((signpost->actor.shape.rot.y / 32768.0f) * 3.1415927f, MTXMODE_NEW);
Matrix_MultVec3f(&sPieceOffsets[this->pieceType], &offset);
distX = Math_SmoothStepToF(&this->actor.posRot.pos.x, signpost->actor.posRot.pos.x + offset.x, 1.0f, 3.0f,
0.0f);
distY = Math_SmoothStepToF(&this->actor.posRot.pos.y, signpost->actor.posRot.pos.y + offset.y, 1.0f, 3.0f,
0.0f);
distZ = Math_SmoothStepToF(&this->actor.posRot.pos.z, signpost->actor.posRot.pos.z + offset.z, 1.0f, 3.0f,
0.0f);
pDiff = Math_SmoothStepToS(&this->actor.shape.rot.x, signpost->actor.shape.rot.x, 1, 0x200, 0);
yDiff = Math_SmoothStepToS(&this->actor.shape.rot.y, signpost->actor.shape.rot.y, 1, 0x200, 0);
rDiff = Math_SmoothStepToS(&this->actor.shape.rot.z, signpost->actor.shape.rot.z, 1, 0x200, 0);
Math_ApproachS(&this->spinRot.x, 0, 1, 0x200);
Math_ApproachS(&this->spinRot.z, 0, 1, 0x200);
Math_ApproachZeroF(&this->floorRot.x, 1.0f, 0.05f);
Math_ApproachZeroF(&this->floorRot.z, 1.0f, 0.05f);
Math_ApproachZeroF(&this->actor.shape.unk_08, 1.0f, 2.0f);
if (((distX + distY + distZ) == 0.0f) &&
((pDiff + yDiff + rDiff + this->spinRot.x + this->spinRot.z) == 0) && (this->floorRot.x == 0.0f) &&
(this->floorRot.z == 0.0f)) {
signpost->partFlags |= this->partFlags;
signpost->actor.flags |= 1;
Actor_Kill(&this->actor);
}
} break;
}
}
static Gfx* sDisplayLists[] = {
0x06000CB0, 0x06000DB8, 0x06000E78, 0x06000F38, 0x06000FF8, 0x060010B8,
0x060011C0, 0x060012C8, 0x060013D0, 0x06001488, 0x06001540,
};
#include "z_en_kanban_gfx.c"
static f32 sCutAngles[] = {
/* CUT_POST */ 0.50f * M_PI,
/* CUT_VERT_L */ 0.00f * M_PI,
/* CUT_HORIZ */ 0.50f * M_PI,
/* CUT_DIAG_L */ 0.66f * M_PI,
/* CUT_DIAG_R */ 0.34f * M_PI,
/* CUT_VERT_R */ 0.00f * M_PI,
};
static s32 sUnused[] = { 0, 0, 0 }; // Unused zero vector?
static Vtx sShadowVertices[] = {
VTX(-2000, 0, 0, 0, 1024, 0xFF, 0xFF, 0xFF, 0xFF),
VTX(2000, 0, 0, 1024, 1024, 0xFF, 0xFF, 0xFF, 0xFF),
VTX(2000, 6000, 0, 1024, 0, 0xFF, 0xFF, 0xFF, 0xFF),
VTX(-2000, 6000, 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF),
};
static Gfx sShadowDList[] = {
gsDPPipeSync(),
gsDPSetTextureLUT(G_TT_NONE),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPLoadTextureBlock(0x08000000, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_CLAMP,
G_TX_NOMIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD),
gsDPSetCombineLERP(PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED),
gsDPSetRenderMode(G_RM_PASS, G_RM_ZB_OVL_SURF2),
gsSPClearGeometryMode(G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR),
gsSPVertex(sShadowVertices, 4, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSPEndDisplayList(),
};
void EnKanban_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnKanban* this = THIS;
f32 zShift;
f32 zShift2;
s16 i;
u8* shadowTex = Graph_Alloc(globalCtx->state.gfxCtx, 0x400);
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_kanban.c", 1659);
func_80093D18(globalCtx->state.gfxCtx);
func_80093D84(globalCtx->state.gfxCtx);
gSPDisplayList(POLY_OPA_DISP++, D_06000C30);
if (this->actionState != ENKANBAN_SIGN) {
Matrix_Translate(this->actor.posRot.pos.x, this->actor.posRot.pos.y, this->actor.posRot.pos.z, MTXMODE_NEW);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
Matrix_RotateX(this->floorRot.x, MTXMODE_APPLY);
Matrix_RotateZ(this->floorRot.z, MTXMODE_APPLY);
Matrix_Translate(0.0f, this->actor.shape.unk_08, 0.0f, MTXMODE_APPLY);
Matrix_RotateY((this->actor.shape.rot.y / (f32)0x8000) * M_PI, MTXMODE_APPLY);
Matrix_RotateX((this->actor.shape.rot.x / (f32)0x8000) * M_PI, MTXMODE_APPLY);
zShift = fabsf(Math_SinS(this->spinRot.x) * this->pieceHeight);
zShift2 = fabsf(Math_SinS(this->spinRot.z) * this->pieceWidth);
zShift = MAX(zShift2, zShift);
zShift *= -(f32)this->direction;
Matrix_Translate(0.0f, 0.0f, zShift, MTXMODE_APPLY);
Matrix_RotateX((this->spinRot.x / (f32)0x8000) * M_PI, MTXMODE_APPLY);
Matrix_RotateY((this->spinRot.z / (f32)0x8000) * M_PI, MTXMODE_APPLY);
Matrix_Translate(this->offset.x, this->offset.y, this->offset.z - 100.0f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_kanban.c", 1715),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
for (i = 0; i < ARRAY_COUNT(sPartFlags); i++) {
if (sPartFlags[i] & this->partFlags) {
gSPDisplayList(POLY_OPA_DISP++, sDisplayLists[i]);
}
}
} else {
Matrix_Translate(0.0f, 0.0f, -100.0f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_kanban.c", 1725),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (this->partFlags == 0xFFFF) {
gSPDisplayList(POLY_OPA_DISP++, D_0403C050);
} else {
for (i = 0; i < ARRAY_COUNT(sPartFlags); i++) {
if (sPartFlags[i] & this->partFlags) {
gSPDisplayList(POLY_OPA_DISP++, sDisplayLists[i]);
}
}
}
if (this->cutMarkAlpha != 0) {
f32 cutOffset = (this->cutType == CUT_POST) ? -1200.0f : 0.0f;
Matrix_Translate(0.0f, 4400.0f + cutOffset, 200.0f, MTXMODE_APPLY);
Matrix_RotateZ(sCutAngles[this->cutType], MTXMODE_APPLY);
Matrix_Scale(0.0f, 10.0f, 2.0f, MTXMODE_APPLY);
gDPPipeSync(POLY_XLU_DISP++);
gDPSetPrimColor(POLY_XLU_DISP++, 0x00, 0x00, 255, 255, 255, this->cutMarkAlpha);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 150, 0);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_kanban.c", 1773),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, D_06001630);
}
}
if ((this->actor.projectedPos.z <= 400.0f) && (this->actor.projectedPos.z > 0.0f) &&
(this->actor.groundY > -3000.0f)) {
if ((this->bounceX != 0) || (this->bounceZ != 0)) {
u16 dayTime = gSaveContext.dayTime;
f32 shadowAlpha;
if (dayTime >= 0x8000) {
dayTime = 0xFFFF - dayTime;
}
shadowAlpha = (dayTime * 0.00275f) + 10.0f;
if (this->actor.projectedPos.z > 300.0f) {
shadowAlpha *= ((400.0f - this->actor.projectedPos.z) * 0.01f);
}
gDPSetPrimColor(POLY_XLU_DISP++, 0x00, 0x00, 0, 0, 0, (s8)shadowAlpha);
if ((this->actionState == ENKANBAN_SIGN) && (gSaveContext.linkAge == 1)) {
zShift = 0.0f;
} else {
zShift = ((this->actor.posRot.pos.y - this->actor.groundY) * -50.0f) / 100.0f;
}
Matrix_Translate(this->actor.posRot.pos.x, this->actor.groundY, this->actor.posRot.pos.z + zShift,
MTXMODE_NEW);
Matrix_RotateX(this->floorRot.x, MTXMODE_APPLY);
Matrix_RotateZ(this->floorRot.z, MTXMODE_APPLY);
Matrix_Scale(this->actor.scale.x, 0.0f, this->actor.scale.z, MTXMODE_APPLY);
if (this->actionState == ENKANBAN_SIGN) {
Matrix_RotateX(-M_PI / 5, MTXMODE_APPLY);
}
Matrix_RotateY((this->actor.shape.rot.y / (f32)0x8000) * M_PI, MTXMODE_APPLY);
Matrix_RotateX((this->actor.shape.rot.x / (f32)0x8000) * M_PI, MTXMODE_APPLY);
Matrix_RotateX((this->spinRot.x / (f32)0x8000) * M_PI, MTXMODE_APPLY);
Matrix_RotateY((this->spinRot.z / (f32)0x8000) * M_PI, MTXMODE_APPLY);
Matrix_Translate(this->offset.x, this->offset.y, this->offset.z, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_kanban.c", 1833),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
for (i = 0; i < 0x400; i++) {
if (sShadowTexFlags[i] & this->partFlags) {
shadowTex[i] = 0xFF;
} else {
shadowTex[i] = 0;
}
}
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(shadowTex));
gSPDisplayList(POLY_XLU_DISP++, sShadowDList);
}
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_kanban.c", 1857);
}

View file

@ -8,9 +8,39 @@ struct EnKanban;
typedef struct EnKanban {
/* 0x0000 */ Actor actor;
/* 0x014C */ char unk_14C[0xA0];
/* 0x014C */ char unk_14C[4];
/* 0x0150 */ u8 frameCount;
/* 0x0152 */ s16 airTimer;
/* 0x0154 */ u8 actionState;
/* 0x0156 */ u16 partFlags;
/* 0x0158 */ u8 partCount;
/* 0x015A */ s16 invincibilityTimer;
/* 0x015C */ Vec3f offset;
/* 0x0168 */ Vec3s spinRot;
/* 0x016E */ Vec3s spinVel;
/* 0x0174 */ s8 spinXFlag;
/* 0x0175 */ s8 spinZFlag;
/* 0x0176 */ s16 bounceX;
/* 0x0178 */ s16 bounceZ;
/* 0x017A */ u8 bounceCount;
/* 0x017C */ f32 pieceWidth;
/* 0x0180 */ f32 pieceHeight;
/* 0x0184 */ s16 direction;
/* 0x0188 */ Vec3f floorRot;
/* 0x0194 */ u8 cutType;
/* 0x0195 */ u8 pieceType;
/* 0x0196 */ s16 cutMarkTimer;
/* 0x0198 */ s16 cutMarkAlpha;
/* 0x019A */ s16 zTargetTimer;
/* 0x019C */ u8 msgFlag;
/* 0x019D */ u8 msgTimer;
/* 0x019E */ u8 ocarinaFlag;
/* 0x01A0 */ ColliderCylinder collider;
} EnKanban; // size = 0x01EC
#define ENKANBAN_PIECE ((s16)0xFFDD)
#define ENKANBAN_FISHING 0x300
extern const ActorInit En_Kanban_InitVars;
#endif

View file

@ -0,0 +1,68 @@
#include "z_en_kanban.h"
static u16 sShadowTexFlags[] = {
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x100,
0x100, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x100, 0x100,
0x100, 0x100, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x100, 0x100,
0x100, 0x100, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x100, 0x100,
0x100, 0x100, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x101, 0x101,
0x140, 0x140, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040,
0x002, 0x002, 0x002, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x101, 0x101,
0x140, 0x140, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x008, 0x008, 0x008,
0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x001, 0x101, 0x101,
0x140, 0x140, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x040, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008,
0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x001, 0x001, 0x001, 0x001, 0x001, 0x101, 0x101,
0x140, 0x140, 0x040, 0x040, 0x040, 0x040, 0x040, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008,
0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x001, 0x001, 0x101, 0x101,
0x140, 0x140, 0x040, 0x040, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008,
0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x002, 0x102, 0x301,
0x340, 0x108, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008, 0x008,
0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x204, 0x220,
0x280, 0x210, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010,
0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x020, 0x020, 0x220, 0x220,
0x280, 0x280, 0x080, 0x080, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010,
0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x020, 0x020, 0x020, 0x020, 0x020, 0x220, 0x220,
0x280, 0x280, 0x080, 0x080, 0x080, 0x080, 0x080, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010,
0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x220, 0x220,
0x280, 0x280, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x010, 0x010, 0x010, 0x010, 0x010, 0x010,
0x004, 0x004, 0x004, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x220, 0x220,
0x280, 0x280, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x010, 0x010, 0x010,
0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x020, 0x220, 0x620,
0x680, 0x280, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080, 0x080,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x400, 0x400,
0x400, 0x400, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
};