papermario/ver/us/asm/nonmatchings/npc/npc_do_gravity.s
Ethan Roseman 647db26552
Mass function rename from Star Rod + a couple funcs (#298)
* .

* yaml update

* git subrepo pull --force tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "cd690f725d"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "cd690f725d"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* separate main bss syms

* renames and one match

* SR symbol rename

* fix symbol_addrs

* git subrepo pull tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "5fa8aa24ca"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "5fa8aa24ca"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* remove old artifacts
2021-06-30 11:27:12 +09:00

98 lines
4.8 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel npc_do_gravity
/* 14A88 80039688 27BDFFC0 */ addiu $sp, $sp, -0x40
/* 14A8C 8003968C AFB00030 */ sw $s0, 0x30($sp)
/* 14A90 80039690 0080802D */ daddu $s0, $a0, $zero
/* 14A94 80039694 AFBF0034 */ sw $ra, 0x34($sp)
/* 14A98 80039698 F7B40038 */ sdc1 $f20, 0x38($sp)
/* 14A9C 8003969C 8E030000 */ lw $v1, ($s0)
/* 14AA0 800396A0 30620200 */ andi $v0, $v1, 0x200
/* 14AA4 800396A4 1040004B */ beqz $v0, .L800397D4
/* 14AA8 800396A8 30620800 */ andi $v0, $v1, 0x800
/* 14AAC 800396AC 14400047 */ bnez $v0, .L800397CC
/* 14AB0 800396B0 2402EFFF */ addiu $v0, $zero, -0x1001
/* 14AB4 800396B4 3C013F80 */ lui $at, 0x3f80
/* 14AB8 800396B8 44810000 */ mtc1 $at, $f0
/* 14ABC 800396BC C602001C */ lwc1 $f2, 0x1c($s0)
/* 14AC0 800396C0 C6040038 */ lwc1 $f4, 0x38($s0)
/* 14AC4 800396C4 46001081 */ sub.s $f2, $f2, $f0
/* 14AC8 800396C8 E6000014 */ swc1 $f0, 0x14($s0)
/* 14ACC 800396CC C600003C */ lwc1 $f0, 0x3c($s0)
/* 14AD0 800396D0 E7A40020 */ swc1 $f4, 0x20($sp)
/* 14AD4 800396D4 3C014150 */ lui $at, 0x4150
/* 14AD8 800396D8 44812000 */ mtc1 $at, $f4
/* 14ADC 800396DC 46020000 */ add.s $f0, $f0, $f2
/* 14AE0 800396E0 3C030400 */ lui $v1, 0x400
/* 14AE4 800396E4 E602001C */ swc1 $f2, 0x1c($s0)
/* 14AE8 800396E8 E600003C */ swc1 $f0, 0x3c($s0)
/* 14AEC 800396EC 3C014180 */ lui $at, 0x4180
/* 14AF0 800396F0 44810000 */ mtc1 $at, $f0
/* 14AF4 800396F4 46001085 */ abs.s $f2, $f2
/* 14AF8 800396F8 46001080 */ add.s $f2, $f2, $f0
/* 14AFC 800396FC C600003C */ lwc1 $f0, 0x3c($s0)
/* 14B00 80039700 C6060040 */ lwc1 $f6, 0x40($s0)
/* 14B04 80039704 46040000 */ add.s $f0, $f0, $f4
/* 14B08 80039708 E7A60028 */ swc1 $f6, 0x28($sp)
/* 14B0C 8003970C E7A2002C */ swc1 $f2, 0x2c($sp)
/* 14B10 80039710 E7A00024 */ swc1 $f0, 0x24($sp)
/* 14B14 80039714 8E020000 */ lw $v0, ($s0)
/* 14B18 80039718 00431024 */ and $v0, $v0, $v1
/* 14B1C 8003971C 1440000A */ bnez $v0, .L80039748
/* 14B20 80039720 46001506 */ mov.s $f20, $f2
/* 14B24 80039724 27A50020 */ addiu $a1, $sp, 0x20
/* 14B28 80039728 27A60024 */ addiu $a2, $sp, 0x24
/* 14B2C 8003972C 27A2002C */ addiu $v0, $sp, 0x2c
/* 14B30 80039730 AFA20010 */ sw $v0, 0x10($sp)
/* 14B34 80039734 8E040080 */ lw $a0, 0x80($s0)
/* 14B38 80039738 0C0372DF */ jal npc_raycast_down_sides
/* 14B3C 8003973C 27A70028 */ addiu $a3, $sp, 0x28
/* 14B40 80039740 0800E5E0 */ j .L80039780
/* 14B44 80039744 00000000 */ nop
.L80039748:
/* 14B48 80039748 27A2002C */ addiu $v0, $sp, 0x2c
/* 14B4C 8003974C AFA20010 */ sw $v0, 0x10($sp)
/* 14B50 80039750 C600000C */ lwc1 $f0, 0xc($s0)
/* 14B54 80039754 27A50020 */ addiu $a1, $sp, 0x20
/* 14B58 80039758 E7A00014 */ swc1 $f0, 0x14($sp)
/* 14B5C 8003975C 860200A6 */ lh $v0, 0xa6($s0)
/* 14B60 80039760 27A60024 */ addiu $a2, $sp, 0x24
/* 14B64 80039764 44820000 */ mtc1 $v0, $f0
/* 14B68 80039768 00000000 */ nop
/* 14B6C 8003976C 46800020 */ cvt.s.w $f0, $f0
/* 14B70 80039770 E7A00018 */ swc1 $f0, 0x18($sp)
/* 14B74 80039774 8E040080 */ lw $a0, 0x80($s0)
/* 14B78 80039778 0C0371DE */ jal npc_raycast_down_ahead
/* 14B7C 8003977C 27A70028 */ addiu $a3, $sp, 0x28
.L80039780:
/* 14B80 80039780 10400010 */ beqz $v0, .L800397C4
/* 14B84 80039784 00000000 */ nop
/* 14B88 80039788 C7A0002C */ lwc1 $f0, 0x2c($sp)
/* 14B8C 8003978C 4614003E */ c.le.s $f0, $f20
/* 14B90 80039790 00000000 */ nop
/* 14B94 80039794 4500000B */ bc1f .L800397C4
/* 14B98 80039798 00000000 */ nop
/* 14B9C 8003979C 8E020000 */ lw $v0, ($s0)
/* 14BA0 800397A0 AE00001C */ sw $zero, 0x1c($s0)
/* 14BA4 800397A4 C7A00024 */ lwc1 $f0, 0x24($sp)
/* 14BA8 800397A8 3C038011 */ lui $v1, %hi(D_8010C97A)
/* 14BAC 800397AC 9463C97A */ lhu $v1, %lo(D_8010C97A)($v1)
/* 14BB0 800397B0 34421000 */ ori $v0, $v0, 0x1000
/* 14BB4 800397B4 AE020000 */ sw $v0, ($s0)
/* 14BB8 800397B8 E600003C */ swc1 $f0, 0x3c($s0)
/* 14BBC 800397BC 0800E5F5 */ j .L800397D4
/* 14BC0 800397C0 A6030084 */ sh $v1, 0x84($s0)
.L800397C4:
/* 14BC4 800397C4 8E020000 */ lw $v0, ($s0)
/* 14BC8 800397C8 2403EFFF */ addiu $v1, $zero, -0x1001
.L800397CC:
/* 14BCC 800397CC 00431024 */ and $v0, $v0, $v1
/* 14BD0 800397D0 AE020000 */ sw $v0, ($s0)
.L800397D4:
/* 14BD4 800397D4 8FBF0034 */ lw $ra, 0x34($sp)
/* 14BD8 800397D8 8FB00030 */ lw $s0, 0x30($sp)
/* 14BDC 800397DC D7B40038 */ ldc1 $f20, 0x38($sp)
/* 14BE0 800397E0 03E00008 */ jr $ra
/* 14BE4 800397E4 27BD0040 */ addiu $sp, $sp, 0x40