papermario/ver/jp/asm/nonmatchings/30100/func_80054DEC.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

52 lines
2.4 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80054DEC
/* 301EC 80054DEC 3085000F */ andi $a1, $a0, 0xf
/* 301F0 80054DF0 10A00025 */ beqz $a1, .L80054E88
/* 301F4 80054DF4 0000302D */ daddu $a2, $zero, $zero
/* 301F8 80054DF8 24020001 */ addiu $v0, $zero, 1
/* 301FC 80054DFC 14A20005 */ bne $a1, $v0, .L80054E14
/* 30200 80054E00 24020002 */ addiu $v0, $zero, 2
/* 30204 80054E04 3C06800A */ lui $a2, %hi(D_8009A644)
/* 30208 80054E08 8CC6A644 */ lw $a2, %lo(D_8009A644)($a2)
/* 3020C 80054E0C 08015389 */ j .L80054E24
/* 30210 80054E10 00000000 */ nop
.L80054E14:
/* 30214 80054E14 14A20003 */ bne $a1, $v0, .L80054E24
/* 30218 80054E18 00000000 */ nop
/* 3021C 80054E1C 3C06800A */ lui $a2, %hi(D_8009A5DC)
/* 30220 80054E20 8CC6A5DC */ lw $a2, %lo(D_8009A5DC)($a2)
.L80054E24:
/* 30224 80054E24 10C00018 */ beqz $a2, .L80054E88
/* 30228 80054E28 00000000 */ nop
/* 3022C 80054E2C 90C20258 */ lbu $v0, 0x258($a2)
/* 30230 80054E30 2C420008 */ sltiu $v0, $v0, 8
/* 30234 80054E34 1040000E */ beqz $v0, .L80054E70
/* 30238 80054E38 00041902 */ srl $v1, $a0, 4
/* 3023C 80054E3C 90C5025A */ lbu $a1, 0x25a($a2)
/* 30240 80054E40 00051080 */ sll $v0, $a1, 2
/* 30244 80054E44 24A50001 */ addiu $a1, $a1, 1
/* 30248 80054E48 00C21021 */ addu $v0, $a2, $v0
/* 3024C 80054E4C AC430238 */ sw $v1, 0x238($v0)
/* 30250 80054E50 2CA20008 */ sltiu $v0, $a1, 8
/* 30254 80054E54 50400001 */ beql $v0, $zero, .L80054E5C
/* 30258 80054E58 0000282D */ daddu $a1, $zero, $zero
.L80054E5C:
/* 3025C 80054E5C 90C20258 */ lbu $v0, 0x258($a2)
/* 30260 80054E60 A0C5025A */ sb $a1, 0x25a($a2)
/* 30264 80054E64 24420001 */ addiu $v0, $v0, 1
/* 30268 80054E68 03E00008 */ jr $ra
/* 3026C 80054E6C A0C20258 */ sb $v0, 0x258($a2)
.L80054E70:
/* 30270 80054E70 90C2025B */ lbu $v0, 0x25b($a2)
/* 30274 80054E74 24450001 */ addiu $a1, $v0, 1
/* 30278 80054E78 2CA20064 */ sltiu $v0, $a1, 0x64
/* 3027C 80054E7C 50400001 */ beql $v0, $zero, .L80054E84
/* 30280 80054E80 24050063 */ addiu $a1, $zero, 0x63
.L80054E84:
/* 30284 80054E84 A0C5025B */ sb $a1, 0x25b($a2)
.L80054E88:
/* 30288 80054E88 03E00008 */ jr $ra
/* 3028C 80054E8C 00000000 */ nop