mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 08:52:40 +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>
173 lines
8.5 KiB
ArmAsm
173 lines
8.5 KiB
ArmAsm
.set noat # allow manual use of $at
|
|
.set noreorder # don't insert nops after branches
|
|
|
|
glabel func_80051FDC
|
|
/* 2D3DC 80051FDC 27BDFFC8 */ addiu $sp, $sp, -0x38
|
|
/* 2D3E0 80051FE0 AFB60028 */ sw $s6, 0x28($sp)
|
|
/* 2D3E4 80051FE4 0080B02D */ daddu $s6, $a0, $zero
|
|
/* 2D3E8 80051FE8 AFB40020 */ sw $s4, 0x20($sp)
|
|
/* 2D3EC 80051FEC 00A0A02D */ daddu $s4, $a1, $zero
|
|
/* 2D3F0 80051FF0 AFBF0030 */ sw $ra, 0x30($sp)
|
|
/* 2D3F4 80051FF4 AFB7002C */ sw $s7, 0x2c($sp)
|
|
/* 2D3F8 80051FF8 AFB50024 */ sw $s5, 0x24($sp)
|
|
/* 2D3FC 80051FFC AFB3001C */ sw $s3, 0x1c($sp)
|
|
/* 2D400 80052000 AFB20018 */ sw $s2, 0x18($sp)
|
|
/* 2D404 80052004 AFB10014 */ sw $s1, 0x14($sp)
|
|
/* 2D408 80052008 AFB00010 */ sw $s0, 0x10($sp)
|
|
/* 2D40C 8005200C 92820025 */ lbu $v0, 0x25($s4)
|
|
/* 2D410 80052010 8ED70000 */ lw $s7, ($s6)
|
|
/* 2D414 80052014 14400081 */ bnez $v0, .L8005221C
|
|
/* 2D418 80052018 0000A82D */ daddu $s5, $zero, $zero
|
|
.L8005201C:
|
|
/* 2D41C 8005201C 00151080 */ sll $v0, $s5, 2
|
|
/* 2D420 80052020 244201D4 */ addiu $v0, $v0, 0x1d4
|
|
/* 2D424 80052024 02829821 */ addu $s3, $s4, $v0
|
|
/* 2D428 80052028 92620001 */ lbu $v0, 1($s3)
|
|
/* 2D42C 8005202C 50400076 */ beql $v0, $zero, .L80052208
|
|
/* 2D430 80052030 26B50001 */ addiu $s5, $s5, 1
|
|
/* 2D434 80052034 92620000 */ lbu $v0, ($s3)
|
|
/* 2D438 80052038 8E900030 */ lw $s0, 0x30($s4)
|
|
/* 2D43C 8005203C 8E840034 */ lw $a0, 0x34($s4)
|
|
/* 2D440 80052040 00021880 */ sll $v1, $v0, 2
|
|
/* 2D444 80052044 00621821 */ addu $v1, $v1, $v0
|
|
/* 2D448 80052048 000318C0 */ sll $v1, $v1, 3
|
|
/* 2D44C 8005204C 24630044 */ addiu $v1, $v1, 0x44
|
|
/* 2D450 80052050 0204102B */ sltu $v0, $s0, $a0
|
|
/* 2D454 80052054 10400012 */ beqz $v0, .L800520A0
|
|
/* 2D458 80052058 02839021 */ addu $s2, $s4, $v1
|
|
/* 2D45C 8005205C 001010C0 */ sll $v0, $s0, 3
|
|
/* 2D460 80052060 00501021 */ addu $v0, $v0, $s0
|
|
/* 2D464 80052064 000210C0 */ sll $v0, $v0, 3
|
|
/* 2D468 80052068 24431320 */ addiu $v1, $v0, 0x1320
|
|
.L8005206C:
|
|
/* 2D46C 8005206C 02E38821 */ addu $s1, $s7, $v1
|
|
/* 2D470 80052070 92220045 */ lbu $v0, 0x45($s1)
|
|
/* 2D474 80052074 10400005 */ beqz $v0, .L8005208C
|
|
/* 2D478 80052078 00000000 */ nop
|
|
/* 2D47C 8005207C 26100001 */ addiu $s0, $s0, 1
|
|
/* 2D480 80052080 0204102B */ sltu $v0, $s0, $a0
|
|
/* 2D484 80052084 1440FFF9 */ bnez $v0, .L8005206C
|
|
/* 2D488 80052088 24630048 */ addiu $v1, $v1, 0x48
|
|
.L8005208C:
|
|
/* 2D48C 8005208C 8E820034 */ lw $v0, 0x34($s4)
|
|
/* 2D490 80052090 0202102B */ sltu $v0, $s0, $v0
|
|
/* 2D494 80052094 1440001C */ bnez $v0, .L80052108
|
|
/* 2D498 80052098 00000000 */ nop
|
|
/* 2D49C 8005209C 8E900030 */ lw $s0, 0x30($s4)
|
|
.L800520A0:
|
|
/* 2D4A0 800520A0 8E820034 */ lw $v0, 0x34($s4)
|
|
/* 2D4A4 800520A4 0202102B */ sltu $v0, $s0, $v0
|
|
/* 2D4A8 800520A8 10400056 */ beqz $v0, .L80052204
|
|
/* 2D4AC 800520AC 001010C0 */ sll $v0, $s0, 3
|
|
/* 2D4B0 800520B0 00501021 */ addu $v0, $v0, $s0
|
|
/* 2D4B4 800520B4 000210C0 */ sll $v0, $v0, 3
|
|
/* 2D4B8 800520B8 24441320 */ addiu $a0, $v0, 0x1320
|
|
.L800520BC:
|
|
/* 2D4BC 800520BC 02E48821 */ addu $s1, $s7, $a0
|
|
/* 2D4C0 800520C0 92220045 */ lbu $v0, 0x45($s1)
|
|
/* 2D4C4 800520C4 92C30022 */ lbu $v1, 0x22($s6)
|
|
/* 2D4C8 800520C8 0043102B */ sltu $v0, $v0, $v1
|
|
/* 2D4CC 800520CC 50400006 */ beql $v0, $zero, .L800520E8
|
|
/* 2D4D0 800520D0 26100001 */ addiu $s0, $s0, 1
|
|
/* 2D4D4 800520D4 0220202D */ daddu $a0, $s1, $zero
|
|
/* 2D4D8 800520D8 0C014D5D */ jal func_80053574
|
|
/* 2D4DC 800520DC 320500FF */ andi $a1, $s0, 0xff
|
|
/* 2D4E0 800520E0 0801483E */ j .L800520F8
|
|
/* 2D4E4 800520E4 00000000 */ nop
|
|
.L800520E8:
|
|
/* 2D4E8 800520E8 8E820034 */ lw $v0, 0x34($s4)
|
|
/* 2D4EC 800520EC 0202102B */ sltu $v0, $s0, $v0
|
|
/* 2D4F0 800520F0 1440FFF2 */ bnez $v0, .L800520BC
|
|
/* 2D4F4 800520F4 24840048 */ addiu $a0, $a0, 0x48
|
|
.L800520F8:
|
|
/* 2D4F8 800520F8 8E820034 */ lw $v0, 0x34($s4)
|
|
/* 2D4FC 800520FC 0202102B */ sltu $v0, $s0, $v0
|
|
/* 2D500 80052100 50400041 */ beql $v0, $zero, .L80052208
|
|
/* 2D504 80052104 26B50001 */ addiu $s5, $s5, 1
|
|
.L80052108:
|
|
/* 2D508 80052108 8E850030 */ lw $a1, 0x30($s4)
|
|
/* 2D50C 8005210C 92640000 */ lbu $a0, ($s3)
|
|
/* 2D510 80052110 8E830014 */ lw $v1, 0x14($s4)
|
|
/* 2D514 80052114 92620001 */ lbu $v0, 1($s3)
|
|
/* 2D518 80052118 02052823 */ subu $a1, $s0, $a1
|
|
/* 2D51C 8005211C 000528C0 */ sll $a1, $a1, 3
|
|
/* 2D520 80052120 24A507B4 */ addiu $a1, $a1, 0x7b4
|
|
/* 2D524 80052124 02C52821 */ addu $a1, $s6, $a1
|
|
/* 2D528 80052128 00042400 */ sll $a0, $a0, 0x10
|
|
/* 2D52C 8005212C 00641821 */ addu $v1, $v1, $a0
|
|
/* 2D530 80052130 00021200 */ sll $v0, $v0, 8
|
|
/* 2D534 80052134 00621821 */ addu $v1, $v1, $v0
|
|
/* 2D538 80052138 ACA30000 */ sw $v1, ($a1)
|
|
/* 2D53C 8005213C 92630001 */ lbu $v1, 1($s3)
|
|
/* 2D540 80052140 8E440000 */ lw $a0, ($s2)
|
|
/* 2D544 80052144 3063007F */ andi $v1, $v1, 0x7f
|
|
/* 2D548 80052148 00031040 */ sll $v0, $v1, 1
|
|
/* 2D54C 8005214C 00431021 */ addu $v0, $v0, $v1
|
|
/* 2D550 80052150 000210C0 */ sll $v0, $v0, 3
|
|
/* 2D554 80052154 00431021 */ addu $v0, $v0, $v1
|
|
/* 2D558 80052158 9483001E */ lhu $v1, 0x1e($a0)
|
|
/* 2D55C 8005215C 00021080 */ sll $v0, $v0, 2
|
|
/* 2D560 80052160 00431023 */ subu $v0, $v0, $v1
|
|
/* 2D564 80052164 A4A20004 */ sh $v0, 4($a1)
|
|
/* 2D568 80052168 92630002 */ lbu $v1, 2($s3)
|
|
/* 2D56C 8005216C 3063007F */ andi $v1, $v1, 0x7f
|
|
/* 2D570 80052170 A0A30006 */ sb $v1, 6($a1)
|
|
/* 2D574 80052174 82840038 */ lb $a0, 0x38($s4)
|
|
/* 2D578 80052178 86420018 */ lh $v0, 0x18($s2)
|
|
/* 2D57C 8005217C 00820018 */ mult $a0, $v0
|
|
/* 2D580 80052180 00003012 */ mflo $a2
|
|
/* 2D584 80052184 00000000 */ nop
|
|
/* 2D588 80052188 00000000 */ nop
|
|
/* 2D58C 8005218C 00C30018 */ mult $a2, $v1
|
|
/* 2D590 80052190 00003012 */ mflo $a2
|
|
/* 2D594 80052194 00061383 */ sra $v0, $a2, 0xe
|
|
/* 2D598 80052198 A6220040 */ sh $v0, 0x40($s1)
|
|
/* 2D59C 8005219C 84A20004 */ lh $v0, 4($a1)
|
|
/* 2D5A0 800521A0 8644000C */ lh $a0, 0xc($s2)
|
|
/* 2D5A4 800521A4 0C014D6A */ jal func_800535A8
|
|
/* 2D5A8 800521A8 00442021 */ addu $a0, $v0, $a0
|
|
/* 2D5AC 800521AC 8E420000 */ lw $v0, ($s2)
|
|
/* 2D5B0 800521B0 C4420020 */ lwc1 $f2, 0x20($v0)
|
|
/* 2D5B4 800521B4 46020002 */ mul.s $f0, $f0, $f2
|
|
/* 2D5B8 800521B8 00000000 */ nop
|
|
/* 2D5BC 800521BC E6200004 */ swc1 $f0, 4($s1)
|
|
/* 2D5C0 800521C0 92420024 */ lbu $v0, 0x24($s2)
|
|
/* 2D5C4 800521C4 A222000E */ sb $v0, 0xe($s1)
|
|
/* 2D5C8 800521C8 92420025 */ lbu $v0, 0x25($s2)
|
|
/* 2D5CC 800521CC A222000F */ sb $v0, 0xf($s1)
|
|
/* 2D5D0 800521D0 8E420000 */ lw $v0, ($s2)
|
|
/* 2D5D4 800521D4 AE220000 */ sw $v0, ($s1)
|
|
/* 2D5D8 800521D8 92C20023 */ lbu $v0, 0x23($s6)
|
|
/* 2D5DC 800521DC A2220010 */ sb $v0, 0x10($s1)
|
|
/* 2D5E0 800521E0 8E420004 */ lw $v0, 4($s2)
|
|
/* 2D5E4 800521E4 AE220014 */ sw $v0, 0x14($s1)
|
|
/* 2D5E8 800521E8 8E430008 */ lw $v1, 8($s2)
|
|
/* 2D5EC 800521EC 24020002 */ addiu $v0, $zero, 2
|
|
/* 2D5F0 800521F0 A2220043 */ sb $v0, 0x43($s1)
|
|
/* 2D5F4 800521F4 AE230018 */ sw $v1, 0x18($s1)
|
|
/* 2D5F8 800521F8 92C20022 */ lbu $v0, 0x22($s6)
|
|
/* 2D5FC 800521FC A2220045 */ sb $v0, 0x45($s1)
|
|
/* 2D600 80052200 A2220044 */ sb $v0, 0x44($s1)
|
|
.L80052204:
|
|
/* 2D604 80052204 26B50001 */ addiu $s5, $s5, 1
|
|
.L80052208:
|
|
/* 2D608 80052208 2EA20004 */ sltiu $v0, $s5, 4
|
|
/* 2D60C 8005220C A2600000 */ sb $zero, ($s3)
|
|
/* 2D610 80052210 A2600001 */ sb $zero, 1($s3)
|
|
/* 2D614 80052214 1440FF81 */ bnez $v0, .L8005201C
|
|
/* 2D618 80052218 A2600002 */ sb $zero, 2($s3)
|
|
.L8005221C:
|
|
/* 2D61C 8005221C 8FBF0030 */ lw $ra, 0x30($sp)
|
|
/* 2D620 80052220 8FB7002C */ lw $s7, 0x2c($sp)
|
|
/* 2D624 80052224 8FB60028 */ lw $s6, 0x28($sp)
|
|
/* 2D628 80052228 8FB50024 */ lw $s5, 0x24($sp)
|
|
/* 2D62C 8005222C 8FB40020 */ lw $s4, 0x20($sp)
|
|
/* 2D630 80052230 8FB3001C */ lw $s3, 0x1c($sp)
|
|
/* 2D634 80052234 8FB20018 */ lw $s2, 0x18($sp)
|
|
/* 2D638 80052238 8FB10014 */ lw $s1, 0x14($sp)
|
|
/* 2D63C 8005223C 8FB00010 */ lw $s0, 0x10($sp)
|
|
/* 2D640 80052240 03E00008 */ jr $ra
|
|
/* 2D644 80052244 27BD0038 */ addiu $sp, $sp, 0x38
|
|
/* 2D648 80052248 00000000 */ nop
|
|
/* 2D64C 8005224C 00000000 */ nop
|