mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 17:02:46 +01:00
188 lines
8.6 KiB
ArmAsm
188 lines
8.6 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
|
|
glabel func_8003D788
|
|
/* 018B88 8003D788 27BDFFC0 */ addiu $sp, $sp, -0x40
|
|
/* 018B8C 8003D78C AFB00030 */ sw $s0, 0x30($sp)
|
|
/* 018B90 8003D790 0080802D */ daddu $s0, $a0, $zero
|
|
/* 018B94 8003D794 3C038007 */ lui $v1, 0x8007
|
|
/* 018B98 8003D798 8C63419C */ lw $v1, 0x419c($v1)
|
|
/* 018B9C 8003D79C AFBF0038 */ sw $ra, 0x38($sp)
|
|
/* 018BA0 8003D7A0 AFB10034 */ sw $s1, 0x34($sp)
|
|
/* 018BA4 8003D7A4 84620086 */ lh $v0, 0x86($v1)
|
|
/* 018BA8 8003D7A8 24110005 */ addiu $s1, $zero, 5
|
|
/* 018BAC 8003D7AC 14510004 */ bne $v0, $s1, .L8003D7C0
|
|
/* 018BB0 8003D7B0 0000302D */ daddu $a2, $zero, $zero
|
|
/* 018BB4 8003D7B4 8462008C */ lh $v0, 0x8c($v1)
|
|
/* 018BB8 8003D7B8 38420002 */ xori $v0, $v0, 2
|
|
/* 018BBC 8003D7BC 2C460001 */ sltiu $a2, $v0, 1
|
|
.L8003D7C0:
|
|
/* 018BC0 8003D7C0 24020002 */ addiu $v0, $zero, 2
|
|
/* 018BC4 8003D7C4 14A20026 */ bne $a1, $v0, .L8003D860
|
|
/* 018BC8 8003D7C8 00000000 */ nop
|
|
/* 018BCC 8003D7CC C602003C */ lwc1 $f2, 0x3c($s0)
|
|
/* 018BD0 8003D7D0 44800000 */ mtc1 $zero, $f0
|
|
/* 018BD4 8003D7D4 C6040040 */ lwc1 $f4, 0x40($s0)
|
|
/* 018BD8 8003D7D8 46001080 */ add.s $f2, $f2, $f0
|
|
/* 018BDC 8003D7DC C6000038 */ lwc1 $f0, 0x38($s0)
|
|
/* 018BE0 8003D7E0 14C00011 */ bnez $a2, .L8003D828
|
|
/* 018BE4 8003D7E4 24040003 */ addiu $a0, $zero, 3
|
|
/* 018BE8 8003D7E8 3C108007 */ lui $s0, 0x8007
|
|
/* 018BEC 8003D7EC 26107C10 */ addiu $s0, $s0, 0x7c10
|
|
/* 018BF0 8003D7F0 44050000 */ mfc1 $a1, $f0
|
|
/* 018BF4 8003D7F4 44061000 */ mfc1 $a2, $f2
|
|
/* 018BF8 8003D7F8 44072000 */ mfc1 $a3, $f4
|
|
/* 018BFC 8003D7FC C6000000 */ lwc1 $f0, ($s0)
|
|
/* 018C00 8003D800 0000202D */ daddu $a0, $zero, $zero
|
|
/* 018C04 8003D804 0C01BEB4 */ jal fx_walk_large
|
|
/* 018C08 8003D808 E7A00010 */ swc1 $f0, 0x10($sp)
|
|
/* 018C0C 8003D80C C6000000 */ lwc1 $f0, ($s0)
|
|
/* 018C10 8003D810 3C01420C */ lui $at, 0x420c
|
|
/* 018C14 8003D814 44816000 */ mtc1 $at, $f12
|
|
/* 018C18 8003D818 0C00A6C9 */ jal clamp_angle
|
|
/* 018C1C 8003D81C 460C0300 */ add.s $f12, $f0, $f12
|
|
/* 018C20 8003D820 0800F689 */ j .L8003DA24
|
|
/* 018C24 8003D824 E6000000 */ swc1 $f0, ($s0)
|
|
|
|
.L8003D828:
|
|
/* 018C28 8003D828 44050000 */ mfc1 $a1, $f0
|
|
/* 018C2C 8003D82C 44061000 */ mfc1 $a2, $f2
|
|
/* 018C30 8003D830 44072000 */ mfc1 $a3, $f4
|
|
/* 018C34 8003D834 3C014150 */ lui $at, 0x4150
|
|
/* 018C38 8003D838 44810000 */ mtc1 $at, $f0
|
|
/* 018C3C 8003D83C 3C014120 */ lui $at, 0x4120
|
|
/* 018C40 8003D840 44811000 */ mtc1 $at, $f2
|
|
/* 018C44 8003D844 3C013F80 */ lui $at, 0x3f80
|
|
/* 018C48 8003D848 44812000 */ mtc1 $at, $f4
|
|
/* 018C4C 8003D84C 2402001E */ addiu $v0, $zero, 0x1e
|
|
/* 018C50 8003D850 AFB1001C */ sw $s1, 0x1c($sp)
|
|
/* 018C54 8003D854 AFA20020 */ sw $v0, 0x20($sp)
|
|
/* 018C58 8003D858 0800F686 */ j .L8003DA18
|
|
/* 018C5C 8003D85C E7A00010 */ swc1 $f0, 0x10($sp)
|
|
|
|
.L8003D860:
|
|
/* 018C60 8003D860 10A00070 */ beqz $a1, .L8003DA24
|
|
/* 018C64 8003D864 00000000 */ nop
|
|
/* 018C68 8003D868 3C048007 */ lui $a0, 0x8007
|
|
/* 018C6C 8003D86C 24847C14 */ addiu $a0, $a0, 0x7c14
|
|
/* 018C70 8003D870 94820000 */ lhu $v0, ($a0)
|
|
/* 018C74 8003D874 24430001 */ addiu $v1, $v0, 1
|
|
/* 018C78 8003D878 00021400 */ sll $v0, $v0, 0x10
|
|
/* 018C7C 8003D87C 00021403 */ sra $v0, $v0, 0x10
|
|
/* 018C80 8003D880 28420004 */ slti $v0, $v0, 4
|
|
/* 018C84 8003D884 14400067 */ bnez $v0, .L8003DA24
|
|
/* 018C88 8003D888 A4830000 */ sh $v1, ($a0)
|
|
/* 018C8C 8003D88C 14C00034 */ bnez $a2, .L8003D960
|
|
/* 018C90 8003D890 A4800000 */ sh $zero, ($a0)
|
|
/* 018C94 8003D894 C60C000C */ lwc1 $f12, 0xc($s0)
|
|
/* 018C98 8003D898 0C00A6C9 */ jal clamp_angle
|
|
/* 018C9C 8003D89C 46006307 */ neg.s $f12, $f12
|
|
/* 018CA0 8003D8A0 3C0140C9 */ lui $at, 0x40c9
|
|
/* 018CA4 8003D8A4 34210FD0 */ ori $at, $at, 0xfd0
|
|
/* 018CA8 8003D8A8 44811000 */ mtc1 $at, $f2
|
|
/* 018CAC 8003D8AC 00000000 */ nop
|
|
/* 018CB0 8003D8B0 46020002 */ mul.s $f0, $f0, $f2
|
|
/* 018CB4 8003D8B4 00000000 */ nop
|
|
/* 018CB8 8003D8B8 27A50028 */ addiu $a1, $sp, 0x28
|
|
/* 018CBC 8003D8BC 3C0143B4 */ lui $at, 0x43b4
|
|
/* 018CC0 8003D8C0 44816000 */ mtc1 $at, $f12
|
|
/* 018CC4 8003D8C4 27A6002C */ addiu $a2, $sp, 0x2c
|
|
/* 018CC8 8003D8C8 0C00A82D */ jal sin_cos_rad
|
|
/* 018CCC 8003D8CC 460C0303 */ div.s $f12, $f0, $f12
|
|
/* 018CD0 8003D8D0 860200A6 */ lh $v0, 0xa6($s0)
|
|
/* 018CD4 8003D8D4 C7AA0028 */ lwc1 $f10, 0x28($sp)
|
|
/* 018CD8 8003D8D8 44821000 */ mtc1 $v0, $f2
|
|
/* 018CDC 8003D8DC 00000000 */ nop
|
|
/* 018CE0 8003D8E0 468010A0 */ cvt.s.w $f2, $f2
|
|
/* 018CE4 8003D8E4 460A1182 */ mul.s $f6, $f2, $f10
|
|
/* 018CE8 8003D8E8 00000000 */ nop
|
|
/* 018CEC 8003D8EC C7A8002C */ lwc1 $f8, 0x2c($sp)
|
|
/* 018CF0 8003D8F0 46081082 */ mul.s $f2, $f2, $f8
|
|
/* 018CF4 8003D8F4 00000000 */ nop
|
|
/* 018CF8 8003D8F8 3C013E4C */ lui $at, 0x3e4c
|
|
/* 018CFC 8003D8FC 3421CCCD */ ori $at, $at, 0xcccd
|
|
/* 018D00 8003D900 44810000 */ mtc1 $at, $f0
|
|
/* 018D04 8003D904 00000000 */ nop
|
|
/* 018D08 8003D908 46003182 */ mul.s $f6, $f6, $f0
|
|
/* 018D0C 8003D90C 00000000 */ nop
|
|
/* 018D10 8003D910 46001082 */ mul.s $f2, $f2, $f0
|
|
/* 018D14 8003D914 00000000 */ nop
|
|
/* 018D18 8003D918 C604003C */ lwc1 $f4, 0x3c($s0)
|
|
/* 018D1C 8003D91C 3C013FC0 */ lui $at, 0x3fc0
|
|
/* 018D20 8003D920 44810000 */ mtc1 $at, $f0
|
|
/* 018D24 8003D924 00000000 */ nop
|
|
/* 018D28 8003D928 46002100 */ add.s $f4, $f4, $f0
|
|
/* 018D2C 8003D92C C6000038 */ lwc1 $f0, 0x38($s0)
|
|
/* 018D30 8003D930 46060000 */ add.s $f0, $f0, $f6
|
|
/* 018D34 8003D934 44050000 */ mfc1 $a1, $f0
|
|
/* 018D38 8003D938 C6000040 */ lwc1 $f0, 0x40($s0)
|
|
/* 018D3C 8003D93C 46020000 */ add.s $f0, $f0, $f2
|
|
/* 018D40 8003D940 44062000 */ mfc1 $a2, $f4
|
|
/* 018D44 8003D944 44070000 */ mfc1 $a3, $f0
|
|
/* 018D48 8003D948 0000202D */ daddu $a0, $zero, $zero
|
|
/* 018D4C 8003D94C E7AA0010 */ swc1 $f10, 0x10($sp)
|
|
/* 018D50 8003D950 0C01BECC */ jal fx_walk_normal
|
|
/* 018D54 8003D954 E7A80014 */ swc1 $f8, 0x14($sp)
|
|
/* 018D58 8003D958 0800F689 */ j .L8003DA24
|
|
/* 018D5C 8003D95C 00000000 */ nop
|
|
|
|
.L8003D960:
|
|
/* 018D60 8003D960 0C00A6C9 */ jal clamp_angle
|
|
/* 018D64 8003D964 C60C000C */ lwc1 $f12, 0xc($s0)
|
|
/* 018D68 8003D968 3C0140C9 */ lui $at, 0x40c9
|
|
/* 018D6C 8003D96C 34210FD0 */ ori $at, $at, 0xfd0
|
|
/* 018D70 8003D970 44811000 */ mtc1 $at, $f2
|
|
/* 018D74 8003D974 00000000 */ nop
|
|
/* 018D78 8003D978 46020002 */ mul.s $f0, $f0, $f2
|
|
/* 018D7C 8003D97C 00000000 */ nop
|
|
/* 018D80 8003D980 27A50028 */ addiu $a1, $sp, 0x28
|
|
/* 018D84 8003D984 3C0143B4 */ lui $at, 0x43b4
|
|
/* 018D88 8003D988 44816000 */ mtc1 $at, $f12
|
|
/* 018D8C 8003D98C 27A6002C */ addiu $a2, $sp, 0x2c
|
|
/* 018D90 8003D990 0C00A82D */ jal sin_cos_rad
|
|
/* 018D94 8003D994 460C0303 */ div.s $f12, $f0, $f12
|
|
/* 018D98 8003D998 C602003C */ lwc1 $f2, 0x3c($s0)
|
|
/* 018D9C 8003D99C 3C013FC0 */ lui $at, 0x3fc0
|
|
/* 018DA0 8003D9A0 44810000 */ mtc1 $at, $f0
|
|
/* 018DA4 8003D9A4 860200A6 */ lh $v0, 0xa6($s0)
|
|
/* 018DA8 8003D9A8 46001080 */ add.s $f2, $f2, $f0
|
|
/* 018DAC 8003D9AC C7A40028 */ lwc1 $f4, 0x28($sp)
|
|
/* 018DB0 8003D9B0 44820000 */ mtc1 $v0, $f0
|
|
/* 018DB4 8003D9B4 00000000 */ nop
|
|
/* 018DB8 8003D9B8 46800020 */ cvt.s.w $f0, $f0
|
|
/* 018DBC 8003D9BC 46040102 */ mul.s $f4, $f0, $f4
|
|
/* 018DC0 8003D9C0 00000000 */ nop
|
|
/* 018DC4 8003D9C4 44061000 */ mfc1 $a2, $f2
|
|
/* 018DC8 8003D9C8 C7A2002C */ lwc1 $f2, 0x2c($sp)
|
|
/* 018DCC 8003D9CC 46020002 */ mul.s $f0, $f0, $f2
|
|
/* 018DD0 8003D9D0 00000000 */ nop
|
|
/* 018DD4 8003D9D4 24040003 */ addiu $a0, $zero, 3
|
|
/* 018DD8 8003D9D8 C6060038 */ lwc1 $f6, 0x38($s0)
|
|
/* 018DDC 8003D9DC C6080040 */ lwc1 $f8, 0x40($s0)
|
|
/* 018DE0 8003D9E0 3C0140A0 */ lui $at, 0x40a0
|
|
/* 018DE4 8003D9E4 44811000 */ mtc1 $at, $f2
|
|
/* 018DE8 8003D9E8 46043180 */ add.s $f6, $f6, $f4
|
|
/* 018DEC 8003D9EC E7A20010 */ swc1 $f2, 0x10($sp)
|
|
/* 018DF0 8003D9F0 3C014120 */ lui $at, 0x4120
|
|
/* 018DF4 8003D9F4 44811000 */ mtc1 $at, $f2
|
|
/* 018DF8 8003D9F8 46004200 */ add.s $f8, $f8, $f0
|
|
/* 018DFC 8003D9FC 3C013F80 */ lui $at, 0x3f80
|
|
/* 018E00 8003DA00 44812000 */ mtc1 $at, $f4
|
|
/* 018E04 8003DA04 44053000 */ mfc1 $a1, $f6
|
|
/* 018E08 8003DA08 44074000 */ mfc1 $a3, $f8
|
|
/* 018E0C 8003DA0C 2402001E */ addiu $v0, $zero, 0x1e
|
|
/* 018E10 8003DA10 AFB1001C */ sw $s1, 0x1c($sp)
|
|
/* 018E14 8003DA14 AFA20020 */ sw $v0, 0x20($sp)
|
|
.L8003DA18:
|
|
/* 018E18 8003DA18 E7A20014 */ swc1 $f2, 0x14($sp)
|
|
/* 018E1C 8003DA1C 0C01C8D4 */ jal func_80072350
|
|
/* 018E20 8003DA20 E7A40018 */ swc1 $f4, 0x18($sp)
|
|
.L8003DA24:
|
|
/* 018E24 8003DA24 8FBF0038 */ lw $ra, 0x38($sp)
|
|
/* 018E28 8003DA28 8FB10034 */ lw $s1, 0x34($sp)
|
|
/* 018E2C 8003DA2C 8FB00030 */ lw $s0, 0x30($sp)
|
|
/* 018E30 8003DA30 03E00008 */ jr $ra
|
|
/* 018E34 8003DA34 27BD0040 */ addiu $sp, $sp, 0x40
|
|
|