mirror of
https://github.com/pmret/papermario.git
synced 2024-11-15 07:22:29 +01:00
3315d6010f
* all non-world rodata migrated * data disasm * kinda working * updated yaml * bloop * linker header * configure 2.0 * bin * mass rename to remove code_ * pause rename * battle partner stuff * whew * more renames * more renames * more renaming * it builds! * updates * remove main prefix * one more thing * crc, yay0 * .data, .rodata, .bss * img * dead_atan2 * it buildsgit add -A * split battle/partner/6FAD10 * rm &s on sleepy_sheep syms * sha1sum ninja rule description * OK but commented out PaperMarioMapFS and PaperMarioNpcSprites * uncomment * fix mapfs * match func_8003CFB4 * . * clean up and name npc_iter_no_op * npc.c * enable cc warnings * name npc_find_near * use singular options.asset_path * smores * cc_dsl only when needed * kinda fix configure for splat refactor2 * ok! * new msg format * remove old msg format docs * slight bug fixes, splat adjustment * git subrepo pull (merge) --force tools/splat subrepo: subdir: "tools/splat" merged: "cfc140bb76" upstream: origin: "https://github.com/ethteck/splat.git" branch: "master" commit: "cfc140bb76" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" * git subrepo pull (merge) --force tools/splat subrepo: subdir: "tools/splat" merged: "85349befcd" upstream: origin: "https://github.com/ethteck/splat.git" branch: "master" commit: "85349befcd" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" * Update symbol addrs * git subrepo pull tools/splat subrepo: subdir: "tools/splat" merged: "a44631e194" upstream: origin: "https://github.com/ethteck/splat.git" branch: "master" commit: "a44631e194" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" Co-authored-by: Alex Bates <hi@imalex.xyz>
154 lines
7.0 KiB
ArmAsm
154 lines
7.0 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
.section .rodata
|
|
|
|
glabel D_80098200
|
|
.double 0.01
|
|
|
|
glabel D_80098208
|
|
.double -0.01
|
|
|
|
.section .text
|
|
|
|
glabel get_screen_coords
|
|
/* 9938 8002E538 27BDFFB0 */ addiu $sp, $sp, -0x50
|
|
/* 993C 8002E53C AFB20040 */ sw $s2, 0x40($sp)
|
|
/* 9940 8002E540 8FB20060 */ lw $s2, 0x60($sp)
|
|
/* 9944 8002E544 AFB30044 */ sw $s3, 0x44($sp)
|
|
/* 9948 8002E548 8FB30064 */ lw $s3, 0x64($sp)
|
|
/* 994C 8002E54C AFB1003C */ sw $s1, 0x3c($sp)
|
|
/* 9950 8002E550 8FB10068 */ lw $s1, 0x68($sp)
|
|
/* 9954 8002E554 27A20028 */ addiu $v0, $sp, 0x28
|
|
/* 9958 8002E558 AFA20014 */ sw $v0, 0x14($sp)
|
|
/* 995C 8002E55C 27A2002C */ addiu $v0, $sp, 0x2c
|
|
/* 9960 8002E560 AFA20018 */ sw $v0, 0x18($sp)
|
|
/* 9964 8002E564 27A20030 */ addiu $v0, $sp, 0x30
|
|
/* 9968 8002E568 AFA2001C */ sw $v0, 0x1c($sp)
|
|
/* 996C 8002E56C 27A20034 */ addiu $v0, $sp, 0x34
|
|
/* 9970 8002E570 3C08800B */ lui $t0, %hi(gCameras)
|
|
/* 9974 8002E574 25081D80 */ addiu $t0, $t0, %lo(gCameras)
|
|
/* 9978 8002E578 AFA20020 */ sw $v0, 0x20($sp)
|
|
/* 997C 8002E57C 00041080 */ sll $v0, $a0, 2
|
|
/* 9980 8002E580 00441021 */ addu $v0, $v0, $a0
|
|
/* 9984 8002E584 00021080 */ sll $v0, $v0, 2
|
|
/* 9988 8002E588 00441023 */ subu $v0, $v0, $a0
|
|
/* 998C 8002E58C 000218C0 */ sll $v1, $v0, 3
|
|
/* 9990 8002E590 00431021 */ addu $v0, $v0, $v1
|
|
/* 9994 8002E594 000210C0 */ sll $v0, $v0, 3
|
|
/* 9998 8002E598 AFB00038 */ sw $s0, 0x38($sp)
|
|
/* 999C 8002E59C 00488021 */ addu $s0, $v0, $t0
|
|
/* 99A0 8002E5A0 3C013F80 */ lui $at, 0x3f80
|
|
/* 99A4 8002E5A4 44810000 */ mtc1 $at, $f0
|
|
/* 99A8 8002E5A8 260400D4 */ addiu $a0, $s0, 0xd4
|
|
/* 99AC 8002E5AC AFBF0048 */ sw $ra, 0x48($sp)
|
|
/* 99B0 8002E5B0 0C00A588 */ jal transform_point
|
|
/* 99B4 8002E5B4 E7A00010 */ swc1 $f0, 0x10($sp)
|
|
/* 99B8 8002E5B8 C7A00030 */ lwc1 $f0, 0x30($sp)
|
|
/* 99BC 8002E5BC 3C01459C */ lui $at, 0x459c
|
|
/* 99C0 8002E5C0 34214000 */ ori $at, $at, 0x4000
|
|
/* 99C4 8002E5C4 44811000 */ mtc1 $at, $f2
|
|
/* 99C8 8002E5C8 00000000 */ nop
|
|
/* 99CC 8002E5CC 46020000 */ add.s $f0, $f0, $f2
|
|
/* 99D0 8002E5D0 4600020D */ trunc.w.s $f8, $f0
|
|
/* 99D4 8002E5D4 44024000 */ mfc1 $v0, $f8
|
|
/* 99D8 8002E5D8 00000000 */ nop
|
|
/* 99DC 8002E5DC 04410003 */ bgez $v0, .L8002E5EC
|
|
/* 99E0 8002E5E0 AE220000 */ sw $v0, ($s1)
|
|
/* 99E4 8002E5E4 0800B97F */ j .L8002E5FC
|
|
/* 99E8 8002E5E8 AE200000 */ sw $zero, ($s1)
|
|
.L8002E5EC:
|
|
/* 99EC 8002E5EC 28422711 */ slti $v0, $v0, 0x2711
|
|
/* 99F0 8002E5F0 14400002 */ bnez $v0, .L8002E5FC
|
|
/* 99F4 8002E5F4 24022710 */ addiu $v0, $zero, 0x2710
|
|
/* 99F8 8002E5F8 AE220000 */ sw $v0, ($s1)
|
|
.L8002E5FC:
|
|
/* 99FC 8002E5FC C7A20034 */ lwc1 $f2, 0x34($sp)
|
|
/* 9A00 8002E600 3C01800A */ lui $at, %hi(D_80098200)
|
|
/* 9A04 8002E604 D4208200 */ ldc1 $f0, %lo(D_80098200)($at)
|
|
/* 9A08 8002E608 460010A1 */ cvt.d.s $f2, $f2
|
|
/* 9A0C 8002E60C 4620103C */ c.lt.d $f2, $f0
|
|
/* 9A10 8002E610 00000000 */ nop
|
|
/* 9A14 8002E614 4500000B */ bc1f .L8002E644
|
|
/* 9A18 8002E618 00000000 */ nop
|
|
/* 9A1C 8002E61C 3C01800A */ lui $at, %hi(D_80098208)
|
|
/* 9A20 8002E620 D4208208 */ ldc1 $f0, %lo(D_80098208)($at)
|
|
/* 9A24 8002E624 4622003C */ c.lt.d $f0, $f2
|
|
/* 9A28 8002E628 00000000 */ nop
|
|
/* 9A2C 8002E62C 45000005 */ bc1f .L8002E644
|
|
/* 9A30 8002E630 00000000 */ nop
|
|
/* 9A34 8002E634 AE400000 */ sw $zero, ($s2)
|
|
/* 9A38 8002E638 AE600000 */ sw $zero, ($s3)
|
|
/* 9A3C 8002E63C 0800B9CE */ j .L8002E738
|
|
/* 9A40 8002E640 AE200000 */ sw $zero, ($s1)
|
|
.L8002E644:
|
|
/* 9A44 8002E644 C7A00034 */ lwc1 $f0, 0x34($sp)
|
|
/* 9A48 8002E648 3C013F80 */ lui $at, 0x3f80
|
|
/* 9A4C 8002E64C 44812000 */ mtc1 $at, $f4
|
|
/* 9A50 8002E650 C7A20028 */ lwc1 $f2, 0x28($sp)
|
|
/* 9A54 8002E654 9603000A */ lhu $v1, 0xa($s0)
|
|
/* 9A58 8002E658 46002103 */ div.s $f4, $f4, $f0
|
|
/* 9A5C 8002E65C 46041082 */ mul.s $f2, $f2, $f4
|
|
/* 9A60 8002E660 00000000 */ nop
|
|
/* 9A64 8002E664 00031C00 */ sll $v1, $v1, 0x10
|
|
/* 9A68 8002E668 00031403 */ sra $v0, $v1, 0x10
|
|
/* 9A6C 8002E66C 44820000 */ mtc1 $v0, $f0
|
|
/* 9A70 8002E670 00000000 */ nop
|
|
/* 9A74 8002E674 46800020 */ cvt.s.w $f0, $f0
|
|
/* 9A78 8002E678 46001082 */ mul.s $f2, $f2, $f0
|
|
/* 9A7C 8002E67C 00000000 */ nop
|
|
/* 9A80 8002E680 3C013F00 */ lui $at, 0x3f00
|
|
/* 9A84 8002E684 44813000 */ mtc1 $at, $f6
|
|
/* 9A88 8002E688 00000000 */ nop
|
|
/* 9A8C 8002E68C 46061082 */ mul.s $f2, $f2, $f6
|
|
/* 9A90 8002E690 00000000 */ nop
|
|
/* 9A94 8002E694 00031FC2 */ srl $v1, $v1, 0x1f
|
|
/* 9A98 8002E698 00431021 */ addu $v0, $v0, $v1
|
|
/* 9A9C 8002E69C 00021043 */ sra $v0, $v0, 1
|
|
/* 9AA0 8002E6A0 44820000 */ mtc1 $v0, $f0
|
|
/* 9AA4 8002E6A4 00000000 */ nop
|
|
/* 9AA8 8002E6A8 46800020 */ cvt.s.w $f0, $f0
|
|
/* 9AAC 8002E6AC 46020000 */ add.s $f0, $f0, $f2
|
|
/* 9AB0 8002E6B0 E7A40034 */ swc1 $f4, 0x34($sp)
|
|
/* 9AB4 8002E6B4 8603000E */ lh $v1, 0xe($s0)
|
|
/* 9AB8 8002E6B8 4600020D */ trunc.w.s $f8, $f0
|
|
/* 9ABC 8002E6BC 44024000 */ mfc1 $v0, $f8
|
|
/* 9AC0 8002E6C0 00000000 */ nop
|
|
/* 9AC4 8002E6C4 00431021 */ addu $v0, $v0, $v1
|
|
/* 9AC8 8002E6C8 AE420000 */ sw $v0, ($s2)
|
|
/* 9ACC 8002E6CC C7A2002C */ lwc1 $f2, 0x2c($sp)
|
|
/* 9AD0 8002E6D0 C7A00034 */ lwc1 $f0, 0x34($sp)
|
|
/* 9AD4 8002E6D4 9603000C */ lhu $v1, 0xc($s0)
|
|
/* 9AD8 8002E6D8 46001082 */ mul.s $f2, $f2, $f0
|
|
/* 9ADC 8002E6DC 00000000 */ nop
|
|
/* 9AE0 8002E6E0 00031C00 */ sll $v1, $v1, 0x10
|
|
/* 9AE4 8002E6E4 00031403 */ sra $v0, $v1, 0x10
|
|
/* 9AE8 8002E6E8 44820000 */ mtc1 $v0, $f0
|
|
/* 9AEC 8002E6EC 00000000 */ nop
|
|
/* 9AF0 8002E6F0 46800020 */ cvt.s.w $f0, $f0
|
|
/* 9AF4 8002E6F4 46001082 */ mul.s $f2, $f2, $f0
|
|
/* 9AF8 8002E6F8 00000000 */ nop
|
|
/* 9AFC 8002E6FC 46061082 */ mul.s $f2, $f2, $f6
|
|
/* 9B00 8002E700 00000000 */ nop
|
|
/* 9B04 8002E704 00031FC2 */ srl $v1, $v1, 0x1f
|
|
/* 9B08 8002E708 00431021 */ addu $v0, $v0, $v1
|
|
/* 9B0C 8002E70C 00021043 */ sra $v0, $v0, 1
|
|
/* 9B10 8002E710 44820000 */ mtc1 $v0, $f0
|
|
/* 9B14 8002E714 00000000 */ nop
|
|
/* 9B18 8002E718 46800020 */ cvt.s.w $f0, $f0
|
|
/* 9B1C 8002E71C 46020001 */ sub.s $f0, $f0, $f2
|
|
/* 9B20 8002E720 86030010 */ lh $v1, 0x10($s0)
|
|
/* 9B24 8002E724 4600020D */ trunc.w.s $f8, $f0
|
|
/* 9B28 8002E728 44024000 */ mfc1 $v0, $f8
|
|
/* 9B2C 8002E72C 00000000 */ nop
|
|
/* 9B30 8002E730 00431021 */ addu $v0, $v0, $v1
|
|
/* 9B34 8002E734 AE620000 */ sw $v0, ($s3)
|
|
.L8002E738:
|
|
/* 9B38 8002E738 8FBF0048 */ lw $ra, 0x48($sp)
|
|
/* 9B3C 8002E73C 8FB30044 */ lw $s3, 0x44($sp)
|
|
/* 9B40 8002E740 8FB20040 */ lw $s2, 0x40($sp)
|
|
/* 9B44 8002E744 8FB1003C */ lw $s1, 0x3c($sp)
|
|
/* 9B48 8002E748 8FB00038 */ lw $s0, 0x38($sp)
|
|
/* 9B4C 8002E74C 03E00008 */ jr $ra
|
|
/* 9B50 8002E750 27BD0050 */ addiu $sp, $sp, 0x50
|