papermario/ver/jp/asm/nonmatchings/44B20/func_80069BE8.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

127 lines
6.3 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80069BE8
/* 44FE8 80069BE8 27BDFF98 */ addiu $sp, $sp, -0x68
/* 44FEC 80069BEC AFB00058 */ sw $s0, 0x58($sp)
/* 44FF0 80069BF0 00808021 */ addu $s0, $a0, $zero
/* 44FF4 80069BF4 AFBF0060 */ sw $ra, 0x60($sp)
/* 44FF8 80069BF8 AFB1005C */ sw $s1, 0x5c($sp)
/* 44FFC 80069BFC 92020065 */ lbu $v0, 0x65($s0)
/* 45000 80069C00 10400006 */ beqz $v0, .L80069C1C
/* 45004 80069C04 00000000 */ nop
/* 45008 80069C08 0C01A5AC */ jal func_800696B0
/* 4500C 80069C0C 00002821 */ addu $a1, $zero, $zero
/* 45010 80069C10 00401821 */ addu $v1, $v0, $zero
/* 45014 80069C14 14600062 */ bnez $v1, .L80069DA0
/* 45018 80069C18 00000000 */ nop
.L80069C1C:
/* 4501C 80069C1C 8E040004 */ lw $a0, 4($s0)
/* 45020 80069C20 8E050008 */ lw $a1, 8($s0)
/* 45024 80069C24 24060001 */ addiu $a2, $zero, 1
/* 45028 80069C28 0C01A86C */ jal func_8006A1B0
/* 4502C 80069C2C 27A70010 */ addiu $a3, $sp, 0x10
/* 45030 80069C30 00401821 */ addu $v1, $v0, $zero
/* 45034 80069C34 1460005A */ bnez $v1, .L80069DA0
/* 45038 80069C38 27A50010 */ addiu $a1, $sp, 0x10
/* 4503C 80069C3C 27A7002C */ addiu $a3, $sp, 0x2c
/* 45040 80069C40 A7A00052 */ sh $zero, 0x52($sp)
/* 45044 80069C44 A7A00050 */ sh $zero, 0x50($sp)
.L80069C48:
/* 45048 80069C48 94A20000 */ lhu $v0, ($a1)
/* 4504C 80069C4C 97A30050 */ lhu $v1, 0x50($sp)
/* 45050 80069C50 97A40052 */ lhu $a0, 0x52($sp)
/* 45054 80069C54 24A50002 */ addiu $a1, $a1, 2
/* 45058 80069C58 00623021 */ addu $a2, $v1, $v0
/* 4505C 80069C5C 00021027 */ nor $v0, $zero, $v0
/* 45060 80069C60 00822021 */ addu $a0, $a0, $v0
/* 45064 80069C64 00A7102B */ sltu $v0, $a1, $a3
/* 45068 80069C68 A7A60050 */ sh $a2, 0x50($sp)
/* 4506C 80069C6C 1440FFF6 */ bnez $v0, .L80069C48
/* 45070 80069C70 A7A40052 */ sh $a0, 0x52($sp)
/* 45074 80069C74 97A3002C */ lhu $v1, 0x2c($sp)
/* 45078 80069C78 30C2FFFF */ andi $v0, $a2, 0xffff
/* 4507C 80069C7C 14620005 */ bne $v1, $v0, .L80069C94
/* 45080 80069C80 27B10010 */ addiu $s1, $sp, 0x10
/* 45084 80069C84 97A3002E */ lhu $v1, 0x2e($sp)
/* 45088 80069C88 3082FFFF */ andi $v0, $a0, 0xffff
/* 4508C 80069C8C 10620013 */ beq $v1, $v0, .L80069CDC
/* 45090 80069C90 00000000 */ nop
.L80069C94:
/* 45094 80069C94 02002021 */ addu $a0, $s0, $zero
/* 45098 80069C98 0C01A6A1 */ jal func_80069A84
/* 4509C 80069C9C 02202821 */ addu $a1, $s1, $zero
/* 450A0 80069CA0 00401821 */ addu $v1, $v0, $zero
/* 450A4 80069CA4 2402000A */ addiu $v0, $zero, 0xa
/* 450A8 80069CA8 1462000A */ bne $v1, $v0, .L80069CD4
/* 450AC 80069CAC 02002021 */ addu $a0, $s0, $zero
/* 450B0 80069CB0 02202821 */ addu $a1, $s1, $zero
/* 450B4 80069CB4 27B10030 */ addiu $s1, $sp, 0x30
/* 450B8 80069CB8 0C01A5E6 */ jal func_80069798
/* 450BC 80069CBC 02203021 */ addu $a2, $s1, $zero
/* 450C0 80069CC0 00401821 */ addu $v1, $v0, $zero
/* 450C4 80069CC4 10600005 */ beqz $v1, .L80069CDC
/* 450C8 80069CC8 00000000 */ nop
/* 450CC 80069CCC 0801A768 */ j .L80069DA0
/* 450D0 80069CD0 00000000 */ nop
.L80069CD4:
/* 450D4 80069CD4 14600032 */ bnez $v1, .L80069DA0
/* 450D8 80069CD8 00601021 */ addu $v0, $v1, $zero
.L80069CDC:
/* 450DC 80069CDC 96220018 */ lhu $v0, 0x18($s1)
/* 450E0 80069CE0 30420001 */ andi $v0, $v0, 1
/* 450E4 80069CE4 1440000F */ bnez $v0, .L80069D24
/* 450E8 80069CE8 02202021 */ addu $a0, $s1, $zero
/* 450EC 80069CEC 02002021 */ addu $a0, $s0, $zero
/* 450F0 80069CF0 02202821 */ addu $a1, $s1, $zero
/* 450F4 80069CF4 27B10030 */ addiu $s1, $sp, 0x30
/* 450F8 80069CF8 0C01A5E6 */ jal func_80069798
/* 450FC 80069CFC 02203021 */ addu $a2, $s1, $zero
/* 45100 80069D00 00401821 */ addu $v1, $v0, $zero
/* 45104 80069D04 14600026 */ bnez $v1, .L80069DA0
/* 45108 80069D08 00000000 */ nop
/* 4510C 80069D0C 97A20048 */ lhu $v0, 0x48($sp)
/* 45110 80069D10 30420001 */ andi $v0, $v0, 1
/* 45114 80069D14 14400003 */ bnez $v0, .L80069D24
/* 45118 80069D18 02202021 */ addu $a0, $s1, $zero
/* 4511C 80069D1C 0801A768 */ j .L80069DA0
/* 45120 80069D20 2402000B */ addiu $v0, $zero, 0xb
.L80069D24:
/* 45124 80069D24 2605000C */ addiu $a1, $s0, 0xc
/* 45128 80069D28 0C019188 */ jal func_80064620
/* 4512C 80069D2C 24060020 */ addiu $a2, $zero, 0x20
/* 45130 80069D30 8E040004 */ lw $a0, 4($s0)
/* 45134 80069D34 8E050008 */ lw $a1, 8($s0)
/* 45138 80069D38 9222001B */ lbu $v0, 0x1b($s1)
/* 4513C 80069D3C 24060007 */ addiu $a2, $zero, 7
/* 45140 80069D40 AE02004C */ sw $v0, 0x4c($s0)
/* 45144 80069D44 9223001A */ lbu $v1, 0x1a($s1)
/* 45148 80069D48 2607002C */ addiu $a3, $s0, 0x2c
/* 4514C 80069D4C 24020010 */ addiu $v0, $zero, 0x10
/* 45150 80069D50 AE020050 */ sw $v0, 0x50($s0)
/* 45154 80069D54 24020008 */ addiu $v0, $zero, 8
/* 45158 80069D58 AE020054 */ sw $v0, 0x54($s0)
/* 4515C 80069D5C A2030064 */ sb $v1, 0x64($s0)
/* 45160 80069D60 92020064 */ lbu $v0, 0x64($s0)
/* 45164 80069D64 00031840 */ sll $v1, $v1, 1
/* 45168 80069D68 24630003 */ addiu $v1, $v1, 3
/* 4516C 80069D6C AE030060 */ sw $v1, 0x60($s0)
/* 45170 80069D70 92030064 */ lbu $v1, 0x64($s0)
/* 45174 80069D74 24420001 */ addiu $v0, $v0, 1
/* 45178 80069D78 000210C0 */ sll $v0, $v0, 3
/* 4517C 80069D7C 000318C0 */ sll $v1, $v1, 3
/* 45180 80069D80 AE020058 */ sw $v0, 0x58($s0)
/* 45184 80069D84 00431021 */ addu $v0, $v0, $v1
/* 45188 80069D88 0C01A86C */ jal func_8006A1B0
/* 4518C 80069D8C AE02005C */ sw $v0, 0x5c($s0)
/* 45190 80069D90 00401821 */ addu $v1, $v0, $zero
/* 45194 80069D94 0003102B */ sltu $v0, $zero, $v1
/* 45198 80069D98 00021023 */ negu $v0, $v0
/* 4519C 80069D9C 00621024 */ and $v0, $v1, $v0
.L80069DA0:
/* 451A0 80069DA0 8FBF0060 */ lw $ra, 0x60($sp)
/* 451A4 80069DA4 8FB1005C */ lw $s1, 0x5c($sp)
/* 451A8 80069DA8 8FB00058 */ lw $s0, 0x58($sp)
/* 451AC 80069DAC 03E00008 */ jr $ra
/* 451B0 80069DB0 27BD0068 */ addiu $sp, $sp, 0x68