Change --x !=/== 0xff comparisons

This commit is contained in:
Tal Hayon
2022-03-28 09:07:30 +03:00
parent 190bc21624
commit 9df9e77512
14 changed files with 27 additions and 27 deletions
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -217,7 +217,7 @@ void sub_0808F498(Entity* this) {
DeleteThisEntity();
}
if (--this->actionDelay == 0xFF) {
if (this->actionDelay-- == 0) {
DeleteThisEntity();
}
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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);
}