papermario/ver/us/asm/nonmatchings/d0a70_len_4fe0/func_8013F1F8.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

102 lines
4.6 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
glabel D_80151138
.double 255.0
.section .text
glabel func_8013F1F8
/* D58F8 8013F1F8 0080382D */ daddu $a3, $a0, $zero
/* D58FC 8013F1FC 0000302D */ daddu $a2, $zero, $zero
/* D5900 8013F200 3C028015 */ lui $v0, %hi(D_8014EE10)
/* D5904 8013F204 8C42EE10 */ lw $v0, %lo(D_8014EE10)($v0)
/* D5908 8013F208 3C018015 */ lui $at, %hi(D_80151138)
/* D590C 8013F20C D4221138 */ ldc1 $f2, %lo(D_80151138)($at)
/* D5910 8013F210 90420024 */ lbu $v0, 0x24($v0)
/* D5914 8013F214 94E3000A */ lhu $v1, 0xa($a3)
/* D5918 8013F218 44820000 */ mtc1 $v0, $f0
/* D591C 8013F21C 00000000 */ nop
/* D5920 8013F220 46800020 */ cvt.s.w $f0, $f0
/* D5924 8013F224 46000021 */ cvt.d.s $f0, $f0
/* D5928 8013F228 46220003 */ div.d $f0, $f0, $f2
/* D592C 8013F22C 94E20008 */ lhu $v0, 8($a3)
/* D5930 8013F230 00624823 */ subu $t1, $v1, $v0
/* D5934 8013F234 05200041 */ bltz $t1, .L8013F33C
/* D5938 8013F238 46200120 */ cvt.s.d $f4, $f0
/* D593C 8013F23C 3C088015 */ lui $t0, %hi(D_80156950)
/* D5940 8013F240 25086950 */ addiu $t0, $t0, %lo(D_80156950)
/* D5944 8013F244 3C014F00 */ lui $at, 0x4f00
/* D5948 8013F248 44811000 */ mtc1 $at, $f2
/* D594C 8013F24C 3C0A8000 */ lui $t2, 0x8000
/* D5950 8013F250 00062880 */ sll $a1, $a2, 2
.L8013F254:
/* D5954 8013F254 94E20008 */ lhu $v0, 8($a3)
/* D5958 8013F258 8CE3005C */ lw $v1, 0x5c($a3)
/* D595C 8013F25C 8D040000 */ lw $a0, ($t0)
/* D5960 8013F260 00461021 */ addu $v0, $v0, $a2
/* D5964 8013F264 00021100 */ sll $v0, $v0, 4
/* D5968 8013F268 00A31821 */ addu $v1, $a1, $v1
/* D596C 8013F26C 90630000 */ lbu $v1, ($v1)
/* D5970 8013F270 00441021 */ addu $v0, $v0, $a0
/* D5974 8013F274 A043000C */ sb $v1, 0xc($v0)
/* D5978 8013F278 94E20008 */ lhu $v0, 8($a3)
/* D597C 8013F27C 8CE3005C */ lw $v1, 0x5c($a3)
/* D5980 8013F280 8D040000 */ lw $a0, ($t0)
/* D5984 8013F284 00461021 */ addu $v0, $v0, $a2
/* D5988 8013F288 00021100 */ sll $v0, $v0, 4
/* D598C 8013F28C 00A31821 */ addu $v1, $a1, $v1
/* D5990 8013F290 90630001 */ lbu $v1, 1($v1)
/* D5994 8013F294 00441021 */ addu $v0, $v0, $a0
/* D5998 8013F298 A043000D */ sb $v1, 0xd($v0)
/* D599C 8013F29C 94E20008 */ lhu $v0, 8($a3)
/* D59A0 8013F2A0 8CE3005C */ lw $v1, 0x5c($a3)
/* D59A4 8013F2A4 8D040000 */ lw $a0, ($t0)
/* D59A8 8013F2A8 00461021 */ addu $v0, $v0, $a2
/* D59AC 8013F2AC 00021100 */ sll $v0, $v0, 4
/* D59B0 8013F2B0 00A31821 */ addu $v1, $a1, $v1
/* D59B4 8013F2B4 90630002 */ lbu $v1, 2($v1)
/* D59B8 8013F2B8 00441021 */ addu $v0, $v0, $a0
/* D59BC 8013F2BC A043000E */ sb $v1, 0xe($v0)
/* D59C0 8013F2C0 8CE2005C */ lw $v0, 0x5c($a3)
/* D59C4 8013F2C4 00A22821 */ addu $a1, $a1, $v0
/* D59C8 8013F2C8 94E20008 */ lhu $v0, 8($a3)
/* D59CC 8013F2CC 90A30003 */ lbu $v1, 3($a1)
/* D59D0 8013F2D0 00461021 */ addu $v0, $v0, $a2
/* D59D4 8013F2D4 44830000 */ mtc1 $v1, $f0
/* D59D8 8013F2D8 00000000 */ nop
/* D59DC 8013F2DC 46800020 */ cvt.s.w $f0, $f0
/* D59E0 8013F2E0 46040002 */ mul.s $f0, $f0, $f4
/* D59E4 8013F2E4 00000000 */ nop
/* D59E8 8013F2E8 8D030000 */ lw $v1, ($t0)
/* D59EC 8013F2EC 00021100 */ sll $v0, $v0, 4
/* D59F0 8013F2F0 00431021 */ addu $v0, $v0, $v1
/* D59F4 8013F2F4 4600103E */ c.le.s $f2, $f0
/* D59F8 8013F2F8 00000000 */ nop
/* D59FC 8013F2FC 45010005 */ bc1t .L8013F314
/* D5A00 8013F300 2442000F */ addiu $v0, $v0, 0xf
/* D5A04 8013F304 4600018D */ trunc.w.s $f6, $f0
/* D5A08 8013F308 44033000 */ mfc1 $v1, $f6
/* D5A0C 8013F30C 0804FCCB */ j .L8013F32C
/* D5A10 8013F310 A0430000 */ sb $v1, ($v0)
.L8013F314:
/* D5A14 8013F314 46020001 */ sub.s $f0, $f0, $f2
/* D5A18 8013F318 4600018D */ trunc.w.s $f6, $f0
/* D5A1C 8013F31C 44033000 */ mfc1 $v1, $f6
/* D5A20 8013F320 00000000 */ nop
/* D5A24 8013F324 006A1825 */ or $v1, $v1, $t2
/* D5A28 8013F328 A0430000 */ sb $v1, ($v0)
.L8013F32C:
/* D5A2C 8013F32C 24C60001 */ addiu $a2, $a2, 1
/* D5A30 8013F330 0126102A */ slt $v0, $t1, $a2
/* D5A34 8013F334 1040FFC7 */ beqz $v0, .L8013F254
/* D5A38 8013F338 00062880 */ sll $a1, $a2, 2
.L8013F33C:
/* D5A3C 8013F33C 03E00008 */ jr $ra
/* D5A40 8013F340 00000000 */ nop
/* D5A44 8013F344 00000000 */ nop
/* D5A48 8013F348 00000000 */ nop
/* D5A4C 8013F34C 00000000 */ nop