papermario/ver/jp/asm/nonmatchings/43BC0/func_80068C00.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

116 lines
5.7 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80068C00
/* 44000 80068C00 27BDFEB0 */ addiu $sp, $sp, -0x150
/* 44004 80068C04 AFB10134 */ sw $s1, 0x134($sp)
/* 44008 80068C08 00808821 */ addu $s1, $a0, $zero
/* 4400C 80068C0C AFB00130 */ sw $s0, 0x130($sp)
/* 44010 80068C10 00A08021 */ addu $s0, $a1, $zero
/* 44014 80068C14 AFBF0148 */ sw $ra, 0x148($sp)
/* 44018 80068C18 AFB50144 */ sw $s5, 0x144($sp)
/* 4401C 80068C1C AFB40140 */ sw $s4, 0x140($sp)
/* 44020 80068C20 AFB3013C */ sw $s3, 0x13c($sp)
/* 44024 80068C24 AFB20138 */ sw $s2, 0x138($sp)
/* 44028 80068C28 8E220050 */ lw $v0, 0x50($s1)
/* 4402C 80068C2C 00101FC2 */ srl $v1, $s0, 0x1f
/* 44030 80068C30 0202102A */ slt $v0, $s0, $v0
/* 44034 80068C34 38420001 */ xori $v0, $v0, 1
/* 44038 80068C38 00431025 */ or $v0, $v0, $v1
/* 4403C 80068C3C 1440001F */ bnez $v0, .L80068CBC
/* 44040 80068C40 00C0A021 */ addu $s4, $a2, $zero
/* 44044 80068C44 8E220000 */ lw $v0, ($s1)
/* 44048 80068C48 30420001 */ andi $v0, $v0, 1
/* 4404C 80068C4C 10400048 */ beqz $v0, .L80068D70
/* 44050 80068C50 24020005 */ addiu $v0, $zero, 5
/* 44054 80068C54 0C01A76D */ jal func_80069DB4
/* 44058 80068C58 02202021 */ addu $a0, $s1, $zero
/* 4405C 80068C5C 14400044 */ bnez $v0, .L80068D70
/* 44060 80068C60 00000000 */ nop
/* 44064 80068C64 92220065 */ lbu $v0, 0x65($s1)
/* 44068 80068C68 10400005 */ beqz $v0, .L80068C80
/* 4406C 80068C6C 02202021 */ addu $a0, $s1, $zero
/* 44070 80068C70 0C01A5AC */ jal func_800696B0
/* 44074 80068C74 00002821 */ addu $a1, $zero, $zero
/* 44078 80068C78 1440003D */ bnez $v0, .L80068D70
/* 4407C 80068C7C 00000000 */ nop
.L80068C80:
/* 44080 80068C80 8E240004 */ lw $a0, 4($s1)
/* 44084 80068C84 8E26005C */ lw $a2, 0x5c($s1)
/* 44088 80068C88 8E250008 */ lw $a1, 8($s1)
/* 4408C 80068C8C 27A70110 */ addiu $a3, $sp, 0x110
/* 44090 80068C90 00D03021 */ addu $a2, $a2, $s0
/* 44094 80068C94 0C01A86C */ jal func_8006A1B0
/* 44098 80068C98 30C6FFFF */ andi $a2, $a2, 0xffff
/* 4409C 80068C9C 14400034 */ bnez $v0, .L80068D70
/* 440A0 80068CA0 00000000 */ nop
/* 440A4 80068CA4 97A20114 */ lhu $v0, 0x114($sp)
/* 440A8 80068CA8 10400031 */ beqz $v0, .L80068D70
/* 440AC 80068CAC 24020005 */ addiu $v0, $zero, 5
/* 440B0 80068CB0 8FA20110 */ lw $v0, 0x110($sp)
/* 440B4 80068CB4 14400003 */ bnez $v0, .L80068CC4
/* 440B8 80068CB8 00009821 */ addu $s3, $zero, $zero
.L80068CBC:
/* 440BC 80068CBC 0801A35C */ j .L80068D70
/* 440C0 80068CC0 24020005 */ addiu $v0, $zero, 5
.L80068CC4:
/* 440C4 80068CC4 97B00116 */ lhu $s0, 0x116($sp)
/* 440C8 80068CC8 241200FF */ addiu $s2, $zero, 0xff
/* 440CC 80068CCC 27B50010 */ addiu $s5, $sp, 0x10
.L80068CD0:
/* 440D0 80068CD0 8E220060 */ lw $v0, 0x60($s1)
/* 440D4 80068CD4 3203FFFF */ andi $v1, $s0, 0xffff
/* 440D8 80068CD8 0062102A */ slt $v0, $v1, $v0
/* 440DC 80068CDC 14400010 */ bnez $v0, .L80068D20
/* 440E0 80068CE0 00031202 */ srl $v0, $v1, 8
/* 440E4 80068CE4 304700FF */ andi $a3, $v0, 0xff
/* 440E8 80068CE8 10F20007 */ beq $a3, $s2, .L80068D08
/* 440EC 80068CEC 02202021 */ addu $a0, $s1, $zero
/* 440F0 80068CF0 00409021 */ addu $s2, $v0, $zero
/* 440F4 80068CF4 27A50010 */ addiu $a1, $sp, 0x10
/* 440F8 80068CF8 0C01A79B */ jal func_80069E6C
/* 440FC 80068CFC 00003021 */ addu $a2, $zero, $zero
/* 44100 80068D00 1440001B */ bnez $v0, .L80068D70
/* 44104 80068D04 00000000 */ nop
.L80068D08:
/* 44108 80068D08 320200FF */ andi $v0, $s0, 0xff
/* 4410C 80068D0C 00021040 */ sll $v0, $v0, 1
/* 44110 80068D10 00551021 */ addu $v0, $v0, $s5
/* 44114 80068D14 94500000 */ lhu $s0, ($v0)
/* 44118 80068D18 0801A334 */ j .L80068CD0
/* 4411C 80068D1C 26730001 */ addiu $s3, $s3, 1
.L80068D20:
/* 44120 80068D20 24020001 */ addiu $v0, $zero, 1
/* 44124 80068D24 14620012 */ bne $v1, $v0, .L80068D70
/* 44128 80068D28 24020003 */ addiu $v0, $zero, 3
/* 4412C 80068D2C 00131200 */ sll $v0, $s3, 8
/* 44130 80068D30 AE820000 */ sw $v0, ($s4)
/* 44134 80068D34 97A20114 */ lhu $v0, 0x114($sp)
/* 44138 80068D38 27A40120 */ addiu $a0, $sp, 0x120
/* 4413C 80068D3C A6820008 */ sh $v0, 8($s4)
/* 44140 80068D40 8FA20110 */ lw $v0, 0x110($sp)
/* 44144 80068D44 2685000E */ addiu $a1, $s4, 0xe
/* 44148 80068D48 24060010 */ addiu $a2, $zero, 0x10
/* 4414C 80068D4C 0C019188 */ jal func_80064620
/* 44150 80068D50 AE820004 */ sw $v0, 4($s4)
/* 44154 80068D54 27A4011C */ addiu $a0, $sp, 0x11c
/* 44158 80068D58 2685000A */ addiu $a1, $s4, 0xa
/* 4415C 80068D5C 0C019188 */ jal func_80064620
/* 44160 80068D60 24060004 */ addiu $a2, $zero, 4
/* 44164 80068D64 8E240004 */ lw $a0, 4($s1)
/* 44168 80068D68 0C01A528 */ jal func_800694A0
/* 4416C 80068D6C 8E250008 */ lw $a1, 8($s1)
.L80068D70:
/* 44170 80068D70 8FBF0148 */ lw $ra, 0x148($sp)
/* 44174 80068D74 8FB50144 */ lw $s5, 0x144($sp)
/* 44178 80068D78 8FB40140 */ lw $s4, 0x140($sp)
/* 4417C 80068D7C 8FB3013C */ lw $s3, 0x13c($sp)
/* 44180 80068D80 8FB20138 */ lw $s2, 0x138($sp)
/* 44184 80068D84 8FB10134 */ lw $s1, 0x134($sp)
/* 44188 80068D88 8FB00130 */ lw $s0, 0x130($sp)
/* 4418C 80068D8C 03E00008 */ jr $ra
/* 44190 80068D90 27BD0150 */ addiu $sp, $sp, 0x150
/* 44194 80068D94 00000000 */ nop
/* 44198 80068D98 00000000 */ nop
/* 4419C 80068D9C 00000000 */ nop