papermario/ver/jp/asm/nonmatchings/13530/func_8003868C.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

80 lines
3.8 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8003868C
/* 13A8C 8003868C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 13A90 80038690 AFB10014 */ sw $s1, 0x14($sp)
/* 13A94 80038694 0080882D */ daddu $s1, $a0, $zero
/* 13A98 80038698 AFBF0018 */ sw $ra, 0x18($sp)
/* 13A9C 8003869C AFB00010 */ sw $s0, 0x10($sp)
/* 13AA0 800386A0 8E240020 */ lw $a0, 0x20($s1)
/* 13AA4 800386A4 10800004 */ beqz $a0, .L800386B8
/* 13AA8 800386A8 00000000 */ nop
/* 13AAC 800386AC 0C00AB3B */ jal func_8002ACEC
/* 13AB0 800386B0 00000000 */ nop
/* 13AB4 800386B4 AE200020 */ sw $zero, 0x20($s1)
.L800386B8:
/* 13AB8 800386B8 8E230000 */ lw $v1, ($s1)
/* 13ABC 800386BC 3C024000 */ lui $v0, 0x4000
/* 13AC0 800386C0 00621024 */ and $v0, $v1, $v0
/* 13AC4 800386C4 1440000A */ bnez $v0, .L800386F0
/* 13AC8 800386C8 3C020100 */ lui $v0, 0x100
/* 13ACC 800386CC 00621024 */ and $v0, $v1, $v0
/* 13AD0 800386D0 14400007 */ bnez $v0, .L800386F0
/* 13AD4 800386D4 00000000 */ nop
/* 13AD8 800386D8 0C04484E */ jal func_80112138
/* 13ADC 800386DC 8E240024 */ lw $a0, 0x24($s1)
/* 13AE0 800386E0 10400003 */ beqz $v0, .L800386F0
/* 13AE4 800386E4 00000000 */ nop
.L800386E8:
/* 13AE8 800386E8 0800E1BA */ j .L800386E8
/* 13AEC 800386EC 00000000 */ nop
.L800386F0:
/* 13AF0 800386F0 8E240078 */ lw $a0, 0x78($s1)
/* 13AF4 800386F4 0C045D4E */ jal func_80117538
/* 13AF8 800386F8 0000802D */ daddu $s0, $zero, $zero
/* 13AFC 800386FC 0220202D */ daddu $a0, $s1, $zero
.L80038700:
/* 13B00 80038700 0C00F03A */ jal func_8003C0E8
/* 13B04 80038704 0200282D */ daddu $a1, $s0, $zero
/* 13B08 80038708 26100001 */ addiu $s0, $s0, 1
/* 13B0C 8003870C 2A020002 */ slti $v0, $s0, 2
/* 13B10 80038710 1440FFFB */ bnez $v0, .L80038700
/* 13B14 80038714 0220202D */ daddu $a0, $s1, $zero
/* 13B18 80038718 8E220000 */ lw $v0, ($s1)
/* 13B1C 8003871C 3C030010 */ lui $v1, 0x10
/* 13B20 80038720 00431024 */ and $v0, $v0, $v1
/* 13B24 80038724 10400003 */ beqz $v0, .L80038734
/* 13B28 80038728 00000000 */ nop
/* 13B2C 8003872C 0C00EA9B */ jal func_8003AA6C
/* 13B30 80038730 0220202D */ daddu $a0, $s1, $zero
.L80038734:
/* 13B34 80038734 0C00AB3B */ jal func_8002ACEC
/* 13B38 80038738 0220202D */ daddu $a0, $s1, $zero
/* 13B3C 8003873C 3C05800A */ lui $a1, %hi(D_8009E9A0)
/* 13B40 80038740 8CA5E9A0 */ lw $a1, %lo(D_8009E9A0)($a1)
/* 13B44 80038744 0000802D */ daddu $s0, $zero, $zero
/* 13B48 80038748 00A0182D */ daddu $v1, $a1, $zero
.L8003874C:
/* 13B4C 8003874C 8C620000 */ lw $v0, ($v1)
/* 13B50 80038750 10510006 */ beq $v0, $s1, .L8003876C
/* 13B54 80038754 00101080 */ sll $v0, $s0, 2
/* 13B58 80038758 26100001 */ addiu $s0, $s0, 1
/* 13B5C 8003875C 2A020040 */ slti $v0, $s0, 0x40
/* 13B60 80038760 1440FFFA */ bnez $v0, .L8003874C
/* 13B64 80038764 24630004 */ addiu $v1, $v1, 4
/* 13B68 80038768 00101080 */ sll $v0, $s0, 2
.L8003876C:
/* 13B6C 8003876C 3C04800A */ lui $a0, %hi(D_8009A5E4)
/* 13B70 80038770 2484A5E4 */ addiu $a0, $a0, %lo(D_8009A5E4)
/* 13B74 80038774 94830000 */ lhu $v1, ($a0)
/* 13B78 80038778 00451021 */ addu $v0, $v0, $a1
/* 13B7C 8003877C AC400000 */ sw $zero, ($v0)
/* 13B80 80038780 2463FFFF */ addiu $v1, $v1, -1
/* 13B84 80038784 A4830000 */ sh $v1, ($a0)
/* 13B88 80038788 8FBF0018 */ lw $ra, 0x18($sp)
/* 13B8C 8003878C 8FB10014 */ lw $s1, 0x14($sp)
/* 13B90 80038790 8FB00010 */ lw $s0, 0x10($sp)
/* 13B94 80038794 03E00008 */ jr $ra
/* 13B98 80038798 27BD0020 */ addiu $sp, $sp, 0x20