summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenny022p <info@henny022.de>2025-03-02 17:36:29 +0000
committerHenny022p <info@henny022.de>2025-03-09 18:57:54 +0000
commit58c948b8c4734bd7735edf918cae0af39771647c (patch)
tree2478f0e4f412849c8bea8e3b3a6cd07300c700e8
parentcd2b8d4b531ee5b4b78d04964a3f895edc31db73 (diff)
name flag fields in structs
-rw-r--r--include/manager/flagAndOperatorManager.h4
-rw-r--r--include/manager/manager29.h2
-rw-r--r--include/manager/miscManager.h4
-rw-r--r--include/manager/templeOfDropletsManager.h4
-rw-r--r--include/object/itemOnGround.h2
-rw-r--r--include/object/pushableFurniture.h2
-rw-r--r--src/enemy/businessScrub.c6
-rw-r--r--src/enemy/eyegore.c6
-rw-r--r--src/enemy/torchTrap.c20
-rw-r--r--src/manager/fallingItemManager.c2
-rw-r--r--src/manager/flagAndOperatorManager.c6
-rw-r--r--src/manager/manager29.c4
-rw-r--r--src/manager/miscManager.c28
-rw-r--r--src/manager/templeOfDropletsManager.c24
-rw-r--r--src/object/bigIceBlock.c8
-rw-r--r--src/object/bigVortex.c6
-rw-r--r--src/object/book.c6
-rw-r--r--src/object/bossDoor.c12
-rw-r--r--src/object/button.c8
-rw-r--r--src/object/chestSpawner.c12
-rw-r--r--src/object/doubleBookshelf.c8
-rw-r--r--src/object/enemyItem.c8
-rw-r--r--src/object/fairy.c8
-rw-r--r--src/object/fireplace.c6
-rw-r--r--src/object/flame.c6
-rw-r--r--src/object/heartContainer.c10
-rw-r--r--src/object/hiddenLadderDown.c6
-rw-r--r--src/object/itemOnGround.c22
-rw-r--r--src/object/jailBars.c6
-rw-r--r--src/object/lightDoor.c4
-rw-r--r--src/object/lightableSwitch.c20
-rw-r--r--src/object/litArea.c4
-rw-r--r--src/object/lockedDoor.c24
-rw-r--r--src/object/mask.c8
-rw-r--r--src/object/metalDoor.c8
-rw-r--r--src/object/minecartDoor.c6
-rw-r--r--src/object/minishPortalStone.c6
-rw-r--r--src/object/objectA.c6
-rw-r--r--src/object/objectA8.c8
-rw-r--r--src/object/pinwheel.c10
-rw-r--r--src/object/pot.c8
-rw-r--r--src/object/pushableFurniture.c4
-rw-r--r--src/object/railtrack.c18
-rw-r--r--src/object/smallIceBlock.c10
-rw-r--r--src/object/treeHidingPortal.c6
-rw-r--r--src/object/unusedSkull.c8
-rw-r--r--src/object/warpPoint.c6
-rw-r--r--src/objectUtils.c2
-rw-r--r--src/projectile/spiderWeb.c6
49 files changed, 209 insertions, 209 deletions
diff --git a/include/manager/flagAndOperatorManager.h b/include/manager/flagAndOperatorManager.h
index f41a129a..352cbf8f 100644
--- a/include/manager/flagAndOperatorManager.h
+++ b/include/manager/flagAndOperatorManager.h
@@ -6,8 +6,8 @@
typedef struct FlagAndOperatorManager {
Manager base;
u8 unk_20[0x1C];
- u16 unk_3c;
- u16 unk_3e;
+ u16 setFlag;
+ u16 checkFlags;
} FlagAndOperatorManager;
#endif // FLAGANDOPERATORMANAGER_H
diff --git a/include/manager/manager29.h b/include/manager/manager29.h
index c7d99b69..da4c96b2 100644
--- a/include/manager/manager29.h
+++ b/include/manager/manager29.h
@@ -16,7 +16,7 @@ typedef struct {
s16 unk_38;
u16 unk_3a;
u16 unk_3c;
- u16 unk_3e;
+ u16 flag;
} Manager29;
#endif // MANAGER29_H
diff --git a/include/manager/miscManager.h b/include/manager/miscManager.h
index 44047584..a126937f 100644
--- a/include/manager/miscManager.h
+++ b/include/manager/miscManager.h
@@ -8,8 +8,8 @@ typedef struct {
u8 unk_20[0x18];
s16 x;
s16 y;
- u16 unk_3c;
- u16 flags;
+ u16 flag1;
+ u16 flag2;
} MiscManager;
#endif // MISCMANAGER_H
diff --git a/include/manager/templeOfDropletsManager.h b/include/manager/templeOfDropletsManager.h
index da1e8f66..43355eee 100644
--- a/include/manager/templeOfDropletsManager.h
+++ b/include/manager/templeOfDropletsManager.h
@@ -18,8 +18,8 @@ typedef struct {
s16 unk_36;
s16 unk_38;
s16 unk_3a;
- u16 unk_3c;
- u16 unk_3e; // used
+ u16 flag;
+ u16 localFlag; // used
} TempleOfDropletsManager;
#endif // TEMPLEOFDROPLETSMANAGER_H
diff --git a/include/object/itemOnGround.h b/include/object/itemOnGround.h
index 47ab89a8..151dcc28 100644
--- a/include/object/itemOnGround.h
+++ b/include/object/itemOnGround.h
@@ -12,7 +12,7 @@ typedef struct {
/*0x6c*/ u16 unk_6c;
/*0x6e*/ u16 unk_6e;
/*0x70*/ u8 unused2[22];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} ItemOnGroundEntity;
#endif // ITEMONGROUND_H
diff --git a/include/object/pushableFurniture.h b/include/object/pushableFurniture.h
index db693183..c17ff6ce 100644
--- a/include/object/pushableFurniture.h
+++ b/include/object/pushableFurniture.h
@@ -19,7 +19,7 @@ typedef struct {
/*0x82*/ u8 unk_82;
/*0x83*/ u8 unk_83;
/*0x84*/ u8 unk_84[0x2];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} PushableFurnitureEntity;
#endif // PUSHABLEFURNITURE_H
diff --git a/src/enemy/businessScrub.c b/src/enemy/businessScrub.c
index 3f2c5c74..71d1e578 100644
--- a/src/enemy/businessScrub.c
+++ b/src/enemy/businessScrub.c
@@ -37,7 +37,7 @@ typedef struct {
/*0x80*/ u8 unk_80;
/*0x81*/ u8 unk_81;
/*0x82*/ u8 unused2[4];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} BusinessScrubEntity;
void sub_08028E9C(BusinessScrubEntity*);
@@ -95,7 +95,7 @@ void BusinessScrub_Action0(BusinessScrubEntity* this) {
super->animationState = 0;
super->direction = DirectionSouth;
sub_08028E9C(this);
- if ((*(u8*)this->unk_7c & 1) || CheckFlags(this->unk_86)) {
+ if ((*(u8*)this->unk_7c & 1) || CheckFlags(this->flag)) {
super->action = 4;
super->timer = 120;
super->spritePriority.b1 = 1;
@@ -227,7 +227,7 @@ void BusinessScrub_Action3(BusinessScrubEntity* this) {
iVar1->z.HALF.HI -= 12;
SetEntityPriority(iVar1, PRIO_MESSAGE);
}
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
sub_0802925C(this);
}
break;
diff --git a/src/enemy/eyegore.c b/src/enemy/eyegore.c
index 03b1c90e..cb7d8067 100644
--- a/src/enemy/eyegore.c
+++ b/src/enemy/eyegore.c
@@ -22,7 +22,7 @@ typedef struct {
/*0x79*/ u8 unk_79;
/*0x7a*/ u8 unk_7a;
/*0x7b*/ u8 unk_7b;
- /*0x7c*/ u16 unk_7c;
+ /*0x7c*/ u16 flag;
/*0x7e*/ u8 unk_7e;
/*0x7f*/ u8 unk_7f;
/*0x80*/ u16 tileIndex1;
@@ -152,7 +152,7 @@ void Eyegore_Init(EyegoreEntity* this) {
this->unk_76 = super->y.HALF.HI;
this->unk_7e = 0x3c;
sub_08030F00(this);
- if (this->unk_7c != 0) {
+ if (this->flag != 0) {
super->flags &= ~ENT_COLLIDE;
InitializeAnimation(super, 10);
} else {
@@ -161,7 +161,7 @@ void Eyegore_Init(EyegoreEntity* this) {
}
void Eyegore_Action1(EyegoreEntity* this) {
- if ((this->unk_7c != 0) && CheckFlags(this->unk_7c)) {
+ if ((this->flag != 0) && CheckFlags(this->flag)) {
sub_08031320(this);
}
}
diff --git a/src/enemy/torchTrap.c b/src/enemy/torchTrap.c
index e34e2caa..0e86c296 100644
--- a/src/enemy/torchTrap.c
+++ b/src/enemy/torchTrap.c
@@ -18,9 +18,9 @@ typedef struct {
u16 filler2;
u16 unk_78;
u16 projectileTimer;
- u16 unk_7c;
+ u16 flag1;
u8 filler3[0x2];
- u16 unk_80;
+ u16 flag2;
u16 unk_82;
u16 unk_84;
} TorchTrapEntity;
@@ -77,35 +77,35 @@ void sub_0803CF38(TorchTrapEntity* this) {
void sub_0803CF94(TorchTrapEntity* this) {
if (GetTileTypeAtTilePos(this->tilePos, super->collisionLayer) == TILE_TYPE_118) {
- this->unk_80 = 0;
+ this->flag2 = 0;
TorchTrap_Reset(this);
- } else if (this->unk_7c && sub_0803CFD8(this)) {
+ } else if (this->flag1 && sub_0803CFD8(this)) {
TorchTrap_Reset(this);
}
}
bool32 sub_0803CFD8(TorchTrapEntity* this) {
u32 result;
- if (this->unk_7c == 0) {
+ if (this->flag1 == 0) {
result = TRUE;
} else {
- result = CheckFlags(this->unk_7c);
+ result = CheckFlags(this->flag1);
}
return result;
}
bool32 sub_0803CFF0(TorchTrapEntity* this) {
u32 result;
- if (this->unk_80 != 0) {
- if (this->unk_80 == this->unk_7c) {
- u32 val = CheckFlags(this->unk_80);
+ if (this->flag2 != 0) {
+ if (this->flag2 == this->flag1) {
+ u32 val = CheckFlags(this->flag2);
result = FALSE;
if (val == 0) {
result = TRUE;
}
return result;
} else {
- return CheckFlags(this->unk_80);
+ return CheckFlags(this->flag2);
}
}
diff --git a/src/manager/fallingItemManager.c b/src/manager/fallingItemManager.c
index 740c91a3..951cf83c 100644
--- a/src/manager/fallingItemManager.c
+++ b/src/manager/fallingItemManager.c
@@ -40,7 +40,7 @@ void FallingItemManager_Action1(FallingItemManager* this) {
object->base.collisionLayer = this->field_0x36;
object->base.x.HALF.HI = this->field_0x38 + gRoomControls.origin_x;
object->base.y.HALF.HI = this->field_0x3a + gRoomControls.origin_y;
- object->unk_86 = this->field_0x3c;
+ object->flag = this->field_0x3c;
}
DeleteThisEntity();
}
diff --git a/src/manager/flagAndOperatorManager.c b/src/manager/flagAndOperatorManager.c
index 7439830a..6236ef91 100644
--- a/src/manager/flagAndOperatorManager.c
+++ b/src/manager/flagAndOperatorManager.c
@@ -10,12 +10,12 @@
void FlagAndOperatorManager_Main(FlagAndOperatorManager* this) {
if (super->action == 0) {
super->action = 1;
- if (CheckFlags(this->unk_3c)) {
+ if (CheckFlags(this->setFlag)) {
DeleteThisEntity();
}
} else {
- if (CheckFlags(this->unk_3e)) {
- SetFlag(this->unk_3c);
+ if (CheckFlags(this->checkFlags)) {
+ SetFlag(this->setFlag);
DeleteThisEntity();
}
}
diff --git a/src/manager/manager29.c b/src/manager/manager29.c
index 133d3944..bd079e1c 100644
--- a/src/manager/manager29.c
+++ b/src/manager/manager29.c
@@ -16,12 +16,12 @@ void sub_0805CC3C(Manager29* this);
void Manager29_Main(Manager29* this) {
if (super->action == 0) {
sub_0805CBD0(this);
- if (CheckFlags(this->unk_3e)) {
+ if (CheckFlags(this->flag)) {
sub_0805CC3C(this);
DeleteManager(this);
}
} else if (sub_0805CF80(this)) {
- SetFlag(this->unk_3e);
+ SetFlag(this->flag);
DeleteManager(this);
}
}
diff --git a/src/manager/miscManager.c b/src/manager/miscManager.c
index 1adf595d..ed284275 100644
--- a/src/manager/miscManager.c
+++ b/src/manager/miscManager.c
@@ -146,12 +146,12 @@ void MiscManager_Type1(MiscManager* this) {
super->subAction = 8;
super->subtimer = 2;
}
- if (CheckFlags(this->flags)) {
+ if (CheckFlags(this->flag2)) {
DeleteManager(super);
}
break;
case 1:
- if (CheckFlags(this->flags)) {
+ if (CheckFlags(this->flag2)) {
super->action = 2;
super->timer = 120;
RequestPriorityDuration((Entity*)this, 240);
@@ -172,7 +172,7 @@ void MiscManager_Type1(MiscManager* this) {
}
break;
default:
- SetFlag(this->flags);
+ SetFlag(this->flag2);
SetPlayerControl(1);
DeleteThisEntity();
}
@@ -236,14 +236,14 @@ void MiscManager_Type5(MiscManager* this) {
}
break;
case 0:
- if (CheckFlags(this->flags)) {
+ if (CheckFlags(this->flag2)) {
DeleteThisEntity();
}
super->action = 1;
SetTileType(TILE_TYPE_869, TILE_LOCAL(this->x, this->y), super->type2);
break;
case 1:
- if (CheckFlags(this->flags)) {
+ if (CheckFlags(this->flag2)) {
RequestPriorityDuration((Entity*)this, 75);
super->timer = 45;
super->action++;
@@ -254,14 +254,14 @@ void MiscManager_Type5(MiscManager* this) {
void MiscManager_Type6(MiscManager* this) {
if (super->action == 0) {
super->action = 1;
- super->type2 = CheckFlags(this->flags);
+ super->type2 = CheckFlags(this->flag2);
if (super->type2) {
gRoomVars.lightLevel = this->y;
} else {
gRoomVars.lightLevel = this->x;
}
} else {
- u32 tmp = CheckFlags(this->flags);
+ u32 tmp = CheckFlags(this->flag2);
if (super->type2 != tmp) {
super->type2 = tmp;
if (tmp) {
@@ -304,12 +304,12 @@ void MiscManager_Type8(MiscManager* this) {
void MiscManager_Type9(MiscManager* this) {
if (super->action == 0) {
super->action = 1;
- if (CheckFlags(this->flags)) {
+ if (CheckFlags(this->flag2)) {
sub_080592EC(this);
DeleteThisEntity();
}
} else {
- if (CheckFlags(this->flags)) {
+ if (CheckFlags(this->flag2)) {
sub_080592EC(this);
sub_0805930C(this);
#ifndef EU
@@ -346,8 +346,8 @@ void SetDirtTile(u32 tilePos) {
void MiscManager_TypeA(MiscManager* this) {
super->action = 1;
- if (this->unk_3c == gTextRender.curToken.textIndex) {
- SetFlag(this->flags);
+ if (this->flag1 == gTextRender.curToken.textIndex) {
+ SetFlag(this->flag2);
DeleteThisEntity();
}
}
@@ -372,10 +372,10 @@ bool32 sub_080593CC(MiscManager* this) {
void MiscManager_TypeC(MiscManager* this) {
Entity* tmp;
- if (CheckFlags(this->flags)) {
+ if (CheckFlags(this->flag2)) {
DeleteThisEntity();
}
- if (!CheckFlags(this->unk_3c))
+ if (!CheckFlags(this->flag1))
return;
tmp = CreateObject(SPECIAL_FX, FX_BIG_EXPLOSION, 0);
if (!tmp)
@@ -388,7 +388,7 @@ void MiscManager_TypeC(MiscManager* this) {
}
void MiscManager_TypeD(MiscManager* this) {
- if (!CheckFlags(this->flags)) {
+ if (!CheckFlags(this->flag2)) {
SetPlayerControl(3);
if (gRoomControls.reload_flags)
return;
diff --git a/src/manager/templeOfDropletsManager.c b/src/manager/templeOfDropletsManager.c
index 19d8f07a..213487db 100644
--- a/src/manager/templeOfDropletsManager.c
+++ b/src/manager/templeOfDropletsManager.c
@@ -60,7 +60,7 @@ void TempleOfDropletsManager_Main(TempleOfDropletsManager* this) {
void TempleOfDropletsManager_Type0(TempleOfDropletsManager* this) {
if (super->action == 0) {
sub_0805A89C(this);
- if (!CheckLocalFlag(this->unk_3e)) {
+ if (!CheckLocalFlag(this->localFlag)) {
this->unk_23 = 1;
} else {
this->unk_23 = 2;
@@ -83,7 +83,7 @@ void TempleOfDropletsManager_Type1(TempleOfDropletsManager* this) {
sub_0805A89C(this);
this->unk_23 = 1;
sub_0805AAF0(1);
- if (!CheckLocalFlag(this->unk_3e)) {
+ if (!CheckLocalFlag(this->localFlag)) {
super->action = 1;
gScreen.lcd.displayControl &= 0xB7FF;
} else {
@@ -144,12 +144,12 @@ void TempleOfDropletsManager_Type2(TempleOfDropletsManager* this) {
this->unk_23 = 1;
}
sub_0805AAF0(this->unk_23);
- if (!CheckLocalFlag(this->unk_3e)) {
- ClearFlag(this->unk_3c);
+ if (!CheckLocalFlag(this->localFlag)) {
+ ClearFlag(this->flag);
super->action = 1;
gScreen.lcd.displayControl &= ~(DISPCNT_WIN1_ON | DISPCNT_BG3_ON);
} else {
- SetFlag(this->unk_3c);
+ SetFlag(this->flag);
super->action = 3;
gScreen.lcd.displayControl |= DISPCNT_WIN1_ON | DISPCNT_BG3_ON;
}
@@ -162,7 +162,7 @@ void TempleOfDropletsManager_Type2(TempleOfDropletsManager* this) {
void sub_0805A4CC(TempleOfDropletsManager*, u32);
void TempleOfDropletsManager_Type1_Action1(TempleOfDropletsManager* this) {
- if (CheckLocalFlag(this->unk_3e)) {
+ if (CheckLocalFlag(this->localFlag)) {
super->action = 2;
sub_0805A4CC(this, 0);
}
@@ -171,12 +171,12 @@ void TempleOfDropletsManager_Type1_Action1(TempleOfDropletsManager* this) {
void TempleOfDropletsManager_Type2_Action2(TempleOfDropletsManager* this) {
if (super->subAction != 0) {
super->action = 3;
- SetFlag(this->unk_3c);
+ SetFlag(this->flag);
}
}
void TempleOfDropletsManager_Type2_Action3(TempleOfDropletsManager* this) {
- if (!CheckLocalFlag(this->unk_3e)) {
+ if (!CheckLocalFlag(this->localFlag)) {
super->action = 4;
sub_0805A4CC(this, 1);
}
@@ -185,7 +185,7 @@ void TempleOfDropletsManager_Type2_Action3(TempleOfDropletsManager* this) {
void TempleOfDropletsManager_Type2_Action4(TempleOfDropletsManager* this) {
if (super->subAction != 0) {
super->action = 1;
- ClearFlag(this->unk_3c);
+ ClearFlag(this->flag);
}
}
@@ -363,7 +363,7 @@ void TempleOfDropletsManager_Type6_Action3(TempleOfDropletsManager* this) {
void TempleOfDropletsManager_Type7(TempleOfDropletsManager* this) {
switch (super->action) {
case 0:
- if (CheckLocalFlag(this->unk_3e)) {
+ if (CheckLocalFlag(this->localFlag)) {
super->action = 1;
} else {
super->action = 2;
@@ -373,7 +373,7 @@ void TempleOfDropletsManager_Type7(TempleOfDropletsManager* this) {
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
break;
case 1:
- if (CheckLocalFlag(this->unk_3e))
+ if (CheckLocalFlag(this->localFlag))
break;
super->action = 2;
sub_0805A4CC(this, 4);
@@ -384,7 +384,7 @@ void TempleOfDropletsManager_Type7(TempleOfDropletsManager* this) {
}
break;
case 3:
- if (!CheckLocalFlag(this->unk_3e))
+ if (!CheckLocalFlag(this->localFlag))
break;
super->action = 4;
sub_0805A4CC(this, 4);
diff --git a/src/object/bigIceBlock.c b/src/object/bigIceBlock.c
index dd204c78..7cd09aa6 100644
--- a/src/object/bigIceBlock.c
+++ b/src/object/bigIceBlock.c
@@ -16,7 +16,7 @@ typedef struct {
/*0x6c*/ u16 unk_6c;
/*0x6e*/ u16 unk_6e;
/*0x70*/ u8 unk_70[0x16];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} BigIceBlockEntity;
extern void (*const BigIceBlock_Actions[])(BigIceBlockEntity*);
@@ -40,7 +40,7 @@ void BigIceBlock(BigIceBlockEntity* this) {
void BigIceBlock_Init(BigIceBlockEntity* this) {
Entity* obj;
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
DeleteThisEntity();
}
super->action = 1;
@@ -88,9 +88,9 @@ void BigIceBlock_Action2(BigIceBlockEntity* this) {
SetAffineInfo(super, 0x100, tmp, 0);
if (super->type != 1) {
if (super->type != 2) {
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
} else {
- CreateGroundItemWithFlags(super, ITEM_SMALL_KEY, 0, this->unk_86);
+ CreateGroundItemWithFlags(super, ITEM_SMALL_KEY, 0, this->flag);
}
}
super->action = 3;
diff --git a/src/object/bigVortex.c b/src/object/bigVortex.c
index 91b510b9..6ee294ac 100644
--- a/src/object/bigVortex.c
+++ b/src/object/bigVortex.c
@@ -12,7 +12,7 @@
typedef struct {
/*0x00*/ Entity base;
/*0x68*/ u8 unused1[30];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} BigVortexEntity;
void sub_08098E3C(Entity*);
@@ -39,7 +39,7 @@ void BigVortex_Init(BigVortexEntity* this) {
super->action = 1;
super->z.HALF.HI = -0x10;
- temp = this->unk_86;
+ temp = this->flag;
if ((temp != 0) && !CheckFlags(temp)) {
super->action = 1;
@@ -55,7 +55,7 @@ void BigVortex_Init(BigVortexEntity* this) {
void BigVortex_Action1(BigVortexEntity* this) {
Entity* fx;
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
super->action = 2;
super->timer = 45;
fx = CreateFx(super, FX_BIG_EXPLOSION2, 0);
diff --git a/src/object/book.c b/src/object/book.c
index a031da2d..9903ae37 100644
--- a/src/object/book.c
+++ b/src/object/book.c
@@ -16,7 +16,7 @@ typedef struct {
/*0x68*/ u8 unused1[24];
/*0x80*/ u8 unk_80;
/*0x81*/ u8 unused2[5];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} BookEntity;
extern void (*const Book_Actions[])(BookEntity*);
@@ -46,7 +46,7 @@ void Book_Init(BookEntity* this) {
}
super->spriteOffsetY = 3;
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
if (super->type2 == 0) {
super->y.HALF.HI += 48;
}
@@ -145,7 +145,7 @@ void Book_Action3(BookEntity* this) {
super->action = 4;
super->spritePriority.b0 = 4;
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
fx = CreateFx(super, FX_DEATH, 0);
if (fx != NULL) {
diff --git a/src/object/bossDoor.c b/src/object/bossDoor.c
index fab846b9..4c5084e8 100644
--- a/src/object/bossDoor.c
+++ b/src/object/bossDoor.c
@@ -20,8 +20,8 @@ typedef struct {
/*0x7a*/ u16 unk_7a;
/*0x7c*/ u16 unk_7c;
/*0x7e*/ u8 unk_7e[6];
- /*0x84*/ u16 unk_84;
- /*0x86*/ u16 unk_86;
+ /*0x84*/ u16 flags2;
+ /*0x86*/ u16 flag;
} BossDoorEntity;
extern bool32 gUnk_02036BB8;
@@ -47,10 +47,10 @@ void BossDoor(BossDoorEntity* this) {
}
void BossDoor_Init(BossDoorEntity* this) {
- if ((this->unk_84 != 0xffff) && CheckFlags(this->unk_84)) {
+ if ((this->flags2 != 0xffff) && CheckFlags(this->flags2)) {
DeleteThisEntity();
}
- if ((this->unk_86 != BEGIN) && CheckFlags(this->unk_86)) {
+ if ((this->flag != BEGIN) && CheckFlags(this->flag)) {
DeleteThisEntity();
}
super->type2 = super->type >> 2;
@@ -86,7 +86,7 @@ void BossDoor_Action1(BossDoorEntity* this) {
if (super->interactType != INTERACTION_NONE) {
super->action = 2;
RemoveInteractableObject(super);
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
}
}
@@ -155,7 +155,7 @@ void BossDoor_Action5(BossDoorEntity* this) {
}
void BossDoor_Action6(BossDoorEntity* this) {
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
super->action = 2;
}
}
diff --git a/src/object/button.c b/src/object/button.c
index d72e176f..ace84517 100644
--- a/src/object/button.c
+++ b/src/object/button.c
@@ -16,7 +16,7 @@ typedef struct {
/*0x74*/ u16 tilePos;
/*0x76*/ u8 unused2[14];
/*0x84*/ u16 unk_84;
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} ButtonEntity;
void Button_Init(ButtonEntity* this);
@@ -45,7 +45,7 @@ void Button_Init(ButtonEntity* this) {
this->tilePos = (((super->x.HALF.HI - gRoomControls.origin_x) >> 4) & 0x3F) |
((((super->y.HALF.HI - gRoomControls.origin_y) >> 4) & 0x3F) << 6);
this->unk_72 = GetTileTypeAtTilePos(this->tilePos, super->collisionLayer);
- if (super->type == 0 && CheckFlags(this->unk_86)) {
+ if (super->type == 0 && CheckFlags(this->flag)) {
super->action = 5;
SetTileType(TILE_TYPE_122, this->tilePos, super->collisionLayer);
} else {
@@ -114,7 +114,7 @@ void Button_Action4(ButtonEntity* this) {
}
} else {
super->action = 2;
- ClearFlag(this->unk_86);
+ ClearFlag(this->flag);
SetTileType(TILE_TYPE_119, this->tilePos, super->collisionLayer);
SoundReq(SFX_BUTTON_PRESS);
}
@@ -276,7 +276,7 @@ bool32 sub_08081F7C(ButtonEntity* this, u32 tileType) {
super->child->spriteOffsetY = -4;
} else {
if (super->timer == 6) {
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
SetTileType(tileType, this->tilePos, super->collisionLayer);
sub_08081F24(super);
SoundReq(SFX_BUTTON_PRESS);
diff --git a/src/object/chestSpawner.c b/src/object/chestSpawner.c
index 7ea08cda..702b87c1 100644
--- a/src/object/chestSpawner.c
+++ b/src/object/chestSpawner.c
@@ -17,7 +17,7 @@ typedef struct {
/*0x70*/ u16 tilePos;
/*0x72*/ u16 unk_72;
/*0x74*/ u8 unk_74[0x12];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} ChestSpawnerEntity;
extern const Hitbox gUnk_0811F8A8;
@@ -84,7 +84,7 @@ void ChestSpawner_Type2Init(ChestSpawnerEntity* this) {
sub_080842D8(this);
InitializeAnimation(super, 1);
} else {
- if (CheckFlags(this->unk_86) || super->type == 4) {
+ if (CheckFlags(this->flag) || super->type == 4) {
sub_08083E20(this);
} else {
super->action = 1;
@@ -94,7 +94,7 @@ void ChestSpawner_Type2Init(ChestSpawnerEntity* this) {
}
void ChestSpawner_Type2Action1(ChestSpawnerEntity* this) {
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
gScreen.controls.layerFXControl = 0xf40;
gScreen.controls.alphaBlend = 0x1000;
gPauseMenuOptions.disabled = 1;
@@ -235,7 +235,7 @@ void ChestSpawner_Type0Init(ChestSpawnerEntity* this) {
if (GetTileTypeAtEntity(super) == TILE_TYPE_116) {
DeleteThisEntity();
}
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
super->action = 3;
sub_0807B7D8(0x73, this->tilePos, super->collisionLayer);
if ((super->type & 1) == 0) {
@@ -245,7 +245,7 @@ void ChestSpawner_Type0Init(ChestSpawnerEntity* this) {
}
void ChestSpawner_Type0Action1(ChestSpawnerEntity* this) {
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
super->action = 2;
}
}
@@ -274,7 +274,7 @@ void ChestSpawner_Type0Action3(ChestSpawnerEntity* this) {
if (GetTileTypeAtEntity(super) == TILE_TYPE_116) {
DeleteEntity(super);
} else {
- if (!CheckFlags(this->unk_86)) {
+ if (!CheckFlags(this->flag)) {
if (this->unk_72 != 0) {
this->unk_72--;
} else {
diff --git a/src/object/doubleBookshelf.c b/src/object/doubleBookshelf.c
index 33519589..c5a7386c 100644
--- a/src/object/doubleBookshelf.c
+++ b/src/object/doubleBookshelf.c
@@ -15,7 +15,7 @@ typedef struct {
/*0x82*/ u16 unk_82;
/*0x84*/ u8 unk_84;
/*0x85*/ u8 unk_85;
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} DoubleBookshelfEntity;
void sub_0809B334(DoubleBookshelfEntity*);
@@ -59,7 +59,7 @@ void DoubleBookshelf_Init(DoubleBookshelfEntity* this) {
if (child != NULL) {
(child->base).parent = super;
super->child = &child->base;
- if (CheckFlags(this->unk_86) == 0) {
+ if (CheckFlags(this->flag) == 0) {
PositionRelative(super, &child->base, 0x100000, 0x100000);
child->unk_84 = 0;
} else {
@@ -118,7 +118,7 @@ void sub_0809B0B0(DoubleBookshelfEntity* this) {
SetTile(SPECIAL_TILE_130, tilePos + 3, layer);
SetTile(SPECIAL_TILE_34, tilePos + 2, layer);
SetTile(SPECIAL_TILE_95, tilePos, layer);
- SetFlag(((DoubleBookshelfEntity*)super->parent)->unk_86);
+ SetFlag(((DoubleBookshelfEntity*)super->parent)->flag);
break;
case 3:
this->unk_84 = 0;
@@ -126,7 +126,7 @@ void sub_0809B0B0(DoubleBookshelfEntity* this) {
SetTile(SPECIAL_TILE_130, tilePos - 1, layer);
SetTile(SPECIAL_TILE_34, tilePos, layer);
SetTile(SPECIAL_TILE_95, tilePos + 2, layer);
- ClearFlag(((DoubleBookshelfEntity*)super->parent)->unk_86);
+ ClearFlag(((DoubleBookshelfEntity*)super->parent)->flag);
break;
case 4:
SetTile(SPECIAL_TILE_34, tilePos, layer);
diff --git a/src/object/enemyItem.c b/src/object/enemyItem.c
index 16cae432..ac39921b 100644
--- a/src/object/enemyItem.c
+++ b/src/object/enemyItem.c
@@ -10,7 +10,7 @@
typedef struct {
/*0x00*/ Entity base;
/*0x68*/ u8 unk_68[0x1e];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} EnemyItemEntity;
void sub_080A2500(EnemyItemEntity*);
@@ -21,7 +21,7 @@ void EnemyItem(EnemyItemEntity* this) {
Entity* entity;
LinkedList* list;
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
sub_080A2500(this);
}
if (super->action == 0) {
@@ -63,7 +63,7 @@ void sub_080A2508(EnemyItemEntity* this) {
entity = (EnemyItemEntity*)CreateObjectWithParent(super, GROUND_ITEM, super->type, 0);
if (entity != NULL) {
(entity->base).timer = 5;
- entity->unk_86 = this->unk_86;
+ entity->flag = this->flag;
}
sub_080A2500(this);
}
@@ -74,7 +74,7 @@ void sub_080A2534(EnemyItemEntity* this) {
entity = (EnemyItemEntity*)CreateObjectWithParent(super, GROUND_ITEM, super->type, 0);
if (entity != NULL) {
(entity->base).timer = 4;
- entity->unk_86 = this->unk_86;
+ entity->flag = this->flag;
}
sub_080A2500(this);
}
diff --git a/src/object/fairy.c b/src/object/fairy.c
index 0f2eb209..c544d561 100644
--- a/src/object/fairy.c
+++ b/src/object/fairy.c
@@ -33,7 +33,7 @@ void Fairy_SubAction0(FairyEntity*);
void Fairy_SubAction1(FairyEntity*);
void Fairy_SubAction2(FairyEntity*);
-extern void sub_08081404(Entity*, u32);
+extern void ItemOnGround_SetFlagAndDelete(Entity*, u32);
void Fairy(FairyEntity* this) {
static void (*const Fairy_Actions[])(FairyEntity*) = {
@@ -167,7 +167,7 @@ void Fairy_Action2(FairyEntity* this) {
ProcessMovement1(super);
if ((AnyPrioritySet() == 0) && (super->type2 == 0)) {
if (--this->unk_78 == 0) {
- sub_08081404(super, 0);
+ ItemOnGround_SetFlagAndDelete(super, FALSE);
}
if (this->unk_78 < 0x78) {
super->spriteSettings.draw ^= 1;
@@ -177,7 +177,7 @@ void Fairy_Action2(FairyEntity* this) {
void Fairy_Action3(FairyEntity* this) {
if (*(u16*)&super->child->kind != 0x308) {
- sub_08081404(super, 0);
+ ItemOnGround_SetFlagAndDelete(super, FALSE);
} else {
CopyPosition(super->child, super);
super->z.HALF.HI--;
@@ -214,7 +214,7 @@ void Fairy_Action4(FairyEntity* this) {
if (--super->subtimer == 0) {
super->subtimer = 6;
if (--super->spriteOffsetY < -0x16) {
- sub_08081404(super, 1);
+ ItemOnGround_SetFlagAndDelete(super, TRUE);
}
}
if (super->spriteOffsetY < -0x11) {
diff --git a/src/object/fireplace.c b/src/object/fireplace.c
index 4fd32aec..1bf536cf 100644
--- a/src/object/fireplace.c
+++ b/src/object/fireplace.c
@@ -11,7 +11,7 @@
typedef struct {
/*0x00*/ Entity base;
/*0x68*/ u8 unused1[30];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} FireplaceEntity;
void Fireplace_Action1(FireplaceEntity* this);
@@ -31,7 +31,7 @@ void Fireplace_Init(FireplaceEntity* this) {
super->action = 1;
super->spriteSettings.draw = 1;
super->speed = 0x80;
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
sub_0809B7DC(this);
DeleteThisEntity();
} else {
@@ -44,7 +44,7 @@ void Fireplace_Init(FireplaceEntity* this) {
void Fireplace_Action1(FireplaceEntity* this) {
sub_0809B7C0(this);
if (super->timer) {
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
DeleteThisEntity();
}
}
diff --git a/src/object/flame.c b/src/object/flame.c
index 5b1b48a7..d3d508f1 100644
--- a/src/object/flame.c
+++ b/src/object/flame.c
@@ -12,7 +12,7 @@
typedef struct {
/*0x00*/ Entity base;
/*0x68*/ u8 unused1[30];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} FlameEntity;
extern void sub_0807AB44(Entity*, s32, s32);
@@ -43,7 +43,7 @@ void Flame_Init(FlameEntity* this) {
CopyPosition(super->parent, super);
break;
case 4:
- if (!CheckFlags(this->unk_86)) {
+ if (!CheckFlags(this->flag)) {
super->spriteSettings.draw = FALSE;
super->subAction = 1;
return;
@@ -85,7 +85,7 @@ void Flame_Action1(FlameEntity* this) {
CopyPosition(super->parent, super);
break;
case 4:
- val = CheckFlags(this->unk_86);
+ val = CheckFlags(this->flag);
if (super->subAction == 0) {
if (val)
return;
diff --git a/src/object/heartContainer.c b/src/object/heartContainer.c
index 1817b8c3..dce47c6b 100644
--- a/src/object/heartContainer.c
+++ b/src/object/heartContainer.c
@@ -14,8 +14,8 @@
typedef struct {
/*0x00*/ Entity base;
/*0x68*/ u8 unused1[28];
- /*0x84*/ u16 unk_84;
- /*0x86*/ u16 unk_86;
+ /*0x84*/ u16 flag;
+ /*0x86*/ u16 flag2;
} HeartContainerEntity;
static void HeartContainer_Init(HeartContainerEntity* this);
@@ -37,7 +37,7 @@ void HeartContainer(HeartContainerEntity* this) {
}
static void HeartContainer_Init(HeartContainerEntity* this) {
- if (CheckFlags(this->unk_84)) {
+ if (CheckFlags(this->flag)) {
DeleteThisEntity();
}
super->action = 1;
@@ -49,7 +49,7 @@ static void HeartContainer_Init(HeartContainerEntity* this) {
}
static void HeartContainer_Action1(HeartContainerEntity* this) {
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag2)) {
super->action = 2;
super->spriteSettings.draw = 1;
super->spriteRendering.b0 = 3;
@@ -74,7 +74,7 @@ static void HeartContainer_Action2(HeartContainerEntity* this) {
static void HeartContainer_Action3(HeartContainerEntity* this) {
sub_08080CB4(super);
if (!(gPlayerState.flags & PL_MINISH) && IsCollidingPlayer(super)) {
- SetFlag(this->unk_84);
+ SetFlag(this->flag);
CreateItemEntity(ITEM_HEART_CONTAINER, 0, 0);
DeleteThisEntity();
}
diff --git a/src/object/hiddenLadderDown.c b/src/object/hiddenLadderDown.c
index dd7ed7d5..9239c39f 100644
--- a/src/object/hiddenLadderDown.c
+++ b/src/object/hiddenLadderDown.c
@@ -15,7 +15,7 @@ typedef struct {
/*0x68*/ u8 unused1[8];
/*0x70*/ u16 unk_70;
/*0x72*/ u8 unused2[20];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} HiddenLadderDownEntity;
void HiddenLadderDown_Init(HiddenLadderDownEntity* this);
@@ -39,7 +39,7 @@ void HiddenLadderDown_Init(HiddenLadderDownEntity* this) {
super->animIndex = 0;
this->unk_70 = COORD_TO_TILE(super);
puVar3 = &this->unk_70;
- if (CheckFlags(this->unk_86) != 0) {
+ if (CheckFlags(this->flag) != 0) {
super->action = 2;
super->spriteSettings.draw = TRUE;
SetTileType(TILE_TYPE_418, *puVar3 + TILE_POS(-1, -1), super->collisionLayer);
@@ -58,6 +58,6 @@ void HiddenLadderDown_Action1(HiddenLadderDownEntity* this) {
if (GetTileTypeAtTilePos(this->unk_70, super->collisionLayer) == 0x1a6) {
super->action = 2;
super->spriteSettings.draw = TRUE;
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
}
}
diff --git a/src/object/itemOnGround.c b/src/object/itemOnGround.c
index 7d627de4..fe61aa2a 100644
--- a/src/object/itemOnGround.c
+++ b/src/object/itemOnGround.c
@@ -51,7 +51,7 @@ void sub_080813D4(ItemOnGroundEntity* this);
void sub_080813E8(ItemOnGroundEntity* this);
void sub_080813F0(ItemOnGroundEntity* this);
bool32 CheckShouldPlayItemGetCutscene(ItemOnGroundEntity* this);
-void sub_08081404(ItemOnGroundEntity*, u32);
+void ItemOnGround_SetFlagAndDelete(ItemOnGroundEntity*, u32);
typedef struct {
u8 unk0[2];
@@ -107,7 +107,7 @@ void ItemOnGround_Init(ItemOnGroundEntity* this) {
sub_080810A8, sub_080810FC, sub_08081150, sub_08081134, sub_08081188, sub_080810A8,
sub_080810A8, sub_080811AC, sub_080811C8, sub_080811D8, sub_080810A8,
};
- if (this->unk_86 && CheckFlags(this->unk_86)) {
+ if (this->flag && CheckFlags(this->flag)) {
DeleteThisEntity();
}
@@ -257,7 +257,7 @@ void ItemOnGround_Action2(ItemOnGroundEntity* this) {
void sub_08081248(ItemOnGroundEntity* this) {
sub_08081500(this);
if (sub_080814C0(this)) {
- sub_08081404(this, 0);
+ ItemOnGround_SetFlagAndDelete(this, FALSE);
} else {
sub_0800442E(super);
}
@@ -270,7 +270,7 @@ void sub_0808126C(ItemOnGroundEntity* this) {
void sub_0808127C(ItemOnGroundEntity* this) {
if (sub_080814C0(this)) {
- sub_08081404(this, 0);
+ ItemOnGround_SetFlagAndDelete(this, FALSE);
} else {
sub_0808153C(this);
}
@@ -311,7 +311,7 @@ void nullsub_510(ItemOnGroundEntity* this) {
void ItemOnGround_Action3(ItemOnGroundEntity* this) {
Entity* other = super->child;
if (!(other->kind == PLAYER_ITEM && other->id == 3)) {
- sub_08081404(this, 0);
+ ItemOnGround_SetFlagAndDelete(this, FALSE);
} else {
CopyPosition(other, super);
super->z.HALF.HI--;
@@ -331,7 +331,7 @@ void ItemOnGround_Action4(ItemOnGroundEntity* this) {
super->spriteRendering.b3 = other->spriteRendering.b3;
GravityUpdate(super, Q_8_8(40.0));
} else {
- sub_08081404(this, 1);
+ ItemOnGround_SetFlagAndDelete(this, TRUE);
}
}
@@ -360,9 +360,9 @@ void sub_080813F0(ItemOnGroundEntity* this) {
}
}
-void sub_08081404(ItemOnGroundEntity* this, u32 arg1) {
- if (arg1 && this->unk_86) {
- SetFlag(this->unk_86);
+void ItemOnGround_SetFlagAndDelete(ItemOnGroundEntity* this, bool32 doSetFlag) {
+ if (doSetFlag && this->flag) {
+ SetFlag(this->flag);
}
DeleteThisEntity();
@@ -472,7 +472,7 @@ void sub_0808153C(ItemOnGroundEntity* this) {
void sub_08081598(ItemOnGroundEntity* this) {
if (super->health == 0) {
- sub_08081404(this, 1);
+ ItemOnGround_SetFlagAndDelete(this, 1);
}
COLLISION_OFF(super);
@@ -486,6 +486,6 @@ void sub_08081598(ItemOnGroundEntity* this) {
CopyPosition(super->child, super);
super->z.HALF.HI -= 4;
if (super->type != 0x5F && sub_08081420(this)) {
- sub_08081404(this, 1);
+ ItemOnGround_SetFlagAndDelete(this, 1);
}
}
diff --git a/src/object/jailBars.c b/src/object/jailBars.c
index b244af4e..dd4d7bcc 100644
--- a/src/object/jailBars.c
+++ b/src/object/jailBars.c
@@ -14,7 +14,7 @@
typedef struct {
/*0x00*/ Entity base;
/*0x68*/ u8 unused1[30];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} JailBarsEntity;
static void SetJailBarTiles(JailBarsEntity* this, u32);
@@ -34,7 +34,7 @@ void JailBars(JailBarsEntity* this) {
}
void JailBars_Init(JailBarsEntity* this) {
- if (CheckFlags(this->unk_86) == 0) {
+ if (CheckFlags(this->flag) == 0) {
super->action = 1;
SetJailBarTiles(this, 0);
} else {
@@ -48,7 +48,7 @@ void JailBars_Init(JailBarsEntity* this) {
}
void JailBars_Action1(JailBarsEntity* this) {
- if (CheckFlags(this->unk_86) != 0) {
+ if (CheckFlags(this->flag) != 0) {
super->action = 2;
SetJailBarTiles(this, 1);
SoundReq(SFX_10B);
diff --git a/src/object/lightDoor.c b/src/object/lightDoor.c
index 3bb41e19..ebce1433 100644
--- a/src/object/lightDoor.c
+++ b/src/object/lightDoor.c
@@ -12,7 +12,7 @@
typedef struct {
/*0x00*/ Entity base;
/*0x68*/ u8 unk_68[30];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} LightDoorEntity;
void LightDoor_Init(LightDoorEntity*);
@@ -31,7 +31,7 @@ void LightDoor(LightDoorEntity* this) {
void LightDoor_Init(LightDoorEntity* this) {
if (super->type == 0) {
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
DeleteThisEntity();
}
super->action = 1;
diff --git a/src/object/lightableSwitch.c b/src/object/lightableSwitch.c
index e8f22525..250fd2ae 100644
--- a/src/object/lightableSwitch.c
+++ b/src/object/lightableSwitch.c
@@ -19,8 +19,8 @@ typedef struct {
/*0x68*/ u8 unused1[12];
/*0x74*/ u16 unk_74;
/*0x76*/ u8 unused2[14];
- /*0x84*/ u16 unk_84;
- /*0x86*/ u16 unk_86;
+ /*0x84*/ u16 flag1;
+ /*0x86*/ u16 flag2;
} LightableSwitchEntity;
static void sub_0809EB30(LightableSwitchEntity* this);
@@ -69,10 +69,10 @@ void LightableSwitch_Type0_Init(LightableSwitchEntity* this) {
void LightableSwitch_Type0_Action1(LightableSwitchEntity* this) {
if ((super->contactFlags & CONTACT_NOW) != 0) {
- if (CheckFlags(this->unk_86) != 0) {
- ClearFlag(this->unk_86);
+ if (CheckFlags(this->flag2) != 0) {
+ ClearFlag(this->flag2);
} else {
- SetFlag(this->unk_86);
+ SetFlag(this->flag2);
}
EnqueueSFX(SFX_110);
}
@@ -82,7 +82,7 @@ void LightableSwitch_Type0_Action1(LightableSwitchEntity* this) {
static void sub_0809EABC(LightableSwitchEntity* this) {
bool32 anySet = 0;
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag2)) {
anySet = 1;
}
if (super->frameIndex != anySet) {
@@ -141,7 +141,7 @@ void LightableSwitch_Type1_Init(LightableSwitchEntity* this) {
super->hitbox = (Hitbox*)&gHitbox_0;
sub_0809EAD8(this);
UpdateSpriteForCollisionLayer(super);
- if (CheckFlags(this->unk_84)) {
+ if (CheckFlags(this->flag1)) {
super->action = 3;
super->frameIndex = 2;
}
@@ -152,21 +152,21 @@ void LightableSwitch_Type1_Action1(LightableSwitchEntity* this) {
super->action = 2;
super->timer = 16;
super->frameIndex = 2;
- SetFlag(this->unk_86);
+ SetFlag(this->flag2);
EnqueueSFX(SFX_110);
}
}
void LightableSwitch_Type1_Action2(LightableSwitchEntity* this) {
- if (CheckFlags(this->unk_84)) {
+ if (CheckFlags(this->flag1)) {
super->action = 3;
} else {
if (--super->timer == 0) {
super->action = 1;
super->frameIndex = 3;
- ClearFlag(this->unk_86);
+ ClearFlag(this->flag2);
EnqueueSFX(SFX_110);
}
}
diff --git a/src/object/litArea.c b/src/object/litArea.c
index 53b34d1f..93129db4 100644
--- a/src/object/litArea.c
+++ b/src/object/litArea.c
@@ -15,12 +15,12 @@ typedef struct {
/*0x68*/ u16 unk_68;
/*0x6a*/ u16 unk_6a;
/*0x6c*/ u8 unused1[26];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} LitAreaEntity;
void LitArea(LitAreaEntity* this) {
if (super->action == 0) {
- if (this->unk_86 != 0 && CheckFlags(this->unk_86) == 0) {
+ if (this->flag != 0 && CheckFlags(this->flag) == 0) {
return;
}
super->spriteSettings.draw = 1;
diff --git a/src/object/lockedDoor.c b/src/object/lockedDoor.c
index f4af4b0e..c1419e1d 100644
--- a/src/object/lockedDoor.c
+++ b/src/object/lockedDoor.c
@@ -25,8 +25,8 @@ typedef struct {
/*0x78*/ u8 unused2[6];
/*0x7e*/ u8 unk_7e;
/*0x7f*/ u8 unused3[5];
- /*0x84*/ u16 unk_84;
- /*0x86*/ u16 unk_86;
+ /*0x84*/ u16 flags;
+ /*0x86*/ u16 flag;
} LockedDoorEntity;
void LockedDoor_Init(LockedDoorEntity* this);
@@ -102,7 +102,7 @@ const u8 gLockedDoorInteractDirections[] = {
};
void LockedDoor_Init(LockedDoorEntity* this) {
- if (this->unk_84 != 0xFFFF && CheckFlags(this->unk_84)) {
+ if (this->flags != 0xFFFF && CheckFlags(this->flags)) {
DeleteThisEntity();
}
if (!sub_080837B0(this))
@@ -120,7 +120,7 @@ void LockedDoor_Init(LockedDoorEntity* this) {
this->unk_74 = GetTileIndex(this->unk_76, super->collisionLayer);
switch (super->type2) {
case 0:
- if (!CheckFlags(this->unk_86)) {
+ if (!CheckFlags(this->flag)) {
if (super->type & 0x10) {
super->action = 3;
} else {
@@ -132,14 +132,14 @@ void LockedDoor_Init(LockedDoorEntity* this) {
}
break;
case 1:
- if (!CheckFlags(this->unk_86)) {
+ if (!CheckFlags(this->flag)) {
sub_08083638(this);
} else {
sub_080836A0(this);
}
break;
case 2:
- if (!CheckFlags(this->unk_86)) {
+ if (!CheckFlags(this->flag)) {
super->frameIndex |= 4;
sub_080836DC(super, this->unk_7e, this->unk_76);
if (!AreaIsDungeon()) {
@@ -209,10 +209,10 @@ void LockedDoor_Action5(LockedDoorEntity* this) {
void LockedDoor_Action6(LockedDoorEntity* this) {
if (super->type2 == 0) {
- if (!CheckFlags(this->unk_86))
+ if (!CheckFlags(this->flag))
return;
} else {
- if (CheckFlags(this->unk_86))
+ if (CheckFlags(this->flag))
return;
}
sub_08083658(this);
@@ -220,22 +220,22 @@ void LockedDoor_Action6(LockedDoorEntity* this) {
void LockedDoor_Action7(LockedDoorEntity* this) {
if (super->type2 == 0) {
- if (CheckFlags(this->unk_86))
+ if (CheckFlags(this->flag))
return;
} else {
- if (!CheckFlags(this->unk_86))
+ if (!CheckFlags(this->flag))
return;
}
super->action = 3;
}
void LockedDoor_Action8(LockedDoorEntity* this) {
- if (super->interactType == INTERACTION_NONE && !CheckFlags(this->unk_86))
+ if (super->interactType == INTERACTION_NONE && !CheckFlags(this->flag))
return;
super->action = 1;
super->timer = 20;
sub_08083658(this);
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
ModDungeonKeys(-1);
}
diff --git a/src/object/mask.c b/src/object/mask.c
index 9246fda1..d2b5c2a8 100644
--- a/src/object/mask.c
+++ b/src/object/mask.c
@@ -16,7 +16,7 @@ typedef struct {
/*0x7c*/ u16 unk_7c;
/*0x7e*/ u16 unk_7e;
/*0x80*/ u8 unused2[6];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} MaskEntity;
void Mask_Init(MaskEntity* this);
@@ -36,7 +36,7 @@ void Mask(MaskEntity* this) {
void Mask_Init(MaskEntity* this) {
if (super->type2 & 0xC0) {
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
s32 field_0x0a;
switch (super->type2 & 0xC0) {
@@ -49,7 +49,7 @@ void Mask_Init(MaskEntity* this) {
DeleteThisEntity();
break;
default:
- ClearFlag(this->unk_86);
+ ClearFlag(this->flag);
}
break;
@@ -122,7 +122,7 @@ void Mask_Action2(MaskEntity* this) {
case 0x80:
EnqueueSFX(SFX_SECRET);
case 0x40:
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
break;
}
diff --git a/src/object/metalDoor.c b/src/object/metalDoor.c
index 95f7f9a1..58e01766 100644
--- a/src/object/metalDoor.c
+++ b/src/object/metalDoor.c
@@ -24,8 +24,8 @@ typedef struct {
/*0x78*/ u16 unk_78;
/*0x7a*/ u16 unk_7a;
/*0x7c*/ u8 unused2[8];
- /*0x84*/ u16 unk_84;
- /*0x86*/ u16 unk_86;
+ /*0x84*/ u16 flag1;
+ /*0x86*/ u16 flag2;
} MetalDoorEntity;
extern u32 sub_08083734(Entity*, u32);
@@ -45,7 +45,7 @@ void MetalDoor(MetalDoorEntity* this) {
}
void MetalDoor_Init(MetalDoorEntity* this) {
- if ((this->unk_84 != 0xffff) && CheckFlags(this->unk_84)) {
+ if ((this->flag1 != 0xffff) && CheckFlags(this->flag1)) {
DeleteThisEntity();
}
super->action = 1;
@@ -97,7 +97,7 @@ void MetalDoor_Action2(MetalDoorEntity* this) {
}
void MetalDoor_Action3(MetalDoorEntity* this) {
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag2)) {
super->action = 4;
super->timer = 12;
super->direction = 0x10;
diff --git a/src/object/minecartDoor.c b/src/object/minecartDoor.c
index 37667af6..a4ef3d59 100644
--- a/src/object/minecartDoor.c
+++ b/src/object/minecartDoor.c
@@ -18,7 +18,7 @@ typedef struct {
/*0x78*/ u8 unk_78[0x6];
/*0x7e*/ u8 unk_7e;
/*0x7f*/ u8 unk_7f[0x7];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} MinecartDoorEntity;
extern bool32 sub_080837B0(Entity*); // lockedDoor
@@ -95,7 +95,7 @@ void MinecartDoor_Action2(MinecartDoorEntity* this) {
void MinecartDoor_Action3(MinecartDoorEntity* this) {
bool32 bVar3;
- if ((this->unk_7e != 0) && (CheckFlags(this->unk_86))) {
+ if ((this->unk_7e != 0) && CheckFlags(this->flag)) {
return;
}
if ((gPlayerState.flags & PL_IN_MINECART) != 0) {
@@ -128,7 +128,7 @@ void MinecartDoor_Action4(MinecartDoorEntity* this) {
}
bool32 sub_08096CEC(MinecartDoorEntity* this) {
- if (this->unk_7e != 0 && CheckFlags(this->unk_86)) {
+ if (this->unk_7e != 0 && CheckFlags(this->flag)) {
return TRUE;
} else {
if ((gPlayerState.flags & PL_IN_MINECART) != 0) {
diff --git a/src/object/minishPortalStone.c b/src/object/minishPortalStone.c
index 929f65ac..cb3ca717 100644
--- a/src/object/minishPortalStone.c
+++ b/src/object/minishPortalStone.c
@@ -11,7 +11,7 @@
typedef struct {
/*0x00*/ Entity base;
/*0x68*/ u8 unk_68[0x1e];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} MinishPortalStoneEntity;
void MinishPortalStone_Init(MinishPortalStoneEntity* this);
@@ -37,7 +37,7 @@ void MinishPortalStone_Init(MinishPortalStoneEntity* this) {
super->action = 1;
super->spritePriority.b0 = 7;
super->hitbox = (Hitbox*)&gUnk_08123328;
- if ((this->unk_86 == 0xffff) || (CheckFlags(this->unk_86))) {
+ if ((this->flag == 0xffff) || CheckFlags(this->flag)) {
super->spriteSettings.draw = 1;
super->action = 4;
sub_08097CFC(this);
@@ -47,7 +47,7 @@ void MinishPortalStone_Init(MinishPortalStoneEntity* this) {
}
void MinishPortalStone_Action1(MinishPortalStoneEntity* this) {
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
SetPlayerControl(CONTROL_1);
gPauseMenuOptions.disabled = 1;
RequestPriorityDuration(super, 30);
diff --git a/src/object/objectA.c b/src/object/objectA.c
index ac45f99f..6aa82e40 100644
--- a/src/object/objectA.c
+++ b/src/object/objectA.c
@@ -18,7 +18,7 @@ typedef struct {
/*0x68*/ u8 unused1[8];
/*0x70*/ u16 unk_70;
/*0x72*/ u8 unused2[20];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} ObjectAEntity;
extern u8 gUpdateVisibleTiles;
@@ -35,7 +35,7 @@ void ObjectA(ObjectAEntity* this) {
uVar2 = TILE_TYPE_52;
}
this->unk_70 = uVar2;
- if (CheckFlags(this->unk_86) != 0) {
+ if (CheckFlags(this->flag) != 0) {
SetTileType(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
if ((gRoomControls.reload_flags & 1) != 0) {
gUpdateVisibleTiles = 0;
@@ -46,7 +46,7 @@ void ObjectA(ObjectAEntity* this) {
}
} else if (super->interactType != INTERACTION_NONE) {
SetTileType(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
CreateDust(super);
ModDungeonKeys(-1);
DeleteThisEntity();
diff --git a/src/object/objectA8.c b/src/object/objectA8.c
index c5e95687..434e04c0 100644
--- a/src/object/objectA8.c
+++ b/src/object/objectA8.c
@@ -32,7 +32,7 @@ void ObjectA8_Action2Subaction0(ObjectA8Entity*);
void ObjectA8_Action2Subaction1(ObjectA8Entity*);
void ObjectA8_Action2Subaction2(ObjectA8Entity*);
-extern void sub_08081404(Entity*, u32);
+extern void ItemOnGround_SetFlagAndDelete(Entity*, u32);
void ObjectA8(ObjectA8Entity* this) {
static void (*const ObjectA8_Actions[])(ObjectA8Entity*) = {
@@ -160,7 +160,7 @@ void ObjectA8_Action3(ObjectA8Entity* this) {
ProcessMovement1(super);
if ((AnyPrioritySet() == 0) && (super->type == 0)) {
if (((gRoomTransition.frameCount & 1) != 0) && (--super->timer == 0)) {
- sub_08081404(super, 0);
+ ItemOnGround_SetFlagAndDelete(super, FALSE);
}
if (super->timer < 0x3c) {
super->spriteSettings.draw ^= 1;
@@ -170,7 +170,7 @@ void ObjectA8_Action3(ObjectA8Entity* this) {
void ObjectA8_Action4(ObjectA8Entity* this) {
if (*(u16*)&super->child->kind != 0xb08) {
- sub_08081404(super, 0);
+ ItemOnGround_SetFlagAndDelete(super, FALSE);
} else {
CopyPosition(super->child, super);
super->z.HALF.HI--;
@@ -217,7 +217,7 @@ void ObjectA8_Action6(ObjectA8Entity* this) {
if (--super->subtimer == 0) {
super->subtimer = 6;
if (--super->spriteOffsetY < -0x16) {
- sub_08081404(super, 1);
+ ItemOnGround_SetFlagAndDelete(super, TRUE);
}
}
if (super->spriteOffsetY < -0x11) {
diff --git a/src/object/pinwheel.c b/src/object/pinwheel.c
index 35d161a8..ca6bfcd5 100644
--- a/src/object/pinwheel.c
+++ b/src/object/pinwheel.c
@@ -10,10 +10,10 @@
typedef struct {
/*0x00*/ Entity base;
- /*0x68*/ u16 unk_68;
+ /*0x68*/ u16 flag;
} PinwheelEntity;
-static const u16 gUnk_08125050[] = {
+static const u16 gPinwheelFlags[] = {
KUMOUE_02_AWASE_01, KUMOUE_02_AWASE_02, KUMOUE_02_AWASE_03, KUMOUE_02_AWASE_04, KUMOUE_02_AWASE_05, BEGIN_1,
};
extern u32 gUnk_020342F8;
@@ -38,9 +38,9 @@ void Pinwheel(PinwheelEntity* this) {
}
void Pinwheel_Init(PinwheelEntity* this) {
- this->unk_68 = gUnk_08125050[super->type2];
+ this->flag = gPinwheelFlags[super->type2];
super->spritePriority.b0 = 7;
- if (CheckLocalFlag(this->unk_68) != 0) {
+ if (CheckLocalFlag(this->flag) != 0) {
super->action = 2;
} else {
super->action = 1;
@@ -49,7 +49,7 @@ void Pinwheel_Init(PinwheelEntity* this) {
}
void Pinwheel_Action1(PinwheelEntity* this) {
- if (CheckLocalFlag(this->unk_68) != 0) {
+ if (CheckLocalFlag(this->flag) != 0) {
super->action = 2;
CreateDust(super);
}
diff --git a/src/object/pot.c b/src/object/pot.c
index adfcb75d..e61b94fd 100644
--- a/src/object/pot.c
+++ b/src/object/pot.c
@@ -22,7 +22,7 @@ typedef struct {
/*0x72*/ u8 unused2[11];
/*0x7d*/ u8 unk_7d;
/*0x7e*/ u8 unused3[8];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} PotEntity;
void Pot_Action5(PotEntity*);
@@ -60,7 +60,7 @@ void Pot(PotEntity* this) {
}
void Pot_Init(PotEntity* this) {
- if (super->type2 == 1 && CheckFlags(this->unk_86)) {
+ if (super->type2 == 1 && CheckFlags(this->flag)) {
DeleteThisEntity();
}
@@ -306,7 +306,7 @@ static void BreakPot(PotEntity* this, Entity* parent) {
}
if (super->type2 == 1) {
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
}
DeleteThisEntity();
@@ -327,7 +327,7 @@ u32 sub_0808288C(Entity* this, u32 form, u32 arg2, u32 arg3) {
if (entity != NULL) {
if (arg3 == 2) {
entity->base.timer = 5;
- entity->unk_86 = ((PotEntity*)this)->unk_86; // This function is also used by flyingSkull.
+ entity->flag = ((PotEntity*)this)->flag; // This function is also used by flyingSkull.
} else {
entity->base.timer = 0;
}
diff --git a/src/object/pushableFurniture.c b/src/object/pushableFurniture.c
index 4a0dfda7..b976bdcb 100644
--- a/src/object/pushableFurniture.c
+++ b/src/object/pushableFurniture.c
@@ -73,7 +73,7 @@ void PushableFurniture_Init(PushableFurnitureEntity* this) {
this->unk_7e = (s8)super->subtimer + super->x.HALF_U.HI;
}
if (super->parent == NULL) {
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
condition++;
}
} else {
@@ -228,7 +228,7 @@ bool32 sub_0808FC5C(PushableFurnitureEntity* this) {
this->unk_81 = 1;
if (super->parent == NULL) {
- SetFlag((u32)this->unk_86);
+ SetFlag((u32)this->flag);
} else {
if ((this->unk_82 & 0x80) != 0) {
puVar5 = super->parent->spriteAnimation + 2;
diff --git a/src/object/railtrack.c b/src/object/railtrack.c
index f5ceab8d..a775f6d3 100644
--- a/src/object/railtrack.c
+++ b/src/object/railtrack.c
@@ -19,10 +19,10 @@ typedef struct {
/*0x74*/ u16 unk_74;
/*0x76*/ u16 unk_76;
/*0x78*/ u16 unk_78;
- /*0x7a*/ u16 unk_7a;
+ /*0x7a*/ u16 flagValue;
/*0x7c*/ union SplitHWord unk_7c;
/*0x7e*/ u8 unused2[8];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} RailtrackEntity;
void sub_08085394(RailtrackEntity* this);
@@ -58,8 +58,8 @@ void Railtrack_Init(RailtrackEntity* this) {
}
super->animationState = super->type2 & 2;
if (super->type == 3) {
- uVar1 = CheckFlags(this->unk_86);
- this->unk_7a = uVar1;
+ uVar1 = CheckFlags(this->flag);
+ this->flagValue = uVar1;
if ((u16)(uVar1 & -1) != 0) {
super->animationState = (super->animationState + 2) & 3;
super->action = 3;
@@ -71,11 +71,11 @@ void Railtrack_Init(RailtrackEntity* this) {
}
void Railtrack_Action1(RailtrackEntity* this) {
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
super->action = 2;
super->subtimer = 8;
if (super->type == 1) {
- ClearFlag(this->unk_86);
+ ClearFlag(this->flag);
}
super->animationState = (super->animationState + this->unk_7c.HALF.LO) & 3;
InitializeAnimation(super, super->animationState);
@@ -88,7 +88,7 @@ void Railtrack_Action2(RailtrackEntity* this) {
if (--super->subtimer == 0) {
super->action = 3;
super->subtimer = super->timer;
- this->unk_7a = CheckFlags(this->unk_86);
+ this->flagValue = CheckFlags(this->flag);
super->animationState = (super->animationState + this->unk_7c.HALF.LO) & 3;
InitializeAnimation(super, super->animationState);
sub_08085394(this);
@@ -103,13 +103,13 @@ void Railtrack_Action3(RailtrackEntity* this) {
case 1:
break;
case 2:
- if (CheckFlags(this->unk_86) == 0) {
+ if (CheckFlags(this->flag) == 0) {
super->action = 1;
return;
}
break;
case 3:
- if (CheckFlags(this->unk_86) == this->unk_7a) {
+ if (CheckFlags(this->flag) == this->flagValue) {
super->subtimer = 255;
} else {
super->subtimer = 1;
diff --git a/src/object/smallIceBlock.c b/src/object/smallIceBlock.c
index 8aab1f91..16178fa3 100644
--- a/src/object/smallIceBlock.c
+++ b/src/object/smallIceBlock.c
@@ -18,7 +18,7 @@ typedef struct {
/*0x6e*/ u8 unk_6e[0x2];
/*0x70*/ u16 tilePos;
/*0x72*/ u8 unk_72[0x14];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} SmallIceBlockEntity;
extern const s16 gUnk_080B4488[];
@@ -51,7 +51,7 @@ void SmallIceBlock_Init(SmallIceBlockEntity* this) {
case 0:
case 1:
case 2:
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
DeleteThisEntity();
}
}
@@ -81,7 +81,7 @@ void SmallIceBlock_Action1(SmallIceBlockEntity* this) {
EnqueueSFX(SFX_ICE_BLOCK_MELT);
SmallIceBlock_Action3(this);
if (super->type == 0) {
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
}
} else {
if (!sub_0800442E(super)) {
@@ -138,10 +138,10 @@ void SmallIceBlock_Action3(SmallIceBlockEntity* this) {
}
SetAffineInfo(super, 0x100, gUnk_08123748[super->timer >> 5], 0);
if (super->type == 1) {
- CreateGroundItemWithFlags(super, ITEM_SMALL_KEY, 0, this->unk_86);
+ CreateGroundItemWithFlags(super, ITEM_SMALL_KEY, 0, this->flag);
SoundReq(SFX_SECRET);
} else if (super->type == 2) {
- CreateGroundItemWithFlags(super, ITEM_BIG_KEY, 0, this->unk_86);
+ CreateGroundItemWithFlags(super, ITEM_BIG_KEY, 0, this->flag);
SoundReq(SFX_SECRET);
}
super->action = 4;
diff --git a/src/object/treeHidingPortal.c b/src/object/treeHidingPortal.c
index 283d64be..99d04565 100644
--- a/src/object/treeHidingPortal.c
+++ b/src/object/treeHidingPortal.c
@@ -17,7 +17,7 @@
typedef struct {
/*0x00*/ Entity base;
/*0x68*/ u8 unused1[30];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} TreeHidingPortalEntity;
extern const s16 gUnk_080B4468[];
@@ -42,7 +42,7 @@ void TreeHidingPortal(TreeHidingPortalEntity* this) {
}
void TreeHidingPortal_Init(TreeHidingPortalEntity* this) {
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
sub_0809E96C(this);
DeleteThisEntity();
}
@@ -79,7 +79,7 @@ void TreeHidingPortal_Action2(TreeHidingPortalEntity* this) {
void TreeHidingPortal_Action3(TreeHidingPortalEntity* this) {
if (--super->timer == 0) {
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
SetPlayerControl(0);
SoundReq(SFX_SECRET_BIG);
DeleteThisEntity();
diff --git a/src/object/unusedSkull.c b/src/object/unusedSkull.c
index 6bfb48a5..b2b9def3 100644
--- a/src/object/unusedSkull.c
+++ b/src/object/unusedSkull.c
@@ -12,7 +12,7 @@
typedef struct {
/*0x00*/ Entity base;
/*0x68*/ u8 unk_68[0x1e];
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} UnusedSkullEntity;
void UnusedSkull_Init(UnusedSkullEntity*);
@@ -40,9 +40,9 @@ void UnusedSkull_Init(UnusedSkullEntity* this) {
super->collisionMask = 2;
super->hitbox = (Hitbox*)&gHitbox_4;
SetTile(SPECIAL_TILE_80, COORD_TO_TILE(super), super->collisionLayer);
- if (super->type == 1 || CheckFlags(this->unk_86)) {
+ if (super->type == 1 || CheckFlags(this->flag)) {
super->action = 3;
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
InitializeAnimation(super, 1);
} else {
InitializeAnimation(super, super->type);
@@ -62,7 +62,7 @@ void UnusedSkull_Action2(UnusedSkullEntity* this) {
GetNextFrame(super);
if ((super->frame & 1) != 0) {
super->action = 3;
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
EnqueueSFX(SFX_BUTTON_PRESS);
}
}
diff --git a/src/object/warpPoint.c b/src/object/warpPoint.c
index 67798907..dfd66d1b 100644
--- a/src/object/warpPoint.c
+++ b/src/object/warpPoint.c
@@ -18,7 +18,7 @@ typedef struct {
/*0x7d*/ u8 unk_7d;
/*0x7e*/ u8 unused3[6];
/*0x84*/ u16 unk_84;
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} WarpPointEntity;
extern void EnableDungeonWarp(u32);
@@ -58,7 +58,7 @@ void WarpPoint_Init(WarpPointEntity* this) {
super->hitbox = (Hitbox*)&gHitbox_1;
super->updatePriority = PRIO_NO_BLOCK;
InitializeAnimation(super, 0);
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
sub_0808B830(this);
} else {
if (AreaIsDungeon() && IsDungeonWarpActive(super->type)) {
@@ -77,7 +77,7 @@ void WarpPoint_Init(WarpPointEntity* this) {
}
void WarpPoint_Action1(WarpPointEntity* this) {
- if (CheckFlags(this->unk_86)) {
+ if (CheckFlags(this->flag)) {
sub_0808B830(this);
if (AreaIsDungeon()) {
EnableDungeonWarp(super->type);
diff --git a/src/objectUtils.c b/src/objectUtils.c
index 21ec9568..e00c62d4 100644
--- a/src/objectUtils.c
+++ b/src/objectUtils.c
@@ -189,7 +189,7 @@ Entity* CreateGroundItemWithFlags(Entity* parent, u32 form, u32 subtype, u32 fla
if (ent != NULL) {
ItemOnGroundEntity* this = (ItemOnGroundEntity*)ent;
ent->timer = 5;
- this->unk_86 = flags;
+ this->flag = flags;
}
return ent;
}
diff --git a/src/projectile/spiderWeb.c b/src/projectile/spiderWeb.c
index 6a386f64..5e4e1a46 100644
--- a/src/projectile/spiderWeb.c
+++ b/src/projectile/spiderWeb.c
@@ -16,7 +16,7 @@ typedef struct {
/*0x68*/ u8 unused1[28];
/*0x84*/ u8 unk_84;
/*0x85*/ u8 unused2;
- /*0x86*/ u16 unk_86;
+ /*0x86*/ u16 flag;
} SpiderWebEntity;
typedef struct {
@@ -134,7 +134,7 @@ void SpiderWeb_Init(SpiderWebEntity* this) {
&gUnk_080FD42C,
&gUnk_080FD434,
};
- if (CheckFlags(this->unk_86) != 0) {
+ if (CheckFlags(this->flag) != 0) {
DeleteThisEntity();
}
super->action = 1;
@@ -251,7 +251,7 @@ void sub_080AAA68(Entity* this) {
}
void sub_080AAAA8(SpiderWebEntity* this) {
- SetFlag(this->unk_86);
+ SetFlag(this->flag);
RestorePrevTileEntity(TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
DeleteThisEntity();
}