diff --git a/asm/non_matchings/code/z_camera/Camera_KeepOn4.s b/asm/non_matchings/code/z_camera/Camera_KeepOn4.s deleted file mode 100644 index 3acb4bcfa8..0000000000 --- a/asm/non_matchings/code/z_camera/Camera_KeepOn4.s +++ /dev/null @@ -1,1134 +0,0 @@ -.rdata -glabel D_8013930C - .asciz "\x1b[43;30mcamera: item: item type changed %d -> %d\n\x1b[m" - .balign 4 - -glabel D_80139344 - .asciz "camera: item: type %d\n" - .balign 4 - -glabel D_8013935C - .asciz "camera: item: BG&collision check %d time(s)\n" - .balign 4 - -.late_rodata -glabel D_8013A0DC - .float 0.01 - -glabel jtbl_8013A0E0 - .word L8004E734 - .word L8004E770 - .word L8004E770 - .word L8004E798 - .word L8004E874 - .word L8004EB20 - .word L8004EB20 - .word L8004E7C8 - .word L8004E81C - .word L8004E8B8 - .word L8004EAC8 - .word L8004E91C - -glabel D_8013A110 - .float -0.6 - -glabel D_8013A114 - .float -0.2 - -glabel D_8013A118 - .float -0.2 - -glabel D_8013A11C - .float 0.8 - -glabel D_8013A120 - .float 0.1 - -glabel D_8013A124 - .float -0.4 - -glabel D_8013A128 - .float -0.6 - -glabel D_8013A12C - .float 1.6 - -glabel D_8013A130 - .float -0.3 - -glabel D_8013A134 - .float -0.1 - -glabel D_8013A138 - .float -0.3 - -glabel D_8013A13C - .float -0.19 - -glabel D_8013A140 - .float 0.7 - -glabel D_8013A144 - .float 182.04167 - -glabel D_8013A148 - .float 182.04167 - -glabel D_8013A14C - .float 182.04167 - -glabel D_8013A150 - .float 182.04167 - -glabel D_8013A154 - .float 182.04167 - -glabel D_8013A158 - .float 182.04167 - -glabel D_8013A15C - .float 0.2 - -.text -glabel Camera_KeepOn4 -/* AC5600 8004E460 27BDFF20 */ addiu $sp, $sp, -0xe0 -/* AC5604 8004E464 AFBF0024 */ sw $ra, 0x24($sp) -/* AC5608 8004E468 AFB10020 */ sw $s1, 0x20($sp) -/* AC560C 8004E46C AFB0001C */ sw $s0, 0x1c($sp) -/* AC5610 8004E470 8C90008C */ lw $s0, 0x8c($a0) -/* AC5614 8004E474 00808825 */ move $s1, $a0 -/* AC5618 8004E478 2401000A */ li $at, 10 -/* AC561C 8004E47C 8E0E1C44 */ lw $t6, 0x1c44($s0) -/* AC5620 8004E480 AFAE0084 */ sw $t6, 0x84($sp) -/* AC5624 8004E484 8482015E */ lh $v0, 0x15e($a0) -/* AC5628 8004E488 50400006 */ beql $v0, $zero, .L8004E4A4 -/* AC562C 8004E48C 8E0F01DC */ lw $t7, 0x1dc($s0) -/* AC5630 8004E490 10410003 */ beq $v0, $at, .L8004E4A0 -/* AC5634 8004E494 24010014 */ li $at, 20 -/* AC5638 8004E498 54410015 */ bnel $v0, $at, .L8004E4F0 -/* AC563C 8004E49C 26220020 */ addiu $v0, $s1, 0x20 -.L8004E4A0: -/* AC5640 8004E4A0 8E0F01DC */ lw $t7, 0x1dc($s0) -.L8004E4A4: -/* AC5644 8004E4A4 55E0000D */ bnezl $t7, .L8004E4DC -/* AC5648 8004E4A8 862D014C */ lh $t5, 0x14c($s1) -/* AC564C 8004E4AC 8638014C */ lh $t8, 0x14c($s1) -/* AC5650 8004E4B0 862A0164 */ lh $t2, 0x164($s1) -/* AC5654 8004E4B4 24020001 */ li $v0, 1 -/* AC5658 8004E4B8 37190020 */ ori $t9, $t8, 0x20 -/* AC565C 8004E4BC A639014C */ sh $t9, 0x14c($s1) -/* AC5660 8004E4C0 8628014C */ lh $t0, 0x14c($s1) -/* AC5664 8004E4C4 354B0050 */ ori $t3, $t2, 0x50 -/* AC5668 8004E4C8 3109FFF9 */ andi $t1, $t0, 0xfff9 -/* AC566C 8004E4CC A629014C */ sh $t1, 0x14c($s1) -/* AC5670 8004E4D0 100003AF */ b .L8004F390 -/* AC5674 8004E4D4 AE0B01DC */ sw $t3, 0x1dc($s0) -/* AC5678 8004E4D8 862D014C */ lh $t5, 0x14c($s1) -.L8004E4DC: -/* AC567C 8004E4DC 862C012C */ lh $t4, 0x12c($s1) -/* AC5680 8004E4E0 31AEFFDF */ andi $t6, $t5, 0xffdf -/* AC5684 8004E4E4 A62E014C */ sh $t6, 0x14c($s1) -/* AC5688 8004E4E8 A62C0034 */ sh $t4, 0x34($s1) -/* AC568C 8004E4EC 26220020 */ addiu $v0, $s1, 0x20 -.L8004E4F0: -/* AC5690 8004E4F0 2630012C */ addiu $s0, $s1, 0x12c -/* AC5694 8004E4F4 86060000 */ lh $a2, ($s0) -/* AC5698 8004E4F8 84450014 */ lh $a1, 0x14($v0) -/* AC569C 8004E4FC 10A60011 */ beq $a1, $a2, .L8004E544 -/* AC56A0 8004E500 3C048014 */ lui $a0, %hi(D_8013930C) # $a0, 0x8014 -/* AC56A4 8004E504 0C00084C */ jal osSyncPrintf -/* AC56A8 8004E508 2484930C */ addiu $a0, %lo(D_8013930C) # addiu $a0, $a0, -0x6cf4 -/* AC56AC 8004E50C 8638014C */ lh $t8, 0x14c($s1) -/* AC56B0 8004E510 862A0164 */ lh $t2, 0x164($s1) -/* AC56B4 8004E514 8E2C008C */ lw $t4, 0x8c($s1) -/* AC56B8 8004E518 37190020 */ ori $t9, $t8, 0x20 -/* AC56BC 8004E51C A639014C */ sh $t9, 0x14c($s1) -/* AC56C0 8004E520 8628014C */ lh $t0, 0x14c($s1) -/* AC56C4 8004E524 240F0014 */ li $t7, 20 -/* AC56C8 8004E528 A62F015E */ sh $t7, 0x15e($s1) -/* AC56CC 8004E52C 3109FFF9 */ andi $t1, $t0, 0xfff9 -/* AC56D0 8004E530 A629014C */ sh $t1, 0x14c($s1) -/* AC56D4 8004E534 354B0050 */ ori $t3, $t2, 0x50 -/* AC56D8 8004E538 24020001 */ li $v0, 1 -/* AC56DC 8004E53C 10000394 */ b .L8004F390 -/* AC56E0 8004E540 AD8B01DC */ sw $t3, 0x1dc($t4) -.L8004E544: -/* AC56E4 8004E544 8E240090 */ lw $a0, 0x90($s1) -/* AC56E8 8004E548 0C00B721 */ jal Player_GetHeight -/* AC56EC 8004E54C AFA20034 */ sw $v0, 0x34($sp) -/* AC56F0 8004E550 862D014C */ lh $t5, 0x14c($s1) -/* AC56F4 8004E554 8622015E */ lh $v0, 0x15e($s1) -/* AC56F8 8004E558 46000386 */ mov.s $f14, $f0 -/* AC56FC 8004E55C 31AEFFEF */ andi $t6, $t5, 0xffef -/* AC5700 8004E560 10400009 */ beqz $v0, .L8004E588 -/* AC5704 8004E564 A62E014C */ sh $t6, 0x14c($s1) -/* AC5708 8004E568 2401000A */ li $at, 10 -/* AC570C 8004E56C 10410006 */ beq $v0, $at, .L8004E588 -/* AC5710 8004E570 24010014 */ li $at, 20 -/* AC5714 8004E574 10410004 */ beq $v0, $at, .L8004E588 -/* AC5718 8004E578 3C0F8016 */ lui $t7, %hi(gGameInfo) # $t7, 0x8016 -/* AC571C 8004E57C 8DEFFA90 */ lw $t7, %lo(gGameInfo)($t7) -/* AC5720 8004E580 85E20314 */ lh $v0, 0x314($t7) -/* AC5724 8004E584 10400169 */ beqz $v0, .L8004EB2C -.L8004E588: -/* AC5728 8004E588 3C018014 */ lui $at, %hi(D_8013A0DC) -/* AC572C 8004E58C C430A0DC */ lwc1 $f16, %lo(D_8013A0DC)($at) -/* AC5730 8004E590 3C01BF00 */ li $at, 0xBF000000 # 0.000000 -/* AC5734 8004E594 44819000 */ mtc1 $at, $f18 -/* AC5738 8004E598 3C013F80 */ li $at, 0x3F800000 # 0.000000 -/* AC573C 8004E59C 44812000 */ mtc1 $at, $f4 -/* AC5740 8004E5A0 3C014288 */ li $at, 0x42880000 # 0.000000 -/* AC5744 8004E5A4 44814000 */ mtc1 $at, $f8 -/* AC5748 8004E5A8 86380142 */ lh $t8, 0x142($s1) -/* AC574C 8004E5AC 3C088012 */ lui $t0, %hi(sCameraSettings+4) -/* AC5750 8004E5B0 46004283 */ div.s $f10, $f8, $f0 -/* AC5754 8004E5B4 0018C8C0 */ sll $t9, $t8, 3 -/* AC5758 8004E5B8 86290144 */ lh $t1, 0x144($s1) -/* AC575C 8004E5BC 01194021 */ addu $t0, $t0, $t9 -/* AC5760 8004E5C0 8D08D068 */ lw $t0, %lo(sCameraSettings+4)($t0) -/* AC5764 8004E5C4 000950C0 */ sll $t2, $t1, 3 -/* AC5768 8004E5C8 46122180 */ add.s $f6, $f4, $f18 -/* AC576C 8004E5CC 010A5821 */ addu $t3, $t0, $t2 -/* AC5770 8004E5D0 8D620004 */ lw $v0, 4($t3) -/* AC5774 8004E5D4 3C048014 */ lui $a0, %hi(D_80139344) # $a0, 0x8014 -/* AC5778 8004E5D8 24849344 */ addiu $a0, %lo(D_80139344) # addiu $a0, $a0, -0x6cbc -/* AC577C 8004E5DC 844C0000 */ lh $t4, ($v0) -/* AC5780 8004E5E0 24420020 */ addiu $v0, $v0, 0x20 -/* AC5784 8004E5E4 448C4000 */ mtc1 $t4, $f8 -/* AC5788 8004E5E8 46125102 */ mul.s $f4, $f10, $f18 -/* AC578C 8004E5EC 468042A0 */ cvt.s.w $f10, $f8 -/* AC5790 8004E5F0 46043301 */ sub.s $f12, $f6, $f4 -/* AC5794 8004E5F4 46105182 */ mul.s $f6, $f10, $f16 -/* AC5798 8004E5F8 00000000 */ nop -/* AC579C 8004E5FC 46003102 */ mul.s $f4, $f6, $f0 -/* AC57A0 8004E600 00000000 */ nop -/* AC57A4 8004E604 460C2202 */ mul.s $f8, $f4, $f12 -/* AC57A8 8004E608 E6280000 */ swc1 $f8, ($s1) -/* AC57AC 8004E60C 844DFFE4 */ lh $t5, -0x1c($v0) -/* AC57B0 8004E610 448D5000 */ mtc1 $t5, $f10 -/* AC57B4 8004E614 00000000 */ nop -/* AC57B8 8004E618 468051A0 */ cvt.s.w $f6, $f10 -/* AC57BC 8004E61C 46103102 */ mul.s $f4, $f6, $f16 -/* AC57C0 8004E620 00000000 */ nop -/* AC57C4 8004E624 46002202 */ mul.s $f8, $f4, $f0 -/* AC57C8 8004E628 00000000 */ nop -/* AC57CC 8004E62C 460C4282 */ mul.s $f10, $f8, $f12 -/* AC57D0 8004E630 E62A0004 */ swc1 $f10, 4($s1) -/* AC57D4 8004E634 844EFFE8 */ lh $t6, -0x18($v0) -/* AC57D8 8004E638 448E3000 */ mtc1 $t6, $f6 -/* AC57DC 8004E63C 00000000 */ nop -/* AC57E0 8004E640 46803120 */ cvt.s.w $f4, $f6 -/* AC57E4 8004E644 E6240008 */ swc1 $f4, 8($s1) -/* AC57E8 8004E648 844FFFEC */ lh $t7, -0x14($v0) -/* AC57EC 8004E64C 448F4000 */ mtc1 $t7, $f8 -/* AC57F0 8004E650 00000000 */ nop -/* AC57F4 8004E654 468042A0 */ cvt.s.w $f10, $f8 -/* AC57F8 8004E658 E62A000C */ swc1 $f10, 0xc($s1) -/* AC57FC 8004E65C 8458FFF0 */ lh $t8, -0x10($v0) -/* AC5800 8004E660 44983000 */ mtc1 $t8, $f6 -/* AC5804 8004E664 00000000 */ nop -/* AC5808 8004E668 46803120 */ cvt.s.w $f4, $f6 -/* AC580C 8004E66C E6240010 */ swc1 $f4, 0x10($s1) -/* AC5810 8004E670 8459FFF4 */ lh $t9, -0xc($v0) -/* AC5814 8004E674 44994000 */ mtc1 $t9, $f8 -/* AC5818 8004E678 00000000 */ nop -/* AC581C 8004E67C 468042A0 */ cvt.s.w $f10, $f8 -/* AC5820 8004E680 E62A0018 */ swc1 $f10, 0x18($s1) -/* AC5824 8004E684 8449FFF8 */ lh $t1, -8($v0) -/* AC5828 8004E688 A629001C */ sh $t1, 0x1c($s1) -/* AC582C 8004E68C 8448FFFC */ lh $t0, -4($v0) -/* AC5830 8004E690 44883000 */ mtc1 $t0, $f6 -/* AC5834 8004E694 00000000 */ nop -/* AC5838 8004E698 46803120 */ cvt.s.w $f4, $f6 -/* AC583C 8004E69C 46102202 */ mul.s $f8, $f4, $f16 -/* AC5840 8004E6A0 E6280014 */ swc1 $f8, 0x14($s1) -/* AC5844 8004E6A4 844A0000 */ lh $t2, ($v0) -/* AC5848 8004E6A8 A62A001E */ sh $t2, 0x1e($s1) -/* AC584C 8004E6AC 86050000 */ lh $a1, ($s0) -/* AC5850 8004E6B0 E7AE0088 */ swc1 $f14, 0x88($sp) -/* AC5854 8004E6B4 0C00084C */ jal osSyncPrintf -/* AC5858 8004E6B8 E7AC0074 */ swc1 $f12, 0x74($sp) -/* AC585C 8004E6BC 86020000 */ lh $v0, ($s0) -/* AC5860 8004E6C0 3C01BF00 */ li $at, 0xBF000000 # 0.000000 -/* AC5864 8004E6C4 44819000 */ mtc1 $at, $f18 -/* AC5868 8004E6C8 28410052 */ slti $at, $v0, 0x52 -/* AC586C 8004E6CC C7AC0074 */ lwc1 $f12, 0x74($sp) -/* AC5870 8004E6D0 14200008 */ bnez $at, .L8004E6F4 -/* AC5874 8004E6D4 C7AE0088 */ lwc1 $f14, 0x88($sp) -/* AC5878 8004E6D8 2401005A */ li $at, 90 -/* AC587C 8004E6DC 104100B6 */ beq $v0, $at, .L8004E9B8 -/* AC5880 8004E6E0 2401005B */ li $at, 91 -/* AC5884 8004E6E4 104100C2 */ beq $v0, $at, .L8004E9F0 -/* AC5888 8004E6E8 00000000 */ nop -/* AC588C 8004E6EC 1000010C */ b .L8004EB20 -/* AC5890 8004E6F0 00000000 */ nop -.L8004E6F4: -/* AC5894 8004E6F4 2841000D */ slti $at, $v0, 0xd -/* AC5898 8004E6F8 14200006 */ bnez $at, .L8004E714 -/* AC589C 8004E6FC 244BFFFF */ addiu $t3, $v0, -1 -/* AC58A0 8004E700 24010051 */ li $at, 81 -/* AC58A4 8004E704 504100D5 */ beql $v0, $at, .L8004EA5C -/* AC58A8 8004E708 3C0141A0 */ lui $at, 0x41a0 -/* AC58AC 8004E70C 10000104 */ b .L8004EB20 -/* AC58B0 8004E710 00000000 */ nop -.L8004E714: -/* AC58B4 8004E714 2D61000C */ sltiu $at, $t3, 0xc -/* AC58B8 8004E718 10200101 */ beqz $at, .L8004EB20 -/* AC58BC 8004E71C 000B5880 */ sll $t3, $t3, 2 -/* AC58C0 8004E720 3C018014 */ lui $at, %hi(jtbl_8013A0E0) -/* AC58C4 8004E724 002B0821 */ addu $at, $at, $t3 -/* AC58C8 8004E728 8C2BA0E0 */ lw $t3, %lo(jtbl_8013A0E0)($at) -/* AC58CC 8004E72C 01600008 */ jr $t3 -/* AC58D0 8004E730 00000000 */ nop - -glabel L8004E734 -/* AC58D4 8004E734 3C018014 */ lui $at, %hi(D_8013A110) -/* AC58D8 8004E738 C42AA110 */ lwc1 $f10, %lo(D_8013A110)($at) -/* AC58DC 8004E73C 460E7200 */ add.s $f8, $f14, $f14 -/* AC58E0 8004E740 3C014120 */ lui $at, 0x4120 -/* AC58E4 8004E744 460A7182 */ mul.s $f6, $f14, $f10 -/* AC58E8 8004E748 3C0C8016 */ lui $t4, %hi(gGameInfo) -/* AC58EC 8004E74C 460C3102 */ mul.s $f4, $f6, $f12 -/* AC58F0 8004E750 44813000 */ mtc1 $at, $f6 -/* AC58F4 8004E754 460C4282 */ mul.s $f10, $f8, $f12 -/* AC58F8 8004E758 E6260008 */ swc1 $f6, 8($s1) -/* AC58FC 8004E75C E6240000 */ swc1 $f4, ($s1) -/* AC5900 8004E760 E62A0004 */ swc1 $f10, 4($s1) -/* AC5904 8004E764 8D8CFA90 */ lw $t4, %lo(gGameInfo)($t4) -/* AC5908 8004E768 100000F0 */ b .L8004EB2C -/* AC590C 8004E76C 85820314 */ lh $v0, 0x314($t4) - -glabel L8004E770 -/* AC5910 8004E770 3C01C1A0 */ li $at, 0xC1A00000 # 0.000000 -/* AC5914 8004E774 44812000 */ mtc1 $at, $f4 -/* AC5918 8004E778 3C0142A0 */ li $at, 0x42A00000 # 0.000000 -/* AC591C 8004E77C 44814000 */ mtc1 $at, $f8 -/* AC5920 8004E780 3C0D8016 */ lui $t5, %hi(gGameInfo) # $t5, 0x8016 -/* AC5924 8004E784 E6240008 */ swc1 $f4, 8($s1) -/* AC5928 8004E788 E6280018 */ swc1 $f8, 0x18($s1) -/* AC592C 8004E78C 8DADFA90 */ lw $t5, %lo(gGameInfo)($t5) -/* AC5930 8004E790 100000E6 */ b .L8004EB2C -/* AC5934 8004E794 85A20314 */ lh $v0, 0x314($t5) - -glabel L8004E798 -/* AC5938 8004E798 3C018014 */ lui $at, %hi(D_8013A114) -/* AC593C 8004E79C C42AA114 */ lwc1 $f10, %lo(D_8013A114)($at) -/* AC5940 8004E7A0 3C0141C8 */ li $at, 0x41C80000 # 0.000000 -/* AC5944 8004E7A4 44814000 */ mtc1 $at, $f8 -/* AC5948 8004E7A8 460A7182 */ mul.s $f6, $f14, $f10 -/* AC594C 8004E7AC 3C0E8016 */ lui $t6, %hi(gGameInfo) # $t6, 0x8016 -/* AC5950 8004E7B0 E6280008 */ swc1 $f8, 8($s1) -/* AC5954 8004E7B4 460C3102 */ mul.s $f4, $f6, $f12 -/* AC5958 8004E7B8 E6240000 */ swc1 $f4, ($s1) -/* AC595C 8004E7BC 8DCEFA90 */ lw $t6, %lo(gGameInfo)($t6) -/* AC5960 8004E7C0 100000DA */ b .L8004EB2C -/* AC5964 8004E7C4 85C20314 */ lh $v0, 0x314($t6) - -glabel L8004E7C8 -/* AC5968 8004E7C8 3C018014 */ lui $at, %hi(D_8013A118) -/* AC596C 8004E7CC C42AA118 */ lwc1 $f10, %lo(D_8013A118)($at) -/* AC5970 8004E7D0 3C018014 */ lui $at, %hi(D_8013A11C) -/* AC5974 8004E7D4 3C0F8016 */ lui $t7, %hi(gGameInfo) # $t7, 0x8016 -/* AC5978 8004E7D8 460A7182 */ mul.s $f6, $f14, $f10 -/* AC597C 8004E7DC 00000000 */ nop -/* AC5980 8004E7E0 460C3102 */ mul.s $f4, $f6, $f12 -/* AC5984 8004E7E4 E6240000 */ swc1 $f4, ($s1) -/* AC5988 8004E7E8 C428A11C */ lwc1 $f8, %lo(D_8013A11C)($at) -/* AC598C 8004E7EC 3C014248 */ li $at, 0x42480000 # 0.000000 -/* AC5990 8004E7F0 44812000 */ mtc1 $at, $f4 -/* AC5994 8004E7F4 46087282 */ mul.s $f10, $f14, $f8 -/* AC5998 8004E7F8 3C01428C */ li $at, 0x428C0000 # 0.000000 -/* AC599C 8004E7FC 44814000 */ mtc1 $at, $f8 -/* AC59A0 8004E800 E6240008 */ swc1 $f4, 8($s1) -/* AC59A4 8004E804 E6280018 */ swc1 $f8, 0x18($s1) -/* AC59A8 8004E808 460C5182 */ mul.s $f6, $f10, $f12 -/* AC59AC 8004E80C E6260004 */ swc1 $f6, 4($s1) -/* AC59B0 8004E810 8DEFFA90 */ lw $t7, %lo(gGameInfo)($t7) -/* AC59B4 8004E814 100000C5 */ b .L8004EB2C -/* AC59B8 8004E818 85E20314 */ lh $v0, 0x314($t7) - -glabel L8004E81C -/* AC59BC 8004E81C 3C018014 */ lui $at, %hi(D_8013A120) -/* AC59C0 8004E820 C42AA120 */ lwc1 $f10, %lo(D_8013A120)($at) -/* AC59C4 8004E824 3C013F00 */ li $at, 0x3F000000 # 0.000000 -/* AC59C8 8004E828 44814000 */ mtc1 $at, $f8 -/* AC59CC 8004E82C 460A7182 */ mul.s $f6, $f14, $f10 -/* AC59D0 8004E830 3C01C1A0 */ li $at, 0xC1A00000 # 0.000000 -/* AC59D4 8004E834 24182540 */ li $t8, 9536 -/* AC59D8 8004E838 A638001C */ sh $t8, 0x1c($s1) -/* AC59DC 8004E83C 3C198016 */ lui $t9, %hi(gGameInfo) -/* AC59E0 8004E840 460C3102 */ mul.s $f4, $f6, $f12 -/* AC59E4 8004E844 00000000 */ nop -/* AC59E8 8004E848 46087282 */ mul.s $f10, $f14, $f8 -/* AC59EC 8004E84C 44804000 */ mtc1 $zero, $f8 -/* AC59F0 8004E850 E6240000 */ swc1 $f4, ($s1) -/* AC59F4 8004E854 44812000 */ mtc1 $at, $f4 -/* AC59F8 8004E858 E628000C */ swc1 $f8, 0xc($s1) -/* AC59FC 8004E85C 460C5182 */ mul.s $f6, $f10, $f12 -/* AC5A00 8004E860 E6240008 */ swc1 $f4, 8($s1) -/* AC5A04 8004E864 E6260004 */ swc1 $f6, 4($s1) -/* AC5A08 8004E868 8F39FA90 */ lw $t9, %lo(gGameInfo)($t9) -/* AC5A0C 8004E86C 100000AF */ b .L8004EB2C -/* AC5A10 8004E870 87220314 */ lh $v0, 0x314($t9) - -glabel L8004E874 -/* AC5A14 8004E874 3C018014 */ lui $at, %hi(D_8013A124) -/* AC5A18 8004E878 C42AA124 */ lwc1 $f10, %lo(D_8013A124)($at) -/* AC5A1C 8004E87C 3C01C120 */ li $at, 0xC1200000 # 0.000000 -/* AC5A20 8004E880 44814000 */ mtc1 $at, $f8 -/* AC5A24 8004E884 460A7182 */ mul.s $f6, $f14, $f10 -/* AC5A28 8004E888 3C014234 */ li $at, 0x42340000 # 0.000000 -/* AC5A2C 8004E88C 44815000 */ mtc1 $at, $f10 -/* AC5A30 8004E890 24092002 */ li $t1, 8194 -/* AC5A34 8004E894 A629001C */ sh $t1, 0x1c($s1) -/* AC5A38 8004E898 3C088016 */ lui $t0, %hi(gGameInfo) # $t0, 0x8016 -/* AC5A3C 8004E89C E6280008 */ swc1 $f8, 8($s1) -/* AC5A40 8004E8A0 460C3102 */ mul.s $f4, $f6, $f12 -/* AC5A44 8004E8A4 E62A000C */ swc1 $f10, 0xc($s1) -/* AC5A48 8004E8A8 E6240000 */ swc1 $f4, ($s1) -/* AC5A4C 8004E8AC 8D08FA90 */ lw $t0, %lo(gGameInfo)($t0) -/* AC5A50 8004E8B0 1000009E */ b .L8004EB2C -/* AC5A54 8004E8B4 85020314 */ lh $v0, 0x314($t0) - -glabel L8004E8B8 -/* AC5A58 8004E8B8 46127182 */ mul.s $f6, $f14, $f18 -/* AC5A5C 8004E8BC 3C013FC0 */ li $at, 0x3FC00000 # 0.000000 -/* AC5A60 8004E8C0 44814000 */ mtc1 $at, $f8 -/* AC5A64 8004E8C4 3C01C170 */ lui $at, 0xc170 -/* AC5A68 8004E8C8 240A2202 */ li $t2, 8706 -/* AC5A6C 8004E8CC 240B003C */ li $t3, 60 -/* AC5A70 8004E8D0 A62A001C */ sh $t2, 0x1c($s1) -/* AC5A74 8004E8D4 460C3102 */ mul.s $f4, $f6, $f12 -/* AC5A78 8004E8D8 A62B001E */ sh $t3, 0x1e($s1) -/* AC5A7C 8004E8DC 3C0C8016 */ lui $t4, %hi(gGameInfo) -/* AC5A80 8004E8E0 46087282 */ mul.s $f10, $f14, $f8 -/* AC5A84 8004E8E4 E6240000 */ swc1 $f4, ($s1) -/* AC5A88 8004E8E8 44812000 */ mtc1 $at, $f4 -/* AC5A8C 8004E8EC 3C01432F */ li $at, 0x432F0000 # 0.000000 -/* AC5A90 8004E8F0 460C5182 */ mul.s $f6, $f10, $f12 -/* AC5A94 8004E8F4 44814000 */ mtc1 $at, $f8 -/* AC5A98 8004E8F8 3C01428C */ li $at, 0x428C0000 # 0.000000 -/* AC5A9C 8004E8FC 44815000 */ mtc1 $at, $f10 -/* AC5AA0 8004E900 E6240008 */ swc1 $f4, 8($s1) -/* AC5AA4 8004E904 E628000C */ swc1 $f8, 0xc($s1) -/* AC5AA8 8004E908 E62A0018 */ swc1 $f10, 0x18($s1) -/* AC5AAC 8004E90C E6260004 */ swc1 $f6, 4($s1) -/* AC5AB0 8004E910 8D8CFA90 */ lw $t4, %lo(gGameInfo)($t4) -/* AC5AB4 8004E914 10000085 */ b .L8004EB2C -/* AC5AB8 8004E918 85820314 */ lh $v0, 0x314($t4) - -glabel L8004E91C -/* AC5ABC 8004E91C 3C018014 */ lui $at, %hi(D_8013A128) -/* AC5AC0 8004E920 C426A128 */ lwc1 $f6, %lo(D_8013A128)($at) -/* AC5AC4 8004E924 3C018014 */ lui $at, %hi(D_8013A12C) -/* AC5AC8 8004E928 24183212 */ li $t8, 12818 -/* AC5ACC 8004E92C 46067102 */ mul.s $f4, $f14, $f6 -/* AC5AD0 8004E930 2419001E */ li $t9, 30 -/* AC5AD4 8004E934 3C098016 */ lui $t1, %hi(gGameInfo) -/* AC5AD8 8004E938 460C2202 */ mul.s $f8, $f4, $f12 -/* AC5ADC 8004E93C E6280000 */ swc1 $f8, ($s1) -/* AC5AE0 8004E940 C42AA12C */ lwc1 $f10, %lo(D_8013A12C)($at) -/* AC5AE4 8004E944 3C01C000 */ li $at, 0xC0000000 # 0.000000 -/* AC5AE8 8004E948 44814000 */ mtc1 $at, $f8 -/* AC5AEC 8004E94C 460A7182 */ mul.s $f6, $f14, $f10 -/* AC5AF0 8004E950 3C0142F0 */ li $at, 0x42F00000 # 0.000000 -/* AC5AF4 8004E954 44815000 */ mtc1 $at, $f10 -/* AC5AF8 8004E958 E6280008 */ swc1 $f8, 8($s1) -/* AC5AFC 8004E95C 3C0141A0 */ li $at, 0x41A00000 # 0.000000 -/* AC5B00 8004E960 E62A000C */ swc1 $f10, 0xc($s1) -/* AC5B04 8004E964 460C3102 */ mul.s $f4, $f6, $f12 -/* AC5B08 8004E968 E6240004 */ swc1 $f4, 4($s1) -/* AC5B0C 8004E96C 8FAD0084 */ lw $t5, 0x84($sp) -/* AC5B10 8004E970 8DAE067C */ lw $t6, 0x67c($t5) -/* AC5B14 8004E974 000E7900 */ sll $t7, $t6, 4 -/* AC5B18 8004E978 05E30005 */ bgezl $t7, .L8004E990 -/* AC5B1C 8004E97C 44810000 */ mtc1 $at, $f0 -/* AC5B20 8004E980 44803000 */ mtc1 $zero, $f6 -/* AC5B24 8004E984 10000004 */ b .L8004E998 -/* AC5B28 8004E988 E6260010 */ swc1 $f6, 0x10($s1) -/* AC5B2C 8004E98C 44810000 */ mtc1 $at, $f0 -.L8004E990: -/* AC5B30 8004E990 00000000 */ nop -/* AC5B34 8004E994 E6200010 */ swc1 $f0, 0x10($s1) -.L8004E998: -/* AC5B38 8004E998 3C014248 */ li $at, 0x42480000 # 0.000000 -/* AC5B3C 8004E99C 44812000 */ mtc1 $at, $f4 -/* AC5B40 8004E9A0 A638001C */ sh $t8, 0x1c($s1) -/* AC5B44 8004E9A4 A639001E */ sh $t9, 0x1e($s1) -/* AC5B48 8004E9A8 E6240018 */ swc1 $f4, 0x18($s1) -/* AC5B4C 8004E9AC 8D29FA90 */ lw $t1, %lo(gGameInfo)($t1) -/* AC5B50 8004E9B0 1000005E */ b .L8004EB2C -/* AC5B54 8004E9B4 85220314 */ lh $v0, 0x314($t1) -.L8004E9B8: -/* AC5B58 8004E9B8 3C018014 */ lui $at, %hi(D_8013A130) -/* AC5B5C 8004E9BC C428A130 */ lwc1 $f8, %lo(D_8013A130)($at) -/* AC5B60 8004E9C0 3C014234 */ li $at, 0x42340000 # 0.000000 -/* AC5B64 8004E9C4 44812000 */ mtc1 $at, $f4 -/* AC5B68 8004E9C8 46087282 */ mul.s $f10, $f14, $f8 -/* AC5B6C 8004E9CC 24082F02 */ li $t0, 12034 -/* AC5B70 8004E9D0 A628001C */ sh $t0, 0x1c($s1) -/* AC5B74 8004E9D4 3C0A8016 */ lui $t2, %hi(gGameInfo) # $t2, 0x8016 -/* AC5B78 8004E9D8 E6240018 */ swc1 $f4, 0x18($s1) -/* AC5B7C 8004E9DC 460C5182 */ mul.s $f6, $f10, $f12 -/* AC5B80 8004E9E0 E6260000 */ swc1 $f6, ($s1) -/* AC5B84 8004E9E4 8D4AFA90 */ lw $t2, %lo(gGameInfo)($t2) -/* AC5B88 8004E9E8 10000050 */ b .L8004EB2C -/* AC5B8C 8004E9EC 85420314 */ lh $v0, 0x314($t2) -.L8004E9F0: -/* AC5B90 8004E9F0 3C018014 */ lui $at, %hi(D_8013A134) -/* AC5B94 8004E9F4 C428A134 */ lwc1 $f8, %lo(D_8013A134)($at) -/* AC5B98 8004E9F8 3C013FC0 */ li $at, 0x3FC00000 # 0.000000 -/* AC5B9C 8004E9FC 44812000 */ mtc1 $at, $f4 -/* AC5BA0 8004EA00 46087282 */ mul.s $f10, $f14, $f8 -/* AC5BA4 8004EA04 3C01C040 */ lui $at, 0xc040 -/* AC5BA8 8004EA08 240B2F08 */ li $t3, 12040 -/* AC5BAC 8004EA0C A62B001C */ sh $t3, 0x1c($s1) -/* AC5BB0 8004EA10 3C0C8016 */ lui $t4, %hi(gGameInfo) -/* AC5BB4 8004EA14 460C5182 */ mul.s $f6, $f10, $f12 -/* AC5BB8 8004EA18 00000000 */ nop -/* AC5BBC 8004EA1C 46047202 */ mul.s $f8, $f14, $f4 -/* AC5BC0 8004EA20 E6260000 */ swc1 $f6, ($s1) -/* AC5BC4 8004EA24 44813000 */ mtc1 $at, $f6 -/* AC5BC8 8004EA28 3C014120 */ li $at, 0x41200000 # 0.000000 -/* AC5BCC 8004EA2C 460C4282 */ mul.s $f10, $f8, $f12 -/* AC5BD0 8004EA30 44812000 */ mtc1 $at, $f4 -/* AC5BD4 8004EA34 3C01425C */ li $at, 0x425C0000 # 0.000000 -/* AC5BD8 8004EA38 44814000 */ mtc1 $at, $f8 -/* AC5BDC 8004EA3C E6260008 */ swc1 $f6, 8($s1) -/* AC5BE0 8004EA40 E624000C */ swc1 $f4, 0xc($s1) -/* AC5BE4 8004EA44 E6280018 */ swc1 $f8, 0x18($s1) -/* AC5BE8 8004EA48 E62A0004 */ swc1 $f10, 4($s1) -/* AC5BEC 8004EA4C 8D8CFA90 */ lw $t4, %lo(gGameInfo)($t4) -/* AC5BF0 8004EA50 10000036 */ b .L8004EB2C -/* AC5BF4 8004EA54 85820314 */ lh $v0, 0x314($t4) -/* AC5BF8 8004EA58 3C0141A0 */ li $at, 0x41A00000 # 0.000000 -.L8004EA5C: -/* AC5BFC 8004EA5C 44810000 */ mtc1 $at, $f0 -/* AC5C00 8004EA60 3C018014 */ lui $at, %hi(D_8013A138) -/* AC5C04 8004EA64 C42AA138 */ lwc1 $f10, %lo(D_8013A138)($at) -/* AC5C08 8004EA68 3C013FC0 */ li $at, 0x3FC00000 # 0.000000 -/* AC5C0C 8004EA6C 44814000 */ mtc1 $at, $f8 -/* AC5C10 8004EA70 460A7182 */ mul.s $f6, $f14, $f10 -/* AC5C14 8004EA74 3C014000 */ lui $at, 0x4000 -/* AC5C18 8004EA78 240D2280 */ li $t5, 8832 -/* AC5C1C 8004EA7C 240E001E */ li $t6, 30 -/* AC5C20 8004EA80 A62D001C */ sh $t5, 0x1c($s1) -/* AC5C24 8004EA84 A62E001E */ sh $t6, 0x1e($s1) -/* AC5C28 8004EA88 3C0F8016 */ lui $t7, %hi(gGameInfo) -/* AC5C2C 8004EA8C 460C3102 */ mul.s $f4, $f6, $f12 -/* AC5C30 8004EA90 E620000C */ swc1 $f0, 0xc($s1) -/* AC5C34 8004EA94 E6200010 */ swc1 $f0, 0x10($s1) -/* AC5C38 8004EA98 46087282 */ mul.s $f10, $f14, $f8 -/* AC5C3C 8004EA9C E6240000 */ swc1 $f4, ($s1) -/* AC5C40 8004EAA0 44812000 */ mtc1 $at, $f4 -/* AC5C44 8004EAA4 3C014234 */ li $at, 0x42340000 # 0.000000 -/* AC5C48 8004EAA8 460C5182 */ mul.s $f6, $f10, $f12 -/* AC5C4C 8004EAAC 44814000 */ mtc1 $at, $f8 -/* AC5C50 8004EAB0 E6240008 */ swc1 $f4, 8($s1) -/* AC5C54 8004EAB4 E6280018 */ swc1 $f8, 0x18($s1) -/* AC5C58 8004EAB8 E6260004 */ swc1 $f6, 4($s1) -/* AC5C5C 8004EABC 8DEFFA90 */ lw $t7, %lo(gGameInfo)($t7) -/* AC5C60 8004EAC0 1000001A */ b .L8004EB2C -/* AC5C64 8004EAC4 85E20314 */ lh $v0, 0x314($t7) - -glabel L8004EAC8 -/* AC5C68 8004EAC8 3C018014 */ lui $at, %hi(D_8013A13C) -/* AC5C6C 8004EACC C42AA13C */ lwc1 $f10, %lo(D_8013A13C)($at) -/* AC5C70 8004EAD0 3C018014 */ lui $at, %hi(D_8013A140) -/* AC5C74 8004EAD4 24182522 */ li $t8, 9506 -/* AC5C78 8004EAD8 460A7182 */ mul.s $f6, $f14, $f10 -/* AC5C7C 8004EADC 3C198016 */ lui $t9, %hi(gGameInfo) # $t9, 0x8016 -/* AC5C80 8004EAE0 460C3102 */ mul.s $f4, $f6, $f12 -/* AC5C84 8004EAE4 E6240000 */ swc1 $f4, ($s1) -/* AC5C88 8004EAE8 C428A140 */ lwc1 $f8, %lo(D_8013A140)($at) -/* AC5C8C 8004EAEC 3C014302 */ li $at, 0x43020000 # 0.000000 -/* AC5C90 8004EAF0 44812000 */ mtc1 $at, $f4 -/* AC5C94 8004EAF4 46087282 */ mul.s $f10, $f14, $f8 -/* AC5C98 8004EAF8 3C014120 */ li $at, 0x41200000 # 0.000000 -/* AC5C9C 8004EAFC 44814000 */ mtc1 $at, $f8 -/* AC5CA0 8004EB00 A638001C */ sh $t8, 0x1c($s1) -/* AC5CA4 8004EB04 E624000C */ swc1 $f4, 0xc($s1) -/* AC5CA8 8004EB08 E6280010 */ swc1 $f8, 0x10($s1) -/* AC5CAC 8004EB0C 460C5182 */ mul.s $f6, $f10, $f12 -/* AC5CB0 8004EB10 E6260004 */ swc1 $f6, 4($s1) -/* AC5CB4 8004EB14 8F39FA90 */ lw $t9, %lo(gGameInfo)($t9) -/* AC5CB8 8004EB18 10000004 */ b .L8004EB2C -/* AC5CBC 8004EB1C 87220314 */ lh $v0, 0x314($t9) - -.L8004EB20: -glabel L8004EB20 -/* AC5CC0 8004EB20 3C098016 */ lui $t1, %hi(gGameInfo) # $t1, 0x8016 -/* AC5CC4 8004EB24 8D29FA90 */ lw $t1, %lo(gGameInfo)($t1) -/* AC5CC8 8004EB28 85220314 */ lh $v0, 0x314($t1) -.L8004EB2C: -/* AC5CCC 8004EB2C 10400004 */ beqz $v0, .L8004EB40 -/* AC5CD0 8004EB30 02202025 */ move $a0, $s1 -/* AC5CD4 8004EB34 0C011495 */ jal Camera_CopyPREGToModeValues -/* AC5CD8 8004EB38 E7AE0088 */ swc1 $f14, 0x88($sp) -/* AC5CDC 8004EB3C C7AE0088 */ lwc1 $f14, 0x88($sp) -.L8004EB40: -/* AC5CE0 8004EB40 24080001 */ li $t0, 1 -/* AC5CE4 8004EB44 3C018012 */ lui $at, %hi(sUpdateCameraDirection) # $at, 0x8012 -/* AC5CE8 8004EB48 AC28D3E8 */ sw $t0, %lo(sUpdateCameraDirection)($at) -/* AC5CEC 8004EB4C 862A001C */ lh $t2, 0x1c($s1) -/* AC5CF0 8004EB50 3C018012 */ lui $at, %hi(sCameraInterfaceFlags) # $at, 0x8012 -/* AC5CF4 8004EB54 26250050 */ addiu $a1, $s1, 0x50 -/* AC5CF8 8004EB58 2626005C */ addiu $a2, $s1, 0x5c -/* AC5CFC 8004EB5C AFA60044 */ sw $a2, 0x44($sp) -/* AC5D00 8004EB60 AFA50040 */ sw $a1, 0x40($sp) -/* AC5D04 8004EB64 E7AE0088 */ swc1 $f14, 0x88($sp) -/* AC5D08 8004EB68 27A400B0 */ addiu $a0, $sp, 0xb0 -/* AC5D0C 8004EB6C 0C01F124 */ jal OLib_Vec3fDiffToVecSphGeo -/* AC5D10 8004EB70 AC2AD3A0 */ sw $t2, %lo(sCameraInterfaceFlags)($at) -/* AC5D14 8004EB74 26260074 */ addiu $a2, $s1, 0x74 -/* AC5D18 8004EB78 AFA6003C */ sw $a2, 0x3c($sp) -/* AC5D1C 8004EB7C 27A400A8 */ addiu $a0, $sp, 0xa8 -/* AC5D20 8004EB80 0C01F124 */ jal OLib_Vec3fDiffToVecSphGeo -/* AC5D24 8004EB84 8FA50040 */ lw $a1, 0x40($sp) -/* AC5D28 8004EB88 26230094 */ addiu $v1, $s1, 0x94 -/* AC5D2C 8004EB8C 8C6C0000 */ lw $t4, ($v1) -/* AC5D30 8004EB90 3C078016 */ lui $a3, %hi(D_8015BD50) # $a3, 0x8016 -/* AC5D34 8004EB94 24E7BD50 */ addiu $a3, %lo(D_8015BD50) # addiu $a3, $a3, -0x42b0 -/* AC5D38 8004EB98 ACEC0000 */ sw $t4, ($a3) -/* AC5D3C 8004EB9C 8C6B0004 */ lw $t3, 4($v1) -/* AC5D40 8004EBA0 3C018016 */ lui $at, %hi(D_8015BD50) -/* AC5D44 8004EBA4 C7AE0088 */ lwc1 $f14, 0x88($sp) -/* AC5D48 8004EBA8 ACEB0004 */ sw $t3, 4($a3) -/* AC5D4C 8004EBAC 8C6C0008 */ lw $t4, 8($v1) -/* AC5D50 8004EBB0 27A500C0 */ addiu $a1, $sp, 0xc0 -/* AC5D54 8004EBB4 27A6007C */ addiu $a2, $sp, 0x7c -/* AC5D58 8004EBB8 ACEC0008 */ sw $t4, 8($a3) -/* AC5D5C 8004EBBC C42ABD54 */ lwc1 $f10, %lo(D_8015BD50+0x4)($at) -/* AC5D60 8004EBC0 460E5180 */ add.s $f6, $f10, $f14 -/* AC5D64 8004EBC4 E426BD54 */ swc1 $f6, %lo(D_8015BD50+0x4)($at) -/* AC5D68 8004EBC8 8E24008C */ lw $a0, 0x8c($s1) -/* AC5D6C 8004EBCC AFA30038 */ sw $v1, 0x38($sp) -/* AC5D70 8004EBD0 0C00F329 */ jal func_8003CCA4 -/* AC5D74 8004EBD4 248407C0 */ addiu $a0, $a0, 0x7c0 -/* AC5D78 8004EBD8 3C018016 */ lui $at, %hi(D_8015BD50) -/* AC5D7C 8004EBDC C428BD54 */ lwc1 $f8, %lo(D_8015BD50+0x4)($at) -/* AC5D80 8004EBE0 C6240000 */ lwc1 $f4, ($s1) -/* AC5D84 8004EBE4 46082080 */ add.s $f2, $f4, $f8 -/* AC5D88 8004EBE8 4600103C */ c.lt.s $f2, $f0 -/* AC5D8C 8004EBEC 00000000 */ nop -/* AC5D90 8004EBF0 45000006 */ bc1f .L8004EC0C -/* AC5D94 8004EBF4 3C014120 */ li $at, 0x41200000 # 0.000000 -/* AC5D98 8004EBF8 44815000 */ mtc1 $at, $f10 -/* AC5D9C 8004EBFC 3C018016 */ lui $at, %hi(D_8015BD50) -/* AC5DA0 8004EC00 460A0180 */ add.s $f6, $f0, $f10 -/* AC5DA4 8004EC04 10000003 */ b .L8004EC14 -/* AC5DA8 8004EC08 E426BD54 */ swc1 $f6, %lo(D_8015BD50+0x4)($at) -.L8004EC0C: -/* AC5DAC 8004EC0C 3C018016 */ lui $at, %hi(D_8015BD50) -/* AC5DB0 8004EC10 E422BD54 */ swc1 $f2, %lo(D_8015BD50+0x4)($at) -.L8004EC14: -/* AC5DB4 8004EC14 8622015E */ lh $v0, 0x15e($s1) -/* AC5DB8 8004EC18 10400006 */ beqz $v0, .L8004EC34 -/* AC5DBC 8004EC1C 2401000A */ li $at, 10 -/* AC5DC0 8004EC20 1041013C */ beq $v0, $at, .L8004F114 -/* AC5DC4 8004EC24 8FA80038 */ lw $t0, 0x38($sp) -/* AC5DC8 8004EC28 24010014 */ li $at, 20 -/* AC5DCC 8004EC2C 1441013E */ bne $v0, $at, .L8004F128 -/* AC5DD0 8004EC30 00000000 */ nop -.L8004EC34: -/* AC5DD4 8004EC34 8E2D0090 */ lw $t5, 0x90($s1) -/* AC5DD8 8004EC38 240E0001 */ li $t6, 1 -/* AC5DDC 8004EC3C A7AE009C */ sh $t6, 0x9c($sp) -/* AC5DE0 8004EC40 02202025 */ move $a0, $s1 -/* AC5DE4 8004EC44 0C010EAF */ jal func_80043ABC -/* AC5DE8 8004EC48 AFAD00CC */ sw $t5, 0xcc($sp) -/* AC5DEC 8004EC4C 862F014C */ lh $t7, 0x14c($s1) -/* AC5DF0 8004EC50 8639001E */ lh $t9, 0x1e($s1) -/* AC5DF4 8004EC54 3C018014 */ lui $at, %hi(D_8013A144) -/* AC5DF8 8004EC58 31F8FFF9 */ andi $t8, $t7, 0xfff9 -/* AC5DFC 8004EC5C A638014C */ sh $t8, 0x14c($s1) -/* AC5E00 8004EC60 8FA90034 */ lw $t1, 0x34($sp) -/* AC5E04 8004EC64 A5390010 */ sh $t9, 0x10($t1) -/* AC5E08 8004EC68 8FA80038 */ lw $t0, 0x38($sp) -/* AC5E0C 8004EC6C C62800F4 */ lwc1 $f8, 0xf4($s1) -/* AC5E10 8004EC70 8FAA0034 */ lw $t2, 0x34($sp) -/* AC5E14 8004EC74 C5040004 */ lwc1 $f4, 4($t0) -/* AC5E18 8004EC78 46082281 */ sub.s $f10, $f4, $f8 -/* AC5E1C 8004EC7C E54A0008 */ swc1 $f10, 8($t2) -/* AC5E20 8004EC80 8622001C */ lh $v0, 0x1c($s1) -/* AC5E24 8004EC84 304B0002 */ andi $t3, $v0, 2 -/* AC5E28 8004EC88 11600028 */ beqz $t3, .L8004ED2C -/* AC5E2C 8004EC8C 30480004 */ andi $t0, $v0, 4 -/* AC5E30 8004EC90 C420A144 */ lwc1 $f0, %lo(D_8013A144)($at) -/* AC5E34 8004EC94 C6260008 */ lwc1 $f6, 8($s1) -/* AC5E38 8004EC98 3C013F00 */ li $at, 0x3F000000 # 0.000000 -/* AC5E3C 8004EC9C 44811000 */ mtc1 $at, $f2 -/* AC5E40 8004ECA0 46003102 */ mul.s $f4, $f6, $f0 -/* AC5E44 8004ECA4 8FAE0038 */ lw $t6, 0x38($sp) -/* AC5E48 8004ECA8 87AF00AE */ lh $t7, 0xae($sp) -/* AC5E4C 8004ECAC 46022200 */ add.s $f8, $f4, $f2 -/* AC5E50 8004ECB0 4600428D */ trunc.w.s $f10, $f8 -/* AC5E54 8004ECB4 440D5000 */ mfc1 $t5, $f10 -/* AC5E58 8004ECB8 00000000 */ nop -/* AC5E5C 8004ECBC A7AD00A2 */ sh $t5, 0xa2($sp) -/* AC5E60 8004ECC0 85C2000E */ lh $v0, 0xe($t6) -/* AC5E64 8004ECC4 24428001 */ addiu $v0, $v0, -0x7fff -/* AC5E68 8004ECC8 00021400 */ sll $v0, $v0, 0x10 -/* AC5E6C 8004ECCC 00021403 */ sra $v0, $v0, 0x10 -/* AC5E70 8004ECD0 004FC023 */ subu $t8, $v0, $t7 -/* AC5E74 8004ECD4 0018CC00 */ sll $t9, $t8, 0x10 -/* AC5E78 8004ECD8 00194C03 */ sra $t1, $t9, 0x10 -/* AC5E7C 8004ECDC 5920000B */ blezl $t1, .L8004ED0C -/* AC5E80 8004ECE0 C626000C */ lwc1 $f6, 0xc($s1) -/* AC5E84 8004ECE4 C626000C */ lwc1 $f6, 0xc($s1) -/* AC5E88 8004ECE8 46003102 */ mul.s $f4, $f6, $f0 -/* AC5E8C 8004ECEC 46022200 */ add.s $f8, $f4, $f2 -/* AC5E90 8004ECF0 4600428D */ trunc.w.s $f10, $f8 -/* AC5E94 8004ECF4 440C5000 */ mfc1 $t4, $f10 -/* AC5E98 8004ECF8 00000000 */ nop -/* AC5E9C 8004ECFC 004C6821 */ addu $t5, $v0, $t4 -/* AC5EA0 8004ED00 1000009A */ b .L8004EF6C -/* AC5EA4 8004ED04 A7AD00A0 */ sh $t5, 0xa0($sp) -/* AC5EA8 8004ED08 C626000C */ lwc1 $f6, 0xc($s1) -.L8004ED0C: -/* AC5EAC 8004ED0C 46003102 */ mul.s $f4, $f6, $f0 -/* AC5EB0 8004ED10 46022200 */ add.s $f8, $f4, $f2 -/* AC5EB4 8004ED14 4600428D */ trunc.w.s $f10, $f8 -/* AC5EB8 8004ED18 44195000 */ mfc1 $t9, $f10 -/* AC5EBC 8004ED1C 00000000 */ nop -/* AC5EC0 8004ED20 00594823 */ subu $t1, $v0, $t9 -/* AC5EC4 8004ED24 10000091 */ b .L8004EF6C -/* AC5EC8 8004ED28 A7A900A0 */ sh $t1, 0xa0($sp) -.L8004ED2C: -/* AC5ECC 8004ED2C 11000013 */ beqz $t0, .L8004ED7C -/* AC5ED0 8004ED30 304E0008 */ andi $t6, $v0, 8 -/* AC5ED4 8004ED34 3C018014 */ lui $at, %hi(D_8013A148) -/* AC5ED8 8004ED38 C420A148 */ lwc1 $f0, %lo(D_8013A148)($at) -/* AC5EDC 8004ED3C C6260008 */ lwc1 $f6, 8($s1) -/* AC5EE0 8004ED40 3C013F00 */ li $at, 0x3F000000 # 0.000000 -/* AC5EE4 8004ED44 44811000 */ mtc1 $at, $f2 -/* AC5EE8 8004ED48 46003102 */ mul.s $f4, $f6, $f0 -/* AC5EEC 8004ED4C 46022200 */ add.s $f8, $f4, $f2 -/* AC5EF0 8004ED50 4600428D */ trunc.w.s $f10, $f8 -/* AC5EF4 8004ED54 440B5000 */ mfc1 $t3, $f10 -/* AC5EF8 8004ED58 00000000 */ nop -/* AC5EFC 8004ED5C A7AB00A2 */ sh $t3, 0xa2($sp) -/* AC5F00 8004ED60 C626000C */ lwc1 $f6, 0xc($s1) -/* AC5F04 8004ED64 46003102 */ mul.s $f4, $f6, $f0 -/* AC5F08 8004ED68 46022200 */ add.s $f8, $f4, $f2 -/* AC5F0C 8004ED6C 4600428D */ trunc.w.s $f10, $f8 -/* AC5F10 8004ED70 440D5000 */ mfc1 $t5, $f10 -/* AC5F14 8004ED74 1000007D */ b .L8004EF6C -/* AC5F18 8004ED78 A7AD00A0 */ sh $t5, 0xa0($sp) -.L8004ED7C: -/* AC5F1C 8004ED7C 11C00033 */ beqz $t6, .L8004EE4C -/* AC5F20 8004ED80 30490080 */ andi $t1, $v0, 0x80 -/* AC5F24 8004ED84 8E2500A8 */ lw $a1, 0xa8($s1) -/* AC5F28 8004ED88 10A00030 */ beqz $a1, .L8004EE4C -/* AC5F2C 8004ED8C 00000000 */ nop -/* AC5F30 8004ED90 0C00BBD1 */ jal func_8002EF44 -/* AC5F34 8004ED94 27A40060 */ addiu $a0, $sp, 0x60 -/* AC5F38 8004ED98 3C018014 */ lui $at, %hi(D_8013A14C) -/* AC5F3C 8004ED9C C420A14C */ lwc1 $f0, %lo(D_8013A14C)($at) -/* AC5F40 8004EDA0 C6260008 */ lwc1 $f6, 8($s1) -/* AC5F44 8004EDA4 3C013F00 */ li $at, 0x3F000000 # 0.000000 -/* AC5F48 8004EDA8 44811000 */ mtc1 $at, $f2 -/* AC5F4C 8004EDAC 46003102 */ mul.s $f4, $f6, $f0 -/* AC5F50 8004EDB0 87A3006E */ lh $v1, 0x6e($sp) -/* AC5F54 8004EDB4 87AB00AE */ lh $t3, 0xae($sp) -/* AC5F58 8004EDB8 87A8006C */ lh $t0, 0x6c($sp) -/* AC5F5C 8004EDBC 24638001 */ addiu $v1, $v1, -0x7fff -/* AC5F60 8004EDC0 00031C00 */ sll $v1, $v1, 0x10 -/* AC5F64 8004EDC4 00031C03 */ sra $v1, $v1, 0x10 -/* AC5F68 8004EDC8 46022200 */ add.s $f8, $f4, $f2 -/* AC5F6C 8004EDCC 006B6023 */ subu $t4, $v1, $t3 -/* AC5F70 8004EDD0 000C6C00 */ sll $t5, $t4, 0x10 -/* AC5F74 8004EDD4 000D7403 */ sra $t6, $t5, 0x10 -/* AC5F78 8004EDD8 4600428D */ trunc.w.s $f10, $f8 -/* AC5F7C 8004EDDC 44095000 */ mfc1 $t1, $f10 -/* AC5F80 8004EDE0 00000000 */ nop -/* AC5F84 8004EDE4 01285023 */ subu $t2, $t1, $t0 -/* AC5F88 8004EDE8 19C0000A */ blez $t6, .L8004EE14 -/* AC5F8C 8004EDEC A7AA00A2 */ sh $t2, 0xa2($sp) -/* AC5F90 8004EDF0 C626000C */ lwc1 $f6, 0xc($s1) -/* AC5F94 8004EDF4 46003102 */ mul.s $f4, $f6, $f0 -/* AC5F98 8004EDF8 46022200 */ add.s $f8, $f4, $f2 -/* AC5F9C 8004EDFC 4600428D */ trunc.w.s $f10, $f8 -/* AC5FA0 8004EE00 44095000 */ mfc1 $t1, $f10 -/* AC5FA4 8004EE04 00000000 */ nop -/* AC5FA8 8004EE08 00694021 */ addu $t0, $v1, $t1 -/* AC5FAC 8004EE0C 10000009 */ b .L8004EE34 -/* AC5FB0 8004EE10 A7A800A0 */ sh $t0, 0xa0($sp) -.L8004EE14: -/* AC5FB4 8004EE14 C626000C */ lwc1 $f6, 0xc($s1) -/* AC5FB8 8004EE18 46003102 */ mul.s $f4, $f6, $f0 -/* AC5FBC 8004EE1C 46022200 */ add.s $f8, $f4, $f2 -/* AC5FC0 8004EE20 4600428D */ trunc.w.s $f10, $f8 -/* AC5FC4 8004EE24 440D5000 */ mfc1 $t5, $f10 -/* AC5FC8 8004EE28 00000000 */ nop -/* AC5FCC 8004EE2C 006D7023 */ subu $t6, $v1, $t5 -/* AC5FD0 8004EE30 A7AE00A0 */ sh $t6, 0xa0($sp) -.L8004EE34: -/* AC5FD4 8004EE34 87B8009C */ lh $t8, 0x9c($sp) -/* AC5FD8 8004EE38 8E2F00A8 */ lw $t7, 0xa8($s1) -/* AC5FDC 8004EE3C 27190001 */ addiu $t9, $t8, 1 -/* AC5FE0 8004EE40 A7B9009C */ sh $t9, 0x9c($sp) -/* AC5FE4 8004EE44 10000049 */ b .L8004EF6C -/* AC5FE8 8004EE48 AFAF00D0 */ sw $t7, 0xd0($sp) -.L8004EE4C: -/* AC5FEC 8004EE4C 11200035 */ beqz $t1, .L8004EF24 -/* AC5FF0 8004EE50 304C0040 */ andi $t4, $v0, 0x40 -/* AC5FF4 8004EE54 8E2500A8 */ lw $a1, 0xa8($s1) -/* AC5FF8 8004EE58 27B0004C */ addiu $s0, $sp, 0x4c -/* AC5FFC 8004EE5C 10A00031 */ beqz $a1, .L8004EF24 -/* AC6000 8004EE60 00000000 */ nop -/* AC6004 8004EE64 0C00BBC5 */ jal func_8002EF14 -/* AC6008 8004EE68 02002025 */ move $a0, $s0 -/* AC600C 8004EE6C 3C018014 */ lui $at, %hi(D_8013A150) -/* AC6010 8004EE70 C420A150 */ lwc1 $f0, %lo(D_8013A150)($at) -/* AC6014 8004EE74 C6260008 */ lwc1 $f6, 8($s1) -/* AC6018 8004EE78 3C013F00 */ li $at, 0x3F000000 # 0.000000 -/* AC601C 8004EE7C 44811000 */ mtc1 $at, $f2 -/* AC6020 8004EE80 46003102 */ mul.s $f4, $f6, $f0 -/* AC6024 8004EE84 02002025 */ move $a0, $s0 -/* AC6028 8004EE88 8FA50038 */ lw $a1, 0x38($sp) -/* AC602C 8004EE8C 46022200 */ add.s $f8, $f4, $f2 -/* AC6030 8004EE90 4600428D */ trunc.w.s $f10, $f8 -/* AC6034 8004EE94 440A5000 */ mfc1 $t2, $f10 -/* AC6038 8004EE98 0C01129D */ jal Camera_XZAngle -/* AC603C 8004EE9C A7AA00A2 */ sh $t2, 0xa2($sp) -/* AC6040 8004EEA0 87AB00AE */ lh $t3, 0xae($sp) -/* AC6044 8004EEA4 3C018014 */ lui $at, %hi(D_8013A154) -/* AC6048 8004EEA8 C420A154 */ lwc1 $f0, %lo(D_8013A154)($at) -/* AC604C 8004EEAC 004B6023 */ subu $t4, $v0, $t3 -/* AC6050 8004EEB0 3C013F00 */ li $at, 0x3F000000 # 0.000000 -/* AC6054 8004EEB4 000C6C00 */ sll $t5, $t4, 0x10 -/* AC6058 8004EEB8 44811000 */ mtc1 $at, $f2 -/* AC605C 8004EEBC 000D7403 */ sra $t6, $t5, 0x10 -/* AC6060 8004EEC0 59C0000B */ blezl $t6, .L8004EEF0 -/* AC6064 8004EEC4 C626000C */ lwc1 $f6, 0xc($s1) -/* AC6068 8004EEC8 C626000C */ lwc1 $f6, 0xc($s1) -/* AC606C 8004EECC 46003102 */ mul.s $f4, $f6, $f0 -/* AC6070 8004EED0 46022200 */ add.s $f8, $f4, $f2 -/* AC6074 8004EED4 4600428D */ trunc.w.s $f10, $f8 -/* AC6078 8004EED8 440A5000 */ mfc1 $t2, $f10 -/* AC607C 8004EEDC 00000000 */ nop -/* AC6080 8004EEE0 004A5821 */ addu $t3, $v0, $t2 -/* AC6084 8004EEE4 10000009 */ b .L8004EF0C -/* AC6088 8004EEE8 A7AB00A0 */ sh $t3, 0xa0($sp) -/* AC608C 8004EEEC C626000C */ lwc1 $f6, 0xc($s1) -.L8004EEF0: -/* AC6090 8004EEF0 46003102 */ mul.s $f4, $f6, $f0 -/* AC6094 8004EEF4 46022200 */ add.s $f8, $f4, $f2 -/* AC6098 8004EEF8 4600428D */ trunc.w.s $f10, $f8 -/* AC609C 8004EEFC 44095000 */ mfc1 $t1, $f10 -/* AC60A0 8004EF00 00000000 */ nop -/* AC60A4 8004EF04 00494023 */ subu $t0, $v0, $t1 -/* AC60A8 8004EF08 A7A800A0 */ sh $t0, 0xa0($sp) -.L8004EF0C: -/* AC60AC 8004EF0C 87AA009C */ lh $t2, 0x9c($sp) -/* AC60B0 8004EF10 8E3800A8 */ lw $t8, 0xa8($s1) -/* AC60B4 8004EF14 254B0001 */ addiu $t3, $t2, 1 -/* AC60B8 8004EF18 A7AB009C */ sh $t3, 0x9c($sp) -/* AC60BC 8004EF1C 10000013 */ b .L8004EF6C -/* AC60C0 8004EF20 AFB800D0 */ sw $t8, 0xd0($sp) -.L8004EF24: -/* AC60C4 8004EF24 1180000E */ beqz $t4, .L8004EF60 -/* AC60C8 8004EF28 87AD00AC */ lh $t5, 0xac($sp) -/* AC60CC 8004EF2C 3C018014 */ lui $at, %hi(D_8013A158) -/* AC60D0 8004EF30 C420A158 */ lwc1 $f0, %lo(D_8013A158)($at) -/* AC60D4 8004EF34 C6260008 */ lwc1 $f6, 8($s1) -/* AC60D8 8004EF38 3C013F00 */ li $at, 0x3F000000 # 0.000000 -/* AC60DC 8004EF3C 44811000 */ mtc1 $at, $f2 -/* AC60E0 8004EF40 46003102 */ mul.s $f4, $f6, $f0 -/* AC60E4 8004EF44 87B900AE */ lh $t9, 0xae($sp) -/* AC60E8 8004EF48 A7B900A0 */ sh $t9, 0xa0($sp) -/* AC60EC 8004EF4C 46022200 */ add.s $f8, $f4, $f2 -/* AC60F0 8004EF50 4600428D */ trunc.w.s $f10, $f8 -/* AC60F4 8004EF54 440F5000 */ mfc1 $t7, $f10 -/* AC60F8 8004EF58 10000004 */ b .L8004EF6C -/* AC60FC 8004EF5C A7AF00A2 */ sh $t7, 0xa2($sp) -.L8004EF60: -/* AC6100 8004EF60 87A900AE */ lh $t1, 0xae($sp) -/* AC6104 8004EF64 A7AD00A2 */ sh $t5, 0xa2($sp) -/* AC6108 8004EF68 A7A900A0 */ sh $t1, 0xa0($sp) -.L8004EF6C: -/* AC610C 8004EF6C 87A800A2 */ lh $t0, 0xa2($sp) -/* AC6110 8004EF70 87B800A0 */ lh $t8, 0xa0($sp) -/* AC6114 8004EF74 3C048016 */ lui $a0, %hi(D_8015BD50) # $a0, 0x8016 -/* AC6118 8004EF78 A7A800BC */ sh $t0, 0xbc($sp) -/* AC611C 8004EF7C A7B800BE */ sh $t8, 0xbe($sp) -/* AC6120 8004EF80 C6260004 */ lwc1 $f6, 4($s1) -/* AC6124 8004EF84 3C058016 */ lui $a1, %hi(D_8015BD50) # $a1, 0x8016 -/* AC6128 8004EF88 24A5BD50 */ addiu $a1, %lo(D_8015BD50) # addiu $a1, $a1, -0x42b0 -/* AC612C 8004EF8C 2484BD70 */ addiu $a0, %lo(D_8015BD50+0x20) # addiu $a0, $a0, -0x4290 -/* AC6130 8004EF90 27A600B8 */ addiu $a2, $sp, 0xb8 -/* AC6134 8004EF94 0C010F0A */ jal Camera_Vec3fVecSphGeoAdd -/* AC6138 8004EF98 E7A600B8 */ swc1 $f6, 0xb8($sp) -/* AC613C 8004EF9C 862A001C */ lh $t2, 0x1c($s1) -/* AC6140 8004EFA0 240C000E */ li $t4, 14 -/* AC6144 8004EFA4 314B0001 */ andi $t3, $t2, 1 -/* AC6148 8004EFA8 5560003A */ bnezl $t3, .L8004F094 -/* AC614C 8004EFAC 8FA20034 */ lw $v0, 0x34($sp) -/* AC6150 8004EFB0 A7AC0082 */ sh $t4, 0x82($sp) -/* AC6154 8004EFB4 AFA0007C */ sw $zero, 0x7c($sp) -.L8004EFB8: -/* AC6158 8004EFB8 8E30008C */ lw $s0, 0x8c($s1) -/* AC615C 8004EFBC 87AF009C */ lh $t7, 0x9c($sp) -/* AC6160 8004EFC0 3C010001 */ lui $at, (0x00011E60 >> 16) # lui $at, 1 -/* AC6164 8004EFC4 34211E60 */ ori $at, (0x00011E60 & 0xFFFF) # ori $at, $at, 0x1e60 -/* AC6168 8004EFC8 3C068016 */ lui $a2, %hi(D_8015BD50) # $a2, 0x8016 -/* AC616C 8004EFCC 3C078016 */ lui $a3, %hi(D_8015BD50) # $a3, 0x8016 -/* AC6170 8004EFD0 27AE00CC */ addiu $t6, $sp, 0xcc -/* AC6174 8004EFD4 AFAE0010 */ sw $t6, 0x10($sp) -/* AC6178 8004EFD8 24E7BD70 */ addiu $a3, %lo(D_8015BD50+0x20) # addiu $a3, $a3, -0x4290 -/* AC617C 8004EFDC 24C6BD50 */ addiu $a2, %lo(D_8015BD50) # addiu $a2, $a2, -0x42b0 -/* AC6180 8004EFE0 02012821 */ addu $a1, $s0, $at -/* AC6184 8004EFE4 02002025 */ move $a0, $s0 -/* AC6188 8004EFE8 0C0189AC */ jal func_800626B0 -/* AC618C 8004EFEC AFAF0014 */ sw $t7, 0x14($sp) -/* AC6190 8004EFF0 14400008 */ bnez $v0, .L8004F014 -/* AC6194 8004EFF4 02202025 */ move $a0, $s1 -/* AC6198 8004EFF8 3C058016 */ lui $a1, %hi(D_8015BD50) # $a1, 0x8016 -/* AC619C 8004EFFC 3C068016 */ lui $a2, %hi(D_8015BD50) # $a2, 0x8016 -/* AC61A0 8004F000 24C6BD70 */ addiu $a2, %lo(D_8015BD50+0x20) # addiu $a2, $a2, -0x4290 -/* AC61A4 8004F004 0C010FCD */ jal Camera_BGCheck -/* AC61A8 8004F008 24A5BD50 */ addiu $a1, %lo(D_8015BD50) # addiu $a1, $a1, -0x42b0 -/* AC61AC 8004F00C 1040001C */ beqz $v0, .L8004F080 -/* AC61B0 8004F010 00000000 */ nop -.L8004F014: -/* AC61B4 8004F014 8FB0007C */ lw $s0, 0x7c($sp) -/* AC61B8 8004F018 3C198012 */ lui $t9, %hi(D_8011D3B0) -/* AC61BC 8004F01C 3C088012 */ lui $t0, %hi(D_8011D3CC) -/* AC61C0 8004F020 00101040 */ sll $v0, $s0, 1 -/* AC61C4 8004F024 0322C821 */ addu $t9, $t9, $v0 -/* AC61C8 8004F028 01024021 */ addu $t0, $t0, $v0 -/* AC61CC 8004F02C 8739D3B0 */ lh $t9, %lo(D_8011D3B0)($t9) -/* AC61D0 8004F030 87AD00A0 */ lh $t5, 0xa0($sp) -/* AC61D4 8004F034 8508D3CC */ lh $t0, %lo(D_8011D3CC)($t0) -/* AC61D8 8004F038 87B800A2 */ lh $t8, 0xa2($sp) -/* AC61DC 8004F03C 3C048016 */ lui $a0, %hi(D_8015BD50) # $a0, 0x8016 -/* AC61E0 8004F040 3C058016 */ lui $a1, %hi(D_8015BD50) -/* AC61E4 8004F044 032D4821 */ addu $t1, $t9, $t5 -/* AC61E8 8004F048 01185021 */ addu $t2, $t0, $t8 -/* AC61EC 8004F04C A7A900BE */ sh $t1, 0xbe($sp) -/* AC61F0 8004F050 A7AA00BC */ sh $t2, 0xbc($sp) -/* AC61F4 8004F054 24A5BD50 */ addiu $a1, %lo(D_8015BD50) # addiu $a1, $a1, -0x42b0 -/* AC61F8 8004F058 2484BD70 */ addiu $a0, %lo(D_8015BD50+0x20) # addiu $a0, $a0, -0x4290 -/* AC61FC 8004F05C 0C010F0A */ jal Camera_Vec3fVecSphGeoAdd -/* AC6200 8004F060 27A600B8 */ addiu $a2, $sp, 0xb8 -/* AC6204 8004F064 8FB0007C */ lw $s0, 0x7c($sp) -/* AC6208 8004F068 87AB0082 */ lh $t3, 0x82($sp) -/* AC620C 8004F06C 26100001 */ addiu $s0, $s0, 1 -/* AC6210 8004F070 020B082A */ slt $at, $s0, $t3 -/* AC6214 8004F074 1420FFD0 */ bnez $at, .L8004EFB8 -/* AC6218 8004F078 AFB0007C */ sw $s0, 0x7c($sp) -/* AC621C 8004F07C AFB0007C */ sw $s0, 0x7c($sp) -.L8004F080: -/* AC6220 8004F080 3C048014 */ lui $a0, %hi(D_8013935C) -/* AC6224 8004F084 8FA5007C */ lw $a1, 0x7c($sp) -/* AC6228 8004F088 0C00084C */ jal osSyncPrintf -/* AC622C 8004F08C 2484935C */ addiu $a0, %lo(D_8013935C) # addiu $a0, $a0, -0x6ca4 -/* AC6230 8004F090 8FA20034 */ lw $v0, 0x34($sp) -.L8004F094: -/* AC6234 8004F094 87AE00BC */ lh $t6, 0xbc($sp) -/* AC6238 8004F098 87AF00AC */ lh $t7, 0xac($sp) -/* AC623C 8004F09C 844C0010 */ lh $t4, 0x10($v0) -/* AC6240 8004F0A0 01CFC823 */ subu $t9, $t6, $t7 -/* AC6244 8004F0A4 00196C00 */ sll $t5, $t9, 0x10 -/* AC6248 8004F0A8 000D4C03 */ sra $t1, $t5, 0x10 -/* AC624C 8004F0AC 44894000 */ mtc1 $t1, $f8 -/* AC6250 8004F0B0 448C2000 */ mtc1 $t4, $f4 -/* AC6254 8004F0B4 24090001 */ li $t1, 1 -/* AC6258 8004F0B8 468042A0 */ cvt.s.w $f10, $f8 -/* AC625C 8004F0BC 46802020 */ cvt.s.w $f0, $f4 -/* AC6260 8004F0C0 46005183 */ div.s $f6, $f10, $f0 -/* AC6264 8004F0C4 E4460004 */ swc1 $f6, 4($v0) -/* AC6268 8004F0C8 87B800AE */ lh $t8, 0xae($sp) -/* AC626C 8004F0CC 87A800BE */ lh $t0, 0xbe($sp) -/* AC6270 8004F0D0 01185023 */ subu $t2, $t0, $t8 -/* AC6274 8004F0D4 000A5C00 */ sll $t3, $t2, 0x10 -/* AC6278 8004F0D8 000B6403 */ sra $t4, $t3, 0x10 -/* AC627C 8004F0DC 448C2000 */ mtc1 $t4, $f4 -/* AC6280 8004F0E0 00000000 */ nop -/* AC6284 8004F0E4 46802220 */ cvt.s.w $f8, $f4 -/* AC6288 8004F0E8 46004283 */ div.s $f10, $f8, $f0 -/* AC628C 8004F0EC E44A0000 */ swc1 $f10, ($v0) -/* AC6290 8004F0F0 87AE00AE */ lh $t6, 0xae($sp) -/* AC6294 8004F0F4 A44E000C */ sh $t6, 0xc($v0) -/* AC6298 8004F0F8 87AF00AC */ lh $t7, 0xac($sp) -/* AC629C 8004F0FC A44F000E */ sh $t7, 0xe($v0) -/* AC62A0 8004F100 8639015E */ lh $t9, 0x15e($s1) -/* AC62A4 8004F104 272D0001 */ addiu $t5, $t9, 1 -/* AC62A8 8004F108 A62D015E */ sh $t5, 0x15e($s1) -/* AC62AC 8004F10C 10000006 */ b .L8004F128 -/* AC62B0 8004F110 A4490012 */ sh $t1, 0x12($v0) -.L8004F114: -/* AC62B4 8004F114 C5060004 */ lwc1 $f6, 4($t0) -/* AC62B8 8004F118 C62400F4 */ lwc1 $f4, 0xf4($s1) -/* AC62BC 8004F11C 8FB80034 */ lw $t8, 0x34($sp) -/* AC62C0 8004F120 46043201 */ sub.s $f8, $f6, $f4 -/* AC62C4 8004F124 E7080008 */ swc1 $f8, 8($t8) -.L8004F128: -/* AC62C8 8004F128 3C013E80 */ li $at, 0x3E800000 # 0.000000 -/* AC62CC 8004F12C 44810000 */ mtc1 $at, $f0 -/* AC62D0 8004F130 3C013F00 */ li $at, 0x3F000000 # 0.000000 -/* AC62D4 8004F134 44811000 */ mtc1 $at, $f2 -/* AC62D8 8004F138 3C013F40 */ li $at, 0x3F400000 # 0.000000 -/* AC62DC 8004F13C 44815000 */ mtc1 $at, $f10 -/* AC62E0 8004F140 3C018014 */ lui $at, %hi(D_8013A15C) -/* AC62E4 8004F144 E62000CC */ swc1 $f0, 0xcc($s1) -/* AC62E8 8004F148 E62000D0 */ swc1 $f0, 0xd0($s1) -/* AC62EC 8004F14C E62A0100 */ swc1 $f10, 0x100($s1) -/* AC62F0 8004F150 C426A15C */ lwc1 $f6, %lo(D_8013A15C)($at) -/* AC62F4 8004F154 3C048016 */ lui $a0, %hi(D_8015BD50) -/* AC62F8 8004F158 44061000 */ mfc1 $a2, $f2 -/* AC62FC 8004F15C 44071000 */ mfc1 $a3, $f2 -/* AC6300 8004F160 2484BD50 */ addiu $a0, %lo(D_8015BD50) # addiu $a0, $a0, -0x42b0 -/* AC6304 8004F164 8FA50040 */ lw $a1, 0x40($sp) -/* AC6308 8004F168 0C010E8F */ jal Camera_LERPCeilVec3f -/* AC630C 8004F16C E7A60010 */ swc1 $f6, 0x10($sp) -/* AC6310 8004F170 C6200010 */ lwc1 $f0, 0x10($s1) -/* AC6314 8004F174 44802000 */ mtc1 $zero, $f4 -/* AC6318 8004F178 8FA40040 */ lw $a0, 0x40($sp) -/* AC631C 8004F17C 46002032 */ c.eq.s $f4, $f0 -/* AC6320 8004F180 00802825 */ move $a1, $a0 -/* AC6324 8004F184 45030009 */ bc1tl .L8004F1AC -/* AC6328 8004F188 44804000 */ mtc1 $zero, $f8 -/* AC632C 8004F18C 8FAA0038 */ lw $t2, 0x38($sp) -/* AC6330 8004F190 E7A000B8 */ swc1 $f0, 0xb8($sp) -/* AC6334 8004F194 A7A000BC */ sh $zero, 0xbc($sp) -/* AC6338 8004F198 854B000E */ lh $t3, 0xe($t2) -/* AC633C 8004F19C 27A600B8 */ addiu $a2, $sp, 0xb8 -/* AC6340 8004F1A0 0C010F0A */ jal Camera_Vec3fVecSphGeoAdd -/* AC6344 8004F1A4 A7AB00BE */ sh $t3, 0xbe($sp) -/* AC6348 8004F1A8 44804000 */ mtc1 $zero, $f8 -.L8004F1AC: -/* AC634C 8004F1AC C62C0004 */ lwc1 $f12, 4($s1) -/* AC6350 8004F1B0 C62E00DC */ lwc1 $f14, 0xdc($s1) -/* AC6354 8004F1B4 3C063E80 */ lui $a2, 0x3e80 -/* AC6358 8004F1B8 3C074000 */ lui $a3, 0x4000 -/* AC635C 8004F1BC 0C010E27 */ jal Camera_LERPCeilF -/* AC6360 8004F1C0 E6280100 */ swc1 $f8, 0x100($s1) -/* AC6364 8004F1C4 8FA30034 */ lw $v1, 0x34($sp) -/* AC6368 8004F1C8 E62000DC */ swc1 $f0, 0xdc($s1) -/* AC636C 8004F1CC E7A000B8 */ swc1 $f0, 0xb8($sp) -/* AC6370 8004F1D0 846C0010 */ lh $t4, 0x10($v1) -/* AC6374 8004F1D4 51800015 */ beql $t4, $zero, .L8004F22C -/* AC6378 8004F1D8 8638001C */ lh $t8, 0x1c($s1) -/* AC637C 8004F1DC 862E014C */ lh $t6, 0x14c($s1) -/* AC6380 8004F1E0 35CF0020 */ ori $t7, $t6, 0x20 -/* AC6384 8004F1E4 A62F014C */ sh $t7, 0x14c($s1) -/* AC6388 8004F1E8 C46A0000 */ lwc1 $f10, ($v1) -/* AC638C 8004F1EC C4640004 */ lwc1 $f4, 4($v1) -/* AC6390 8004F1F0 8479000C */ lh $t9, 0xc($v1) -/* AC6394 8004F1F4 4600518D */ trunc.w.s $f6, $f10 -/* AC6398 8004F1F8 846B000E */ lh $t3, 0xe($v1) -/* AC639C 8004F1FC 84680010 */ lh $t0, 0x10($v1) -/* AC63A0 8004F200 4600220D */ trunc.w.s $f8, $f4 -/* AC63A4 8004F204 44183000 */ mfc1 $t8, $f6 -/* AC63A8 8004F208 440D4000 */ mfc1 $t5, $f8 -/* AC63AC 8004F20C 03385021 */ addu $t2, $t9, $t8 -/* AC63B0 8004F210 2519FFFF */ addiu $t9, $t0, -1 -/* AC63B4 8004F214 016D4821 */ addu $t1, $t3, $t5 -/* AC63B8 8004F218 A46A000C */ sh $t2, 0xc($v1) -/* AC63BC 8004F21C A469000E */ sh $t1, 0xe($v1) -/* AC63C0 8004F220 10000033 */ b .L8004F2F0 -/* AC63C4 8004F224 A4790010 */ sh $t9, 0x10($v1) -/* AC63C8 8004F228 8638001C */ lh $t8, 0x1c($s1) -.L8004F22C: -/* AC63CC 8004F22C 330A0010 */ andi $t2, $t8, 0x10 -/* AC63D0 8004F230 51400010 */ beql $t2, $zero, .L8004F274 -/* AC63D4 8004F234 8639014C */ lh $t9, 0x14c($s1) -/* AC63D8 8004F238 862C014C */ lh $t4, 0x14c($s1) -/* AC63DC 8004F23C 86220160 */ lh $v0, 0x160($s1) -/* AC63E0 8004F240 358E0410 */ ori $t6, $t4, 0x410 -/* AC63E4 8004F244 A62E014C */ sh $t6, 0x14c($s1) -/* AC63E8 8004F248 862F014C */ lh $t7, 0x14c($s1) -/* AC63EC 8004F24C 2448FFFF */ addiu $t0, $v0, -1 -/* AC63F0 8004F250 35EB0006 */ ori $t3, $t7, 6 -/* AC63F4 8004F254 A62B014C */ sh $t3, 0x14c($s1) -/* AC63F8 8004F258 862D014C */ lh $t5, 0x14c($s1) -/* AC63FC 8004F25C 31A9FFF7 */ andi $t1, $t5, 0xfff7 -/* AC6400 8004F260 18400023 */ blez $v0, .L8004F2F0 -/* AC6404 8004F264 A629014C */ sh $t1, 0x14c($s1) -/* AC6408 8004F268 10000021 */ b .L8004F2F0 -/* AC640C 8004F26C A6280160 */ sh $t0, 0x160($s1) -/* AC6410 8004F270 8639014C */ lh $t9, 0x14c($s1) -.L8004F274: -/* AC6414 8004F274 3C018012 */ lui $at, %hi(sCameraInterfaceFlags) # $at, 0x8012 -/* AC6418 8004F278 37380410 */ ori $t8, $t9, 0x410 -/* AC641C 8004F27C A638014C */ sh $t8, 0x14c($s1) -/* AC6420 8004F280 862A014C */ lh $t2, 0x14c($s1) -/* AC6424 8004F284 314C0008 */ andi $t4, $t2, 8 -/* AC6428 8004F288 15800005 */ bnez $t4, .L8004F2A0 -/* AC642C 8004F28C 00000000 */ nop -/* AC6430 8004F290 862E001C */ lh $t6, 0x1c($s1) -/* AC6434 8004F294 31CF0080 */ andi $t7, $t6, 0x80 -/* AC6438 8004F298 51E00016 */ beql $t7, $zero, .L8004F2F4 -/* AC643C 8004F29C 8464000C */ lh $a0, 0xc($v1) -.L8004F2A0: -/* AC6440 8004F2A0 AC20D3A0 */ sw $zero, %lo(sCameraInterfaceFlags)($at) -/* AC6444 8004F2A4 862B014C */ lh $t3, 0x14c($s1) -/* AC6448 8004F2A8 86250166 */ lh $a1, 0x166($s1) -/* AC644C 8004F2AC 02202025 */ move $a0, $s1 -/* AC6450 8004F2B0 356D0006 */ ori $t5, $t3, 6 -/* AC6454 8004F2B4 A62D014C */ sh $t5, 0x14c($s1) -/* AC6458 8004F2B8 8629014C */ lh $t1, 0x14c($s1) -/* AC645C 8004F2BC 24060002 */ li $a2, 2 -/* AC6460 8004F2C0 3128FFF7 */ andi $t0, $t1, 0xfff7 -/* AC6464 8004F2C4 04A10005 */ bgez $a1, .L8004F2DC -/* AC6468 8004F2C8 A628014C */ sh $t0, 0x14c($s1) -/* AC646C 8004F2CC 0C016952 */ jal Camera_ChangeSettingFlags -/* AC6470 8004F2D0 86250154 */ lh $a1, 0x154($s1) -/* AC6474 8004F2D4 10000006 */ b .L8004F2F0 -/* AC6478 8004F2D8 8FA30034 */ lw $v1, 0x34($sp) -.L8004F2DC: -/* AC647C 8004F2DC 0C0169EA */ jal Camera_ChangeDataIdx -/* AC6480 8004F2E0 02202025 */ move $a0, $s1 -/* AC6484 8004F2E4 2419FFFF */ li $t9, -1 -/* AC6488 8004F2E8 A6390166 */ sh $t9, 0x166($s1) -/* AC648C 8004F2EC 8FA30034 */ lw $v1, 0x34($sp) -.L8004F2F0: -/* AC6490 8004F2F0 8464000C */ lh $a0, 0xc($v1) -.L8004F2F4: -/* AC6494 8004F2F4 87A500AE */ lh $a1, 0xae($sp) -/* AC6498 8004F2F8 8E260014 */ lw $a2, 0x14($s1) -/* AC649C 8004F2FC 0C010E47 */ jal Camera_LERPCeilS -/* AC64A0 8004F300 24070004 */ li $a3, 4 -/* AC64A4 8004F304 8FB80034 */ lw $t8, 0x34($sp) -/* AC64A8 8004F308 A7A200BE */ sh $v0, 0xbe($sp) -/* AC64AC 8004F30C 8E260014 */ lw $a2, 0x14($s1) -/* AC64B0 8004F310 87A500AC */ lh $a1, 0xac($sp) -/* AC64B4 8004F314 24070004 */ li $a3, 4 -/* AC64B8 8004F318 0C010E47 */ jal Camera_LERPCeilS -/* AC64BC 8004F31C 8704000E */ lh $a0, 0xe($t8) -/* AC64C0 8004F320 A7A200BC */ sh $v0, 0xbc($sp) -/* AC64C4 8004F324 8FA4003C */ lw $a0, 0x3c($sp) -/* AC64C8 8004F328 8FA50040 */ lw $a1, 0x40($sp) -/* AC64CC 8004F32C 0C010F0A */ jal Camera_Vec3fVecSphGeoAdd -/* AC64D0 8004F330 27A600B8 */ addiu $a2, $sp, 0xb8 -/* AC64D4 8004F334 8FAA003C */ lw $t2, 0x3c($sp) -/* AC64D8 8004F338 8FA60044 */ lw $a2, 0x44($sp) -/* AC64DC 8004F33C 02202025 */ move $a0, $s1 -/* AC64E0 8004F340 8D4E0000 */ lw $t6, ($t2) -/* AC64E4 8004F344 ACCE0000 */ sw $t6, ($a2) -/* AC64E8 8004F348 8D4C0004 */ lw $t4, 4($t2) -/* AC64EC 8004F34C ACCC0004 */ sw $t4, 4($a2) -/* AC64F0 8004F350 8D4E0008 */ lw $t6, 8($t2) -/* AC64F4 8004F354 ACCE0008 */ sw $t6, 8($a2) -/* AC64F8 8004F358 0C010FCD */ jal Camera_BGCheck -/* AC64FC 8004F35C 8FA50040 */ lw $a1, 0x40($sp) -/* AC6500 8004F360 C62C0018 */ lwc1 $f12, 0x18($s1) -/* AC6504 8004F364 C62E00FC */ lwc1 $f14, 0xfc($s1) -/* AC6508 8004F368 8E2600D4 */ lw $a2, 0xd4($s1) -/* AC650C 8004F36C 0C010E27 */ jal Camera_LERPCeilF -/* AC6510 8004F370 3C073F80 */ lui $a3, 0x3f80 -/* AC6514 8004F374 E62000FC */ swc1 $f0, 0xfc($s1) -/* AC6518 8004F378 00002025 */ move $a0, $zero -/* AC651C 8004F37C 8625015A */ lh $a1, 0x15a($s1) -/* AC6520 8004F380 3C063F00 */ lui $a2, 0x3f00 -/* AC6524 8004F384 0C010E47 */ jal Camera_LERPCeilS -/* AC6528 8004F388 2407000A */ li $a3, 10 -/* AC652C 8004F38C A622015A */ sh $v0, 0x15a($s1) -.L8004F390: -/* AC6530 8004F390 8FBF0024 */ lw $ra, 0x24($sp) -/* AC6534 8004F394 8FB0001C */ lw $s0, 0x1c($sp) -/* AC6538 8004F398 8FB10020 */ lw $s1, 0x20($sp) -/* AC653C 8004F39C 03E00008 */ jr $ra -/* AC6540 8004F3A0 27BD00E0 */ addiu $sp, $sp, 0xe0 diff --git a/asm/non_matchings/code/z_room/func_8009638C.s b/asm/non_matchings/code/z_room/func_8009638C.s deleted file mode 100644 index ea488ecb72..0000000000 --- a/asm/non_matchings/code/z_room/func_8009638C.s +++ /dev/null @@ -1,196 +0,0 @@ -glabel func_8009638C -/* B0D52C 8009638C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* B0D530 80096390 00057900 */ sll $t7, $a1, 4 -/* B0D534 80096394 000FC702 */ srl $t8, $t7, 0x1c -/* B0D538 80096398 0018C880 */ sll $t9, $t8, 2 -/* B0D53C 8009639C 3C098016 */ lui $t1, %hi(gSegments) -/* B0D540 800963A0 01394821 */ addu $t1, $t1, $t9 -/* B0D544 800963A4 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* B0D548 800963A8 8D296FA8 */ lw $t1, %lo(gSegments)($t1) -/* B0D54C 800963AC AFBF0014 */ sw $ra, 0x14($sp) -/* B0D550 800963B0 AFA40020 */ sw $a0, 0x20($sp) -/* B0D554 800963B4 AFA60028 */ sw $a2, 0x28($sp) -/* B0D558 800963B8 AFA7002C */ sw $a3, 0x2c($sp) -/* B0D55C 800963BC 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* B0D560 800963C0 8C820000 */ lw $v0, ($a0) -/* B0D564 800963C4 00A15024 */ and $t2, $a1, $at -/* B0D568 800963C8 3C018000 */ lui $at, 0x8000 -/* B0D56C 800963CC 012A2021 */ addu $a0, $t1, $t2 -/* B0D570 800963D0 00812021 */ addu $a0, $a0, $at -/* B0D574 800963D4 AFA50024 */ sw $a1, 0x24($sp) -/* B0D578 800963D8 0C02588E */ jal func_80096238 -/* B0D57C 800963DC AFA2001C */ sw $v0, 0x1c($sp) -/* B0D580 800963E0 8FA2001C */ lw $v0, 0x1c($sp) -/* B0D584 800963E4 3C0BDE01 */ lui $t3, 0xde01 -/* B0D588 800963E8 3C014080 */ li $at, 0x40800000 # 0.000000 -/* B0D58C 800963EC 24430008 */ addiu $v1, $v0, 8 -/* B0D590 800963F0 246C0028 */ addiu $t4, $v1, 0x28 -/* B0D594 800963F4 AC4C0004 */ sw $t4, 4($v0) -/* B0D598 800963F8 AC4B0000 */ sw $t3, ($v0) -/* B0D59C 800963FC 93A80037 */ lbu $t0, 0x37($sp) -/* B0D5A0 80096400 A4600000 */ sh $zero, ($v1) -/* B0D5A4 80096404 97A6002E */ lhu $a2, 0x2e($sp) -/* B0D5A8 80096408 44810000 */ mtc1 $at, $f0 -/* B0D5AC 8009640C 3409FFF4 */ li $t1, 65524 -/* B0D5B0 80096410 00063080 */ sll $a2, $a2, 2 -/* B0D5B4 80096414 A4660002 */ sh $a2, 2($v1) -/* B0D5B8 80096418 C7A40044 */ lwc1 $f4, 0x44($sp) -/* B0D5BC 8009641C A4600008 */ sh $zero, 8($v1) -/* B0D5C0 80096420 00602825 */ move $a1, $v1 -/* B0D5C4 80096424 46002182 */ mul.s $f6, $f4, $f0 -/* B0D5C8 80096428 24010002 */ li $at, 2 -/* B0D5CC 8009642C 24630028 */ addiu $v1, $v1, 0x28 -/* B0D5D0 80096430 24620008 */ addiu $v0, $v1, 8 -/* B0D5D4 80096434 3C0BFD10 */ lui $t3, 0xfd10 -/* B0D5D8 80096438 3C0DE800 */ lui $t5, 0xe800 -/* B0D5DC 8009643C 3C040700 */ lui $a0, 0x700 -/* B0D5E0 80096440 4600320D */ trunc.w.s $f8, $f6 -/* B0D5E4 80096444 3C0FE600 */ lui $t7, 0xe600 -/* B0D5E8 80096448 440E4000 */ mfc1 $t6, $f8 -/* B0D5EC 8009644C 00000000 */ nop -/* B0D5F0 80096450 A46EFFDC */ sh $t6, -0x24($v1) -/* B0D5F4 80096454 97A70032 */ lhu $a3, 0x32($sp) -/* B0D5F8 80096458 3C0EE700 */ lui $t6, 0xe700 -/* B0D5FC 8009645C 00073880 */ sll $a3, $a3, 2 -/* B0D600 80096460 A467FFE2 */ sh $a3, -0x1e($v1) -/* B0D604 80096464 C7AA0048 */ lwc1 $f10, 0x48($sp) -/* B0D608 80096468 46005402 */ mul.s $f16, $f10, $f0 -/* B0D60C 8009646C 4600848D */ trunc.w.s $f18, $f16 -/* B0D610 80096470 44189000 */ mfc1 $t8, $f18 -/* B0D614 80096474 00000000 */ nop -/* B0D618 80096478 A478FFE4 */ sh $t8, -0x1c($v1) -/* B0D61C 8009647C 8FB90024 */ lw $t9, 0x24($sp) -/* B0D620 80096480 A469FFEC */ sh $t1, -0x14($v1) -/* B0D624 80096484 A068FFEE */ sb $t0, -0x12($v1) -/* B0D628 80096488 AC79FFE8 */ sw $t9, -0x18($v1) -/* B0D62C 8009648C 93AA003B */ lbu $t2, 0x3b($sp) -/* B0D630 80096490 A460FFF0 */ sh $zero, -0x10($v1) -/* B0D634 80096494 A460FFF2 */ sh $zero, -0xe($v1) -/* B0D638 80096498 15010022 */ bne $t0, $at, .L80096524 -/* B0D63C 8009649C A06AFFEF */ sb $t2, -0x11($v1) -/* B0D640 800964A0 AC6B0000 */ sw $t3, ($v1) -/* B0D644 800964A4 8FAC0028 */ lw $t4, 0x28($sp) -/* B0D648 800964A8 3C0EF500 */ lui $t6, (0xF5000100 >> 16) # lui $t6, 0xf500 -/* B0D64C 800964AC 35CE0100 */ ori $t6, (0xF5000100 & 0xFFFF) # ori $t6, $t6, 0x100 -/* B0D650 800964B0 AC6C0004 */ sw $t4, 4($v1) -/* B0D654 800964B4 00401825 */ move $v1, $v0 -/* B0D658 800964B8 AC6D0000 */ sw $t5, ($v1) -/* B0D65C 800964BC AC600004 */ sw $zero, 4($v1) -/* B0D660 800964C0 24420008 */ addiu $v0, $v0, 8 -/* B0D664 800964C4 00401825 */ move $v1, $v0 -/* B0D668 800964C8 AC6E0000 */ sw $t6, ($v1) -/* B0D66C 800964CC AC640004 */ sw $a0, 4($v1) -/* B0D670 800964D0 24420008 */ addiu $v0, $v0, 8 -/* B0D674 800964D4 00401825 */ move $v1, $v0 -/* B0D678 800964D8 AC6F0000 */ sw $t7, ($v1) -/* B0D67C 800964DC AC600004 */ sw $zero, 4($v1) -/* B0D680 800964E0 24420008 */ addiu $v0, $v0, 8 -/* B0D684 800964E4 00401825 */ move $v1, $v0 -/* B0D688 800964E8 3C18F000 */ lui $t8, 0xf000 -/* B0D68C 800964EC AC780000 */ sw $t8, ($v1) -/* B0D690 800964F0 97B90042 */ lhu $t9, 0x42($sp) -/* B0D694 800964F4 24420008 */ addiu $v0, $v0, 8 -/* B0D698 800964F8 3C0DE700 */ lui $t5, 0xe700 -/* B0D69C 800964FC 2729FFFF */ addiu $t1, $t9, -1 -/* B0D6A0 80096500 312A03FF */ andi $t2, $t1, 0x3ff -/* B0D6A4 80096504 000A5B80 */ sll $t3, $t2, 0xe -/* B0D6A8 80096508 01646025 */ or $t4, $t3, $a0 -/* B0D6AC 8009650C AC6C0004 */ sw $t4, 4($v1) -/* B0D6B0 80096510 00401825 */ move $v1, $v0 -/* B0D6B4 80096514 AC6D0000 */ sw $t5, ($v1) -/* B0D6B8 80096518 AC600004 */ sw $zero, 4($v1) -/* B0D6BC 8009651C 10000005 */ b .L80096534 -/* B0D6C0 80096520 24420008 */ addiu $v0, $v0, 8 -.L80096524: -/* B0D6C4 80096524 24A30028 */ addiu $v1, $a1, 0x28 -/* B0D6C8 80096528 24620008 */ addiu $v0, $v1, 8 -/* B0D6CC 8009652C AC6E0000 */ sw $t6, ($v1) -/* B0D6D0 80096530 AC600004 */ sw $zero, 4($v1) -.L80096534: -/* B0D6D4 80096534 15000020 */ bnez $t0, .L800965B8 -/* B0D6D8 80096538 3C0F8016 */ lui $t7, %hi(gGameInfo) # $t7, 0x8016 -/* B0D6DC 8009653C 8DEFFA90 */ lw $t7, %lo(gGameInfo)($t7) -/* B0D6E0 80096540 00A02025 */ move $a0, $a1 -/* B0D6E4 80096544 85F80108 */ lh $t8, 0x108($t7) -/* B0D6E8 80096548 5700001C */ bnezl $t8, .L800965BC -/* B0D6EC 8009654C 94AE0008 */ lhu $t6, 8($a1) -/* B0D6F0 80096550 A4A60006 */ sh $a2, 6($a1) -/* B0D6F4 80096554 A4A7000E */ sh $a3, 0xe($a1) -/* B0D6F8 80096558 AFA50018 */ sw $a1, 0x18($sp) -/* B0D6FC 8009655C 0C0412C0 */ jal guS2DInitBg -/* B0D700 80096560 AFA2001C */ sw $v0, 0x1c($sp) -/* B0D704 80096564 97B9003E */ lhu $t9, 0x3e($sp) -/* B0D708 80096568 3C010020 */ lui $at, 0x20 -/* B0D70C 8009656C 8FA2001C */ lw $v0, 0x1c($sp) -/* B0D710 80096570 03214825 */ or $t1, $t9, $at -/* B0D714 80096574 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* B0D718 80096578 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* B0D71C 8009657C 01215024 */ and $t2, $t1, $at -/* B0D720 80096580 00401825 */ move $v1, $v0 -/* B0D724 80096584 8FA50018 */ lw $a1, 0x18($sp) -/* B0D728 80096588 3C01EF00 */ lui $at, 0xef00 -/* B0D72C 8009658C 01415825 */ or $t3, $t2, $at -/* B0D730 80096590 240C0001 */ li $t4, 1 -/* B0D734 80096594 AC6C0004 */ sw $t4, 4($v1) -/* B0D738 80096598 AC6B0000 */ sw $t3, ($v1) -/* B0D73C 8009659C 24420008 */ addiu $v0, $v0, 8 -/* B0D740 800965A0 00401825 */ move $v1, $v0 -/* B0D744 800965A4 3C0D0A00 */ lui $t5, 0xa00 -/* B0D748 800965A8 AC6D0000 */ sw $t5, ($v1) -/* B0D74C 800965AC 24420008 */ addiu $v0, $v0, 8 -/* B0D750 800965B0 10000028 */ b .L80096654 -/* B0D754 800965B4 AC650004 */ sw $a1, 4($v1) -.L800965B8: -/* B0D758 800965B8 94AE0008 */ lhu $t6, 8($a1) -.L800965BC: -/* B0D75C 800965BC 24030400 */ li $v1, 1024 -/* B0D760 800965C0 A4A60006 */ sh $a2, 6($a1) -/* B0D764 800965C4 A4A7000E */ sh $a3, 0xe($a1) -/* B0D768 800965C8 A4A3001C */ sh $v1, 0x1c($a1) -/* B0D76C 800965CC A4A3001E */ sh $v1, 0x1e($a1) -/* B0D770 800965D0 ACAE0020 */ sw $t6, 0x20($a1) -/* B0D774 800965D4 97B9003E */ lhu $t9, 0x3e($sp) -/* B0D778 800965D8 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* B0D77C 800965DC 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* B0D780 800965E0 37290CF0 */ ori $t1, $t9, 0xcf0 -/* B0D784 800965E4 01215024 */ and $t2, $t1, $at -/* B0D788 800965E8 00401825 */ move $v1, $v0 -/* B0D78C 800965EC 3C01EF00 */ lui $at, 0xef00 -/* B0D790 800965F0 3C0C00A0 */ lui $t4, (0x00A03009 >> 16) # lui $t4, 0xa0 -/* B0D794 800965F4 358C3009 */ ori $t4, (0x00A03009 & 0xFFFF) # ori $t4, $t4, 0x3009 -/* B0D798 800965F8 01415825 */ or $t3, $t2, $at -/* B0D79C 800965FC AC6B0000 */ sw $t3, ($v1) -/* B0D7A0 80096600 AC6C0004 */ sw $t4, 4($v1) -/* B0D7A4 80096604 24420008 */ addiu $v0, $v0, 8 -/* B0D7A8 80096608 00401825 */ move $v1, $v0 -/* B0D7AC 8009660C 3C0EFFFC */ lui $t6, (0xFFFCFC7E >> 16) # lui $t6, 0xfffc -/* B0D7B0 80096610 3C0DFCFF */ lui $t5, (0xFCFFFFFF >> 16) # lui $t5, 0xfcff -/* B0D7B4 80096614 35ADFFFF */ ori $t5, (0xFCFFFFFF & 0xFFFF) # ori $t5, $t5, 0xffff -/* B0D7B8 80096618 35CEFC7E */ ori $t6, (0xFFFCFC7E & 0xFFFF) # ori $t6, $t6, 0xfc7e -/* B0D7BC 8009661C AC6E0004 */ sw $t6, 4($v1) -/* B0D7C0 80096620 AC6D0000 */ sw $t5, ($v1) -/* B0D7C4 80096624 24420008 */ addiu $v0, $v0, 8 -/* B0D7C8 80096628 00401825 */ move $v1, $v0 -/* B0D7CC 8009662C 3C0F0B00 */ lui $t7, 0xb00 -/* B0D7D0 80096630 2418000C */ li $t8, 12 -/* B0D7D4 80096634 AC780004 */ sw $t8, 4($v1) -/* B0D7D8 80096638 AC6F0000 */ sw $t7, ($v1) -/* B0D7DC 8009663C 24420008 */ addiu $v0, $v0, 8 -/* B0D7E0 80096640 00401825 */ move $v1, $v0 -/* B0D7E4 80096644 3C190900 */ lui $t9, 0x900 -/* B0D7E8 80096648 AC790000 */ sw $t9, ($v1) -/* B0D7EC 8009664C AC650004 */ sw $a1, 4($v1) -/* B0D7F0 80096650 24420008 */ addiu $v0, $v0, 8 -.L80096654: -/* B0D7F4 80096654 00401825 */ move $v1, $v0 -/* B0D7F8 80096658 3C09E700 */ lui $t1, 0xe700 -/* B0D7FC 8009665C AC690000 */ sw $t1, ($v1) -/* B0D800 80096660 AC600004 */ sw $zero, 4($v1) -/* B0D804 80096664 8FAA0020 */ lw $t2, 0x20($sp) -/* B0D808 80096668 24420008 */ addiu $v0, $v0, 8 -/* B0D80C 8009666C AD420000 */ sw $v0, ($t2) -/* B0D810 80096670 8FBF0014 */ lw $ra, 0x14($sp) -/* B0D814 80096674 27BD0020 */ addiu $sp, $sp, 0x20 -/* B0D818 80096678 03E00008 */ jr $ra -/* B0D81C 8009667C 00000000 */ nop - diff --git a/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B53980.s b/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B53980.s deleted file mode 100644 index f65c2a92a2..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B53980.s +++ /dev/null @@ -1,141 +0,0 @@ -.late_rodata -glabel D_80B5AACC - .word 0xC62BE000 - -.text -glabel func_80B53980 -/* 005D0 80B53980 AFA50004 */ sw $a1, 0x0004($sp) -/* 005D4 80B53984 8C8E02FC */ lw $t6, 0x02FC($a0) ## 000002FC -/* 005D8 80B53988 00052C00 */ sll $a1, $a1, 16 -/* 005DC 80B5398C 00052C03 */ sra $a1, $a1, 16 -/* 005E0 80B53990 11C00070 */ beq $t6, $zero, .L80B53B54 -/* 005E4 80B53994 8C82024C */ lw $v0, 0x024C($a0) ## 0000024C -/* 005E8 80B53998 00067840 */ sll $t7, $a2, 1 -/* 005EC 80B5399C 008F4821 */ addu $t1, $a0, $t7 -/* 005F0 80B539A0 853902BC */ lh $t9, 0x02BC($t1) ## 000002BC -/* 005F4 80B539A4 8538028C */ lh $t8, 0x028C($t1) ## 0000028C -/* 005F8 80B539A8 852A025C */ lh $t2, 0x025C($t1) ## 0000025C -/* 005FC 80B539AC 00B94023 */ subu $t0, $a1, $t9 -/* 00600 80B539B0 44882000 */ mtc1 $t0, $f4 ## $f4 = 0.00 -/* 00604 80B539B4 34018001 */ ori $at, $zero, 0x8001 ## $at = 00008001 -/* 00608 80B539B8 03053821 */ addu $a3, $t8, $a1 -/* 0060C 80B539BC 46802020 */ cvt.s.w $f0, $f4 -/* 00610 80B539C0 00073C00 */ sll $a3, $a3, 16 -/* 00614 80B539C4 00073C03 */ sra $a3, $a3, 16 -/* 00618 80B539C8 01401825 */ or $v1, $t2, $zero ## $v1 = 00000000 -/* 0061C 80B539CC 46000005 */ abs.s $f0, $f0 -/* 00620 80B539D0 4600018D */ trunc.w.s $f6, $f0 -/* 00624 80B539D4 440C3000 */ mfc1 $t4, $f6 -/* 00628 80B539D8 00000000 */ nop -/* 0062C 80B539DC 0181082A */ slt $at, $t4, $at -/* 00630 80B539E0 14200007 */ bne $at, $zero, .L80B53A00 -/* 00634 80B539E4 00000000 */ nop -/* 00638 80B539E8 18A00004 */ blez $a1, .L80B539FC -/* 0063C 80B539EC 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00640 80B539F0 3C01FFFF */ lui $at, 0xFFFF ## $at = FFFF0000 -/* 00644 80B539F4 10000002 */ beq $zero, $zero, .L80B53A00 -/* 00648 80B539F8 01014021 */ addu $t0, $t0, $at -.L80B539FC: -/* 0064C 80B539FC 01014021 */ addu $t0, $t0, $at -.L80B53A00: -/* 00650 80B53A00 14C00003 */ bne $a2, $zero, .L80B53A10 -/* 00654 80B53A04 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004 -/* 00658 80B53A08 10410008 */ beq $v0, $at, .L80B53A2C -/* 0065C 80B53A0C 00000000 */ nop -.L80B53A10: -/* 00660 80B53A10 11000006 */ beq $t0, $zero, .L80B53A2C -/* 00664 80B53A14 01036823 */ subu $t5, $t0, $v1 -/* 00668 80B53A18 05A10003 */ bgez $t5, .L80B53A28 -/* 0066C 80B53A1C 000D7103 */ sra $t6, $t5, 4 -/* 00670 80B53A20 25A1000F */ addiu $at, $t5, 0x000F ## $at = 0000000F -/* 00674 80B53A24 00017103 */ sra $t6, $at, 4 -.L80B53A28: -/* 00678 80B53A28 006E1821 */ addu $v1, $v1, $t6 -.L80B53A2C: -/* 0067C 80B53A2C 10600006 */ beq $v1, $zero, .L80B53A48 -/* 00680 80B53A30 00E54023 */ subu $t0, $a3, $a1 -/* 00684 80B53A34 2401000A */ addiu $at, $zero, 0x000A ## $at = 0000000A -/* 00688 80B53A38 0061001A */ div $zero, $v1, $at -/* 0068C 80B53A3C 00007812 */ mflo $t7 -/* 00690 80B53A40 006F1823 */ subu $v1, $v1, $t7 -/* 00694 80B53A44 00000000 */ nop -.L80B53A48: -/* 00698 80B53A48 00084400 */ sll $t0, $t0, 16 -/* 0069C 80B53A4C 00084403 */ sra $t0, $t0, 16 -/* 006A0 80B53A50 11000005 */ beq $t0, $zero, .L80B53A68 -/* 006A4 80B53A54 24010032 */ addiu $at, $zero, 0x0032 ## $at = 00000032 -/* 006A8 80B53A58 0101001A */ div $zero, $t0, $at -/* 006AC 80B53A5C 0000C012 */ mflo $t8 -/* 006B0 80B53A60 00781823 */ subu $v1, $v1, $t8 -/* 006B4 80B53A64 00000000 */ nop -.L80B53A68: -/* 006B8 80B53A68 01430019 */ multu $t2, $v1 -/* 006BC 80B53A6C 00E33821 */ addu $a3, $a3, $v1 -/* 006C0 80B53A70 00E54023 */ subu $t0, $a3, $a1 -/* 006C4 80B53A74 00084400 */ sll $t0, $t0, 16 -/* 006C8 80B53A78 00084403 */ sra $t0, $t0, 16 -/* 006CC 80B53A7C 2901FF9D */ slti $at, $t0, 0xFF9D -/* 006D0 80B53A80 0000C812 */ mflo $t9 -/* 006D4 80B53A84 1F200007 */ bgtz $t9, .L80B53AA4 -/* 006D8 80B53A88 00000000 */ nop -/* 006DC 80B53A8C 14200005 */ bne $at, $zero, .L80B53AA4 -/* 006E0 80B53A90 29010064 */ slti $at, $t0, 0x0064 -/* 006E4 80B53A94 10200003 */ beq $at, $zero, .L80B53AA4 -/* 006E8 80B53A98 00000000 */ nop -/* 006EC 80B53A9C 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000 -/* 006F0 80B53AA0 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000 -.L80B53AA4: -/* 006F4 80B53AA4 14C00028 */ bne $a2, $zero, .L80B53B48 -/* 006F8 80B53AA8 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003 -/* 006FC 80B53AAC 14410026 */ bne $v0, $at, .L80B53B48 -/* 00700 80B53AB0 2488014C */ addiu $t0, $a0, 0x014C ## $t0 = 0000014C -/* 00704 80B53AB4 910B0001 */ lbu $t3, 0x0001($t0) ## 0000014D -/* 00708 80B53AB8 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002 -/* 0070C 80B53ABC 24A2D508 */ addiu $v0, $a1, 0xD508 ## $v0 = FFFFD508 -/* 00710 80B53AC0 55610018 */ bnel $t3, $at, .L80B53B24 -/* 00714 80B53AC4 00E2082A */ slt $at, $a3, $v0 -/* 00718 80B53AC8 C5000018 */ lwc1 $f0, 0x0018($t0) ## 00000164 -/* 0071C 80B53ACC C48203DC */ lwc1 $f2, 0x03DC($a0) ## 000003DC -/* 00720 80B53AD0 3C0180B6 */ lui $at, %hi(D_80B5AACC) ## $at = 80B60000 -/* 00724 80B53AD4 C42AAACC */ lwc1 $f10, %lo(D_80B5AACC)($at) -/* 00728 80B53AD8 46020203 */ div.s $f8, $f0, $f2 -/* 0072C 80B53ADC 460A4402 */ mul.s $f16, $f8, $f10 -/* 00730 80B53AE0 4600848D */ trunc.w.s $f18, $f16 -/* 00734 80B53AE4 440D9000 */ mfc1 $t5, $f18 -/* 00738 80B53AE8 00000000 */ nop -/* 0073C 80B53AEC 01A51021 */ addu $v0, $t5, $a1 -/* 00740 80B53AF0 00E2082A */ slt $at, $a3, $v0 -/* 00744 80B53AF4 54200015 */ bnel $at, $zero, .L80B53B4C -/* 00748 80B53AF8 00E57023 */ subu $t6, $a3, $a1 -/* 0074C 80B53AFC 18600012 */ blez $v1, .L80B53B48 -/* 00750 80B53B00 00403825 */ or $a3, $v0, $zero ## $a3 = FFFFD508 -/* 00754 80B53B04 04610002 */ bgez $v1, .L80B53B10 -/* 00758 80B53B08 00600821 */ addu $at, $v1, $zero -/* 0075C 80B53B0C 24610001 */ addiu $at, $v1, 0x0001 ## $at = 00000001 -.L80B53B10: -/* 00760 80B53B10 00011843 */ sra $v1, $at, 1 -/* 00764 80B53B14 00031823 */ subu $v1, $zero, $v1 -/* 00768 80B53B18 1000000C */ beq $zero, $zero, .L80B53B4C -/* 0076C 80B53B1C 00E57023 */ subu $t6, $a3, $a1 -/* 00770 80B53B20 00E2082A */ slt $at, $a3, $v0 -.L80B53B24: -/* 00774 80B53B24 54200009 */ bnel $at, $zero, .L80B53B4C -/* 00778 80B53B28 00E57023 */ subu $t6, $a3, $a1 -/* 0077C 80B53B2C 18600006 */ blez $v1, .L80B53B48 -/* 00780 80B53B30 00403825 */ or $a3, $v0, $zero ## $a3 = FFFFD508 -/* 00784 80B53B34 04610002 */ bgez $v1, .L80B53B40 -/* 00788 80B53B38 00600821 */ addu $at, $v1, $zero -/* 0078C 80B53B3C 24610001 */ addiu $at, $v1, 0x0001 ## $at = 00000001 -.L80B53B40: -/* 00790 80B53B40 00011843 */ sra $v1, $at, 1 -/* 00794 80B53B44 00031823 */ subu $v1, $zero, $v1 -.L80B53B48: -/* 00798 80B53B48 00E57023 */ subu $t6, $a3, $a1 -.L80B53B4C: -/* 0079C 80B53B4C A523025C */ sh $v1, 0x025C($t1) ## 0000025C -/* 007A0 80B53B50 A52E028C */ sh $t6, 0x028C($t1) ## 0000028C -.L80B53B54: -/* 007A4 80B53B54 00067840 */ sll $t7, $a2, 1 -/* 007A8 80B53B58 008FC021 */ addu $t8, $a0, $t7 -/* 007AC 80B53B5C 03E00008 */ jr $ra -/* 007B0 80B53B60 A70502BC */ sh $a1, 0x02BC($t8) ## 000002BC diff --git a/include/z64math.h b/include/z64math.h index 76600d7e17..3d468593de 100644 --- a/include/z64math.h +++ b/include/z64math.h @@ -95,7 +95,7 @@ typedef struct { /** * Trig macros */ -#define DEGF_TO_BINANG(degreesf) (s16)(degreesf * 182.04167f + 0.5f) +#define DEGF_TO_BINANG(degreesf) (s16)(degreesf * 182.04167f + .5f) #define RADF_TO_DEGF(radf) (radf * (180.0f / M_PI)) #define DEGF_TO_RADF(degf) (degf * (M_PI / 180.0f)) #define BINANG_ROT180(angle) ((s16)(angle - 0x7FFF)) diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 2a7d058d35..b0db5de019 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -2888,7 +2888,7 @@ s32 Camera_Battle1(Camera* camera) { if (!skipEyeAtCalc) { var3 = atToTargetDir.pitch * batt1->swingPitchAdj; var2 = F32_LERPIMP(sp7C, sp78, distRatio); - tmpAng1 = DEGF_TO_BINANG(var2) - (s16)(playerToTargetDir.pitch * (.5f + distRatio * (1.0f - .5f))); + tmpAng1 = DEGF_TO_BINANG(var2) - (s16)(playerToTargetDir.pitch * (0.5f + distRatio * (1.0f - 0.5f))); tmpAng1 += (s16)(var3); if (tmpAng1 < -0x2AA8) { @@ -3209,7 +3209,7 @@ s32 Camera_KeepOn1(Camera* camera) { if (sp88 == 0) { spE2 = DEGF_TO_BINANG((f32)(keep1->unk_14 + ((keep1->unk_18 - keep1->unk_14) * sp84))); - spE2 -= (s16)(spC8.pitch * (.5f + (sp84 * .5f))); + spE2 -= (s16)(spC8.pitch * (0.5f + (sp84 * 0.5f))); spE8 = spD0.pitch * keep1->unk_1C; spE2 += (s16)spE8; @@ -3439,7 +3439,6 @@ s32 Camera_KeepOn3(Camera* camera) { return 1; } -#ifdef NON_MATCHING s32 Camera_KeepOn4(Camera* camera) { static Vec3f D_8015BD50; static Vec3f D_8015BD60; @@ -3477,15 +3476,15 @@ s32 Camera_KeepOn4(Camera* camera) { camera->globalCtx->view.unk_124 = camera->thisIdx | 0x50; return 1; } - camera->unk_14C &= ~0x20; unk20->unk_14 = *temp_s0; + camera->unk_14C &= ~0x20; } if (unk20->unk_14 != *temp_s0) { osSyncPrintf(VT_COL(YELLOW, BLACK) "camera: item: item type changed %d -> %d\n" VT_RST, unk20->unk_14, *temp_s0); - camera->unk_14C |= 0x20; camera->animState = 0x14; + camera->unk_14C |= 0x20; camera->unk_14C &= ~(0x4 | 0x2); camera->globalCtx->view.unk_124 = camera->thisIdx | 0x50; return 1; @@ -3631,6 +3630,7 @@ s32 Camera_KeepOn4(Camera* camera) { spA0 = DEGF_TO_BINANG(keep4->unk_0C); } else if ((keep4->unk_1C & 8) && camera->target != NULL) { PosRot sp60; + func_8002EF44(&sp60, camera->target); spA2 = DEGF_TO_BINANG(keep4->unk_08) - sp60.rot.x; spA0 = BINANG_SUB(BINANG_ROT180(sp60.rot.y), spA8.yaw) > 0 @@ -3640,13 +3640,12 @@ s32 Camera_KeepOn4(Camera* camera) { sp9C++; } else if ((keep4->unk_1C & 0x80) && camera->target != NULL) { PosRot sp4C; + func_8002EF14(&sp4C, camera->target); - spA2 = ((s16)((keep4->unk_08) * (182.04167f) + .5f)); - if (1) { - sp9E = Camera_XZAngle(&sp4C.pos, &playerPosRot->pos); - spA0 = (BINANG_SUB(sp9E, spA8.yaw) > 0) ? sp9E + ((s16)((keep4->unk_0C) * (182.04167f) + .5f)) - : sp9E - ((s16)((keep4->unk_0C) * (182.04167f) + .5f)); - } + spA2 = DEGF_TO_BINANG(keep4->unk_08); + sp9E = Camera_XZAngle(&sp4C.pos, &playerPosRot->pos); + spA0 = (BINANG_SUB(sp9E, spA8.yaw) > 0) ? sp9E + DEGF_TO_BINANG(keep4->unk_0C) + : sp9E - DEGF_TO_BINANG(keep4->unk_0C); spCC[1] = camera->target; sp9C++; } else if (keep4->unk_1C & 0x40) { @@ -3675,8 +3674,7 @@ s32 Camera_KeepOn4(Camera* camera) { } osSyncPrintf("camera: item: BG&collision check %d time(s)\n", i); } - temp_f0_2 = BINANG_SUB(spB8.pitch, spA8.pitch) / (f32)unk20->unk_10; - unk20->unk_04 = temp_f0_2; + unk20->unk_04 = BINANG_SUB(spB8.pitch, spA8.pitch) / (f32)unk20->unk_10; unk20->unk_00 = BINANG_SUB(spB8.yaw, spA8.yaw) / (f32)unk20->unk_10; unk20->unk_0C = spA8.yaw; unk20->unk_0E = spA8.pitch; @@ -3699,7 +3697,8 @@ s32 Camera_KeepOn4(Camera* camera) { Camera_Vec3fVecSphGeoAdd(at, at, &spB8); } camera->atLERPStepScale = 0.0f; - spB8.r = camera->dist = Camera_LERPCeilF(keep4->unk_04, camera->dist, 0.25f, 2.0f); + camera->dist = Camera_LERPCeilF(keep4->unk_04, camera->dist, 0.25f, 2.0f); + spB8.r = camera->dist; if (unk20->unk_10 != 0) { camera->unk_14C |= 0x20; unk20->unk_0C += (s16)unk20->unk_00; @@ -3734,12 +3733,6 @@ s32 Camera_KeepOn4(Camera* camera) { camera->fov = Camera_LERPCeilF(keep4->unk_18, camera->fov, camera->fovUpdateRate, 1.0f); camera->roll = Camera_LERPCeilS(0, camera->roll, 0.5f, 0xA); } -#else -Vec3f D_8015BD50; -Vec3f D_8015BD60; -Vec3f D_8015BD70; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_KeepOn4.s") -#endif /** * Talking in a pre-rendered room @@ -6983,31 +6976,25 @@ s16 Camera_ChangeStatus(Camera* camera, s16 status) { } #ifdef NON_MATCHING +// Lots of saved register problems. Probably equivalent, but not certain. void Camera_PrintSettings(Camera* camera) { char sp58[8]; char sp50[8]; char sp48[8]; - s16 temp_v0; - s32 temp_v0_2; - s8* temp_t6; - s8* temp_t7; - s8* temp_t8; - s8* temp_t9; - Camera* temp_a0; - s32 phi_a1; char* phi_v1; char* phi_t0; - s32 phi_v0; - s32 phi_v0_2; + s32 phi_a1; - if (OREG(0) & 1 && camera->thisIdx == camera->globalCtx->activeCamera && !gDbgCamEnabled) { - for (phi_a1 = 0, phi_v1 = sp58, phi_t0 = sp48; phi_v1 < &sp58[4]; phi_v1++, phi_t0++, phi_a1++) { - temp_a0 = camera->globalCtx->cameraPtrs[phi_a1]; - if (temp_a0 == NULL) { + if ((OREG(0) & 1) && (camera->thisIdx == camera->globalCtx->activeCamera) && !gDbgCamEnabled) { + phi_a1 = 0; + phi_v1 = sp58; + phi_t0 = sp48; + for (; phi_v1 < sp58 + 4; phi_v1++, phi_t0++, phi_a1++) { + if (camera->globalCtx->cameraPtrs[phi_a1] == NULL) { *phi_v1 = '-'; *phi_t0 = ' '; } else { - switch (temp_a0->status) { + switch (camera->globalCtx->cameraPtrs[phi_a1]->status) { case 0: *phi_v1 = 'c'; *phi_t0 = ' '; @@ -7035,8 +7022,8 @@ void Camera_PrintSettings(Camera* camera) { } } } - *phi_v1++ = '\0'; - *phi_t0++ = '\0'; + *phi_v1 = '\0'; + *phi_t0 = '\0'; sp48[camera->globalCtx->activeCamera] = 'a'; func_8006376C(3, 0x16, 5, sp58); @@ -7049,20 +7036,19 @@ void Camera_PrintSettings(Camera* camera) { func_8006376C(5, 0x19, 4, sCameraFunctionNames[sCameraSettings[camera->setting].cameraModes[camera->mode].funcIdx]); - phi_v0 = 0; + phi_a1 = 0; if (camera->camDataIdx < 0) { - sp50[phi_v0++] = '-'; - } - phi_v0_2 = camera->camDataIdx / 0xA; - if (phi_v0_2 != 0) { - sp50[phi_v0++] = phi_v0 / 0xA + '0'; - } - sp50[phi_v0++] = phi_v0 % 10 + '0'; - sp50[phi_v0++] = ' '; - sp50[phi_v0++] = ' '; - sp50[phi_v0++] = ' '; - sp50[phi_v0++] = ' '; - sp50[phi_v0] = '\0'; + sp50[phi_a1++] = '-'; + } + if (camera->camDataIdx / 0xA != 0) { + sp50[phi_a1++] = phi_a1 / 0xA + '0'; + } + sp50[phi_a1++] = phi_a1 % 10 + '0'; + sp50[phi_a1++] = ' '; + sp50[phi_a1++] = ' '; + sp50[phi_a1++] = ' '; + sp50[phi_a1++] = ' '; + sp50[phi_a1] = '\0'; func_8006376C(3, 26, 5, "I:"); func_8006376C(5, 26, 4, sp50); } diff --git a/src/code/z_room.c b/src/code/z_room.c index e5a61ca714..ca0d6dbbd1 100644 --- a/src/code/z_room.c +++ b/src/code/z_room.c @@ -81,13 +81,13 @@ typedef struct struct_80095D04 { // Room Draw Polygon Type 2 #ifdef NON_MATCHING -// this function still needs some work but it should be functionally equivalent +// Saved register problems and ordering issues, but definitely equivalent. void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { PolygonType2* polygon2; PolygonDlist2* polygonDlist; struct_80095D04 spB8[SHAPE_SORT_MAX]; - struct_80095D04* spB4; - struct_80095D04* spB0; + struct_80095D04* spB4 = NULL; + struct_80095D04* spB0 = NULL; struct_80095D04* phi_v0; struct_80095D04* phi_a0; struct_80095D04* spA4; @@ -98,21 +98,18 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { f32 sp80; PolygonDlist2* phi_s0; PolygonDlist2* sp78; - f32 temp_f0; + PolygonDlist2* temp; f32 temp_f2; - spB0 = NULL; - spB4 = NULL; - OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 287); - if (flags & 1) { func_800342EC(&D_801270A0, globalCtx); gSPSegment(POLY_OPA_DISP++, 0x03, room->segment); func_80093C80(globalCtx); gSPMatrix(POLY_OPA_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); } - + if (1) {} + if (1) {} if (flags & 2) { func_8003435C(&D_801270A0, globalCtx); gSPSegment(POLY_XLU_DISP++, 0x03, room->segment); @@ -120,31 +117,29 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); } - spA4 = &spB8[0]; - polygonDlist = SEGMENTED_TO_VIRTUAL(room->mesh->polygon2.start); polygon2 = &room->mesh->polygon2; + polygonDlist = SEGMENTED_TO_VIRTUAL(polygon2->start); + spA4 = spB8; + if (polygon2->num > SHAPE_SORT_MAX) { __assert("polygon2->num <= SHAPE_SORT_MAX", "../z_room.c", 317); } - sp78 = polygonDlist; - for (sp9C = 0; sp9C < polygon2->num; sp9C++) { + + for (sp9C = 0; sp9C < polygon2->num; sp9C++, polygonDlist++) { sp90.x = polygonDlist->pos.x; sp90.y = polygonDlist->pos.y; sp90.z = polygonDlist->pos.z; SkinMatrix_Vec3fMtxFMultXYZW(&globalCtx->mf_11D60, &sp90, &sp84, &sp80); - temp_f0 = polygonDlist->unk_06; - if (-temp_f0 < sp84.z) { - temp_f2 = sp84.z - temp_f0; + if (-(f32)polygonDlist->unk_06 < sp84.z) { + temp_f2 = sp84.z - polygonDlist->unk_06; if (temp_f2 < globalCtx->lightCtx.unk_0C) { + phi_v0 = spB4; spA4->unk_00 = polygonDlist; spA4->unk_04 = temp_f2; - phi_v0 = spB4; - if (spB4 == 0) { - spB0 = spA4; - spB4 = spA4; - spA4->unk_0C = NULL; - spA4->unk_08 = NULL; + if (phi_v0 == NULL) { + spB4 = spB0 = spA4; + spA4->unk_08 = spA4->unk_0C = NULL; } else { do { if (spA4->unk_04 < phi_v0->unk_04) { @@ -159,59 +154,65 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) { spB0->unk_0C = spA4; spB0 = spA4; } else { - phi_a0 = phi_v0->unk_08; - spA4->unk_08 = phi_a0; - if (phi_a0 == NULL) { + spA4->unk_08 = phi_v0->unk_08; + if (spA4->unk_08 == NULL) { spB4 = spA4; } else { - phi_a0->unk_0C = spA4; + spA4->unk_08->unk_0C = spA4; } phi_v0->unk_08 = spA4; - spA4->unk_0C = (void*)phi_v0; + spA4->unk_0C = phi_v0; } } - spA4 = spA4++; + spA4++; } } - polygonDlist++; } iREG(87) = polygon2->num; - sp9C = 1; - while (spB4 != NULL) { + for (sp9C = 1; spB4 != NULL; spB4 = spB4->unk_0C, sp9C++) { + Gfx* temp2; + phi_s0 = spB4->unk_00; if (iREG(86) != 0) { - phi_v1 = 0; - while (phi_v1 < polygon2->num) { - if (phi_s0 == sp78) { - break; + temp = sp78; + for (phi_v1 = 0; phi_v1 < polygon2->num; phi_v1++, temp++) { + if (phi_s0 == temp) { + break; // This loop does nothing? } - phi_v1++; - sp78++; } - if (((iREG(86) == 1) && (iREG(89) > sp9C)) || ((iREG(86) == 2) && (iREG(89) == sp9C))) { - if ((flags & 1) && (phi_s0->opa != NULL)) { - gSPDisplayList(POLY_OPA_DISP++, phi_s0->opa); + if (((iREG(86) == 1) && (iREG(89) >= sp9C)) || ((iREG(86) == 2) && (iREG(89) == sp9C))) { + if (flags & 1) { + temp2 = phi_s0->opa; + if (temp2 != NULL) { + gSPDisplayList(POLY_OPA_DISP++, temp2); + } } - if ((flags & 2) && (phi_s0->xlu != NULL)) { - gSPDisplayList(POLY_XLU_DISP++, phi_s0->xlu); + if (flags & 2) { + temp2 = phi_s0->xlu; + if (temp2 != NULL) { + gSPDisplayList(POLY_XLU_DISP++, temp2); + } } } } else { - if ((flags & 1) && (phi_s0->opa != NULL)) { - gSPDisplayList(POLY_OPA_DISP++, phi_s0->opa); + if (flags & 1) { + temp2 = phi_s0->opa; + if (temp2 != NULL) { + gSPDisplayList(POLY_OPA_DISP++, temp2); + } } - if ((flags & 2) && (phi_s0->xlu != NULL)) { - gSPDisplayList(POLY_XLU_DISP++, phi_s0->xlu); + if (flags & 2) { + temp2 = phi_s0->xlu; + if (temp2 != NULL) { + gSPDisplayList(POLY_XLU_DISP++, temp2); + } } } - - spB4 = spB4->unk_0C; - sp9C++; } iREG(88) = sp9C - 1; @@ -256,19 +257,17 @@ s32 func_80096238(void* data) { return 0; } -#ifdef NON_MATCHING -// pointer arithmetic doesn't quite match void func_8009638C(Gfx** displayList, u32 source, u32 tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 mode0, u16 tlutCount, f32 frameX, f32 frameY) { Gfx* displayListHead; uObjBg* bg; + s32 temp; displayListHead = *displayList; func_80096238(SEGMENTED_TO_VIRTUAL(source)); - displayListHead++; - gSPBranchList(displayListHead, (u8*)displayListHead + sizeof(uObjBg)); - bg = (void*)displayListHead; + bg = displayListHead + 1; + gSPBranchList(displayListHead, (u8*)bg + sizeof(uObjBg)); bg->b.imageX = 0; bg->b.imageW = width * 4; bg->b.frameX = frameX * 4; @@ -282,11 +281,10 @@ void func_8009638C(Gfx** displayList, u32 source, u32 tlut, u16 width, u16 heigh bg->b.imagePal = 0; bg->b.imageFlip = 0; + displayListHead = (void*)(bg + 1); if (fmt == G_IM_FMT_CI) { - displayListHead = (void*)(bg + 1); gDPLoadTLUT(displayListHead++, tlutCount, 256, tlut); } else { - displayListHead = (void*)(bg + 1); gDPPipeSync(displayListHead++); } @@ -297,13 +295,17 @@ void func_8009638C(Gfx** displayList, u32 source, u32 tlut, u16 width, u16 heigh gDPSetOtherMode(displayListHead++, mode0 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_COPY | G_PM_NPRIMITIVE, G_AC_THRESHOLD | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2); gSPBgRectCopy(displayListHead++, bg); + } else { bg->s.frameW = width * 4; bg->s.frameH = height * 4; bg->s.scaleW = 1024; bg->s.scaleH = 1024; bg->s.imageYorig = bg->b.imageY; - gDPSetOtherMode(displayListHead++, mode0 | G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, + if (1) {} + gDPSetOtherMode(displayListHead++, + mode0 | G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_POINT | G_TT_NONE | + G_TL_TILE | G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_THRESHOLD | G_ZS_PIXEL | AA_EN | CVG_DST_CLAMP | ZMODE_OPA | CVG_X_ALPHA | ALPHA_CVG_SEL | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_BL, G_BL_1MA) | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_BL, G_BL_1MA)); @@ -315,11 +317,6 @@ void func_8009638C(Gfx** displayList, u32 source, u32 tlut, u16 width, u16 heigh gDPPipeSync(displayListHead++); *displayList = displayListHead; } -#else -void func_8009638C(Gfx** displayList, u32 source, u32 tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 mode0, - u16 tlutCount, f32 frameX, f32 frameY); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_room/func_8009638C.s") -#endif // Room Draw Polygon Type 1 - Single Format void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) { @@ -495,7 +492,7 @@ void func_80096FD4(GlobalContext* globalCtx, Room* room) { } #ifdef NON_MATCHING -// regalloc differences +// regalloc differences near the end u32 func_80096FE8(GlobalContext* globalCtx, RoomContext* roomCtx) { u8 nextRoomNum; u32 maxRoomSize = 0; @@ -512,7 +509,7 @@ u32 func_80096FE8(GlobalContext* globalCtx, RoomContext* roomCtx) { } if (globalCtx->nbTransitionActors != 0) { - s32 j = 0; + s32 j; RomFile* roomList = globalCtx->roomList; TransitionActorEntry* transitionActor = &globalCtx->transitionActorList[0]; @@ -547,11 +544,8 @@ u32 func_80096FE8(GlobalContext* globalCtx, RoomContext* roomCtx) { roomCtx->unk_30 = 0; roomCtx->status = 0; - if (gSaveContext.respawnFlag > 0) { - nextRoomNum = gSaveContext.respawn[gSaveContext.respawnFlag - 1].roomIndex; - } else { - nextRoomNum = globalCtx->setupEntranceList[globalCtx->curSpawn].room; - } + nextRoomNum = (gSaveContext.respawnFlag - 1 >= 0) ? gSaveContext.respawn[gSaveContext.respawnFlag - 1].roomIndex + : globalCtx->setupEntranceList[globalCtx->curSpawn].room; func_8009728C(globalCtx, roomCtx, nextRoomNum); return maxRoomSize; diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 9fb7185221..57d60d2ded 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -542,6 +542,7 @@ void func_80ADA35C(EnPoSisters* this, GlobalContext* globalCtx) { if (this->unk_196 != 0) { this->unk_196--; } + this->actor.posRot.pos.y += (2.0f + 0.5f * Math_Rand_ZeroOne()) * Math_Sins(this->unk_196 * 0x800); if (this->unk_22E.a == 255 && this->actionFunc != func_80ADA8C0 && this->actionFunc != func_80ADA7F0) { if (this->actionFunc == func_80ADAC70) { diff --git a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c index 0de72a2737..9485e464e2 100644 --- a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c +++ b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c @@ -35,7 +35,7 @@ void EnSyatekiMan_StartGame(EnSyatekiMan* this, GlobalContext* globalCtx); void EnSyatekiMan_WaitForGame(EnSyatekiMan* this, GlobalContext* globalCtx); void EnSyatekiMan_EndGame(EnSyatekiMan* this, GlobalContext* globalCtx); void EnSyatekiMan_GivePrize(EnSyatekiMan* this, GlobalContext* globalCtx); -void EnSyaketiMan_FinishPrize(EnSyatekiMan* this, GlobalContext* globalCtx); +void EnSyatekiMan_FinishPrize(EnSyatekiMan* this, GlobalContext* globalCtx); void EnSyatekiMan_RestartGame(EnSyatekiMan* this, GlobalContext* globalCtx); void EnSyatekiMan_BlinkWait(EnSyatekiMan* this); @@ -313,13 +313,13 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, GlobalContext* globalCtx) { void EnSyatekiMan_GivePrize(EnSyatekiMan* this, GlobalContext* globalCtx) { SkelAnime_FrameUpdateMatrix(&this->skelAnime); if (Actor_HasParent(&this->actor, globalCtx)) { - this->actionFunc = EnSyaketiMan_FinishPrize; + this->actionFunc = EnSyatekiMan_FinishPrize; } else { func_8002F434(&this->actor, globalCtx, this->getItemId, 2000.0f, 1000.0f); } } -void EnSyaketiMan_FinishPrize(EnSyatekiMan* this, GlobalContext* globalCtx) { +void EnSyatekiMan_FinishPrize(EnSyatekiMan* this, GlobalContext* globalCtx) { SkelAnime_FrameUpdateMatrix(&this->skelAnime); if ((func_8010BDBC(&globalCtx->msgCtx) == 6) && func_80106BC8(globalCtx)) { // Successful completion diff --git a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c index 44fce283d8..1eccb0a1ee 100644 --- a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c +++ b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c @@ -234,20 +234,19 @@ void func_80B53974(EnZl3* this, u8 arg1) { this->unk_3C8 = arg1; } -#ifdef NON_MATCHING -void func_80B53980(EnZl3* this, s16 y, s32 idx) { - SkelAnime* skelAnime = &this->skelAnime; +void func_80B53980(EnZl3* thisx, s16 y, s32 idx) { + EnZl3* this = THIS; // this function might take thisx s32 action = this->action; - EnZl3* this2 = this; s16 y2 = y; s32 yTemp; f32 animCurrentFrame; f32 unk_3DC; if (this->unk_2FC != 0) { - s32 temp25C = this2->unk_25C[idx]; - s32 temp28C = (s16)(y + this2->unk_28C[idx]); - s32 temp2BC = y - this2->unk_2BC[idx]; + SkelAnime* skelAnime = &this->skelAnime; + s32 temp25C = this->unk_25C[idx]; + s32 temp28C = (s16)(y + this->unk_28C[idx]); + s32 temp2BC = y - this->unk_2BC[idx]; if ((s32)fabsf(temp2BC) > 0x8000) { if (y2 > 0) { @@ -274,7 +273,6 @@ void func_80B53980(EnZl3* this, s16 y, s32 idx) { temp28C = y; temp25C = 0; } - if (idx == 0 && action == 3) { yTemp = y + -11000; if (skelAnime->mode == 2) { @@ -302,30 +300,22 @@ void func_80B53980(EnZl3* this, s16 y, s32 idx) { } this->unk_2BC[idx] = y; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Zl3/func_80B53980.s") -#endif // Assorted regalloc issues #ifdef NON_MATCHING -void func_80B53B64(EnZl3* this, s16 z, s32 idx) { +void func_80B53B64(EnZl3* thisx, s16 z, s32 idx) { + EnZl3* this = THIS; SkelAnime* skelAnime = &this->skelAnime; s32 action = this->action; s32 phi_a1; s32 idx25C; s16 temp_t1; s32 temp_a0; - s32 temp_a3_2; - s32 temp_a3_3; - s32 temp_a3_4; - s32 temp_a3_5; - s32 temp_a3_6; - s32 temp_a3_7; - s32 temp_a3_8; + s32 temp_a3; s32 temp_v1_3; s32 phi_v1; s32 phi_v0; - s32 phi_v1_2; + s32 test; if (idx == 2) { phi_a1 = 15000; @@ -351,11 +341,10 @@ void func_80B53B64(EnZl3* this, s16 z, s32 idx) { } if (this->unk_2FC != 0) { - temp_t1 = this->unk_25C[idx]; - temp_a3_3 = this->unk_28C[idx] + z; + phi_v0 = temp_t1 = this->unk_25C[idx]; + temp_a3 = this->unk_28C[idx] + z; phi_v1 = z - this->unk_2BC[idx]; - temp_a0 = (s16)(temp_a3_3); - phi_v0 = temp_t1; + temp_a0 = (s16)(temp_a3); if ((s32)fabsf(phi_v1) > 0x8000) { if (z > 0) { @@ -391,9 +380,10 @@ void func_80B53B64(EnZl3* this, s16 z, s32 idx) { if (phi_v0 != 0) { phi_v0 -= phi_v0 / 10; } + test = (s16)(temp_a0 - phi_a1); - if ((s16)(temp_a0 - phi_a1) != 0) { - phi_v0 -= (s16)(temp_a0 - phi_a1) / 50; + if (test != 0) { + phi_v0 -= test / 50; } temp_a0 += phi_v0; @@ -408,9 +398,9 @@ void func_80B53B64(EnZl3* this, s16 z, s32 idx) { if (skelAnime->mode == 2) { f32 animCurrentFrame = skelAnime->animCurrentFrame; - temp_a3_2 = (s32)(((this->unk_3E0 - animCurrentFrame) / this->unk_3E0) * -2000.0f) + phi_a1; - if (temp_a3_2 >= phi_a1) { - phi_a1 = temp_a3_2; + temp_a3 = (s32)(((this->unk_3E0 - animCurrentFrame) / this->unk_3E0) * -2000.0f) + phi_a1; + if (temp_a3 >= phi_a1) { + phi_a1 = temp_a3; if (phi_v0 < 0) { phi_v0 /= -2; } @@ -418,9 +408,9 @@ void func_80B53B64(EnZl3* this, s16 z, s32 idx) { } } else if (action == 5) { if (skelAnime->mode == 2) { - temp_a3_3 = (s32)((skelAnime->animCurrentFrame / this->unk_3E4) * -2000.0f) + phi_a1; - if (temp_a3_3 >= phi_a1) { - phi_a1 = temp_a3_3; + temp_a3 = (s32)((skelAnime->animCurrentFrame / this->unk_3E4) * -2000.0f) + phi_a1; + if (temp_a3 >= phi_a1) { + phi_a1 = temp_a3; if (phi_v0 < 0) { phi_v0 /= -2; } @@ -438,15 +428,15 @@ void func_80B53B64(EnZl3* this, s16 z, s32 idx) { f32 unk_3F4 = this->unk_3F4; if (skelAnime->animCurrentFrame <= 42.0f) { - phi_v1_2 = phi_a1 - 2000; + temp_a3 = phi_a1 - 2000; } else { - phi_v1_2 = + temp_a3 = (s32)((((skelAnime->animCurrentFrame - 42.0f) * 6200.0f) / (unk_3F4 - 42.0f)) + -2000.0f) + phi_a1; } - if (phi_v1_2 >= phi_a1) { - phi_a1 = phi_v1_2; + if (temp_a3 >= phi_a1) { + phi_a1 = temp_a3; if (phi_v0 < 0) { phi_v0 /= -2; } @@ -461,9 +451,9 @@ void func_80B53B64(EnZl3* this, s16 z, s32 idx) { } } else if (action == 22) { if (skelAnime->mode == 2) { - temp_a3_4 = (s32)(((skelAnime->animCurrentFrame / this->unk_3EC) * -5200.0f) + 4200.0f) + phi_a1; - if (temp_a3_4 >= phi_a1) { - phi_a1 = temp_a3_4; + temp_a3 = (s32)(((skelAnime->animCurrentFrame / this->unk_3EC) * -5200.0f) + 4200.0f) + phi_a1; + if (temp_a3 >= phi_a1) { + phi_a1 = temp_a3; if (phi_v0 < 0) { phi_v0 /= -2; } @@ -478,9 +468,9 @@ void func_80B53B64(EnZl3* this, s16 z, s32 idx) { } } else if (action == 23) { if (skelAnime->mode == 2) { - temp_a3_5 = (s32)(((skelAnime->animCurrentFrame / this->unk_3F0) * -7600.0f) + -2000.0f) + phi_a1; - if (temp_a3_5 >= phi_a1) { - phi_a1 = temp_a3_5; + temp_a3 = (s32)(((skelAnime->animCurrentFrame / this->unk_3F0) * -7600.0f) + -2000.0f) + phi_a1; + if (temp_a3 >= phi_a1) { + phi_a1 = temp_a3; if (phi_v0 < 0) { phi_v0 /= -2; } @@ -495,9 +485,9 @@ void func_80B53B64(EnZl3* this, s16 z, s32 idx) { } } else if (action == 24) { if (skelAnime->mode == 2) { - temp_a3_6 = (s32)(((skelAnime->animCurrentFrame / this->unk_3E8) * 21000.0f) + -9600.0f) + phi_a1; - if (temp_a3_6 >= phi_a1) { - phi_a1 = temp_a3_6; + temp_a3 = (s32)(((skelAnime->animCurrentFrame / this->unk_3E8) * 21000.0f) + -9600.0f) + phi_a1; + if (temp_a3 >= phi_a1) { + phi_a1 = temp_a3; if (phi_v0 < 0) { phi_v0 /= -2; } @@ -514,9 +504,9 @@ void func_80B53B64(EnZl3* this, s16 z, s32 idx) { } else if (idx == 11 || idx == 17) { if (action == 4) { if (skelAnime->mode == 2) { - temp_a3_7 = (s32)((skelAnime->animCurrentFrame / this->unk_3E0) * -7000.0f) + phi_a1; - if (phi_a1 >= temp_a3_7) { - phi_a1 = temp_a3_7; + temp_a3 = (s32)((skelAnime->animCurrentFrame / this->unk_3E0) * -7000.0f) + phi_a1; + if (phi_a1 >= temp_a3) { + phi_a1 = temp_a3; if (phi_v0 > 0) { phi_v0 /= -2; } @@ -533,9 +523,9 @@ void func_80B53B64(EnZl3* this, s16 z, s32 idx) { if (skelAnime->mode == 2) { f32 animCurrentFrame = skelAnime->animCurrentFrame; - temp_a3_8 = (s32)(((this->unk_3E4 - animCurrentFrame) / this->unk_3E4) * -7000.0f) + phi_a1; - if (phi_a1 >= temp_a3_8) { - phi_a1 = temp_a3_8; + temp_a3 = (s32)(((this->unk_3E4 - animCurrentFrame) / this->unk_3E4) * -7000.0f) + phi_a1; + if (phi_a1 >= temp_a3) { + phi_a1 = temp_a3; if (phi_v0 > 0) { phi_v0 /= -2; }