From 92240d43147dd36ed879ce1084f7ca6e35f1db96 Mon Sep 17 00:00:00 2001 From: theo3 Date: Mon, 28 Mar 2022 19:51:32 -0700 Subject: name remaining entity fields --- src/projectile/arrowProjectile.c | 24 ++++++++++++------------ src/projectile/ballAndChain.c | 4 ++-- src/projectile/boneProjectile.c | 6 +++--- src/projectile/cannonballProjectile.c | 2 +- src/projectile/darkNutSwordSlash.c | 4 ++-- src/projectile/dekuSeedProjectile.c | 22 +++++++++++----------- src/projectile/dirtBallProjectile.c | 16 ++++++++-------- src/projectile/fireProjectile.c | 4 ++-- src/projectile/gleerokProjectile.c | 12 ++++++------ src/projectile/guardLineOfSight.c | 18 +++++++++--------- src/projectile/guruguruBarProjectile.c | 2 +- src/projectile/gyorgMaleEnergyProjectile.c | 8 ++++---- src/projectile/gyorgTail.c | 10 +++++----- src/projectile/iceProjectile.c | 4 ++-- src/projectile/keatonDagger.c | 2 +- src/projectile/lakituLightning.c | 6 +++--- src/projectile/mandiblesProjectile.c | 30 +++++++++++++++--------------- src/projectile/mazaalEnergyBeam.c | 4 ++-- src/projectile/moblinSpear.c | 4 ++-- src/projectile/octorokBossProjectile.c | 28 ++++++++++++++-------------- src/projectile/projectile5.c | 4 ++-- src/projectile/removableDust.c | 4 ++-- src/projectile/rockProjectile.c | 6 +++--- src/projectile/spiderWeb.c | 14 +++++++------- src/projectile/stalfosProjectile.c | 4 ++-- src/projectile/torchTrapProjectile.c | 6 +++--- src/projectile/v1DarkMagicProjectile.c | 16 ++++++++-------- src/projectile/v1EyeLaser.c | 18 +++++++++--------- src/projectile/v1FireProjectile.c | 10 +++++----- src/projectile/v2Projectile.c | 16 ++++++++-------- src/projectile/v3ElectricProjectile.c | 30 +++++++++++++++--------------- src/projectile/v3TennisBallProjectile.c | 6 +++--- src/projectile/windProjectile.c | 4 ++-- 33 files changed, 174 insertions(+), 174 deletions(-) (limited to 'src/projectile') diff --git a/src/projectile/arrowProjectile.c b/src/projectile/arrowProjectile.c index 755ee6f8..a5284759 100644 --- a/src/projectile/arrowProjectile.c +++ b/src/projectile/arrowProjectile.c @@ -28,8 +28,8 @@ void ArrowProjectile_OnTick(Entity* this) { } void sub_080A9334(Entity* this) { - if ((this->bitfield & 0x80) != 0) { - if ((this->bitfield & 0x3f) != 0) { + if ((this->contactFlags & 0x80) != 0) { + if ((this->contactFlags & 0x3f) != 0) { ModHealth(-2); sub_080A9488(this); this->knockbackDuration = 0; @@ -44,8 +44,8 @@ void ArrowProjectile_Init(Entity* this) { this->action = 1; this->spriteSettings.draw = 1; COLLISION_OFF(this); - this->actionDelay = 0x6a; - this->field_0xf = 0; + this->timer = 0x6a; + this->subtimer = 0; this->zVelocity = 0xa00; sub_080A94C0(this, this->type); } @@ -55,10 +55,10 @@ void ArrowProjectile_Action1(Entity* this) { if ((parent == NULL) || (parent->next == NULL)) { DeleteThisEntity(); } - if (this->field_0xf != 0) { + if (this->subtimer != 0) { DeleteThisEntity(); } - if (parent->field_0xf != 0) { + if (parent->subtimer != 0) { this->action = 2; COLLISION_ON(this); parent->child = NULL; @@ -70,18 +70,18 @@ void ArrowProjectile_Action2(Entity* this) { if (this->collisions != COL_NONE) { this->action = 3; COLLISION_OFF(this); - this->actionDelay = 0x20; + this->timer = 0x20; InitializeAnimation(this, this->animIndex + 2); EnqueueSFX(SFX_18A); LinearMoveUpdate(this); - } else if (--this->actionDelay == 0) { + } else if (--this->timer == 0) { DeleteThisEntity(); } ProcessMovement3(this); } void ArrowProjectile_Action3(Entity* this) { - if (--this->actionDelay == 0) { + if (--this->timer == 0) { DeleteThisEntity(); } GetNextFrame(this); @@ -92,8 +92,8 @@ void ArrowProjectile_Action4(Entity* this) { CreateDust(this); DeleteThisEntity(); } else { - if (--this->actionDelay == 0) { - this->actionDelay = 2; + if (--this->timer == 0) { + this->timer = 2; this->animationState = (this->animationState + 1) & 3; sub_080A94C0(this, this->animationState); } @@ -103,7 +103,7 @@ void ArrowProjectile_Action4(Entity* this) { void sub_080A9488(Entity* this) { this->action = 4; COLLISION_OFF(this); - this->actionDelay = 2; + this->timer = 2; this->zVelocity = 0x18000; this->animationState = (this->knockbackDirection & 0x18) >> 3; EnqueueSFX(SFX_METAL_CLINK); diff --git a/src/projectile/ballAndChain.c b/src/projectile/ballAndChain.c index bc206a8f..110c80a0 100644 --- a/src/projectile/ballAndChain.c +++ b/src/projectile/ballAndChain.c @@ -123,13 +123,13 @@ void sub_080AB170(Entity* this) { void sub_080AB26C(Entity* this) { if (this->action == 0) { this->action = 1; - this->actionDelay = 5; + this->timer = 5; this->frameIndex = 0; #ifndef EU this->spritePriority.b1 = 0; #endif } - if (--this->actionDelay == 0) { + if (--this->timer == 0) { DeleteThisEntity(); } else { this->frameIndex += 1; diff --git a/src/projectile/boneProjectile.c b/src/projectile/boneProjectile.c index 429a94c9..88c5bc75 100644 --- a/src/projectile/boneProjectile.c +++ b/src/projectile/boneProjectile.c @@ -17,7 +17,7 @@ void BoneProjectile_OnTick(Entity* this) { } void sub_080A81C4(Entity* this) { - if (this->bitfield == 0x80) { + if (this->contactFlags == 0x80) { DeleteEntity(this); } else { sub_080A82D8(this); @@ -26,7 +26,7 @@ void sub_080A81C4(Entity* this) { void BoneProjectile_Init(Entity* this) { this->action = 1; - this->actionDelay = 60; + this->timer = 60; this->z.HALF.HI = -2; InitializeAnimation(this, 0); } @@ -39,7 +39,7 @@ void BoneProjectile_Action1(Entity* this) { DeleteEntity(this); } else { sub_08016AD2(this); - if (--this->actionDelay == 0) { + if (--this->timer == 0) { this->action = 2; this->speed = 0x120; } diff --git a/src/projectile/cannonballProjectile.c b/src/projectile/cannonballProjectile.c index 18e79a67..0276947b 100644 --- a/src/projectile/cannonballProjectile.c +++ b/src/projectile/cannonballProjectile.c @@ -78,7 +78,7 @@ bool32 sub_080AB634(Entity* this) { if (entities[i] != NULL && (IsColliding(this, entities[i]) != 0)) { if (entities[i]->action < 3) { entities[i]->action = 3; - entities[i]->actionDelay = 0x1e; + entities[i]->timer = 0x1e; entities[i]->spriteSettings.draw = 0; CreateFx(entities[i], FX_WHITE_ROCK, 0); } diff --git a/src/projectile/darkNutSwordSlash.c b/src/projectile/darkNutSwordSlash.c index 3f08486f..e0f3d3af 100644 --- a/src/projectile/darkNutSwordSlash.c +++ b/src/projectile/darkNutSwordSlash.c @@ -24,10 +24,10 @@ void DarkNutSwordSlash(Entity* this) { if ((this->parent == NULL) || (this->parent->health == 0)) { DeleteThisEntity(); } - if (((this->bitfield & 0x80) != 0) && (this->field_0x4c == &gPlayerEntity)) { + if (((this->contactFlags & 0x80) != 0) && (this->contactedEntity == &gPlayerEntity)) { this->iframes = -0x2d; } - this->bitfield = 0; + this->contactFlags = 0; CopyPositionAndSpriteOffset(this->parent, this); DarkNutSwordSlash_OnTick(this); if (this->type == 3) { diff --git a/src/projectile/dekuSeedProjectile.c b/src/projectile/dekuSeedProjectile.c index 86fce52a..588ad284 100644 --- a/src/projectile/dekuSeedProjectile.c +++ b/src/projectile/dekuSeedProjectile.c @@ -17,14 +17,14 @@ void DekuSeedProjectile_OnTick(Entity* this) { } void sub_080A8470(Entity* this) { - if (this->bitfield == 0x80) { + if (this->contactFlags == 0x80) { if (this->hitType == 0x68) { EnqueueSFX(SFX_86); } DeleteEntity(this); } else { this->direction = DirectionRoundUp(this->knockbackDirection); - if ((u8)(this->bitfield + 0x7e) < 2) { + if ((u8)(this->contactFlags + 0x7e) < 2) { sub_080A8680(this); } else { InitializeAnimation(this, 0x19); @@ -35,8 +35,8 @@ void sub_080A8470(Entity* this) { void DekuSeedProjectile_Init(Entity* this) { this->action = 1; - this->actionDelay = 0x30; - this->field_0xf = 0; + this->timer = 0x30; + this->subtimer = 0; this->z.HALF.HI -= 4; if (CheckGlobalFlag(TABIDACHI) == 0) { this->hitType = 0x68; @@ -54,7 +54,7 @@ void DekuSeedProjectile_Action1(Entity* this) { DeleteThisEntity(); } sub_08016AD2(this); - if (--this->actionDelay == 0) { + if (--this->timer == 0) { this->action = 4; } } else { @@ -63,17 +63,17 @@ void DekuSeedProjectile_Action1(Entity* this) { InitializeAnimation(this, 0x19); sub_080A86A0(this); } - if (this->field_0xf != 0) { + if (this->subtimer != 0) { parent = this->parent; if ((parent->next != NULL) && (IsColliding(this, parent) != 0)) { this->iframes = 0x10; this->knockbackDirection = -this->direction; - this->bitfield = 0x80; + this->contactFlags = 0x80; this->knockbackDuration = 0xc; this->knockbackSpeed = 0; parent->iframes = 0x10; parent->knockbackDirection = this->direction; - parent->bitfield = 0xc2; + parent->contactFlags = 0xc2; parent->knockbackDuration = 0xc; parent->knockbackSpeed = 0; } @@ -86,7 +86,7 @@ void DekuSeedProjectile_Action2(Entity* this) { if (IsProjectileOffScreen(this)) { DeleteThisEntity(); } - if (--this->actionDelay == 0) { + if (--this->timer == 0) { this->action = 1; COLLISION_ON(this); } @@ -126,8 +126,8 @@ void DekuSeedProjectile_Action4(Entity* this) { void sub_080A8680(Entity* this) { this->action = 2; COLLISION_OFF(this); - this->actionDelay = 3; - this->field_0xf = 1; + this->timer = 3; + this->subtimer = 1; EnqueueSFX(SFX_ITEM_SHIELD_BOUNCE); } diff --git a/src/projectile/dirtBallProjectile.c b/src/projectile/dirtBallProjectile.c index 70fa0259..97d7c34e 100644 --- a/src/projectile/dirtBallProjectile.c +++ b/src/projectile/dirtBallProjectile.c @@ -29,7 +29,7 @@ void sub_080A881C(Entity* this) { this->knockbackSpeed = 0; if (this->type == 0) { this->parent->child = NULL; - if (this->bitfield == 0x80) { + if (this->contactFlags == 0x80) { gPlayerState.hurtBlinkSpeed = 0xf0; ModHealth(-2); } @@ -48,14 +48,14 @@ void DirtBallProjectile_Init(Entity* this) { this->spriteSettings.shadow = 1; this->zVelocity = Q_16_16(0.5); this->hitbox = (Hitbox*)&gUnk_08129764; - this->field_0x3c |= 0x10; + this->collisionFlags |= 0x10; switch (this->type) { case 0: InitializeAnimation(this, 0); break; case 1: - this->actionDelay = 0; - this->field_0xf = 0; + this->timer = 0; + this->subtimer = 0; break; case 2: InitializeAnimation(this, 5); @@ -83,11 +83,11 @@ void DirtBallProjectile_Action1(Entity* this) { this->z.HALF.HI += Q_8_8(1.0 / 16.0 - 1.0 / 128.0); FreeCarryEntity(this->child); CopyPosition(this, this->child); - if ((0xf < (u8)(this->actionDelay++ + 1)) && (entity = this->child, entity->actionDelay == 0)) { - if ((this->actionDelay & 2) != 0) { - entity->field_0xf += 1; + if ((0xf < (u8)(this->timer++ + 1)) && (entity = this->child, entity->timer == 0)) { + if ((this->timer & 2) != 0) { + entity->subtimer += 1; } - if ((this->child->field_0xf < 0x20) && ((this->child->field_0xf & 3) == 3)) { + if ((this->child->subtimer < 0x20) && ((this->child->subtimer & 3) == 3)) { parent->field_0x82.HALF.HI = 0xc0; this->action = 2; } diff --git a/src/projectile/fireProjectile.c b/src/projectile/fireProjectile.c index 85c06766..5aec66d8 100644 --- a/src/projectile/fireProjectile.c +++ b/src/projectile/fireProjectile.c @@ -34,10 +34,10 @@ void FireProjectile_Action1(Entity* this) { } else { if (this->spriteSettings.draw == 1) { CopyPosition(parent, this); - if (this->actionDelay != 0) { + if (this->timer != 0) { direction = parent->direction & 0x18; this->direction = direction; - this->actionDelay = 0; + this->timer = 0; InitializeAnimation(this, direction >> 3); } } diff --git a/src/projectile/gleerokProjectile.c b/src/projectile/gleerokProjectile.c index a3c82267..e852e92b 100644 --- a/src/projectile/gleerokProjectile.c +++ b/src/projectile/gleerokProjectile.c @@ -17,7 +17,7 @@ void GleerokProjectile(Entity* this) { } void GleerokProjectile_OnTick(Entity* this) { - if (((this->type != 3) && ((this->bitfield & 0x80) != 0)) && ((this->bitfield & 0x7f) != 0x1e)) { + if (((this->type != 3) && ((this->contactFlags & 0x80) != 0)) && ((this->contactFlags & 0x7f) != 0x1e)) { this->action = 3; COLLISION_OFF(this); InitializeAnimation(this, 0x53); @@ -58,7 +58,7 @@ void GleerokProjectile_Init(Entity* this) { iVar2 = 0x400; } this->zVelocity = this->z.WORD / (iVar2 << 8) << 0xd; - this->field_0xf = 0x1e; + this->subtimer = 0x1e; break; case 2: this->zVelocity = (this->z.WORD / 0x18000) << 0xc; @@ -91,15 +91,15 @@ void GleerokProjectile_Action1(Entity* this) { } else { GetNextFrame(this); LinearMoveUpdate(this); - if ((this->type != 2) && (this->field_0xf-- == 0)) { - this->field_0xf = 0x1e; + if ((this->type != 2) && (this->subtimer-- == 0)) { + this->subtimer = 0x1e; sub_08004596(this, GetFacingDirection(this, &gPlayerEntity)); } if (GravityUpdate(this, 0) == 0) { this->action = 2; sub_080A90D8(this); if (this->type == 2) { - this->actionDelay = 0xf; + this->timer = 0xf; InitializeAnimation(this, 0x54); } else { InitializeAnimation(this, 0x52); @@ -111,7 +111,7 @@ void GleerokProjectile_Action1(Entity* this) { void GleerokProjectile_Action2(Entity* this) { GetNextFrame(this); if (this->type == 2) { - if (this->actionDelay-- == 0) { + if (this->timer-- == 0) { COLLISION_OFF(this); this->action = 3; InitializeAnimation(this, 0x55); diff --git a/src/projectile/guardLineOfSight.c b/src/projectile/guardLineOfSight.c index 185b21d1..9fc3a49f 100644 --- a/src/projectile/guardLineOfSight.c +++ b/src/projectile/guardLineOfSight.c @@ -17,26 +17,26 @@ void GuardLineOfSight(Entity* this) { if (this->type == 0) { if (this->action == 0) { this->action = 1; - this->actionDelay = Random(); + this->timer = Random(); this->spriteSettings.draw = 0; } - if (this->bitfield == 0x80) { + if (this->contactFlags == 0x80) { if (this->parent != NULL) { this->parent->type = 0xff; } DeleteThisEntity(); } CopyPosition(this->parent, this); - if (this->field_0xf != 0) { - this->field_0xf -= 1; + if (this->subtimer != 0) { + this->subtimer -= 1; } else { if (sub_080644C8(this) != 0) { - if (((this->actionDelay++) & 3) == 0) { + if (((this->timer++) & 3) == 0) { entity = CreateProjectile(GUARD_LINE_OF_SIGHT); if (entity != NULL) { entity->type = 1; tmp = this->parent->knockbackDirection; - entity->direction = (gUnk_081299C8[(this->actionDelay >> 2 & 7)] + (tmp << 3)) & 0x1f; + entity->direction = (gUnk_081299C8[(this->timer >> 2 & 7)] + (tmp << 3)) & 0x1f; entity->parent = this->parent; CopyPosition(this, entity); } @@ -46,19 +46,19 @@ void GuardLineOfSight(Entity* this) { } else { if (this->action == 0) { this->action = 1; - this->actionDelay = 0x12; + this->timer = 0x12; this->spriteSettings.draw = 0; this->speed = 0x800; this->hitbox = (Hitbox*)&gUnk_080FD1E4; InitializeAnimation(this, 0); } - if (this->bitfield == 0x80) { + if (this->contactFlags == 0x80) { if (this->parent != NULL) { this->parent->type = 0xff; } DeleteThisEntity(); } - if (--this->actionDelay == 0) { + if (--this->timer == 0) { DeleteThisEntity(); } LinearMoveUpdate(this); diff --git a/src/projectile/guruguruBarProjectile.c b/src/projectile/guruguruBarProjectile.c index 0d290982..b0c9eeb1 100644 --- a/src/projectile/guruguruBarProjectile.c +++ b/src/projectile/guruguruBarProjectile.c @@ -22,7 +22,7 @@ void sub_080AABB0(Entity* this) { CopyPosition(parent, this); tmp = &gSineTable[parent->animationState]; - factor = this->actionDelay << 8; + factor = this->timer << 8; this->x.WORD += tmp[0] * factor; this->y.WORD -= tmp[0x40] * factor; } diff --git a/src/projectile/gyorgMaleEnergyProjectile.c b/src/projectile/gyorgMaleEnergyProjectile.c index 670be319..4fb25abe 100644 --- a/src/projectile/gyorgMaleEnergyProjectile.c +++ b/src/projectile/gyorgMaleEnergyProjectile.c @@ -18,7 +18,7 @@ void GyorgMaleEnergyProjectile_OnTick(Entity* this) { } void sub_080AC8DC(Entity* this) { - switch ((s8)(this->bitfield & 0x7f)) { + switch ((s8)(this->contactFlags & 0x7f)) { case 0: case 1: case 2: @@ -44,7 +44,7 @@ void sub_080AC8DC(Entity* this) { void GyorgMaleEnergyProjectile_Init(Entity* this) { this->action = 1; - this->actionDelay = 0x3c; + this->timer = 0x3c; this->collisionLayer = 2; UpdateSpriteForCollisionLayer(this); InitializeAnimation(this, 0); @@ -61,7 +61,7 @@ void GyorgMaleEnergyProjectile_Action1(Entity* this) { PositionRelative(this->parent, this, gSineTable[animationState] * Q_16_16(5.0 / 32.0), gSineTable[animationState + 0x40] * Q_16_16(-5.0 / 32.0)); GetNextFrame(this); - if (--this->actionDelay == 0) { + if (--this->timer == 0) { this->action = 2; COLLISION_ON(this); this->direction = GetFacingDirection(this, &gPlayerEntity); @@ -75,7 +75,7 @@ void GyorgMaleEnergyProjectile_Action2(Entity* this) { if (IsProjectileOffScreen(this)) { DeleteThisEntity(); } - if (--this->actionDelay == 0) { + if (--this->timer == 0) { this->action = 3; COLLISION_OFF(this); this->speed = this->speed >> 1; diff --git a/src/projectile/gyorgTail.c b/src/projectile/gyorgTail.c index 956a66fa..d743cf40 100644 --- a/src/projectile/gyorgTail.c +++ b/src/projectile/gyorgTail.c @@ -64,18 +64,18 @@ void GyorgTail_Init(Entity* this) { ASM_FUNC("asm/non_matching/gyorgTail/sub_080AC388.inc", void sub_080AC388(Entity* this)) void sub_080AC480(Entity* this) { - if (this->actionDelay != 0) { + if (this->timer != 0) { if (this->parent->health == 0) { this->action = 1; this->hitType = 0x1d; } else { - if (--this->actionDelay == 0) { + if (--this->timer == 0) { this->hitType = 0x1c; SoundReq(SFX_116); } } } else { - if (--this->field_0xf == 0) { + if (--this->subtimer == 0) { this->action = 1; this->hitType = 0x1d; } @@ -220,8 +220,8 @@ void sub_080AC884(Entity* this) { if (this->parent->field_0x70.HALF_U.HI != 0) { this->parent->field_0x70.HALF_U.HI = 0; this->action = 2; - this->actionDelay = 0x3c; - this->field_0xf = 0x56; + this->timer = 0x3c; + this->subtimer = 0x56; } } diff --git a/src/projectile/iceProjectile.c b/src/projectile/iceProjectile.c index 2b5b6b34..c3e0e6ca 100644 --- a/src/projectile/iceProjectile.c +++ b/src/projectile/iceProjectile.c @@ -36,10 +36,10 @@ void IceProjectile_Action1(Entity* this) { } else { if (this->spriteSettings.draw == 1) { CopyPosition(parent, this); - if (this->actionDelay != 0) { + if (this->timer != 0) { direction = parent->direction & 0x18; this->direction = direction; - this->actionDelay = 0; + this->timer = 0; InitializeAnimation(this, direction >> 3); } } diff --git a/src/projectile/keatonDagger.c b/src/projectile/keatonDagger.c index 4fba42e0..53a61687 100644 --- a/src/projectile/keatonDagger.c +++ b/src/projectile/keatonDagger.c @@ -14,7 +14,7 @@ void KeatonDagger(Entity* this) { } parent = this->parent; if (((parent == NULL) || (parent->health == 0)) || (parent->next == NULL)) { - if (((this->bitfield & 0x80) != 0) && (this->field_0x4c == &gPlayerEntity)) { + if (((this->contactFlags & 0x80) != 0) && (this->contactedEntity == &gPlayerEntity)) { sub_0803C0AC(this); } DeleteEntity(this); diff --git a/src/projectile/lakituLightning.c b/src/projectile/lakituLightning.c index 171be05c..6e1e93f7 100644 --- a/src/projectile/lakituLightning.c +++ b/src/projectile/lakituLightning.c @@ -17,7 +17,7 @@ void LakituLightning_OnTick(Entity* this) { } void sub_080A9DD8(Entity* this) { - if ((this->health == 0) || (this->bitfield == 0x80)) { + if ((this->health == 0) || (this->contactFlags == 0x80)) { DeleteThisEntity(); } LakituLightning_OnTick(this); @@ -25,7 +25,7 @@ void sub_080A9DD8(Entity* this) { void LakituLightning_Init(Entity* this) { this->action = 1; - this->actionDelay = 0xb4; + this->timer = 0xb4; this->health = 1; InitializeAnimation(this, 0); } @@ -33,7 +33,7 @@ void LakituLightning_Init(Entity* this) { void LakituLightning_Action1(Entity* this) { GetNextFrame(this); ProcessMovement3(this); - if ((this->collisions != COL_NONE) || (--this->actionDelay == 0)) { + if ((this->collisions != COL_NONE) || (--this->timer == 0)) { CreateFx(this, FX_BLUE_EFC, 0); DeleteThisEntity(); } diff --git a/src/projectile/mandiblesProjectile.c b/src/projectile/mandiblesProjectile.c index f050bd09..a468d8a1 100644 --- a/src/projectile/mandiblesProjectile.c +++ b/src/projectile/mandiblesProjectile.c @@ -40,10 +40,10 @@ void MandiblesProjectile_OnTick(Entity* this) { void sub_080A9EBC(Entity* this) { Entity* parent; - if ((this->bitfield & 0x80) != 0) { + if ((this->contactFlags & 0x80) != 0) { switch (this->action) { case 4: - this->field_0xf = 0; + this->subtimer = 0; ModHealth(-2); ProcessMovement3(this); UpdateAnimationSingleFrame(this); @@ -53,7 +53,7 @@ void sub_080A9EBC(Entity* this) { this->field_0x82.HALF.LO = 2; this->animationState = 0xff; sub_080AA270(this); - this->field_0xf = 0x20; + this->subtimer = 0x20; } break; default: @@ -84,7 +84,7 @@ void MandiblesProjectile_Action1(Entity* this) { if (this->field_0x80.HWORD != 0) { this->field_0x80.HWORD -= 1; } else { - if (--this->field_0xf == 0) { + if (--this->subtimer == 0) { sub_080AA270(this); } else { if (sub_080AA2E0(this) != 0) { @@ -127,14 +127,14 @@ void MandiblesProjectile_Action3(Entity* this) { } } if (entity->confusedTime == 0) { - if (this->field_0xf != 0) { - this->field_0xf -= 1; + if (this->subtimer != 0) { + this->subtimer -= 1; } else { UpdateAnimationSingleFrame(this); if ((this->frame & ANIM_DONE) != 0) { this->action = 4; this->field_0x82.HALF.LO = 3; - this->field_0xf = 0x40; + this->subtimer = 0x40; uVar1 = entity->animationState; this->direction = uVar1 << 2; this->animationState = uVar1 << 0x1a >> 0x1a; @@ -163,8 +163,8 @@ void MandiblesProjectile_Action4(Entity* this) { if (entity->next == NULL) { this->child = NULL; } - if (this->field_0xf != 0) { - this->field_0xf -= 1; + if (this->subtimer != 0) { + this->subtimer -= 1; } else { if (sub_080AA374(this) != 0) { if (entity->health == 0) { @@ -174,7 +174,7 @@ void MandiblesProjectile_Action4(Entity* this) { this->action = 1; this->animationState = 0xff; this->field_0x82.HALF.LO = 0; - this->actionDelay = 0; + this->timer = 0; this->field_0x80.HWORD = 0x20; this->spriteOrientation.flipY = 2; this->parent = this->child; @@ -185,8 +185,8 @@ void MandiblesProjectile_Action4(Entity* this) { entity->direction = entity->animationState << 2; entity->speed = 0; entity->field_0x82.HALF.LO = 1; - entity->actionDelay = 0; - entity->field_0xf = 0x78; + entity->timer = 0; + entity->subtimer = 0x78; entity->field_0x80.HWORD = 0x20; sub_080AA3E0(entity, 1); } @@ -235,7 +235,7 @@ void sub_080AA270(Entity* this) { u32 animationState; Entity* parent; parent = this->parent; - this->field_0xf = gUnk_08129CA4[Random() & 7]; + this->subtimer = gUnk_08129CA4[Random() & 7]; animationState = parent->animationState; if (this->animationState == 0xff) { this->animationState = animationState; @@ -278,9 +278,9 @@ void sub_080AA320(Entity* this) { parent = this->parent; this->action = 2; this->field_0x82.HALF.LO = 1; - this->field_0xf = 0; + this->subtimer = 0; parent->action = 2; - parent->field_0xf = 0x30; + parent->subtimer = 0x30; parent->field_0x80.HWORD = 0x50; parent->speed = 0; parent->direction = sub_08049F84(parent, 0); diff --git a/src/projectile/mazaalEnergyBeam.c b/src/projectile/mazaalEnergyBeam.c index 10879e6c..1584348c 100644 --- a/src/projectile/mazaalEnergyBeam.c +++ b/src/projectile/mazaalEnergyBeam.c @@ -10,7 +10,7 @@ void MazaalEnergyBeam(Entity* this) { void MazaalEnergyBeam_Init(Entity* this) { this->action = 1; - this->actionDelay = 10; + this->timer = 10; this->z.HALF.HI -= 2; this->y.HALF.HI += 2; InitializeAnimation(this, 0); @@ -20,7 +20,7 @@ void MazaalEnergyBeam_Init(Entity* this) { void MazaalEnergyBeam_Action1(Entity* this) { const s16* tmp; - if (--this->actionDelay == 0) { + if (--this->timer == 0) { this->action = 2; COLLISION_OFF(this); this->spritePriority.b0 = 7; diff --git a/src/projectile/moblinSpear.c b/src/projectile/moblinSpear.c index d3c5bd1a..0cf5f0c6 100644 --- a/src/projectile/moblinSpear.c +++ b/src/projectile/moblinSpear.c @@ -32,11 +32,11 @@ void MoblinSpear_OnTick(Entity* this) { void sub_080A832C(Entity* this) { u8 tmp; - if (this->bitfield == 0x80) { + if (this->contactFlags == 0x80) { this->iframes = 0x10; this->knockbackDuration = 0xc; this->knockbackSpeed = 0x180; - this->parent->bitfield = this->bitfield; + this->parent->contactFlags = this->contactFlags; } tmp = this->iframes; if ((tmp & 0x80) != 0) { diff --git a/src/projectile/octorokBossProjectile.c b/src/projectile/octorokBossProjectile.c index 54331d1c..0f67d14f 100644 --- a/src/projectile/octorokBossProjectile.c +++ b/src/projectile/octorokBossProjectile.c @@ -35,8 +35,8 @@ void OctorokBossProjectile_Init(Entity* this) { case 0: LinearMoveAngle(this, 0x4800, this->direction); this->speed = 0x200; - this->actionDelay = 0; - this->field_0xf = this->direction; + this->timer = 0; + this->subtimer = this->direction; this->field_0x78.HWORD = 300; InitAnimationForceUpdate(this, 0); break; @@ -58,7 +58,7 @@ void OctorokBossProjectile_Init(Entity* this) { this->direction = this->direction - (Random() & 7); } this->speed = 0x200; - this->actionDelay = 0x30; + this->timer = 0x30; LinearMoveAngle(this, 0x5000, this->direction); InitializeAnimation(this, 5); break; @@ -85,14 +85,14 @@ void OctorokBossProjectile_Action1(Entity* this) { if (this->parent->action == 2) { DeleteThisEntity(); } - if ((this->type2 == 0) && ((this->bitfield & 0x80) != 0)) { - if ((this->bitfield & 0x7f) == 0) { + if ((this->type2 == 0) && ((this->contactFlags & 0x80) != 0)) { + if ((this->contactFlags & 0x7f) == 0) { OctorokBossProjectile_Action2(this); } this->direction = this->knockbackDirection << 3; this->speed = 0x400; this->type2 = 1; - this->actionDelay = 0; + this->timer = 0; COLLISION_OFF(this); } if (sub_0806FC80(this, this->parent, 0x40) != 0) { @@ -121,18 +121,18 @@ void OctorokBossProjectile_Action1(Entity* this) { if ((this->collisions & (COL_NORTH_ANY | COL_SOUTH_ANY)) != COL_NONE) { this->direction = -this->direction ^ 0x80; } - if (this->direction == this->field_0xf) { + if (this->direction == this->subtimer) { return; } SoundReq(SFX_164); if (this->field_0x78.HWORD == 0) { - this->actionDelay = 4; + this->timer = 4; } else { - this->actionDelay++; + this->timer++; } - this->field_0xf = this->direction; - if (this->actionDelay < 2) { + this->subtimer = this->direction; + if (this->timer < 2) { return; } for (index = 0; index < 3; ++index) { @@ -168,19 +168,19 @@ void OctorokBossProjectile_Action1(Entity* this) { if (--*(u32*)&this->field_0x78 == -1) { OctorokBossProjectile_Action2(this); } - if ((this->bitfield & 0x80) == 0) { + if ((this->contactFlags & 0x80) == 0) { return; } OctorokBossProjectile_Action2(this); break; case 2: GetNextFrame(this); - if (this->actionDelay-- != 0) { + if (this->timer-- != 0) { LinearMoveAngle(this, this->speed, this->direction); return; } if (this->child != NULL) { - this->child->actionDelay = 1; + this->child->timer = 1; } DeleteThisEntity(); break; diff --git a/src/projectile/projectile5.c b/src/projectile/projectile5.c index 0c9a347d..142c0590 100644 --- a/src/projectile/projectile5.c +++ b/src/projectile/projectile5.c @@ -29,7 +29,7 @@ void sub_080A86F0(Entity* this) { if ((this->parent->field_0x82.HALF.HI & 0x3f) == 3) { if (gPlayerState.hurtBlinkSpeed != 0) { if (sub_080B1B44(TILE(this->x.HALF.HI, this->y.HALF.HI), gPlayerEntity.collisionLayer) == 0) { - if (this->bitfield == 0x80) { + if (this->contactFlags == 0x80) { *pbVar2 = *pbVar2 & 0x7f; DeleteThisEntity(); } @@ -43,7 +43,7 @@ void sub_080A86F0(Entity* this) { void Projectile5_Init(Entity* this) { this->action = 1; - this->field_0x3c |= 0x10; + this->collisionFlags |= 0x10; this->hitbox = (Hitbox*)&gUnk_08129734; } diff --git a/src/projectile/removableDust.c b/src/projectile/removableDust.c index a405d237..2c188926 100644 --- a/src/projectile/removableDust.c +++ b/src/projectile/removableDust.c @@ -27,7 +27,7 @@ void RemovableDust_OnTick(Entity* this) { if (this->action == 0) { this->action = 1; this->frameIndex = this->type; - this->field_0x1c = 1; + this->gustJarFlags = 1; this->speed = this->field_0x86.HWORD; if (this->type == 0) { sub_080AA494(this); @@ -38,7 +38,7 @@ void RemovableDust_OnTick(Entity* this) { } void sub_080AA450(Entity* this) { - if (this->bitfield == 0x96) { + if (this->contactFlags == 0x96) { sub_080AA464(this); } } diff --git a/src/projectile/rockProjectile.c b/src/projectile/rockProjectile.c index 53266767..dff50413 100644 --- a/src/projectile/rockProjectile.c +++ b/src/projectile/rockProjectile.c @@ -16,7 +16,7 @@ void RockProjectile_OnTick(Entity* this) { } void sub_080A8064(Entity* this) { - if (this->bitfield == 0x80) { + if (this->contactFlags == 0x80) { DeleteEntity(this); } else { this->direction = this->knockbackDirection; @@ -26,7 +26,7 @@ void sub_080A8064(Entity* this) { void RockProjectile_Init(Entity* this) { this->action = 1; - this->actionDelay = 0x30; + this->timer = 0x30; this->zVelocity = Q_16_16(0.625); InitializeAnimation(this, 0); } @@ -38,7 +38,7 @@ void RockProjectile_Action1(Entity* this) { DeleteEntity(this); } else { sub_08016AD2(this); - if (--this->actionDelay == 0) { + if (--this->timer == 0) { this->action = 3; } } diff --git a/src/projectile/spiderWeb.c b/src/projectile/spiderWeb.c index 52df2d19..14909320 100644 --- a/src/projectile/spiderWeb.c +++ b/src/projectile/spiderWeb.c @@ -45,9 +45,9 @@ void sub_080AA6C0(Entity* this) { }; Entity* object; - if (this->bitfield == 0x87) { + if (this->contactFlags == 0x87) { this->action = 3; - this->actionDelay = 90; + this->timer = 90; COLLISION_OFF(this); InitAnimationForceUpdate(this, this->type + 0x10); object = CreateObject(OBJECT_2A, 3, 0); @@ -78,7 +78,7 @@ void sub_080AA78C(Entity* this) { if (this->subAction == 0) { animationState = (gPlayerEntity.animationState >> 1); if (animationState != this->type) { - this->field_0x3a &= 0xfb; + this->gustJarState &= 0xfb; if (AnimationStateFlip90(animationState) != this->type) { return; } @@ -118,8 +118,8 @@ void SpiderWeb_Init(Entity* this) { DeleteThisEntity(); } this->action = 1; - this->field_0x1c = 1; - this->field_0x16 = 1; + this->gustJarFlags = 1; + this->carryFlags = 1; this->hitbox = (Hitbox*)typeHitboxes[this->type]; this->cutsceneBeh.HALF.LO = 0; InitAnimationForceUpdate(this, this->type); @@ -164,7 +164,7 @@ void SpiderWeb_SubAction0(Entity* this) { } } this->cutsceneBeh.HALF.LO = 1; - this->field_0xf = 2; + this->subtimer = 2; InitAnimationForceUpdate(this, this->type + 4); } if ((entity->animationState >> 1 == this->type) && (gPlayerState.framestate == PL_STATE_PULL) && @@ -186,7 +186,7 @@ void SpiderWeb_SubAction1(Entity* this) { void SpiderWeb_Action3(Entity* this) { GetNextFrame(this); - if (--this->actionDelay == 0) { + if (--this->timer == 0) { sub_080AAAA8(this); } } diff --git a/src/projectile/stalfosProjectile.c b/src/projectile/stalfosProjectile.c index 3f8f679d..0d317738 100644 --- a/src/projectile/stalfosProjectile.c +++ b/src/projectile/stalfosProjectile.c @@ -29,7 +29,7 @@ void StalfosProjectile_OnTick(Entity* this) { } void sub_080A9A34(Entity* this) { - if (this->bitfield == 0x9d) { + if (this->contactFlags == 0x9d) { this->action = 3; COLLISION_OFF(this); this->zVelocity = Q_16_16(2.625); @@ -84,7 +84,7 @@ void StalfosProjectile_Init(Entity* this) { break; } - this->field_0x1c = 2; + this->gustJarFlags = 2; if (this->type == 0) { InitializeAnimation(this, 5); } else { diff --git a/src/projectile/torchTrapProjectile.c b/src/projectile/torchTrapProjectile.c index 38503e89..402dc60a 100644 --- a/src/projectile/torchTrapProjectile.c +++ b/src/projectile/torchTrapProjectile.c @@ -20,14 +20,14 @@ void sub_080AAB1C(Entity* this) { void TorchTrapProjectile_Init(Entity* this) { this->action = 1; - this->actionDelay = 0x1e; + this->timer = 0x1e; InitializeAnimation(this, 0); } void TorchTrapProjectile_Action1(Entity* this) { GetNextFrame(this); - if (this->actionDelay != 0) { - this->actionDelay -= 1; + if (this->timer != 0) { + this->timer -= 1; } else { if (ProcessMovement3(this) == 0) { LinearMoveUpdate(this); diff --git a/src/projectile/v1DarkMagicProjectile.c b/src/projectile/v1DarkMagicProjectile.c index 5f034678..00c1366d 100644 --- a/src/projectile/v1DarkMagicProjectile.c +++ b/src/projectile/v1DarkMagicProjectile.c @@ -25,9 +25,9 @@ void V1DarkMagicProjectile_OnTick(Entity* this) { } void sub_080AAC44(Entity* this) { - if ((this->bitfield & 0x80) != 0) { + if ((this->contactFlags & 0x80) != 0) { if (this->type2 == 0) { - if ((this->bitfield & 0x3f) == 0) { + if ((this->contactFlags & 0x3f) == 0) { this->action = 2; COLLISION_OFF(this); if (this->type == 0) { @@ -117,8 +117,8 @@ void V1DarkMagicProjectile_Init(Entity* this) { SortEntityAbove(this->parent, this); } if (this->type == 0) { - this->actionDelay = 0; - this->field_0xf = 4; + this->timer = 0; + this->subtimer = 4; this->field_0x80.HALF.LO = 0; this->field_0x80.HALF.HI = 0; this->health = 0x10; @@ -149,8 +149,8 @@ void V1DarkMagicProjectile_Action1(Entity* this) { switch (this->type) { case 0: - if (--this->field_0xf == 0) { - this->field_0xf = 4; + if (--this->subtimer == 0) { + this->subtimer = 4; uVar2 = GetFacingDirection(this, &gPlayerEntity); sub_08004596(this, uVar2); } @@ -199,8 +199,8 @@ void sub_080AAF74(Entity* this) { if (sub_0807953C() != 0) { this->field_0x80.HALF.LO += (Random() & 1) + 1; } - if (++this->actionDelay == 0x3c) { - this->actionDelay = 0x1e; + if (++this->timer == 0x3c) { + this->timer = 0x1e; gPlayerEntity.iframes = 8; ModHealth(-4); SoundReqClipped(&gPlayerEntity, SFX_PLY_VO6); diff --git a/src/projectile/v1EyeLaser.c b/src/projectile/v1EyeLaser.c index 19966321..52115d4f 100644 --- a/src/projectile/v1EyeLaser.c +++ b/src/projectile/v1EyeLaser.c @@ -27,8 +27,8 @@ void V1EyeLaser_Init(Entity* this) { InitializeAnimation(this, 0); } else { this->action = 2; - this->field_0xf = 4; - InitializeAnimation(this, this->actionDelay); + this->subtimer = 4; + InitializeAnimation(this, this->timer); } } @@ -46,7 +46,7 @@ void V1EyeLaser_Action2(Entity* this) { this->x.WORD += (this->parent->x.WORD - *(u32*)&this->field_0x74); *(u32*)&this->field_0x74 = this->parent->x.WORD; sub_080AB888(this); - if (this->parent->field_0xf == 0) { + if (this->parent->subtimer == 0) { DeleteThisEntity(); } } @@ -97,7 +97,7 @@ void sub_080AB844(Entity* this, s32 param_1, s32 param_2) { entity = CreateProjectile(V1_EYE_LASER); if (entity != NULL) { entity->type = 1; - entity->actionDelay = param_1; + entity->timer = param_1; entity->parent = this->parent; PositionRelative(this, entity, 0, Q_16_16(param_2)); if (param_1 != 1) { @@ -111,14 +111,14 @@ void sub_080AB844(Entity* this, s32 param_1, s32 param_2) { void sub_080AB888(Entity* this) { s32 index; - this->field_0xf -= 1; + this->subtimer -= 1; index = 0; - switch (this->actionDelay) { + switch (this->timer) { case 3: index = 1; case 4: - this->hitbox = (Hitbox*)gUnk_0812A5F4[this->field_0xf * 2 + index]; + this->hitbox = (Hitbox*)gUnk_0812A5F4[this->subtimer * 2 + index]; break; case 0: case 1: @@ -127,8 +127,8 @@ void sub_080AB888(Entity* this) { break; } - if (this->field_0xf == 0) { - this->field_0xf = 4; + if (this->subtimer == 0) { + this->subtimer = 4; } } diff --git a/src/projectile/v1FireProjectile.c b/src/projectile/v1FireProjectile.c index 8c2e0729..022b48f4 100644 --- a/src/projectile/v1FireProjectile.c +++ b/src/projectile/v1FireProjectile.c @@ -19,11 +19,11 @@ void V1FireProjectile_OnTick(Entity* this) { } void sub_080AB2DC(Entity* this) { - if ((this->bitfield & 0x80) != 0) { + if ((this->contactFlags & 0x80) != 0) { this->action = 3; COLLISION_OFF(this); InitializeAnimation(this, 0x53); - if ((this->bitfield & 0x7f) == 0) { + if ((this->contactFlags & 0x7f) == 0) { ModHealth(-4); } } @@ -73,11 +73,11 @@ void V1FireProjectile_Action1(Entity* this) { LinearMoveUpdate(this); if (GravityUpdate(this, 0) == 0) { this->action = 2; - this->actionDelay = 0xf; + this->timer = 0xf; InitializeAnimation(this, 0x54); sub_080AB4A4(this); } else { - if (++this->actionDelay > 0xe0) { + if (++this->timer > 0xe0) { DeleteThisEntity(); } } @@ -117,7 +117,7 @@ void sub_080AB4A4(Entity* this) { } s8* sub_080AB4F8(Entity* this) { - return (s8*)&gUnk_0812A4EC[this->type << 5 | this->field_0xf << 1]; + return (s8*)&gUnk_0812A4EC[this->type << 5 | this->subtimer << 1]; } void (*const V1FireProjectile_Functions[])(Entity*) = { diff --git a/src/projectile/v2Projectile.c b/src/projectile/v2Projectile.c index e2c86b53..2d30f43b 100644 --- a/src/projectile/v2Projectile.c +++ b/src/projectile/v2Projectile.c @@ -31,12 +31,12 @@ void sub_080ABBA8(Entity* this) { } void sub_080ABBF4(Entity* this) { - if ((this->bitfield & 0x80) == 0) + if ((this->contactFlags & 0x80) == 0) return; switch (this->type) { case 2: { - switch ((this->bitfield & 0x3f)) { + switch ((this->contactFlags & 0x3f)) { case 0: { ModHealth(-4); // fallthrough @@ -52,7 +52,7 @@ void sub_080ABBF4(Entity* this) { } case 0: case 1: { - if ((this->bitfield & 0x3f) == 0) { + if ((this->contactFlags & 0x3f) == 0) { ModHealth(-2); DeleteThisEntity(); } @@ -88,8 +88,8 @@ void sub_080ABC90(Entity* this) { void sub_080ABCC4(Entity* this) { this->action = 1; - this->actionDelay = (Random() & 0x3f) + 0x30; - this->field_0xf = 0; + this->timer = (Random() & 0x3f) + 0x30; + this->subtimer = 0; this->direction = Random() & 0x1f; this->field_0x74.HWORD = TILE(this->x.HALF.HI, this->y.HALF.HI); this->field_0x76.HWORD = GetTileType(this->field_0x74.HWORD, 2); @@ -99,7 +99,7 @@ void sub_080ABCC4(Entity* this) { } void sub_080ABD44(Entity* this) { - if (--this->actionDelay == 0) { + if (--this->timer == 0) { this->action = 2; InitializeAnimation(this, 1); } @@ -159,9 +159,9 @@ void sub_080ABE88(Entity* this) { void sub_080ABEA8(Entity* this) { this->action = 1; - this->actionDelay = 0x60; + this->timer = 0x60; this->spritePriority.b0 = 2; - this->field_0x1c = 1; + this->gustJarFlags = 1; if (this->type2 == 0) { this->direction = (Random() & 0xf) << 1; } else { diff --git a/src/projectile/v3ElectricProjectile.c b/src/projectile/v3ElectricProjectile.c index 70131ffa..697113dd 100644 --- a/src/projectile/v3ElectricProjectile.c +++ b/src/projectile/v3ElectricProjectile.c @@ -30,8 +30,8 @@ void sub_080ABFEC(Entity* this) { switch (this->type) { case 0: { this->action = 1; - this->actionDelay = 0; - this->field_0xf = 0x7; + this->timer = 0; + this->subtimer = 0x7; this->cutsceneBeh.HALF.HI = 0x18; this->damage = 0x88; CopyPositionAndSpriteOffset(this->parent, this); @@ -50,8 +50,8 @@ void sub_080ABFEC(Entity* this) { } default: { this->action = 2; - this->actionDelay = 0; - this->field_0xf = 0xff; + this->timer = 0; + this->subtimer = 0xff; this->speed = projectileSpeeds[this->type2]; this->damage = 0x88; sound = SFX_193; @@ -82,7 +82,7 @@ void V3ElectricProjectile_Action1(Entity* this) { SoundReq(SFX_193); } else { this->action = 3; - this->actionDelay = 0x10; + this->timer = 0x10; } this->z.HALF.HI -= 0x28; } @@ -104,25 +104,25 @@ void V3ElectricProjectile_Action2(Entity* this) { if (IsProjectileOffScreen(this)) { DeleteThisEntity(); } - if (this->actionDelay < 0x1e) { - if (((++this->actionDelay) & this->field_0xf) == 0) { + if (this->timer < 0x1e) { + if (((++this->timer) & this->subtimer) == 0) { sub_08004596(this, GetFacingDirection(this, &gPlayerEntity)); } } } void sub_080AC168(Entity* this) { - u8 actionDelay; + u8 timer; GetNextFrame(this); this->z.WORD += 0xffff8000; - actionDelay = --this->actionDelay; - if (actionDelay == 0) { + timer = --this->timer; + if (timer == 0) { u32 rand; u32 dir; this->action = 4; - this->actionDelay = 4; + this->timer = 4; rand = Random() & 0x7; - this->field_0xf = gUnk_0812A982[rand]; + this->subtimer = gUnk_0812A982[rand]; dir = GetFacingDirection(this, &gPlayerEntity); if (this->parent->cutsceneBeh.HALF.LO == 3) { dir -= projectileDirections[rand]; @@ -143,10 +143,10 @@ void sub_080AC200(Entity* this) { Entity* proj; GetNextFrame(this); - if (--this->actionDelay) + if (--this->timer) return; - this->actionDelay = 0x10; + this->timer = 0x10; proj = CreateProjectile(V3_ELECTRIC_PROJECTILE); if (proj) { @@ -157,7 +157,7 @@ void sub_080AC200(Entity* this) { CopyPosition(this, proj); } - if (--this->field_0xf == 0) { + if (--this->subtimer == 0) { DeleteThisEntity(); } diff --git a/src/projectile/v3TennisBallProjectile.c b/src/projectile/v3TennisBallProjectile.c index c487be01..51d78082 100644 --- a/src/projectile/v3TennisBallProjectile.c +++ b/src/projectile/v3TennisBallProjectile.c @@ -18,7 +18,7 @@ void V3TennisBallProjectile_OnTick(Entity* this) { } void sub_080ACA68(Entity* this) { - switch (this->bitfield & 0x7f) { + switch (this->contactFlags & 0x7f) { case 0x1a: case 0xa: case 0xb: @@ -27,7 +27,7 @@ void sub_080ACA68(Entity* this) { this->action = 2; this->flags &= ~ENT_COLLIDE; this->speed += 0x80 * 2; - this->child = this->field_0x4c; + this->child = this->contactedEntity; if (sub_080ACB40(this)) { this->direction = 0; } else { @@ -106,7 +106,7 @@ bool32 sub_080ACB40(Entity* this) { void sub_080ACB90(Entity* this) { Entity* parent = this->parent; if ((this->x.HALF.HI == parent->x.HALF.HI) && (this->y.HALF.HI <= parent->y.HALF.HI)) { - parent->field_0xf = 1; + parent->subtimer = 1; CreateFx(this, FX_REFLECT2, 0x40); EnqueueSFX(SFX_ITEM_GLOVES_KNOCKBACK); DeleteThisEntity(); diff --git a/src/projectile/windProjectile.c b/src/projectile/windProjectile.c index 8232bf91..c8d0bfad 100644 --- a/src/projectile/windProjectile.c +++ b/src/projectile/windProjectile.c @@ -34,10 +34,10 @@ void WindProjectile_Action1(Entity* this) { if (this->spriteSettings.draw == 1) { CopyPosition(parent, this); direction = (parent->direction + 4) & 0x18; - if (this->actionDelay != 0) { + if (this->timer != 0) { this->direction = direction; this->animationState = direction >> 2; - this->actionDelay = 0; + this->timer = 0; InitializeAnimation(this, direction >> 3); } else { if (direction >> 2 != this->animationState) { -- cgit v1.2.3