summaryrefslogtreecommitdiff
path: root/src/enemy
diff options
context:
space:
mode:
authortheo3 <arisstephenson2@gmail.com>2022-03-17 19:13:56 -0700
committertheo3 <arisstephenson2@gmail.com>2022-03-17 19:16:43 -0700
commitef470547e04f2cbc50b98d6578932f1188d25dbd (patch)
tree4a5e5bffb8ea301bd15b8bda4627c48ccf052cce /src/enemy
parent33579844948ca5c2ed9e1e353fba8b9571f7104d (diff)
cleanup
Diffstat (limited to 'src/enemy')
-rw-r--r--src/enemy/acroBandits.c14
-rw-r--r--src/enemy/armos.c12
-rw-r--r--src/enemy/ballChainSoldier.c2
-rw-r--r--src/enemy/beetle.c8
-rw-r--r--src/enemy/bobomb.c4
-rw-r--r--src/enemy/bombPeahat.c10
-rw-r--r--src/enemy/businessScrub.c8
-rw-r--r--src/enemy/businessScrubPrologue.c10
-rw-r--r--src/enemy/chaser.c2
-rw-r--r--src/enemy/chuchu.c34
-rw-r--r--src/enemy/cuccoAggr.c4
-rw-r--r--src/enemy/curtain.c4
-rw-r--r--src/enemy/darkNut.c26
-rw-r--r--src/enemy/doorMimic.c4
-rw-r--r--src/enemy/enemy4D.c2
-rw-r--r--src/enemy/enemy50.c4
-rw-r--r--src/enemy/enemy64.c2
-rw-r--r--src/enemy/enemyE.c2
-rw-r--r--src/enemy/eyegore.c12
-rw-r--r--src/enemy/flyingSkull.c4
-rw-r--r--src/enemy/ghini.c2
-rw-r--r--src/enemy/gibdo.c4
-rw-r--r--src/enemy/gleerok.c10
-rw-r--r--src/enemy/gyorgFemaleEye.c6
-rw-r--r--src/enemy/gyorgMale.c6
-rw-r--r--src/enemy/gyorgMaleEye.c4
-rw-r--r--src/enemy/helmasaur.c4
-rw-r--r--src/enemy/keaton.c2
-rw-r--r--src/enemy/keese.c2
-rw-r--r--src/enemy/lakitu.c6
-rw-r--r--src/enemy/leever.c4
-rw-r--r--src/enemy/madderpillar.c4
-rw-r--r--src/enemy/mazaalBracelet.c42
-rw-r--r--src/enemy/mazaalHead.c4
-rw-r--r--src/enemy/moldworm.c2
-rw-r--r--src/enemy/octorok.c6
-rw-r--r--src/enemy/octorokBoss.c14
-rw-r--r--src/enemy/octorokGolden.c2
-rw-r--r--src/enemy/peahat.c4
-rw-r--r--src/enemy/puffstool.c4
-rw-r--r--src/enemy/rollobite.c10
-rw-r--r--src/enemy/rope.c2
-rw-r--r--src/enemy/rupeeLike.c4
-rw-r--r--src/enemy/scissorsBeetle.c2
-rw-r--r--src/enemy/sluggula.c4
-rw-r--r--src/enemy/spinyBeetle.c2
-rw-r--r--src/enemy/spinyChuchu.c8
-rw-r--r--src/enemy/stalfos.c2
-rw-r--r--src/enemy/tektite.c8
-rw-r--r--src/enemy/tektiteGolden.c8
-rw-r--r--src/enemy/vaatiArm.c2
-rw-r--r--src/enemy/vaatiBall.c2
-rw-r--r--src/enemy/vaatiProjectile.c2
-rw-r--r--src/enemy/vaatiRebornEnemy.c6
-rw-r--r--src/enemy/vaatiTransfigured.c8
-rw-r--r--src/enemy/vaatiTransfiguredEye.c6
-rw-r--r--src/enemy/vaatiWrath.c8
-rw-r--r--src/enemy/vaatiWrathEye.c8
-rw-r--r--src/enemy/wallMaster.c6
-rw-r--r--src/enemy/wallMaster2.c4
-rw-r--r--src/enemy/waterDrop.c2
61 files changed, 202 insertions, 202 deletions
diff --git a/src/enemy/acroBandits.c b/src/enemy/acroBandits.c
index 0edf6d34..34d0ea7c 100644
--- a/src/enemy/acroBandits.c
+++ b/src/enemy/acroBandits.c
@@ -155,7 +155,7 @@ void sub_08031B48(Entity* this) {
this->frame = 0;
COLLISION_ON(this);
} else {
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 0x3;
this->actionDelay = gUnk_080CE5B0[Random() & 7];
InitializeAnimation(this, 1);
@@ -188,7 +188,7 @@ void sub_08031B98(Entity* this) {
void sub_08031C1C(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = '\x01';
this->actionDelay = gUnk_080CE5B8[Random() & 7];
this->spriteSettings.draw = 0;
@@ -199,7 +199,7 @@ void sub_08031C58(Entity* this) {
Entity *a, *b;
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
if (gEntCount < 0x43) {
u32 tmp = Random();
tmp &= 3;
@@ -274,7 +274,7 @@ void sub_08031DA0(Entity* this) {
}
void sub_08031DC4(Entity* this) {
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 1;
this->actionDelay = 0xb4;
this->spriteSettings.draw = 0;
@@ -360,7 +360,7 @@ void sub_08031F54(Entity* this) {
void sub_08031FB0(Entity* this) {
GetNextFrame(this);
- if ((this->frame & 0x80) && (this->parent || --this->actionDelay == 0)) {
+ if ((this->frame & ANIM_DONE) && (this->parent || --this->actionDelay == 0)) {
this->action = 4;
this->direction = sub_08049F84(this, 1);
*(u8*)&this->field_0x76 = 0;
@@ -469,7 +469,7 @@ void sub_08032204(Entity* this) {
this->frame = 0;
this->frameDuration = (Random() & 0x30) + 30;
} else {
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 9;
InitializeAnimation(this, 13);
}
@@ -478,7 +478,7 @@ void sub_08032204(Entity* this) {
void sub_08032248(Entity* this) {
if (GravityUpdate(this, Q_8_8(24.0)) == 0) {
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
((Entity*)this->field_0x7c.WORD)->actionDelay--;
DeleteEntity(this);
diff --git a/src/enemy/armos.c b/src/enemy/armos.c
index 829e195d..0fd596a2 100644
--- a/src/enemy/armos.c
+++ b/src/enemy/armos.c
@@ -113,7 +113,7 @@ void sub_080301D4(ArmosEntity* this) {
void sub_08030240(ArmosEntity* this) {
if (super->animIndex == 6) {
- if ((super->frame & 0x80) == 0) {
+ if ((super->frame & ANIM_DONE) == 0) {
GetNextFrame(super);
}
}
@@ -188,8 +188,8 @@ void sub_08030338(ArmosEntity* this) {
EnqueueSFX(SFX_12A);
return;
}
- bVar2 = super->frame & 0x80;
- if ((super->frame & 0x80) != 0) {
+ bVar2 = super->frame & ANIM_DONE;
+ if ((super->frame & ANIM_DONE) != 0) {
if (this->unk_80 != 2) {
super->action = 3;
super->animationState = 0xff;
@@ -244,7 +244,7 @@ NONMATCH("asm/non_matching/armos/sub_080304BC.inc", void sub_080304BC(ArmosEntit
u32 tmp;
sub_080309A8(this);
- tmp = super->frame & 0x80;
+ tmp = super->frame & ANIM_DONE;
if (tmp != 0) {
sub_08030580(this);
} else {
@@ -267,7 +267,7 @@ void sub_080304F4(ArmosEntity* this) {
}
void sub_08030524(ArmosEntity* this) {
- if ((super->frame & 0x80) == 0) {
+ if ((super->frame & ANIM_DONE) == 0) {
sub_080309A8(this);
} else if (super->frame == 1) {
super->frame = 0;
@@ -277,7 +277,7 @@ void sub_08030524(ArmosEntity* this) {
void sub_08030554(ArmosEntity* this) {
sub_080309A8(this);
- if ((super->frame & 0x80) != 0) {
+ if ((super->frame & ANIM_DONE) != 0) {
super->action = 3;
sub_080309C8(this, (u32)super->animationState);
sub_080306C4(this);
diff --git a/src/enemy/ballChainSoldier.c b/src/enemy/ballChainSoldier.c
index f29df68c..9e1ef699 100644
--- a/src/enemy/ballChainSoldier.c
+++ b/src/enemy/ballChainSoldier.c
@@ -150,7 +150,7 @@ void sub_0803E71C(BallChainSoldierEntity* this) {
}
void sub_0803E75C(BallChainSoldierEntity* this) {
- if ((super->frame & 0x80) == 0) {
+ if ((super->frame & ANIM_DONE) == 0) {
UpdateAnimationSingleFrame(super);
} else {
if (--super->actionDelay == 0) {
diff --git a/src/enemy/beetle.c b/src/enemy/beetle.c
index 207cf1c7..25e104c8 100644
--- a/src/enemy/beetle.c
+++ b/src/enemy/beetle.c
@@ -117,7 +117,7 @@ void sub_080218CC(Entity* this) {
this->frameDuration = 1;
}
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 2;
this->actionDelay = (Random() & 0x38) + 8;
this->field_0xf = 1;
@@ -209,7 +209,7 @@ void sub_08021AD8(Entity* this) {
this->frameDuration = 1;
}
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 2;
this->actionDelay = 20;
((u8*)&this->field_0x86)[0] = 60;
@@ -268,7 +268,7 @@ void sub_08021C58(Entity* this) {
this->frameDuration = 1;
}
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 2;
this->actionDelay = 60;
this->field_0xf = 1;
@@ -280,7 +280,7 @@ void sub_08021C58(Entity* this) {
}
void sub_08021CD0(Entity* this) {
- if ((this->frame & 0x80) == 0)
+ if ((this->frame & ANIM_DONE) == 0)
GetNextFrame(this);
if (sub_08049F84(this, 1) == 0xff)
diff --git a/src/enemy/bobomb.c b/src/enemy/bobomb.c
index 42c3d2b1..7e214b63 100644
--- a/src/enemy/bobomb.c
+++ b/src/enemy/bobomb.c
@@ -245,7 +245,7 @@ void sub_0802CAF8(Entity* this) {
EnqueueSFX(SFX_104);
}
sub_0802CC18(this);
- sub_08078930(this);
+ RegisterCarryEntity(this);
if (this->field_0xf && this->z.HALF.HI == 0) {
this->field_0xf = 0;
COLLISION_ON(this);
@@ -286,7 +286,7 @@ void sub_0802CBC4(Entity* this) {
if (this->field_0x82.HALF.HI) {
sub_08079184();
}
- sub_08078954(this);
+ FreeCarryEntity(this);
ent = CreateObjectWithParent(this, OBJECT_20, 0, 0);
if (ent) {
diff --git a/src/enemy/bombPeahat.c b/src/enemy/bombPeahat.c
index 5a1a80f3..5c327b91 100644
--- a/src/enemy/bombPeahat.c
+++ b/src/enemy/bombPeahat.c
@@ -289,7 +289,7 @@ void sub_0802AB40(Entity* this) {
#endif
void sub_0802AC08(Entity* this) {
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 2;
this->subAction = 0;
this->actionDelay = 0x40;
@@ -470,7 +470,7 @@ void sub_0802AED4(Entity* this) {
}
} else {
if (!sub_0800442E(this)) {
- sub_08078930(this);
+ RegisterCarryEntity(this);
}
}
if (this->type2 != 0 && this->field_0x80.HALF.HI) {
@@ -535,7 +535,7 @@ NONMATCH("asm/non_matching/bombPeahat/sub_0802AFC8.inc", void sub_0802AFC8(Entit
this->field_0x82.HWORD ^= 0x8000;
}
tmp = 0x130 - (this->field_0x82.HWORD & 0xf0);
- sub_0805EC9C(this, tmp, tmp, 0);
+ SetAffineInfo(this, tmp, tmp, 0);
}
if (this->field_0xf & flag) {
this->palette.b.b0 = this->palette.b.b4;
@@ -572,7 +572,7 @@ void sub_0802B048(Entity* this) {
this->field_0xf = 0x50;
this->field_0x82.HWORD = 0;
this->spriteRendering.b0 = 3;
- sub_0805EC9C(this, 0x100, 0x100, 0);
+ SetAffineInfo(this, 0x100, 0x100, 0);
}
} else {
if (this->field_0xf) {
@@ -587,7 +587,7 @@ void sub_0802B048(Entity* this) {
this->spriteSettings.draw = 0;
COLLISION_ON(this);
this->field_0x7a.HALF.HI = 0;
- sub_08078954(this);
+ FreeCarryEntity(this);
if (this->parent->next) {
this->parent->field_0x80.HALF.HI = 0;
}
diff --git a/src/enemy/businessScrub.c b/src/enemy/businessScrub.c
index 6c71441d..8283894b 100644
--- a/src/enemy/businessScrub.c
+++ b/src/enemy/businessScrub.c
@@ -112,7 +112,7 @@ void sub_08028A74(Entity* this) {
switch (this->subAction) {
case 0:
unk = 1;
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->subAction = 1;
this->actionDelay = 0x3c;
this->field_0xf = 0x10;
@@ -150,7 +150,7 @@ void sub_08028A74(Entity* this) {
break;
case 3:
unk = 2;
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->subAction = 4;
this->actionDelay = 0x50;
sub_080290E0(this, 1);
@@ -189,7 +189,7 @@ void sub_08028BC4(Entity* this) {
switch (this->subAction) {
case 0:
if (this->actionDelay == 0) {
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->subAction = 1;
sub_08028FDC(this);
sub_080290E0(this, 5);
@@ -200,7 +200,7 @@ void sub_08028BC4(Entity* this) {
}
break;
case 1:
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 4;
this->subAction = 0;
this->actionDelay = 0x1e;
diff --git a/src/enemy/businessScrubPrologue.c b/src/enemy/businessScrubPrologue.c
index 036c4e19..f87040f3 100644
--- a/src/enemy/businessScrubPrologue.c
+++ b/src/enemy/businessScrubPrologue.c
@@ -100,7 +100,7 @@ void sub_08045CE0(BusinessScrubPrologueEntity* this) {
switch (super->subAction) {
case 0:
r6 = 1;
- if (super->frame & 0x80) {
+ if (super->frame & ANIM_DONE) {
super->subAction = 1;
super->actionDelay = 0x3c;
super->field_0xf = 0x10;
@@ -133,7 +133,7 @@ void sub_08045CE0(BusinessScrubPrologueEntity* this) {
break;
case 3:
r6 = 2;
- if (super->frame & 0x80) {
+ if (super->frame & ANIM_DONE) {
super->subAction = 4;
super->actionDelay = 0x50;
sub_08046030(this, 1);
@@ -170,7 +170,7 @@ void sub_08045E14(BusinessScrubPrologueEntity* this) {
switch (super->subAction) {
case 0:
if (super->actionDelay == 0) {
- if (super->frame & 0x80) {
+ if (super->frame & ANIM_DONE) {
super->subAction = 1;
sub_08045F98(this);
sub_08046030(this, 5);
@@ -181,7 +181,7 @@ void sub_08045E14(BusinessScrubPrologueEntity* this) {
}
break;
case 1:
- if (super->frame & 0x80) {
+ if (super->frame & ANIM_DONE) {
super->action = 5;
super->subAction = 0;
sub_08046030(this, 0);
@@ -222,7 +222,7 @@ void sub_08045EDC(BusinessScrubPrologueEntity* this) {
super->frame &= 0xfe;
sub_080954AC(super, this->unk_84);
EnqueueSFX(SFX_18D);
- } else if (super->frame & 0x80) {
+ } else if (super->frame & ANIM_DONE) {
super->action = 5;
super->subAction = 0;
sub_08046030(this, 1);
diff --git a/src/enemy/chaser.c b/src/enemy/chaser.c
index 16a61b2a..24dca7cf 100644
--- a/src/enemy/chaser.c
+++ b/src/enemy/chaser.c
@@ -64,7 +64,7 @@ void sub_0802B56C(Entity* this) {
void sub_0802B5C8(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 1;
this->actionDelay = 30;
InitializeAnimation(this, 0);
diff --git a/src/enemy/chuchu.c b/src/enemy/chuchu.c
index 8521f64b..9f23dd3b 100644
--- a/src/enemy/chuchu.c
+++ b/src/enemy/chuchu.c
@@ -155,7 +155,7 @@ void Chuchu_OnDeath(Entity* this) {
}
void Chuchu_OnConfused(Entity* this) {
- if ((this->frame & 0x80) == 0)
+ if ((this->frame & ANIM_DONE) == 0)
GetNextFrame(this);
GenericConfused(this);
}
@@ -173,7 +173,7 @@ void nullsub_4(Entity* this) {
void sub_0801F0C8(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 3;
this->actionDelay = (Random() & 3) + 0xc;
this->field_0xf = Random();
@@ -221,7 +221,7 @@ void sub_0801F1B0(Entity* this) {
GetNextFrame(this);
}
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
if (sub_0801FBD0(this)) {
sub_0801F328(this);
} else {
@@ -240,7 +240,7 @@ void sub_0801F228(Entity* this) {
void sub_0801F250(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80)
+ if (this->frame & ANIM_DONE)
sub_0801F360(this);
}
@@ -267,7 +267,7 @@ void sub_0801F270(Entity* this) {
void sub_0801F2CC(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 1;
this->spriteSettings.draw = 0;
InitializeAnimation(this, 4);
@@ -277,7 +277,7 @@ void sub_0801F2CC(Entity* this) {
void sub_0801F2F8(Entity* this) {
GravityUpdate(this, 0x1800);
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
sub_0801F340(this);
sub_0804AA1C(this);
}
@@ -362,7 +362,7 @@ void sub_0801F48C(Entity* this) {
void sub_0801F494(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 3;
this->field_0xf = 30;
this->direction = sub_08049F84(this, 1);
@@ -418,7 +418,7 @@ void sub_0801F584(Entity* this) {
GetNextFrame(this);
}
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
if (sub_0801FBD0(this)) {
this->field_0x82.HALF.HI = 0;
sub_0801F730(this);
@@ -440,7 +440,7 @@ void sub_0801F61C(Entity* this) {
void sub_0801F638(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 8;
this->field_0xf = 30;
this->direction = sub_08049F84(this, 1);
@@ -465,7 +465,7 @@ void sub_0801F688(Entity* this) {
void sub_0801F6CC(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 1;
this->spriteSettings.draw = 0;
InitializeAnimation(this, 4);
@@ -475,7 +475,7 @@ void sub_0801F6CC(Entity* this) {
void sub_0801F6F8(Entity* this) {
GravityUpdate(this, 0x1800);
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 4;
this->speed = 0x20;
sub_0804AA1C(this);
@@ -538,7 +538,7 @@ void sub_0801F7FC(Entity* this) {
void sub_0801F840(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
sub_0801FB14(this);
COLLISION_ON(this);
this->spritePriority.b0 = 4;
@@ -594,7 +594,7 @@ void sub_0801F940(Entity* this) {
GetNextFrame(this);
}
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
if (sub_0801FBD0(this)) {
sub_0801FAE0(this);
} else {
@@ -614,7 +614,7 @@ void sub_0801F9C4(Entity* this) {
void sub_0801F9E0(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 8;
this->field_0xf = 30;
this->direction = sub_08049F84(this, 1);
@@ -639,7 +639,7 @@ void sub_0801FA30(Entity* this) {
void sub_0801FA78(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 1;
this->spriteSettings.draw = 0;
InitializeAnimation(this, 4);
@@ -650,7 +650,7 @@ void sub_0801FA78(Entity* this) {
void sub_0801FAAC(Entity* this) {
GravityUpdate(this, 0x1800);
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
sub_0801FB14(this);
this->speed = 0x20;
sub_0804AA1C(this);
@@ -705,7 +705,7 @@ void sub_0801FB68(Entity* this) {
}
u32 sub_0801FBD0(Entity* this) {
- if (sub_080B1AA8(this) == 0x10) {
+ if (GetTileUnderEntity(this) == 0x10) {
return 1;
} else {
return 0;
diff --git a/src/enemy/cuccoAggr.c b/src/enemy/cuccoAggr.c
index 24c8555a..28b32be5 100644
--- a/src/enemy/cuccoAggr.c
+++ b/src/enemy/cuccoAggr.c
@@ -164,7 +164,7 @@ void sub_08038F20(CuccoAggrEntity* this) {
sub_08039298(this);
GetNextFrame(super);
- if (super->frame & 0x80) {
+ if (super->frame & ANIM_DONE) {
sub_0803901C(this);
}
}
@@ -328,7 +328,7 @@ void CuccoAggr_CreateFx(CuccoAggrEntity* this) {
void sub_08039298(CuccoAggrEntity* this) {
if (super->type2 == 0) {
- sub_08078930(super);
+ RegisterCarryEntity(super);
}
}
diff --git a/src/enemy/curtain.c b/src/enemy/curtain.c
index af8c22d0..0a0d342c 100644
--- a/src/enemy/curtain.c
+++ b/src/enemy/curtain.c
@@ -49,7 +49,7 @@ void sub_08048268(Entity* this) {
}
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->actionDelay = 0;
InitializeAnimation(this, 0);
}
@@ -58,7 +58,7 @@ void sub_08048268(Entity* this) {
void sub_08048294(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 3;
SetLocalFlag(0x72);
InitializeAnimation(this, 1);
diff --git a/src/enemy/darkNut.c b/src/enemy/darkNut.c
index 6c1b0238..7fae4b0b 100644
--- a/src/enemy/darkNut.c
+++ b/src/enemy/darkNut.c
@@ -141,7 +141,7 @@ void sub_08020D9C(Entity* this) {
void sub_08020DB4(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frame & 0x80)
+ if (this->frame & ANIM_DONE)
sub_08021390(this);
}
@@ -161,7 +161,7 @@ void sub_08020DD4(Entity* this) {
void sub_08020E28(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frame & 0x80)
+ if (this->frame & ANIM_DONE)
sub_080213B0(this);
}
@@ -170,14 +170,14 @@ void sub_08020E48(Entity* this) {
sub_080213F0(this);
} else {
UpdateAnimationSingleFrame(this);
- if (this->frame & 0x80)
+ if (this->frame & ANIM_DONE)
sub_080213B0(this);
}
}
void sub_08020E78(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frame & 0x80)
+ if (this->frame & ANIM_DONE)
sub_08021390(this);
}
@@ -211,7 +211,7 @@ void sub_08020E98(Entity* this) {
void sub_08020F28(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frame & 0x80)
+ if (this->frame & ANIM_DONE)
sub_08021400(this);
}
@@ -241,7 +241,7 @@ void sub_08020F48(Entity* this) {
}
void sub_08020FAC(Entity* this) {
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
if (this->field_0x7a.HALF.LO) {
this->field_0x7a.HALF.LO--;
} else {
@@ -264,7 +264,7 @@ void sub_08020FE4(Entity* this) {
void sub_08021010(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->hitType = 0x56;
sub_080213F0(this);
}
@@ -280,7 +280,7 @@ void sub_08021038(Entity* this) {
EnqueueSFX(SFX_10E);
}
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
sub_08021588(this);
if (this->field_0x7c.BYTES.byte0) {
this->field_0x7c.BYTES.byte0--;
@@ -300,7 +300,7 @@ void sub_080210A8(Entity* this) {
this->frame = 0;
sub_08021588(this);
EnqueueSFX(SFX_15D);
- } else if (this->frame & 0x80) {
+ } else if (this->frame & ANIM_DONE) {
sub_08021390(this);
}
}
@@ -330,7 +330,7 @@ void sub_080210E4(Entity* this) {
}
void sub_08021170(Entity* this) {
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
if (this->field_0x7a.HALF.HI) {
this->field_0x7a.HALF.HI--;
} else {
@@ -346,7 +346,7 @@ void sub_080211A0(Entity* this) {
sub_08021390(this);
} else {
UpdateAnimationSingleFrame(this);
- if (this->frame & 0x80)
+ if (this->frame & ANIM_DONE)
sub_080213B0(this);
}
}
@@ -357,7 +357,7 @@ void sub_080211D0(Entity* this)
UpdateAnimationSingleFrame(this);
sub_0802159C(this);
- if (this->frame & 0x80)
+ if (this->frame & ANIM_DONE)
sub_08021390(this);
}
@@ -365,7 +365,7 @@ void sub_080211F4(Entity* this) {
UpdateAnimationSingleFrame(this);
sub_08021600(this);
- if (this->frame & 0x80)
+ if (this->frame & ANIM_DONE)
sub_08021390(this);
}
diff --git a/src/enemy/doorMimic.c b/src/enemy/doorMimic.c
index f340affa..540ae972 100644
--- a/src/enemy/doorMimic.c
+++ b/src/enemy/doorMimic.c
@@ -75,7 +75,7 @@ void sub_080220D8(Entity* this) {
void sub_080220F0(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
const PosOffset* off;
u32 i;
@@ -107,7 +107,7 @@ void sub_08022174(Entity* this) {
void sub_08022198(Entity* this) {
sub_0800445C(this);
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 1;
this->actionDelay = 0x5a;
}
diff --git a/src/enemy/enemy4D.c b/src/enemy/enemy4D.c
index e8165957..9c13ceaf 100644
--- a/src/enemy/enemy4D.c
+++ b/src/enemy/enemy4D.c
@@ -207,7 +207,7 @@ void Enemy4D_Action6(Enemy4DEntity* this) {
}
void Enemy4D_Action7(Enemy4DEntity* this) {
- if ((super->frame & 0x80) == 0) {
+ if ((super->frame & ANIM_DONE) == 0) {
UpdateAnimationSingleFrame(super);
} else {
if (--super->actionDelay == 0) {
diff --git a/src/enemy/enemy50.c b/src/enemy/enemy50.c
index 98f80480..2811e901 100644
--- a/src/enemy/enemy50.c
+++ b/src/enemy/enemy50.c
@@ -223,7 +223,7 @@ void Enemy50_Action2(Enemy50Entity* this) {
void Enemy50_Action3(Enemy50Entity* this) {
GetNextFrame(super);
- if ((super->frame & 0x80) != 0) {
+ if ((super->frame & ANIM_DONE) != 0) {
super->flags |= 0x80;
this->unk_7c = this->unk_80 * ((Random() & 0x30) + 0x3c) + 0x78;
sub_08041128(this);
@@ -292,7 +292,7 @@ void Enemy50_Action7(Enemy50Entity* this) {
void Enemy50_Action8(Enemy50Entity* this) {
sub_0803F738(this);
GetNextFrame(super);
- if ((super->frame & 0x80) != 0) {
+ if ((super->frame & ANIM_DONE) != 0) {
super->action = 9;
this->unk_78 = 0;
InitializeAnimation(super, 4);
diff --git a/src/enemy/enemy64.c b/src/enemy/enemy64.c
index 8fde9fbc..919a569b 100644
--- a/src/enemy/enemy64.c
+++ b/src/enemy/enemy64.c
@@ -54,7 +54,7 @@ void Enemy64(Enemy64Entity* this) {
super->subAction = 0;
}
Enemy64_Actions[super->action](this);
- sub_0805EC9C(super, 0xaa, 0xaa, this->unk_78);
+ SetAffineInfo(super, 0xaa, 0xaa, this->unk_78);
super->animationState = -(this->unk_78 >> 8);
sub_080499F0(this);
this->unk_7d = super->spriteSettings.draw;
diff --git a/src/enemy/enemyE.c b/src/enemy/enemyE.c
index f0428d37..957c953b 100644
--- a/src/enemy/enemyE.c
+++ b/src/enemy/enemyE.c
@@ -54,7 +54,7 @@ void sub_08023000(Entity* this, int frames) {
tmp *= -1;
this->spriteRendering.b0 = 3;
- sub_0805EC9C(this, tmp, 0x80, 0);
+ SetAffineInfo(this, tmp, 0x80, 0);
}
// clang-format off
diff --git a/src/enemy/eyegore.c b/src/enemy/eyegore.c
index 26b22f65..aae204a2 100644
--- a/src/enemy/eyegore.c
+++ b/src/enemy/eyegore.c
@@ -196,7 +196,7 @@ void Eyegore_Action3(EyegoreEntity* this) {
super->spriteOffsetX = gUnk_080CE2BC[--super->actionDelay & 3];
} else {
GetNextFrame(super);
- if ((super->frame & 0x80) != 0) {
+ if ((super->frame & ANIM_DONE) != 0) {
super->flags |= ENT_COLLIDE;
super->animationState = 2;
sub_08030E58(this);
@@ -214,7 +214,7 @@ void Eyegore_Action4(EyegoreEntity* this) {
sub_08030E3C(this);
break;
case 2:
- if ((super->frame & 0x80) != 0) {
+ if ((super->frame & ANIM_DONE) != 0) {
super->animationState = this->unk_7f;
InitializeAnimation(super, super->animationState + 4);
}
@@ -227,7 +227,7 @@ void Eyegore_Action4(EyegoreEntity* this) {
break;
default:
- if ((super->frame & 0x80) != 0) {
+ if ((super->frame & ANIM_DONE) != 0) {
InitializeAnimation(super, super->animationState);
if ((this->unk_79 & 0x80) != 0) {
super->action = 5;
@@ -252,7 +252,7 @@ void Eyegore_Action5(EyegoreEntity* this) {
sub_08030E3C(this);
break;
case 2:
- if ((super->frame & 0x80) != 0) {
+ if ((super->frame & ANIM_DONE) != 0) {
super->animationState = this->unk_7f;
InitializeAnimation(super, super->animationState + 4);
}
@@ -261,7 +261,7 @@ void Eyegore_Action5(EyegoreEntity* this) {
}
break;
default:
- if ((super->frame & 0x80) != 0) {
+ if ((super->frame & ANIM_DONE) != 0) {
InitializeAnimation(super, super->animationState);
if (sub_08049FDC(super, 1)) {
sub_08030E58(this);
@@ -280,7 +280,7 @@ void Eyegore_Action5(EyegoreEntity* this) {
void Eyegore_Action6(EyegoreEntity* this) {
GetNextFrame(super);
- if ((super->frame & 0x80) != 0) {
+ if ((super->frame & ANIM_DONE) != 0) {
super->action = 2;
}
}
diff --git a/src/enemy/flyingSkull.c b/src/enemy/flyingSkull.c
index 261efa49..262781bb 100644
--- a/src/enemy/flyingSkull.c
+++ b/src/enemy/flyingSkull.c
@@ -20,7 +20,7 @@ void (*const gUnk_080CFBD4[])(FlyingSkullEntity*);
const s8 gUnk_080CFBE4[4];
extern s32 sub_080012DC(Entity*);
-extern void sub_08078930(Entity*);
+extern void RegisterCarryEntity(Entity*);
void sub_0803A100(FlyingSkullEntity* this);
void sub_0803A0E0(FlyingSkullEntity* this);
@@ -130,7 +130,7 @@ void sub_08039DD8(FlyingSkullEntity* this) {
sub_0803A0E0(this);
}
- sub_08078930(super);
+ RegisterCarryEntity(super);
} else {
if ((gPlayerState.flags & PL_MINISH) == 0) {
Entity* ent = &gPlayerEntity;
diff --git a/src/enemy/ghini.c b/src/enemy/ghini.c
index a7870e07..7bd4179b 100644
--- a/src/enemy/ghini.c
+++ b/src/enemy/ghini.c
@@ -250,7 +250,7 @@ void Ghini_Action7(GhiniEntity* this) {
void Ghini_Action8(GhiniEntity* this) {
sub_0803F738(this);
GetNextFrame(super);
- if ((super->frame & 0x80) != 0) {
+ if ((super->frame & ANIM_DONE) != 0) {
super->action = 9;
super->flags |= 0x80;
this->unk_78 = 0;
diff --git a/src/enemy/gibdo.c b/src/enemy/gibdo.c
index 9c29dd4e..4e18f26e 100644
--- a/src/enemy/gibdo.c
+++ b/src/enemy/gibdo.c
@@ -164,7 +164,7 @@ void sub_08037624(GibdoEntity* this) {
void sub_08037690(GibdoEntity* this) {
UpdateAnimationSingleFrame(super);
- if ((super->frame & 0x80) != 0) {
+ if ((super->frame & ANIM_DONE) != 0) {
this->field_0x77 = 0x14;
sub_08037794(this);
} else {
@@ -196,7 +196,7 @@ void sub_080376D0(GibdoEntity* this) {
void sub_0803773C(GibdoEntity* this) {
UpdateAnimationSingleFrame(super);
- if ((super->frame & 0x80) != 0) {
+ if ((super->frame & ANIM_DONE) != 0) {
sub_08037794(this);
}
}
diff --git a/src/enemy/gleerok.c b/src/enemy/gleerok.c
index fb2777e4..50ae9126 100644
--- a/src/enemy/gleerok.c
+++ b/src/enemy/gleerok.c
@@ -549,7 +549,7 @@ NONMATCH("asm/non_matching/gleerok/sub_0802D86C.inc", void sub_0802D86C(GleerokE
UpdateAnimationSingleFrame(super);
- if ((super->frame & 0x80) == 0)
+ if ((super->frame & ANIM_DONE) == 0)
return;
enemy = CreateEnemy(GLEEROK, 6);
@@ -569,7 +569,7 @@ NONMATCH("asm/non_matching/gleerok/sub_0802D86C.inc", void sub_0802D86C(GleerokE
GetNextFrame(super);
- if ((super->frame & 0x80) == 0)
+ if ((super->frame & ANIM_DONE) == 0)
return;
enemy = CreateEnemy(GLEEROK, 3);
@@ -998,7 +998,7 @@ void sub_0802E0B8(GleerokEntity* this) {
void sub_0802E1D0(GleerokEntity* this) {
Gleerok_HeapStruct* heap = this->unk_84;
- if (!(super->frame & 0x80)) {
+ if (!(super->frame & ANIM_DONE)) {
GetNextFrame(super);
}
if (super->frame & 0x3f) {
@@ -1144,7 +1144,7 @@ void sub_0802E448(GleerokEntity* this) {
void sub_0802E4C0(GleerokEntity* this) {
GetNextFrame(super);
- if (super->frame & 0x80) {
+ if (super->frame & ANIM_DONE) {
if (super->action != 2) {
this->unk_74 = 0;
this->unk_75 = 8;
@@ -1220,7 +1220,7 @@ NONMATCH("asm/non_matching/gleerok/sub_0802E518.inc", void sub_0802E518(GleerokE
r7 += heap->ent2->actionDelay;
} else {
if (super->iframes == 0) {
- if ((super->animIndex != (heap->filler[0x15] >> 3) + 0x2f) || (super->frame & 0x80) != 0) {
+ if ((super->animIndex != (heap->filler[0x15] >> 3) + 0x2f) || (super->frame & ANIM_DONE) != 0) {
r7 = (heap->filler[0x15] >> 3) + 0x28;
}
} else {
diff --git a/src/enemy/gyorgFemaleEye.c b/src/enemy/gyorgFemaleEye.c
index 84d1aa3b..6ddb4f65 100644
--- a/src/enemy/gyorgFemaleEye.c
+++ b/src/enemy/gyorgFemaleEye.c
@@ -125,7 +125,7 @@ void sub_08048B2C(GyorgFemaleEyeEntity* this) {
void sub_08048B84(GyorgFemaleEyeEntity* this) {
GetNextFrame(super);
- if (super->frame & 0x80) {
+ if (super->frame & ANIM_DONE) {
super->action = 3;
super->flags |= ENT_COLLIDE;
super->hitType = 0x1E;
@@ -155,7 +155,7 @@ void sub_08048BB0(GyorgFemaleEyeEntity* this) {
SoundReq(SFX_ITEM_GLOVES_KNOCKBACK);
}
GetNextFrame(super);
- if (super->frame & 0x80) {
+ if (super->frame & ANIM_DONE) {
super->hitType = 0x1E;
InitializeAnimation(super, gUnk_080D2010[(super->animationState << 3) + super->type]);
UpdateAnimationVariableFrames(super, 7);
@@ -176,7 +176,7 @@ void sub_08048BB0(GyorgFemaleEyeEntity* this) {
void sub_08048CEC(GyorgFemaleEyeEntity* this) {
GetNextFrame(super);
- if (super->frame & 0x80) {
+ if (super->frame & ANIM_DONE) {
super->action = 1;
InitializeAnimation(super, gUnk_080D2010[(super->animationState << 3) + super->type]);
}
diff --git a/src/enemy/gyorgMale.c b/src/enemy/gyorgMale.c
index f9ca7d8c..e0af39c7 100644
--- a/src/enemy/gyorgMale.c
+++ b/src/enemy/gyorgMale.c
@@ -106,7 +106,7 @@ void GyorgMale(GyorgMaleEntity* this) {
}
gUnk_080D1AFC[super->action](this);
if (super->action != 7) {
- sub_0805EC9C(super, 0xaa, 0xaa, this->unk_78);
+ SetAffineInfo(super, 0xaa, 0xaa, this->unk_78);
}
super->animationState = -(this->unk_78 >> 8);
sub_08048004(this);
@@ -986,7 +986,7 @@ void sub_08047BF0(GyorgMaleEntity* this) {
}
}
}
- sub_0805EC9C(super, 0xAA, 0xAA, this->unk_78);
+ SetAffineInfo(super, 0xAA, 0xAA, this->unk_78);
}
void sub_08047D24(GyorgMaleEntity* this) {
@@ -1005,7 +1005,7 @@ void sub_08047D24(GyorgMaleEntity* this) {
} else {
sub_08047E58(this);
}
- sub_0805EC9C(super, this->unk_7e, this->unk_7e, this->unk_78);
+ SetAffineInfo(super, this->unk_7e, this->unk_7e, this->unk_78);
}
}
diff --git a/src/enemy/gyorgMaleEye.c b/src/enemy/gyorgMaleEye.c
index a7586c44..4e9128f3 100644
--- a/src/enemy/gyorgMaleEye.c
+++ b/src/enemy/gyorgMaleEye.c
@@ -79,7 +79,7 @@ void GyorgMaleEye_Init(GyorgMaleEyeEntity* this) {
void GyorgMaleEye_Action1(GyorgMaleEyeEntity* this) {
sub_08048F50(this);
GetNextFrame(super);
- if ((super->frame & 0x80) != 0) {
+ if ((super->frame & ANIM_DONE) != 0) {
super->action = 2;
super->flags |= 0x80;
super->actionDelay = 0x2d;
@@ -98,7 +98,7 @@ void GyorgMaleEye_Action2(GyorgMaleEyeEntity* this) {
void GyorgMaleEye_Action3(GyorgMaleEyeEntity* this) {
sub_08048F50(this);
GetNextFrame(super);
- if ((super->frame & 0x80) != 0) {
+ if ((super->frame & ANIM_DONE) != 0) {
DeleteThisEntity();
}
}
diff --git a/src/enemy/helmasaur.c b/src/enemy/helmasaur.c
index 2c593691..5d34065a 100644
--- a/src/enemy/helmasaur.c
+++ b/src/enemy/helmasaur.c
@@ -79,7 +79,7 @@ void sub_0802BC74(Entity* this) {
sub_0802C1C0(this);
this->subAction = 1;
this->field_0x1d = 60;
- this->animationState = (gPlayerEntity.animationState >> 1) ^ 2;
+ this->animationState = AnimationStateFlip90(gPlayerEntity.animationState >> 1);
InitializeAnimation(this, this->animationState);
}
@@ -92,7 +92,7 @@ void sub_0802BCA8(Entity* this) {
Entity* ent;
this->action = 7;
- this->actionDelay = 0x5a;
+ this->actionDelay = 90;
this->zVelocity = Q_16_16(1.5);
this->hitType = 0x19;
this->field_0x3a = this->field_0x3a & 0xfb;
diff --git a/src/enemy/keaton.c b/src/enemy/keaton.c
index 340a9be5..09564cd3 100644
--- a/src/enemy/keaton.c
+++ b/src/enemy/keaton.c
@@ -85,7 +85,7 @@ void sub_0803248C(Entity* this) {
void sub_080324CC(Entity* this) {
if (sub_080325E8(this) == 0) {
UpdateAnimationSingleFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
sub_080326FC(this);
sub_08032740(this);
}
diff --git a/src/enemy/keese.c b/src/enemy/keese.c
index 63b5b78d..bbc2bac6 100644
--- a/src/enemy/keese.c
+++ b/src/enemy/keese.c
@@ -79,7 +79,7 @@ void Keese_Fly(Entity* this) {
this->field_0x7a.HWORD--;
}
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
sub_08021F24(this);
} else {
ProcessMovement1(this);
diff --git a/src/enemy/lakitu.c b/src/enemy/lakitu.c
index 70145906..971ffd09 100644
--- a/src/enemy/lakitu.c
+++ b/src/enemy/lakitu.c
@@ -152,7 +152,7 @@ void Lakitu_Hide(Entity* this) {
void Lakitu_EndHide(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = IDLE;
this->actionDelay = 0x3c;
@@ -180,7 +180,7 @@ void Lakitu_Idle(Entity* this) {
void Lakitu_BeginHide(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 1;
this->spriteSettings.draw = 0;
@@ -191,7 +191,7 @@ void Lakitu_BeginHide(Entity* this) {
void Lakitu_Lightning(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (!(this->frame & 0x80)) {
+ if (!(this->frame & ANIM_DONE)) {
return;
}
diff --git a/src/enemy/leever.c b/src/enemy/leever.c
index 4226da39..3e53a53a 100644
--- a/src/enemy/leever.c
+++ b/src/enemy/leever.c
@@ -85,7 +85,7 @@ void Leever_Idle(Entity* this) {
void Leever_DigUp(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 3;
if (this->type == LeeverForm_Red) {
this->field_0x74.HWORD = 180;
@@ -113,7 +113,7 @@ void Leever_Attack(Entity* this) {
void Leever_DigDown(Entity* this) {
Leever_Move(this);
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 1;
this->actionDelay = 0xf0;
this->spriteSettings.draw = FALSE;
diff --git a/src/enemy/madderpillar.c b/src/enemy/madderpillar.c
index cdad77e6..26ed3023 100644
--- a/src/enemy/madderpillar.c
+++ b/src/enemy/madderpillar.c
@@ -277,7 +277,7 @@ void sub_08029D14(Entity* this) {
}
} else {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 4;
this->actionDelay = 0x78;
this->hitType = 0x6c;
@@ -299,7 +299,7 @@ void sub_08029D78(Entity* this) {
void sub_08029DAC(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 6;
this->parent->field_0x76.HALF.HI = 1;
InitializeAnimation(this, this->animationState + 8);
diff --git a/src/enemy/mazaalBracelet.c b/src/enemy/mazaalBracelet.c
index 5d3a04b8..786039df 100644
--- a/src/enemy/mazaalBracelet.c
+++ b/src/enemy/mazaalBracelet.c
@@ -238,7 +238,7 @@ void sub_0803A364(Entity* this) {
break;
case 4:
GetNextFrame(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->subAction = 5;
}
break;
@@ -261,7 +261,7 @@ void sub_0803A364(Entity* this) {
break;
case 7:
GetNextFrame(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->subAction = 8;
this->spriteSettings.draw = 0;
InitAnimationForceUpdate(this->child, 8);
@@ -270,7 +270,7 @@ void sub_0803A364(Entity* this) {
break;
case 8:
sub_0803B55C(this);
- if ((this->child->frame & 0x80) == 0) {
+ if ((this->child->frame & ANIM_DONE) == 0) {
return;
}
uVar1 = 9;
@@ -286,7 +286,7 @@ void sub_0803A364(Entity* this) {
break;
case 10:
sub_0803B55C(this);
- if ((this->child->frame & 0x80) != 0) {
+ if ((this->child->frame & ANIM_DONE) != 0) {
this->subAction = 0xb;
this->spriteSettings.draw = 1;
InitializeAnimation(this, 4);
@@ -294,7 +294,7 @@ void sub_0803A364(Entity* this) {
break;
case 0xb:
GetNextFrame(this);
- if ((this->frame & 0x80) == 0) {
+ if ((this->frame & ANIM_DONE) == 0) {
return;
}
if (this->type2 != 0) {
@@ -365,7 +365,7 @@ void sub_0803A60C(Entity* this) {
index = ((this->parent->field_0xf >> 4) + 3);
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
GetNextFrame(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->action = 6;
this->spriteSettings.draw = 0;
InitAnimationForceUpdate(this->child, 8);
@@ -482,7 +482,7 @@ void sub_0803A814(Entity* this) {
index = ((this->parent->field_0xf >> 4) + 3);
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
sub_0803B55C(this);
- if ((this->child->frame & 0x80) != 0) {
+ if ((this->child->frame & ANIM_DONE) != 0) {
this->action = 0xe;
this->spriteSettings.draw = 1;
InitializeAnimation(this, 4);
@@ -497,7 +497,7 @@ void sub_0803A86C(Entity* this) {
index = ((this->parent->field_0xf >> 4) + 3);
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
GetNextFrame(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
COLLISION_ON(this);
sub_0803B59C(this);
}
@@ -619,7 +619,7 @@ void sub_0803AB10(Entity* this) {
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
LinearMoveUpdate(this);
sub_0803B55C(this);
- if ((this->child->frame & 0x80) != 0) {
+ if ((this->child->frame & ANIM_DONE) != 0) {
this->action = 0x15;
this->actionDelay = 0xf;
}
@@ -649,7 +649,7 @@ void sub_0803ABB4(Entity* this) {
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
GetNextFrame(this);
sub_0803B55C(this);
- if ((this->child->frame & 0x80) != 0) {
+ if ((this->child->frame & ANIM_DONE) != 0) {
this->action = 0x17;
COLLISION_ON(this);
this->speed = 0x180;
@@ -768,7 +768,7 @@ void sub_0803ADF4(Entity* this) {
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
UpdateAnimationSingleFrame(this);
GetNextFrame(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->action = 0x1c;
this->actionDelay = 0x1e;
this->spriteSettings.draw = 0;
@@ -803,7 +803,7 @@ void sub_0803AEC4(Entity* this) {
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
UpdateAnimationSingleFrame(this);
GetNextFrame(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
COLLISION_ON(this);
sub_0803B59C(this);
}
@@ -818,7 +818,7 @@ void sub_0803AF18(Entity* this) {
void sub_0803AF50(Entity* this) {
GetNextFrame(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->action = 0x20;
this->spriteSettings.draw = 0;
InitAnimationForceUpdate(this->child, 8);
@@ -827,7 +827,7 @@ void sub_0803AF50(Entity* this) {
void sub_0803AF7C(Entity* this) {
sub_0803B55C(this);
- if ((this->child->frame & 0x80) != 0) {
+ if ((this->child->frame & ANIM_DONE) != 0) {
this->action = 0x21;
this->actionDelay = 0xf;
}
@@ -892,7 +892,7 @@ void sub_0803B074(Entity* this) {
index = ((this->parent->field_0xf >> 4) + 3);
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
sub_0803B55C(this);
- if ((this->child->frame & 0x80) != 0) {
+ if ((this->child->frame & ANIM_DONE) != 0) {
this->action = 0x27;
this->spriteSettings.draw = 1;
InitializeAnimation(this, 4);
@@ -903,7 +903,7 @@ void sub_0803B074(Entity* this) {
void sub_0803B0D4(Entity* this) {
UpdateAnimationSingleFrame(this);
GetNextFrame(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
COLLISION_ON(this);
sub_0803B59C(this);
}
@@ -938,7 +938,7 @@ void sub_0803B144(Entity* this) {
void sub_0803B17C(Entity* this) {
GetNextFrame(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->action = 0x2b;
COLLISION_ON(this);
this->hitType = 0x18;
@@ -951,7 +951,7 @@ void sub_0803B1B8(Entity* this) {
Entity* temp;
u16 val;
- if ((this->frame & 0x80) == 0) {
+ if ((this->frame & ANIM_DONE) == 0) {
GetNextFrame(this);
UpdateAnimationSingleFrame(this->child);
}
@@ -994,7 +994,7 @@ void sub_0803B2D0(Entity* this) {
Entity* entity;
GetNextFrame(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->action = 0x2d;
this->spriteSettings.draw = 0;
entity = *(Entity**)&this->field_0x74;
@@ -1009,7 +1009,7 @@ void sub_0803B30C(Entity* this) {
Entity* entity;
entity = *(Entity**)&this->field_0x74;
- if ((entity->frame & 0x80) != 0) {
+ if ((entity->frame & ANIM_DONE) != 0) {
this->action = 0x2e;
sub_0803B8E8(this, 0x13);
InitializeAnimation(entity, 0);
@@ -1064,7 +1064,7 @@ void sub_0803B3F4(Entity* this) {
index = ((this->parent->field_0xf >> 4) + 3);
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
GetNextFrame(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->hitType = 0x17;
if (this->type == 0) {
this->hitbox = (Hitbox*)&gUnk_080FD35C;
diff --git a/src/enemy/mazaalHead.c b/src/enemy/mazaalHead.c
index add39f8b..feee0839 100644
--- a/src/enemy/mazaalHead.c
+++ b/src/enemy/mazaalHead.c
@@ -757,7 +757,7 @@ void sub_08034B0C(Entity* this) {
this->actionDelay--;
} else {
GetNextFrame(this);
- if ((this->frame & 0x80) == 0) {
+ if ((this->frame & ANIM_DONE) == 0) {
return;
}
this->action = 2;
@@ -789,7 +789,7 @@ void sub_08034B38(Entity* this) {
void sub_08034BA0(Entity* this) {
GetNextFrame(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->parent->field_0x7c.HALF.HI = 0xff;
DeleteEntity(this);
}
diff --git a/src/enemy/moldworm.c b/src/enemy/moldworm.c
index b6099372..03f29e2a 100644
--- a/src/enemy/moldworm.c
+++ b/src/enemy/moldworm.c
@@ -170,7 +170,7 @@ void sub_08023288(Entity* this) {
void sub_08023330(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 4;
this->actionDelay = 0x19;
COLLISION_ON(this);
diff --git a/src/enemy/octorok.c b/src/enemy/octorok.c
index 5ee3c12a..a205d1d6 100644
--- a/src/enemy/octorok.c
+++ b/src/enemy/octorok.c
@@ -94,7 +94,7 @@ void sub_0801EB9C(Entity* this) {
void Octorok_Initialize(Entity* this) {
sub_0804A720(this);
if (this->type == 2) {
- this->animationState = this->type;
+ this->animationState = 2;
} else {
this->animationState = Random() & 3;
}
@@ -141,13 +141,13 @@ void Octorok_ShootNut(Entity* this) {
}
}
- if (this->frame & 0x80)
+ if (this->frame & ANIM_DONE)
Octorok_Pause(this);
}
void Octorok_Pause(Entity* this) {
this->action = 1;
- this->actionDelay = (Random() & 0x38) + 0x18;
+ this->actionDelay = (Random() & 0x38) + 24;
}
void Octorok_Turn(Entity* this) {
diff --git a/src/enemy/octorokBoss.c b/src/enemy/octorokBoss.c
index b4fbc73a..49ca9525 100644
--- a/src/enemy/octorokBoss.c
+++ b/src/enemy/octorokBoss.c
@@ -125,7 +125,7 @@ void OctorokBoss_Hit(OctorokBossEntity* this) {
sub_08078B48();
}
sub_0800445C(super);
- sub_0805EC9C(super, this->unk_76, this->unk_74, this->angle.HWORD);
+ SetAffineInfo(super, this->unk_76, this->unk_74, this->angle.HWORD);
}
void OctorokBoss_Hit_SubAction0(OctorokBossEntity* this) {
@@ -327,7 +327,7 @@ void OctorokBoss_Intro(OctorokBossEntity* this) {
gUnk_02034490.unk0 = 1;
sub_08036F60(this);
OctorokBoss_Intro_SubActions[super->subAction](this);
- sub_0805EC9C(super, this->unk_76, this->unk_74, this->angle.HWORD);
+ SetAffineInfo(super, this->unk_76, this->unk_74, this->angle.HWORD);
}
void OctorokBoss_Intro_SubAction0(OctorokBossEntity* this) {
@@ -475,7 +475,7 @@ void OctorokBoss_Action1(OctorokBossEntity* this) {
sub_08036914(super, angle, radius);
this->angle.HALF.HI = ((OctorokBossEntity*)super->parent)->angle.HALF.HI +
OctorokBoss_LegAngleOffset2[super->type - 1] + this->timer;
- sub_0805EC9C(super, this->unk_76, this->unk_74, this->angle.HWORD);
+ SetAffineInfo(super, this->unk_76, this->unk_74, this->angle.HWORD);
break;
case TAIL:
@@ -522,7 +522,7 @@ void OctorokBoss_Action1(OctorokBossEntity* this) {
sub_080369D0(this, GET_TAIL_RADIUS(this), 4);
}
super->bitfield = 0;
- sub_0805EC9C(super, this->unk_76, this->unk_74, -this->angle.HWORD ^ 0x8000);
+ SetAffineInfo(super, this->unk_76, this->unk_74, -this->angle.HWORD ^ 0x8000);
break;
case MOUTH:
@@ -546,7 +546,7 @@ void OctorokBoss_Action1(OctorokBossEntity* this) {
sub_08036914(super, angle, radius);
this->angle.HALF.HI = ((OctorokBossEntity*)super->parent)->angle.HALF.HI;
- sub_0805EC9C(super, this->unk_76, this->unk_74, this->angle.HWORD);
+ SetAffineInfo(super, this->unk_76, this->unk_74, this->angle.HWORD);
sub_0800445C(super);
}
break;
@@ -562,7 +562,7 @@ void OctorokBoss_Action1(OctorokBossEntity* this) {
}
}
OctorokBoss_Action1_SubActions[super->subAction](this);
- sub_0805EC9C(super, this->unk_76, this->unk_74, this->angle.HWORD);
+ SetAffineInfo(super, this->unk_76, this->unk_74, this->angle.HWORD);
break;
}
}
@@ -905,7 +905,7 @@ void OctorokBoss_Burning(OctorokBossEntity* this) {
CreateProjectileWithParent(super, OCTOROK_BOSS_PROJECTILE, 3);
}
}
- sub_0805EC9C(super, this->unk_76, this->unk_74, this->angle.HWORD);
+ SetAffineInfo(super, this->unk_76, this->unk_74, this->angle.HWORD);
}
void OctorokBoss_Burning_SubAction0(OctorokBossEntity* this) {
diff --git a/src/enemy/octorokGolden.c b/src/enemy/octorokGolden.c
index 9f38b9c7..4bdac449 100644
--- a/src/enemy/octorokGolden.c
+++ b/src/enemy/octorokGolden.c
@@ -90,7 +90,7 @@ void sub_08037D54(Entity* this) {
EnqueueSFX(SFX_124);
}
}
- } else if (this->frame & 0x80) {
+ } else if (this->frame & ANIM_DONE) {
if (--this->actionDelay == 0) {
this->action = 1;
this->field_0xf = 0x3c;
diff --git a/src/enemy/peahat.c b/src/enemy/peahat.c
index 3f85d704..c6051ba0 100644
--- a/src/enemy/peahat.c
+++ b/src/enemy/peahat.c
@@ -289,7 +289,7 @@ void Peahat_Recover(Entity* this) {
void Peahat_Hop(Entity* this) {
GetNextFrame(this);
if (--this->actionDelay == 0) {
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 9;
this->zVelocity = Q_16_16(1.5);
this->animationState = PeahatAnimation_NewPropeller;
@@ -313,7 +313,7 @@ void Peahat_Hop(Entity* this) {
void Peahat_Takeoff(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 1;
this->hitType = 0x70;
this->field_0x82.HALF.LO = 1;
diff --git a/src/enemy/puffstool.c b/src/enemy/puffstool.c
index 94111c8f..18838cf6 100644
--- a/src/enemy/puffstool.c
+++ b/src/enemy/puffstool.c
@@ -237,7 +237,7 @@ void sub_080253D4(Entity* this) {
void sub_0802541C(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 3;
this->field_0xf = 1;
this->zVelocity = Q_16_16(2);
@@ -270,7 +270,7 @@ void sub_0802547C(Entity* this) {
void sub_080254B4(Entity* this) {
GravityUpdate(this, Q_16_16(0.125));
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
if (this->z.HALF.HI == 0) {
if (this->cutsceneBeh.HWORD == 0) {
this->hitType = 0x82;
diff --git a/src/enemy/rollobite.c b/src/enemy/rollobite.c
index d0d22bc9..c9beaa52 100644
--- a/src/enemy/rollobite.c
+++ b/src/enemy/rollobite.c
@@ -21,7 +21,7 @@ void sub_08020A7C(Entity*);
bool32 Rollobite_TryToHoleUp(Entity*);
bool32 Rollobite_IsRolledUp(Entity*);
-extern void sub_08078930(Entity*);
+extern void RegisterCarryEntity(Entity*);
void Rollobite(Entity* this) {
EnemyFunctionHandler(this, Rollobite_Functions);
@@ -175,7 +175,7 @@ void Rollobite_Turn(Entity* this) {
void Rollobite_RolledUp(Entity* this) {
u32 unk;
- if ((this->frame & 0x80) == 0)
+ if ((this->frame & ANIM_DONE) == 0)
GetNextFrame(this);
unk = sub_080044EC(this, 0x2800);
@@ -185,7 +185,7 @@ void Rollobite_RolledUp(Entity* this) {
this->action = 5;
InitializeAnimation(this, this->animationState + 12);
}
- sub_08078930(this);
+ RegisterCarryEntity(this);
} else {
if (unk == 1)
EnqueueSFX(SFX_104);
@@ -197,7 +197,7 @@ void Rollobite_RolledUp(Entity* this) {
void Rollobite_Unroll(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
COLLISION_ON(this);
this->speed = 0x100;
this->hitType = 34;
@@ -206,7 +206,7 @@ void Rollobite_Unroll(Entity* this) {
InitializeAnimation(this, this->animationState);
} else {
if ((this->frame & 1) == 0)
- sub_08078930(this);
+ RegisterCarryEntity(this);
}
}
diff --git a/src/enemy/rope.c b/src/enemy/rope.c
index 48a59799..8d728a03 100644
--- a/src/enemy/rope.c
+++ b/src/enemy/rope.c
@@ -174,7 +174,7 @@ void sub_08031600(Entity* this) {
u32 sub_0803163C(Entity* this) {
u32 h;
- if (sub_080B1AA8(this) == 0x13) {
+ if (GetTileUnderEntity(this) == 0x13) {
h = this->field_0x7a.HWORD / 2;
} else {
h = this->field_0x7a.HWORD;
diff --git a/src/enemy/rupeeLike.c b/src/enemy/rupeeLike.c
index 903ddc0b..720243ed 100644
--- a/src/enemy/rupeeLike.c
+++ b/src/enemy/rupeeLike.c
@@ -122,7 +122,7 @@ void sub_08029474(Entity* this) {
u32 bVar1;
sub_080296C8(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 3;
this->actionDelay = 8;
bVar1 = GetFacingDirection(this, &gPlayerEntity);
@@ -196,7 +196,7 @@ void sub_08029610(Entity* this) {
void sub_08029630(Entity* this) {
sub_080296C8(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->field_0x80.HALF.HI = 1;
this->child->spriteSettings.draw = FALSE;
sub_080297F0(this);
diff --git a/src/enemy/scissorsBeetle.c b/src/enemy/scissorsBeetle.c
index 41f84df0..28ce9d57 100644
--- a/src/enemy/scissorsBeetle.c
+++ b/src/enemy/scissorsBeetle.c
@@ -142,7 +142,7 @@ void sub_08038B08(ScissorsBeetleEntity* this) {
}
UpdateAnimationSingleFrame(super);
- if (super->frame & 0x80) {
+ if (super->frame & ANIM_DONE) {
super->action = 4;
this->unk_82 = 3;
super->actionDelay = 0x32;
diff --git a/src/enemy/sluggula.c b/src/enemy/sluggula.c
index e6b5eb87..5405cf71 100644
--- a/src/enemy/sluggula.c
+++ b/src/enemy/sluggula.c
@@ -134,7 +134,7 @@ void sub_08023CE0(Entity* this) {
default:
GetNextFrame(this);
if (this->frame) {
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
Entity* ent = CreateEnemy(SLUGGULA, 1);
if (ent) {
sub_0804A4E4(this, ent);
@@ -157,7 +157,7 @@ void sub_08023E10(Entity* this) {
}
GetNextFrame(this);
- if (this->frame & 0x80)
+ if (this->frame & ANIM_DONE)
DeleteEntity(this);
}
diff --git a/src/enemy/spinyBeetle.c b/src/enemy/spinyBeetle.c
index 6ab1efcd..cbdfe52e 100644
--- a/src/enemy/spinyBeetle.c
+++ b/src/enemy/spinyBeetle.c
@@ -171,7 +171,7 @@ void sub_08033A7C(SpinyBeetleEntity* this) {
}
GetNextFrame(super);
- if ((super->frame & 0x80) == 0)
+ if ((super->frame & ANIM_DONE) == 0)
return;
super->action = 3;
diff --git a/src/enemy/spinyChuchu.c b/src/enemy/spinyChuchu.c
index 784d1a2e..7d49e0d2 100644
--- a/src/enemy/spinyChuchu.c
+++ b/src/enemy/spinyChuchu.c
@@ -181,7 +181,7 @@ void sub_080226EC(Entity* this) {
void sub_08022780(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 4;
InitializeAnimation(this, 3);
EnqueueSFX(SFX_194);
@@ -201,7 +201,7 @@ void sub_080227AC(Entity* this) {
this->hitType = 0x5c;
}
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 2;
this->field_0xf = gUnk_080CBA60[Random() & 3];
InitializeAnimation(this, 0);
@@ -211,7 +211,7 @@ void sub_080227AC(Entity* this) {
void sub_0802281C(Entity* this) {
GravityUpdate(this, Q_8_8(24.0));
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 2;
this->speed = 0x20;
InitializeAnimation(this, 0);
@@ -234,7 +234,7 @@ void sub_08022854(Entity* this) {
void sub_0802289C(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 2;
this->speed = 0x20;
this->field_0x80.HALF.HI = 0x78;
diff --git a/src/enemy/stalfos.c b/src/enemy/stalfos.c
index 2751cd5b..67f6b6e1 100644
--- a/src/enemy/stalfos.c
+++ b/src/enemy/stalfos.c
@@ -269,7 +269,7 @@ void Stalfos_Action11(StalfosEntity* this) {
void Stalfos_Action12(StalfosEntity* this) {
UpdateAnimationSingleFrame(super);
- if ((super->frame & 0x80) != 0) {
+ if ((super->frame & ANIM_DONE) != 0) {
if (super->type2 == 1) {
sub_0803998C(this);
DeleteEntity(super->child);
diff --git a/src/enemy/tektite.c b/src/enemy/tektite.c
index ddeb53d2..db461a94 100644
--- a/src/enemy/tektite.c
+++ b/src/enemy/tektite.c
@@ -97,7 +97,7 @@ void sub_0802F284(Entity* this) {
if (this->actionDelay != 0) {
this->actionDelay--;
} else if (this->field_0xf != 0) {
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 2;
this->actionDelay = 0x10;
this->field_0xf = this->type;
@@ -105,7 +105,7 @@ void sub_0802F284(Entity* this) {
sub_0802F45C(this);
InitializeAnimation(this, 2);
}
- } else if (this->frame & 0x80) {
+ } else if (this->frame & ANIM_DONE) {
this->field_0xf = 0x40;
InitializeAnimation(this, 1);
}
@@ -137,7 +137,7 @@ void sub_0802F300(Entity* this) {
return;
} else if (this->collisions != 0) {
sub_0800417E(this, this->collisions);
- } else if ((sub_080B1AA8(this) & 0xf0) == 0x50) {
+ } else if ((GetTileUnderEntity(this) & 0xf0) == 0x50) {
this->direction = (this->direction + 0x10) & 0x1f;
}
@@ -167,7 +167,7 @@ void sub_0802F3F4(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
if ((*(u8*)&this->field_0x7c.HALF.LO < 2) && ((this->type % 2) != 0)) {
this->action = 2;
this->actionDelay = 0x10;
diff --git a/src/enemy/tektiteGolden.c b/src/enemy/tektiteGolden.c
index b35f8f2c..af71db25 100644
--- a/src/enemy/tektiteGolden.c
+++ b/src/enemy/tektiteGolden.c
@@ -85,7 +85,7 @@ void sub_08037Fe0(Entity* this) {
if (this->actionDelay != 0) {
this->actionDelay--;
} else if (this->field_0xf != 0) {
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 2;
this->actionDelay = 6;
this->field_0xf = 0;
@@ -93,7 +93,7 @@ void sub_08037Fe0(Entity* this) {
sub_08038168(this);
InitializeAnimation(this, 2);
}
- } else if (this->frame & 0x80) {
+ } else if (this->frame & ANIM_DONE) {
this->field_0xf = 0x40;
InitializeAnimation(this, 1);
}
@@ -116,7 +116,7 @@ void sub_08038048(Entity* this) {
return;
} else if (this->collisions != 0) {
sub_0800417E(this, this->collisions);
- } else if ((sub_080B1AA8(this) & 0xf0) == 0x50) {
+ } else if ((GetTileUnderEntity(this) & 0xf0) == 0x50) {
this->direction = (this->direction + 0x10) & 0x1f;
}
@@ -141,7 +141,7 @@ void sub_08038048(Entity* this) {
void sub_08038110(Entity* this) {
UpdateAnimationVariableFrames(this, 2);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
if (this->field_0x80.HALF.LO < 5) {
this->action = 2;
this->actionDelay = 8;
diff --git a/src/enemy/vaatiArm.c b/src/enemy/vaatiArm.c
index e4b6e5e4..d9f17946 100644
--- a/src/enemy/vaatiArm.c
+++ b/src/enemy/vaatiArm.c
@@ -713,7 +713,7 @@ void sub_08042FD8(Entity* this) {
this->frame = 0;
}
} else {
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
if (--this->field_0xf == 0) {
this->subAction = 8;
this->actionDelay = 0x3c;
diff --git a/src/enemy/vaatiBall.c b/src/enemy/vaatiBall.c
index 222e1dd4..fa72f6f8 100644
--- a/src/enemy/vaatiBall.c
+++ b/src/enemy/vaatiBall.c
@@ -162,7 +162,7 @@ void sub_08044868(Entity* this) {
if (this->field_0x82.HALF.HI) {
switch (this->field_0x74.HALF.LO) {
case 0:
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->field_0x74.HALF.LO = 1;
this->direction = sub_080045B4(this, vaati->x.HALF.HI, vaati->y.HALF.HI - 0x10);
this->speed = 0x180;
diff --git a/src/enemy/vaatiProjectile.c b/src/enemy/vaatiProjectile.c
index 9c875dd0..320e4bf3 100644
--- a/src/enemy/vaatiProjectile.c
+++ b/src/enemy/vaatiProjectile.c
@@ -153,7 +153,7 @@ void VaatiProjectileFunction0Action2(Entity* this) {
}
void VaatiProjectileFunction0Action3(Entity* this) {
- if (this->child->frame & 0x80) {
+ if (this->child->frame & ANIM_DONE) {
if (--this->z.HALF.HI <= -0x18) {
this->action = 4;
this->actionDelay = (Random() & 0xf) + 0xf;
diff --git a/src/enemy/vaatiRebornEnemy.c b/src/enemy/vaatiRebornEnemy.c
index a84dfcbc..07639d76 100644
--- a/src/enemy/vaatiRebornEnemy.c
+++ b/src/enemy/vaatiRebornEnemy.c
@@ -235,7 +235,7 @@ void VaatiRebornEnemyType0Action2(Entity* this) {
}
break;
case 1:
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->field_0x74.HALF.LO = 2;
this->spriteSettings.draw = 0;
this->actionDelay = 0x10;
@@ -260,7 +260,7 @@ void VaatiRebornEnemyType0Action2(Entity* this) {
}
break;
case 3:
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->spriteSettings.draw = 1;
if (4 < this->field_0x80.HALF.HI) {
this->x.HALF.HI = gPlayerEntity.x.HALF.HI;
@@ -318,7 +318,7 @@ void VaatiRebornEnemyType0Action3(Entity* this) {
}
break;
case 2:
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->field_0x74.HALF.LO = 3;
InitAnimationForceUpdate(this, 0);
}
diff --git a/src/enemy/vaatiTransfigured.c b/src/enemy/vaatiTransfigured.c
index 7ca2f6d7..7149ea69 100644
--- a/src/enemy/vaatiTransfigured.c
+++ b/src/enemy/vaatiTransfigured.c
@@ -675,7 +675,7 @@ void VaatiTransfiguredType2Action1(Entity* this) {
}
break;
case 1:
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->field_0x74.HALF.LO = 0;
this->field_0xf = (Random() & 0x7f) + 0x17;
InitAnimationForceUpdate(this, 0);
@@ -790,7 +790,7 @@ void VaatiTransfiguredType5Action1(Entity* this) {
this->field_0x80.HALF.LO = 0;
this->spriteSettings.draw = 0;
} else {
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->frame &= ~0x80;
if (gEntCount < 0x47) {
sub_08040648(this, this->type, 1);
@@ -814,13 +814,13 @@ void VaatiTransfiguredType5Action2(Entity* this) {
}
if (this->field_0x80.HALF.LO == 0) {
if (this->parent->parent->action != 6) {
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->field_0x80.HALF.LO += 1;
InitializeAnimation(this, 3);
}
}
} else {
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
DeleteThisEntity();
}
}
diff --git a/src/enemy/vaatiTransfiguredEye.c b/src/enemy/vaatiTransfiguredEye.c
index cd42c7a3..457b294d 100644
--- a/src/enemy/vaatiTransfiguredEye.c
+++ b/src/enemy/vaatiTransfiguredEye.c
@@ -129,7 +129,7 @@ void VaatiTransfiguredEyeFunction0Action0(Entity* this) {
void VaatiTransfiguredEyeFunction0Action1(Entity* this) {
sub_08045A28(this);
if (this->field_0x82.HALF.LO == 0) {
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
if (this->type != 0) {
COLLISION_ON(this);
}
@@ -169,7 +169,7 @@ void VaatiTransfiguredEyeFunction0Action2(Entity* this) {
void VaatiTransfiguredEyeFunction0Action3(Entity* this) {
sub_08045A28(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->action = 2;
if (this->type != 0) {
if (this->actionDelay == 0) {
@@ -187,7 +187,7 @@ void VaatiTransfiguredEyeFunction0Action4(Entity* this) {
sub_08045A28(this);
if (this->field_0xf == 0) {
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->field_0xf = 0x20;
}
} else {
diff --git a/src/enemy/vaatiWrath.c b/src/enemy/vaatiWrath.c
index af31d2f8..2d8c3619 100644
--- a/src/enemy/vaatiWrath.c
+++ b/src/enemy/vaatiWrath.c
@@ -365,7 +365,7 @@ void VaatiWrathType0Action6(Entity* this) {
type1->frame &= 0xfd;
}
} else {
- if ((type1->frame & 0x80) != 0) {
+ if ((type1->frame & ANIM_DONE) != 0) {
sub_0804235C(this);
}
}
@@ -546,7 +546,7 @@ void VaatiWrathType0ActionC(Entity* this) {
entity->frame &= 0xfe;
InitAnimationForceUpdate(this, 9);
} else {
- if (entity->frame & 0x80) {
+ if (entity->frame & ANIM_DONE) {
sub_0804235C(this);
}
}
@@ -617,7 +617,7 @@ void sub_08041BE8(Entity* this) {
void sub_08041CD0(Entity* this) {
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
if (this->actionDelay != 0) {
this->actionDelay--;
} else {
@@ -964,7 +964,7 @@ u32 sub_080422C0(Entity* this, u32 unk1) {
type1->frame &= 0xfb;
InitAnimationForceUpdate(this, 3);
} else {
- if (type1->frame & 0x80) {
+ if (type1->frame & ANIM_DONE) {
InitAnimationForceUpdate(this, 0);
type1->subAction = 0;
InitializeAnimation(type1, 0xc);
diff --git a/src/enemy/vaatiWrathEye.c b/src/enemy/vaatiWrathEye.c
index 690d8ee6..784be12b 100644
--- a/src/enemy/vaatiWrathEye.c
+++ b/src/enemy/vaatiWrathEye.c
@@ -56,7 +56,7 @@ void VaatiWrathEyeAction0(Entity* this) {
void VaatiWrathEyeAction1(Entity* this) {
sub_080485D8(this);
GetNextFrame(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->action = 2;
InitializeAnimation(this, 1);
}
@@ -105,7 +105,7 @@ void VaatiWrathEyeAction4(Entity* this) {
}
} else {
GetNextFrame(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->action = 5;
this->actionDelay = 0;
}
@@ -137,7 +137,7 @@ void VaatiWrathEyeAction6(Entity* this) {
InitializeAnimation(this, 6);
}
} else {
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
this->action = 7;
this->actionDelay = 120;
this->field_0xf = 0;
@@ -193,7 +193,7 @@ void VaatiWrathEyeAction8(Entity* this) {
void VaatiWrathEyeAction9(Entity* this) {
sub_080485FC(this);
GetNextFrame(this);
- if ((this->frame & 0x80) != 0) {
+ if ((this->frame & ANIM_DONE) != 0) {
this->action = 4;
this->actionDelay = 1;
this->parent->field_0x7a.HALF.HI = (this->parent->field_0x7a.HALF.HI & 0xf) | (1 << this->type);
diff --git a/src/enemy/wallMaster.c b/src/enemy/wallMaster.c
index 7f08b67e..b9377a19 100644
--- a/src/enemy/wallMaster.c
+++ b/src/enemy/wallMaster.c
@@ -112,7 +112,7 @@ void sub_0802A610(Entity* this) {
GetNextFrame(this);
sub_0802A7D0(this);
- flags = this->frame & 0x80;
+ flags = this->frame & ANIM_DONE;
if (flags) {
this->action = 4;
this->actionDelay = 0x1e;
@@ -154,7 +154,7 @@ void sub_0802A69C(Entity* this) {
/* sigh... */
GetNextFrame(this);
- flags = this->frame & 0x80;
+ flags = this->frame & ANIM_DONE;
if (flags) {
this->action = 6;
this->actionDelay = 0x1e;
@@ -193,7 +193,7 @@ void sub_0802A78C(Entity* this) {
void sub_0802A7D0(Entity* this) {
u32 unk = gUnk_080CD0B0[(this->field_0x7c.BYTES.byte1++ >> 3) & 7] + 0x100;
- sub_0805EC9C(this, unk, unk, 0);
+ SetAffineInfo(this, unk, unk, 0);
}
// clang-format off
void (*const WallMaster_Functions[])(Entity*) = {
diff --git a/src/enemy/wallMaster2.c b/src/enemy/wallMaster2.c
index 3ee61f51..989097fe 100644
--- a/src/enemy/wallMaster2.c
+++ b/src/enemy/wallMaster2.c
@@ -131,7 +131,7 @@ void sub_0802CE68(Entity* this) {
}
sub_0802CFD8(this);
GetNextFrame(this);
- frames = this->frame & 0x80;
+ frames = this->frame & ANIM_DONE;
if (frames) {
this->action = 4;
this->actionDelay = 30;
@@ -169,7 +169,7 @@ ASM_FUNC("asm/non_matching/wallMaster2/sub_0802CF8C.inc", void sub_0802CF8C(Enti
void sub_0802CFD8(Entity* this) {
u32 unk = gUnk_080CD740[(this->field_0x7a.HALF.LO++ >> 3) & 7];
- sub_0805EC9C(this, (s16)this->field_0x74.HWORD + unk, 0x100 + unk, this->field_0x76.HWORD);
+ SetAffineInfo(this, (s16)this->field_0x74.HWORD + unk, 0x100 + unk, this->field_0x76.HWORD);
}
// clang-format off
diff --git a/src/enemy/waterDrop.c b/src/enemy/waterDrop.c
index 39c329a2..629c54cd 100644
--- a/src/enemy/waterDrop.c
+++ b/src/enemy/waterDrop.c
@@ -56,7 +56,7 @@ void sub_0802A2B4(Entity* this) {
void sub_0802A2FC(Entity* this) {
GetNextFrame(this);
- if (this->frame & 0x80) {
+ if (this->frame & ANIM_DONE) {
DeleteEntity(this);
} else if (this->frame & 1) {
COLLISION_OFF(this);