From 9df9e77512dd4ee28b62c9226e65b28f6f602ed8 Mon Sep 17 00:00:00 2001 From: Tal Hayon Date: Mon, 28 Mar 2022 09:07:30 +0300 Subject: Change --x !=/== 0xff comparisons --- src/object/minecart.c | 2 +- src/object/minishEmoticon.c | 2 +- src/object/object2A.c | 2 +- src/object/object49.c | 2 +- src/object/object79.c | 2 +- src/object/pot.c | 2 +- src/object/pullableMushroom.c | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/object') 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); } -- cgit v1.2.3