papermario/ver/jp/asm/nonmatchings/42B0/func_800291DC.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.4 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_800291DC
/* 45DC 800291DC 14A00003 */ bnez $a1, .L800291EC
/* 45E0 800291E0 00000000 */ nop
.L800291E4:
/* 45E4 800291E4 03E00008 */ jr $ra
/* 45E8 800291E8 24020001 */ addiu $v0, $zero, 1
.L800291EC:
/* 45EC 800291EC 94A2FFF8 */ lhu $v0, -8($a1)
/* 45F0 800291F0 1040FFFC */ beqz $v0, .L800291E4
/* 45F4 800291F4 24A6FFF0 */ addiu $a2, $a1, -0x10
/* 45F8 800291F8 8CA7FFF0 */ lw $a3, -0x10($a1)
/* 45FC 800291FC 8CA5FFF4 */ lw $a1, -0xc($a1)
/* 4600 80029200 00E0182D */ daddu $v1, $a3, $zero
/* 4604 80029204 50600009 */ beql $v1, $zero, .L8002922C
/* 4608 80029208 0080182D */ daddu $v1, $a0, $zero
/* 460C 8002920C 94620008 */ lhu $v0, 8($v1)
/* 4610 80029210 54400006 */ bnel $v0, $zero, .L8002922C
/* 4614 80029214 0080182D */ daddu $v1, $a0, $zero
/* 4618 80029218 8C670000 */ lw $a3, ($v1)
/* 461C 8002921C 8C630004 */ lw $v1, 4($v1)
/* 4620 80029220 24A20010 */ addiu $v0, $a1, 0x10
/* 4624 80029224 00432821 */ addu $a1, $v0, $v1
/* 4628 80029228 0080182D */ daddu $v1, $a0, $zero
.L8002922C:
/* 462C 8002922C 8C640000 */ lw $a0, ($v1)
/* 4630 80029230 10860007 */ beq $a0, $a2, .L80029250
/* 4634 80029234 00C3102B */ sltu $v0, $a2, $v1
/* 4638 80029238 1440000D */ bnez $v0, .L80029270
/* 463C 8002923C 00C0182D */ daddu $v1, $a2, $zero
/* 4640 80029240 1080000A */ beqz $a0, .L8002926C
/* 4644 80029244 0080182D */ daddu $v1, $a0, $zero
/* 4648 80029248 0800A48B */ j .L8002922C
/* 464C 8002924C 00000000 */ nop
.L80029250:
/* 4650 80029250 94620008 */ lhu $v0, 8($v1)
/* 4654 80029254 54400006 */ bnel $v0, $zero, .L80029270
/* 4658 80029258 00C0182D */ daddu $v1, $a2, $zero
/* 465C 8002925C 0060302D */ daddu $a2, $v1, $zero
/* 4660 80029260 8CC30004 */ lw $v1, 4($a2)
/* 4664 80029264 24A20010 */ addiu $v0, $a1, 0x10
/* 4668 80029268 00432821 */ addu $a1, $v0, $v1
.L8002926C:
/* 466C 8002926C 00C0182D */ daddu $v1, $a2, $zero
.L80029270:
/* 4670 80029270 0000102D */ daddu $v0, $zero, $zero
/* 4674 80029274 AC670000 */ sw $a3, ($v1)
/* 4678 80029278 AC650004 */ sw $a1, 4($v1)
/* 467C 8002927C 03E00008 */ jr $ra
/* 4680 80029280 A4600008 */ sh $zero, 8($v1)