Many more timers -> dec

This commit is contained in:
Elliptic Ellipsis
2022-06-21 23:26:53 +01:00
parent 0e60387579
commit ca06566e2f
87 changed files with 222 additions and 222 deletions
+2 -2
View File
@@ -221,7 +221,7 @@ void sub_08088DB4(BigBarrelEntity* this) {
if (--super->timer) {
return;
}
super->timer = 0x1e;
super->timer = 30;
super->frameIndex++;
super->action++;
break;
@@ -301,7 +301,7 @@ void sub_08088F20(BigBarrelEntity* this) {
return;
}
super->action = 4;
super->timer = 0x78;
super->timer = 120;
break;
default:
if (--super->timer == 0x5a) {
+1 -1
View File
@@ -96,7 +96,7 @@ void BigIceBlock_Action2(BigIceBlockEntity* this) {
}
}
super->action = 3;
super->timer = 0x3c;
super->timer = 60;
super->flags &= 0x7f;
}
+2 -2
View File
@@ -82,7 +82,7 @@ void BigPushableLever_Pushing(BigPushableLeverEntity* this) {
void BigPushableLever_SetIdle(BigPushableLeverEntity* this) {
super->action = IDLE;
this->timer = 0x3c;
this->timer = 60;
BigPushableLever_SetTiles(this);
}
@@ -116,7 +116,7 @@ bool32 BigPushableLever_ShouldStartPushing(BigPushableLeverEntity* this) {
BigPushableLever_CalculateSpriteOffsets(this);
SetTile(gUnk_081236E8[super->type2], this->tilePositionLower, super->collisionLayer);
} else {
this->timer = 0x3c;
this->timer = 60;
super->spriteOffsetX = 0;
super->spriteOffsetY = 0;
}
+2 -2
View File
@@ -102,7 +102,7 @@ void ChestSpawner_Type2Action1(ChestSpawnerEntity* this) {
gPauseMenuOptions.disabled = 1;
super->action = 2;
super->subAction = 0;
super->subtimer = 0x1e;
super->subtimer = 30;
super->spriteSettings.draw = 1;
super->spriteRendering.alphaBlend = 1;
RequestPriorityDuration(super, 0x1e);
@@ -152,7 +152,7 @@ void ChestSpawner_Type2Action3(ChestSpawnerEntity* this) {
sub_0800445C(super);
if (super->interactType != 0) {
super->action = 4;
super->subtimer = 0x1e;
super->subtimer = 30;
sub_080788E0(super);
RequestPriorityDuration(super, 0x3c);
SoundReq(SFX_CHEST_OPEN);
+1 -1
View File
@@ -301,7 +301,7 @@ void CrenelBeanSprout_Action6SubAction1(CrenelBeanSproutEntity* this) {
if (super->type2 == super->subtimer) {
gPlayerState.keepFacing &= 0x7f;
super->subAction++;
super->timer = 0x3c;
super->timer = 60;
} else {
super->timer = 0x0f;
}
+1 -1
View File
@@ -142,7 +142,7 @@ void EzloCap_Type1Action1(EzloCapEntity* this) {
}
if (super->timer == 6) {
super->subAction = 3;
super->timer = 0x3c;
super->timer = 60;
super->parent->type2 = 1;
InitAnimationForceUpdate(super, 0x1c);
} else {
+2 -2
View File
@@ -112,7 +112,7 @@ void FigurineDevice_Init(FigurineDeviceEntity* this) {
InitializeAnimation(super, 1);
break;
case 3:
super->timer = 0x1e;
super->timer = 30;
super->subtimer = 0;
this->unk_81 = 1;
this->unk_7a = 0;
@@ -254,7 +254,7 @@ void FigurineDevice_Action4(FigurineDeviceEntity* this) {
if ((gInput.newKeys & 1) != 0) {
SoundReq(SFX_TEXTBOX_SELECT);
this->unk_7a = 2;
super->timer = 0x3c;
super->timer = 60;
sub_08050384();
return;
}
+1 -1
View File
@@ -463,7 +463,7 @@ void sub_080A1FF0(GyorgBossObjectEntity* this) {
if (EntityWithinDistance(&gPlayerEntity, gRoomControls.origin_x + 0x200, gRoomControls.origin_y + 0x210,
0x100)) {
if (super->timer == 0) {
super->timer = 0x78;
super->timer = 120;
} else {
if (super->timer == 0x23) {
InitScreenShake(30, 0);
+4 -4
View File
@@ -61,7 +61,7 @@ void KeyStealingTakkuri_Type0_Init(KeyStealingTakkuriEntity* this) {
Entity* entity;
super->action++;
super->collisionLayer = 1;
super->timer = 0x1e;
super->timer = 30;
super->subtimer = 0;
super->spriteRendering.b3 = 1;
super->speed = 0;
@@ -189,7 +189,7 @@ void KeyStealingTakkuri_Type2_Init(KeyStealingTakkuriEntity* this) {
super->action++;
super->collisionLayer = 2;
super->timer = 0x1e;
super->timer = 30;
super->subtimer = 1;
super->spriteRendering.b3 = 1;
super->speed = 0;
@@ -236,7 +236,7 @@ void KeyStealingTakkuri_Type2_Action3(KeyStealingTakkuriEntity* this) {
this->unk_6e += 8;
if (--this->unk_6c == 0) {
super->action++;
super->timer = 0x1e;
super->timer = 30;
super->spriteSettings.flipX = 0;
} else {
sub_0809E238(this);
@@ -306,7 +306,7 @@ void KeyStealingTakkuri_Type3_Action1(KeyStealingTakkuriEntity* this) {
switch (sub_0809E2C4(this, super->type2)) {
case 1:
super->action += 2;
super->timer = 0xff;
super->timer = 255;
InitAnimationForceUpdate(super, super->animIndex + 2);
SoundReq(SFX_123);
child = super->child;
+1 -1
View File
@@ -43,7 +43,7 @@ void LadderUp(Entity* this) {
SoundReq(SFX_10B);
this->action = 2;
#ifndef EU
this->timer = 0x3c;
this->timer = 60;
#endif
}
break;
+1 -1
View File
@@ -154,7 +154,7 @@ void sub_080919AC(MinecartEntity* this) {
if (super->subtimer-- == 0) {
SoundReq(SFX_PLY_VO7);
super->subtimer = 0x3c;
super->subtimer = 60;
}
uVar3 = GetRelativeCollisionTile(super, gUnk_081223C8[super->animationState * 2],
+1 -1
View File
@@ -56,7 +56,7 @@ void Object12_Action2(Object12Entity* this) {
u32 tmp2;
if (--super->timer == 0) {
super->action = 3;
super->timer = 0x1e;
super->timer = 30;
super->spriteOffsetY = 4;
gScreen.lcd.displayControl |= 0x2000;
gScreen.controls.windowInsideControl = 0x1f;
+1 -1
View File
@@ -103,7 +103,7 @@ void Object30_Action2(Object30Entity* this) {
void sub_0808A968(Object30Entity* this) {
super->action = 2;
super->timer = 0x1e;
super->timer = 30;
super->spriteSettings.draw = 1;
super->zVelocity = Q_16_16(2.5);
super->spritePriority.b1 = 3;
+1 -1
View File
@@ -99,7 +99,7 @@ void Object35_Type1Init(Object35Entity* this) {
this->unk_74 = GetTileIndex(this->unk_76, super->collisionLayer);
if (super->timer == 0) {
super->action = 1;
super->subtimer = 0x78;
super->subtimer = 120;
SetTile(0x4022, this->unk_76, super->collisionLayer);
} else {
super->action = 3;
+3 -3
View File
@@ -38,7 +38,7 @@ void sub_0808BB30(Object36Entity* this) {
} else {
super->action = 1;
super->flags |= ENT_COLLIDE;
super->timer = 0x78;
super->timer = 120;
super->subtimer = 0;
super->spriteRendering.b3 = 3;
super->spritePriority.b0 = 4;
@@ -100,7 +100,7 @@ void sub_0808BC3C(Object36Entity* this) {
}
}
} else {
super->timer = 0x78;
super->timer = 120;
super->spriteSettings.draw = 0;
if (super->subtimer != 0) {
super->subtimer = 0;
@@ -130,7 +130,7 @@ void sub_0808BD14(Object36Entity* this) {
} else {
if ((super->flags & ENT_COLLIDE) != 0) {
super->flags &= ~ENT_COLLIDE;
super->timer = 0x1e;
super->timer = 30;
} else {
super->spriteSettings.draw ^= 1;
if (--super->timer == 0) {
+2 -2
View File
@@ -71,8 +71,8 @@ void Object3D_Action1(Object3DEntity* this) {
super->spriteOrientation.flipY = 0;
super->spriteRendering.b3 = 0;
super->spritePriority.b0 = 0;
super->timer = 0x1e;
super->subtimer = 0xff;
super->timer = 30;
super->subtimer = 255;
super->spriteRendering.b0 = 3;
SetAffineInfo(super, 0x100, 0x100, 0);
gArea.field_0x10 = 1;
+1 -1
View File
@@ -39,7 +39,7 @@ void Object42(Object42Entity* this) {
void sub_0808DDB4(Object42Entity* this) {
super->action = 1;
if (super->type != 0) {
super->timer = 0x78;
super->timer = 120;
this->unk_6c = 0xf0;
InitializeAnimation(super, 0);
sub_0808DDE8(this);
+4 -4
View File
@@ -34,13 +34,13 @@ void Object4B(Object4BEntity* this) {
void Object4B_Init(Object4BEntity* this) {
super->action = 1;
super->timer = 0x3c;
super->timer = 60;
InitializeAnimation(super, 0);
}
void Object4B_Action1(Object4BEntity* this) {
if (--super->timer == 0) {
super->timer = 0x78;
super->timer = 120;
super->action++;
super->spriteSettings.draw = 1;
}
@@ -82,7 +82,7 @@ void Object4B_Action4(Object4BEntity* this) {
super->y.HALF.HI = gRoomControls.origin_y + 0x230;
if ((super->frame & ANIM_DONE) != 0) {
super->action++;
super->timer = 0x78;
super->timer = 120;
InitializeAnimation(super, 2);
}
} else if ((super->frame & ANIM_DONE) != 0) {
@@ -104,7 +104,7 @@ void Object4B_Action6(Object4BEntity* this) {
GetNextFrame(super);
if ((super->frame & ANIM_DONE) != 0) {
super->action++;
super->timer = 0x3c;
super->timer = 60;
InitializeAnimation(super, 1);
}
}
+1 -1
View File
@@ -95,7 +95,7 @@ void Object61_Action1Type0(Object61Entity* this) {
this->unk_6e = 0x100;
}
if (this->unk_6e == 0x100) {
super->subtimer = 0xff;
super->subtimer = 255;
}
} else {
sub_080936C8(this);
+1 -1
View File
@@ -95,7 +95,7 @@ void sub_08097CB4(Object74Entity* this) {
super->action = 3;
super->spriteSettings.draw = 1;
super->spriteRendering.alphaBlend = 1;
super->timer = 0x1e;
super->timer = 30;
super->subtimer = 0;
gScreen.controls.layerFXControl = 0xf40;
gScreen.controls.alphaBlend = 0x1000;
+11 -11
View File
@@ -40,7 +40,7 @@ void Object8E_Type0(Object8EEntity* this) {
switch (super->action) {
case 0:
super->action = 1;
super->timer = 0x3c;
super->timer = 60;
super->subtimer = 0;
gRoomControls.camera_target = super;
gRoomControls.unk5 = 1;
@@ -67,7 +67,7 @@ void Object8E_Type0(Object8EEntity* this) {
}
} else {
super->action = 2;
super->timer = 0x3c;
super->timer = 60;
gScreen.lcd.displayControl &= 0xdfff;
gRoomControls.camera_target = &gPlayerEntity;
SoundReq(SFX_134);
@@ -114,7 +114,7 @@ void Object8E_Type1(Object8EEntity* this) {
switch (super->action) {
case 0:
super->action = 1;
super->timer = 0x3c;
super->timer = 60;
super->subtimer = 0x20;
gRoomControls.camera_target = super;
gRoomControls.unk5 = 1;
@@ -141,7 +141,7 @@ void Object8E_Type1(Object8EEntity* this) {
}
} else {
super->action = 2;
super->timer = 0x3c;
super->timer = 60;
gRoomControls.camera_target = &gPlayerEntity;
SoundReq(SFX_134);
}
@@ -165,7 +165,7 @@ void Object8E_Type2(Object8EEntity* this) {
switch (super->action) {
case 0:
super->action++;
super->timer = 0x3c;
super->timer = 60;
super->subtimer = 0;
gRoomControls.camera_target = super;
gRoomControls.unk5 = 1;
@@ -194,7 +194,7 @@ void Object8E_Type2(Object8EEntity* this) {
}
} else {
super->action = 2;
super->timer = 0x1e;
super->timer = 30;
gScreen.lcd.displayControl = (gScreen.lcd.displayControl & 0xdfff) | 0x4800;
super->x.HALF.HI += 0x68;
super->y.HALF.HI += 0x28;
@@ -205,7 +205,7 @@ void Object8E_Type2(Object8EEntity* this) {
break;
case 2:
if (sub_0809BE78(this) && (--super->timer == 0)) {
super->timer = 0x78;
super->timer = 120;
super->action = 3;
SetLocalFlag(0x35);
SoundReq(SFX_SECRET);
@@ -235,7 +235,7 @@ void Object8E_Type3(Object8EEntity* this) {
switch (super->action) {
case 0:
super->action = 1;
super->timer = 0x3c;
super->timer = 60;
super->subtimer = 0;
gRoomControls.camera_target = super;
gRoomControls.unk5 = 1;
@@ -268,7 +268,7 @@ void Object8E_Type3(Object8EEntity* this) {
}
} else {
super->action = 2;
super->timer = 0x78;
super->timer = 120;
gScreen.lcd.displayControl = (gScreen.lcd.displayControl & 0xdfff) | 0x4800;
SetLocalFlag(0x37);
SoundReq(SFX_134);
@@ -291,7 +291,7 @@ void Object8E_Type4(Object8EEntity* this) {
switch (super->action) {
case 0:
super->action = 1;
super->timer = 0x3c;
super->timer = 60;
super->subtimer = 0x80;
gRoomControls.camera_target = super;
gRoomControls.unk5 = 1;
@@ -312,7 +312,7 @@ void Object8E_Type4(Object8EEntity* this) {
}
} else {
super->action = 2;
super->timer = 0x3c;
super->timer = 60;
gRoomControls.camera_target = &gPlayerEntity;
SoundReq(SFX_134);
}
+1 -1
View File
@@ -49,7 +49,7 @@ void OctorokBossObject_Init(Entity* this) {
case 0:
this->field_0x78.HALF.HI = 0x96;
this->timer = 0;
this->subtimer = 0x1e;
this->subtimer = 30;
case 1:
InitializeAnimation(this, 0);
EnqueueSFX(SFX_124);
+2 -2
View File
@@ -94,7 +94,7 @@ void PushableGrave_Action2(PushableGraveEntity* this) {
if (super->subAction == 0) {
if (--super->subtimer == 0) {
super->subAction = 1;
super->subtimer = 0x78;
super->subtimer = 120;
gRoomControls.camera_target = super;
gRoomControls.unk5 = 2;
}
@@ -178,7 +178,7 @@ bool32 sub_0809785C(PushableGraveEntity* this) {
super->action = 2;
super->subAction = 0;
super->timer = 0xf0;
super->subtimer = 0x3c;
super->subtimer = 60;
super->direction = 0;
super->speed = 0x40;
RestorePrevTileEntity(this->unk_68, super->collisionLayer);
+2 -2
View File
@@ -81,7 +81,7 @@ void PushableLever_Pushing(PushableLeverEntity* this) {
void PushableLever_SetIdle(PushableLeverEntity* this) {
super->action = IDLE;
this->timer = 0x3c;
this->timer = 60;
PushableLever_SetTiles(this);
}
@@ -109,7 +109,7 @@ bool32 PushableLever_ShouldStartPushing(PushableLeverEntity* this) {
PushableLever_CalculateSpriteOffsets(this);
SetTile(PushableLever_Tiles[super->type2], this->tilePosition, super->collisionLayer);
} else {
this->timer = 0x3c;
this->timer = 60;
super->spriteOffsetX = 0;
super->spriteOffsetY = 0;
}
+1 -1
View File
@@ -226,7 +226,7 @@ bool32 sub_080895C0(PushableStatueEntity* this) {
super->y.HALF.HI += gUnk_08120CBC[(super->direction >> 2) + 1];
sub_08089454(this);
super->action = 4;
super->timer = 0x3c;
super->timer = 60;
}
sub_0800445C(super);
return FALSE;
+1 -1
View File
@@ -91,7 +91,7 @@ void sub_08085308(Entity* this) {
break;
case 3:
if (CheckFlags(this->field_0x86.HWORD) == *(u16*)&this->field_0x7a) {
this->subtimer = 0xff;
this->subtimer = 255;
} else {
this->subtimer = 1;
}
+1 -1
View File
@@ -147,7 +147,7 @@ void SmallIceBlock_Action3(SmallIceBlockEntity* this) {
SoundReq(SFX_SECRET);
}
super->action = 4;
super->timer = 0x3c;
super->timer = 60;
super->flags &= 0x7f;
}
+1 -1
View File
@@ -58,7 +58,7 @@ void sub_0809E86C(Entity* this) {
void sub_0809E8BC(Entity* this) {
if (--this->timer == 0) {
this->action = 3;
this->timer = 0x3c;
this->timer = 60;
this->spriteSettings.draw = 0;
sub_0809E96C(this);
sub_0809E918(this);
+7 -7
View File
@@ -76,19 +76,19 @@ void WindTribeTeleporter_Action1(WindTribeTeleporterEntity* this) {
void WindTribeTeleporter_Action2(WindTribeTeleporterEntity* this) {
switch (super->subAction) {
case 0:
super->timer = 0x1e;
super->timer = 30;
super->subAction++;
break;
case 1:
if (--super->timer == 0) {
super->subAction++;
super->timer = 0x1e;
super->timer = 30;
}
break;
case 2:
if (--super->timer == 0) {
super->subAction++;
super->timer = 0x1e;
super->timer = 30;
SoundReq(SFX_113);
} else {
if ((gRoomTransition.frameCount & 7) == 0) {
@@ -99,7 +99,7 @@ void WindTribeTeleporter_Action2(WindTribeTeleporterEntity* this) {
case 3:
if (--super->timer == 0) {
super->subAction++;
super->timer = 0x1e;
super->timer = 30;
} else {
if ((gRoomTransition.frameCount & 3) == 0) {
gPlayerEntity.animationState = (gPlayerEntity.animationState + 2) & 6;
@@ -132,7 +132,7 @@ void WindTribeTeleporter_Action3(WindTribeTeleporterEntity* this) {
switch (super->subAction) {
case 0:
super->subAction = 1;
super->timer = 0x1e;
super->timer = 30;
SoundReq(SFX_114);
break;
case 1:
@@ -142,13 +142,13 @@ void WindTribeTeleporter_Action3(WindTribeTeleporterEntity* this) {
}
} else {
super->subAction++;
super->timer = 0x1e;
super->timer = 30;
}
break;
case 2:
if (--super->timer == 0) {
super->subAction++;
super->timer = 0x1e;
super->timer = 30;
} else {
if ((gRoomTransition.frameCount & 3) == 0) {
gPlayerEntity.animationState = (gPlayerEntity.animationState + 2) & 6;