papermario/ver/jp/asm/nonmatchings/2BC40/func_80050FE4.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

78 lines
3.5 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80050FE4
/* 2C3E4 80050FE4 8CA30000 */ lw $v1, ($a1)
/* 2C3E8 80050FE8 9067000D */ lbu $a3, 0xd($v1)
/* 2C3EC 80050FEC 10E0003B */ beqz $a3, .L800510DC
/* 2C3F0 80050FF0 00000000 */ nop
/* 2C3F4 80050FF4 9462000E */ lhu $v0, 0xe($v1)
/* 2C3F8 80050FF8 10400038 */ beqz $v0, .L800510DC
/* 2C3FC 80050FFC 24E7FFFF */ addiu $a3, $a3, -1
/* 2C400 80051000 24090001 */ addiu $t1, $zero, 1
/* 2C404 80051004 00624021 */ addu $t0, $v1, $v0
/* 2C408 80051008 25040006 */ addiu $a0, $t0, 6
.L8005100C:
/* 2C40C 8005100C 91030000 */ lbu $v1, ($t0)
/* 2C410 80051010 00031080 */ sll $v0, $v1, 2
/* 2C414 80051014 00431021 */ addu $v0, $v0, $v1
/* 2C418 80051018 000210C0 */ sll $v0, $v0, 3
/* 2C41C 8005101C 24420044 */ addiu $v0, $v0, 0x44
/* 2C420 80051020 9083FFFB */ lbu $v1, -5($a0)
/* 2C424 80051024 14600014 */ bnez $v1, .L80051078
/* 2C428 80051028 00A23021 */ addu $a2, $a1, $v0
/* 2C42C 8005102C 9482FFFC */ lhu $v0, -4($a0)
/* 2C430 80051030 A4C20014 */ sh $v0, 0x14($a2)
/* 2C434 80051034 8482FFFE */ lh $v0, -2($a0)
/* 2C438 80051038 8483FFFC */ lh $v1, -4($a0)
/* 2C43C 8005103C 00021400 */ sll $v0, $v0, 0x10
/* 2C440 80051040 14600002 */ bnez $v1, .L8005104C
/* 2C444 80051044 0043001A */ div $zero, $v0, $v1
/* 2C448 80051048 0007000D */ break 7
.L8005104C:
/* 2C44C 8005104C 2401FFFF */ addiu $at, $zero, -1
/* 2C450 80051050 14610004 */ bne $v1, $at, .L80051064
/* 2C454 80051054 3C018000 */ lui $at, 0x8000
/* 2C458 80051058 14410002 */ bne $v0, $at, .L80051064
/* 2C45C 8005105C 00000000 */ nop
/* 2C460 80051060 0006000D */ break 6
.L80051064:
/* 2C464 80051064 00001012 */ mflo $v0
/* 2C468 80051068 ACC20010 */ sw $v0, 0x10($a2)
/* 2C46C 8005106C 94820000 */ lhu $v0, ($a0)
/* 2C470 80051070 08014432 */ j .L800510C8
/* 2C474 80051074 A4C20016 */ sh $v0, 0x16($a2)
.L80051078:
/* 2C478 80051078 54690014 */ bnel $v1, $t1, .L800510CC
/* 2C47C 8005107C 24840008 */ addiu $a0, $a0, 8
/* 2C480 80051080 9482FFFC */ lhu $v0, -4($a0)
/* 2C484 80051084 A4C20020 */ sh $v0, 0x20($a2)
/* 2C488 80051088 8482FFFE */ lh $v0, -2($a0)
/* 2C48C 8005108C 8483FFFC */ lh $v1, -4($a0)
/* 2C490 80051090 00021400 */ sll $v0, $v0, 0x10
/* 2C494 80051094 14600002 */ bnez $v1, .L800510A0
/* 2C498 80051098 0043001A */ div $zero, $v0, $v1
/* 2C49C 8005109C 0007000D */ break 7
.L800510A0:
/* 2C4A0 800510A0 2401FFFF */ addiu $at, $zero, -1
/* 2C4A4 800510A4 14610004 */ bne $v1, $at, .L800510B8
/* 2C4A8 800510A8 3C018000 */ lui $at, 0x8000
/* 2C4AC 800510AC 14410002 */ bne $v0, $at, .L800510B8
/* 2C4B0 800510B0 00000000 */ nop
/* 2C4B4 800510B4 0006000D */ break 6
.L800510B8:
/* 2C4B8 800510B8 00001012 */ mflo $v0
/* 2C4BC 800510BC ACC2001C */ sw $v0, 0x1c($a2)
/* 2C4C0 800510C0 94820000 */ lhu $v0, ($a0)
/* 2C4C4 800510C4 A4C20022 */ sh $v0, 0x22($a2)
.L800510C8:
/* 2C4C8 800510C8 24840008 */ addiu $a0, $a0, 8
.L800510CC:
/* 2C4CC 800510CC 25080008 */ addiu $t0, $t0, 8
/* 2C4D0 800510D0 00E0102D */ daddu $v0, $a3, $zero
/* 2C4D4 800510D4 1440FFCD */ bnez $v0, .L8005100C
/* 2C4D8 800510D8 24E7FFFF */ addiu $a3, $a3, -1
.L800510DC:
/* 2C4DC 800510DC 03E00008 */ jr $ra
/* 2C4E0 800510E0 00000000 */ nop