summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortheo3 <arisstephenson2@gmail.com>2021-11-12 01:34:34 -0800
committertheo3 <arisstephenson2@gmail.com>2021-11-12 01:34:34 -0800
commitecc8a1439ddeedd458af5427711e07e146ed4612 (patch)
treeefe4f755b15c985ecba9c4a0ad7e3759cd510e3d /src
parentf70c95f0373d659683840682d327da3db774659c (diff)
remove redundant unions
Diffstat (limited to 'src')
-rw-r--r--src/code_0805436C.c4
-rw-r--r--src/code_08077DF4.c2
-rw-r--r--src/collision.c36
-rw-r--r--src/coord.c2
-rw-r--r--src/enemy/acroBandits.c135
-rw-r--r--src/enemy/beetle.c38
-rw-r--r--src/enemy/bladeTrap.c6
-rw-r--r--src/enemy/bobomb.c18
-rw-r--r--src/enemy/bombPeahat.c50
-rw-r--r--src/enemy/bowMoblin.c2
-rw-r--r--src/enemy/businessScrub.c18
-rw-r--r--src/enemy/chaser.c2
-rw-r--r--src/enemy/chuchu.c90
-rw-r--r--src/enemy/cuccoChickAggr.c12
-rw-r--r--src/enemy/darkNut.c95
-rw-r--r--src/enemy/doorMimic.c6
-rw-r--r--src/enemy/enemy4D.c4
-rw-r--r--src/enemy/enemyE.c2
-rw-r--r--src/enemy/fallingBoulder.c12
-rw-r--r--src/enemy/fireballGuy.c12
-rw-r--r--src/enemy/gibdo.c12
-rw-r--r--src/enemy/gyorgMale.c44
-rw-r--r--src/enemy/hangingSeed.c2
-rw-r--r--src/enemy/helmasaur.c8
-rw-r--r--src/enemy/keaton.c16
-rw-r--r--src/enemy/keese.c6
-rw-r--r--src/enemy/lakitu.c38
-rw-r--r--src/enemy/lakituCloud.c14
-rw-r--r--src/enemy/leever.c14
-rw-r--r--src/enemy/likeLike.c20
-rw-r--r--src/enemy/madderpillar.c36
-rw-r--r--src/enemy/mazaalBracelet.c272
-rw-r--r--src/enemy/mazaalHand.c2
-rw-r--r--src/enemy/mazaalHead.c24
-rw-r--r--src/enemy/mazaalMacro.c20
-rw-r--r--src/enemy/miniFireballGuy.c8
-rw-r--r--src/enemy/miniSlime.c6
-rw-r--r--src/enemy/moldorm.c16
-rw-r--r--src/enemy/moldworm.c90
-rw-r--r--src/enemy/octorok.c10
-rw-r--r--src/enemy/peahat.c32
-rw-r--r--src/enemy/pesto.c82
-rw-r--r--src/enemy/puffstool.c28
-rw-r--r--src/enemy/rockChuchu.c8
-rw-r--r--src/enemy/rollobite.c28
-rw-r--r--src/enemy/rope.c8
-rw-r--r--src/enemy/rupeeLike.c34
-rw-r--r--src/enemy/slime.c10
-rw-r--r--src/enemy/sluggula.c22
-rw-r--r--src/enemy/smallPesto.c12
-rw-r--r--src/enemy/spark.c4
-rw-r--r--src/enemy/spearMoblin.c16
-rw-r--r--src/enemy/spikedBeetle.c4
-rw-r--r--src/enemy/spinyChuchu.c34
-rw-r--r--src/enemy/tektite.c24
-rw-r--r--src/enemy/tektiteGolden.c22
-rw-r--r--src/enemy/treeItem.c2
-rw-r--r--src/enemy/vaatiArm.c82
-rw-r--r--src/enemy/vaatiBall.c44
-rw-r--r--src/enemy/vaatiEyesMacro.c24
-rw-r--r--src/enemy/vaatiProjectile.c30
-rw-r--r--src/enemy/vaatiRebornEnemy.c52
-rw-r--r--src/enemy/vaatiTransfigured.c68
-rw-r--r--src/enemy/vaatiTransfiguredEye.c26
-rw-r--r--src/enemy/vaatiWrath.c64
-rw-r--r--src/enemy/vaatiWrathEye.c26
-rw-r--r--src/enemy/wallMaster.c48
-rw-r--r--src/enemy/wallMaster2.c18
-rw-r--r--src/enemy/waterDrop.c8
-rw-r--r--src/enemy/wisp.c10
-rw-r--r--src/entity.c4
-rw-r--r--src/game.c6
-rw-r--r--src/interrupts.c2
-rw-r--r--src/intro.c4
-rw-r--r--src/item/itemJarEmpty.c2
-rw-r--r--src/item/itemMoleMitts.c2
-rw-r--r--src/item/itemOcarina.c2
-rw-r--r--src/item/itemRocsCape.c16
-rw-r--r--src/manager/manager1.c20
-rw-r--r--src/manager/manager15.c2
-rw-r--r--src/manager/manager1C.c2
-rw-r--r--src/manager/manager2C.c2
-rw-r--r--src/manager/manager33.c4
-rw-r--r--src/manager/manager37.c2
-rw-r--r--src/manager/manager6.c3
-rw-r--r--src/manager/managerA.c2
-rw-r--r--src/manager/managerC.c2
-rw-r--r--src/npc.c6
-rw-r--r--src/npc/anju.c4
-rw-r--r--src/npc/beedle.c6
-rw-r--r--src/npc/bigGoron.c18
-rw-r--r--src/npc/bladeBrothers.c14
-rw-r--r--src/npc/brocco.c6
-rw-r--r--src/npc/carlov.c8
-rw-r--r--src/npc/carpenter.c6
-rw-r--r--src/npc/castleMaid.c6
-rw-r--r--src/npc/castorWildsStatue.c2
-rw-r--r--src/npc/cat.c59
-rw-r--r--src/npc/cow.c10
-rw-r--r--src/npc/cucco.c2
-rw-r--r--src/npc/cuccoChick.c4
-rw-r--r--src/npc/dampe.c4
-rw-r--r--src/npc/din.c4
-rw-r--r--src/npc/dog.c8
-rw-r--r--src/npc/drLeft.c2
-rw-r--r--src/npc/epona.c4
-rw-r--r--src/npc/ezloCap.c10
-rw-r--r--src/npc/farmers.c8
-rw-r--r--src/npc/farore.c4
-rw-r--r--src/npc/festari.c6
-rw-r--r--src/npc/forestMinish.c10
-rw-r--r--src/npc/gentari.c4
-rw-r--r--src/npc/ghostBrothers.c8
-rw-r--r--src/npc/gina.c4
-rw-r--r--src/npc/gorman.c2
-rw-r--r--src/npc/goron.c10
-rw-r--r--src/npc/goronMerchant.c2
-rw-r--r--src/npc/gregal.c14
-rw-r--r--src/npc/guard.c2
-rw-r--r--src/npc/hurdyGurdyMan.c4
-rw-r--r--src/npc/kid.c6
-rw-r--r--src/npc/kingDaltus.c6
-rw-r--r--src/npc/kingGustaf.c4
-rw-r--r--src/npc/librari.c4
-rw-r--r--src/npc/mailbox.c6
-rw-r--r--src/npc/malon.c6
-rw-r--r--src/npc/mama.c8
-rw-r--r--src/npc/mayorHagen.c2
-rw-r--r--src/npc/melari.c12
-rw-r--r--src/npc/milkCart.c2
-rw-r--r--src/npc/ministerPotho.c6
-rw-r--r--src/npc/mountainMinish.c2
-rw-r--r--src/npc/mutoh.c6
-rw-r--r--src/npc/nayru.c4
-rw-r--r--src/npc/npc23.c2
-rw-r--r--src/npc/npc26.c4
-rw-r--r--src/npc/npc4E.c2
-rw-r--r--src/npc/npc5.c26
-rw-r--r--src/npc/npc58.c2
-rw-r--r--src/npc/npc9.c4
-rw-r--r--src/npc/percy.c6
-rw-r--r--src/npc/phonograph.c2
-rw-r--r--src/npc/picolyteBottle.c8
-rw-r--r--src/npc/pina.c6
-rw-r--r--src/npc/pita.c2
-rw-r--r--src/npc/postman.c18
-rw-r--r--src/npc/rem.c30
-rw-r--r--src/npc/sittingPerson.c10
-rw-r--r--src/npc/smallTownMinish.c4
-rw-r--r--src/npc/smith.c12
-rw-r--r--src/npc/stamp.c4
-rw-r--r--src/npc/stockwell.c6
-rw-r--r--src/npc/sturgeon.c6
-rw-r--r--src/npc/talon.c6
-rw-r--r--src/npc/teachers.c6
-rw-r--r--src/npc/tingleSiblings.c8
-rw-r--r--src/npc/townMinish.c12
-rw-r--r--src/npc/townsperson.c22
-rw-r--r--src/npc/vaati.c8
-rw-r--r--src/npc/vaatiReborn.c12
-rw-r--r--src/npc/windTribespeople.c8
-rw-r--r--src/npc/zelda.c20
-rw-r--r--src/npc/zeldaFollower.c8
-rw-r--r--src/object/archway.c2
-rw-r--r--src/object/backgroundCloud.c2
-rw-r--r--src/object/bakerOven.c8
-rw-r--r--src/object/bell.c2
-rw-r--r--src/object/bigVortex.c8
-rw-r--r--src/object/bird.c18
-rw-r--r--src/object/book.c12
-rw-r--r--src/object/button.c14
-rw-r--r--src/object/chestSpawner.c2
-rw-r--r--src/object/cloud.c4
-rw-r--r--src/object/fan.c2
-rw-r--r--src/object/fileScreenObjects.c34
-rw-r--r--src/object/giantLeaf.c2
-rw-r--r--src/object/greatFairy.c40
-rw-r--r--src/object/heartContainer.c4
-rw-r--r--src/object/hiddenLadderDown.c4
-rw-r--r--src/object/houseDoorExterior.c4
-rw-r--r--src/object/itemOnGround.c48
-rw-r--r--src/object/jailBars.c4
-rw-r--r--src/object/jarPortal.c18
-rw-r--r--src/object/lightableSwitch.c6
-rw-r--r--src/object/lilypadSmall.c10
-rw-r--r--src/object/lockedDoor.c8
-rw-r--r--src/object/mask.c6
-rw-r--r--src/object/metalDoor.c8
-rw-r--r--src/object/minecart.c16
-rw-r--r--src/object/minishLight.c2
-rw-r--r--src/object/minishSizedEntrance.c6
-rw-r--r--src/object/object1A.c12
-rw-r--r--src/object/object1C.c2
-rw-r--r--src/object/object2A.c4
-rw-r--r--src/object/object49.c58
-rw-r--r--src/object/object7E.c10
-rw-r--r--src/object/object86.c10
-rw-r--r--src/object/object9E.c2
-rw-r--r--src/object/objectA2.c12
-rw-r--r--src/object/objectA8.c2
-rw-r--r--src/object/objectAF.c6
-rw-r--r--src/object/objectB2.c6
-rw-r--r--src/object/pinwheel.c2
-rw-r--r--src/object/pot.c10
-rw-r--r--src/object/railtrack.c2
-rw-r--r--src/object/smoke.c4
-rw-r--r--src/object/thoughtBubble.c4
-rw-r--r--src/object/treeHidingPortal.c2
-rw-r--r--src/object/warpPoint.c16
-rw-r--r--src/object/windTribeFlag.c4
-rw-r--r--src/player.c118
-rw-r--r--src/playerItem.c54
-rw-r--r--src/playerItem/playerItem10.c8
-rw-r--r--src/playerItem/playerItem11.c24
-rw-r--r--src/playerItem/playerItem12.c2
-rw-r--r--src/playerItem/playerItem14.c2
-rw-r--r--src/playerItem/playerItem15.c2
-rw-r--r--src/playerItem/playerItemBomb.c2
-rw-r--r--src/playerItem/playerItemGustJar.c8
-rw-r--r--src/playerItem/playerItemSwordBeam.c6
-rw-r--r--src/projectile/arrowProjectile.c12
-rw-r--r--src/projectile/ballAndChain.c2
-rw-r--r--src/projectile/boneProjectile.c8
-rw-r--r--src/projectile/cannonballProjectile.c6
-rw-r--r--src/projectile/darkNutSwordSlash.c6
-rw-r--r--src/projectile/dekuSeedProjectile.c6
-rw-r--r--src/projectile/dirtBallProjectile.c28
-rw-r--r--src/projectile/fireProjectile.c4
-rw-r--r--src/projectile/gleerokProjectile.c16
-rw-r--r--src/projectile/guardLineOfSight.c4
-rw-r--r--src/projectile/gyorgMaleEnergyProjectile.c2
-rw-r--r--src/projectile/gyorgTail.c32
-rw-r--r--src/projectile/iceProjectile.c4
-rw-r--r--src/projectile/keatonDagger.c2
-rw-r--r--src/projectile/lakituCloudProjectile.c2
-rw-r--r--src/projectile/lakituLightning.c4
-rw-r--r--src/projectile/mandiblesProjectile.c31
-rw-r--r--src/projectile/mazaalEnergyBeam.c8
-rw-r--r--src/projectile/moblinSpear.c2
-rw-r--r--src/projectile/octorokBossProjectile.c24
-rw-r--r--src/projectile/projectile5.c2
-rw-r--r--src/projectile/rockProjectile.c6
-rw-r--r--src/projectile/spiderWeb.c15
-rw-r--r--src/projectile/stalfosProjectile.c12
-rw-r--r--src/projectile/v1DarkMagicProjectile.c28
-rw-r--r--src/projectile/v1EyeLaser.c4
-rw-r--r--src/projectile/v1FireProjectile.c10
-rw-r--r--src/projectile/v2Projectile.c6
-rw-r--r--src/projectile/v3ElectricProjectile.c10
-rw-r--r--src/projectile/v3HandProjectile.c4
-rw-r--r--src/projectile/v3TennisBallProjectile.c4
-rw-r--r--src/projectile/windProjectile.c4
-rw-r--r--src/projectile/winder.c4
-rw-r--r--src/script.c28
-rw-r--r--src/textbox.c2
255 files changed, 1881 insertions, 1899 deletions
diff --git a/src/code_0805436C.c b/src/code_0805436C.c
index 7ec445b3..8eb7df11 100644
--- a/src/code_0805436C.c
+++ b/src/code_0805436C.c
@@ -251,11 +251,11 @@ u32 CreateItemDrop(Entity* arg0, u32 itemID, u32 itemParameter) {
}
if (arg0->kind == 6) {
if (arg0->id == 99) {
- arg0->attachedEntity = itemEntity;
+ arg0->child = itemEntity;
} else if (arg0->id == 0x1e) {
itemEntity->direction = arg0->animationState << 3 | 0x80;
itemEntity->speed = 0xc0;
- itementity->hVelocity = 0x18000;
+ itementity->zVelocity = 0x18000;
}
}
CopyPosition(arg0, itemEntity);
diff --git a/src/code_08077DF4.c b/src/code_08077DF4.c
index ac1d61e5..89246080 100644
--- a/src/code_08077DF4.c
+++ b/src/code_08077DF4.c
@@ -40,7 +40,7 @@ void sub_08077E54(ItemBehavior* beh) {
ent->action = gPlayerEntity.animIndex;
*(u8*)&ent->spriteIndex = gPlayerEntity.frameIndex;
ent->subAction = gPlayerEntity.frameDuration;
- ent->actionDelay = gPlayerEntity.frames.all;
+ ent->actionDelay = gPlayerEntity.frame;
}
void sub_08077E78(ItemBehavior* arg0, u32 bits) {
diff --git a/src/collision.c b/src/collision.c
index 3a023bda..f43aa72d 100644
--- a/src/collision.c
+++ b/src/collision.c
@@ -195,7 +195,7 @@ NONMATCH("asm/non_matching/arm_proxy/sub_080177A0.inc", bool32 sub_080177A0(Enti
depth = this_d + ((Hitbox3D*)bb_that)->depth;
else
depth = this_d + 5;
- if ((this->height.HALF.HI - that->height.HALF.HI) + depth <= depth * 2)
+ if ((this->z.HALF.HI - that->z.HALF.HI) + depth <= depth * 2)
return TRUE;
}
}
@@ -242,7 +242,7 @@ s32 sub_08017874(Entity* a, Entity* b) {
break;
}
}
- v5 = a->currentHealth - v6;
+ v5 = a->health - v6;
if (a->kind == 3) {
if ((a->field_0x6c.HALF.HI & 1) != 0)
sub_0800449C(a, 295);
@@ -266,7 +266,7 @@ void sub_08017940(Entity* org, Entity* tgt) {
e->spritePriority.b0 = 2;
e->x.HALF.HI = (org->x.HALF.HI + org->hitbox->offset_x + tgt->x.HALF.HI + tgt->hitbox->offset_x) >> 1;
e->y.HALF.HI = (org->y.HALF.HI + org->hitbox->offset_y + tgt->y.HALF.HI + tgt->hitbox->offset_y) >> 1;
- e->height.HALF.HI = (org->height.HALF.HI + tgt->height.HALF.HI) >> 1;
+ e->z.HALF.HI = (org->z.HALF.HI + tgt->z.HALF.HI) >> 1;
e->collisionLayer = org->collisionLayer;
UpdateSpriteForCollisionLayer(e);
}
@@ -292,7 +292,7 @@ void sub_080179EC(Entity* a1, Entity* a2) {
e->spritePriority.b0 = 2;
e->spriteOffsetX = (a1->x.HALF.HI + a1->hitbox->offset_x - (a2->x.HALF.HI + a2->hitbox->offset_x)) >> 1;
e->spriteOffsetY = (a1->y.HALF.HI + a1->hitbox->offset_y - (a2->y.HALF.HI + a2->hitbox->offset_y)) >> 1;
- e->attachedEntity = a2;
+ e->child = a2;
}
}
@@ -351,7 +351,7 @@ s32 CollisionGroundItem(Entity* org, Entity* tgt, u32 direction, ColSettings* se
COLLISION_OFF(tgt);
tgt->bitfield = org->hurtType | 0x80;
if ((tgt->type == 0x5F || tgt->type == 0x60) && sub_08081420(tgt))
- tgt->currentHealth = 0;
+ tgt->health = 0;
return 2;
}
@@ -389,13 +389,13 @@ s32 sub_08017BBC(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
if ((gPlayerState.flags & (0x1 | 0x80 | 0x400 | 0x1000)) == 0) {
Entity* e = CreateObject(66, 1, 0);
if (e != NULL) {
- e->attachedEntity = org;
+ e->child = org;
gPlayerState.flags |= 0x400;
org->animationState = (direction ^ 0x10) >> 2;
}
}
tgt->damage = 4;
- org->currentHealth = sub_08017874(org, tgt);
+ org->health = sub_08017874(org, tgt);
org->knockbackDuration = 12;
org->iframes = 30;
org->field_0x46 = 384;
@@ -408,7 +408,7 @@ s32 sub_08017C40(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
if ((gPlayerState.flags & (0x1 | 0x80 | 0x800 | 0x1000)) == 0 && gPlayerState.playerAction == 0) {
if (org->action == 1 || org->action == 24) {
tgt->damage = 4;
- org->currentHealth = sub_08017874(org, tgt);
+ org->health = sub_08017874(org, tgt);
gPlayerState.flags = 0x800;
gPlayerState.playerAction = 13;
}
@@ -474,7 +474,7 @@ int sub_08017DD4(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
tgt->damage &= ~0x80;
else
tgt->damage = 4;
- gPlayerEntity.currentHealth = sub_08017874(&gPlayerEntity, tgt);
+ gPlayerEntity.health = sub_08017874(&gPlayerEntity, tgt);
tgt->iframes = -12;
if ((gPlayerState.flags & 0x80) == 0) {
sub_08079D84();
@@ -505,7 +505,7 @@ s32 sub_08017EB0(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
if (org == &gPlayerEntity) {
u32 temp = tgt->damage;
tgt->damage = 8;
- gPlayerEntity.currentHealth = sub_08017874(&gPlayerEntity, tgt);
+ gPlayerEntity.health = sub_08017874(&gPlayerEntity, tgt);
tgt->damage = temp;
gPlayerEntity.knockbackDuration = 12;
gPlayerEntity.iframes = 16;
@@ -540,7 +540,7 @@ s32 sub_08017F40(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
gPlayerState.flags |= 0x10u;
gPlayerState.jumpStatus = 0;
if (tgt->kind == ENEMY && (tgt->id == GHINI || tgt->id == ENEMY_50)) {
- org->height.HALF.HI = 0;
+ org->z.HALF.HI = 0;
PositionRelative(org, tgt, 0, 0x10000);
} else {
PositionRelative(tgt, org, 0, 0x10000);
@@ -554,7 +554,7 @@ s32 sub_08017F40(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
return 1;
}
} else {
- org->currentHealth = 0;
+ org->health = 0;
}
} else if (tgt->kind == 3 && org == &gPlayerEntity) {
sub_08004484(tgt, org);
@@ -575,13 +575,13 @@ NONMATCH("asm/non_matching/collision/sub_0801802C.inc",
goto _0801807A;
} else if (kind == 8) {
if ((((org->direction ^ 0x10) - 4 * tgt->animationState + 5) & 0x1Fu) <= 0xA) {
- org->currentHealth = 0;
+ org->health = 0;
_0801807A:
sub_080180BC(org, tgt);
return 1;
}
} else {
- org->currentHealth = 0;
+ org->health = 0;
return 0;
}
x = 0x11aa;
@@ -639,7 +639,7 @@ s32 sub_08018168(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
return 1;
}
} else {
- org->currentHealth = 0;
+ org->health = 0;
}
} else if ((tgt->kind == 3) && (org == &gPlayerEntity)) {
sub_08004484(tgt, &gPlayerEntity);
@@ -668,7 +668,7 @@ s32 sub_08018288(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
if (org == &gPlayerEntity)
sub_0807AFE8();
else
- org->currentHealth = 0;
+ org->health = 0;
return 1;
}
@@ -704,7 +704,7 @@ s32 sub_08018308(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
tgt->damage = settings->_3;
tmp2 = 0xFF;
if (settings->_3 != 0)
- org->currentHealth = sub_08017874(org, tgt);
+ org->health = sub_08017874(org, tgt);
if (settings->_4 > org->field_0x43)
org->field_0x43 = settings->_4;
tgt->field_0x46 = 16 * settings->_5;
@@ -714,7 +714,7 @@ s32 sub_08018308(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
tgt->knockbackDuration = settings->_7;
tmp2 &= org->damage = settings->_8;
if (tmp2 != 0)
- tgt->currentHealth = sub_08017874(tgt, org);
+ tgt->health = sub_08017874(tgt, org);
if (settings->_9 > tgt->field_0x43)
tgt->field_0x43 = settings->_9;
}
diff --git a/src/coord.c b/src/coord.c
index 28dda7c6..82d994ea 100644
--- a/src/coord.c
+++ b/src/coord.c
@@ -39,7 +39,7 @@ void PositionRelative(Entity* source, Entity* target, s32 offsetX, s32 offsetY)
y = source->y.WORD;
target->y.WORD = y + offsetY;
- target->height = source->height; // ldr
+ target->z = source->z; // ldr
target->collisionLayer = source->collisionLayer;
UpdateSpriteForCollisionLayer(target);
}
diff --git a/src/enemy/acroBandits.c b/src/enemy/acroBandits.c
index dc8fdf95..368606f2 100644
--- a/src/enemy/acroBandits.c
+++ b/src/enemy/acroBandits.c
@@ -53,7 +53,7 @@ void sub_080318DC(Entity* this) {
if (this->bitfield != 0x80 && this->bitfield != 0x81) {
if (this->type == 1) {
if (this->action < 7 && this->knockbackDuration != 0) {
- brother = this->attachedEntity;
+ brother = this->child;
if (brother) {
brother->parent = this->parent;
do {
@@ -61,42 +61,42 @@ void sub_080318DC(Entity* this) {
brother->spritePriority.b1 = 1;
if (brother->iframes == 0)
brother->iframes = -12;
- } while (brother = brother->attachedEntity, brother != NULL);
+ } while (brother = brother->child, brother != NULL);
}
if (this->parent) {
- this->parent->attachedEntity = this->attachedEntity;
+ this->parent->child = this->child;
} else {
- if (this->attachedEntity)
+ if (this->child)
this->parent = this;
}
this->action = 9;
this->spritePriority.b1 = 1;
if (this->knockbackDirection < 0x10) {
- this->spriteSettings.b.flipX = 0;
+ this->spriteSettings.flipX = 0;
} else {
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
}
InitializeAnimation(this, 14);
}
- if (this->currentHealth == 0) {
+ if (this->health == 0) {
this->knockbackDirection = ((this->knockbackDirection + (7 & Random())) - 4) & 0x1f;
this->knockbackDuration += this->type2 * 3;
sub_08032338(this);
}
}
- if (this->knockbackDuration != 0 && this->frames.all & 0x10) {
+ if (this->knockbackDuration != 0 && this->frame & 0x10) {
if (this->type == 0) {
this->action = 8;
} else {
this->action = 9;
}
if (this->knockbackDirection < 0x10) {
- this->spriteSettings.b.flipX = 0;
+ this->spriteSettings.flipX = 0;
} else {
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
}
this->spritePriority.b1 = 1;
InitializeAnimation(this, 14);
@@ -147,7 +147,7 @@ void sub_08031AC8(Entity* this)
y = this->field_0x76.HWORD + ((s32)(rand >> 4) % 5) * 0x10 - 0x20;
if (sub_080002D4(x, y, this->collisionLayer) == 0) {
this->action = 2;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->x.HALF.HI = x;
this->y.HALF.HI = y;
InitializeAnimation(this, 0);
@@ -158,11 +158,11 @@ void sub_08031AC8(Entity* this)
void sub_08031B48(Entity* this) {
GetNextFrame(this);
- if (this->frames.b.f0) {
- this->frames.all = 0;
+ if (this->frame & 1) {
+ this->frame = 0;
COLLISION_ON(this);
} else {
- if (this->frames.b.f3) {
+ if (this->frame & 0x80) {
this->action = 0x3;
this->actionDelay = gUnk_080CE5B0[Random() & 7];
InitializeAnimation(this, 1);
@@ -174,15 +174,14 @@ void sub_08031B98(Entity* this) {
if (sub_08031E04(this)) {
this->action = 5;
if (this->x.HALF.HI > gUnk_020000B0->x.HALF.HI) {
- this->spriteSettings.b.flipX = 0;
+ this->spriteSettings.flipX = 0;
} else {
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
}
InitializeAnimation(this, 3);
} else {
- if (this->frames.b.f0 && this->actionDelay) {
- // this->frames.b.f0 = 0;
- this->frames.all &= 0xfe;
+ if ((this->frame & 1) && this->actionDelay) {
+ this->frame &= 0xfe;
this->actionDelay--;
}
GetNextFrame(this);
@@ -196,10 +195,10 @@ void sub_08031B98(Entity* this) {
void sub_08031C1C(Entity* this) {
GetNextFrame(this);
- if (this->frames.b.f3) {
+ if (this->frame & 0x80) {
this->action = '\x01';
this->actionDelay = gUnk_080CE5B8[Random() & 7];
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
}
@@ -207,7 +206,7 @@ void sub_08031C58(Entity* this) {
Entity *a, *b;
GetNextFrame(this);
- if (this->frames.b.f3) {
+ if (this->frame & 0x80) {
if (gEntCount < 0x43) {
u32 tmp = Random();
tmp &= 3;
@@ -217,33 +216,33 @@ void sub_08031C58(Entity* this) {
a->parent = NULL;
a->field_0x74.HALF.LO = tmp;
sub_08031E48(this, a);
- a->attachedEntity = CreateEnemy(ACRO_BANDIT, 1);
+ a->child = CreateEnemy(ACRO_BANDIT, 1);
- b = a->attachedEntity;
+ b = a->child;
b->type2 = 1;
b->parent = a;
b->field_0x74.HALF.LO = tmp;
sub_08031E48(this, b);
- b->attachedEntity = CreateEnemy(ACRO_BANDIT, 1);
+ b->child = CreateEnemy(ACRO_BANDIT, 1);
- a = b->attachedEntity;
+ a = b->child;
a->type2 = 2;
a->parent = b;
a->field_0x74.HALF.LO = tmp;
sub_08031E48(this, a);
- a->attachedEntity = CreateEnemy(ACRO_BANDIT, 1);
+ a->child = CreateEnemy(ACRO_BANDIT, 1);
- b = a->attachedEntity;
+ b = a->child;
b->type2 = 3;
b->parent = a;
b->field_0x74.HALF.LO = tmp;
sub_08031E48(this, b);
- b->attachedEntity = CreateEnemy(ACRO_BANDIT, 1);
+ b->child = CreateEnemy(ACRO_BANDIT, 1);
- a = b->attachedEntity;
+ a = b->child;
a->type2 = 4;
a->parent = b;
- a->attachedEntity = NULL;
+ a->child = NULL;
a->field_0x74.HALF.LO = tmp;
sub_08031E48(this, a);
@@ -253,8 +252,8 @@ void sub_08031C58(Entity* this) {
InitializeAnimation(this, 7);
}
} else {
- if (this->frames.b.f0) {
- this->frames.all = 0;
+ if (this->frame & 1) {
+ this->frame = 0;
COLLISION_OFF(this);
}
}
@@ -266,7 +265,7 @@ void sub_08031D70(Entity* this) {
this->action = 7;
COLLISION_OFF(this);
this->actionDelay = 5;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
}
@@ -282,13 +281,13 @@ void sub_08031DA0(Entity* this) {
}
void sub_08031DC4(Entity* this) {
- if (this->frames.b.f3) {
+ if (this->frame & 0x80) {
this->action = 1;
this->actionDelay = 0xb4;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
} else {
GetNextFrame(this);
- if ((this->frames.all & 0xf) == 2) {
+ if ((this->frame & 0xf) == 2) {
COLLISION_OFF(this);
}
}
@@ -302,7 +301,7 @@ u32 sub_08031E04(Entity* this) {
if (ent == NULL)
return 0;
- tmp = &gUnk_080CE5C0[this->frames.all & 6];
+ tmp = &gUnk_080CE5C0[this->frame & 6];
return sub_0806FCB8(this, ent->x.HALF.HI + tmp[0], ent->y.HALF.HI + tmp[1], 0x50);
}
@@ -323,8 +322,8 @@ void sub_08031E90(Entity* this) {
void sub_08031EA8(Entity* this) {
this->action = 1;
this->spritePriority.b1 = 1;
- this->hVelocity = 0x40000;
- this->height.HALF.HI = (4 - this->type2) * 0xe;
+ this->zVelocity = 0x40000;
+ this->z.HALF.HI = (4 - this->type2) * 0xe;
this->field_0x78.HALF.HI = Random();
InitializeAnimation(this, 4);
}
@@ -332,22 +331,22 @@ void sub_08031EA8(Entity* this) {
void sub_08031EE8(Entity* this) {
int draw;
- this->height.WORD -= this->hVelocity;
- this->hVelocity -= 0x1800;
+ this->z.WORD -= this->zVelocity;
+ this->zVelocity -= 0x1800;
- if (this->height.HALF.HI < 1) {
- draw = this->spriteSettings.b.draw;
+ if (this->z.HALF.HI < 1) {
+ draw = this->spriteSettings.draw;
if (!draw)
EnqueueSFX(299);
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
}
- draw = this->spriteSettings.b.draw;
+ draw = this->spriteSettings.draw;
if (draw == 1)
GetNextFrame(this);
- if (this->hVelocity < 1) {
+ if (this->zVelocity < 1) {
this->action = 2;
COLLISION_ON(this);
InitializeAnimation(this, 5);
@@ -356,10 +355,10 @@ void sub_08031EE8(Entity* this) {
void sub_08031F54(Entity* this) {
sub_08003FC4(this, gUnk_080CE5F0[this->type2]);
- if (this->type2 * -0xe <= this->height.HALF.HI) {
+ if (this->type2 * -0xe <= this->z.HALF.HI) {
this->action = 3;
this->actionDelay = 20;
- this->height.HALF.HI = this->type2 * -0xe;
+ this->z.HALF.HI = this->type2 * -0xe;
if (this->parent != NULL)
this->spritePriority.b1 = 0;
InitializeAnimation(this, 6);
@@ -368,11 +367,11 @@ void sub_08031F54(Entity* this) {
void sub_08031FB0(Entity* this) {
GetNextFrame(this);
- if (this->frames.b.f3 && (this->parent || --this->actionDelay == 0)) {
+ if ((this->frame & 0x80) && (this->parent || --this->actionDelay == 0)) {
this->action = 4;
this->direction = sub_08049F84(this, 1);
*(u8*)&this->field_0x76 = 0;
- if (this->attachedEntity) {
+ if (this->child) {
InitializeAnimation(this, 9);
} else {
InitializeAnimation(this, 8);
@@ -406,7 +405,7 @@ void sub_08032008(Entity* this) {
}
if (this->direction & 0xf)
- this->spriteSettings.b.flipX = (this->direction >> 4 ^ 1);
+ this->spriteSettings.flipX = (this->direction >> 4 ^ 1);
ProcessMovement(this);
} else {
@@ -445,19 +444,19 @@ void sub_08032160(Entity* this) {
dir = gUnk_080CE5FA[this->field_0x74.HALF.LO * 5 + this->type2];
this->direction = dir;
if (dir >= 0x10) {
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
} else {
- this->spriteSettings.b.flipX = 0;
+ this->spriteSettings.flipX = 0;
}
this->speed = 0xf0;
- this->hVelocity = 0x12000;
+ this->zVelocity = 0x12000;
this->spritePriority.b1 = 1;
InitializeAnimation(this, 12);
}
- if (this->attachedEntity == NULL) {
+ if (this->child == NULL) {
for (tmp = this->parent; tmp != NULL; tmp = tmp->parent) {
- if (tmp->currentHealth != 0)
+ if (tmp->health != 0)
tmp->actionDelay = 0;
}
this->actionDelay = 0;
@@ -473,11 +472,11 @@ void sub_080321E8(Entity* this) {
void sub_08032204(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 1) {
- this->frames.all = 0;
+ if (this->frame & 1) {
+ this->frame = 0;
this->frameDuration = (Random() & 0x30) + 30;
} else {
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 9;
InitializeAnimation(this, 13);
}
@@ -486,14 +485,14 @@ void sub_08032204(Entity* this) {
void sub_08032248(Entity* this) {
if (sub_08003FC4(this, 0x1800) == 0) {
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
((Entity*)this->field_0x7c.WORD)->actionDelay--;
DeleteEntity(this);
} else {
GetNextFrame(this);
- if ((this->frames.all & 0xf) == 2)
+ if ((this->frame & 0xf) == 2)
COLLISION_OFF(this);
}
}
@@ -506,10 +505,10 @@ void sub_08032290(Entity* this) {
}
u32 sub_080322A4(Entity* this) {
- if (this->attachedEntity != NULL && (this->attachedEntity->height.HALF.HI + 8) >= this->height.HALF.HI) {
- if (this->height.HALF.HI) {
+ if (this->child != NULL && (this->child->z.HALF.HI + 8) >= this->z.HALF.HI) {
+ if (this->z.HALF.HI) {
this->action = 5;
- this->height.HALF.HI = this->attachedEntity->height.HALF.HI + 8;
+ this->z.HALF.HI = this->child->z.HALF.HI + 8;
InitializeAnimation(this, 11);
return 1;
} else {
@@ -524,15 +523,15 @@ void sub_080322E8(Entity* this) {
u8 tmp;
if (this->field_0x78.HALF.LO) {
if (--this->field_0x78.HALF.LO == 0) {
- u32 flipX = this->spriteSettings.b.flipX;
- this->spriteSettings.b.flipX = flipX ^ 1;
+ u32 flipX = this->spriteSettings.flipX;
+ this->spriteSettings.flipX = flipX ^ 1;
}
} else {
tmp = this->direction;
if (tmp & 0xF) {
tmp >>= 4;
tmp ^= 1;
- if (tmp != this->spriteSettings.b.flipX) {
+ if (tmp != this->spriteSettings.flipX) {
this->field_0x78.HALF.LO = 6;
}
}
diff --git a/src/enemy/beetle.c b/src/enemy/beetle.c
index 4b1d8429..c1b560d1 100644
--- a/src/enemy/beetle.c
+++ b/src/enemy/beetle.c
@@ -37,7 +37,7 @@ void sub_08021780(Entity* this) {
COLLISION_OFF(this);
this->spritePriority.b0 = 3;
CopyPositionAndSpriteOffset(&gPlayerEntity, this);
- this->height.HALF.HI = -1;
+ this->z.HALF.HI = -1;
((u8*)&this->field_0x86)[1] = 1;
InitializeAnimation(this, 6);
}
@@ -47,7 +47,7 @@ void sub_08021780(Entity* this) {
break;
}
- if (this->currentHealth == 0)
+ if (this->health == 0)
this->knockbackDuration = 0;
sub_0804AA30(this, gUnk_080CB590);
@@ -71,7 +71,7 @@ void sub_08021848(Entity* this) {
gUnk_080CB5C8[this->subAction](this);
} else {
this->action = 3;
- this->height.HALF.HI = 0;
+ this->z.HALF.HI = 0;
InitializeAnimation(this, 2);
}
}
@@ -102,20 +102,20 @@ void sub_080218B4(Entity* this) {
void sub_080218CC(Entity* this) {
if (this->subAction == 0) {
this->subAction = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->direction = ((sub_08049F84(this, 1) ^ 0x10) + gUnk_080CB5DC[Random() & 7]) & 0x1f;
this->speed = 0x100;
- this->hVelocity = 0x12000;
+ this->zVelocity = 0x12000;
}
GetNextFrame(this);
- if (this->frames.all & 1) {
+ if (this->frame & 1) {
sub_080AEFE0(this);
if (sub_080044EC(this, 0x1c00) == 0)
this->frameDuration = 1;
}
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 2;
this->actionDelay = (Random() & 0x38) + 8;
this->field_0xf = 1;
@@ -129,8 +129,8 @@ void sub_08021984(Entity* this) {
if (this->subAction == 0) {
this->subAction = 1;
COLLISION_ON(this);
- this->spriteSettings.b.draw = 3;
- this->height.HALF.HI = -0x80;
+ this->spriteSettings.draw = 3;
+ this->z.HALF.HI = -0x80;
this->spriteRendering.b3 = 1;
this->spriteOrientation.flipY = 1;
EnqueueSFX(0x12d);
@@ -140,7 +140,7 @@ void sub_08021984(Entity* this) {
this->action = 2;
this->actionDelay = 16;
this->field_0xf = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->speed = 0x180;
((u8*)&this->field_0x86)[0] = 60;
InitializeAnimation(this, 0);
@@ -187,7 +187,7 @@ void sub_08021A64(Entity* this) {
void sub_08021AD8(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 1) {
+ if (this->frame & 1) {
if (this->actionDelay) {
u32 tmp;
@@ -207,7 +207,7 @@ void sub_08021AD8(Entity* this) {
this->frameDuration = 1;
}
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 2;
this->actionDelay = 20;
((u8*)&this->field_0x86)[0] = 60;
@@ -218,7 +218,7 @@ void sub_08021AD8(Entity* this) {
void sub_08021B64(Entity* this) {
if (gPlayerState.flags & 4) {
this->action = 3;
- this->height.WORD = 0;
+ this->z.WORD = 0;
InitializeAnimation(this, 2);
} else {
int iVar4 = 1;
@@ -238,7 +238,7 @@ void sub_08021B64(Entity* this) {
if (iVar4 == 0) {
this->action = 6;
- this->hVelocity = 0x10000;
+ this->zVelocity = 0x10000;
((u8*)&this->field_0x86)[1] = 0;
if (gPlayerEntity.direction != 0xff) {
this->direction = 0x10 ^ gPlayerEntity.direction;
@@ -252,7 +252,7 @@ void sub_08021B64(Entity* this) {
gPlayerState.field_0xaa++;
CopyPositionAndSpriteOffset(&gPlayerEntity, this);
this->x.HALF.HI += gUnk_080CB5E4[(this->field_0xf++ & 0xe) >> 1];
- this->height.HALF.HI--;
+ this->z.HALF.HI--;
GetNextFrame(this);
}
}
@@ -260,13 +260,13 @@ void sub_08021B64(Entity* this) {
void sub_08021C58(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 1) {
+ if (this->frame & 1) {
sub_080AEFE0(this);
if (sub_08003FC4(this, 0x1800) == 0)
this->frameDuration = 1;
}
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 2;
this->actionDelay = 60;
this->field_0xf = 1;
@@ -278,7 +278,7 @@ void sub_08021C58(Entity* this) {
}
void sub_08021CD0(Entity* this) {
- if ((this->frames.all & 0x80) == 0)
+ if ((this->frame & 0x80) == 0)
GetNextFrame(this);
if (sub_08049F84(this, 1) == 0xff)
@@ -299,7 +299,7 @@ u32 sub_08021D00(Entity* this) {
} else {
this->action = 4;
this->actionDelay = 1;
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
InitializeAnimation(this, 4);
ret = 1;
}
diff --git a/src/enemy/bladeTrap.c b/src/enemy/bladeTrap.c
index 9f89f8f0..66729fce 100644
--- a/src/enemy/bladeTrap.c
+++ b/src/enemy/bladeTrap.c
@@ -8,8 +8,8 @@ extern void sub_080A2CC0();
void BladeTrap(Entity* this) {
if (this->action == 0) {
this->action = 1;
- this->attachedEntity = GetCurrentRoomProperty(this->type);
- sub_080A2CC0(this, &this->attachedEntity, &this->field_0x74);
+ this->child = GetCurrentRoomProperty(this->type);
+ sub_080A2CC0(this, &this->child, &this->field_0x74);
}
if (!(this->direction & 0x80)) {
sub_0806F69C(this);
@@ -19,6 +19,6 @@ void BladeTrap(Entity* this) {
if (!(this->direction & 0x80)) {
EnqueueSFX(0x74);
}
- sub_080A2CC0(this, &this->attachedEntity, &this->field_0x74.HWORD);
+ sub_080A2CC0(this, &this->child, &this->field_0x74.HWORD);
}
}
diff --git a/src/enemy/bobomb.c b/src/enemy/bobomb.c
index 579a5c4c..b9976950 100644
--- a/src/enemy/bobomb.c
+++ b/src/enemy/bobomb.c
@@ -54,7 +54,7 @@ void sub_0802C688(Entity* this) {
this->action = 3;
this->hitType = 0x6e;
this->field_0xf = 1;
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
this->speed = 0;
this->field_0x80.HALF.HI = 1;
InitializeAnimation(this, this->direction >> 4 | 6);
@@ -68,15 +68,15 @@ void sub_0802C7AC(Entity* this) {
if (this->subAction < 3 && !sub_0806F520(this)) {
this->subAction = 0;
this->field_0xf = 1;
- this->height.HALF.HI = 0;
+ this->z.HALF.HI = 0;
if (this->field_0x82.HALF.LO != 2) {
this->speed = this->field_0x82.HALF.LO ? 0x200 : 0x80;
}
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
this->field_0x82.HALF.HI = 0;
this->field_0x80.HALF.HI = 0;
} else {
- this->height.HALF.HI = -1;
+ this->z.HALF.HI = -1;
gUnk_080CD600[this->subAction](this);
if (this->actionDelay != 0) {
GetNextFrame(this);
@@ -135,7 +135,7 @@ void sub_0802C8B8(Entity* this) {
void sub_0802C8C4(Entity* this) {
sub_0804A7D4(this);
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
void sub_0802C8D8(Entity* this) {
@@ -225,7 +225,7 @@ void sub_0802CA94(Entity* this) {
COLLISION_OFF(this);
this->field_0xf = 1;
this->spritePriority.b1 = 1;
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
this->speed = 0;
this->field_0x82.HALF.HI = 0;
this->field_0x80.HALF.HI = 0;
@@ -242,7 +242,7 @@ void sub_0802CAF8(Entity* this) {
}
sub_0802CC18(this);
sub_08078930(this);
- if (this->field_0xf && this->height.HALF.HI == 0) {
+ if (this->field_0xf && this->z.HALF.HI == 0) {
this->field_0xf = 0;
COLLISION_ON(this);
this->hitType = 0x6e;
@@ -276,9 +276,9 @@ void sub_0802CBC4(Entity* this) {
Entity* ent;
this->action = 4;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
COLLISION_OFF(this);
- this->currentHealth = 0;
+ this->health = 0;
if (this->field_0x82.HALF.HI) {
sub_08079184();
}
diff --git a/src/enemy/bombPeahat.c b/src/enemy/bombPeahat.c
index 9b2b5547..187670e9 100644
--- a/src/enemy/bombPeahat.c
+++ b/src/enemy/bombPeahat.c
@@ -87,7 +87,7 @@ void sub_0802A8F4(Entity* this) {
void sub_0802A8FC(Entity* this) {
if ((gPlayerState.field_0x1c & 0xf) == 0) {
- this->currentHealth = gPlayerState.field_0x1c & 0xf;
+ this->health = gPlayerState.field_0x1c & 0xf;
}
}
@@ -96,7 +96,7 @@ void nullsub_143(Entity* this) {
}
void sub_0802A91C(Entity* this) {
- this->currentHealth = 0;
+ this->health = 0;
}
void sub_0802A924(Entity* this) {
@@ -108,7 +108,7 @@ void sub_0802A924(Entity* this) {
#ifdef EU
this->field_0x3c |= 0x10;
#endif
- this->height.HALF.HI = -0x30;
+ this->z.HALF.HI = -0x30;
this->field_0x80.HALF.LO = Random() & 1;
this->field_0x82.HWORD = 0;
this->field_0x7a.HALF.HI = 0;
@@ -140,7 +140,7 @@ void sub_0802A9A8(Entity* this) {
if (gRoomControls.unk2 != 0) {
return;
}
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x82.HWORD = 1;
if (this->field_0x80.HALF.LO) {
this->x.HALF.HI = gRoomControls.roomScrollX - 0x10;
@@ -166,10 +166,10 @@ void sub_0802AA40(Entity* this) {
if (this->actionDelay) {
this->actionDelay--;
} else {
- Entity* ent = this->attachedEntity;
+ Entity* ent = this->child;
if (ent) {
if (ent->next == NULL) {
- this->attachedEntity = NULL;
+ this->child = NULL;
} else {
u32 direction = DirectionRound(this->field_0x80.HALF.LO * 0x10 + 0x18);
@@ -198,12 +198,12 @@ void sub_0802AAC0(Entity* this) {
}
if (this->field_0x80.HALF.HI) {
- Entity* ent = this->attachedEntity;
+ Entity* ent = this->child;
if (ent == NULL) {
this->field_0x80.HALF.HI = 0;
} else if (ent->next == NULL) {
this->field_0x80.HALF.HI = 0;
- this->attachedEntity = NULL;
+ this->child = NULL;
} else if (ent->actionDelay == 0 && ent->field_0xf < 0x51) {
this->field_0x80.HALF.HI = 0;
}
@@ -227,10 +227,10 @@ void sub_0802AB40(Entity* this) {
sub_0802AC40(this);
switch (this->field_0x78.HALF.LO) {
case 0:
- if (this->height.HALF.HI) {
+ if (this->z.HALF.HI) {
if (--this->field_0x78.HALF.HI == 0) {
this->field_0x78.HALF.HI = 4;
- this->height.HALF.HI++;
+ this->z.HALF.HI++;
}
} else {
this->field_0x78.HALF.LO = 1;
@@ -247,10 +247,10 @@ void sub_0802AB40(Entity* this) {
}
break;
case 2:
- if (-0x30 < this->height.HALF.HI) {
+ if (-0x30 < this->z.HALF.HI) {
if (--this->field_0x78.HALF.HI == 0) {
this->field_0x78.HALF.HI = 4;
- this->height.HALF.HI--;
+ this->z.HALF.HI--;
sub_0802ACDC(this, 4);
}
} else {
@@ -264,7 +264,7 @@ void sub_0802AB40(Entity* this) {
#endif
void sub_0802AC08(Entity* this) {
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 2;
this->subAction = 0;
this->actionDelay = 0x40;
@@ -286,7 +286,7 @@ void sub_0802AC40(Entity* this) {
this->field_0x7a.HALF.LO = 0;
this->spritePriority.b1 = 0;
} else {
- if (this->height.HALF.HI == 0) {
+ if (this->z.HALF.HI == 0) {
if (this->spritePriority.b1 != 1) {
this->spritePriority.b1 = 1;
}
@@ -299,7 +299,7 @@ void sub_0802AC40(Entity* this) {
} else {
if (sub_0802B234(this)) {
this->field_0x7a.HALF.LO = 1;
- if (this->height.HALF.HI == 0) {
+ if (this->z.HALF.HI == 0) {
this->spritePriority.b1 = 1;
} else {
this->spritePriority.b1 = 3;
@@ -335,19 +335,19 @@ void sub_0802AD1C(Entity* this, u32 param_2) {
void sub_0802AD54(Entity* this) {
if (this->field_0x82.HWORD != 0) {
if (gRoomControls.unk2 != 0) {
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
DeleteEntity(this);
return;
}
if (gRoomControls.roomOriginY > this->y.HALF.HI ||
(gRoomControls.roomOriginY + gRoomControls.height + 0x20) < this->y.HALF.HI) {
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
} else {
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
}
}
if (this->field_0x80.HALF.HI) {
- if (this->attachedEntity == NULL || this->attachedEntity->next == NULL) {
+ if (this->child == NULL || this->child->next == NULL) {
this->action = 4;
this->actionDelay = 0xc0;
this->field_0xf = 4;
@@ -365,10 +365,10 @@ void sub_0802ADDC(Entity* this) {
if (ent != NULL) {
ent->type2 = !!sub_0802B234(this);
ent->parent = this;
- this->attachedEntity = ent;
+ this->child = ent;
CopyPosition(this, ent);
/*#ifdef EU
- this->height.HALF.HI += 8;
+ this->z.HALF.HI += 8;
#endif*/
this->field_0x80.HALF.HI = 1;
if (this->type == 0) {
@@ -381,7 +381,7 @@ void sub_0802ADDC(Entity* this) {
void sub_0802AE24(Entity* this) {
this->action = 1;
this->actionDelay = 0xf0;
- this->hVelocity = 0x8000;
+ this->zVelocity = 0x8000;
this->hitbox = (Hitbox*)&gUnk_080CD174;
this->field_0x3c = 3;
this->field_0x16 = 0;
@@ -403,7 +403,7 @@ void sub_0802AE68(Entity* this) {
} else {
if (ent->field_0x80.HALF.HI) {
CopyPosition(ent, this);
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
} else {
this->action = 3;
this->field_0x80.HALF.LO = 1;
@@ -539,7 +539,7 @@ void sub_0802B048(Entity* this) {
this->action = 4;
this->hitbox = (Hitbox*)&gUnk_080CD17C;
this->actionDelay = 0xf;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
COLLISION_ON(this);
this->field_0x7a.HALF.HI = 0;
sub_08078954(this);
@@ -621,7 +621,7 @@ Entity* sub_0802B250(Entity* this) {
}
void sub_0802B264(Entity* this) {
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
if (sub_0802B234(this)) {
this->spritePriority.b1 = 3;
} else {
diff --git a/src/enemy/bowMoblin.c b/src/enemy/bowMoblin.c
index 893d7618..c9605ce2 100644
--- a/src/enemy/bowMoblin.c
+++ b/src/enemy/bowMoblin.c
@@ -26,7 +26,7 @@ void sub_0803C198(Entity* this) {
sub_0804AA30(this, gUnk_080CFF78);
if ((this->bitfield & 0x80) != 0) {
sub_0803C5F0(this);
- pEVar1 = this->attachedEntity;
+ pEVar1 = this->child;
if (pEVar1 != NULL) {
pEVar1->field_0xf++;
}
diff --git a/src/enemy/businessScrub.c b/src/enemy/businessScrub.c
index 275b1775..8ade7efb 100644
--- a/src/enemy/businessScrub.c
+++ b/src/enemy/businessScrub.c
@@ -63,7 +63,7 @@ void sub_08028934(Entity* this) {
sub_080290E0(this, 4);
pEVar1 = CreateFx(this, FX_BUSH, 0);
if (pEVar1 != NULL) {
- pEVar1->height.HALF.HI -= 8;
+ pEVar1->z.HALF.HI -= 8;
}
EnqueueSFX(0x1bb);
}
@@ -112,7 +112,7 @@ void sub_08028A74(Entity* this) {
switch (this->subAction) {
case 0:
unk = 1;
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->subAction = 1;
this->actionDelay = 0x3c;
this->field_0xf = 0x10;
@@ -138,19 +138,19 @@ void sub_08028A74(Entity* this) {
case 2:
unk = 1;
sub_080290FC(this);
- if (this->frames.all & 1) {
+ if (this->frame & 1) {
Entity* ent = CreateProjectileWithParent(this, 4, 0);
if (ent != NULL) {
ent->parent = this;
ent->direction = this->direction;
- this->frames.all &= ~1;
+ this->frame &= ~1;
this->subAction = 3;
}
}
break;
case 3:
unk = 2;
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
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->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->subAction = 1;
sub_08028FDC(this);
sub_080290E0(this, 5);
@@ -200,7 +200,7 @@ void sub_08028BC4(Entity* this) {
}
break;
case 1:
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 4;
this->subAction = 0;
this->actionDelay = 0x1e;
@@ -209,7 +209,7 @@ void sub_08028BC4(Entity* this) {
iVar1 = sub_0804A9FC(this, 0x1c);
if (iVar1 != NULL) {
iVar1->spritePriority.b0 = 3;
- iVar1->height.HALF.HI -= 12;
+ iVar1->z.HALF.HI -= 12;
sub_0805E3A0(iVar1, 2);
}
SetFlag(this->field_0x86.HWORD);
@@ -549,7 +549,7 @@ void sub_0802925C(Entity* this) {
void sub_08029270(Entity* this) {
if (this->action == 0) {
this->action++;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 0xe);
} else {
GetNextFrame(this);
diff --git a/src/enemy/chaser.c b/src/enemy/chaser.c
index 7e0ac960..869fbfc0 100644
--- a/src/enemy/chaser.c
+++ b/src/enemy/chaser.c
@@ -63,7 +63,7 @@ void sub_0802B56C(Entity* this) {
void sub_0802B5C8(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 1;
this->actionDelay = 30;
InitializeAnimation(this, 0);
diff --git a/src/enemy/chuchu.c b/src/enemy/chuchu.c
index 32f1a1b1..c6c83615 100644
--- a/src/enemy/chuchu.c
+++ b/src/enemy/chuchu.c
@@ -101,11 +101,11 @@ void sub_0801EF40(Entity* this) {
if (this->type == 2) {
if (this->bitfield == 0x8e || this->bitfield == 0x95) {
COLLISION_OFF(this);
- this->currentHealth = 0;
+ this->health = 0;
}
}
- health = this->currentHealth;
+ health = this->health;
if (health) {
if (this->bitfield == 0x94) {
sub_0801FB68(this);
@@ -117,10 +117,10 @@ void sub_0801EF40(Entity* this) {
}
} else {
sub_0804AA1C(this);
- this->hVelocity = 0;
+ this->zVelocity = 0;
InitializeAnimation(this, 9);
}
- this->field_0x80.HALF.LO = this->currentHealth;
+ this->field_0x80.HALF.LO = this->health;
sub_0804AA30(this, gUnk_080CA21C);
}
@@ -157,7 +157,7 @@ void sub_0801F048(Entity* this) {
}
void sub_0801F084(Entity* this) {
- if ((this->frames.all & 0x80) == 0)
+ if ((this->frame & 0x80) == 0)
GetNextFrame(this);
sub_08001242(this);
}
@@ -165,7 +165,7 @@ void sub_0801F084(Entity* this) {
void sub_0801F0A4(Entity* this) {
sub_0804A720(this);
this->action = 1;
- this->field_0x80.HALF.LO = this->currentHealth;
+ this->field_0x80.HALF.LO = this->health;
this->field_0x82.HALF.LO = 0;
}
@@ -175,7 +175,7 @@ void nullsub_4(Entity* this) {
void sub_0801F0C8(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 3;
this->actionDelay = (Random() & 3) + 0xc;
this->field_0xf = Random();
@@ -210,9 +210,9 @@ void sub_0801F12C(Entity* this) {
}
void sub_0801F1B0(Entity* this) {
- if (this->frames.all & 0x10) {
- if (this->frames.all & 1) {
- this->frames.all ^= 1;
+ if (this->frame & 0x10) {
+ if (this->frame & 1) {
+ this->frame ^= 1;
this->hitType = 90;
EnqueueSFX(299);
}
@@ -223,7 +223,7 @@ void sub_0801F1B0(Entity* this) {
GetNextFrame(this);
}
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
if (sub_0801FBD0(this)) {
sub_0801F328(this);
} else {
@@ -242,7 +242,7 @@ void sub_0801F228(Entity* this) {
void sub_0801F250(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80)
+ if (this->frame & 0x80)
sub_0801F360(this);
}
@@ -269,9 +269,9 @@ void sub_0801F270(Entity* this) {
void sub_0801F2CC(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 1;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
InitializeAnimation(this, 4);
}
}
@@ -279,7 +279,7 @@ void sub_0801F2CC(Entity* this) {
void sub_0801F2F8(Entity* this) {
sub_08003FC4(this, 0x1800);
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
sub_0801F340(this);
sub_0804AA1C(this);
}
@@ -317,7 +317,7 @@ void sub_0801F3AC(Entity* this) {
if (this->field_0x82.HALF.LO || PlayerInRange(this, 1, 0x48)) {
if (this->action == 1) {
this->action = 2;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x82.HALF.LO = 1;
InitializeAnimation(this, 0);
}
@@ -339,7 +339,7 @@ void sub_0801F428(Entity* this) {
sub_0804A720(this);
this->action = 1;
this->actionDelay = Random();
- this->field_0x80.HALF.LO = this->currentHealth;
+ this->field_0x80.HALF.LO = this->health;
this->field_0x82.HALF.LO = 0;
if (this->type2 == 0)
return;
@@ -348,7 +348,7 @@ void sub_0801F428(Entity* this) {
this->field_0xf = 30;
COLLISION_ON(this);
this->spritePriority.b1 = 3;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 2);
}
#endif
@@ -359,7 +359,7 @@ void sub_0801F48C(Entity* this) {
void sub_0801F494(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 3;
this->field_0xf = 30;
this->direction = sub_08049F84(this, 1);
@@ -401,9 +401,9 @@ void sub_0801F508(Entity* this) {
}
void sub_0801F584(Entity* this) {
- if (this->frames.all & 0x10) {
- if (this->frames.all & 0x1) {
- this->frames.all ^= 1;
+ if (this->frame & 0x10) {
+ if (this->frame & 0x1) {
+ this->frame ^= 1;
this->hitType = 91;
EnqueueSFX(299);
}
@@ -415,7 +415,7 @@ void sub_0801F584(Entity* this) {
GetNextFrame(this);
}
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
if (sub_0801FBD0(this)) {
this->field_0x82.HALF.HI = 0;
sub_0801F730(this);
@@ -437,7 +437,7 @@ void sub_0801F61C(Entity* this) {
void sub_0801F638(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 8;
this->field_0xf = 30;
this->direction = sub_08049F84(this, 1);
@@ -462,9 +462,9 @@ void sub_0801F688(Entity* this) {
void sub_0801F6CC(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 1;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
InitializeAnimation(this, 4);
}
}
@@ -472,7 +472,7 @@ void sub_0801F6CC(Entity* this) {
void sub_0801F6F8(Entity* this) {
sub_08003FC4(this, 0x1800);
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 4;
this->speed = 0x20;
sub_0804AA1C(this);
@@ -488,7 +488,7 @@ void sub_0801F730(Entity* this) {
void sub_0801F748(Entity* this) {
this->action = 2;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 4);
}
@@ -500,7 +500,7 @@ void sub_0801F764(Entity* this) {
if (this->action == 1) {
if (this->field_0x82.HALF.LO || PlayerInRange(this, 1, 0x48)) {
this->action = 2;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x82.HALF.LO = 1;
InitializeAnimation(this, 0);
}
@@ -517,7 +517,7 @@ void sub_0801F7D8(Entity* this) {
sub_0804A720(this);
this->action = 1;
this->actionDelay = Random();
- this->field_0x80.HALF.LO = this->currentHealth;
+ this->field_0x80.HALF.LO = this->health;
this->field_0x82.HALF.LO = 0;
}
@@ -527,7 +527,7 @@ void sub_0801F7FC(Entity* this) {
if (this->field_0x82.HALF.LO || PlayerInRange(this, 1, 0x48)) {
this->action = 2;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x82.HALF.LO = 1;
InitializeAnimation(this, 0);
}
@@ -535,7 +535,7 @@ void sub_0801F7FC(Entity* this) {
void sub_0801F840(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
sub_0801FB14(this);
COLLISION_ON(this);
this->spritePriority.b0 = 4;
@@ -579,9 +579,9 @@ void sub_0801F8C0(Entity* this) {
}
void sub_0801F940(Entity* this) {
- if (this->frames.all & 0x10) {
- if (this->frames.all & 1) {
- this->frames.all ^= 1;
+ if (this->frame & 0x10) {
+ if (this->frame & 1) {
+ this->frame ^= 1;
EnqueueSFX(299);
}
sub_080AEFE0(this);
@@ -591,7 +591,7 @@ void sub_0801F940(Entity* this) {
GetNextFrame(this);
}
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
if (sub_0801FBD0(this)) {
sub_0801FAE0(this);
} else {
@@ -611,7 +611,7 @@ void sub_0801F9C4(Entity* this) {
void sub_0801F9E0(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 8;
this->field_0xf = 30;
this->direction = sub_08049F84(this, 1);
@@ -636,9 +636,9 @@ void sub_0801FA30(Entity* this) {
void sub_0801FA78(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 1;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
InitializeAnimation(this, 4);
sub_0804AA1C(this);
}
@@ -647,7 +647,7 @@ void sub_0801FA78(Entity* this) {
void sub_0801FAAC(Entity* this) {
sub_08003FC4(this, 0x1800);
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
sub_0801FB14(this);
this->speed = 0x20;
sub_0804AA1C(this);
@@ -662,7 +662,7 @@ void sub_0801FAE0(Entity* this) {
void sub_0801FAF8(Entity* this) {
this->action = 2;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 4);
}
@@ -675,7 +675,7 @@ void sub_0801FB14(Entity* this) {
void sub_0801FB34(Entity* this) {
if (*(Entity**)&this->field_0x68) {
- sub_0806FA90(this, *(Entity**)&this->field_0x68, gUnk_080CA2B4[this->frames.all & 0xf], 1);
+ sub_0806FA90(this, *(Entity**)&this->field_0x68, gUnk_080CA2B4[this->frame & 0xf], 1);
(*(Entity**)&this->field_0x68)->spriteOffsetY--;
}
}
@@ -688,7 +688,7 @@ void sub_0801FB68(Entity* this) {
case 1:
this->action = 10;
COLLISION_ON(this);
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spritePriority.b1 = 3;
break;
case 2:
@@ -698,7 +698,7 @@ void sub_0801FB68(Entity* this) {
break;
}
- this->hVelocity = 0;
+ this->zVelocity = 0;
}
u32 sub_0801FBD0(Entity* this) {
@@ -711,7 +711,7 @@ u32 sub_0801FBD0(Entity* this) {
void Chuchu_JumpAtPlayer(Entity* this) {
this->speed = 0x180;
- this->hVelocity = 0x20000;
+ this->zVelocity = 0x20000;
this->direction = sub_08049F84(this, 1);
InitializeAnimation(this, 3);
}
diff --git a/src/enemy/cuccoChickAggr.c b/src/enemy/cuccoChickAggr.c
index 2ae41b08..fa2fb63a 100644
--- a/src/enemy/cuccoChickAggr.c
+++ b/src/enemy/cuccoChickAggr.c
@@ -41,7 +41,7 @@ void sub_08022970(Entity* this) {
}
void sub_08022988(Entity* this) {
- if (this->height.HALF.HI == 0 && sub_08022B20(this)) {
+ if (this->z.HALF.HI == 0 && sub_08022B20(this)) {
sub_08022B0C(this);
} else {
if (this->field_0xf) {
@@ -49,7 +49,7 @@ void sub_08022988(Entity* this) {
return;
this->frameIndex = 1;
- this->hVelocity = 0x10000;
+ this->zVelocity = 0x10000;
EnqueueSFX(0xd6);
}
@@ -75,7 +75,7 @@ void sub_080229F8(Entity* this) {
this->speed = 0xc0;
sub_08022B44(this);
} else {
- this->hVelocity = 0x10000;
+ this->zVelocity = 0x10000;
EnqueueSFX(0xd6);
}
}
@@ -120,7 +120,7 @@ void sub_08022AA4(Entity* this) {
}
if (this->direction & 0xf)
- this->spriteSettings.b.flipX = (this->direction >> 4) ^ 1;
+ this->spriteSettings.flipX = (this->direction >> 4) ^ 1;
}
void sub_08022B0C(Entity* this) {
@@ -138,11 +138,11 @@ u32 sub_08022B20(Entity* this) {
}
void sub_08022B44(Entity* this) {
- this->hVelocity = 0xc000;
+ this->zVelocity = 0xc000;
this->direction = GetFacingDirection(this, &gPlayerEntity);
if (this->direction & 0xf)
- this->spriteSettings.b.flipX = (this->direction >> 4) ^ 1;
+ this->spriteSettings.flipX = (this->direction >> 4) ^ 1;
EnqueueSFX(0xd6);
}
diff --git a/src/enemy/darkNut.c b/src/enemy/darkNut.c
index 09648a8f..aa7d5993 100644
--- a/src/enemy/darkNut.c
+++ b/src/enemy/darkNut.c
@@ -98,8 +98,8 @@ void sub_08020BB8(Entity* this) {
case 0x4c:
if (this->action == 15) {
u8 bVar3 = 0xff;
- if (this->attachedEntity != NULL) {
- bVar3 = this->attachedEntity->bitfield & 0x7f;
+ if (this->child != NULL) {
+ bVar3 = this->child->bitfield & 0x7f;
}
if (bVar3 == 2) {
sub_080213D0(this, gUnk_080CAB08[this->type]);
@@ -109,14 +109,14 @@ void sub_08020BB8(Entity* this) {
}
break;
default:
- if (this->currentHealth != this->field_0x78.HALF.LO) {
+ if (this->health != this->field_0x78.HALF.LO) {
sub_08021588(this);
sub_08021390(this);
sub_0804AA1C(this);
}
break;
}
- this->field_0x78.HALF.LO = this->currentHealth;
+ this->field_0x78.HALF.LO = this->health;
sub_0804AA30(this, gUnk_080CAA98);
}
@@ -127,7 +127,7 @@ void sub_08020D70(Entity* this) {
sub_0804A720(this);
this->action = 1;
this->field_0x74.HALF.HI = 0;
- this->field_0x78.HALF.LO = this->currentHealth;
+ this->field_0x78.HALF.LO = this->health;
this->animationState = -1;
sub_08021218(this, 0, 2);
}
@@ -139,7 +139,7 @@ void sub_08020D9C(Entity* this) {
void sub_08020DB4(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 0x80)
+ if (this->frame & 0x80)
sub_08021390(this);
}
@@ -159,7 +159,7 @@ void sub_08020DD4(Entity* this) {
void sub_08020E28(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 0x80)
+ if (this->frame & 0x80)
sub_080213B0(this);
}
@@ -168,14 +168,14 @@ void sub_08020E48(Entity* this) {
sub_080213F0(this);
} else {
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 0x80)
+ if (this->frame & 0x80)
sub_080213B0(this);
}
}
void sub_08020E78(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 0x80)
+ if (this->frame & 0x80)
sub_08021390(this);
}
@@ -209,7 +209,7 @@ void sub_08020E98(Entity* this) {
void sub_08020F28(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 0x80)
+ if (this->frame & 0x80)
sub_08021400(this);
}
@@ -227,7 +227,7 @@ void sub_08020F48(Entity* this) {
pEVar3 = CreateProjectileWithParent(this, 0, 1);
if (pEVar3) {
pEVar3->parent = this;
- this->attachedEntity = pEVar3;
+ this->child = pEVar3;
}
}
} else {
@@ -239,7 +239,7 @@ void sub_08020F48(Entity* this) {
}
void sub_08020FAC(Entity* this) {
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
if (this->field_0x7a.HALF.LO) {
this->field_0x7a.HALF.LO--;
} else {
@@ -262,23 +262,23 @@ void sub_08020FE4(Entity* this) {
void sub_08021010(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->hitType = 0x56;
sub_080213F0(this);
}
}
void sub_08021038(Entity* this) {
- if (this->attachedEntity == NULL && this->frames.all) {
+ if (this->child == NULL && this->frame) {
Entity* pEVar2 = (Entity*)CreateProjectileWithParent(this, 0, 0);
if (pEVar2) {
pEVar2->parent = this;
- this->attachedEntity = pEVar2;
+ this->child = pEVar2;
}
EnqueueSFX(270);
}
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
sub_08021588(this);
if (this->field_0x7c.BYTES.byte0) {
this->field_0x7c.BYTES.byte0--;
@@ -287,40 +287,39 @@ void sub_08021038(Entity* this) {
}
} else {
UpdateAnimationSingleFrame(this);
- if (this->frames.all == 4)
+ if (this->frame == 4)
this->hitType = 81;
}
}
void sub_080210A8(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 1) {
- this->frames.all = 0;
+ if (this->frame & 1) {
+ this->frame = 0;
sub_08021588(this);
EnqueueSFX(349);
- } else if (this->frames.all & 0x80) {
+ } else if (this->frame & 0x80) {
sub_08021390(this);
}
}
void sub_080210E4(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 1) {
+ if (this->frame & 1) {
Entity* ent;
- this->frames.all &= ~1;
+ this->frame &= ~1;
ent = CreateProjectileWithParent(this, 0, 2);
if (ent) {
ent->parent = this;
- this->attachedEntity = ent;
+ this->child = ent;
}
EnqueueSFX(270);
}
sub_08021644(this);
- if ((this->frames.all & 0x10) &&
- (!ProcessMovement(this) || (this->attachedEntity && (this->attachedEntity->bitfield & 0x80)))) {
+ if ((this->frame & 0x10) && (!ProcessMovement(this) || (this->child && (this->child->bitfield & 0x80)))) {
sub_080213D0(this, 0);
} else {
if (--this->field_0x76.HWORD == 0)
@@ -329,7 +328,7 @@ void sub_080210E4(Entity* this) {
}
void sub_08021170(Entity* this) {
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
if (this->field_0x7a.HALF.HI) {
this->field_0x7a.HALF.HI--;
} else {
@@ -345,7 +344,7 @@ void sub_080211A0(Entity* this) {
sub_08021390(this);
} else {
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 0x80)
+ if (this->frame & 0x80)
sub_080213B0(this);
}
}
@@ -356,7 +355,7 @@ void sub_080211D0(Entity* this)
UpdateAnimationSingleFrame(this);
sub_0802159C(this);
- if (this->frames.all & 0x80)
+ if (this->frame & 0x80)
sub_08021390(this);
}
@@ -364,7 +363,7 @@ void sub_080211F4(Entity* this) {
UpdateAnimationSingleFrame(this);
sub_08021600(this);
- if (this->frames.all & 0x80)
+ if (this->frame & 0x80)
sub_08021390(this);
}
@@ -414,7 +413,7 @@ void sub_080212B0(Entity* this) {
if (this->type < 2 && tmp == 2)
tmp = gUnk_080CAB52[Random() & 3];
- this->attachedEntity = NULL;
+ this->child = NULL;
gUnk_080CAB58[tmp](this);
}
@@ -530,7 +529,7 @@ u32 sub_080214FC(Entity* this) {
return 0;
direction = GetFacingDirection(this, gUnk_020000B0);
- if (4 < (direction - (this->frames.all & 0x1f)) - 2)
+ if (4 < (direction - (this->frame & 0x1f)) - 2)
return 0;
this->animationState = DirectionToAnimationState(direction);
@@ -557,54 +556,54 @@ void sub_08021540(Entity* this) {
}
void sub_08021588(Entity* this) {
- if (this->attachedEntity) {
- this->attachedEntity->parent = NULL;
- this->attachedEntity = NULL;
+ if (this->child) {
+ this->child->parent = NULL;
+ this->child = NULL;
}
}
void sub_0802159C(Entity* this) {
- if (this->frames.all == 1) {
+ if (this->frame == 1) {
Entity* ent;
- this->frames.all = 0;
+ this->frame = 0;
this->hitType = 0x51;
ent = CreateProjectileWithParent(this, 0, 3);
if (ent) {
ent->parent = this;
- this->attachedEntity = ent;
+ this->child = ent;
}
EnqueueSFX(0x116);
- } else if (this->frames.all == 2) {
- this->frames.all = 0;
+ } else if (this->frame == 2) {
+ this->frame = 0;
sub_08021588(this);
- } else if (this->frames.all & 0x20) {
- this->frames.all &= ~0x20;
+ } else if (this->frame & 0x20) {
+ this->frame &= ~0x20;
EnqueueSFX(0x115);
}
}
void sub_08021600(Entity* this) {
- if (this->frames.all == 1) {
+ if (this->frame == 1) {
Entity* ent;
- this->frames.all = 0;
+ this->frame = 0;
this->hitType = 0x51;
ent = CreateProjectileWithParent(this, 0, 4);
if (ent) {
ent->parent = this;
- this->attachedEntity = ent;
+ this->child = ent;
}
EnqueueSFX(0x10e);
- } else if (this->frames.all == 2) {
- this->frames.all = 0;
+ } else if (this->frame == 2) {
+ this->frame = 0;
sub_08021588(this);
}
}
void sub_08021644(Entity* this) {
- if (this->frames.all & 0x20) {
- this->frames.all &= ~0x20;
+ if (this->frame & 0x20) {
+ this->frame &= ~0x20;
EnqueueSFX(0x7d);
}
}
diff --git a/src/enemy/doorMimic.c b/src/enemy/doorMimic.c
index 301efced..713ace16 100644
--- a/src/enemy/doorMimic.c
+++ b/src/enemy/doorMimic.c
@@ -71,7 +71,7 @@ void sub_080220D8(Entity* this) {
void sub_080220F0(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
const PosOffset* off;
u32 i;
@@ -87,7 +87,7 @@ void sub_080220F0(Entity* this) {
}
}
EnqueueSFX(260);
- } else if (this->frames.all & 1) {
+ } else if (this->frame & 1) {
this->damage = 4;
}
}
@@ -103,7 +103,7 @@ void sub_08022174(Entity* this) {
void sub_08022198(Entity* this) {
sub_0800445C(this);
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 1;
this->actionDelay = 0x5a;
}
diff --git a/src/enemy/enemy4D.c b/src/enemy/enemy4D.c
index f1b16cc7..75c28eb1 100644
--- a/src/enemy/enemy4D.c
+++ b/src/enemy/enemy4D.c
@@ -39,9 +39,9 @@ void sub_0803EB44(Entity* this) {
pEVar1 = CreateProjectileWithParent(this, 0x19, 0);
if (pEVar1 != NULL) {
pEVar1->parent = this;
- this->attachedEntity = pEVar1;
+ this->child = pEVar1;
COLLISION_ON(this);
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
this->animationState = 2;
*((u8*)&this->field_0x7a + 1) = 0;
*(u8*)&this->field_0x7c = 0;
diff --git a/src/enemy/enemyE.c b/src/enemy/enemyE.c
index 9f6a0b6d..6835be88 100644
--- a/src/enemy/enemyE.c
+++ b/src/enemy/enemyE.c
@@ -20,7 +20,7 @@ void nullsub_133(Entity* this) {
void sub_08022FD0(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_08023000(this, 0);
}
diff --git a/src/enemy/fallingBoulder.c b/src/enemy/fallingBoulder.c
index 039c817f..6084d868 100644
--- a/src/enemy/fallingBoulder.c
+++ b/src/enemy/fallingBoulder.c
@@ -32,7 +32,7 @@ void sub_0802C254(Entity* this) {
void sub_0802C258(Entity* this) {
sub_0804A720(this);
- this->hVelocity = 0x20000;
+ this->zVelocity = 0x20000;
this->actionDelay = 2;
this->field_0x7a.HWORD = Random() & 0x70;
switch (this->type) {
@@ -45,7 +45,7 @@ void sub_0802C258(Entity* this) {
}
this->field_0x80.HWORD = this->x.HALF.HI;
this->field_0x82.HWORD = this->y.HALF.HI;
- this->height.HALF.HI = -0x10;
+ this->z.HALF.HI = -0x10;
this->collisionLayer = 3;
this->spriteRendering.b3 = 1;
this->spritePriority.b0 = 2;
@@ -70,7 +70,7 @@ NONMATCH("asm/non_matching/fallingBoulder/sub_0802C334.inc", void sub_0802C334(E
return;
}
this->field_0x7c.HALF.LO = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
}
GetNextFrame(this);
this->field_0x7c.HALF.HI = COORD_TO_TILE(this);
@@ -113,7 +113,7 @@ NONMATCH("asm/non_matching/fallingBoulder/sub_0802C334.inc", void sub_0802C334(E
sub_080AEFB4(this);
} else {
sub_0806F69C(this);
- if (this->height.HALF.HI - y > 0x38) {
+ if (this->z.HALF.HI - y > 0x38) {
sub_0802C62C(this);
this->field_0x7a.HWORD = (Random() & 0x7f) | 0x80;
if (this->type == 3) {
@@ -190,7 +190,7 @@ void sub_0802C4B0(Entity* this) {
}
rand = Random() & 7;
- this->hVelocity = 0x20000;
+ this->zVelocity = 0x20000;
if (rand & 4) {
if (rand & 3) {
*(u32*)&this->cutsceneBeh = gUnk_080CD58C[offset | 1];
@@ -210,7 +210,7 @@ void sub_0802C62C(Entity* this) {
this->action = 1;
this->y.HALF.HI = this->field_0x82.HWORD;
this->x.HALF.HI = this->field_0x80.HWORD;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
COLLISION_OFF(this);
this->field_0x7c.HALF.LO = 0;
}
diff --git a/src/enemy/fireballGuy.c b/src/enemy/fireballGuy.c
index 2103e19f..3ec57bc7 100644
--- a/src/enemy/fireballGuy.c
+++ b/src/enemy/fireballGuy.c
@@ -28,7 +28,7 @@ void sub_080453A4(Entity* this) {
}
void sub_080453BC(Entity* this) {
- if (this->currentHealth && this->cutsceneBeh.HALF.LO != this->currentHealth) {
+ if (this->health && this->cutsceneBeh.HALF.LO != this->health) {
this->action = 2;
} else {
sub_0804AA30(this, gUnk_080D17E8);
@@ -41,9 +41,9 @@ void nullsub_172(void) {
void sub_080453E8(Entity* this) {
this->action = 1;
this->actionDelay = 0;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->speed = 0x80;
- this->cutsceneBeh.HALF.LO = this->currentHealth;
+ this->cutsceneBeh.HALF.LO = this->health;
this->field_0x3c |= 0x10;
sub_0804A720(this);
InitializeAnimation(this, 0);
@@ -77,11 +77,11 @@ void sub_08045454(Entity* this) {
off = gUnk_080D1810;
for (i = 0; i < count; i++) {
ent = entities[i];
- ent->attachedEntity = entities[(i + 1) % count];
+ ent->child = entities[(i + 1) % count];
ent->parent = entities[(i + count - 1) % count];
tmp = 0;
ent->type2 = 1;
- ent->height.HALF.HI = tmp;
+ ent->z.HALF.HI = tmp;
ent->iframes = -0x10;
/* Set MiniFireballGuy offset relative to killed slime. */
@@ -101,7 +101,7 @@ u32 sub_0804A024(Entity*, u32, u32);
void sub_08045524(Entity* this) {
u32 tmp, tmp1, tmp2;
- this->hVelocity = 0x1c000;
+ this->zVelocity = 0x1c000;
tmp = sub_0804A024(this, 1, 8);
if (tmp != 0xff && (Random() & 3) == 0) {
this->actionDelay = Random() & 3;
diff --git a/src/enemy/gibdo.c b/src/enemy/gibdo.c
index 6fc3a27f..59e03862 100644
--- a/src/enemy/gibdo.c
+++ b/src/enemy/gibdo.c
@@ -148,11 +148,11 @@ void sub_08037624(Entity* this) {
void sub_08037690(Entity* this) {
UpdateAnimationSingleFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->field_0x76.HALF.HI = 0x14;
sub_08037794(this);
} else {
- if ((this->frames.all & 1) != 0) {
+ if ((this->frame & 1) != 0) {
this->hitType = 0x27;
ProcessMovement(this);
}
@@ -167,7 +167,7 @@ NONMATCH("asm/non_matching/gibdo/sub_080376D0.inc", void sub_080376D0(Entity* th
gPlayerState.field_0xa = gPlayerState.field_0xa | 0x80;
CopyPositionAndSpriteOffset(&gPlayerEntity, this);
UpdateAnimationSingleFrame(this);
- x = &this->frames.all;
+ x = &this->frame;
if ((*x & 0x1) != 0) {
if (!(--this->field_0x7c.BYTES.byte0)) {
sub_08037A58(this);
@@ -182,7 +182,7 @@ END_NONMATCH
void sub_0803773C(Entity* this) {
UpdateAnimationSingleFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
sub_08037794(this);
}
}
@@ -396,7 +396,7 @@ NONMATCH("asm/non_matching/gibdo/sub_08037B48.inc", void sub_08037B48(Entity* th
E->spriteOffsetY = 0xf5;
E->parent = this;
}
- this->attachedEntity = E;
+ this->child = E;
}
END_NONMATCH
@@ -409,7 +409,7 @@ NONMATCH("asm/non_matching/gibdo/sub_08037C0C.inc", void sub_08037C0C(Entity* th
this->actionDelay = 0xf;
this->parent = that;
}
- if (this->attachedEntity != 0) {
+ if (this->child != 0) {
this->actionDelay = 0xf;
this->parent = that;
}
diff --git a/src/enemy/gyorgMale.c b/src/enemy/gyorgMale.c
index 6c0fb567..855a66dc 100644
--- a/src/enemy/gyorgMale.c
+++ b/src/enemy/gyorgMale.c
@@ -93,7 +93,7 @@ void (*const gUnk_080D1AFC[8])(Entity*) = { sub_08046898, sub_08046910, sub_0804
void GyorgMale(Entity* this) {
if (this->action) {
- this->spriteSettings.b.draw = this->field_0x7c.BYTES.byte1;
+ this->spriteSettings.draw = this->field_0x7c.BYTES.byte1;
}
gUnk_080D1AFC[this->action](this);
if (this->action != 7) {
@@ -101,9 +101,9 @@ void GyorgMale(Entity* this) {
}
this->animationState = -(this->field_0x78.HWORD >> 8);
sub_08048004(this);
- this->field_0x7c.BYTES.byte1 = this->spriteSettings.b.draw;
- if (this->spriteSettings.b.draw == 1 && (this->y.HALF.HI - gRoomControls.roomScrollY + 0x30) > 0x100u) {
- this->spriteSettings.b.draw = 0;
+ this->field_0x7c.BYTES.byte1 = this->spriteSettings.draw;
+ if (this->spriteSettings.draw == 1 && (this->y.HALF.HI - gRoomControls.roomScrollY + 0x30) > 0x100u) {
+ this->spriteSettings.draw = 0;
}
this->cutsceneBeh.HWORD = gPlayerEntity.x.HALF.HI;
this->field_0x86.HWORD = gPlayerEntity.y.HALF.HI;
@@ -116,11 +116,11 @@ void sub_08046898(Entity* this) {
return;
tmp->type = 1;
tmp->parent = this;
- this->attachedEntity = tmp;
+ this->child = tmp;
this->action = 1;
this->subAction = 0;
this->spriteRendering.b0 = 3;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spriteOrientation.flipY = 2;
this->spriteRendering.b3 = 2;
this->field_0x3c |= 0x10;
@@ -232,7 +232,7 @@ void (*const gUnk_080D1B38[5])(Entity*) = { sub_08046AE8, sub_08046B18, sub_0804
void sub_08046A9C(Entity* this) {
if (this->animIndex == 1) {
- if (this->frames.all == 1) {
+ if (this->frame == 1) {
InitAnimationForceUpdate(this, 0);
}
}
@@ -315,7 +315,7 @@ void (*const gUnk_080D1B4C[5])(Entity*) = { sub_08046D44, sub_08046D98, sub_0804
void sub_08046CEC(Entity* this) {
if (this->animIndex == 0) {
- if (this->frames.all == 1) {
+ if (this->frame == 1) {
InitAnimationForceUpdate(this, 1);
}
}
@@ -418,7 +418,7 @@ void (*const gUnk_080D1B94[0xA])(Entity*) = { sub_08046FE8, sub_0804702C, sub_08
void sub_08046F64(Entity* this) {
if (this->animIndex == 0) {
- if (this->frames.all == 1) {
+ if (this->frame == 1) {
InitAnimationForceUpdate(this, 1);
}
}
@@ -580,13 +580,13 @@ void (*const gUnk_080D1BC0[7])(Entity*) = { sub_080473B8, sub_080473F0, sub_0804
void sub_0804736C(Entity* this) {
if (this->animIndex == 1) {
- if (this->frames.all == 1) {
+ if (this->frame == 1) {
InitAnimationForceUpdate(this, 0);
}
}
gUnk_080D1BC0[this->subAction](this);
UpdateAnimationSingleFrame(this);
- if (this->currentHealth == 0) {
+ if (this->health == 0) {
this->action = 7;
this->subAction = 0;
}
@@ -827,7 +827,7 @@ void sub_08047914(Entity* this) {
void sub_08047978(Entity* this) {
sub_08047D88(this);
- if (this->currentHealth != 0) {
+ if (this->health != 0) {
if (--this->field_0x70.HALF_U.LO == 0) {
this->field_0x70.HALF.HI = 1;
if (this->type == 0) {
@@ -858,9 +858,9 @@ void sub_08047978(Entity* this) {
this->spriteRendering.b3 = 2;
this->direction = this->animationState;
}
- if (this->currentHealth != 0)
+ if (this->health != 0)
return;
- if (this->attachedEntity->action != 1)
+ if (this->child->action != 1)
return;
this->subAction = 4;
if (this->type == 0) {
@@ -959,18 +959,18 @@ void sub_08047BF0(Entity* this) {
} else {
this->actionDelay--;
if (this->actionDelay == 0x5A) {
- tmp = this->attachedEntity;
- tmp->spriteSettings.b.draw = 0;
+ tmp = this->child;
+ tmp->spriteSettings.draw = 0;
CreateFx(tmp, FX_GIANT_EXPLOSION4, 0);
} else {
if (this->actionDelay == 0x3C) {
- tmp = this->attachedEntity->attachedEntity;
- tmp->spriteSettings.b.draw = 0;
+ tmp = this->child->child;
+ tmp->spriteSettings.draw = 0;
CreateFx(tmp, FX_GIANT_EXPLOSION4, 0);
} else {
if (this->actionDelay == 0x1E) {
- tmp = this->attachedEntity->attachedEntity->attachedEntity;
- tmp->spriteSettings.b.draw = 0;
+ tmp = this->child->child->child;
+ tmp->spriteSettings.draw = 0;
CreateFx(tmp, FX_GIANT_EXPLOSION4, 0);
}
}
@@ -1012,7 +1012,7 @@ void sub_08047D88(Entity* this) {
if (!sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x20))
return;
gPlayerState.field_0x14 = 1;
- if (gPlayerEntity.height.HALF.HI != 0)
+ if (gPlayerEntity.z.HALF.HI != 0)
return;
this->field_0x7c.BYTES.byte0 |= 1;
}
@@ -1114,7 +1114,7 @@ void sub_08048004(Entity* this) {
return;
if (this->animIndex == 0) {
COLLISION_OFF(this);
- if (gPlayerEntity.height.HALF.HI != 0)
+ if (gPlayerEntity.z.HALF.HI != 0)
return;
if (!sub_08079F8C())
return;
diff --git a/src/enemy/hangingSeed.c b/src/enemy/hangingSeed.c
index 95593f7b..2b582b57 100644
--- a/src/enemy/hangingSeed.c
+++ b/src/enemy/hangingSeed.c
@@ -27,7 +27,7 @@ void nullsub_7(Entity* this) {
void HangingSeed_Initialize(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->frameIndex = this->type;
this->spriteRendering.b3 = 1;
this->spritePriority.b0 = 3;
diff --git a/src/enemy/helmasaur.c b/src/enemy/helmasaur.c
index 870831bc..0bb1c1c4 100644
--- a/src/enemy/helmasaur.c
+++ b/src/enemy/helmasaur.c
@@ -89,7 +89,7 @@ void sub_0802BCA8(Entity* this) {
this->action = 7;
this->actionDelay = 0x5a;
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
this->hitType = 0x19;
this->field_0x3a = this->field_0x3a & 0xfb;
this->field_0x1c = 0x12;
@@ -125,7 +125,7 @@ void sub_0802BD28(Entity* this) {
COLLISION_ON(this);
this->field_0x3a &= ~0x4;
} else {
- this->currentHealth = 0;
+ this->health = 0;
}
}
@@ -284,7 +284,7 @@ void sub_0802BFE0(Entity* this) {
}
void sub_0802BFF4(Entity* this) {
- this->spriteSettings.b.draw ^= 1;
+ this->spriteSettings.draw ^= 1;
if (--this->actionDelay == 0) {
DeleteEntity(this);
}
@@ -369,7 +369,7 @@ void sub_0802C1CC(Entity* this) {
void sub_0802C218(Entity* this) {
this->action = 6;
this->speed = 0xe0;
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
}
// clang-format off
diff --git a/src/enemy/keaton.c b/src/enemy/keaton.c
index d1a41424..0c9adb33 100644
--- a/src/enemy/keaton.c
+++ b/src/enemy/keaton.c
@@ -82,7 +82,7 @@ void sub_0803248C(Entity* this) {
void sub_080324CC(Entity* this) {
if (sub_080325E8(this) == 0) {
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
sub_080326FC(this);
sub_08032740(this);
}
@@ -118,7 +118,7 @@ void sub_080324FC(Entity* this) {
}
void sub_08032574(Entity* this) {
- if (this->attachedEntity && (this->attachedEntity->bitfield & 0x80)) {
+ if (this->child && (this->child->bitfield & 0x80)) {
sub_0803275C(this);
return;
}
@@ -144,10 +144,10 @@ void sub_080325C4(Entity* this) {
u32 sub_080325E8(Entity* this) {
if (((sub_08049FA0(this) != 0) && (sub_08049FDC(this, 1) != 0)) &&
(sub_080041A0(this, gUnk_020000B0, 0x68, 0x40) != 0)) {
- if (((GetFacingDirection(this, gUnk_020000B0) - (DirectionRound(this->frames.all)) + 2) & 0x1F) < 5) {
+ if (((GetFacingDirection(this, gUnk_020000B0) - (DirectionRound(this->frame)) + 2) & 0x1F) < 5) {
this->action = 3;
this->actionDelay = 0xC;
- this->direction = DirectionRound(this->frames.all);
+ this->direction = DirectionRound(this->frame);
return 1;
}
}
@@ -236,13 +236,13 @@ void sub_080327C8(Entity* this) {
child = CreateProjectileWithParent(this, 11, 0);
if (child != NULL) {
child->parent = this;
- this->attachedEntity = child;
+ this->child = child;
}
}
void sub_080327E0(Entity* this) {
- if (this->attachedEntity != NULL) {
- this->attachedEntity->parent = NULL;
- this->attachedEntity = NULL;
+ if (this->child != NULL) {
+ this->child->parent = NULL;
+ this->child = NULL;
}
}
diff --git a/src/enemy/keese.c b/src/enemy/keese.c
index 26c1a938..92d3ff86 100644
--- a/src/enemy/keese.c
+++ b/src/enemy/keese.c
@@ -59,7 +59,7 @@ void Keese_Initialize(Entity* this) {
sub_0804A720(this);
if (this->type != 0) {
this->spritePriority.b1 = 1;
- this->height.HALF.HI = -0x10;
+ this->z.HALF.HI = -0x10;
}
this->direction = Random() & 0x1f;
this->field_0x1c = 1;
@@ -77,12 +77,12 @@ void Keese_Fly(Entity* this) {
this->field_0x7a.HWORD--;
}
GetNextFrame(this);
- if ((this->frames.b.f3) != 0) {
+ if (this->frame & 0x80) {
sub_08021F24(this);
} else {
sub_080AEFB4(this);
}
- this->spriteOffsetY = gKeeseSpriteOffsets[this->frames.all];
+ this->spriteOffsetY = gKeeseSpriteOffsets[this->frame];
}
void Keese_Rest(Entity* this) {
diff --git a/src/enemy/lakitu.c b/src/enemy/lakitu.c
index 91798d2e..d96950d7 100644
--- a/src/enemy/lakitu.c
+++ b/src/enemy/lakitu.c
@@ -57,7 +57,7 @@ void Lakitu_DoAction(Entity* this) {
void sub_0803C784(Entity* this) {
if ((this->bitfield & 0x7f) == 0x1d) {
- this->hVelocity = 0x20000;
+ this->zVelocity = 0x20000;
sub_0803CBAC(this);
} else {
@@ -104,7 +104,7 @@ void sub_0803C844(Entity* this) {
}
void sub_0803C850(Entity* this) {
- Entity* cloud = this->attachedEntity;
+ Entity* cloud = this->child;
if (cloud != NULL) {
cloud->spriteOffsetX = this->spriteOffsetX;
}
@@ -114,7 +114,7 @@ void sub_0803C850(Entity* this) {
void sub_0803C86C(Entity* this) {
sub_0803CBAC(this);
- this->attachedEntity = NULL;
+ this->child = NULL;
}
void Lakitu_Initialize(Entity* this) {
@@ -124,13 +124,13 @@ void Lakitu_Initialize(Entity* this) {
}
cloud->parent = this;
- this->attachedEntity = cloud;
+ this->child = cloud;
sub_0804A720(this);
this->action = HIDDEN;
- this->height.HALF.HI = -2;
+ this->z.HALF.HI = -2;
this->spriteOffsetY = 0xff;
@@ -143,14 +143,14 @@ void Lakitu_Hide(Entity* this) {
if (sub_0803CA4C(this)) {
this->action = 2;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
}
}
void Lakitu_EndHide(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.b.f3) {
+ if (this->frame & 0x80) {
this->action = IDLE;
this->actionDelay = 0x3c;
@@ -178,9 +178,9 @@ void Lakitu_Idle(Entity* this) {
void Lakitu_BeginHide(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.b.f3 != 0) {
+ if (this->frame & 0x80) {
this->action = 1;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
InitAnimationForceUpdate(this, this->animationState);
}
@@ -189,7 +189,7 @@ void Lakitu_BeginHide(Entity* this) {
void Lakitu_Lightning(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.b.f3 == 0) {
+ if (!(this->frame & 0x80)) {
return;
}
@@ -207,7 +207,7 @@ void Lakitu_Lightning(Entity* this) {
this->field_0x78.HALF.HI = FALSE;
- InitAnimationForceUpdate(this->attachedEntity, this->animationState);
+ InitAnimationForceUpdate(this->child, this->animationState);
}
}
@@ -259,7 +259,7 @@ void sub_0803CA84(Entity* this, u32 unkParameter) {
this->animationState = altAnimState;
InitAnimationForceUpdate(this, altAnimState + unkParameter);
- InitAnimationForceUpdate(this->attachedEntity, altAnimState);
+ InitAnimationForceUpdate(this->child, altAnimState);
}
}
}
@@ -284,7 +284,7 @@ bool32 sub_0803CB04(Entity* this) {
sub_0803CB34(this);
this->field_0x78.HALF.HI = delay;
- InitAnimationForceUpdate(this->attachedEntity, this->animationState + 4);
+ InitAnimationForceUpdate(this->child, this->animationState + 4);
returnValue = 1;
}
@@ -322,14 +322,14 @@ void Lakitu_SpawnLightning(Entity* this) {
void sub_0803CBAC(Entity* this) {
Entity* cloud;
- cloud = this->attachedEntity;
+ cloud = this->child;
if (cloud != NULL) {
cloud->flags |= 0x80;
cloud->hitType = 0x43;
}
this->action = CLOUDLESS;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spritePriority.b1 = 1;
@@ -344,16 +344,16 @@ void sub_0803CC08(Entity* this) {
Entity* cloud;
Entity* fx;
- cloud = this->attachedEntity;
+ cloud = this->child;
if (cloud == NULL) {
return;
}
- if ((u32)(cloud->height.HALF.HI - this->height.HALF.HI) > 2) {
+ if ((u32)(cloud->z.HALF.HI - this->z.HALF.HI) > 2) {
return;
}
- if (this->hVelocity >= 0) {
+ if (this->zVelocity >= 0) {
return;
}
@@ -385,7 +385,7 @@ void sub_0803CC08(Entity* this) {
fx->y.HALF.HI -= 6;
}
- this->attachedEntity = NULL;
+ this->child = NULL;
DeleteEntity(cloud);
}
diff --git a/src/enemy/lakituCloud.c b/src/enemy/lakituCloud.c
index 4ace44e2..f847b0bd 100644
--- a/src/enemy/lakituCloud.c
+++ b/src/enemy/lakituCloud.c
@@ -65,11 +65,11 @@ void sub_0803CD6C(Entity* this) {
Entity* lakitu;
this->action = 1;
- this->height.HALF.HI = -2;
+ this->z.HALF.HI = -2;
// Set parent to lakitu
lakitu = GetCurrentRoomProperty(this->type);
- this->attachedEntity = lakitu;
+ this->child = lakitu;
this->parent = lakitu;
this->field_0x78.HWORD = this->x.HALF.HI;
@@ -96,9 +96,9 @@ void sub_0803CDD8(Entity* this) {
u8 one;
u8 draw;
- draw = this->spriteSettings.b.draw;
+ draw = this->spriteSettings.draw;
one = 1;
- this->spriteSettings.b.draw = draw ^ one;
+ this->spriteSettings.draw = draw ^ one;
this->actionDelay--;
@@ -107,14 +107,14 @@ void sub_0803CDD8(Entity* this) {
COLLISION_ON(this);
- this->spriteSettings.b.draw = one;
+ this->spriteSettings.draw = one;
}
}
void sub_0803CE14(Entity* this) {
u8 direction;
- sub_080A2CC0(this, &this->attachedEntity, &this->field_0x74.HWORD);
+ sub_080A2CC0(this, &this->child, &this->field_0x74.HWORD);
direction = this->direction;
if (direction & 0x80) {
@@ -139,7 +139,7 @@ void sub_0803CE3C(Entity* this) {
this->x.HALF.HI = this->field_0x78.HWORD;
this->y.HALF.HI = this->field_0x7a.HWORD;
- this->attachedEntity = this->parent;
+ this->child = this->parent;
sub_0803CE14(this);
}
diff --git a/src/enemy/leever.c b/src/enemy/leever.c
index 4bdb53c8..d5b8e3de 100644
--- a/src/enemy/leever.c
+++ b/src/enemy/leever.c
@@ -69,7 +69,7 @@ void Leever_Idle(Entity* this) {
if (--this->actionDelay == 0) {
if (Leever_PlayerInRange(this, Random() & 0x1f)) {
this->action = 2;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
this->direction = (GetFacingDirection(this, gUnk_020000B0) + gLeeverDrift[Random() & 1]) & 0x1f;
InitializeAnimation(this, LeeverAnimation_DigUp);
UpdateSpriteForCollisionLayer(this);
@@ -82,7 +82,7 @@ void Leever_Idle(Entity* this) {
void Leever_DigUp(Entity* this) {
GetNextFrame(this);
- if (this->frames.b.f3 != 0) {
+ if (this->frame & 0x80) {
this->action = 3;
if (this->type == LeeverForm_Red) {
this->field_0x74.HWORD = 180;
@@ -90,8 +90,8 @@ void Leever_DigUp(Entity* this) {
this->field_0x74.HWORD = 110;
}
InitializeAnimation(this, LeeverAnimation_Attack);
- } else if (this->frames.b.f0 != 0) {
- this->frames.all &= 0xfe;
+ } else if ((this->frame & 1) != 0) {
+ this->frame &= 0xfe;
COLLISION_ON(this);
}
}
@@ -110,10 +110,10 @@ void Leever_Attack(Entity* this) {
void Leever_DigDown(Entity* this) {
Leever_Move(this);
GetNextFrame(this);
- if ((this->frames.b.f3) != 0) {
+ if (this->frame & 0x80) {
this->action = 1;
this->actionDelay = 0xf0;
- this->spriteSettings.b.draw = FALSE;
+ this->spriteSettings.draw = FALSE;
}
}
@@ -167,7 +167,7 @@ void Leever_Move(Entity* this) {
this->field_0x74.HWORD = 1;
}
- this->speed = (this->frames.all & 0xf) * 0x20;
+ this->speed = (this->frame & 0xf) * 0x20;
if (this->type == LeeverForm_Red) {
if ((this->field_0xf++ & 0xf) == 0) {
sub_08004596(this, sub_0800132C(this, gUnk_020000B0));
diff --git a/src/enemy/likeLike.c b/src/enemy/likeLike.c
index 54d0852f..0eadf657 100644
--- a/src/enemy/likeLike.c
+++ b/src/enemy/likeLike.c
@@ -45,7 +45,7 @@ void sub_08027DA4(Entity* this) {
}
}
- if (this->currentHealth == 0) {
+ if (this->health == 0) {
this->actionDelay = 0x20;
}
@@ -74,19 +74,19 @@ void sub_08027E70(Entity* this) {
switch (this->type) {
case 0:
this->action = 3;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
COLLISION_OFF(this);
this->actionDelay = 0;
break;
case 1:
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->actionDelay = 8;
InitializeAnimation(this, 1);
break;
case 2:
this->action = 1;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->actionDelay = 0;
this->hitType = 1;
InitializeAnimation(this, 0);
@@ -132,7 +132,7 @@ void nullsub_12(Entity* this) {
void sub_08027F84(Entity* this) {
if (sub_08049FDC(this, 1)) {
this->action = 5;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 0);
CreateDust(this);
}
@@ -149,7 +149,7 @@ void sub_08027FB4(Entity* this) {
void sub_08027FE0(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 1) {
+ if (this->frame & 1) {
this->action = 1;
COLLISION_ON(this);
this->direction = sub_08049F84(this, 1);
@@ -161,9 +161,9 @@ void sub_08027FE0(Entity* this) {
void sub_0802802C(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 1) {
+ if (this->frame & 1) {
this->action = 3;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->direction = 0;
this->actionDelay = 0;
CreateDust(this);
@@ -209,11 +209,11 @@ NONMATCH("asm/non_matching/likeLike/sub_0802810C.inc", void sub_0802810C(Entity*
gPlayerState.field_0xa = 0;
gPlayerState.flags &= 0xffffffef;
gPlayerEntity.flags |= 0x80;
- gPlayerEntity.hVelocity = 0x18000;
+ gPlayerEntity.zVelocity = 0x18000;
gPlayerEntity.iframes = -60;
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
gPlayerEntity.spritePriority.b1 = this->field_0x82.HALF.HI;
- gPlayerEntity.height.HALF.HI = gPlayerEntity.spriteOffsetY;
+ gPlayerEntity.z.HALF.HI = gPlayerEntity.spriteOffsetY;
gPlayerEntity.spriteOffsetY = 0;
this->action = 4;
this->actionDelay = 0x50;
diff --git a/src/enemy/madderpillar.c b/src/enemy/madderpillar.c
index 314b28fc..fd8d170a 100644
--- a/src/enemy/madderpillar.c
+++ b/src/enemy/madderpillar.c
@@ -59,7 +59,7 @@ void sub_080298A4(Entity* this) {
this->field_0x76.HALF.HI = 0;
sub_0801D2B4(this, 0x7f);
EnqueueSFX(0xfe);
- this->attachedEntity->action = 2;
+ this->child->action = 2;
break;
}
}
@@ -86,33 +86,33 @@ void sub_0802999C(Entity* this) {
ent1 = CreateEnemy(MADDERPILLAR, 1);
ent1->parent = this;
PositionRelative(this, ent1, 0, 5);
- this->attachedEntity = ent1;
+ this->child = ent1;
ent2 = CreateEnemy(MADDERPILLAR, 2);
ent2->parent = this;
PositionRelative(this, ent2, 0, 4);
- ent1->attachedEntity = ent2;
+ ent1->child = ent2;
ent3 = CreateEnemy(MADDERPILLAR, 3);
ent3->parent = this;
PositionRelative(this, ent3, 0, 3);
- ent2->attachedEntity = ent3;
+ ent2->child = ent3;
ent4 = CreateEnemy(MADDERPILLAR, 4);
ent4->parent = this;
PositionRelative(this, ent4, 0, 2);
- ent3->attachedEntity = ent4;
+ ent3->child = ent4;
ent5 = CreateEnemy(MADDERPILLAR, 5);
ent5->parent = this;
PositionRelative(this, ent5, 0, 1);
- ent4->attachedEntity = ent5;
+ ent4->child = ent5;
ent6 = CreateEnemy(MADDERPILLAR, 6);
- ent6->attachedEntity = this;
+ ent6->child = this;
ent6->parent = this;
PositionRelative(this, ent6, 0, 0);
- ent5->attachedEntity = ent6;
+ ent5->child = ent6;
this->action = 1;
COLLISION_ON(this);
@@ -179,7 +179,7 @@ void sub_08029B2C(Entity* this) {
void sub_08029B90(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0802A058(this);
if (this->type < 2) {
InitializeAnimation(this, 0);
@@ -211,7 +211,7 @@ void sub_08029C08(Entity* this) {
this->action = 3;
this->actionDelay = gUnk_080CCDA0[this->type];
this->hitType = 0x6b;
- this->attachedEntity->action = 2;
+ this->child->action = 2;
}
void sub_08029C2C(Entity* this) {
@@ -251,7 +251,7 @@ void sub_08029C98(Entity* this) {
void sub_08029CCC(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0802A058(this);
InitializeAnimation(this, 8);
}
@@ -276,7 +276,7 @@ void sub_08029D14(Entity* this) {
}
} else {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 4;
this->actionDelay = 0x78;
this->hitType = 0x6c;
@@ -298,7 +298,7 @@ void sub_08029D78(Entity* this) {
void sub_08029DAC(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 6;
this->parent->field_0x76.HALF.HI = 1;
InitializeAnimation(this, this->animationState + 8);
@@ -378,7 +378,7 @@ bool32 sub_08029F48(Entity* this) {
}
void sub_08029FB4(Entity* this, u32 x, u32 y) {
- u8* dst = (u8*)&this->attachedEntity->field_0x78;
+ u8* dst = (u8*)&this->child->field_0x78;
s32 unk = this->parent->field_0x7c.BYTES.byte2;
u8 idx = unk % 0xe;
dst[idx] = ((x + 8) & 0xf) | (((y + 8) & 0xf) << 4);
@@ -458,18 +458,18 @@ void sub_0802A098(Entity* this) {
}
void sub_0802A0F8(Entity* this) {
- if (this->currentHealth != 0) {
+ if (this->health != 0) {
if ((this->bitfield & 0x80) && this->iframes != 0) {
Entity* ent = this;
u32 i;
for (i = 0; i < 6; i++) {
- ent = ent->attachedEntity;
+ ent = ent->child;
ent->iframes = this->iframes;
}
}
} else {
this->parent->flags &= ~0x80;
- this->parent->currentHealth = 0;
+ this->parent->health = 0;
this->parent->field_0xf = 0x69;
}
}
@@ -477,7 +477,7 @@ void sub_0802A0F8(Entity* this) {
bool32 sub_0802A14C(Entity* this) {
u32 ret = FALSE;
- if (this->parent->currentHealth == 0 || this->field_0x86.HALF.LO) {
+ if (this->parent->health == 0 || this->field_0x86.HALF.LO) {
ret = TRUE;
} else {
ret = FALSE;
diff --git a/src/enemy/mazaalBracelet.c b/src/enemy/mazaalBracelet.c
index 0437d6f2..acccbab0 100644
--- a/src/enemy/mazaalBracelet.c
+++ b/src/enemy/mazaalBracelet.c
@@ -147,17 +147,17 @@ NONMATCH("asm/non_matching/mazaal/sub_0803A188.inc", void sub_0803A188(Entity* t
pEVar3 = this->parent;
pEVar3->field_0x7c.BYTES.byte1 = pEVar3->field_0x7c.BYTES.byte1 | (this->type == 0 ? 1 : 2);
pEVar3->field_0x80.HALF.LO = (this->type == 0 ? 1 : 2) | pEVar3->field_0x80.HALF.LO;
- this->attachedEntity->iframes = this->iframes;
+ this->child->iframes = this->iframes;
entity74 = *(Entity**)&this->field_0x74;
entity74->iframes = this->iframes;
SoundReq(SFX_BOSS_HIT);
}
} else {
- this->attachedEntity->iframes = this->iframes;
+ this->child->iframes = this->iframes;
entity74 = *(Entity**)&this->field_0x74;
entity74->iframes = this->iframes;
InitializeAnimation(this, 0x18);
- InitAnimationForceUpdate(this->attachedEntity, 9);
+ InitAnimationForceUpdate(this->child, 9);
SoundReq(SFX_BOSS_HIT);
}
}
@@ -180,32 +180,32 @@ void sub_0803A274(Entity* this) {
if (this->type == 0) {
pEVar1 = CreateEnemy(MAZAAL_HAND, 0);
pEVar1->parent = this;
- this->attachedEntity = pEVar1;
+ this->child = pEVar1;
pEVar1 = CreateEnemy(MAZAAL_BRACELET, 2);
pEVar1->parent = this;
*(Entity**)&this->field_0x74 = pEVar1;
pEVar1 = CreateObject(OBJECT_7E, 1, 0);
pEVar1->parent = this;
- pEVar1->attachedEntity = this->attachedEntity;
+ pEVar1->child = this->child;
PositionRelative(this->parent, this, 0x100000, 0x200000);
} else {
pEVar1 = CreateEnemy(MAZAAL_HAND, 1);
pEVar1->parent = this;
- this->attachedEntity = pEVar1;
+ this->child = pEVar1;
pEVar1 = CreateEnemy(MAZAAL_BRACELET, 3);
pEVar1->parent = this;
*(Entity**)&this->field_0x74 = pEVar1;
pEVar1 = CreateObject(OBJECT_7E, 2, 0);
pEVar1->parent = this;
- pEVar1->attachedEntity = this->attachedEntity;
- this->spriteSettings.b.flipX = 1;
+ pEVar1->child = this->child;
+ this->spriteSettings.flipX = 1;
PositionRelative(this->parent, this, -0x100000, 0x200000);
}
if (gScreenTransition.field_0x38 != 0) {
this->action = 3;
COLLISION_ON(this);
- this->spriteSettings.b.draw = 1;
- this->attachedEntity->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
+ this->child->spriteSettings.draw = 1;
InitializeAnimation(this, 0x10);
} else {
this->action = 1;
@@ -222,25 +222,25 @@ void sub_0803A364(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
switch (this->subAction & 0x7f) {
case 0:
case 2:
break;
case 1:
this->subAction = 2;
- pEVar3 = this->attachedEntity;
- pEVar3->spriteSettings.b.draw = 1;
+ pEVar3 = this->child;
+ pEVar3->spriteSettings.draw = 1;
pEVar3->spriteRendering.alphaBlend = 1;
break;
case 3:
this->subAction = 4;
- this->spriteSettings.b.draw = 1;
- this->attachedEntity->spriteRendering.alphaBlend = 0;
+ this->spriteSettings.draw = 1;
+ this->child->spriteRendering.alphaBlend = 0;
break;
case 4:
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->subAction = 5;
}
break;
@@ -263,16 +263,16 @@ void sub_0803A364(Entity* this) {
break;
case 7:
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->subAction = 8;
- this->spriteSettings.b.draw = 0;
- InitAnimationForceUpdate(this->attachedEntity, 8);
+ this->spriteSettings.draw = 0;
+ InitAnimationForceUpdate(this->child, 8);
SoundReq(SFX_16E);
}
break;
case 8:
sub_0803B55C(this);
- if ((this->attachedEntity->frames.all & 0x80) == 0) {
+ if ((this->child->frame & 0x80) == 0) {
return;
}
uVar1 = 9;
@@ -283,20 +283,20 @@ void sub_0803A364(Entity* this) {
this->actionDelay--;
if (this->actionDelay == 0) {
this->subAction = 10;
- InitAnimationForceUpdate(this->attachedEntity, 6);
+ InitAnimationForceUpdate(this->child, 6);
}
break;
case 10:
sub_0803B55C(this);
- if ((this->attachedEntity->frames.all & 0x80) != 0) {
+ if ((this->child->frame & 0x80) != 0) {
this->subAction = 0xb;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 4);
}
break;
case 0xb:
GetNextFrame(this);
- if ((this->frames.all & 0x80) == 0) {
+ if ((this->frame & 0x80) == 0) {
return;
}
if (this->type2 != 0) {
@@ -327,7 +327,7 @@ void sub_0803A548(Entity* this) {
UpdateAnimationSingleFrame(this);
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
if (sub_0803B4E4(this) == 0) {
sub_0806F69C(this);
}
@@ -339,7 +339,7 @@ void sub_0803A58C(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
if (sub_0803B4E4(this) != 0) {
sub_0803B59C(this);
} else {
@@ -355,7 +355,7 @@ void sub_0803A5D0(Entity* this) {
COLLISION_OFF(this);
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
InitializeAnimation(this, 5);
}
@@ -365,12 +365,12 @@ void sub_0803A60C(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 6;
- this->spriteSettings.b.draw = 0;
- InitAnimationForceUpdate(this->attachedEntity, 8);
+ this->spriteSettings.draw = 0;
+ InitAnimationForceUpdate(this->child, 8);
}
}
@@ -381,10 +381,10 @@ void sub_0803A660(Entity* this) {
s8* ptr;
u32 index;
- pbVar3 = &this->attachedEntity->frames.all;
+ pbVar3 = &this->child->frame;
if ((*pbVar3 & 0x80) != 0) {
- if (this->height.HALF.HI > -0x50) {
- this->height.HALF.HI = this->height.HALF.HI - 2;
+ if (this->z.HALF.HI > -0x50) {
+ this->z.HALF.HI = this->z.HALF.HI - 2;
} else {
this->action = 7;
this->actionDelay = 0;
@@ -400,7 +400,7 @@ void sub_0803A660(Entity* this) {
}
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
}
}
@@ -430,10 +430,10 @@ void sub_0803A720(Entity* this) {
void sub_0803A740(Entity* this) {
u16 height;
- height = this->height.HALF.HI + 4;
- this->height.HALF.HI += 4;
+ height = this->z.HALF.HI + 4;
+ this->z.HALF.HI += 4;
if (-1 < height * 0x10000) {
- this->height.HALF.HI = 0;
+ this->z.HALF.HI = 0;
this->action = 10;
this->actionDelay = 10;
this->parent->field_0x7c.BYTES.byte1 |= 0x40;
@@ -454,8 +454,8 @@ void sub_0803A780(Entity* this) {
}
void sub_0803A7AC(Entity* this) {
- if (this->height.HALF.HI > -6) {
- this->height.HALF.HI--;
+ if (this->z.HALF.HI > -6) {
+ this->z.HALF.HI--;
} else {
this->action = 0xc;
}
@@ -467,10 +467,10 @@ void sub_0803A7CC(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
if (sub_0803B4E4(this)) {
this->action = 0xd;
- InitAnimationForceUpdate(this->attachedEntity, 6);
+ InitAnimationForceUpdate(this->child, 6);
} else {
sub_0806F69C(this);
}
@@ -482,11 +482,11 @@ void sub_0803A814(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
sub_0803B55C(this);
- if ((this->attachedEntity->frames.all & 0x80) != 0) {
+ if ((this->child->frame & 0x80) != 0) {
this->action = 0xe;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 4);
}
}
@@ -497,9 +497,9 @@ void sub_0803A86C(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
COLLISION_ON(this);
sub_0803B59C(this);
}
@@ -516,9 +516,9 @@ void sub_0803A8B8(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
InitializeAnimation(this, 6);
- InitAnimationForceUpdate(this->attachedEntity, 1);
+ InitAnimationForceUpdate(this->child, 1);
SoundReq(SFX_153);
}
@@ -528,7 +528,7 @@ void sub_0803A90C(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
GetNextFrame(this);
sub_0803B55C(this);
sub_0806F69C(this);
@@ -538,7 +538,7 @@ void sub_0803A90C(Entity* this) {
this->direction = this->type * 0x10 + 8;
this->speed = 0x200;
InitializeAnimation(this, 7);
- InitAnimationForceUpdate(this->attachedEntity, 2);
+ InitAnimationForceUpdate(this->child, 2);
}
}
@@ -548,7 +548,7 @@ void sub_0803A978(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
GetNextFrame(this);
sub_0803B55C(this);
if ((++this->actionDelay & 3) == 0) {
@@ -561,7 +561,7 @@ void sub_0803A978(Entity* this) {
COLLISION_OFF(this);
*(u8*)(*(int*)&this->field_0x74 + 0x10) &= 0x7f;
InitializeAnimation(this, 8);
- InitAnimationForceUpdate(this->attachedEntity, 3);
+ InitAnimationForceUpdate(this->child, 3);
}
}
@@ -572,7 +572,7 @@ void sub_0803AA00(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
if (sub_0803B870(this) == 0) {
direction = (this->type ^ 1) * 0x10 + 8;
if ((++this->actionDelay & 3) == 0) {
@@ -581,10 +581,10 @@ void sub_0803AA00(Entity* this) {
sub_0806F69C(this);
if ((this->direction == direction) || (this->y.HALF.HI >= gPlayerEntity.y.HALF.HI)) {
this->action = 0x13;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->direction = direction;
this->field_0x80.HWORD = gPlayerEntity.x.HALF.HI;
- InitAnimationForceUpdate(this->attachedEntity, 4);
+ InitAnimationForceUpdate(this->child, 4);
}
}
}
@@ -596,7 +596,7 @@ NONMATCH("asm/non_matching/mazaal/sub_0803AA98.inc", void sub_0803AA98(Entity* t
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
if (sub_0803B870(this) == 0) {
sub_0806F69C(this);
if (sub_0803B6F4(this) != 0) {
@@ -604,7 +604,7 @@ NONMATCH("asm/non_matching/mazaal/sub_0803AA98.inc", void sub_0803AA98(Entity* t
this->speed = 0x40;
InitializeAnimation(this, 10);
(*(Entity**)&this->field_0x74)->flags |= 0x80;
- temp = this->attachedEntity;
+ temp = this->child;
temp->hitType = 0x13;
InitAnimationForceUpdate(temp, 5);
SoundReq(SFX_16E);
@@ -619,10 +619,10 @@ void sub_0803AB10(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
sub_0806F69C(this);
sub_0803B55C(this);
- if ((this->attachedEntity->frames.all & 0x80) != 0) {
+ if ((this->child->frame & 0x80) != 0) {
this->action = 0x15;
this->actionDelay = 0xf;
}
@@ -634,12 +634,12 @@ void sub_0803AB5C(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
if (--this->actionDelay == 0) {
this->action = 0x16;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 0xb);
- InitAnimationForceUpdate(this->attachedEntity, 6);
+ InitAnimationForceUpdate(this->child, 6);
}
}
@@ -649,15 +649,15 @@ void sub_0803ABB4(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
GetNextFrame(this);
sub_0803B55C(this);
- if ((this->attachedEntity->frames.all & 0x80) != 0) {
+ if ((this->child->frame & 0x80) != 0) {
this->action = 0x17;
COLLISION_ON(this);
this->speed = 0x180;
InitializeAnimation(this, 0x10);
- InitAnimationForceUpdate(this->attachedEntity, 0);
+ InitAnimationForceUpdate(this->child, 0);
}
}
@@ -667,7 +667,7 @@ void sub_0803AC1C(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
if (sub_0803B4E4(this)) {
sub_0803B59C(this);
} else {
@@ -681,7 +681,7 @@ void sub_0803AC60(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
GetNextFrame(this);
if (!this->actionDelay) {
if (sub_0803B4E4(this) != 0) {
@@ -707,14 +707,14 @@ void sub_0803ACC0(Entity* this) {
}
break;
case 1:
- if (--this->height.HALF.HI * 0x10000 >> 0x10 < -0x20) {
+ if (--this->z.HALF.HI * 0x10000 >> 0x10 < -0x20) {
this->subAction = 2;
}
break;
case 2:
- uVar2 = this->height.HALF.HI += 4;
+ uVar2 = this->z.HALF.HI += 4;
if (-1 < (uVar2 * 0x10000)) {
- this->height.HALF.HI = 0;
+ this->z.HALF.HI = 0;
this->actionDelay = 0xc;
this->subAction = 3;
sub_08080964(8, 0);
@@ -728,15 +728,15 @@ void sub_0803ACC0(Entity* this) {
}
break;
case 4:
- uVar2 = this->height.HALF.HI -= 2;
+ uVar2 = this->z.HALF.HI -= 2;
if (uVar2 * 0x10000 >> 0x10 < -0x28) {
this->subAction = 5;
}
break;
case 5:
- uVar2 = this->height.HALF.HI += 4;
+ uVar2 = this->z.HALF.HI += 4;
if (-1 < (uVar2 * 0x10000)) {
- this->height.HALF.HI = 0;
+ this->z.HALF.HI = 0;
this->action = 0x1a;
this->actionDelay = 0x3c;
sub_08080964(0x1e, 0);
@@ -752,10 +752,10 @@ void sub_0803ACC0(Entity* this) {
void sub_0803ADAC(Entity* this) {
if (--this->actionDelay == 0) {
this->action = 0x16;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
(*(Entity**)&this->field_0x74)->flags |= 0x80;
InitializeAnimation(this, 0xb);
- InitAnimationForceUpdate(this->attachedEntity, 6);
+ InitAnimationForceUpdate(this->child, 6);
sub_0803B798();
} else {
sub_0803B824(this);
@@ -768,13 +768,13 @@ void sub_0803ADF4(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
UpdateAnimationSingleFrame(this);
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 0x1c;
this->actionDelay = 0x1e;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
}
@@ -784,11 +784,11 @@ void sub_0803AE48(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
UpdateAnimationSingleFrame(this);
if (((this->actionDelay == 0) || (--this->actionDelay == 0)) && ((this->parent->field_0x7c.BYTES.byte1 & 3) != 0)) {
this->action = 0x1d;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 4);
} else {
if (sub_0803B4E4(this) == 0) {
@@ -803,10 +803,10 @@ void sub_0803AEC4(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
UpdateAnimationSingleFrame(this);
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
COLLISION_ON(this);
sub_0803B59C(this);
}
@@ -816,21 +816,21 @@ void sub_0803AF18(Entity* this) {
this->action = 0x1f;
COLLISION_OFF(this);
InitializeAnimation(this, 5);
- this->height.HALF.HI = gUnk_080CED6C[(this->parent->field_0xf >> 4) & 7] + 4;
+ this->z.HALF.HI = gUnk_080CED6C[(this->parent->field_0xf >> 4) & 7] + 4;
}
void sub_0803AF50(Entity* this) {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 0x20;
- this->spriteSettings.b.draw = 0;
- InitAnimationForceUpdate(this->attachedEntity, 8);
+ this->spriteSettings.draw = 0;
+ InitAnimationForceUpdate(this->child, 8);
}
}
void sub_0803AF7C(Entity* this) {
sub_0803B55C(this);
- if ((this->attachedEntity->frames.all & 0x80) != 0) {
+ if ((this->child->frame & 0x80) != 0) {
this->action = 0x21;
this->actionDelay = 0xf;
}
@@ -840,8 +840,8 @@ void sub_0803AF9C(Entity* this) {
if (this->actionDelay != 0) {
this->actionDelay--;
} else {
- if (-0x20 < this->height.HALF.HI) {
- this->height.HALF.HI -= 2;
+ if (-0x20 < this->z.HALF.HI) {
+ this->z.HALF.HI -= 2;
} else {
this->action = 0x22;
this->actionDelay = 10;
@@ -856,13 +856,13 @@ void sub_0803AFC8(Entity* this) {
}
void sub_0803AFE0(Entity* this) {
- if (this->height.HALF.HI < 0) {
- this->height.HALF.HI += 4;
+ if (this->z.HALF.HI < 0) {
+ this->z.HALF.HI += 4;
} else {
this->action = 0x24;
this->actionDelay = 0xf0;
*(u8*)&this->cutsceneBeh = 3;
- this->height.HALF.HI = 0;
+ this->z.HALF.HI = 0;
sub_08080964(0xa0, 0);
SoundReq(SFX_158);
}
@@ -879,11 +879,11 @@ void sub_0803B01C(Entity* this) {
}
void sub_0803B04C(Entity* this) {
- if (this->height.HALF.HI > -6) {
- this->height.HALF.HI--;
+ if (this->z.HALF.HI > -6) {
+ this->z.HALF.HI--;
} else {
this->action = 0x26;
- InitAnimationForceUpdate(this->attachedEntity, 6);
+ InitAnimationForceUpdate(this->child, 6);
}
}
@@ -893,20 +893,20 @@ void sub_0803B074(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
sub_0803B55C(this);
- if ((this->attachedEntity->frames.all & 0x80) != 0) {
+ if ((this->child->frame & 0x80) != 0) {
this->action = 0x27;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 4);
- InitAnimationForceUpdate(this->attachedEntity, 0);
+ InitAnimationForceUpdate(this->child, 0);
}
}
void sub_0803B0D4(Entity* this) {
UpdateAnimationSingleFrame(this);
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
COLLISION_ON(this);
sub_0803B59C(this);
}
@@ -916,7 +916,7 @@ void sub_0803B100(Entity* this) {
Entity* temp;
this->action = 0x29;
- this->hVelocity = 0x14000;
+ this->zVelocity = 0x14000;
if (this->type == 0) {
this->hitbox = &gUnk_080FD364;
} else {
@@ -925,12 +925,12 @@ void sub_0803B100(Entity* this) {
temp = *(Entity**)&this->field_0x74;
temp->action = 3;
temp->field_0x74.HALF.LO = 0x20;
- InitAnimationForceUpdate(this->attachedEntity, 9);
+ InitAnimationForceUpdate(this->child, 9);
SoundReq(SFX_14F);
}
void sub_0803B144(Entity* this) {
- UpdateAnimationSingleFrame(this->attachedEntity);
+ UpdateAnimationSingleFrame(this->child);
if (sub_08003FC4(this, 0x2000) == 0) {
this->action = 0x2a;
InitializeAnimation(this, 0x16);
@@ -941,11 +941,11 @@ void sub_0803B144(Entity* this) {
void sub_0803B17C(Entity* this) {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 0x2b;
COLLISION_ON(this);
this->hitType = 0x18;
- this->currentHealth = 0xff;
+ this->health = 0xff;
this->field_0x7c.HALF.HI = 600;
}
}
@@ -954,14 +954,14 @@ void sub_0803B1B8(Entity* this) {
Entity* temp;
u16 val;
- if ((this->frames.all & 0x80) == 0) {
+ if ((this->frame & 0x80) == 0) {
GetNextFrame(this);
- UpdateAnimationSingleFrame(this->attachedEntity);
+ UpdateAnimationSingleFrame(this->child);
}
- if (this->currentHealth < 0xf5) {
+ if (this->health < 0xf5) {
this->action = 0x32;
this->field_0x7c.HALF.HI = 0x5dc;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->hitType = 0x14;
temp = CreateFx(this, FX_GIANT_EXPLOSION4, 0);
if (temp != (Entity*)0x0) {
@@ -982,7 +982,7 @@ void sub_0803B1B8(Entity* this) {
if ((temp->field_0x80.HALF.LO & 0xc) == 0xc) {
temp->action = 0xb;
temp->actionDelay = 0x78;
- temp->hVelocity = 0;
+ temp->zVelocity = 0;
(*(Entity**)&temp->field_0x74)->field_0x7c.HALF_U.HI = 0x708;
(*(Entity**)&temp->field_0x78)->field_0x7c.HALF_U.HI = 0x708;
}
@@ -997,9 +997,9 @@ void sub_0803B2D0(Entity* this) {
Entity* entity;
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 0x2d;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
entity = *(Entity**)&this->field_0x74;
entity->action = 2;
entity->field_0x74.HALF.LO = 0;
@@ -1012,7 +1012,7 @@ void sub_0803B30C(Entity* this) {
Entity* entity;
entity = *(Entity**)&this->field_0x74;
- if ((entity->frames.all & 0x80) != 0) {
+ if ((entity->frame & 0x80) != 0) {
this->action = 0x2e;
sub_0803B8E8(this, 0x13);
InitializeAnimation(entity, 0);
@@ -1020,8 +1020,8 @@ void sub_0803B30C(Entity* this) {
}
void sub_0803B338(Entity* this) {
- if (this->height.HALF.HI > -10) {
- this->height.HALF.HI--;
+ if (this->z.HALF.HI > -10) {
+ this->z.HALF.HI--;
} else {
this->action = 0x2f;
this->actionDelay = 0xf;
@@ -1034,7 +1034,7 @@ void sub_0803B35C(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
if (--this->actionDelay == 0) {
this->action = 0x30;
}
@@ -1046,12 +1046,12 @@ void sub_0803B398(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
if (sub_0803B4E4(this) != 0) {
this->action = 0x31;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 4);
- InitAnimationForceUpdate(this->attachedEntity, 0);
+ InitAnimationForceUpdate(this->child, 0);
} else {
sub_0806F69C(this);
}
@@ -1065,9 +1065,9 @@ void sub_0803B3F4(Entity* this) {
ptr = gUnk_080CED6C;
index = ((this->parent->field_0xf >> 4) + 3);
- this->height.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
+ this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->hitType = 0x17;
if (this->type == 0) {
this->hitbox = (Hitbox*)&gUnk_080FD35C;
@@ -1114,7 +1114,7 @@ u32 sub_0803B4E4(Entity* this) {
}
void sub_0803B538(Entity* this) {
- PositionRelative(this, this->attachedEntity, 0, -0x10000);
+ PositionRelative(this, this->child, 0, -0x10000);
PositionRelative(this, *(Entity**)&this->field_0x74, 0, -0x20000);
}
@@ -1123,9 +1123,9 @@ void sub_0803B55C(Entity* this) {
Entity* pEVar1;
pEVar1 = *(Entity**)&this->field_0x74;
- entity = this->attachedEntity;
+ entity = this->child;
UpdateAnimationSingleFrame(entity);
- if ((entity->frames.all & 0x10) != 0) {
+ if ((entity->frame & 0x10) != 0) {
if (pEVar1->animIndex != 1) {
InitializeAnimation(pEVar1, 1);
}
@@ -1157,7 +1157,7 @@ void sub_0803B5C0(Entity* this) {
} else {
temp = gUnk_080CFD0C[0x16 - direction];
}
- if (this->frames.all != temp) {
+ if (this->frame != temp) {
InitializeAnimation(this, temp);
}
}
@@ -1229,8 +1229,8 @@ void sub_0803B798(void) {
gPlayerState.field_0xa = 0;
gPlayerState.flags &= 0xffef;
gPlayerEntity.flags |= 0x80;
- gPlayerEntity.hVelocity = 0x18000;
- gPlayerEntity.height.HALF.HI = -10;
+ gPlayerEntity.zVelocity = 0x18000;
+ gPlayerEntity.z.HALF.HI = -10;
gPlayerEntity.direction = 0x10;
gPlayerEntity.animationState = 4;
gPlayerEntity.spritePriority.b1 = 1;
@@ -1256,11 +1256,11 @@ void sub_0803B824(Entity* this) {
u32 sub_0803B870(Entity* this) {
Entity* entity;
- entity = this->attachedEntity;
+ entity = this->child;
if ((entity->bitfield & 0x80) != 0 && (gPlayerState.flags & 0x10) != 0) {
this->action = 0x18;
this->actionDelay = 0x44;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
gPlayerEntity.flags = gPlayerEntity.flags & 0x7f;
gPlayerEntity.iframes = -0x10;
sub_0803B824(this);
@@ -1276,7 +1276,7 @@ u32 sub_0803B870(Entity* this) {
void sub_0803B8E8(Entity* this, u32 unk) {
Entity* entity;
- entity = this->attachedEntity;
+ entity = this->child;
entity->hitType = unk;
entity = (*(Entity**)&this->field_0x74);
entity->hitType = unk;
@@ -1289,14 +1289,14 @@ void sub_0803B8F8(Entity* this) {
void sub_0803B910(Entity* this) {
if (gScreenTransition.field_0x38 != 0) {
this->action = 2;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
*(u8*)&this->field_0x74 = 0;
sub_0803BA8C(this, 10);
} else {
this->action = 1;
*(u8*)&this->field_0x74 = 0x80;
}
- this->spriteSettings.b.flipX = (this->type - 2);
+ this->spriteSettings.flipX = (this->type - 2);
InitializeAnimation(this, 0);
CopyPositionAndSpriteOffset(this->parent, this);
}
@@ -1334,7 +1334,7 @@ void sub_0803B978(Entity* this) {
break;
case 4:
this->subAction = 5;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spriteRendering.alphaBlend = 1;
break;
default:
@@ -1393,7 +1393,7 @@ void sub_0803BA8C(Entity* this, u32 unk) {
sub_0801D2B4(this, sVar2);
(*(Entity**)&this->parent->field_0x78)->palette.b.b0 = this->palette.raw << 0x1c >> 0x1c;
(*(Entity**)&this->parent->field_0x78)->palette.b.b4 = this->palette.b.b0;
- this->parent->attachedEntity->palette.b.b0 = this->palette.raw << 0x1c >> 0x1c;
- this->parent->attachedEntity->palette.b.b4 = this->palette.b.b0;
+ this->parent->child->palette.b.b0 = this->palette.raw << 0x1c >> 0x1c;
+ this->parent->child->palette.b.b4 = this->palette.b.b0;
}
}
diff --git a/src/enemy/mazaalHand.c b/src/enemy/mazaalHand.c
index 49c19820..c429e428 100644
--- a/src/enemy/mazaalHand.c
+++ b/src/enemy/mazaalHand.c
@@ -23,7 +23,7 @@ const Hitbox* const gUnk_080CEF58[] = {
void MazaalHand(Entity* this) {
if (this->action == 0) {
this->action = 1;
- this->spriteSettings.b.flipX = this->type;
+ this->spriteSettings.flipX = this->type;
InitAnimationForceUpdate(this, 0);
}
sub_08035194(this);
diff --git a/src/enemy/mazaalHead.c b/src/enemy/mazaalHead.c
index 55199ec2..5de9aa38 100644
--- a/src/enemy/mazaalHead.c
+++ b/src/enemy/mazaalHead.c
@@ -132,7 +132,7 @@ void sub_08033F3C(Entity* this) {
} else {
this->action = 1;
}
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x6c.HALF.HI |= 1;
this->field_0x80.HALF.LO = 0;
InitializeAnimation(this, 0);
@@ -183,8 +183,8 @@ void sub_08033FFC(Entity* this) {
}
break;
case 4:
- this->height.WORD += -0x8000;
- if (this->height.HALF.HI == -10) {
+ this->z.WORD += -0x8000;
+ if (this->z.HALF.HI == -10) {
this->subAction = 5;
this->field_0x80.HALF.HI = 1;
}
@@ -335,8 +335,8 @@ void sub_08034348(Entity* this) {
if (this->field_0x7c.HALF_U.HI != 0) {
this->field_0x7c.HALF.HI--;
} else {
- if (this->height.HALF.HI > -10) {
- this->height.HALF.HI--;
+ if (this->z.HALF.HI > -10) {
+ this->z.HALF.HI--;
} else {
if (sub_080349D8(this) != 0) {
this->field_0x80.HALF.HI = 1;
@@ -351,7 +351,7 @@ void sub_0803438C(Entity* this) {
const s8* pVar;
if (this->actionDelay == 0) {
- this->currentHealth = 0;
+ this->health = 0;
} else {
this->actionDelay--;
if (this->actionDelay > 0xc0) {
@@ -686,7 +686,7 @@ END_NONMATCH
void sub_0803499C(Entity* this) {
if (((this->field_0x80.HALF.LO & 0xc) != 0xc) && (this->field_0x80.HALF.HI != 0)) {
- this->height.HALF.HI = gUnk_080CED6C[(++this->field_0xf >> 4) & 7];
+ this->z.HALF.HI = gUnk_080CED6C[(++this->field_0xf >> 4) & 7];
}
}
@@ -739,8 +739,8 @@ void sub_08034A84(Entity* this) {
} else {
if (this->action == 0) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.draw = 1;
+ this->spriteSettings.flipX = 1;
InitializeAnimation(this, 0);
}
CopyPositionAndSpriteOffset(this->parent, this);
@@ -764,7 +764,7 @@ void sub_08034B0C(Entity* this) {
this->actionDelay--;
} else {
GetNextFrame(this);
- if ((this->frames.all & 0x80) == 0) {
+ if ((this->frame & 0x80) == 0) {
return;
}
this->action = 2;
@@ -797,7 +797,7 @@ END_NONMATCH
void sub_08034BA0(Entity* this) {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->parent->field_0x7c.HALF.HI = 0xff;
DeleteEntity(this);
}
@@ -810,7 +810,7 @@ void sub_08034BC8(Entity* this) {
}
sub_0806FA90(this->parent, this, 0, 1);
sub_0800445C(this);
- if (this->height.HALF.HI == 0) {
+ if (this->z.HALF.HI == 0) {
sub_08034C00(this);
}
}
diff --git a/src/enemy/mazaalMacro.c b/src/enemy/mazaalMacro.c
index 2edf3d96..fbb030b8 100644
--- a/src/enemy/mazaalMacro.c
+++ b/src/enemy/mazaalMacro.c
@@ -85,7 +85,7 @@ void sub_08034CC4(Entity* this) {
SetTile(0x4022, COORD_TO_TILE(this), this->collisionLayer);
entity = CreateEnemy(MAZAAL_MACRO, 2);
if (entity != NULL) {
- this->attachedEntity = entity;
+ this->child = entity;
entity->parent = this;
CopyPosition(this, entity);
}
@@ -137,8 +137,8 @@ void sub_08034E68(Entity* this) {
ScriptExecutionContext* scriptExecutionContext;
if (this->parent->next == NULL) {
- if (this->spriteSettings.b.draw != 0) {
- this->spriteSettings.b.draw = 0;
+ if (this->spriteSettings.draw != 0) {
+ this->spriteSettings.draw = 0;
sub_08035120(this);
}
if (gScreenTransition.field_0x39 == 0) {
@@ -187,7 +187,7 @@ void sub_08034F58(Entity* this) {
}
void sub_08034F70(Entity* this) {
- this->currentHealth = gScreenTransition.field_0x39;
+ this->health = gScreenTransition.field_0x39;
if (gScreenTransition.field_0x39 >= 0x3d) {
this->type2 = 0;
} else if (gScreenTransition.field_0x39 >= 0x1f) {
@@ -199,38 +199,38 @@ void sub_08034F70(Entity* this) {
void sub_08034FA0(Entity* this) {
if (0 < this->iframes) {
- this->attachedEntity->iframes = this->iframes;
+ this->child->iframes = this->iframes;
sub_08080964(0xc, 1);
}
switch (this->type2) {
case 0:
- if (this->currentHealth < 0x3c) {
+ if (this->health < 0x3c) {
gScreenTransition.field_0x39 = 0x3c;
sub_08035050(this);
return;
}
break;
case 1:
- if (this->currentHealth < 0x1e) {
+ if (this->health < 0x1e) {
gScreenTransition.field_0x39 = 0x1e;
sub_08035050(this);
return;
}
break;
default:
- if (this->currentHealth == 0) {
+ if (this->health == 0) {
sub_0807BA8C(COORD_TO_TILE(this), this->collisionLayer);
}
break;
}
- gScreenTransition.field_0x39 = this->currentHealth;
+ gScreenTransition.field_0x39 = this->health;
}
void sub_08035050(Entity* this) {
Entity* entity;
COLLISION_OFF(this);
- this->currentHealth = 0;
+ this->health = 0;
entity = CreateEnemy(VAATI_PROJECTILE, 0);
if (entity != NULL) {
entity->type2 = 1;
diff --git a/src/enemy/miniFireballGuy.c b/src/enemy/miniFireballGuy.c
index 930ed8f0..7f538b1b 100644
--- a/src/enemy/miniFireballGuy.c
+++ b/src/enemy/miniFireballGuy.c
@@ -24,8 +24,8 @@ void sub_080455D4(Entity* this) {
void sub_080455E4(Entity* this) {
if ((this != this->parent) && (this->parent != NULL)) {
this->field_0x6c.HALF.LO &= 0x7f;
- this->parent->attachedEntity = this->attachedEntity;
- this->attachedEntity->parent = this->parent;
+ this->parent->child = this->child;
+ this->child->parent = this->parent;
}
sub_0804A7D4(this);
}
@@ -35,7 +35,7 @@ void nullsub_23(Entity* this) {
void sub_08045618(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->speed = 0x80;
this->field_0x3c = this->field_0x3c | 0x10;
sub_0804A720(this);
@@ -53,7 +53,7 @@ void sub_08045654(Entity* this) {
void sub_08045678(Entity* this) {
- this->hVelocity = 0x1c000;
+ this->zVelocity = 0x1c000;
if (this->actionDelay != 0) {
this->actionDelay--;
} else {
diff --git a/src/enemy/miniSlime.c b/src/enemy/miniSlime.c
index 68c1303a..521b52a8 100644
--- a/src/enemy/miniSlime.c
+++ b/src/enemy/miniSlime.c
@@ -32,8 +32,8 @@ void sub_0804525C(Entity* this) {
Entity* parent = this->parent;
if (this != parent && parent) {
this->field_0x6c.HALF.LO &= 0x7f;
- this->parent->attachedEntity = this->attachedEntity;
- this->attachedEntity->parent = this->parent;
+ this->parent->child = this->child;
+ this->child->parent = this->parent;
if (this->field_0x6c.HALF.HI & 0x40)
ReplaceMonitoredEntity(this, parent);
}
@@ -45,7 +45,7 @@ void nullsub_22(void) {
void sub_080452A4(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->speed = 0x100;
sub_0804A720(this);
InitializeAnimation(this, 6);
diff --git a/src/enemy/moldorm.c b/src/enemy/moldorm.c
index 909f3792..25ae0111 100644
--- a/src/enemy/moldorm.c
+++ b/src/enemy/moldorm.c
@@ -31,17 +31,17 @@ void sub_08022BD4(Entity* this) {
}
void sub_08022BEC(Entity* this) {
- if (this->field_0x7a.HALF.LO != this->currentHealth)
+ if (this->field_0x7a.HALF.LO != this->health)
this->field_0x7a.HALF.HI = 30;
- this->field_0x7a.HALF.LO = this->currentHealth;
+ this->field_0x7a.HALF.LO = this->health;
this->actionDelay = 1;
this->direction = this->knockbackDirection;
this->animationState = ((this->direction + 2) & 0x1c) >> 2;
this->frameIndex = this->animationState;
- this->attachedEntity->iframes = this->iframes;
+ this->child->iframes = this->iframes;
(*(Entity**)&this->field_0x7c)->iframes = this->iframes;
(*(Entity**)&this->field_0x80)->iframes = this->iframes;
sub_0804AA30(this, gUnk_080CBBA0);
@@ -56,19 +56,19 @@ void sub_08022C58(Entity* this) {
return;
tail0 = CreateEnemy(MOLDORM, 1);
- this->attachedEntity = tail0;
+ this->child = tail0;
tail0->spritePriority.b0 = 5;
tail0->parent = this;
CopyPosition(this, tail0);
tail1 = CreateEnemy(MOLDORM, 2);
- tail0->attachedEntity = tail1;
+ tail0->child = tail1;
tail1->spritePriority.b0 = 5;
tail1->parent = this;
CopyPosition(this, tail1);
tail2 = CreateEnemy(MOLDORM, 3);
- tail1->attachedEntity = tail2;
+ tail1->child = tail2;
tail2->spritePriority.b0 = 5;
tail2->parent = this;
CopyPosition(this, tail2);
@@ -79,14 +79,14 @@ void sub_08022C58(Entity* this) {
this->field_0xf = 1;
COLLISION_ON(this);
this->parent = this;
- this->attachedEntity = tail0;
+ this->child = tail0;
*(Entity**)&this->field_0x7c = tail1;
*(Entity**)&this->field_0x80 = tail2;
this->direction = Random() & 0x1f;
this->animationState = ((this->direction + 2) & 0x1c) >> 2;
this->frameIndex = this->animationState;
- this->field_0x7a.HALF.LO = this->currentHealth;
+ this->field_0x7a.HALF.LO = this->health;
}
void sub_08022D40(Entity* this) {
diff --git a/src/enemy/moldworm.c b/src/enemy/moldworm.c
index 9b53911f..7fb15f46 100644
--- a/src/enemy/moldworm.c
+++ b/src/enemy/moldworm.c
@@ -51,8 +51,8 @@ NONMATCH("asm/non_matching/moldworm/Moldworm.inc", void Moldworm(Entity* this))
}
}
- if (this->parent->field_0x7c.BYTES.byte0 != this->parent->field_0x7c.BYTES.byte1 && this->attachedEntity) {
- ((u8*)&this->attachedEntity->field_0x78)[(this->parent->field_0x7c.BYTES.byte0 - 1) & 0xf] =
+ if (this->parent->field_0x7c.BYTES.byte0 != this->parent->field_0x7c.BYTES.byte1 && this->child) {
+ ((u8*)&this->child->field_0x78)[(this->parent->field_0x7c.BYTES.byte0 - 1) & 0xf] =
(((this->x.HALF.HI - prevX + 8) & 0xf) << 4) | ((this->y.HALF.HI - prevY + 8U) & 0xf);
}
}
@@ -80,11 +80,11 @@ void sub_080230E4(Entity* this) {
}
}
- if (this->currentHealth == 0 && this->field_0x7c.BYTES.byte3 == 0 && this->action == 7) {
+ if (this->health == 0 && this->field_0x7c.BYTES.byte3 == 0 && this->action == 7) {
CopyPosition(this, &gPlayerEntity);
gPlayerEntity.flags = gPlayerEntity.flags | 0x80;
- gPlayerEntity.spriteSettings.b.draw = 1;
- gPlayerEntity.hVelocity = 0x18000;
+ gPlayerEntity.spriteSettings.draw = 1;
+ gPlayerEntity.zVelocity = 0x18000;
gPlayerEntity.direction = 0xff;
gPlayerEntity.iframes = -0x14;
gPlayerState.jumpStatus = 0x41;
@@ -106,32 +106,32 @@ void sub_080231BC(Entity* this) {
if (gEntCount < 0x40) {
Entity* ent;
- ent = this->attachedEntity = CreateEnemy(MOLDWORM, 1);
+ ent = this->child = CreateEnemy(MOLDWORM, 1);
ent->parent = this;
- ent = ent->attachedEntity = CreateEnemy(MOLDWORM, 2);
+ ent = ent->child = CreateEnemy(MOLDWORM, 2);
ent->parent = this;
- ent = ent->attachedEntity = CreateEnemy(MOLDWORM, 3);
+ ent = ent->child = CreateEnemy(MOLDWORM, 3);
ent->parent = this;
- ent = ent->attachedEntity = CreateEnemy(MOLDWORM, 4);
+ ent = ent->child = CreateEnemy(MOLDWORM, 4);
ent->parent = this;
- ent = ent->attachedEntity = CreateEnemy(MOLDWORM, 5);
+ ent = ent->child = CreateEnemy(MOLDWORM, 5);
ent->parent = this;
- ent = ent->attachedEntity = CreateEnemy(MOLDWORM, 6);
+ ent = ent->child = CreateEnemy(MOLDWORM, 6);
ent->parent = this;
- ent = ent->attachedEntity = CreateEnemy(MOLDWORM, 7);
+ ent = ent->child = CreateEnemy(MOLDWORM, 7);
ent->parent = this;
- ent->attachedEntity = CreateEnemy(MOLDWORM, 8);
- *(Entity**)&ent->attachedEntity->field_0x74 = ent;
- ent = ent->attachedEntity;
+ ent->child = CreateEnemy(MOLDWORM, 8);
+ *(Entity**)&ent->child->field_0x74 = ent;
+ ent = ent->child;
ent->parent = this;
- ent->attachedEntity = NULL;
+ ent->child = NULL;
sub_0804A720(this);
this->action = 6;
this->actionDelay = 0x1e;
@@ -167,7 +167,7 @@ void sub_08023288(Entity* this) {
void sub_08023330(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 4;
this->actionDelay = 0x19;
COLLISION_ON(this);
@@ -177,7 +177,7 @@ void sub_08023330(Entity* this) {
this->field_0x7a.HALF.HI = 0;
this->field_0x7c.BYTES.byte3 = 0;
sub_08023A88(this, this->animationState);
- CopyPosition(this, this->attachedEntity);
+ CopyPosition(this, this->child);
CreateFx(this, FX_ROCK, 0);
}
}
@@ -198,7 +198,7 @@ void sub_08023398(Entity* this) {
this->field_0x7c.BYTES.byte3 = 0;
COLLISION_OFF(this);
this->hitType = 0x85;
- this->attachedEntity->actionDelay = 1;
+ this->child->actionDelay = 1;
sub_08023A68(this);
CreateFx(this, FX_ROCK, 0);
return;
@@ -239,7 +239,7 @@ void sub_080234A4(Entity* this) {
GetNextFrame(this);
if (this->field_0x7c.BYTES.byte3) {
this->action = 6;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->field_0x78.HWORD = 300;
}
}
@@ -257,9 +257,9 @@ void sub_080234D8(Entity* this) {
void sub_0802351C(Entity* this) {
if (this->actionDelay != 0 && (this->type2 == 1 || gPlayerEntity.frameIndex == 0xff)) {
this->actionDelay = 0;
- this->attachedEntity->action = 3;
- this->attachedEntity->field_0xf = this->field_0x80.HALF.LO;
- InitializeAnimation(this->attachedEntity, this->attachedEntity->animationState + 1);
+ this->child->action = 3;
+ this->child->field_0xf = this->field_0x80.HALF.LO;
+ InitializeAnimation(this->child, this->child->animationState + 1);
InitializeAnimation(this, this->animationState);
}
@@ -300,7 +300,7 @@ void sub_08023604(Entity* this) {
this->action = 2;
this->actionDelay = 0;
COLLISION_ON(this);
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_08023644(this);
}
}
@@ -312,8 +312,8 @@ void sub_08023644(Entity* this) {
this->y.HALF.HI == parent->y.HALF.HI) {
this->action = 1;
COLLISION_OFF(this);
- this->spriteSettings.b.draw = 0;
- this->attachedEntity->actionDelay = 1;
+ this->spriteSettings.draw = 0;
+ this->child->actionDelay = 1;
sub_080239F0(this);
}
@@ -330,9 +330,9 @@ void sub_08023644(Entity* this) {
void sub_080236F8(Entity* parent) {
if (--parent->field_0xf == 0) {
parent->action = 2;
- parent->attachedEntity->action = 3;
- parent->attachedEntity->field_0xf = parent->parent->field_0x80.HALF.LO;
- InitializeAnimation(parent->attachedEntity, parent->attachedEntity->animationState + 1);
+ parent->child->action = 3;
+ parent->child->field_0xf = parent->parent->field_0x80.HALF.LO;
+ InitializeAnimation(parent->child, parent->child->animationState + 1);
InitializeAnimation(parent, parent->animationState);
}
}
@@ -356,8 +356,8 @@ void sub_08023748(Entity* this) {
void sub_0802376C(Entity* this) {
Entity* parent = this->parent;
- if (parent->spriteSettings.b.draw == 1 && parent->animIndex < 0x10) {
- this->spriteSettings.b.draw = 1;
+ if (parent->spriteSettings.draw == 1 && parent->animIndex < 0x10) {
+ this->spriteSettings.draw = 1;
GetNextFrame(this);
}
@@ -378,7 +378,7 @@ void sub_080237D8(Entity* this) {
this->y.HALF.HI == parent->y.HALF.HI) {
this->action = 1;
COLLISION_OFF(this);
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
parent->field_0x7c.BYTES.byte3 = 1;
sub_080239F0(this);
sub_08023A68(this);
@@ -415,33 +415,33 @@ void sub_08023894(Entity* this) {
void sub_0802390C(Entity* this) {
if (this->bitfield & 0x80) {
- Entity* ent = this->attachedEntity;
+ Entity* ent = this->child;
do {
ent->iframes = this->iframes;
- } while (ent = ent->attachedEntity, ent != NULL);
+ } while (ent = ent->child, ent != NULL);
} else {
- Entity* ent = this->attachedEntity;
+ Entity* ent = this->child;
do {
if (ent->bitfield & 0x80) {
- u8 bVar2 = 0xff - ent->currentHealth;
+ u8 bVar2 = 0xff - ent->health;
if (bVar2 != 0) {
u32 tmp;
- ent->currentHealth = 0xff;
+ ent->health = 0xff;
tmp = (u8)ent->iframes;
- if (this->currentHealth >= bVar2) {
- this->currentHealth -= bVar2;
+ if (this->health >= bVar2) {
+ this->health -= bVar2;
} else {
- this->currentHealth = 0;
+ this->health = 0;
}
ent = this;
do {
ent->iframes = tmp;
- } while (ent = ent->attachedEntity, ent != NULL);
+ } while (ent = ent->child, ent != NULL);
break;
}
}
- } while (ent = ent->attachedEntity, ent != NULL);
+ } while (ent = ent->child, ent != NULL);
}
}
@@ -449,7 +449,7 @@ void sub_08023990(Entity* this, u32 param_2, u32 param_3) {
Entity* ent;
this->action = 3;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->palette.b.b0 = 0x5;
this->palette.b.b4 = 0x5;
this->spritePriority.b0 = 7;
@@ -459,11 +459,11 @@ void sub_08023990(Entity* this, u32 param_2, u32 param_3) {
UpdateSpriteForCollisionLayer(this);
InitializeAnimation(this, 0x16);
- ent = this->attachedEntity;
+ ent = this->child;
do {
sub_080239F0(ent);
CopyPosition(this, ent);
- } while (ent = ent->attachedEntity, ent != NULL);
+ } while (ent = ent->child, ent != NULL);
}
/* TODO: fix struct */
diff --git a/src/enemy/octorok.c b/src/enemy/octorok.c
index 53794388..9ca40e32 100644
--- a/src/enemy/octorok.c
+++ b/src/enemy/octorok.c
@@ -84,7 +84,7 @@ void sub_0801EB9C(Entity* this) {
COLLISION_ON(this);
this->field_0x3a &= 0xfb;
} else {
- this->currentHealth = 0;
+ this->health = 0;
}
}
@@ -125,7 +125,7 @@ void Octorok_Move(Entity* this) {
void Octorok_ShootNut(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 1) {
+ if (this->frame & 1) {
Entity* ent = CreateProjectileWithParent(this, 1, 0);
if (ent) {
const s8* off;
@@ -133,13 +133,13 @@ void Octorok_ShootNut(Entity* this) {
off = &gOctorokNutOffset[this->direction / 4];
ent->x.HALF.HI += off[0];
ent->y.HALF.HI += off[1];
- ent->height.HALF.HI = -3;
- this->frames.all &= 0xfe;
+ ent->z.HALF.HI = -3;
+ this->frame &= 0xfe;
EnqueueSFX(0x18d);
}
}
- if (this->frames.all & 0x80)
+ if (this->frame & 0x80)
Octorok_Pause(this);
}
diff --git a/src/enemy/peahat.c b/src/enemy/peahat.c
index 6ac631b5..de45a52a 100644
--- a/src/enemy/peahat.c
+++ b/src/enemy/peahat.c
@@ -45,7 +45,7 @@ void Peahat(Entity* this) {
void Peahat_OnTick(Entity* this) {
gPeahatActions[this->action](this);
if (this->field_0x80.HALF.HI)
- this->height.HALF.HI = gPeahatFlightHeights[(this->field_0xf++ & 0x30) >> 4];
+ this->z.HALF.HI = gPeahatFlightHeights[(this->field_0xf++ & 0x30) >> 4];
}
void sub_0801FFDC(Entity* this) {
@@ -54,7 +54,7 @@ void sub_0801FFDC(Entity* this) {
Entity* ent = CreateEnemy(PEAHAT, PeahatForm_Propeller);
if (ent) {
CopyPosition(this, ent);
- ent->height.HALF.HI -= 8;
+ ent->z.HALF.HI -= 8;
}
this->field_0x82.HALF.LO = 0;
this->animationState = PeahatAnimation_SlicedPropeller;
@@ -127,7 +127,7 @@ void sub_08020104(Entity* this) {
COLLISION_ON(this);
this->field_0x3a &= 0xfb;
} else {
- this->currentHealth = 0;
+ this->health = 0;
}
}
@@ -241,7 +241,7 @@ void Peahat_Stunned(Entity* this) {
break;
case PeahatAnimation_SlicedPropeller:
sub_08003FC4(this, 0x1c00);
- if (this->height.HALF.HI == 0) {
+ if (this->z.HALF.HI == 0) {
this->action = 7;
this->actionDelay = 150;
this->field_0xf = 10;
@@ -260,7 +260,7 @@ void Peahat_RepairPropeller(Entity* this) {
return;
this->action = 9;
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
this->direction = Random() & 0x1f;
sub_0804AA1C(this);
this->animationState = PeahatAnimation_RepairPropeller;
@@ -284,9 +284,9 @@ void Peahat_Recover(Entity* this) {
void Peahat_Hop(Entity* this) {
GetNextFrame(this);
if (--this->actionDelay == 0) {
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 9;
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
this->animationState = PeahatAnimation_NewPropeller;
InitializeAnimation(this, this->animationState);
} else {
@@ -294,12 +294,12 @@ void Peahat_Hop(Entity* this) {
}
}
- if (this->frames.all & 2) {
- this->frames.all &= ~2;
+ if (this->frame & 2) {
+ this->frame &= ~2;
this->direction = Random() & 0x1f;
}
- if (this->frames.all & 1) {
+ if (this->frame & 1) {
sub_0800442E(this);
} else {
ProcessMovement(this);
@@ -308,14 +308,14 @@ void Peahat_Hop(Entity* this) {
void Peahat_Takeoff(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 1;
this->hitType = 0x70;
this->field_0x82.HALF.LO = 1;
this->field_0x80.HALF.HI = 1;
this->animationState = PeahatAnimation_Flying;
InitializeAnimation(this, this->animationState);
- } else if (this->frames.all & 1) {
+ } else if (this->frame & 1) {
sub_0800442E(this);
} else {
sub_08003FC4(this, 0x1c00);
@@ -327,10 +327,10 @@ void PeahatPropeller_Initialize(Entity* this) {
this->action = 1;
this->actionDelay = 240;
this->field_0xf = 40;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spriteRendering.b3 = 1;
this->spriteOrientation.flipY = 1;
- this->spriteSettings.b.shadow = 0;
+ this->spriteSettings.shadow = 0;
this->speed = 0x20;
this->direction = (Random() & 0x10) + 8;
InitializeAnimation(this, PeahatAnimation_Propeller);
@@ -342,9 +342,9 @@ void PeahatPropeller_Fly(Entity* this) {
DeleteEntity(this);
} else {
if (this->actionDelay < 60)
- this->spriteSettings.b.draw ^= 1;
+ this->spriteSettings.draw ^= 1;
- this->height.WORD -= 0xc000;
+ this->z.WORD -= 0xc000;
sub_0806F69C(this);
if (--this->field_0xf == 0) {
this->field_0xf = 40;
diff --git a/src/enemy/pesto.c b/src/enemy/pesto.c
index 6ee4a4da..3f0e0c51 100644
--- a/src/enemy/pesto.c
+++ b/src/enemy/pesto.c
@@ -56,7 +56,7 @@ void sub_08023F5C(Entity* this) {
if ((this->field_0x82.HALF.HI & 0xf) == 3 && this->action == 6) {
switch (this->field_0x80.HALF.LO) {
case 1:
- this->height.HALF.HI = -0x10;
+ this->z.HALF.HI = -0x10;
this->field_0x82.HALF.LO = 0;
this->field_0x78.HWORD = -0x10;
this->field_0x80.HALF.LO += 1;
@@ -68,7 +68,7 @@ void sub_08023F5C(Entity* this) {
}
}
} else {
- this->currentHealth = 0;
+ this->health = 0;
}
sub_0804AA30(this, gUnk_080CBEC4);
@@ -122,7 +122,7 @@ void nullsub_138(Entity* this) {
}
void sub_0802409C(Entity* this) {
- this->currentHealth = 0;
+ this->health = 0;
InitializeAnimation(this, this->animationState);
CreateDust(this);
}
@@ -142,11 +142,11 @@ void sub_080240B8(Entity* this) {
switch (this->type) {
case 0:
this->field_0x78.HWORD = -0x10;
- this->height.HALF.HI = -0x10;
+ this->z.HALF.HI = -0x10;
break;
case 1:
this->field_0x78.HWORD = -0x30;
- this->height.HALF.HI = -0x30;
+ this->z.HALF.HI = -0x30;
break;
}
@@ -172,7 +172,7 @@ void sub_080240B8(Entity* this) {
this->field_0x82.HALF.HI = 0;
ent = CreateProjectileWithParent(this, 6, this->field_0x82.HALF.HI);
if (ent) {
- this->attachedEntity = ent;
+ this->child = ent;
ent->parent = this;
ent->y.HALF.HI += 0x10;
}
@@ -274,7 +274,7 @@ void sub_080243B8(Entity* this) {
switch (this->field_0x80.HALF.LO) {
case 0:
if (sub_08024C48(this, TRUE)) {
- if (this->attachedEntity == NULL || this->attachedEntity->next == NULL) {
+ if (this->child == NULL || this->child->next == NULL) {
this->field_0x80.HALF.LO = 2;
this->actionDelay = 0x20;
this->speed = 0x80;
@@ -284,7 +284,7 @@ void sub_080243B8(Entity* this) {
this->actionDelay = 0x1e;
this->speed = 0x100;
this->field_0x82.HALF.HI = 0x80;
- this->attachedEntity->action = 2;
+ this->child->action = 2;
} else if (--this->actionDelay) {
if (--this->field_0xf == 0) {
sub_08024A14(this, 2, (this->actionDelay >> 6) + 1);
@@ -354,7 +354,7 @@ void sub_080244E8(Entity* this) {
}
break;
case 1:
- if (++this->height.HALF.HI >= -0x10) {
+ if (++this->z.HALF.HI >= -0x10) {
this->field_0x82.HALF.LO = 0;
this->field_0x78.HWORD = 0xfff0;
if (sub_08024AD8(this)) {
@@ -375,7 +375,7 @@ void sub_080244E8(Entity* this) {
} else {
sub_08024E1C(this);
}
- this->direction = GetFacingDirection(this, this->attachedEntity);
+ this->direction = GetFacingDirection(this, this->child);
sub_08024E00(this, 0);
sub_080249DC(this);
} else if (--this->field_0xf == 0) {
@@ -403,44 +403,44 @@ void sub_080244E8(Entity* this) {
}
break;
case 1:
- if (sub_080041A0(this, this->attachedEntity, 6, 6)) {
+ if (sub_080041A0(this, this->child, 6, 6)) {
Entity* ent;
this->field_0x80.HALF.LO += 1;
this->actionDelay = 0xc;
this->field_0x82.HALF.HI &= ~0x80;
- CopyPosition(this->attachedEntity, this);
- this->height.HALF.HI -= 0xe;
+ CopyPosition(this->child, this);
+ this->z.HALF.HI -= 0xe;
this->field_0x78.HWORD -= 0xe;
ent = CreateProjectileWithParent(this, 6, this->field_0x82.HALF.HI);
if (ent) {
ent->parent = this;
- ent->height.HALF.HI += 0xe;
- ent->attachedEntity = this->attachedEntity;
- CopyPosition(ent, ent->attachedEntity);
- this->attachedEntity = ent;
+ ent->z.HALF.HI += 0xe;
+ ent->child = this->child;
+ CopyPosition(ent, ent->child);
+ this->child = ent;
}
}
break;
case 2:
- if (sub_080041A0(this, this->attachedEntity, 6, 6)) {
+ if (sub_080041A0(this, this->child, 6, 6)) {
Entity* ent;
this->field_0x80.HALF.LO += 1;
this->actionDelay = 0xc;
this->field_0x82.HALF.HI &= ~0x80;
- ent = this->attachedEntity;
+ ent = this->child;
SetTile((u16)ent->field_0x70.HALF.LO, COORD_TO_TILE(ent), ent->collisionLayer);
DeleteEntity(ent);
- this->height.HALF.HI -= 0xe;
+ this->z.HALF.HI -= 0xe;
this->field_0x78.HWORD -= 0xe;
ent = CreateProjectileWithParent(this, 6, this->field_0x82.HALF.HI);
if (ent) {
ent->parent = this;
- ent->height.HALF.HI += 0xe;
- this->attachedEntity = ent;
+ ent->z.HALF.HI += 0xe;
+ this->child = ent;
}
}
break;
@@ -460,14 +460,14 @@ void sub_080244E8(Entity* this) {
}
break;
case 4:
- this->height.HALF.HI -= 2;
- if (-60 > this->height.HALF.HI) {
+ this->z.HALF.HI -= 2;
+ if (-60 > this->z.HALF.HI) {
this->field_0x80.HALF.LO++;
}
break;
case 5:
- if (this->height.HALF.HI < -0x30) {
- this->height.HALF.HI++;
+ if (this->z.HALF.HI < -0x30) {
+ this->z.HALF.HI++;
} else {
if (this->field_0x82.HALF.LO != 0) {
this->field_0x82.HALF.LO = 0;
@@ -511,7 +511,7 @@ void sub_080244E8(Entity* this) {
}
break;
case 7:
- if (gPlayerEntity.height.HALF.HI == 0) {
+ if (gPlayerEntity.z.HALF.HI == 0) {
this->field_0x80.HALF.LO = 0;
this->speed = 0x80;
sub_08024B38(this);
@@ -532,9 +532,9 @@ void sub_08024940(Entity* this) {
}
if (this->field_0x82.HALF.LO == 0) {
- this->height.HALF.HI = this->field_0x78.HWORD;
+ this->z.HALF.HI = this->field_0x78.HWORD;
if (random)
- this->height.HALF.HI += 2;
+ this->z.HALF.HI += 2;
}
if (this->type2 != 0 || CheckIsDungeon()) {
@@ -543,7 +543,7 @@ void sub_08024940(Entity* this) {
sub_080249F4(this);
}
- if (this->height.HALF.HI < -0x20) {
+ if (this->z.HALF.HI < -0x20) {
this->spritePriority.b0 = 0;
} else {
this->spritePriority.b0 = 1;
@@ -579,7 +579,7 @@ void sub_08024A14(Entity* this, u32 param_2, u32 param_3) {
break;
case 1:
if (sub_08024C48(this, FALSE)) {
- sub_08004596(this, GetFacingDirection(this, this->attachedEntity));
+ sub_08004596(this, GetFacingDirection(this, this->child));
unk = TRUE;
}
break;
@@ -614,8 +614,8 @@ bool32 sub_08024AD8(Entity* this) {
u8 unk = FALSE;
if ((this->field_0x82.HALF.HI & 0x3f) == 3) {
if (gPlayerState.hurtBlinkSpeed == 0) {
- this->attachedEntity->parent = NULL;
- this->attachedEntity = NULL;
+ this->child->parent = NULL;
+ this->child = NULL;
this->field_0x82.HALF.HI = 0xc0;
return FALSE;
}
@@ -623,7 +623,7 @@ bool32 sub_08024AD8(Entity* this) {
}
if (sub_08024C48(this, unk) == 0) {
- this->attachedEntity = NULL;
+ this->child = NULL;
this->field_0x82.HALF.HI = 0xc0;
return FALSE;
}
@@ -649,13 +649,13 @@ bool32 sub_08024B38(Entity* this) {
if (gPlayerState.hurtBlinkSpeed != 0) {
if (sub_08024C48(this, 1) && sub_08049F1C(this, gUnk_020000B0, 0xa0)) {
iVar4 = 1;
- this->attachedEntity = gUnk_020000B0;
+ this->child = gUnk_020000B0;
this->field_0x82.HALF.HI |= 3;
this->field_0x82.HALF.HI &= ~0x40;
}
if (iVar4 == 0) {
- this->attachedEntity = NULL;
+ this->child = NULL;
}
return iVar4;
}
@@ -664,9 +664,9 @@ bool32 sub_08024B38(Entity* this) {
ent = FindEntityByID(8, 2, 2);
if (ent) {
do {
- if (ent->action != 2 && ent->height.HALF.HI == 0 && sub_08049F1C(this, ent, 0xa0)) {
+ if (ent->action != 2 && ent->z.HALF.HI == 0 && sub_08049F1C(this, ent, 0xa0)) {
iVar4 = 1;
- this->attachedEntity = ent;
+ this->child = ent;
this->field_0x82.HALF.HI |= 1;
this->field_0x82.HALF.HI &= ~0x40;
break;
@@ -683,7 +683,7 @@ bool32 sub_08024B38(Entity* this) {
do {
if (ent->action == 1 && sub_08049F1C(this, ent, 0xa0)) {
iVar4 = 1;
- this->attachedEntity = ent;
+ this->child = ent;
this->field_0x82.HALF.HI |= 2;
this->field_0x82.HALF.HI &= ~0x40;
break;
@@ -692,7 +692,7 @@ bool32 sub_08024B38(Entity* this) {
}
if (iVar4 == 0) {
- this->attachedEntity = NULL;
+ this->child = NULL;
}
return iVar4;
@@ -840,7 +840,7 @@ void sub_08024F50(Entity* this) {
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
gPlayerEntity.speed = 0;
gPlayerEntity.spritePriority.b1 = this->cutsceneBeh.HALF.HI;
- gPlayerEntity.height.HALF.HI = gPlayerEntity.spriteOffsetY;
+ gPlayerEntity.z.HALF.HI = gPlayerEntity.spriteOffsetY;
gPlayerEntity.spriteOffsetY = 0;
this->flags2 |= 3;
this->field_0x82.HALF.HI = 0xc0;
diff --git a/src/enemy/puffstool.c b/src/enemy/puffstool.c
index 4688d174..1d326ef1 100644
--- a/src/enemy/puffstool.c
+++ b/src/enemy/puffstool.c
@@ -72,8 +72,8 @@ void sub_08025020(Entity* this) {
}
this->action = 7;
this->actionDelay = 0x3c;
- if (0 < this->hVelocity) {
- this->hVelocity = 0;
+ if (0 < this->zVelocity) {
+ this->zVelocity = 0;
}
this->iframes = -0xc;
this->knockbackDuration = 0;
@@ -200,7 +200,7 @@ void sub_080252E0(Entity* this) {
this->action = 3;
this->actionDelay = 0x1e;
this->field_0xf = 0;
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
InitializeAnimation(this, 1);
}
}
@@ -209,11 +209,11 @@ void sub_0802538C(Entity* this) {
if (this->actionDelay) {
this->actionDelay--;
} else {
- if (this->frames.all == 0) {
+ if (this->frame == 0) {
GetNextFrame(this);
} else {
sub_08003FC4(this, 0x2000);
- if (this->hVelocity < 0x2000) {
+ if (this->zVelocity < 0x2000) {
this->action = 4;
InitializeAnimation(this, 2);
}
@@ -239,16 +239,16 @@ void sub_080253D4(Entity* this) {
void sub_0802541C(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 3;
this->field_0xf = 1;
- this->hVelocity = 0x20000;
+ this->zVelocity = 0x20000;
InitializeAnimation(this, 1);
}
}
void sub_0802544C(Entity* this) {
- if (this->frames.all == 0) {
+ if (this->frame == 0) {
GetNextFrame(this);
} else {
if (--this->actionDelay == 0) {
@@ -272,8 +272,8 @@ void sub_0802547C(Entity* this) {
void sub_080254B4(Entity* this) {
sub_08003FC4(this, 0x2000);
- if (this->frames.all & 0x80) {
- if (this->height.HALF.HI == 0) {
+ if (this->frame & 0x80) {
+ if (this->z.HALF.HI == 0) {
if (this->cutsceneBeh.HWORD == 0) {
this->hitType = 0x82;
this->field_0x82.HALF.LO = -0x10;
@@ -552,18 +552,18 @@ void sub_08025B18(Entity* this) {
ent->x.HALF.HI += 8;
ent->y.HALF.HI &= -0x10;
ent->y.HALF.HI += 8;
- ent->height.HALF.HI = -1;
+ ent->z.HALF.HI = -1;
}
}
}
void sub_08025BD4(Entity* this) {
- if (this->field_0x82.HALF.LO && (this->frames.all & 1) == 0) {
+ if (this->field_0x82.HALF.LO && (this->frame & 1) == 0) {
Entity* ent = CreateObject(OBJECT_21, 0, 0);
if (ent) {
PositionRelative(this, ent, gUnk_080CC0BA[this->animationState * 2 + 0] * 0x10000,
gUnk_080CC0BA[this->animationState * 2 + 1] * 0x10000);
- ent->height.HALF.HI = -10;
+ ent->z.HALF.HI = -10;
}
}
}
@@ -575,7 +575,7 @@ void sub_08025C2C(Entity* this) {
}
bool32 sub_08025C44(Entity* this) {
- if ((this->frames.all & 1) == 0) {
+ if ((this->frame & 1) == 0) {
return ProcessMovement(this);
} else {
return FALSE;
diff --git a/src/enemy/rockChuchu.c b/src/enemy/rockChuchu.c
index 3248714f..95e0a9c1 100644
--- a/src/enemy/rockChuchu.c
+++ b/src/enemy/rockChuchu.c
@@ -20,7 +20,7 @@ void sub_0802223C(Entity* this) {
void sub_08022254(Entity* this) {
Entity* ent;
- if (this->currentHealth) {
+ if (this->health) {
switch (this->bitfield & 0x7f) {
case 4:
case 5:
@@ -51,9 +51,9 @@ void sub_08022254(Entity* this) {
sub_0804A4E4(this, ent);
this->action = 2;
COLLISION_OFF(this);
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->direction = this->knockbackDirection;
- this->attachedEntity = ent;
+ this->child = ent;
}
}
} else {
@@ -97,7 +97,7 @@ void sub_08022390(Entity* this) {
void sub_080223E4(Entity* this) {
Entity* ent;
- ent = this->attachedEntity;
+ ent = this->child;
if (ent) {
ent->bitfield = 0x94;
ent->iframes = 0x10;
diff --git a/src/enemy/rollobite.c b/src/enemy/rollobite.c
index 3316e6e5..9815510f 100644
--- a/src/enemy/rollobite.c
+++ b/src/enemy/rollobite.c
@@ -30,11 +30,11 @@ void Rollobite_OnTick(Entity* this) {
}
void sub_08020668(Entity* this) {
- if (this->hitType == 34 && this->currentHealth != 0xff) {
+ if (this->hitType == 34 && this->health != 0xff) {
this->action = 4;
- this->hVelocity = 0x20000;
+ this->zVelocity = 0x20000;
this->direction = 0xff;
- this->currentHealth = 0xff;
+ this->health = 0xff;
this->hitType = 35;
InitializeAnimation(this, this->animationState + 8);
}
@@ -102,7 +102,7 @@ void sub_080207A8(Entity* this) {
this->spritePriority.b0 = 4;
this->field_0x3a &= 0xfb;
this->direction ^= 0x10;
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
this->speed = 0x80;
InitializeAnimation(this, this->animationState + 0x10);
}
@@ -118,14 +118,14 @@ void Rollobite_Initialize(Entity* this) {
void Rollobite_Walk(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x1) {
- this->frames.all &= ~0x1;
+ if (this->frame & 0x1) {
+ this->frame &= ~0x1;
if (!ProcessMovement(this))
this->actionDelay = 1;
}
- if (this->frames.all & 0x10) {
- this->frames.all &= ~0x10;
+ if (this->frame & 0x10) {
+ this->frame &= ~0x10;
if (--this->actionDelay == 0) {
this->action = 3;
this->actionDelay = 60;
@@ -172,7 +172,7 @@ void Rollobite_Turn(Entity* this) {
void Rollobite_RolledUp(Entity* this) {
u32 unk;
- if ((this->frames.all & 0x80) == 0)
+ if ((this->frame & 0x80) == 0)
GetNextFrame(this);
unk = sub_080044EC(this, 0x2800);
@@ -194,7 +194,7 @@ void Rollobite_RolledUp(Entity* this) {
void Rollobite_Unroll(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
COLLISION_ON(this);
this->speed = 0x100;
this->hitType = 34;
@@ -202,7 +202,7 @@ void Rollobite_Unroll(Entity* this) {
this->direction = DirectionFromAnimationState(this->animationState);
InitializeAnimation(this, this->animationState);
} else {
- if ((this->frames.all & 1) == 0)
+ if ((this->frame & 1) == 0)
sub_08078930(this);
}
}
@@ -213,7 +213,7 @@ void Rollobite_LinedUp(Entity* this) {
this->spritePriority.b0 = 7;
}
- if (this->frames.all == 0)
+ if (this->frame == 0)
GetNextFrame(this);
}
@@ -252,7 +252,7 @@ void sub_08020A7C(Entity* this) {
}
bool32 Rollobite_TryToHoleUp(Entity* this) {
- if (Rollobite_IsRolledUp(this) && this->height.HALF.HI == 0) {
+ if (Rollobite_IsRolledUp(this) && this->z.HALF.HI == 0) {
int tile = COORD_TO_TILE(this);
int iVar1 = GetTileType(tile, this->collisionLayer);
if ((iVar1 * 0x10000 - 0x710000U) >> 0x10 < 2) {
@@ -262,7 +262,7 @@ bool32 Rollobite_TryToHoleUp(Entity* this) {
this->x.HALF.HI += 8;
this->y.HALF.HI &= 0xfff0;
this->y.HALF.HI += 13;
- this->hVelocity = 0x20000;
+ this->zVelocity = 0x20000;
InitializeAnimation(this, this->animationState + 0x14);
SetTile(0x4034, tile, this->collisionLayer);
return TRUE;
diff --git a/src/enemy/rope.c b/src/enemy/rope.c
index 1b196527..2c61fb03 100644
--- a/src/enemy/rope.c
+++ b/src/enemy/rope.c
@@ -67,8 +67,8 @@ void sub_08031434(Entity* this) {
} else {
this->action = 1;
this->subAction = 0;
- this->spriteSettings.b.draw = (this->spriteSettings.b.draw & 0xfc);
- this->height.HALF.HI = -0x80;
+ this->spriteSettings.draw = (this->spriteSettings.draw & 0xfc);
+ this->z.HALF.HI = -0x80;
this->frameIndex = 0xff;
}
}
@@ -81,7 +81,7 @@ void sub_08031480(Entity* this) {
sub_08031600(this);
this->action = 1;
this->subAction = 1;
- this->spriteSettings.b.draw = 3;
+ this->spriteSettings.draw = 3;
this->spriteRendering.b3 = 1;
this->spriteOrientation.flipY = 1;
SoundReq(SFX_12D);
@@ -90,7 +90,7 @@ void sub_08031480(Entity* this) {
if (sub_08003FC4(this, 0x1800) == 0) {
this->action = 2;
this->field_0xf = 0xf;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
UpdateSpriteForCollisionLayer(this);
EnqueueSFX(0x84);
}
diff --git a/src/enemy/rupeeLike.c b/src/enemy/rupeeLike.c
index 04c87bba..05334d65 100644
--- a/src/enemy/rupeeLike.c
+++ b/src/enemy/rupeeLike.c
@@ -56,7 +56,7 @@ void sub_08029318(Entity* this) {
if (*(u8*)(*(u32*)&this->field_0x4c + 8) == 1) {
if (this->action == 2) {
InitializeAnimation(this, 0);
- InitializeAnimation(this->attachedEntity, 4);
+ InitializeAnimation(this->child, 4);
}
this->action = 4;
this->actionDelay = 0x3c;
@@ -84,7 +84,7 @@ void nullsub_141() {
void sub_080293DC(Entity* this) {
CopyPositionAndSpriteOffset(this->parent, this);
this->y.HALF.HI++;
- this->height.HALF.HI--;
+ this->z.HALF.HI--;
gUnk_080CCC3C[this->action](this);
}
@@ -96,7 +96,7 @@ void sub_0802940C(Entity* this) {
sub_0804A720(this);
ent->parent = this;
ent->type2 = 1;
- this->attachedEntity = ent;
+ this->child = ent;
this->field_0x80.HALF.HI = 0;
this->cutsceneBeh.HALF.LO = 0;
this->field_0x82.HALF.LO = this->palette.b.b0;
@@ -115,17 +115,17 @@ void sub_08029474(Entity* this) {
u32 bVar1;
sub_080296C8(this);
- if (this->frames.b.f3) {
+ if (this->frame & 0x80) {
this->action = 3;
this->actionDelay = 8;
bVar1 = GetFacingDirection(this, &gPlayerEntity);
this->direction = bVar1;
this->animationState = (bVar1 << 0x18) >> 0x1c;
InitializeAnimation(this, this->animationState);
- InitializeAnimation(this->attachedEntity, this->animationState + 4);
+ InitializeAnimation(this->child, this->animationState + 4);
} else {
- if (this->frames.all == 1) {
- this->frames.all = 0;
+ if (this->frame == 1) {
+ this->frame = 0;
COLLISION_ON(this);
}
}
@@ -144,7 +144,7 @@ void sub_080294D4(Entity* this) {
this->action = 6;
COLLISION_OFF(this);
InitializeAnimation(this, 3);
- InitializeAnimation(this->attachedEntity, 7);
+ InitializeAnimation(this->child, 7);
}
}
@@ -189,9 +189,9 @@ void sub_08029610(Entity* this) {
void sub_08029630(Entity* this) {
sub_080296C8(this);
- if ((this->frames.b.f3) != 0) {
+ if (this->frame & 0x80) {
this->field_0x80.HALF.HI = 1;
- this->attachedEntity->spriteSettings.b.draw = FALSE;
+ this->child->spriteSettings.draw = FALSE;
sub_080297F0(this);
}
}
@@ -219,23 +219,23 @@ void sub_0802969C(Entity* this) {
if (bVar1 != this->animationState) {
this->animationState = bVar1;
InitializeAnimation(this, bVar1);
- InitializeAnimation(this->attachedEntity, bVar1 + 4);
+ InitializeAnimation(this->child, bVar1 + 4);
}
}
}
void sub_080296C8(Entity* this) {
GetNextFrame(this);
- GetNextFrame(this->attachedEntity);
+ GetNextFrame(this->child);
}
void sub_080296D8(Entity* this) {
gPlayerState.jumpStatus = 0x41;
gPlayerState.flags &= 0xffffffef;
gPlayerEntity.flags |= 0x80;
- gPlayerEntity.hVelocity = 0x18000;
+ gPlayerEntity.zVelocity = 0x18000;
gPlayerEntity.iframes = 0xa6;
- gPlayerEntity.height.HALF.HI = -2;
+ gPlayerEntity.z.HALF.HI = -2;
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
gPlayerEntity.spritePriority.b1 = this->field_0x80.HALF.LO;
gPlayerEntity.spriteOffsetY = 0;
@@ -260,8 +260,8 @@ void sub_08029770(Entity* this) {
this->hitType = 0x8d;
this->hitbox = &gUnk_080FD260;
InitializeAnimation(this, 2);
- this->attachedEntity->spriteSettings.b.draw = TRUE;
- InitializeAnimation(this->attachedEntity, 6);
+ this->child->spriteSettings.draw = TRUE;
+ InitializeAnimation(this->child, 6);
CreateDust(this);
}
}
@@ -271,7 +271,7 @@ void sub_080297F0(Entity* this) {
this->action = 1;
this->actionDelay = 0x78;
COLLISION_ON(this);
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
this->hitType = 0x8e;
sub_080AE068(this);
#ifdef EU
diff --git a/src/enemy/slime.c b/src/enemy/slime.c
index 34f9cb55..92de7a7f 100644
--- a/src/enemy/slime.c
+++ b/src/enemy/slime.c
@@ -33,7 +33,7 @@ void sub_08044F70(Entity* this) {
}
void sub_08044F88(Entity* this) {
- if ((this->currentHealth != 0) && (this->cutsceneBeh.HALF.LO != this->currentHealth)) {
+ if ((this->health != 0) && (this->cutsceneBeh.HALF.LO != this->health)) {
this->action = 4;
} else {
sub_0804AA30(this, gUnk_080D16A4);
@@ -49,7 +49,7 @@ void nullsub_171() {
void sub_08044FC8(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->speed = 128;
sub_0804A720(this);
InitializeAnimation(this, 0);
@@ -59,7 +59,7 @@ void sub_08044FC8(Entity* this) {
void sub_08044FF8(Entity* this) {
this->action = 2;
this->actionDelay = (Random() & 31) + 30;
- this->cutsceneBeh.HALF.LO = this->currentHealth;
+ this->cutsceneBeh.HALF.LO = this->health;
}
void sub_08045018(Entity* this) {
@@ -105,10 +105,10 @@ void sub_080450A8(Entity* this) {
off = gUnk_080D16D4;
for (i = 0; i < count; i++) {
ent = entities[i];
- ent->attachedEntity = entities[(i + 1) % count];
+ ent->child = entities[(i + 1) % count];
ent->parent = entities[(i + count - 1) % count];
ent->type2 = 1;
- ent->height.HALF.HI = 0;
+ ent->z.HALF.HI = 0;
ent->iframes = -0x10;
/* Set MiniSlime offset relative to killed slime. */
diff --git a/src/enemy/sluggula.c b/src/enemy/sluggula.c
index 21a9b985..d6361507 100644
--- a/src/enemy/sluggula.c
+++ b/src/enemy/sluggula.c
@@ -27,7 +27,7 @@ void Sluggula(Entity* this) {
SetChildOffset(this, 0, 1, -0x10);
} else if (this->type == 0) {
- if (this->height.HALF.HI == 0) {
+ if (this->z.HALF.HI == 0) {
u32 idx = sub_080012DC(this);
if (idx != 0) {
gUnk_080012C8[idx](this);
@@ -75,7 +75,7 @@ void sub_08023C8C(Entity* this) {
GetNextFrame(this);
sub_08023E54(this);
if (--this->actionDelay == 0) {
- if (this->frames.all != 1) {
+ if (this->frame != 1) {
this->actionDelay = 8;
} else {
this->actionDelay = (Random() & 0x30) + 0xb4;
@@ -95,11 +95,11 @@ void sub_08023CE0(Entity* this) {
if (this->actionDelay == 0) {
this->actionDelay = 1;
}
- this->spriteSettings.b.draw = 3;
+ this->spriteSettings.draw = 3;
} else {
this->action = 1;
}
- this->height.HALF.HI = -0x80;
+ this->z.HALF.HI = -0x80;
this->spriteRendering.b3 = 1;
this->spriteOrientation.flipY = 1;
InitializeAnimation(this, 6);
@@ -110,7 +110,7 @@ void sub_08023CE0(Entity* this) {
if (this->actionDelay == 0) {
this->actionDelay = 8;
}
- this->spriteSettings.b.draw = 3;
+ this->spriteSettings.draw = 3;
}
break;
case 2:
@@ -121,23 +121,23 @@ void sub_08023CE0(Entity* this) {
}
} else if (!sub_08003FC4(this, 0x1800)) {
this->action = 3;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
EnqueueSFX(0x84);
UpdateSpriteForCollisionLayer(this);
}
break;
default:
GetNextFrame(this);
- if (this->frames.all) {
- if (this->frames.all & 0x80) {
+ if (this->frame) {
+ if (this->frame & 0x80) {
Entity* ent = CreateEnemy(SLUGGULA, 1);
if (ent) {
sub_0804A4E4(this, ent);
DeleteThisEntity();
}
} else {
- this->y.HALF.HI += gUnk_080CBDF4[this->frames.all - 1];
- this->frames.all = 0;
+ this->y.HALF.HI += gUnk_080CBDF4[this->frame - 1];
+ this->frame = 0;
}
}
break;
@@ -152,7 +152,7 @@ void sub_08023E10(Entity* this) {
}
GetNextFrame(this);
- if (this->frames.all & 0x80)
+ if (this->frame & 0x80)
DeleteEntity(this);
}
diff --git a/src/enemy/smallPesto.c b/src/enemy/smallPesto.c
index 660a3110..3be1f047 100644
--- a/src/enemy/smallPesto.c
+++ b/src/enemy/smallPesto.c
@@ -87,17 +87,17 @@ void sub_08031770(Entity* this) {
if (--this->field_0x80.HWORD == 0) {
sub_08031840(this);
}
- } else if (this->attachedEntity == NULL) {
+ } else if (this->child == NULL) {
this->field_0x80.HWORD = (Random() & 0x7f) | (0x80 << 2);
} else {
- if (this->attachedEntity->next == NULL) {
- this->attachedEntity = NULL;
+ if (this->child->next == NULL) {
+ this->child = NULL;
}
}
}
void sub_080317B4(Entity* this) {
- this->height.HALF.HI = ((Random() & 0x30) != 0) ? -0xc : -0xd;
+ this->z.HALF.HI = ((Random() & 0x30) != 0) ? -0xc : -0xd;
sub_0806F69C(this);
GetNextFrame(this);
}
@@ -110,7 +110,7 @@ void sub_080317E0(Entity* this) {
void sub_080317F8(Entity* this) {
u8 newDirection = Random() & 0x18;
this->action = 1;
- this->height.HALF.HI = 0x0000FFF4;
+ this->z.HALF.HI = 0x0000FFF4;
this->collisionLayer = 1;
this->field_0x3c |= 0x10;
this->field_0x1c = 1;
@@ -126,7 +126,7 @@ void sub_08031840(Entity* this) {
if (enemy != NULL) {
CopyPosition(this, enemy);
enemy->parent = this;
- this->attachedEntity = enemy;
+ this->child = enemy;
enemy->type2 = 1;
}
}
diff --git a/src/enemy/spark.c b/src/enemy/spark.c
index 811bea88..cbbdb587 100644
--- a/src/enemy/spark.c
+++ b/src/enemy/spark.c
@@ -22,11 +22,11 @@ void sub_0802B2E0(Entity* this) {
if ((this->bitfield & 0x7f) == 0x14) {
COLLISION_OFF(this);
this->iframes = 0;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->action = 2;
ent = CreateFx(this, FX_DEATH, 0);
if (ent) {
- this->attachedEntity = ent;
+ this->child = ent;
this->actionDelay = 14;
CopyPosition(this, ent);
}
diff --git a/src/enemy/spearMoblin.c b/src/enemy/spearMoblin.c
index 34beba3a..fa90d4f8 100644
--- a/src/enemy/spearMoblin.c
+++ b/src/enemy/spearMoblin.c
@@ -31,8 +31,8 @@ extern const Hitbox* const gUnk_080CC944[];
void SpearMoblin(Entity* this) {
EnemyFunctionHandler(this, gUnk_080CC790);
SetChildOffset(this, 0, 1, -0x20);
- if (this->attachedEntity && this->attachedEntity->next) {
- CopyPosition(this, this->attachedEntity);
+ if (this->child && this->child->next) {
+ CopyPosition(this, this->child);
}
}
@@ -57,13 +57,13 @@ void sub_08028284(Entity* this) {
}
}
- this->attachedEntity->iframes = this->iframes;
- if (this->currentHealth == 0) {
+ this->child->iframes = this->iframes;
+ if (this->health == 0) {
this->speed = 0;
this->field_0x82.HALF.LO = 0;
sub_080287E0(this);
- DeleteEntity(this->attachedEntity);
- this->attachedEntity = NULL;
+ DeleteEntity(this->child);
+ this->child = NULL;
}
}
@@ -98,7 +98,7 @@ void sub_08028314(Entity* this) {
pEVar2 = CreateProjectile(3);
if (pEVar2 != NULL) {
pEVar2->parent = this;
- this->attachedEntity = pEVar2;
+ this->child = pEVar2;
}
}
@@ -378,7 +378,7 @@ bool32 sub_080288A4(Entity* this) {
}
void sub_080288C0(Entity* this) {
- Entity* ent = this->attachedEntity;
+ Entity* ent = this->child;
if (ent && (ent->bitfield & 0x80)) {
this->knockbackDirection = ent->knockbackDirection;
this->iframes = -ent->iframes;
diff --git a/src/enemy/spikedBeetle.c b/src/enemy/spikedBeetle.c
index 9f3aa75f..89d9e031 100644
--- a/src/enemy/spikedBeetle.c
+++ b/src/enemy/spikedBeetle.c
@@ -49,7 +49,7 @@ void sub_0802B628(Entity* this) {
case 0x1d:
if (this->action < 6) {
this->action = 6;
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
this->speed = 0xc0;
this->direction = this->knockbackDirection;
this->knockbackDuration = 0;
@@ -166,7 +166,7 @@ void sub_0802B8E0(Entity* this) {
}
} else {
this->action = 8;
- this->hVelocity = 0x10000;
+ this->zVelocity = 0x10000;
this->speed = 0x60;
this->hitType = 99;
InitializeAnimation(this, this->animationState);
diff --git a/src/enemy/spinyChuchu.c b/src/enemy/spinyChuchu.c
index 56872a16..53ad12b3 100644
--- a/src/enemy/spinyChuchu.c
+++ b/src/enemy/spinyChuchu.c
@@ -32,7 +32,7 @@ void sub_08022434(Entity* this) {
}
void sub_0802244C(Entity* this) {
- if (this->currentHealth) {
+ if (this->health) {
if (this->hitType == 0x65) {
switch (this->bitfield & 0x7f) {
case 2:
@@ -63,7 +63,7 @@ void sub_0802244C(Entity* this) {
InitializeAnimation(this, 1);
}
- if (this->field_0x80.HALF.LO != this->currentHealth) {
+ if (this->field_0x80.HALF.LO != this->health) {
this->action = 5;
this->hitType = 0x5c;
InitializeAnimation(this, 1);
@@ -78,7 +78,7 @@ void sub_0802244C(Entity* this) {
InitializeAnimation(this, 1);
}
- this->field_0x80.HALF.LO = this->currentHealth;
+ this->field_0x80.HALF.LO = this->health;
sub_0804AA30(this, gUnk_080CBA28);
}
@@ -90,7 +90,7 @@ void sub_080225A0(Entity* this) {
void sub_080225BC(Entity* this) {
sub_08003FC4(this, 0x1800);
- if (this->frames.all & 1) {
+ if (this->frame & 1) {
sub_0804A7D4(this);
} else {
GetNextFrame(this);
@@ -102,7 +102,7 @@ void nullsub_9(Entity* this) {
void sub_080225EC(Entity* this) {
sub_0804A720(this);
- this->field_0x80.HALF.LO = this->currentHealth;
+ this->field_0x80.HALF.LO = this->health;
this->field_0x80.HALF.HI = 0x5a;
if (this->actionDelay == 0) {
this->action = 2;
@@ -110,10 +110,10 @@ void sub_080225EC(Entity* this) {
} else {
this->action = 1;
this->field_0xf = 0x3c;
- this->spriteSettings.b.draw = 3;
+ this->spriteSettings.draw = 3;
this->spriteRendering.b3 = 1;
this->spriteOrientation.flipY = 1;
- this->height.HALF.HI = -0x80;
+ this->z.HALF.HI = -0x80;
InitializeAnimation(this, 6);
}
}
@@ -132,7 +132,7 @@ void sub_08022654(Entity* this) {
return;
this->subAction = 2;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 5);
EnqueueSFX(0x7d);
UpdateSpriteForCollisionLayer(this);
@@ -159,7 +159,7 @@ void sub_080226EC(Entity* this) {
if (sub_080228F0(this)) {
this->action = 6;
- this->hVelocity = 0x12000;
+ this->zVelocity = 0x12000;
this->speed = 0x140;
this->direction = GetFacingDirection(this, gUnk_020000B0);
this->hitType = 0x5a;
@@ -179,7 +179,7 @@ void sub_080226EC(Entity* this) {
void sub_08022780(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 4;
InitializeAnimation(this, 3);
EnqueueSFX(0x194);
@@ -188,18 +188,18 @@ void sub_08022780(Entity* this) {
void sub_080227AC(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 1) {
+ if (this->frame & 1) {
this->hitbox = &gUnk_080FD470;
} else {
this->hitbox = &gUnk_080FD468;
}
- if (this->frames.all & 2) {
- this->frames.all &= ~2;
+ if (this->frame & 2) {
+ this->frame &= ~2;
this->hitType = 0x5c;
}
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 2;
this->field_0xf = gUnk_080CBA60[Random() & 3];
InitializeAnimation(this, 0);
@@ -209,7 +209,7 @@ void sub_080227AC(Entity* this) {
void sub_0802281C(Entity* this) {
sub_08003FC4(this, 0x1800);
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 2;
this->speed = 0x20;
InitializeAnimation(this, 0);
@@ -219,7 +219,7 @@ void sub_0802281C(Entity* this) {
void sub_08022854(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 1) {
+ if (this->frame & 1) {
sub_080AEFE0(this);
if (sub_08003FC4(this, 0x1800) == 0) {
this->action = 7;
@@ -232,7 +232,7 @@ void sub_08022854(Entity* this) {
void sub_0802289C(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->action = 2;
this->speed = 0x20;
this->field_0x80.HALF.HI = 0x78;
diff --git a/src/enemy/tektite.c b/src/enemy/tektite.c
index 0a2367bd..a4f78704 100644
--- a/src/enemy/tektite.c
+++ b/src/enemy/tektite.c
@@ -38,16 +38,16 @@ void sub_0802F150(Entity* this) {
}
this->field_0xf = 0;
*(u8*)&this->field_0x7c = 0;
- if (this->height.HALF.HI != 0) {
- this->hVelocity >>= 2;
+ if (this->z.HALF.HI != 0) {
+ this->zVelocity >>= 2;
} else {
- this->hVelocity = 0;
+ this->zVelocity = 0;
}
InitializeAnimation(this, 0);
break;
case 0xe:
case 0x15:
- this->currentHealth = 0;
+ this->health = 0;
break;
}
}
@@ -58,7 +58,7 @@ void nullsub_16(Entity* this) {
void sub_0802F1F0(Entity* this) {
sub_08001242(this);
- if (this->height.HALF.HI != 0) {
+ if (this->z.HALF.HI != 0) {
sub_08003FC4(this, this->field_0x80.HWORD);
}
}
@@ -91,15 +91,15 @@ void sub_0802F284(Entity* this) {
if (this->actionDelay != 0) {
this->actionDelay--;
} else if (this->field_0xf != 0) {
- if ((this->frames.b.f3) != 0) {
+ if (this->frame & 0x80) {
this->action = 2;
this->actionDelay = 0x10;
this->field_0xf = this->type;
- this->hVelocity = this->field_0x82.HWORD << 4;
+ this->zVelocity = this->field_0x82.HWORD << 4;
sub_0802F45C(this);
InitializeAnimation(this, 2);
}
- } else if ((this->frames.b.f3) != 0) {
+ } else if (this->frame & 0x80) {
this->field_0xf = 0x40;
InitializeAnimation(this, 1);
}
@@ -111,7 +111,7 @@ void sub_0802F300(Entity* this) {
GetNextFrame(this);
ProcessMovement(this);
- temp = this->height.HALF.HI;
+ temp = this->z.HALF.HI;
rand = Random() & 0xf;
if (sub_080044EC(this, this->field_0x80.HWORD) == 1) {
@@ -143,7 +143,7 @@ void sub_0802F300(Entity* this) {
}
}
- if ((this->subAction == 0) && (temp < this->height.HALF.HI)) {
+ if ((this->subAction == 0) && (temp < this->z.HALF.HI)) {
InitializeAnimation(this, 4);
this->subAction = 1;
}
@@ -161,12 +161,12 @@ void sub_0802F3F4(Entity* this) {
GetNextFrame(this);
- if ((this->frames.b.f3) != 0) {
+ if (this->frame & 0x80) {
if ((*(u8*)&this->field_0x7c.HALF.LO < 2) && ((this->type % 2) != 0)) {
this->action = 2;
this->actionDelay = 0x10;
this->field_0xf = this->type;
- this->hVelocity = this->field_0x82.HWORD << 4;
+ this->zVelocity = this->field_0x82.HWORD << 4;
(*(u8*)&this->field_0x7c.HALF.LO)++;
sub_0802F45C(this);
InitializeAnimation(this, 2);
diff --git a/src/enemy/tektiteGolden.c b/src/enemy/tektiteGolden.c
index f5b7103a..12287902 100644
--- a/src/enemy/tektiteGolden.c
+++ b/src/enemy/tektiteGolden.c
@@ -32,10 +32,10 @@ void sub_08037F00(Entity* this) {
this->actionDelay = 0x14;
this->field_0xf = 0;
this->field_0x80.HALF.LO = 0;
- if (this->height.HALF.HI != 0) {
- this->hVelocity >>= 2;
+ if (this->z.HALF.HI != 0) {
+ this->zVelocity >>= 2;
} else {
- this->hVelocity = 0;
+ this->zVelocity = 0;
}
InitializeAnimation(this, 0);
@@ -58,7 +58,7 @@ void sub_08037F58(Entity* this) {
void sub_08037F84(Entity* this) {
sub_08001242(this);
- if (this->height.HALF.HI != 0) {
+ if (this->z.HALF.HI != 0) {
sub_08003FC4(this, 0x3000);
}
}
@@ -82,15 +82,15 @@ void sub_08037Fe0(Entity* this) {
if (this->actionDelay != 0) {
this->actionDelay--;
} else if (this->field_0xf != 0) {
- if ((this->frames.b.f3) != 0) {
+ if (this->frame & 0x80) {
this->action = 2;
this->actionDelay = 6;
this->field_0xf = 0;
- this->hVelocity = 0x38000;
+ this->zVelocity = 0x38000;
sub_08038168(this);
InitializeAnimation(this, 2);
}
- } else if ((this->frames.b.f3) != 0) {
+ } else if (this->frame & 0x80) {
this->field_0xf = 0x40;
InitializeAnimation(this, 1);
}
@@ -102,7 +102,7 @@ void sub_08038048(Entity* this) {
UpdateAnimationVariableFrames(this, 2);
ProcessMovement(this);
- temp = this->height.HALF.HI;
+ temp = this->z.HALF.HI;
rand = Random() & 0xf;
if (sub_080044EC(this, 0x3000) == 1) {
@@ -122,7 +122,7 @@ void sub_08038048(Entity* this) {
sub_08038168(this);
}
- if ((this->subAction == 0) && (temp < this->height.HALF.HI)) {
+ if ((this->subAction == 0) && (temp < this->z.HALF.HI)) {
InitializeAnimation(this, 4);
this->subAction = 1;
}
@@ -138,11 +138,11 @@ void sub_08038048(Entity* this) {
void sub_08038110(Entity* this) {
UpdateAnimationVariableFrames(this, 2);
- if ((this->frames.b.f3) != 0) {
+ if (this->frame & 0x80) {
if (this->field_0x80.HALF.LO < 5) {
this->action = 2;
this->actionDelay = 8;
- this->hVelocity = 0x38000;
+ this->zVelocity = 0x38000;
sub_08038168(this);
InitializeAnimation(this, 2);
} else {
diff --git a/src/enemy/treeItem.c b/src/enemy/treeItem.c
index 0b2103fd..acacb7a3 100644
--- a/src/enemy/treeItem.c
+++ b/src/enemy/treeItem.c
@@ -47,7 +47,7 @@ void TreeItem(Entity* this) {
if (itemEntity) {
CopyPosition(this, itemEntity);
itemEntity->y.HALF.HI += 16;
- itemEntity->height.HALF.HI = -32;
+ itemEntity->z.HALF.HI = -32;
}
}
}
diff --git a/src/enemy/vaatiArm.c b/src/enemy/vaatiArm.c
index d001699a..6dbacb7f 100644
--- a/src/enemy/vaatiArm.c
+++ b/src/enemy/vaatiArm.c
@@ -425,7 +425,7 @@ void sub_08042A3C(Entity* this) {
gUnk_080D12B8[this->subAction](this);
sub_08043A10(this);
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
- entity->height.HALF.HI += this->field_0x78.HALF.LO;
+ entity->z.HALF.HI += this->field_0x78.HALF.LO;
}
void sub_08042A6C(Entity* this) {
@@ -481,11 +481,11 @@ void sub_08042B20(Entity* this) {
if (0x30 < ptr->unk04.HALF.HI) {
ptr->unk00.HWORD += ptr->unk08;
}
- if (((VaatiArm_HeapStruct*)this->myHeap)->entities[3]->spriteSettings.b.draw) {
+ if (((VaatiArm_HeapStruct*)this->myHeap)->entities[3]->spriteSettings.draw) {
sub_08043C40(this, ptr);
for (i = 0; i < 4; i++) {
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[i];
- if ((-0xa <= entity->height.HALF.HI) && ((entity->spriteSettings.b.draw) == 1)) {
+ if ((-0xa <= entity->z.HALF.HI) && ((entity->spriteSettings.draw) == 1)) {
if (i == 0) {
object = CreateObject(OBJECT_AF, 0, 0);
if (object != NULL) {
@@ -498,7 +498,7 @@ void sub_08042B20(Entity* this) {
}
}
entity->flags &= 0x7f;
- entity->spriteSettings.b.draw = 0;
+ entity->spriteSettings.draw = 0;
SoundReq(SFX_161);
}
}
@@ -564,7 +564,7 @@ void sub_08042C34(Entity* this) {
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[i];
entity->x.HALF.HI = x;
entity->y.HALF.HI = y;
- entity->height.HALF.HI = 0x32;
+ entity->z.HALF.HI = 0x32;
entity->hitType = 0x39;
ptr = &((VaatiArm_HeapStruct*)this->myHeap)->s1[i];
ptr->unk00.HWORD = 0x80;
@@ -600,20 +600,20 @@ void sub_08042D6C(Entity* this) {
for (i = 0; i < 4; i++) {
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[i];
- if (entity->height.HALF.HI < 4) {
+ if (entity->z.HALF.HI < 4) {
if (i != 2) {
entity->flags = entity->flags | 0x80;
}
- if ((entity->spriteSettings.b.draw == 0u) && (object = CreateObject(OBJECT_AF, 2, 0), object != NULL)) {
+ if ((entity->spriteSettings.draw == 0u) && (object = CreateObject(OBJECT_AF, 2, 0), object != NULL)) {
CopyPosition(entity, object);
SoundReq(SFX_166);
}
- entity->spriteSettings.b.draw = 1;
+ entity->spriteSettings.draw = 1;
}
}
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3];
- if (entity->height.HALF.HI <= -3) {
- entity->height.HALF.HI = -5;
+ if (entity->z.HALF.HI <= -3) {
+ entity->z.HALF.HI = -5;
((VaatiArm_HeapStruct*)this->myHeap)->s1[0].unk08 = gUnk_080D1300[this->type2];
((VaatiArm_HeapStruct*)this->myHeap)->s1[0].unk0a = 0xc0;
this->subAction = 3;
@@ -623,7 +623,7 @@ void sub_08042D6C(Entity* this) {
InitAnimationForceUpdate(this, 0);
((VaatiArm_HeapStruct*)this->myHeap)->entities[1]->hitType = 0x39;
} else {
- entity->height.HALF.HI -= 2;
+ entity->z.HALF.HI -= 2;
}
}
@@ -710,15 +710,15 @@ void sub_08042FD8(Entity* this) {
UpdateAnimationSingleFrame(this);
if (!sub_08043C98(this)) {
- if ((this->frames.all & 1) != 0) {
+ if ((this->frame & 1) != 0) {
entity = CreateProjectile(0x20);
if (entity != NULL) {
CopyPosition(this, entity);
- entity->height.HALF.HI -= 0x18;
- this->frames.all = 0;
+ entity->z.HALF.HI -= 0x18;
+ this->frame = 0;
}
} else {
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
if (--this->field_0xf == 0) {
this->subAction = 8;
this->actionDelay = 0x3c;
@@ -802,18 +802,18 @@ void sub_08043130(Entity* this) {
}
}
} else {
- ((VaatiArm_HeapStruct*)this->myHeap)->entities[3]->height.HALF.HI += 3;
+ ((VaatiArm_HeapStruct*)this->myHeap)->entities[3]->z.HALF.HI += 3;
for (i = 0; i < 4; i++) {
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[i];
- if (entity->height.HALF.HI > -4) {
+ if (entity->z.HALF.HI > -4) {
entity->flags = entity->flags & 0x7f;
- if (entity->spriteSettings.b.draw == 1) {
+ if (entity->spriteSettings.draw == 1) {
SoundReq(SFX_161);
}
- entity->spriteSettings.b.draw = 0;
+ entity->spriteSettings.draw = 0;
}
}
- if (this->spriteSettings.b.draw == 0) {
+ if (this->spriteSettings.draw == 0) {
this->subAction = 9;
this->actionDelay = 0x3c;
sub_0804AA1C(this);
@@ -853,7 +853,7 @@ void sub_0804325C(Entity* this) {
if (this->field_0x78.HALF.LO >= 3) {
this->field_0x78.HALF.LO -= 2;
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
- entity->height.HALF.HI += this->field_0x78.HALF.LO;
+ entity->z.HALF.HI += this->field_0x78.HALF.LO;
} else {
this->field_0x78.HALF.LO = 0;
}
@@ -876,7 +876,7 @@ NONMATCH("asm/non_matching/vaati/sub_0804334C.inc", void sub_0804334C(Entity* th
for (i = 0; i < 5; i++) {
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[i];
entity->flags = entity->flags | 0x80;
- entity->spriteSettings.b.draw = 1;
+ entity->spriteSettings.draw = 1;
}
}
s = &((VaatiArm_HeapStruct*)this->myHeap)->s1[0];
@@ -951,16 +951,16 @@ NONMATCH("asm/non_matching/vaati/sub_08043490.inc", void sub_08043490(Entity* th
Entity* entity;
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
- if (entity->height.HALF.HI < -4) {
- entity->hVelocity = 0x18000;
+ if (entity->z.HALF.HI < -4) {
+ entity->zVelocity = 0x18000;
this->subAction = 2;
this->field_0x7c.BYTES.byte2 = 0;
((VaatiArm_HeapStruct*)this->myHeap)->parent->subAction = 2;
} else {
- entity->height.HALF.HI -= 2;
- if (entity->height.HALF.HI < 0) {
+ entity->z.HALF.HI -= 2;
+ if (entity->z.HALF.HI < 0) {
entity->flags = entity->flags | 0x80;
- entity->spriteSettings.b.draw = 1;
+ entity->spriteSettings.draw = 1;
entity->field_0x3c = entity->field_0x3c & 0xef;
entity->hitType = 0x3a;
entity->hitbox = (Hitbox*)&gUnk_080FD450;
@@ -979,8 +979,8 @@ void sub_08043520(Entity* this) {
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
sub_08003FC4(entity, 0x1a00);
- if ((entity->hVelocity < 0) && (-6 < entity->height.HALF.HI)) {
- entity->height.HALF.HI = -6;
+ if ((entity->zVelocity < 0) && (-6 < entity->z.HALF.HI)) {
+ entity->z.HALF.HI = -6;
this->subAction = 3;
this->field_0x7a.HWORD = 900;
}
@@ -998,15 +998,15 @@ void sub_08043580(Entity* this) {
Entity* entity;
u32 i;
- ((VaatiArm_HeapStruct*)this->myHeap)->entities[4]->height.HALF.HI += 3;
+ ((VaatiArm_HeapStruct*)this->myHeap)->entities[4]->z.HALF.HI += 3;
for (i = 0; i < 5; i++) {
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[i];
- if (-4 < entity->height.HALF.HI) {
+ if (-4 < entity->z.HALF.HI) {
entity->flags = entity->flags & 0x7f;
- entity->spriteSettings.b.draw = 0;
+ entity->spriteSettings.draw = 0;
}
}
- if ((this->spriteSettings.b.draw & 3) == 0) {
+ if ((this->spriteSettings.draw & 3) == 0) {
this->subAction = 5;
this->actionDelay = 0x3c;
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
@@ -1063,7 +1063,7 @@ static inline void deleteThing(Entity* this, const u32 index) {
this->actionDelay = 0x14;
this->subAction = index + 1;
if (index == 1) {
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
CreateFx(((VaatiArm_HeapStruct*)this->myHeap)->entities[index], FX_GIANT_EXPLOSION4, 0);
((VaatiArm_HeapStruct*)this->myHeap)->entities[index]->myHeap = NULL;
@@ -1099,7 +1099,7 @@ NONMATCH("asm/non_matching/vaati/sub_08043770.inc", void sub_08043770(Entity* th
gScreenTransition.field_0x39 &= 0xfd;
}
((VaatiArm_HeapStruct*)this->myHeap)->entities[4]->myHeap = NULL;
- ((VaatiArm_HeapStruct*)this->myHeap)->entities[4]->currentHealth = 0;
+ ((VaatiArm_HeapStruct*)this->myHeap)->entities[4]->health = 0;
(*(Entity**)&this->field_0x68)->parent = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
DeleteThisEntity();
}
@@ -1170,7 +1170,7 @@ void sub_08043A10(Entity* this) {
sub_08043B7C(this);
sub_0804393C(((VaatiArm_HeapStruct*)this->myHeap)->entities[4]);
((VaatiArm_HeapStruct*)this->myHeap)->entities[4]->y.HALF.HI -= 8;
- ((VaatiArm_HeapStruct*)this->myHeap)->entities[4]->height.HALF.HI -= 8;
+ ((VaatiArm_HeapStruct*)this->myHeap)->entities[4]->z.HALF.HI -= 8;
sub_0804393C(((VaatiArm_HeapStruct*)this->myHeap)->entities[3]);
sub_0804393C(((VaatiArm_HeapStruct*)this->myHeap)->entities[2]);
sub_0804393C(((VaatiArm_HeapStruct*)this->myHeap)->entities[1]);
@@ -1329,7 +1329,7 @@ void sub_08043D08(Entity* this) {
InitAnimationForceUpdate(this, 0xd);
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
entity->flags &= 0x7f;
- entity->spriteSettings.b.draw = 0;
+ entity->spriteSettings.draw = 0;
InitializeAnimation(entity, 0x13);
sub_0804AA1C(entity);
fx = CreateFx(entity, FX_GIANT_EXPLOSION4, 0);
@@ -1339,7 +1339,7 @@ void sub_08043D08(Entity* this) {
fx->spritePriority.b0 = 3;
}
CopyPosition(((VaatiArm_HeapStruct*)this->myHeap)->entities[3], entity);
- entity->height.HALF.HI += ((VaatiArm_HeapStruct*)this->myHeap)->s1[3].unk0c;
+ entity->z.HALF.HI += ((VaatiArm_HeapStruct*)this->myHeap)->s1[3].unk0c;
for (i = 0; i < 5; i++) {
((VaatiArm_HeapStruct*)this->myHeap)->entities[i]->hitType = 0x39;
}
@@ -1402,15 +1402,15 @@ void sub_08043EB8(Entity* this) {
pEVar4->spritePriority.b0 = 4;
pEVar4 = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3];
pEVar4->flags = pEVar4->flags & 0x7f;
- pEVar4->spriteSettings.b.draw = 1;
+ pEVar4->spriteSettings.draw = 1;
pEVar4->spritePriority.b0 = 4;
pEVar4 = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
pEVar4->flags = pEVar4->flags | 0x80;
- pEVar4->spriteSettings.b.draw = 1;
+ pEVar4->spriteSettings.draw = 1;
pEVar4->spritePriority.b0 = 4;
pEVar4->x.HALF.HI = (this->type2 == 0) ? gScreenTransition.field_0x44 : gScreenTransition.field_0x48;
pEVar4->y.HALF.HI = (this->type2 == 0) ? gScreenTransition.field_0x46 : gScreenTransition.field_0x4a;
- pEVar4->height.HALF.HI = 0;
+ pEVar4->z.HALF.HI = 0;
pEVar4->field_0x3c = pEVar4->field_0x3c & 0xef;
pEVar4->hitType = 0x3a;
pEVar4->hitbox = (Hitbox*)&gUnk_080FD450;
diff --git a/src/enemy/vaatiBall.c b/src/enemy/vaatiBall.c
index dca843d9..778af1a7 100644
--- a/src/enemy/vaatiBall.c
+++ b/src/enemy/vaatiBall.c
@@ -26,7 +26,7 @@ void VaatiBall(Entity* this) {
gUnk_080D1604[this->action](this);
if (this->cutsceneBeh.HALF.LO) {
- this->currentHealth = -1;
+ this->health = -1;
}
if (this->bitfield & 0x80) {
@@ -35,13 +35,13 @@ void VaatiBall(Entity* this) {
}
#ifdef EU
- if (this->currentHealth < 0xfa) {
+ if (this->health < 0xfa) {
#else
- if (this->currentHealth < 0xfd) {
+ if (this->health < 0xfd) {
#endif
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
COLLISION_OFF(this);
- this->currentHealth = -1;
+ this->health = -1;
parent->field_0x80.HALF.LO--;
CreateDust(this);
SoundReq(SFX_1C3);
@@ -63,17 +63,17 @@ void sub_0804468C(Entity* this) {
this->direction = (this->field_0x78.HALF.HI * 8) & 0x1f;
this->field_0x78.HALF.LO = 0;
this->field_0x82.HALF.HI = 0;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
off = &gUnk_080D1620[this->field_0x78.HALF.HI & 3];
PositionRelative(this->parent, this, off->h << 0x10, (off->v - 0x10) * 0x10000);
- this->height.HALF.HI = this->parent->height.HALF.HI;
+ this->z.HALF.HI = this->parent->z.HALF.HI;
InitAnimationForceUpdate(this, 0);
break;
case 1:
this->action = 3;
this->field_0x74.HALF.LO = 0;
this->field_0x82.HALF.HI = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 1);
break;
}
@@ -124,15 +124,15 @@ void sub_080447E0(Entity* this) {
this->hitType = 43;
sub_08044E74(this, 0);
if (this->flags & ENT_COLLIDE)
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
} else {
this->field_0x76.HALF.HI++;
this->field_0x76.HALF.HI &= 7;
if (this->flags & ENT_COLLIDE) {
if (this->field_0x76.HALF.HI & 1) {
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
} else {
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
}
@@ -156,7 +156,7 @@ void sub_08044868(Entity* this) {
if (this->field_0x82.HALF.HI) {
switch (this->field_0x74.HALF.LO) {
case 0:
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->field_0x74.HALF.LO = 1;
this->direction = sub_080045B4(this, vaati->x.HALF.HI, vaati->y.HALF.HI - 0x10);
this->speed = 0x180;
@@ -179,11 +179,11 @@ void sub_08044868(Entity* this) {
case 1:
if (this->field_0x82.HALF.HI == 0) {
this->field_0x82.HALF.HI++;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
}
sub_08044DEC(this);
if (*(u8*)&vaati->field_0x86 > 1) {
- u8 draw = this->spriteSettings.b.draw;
+ u8 draw = this->spriteSettings.draw;
if (draw == 1 && this->cutsceneBeh.HALF.LO == 0) {
vaati = CreateProjectileWithParent(this, 0x18, 0);
if (vaati) {
@@ -205,7 +205,7 @@ void sub_08044868(Entity* this) {
u8 draw;
sub_08044E74(this, 1);
- draw = this->spriteSettings.b.draw;
+ draw = this->spriteSettings.draw;
if (draw == 1) {
COLLISION_ON(this);
} else {
@@ -273,13 +273,13 @@ void sub_080449F8(Entity* this) {
u8 draw;
this->field_0x74.HALF.LO++;
- draw = this->spriteSettings.b.draw;
+ draw = this->spriteSettings.draw;
if (draw) {
vaati = CreateProjectileWithParent(this, 0x1c, 0);
if (vaati) {
vaati->y.HALF.HI += 4;
vaati->parent = this;
- this->attachedEntity = vaati;
+ this->child = vaati;
}
}
}
@@ -393,7 +393,7 @@ void sub_08044B04(Entity* this) {
COLLISION_OFF(this);
PositionRelative(vaati, this, 0, -0x100000);
if (this->field_0xf)
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
break;
case 1:
if (--this->actionDelay == 0) {
@@ -427,7 +427,7 @@ void sub_08044B04(Entity* this) {
u8 draw;
sub_08044E74(this, 1);
- draw = this->spriteSettings.b.draw;
+ draw = this->spriteSettings.draw;
if (draw == 1) {
COLLISION_ON(this);
} else {
@@ -447,10 +447,10 @@ void sub_08044DEC(Entity* this) {
u32 off;
if (this->parent->field_0x80.HALF.LO > this->field_0x78.HALF.HI) {
- this->spriteSettings.b.draw = 1;
- this->currentHealth = -1;
+ this->spriteSettings.draw = 1;
+ this->health = -1;
} else {
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
COLLISION_OFF(this);
this->field_0x78.HALF.LO = 0;
diff --git a/src/enemy/vaatiEyesMacro.c b/src/enemy/vaatiEyesMacro.c
index 86b5a739..5bc955dc 100644
--- a/src/enemy/vaatiEyesMacro.c
+++ b/src/enemy/vaatiEyesMacro.c
@@ -62,27 +62,27 @@ void VaatiEyesMacroFunction0(Entity* this) {
void VaatiEyesMacroFunction1(Entity* this) {
if (this->type == 0) {
- if (this->currentHealth == 0) {
+ if (this->health == 0) {
gScreenTransition.field_0x39 &= ~(1 << (gScreenTransition.field_0x3c + 2));
}
if (gRoomControls.roomID == 0) {
- gScreenTransition.field_0x3a = this->currentHealth;
+ gScreenTransition.field_0x3a = this->health;
} else {
- gScreenTransition.field_0x3b = this->currentHealth;
+ gScreenTransition.field_0x3b = this->health;
}
- if (this->field_0x78.HALF.HI != this->currentHealth) {
+ if (this->field_0x78.HALF.HI != this->health) {
EnqueueSFX(SFX_17A);
}
- this->field_0x78.HALF.HI = this->currentHealth;
+ this->field_0x78.HALF.HI = this->health;
} else {
if (this->type == 1) {
if (0 < this->iframes) {
this->iframes *= -1;
}
- if (this->currentHealth != 0xff) {
+ if (this->health != 0xff) {
EnqueueSFX(SFX_BUTTON_DEPRESS);
}
- this->currentHealth = 0xff;
+ this->health = 0xff;
}
}
if (this->field_0x43 != 0) {
@@ -108,9 +108,9 @@ void VaatiEyesMacroFunction0Type0Action0(Entity* this) {
enemy->parent = this;
this->action = 1;
if (gRoomControls.roomID == 0) {
- this->field_0x78.HALF.HI = this->currentHealth = gScreenTransition.field_0x3a;
+ this->field_0x78.HALF.HI = this->health = gScreenTransition.field_0x3a;
} else {
- this->field_0x78.HALF.HI = this->currentHealth = gScreenTransition.field_0x3b;
+ this->field_0x78.HALF.HI = this->health = gScreenTransition.field_0x3b;
}
this->field_0x78.HALF.LO = Random();
sub_0802EFB8(this);
@@ -147,7 +147,7 @@ void VaatiEyesMacroFunction0Type1Action0(Entity* this) {
void VaatiEyesMacroFunction0Type1Action1(Entity* this) {
if (this->parent->next == NULL) {
COLLISION_OFF(this);
- this->currentHealth = 0;
+ this->health = 0;
} else {
sub_0802F04C(this);
GetNextFrame(this);
@@ -192,7 +192,7 @@ void VaatiEyesMacroFunction0Type3(Entity* this) {
this->spritePriority.b0 = 6;
}
CopyPositionAndSpriteOffset(this->parent, this);
- this->height.HALF.HI = 0;
+ this->z.HALF.HI = 0;
}
void sub_0802EF58(Entity* this) {
@@ -212,7 +212,7 @@ void sub_0802EF58(Entity* this) {
}
void sub_0802EF90(Entity* this) {
- this->height.HALF.HI = gUnk_080CDE90[this->field_0x78.HALF.LO++ >> 3 & 7];
+ this->z.HALF.HI = gUnk_080CDE90[this->field_0x78.HALF.LO++ >> 3 & 7];
}
void sub_0802EFB8(Entity* this) {
diff --git a/src/enemy/vaatiProjectile.c b/src/enemy/vaatiProjectile.c
index f86fb5ab..c1cf9435 100644
--- a/src/enemy/vaatiProjectile.c
+++ b/src/enemy/vaatiProjectile.c
@@ -43,7 +43,7 @@ void (*const vaatiProjectileFunction0Actions[])(Entity*) = {
void VaatiProjectile(Entity* this) {
if (sub_0803E4A0(this)) {
COLLISION_OFF(this);
- this->currentHealth = 0;
+ this->health = 0;
this->parent = NULL;
}
vaatiProjectileFunctions[GetNextFunction(this)](this);
@@ -58,7 +58,7 @@ void VaatiProjectileFunction1(Entity* this) {
if (this->bitfield == 0x80) {
#ifndef EU
- if (this->currentHealth != 0) {
+ if (this->health != 0) {
#endif
this->action = 5;
COLLISION_OFF(this);
@@ -101,13 +101,13 @@ void VaatiProjectileFunction0Action0(Entity* this) {
entity = CreateEnemy(VAATI_PROJECTILE, 1);
if (entity != NULL) {
entity->parent = this;
- this->attachedEntity = entity;
+ this->child = entity;
if (this->type2 == 0) {
this->action = 1;
- this->height.HALF.HI = -0x18;
+ this->z.HALF.HI = -0x18;
} else {
this->action = 9;
- this->height.HALF.HI = -0x80;
+ this->z.HALF.HI = -0x80;
this->flags2 = 1;
}
InitializeAnimation(this, 0);
@@ -129,7 +129,7 @@ void VaatiProjectileFunction0Action1(Entity* this) {
if (PlayerInRange(this, 0, 8) != 0) {
this->action = 2;
this->actionDelay = 10;
- InitializeAnimation(this->attachedEntity, 2);
+ InitializeAnimation(this->child, 2);
} else {
if (gUnk_020000B0 != NULL) {
sub_08004596(this, GetFacingDirection(this, gUnk_020000B0));
@@ -143,7 +143,7 @@ void VaatiProjectileFunction0Action2(Entity* this) {
if (this->actionDelay != 0) {
this->actionDelay--;
} else {
- if (++this->height.HALF.HI == 0) {
+ if (++this->z.HALF.HI == 0) {
this->action = 3;
}
}
@@ -151,11 +151,11 @@ void VaatiProjectileFunction0Action2(Entity* this) {
}
void VaatiProjectileFunction0Action3(Entity* this) {
- if ((this->attachedEntity->frames.b.f3) != 0) {
- if (--this->height.HALF.HI <= -0x18) {
+ if (this->child->frame & 0x80) {
+ if (--this->z.HALF.HI <= -0x18) {
this->action = 4;
this->actionDelay = (Random() & 0xf) + 0xf;
- InitializeAnimation(this->attachedEntity, 1);
+ InitializeAnimation(this->child, 1);
}
GetNextFrame(this);
}
@@ -174,7 +174,7 @@ void VaatiProjectileFunction0Action5(Entity* this) {
if (this->actionDelay != 0) {
this->actionDelay--;
} else {
- if (-0x18 < --this->height.HALF.HI) {
+ if (-0x18 < --this->z.HALF.HI) {
return;
}
this->action = 6;
@@ -212,14 +212,14 @@ void VaatiProjectileFunction0Action8(Entity* this) {
void VaatiProjectileFunction0Action9(Entity* this) {
this->x.HALF.HI = gPlayerEntity.x.HALF.HI;
this->y.HALF.HI = gPlayerEntity.y.HALF.HI;
- if (this->height.HALF.HI < -8) {
+ if (this->z.HALF.HI < -8) {
if (this->animIndex != 2) {
this->actionDelay = 0;
- InitializeAnimation(this->attachedEntity, 2);
+ InitializeAnimation(this->child, 2);
}
VaatiProjectileFunction0Action2(this);
} else {
- this->height.HALF.HI += 8;
+ this->z.HALF.HI += 8;
}
}
@@ -257,7 +257,7 @@ bool32 sub_0803E4A0(Entity* this) {
if (this->parent == NULL) {
return FALSE;
}
- if (this->parent->currentHealth == 0) {
+ if (this->parent->health == 0) {
return TRUE;
} else {
ret = this->parent->next == NULL;
diff --git a/src/enemy/vaatiRebornEnemy.c b/src/enemy/vaatiRebornEnemy.c
index 85c39122..d1a2e4c8 100644
--- a/src/enemy/vaatiRebornEnemy.c
+++ b/src/enemy/vaatiRebornEnemy.c
@@ -104,10 +104,10 @@ void VaatiRebornEnemyType0Action0(Entity* this) {
this->field_0x74.HALF.LO = -1;
this->actionDelay = 0;
this->field_0x76.HALF.LO = 0;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->direction = 0xff;
this->spritePriority.b0 = 4;
- this->height.WORD = 0;
+ this->z.WORD = 0;
this->field_0x80.HALF.LO = 2;
this->field_0x86.HALF.LO = 0;
this->cutsceneBeh.HALF.HI = 0x30;
@@ -119,7 +119,7 @@ void VaatiRebornEnemyType0Action0(Entity* this) {
this->field_0x7c = this->y;
entity = CreateEnemy(VAATI_REBORN_ENEMY, 1);
entity->parent = this;
- this->attachedEntity = entity;
+ this->child = entity;
for (i = 0; i < 6; i++) {
entity = CreateEnemy(VAATI_BALL, 0);
entity->parent = this;
@@ -133,7 +133,7 @@ void VaatiRebornEnemyType0Action0(Entity* this) {
for (i = 0; i < 2; i++) {
entity = CreateEnemy(VAATI_BALL, 1);
entity->parent = this;
- entity->spriteSettings.b.flipX = i;
+ entity->spriteSettings.flipX = i;
ptr = &gUnk_080D04A8[i];
PositionRelative(this, entity, ptr->x << 0x10, ptr->y << 0x10);
}
@@ -145,7 +145,7 @@ void VaatiRebornEnemyType0Action1(Entity* this) {
if (this->actionDelay != 0) {
if (--this->actionDelay == 0) {
if ((this->field_0x74.HALF.LO & 0x70) == 0) {
- if (this->attachedEntity->actionDelay == 0) {
+ if (this->child->actionDelay == 0) {
sub_0803DD78(this);
if (this->field_0x74.HALF.HI != 0) {
this->action = 2;
@@ -168,7 +168,7 @@ void VaatiRebornEnemyType0Action1(Entity* this) {
this->field_0x74.HALF.LO = 0;
this->actionDelay = 0xc0;
this->direction = 0xff;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 0);
}
}
@@ -205,7 +205,7 @@ void VaatiRebornEnemyType0Action1(Entity* this) {
break;
}
}
- if (this->attachedEntity->actionDelay == 0) {
+ if (this->child->actionDelay == 0) {
this->cutsceneBeh.HALF.HI++;
if ((this->cutsceneBeh.HALF.HI & 3) == 0) {
switch (this->cutsceneBeh.HALF.HI & 0x30) {
@@ -237,9 +237,9 @@ void VaatiRebornEnemyType0Action2(Entity* this) {
}
break;
case 1:
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->field_0x74.HALF.LO = 2;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->actionDelay = 0x10;
}
break;
@@ -255,15 +255,15 @@ void VaatiRebornEnemyType0Action2(Entity* this) {
this->x.HALF.HI = gRoomControls.roomOriginX + ptr->HALF.x + 0x10;
this->y.HALF.HI = gRoomControls.roomOriginY + ptr->HALF.y + 0x10;
}
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->actionDelay = 0x20;
InitAnimationForceUpdate(this, 4);
SoundReq(SFX_F5);
}
break;
case 3:
- if ((this->frames.all & 0x80) != 0) {
- this->spriteSettings.b.draw = 1;
+ if ((this->frame & 0x80) != 0) {
+ this->spriteSettings.draw = 1;
if (4 < this->field_0x80.HALF.HI) {
this->x.HALF.HI = gPlayerEntity.x.HALF.HI;
this->y.HALF.HI = gPlayerEntity.y.HALF.HI - 0x18;
@@ -291,8 +291,8 @@ void VaatiRebornEnemyType0Action3(Entity* this) {
this->actionDelay = 1;
break;
case 0xff:
- if (this->height.HALF.HI != -4) {
- this->height.WORD -= 0x2000;
+ if (this->z.HALF.HI != -4) {
+ this->z.WORD -= 0x2000;
}
if (this->actionDelay == 2) {
this->field_0x74.HALF.LO = 0xfe;
@@ -320,7 +320,7 @@ void VaatiRebornEnemyType0Action3(Entity* this) {
}
break;
case 2:
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->field_0x74.HALF.LO = 3;
InitAnimationForceUpdate(this, 0);
}
@@ -345,8 +345,8 @@ void VaatiRebornEnemyType0Action4(Entity* this) {
this->direction = (this->direction + 0x10) & 0x1f;
InitAnimationForceUpdate(this, 0);
} else {
- if ((this->frames.all & 0x10) != 0) {
- this->frames.all &= 0xef;
+ if ((this->frame & 0x10) != 0) {
+ this->frame &= 0xef;
if (this->cutsceneBeh.HALF.LO == 0xff) {
index = Direction8RoundUp(GetFacingDirection(this, &gPlayerEntity));
this->cutsceneBeh.HALF.LO = gUnk_080D04C0[index >> 2];
@@ -356,7 +356,7 @@ void VaatiRebornEnemyType0Action4(Entity* this) {
(entity = CreateProjectileWithParent(this, 0x1a, this->cutsceneBeh.HALF.LO), entity != NULL)) {
entity->field_0xf = this->field_0xf;
entity->parent = this;
- entity->height.HALF.HI = this->height.HALF.HI;
+ entity->z.HALF.HI = this->z.HALF.HI;
this->field_0xf = this->field_0xf + 1;
}
}
@@ -383,7 +383,7 @@ void VaatiRebornEnemyType0Action5(Entity* this) {
}
break;
case 1:
- if ((this->frames.all & 0x10) != 0) {
+ if ((this->frame & 0x10) != 0) {
this->field_0x74.HALF.LO = 2;
this->field_0xf = (Random() & 0x3f) + 0x40;
SoundReq(SFX_SUMMON);
@@ -503,7 +503,7 @@ void VaatiRebornEnemyType1Action0(Entity* this) {
PositionRelative(this->parent, this, 0, 0x10000);
enemy = CreateEnemy(VAATI_REBORN_ENEMY, 2);
enemy->parent = this;
- enemy->attachedEntity = this->parent;
+ enemy->child = this->parent;
InitAnimationForceUpdate(this, this->field_0x74.HALF.LO);
}
@@ -527,7 +527,7 @@ void VaatiRebornEnemyType1Action1(Entity* this) {
parent->iframes = this->iframes;
parent->bitfield = this->bitfield;
}
- if ((this->frames.all & 0x40) != 0) {
+ if ((this->frame & 0x40) != 0) {
InitAnimationForceUpdate(this, 2);
}
}
@@ -544,7 +544,7 @@ void VaatiRebornEnemyType1Action1(Entity* this) {
COLLISION_OFF(this);
}
}
- this->spriteSettings.b.draw = parent->spriteSettings.b.draw;
+ this->spriteSettings.draw = parent->spriteSettings.draw;
this->spriteOffsetX = parent->spriteOffsetX;
PositionRelative(this->parent, this, 0, 0x10000);
UpdateAnimationSingleFrame(this);
@@ -593,7 +593,7 @@ void VaatiRebornEnemyType2Action1(Entity* this) {
InitAnimationForceUpdate(this, 2);
}
}
- this->spriteSettings.b.draw = parent->spriteSettings.b.draw;
+ this->spriteSettings.draw = parent->spriteSettings.draw;
this->spriteOffsetX = parent->spriteOffsetX;
PositionRelative(parent->parent, this, 0, 0x20000);
UpdateAnimationSingleFrame(this);
@@ -635,7 +635,7 @@ void sub_0803DC0C(Entity* this) {
parent = this->parent;
tmp = &gUnk_080D04C8[this->actionDelay];
- this->spriteSettings.b.draw = parent->spriteSettings.b.draw;
+ this->spriteSettings.draw = parent->spriteSettings.draw;
this->spriteOffsetX = parent->spriteOffsetX;
PositionRelative(parent, this, tmp->x << 0x10, (tmp->y + 1) * 0x10000);
UpdateAnimationSingleFrame(this);
@@ -650,7 +650,7 @@ void VaatiRebornEnemyType1PreAction(Entity* this) {
parent = this->parent;
this->field_0x76.HALF.HI = 0;
if ((this->bitfield & 0x80) != 0) {
- if (gUnk_080D04D0[parent->field_0x86.HALF.LO] > this->currentHealth) {
+ if (gUnk_080D04D0[parent->field_0x86.HALF.LO] > this->health) {
if (2 < ++parent->field_0x86.HALF.LO) {
COLLISION_OFF(this);
parent->action = 7;
@@ -681,7 +681,7 @@ void VaatiRebornEnemyType1PreAction(Entity* this) {
parent->field_0x74.HALF.LO = 0xf0;
} else {
parent->field_0x74.HALF.LO = 0x70;
- this->currentHealth = 0xff;
+ this->health = 0xff;
}
parent->action = 1;
parent->actionDelay = 1;
diff --git a/src/enemy/vaatiTransfigured.c b/src/enemy/vaatiTransfigured.c
index 0933b1eb..c00649a5 100644
--- a/src/enemy/vaatiTransfigured.c
+++ b/src/enemy/vaatiTransfigured.c
@@ -136,7 +136,7 @@ void VaatiTransfiguredType0Action0(Entity* this) {
sub_0804A720(this);
if ((CheckRoomFlag(0) != 0) && (gEntCount < 0x51)) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spritePriority.b0 = 5;
this->field_0x6c.HALF.HI |= 1;
this->direction = (Random() & 0x17) + 4;
@@ -210,7 +210,7 @@ void VaatiTransfiguredType0Action1(Entity* this) {
break;
case 3:
if (--this->actionDelay == 0) {
- this->height.HALF.HI = 0;
+ this->z.HALF.HI = 0;
this->field_0x80.HALF.LO = 0;
this->actionDelay = gUnk_080D0ABF[(u32)this->animationState * 2];
switch (sub_08040934(this)) {
@@ -279,7 +279,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
this->hitType = 0x35;
this->spriteOffsetX = 0;
}
- if (this->currentHealth < gUnk_080D0ABC[this->animationState]) {
+ if (this->health < gUnk_080D0ABC[this->animationState]) {
tmp = 1;
this->actionDelay = 1;
} else {
@@ -300,7 +300,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
}
break;
case 2:
- this->attachedEntity->field_0x74.HALF.LO = 0x10;
+ this->child->field_0x74.HALF.LO = 0x10;
if (this->actionDelay) {
this->field_0x80.HALF.LO = 3;
this->actionDelay = 0x40;
@@ -313,7 +313,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
if (this->actionDelay != 0) {
if (--this->actionDelay == 0) {
COLLISION_OFF(this);
- this->hVelocity = 0x38000;
+ this->zVelocity = 0x38000;
this->field_0xf = 0x10;
}
break;
@@ -322,7 +322,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
this->field_0x80.HALF.LO = 5;
this->actionDelay = 0x10;
COLLISION_ON(this);
- this->currentHealth = 0xff;
+ this->health = 0xff;
this->field_0x86.HALF.LO = 0;
sub_080408EC(this);
SoundReq(SFX_14C);
@@ -379,7 +379,7 @@ void VaatiTransfiguredType0Action4(Entity* this) {
this->field_0x74.HALF.LO = 0;
this->actionDelay = 0x80;
this->field_0xf = 0;
- this->hVelocity = 0x24000;
+ this->zVelocity = 0x24000;
SoundReq(SFX_12B);
}
break;
@@ -424,7 +424,7 @@ void VaatiTransfiguredType0Action4(Entity* this) {
if (--this->actionDelay == 0) {
this->action = 1;
this->field_0x80.HALF.LO = 0;
- this->height.HALF.HI = 0;
+ this->z.HALF.HI = 0;
sub_08040670(this);
} else {
sub_08040AD4(this);
@@ -557,8 +557,8 @@ void VaatiTransfiguredType0Action7(Entity* this) {
} else {
if (this->field_0xf != 0) {
if (--this->field_0xf == 0) {
- this->currentHealth = 0;
- this->spriteSettings.b.draw = 0;
+ this->health = 0;
+ this->spriteSettings.draw = 0;
}
} else {
sub_0804A7D4(this);
@@ -594,7 +594,7 @@ void VaatiTransfiguredType1Action1(Entity* this) {
Entity* parent;
parent = this->parent;
- if (parent->currentHealth == 0) {
+ if (parent->health == 0) {
this->field_0x6c.HALF.HI |= 2;
DeleteThisEntity();
}
@@ -617,7 +617,7 @@ void VaatiTransfiguredType1Action1(Entity* this) {
}
}
if (parent->action != 3) {
- this->height.HALF.HI = parent->height.HALF.HI;
+ this->z.HALF.HI = parent->z.HALF.HI;
}
}
@@ -645,7 +645,7 @@ void VaatiTransfiguredType2Action1(Entity* this) {
const xy* t;
- if (this->parent->currentHealth == 0) {
+ if (this->parent->health == 0) {
this->field_0x6c.HALF.HI |= 2;
DeleteThisEntity();
}
@@ -659,7 +659,7 @@ void VaatiTransfiguredType2Action1(Entity* this) {
case 1:
if (this->parent->frameIndex != 2) {
this->action = 2;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
break;
case 0:
@@ -674,7 +674,7 @@ void VaatiTransfiguredType2Action1(Entity* this) {
}
break;
case 1:
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->field_0x74.HALF.LO = 0;
this->field_0xf = (Random() & 0x7f) + 0x17;
InitAnimationForceUpdate(this, 0);
@@ -698,14 +698,14 @@ void VaatiTransfiguredType2Action1(Entity* this) {
}
void VaatiTransfiguredType2Action2(Entity* this) {
- if (this->parent->currentHealth == 0) {
+ if (this->parent->health == 0) {
this->field_0x6c.HALF.HI |= 2;
DeleteThisEntity();
}
CopyPosition(this->parent, this);
if (this->parent->frameIndex == 2) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
}
}
@@ -716,7 +716,7 @@ void VaatiTransfiguredType3Action0(Entity* this) {
}
void VaatiTransfiguredType3Action1(Entity* this) {
- if (this->parent->currentHealth == 0) {
+ if (this->parent->health == 0) {
this->field_0x6c.HALF.HI |= 2;
DeleteThisEntity();
}
@@ -728,25 +728,25 @@ void VaatiTransfiguredType4Action0(Entity* this) {
this->action = 1;
this->field_0x80.HALF.LO = 0;
this->actionDelay = 10;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->spritePriority.b0 = 7;
InitializeAnimation(this, 0);
}
void VaatiTransfiguredType4Action1(Entity* this) {
- if (this->parent->currentHealth == 0) {
+ if (this->parent->health == 0) {
this->field_0x6c.HALF.HI |= 2;
DeleteThisEntity();
}
if (this->parent->action != 5) {
if (this->field_0x80.HALF.LO != 0) {
this->field_0x80.HALF.LO = 0;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
} else {
if (this->field_0x80.HALF.LO == 0) {
this->field_0x80.HALF.LO += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
}
if (--this->actionDelay == 0) {
this->actionDelay = 10;
@@ -765,13 +765,13 @@ void VaatiTransfiguredType5Action0(Entity* this) {
InitializeAnimation(this, 2);
} else {
this->action = 1;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->spritePriority.b0 = 4;
}
}
void VaatiTransfiguredType5Action1(Entity* this) {
- if (this->parent->currentHealth == 0) {
+ if (this->parent->health == 0) {
this->field_0x6c.HALF.HI |= 2;
DeleteThisEntity();
}
@@ -781,16 +781,16 @@ void VaatiTransfiguredType5Action1(Entity* this) {
return;
}
this->field_0x80.HALF.LO += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 1);
break;
case 1:
if (this->parent->action != 6) {
this->field_0x80.HALF.LO = 0;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
} else {
- if (this->frames.b.f3 != 0) {
- this->frames.b.f3 = 0;
+ if (this->frame & 0x80) {
+ this->frame &= ~0x80;
if (gEntCount < 0x47) {
sub_08040648(this, this->type, 1);
}
@@ -807,19 +807,19 @@ void VaatiTransfiguredType5Action1(Entity* this) {
}
void VaatiTransfiguredType5Action2(Entity* this) {
- if (this->parent->currentHealth == 0) {
+ if (this->parent->health == 0) {
this->field_0x6c.HALF.HI |= 2;
DeleteThisEntity();
}
if (this->field_0x80.HALF.LO == 0) {
if (this->parent->parent->action != 6) {
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->field_0x80.HALF.LO += 1;
InitializeAnimation(this, 3);
}
}
} else {
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
DeleteThisEntity();
}
}
@@ -835,7 +835,7 @@ void sub_08040648(Entity* this, u32 type, u32 type2) {
enemy->parent = this;
CopyPosition(this, enemy);
if ((type == 2) && (type2 == 0)) {
- this->attachedEntity = enemy;
+ this->child = enemy;
}
}
@@ -1061,7 +1061,7 @@ void sub_080409B0(Entity* this) {
this->field_0x80.HALF.HI = 3;
COLLISION_OFF(this);
this->hitType = 0x36;
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
SoundReq(SFX_164);
}
}
@@ -1078,7 +1078,7 @@ void sub_080409B0(Entity* this) {
SoundReq(SFX_BOSS_HIT);
}
if ((this->bitfield == 0x8a) && (gPlayerState.field_0xa0[0] == 5)) {
- this->currentHealth = 0xc0;
+ this->health = 0xc0;
}
}
}
diff --git a/src/enemy/vaatiTransfiguredEye.c b/src/enemy/vaatiTransfiguredEye.c
index a6777666..05132764 100644
--- a/src/enemy/vaatiTransfiguredEye.c
+++ b/src/enemy/vaatiTransfiguredEye.c
@@ -69,8 +69,8 @@ void VaatiTransfiguredEyeFunction1(Entity* this) {
SoundReq(SFX_ITEM_GLOVES_KNOCKBACK);
}
} else {
- if (this->currentHealth != 0xff) {
- this->currentHealth = 0xff;
+ if (this->health != 0xff) {
+ this->health = 0xff;
if (this->actionDelay != 0 && (pEVar4->field_0x80.HALF.HI != 0)) {
pEVar4->field_0x76.HALF.LO |= (1 << this->type2);
if (this->cutsceneBeh.HALF.HI == 0) {
@@ -96,7 +96,7 @@ void VaatiTransfiguredEyeFunction0Action0(Entity* this) {
bVar2 = gMessage.doTextBox & 0x7f;
if ((gMessage.doTextBox & 0x7f) == 0) {
this->action = 1;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->field_0x80.HALF.LO = bVar2;
this->field_0x80.HALF.HI = bVar2;
this->cutsceneBeh.HALF.HI = bVar2;
@@ -108,7 +108,7 @@ void VaatiTransfiguredEyeFunction0Action0(Entity* this) {
child = CreateEnemy(VAATI_TRANSFIGURED_EYE, 1);
if (child != NULL) {
child->parent = this;
- this->attachedEntity = child;
+ this->child = child;
child->actionDelay = this->actionDelay;
child->type2 = this->type2;
CopyPosition(this, child);
@@ -123,7 +123,7 @@ void VaatiTransfiguredEyeFunction0Action0(Entity* this) {
void VaatiTransfiguredEyeFunction0Action1(Entity* this) {
sub_08045A28(this);
if (this->field_0x82.HALF.LO == 0) {
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
if (this->type != 0) {
COLLISION_ON(this);
}
@@ -132,7 +132,7 @@ void VaatiTransfiguredEyeFunction0Action1(Entity* this) {
}
} else {
if (--this->field_0x82.HALF.LO == 0) {
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
}
}
}
@@ -163,7 +163,7 @@ void VaatiTransfiguredEyeFunction0Action2(Entity* this) {
void VaatiTransfiguredEyeFunction0Action3(Entity* this) {
sub_08045A28(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 2;
if (this->type != 0) {
if (this->actionDelay == 0) {
@@ -181,7 +181,7 @@ void VaatiTransfiguredEyeFunction0Action4(Entity* this) {
sub_08045A28(this);
if (this->field_0xf == 0) {
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->field_0xf = 0x20;
}
} else {
@@ -219,7 +219,7 @@ void sub_08045A28(Entity* this) {
if (this->field_0x82.HALF.LO == 0) {
GetNextFrame(this);
}
- frames = this->frames.all & 0x70;
+ frames = this->frame & 0x70;
type = this->type;
if (type == 0) {
sub_08045A00(this);
@@ -288,7 +288,7 @@ void sub_08045A28(Entity* this) {
PositionRelative(this->parent, this, 0, -0x10000);
switch (this->field_0x82.HALF.HI) {
case 0:
- switch (this->frames.all & 0x70) {
+ switch (this->frame & 0x70) {
case 0x10:
this->field_0x82.HALF.HI = 2;
sub_0801D2B4(this, 0x13b);
@@ -302,7 +302,7 @@ void sub_08045A28(Entity* this) {
}
break;
case 1: {
- u32 temp = this->frames.all & 0x70;
+ u32 temp = this->frame & 0x70;
switch (temp) {
case 0:
this->field_0x82.HALF.HI = temp;
@@ -317,9 +317,9 @@ void sub_08045A28(Entity* this) {
}
} break;
case 2:
- switch (this->frames.all & 0x70) {
+ switch (this->frame & 0x70) {
case 0:
- this->field_0x82.HALF.HI = this->frames.all & 0x70;
+ this->field_0x82.HALF.HI = this->frame & 0x70;
sub_0801D2B4(this, 0x13f);
break;
default:
diff --git a/src/enemy/vaatiWrath.c b/src/enemy/vaatiWrath.c
index 23063fc3..87acecc2 100644
--- a/src/enemy/vaatiWrath.c
+++ b/src/enemy/vaatiWrath.c
@@ -103,9 +103,9 @@ const s8 gUnk_080D0EB0[] = { 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x0
0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd };
void VaatiWrath(Entity* this) {
- if (((this->type == 0) && ((this->bitfield & 0x80) != 0)) && (this->currentHealth == 0)) {
+ if (((this->type == 0) && ((this->bitfield & 0x80) != 0)) && (this->health == 0)) {
COLLISION_ON(this);
- this->currentHealth = 0xff;
+ this->health = 0xff;
if (--this->cutsceneBeh.HALF.LO == 0) {
this->action = 0xd;
this->subAction = 0;
@@ -149,11 +149,11 @@ void VaatiWrathType0Action0(Entity* this) {
this->subAction = bVar1;
this->actionDelay = 120;
this->spritePriority.b1 = 0;
- this->height.HALF.HI = 0xffb0;
+ this->z.HALF.HI = 0xffb0;
gRoomControls.cameraTarget = this;
sub_080809D4();
}
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x6c.HALF.HI |= 1;
this->field_0x78.HALF.HI = 0;
this->field_0x7c.HALF.LO = 0x3c;
@@ -169,11 +169,11 @@ void VaatiWrathType0Action1(Entity* this) {
break;
case 1:
this->spritePriority.b1 = 1;
- this->height.WORD += 0x8000;
- if ((this->height.HALF.HI & 0x3f) == 0) {
+ this->z.WORD += 0x8000;
+ if ((this->z.HALF.HI & 0x3f) == 0) {
SoundReq(SFX_1A9);
}
- if (-6 < this->height.HALF.HI) {
+ if (-6 < this->z.HALF.HI) {
this->subAction = 2;
SoundReq(SFX_1A9);
}
@@ -354,20 +354,20 @@ void VaatiWrathType0Action6(Entity* this) {
if (this->actionDelay == 0) {
type1 = ((VaatiWrathHeapStruct*)this->myHeap)->type1;
GetNextFrame(type1);
- if (type1->frames.all == 1) {
- type1->frames.all &= 0xfe;
+ if (type1->frame == 1) {
+ type1->frame &= 0xfe;
InitAnimationForceUpdate(this, 4);
} else {
- if (type1->frames.all == 2) {
+ if (type1->frame == 2) {
Entity* type3 = CreateEnemy(VAATI_WRATH, 3);
if (type3 != NULL) {
type3->myHeap = this->myHeap;
((VaatiWrathHeapStruct*)this->myHeap)->type3 = type3;
InitializeAnimation(((VaatiWrathHeapStruct*)this->myHeap)->type2, 0x14);
- type1->frames.all &= 0xfd;
+ type1->frame &= 0xfd;
}
} else {
- if ((type1->frames.all & 0x80) != 0) {
+ if ((type1->frame & 0x80) != 0) {
sub_0804235C(this);
}
}
@@ -456,7 +456,7 @@ void VaatiWrathType0ActionA(Entity* this) {
this->subAction = 0;
this->direction = 0;
this->speed = 0x100;
- this->hVelocity = 0x12000;
+ this->zVelocity = 0x12000;
sub_0801D2B4(this, 0x16b);
InitAnimationForceUpdate(this, 5);
type1 = ((VaatiWrathHeapStruct*)this->myHeap)->type1;
@@ -479,7 +479,7 @@ void VaatiWrathType0ActionB(Entity* this) {
if (sub_08003FC4(this, 0x2000) == 0) {
this->subAction = 1;
this->actionDelay = 0xf0;
- this->currentHealth = 8;
+ this->health = 8;
this->hitType = 0x38;
sub_08080964(0x14, 0);
InitAnimationForceUpdate(this, 6);
@@ -493,7 +493,7 @@ void VaatiWrathType0ActionB(Entity* this) {
this->subAction = 2;
this->actionDelay = 0x3c;
this->hitType = 0x39;
- this->currentHealth = 0xff;
+ this->health = 0xff;
}
break;
default:
@@ -520,8 +520,8 @@ void VaatiWrathType0ActionC(Entity* this) {
}
switch (this->subAction) {
case 0:
- this->height.WORD -= 0x8000;
- if (this->height.HALF.HI < -4) {
+ this->z.WORD -= 0x8000;
+ if (this->z.HALF.HI < -4) {
this->subAction = 1;
this->actionDelay = 120;
this->direction = 0x10;
@@ -545,11 +545,11 @@ void VaatiWrathType0ActionC(Entity* this) {
default:
sub_08042004(this);
entity = ((VaatiWrathHeapStruct*)this->myHeap)->type1;
- if (entity->frames.b.f0) {
- entity->frames.all &= 0xfe;
+ if (entity->frame & 1) {
+ entity->frame &= 0xfe;
InitAnimationForceUpdate(this, 9);
} else {
- if (entity->frames.b.f3 != 0) {
+ if (entity->frame & 0x80) {
sub_0804235C(this);
}
}
@@ -620,7 +620,7 @@ void sub_08041BE8(Entity* this) {
void sub_08041CD0(Entity* this) {
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2);
- if (this->frames.b.f3) {
+ if (this->frame & 0x80) {
if (this->actionDelay != 0) {
this->actionDelay--;
} else {
@@ -644,13 +644,13 @@ void sub_08041D14(Entity* this) {
if (gEntCount < 0x46) {
pEVar1 = CreateObject(OBJECT_B6, 0, 0);
pEVar1->parent = this;
- this->attachedEntity = pEVar1;
+ this->child = pEVar1;
pEVar1 = CreateObject(OBJECT_B6, 1, 0);
pEVar1->parent = this;
this->subAction = 3;
this->actionDelay = 0x96;
this->field_0xf = 0;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
SoundReq(SFX_1C4);
}
}
@@ -666,14 +666,14 @@ void sub_08041D84(Entity* this) {
if ((0xb7 < this->field_0xf) && ((this->field_0xf & 7) == 0)) {
sub_0801D2B4(((VaatiWrathHeapStruct*)this->myHeap)->type2,
gUnk_080D0E80[(this->field_0xf - 0xb8) >> 3]);
- sub_0801D2B4(this->attachedEntity, gUnk_080D0E80[(this->field_0xf - 0xb8) >> 3]);
+ sub_0801D2B4(this->child, gUnk_080D0E80[(this->field_0xf - 0xb8) >> 3]);
}
if (this->field_0xf == 0xe6) {
DoFade(7, 4);
}
} else {
this->subAction = 4;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0801D2B4(this, 0x173);
InitAnimationForceUpdate(this, 0xb);
}
@@ -802,7 +802,7 @@ u32 sub_08041FCC(Entity* this) {
}
void sub_08042004(Entity* this) {
- this->height.HALF.HI = gUnk_080D0EA0[(++this->field_0x78.HALF.LO >> 4) & 7];
+ this->z.HALF.HI = gUnk_080D0EA0[(++this->field_0x78.HALF.LO >> 4) & 7];
}
void sub_08042028(Entity* this) {
@@ -955,19 +955,19 @@ u32 sub_080422C0(Entity* this, u32 unk1) {
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2);
type1 = ((VaatiWrathHeapStruct*)this->myHeap)->type1;
GetNextFrame(type1);
- if (unk1 + 1 == (tmp = type1->frames.all)) {
+ if (unk1 + 1 == (tmp = type1->frame)) {
child = CreateProjectile(0x21);
if (child != NULL) {
child->type = unk1;
child->parent = this;
- type1->frames.all &= ~tmp;
+ type1->frame &= ~tmp;
}
} else {
- if (type1->frames.all == 4) {
- type1->frames.all &= 0xfb;
+ if (type1->frame == 4) {
+ type1->frame &= 0xfb;
InitAnimationForceUpdate(this, 3);
} else {
- if ((type1->frames.b.f3) != 0) {
+ if (type1->frame & 0x80) {
InitAnimationForceUpdate(this, 0);
type1->subAction = 0;
InitializeAnimation(type1, 0xc);
@@ -1009,7 +1009,7 @@ void VaatiWrathType0PreAction(Entity* this) {
if (temp >= 0) {
if (gPlayerState.field_0x2c == NULL) {
if (gPlayerEntity.field_0x7a.HWORD == 0) {
- if ((gPlayerEntity.height.HALF.HI & 0x8000U) == 0 || (gPlayerState.field_0xa != 0)) {
+ if ((gPlayerEntity.z.HALF.HI & 0x8000U) == 0 || (gPlayerState.field_0xa != 0)) {
sub_08078AA8(0xb70, 0);
gScreenTransition.field_0x38 |= 2;
}
diff --git a/src/enemy/vaatiWrathEye.c b/src/enemy/vaatiWrathEye.c
index f33e4009..d476ca6c 100644
--- a/src/enemy/vaatiWrathEye.c
+++ b/src/enemy/vaatiWrathEye.c
@@ -52,7 +52,7 @@ void VaatiWrathEyeAction0(Entity* this) {
void VaatiWrathEyeAction1(Entity* this) {
sub_080485D8(this);
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 2;
InitializeAnimation(this, 1);
}
@@ -85,7 +85,7 @@ void VaatiWrathEyeAction3(Entity* this) {
direction = sub_080045D4(this->x.HALF.HI, this->y.HALF.HI, x, y);
this->direction = direction;
sub_0806F69C(this);
- this->height.HALF.HI = this->parent->height.HALF.HI;
+ this->z.HALF.HI = this->parent->z.HALF.HI;
if ((this->x.HALF.HI == x) && (this->y.HALF.HI == y)) {
this->action = 4;
this->actionDelay = 0x3c;
@@ -101,7 +101,7 @@ void VaatiWrathEyeAction4(Entity* this) {
}
} else {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 5;
this->actionDelay = 0;
}
@@ -111,12 +111,12 @@ void VaatiWrathEyeAction4(Entity* this) {
void VaatiWrathEyeAction5(Entity* this) {
if (this->actionDelay != 0) {
this->action = 6;
- if (this->parent->currentHealth >= 0x15) {
+ if (this->parent->health >= 0x15) {
this->actionDelay = 120;
} else {
this->actionDelay = 0x3c;
}
- this->attachedEntity = NULL;
+ this->child = NULL;
InitializeAnimation(this, 5);
SoundReq(SFX_19B);
}
@@ -133,17 +133,17 @@ void VaatiWrathEyeAction6(Entity* this) {
InitializeAnimation(this, 6);
}
} else {
- if (this->frames.b.f3) {
+ if (this->frame & 0x80) {
this->action = 7;
this->actionDelay = 120;
this->field_0xf = 0;
} else {
- if (this->frames.b.f0 != 0) {
- this->frames.all &= 0xfe;
+ if (this->frame & 1) {
+ this->frame &= 0xfe;
pEVar3 = CreateProjectile(0x24);
if (pEVar3 != NULL) {
pEVar3->parent = this;
- this->attachedEntity = pEVar3;
+ this->child = pEVar3;
PositionRelative(this, pEVar3, 0, 0xc0000);
}
}
@@ -158,7 +158,7 @@ void VaatiWrathEyeAction7(Entity* this) {
this->action = 8;
this->actionDelay = 0x3c;
COLLISION_OFF(this);
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
CreateFx(this, FX_REFLECT2, 0x40);
this->parent->field_0x7a.HALF.HI |= 0x10 << this->type;
} else {
@@ -178,7 +178,7 @@ void VaatiWrathEyeAction8(Entity* this) {
if (--this->actionDelay == 0) {
this->action = 9;
COLLISION_ON(this);
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 0);
sub_080485FC(this);
SoundReq(SFX_166);
@@ -189,7 +189,7 @@ void VaatiWrathEyeAction8(Entity* this) {
void VaatiWrathEyeAction9(Entity* this) {
sub_080485FC(this);
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 4;
this->actionDelay = 1;
this->parent->field_0x7a.HALF.HI = (this->parent->field_0x7a.HALF.HI & 0xf) | (1 << this->type);
@@ -208,5 +208,5 @@ void sub_080485FC(Entity* this) {
ptr = &gUnk_080D1D98[this->type * 2];
sub_0806FA90(this->parent, this, ptr[0], ptr[1]);
- this->height.HALF.HI = gUnk_080D1D78[this->type * 8 + (this->parent->field_0x78.HALF.LO >> 4 & 7)];
+ this->z.HALF.HI = gUnk_080D1D78[this->type * 8 + (this->parent->field_0x78.HALF.LO >> 4 & 7)];
}
diff --git a/src/enemy/wallMaster.c b/src/enemy/wallMaster.c
index 7107cf9c..fdc73c5b 100644
--- a/src/enemy/wallMaster.c
+++ b/src/enemy/wallMaster.c
@@ -31,7 +31,7 @@ void sub_0802A454(Entity* this) {
COLLISION_OFF(this);
this->field_0x7c.HALF.HI = gPlayerEntity.x.HALF.HI;
this->field_0x80.HWORD = gPlayerEntity.y.HALF.HI;
- this->field_0x82.HWORD = gPlayerEntity.height.HALF.HI;
+ this->field_0x82.HWORD = gPlayerEntity.z.HALF.HI;
if (this->action != 3) {
InitializeAnimation(this, 1);
}
@@ -73,12 +73,12 @@ void sub_0802A534(Entity* this) {
this->action = 2;
this->actionDelay = 0x5a;
COLLISION_ON(this);
- this->spriteSettings.b.draw = 3;
+ this->spriteSettings.draw = 3;
this->x.HALF.HI = ent->x.HALF.HI;
this->y.HALF.HI = ent->y.HALF.HI;
- this->height.HALF.HI = -0x80;
+ this->z.HALF.HI = -0x80;
this->spritePriority.b1 = 1;
- this->spriteSettings.b.shadow = 2;
+ this->spriteSettings.shadow = 2;
InitializeAnimation(this, 2);
sub_0802A7D0(this);
}
@@ -93,11 +93,11 @@ void sub_0802A5B8(Entity* this) {
InitializeAnimation(this, 0);
}
} else {
- this->height.HALF.HI += 3;
- if (-1 < this->height.HALF.HI) {
+ this->z.HALF.HI += 3;
+ if (-1 < this->z.HALF.HI) {
this->action = 3;
- this->spriteSettings.b.draw = 1;
- this->height.HALF.HI = 0;
+ this->spriteSettings.draw = 1;
+ this->z.HALF.HI = 0;
InitializeAnimation(this, 1);
}
}
@@ -109,23 +109,23 @@ void sub_0802A610(Entity* this) {
GetNextFrame(this);
sub_0802A7D0(this);
- flags = this->frames.all & 0x80;
+ flags = this->frame & 0x80;
if (flags) {
this->action = 4;
this->actionDelay = 0x1e;
- } else if (this->frames.all & 1) {
- this->frames.all = flags;
+ } else if (this->frame & 1) {
+ this->frame = flags;
this->hitType = 0x75;
}
}
void sub_0802A650(Entity* this) {
sub_0802A7D0(this);
- this->height.HALF.HI -= 2;
- if (-0xa0 > this->height.HALF.HI) {
+ this->z.HALF.HI -= 2;
+ if (-0xa0 > this->z.HALF.HI) {
this->action = 1;
COLLISION_OFF(this);
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->hitType = 0x74;
this->field_0x78.HWORD = this->field_0x7c.BYTES.byte0 * 0x3c;
}
@@ -139,26 +139,26 @@ void sub_0802A69C(Entity* this) {
gPlayerState.field_0x1a[0] |= 0x80;
gPlayerEntity.x.HALF.HI = this->field_0x7c.HALF.HI;
gPlayerEntity.y.HALF.HI = this->field_0x80.HWORD;
- gPlayerEntity.height.HALF.HI = this->field_0x82.HWORD;
+ gPlayerEntity.z.HALF.HI = this->field_0x82.HWORD;
- if (gPlayerEntity.height.HALF.HI != this->height.HALF.HI) {
- if (gPlayerEntity.height.HALF.HI < this->height.HALF.HI) {
- this->height.HALF.HI--;
+ if (gPlayerEntity.z.HALF.HI != this->z.HALF.HI) {
+ if (gPlayerEntity.z.HALF.HI < this->z.HALF.HI) {
+ this->z.HALF.HI--;
} else {
- this->height.HALF.HI++;
+ this->z.HALF.HI++;
}
}
/* sigh... */
GetNextFrame(this);
- flags = this->frames.all & 0x80;
+ flags = this->frame & 0x80;
if (flags) {
this->action = 6;
this->actionDelay = 0x1e;
- } else if (this->frames.all & 0x1) {
- this->frames.all = flags;
+ } else if (this->frame & 0x1) {
+ this->frame = flags;
this->spriteOffsetY = 3;
- gPlayerEntity.spriteSettings.b.draw = 0;
+ gPlayerEntity.spriteSettings.draw = 0;
}
}
@@ -168,7 +168,7 @@ void sub_0802A734(Entity* this) {
sub_0805E5A8();
DoExitTransition(gUnk_0813AB1C[gArea.regret]);
} else {
- this->height.WORD -= 0x20000;
+ this->z.WORD -= 0x20000;
gPlayerState.field_0xa |= 0x80;
gPlayerState.field_0x1a[0] |= 0x80;
}
diff --git a/src/enemy/wallMaster2.c b/src/enemy/wallMaster2.c
index d21ca8a2..cde62fa1 100644
--- a/src/enemy/wallMaster2.c
+++ b/src/enemy/wallMaster2.c
@@ -55,9 +55,9 @@ void sub_0802CCE0(Entity* this) {
this->action = 1;
this->actionDelay = 60;
this->field_0xf = Random();
- this->spriteSettings.b.shadow = 2;
+ this->spriteSettings.shadow = 2;
this->animationState = 0xff;
- this->height.HALF.HI = -2;
+ this->z.HALF.HI = -2;
this->collisionLayer = 3;
tmp = Random();
this->field_0x7a.HALF.LO = tmp;
@@ -125,13 +125,13 @@ void sub_0802CE68(Entity* this) {
}
sub_0802CFD8(this);
GetNextFrame(this);
- frames = this->frames.all & 0x80;
+ frames = this->frame & 0x80;
if (frames) {
this->action = 4;
this->actionDelay = 30;
- } else if (this->frames.all & 1) {
- this->frames.all = frames;
- gPlayerEntity.spriteSettings.b.draw = 0;
+ } else if (this->frame & 1) {
+ this->frame = frames;
+ gPlayerEntity.spriteSettings.draw = 0;
}
}
@@ -141,9 +141,9 @@ void sub_0802CEF4(Entity* this) {
sub_0805E5A8();
DoExitTransition(gUnk_0813AB1C[gArea.regret]);
} else {
- this->height.WORD -= 0x20000;
- if (this->height.HALF.HI < -0x30) {
- this->spriteSettings.b.shadow = 1;
+ this->z.WORD -= 0x20000;
+ if (this->z.HALF.HI < -0x30) {
+ this->spriteSettings.shadow = 1;
}
gPlayerState.field_0xa |= 0x80;
gPlayerState.field_0x1a[0] |= 0x80;
diff --git a/src/enemy/waterDrop.c b/src/enemy/waterDrop.c
index d32ae94e..96ff44c2 100644
--- a/src/enemy/waterDrop.c
+++ b/src/enemy/waterDrop.c
@@ -22,7 +22,7 @@ void sub_0802A250(Entity* this) {
this->action = 1;
this->actionDelay = 0;
- this->hVelocity = -0x30000;
+ this->zVelocity = -0x30000;
this->speed = gUnk_080CD03C[Random() & 3];
this->direction = gUnk_080CD040[Random() & 3] + 0x18;
this->collisionLayer = 2;
@@ -45,16 +45,16 @@ void sub_0802A2B4(Entity* this) {
}
sub_0802A39C(this);
- if (-8 < this->height.HALF.HI) {
+ if (-8 < this->z.HALF.HI) {
sub_0802A334(this);
}
}
void sub_0802A2FC(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
DeleteEntity(this);
- } else if (this->frames.all & 1) {
+ } else if (this->frame & 1) {
COLLISION_OFF(this);
} else {
sub_0802A39C(this);
diff --git a/src/enemy/wisp.c b/src/enemy/wisp.c
index 734b47df..beb1ec43 100644
--- a/src/enemy/wisp.c
+++ b/src/enemy/wisp.c
@@ -34,7 +34,7 @@ void sub_08033564(Entity* this) {
switch ((s32)bits & 0x3f) {
case 0:
this->action = 2;
- this->spriteSettings.b.draw = FALSE;
+ this->spriteSettings.draw = FALSE;
COLLISION_OFF(this);
this->field_0x7c.HALF.LO = 0x27c;
gPlayerState.flags |= 0x4000;
@@ -47,15 +47,15 @@ void sub_08033564(Entity* this) {
break;
case 0xe:
case 0x15:
- this->currentHealth = 0;
+ this->health = 0;
break;
case 0x14:
COLLISION_OFF(this);
this->iframes = 0;
- this->spriteSettings.b.draw = FALSE;
+ this->spriteSettings.draw = FALSE;
ent = CreateFx(this, FX_DEATH, 0);
if (ent != NULL) {
- this->attachedEntity = ent;
+ this->child = ent;
this->actionDelay = 0xe;
CopyPosition(this, ent);
}
@@ -115,7 +115,7 @@ void sub_080336DC(Entity* this) {
CreateDust(this);
break;
case 0xc:
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
break;
case 0x0:
this->action = 1;
diff --git a/src/entity.c b/src/entity.c
index ba3aa31b..9549a9e4 100644
--- a/src/entity.c
+++ b/src/entity.c
@@ -318,11 +318,11 @@ void DeleteEntity(Entity* ent) {
sub_0804AA1C(ent);
}
COLLISION_OFF(ent);
- ent->spriteSettings.b.draw = 0;
+ ent->spriteSettings.draw = 0;
ent->field_0x3c = 0;
ent->bitfield = 0;
ent->knockbackDuration = 0;
- ent->currentHealth = 0;
+ ent->health = 0;
UnlinkEntity(ent);
ent->next = NULL;
ent->prev = (Entity*)0xffffffff;
diff --git a/src/game.c b/src/game.c
index aade535d..d6935aaa 100644
--- a/src/game.c
+++ b/src/game.c
@@ -270,7 +270,7 @@ void InitializePlayer(void) {
switch (gScreenTransition.field_0xf) {
case 0x2:
case 0x6:
- pl->height.HALF.HI = -0xc0;
+ pl->z.HALF.HI = -0xc0;
break;
case 0x4:
gPlayerState.field_0x34[4] = 0x10;
@@ -295,7 +295,7 @@ void InitializePlayer(void) {
pl->kind = 1;
pl->flags |= 0xa0;
pl->spritePriority.b0 = 4;
- pl->currentHealth = gSave.stats.health;
+ pl->health = gSave.stats.health;
pl->x.HALF.HI = gScreenTransition.playerStartPos.HALF.x;
pl->y.HALF.HI = gScreenTransition.playerStartPos.HALF.y;
pl->animationState = gScreenTransition.playerState;
@@ -354,7 +354,7 @@ s32 ModHealth(s32 deltaHealth) {
newHealth = (u32)gStats.maxHealth;
}
gStats.health = newHealth;
- gPlayerEntity.currentHealth = newHealth;
+ gPlayerEntity.health = newHealth;
return newHealth;
}
diff --git a/src/interrupts.c b/src/interrupts.c
index 680944e2..a7431d95 100644
--- a/src/interrupts.c
+++ b/src/interrupts.c
@@ -200,7 +200,7 @@ void PlayerUpdate(Entity* this) {
}
HandlePlayerLife(this);
DoPlayerAction(this);
- if ((this->height.WORD == 0) && (this->action == 1 || this->action == 9))
+ if ((this->z.WORD == 0) && (this->action == 1 || this->action == 9))
sub_08008790(this, 8);
sub_080171F0();
}
diff --git a/src/intro.c b/src/intro.c
index fc28094e..3404c931 100644
--- a/src/intro.c
+++ b/src/intro.c
@@ -168,8 +168,8 @@ static void HandleTitlescreen(void) {
gScreen.controls.alphaBlend = BLDALPHA_BLEND(9, 9);
gScreen.bg0.control = BGCNT_SCREENBASE(29) | BGCNT_PRIORITY(2);
gScreen.bg1.control = 0x1E03;
- gScreen.bg2.control = BGCNT_PRIORITY(1) | BGCNT_CHARBASE(2) | BGCNT_256COLOR |
- BGCNT_SCREENBASE(28) | BGCNT_WRAP | BGCNT_TXT512x256;
+ gScreen.bg2.control = BGCNT_PRIORITY(1) | BGCNT_CHARBASE(2) | BGCNT_256COLOR | BGCNT_SCREENBASE(28) |
+ BGCNT_WRAP | BGCNT_TXT512x256;
gScreen.lcd.displayControl |= DISPCNT_MODE_1;
gScreen.lcd.displayControl |= DISPCNT_BG0_ON | DISPCNT_BG1_ON | DISPCNT_OBJ_ON;
gIntroState.swordBgScaleRatio = 0x10;
diff --git a/src/item/itemJarEmpty.c b/src/item/itemJarEmpty.c
index 2b94db7c..a3658dab 100644
--- a/src/item/itemJarEmpty.c
+++ b/src/item/itemJarEmpty.c
@@ -36,7 +36,7 @@ void sub_08077534(ItemBehavior* this, u32 arg1) {
case 0x2e:
this->stateID = 3;
gPlayerEntity.animationState = 4;
- gPlayerEntity.spriteSettings.b.flipX = 0;
+ gPlayerEntity.spriteSettings.flipX = 0;
sub_08077DF4(this, 0x2df);
break;
case 0x2f:
diff --git a/src/item/itemMoleMitts.c b/src/item/itemMoleMitts.c
index a30ef93a..4e528ce0 100644
--- a/src/item/itemMoleMitts.c
+++ b/src/item/itemMoleMitts.c
@@ -69,7 +69,7 @@ void sub_080771C8(ItemBehavior* this, u32 arg1) {
object->actionDelay = this->field_0x5[2];
object->field_0xf = this->field_0x5[3];
object->animationState = gPlayerEntity.animationState & 6;
- gPlayerEntity.frames.all = 0;
+ gPlayerEntity.frame = 0;
gPlayerEntity.frameDuration = gUnk_0811BE14[this->field_0x5[3]];
}
} else {
diff --git a/src/item/itemOcarina.c b/src/item/itemOcarina.c
index c84ac6b9..04dd84ea 100644
--- a/src/item/itemOcarina.c
+++ b/src/item/itemOcarina.c
@@ -21,7 +21,7 @@ void OcarinaUse(ItemBehavior* this, u32 arg1) {
} else {
this->field_0x5[4] |= 0xf;
gPlayerEntity.animationState = 0x04;
- gPlayerEntity.spriteSettings.b.flipX = 0;
+ gPlayerEntity.spriteSettings.flipX = 0;
gPlayerEntity.flags &= 0x7f;
gPlayerEntity.field_0x7a.HWORD = 2;
gPlayerState.flags |= 0x10000000;
diff --git a/src/item/itemRocsCape.c b/src/item/itemRocsCape.c
index d718e610..56aa2947 100644
--- a/src/item/itemRocsCape.c
+++ b/src/item/itemRocsCape.c
@@ -17,12 +17,12 @@ extern bool32 sub_08077EFC(ItemBehavior*);
if (((u8)(gPlayerState.field_0x1a[1] | gPlayerState.field_0xa | gPlayerState.field_0x3[1] |
gPlayerState.heldObject | gPlayerState.field_0x1c | gPlayerState.field_0x3c[1]) == 0) &&
((((1 < (u8)(gPlayerState.field_0x10[2] - 0x12) && (gPlayerState.field_0x10[2] != 1)) ||
- (gPlayerEntity.height.WORD != 0)) ||
+ (gPlayerEntity.z.WORD != 0)) ||
(gPlayerState.field_0x14 != 0)))) {
if ((gPlayerState.jumpStatus != 0) && ((gPlayerState.jumpStatus & 7) != 3))
goto _08076710;
- if (-1 < gPlayerEntity.height.WORD) {
- gPlayerEntity.hVelocity = 0x20000;
+ if (-1 < gPlayerEntity.z.WORD) {
+ gPlayerEntity.zVelocity = 0x20000;
gPlayerState.jumpStatus = 1;
gPlayerState.field_0x2c = NULL;
this->stateID += 1;
@@ -32,20 +32,20 @@ extern bool32 sub_08077EFC(ItemBehavior*);
} else {
if (((gPlayerState.heldObject | gPlayerState.field_0x3[1]) == 0) &&
(((gPlayerState.field_0x10[2] != 0x12 && (gPlayerState.field_0x10[2] != 1)) ||
- ((gPlayerEntity.height.WORD != 0 || (gPlayerState.field_0x14 != 0)))))) {
+ ((gPlayerEntity.z.WORD != 0 || (gPlayerState.field_0x14 != 0)))))) {
if ((gPlayerState.jumpStatus != 0) && ((gPlayerState.jumpStatus & 7) != 3)) {
_08076710:
sub_08076758(this, arg1);
return;
}
- if (-1 < gPlayerEntity.height.WORD) {
+ if (-1 < gPlayerEntity.z.WORD) {
gPlayerState.field_0x0[1] = 0;
this->stateID += 1;
gPlayerState.keepFacing = 0;
gPlayerState.jumpStatus = 1;
gPlayerState.field_0xe = -1;
gPlayerState.field_0x2c = NULL;
- gPlayerEntity.hVelocity = 0x20000;
+ gPlayerEntity.zVelocity = 0x20000;
_0807673C:
sub_08077F84();
SoundReq(SFX_PLY_VO4);
@@ -67,10 +67,10 @@ void sub_08076758(ItemBehavior* this, u32 arg1) {
((gPlayerState.jumpStatus & 7) != 3)) {
if (sub_08077EFC(this)) {
if (this->stateID < 2) {
- if ((gPlayerEntity.hVelocity < 1) && ((gPlayerState.jumpStatus & 0x10) == 0)) {
+ if ((gPlayerEntity.zVelocity < 1) && ((gPlayerState.jumpStatus & 0x10) == 0)) {
this->stateID = 2;
gPlayerEntity.field_0x7a.HWORD = 2;
- gPlayerEntity.hVelocity = 0x20000;
+ gPlayerEntity.zVelocity = 0x20000;
gPlayerState.jumpStatus |= 0x10;
gPlayerState.field_0x8 = 0x288;
SoundReq(SFX_172);
diff --git a/src/manager/manager1.c b/src/manager/manager1.c
index f0fb5e49..037d5182 100644
--- a/src/manager/manager1.c
+++ b/src/manager/manager1.c
@@ -17,10 +17,10 @@ void Manager1_Main(Entity* this) {
u8* pbVar2;
gUnk_08107C5C[this->action](this);
- gUnk_08107C48[((u8*)&this->hVelocity)[1]](this);
- bVar1 = gUnk_08107C40[((u8*)&this->hVelocity)[1]];
- if ((bVar1 != 0) && (*(u8*)&this->hVelocity != bVar1)) {
- ((u8*)&this->hVelocity)[0] = bVar1;
+ gUnk_08107C48[((u8*)&this->zVelocity)[1]](this);
+ bVar1 = gUnk_08107C40[((u8*)&this->zVelocity)[1]];
+ if ((bVar1 != 0) && (*(u8*)&this->zVelocity != bVar1)) {
+ ((u8*)&this->zVelocity)[0] = bVar1;
LoadGfxGroup(bVar1);
}
}
@@ -28,9 +28,9 @@ void Manager1_Main(Entity* this) {
void sub_080570B8(Entity* this) {
u8* pbVar1;
- LoadGfxGroup(((u8*)&this->hVelocity)[0]);
- this->height.WORD = 0;
- pbVar1 = ((u8*)&this->hVelocity + 1);
+ LoadGfxGroup(((u8*)&this->zVelocity)[0]);
+ this->z.WORD = 0;
+ pbVar1 = ((u8*)&this->zVelocity + 1);
if (*pbVar1 == 3) {
gScreen.bg3.updated = 1;
} else {
@@ -46,9 +46,9 @@ void sub_080570F8(void) {
void sub_08057118(Entity* this) {
this->actionDelay = 0;
- *(u8*)&this->hVelocity = 0;
- ((u8*)&this->hVelocity)[1] = 0;
- ((u8*)&this->hVelocity)[2] = 0;
+ *(u8*)&this->zVelocity = 0;
+ ((u8*)&this->zVelocity)[1] = 0;
+ ((u8*)&this->zVelocity)[2] = 0;
this->action = 1;
gScreen.bg3.control = 0x1e04;
gScreen.lcd.displayControl |= 0x800;
diff --git a/src/manager/manager15.c b/src/manager/manager15.c
index 02cf723f..92585bc4 100644
--- a/src/manager/manager15.c
+++ b/src/manager/manager15.c
@@ -295,7 +295,7 @@ void sub_0805A758(Manager15* this) {
}
void sub_0805A76C(Manager15* this) {
- if ((gPlayerEntity.currentHealth != 0) && (gPlayerEntity.height.HALF.HI == 0) && (!gPlayerState.field_0x2c)) {
+ if ((gPlayerEntity.health != 0) && (gPlayerEntity.z.HALF.HI == 0) && (!gPlayerState.field_0x2c)) {
switch (gPlayerState.field_0xa9) {
case 1:
case 0:
diff --git a/src/manager/manager1C.c b/src/manager/manager1C.c
index bb151f8f..cadaec86 100644
--- a/src/manager/manager1C.c
+++ b/src/manager/manager1C.c
@@ -27,7 +27,7 @@ void sub_0805B55C(Manager* manager) {
if (waterDrop != NULL) {
waterDrop->x.HALF.HI = gRoomControls.roomScrollX + 0x78 + gUnk_08108C6C[Random() & 7];
waterDrop->y.HALF.HI = gRoomControls.roomScrollY + 0x50 + gUnk_08108C7C[Random() & 3];
- waterDrop->height.HALF.HI = 0xff38;
+ waterDrop->z.HALF.HI = 0xff38;
}
}
}
diff --git a/src/manager/manager2C.c b/src/manager/manager2C.c
index 3c578661..08865658 100644
--- a/src/manager/manager2C.c
+++ b/src/manager/manager2C.c
@@ -19,7 +19,7 @@ void Manager2C_Main(Manager2C* manager) {
manager->field_0x3a = 0;
}
if (((CheckPlayerInRegion(manager->field_0x38, manager->field_0x3a, 0x14, 0x40) != 0) &&
- (((gPlayerEntity.y.HALF.HI - gRoomControls.roomOriginY) + gPlayerEntity.height.HALF.HI) < 0)) &&
+ (((gPlayerEntity.y.HALF.HI - gRoomControls.roomOriginY) + gPlayerEntity.z.HALF.HI) < 0)) &&
(gRoomControls.roomScrollY == gRoomControls.roomOriginY)) {
MemClear(&gScreenTransition.areaID, 0x20);
gScreenTransition.transitioningOut = 1;
diff --git a/src/manager/manager33.c b/src/manager/manager33.c
index 3ed92fc2..7dbf75b4 100644
--- a/src/manager/manager33.c
+++ b/src/manager/manager33.c
@@ -11,7 +11,7 @@ void Manager33_Main(Manager* this) {
u32 b = roomControls->roomOriginY + 0x140;
u32 y = (b - gPlayerEntity.y.HALF.HI) + 0x10;
if (this->action == 0) {
- if (x < 0x20 && y < 0x20 && gPlayerEntity.height.HALF.HI < -0x18 && gPlayerState.field_0xa8 == 0x14) {
+ if (x < 0x20 && y < 0x20 && gPlayerEntity.z.HALF.HI < -0x18 && gPlayerState.field_0xa8 == 0x14) {
this->action += 1;
this->unk_0e = 0x5a;
SoundReq(SFX_10A);
@@ -22,7 +22,7 @@ void Manager33_Main(Manager* this) {
if (object != NULL) {
object->x.HALF.HI = roomControls->roomOriginX + 0x1f8;
object->y.HALF.HI = roomControls->roomOriginY + 0x140;
- object->height.HALF.HI = 0xffe8;
+ object->z.HALF.HI = 0xffe8;
}
DeleteThisEntity();
}
diff --git a/src/manager/manager37.c b/src/manager/manager37.c
index c05425b0..270b8162 100644
--- a/src/manager/manager37.c
+++ b/src/manager/manager37.c
@@ -71,7 +71,7 @@ void sub_0805DEB8(Manager* this) {
void sub_0805DF4C(Manager* this) {
gPlayerEntity.animationState = 0;
- if (gPlayerEntity.height.HALF.HI != 0) {
+ if (gPlayerEntity.z.HALF.HI != 0) {
if (gPlayerEntity.y.HALF.HI < (gRoomControls.roomOriginY + 0x48)) {
gPlayerEntity.y.HALF.HI = gRoomControls.roomOriginY + 0x48;
}
diff --git a/src/manager/manager6.c b/src/manager/manager6.c
index d2a8fc66..3840dca5 100644
--- a/src/manager/manager6.c
+++ b/src/manager/manager6.c
@@ -19,8 +19,7 @@ void Manager6_Main(Manager6* this) {
tmp = (i->unk_07.all & 0x3);
if (((tmp & (gPlayerEntity.collisionLayer)) != 0) &&
(((gPlayerState.flags & 0x80) != 0) || ((i->unk_07.b.unk2) != 0)) &&
- (CheckPlayerInRegion(i->posX, i->posY, i->width, i->height) != 0) &&
- (gPlayerEntity.height.HALF.HI == 0)) {
+ (CheckPlayerInRegion(i->posX, i->posY, i->width, i->height) != 0) && (gPlayerEntity.z.HALF.HI == 0)) {
DoExitTransition(GetCurrentRoomProperty(i->unk_06));
}
}
diff --git a/src/manager/managerA.c b/src/manager/managerA.c
index 6003f891..e2469dc8 100644
--- a/src/manager/managerA.c
+++ b/src/manager/managerA.c
@@ -120,7 +120,7 @@ void sub_08058514(ManagerA* this) {
case 1:
if ((gPlayerState.flags & 0x1235) != 0)
return;
- if (gPlayerEntity.height.HALF.HI != 0)
+ if (gPlayerEntity.z.HALF.HI != 0)
return;
gPlayerState.jumpStatus = 0;
sub_08078AA8(this->unk_36, this->unk_35);
diff --git a/src/manager/managerC.c b/src/manager/managerC.c
index abcb9914..126186e3 100644
--- a/src/manager/managerC.c
+++ b/src/manager/managerC.c
@@ -155,7 +155,7 @@ void sub_08058A04(ManagerC* this) {
s32 tmp = gPlayerEntity.x.HALF.HI - gRoomControls.roomOriginX;
s32 tmp2 = gPlayerEntity.y.HALF.HI - gRoomControls.roomOriginY;
if ((this->unk_20 - 0x118 < 0xDu) && CheckGlobalFlag(LV1TARU_OPEN) && (tmp - 0x6d < 0x17u) &&
- (tmp2 - 0x45 < 0x17u) && (gPlayerEntity.height.HALF.HI == 0)) {
+ (tmp2 - 0x45 < 0x17u) && (gPlayerEntity.z.HALF.HI == 0)) {
gPlayerState.playerAction = 3;
gPlayerState.field_0x38 = 0;
gPlayerEntity.x.HALF.HI = gRoomControls.roomOriginX + 0x78;
diff --git a/src/npc.c b/src/npc.c
index 10edf4ce..328ce1af 100644
--- a/src/npc.c
+++ b/src/npc.c
@@ -151,7 +151,7 @@ u32 ReadBit(void*, u32);
// regalloc
NONMATCH("asm/non_matching/arm_proxy/NPCUpdate.inc", void NPCUpdate(Entity* this)) {
- if ((this->currentHealth & 0x7f) && !ReadBit(&gUnk_020342F8, this->currentHealth - 1))
+ if ((this->health & 0x7f) && !ReadBit(&gUnk_020342F8, this->health - 1))
DeleteThisEntity();
if (this->action == 0 && (this->flags & ENT_DID_INIT) == 0)
InitNPC(this);
@@ -160,8 +160,8 @@ NONMATCH("asm/non_matching/arm_proxy/NPCUpdate.inc", void NPCUpdate(Entity* this
if (this->next != NULL) {
if (gNPCFunctions[this->id][1] != NULL)
gNPCFunctions[this->id][1](this);
- if ((this->currentHealth & 0x7f) != 0) {
- u32 temp = this->currentHealth & 0x7f;
+ if ((this->health & 0x7f) != 0) {
+ u32 temp = this->health & 0x7f;
gUnk_02031EC0[temp * 2 - 2].x = this->x.HALF.HI - gRoomControls.roomOriginX;
gUnk_02031EC0[temp * 2 - 2].y = this->y.HALF.HI - gRoomControls.roomOriginY;
}
diff --git a/src/npc/anju.c b/src/npc/anju.c
index e0fb08c8..b7262d24 100644
--- a/src/npc/anju.c
+++ b/src/npc/anju.c
@@ -9,7 +9,7 @@ void Anju(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->animationState = this->actionDelay;
sub_0807DD50(this);
return;
@@ -39,7 +39,7 @@ void sub_0806C354(Entity* this) {
void Anju_Fusion(Entity* this) {
if (this->action == 0) {
this->action++;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 6);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/beedle.c b/src/npc/beedle.c
index 55d54a01..73f14f41 100644
--- a/src/npc/beedle.c
+++ b/src/npc/beedle.c
@@ -41,7 +41,7 @@ void sub_080632E0(Entity* this) {
if (LoadExtraSpriteData(this, &gUnk_0810C8D4) != 0) {
InitializeAnimation(this, 0);
sub_08078778(this);
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->action = 1;
}
}
@@ -68,7 +68,7 @@ void sub_0806336C(Entity* this) {
void sub_08063390(Entity* this) {
GetNextFrame(this);
- if (this->frames.b.f3 != 0) {
+ if (this->frame & 0x80) {
this->action = 1;
InitializeAnimation(this, GetAnimationState(this));
sub_08078778(this);
@@ -87,7 +87,7 @@ s32 sub_080633C8(Entity* this) {
}
void Beedle_Head(Entity* this) {
- SetExtraSpriteFrame(this, 0, this->frames.all & 0x3F);
+ SetExtraSpriteFrame(this, 0, this->frame & 0x3F);
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
diff --git a/src/npc/bigGoron.c b/src/npc/bigGoron.c
index 234a3f7c..cae552e7 100644
--- a/src/npc/bigGoron.c
+++ b/src/npc/bigGoron.c
@@ -130,7 +130,7 @@ void sub_0806D1D0(Entity* this) {
this->spriteOrientation.flipY = 3;
this->spriteRendering.b3 = 3;
this->spritePriority.b0 = 7;
- this->spriteSettings.b.draw = 3;
+ this->spriteSettings.draw = 3;
this->frameIndex = 0;
this->actionDelay = 0x1e;
sub_0805E3A0(this, 2);
@@ -154,7 +154,7 @@ void sub_0806D1D0(Entity* this) {
this->frameIndex = this->subAction;
break;
case 2:
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
break;
}
this->x.HALF.HI = this->parent->x.HALF.HI;
@@ -177,7 +177,7 @@ void sub_0806D274(Entity* this) {
sub_0805E3A0(this, 2);
npc = CreateNPC(0x4c, 3, 0);
if (npc != NULL) {
- npc->attachedEntity = this;
+ npc->child = this;
}
}
switch (this->subAction) {
@@ -219,14 +219,14 @@ void sub_0806D348(Entity* this) {
this->spriteOrientation.flipY = 3;
this->spriteRendering.b3 = 3;
this->spritePriority.b0 = 6;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->frameIndex = 5;
sub_0805E3A0(this, 2);
}
- if (this->attachedEntity->frameIndex == 4) {
- this->spriteSettings.b.draw = 3;
+ if (this->child->frameIndex == 4) {
+ this->spriteSettings.draw = 3;
} else {
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
this->x.HALF.HI = this->parent->x.HALF.HI;
this->y.HALF.HI = this->parent->y.HALF.HI;
@@ -249,7 +249,7 @@ void sub_0806D3C0(Entity* this) {
}
void sub_0806D40C(Entity* this) {
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
sub_0806D41C(this);
}
@@ -376,7 +376,7 @@ void sub_0806D70C(void) {
entity = FindEntity(7, 0x4c, 7, 1, 0);
if (entity != NULL) {
entity->subAction = 0;
- entity->spriteSettings.b.draw = 3;
+ entity->spriteSettings.draw = 3;
}
}
diff --git a/src/npc/bladeBrothers.c b/src/npc/bladeBrothers.c
index d6069c99..c4e2b4ab 100644
--- a/src/npc/bladeBrothers.c
+++ b/src/npc/bladeBrothers.c
@@ -41,8 +41,8 @@ void BladeBrothers(Entity* this) {
gUnk_081115C0[this->action](this);
sub_0806ED78(this);
}
- if ((this->frames.all & 1) != 0) {
- this->frames.all &= 0xfe;
+ if ((this->frame & 1) != 0) {
+ this->frame &= 0xfe;
sub_08068BEC(this, 0);
}
}
@@ -114,7 +114,7 @@ void sub_08068ADC(Entity* this) {
void sub_08068AFC(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
sub_0807DD50(this);
@@ -388,14 +388,14 @@ void sub_08068F3C(Entity* this) {
void BladeBrothers_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 0;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 0;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 4);
} else {
UpdateAnimationSingleFrame(this);
}
- if ((this->frames.all & 1) != 0) {
- this->frames.all &= 0xfe;
+ if ((this->frame & 1) != 0) {
+ this->frame &= 0xfe;
sub_08068BEC(this, 0);
}
}
diff --git a/src/npc/brocco.c b/src/npc/brocco.c
index e38053fa..bf00088d 100644
--- a/src/npc/brocco.c
+++ b/src/npc/brocco.c
@@ -26,7 +26,7 @@ void sub_08063544(Entity* this) {
void sub_0806355C(Entity* this) {
this->action = this->action + 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 4);
sub_08078778(this);
}
@@ -46,7 +46,7 @@ void sub_0806362C(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x68.HALF.HI = 0;
sub_0807DD64(this);
case 1:
@@ -84,7 +84,7 @@ void sub_080636F4(Entity* this) {
void Brocco_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->y.HALF.HI -= 4;
InitAnimationForceUpdate(this, 2);
} else {
diff --git a/src/npc/carlov.c b/src/npc/carlov.c
index 92d632ed..f095fe1e 100644
--- a/src/npc/carlov.c
+++ b/src/npc/carlov.c
@@ -12,13 +12,13 @@ void Carlov(Entity* this) {
} else {
sub_0807DD94(this, 0);
}
- if ((this->frames.all & 0x10) != 0) {
- this->frames.all = this->frames.all & 0xef;
+ if ((this->frame & 0x10) != 0) {
+ this->frame = this->frame & 0xef;
EnqueueSFX(0x104);
sub_08080964(0x10, 0);
}
- if ((this->frames.all & 0x20) != 0) {
- this->frames.all = this->frames.all & 0xdf;
+ if ((this->frame & 0x20) != 0) {
+ this->frame = this->frame & 0xdf;
EnqueueSFX(0x7c);
}
}
diff --git a/src/npc/carpenter.c b/src/npc/carpenter.c
index aa070e14..5369ca96 100644
--- a/src/npc/carpenter.c
+++ b/src/npc/carpenter.c
@@ -52,14 +52,14 @@ void Carpenter(Entity* this) {
void Carpenter_Head(Entity* this) {
if (this->type < 2) {
- SetExtraSpriteFrame(this, 0, this->frames.all & 0xffffff7f);
+ SetExtraSpriteFrame(this, 0, this->frame & 0xffffff7f);
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetExtraSpriteFrame(this, 2, this->frameSpriteSettings & 0x3f);
SetSpriteSubEntryOffsetData1(this, 1, 0);
SetSpriteSubEntryOffsetData2(this, 1, 2);
sub_0807000C(this);
} else {
- SetExtraSpriteFrame(this, 0, this->frames.all & 0xffffff7f);
+ SetExtraSpriteFrame(this, 0, this->frame & 0xffffff7f);
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
@@ -93,7 +93,7 @@ void Carpenter_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08110CA8[this->type * 4]) != 0) {
this->action = this->action + 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
InitializeAnimation(this, (u32)this->type * 8 + 2);
}
diff --git a/src/npc/castleMaid.c b/src/npc/castleMaid.c
index bf2289c8..e334450d 100644
--- a/src/npc/castleMaid.c
+++ b/src/npc/castleMaid.c
@@ -26,14 +26,14 @@ void Maid_Head(Entity* this) {
u32 uVar2;
u32 uVar3;
- uVar2 = this->frames.all & 0x7f;
+ uVar2 = this->frame & 0x7f;
uVar3 = this->frameIndex;
if (this->id == 0x16) {
- if ((this->frames.all & 0x7f) != 0) {
+ if ((this->frame & 0x7f) != 0) {
uVar2 += 10;
}
} else {
- if ((this->frames.all & 0x7f) != 0) {
+ if ((this->frame & 0x7f) != 0) {
uVar2 += 0x1a;
}
uVar3 += 0x10;
diff --git a/src/npc/castorWildsStatue.c b/src/npc/castorWildsStatue.c
index 390e86a1..5bbeb15b 100644
--- a/src/npc/castorWildsStatue.c
+++ b/src/npc/castorWildsStatue.c
@@ -123,7 +123,7 @@ ASM_FUNC("asm/non_matching/castorWildsStatue/sub_080676E0.inc",
void CastorWildsStatue_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->y.HALF.HI -= 0x18;
InitializeAnimation(this, 1);
sub_0801D2B4(this, 0x17b);
diff --git a/src/npc/cat.c b/src/npc/cat.c
index 7a49b5ce..d68129e2 100644
--- a/src/npc/cat.c
+++ b/src/npc/cat.c
@@ -62,7 +62,7 @@ void sub_080677EC(Entity* this) {
u8 bVar1;
u32 uVar2;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->direction = 8;
this->speed = 0x80;
this->field_0x3c = 7;
@@ -71,9 +71,9 @@ void sub_080677EC(Entity* this) {
this->flags2 = 1;
this->field_0x68.HALF.HI = 0xff;
if (this->x.HALF.HI < gPlayerEntity.x.HALF.HI) {
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
} else {
- this->spriteSettings.b.flipX = 0;
+ this->spriteSettings.flipX = 0;
}
this->field_0x68.HALF.LO = sub_0801E99C(this);
@@ -105,11 +105,11 @@ void sub_080678AC(Entity* this) {
if (*psVar2 != 0) {
*psVar2 = *psVar2 - 1;
}
- if ((this->frames.all == 1) && (*psVar2 == 0)) {
+ if ((this->frame == 1) && (*psVar2 == 0)) {
sub_08067AAC(this);
} else {
UpdateAnimationSingleFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
sub_08067B34(this);
}
}
@@ -130,12 +130,12 @@ void sub_08067904(Entity* this) {
if (this->direction == 8) {
if (this->x.HALF.HI > this->field_0x6e.HWORD) {
this->direction = 0x18;
- this->spriteSettings.b.flipX = 0;
+ this->spriteSettings.flipX = 0;
}
} else {
if (this->x.HALF.HI < this->field_0x6c.HWORD) {
this->direction = 8;
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
}
}
sub_0806F69C(this);
@@ -144,7 +144,7 @@ void sub_08067904(Entity* this) {
void sub_0806797C(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.b.f3 != 0) {
+ if (this->frame & 0x80) {
sub_08067B08(this);
}
}
@@ -173,7 +173,7 @@ void sub_08067A0C(Entity* this) {
u8 tmp;
UpdateAnimationSingleFrame(this);
- if (this->frames.b.f3 != 0) {
+ if (this->frame & 0x80) {
if (sub_08067D20(this) != 0) {
sub_08067B80(this, 5);
this->actionDelay = this->actionDelay + 0x14;
@@ -181,10 +181,10 @@ void sub_08067A0C(Entity* this) {
sub_08067C24(this);
}
} else {
- tmp = (this->frames.all & 7);
+ tmp = (this->frame & 7);
if (tmp != 0) {
COLLISION_ON(this);
- this->hitbox = gUnk_08111154[tmp - 1 + ((this->spriteSettings.b.flipX << 2))];
+ this->hitbox = gUnk_08111154[tmp - 1 + ((this->spriteSettings.flipX << 2))];
} else {
sub_08067DDC(this);
}
@@ -193,7 +193,7 @@ void sub_08067A0C(Entity* this) {
void sub_08067A78(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.b.f3 != 0) {
+ if (this->frame & 0x80) {
sub_08067AAC(this);
}
}
@@ -208,7 +208,7 @@ void sub_08067AAC(Entity* this) {
this->action = 2;
this->field_0x70.HALF.HI = gUnk_081110FC[(Random() & 3)];
- this->spriteSettings.b.flipX = this->direction >> 4 ^ 1;
+ this->spriteSettings.flipX = this->direction >> 4 ^ 1;
sub_08067DCC(this, 3);
sub_08078850(this, 0, gUnk_0811110C[2], &gUnk_0811110F);
@@ -223,7 +223,7 @@ void sub_08067B08(Entity* this) {
void sub_08067B34(Entity* this) {
sub_08067DCC(this, 0);
this->frameDuration = (Random() & 0x30) + 0xb4;
- sub_08078850(this, 0, gUnk_0811110C[this->spriteSettings.b.flipX], &gUnk_0811110F);
+ sub_08078850(this, 0, gUnk_0811110C[this->spriteSettings.flipX], &gUnk_0811110F);
}
void sub_08067B70(Entity* this) {
@@ -238,20 +238,20 @@ void sub_08067B80(Entity* this, u32 param) {
InitAnimationForceUpdate(this, param);
sub_08067DDC(this);
if (this->x.HALF.HI < gPlayerEntity.x.HALF.HI) {
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
} else {
- this->spriteSettings.b.flipX = 0;
+ this->spriteSettings.flipX = 0;
}
}
void sub_08067BD4(Entity* this) {
- if (this->spriteSettings.b.flipX > 0) {
+ if (this->spriteSettings.flipX > 0) {
if (this->x.HALF.HI - 4 > gPlayerEntity.x.HALF.HI) {
- this->spriteSettings.b.flipX = 0;
+ this->spriteSettings.flipX = 0;
}
} else {
if (this->x.HALF.HI + 4 < gPlayerEntity.x.HALF.HI) {
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
}
}
}
@@ -299,10 +299,10 @@ void sub_08067C44(Entity* this) {
break;
case 3:
if (iVar4 == 1) {
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
} else {
- if (this->spriteSettings.b.flipX == 3) { // TODO 3 ???
- this->spriteSettings.b.flipX = 0;
+ if (this->spriteSettings.flipX == 3) { // TODO 3 ???
+ this->spriteSettings.flipX = 0;
}
}
if (iVar4 != 2) {
@@ -334,12 +334,7 @@ u32 sub_08067D20(Entity* this) {
} else {
entity = sub_08049DF4(2);
if (entity != NULL) {
- tmp = this->spriteSettings.raw * 0x2000000; // TODO maybe convert to ternary?
- iVar4 = 0x28;
- if (tmp < 0) {
- iVar4 = 0x10;
- }
-
+ iVar4 = this->spriteSettings.flipX ? 0x10 : 0x28;
if (((u32)(entity->x.HALF.HI - (this->x.HALF.HI - iVar4)) < 0x31) &&
((((u32)entity->y.HALF.HI) - (this->y.HALF.HI - 4)) < 0x39)) {
return 1;
@@ -360,11 +355,7 @@ u32 sub_08067D74(Entity* this) {
}
entity = sub_08049DF4(2);
if (entity != NULL) {
- tmp = (this->spriteSettings.raw * 0x2000000); // TODO convert to ternary?
- iVar2 = 0x18;
- if (tmp < 0) {
- iVar2 = 8;
- }
+ iVar2 = this->spriteSettings.flipX ? 0x8 : 0x18;
if ((((u32)(entity->x.HALF.HI - (this->x.HALF.HI - iVar2)) < 0x1f) &&
((u32)(entity->y.HALF.HI - this->y.HALF.HI) < 0x17)) &&
(this->actionDelay == 0)) {
@@ -390,7 +381,7 @@ void sub_08067DDC(Entity* this) {
void Cat_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 5);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/cow.c b/src/npc/cow.c
index 0a1ec389..c1f2c319 100644
--- a/src/npc/cow.c
+++ b/src/npc/cow.c
@@ -142,16 +142,16 @@ void sub_08069148(Entity* ent) {
}
void sub_08069168(Entity* ent) {
- if ((s8)ent->frames.all < 0) {
+ if ((s8)ent->frame < 0) {
ent->subAction = 2;
InitAnimationForceUpdate(ent, ent->animationState + 12);
}
}
void sub_08069188(Entity* ent) {
- if (ent->frames.b.f0 == 0)
+ if ((ent->frame & 1) == 0)
return;
- ent->frames.all = 0;
+ ent->frame = 0;
if (((s8)--ent->field_0xf) != 0)
return;
@@ -160,7 +160,7 @@ void sub_08069188(Entity* ent) {
}
void sub_080691BC(Entity* ent) {
- if ((s8)ent->frames.all < 0) {
+ if ((s8)ent->frame < 0) {
ent->action = 1;
ent->subAction = 0;
InitAnimationForceUpdate(ent, ent->animationState + 4);
@@ -219,7 +219,7 @@ void sub_0806924C(Entity* ent) {
void Cow_Fusion(Entity* ent) {
if (ent->action == 0) {
ent->action++;
- ent->spriteSettings.b.draw = 1;
+ ent->spriteSettings.draw = 1;
InitAnimationForceUpdate(ent, 15);
} else {
UpdateAnimationSingleFrame(ent);
diff --git a/src/npc/cucco.c b/src/npc/cucco.c
index 37d3efb4..5e24aa88 100644
--- a/src/npc/cucco.c
+++ b/src/npc/cucco.c
@@ -79,7 +79,7 @@ ASM_FUNC("asm/non_matching/cucco/sub_0806E6A8.inc", void sub_0806E6A8(Entity* th
void Cucco_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 1);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/cuccoChick.c b/src/npc/cuccoChick.c
index faf90f6e..c8ba2951 100644
--- a/src/npc/cuccoChick.c
+++ b/src/npc/cuccoChick.c
@@ -75,11 +75,11 @@ void sub_0806E884(Entity* this) {
void CuccoChick_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->frameIndex = 1;
} else {
if (sub_08003FC4(this, 0x3000) == 0) {
- this->hVelocity = 0x10000;
+ this->zVelocity = 0x10000;
}
}
}
diff --git a/src/npc/dampe.c b/src/npc/dampe.c
index f42e3cce..a69f9efa 100644
--- a/src/npc/dampe.c
+++ b/src/npc/dampe.c
@@ -15,7 +15,7 @@ void Dampe(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
sub_0807DD50(this);
return;
@@ -45,7 +45,7 @@ void sub_0806BE3C(Entity* this) {
void Dampe_Fusion(Entity* this) {
if (this->action == 0) {
this->action++;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 2);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/din.c b/src/npc/din.c
index d17d1dea..4a2d5e5f 100644
--- a/src/npc/din.c
+++ b/src/npc/din.c
@@ -9,7 +9,7 @@ void Din(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0807DD50(this);
break;
case 1:
@@ -43,7 +43,7 @@ void sub_08064828(Entity* this) {
void Din_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 6);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/dog.c b/src/npc/dog.c
index 7f312ff4..58245d8d 100644
--- a/src/npc/dog.c
+++ b/src/npc/dog.c
@@ -123,7 +123,7 @@ void sub_08069D00(Entity* this) {
this->field_0x6a.HALF.HI = 8;
sub_0806A028(this);
if (0x1f < this->animIndex) {
- if ((this->frames.all & 0x80) == 0) {
+ if ((this->frame & 0x80) == 0) {
return;
}
this->field_0x6a.HALF.HI = 8;
@@ -201,7 +201,7 @@ void sub_08069E50(Entity* this) {
sub_0806A028(this);
UpdateAnimationSingleFrame(this);
if (this->animIndex > 0x1f) {
- if ((this->frames.all & 0x80) == 0) {
+ if ((this->frame & 0x80) == 0) {
return;
}
this->field_0x6a.HALF.HI = 8;
@@ -252,7 +252,7 @@ u32 sub_08069EF0(Entity* this) {
void Dog_Head(Entity* this) {
u32 frame;
- frame = this->frames.all & 0xffffff7f;
+ frame = this->frame & 0xffffff7f;
if (frame != 0) {
frame = frame + this->field_0x68.HWORD;
}
@@ -386,7 +386,7 @@ void Dog_Fusion(Entity* this) {
if (this->action == 0) {
if (sub_08069EF0(this) != 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
InitializeAnimation(this, 0x23);
}
diff --git a/src/npc/drLeft.c b/src/npc/drLeft.c
index 9a99a651..d10d99b1 100644
--- a/src/npc/drLeft.c
+++ b/src/npc/drLeft.c
@@ -45,7 +45,7 @@ void sub_0806BFD8(Entity* this) {
}
void sub_0806C00C(Entity* this, ScriptExecutionContext* context) {
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
context->condition = 1;
} else {
context->condition = 0;
diff --git a/src/npc/epona.c b/src/npc/epona.c
index 4c0abc0f..d7bd6820 100644
--- a/src/npc/epona.c
+++ b/src/npc/epona.c
@@ -20,7 +20,7 @@ void Epona(Entity* this) {
void sub_080659B8(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->animationState = 6;
this->field_0x68.HALF.HI = -1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
@@ -93,7 +93,7 @@ void sub_08065AA4(Entity* this) {
void Epona_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 7);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/ezloCap.c b/src/npc/ezloCap.c
index 3133fc00..4eca8f35 100644
--- a/src/npc/ezloCap.c
+++ b/src/npc/ezloCap.c
@@ -28,7 +28,7 @@ void sub_0806D8A0(Entity* this, ScriptExecutionContext* context) {
context->postScriptActions |= 2;
context->condition = 0;
xOffset = 16;
- if (this->spriteSettings.b.flipX) {
+ if (this->spriteSettings.flipX) {
xOffset = -xOffset;
}
xOffset += gPlayerEntity.x.HALF.HI;
@@ -48,9 +48,9 @@ void sub_0806D908(Entity* this) {
// called when talk to ezlo, also when ezlo moves after you
void sub_0806D944(Entity* this) {
- this->spriteSettings.b.flipX = 0;
+ this->spriteSettings.flipX = 0;
if (this->x.WORD <= gPlayerEntity.x.WORD) {
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
}
}
@@ -65,9 +65,9 @@ void sub_0806D96C(Entity* this) {
void sub_0806D9A4(Entity* this) {
if (this->x.WORD <= gPlayerEntity.x.WORD) {
- gPlayerEntity.spriteSettings.b.flipX = 0;
+ gPlayerEntity.spriteSettings.flipX = 0;
} else {
- gPlayerEntity.spriteSettings.b.flipX = 1;
+ gPlayerEntity.spriteSettings.flipX = 1;
}
gPlayerEntity.animationState = 4;
}
diff --git a/src/npc/farmers.c b/src/npc/farmers.c
index 434f494f..88ea6005 100644
--- a/src/npc/farmers.c
+++ b/src/npc/farmers.c
@@ -16,14 +16,14 @@ void sub_0806BC58(Entity* this) {
}
void Farmers_Head(Entity* this) {
- SetExtraSpriteFrame(this, 0, this->frames.all & 0x7f);
+ SetExtraSpriteFrame(this, 0, this->frame & 0x7f);
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
}
void sub_0806BC94(Entity* this, ScriptExecutionContext* context) {
- InitializeAnimation(this, context->intVariable + (BOOLCAST(this->spriteSettings.b.flipX) & 8U) +
+ InitializeAnimation(this, context->intVariable + (BOOLCAST(this->spriteSettings.flipX) & 8U) +
(this->animationState >> 1));
}
@@ -50,8 +50,8 @@ void Farmers_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08113140[this->type * 3]) != 0) {
this->action = this->action + 1;
- this->spriteSettings.b.draw = 1;
- this->spriteSettings.b.flipX = 0;
+ this->spriteSettings.draw = 1;
+ this->spriteSettings.flipX = 0;
sub_0806BC58(this);
InitAnimationForceUpdate(this, 3);
}
diff --git a/src/npc/farore.c b/src/npc/farore.c
index 8629827a..a19d1599 100644
--- a/src/npc/farore.c
+++ b/src/npc/farore.c
@@ -11,7 +11,7 @@ void Farore(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0807DD50(this);
break;
case 1:
@@ -45,7 +45,7 @@ void sub_08064A28(Entity* this) {
void Farore_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 6);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/festari.c b/src/npc/festari.c
index 4d63805f..4a1a6492 100644
--- a/src/npc/festari.c
+++ b/src/npc/festari.c
@@ -17,7 +17,7 @@ void Festari(Entity* this) {
void sub_0805FE10(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
sub_0805E3A0(this, 2);
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
@@ -52,7 +52,7 @@ void sub_0805FE48(Entity* this) {
}
UpdateAnimationSingleFrame(this);
- if (this->frames.b.f3) {
+ if (this->frame & 0x80) {
switch (this->animIndex) {
case 8:
case 10:
@@ -112,7 +112,7 @@ void sub_0805FF2C(Entity* this, ScriptExecutionContext* context) {
void Festari_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
InitAnimationForceUpdate(this, 8);
} else {
diff --git a/src/npc/forestMinish.c b/src/npc/forestMinish.c
index 48c5f42d..366132c5 100644
--- a/src/npc/forestMinish.c
+++ b/src/npc/forestMinish.c
@@ -29,7 +29,7 @@ void ForestMinish(Entity* this) {
case 0:
if (LoadExtraSpriteData(this, &gUnk_0810A348)) {
this->action = 1;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
this->field_0x68.HALF.HI = this->animationState = this->actionDelay << 1;
this->actionDelay = 0;
sub_0805E3A0(this, 2);
@@ -65,8 +65,8 @@ void sub_08060090(Entity* this) {
void ForestMinish_Head(Entity* this) {
u32 pbVar1;
- pbVar1 = this->frames.all;
- if (this->frames.all != 0xff) {
+ pbVar1 = this->frame;
+ if (this->frame != 0xff) {
pbVar1 &= -0x81;
}
if ((this->frameSpriteSettings & 1) == 0) {
@@ -131,7 +131,7 @@ void sub_08060158(Entity* this) {
this->animationState = sub_0806F5B0(index);
}
tmp2 &= 0x7f;
- this->frames.all = tmp1;
+ this->frame = tmp1;
this->frameIndex = tmp2;
this->frameSpriteSettings = 1;
this->animIndex = 0;
@@ -266,7 +266,7 @@ void ForestMinish_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_0810A348)) {
this->action++;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
sub_0805E3A0(this, 2);
InitializeAnimation(this, 6);
}
diff --git a/src/npc/gentari.c b/src/npc/gentari.c
index cc086d8a..ed79f153 100644
--- a/src/npc/gentari.c
+++ b/src/npc/gentari.c
@@ -9,7 +9,7 @@ void Gentari(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
sub_0805E3A0(this, 2);
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
@@ -35,7 +35,7 @@ void Gentari(Entity* this) {
void Gentari_Fusion(Entity* this) {
if (this->action == 0) {
this->action++;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
sub_0805E3A0(this, 2);
InitAnimationForceUpdate(this, 10);
} else {
diff --git a/src/npc/ghostBrothers.c b/src/npc/ghostBrothers.c
index e3ca2a68..ceee1a75 100644
--- a/src/npc/ghostBrothers.c
+++ b/src/npc/ghostBrothers.c
@@ -32,7 +32,7 @@ NONMATCH("asm/non_matching/ghostBrothers/sub_08065C0C.inc", void sub_08065C0C(En
switch (this->action) {
case 0:
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0807DD50(this);
break;
case 1:
@@ -65,7 +65,7 @@ NONMATCH("asm/non_matching/ghostBrothers/sub_08065C0C.inc", void sub_08065C0C(En
return;
}
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->action = 1;
break;
@@ -91,7 +91,7 @@ void sub_08065D18(Entity* this) {
this->action = 1;
this->actionDelay = 0x1e;
this->field_0xf = 0;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spriteRendering.alphaBlend = 1;
*(u32**)&this->field_0x6c = &gUnk_08110188;
sub_0805E3A0(this, 2);
@@ -135,7 +135,7 @@ void sub_08065F64(Entity* this) {
void GhostBrothers_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 2);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/gina.c b/src/npc/gina.c
index b7470173..66af2485 100644
--- a/src/npc/gina.c
+++ b/src/npc/gina.c
@@ -10,7 +10,7 @@ void Gina(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
@@ -40,7 +40,7 @@ void Gina(Entity* this) {
void Gina_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 2);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/gorman.c b/src/npc/gorman.c
index 8c45efdc..c118eeb5 100644
--- a/src/npc/gorman.c
+++ b/src/npc/gorman.c
@@ -131,7 +131,7 @@ void sub_08069ACC(Entity* this, ScriptExecutionContext* context) {
}
void Gorman_Head(Entity* this) {
- SetExtraSpriteFrame(this, 0, (this->frames.all & 7) + 0xf);
+ SetExtraSpriteFrame(this, 0, (this->frame & 7) + 0xf);
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
diff --git a/src/npc/goron.c b/src/npc/goron.c
index a2498d86..2cdc3051 100644
--- a/src/npc/goron.c
+++ b/src/npc/goron.c
@@ -68,12 +68,12 @@ void sub_080693D0(Entity* this) {
u32 var0 = this->field_0x82.HWORD & 0xF;
bool32 createFx65 = BOOLCAST(var0); // = !var0
- if (this->frames.all == 1) {
- this->frames.all = 0;
+ if (this->frame == 1) {
+ this->frame = 0;
sub_08069428(this, 0xFFF80000, createFx65);
}
- if (this->frames.all == 2) {
- this->frames.all = 0;
+ if (this->frame == 2) {
+ this->frame = 0;
sub_08069428(this, 0x80 << 12, createFx65);
}
}
@@ -129,7 +129,7 @@ void sub_080694EC(Entity* this) {
void Goron_Fusion(Entity* this) {
if (this->action == 0) {
this->action++;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 2);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/goronMerchant.c b/src/npc/goronMerchant.c
index f081cead..1c1dbf6f 100644
--- a/src/npc/goronMerchant.c
+++ b/src/npc/goronMerchant.c
@@ -69,7 +69,7 @@ void sub_0806961C(Entity* this) {
void sub_0806963C(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
sub_0807DD50(this);
}
diff --git a/src/npc/gregal.c b/src/npc/gregal.c
index 790385bb..8f7ce5ed 100644
--- a/src/npc/gregal.c
+++ b/src/npc/gregal.c
@@ -49,7 +49,7 @@ void sub_0806CB80(Entity* this) {
sub_0805E3A0(this, 2);
}
if (this->parent != NULL) {
- this->frameIndex = (this->parent->frames.all & 3) + 0x21;
+ this->frameIndex = (this->parent->frame & 3) + 0x21;
}
}
@@ -62,9 +62,9 @@ void sub_0806CBB4(Entity* this) {
}
GetNextFrame(this);
if (this->parent != NULL) {
- this->spriteSettings.b.draw = 0;
- if ((this->parent->frames.all & 4) != 0) {
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 0;
+ if ((this->parent->frame & 4) != 0) {
+ this->spriteSettings.draw = 1;
}
}
}
@@ -73,7 +73,7 @@ void sub_0806CC08(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
sub_0807DD64(this);
case 1:
@@ -100,7 +100,7 @@ void sub_0806CC08(Entity* this) {
}
void sub_0806CCB4(Entity* this, ScriptExecutionContext* context) {
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
context->condition = 1;
} else {
context->condition = 0;
@@ -153,7 +153,7 @@ void sub_0806CD58(Entity* this) {
void Gregal_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
InitAnimationForceUpdate(this, 6);
} else {
diff --git a/src/npc/guard.c b/src/npc/guard.c
index 736625cd..843219fa 100644
--- a/src/npc/guard.c
+++ b/src/npc/guard.c
@@ -173,7 +173,7 @@ void Guard_Head(Entity* this) {
u32 uVar4;
u32 pbVar5;
- uVar2 = this->frames.all & 0x3f;
+ uVar2 = this->frame & 0x3f;
pbVar5 = (this->frameIndex & 0x3f);
uVar4 = this->frameSpriteSettings & 0x3f;
if (this->id == 0x15) {
diff --git a/src/npc/hurdyGurdyMan.c b/src/npc/hurdyGurdyMan.c
index fd0dd3d5..6bc1e0a2 100644
--- a/src/npc/hurdyGurdyMan.c
+++ b/src/npc/hurdyGurdyMan.c
@@ -52,7 +52,7 @@ void HurdyGurdyMan(Entity* this) {
}
void HurdyGurdyMan_Head(Entity* this) {
- SetExtraSpriteFrame(this, 0, (this->frames.all & 0xffffff7f) + 8);
+ SetExtraSpriteFrame(this, 0, (this->frame & 0xffffff7f) + 8);
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
@@ -78,7 +78,7 @@ void HurdyGurdyMan_Fusion(Entity* this) {
uVar1 = LoadExtraSpriteData(this, &gUnk_081144F0);
if (uVar1 != 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
InitializeAnimation(this, 10);
}
diff --git a/src/npc/kid.c b/src/npc/kid.c
index 459e545d..b98341f1 100644
--- a/src/npc/kid.c
+++ b/src/npc/kid.c
@@ -174,7 +174,7 @@ NONMATCH("asm/non_matching/kid/sub_0806252C.inc", void sub_0806252C(Entity* this
s32 iVar11;
uVar4 = gPlayerState.field_0xa8;
- uVar3 = gPlayerEntity.height.HALF.HI;
+ uVar3 = gPlayerEntity.z.HALF.HI;
sVar2 = gPlayerEntity.y.HALF.HI;
sVar1 = gPlayerEntity.x.HALF.HI;
r0 = gPlayerEntity.y.HALF.HI - this->y.HALF.HI;
@@ -291,7 +291,7 @@ NONMATCH("asm/non_matching/kid/Kid_Head.inc", void Kid_Head(Entity* this)) {
u32 uVar4;
iVar1 = (u32)this->type * 4;
- uVar3 = ((u8)this->frames.all & 0x1f) + (u32)gUnk_0810C0A0[iVar1];
+ uVar3 = ((u8)this->frame & 0x1f) + (u32)gUnk_0810C0A0[iVar1];
uVar4 = (this->frameIndex & 0x1f) + (u32)gUnk_0810C0A0[iVar1 + 1];
switch (this->type) {
case 0:
@@ -416,7 +416,7 @@ void Kid_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, gUnk_0810BDC4[this->type]) != 0) {
this->action = this->action + 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->y.HALF.HI = this->y.HALF.HI + -8;
tmp = 6;
if (this->type == 6) {
diff --git a/src/npc/kingDaltus.c b/src/npc/kingDaltus.c
index f296cd4b..4bc618b3 100644
--- a/src/npc/kingDaltus.c
+++ b/src/npc/kingDaltus.c
@@ -27,7 +27,7 @@ void KingDaltus(Entity* this) {
void sub_08066654(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
InitAnimationForceUpdate(this, 2);
@@ -60,7 +60,7 @@ void sub_080666DC(Entity* this) {
void sub_080666E4(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_0807DD50(this);
}
@@ -96,7 +96,7 @@ void sub_0806673C(Entity* this) {
void KingDaltus_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 6);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/kingGustaf.c b/src/npc/kingGustaf.c
index 97388682..ef5b7971 100644
--- a/src/npc/kingGustaf.c
+++ b/src/npc/kingGustaf.c
@@ -16,12 +16,12 @@ void KingGustaf(Entity* this) {
gScreen.controls.layerFXControl = 0x3f40;
gScreen.controls.alphaBlend = 0x1000;
this->speed = 0x1000;
- this->hVelocity = 0;
+ this->zVelocity = 0;
} else {
sub_0807DD94(this, 0);
speed = 0x100;
speed *= this->speed;
- speed += this->hVelocity;
+ speed += this->zVelocity;
speed >>= 0x10;
if (speed > 0x10) {
speed = 0x10;
diff --git a/src/npc/librari.c b/src/npc/librari.c
index f5e1b629..3e961f65 100644
--- a/src/npc/librari.c
+++ b/src/npc/librari.c
@@ -12,7 +12,7 @@ void Librari(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
this->animationState = this->actionDelay;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
@@ -88,7 +88,7 @@ void sub_0806B2B4(Entity* this) {
void Librari_Fusion(Entity* this) {
if (this->action == 0) {
this->action++;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
InitAnimationForceUpdate(this, 9);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/mailbox.c b/src/npc/mailbox.c
index 43b87eb8..8c7dc813 100644
--- a/src/npc/mailbox.c
+++ b/src/npc/mailbox.c
@@ -40,7 +40,7 @@ void sub_08063220(Entity* this) {
void sub_08063254(Entity* this, u32 unused) {
sub_08063280(this, unused);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 3;
MessageFromTarget(0);
}
@@ -56,8 +56,8 @@ void sub_08063280(Entity* this, u32 unused) {
e = this;
UpdateAnimationSingleFrame(e);
- var = e->frames.all & 0x7F;
- e->frames.all ^= var;
+ var = e->frame & 0x7F;
+ e->frame ^= var;
if (var == 2)
CreateFx(e, FX_MAILBOX_UNUSED, 0);
}
diff --git a/src/npc/malon.c b/src/npc/malon.c
index 64febefe..85ba2cd1 100644
--- a/src/npc/malon.c
+++ b/src/npc/malon.c
@@ -20,7 +20,7 @@ void Malon(Entity* this) {
void sub_08065864(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 0xC);
}
@@ -30,7 +30,7 @@ void sub_08065880(Entity* this) {
void sub_08065888(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->animationState = 4;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
@@ -72,7 +72,7 @@ void sub_08065914(Entity* this) {
void Malon_Fusion(Entity* this) {
if (this->action == 0) {
this->action++;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 0xC);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/mama.c b/src/npc/mama.c
index 661684a7..50bd99fe 100644
--- a/src/npc/mama.c
+++ b/src/npc/mama.c
@@ -15,7 +15,7 @@ void Mama(Entity* this) {
case 0:
if (sub_0806C454(this) != 0) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->animationState = this->actionDelay;
this->field_0x68.HALF.HI = 0;
sub_0807DD50(this);
@@ -54,7 +54,7 @@ bool32 sub_0806C454(Entity* this) {
}
void Mama_Head(Entity* this) {
- SetExtraSpriteFrame(this, 0, this->frames.all & 0x7f);
+ SetExtraSpriteFrame(this, 0, this->frame & 0x7f);
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
@@ -62,7 +62,7 @@ void Mama_Head(Entity* this) {
void sub_0806C4A8(Entity* this, ScriptExecutionContext* context) {
s32 tmp;
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
tmp = GetAnimationState(this);
if (tmp < 0) {
tmp = 3;
@@ -88,7 +88,7 @@ void Mama_Fusion(Entity* this) {
if (this->action == 0) {
if (sub_0806C454(this) != 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->y.HALF.HI -= 4;
InitializeAnimation(this, 2);
}
diff --git a/src/npc/mayorHagen.c b/src/npc/mayorHagen.c
index ae5f1e0e..9c92c976 100644
--- a/src/npc/mayorHagen.c
+++ b/src/npc/mayorHagen.c
@@ -83,7 +83,7 @@ void sub_0806CE80(Entity* this) {
void MayorHagen_Fusion(Entity* this) {
if (this->action == 0) {
this->action++;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 8);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/melari.c b/src/npc/melari.c
index 9f1df856..91f803b5 100644
--- a/src/npc/melari.c
+++ b/src/npc/melari.c
@@ -63,7 +63,7 @@ void sub_08068780(Entity* this) {
return;
}
this->action = 1;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
this->animationState = this->type;
sub_0805E3A0(this, 2);
sub_0807DD50(this);
@@ -85,8 +85,8 @@ void sub_08068780(Entity* this) {
}
}
- if ((this->frames.b.f2) != 0) {
- this->frames.all &= 0xbf;
+ if (this->frame & 0x40) {
+ this->frame &= 0xbf;
if (sub_080040A8(this) == 0) {
SoundReq(gUnk_0811153E[(s32)Random() % 3]);
} else {
@@ -107,7 +107,7 @@ void sub_08068884(Entity* this) {
void Melari_Head(Entity* this) {
u32 bVar1;
- bVar1 = this->frames.all;
+ bVar1 = this->frame;
bVar1 &= -0xc1;
SetExtraSpriteFrame(this, 1, this->frameIndex);
if ((bVar1 & 0x20) != 0) {
@@ -129,7 +129,7 @@ void sub_08068910(Entity* this) {
this->actionDelay--;
} else {
this->actionDelay = 0x10;
- if ((this->frames.all & 0x20) != 0) {
+ if ((this->frame & 0x20) != 0) {
iVar1 = sub_0806EDD8(this, 0x30, 0x30);
if (iVar1 < 0) {
iVar1 = 0x10;
@@ -150,7 +150,7 @@ void Melari_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08111520)) {
this->action++;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
InitializeAnimation(this, 6);
}
} else {
diff --git a/src/npc/milkCart.c b/src/npc/milkCart.c
index 29481848..8ce2eb74 100644
--- a/src/npc/milkCart.c
+++ b/src/npc/milkCart.c
@@ -11,7 +11,7 @@ void MilkCart(Entity* ent) {
void sub_08065B6C(Entity* ent) {
ent->action++;
- ent->spriteSettings.b.draw = 1;
+ ent->spriteSettings.draw = 1;
ent->y.HALF.LO += -0x8000;
ent->animationState = 6;
InitAnimationForceUpdate(ent, 3);
diff --git a/src/npc/ministerPotho.c b/src/npc/ministerPotho.c
index 6c3bfb29..5ee2e07d 100644
--- a/src/npc/ministerPotho.c
+++ b/src/npc/ministerPotho.c
@@ -21,7 +21,7 @@ void MinisterPotho(Entity* this) {
void sub_080667E4(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 2);
sub_08078778(this);
}
@@ -55,7 +55,7 @@ void sub_08066864(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_0807DD50(this);
break;
@@ -98,7 +98,7 @@ void sub_08066904(Entity* this) {
void MinisterPotho_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 6);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/mountainMinish.c b/src/npc/mountainMinish.c
index fa4ab4c8..14c4d6a1 100644
--- a/src/npc/mountainMinish.c
+++ b/src/npc/mountainMinish.c
@@ -100,7 +100,7 @@ void MountainMinish_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08111358) != 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 6);
}
} else {
diff --git a/src/npc/mutoh.c b/src/npc/mutoh.c
index 3f66dd26..8cae57cd 100644
--- a/src/npc/mutoh.c
+++ b/src/npc/mutoh.c
@@ -22,7 +22,7 @@ void Mutoh(Entity* this) {
case 0:
if (LoadExtraSpriteData(this, &gUnk_08110C00)) {
this->action = 1;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
sub_0805E3A0(this, 2);
sub_0807DD50(this);
}
@@ -45,7 +45,7 @@ void Mutoh(Entity* this) {
}
void Mutoh_Head(Entity* this) {
- SetExtraSpriteFrame(this, 0, (this->frames.all & -0x81));
+ SetExtraSpriteFrame(this, 0, (this->frame & -0x81));
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
@@ -76,7 +76,7 @@ void Mutoh_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08110C00) != 0) {
this->action++;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
InitializeAnimation(this, 2);
}
} else {
diff --git a/src/npc/nayru.c b/src/npc/nayru.c
index 7bfd89ba..f6e799d8 100644
--- a/src/npc/nayru.c
+++ b/src/npc/nayru.c
@@ -11,7 +11,7 @@ void Nayru(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0807DD50(this);
break;
case 1:
@@ -45,7 +45,7 @@ void sub_08064928(Entity* this) {
void Nayru_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 6);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/npc23.c b/src/npc/npc23.c
index fbb6e943..e90d084c 100644
--- a/src/npc/npc23.c
+++ b/src/npc/npc23.c
@@ -23,7 +23,7 @@ void NPC23(Entity* this) {
void sub_080662F8(Entity* this) {
this->action = 1;
this->subAction = 0;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->animationState = this->type << 1;
InitializeAnimation(this, this->type);
this->field_0x7c.HALF.HI = this->x.HALF.HI;
diff --git a/src/npc/npc26.c b/src/npc/npc26.c
index e3517992..ca0b17a4 100644
--- a/src/npc/npc26.c
+++ b/src/npc/npc26.c
@@ -17,7 +17,7 @@ void NPC26(Entity* this) {
static void sub_080669B8(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 2);
sub_08078778(this);
}
@@ -53,7 +53,7 @@ static void sub_08066A30(Entity* this) {
static void sub_08066A38(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0807DD50(this);
}
diff --git a/src/npc/npc4E.c b/src/npc/npc4E.c
index 804c013a..3a49e4b3 100644
--- a/src/npc/npc4E.c
+++ b/src/npc/npc4E.c
@@ -34,7 +34,7 @@ extern void sub_08096260(Entity*);
void NPC4E(Entity* this) {
if (this->action == 0) {
this->action = 1;
- this->spriteSettings.b.draw = 4;
+ this->spriteSettings.draw = 4;
this->hitbox = &gUnk_080FD170;
sub_0807DD50(this);
} else {
diff --git a/src/npc/npc5.c b/src/npc/npc5.c
index 8cffdf49..bc958f76 100644
--- a/src/npc/npc5.c
+++ b/src/npc/npc5.c
@@ -103,7 +103,7 @@ void sub_08060A00(Entity* this) {
}
}
- if ((this->action == 0) || (this->spriteSettings.b.draw != 0)) {
+ if ((this->action == 0) || (this->spriteSettings.draw != 0)) {
gUnk_0810AC2C[this->action](this);
}
@@ -115,7 +115,7 @@ void sub_08060A00(Entity* this) {
this->field_0x74.HWORD = gRoomControls.roomID;
CopyPosition(&gPlayerEntity, this);
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->speed = 0x120;
tmp = gRoomControls.unk_10;
this->animationState = tmp * 2;
@@ -241,11 +241,11 @@ void sub_08060D78(Entity* this) {
sub_08061358(this);
if (sub_08060F80(this) != 0) {
if ((u32)this->animIndex - 0x20 < 0x10) {
- if ((this->frames.all & 7) != 0) {
+ if ((this->frame & 7) != 0) {
this->frameDuration = 1;
UpdateAnimationSingleFrame(this);
}
- this->animationState = this->frames.all & 0x18;
+ this->animationState = this->frame & 0x18;
this->field_0x6c.HALF.LO = 0xff;
}
this->action = 1;
@@ -255,7 +255,7 @@ void sub_08060D78(Entity* this) {
void sub_08060DD0(Entity* this) {
UpdateAnimationSingleFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 1;
sub_08060E70(this, 0);
}
@@ -281,7 +281,7 @@ void sub_08060DFC(Entity* this) {
void sub_08060E34(Entity* this) {
UpdateAnimationSingleFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 2;
this->animationState = DirectionToAnimationState(GetFacingDirection(this, &gPlayerEntity)) * 2;
sub_08060E70(this, 8);
@@ -308,7 +308,7 @@ void sub_08060E94(Entity* this) {
void sub_08060EDC(Entity* this) {
s32 tmp;
- if (((u32)this->animIndex - 0x20 < 0x10) && ((this->frames.all & 0x80) == 0)) {
+ if (((u32)this->animIndex - 0x20 < 0x10) && ((this->frame & 0x80) == 0)) {
UpdateAnimationSingleFrame(this);
} else {
tmp = GetFacingDirection(this, &gPlayerEntity) + this->animationState * -4;
@@ -322,7 +322,7 @@ void sub_08060EDC(Entity* this) {
}
} else {
if ((this->animationState & 1) == 0) {
- if (((this->frames.all & 0x80) != 0) && (0xf >= (u32)this->animIndex - 0x20)) {
+ if (((this->frame & 0x80) != 0) && (0xf >= (u32)this->animIndex - 0x20)) {
sub_08060E70(this, 0);
} else {
sub_08060E94(this);
@@ -392,7 +392,7 @@ NONMATCH("asm/non_matching/npc5/sub_08061170.inc", bool32 sub_08061170(Entity* t
this->action = 6;
tmp = (sub_08079FD4(this, 1) * 0x10 - 4);
// tmp <<= 0xc;
- this->hVelocity = tmp;
+ this->zVelocity = tmp;
this->speed = 0x100;
this->direction = direction;
this->animationState = direction >> 2;
@@ -464,7 +464,7 @@ u32 sub_08061230(Entity* this) {
}
} else {
UpdateAnimationSingleFrame(this);
- if ((this->frames.all & 0x80) == 0) {
+ if ((this->frame & 0x80) == 0) {
return 1;
}
((UnkHeap*)this->myHeap)->unk_0 &= 0xfe;
@@ -489,7 +489,7 @@ NONMATCH("asm/non_matching/npc5/sub_08061358.inc", void sub_08061358(Entity* thi
switch (this->subAction) {
case 0:
UpdateAnimationSingleFrame(this);
- if ((this->frames.all & 0x80) == 0) {
+ if ((this->frame & 0x80) == 0) {
return;
}
this->subAction = 1;
@@ -512,10 +512,10 @@ NONMATCH("asm/non_matching/npc5/sub_08061358.inc", void sub_08061358(Entity* thi
break;
case 2:
UpdateAnimationSingleFrame(this);
- if ((this->frames.all & 0x80) == 0) {
+ if ((this->frame & 0x80) == 0) {
return;
}
- this->animationState = (u8)(((u8)this->frames.all & 0x18) >> 2);
+ this->animationState = (u8)(((u8)this->frame & 0x18) >> 2);
uVar2 = Random();
if ((uVar2 & 1) == 0) {
this->subAction = 0;
diff --git a/src/npc/npc58.c b/src/npc/npc58.c
index c6558930..b21de320 100644
--- a/src/npc/npc58.c
+++ b/src/npc/npc58.c
@@ -16,7 +16,7 @@ void NPC58(Entity* this) {
return;
}
this->action += 1;
- this->spriteSettings.b.draw = 2;
+ this->spriteSettings.draw = 2;
this->spriteRendering.b3 = 0;
this->spritePriority.b0 = 0;
this->spriteOrientation.flipY = 1;
diff --git a/src/npc/npc9.c b/src/npc/npc9.c
index f0924a9b..deab57c0 100644
--- a/src/npc/npc9.c
+++ b/src/npc/npc9.c
@@ -11,7 +11,7 @@ void NPC9(Entity* this) {
void sub_08062AF0(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
InitializeAnimation(this, 0);
sub_08078778(this);
}
@@ -29,7 +29,7 @@ void sub_08062B14(Entity* this) {
void sub_08062B48(Entity* this) {
GetNextFrame(this);
- if ((this->frames.b.f3) != 0) {
+ if (this->frame & 0x80) {
MessageFromTarget(0xa01);
this->action++;
}
diff --git a/src/npc/percy.c b/src/npc/percy.c
index 16578b58..67500479 100644
--- a/src/npc/percy.c
+++ b/src/npc/percy.c
@@ -22,7 +22,7 @@ extern SpriteLoadData gUnk_08112E1C;
void Percy_Head(Entity* this) {
SetExtraSpriteFrame(this, 0, (this->frameSpriteSettings & 0x3f) + 0x13);
- SetExtraSpriteFrame(this, 1, (this->frames.all & 0x7f) + 0xb);
+ SetExtraSpriteFrame(this, 1, (this->frame & 0x7f) + 0xb);
SetExtraSpriteFrame(this, 2, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 2, 1);
SetSpriteSubEntryOffsetData2(this, 2, 0);
@@ -62,7 +62,7 @@ void sub_0806B41C(Entity* this) {
case 0:
if (LoadExtraSpriteData(this, &gUnk_08112E1C)) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
if (this->type2 == 2) {
CreateFx(this, FX_SWEAT, 0);
}
@@ -160,7 +160,7 @@ void Percy_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08112E1C) != 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 2);
}
} else {
diff --git a/src/npc/phonograph.c b/src/npc/phonograph.c
index da7478a2..2e047f35 100644
--- a/src/npc/phonograph.c
+++ b/src/npc/phonograph.c
@@ -12,7 +12,7 @@ extern u16 gBG0Settings[];
void Phonograph(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x68.HWORD = 1;
this->field_0x6a.HWORD = 0xffff;
sub_0807DD64(this);
diff --git a/src/npc/picolyteBottle.c b/src/npc/picolyteBottle.c
index f95ef7d3..8ae55fc9 100644
--- a/src/npc/picolyteBottle.c
+++ b/src/npc/picolyteBottle.c
@@ -63,7 +63,7 @@ void sub_0806DFB4(Entity* this) {
obj = CreateObject(0x35, 2, this->field_0xf);
if (obj != NULL) {
obj->parent = this;
- this->attachedEntity = obj;
+ this->child = obj;
CopyPosition(this, obj);
}
sub_080788E0(this);
@@ -82,9 +82,9 @@ void sub_0806E0DC(Entity* this) {
if (this->field_0xf != 0xff) {
this->action = 2;
this->field_0x76.HWORD = TILE(this->x.HALF.HI, this->y.HALF.HI);
- if (this->attachedEntity != NULL) {
- DeleteEntity(this->attachedEntity);
- this->attachedEntity = NULL;
+ if (this->child != NULL) {
+ DeleteEntity(this->child);
+ this->child = NULL;
}
sub_08078828(this);
sub_0807B7D8(0x73, this->field_0x76.HWORD, 2);
diff --git a/src/npc/pina.c b/src/npc/pina.c
index 53c31486..0d286049 100644
--- a/src/npc/pina.c
+++ b/src/npc/pina.c
@@ -28,7 +28,7 @@ void sub_08063A80(Entity* this) {
void sub_08063A98(Entity* this) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 4);
sub_08078778(this);
}
@@ -48,7 +48,7 @@ void sub_08063B68(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x68.HALF.HI = 0;
sub_0807DD64(this);
case 1:
@@ -121,7 +121,7 @@ void sub_08063CAC(Entity* this) {
void Pina_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->y.HALF.HI -= 4;
InitAnimationForceUpdate(this, 2);
} else {
diff --git a/src/npc/pita.c b/src/npc/pita.c
index 90c28687..17cc620a 100644
--- a/src/npc/pita.c
+++ b/src/npc/pita.c
@@ -21,7 +21,7 @@ void Pita(Entity* this) {
sub_0807DD64(this);
}
sub_0807DD94(this, NULL);
- if ((this->frames.all & 1) != 0) {
+ if ((this->frame & 1) != 0) {
InitAnimationForceUpdate(this, (u32)(this->animationState >> 1));
this->field_0x80.HWORD = this->animIndex;
}
diff --git a/src/npc/postman.c b/src/npc/postman.c
index 8a378f79..2a78d066 100644
--- a/src/npc/postman.c
+++ b/src/npc/postman.c
@@ -97,10 +97,10 @@ void sub_080604DC(Entity* this) {
int iVar2;
Entity* ent;
- if (((u32)(this->spriteSettings.raw << 0x1e) >> 0x1e == 1) && sub_080040A8(this)) {
- if ((this->frames.all & 1) != 0) {
- this->frames.all &= 0xfe;
- ent = CreateFx(this, FX_DASH, 0x40);
+ if (this->spriteSettings.draw == 1 && sub_080040A8(this)) {
+ if ((this->frame & 1) != 0) {
+ this->frame &= 0xfe;
+ ent = CreateFx(this, 17, 0x40);
if (ent != NULL) {
ent->y.HALF.HI++;
sub_0805E3A0(ent, 3);
@@ -113,7 +113,7 @@ void sub_08060528(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
this->field_0x68.HALF.LO = 0;
this->field_0x68.HALF.HI = 0;
this->field_0x6a.HWORD = 0;
@@ -156,7 +156,7 @@ void sub_08060528(Entity* this) {
if (0 < (s16)this->field_0x6a.HWORD) {
if ((s16)this->field_0x6a.HWORD > 0x12b) {
this->field_0x6a.HWORD = 0;
- this->hVelocity = 0x20000;
+ this->zVelocity = 0x20000;
this->field_0x6c.HALF.HI = 1;
sub_080788E0(this);
EnqueueSFX(0x7c);
@@ -165,11 +165,11 @@ void sub_08060528(Entity* this) {
}
}
sub_08003FC4(this, 0x1800);
- if (((this->field_0x6c.HALF.HI != 0) && (this->hVelocity == 0)) && this->height.WORD == 0) {
+ if (((this->field_0x6c.HALF.HI != 0) && (this->zVelocity == 0)) && this->z.WORD == 0) {
this->field_0x6c.HALF.HI = 0;
sub_080606C0(this);
}
- if ((-1 < this->height.WORD) &&
+ if ((-1 < this->z.WORD) &&
((gPlayerEntity.collisionLayer == 0 || (this->collisionLayer == gPlayerEntity.collisionLayer)))) {
sub_0806ED78(this);
}
@@ -212,7 +212,7 @@ ASM_FUNC("asm/non_matching/postman/sub_080608E4.inc", void sub_080608E4(Entity*
void Postman_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 2);
} else {
UpdateAnimationSingleFrame(this);
diff --git a/src/npc/rem.c b/src/npc/rem.c
index cc172a52..48e32e98 100644
--- a/src/npc/rem.c
+++ b/src/npc/rem.c
@@ -38,7 +38,7 @@ void sub_0806a370(Entity* this) {
UpdateAnimationSingleFrame(this);
sub_0806ED78(this);
if (this->animIndex == 0xf) {
- pbVar1 = &this->frames.all;
+ pbVar1 = &this->frame;
if (*pbVar1 == 1) {
*pbVar1 = 0;
SoundReq(SFX_218);
@@ -71,7 +71,7 @@ void sub_0806A410(Entity* this) {
}
break;
case 1:
- if (((this->frames.all & 0x80) != 0)) {
+ if (((this->frame & 0x80) != 0)) {
sub_0806A9B0(this, *(ScriptExecutionContext**)&this->cutsceneBeh);
}
break;
@@ -86,14 +86,14 @@ void sub_0806A458(Entity* this) {
}
break;
case 1:
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->subAction = 2;
InitializeAnimation(this, 10);
ClearLocalFlag(0x62);
}
break;
case 2:
- if (((this->frames.all & 0x80) != 0)) {
+ if (((this->frame & 0x80) != 0)) {
this->action = 1;
this->subAction = 0;
this->actionDelay = 0x3c;
@@ -106,7 +106,7 @@ void sub_0806A458(Entity* this) {
void sub_0806A4CC(Entity* this) {
switch (this->subAction) {
case 0:
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
if ((u8)(this->animIndex - 8) < 2) {
this->subAction = 1;
this->field_0x6a.HWORD = 1;
@@ -118,7 +118,7 @@ void sub_0806A4CC(Entity* this) {
}
break;
case 1:
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->subAction = 2;
InitializeAnimation(this, GetAnimationState(this));
}
@@ -135,13 +135,13 @@ void sub_0806A550(Entity* this) {
this->subAction = 1;
InitializeAnimation(this, 0xc);
} else {
- if (this->frames.all == 1) {
- this->frames.all = 0;
+ if (this->frame == 1) {
+ this->frame = 0;
sub_08080964(8, 2);
gActiveScriptInfo.unk_00 |= 0x100;
SoundReq(SFX_11B);
}
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 5;
this->subAction = 0;
InitializeAnimation(this, 0xd);
@@ -155,7 +155,7 @@ void nullsub_503(void) {
void sub_0806A5C0(Entity* this) {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
InitializeAnimation(this, (Random() & 3) + 4);
}
}
@@ -182,8 +182,8 @@ void sub_0806A630(Entity* this) {
if ((gActiveScriptInfo.unk_00 & 0x100) != 0) {
GetNextFrame(this);
}
- if (this->frames.all == 1) {
- this->frames.all = 0;
+ if (this->frame == 1) {
+ this->frame = 0;
SoundReq(SFX_SECRET);
}
}
@@ -202,8 +202,8 @@ void sub_0806A830(Entity* this) {
DeleteThisEntity();
}
GetNextFrame(this);
- if (this->frames.all == 1) {
- this->frames.all = 0;
+ if (this->frame == 1) {
+ this->frame = 0;
npc = CreateNPC(0x37, 5, 0);
if (npc != NULL) {
PositionEntityOnTop(this, npc);
@@ -218,7 +218,7 @@ void sub_0806A890(Entity* this) {
sub_0805E3A0(this, 2);
}
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
DeleteThisEntity();
}
}
diff --git a/src/npc/sittingPerson.c b/src/npc/sittingPerson.c
index eebf8251..5a7d7d7a 100644
--- a/src/npc/sittingPerson.c
+++ b/src/npc/sittingPerson.c
@@ -26,9 +26,7 @@ void sub_080637B8(Entity* this) {
this->interactType = 0;
this->field_0x68.HALF.HI = this->animIndex;
tmp = sub_0806F5A4(GetFacingDirection(this, &gPlayerEntity));
- if ((this->spriteSettings.raw * 0x2000000) < 0) {
- tmp += 4;
- }
+ tmp += this->spriteSettings.flipX ? 4 : 0;
InitializeAnimation(this, tmp);
sub_0806F118(this);
} else {
@@ -49,7 +47,7 @@ void sub_08063830(Entity* this) {
}
void sub_08063850(Entity* this, ScriptExecutionContext* context) {
- InitializeAnimation(this, context->intVariable + (BOOLCAST(this->spriteSettings.b.flipX) & 4U) +
+ InitializeAnimation(this, context->intVariable + (BOOLCAST(this->spriteSettings.flipX) & 4U) +
(this->animationState >> 1));
}
@@ -83,8 +81,8 @@ void SittingPerson_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_0810CB78[this->type * 3]) != 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
- this->spriteSettings.b.flipX = 0;
+ this->spriteSettings.draw = 1;
+ this->spriteSettings.flipX = 0;
this->y.HALF.HI -= 4;
InitializeAnimation(this, 2);
sub_08096208(this, this->type);
diff --git a/src/npc/smallTownMinish.c b/src/npc/smallTownMinish.c
index eee7d9e8..7a6b8d7b 100644
--- a/src/npc/smallTownMinish.c
+++ b/src/npc/smallTownMinish.c
@@ -21,9 +21,9 @@ void SmallTownMinish(Entity* this) {
sub_0807DD94(this, NULL);
}
if ((gPlayerState.flags & 0x80) != 0) {
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
} else {
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
}
diff --git a/src/npc/smith.c b/src/npc/smith.c
index cdeff498..4bbe2f84 100644
--- a/src/npc/smith.c
+++ b/src/npc/smith.c
@@ -42,8 +42,8 @@ void Smith(Entity* this) {
} else {
this->spritePriority.b1 = 1;
}
- if ((this->frames.all & 1) != 0) {
- this->frames.all &= 0xfe;
+ if ((this->frame & 1) != 0) {
+ this->frame &= 0xfe;
CreateFx(this, FX_STARS2, 0x20);
SoundReq(gUnk_08110380[(Random() & 7)]);
}
@@ -52,7 +52,7 @@ void Smith(Entity* this) {
void Smith_Head(Entity* this) {
u8 bVar1;
- bVar1 = this->frames.all;
+ bVar1 = this->frame;
SetExtraSpriteFrame(this, 0, this->frameIndex);
if ((bVar1 & 0x40) != 0) {
SetExtraSpriteFrame(this, 1, 0x16);
@@ -102,7 +102,7 @@ void sub_08066170(Entity* this) {
void sub_08066178(Entity* this) {
if (LoadExtraSpriteData(this, &gUnk_08110354) != 0) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_0807DD50(this);
}
@@ -117,7 +117,7 @@ void sub_080661BC(Entity* this) {
if (this->animIndex == 0xc) {
UpdateAnimationSingleFrame(this);
- if ((this->frames.b.f3) != 0) {
+ if (this->frame & 0x80) {
this->field_0x80.HWORD = GetAnimationState(this) + 8;
InitAnimationForceUpdate(this, this->field_0x80.HWORD);
}
@@ -168,7 +168,7 @@ void Smith_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08110354) != 0) {
this->action++;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 6);
}
} else {
diff --git a/src/npc/stamp.c b/src/npc/stamp.c
index b983f9c5..293e16b1 100644
--- a/src/npc/stamp.c
+++ b/src/npc/stamp.c
@@ -22,7 +22,7 @@ void Stamp(Entity* ent) {
void sub_08062BD4(Entity* ent) {
ent->action = 1;
- ent->spriteSettings.b.draw = 1;
+ ent->spriteSettings.draw = 1;
InitializeAnimation(ent, 0);
sub_08078778(ent);
}
@@ -39,7 +39,7 @@ void sub_08062BF8(Entity* ent) {
void sub_08062C24(Entity* ent) {
GetNextFrame(ent);
- if ((ent->frames.all & 128) != 0) {
+ if ((ent->frame & 128) != 0) {
InitializeAnimation(ent, 4);
MessageFromTarget(2561);
ent->action++;
diff --git a/src/npc/stockwell.c b/src/npc/stockwell.c
index 91e4a53c..c324c681 100644
--- a/src/npc/stockwell.c
+++ b/src/npc/stockwell.c
@@ -27,7 +27,7 @@ void sub_08065080(Entity* this) {
ScriptExecutionContext* context;
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
InitializeAnimation(this, 4);
sub_08078778(this);
@@ -55,7 +55,7 @@ void sub_080651D8(Entity* this) {
}
void sub_080651F8(Entity* this) {
- if ((this->frames.all & 0x20) == 0) {
+ if ((this->frame & 0x20) == 0) {
this->subAction = 1;
this->actionDelay = 0x3c;
InitializeAnimation(this, 1);
@@ -146,7 +146,7 @@ void sub_080654EC(Entity* this) {
}
void sub_080654FC(Entity* this) {
- if ((this->frames.all & 0x20) != 0) {
+ if ((this->frame & 0x20) != 0) {
gActiveScriptInfo.commandSize = 0;
} else {
gActiveScriptInfo.flags |= 1;
diff --git a/src/npc/sturgeon.c b/src/npc/sturgeon.c
index 0e317696..749e0732 100644
--- a/src/npc/sturgeon.c
+++ b/src/npc/sturgeon.c
@@ -59,7 +59,7 @@ void sub_08064B44(Entity* this) {
sub_08064CC0(this);
this->action = 1;
this->subAction = 0;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
}
}
@@ -80,7 +80,7 @@ void sub_08064C50(Entity* this) {
}
void Sturgeon_Head(Entity* this) {
- SetExtraSpriteFrame(this, 0, (u8)this->frames.all & 0x3f);
+ SetExtraSpriteFrame(this, 0, (u8)this->frame & 0x3f);
SetExtraSpriteFrame(this, 1, (u32)this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
@@ -119,7 +119,7 @@ void Sturgeon_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_0810FA38) != 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 6);
}
} else {
diff --git a/src/npc/talon.c b/src/npc/talon.c
index 841d9467..4629119e 100644
--- a/src/npc/talon.c
+++ b/src/npc/talon.c
@@ -66,7 +66,7 @@ void sub_0806559C(Entity* this) {
void sub_08065608(Entity* this) {
if (LoadExtraSpriteData(this, &gUnk_0810FEB0) != 0) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
sub_0807DD50(this);
@@ -145,7 +145,7 @@ void sub_08065780(Entity* this, ScriptExecutionContext* context) {
}
void Talon_Head(Entity* this) {
- SetExtraSpriteFrame(this, 0, ((this->frames.all & 7) + 0xB));
+ SetExtraSpriteFrame(this, 0, ((this->frame & 7) + 0xB));
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
@@ -155,7 +155,7 @@ void Talon_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_0810FEB0) != 0) {
this->action++;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 6);
}
} else {
diff --git a/src/npc/teachers.c b/src/npc/teachers.c
index bf7e6983..9e411a7a 100644
--- a/src/npc/teachers.c
+++ b/src/npc/teachers.c
@@ -15,7 +15,7 @@ void Teachers(Entity* this) {
case 0:
if (LoadExtraSpriteData(this, &gUnk_08113910[this->type * 4])) {
this->action = 1;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
this->animationState = this->actionDelay;
this->field_0x68.HALF.HI = 0;
sub_0805E3A0(this, 2);
@@ -52,7 +52,7 @@ void Teachers_Head(Entity* this) {
u8 bVar2;
u32 uVar3;
- uVar3 = this->frames.all & -0x81;
+ uVar3 = this->frame & -0x81;
bVar1 = this->frameIndex;
bVar2 = this->frameSpriteSettings & 0x3f;
if (this->type == 0) {
@@ -84,7 +84,7 @@ void Teachers_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08113910[this->type * 4])) {
this->action++;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
InitializeAnimation(this, 2);
}
} else {
diff --git a/src/npc/tingleSiblings.c b/src/npc/tingleSiblings.c
index f4111b05..18587c36 100644
--- a/src/npc/tingleSiblings.c
+++ b/src/npc/tingleSiblings.c
@@ -70,13 +70,13 @@ void sub_08064DE4(Entity* this) {
break;
}
{
- u8 bVar1 = this->frames.all;
+ u8 bVar1 = this->frame;
u8 bVar5 = bVar1 & 0xf;
- this->frames.all = bVar5 ^ bVar1;
+ this->frame = bVar5 ^ bVar1;
if (bVar1 & 0xf) {
Entity* fx = CreateFx(this, bVar5 == 3 ? 0x2a : 0x29, 0);
if (fx && bVar5 == 2) {
- fx->spriteSettings.b.flipX = 1;
+ fx->spriteSettings.flipX = 1;
}
}
}
@@ -111,7 +111,7 @@ void TingleSiblings_Fusion(Entity* this) {
u32 tmp;
if (this->action == 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
tmp = 6;
if (this->type == 0) {
tmp = 10;
diff --git a/src/npc/townMinish.c b/src/npc/townMinish.c
index b5103040..4aa9bcfd 100644
--- a/src/npc/townMinish.c
+++ b/src/npc/townMinish.c
@@ -157,7 +157,7 @@ void TownMinish_Head(Entity* this) {
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
} else {
- frames = this->frames.all;
+ frames = this->frame;
if (frames != 0xff) {
frames &= ~0x80;
}
@@ -210,7 +210,7 @@ void sub_0806AEE4(Entity* this) {
this->animationState = sub_0806F5B0(index);
}
tmp2 &= 0x7f;
- this->frames.all = tmp1;
+ this->frame = tmp1;
this->frameIndex = tmp2;
this->frameSpriteSettings = 1;
this->animIndex = 0;
@@ -223,13 +223,13 @@ void sub_0806AF60(Entity* this, ScriptExecutionContext* context) {
}
void sub_0806AF70(Entity* this, ScriptExecutionContext* context) {
- this->hVelocity = 0x24000;
+ this->zVelocity = 0x24000;
}
void sub_0806AF78(Entity* this, ScriptExecutionContext* context) {
sub_08003FC4(this, 0x1800);
- if (0 <= this->height.WORD && this->hVelocity < 1) {
- this->height.WORD = 0;
+ if (0 <= this->z.WORD && this->zVelocity < 1) {
+ this->z.WORD = 0;
sub_0806AF70(this, context);
}
}
@@ -336,7 +336,7 @@ void TownMinish_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08112674[this->type * 4])) {
this->action++;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 6);
}
} else {
diff --git a/src/npc/townsperson.c b/src/npc/townsperson.c
index eb86baed..ae082b16 100644
--- a/src/npc/townsperson.c
+++ b/src/npc/townsperson.c
@@ -98,7 +98,7 @@ void sub_08061CEC(Entity* this) {
if (LoadExtraSpriteData(this, gUnk_0810B6EC[this->type])) {
this->action = 1;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
this->animationState = this->actionDelay;
this->field_0x68.HALF.HI = 0xff;
uVar2 = sub_0805ACC0(this);
@@ -164,13 +164,13 @@ void sub_08061E70(Entity* this) {
}
// FIXME this is actually (Entity* this, ScriptExecutionContext* context)
-void sub_08061E90(Entity* this, Entity* arg1) {
+void sub_08061E90(Entity* this, ScriptExecutionContext* arg1) {
u32 animIndex;
s32 iVar4;
- if (arg1->spriteSettings.raw == 0) {
- arg1->spriteSettings.raw++;
- arg1->spriteIndex = (Random() & 0x3f) + 0x20;
+ if (arg1->unk_18 == 0) {
+ arg1->unk_18++;
+ arg1->unk_12 = (Random() & 0x3f) + 0x20;
animIndex = DirectionRound(Random());
switch (this->direction) {
case 0x0:
@@ -205,23 +205,23 @@ void sub_08061E90(Entity* this, Entity* arg1) {
iVar4 = this->x.HALF.HI - *(s16*)&this->field_0x6a.HWORD;
if (0x10 < iVar4) {
this->x.HALF.HI = this->field_0x6a.HWORD + 0x10;
- arg1->spriteIndex = 1;
+ arg1->unk_12 = 1;
}
if (iVar4 < -0x10) {
this->x.HALF.HI = *(s16*)&this->field_0x6a.HWORD - 0x10;
- arg1->spriteIndex = 1;
+ arg1->unk_12 = 1;
}
iVar4 = this->y.HALF.HI - *(s16*)&this->field_0x6c;
if (0x10 < iVar4) {
this->y.HALF.HI = *(s16*)&this->field_0x6c + 0x10;
- arg1->spriteIndex = 1;
+ arg1->unk_12 = 1;
}
if (iVar4 < -0x10) {
this->y.HALF.HI = *(s16*)&this->field_0x6c - 0x10;
- arg1->spriteIndex = 1;
+ arg1->unk_12 = 1;
}
- if (--arg1->spriteIndex != 0) {
+ if (--arg1->unk_12 != 0) {
gActiveScriptInfo.commandSize = 0;
}
}
@@ -293,7 +293,7 @@ void Townsperson_Fusion(Entity* this) {
return;
}
this->action++;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
}
sub_08061CB4(this, 6);
}
diff --git a/src/npc/vaati.c b/src/npc/vaati.c
index c5b8a757..065b81ff 100644
--- a/src/npc/vaati.c
+++ b/src/npc/vaati.c
@@ -24,7 +24,7 @@ void Vaati(Entity* this) {
void VaatiAction0(Entity* this) {
this->action = 1;
this->subAction = 0;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = 0;
this->field_0x68.HALF.HI = 0;
sub_0805E3A0(this, 2);
@@ -39,8 +39,8 @@ void VaatiAction1(Entity* this) {
sub_08095CB0(this);
}
- if ((this->frames.all & ~0x80) != 0) {
- switch (this->frames.all & ~0x80u) {
+ if ((this->frame & ~0x80) != 0) {
+ switch (this->frame & ~0x80u) {
case 1:
EnqueueSFX(SFX_21C);
break;
@@ -59,7 +59,7 @@ void VaatiAction1(Entity* this) {
EnqueueSFX(SFX_21D);
break;
}
- this->frames.b.f3 = 0;
+ this->frame &= ~0x80;
}
}
diff --git a/src/npc/vaatiReborn.c b/src/npc/vaatiReborn.c
index 61c88c55..bc593edf 100644
--- a/src/npc/vaatiReborn.c
+++ b/src/npc/vaatiReborn.c
@@ -57,7 +57,7 @@ void VaatiRebornAction0(Entity* this) {
break;
case 2:
if ((this->type2 & 2) != 0) {
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
}
sub_0806B96C(this);
InitAnimationForceUpdate(this, 0);
@@ -134,15 +134,15 @@ void VaatiRebornAction1(Entity* this) {
}
break;
case 1:
- if (this->frames.b.f3 != 0) {
+ if (this->frame & 0x80) {
this->subAction = 2;
sub_0801D2B4(this, 0x13f);
InitAnimationForceUpdate(this, this->subAction - 1);
}
break;
case 2:
- if ((this->frames.all & 0x10) != 0) {
- this->frames.all &= 0xef;
+ if ((this->frame & 0x10) != 0) {
+ this->frame &= 0xef;
switch (++this->actionDelay) {
case 1:
@@ -157,7 +157,7 @@ void VaatiRebornAction1(Entity* this) {
}
break;
case 3:
- if (this->frames.b.f3 != 0) {
+ if (this->frame & 0x80) {
SetRoomFlag(0);
DeleteThisEntity();
}
@@ -197,7 +197,7 @@ void sub_0806B96C(Entity* this) {
DeleteThisEntity();
}
ptr = &gUnk_08112F80[this->type2];
- this->spriteSettings.b.draw = entity->spriteSettings.b.draw;
+ this->spriteSettings.draw = entity->spriteSettings.draw;
PositionRelative(entity, this, ptr->x << 0x10, (ptr->y + 0x21) << 0x10);
UpdateAnimationSingleFrame(this);
}
diff --git a/src/npc/windTribespeople.c b/src/npc/windTribespeople.c
index 789e5b2c..c88c32f5 100644
--- a/src/npc/windTribespeople.c
+++ b/src/npc/windTribespeople.c
@@ -44,7 +44,7 @@ void sub_0806C798(Entity* this) {
iVar1 = LoadExtraSpriteData(this, gUnk_08113A1C + (this->type * 4));
if (iVar1 != 0) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->animationState = this->actionDelay;
sub_0807DD50(this);
sub_0806C7D4(this);
@@ -94,7 +94,7 @@ void WindTribespeople_Head(Entity* this) {
u32 uVar2;
u8 pbVar3;
- pbVar3 = (this->frames.all & 0x3F);
+ pbVar3 = (this->frame & 0x3F);
if (this->type == 4) {
SetExtraSpriteFrame(this, 0, 9);
SetExtraSpriteFrame(this, 1, pbVar3);
@@ -103,7 +103,7 @@ void WindTribespeople_Head(Entity* this) {
SetSpriteSubEntryOffsetData1(this, 2, 1);
sub_0807000C(this);
} else {
- if (this->frames.b.f2 != 0) {
+ if (this->frame & 0x40) {
uVar2 = 1;
uVar1 = 0;
} else {
@@ -209,7 +209,7 @@ void WindTribespeople_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08113A1C[this->type * 4]) != 0) {
this->action += 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
InitializeAnimation(this, 6);
}
} else {
diff --git a/src/npc/zelda.c b/src/npc/zelda.c
index 13045c51..e9e16171 100644
--- a/src/npc/zelda.c
+++ b/src/npc/zelda.c
@@ -21,7 +21,7 @@ void Zelda(Entity* this) {
void sub_08066CCC(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
PrependEntityToList(this, 7);
sub_0805E3A0(this, 2);
sub_0807DD50(this);
@@ -41,7 +41,7 @@ void sub_08066D14(Entity* this, ScriptExecutionContext* context) {
parent = this->parent;
if (parent != NULL) {
this->animationState = parent->animationState;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
CopyPosition(parent, this);
sub_08068680(this, this->parent);
context->condition = 1;
@@ -56,9 +56,9 @@ void sub_08066D4C(Entity* this, ScriptExecutionContext* context) {
parent = this->parent;
if (this->parent != NULL) {
CopyPosition(this, parent);
- this->parent->spriteSettings.b.draw = 1;
+ this->parent->spriteSettings.draw = 1;
this->parent->animationState = this->animationState;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->field_0x17 &= 0xFE;
sub_08068694(this, this->parent);
context->condition = 1;
@@ -127,20 +127,20 @@ void sub_08066E80(Entity* this, ScriptExecutionContext* context) {
break;
case 1:
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 1) {
+ if (this->frame & 1) {
context->unk_18++;
- this->hVelocity = 0x20000;
- this->frames.all &= 0xFE;
+ this->zVelocity = 0x20000;
+ this->frame &= 0xFE;
SoundReq(SFX_PLY_JUMP);
}
break;
case 2:
sub_0806F62C(this, 0x100, 0x80);
sub_08003FC4(this, 0x2000);
- if (!(this->frames.all & 1)) {
+ if (!(this->frame & 1)) {
UpdateAnimationSingleFrame(this);
}
- if (this->hVelocity < 0) {
+ if (this->zVelocity < 0) {
context->unk_18++;
}
break;
@@ -154,7 +154,7 @@ void sub_08066E80(Entity* this, ScriptExecutionContext* context) {
break;
case 4:
UpdateAnimationSingleFrame(this);
- if (this->frames.b.f3) {
+ if (this->frame & 0x80) {
gActiveScriptInfo.flags |= 1;
return;
}
diff --git a/src/npc/zeldaFollower.c b/src/npc/zeldaFollower.c
index 649abd41..be6d633c 100644
--- a/src/npc/zeldaFollower.c
+++ b/src/npc/zeldaFollower.c
@@ -12,7 +12,7 @@ void sub_08068578(Entity* this);
void ZeldaFollower(Entity* this) {
if (this->action == 0) {
this->action++;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
this->animationState = 4;
this->field_0x68.HALF.LO = 0;
this->field_0x68.HALF.HI = 0;
@@ -23,7 +23,7 @@ void ZeldaFollower(Entity* this) {
if ((s8)this->field_0x68.HALF.LO != 0) {
sub_08068318(this);
} else {
- this->spriteSettings.b.draw = FALSE;
+ this->spriteSettings.draw = FALSE;
}
}
@@ -43,12 +43,12 @@ ASM_FUNC("asm/non_matching/zeldaFollower/sub_08068578.inc", void sub_08068578(En
void sub_08068680(Entity* this, Entity* entity) {
entity->field_0x68.HALF.LO = 0;
- entity->spriteSettings.b.draw = 0;
+ entity->spriteSettings.draw = 0;
}
void sub_08068694(Entity* this, Entity* entity) {
entity->field_0x68.HALF.LO = 1;
- entity->spriteSettings.b.draw = 1;
+ entity->spriteSettings.draw = 1;
entity->animationState = this->animationState;
sub_08068578(entity);
InitAnimationForceUpdate(entity, entity->animationState / 2);
diff --git a/src/object/archway.c b/src/object/archway.c
index 49f3f497..823fa485 100644
--- a/src/object/archway.c
+++ b/src/object/archway.c
@@ -5,7 +5,7 @@
void Archway(Entity* this) {
if (this->action == 0) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->frameIndex = this->type2;
this->collisionLayer = 2;
UpdateSpriteForCollisionLayer(this);
diff --git a/src/object/backgroundCloud.c b/src/object/backgroundCloud.c
index aaee8cf2..2ab9051a 100644
--- a/src/object/backgroundCloud.c
+++ b/src/object/backgroundCloud.c
@@ -13,7 +13,7 @@ void BackgroundCloud(Entity* this) {
void sub_0808F658(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spriteOrientation.flipY = 3;
this->spriteRendering.b3 = 3;
this->spritePriority.b0 = this->type;
diff --git a/src/object/bakerOven.c b/src/object/bakerOven.c
index 13cb6627..b1c3a1db 100644
--- a/src/object/bakerOven.c
+++ b/src/object/bakerOven.c
@@ -33,7 +33,7 @@ void sub_0809CC74(Entity* this) {
sub_0809CDF0(this);
} else {
if (this->type2 & 1) {
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->actionDelay = 20;
} else {
this->action = 2;
@@ -48,7 +48,7 @@ void sub_0809CD0C(Entity* this) {
if (this->type) {
GetNextFrame(this);
- frames = &this->frames.all;
+ frames = &this->frame;
if (*frames & 1) {
*frames &= 0xfe;
this->y.HALF.HI++;
@@ -56,7 +56,7 @@ void sub_0809CD0C(Entity* this) {
if ((*frames & 0x80) && this->frameDuration == 1) {
this->action = 2;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
/* Damage minish link if he touches a steam cloud */
@@ -79,7 +79,7 @@ void sub_0809CDB4(Entity* this) {
this->action = 1;
this->actionDelay = 30;
this->field_0xf = 0;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->y.HALF.HI = this->parent->y.HALF.HI - 0xe;
InitializeAnimation(this, 0);
}
diff --git a/src/object/bell.c b/src/object/bell.c
index 3a1e7d41..a3e7ce3c 100644
--- a/src/object/bell.c
+++ b/src/object/bell.c
@@ -9,7 +9,7 @@ void Bell(Entity* ent) {
void sub_08097D90(Entity* ent) {
ent->action = 1;
- ent->spriteSettings.b.draw = 1;
+ ent->spriteSettings.draw = 1;
ent->collisionLayer = 1;
ent->spritePriority.b0 = 0;
UpdateSpriteForCollisionLayer(ent);
diff --git a/src/object/bigVortex.c b/src/object/bigVortex.c
index 9a06d4ff..a34d7e59 100644
--- a/src/object/bigVortex.c
+++ b/src/object/bigVortex.c
@@ -23,7 +23,7 @@ void BigVortex(Entity* this) {
void sub_08098D1C(Entity* this) {
u32 temp;
this->action = 1;
- this->height.HALF.HI = -0x10;
+ this->z.HALF.HI = -0x10;
temp = this->field_0x86.HWORD;
@@ -31,7 +31,7 @@ void sub_08098D1C(Entity* this) {
this->action = 1;
} else {
this->action = 3;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
sub_08098E88(this);
}
sub_0805E3A0(this, 6);
@@ -54,7 +54,7 @@ void sub_08098D6C(Entity* this) {
void sub_08098D9C(Entity* this) {
if (--this->actionDelay == 0) {
this->action = 3;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
sub_08098E88(this);
}
}
@@ -88,7 +88,7 @@ void sub_08098E3C(Entity* this) {
if (this->action == 0) {
this->action = 1;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
InitAnimationForceUpdate(this, this->type);
}
temp = &gUnk_08123690[this->type & 2];
diff --git a/src/object/bird.c b/src/object/bird.c
index 758a3564..da47a078 100644
--- a/src/object/bird.c
+++ b/src/object/bird.c
@@ -26,11 +26,11 @@ void sub_0809CF54(Entity* this) {
Entity* target;
this->action++;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
this->actionDelay = 0x31;
this->field_0xf = 1;
- this->hVelocity = -0x18000;
- this->height.WORD = -0x38C000;
+ this->zVelocity = -0x18000;
+ this->z.WORD = -0x38C000;
this->field_0x68.HWORD = -0x800;
this->speed = 0x280;
this->direction = 8;
@@ -85,7 +85,7 @@ void sub_0809D084(Entity* this) {
PositionRelative(this->parent, this, 0, 0x80000);
} else {
this->subAction++;
- this->hVelocity = temp;
+ this->zVelocity = temp;
}
}
}
@@ -96,7 +96,7 @@ void sub_0809D0AC(Entity* this) {
if (sub_080044EC(this, 0x1800) < 2) {
this->type = 2;
this->action = 1;
- this->height.WORD = 0;
+ this->z.WORD = 0;
this->collisionLayer = 1;
SetLocalFlag(0x45);
SoundReq(SFX_SECRET);
@@ -134,14 +134,14 @@ void sub_0809D178(Entity* this) {
this->action++;
this->collisionLayer = 2;
UpdateSpriteForCollisionLayer(this);
- this->frames.all = 0x80;
+ this->frame = 0x80;
}
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
InitializeAnimation(this, Random() & 3);
this->frameDuration = (Random() & 0xf) + 0x10;
- this->spriteSettings.b.flipX = FALSE;
+ this->spriteSettings.flipX = FALSE;
if ((Random() & 1) != 0) {
- this->spriteSettings.b.flipX = TRUE;
+ this->spriteSettings.flipX = TRUE;
}
} else {
GetNextFrame(this);
diff --git a/src/object/book.c b/src/object/book.c
index 3c60630c..4b20cf8e 100644
--- a/src/object/book.c
+++ b/src/object/book.c
@@ -31,7 +31,7 @@ void sub_0809B3C4(Entity* this) {
}
if (obtained != 2) {
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
}
@@ -61,7 +61,7 @@ void sub_0809B3C4(Entity* this) {
this->action = 3;
scroll = (u16)gRoomControls.roomScrollY - 0x10;
height = (u16)this->y.HALF.HI - scroll;
- this->height.HALF.HI -= height;
+ this->z.HALF.HI -= height;
return;
}
case 2:
@@ -113,7 +113,7 @@ void sub_0809B524(Entity* this) {
if (--this->field_0xf == 0) {
this->action = 3;
this->y.HALF.HI += 32;
- this->height.HALF.HI -= 32;
+ this->z.HALF.HI -= 32;
} else {
this->action = 1;
this->actionDelay = 22;
@@ -152,7 +152,7 @@ void sub_0809B5B4(Entity* this) {
}
void sub_0809B5EC(Entity* this) {
- if (this->spriteSettings.b.draw == 1) {
+ if (this->spriteSettings.draw == 1) {
switch (this->subAction) {
case 0: {
Entity* parent;
@@ -199,7 +199,7 @@ void sub_0809B5EC(Entity* this) {
case 1: {
u8 doTextBox = gMessage.doTextBox & 0x7f;
if (!doTextBox) {
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->subAction = doTextBox;
}
break;
@@ -225,7 +225,7 @@ void sub_0809B6B0(Entity* parent, Entity* this) {
PositionRelative(parent, this, 0, offset);
- this->height.HALF.HI = -(this->type << 2);
+ this->z.HALF.HI = -(this->type << 2);
this->spritePriority.b0 = 3 - this->type;
}
diff --git a/src/object/button.c b/src/object/button.c
index 0a1c7fbb..16b1896f 100644
--- a/src/object/button.c
+++ b/src/object/button.c
@@ -167,13 +167,13 @@ Entity* sub_08081D74(Entity* this) {
}
}
}
- this->attachedEntity = ent;
+ this->child = ent;
return ent;
}
u32 sub_08081E0C(Entity* this) {
Entity* tmp = &gPlayerEntity;
- if (tmp->height.HALF.HI != 0 || !sub_08079F8C()) {
+ if (tmp->z.HALF.HI != 0 || !sub_08079F8C()) {
return 0;
} else {
return sub_080041A0(this, tmp, 5, 6);
@@ -251,8 +251,8 @@ u32 sub_08081F7C(Entity* this, u32 r7) {
if (this->actionDelay == 0)
return 1;
if (--this->actionDelay > 6) {
- if (this->attachedEntity)
- this->attachedEntity->spriteOffsetY = 0xfc;
+ if (this->child)
+ this->child->spriteOffsetY = 0xfc;
} else {
if (this->actionDelay == 6) {
SetFlag(this->field_0x86.HWORD);
@@ -272,10 +272,10 @@ extern void sub_080044AE(Entity*, u32, u32);
void sub_08081FF8(Entity* this) {
u32 direction;
u32 i;
- if (this->attachedEntity != &gPlayerEntity)
+ if (this->child != &gPlayerEntity)
return;
- direction = GetFacingDirection(this->attachedEntity, this);
- sub_080044AE(this->attachedEntity, 0x200, direction);
+ direction = GetFacingDirection(this->child, this);
+ sub_080044AE(this->child, 0x200, direction);
for (i = 0; i < 3; i++) {
if (gUnk_03004040[i]) {
sub_080044AE(gUnk_03004040[i], 0x200, direction);
diff --git a/src/object/chestSpawner.c b/src/object/chestSpawner.c
index 3f7e6006..811817d7 100644
--- a/src/object/chestSpawner.c
+++ b/src/object/chestSpawner.c
@@ -24,7 +24,7 @@ void sub_08083E08(Entity* this) {
void sub_08083E20(Entity* this) {
this->action = 3;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spriteRendering.alphaBlend = 0;
sub_080842D8(this);
sub_08078828(this);
diff --git a/src/object/cloud.c b/src/object/cloud.c
index a2c20ff6..75fc7be6 100644
--- a/src/object/cloud.c
+++ b/src/object/cloud.c
@@ -35,7 +35,7 @@ void sub_0809F4DC(Entity* this) {
void sub_0809F514(Entity* this) {
this->action = 1;
this->actionDelay = 120;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->field_0x68.HALF.LO = 12;
gRoomControls.cameraTarget = this;
gUnk_02034490[0] = 255;
@@ -69,7 +69,7 @@ void sub_0809F5B0(Entity* this) {
void sub_0809F5DC(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->field_0x68.HALF.LO = 12;
}
diff --git a/src/object/fan.c b/src/object/fan.c
index 5d800011..0642a17e 100644
--- a/src/object/fan.c
+++ b/src/object/fan.c
@@ -52,7 +52,7 @@ void sub_0809ED88(Entity* this) {
void sub_0809EDE4(Entity* this) {
sub_0809F08C();
sub_0809EE44(this);
- if (this->frames.b.f3) {
+ if (this->frame & 0x80) {
sub_0809EE34(this);
}
}
diff --git a/src/object/fileScreenObjects.c b/src/object/fileScreenObjects.c
index 5c5e419e..9c18f83c 100644
--- a/src/object/fileScreenObjects.c
+++ b/src/object/fileScreenObjects.c
@@ -46,7 +46,7 @@ extern const u8 gUnk_08121D48[];
extern const struct_08121D54 gUnk_08121D54[];
void FileScreenObjects(Entity* this) {
- if (this->currentHealth == 0) {
+ if (this->health == 0) {
sub_0808EFF0(this);
}
gUnk_08121C64[this->type](this);
@@ -62,7 +62,7 @@ void sub_0808E7D8(Entity* this) {
void sub_0808E7F0(Entity* this) {
sub_080AE008(this, 1, 2);
this->palette.b.b0 = 0xF;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->type2 = 0xFF;
this->action = 1;
}
@@ -76,7 +76,7 @@ void sub_0808E818(Entity* this) {
this->type2 = var2;
this->field_0x68.HWORD = var2;
this->field_0x6a.HWORD = var2;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
return;
}
@@ -111,7 +111,7 @@ void sub_0808E818(Entity* this) {
}
}
- this->spriteSettings.b.flipX = this->animationState == 3;
+ this->spriteSettings.flipX = this->animationState == 3;
var0 = this->field_0x68.HWORD + this->field_0x70.BYTES.byte0 + this->animationState;
if (this->field_0x6a.HWORD != var0) {
this->field_0x6a.HWORD = var0;
@@ -119,7 +119,7 @@ void sub_0808E818(Entity* this) {
InitAnimationForceUpdate(this, (u8)var0);
}
- this->spriteSettings.b.draw = 2;
+ this->spriteSettings.draw = 2;
}
static bool32 sub_0808E950(void) {
@@ -160,19 +160,19 @@ void sub_0808E988(Entity* this) {
if (this->type2 != i) {
InitAnimationForceUpdate(this, i);
}
- this->spriteSettings.b.draw = 2;
+ this->spriteSettings.draw = 2;
return;
}
}
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
void sub_0808E9F4(Entity* this) {
if (sub_0808E950() && gSave.unk6) {
- this->spriteSettings.b.draw = 2;
+ this->spriteSettings.draw = 2;
} else {
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
}
@@ -182,9 +182,9 @@ void sub_0808EA28(Entity* this) {
if (this->type == 3) {
if (gSaveHeader->gameLanguage > LANGUAGE_EN) {
- this->spriteSettings.b.draw = 2;
+ this->spriteSettings.draw = 2;
} else {
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
}
@@ -443,9 +443,9 @@ void sub_0808EE98(Entity* this) {
void sub_0808EED8(Entity* this) {
int var0;
if (gUnk_02032EC0.lastState != 3) {
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
} else {
- this->spriteSettings.b.draw = 2;
+ this->spriteSettings.draw = 2;
var0 = this->type - 19;
this->palette.b.b0 = gMenu.column_idx == var0 ? 4 : 3;
}
@@ -454,9 +454,9 @@ void sub_0808EED8(Entity* this) {
void sub_0808EF24(Entity* this) {
int var0;
if (gUnk_02032EC0.lastState != 3) {
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
} else {
- this->spriteSettings.b.draw = 2;
+ this->spriteSettings.draw = 2;
if (this->type == 21) {
var0 = ((struct_02000000*)0x2000000)->messageSpeed;
} else {
@@ -518,9 +518,9 @@ static void sub_0808EFF0(Entity* this) {
const struct_08121D54* var0;
u8 var1;
- this->spriteSettings.b.draw = 2;
+ this->spriteSettings.draw = 2;
this->speed = 0x400;
- this->currentHealth = 1;
+ this->health = 1;
this->frameIndex = 0xFF;
this->animIndex = 0xFF;
var0 = &gUnk_08121D54[this->type];
diff --git a/src/object/giantLeaf.c b/src/object/giantLeaf.c
index 9badc65b..a61b267a 100644
--- a/src/object/giantLeaf.c
+++ b/src/object/giantLeaf.c
@@ -11,7 +11,7 @@ extern s16 gUnk_0812176A[];
void GiantLeaf(Entity* ent) {
if (ent->action == 0) {
ent->action = 1;
- ent->spriteSettings.b.draw = 1;
+ ent->spriteSettings.draw = 1;
ent->spriteRendering.b3 = 3;
ent->spritePriority.b0 = 7;
ent->frameIndex = ent->type;
diff --git a/src/object/greatFairy.c b/src/object/greatFairy.c
index 2a2cacf0..8eb5513f 100644
--- a/src/object/greatFairy.c
+++ b/src/object/greatFairy.c
@@ -109,7 +109,7 @@ void GreatFairy_SpawningUpdate(Entity* this) {
SoundReq(SFX_145);
this->action = 4;
this->actionDelay = 60;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
}
}
}
@@ -154,7 +154,7 @@ void GreatFairy_WingsCallBehavior(Entity* this) {
void GreatFairy_WingsInit(Entity* this) {
GreatFairy_InitializeAnimation(this);
this->spritePriority.b0 = 5;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spriteRendering.alphaBlend = 1;
gScreen.controls.layerFXControl = 0xF40;
gScreen.controls.alphaBlend = BLDALPHA_BLEND(9, 8);
@@ -184,7 +184,7 @@ void GreatFairy_WakeCallBehavior(Entity* this) {
void GreatFairy_WakeInit(Entity* this) {
GreatFairy_InitializeAnimation(this);
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spritePriority.b0 = 6;
}
@@ -205,7 +205,7 @@ void GreatFairy_MiniInit(Entity* this) {
CopyPosition(this, aff);
aff->parent = this;
GreatFairy_InitializeAnimation(this);
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0xf = 0;
}
}
@@ -215,12 +215,12 @@ void GreatFairy_MiniRisingUpdate(Entity* this) {
Entity* target;
GetNextFrame(this);
- this->height.WORD -= 0x8000;
- if (this->height.HALF.HI == -20) {
+ this->z.WORD -= 0x8000;
+ if (this->z.HALF.HI == -20) {
this->action = 2;
SoundReq(SFX_HEART_CONTAINER_SPAWN);
} else {
- if (((this->height.HALF.HI == -10) && (this->field_0xf == 0)) &&
+ if (((this->z.HALF.HI == -10) && (this->field_0xf == 0)) &&
(target = GreatFairy_CreateForm(this, DROPLET, 0), target != NULL)) {
PositionRelative(this, target, 0, 0x40000);
this->field_0xf = 1;
@@ -245,7 +245,7 @@ void GreatFairy_MiniAffineCallBehavior(Entity* this) {
void GreatFairy_MiniAffineInit(Entity* this) {
GreatFairy_InitializeAnimation(this);
this->spritePriority.b0 = 6;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
}
// Getting ready for affine transformation
@@ -254,7 +254,7 @@ void GreatFairy_MiniAffineInit2(Entity* this) {
CopyPosition(parent, this);
- if (this->height.HALF.HI == -20) {
+ if (this->z.HALF.HI == -20) {
this->action = 2;
this->actionDelay = 90;
this->speed = 4096;
@@ -282,15 +282,15 @@ void GreatFairy_DropletCallBehavior(Entity* this) {
void GreatFairy_DropletInit(Entity* this) {
GreatFairy_InitializeAnimation(this);
- this->spriteSettings.b.draw = 1;
- this->height.HALF.HI = 0;
+ this->spriteSettings.draw = 1;
+ this->z.HALF.HI = 0;
this->spritePriority.b0 = 5;
SoundReq(SFX_140);
}
void GreatFairy_DropletUpdate(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
DeleteEntity(this);
}
}
@@ -302,7 +302,7 @@ void GreatFairy_RippleCallBehavior(Entity* this) {
void GreatFairy_RippleInit(Entity* this) {
GreatFairy_InitializeAnimation(this);
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spritePriority.b0 = 6;
}
@@ -322,7 +322,7 @@ void GreatFairy_BigRippleCallBehavior(Entity* this) {
void GreatFairy_BigRippleInit(Entity* this) {
GreatFairy_InitializeAnimation(this);
this->actionDelay = 120;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spritePriority.b0 = 5;
SoundReq(SFX_TELEPORTER);
}
@@ -350,13 +350,13 @@ void GreatFairy_EnergyCallBehavior(Entity* this) {
void GreatFairy_EnergyInit(Entity* this) {
GreatFairy_InitializeAnimation(this);
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spritePriority.b0 = 5;
}
void GreatFairy_EnergyUpdate(Entity* this) {
GetNextFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
DeleteEntity(this);
}
}
@@ -372,7 +372,7 @@ void sub_08087114(Entity* this) {
void sub_08087150(Entity* this) {
GreatFairy_InitializeAnimation(this);
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spriteOrientation.flipY = 0;
this->spriteRendering.b3 = 0;
this->spritePriority.b0 = 3;
@@ -401,7 +401,7 @@ void sub_080871D0(Entity* this) {
}
void sub_080871F8(Entity* this) {
- Entity* temp = this->attachedEntity;
+ Entity* temp = this->child;
if ((temp->x.HALF.HI == this->x.HALF.HI) && (temp->y.HALF.HI - 32 == this->y.HALF.HI)) {
this->action = 2;
@@ -437,7 +437,7 @@ void sub_08087294(Entity* this) {
}
void sub_080872AC(Entity* this) {
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spriteOrientation.flipY = 1;
this->spriteRendering.b3 = 0;
this->field_0x68.HWORD = this->x.HALF.HI;
@@ -458,7 +458,7 @@ void sub_080872F8(Entity* this) {
this->direction = (this->direction + gUnk_081207AC[Random() & 3]) & 0x1f;
}
temp = gSineTable[this->actionDelay + 64];
- this->height.HALF.HI = (temp >> 6) - 8;
+ this->z.HALF.HI = (temp >> 6) - 8;
this->actionDelay++;
}
diff --git a/src/object/heartContainer.c b/src/object/heartContainer.c
index 71d109f4..a2abfbda 100644
--- a/src/object/heartContainer.c
+++ b/src/object/heartContainer.c
@@ -28,7 +28,7 @@ static void sub_0808E6A0(Entity* this) {
}
this->action = 1;
this->type = 0x62;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->hitbox = &gUnk_08121C58;
this->collisionLayer = 3;
this->updateConditions = 3;
@@ -37,7 +37,7 @@ static void sub_0808E6A0(Entity* this) {
static void sub_0808E6E4(Entity* this) {
if (CheckFlags(this->field_0x86.HWORD)) {
this->action = 2;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spriteRendering.b0 = 3;
sub_0808E714(this);
}
diff --git a/src/object/hiddenLadderDown.c b/src/object/hiddenLadderDown.c
index 5a176b07..7d1c7abd 100644
--- a/src/object/hiddenLadderDown.c
+++ b/src/object/hiddenLadderDown.c
@@ -22,7 +22,7 @@ void sub_08091F14(Entity* this) {
puVar3 = &this->field_0x70.HALF.LO;
if (CheckFlags(this->field_0x86.HWORD) != 0) {
this->action = 2;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
SetTileType(0x1a2, *puVar3 - 0x41, this->collisionLayer);
SetTileType(0x1a3, *puVar3 - 0x40, this->collisionLayer);
SetTileType(0x1a4, *puVar3 - 0x3f, this->collisionLayer);
@@ -38,7 +38,7 @@ void sub_08091F14(Entity* this) {
void sub_08092000(Entity* this) {
if (GetTileType(*(u16*)&this->field_0x70.HALF.LO, this->collisionLayer) == 0x1a6) {
this->action = 2;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
SetFlag(this->field_0x86.HWORD);
}
}
diff --git a/src/object/houseDoorExterior.c b/src/object/houseDoorExterior.c
index 876fdc6a..41a3ee77 100644
--- a/src/object/houseDoorExterior.c
+++ b/src/object/houseDoorExterior.c
@@ -97,7 +97,7 @@ void sub_0808681C(Entity* this) {
case 0:
this->action = 1;
this->actionDelay = 8;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->frameIndex = 0;
this->hitbox = &gUnk_081206AC;
if (this->subAction == 1) {
@@ -127,7 +127,7 @@ void sub_0808681C(Entity* this) {
void sub_080868B0(Entity* this) {
if (this->action == 0) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->hitbox = &gUnk_081206AC;
this->actionDelay = 8;
}
diff --git a/src/object/itemOnGround.c b/src/object/itemOnGround.c
index f9ac58f6..a5c1770b 100644
--- a/src/object/itemOnGround.c
+++ b/src/object/itemOnGround.c
@@ -51,9 +51,9 @@ void ItemOnGround(Entity* this) {
case 20:
this->action = 3;
COLLISION_OFF(this);
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x3c |= 0x10;
- this->attachedEntity = this->field_0x4c;
+ this->child = this->field_0x4c;
break;
case 0:
case 1:
@@ -90,13 +90,13 @@ void sub_08080F20(Entity* this) {
}
if (this->type != 0x60) {
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spritePriority.b1 = 3;
- this->spriteSettings.b.shadow = 0;
+ this->spriteSettings.shadow = 0;
this->hitType = 7;
this->field_0x3c = 0x47;
this->hurtType = 0x44;
- this->currentHealth = 0xFF;
+ this->health = 0xFF;
this->hitbox = &gUnk_080FD1A8;
switch (this->type) {
case 0x3f:
@@ -150,8 +150,8 @@ void sub_080810A8(Entity* this) {
this->direction |= 0xFF;
}
- if (this->hVelocity == 0) {
- this->hVelocity = 0x1E000;
+ if (this->zVelocity == 0) {
+ this->zVelocity = 0x1E000;
}
if (this->collisionLayer == 2) {
@@ -180,7 +180,7 @@ void sub_08081134(Entity* this) {
void sub_08081150(Entity* this) {
this->action = 2;
COLLISION_ON(this);
- this->height.HALF.HI = -0x80;
+ this->z.HALF.HI = -0x80;
this->spriteOrientation.flipY = 1;
this->spriteRendering.b3 = 1;
SoundReq(SFX_12D);
@@ -196,13 +196,13 @@ void sub_08081188(Entity* this) {
void sub_080811AC(Entity* this) {
this->action = 2;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->field_0x6e.HWORD = GetTileTypeByEntity(this);
}
void sub_080811C8(Entity* this) {
this->action = 2;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
void sub_080811D8(Entity* this) {
@@ -218,7 +218,7 @@ void sub_080811EC(Entity* this) {
}
sub_08003FC4(this, 0x2800);
- if (this->hVelocity <= 0) {
+ if (this->zVelocity <= 0) {
this->action = 2;
COLLISION_ON(this);
sub_080814A4(this);
@@ -262,7 +262,7 @@ void sub_080812A8(Entity* this) {
if (sub_080002D0(this) != 0xF && this->field_0x6e.HWORD != GetTileTypeByEntity(this)) {
this->direction = 0;
this->speed = 0;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x68.HALF.HI = 0;
sub_080810A8(this);
}
@@ -283,12 +283,12 @@ void nullsub_510(Entity* this) {
}
void sub_08081328(Entity* this) {
- Entity* other = this->attachedEntity;
+ Entity* other = this->child;
if (!(other->kind == 8 && other->id == 3)) {
sub_08081404(this, 0);
} else {
CopyPosition(other, this);
- this->height.HALF.HI--;
+ this->z.HALF.HI--;
other = &gPlayerEntity;
if (sub_080177A0(this, other)) {
sub_080810FC(this);
@@ -298,7 +298,7 @@ void sub_08081328(Entity* this) {
void sub_0808136C(Entity* this) {
if (--this->actionDelay) {
- Entity* other = this->attachedEntity;
+ Entity* other = this->child;
this->x.WORD = other->x.WORD;
this->y.WORD = other->y.WORD;
this->spriteOrientation.flipY = other->spriteOrientation.flipY;
@@ -316,7 +316,7 @@ void sub_080813BC(Entity* this) {
void sub_080813D4(Entity* this) {
this->subAction = 1;
this->field_0x1d = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
}
void sub_080813E8(Entity* this) {
@@ -383,7 +383,7 @@ u32 sub_080814C0(Entity* this) {
}
if (this->field_0x6c.HWORD < 90) {
- this->spriteSettings.b.draw ^= 1;
+ this->spriteSettings.draw ^= 1;
}
}
@@ -413,7 +413,7 @@ void sub_0808153C(Entity* this) {
if (this->field_0x68.HALF.LO == 0) {
if (!sub_08003FC4(this, 0x1000) && !sub_0800442E(this)) {
this->field_0x68.HALF.LO = 1;
- this->hVelocity = 0x1E000;
+ this->zVelocity = 0x1E000;
sub_0808148C(this->type);
UpdateSpriteForCollisionLayer(this);
}
@@ -426,20 +426,20 @@ void sub_0808153C(Entity* this) {
}
void sub_08081598(Entity* this) {
- if (this->currentHealth == 0) {
+ if (this->health == 0) {
sub_08081404(this, 1);
}
COLLISION_OFF(this);
this->action = 4;
this->actionDelay = 14;
- this->hVelocity = 0x20000;
- this->spriteSettings.b.draw = 1;
+ this->zVelocity = 0x20000;
+ this->spriteSettings.draw = 1;
this->spritePriority.b1 = 2;
this->spritePriority.b0 = 3;
- this->attachedEntity = &gPlayerEntity;
- CopyPosition(this->attachedEntity, this);
- this->height.HALF.HI -= 4;
+ this->child = &gPlayerEntity;
+ CopyPosition(this->child, this);
+ this->z.HALF.HI -= 4;
if (this->type != 0x5F && sub_08081420(this)) {
sub_08081404(this, 1);
}
diff --git a/src/object/jailBars.c b/src/object/jailBars.c
index fd534907..da5844e5 100644
--- a/src/object/jailBars.c
+++ b/src/object/jailBars.c
@@ -24,7 +24,7 @@ void sub_080A08C4(Entity* this) {
InitializeAnimation(this, 1);
sub_080A0960(this, 1);
}
- this->spriteSettings.b.draw = 3; // ???
+ this->spriteSettings.draw = 3; // ???
this->collisionLayer = 1;
UpdateSpriteForCollisionLayer(this);
}
@@ -39,7 +39,7 @@ void sub_080A0910(Entity* this) {
void sub_080A0938(Entity* this) {
GetNextFrame(this);
- if ((this->frames.b.f3) != 0) {
+ if (this->frame & 0x80) {
this->action = 3;
InitializeAnimation(this, 1);
}
diff --git a/src/object/jarPortal.c b/src/object/jarPortal.c
index 8262fa0a..b5eddce6 100644
--- a/src/object/jarPortal.c
+++ b/src/object/jarPortal.c
@@ -63,21 +63,21 @@ void sub_0808BF58(Entity* this) {
sub_08003FC4(this, 0x2000);
switch (this->subAction) {
case 0:
- if (this->hVelocity <= 98303) {
+ if (this->zVelocity <= 98303) {
++this->subAction;
InitAnimationForceUpdate(this, 2);
}
break;
case 1:
UpdateAnimationSingleFrame(this);
- if (!this->height.HALF.HI) {
+ if (!this->z.HALF.HI) {
++this->subAction;
- this->hVelocity = 0x8000;
+ this->zVelocity = 0x8000;
}
break;
case 2:
UpdateAnimationSingleFrame(this);
- if (!this->height.HALF.HI) {
+ if (!this->z.HALF.HI) {
++this->action;
this->field_0xf = 0;
InitAnimationForceUpdate(this, 1);
@@ -131,21 +131,21 @@ void sub_0808C0AC(Entity* this) {
sub_08003FC4(this, 0x2000);
switch (this->subAction) {
case 0:
- if (this->hVelocity <= 98303) {
+ if (this->zVelocity <= 98303) {
this->subAction = 1;
InitAnimationForceUpdate(this, 3);
}
break;
case 1:
UpdateAnimationSingleFrame(this);
- if (!this->height.HALF.HI) {
+ if (!this->z.HALF.HI) {
++this->subAction;
- this->hVelocity = 0x8000;
+ this->zVelocity = 0x8000;
}
break;
case 2:
UpdateAnimationSingleFrame(this);
- if (!this->height.HALF.HI) {
+ if (!this->z.HALF.HI) {
this->action = 1;
InitAnimationForceUpdate(this, 0);
sub_0808C148(this, 1);
@@ -160,7 +160,7 @@ u32 sub_0808C128(Entity* this) {
void sub_0808C13C(Entity* this) {
this->subAction = 0;
- this->hVelocity = 163840;
+ this->zVelocity = 163840;
}
void sub_0808C148(Entity* this, u32 a2) {
diff --git a/src/object/lightableSwitch.c b/src/object/lightableSwitch.c
index 1b8d651a..35496766 100644
--- a/src/object/lightableSwitch.c
+++ b/src/object/lightableSwitch.c
@@ -68,8 +68,8 @@ void sub_0809EAD8(Entity* this) {
if (this->type2 != 0) {
- this->attachedEntity = GetCurrentRoomProperty(this->type2);
- sub_080A2CC0(this, &this->attachedEntity, &this->field_0x74.HWORD);
+ this->child = GetCurrentRoomProperty(this->type2);
+ sub_080A2CC0(this, &this->child, &this->field_0x74.HWORD);
} else {
SetTile(0x4050, COORD_TO_TILE(this), this->collisionLayer);
@@ -86,7 +86,7 @@ void sub_0809EB30(Entity* this) {
}
puVar2 = &this->field_0x74.HWORD;
if (!--*puVar2) {
- sub_080A2CC0(this, &this->attachedEntity, puVar2);
+ sub_080A2CC0(this, &this->child, puVar2);
}
}
}
diff --git a/src/object/lilypadSmall.c b/src/object/lilypadSmall.c
index 37f78580..94aec1f7 100644
--- a/src/object/lilypadSmall.c
+++ b/src/object/lilypadSmall.c
@@ -18,16 +18,16 @@ void LilypadSmall(Entity* this) {
rand = Random();
this->field_0xf = rand;
this->frameIndex = (rand >> 0x10) & 3;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
this->spritePriority.b0 = 7;
- this->attachedEntity = GetCurrentRoomProperty(this->type2);
- sub_080A2CC0(this, &this->attachedEntity, &this->field_0x70.HALF.LO);
+ this->child = GetCurrentRoomProperty(this->type2);
+ sub_080A2CC0(this, &this->child, &this->field_0x70.HALF.LO);
}
sub_080A2BE4(this, sub_08097ADC(this));
sub_08097B24(this);
psVar4 = (u16*)&this->field_0x70;
if (--*psVar4 == 0) {
- sub_080A2CC0(this, &this->attachedEntity, psVar4);
+ sub_080A2CC0(this, &this->child, psVar4);
}
}
@@ -40,7 +40,7 @@ u32 sub_08097ADC(Entity* this) {
return 0;
} else {
gPlayerState.field_0x14 = 1;
- if (gPlayerEntity.height.HALF.HI != 0) {
+ if (gPlayerEntity.z.HALF.HI != 0) {
return 0;
} else {
return 1;
diff --git a/src/object/lockedDoor.c b/src/object/lockedDoor.c
index d82a3e3d..db9404dd 100644
--- a/src/object/lockedDoor.c
+++ b/src/object/lockedDoor.c
@@ -99,7 +99,7 @@ void sub_08083338(Entity* this) {
this->field_0x7c.BYTES.byte2 = this->type & 3;
this->hitbox = &gUnk_080FD170;
this->spritePriority.b0 = 5;
- this->frames.all = this->type & 0xF;
+ this->frame = this->type & 0xF;
this->field_0x76.HWORD = TILE(this->x.HALF.HI, this->y.HALF.HI);
this->field_0x74.HWORD = sub_080001DA(this->field_0x76.HWORD, this->collisionLayer);
switch (this->type2) {
@@ -225,7 +225,7 @@ void sub_080835F8(Entity* this) {
void sub_08083638(Entity* this) {
this->action = 7;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->x.HALF.HI = this->field_0x70.HALF.LO;
this->y.HALF.HI = this->field_0x70.HALF.HI;
}
@@ -244,7 +244,7 @@ void sub_08083658(Entity* this) {
void sub_080836A0(Entity* this) {
this->action = 6;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->x.HALF.HI = this->field_0x70.HALF.LO;
this->y.HALF.HI = this->field_0x70.HALF.HI;
SetTile(0x4022, this->field_0x76.HWORD, this->collisionLayer);
@@ -254,7 +254,7 @@ void sub_080836DC(Entity* this, u32 unk_0, u32 unk_1) {
const struct_0811F680* tmp;
SetTile(0x4022, unk_1, this->collisionLayer);
this->actionDelay = 7;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->direction = (unk_0 << 3) ^ 0x10;
tmp = &gUnk_0811F688[unk_0];
if (this->type2 != 2) {
diff --git a/src/object/mask.c b/src/object/mask.c
index cd94a1b5..c5e0c12d 100644
--- a/src/object/mask.c
+++ b/src/object/mask.c
@@ -47,7 +47,7 @@ void sub_080929A4(Entity* this) {
}
this->action = 1;
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
this->field_0x78.HWORD = ((Random() & 7) << 10) | 0x2000;
@@ -92,7 +92,7 @@ void sub_08092A94(Entity* this) {
this->action = 2;
- this->height.HALF.HI -= 0x20;
+ this->z.HALF.HI -= 0x20;
this->y.HALF.HI += 0x20;
this->spriteRendering.b3 = 2;
@@ -118,7 +118,7 @@ void sub_08092B0C(Entity* this) {
} else {
sub_080044EC(this, this->field_0x78.HWORD);
- if (this->height.HALF.HI == 0) {
+ if (this->z.HALF.HI == 0) {
this->actionDelay++;
}
}
diff --git a/src/object/metalDoor.c b/src/object/metalDoor.c
index a65cf709..13ac3763 100644
--- a/src/object/metalDoor.c
+++ b/src/object/metalDoor.c
@@ -25,9 +25,9 @@ void sub_080A0684(Entity* this) {
}
this->action = 1;
this->speed = 0x300;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->frameIndex = 0;
- this->spriteSettings.b.flipY = 1;
+ this->spriteSettings.flipY = 1;
this->hitbox = &gUnk_080FD180;
this->spritePriority.b0 = 5;
this->field_0x70.HALF.LO = this->x.HALF.HI;
@@ -39,7 +39,7 @@ void sub_080A0718(Entity* this) {
if (sub_08083734(this, 2) != 0) {
this->action = 2;
this->actionDelay = 0xc;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
this->direction = 0;
this->y.HALF.HI += 0x24;
sub_080A080C(this);
@@ -54,7 +54,7 @@ void sub_080A074C(Entity* this) {
if (--this->actionDelay == 0) {
this->action = 3;
- this->height.HALF.HI = 0;
+ this->z.HALF.HI = 0;
this->x.HALF.HI = this->field_0x70.HALF.LO;
this->y.HALF.HI = this->field_0x70.HALF.HI;
ent = CreateFx(this, FX_DASH, 0x40);
diff --git a/src/object/minecart.c b/src/object/minecart.c
index a1c79b41..002c4946 100644
--- a/src/object/minecart.c
+++ b/src/object/minecart.c
@@ -60,7 +60,7 @@ void sub_080916EC(Entity* this) {
void sub_080917DC(Entity* this) {
if ((this->bitfield & 0x7f) == 0x1d) {
- this->hVelocity = 0x2a000;
+ this->zVelocity = 0x2a000;
this->action = 7;
InitAnimationForceUpdate(this, this->type2 + 4 + this->animationState);
SoundReq(SFX_13B);
@@ -80,7 +80,7 @@ void sub_080917DC(Entity* this) {
this->action = this->action + 1;
gPlayerState.jumpStatus = 0x81;
gPlayerState.flags |= 0x4000000;
- gPlayerEntity.hVelocity = 0x20000;
+ gPlayerEntity.zVelocity = 0x20000;
gPlayerEntity.speed = 0x100;
gPlayerEntity.flags &= 0x7f;
ResetPlayer();
@@ -97,8 +97,8 @@ void sub_080918A4(Entity* this) {
if (sub_080041A0(this, &gPlayerEntity, 2, 2) != 0) {
gPlayerEntity.x.HALF.HI = this->x.HALF.HI;
gPlayerEntity.y.HALF.HI = this->y.HALF.HI;
- if (gPlayerEntity.height.HALF.HI > -0x10) {
- if ((s32)gPlayerEntity.hVelocity > -1) {
+ if (gPlayerEntity.z.HALF.HI > -0x10) {
+ if ((s32)gPlayerEntity.zVelocity > -1) {
return;
}
gPlayerEntity.animationState = this->animationState << 1;
@@ -118,7 +118,7 @@ void sub_080918A4(Entity* this) {
} else {
gPlayerEntity.direction = GetFacingDirection(&gPlayerEntity, this);
}
- if (gPlayerEntity.hVelocity < 0) {
+ if (gPlayerEntity.zVelocity < 0) {
gPlayerEntity.spritePriority.b0 = this->spritePriority.b0 - 1;
}
}
@@ -133,10 +133,10 @@ void sub_080919AC(Entity* this) {
return;
}
- if ((gPlayerEntity.frames.all & 0xf) == 0) {
+ if ((gPlayerEntity.frame & 0xf) == 0) {
COLLISION_OFF(this);
CopyPosition(this, &gPlayerEntity);
- if ((gPlayerEntity.frames.all & 0xf0) == 0x10) {
+ if ((gPlayerEntity.frame & 0xf0) == 0x10) {
this->spriteOffsetY = 1;
} else {
this->spriteOffsetY = 0;
@@ -175,7 +175,7 @@ void sub_080919AC(Entity* this) {
sub_08017744(this);
gPlayerState.jumpStatus = 0x41;
gPlayerState.flags = (gPlayerState.flags ^ 0x1000) | 0x4000000;
- gPlayerEntity.hVelocity = 0x20000;
+ gPlayerEntity.zVelocity = 0x20000;
gPlayerEntity.speed = 0x200;
gPlayerEntity.animationState = this->animationState << 1;
gPlayerEntity.direction = this->direction;
diff --git a/src/object/minishLight.c b/src/object/minishLight.c
index 458a0864..d7fc7bb4 100644
--- a/src/object/minishLight.c
+++ b/src/object/minishLight.c
@@ -14,7 +14,7 @@ void sub_0809F840(Entity* this) {
this->field_0xf = 0;
if (this->type2 != 0) {
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
}
UpdateSpriteForCollisionLayer(this);
diff --git a/src/object/minishSizedEntrance.c b/src/object/minishSizedEntrance.c
index ddd776ae..cff1f9ed 100644
--- a/src/object/minishSizedEntrance.c
+++ b/src/object/minishSizedEntrance.c
@@ -27,12 +27,12 @@ void sub_08090F00(Entity* this) {
if (this->type == 1) {
Entity* parent = this->parent;
u32 mask = 1 << this->field_0xf;
- if (!(parent->hVelocity & mask)) {
+ if (!(parent->zVelocity & mask)) {
DeleteThisEntity();
}
}
- if ((gPlayerState.flags & 0x80) && sub_080041A0(this, &gPlayerEntity, 4, 4) &&
- (gPlayerEntity.height.HALF.HI == 0) && (((u16)gPlayerState.field_0x90.HALF.LO) & gUnk_0812225C[this->type2])) {
+ if ((gPlayerState.flags & 0x80) && sub_080041A0(this, &gPlayerEntity, 4, 4) && (gPlayerEntity.z.HALF.HI == 0) &&
+ (((u16)gPlayerState.field_0x90.HALF.LO) & gUnk_0812225C[this->type2])) {
DoExitTransition(GetCurrentRoomProperty(this->actionDelay));
}
}
diff --git a/src/object/object1A.c b/src/object/object1A.c
index 494ba821..e515a30b 100644
--- a/src/object/object1A.c
+++ b/src/object/object1A.c
@@ -19,21 +19,21 @@ void sub_080869DC(Entity* ent) {
Entity* itemEntity;
ent->action = 1;
- ent->spriteSettings.b.draw = 0;
+ ent->spriteSettings.draw = 0;
ent->hitbox = &gUnk_080FD1A8;
ent->field_0x3c |= 16;
itemEntity = CreateObject(GROUND_ITEM, ent->type, 0);
if (itemEntity != NULL) {
itemEntity->actionDelay = 10;
itemEntity->parent = ent;
- ent->attachedEntity = itemEntity;
+ ent->child = itemEntity;
CopyPosition(ent, itemEntity);
sub_08086A6C(ent);
}
}
void sub_08086A28(Entity* ent) {
- if (ent->attachedEntity->next == NULL) {
+ if (ent->child->next == NULL) {
ent->action = 2;
} else {
u32 iVar1 = sub_080044EC(ent, 10240);
@@ -41,12 +41,12 @@ void sub_08086A28(Entity* ent) {
ent->action = 2;
}
ProcessMovement(ent);
- CopyPosition(ent, ent->attachedEntity);
+ CopyPosition(ent, ent->child);
}
}
void sub_08086A5C(Entity* ent) {
- ent->attachedEntity->parent = NULL;
+ ent->child->parent = NULL;
DeleteThisEntity();
}
@@ -54,7 +54,7 @@ void sub_08086A6C(Entity* ent) {
u32 uVar1;
uVar1 = Random();
- ent->hVelocity = 163840;
+ ent->zVelocity = 163840;
ent->direction = (uVar1 >> 16) & 31;
ent->speed = uVar1 & 480;
}
diff --git a/src/object/object1C.c b/src/object/object1C.c
index 3bd9af76..be2289cb 100644
--- a/src/object/object1C.c
+++ b/src/object/object1C.c
@@ -13,7 +13,7 @@ void Object1C(Entity* this) {
this->action = 1;
}
if (CheckRectOnScreen(this->field_0x80.HWORD, this->field_0x82.HWORD, 0x10, 0x10) == 0) {
- this->parent->hVelocity &= ~(1 << this->type2);
+ this->parent->zVelocity &= ~(1 << this->type2);
DeleteThisEntity();
}
}
diff --git a/src/object/object2A.c b/src/object/object2A.c
index dca66978..edc742c0 100644
--- a/src/object/object2A.c
+++ b/src/object/object2A.c
@@ -11,7 +11,7 @@ void Object2A(Entity* this) {
void sub_08089B18(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
if (this->type2 != 0) {
this->actionDelay = this->type2;
}
@@ -30,7 +30,7 @@ void sub_08089B18(Entity* this) {
break;
case 4:
if (!CheckFlags(this->field_0x86.HWORD)) {
- this->spriteSettings.b.draw = FALSE;
+ this->spriteSettings.draw = FALSE;
this->subAction = 1;
return;
}
diff --git a/src/object/object49.c b/src/object/object49.c
index 02aac844..8b7c1bf3 100644
--- a/src/object/object49.c
+++ b/src/object/object49.c
@@ -34,12 +34,12 @@ void sub_0808F0D0(Entity* this) {
u32 uVar3;
ent = CreateObjectWithParent(this, OBJECT_49, 2, 0);
- this->attachedEntity = ent;
+ this->child = ent;
if (ent == NULL) {
DeleteThisEntity();
}
this->action = 1;
- this->height.HALF.HI = -0xc0;
+ this->z.HALF.HI = -0xc0;
offsetX = Random() % 64;
if ((Random() & 1) != 0) {
offsetX = -offsetX;
@@ -79,7 +79,7 @@ void sub_0808F1A4(Entity* this) {
*(u32*)&this->field_0x74 += 0x10;
sub_0806FCF4(this, *(u32*)&this->field_0x78, 8, 2);
if (*(u32*)&this->field_0x78 > 0x3ff) {
- this->attachedEntity->action = 0xff;
+ this->child->action = 0xff;
DeleteThisEntity();
} else {
sub_0808F2B0(this);
@@ -104,12 +104,12 @@ void sub_0808F1F8(Entity* this) {
void sub_0808F244(Entity* this) {
- this->spriteSettings.b.draw = this->parent->spriteSettings.b.draw;
+ this->spriteSettings.draw = this->parent->spriteSettings.draw;
this->y.HALF.HI = this->parent->y.HALF.HI + 3;
- this->x.HALF.HI = (*(s8*)&this->attachedEntity->spriteOffsetX + this->attachedEntity->x.HALF.HI);
- this->height.WORD = 0;
- *(u32*)&this->field_0x74 = 0x80 - this->parent->height.HALF.HI;
- *(u32*)&this->field_0x78 = 0x100 - this->parent->height.HALF.HI;
+ this->x.HALF.HI = (*(s8*)&this->child->spriteOffsetX + this->child->x.HALF.HI);
+ this->z.WORD = 0;
+ *(u32*)&this->field_0x74 = 0x80 - this->parent->z.HALF.HI;
+ *(u32*)&this->field_0x78 = 0x100 - this->parent->z.HALF.HI;
*(u32*)&this->field_0x70.WORD = *((u8*)&this->parent->field_0x7c + 3);
sub_0808F2B0(this);
if ((this->parent->field_0x6c.HALF.HI & 2) != 0) {
@@ -126,20 +126,20 @@ void sub_0808F2C0(Entity* this) {
this->action++;
this->spriteRendering.b3 = this->parent->spriteRendering.b3;
this->spriteOrientation.flipY = this->parent->spriteOrientation.flipY;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spritePriority.b0 = 7;
- this->height.WORD = 0;
+ this->z.WORD = 0;
this->y.HALF.HI = this->parent->y.HALF.HI + 3;
this->x.HALF.HI = this->parent->x.HALF.HI;
InitializeAnimation(this, 3);
}
- if (this->parent->height.HALF.HI == 0) {
+ if (this->parent->z.HALF.HI == 0) {
*(u32*)&this->field_0x74 = *(u32*)&this->parent->field_0x74;
*(u32*)&this->field_0x78 = *(u32*)&this->parent->field_0x78;
} else {
- *(u32*)&this->field_0x74 = 0x200 - this->parent->height.HALF.HI;
- *(u32*)&this->field_0x78 = this->parent->height.HALF.HI * -2 + 0x300;
+ *(u32*)&this->field_0x74 = 0x200 - this->parent->z.HALF.HI;
+ *(u32*)&this->field_0x78 = this->parent->z.HALF.HI * -2 + 0x300;
}
*(u32*)&this->field_0x70 = 0;
sub_0808F2B0(this);
@@ -177,39 +177,39 @@ void sub_0808F370(Entity* this) {
void sub_0808F3DC(Entity* this) {
if (this->action == 0) {
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->action = 1;
this->actionDelay = 120;
InitializeAnimation(this, this->type + 1);
// TODO: This block of code might supposed to be a switch statement.
if (this->type != 8) {
if (this->type == 7) {
- sub_0806FAD8(this->attachedEntity, this);
+ sub_0806FAD8(this->child, this);
return;
}
} else {
- this->hitType = this->attachedEntity->hitType;
- this->attachedEntity->hitType = 0x7E;
+ this->hitType = this->child->hitType;
+ this->child->hitType = 0x7E;
}
- ResolveEntityOnTop(this->attachedEntity, this);
+ ResolveEntityOnTop(this->child, this);
} else {
if (*(u32*)&this->parent->field_0x74 == 0) {
if (this->type == 8) {
- this->attachedEntity->hitType = this->hitType;
+ this->child->hitType = this->hitType;
}
DeleteThisEntity();
}
- if (this->type == 5 && this->frames.b.f0) {
- Entity* entity = CreateObjectWithParent(this->attachedEntity, 0x49, 8, 0);
+ if (this->type == 5 && (this->frame & 1)) {
+ Entity* entity = CreateObjectWithParent(this->child, 0x49, 8, 0);
if (entity) {
entity->parent = this->parent;
- entity->attachedEntity = this->parent->parent;
+ entity->child = this->parent->parent;
}
}
GetNextFrame(this);
- CopyPositionAndSpriteOffset(this->attachedEntity, this);
+ CopyPositionAndSpriteOffset(this->child, this);
}
}
@@ -268,22 +268,22 @@ void sub_0808F554(Entity* this) {
}
void sub_0808F5EC(Entity* this) {
- Entity* entity = CreateObjectWithParent(this->attachedEntity, 0x49, 5, 0);
+ Entity* entity = CreateObjectWithParent(this->child, 0x49, 5, 0);
if (entity) {
entity->parent = this;
- entity->attachedEntity = this->attachedEntity;
+ entity->child = this->child;
}
- entity = CreateObjectWithParent(this->attachedEntity, 0x49, 6, 0);
+ entity = CreateObjectWithParent(this->child, 0x49, 6, 0);
if (entity) {
entity->parent = this;
- entity->attachedEntity = this->attachedEntity;
+ entity->child = this->child;
}
- entity = CreateObjectWithParent(this->attachedEntity, 0x49, 7, 0);
+ entity = CreateObjectWithParent(this->child, 0x49, 7, 0);
if (entity) {
entity->parent = this;
- entity->attachedEntity = this->attachedEntity;
+ entity->child = this->child;
}
*(u32*)&this->field_0x74 = 600;
diff --git a/src/object/object7E.c b/src/object/object7E.c
index c456a841..15785d8f 100644
--- a/src/object/object7E.c
+++ b/src/object/object7E.c
@@ -12,15 +12,15 @@ void Object7E(Entity* this) {
this->spritePriority.b0 = 7;
this->frameIndex = 0x28;
if (this->type == 0) {
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
} else if (this->type == 2) {
- this->spriteSettings.b.flipX = TRUE;
+ this->spriteSettings.flipX = TRUE;
}
}
PositionRelative(this->parent, this, 0, 0x80000);
- this->height.HALF.HI = 0;
+ this->z.HALF.HI = 0;
if (this->type != 0) {
- this->spriteSettings.b.draw = this->attachedEntity->spriteSettings.b.draw;
- this->frameIndex = this->attachedEntity->frameIndex + 0x1f;
+ this->spriteSettings.draw = this->child->spriteSettings.draw;
+ this->frameIndex = this->child->frameIndex + 0x1f;
}
}
diff --git a/src/object/object86.c b/src/object/object86.c
index 717e3ad0..a9bf512d 100644
--- a/src/object/object86.c
+++ b/src/object/object86.c
@@ -32,11 +32,11 @@ void sub_08099DD0(Entity* this) {
void sub_08099E10(Entity* this) {
if (CheckLocalFlag(0x74)) {
GetNextFrame(this);
- if ((this->frames.all == 1) && (this->subAction == 0)) {
- this->frames.all = 0;
+ if ((this->frame == 1) && (this->subAction == 0)) {
+ this->frame = 0;
sub_08099ECC(this);
}
- if (this->frames.b.f3) {
+ if (this->frame & 0x80) {
this->action = 2;
InitializeAnimation(this, 1);
}
@@ -45,8 +45,8 @@ void sub_08099E10(Entity* this) {
void sub_08099E58(Entity* this) {
GetNextFrame(this);
- if (this->frames.b.f3) {
- this->frames.b.f3 = 0;
+ if (this->frame & 0x80) {
+ this->frame &= ~0x80;
this->actionDelay++;
if (this->actionDelay == 3) {
this->action = 3;
diff --git a/src/object/object9E.c b/src/object/object9E.c
index ea6b1787..6fdbdd29 100644
--- a/src/object/object9E.c
+++ b/src/object/object9E.c
@@ -31,7 +31,7 @@ void Object9E(Entity* this) {
UpdateSpriteForCollisionLayer(this);
ent = CreateObject(OBJECT_9E, 1, 0);
if (ent != NULL) {
- this->attachedEntity = ent;
+ this->child = ent;
CopyPosition(this, ent);
}
} else {
diff --git a/src/object/objectA2.c b/src/object/objectA2.c
index a2092bb7..09a698a9 100644
--- a/src/object/objectA2.c
+++ b/src/object/objectA2.c
@@ -32,11 +32,11 @@ void ObjectA2(Entity* this) {
void sub_0809F318(Entity* this) {
InitializeAnimation(this, 0);
if (Random() & 0x10) {
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
}
this->x.HALF.HI = 0x28;
this->y.HALF.HI = 0x48;
- this->height.HALF.HI = 0xFFB0;
+ this->z.HALF.HI = 0xFFB0;
this->spriteOrientation.flipY = 2;
this->action = 1;
sub_0801D2B4(this, gUnk_08124704[this->type]);
@@ -48,7 +48,7 @@ void sub_0809F374(Entity* this) {
#ifndef EU
if (gSaveHeader->gameLanguage < 2) {
if (sub_080044EC(this, 0x2000) < 2) {
- this->height.WORD = 0;
+ this->z.WORD = 0;
this->action = 2;
InitializeAnimation(this, 1);
SoundReq(SFX_186);
@@ -76,16 +76,16 @@ void sub_0809F374(Entity* this) {
}
void sub_0809F3E8(Entity* this) {
- if (this->frames.b.f3) {
+ if (this->frame & 0x80) {
this->action = 3;
InitializeAnimation(this, 2);
}
}
void sub_0809F408(Entity* this) {
- switch (this->frames.all) {
+ switch (this->frame) {
case 9:
- this->frames.all = 0;
+ this->frame = 0;
CreateFx(this, FX_BIG_EXPLOSION2, 0);
gMenu.field_0x0 = 1;
break;
diff --git a/src/object/objectA8.c b/src/object/objectA8.c
index c1a5193a..fbba13c3 100644
--- a/src/object/objectA8.c
+++ b/src/object/objectA8.c
@@ -21,7 +21,7 @@ void ObjectA8(Entity* this) {
case 0x1e:
case 0x1f:
this->action = 5;
- this->attachedEntity = &gPlayerEntity;
+ this->child = &gPlayerEntity;
CreateItemEntity(this->type, 0, 0);
DeleteThisEntity();
}
diff --git a/src/object/objectAF.c b/src/object/objectAF.c
index b678d81b..0aff1ed3 100644
--- a/src/object/objectAF.c
+++ b/src/object/objectAF.c
@@ -19,7 +19,7 @@ void sub_080A05A4(Entity* this) {
} else {
this->action = 2;
this->y.HALF.HI++;
- this->height.HALF.HI = 0;
+ this->z.HALF.HI = 0;
this->spriteOffsetY--;
InitializeAnimation(this, 3);
}
@@ -40,7 +40,7 @@ void sub_080A05F4(Entity* this) {
void sub_080A0624(Entity* this) {
GetNextFrame(this);
- if ((this->frames.b.f3) != 0) {
+ if (this->frame & 0x80) {
DeleteThisEntity();
}
}
@@ -51,5 +51,5 @@ void sub_080A0640(Entity* this) {
} else {
CopyPosition(this->parent, this);
}
- this->height.HALF.HI = 0;
+ this->z.HALF.HI = 0;
}
diff --git a/src/object/objectB2.c b/src/object/objectB2.c
index 0888ed38..75150bab 100644
--- a/src/object/objectB2.c
+++ b/src/object/objectB2.c
@@ -19,16 +19,16 @@ void ObjectB2(Entity* this) {
} else {
pEVar3 = &gUnk_02027EB4;
}
- this->attachedEntity = pEVar3;
+ this->child = pEVar3;
InitializeAnimation(this, this->type);
}
this->speed = this->parent->speed;
sub_0806F69C(this);
- if (sub_080AE4CC(this->attachedEntity, this->x.HALF.HI, this->y.HALF.HI, 9) != 0) {
+ if (sub_080AE4CC(this->child, this->x.HALF.HI, this->y.HALF.HI, 9) != 0) {
DeleteThisEntity();
}
if (this->speed < 0x41) {
- this->spriteSettings.b.draw ^= 1;
+ this->spriteSettings.draw ^= 1;
if (--this->actionDelay == 0) {
DeleteThisEntity();
diff --git a/src/object/pinwheel.c b/src/object/pinwheel.c
index 7de61338..37234dc5 100644
--- a/src/object/pinwheel.c
+++ b/src/object/pinwheel.c
@@ -10,7 +10,7 @@ extern u16 gUnk_08125050[];
extern void (*gUnk_0812505C[])(Entity*);
void Pinwheel(Entity* this) {
- u16 x = this->currentHealth;
+ u16 x = this->health;
if ((x & 0x7f) != 0) {
if (ReadBit(&gUnk_020342F8, x - 1) == 0) {
DeleteThisEntity();
diff --git a/src/object/pot.c b/src/object/pot.c
index ce0fa0bf..58989f44 100644
--- a/src/object/pot.c
+++ b/src/object/pot.c
@@ -38,7 +38,7 @@ void sub_0808222C(Entity* this) {
this->y.HALF.HI += 3;
this->field_0x16 = 0;
COLLISION_ON(this);
- this->currentHealth = 1;
+ this->health = 1;
this->field_0x3c = 7;
this->hitType = 0x6E;
this->flags2 = 0x84;
@@ -67,9 +67,9 @@ void sub_08082310(Entity* this) {
case 0x1D:
SetTile((u16)this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
this->action = 5;
- this->hVelocity = 0x2A000;
+ this->zVelocity = 0x2A000;
this->spriteOffsetY = 0;
- this->spriteSettings.b.shadow = 1;
+ this->spriteSettings.shadow = 1;
this->spritePriority.b1 = 3;
COLLISION_OFF(this);
sub_08082824(this);
@@ -251,8 +251,8 @@ void sub_08082818(Entity* this) {
}
void sub_08082824(Entity* this) {
- if (this->hVelocity < 0) {
- this->spriteSettings.b.flipY = 1;
+ if (this->zVelocity < 0) {
+ this->spriteSettings.flipY = 1;
}
if (sub_08003FC4(this, 0x2000) == 0) {
diff --git a/src/object/railtrack.c b/src/object/railtrack.c
index 52a74bc3..00fbb4ec 100644
--- a/src/object/railtrack.c
+++ b/src/object/railtrack.c
@@ -22,7 +22,7 @@ void sub_080851AC(Entity* this) {
u32 uVar1;
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spritePriority.b0 = 7;
if ((this->type2 & 1) != 0) {
this->field_0x7c.HALF.LO = -1;
diff --git a/src/object/smoke.c b/src/object/smoke.c
index 565daa79..17ec7ad0 100644
--- a/src/object/smoke.c
+++ b/src/object/smoke.c
@@ -36,7 +36,7 @@ void sub_0808A46C(Entity* this) {
void sub_0808A484(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
this->speed = 0x40;
this->direction = 6;
this->spriteRendering.b3 = 1;
@@ -48,7 +48,7 @@ void sub_0808A484(Entity* this) {
void sub_0808A4D0(Entity* this) {
GetNextFrame(this);
sub_0806F69C(this);
- if (this->frames.b.f3) {
+ if (this->frame & 0x80) {
DeleteEntity(this);
}
}
diff --git a/src/object/thoughtBubble.c b/src/object/thoughtBubble.c
index 70ad3c73..1789195b 100644
--- a/src/object/thoughtBubble.c
+++ b/src/object/thoughtBubble.c
@@ -13,7 +13,7 @@ void ThoughtBubble(Entity* this) {
void ThoughtBubble_Init(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
if (this->actionDelay == 0) {
this->actionDelay = 0x2d;
}
@@ -26,7 +26,7 @@ void ThoughtBubble_Update(Entity* this) {
if (this->parent != NULL) {
this->x.HALF.HI = this->parent->x.HALF.HI;
this->y.HALF.HI = this->parent->y.HALF.HI;
- this->height.HALF.HI = this->parent->height.HALF.HI;
+ this->z.HALF.HI = this->parent->z.HALF.HI;
}
if (this->type2 != 2) {
if (--this->actionDelay == 0) {
diff --git a/src/object/treeHidingPortal.c b/src/object/treeHidingPortal.c
index dcaf3ebc..94ba273a 100644
--- a/src/object/treeHidingPortal.c
+++ b/src/object/treeHidingPortal.c
@@ -52,7 +52,7 @@ void sub_0809E8BC(Entity* this) {
if (--this->actionDelay == 0) {
this->action = 3;
this->actionDelay = 0x3c;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
sub_0809E96C(this);
sub_0809E918(this);
}
diff --git a/src/object/warpPoint.c b/src/object/warpPoint.c
index fc6239d1..d20ceadf 100644
--- a/src/object/warpPoint.c
+++ b/src/object/warpPoint.c
@@ -77,7 +77,7 @@ void sub_0808B564(Entity* this) {
if (!--this->field_0xf) {
this->action = 3;
} else {
- this->spriteSettings.b.draw = this->field_0xf & 2 ? 0 : 1;
+ this->spriteSettings.draw = this->field_0xf & 2 ? 0 : 1;
}
}
@@ -177,7 +177,7 @@ void sub_0808B684(Entity* this) {
tmp = 1;
}
} else {
- gPlayerEntity.spriteSettings.b.draw = 0;
+ gPlayerEntity.spriteSettings.draw = 0;
}
break;
}
@@ -194,20 +194,20 @@ void sub_0808B73C(Entity* this) {
InitializeAnimation(this, 1);
}
if (sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x28)) {
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
} else {
if (sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x2e)) {
- this->spriteSettings.b.draw ^= 1;
+ this->spriteSettings.draw ^= 1;
} else {
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
}
GetNextFrame(this);
}
u32 sub_0808B7C8(Entity* this) {
- if (!(gPlayerState.flags & 0x80) && gPlayerState.field_0xa8 != 0x12 && gPlayerEntity.currentHealth != 0 &&
- sub_08079F8C() && sub_080041A0(this, &gPlayerEntity, 5, 5) && gPlayerEntity.height.HALF.HI == 0) {
+ if (!(gPlayerState.flags & 0x80) && gPlayerState.field_0xa8 != 0x12 && gPlayerEntity.health != 0 &&
+ sub_08079F8C() && sub_080041A0(this, &gPlayerEntity, 5, 5) && gPlayerEntity.z.HALF.HI == 0) {
if (this->actionDelay == 0 && gPlayerEntity.action == 0x1b) {
sub_080791D0();
}
@@ -220,7 +220,7 @@ void sub_0808B830(Entity* this) {
Entity* tmp;
this->action = 3;
this->actionDelay = 0;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
tmp = CreateObject(0x34, 0, 0);
if (tmp) {
tmp->field_0x70.BYTES.byte0 = 1;
diff --git a/src/object/windTribeFlag.c b/src/object/windTribeFlag.c
index bc9d0fa3..1fcfea7d 100644
--- a/src/object/windTribeFlag.c
+++ b/src/object/windTribeFlag.c
@@ -7,9 +7,9 @@ void WindTribeFlag(Entity* this) {
this->action++;
this->collisionLayer = 2;
if (this->type == 0) {
- this->spriteSettings.b.flipX = 0;
+ this->spriteSettings.flipX = 0;
} else {
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
}
UpdateSpriteForCollisionLayer(this);
InitializeAnimation(this, 0);
diff --git a/src/player.c b/src/player.c
index ad3107fe..b89a9fde 100644
--- a/src/player.c
+++ b/src/player.c
@@ -93,7 +93,7 @@ void PlayerInit(Entity* this) {
COLLISION_ON(this);
this->spritePriority.b0 = 0xc;
this->spritePriority.b1 = 1;
- this->spriteSettings.b.shadow = 1;
+ this->spriteSettings.shadow = 1;
this->field_0x16 = 0x20;
this->flags2 = 8;
this->hitType = 0x79;
@@ -178,10 +178,10 @@ void sub_08070C3C(Entity* this) {
void sub_08070CB4(Entity* this) {
UpdateAnimationSingleFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
if ((gSave.stats.health != 0) && ((gPlayerState.flags & 0x8000) != 0)) {
gPlayerState.flags &= ~(0x1 | 0x4);
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
} else {
gPlayerState.flags &= ~(0x4 | 0x8000);
RespawnPlayer();
@@ -206,12 +206,12 @@ void sub_08070D38(Entity* this) {
this->spriteIndex = 1;
if ((gPlayerState.flags & 0x80) == 0) {
- this->hVelocity = 0x20000;
+ this->zVelocity = 0x20000;
gPlayerState.field_0x8 = 0x114;
sub_08080964(16, 0);
} else {
gPlayerState.field_0x8 = 0xc18;
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
}
gPlayerState.jumpStatus = 0x80;
@@ -242,7 +242,7 @@ NONMATCH("asm/non_matching/player/sub_08070DC4.inc", void sub_08070DC4(Entity* t
}
if (--this->actionDelay != 0xFF) {
- this->hVelocity = 0x10000;
+ this->zVelocity = 0x10000;
return;
}
@@ -312,7 +312,7 @@ void PlayerItemGet(Entity* this) {
COLLISION_OFF(this);
gUnk_0811BA7C[this->subAction](this);
- child = this->attachedEntity;
+ child = this->child;
if (child != NULL) {
PositionEntityOnTop(this, child);
temp = GetSpriteSubEntryOffsetDataPointer((u16)this->spriteIndex, this->frameIndex);
@@ -324,7 +324,7 @@ void PlayerItemGet(Entity* this) {
void sub_08070FA4(Entity* this) {
u16 temp;
- this->spriteSettings.b.flipX = FALSE;
+ this->spriteSettings.flipX = FALSE;
this->animationState = 4;
gPlayerState.flags |= 1;
@@ -354,7 +354,7 @@ void sub_08070FA4(Entity* this) {
void sub_08071020(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.all != 0)
+ if (this->frame != 0)
this->subAction = 2;
}
@@ -365,8 +365,8 @@ void sub_08071038(Entity* this) {
if (sub_08078EFC() || (gMessage.doTextBox & 0x7f))
return;
- if (this->frames.all & 0x80) {
- this->attachedEntity = 0;
+ if (this->frame & 0x80) {
+ this->child = 0;
this->knockbackDuration = 0;
this->iframes = 248;
gPlayerState.jumpStatus = 0;
@@ -406,7 +406,7 @@ void sub_080710A8(Entity* this) {
temp = sub_08079FC4(1);
asm("lsl r0, r0, #0x4");
- this->hVelocity = (temp - 4) * 64 * 64;
+ this->zVelocity = (temp - 4) * 64 * 64;
this->speed = 256;
sub_0807A108();
@@ -422,7 +422,7 @@ void sub_08071130(Entity* this) {
if (gPlayerState.field_0x1a[1] == 0) {
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 1)
+ if (this->frame & 1)
return;
}
@@ -522,7 +522,7 @@ void sub_080712F0(Entity* this) {
if ((gPlayerState.flags & 0x80) != 0) {
if (--this->actionDelay == 0)
temp = TRUE;
- } else if ((this->frames.all & 0x80) != 0) {
+ } else if ((this->frame & 0x80) != 0) {
if (this->animIndex != 0xce)
gPlayerState.field_0x8 = 0x2ce;
else
@@ -535,7 +535,7 @@ void sub_080712F0(Entity* this) {
this->knockbackDuration = 0;
this->iframes = 32;
this->spritePriority.b1 = 1;
- this->spriteSettings.b.draw = FALSE;
+ this->spriteSettings.draw = FALSE;
gPlayerState.flags &= ~0x4;
RespawnPlayer();
}
@@ -587,7 +587,7 @@ void PortalJumpOnUpdate(Entity* this) {
gPlayerState.flags |= 0x20;
this->subAction = 1;
this->animationState = 4;
- this->spriteSettings.b.flipX = FALSE;
+ this->spriteSettings.flipX = FALSE;
if (gArea.curPortalType == 4) {
gPlayerState.field_0x8 = 0x52c;
}
@@ -615,7 +615,7 @@ void PortalStandUpdate(Entity* this) {
if (--this->actionDelay == 0xff) {
this->direction = gPlayerState.field_0xd;
this->animationState = this->direction >> 2;
- this->hVelocity = 0x20000;
+ this->zVelocity = 0x20000;
this->speed = 256;
this->action = 9;
this->subAction = 7;
@@ -630,7 +630,7 @@ void PortalStandUpdate(Entity* this) {
}
if (gArea.curPortalType == 4) {
- if (this->frames.all == 0) {
+ if (this->frame == 0) {
UpdateAnimationSingleFrame(this);
return;
}
@@ -682,7 +682,7 @@ void PortalEnterUpdate(Entity* this) {
if (sub_08003FC4(this, 0x2000))
return;
- this->spriteSettings.b.draw = FALSE;
+ this->spriteSettings.draw = FALSE;
if (gArea.curPortalType == 3) {
if (--this->field_0xf == 0)
@@ -762,7 +762,7 @@ void sub_080718A0(Entity* this) {
else
gPlayerState.field_0x8 = 0x3c6;
- this->spriteSettings.b.flipX = 0;
+ this->spriteSettings.flipX = 0;
return;
}
@@ -774,10 +774,10 @@ void sub_0807193C(Entity* this) {
Entity* child;
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
this->subAction++;
child = CreateObjectWithParent(this, OBJECT_6, 0, 0);
- this->attachedEntity = child;
+ this->child = child;
if (child != NULL) {
if (this->animationState == 2)
gPlayerState.field_0x8 = 0x3cc;
@@ -814,7 +814,7 @@ void sub_08071990(Entity* this) {
else
temp = 0;
- if (this->attachedEntity->actionDelay != 0) {
+ if (this->child->actionDelay != 0) {
if ((u8)(temp + 200) != this->animIndex) {
gPlayerState.field_0x8 = temp + 0x3c8;
return;
@@ -830,7 +830,7 @@ void sub_08071990(Entity* this) {
void sub_08071A4C(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
sub_08071A6C();
sub_0807921C();
}
@@ -937,7 +937,7 @@ void sub_08071BDC(Entity* this) {
this->subAction = 1;
this->animationState = 4;
this->spritePriority.b1 = 1;
- this->spriteSettings.b.draw = 3;
+ this->spriteSettings.draw = 3;
gPlayerState.jumpStatus = 0;
gPlayerState.pushedObject = 0;
sub_0800451C(this);
@@ -947,7 +947,7 @@ void sub_08071BDC(Entity* this) {
void sub_08071CAC(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
u32 temp;
if ((gPlayerState.flags & 0x80) == 0)
temp = (gPlayerState.flags & 8) ? 0x45a : 0x2bd;
@@ -966,7 +966,7 @@ void sub_08071D04(Entity* this) {
int deltaHealth;
UpdateAnimationSingleFrame(this);
- if (this->frames.all == 0)
+ if (this->frame == 0)
return;
deltaHealth = 0;
@@ -983,7 +983,7 @@ void sub_08071D04(Entity* this) {
gPlayerState.field_0x3c[0] = 0;
this->direction = 0xff;
this->speed = 0;
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
gPlayerState.jumpStatus = 1;
gPlayerState.swimState = 0;
return;
@@ -1021,7 +1021,7 @@ void sub_08071DD0(Entity* this) {
}
void sub_08071E04(Entity* this) {
- if ((this->height.WORD != 0) && (gPlayerState.field_0x14 == '\0')) {
+ if ((this->z.WORD != 0) && (gPlayerState.field_0x14 == '\0')) {
sub_0807A1B8();
if (gPlayerState.field_0x10[2] == 1) {
gPlayerState.field_0x10[1] = 7;
@@ -1088,7 +1088,7 @@ void sub_08071EB0(Entity* this) {
void sub_08071F14(Entity* this) {
UpdateAnimationSingleFrame(this);
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
gPlayerState.field_0x2c = NULL;
sub_0807921C();
}
@@ -1169,10 +1169,10 @@ void sub_08072098(Entity* this) {
return;
else
;
- else if ((this->frames.all & 0x80) == 0)
+ else if ((this->frame & 0x80) == 0)
return;
- if (this->currentHealth != 0)
+ if (this->health != 0)
COLLISION_ON(this);
sub_080791BC();
}
@@ -1185,7 +1185,7 @@ void sub_080720DC(Entity* this) {
}
void sub_08072100(Entity* this) {
- this->spriteSettings.b.draw = 3;
+ this->spriteSettings.draw = 3;
this->speed = 0x140;
this->hitbox = &gUnk_08114F88;
this->actionDelay = gPlayerState.field_0x38;
@@ -1275,14 +1275,14 @@ void sub_080722DC(Entity* this) {
COLLISION_OFF(this);
if (!(gPlayerState.flags & 0x80)) {
this->subAction = 1;
- this->hVelocity = 0x28000;
+ this->zVelocity = 0x28000;
ent = CreateObject(OBJECT_42, 0x80, 0);
if (ent != NULL) {
- ent->attachedEntity = this;
+ ent->child = this;
}
gPlayerState.field_0x8 = 0x114;
} else {
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->subAction = 3;
this->knockbackDuration = 10;
}
@@ -1322,7 +1322,7 @@ void sub_080723D0(Entity* this) {
void sub_0807240C(Entity* this) {
if (--this->knockbackDuration == 0xff) {
- this->spriteSettings.b.draw = 3;
+ this->spriteSettings.draw = 3;
this->iframes = 0x14;
gPlayerState.flags &= ~0x400;
ModHealth(-2);
@@ -1374,7 +1374,7 @@ void sub_080724DC(Entity* this) {
UpdateAnimationSingleFrame(this);
}
} else {
- this->spriteSettings.b.draw = 3;
+ this->spriteSettings.draw = 3;
this->subAction = 1;
if (gRoomVars.field_0x0 == 0) {
if (gPlayerState.flags & 0x80) {
@@ -1489,9 +1489,9 @@ void sub_080726F4(Entity* this) {
if (gPlayerState.field_0x10[2] == 0x17) {
sub_0800892E(this);
} else {
- switch (this->frames.all & 0xf) {
+ switch (this->frame & 0xf) {
case 0:
- if ((this->frames.all & 0xf) == 0) {
+ if ((this->frame & 0xf) == 0) {
this->speed = 0x200;
}
break;
@@ -1508,16 +1508,16 @@ void sub_080726F4(Entity* this) {
sub_08078F24();
sub_08079E08();
}
- if (((this->frames.all & 0x10) == 0) && ((gPlayerState.flags & 0x80) == 0)) {
+ if (((this->frame & 0x10) == 0) && ((gPlayerState.flags & 0x80) == 0)) {
*(u8*)&this->hurtType = 0;
}
- if ((this->frames.all & 0x40) != 0) {
+ if ((this->frame & 0x40) != 0) {
sub_08077698(this);
}
- if (((this->frames.all & 0x80) != 0) || (gPlayerState.field_0x3[1] != 0)) {
+ if (((this->frame & 0x80) != 0) || (gPlayerState.field_0x3[1] != 0)) {
sub_080791D0();
}
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
gPlayerState.flags &= ~(0x200000 | 0x40000);
}
UpdateAnimationSingleFrame(this);
@@ -1533,7 +1533,7 @@ void sub_080728AC(Entity* this) {
if (gPlayerState.swimState != 0)
this->speed = 0;
if (!(gPlayerState.flags & 0x40))
- gPlayerEntity.spriteSettings.b.draw = 3;
+ gPlayerEntity.spriteSettings.draw = 3;
if (!(gPlayerState.flags & 0x80))
gPlayerEntity.spritePriority.b1 = 1;
@@ -1555,7 +1555,7 @@ void PlayerInHole(Entity* this) {
}
void sub_08072970(Entity* this) {
- if (this->currentHealth != 0) {
+ if (this->health != 0) {
this->subAction = 1;
this->x.HALF.HI = (this->x.HALF.HI & ~0xF) | 8;
this->y.HALF.HI = (this->y.HALF.HI & ~0XF) | 10;
@@ -1580,7 +1580,7 @@ void sub_08072970(Entity* this) {
}
void sub_08072A60(Entity* this) {
- if (this->frames.all & 0x80) {
+ if (this->frame & 0x80) {
if (this->actionDelay == 1) {
this->subAction = 3;
this->actionDelay = 0x28;
@@ -1606,7 +1606,7 @@ void sub_08072ACC(Entity* this) {
} else if (this->field_0xf > 7) {
COLLISION_ON(this);
this->direction = gPlayerState.field_0xd;
- this->hVelocity = 0x1a000;
+ this->zVelocity = 0x1a000;
this->speed = 0x78;
this->spritePriority.b0 = 4;
this->spritePriority.b1 = 1;
@@ -1636,8 +1636,8 @@ void sub_08072B5C(Entity* this) {
COLLISION_ON(this);
this->spritePriority.b0 = 4;
this->speed = 0x40;
- this->hVelocity = 0x39000;
- this->height.WORD--;
+ this->zVelocity = 0x39000;
+ this->z.WORD--;
gPlayerState.jumpStatus = 0x41;
sub_0806F854(this, 0, -12);
sub_0807921C();
@@ -1651,7 +1651,7 @@ void sub_08072B5C(Entity* this) {
temp <<= 4;
temp -= 4;
temp <<= 12;
- this->hVelocity = temp;
+ this->zVelocity = temp;
this->speed = 0x100;
gPlayerState.field_0x8 = 0x810;
SoundReq(0x7c);
@@ -1704,7 +1704,7 @@ void sub_08072CFC(Entity* this) {
if (gPlayerState.field_0x38 < 8) {
gPlayerState.field_0x38 = 8;
}
- this->hVelocity = gPlayerState.field_0x38 << 0xc;
+ this->zVelocity = gPlayerState.field_0x38 << 0xc;
this->speed = 0x200;
gPlayerState.field_0x8 = 0x810;
this->actionDelay = 5;
@@ -1846,7 +1846,7 @@ void sub_08072F94(Entity* this) {
if (gPlayerState.field_0x10[2] == 0x1e) {
return;
}
- if ((this->frames.all & 0x10)) {
+ if ((this->frame & 0x10)) {
gPlayerState.field_0x8 = 0x2d4;
} else {
gPlayerState.field_0x8 = 0x2d5;
@@ -1857,13 +1857,13 @@ void sub_08072F94(Entity* this) {
this->direction = (bVar1 + 8) & 0x10;
}
if (this->direction & 0x10) {
- if (this->frames.all & 0x10) {
+ if (this->frame & 0x10) {
gPlayerState.field_0x8 = 0x2d1;
} else {
gPlayerState.field_0x8 = 0x2d2;
}
} else {
- if (this->frames.all & 0x10) {
+ if (this->frame & 0x10) {
gPlayerState.field_0x8 = 0x2cf;
} else {
gPlayerState.field_0x8 = 0x2d0;
@@ -1872,7 +1872,7 @@ void sub_08072F94(Entity* this) {
}
this->subAction++;
} else {
- if (this->frames.all & 0x10) {
+ if (this->frame & 0x10) {
gPlayerState.field_0x8 = 0x2d4;
} else {
gPlayerState.field_0x8 = 0x2d5;
@@ -1886,7 +1886,7 @@ extern const u16 gUnk_0811BBEC[];
void sub_08073094(Entity* this) {
this->spritePriority.b1 = 0;
- this->speed = gUnk_0811BBEC[this->frames.all & 0xf];
+ this->speed = gUnk_0811BBEC[this->frame & 0xf];
sub_08079E08();
if (!sub_08019840()) {
gPlayerState.pushedObject = gPlayerState.pushedObject ^ 0x80;
@@ -1901,7 +1901,7 @@ void sub_08073094(Entity* this) {
this->knockbackDuration = 0;
gPlayerState.flags |= 0x20000000;
UpdateAnimationSingleFrame(this);
- if ((this->frames.all & 0x40) != 0) {
+ if ((this->frame & 0x40) != 0) {
sub_0807A1B8();
if (!sub_08078EFC()) {
this->subAction--;
@@ -1918,7 +1918,7 @@ void sub_08073094(Entity* this) {
case 0x1e:
case 0x2b:
UpdateAnimationSingleFrame(this);
- if ((this->frames.all & 0x40) != 0) {
+ if ((this->frame & 0x40) != 0) {
sub_0807A1B8();
if (!sub_08078EFC()) {
this->subAction--;
diff --git a/src/playerItem.c b/src/playerItem.c
index c837a29a..f3acc3e8 100644
--- a/src/playerItem.c
+++ b/src/playerItem.c
@@ -22,33 +22,31 @@ extern void PlayerItem14();
extern void PlayerItem15();
extern void PlayerItemNulled2();
-void (*const gPlayerItemFunctions[])() = {
- DeleteEntity,
- PlayerItemSword,
- PlayerItemBomb,
- PlayerItem3,
- PlayerItemBow,
- PlayerItemShield,
- PlayerItemLantern,
- PlayerItemNulled,
- PlayerItemGustJar,
- PlayerItemPacciCane,
- DeleteEntity,
- DeleteEntity,
- PlayerItemC,
- PlayerItemCellOverwriteSet,
- PlayerItemSwordSpin,
- PlayerItemSwordBeam,
- PlayerItem10,
- PlayerItem11,
- PlayerItem12,
- PlayerItem13,
- PlayerItem14,
- PlayerItem15,
- PlayerItemSwordBeam,
- PlayerItemNulled2,
- PlayerItemCellOverwriteSet
-};
+void (*const gPlayerItemFunctions[])() = { DeleteEntity,
+ PlayerItemSword,
+ PlayerItemBomb,
+ PlayerItem3,
+ PlayerItemBow,
+ PlayerItemShield,
+ PlayerItemLantern,
+ PlayerItemNulled,
+ PlayerItemGustJar,
+ PlayerItemPacciCane,
+ DeleteEntity,
+ DeleteEntity,
+ PlayerItemC,
+ PlayerItemCellOverwriteSet,
+ PlayerItemSwordSpin,
+ PlayerItemSwordBeam,
+ PlayerItem10,
+ PlayerItem11,
+ PlayerItem12,
+ PlayerItem13,
+ PlayerItem14,
+ PlayerItem15,
+ PlayerItemSwordBeam,
+ PlayerItemNulled2,
+ PlayerItemCellOverwriteSet };
typedef struct {
u8 unk0;
@@ -109,7 +107,7 @@ NONMATCH("asm/non_matching/arm_proxy/ItemInit.inc", void ItemInit(Entity* this))
this->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3;
this->spritePriority.b0 = gPlayerEntity.spritePriority.b0;
this->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY;
- this->currentHealth = 1;
+ this->health = 1;
this->flags |= ENT_DID_INIT;
}
END_NONMATCH
diff --git a/src/playerItem/playerItem10.c b/src/playerItem/playerItem10.c
index bb4e5202..d733570d 100644
--- a/src/playerItem/playerItem10.c
+++ b/src/playerItem/playerItem10.c
@@ -124,14 +124,14 @@ void sub_080ACC78(Entity* this) {
}
*(u32*)&this->field_0x74 += 2;
}
- if (this->attachedEntity == NULL && (u32)this->field_0x70.WORD > 2) {
+ if (this->child == NULL && (u32)this->field_0x70.WORD > 2) {
this->field_0x70.WORD = 1;
}
if (--this->field_0x70.WORD != -1) {
return;
}
- if (this->attachedEntity == NULL) {
+ if (this->child == NULL) {
this->field_0x70.WORD = 2;
} else {
this->field_0x70.WORD = gUnk_0812AABC[this->type];
@@ -173,12 +173,12 @@ ASM_FUNC("asm/non_matching/playerItem10/sub_080ACDB0.inc", bool32 sub_080ACDB0(E
void sub_080ACECC(Entity* this) {
Entity* entity;
- if (this->type < 3 && this->attachedEntity == NULL && (s32) * (u32*)&this->field_0x78 >= 0 &&
+ if (this->type < 3 && this->child == NULL && (s32) * (u32*)&this->field_0x78 >= 0 &&
gUnk_0812AAE8[this->type] <= *(u32*)&this->field_0x78) {
entity = CreatePlayerItem(0x10, this->type + 1, 0, 0);
if (entity != NULL) {
entity->parent = this;
- this->attachedEntity = entity;
+ this->child = entity;
entity->x.HALF.HI = this->x.HALF.HI;
entity->y.HALF.HI = this->y.HALF.HI;
}
diff --git a/src/playerItem/playerItem11.c b/src/playerItem/playerItem11.c
index 046a5ab0..7b0aaac2 100644
--- a/src/playerItem/playerItem11.c
+++ b/src/playerItem/playerItem11.c
@@ -15,7 +15,7 @@ extern u8 gUnk_080B3DE0[];
extern Hitbox* gUnk_080B3DE8[];
void PlayerItem11(Entity* this) {
- if (this->currentHealth) {
+ if (this->health) {
this->iframes = 0;
gUnk_080B3DD0[this->action](this);
} else {
@@ -36,7 +36,7 @@ void sub_08018CBC(Entity* this) {
this->hitType = 0x96;
this->field_0x3c = (gPlayerEntity.field_0x3c + 1) | 0x80;
this->flags2 = gPlayerEntity.flags2;
- pEVar3 = this->attachedEntity;
+ pEVar3 = this->child;
if (pEVar3 != NULL) {
this->action = 1;
COLLISION_OFF(this);
@@ -44,14 +44,14 @@ void sub_08018CBC(Entity* this) {
this->hurtType = 0x1c;
this->damage = 6;
this->hitbox = &gUnk_080B3E18;
- this->attachedEntity->spriteOffsetX = 0;
- this->attachedEntity->spriteSettings.b.draw = 0;
+ this->child->spriteOffsetX = 0;
+ this->child->spriteSettings.draw = 0;
} else {
if (gPlayerState.field_0x1c == 0) {
DeleteThisEntity();
}
this->action = 2;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->spriteIndex = 0xa6;
this->palette.raw = 0x33;
this->spriteVramOffset = 0;
@@ -72,7 +72,7 @@ void sub_08018CBC(Entity* this) {
void sub_08018DE8(Entity* this) {
u8 bVar1;
- bVar1 = this->attachedEntity->field_0x3a & 4;
+ bVar1 = this->child->field_0x3a & 4;
if (bVar1 == 0) {
gPlayerState.field_0x1c = bVar1;
DeleteThisEntity();
@@ -82,11 +82,11 @@ void sub_08018DE8(Entity* this) {
sub_08018F6C(this);
break;
case 5:
- this->attachedEntity->subAction = 4;
+ this->child->subAction = 4;
COLLISION_ON(this);
this->action = 2;
this->spritePriority.b0 = 2;
- this->attachedEntity->spriteSettings.b.draw = 1;
+ this->child->spriteSettings.draw = 1;
sub_08018FA0(this);
break;
}
@@ -96,12 +96,12 @@ void sub_08018DE8(Entity* this) {
ASM_FUNC("asm/non_matching/playerItem11/sub_08018E68.inc", void sub_08018E68(Entity* this))
void sub_08018F6C(Entity* this) {
- if (this->attachedEntity != NULL) {
- this->attachedEntity->subAction = 5;
- this->attachedEntity->spriteSettings.b.draw = 1;
+ if (this->child != NULL) {
+ this->child->subAction = 5;
+ this->child->spriteSettings.draw = 1;
} else {
GetNextFrame(this);
- if (this->frames.all == 0) {
+ if (this->frame == 0) {
return;
}
}
diff --git a/src/playerItem/playerItem12.c b/src/playerItem/playerItem12.c
index f29eb37c..1c14e0ed 100644
--- a/src/playerItem/playerItem12.c
+++ b/src/playerItem/playerItem12.c
@@ -16,7 +16,7 @@ ASM_FUNC("asm/non_matching/playerItem12/sub_080701F8.inc", void sub_080701F8(Ent
void sub_0807037C(Entity* this) {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
DeleteThisEntity();
}
}
diff --git a/src/playerItem/playerItem14.c b/src/playerItem/playerItem14.c
index dca41640..0d241609 100644
--- a/src/playerItem/playerItem14.c
+++ b/src/playerItem/playerItem14.c
@@ -18,7 +18,7 @@ void PlayerItem14(Entity* this) {
void sub_0805FBE8(Entity* this) {
CopyPosition(&gPlayerEntity, this);
this->action++;
- this->spriteSettings.b.draw = TRUE;
+ this->spriteSettings.draw = TRUE;
this->field_0x3c = gPlayerEntity.field_0x3c + 1;
this->hitbox = &gUnk_08109AD0;
this->speed = 0x380;
diff --git a/src/playerItem/playerItem15.c b/src/playerItem/playerItem15.c
index 4f0a2782..e90cf433 100644
--- a/src/playerItem/playerItem15.c
+++ b/src/playerItem/playerItem15.c
@@ -13,7 +13,7 @@ void PlayerItem15(Entity* this) {
}
void sub_080A3084(Entity* this) {
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->action = 0x01;
CopyPosition(this->parent, this);
if (this->type == 0) {
diff --git a/src/playerItem/playerItemBomb.c b/src/playerItem/playerItemBomb.c
index c47cd7c6..2ccf4643 100644
--- a/src/playerItem/playerItemBomb.c
+++ b/src/playerItem/playerItemBomb.c
@@ -40,7 +40,7 @@ NONMATCH("asm/non_matching/playerItemBomb/PlayerItemBomb.inc", void PlayerItemBo
this->action = 0x03;
this->spritePriority.b1 = 2;
this->actionDelay = 0x0f;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
sub_0805EC60(this);
sub_08078954(this);
CreateObjectWithParent(this, 0x20, 0, 0);
diff --git a/src/playerItem/playerItemGustJar.c b/src/playerItem/playerItemGustJar.c
index 3b1433a0..041172ae 100644
--- a/src/playerItem/playerItemGustJar.c
+++ b/src/playerItem/playerItemGustJar.c
@@ -32,7 +32,7 @@ void sub_080ADA6C(Entity* this) {
void sub_080ADAA8(Entity* this) {
sub_080ADC84(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 2;
sub_080ADCA0(this, 0);
} else {
@@ -59,15 +59,15 @@ void sub_080ADC14(Entity* this) {
}
void sub_080ADC60(Entity* this) {
- if ((this->frames.all & 0x80) != 0) {
- this->spriteSettings.b.draw = 0;
+ if ((this->frame & 0x80) != 0) {
+ this->spriteSettings.draw = 0;
} else {
UpdateAnimationSingleFrame(this);
}
}
void sub_080ADC84(Entity* this) {
- this->spriteSettings.b.flipX = gPlayerEntity.spriteSettings.b.flipX;
+ this->spriteSettings.flipX = gPlayerEntity.spriteSettings.flipX;
}
ASM_FUNC("asm/non_matching/playerItemGustJar/sub_080ADCA0.inc", void sub_080ADCA0(Entity* this, u32 param_1))
diff --git a/src/playerItem/playerItemSwordBeam.c b/src/playerItem/playerItemSwordBeam.c
index 8fb41232..ff4fab24 100644
--- a/src/playerItem/playerItemSwordBeam.c
+++ b/src/playerItem/playerItemSwordBeam.c
@@ -23,7 +23,7 @@ void PlayerItemSwordBeam(Entity* this) {
void sub_08019498(Entity* this) {
CopyPosition(&gPlayerEntity, this);
this->action += 0x01;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x3c = gPlayerEntity.field_0x3c + 1;
this->hitbox = &gUnk_080B4408;
this->speed = 0x380;
@@ -38,13 +38,13 @@ void sub_08019498(Entity* this) {
case 0:
this->x.HALF.HI += -3;
this->y.HALF.HI += -8;
- this->spriteSettings.raw |= 0x80;
+ this->spriteSettings.flipY = 1;
break;
case 4:
this->x.HALF.HI += 2;
break;
case 2:
- this->spriteSettings.b.flipX = 1;
+ this->spriteSettings.flipX = 1;
this->x.HALF.HI += 1;
this->y.HALF.HI += -4;
break;
diff --git a/src/projectile/arrowProjectile.c b/src/projectile/arrowProjectile.c
index eb9296a4..51a49e34 100644
--- a/src/projectile/arrowProjectile.c
+++ b/src/projectile/arrowProjectile.c
@@ -44,11 +44,11 @@ void sub_080A9334(Entity* this) {
void ArrowProjectile_Init(Entity* this) {
this->action = 1;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
COLLISION_OFF(this);
this->actionDelay = 0x6a;
this->field_0xf = 0;
- this->hVelocity = 0xa00;
+ this->zVelocity = 0xa00;
sub_080A94C0(this, this->type);
}
@@ -63,7 +63,7 @@ void ArrowProjectile_Action1(Entity* this) {
if (parent->field_0xf != 0) {
this->action = 2;
COLLISION_ON(this);
- parent->attachedEntity = NULL;
+ parent->child = NULL;
SoundReq(SFX_FC);
}
}
@@ -106,7 +106,7 @@ void sub_080A9488(Entity* this) {
this->action = 4;
COLLISION_OFF(this);
this->actionDelay = 2;
- this->hVelocity = 0x18000;
+ this->zVelocity = 0x18000;
this->animationState = (this->knockbackDirection & 0x18) >> 3;
EnqueueSFX(SFX_METAL_CLINK);
sub_080A94C0(this, this->animationState);
@@ -114,8 +114,8 @@ void sub_080A9488(Entity* this) {
void sub_080A94C0(Entity* this, u32 animationState) {
const struct_081299F8* entry = &gUnk_081299F8[animationState];
- this->spriteSettings.b.flipX = entry->flipX;
- this->spriteSettings.b.flipY = entry->flipY;
+ this->spriteSettings.flipX = entry->flipX;
+ this->spriteSettings.flipY = entry->flipY;
this->animIndex = entry->animIndex;
this->hitbox = (Hitbox*)entry->hitbox;
InitializeAnimation(this, this->animIndex);
diff --git a/src/projectile/ballAndChain.c b/src/projectile/ballAndChain.c
index 065c9e8a..bee0f066 100644
--- a/src/projectile/ballAndChain.c
+++ b/src/projectile/ballAndChain.c
@@ -33,7 +33,7 @@ void sub_080AB074(Entity* this) {
this->x.WORD += gSineTable[parent->field_0x7c.BYTES.byte0] * (parent->field_0x7c.BYTES.byte2 << 8);
this->y.WORD -= gSineTable[parent->field_0x7c.BYTES.byte0 + 0x40] * (parent->field_0x7c.BYTES.byte2 << 8);
- this->height.HALF.HI += (s8)parent->field_0x7c.BYTES.byte3;
+ this->z.HALF.HI += (s8)parent->field_0x7c.BYTES.byte3;
if (parent->field_0x7a.HALF.HI != 0) {
parent = CreateProjectile(0x19);
if (parent != NULL) {
diff --git a/src/projectile/boneProjectile.c b/src/projectile/boneProjectile.c
index 29361923..9844fae1 100644
--- a/src/projectile/boneProjectile.c
+++ b/src/projectile/boneProjectile.c
@@ -30,7 +30,7 @@ void sub_080A81C4(Entity* this) {
void BoneProjectile_Init(Entity* this) {
this->action = 1;
this->actionDelay = 0x3c;
- this->height.HALF.HI = 0xfffe;
+ this->z.HALF.HI = 0xfffe;
InitializeAnimation(this, 0);
}
@@ -59,12 +59,12 @@ void BoneProjectile_Action2(Entity* this) {
this->action = 3;
COLLISION_OFF(this);
this->speed = 0xe0;
- this->hVelocity = 0xe000;
+ this->zVelocity = 0xe000;
}
}
void BoneProjectile_Action3(Entity* this) {
- this->spriteSettings.b.draw ^= 1;
+ this->spriteSettings.draw ^= 1;
sub_0806F69C(this);
GetNextFrame(this);
if (sub_080044EC(this, 0x1800) == 0) {
@@ -83,7 +83,7 @@ void BoneProjectile_Action4(Entity* this) {
void sub_080A82D8(Entity* this) {
this->action = 4;
COLLISION_OFF(this);
- this->hVelocity = 0x10000;
+ this->zVelocity = 0x10000;
this->direction ^= 0x10;
this->speed = 0x80;
}
diff --git a/src/projectile/cannonballProjectile.c b/src/projectile/cannonballProjectile.c
index 2f4c8339..25d79adf 100644
--- a/src/projectile/cannonballProjectile.c
+++ b/src/projectile/cannonballProjectile.c
@@ -40,7 +40,7 @@ void sub_080AB544(Entity* this) {
void CannonballProjectile_Init(Entity* this) {
this->action = 1;
this->direction = this->type << 3;
- this->height.HALF.HI = 0xfffc;
+ this->z.HALF.HI = 0xfffc;
InitializeAnimation(this, this->type);
}
@@ -78,14 +78,14 @@ bool32 sub_080AB5F4(Entity* this) {
}
bool32 sub_080AB634(Entity* this) {
- Entity** entities = ((Entity**)&this->parent->hVelocity);
+ Entity** entities = ((Entity**)&this->parent->zVelocity);
u32 i;
for (i = 0; i <= 3; ++i) {
if (entities[i] != NULL && (sub_080177A0(this, entities[i]) != 0)) {
if (entities[i]->action < 3) {
entities[i]->action = 3;
entities[i]->actionDelay = 0x1e;
- entities[i]->spriteSettings.b.draw = 0;
+ entities[i]->spriteSettings.draw = 0;
CreateFx(entities[i], FX_WHITE_ROCK, 0);
}
DeleteEntity(this);
diff --git a/src/projectile/darkNutSwordSlash.c b/src/projectile/darkNutSwordSlash.c
index 5875a9d6..20b968db 100644
--- a/src/projectile/darkNutSwordSlash.c
+++ b/src/projectile/darkNutSwordSlash.c
@@ -21,7 +21,7 @@ void DarkNutSwordSlash(Entity* this) {
InitAnimationForceUpdate(this, this->parent->animationState + 0x18);
}
}
- if ((this->parent == NULL) || (this->parent->currentHealth == 0)) {
+ if ((this->parent == NULL) || (this->parent->health == 0)) {
DeleteThisEntity();
}
if (((this->bitfield & 0x80) != 0) && (this->field_0x4c == &gPlayerEntity)) {
@@ -46,7 +46,7 @@ void DarkNutSwordSlash_OnTick(Entity* this) {
void DarkNutSwordSlash_UpdateType0(Entity* this) {
Entity* parent = this->parent;
- this->hitbox = (Hitbox*)gUnk_081293E0[parent->animationState][(parent->frames.all & 0xf) - 1];
+ this->hitbox = (Hitbox*)gUnk_081293E0[parent->animationState][(parent->frame & 0xf) - 1];
}
void DarkNutSwordSlash_UpdateType2(Entity* this) {
@@ -55,7 +55,7 @@ void DarkNutSwordSlash_UpdateType2(Entity* this) {
}
void DarkNutSwordSlash_UpdateType34(Entity* this) {
- if ((this->parent->frames.all & 0x10) != 0) {
+ if ((this->parent->frame & 0x10) != 0) {
this->hitbox = (Hitbox*)gUnk_08129410[this->parent->animationState];
} else {
this->hitbox = (Hitbox*)gUnk_08129400[this->parent->animationState];
diff --git a/src/projectile/dekuSeedProjectile.c b/src/projectile/dekuSeedProjectile.c
index 63716065..9de363e2 100644
--- a/src/projectile/dekuSeedProjectile.c
+++ b/src/projectile/dekuSeedProjectile.c
@@ -44,7 +44,7 @@ void DekuSeedProjectile_Init(Entity* this) {
this->action = 1;
this->actionDelay = 0x30;
this->field_0xf = 0;
- this->height.HALF.HI -= 4;
+ this->z.HALF.HI -= 4;
if (CheckGlobalFlag(TABIDACHI) == 0) {
this->hitType = 0x68;
}
@@ -107,7 +107,7 @@ void DekuSeedProjectile_Action2(Entity* this) {
void DekuSeedProjectile_Action3(Entity* this) {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
DeleteThisEntity();
}
}
@@ -126,7 +126,7 @@ void DekuSeedProjectile_Action4(Entity* this) {
break;
}
if ((this->flags & ENT_COLLIDE) == 0) {
- this->spriteSettings.b.draw ^= 1;
+ this->spriteSettings.draw ^= 1;
}
}
diff --git a/src/projectile/dirtBallProjectile.c b/src/projectile/dirtBallProjectile.c
index fd5909b8..9d4d7187 100644
--- a/src/projectile/dirtBallProjectile.c
+++ b/src/projectile/dirtBallProjectile.c
@@ -17,10 +17,10 @@ void DirtBallProjectile(Entity* this) {
void DirtBallProjectile_OnTick(Entity* this) {
if (this->type == 1) {
- if (this->attachedEntity == NULL) {
+ if (this->child == NULL) {
DeleteThisEntity();
}
- if (this->attachedEntity->next == NULL) {
+ if (this->child->next == NULL) {
DeleteThisEntity();
}
}
@@ -30,7 +30,7 @@ void DirtBallProjectile_OnTick(Entity* this) {
void sub_080A881C(Entity* this) {
this->field_0x46 = 0;
if (this->type == 0) {
- this->parent->attachedEntity = NULL;
+ this->parent->child = NULL;
if (this->bitfield == 0x80) {
gPlayerState.hurtBlinkSpeed = 0xf0;
ModHealth(-2);
@@ -47,8 +47,8 @@ void sub_080A881C(Entity* this) {
void DirtBallProjectile_Init(Entity* this) {
this->action = 1;
this->subAction = 0;
- this->spriteSettings.b.shadow = 1;
- this->hVelocity = 0x8000;
+ this->spriteSettings.shadow = 1;
+ this->zVelocity = 0x8000;
this->hitbox = (Hitbox*)&gUnk_08129764;
this->field_0x3c |= 0x10;
switch (this->type) {
@@ -79,24 +79,24 @@ void DirtBallProjectile_Action1(Entity* this) {
PositionRelative(parent, this, 0, -0x10000);
switch (this->type) {
case 0:
- this->height.HALF.HI += 0x10;
+ this->z.HALF.HI += 0x10;
break;
case 1:
- this->height.HALF.HI += 0xe;
- sub_08078954(this->attachedEntity);
- CopyPosition(this, this->attachedEntity);
- if ((0xf < (u8)(this->actionDelay++ + 1)) && (entity = this->attachedEntity, entity->actionDelay == 0)) {
+ this->z.HALF.HI += 0xe;
+ sub_08078954(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 ((this->attachedEntity->field_0xf < 0x20) && ((this->attachedEntity->field_0xf & 3) == 3)) {
+ if ((this->child->field_0xf < 0x20) && ((this->child->field_0xf & 3) == 3)) {
parent->field_0x82.HALF.HI = 0xc0;
this->action = 2;
}
}
break;
case 2:
- this->height.HALF.HI += 0xe;
+ this->z.HALF.HI += 0xe;
if (sub_080041A0(this, &gPlayerEntity, 0xe, 0xe) != 0) {
this->action = 2;
parent->field_0x82.HALF.HI = 0xc0;
@@ -112,7 +112,7 @@ void DirtBallProjectile_Action2(Entity* this) {
Entity* entity;
if (this->type == 1) {
- entity = this->attachedEntity;
+ entity = this->child;
if (entity == NULL) {
DeleteThisEntity();
}
@@ -161,7 +161,7 @@ void DirtBallProjectile_Action2(Entity* this) {
void DirtBallProjectile_Action3(Entity* this) {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
DeleteEntity(this);
}
}
diff --git a/src/projectile/fireProjectile.c b/src/projectile/fireProjectile.c
index 4419b527..e3ecceb4 100644
--- a/src/projectile/fireProjectile.c
+++ b/src/projectile/fireProjectile.c
@@ -37,7 +37,7 @@ void FireProjectile_Action1(Entity* this) {
if (parent->next == NULL) {
DeleteEntity(this);
} else {
- if (this->spriteSettings.b.draw == 1) {
+ if (this->spriteSettings.draw == 1) {
CopyPosition(parent, this);
if (this->actionDelay != 0) {
direction = parent->direction & 0x18;
@@ -68,7 +68,7 @@ void FireProjectile_Action2(Entity* this) {
void FireProjectile_Action3(Entity* this) {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
DeleteEntity(this);
}
}
diff --git a/src/projectile/gleerokProjectile.c b/src/projectile/gleerokProjectile.c
index 957667ea..3c59c8f2 100644
--- a/src/projectile/gleerokProjectile.c
+++ b/src/projectile/gleerokProjectile.c
@@ -36,12 +36,12 @@ void GleerokProjectile_Init(Entity* this) {
s32 iVar2;
this->action = 1;
- this->hVelocity = -0x10000;
+ this->zVelocity = -0x10000;
if (this->type != 3) {
CopyPosition(this->parent, this);
sub_0806F5BC(this, 0x1000, this->direction);
- this->height.WORD = this->parent->y.WORD - this->attachedEntity->y.WORD;
- this->y.WORD -= this->height.WORD;
+ this->z.WORD = this->parent->y.WORD - this->child->y.WORD;
+ this->y.WORD -= this->z.WORD;
InitializeAnimation(this, 0x51);
SoundReq(SFX_1B5);
}
@@ -63,14 +63,14 @@ void GleerokProjectile_Init(Entity* this) {
} else if (0x400 < iVar2) {
iVar2 = 0x400;
}
- this->hVelocity = this->height.WORD / (iVar2 << 8) << 0xd;
+ this->zVelocity = this->z.WORD / (iVar2 << 8) << 0xd;
this->field_0xf = 0x1e;
break;
case 2:
- this->hVelocity = (this->height.WORD / 0x18000) << 0xc;
+ this->zVelocity = (this->z.WORD / 0x18000) << 0xc;
break;
case 3:
- this->height.WORD = 0xff600000;
+ this->z.WORD = 0xff600000;
uVar1 = (Random() & 3) * 2;
this->x.HALF.HI = gUnk_08129978[uVar1] + this->x.HALF.HI;
this->y.HALF.HI = gUnk_08129978[uVar1 + 1] + this->y.HALF.HI;
@@ -126,7 +126,7 @@ void GleerokProjectile_Action2(Entity* this) {
sub_080A90D8(this);
}
} else {
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 3;
COLLISION_OFF(this);
InitializeAnimation(this, 0x53);
@@ -136,7 +136,7 @@ void GleerokProjectile_Action2(Entity* this) {
void GleerokProjectile_Action3(Entity* this) {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
DeleteThisEntity();
}
}
diff --git a/src/projectile/guardLineOfSight.c b/src/projectile/guardLineOfSight.c
index 2fff5c06..cf0510e4 100644
--- a/src/projectile/guardLineOfSight.c
+++ b/src/projectile/guardLineOfSight.c
@@ -18,7 +18,7 @@ void GuardLineOfSight(Entity* this) {
if (this->action == 0) {
this->action = 1;
this->actionDelay = Random();
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
if (this->bitfield == 0x80) {
if (this->parent != NULL) {
@@ -47,7 +47,7 @@ void GuardLineOfSight(Entity* this) {
if (this->action == 0) {
this->action = 1;
this->actionDelay = 0x12;
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
this->speed = 0x800;
this->hitbox = (Hitbox*)&gUnk_080FD1E4;
InitializeAnimation(this, 0);
diff --git a/src/projectile/gyorgMaleEnergyProjectile.c b/src/projectile/gyorgMaleEnergyProjectile.c
index 33b34439..115fc9fb 100644
--- a/src/projectile/gyorgMaleEnergyProjectile.c
+++ b/src/projectile/gyorgMaleEnergyProjectile.c
@@ -66,7 +66,7 @@ void GyorgMaleEnergyProjectile_Action2(Entity* this) {
void GyorgMaleEnergyProjectile_Action3(Entity* this) {
sub_080AF090(this);
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
DeleteThisEntity();
}
}
diff --git a/src/projectile/gyorgTail.c b/src/projectile/gyorgTail.c
index acf81cc7..767a775d 100644
--- a/src/projectile/gyorgTail.c
+++ b/src/projectile/gyorgTail.c
@@ -55,7 +55,7 @@ void GyorgTail_Init(Entity* this) {
if (sub_080AC5E4(this) != 0) {
this->action = 1;
this->frameIndex = 0xc;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->field_0x7a.HWORD = gUnk_0812A9B4[Random() & 1];
this->collisionLayer = 2;
sub_080AC388(this);
@@ -66,7 +66,7 @@ ASM_FUNC("asm/non_matching/gyorgTail/sub_080AC388.inc", void sub_080AC388(Entity
void sub_080AC480(Entity* this) {
if (this->actionDelay != 0) {
- if (this->parent->currentHealth == 0) {
+ if (this->parent->health == 0) {
this->action = 1;
this->hitType = 0x1d;
} else {
@@ -92,7 +92,7 @@ void sub_080AC510(Entity* this) {
if (this->action == 0) {
this->action = 1;
this->frameIndex = gUnk_0812A9BA[this->type * 3 + this->type2 - 1];
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
this->collisionLayer = 2;
if (*(u16*)&this->type == 0x300) {
this->hitbox = &gUnk_080FD458;
@@ -104,7 +104,7 @@ void sub_080AC560(Entity* this) {
s32 factor;
Entity* entity;
- entity = this->attachedEntity;
+ entity = this->child;
if (entity->next == NULL) {
DeleteThisEntity();
}
@@ -117,7 +117,7 @@ void sub_080AC560(Entity* this) {
this->hitbox = &gUnk_080FD448;
}
this->frameIndex = 0xff;
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
}
factor = this->field_0x78.HALF.HI << 8;
this->x.WORD = entity->x.WORD + gSineTable[entity->direction] * factor;
@@ -142,21 +142,21 @@ NONMATCH("asm/non_matching/gyorgTail/sub_080AC5E4.inc", bool32 sub_080AC5E4(Enti
entity->type2 = 1;
entity->parent = this->parent;
entity->field_0x78.HALF.HI = 0x12;
- this->attachedEntity = entity;
+ this->child = entity;
entity2 = CreateProjectile(0x22);
entity2->type = this->type;
entity2->type2 = 2;
entity2->parent = this->parent;
entity2->field_0x78.HALF.HI = 0x14;
uVar3 = entity2->field_0x78.HALF.HI;
- entity->attachedEntity = entity2;
+ entity->child = entity2;
entity3 = CreateProjectile(0x22);
entity3->type = this->type;
entity3->type2 = 3;
entity3->parent = this->parent;
- entity3->attachedEntity = NULL;
+ entity3->child = NULL;
entity3->field_0x78.HALF.HI = 0;
- entity2->attachedEntity = entity3;
+ entity2->child = entity3;
} else {
if (0x44 < gEntCount) {
return 0;
@@ -168,20 +168,20 @@ NONMATCH("asm/non_matching/gyorgTail/sub_080AC5E4.inc", bool32 sub_080AC5E4(Enti
entity->parent = this->parent;
entity->field_0x78.HALF.HI = 0x10;
uVar3 = entity->field_0x78.HALF.HI;
- this->attachedEntity = entity;
+ this->child = entity;
entity2 = CreateProjectile(0x22);
entity2->type = this->type;
entity2->type2 = 2;
entity2->parent = this->parent;
- entity2->attachedEntity = NULL;
+ entity2->child = NULL;
entity2->field_0x78.HALF.HI = 0x20;
- entity->attachedEntity = entity2;
+ entity->child = entity2;
}
entity4 = CreateProjectile(0x22);
entity4->type = this->type;
entity4->type2 = 4;
entity4->parent = this->parent;
- entity4->attachedEntity = this;
+ entity4->child = this;
entity4->field_0x78.HALF.HI = uVar3;
return 1;
}
@@ -200,9 +200,9 @@ NONMATCH("asm/non_matching/gyorgTail/sub_080AC7C4.inc", void sub_080AC7C4(Entity
s32 iVar2;
s32 iVar3;
- entity1 = this->attachedEntity;
- entity2 = entity1->attachedEntity;
- entity3 = entity2->attachedEntity;
+ entity1 = this->child;
+ entity2 = entity1->child;
+ entity3 = entity2->child;
if (entity3 != NULL) {
CopyPosition(this->parent, entity3);
} else {
diff --git a/src/projectile/iceProjectile.c b/src/projectile/iceProjectile.c
index 96e83a42..3ff1031b 100644
--- a/src/projectile/iceProjectile.c
+++ b/src/projectile/iceProjectile.c
@@ -39,7 +39,7 @@ void IceProjectile_Action1(Entity* this) {
if (parent->next == NULL) {
DeleteEntity(this);
} else {
- if (this->spriteSettings.b.draw == 1) {
+ if (this->spriteSettings.draw == 1) {
CopyPosition(parent, this);
if (this->actionDelay != 0) {
direction = parent->direction & 0x18;
@@ -70,7 +70,7 @@ void IceProjectile_Action2(Entity* this) {
void IceProjectile_Action3(Entity* this) {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
DeleteEntity(this);
}
}
diff --git a/src/projectile/keatonDagger.c b/src/projectile/keatonDagger.c
index b7a876e0..8c9bc2f1 100644
--- a/src/projectile/keatonDagger.c
+++ b/src/projectile/keatonDagger.c
@@ -13,7 +13,7 @@ void KeatonDagger(Entity* this) {
this->action = 1;
}
parent = this->parent;
- if (((parent == NULL) || (parent->currentHealth == 0)) || (parent->next == NULL)) {
+ if (((parent == NULL) || (parent->health == 0)) || (parent->next == NULL)) {
if (((this->bitfield & 0x80) != 0) && (this->field_0x4c == &gPlayerEntity)) {
sub_0803C0AC(this);
}
diff --git a/src/projectile/lakituCloudProjectile.c b/src/projectile/lakituCloudProjectile.c
index 1971177d..39c6f65f 100644
--- a/src/projectile/lakituCloudProjectile.c
+++ b/src/projectile/lakituCloudProjectile.c
@@ -60,7 +60,7 @@ void LakituCloudProjectile_Init(Entity* this) {
void LakituCloudProjectile_Action1(Entity* this) {
PositionRelative(this->parent, this, 0, -0x10000);
- this->height.HALF.HI = 0xfffe;
+ this->z.HALF.HI = 0xfffe;
UpdateAnimationSingleFrame(this);
}
diff --git a/src/projectile/lakituLightning.c b/src/projectile/lakituLightning.c
index 975491c2..a2f843cf 100644
--- a/src/projectile/lakituLightning.c
+++ b/src/projectile/lakituLightning.c
@@ -19,7 +19,7 @@ void LakituLightning_OnTick(Entity* this) {
}
void sub_080A9DD8(Entity* this) {
- if ((this->currentHealth == 0) || (this->bitfield == 0x80)) {
+ if ((this->health == 0) || (this->bitfield == 0x80)) {
DeleteThisEntity();
}
LakituLightning_OnTick(this);
@@ -28,7 +28,7 @@ void sub_080A9DD8(Entity* this) {
void LakituLightning_Init(Entity* this) {
this->action = 1;
this->actionDelay = 0xb4;
- this->currentHealth = 1;
+ this->health = 1;
InitializeAnimation(this, 0);
}
diff --git a/src/projectile/mandiblesProjectile.c b/src/projectile/mandiblesProjectile.c
index 1095b9a4..ce1f3097 100644
--- a/src/projectile/mandiblesProjectile.c
+++ b/src/projectile/mandiblesProjectile.c
@@ -27,7 +27,7 @@ void sub_080AA3E0(Entity*, u32);
bool32 sub_080AA374(Entity*);
void MandiblesProjectile(Entity* this) {
- Entity* entity = this->attachedEntity;
+ Entity* entity = this->child;
if (entity == NULL) {
entity = this->parent;
}
@@ -104,8 +104,8 @@ void MandiblesProjectile_Action1(Entity* this) {
void MandiblesProjectile_Action2(Entity* this) {
UpdateAnimationSingleFrame(this);
- if ((this->frames.all & 0x40) != 0) {
- this->frames.all &= 0xbf;
+ if ((this->frame & 0x40) != 0) {
+ this->frame &= 0xbf;
EnqueueSFX(SFX_15D);
}
this->field_0x78.HWORD = TILE(this->x.HALF.HI, this->y.HALF.HI);
@@ -122,7 +122,7 @@ void MandiblesProjectile_Action3(Entity* this) {
s8* tmp;
Entity* entity;
- entity = this->attachedEntity;
+ entity = this->child;
if (entity == NULL) {
DeleteThisEntity();
}
@@ -141,7 +141,7 @@ void MandiblesProjectile_Action3(Entity* this) {
this->field_0xf -= 1;
} else {
UpdateAnimationSingleFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 4;
this->field_0x82.HALF.LO = 3;
this->field_0xf = 0x40;
@@ -164,16 +164,16 @@ void MandiblesProjectile_Action4(Entity* this) {
u32 uVar2;
Entity* entity;
- entity = this->attachedEntity;
+ entity = this->child;
if (entity != NULL) {
if (entity->next == NULL) {
- this->attachedEntity = NULL;
+ this->child = NULL;
}
if (this->field_0xf != 0) {
this->field_0xf -= 1;
} else {
if (sub_080AA374(this) != 0) {
- if (entity->currentHealth == 0) {
+ if (entity->health == 0) {
DeleteThisEntity();
}
EnqueueSFX(0xf2);
@@ -183,8 +183,8 @@ void MandiblesProjectile_Action4(Entity* this) {
this->actionDelay = 0;
this->field_0x80.HWORD = 0x20;
this->spriteOrientation.flipY = 2;
- this->parent = this->attachedEntity;
- this->attachedEntity = NULL;
+ this->parent = this->child;
+ this->child = NULL;
sub_080AA270(this);
entity = this->parent;
entity->action = 1;
@@ -306,13 +306,12 @@ NONMATCH("asm/non_matching/mandiblesProjectile/sub_080AA374.inc", bool32 sub_080
bool32 result;
result = FALSE;
- if ((this->attachedEntity != NULL) && (this->attachedEntity->next != NULL)) {
+ if ((this->child != NULL) && (this->child->next != NULL)) {
// TODO regalloc
- animationState = this->attachedEntity->animationState;
- uVar1 =
- sub_0806F824(this, this->attachedEntity, gUnk_08129D14[animationState], gUnk_08129D14[animationState + 1]);
- if (sub_0806FCB8(this, this->attachedEntity->x.HALF.HI + gUnk_08129D14[animationState],
- this->attachedEntity->y.HALF.HI + gUnk_08129D14[animationState + 1], 8) != 0) {
+ animationState = this->child->animationState;
+ uVar1 = sub_0806F824(this, this->child, gUnk_08129D14[animationState], gUnk_08129D14[animationState + 1]);
+ if (sub_0806FCB8(this, this->child->x.HALF.HI + gUnk_08129D14[animationState],
+ this->child->y.HALF.HI + gUnk_08129D14[animationState + 1], 8) != 0) {
result = TRUE;
} else {
sub_08004596(this, uVar1);
diff --git a/src/projectile/mazaalEnergyBeam.c b/src/projectile/mazaalEnergyBeam.c
index 20b73213..8d617ba3 100644
--- a/src/projectile/mazaalEnergyBeam.c
+++ b/src/projectile/mazaalEnergyBeam.c
@@ -11,7 +11,7 @@ void MazaalEnergyBeam(Entity* this) {
void MazaalEnergyBeam_Init(Entity* this) {
this->action = 1;
this->actionDelay = 10;
- this->height.HALF.HI -= 2;
+ this->z.HALF.HI -= 2;
this->y.HALF.HI += 2;
InitializeAnimation(this, 0);
SoundReq(SFX_149);
@@ -27,8 +27,8 @@ void MazaalEnergyBeam_Action1(Entity* this) {
this->y.HALF.HI += 6;
InitializeAnimation(this, 1);
} else {
- if (this->height.HALF.HI != 0) {
- this->height.HALF.HI += 1;
+ if (this->z.HALF.HI != 0) {
+ this->z.HALF.HI += 1;
}
tmp = &gSineTable[this->direction];
@@ -40,7 +40,7 @@ void MazaalEnergyBeam_Action1(Entity* this) {
void MazaalEnergyBeam_Action2(Entity* this) {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
DeleteEntity(this);
}
}
diff --git a/src/projectile/moblinSpear.c b/src/projectile/moblinSpear.c
index e4870a1f..f31459cc 100644
--- a/src/projectile/moblinSpear.c
+++ b/src/projectile/moblinSpear.c
@@ -62,7 +62,7 @@ NONMATCH("asm/non_matching/moblinSpear/MoblinSpear_Action1.inc", void MoblinSpea
if (parent->next == NULL) {
DeleteThisEntity();
}
- frames = parent->frames.all * 4;
+ frames = parent->frame * 4;
a = &gUnk_0812966C[frames / 4];
this->hitbox->offset_x = a->offsetX;
// TODO offset used to increase a pointer is already increated here?
diff --git a/src/projectile/octorokBossProjectile.c b/src/projectile/octorokBossProjectile.c
index 63bd13ae..048b9661 100644
--- a/src/projectile/octorokBossProjectile.c
+++ b/src/projectile/octorokBossProjectile.c
@@ -40,7 +40,7 @@ void OctorokBossProjectile_Init(Entity* this) {
this->spriteRendering.b3 = 3;
this->spritePriority.b0 = 6;
this->speed = (Random() & 0x1ff) + 0x200;
- this->hVelocity = (Random() & 0x1fff) + 0x18000;
+ this->zVelocity = (Random() & 0x1fff) + 0x18000;
uVar1 = (((u8)Random() & 7) - 4);
this->direction -= uVar1;
*(u32*)&this->field_0x78 = 600;
@@ -60,7 +60,7 @@ void OctorokBossProjectile_Init(Entity* this) {
break;
case 3:
CopyPosition(&gPlayerEntity, this);
- this->height.WORD = 0xff600000;
+ this->z.WORD = 0xff600000;
this->x.HALF.HI += 0x60;
this->y.HALF.HI += 0x40;
this->x.HALF.HI -= (s32)Random() % 0xc0;
@@ -96,7 +96,7 @@ void OctorokBossProjectile_Action1(Entity* this) {
this->direction ^= 0x80;
this->speed = 0x400;
} else {
- this->parent->currentHealth -= 1;
+ this->parent->health -= 1;
this->parent->iframes = 0x1e;
if (this->parent->field_0x7c.BYTES.byte0 != 0) {
this->parent->knockbackDuration = 0x18;
@@ -132,11 +132,11 @@ void OctorokBossProjectile_Action1(Entity* this) {
return;
}
for (index = 0; index < 3; ++index) {
- this->attachedEntity = CreateProjectileWithParent(this, 0xf, 1);
- if (this->attachedEntity != NULL) {
- this->attachedEntity->parent = this->parent;
- this->attachedEntity->direction = this->direction + gUnk_08129ADC[index];
- CopyPosition(this, this->attachedEntity);
+ this->child = CreateProjectileWithParent(this, 0xf, 1);
+ if (this->child != NULL) {
+ this->child->parent = this->parent;
+ this->child->direction = this->direction + gUnk_08129ADC[index];
+ CopyPosition(this, this->child);
}
}
OctorokBossProjectile_Action2(this);
@@ -156,9 +156,9 @@ void OctorokBossProjectile_Action1(Entity* this) {
}
if (*(u32*)&this->field_0x78 < 0x1e) {
if ((*(u32*)&this->field_0x78 & 7) != 0) {
- this->spriteSettings.b.draw = 1;
+ this->spriteSettings.draw = 1;
} else {
- this->spriteSettings.b.draw = 0;
+ this->spriteSettings.draw = 0;
}
}
if (--*(u32*)&this->field_0x78 == -1) {
@@ -175,8 +175,8 @@ void OctorokBossProjectile_Action1(Entity* this) {
sub_0806F62C(this, this->speed, this->direction);
return;
}
- if (this->attachedEntity != NULL) {
- this->attachedEntity->actionDelay = 1;
+ if (this->child != NULL) {
+ this->child->actionDelay = 1;
}
DeleteThisEntity();
break;
diff --git a/src/projectile/projectile5.c b/src/projectile/projectile5.c
index 1010eb45..5d99e015 100644
--- a/src/projectile/projectile5.c
+++ b/src/projectile/projectile5.c
@@ -59,7 +59,7 @@ void Projectile5_Action1(Entity* this) {
DeleteThisEntity();
}
CopyPosition(parent, this);
- this->height.HALF.HI += 2;
+ this->z.HALF.HI += 2;
}
void (*const Projectile5_Functions[])(Entity*) = {
diff --git a/src/projectile/rockProjectile.c b/src/projectile/rockProjectile.c
index 0f02c6fe..fbbf3620 100644
--- a/src/projectile/rockProjectile.c
+++ b/src/projectile/rockProjectile.c
@@ -31,7 +31,7 @@ void sub_080A8064(Entity* this) {
void RockProjectile_Init(Entity* this) {
this->action = 1;
this->actionDelay = 0x30;
- this->hVelocity = 0xa000;
+ this->zVelocity = 0xa000;
InitializeAnimation(this, 0);
}
@@ -78,7 +78,7 @@ void RockProjectile_Action3(Entity* this) {
break;
}
if ((this->flags & ENT_COLLIDE) == 0) {
- this->spriteSettings.b.draw ^= 1;
+ this->spriteSettings.draw ^= 1;
}
}
@@ -86,7 +86,7 @@ void sub_080A8178(Entity* this) {
this->action = 2;
COLLISION_OFF(this);
this->speed = 0x40;
- this->hVelocity = 0x14000;
+ this->zVelocity = 0x14000;
}
void (*const RockProjectile_Functions[])(Entity*) = {
diff --git a/src/projectile/spiderWeb.c b/src/projectile/spiderWeb.c
index d3ec343a..fe98e9fb 100644
--- a/src/projectile/spiderWeb.c
+++ b/src/projectile/spiderWeb.c
@@ -80,15 +80,15 @@ void sub_080AA78C(Entity* this) {
}
if (sub_0806F520(this) != 0) {
UpdateAnimationSingleFrame(this);
- if ((this->frames.all & 0x10) != 0) {
- this->frames.all &= 0xef;
+ if ((this->frame & 0x10) != 0) {
+ this->frame &= 0xef;
EnqueueSFX(SFX_100);
}
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
sub_080AAAA8(this);
}
} else {
- if ((this->frames.all & 1) != 0) {
+ if ((this->frame & 1) != 0) {
sub_080AAAA8(this);
} else {
InitAnimationForceUpdate(this, this->type + 0x10);
@@ -110,7 +110,7 @@ void SpiderWeb_Init(Entity* this) {
}
void SpiderWeb_Action1(Entity* this) {
- if ((this->frames.all & 0x80) == 0) {
+ if ((this->frame & 0x80) == 0) {
UpdateAnimationSingleFrame(this);
}
sub_080AA9E0(this);
@@ -144,10 +144,9 @@ void SpiderWeb_SubAction0(Entity* this) {
InitAnimationForceUpdate(this, this->type + 4);
}
if ((entity->animationState >> 1 == this->type) && (gPlayerState.field_0xa8 == 0x1a) &&
- ((gPlayerState.heldObject & 2) != 0) && ((gPlayerEntity.frames.all & 2) != 0) &&
- ((this->frames.all & 0x80) == 0)) {
+ ((gPlayerState.heldObject & 2) != 0) && ((gPlayerEntity.frame & 2) != 0) && ((this->frame & 0x80) == 0)) {
UpdateAnimationSingleFrame(this);
- if ((this->frames.all & 1) != 0) {
+ if ((this->frame & 1) != 0) {
entity->x.HALF.HI = gUnk_0812A06C[entity->animationState] + entity->x.HALF.HI;
entity->y.HALF.HI = gUnk_0812A06C[entity->animationState + 1] + entity->y.HALF.HI;
EnqueueSFX(0x100);
diff --git a/src/projectile/stalfosProjectile.c b/src/projectile/stalfosProjectile.c
index 39c58075..0f3bfec5 100644
--- a/src/projectile/stalfosProjectile.c
+++ b/src/projectile/stalfosProjectile.c
@@ -33,7 +33,7 @@ void sub_080A9A34(Entity* this) {
if (this->bitfield == 0x9d) {
this->action = 3;
COLLISION_OFF(this);
- this->hVelocity = 0x2a000;
+ this->zVelocity = 0x2a000;
this->spritePriority.b1 = 1;
}
}
@@ -47,7 +47,7 @@ void sub_080A9A64(Entity* this) {
void StalfosProjectile_SubAction0(Entity* this) {
this->subAction = 2;
- this->height.HALF.HI = 0xfffe;
+ this->z.HALF.HI = 0xfffe;
}
void StalfosProjectile_SubAction1(Entity* this) {
@@ -77,7 +77,7 @@ void StalfosProjectile_Init(Entity* this) {
break;
case 2:
this->action = 3;
- this->hVelocity = 0x2a000;
+ this->zVelocity = 0x2a000;
this->spritePriority.b1 = 1;
break;
default:
@@ -117,8 +117,8 @@ void StalfosProjectile_Action2(Entity* this) {
}
void StalfosProjectile_Action3(Entity* this) {
- if (this->hVelocity < 0) {
- this->spriteSettings.b.flipY = 1;
+ if (this->zVelocity < 0) {
+ this->spriteSettings.flipY = 1;
}
if (sub_08003FC4(this, 0x2000) == 0) {
sub_080A9BA8(this);
@@ -155,7 +155,7 @@ void sub_080A9BD0(Entity* this) {
}
entry = &gUnk_08129B20[tmp + parent->animationState * 4];
sub_0806FA90(parent, this, entry->unk_0, entry->unk_1);
- this->height.HALF.HI = entry->unk_2 + this->height.HALF.HI;
+ this->z.HALF.HI = entry->unk_2 + this->z.HALF.HI;
}
void sub_080A9C34(Entity* this) {
diff --git a/src/projectile/v1DarkMagicProjectile.c b/src/projectile/v1DarkMagicProjectile.c
index 4568d0bc..dbce3794 100644
--- a/src/projectile/v1DarkMagicProjectile.c
+++ b/src/projectile/v1DarkMagicProjectile.c
@@ -22,7 +22,7 @@ void V1DarkMagicProjectile(Entity* this) {
void V1DarkMagicProjectile_OnTick(Entity* this) {
V1DarkMagicProjectile_Actions[this->action](this);
if ((this->type2 == 0) && (--this->cutsceneBeh.HWORD == 0)) {
- this->currentHealth = 0;
+ this->health = 0;
}
}
@@ -41,8 +41,8 @@ void sub_080AAC44(Entity* this) {
gPlayerState.field_0x1a[0] |= 0x80;
gPlayerState.field_0xa |= 0x80;
}
- if (gPlayerEntity.currentHealth == 0) {
- this->currentHealth = 0;
+ if (gPlayerEntity.health == 0) {
+ this->health = 0;
}
} else {
SoundReq(SFX_ITEM_GLOVES_KNOCKBACK);
@@ -58,7 +58,7 @@ ASM_FUNC("asm/non_matching/v1DarkMagicProjectile/sub_080AACE0.inc", void sub_080
void sub_080AAD70(Entity* this) {
if (sub_0806F520() == 0) {
- this->currentHealth = 0;
+ this->health = 0;
}
V1DarkMagicProjectile_SubActions[this->subAction](this);
}
@@ -72,7 +72,7 @@ void V1DarkMagicProjectile_SubAction1(Entity* this) {
void V1DarkMagicProjectile_SubAction2(Entity* this) {
if (sub_0806F3E4(this) != 0) {
- this->currentHealth = 0;
+ this->health = 0;
}
}
@@ -91,8 +91,8 @@ void V1DarkMagicProjectile_Init(Entity* this) {
this->field_0xf = 4;
this->field_0x80.HALF.LO = 0;
this->field_0x80.HALF.HI = 0;
- this->currentHealth = 0x10;
- this->height.HALF.HI += 4;
+ this->health = 0x10;
+ this->z.HALF.HI += 4;
this->spriteOrientation.flipY = 1;
this->spriteRendering.b3 = 1;
this->spritePriority.b0 = 4;
@@ -131,7 +131,7 @@ void V1DarkMagicProjectile_Action1(Entity* this) {
DeleteThisEntity();
}
case 2:
- if (this->parent->spriteSettings.b.draw == 0) {
+ if (this->parent->spriteSettings.draw == 0) {
DeleteThisEntity();
}
CopyPosition(this->parent, this);
@@ -148,9 +148,9 @@ void V1DarkMagicProjectile_Action2(Entity* this) {
void V1DarkMagicProjectile_Action3(Entity* this) {
CopyPosition(this->parent, this);
sub_080AB034(this);
- this->spriteSettings.b.draw = this->parent->spriteSettings.b.draw;
+ this->spriteSettings.draw = this->parent->spriteSettings.draw;
if (this->type != 0) {
- this->currentHealth = this->parent->currentHealth;
+ this->health = this->parent->health;
}
#ifndef EU
if (this->parent->action == 2) {
@@ -174,8 +174,8 @@ void sub_080AAF74(Entity* this) {
gPlayerEntity.iframes = 8;
ModHealth(-4);
sub_0800449C(&gPlayerEntity, 0x7a);
- if (gPlayerEntity.currentHealth == 0) {
- this->currentHealth = 0;
+ if (gPlayerEntity.health == 0) {
+ this->health = 0;
}
}
if (!((this->field_0x80.HALF.LO < 0x31) && (this->field_0x80.HALF.HI != 0x10))) {
@@ -183,13 +183,13 @@ void sub_080AAF74(Entity* this) {
this->field_0x80.HALF.LO = 0;
gPlayerEntity.iframes = 0xf0;
gPlayerState.field_0x1a[0] = 0;
- this->currentHealth = 0;
+ this->health = 0;
} else {
ResetPlayer();
gPlayerState.field_0x1a[0] |= 0x80;
gPlayerState.field_0xa |= 0x80;
CopyPosition(&gPlayerEntity, this);
- this->height.HALF.HI = gPlayerEntity.height.HALF.HI - 4;
+ this->z.HALF.HI = gPlayerEntity.z.HALF.HI - 4;
}
}
diff --git a/src/projectile/v1EyeLaser.c b/src/projectile/v1EyeLaser.c
index 38be21bc..500cee96 100644
--- a/src/projectile/v1EyeLaser.c
+++ b/src/projectile/v1EyeLaser.c
@@ -10,7 +10,7 @@ void sub_080AB758(Entity*);
void sub_080AB888(Entity*);
void V1EyeLaser(Entity* this) {
- if (this->parent->spriteSettings.b.draw == 0) {
+ if (this->parent->spriteSettings.draw == 0) {
DeleteThisEntity();
}
V1EyeLaser_Actions[this->action](this);
@@ -32,7 +32,7 @@ void V1EyeLaser_Init(Entity* this) {
void V1EyeLaser_Action1(Entity* this) {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 2;
InitializeAnimation(this, 1);
sub_080AB758(this);
diff --git a/src/projectile/v1FireProjectile.c b/src/projectile/v1FireProjectile.c
index c627ee36..3379c344 100644
--- a/src/projectile/v1FireProjectile.c
+++ b/src/projectile/v1FireProjectile.c
@@ -42,12 +42,12 @@ void V1FireProjectile_Init(Entity* this) {
s8* data;
this->action = 1;
- this->hVelocity = -0x10000;
+ this->zVelocity = -0x10000;
this->field_0x76.HWORD = TILE(this->x.HALF.HI, this->y.HALF.HI);
CopyPosition(this->parent, this);
sub_0806F5BC(this, 0x1000, this->direction);
this->spritePriority.b0 = 1;
- this->height = this->parent->height;
+ this->z = this->parent->z;
InitializeAnimation(this, 0x51);
SoundReq(SFX_1B5);
data = sub_080AB4F8(this);
@@ -68,7 +68,7 @@ void V1FireProjectile_Init(Entity* this) {
iVar2 = 0x20;
}
}
- this->hVelocity = (this->height.WORD / (iVar2 << 8)) << 0xd;
+ this->zVelocity = (this->z.WORD / (iVar2 << 8)) << 0xd;
this->direction = sub_080045B4(this, x, y);
}
@@ -90,7 +90,7 @@ void V1FireProjectile_Action1(Entity* this) {
void V1FireProjectile_Action2(Entity* this) {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
this->action = 3;
COLLISION_OFF(this);
InitializeAnimation(this, 0x53);
@@ -99,7 +99,7 @@ void V1FireProjectile_Action2(Entity* this) {
void V1FireProjectile_Action3(Entity* this) {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
DeleteThisEntity();
}
}
diff --git a/src/projectile/v2Projectile.c b/src/projectile/v2Projectile.c
index ffb558a1..d15834af 100644
--- a/src/projectile/v2Projectile.c
+++ b/src/projectile/v2Projectile.c
@@ -74,8 +74,8 @@ void sub_080ABD44(Entity* this) {
void sub_080ABD70(Entity* this) {
u32 tmp;
GetNextFrame(this);
- if ((this->frames.all & 0x10) != 0) {
- this->frames.all &= 0xef;
+ if ((this->frame & 0x10) != 0) {
+ this->frame &= 0xef;
this->speed = 0;
this->field_0x74.HWORD = TILE(this->x.HALF.HI, this->y.HALF.HI);
this->field_0x76.HWORD = GetTileType(this->field_0x74.HWORD, 2);
@@ -88,7 +88,7 @@ void sub_080ABD70(Entity* this) {
SetTileType(0x6d, this->field_0x74.HWORD, 2);
}
}
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
DeleteThisEntity();
}
}
diff --git a/src/projectile/v3ElectricProjectile.c b/src/projectile/v3ElectricProjectile.c
index 4d18a8ba..589e245c 100644
--- a/src/projectile/v3ElectricProjectile.c
+++ b/src/projectile/v3ElectricProjectile.c
@@ -33,14 +33,14 @@ void V3ElectricProjectile_Action1(Entity* this) {
DeleteThisEntity();
}
CopyPositionAndSpriteOffset(this->parent, this);
- this->height.HALF.HI -= 0x14;
+ this->z.HALF.HI -= 0x14;
if (this->cutsceneBeh.HALF.HI != 0) {
if (((--this->cutsceneBeh.HALF.HI) & 7) == 0) {
SoundReq(SFX_149);
}
}
GetNextFrame(this);
- if ((this->frames.all & 1) != 0) {
+ if ((this->frame & 1) != 0) {
if (this->type == 0) {
this->action = 2;
this->direction = GetFacingDirection(this, &gPlayerEntity);
@@ -50,7 +50,7 @@ void V3ElectricProjectile_Action1(Entity* this) {
this->action = 3;
this->actionDelay = 0x10;
}
- this->height.HALF.HI -= 0x28;
+ this->z.HALF.HI -= 0x28;
}
}
@@ -59,8 +59,8 @@ void V3ElectricProjectile_Action2(Entity* this) {
s32 iVar2;
u32 uVar3;
- if (this->height.HALF.HI < -6) {
- this->height.HALF.HI += 3;
+ if (this->z.HALF.HI < -6) {
+ this->z.HALF.HI += 3;
}
sub_080AF090(this);
if (this->collisions != 0) {
diff --git a/src/projectile/v3HandProjectile.c b/src/projectile/v3HandProjectile.c
index 2c4ff6d2..03f84cd7 100644
--- a/src/projectile/v3HandProjectile.c
+++ b/src/projectile/v3HandProjectile.c
@@ -19,8 +19,8 @@ void V3HandProjectile_OnTick(Entity* this) {
InitializeAnimation(this, 0);
SoundReq(SFX_199);
}
- if (this->height.HALF.HI < -6) {
- this->height.HALF.HI += 2;
+ if (this->z.HALF.HI < -6) {
+ this->z.HALF.HI += 2;
}
sub_080AF090(this);
if (this->collisions != 0) {
diff --git a/src/projectile/v3TennisBallProjectile.c b/src/projectile/v3TennisBallProjectile.c
index d2c4ef74..bcbc8daf 100644
--- a/src/projectile/v3TennisBallProjectile.c
+++ b/src/projectile/v3TennisBallProjectile.c
@@ -25,8 +25,8 @@ ASM_FUNC("asm/non_matching/v3TennisBallProjectile/sub_080ACA68.inc", void sub_08
void V3TennisBallProjectile_Init(Entity* this) {
this->action = 1;
this->direction = 0x10;
- this->height.HALF.HI = 0xfffc;
- this->attachedEntity = NULL;
+ this->z.HALF.HI = 0xfffc;
+ this->child = NULL;
InitializeAnimation(this, 7);
SoundReq(SFX_199);
}
diff --git a/src/projectile/windProjectile.c b/src/projectile/windProjectile.c
index d607486a..f315bfe5 100644
--- a/src/projectile/windProjectile.c
+++ b/src/projectile/windProjectile.c
@@ -36,7 +36,7 @@ void WindProjectile_Action1(Entity* this) {
if (parent->next == NULL) {
DeleteEntity(this);
} else {
- if (this->spriteSettings.b.draw == 1) {
+ if (this->spriteSettings.draw == 1) {
CopyPosition(parent, this);
direction = (parent->direction + 4) & 0x18;
if (this->actionDelay != 0) {
@@ -74,7 +74,7 @@ void WindProjectile_Action2(Entity* this) {
void WindProjectile_Action3(Entity* this) {
GetNextFrame(this);
- if ((this->frames.all & 0x80) != 0) {
+ if ((this->frame & 0x80) != 0) {
DeleteEntity(this);
}
}
diff --git a/src/projectile/winder.c b/src/projectile/winder.c
index 19e35248..640038e2 100644
--- a/src/projectile/winder.c
+++ b/src/projectile/winder.c
@@ -21,7 +21,7 @@ void Winder_Init(Entity* this) {
this->action += 1;
this->speed = 0x140;
- this->height.WORD = 0;
+ this->z.WORD = 0;
if (this->type == 0) {
this->direction = Random() & 0x18;
this->parent = this;
@@ -31,7 +31,7 @@ void Winder_Init(Entity* this) {
entity = CreateProjectile(0x1d);
entity->type = this->type + 1;
entity->parent = this->parent;
- entity->attachedEntity = this;
+ entity->child = this;
CopyPosition(this, entity);
}
diff --git a/src/script.c b/src/script.c
index c38343ae..fbb0be33 100644
--- a/src/script.c
+++ b/src/script.c
@@ -406,7 +406,7 @@ void HandlePostScriptActions(Entity* entity, ScriptExecutionContext* context) {
case 1 << 0x02:
break;
case 1 << 0x03:
- entity->hVelocity = 0x18000;
+ entity->zVelocity = 0x18000;
break;
case 1 << 0x04:
CreateSpeechBubbleExclamationMark(entity, 8, -0x18);
@@ -418,10 +418,10 @@ void HandlePostScriptActions(Entity* entity, ScriptExecutionContext* context) {
DestroyScriptExecutionContext(context);
DeleteThisEntity();
case 1 << 0x07:
- entity->spriteSettings.b.draw = 1;
+ entity->spriteSettings.draw = 1;
break;
case 1 << 0x08:
- entity->spriteSettings.b.draw = 0;
+ entity->spriteSettings.draw = 0;
break;
case 1 << 0x09:
entity->spriteOffsetY = 0;
@@ -450,7 +450,7 @@ void HandlePostScriptActions(Entity* entity, ScriptExecutionContext* context) {
entity->field_0x82.HWORD ^= 0x10;
break;
case 1 << 0x11:
- entity->spriteSettings.b.flipX ^= 1;
+ entity->spriteSettings.flipX ^= 1;
break;
case 1 << 0x12:
entity->field_0x82.HWORD |= 0x20;
@@ -900,7 +900,7 @@ void ScriptCommand_0807E564(Entity* entity, ScriptExecutionContext* context) {
}
void ScriptCommand_EntityHasHeight(Entity* entity, ScriptExecutionContext* context) {
- context->condition = entity->height.WORD != 0;
+ context->condition = entity->z.WORD != 0;
gActiveScriptInfo.flags |= 1;
}
@@ -1102,8 +1102,8 @@ void ScriptCommand_SetIntVariable(Entity* entity, ScriptExecutionContext* contex
}
void ScriptCommand_0807E924(Entity* entity, ScriptExecutionContext* context) {
- context->intVariable = entity->frames.all;
- entity->frames.all = 0;
+ context->intVariable = entity->frame;
+ entity->frame = 0;
}
void ScriptCommand_0807E930(Entity* entity, ScriptExecutionContext* context) {
@@ -1267,7 +1267,7 @@ void ScriptCommand_SetEntitySpeed(Entity* entity, ScriptExecutionContext* contex
}
void ScriptCommand_SetEntity0x20(Entity* entity, ScriptExecutionContext* context) {
- entity->hVelocity = GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
+ entity->zVelocity = GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
}
void ScriptCommand_SetEntityPositionRelative(Entity* entity, ScriptExecutionContext* context) {
@@ -1438,7 +1438,7 @@ void ScriptCommand_0807EEF4(Entity* entity, ScriptExecutionContext* context) {
void ScriptCommand_0807EF3C(Entity* entity, ScriptExecutionContext* context) {
if (!context->unk_18) {
context->unk_18 = 1;
- entity->hVelocity = ((s16)context->scriptInstructionPointer[1]) << 8;
+ entity->zVelocity = ((s16)context->scriptInstructionPointer[1]) << 8;
context->x.HALF.LO = context->scriptInstructionPointer[2] << 8;
sub_08003FC4(entity, (u16)context->x.HALF.LO);
} else {
@@ -1651,7 +1651,7 @@ void sub_0807F2A8(Entity* entity, ScriptExecutionContext* context) {
}
void sub_0807F2D4(Entity* entity, ScriptExecutionContext* context) {
- if ((entity->frames.all & 0x80) != 0) {
+ if ((entity->frame & 0x80) != 0) {
gActiveScriptInfo.flags |= 1;
} else {
gActiveScriptInfo.commandSize = 0;
@@ -1659,7 +1659,7 @@ void sub_0807F2D4(Entity* entity, ScriptExecutionContext* context) {
}
void sub_0807F304(Entity* entity, ScriptExecutionContext* context) {
- if ((gPlayerEntity.frames.all & 0x80) != 0) {
+ if ((gPlayerEntity.frame & 0x80) != 0) {
gActiveScriptInfo.flags |= 1;
} else {
gActiveScriptInfo.commandSize = 0;
@@ -1690,9 +1690,9 @@ void sub_0807F36C(Entity* entity, ScriptExecutionContext* context) {
fx->spritePriority.b0 = 1;
PositionRelative(entity, fx, 0, -524288);
if (Random() & 1)
- fx->spriteSettings.b.flipX = 1;
+ fx->spriteSettings.flipX = 1;
if (Random() & 1)
- fx->spriteSettings.b.flipY = 1;
+ fx->spriteSettings.flipY = 1;
}
}
@@ -2001,7 +2001,7 @@ void sub_0807F970(Entity* entity, ScriptExecutionContext* context) {
}
void sub_0807F98C(Entity* entity, ScriptExecutionContext* context) {
- entity->height.WORD = context->intVariable;
+ entity->z.WORD = context->intVariable;
}
void sub_0807F994(Entity* entity, ScriptExecutionContext* context) {
diff --git a/src/textbox.c b/src/textbox.c
index 71da7228..208f0f7c 100644
--- a/src/textbox.c
+++ b/src/textbox.c
@@ -150,7 +150,7 @@ void MessageNoOverlap(u32 index, Entity* entity) {
MessageRequest(index);
y = entity->y.HALF.HI;
- height = entity->height.HALF.HI;
+ height = entity->z.HALF.HI;
if (((y + height) - gRoomControls.roomScrollY) > 0x58) {
gMessage.textWindowPosY = 1;