summaryrefslogtreecommitdiff
path: root/src/object
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/object
parent9ef31544e24c8b0a43b0d712eb77e9210d2641d3 (diff)
entity changes, textbox changes
Diffstat (limited to 'src/object')
-rw-r--r--src/object/bird.c6
-rw-r--r--src/object/book.c6
-rw-r--r--src/object/button.c4
-rw-r--r--src/object/fileScreenObjects.c2
-rw-r--r--src/object/heartContainer.c2
-rw-r--r--src/object/itemOnGround.c12
-rw-r--r--src/object/jarPortal.c12
-rw-r--r--src/object/lilypadSmall.c2
-rw-r--r--src/object/mask.c2
-rw-r--r--src/object/minecart.c22
-rw-r--r--src/object/minishSizedEntrance.c4
-rw-r--r--src/object/object1A.c2
-rw-r--r--src/object/object1C.c2
-rw-r--r--src/object/object86.c2
-rw-r--r--src/object/objectA2.c2
-rw-r--r--src/object/pot.c8
-rw-r--r--src/object/swordsmanNewsletter.c2
-rw-r--r--src/object/warpPoint.c2
18 files changed, 47 insertions, 47 deletions
diff --git a/src/object/bird.c b/src/object/bird.c
index 0dad159f..758a3564 100644
--- a/src/object/bird.c
+++ b/src/object/bird.c
@@ -29,7 +29,7 @@ void sub_0809CF54(Entity* this) {
this->spriteSettings.b.draw = TRUE;
this->actionDelay = 0x31;
this->field_0xf = 1;
- this->field_0x20 = -0x18000;
+ this->hVelocity = -0x18000;
this->height.WORD = -0x38C000;
this->field_0x68.HWORD = -0x800;
this->speed = 0x280;
@@ -85,7 +85,7 @@ void sub_0809D084(Entity* this) {
PositionRelative(this->parent, this, 0, 0x80000);
} else {
this->subAction++;
- this->field_0x20 = temp;
+ this->hVelocity = temp;
}
}
}
@@ -119,7 +119,7 @@ void sub_0809D10C(Entity* this) {
}
void sub_0809D130(Entity* this) {
- if ((gPlayerState.flags.all & 0x80) != 0) {
+ if ((gPlayerState.flags & 0x80) != 0) {
sub_0800445C(this);
} else if (sub_08017850(this) != 0) {
CreateItemEntity(0x17, 0, 0);
diff --git a/src/object/book.c b/src/object/book.c
index 356b85d9..3c60630c 100644
--- a/src/object/book.c
+++ b/src/object/book.c
@@ -97,7 +97,7 @@ void sub_0809B4A8(Entity* this) {
gPlayerState.pushedObject = 0x9e;
gPlayerState.playerAction = 5;
- gPlayerState.flags.all |= 1;
+ gPlayerState.flags |= 1;
gPlayerEntity.x.HALF.LO = 0;
gPlayerEntity.y.HALF.LO = 0;
@@ -143,7 +143,7 @@ void sub_0809B56C(Entity* this) {
}
void sub_0809B5B4(Entity* this) {
- if (gPlayerState.flags.all & 0x80) {
+ if (gPlayerState.flags & 0x80) {
sub_0800445C(this);
} else if (sub_08017850(this)) {
CreateItemEntity(this->type + 0x39, 0, 0);
@@ -197,7 +197,7 @@ void sub_0809B5EC(Entity* this) {
break;
}
case 1: {
- u8 doTextBox = gTextBox.doTextBox & 0x7f;
+ u8 doTextBox = gMessage.doTextBox & 0x7f;
if (!doTextBox) {
this->spriteSettings.b.draw = 1;
this->subAction = doTextBox;
diff --git a/src/object/button.c b/src/object/button.c
index 52876a45..8bbd7bca 100644
--- a/src/object/button.c
+++ b/src/object/button.c
@@ -153,11 +153,11 @@ Entity* sub_08081D74(Entity* this) {
}
ent = 0;
if (sub_08081E0C(this)) {
- if (!(gPlayerState.flags.all & 0x10) && !(gPlayerState.flags.all & 0x80)) {
+ if (!(gPlayerState.flags & 0x10) && !(gPlayerState.flags & 0x80)) {
ent = &gPlayerEntity;
}
} else {
- if (gPlayerState.flags.all & 0x400000) {
+ if (gPlayerState.flags & 0x400000) {
if (sub_080041A0(this, gUnk_03004040[0], 5, 6)) {
ent = gUnk_03004040[0];
} else if (sub_080041A0(this, gUnk_03004040[1], 5, 6)) {
diff --git a/src/object/fileScreenObjects.c b/src/object/fileScreenObjects.c
index bff3a5d8..5c5e419e 100644
--- a/src/object/fileScreenObjects.c
+++ b/src/object/fileScreenObjects.c
@@ -181,7 +181,7 @@ void sub_0808EA28(Entity* this) {
u32 var1;
if (this->type == 3) {
- if (gUnk_02000000->gameLanguage > LANGUAGE_EN) {
+ if (gSaveHeader->gameLanguage > LANGUAGE_EN) {
this->spriteSettings.b.draw = 2;
} else {
this->spriteSettings.b.draw = 0;
diff --git a/src/object/heartContainer.c b/src/object/heartContainer.c
index 046eb0aa..1821a27b 100644
--- a/src/object/heartContainer.c
+++ b/src/object/heartContainer.c
@@ -59,7 +59,7 @@ static void sub_0808E714(Entity* this) {
static void sub_0808E764(Entity* this) {
sub_08080CB4(this);
- if (!(gPlayerState.flags.all & 0x80) && sub_08017850(this)) {
+ if (!(gPlayerState.flags & 0x80) && sub_08017850(this)) {
SetFlag(this->cutsceneBeh.HWORD);
CreateItemEntity(0x62, 0, 0);
DeleteThisEntity();
diff --git a/src/object/itemOnGround.c b/src/object/itemOnGround.c
index ee77e759..2e4f555a 100644
--- a/src/object/itemOnGround.c
+++ b/src/object/itemOnGround.c
@@ -150,8 +150,8 @@ void sub_080810A8(Entity* this) {
this->direction |= 0xFF;
}
- if (this->field_0x20 == 0) {
- this->field_0x20 = 0x1E000;
+ if (this->hVelocity == 0) {
+ this->hVelocity = 0x1E000;
}
if (this->collisionLayer == 2) {
@@ -218,7 +218,7 @@ void sub_080811EC(Entity* this) {
}
sub_08003FC4(this, 0x2800);
- if (this->field_0x20 <= 0) {
+ if (this->hVelocity <= 0) {
this->action = 2;
this->flags |= 0x80;
sub_080814A4(this);
@@ -273,7 +273,7 @@ void sub_080812E8(Entity* this) {
#ifdef EU
if ((playerState->swimState & 0x80) && sub_080177A0(this, &gPlayerEntity)) {
#else
- if ((playerState->swimState & 0x80) && !(playerState->flags.all & 0x80) && sub_080177A0(this, &gPlayerEntity)) {
+ if ((playerState->swimState & 0x80) && !(playerState->flags & 0x80) && sub_080177A0(this, &gPlayerEntity)) {
#endif
sub_080810FC(this);
}
@@ -413,7 +413,7 @@ void sub_0808153C(Entity* this) {
if (this->field_0x68.HALF.LO == 0) {
if (!sub_08003FC4(this, 0x1000) && !sub_0800442E(this)) {
this->field_0x68.HALF.LO = 1;
- this->field_0x20 = 0x1E000;
+ this->hVelocity = 0x1E000;
sub_0808148C(this->type);
UpdateSpriteForCollisionLayer(this);
}
@@ -433,7 +433,7 @@ void sub_08081598(Entity* this) {
this->flags &= 0x7F;
this->action = 4;
this->actionDelay = 14;
- this->field_0x20 = 0x20000;
+ this->hVelocity = 0x20000;
this->spriteSettings.b.draw = 1;
this->spritePriority.b1 = 2;
this->spritePriority.b0 = 3;
diff --git a/src/object/jarPortal.c b/src/object/jarPortal.c
index 9d85f282..a3f2541d 100644
--- a/src/object/jarPortal.c
+++ b/src/object/jarPortal.c
@@ -63,7 +63,7 @@ void sub_0808BF58(Entity* this) {
sub_08003FC4(this, 0x2000);
switch (this->subAction) {
case 0:
- if (this->field_0x20 <= 98303) {
+ if (this->hVelocity <= 98303) {
++this->subAction;
InitAnimationForceUpdate(this, 2);
}
@@ -72,7 +72,7 @@ void sub_0808BF58(Entity* this) {
UpdateAnimationSingleFrame(this);
if (!this->height.HALF.HI) {
++this->subAction;
- this->field_0x20 = 0x8000;
+ this->hVelocity = 0x8000;
}
break;
case 2:
@@ -111,7 +111,7 @@ void sub_0808C01C(Entity* this, u32 r1) {
type = 2;
gArea.curPortalType = type;
if (r1 == 1) {
- if (((gPlayerState.flags.all & 0x20) != 0) && (gPlayerState.jumpStatus == 0)) {
+ if (((gPlayerState.flags & 0x20) != 0) && (gPlayerState.jumpStatus == 0)) {
gArea.field_0x18 = 2;
} else {
if (sub_08057810() != 0) {
@@ -131,7 +131,7 @@ void sub_0808C0AC(Entity* this) {
sub_08003FC4(this, 0x2000);
switch (this->subAction) {
case 0:
- if (this->field_0x20 <= 98303) {
+ if (this->hVelocity <= 98303) {
this->subAction = 1;
InitAnimationForceUpdate(this, 3);
}
@@ -140,7 +140,7 @@ void sub_0808C0AC(Entity* this) {
UpdateAnimationSingleFrame(this);
if (!this->height.HALF.HI) {
++this->subAction;
- this->field_0x20 = 0x8000;
+ this->hVelocity = 0x8000;
}
break;
case 2:
@@ -160,7 +160,7 @@ u32 sub_0808C128(Entity* this) {
void sub_0808C13C(Entity* this) {
this->subAction = 0;
- this->field_0x20 = 163840;
+ this->hVelocity = 163840;
}
void sub_0808C148(Entity* this, u32 a2) {
diff --git a/src/object/lilypadSmall.c b/src/object/lilypadSmall.c
index ce0d8c08..37f78580 100644
--- a/src/object/lilypadSmall.c
+++ b/src/object/lilypadSmall.c
@@ -32,7 +32,7 @@ void LilypadSmall(Entity* this) {
}
u32 sub_08097ADC(Entity* this) {
- if ((gPlayerState.flags.all & 0x80) == 0) {
+ if ((gPlayerState.flags & 0x80) == 0) {
return 0;
} else if (sub_080041A0(this, &gPlayerEntity, 8, 8) == 0) {
return 0;
diff --git a/src/object/mask.c b/src/object/mask.c
index 05a49fb7..cd94a1b5 100644
--- a/src/object/mask.c
+++ b/src/object/mask.c
@@ -47,7 +47,7 @@ void sub_080929A4(Entity* this) {
}
this->action = 1;
- this->field_0x20 = 0x18000;
+ this->hVelocity = 0x18000;
this->field_0x78.HWORD = ((Random() & 7) << 10) | 0x2000;
diff --git a/src/object/minecart.c b/src/object/minecart.c
index 7578a6b2..01d7d1ac 100644
--- a/src/object/minecart.c
+++ b/src/object/minecart.c
@@ -36,7 +36,7 @@ void sub_080916EC(Entity* this) {
struct_030010EC* unk = &gUnk_030010EC[this->actionDelay];
*(struct_030010EC**)&this->cutsceneBeh.HWORD = unk;
- if ((gRoomControls.roomID != unk->field_0x4) || (gPlayerState.flags.all & 0x1000) != 0) {
+ if ((gRoomControls.roomID != unk->field_0x4) || (gPlayerState.flags & 0x1000) != 0) {
DeleteThisEntity();
}
this->x.HALF.HI = gRoomControls.roomOriginX + ((unk->field_0x0 & 0x3f) << 4) + 8;
@@ -60,13 +60,13 @@ void sub_080916EC(Entity* this) {
void sub_080917DC(Entity* this) {
if ((this->bitfield & 0x7f) == 0x1d) {
- this->field_0x20 = 0x2a000;
+ this->hVelocity = 0x2a000;
this->action = 7;
InitAnimationForceUpdate(this, this->type2 + 4 + this->animationState);
SoundReq(SFX_13B);
} else {
if (sub_0800445C(this) != 0) {
- if (((gPlayerState.flags.all & 0x40080) == 0) && (gPlayerState.field_0x1c == 0) &&
+ if (((gPlayerState.flags & 0x40080) == 0) && (gPlayerState.field_0x1c == 0) &&
(gPlayerState.heldObject == 0) && (gPlayerState.jumpStatus == 0)) {
this->actionDelay++;
} else {
@@ -79,8 +79,8 @@ void sub_080917DC(Entity* this) {
if (8 < this->actionDelay) {
this->action = this->action + 1;
gPlayerState.jumpStatus = 0x81;
- gPlayerState.flags.all |= 0x4000000;
- gPlayerEntity.field_0x20 = 0x20000;
+ gPlayerState.flags |= 0x4000000;
+ gPlayerEntity.hVelocity = 0x20000;
gPlayerEntity.speed = 0x100;
gPlayerEntity.flags &= 0x7f;
ResetPlayer();
@@ -98,11 +98,11 @@ void sub_080918A4(Entity* this) {
gPlayerEntity.x.HALF.HI = this->x.HALF.HI;
gPlayerEntity.y.HALF.HI = this->y.HALF.HI;
if (gPlayerEntity.height.HALF.HI > -0x10) {
- if ((s32)gPlayerEntity.field_0x20 > -1) {
+ if ((s32)gPlayerEntity.hVelocity > -1) {
return;
}
gPlayerEntity.animationState = this->animationState << 1;
- gPlayerState.flags.all = (gPlayerState.flags.all ^ 0x4000000) | 0x1000;
+ gPlayerState.flags = (gPlayerState.flags ^ 0x4000000) | 0x1000;
this->action++;
this->field_0xf = 1;
this->flags |= 0x20;
@@ -118,7 +118,7 @@ void sub_080918A4(Entity* this) {
} else {
gPlayerEntity.direction = GetFacingDirection(&gPlayerEntity, this);
}
- if (gPlayerEntity.field_0x20 < 0) {
+ if (gPlayerEntity.hVelocity < 0) {
gPlayerEntity.spritePriority.b0 = this->spritePriority.b0 - 1;
}
}
@@ -128,7 +128,7 @@ void sub_080919AC(Entity* this) {
u32 uVar3;
gRoomControls.unk5 = 7;
- if ((gPlayerState.flags.all & 0x1000) == 0) {
+ if ((gPlayerState.flags & 0x1000) == 0) {
this->action = 1;
return;
}
@@ -174,8 +174,8 @@ void sub_080919AC(Entity* this) {
this->action = 6;
sub_08017744(this);
gPlayerState.jumpStatus = 0x41;
- gPlayerState.flags.all = (gPlayerState.flags.all ^ 0x1000) | 0x4000000;
- gPlayerEntity.field_0x20 = 0x20000;
+ gPlayerState.flags = (gPlayerState.flags ^ 0x1000) | 0x4000000;
+ gPlayerEntity.hVelocity = 0x20000;
gPlayerEntity.speed = 0x200;
gPlayerEntity.animationState = this->animationState << 1;
gPlayerEntity.direction = this->direction;
diff --git a/src/object/minishSizedEntrance.c b/src/object/minishSizedEntrance.c
index ce5ab316..ddd776ae 100644
--- a/src/object/minishSizedEntrance.c
+++ b/src/object/minishSizedEntrance.c
@@ -27,11 +27,11 @@ void sub_08090F00(Entity* this) {
if (this->type == 1) {
Entity* parent = this->parent;
u32 mask = 1 << this->field_0xf;
- if (!(parent->field_0x20 & mask)) {
+ if (!(parent->hVelocity & mask)) {
DeleteThisEntity();
}
}
- if ((gPlayerState.flags.all & 0x80) && sub_080041A0(this, &gPlayerEntity, 4, 4) &&
+ if ((gPlayerState.flags & 0x80) && sub_080041A0(this, &gPlayerEntity, 4, 4) &&
(gPlayerEntity.height.HALF.HI == 0) && (((u16)gPlayerState.field_0x90.HALF.LO) & gUnk_0812225C[this->type2])) {
DoExitTransition(GetCurrentRoomProperty(this->actionDelay));
}
diff --git a/src/object/object1A.c b/src/object/object1A.c
index ad3b1389..494ba821 100644
--- a/src/object/object1A.c
+++ b/src/object/object1A.c
@@ -54,7 +54,7 @@ void sub_08086A6C(Entity* ent) {
u32 uVar1;
uVar1 = Random();
- ent->field_0x20 = 163840;
+ ent->hVelocity = 163840;
ent->direction = (uVar1 >> 16) & 31;
ent->speed = uVar1 & 480;
}
diff --git a/src/object/object1C.c b/src/object/object1C.c
index 3ca965c6..3bd9af76 100644
--- a/src/object/object1C.c
+++ b/src/object/object1C.c
@@ -13,7 +13,7 @@ void Object1C(Entity* this) {
this->action = 1;
}
if (CheckRectOnScreen(this->field_0x80.HWORD, this->field_0x82.HWORD, 0x10, 0x10) == 0) {
- this->parent->field_0x20 &= ~(1 << this->type2);
+ this->parent->hVelocity &= ~(1 << this->type2);
DeleteThisEntity();
}
}
diff --git a/src/object/object86.c b/src/object/object86.c
index 02e0b480..717e3ad0 100644
--- a/src/object/object86.c
+++ b/src/object/object86.c
@@ -75,5 +75,5 @@ void sub_08099ECC(Entity* this) {
CopyPosition(this, &gPlayerEntity);
gPlayerState.playerAction = 3;
gPlayerState.field_0x34[4] = 0;
- gPlayerState.flags.all |= 0x8000;
+ gPlayerState.flags |= 0x8000;
}
diff --git a/src/object/objectA2.c b/src/object/objectA2.c
index 73cb101f..a2092bb7 100644
--- a/src/object/objectA2.c
+++ b/src/object/objectA2.c
@@ -46,7 +46,7 @@ void sub_0809F318(Entity* this) {
void sub_0809F374(Entity* this) {
sub_0806F69C(this);
#ifndef EU
- if (gUnk_02000000->gameLanguage < 2) {
+ if (gSaveHeader->gameLanguage < 2) {
if (sub_080044EC(this, 0x2000) < 2) {
this->height.WORD = 0;
this->action = 2;
diff --git a/src/object/pot.c b/src/object/pot.c
index f3423433..79d0a38f 100644
--- a/src/object/pot.c
+++ b/src/object/pot.c
@@ -67,7 +67,7 @@ void sub_08082310(Entity* this) {
case 0x1D:
SetTile((u16)this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
this->action = 5;
- this->field_0x20 = 0x2A000;
+ this->hVelocity = 0x2A000;
this->spriteOffsetY = 0;
this->spriteSettings.b.shadow = 1;
this->spritePriority.b1 = 3;
@@ -85,7 +85,7 @@ void sub_08082310(Entity* this) {
this->direction = (tileType - 0x4001) * 8;
this->actionDelay = 32;
this->action = 4;
- if (gPlayerState.flags.all & 0x80) {
+ if (gPlayerState.flags & 0x80) {
this->speed >>= 1;
this->actionDelay = 64;
}
@@ -184,7 +184,7 @@ void sub_08082614(Entity* this) {
}
this->action = 1;
- if (gPlayerState.flags.all & 0x80) {
+ if (gPlayerState.flags & 0x80) {
this->speed <<= 1;
}
@@ -251,7 +251,7 @@ void sub_08082818(Entity* this) {
}
void sub_08082824(Entity* this) {
- if (this->field_0x20 < 0) {
+ if (this->hVelocity < 0) {
this->spriteSettings.b.flipY = 1;
}
diff --git a/src/object/swordsmanNewsletter.c b/src/object/swordsmanNewsletter.c
index e74d2ee1..1cca2ba0 100644
--- a/src/object/swordsmanNewsletter.c
+++ b/src/object/swordsmanNewsletter.c
@@ -24,6 +24,6 @@ void sub_080933D8(Entity* this) {
void sub_080933FC(Entity* this) {
if (this->interactType != 0) {
this->interactType = 0;
- TextboxNoOverlap(gUnk_081228B8[this->type], this);
+ MessageNoOverlap(gUnk_081228B8[this->type], this);
}
}
diff --git a/src/object/warpPoint.c b/src/object/warpPoint.c
index 287a2e70..69ed1fdc 100644
--- a/src/object/warpPoint.c
+++ b/src/object/warpPoint.c
@@ -206,7 +206,7 @@ void sub_0808B73C(Entity* this) {
}
u32 sub_0808B7C8(Entity* this) {
- if (!(gPlayerState.flags.all & 0x80) && gPlayerState.field_0xa8 != 0x12 && gPlayerEntity.currentHealth != 0 &&
+ if (!(gPlayerState.flags & 0x80) && gPlayerState.field_0xa8 != 0x12 && gPlayerEntity.currentHealth != 0 &&
sub_08079F8C() && sub_080041A0(this, &gPlayerEntity, 5, 5) && gPlayerEntity.height.HALF.HI == 0) {
if (this->actionDelay == 0 && gPlayerEntity.action == 0x1b) {
sub_080791D0();