papermario/ver/jp/asm/nonmatchings/23330/func_800497F4.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

53 lines
2.7 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_800497F4
/* 24BF4 800497F4 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 24BF8 800497F8 AFB3001C */ sw $s3, 0x1c($sp)
/* 24BFC 800497FC 0080982D */ daddu $s3, $a0, $zero
/* 24C00 80049800 AFBF0020 */ sw $ra, 0x20($sp)
/* 24C04 80049804 AFB20018 */ sw $s2, 0x18($sp)
/* 24C08 80049808 AFB10014 */ sw $s1, 0x14($sp)
/* 24C0C 8004980C AFB00010 */ sw $s0, 0x10($sp)
/* 24C10 80049810 8E720148 */ lw $s2, 0x148($s3)
/* 24C14 80049814 86440008 */ lh $a0, 8($s2)
/* 24C18 80049818 0C00E9EB */ jal func_8003A7AC
/* 24C1C 8004981C 00A0882D */ daddu $s1, $a1, $zero
/* 24C20 80049820 8E240008 */ lw $a0, 8($s1)
/* 24C24 80049824 0040802D */ daddu $s0, $v0, $zero
/* 24C28 80049828 00041FC2 */ srl $v1, $a0, 0x1f
/* 24C2C 8004982C 00832021 */ addu $a0, $a0, $v1
/* 24C30 80049830 00042043 */ sra $a0, $a0, 1
/* 24C34 80049834 0C00A66F */ jal func_800299BC
/* 24C38 80049838 24840001 */ addiu $a0, $a0, 1
/* 24C3C 8004983C 8E230008 */ lw $v1, 8($s1)
/* 24C40 80049840 240400B4 */ addiu $a0, $zero, 0xb4
/* 24C44 80049844 00032FC2 */ srl $a1, $v1, 0x1f
/* 24C48 80049848 00651821 */ addu $v1, $v1, $a1
/* 24C4C 8004984C 00031843 */ sra $v1, $v1, 1
/* 24C50 80049850 00621821 */ addu $v1, $v1, $v0
/* 24C54 80049854 0C00A66F */ jal func_800299BC
/* 24C58 80049858 A603008E */ sh $v1, 0x8e($s0)
/* 24C5C 8004985C C60C000C */ lwc1 $f12, 0xc($s0)
/* 24C60 80049860 44820000 */ mtc1 $v0, $f0
/* 24C64 80049864 00000000 */ nop
/* 24C68 80049868 46800020 */ cvt.s.w $f0, $f0
/* 24C6C 8004986C 46006300 */ add.s $f12, $f12, $f0
/* 24C70 80049870 3C0142B4 */ lui $at, 0x42b4
/* 24C74 80049874 44810000 */ mtc1 $at, $f0
/* 24C78 80049878 0C00A6B9 */ jal func_80029AE4
/* 24C7C 8004987C 46006301 */ sub.s $f12, $f12, $f0
/* 24C80 80049880 E600000C */ swc1 $f0, 0xc($s0)
/* 24C84 80049884 8E4200CC */ lw $v0, 0xcc($s2)
/* 24C88 80049888 8C420000 */ lw $v0, ($v0)
/* 24C8C 8004988C AE020028 */ sw $v0, 0x28($s0)
/* 24C90 80049890 24020003 */ addiu $v0, $zero, 3
/* 24C94 80049894 AE620070 */ sw $v0, 0x70($s3)
/* 24C98 80049898 8FBF0020 */ lw $ra, 0x20($sp)
/* 24C9C 8004989C 8FB3001C */ lw $s3, 0x1c($sp)
/* 24CA0 800498A0 8FB20018 */ lw $s2, 0x18($sp)
/* 24CA4 800498A4 8FB10014 */ lw $s1, 0x14($sp)
/* 24CA8 800498A8 8FB00010 */ lw $s0, 0x10($sp)
/* 24CAC 800498AC 03E00008 */ jr $ra
/* 24CB0 800498B0 27BD0028 */ addiu $sp, $sp, 0x28