papermario/ver/jp/asm/nonmatchings/13530/func_8003B1C0.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

53 lines
2.5 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8003B1C0
/* 165C0 8003B1C0 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 165C4 8003B1C4 AFBF0018 */ sw $ra, 0x18($sp)
/* 165C8 8003B1C8 808200B6 */ lb $v0, 0xb6($a0)
/* 165CC 8003B1CC 10400007 */ beqz $v0, .L8003B1EC
/* 165D0 8003B1D0 00000000 */ nop
/* 165D4 8003B1D4 3C013F80 */ lui $at, 0x3f80
/* 165D8 8003B1D8 44810000 */ mtc1 $at, $f0
/* 165DC 8003B1DC AC800318 */ sw $zero, 0x318($a0)
/* 165E0 8003B1E0 AC80031C */ sw $zero, 0x31c($a0)
/* 165E4 8003B1E4 A08000B6 */ sb $zero, 0xb6($a0)
/* 165E8 8003B1E8 E4800320 */ swc1 $f0, 0x320($a0)
.L8003B1EC:
/* 165EC 8003B1EC 8C820000 */ lw $v0, ($a0)
/* 165F0 8003B1F0 3C034000 */ lui $v1, 0x4000
/* 165F4 8003B1F4 00431024 */ and $v0, $v0, $v1
/* 165F8 8003B1F8 54400016 */ bnel $v0, $zero, .L8003B254
/* 165FC 8003B1FC AFA60010 */ sw $a2, 0x10($sp)
/* 16600 8003B200 908300AC */ lbu $v1, 0xac($a0)
/* 16604 8003B204 908200AD */ lbu $v0, 0xad($a0)
/* 16608 8003B208 00620018 */ mult $v1, $v0
/* 1660C 8003B20C 00001812 */ mflo $v1
/* 16610 8003B210 3C028080 */ lui $v0, 0x8080
/* 16614 8003B214 34428081 */ ori $v0, $v0, 0x8081
/* 16618 8003B218 00620018 */ mult $v1, $v0
/* 1661C 8003B21C 8C820024 */ lw $v0, 0x24($a0)
/* 16620 8003B220 0000382D */ daddu $a3, $zero, $zero
/* 16624 8003B224 AFA60010 */ sw $a2, 0x10($sp)
/* 16628 8003B228 00004810 */ mfhi $t1
/* 1662C 8003B22C 01233021 */ addu $a2, $t1, $v1
/* 16630 8003B230 000631C3 */ sra $a2, $a2, 7
/* 16634 8003B234 00031FC3 */ sra $v1, $v1, 0x1f
/* 16638 8003B238 00C33023 */ subu $a2, $a2, $v1
/* 1663C 8003B23C 28C400FF */ slti $a0, $a2, 0xff
/* 16640 8003B240 000427C0 */ sll $a0, $a0, 0x1f
/* 16644 8003B244 0C0447CA */ jal func_80111F28
/* 16648 8003B248 00442025 */ or $a0, $v0, $a0
/* 1664C 8003B24C 0800EC9A */ j .L8003B268
/* 16650 8003B250 00000000 */ nop
.L8003B254:
/* 16654 8003B254 3C044000 */ lui $a0, 0x4000
/* 16658 8003B258 34840001 */ ori $a0, $a0, 1
/* 1665C 8003B25C 0000302D */ daddu $a2, $zero, $zero
/* 16660 8003B260 0C0445E4 */ jal func_80111790
/* 16664 8003B264 00C0382D */ daddu $a3, $a2, $zero
.L8003B268:
/* 16668 8003B268 8FBF0018 */ lw $ra, 0x18($sp)
/* 1666C 8003B26C 03E00008 */ jr $ra
/* 16670 8003B270 27BD0020 */ addiu $sp, $sp, 0x20