From cd25d3c120951bc5876d5bdc690978d35ba38ff5 Mon Sep 17 00:00:00 2001 From: theo3 Date: Thu, 9 Jul 2020 02:40:55 -0700 Subject: [PATCH] entity.h bitfields --- include/entity.h | 38 +++++++++++++++++++------------------- src/bell.c | 2 +- src/bladeBrothers.c | 6 +++--- src/chestSpawner.c | 4 ++-- src/cloud.c | 4 ++-- src/cow.c | 2 +- src/dampe.c | 4 ++-- src/epona.c | 4 ++-- src/giantLeaf.c | 2 +- src/goron.c | 2 +- src/greatFairy.c | 24 ++++++++++++------------ src/hangingSeed.c | 2 +- src/heartContainer.c | 4 ++-- src/item11.c | 6 +++--- src/lakitu.c | 6 +++--- src/lakituCloud.c | 8 ++++---- src/malon.c | 6 +++--- src/milkCart.c | 2 +- src/miniFireballGuy.c | 2 +- src/object1A.c | 2 +- src/object49.c | 2 +- src/slime.c | 2 +- src/stamp.c | 2 +- src/talon.c | 4 ++-- src/thoughtBubble.c | 4 ++-- src/treeHidingPortal.c | 2 +- src/windTribeFlag.c | 4 ++-- src/windTribespeople.c | 2 +- src/zelda.c | 8 ++++---- 29 files changed, 80 insertions(+), 80 deletions(-) diff --git a/include/entity.h b/include/entity.h index 8de44506..1b904c02 100644 --- a/include/entity.h +++ b/include/entity.h @@ -58,26 +58,26 @@ typedef struct Entity { /*0x18*/ union { /* */ u8 raw; /* */ struct { - /* */ u8 ss0 : 2; - /* */ u8 ss2 : 1; - /* */ u8 ss3 : 1; - /* */ u8 ss4 : 1; - /* */ u8 ss5 : 1; - /* */ u8 ss6 : 1; - /* */ u8 ss7 : 1; + /* */ u8 draw : 2; // 1-2 + /* */ u8 ss2 : 1; // 4 + /* */ u8 ss3 : 1; // 8 + /* */ u8 bigShadow : 1; //0x10 + /* */ u8 giantShadow : 1; //0x20 + /* */ u8 flipX : 1; //0x40 + /* */ u8 flipY : 1; //0x80 /* */ } PACKED b; /* */ } PACKED spriteSettings; /*0x19*/ struct { - /* */ u8 b0 : 2; - /* */ u8 b1 : 2; - /* */ u8 b2 : 2; - /* */ u8 b3 : 2; + /* */ u8 b0 : 2; // 1-2 + /* */ u8 alphaBlend : 2; // 4-8 + /* */ u8 b2 : 2; //0x10 + /* */ u8 b3 : 2; //0x40 /* */ } PACKED spriteOrder; /*0x1a*/ u8 palette; /*0x1b*/ struct { - /* */ u8 b0 : 4; - /* */ u8 b1 : 2; - /* */ u8 b2 : 2; + /* */ u8 b0 : 4; + /* */ u8 flipX : 2; //0x10 + /* */ u8 flipY : 2; //0x40 /* */ } PACKED spriteOrientation; /*0x1c*/ u8 filler[1]; /*0x1d*/ u8 field_0x1d; @@ -87,9 +87,9 @@ typedef struct Entity { /*0x24*/ s16 nonPlanarMovement; /*0x26*/ u8 spriteAnimation[3]; /*0x29*/ struct { - /* */ u8 b0 : 3; - /* */ u8 b1 : 3; - /* */ u8 b2 : 2; + /* */ u8 b0 : 3; // 1-4 + /* */ u8 b1 : 3; // 8 + /* */ u8 b2 : 2; //0x40 /* */ } PACKED ticks; /*0x2a*/ u16 collisions; /*0x2c*/ union SplitWord x; @@ -124,8 +124,8 @@ typedef struct Entity { /* */ struct { /* */ u8 f0 : 1; /* */ u8 f1 : 5; - /* */ u8 f2 : 1; - /* */ u8 f3 : 1; + /* */ u8 f2 : 1; //0x40 + /* */ u8 f3 : 1; //0x80 /* */ } PACKED b; /* */ } PACKED frames; /*0x5b*/ u8 frameSpriteSettings; diff --git a/src/bell.c b/src/bell.c index 467a6977..62f1a81b 100644 --- a/src/bell.c +++ b/src/bell.c @@ -9,7 +9,7 @@ void Bell(Entity* ent) { void sub_08097D90(Entity* ent) { ent->action = 1; - ent->spriteSettings.b.ss0 = 1; + ent->spriteSettings.b.draw = 1; ent->collisionLayer = 1; ent->ticks.b0 = 0; UpdateSpriteOrderAndFlip(ent); diff --git a/src/bladeBrothers.c b/src/bladeBrothers.c index 5f6e5d44..83ff32a2 100644 --- a/src/bladeBrothers.c +++ b/src/bladeBrothers.c @@ -122,7 +122,7 @@ void sub_08068ADC(Entity* this) { void sub_08068AFC(Entity* this) { this->action = 1; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; *(u8*)&this->field_0x68 = sub_0801E99C(this); sub_08078784(this, *(u8*)&this->field_0x68); sub_0807DD50(this); @@ -400,8 +400,8 @@ void BladeBrothers_Fusion(Entity* this) { if (this->action == 0) { this->action += 1; - this->spriteSettings.b.ss0 = 0; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 0; + this->spriteSettings.b.draw = 1; InitAnimationForceUpdate(this, 4); } else { UpdateAnimationSingleFrame(this); diff --git a/src/chestSpawner.c b/src/chestSpawner.c index b3dcfb4a..43cb1c1a 100644 --- a/src/chestSpawner.c +++ b/src/chestSpawner.c @@ -28,8 +28,8 @@ void sub_08083E08(Entity *this) void sub_08083E20(Entity *this) { this->action = 3; - this->spriteSettings.b.ss0 = 1; - this->spriteOrder.b1 = 0; + this->spriteSettings.b.draw = 1; + this->spriteOrder.alphaBlend = 0; sub_080842D8(this); sub_08078828(this); } diff --git a/src/cloud.c b/src/cloud.c index 6701cf13..734559c4 100644 --- a/src/cloud.c +++ b/src/cloud.c @@ -46,7 +46,7 @@ void sub_0809F4DC(Entity* this) { void sub_0809F514(Entity* this) { this->action = 1; this->actionDelay = 120; - this->spriteSettings.b.ss0 = 0; + this->spriteSettings.b.draw = 0; *(u8*)&this->field_0x68 = 12; gRoomControls.cameraTarget = this; gUnk_02034490 = 255; @@ -80,7 +80,7 @@ void sub_0809F5B0(Entity* this) { void sub_0809F5DC(Entity* this) { this->action = 1; - this->spriteSettings.b.ss0 = 0; + this->spriteSettings.b.draw = 0; *(u8*)&this->field_0x68 = 12; } diff --git a/src/cow.c b/src/cow.c index 7422bd28..633334b1 100644 --- a/src/cow.c +++ b/src/cow.c @@ -229,7 +229,7 @@ void sub_0806924C(Entity* ent) { void Cow_Fusion(Entity* ent) { if (ent->action == 0) { ent->action++; - ent->spriteSettings.b.ss0 = 1; + ent->spriteSettings.b.draw = 1; InitAnimationForceUpdate(ent, 15); } else { UpdateAnimationSingleFrame(ent); diff --git a/src/dampe.c b/src/dampe.c index f228f783..822f6c2c 100644 --- a/src/dampe.c +++ b/src/dampe.c @@ -29,7 +29,7 @@ void Dampe(Entity* this) { switch (this->action) { case 0: this->action = 1; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; sub_0805E3A0(this, 2); sub_0807DD50(this); return; @@ -61,7 +61,7 @@ void sub_0806BE3C(Entity* this) { void Dampe_Fusion(Entity* this) { if (this->action == 0) { this->action++; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; InitAnimationForceUpdate(this, 2); } else { UpdateAnimationSingleFrame(this); diff --git a/src/epona.c b/src/epona.c index c86ef2d7..617867b6 100644 --- a/src/epona.c +++ b/src/epona.c @@ -18,7 +18,7 @@ void Epona(Entity* this) { void sub_080659B8(Entity* this) { this->action = 1; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->animationState = 6; this->field_0x69 = -1; this->field_0x68 = sub_0801E99C(this); @@ -91,7 +91,7 @@ void sub_08065AA4(Entity* this) { void Epona_Fusion(Entity* this) { if (this->action == 0) { this->action += 1; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; InitAnimationForceUpdate(this, 7); } else { UpdateAnimationSingleFrame(this); diff --git a/src/giantLeaf.c b/src/giantLeaf.c index d34c1605..cf2ee5ec 100644 --- a/src/giantLeaf.c +++ b/src/giantLeaf.c @@ -12,7 +12,7 @@ extern s16 gUnk_0812176A[]; void GiantLeaf(Entity* ent) { if (ent->action == 0) { ent->action = 1; - ent->spriteSettings.b.ss0 = 1; + ent->spriteSettings.b.draw = 1; ent->spriteOrder.b3 = 3; ent->ticks.b0 = 7; ent->frameIndex = ent->entityType.form; diff --git a/src/goron.c b/src/goron.c index 42124144..b65e97ea 100644 --- a/src/goron.c +++ b/src/goron.c @@ -127,7 +127,7 @@ void sub_080694EC(Entity* this) { void Goron_Fusion(Entity* this) { if (this->action == 0) { this->action++; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; InitAnimationForceUpdate(this, 2); } else { UpdateAnimationSingleFrame(this); diff --git a/src/greatFairy.c b/src/greatFairy.c index 02b5268b..c2aa5e08 100644 --- a/src/greatFairy.c +++ b/src/greatFairy.c @@ -161,8 +161,8 @@ void GreatFairy_WingsCallBehavior(Entity* this) { void GreatFairy_WingsInit(Entity* this) { GreatFairy_InitializeAnimation(this); this->ticks.b0 = 5; - this->spriteSettings.b.ss0 = 1; - this->spriteOrder.b1 = 1; + this->spriteSettings.b.draw = 1; + this->spriteOrder.alphaBlend = 1; gScreen.controls.windowOutsideControl = 3904; gScreen.controls.mosaicSize = 2057; this->nonPlanarMovement = 1024; @@ -192,7 +192,7 @@ void GreatFairy_WakeCallBehavior(Entity* this) { void GreatFairy_WakeInit(Entity* this) { GreatFairy_InitializeAnimation(this); - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->ticks.b0 = 6; } @@ -213,7 +213,7 @@ void GreatFairy_MiniInit(Entity* this) { CopyPosition(this, aff); aff->parent = this; GreatFairy_InitializeAnimation(this); - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->field_0xf = 0; } } @@ -253,7 +253,7 @@ void GreatFairy_MiniAffineCallBehavior(Entity* this) { void GreatFairy_MiniAffineInit(Entity* this) { GreatFairy_InitializeAnimation(this); this->ticks.b0 = 6; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; } // Getting ready for affine transformation @@ -293,7 +293,7 @@ void GreatFairy_DropletCallBehavior(Entity* this) { void GreatFairy_DropletInit(Entity* this) { GreatFairy_InitializeAnimation(this); - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->height.HALF.HI = 0; this->ticks.b0 = 5; PlaySFX(320); @@ -313,7 +313,7 @@ void GreatFairy_RippleCallBehavior(Entity* this) { void GreatFairy_RippleInit(Entity* this) { GreatFairy_InitializeAnimation(this); - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->ticks.b0 = 6; } @@ -333,7 +333,7 @@ void GreatFairy_BigRippleCallBehavior(Entity* this) { void GreatFairy_BigRippleInit(Entity* this) { GreatFairy_InitializeAnimation(this); this->actionDelay = 120; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->ticks.b0 = 5; PlaySFX(249); } @@ -361,7 +361,7 @@ void GreatFairy_EnergyCallBehavior(Entity* this) { void GreatFairy_EnergyInit(Entity* this) { GreatFairy_InitializeAnimation(this); - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->ticks.b0 = 5; } @@ -387,7 +387,7 @@ void sub_08087150(Entity* this) { u32 var2; GreatFairy_InitializeAnimation(this); - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->spriteOrientation &= 63; this->spriteOrder.b0 = 0; this->ticks.b0 = 3; @@ -472,8 +472,8 @@ void sub_08087294(Entity* this) { #ifdef NON_MATCHING void sub_080872AC(Entity* this) { - this->spriteSettings.b.ss0 = 1; - this->spriteOrientation.b2 = 1; + this->spriteSettings.b.draw = 1; + this->spriteOrientation.flipY = 1; this->spriteOrder.b0 = 0; this->field_0x68 = (u16)(this->x).HALF.HI; this->field_0x6a = (u16)(this->y).HALF.HI; diff --git a/src/hangingSeed.c b/src/hangingSeed.c index ab302f19..f823582a 100644 --- a/src/hangingSeed.c +++ b/src/hangingSeed.c @@ -30,7 +30,7 @@ void nullsub_7(Entity* this){} void sub_08021720(Entity *this) { this->action = 1; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->frameIndex = (this->entityType).form; this->spriteOrder.b3 = 1; this->ticks.b0 = 3; diff --git a/src/heartContainer.c b/src/heartContainer.c index 04df84e9..1c58034b 100644 --- a/src/heartContainer.c +++ b/src/heartContainer.c @@ -20,7 +20,7 @@ void sub_0808E6A0(Entity* this) { } this->action = 1; this->entityType.form = 0x62; - this->spriteSettings.b.ss0 = 0; + this->spriteSettings.b.draw = 0; this->boundingBox = &gUnk_08121C58; this->collisionLayer = 3; this->scriptedScene = 3; @@ -29,7 +29,7 @@ void sub_0808E6A0(Entity* this) { void sub_0808E6E4(Entity* this) { if (CheckFlags(this->field_0x86)) { this->action = 2; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->spriteOrder.b0 = 3; sub_0808E714(this); } diff --git a/src/item11.c b/src/item11.c index cd515863..1396dbe0 100644 --- a/src/item11.c +++ b/src/item11.c @@ -48,14 +48,14 @@ void sub_08018CBC(Entity *this) this->field_0x44 = 6; this->boundingBox = &gUnk_080B3E18; this->attachedEntity->spriteOffsetX = 0; - this->attachedEntity->spriteSettings.b.ss0 = 0; + this->attachedEntity->spriteSettings.b.draw = 0; } else { if (gLinkState.field_0x1c == 0) { DeleteThisEntity(); } this->action = 2; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->spriteTileSize = 0xa6; this->palette = 0x33; this->spriteVramOffset = 0; @@ -91,7 +91,7 @@ void sub_08018DE8(Entity *this) this->flags = this->flags | 0x80; this->action = 2; this->ticks.b0 = 2; - this->attachedEntity->spriteSettings.b.ss0 = 1; + this->attachedEntity->spriteSettings.b.draw = 1; sub_08018FA0(this); break; } diff --git a/src/lakitu.c b/src/lakitu.c index bd63a84a..d813da9e 100644 --- a/src/lakitu.c +++ b/src/lakitu.c @@ -180,7 +180,7 @@ void sub_0803C8BC(Entity *this) { if (sub_0803CA4C(this)) { this->action = 2; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; } } @@ -218,7 +218,7 @@ void sub_0803C950(Entity *this) { if (this->frames.b.f3 != 0) { this->action = 1; - this->spriteSettings.b.ss0 = 0; + this->spriteSettings.b.draw = 0; InitAnimationForceUpdate(this, this->animationState); } @@ -368,7 +368,7 @@ void sub_0803CBAC(Entity *this) { } this->action = 7; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->ticks.b1 = 1; diff --git a/src/lakituCloud.c b/src/lakituCloud.c index 5b5f9fff..0dca3465 100644 --- a/src/lakituCloud.c +++ b/src/lakituCloud.c @@ -99,11 +99,11 @@ void sub_0803CDA8(Entity *this) { void sub_0803CDD8(Entity *this) { u8 one; - u8 ss0; + u8 draw; - ss0 = this->spriteSettings.b.ss0; + draw = this->spriteSettings.b.draw; one = 1; - this->spriteSettings.b.ss0 = ss0 ^ one; + this->spriteSettings.b.draw = draw ^ one; this->actionDelay--; @@ -112,7 +112,7 @@ void sub_0803CDD8(Entity *this) { this->flags |= 0x80; - this->spriteSettings.b.ss0 = one; + this->spriteSettings.b.draw = one; } } diff --git a/src/malon.c b/src/malon.c index 25140974..de484cc4 100644 --- a/src/malon.c +++ b/src/malon.c @@ -20,7 +20,7 @@ void Malon(Entity* this) { void sub_08065864(Entity* this) { this->action = 1; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.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.ss0 = 1; + this->spriteSettings.b.draw = 1; this->animationState = 4; this->field_0x68 = sub_0801E99C(this); sub_08078784(this, this->field_0x68); @@ -72,7 +72,7 @@ void sub_08065914(Entity* this) { void Malon_Fusion(Entity* this) { if (this->action == 0) { this->action++; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; InitAnimationForceUpdate(this, 0xC); } else { UpdateAnimationSingleFrame(this); diff --git a/src/milkCart.c b/src/milkCart.c index 2e91ebf7..b423dca7 100644 --- a/src/milkCart.c +++ b/src/milkCart.c @@ -12,7 +12,7 @@ void MilkCart(Entity* ent) { void sub_08065B6C(Entity* ent) { ent->action++; - ent->spriteSettings.b.ss0 = 1; + ent->spriteSettings.b.draw = 1; ent->y.HALF.LO += -0x8000; ent->animationState = 6; InitAnimationForceUpdate(ent, 3); diff --git a/src/miniFireballGuy.c b/src/miniFireballGuy.c index e8c2744a..d7bdc540 100644 --- a/src/miniFireballGuy.c +++ b/src/miniFireballGuy.c @@ -43,7 +43,7 @@ void nullsub_23(Entity* this) {} void sub_08045618(Entity *this) { this->action = 1; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->nonPlanarMovement = 0x80; this->field_0x3c = this->field_0x3c | 0x10; sub_0804A720(this); diff --git a/src/object1A.c b/src/object1A.c index 54da11a9..f7d9e469 100644 --- a/src/object1A.c +++ b/src/object1A.c @@ -21,7 +21,7 @@ void sub_080869DC(Entity* ent) { Entity* itemEntity; ent->action = 1; - ent->spriteSettings.b.ss0 = 0; + ent->spriteSettings.b.draw = 0; ent->boundingBox = &gUnk_080FD1A8; ent->field_0x3c |= 16; itemEntity = CreateObject(0, ent->entityType.form, 0); diff --git a/src/object49.c b/src/object49.c index 3489f9e6..c00af534 100644 --- a/src/object49.c +++ b/src/object49.c @@ -95,7 +95,7 @@ void sub_0808F1F8(Entity *this) this->spriteOrder.b0 = 3; this->action++; this->spriteOrder.b3 = this->parent->spriteOrder.b3; - this->spriteOrientation.b2 = this->parent->spriteOrientation.b2; + this->spriteOrientation.flipY = this->parent->spriteOrientation.flipY; this->ticks.b0 = 7; InitializeAnimation(this, 1); sub_0808F244(this); diff --git a/src/slime.c b/src/slime.c index 3f2fdd4d..42a5d952 100644 --- a/src/slime.c +++ b/src/slime.c @@ -53,7 +53,7 @@ void nullsub_171() { void sub_08044FC8(Entity* this) { this->action = 1; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->nonPlanarMovement = 128; sub_0804A720(this); InitializeAnimation(this, 0); diff --git a/src/stamp.c b/src/stamp.c index 1ee9476b..db1d7310 100644 --- a/src/stamp.c +++ b/src/stamp.c @@ -30,7 +30,7 @@ void Stamp(Entity* ent) { void sub_08062BD4(Entity* ent) { ent->action = 1; - ent->spriteSettings.b.ss0 = 1; + ent->spriteSettings.b.draw = 1; InitializeAnimation(ent, 0); sub_08078778(ent); } diff --git a/src/talon.c b/src/talon.c index 0b8d396b..01449c06 100644 --- a/src/talon.c +++ b/src/talon.c @@ -63,7 +63,7 @@ void sub_0806559C(Entity* this) { void sub_08065608(Entity* this) { if (LoadExtraSpriteData(this, &gUnk_0810FEB0) != 0) { this->action = 1; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->field_0x68 = sub_0801E99C(this); sub_08078784(this, this->field_0x68); sub_0807DD50(this); @@ -152,7 +152,7 @@ void Talon_Fusion(Entity* this) { if (this->action == 0) { if (LoadExtraSpriteData(this, &gUnk_0810FEB0) != 0) { this->action++; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; InitializeAnimation(this, 6); } } else { diff --git a/src/thoughtBubble.c b/src/thoughtBubble.c index eebbba1b..73316eca 100644 --- a/src/thoughtBubble.c +++ b/src/thoughtBubble.c @@ -18,11 +18,11 @@ void ThoughtBubble(Entity* this) void ThoughtBubble_Init(Entity *this) { this->action = 1; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; if (this->actionDelay == 0) { this->actionDelay = 0x2d; } - this->spriteOrientation.b2 = 1; + this->spriteOrientation.flipY = 1; InitializeAnimation(this, this->entityType.parameter); PlaySFX(ThoughtBubble_SFX[this->entityType.parameter]); } diff --git a/src/treeHidingPortal.c b/src/treeHidingPortal.c index 39bc2128..5c7ef846 100644 --- a/src/treeHidingPortal.c +++ b/src/treeHidingPortal.c @@ -52,7 +52,7 @@ void sub_0809E8BC(Entity* this) { if (--this->actionDelay == 0) { this->action = 3; this->actionDelay = 0x3c; - this->spriteSettings.b.ss0 = 0; + this->spriteSettings.b.draw = 0; sub_0809E96C(this); sub_0809E918(this); } diff --git a/src/windTribeFlag.c b/src/windTribeFlag.c index b17e9e9e..1decf382 100644 --- a/src/windTribeFlag.c +++ b/src/windTribeFlag.c @@ -8,10 +8,10 @@ void WindTribeFlag(Entity *this) this->action++; this->collisionLayer = 2; if ((this->entityType).form == 0) { - this->spriteSettings.b.ss6 = 0; + this->spriteSettings.b.flipX = 0; } else { - this->spriteSettings.b.ss6 = 1; + this->spriteSettings.b.flipX = 1; } UpdateSpriteOrderAndFlip(this); InitializeAnimation(this,0); diff --git a/src/windTribespeople.c b/src/windTribespeople.c index 01d243cd..965a73ea 100644 --- a/src/windTribespeople.c +++ b/src/windTribespeople.c @@ -42,7 +42,7 @@ void sub_0806C798(Entity* this) { iVar1 = LoadExtraSpriteData(this, gUnk_08113A1C + (this->entityType.form * 4)); if (iVar1 != 0) { this->action = 1; - this->spriteSettings.b.ss0 = 1; + this->spriteSettings.b.draw = 1; this->animationState = this->actionDelay; sub_0807DD50(this); sub_0806C7D4(this); diff --git a/src/zelda.c b/src/zelda.c index a11e244b..8aa89a33 100644 --- a/src/zelda.c +++ b/src/zelda.c @@ -34,7 +34,7 @@ void Zelda(Entity* ent) { void sub_08066CCC(Entity* ent) { ent->action = 1; - ent->spriteSettings.b.ss0 = 1; + ent->spriteSettings.b.draw = 1; sub_0805EA78(ent, 7); sub_0805E3A0(ent, 2); sub_0807DD50(ent); @@ -54,7 +54,7 @@ void sub_08066D14(Entity* ent, u32* param_2) { parent = ent->parent; if (parent != NULL) { ent->animationState = parent->animationState; - ent->spriteSettings.b.ss0 = 1; + ent->spriteSettings.b.draw = 1; CopyPosition(parent, ent); sub_08068680(ent, ent->parent); param_2[5] = 1; @@ -69,9 +69,9 @@ void sub_08066D4C(Entity* ent, u32* param_2) { parent = ent->parent; if (ent->parent != NULL) { CopyPosition(ent, parent); - ent->parent->spriteSettings.b.ss0 = 1; + ent->parent->spriteSettings.b.draw = 1; ent->parent->animationState = ent->animationState; - ent->spriteSettings.b.ss0 = 0; + ent->spriteSettings.b.draw = 0; ent->field_0x17 &= 0xFE; sub_08068694(ent, ent->parent); param_2[5] = 1;