papermario/ver/us/asm/nonmatchings/31650/func_80057D0C.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

55 lines
2.7 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80057D0C
/* 3310C 80057D0C 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 33110 80057D10 308400FF */ andi $a0, $a0, 0xff
/* 33114 80057D14 00041140 */ sll $v0, $a0, 5
/* 33118 80057D18 3C038008 */ lui $v1, %hi(D_80078E54)
/* 3311C 80057D1C 8C638E54 */ lw $v1, %lo(D_80078E54)($v1)
/* 33120 80057D20 00441023 */ subu $v0, $v0, $a0
/* 33124 80057D24 AFBF0010 */ sw $ra, 0x10($sp)
/* 33128 80057D28 8C63001C */ lw $v1, 0x1c($v1)
/* 3312C 80057D2C 00021080 */ sll $v0, $v0, 2
/* 33130 80057D30 00623821 */ addu $a3, $v1, $v0
/* 33134 80057D34 8CE50064 */ lw $a1, 0x64($a3)
/* 33138 80057D38 8CE20068 */ lw $v0, 0x68($a3)
/* 3313C 80057D3C 00A2102A */ slt $v0, $a1, $v0
/* 33140 80057D40 14400018 */ bnez $v0, .L80057DA4
/* 33144 80057D44 00000000 */ nop
/* 33148 80057D48 3C028008 */ lui $v0, %hi(D_80078181)
/* 3314C 80057D4C 24428181 */ addiu $v0, $v0, %lo(D_80078181)
/* 33150 80057D50 90420000 */ lbu $v0, ($v0)
/* 33154 80057D54 54400008 */ bnel $v0, $zero, .L80057D78
/* 33158 80057D58 2402007F */ addiu $v0, $zero, 0x7f
/* 3315C 80057D5C 84E3004E */ lh $v1, 0x4e($a3)
/* 33160 80057D60 3C028008 */ lui $v0, %hi(D_80078EE0)
/* 33164 80057D64 84428EE0 */ lh $v0, %lo(D_80078EE0)($v0)
/* 33168 80057D68 00620018 */ mult $v1, $v0
/* 3316C 80057D6C 00004012 */ mflo $t0
/* 33170 80057D70 08015F6E */ j .L80057DB8
/* 33174 80057D74 00081040 */ sll $v0, $t0, 1
.L80057D78:
/* 33178 80057D78 84E3004C */ lh $v1, 0x4c($a3)
/* 3317C 80057D7C 00431023 */ subu $v0, $v0, $v1
/* 33180 80057D80 00021040 */ sll $v0, $v0, 1
/* 33184 80057D84 84E3004E */ lh $v1, 0x4e($a3)
/* 33188 80057D88 3C018008 */ lui $at, %hi(D_80078E60)
/* 3318C 80057D8C 00220821 */ addu $at, $at, $v0
/* 33190 80057D90 84228E60 */ lh $v0, %lo(D_80078E60)($at)
/* 33194 80057D94 00620018 */ mult $v1, $v0
/* 33198 80057D98 00004012 */ mflo $t0
/* 3319C 80057D9C 08015F6E */ j .L80057DB8
/* 331A0 80057DA0 00081040 */ sll $v0, $t0, 1
.L80057DA4:
/* 331A4 80057DA4 84E40050 */ lh $a0, 0x50($a3)
/* 331A8 80057DA8 84E6005A */ lh $a2, 0x5a($a3)
/* 331AC 80057DAC 0C016001 */ jal func_80058004
/* 331B0 80057DB0 94E70058 */ lhu $a3, 0x58($a3)
/* 331B4 80057DB4 00021400 */ sll $v0, $v0, 0x10
.L80057DB8:
/* 331B8 80057DB8 00021403 */ sra $v0, $v0, 0x10
/* 331BC 80057DBC 8FBF0010 */ lw $ra, 0x10($sp)
/* 331C0 80057DC0 03E00008 */ jr $ra
/* 331C4 80057DC4 27BD0018 */ addiu $sp, $sp, 0x18