summaryrefslogtreecommitdiff
path: root/src/object
diff options
context:
space:
mode:
authornotyourav <65437533+notyourav@users.noreply.github.com>2022-03-27 23:13:22 -0700
committerGitHub <noreply@github.com>2022-03-27 23:13:22 -0700
commitea34ee76f41dc31990d60f14173cd77ab1cb0fa6 (patch)
tree3090849e38c6c53250bc40edc2142f3c2b82d852 /src/object
parent190bc2162420c38ba6eda647ff39f029ec2173bb (diff)
parent9df9e77512dd4ee28b62c9226e65b28f6f602ed8 (diff)
Merge pull request #470 from hatal175/actiondelay
Change --x !=/== 0xff comparisons
Diffstat (limited to 'src/object')
-rw-r--r--src/object/minecart.c2
-rw-r--r--src/object/minishEmoticon.c2
-rw-r--r--src/object/object2A.c2
-rw-r--r--src/object/object49.c2
-rw-r--r--src/object/object79.c2
-rw-r--r--src/object/pot.c2
-rw-r--r--src/object/pullableMushroom.c4
7 files changed, 8 insertions, 8 deletions
diff --git a/src/object/minecart.c b/src/object/minecart.c
index c43d574e..2d0f95f7 100644
--- a/src/object/minecart.c
+++ b/src/object/minecart.c
@@ -153,7 +153,7 @@ void sub_080919AC(MinecartEntity* this) {
SoundReq(SFX_138);
}
- if (--super->field_0xf == 0xff) {
+ if (super->field_0xf-- == 0) {
SoundReq(SFX_PLY_VO7);
super->field_0xf = 0x3c;
}
diff --git a/src/object/minishEmoticon.c b/src/object/minishEmoticon.c
index 5ba969b7..20c68e43 100644
--- a/src/object/minishEmoticon.c
+++ b/src/object/minishEmoticon.c
@@ -71,7 +71,7 @@ void sub_08082098(Entity* this) {
if (this->animIndex != animIndex) {
this->z.WORD = 0;
this->actionDelay = 6;
- } else if (--this->actionDelay == 0xff) {
+ } else if (this->actionDelay-- == 0) {
switch (this->spriteOffsetY) {
case 0:
this->spriteOffsetY = -2;
diff --git a/src/object/object2A.c b/src/object/object2A.c
index 743eb305..2f24592d 100644
--- a/src/object/object2A.c
+++ b/src/object/object2A.c
@@ -52,7 +52,7 @@ void sub_08089BA0(Entity* this) {
return;
case 1:
case 2:
- if (--this->actionDelay != 0xff)
+ if (this->actionDelay-- != 0)
return;
if (this->type == 2) {
sub_0807B7D8(((u16*)this->child)[3], COORD_TO_TILE(this), this->collisionLayer);
diff --git a/src/object/object49.c b/src/object/object49.c
index 4eca5e6e..12ad7e38 100644
--- a/src/object/object49.c
+++ b/src/object/object49.c
@@ -217,7 +217,7 @@ void sub_0808F498(Entity* this) {
DeleteThisEntity();
}
- if (--this->actionDelay == 0xFF) {
+ if (this->actionDelay-- == 0) {
DeleteThisEntity();
}
diff --git a/src/object/object79.c b/src/object/object79.c
index 52480738..b90046a1 100644
--- a/src/object/object79.c
+++ b/src/object/object79.c
@@ -95,7 +95,7 @@ void Object79_Action2(Object79Entity* this) {
this->objDir.WORD += this->unk74;
this->objDir.HALF.HI = DirectionNormalize(this->objDir.HALF.HI);
this->unk74 += 0x140;
- if (--super->field_0xf == 0xff) {
+ if (super->field_0xf-- == 0) {
super->field_0xf = 30;
super->actionDelay ^= 1;
}
diff --git a/src/object/pot.c b/src/object/pot.c
index a11c6d4d..b75999d6 100644
--- a/src/object/pot.c
+++ b/src/object/pot.c
@@ -170,7 +170,7 @@ void sub_08082614(Entity* this) {
u32 tileType;
sub_0800445C(this);
- if (--this->actionDelay != 0xFF) {
+ if (this->actionDelay-- != 0) {
LinearMoveUpdate(this);
sub_08016A6C(this);
return;
diff --git a/src/object/pullableMushroom.c b/src/object/pullableMushroom.c
index 0c0e5796..80d2c605 100644
--- a/src/object/pullableMushroom.c
+++ b/src/object/pullableMushroom.c
@@ -199,7 +199,7 @@ void sub_0808ADF0(PullableMushroomEntity* this) {
SoundReq(SFX_12E);
} else {
GetNextFrame(super);
- if (((super->frame & ANIM_DONE) != 0) && (--super->actionDelay == 0xff)) {
+ if (((super->frame & ANIM_DONE) != 0) && (super->actionDelay-- == 0)) {
InitializeAnimation(super, super->animationState + 0xd);
}
}
@@ -226,7 +226,7 @@ void sub_0808AEB0(PullableMushroomEntity* this) {
GetNextFrame(super);
if (uVar1 < 0x40) {
sub_080044AE(&gPlayerEntity, 0x40, super->direction);
- if (--this->unk_7c == 0xffffffff) {
+ if (this->unk_7c-- == 0) {
this->unk_7c = 4;
SoundReq(SFX_12F);
}