papermario/ver/us/asm/nonmatchings/26840_len_20d0/func_8004C444.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

88 lines
4.3 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8004C444
/* 27844 8004C444 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 27848 8004C448 AFB00010 */ sw $s0, 0x10($sp)
/* 2784C 8004C44C 0080802D */ daddu $s0, $a0, $zero
/* 27850 8004C450 AFBF0020 */ sw $ra, 0x20($sp)
/* 27854 8004C454 AFB3001C */ sw $s3, 0x1c($sp)
/* 27858 8004C458 AFB20018 */ sw $s2, 0x18($sp)
/* 2785C 8004C45C AFB10014 */ sw $s1, 0x14($sp)
/* 27860 8004C460 920300BD */ lbu $v1, 0xbd($s0)
/* 27864 8004C464 96020062 */ lhu $v0, 0x62($s0)
/* 27868 8004C468 96040032 */ lhu $a0, 0x32($s0)
/* 2786C 8004C46C 0060882D */ daddu $s1, $v1, $zero
/* 27870 8004C470 24630008 */ addiu $v1, $v1, 8
/* 27874 8004C474 322700FF */ andi $a3, $s1, 0xff
/* 27878 8004C478 00441021 */ addu $v0, $v0, $a0
/* 2787C 8004C47C 306300FF */ andi $v1, $v1, 0xff
/* 27880 8004C480 AE020060 */ sw $v0, 0x60($s0)
/* 27884 8004C484 00E3102B */ sltu $v0, $a3, $v1
/* 27888 8004C488 10400033 */ beqz $v0, .L8004C558
/* 2788C 8004C48C 24130001 */ addiu $s3, $zero, 1
/* 27890 8004C490 0060902D */ daddu $s2, $v1, $zero
.L8004C494:
/* 27894 8004C494 920200BD */ lbu $v0, 0xbd($s0)
/* 27898 8004C498 00E21023 */ subu $v0, $a3, $v0
/* 2789C 8004C49C 00021840 */ sll $v1, $v0, 1
/* 278A0 8004C4A0 00621821 */ addu $v1, $v1, $v0
/* 278A4 8004C4A4 00031880 */ sll $v1, $v1, 2
/* 278A8 8004C4A8 00621823 */ subu $v1, $v1, $v0
/* 278AC 8004C4AC 00031880 */ sll $v1, $v1, 2
/* 278B0 8004C4B0 00621823 */ subu $v1, $v1, $v0
/* 278B4 8004C4B4 00031880 */ sll $v1, $v1, 2
/* 278B8 8004C4B8 2463016C */ addiu $v1, $v1, 0x16c
/* 278BC 8004C4BC 02032821 */ addu $a1, $s0, $v1
/* 278C0 8004C4C0 8CA20000 */ lw $v0, ($a1)
/* 278C4 8004C4C4 1040001F */ beqz $v0, .L8004C544
/* 278C8 8004C4C8 000710C0 */ sll $v0, $a3, 3
/* 278CC 8004C4CC 00471021 */ addu $v0, $v0, $a3
/* 278D0 8004C4D0 000210C0 */ sll $v0, $v0, 3
/* 278D4 8004C4D4 8E030000 */ lw $v1, ($s0)
/* 278D8 8004C4D8 24421320 */ addiu $v0, $v0, 0x1320
/* 278DC 8004C4DC 00623021 */ addu $a2, $v1, $v0
/* 278E0 8004C4E0 AE060004 */ sw $a2, 4($s0)
/* 278E4 8004C4E4 90C30045 */ lbu $v1, 0x45($a2)
/* 278E8 8004C4E8 920200BC */ lbu $v0, 0xbc($s0)
/* 278EC 8004C4EC 0043102B */ sltu $v0, $v0, $v1
/* 278F0 8004C4F0 54400012 */ bnel $v0, $zero, .L8004C53C
/* 278F4 8004C4F4 ACA00000 */ sw $zero, ($a1)
/* 278F8 8004C4F8 A21100BF */ sb $s1, 0xbf($s0)
/* 278FC 8004C4FC 90A2009A */ lbu $v0, 0x9a($a1)
/* 27900 8004C500 30430003 */ andi $v1, $v0, 3
/* 27904 8004C504 10730009 */ beq $v1, $s3, .L8004C52C
/* 27908 8004C508 28620002 */ slti $v0, $v1, 2
/* 2790C 8004C50C 5040000E */ beql $v0, $zero, .L8004C548
/* 27910 8004C510 26310001 */ addiu $s1, $s1, 1
/* 27914 8004C514 5460000C */ bnel $v1, $zero, .L8004C548
/* 27918 8004C518 26310001 */ addiu $s1, $s1, 1
/* 2791C 8004C51C 0C01315E */ jal func_8004C578
/* 27920 8004C520 0200202D */ daddu $a0, $s0, $zero
/* 27924 8004C524 08013152 */ j .L8004C548
/* 27928 8004C528 26310001 */ addiu $s1, $s1, 1
.L8004C52C:
/* 2792C 8004C52C 0C013221 */ jal func_8004C884
/* 27930 8004C530 0200202D */ daddu $a0, $s0, $zero
/* 27934 8004C534 08013152 */ j .L8004C548
/* 27938 8004C538 26310001 */ addiu $s1, $s1, 1
.L8004C53C:
/* 2793C 8004C53C A4A00096 */ sh $zero, 0x96($a1)
/* 27940 8004C540 A0A00098 */ sb $zero, 0x98($a1)
.L8004C544:
/* 27944 8004C544 26310001 */ addiu $s1, $s1, 1
.L8004C548:
/* 27948 8004C548 322700FF */ andi $a3, $s1, 0xff
/* 2794C 8004C54C 00F2102B */ sltu $v0, $a3, $s2
/* 27950 8004C550 1440FFD0 */ bnez $v0, .L8004C494
/* 27954 8004C554 00000000 */ nop
.L8004C558:
/* 27958 8004C558 8FBF0020 */ lw $ra, 0x20($sp)
/* 2795C 8004C55C 8FB3001C */ lw $s3, 0x1c($sp)
/* 27960 8004C560 8FB20018 */ lw $s2, 0x18($sp)
/* 27964 8004C564 8FB10014 */ lw $s1, 0x14($sp)
/* 27968 8004C568 8FB00010 */ lw $s0, 0x10($sp)
/* 2796C 8004C56C 0000102D */ daddu $v0, $zero, $zero
/* 27970 8004C570 03E00008 */ jr $ra
/* 27974 8004C574 27BD0028 */ addiu $sp, $sp, 0x28