mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 17:02:46 +01:00
225 lines
12 KiB
ArmAsm
225 lines
12 KiB
ArmAsm
|
.set noat # allow manual use of $at
|
||
|
.set noreorder # don't insert nops after branches
|
||
|
|
||
|
glabel func_802828DC
|
||
|
/* 7E375C 802828DC 27BDFFC0 */ addiu $sp, $sp, -0x40
|
||
|
/* 7E3760 802828E0 AFB20018 */ sw $s2, 0x18($sp)
|
||
|
/* 7E3764 802828E4 0080902D */ daddu $s2, $a0, $zero
|
||
|
/* 7E3768 802828E8 AFBF0020 */ sw $ra, 0x20($sp)
|
||
|
/* 7E376C 802828EC AFB3001C */ sw $s3, 0x1c($sp)
|
||
|
/* 7E3770 802828F0 AFB10014 */ sw $s1, 0x14($sp)
|
||
|
/* 7E3774 802828F4 AFB00010 */ sw $s0, 0x10($sp)
|
||
|
/* 7E3778 802828F8 F7B80038 */ sdc1 $f24, 0x38($sp)
|
||
|
/* 7E377C 802828FC F7B60030 */ sdc1 $f22, 0x30($sp)
|
||
|
/* 7E3780 80282900 F7B40028 */ sdc1 $f20, 0x28($sp)
|
||
|
/* 7E3784 80282904 8E4400B0 */ lw $a0, 0xb0($s2)
|
||
|
/* 7E3788 80282908 0C04417A */ jal get_entity_by_index
|
||
|
/* 7E378C 8028290C 00A0802D */ daddu $s0, $a1, $zero
|
||
|
/* 7E3790 80282910 3C138011 */ lui $s3, 0x8011
|
||
|
/* 7E3794 80282914 2673EFC8 */ addiu $s3, $s3, -0x1038
|
||
|
/* 7E3798 80282918 1200001A */ beqz $s0, .L80282984
|
||
|
/* 7E379C 8028291C 0040882D */ daddu $s1, $v0, $zero
|
||
|
/* 7E37A0 80282920 AE400070 */ sw $zero, 0x70($s2)
|
||
|
/* 7E37A4 80282924 C6600028 */ lwc1 $f0, 0x28($s3)
|
||
|
/* 7E37A8 80282928 4600018D */ trunc.w.s $f6, $f0
|
||
|
/* 7E37AC 8028292C E6460084 */ swc1 $f6, 0x84($s2)
|
||
|
/* 7E37B0 80282930 C660002C */ lwc1 $f0, 0x2c($s3)
|
||
|
/* 7E37B4 80282934 4600018D */ trunc.w.s $f6, $f0
|
||
|
/* 7E37B8 80282938 E6460088 */ swc1 $f6, 0x88($s2)
|
||
|
/* 7E37BC 8028293C C6600030 */ lwc1 $f0, 0x30($s3)
|
||
|
/* 7E37C0 80282940 4600018D */ trunc.w.s $f6, $f0
|
||
|
/* 7E37C4 80282944 E646008C */ swc1 $f6, 0x8c($s2)
|
||
|
/* 7E37C8 80282948 C6200048 */ lwc1 $f0, 0x48($s1)
|
||
|
/* 7E37CC 8028294C 4600018D */ trunc.w.s $f6, $f0
|
||
|
/* 7E37D0 80282950 E6460090 */ swc1 $f6, 0x90($s2)
|
||
|
/* 7E37D4 80282954 C620004C */ lwc1 $f0, 0x4c($s1)
|
||
|
/* 7E37D8 80282958 4600018D */ trunc.w.s $f6, $f0
|
||
|
/* 7E37DC 8028295C E6460094 */ swc1 $f6, 0x94($s2)
|
||
|
/* 7E37E0 80282960 C6200050 */ lwc1 $f0, 0x50($s1)
|
||
|
/* 7E37E4 80282964 4600018D */ trunc.w.s $f6, $f0
|
||
|
/* 7E37E8 80282968 E6460098 */ swc1 $f6, 0x98($s2)
|
||
|
/* 7E37EC 8028296C C6200060 */ lwc1 $f0, 0x60($s1)
|
||
|
/* 7E37F0 80282970 4600018D */ trunc.w.s $f6, $f0
|
||
|
/* 7E37F4 80282974 E64600A8 */ swc1 $f6, 0xa8($s2)
|
||
|
/* 7E37F8 80282978 C6200068 */ lwc1 $f0, 0x68($s1)
|
||
|
/* 7E37FC 8028297C 4600018D */ trunc.w.s $f6, $f0
|
||
|
/* 7E3800 80282980 E64600B4 */ swc1 $f6, 0xb4($s2)
|
||
|
.L80282984:
|
||
|
/* 7E3804 80282984 8E420070 */ lw $v0, 0x70($s2)
|
||
|
/* 7E3808 80282988 00021080 */ sll $v0, $v0, 2
|
||
|
/* 7E380C 8028298C 3C018028 */ lui $at, 0x8028
|
||
|
/* 7E3810 80282990 00220821 */ addu $at, $at, $v0
|
||
|
/* 7E3814 80282994 C4245640 */ lwc1 $f4, 0x5640($at)
|
||
|
/* 7E3818 80282998 C642009C */ lwc1 $f2, 0x9c($s2)
|
||
|
/* 7E381C 8028299C 468010A0 */ cvt.s.w $f2, $f2
|
||
|
/* 7E3820 802829A0 46041082 */ mul.s $f2, $f2, $f4
|
||
|
/* 7E3824 802829A4 00000000 */ nop
|
||
|
/* 7E3828 802829A8 3C0141C8 */ lui $at, 0x41c8
|
||
|
/* 7E382C 802829AC 4481C000 */ mtc1 $at, $f24
|
||
|
/* 7E3830 802829B0 00000000 */ nop
|
||
|
/* 7E3834 802829B4 46181082 */ mul.s $f2, $f2, $f24
|
||
|
/* 7E3838 802829B8 00000000 */ nop
|
||
|
/* 7E383C 802829BC C6400084 */ lwc1 $f0, 0x84($s2)
|
||
|
/* 7E3840 802829C0 46800020 */ cvt.s.w $f0, $f0
|
||
|
/* 7E3844 802829C4 46020000 */ add.s $f0, $f0, $f2
|
||
|
/* 7E3848 802829C8 E6600028 */ swc1 $f0, 0x28($s3)
|
||
|
/* 7E384C 802829CC C64200A0 */ lwc1 $f2, 0xa0($s2)
|
||
|
/* 7E3850 802829D0 468010A0 */ cvt.s.w $f2, $f2
|
||
|
/* 7E3854 802829D4 46041082 */ mul.s $f2, $f2, $f4
|
||
|
/* 7E3858 802829D8 00000000 */ nop
|
||
|
/* 7E385C 802829DC 46181082 */ mul.s $f2, $f2, $f24
|
||
|
/* 7E3860 802829E0 00000000 */ nop
|
||
|
/* 7E3864 802829E4 C6400088 */ lwc1 $f0, 0x88($s2)
|
||
|
/* 7E3868 802829E8 46800020 */ cvt.s.w $f0, $f0
|
||
|
/* 7E386C 802829EC 46020000 */ add.s $f0, $f0, $f2
|
||
|
/* 7E3870 802829F0 E660002C */ swc1 $f0, 0x2c($s3)
|
||
|
/* 7E3874 802829F4 C64200A4 */ lwc1 $f2, 0xa4($s2)
|
||
|
/* 7E3878 802829F8 468010A0 */ cvt.s.w $f2, $f2
|
||
|
/* 7E387C 802829FC 46041082 */ mul.s $f2, $f2, $f4
|
||
|
/* 7E3880 80282A00 00000000 */ nop
|
||
|
/* 7E3884 80282A04 46181082 */ mul.s $f2, $f2, $f24
|
||
|
/* 7E3888 80282A08 00000000 */ nop
|
||
|
/* 7E388C 80282A0C C640008C */ lwc1 $f0, 0x8c($s2)
|
||
|
/* 7E3890 80282A10 46800020 */ cvt.s.w $f0, $f0
|
||
|
/* 7E3894 80282A14 46020000 */ add.s $f0, $f0, $f2
|
||
|
/* 7E3898 80282A18 E6600030 */ swc1 $f0, 0x30($s3)
|
||
|
/* 7E389C 80282A1C C642009C */ lwc1 $f2, 0x9c($s2)
|
||
|
/* 7E38A0 80282A20 468010A0 */ cvt.s.w $f2, $f2
|
||
|
/* 7E38A4 80282A24 46041082 */ mul.s $f2, $f2, $f4
|
||
|
/* 7E38A8 80282A28 00000000 */ nop
|
||
|
/* 7E38AC 80282A2C 46181082 */ mul.s $f2, $f2, $f24
|
||
|
/* 7E38B0 80282A30 00000000 */ nop
|
||
|
/* 7E38B4 80282A34 C6400090 */ lwc1 $f0, 0x90($s2)
|
||
|
/* 7E38B8 80282A38 46800020 */ cvt.s.w $f0, $f0
|
||
|
/* 7E38BC 80282A3C 46020000 */ add.s $f0, $f0, $f2
|
||
|
/* 7E38C0 80282A40 E6200048 */ swc1 $f0, 0x48($s1)
|
||
|
/* 7E38C4 80282A44 C64200A0 */ lwc1 $f2, 0xa0($s2)
|
||
|
/* 7E38C8 80282A48 468010A0 */ cvt.s.w $f2, $f2
|
||
|
/* 7E38CC 80282A4C 46041082 */ mul.s $f2, $f2, $f4
|
||
|
/* 7E38D0 80282A50 00000000 */ nop
|
||
|
/* 7E38D4 80282A54 46181082 */ mul.s $f2, $f2, $f24
|
||
|
/* 7E38D8 80282A58 00000000 */ nop
|
||
|
/* 7E38DC 80282A5C C6400094 */ lwc1 $f0, 0x94($s2)
|
||
|
/* 7E38E0 80282A60 46800020 */ cvt.s.w $f0, $f0
|
||
|
/* 7E38E4 80282A64 46020000 */ add.s $f0, $f0, $f2
|
||
|
/* 7E38E8 80282A68 E620004C */ swc1 $f0, 0x4c($s1)
|
||
|
/* 7E38EC 80282A6C C64200A4 */ lwc1 $f2, 0xa4($s2)
|
||
|
/* 7E38F0 80282A70 468010A0 */ cvt.s.w $f2, $f2
|
||
|
/* 7E38F4 80282A74 46041082 */ mul.s $f2, $f2, $f4
|
||
|
/* 7E38F8 80282A78 00000000 */ nop
|
||
|
/* 7E38FC 80282A7C 46181082 */ mul.s $f2, $f2, $f24
|
||
|
/* 7E3900 80282A80 00000000 */ nop
|
||
|
/* 7E3904 80282A84 C6400098 */ lwc1 $f0, 0x98($s2)
|
||
|
/* 7E3908 80282A88 46800020 */ cvt.s.w $f0, $f0
|
||
|
/* 7E390C 80282A8C 46020000 */ add.s $f0, $f0, $f2
|
||
|
/* 7E3910 80282A90 E6200050 */ swc1 $f0, 0x50($s1)
|
||
|
/* 7E3914 80282A94 8E420070 */ lw $v0, 0x70($s2)
|
||
|
/* 7E3918 80282A98 2842000C */ slti $v0, $v0, 0xc
|
||
|
/* 7E391C 80282A9C 1040004D */ beqz $v0, .L80282BD4
|
||
|
/* 7E3920 80282AA0 00000000 */ nop
|
||
|
/* 7E3924 80282AA4 C642009C */ lwc1 $f2, 0x9c($s2)
|
||
|
/* 7E3928 80282AA8 468010A0 */ cvt.s.w $f2, $f2
|
||
|
/* 7E392C 80282AAC 46041082 */ mul.s $f2, $f2, $f4
|
||
|
/* 7E3930 80282AB0 00000000 */ nop
|
||
|
/* 7E3934 80282AB4 3C01C2B4 */ lui $at, 0xc2b4
|
||
|
/* 7E3938 80282AB8 44810000 */ mtc1 $at, $f0
|
||
|
/* 7E393C 80282ABC 00000000 */ nop
|
||
|
/* 7E3940 80282AC0 46001082 */ mul.s $f2, $f2, $f0
|
||
|
/* 7E3944 80282AC4 00000000 */ nop
|
||
|
/* 7E3948 80282AC8 C64000B4 */ lwc1 $f0, 0xb4($s2)
|
||
|
/* 7E394C 80282ACC 46800020 */ cvt.s.w $f0, $f0
|
||
|
/* 7E3950 80282AD0 46020000 */ add.s $f0, $f0, $f2
|
||
|
/* 7E3954 80282AD4 E6200068 */ swc1 $f0, 0x68($s1)
|
||
|
/* 7E3958 80282AD8 C64200A4 */ lwc1 $f2, 0xa4($s2)
|
||
|
/* 7E395C 80282ADC 468010A0 */ cvt.s.w $f2, $f2
|
||
|
/* 7E3960 80282AE0 46041082 */ mul.s $f2, $f2, $f4
|
||
|
/* 7E3964 80282AE4 00000000 */ nop
|
||
|
/* 7E3968 80282AE8 3C0142B4 */ lui $at, 0x42b4
|
||
|
/* 7E396C 80282AEC 4481B000 */ mtc1 $at, $f22
|
||
|
/* 7E3970 80282AF0 00000000 */ nop
|
||
|
/* 7E3974 80282AF4 46161082 */ mul.s $f2, $f2, $f22
|
||
|
/* 7E3978 80282AF8 00000000 */ nop
|
||
|
/* 7E397C 80282AFC 46162582 */ mul.s $f22, $f4, $f22
|
||
|
/* 7E3980 80282B00 00000000 */ nop
|
||
|
/* 7E3984 80282B04 C64000A8 */ lwc1 $f0, 0xa8($s2)
|
||
|
/* 7E3988 80282B08 46800020 */ cvt.s.w $f0, $f0
|
||
|
/* 7E398C 80282B0C 46020000 */ add.s $f0, $f0, $f2
|
||
|
/* 7E3990 80282B10 4600B306 */ mov.s $f12, $f22
|
||
|
/* 7E3994 80282B14 0C00A8BB */ jal sin_deg
|
||
|
/* 7E3998 80282B18 E6200060 */ swc1 $f0, 0x60($s1)
|
||
|
/* 7E399C 80282B1C 46180002 */ mul.s $f0, $f0, $f24
|
||
|
/* 7E39A0 80282B20 00000000 */ nop
|
||
|
/* 7E39A4 80282B24 3C013FE0 */ lui $at, 0x3fe0
|
||
|
/* 7E39A8 80282B28 4481A800 */ mtc1 $at, $f21
|
||
|
/* 7E39AC 80282B2C 4480A000 */ mtc1 $zero, $f20
|
||
|
/* 7E39B0 80282B30 46000021 */ cvt.d.s $f0, $f0
|
||
|
/* 7E39B4 80282B34 46340002 */ mul.d $f0, $f0, $f20
|
||
|
/* 7E39B8 80282B38 00000000 */ nop
|
||
|
/* 7E39BC 80282B3C C622004C */ lwc1 $f2, 0x4c($s1)
|
||
|
/* 7E39C0 80282B40 460010A1 */ cvt.d.s $f2, $f2
|
||
|
/* 7E39C4 80282B44 46201080 */ add.d $f2, $f2, $f0
|
||
|
/* 7E39C8 80282B48 4600B306 */ mov.s $f12, $f22
|
||
|
/* 7E39CC 80282B4C 462010A0 */ cvt.s.d $f2, $f2
|
||
|
/* 7E39D0 80282B50 0C00A8BB */ jal sin_deg
|
||
|
/* 7E39D4 80282B54 E622004C */ swc1 $f2, 0x4c($s1)
|
||
|
/* 7E39D8 80282B58 C642009C */ lwc1 $f2, 0x9c($s2)
|
||
|
/* 7E39DC 80282B5C 468010A0 */ cvt.s.w $f2, $f2
|
||
|
/* 7E39E0 80282B60 46001082 */ mul.s $f2, $f2, $f0
|
||
|
/* 7E39E4 80282B64 00000000 */ nop
|
||
|
/* 7E39E8 80282B68 46181082 */ mul.s $f2, $f2, $f24
|
||
|
/* 7E39EC 80282B6C 00000000 */ nop
|
||
|
/* 7E39F0 80282B70 460010A1 */ cvt.d.s $f2, $f2
|
||
|
/* 7E39F4 80282B74 46341082 */ mul.d $f2, $f2, $f20
|
||
|
/* 7E39F8 80282B78 00000000 */ nop
|
||
|
/* 7E39FC 80282B7C C6200048 */ lwc1 $f0, 0x48($s1)
|
||
|
/* 7E3A00 80282B80 46000021 */ cvt.d.s $f0, $f0
|
||
|
/* 7E3A04 80282B84 46220001 */ sub.d $f0, $f0, $f2
|
||
|
/* 7E3A08 80282B88 4600B306 */ mov.s $f12, $f22
|
||
|
/* 7E3A0C 80282B8C 46200020 */ cvt.s.d $f0, $f0
|
||
|
/* 7E3A10 80282B90 0C00A8BB */ jal sin_deg
|
||
|
/* 7E3A14 80282B94 E6200048 */ swc1 $f0, 0x48($s1)
|
||
|
/* 7E3A18 80282B98 C64200A4 */ lwc1 $f2, 0xa4($s2)
|
||
|
/* 7E3A1C 80282B9C 468010A0 */ cvt.s.w $f2, $f2
|
||
|
/* 7E3A20 80282BA0 46001082 */ mul.s $f2, $f2, $f0
|
||
|
/* 7E3A24 80282BA4 00000000 */ nop
|
||
|
/* 7E3A28 80282BA8 46181082 */ mul.s $f2, $f2, $f24
|
||
|
/* 7E3A2C 80282BAC 00000000 */ nop
|
||
|
/* 7E3A30 80282BB0 460010A1 */ cvt.d.s $f2, $f2
|
||
|
/* 7E3A34 80282BB4 46341082 */ mul.d $f2, $f2, $f20
|
||
|
/* 7E3A38 80282BB8 00000000 */ nop
|
||
|
/* 7E3A3C 80282BBC C6200050 */ lwc1 $f0, 0x50($s1)
|
||
|
/* 7E3A40 80282BC0 46000021 */ cvt.d.s $f0, $f0
|
||
|
/* 7E3A44 80282BC4 46220001 */ sub.d $f0, $f0, $f2
|
||
|
/* 7E3A48 80282BC8 46200020 */ cvt.s.d $f0, $f0
|
||
|
/* 7E3A4C 80282BCC 080A0AF9 */ j .L80282BE4
|
||
|
/* 7E3A50 80282BD0 E6200050 */ swc1 $f0, 0x50($s1)
|
||
|
.L80282BD4:
|
||
|
/* 7E3A54 80282BD4 44800000 */ mtc1 $zero, $f0
|
||
|
/* 7E3A58 80282BD8 00000000 */ nop
|
||
|
/* 7E3A5C 80282BDC E6200060 */ swc1 $f0, 0x60($s1)
|
||
|
/* 7E3A60 80282BE0 E6200068 */ swc1 $f0, 0x68($s1)
|
||
|
.L80282BE4:
|
||
|
/* 7E3A64 80282BE4 C6600028 */ lwc1 $f0, 0x28($s3)
|
||
|
/* 7E3A68 80282BE8 C662002C */ lwc1 $f2, 0x2c($s3)
|
||
|
/* 7E3A6C 80282BEC C6640030 */ lwc1 $f4, 0x30($s3)
|
||
|
/* 7E3A70 80282BF0 3C02800B */ lui $v0, 0x800b
|
||
|
/* 7E3A74 80282BF4 24421D80 */ addiu $v0, $v0, 0x1d80
|
||
|
/* 7E3A78 80282BF8 E4400060 */ swc1 $f0, 0x60($v0)
|
||
|
/* 7E3A7C 80282BFC E4420064 */ swc1 $f2, 0x64($v0)
|
||
|
/* 7E3A80 80282C00 E4440068 */ swc1 $f4, 0x68($v0)
|
||
|
/* 7E3A84 80282C04 8E430070 */ lw $v1, 0x70($s2)
|
||
|
/* 7E3A88 80282C08 24630001 */ addiu $v1, $v1, 1
|
||
|
/* 7E3A8C 80282C0C 3862000D */ xori $v0, $v1, 0xd
|
||
|
/* 7E3A90 80282C10 AE430070 */ sw $v1, 0x70($s2)
|
||
|
/* 7E3A94 80282C14 8FBF0020 */ lw $ra, 0x20($sp)
|
||
|
/* 7E3A98 80282C18 8FB3001C */ lw $s3, 0x1c($sp)
|
||
|
/* 7E3A9C 80282C1C 8FB20018 */ lw $s2, 0x18($sp)
|
||
|
/* 7E3AA0 80282C20 8FB10014 */ lw $s1, 0x14($sp)
|
||
|
/* 7E3AA4 80282C24 8FB00010 */ lw $s0, 0x10($sp)
|
||
|
/* 7E3AA8 80282C28 D7B80038 */ ldc1 $f24, 0x38($sp)
|
||
|
/* 7E3AAC 80282C2C D7B60030 */ ldc1 $f22, 0x30($sp)
|
||
|
/* 7E3AB0 80282C30 D7B40028 */ ldc1 $f20, 0x28($sp)
|
||
|
/* 7E3AB4 80282C34 2C420001 */ sltiu $v0, $v0, 1
|
||
|
/* 7E3AB8 80282C38 03E00008 */ jr $ra
|
||
|
/* 7E3ABC 80282C3C 27BD0040 */ addiu $sp, $sp, 0x40
|