summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehemoth <Luisscheurenbrand@gmail.com>2020-09-01 00:57:40 +0200
committerBehemoth <Luisscheurenbrand@gmail.com>2020-09-01 00:58:36 +0200
commit662e221f89aaaed63e80c167822d5d51bf5e172e (patch)
tree112d6f35534ea9b047af9b3c725627944825fe93
parentcc5bb0133b20733958f2c112917f26314c681d54 (diff)
label a bunch of stuff
-rw-r--r--asm/armos.s14
-rw-r--r--asm/ballChainSoldier.s4
-rw-r--r--asm/bigIceBlock.s2
-rw-r--r--asm/bigPushableLever.s4
-rw-r--r--asm/blockPushed.s2
-rw-r--r--asm/bobomb.s8
-rw-r--r--asm/bollard.s4
-rw-r--r--asm/book.s2
-rw-r--r--asm/bossDoor.s2
-rw-r--r--asm/bowMoblin.s2
-rw-r--r--asm/businessScrub.s2
-rw-r--r--asm/businessScrubPrologue.s8
-rw-r--r--asm/castleMaid.s2
-rw-r--r--asm/castorWildsStatue.s2
-rw-r--r--asm/chuchuBoss.s8
-rw-r--r--asm/cloudPiranha.s6
-rw-r--r--asm/code_080043E8.s4
-rw-r--r--asm/code_0800857C.s2
-rw-r--r--asm/code_08016DF8.s2
-rw-r--r--asm/code_08019444.s2
-rw-r--r--asm/code_08049CD4.s4
-rw-r--r--asm/code_080A5574.s34
-rw-r--r--asm/code_080AD90C.s4
-rw-r--r--asm/cucco.s2
-rw-r--r--asm/cuccoAggr.s12
-rw-r--r--asm/cuccoChick.s2
-rw-r--r--asm/deathFx.s2
-rw-r--r--asm/dog.s6
-rw-r--r--asm/enemy4D.s4
-rw-r--r--asm/eyeSwitch.s2
-rw-r--r--asm/eyegore.s12
-rw-r--r--asm/fairy.s2
-rw-r--r--asm/fallingBoulder.s2
-rw-r--r--asm/fan.s2
-rw-r--r--asm/figurineDevice.s2
-rw-r--r--asm/flyingPot.s2
-rw-r--r--asm/frozenWaterElement.s4
-rw-r--r--asm/gibdo.s6
-rw-r--r--asm/guardWithSpear.s6
-rw-r--r--asm/helmasaur.s2
-rw-r--r--asm/kid.s2
-rw-r--r--asm/lavaPlatform.s8
-rw-r--r--asm/likeLike.s4
-rw-r--r--asm/lockedDoor.s4
-rw-r--r--asm/madderpillar.s18
-rw-r--r--asm/managerF.s2
-rw-r--r--asm/minecartDoor.s4
-rw-r--r--asm/minishEzlo.s4
-rw-r--r--asm/moldworm.s2
-rw-r--r--asm/mountainMinish.s2
-rw-r--r--asm/mulldozer.s8
-rw-r--r--asm/npc23.s2
-rw-r--r--asm/object20.s2
-rw-r--r--asm/object24.s4
-rw-r--r--asm/object2A.s2
-rw-r--r--asm/object35.s4
-rw-r--r--asm/object43.s2
-rw-r--r--asm/object44.s2
-rw-r--r--asm/object64.s2
-rw-r--r--asm/object6A.s4
-rw-r--r--asm/object87.s2
-rw-r--r--asm/object8B.s2
-rw-r--r--asm/objectA0.s2
-rw-r--r--asm/objectA8.s2
-rw-r--r--asm/objectBlockingStairs.s6
-rw-r--r--asm/objectD.s4
-rw-r--r--asm/objectOnPillar.s4
-rw-r--r--asm/octorokBoss.s10
-rw-r--r--asm/octorokGolden.s4
-rw-r--r--asm/pesto.s2
-rw-r--r--asm/picoBloom.s2
-rw-r--r--asm/puffstool.s4
-rw-r--r--asm/pullableLever.s6
-rw-r--r--asm/pushableFurniture.s6
-rw-r--r--asm/pushableGrave.s2
-rw-r--r--asm/pushableLever.s4
-rw-r--r--asm/pushableRock.s2
-rw-r--r--asm/pushableStatue.s2
-rw-r--r--asm/rope.s4
-rw-r--r--asm/ropeGolden.s4
-rw-r--r--asm/scissorsBeetle.s6
-rw-r--r--asm/sensorBladeTrap.s2
-rw-r--r--asm/sluggula.s8
-rw-r--r--asm/smallIceBlock.s6
-rw-r--r--asm/spark.s2
-rw-r--r--asm/spearMoblin.s8
-rw-r--r--asm/specialFx.s2
-rw-r--r--asm/spikedBeetle.s6
-rw-r--r--asm/spinyBeetle.s2
-rw-r--r--asm/stalfos.s14
-rw-r--r--asm/vaati.s6
-rw-r--r--asm/vaatiArm.s4
-rw-r--r--asm/vaatiEyesMacro.s6
-rw-r--r--asm/vaatiProjectile.s2
-rw-r--r--asm/vaatiReborn.s2
-rw-r--r--asm/vaatiTransfigured.s2
-rw-r--r--asm/vaatiWrath.s2
-rw-r--r--asm/wallMaster.s2
-rw-r--r--asm/warpPoint.s4
-rw-r--r--asm/waterDrop.s2
-rw-r--r--asm/windTribespeople.s2
-rw-r--r--asm/wizzrobeFire.s4
-rw-r--r--asm/wizzrobeIce.s4
-rw-r--r--asm/wizzrobeWind.s6
-rw-r--r--include/entity.h7
-rw-r--r--include/functions.h4
-rw-r--r--src/enemy/acroBandits.c5
-rw-r--r--src/enemy/beetle.c23
-rw-r--r--src/enemy/bladeTrap.c4
-rw-r--r--src/enemy/chuchu.c42
-rw-r--r--src/enemy/cuccoChickAggr.c10
-rw-r--r--src/enemy/darkNut.c32
-rw-r--r--src/enemy/doorMimic.c2
-rw-r--r--src/enemy/hangingSeed.c20
-rw-r--r--src/enemy/keaton.c4
-rw-r--r--src/enemy/keese.c94
-rw-r--r--src/enemy/lakitu.c4
-rw-r--r--src/enemy/leever.c108
-rw-r--r--src/enemy/miniSlime.c2
-rw-r--r--src/enemy/moldorm.c2
-rw-r--r--src/enemy/octorok.c128
-rw-r--r--src/enemy/peahat.c198
-rw-r--r--src/enemy/rockChuchu.c2
-rw-r--r--src/enemy/rollobite.c105
-rw-r--r--src/enemy/rupeeLike.c4
-rw-r--r--src/enemy/slime.c2
-rw-r--r--src/enemy/spinyChuchu.c16
-rw-r--r--src/enemy/tektite.c2
-rw-r--r--src/enemy/tektiteGolden.c2
-rw-r--r--src/enemy/wisp.c2
-rw-r--r--src/npc/carlov.c6
-rw-r--r--src/npc/cow.c2
-rw-r--r--src/npc/melari.c4
-rw-r--r--src/npc/postman.c4
-rw-r--r--src/npc/townsperson.c2
-rw-r--r--src/object/lightableSwitch.c8
-rw-r--r--src/object/mask.c4
-rw-r--r--src/object/metalDoor.c4
-rw-r--r--src/object/object1A.c4
-rw-r--r--src/object/object2A.c2
-rwxr-xr-xsrc/object/pot.c2
-rw-r--r--src/object/railtrack.c8
142 files changed, 670 insertions, 658 deletions
diff --git a/asm/armos.s b/asm/armos.s
index 0f55d73d..e8c495cd 100644
--- a/asm/armos.s
+++ b/asm/armos.s
@@ -299,7 +299,7 @@ _080303C0:
bl sub_08030834
movs r0, #0x95
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
b _0803042C
.align 2, 0
_080303D0: .4byte gUnk_080FD2F0
@@ -450,7 +450,7 @@ _080304DE:
strb r2, [r3]
movs r0, #0x95
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_080304F0:
pop {r4, pc}
.align 2, 0
@@ -502,7 +502,7 @@ _0803053E:
strb r0, [r3]
movs r0, #0x95
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_08030552:
pop {pc}
@@ -597,7 +597,7 @@ _080305E4:
cmp r0, #0
bne _08030608
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
cmp r0, #0
bne _0803064A
ldrb r0, [r4, #0x15]
@@ -624,7 +624,7 @@ _0803061E:
cmp r3, #0
bne _08030638
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
cmp r0, #0
bne _0803064A
ldrb r0, [r4, #0x15]
@@ -1146,7 +1146,7 @@ _08030A02:
sub_08030A04: @ 0x08030A04
push {r4, lr}
adds r4, r0, #0
- bl sub_080AEF88
+ bl ProcessMovement
adds r4, #0x5a
ldrb r1, [r4]
movs r0, #1
@@ -1157,7 +1157,7 @@ sub_08030A04: @ 0x08030A04
ands r0, r1
strb r0, [r4]
ldr r0, _08030A28 @ =0x00000101
- bl sub_08004488
+ bl EnqueSFX
_08030A24:
pop {r4, pc}
.align 2, 0
diff --git a/asm/ballChainSoldier.s b/asm/ballChainSoldier.s
index 210d6ad8..817a4c7b 100644
--- a/asm/ballChainSoldier.s
+++ b/asm/ballChainSoldier.s
@@ -161,7 +161,7 @@ sub_0803E61C: @ 0x0803E61C
cmp r0, #0
bne _0803E654
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
cmp r0, #0
bne _0803E654
adds r0, r4, #0
@@ -306,7 +306,7 @@ sub_0803E71C: @ 0x0803E71C
movs r0, #0xf6
strb r0, [r1]
adds r0, #0x65
- bl sub_08004488
+ bl EnqueSFX
_0803E756:
pop {pc}
.align 2, 0
diff --git a/asm/bigIceBlock.s b/asm/bigIceBlock.s
index 4283a43b..d7ff4818 100644
--- a/asm/bigIceBlock.s
+++ b/asm/bigIceBlock.s
@@ -98,7 +98,7 @@ sub_080997CC: @ 0x080997CC
strb r1, [r4, #0xc]
strb r0, [r4, #0xe]
ldr r0, _080997F0 @ =0x000001B3
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
bl sub_080997F4
_080997EC:
diff --git a/asm/bigPushableLever.s b/asm/bigPushableLever.s
index 3edb8811..20cb7569 100644
--- a/asm/bigPushableLever.s
+++ b/asm/bigPushableLever.s
@@ -66,7 +66,7 @@ sub_08098F14: @ 0x08098F14
bl SetTile
movs r0, #0x99
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
adds r0, r5, #0
movs r1, #0x1e
bl sub_0805E4E0
@@ -348,7 +348,7 @@ _08099166:
cmp r0, #0
bne _08099194
ldr r0, _080991A0 @ =0x00000131
- bl sub_08004488
+ bl EnqueSFX
_08099194:
pop {r4, pc}
.align 2, 0
diff --git a/asm/blockPushed.s b/asm/blockPushed.s
index 35455994..551d6dd9 100644
--- a/asm/blockPushed.s
+++ b/asm/blockPushed.s
@@ -233,7 +233,7 @@ _08082FF0:
bl sub_080832D8
_08083088:
ldr r0, _08083090 @ =0x0000010F
- bl sub_08004488
+ bl EnqueSFX
_0808308E:
pop {r4, r5, r6, pc}
.align 2, 0
diff --git a/asm/bobomb.s b/asm/bobomb.s
index 7dc63497..e36df5cd 100644
--- a/asm/bobomb.s
+++ b/asm/bobomb.s
@@ -123,7 +123,7 @@ _0802C75E:
adds r0, r4, #0
bl sub_0802CB68
ldr r0, _0802C76C @ =0x0000014D
- bl sub_08004488
+ bl EnqueSFX
b _0802C79E
.align 2, 0
_0802C76C: .4byte 0x0000014D
@@ -375,7 +375,7 @@ sub_0802C91C: @ 0x0802C91C
adds r4, r0, #0
bl GetNextFrame
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
adds r0, r4, #0
adds r0, #0x82
ldrb r0, [r0]
@@ -638,7 +638,7 @@ _0802CB10:
bne _0802CB30
movs r0, #0x82
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_0802CB30:
adds r0, r4, #0
bl sub_0802CC18
@@ -777,7 +777,7 @@ sub_0802CC18: @ 0x0802CC18
movs r0, #0x1c
strb r0, [r1]
ldr r0, _0802CC38 @ =0x0000014D
- bl sub_08004488
+ bl EnqueSFX
_0802CC34:
pop {pc}
.align 2, 0
diff --git a/asm/bollard.s b/asm/bollard.s
index e6c5457e..4fdf8b39 100644
--- a/asm/bollard.s
+++ b/asm/bollard.s
@@ -76,7 +76,7 @@ _0808B2F4:
ldrb r2, [r2]
bl SetTile
ldr r0, _0808B320 @ =0x000001A5
- bl sub_08004488
+ bl EnqueSFX
_0808B31C:
pop {r4, pc}
.align 2, 0
@@ -130,7 +130,7 @@ _0808B36C:
adds r0, r4, #0
bl sub_0808B3AC
ldr r0, _0808B388 @ =0x000001A5
- bl sub_08004488
+ bl EnqueSFX
_0808B384:
pop {r4, pc}
.align 2, 0
diff --git a/asm/book.s b/asm/book.s
index a0496c64..f5f6c852 100644
--- a/asm/book.s
+++ b/asm/book.s
@@ -190,7 +190,7 @@ _0809B4C0:
lsls r0, r0, #2
strb r0, [r1, #0x15]
ldr r0, _0809B518 @ =0x0000010F
- bl sub_08004488
+ bl EnqueSFX
b _0809B520
.align 2, 0
_0809B510: .4byte gPlayerState
diff --git a/asm/bossDoor.s b/asm/bossDoor.s
index 50bdfbad..577953ae 100644
--- a/asm/bossDoor.s
+++ b/asm/bossDoor.s
@@ -358,7 +358,7 @@ _0808C470:
strh r0, [r1, #0x32]
_0808C494:
ldr r0, _0808C4A0 @ =0x0000010B
- bl sub_08004488
+ bl EnqueSFX
_0808C49A:
pop {r4, r5, pc}
.align 2, 0
diff --git a/asm/bowMoblin.s b/asm/bowMoblin.s
index faaa78d4..4ac302e7 100644
--- a/asm/bowMoblin.s
+++ b/asm/bowMoblin.s
@@ -675,7 +675,7 @@ sub_0803C6DC: @ 0x0803C6DC
strh r0, [r4, #0x24]
_0803C6EA:
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
adds r0, r4, #0
bl GetNextFrame
pop {r4, pc}
diff --git a/asm/businessScrub.s b/asm/businessScrub.s
index ae2dd002..c0c6f131 100644
--- a/asm/businessScrub.s
+++ b/asm/businessScrub.s
@@ -70,7 +70,7 @@ sub_08028934: @ 0x08028934
strh r0, [r1, #0x36]
_08028982:
ldr r0, _0802898C @ =0x000001BB
- bl sub_08004488
+ bl EnqueSFX
_08028988:
pop {r4, pc}
.align 2, 0
diff --git a/asm/businessScrubPrologue.s b/asm/businessScrubPrologue.s
index b307d3c5..deb2307f 100644
--- a/asm/businessScrubPrologue.s
+++ b/asm/businessScrubPrologue.s
@@ -85,7 +85,7 @@ _08045C16:
movs r1, #0xff
strb r1, [r0]
ldr r0, _08045C34 @ =0x000001BB
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
movs r1, #2
bl sub_0805E3A0
@@ -480,7 +480,7 @@ _08045F00:
adds r0, r4, #0
bl sub_080954AC
ldr r0, _08045F34 @ =0x0000018D
- bl sub_08004488
+ bl EnqueSFX
b _08045F4E
.align 2, 0
_08045F34: .4byte 0x0000018D
@@ -698,7 +698,7 @@ _080460AE:
bge _0804608A
movs r0, #0xb7
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
ldr r0, _08046120 @ =0x000007A2
movs r1, #1
bl sub_0807BA8C
@@ -725,7 +725,7 @@ _080460AE:
bl CopyPosition
movs r0, #0xc2
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_08046102:
ldr r1, [r7, #0x54]
cmp r1, #0
diff --git a/asm/castleMaid.s b/asm/castleMaid.s
index 4eaebcec..1c5ca1fc 100644
--- a/asm/castleMaid.s
+++ b/asm/castleMaid.s
@@ -288,7 +288,7 @@ _08064710:
orrs r0, r1
str r0, [r5, #8]
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
movs r0, #0x2e
ldrsh r1, [r4, r0]
adds r2, r4, #0
diff --git a/asm/castorWildsStatue.s b/asm/castorWildsStatue.s
index cb22f84d..90bd9782 100644
--- a/asm/castorWildsStatue.s
+++ b/asm/castorWildsStatue.s
@@ -260,7 +260,7 @@ _08067560:
ble _0806753A
movs r0, #0xa6
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
movs r0, #0x28
movs r1, #4
bl sub_08080964
diff --git a/asm/chuchuBoss.s b/asm/chuchuBoss.s
index 0ad8aaca..a4ababb3 100644
--- a/asm/chuchuBoss.s
+++ b/asm/chuchuBoss.s
@@ -1407,7 +1407,7 @@ _0802670A:
bl PlaySFX
_08026726:
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
_0802672C:
adds r0, r4, #0
adds r0, #0x76
@@ -1589,7 +1589,7 @@ sub_0802686C: @ 0x0802686C
cmp r5, #0
beq _08026888
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
b _080268BE
_08026888:
movs r0, #0x10
@@ -2687,7 +2687,7 @@ _080270D4:
ldrb r0, [r0, #0xc]
strb r0, [r5, #0x15]
adds r0, r5, #0
- bl sub_080AEF88
+ bl ProcessMovement
_080270E0:
adds r0, r6, #0
adds r0, #0x85
@@ -2747,7 +2747,7 @@ _08027110:
b _080271FE
_0802714A:
adds r0, r5, #0
- bl sub_080AEF88
+ bl ProcessMovement
b _080271FE
_08027152:
adds r0, r6, #0
diff --git a/asm/cloudPiranha.s b/asm/cloudPiranha.s
index 4ed97086..b30f3fb4 100644
--- a/asm/cloudPiranha.s
+++ b/asm/cloudPiranha.s
@@ -376,7 +376,7 @@ sub_080386B8: @ 0x080386B8
strb r0, [r2]
movs r0, #0x92
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
movs r1, #0x70
bl sub_0801D2B4
@@ -459,7 +459,7 @@ sub_08038754: @ 0x08038754
orrs r0, r1
strb r0, [r2]
ldr r0, _080387C0 @ =0x0000012B
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
movs r1, #0x71
bl sub_0801D2B4
@@ -593,7 +593,7 @@ _08038890:
cmp r0, #0
bne _080388A8
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
b _080388B2
_080388A8:
subs r0, #1
diff --git a/asm/code_080043E8.s b/asm/code_080043E8.s
index 0a6fd073..85ecffd6 100644
--- a/asm/code_080043E8.s
+++ b/asm/code_080043E8.s
@@ -85,8 +85,8 @@ sub_08004484: @ 0x08004484
ldr r2, _080044DC @ =gUnk_03005FF0
bx r2
- thumb_func_start sub_08004488
-sub_08004488: @ 0x08004488
+ thumb_func_start EnqueSFX
+EnqueSFX: @ 0x08004488
ldr r1, _080044E0 @ =gUnk_02024048
ldrb r2, [r1]
cmp r2, #8
diff --git a/asm/code_0800857C.s b/asm/code_0800857C.s
index 2cd3657b..5dbf7120 100644
--- a/asm/code_0800857C.s
+++ b/asm/code_0800857C.s
@@ -769,7 +769,7 @@ sub_08008B22: @ 0x08008B22
sub_08008B2E: @ 0x08008B2E
push {r0, lr}
adds r0, r2, #0
- bl sub_08004488
+ bl EnqueSFX
pop {r0, pc}
.align 2, 0
_08008B38: .4byte 0x00000180
diff --git a/asm/code_08016DF8.s b/asm/code_08016DF8.s
index b30e6ecb..ef099089 100644
--- a/asm/code_08016DF8.s
+++ b/asm/code_08016DF8.s
@@ -398,7 +398,7 @@ _080170E8:
cmp r0, #0
bne _08017112
ldr r0, _08017138 @ =0x0000011F
- bl sub_08004488
+ bl EnqueSFX
_08017112:
ldr r0, _0801712C @ =gUnk_02002A40
adds r2, r0, #0
diff --git a/asm/code_08019444.s b/asm/code_08019444.s
index a9a303c8..ebd87ab7 100644
--- a/asm/code_08019444.s
+++ b/asm/code_08019444.s
@@ -4328,7 +4328,7 @@ _0801B4AC:
cmp r0, #0
bne _0801B4C0
movs r0, #0xfb
- bl sub_08004488
+ bl EnqueSFX
_0801B4C0:
pop {r4, pc}
.align 2, 0
diff --git a/asm/code_08049CD4.s b/asm/code_08049CD4.s
index a7103c1e..3ad1023e 100644
--- a/asm/code_08049CD4.s
+++ b/asm/code_08049CD4.s
@@ -364,8 +364,8 @@ _08049F60:
pop {r4, r5, pc}
.align 2, 0
- thumb_func_start sub_08049F64
-sub_08049F64: @ 0x08049F64
+ thumb_func_start PlayerInRange
+PlayerInRange: @ 0x08049F64
push {r4, r5, lr}
adds r4, r0, #0
adds r0, r1, #0
diff --git a/asm/code_080A5574.s b/asm/code_080A5574.s
index 9619ff0d..d9d6fa0c 100644
--- a/asm/code_080A5574.s
+++ b/asm/code_080A5574.s
@@ -6061,7 +6061,7 @@ sub_080A8470: @ 0x080A8470
cmp r0, #0x68
bne _080A848E
movs r0, #0x86
- bl sub_08004488
+ bl EnqueSFX
_080A848E:
adds r0, r4, #0
bl DeleteEntity
@@ -6115,7 +6115,7 @@ sub_080A84C8: @ 0x080A84C8
strb r0, [r1]
_080A84F0:
ldr r0, _080A8500 @ =0x0000018D
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
movs r1, #0x18
bl InitializeAnimation
@@ -6328,7 +6328,7 @@ sub_080A8680: @ 0x080A8680
strb r1, [r0, #0xf]
movs r0, #0x8c
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
pop {pc}
thumb_func_start sub_080A86A0
@@ -6344,7 +6344,7 @@ sub_080A86A0: @ 0x080A86A0
strh r3, [r0, #0x24]
movs r0, #0xc7
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
pop {pc}
thumb_func_start sub_080A86BC
@@ -6810,7 +6810,7 @@ _080A8A16:
movs r1, #1
bl InitializeAnimation
movs r0, #0x84
- bl sub_08004488
+ bl EnqueSFX
movs r0, #3
strb r0, [r5, #0xc]
b _080A8A44
@@ -6893,7 +6893,7 @@ _080A8AAA:
adds r0, r2, #0
bl InitializeAnimation
ldr r0, _080A8AC4 @ =0x0000015F
- bl sub_08004488
+ bl EnqueSFX
_080A8AC2:
pop {pc}
.align 2, 0
@@ -7053,7 +7053,7 @@ _080A8BDA:
bl InitializeAnimation
movs r0, #0xaf
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_080A8BF4:
pop {pc}
.align 2, 0
@@ -7198,7 +7198,7 @@ _080A8CEE:
bl InitializeAnimation
movs r0, #0xb0
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_080A8D08:
pop {pc}
.align 2, 0
@@ -8110,7 +8110,7 @@ sub_080A93DC: @ 0x080A93DC
bl InitializeAnimation
movs r0, #0xc5
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
bl sub_0806F69C
b _080A9424
@@ -8199,7 +8199,7 @@ sub_080A9488: @ 0x080A9488
lsrs r0, r0, #3
strb r0, [r4, #0x14]
movs r0, #0x74
- bl sub_08004488
+ bl EnqueSFX
ldrb r1, [r4, #0x14]
adds r0, r4, #0
bl sub_080A94C0
@@ -9728,7 +9728,7 @@ sub_080A9FD0: @ 0x080A9FD0
ands r0, r1
strb r0, [r2]
ldr r0, _080AA038 @ =0x0000015D
- bl sub_08004488
+ bl EnqueSFX
_080A9FF2:
movs r0, #0x2e
ldrsh r1, [r5, r0]
@@ -9906,7 +9906,7 @@ _080AA136:
bl DeleteThisEntity
_080AA14E:
movs r0, #0xf2
- bl sub_08004488
+ bl EnqueSFX
movs r4, #1
strb r4, [r6, #0xc]
movs r0, #0xff
@@ -10715,7 +10715,7 @@ _080AA774:
adds r0, r4, #0
bl InitAnimationForceUpdate
ldr r0, _080AA788 @ =0x00000101
- bl sub_08004488
+ bl EnqueSFX
_080AA784:
pop {r4, r5, r6, pc}
.align 2, 0
@@ -10780,7 +10780,7 @@ _080AA7DA:
strb r0, [r5]
movs r0, #0x80
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_080AA806:
ldrb r1, [r5]
movs r0, #0x80
@@ -10989,7 +10989,7 @@ _080AA920:
strh r0, [r7, #0x32]
movs r0, #0x80
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_080AA99A:
pop {r4, r5, r6, r7, pc}
.align 2, 0
@@ -13118,7 +13118,7 @@ sub_080AB950: @ 0x080AB950
cmp r0, #0
bne _080AB99C
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
ldrb r0, [r4, #0x15]
lsrs r0, r0, #3
ldr r1, _080AB994 @ =gUnk_0812A6C4
@@ -15575,7 +15575,7 @@ sub_080ACB90: @ 0x080ACB90
movs r2, #0x40
bl CreateFx
ldr r0, _080ACBC8 @ =0x00000119
- bl sub_08004488
+ bl EnqueSFX
bl DeleteThisEntity
_080ACBC6:
pop {r4, pc}
diff --git a/asm/code_080AD90C.s b/asm/code_080AD90C.s
index 560b933d..b8d21b9b 100644
--- a/asm/code_080AD90C.s
+++ b/asm/code_080AD90C.s
@@ -3036,8 +3036,8 @@ _080AEF7E:
pop {r4, r5, r6, r7, pc}
.align 2, 0
- thumb_func_start sub_080AEF88
-sub_080AEF88: @ 0x080AEF88
+ thumb_func_start ProcessMovement
+ProcessMovement: @ 0x080AEF88
push {r4, lr}
adds r4, r0, #0
ldrb r1, [r4, #0x15]
diff --git a/asm/cucco.s b/asm/cucco.s
index bd176a46..13120cfc 100644
--- a/asm/cucco.s
+++ b/asm/cucco.s
@@ -93,7 +93,7 @@ _0806E52C:
lsls r1, r1, #1
adds r1, r1, r4
ldrh r0, [r1]
- bl sub_08004488
+ bl EnqueSFX
_0806E552:
adds r0, r5, #0
bl sub_0806E65C
diff --git a/asm/cuccoAggr.s b/asm/cuccoAggr.s
index acf5bcf4..a339f4cc 100644
--- a/asm/cuccoAggr.s
+++ b/asm/cuccoAggr.s
@@ -194,7 +194,7 @@ sub_08038DD8: @ 0x08038DD8
movs r1, #4
bl InitializeAnimation
ldr r0, _08038E14 @ =0x000001D9
- bl sub_08004488
+ bl EnqueSFX
pop {pc}
.align 2, 0
_08038E10: .4byte gUnk_080CF7BC
@@ -238,7 +238,7 @@ sub_08038E18: @ 0x08038E18
ands r0, r1
strb r0, [r4, #0x15]
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
adds r0, r4, #0
bl UpdateSpriteForCollisionLayer
_08038E70:
@@ -304,7 +304,7 @@ sub_08038ED0: @ 0x08038ED0
sub_08038EE0: @ 0x08038EE0
push {r4, lr}
adds r4, r0, #0
- bl sub_080AEF88
+ bl ProcessMovement
adds r0, r4, #0
bl GetNextFrame
adds r0, r4, #0
@@ -362,7 +362,7 @@ sub_08038F44: @ 0x08038F44
adds r0, r4, #0
bl sub_080390F8
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
movs r1, #0xc0
lsls r1, r1, #5
adds r0, r4, #0
@@ -519,7 +519,7 @@ _0803906C:
movs r1, #0xeb
lsls r1, r1, #1
adds r0, r5, r1
- bl sub_08004488
+ bl EnqueSFX
b _080390BC
_080390AA:
movs r0, #4
@@ -743,7 +743,7 @@ sub_08039218: @ 0x08039218
bl InitializeAnimation
_0803924C:
ldr r0, _0803925C @ =0x000001D9
- bl sub_08004488
+ bl EnqueSFX
pop {pc}
.align 2, 0
_08039254: .4byte gUnk_080CF824
diff --git a/asm/cuccoChick.s b/asm/cuccoChick.s
index 23386b60..d325fcc8 100644
--- a/asm/cuccoChick.s
+++ b/asm/cuccoChick.s
@@ -81,7 +81,7 @@ _0806E782:
cmp r1, #0
beq _0806E7A8
movs r0, #0xd6
- bl sub_08004488
+ bl EnqueSFX
_0806E7A8:
adds r0, r4, #0
bl sub_0806E838
diff --git a/asm/deathFx.s b/asm/deathFx.s
index 43281d5a..ca601373 100644
--- a/asm/deathFx.s
+++ b/asm/deathFx.s
@@ -125,7 +125,7 @@ _08081702:
movs r0, #1
strb r0, [r4, #0xc]
movs r0, #0xff
- bl sub_08004488
+ bl EnqueSFX
_0808170C:
adds r0, r4, #0
movs r1, #3
diff --git a/asm/dog.s b/asm/dog.s
index c62ec6df..c7170024 100644
--- a/asm/dog.s
+++ b/asm/dog.s
@@ -303,7 +303,7 @@ sub_08069D54: @ 0x08069D54
adds r0, r4, #0
bl UpdateAnimationSingleFrame
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
ldrh r1, [r4, #0x2a]
movs r0, #0x2e
ldrsh r2, [r4, r0]
@@ -473,9 +473,9 @@ _08069EA0:
adds r0, r4, #0
bl sub_080788E0
movs r0, #0xd1
- bl sub_08004488
+ bl EnqueSFX
movs r0, #0xcd
- bl sub_08004488
+ bl EnqueSFX
_08069EC8:
pop {r4, r5, r6, r7, pc}
.align 2, 0
diff --git a/asm/enemy4D.s b/asm/enemy4D.s
index c2a2bfee..c7216a38 100644
--- a/asm/enemy4D.s
+++ b/asm/enemy4D.s
@@ -172,7 +172,7 @@ _0803ECD8:
movs r1, #0x10
bl sub_0803E94C
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
_0803ED02:
pop {r4, r5, r6, pc}
@@ -234,7 +234,7 @@ sub_0803ED40: @ 0x0803ED40
movs r0, #0xf6
strb r0, [r1]
adds r0, #0x65
- bl sub_08004488
+ bl EnqueSFX
_0803ED74:
pop {pc}
.align 2, 0
diff --git a/asm/eyeSwitch.s b/asm/eyeSwitch.s
index 94bd7a1c..5fa1d8e5 100644
--- a/asm/eyeSwitch.s
+++ b/asm/eyeSwitch.s
@@ -109,7 +109,7 @@ _08088728:
ands r0, r1
strb r0, [r4, #0x10]
ldr r0, _0808875C @ =0x00000111
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
adds r0, #0x86
ldrh r0, [r0]
diff --git a/asm/eyegore.s b/asm/eyegore.s
index ca67cae2..43ca7f0d 100644
--- a/asm/eyegore.s
+++ b/asm/eyegore.s
@@ -105,7 +105,7 @@ _08030AC0:
movs r0, #0x86
lsls r0, r0, #1
_08030AE0:
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
bl sub_08031344
b _08030B0E
@@ -124,7 +124,7 @@ _08030AFA:
movs r0, #0xf
strb r0, [r1]
movs r0, #0xfe
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
bl sub_08031344
_08030B0E:
@@ -563,7 +563,7 @@ sub_08030E3C: @ 0x08030E3C
lsls r1, r1, #9
str r1, [r0, #0x20]
ldr r0, _08030E54 @ =0x00000157
- bl sub_08004488
+ bl EnqueSFX
pop {pc}
.align 2, 0
_08030E54: .4byte 0x00000157
@@ -589,7 +589,7 @@ sub_08030E70: @ 0x08030E70
bl sub_08030E80
movs r0, #0xac
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
pop {pc}
thumb_func_start sub_08030E80
@@ -1171,7 +1171,7 @@ _080312E2:
cmp r0, #0
bne _0803131C
adds r0, r6, #0
- bl sub_080AEF88
+ bl ProcessMovement
cmp r0, #0
bne _0803131C
adds r2, r6, #0
@@ -1192,7 +1192,7 @@ _08031310:
b _0803131C
_08031316:
adds r0, r6, #0
- bl sub_080AEF88
+ bl ProcessMovement
_0803131C:
pop {r4, r5, r6, pc}
.align 2, 0
diff --git a/asm/fairy.s b/asm/fairy.s
index a6841668..b17899db 100644
--- a/asm/fairy.s
+++ b/asm/fairy.s
@@ -188,7 +188,7 @@ sub_0808D7B4: @ 0x0808D7B4
bl sub_0805E3A0
movs r0, #0x9b
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
ldrb r0, [r4, #0xb]
cmp r0, #2
beq _0808D834
diff --git a/asm/fallingBoulder.s b/asm/fallingBoulder.s
index 801c45c0..9431e511 100644
--- a/asm/fallingBoulder.s
+++ b/asm/fallingBoulder.s
@@ -216,7 +216,7 @@ _0802C36A:
bne _0802C3CC
movs r0, #0xa6
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
ldrb r1, [r4, #0x10]
movs r0, #0x80
orrs r0, r1
diff --git a/asm/fan.s b/asm/fan.s
index 2442e630..51822d10 100644
--- a/asm/fan.s
+++ b/asm/fan.s
@@ -347,7 +347,7 @@ sub_0809F0E4: @ 0x0809F0E4
push {r4, r5, lr}
adds r5, r0, #0
ldr r0, _0809F124 @ =0x00000183
- bl sub_08004488
+ bl EnqueSFX
ldrb r0, [r5, #0xa]
movs r1, #2
eors r1, r0
diff --git a/asm/figurineDevice.s b/asm/figurineDevice.s
index 31bf1057..ed64416f 100644
--- a/asm/figurineDevice.s
+++ b/asm/figurineDevice.s
@@ -266,7 +266,7 @@ _08087D60:
bl PositionRelative
_08087DAA:
ldr r0, _08087DB8 @ =0x00000111
- bl sub_08004488
+ bl EnqueSFX
_08087DB0:
pop {r4, r5, pc}
.align 2, 0
diff --git a/asm/flyingPot.s b/asm/flyingPot.s
index 7c45e106..75e3a8b5 100644
--- a/asm/flyingPot.s
+++ b/asm/flyingPot.s
@@ -342,7 +342,7 @@ _080372CC:
adds r0, r5, #0
movs r1, #1
movs r2, #0x40
- bl sub_08049F64
+ bl PlayerInRange
cmp r0, #0
beq _080372E2
movs r0, #2
diff --git a/asm/frozenWaterElement.s b/asm/frozenWaterElement.s
index 574be4d0..d2e0ac77 100644
--- a/asm/frozenWaterElement.s
+++ b/asm/frozenWaterElement.s
@@ -96,7 +96,7 @@ sub_0809BF1C: @ 0x0809BF1C
lsls r0, r0, #1
strh r0, [r1]
adds r0, #0x73
- bl sub_08004488
+ bl EnqueSFX
_0809BF6C:
pop {r4, pc}
.align 2, 0
@@ -129,7 +129,7 @@ _0809BFA0:
cmp r1, #0
bne _0809BFAE
ldr r0, _0809C09C @ =0x000001B3
- bl sub_08004488
+ bl EnqueSFX
_0809BFAE:
ldrh r0, [r5]
cmp r0, #0x77
diff --git a/asm/gibdo.s b/asm/gibdo.s
index 555d040c..4518b9d6 100644
--- a/asm/gibdo.s
+++ b/asm/gibdo.s
@@ -196,7 +196,7 @@ _080375D2:
adds r0, r4, #0
bl UpdateAnimationSingleFrame
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
cmp r0, #0
bne _080375F4
ldrb r0, [r4, #0xf]
@@ -263,7 +263,7 @@ _08037652:
adds r0, r4, #0
bl UpdateAnimationSingleFrame
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
cmp r0, #0
bne _0803767C
ldrb r0, [r4, #0xf]
@@ -316,7 +316,7 @@ _080376B6:
movs r0, #0x27
strb r0, [r1]
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
_080376CC:
pop {r4, pc}
.align 2, 0
diff --git a/asm/guardWithSpear.s b/asm/guardWithSpear.s
index 621a1d62..4fda3f06 100644
--- a/asm/guardWithSpear.s
+++ b/asm/guardWithSpear.s
@@ -84,7 +84,7 @@ _080640E8:
bl InitializeAnimation
_0806410A:
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
movs r0, #0x2e
ldrsh r1, [r4, r0]
adds r2, r4, #0
@@ -213,7 +213,7 @@ _080641E6:
movs r0, #0x32
ldrsh r4, [r5, r0]
adds r0, r5, #0
- bl sub_080AEF88
+ bl ProcessMovement
movs r1, #0x32
ldrsh r0, [r5, r1]
adds r6, r5, #0
@@ -358,7 +358,7 @@ _08064306:
movs r0, #0x2e
ldrsh r4, [r5, r0]
adds r0, r5, #0
- bl sub_080AEF88
+ bl ProcessMovement
movs r1, #0x2e
ldrsh r0, [r5, r1]
adds r6, r5, #0
diff --git a/asm/helmasaur.s b/asm/helmasaur.s
index 6b17b172..e8a891ea 100644
--- a/asm/helmasaur.s
+++ b/asm/helmasaur.s
@@ -533,7 +533,7 @@ _0802BF3A:
sub_0802BF3C: @ 0x0802BF3C
push {r4, lr}
adds r4, r0, #0
- bl sub_080AEF88
+ bl ProcessMovement
adds r0, r4, #0
bl GetNextFrame
ldrb r0, [r4, #0xe]
diff --git a/asm/kid.s b/asm/kid.s
index 337736d6..8d61dd09 100644
--- a/asm/kid.s
+++ b/asm/kid.s
@@ -1173,7 +1173,7 @@ _080629B4:
strh r1, [r0]
_080629D2:
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
movs r3, #0x2e
ldrsh r1, [r4, r3]
adds r2, r4, #0
diff --git a/asm/lavaPlatform.s b/asm/lavaPlatform.s
index 32d6da37..c2dc7c10 100644
--- a/asm/lavaPlatform.s
+++ b/asm/lavaPlatform.s
@@ -73,7 +73,7 @@ sub_0809229C: @ 0x0809229C
bl InitAnimationForceUpdate
movs r0, #0xbf
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
ldr r0, [r4, #0x54]
movs r1, #3
bl InitializeAnimation
@@ -281,7 +281,7 @@ _08092434:
movs r1, #2
bl InitializeAnimation
ldr r0, _08092468 @ =0x0000017B
- bl sub_08004488
+ bl EnqueSFX
_08092462:
pop {r4, pc}
.align 2, 0
@@ -335,7 +335,7 @@ _080924B8:
strb r0, [r3]
movs r0, #0xbe
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
b _080924DC
_080924CC:
movs r0, #2
@@ -344,7 +344,7 @@ _080924CC:
beq _080924DC
strb r2, [r3]
ldr r0, _080924E0 @ =0x0000017D
- bl sub_08004488
+ bl EnqueSFX
_080924DC:
pop {r4, r5, pc}
.align 2, 0
diff --git a/asm/likeLike.s b/asm/likeLike.s
index fa3c4f96..e0b8c086 100644
--- a/asm/likeLike.s
+++ b/asm/likeLike.s
@@ -269,7 +269,7 @@ _08027F38:
strb r0, [r4, #0xe]
_08027F5A:
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
adds r0, r4, #0
bl GetNextFrame
b _08027F7C
@@ -485,7 +485,7 @@ _080280F0:
bne _08028102
movs r0, #0x82
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_08028102:
pop {r4, r5, pc}
.align 2, 0
diff --git a/asm/lockedDoor.s b/asm/lockedDoor.s
index c73a92cd..22acc1b0 100644
--- a/asm/lockedDoor.s
+++ b/asm/lockedDoor.s
@@ -232,7 +232,7 @@ sub_080834B4: @ 0x080834B4
ldrb r2, [r2]
bl SetTile
ldr r0, _080834E8 @ =0x0000010B
- bl sub_08004488
+ bl EnqueSFX
_080834E6:
pop {pc}
.align 2, 0
@@ -323,7 +323,7 @@ _0808357A:
adds r0, r4, #0
bl sub_08083814
ldr r0, _08083590 @ =0x0000010B
- bl sub_08004488
+ bl EnqueSFX
_0808358C:
pop {r4, pc}
.align 2, 0
diff --git a/asm/madderpillar.s b/asm/madderpillar.s
index 22924791..d569af3e 100644
--- a/asm/madderpillar.s
+++ b/asm/madderpillar.s
@@ -117,7 +117,7 @@ _08029948:
movs r1, #0x7f
bl sub_0801D2B4
movs r0, #0xfe
- bl sub_08004488
+ bl EnqueSFX
ldr r0, [r5, #0x54]
strb r4, [r0, #0xc]
_08029970:
@@ -298,7 +298,7 @@ sub_08029AA4: @ 0x08029AA4
adds r0, r1, #0
bl sub_08029EEC
ldr r0, _08029ADC @ =0x0000019D
- bl sub_08004488
+ bl EnqueSFX
_08029ADA:
pop {pc}
.align 2, 0
@@ -335,7 +335,7 @@ sub_08029AE0: @ 0x08029AE0
bl sub_0801D2B4
movs r0, #0xc1
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_08029B28:
pop {r4, pc}
.align 2, 0
@@ -491,7 +491,7 @@ sub_08029C2C: @ 0x08029C2C
movs r1, #0x7f
bl sub_0801D2B4
movs r0, #0x6c
- bl sub_08004488
+ bl EnqueSFX
_08029C4E:
pop {pc}
@@ -625,7 +625,7 @@ sub_08029D14: @ 0x08029D14
movs r1, #0x7f
bl sub_0801D2B4
movs r0, #0x6c
- bl sub_08004488
+ bl EnqueSFX
b _08029D70
_08029D42:
adds r0, r4, #0
@@ -648,7 +648,7 @@ _08029D42:
ldr r0, _08029D74 @ =gUnk_080FD298
str r0, [r4, #0x48]
movs r0, #0x6b
- bl sub_08004488
+ bl EnqueSFX
_08029D70:
pop {r4, pc}
.align 2, 0
@@ -1121,7 +1121,7 @@ _0802A0B8:
movs r0, #0x32
ldrsh r6, [r4, r0]
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
adds r0, r4, #0
bl sub_08029F48
cmp r0, #0
@@ -1132,7 +1132,7 @@ _0802A0B8:
bl sub_08029EEC
movs r0, #0x82
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_0802A0E4:
movs r0, #0x2e
ldrsh r1, [r4, r0]
@@ -1286,7 +1286,7 @@ _0802A1B0: @ jump table
_0802A22C:
movs r0, #0x97
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_0802A234:
pop {pc}
.align 2, 0
diff --git a/asm/managerF.s b/asm/managerF.s
index 60d32fc0..f2181c89 100644
--- a/asm/managerF.s
+++ b/asm/managerF.s
@@ -747,7 +747,7 @@ _08059436:
strh r0, [r2, #0x32]
movs r0, #0xd8
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
bl DeleteThisEntity
_08059476:
pop {r4, pc}
diff --git a/asm/minecartDoor.s b/asm/minecartDoor.s
index 308edf13..a2988960 100644
--- a/asm/minecartDoor.s
+++ b/asm/minecartDoor.s
@@ -150,7 +150,7 @@ sub_08096BBC: @ 0x08096BBC
ldrb r2, [r2]
bl SetTile
ldr r0, _08096BF4 @ =0x0000010B
- bl sub_08004488
+ bl EnqueSFX
_08096BF2:
pop {r4, pc}
.align 2, 0
@@ -277,7 +277,7 @@ sub_08096CB0: @ 0x08096CB0
adds r0, r4, #0
bl sub_08083814
ldr r0, _08096CE8 @ =0x0000010B
- bl sub_08004488
+ bl EnqueSFX
_08096CE6:
pop {r4, pc}
.align 2, 0
diff --git a/asm/minishEzlo.s b/asm/minishEzlo.s
index d83ab550..c470a603 100644
--- a/asm/minishEzlo.s
+++ b/asm/minishEzlo.s
@@ -48,7 +48,7 @@ _08062FA0:
ands r0, r1
strb r0, [r4]
ldr r0, _08062FEC @ =0x000001CF
- bl sub_08004488
+ bl EnqueSFX
_08062FCC:
ldrb r1, [r4]
movs r0, #0x20
@@ -60,7 +60,7 @@ _08062FCC:
strb r0, [r4]
movs r0, #0x88
lsls r0, r0, #2
- bl sub_08004488
+ bl EnqueSFX
_08062FE4:
pop {r4, pc}
.align 2, 0
diff --git a/asm/moldworm.s b/asm/moldworm.s
index 943cf3e1..18884dc8 100644
--- a/asm/moldworm.s
+++ b/asm/moldworm.s
@@ -536,7 +536,7 @@ _08023440:
ldr r4, [r5, #0x2c]
ldr r6, [r5, #0x30]
adds r0, r5, #0
- bl sub_080AEF88
+ bl ProcessMovement
ldr r0, [r5, #0x2c]
cmp r0, r4
bne _08023460
diff --git a/asm/mountainMinish.s b/asm/mountainMinish.s
index d55b8c9a..c9571ff4 100644
--- a/asm/mountainMinish.s
+++ b/asm/mountainMinish.s
@@ -299,7 +299,7 @@ _08068068:
lsls r0, r0, #1
adds r0, r0, r4
ldrh r0, [r0]
- bl sub_08004488
+ bl EnqueSFX
_0806807E:
ldrb r1, [r6]
movs r0, #2
diff --git a/asm/mulldozer.s b/asm/mulldozer.s
index a9f8f0f0..4c449faa 100644
--- a/asm/mulldozer.s
+++ b/asm/mulldozer.s
@@ -325,7 +325,7 @@ _08032EC0:
adds r0, r4, #0
bl sub_080331E8
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
pop {r4, pc}
.align 2, 0
@@ -333,7 +333,7 @@ _08032EC0:
sub_08032ED0: @ 0x08032ED0
push {r4, r5, lr}
adds r4, r0, #0
- bl sub_080AEF88
+ bl ProcessMovement
adds r0, r4, #0
bl sub_08032F48
ldrb r0, [r4, #0xf]
@@ -428,7 +428,7 @@ _08032F82:
adds r0, r4, #0
bl sub_08032F48
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
pop {r4, pc}
thumb_func_start sub_08032F90
@@ -826,7 +826,7 @@ _08033238:
strh r0, [r4, #0x32]
movs r0, #0x86
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_08033278:
pop {r4, r5, r6, pc}
.align 2, 0
diff --git a/asm/npc23.s b/asm/npc23.s
index d3828237..bed87076 100644
--- a/asm/npc23.s
+++ b/asm/npc23.s
@@ -183,7 +183,7 @@ _08066410:
strb r0, [r4, #0xd]
_08066428:
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
_0806642E:
bl sub_08078B48
adds r0, r4, #0
diff --git a/asm/object20.s b/asm/object20.s
index fc8420ae..7fe7e16d 100644
--- a/asm/object20.s
+++ b/asm/object20.s
@@ -64,7 +64,7 @@ _08087836:
adds r0, r4, #0
bl sub_0801766C
movs r0, #0xfd
- bl sub_08004488
+ bl EnqueSFX
pop {r4, pc}
.align 2, 0
_08087884: .4byte gUnk_08120A54
diff --git a/asm/object24.s b/asm/object24.s
index a3d057e1..16ac6466 100644
--- a/asm/object24.s
+++ b/asm/object24.s
@@ -93,7 +93,7 @@ sub_0808886C: @ 0x0808886C
ldrh r0, [r0]
bl SetFlag
ldr r0, _080888B4 @ =0x0000016B
- bl sub_08004488
+ bl EnqueSFX
b _080888F2
.align 2, 0
_080888B4: .4byte 0x0000016B
@@ -117,7 +117,7 @@ _080888D2:
_080888DA:
movs r0, #0x86
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
b _080888F0
_080888E4:
cmp r4, r0
diff --git a/asm/object2A.s b/asm/object2A.s
index d9d563b0..da9945a6 100644
--- a/asm/object2A.s
+++ b/asm/object2A.s
@@ -140,6 +140,6 @@ _08089C96:
bl InitializeAnimation
movs r0, #0x92
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_08089CBA:
pop {r4, r5, r6, pc}
diff --git a/asm/object35.s b/asm/object35.s
index 586fc402..532c75c4 100644
--- a/asm/object35.s
+++ b/asm/object35.s
@@ -220,7 +220,7 @@ sub_0808B9D4: @ 0x0808B9D4
ldrb r2, [r2]
bl SetTile
ldr r0, _0808BA0C @ =0x0000010B
- bl sub_08004488
+ bl EnqueSFX
_0808BA0A:
pop {r4, pc}
.align 2, 0
@@ -294,7 +294,7 @@ sub_0808BA6C: @ 0x0808BA6C
movs r1, #2
bl sub_08083814
ldr r0, _0808BAA8 @ =0x0000010B
- bl sub_08004488
+ bl EnqueSFX
ldr r0, _0808BAAC @ =0x00004022
adds r1, r4, #0
adds r1, #0x76
diff --git a/asm/object43.s b/asm/object43.s
index a8cfb2a0..48912c1e 100644
--- a/asm/object43.s
+++ b/asm/object43.s
@@ -263,7 +263,7 @@ _0808E084:
_0808E0B8: .4byte gScreenTransition
_0808E0BC:
ldr r0, _0808E140 @ =0x00000115
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
movs r1, #0x12
movs r2, #0
diff --git a/asm/object44.s b/asm/object44.s
index a22a71ad..98dc9e54 100644
--- a/asm/object44.s
+++ b/asm/object44.s
@@ -113,7 +113,7 @@ _0808E340:
cmp r0, #0
beq _0808E34E
ldr r0, _0808E350 @ =0x0000018B
- bl sub_08004488
+ bl EnqueSFX
_0808E34E:
pop {r4, pc}
.align 2, 0
diff --git a/asm/object64.s b/asm/object64.s
index d6abbcb9..03c201f9 100644
--- a/asm/object64.s
+++ b/asm/object64.s
@@ -61,7 +61,7 @@ _08093E6A:
cmp r0, #0
bne _08093E90
ldrh r0, [r2]
- bl sub_08004488
+ bl EnqueSFX
_08093E90:
ldrb r1, [r4, #0xb]
movs r0, #0x20
diff --git a/asm/object6A.s b/asm/object6A.s
index d8eb941e..8eb8d64d 100644
--- a/asm/object6A.s
+++ b/asm/object6A.s
@@ -637,7 +637,7 @@ _08094ED4:
bl InitializeAnimation
movs r0, #0xbf
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
b _08094F94
.align 2, 0
_08094F04: .4byte 0xFFFFE000
@@ -1992,7 +1992,7 @@ sub_08095954: @ 0x08095954
str r0, [r1]
movs r0, #0x92
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
adds r2, r5, #0
adds r2, #0x5a
ldrb r1, [r2]
diff --git a/asm/object87.s b/asm/object87.s
index d90353d1..9ee385e3 100644
--- a/asm/object87.s
+++ b/asm/object87.s
@@ -67,7 +67,7 @@ _08099F70:
bl InitializeAnimation
movs r0, #0x92
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
b _0809A1B6
_08099F82:
ldr r0, [r5, #0x50]
diff --git a/asm/object8B.s b/asm/object8B.s
index 5f7a52d7..ddaa9483 100644
--- a/asm/object8B.s
+++ b/asm/object8B.s
@@ -170,7 +170,7 @@ sub_0809B050: @ 0x0809B050
bl sub_0809B0B0
movs r0, #0x86
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_0809B0A2:
pop {r4, r5, pc}
.align 2, 0
diff --git a/asm/objectA0.s b/asm/objectA0.s
index a831967c..4e8acfd6 100644
--- a/asm/objectA0.s
+++ b/asm/objectA0.s
@@ -114,7 +114,7 @@ sub_0809F1B0: @ 0x0809F1B0
adds r1, r5, #0
bl PositionRelative
movs r0, #0xec
- bl sub_08004488
+ bl EnqueSFX
b _0809F21E
.align 2, 0
_0809F208: .4byte gUnk_08124684
diff --git a/asm/objectA8.s b/asm/objectA8.s
index c4c396a8..5414d233 100644
--- a/asm/objectA8.s
+++ b/asm/objectA8.s
@@ -65,7 +65,7 @@ _0809FAE6:
bl sub_0805E3A0
movs r0, #0x9b
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_0809FB30:
pop {pc}
.align 2, 0
diff --git a/asm/objectBlockingStairs.s b/asm/objectBlockingStairs.s
index ee7430eb..38850853 100644
--- a/asm/objectBlockingStairs.s
+++ b/asm/objectBlockingStairs.s
@@ -184,7 +184,7 @@ _08092FF2:
movs r1, #0x50
bl sub_0805E4E0
ldr r0, _0809303C @ =0x0000010F
- bl sub_08004488
+ bl EnqueSFX
adds r0, r6, #0
bl sub_08093248
b _080930E6
@@ -326,7 +326,7 @@ _08093104:
strb r0, [r4, #0x15]
strb r2, [r4, #0xe]
ldr r0, _08093164 @ =0x0000010F
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
bl sub_08093248
b _08093174
@@ -620,7 +620,7 @@ _0809334A:
adds r1, r5, #0
bl sub_08093308
movs r0, #0x72
- bl sub_08004488
+ bl EnqueSFX
pop {r4, r5, pc}
.align 2, 0
diff --git a/asm/objectD.s b/asm/objectD.s
index 6ffdd754..f6f6cf5c 100644
--- a/asm/objectD.s
+++ b/asm/objectD.s
@@ -124,7 +124,7 @@ sub_080843F8: @ 0x080843F8
movs r2, #0
bl CreateFx
ldr r0, _08084424 @ =0x0000010D
- bl sub_08004488
+ bl EnqueSFX
_08084420:
pop {pc}
.align 2, 0
@@ -150,7 +150,7 @@ sub_08084428: @ 0x08084428
bl SetFlag
movs r0, #0x86
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_08084454:
pop {r4, pc}
.align 2, 0
diff --git a/asm/objectOnPillar.s b/asm/objectOnPillar.s
index 6829d195..344e6854 100644
--- a/asm/objectOnPillar.s
+++ b/asm/objectOnPillar.s
@@ -360,7 +360,7 @@ sub_08097098: @ 0x08097098
movs r0, #0x20
strh r0, [r1]
adds r0, #0xef
- bl sub_08004488
+ bl EnqueSFX
adds r0, r6, #0
adds r0, #0x70
ldrh r0, [r0]
@@ -504,7 +504,7 @@ _080971B8:
ldrh r0, [r0]
bl SetFlag
ldr r0, _080971D8 @ =0x0000010B
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
bl sub_080971E0
movs r0, #1
diff --git a/asm/octorokBoss.s b/asm/octorokBoss.s
index a6043de6..6bc4b9a0 100644
--- a/asm/octorokBoss.s
+++ b/asm/octorokBoss.s
@@ -244,7 +244,7 @@ _08035356:
lsls r0, r0, #1
strh r0, [r5, #0x24]
adds r0, r5, #0
- bl sub_080AEF88
+ bl ProcessMovement
adds r7, r5, #0
adds r7, #0x79
b _08035456
@@ -1952,7 +1952,7 @@ _080360A0:
b _080360BE
_080360B2:
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
cmp r0, #0
bne _080360BE
strb r0, [r5]
@@ -1991,7 +1991,7 @@ sub_080360E8: @ 0x080360E8
cmp r0, #0
bne _08036178
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
movs r2, #0
ldrb r0, [r4, #0x15]
cmp r0, #0
@@ -2884,7 +2884,7 @@ sub_08036764: @ 0x08036764
sub_080367B0: @ 0x080367B0
push {r4, r5, lr}
adds r4, r0, #0
- bl sub_080AEF88
+ bl ProcessMovement
ldrh r0, [r4, #0x2a]
cmp r0, #0
beq _0803683A
@@ -3005,7 +3005,7 @@ sub_08036870: @ 0x08036870
strb r0, [r3, #0x15]
strh r2, [r3, #0x2a]
adds r0, r3, #0
- bl sub_080AEF88
+ bl ProcessMovement
b _080368D4
_080368AA:
lsls r0, r1, #0x18
diff --git a/asm/octorokGolden.s b/asm/octorokGolden.s
index d0af53ef..7366c687 100644
--- a/asm/octorokGolden.s
+++ b/asm/octorokGolden.s
@@ -135,7 +135,7 @@ _08037D26:
movs r1, #2
bl UpdateAnimationVariableFrames
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
cmp r0, #0
bne _08037D40
adds r0, r4, #0
@@ -201,7 +201,7 @@ sub_08037D54: @ 0x08037D54
strh r0, [r2, #0x36]
movs r0, #0x92
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
b _08037E0C
.align 2, 0
_08037DBC: .4byte gUnk_080CF490
diff --git a/asm/pesto.s b/asm/pesto.s
index 444b0ceb..63c9018b 100644
--- a/asm/pesto.s
+++ b/asm/pesto.s
@@ -394,7 +394,7 @@ _080241D8:
_080241E4:
adds r0, r4, #0
movs r1, #3
- bl sub_08049F64
+ bl PlayerInRange
cmp r0, #0
beq _08024220
adds r0, r4, #0
diff --git a/asm/picoBloom.s b/asm/picoBloom.s
index 9447336e..6ce20de9 100644
--- a/asm/picoBloom.s
+++ b/asm/picoBloom.s
@@ -84,7 +84,7 @@ sub_08098AE8: @ 0x08098AE8
ands r0, r1
strb r0, [r4]
ldr r0, _08098B0C @ =0x0000021B
- bl sub_08004488
+ bl EnqueSFX
_08098B08:
pop {r4, pc}
.align 2, 0
diff --git a/asm/puffstool.s b/asm/puffstool.s
index 1e5a87d6..cf03222f 100644
--- a/asm/puffstool.s
+++ b/asm/puffstool.s
@@ -154,7 +154,7 @@ _080250C2:
_08025104:
movs r0, #0xc3
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_0802510C:
ldr r1, _08025118 @ =gUnk_080CBF9C
adds r0, r4, #0
@@ -1644,7 +1644,7 @@ sub_08025C44: @ 0x08025C44
b _08025C5E
_08025C58:
adds r0, r2, #0
- bl sub_080AEF88
+ bl ProcessMovement
_08025C5E:
pop {pc}
diff --git a/asm/pullableLever.s b/asm/pullableLever.s
index 93c1257d..f9dc53c4 100644
--- a/asm/pullableLever.s
+++ b/asm/pullableLever.s
@@ -296,7 +296,7 @@ _080913E0:
strb r5, [r1]
movs r0, #0xcf
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_0809142A:
pop {r4, r5, r6, r7, pc}
.align 2, 0
@@ -575,7 +575,7 @@ _080915E0:
bhi _08091640
movs r0, #0x86
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
adds r0, r5, #0
adds r0, #0x86
ldrh r0, [r0]
@@ -593,7 +593,7 @@ _08091640:
movs r0, #0x10
strb r0, [r5, #0xf]
adds r0, #0xff
- bl sub_08004488
+ bl EnqueSFX
_08091656:
add sp, #4
pop {r3, r4}
diff --git a/asm/pushableFurniture.s b/asm/pushableFurniture.s
index 13c9d1d7..fd04b86c 100644
--- a/asm/pushableFurniture.s
+++ b/asm/pushableFurniture.s
@@ -230,7 +230,7 @@ _0808FAF2:
bne _0808FB0A
movs r0, #0x86
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_0808FB0A:
ldrb r0, [r4, #0xa]
cmp r0, #2
@@ -271,7 +271,7 @@ _0808FB3E:
movs r0, #2
strb r0, [r4, #0xd]
movs r0, #0x80
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
bl sub_0808FF20
b _0808FB64
@@ -598,7 +598,7 @@ _0808FDB4:
strb r0, [r4, #0xe]
_0808FDB6:
ldr r0, _0808FDE0 @ =0x0000010F
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
bl sub_08090254
ldr r1, _0808FDE4 @ =gUnk_080B4488
diff --git a/asm/pushableGrave.s b/asm/pushableGrave.s
index 89e6e5fb..00dcfd34 100644
--- a/asm/pushableGrave.s
+++ b/asm/pushableGrave.s
@@ -293,7 +293,7 @@ _080977BC:
b _080977E4
_080977C8:
movs r0, #0x72
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
bl sub_080977F4
ldrb r0, [r4, #0xa]
diff --git a/asm/pushableLever.s b/asm/pushableLever.s
index 1109088d..e20940d6 100644
--- a/asm/pushableLever.s
+++ b/asm/pushableLever.s
@@ -62,7 +62,7 @@ sub_08098294: @ 0x08098294
bl SetTile
movs r0, #0xb5
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
movs r1, #0x1e
bl sub_0805E4E0
@@ -315,7 +315,7 @@ _08098492:
bne _080984C2
movs r0, #0x82
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_080984C2:
pop {r4, pc}
.align 2, 0
diff --git a/asm/pushableRock.s b/asm/pushableRock.s
index 299ab5e7..16ba39cb 100644
--- a/asm/pushableRock.s
+++ b/asm/pushableRock.s
@@ -114,7 +114,7 @@ _0808A598:
adds r0, r4, #0
bl InitializeAnimation
ldr r0, _0808A5C8 @ =0x0000010F
- bl sub_08004488
+ bl EnqueSFX
b _0808A5DE
.align 2, 0
_0808A5C8: .4byte 0x0000010F
diff --git a/asm/pushableStatue.s b/asm/pushableStatue.s
index 2e013531..4cc9ad88 100644
--- a/asm/pushableStatue.s
+++ b/asm/pushableStatue.s
@@ -463,7 +463,7 @@ sub_08089538: @ 0x08089538
movs r0, #0x20
strh r0, [r1]
adds r0, #0xef
- bl sub_08004488
+ bl EnqueSFX
adds r0, r5, #0
adds r0, #0x80
ldrh r0, [r0]
diff --git a/asm/rope.s b/asm/rope.s
index 49a1a076..c65ccb53 100644
--- a/asm/rope.s
+++ b/asm/rope.s
@@ -214,7 +214,7 @@ _080314CC:
adds r0, r4, #0
bl UpdateSpriteForCollisionLayer
movs r0, #0x84
- bl sub_08004488
+ bl EnqueSFX
_080314FA:
pop {r4, pc}
@@ -398,6 +398,6 @@ _08031652:
_08031658:
strh r0, [r4, #0x24]
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
pop {r4, pc}
.align 2, 0
diff --git a/asm/ropeGolden.s b/asm/ropeGolden.s
index 52f63737..00dced8a 100644
--- a/asm/ropeGolden.s
+++ b/asm/ropeGolden.s
@@ -152,7 +152,7 @@ _080382BC:
movs r1, #2
bl UpdateAnimationVariableFrames
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
cmp r0, #0
bne _080382D6
adds r0, r4, #0
@@ -194,7 +194,7 @@ sub_08038304: @ 0x08038304
movs r1, #2
bl UpdateAnimationVariableFrames
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
cmp r0, #0
bne _08038334
adds r0, r4, #0
diff --git a/asm/scissorsBeetle.s b/asm/scissorsBeetle.s
index 4c056268..04e7d56d 100644
--- a/asm/scissorsBeetle.s
+++ b/asm/scissorsBeetle.s
@@ -356,7 +356,7 @@ _08038B18:
movs r1, #0
bl sub_08038C84
ldr r0, _08038B60 @ =0x0000015B
- bl sub_08004488
+ bl EnqueSFX
_08038B5E:
pop {r4, pc}
.align 2, 0
@@ -366,7 +366,7 @@ _08038B60: .4byte 0x0000015B
sub_08038B64: @ 0x08038B64
push {r4, lr}
adds r4, r0, #0
- bl sub_080AEF88
+ bl ProcessMovement
adds r0, r4, #0
bl UpdateAnimationSingleFrame
ldrb r0, [r4, #0xf]
@@ -392,7 +392,7 @@ sub_08038B90: @ 0x08038B90
adds r4, r0, #0
bl UpdateAnimationSingleFrame
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
adds r0, r4, #0
bl sub_0800445C
pop {r4, pc}
diff --git a/asm/sensorBladeTrap.s b/asm/sensorBladeTrap.s
index 76fbeec6..f95f02b4 100644
--- a/asm/sensorBladeTrap.s
+++ b/asm/sensorBladeTrap.s
@@ -200,7 +200,7 @@ sub_0802BB10: @ 0x0802BB10
eors r1, r2
strb r1, [r0, #0x15]
movs r0, #0x74
- bl sub_08004488
+ bl EnqueSFX
pop {pc}
.align 2, 0
diff --git a/asm/sluggula.s b/asm/sluggula.s
index 0b860cca..8ae3f9a9 100644
--- a/asm/sluggula.s
+++ b/asm/sluggula.s
@@ -141,7 +141,7 @@ sub_08023C5C: @ 0x08023C5C
sub_08023C8C: @ 0x08023C8C
push {r4, lr}
adds r4, r0, #0
- bl sub_080AEF88
+ bl ProcessMovement
adds r0, r4, #0
bl GetNextFrame
adds r0, r4, #0
@@ -240,7 +240,7 @@ _08023D48:
adds r0, r4, #0
movs r1, #1
movs r2, #0x20
- bl sub_08049F64
+ bl PlayerInRange
cmp r0, #0
beq _08023E0A
movs r0, #2
@@ -266,7 +266,7 @@ _08023D6E:
cmp r0, #0
bne _08023E0A
ldr r0, _08023D90 @ =0x0000012D
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
movs r1, #4
bl InitializeAnimation
@@ -289,7 +289,7 @@ _08023D94:
orrs r0, r1
strb r0, [r4, #0x18]
movs r0, #0x84
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
bl UpdateSpriteForCollisionLayer
b _08023E0A
diff --git a/asm/smallIceBlock.s b/asm/smallIceBlock.s
index 057ae10b..e851c0e6 100644
--- a/asm/smallIceBlock.s
+++ b/asm/smallIceBlock.s
@@ -104,7 +104,7 @@ sub_08099248: @ 0x08099248
strb r0, [r4, #0xc]
strb r1, [r4, #0xe]
ldr r0, _0809927C @ =0x000001B3
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
bl sub_08099330
ldrb r0, [r4, #0xa]
@@ -200,7 +200,7 @@ sub_08099310: @ 0x08099310
bl sub_08099468
movs r0, #0xd9
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_0809932E:
pop {r4, pc}
@@ -406,7 +406,7 @@ sub_080994B8: @ 0x080994B8
push {r4, r5, r6, lr}
adds r5, r0, #0
ldr r0, _08099530 @ =0x000001B1
- bl sub_08004488
+ bl EnqueSFX
adds r0, r5, #0
adds r0, #0x6c
ldrh r0, [r0]
diff --git a/asm/spark.s b/asm/spark.s
index 8e296dbf..83bd9414 100644
--- a/asm/spark.s
+++ b/asm/spark.s
@@ -109,7 +109,7 @@ sub_0802B35C: @ 0x0802B35C
adds r4, r0, #0
bl GetNextFrame
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
movs r3, #0
ldrb r0, [r4, #0xa]
cmp r0, #0
diff --git a/asm/spearMoblin.s b/asm/spearMoblin.s
index 78c68b1b..123692be 100644
--- a/asm/spearMoblin.s
+++ b/asm/spearMoblin.s
@@ -350,7 +350,7 @@ _080284B4:
strb r0, [r4, #0x15]
movs r0, #0x8f
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
b _0802850A
_080284D2:
strb r1, [r4, #0xc]
@@ -477,7 +477,7 @@ _080285BC:
cmp r0, #0
bne _080285D6
movs r0, #0xf0
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
movs r1, #2
movs r2, #0x40
@@ -500,7 +500,7 @@ _080285EE:
cmp r0, #0x20
bls _080285FA
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
_080285FA:
adds r0, r4, #0
bl GetNextFrame
@@ -854,7 +854,7 @@ sub_08028858: @ 0x08028858
strh r0, [r4, #0x24]
_08028890:
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
adds r0, r4, #0
bl GetNextFrame
pop {r4, pc}
diff --git a/asm/specialFx.s b/asm/specialFx.s
index 132bd8f9..27ece1b6 100644
--- a/asm/specialFx.s
+++ b/asm/specialFx.s
@@ -101,7 +101,7 @@ _0808456C:
cmp r0, #0
bne _08084582
ldrh r0, [r4, #2]
- bl sub_08004488
+ bl EnqueSFX
_08084582:
ldrb r1, [r5, #0xb]
movs r0, #0x80
diff --git a/asm/spikedBeetle.s b/asm/spikedBeetle.s
index 1140c3d4..bcaf117b 100644
--- a/asm/spikedBeetle.s
+++ b/asm/spikedBeetle.s
@@ -196,7 +196,7 @@ _0802B780:
b _0802B7A0
_0802B794:
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
cmp r0, #0
bne _0802B7A2
movs r0, #1
@@ -366,7 +366,7 @@ _0802B8CC:
strb r0, [r4, #0xe]
_0802B8D4:
ldr r0, _0802B8DC @ =0x0000012B
- bl sub_08004488
+ bl EnqueSFX
_0802B8DA:
pop {r4, pc}
.align 2, 0
@@ -419,7 +419,7 @@ _0802B91C:
adds r0, r3, #0
bl InitializeAnimation
ldr r0, _0802B944 @ =0x0000012B
- bl sub_08004488
+ bl EnqueSFX
_0802B940:
pop {r4, pc}
.align 2, 0
diff --git a/asm/spinyBeetle.s b/asm/spinyBeetle.s
index b65ad269..eab4f1c8 100644
--- a/asm/spinyBeetle.s
+++ b/asm/spinyBeetle.s
@@ -831,7 +831,7 @@ _08033DCE:
cmp r0, #0x3e
bls _08033DE2
adds r0, r6, #0
- bl sub_080AEF88
+ bl ProcessMovement
_08033DE2:
pop {r4, r5, r6, pc}
.align 2, 0
diff --git a/asm/stalfos.s b/asm/stalfos.s
index a8bb51a1..309afcfa 100644
--- a/asm/stalfos.s
+++ b/asm/stalfos.s
@@ -153,7 +153,7 @@ _08039390:
strb r0, [r1, #0xb]
movs r0, #0xc3
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
b _080393DC
_080393CA:
adds r0, r1, #0
@@ -162,7 +162,7 @@ _080393CA:
strb r2, [r0]
movs r0, #0xc3
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
str r4, [r5, #0x54]
_080393DC:
adds r0, r5, #0
@@ -404,7 +404,7 @@ sub_0803958C: @ 0x0803958C
cmp r0, #0
bne _080395D4
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
cmp r0, #0
beq _080395C0
adds r0, r4, #0
@@ -452,7 +452,7 @@ sub_080395D8: @ 0x080395D8
movs r0, #0x5a
strb r0, [r1]
movs r0, #0x7d
- bl sub_08004488
+ bl EnqueSFX
_08039602:
pop {r4, pc}
@@ -509,7 +509,7 @@ _0803963A:
adds r0, r2, #0
bl sub_080399C4
ldr r0, _0803966C @ =0x0000014B
- bl sub_08004488
+ bl EnqueSFX
_0803966A:
pop {pc}
.align 2, 0
@@ -764,7 +764,7 @@ _08039836:
adds r0, r2, #0
bl InitAnimationForceUpdate
ldr r0, _08039854 @ =0x0000012B
- bl sub_08004488
+ bl EnqueSFX
pop {pc}
.align 2, 0
_08039854: .4byte 0x0000012B
@@ -1018,7 +1018,7 @@ sub_08039A20: @ 0x08039A20
movs r0, #0x3c
strb r0, [r1]
movs r0, #0xfb
- bl sub_08004488
+ bl EnqueSFX
_08039A44:
pop {r4, pc}
.align 2, 0
diff --git a/asm/vaati.s b/asm/vaati.s
index 172ccc8b..11f143cd 100644
--- a/asm/vaati.s
+++ b/asm/vaati.s
@@ -115,11 +115,11 @@ _08066B20:
_08066B2A:
movs r0, #0x87
lsls r0, r0, #2
- bl sub_08004488
+ bl EnqueSFX
b _08066B66
_08066B34:
ldr r0, _08066B3C @ =0x0000021E
- bl sub_08004488
+ bl EnqueSFX
b _08066B66
.align 2, 0
_08066B3C: .4byte 0x0000021E
@@ -140,7 +140,7 @@ _08066B52:
adds r0, r4, #0
bl sub_0805DE18
ldr r0, _08066B70 @ =0x0000021D
- bl sub_08004488
+ bl EnqueSFX
_08066B66:
ldrb r1, [r5]
movs r0, #0x7f
diff --git a/asm/vaatiArm.s b/asm/vaatiArm.s
index 3324c7ec..33ac5c87 100644
--- a/asm/vaatiArm.s
+++ b/asm/vaatiArm.s
@@ -1418,7 +1418,7 @@ _08042FC2:
ldr r0, [r0, #0xc]
ldrb r1, [r4, #0x15]
strb r1, [r0, #0x15]
- bl sub_080AEF88
+ bl ProcessMovement
_08042FCE:
pop {r3}
mov r8, r3
@@ -3298,7 +3298,7 @@ _08043D92:
cmp r2, #4
bls _08043D92
movs r0, #0xfe
- bl sub_08004488
+ bl EnqueSFX
pop {r4, r5, pc}
.align 2, 0
_08043DAC: .4byte gUnk_080D13E9
diff --git a/asm/vaatiEyesMacro.s b/asm/vaatiEyesMacro.s
index 650c360c..cd272756 100644
--- a/asm/vaatiEyesMacro.s
+++ b/asm/vaatiEyesMacro.s
@@ -100,7 +100,7 @@ _0802ED0E:
beq _0802ED24
movs r0, #0xbd
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
_0802ED24:
ldrb r0, [r5]
strb r0, [r6]
@@ -123,7 +123,7 @@ _0802ED3E:
cmp r0, #0xff
beq _0802ED4E
movs r0, #0xe5
- bl sub_08004488
+ bl EnqueSFX
_0802ED4E:
movs r0, #0xff
strb r0, [r5]
@@ -528,7 +528,7 @@ sub_0802F04C: @ 0x0802F04C
movs r1, #0x32
ldrsh r6, [r4, r1]
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
cmp r0, #0
bne _0802F06A
adds r0, r4, #0
diff --git a/asm/vaatiProjectile.s b/asm/vaatiProjectile.s
index 9e312e19..1be37b71 100644
--- a/asm/vaatiProjectile.s
+++ b/asm/vaatiProjectile.s
@@ -251,7 +251,7 @@ sub_0803E258: @ 0x0803E258
adds r0, r4, #0
movs r1, #0
movs r2, #8
- bl sub_08049F64
+ bl PlayerInRange
cmp r0, #0
beq _0803E280
movs r0, #2
diff --git a/asm/vaatiReborn.s b/asm/vaatiReborn.s
index a3c8baf4..74b23e66 100644
--- a/asm/vaatiReborn.s
+++ b/asm/vaatiReborn.s
@@ -336,7 +336,7 @@ _0806B8C4:
adds r0, #1
strb r0, [r5, #0xd]
movs r0, #0xf4
- bl sub_08004488
+ bl EnqueSFX
movs r0, #0
strb r0, [r5, #0xe]
_0806B8FA:
diff --git a/asm/vaatiTransfigured.s b/asm/vaatiTransfigured.s
index be7920c3..81a0d5b7 100644
--- a/asm/vaatiTransfigured.s
+++ b/asm/vaatiTransfigured.s
@@ -439,7 +439,7 @@ _0803FAAC:
cmp r0, #0xff
beq _0803FAB8
adds r0, r7, #0
- bl sub_080AEF88
+ bl ProcessMovement
_0803FAB8:
adds r0, r7, #0
bl UpdateAnimationSingleFrame
diff --git a/asm/vaatiWrath.s b/asm/vaatiWrath.s
index 46a98812..e76f2e24 100644
--- a/asm/vaatiWrath.s
+++ b/asm/vaatiWrath.s
@@ -384,7 +384,7 @@ sub_08041618: @ 0x08041618
adds r0, r4, #0
bl UpdateAnimationSingleFrame
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
ldr r0, _0804165C @ =gRoomControls
ldrh r2, [r0, #8]
adds r0, r2, #0
diff --git a/asm/wallMaster.s b/asm/wallMaster.s
index bf09db0b..da7410a1 100644
--- a/asm/wallMaster.s
+++ b/asm/wallMaster.s
@@ -243,7 +243,7 @@ sub_0802A5B8: @ 0x0802A5B8
cmp r0, #0
bne _0802A60E
ldr r0, _0802A5E4 @ =0x0000012D
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
movs r1, #0
bl InitializeAnimation
diff --git a/asm/warpPoint.s b/asm/warpPoint.s
index 7f3eba57..46bf961b 100644
--- a/asm/warpPoint.s
+++ b/asm/warpPoint.s
@@ -110,7 +110,7 @@ _0808B4F8:
strb r2, [r1, #0x14]
movs r0, #0x89
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
ldrb r1, [r4, #0xf]
adds r1, #0x10
adds r0, r4, #0
@@ -142,7 +142,7 @@ _0808B554:
movs r0, #0x3c
strb r0, [r4, #0xf]
adds r0, #0xd6
- bl sub_08004488
+ bl EnqueSFX
_0808B562:
pop {r4, pc}
diff --git a/asm/waterDrop.s b/asm/waterDrop.s
index ab7e2153..664c8b9d 100644
--- a/asm/waterDrop.s
+++ b/asm/waterDrop.s
@@ -85,7 +85,7 @@ sub_0802A2B4: @ 0x0802A2B4
orrs r0, r1
strb r0, [r2]
movs r0, #0x84
- bl sub_08004488
+ bl EnqueSFX
b _0802A2E2
_0802A2DC:
adds r0, r4, #0
diff --git a/asm/windTribespeople.s b/asm/windTribespeople.s
index dee2af5f..dd4e7087 100644
--- a/asm/windTribespeople.s
+++ b/asm/windTribespeople.s
@@ -147,7 +147,7 @@ sub_0806CA5C: @ 0x0806CA5C
cmp r0, #0xa
bne _0806CA7E
movs r0, #0xe8
- bl sub_08004488
+ bl EnqueSFX
_0806CA7E:
ldrh r0, [r4, #0x10]
cmp r0, #0
diff --git a/asm/wizzrobeFire.s b/asm/wizzrobeFire.s
index 944a21cb..da743284 100644
--- a/asm/wizzrobeFire.s
+++ b/asm/wizzrobeFire.s
@@ -292,7 +292,7 @@ _0802FD18:
bl SetTile
movs r0, #0xab
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
ldrb r1, [r4, #0x15]
lsrs r1, r1, #3
adds r0, r4, #0
@@ -337,7 +337,7 @@ _0802FD94:
strb r0, [r4, #0xe]
movs r0, #0xab
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
bl sub_0802F8E4
ldrb r1, [r4, #0x15]
diff --git a/asm/wizzrobeIce.s b/asm/wizzrobeIce.s
index c8cd1228..c0634a4c 100644
--- a/asm/wizzrobeIce.s
+++ b/asm/wizzrobeIce.s
@@ -319,7 +319,7 @@ _0802FFF0:
bl SetTile
movs r0, #0xab
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
ldrb r1, [r4, #0x15]
lsrs r1, r1, #3
adds r0, r4, #0
@@ -364,7 +364,7 @@ _0803006C:
strb r0, [r4, #0xe]
movs r0, #0xab
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
bl sub_0802F8E4
ldrb r1, [r4, #0x15]
diff --git a/asm/wizzrobeWind.s b/asm/wizzrobeWind.s
index 01d74385..4025a460 100644
--- a/asm/wizzrobeWind.s
+++ b/asm/wizzrobeWind.s
@@ -334,7 +334,7 @@ _0802F6F0:
strb r0, [r4, #0x10]
movs r0, #0xab
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
adds r0, #0x86
ldrh r0, [r0]
@@ -389,7 +389,7 @@ _0802F76C:
strb r0, [r4, #0xe]
movs r0, #0xab
lsls r0, r0, #1
- bl sub_08004488
+ bl EnqueSFX
adds r0, r4, #0
bl sub_0802F8E4
ldrb r1, [r4, #0x15]
@@ -725,7 +725,7 @@ _0802FA20:
cmp r0, #0
beq _0802FA3E
adds r0, r4, #0
- bl sub_080AEF88
+ bl ProcessMovement
ldrh r0, [r4, #0x2a]
cmp r0, #0
beq _0802FA3E
diff --git a/include/entity.h b/include/entity.h
index fc09651d..7440c198 100644
--- a/include/entity.h
+++ b/include/entity.h
@@ -169,6 +169,13 @@ extern void CopyPosition(Entity*, Entity*);
extern void DeleteEntity(Entity*);
extern void PositionRelative(Entity*, Entity*, s32, s32);
+#define DirectionRound(expr) ((expr) & 0x18)
+#define DirectionRoundUp(expr) DirectionRound((expr) + 4)
+#define DirectionIsHorizontal(expr) ((expr) & 0x08)
+#define DirectionIsVertical(expr) ((expr) & 0x10)
+#define DirectionTurnHorizontal(expr) (DirectionRoundUp(expr) ^ 0x08)
+#define DirectionTurnVertical(expr) (DirectionRoundUp(expr) ^ 0x10)
+
extern Entity gUnk_03003DA0;
#endif
diff --git a/include/functions.h b/include/functions.h
index 8725e18e..adef870f 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -52,7 +52,7 @@ extern void sub_0806920C(Entity*);
extern u32 sub_0805ACC0(Entity*);
extern u32 sub_0801E99C(Entity*);
extern void sub_0806924C(Entity*);
-extern u32 sub_080AEF88(Entity*);
+extern u32 ProcessMovement(Entity*);
extern Entity* sub_080873AC(Entity*, u32, u32);
extern void sub_08078778(Entity*);
extern void sub_080787A8(Entity*, u32);
@@ -192,7 +192,7 @@ extern void sub_08001242(Entity*);
extern u32 sub_08003FC4(Entity*, u32);
extern u32 sub_080043E8(Entity*);
extern void sub_08001290(Entity*, u32);
-extern void sub_08004488(u32);
+extern void EnqueSFX(u32);
extern void sub_08004596(Entity*, u32);
extern u32 sub_0807953C(void);
extern void ResetPlayer(void);
diff --git a/src/enemy/acroBandits.c b/src/enemy/acroBandits.c
index 98e6f254..03e02143 100644
--- a/src/enemy/acroBandits.c
+++ b/src/enemy/acroBandits.c
@@ -4,7 +4,6 @@
extern u32 sub_080002D4(s32, s32, u32);
extern s32 sub_080012DC(Entity*);
-extern void sub_08001324(Entity*);
extern u32 sub_080044EC(Entity*, u32);
extern u32 sub_08031E04(Entity*);
extern void sub_08031E48(Entity*, Entity*);
@@ -344,7 +343,7 @@ void sub_08031EE8(Entity* this) {
if (this->height.HALF.HI < 1) {
draw = this->spriteSettings.b.draw;
if (!draw)
- sub_08004488(299);
+ EnqueSFX(299);
this->spriteSettings.b.draw = 1;
}
@@ -415,7 +414,7 @@ void sub_08032008(Entity* this) {
this->spriteSettings.b.flipX = (this->direction >> 4 ^ 1);
- sub_080AEF88(this);
+ ProcessMovement(this);
} else {
if (this->field_0x76.HALF.HI == 0) {
if (sub_0806FCB8(this, parent->x.HALF.HI, parent->y.HALF.HI, 1) == 0) {
diff --git a/src/enemy/beetle.c b/src/enemy/beetle.c
index 3bdbfdad..a454402a 100644
--- a/src/enemy/beetle.c
+++ b/src/enemy/beetle.c
@@ -2,7 +2,7 @@
#include "functions.h"
#include "player.h"
-extern u32 sub_08049F64(Entity*, u32, u32);
+extern u32 PlayerInRange(Entity*, u32, u32);
u32 sub_08021D00();
void sub_08021D44(Entity* this, u32 param_2);
@@ -86,7 +86,7 @@ void sub_08021888(Entity* this) {
sub_08021818(this);
}
-void sub_0802189C(Entity* this) {
+void Beetle_Initialize(Entity* this) {
sub_0804A720(this);
this->action = 1;
this->field_0x1c = 1;
@@ -131,7 +131,7 @@ void sub_08021984(Entity* this) {
this->height.HALF.HI = -0x80;
this->spriteRendering.b3 = 1;
this->spriteOrientation.flipY = 1;
- sub_08004488(0x12d);
+ EnqueSFX(0x12d);
}
if (sub_08003FC4(this, 0x1800) == 0) {
@@ -178,7 +178,7 @@ void sub_08021A64(Entity* this) {
}
sub_08021D44(this, tmp);
}
- sub_080AEF88(this);
+ ProcessMovement(this);
GetNextFrame(this);
}
}
@@ -198,7 +198,7 @@ void sub_08021AD8(Entity* this) {
return;
}
this->direction = (u8)tmp;
- sub_08004488(0x7c);
+ EnqueSFX(0x7c);
}
sub_080AEFE0(this);
if (!sub_08003FC4(this, 0x1800))
@@ -292,7 +292,7 @@ u32 sub_08021D00(Entity* this) {
if (((u8*)&this->field_0x86)[0]) {
((u8*)&this->field_0x86)[0]--;
ret = 0;
- } else if (sub_08049F64(this, 1, 0x10) == 0) {
+ } else if (PlayerInRange(this, 1, 0x10) == 0) {
ret = 0;
} else {
this->action = 4;
@@ -305,11 +305,10 @@ u32 sub_08021D00(Entity* this) {
return ret;
}
-void sub_08021D44(Entity* this, u32 param_2) {
- param_2 += 4;
- param_2 &= 0x18;
- this->direction = param_2;
- if (param_2 & 8) {
+void sub_08021D44(Entity* this, u32 direction) {
+ direction = DirectionRoundUp(direction);
+ this->direction = direction;
+ if (DirectionIsHorizontal(direction)) {
this->nonPlanarMovement = 0x180;
} else {
this->nonPlanarMovement = 0xc0;
@@ -328,7 +327,7 @@ void (*const gUnk_080CB590[])(Entity*) = {
};
void (*const gUnk_080CB5A8[])(Entity*) = {
- sub_0802189C,
+ Beetle_Initialize,
sub_080218B4,
sub_08021A10,
sub_08021A64,
diff --git a/src/enemy/bladeTrap.c b/src/enemy/bladeTrap.c
index 7f77861c..2229aec2 100644
--- a/src/enemy/bladeTrap.c
+++ b/src/enemy/bladeTrap.c
@@ -3,7 +3,7 @@
#include "room.h"
extern void sub_080A2CC0();
extern void sub_0806F69C();
-extern void sub_08004488();
+extern void EnqueSFX();
extern Entity* GetCurrentRoomProperty();
void BladeTrap(Entity* ent) {
@@ -27,7 +27,7 @@ void BladeTrap(Entity* ent) {
*puVar3 = uVar1 - 1;
if ((*puVar3) == 0) {
if ((u16)(ent->direction & 0x80) == 0) {
- sub_08004488(0x74);
+ EnqueSFX(0x74);
}
sub_080A2CC0((EntityData*)ent, &ent->attachedEntity, puVar3);
}
diff --git a/src/enemy/chuchu.c b/src/enemy/chuchu.c
index 8dc5948c..738d2c13 100644
--- a/src/enemy/chuchu.c
+++ b/src/enemy/chuchu.c
@@ -6,7 +6,7 @@ extern s32 sub_080012DC(Entity*);
extern void sub_08001318(Entity*);
extern void sub_080043A8(Entity*);
extern u32 sub_08049F1C(Entity*, Entity*, u32);
-extern u32 sub_08049F64(Entity*, u32, u32);
+extern u32 PlayerInRange(Entity*, u32, u32);
extern void sub_0804AA1C(Entity*);
extern void sub_080AF160(Entity*);
@@ -25,7 +25,7 @@ void sub_0801FB14(Entity*);
void sub_0801FB34(Entity*);
void sub_0801FB68(Entity*);
u32 sub_0801FBD0(Entity*);
-void sub_0801FBE4(Entity*);
+void Chuchu_JumpAtPlayer(Entity*);
extern void (*const gUnk_080012C8[])(Entity*);
extern void (*const gUnk_080CA21C[])(Entity*);
@@ -78,7 +78,7 @@ void Chuchu(Entity* this) {
}
}
-void sub_0801EEE4(Entity* this) {
+void Chuchu_OnTick(Entity* this) {
switch (this->entityType.form) {
case 0:
sub_0801F3AC(this);
@@ -193,13 +193,13 @@ void sub_0801F12C(Entity* this) {
if ((this->field_0xf++ & 7) == 0) {
this->direction = sub_08049F84(this, 1);
}
- sub_080AEF88(this);
+ ProcessMovement(this);
GetNextFrame(this);
if (--this->actionDelay == 0) {
- if (sub_08049F64(this, 1, 0x38)) {
+ if (PlayerInRange(this, 1, 0x38)) {
this->action = 4;
- sub_0801FBE4(this);
- } else if (sub_08049F64(this, 1, 0x48)) {
+ Chuchu_JumpAtPlayer(this);
+ } else if (PlayerInRange(this, 1, 0x48)) {
this->actionDelay = (Random() & 3) + 0xc;
} else {
sub_0801F328(this);
@@ -213,7 +213,7 @@ void sub_0801F1B0(Entity* this) {
if (this->frames.all & 1) {
this->frames.all ^= 1;
this->damageType = 90;
- sub_08004488(299);
+ EnqueSFX(299);
}
sub_080AEFE0(this);
if (sub_08003FC4(this, 0x4000) == 0)
@@ -313,7 +313,7 @@ void sub_0801F3AC(Entity* this) {
return;
if (sub_08049FDC(this, 1)) {
- if (this->field_0x82.HALF.LO || sub_08049F64(this, 1, 0x48)) {
+ if (this->field_0x82.HALF.LO || PlayerInRange(this, 1, 0x48)) {
if (this->action == 1) {
this->action = 2;
this->spriteSettings.b.draw = 1;
@@ -377,10 +377,10 @@ void sub_0801F508(Entity* this) {
sub_0801F730(this);
} else {
u8 tmp = ++this->actionDelay & 7;
- if (tmp == 0 && sub_08049F64(this, 1, 0x38)) {
+ if (tmp == 0 && PlayerInRange(this, 1, 0x38)) {
if (Random() & 1) {
this->action = 5;
- sub_0801FBE4(this);
+ Chuchu_JumpAtPlayer(this);
} else {
this->field_0x82.HALF.HI = 120;
sub_0801F730(this);
@@ -389,7 +389,7 @@ void sub_0801F508(Entity* this) {
if (tmp == 4) {
this->direction = sub_08049F84(this, 1);
}
- sub_080AEF88(this);
+ ProcessMovement(this);
GetNextFrame(this);
}
}
@@ -400,7 +400,7 @@ void sub_0801F584(Entity* this) {
if (this->frames.all & 0x1) {
this->frames.all ^= 1;
this->damageType = 91;
- sub_08004488(299);
+ EnqueSFX(299);
}
sub_080AEFE0(this);
if (sub_08003FC4(this, 0x4000) == 0)
@@ -493,7 +493,7 @@ void sub_0801F764(Entity* this) {
if (sub_08049FDC(this, 1)) {
if (this->action == 1) {
- if (this->field_0x82.HALF.LO || sub_08049F64(this, 1, 0x48)) {
+ if (this->field_0x82.HALF.LO || PlayerInRange(this, 1, 0x48)) {
this->action = 2;
this->spriteSettings.b.draw = 1;
this->field_0x82.HALF.LO = 1;
@@ -520,7 +520,7 @@ void sub_0801F7FC(Entity* this) {
if (sub_08049FDC(this, 1) == 0)
return;
- if (this->field_0x82.HALF.LO || sub_08049F64(this, 1, 0x48)) {
+ if (this->field_0x82.HALF.LO || PlayerInRange(this, 1, 0x48)) {
this->action = 2;
this->spriteSettings.b.draw = 1;
this->field_0x82.HALF.LO = 1;
@@ -548,7 +548,7 @@ void sub_0801F884(Entity* this) {
ent->entityType.parameter = 64;
this->action = 4;
this->damageType = 165;
- sub_08004488(0x193);
+ EnqueSFX(0x193);
}
}
}
@@ -562,12 +562,12 @@ void sub_0801F8C0(Entity* this) {
u8 tmp = ++this->actionDelay & 7;
if (tmp == 0 && sub_08049F1C(this, gUnk_020000B0, 0x38)) {
this->action = 5;
- sub_0801FBE4(this);
+ Chuchu_JumpAtPlayer(this);
} else {
if (tmp == 4) {
this->direction = GetFacingDirection(this, gUnk_020000B0);
}
- sub_080AEF88(this);
+ ProcessMovement(this);
GetNextFrame(this);
}
}
@@ -577,7 +577,7 @@ void sub_0801F940(Entity* this) {
if (this->frames.all & 0x10) {
if (this->frames.all & 1) {
this->frames.all ^= 1;
- sub_08004488(299);
+ EnqueSFX(299);
}
sub_080AEFE0(this);
if (sub_08003FC4(this, 0x4000) == 0)
@@ -704,7 +704,7 @@ u32 sub_0801FBD0(Entity* this) {
}
}
-void sub_0801FBE4(Entity* this) {
+void Chuchu_JumpAtPlayer(Entity* this) {
this->nonPlanarMovement = 0x180;
this->field_0x20 = 0x20000;
this->direction = sub_08049F84(this, 1);
@@ -713,7 +713,7 @@ void sub_0801FBE4(Entity* this) {
// clang-format off
void (*const gUnk_080CA21C[])(Entity*) = {
- sub_0801EEE4,
+ Chuchu_OnTick,
sub_0801EF40,
sub_0801F02C,
sub_0801F048,
diff --git a/src/enemy/cuccoChickAggr.c b/src/enemy/cuccoChickAggr.c
index 2fcfcc89..f1169ae7 100644
--- a/src/enemy/cuccoChickAggr.c
+++ b/src/enemy/cuccoChickAggr.c
@@ -49,10 +49,10 @@ void sub_08022988(Entity* this) {
this->frameIndex = 1;
this->field_0x20 = 0x10000;
- sub_08004488(0xd6);
+ EnqueSFX(0xd6);
}
- sub_080AEF88(this);
+ ProcessMovement(this);
if (sub_08003FC4(this, 0x2000) == 0) {
if (--this->actionDelay == 0) {
sub_08022A88(this);
@@ -75,7 +75,7 @@ void sub_080229F8(Entity* this) {
sub_08022B44(this);
} else {
this->field_0x20 = 0x10000;
- sub_08004488(0xd6);
+ EnqueSFX(0xd6);
}
}
}
@@ -88,7 +88,7 @@ void sub_08022A40(Entity* this) {
this->frameIndex = 1;
}
- sub_080AEF88(this);
+ ProcessMovement(this);
if (sub_08003FC4(this, 0x2000) == 0) {
if (--this->actionDelay == 0) {
sub_08022A88(this);
@@ -143,7 +143,7 @@ void sub_08022B44(Entity *this){
if (this->direction & 0xf)
this->spriteSettings.b.flipX = (this->direction >> 4)^1;
- sub_08004488(0xd6);
+ EnqueSFX(0xd6);
}
diff --git a/src/enemy/darkNut.c b/src/enemy/darkNut.c
index f226026f..03c9c91e 100644
--- a/src/enemy/darkNut.c
+++ b/src/enemy/darkNut.c
@@ -17,7 +17,7 @@ u32 sub_080214FC();
void sub_08021540();
void sub_08021600();
void sub_080213B0();
-u32 sub_08049F64();
+u32 PlayerInRange();
u32 sub_0802169C();
void sub_0802124C();
void sub_08021644();
@@ -90,7 +90,7 @@ void sub_08020BB8(Entity* this) {
}
this->action = 10;
sub_08021218(this, 0xb, this->animationState);
- sub_08004488(0x15d);
+ EnqueSFX(0x15d);
sub_08021588(this);
break;
case 0x4c:
@@ -150,7 +150,7 @@ void sub_08020DD4(Entity* this) {
} else {
if (--this->actionDelay == 0)
sub_08021540(this);
- sub_080AEF88(this);
+ ProcessMovement(this);
UpdateAnimationSingleFrame(this);
}
}
@@ -178,13 +178,13 @@ void sub_08020E78(Entity* this) {
}
void sub_08020E98(Entity* this) {
- if (sub_08049F64(this, 1, 0x38)) {
+ if (PlayerInRange(this, 1, 0x38)) {
if (sub_0802169C(this, gUnk_020000B0)) {
this->action = 8;
sub_08021218(this, 7, this->animationState);
} else {
this->direction = GetFacingDirection(gUnk_020000B0, this);
- if (sub_080AEF88(this) == 0) {
+ if (ProcessMovement(this) == 0) {
this->action = 8;
sub_08021218(this, 7, this->animationState);
} else {
@@ -198,7 +198,7 @@ void sub_08020E98(Entity* this) {
sub_08021414(this);
} else {
this->direction = GetFacingDirection(this, gUnk_020000B0);
- sub_080AEF88(this);
+ ProcessMovement(this);
sub_0802124C(this);
sub_08021644(this);
}
@@ -212,7 +212,7 @@ void sub_08020F28(Entity* this) {
}
void sub_08020F48(Entity* this) {
- if (sub_08049F64(this, 1, 0x48)) {
+ if (PlayerInRange(this, 1, 0x48)) {
if (sub_08021664(this, gUnk_020000B0)) {
u32 uVar2 = sub_0804A044(this, gUnk_020000B0, 9);
if (uVar2 == 0xff) {
@@ -273,7 +273,7 @@ void sub_08021038(Entity* this) {
pEVar2->parent = this;
this->attachedEntity = pEVar2;
}
- sub_08004488(270);
+ EnqueSFX(270);
}
if (this->frames.all & 0x80) {
@@ -295,7 +295,7 @@ void sub_080210A8(Entity* this) {
if (this->frames.all & 1) {
this->frames.all = 0;
sub_08021588(this);
- sub_08004488(349);
+ EnqueSFX(349);
} else if (this->frames.all & 0x80) {
sub_08021390(this);
}
@@ -313,12 +313,12 @@ void sub_080210E4(Entity* this) {
this->attachedEntity = ent;
}
- sub_08004488(270);
+ EnqueSFX(270);
}
sub_08021644(this);
if ((this->frames.all & 0x10) &&
- (!sub_080AEF88(this) || (this->attachedEntity && (this->attachedEntity->bitfield & 0x80)))) {
+ (!ProcessMovement(this) || (this->attachedEntity && (this->attachedEntity->bitfield & 0x80)))) {
sub_080213D0(this, 0);
} else {
if (--this->field_0x76.HWORD == 0)
@@ -516,7 +516,7 @@ void sub_08021424(Entity* this) {
sub_080212B0(this);
} else {
this->direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, x, y);
- if (!sub_080AEF88(this)) {
+ if (!ProcessMovement(this)) {
sub_080212B0(this);
} else {
UpdateAnimationSingleFrame(this);
@@ -575,13 +575,13 @@ void sub_0802159C(Entity* this) {
ent->parent = this;
this->attachedEntity = ent;
}
- sub_08004488(0x116);
+ EnqueSFX(0x116);
} else if (this->frames.all == 2) {
this->frames.all = 0;
sub_08021588(this);
} else if (this->frames.all & 0x20) {
this->frames.all &= ~0x20;
- sub_08004488(0x115);
+ EnqueSFX(0x115);
}
}
@@ -596,7 +596,7 @@ void sub_08021600(Entity* this) {
ent->parent = this;
this->attachedEntity = ent;
}
- sub_08004488(0x10e);
+ EnqueSFX(0x10e);
} else if (this->frames.all == 2) {
this->frames.all = 0;
sub_08021588(this);
@@ -606,7 +606,7 @@ void sub_08021600(Entity* this) {
void sub_08021644(Entity* this) {
if (this->frames.all & 0x20) {
this->frames.all &= ~0x20;
- sub_08004488(0x7d);
+ EnqueSFX(0x7d);
}
}
diff --git a/src/enemy/doorMimic.c b/src/enemy/doorMimic.c
index 587ce521..5d5ca031 100644
--- a/src/enemy/doorMimic.c
+++ b/src/enemy/doorMimic.c
@@ -102,7 +102,7 @@ void sub_080220F0(Entity* this) {
fx->y.HALF.HI += off->v;
}
}
- sub_08004488(260);
+ EnqueSFX(260);
} else if (this->frames.all & 1) {
this->field_0x44 = 4;
}
diff --git a/src/enemy/hangingSeed.c b/src/enemy/hangingSeed.c
index cd204a6e..f819287f 100644
--- a/src/enemy/hangingSeed.c
+++ b/src/enemy/hangingSeed.c
@@ -1,14 +1,14 @@
#include "entity.h"
#include "functions.h"
-extern void (*const gUnk_080CB570[])(Entity*);
+extern void (*const gHangingSeedFunctions[])(Entity*);
extern void (*const gUnk_080CB588[])(Entity*);
void HangingSeed(Entity* this) {
- EnemyFunctionHandler(this, gUnk_080CB570);
+ EnemyFunctionHandler(this, gHangingSeedFunctions);
}
-void sub_080216E4(Entity* this) {
+void HangingSeed_OnTick(Entity* this) {
gUnk_080CB588[this->action](this);
}
@@ -20,9 +20,10 @@ void sub_080216FC(Entity* this) {
}
void nullsub_7(Entity* this) {
+ /* ... */
}
-void sub_08021720(Entity* this) {
+void HangingSeed_Initialize(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->frameIndex = this->entityType.form;
@@ -30,12 +31,13 @@ void sub_08021720(Entity* this) {
this->spritePriority.b0 = 3;
}
-void nullsub_08(Entity* this) {
+void HangingSeed_Hang(Entity* this) {
+ /* ... */
}
// clang-format off
-void (*const gUnk_080CB570[])(Entity*) = {
- sub_080216E4,
+void (*const gHangingSeedFunctions[])(Entity*) = {
+ HangingSeed_OnTick,
sub_080216FC,
sub_08001324,
sub_0804A7D4,
@@ -44,8 +46,8 @@ void (*const gUnk_080CB570[])(Entity*) = {
};
void (*const gUnk_080CB588[])(Entity*) = {
- sub_08021720,
- nullsub_08,
+ HangingSeed_Initialize,
+ HangingSeed_Hang,
};
// clang-format on
diff --git a/src/enemy/keaton.c b/src/enemy/keaton.c
index 94c2ab33..afc0e4b6 100644
--- a/src/enemy/keaton.c
+++ b/src/enemy/keaton.c
@@ -34,7 +34,7 @@ void sub_080323DC(Entity* this) {
void sub_080323F4(Entity* this) {
u32 var;
- if ((u8)(this->action - 3) >= 2) {
+ if (this->action != 3 && this->action != 4) {
this->action = 3;
this->actionDelay = 0xC;
var = ((this->field_0x3e + 4) & 0x18) ^ 0x10;
@@ -69,7 +69,7 @@ void sub_0803248C(Entity* this) {
if (this->actionDelay == 0) {
sub_08032650(this);
}
- if (sub_080AEF88(this) == 0) {
+ if (ProcessMovement(this) == 0) {
this->actionDelay = 1;
}
UpdateAnimationSingleFrame(this);
diff --git a/src/enemy/keese.c b/src/enemy/keese.c
index 14f5c520..d73475f3 100644
--- a/src/enemy/keese.c
+++ b/src/enemy/keese.c
@@ -10,31 +10,36 @@ extern void sub_0806F4E8(Entity*);
extern u32 sub_0806F3E4(Entity*);
extern void sub_0804A7D4(Entity*);
extern void sub_0804A720(Entity*);
-extern void sub_08021EF0(Entity*);
+extern void Keese_StartFly(Entity*);
extern void sub_080AEFB4(Entity*);
extern void sub_08021F24(Entity*);
extern u32 sub_0806FCB8(Entity*, s32, s32, u32);
extern u32 sub_08049FA0(Entity*);
extern u32 sub_08049EE4(Entity*);
-extern void (*const gUnk_080CB69C[])(Entity*);
-extern void (*const gUnk_080CB6B4[])(Entity*);
+extern void (*const gKeeseFunctions[])(Entity*);
+extern void (*const gKeeseActions[])(Entity*);
extern void (*const gUnk_080CB6C4[])(Entity*);
-extern const s8 gUnk_080CB6D0[];
-extern const u16 gUnk_080CB6D6[];
-extern const u8 gUnk_080CB6F6[];
+extern const s8 gKeeseSpriteOffsets[];
+extern const u16 gKeeseFlyDurations[];
+extern const u8 gKeeseRestDurations[];
+
+enum {
+ KeeseAnimation_Fly,
+ KeeseAnimation_Rest,
+};
void Keese(Entity* this) {
- gUnk_080CB69C[GetNextFunction(this)](this);
+ gKeeseFunctions[GetNextFunction(this)](this);
}
-void sub_08021D80(Entity* this) {
- gUnk_080CB6B4[this->action](this);
+void Keese_OnTick(Entity* this) {
+ gKeeseActions[this->action](this);
}
void sub_08021d98(Entity* this) {
- sub_0804AA30(this, gUnk_080CB69C);
+ sub_0804AA30(this, gKeeseFunctions);
}
void sub_08021DA8(Entity* this) {
@@ -57,10 +62,9 @@ void sub_08021DDC(Entity* this) {
}
}
-void sub_08021DF0(Entity* this) {
-
+void Keese_Initialize(Entity* this) {
sub_0804A720(this);
- if ((this->entityType).form != 0) {
+ if (this->entityType.form != 0) {
this->spritePriority.b1 = 1;
this->height.HALF.HI = -0x10;
}
@@ -69,15 +73,15 @@ void sub_08021DF0(Entity* this) {
this->spritePriority.b0 = 3;
this->collisionLayer = 3;
UpdateSpriteForCollisionLayer(this);
- sub_08021EF0(this);
+ Keese_StartFly(this);
}
-void sub_08021E4C(Entity* this) {
+void Keese_Fly(Entity* this) {
if (this->field_0x78.HWORD != 0) {
this->field_0x78.HWORD--;
}
if (this->field_0x7a.HWORD != 0) {
- (this->field_0x7a.HWORD)--;
+ this->field_0x7a.HWORD--;
}
GetNextFrame(this);
if ((this->frames.b.f3) != 0) {
@@ -85,62 +89,54 @@ void sub_08021E4C(Entity* this) {
} else {
sub_080AEFB4(this);
}
- this->spriteOffsetY = gUnk_080CB6D0[this->frames.all];
+ this->spriteOffsetY = gKeeseSpriteOffsets[this->frames.all];
}
-void sub_08021EA4(Entity* this) {
+void Keese_Rest(Entity* this) {
if (--this->actionDelay == 0) {
- sub_08021EF0(this);
+ Keese_StartFly(this);
}
}
-void sub_08021EBC(Entity* this) {
- s32 iVar1;
-
+void Keese_Sleep(Entity* this) {
if (this->actionDelay != 0) {
this->actionDelay--;
} else {
- iVar1 = sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x70);
- if (iVar1 != 0) {
- sub_08021EF0(this);
- }
+ if (sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x70))
+ Keese_StartFly(this);
}
}
-void sub_08021EF0(Entity* this) {
- u32 uVar1;
-
+void Keese_StartFly(Entity* this) {
this->action = 1;
- this->field_0x78.HWORD = gUnk_080CB6D6[Random() & 0xf];
- this->field_0x7a.HWORD = 0x3c;
- InitializeAnimation(this, 0);
+ this->field_0x78.HWORD = gKeeseFlyDurations[Random() & 0xf];
+ this->field_0x7a.HWORD = 60;
+ InitializeAnimation(this, KeeseAnimation_Fly);
}
void sub_08021F24(Entity* this) {
- u32 bVar1;
-
if (this->field_0x78.HWORD == 0) {
this->action = 2;
- this->actionDelay = gUnk_080CB6F6[Random() & 0xf];
- InitializeAnimation(this, 1);
+ this->actionDelay = gKeeseRestDurations[Random() & 0xf];
+ InitializeAnimation(this, KeeseAnimation_Rest);
} else if (!this->field_0x7a.HWORD &&
!(sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x70))) {
this->action = 3;
- this->actionDelay = 0x1e;
- InitializeAnimation(this, 1);
+ this->actionDelay = 30;
+ InitializeAnimation(this, KeeseAnimation_Rest);
} else {
if (sub_08049FA0(this) != 0) {
this->direction = Random() & 0x1f;
} else {
this->direction = sub_08049EE4(this);
}
- InitializeAnimation(this, 0);
+ InitializeAnimation(this, KeeseAnimation_Fly);
}
}
// clang-format off
-void (*const gUnk_080CB69C[])(Entity*) = {
- sub_08021D80,
+void (*const gKeeseFunctions[])(Entity*) = {
+ Keese_OnTick,
sub_08021d98,
sub_08001328,
sub_0804A7D4,
@@ -148,11 +144,11 @@ void (*const gUnk_080CB69C[])(Entity*) = {
sub_08021DA8,
};
-void (*const gUnk_080CB6B4[])(Entity*) = {
- sub_08021DF0,
- sub_08021E4C,
- sub_08021EA4,
- sub_08021EBC,
+void (*const gKeeseActions[])(Entity*) = {
+ Keese_Initialize,
+ Keese_Fly,
+ Keese_Rest,
+ Keese_Sleep,
};
void (*const gUnk_080CB6C4[])(Entity*) = {
@@ -161,16 +157,16 @@ void (*const gUnk_080CB6C4[])(Entity*) = {
sub_08021DDC,
};
-const s8 gUnk_080CB6D0[] = {
+const s8 gKeeseSpriteOffsets[] = {
1, -2, -5, -2, 1, 0,
};
-const u16 gUnk_080CB6D6[] = {
+const u16 gKeeseFlyDurations[] = {
180, 180, 300, 300, 300, 300, 300, 300,
480, 480, 480, 480, 480, 480, 720, 720,
};
-const u8 gUnk_080CB6F6[] = {
+const u8 gKeeseRestDurations[] = {
30, 30, 45, 45, 45, 45, 45, 45,
60, 60, 60, 60, 60, 60, 75, 75,
};
diff --git a/src/enemy/lakitu.c b/src/enemy/lakitu.c
index 585ec102..b4bbc198 100644
--- a/src/enemy/lakitu.c
+++ b/src/enemy/lakitu.c
@@ -50,7 +50,7 @@ extern u32 sub_080041A0(Entity *, Entity *, u32, u32);
extern u32 GetFacingDirection(Entity *, Entity *);
// sub_0803CB64
-extern void sub_08004488(u32);
+extern void EnqueSFX(u32);
typedef struct {
s8 x;
@@ -344,7 +344,7 @@ void sub_0803CB64(Entity *this) {
PositionRelative(this, cloud, offset->x << 16, offset->y << 16);
- sub_08004488(0x193);
+ EnqueSFX(0x193);
}
void sub_0803CBAC(Entity *this) {
diff --git a/src/enemy/leever.c b/src/enemy/leever.c
index 2a3b621f..959d8617 100644
--- a/src/enemy/leever.c
+++ b/src/enemy/leever.c
@@ -8,27 +8,39 @@ extern void sub_0804AA30(Entity*, void (*const func[])(Entity*));
extern void sub_0804A7D4(Entity*);
extern Entity* CreateDeathFx(Entity*, u32, u32);
extern void sub_0804A720(Entity*);
-bool32 sub_0801FE68(Entity*, s32);
-extern void sub_0801FED4(Entity*);
extern u32 sub_080002D4(s32, s32, u32);
extern u32 sub_080002BC(s32, s32, u32);
extern u32 sub_08049FDC(Entity*, u32);
-bool32 sub_0801FDE4(Entity*, s32, s32);
-extern void (*const gUnk_080CA49C[])(Entity*);
-extern void (*const gUnk_080CA4B4[])(Entity*);
extern Entity* gUnk_020000B0;
-extern const u8 gUnk_080CA4C8[];
-extern const u16 gUnk_080CA4CA[];
extern s16 gSineTable[];
+bool32 Leever_PlayerInRange(Entity*, s32);
+void Leever_Move(Entity*);
+
+extern void (*const gLeeverFunctions[])(Entity*);
+extern void (*const gLeeverActions[])(Entity*);
+extern const s8 gLeeverDrift[];
+extern const u16 gUnk_080CA4CA[];
+
+enum {
+ LeeverAnimation_DigUp,
+ LeeverAnimation_DigDown,
+ LeeverAnimation_Attack,
+};
+
+enum {
+ LeeverForm_Red,
+ LeeverForm_Blue,
+};
+
void Leever(Entity* this) {
- EnemyFunctionHandler(this, gUnk_080CA49C);
+ EnemyFunctionHandler(this, gLeeverFunctions);
SetChildOffset(this, 0, 1, -0x10);
}
-void sub_0801FC28(Entity* this) {
- gUnk_080CA4B4[this->action](this);
+void Leever_OnTick(Entity* this) {
+ gLeeverActions[this->action](this);
}
void sub_0801FC40(Entity* this) {
@@ -41,30 +53,30 @@ void sub_0801FC40(Entity* this) {
sub_0804A9FC(this, 0x1c);
}
}
- sub_0804AA30(this, gUnk_080CA49C);
+ sub_0804AA30(this, gLeeverFunctions);
}
void sub_0801FC7C(Entity* this) {
- if ((this->entityType).form == 0) {
+ if (this->entityType.form == LeeverForm_Red) {
sub_0804A7D4(this);
} else {
CreateDeathFx(this, 0xf1, 0);
}
}
-void sub_0801FC9C(Entity* this) {
+void Leever_Initialize(Entity* this) {
sub_0804A720(this);
this->action = 1;
this->actionDelay = Random();
}
-void sub_0801FCB0(Entity* this) {
+void Leever_Idle(Entity* this) {
if (--this->actionDelay == 0) {
- if (sub_0801FE68(this, Random() & 0x1f) != 0) {
+ if (Leever_PlayerInRange(this, Random() & 0x1f)) {
this->action = 2;
this->spriteSettings.b.draw = TRUE;
- this->direction = (GetFacingDirection(this, gUnk_020000B0) + gUnk_080CA4C8[Random() & 1]) & 0x1f;
- InitializeAnimation(this, 0);
+ this->direction = (GetFacingDirection(this, gUnk_020000B0) + gLeeverDrift[Random() & 1]) & 0x1f;
+ InitializeAnimation(this, LeeverAnimation_DigUp);
UpdateSpriteForCollisionLayer(this);
} else {
this->actionDelay = (Random() & 0x18) + 8;
@@ -72,38 +84,36 @@ void sub_0801FCB0(Entity* this) {
}
}
-void sub_0801FD2C(Entity* this) {
-
+void Leever_DigUp(Entity* this) {
GetNextFrame(this);
if (this->frames.b.f3 != 0) {
this->action = 3;
- if (this->entityType.form == 0) {
- this->field_0x74.HWORD = 0xb4;
+ if (this->entityType.form == LeeverForm_Red) {
+ this->field_0x74.HWORD = 180;
} else {
- this->field_0x74.HWORD = 0x6e;
+ this->field_0x74.HWORD = 110;
}
- InitializeAnimation(this, 2);
+ InitializeAnimation(this, LeeverAnimation_Attack);
} else if (this->frames.b.f0 != 0) {
this->frames.all &= 0xfe;
this->flags |= 0x80;
}
}
-void sub_0801FD80(Entity* this) {
-
- sub_0801FED4(this);
+void Leever_Attack(Entity* this) {
+ Leever_Move(this);
GetNextFrame(this);
if (--this->field_0x74.HWORD == 0) {
this->action = 4;
this->flags &= 0x7f;
- InitializeAnimation(this, 1);
+ InitializeAnimation(this, LeeverAnimation_DigDown);
}
}
-void sub_0801FDB4(Entity* this) {
- sub_0801FED4(this);
+void Leever_DigDown(Entity* this) {
+ Leever_Move(this);
GetNextFrame(this);
if ((this->frames.b.f3) != 0) {
this->action = 1;
@@ -132,7 +142,7 @@ u32 sub_0801FDE4(Entity* ent, s32 x, s32 y) {
}
}
-bool32 sub_0801FE68(Entity* ent, s32 arg2) {
+bool32 Leever_PlayerInRange(Entity* ent, s32 arg2) {
s32 sin, cos;
s32 x, y;
u32 i;
@@ -157,48 +167,46 @@ bool32 sub_0801FE68(Entity* ent, s32 arg2) {
extern u32 sub_0800132C(Entity*, Entity*);
-void sub_0801FED4(Entity* this) {
- s16 sVar2;
-
+void Leever_Move(Entity* this) {
if (sub_08049FDC(this, 1) == 0) {
this->field_0x74.HWORD = 1;
}
- sVar2 = (this->frames.all & 0xf) * 0x20;
- this->nonPlanarMovement = sVar2;
- if (this->entityType.form == 0) {
+
+ this->nonPlanarMovement = (this->frames.all & 0xf) * 0x20;
+ if (this->entityType.form == LeeverForm_Red) {
if ((this->field_0xf++ & 0xf) == 0) {
sub_08004596(this, sub_0800132C(this, gUnk_020000B0));
}
} else {
- this->nonPlanarMovement = sVar2 + 0x40;
+ this->nonPlanarMovement += 0x40;
if ((this->field_0xf++ & 0x7) == 0) {
sub_08004596(this, sub_0800132C(this, gUnk_020000B0));
}
}
- sub_080AEF88(this);
+
+ ProcessMovement(this);
}
// clang-format off
-void (*const gUnk_080CA49C[])(Entity*) = {
- sub_0801FC28,
+void (*const gLeeverFunctions[])(Entity*) = {
+ Leever_OnTick,
sub_0801FC40,
sub_08001324,
sub_0801FC7C,
sub_08001242,
- sub_0801FC28,
+ Leever_OnTick,
};
-void (*const gUnk_080CA4B4[])(Entity*) = {
- sub_0801FC9C,
- sub_0801FCB0,
- sub_0801FD2C,
- sub_0801FD80,
- sub_0801FDB4,
+void (*const gLeeverActions[])(Entity*) = {
+ Leever_Initialize,
+ Leever_Idle,
+ Leever_DigUp,
+ Leever_Attack,
+ Leever_DigDown,
};
-const u8 gUnk_080CA4C8[] = {
- 0x06,
- 0xFA,
+const s8 gLeeverDrift[] = {
+ 6, -6,
};
const u16 gUnk_080CA4CA[] = {
diff --git a/src/enemy/miniSlime.c b/src/enemy/miniSlime.c
index 64c9c089..70b1a029 100644
--- a/src/enemy/miniSlime.c
+++ b/src/enemy/miniSlime.c
@@ -87,7 +87,7 @@ void sub_080452FC(Entity *this) {
}
void sub_08045374(Entity* this) {
- sub_080AEF88(this);
+ ProcessMovement(this);
GetNextFrame(this);
if (--this->actionDelay == 0)
this->action = 1;
diff --git a/src/enemy/moldorm.c b/src/enemy/moldorm.c
index 530eeae1..3338a15a 100644
--- a/src/enemy/moldorm.c
+++ b/src/enemy/moldorm.c
@@ -96,7 +96,7 @@ void sub_08022D40(Entity* this) {
}
} else {
sub_08022F14(this);
- sub_080AEF88(this);
+ ProcessMovement(this);
if (this->collisions) {
sub_0800417E(this, this->collisions);
diff --git a/src/enemy/octorok.c b/src/enemy/octorok.c
index 90e53a23..3b9fe027 100644
--- a/src/enemy/octorok.c
+++ b/src/enemy/octorok.c
@@ -6,24 +6,25 @@ extern void EnemyFunctionHandler();
extern void SetChildOffset();
extern void sub_0804AA30();
extern void sub_0804A7D4();
-extern void sub_0801ECFC();
extern u32 sub_0806F520();
extern void sub_0806F4E8();
extern void UpdateAnimationVariableFrames();
extern void sub_0804A720();
extern u32 Random();
-extern void sub_0801ED14();
-extern u32 sub_0801EDEC();
extern Entity* sub_08049DF4(u32);
+void Octorok_Pause();
+bool32 Octorok_FacesPlayer();
+void Octorok_Turn();
+
extern void (*const gOctorok[6])(Entity*);
-extern void (*const gOctorokIdle[4])(Entity*);
+extern void (*const gOctorokActions[4])(Entity*);
extern void (*const gUnk_080CA158[6])(Entity*);
extern Entity* gUnk_020000B0;
-extern const u8 gUnk_080CA170[4];
-extern const u8 gUnk_080CA174[2];
-extern const u8 gUnk_080CA176[8];
+extern const u8 gOctorokWalkDuration[4];
+extern const u8 gOctorokSpitChanceModifier[2];
+extern const u8 gOctorokNutOffset[8];
extern const s8 gUnk_080CA17E[2];
// Main
@@ -33,8 +34,8 @@ void Octorok(Entity* this) {
}
// Idle
-void sub_0801EAD0(Entity* this) {
- gOctorokIdle[this->action](this);
+void Octorok_OnTick(Entity* this) {
+ gOctorokActions[this->action](this);
}
// Touch player
@@ -47,7 +48,7 @@ void sub_0801EAE8(Entity* this) {
// Death
void sub_0801EB0C(Entity* this) {
- if ((this->entityType).form == 0) {
+ if (this->entityType.form == 0) {
sub_0804A7D4(this);
} else {
CreateDeathFx(this, 241, 0);
@@ -55,10 +56,8 @@ void sub_0801EB0C(Entity* this) {
}
void sub_0801EB2C(Entity* this) {
- s32 iVar1;
-
- if ((this->previousActionFlag < 3) && (iVar1 = sub_0806F520(this), iVar1 == 0)) {
- sub_0801ECFC(this);
+ if (this->previousActionFlag < 3 && !sub_0806F520(this)) {
+ Octorok_Pause(this);
InitializeAnimation(this, this->animationState);
} else {
gUnk_080CA158[this->previousActionFlag](this);
@@ -84,6 +83,7 @@ void sub_0801EB84(Entity* this) {
}
void nullsub_3(Entity* this) {
+ /* ... */
}
void sub_0801EB9C(Entity* this) {
@@ -96,7 +96,7 @@ void sub_0801EB9C(Entity* this) {
}
// Init
-void sub_0801EBC8(Entity* this) {
+void Octorok_Initialize(Entity* this) {
sub_0804A720(this);
if (this->entityType.form == 2) {
this->animationState = this->entityType.form;
@@ -104,105 +104,103 @@ void sub_0801EBC8(Entity* this) {
this->animationState = Random() & 3;
}
this->field_0x1c = 18;
- sub_0801ECFC(this);
+ Octorok_Pause(this);
InitializeAnimation(this, this->animationState);
}
-void sub_0801EBF4(Entity* this) {
- u32 uVar2;
-
+void Octorok_Idle(Entity* this) {
if (--this->actionDelay == 0) {
this->action = 2;
- uVar2 = Random();
- this->actionDelay = gUnk_080CA170[uVar2 & 3];
- sub_0801ED14(this);
+ this->actionDelay = gOctorokWalkDuration[Random() & 3];
+ Octorok_Turn(this);
}
GetNextFrame(this);
}
-void sub_0801EC2C(Entity* this) {
- sub_080AEF88(this);
+void Octorok_Move(Entity* this) {
+ ProcessMovement(this);
GetNextFrame(this);
if (--this->actionDelay == 0) {
- if (sub_0801EDEC(this) && gUnk_080CA174[this->entityType.form] <= (Random() & 3)) {
+ if (Octorok_FacesPlayer(this) && gOctorokSpitChanceModifier[this->entityType.form] <= (Random() & 3)) {
this->action = 3;
InitializeAnimation(this, this->animationState + 4);
} else {
- sub_0801ECFC(this);
+ Octorok_Pause(this);
}
}
}
-void sub_0801EC80(Entity* this) {
+void Octorok_ShootNut(Entity* this) {
GetNextFrame(this);
if (this->frames.all & 1) {
Entity* ent = sub_0804A98C(this, 1, 0);
if (ent) {
const s8* off;
ent->direction = this->direction;
- off = &gUnk_080CA176[this->direction / 4];
+ off = &gOctorokNutOffset[this->direction / 4];
ent->x.HALF.HI += off[0];
ent->y.HALF.HI += off[1];
ent->height.HALF.HI = -3;
this->frames.all &= 0xfe;
- sub_08004488(0x18d);
+ EnqueSFX(0x18d);
}
}
if (this->frames.all & 0x80)
- sub_0801ECFC(this);
+ Octorok_Pause(this);
}
-void sub_0801ECFC(Entity* this) {
+void Octorok_Pause(Entity* this) {
this->action = 1;
this->actionDelay = (Random() & 0x38) + 0x18;
}
-void sub_0801ED14(Entity* this) {
+void Octorok_Turn(Entity* this) {
if (this->entityType.form != 2) {
if (sub_08049FA0(this)) {
if (this->entityType.form == 1 && (Random() & 3) == 0 && sub_08049FDC(this, 1)) {
- this->direction = (GetFacingDirection(this, gUnk_020000B0) + 4) & 0x18;
+ this->direction = DirectionRoundUp(GetFacingDirection(this, gUnk_020000B0));
} else {
- this->direction = Random() & 0x18;
+ this->direction = DirectionRound(Random());
}
- } else if ((Random() & 3)) {
- this->direction = (sub_08049EE4(this) + gUnk_080CA17E[Random() & 1]) & 0x18;
+ } else if (Random() & 3) {
+ this->direction = DirectionRound(sub_08049EE4(this) + gUnk_080CA17E[Random() & 1]);
} else {
- this->direction = Random() & 0x18;
+ this->direction = DirectionRound(Random());
}
} else {
if (sub_08049FDC(this, 1) == 0) {
if (sub_08049FA0(this)) {
- this->direction = Random() & 0x18;
+ this->direction = DirectionRound(Random());
} else if (Random() & 3) {
- this->direction = (sub_08049EE4(this) + gUnk_080CA17E[Random() & 1]) & 0x18;
+ this->direction = DirectionRound(sub_08049EE4(this) + gUnk_080CA17E[Random() & 1]);
} else {
- this->direction = (GetFacingDirection(this, gUnk_020000B0) + 4) & 0x18;
+ this->direction = DirectionRoundUp(GetFacingDirection(this, gUnk_020000B0));
}
} else {
- this->direction = (GetFacingDirection(this, gUnk_020000B0) + 4) & 0x18;
+ this->direction = DirectionRoundUp(GetFacingDirection(this, gUnk_020000B0));
}
}
+
this->animationState = this->direction >> 3;
InitializeAnimation(this, this->animationState);
}
-u32 sub_0801EDEC(Entity* this) {
+bool32 Octorok_FacesPlayer(Entity* this) {
Entity* ent = sub_08049DF4(1);
if (ent == NULL)
- return 0;
+ return FALSE;
- if (((GetFacingDirection(this, ent) + 4) & 0x18) != this->direction)
- return 0;
+ if (DirectionRoundUp(GetFacingDirection(this, ent)) != this->direction)
+ return FALSE;
- return 1;
+ return TRUE;
}
// clang-format off
void (*const gOctorok[])(Entity*) = {
- sub_0801EAD0,
+ Octorok_OnTick,
sub_0801EAE8,
sub_08001324,
sub_0801EB0C,
@@ -210,11 +208,11 @@ void (*const gOctorok[])(Entity*) = {
sub_0801EB2C,
};
-void (*const gOctorokIdle[])(Entity*) = {
- sub_0801EBC8,
- sub_0801EBF4,
- sub_0801EC2C,
- sub_0801EC80,
+void (*const gOctorokActions[])(Entity*) = {
+ Octorok_Initialize,
+ Octorok_Idle,
+ Octorok_Move,
+ Octorok_ShootNut,
};
void (*const gUnk_080CA158[])(Entity*) = {
@@ -226,31 +224,19 @@ void (*const gUnk_080CA158[])(Entity*) = {
sub_0801EB9C,
};
-const u8 gUnk_080CA170[] = {
- 30,
- 60,
- 60,
- 90,
+const u8 gOctorokWalkDuration[] = {
+ 30, 60, 60, 90,
};
-const u8 gUnk_080CA174[] = {
- 1,
- 0,
+const u8 gOctorokSpitChanceModifier[] = {
+ 1, 0,
};
-const u8 gUnk_080CA176[] = {
- 0x00,
- 0xFD,
- 0x04,
- 0x00,
- 0x00,
- 0x02,
- 0xFC,
- 0x00,
+const u8 gOctorokNutOffset[] = {
+ 0, -3, 4, 0, 0, 2, -4, 0,
};
const s8 gUnk_080CA17E[] = {
- 0x04,
- 0xFC,
+ 4, -4,
};
// clang-format on
diff --git a/src/enemy/peahat.c b/src/enemy/peahat.c
index 728a7837..66ff3199 100644
--- a/src/enemy/peahat.c
+++ b/src/enemy/peahat.c
@@ -1,12 +1,12 @@
#include "entity.h"
#include "functions.h"
-extern void (*const gUnk_080CA570[])(Entity*);
-extern void (*const gUnk_080CA588[])(Entity*);
-extern void (*const gUnk_080CA590[])(Entity*);
+extern void (*const gPeahatFunctions[])(Entity*);
+extern void (*const gPeahatPropellerFunctions[])(Entity*);
+extern void (*const gPeahatActions[])(Entity*);
extern void (*const gUnk_080CA5BC[])(Entity*);
-extern const s8 gUnk_080CA5B8[];
+extern const s8 gPeahatFlightHeights[];
extern const s8 gUnk_080CA5D4[];
void sub_080205F8(Entity*);
@@ -18,45 +18,59 @@ extern void sub_0804AA1C(Entity*);
extern Entity* gUnk_020000B0;
+enum {
+ PeahatForm_Torso,
+ PeahatForm_Propeller,
+};
+
+enum {
+ PeahatAnimation_Flying,
+ PeahatAnimation_BrokenPropeller,
+ PeahatAnimation_SlicedPropeller,
+ PeahatAnimation_Propeller,
+ PeahatAnimation_NewPropeller,
+ PeahatAnimation_RepairPropeller,
+};
+
void Peahat(Entity* this) {
- if (this->entityType.form == 0) {
- EnemyFunctionHandler(this, gUnk_080CA570);
+ if (this->entityType.form == PeahatForm_Torso) {
+ EnemyFunctionHandler(this, gPeahatFunctions);
SetChildOffset(this, 0, 1, -0x10);
} else {
- gUnk_080CA588[this->action](this);
+ gPeahatPropellerFunctions[this->action](this);
}
}
-void sub_0801FF9C(Entity* this) {
- gUnk_080CA590[this->action](this);
+void Peahat_OnTick(Entity* this) {
+ gPeahatActions[this->action](this);
if (this->field_0x80.HALF.HI)
- this->height.HALF.HI = gUnk_080CA5B8[(this->field_0xf++ & 0x30) >> 4];
+ this->height.HALF.HI = gPeahatFlightHeights[(this->field_0xf++ & 0x30) >> 4];
}
void sub_0801FFDC(Entity* this) {
if (this->field_0x82.HALF.LO) {
if (this->bitfield == 0x94) {
- Entity* ent = CreateEnemy(3, 1);
+ Entity* ent = CreateEnemy(3, PeahatForm_Propeller);
if (ent) {
CopyPosition(this, ent);
ent->height.HALF.HI -= 8;
}
this->field_0x82.HALF.LO = 0;
- this->animationState = 2;
+ this->animationState = PeahatAnimation_SlicedPropeller;
this->action = 5;
this->nonPlanarMovement = 0x80;
this->hurtBlinkTime = -30;
this->field_0x80.HALF.HI = 0;
InitializeAnimation(this, this->animationState);
} else if (this->bitfield == 0x9b) {
- this->animationState = 1;
+ this->animationState = PeahatAnimation_BrokenPropeller;
this->action = 5;
this->nonPlanarMovement = 0x80;
this->hurtBlinkTime = -30;
this->field_0x80.HALF.HI = 0;
InitializeAnimation(this, this->animationState);
} else if (this->bitfield == 0x80) {
- if (this->animationState == 0) {
+ if (this->animationState == PeahatAnimation_Flying) {
this->action = 1;
this->actionDelay = 30;
this->nonPlanarMovement = 0x80;
@@ -70,7 +84,7 @@ void sub_0801FFDC(Entity* this) {
if (this->field_0x43)
sub_0804A9FC(this, 0x1c);
- sub_0804AA30(this, gUnk_080CA570);
+ sub_0804AA30(this, gPeahatFunctions);
}
void sub_08020088(Entity* this) {
@@ -83,8 +97,8 @@ void sub_08020088(Entity* this) {
void sub_080200B4(Entity* this) {
this->previousActionFlag = 1;
this->field_0x1d = 60;
- if (this->animationState == 0) {
- this->animationState = 1;
+ if (this->animationState == PeahatAnimation_Flying) {
+ this->animationState = PeahatAnimation_BrokenPropeller;
this->action = 5;
this->damageType = 0x71;
this->field_0x80.HALF.HI = 0;
@@ -116,7 +130,7 @@ void sub_08020104(Entity* this) {
}
}
-void sub_08020130(Entity* this) {
+void Peahat_Initialize(Entity* this) {
sub_0804A720(this);
this->action = 1;
this->actionDelay = 16;
@@ -126,11 +140,11 @@ void sub_08020130(Entity* this) {
this->field_0x80.HALF.LO = (Random() & 1) ? 2 : -2;
this->field_0x80.HALF.HI = 1;
this->field_0x82.HALF.LO = 1;
- this->animationState = 0;
- InitializeAnimation(this, 0);
+ this->animationState = PeahatAnimation_Flying;
+ InitializeAnimation(this, this->animationState);
}
-void sub_08020180(Entity* this) {
+void Peahat_Fly(Entity* this) {
if (this->field_0x82.HALF.HI)
this->field_0x82.HALF.HI--;
@@ -155,7 +169,7 @@ void sub_08020180(Entity* this) {
GetNextFrame(this);
}
-void sub_08020220(Entity* this) {
+void Peahat_ChargeStart(Entity* this) {
if (sub_08049FDC(this, 1)) {
if (--this->actionDelay) {
UpdateAnimationVariableFrames(this, 4 - ((this->actionDelay >> 4) & 0x3));
@@ -173,7 +187,7 @@ void sub_08020220(Entity* this) {
UpdateAnimationVariableFrames(this, 4);
}
-void sub_08020294(Entity* this) {
+void Peahat_ChargeTarget(Entity* this) {
if (sub_08049FDC(this, 1)) {
if (--this->actionDelay == 0) {
sub_080205F8(this);
@@ -192,7 +206,7 @@ void sub_08020294(Entity* this) {
UpdateAnimationVariableFrames(this, 4);
}
-void sub_08020308(Entity* this) {
+void Peahat_ChargeEnd(Entity* this) {
if (--this->actionDelay == 0) {
this->action = 1;
this->actionDelay = 1;
@@ -208,32 +222,35 @@ void sub_08020308(Entity* this) {
}
}
-void sub_08020350(Entity* this) {
- if (this->animationState != 2) {
- if (sub_080044EC(this, 0x1800) == 0) {
- this->action = 6;
- this->actionDelay = -0x10;
- this->field_0xf = 10;
- this->damageType = 113;
- }
+void Peahat_Stunned(Entity* this) {
+ switch (this->animationState) {
+ default:
+ if (sub_080044EC(this, 0x1800) == 0) {
+ this->action = 6;
+ this->actionDelay = 240;
+ this->field_0xf = 10;
+ this->damageType = 0x71;
+ }
- if (this->direction == 0xff)
- this->direction = this->field_0x3e;
+ if (this->direction == 0xff)
+ this->direction = this->field_0x3e;
- sub_080AEF88(this);
- GetNextFrame(this);
- } else {
- sub_08003FC4(this, 0x1c00);
- if (this->height.HALF.HI == 0) {
- this->action = 7;
- this->actionDelay = -106;
- this->field_0xf = 10;
- this->damageType = 113;
- }
- }
+ ProcessMovement(this);
+ GetNextFrame(this);
+ break;
+ case PeahatAnimation_SlicedPropeller:
+ sub_08003FC4(this, 0x1c00);
+ if (this->height.HALF.HI == 0) {
+ this->action = 7;
+ this->actionDelay = 150;
+ this->field_0xf = 10;
+ this->damageType = 0x71;
+ }
+ break;
+ };
}
-void sub_080203C0(Entity* this) {
+void Peahat_RepairPropeller(Entity* this) {
if (this->field_0xf)
if (--this->field_0xf == 0)
sub_0804A9FC(this, 0x1c);
@@ -245,11 +262,11 @@ void sub_080203C0(Entity* this) {
this->field_0x20 = 0x18000;
this->direction = Random() & 0x1f;
sub_0804AA1C(this);
- this->animationState = 5;
- InitializeAnimation(this, 5);
+ this->animationState = PeahatAnimation_RepairPropeller;
+ InitializeAnimation(this, this->animationState);
}
-void sub_0802041C(Entity* this) {
+void Peahat_Recover(Entity* this) {
if (this->field_0xf)
if (--this->field_0xf == 0)
sub_0804A9FC(this, 0x1c);
@@ -258,58 +275,56 @@ void sub_0802041C(Entity* this) {
return;
this->action = 8;
- this->actionDelay = -16;
+ this->actionDelay = 240;
this->direction = Random() & 0x1f;
sub_0804AA1C(this);
}
-void sub_08020468(Entity* this) {
+void Peahat_Hop(Entity* this) {
GetNextFrame(this);
if (--this->actionDelay == 0) {
if (this->frames.all & 0x80) {
this->action = 9;
this->field_0x20 = 0x18000;
- this->animationState = 4;
- InitializeAnimation(this, 4);
+ this->animationState = PeahatAnimation_NewPropeller;
+ InitializeAnimation(this, this->animationState);
} else {
this->actionDelay = 1;
}
}
if (this->frames.all & 2) {
- this->frames.all &= 0xfd;
+ this->frames.all &= ~2;
this->direction = Random() & 0x1f;
}
if (this->frames.all & 1) {
sub_0800442E(this);
} else {
- sub_080AEF88(this);
+ ProcessMovement(this);
}
}
-void sub_080204E0(Entity* this) {
+void Peahat_Takeoff(Entity* this) {
GetNextFrame(this);
if (this->frames.all & 0x80) {
this->action = 1;
this->damageType = 0x70;
this->field_0x82.HALF.LO = 1;
this->field_0x80.HALF.HI = 1;
- this->animationState = 0;
- InitializeAnimation(this, 0);
+ this->animationState = PeahatAnimation_Flying;
+ InitializeAnimation(this, this->animationState);
+ } else if (this->frames.all & 1) {
+ sub_0800442E(this);
} else {
- if (this->frames.all & 1) {
- sub_0800442E(this);
- } else {
- sub_08003FC4(this, 0x1c00);
- sub_080AEF88(this);
- }
+ sub_08003FC4(this, 0x1c00);
+ ProcessMovement(this);
}
}
-void sub_0802053C(Entity* this) {
+void PeahatPropeller_Initialize(Entity* this) {
this->action = 1;
- this->actionDelay = -16;
+ this->actionDelay = 240;
this->field_0xf = 40;
this->spriteSettings.b.draw = 1;
this->spriteRendering.b3 = 1;
@@ -317,12 +332,12 @@ void sub_0802053C(Entity* this) {
this->spriteSettings.b.shadow = 0;
this->nonPlanarMovement = 0x20;
this->direction = (Random() & 0x10) + 8;
- InitializeAnimation(this, 3);
+ InitializeAnimation(this, PeahatAnimation_Propeller);
}
-void sub_08020590(Entity* this) {
+void PeahatPropeller_Fly(Entity* this) {
GetNextFrame(this);
- if (--this->actionDelay == '\0') {
+ if (--this->actionDelay == 0) {
DeleteEntity(this);
} else {
if (this->actionDelay < 60)
@@ -354,8 +369,8 @@ void sub_08020604(Entity *this){
// clang-format off
-void (*const gUnk_080CA570[])(Entity*) = {
- sub_0801FF9C,
+void (*const gPeahatFunctions[])(Entity*) = {
+ Peahat_OnTick,
sub_0801FFDC,
sub_08001324,
sub_0804A7D4,
@@ -363,29 +378,26 @@ void (*const gUnk_080CA570[])(Entity*) = {
sub_08020088,
};
-void (*const gUnk_080CA588[])(Entity*) = {
- sub_0802053C,
- sub_08020590,
+void (*const gPeahatPropellerFunctions[])(Entity*) = {
+ PeahatPropeller_Initialize,
+ PeahatPropeller_Fly,
};
-void (*const gUnk_080CA590[])(Entity*) = {
- sub_08020130,
- sub_08020180,
- sub_08020220,
- sub_08020294,
- sub_08020308,
- sub_08020350,
- sub_080203C0,
- sub_0802041C,
- sub_08020468,
- sub_080204E0,
+void (*const gPeahatActions[])(Entity*) = {
+ Peahat_Initialize,
+ Peahat_Fly,
+ Peahat_ChargeStart,
+ Peahat_ChargeTarget,
+ Peahat_ChargeEnd,
+ Peahat_Stunned,
+ Peahat_RepairPropeller,
+ Peahat_Recover,
+ Peahat_Hop,
+ Peahat_Takeoff,
};
-const s8 gUnk_080CA5B8[] = {
- -5,
- -6,
- -7,
- -6,
+const s8 gPeahatFlightHeights[] = {
+ -5, -6, -7, -6,
};
void (*const gUnk_080CA5BC[])(Entity*) = {
@@ -396,5 +408,11 @@ void (*const gUnk_080CA5BC[])(Entity*) = {
nullsub_5,
sub_08020104,
};
+
+/* Alignment issue
+const s8 gUnk_080CA5D4[] = {
+ 4, -4,
+};
+*/
// clang-format on
diff --git a/src/enemy/rockChuchu.c b/src/enemy/rockChuchu.c
index 337e21dc..8c4a82f3 100644
--- a/src/enemy/rockChuchu.c
+++ b/src/enemy/rockChuchu.c
@@ -79,7 +79,7 @@ void sub_08022390(Entity* this) {
}
if (this->field_0xf == 0) {
- sub_080AEF88(this);
+ ProcessMovement(this);
} else {
this->field_0xf = this->field_0xf - 1;
}
diff --git a/src/enemy/rollobite.c b/src/enemy/rollobite.c
index 1a9fc159..45d6f118 100644
--- a/src/enemy/rollobite.c
+++ b/src/enemy/rollobite.c
@@ -1,8 +1,8 @@
#include "entity.h"
#include "functions.h"
-extern void (*const gUnk_080CA66C[])(Entity*);
-extern void (*const gUnk_080CA684[])(Entity*);
+extern void (*const gRollobiteFunctions[])(Entity*);
+extern void (*const gRollobiteActions[])(Entity*);
extern void (*const gUnk_080CA6A4[])(Entity*);
extern void (*const gUnk_080CA6BC[])(Entity*);
@@ -11,57 +11,54 @@ extern const s8 gUnk_080CA6D4[];
void sub_08020A30(Entity*);
void sub_08020A7C(Entity*);
-u32 sub_08020AD0(Entity*);
-u32 sub_08020B6C(Entity*);
+bool32 Rollobite_TryToHoleUp(Entity*);
+bool32 Rollobite_IsRolledUp(Entity*);
extern void sub_080AE58C();
extern void sub_080AE7E8();
extern void sub_08078930();
void Rollobite(Entity* this) {
- EnemyFunctionHandler(this, gUnk_080CA66C);
+ EnemyFunctionHandler(this, gRollobiteFunctions);
}
-void sub_08020648(Entity* this) {
- sub_08020AD0(this);
- gUnk_080CA684[this->action](this);
+void Rollobite_OnTick(Entity* this) {
+ Rollobite_TryToHoleUp(this);
+ gRollobiteActions[this->action](this);
}
void sub_08020668(Entity* this) {
if (this->damageType == 34 && this->currentHealth != 0xff) {
this->action = 4;
this->field_0x20 = 0x20000;
- this->direction = -1;
- this->currentHealth = -1;
+ this->direction = 0xff;
+ this->currentHealth = 0xff;
this->damageType = 35;
InitializeAnimation(this, this->animationState + 8);
}
if (this->bitfield != 0x80) {
- u8 tmp = this->action - 4;
- if (tmp < 2) {
+ if (this->action == 4 || this->action == 5) {
this->action = 4;
- this->actionDelay = -76;
- this->direction = -1;
+ this->actionDelay = 180;
+ this->direction = 0xff;
InitializeAnimation(this, this->animationState + 0x10);
}
}
if (this->bitfield == 0x93)
- sub_08020648(this);
+ Rollobite_OnTick(this);
}
void sub_080206E0(Entity* this) {
- if (sub_08020AD0(this)) {
+ if (Rollobite_TryToHoleUp(this)) {
this->field_0x42 = 0;
+ } else if (Rollobite_IsRolledUp(this)) {
+ this->field_0x42--;
+ sub_080AE58C(this, this->field_0x3e, 10);
+ sub_080AE7E8(this, this->field_0x46, this->field_0x3e, 10);
} else {
- if (sub_08020B6C(this)) {
- this->field_0x42--;
- sub_080AE58C(this, this->field_0x3e, 10);
- sub_080AE7E8(this, this->field_0x46, this->field_0x3e, 10);
- } else {
- sub_08001324(this);
- }
+ sub_08001324(this);
}
}
@@ -69,7 +66,7 @@ void sub_08020734(Entity* this) {
if (this->previousActionFlag < 3 && !sub_0806F520(this)) {
this->action = 4;
this->flags |= 0x80;
- this->direction = -1;
+ this->direction = 0xff;
InitializeAnimation(this, this->animationState + 0x10);
} else {
gUnk_080CA6A4[this->previousActionFlag](this);
@@ -94,6 +91,7 @@ void sub_08020798(Entity* this) {
}
void nullsub_6(Entity* this) {
+ /* ... */
}
void sub_080207A8(Entity* this) {
@@ -107,7 +105,7 @@ void sub_080207A8(Entity* this) {
InitializeAnimation(this, this->animationState + 0x10);
}
-void sub_080207F4(Entity* this) {
+void Rollobite_Initialize(Entity* this) {
sub_0804A720(this);
this->field_0x16 = 0x30;
this->field_0x1c = 18;
@@ -116,11 +114,11 @@ void sub_080207F4(Entity* this) {
sub_08020A30(this);
}
-void sub_08020820(Entity* this) {
+void Rollobite_Walk(Entity* this) {
GetNextFrame(this);
if (this->frames.all & 0x1) {
this->frames.all &= ~0x1;
- if (!sub_080AEF88(this))
+ if (!ProcessMovement(this))
this->actionDelay = 1;
}
@@ -164,12 +162,12 @@ void sub_08020904(Entity* this) {
InitializeAnimation(this, this->animationState + 0x10);
}
-void sub_08020920(Entity* this) {
+void Rollobite_Turn(Entity* this) {
if (--this->actionDelay == 0)
sub_08020A30(this);
}
-void sub_08020938(Entity* this) {
+void Rollobite_RolledUp(Entity* this) {
u32 unk;
if ((this->frames.all & 0x80) == 0)
@@ -185,14 +183,14 @@ void sub_08020938(Entity* this) {
sub_08078930(this);
} else {
if (unk == 1)
- sub_08004488(260);
+ EnqueSFX(260);
if ((this->direction & 0x80) == 0)
sub_080AEFE0(this);
}
}
-void sub_080209A0(Entity* this) {
+void Rollobite_Unroll(Entity* this) {
GetNextFrame(this);
if (this->frames.all & 0x80) {
this->flags |= 0x80;
@@ -207,7 +205,7 @@ void sub_080209A0(Entity* this) {
}
}
-void sub_080209F4(Entity* this) {
+void Rollobite_LinedUp(Entity* this) {
if (sub_08003FC4(this, 0x1c00) == 0) {
this->action = 7;
this->spritePriority.b0 = 7;
@@ -217,7 +215,7 @@ void sub_080209F4(Entity* this) {
GetNextFrame(this);
}
-void sub_08020A28(Entity* this) {
+void Rollobite_Holed(Entity* this) {
GetNextFrame(this);
}
@@ -251,8 +249,8 @@ void sub_08020A7C(Entity* this) {
InitializeAnimation(this, this->animationState);
}
-u32 sub_08020AD0(Entity* this) {
- if (sub_08020B6C(this) && this->height.HALF.HI == 0) {
+bool32 Rollobite_TryToHoleUp(Entity* this) {
+ if (Rollobite_IsRolledUp(this) && this->height.HALF.HI == 0) {
int tile = COORD_TO_TILE(this);
int iVar1 = GetTileType(tile, this->collisionLayer);
if ((iVar1 * 0x10000 - 0x710000U) >> 0x10 < 2) {
@@ -265,24 +263,24 @@ u32 sub_08020AD0(Entity* this) {
this->field_0x20 = 0x20000;
InitializeAnimation(this, this->animationState + 0x14);
SetTile(0x4034, tile, this->collisionLayer);
- return 1;
+ return TRUE;
}
}
- return 0;
+ return FALSE;
}
-u32 sub_08020B6C(Entity* this) {
- u32 tmp = this->animIndex - 0x10;
- if (tmp < 4) {
- return 1;
+bool32 Rollobite_IsRolledUp(Entity* this) {
+ u32 tmp = this->animIndex;
+ if (16 <= tmp && tmp <= 19) {
+ return TRUE;
} else {
- return 0;
+ return FALSE;
}
}
// clang-format off
-void (*const gUnk_080CA66C[])(Entity*) = {
- sub_08020648,
+void (*const gRollobiteFunctions[])(Entity*) = {
+ Rollobite_OnTick,
sub_08020668,
sub_080206E0,
sub_0804A7D4,
@@ -290,15 +288,15 @@ void (*const gUnk_080CA66C[])(Entity*) = {
sub_08020734,
};
-void (*const gUnk_080CA684[])(Entity*) = {
- sub_080207F4,
- sub_08020820,
+void (*const gRollobiteActions[])(Entity*) = {
+ Rollobite_Initialize,
+ Rollobite_Walk,
sub_08020874,
- sub_08020920,
- sub_08020938,
- sub_080209A0,
- sub_080209F4,
- sub_08020A28,
+ Rollobite_Turn,
+ Rollobite_RolledUp,
+ Rollobite_Unroll,
+ Rollobite_LinedUp,
+ Rollobite_Holed,
};
void (*const gUnk_080CA6A4[])(Entity*) = {
@@ -318,7 +316,6 @@ void (*const gUnk_080CA6BC[])(Entity*) = {
};
const u8 gUnk_080CA6CC[] = {
- 0,6,9,0,6,6,0,7
+ 0, 6, 9, 0, 6, 6, 0, 7,
};
// clang-format on
-
diff --git a/src/enemy/rupeeLike.c b/src/enemy/rupeeLike.c
index 8a011dad..9468d7a2 100644
--- a/src/enemy/rupeeLike.c
+++ b/src/enemy/rupeeLike.c
@@ -62,7 +62,7 @@ void sub_08029318(Entity* this) {
this->field_0x82.HALF.HI = 0x41;
this->flags2 &= 0xfc;
this->field_0x80.HALF.LO = gPlayerEntity.spritePriority.b1;
- sub_08004488(0x104);
+ EnqueSFX(0x104);
} else {
if (this->field_0x43 != 0) {
sub_0804A9FC(this, 0x1c);
@@ -136,7 +136,7 @@ void sub_080294D4(Entity* this) {
sub_08004596(this, GetFacingDirection(this, &gPlayerEntity));
sub_0802969C(this);
}
- sub_080AEF88(this);
+ ProcessMovement(this);
sub_080296C8(this);
} else {
this->action = 6;
diff --git a/src/enemy/slime.c b/src/enemy/slime.c
index 91238ab9..29ec7207 100644
--- a/src/enemy/slime.c
+++ b/src/enemy/slime.c
@@ -87,7 +87,7 @@ void sub_08045018(Entity* this) {
}
void sub_08045088(Entity* this) {
- sub_080AEF88(this);
+ ProcessMovement(this);
GetNextFrame(this);
if (--this->actionDelay == 0) {
this->action = 1;
diff --git a/src/enemy/spinyChuchu.c b/src/enemy/spinyChuchu.c
index a3d41a1b..6a6d19e8 100644
--- a/src/enemy/spinyChuchu.c
+++ b/src/enemy/spinyChuchu.c
@@ -3,7 +3,7 @@
#include "functions.h"
extern void sub_08001318(Entity*);
-extern u32 sub_08049F64(Entity*, u32, u32);
+extern u32 PlayerInRange(Entity*, u32, u32);
extern void sub_0804A4E4(Entity*, Entity*);
extern void sub_0804AA1C(Entity*);
@@ -69,7 +69,7 @@ void sub_0802244C(Entity* this) {
if (this->action == 3) {
this->action = 4;
InitializeAnimation(this, 3);
- sub_08004488(0x194);
+ EnqueSFX(0x194);
}
}
} else {
@@ -132,7 +132,7 @@ void sub_08022654(Entity* this) {
this->previousActionFlag = 2;
this->spriteSettings.b.draw = 1;
InitializeAnimation(this, 5);
- sub_08004488(0x7d);
+ EnqueSFX(0x7d);
UpdateSpriteForCollisionLayer(this);
/* fallthrough */
case 2:
@@ -169,7 +169,7 @@ void sub_080226EC(Entity* this) {
this->direction = sub_08049F84(this, 1);
}
- sub_080AEF88(this);
+ ProcessMovement(this);
}
GetNextFrame(this);
@@ -180,7 +180,7 @@ void sub_08022780(Entity* this) {
if (this->frames.all & 0x80) {
this->action = 4;
InitializeAnimation(this, 3);
- sub_08004488(0x194);
+ EnqueSFX(0x194);
}
}
@@ -223,7 +223,7 @@ void sub_08022854(Entity* this) {
this->action = 7;
this->damageType = 0x5c;
InitializeAnimation(this, 5);
- sub_08004488(0x7d);
+ EnqueSFX(0x7d);
}
}
}
@@ -240,7 +240,7 @@ void sub_0802289C(Entity* this) {
u32 sub_080228CC(Entity* this) {
if (this->field_0xf == 0) {
- if (sub_08049F64(this, 1, 0x28))
+ if (PlayerInRange(this, 1, 0x28))
return 1;
} else {
this->field_0xf--;
@@ -250,7 +250,7 @@ u32 sub_080228CC(Entity* this) {
u32 sub_080228F0(Entity* this) {
if (this->field_0x80.HALF.HI == 0) {
- if (sub_08049F64(this, 1, 0x40))
+ if (PlayerInRange(this, 1, 0x40))
return 1;
} else {
this->field_0x80.HALF.HI--;
diff --git a/src/enemy/tektite.c b/src/enemy/tektite.c
index 4aec209c..c34a9dd8 100644
--- a/src/enemy/tektite.c
+++ b/src/enemy/tektite.c
@@ -113,7 +113,7 @@ void sub_0802F300(Entity* this) {
u32 rand;
GetNextFrame(this);
- sub_080AEF88(this);
+ ProcessMovement(this);
temp = this->height.HALF.HI;
rand = Random() & 0xf;
diff --git a/src/enemy/tektiteGolden.c b/src/enemy/tektiteGolden.c
index f46a65e3..50012c83 100644
--- a/src/enemy/tektiteGolden.c
+++ b/src/enemy/tektiteGolden.c
@@ -100,7 +100,7 @@ void sub_08038048(Entity* this) {
u32 rand;
UpdateAnimationVariableFrames(this, 2);
- sub_080AEF88(this);
+ ProcessMovement(this);
temp = this->height.HALF.HI;
rand = Random() & 0xf;
diff --git a/src/enemy/wisp.c b/src/enemy/wisp.c
index 2c7431d6..021a8b44 100644
--- a/src/enemy/wisp.c
+++ b/src/enemy/wisp.c
@@ -98,7 +98,7 @@ void sub_080336A8(Entity* this) {
} else if (this->collisions != 0) {
sub_0800417E(this, this->collisions);
}
- sub_080AEF88(this);
+ ProcessMovement(this);
GetNextFrame(this);
}
diff --git a/src/npc/carlov.c b/src/npc/carlov.c
index aaa447d0..25c983ae 100644
--- a/src/npc/carlov.c
+++ b/src/npc/carlov.c
@@ -10,7 +10,7 @@
extern void sub_0807DD50(Entity *);
extern void sub_0807DD94(Entity *,u32);
-extern void sub_08004488(u32);
+extern void EnqueSFX(u32);
extern void sub_08080964(u32,u32);
@@ -25,11 +25,11 @@ void Carlov(Entity *this)
}
if ((this->frames.all & 0x10) != 0) {
this->frames.all = this->frames.all & 0xef;
- sub_08004488(0x104);
+ EnqueSFX(0x104);
sub_08080964(0x10,0);
}
if ((this->frames.all & 0x20) != 0) {
this->frames.all = this->frames.all & 0xdf;
- sub_08004488(0x7c);
+ EnqueSFX(0x7c);
}
} \ No newline at end of file
diff --git a/src/npc/cow.c b/src/npc/cow.c
index 54500e02..24fc90d8 100644
--- a/src/npc/cow.c
+++ b/src/npc/cow.c
@@ -94,7 +94,7 @@ void sub_08069068(Entity* ent) {
InitAnimationForceUpdate(ent, ent->animationState + 4);
}
- sub_080AEF88(ent);
+ ProcessMovement(ent);
UpdateAnimationSingleFrame(ent);
{
diff --git a/src/npc/melari.c b/src/npc/melari.c
index 87afe16c..0aceb1e1 100644
--- a/src/npc/melari.c
+++ b/src/npc/melari.c
@@ -12,7 +12,7 @@ extern void sub_0806F118(Entity*);
extern void sub_0807DDAC(Entity*, u32);
extern void sub_0807DDE4(Entity*);
extern u32 sub_080040A8(Entity*);
-extern void sub_08004488(u32);
+extern void EnqueSFX(u32);
extern u32 sub_0801E99C(Entity*);
extern void sub_08078784(Entity*, u32);
extern void sub_0807000C(Entity*);
@@ -99,7 +99,7 @@ void sub_08068780(Entity* this) {
if (sub_080040A8(this) == 0) {
PlaySFX(gUnk_0811153E[(s32)Random() % 3]);
} else {
- sub_08004488(gUnk_08111538[(s32)Random() % 3]);
+ EnqueSFX(gUnk_08111538[(s32)Random() % 3]);
}
ent = CreateFx(this, 0x3d, 0x20);
if (ent != NULL) {
diff --git a/src/npc/postman.c b/src/npc/postman.c
index f7b6395d..8ffc696c 100644
--- a/src/npc/postman.c
+++ b/src/npc/postman.c
@@ -27,7 +27,7 @@ extern u32 GetFacingDirection(Entity*, Entity*);
extern void sub_080606D8(Entity*);
extern void sub_0807DD94(Entity*, u32);
extern void sub_080788E0(Entity*);
-extern void sub_08004488(u32);
+extern void EnqueSFX(u32);
extern void sub_080606C0(Entity*);
extern void sub_0800451C(Entity*);
extern void sub_08078784(Entity*, u32);
@@ -178,7 +178,7 @@ void sub_08060528(Entity *this)
this->field_0x20 = 0x20000;
this->field_0x6c.HALF.HI = 1;
sub_080788E0(this);
- sub_08004488(0x7c);
+ EnqueSFX(0x7c);
}
else {
this->field_0x6a.HWORD -= 1;
diff --git a/src/npc/townsperson.c b/src/npc/townsperson.c
index 436dc186..242d85a1 100644
--- a/src/npc/townsperson.c
+++ b/src/npc/townsperson.c
@@ -222,7 +222,7 @@ void sub_08061E90(Entity* this, Entity* arg1) {
if (animIndex != this->animIndex) {
InitializeAnimation(this, animIndex);
}
- sub_080AEF88(this);
+ ProcessMovement(this);
iVar4 = this->x.HALF.HI - *(s16*)&this->field_0x6a.HWORD;
if (0x10 < iVar4) {
this->x.HALF.HI = this->field_0x6a.HWORD + 0x10;
diff --git a/src/object/lightableSwitch.c b/src/object/lightableSwitch.c
index e9a1e8e0..efa72fb2 100644
--- a/src/object/lightableSwitch.c
+++ b/src/object/lightableSwitch.c
@@ -7,7 +7,7 @@
extern void sub_0809EB30(Entity*);
extern void sub_0809EAD8(Entity*);
extern void sub_0809EABC(Entity*);
-extern void sub_08004488(u32);
+extern void EnqueSFX(u32);
extern void sub_080A2CC0(Entity*, Entity**, u16*);
extern Entity* GetCurrentRoomProperty(u32);
extern void SetTile(u32, u32, u32);
@@ -50,7 +50,7 @@ void sub_0809EA80(Entity* this) {
} else {
SetFlag(this->field_0x86);
}
- sub_08004488(0x110);
+ EnqueSFX(0x110);
}
sub_0809EABC(this);
}
@@ -123,7 +123,7 @@ void sub_0809EBD8(Entity* this) {
this->actionDelay = 0x10;
this->frameIndex = 2;
SetFlag(this->field_0x86);
- sub_08004488(0x110);
+ EnqueSFX(0x110);
}
}
@@ -137,7 +137,7 @@ void sub_0809EC08(Entity* this) {
this->action = 1;
this->frameIndex = 3;
ClearFlag(this->field_0x86);
- sub_08004488(0x110);
+ EnqueSFX(0x110);
}
}
}
diff --git a/src/object/mask.c b/src/object/mask.c
index 675805b8..cd5d13f4 100644
--- a/src/object/mask.c
+++ b/src/object/mask.c
@@ -20,7 +20,7 @@ extern void sub_08000148(u16, u16, u32);
extern s16 sub_080001DA(u16, u32);
extern u16 sub_080002E0(u16, u32);
-extern void sub_08004488(u32);
+extern void EnqueSFX(u32);
extern void sub_080044EC(Entity *, u16);
extern void sub_0805457C(Entity *, s32);
@@ -115,7 +115,7 @@ void sub_08092B0C(Entity *this) {
switch (this->entityType.parameter & 0xC0)
{
case 0x80:
- sub_08004488(0x72);
+ EnqueSFX(0x72);
case 0x40:
SetFlag(this->field_0x86);
break;
diff --git a/src/object/metalDoor.c b/src/object/metalDoor.c
index 381bf0d8..b0df5777 100644
--- a/src/object/metalDoor.c
+++ b/src/object/metalDoor.c
@@ -6,7 +6,7 @@
extern u32 sub_08083734(Entity*, u32);
extern void sub_080A080C(Entity*);
extern void sub_0806F69C(Entity*);
-extern void sub_08004488(u32);
+extern void EnqueSFX(u32);
extern void sub_080A0870(Entity*);
extern void PlaySFX(u32);
extern u32 sub_080001DA(u32, u32);
@@ -71,7 +71,7 @@ void sub_080A074C(Entity *this)
ent->x.HALF.HI -= 0xc;
ent->y.HALF.HI -= 0xc;
}
- sub_08004488(0x10b);
+ EnqueSFX(0x10b);
}
}
diff --git a/src/object/object1A.c b/src/object/object1A.c
index e903d21b..5f43ec2f 100644
--- a/src/object/object1A.c
+++ b/src/object/object1A.c
@@ -3,7 +3,7 @@
extern void sub_08086A6C();
extern s32 sub_080044EC();
-extern void sub_080AEF88();
+extern void ProcessMovement();
extern u32 Random(void);
extern void (*gUnk_081206C4[99])(Entity*);
@@ -42,7 +42,7 @@ void sub_08086A28(Entity* ent) {
if (iVar1 == 0) {
ent->action = 2;
}
- sub_080AEF88(ent);
+ ProcessMovement(ent);
CopyPosition(ent, ent->attachedEntity);
}
}
diff --git a/src/object/object2A.c b/src/object/object2A.c
index d8f30b54..8db435e5 100644
--- a/src/object/object2A.c
+++ b/src/object/object2A.c
@@ -36,5 +36,5 @@ void sub_08089B18(Entity *this)
return;
}
}
- sub_08004488(0x124);
+ EnqueSFX(0x124);
} \ No newline at end of file
diff --git a/src/object/pot.c b/src/object/pot.c
index 5ea63ab5..8931598f 100755
--- a/src/object/pot.c
+++ b/src/object/pot.c
@@ -92,7 +92,7 @@ void sub_08082310(Entity* this) {
this->actionDelay = 64;
}
SetTile((u16)this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
- sub_08004488(0x10F);
+ EnqueSFX(0x10F);
break;
case 0x4067:
SetTile((u16)this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
diff --git a/src/object/railtrack.c b/src/object/railtrack.c
index 3cf693d2..d8227bef 100644
--- a/src/object/railtrack.c
+++ b/src/object/railtrack.c
@@ -6,7 +6,7 @@
extern u32* GetLayerByIndex(u32);
extern void sub_08085394(Entity*);
extern void sub_0808543C(Entity*);
-extern void sub_08004488(u32);
+extern void EnqueSFX(u32);
extern u32 sub_080854A8(Entity*);
extern void SetTile(u32, u32, u32);
@@ -54,7 +54,7 @@ void sub_08085264(Entity* this) {
this->animationState = (this->animationState + *(u8*)&this->field_0x7c) & 3;
InitializeAnimation(this, this->animationState);
sub_0808543C(this);
- sub_08004488(0x151);
+ EnqueSFX(0x151);
}
}
@@ -66,7 +66,7 @@ void sub_080852B4(Entity* this) {
this->animationState = (this->animationState + *(u8*)&this->field_0x7c) & 3;
InitializeAnimation(this, this->animationState);
sub_08085394(this);
- sub_08004488(0x151);
+ EnqueSFX(0x151);
}
}
@@ -96,7 +96,7 @@ void sub_08085308(Entity* this) {
this->animationState = (this->animationState + *(u8*)&this->field_0x7c) & 3;
InitializeAnimation(this, this->animationState);
sub_0808543C(this);
- sub_08004488(0x151);
+ EnqueSFX(0x151);
}
}
}