summaryrefslogtreecommitdiff
path: root/src/object
diff options
context:
space:
mode:
authortheo3 <arisstephenson2@gmail.com>2021-03-13 01:14:46 -0800
committertheo3 <arisstephenson2@gmail.com>2021-03-13 01:14:46 -0800
commite251d79ffd4ee1c4b10def3ecb41f2d572c63664 (patch)
tree29d22198d60bc4f770ae6eb78d72b2726208d34d /src/object
parentebf2ede70dad51331a0233baed8cbed42a9c13a4 (diff)
quick fix 🙂
Diffstat (limited to 'src/object')
-rw-r--r--src/object/backgroundCloud.c2
-rw-r--r--src/object/bird.c2
-rw-r--r--src/object/cloud.c2
-rw-r--r--src/object/fileScreenObjects.c4
-rw-r--r--src/object/greatFairy.c14
-rw-r--r--src/object/itemOnGround.c6
-rw-r--r--src/object/metalDoor.c2
-rw-r--r--src/object/minecart.c8
-rw-r--r--src/object/object1A.c2
-rw-r--r--src/object/objectA2.c2
-rw-r--r--src/object/objectB2.c4
-rw-r--r--src/object/pot.c6
-rw-r--r--src/object/smoke.c2
13 files changed, 28 insertions, 28 deletions
diff --git a/src/object/backgroundCloud.c b/src/object/backgroundCloud.c
index ceebf3d7..df2625a3 100644
--- a/src/object/backgroundCloud.c
+++ b/src/object/backgroundCloud.c
@@ -18,7 +18,7 @@ void sub_0808F658(Entity* this) {
this->spritePriority.b0 = this->type;
this->frameIndex = this->type;
this->direction = 8;
- this->nonPlanarMovement = gUnk_08121EB0[this->type];
+ this->speed = gUnk_08121EB0[this->type];
this->field_0x78.HWORD = gRoomControls.roomOriginX - 0x60;
this->field_0x7a.HWORD = gRoomControls.roomOriginX + gRoomControls.width + 0x60;
this->animationState = 0;
diff --git a/src/object/bird.c b/src/object/bird.c
index 2b6f194b..6d126380 100644
--- a/src/object/bird.c
+++ b/src/object/bird.c
@@ -28,7 +28,7 @@ void sub_0809CF54(Entity* this) {
this->field_0x20 = -0x18000;
this->height.WORD = -0x38C000;
this->field_0x68.HWORD = -0x800;
- this->nonPlanarMovement = 0x280;
+ this->speed = 0x280;
this->direction = 8;
this->collisionLayer = 2;
this->x.HALF.HI = gRoomControls.roomScrollX;
diff --git a/src/object/cloud.c b/src/object/cloud.c
index a2637b6b..6f10295a 100644
--- a/src/object/cloud.c
+++ b/src/object/cloud.c
@@ -180,7 +180,7 @@ void sub_0809F7BC(Entity* this) {
cloud = sub_0809F770(this);
if (cloud != NULL) {
uVar1 = Random();
- cloud->nonPlanarMovement = gUnk_081247C8[uVar1 & 3];
+ cloud->speed = gUnk_081247C8[uVar1 & 3];
cloud->direction = (u8)(uVar1 >> 8) & 31;
}
}
diff --git a/src/object/fileScreenObjects.c b/src/object/fileScreenObjects.c
index 51403761..2b4914e1 100644
--- a/src/object/fileScreenObjects.c
+++ b/src/object/fileScreenObjects.c
@@ -506,7 +506,7 @@ static u32 sub_0808EF6C(Entity* this) {
if (this->field_0x6c.HWORD < var7) {
var7 = this->field_0x6c.HWORD;
}
- this->nonPlanarMovement = var7;
+ this->speed = var7;
this->direction = sub_080045DA(var0, var2) >> 3;
sub_0806F69C(this);
return 1;
@@ -517,7 +517,7 @@ static void sub_0808EFF0(Entity* this) {
u8 var1;
this->spriteSettings.b.draw = 2;
- this->nonPlanarMovement = 0x400;
+ this->speed = 0x400;
this->currentHealth = 1;
this->frameIndex = 0xFF;
this->animIndex = 0xFF;
diff --git a/src/object/greatFairy.c b/src/object/greatFairy.c
index 0ab2d710..3d511b25 100644
--- a/src/object/greatFairy.c
+++ b/src/object/greatFairy.c
@@ -159,21 +159,21 @@ void GreatFairy_WingsInit(Entity* this) {
this->spriteRendering.alphaBlend = 1;
gScreen.controls.layerFXControl = 0xF40;
gScreen.controls.alphaBlend = BLDALPHA_BLEND(9, 8);
- this->nonPlanarMovement = 1024;
+ this->speed = 1024;
sub_0805EC9C(this, 1024, 256, 0);
}
void GreatFairy_WingsUpdate(Entity* this) {
s32 iVar1;
- iVar1 = this->nonPlanarMovement -= 32;
+ iVar1 = this->speed -= 32;
if (iVar1 * 65536 >> 16 == 256) {
this->action = 2;
sub_0805EC60(this);
gRoomVars.greatFairyState |= 32;
gActiveScriptInfo.unk_00 |= 4;
} else {
- sub_0805EC9C(this, this->nonPlanarMovement, 256, 0);
+ sub_0805EC9C(this, this->speed, 256, 0);
}
}
@@ -260,7 +260,7 @@ void GreatFairy_MiniAffineInit2(Entity* this) {
if (this->height.HALF.HI == -20) {
this->action = 2;
this->actionDelay = 90;
- this->nonPlanarMovement = 4096;
+ this->speed = 4096;
this->spriteRendering.b0 = 3;
sub_0805EC9C(this, 256, 256, 0);
}
@@ -275,7 +275,7 @@ void GreatFairy_MiniAffineUpdate(Entity* this) {
this->action = 3;
sub_0805EC60(this);
} else {
- iVar2 = this->nonPlanarMovement -= 24;
+ iVar2 = this->speed -= 24;
sub_0805EC9C(this, 256, iVar2 * 0x10000 >> 20, 0);
}
}
@@ -386,7 +386,7 @@ void sub_08087150(Entity* this) {
this->spriteOrientation.flipY = 0;
this->spriteRendering.b0 = 0;
this->spritePriority.b0 = 3;
- this->nonPlanarMovement = 0x80;
+ this->speed = 0x80;
this->direction = 0x10;
temp = gUnk_0812079C;
this->palette.raw = ((temp & 0xf) << 4) | 0xf;
@@ -463,7 +463,7 @@ void sub_080872AC(Entity* this) {
this->field_0x68.HWORD = this->x.HALF.HI;
this->field_0x6a.HWORD = this->y.HALF.HI;
this->direction = (u8)Random() & 0x1F;
- this->nonPlanarMovement = 32;
+ this->speed = 32;
GreatFairy_InitializeAnimation(this);
}
diff --git a/src/object/itemOnGround.c b/src/object/itemOnGround.c
index 409c1d04..b794b546 100644
--- a/src/object/itemOnGround.c
+++ b/src/object/itemOnGround.c
@@ -141,8 +141,8 @@ static void sub_080810A8(Entity* this) {
sub_080814A4(this);
if (this->direction & 0x80) {
this->direction &= 0x1F;
- if (this->nonPlanarMovement == 0) {
- this->nonPlanarMovement = 0x100;
+ if (this->speed == 0) {
+ this->speed = 0x100;
}
} else {
this->direction |= 0xFF;
@@ -259,7 +259,7 @@ void sub_080812A0(Entity* this) {
void sub_080812A8(Entity* this) {
if (sub_080002D0(this) != 0xF && this->field_0x6e.HWORD != GetTileTypeByEntity(this)) {
this->direction = 0;
- this->nonPlanarMovement = 0;
+ this->speed = 0;
this->spriteSettings.b.draw = 1;
this->field_0x68.HALF.HI = 0;
sub_080810A8(this);
diff --git a/src/object/metalDoor.c b/src/object/metalDoor.c
index 55c8b261..88ab3308 100644
--- a/src/object/metalDoor.c
+++ b/src/object/metalDoor.c
@@ -25,7 +25,7 @@ void sub_080A0684(Entity* this) {
DeleteThisEntity();
}
this->action = 1;
- this->nonPlanarMovement = 0x300;
+ this->speed = 0x300;
this->spriteSettings.b.draw = 0;
this->frameIndex = 0;
this->spriteSettings.b.flipY = 1;
diff --git a/src/object/minecart.c b/src/object/minecart.c
index 53d1ff82..1e239be3 100644
--- a/src/object/minecart.c
+++ b/src/object/minecart.c
@@ -51,7 +51,7 @@ void sub_080916EC(Entity* this) {
this->field_0x40 = 0x44;
this->flags2 = 0x80;
this->direction = DirectionFromAnimationState(this->animationState);
- this->nonPlanarMovement = 0x700;
+ this->speed = 0x700;
this->spritePriority.b1 = 3;
InitAnimationForceUpdate(this, this->type2 + 4 + this->animationState);
SetTile(0x4022, COORD_TO_TILE(this), this->collisionLayer);
@@ -81,7 +81,7 @@ void sub_080917DC(Entity* this) {
gPlayerState.jumpStatus = 0x81;
gPlayerState.flags.all |= 0x4000000;
gPlayerEntity.field_0x20 = 0x20000;
- gPlayerEntity.nonPlanarMovement = 0x100;
+ gPlayerEntity.speed = 0x100;
gPlayerEntity.flags &= 0x7f;
ResetPlayer();
sub_0807A108();
@@ -143,7 +143,7 @@ void sub_080919AC(Entity* this) {
}
} else {
this->flags = this->flags | 0x80;
- gPlayerEntity.nonPlanarMovement = 0;
+ gPlayerEntity.speed = 0;
sub_0806F69C(this);
CopyPosition(this, &gPlayerEntity);
gPlayerEntity.spritePriority.b0 = this->spritePriority.b0 - 1;
@@ -176,7 +176,7 @@ void sub_080919AC(Entity* this) {
gPlayerState.jumpStatus = 0x41;
gPlayerState.flags.all = (gPlayerState.flags.all ^ 0x1000) | 0x4000000;
gPlayerEntity.field_0x20 = 0x20000;
- gPlayerEntity.nonPlanarMovement = 0x200;
+ gPlayerEntity.speed = 0x200;
gPlayerEntity.animationState = this->animationState << 1;
gPlayerEntity.direction = this->direction;
gPlayerEntity.flags |= 0x80;
diff --git a/src/object/object1A.c b/src/object/object1A.c
index 26ece918..837884a9 100644
--- a/src/object/object1A.c
+++ b/src/object/object1A.c
@@ -54,5 +54,5 @@ void sub_08086A6C(Entity* ent) {
uVar1 = Random();
ent->field_0x20 = 163840;
ent->direction = (uVar1 >> 16) & 31;
- ent->nonPlanarMovement = uVar1 & 480;
+ ent->speed = uVar1 & 480;
}
diff --git a/src/object/objectA2.c b/src/object/objectA2.c
index 01fd9fa6..e79c07f8 100644
--- a/src/object/objectA2.c
+++ b/src/object/objectA2.c
@@ -105,6 +105,6 @@ void sub_0809F448(Entity* this) {
tmp += -0x80000 + (rand & 0xFFFFF);
break;
}
- this->nonPlanarMovement = (tmp > 0 ? tmp : -tmp) / (tmp2->unk_1 << 8);
+ this->speed = (tmp > 0 ? tmp : -tmp) / (tmp2->unk_1 << 8);
this->direction = sub_080045DA(tmp, 0) >> 3;
}
diff --git a/src/object/objectB2.c b/src/object/objectB2.c
index 4722d2e9..c3eff1eb 100644
--- a/src/object/objectB2.c
+++ b/src/object/objectB2.c
@@ -22,12 +22,12 @@ void ObjectB2(Entity* this) {
this->attachedEntity = pEVar3;
InitializeAnimation(this, this->type);
}
- this->nonPlanarMovement = this->parent->nonPlanarMovement;
+ this->speed = this->parent->speed;
sub_0806F69C(this);
if (sub_080AE4CC(this->attachedEntity, this->x.HALF.HI, this->y.HALF.HI, 9) != 0) {
DeleteThisEntity();
}
- if (this->nonPlanarMovement < 0x41) {
+ if (this->speed < 0x41) {
this->spriteSettings.b.draw ^= 1;
if (--this->actionDelay == 0) {
diff --git a/src/object/pot.c b/src/object/pot.c
index cd73f9a8..f28fb9ee 100644
--- a/src/object/pot.c
+++ b/src/object/pot.c
@@ -34,7 +34,7 @@ void sub_0808222C(Entity* this) {
this->action = 1;
this->hitbox = &gUnk_080FD338;
- this->nonPlanarMovement = 0x80;
+ this->speed = 0x80;
this->y.HALF.HI += 3;
this->field_0x16 = 0;
this->flags |= 0x80;
@@ -86,7 +86,7 @@ void sub_08082310(Entity* this) {
this->actionDelay = 32;
this->action = 4;
if (gPlayerState.flags.all & 0x80) {
- this->nonPlanarMovement >>= 1;
+ this->speed >>= 1;
this->actionDelay = 64;
}
SetTile((u16)this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
@@ -185,7 +185,7 @@ void sub_08082614(Entity* this) {
this->action = 1;
if (gPlayerState.flags.all & 0x80) {
- this->nonPlanarMovement <<= 1;
+ this->speed <<= 1;
}
this->field_0x70.HALF.LO = sub_080001DA(COORD_TO_TILE(this), this->collisionLayer);
diff --git a/src/object/smoke.c b/src/object/smoke.c
index 5ec708b9..ade9d2cd 100644
--- a/src/object/smoke.c
+++ b/src/object/smoke.c
@@ -37,7 +37,7 @@ void sub_0808A46C(Entity* this) {
void sub_0808A484(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = TRUE;
- this->nonPlanarMovement = 0x40;
+ this->speed = 0x40;
this->direction = 6;
this->spriteRendering.b3 = 1;
this->spritePriority.b0 = 0;