papermario/ver/jp/asm/nonmatchings/285C0/func_8004E530.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

43 lines
1.9 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8004E530
/* 29930 8004E530 3C02009F */ lui $v0, 0x9f
/* 29934 8004E534 344238DE */ ori $v0, $v0, 0x38de
/* 29938 8004E538 14C00002 */ bnez $a2, .L8004E544
/* 2993C 8004E53C 0046001B */ divu $zero, $v0, $a2
/* 29940 8004E540 0007000D */ break 7
.L8004E544:
/* 29944 8004E544 00001812 */ mflo $v1
/* 29948 8004E548 3C020007 */ lui $v0, 7
/* 2994C 8004E54C 3442A120 */ ori $v0, $v0, 0xa120
/* 29950 8004E550 0043102B */ sltu $v0, $v0, $v1
/* 29954 8004E554 10400004 */ beqz $v0, .L8004E568
/* 29958 8004E558 3C020001 */ lui $v0, 1
/* 2995C 8004E55C 3C030007 */ lui $v1, 7
/* 29960 8004E560 08013960 */ j .L8004E580
/* 29964 8004E564 3463A120 */ ori $v1, $v1, 0xa120
.L8004E568:
/* 29968 8004E568 3442387F */ ori $v0, $v0, 0x387f
/* 2996C 8004E56C 0043102B */ sltu $v0, $v0, $v1
/* 29970 8004E570 14400004 */ bnez $v0, .L8004E584
/* 29974 8004E574 0065102B */ sltu $v0, $v1, $a1
/* 29978 8004E578 3C030001 */ lui $v1, 1
/* 2997C 8004E57C 34633880 */ ori $v1, $v1, 0x3880
.L8004E580:
/* 29980 8004E580 0065102B */ sltu $v0, $v1, $a1
.L8004E584:
/* 29984 8004E584 54400001 */ bnel $v0, $zero, .L8004E58C
/* 29988 8004E588 0060282D */ daddu $a1, $v1, $zero
.L8004E58C:
/* 2998C 8004E58C 3C021062 */ lui $v0, 0x1062
/* 29990 8004E590 34424DD3 */ ori $v0, $v0, 0x4dd3
/* 29994 8004E594 00620019 */ multu $v1, $v0
/* 29998 8004E598 AC850008 */ sw $a1, 8($a0)
/* 2999C 8004E59C AC83000C */ sw $v1, 0xc($a0)
/* 299A0 8004E5A0 AC830010 */ sw $v1, 0x10($a0)
/* 299A4 8004E5A4 00003810 */ mfhi $a3
/* 299A8 8004E5A8 00071182 */ srl $v0, $a3, 6
/* 299AC 8004E5AC 03E00008 */ jr $ra
/* 299B0 8004E5B0 A482020A */ sh $v0, 0x20a($a0)