papermario/ver/jp/asm/nonmatchings/285C0/func_80050538.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

41 lines
1.8 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80050538
/* 2B938 80050538 10C00002 */ beqz $a2, .L80050544
/* 2B93C 8005053C 00061200 */ sll $v0, $a2, 8
/* 2B940 80050540 344600FF */ ori $a2, $v0, 0xff
.L80050544:
/* 2B944 80050544 1CE00003 */ bgtz $a3, .L80050554
/* 2B948 80050548 28E203E9 */ slti $v0, $a3, 0x3e9
/* 2B94C 8005054C 08014157 */ j .L8005055C
/* 2B950 80050550 24070001 */ addiu $a3, $zero, 1
.L80050554:
/* 2B954 80050554 50400001 */ beql $v0, $zero, .L8005055C
/* 2B958 80050558 240703E8 */ addiu $a3, $zero, 0x3e8
.L8005055C:
/* 2B95C 8005055C 8CA2002C */ lw $v0, 0x2c($a1)
/* 2B960 80050560 14C20003 */ bne $a2, $v0, .L80050570
/* 2B964 80050564 00061400 */ sll $v0, $a2, 0x10
/* 2B968 80050568 03E00008 */ jr $ra
/* 2B96C 8005056C A4A00036 */ sh $zero, 0x36($a1)
.L80050570:
/* 2B970 80050570 8CA3002C */ lw $v1, 0x2c($a1)
/* 2B974 80050574 00431023 */ subu $v0, $v0, $v1
/* 2B978 80050578 14E00002 */ bnez $a3, .L80050584
/* 2B97C 8005057C 0047001A */ div $zero, $v0, $a3
/* 2B980 80050580 0007000D */ break 7
.L80050584:
/* 2B984 80050584 2401FFFF */ addiu $at, $zero, -1
/* 2B988 80050588 14E10004 */ bne $a3, $at, .L8005059C
/* 2B98C 8005058C 3C018000 */ lui $at, 0x8000
/* 2B990 80050590 14410002 */ bne $v0, $at, .L8005059C
/* 2B994 80050594 00000000 */ nop
/* 2B998 80050598 0006000D */ break 6
.L8005059C:
/* 2B99C 8005059C 00001012 */ mflo $v0
/* 2B9A0 800505A0 A4A70036 */ sh $a3, 0x36($a1)
/* 2B9A4 800505A4 A4A60034 */ sh $a2, 0x34($a1)
/* 2B9A8 800505A8 03E00008 */ jr $ra
/* 2B9AC 800505AC ACA20030 */ sw $v0, 0x30($a1)