papermario/ver/jp/asm/nonmatchings/1F240/func_800455C0.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

95 lines
4.7 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_800455C0
/* 209C0 800455C0 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 209C4 800455C4 AFB00040 */ sw $s0, 0x40($sp)
/* 209C8 800455C8 0080802D */ daddu $s0, $a0, $zero
/* 209CC 800455CC AFBF0048 */ sw $ra, 0x48($sp)
/* 209D0 800455D0 AFB10044 */ sw $s1, 0x44($sp)
/* 209D4 800455D4 8E110148 */ lw $s1, 0x148($s0)
/* 209D8 800455D8 0C00E9EB */ jal func_8003A7AC
/* 209DC 800455DC 86240008 */ lh $a0, 8($s1)
/* 209E0 800455E0 8E03000C */ lw $v1, 0xc($s0)
/* 209E4 800455E4 0200202D */ daddu $a0, $s0, $zero
/* 209E8 800455E8 8C650000 */ lw $a1, ($v1)
/* 209EC 800455EC 0C0B1EAF */ jal func_802C7ABC
/* 209F0 800455F0 0040802D */ daddu $s0, $v0, $zero
/* 209F4 800455F4 8E2300B0 */ lw $v1, 0xb0($s1)
/* 209F8 800455F8 34630004 */ ori $v1, $v1, 4
/* 209FC 800455FC 14400040 */ bnez $v0, .L80045700
/* 20A00 80045600 AE2300B0 */ sw $v1, 0xb0($s1)
/* 20A04 80045604 30620010 */ andi $v0, $v1, 0x10
/* 20A08 80045608 14400004 */ bnez $v0, .L8004561C
/* 20A0C 8004560C 00000000 */ nop
/* 20A10 80045610 8E2200CC */ lw $v0, 0xcc($s1)
/* 20A14 80045614 8C420000 */ lw $v0, ($v0)
/* 20A18 80045618 AE020028 */ sw $v0, 0x28($s0)
.L8004561C:
/* 20A1C 8004561C 8E2200B0 */ lw $v0, 0xb0($s1)
/* 20A20 80045620 30420008 */ andi $v0, $v0, 8
/* 20A24 80045624 14400015 */ bnez $v0, .L8004567C
/* 20A28 80045628 24040002 */ addiu $a0, $zero, 2
/* 20A2C 8004562C 0200282D */ daddu $a1, $s0, $zero
/* 20A30 80045630 860300A8 */ lh $v1, 0xa8($s0)
/* 20A34 80045634 44800000 */ mtc1 $zero, $f0
/* 20A38 80045638 3C01C1A0 */ lui $at, 0xc1a0
/* 20A3C 8004563C 44811000 */ mtc1 $at, $f2
/* 20A40 80045640 24020028 */ addiu $v0, $zero, 0x28
/* 20A44 80045644 AFA2001C */ sw $v0, 0x1c($sp)
/* 20A48 80045648 44834000 */ mtc1 $v1, $f8
/* 20A4C 8004564C 00000000 */ nop
/* 20A50 80045650 46804220 */ cvt.s.w $f8, $f8
/* 20A54 80045654 44060000 */ mfc1 $a2, $f0
/* 20A58 80045658 3C013F80 */ lui $at, 0x3f80
/* 20A5C 8004565C 44810000 */ mtc1 $at, $f0
/* 20A60 80045660 44074000 */ mfc1 $a3, $f8
/* 20A64 80045664 03A21021 */ addu $v0, $sp, $v0
/* 20A68 80045668 AFA20020 */ sw $v0, 0x20($sp)
/* 20A6C 8004566C E7A20018 */ swc1 $f2, 0x18($sp)
/* 20A70 80045670 E7A00010 */ swc1 $f0, 0x10($sp)
/* 20A74 80045674 0C01BF9C */ jal func_8006FE70
/* 20A78 80045678 AFA60014 */ sw $a2, 0x14($sp)
.L8004567C:
/* 20A7C 8004567C 8E020000 */ lw $v0, ($s0)
/* 20A80 80045680 24030808 */ addiu $v1, $zero, 0x808
/* 20A84 80045684 30420A08 */ andi $v0, $v0, 0xa08
/* 20A88 80045688 1443001D */ bne $v0, $v1, .L80045700
/* 20A8C 8004568C 27A5002C */ addiu $a1, $sp, 0x2c
/* 20A90 80045690 27A60030 */ addiu $a2, $sp, 0x30
/* 20A94 80045694 C6000038 */ lwc1 $f0, 0x38($s0)
/* 20A98 80045698 860200A8 */ lh $v0, 0xa8($s0)
/* 20A9C 8004569C 3C0142C8 */ lui $at, 0x42c8
/* 20AA0 800456A0 44812000 */ mtc1 $at, $f4
/* 20AA4 800456A4 44823000 */ mtc1 $v0, $f6
/* 20AA8 800456A8 00000000 */ nop
/* 20AAC 800456AC 468031A0 */ cvt.s.w $f6, $f6
/* 20AB0 800456B0 27A20038 */ addiu $v0, $sp, 0x38
/* 20AB4 800456B4 E7A0002C */ swc1 $f0, 0x2c($sp)
/* 20AB8 800456B8 C600003C */ lwc1 $f0, 0x3c($s0)
/* 20ABC 800456BC C6020040 */ lwc1 $f2, 0x40($s0)
/* 20AC0 800456C0 46060000 */ add.s $f0, $f0, $f6
/* 20AC4 800456C4 E7A40038 */ swc1 $f4, 0x38($sp)
/* 20AC8 800456C8 E7A20034 */ swc1 $f2, 0x34($sp)
/* 20ACC 800456CC E7A00030 */ swc1 $f0, 0x30($sp)
/* 20AD0 800456D0 AFA20010 */ sw $v0, 0x10($sp)
/* 20AD4 800456D4 8E040080 */ lw $a0, 0x80($s0)
/* 20AD8 800456D8 0C0372D7 */ jal func_800DCB5C
/* 20ADC 800456DC 27A70034 */ addiu $a3, $sp, 0x34
/* 20AE0 800456E0 10400003 */ beqz $v0, .L800456F0
/* 20AE4 800456E4 00000000 */ nop
/* 20AE8 800456E8 C7A00030 */ lwc1 $f0, 0x30($sp)
/* 20AEC 800456EC E600003C */ swc1 $f0, 0x3c($s0)
.L800456F0:
/* 20AF0 800456F0 8E020000 */ lw $v0, ($s0)
/* 20AF4 800456F4 2403F7FF */ addiu $v1, $zero, -0x801
/* 20AF8 800456F8 00431024 */ and $v0, $v0, $v1
/* 20AFC 800456FC AE020000 */ sw $v0, ($s0)
.L80045700:
/* 20B00 80045700 8FBF0048 */ lw $ra, 0x48($sp)
/* 20B04 80045704 8FB10044 */ lw $s1, 0x44($sp)
/* 20B08 80045708 8FB00040 */ lw $s0, 0x40($sp)
/* 20B0C 8004570C 24020002 */ addiu $v0, $zero, 2
/* 20B10 80045710 03E00008 */ jr $ra
/* 20B14 80045714 27BD0050 */ addiu $sp, $sp, 0x50