papermario/ver/jp/asm/nonmatchings/11E70/func_80037AAC.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

172 lines
8.9 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80037AAC
/* 12EAC 80037AAC 27BDFFF8 */ addiu $sp, $sp, -8
/* 12EB0 80037AB0 3C04E300 */ lui $a0, 0xe300
/* 12EB4 80037AB4 3C07800A */ lui $a3, %hi(D_8009A64C)
/* 12EB8 80037AB8 24E7A64C */ addiu $a3, $a3, %lo(D_8009A64C)
/* 12EBC 80037ABC 34841001 */ ori $a0, $a0, 0x1001
/* 12EC0 80037AC0 3C02DE00 */ lui $v0, 0xde00
/* 12EC4 80037AC4 AFB10004 */ sw $s1, 4($sp)
/* 12EC8 80037AC8 AFB00000 */ sw $s0, ($sp)
/* 12ECC 80037ACC 8CE50000 */ lw $a1, ($a3)
/* 12ED0 80037AD0 3C01437F */ lui $at, 0x437f
/* 12ED4 80037AD4 44810000 */ mtc1 $at, $f0
/* 12ED8 80037AD8 00A0182D */ daddu $v1, $a1, $zero
/* 12EDC 80037ADC 24A50008 */ addiu $a1, $a1, 8
/* 12EE0 80037AE0 ACE50000 */ sw $a1, ($a3)
/* 12EE4 80037AE4 AC620000 */ sw $v0, ($v1)
/* 12EE8 80037AE8 3C028007 */ lui $v0, %hi(D_80077A20)
/* 12EEC 80037AEC 24427A20 */ addiu $v0, $v0, %lo(D_80077A20)
/* 12EF0 80037AF0 AC620004 */ sw $v0, 4($v1)
/* 12EF4 80037AF4 24A20008 */ addiu $v0, $a1, 8
/* 12EF8 80037AF8 ACE20000 */ sw $v0, ($a3)
/* 12EFC 80037AFC 34028000 */ ori $v0, $zero, 0x8000
/* 12F00 80037B00 46006302 */ mul.s $f12, $f12, $f0
/* 12F04 80037B04 00000000 */ nop
/* 12F08 80037B08 ACA20004 */ sw $v0, 4($a1)
/* 12F0C 80037B0C 24A20010 */ addiu $v0, $a1, 0x10
/* 12F10 80037B10 ACA40000 */ sw $a0, ($a1)
/* 12F14 80037B14 ACE20000 */ sw $v0, ($a3)
/* 12F18 80037B18 3C02E700 */ lui $v0, 0xe700
/* 12F1C 80037B1C 460C0001 */ sub.s $f0, $f0, $f12
/* 12F20 80037B20 ACA20008 */ sw $v0, 8($a1)
/* 12F24 80037B24 4600008D */ trunc.w.s $f2, $f0
/* 12F28 80037B28 44061000 */ mfc1 $a2, $f2
/* 12F2C 80037B2C 00000000 */ nop
/* 12F30 80037B30 28C200FF */ slti $v0, $a2, 0xff
/* 12F34 80037B34 10400011 */ beqz $v0, .L80037B7C
/* 12F38 80037B38 ACA0000C */ sw $zero, 0xc($a1)
/* 12F3C 80037B3C 04C20001 */ bltzl $a2, .L80037B44
/* 12F40 80037B40 0000302D */ daddu $a2, $zero, $zero
.L80037B44:
/* 12F44 80037B44 3C04FCFF */ lui $a0, 0xfcff
/* 12F48 80037B48 348497FF */ ori $a0, $a0, 0x97ff
/* 12F4C 80037B4C 3C03FF2C */ lui $v1, 0xff2c
/* 12F50 80037B50 3463FE7F */ ori $v1, $v1, 0xfe7f
/* 12F54 80037B54 24A20018 */ addiu $v0, $a1, 0x18
/* 12F58 80037B58 ACE20000 */ sw $v0, ($a3)
/* 12F5C 80037B5C 24A20020 */ addiu $v0, $a1, 0x20
/* 12F60 80037B60 ACA40010 */ sw $a0, 0x10($a1)
/* 12F64 80037B64 ACA30014 */ sw $v1, 0x14($a1)
/* 12F68 80037B68 ACE20000 */ sw $v0, ($a3)
/* 12F6C 80037B6C 3C02FA00 */ lui $v0, 0xfa00
/* 12F70 80037B70 ACA20018 */ sw $v0, 0x18($a1)
/* 12F74 80037B74 30C200FF */ andi $v0, $a2, 0xff
/* 12F78 80037B78 ACA2001C */ sw $v0, 0x1c($a1)
.L80037B7C:
/* 12F7C 80037B7C 3C07F500 */ lui $a3, 0xf500
/* 12F80 80037B80 34E70100 */ ori $a3, $a3, 0x100
/* 12F84 80037B84 3C090703 */ lui $t1, 0x703
/* 12F88 80037B88 3529C000 */ ori $t1, $t1, 0xc000
/* 12F8C 80037B8C 3C0AFD48 */ lui $t2, 0xfd48
/* 12F90 80037B90 354A003F */ ori $t2, $t2, 0x3f
/* 12F94 80037B94 3C0BF548 */ lui $t3, 0xf548
/* 12F98 80037B98 356B1000 */ ori $t3, $t3, 0x1000
/* 12F9C 80037B9C 3C0C070F */ lui $t4, 0x70f
/* 12FA0 80037BA0 358CE07C */ ori $t4, $t4, 0xe07c
/* 12FA4 80037BA4 3C0DF540 */ lui $t5, 0xf540
/* 12FA8 80037BA8 35AD1000 */ ori $t5, $t5, 0x1000
/* 12FAC 80037BAC 3C0E001F */ lui $t6, 0x1f
/* 12FB0 80037BB0 35CEC07C */ ori $t6, $t6, 0xc07c
/* 12FB4 80037BB4 3C10E438 */ lui $s0, 0xe438
/* 12FB8 80037BB8 3610437C */ ori $s0, $s0, 0x437c
/* 12FBC 80037BBC 3C0F0018 */ lui $t7, 0x18
/* 12FC0 80037BC0 35EF42FC */ ori $t7, $t7, 0x42fc
/* 12FC4 80037BC4 3C110400 */ lui $s1, 0x400
/* 12FC8 80037BC8 3C04800A */ lui $a0, %hi(D_8009A64C)
/* 12FCC 80037BCC 2484A64C */ addiu $a0, $a0, %lo(D_8009A64C)
/* 12FD0 80037BD0 36310400 */ ori $s1, $s1, 0x400
/* 12FD4 80037BD4 8C820000 */ lw $v0, ($a0)
/* 12FD8 80037BD8 3C03FD10 */ lui $v1, 0xfd10
/* 12FDC 80037BDC 0040302D */ daddu $a2, $v0, $zero
/* 12FE0 80037BE0 24420008 */ addiu $v0, $v0, 8
/* 12FE4 80037BE4 AC820000 */ sw $v0, ($a0)
/* 12FE8 80037BE8 3C05800A */ lui $a1, %hi(D_8009E794)
/* 12FEC 80037BEC 8CA5E794 */ lw $a1, %lo(D_8009E794)($a1)
/* 12FF0 80037BF0 3C080700 */ lui $t0, 0x700
/* 12FF4 80037BF4 ACC30000 */ sw $v1, ($a2)
/* 12FF8 80037BF8 24430008 */ addiu $v1, $v0, 8
/* 12FFC 80037BFC ACC50004 */ sw $a1, 4($a2)
/* 13000 80037C00 AC830000 */ sw $v1, ($a0)
/* 13004 80037C04 3C03E800 */ lui $v1, 0xe800
/* 13008 80037C08 AC430000 */ sw $v1, ($v0)
/* 1300C 80037C0C 24430010 */ addiu $v1, $v0, 0x10
/* 13010 80037C10 AC400004 */ sw $zero, 4($v0)
/* 13014 80037C14 AC830000 */ sw $v1, ($a0)
/* 13018 80037C18 24430018 */ addiu $v1, $v0, 0x18
/* 1301C 80037C1C AC470008 */ sw $a3, 8($v0)
/* 13020 80037C20 3C07E600 */ lui $a3, 0xe600
/* 13024 80037C24 AC48000C */ sw $t0, 0xc($v0)
/* 13028 80037C28 AC830000 */ sw $v1, ($a0)
/* 1302C 80037C2C 24430020 */ addiu $v1, $v0, 0x20
/* 13030 80037C30 AC470010 */ sw $a3, 0x10($v0)
/* 13034 80037C34 AC400014 */ sw $zero, 0x14($v0)
/* 13038 80037C38 AC830000 */ sw $v1, ($a0)
/* 1303C 80037C3C 3C03F000 */ lui $v1, 0xf000
/* 13040 80037C40 AC430018 */ sw $v1, 0x18($v0)
/* 13044 80037C44 24430028 */ addiu $v1, $v0, 0x28
/* 13048 80037C48 3C06E700 */ lui $a2, 0xe700
/* 1304C 80037C4C AC49001C */ sw $t1, 0x1c($v0)
/* 13050 80037C50 AC830000 */ sw $v1, ($a0)
/* 13054 80037C54 3C05800A */ lui $a1, %hi(D_8009E78C)
/* 13058 80037C58 8CA5E78C */ lw $a1, %lo(D_8009E78C)($a1)
/* 1305C 80037C5C 24430030 */ addiu $v1, $v0, 0x30
/* 13060 80037C60 AC460020 */ sw $a2, 0x20($v0)
/* 13064 80037C64 AC400024 */ sw $zero, 0x24($v0)
/* 13068 80037C68 AC830000 */ sw $v1, ($a0)
/* 1306C 80037C6C 24430038 */ addiu $v1, $v0, 0x38
/* 13070 80037C70 AC4A0028 */ sw $t2, 0x28($v0)
/* 13074 80037C74 AC45002C */ sw $a1, 0x2c($v0)
/* 13078 80037C78 AC830000 */ sw $v1, ($a0)
/* 1307C 80037C7C 24430040 */ addiu $v1, $v0, 0x40
/* 13080 80037C80 AC4B0030 */ sw $t3, 0x30($v0)
/* 13084 80037C84 AC480034 */ sw $t0, 0x34($v0)
/* 13088 80037C88 AC830000 */ sw $v1, ($a0)
/* 1308C 80037C8C 24430048 */ addiu $v1, $v0, 0x48
/* 13090 80037C90 AC470038 */ sw $a3, 0x38($v0)
/* 13094 80037C94 AC40003C */ sw $zero, 0x3c($v0)
/* 13098 80037C98 AC830000 */ sw $v1, ($a0)
/* 1309C 80037C9C 3C03F400 */ lui $v1, 0xf400
/* 130A0 80037CA0 AC430040 */ sw $v1, 0x40($v0)
/* 130A4 80037CA4 24430050 */ addiu $v1, $v0, 0x50
/* 130A8 80037CA8 AC4C0044 */ sw $t4, 0x44($v0)
/* 130AC 80037CAC AC830000 */ sw $v1, ($a0)
/* 130B0 80037CB0 24430058 */ addiu $v1, $v0, 0x58
/* 130B4 80037CB4 AC460048 */ sw $a2, 0x48($v0)
/* 130B8 80037CB8 AC40004C */ sw $zero, 0x4c($v0)
/* 130BC 80037CBC AC830000 */ sw $v1, ($a0)
/* 130C0 80037CC0 24430060 */ addiu $v1, $v0, 0x60
/* 130C4 80037CC4 AC4D0050 */ sw $t5, 0x50($v0)
/* 130C8 80037CC8 AC400054 */ sw $zero, 0x54($v0)
/* 130CC 80037CCC AC830000 */ sw $v1, ($a0)
/* 130D0 80037CD0 3C03F200 */ lui $v1, 0xf200
/* 130D4 80037CD4 AC430058 */ sw $v1, 0x58($v0)
/* 130D8 80037CD8 24430068 */ addiu $v1, $v0, 0x68
/* 130DC 80037CDC AC4E005C */ sw $t6, 0x5c($v0)
/* 130E0 80037CE0 AC830000 */ sw $v1, ($a0)
/* 130E4 80037CE4 24430070 */ addiu $v1, $v0, 0x70
/* 130E8 80037CE8 AC500060 */ sw $s0, 0x60($v0)
/* 130EC 80037CEC AC4F0064 */ sw $t7, 0x64($v0)
/* 130F0 80037CF0 AC830000 */ sw $v1, ($a0)
/* 130F4 80037CF4 3C03E100 */ lui $v1, 0xe100
/* 130F8 80037CF8 AC430068 */ sw $v1, 0x68($v0)
/* 130FC 80037CFC 24430078 */ addiu $v1, $v0, 0x78
/* 13100 80037D00 AC40006C */ sw $zero, 0x6c($v0)
/* 13104 80037D04 AC830000 */ sw $v1, ($a0)
/* 13108 80037D08 3C03F100 */ lui $v1, 0xf100
/* 1310C 80037D0C AC430070 */ sw $v1, 0x70($v0)
/* 13110 80037D10 24430080 */ addiu $v1, $v0, 0x80
/* 13114 80037D14 AC510074 */ sw $s1, 0x74($v0)
/* 13118 80037D18 AC830000 */ sw $v1, ($a0)
/* 1311C 80037D1C AC460078 */ sw $a2, 0x78($v0)
/* 13120 80037D20 AC40007C */ sw $zero, 0x7c($v0)
/* 13124 80037D24 8FB10004 */ lw $s1, 4($sp)
/* 13128 80037D28 8FB00000 */ lw $s0, ($sp)
/* 1312C 80037D2C 03E00008 */ jr $ra
/* 13130 80037D30 27BD0008 */ addiu $sp, $sp, 8
/* 13134 80037D34 00000000 */ nop
/* 13138 80037D38 00000000 */ nop
/* 1313C 80037D3C 00000000 */ nop