papermario/ver/jp/asm/nonmatchings/35F50/func_8005C14C.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

205 lines
9.8 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8005C14C
/* 3754C 8005C14C C4800030 */ lwc1 $f0, 0x30($a0)
/* 37550 8005C150 44801000 */ mtc1 $zero, $f2
/* 37554 8005C154 00000000 */ nop
/* 37558 8005C158 46020032 */ c.eq.s $f0, $f2
/* 3755C 8005C15C 00000000 */ nop
/* 37560 8005C160 4500000B */ bc1f .L8005C190
/* 37564 8005C164 00000000 */ nop
/* 37568 8005C168 C4800034 */ lwc1 $f0, 0x34($a0)
/* 3756C 8005C16C 46020032 */ c.eq.s $f0, $f2
/* 37570 8005C170 00000000 */ nop
/* 37574 8005C174 45000006 */ bc1f .L8005C190
/* 37578 8005C178 00000000 */ nop
/* 3757C 8005C17C C4800038 */ lwc1 $f0, 0x38($a0)
/* 37580 8005C180 46020032 */ c.eq.s $f0, $f2
/* 37584 8005C184 00000000 */ nop
/* 37588 8005C188 45010050 */ bc1t .L8005C2CC
/* 3758C 8005C18C 00000000 */ nop
.L8005C190:
/* 37590 8005C190 8C820000 */ lw $v0, ($a0)
/* 37594 8005C194 3C01800A */ lui $at, %hi(D_800A2040)
/* 37598 8005C198 C4322040 */ lwc1 $f18, %lo(D_800A2040)($at)
/* 3759C 8005C19C C4400000 */ lwc1 $f0, ($v0)
/* 375A0 8005C1A0 46009301 */ sub.s $f12, $f18, $f0
/* 375A4 8005C1A4 C4840030 */ lwc1 $f4, 0x30($a0)
/* 375A8 8005C1A8 460C2102 */ mul.s $f4, $f4, $f12
/* 375AC 8005C1AC 00000000 */ nop
/* 375B0 8005C1B0 3C01800A */ lui $at, %hi(D_800A2044)
/* 375B4 8005C1B4 C4222044 */ lwc1 $f2, %lo(D_800A2044)($at)
/* 375B8 8005C1B8 C4400004 */ lwc1 $f0, 4($v0)
/* 375BC 8005C1BC 46001081 */ sub.s $f2, $f2, $f0
/* 375C0 8005C1C0 C4860034 */ lwc1 $f6, 0x34($a0)
/* 375C4 8005C1C4 46023082 */ mul.s $f2, $f6, $f2
/* 375C8 8005C1C8 00000000 */ nop
/* 375CC 8005C1CC 3C01800A */ lui $at, %hi(D_800A2048)
/* 375D0 8005C1D0 C42E2048 */ lwc1 $f14, %lo(D_800A2048)($at)
/* 375D4 8005C1D4 C4400008 */ lwc1 $f0, 8($v0)
/* 375D8 8005C1D8 46007201 */ sub.s $f8, $f14, $f0
/* 375DC 8005C1DC C4800038 */ lwc1 $f0, 0x38($a0)
/* 375E0 8005C1E0 46080002 */ mul.s $f0, $f0, $f8
/* 375E4 8005C1E4 00000000 */ nop
/* 375E8 8005C1E8 8C830004 */ lw $v1, 4($a0)
/* 375EC 8005C1EC 46022100 */ add.s $f4, $f4, $f2
/* 375F0 8005C1F0 8C850008 */ lw $a1, 8($a0)
/* 375F4 8005C1F4 8482003C */ lh $v0, 0x3c($a0)
/* 375F8 8005C1F8 10400036 */ beqz $v0, .L8005C2D4
/* 375FC 8005C1FC 46002280 */ add.s $f10, $f4, $f0
/* 37600 8005C200 44808000 */ mtc1 $zero, $f16
/* 37604 8005C204 00000000 */ nop
/* 37608 8005C208 4610503C */ c.lt.s $f10, $f16
/* 3760C 8005C20C 00000000 */ nop
/* 37610 8005C210 4501002E */ bc1t .L8005C2CC
/* 37614 8005C214 00000000 */ nop
/* 37618 8005C218 4610303E */ c.le.s $f6, $f16
/* 3761C 8005C21C 00000000 */ nop
/* 37620 8005C220 4501002A */ bc1t .L8005C2CC
/* 37624 8005C224 00000000 */ nop
/* 37628 8005C228 C482000C */ lwc1 $f2, 0xc($a0)
/* 3762C 8005C22C 46024082 */ mul.s $f2, $f8, $f2
/* 37630 8005C230 00000000 */ nop
/* 37634 8005C234 C4800014 */ lwc1 $f0, 0x14($a0)
/* 37638 8005C238 46006002 */ mul.s $f0, $f12, $f0
/* 3763C 8005C23C 00000000 */ nop
/* 37640 8005C240 46001081 */ sub.s $f2, $f2, $f0
/* 37644 8005C244 4610103C */ c.lt.s $f2, $f16
/* 37648 8005C248 00000000 */ nop
/* 3764C 8005C24C 4501001F */ bc1t .L8005C2CC
/* 37650 8005C250 00000000 */ nop
/* 37654 8005C254 C4620008 */ lwc1 $f2, 8($v1)
/* 37658 8005C258 46027081 */ sub.s $f2, $f14, $f2
/* 3765C 8005C25C C4800018 */ lwc1 $f0, 0x18($a0)
/* 37660 8005C260 46001082 */ mul.s $f2, $f2, $f0
/* 37664 8005C264 00000000 */ nop
/* 37668 8005C268 C4600000 */ lwc1 $f0, ($v1)
/* 3766C 8005C26C 46009001 */ sub.s $f0, $f18, $f0
/* 37670 8005C270 C4840020 */ lwc1 $f4, 0x20($a0)
/* 37674 8005C274 46040002 */ mul.s $f0, $f0, $f4
/* 37678 8005C278 00000000 */ nop
/* 3767C 8005C27C 46001081 */ sub.s $f2, $f2, $f0
/* 37680 8005C280 4610103C */ c.lt.s $f2, $f16
/* 37684 8005C284 00000000 */ nop
/* 37688 8005C288 45010010 */ bc1t .L8005C2CC
/* 3768C 8005C28C 00000000 */ nop
/* 37690 8005C290 C4A20008 */ lwc1 $f2, 8($a1)
/* 37694 8005C294 46027081 */ sub.s $f2, $f14, $f2
/* 37698 8005C298 C4800024 */ lwc1 $f0, 0x24($a0)
/* 3769C 8005C29C 46001082 */ mul.s $f2, $f2, $f0
/* 376A0 8005C2A0 00000000 */ nop
/* 376A4 8005C2A4 C4A00000 */ lwc1 $f0, ($a1)
/* 376A8 8005C2A8 46009001 */ sub.s $f0, $f18, $f0
/* 376AC 8005C2AC C484002C */ lwc1 $f4, 0x2c($a0)
/* 376B0 8005C2B0 46040002 */ mul.s $f0, $f0, $f4
/* 376B4 8005C2B4 00000000 */ nop
/* 376B8 8005C2B8 46001081 */ sub.s $f2, $f2, $f0
/* 376BC 8005C2BC 4610103C */ c.lt.s $f2, $f16
/* 376C0 8005C2C0 00000000 */ nop
.L8005C2C4:
/* 376C4 8005C2C4 45000039 */ bc1f .L8005C3AC
/* 376C8 8005C2C8 00000000 */ nop
.L8005C2CC:
/* 376CC 8005C2CC 03E00008 */ jr $ra
/* 376D0 8005C2D0 0000102D */ daddu $v0, $zero, $zero
.L8005C2D4:
/* 376D4 8005C2D4 460A3002 */ mul.s $f0, $f6, $f10
/* 376D8 8005C2D8 00000000 */ nop
/* 376DC 8005C2DC 44803000 */ mtc1 $zero, $f6
/* 376E0 8005C2E0 00000000 */ nop
/* 376E4 8005C2E4 4606003E */ c.le.s $f0, $f6
/* 376E8 8005C2E8 00000000 */ nop
/* 376EC 8005C2EC 4501FFF7 */ bc1t .L8005C2CC
/* 376F0 8005C2F0 00000000 */ nop
/* 376F4 8005C2F4 C480000C */ lwc1 $f0, 0xc($a0)
/* 376F8 8005C2F8 46004002 */ mul.s $f0, $f8, $f0
/* 376FC 8005C2FC 00000000 */ nop
/* 37700 8005C300 C4820014 */ lwc1 $f2, 0x14($a0)
/* 37704 8005C304 46026082 */ mul.s $f2, $f12, $f2
/* 37708 8005C308 00000000 */ nop
/* 3770C 8005C30C 46020001 */ sub.s $f0, $f0, $f2
/* 37710 8005C310 460A0002 */ mul.s $f0, $f0, $f10
/* 37714 8005C314 00000000 */ nop
/* 37718 8005C318 4606003C */ c.lt.s $f0, $f6
/* 3771C 8005C31C 00000000 */ nop
/* 37720 8005C320 4501FFEA */ bc1t .L8005C2CC
/* 37724 8005C324 00000000 */ nop
/* 37728 8005C328 C4600008 */ lwc1 $f0, 8($v1)
/* 3772C 8005C32C 46007001 */ sub.s $f0, $f14, $f0
/* 37730 8005C330 C4820018 */ lwc1 $f2, 0x18($a0)
/* 37734 8005C334 46020002 */ mul.s $f0, $f0, $f2
/* 37738 8005C338 00000000 */ nop
/* 3773C 8005C33C C4620000 */ lwc1 $f2, ($v1)
/* 37740 8005C340 46029081 */ sub.s $f2, $f18, $f2
/* 37744 8005C344 C4840020 */ lwc1 $f4, 0x20($a0)
/* 37748 8005C348 46041082 */ mul.s $f2, $f2, $f4
/* 3774C 8005C34C 00000000 */ nop
/* 37750 8005C350 46020001 */ sub.s $f0, $f0, $f2
/* 37754 8005C354 460A0002 */ mul.s $f0, $f0, $f10
/* 37758 8005C358 00000000 */ nop
/* 3775C 8005C35C 4606003C */ c.lt.s $f0, $f6
/* 37760 8005C360 00000000 */ nop
/* 37764 8005C364 4501FFD9 */ bc1t .L8005C2CC
/* 37768 8005C368 00000000 */ nop
/* 3776C 8005C36C C4A00008 */ lwc1 $f0, 8($a1)
/* 37770 8005C370 46007001 */ sub.s $f0, $f14, $f0
/* 37774 8005C374 C4820024 */ lwc1 $f2, 0x24($a0)
/* 37778 8005C378 46020002 */ mul.s $f0, $f0, $f2
/* 3777C 8005C37C 00000000 */ nop
/* 37780 8005C380 C4A20000 */ lwc1 $f2, ($a1)
/* 37784 8005C384 46029081 */ sub.s $f2, $f18, $f2
/* 37788 8005C388 C484002C */ lwc1 $f4, 0x2c($a0)
/* 3778C 8005C38C 46041082 */ mul.s $f2, $f2, $f4
/* 37790 8005C390 00000000 */ nop
/* 37794 8005C394 46020001 */ sub.s $f0, $f0, $f2
/* 37798 8005C398 460A0002 */ mul.s $f0, $f0, $f10
/* 3779C 8005C39C 00000000 */ nop
/* 377A0 8005C3A0 4606003C */ c.lt.s $f0, $f6
/* 377A4 8005C3A4 080170B1 */ j .L8005C2C4
/* 377A8 8005C3A8 00000000 */ nop
.L8005C3AC:
/* 377AC 8005C3AC 3C01800A */ lui $at, %hi(D_800A2064)
/* 377B0 8005C3B0 C4242064 */ lwc1 $f4, %lo(D_800A2064)($at)
/* 377B4 8005C3B4 44800000 */ mtc1 $zero, $f0
/* 377B8 8005C3B8 C4820034 */ lwc1 $f2, 0x34($a0)
/* 377BC 8005C3BC 4604003E */ c.le.s $f0, $f4
/* 377C0 8005C3C0 00000000 */ nop
/* 377C4 8005C3C4 45000007 */ bc1f .L8005C3E4
/* 377C8 8005C3C8 46001207 */ neg.s $f8, $f2
/* 377CC 8005C3CC 46005007 */ neg.s $f0, $f10
/* 377D0 8005C3D0 46080003 */ div.s $f0, $f0, $f8
/* 377D4 8005C3D4 4600203E */ c.le.s $f4, $f0
/* 377D8 8005C3D8 00000000 */ nop
/* 377DC 8005C3DC 4501FFBB */ bc1t .L8005C2CC
/* 377E0 8005C3E0 00000000 */ nop
.L8005C3E4:
/* 377E4 8005C3E4 3C01800A */ lui $at, %hi(D_800A2040)
/* 377E8 8005C3E8 C4202040 */ lwc1 $f0, %lo(D_800A2040)($at)
/* 377EC 8005C3EC 3C01800A */ lui $at, %hi(D_800A2048)
/* 377F0 8005C3F0 C4242048 */ lwc1 $f4, %lo(D_800A2048)($at)
/* 377F4 8005C3F4 C4860030 */ lwc1 $f6, 0x30($a0)
/* 377F8 8005C3F8 3C01800A */ lui $at, %hi(D_800A2058)
/* 377FC 8005C3FC E4202058 */ swc1 $f0, %lo(D_800A2058)($at)
/* 37800 8005C400 3C01800A */ lui $at, %hi(D_800A2044)
/* 37804 8005C404 C4202044 */ lwc1 $f0, %lo(D_800A2044)($at)
/* 37808 8005C408 46005087 */ neg.s $f2, $f10
/* 3780C 8005C40C 3C01800A */ lui $at, %hi(D_800A2060)
/* 37810 8005C410 E4242060 */ swc1 $f4, %lo(D_800A2060)($at)
/* 37814 8005C414 C4840034 */ lwc1 $f4, 0x34($a0)
/* 37818 8005C418 46081083 */ div.s $f2, $f2, $f8
/* 3781C 8005C41C 3C01800A */ lui $at, %hi(D_800A2064)
/* 37820 8005C420 E4222064 */ swc1 $f2, %lo(D_800A2064)($at)
/* 37824 8005C424 3C01800A */ lui $at, %hi(D_800A2068)
/* 37828 8005C428 E4262068 */ swc1 $f6, %lo(D_800A2068)($at)
/* 3782C 8005C42C C4860038 */ lwc1 $f6, 0x38($a0)
/* 37830 8005C430 46020001 */ sub.s $f0, $f0, $f2
/* 37834 8005C434 3C01800A */ lui $at, %hi(D_800A206C)
/* 37838 8005C438 E424206C */ swc1 $f4, %lo(D_800A206C)($at)
/* 3783C 8005C43C 3C01800A */ lui $at, %hi(D_800A2070)
/* 37840 8005C440 E4262070 */ swc1 $f6, %lo(D_800A2070)($at)
/* 37844 8005C444 3C01800A */ lui $at, %hi(D_800A205C)
/* 37848 8005C448 E420205C */ swc1 $f0, %lo(D_800A205C)($at)
/* 3784C 8005C44C 03E00008 */ jr $ra
/* 37850 8005C450 24020001 */ addiu $v0, $zero, 1