mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 08:52:40 +01:00
231 lines
10 KiB
ArmAsm
231 lines
10 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
|
|
glabel update_cameras
|
|
/* 008800 8002D400 27BDFF90 */ addiu $sp, $sp, -0x70
|
|
/* 008804 8002D404 F7B60068 */ sdc1 $f22, 0x68($sp)
|
|
/* 008808 8002D408 3C013F80 */ lui $at, 0x3f80
|
|
/* 00880C 8002D40C 4481B000 */ mtc1 $at, $f22
|
|
/* 008810 8002D410 F7B40060 */ sdc1 $f20, 0x60($sp)
|
|
/* 008814 8002D414 3C013FE0 */ lui $at, 0x3fe0
|
|
/* 008818 8002D418 4481A800 */ mtc1 $at, $f21
|
|
/* 00881C 8002D41C 4480A000 */ mtc1 $zero, $f20
|
|
/* 008820 8002D420 AFB3004C */ sw $s3, 0x4c($sp)
|
|
/* 008824 8002D424 0000982D */ daddu $s3, $zero, $zero
|
|
/* 008828 8002D428 AFB60058 */ sw $s6, 0x58($sp)
|
|
/* 00882C 8002D42C 27B60030 */ addiu $s6, $sp, 0x30
|
|
/* 008830 8002D430 AFB50054 */ sw $s5, 0x54($sp)
|
|
/* 008834 8002D434 27B50034 */ addiu $s5, $sp, 0x34
|
|
/* 008838 8002D438 AFB40050 */ sw $s4, 0x50($sp)
|
|
/* 00883C 8002D43C 27B40038 */ addiu $s4, $sp, 0x38
|
|
/* 008840 8002D440 AFB00040 */ sw $s0, 0x40($sp)
|
|
/* 008844 8002D444 3C10800B */ lui $s0, 0x800b
|
|
/* 008848 8002D448 26101D80 */ addiu $s0, $s0, 0x1d80
|
|
/* 00884C 8002D44C AFBF005C */ sw $ra, 0x5c($sp)
|
|
/* 008850 8002D450 AFB20048 */ sw $s2, 0x48($sp)
|
|
/* 008854 8002D454 AFB10044 */ sw $s1, 0x44($sp)
|
|
.L8002D458:
|
|
/* 008858 8002D458 96020000 */ lhu $v0, ($s0)
|
|
/* 00885C 8002D45C 104000A5 */ beqz $v0, .L8002D6F4
|
|
/* 008860 8002D460 30420002 */ andi $v0, $v0, 2
|
|
/* 008864 8002D464 544000A4 */ bnel $v0, $zero, .L8002D6F8
|
|
/* 008868 8002D468 26730001 */ addiu $s3, $s3, 1
|
|
/* 00886C 8002D46C 86030004 */ lh $v1, 4($s0)
|
|
/* 008870 8002D470 3C01800A */ lui $at, 0x800a
|
|
/* 008874 8002D474 A433A634 */ sh $s3, -0x59cc($at)
|
|
/* 008878 8002D478 2C620007 */ sltiu $v0, $v1, 7
|
|
/* 00887C 8002D47C 1040001E */ beqz $v0, .L8002D4F8
|
|
/* 008880 8002D480 00031080 */ sll $v0, $v1, 2
|
|
/* 008884 8002D484 3C01800A */ lui $at, 0x800a
|
|
/* 008888 8002D488 00220821 */ addu $at, $at, $v0
|
|
/* 00888C 8002D48C 8C2281E0 */ lw $v0, -0x7e20($at)
|
|
/* 008890 8002D490 00400008 */ jr $v0
|
|
/* 008894 8002D494 00000000 */ nop
|
|
/* 008898 8002D498 0C00C525 */ jal do_camera_type_3
|
|
/* 00889C 8002D49C 0200202D */ daddu $a0, $s0, $zero
|
|
/* 0088A0 8002D4A0 0800B540 */ j .L8002D500
|
|
/* 0088A4 8002D4A4 00000000 */ nop
|
|
|
|
/* 0088A8 8002D4A8 0C00BE14 */ jal do_camera_type_0
|
|
/* 0088AC 8002D4AC 0200202D */ daddu $a0, $s0, $zero
|
|
/* 0088B0 8002D4B0 0800B540 */ j .L8002D500
|
|
/* 0088B4 8002D4B4 00000000 */ nop
|
|
|
|
/* 0088B8 8002D4B8 0C00BCA4 */ jal do_camera_type_1
|
|
/* 0088BC 8002D4BC 0200202D */ daddu $a0, $s0, $zero
|
|
/* 0088C0 8002D4C0 0800B540 */ j .L8002D500
|
|
/* 0088C4 8002D4C4 00000000 */ nop
|
|
|
|
/* 0088C8 8002D4C8 0C00BB3E */ jal do_camera_type_2
|
|
/* 0088CC 8002D4CC 0200202D */ daddu $a0, $s0, $zero
|
|
/* 0088D0 8002D4D0 0800B540 */ j .L8002D500
|
|
/* 0088D4 8002D4D4 00000000 */ nop
|
|
|
|
/* 0088D8 8002D4D8 0C00BA44 */ jal do_camera_type_4
|
|
/* 0088DC 8002D4DC 0200202D */ daddu $a0, $s0, $zero
|
|
/* 0088E0 8002D4E0 0800B540 */ j .L8002D500
|
|
/* 0088E4 8002D4E4 00000000 */ nop
|
|
|
|
/* 0088E8 8002D4E8 0C00C000 */ jal do_camera_type_5
|
|
/* 0088EC 8002D4EC 0200202D */ daddu $a0, $s0, $zero
|
|
/* 0088F0 8002D4F0 0800B540 */ j .L8002D500
|
|
/* 0088F4 8002D4F4 00000000 */ nop
|
|
|
|
.L8002D4F8:
|
|
/* 0088F8 8002D4F8 0C00BE64 */ jal do_camera_type_6
|
|
/* 0088FC 8002D4FC 0200202D */ daddu $a0, $s0, $zero
|
|
.L8002D500:
|
|
/* 008900 8002D500 C6000044 */ lwc1 $f0, 0x44($s0)
|
|
/* 008904 8002D504 3C05800A */ lui $a1, 0x800a
|
|
/* 008908 8002D508 8CA5A674 */ lw $a1, -0x598c($a1)
|
|
/* 00890C 8002D50C E7A00010 */ swc1 $f0, 0x10($sp)
|
|
/* 008910 8002D510 C6000048 */ lwc1 $f0, 0x48($s0)
|
|
/* 008914 8002D514 E7A00014 */ swc1 $f0, 0x14($sp)
|
|
/* 008918 8002D518 C600004C */ lwc1 $f0, 0x4c($s0)
|
|
/* 00891C 8002D51C E7A00018 */ swc1 $f0, 0x18($sp)
|
|
/* 008920 8002D520 C6000050 */ lwc1 $f0, 0x50($s0)
|
|
/* 008924 8002D524 26120114 */ addiu $s2, $s0, 0x114
|
|
/* 008928 8002D528 AFA00020 */ sw $zero, 0x20($sp)
|
|
/* 00892C 8002D52C E7B60024 */ swc1 $f22, 0x24($sp)
|
|
/* 008930 8002D530 AFA00028 */ sw $zero, 0x28($sp)
|
|
/* 008934 8002D534 E7A0001C */ swc1 $f0, 0x1c($sp)
|
|
/* 008938 8002D538 8E06003C */ lw $a2, 0x3c($s0)
|
|
/* 00893C 8002D53C 8E070040 */ lw $a3, 0x40($s0)
|
|
/* 008940 8002D540 0C018CC8 */ jal guLookAtReflectF
|
|
/* 008944 8002D544 0240202D */ daddu $a0, $s2, $zero
|
|
/* 008948 8002D548 96030000 */ lhu $v1, ($s0)
|
|
/* 00894C 8002D54C 30620010 */ andi $v0, $v1, 0x10
|
|
/* 008950 8002D550 14400034 */ bnez $v0, .L8002D624
|
|
/* 008954 8002D554 260400D4 */ addiu $a0, $s0, 0xd4
|
|
/* 008958 8002D558 30620004 */ andi $v0, $v1, 4
|
|
/* 00895C 8002D55C 10400004 */ beqz $v0, .L8002D570
|
|
/* 008960 8002D560 261100D4 */ addiu $s1, $s0, 0xd4
|
|
/* 008964 8002D564 0C00CCE5 */ jal func_80033394
|
|
/* 008968 8002D568 0200202D */ daddu $a0, $s0, $zero
|
|
/* 00896C 8002D56C 261100D4 */ addiu $s1, $s0, 0xd4
|
|
.L8002D570:
|
|
/* 008970 8002D570 0220202D */ daddu $a0, $s1, $zero
|
|
/* 008974 8002D574 8607000A */ lh $a3, 0xa($s0)
|
|
/* 008978 8002D578 86020012 */ lh $v0, 0x12($s0)
|
|
/* 00897C 8002D57C 8603000C */ lh $v1, 0xc($s0)
|
|
/* 008980 8002D580 44820000 */ mtc1 $v0, $f0
|
|
/* 008984 8002D584 00000000 */ nop
|
|
/* 008988 8002D588 46800020 */ cvt.s.w $f0, $f0
|
|
/* 00898C 8002D58C E7A00010 */ swc1 $f0, 0x10($sp)
|
|
/* 008990 8002D590 86020014 */ lh $v0, 0x14($s0)
|
|
/* 008994 8002D594 44871000 */ mtc1 $a3, $f2
|
|
/* 008998 8002D598 00000000 */ nop
|
|
/* 00899C 8002D59C 468010A0 */ cvt.s.w $f2, $f2
|
|
/* 0089A0 8002D5A0 E7B60018 */ swc1 $f22, 0x18($sp)
|
|
/* 0089A4 8002D5A4 44820000 */ mtc1 $v0, $f0
|
|
/* 0089A8 8002D5A8 00000000 */ nop
|
|
/* 0089AC 8002D5AC 46800020 */ cvt.s.w $f0, $f0
|
|
/* 0089B0 8002D5B0 E7A00014 */ swc1 $f0, 0x14($sp)
|
|
/* 0089B4 8002D5B4 44830000 */ mtc1 $v1, $f0
|
|
/* 0089B8 8002D5B8 00000000 */ nop
|
|
/* 0089BC 8002D5BC 46800020 */ cvt.s.w $f0, $f0
|
|
/* 0089C0 8002D5C0 46001083 */ div.s $f2, $f2, $f0
|
|
/* 0089C4 8002D5C4 8E060018 */ lw $a2, 0x18($s0)
|
|
/* 0089C8 8002D5C8 44071000 */ mfc1 $a3, $f2
|
|
/* 0089CC 8002D5CC 0C018EE4 */ jal guPerspectiveF
|
|
/* 0089D0 8002D5D0 26050038 */ addiu $a1, $s0, 0x38
|
|
/* 0089D4 8002D5D4 96020000 */ lhu $v0, ($s0)
|
|
/* 0089D8 8002D5D8 30420008 */ andi $v0, $v0, 8
|
|
/* 0089DC 8002D5DC 10400004 */ beqz $v0, .L8002D5F0
|
|
/* 0089E0 8002D5E0 26040194 */ addiu $a0, $s0, 0x194
|
|
/* 0089E4 8002D5E4 0220282D */ daddu $a1, $s1, $zero
|
|
/* 0089E8 8002D5E8 0C019D80 */ jal guMtxCatF
|
|
/* 0089EC 8002D5EC 0220302D */ daddu $a2, $s1, $zero
|
|
.L8002D5F0:
|
|
/* 0089F0 8002D5F0 96020000 */ lhu $v0, ($s0)
|
|
/* 0089F4 8002D5F4 30420004 */ andi $v0, $v0, 4
|
|
/* 0089F8 8002D5F8 10400004 */ beqz $v0, .L8002D60C
|
|
/* 0089FC 8002D5FC 26040154 */ addiu $a0, $s0, 0x154
|
|
/* 008A00 8002D600 0220282D */ daddu $a1, $s1, $zero
|
|
/* 008A04 8002D604 0C019D80 */ jal guMtxCatF
|
|
/* 008A08 8002D608 0220302D */ daddu $a2, $s1, $zero
|
|
.L8002D60C:
|
|
/* 008A0C 8002D60C 0240202D */ daddu $a0, $s2, $zero
|
|
/* 008A10 8002D610 0220282D */ daddu $a1, $s1, $zero
|
|
/* 008A14 8002D614 0C019D80 */ jal guMtxCatF
|
|
/* 008A18 8002D618 00A0302D */ daddu $a2, $a1, $zero
|
|
/* 008A1C 8002D61C 0800B5B0 */ j .L8002D6C0
|
|
/* 008A20 8002D620 AFB60010 */ sw $s6, 0x10($sp)
|
|
|
|
.L8002D624:
|
|
/* 008A24 8002D624 8602000A */ lh $v0, 0xa($s0)
|
|
/* 008A28 8002D628 44822000 */ mtc1 $v0, $f4
|
|
/* 008A2C 8002D62C 00000000 */ nop
|
|
/* 008A30 8002D630 46802120 */ cvt.s.w $f4, $f4
|
|
/* 008A34 8002D634 46002187 */ neg.s $f6, $f4
|
|
/* 008A38 8002D638 460031A1 */ cvt.d.s $f6, $f6
|
|
/* 008A3C 8002D63C 46343182 */ mul.d $f6, $f6, $f20
|
|
/* 008A40 8002D640 00000000 */ nop
|
|
/* 008A44 8002D644 46002121 */ cvt.d.s $f4, $f4
|
|
/* 008A48 8002D648 46342102 */ mul.d $f4, $f4, $f20
|
|
/* 008A4C 8002D64C 00000000 */ nop
|
|
/* 008A50 8002D650 8602000C */ lh $v0, 0xc($s0)
|
|
/* 008A54 8002D654 44820000 */ mtc1 $v0, $f0
|
|
/* 008A58 8002D658 00000000 */ nop
|
|
/* 008A5C 8002D65C 46800020 */ cvt.s.w $f0, $f0
|
|
/* 008A60 8002D660 46000087 */ neg.s $f2, $f0
|
|
/* 008A64 8002D664 460010A1 */ cvt.d.s $f2, $f2
|
|
/* 008A68 8002D668 46341082 */ mul.d $f2, $f2, $f20
|
|
/* 008A6C 8002D66C 00000000 */ nop
|
|
/* 008A70 8002D670 3C01C47A */ lui $at, 0xc47a
|
|
/* 008A74 8002D674 44814000 */ mtc1 $at, $f8
|
|
/* 008A78 8002D678 3C01447A */ lui $at, 0x447a
|
|
/* 008A7C 8002D67C 44815000 */ mtc1 $at, $f10
|
|
/* 008A80 8002D680 E7B6001C */ swc1 $f22, 0x1c($sp)
|
|
/* 008A84 8002D684 E7A80014 */ swc1 $f8, 0x14($sp)
|
|
/* 008A88 8002D688 46000021 */ cvt.d.s $f0, $f0
|
|
/* 008A8C 8002D68C 46340002 */ mul.d $f0, $f0, $f20
|
|
/* 008A90 8002D690 00000000 */ nop
|
|
/* 008A94 8002D694 E7AA0018 */ swc1 $f10, 0x18($sp)
|
|
/* 008A98 8002D698 462031A0 */ cvt.s.d $f6, $f6
|
|
/* 008A9C 8002D69C 46202120 */ cvt.s.d $f4, $f4
|
|
/* 008AA0 8002D6A0 44053000 */ mfc1 $a1, $f6
|
|
/* 008AA4 8002D6A4 44062000 */ mfc1 $a2, $f4
|
|
/* 008AA8 8002D6A8 462010A0 */ cvt.s.d $f2, $f2
|
|
/* 008AAC 8002D6AC 44071000 */ mfc1 $a3, $f2
|
|
/* 008AB0 8002D6B0 46200020 */ cvt.s.d $f0, $f0
|
|
/* 008AB4 8002D6B4 0C018E44 */ jal guOrthoF
|
|
/* 008AB8 8002D6B8 E7A00010 */ swc1 $f0, 0x10($sp)
|
|
/* 008ABC 8002D6BC AFB60010 */ sw $s6, 0x10($sp)
|
|
.L8002D6C0:
|
|
/* 008AC0 8002D6C0 AFB50014 */ sw $s5, 0x14($sp)
|
|
/* 008AC4 8002D6C4 AFB40018 */ sw $s4, 0x18($sp)
|
|
/* 008AC8 8002D6C8 8E050060 */ lw $a1, 0x60($s0)
|
|
/* 008ACC 8002D6CC 8E060064 */ lw $a2, 0x64($s0)
|
|
/* 008AD0 8002D6D0 8E070068 */ lw $a3, 0x68($s0)
|
|
/* 008AD4 8002D6D4 0C00B94E */ jal get_screen_coords
|
|
/* 008AD8 8002D6D8 0000202D */ daddu $a0, $zero, $zero
|
|
/* 008ADC 8002D6DC 96C20002 */ lhu $v0, 2($s6)
|
|
/* 008AE0 8002D6E0 A6020032 */ sh $v0, 0x32($s0)
|
|
/* 008AE4 8002D6E4 96A20002 */ lhu $v0, 2($s5)
|
|
/* 008AE8 8002D6E8 A6020034 */ sh $v0, 0x34($s0)
|
|
/* 008AEC 8002D6EC 96820002 */ lhu $v0, 2($s4)
|
|
/* 008AF0 8002D6F0 A6020036 */ sh $v0, 0x36($s0)
|
|
.L8002D6F4:
|
|
/* 008AF4 8002D6F4 26730001 */ addiu $s3, $s3, 1
|
|
.L8002D6F8:
|
|
/* 008AF8 8002D6F8 2A620004 */ slti $v0, $s3, 4
|
|
/* 008AFC 8002D6FC 1440FF56 */ bnez $v0, .L8002D458
|
|
/* 008B00 8002D700 26100558 */ addiu $s0, $s0, 0x558
|
|
/* 008B04 8002D704 8FBF005C */ lw $ra, 0x5c($sp)
|
|
/* 008B08 8002D708 8FB60058 */ lw $s6, 0x58($sp)
|
|
/* 008B0C 8002D70C 8FB50054 */ lw $s5, 0x54($sp)
|
|
/* 008B10 8002D710 8FB40050 */ lw $s4, 0x50($sp)
|
|
/* 008B14 8002D714 8FB3004C */ lw $s3, 0x4c($sp)
|
|
/* 008B18 8002D718 8FB20048 */ lw $s2, 0x48($sp)
|
|
/* 008B1C 8002D71C 8FB10044 */ lw $s1, 0x44($sp)
|
|
/* 008B20 8002D720 8FB00040 */ lw $s0, 0x40($sp)
|
|
/* 008B24 8002D724 D7B60068 */ ldc1 $f22, 0x68($sp)
|
|
/* 008B28 8002D728 D7B40060 */ ldc1 $f20, 0x60($sp)
|
|
/* 008B2C 8002D72C 3C01800A */ lui $at, 0x800a
|
|
/* 008B30 8002D730 A420A634 */ sh $zero, -0x59cc($at)
|
|
/* 008B34 8002D734 03E00008 */ jr $ra
|
|
/* 008B38 8002D738 27BD0070 */ addiu $sp, $sp, 0x70
|
|
|