papermario/ver/jp/asm/nonmatchings/13530/func_8003C574.s
Ethan Roseman 3315d6010f
Splat refactor (#257)
* 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>
2021-04-13 16:47:52 +09:00

60 lines
2.9 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8003C574
/* 17974 8003C574 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 17978 8003C578 AFB00020 */ sw $s0, 0x20($sp)
/* 1797C 8003C57C 00858021 */ addu $s0, $a0, $a1
/* 17980 8003C580 AFBF0024 */ sw $ra, 0x24($sp)
/* 17984 8003C584 82030330 */ lb $v1, 0x330($s0)
/* 17988 8003C588 10600005 */ beqz $v1, .L8003C5A0
/* 1798C 8003C58C 24020001 */ addiu $v0, $zero, 1
/* 17990 8003C590 1062001A */ beq $v1, $v0, .L8003C5FC
/* 17994 8003C594 00051080 */ sll $v0, $a1, 2
/* 17998 8003C598 0800F18D */ j .L8003C634
/* 1799C 8003C59C 00000000 */ nop
.L8003C5A0:
/* 179A0 8003C5A0 848300A8 */ lh $v1, 0xa8($a0)
/* 179A4 8003C5A4 C482003C */ lwc1 $f2, 0x3c($a0)
/* 179A8 8003C5A8 24020003 */ addiu $v0, $zero, 3
/* 179AC 8003C5AC AFA20014 */ sw $v0, 0x14($sp)
/* 179B0 8003C5B0 00051080 */ sll $v0, $a1, 2
/* 179B4 8003C5B4 24420324 */ addiu $v0, $v0, 0x324
/* 179B8 8003C5B8 3C0141A0 */ lui $at, 0x41a0
/* 179BC 8003C5BC 44810000 */ mtc1 $at, $f0
/* 179C0 8003C5C0 00821021 */ addu $v0, $a0, $v0
/* 179C4 8003C5C4 AFA20018 */ sw $v0, 0x18($sp)
/* 179C8 8003C5C8 E7A00010 */ swc1 $f0, 0x10($sp)
/* 179CC 8003C5CC 44830000 */ mtc1 $v1, $f0
/* 179D0 8003C5D0 00000000 */ nop
/* 179D4 8003C5D4 46800020 */ cvt.s.w $f0, $f0
/* 179D8 8003C5D8 46001080 */ add.s $f2, $f2, $f0
/* 179DC 8003C5DC 8C850038 */ lw $a1, 0x38($a0)
/* 179E0 8003C5E0 8C870040 */ lw $a3, 0x40($a0)
/* 179E4 8003C5E4 44061000 */ mfc1 $a2, $f2
/* 179E8 8003C5E8 0C01C284 */ jal func_80070A10
/* 179EC 8003C5EC 0000202D */ daddu $a0, $zero, $zero
/* 179F0 8003C5F0 24020001 */ addiu $v0, $zero, 1
/* 179F4 8003C5F4 0800F18D */ j .L8003C634
/* 179F8 8003C5F8 A2020330 */ sb $v0, 0x330($s0)
.L8003C5FC:
/* 179FC 8003C5FC 00821021 */ addu $v0, $a0, $v0
/* 17A00 8003C600 8C420324 */ lw $v0, 0x324($v0)
/* 17A04 8003C604 C4800038 */ lwc1 $f0, 0x38($a0)
/* 17A08 8003C608 8C43000C */ lw $v1, 0xc($v0)
/* 17A0C 8003C60C E4600004 */ swc1 $f0, 4($v1)
/* 17A10 8003C610 848200A8 */ lh $v0, 0xa8($a0)
/* 17A14 8003C614 C480003C */ lwc1 $f0, 0x3c($a0)
/* 17A18 8003C618 44821000 */ mtc1 $v0, $f2
/* 17A1C 8003C61C 00000000 */ nop
/* 17A20 8003C620 468010A0 */ cvt.s.w $f2, $f2
/* 17A24 8003C624 46020000 */ add.s $f0, $f0, $f2
/* 17A28 8003C628 E4600008 */ swc1 $f0, 8($v1)
/* 17A2C 8003C62C C4800040 */ lwc1 $f0, 0x40($a0)
/* 17A30 8003C630 E460000C */ swc1 $f0, 0xc($v1)
.L8003C634:
/* 17A34 8003C634 8FBF0024 */ lw $ra, 0x24($sp)
/* 17A38 8003C638 8FB00020 */ lw $s0, 0x20($sp)
/* 17A3C 8003C63C 03E00008 */ jr $ra
/* 17A40 8003C640 27BD0028 */ addiu $sp, $sp, 0x28