papermario/ver/jp/asm/nonmatchings/D2A0/func_80031F6C.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

207 lines
9.5 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80031F6C
/* D36C 80031F6C 27BDFFC0 */ addiu $sp, $sp, -0x40
/* D370 80031F70 F7BC0030 */ sdc1 $f28, 0x30($sp)
/* D374 80031F74 AFA60048 */ sw $a2, 0x48($sp)
/* D378 80031F78 C7BC0048 */ lwc1 $f28, 0x48($sp)
/* D37C 80031F7C F7B80020 */ sdc1 $f24, 0x20($sp)
/* D380 80031F80 C7B80050 */ lwc1 $f24, 0x50($sp)
/* D384 80031F84 F7B40010 */ sdc1 $f20, 0x10($sp)
/* D388 80031F88 46006506 */ mov.s $f20, $f12
/* D38C 80031F8C F7B60018 */ sdc1 $f22, 0x18($sp)
/* D390 80031F90 46007586 */ mov.s $f22, $f14
/* D394 80031F94 F7BA0028 */ sdc1 $f26, 0x28($sp)
/* D398 80031F98 C7BA0054 */ lwc1 $f26, 0x54($sp)
/* D39C 80031F9C 4614E481 */ sub.s $f18, $f28, $f20
/* D3A0 80031FA0 C7A20058 */ lwc1 $f2, 0x58($sp)
/* D3A4 80031FA4 C7A0005C */ lwc1 $f0, 0x5c($sp)
/* D3A8 80031FA8 4616D181 */ sub.s $f6, $f26, $f22
/* D3AC 80031FAC F7BE0038 */ sdc1 $f30, 0x38($sp)
/* D3B0 80031FB0 46160781 */ sub.s $f30, $f0, $f22
/* D3B4 80031FB4 AFA7004C */ sw $a3, 0x4c($sp)
/* D3B8 80031FB8 46181401 */ sub.s $f16, $f2, $f24
/* D3BC 80031FBC C7BC004C */ lwc1 $f28, 0x4c($sp)
/* D3C0 80031FC0 4616E301 */ sub.s $f12, $f28, $f22
/* D3C4 80031FC4 4614C701 */ sub.s $f28, $f24, $f20
/* D3C8 80031FC8 461A0381 */ sub.s $f14, $f0, $f26
/* D3CC 80031FCC E7BC0008 */ swc1 $f28, 8($sp)
/* D3D0 80031FD0 46141701 */ sub.s $f28, $f2, $f20
/* D3D4 80031FD4 44802000 */ mtc1 $zero, $f4
/* D3D8 80031FD8 46009286 */ mov.s $f10, $f18
/* D3DC 80031FDC 46049032 */ c.eq.s $f18, $f4
/* D3E0 80031FE0 46006207 */ neg.s $f8, $f12
/* D3E4 80031FE4 45000005 */ bc1f .L80031FFC
/* D3E8 80031FE8 E7BC0000 */ swc1 $f28, ($sp)
/* D3EC 80031FEC 46046032 */ c.eq.s $f12, $f4
/* D3F0 80031FF0 00000000 */ nop
/* D3F4 80031FF4 45010097 */ bc1t .L80032254
/* D3F8 80031FF8 0000102D */ daddu $v0, $zero, $zero
.L80031FFC:
/* D3FC 80031FFC 44800000 */ mtc1 $zero, $f0
/* D400 80032000 00000000 */ nop
/* D404 80032004 46008032 */ c.eq.s $f16, $f0
/* D408 80032008 00000000 */ nop
/* D40C 8003200C 45000005 */ bc1f .L80032024
/* D410 80032010 00000000 */ nop
/* D414 80032014 46007032 */ c.eq.s $f14, $f0
/* D418 80032018 00000000 */ nop
/* D41C 8003201C 4501008D */ bc1t .L80032254
/* D420 80032020 0000102D */ daddu $v0, $zero, $zero
.L80032024:
/* D424 80032024 46065002 */ mul.s $f0, $f10, $f6
/* D428 80032028 00000000 */ nop
/* D42C 8003202C C7BC0008 */ lwc1 $f28, 8($sp)
/* D430 80032030 461C4082 */ mul.s $f2, $f8, $f28
/* D434 80032034 00000000 */ nop
/* D438 80032038 46001180 */ add.s $f6, $f2, $f0
/* D43C 8003203C 44800000 */ mtc1 $zero, $f0
/* D440 80032040 00000000 */ nop
/* D444 80032044 4600303C */ c.lt.s $f6, $f0
/* D448 80032048 3C01BF80 */ lui $at, 0xbf80
/* D44C 8003204C 44812000 */ mtc1 $at, $f4
/* D450 80032050 45010007 */ bc1t .L80032070
/* D454 80032054 00000000 */ nop
/* D458 80032058 4606003C */ c.lt.s $f0, $f6
/* D45C 8003205C 00000000 */ nop
/* D460 80032060 45000003 */ bc1f .L80032070
/* D464 80032064 46000106 */ mov.s $f4, $f0
/* D468 80032068 3C013F80 */ lui $at, 0x3f80
/* D46C 8003206C 44812000 */ mtc1 $at, $f4
.L80032070:
/* D470 80032070 461E5002 */ mul.s $f0, $f10, $f30
/* D474 80032074 00000000 */ nop
/* D478 80032078 C7BC0000 */ lwc1 $f28, ($sp)
/* D47C 8003207C 461C4082 */ mul.s $f2, $f8, $f28
/* D480 80032080 00000000 */ nop
/* D484 80032084 46001080 */ add.s $f2, $f2, $f0
/* D488 80032088 44800000 */ mtc1 $zero, $f0
/* D48C 8003208C 00000000 */ nop
/* D490 80032090 4600103C */ c.lt.s $f2, $f0
/* D494 80032094 00000000 */ nop
/* D498 80032098 45000005 */ bc1f .L800320B0
/* D49C 8003209C 46002186 */ mov.s $f6, $f4
/* D4A0 800320A0 3C01BF80 */ lui $at, 0xbf80
/* D4A4 800320A4 44810000 */ mtc1 $at, $f0
/* D4A8 800320A8 0800C833 */ j .L800320CC
/* D4AC 800320AC 00000000 */ nop
.L800320B0:
/* D4B0 800320B0 4602003C */ c.lt.s $f0, $f2
/* D4B4 800320B4 00000000 */ nop
/* D4B8 800320B8 45000004 */ bc1f .L800320CC
/* D4BC 800320BC 00000000 */ nop
/* D4C0 800320C0 3C013F80 */ lui $at, 0x3f80
/* D4C4 800320C4 44810000 */ mtc1 $at, $f0
/* D4C8 800320C8 00000000 */ nop
.L800320CC:
/* D4CC 800320CC 46003032 */ c.eq.s $f6, $f0
/* D4D0 800320D0 00000000 */ nop
/* D4D4 800320D4 4501005F */ bc1t .L80032254
/* D4D8 800320D8 0000102D */ daddu $v0, $zero, $zero
/* D4DC 800320DC 46009085 */ abs.s $f2, $f18
/* D4E0 800320E0 46008005 */ abs.s $f0, $f16
/* D4E4 800320E4 4602003C */ c.lt.s $f0, $f2
/* D4E8 800320E8 00000000 */ nop
/* D4EC 800320EC 4500001E */ bc1f .L80032168
/* D4F0 800320F0 00000000 */ nop
/* D4F4 800320F4 460CA002 */ mul.s $f0, $f20, $f12
/* D4F8 800320F8 00000000 */ nop
/* D4FC 800320FC 4612B182 */ mul.s $f6, $f22, $f18
/* D500 80032100 00000000 */ nop
/* D504 80032104 461A9202 */ mul.s $f8, $f18, $f26
/* D508 80032108 00000000 */ nop
/* D50C 8003210C 46186282 */ mul.s $f10, $f12, $f24
/* D510 80032110 00000000 */ nop
/* D514 80032114 46106082 */ mul.s $f2, $f12, $f16
/* D518 80032118 00000000 */ nop
/* D51C 8003211C 460E9102 */ mul.s $f4, $f18, $f14
/* D520 80032120 00000000 */ nop
/* D524 80032124 46060001 */ sub.s $f0, $f0, $f6
/* D528 80032128 46041081 */ sub.s $f2, $f2, $f4
/* D52C 8003212C 46080000 */ add.s $f0, $f0, $f8
/* D530 80032130 460A0181 */ sub.s $f6, $f0, $f10
/* D534 80032134 46023183 */ div.s $f6, $f6, $f2
/* D538 80032138 46068002 */ mul.s $f0, $f16, $f6
/* D53C 8003213C 00000000 */ nop
/* D540 80032140 4600C000 */ add.s $f0, $f24, $f0
/* D544 80032144 46140001 */ sub.s $f0, $f0, $f20
/* D548 80032148 46120183 */ div.s $f6, $f0, $f18
/* D54C 8003214C 46069002 */ mul.s $f0, $f18, $f6
/* D550 80032150 00000000 */ nop
/* D554 80032154 46066082 */ mul.s $f2, $f12, $f6
/* D558 80032158 00000000 */ nop
/* D55C 8003215C 4600A200 */ add.s $f8, $f20, $f0
/* D560 80032160 0800C876 */ j .L800321D8
/* D564 80032164 4602B180 */ add.s $f6, $f22, $f2
.L80032168:
/* D568 80032168 4610D002 */ mul.s $f0, $f26, $f16
/* D56C 8003216C 00000000 */ nop
/* D570 80032170 460EA182 */ mul.s $f6, $f20, $f14
/* D574 80032174 00000000 */ nop
/* D578 80032178 460ED202 */ mul.s $f8, $f26, $f14
/* D57C 8003217C 00000000 */ nop
/* D580 80032180 4610B282 */ mul.s $f10, $f22, $f16
/* D584 80032184 00000000 */ nop
/* D588 80032188 46106082 */ mul.s $f2, $f12, $f16
/* D58C 8003218C 00000000 */ nop
/* D590 80032190 460E9102 */ mul.s $f4, $f18, $f14
/* D594 80032194 00000000 */ nop
/* D598 80032198 46060000 */ add.s $f0, $f0, $f6
/* D59C 8003219C 46041081 */ sub.s $f2, $f2, $f4
/* D5A0 800321A0 46080001 */ sub.s $f0, $f0, $f8
/* D5A4 800321A4 460A0181 */ sub.s $f6, $f0, $f10
/* D5A8 800321A8 46023183 */ div.s $f6, $f6, $f2
/* D5AC 800321AC 46069002 */ mul.s $f0, $f18, $f6
/* D5B0 800321B0 00000000 */ nop
/* D5B4 800321B4 4600A000 */ add.s $f0, $f20, $f0
/* D5B8 800321B8 46180001 */ sub.s $f0, $f0, $f24
/* D5BC 800321BC 46100183 */ div.s $f6, $f0, $f16
/* D5C0 800321C0 46068002 */ mul.s $f0, $f16, $f6
/* D5C4 800321C4 00000000 */ nop
/* D5C8 800321C8 46067082 */ mul.s $f2, $f14, $f6
/* D5CC 800321CC 00000000 */ nop
/* D5D0 800321D0 4600C200 */ add.s $f8, $f24, $f0
/* D5D4 800321D4 4602D180 */ add.s $f6, $f26, $f2
.L800321D8:
/* D5D8 800321D8 46144101 */ sub.s $f4, $f8, $f20
/* D5DC 800321DC C7BC0048 */ lwc1 $f28, 0x48($sp)
/* D5E0 800321E0 461C4001 */ sub.s $f0, $f8, $f28
/* D5E4 800321E4 46002102 */ mul.s $f4, $f4, $f0
/* D5E8 800321E8 00000000 */ nop
/* D5EC 800321EC C7BC004C */ lwc1 $f28, 0x4c($sp)
/* D5F0 800321F0 461C3081 */ sub.s $f2, $f6, $f28
/* D5F4 800321F4 46163001 */ sub.s $f0, $f6, $f22
/* D5F8 800321F8 46020002 */ mul.s $f0, $f0, $f2
/* D5FC 800321FC 00000000 */ nop
/* D600 80032200 46002100 */ add.s $f4, $f4, $f0
/* D604 80032204 44800000 */ mtc1 $zero, $f0
/* D608 80032208 00000000 */ nop
/* D60C 8003220C 4604003C */ c.lt.s $f0, $f4
/* D610 80032210 00000000 */ nop
/* D614 80032214 4501000F */ bc1t .L80032254
/* D618 80032218 0000102D */ daddu $v0, $zero, $zero
/* D61C 8003221C 46184081 */ sub.s $f2, $f8, $f24
/* D620 80032220 46021082 */ mul.s $f2, $f2, $f2
/* D624 80032224 00000000 */ nop
/* D628 80032228 461A3001 */ sub.s $f0, $f6, $f26
/* D62C 8003222C 8FA30060 */ lw $v1, 0x60($sp)
/* D630 80032230 46000002 */ mul.s $f0, $f0, $f0
/* D634 80032234 00000000 */ nop
/* D638 80032238 E4680000 */ swc1 $f8, ($v1)
/* D63C 8003223C 8FA30064 */ lw $v1, 0x64($sp)
/* D640 80032240 E4660000 */ swc1 $f6, ($v1)
/* D644 80032244 46001080 */ add.s $f2, $f2, $f0
/* D648 80032248 8FA30068 */ lw $v1, 0x68($sp)
/* D64C 8003224C 24020001 */ addiu $v0, $zero, 1
/* D650 80032250 E4620000 */ swc1 $f2, ($v1)
.L80032254:
/* D654 80032254 D7BE0038 */ ldc1 $f30, 0x38($sp)
/* D658 80032258 D7BC0030 */ ldc1 $f28, 0x30($sp)
/* D65C 8003225C D7BA0028 */ ldc1 $f26, 0x28($sp)
/* D660 80032260 D7B80020 */ ldc1 $f24, 0x20($sp)
/* D664 80032264 D7B60018 */ ldc1 $f22, 0x18($sp)
/* D668 80032268 D7B40010 */ ldc1 $f20, 0x10($sp)
/* D66C 8003226C 03E00008 */ jr $ra
/* D670 80032270 27BD0040 */ addiu $sp, $sp, 0x40