papermario/ver/us/asm/nonmatchings/ED0030/func_80240040_ED0030.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

46 lines
2.1 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80240040_ED0030
/* ED0030 80240040 8C820084 */ lw $v0, 0x84($a0)
/* ED0034 80240044 8C830090 */ lw $v1, 0x90($a0)
/* ED0038 80240048 00431023 */ subu $v0, $v0, $v1
/* ED003C 8024004C 44821000 */ mtc1 $v0, $f2
/* ED0040 80240050 00000000 */ nop
/* ED0044 80240054 468010A0 */ cvt.s.w $f2, $f2
/* ED0048 80240058 8C820088 */ lw $v0, 0x88($a0)
/* ED004C 8024005C 8C830094 */ lw $v1, 0x94($a0)
/* ED0050 80240060 46021082 */ mul.s $f2, $f2, $f2
/* ED0054 80240064 00000000 */ nop
/* ED0058 80240068 00431023 */ subu $v0, $v0, $v1
/* ED005C 8024006C 44822000 */ mtc1 $v0, $f4
/* ED0060 80240070 00000000 */ nop
/* ED0064 80240074 46802120 */ cvt.s.w $f4, $f4
/* ED0068 80240078 8C82008C */ lw $v0, 0x8c($a0)
/* ED006C 8024007C 46042102 */ mul.s $f4, $f4, $f4
/* ED0070 80240080 00000000 */ nop
/* ED0074 80240084 8C830098 */ lw $v1, 0x98($a0)
/* ED0078 80240088 00431023 */ subu $v0, $v0, $v1
/* ED007C 8024008C 44820000 */ mtc1 $v0, $f0
/* ED0080 80240090 00000000 */ nop
/* ED0084 80240094 46800020 */ cvt.s.w $f0, $f0
/* ED0088 80240098 46000002 */ mul.s $f0, $f0, $f0
/* ED008C 8024009C 00000000 */ nop
/* ED0090 802400A0 46041080 */ add.s $f2, $f2, $f4
/* ED0094 802400A4 46001080 */ add.s $f2, $f2, $f0
/* ED0098 802400A8 3C014561 */ lui $at, 0x4561
/* ED009C 802400AC 44810000 */ mtc1 $at, $f0
/* ED00A0 802400B0 00000000 */ nop
/* ED00A4 802400B4 4600103C */ c.lt.s $f2, $f0
/* ED00A8 802400B8 00000000 */ nop
/* ED00AC 802400BC 45010002 */ bc1t .L802400C8
/* ED00B0 802400C0 24020001 */ addiu $v0, $zero, 1
/* ED00B4 802400C4 0000102D */ daddu $v0, $zero, $zero
.L802400C8:
/* ED00B8 802400C8 AC820084 */ sw $v0, 0x84($a0)
/* ED00BC 802400CC 03E00008 */ jr $ra
/* ED00C0 802400D0 24020002 */ addiu $v0, $zero, 2
/* ED00C4 802400D4 00000000 */ nop
/* ED00C8 802400D8 00000000 */ nop
/* ED00CC 802400DC 00000000 */ nop