summaryrefslogtreecommitdiff
path: root/src/enemy
diff options
context:
space:
mode:
authortheo3 <arisstephenson2@gmail.com>2021-11-04 20:56:03 -0700
committertheo3 <arisstephenson2@gmail.com>2021-11-04 20:56:03 -0700
commit9cfbb3a27a4c8be6adad1ab060db777b30d52ec2 (patch)
treef76a10c993a59a7775eea09f23b441746d9ceeb1 /src/enemy
parent9ef31544e24c8b0a43b0d712eb77e9210d2641d3 (diff)
entity changes, textbox changes
Diffstat (limited to 'src/enemy')
-rw-r--r--src/enemy/acroBandits.c10
-rw-r--r--src/enemy/beetle.c10
-rw-r--r--src/enemy/bobomb.c6
-rw-r--r--src/enemy/bombPeahat.c2
-rw-r--r--src/enemy/businessScrub.c16
-rw-r--r--src/enemy/chuchu.c6
-rw-r--r--src/enemy/cuccoChickAggr.c6
-rw-r--r--src/enemy/fallingBoulder.c4
-rw-r--r--src/enemy/fireballGuy.c2
-rw-r--r--src/enemy/gibdo.c2
-rw-r--r--src/enemy/helmasaur.c4
-rw-r--r--src/enemy/lakitu.c4
-rw-r--r--src/enemy/likeLike.c10
-rw-r--r--src/enemy/mazaalBracelet.c10
-rw-r--r--src/enemy/mazaalHead.c2
-rw-r--r--src/enemy/miniFireballGuy.c2
-rw-r--r--src/enemy/moldworm.c8
-rw-r--r--src/enemy/peahat.c4
-rw-r--r--src/enemy/pesto.c6
-rw-r--r--src/enemy/puffstool.c10
-rw-r--r--src/enemy/rollobite.c6
-rw-r--r--src/enemy/rupeeLike.c4
-rw-r--r--src/enemy/spikedBeetle.c4
-rw-r--r--src/enemy/spinyChuchu.c2
-rw-r--r--src/enemy/tektite.c8
-rw-r--r--src/enemy/tektiteGolden.c8
-rw-r--r--src/enemy/vaatiArm.c6
-rw-r--r--src/enemy/vaatiProjectile.c2
-rw-r--r--src/enemy/vaatiTransfigured.c6
-rw-r--r--src/enemy/vaatiTransfiguredEye.c4
-rw-r--r--src/enemy/vaatiWrath.c6
-rw-r--r--src/enemy/wallMaster2.c2
-rw-r--r--src/enemy/waterDrop.c2
-rw-r--r--src/enemy/wisp.c2
34 files changed, 93 insertions, 93 deletions
diff --git a/src/enemy/acroBandits.c b/src/enemy/acroBandits.c
index 5edc7d1d..4644e620 100644
--- a/src/enemy/acroBandits.c
+++ b/src/enemy/acroBandits.c
@@ -323,7 +323,7 @@ void sub_08031E90(Entity* this) {
void sub_08031EA8(Entity* this) {
this->action = 1;
this->spritePriority.b1 = 1;
- this->field_0x20 = 0x40000;
+ this->hVelocity = 0x40000;
this->height.HALF.HI = (4 - this->type2) * 0xe;
this->field_0x78.HALF.HI = Random();
InitializeAnimation(this, 4);
@@ -332,8 +332,8 @@ void sub_08031EA8(Entity* this) {
void sub_08031EE8(Entity* this) {
int draw;
- this->height.WORD -= this->field_0x20;
- this->field_0x20 -= 0x1800;
+ this->height.WORD -= this->hVelocity;
+ this->hVelocity -= 0x1800;
if (this->height.HALF.HI < 1) {
draw = this->spriteSettings.b.draw;
@@ -347,7 +347,7 @@ void sub_08031EE8(Entity* this) {
if (draw == 1)
GetNextFrame(this);
- if (this->field_0x20 < 1) {
+ if (this->hVelocity < 1) {
this->action = 2;
this->flags |= 0x80;
InitializeAnimation(this, 5);
@@ -450,7 +450,7 @@ void sub_08032160(Entity* this) {
this->spriteSettings.b.flipX = 0;
}
this->speed = 0xf0;
- this->field_0x20 = 0x12000;
+ this->hVelocity = 0x12000;
this->spritePriority.b1 = 1;
InitializeAnimation(this, 12);
}
diff --git a/src/enemy/beetle.c b/src/enemy/beetle.c
index 09224225..15535172 100644
--- a/src/enemy/beetle.c
+++ b/src/enemy/beetle.c
@@ -105,7 +105,7 @@ void sub_080218CC(Entity* this) {
this->spriteSettings.b.draw = 1;
this->direction = ((sub_08049F84(this, 1) ^ 0x10) + gUnk_080CB5DC[Random() & 7]) & 0x1f;
this->speed = 0x100;
- this->field_0x20 = 0x12000;
+ this->hVelocity = 0x12000;
}
GetNextFrame(this);
@@ -216,7 +216,7 @@ void sub_08021AD8(Entity* this) {
}
void sub_08021B64(Entity* this) {
- if (gPlayerState.flags.all & 4) {
+ if (gPlayerState.flags & 4) {
this->action = 3;
this->height.WORD = 0;
InitializeAnimation(this, 2);
@@ -233,12 +233,12 @@ void sub_08021B64(Entity* this) {
this->actionDelay = (u8)iVar4;
}
- if (gPlayerState.flags.all & 0x110)
+ if (gPlayerState.flags & 0x110)
iVar4 = 0;
if (iVar4 == 0) {
this->action = 6;
- this->field_0x20 = 0x10000;
+ this->hVelocity = 0x10000;
((u8*)&this->field_0x86)[1] = 0;
if (gPlayerEntity.direction != 0xff) {
this->direction = 0x10 ^ gPlayerEntity.direction;
@@ -299,7 +299,7 @@ u32 sub_08021D00(Entity* this) {
} else {
this->action = 4;
this->actionDelay = 1;
- this->field_0x20 = 0x18000;
+ this->hVelocity = 0x18000;
InitializeAnimation(this, 4);
ret = 1;
}
diff --git a/src/enemy/bobomb.c b/src/enemy/bobomb.c
index 3d107aa3..67bb138b 100644
--- a/src/enemy/bobomb.c
+++ b/src/enemy/bobomb.c
@@ -54,7 +54,7 @@ void sub_0802C688(Entity* this) {
this->action = 3;
this->damageType = 0x6e;
this->field_0xf = 1;
- this->field_0x20 = 0x18000;
+ this->hVelocity = 0x18000;
this->speed = 0;
this->field_0x80.HALF.HI = 1;
InitializeAnimation(this, this->direction >> 4 | 6);
@@ -72,7 +72,7 @@ void sub_0802C7AC(Entity* this) {
if (this->field_0x82.HALF.LO != 2) {
this->speed = this->field_0x82.HALF.LO ? 0x200 : 0x80;
}
- this->field_0x20 = 0x18000;
+ this->hVelocity = 0x18000;
this->field_0x82.HALF.HI = 0;
this->field_0x80.HALF.HI = 0;
} else {
@@ -225,7 +225,7 @@ void sub_0802CA94(Entity* this) {
this->flags &= ~0x80;
this->field_0xf = 1;
this->spritePriority.b1 = 1;
- this->field_0x20 = 0x18000;
+ this->hVelocity = 0x18000;
this->speed = 0;
this->field_0x82.HALF.HI = 0;
this->field_0x80.HALF.HI = 0;
diff --git a/src/enemy/bombPeahat.c b/src/enemy/bombPeahat.c
index e096feda..d5220c6d 100644
--- a/src/enemy/bombPeahat.c
+++ b/src/enemy/bombPeahat.c
@@ -381,7 +381,7 @@ void sub_0802ADDC(Entity* this) {
void sub_0802AE24(Entity* this) {
this->action = 1;
this->actionDelay = 0xf0;
- this->field_0x20 = 0x8000;
+ this->hVelocity = 0x8000;
this->hitbox = (Hitbox*)&gUnk_080CD174;
this->field_0x3c = 3;
this->field_0x16 = 0;
diff --git a/src/enemy/businessScrub.c b/src/enemy/businessScrub.c
index 730f1aa7..ec33bb58 100644
--- a/src/enemy/businessScrub.c
+++ b/src/enemy/businessScrub.c
@@ -246,11 +246,11 @@ void sub_08028CE8(Entity* this) {
struct SalesOffering* offer = (struct SalesOffering*)this->field_0x7c.WORD;
u32 subtype;
- if ((gTextBox.doTextBox & 0x7f) == 0 && sub_0802915C(this) && !sub_08056338()) {
+ if ((gMessage.doTextBox & 0x7f) == 0 && sub_0802915C(this) && !sub_08056338()) {
if (offer->price <= gSave.stats.rupees) {
if (sub_080291DC(this)) {
/* Bag full. */
- TextboxNoOverlapFollow(0x2904);
+ MessageFromTarget(0x2904);
sub_08078A90(0);
} else {
ModRupees(-offer->price);
@@ -285,7 +285,7 @@ void sub_08028CE8(Entity* this) {
}
} else {
/* Not enough money. */
- TextboxNoOverlapFollow(0x2903);
+ MessageFromTarget(0x2903);
sub_08078A90(0);
}
}
@@ -303,7 +303,7 @@ void sub_08028DE8(Entity* this) {
this->field_0x80.HALF.HI = 1;
}
} else {
- TextboxNoOverlapFollow(0x2902);
+ MessageFromTarget(0x2902);
this->action = 4;
this->field_0x80.HALF.HI = 0;
this->actionDelay = 1;
@@ -315,11 +315,11 @@ void sub_08028DE8(Entity* this) {
}
void sub_08028E40(Entity* this) {
- if ((gTextBox.doTextBox & 0x7f) == 0) {
+ if ((gMessage.doTextBox & 0x7f) == 0) {
struct SalesOffering* offer = (struct SalesOffering*)this->field_0x7c.WORD;
this->action = 4;
- this->subAction = gTextBox.doTextBox & 0x7f;
+ this->subAction = gMessage.doTextBox & 0x7f;
this->actionDelay = 1;
if (CheckLocalFlag(offer->field_0xa) == 0) {
SetLocalFlag(offer->field_0xa);
@@ -383,8 +383,8 @@ void sub_08028F0C(Entity* this) {
dialog = offer->field_0x4;
sub_08078A90(1);
}
- TextboxNoOverlapFollow(dialog);
- gTextBox.field_0x10 = offer->price;
+ MessageFromTarget(dialog);
+ gMessage.field_0x10 = offer->price;
}
}
diff --git a/src/enemy/chuchu.c b/src/enemy/chuchu.c
index 7c891a9f..56e23b75 100644
--- a/src/enemy/chuchu.c
+++ b/src/enemy/chuchu.c
@@ -117,7 +117,7 @@ void sub_0801EF40(Entity* this) {
}
} else {
sub_0804AA1C(this);
- this->field_0x20 = 0;
+ this->hVelocity = 0;
InitializeAnimation(this, 9);
}
this->field_0x80.HALF.LO = this->currentHealth;
@@ -698,7 +698,7 @@ void sub_0801FB68(Entity* this) {
break;
}
- this->field_0x20 = 0;
+ this->hVelocity = 0;
}
u32 sub_0801FBD0(Entity* this) {
@@ -711,7 +711,7 @@ u32 sub_0801FBD0(Entity* this) {
void Chuchu_JumpAtPlayer(Entity* this) {
this->speed = 0x180;
- this->field_0x20 = 0x20000;
+ this->hVelocity = 0x20000;
this->direction = sub_08049F84(this, 1);
InitializeAnimation(this, 3);
}
diff --git a/src/enemy/cuccoChickAggr.c b/src/enemy/cuccoChickAggr.c
index 683ba4b8..2ae41b08 100644
--- a/src/enemy/cuccoChickAggr.c
+++ b/src/enemy/cuccoChickAggr.c
@@ -49,7 +49,7 @@ void sub_08022988(Entity* this) {
return;
this->frameIndex = 1;
- this->field_0x20 = 0x10000;
+ this->hVelocity = 0x10000;
EnqueueSFX(0xd6);
}
@@ -75,7 +75,7 @@ void sub_080229F8(Entity* this) {
this->speed = 0xc0;
sub_08022B44(this);
} else {
- this->field_0x20 = 0x10000;
+ this->hVelocity = 0x10000;
EnqueueSFX(0xd6);
}
}
@@ -138,7 +138,7 @@ u32 sub_08022B20(Entity* this) {
}
void sub_08022B44(Entity* this) {
- this->field_0x20 = 0xc000;
+ this->hVelocity = 0xc000;
this->direction = GetFacingDirection(this, &gPlayerEntity);
if (this->direction & 0xf)
diff --git a/src/enemy/fallingBoulder.c b/src/enemy/fallingBoulder.c
index 5195b542..29446667 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->field_0x20 = 0x20000;
+ this->hVelocity = 0x20000;
this->actionDelay = 2;
this->field_0x7a.HWORD = Random() & 0x70;
switch (this->type) {
@@ -190,7 +190,7 @@ void sub_0802C4B0(Entity* this) {
}
rand = Random() & 7;
- this->field_0x20 = 0x20000;
+ this->hVelocity = 0x20000;
if (rand & 4) {
if (rand & 3) {
*(u32*)&this->cutsceneBeh = gUnk_080CD58C[offset | 1];
diff --git a/src/enemy/fireballGuy.c b/src/enemy/fireballGuy.c
index 42916d3e..2103e19f 100644
--- a/src/enemy/fireballGuy.c
+++ b/src/enemy/fireballGuy.c
@@ -101,7 +101,7 @@ u32 sub_0804A024(Entity*, u32, u32);
void sub_08045524(Entity* this) {
u32 tmp, tmp1, tmp2;
- this->field_0x20 = 0x1c000;
+ this->hVelocity = 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 923ebbdc..d1773a7d 100644
--- a/src/enemy/gibdo.c
+++ b/src/enemy/gibdo.c
@@ -350,7 +350,7 @@ void sub_08037A58(Entity* this) {
}
void sub_08037ACC(Entity* this) {
- gPlayerState.flags.all &= 0xFFFFFEFF;
+ gPlayerState.flags &= 0xFFFFFEFF;
gPlayerEntity.flags |= 0x80;
gPlayerEntity.iframes = 0x1e;
gPlayerEntity.knockbackDirection = DirectionFromAnimationState(this->animationState);
diff --git a/src/enemy/helmasaur.c b/src/enemy/helmasaur.c
index 2385b12e..41f0ed85 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->field_0x20 = 0x18000;
+ this->hVelocity = 0x18000;
this->damageType = 0x19;
this->field_0x3a = this->field_0x3a & 0xfb;
this->field_0x1c = 0x12;
@@ -369,7 +369,7 @@ void sub_0802C1CC(Entity* this) {
void sub_0802C218(Entity* this) {
this->action = 6;
this->speed = 0xe0;
- this->field_0x20 = 0x18000;
+ this->hVelocity = 0x18000;
}
// clang-format off
diff --git a/src/enemy/lakitu.c b/src/enemy/lakitu.c
index b35d9540..1353d489 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->field_0x20 = 0x20000;
+ this->hVelocity = 0x20000;
sub_0803CBAC(this);
} else {
@@ -353,7 +353,7 @@ void sub_0803CC08(Entity* this) {
return;
}
- if (this->field_0x20 >= 0) {
+ if (this->hVelocity >= 0) {
return;
}
diff --git a/src/enemy/likeLike.c b/src/enemy/likeLike.c
index 6824d4eb..70f5ea3f 100644
--- a/src/enemy/likeLike.c
+++ b/src/enemy/likeLike.c
@@ -207,9 +207,9 @@ void sub_0802805C(Entity* this) {
NONMATCH("asm/non_matching/likeLike/sub_0802810C.inc", void sub_0802810C(Entity* this)) {
gPlayerState.jumpStatus = 0x41;
gPlayerState.field_0xa = 0;
- gPlayerState.flags.all &= 0xffffffef;
+ gPlayerState.flags &= 0xffffffef;
gPlayerEntity.flags |= 0x80;
- gPlayerEntity.field_0x20 = 0x18000;
+ gPlayerEntity.hVelocity = 0x18000;
gPlayerEntity.iframes = -60;
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
gPlayerEntity.spritePriority.b1 = this->field_0x82.HALF.HI;
@@ -229,10 +229,10 @@ void sub_080281A0(Entity* this) {
this->field_0xf = 0x19;
if (sub_080281E0(0xe)) {
this->field_0x80.HALF.LO = 0xe;
- TextboxNoOverlapFollow(0x578);
+ MessageFromTarget(0x578);
} else if (sub_080281E0(0xd)) {
this->field_0x80.HALF.LO = 0xd;
- TextboxNoOverlapFollow(0x578);
+ MessageFromTarget(0x578);
} else {
ModHealth(-1);
}
@@ -262,7 +262,7 @@ void sub_08028224(u32 param_1) {
#else
sub_080A7C18(param_1, 0, 1);
#endif
- TextboxNoOverlapFollow(0x579);
+ MessageFromTarget(0x579);
}
void (*const gUnk_080CC6FC[])(Entity*) = {
diff --git a/src/enemy/mazaalBracelet.c b/src/enemy/mazaalBracelet.c
index a0f50903..96ded54d 100644
--- a/src/enemy/mazaalBracelet.c
+++ b/src/enemy/mazaalBracelet.c
@@ -916,7 +916,7 @@ void sub_0803B100(Entity* this) {
Entity* temp;
this->action = 0x29;
- this->field_0x20 = 0x14000;
+ this->hVelocity = 0x14000;
if (this->type == 0) {
this->hitbox = &gUnk_080FD364;
} else {
@@ -982,7 +982,7 @@ void sub_0803B1B8(Entity* this) {
if ((temp->field_0x80.HALF.LO & 0xc) == 0xc) {
temp->action = 0xb;
temp->actionDelay = 0x78;
- temp->field_0x20 = 0;
+ temp->hVelocity = 0;
(*(Entity**)&temp->field_0x74)->field_0x7c.HALF_U.HI = 0x708;
(*(Entity**)&temp->field_0x78)->field_0x7c.HALF_U.HI = 0x708;
}
@@ -1227,9 +1227,9 @@ void sub_0803B724(Entity* param_1) {
void sub_0803B798(void) {
gPlayerState.jumpStatus = 0x41;
gPlayerState.field_0xa = 0;
- gPlayerState.flags.all &= 0xffef;
+ gPlayerState.flags &= 0xffef;
gPlayerEntity.flags |= 0x80;
- gPlayerEntity.field_0x20 = 0x18000;
+ gPlayerEntity.hVelocity = 0x18000;
gPlayerEntity.height.HALF.HI = -10;
gPlayerEntity.direction = 0x10;
gPlayerEntity.animationState = 4;
@@ -1257,7 +1257,7 @@ u32 sub_0803B870(Entity* this) {
Entity* entity;
entity = this->attachedEntity;
- if ((entity->bitfield & 0x80) != 0 && (gPlayerState.flags.all & 0x10) != 0) {
+ if ((entity->bitfield & 0x80) != 0 && (gPlayerState.flags & 0x10) != 0) {
this->action = 0x18;
this->actionDelay = 0x44;
this->spriteSettings.b.draw = 0;
diff --git a/src/enemy/mazaalHead.c b/src/enemy/mazaalHead.c
index 04b80eff..a4b000e8 100644
--- a/src/enemy/mazaalHead.c
+++ b/src/enemy/mazaalHead.c
@@ -816,7 +816,7 @@ void sub_08034BC8(Entity* this) {
}
void sub_08034C00(Entity* this) {
- if (((gPlayerState.flags.all & 0x80) != 0) &&
+ if (((gPlayerState.flags & 0x80) != 0) &&
CheckPlayerInRegion(this->x.HALF.HI - gRoomControls.roomOriginX,
this->y.HALF.HI - gRoomControls.roomOriginY + 0xd, 3, 3) != 0) {
if (gScreenTransition.field_0x39 >= 0x3d) {
diff --git a/src/enemy/miniFireballGuy.c b/src/enemy/miniFireballGuy.c
index 3210aeeb..930ed8f0 100644
--- a/src/enemy/miniFireballGuy.c
+++ b/src/enemy/miniFireballGuy.c
@@ -53,7 +53,7 @@ void sub_08045654(Entity* this) {
void sub_08045678(Entity* this) {
- this->field_0x20 = 0x1c000;
+ this->hVelocity = 0x1c000;
if (this->actionDelay != 0) {
this->actionDelay--;
} else {
diff --git a/src/enemy/moldworm.c b/src/enemy/moldworm.c
index 8f805aaf..88ad48bf 100644
--- a/src/enemy/moldworm.c
+++ b/src/enemy/moldworm.c
@@ -84,11 +84,11 @@ void sub_080230E4(Entity* this) {
CopyPosition(this, &gPlayerEntity);
gPlayerEntity.flags = gPlayerEntity.flags | 0x80;
gPlayerEntity.spriteSettings.b.draw = 1;
- gPlayerEntity.field_0x20 = 0x18000;
+ gPlayerEntity.hVelocity = 0x18000;
gPlayerEntity.direction = 0xff;
gPlayerEntity.iframes = -0x14;
gPlayerState.jumpStatus = 0x41;
- gPlayerState.flags.all &= 0xfff7ffff;
+ gPlayerState.flags &= 0xfff7ffff;
}
sub_0804AA30(this, gUnk_080CBC38);
@@ -266,7 +266,7 @@ void sub_0802351C(Entity* this) {
if (this->field_0x7c.BYTES.byte3 == 0) {
if (this->type2 == 0) {
gPlayerEntity.animationState = this->animationState & 7;
- gPlayerState.flags.all |= 0x80000;
+ gPlayerState.flags |= 0x80000;
PositionRelative(this, &gPlayerEntity, 0, gUnk_080CBC90[this->animationState & 7] << 0x10);
gPlayerEntity.spriteOffsetY = -gUnk_080CBC90[this->animationState & 7];
}
@@ -401,7 +401,7 @@ void sub_08023894(Entity* this) {
this->parent->field_0x7c.BYTES.byte3 = 1;
InitializeAnimation(this, this->animationState);
if (this->parent->type2 == 0) {
- gPlayerState.flags.all |= 0x200000;
+ gPlayerState.flags |= 0x200000;
gPlayerEntity.x.HALF.HI = this->x.HALF.HI;
gPlayerEntity.y.HALF.HI = this->y.HALF.HI;
gPlayerEntity.direction = DirectionRoundUp(GetFacingDirection(*(Entity**)&this->field_0x74, this));
diff --git a/src/enemy/peahat.c b/src/enemy/peahat.c
index 597ab1da..9a96a72d 100644
--- a/src/enemy/peahat.c
+++ b/src/enemy/peahat.c
@@ -260,7 +260,7 @@ void Peahat_RepairPropeller(Entity* this) {
return;
this->action = 9;
- this->field_0x20 = 0x18000;
+ this->hVelocity = 0x18000;
this->direction = Random() & 0x1f;
sub_0804AA1C(this);
this->animationState = PeahatAnimation_RepairPropeller;
@@ -286,7 +286,7 @@ void Peahat_Hop(Entity* this) {
if (--this->actionDelay == 0) {
if (this->frames.all & 0x80) {
this->action = 9;
- this->field_0x20 = 0x18000;
+ this->hVelocity = 0x18000;
this->animationState = PeahatAnimation_NewPropeller;
InitializeAnimation(this, this->animationState);
} else {
diff --git a/src/enemy/pesto.c b/src/enemy/pesto.c
index 698edc94..b8247e34 100644
--- a/src/enemy/pesto.c
+++ b/src/enemy/pesto.c
@@ -395,7 +395,7 @@ void sub_080244E8(Entity* this) {
sub_080249DC(this);
this->cutsceneBeh.HALF.HI = gPlayerEntity.spritePriority.b1;
gPlayerEntity.flags &= 0x7f;
- gPlayerState.flags.all |= 0x100;
+ gPlayerState.flags |= 0x100;
gPlayerState.field_0xa |= 0x80;
if (gPlayerState.swimState != 0) {
gPlayerState.swimState = 0;
@@ -809,7 +809,7 @@ NONMATCH("asm/non_matching/pesto/sub_08024E4C.inc", void sub_08024E4C(Entity* th
Entity* player = &gPlayerEntity;
ResetPlayer();
- gPlayerState.flags.all |= 0x100;
+ gPlayerState.flags |= 0x100;
gPlayerState.field_0xa |= 0x80;
gPlayerState.playerAction = 0xe;
gPlayerState.field_0x38 = 0x14;
@@ -832,7 +832,7 @@ END_NONMATCH
void sub_08024F50(Entity* this) {
gPlayerState.field_0xa = 0;
- gPlayerState.flags.all &= 0xfffffeff;
+ gPlayerState.flags &= 0xfffffeff;
CopyPosition(this, &gPlayerEntity);
gPlayerEntity.action = 1;
gPlayerEntity.flags |= 0x80;
diff --git a/src/enemy/puffstool.c b/src/enemy/puffstool.c
index b7139173..4225a61f 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->field_0x20) {
- this->field_0x20 = 0;
+ if (0 < this->hVelocity) {
+ this->hVelocity = 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->field_0x20 = 0x18000;
+ this->hVelocity = 0x18000;
InitializeAnimation(this, 1);
}
}
@@ -213,7 +213,7 @@ void sub_0802538C(Entity* this) {
GetNextFrame(this);
} else {
sub_08003FC4(this, 0x2000);
- if (this->field_0x20 < 0x2000) {
+ if (this->hVelocity < 0x2000) {
this->action = 4;
InitializeAnimation(this, 2);
}
@@ -242,7 +242,7 @@ void sub_0802541C(Entity* this) {
if (this->frames.all & 0x80) {
this->action = 3;
this->field_0xf = 1;
- this->field_0x20 = 0x20000;
+ this->hVelocity = 0x20000;
InitializeAnimation(this, 1);
}
}
diff --git a/src/enemy/rollobite.c b/src/enemy/rollobite.c
index d8774285..cafa618d 100644
--- a/src/enemy/rollobite.c
+++ b/src/enemy/rollobite.c
@@ -32,7 +32,7 @@ void Rollobite_OnTick(Entity* this) {
void sub_08020668(Entity* this) {
if (this->damageType == 34 && this->currentHealth != 0xff) {
this->action = 4;
- this->field_0x20 = 0x20000;
+ this->hVelocity = 0x20000;
this->direction = 0xff;
this->currentHealth = 0xff;
this->damageType = 35;
@@ -102,7 +102,7 @@ void sub_080207A8(Entity* this) {
this->spritePriority.b0 = 4;
this->field_0x3a &= 0xfb;
this->direction ^= 0x10;
- this->field_0x20 = 0x18000;
+ this->hVelocity = 0x18000;
this->speed = 0x80;
InitializeAnimation(this, this->animationState + 0x10);
}
@@ -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->field_0x20 = 0x20000;
+ this->hVelocity = 0x20000;
InitializeAnimation(this, this->animationState + 0x14);
SetTile(0x4034, tile, this->collisionLayer);
return TRUE;
diff --git a/src/enemy/rupeeLike.c b/src/enemy/rupeeLike.c
index 0f29065a..fd72c272 100644
--- a/src/enemy/rupeeLike.c
+++ b/src/enemy/rupeeLike.c
@@ -231,9 +231,9 @@ void sub_080296C8(Entity* this) {
void sub_080296D8(Entity* this) {
gPlayerState.jumpStatus = 0x41;
- gPlayerState.flags.all &= 0xffffffef;
+ gPlayerState.flags &= 0xffffffef;
gPlayerEntity.flags |= 0x80;
- gPlayerEntity.field_0x20 = 0x18000;
+ gPlayerEntity.hVelocity = 0x18000;
gPlayerEntity.iframes = 0xa6;
gPlayerEntity.height.HALF.HI = -2;
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
diff --git a/src/enemy/spikedBeetle.c b/src/enemy/spikedBeetle.c
index 4c458a14..4884f873 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->field_0x20 = 0x18000;
+ this->hVelocity = 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->field_0x20 = 0x10000;
+ this->hVelocity = 0x10000;
this->speed = 0x60;
this->damageType = 99;
InitializeAnimation(this, this->animationState);
diff --git a/src/enemy/spinyChuchu.c b/src/enemy/spinyChuchu.c
index bd0ca141..5f928636 100644
--- a/src/enemy/spinyChuchu.c
+++ b/src/enemy/spinyChuchu.c
@@ -159,7 +159,7 @@ void sub_080226EC(Entity* this) {
if (sub_080228F0(this)) {
this->action = 6;
- this->field_0x20 = 0x12000;
+ this->hVelocity = 0x12000;
this->speed = 0x140;
this->direction = GetFacingDirection(this, gUnk_020000B0);
this->damageType = 0x5a;
diff --git a/src/enemy/tektite.c b/src/enemy/tektite.c
index ab5da752..0a2367bd 100644
--- a/src/enemy/tektite.c
+++ b/src/enemy/tektite.c
@@ -39,9 +39,9 @@ void sub_0802F150(Entity* this) {
this->field_0xf = 0;
*(u8*)&this->field_0x7c = 0;
if (this->height.HALF.HI != 0) {
- this->field_0x20 >>= 2;
+ this->hVelocity >>= 2;
} else {
- this->field_0x20 = 0;
+ this->hVelocity = 0;
}
InitializeAnimation(this, 0);
break;
@@ -95,7 +95,7 @@ void sub_0802F284(Entity* this) {
this->action = 2;
this->actionDelay = 0x10;
this->field_0xf = this->type;
- this->field_0x20 = this->field_0x82.HWORD << 4;
+ this->hVelocity = this->field_0x82.HWORD << 4;
sub_0802F45C(this);
InitializeAnimation(this, 2);
}
@@ -166,7 +166,7 @@ void sub_0802F3F4(Entity* this) {
this->action = 2;
this->actionDelay = 0x10;
this->field_0xf = this->type;
- this->field_0x20 = this->field_0x82.HWORD << 4;
+ this->hVelocity = 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 2567c463..f5b7103a 100644
--- a/src/enemy/tektiteGolden.c
+++ b/src/enemy/tektiteGolden.c
@@ -33,9 +33,9 @@ void sub_08037F00(Entity* this) {
this->field_0xf = 0;
this->field_0x80.HALF.LO = 0;
if (this->height.HALF.HI != 0) {
- this->field_0x20 >>= 2;
+ this->hVelocity >>= 2;
} else {
- this->field_0x20 = 0;
+ this->hVelocity = 0;
}
InitializeAnimation(this, 0);
@@ -86,7 +86,7 @@ void sub_08037Fe0(Entity* this) {
this->action = 2;
this->actionDelay = 6;
this->field_0xf = 0;
- this->field_0x20 = 0x38000;
+ this->hVelocity = 0x38000;
sub_08038168(this);
InitializeAnimation(this, 2);
}
@@ -142,7 +142,7 @@ void sub_08038110(Entity* this) {
if (this->field_0x80.HALF.LO < 5) {
this->action = 2;
this->actionDelay = 8;
- this->field_0x20 = 0x38000;
+ this->hVelocity = 0x38000;
sub_08038168(this);
InitializeAnimation(this, 2);
} else {
diff --git a/src/enemy/vaatiArm.c b/src/enemy/vaatiArm.c
index c4d7037b..98e5298a 100644
--- a/src/enemy/vaatiArm.c
+++ b/src/enemy/vaatiArm.c
@@ -952,7 +952,7 @@ NONMATCH("asm/non_matching/vaati/sub_08043490.inc", void sub_08043490(Entity* th
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
if (entity->height.HALF.HI < -4) {
- entity->field_0x20 = 0x18000;
+ entity->hVelocity = 0x18000;
this->subAction = 2;
this->field_0x7c.BYTES.byte2 = 0;
((VaatiArm_HeapStruct*)this->myHeap)->parent->subAction = 2;
@@ -979,7 +979,7 @@ void sub_08043520(Entity* this) {
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
sub_08003FC4(entity, 0x1a00);
- if ((entity->field_0x20 < 0) && (-6 < entity->height.HALF.HI)) {
+ if ((entity->hVelocity < 0) && (-6 < entity->height.HALF.HI)) {
entity->height.HALF.HI = -6;
this->subAction = 3;
this->field_0x7a.HWORD = 900;
@@ -1352,7 +1352,7 @@ void sub_08043DB0(Entity* this) {
Entity* pEVar3;
Entity* pEVar4;
- if (((gPlayerState.flags.all & 0x80) != 0)) {
+ if (((gPlayerState.flags & 0x80) != 0)) {
pEVar3 = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3];
if (CheckPlayerInRegion(pEVar3->x.HALF.HI - gRoomControls.roomOriginX,
pEVar3->y.HALF.HI - gRoomControls.roomOriginY + 2, 3, 3)) {
diff --git a/src/enemy/vaatiProjectile.c b/src/enemy/vaatiProjectile.c
index 1d77249e..a74de388 100644
--- a/src/enemy/vaatiProjectile.c
+++ b/src/enemy/vaatiProjectile.c
@@ -74,7 +74,7 @@ void VaatiProjectileFunction1(Entity* this) {
entity->flags = entity->flags & 0x7f;
}
} else {
- gPlayerState.flags.all &= 0xfffffeff; // using b.unk8 does not match
+ gPlayerState.flags &= 0xfffffeff; // using b.unk8 does not match
entity = &gPlayerEntity;
entity->flags = gPlayerEntity.flags | 0x80;
}
diff --git a/src/enemy/vaatiTransfigured.c b/src/enemy/vaatiTransfigured.c
index 94d7935a..757d6544 100644
--- a/src/enemy/vaatiTransfigured.c
+++ b/src/enemy/vaatiTransfigured.c
@@ -313,7 +313,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
if (this->actionDelay != 0) {
if (--this->actionDelay == 0) {
this->flags &= 0x7f;
- this->field_0x20 = 0x38000;
+ this->hVelocity = 0x38000;
this->field_0xf = 0x10;
}
break;
@@ -379,7 +379,7 @@ void VaatiTransfiguredType0Action4(Entity* this) {
this->field_0x74.HALF.LO = 0;
this->actionDelay = 0x80;
this->field_0xf = 0;
- this->field_0x20 = 0x24000;
+ this->hVelocity = 0x24000;
SoundReq(SFX_12B);
}
break;
@@ -1061,7 +1061,7 @@ void sub_080409B0(Entity* this) {
this->field_0x80.HALF.HI = 3;
this->flags &= 0x7f;
this->damageType = 0x36;
- this->field_0x20 = 0x18000;
+ this->hVelocity = 0x18000;
SoundReq(SFX_164);
}
}
diff --git a/src/enemy/vaatiTransfiguredEye.c b/src/enemy/vaatiTransfiguredEye.c
index ab0bd34a..a4cf8999 100644
--- a/src/enemy/vaatiTransfiguredEye.c
+++ b/src/enemy/vaatiTransfiguredEye.c
@@ -93,8 +93,8 @@ void VaatiTransfiguredEyeFunction0Action0(Entity* this) {
Entity* child;
u8 bVar2;
- bVar2 = gTextBox.doTextBox & 0x7f;
- if ((gTextBox.doTextBox & 0x7f) == 0) {
+ bVar2 = gMessage.doTextBox & 0x7f;
+ if ((gMessage.doTextBox & 0x7f) == 0) {
this->action = 1;
this->spriteSettings.b.draw = 0;
this->field_0x80.HALF.LO = bVar2;
diff --git a/src/enemy/vaatiWrath.c b/src/enemy/vaatiWrath.c
index 9e319d8c..310827cf 100644
--- a/src/enemy/vaatiWrath.c
+++ b/src/enemy/vaatiWrath.c
@@ -456,7 +456,7 @@ void VaatiWrathType0ActionA(Entity* this) {
this->subAction = 0;
this->direction = 0;
this->speed = 0x100;
- this->field_0x20 = 0x12000;
+ this->hVelocity = 0x12000;
sub_0801D2B4(this, 0x16b);
InitAnimationForceUpdate(this, 5);
type1 = ((VaatiWrathHeapStruct*)this->myHeap)->type1;
@@ -626,7 +626,7 @@ void sub_08041CD0(Entity* this) {
} else {
this->subAction = 2;
this->actionDelay = 0x3c;
- TextboxNoOverlapFollow(0x1651);
+ MessageFromTarget(0x1651);
}
} else {
UpdateAnimationSingleFrame(this);
@@ -637,7 +637,7 @@ void sub_08041D14(Entity* this) {
Entity* pEVar1;
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2);
- if ((gTextBox.doTextBox & 0x7f) == 0) {
+ if ((gMessage.doTextBox & 0x7f) == 0) {
if (this->actionDelay != 0) {
this->actionDelay--;
} else {
diff --git a/src/enemy/wallMaster2.c b/src/enemy/wallMaster2.c
index a0c79d74..26074c7d 100644
--- a/src/enemy/wallMaster2.c
+++ b/src/enemy/wallMaster2.c
@@ -118,7 +118,7 @@ void sub_0802CE68(Entity* this) {
gPlayerState.field_0xa |= 0x80;
gPlayerState.field_0x1a[0] |= 0x80;
- gPlayerState.flags.all |= 0x100;
+ gPlayerState.flags |= 0x100;
if (!sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 4)) {
this->direction = GetFacingDirection(this, &gPlayerEntity);
sub_0806F69C(this);
diff --git a/src/enemy/waterDrop.c b/src/enemy/waterDrop.c
index e469cd03..73fc59eb 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->field_0x20 = -0x30000;
+ this->hVelocity = -0x30000;
this->speed = gUnk_080CD03C[Random() & 3];
this->direction = gUnk_080CD040[Random() & 3] + 0x18;
this->collisionLayer = 2;
diff --git a/src/enemy/wisp.c b/src/enemy/wisp.c
index 213665c3..05fdc4e0 100644
--- a/src/enemy/wisp.c
+++ b/src/enemy/wisp.c
@@ -37,7 +37,7 @@ void sub_08033564(Entity* this) {
this->spriteSettings.b.draw = FALSE;
this->flags &= 0x7f;
this->field_0x7c.HALF.LO = 0x27c;
- gPlayerState.flags.all |= 0x4000;
+ gPlayerState.flags |= 0x4000;
gSave.stats.effect = this->type + 1;
gSave.stats.effectTimer = 600;
if (this->type == 0) {