name remaining entity fields

This commit is contained in:
theo3
2022-03-28 19:51:32 -07:00
parent 755571834d
commit 92240d4314
348 changed files with 3850 additions and 3850 deletions
+5 -5
View File
@@ -82,12 +82,12 @@ void sub_08089944(Entity* this) {
this->spriteRendering.b3 = 0;
if ((this->type2 == 1) || (this->child->action == 2)) {
if (gPlayerEntity.z.HALF.HI < -0x24)
this->actionDelay = 1;
this->timer = 1;
else
this->actionDelay = 0;
this->timer = 0;
this->y.HALF.HI += (this->type2 - 1) * -0x24;
iVar1 = EntityInRectRadius(this, &gPlayerEntity, 0xf, 0xf);
if ((iVar1 != 0) && (this->actionDelay != 0)) {
if ((iVar1 != 0) && (this->timer != 0)) {
this->action = 2;
this->spriteOrientation.flipY = 2;
this->spriteRendering.b3 = 3;
@@ -98,7 +98,7 @@ void sub_08089944(Entity* this) {
gPlayerEntity.y.HALF.HI -= 0x24;
gPlayerEntity.z.HALF.HI += 0x24;
sub_0807AA80(&gPlayerEntity);
if (this->field_0xf == 0) {
if (this->subtimer == 0) {
pEVar2 = CreateFx(&gPlayerEntity, FX_DEATH, 0);
if (pEVar2 != NULL) {
pEVar2->x.HALF.HI += 8;
@@ -118,7 +118,7 @@ void sub_08089944(Entity* this) {
}
}
this->y.HALF.HI += (this->type2 - 1) * 0x24;
this->field_0xf = this->actionDelay;
this->subtimer = this->timer;
}
}
}
+4 -4
View File
@@ -29,7 +29,7 @@ void AngryStatue_Init(Entity* this) {
}
void AngryStatue_Action1(Entity* this) {
if (this->parent->field_0xf == 1) {
if (this->parent->subtimer == 1) {
this->action = 2;
InitializeAnimation(this, this->type + 4);
}
@@ -62,9 +62,9 @@ void AngryStatue_Action2(Entity* this) {
}
void AngryStatue_Action3(Entity* this) {
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
this->action = 4;
this->actionDelay = 15;
this->timer = 15;
InitializeAnimation(this, this->type);
} else {
this->parent->z.BYTES.byte2 |= 1 << this->type2;
@@ -73,7 +73,7 @@ void AngryStatue_Action3(Entity* this) {
void AngryStatue_Action4(Entity* this) {
this->spriteSettings.draw ^= 1;
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
this->action = 1;
this->spriteSettings.draw = 1;
}
+3 -3
View File
@@ -21,7 +21,7 @@ void sub_0808F658(Entity* this) {
this->field_0x7a.HWORD = gRoomControls.origin_x + gRoomControls.width + 0x60;
this->animationState = 0;
this->x.HALF.HI += (Random() & 0xf) << 4;
this->actionDelay = 0;
this->timer = 0;
this->subAction = 0;
}
@@ -35,7 +35,7 @@ void sub_0808F6E0(Entity* this) {
void sub_0808F70C(Entity* this) {
if (this->subAction == 0) {
this->subAction = 1;
this->actionDelay = ((Random() & 7) << 3) + 31;
this->timer = ((Random() & 7) << 3) + 31;
if ((this->direction & 0x10)) {
this->x.HALF.HI = this->field_0x7a.HWORD;
@@ -48,7 +48,7 @@ void sub_0808F70C(Entity* this) {
}
if (this->subAction == 1) {
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
this->action = 1;
this->subAction = 0;
}
+7 -7
View File
@@ -31,10 +31,10 @@ void sub_0809CC74(Entity* this) {
} else {
if (this->type2 & 1) {
this->spriteSettings.draw = 1;
this->actionDelay = 20;
this->timer = 20;
} else {
this->action = 2;
this->actionDelay = (this->type2 & 2) ? 20 : 18;
this->timer = (this->type2 & 2) ? 20 : 18;
}
InitializeAnimation(this, 0);
}
@@ -57,9 +57,9 @@ void sub_0809CD0C(Entity* this) {
}
/* Damage minish link if he touches a steam cloud */
if (this->field_0xf == 0 && gPlayerEntity.iframes == 0 && this->frameIndex &&
if (this->subtimer == 0 && gPlayerEntity.iframes == 0 && this->frameIndex &&
sub_0806FC80(this, &gPlayerEntity, 4)) {
this->field_0xf++;
this->subtimer++;
ModHealth(-2);
SoundReqClipped(&gPlayerEntity, SFX_PLY_VO6);
gPlayerEntity.iframes = 16;
@@ -72,10 +72,10 @@ void sub_0809CD0C(Entity* this) {
void sub_0809CDB4(Entity* this) {
/* Reset cloud position and start animation. */
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
this->action = 1;
this->actionDelay = 30;
this->field_0xf = 0;
this->timer = 30;
this->subtimer = 0;
this->spriteSettings.draw = 1;
this->y.HALF.HI = this->parent->y.HALF.HI - 0xe;
InitializeAnimation(this, 0);
+7 -7
View File
@@ -9,8 +9,8 @@ void BarrelInside(Entity* this) {
this->action = 1;
this->spriteSettings.draw = 1;
this->frameIndex = this->type;
this->actionDelay = 0x10;
this->field_0xf = 1;
this->timer = 0x10;
this->subtimer = 1;
ptr = gUnk_08120C80 + this->type * 3;
this->spriteRendering.b3 = *ptr;
this->spritePriority.b0 = *(ptr + 1);
@@ -18,11 +18,11 @@ void BarrelInside(Entity* this) {
}
if (this->type == 4) {
if (--this->actionDelay == 0) {
this->actionDelay = 0x10;
this->frameIndex = gUnk_08120C92[this->field_0xf++];
if (this->field_0xf == 3) {
this->field_0xf = 0;
if (--this->timer == 0) {
this->timer = 0x10;
this->frameIndex = gUnk_08120C92[this->subtimer++];
if (this->subtimer == 3) {
this->subtimer = 0;
}
}
}
+28 -28
View File
@@ -76,8 +76,8 @@ void Beanstalk_Init(BeanstalkEntity* this) {
return;
}
#endif
if (super->type2 == 0 && super->actionDelay != 0) {
if (CheckLocalFlag(super->actionDelay) == 0) {
if (super->type2 == 0 && super->timer != 0) {
if (CheckLocalFlag(super->timer) == 0) {
return;
}
super->spriteOrientation.flipY = 2;
@@ -104,22 +104,22 @@ void Beanstalk_Init(BeanstalkEntity* this) {
case 5:
case 6:
super->spriteVramOffset = 0x1c0;
super->actionDelay = 0;
super->timer = 0;
break;
case 7:
switch (super->type2) {
case 0:
this->unk_6c = 0x10;
super->actionDelay = 0;
super->timer = 0;
do {
obj = CreateObject(BEANSTALK, 7, 1);
super->child = obj;
if (obj != NULL) {
obj->x.HALF.HI = super->x.HALF.HI;
(super->child)->y.HALF.HI = super->y.HALF.HI - (s16)this->unk_6c;
super->field_0xf = 4;
while (--super->field_0xf != 0) {
ptr = &gUnk_08120DFC[super->actionDelay];
super->subtimer = 4;
while (--super->subtimer != 0) {
ptr = &gUnk_08120DFC[super->timer];
obj = CreateObject(BEANSTALK, 7, ptr->type - 2);
super->child = obj;
if (obj != NULL) {
@@ -127,15 +127,15 @@ void Beanstalk_Init(BeanstalkEntity* this) {
(super->child)->y.HALF.HI = (super->y.HALF.HI - (s16)this->unk_6c) - ptr->y;
super->child->spriteSettings.flipX = ptr->flipX;
}
super->actionDelay++;
super->timer++;
}
if (super->actionDelay > 5) {
super->actionDelay = 0;
if (super->timer > 5) {
super->timer = 0;
}
}
this->unk_6c += 0x38;
} while (((s16)(super->y.HALF_U.HI - this->unk_6c)) >= gRoomControls.origin_y);
super->actionDelay = 1;
super->timer = 1;
break;
case 2:
case 3:
@@ -170,19 +170,19 @@ void Beanstalk_Action1Type0(BeanstalkEntity* this) {
void Beanstalk_Action1Type0SubAction0(BeanstalkEntity* this) {
UpdateAnimationSingleFrame(super);
if ((super->frame & ANIM_DONE) != 0) {
if (super->actionDelay < 2) {
super->actionDelay++;
if (super->timer < 2) {
super->timer++;
} else {
InitAnimationForceUpdate(super, 1);
super->actionDelay = 0x10;
super->timer = 0x10;
super->subAction++;
}
}
}
void Beanstalk_Action1Type0SubAction1(BeanstalkEntity* this) {
if (super->actionDelay-- == 0) {
super->actionDelay = 0x10;
if (super->timer-- == 0) {
super->timer = 0x10;
SoundReq(SFX_198);
}
UpdateAnimationSingleFrame(super);
@@ -205,8 +205,8 @@ void Beanstalk_Action1Type0SubAction1(BeanstalkEntity* this) {
}
void Beanstalk_Action1Type0SubAction2(BeanstalkEntity* this) {
if (super->actionDelay-- == 0) {
super->actionDelay = 0x10;
if (super->timer-- == 0) {
super->timer = 0x10;
SoundReq(SFX_198);
}
}
@@ -217,15 +217,15 @@ void Beanstalk_Action1Type2(BeanstalkEntity* this) {
GetNextFrame(super);
if ((super->frame & 1) != 0) {
ptr = &gUnk_08120DFC[super->actionDelay];
ptr = &gUnk_08120DFC[super->timer];
super->child = CreateObject(BEANSTALK, ptr->type, 0);
if (super->child != NULL) {
super->child->x.HALF.HI = super->x.HALF.HI + ptr->x;
super->child->y.HALF.HI = super->y.HALF.HI - ptr->y;
super->child->spriteSettings.flipX = ptr->flipX;
}
if (++super->actionDelay > 5) {
super->actionDelay = 0;
if (++super->timer > 5) {
super->timer = 0;
}
}
if ((super->frame & ANIM_DONE) != 0) {
@@ -253,7 +253,7 @@ void Beanstalk_Action1Type1(BeanstalkEntity* this) {
void Beanstalk_Action1Type7(BeanstalkEntity* this) {
switch (super->type2) {
case 0:
if (super->actionDelay == 0) {
if (super->timer == 0) {
return;
}
this->unk_6c = gRoomControls.origin_y;
@@ -269,7 +269,7 @@ void Beanstalk_Action1Type7(BeanstalkEntity* this) {
break;
}
}
super->actionDelay = 0;
super->timer = 0;
return;
break;
case 1:
@@ -279,15 +279,15 @@ void Beanstalk_Action1Type7(BeanstalkEntity* this) {
case 4:
if (gPlayerState.floor_type == 0x1e) {
if (EntityInRectRadius(super, &gPlayerEntity, 0, 8)) {
if ((super->animIndex == (super->type2 - 1) * 3 + 1) && (super->actionDelay == 0)) {
super->actionDelay = 1;
if ((super->animIndex == (super->type2 - 1) * 3 + 1) && (super->timer == 0)) {
super->timer = 1;
InitializeAnimation(super, super->animIndex + 1);
}
} else {
super->actionDelay = 0;
super->timer = 0;
}
} else {
super->actionDelay = 0;
super->timer = 0;
}
GetNextFrame(super);
if ((super->frame & ANIM_DONE) != 0) {
@@ -319,7 +319,7 @@ void Beanstalk_Action1Type8SubAction0(BeanstalkEntity* this) {
obj->spriteVramOffset = super->spriteVramOffset;
obj->palette.b.b0 = super->palette.b.b0;
obj->animIndex = 2;
obj->actionDelay = 0x80;
obj->timer = 0x80;
obj->type = 1;
obj->spriteRendering.b3 = 2;
obj->spritePriority.b0 = 6;
+21 -21
View File
@@ -59,30 +59,30 @@ void sub_08088A68(BigBarrelEntity* this) {
} else {
if (gRoomVars.animFlags & 1) {
gRoomVars.animFlags &= ~1;
super->actionDelay = 1;
super->timer = 1;
this->unk68 = gUnk_08120C1C;
SoundReq(SFX_BARREL_ENTER);
}
if (gRoomVars.animFlags & 2) {
gRoomVars.animFlags &= ~2;
super->actionDelay = 1;
super->timer = 1;
this->unk68 = gUnk_08120C25;
SoundReq(SFX_BARREL_RELEASE);
}
if (gRoomVars.animFlags & 4) {
gRoomVars.animFlags &= ~4;
super->actionDelay = 1;
super->timer = 1;
this->unk68 = gUnk_08120C2E;
SoundReq(SFX_BARREL_ENTER);
}
if (super->actionDelay) {
if (super->actionDelay-- == 1) {
if (super->timer) {
if (super->timer-- == 1) {
pcVar3 = this->unk68;
uVar3 = pcVar3[0];
*(u8*)&super->spriteOffsetY = uVar3;
pcVar3++;
if (*pcVar3 != 0xff) {
super->actionDelay = 8;
super->timer = 8;
this->unk68 = pcVar3;
} else {
super->spriteOffsetY = 0;
@@ -154,8 +154,8 @@ void sub_08088C9C(BigBarrelEntity* this) {
} else {
localFlag = 22;
}
super->field_0xf = localFlag;
if (CheckLocalFlag(super->field_0xf) == 0) {
super->subtimer = localFlag;
if (CheckLocalFlag(super->subtimer) == 0) {
return;
}
@@ -163,7 +163,7 @@ void sub_08088C9C(BigBarrelEntity* this) {
super->action = 4;
break;
case 1:
if (CheckLocalFlag(super->field_0xf) == 0) {
if (CheckLocalFlag(super->subtimer) == 0) {
return;
}
super->action = 2;
@@ -175,12 +175,12 @@ void sub_08088C9C(BigBarrelEntity* this) {
gRoomVars.animFlags &= ~0x20;
super->action = 3;
super->subAction = 4;
super->actionDelay = 1;
super->timer = 1;
case 3:
if (--super->actionDelay) {
if (--super->timer) {
return;
}
super->actionDelay = 8;
super->timer = 8;
x = super->x.HALF.HI;
if (super->type2) {
super->x.HALF.HI = x - 2;
@@ -209,7 +209,7 @@ void sub_08088DB4(BigBarrelEntity* this) {
case 1:
if (CheckLocalFlag(super->type2)) {
super->action++;
super->actionDelay = 10;
super->timer = 10;
}
break;
case 2:
@@ -218,15 +218,15 @@ void sub_08088DB4(BigBarrelEntity* this) {
if ((gRoomVars.animFlags & 8) == 0) {
return;
}
if (--super->actionDelay) {
if (--super->timer) {
return;
}
super->actionDelay = 0x1e;
super->timer = 0x1e;
super->frameIndex++;
super->action++;
break;
default:
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
gRoomVars.animFlags &= ~0x8;
DeleteEntity(super);
}
@@ -277,7 +277,7 @@ void sub_08088F20(BigBarrelEntity* this) {
return;
}
super->action = 2;
super->actionDelay = 30;
super->timer = 30;
RequestPriorityDuration(super, 0x10e);
pEVar3 = CreateObject(OBJECT_2A, 1, 0);
if (pEVar3 != NULL) {
@@ -290,7 +290,7 @@ void sub_08088F20(BigBarrelEntity* this) {
SetTileType(0x76, COORD_TO_TILE(super), 2);
break;
case 2:
if (--super->actionDelay) {
if (--super->timer) {
return;
}
sub_08089094(this);
@@ -301,10 +301,10 @@ void sub_08088F20(BigBarrelEntity* this) {
return;
}
super->action = 4;
super->actionDelay = 0x78;
super->timer = 0x78;
break;
default:
if (--super->actionDelay == 0x5a) {
if (--super->timer == 0x5a) {
if (CheckLocalFlags(0x15, 2)) {
gRoomVars.animFlags |= 2;
} else {
@@ -312,7 +312,7 @@ void sub_08088F20(BigBarrelEntity* this) {
}
gRoomVars.animFlags |= 0x20;
}
if (super->actionDelay == 0) {
if (super->timer == 0) {
gRoomVars.animFlags &= ~0x10;
if (CheckLocalFlags(0x15, 2)) {
RequestPriorityDuration(super, 0x3c);
+12 -12
View File
@@ -48,7 +48,7 @@ void BigIceBlock_Init(BigIceBlockEntity* this) {
super->action = 1;
super->flags |= 0x80;
super->updatePriority = 3;
super->field_0x3c = 7;
super->collisionFlags = 7;
super->hurtType = 0x48;
super->hitType = 1;
super->flags2 = 0x80;
@@ -64,7 +64,7 @@ void BigIceBlock_Init(BigIceBlockEntity* this) {
void BigIceBlock_Action1(BigIceBlockEntity* this) {
if (sub_0809963C(this)) {
super->action = 2;
super->actionDelay = 0;
super->timer = 0;
EnqueueSFX(SFX_ICE_BLOCK_MELT);
BigIceBlock_Action2(this);
}
@@ -73,20 +73,20 @@ void BigIceBlock_Action1(BigIceBlockEntity* this) {
void BigIceBlock_Action2(BigIceBlockEntity* this) {
u32 tmp;
if (!sub_0809963C(this)) {
if (super->actionDelay >= 2) {
super->actionDelay -= 2;
if (super->timer >= 2) {
super->timer -= 2;
} else {
super->actionDelay = 0;
super->timer = 0;
}
if (super->actionDelay == 0) {
if (super->timer == 0) {
super->action = 1;
sub_0805EC60(super);
return;
}
} else {
super->actionDelay += 1;
super->timer += 1;
}
tmp = gUnk_081237B0[super->actionDelay >> 5];
tmp = gUnk_081237B0[super->timer >> 5];
SetAffineInfo(super, 0x100, tmp, 0);
if (super->type != 1) {
if (super->type != 2) {
@@ -96,7 +96,7 @@ void BigIceBlock_Action2(BigIceBlockEntity* this) {
}
}
super->action = 3;
super->actionDelay = 0x3c;
super->timer = 0x3c;
super->flags &= 0x7f;
}
@@ -107,13 +107,13 @@ void sub_08099880(BigIceBlockEntity* this) {
u32 uVar4;
s32 x;
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
DeleteThisEntity();
} else {
if (super->actionDelay == 0x30) {
if (super->timer == 0x30) {
sub_08099C18(this);
}
uVar4 = (0x3c - super->actionDelay) * 0x20 + 0x100;
uVar4 = (0x3c - super->timer) * 0x20 + 0x100;
SetAffineInfo(super, 0x100, uVar4, 0);
sub_0806FCF4(super, uVar4, 2, 0);
obj = CreateObject(SPECIAL_FX, 0x11, 0x40);
+2 -2
View File
@@ -42,7 +42,7 @@ void sub_08098D6C(Entity* this) {
if (CheckFlags(this->field_0x86.HWORD)) {
this->action = 2;
this->actionDelay = 0x2d;
this->timer = 0x2d;
ent = CreateFx(this, FX_BIG_EXPLOSION2, 0);
if (ent != NULL) {
ent->y.HALF.HI += 8;
@@ -51,7 +51,7 @@ void sub_08098D6C(Entity* this) {
}
void sub_08098D9C(Entity* this) {
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
this->action = 3;
this->spriteSettings.draw = TRUE;
sub_08098E88(this);
+13 -13
View File
@@ -45,8 +45,8 @@ void Bird_Type0_Init(Entity* this) {
this->action++;
this->spriteSettings.draw = TRUE;
this->actionDelay = 0x31;
this->field_0xf = 1;
this->timer = 0x31;
this->subtimer = 1;
this->zVelocity = Q_16_16(-1.5);
this->z.WORD = Q_16_16(-56.75);
this->field_0x68.HWORD = Q_16_16(-0.03125);
@@ -68,9 +68,9 @@ void Bird_Type0_Init(Entity* this) {
void Bird_Type0_Action1(Entity* this) {
LinearMoveUpdate(this);
GravityUpdate(this, *(s16*)&this->field_0x68.HWORD);
if (this->actionDelay != 0) {
if (--this->actionDelay == 0) {
this->field_0xf = 0;
if (this->timer != 0) {
if (--this->timer == 0) {
this->subtimer = 0;
}
} else if (CheckOnScreen(this) == 0) {
DeleteThisEntity();
@@ -105,7 +105,7 @@ void Bird_Type1_Action1_Subaction0(Entity* this) {
u32 temp;
if (this->parent != NULL) {
temp = this->parent->field_0xf;
temp = this->parent->subtimer;
if (temp != 0) {
PositionRelative(this->parent, this, 0, Q_16_16(8.0));
} else {
@@ -183,9 +183,9 @@ void Bird_Type8(Entity* this) {
switch (this->action) {
case 0:
if (this->actionDelay != 0) {
if (this->timer != 0) {
this->frameIndex = 0xff;
this->actionDelay--;
this->timer--;
return;
}
this->action = 1;
@@ -221,7 +221,7 @@ void Bird_Type8(Entity* this) {
if (pEVar5 != NULL) {
this->child = pEVar5;
this->action = 2;
this->actionDelay = 8;
this->timer = 8;
this->speed = 0x300;
this->field_0x68.HWORD = 0xe000;
PlayerDropHeldObject();
@@ -249,17 +249,17 @@ void Bird_Type8(Entity* this) {
pEVar5 = this->child;
if (pEVar5 != NULL) {
if (gPlayerEntity.x.HALF.HI < this->x.HALF.HI - 8) {
this->actionDelay = 0;
this->timer = 0;
}
if (this->actionDelay == 0) {
if (this->timer == 0) {
PositionRelative(this, pEVar5, 0xfff80000, 0);
pEVar5->z.HALF.HI += 0x18;
pEVar5->spritePriority.b0 = this->spritePriority.b0;
pEVar5->spriteRendering.b3 = this->spriteRendering.b3;
pEVar5->spriteOrientation.flipY = this->spriteOrientation.flipY;
} else {
this->actionDelay--;
this->timer--;
CopyPosition(&gPlayerEntity, pEVar5);
}
}
@@ -375,7 +375,7 @@ void CreateBird(void) {
if (!FindEntity(OBJECT, BIRD, 6, 8, 0)) {
birdEnt = CreateObject(BIRD, 8, 0);
if (birdEnt != NULL) {
birdEnt->actionDelay = 0;
birdEnt->timer = 0;
}
}
}
+2 -2
View File
@@ -38,7 +38,7 @@ void sub_08082EB4(BlockPushedEntity* this) {
super->spriteSettings.draw = 1;
}
super->action = 1;
super->actionDelay = 0x20;
super->timer = 0x20;
super->speed = 0x80;
super->spritePriority.b0 = 6;
pos = COORD_TO_TILE(super);
@@ -93,7 +93,7 @@ void sub_08082EB4(BlockPushedEntity* this) {
void sub_08083094(BlockPushedEntity* this) {
LinearMoveUpdate(super);
sub_0800445C(super);
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
sub_080830B8(this);
}
}
+8 -8
View File
@@ -45,8 +45,8 @@ void sub_0809B3C4(Entity* this) {
switch (this->type2) {
case 0:
this->action = 1;
this->actionDelay = 22;
this->field_0xf = 2;
this->timer = 22;
this->subtimer = 2;
this->field_0x80.HALF.LO = 0;
this->spritePriority.b0 = 3;
break;
@@ -82,12 +82,12 @@ void sub_0809B4A8(Entity* this) {
}
if (sub_0809B688(this)) {
if (--this->actionDelay) {
if (--this->timer) {
return;
}
this->action = 2;
this->actionDelay = 30;
this->timer = 30;
this->speed = 0x40;
this->direction = 0x10;
@@ -100,19 +100,19 @@ void sub_0809B4A8(Entity* this) {
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
EnqueueSFX(SFX_10F);
} else {
this->actionDelay = 22;
this->timer = 22;
}
}
void sub_0809B524(Entity* this) {
if (--this->actionDelay == 0) {
if (--this->field_0xf == 0) {
if (--this->timer == 0) {
if (--this->subtimer == 0) {
this->action = 3;
this->y.HALF.HI += 0x20;
this->z.HALF.HI -= 0x20;
} else {
this->action = 1;
this->actionDelay = 22;
this->timer = 22;
this->field_0x80.HALF.LO = 0x18;
}
}
+4 -4
View File
@@ -105,7 +105,7 @@ void BossDoor_Action2(BossDoorEntity* this) {
void BossDoor_Action3(BossDoorEntity* this) {
LinearMoveUpdate(super);
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
if (super->type < 4) {
sub_08078AC0(0x40, 0, 1);
gPlayerEntity.direction = super->type << 3;
@@ -120,7 +120,7 @@ void BossDoor_Action4(BossDoorEntity* this) {
if (sub_08083734(super, this->unk_76)) {
super->action = 5;
super->actionDelay = 0xc;
super->timer = 0xc;
super->spriteSettings.draw = 1;
super->direction = *(u8*)&this->unk_76 << 3 ^ 0x10;
ptr = &gUnk_081214F4[this->unk_76 * 2];
@@ -136,7 +136,7 @@ void BossDoor_Action5(BossDoorEntity* this) {
const s8* ptr;
LinearMoveUpdate(super);
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action = 6;
super->z.HALF.HI = 0;
super->x.HALF.HI = this->unk_70;
@@ -166,7 +166,7 @@ void sub_0808C4BC(BossDoorEntity* this) {
static const s8 gUnk_0812150C[] = { 0, -2, 2, 0, 0, 2, -2, 0 };
const s8* ptr;
super->action = 3;
super->actionDelay = 0xc;
super->timer = 0xc;
super->direction = this->unk_76 * 8;
ptr = &gUnk_0812150C[this->unk_76 * 2];
super->x.HALF.HI += ptr[0];
+12 -12
View File
@@ -44,7 +44,7 @@ void sub_08081FF8(Entity*);
void sub_08081BAC(Entity* this) {
if (sub_08081CB0(this)) {
this->subAction = 0;
this->actionDelay = 0xA;
this->timer = 0xA;
RequestPriorityDuration(this, 0xA);
sub_08081FF8(this);
if (this->type == 1) {
@@ -64,11 +64,11 @@ void sub_08081BE0(Entity* this) {
return;
if (!sub_08081D28(this)) {
this->action = 4;
this->field_0xf = 1;
this->subtimer = 1;
if ((gPlayerState.heldObject == 2) || (!(gPlayerState.field_0x35 & 0x80))) {
this->actionDelay = 0x18;
this->timer = 0x18;
} else {
this->actionDelay = 0x8;
this->timer = 0x8;
}
} else {
sub_08081E6C(this);
@@ -76,15 +76,15 @@ void sub_08081BE0(Entity* this) {
}
void sub_08081C30(Entity* this) {
if (this->actionDelay != 0) {
this->actionDelay--;
if (this->field_0xf != 0) {
this->field_0xf = 0;
if (this->timer != 0) {
this->timer--;
if (this->subtimer != 0) {
this->subtimer = 0;
SetTile(0x4035, this->field_0x74.HWORD, this->collisionLayer);
}
if (sub_08081CB0(this)) {
this->action = 3;
this->actionDelay = 0;
this->timer = 0;
}
} else {
this->action = 2;
@@ -239,13 +239,13 @@ void sub_08081F24(Entity* this) {
u32 sub_08081F7C(Entity* this, u32 r7) {
u16 tmp;
if (this->actionDelay == 0)
if (this->timer == 0)
return 1;
if (--this->actionDelay > 6) {
if (--this->timer > 6) {
if (this->child != NULL)
this->child->spriteOffsetY = -4;
} else {
if (this->actionDelay == 6) {
if (this->timer == 6) {
SetFlag(this->field_0x86.HWORD);
SetTileType(r7, this->field_0x74.HWORD, this->collisionLayer);
sub_08081F24(this);
+16 -16
View File
@@ -102,7 +102,7 @@ void ChestSpawner_Type2Action1(ChestSpawnerEntity* this) {
gPauseMenuOptions.disabled = 1;
super->action = 2;
super->subAction = 0;
super->field_0xf = 0x1e;
super->subtimer = 0x1e;
super->spriteSettings.draw = 1;
super->spriteRendering.alphaBlend = 1;
RequestPriorityDuration(super, 0x1e);
@@ -125,17 +125,17 @@ void ChestSpawner_Type2Action2(ChestSpawnerEntity* this) {
case 1:
if ((super->type == 5) || (gPlayerEntity.action == 1)) {
super->subAction = 2;
super->actionDelay = 8;
super->field_0xf = 0;
super->timer = 8;
super->subtimer = 0;
SoundReq(SFX_14A);
}
break;
default:
sub_0800445C(super);
CreateMagicSparkles(super->x.HALF.HI, super->y.HALF.HI, 2);
if (--super->actionDelay == 0) {
super->actionDelay = 8;
tmp = ++super->field_0xf;
if (--super->timer == 0) {
super->timer = 8;
tmp = ++super->subtimer;
gScreen.controls.alphaBlend = (((0x10 - tmp) * 0x100) & 0xff00) | tmp;
if (gScreen.controls.alphaBlend == 0x10) {
gPauseMenuOptions.disabled = 0;
@@ -152,7 +152,7 @@ void ChestSpawner_Type2Action3(ChestSpawnerEntity* this) {
sub_0800445C(super);
if (super->interactType != 0) {
super->action = 4;
super->field_0xf = 0x1e;
super->subtimer = 0x1e;
sub_080788E0(super);
RequestPriorityDuration(super, 0x3c);
SoundReq(SFX_CHEST_OPEN);
@@ -163,11 +163,11 @@ void ChestSpawner_Type2Action4(ChestSpawnerEntity* this) {
sub_0800445C(super);
GetNextFrame(super);
if ((super->frame & ANIM_DONE) != 0) {
if (--super->field_0xf == 0) {
if (super->actionDelay == 0x18) {
if (--super->subtimer == 0) {
if (super->timer == 0x18) {
super->action = 6;
super->actionDelay = 8;
super->field_0xf = 0x10;
super->timer = 8;
super->subtimer = 0x10;
} else {
super->action = 5;
sub_08084074(super->type2);
@@ -195,7 +195,7 @@ void sub_080840A8(s32 param_1, s32 param_2) {
static const s8 gUnk_0811F850[] = { -6, 0, 0, 6 };
Entity* obj = CreateObject(GROUND_ITEM, gUnk_0811F838[Random() & 7], 0);
if (obj != NULL) {
obj->actionDelay = 6;
obj->timer = 6;
obj->direction = ((Random() & 7) + 0xc) | 0x80;
obj->speed = (Random() & 0xf) * 2 + 0x20;
obj->zVelocity = gUnk_0811F840[Random() & 3];
@@ -211,9 +211,9 @@ void sub_080840A8(s32 param_1, s32 param_2) {
}
void ChestSpawner_Type2Action6(ChestSpawnerEntity* this) {
if (--super->actionDelay == 0) {
super->actionDelay = 8;
if (--super->field_0xf != 0) {
if (--super->timer == 0) {
super->timer = 8;
if (--super->subtimer != 0) {
sub_080840A8(super->x.HALF.HI, super->y.HALF.HI);
} else {
super->action = 5;
@@ -263,7 +263,7 @@ void ChestSpawner_Type0Action2(ChestSpawnerEntity* this) {
break;
}
super->action = 3;
this->unk_72 = super->actionDelay * 0x3c;
this->unk_72 = super->timer * 0x3c;
if ((super->type & 1) == 0) {
DeleteThisEntity();
}
+14 -14
View File
@@ -29,7 +29,7 @@ void sub_0809F4DC(Entity* this) {
void sub_0809F514(Entity* this) {
this->action = 1;
this->actionDelay = 120;
this->timer = 120;
this->spriteSettings.draw = 0;
this->field_0x68.HALF.LO = 12;
gRoomControls.camera_target = this;
@@ -39,9 +39,9 @@ void sub_0809F514(Entity* this) {
void sub_0809F548(Entity* this) {
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
this->action = 2;
this->actionDelay = 90;
this->timer = 90;
SoundReq(SFX_11D);
sub_0809F814((((this->x.HALF.HI - gRoomControls.origin_x) >> 4) & 63) |
(((this->y.HALF.HI - gRoomControls.origin_y) >> 4) & 63) << 6);
@@ -54,7 +54,7 @@ void sub_0809F548(Entity* this) {
}
void sub_0809F5B0(Entity* this) {
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
SoundReq(SFX_SECRET_BIG);
SetGlobalFlag(KUMOTATSUMAKI);
LoadRoomEntityList((EntityData*)&gUnk_080DD750);
@@ -71,10 +71,10 @@ void sub_0809F5DC(Entity* this) {
void sub_0809F5F0(Entity* this) {
u32 iVar1;
iVar1 = CheckRoomFlag(this->actionDelay);
iVar1 = CheckRoomFlag(this->timer);
if (iVar1 != 0) {
this->action = 2;
this->actionDelay = 120;
this->timer = 120;
SetPlayerControl(3);
sub_08078B48();
gRoomControls.camera_target = this;
@@ -84,12 +84,12 @@ void sub_0809F5F0(Entity* this) {
void sub_0809F61C(Entity* this) {
if ((gRoomControls.scroll_flags & 4) == 0) {
if (this->actionDelay == 30) {
if (this->timer == 30) {
SetLocalFlag(this->type2);
}
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
this->action = 3;
this->actionDelay = 120;
this->timer = 120;
SoundReq(SFX_11D);
sub_0809F814((((this->x.HALF.HI - gRoomControls.origin_x) >> 4) & 63) |
(((this->y.HALF.HI - gRoomControls.origin_y) >> 4) & 63) << 6);
@@ -104,8 +104,8 @@ void sub_0809F61C(Entity* this) {
void sub_0809F69C(Entity* this) {
if (--this->actionDelay == 0) {
this->actionDelay = 30;
if (--this->timer == 0) {
this->timer = 30;
this->action = 4;
gRoomControls.camera_target = &gPlayerEntity;
SoundReq(SFX_SECRET_BIG);
@@ -114,7 +114,7 @@ void sub_0809F69C(Entity* this) {
void sub_0809F6CC(Entity* this) {
if (((gRoomControls.scroll_flags & 4) == 0) && (--this->actionDelay == 0)) {
if (((gRoomControls.scroll_flags & 4) == 0) && (--this->timer == 0)) {
gPlayerState.controlMode = CONTROL_1;
DeleteThisEntity();
}
@@ -126,7 +126,7 @@ void sub_0809F700(Entity* this) {
if (this->action == 0) {
this->action = 1;
this->actionDelay = (Random() & 30) + 8;
this->timer = (Random() & 30) + 8;
this->flags = this->flags | 12;
}
if ((gRoomTransition.frameCount & 3) == 0) {
@@ -135,7 +135,7 @@ void sub_0809F700(Entity* this) {
this->spriteOffsetY = gUnk_081247C0[uVar2 >> 4 & 7];
}
LinearMoveUpdate(this);
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
DeleteThisEntity();
}
}
+13 -13
View File
@@ -67,7 +67,7 @@ void CrenelBeanSprout_Init(CrenelBeanSproutEntity* this) {
return;
}
super->type2 = 0;
super->field_0xf = 2;
super->subtimer = 2;
sub_080969A4(this);
DeleteThisEntity();
}
@@ -94,7 +94,7 @@ void CrenelBeanSprout_Init(CrenelBeanSproutEntity* this) {
if (obj != NULL) {
PositionRelative(super, obj, -0x1c0000, -0x280000);
}
super->field_0x16 = 0x10;
super->carryFlags = 0x10;
super->spriteRendering.b0 = 3;
InitializeAnimation(super, 0xc);
CrenelBeanSprout_Action1(this);
@@ -114,7 +114,7 @@ void CrenelBeanSprout_Init(CrenelBeanSproutEntity* this) {
return;
} else {
super->type2 = 0;
super->field_0xf = 3;
super->subtimer = 3;
sub_080969A4(this);
DeleteThisEntity();
return;
@@ -241,13 +241,13 @@ void CrenelBeanSprout_Action4(CrenelBeanSproutEntity* this) {
gPlayerState.keepFacing |= 0x80;
gPlayerState.field_0xa |= 0x80;
gPlayerState.field_0x7 |= 0x80;
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action = 6;
super->subAction = 0;
CreateDust(super);
}
} else {
super->actionDelay = 0xc0;
super->timer = 0xc0;
}
}
@@ -279,8 +279,8 @@ void CrenelBeanSprout_Action6SubAction0(CrenelBeanSproutEntity* this) {
3,
};
SetLocalFlag(super->type2);
super->actionDelay = 0x0f;
super->field_0xf = gUnk_081231AC[super->type >> 1];
super->timer = 0x0f;
super->subtimer = gUnk_081231AC[super->type >> 1];
super->type2 = 0;
super->spriteSettings.draw = 0;
super->subAction++;
@@ -294,22 +294,22 @@ void CrenelBeanSprout_Action6SubAction0(CrenelBeanSproutEntity* this) {
void CrenelBeanSprout_Action6SubAction1(CrenelBeanSproutEntity* this) {
static const u16 gUnk_081231AE[] = { 0x1cc, 0x1cb, 0x1c9 };
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->y.HALF.HI += -0x10;
sub_0807B7D8(gUnk_081231AE[super->type2], COORD_TO_TILE(super), super->collisionLayer);
super->type2++;
if (super->type2 == super->field_0xf) {
if (super->type2 == super->subtimer) {
gPlayerState.keepFacing &= 0x7f;
super->subAction++;
super->actionDelay = 0x3c;
super->timer = 0x3c;
} else {
super->actionDelay = 0x0f;
super->timer = 0x0f;
}
}
}
void CrenelBeanSprout_Action6SubAction2(CrenelBeanSproutEntity* this) {
if ((super->actionDelay != 0) && (--super->actionDelay == 0)) {
if ((super->timer != 0) && (--super->timer == 0)) {
SoundReq(SFX_SECRET);
}
}
@@ -321,7 +321,7 @@ void sub_080969A4(CrenelBeanSproutEntity* this) {
} else {
sub_0807B7D8(0x1cd, COORD_TO_TILE(super), super->collisionLayer);
}
while (super->type2 != super->field_0xf) {
while (super->type2 != super->subtimer) {
super->y.HALF.HI -= 0x10;
sub_0807B7D8(gUnk_081231B4[super->type2], COORD_TO_TILE(super), super->collisionLayer);
super->type2++;
+4 -4
View File
@@ -43,11 +43,11 @@ void DeathFx_Action0(DeathFxObject* this) {
super->collisionLayer = 2;
UpdateSpriteForCollisionLayer(&this->base);
super->spriteRendering.b0 = 3;
if (super->actionDelay == 0) {
if (super->timer == 0) {
tmp = 0x80;
} else {
tmp = super->actionDelay;
super->actionDelay = 0;
tmp = super->timer;
super->timer = 0;
}
SetAffineInfo(super, tmp, tmp, 0);
LoadSwapGFX(super, 4, 0);
@@ -67,7 +67,7 @@ void DeathFx_Action0(DeathFxObject* this) {
uVar4 &= 3;
parent = super->parent;
if (parent != NULL) {
parent->actionDelay = gUnk_0811EC20[uVar4];
parent->timer = gUnk_0811EC20[uVar4];
}
InitializeAnimation(&this->base, uVar4);
}
+1 -1
View File
@@ -81,7 +81,7 @@ void DoubleBookshelf_Action1(DoubleBookshelfEntity* this) {
void DoubleBookshelf_Action2(DoubleBookshelfEntity* this) {
LinearMoveUpdate(super);
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action = 1;
this->unk_80 = COORD_TO_TILE(super);
SetPlayerControl(CONTROL_ENABLED);
+3 -3
View File
@@ -29,7 +29,7 @@ void EnemyItem(EnemyItemEntity* this) {
}
if (super->action == 0) {
super->action++;
super->type = super->actionDelay;
super->type = super->timer;
super->child = NULL;
list = &gEntityLists[4];
for (entity = list->first; entity != (Entity*)list; entity = entity->next) {
@@ -65,7 +65,7 @@ void sub_080A2508(EnemyItemEntity* this) {
entity = (EnemyItemEntity*)CreateObjectWithParent(super, GROUND_ITEM, super->type, 0);
if (entity != NULL) {
(entity->base).actionDelay = 5;
(entity->base).timer = 5;
entity->unk_86 = this->unk_86;
}
sub_080A2500(this);
@@ -76,7 +76,7 @@ void sub_080A2534(EnemyItemEntity* this) {
entity = (EnemyItemEntity*)CreateObjectWithParent(super, GROUND_ITEM, super->type, 0);
if (entity != NULL) {
(entity->base).actionDelay = 4;
(entity->base).timer = 4;
entity->unk_86 = this->unk_86;
}
sub_080A2500(this);
+6 -6
View File
@@ -29,7 +29,7 @@ void EyeSwitch(Entity* this) {
void sub_080886A4(EyeSwitchEntity* this) {
super->animationState = super->type & 3;
super->spritePriority.b0 = 6;
super->field_0x3c = 7;
super->collisionFlags = 7;
super->hurtType = 0x48;
super->hitType = 1;
super->flags2 = 2;
@@ -45,8 +45,8 @@ void sub_080886A4(EyeSwitchEntity* this) {
}
void sub_08088718(EyeSwitchEntity* this) {
if ((super->bitfield == 0x95 || super->bitfield == 0x8e) &&
(DirectionRoundUp(super->field_0x4c->direction) >> 3 == (super->animationState & 3))) {
if ((super->contactFlags == 0x95 || super->contactFlags == 0x8e) &&
(DirectionRoundUp(super->contactedEntity->direction) >> 3 == (super->animationState & 3))) {
super->action = 2;
COLLISION_OFF(super);
EnqueueSFX(SFX_111);
@@ -58,15 +58,15 @@ void sub_08088760(EyeSwitchEntity* this) {
GetNextFrame(super);
if ((super->frame & ANIM_DONE) != 0) {
super->action = 3;
this->unk70 = super->actionDelay << 1;
this->unk70 = super->timer << 1;
InitializeAnimation(super, super->animationState + 4);
}
}
void sub_08088790(EyeSwitchEntity* this) {
if (super->actionDelay != 0) {
if (super->timer != 0) {
if ((this->eyeSwitchFlags2 != this->eyeSwitchFlags) && (CheckFlags(this->eyeSwitchFlags))) {
super->actionDelay = 0;
super->timer = 0;
} else {
if (--this->unk70 == 0) {
super->action = 4;
+22 -22
View File
@@ -68,12 +68,12 @@ void EzloCap_Type0Init(EzloCapEntity* this) {
}
LoadSwapGFX(super, 1, 3);
if (super->type == 0) {
super->field_0xf = 7;
super->subtimer = 7;
InitAnimationForceUpdate(super, 7);
SoundReq(SFX_F3);
} else {
super->actionDelay = 0;
super->field_0xf = 0xa;
super->timer = 0;
super->subtimer = 0xa;
super->y.HALF.HI -= 0xe;
InitAnimationForceUpdate(super, 0x14);
}
@@ -89,30 +89,30 @@ void EzloCap_Type0Action1(EzloCapEntity* this) {
}
if ((gMessage.doTextBox & 0x7f) != 5) {
if (((gMessage.unk == 0xa) || (gMessage.unk == 0)) || ((gMessage.unk & 0xf) > 9)) {
if (super->animIndex != (super->field_0xf | 3)) {
InitAnimationForceUpdate(super, super->field_0xf | 3);
if (super->animIndex != (super->subtimer | 3)) {
InitAnimationForceUpdate(super, super->subtimer | 3);
return;
}
} else {
if ((gMessage.unk & 0x80) != 0) {
if ((super->frame & 0x90) != 0) {
super->field_0xf = gUnk_0811F16C[(s32)Random() % 9];
InitAnimationForceUpdate(super, super->field_0xf);
super->subtimer = gUnk_0811F16C[(s32)Random() % 9];
InitAnimationForceUpdate(super, super->subtimer);
return;
}
} else {
if (super->animIndex != gUnk_0811F16C[gMessage.unk]) {
super->field_0xf = gUnk_0811F16C[gMessage.unk];
InitAnimationForceUpdate(super, super->field_0xf);
super->subtimer = gUnk_0811F16C[gMessage.unk];
InitAnimationForceUpdate(super, super->subtimer);
return;
}
}
}
}
if (super->animIndex > 7) {
super->actionDelay = 1;
super->timer = 1;
} else {
super->actionDelay = 0;
super->timer = 0;
}
UpdateAnimationSingleFrame(super);
}
@@ -127,10 +127,10 @@ void EzloCap_Type1Action1(EzloCapEntity* this) {
}
UpdateAnimationSingleFrame(super);
if (super->subAction == 0) {
if (super->field_0xf-- == 0) {
super->actionDelay++;
super->field_0xf = 0xa;
tmp = super->actionDelay - 1;
if (super->subtimer-- == 0) {
super->timer++;
super->subtimer = 0xa;
tmp = super->timer - 1;
obj = CreateObjectWithParent(super, OBJECT_79, tmp, 0);
super->child = obj;
if (obj != NULL) {
@@ -140,23 +140,23 @@ void EzloCap_Type1Action1(EzloCapEntity* this) {
obj->parent = super->parent;
}
}
if (super->actionDelay == 6) {
if (super->timer == 6) {
super->subAction = 3;
super->actionDelay = 0x3c;
super->timer = 0x3c;
super->parent->type2 = 1;
InitAnimationForceUpdate(super, 0x1c);
} else {
InitAnimationForceUpdate(super, gUnk_0811F178[super->actionDelay - 1]);
if (super->actionDelay > 2) {
InitAnimationForceUpdate(super, gUnk_0811F178[super->timer - 1]);
if (super->timer > 2) {
super->spriteSettings.flipX = 1;
}
}
}
} else if ((super->frame & ANIM_DONE) != 0) {
super->actionDelay = Random() & 3;
if (super->actionDelay != 0) {
super->timer = Random() & 3;
if (super->timer != 0) {
super->spriteSettings.flipX = Random() & 1;
InitAnimationForceUpdate(super, super->actionDelay + 0x1b);
InitAnimationForceUpdate(super, super->timer + 0x1b);
}
}
}
+18 -18
View File
@@ -40,13 +40,13 @@ void Fairy(FairyEntity* this) {
Fairy_Init, Fairy_Action1, Fairy_Action2, Fairy_Action3, Fairy_Action4,
};
if (((super->bitfield & 0x80) != 0)) {
switch (super->bitfield & 0x7f) {
if (((super->contactFlags & 0x80) != 0)) {
switch (super->contactFlags & 0x7f) {
case 0x14:
super->action = 3;
super->flags &= ~ENT_COLLIDE;
super->spriteSettings.draw = 1;
super->child = super->field_0x4c;
super->child = super->contactedEntity;
break;
case 0x1f:
DeleteThisEntity();
@@ -84,7 +84,7 @@ void sub_0808D76C(FairyEntity* this) {
void Fairy_SubAction0(FairyEntity* this) {
super->subAction = 1;
super->field_0x1d = 1;
super->gustJarTolerance = 1;
super->spriteSettings.draw = 1;
}
@@ -100,13 +100,13 @@ void Fairy_SubAction2(FairyEntity* this) {
void Fairy_Init(FairyEntity* this) {
super->collisionLayer = 3;
super->field_0x3c = 0x17;
super->collisionFlags = 0x17;
super->hurtType = 0x49;
super->hitType = 7;
super->flags2 = 0x17;
super->health = 0xff;
super->hitbox = (Hitbox*)&gUnk_080FD1A8;
super->field_0x1c = 1;
super->gustJarFlags = 1;
this->unk_74 = super->x.HALF.HI;
this->unk_76 = super->y.HALF.HI;
SetDefaultPriority(super, 6);
@@ -132,13 +132,13 @@ void Fairy_Init(FairyEntity* this) {
void Fairy_Action1(FairyEntity* this) {
super->z.WORD -= 0xe000;
if (super->frame != 0) {
if (super->actionDelay != 0) {
if (super->timer != 0) {
this->unk_78 *= 0x1e;
} else {
this->unk_78 = 600;
}
super->action = 2;
super->field_0xf = 1;
super->subtimer = 1;
super->speed = 0x80;
}
}
@@ -150,10 +150,10 @@ void Fairy_Action2(FairyEntity* this) {
0,
0,
};
if (--super->field_0xf == 0) {
if (--super->subtimer == 0) {
u32 rand = Random();
super->flags |= ENT_COLLIDE;
super->field_0xf = 0x20;
super->subtimer = 0x20;
super->speed = (u16)gUnk_081217A4[rand >> 8 & 1];
if (sub_0808DAA0(this)) {
super->direction = rand & 0x1f;
@@ -192,27 +192,27 @@ void Fairy_Action4(FairyEntity* this) {
s32 tmp;
child = super->child;
tmp = gSineTable[super->actionDelay] * 0xa00;
tmp = gSineTable[super->timer] * 0xa00;
if (tmp < 0) {
tmp += 0xffff;
}
super->x.HALF.HI = (tmp >> 0x10) + child->x.HALF.HI;
tmp = gSineTable[super->actionDelay + 0x40] * 0x500;
tmp = gSineTable[super->timer + 0x40] * 0x500;
if (tmp < 0) {
tmp += 0xffff;
}
super->y.HALF.HI = child->y.HALF.HI - (tmp >> 0x10);
super->actionDelay += 8;
super->timer += 8;
super->z.HALF.HI = child->z.HALF.HI;
super->spriteOrientation.flipY = child->spriteOrientation.flipY;
super->spriteRendering.b3 = child->spriteRendering.b3;
if ((u8)(super->actionDelay - 0x41) < 0x7f) {
if ((u8)(super->timer - 0x41) < 0x7f) {
super->spritePriority.b0 = 3;
} else {
super->spritePriority.b0 = 5;
}
if (--super->field_0xf == 0) {
super->field_0xf = 6;
if (--super->subtimer == 0) {
super->subtimer = 6;
if (((--super->spriteOffsetY) * 0x1000000) >> 0x18 < -0x16) {
sub_08081404(super, 1);
}
@@ -239,8 +239,8 @@ void sub_0808DAD0(FairyEntity* this) {
DeleteThisEntity();
}
super->action = 4;
super->actionDelay = 0x80;
super->field_0xf = 6;
super->timer = 0x80;
super->subtimer = 6;
super->flags &= ~ENT_COLLIDE;
super->spriteSettings.draw = 1;
super->spritePriority.b1 = 2;
+7 -7
View File
@@ -99,7 +99,7 @@ void sub_0809EE24(FanEntity* this) {
void sub_0809EE34(FanEntity* this) {
super->action = 1;
this->unk74 = super->actionDelay << 2;
this->unk74 = super->timer << 2;
}
void sub_0809EE44(FanEntity* this) {
@@ -138,7 +138,7 @@ void sub_0809EE44(FanEntity* this) {
break;
break;
case 0x4:
if (super->field_0xf != 0)
if (super->subtimer != 0)
bVar3 = 1;
break;
case 0x11:
@@ -215,18 +215,18 @@ void sub_0809EFB0(FanEntity* this) {
}
void sub_0809F08C(FanEntity* this) {
if (super->field_0xf != 0) {
super->field_0xf--;
if (super->subtimer != 0) {
super->subtimer--;
}
GetNextFrame(super);
if (super->frame & 0x20) {
super->frame &= ~0x20;
super->field_0xf = 20;
super->subtimer = 20;
sub_0809F0E4(this);
} else {
if ((super->frame & 0x10) && super->field_0xf == 0) {
super->field_0xf = 20;
if ((super->frame & 0x10) && super->subtimer == 0) {
super->subtimer = 20;
super->frame ^= 0x10;
sub_0809F0E4(this);
}
+12 -12
View File
@@ -112,8 +112,8 @@ void FigurineDevice_Init(FigurineDeviceEntity* this) {
InitializeAnimation(super, 1);
break;
case 3:
super->actionDelay = 0x1e;
super->field_0xf = 0;
super->timer = 0x1e;
super->subtimer = 0;
this->unk_81 = 1;
this->unk_7a = 0;
this->unk_7b = 0;
@@ -176,9 +176,9 @@ void FigurineDevice_Action2(FigurineDeviceEntity* this) {
entity = CreateObject(FIGURINE_DEVICE, 2, 0);
if (entity != NULL) {
entity->parent = super;
entity->field_0xf = this->unk_7d;
entity->subtimer = this->unk_7d;
ptr = (u8*)gUnk_080FC3E4; // FIXME use struct
entity->type2 = ptr[(entity->field_0xf << 3) + 7];
entity->type2 = ptr[(entity->subtimer << 3) + 7];
PositionRelative(super, entity, 0x80000, 0x70000);
}
EnqueueSFX(SFX_111);
@@ -199,7 +199,7 @@ void FigurineDevice_Action3(FigurineDeviceEntity* this) {
case 0:
if ((super->frame & ANIM_DONE) != 0) {
this->unk_7a = 1;
super->actionDelay = 0x28;
super->timer = 0x28;
ChangeObjPalette(super, gUnk_08120AA8[super->type2]);
InitializeAnimation(super, 2);
SoundReq(SFX_110);
@@ -207,10 +207,10 @@ void FigurineDevice_Action3(FigurineDeviceEntity* this) {
break;
case 1:
if (((super->frame & ANIM_DONE) != 0) && (--super->actionDelay == 0)) {
if (((super->frame & ANIM_DONE) != 0) && (--super->timer == 0)) {
this->unk_7a = 2;
SetRoomFlag(2);
MenuFadeIn(7, super->field_0xf);
MenuFadeIn(7, super->subtimer);
}
break;
case 2:
@@ -248,13 +248,13 @@ void FigurineDevice_Action4(FigurineDeviceEntity* this) {
}
break;
case 1:
if (super->actionDelay != 0) {
super->actionDelay--;
if (super->timer != 0) {
super->timer--;
}
if ((gInput.newKeys & 1) != 0) {
SoundReq(SFX_TEXTBOX_SELECT);
this->unk_7a = 2;
super->actionDelay = 0x3c;
super->timer = 0x3c;
sub_08050384();
return;
}
@@ -322,8 +322,8 @@ void sub_08087F58(FigurineDeviceEntity* this) {
ASM_FUNC("asm/non_matching/figurineDevice/sub_08087F94.inc", void sub_08087F94(FigurineDeviceEntity* this, s32 param_2))
void sub_08088034(FigurineDeviceEntity* this) {
if (super->actionDelay == 0) {
super->actionDelay = 0x14;
if (super->timer == 0) {
super->timer = 0x14;
SoundReq(SFX_MENU_ERROR);
}
}
+5 -5
View File
@@ -394,8 +394,8 @@ void sub_0808ED98(Entity* this) {
this->y.HALF.HI = y;
this->field_0x6a.HWORD = y;
this->field_0xf++;
this->spriteOffsetY = gUnk_08121D10[(this->field_0xf / 4) & 0x7];
this->subtimer++;
this->spriteOffsetY = gUnk_08121D10[(this->subtimer / 4) & 0x7];
sub_0808EF6C(this);
}
@@ -424,9 +424,9 @@ void nullsub_522(Entity* this) {
}
void sub_0808EE98(Entity* this) {
this->actionDelay = gUI.lastState;
this->frameIndex = gUnk_08121D48[this->actionDelay];
if (this->actionDelay != 2) {
this->timer = gUI.lastState;
this->frameIndex = gUnk_08121D48[this->timer];
if (this->timer != 2) {
this->field_0x68.HWORD = 96;
} else {
this->field_0x68.HWORD = -96;
+2 -2
View File
@@ -27,7 +27,7 @@ void sub_0809B708(Entity* this) {
void sub_0809B7A0(Entity* this) {
sub_0809B7C0(this);
if (this->actionDelay) {
if (this->timer) {
SetFlag(this->field_0x86.HWORD);
DeleteThisEntity();
}
@@ -43,5 +43,5 @@ void sub_0809B7C0(Entity* this) {
void sub_0809B7DC(Entity* this) {
sub_0807B7D8(0xc3 << 2, TILE(this->x.HALF.HI, this->y.HALF.HI), 2);
SetTile(0x4062, TILE(this->x.HALF.HI, this->y.HALF.HI), this->collisionLayer);
this->actionDelay = 1;
this->timer = 1;
}
+3 -3
View File
@@ -35,14 +35,14 @@ void sub_080860D8(FloatingPlatformEntity* this) {
void sub_0808611C(FloatingPlatformEntity* this) {
bool32 iVar2 = sub_08086168(this);
if (super->actionDelay != 0 && super->parent->actionDelay == 0) {
if (super->timer != 0 && super->parent->timer == 0) {
if (iVar2) {
super->parent->actionDelay++;
super->parent->timer++;
}
sub_080A2BE4(super, iVar2);
} else if (super->actionDelay == 0) {
} else if (super->timer == 0) {
sub_080A2BE4(super, iVar2);
} else {
sub_080A2BE4(super, FALSE);
+4 -4
View File
@@ -92,7 +92,7 @@ void FourElements_Action2(FourElementsEntity* this) {
DeleteEntity(super->child);
super->spriteSettings.draw = 0;
super->action = 3;
super->actionDelay = 0x2d;
super->timer = 0x2d;
gScreen.controls.layerFXControl = 0x640;
gScreen.controls.alphaBlend = 0;
InitItemGetSequence(super->type, 0, 1);
@@ -106,9 +106,9 @@ void FourElements_Action2(FourElementsEntity* this) {
}
void FourElements_Action3(FourElementsEntity* this) {
if (super->actionDelay != 0) {
if (super->timer != 0) {
sub_080A0424(this);
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
SetDefaultPriority(&gPlayerEntity, 0);
}
} else {
@@ -159,7 +159,7 @@ void sub_080A0444(FourElementsEntity* this) {
static const u8 gUnk_081248B4[] = {
249, 248, 247, 246, 245, 246, 247, 248,
};
super->z.HALF.HI = gUnk_081248B4[(super->field_0xf++ >> 3) & 7] << 0x18 >> 0x18;
super->z.HALF.HI = gUnk_081248B4[(super->subtimer++ >> 3) & 7] << 0x18 >> 0x18;
}
void sub_080A0464(FourElementsEntity* this, ScriptExecutionContext* context) {
+10 -10
View File
@@ -80,7 +80,7 @@ ASM_FUNC("asm/non_matching/frozenOctorok/FrozenOctorok_Action1.inc",
void FrozenOctorok_Action1SubAction0(FrozenOctorokEntity* this) {
Entity* child;
if (super->field_0xf != 0) {
if (super->subtimer != 0) {
if (this->unk_7e == 0) {
child = super->child;
if (child->z.HALF.HI > -0x10) {
@@ -108,7 +108,7 @@ void FrozenOctorok_Action1SubAction1(FrozenOctorokEntity* this) {
obj->y.HALF.HI -= 0x50;
gRoomControls.camera_target = obj;
}
if (super->field_0xf < 3) {
if (super->subtimer < 3) {
super->subAction = 2;
this->unk_79 = 0x1e;
SoundReq(SFX_THUD_HEAVY);
@@ -124,7 +124,7 @@ void FrozenOctorok_Action1SubAction2(FrozenOctorokEntity* this) {
if (this->unk_79-- == 0) {
super->subAction = 1;
this->unk_79 = 0x1e;
super->field_0xf++;
super->subtimer++;
return;
}
switch (this->unk_79 & 3) {
@@ -194,7 +194,7 @@ NONMATCH("asm/non_matching/frozenOctorok/FrozenOctorok_Action1SubAction5.inc",
super->subAction = 6;
super->speed = 0xc0;
super->type2 = 0;
super->field_0xf = 0;
super->subtimer = 0;
child = super->child;
child->spriteSettings.draw = 0;
this->heap->mouthObject->unk_76 = 0x100;
@@ -257,14 +257,14 @@ void sub_0809CB70(FrozenOctorokEntity* this, s32 angle, s32 radius) {
}
NONMATCH("asm/non_matching/frozenOctorok/sub_0809CBE4.inc", void sub_0809CBE4(FrozenOctorokEntity* this)) {
this->unk_79 += super->field_0xf;
if ((s8)super->field_0xf < 0) {
if (super->actionDelay < -(this->unk_79 << 0x18 >> 0x18)) {
super->field_0xf = -super->field_0xf;
this->unk_79 += super->subtimer;
if ((s8)super->subtimer < 0) {
if (super->timer < -(this->unk_79 << 0x18 >> 0x18)) {
super->subtimer = -super->subtimer;
SoundReq(SFX_19E);
}
} else if ((s8)this->unk_79 > super->actionDelay) {
super->field_0xf = -super->field_0xf;
} else if ((s8)this->unk_79 > super->timer) {
super->subtimer = -super->subtimer;
SoundReq(SFX_19E);
}
}
+1 -1
View File
@@ -77,7 +77,7 @@ void sub_0809BF74(FrozenWaterElementEntity* this) {
s32 tmp2;
if (--this->unk_74 == 0) {
(super->child)->field_0xf = 1;
(super->child)->subtimer = 1;
sub_0809C23C(this);
CheckFlags(0x9b);
DeleteThisEntity();
+10 -10
View File
@@ -259,23 +259,23 @@ static void FurnitureUpdate(FurnitureEntity* this) {
}
break;
case 0x8:
if (++super->actionDelay == 16) {
super->actionDelay = 0;
super->field_0xf = (super->field_0xf + 1) & 3;
if (++super->timer == 16) {
super->timer = 0;
super->subtimer = (super->subtimer + 1) & 3;
sub_08090E4C(this);
}
break;
case 0x10:
if (super->type != FORGE_HELPER) {
if (++super->actionDelay == 20) {
if (++super->timer == 20) {
super->frameIndex = (super->frameIndex + 1) & 3;
super->actionDelay = 0;
super->timer = 0;
}
} else {
if (++super->actionDelay == 14) {
super->actionDelay = 0;
super->field_0xf = (super->field_0xf + 1) % 3;
super->frameIndex = super->field_0xf + 1;
if (++super->timer == 14) {
super->timer = 0;
super->subtimer = (super->subtimer + 1) % 3;
super->frameIndex = super->subtimer + 1;
}
}
break;
@@ -444,7 +444,7 @@ static void sub_08090DC4(FurnitureEntity* this) {
static void sub_08090E4C(FurnitureEntity* this) {
static const u32 sPalettes[] = { 0x5f, 0x60, 0x61, 0x62 };
ChangeObjPalette(super, sPalettes[super->field_0xf]);
ChangeObjPalette(super, sPalettes[super->subtimer]);
}
void sub_08090E64(FurnitureEntity* this) {
+33 -33
View File
@@ -65,7 +65,7 @@ void GreatFairy_CallBehavior(Entity* this) {
// Init
void GreatFairy_Init(Entity* this) {
GreatFairy_InitializeAnimation(this);
this->actionDelay = 0;
this->timer = 0;
this->cutsceneBeh.HWORD = 290;
}
@@ -92,9 +92,9 @@ void GreatFairy_DormantUpdate(Entity* this) {
case 289:
ripple = GreatFairy_CreateForm(this, RIPPLE, 0);
if (ripple) {
PositionRelative(this, ripple, Q_16_16(GreatFairy_RippleOffsets[this->actionDelay]),
Q_16_16(GreatFairy_RippleOffsets[this->actionDelay + 1]));
this->actionDelay += 2;
PositionRelative(this, ripple, Q_16_16(GreatFairy_RippleOffsets[this->timer]),
Q_16_16(GreatFairy_RippleOffsets[this->timer + 1]));
this->timer += 2;
break;
}
}
@@ -122,7 +122,7 @@ void GreatFairy_SpawningUpdate(Entity* this) {
SetFade(6, 4);
SoundReq(SFX_145);
this->action = 4;
this->actionDelay = 60;
this->timer = 60;
this->spriteSettings.draw = 1;
}
}
@@ -132,15 +132,15 @@ void GreatFairy_MiniUpdate(Entity* this) {
Entity* target;
GetNextFrame(this);
if (this->actionDelay != 0) {
--this->actionDelay;
if (this->timer != 0) {
--this->timer;
} else {
target = GreatFairy_CreateForm(this, WINGS, 0);
if (target != NULL) {
PositionRelative(this, target, 0, Q_16_16(-20.0));
this->action = 5;
this->actionDelay = 120;
this->field_0xf = 0;
this->timer = 120;
this->subtimer = 0;
}
}
}
@@ -149,13 +149,13 @@ void GreatFairy_MiniUpdate(Entity* this) {
void GreatFairy_FinalUpdate(Entity* this) {
Entity* target;
if (this->actionDelay != 0) {
--this->actionDelay;
if (this->timer != 0) {
--this->timer;
} else {
if ((this->field_0xf == 0) && (target = GreatFairy_CreateForm(this, FORM9, 0), target != NULL)) {
if ((this->subtimer == 0) && (target = GreatFairy_CreateForm(this, FORM9, 0), target != NULL)) {
PositionRelative(this, target, 0, Q_16_16(-76.0));
target->parent = this;
this->field_0xf = 1;
this->subtimer = 1;
}
}
GetNextFrame(this);
@@ -220,7 +220,7 @@ void GreatFairy_MiniInit(Entity* this) {
aff->parent = this;
GreatFairy_InitializeAnimation(this);
this->spriteSettings.draw = 1;
this->field_0xf = 0;
this->subtimer = 0;
}
}
@@ -234,10 +234,10 @@ void GreatFairy_MiniRisingUpdate(Entity* this) {
this->action = 2;
SoundReq(SFX_HEART_CONTAINER_SPAWN);
} else {
if (((this->z.HALF.HI == -10) && (this->field_0xf == 0)) &&
if (((this->z.HALF.HI == -10) && (this->subtimer == 0)) &&
(target = GreatFairy_CreateForm(this, DROPLET, 0), target != NULL)) {
PositionRelative(this, target, 0, Q_16_16(4.0));
this->field_0xf = 1;
this->subtimer = 1;
}
}
}
@@ -270,7 +270,7 @@ void GreatFairy_MiniAffineInit2(Entity* this) {
if (this->z.HALF.HI == -20) {
this->action = 2;
this->actionDelay = 90;
this->timer = 90;
this->speed = 4096;
this->spriteRendering.b0 = 3;
SetAffineInfo(this, 256, 256, 0);
@@ -279,7 +279,7 @@ void GreatFairy_MiniAffineInit2(Entity* this) {
// Mini great fairy stretch
void GreatFairy_MiniAffineUpdate(Entity* this) {
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
gRoomVars.animFlags |= 1;
this->action = 3;
sub_0805EC60(this);
@@ -335,7 +335,7 @@ void GreatFairy_BigRippleCallBehavior(Entity* this) {
void GreatFairy_BigRippleInit(Entity* this) {
GreatFairy_InitializeAnimation(this);
this->actionDelay = 120;
this->timer = 120;
this->spriteSettings.draw = 1;
this->spritePriority.b0 = 5;
SoundReq(SFX_TELEPORTER);
@@ -345,8 +345,8 @@ void GreatFairy_BigRippleUpdate(Entity* this) {
Entity* target;
GetNextFrame(this);
if (this->actionDelay != 0) {
--this->actionDelay;
if (this->timer != 0) {
--this->timer;
} else {
target = GreatFairy_CreateForm(this, MINI, 0);
if (target != NULL) {
@@ -400,15 +400,15 @@ void nullsub_516(Entity* this) {
}
void sub_080871A8(Entity* this) {
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
this->action = 3;
this->actionDelay = 60;
this->timer = 60;
gRoomVars.animFlags |= 4;
}
}
void sub_080871D0(Entity* this) {
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
gRoomVars.animFlags |= 8;
DeleteEntity(this);
}
@@ -428,20 +428,20 @@ void sub_080871F8(Entity* this) {
void sub_08087240(Entity* this) {
if (gRoomVars.animFlags & 4) {
this->action = 3;
this->actionDelay = 20;
this->timer = 20;
this->direction = 16;
}
}
void sub_08087264(Entity* this) {
if (this->actionDelay != 0) {
this->actionDelay--;
if (this->timer != 0) {
this->timer--;
LinearMoveUpdate(this);
}
}
void sub_0808727C(Entity* this) {
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
DeleteEntity(this);
}
}
@@ -471,9 +471,9 @@ void sub_080872F8(Entity* this) {
(s16)this->field_0x6a.HWORD);
this->direction = (this->direction + gUnk_081207AC[Random() & 3]) & 0x1f;
}
temp = gSineTable[this->actionDelay + 64];
temp = gSineTable[this->timer + 64];
this->z.HALF.HI = (temp >> 6) - 8;
this->actionDelay++;
this->timer++;
}
void GreatFairy_InitializeAnimation(Entity* this) {
@@ -500,13 +500,13 @@ Entity* GreatFairy_CreateForm(Entity* this, u32 curForm, u32 parameter) {
void sub_080873D0(Entity* this) {
Entity* ent;
if (this->actionDelay != 0) {
this->actionDelay--;
if (this->timer != 0) {
this->timer--;
} else {
ent = GreatFairy_CreateForm(this, 8, 0);
if (ent != NULL) {
CopyPosition(this, ent);
this->actionDelay = 48;
this->timer = 48;
}
}
}
+14 -14
View File
@@ -120,7 +120,7 @@ void GyorgBossObject_FemalePhase1(GyorgBossObjectEntity* this) {
if (((GyorgHeap*)super->myHeap)->female->base.health == 0) {
// start male phase 1
super->action = 3;
super->actionDelay = 0x23;
super->timer = 0x23;
this->unk_6c = 1;
this->unk_78 = 0x400;
this->unk_7b = 1;
@@ -156,7 +156,7 @@ void GyorgBossObject_FemalePhase2(GyorgBossObjectEntity* this) {
// start male phase 2
((GyorgHeap*)super->myHeap)->male1->base.health = 12;
super->action = 5;
super->actionDelay = 0x23;
super->timer = 0x23;
this->unk_6c = 2;
this->unk_78 = 0x400;
this->unk_7b = 1;
@@ -191,7 +191,7 @@ void GyorgBossObject_FemalePhase3(GyorgBossObjectEntity* this) {
// start male phase 3
((GyorgHeap*)super->myHeap)->male2->base.health = 12;
super->action = 7;
super->actionDelay = 0x23;
super->timer = 0x23;
this->unk_6c = 0x104;
this->unk_78 = 0x400;
SoundReq(SFX_BOSS_DIE);
@@ -227,8 +227,8 @@ void GyorgBossObject_FemalePhase4(GyorgBossObjectEntity* this) {
gRoomTransition.field_0x39 = 0;
if (sub_08079F8C() && gPlayerEntity.z.HALF.HI == 0) {
super->action = 9;
super->actionDelay = 0;
super->field_0xf = 0xF0;
super->timer = 0;
super->subtimer = 0xF0;
this->timer = 0x1a4;
super->direction = 0;
super->speed = 0x60;
@@ -246,12 +246,12 @@ void GyorgBossObject_FightEnd(GyorgBossObjectEntity* this) {
if (this->timer == 0) {
LinearMoveUpdate(super);
sub_080A1E54(this);
if (--super->field_0xf == 0) {
if (--super->subtimer == 0) {
SetFlag(0x7B);
sub_0808091C(&gUnk_0813ABD0, 8);
return;
}
if (super->field_0xf == 0x3C) {
if (super->subtimer == 0x3C) {
SetFade(7, 4);
}
return;
@@ -350,7 +350,7 @@ void sub_080A1DCC(GyorgBossObjectEntity* this) {
void sub_080A1E54(GyorgBossObjectEntity* this) {
Entity* fx;
if ((++super->actionDelay & 0x1F) == 0) {
if ((++super->timer & 0x1F) == 0) {
fx = CreateFx(super, FX_GIANT_EXPLOSION4, 0);
if (fx) {
u32 r = Random();
@@ -444,9 +444,9 @@ void GyorgBossObject_SpawnChildren(u32 unk0, bool32 fromBlue, u32 animationState
}
void sub_080A1FF0(GyorgBossObjectEntity* this) {
if (super->actionDelay != 0) {
super->actionDelay--;
if (super->actionDelay <= 0x20 && (super->actionDelay & 0xF) == 0) {
if (super->timer != 0) {
super->timer--;
if (super->timer <= 0x20 && (super->timer & 0xF) == 0) {
Entity* fx;
fx = CreateFx(super, FX_GIANT_EXPLOSION4, 0);
if (fx) {
@@ -462,10 +462,10 @@ void sub_080A1FF0(GyorgBossObjectEntity* this) {
if (this->unk_7b) {
if (EntityWithinDistance(&gPlayerEntity, gRoomControls.origin_x + 0x200, gRoomControls.origin_y + 0x210,
0x100)) {
if (super->actionDelay == 0) {
super->actionDelay = 0x78;
if (super->timer == 0) {
super->timer = 0x78;
} else {
if (super->actionDelay == 0x23) {
if (super->timer == 0x23) {
InitScreenShake(0x1e, 0);
}
}
+3 -3
View File
@@ -44,13 +44,13 @@ static void sub_0808E6E4(Entity* this) {
}
static void sub_0808E714(Entity* this) {
int var0 = 0x400 - this->field_0xf * 8;
int var0 = 0x400 - this->subtimer * 8;
if (var0 > 0x100) {
this->field_0xf++;
this->subtimer++;
SetAffineInfo(this, var0, var0, 0);
} else {
this->action = 3;
this->field_0x3c |= 0x10;
this->collisionFlags |= 0x10;
sub_0805EC60(this);
SoundReq(SFX_HEART_CONTAINER_SPAWN);
}
+2 -2
View File
@@ -33,7 +33,7 @@ void HittableLever(HittableLeverEntity* this) {
void HittableLever_Init(HittableLeverEntity* this) {
super->action = 1;
super->flags |= ENT_COLLIDE;
super->field_0x3c = 7;
super->collisionFlags = 7;
super->hitType = 0x8f;
super->flags2 = 0xa;
super->hitbox = (Hitbox*)&HittableLever_Hitbox;
@@ -50,7 +50,7 @@ void HittableLever_Init(HittableLeverEntity* this) {
}
void HittableLever_Idle(HittableLeverEntity* this) {
if (((super->bitfield & 0x80) != 0) && (this->wasHit == 0)) {
if (((super->contactFlags & 0x80) != 0) && (this->wasHit == 0)) {
this->wasHit = 1;
super->type ^= 1;
super->iframes = -0x18;
+8 -8
View File
@@ -43,7 +43,7 @@ void sub_080866D8(Entity* this) {
if (this->action == 0) {
this->action = 1;
*((u32*)(&this->field_0x68)) = 0;
this->field_0x6c.HALF.LO = this->actionDelay;
this->field_0x6c.HALF.LO = this->timer;
SetDefaultPriority(this, PRIO_PLAYER_EVENT);
}
@@ -94,7 +94,7 @@ void sub_0808681C(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
this->actionDelay = 8;
this->timer = 8;
this->spriteSettings.draw = 1;
this->frameIndex = 0;
this->hitbox = &gUnk_081206AC;
@@ -127,7 +127,7 @@ void sub_080868B0(Entity* this) {
this->action = 1;
this->spriteSettings.draw = 1;
this->hitbox = &gUnk_081206AC;
this->actionDelay = 8;
this->timer = 8;
}
ExecuteScript(this, *(ScriptExecutionContext**)&this->cutsceneBeh);
sub_080868EC(this, *(void**)&this->cutsceneBeh);
@@ -159,25 +159,25 @@ void sub_0808692C(Entity* this) {
this->type2 = 2;
this->action = (this->frameIndex == 0) ? 1 : 2;
this->subAction = 0;
this->actionDelay = 8;
this->timer = 8;
}
static u8 sub_08086954(Entity* this) {
if (sub_0800445C(this)) {
if (GetAnimationStateInRectRadius(this, 6, 20) >= 0 && gPlayerEntity.animationState == 0 &&
(u16)gPlayerState.field_0x90 == 0x400 && gPlayerState.jump_status == 0) {
this->actionDelay--;
this->timer--;
}
} else {
this->actionDelay = 8;
this->timer = 8;
}
return this->actionDelay;
return this->timer;
}
void sub_080869A4(Entity* this, ScriptExecutionContext* context) {
context->condition = 0;
if (!sub_08086954(this)) {
this->actionDelay = 8;
this->timer = 8;
context->condition = 1;
}
}
+5 -5
View File
@@ -61,10 +61,10 @@ void HouseDoorInterior_Init(HouseDoorInteriorEntity* this) {
}
super->action = 1;
super->spriteSettings.draw = 1;
this->unk7d = super->actionDelay;
this->unk7d = super->timer;
super->spritePriority.b0 = 7;
super->hitbox = (Hitbox*)&HouseDoorInteriorHitbox;
super->actionDelay = 8;
super->timer = 8;
ptr = HouseDoorInteriorFrameIndices + super->type;
if (ptr->frameIndex == 0xff) {
super->frameIndex = super->type2;
@@ -87,13 +87,13 @@ void HouseDoorInterior_Action1(HouseDoorInteriorEntity* this) {
ptr = gUnk_081227CC + super->type2;
if (GetAnimationStateInRectRadius(super, ptr->x, ptr->y) >= 0 &&
ptr->animationState == gPlayerEntity.animationState && gPlayerState.field_0x90 & ptr->unk2) {
--super->actionDelay;
--super->timer;
}
} else {
super->actionDelay = 8;
super->timer = 8;
}
if (super->actionDelay == 0) {
if (super->timer == 0) {
super->action = 2;
sub_08078AC0(8, 0, 0);
SoundReq(SFX_111);
+6 -6
View File
@@ -23,7 +23,7 @@ typedef struct {
typedef struct {
u8 before[0x20];
u8 unk_20[0x4]; // TODO for Entity this is zVelocity which is not an array. spriteAnimation[super->field_0xf-6] does
u8 unk_20[0x4]; // TODO for Entity this is zVelocity which is not an array. spriteAnimation[super->subtimer-6] does
// not match.
} ModifiedParentEntity;
@@ -49,7 +49,7 @@ void ItemForSale(ItemForSaleEntity* this) {
if (CheckOnScreen(super)) {
sub_08080CB4(super);
}
switch (super->actionDelay) {
switch (super->timer) {
case 1:
case 2:
if (super->action == 1) {
@@ -66,13 +66,13 @@ void ItemForSale_Init(ItemForSaleEntity* this) {
super->action = 1;
super->spriteSettings.draw = 1;
super->spritePriority.b1 = 0;
super->field_0x16 = 0;
super->carryFlags = 0;
#ifdef EU
SetDefaultPriority(super, 6);
#endif
super->child = super;
sub_08081A5C(this);
switch (super->actionDelay) {
switch (super->timer) {
case 0:
super->hitbox = (Hitbox*)&gUnk_080FD328;
break;
@@ -133,7 +133,7 @@ void sub_080819B4(ItemForSaleEntity* this) {
if (gRoomVars.shopItemType == 0) {
if (super->parent != NULL) {
((ModifiedParentEntity*)super->parent)->unk_20[super->field_0xf] = 0xff;
((ModifiedParentEntity*)super->parent)->unk_20[super->subtimer] = 0xff;
}
DeleteThisEntity();
}
@@ -158,7 +158,7 @@ void sub_080819B4(ItemForSaleEntity* this) {
void sub_08081A5C(ItemForSaleEntity* this) {
u32 tmp = sub_080787D8(super);
if (super->actionDelay == 1) {
if (super->timer == 1) {
gUnk_03003DF0.array[tmp].unk_2 = 0;
}
}
+13 -13
View File
@@ -35,14 +35,14 @@ typedef struct {
extern const Unk_0811E84C gUnk_0811E84C[];
void ItemOnGround(Entity* this) {
if (this->bitfield & 0x80) {
switch (this->bitfield & 0x7F) {
if (this->contactFlags & 0x80) {
switch (this->contactFlags & 0x7F) {
case 20:
this->action = 3;
COLLISION_OFF(this);
this->spriteSettings.draw = 1;
this->field_0x3c |= 0x10;
this->child = this->field_0x4c;
this->collisionFlags |= 0x10;
this->child = this->contactedEntity;
break;
case 0:
case 1:
@@ -83,7 +83,7 @@ void sub_08080F20(Entity* this) {
this->spritePriority.b1 = 3;
this->spriteSettings.shadow = 0;
this->hitType = 7;
this->field_0x3c = 0x47;
this->collisionFlags = 0x47;
this->hurtType = 0x44;
this->health = 0xFF;
this->hitbox = (Hitbox*)&gUnk_080FD1A8;
@@ -105,19 +105,19 @@ void sub_08080F20(Entity* this) {
break;
}
this->field_0x68.HALF.HI = this->actionDelay;
this->field_0x68.HALF.HI = this->timer;
this->field_0x6a.HALF.LO = 0;
this->field_0x6c.HWORD = 0;
this->field_0x68.HALF.LO = 0;
this->actionDelay = 0;
this->timer = 0;
SetDefaultPriority(this, PRIO_NO_BLOCK);
this->field_0x1c = sub_0808147C(this->type);
this->gustJarFlags = sub_0808147C(this->type);
gUnk_0811E7E8[this->field_0x68.HALF.HI](this);
} else {
Entity* entity = CreateObject(FAIRY, 0x60, 0);
if (entity != NULL) {
entity->actionDelay = 0;
if (this->actionDelay == 1) {
entity->timer = 0;
if (this->timer == 1) {
entity->type2 = 2;
}
CopyPosition(this, entity);
@@ -286,7 +286,7 @@ void sub_08081328(Entity* this) {
}
void sub_0808136C(Entity* this) {
if (--this->actionDelay) {
if (--this->timer) {
Entity* other = this->child;
this->x.WORD = other->x.WORD;
this->y.WORD = other->y.WORD;
@@ -304,7 +304,7 @@ void sub_080813BC(Entity* this) {
void sub_080813D4(Entity* this) {
this->subAction = 1;
this->field_0x1d = 1;
this->gustJarTolerance = 1;
this->spriteSettings.draw = 1;
}
@@ -417,7 +417,7 @@ void sub_08081598(Entity* this) {
COLLISION_OFF(this);
this->action = 4;
this->actionDelay = 14;
this->timer = 14;
this->zVelocity = Q_16_16(2.0);
this->spriteSettings.draw = 1;
this->spritePriority.b1 = 2;
+5 -5
View File
@@ -18,7 +18,7 @@ void JarPortal(Entity* this) {
void sub_0808BE9C(Entity* this) {
COLLISION_ON(this);
this->hitType = 1;
this->field_0x3c = 0x47;
this->collisionFlags = 0x47;
this->hurtType = 0x44;
this->flags2 = 0x80;
this->field_0x68.HALF.LO = 0;
@@ -75,7 +75,7 @@ void sub_0808BF58(Entity* this) {
UpdateAnimationSingleFrame(this);
if (!this->z.HALF.HI) {
++this->action;
this->field_0xf = 0;
this->subtimer = 0;
InitAnimationForceUpdate(this, 1);
sub_0808C148(this, 1);
}
@@ -115,8 +115,8 @@ void sub_0808C01C(Entity* this, u32 r1) {
}
}
CreateMagicSparkles(this->x.HALF.HI, this->y.HALF.HI, this->collisionLayer);
if (this->field_0xf == 0) {
this->field_0xf = 1;
if (this->subtimer == 0) {
this->subtimer = 1;
SoundReq(SFX_NEAR_PORTAL);
}
}
@@ -151,7 +151,7 @@ void sub_0808C0AC(Entity* this) {
}
u32 sub_0808C128(Entity* this) {
return this->bitfield == 157;
return this->contactFlags == 157;
}
void sub_0808C13C(Entity* this) {
+26 -26
View File
@@ -61,8 +61,8 @@ void KeyStealingTakkuri_Type0_Init(KeyStealingTakkuriEntity* this) {
Entity* entity;
super->action++;
super->collisionLayer = 1;
super->actionDelay = 0x1e;
super->field_0xf = 0;
super->timer = 0x1e;
super->subtimer = 0;
super->spriteRendering.b3 = 1;
super->speed = 0;
super->direction = 0x18;
@@ -78,7 +78,7 @@ void KeyStealingTakkuri_Type0_Init(KeyStealingTakkuriEntity* this) {
}
void KeyStealingTakkuri_Type0_Action1(KeyStealingTakkuriEntity* this) {
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action++;
super->y.WORD += 0x100000;
super->z.WORD -= 0x100000;
@@ -92,8 +92,8 @@ void KeyStealingTakkuri_Type0_Action2(KeyStealingTakkuriEntity* this) {
sub_0809E1F0(this);
if ((s32)sub_080041DC(super, child->x.HALF.HI, child->y.HALF.HI) * 0x10 < super->speed) {
super->action++;
super->actionDelay = 0x10;
super->field_0xf = 1;
super->timer = 0x10;
super->subtimer = 1;
InitAnimationForceUpdate(super, 2);
}
UpdateAnimationSingleFrame(super);
@@ -101,8 +101,8 @@ void KeyStealingTakkuri_Type0_Action2(KeyStealingTakkuriEntity* this) {
void KeyStealingTakkuri_Type0_Action3(KeyStealingTakkuriEntity* this) {
sub_0809E1C8(this, sub_080045B4(super, gRoomControls.origin_x + 0x78, gRoomControls.origin_y + 0xa8));
if (super->actionDelay != 0) {
super->actionDelay--;
if (super->timer != 0) {
super->timer--;
super->speed -= 0x80;
}
sub_0809E1F0(this);
@@ -141,7 +141,7 @@ void KeyStealingTakkuri_Type1_Action1(KeyStealingTakkuriEntity* this) {
if (parent->next == NULL) {
DeleteThisEntity();
}
if (parent->field_0xf != 0) {
if (parent->subtimer != 0) {
PositionRelative(parent, super, 0, 0x80000);
}
super->spriteSettings.draw = parent->spriteSettings.draw;
@@ -160,15 +160,15 @@ void KeyStealingTakkuri_Type5_Init(KeyStealingTakkuriEntity* this) {
super->direction = 0x18;
super->speed = 0x100;
super->zVelocity = 0x20000;
super->actionDelay = 1;
super->timer = 1;
SoundReq(SFX_RUPEE_BOUNCE);
}
void KeyStealingTakkuri_Type5_Action1(KeyStealingTakkuriEntity* this) {
LinearMoveUpdate(super);
if (sub_080044EC(super, 0x2000) < 2) {
if (super->actionDelay != 0) {
super->actionDelay--;
if (super->timer != 0) {
super->timer--;
super->zVelocity = 0x10000;
} else {
super->action++;
@@ -189,8 +189,8 @@ void KeyStealingTakkuri_Type2_Init(KeyStealingTakkuriEntity* this) {
super->action++;
super->collisionLayer = 2;
super->actionDelay = 0x1e;
super->field_0xf = 1;
super->timer = 0x1e;
super->subtimer = 1;
super->spriteRendering.b3 = 1;
super->speed = 0;
super->direction = 0x18;
@@ -213,7 +213,7 @@ void KeyStealingTakkuri_Type2_Init(KeyStealingTakkuriEntity* this) {
}
void KeyStealingTakkuri_Type2_Action1(KeyStealingTakkuriEntity* this) {
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action++;
SoundReq(SFX_146);
}
@@ -236,7 +236,7 @@ void KeyStealingTakkuri_Type2_Action3(KeyStealingTakkuriEntity* this) {
this->unk_6e += 8;
if (--this->unk_6c == 0) {
super->action++;
super->actionDelay = 0x1e;
super->timer = 0x1e;
super->spriteSettings.flipX = 0;
} else {
sub_0809E238(this);
@@ -246,7 +246,7 @@ void KeyStealingTakkuri_Type2_Action3(KeyStealingTakkuriEntity* this) {
}
void KeyStealingTakkuri_Type2_Action4(KeyStealingTakkuriEntity* this) {
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action++;
SoundReq(SFX_15B);
}
@@ -276,8 +276,8 @@ void KeyStealingTakkuri_Type3_Init(KeyStealingTakkuriEntity* this) {
super->action++;
super->collisionLayer = 2;
super->actionDelay = 0xa;
super->field_0xf = 0;
super->timer = 0xa;
super->subtimer = 0;
super->spriteRendering.b3 = 1;
super->speed = 0;
super->direction = gUnk_0812412D[super->type2];
@@ -306,7 +306,7 @@ void KeyStealingTakkuri_Type3_Action1(KeyStealingTakkuriEntity* this) {
switch (sub_0809E2C4(this, super->type2)) {
case 1:
super->action += 2;
super->actionDelay = 0xff;
super->timer = 0xff;
InitAnimationForceUpdate(super, super->animIndex + 2);
SoundReq(SFX_123);
child = super->child;
@@ -320,17 +320,17 @@ void KeyStealingTakkuri_Type3_Action1(KeyStealingTakkuriEntity* this) {
}
break;
case 2:
if (super->actionDelay == 0) {
if (super->timer == 0) {
super->action++;
InitAnimationForceUpdate(super, super->animIndex + 2);
SoundReq(SFX_123);
SoundReq(SFX_1F3);
} else {
super->actionDelay--;
super->timer--;
}
break;
default:
super->actionDelay = 0xa;
super->timer = 0xa;
break;
}
UpdateAnimationSingleFrame(super);
@@ -342,7 +342,7 @@ void KeyStealingTakkuri_Type3_Action2(KeyStealingTakkuriEntity* this) {
child = super->child;
if ((child != NULL) && ((((child->x.HALF.HI - super->x.HALF.HI) ^ super->direction << 0xb) & 0x8000) != 0)) {
super->action++;
super->field_0xf = 1;
super->subtimer = 1;
SoundReq(SFX_102);
}
KeyStealingTakkuri_Type3_Action3(this);
@@ -357,7 +357,7 @@ void KeyStealingTakkuri_Type3_Action3(KeyStealingTakkuriEntity* this) {
if (child != NULL) {
child->parent = NULL;
}
tmp = super->actionDelay & 0x80;
tmp = super->timer & 0x80;
if (tmp != 0) {
DeleteThisEntity();
} else {
@@ -394,7 +394,7 @@ void sub_0809E0A0(KeyStealingTakkuriEntity* this) {
if (obj != NULL) {
obj->parent = super;
super->child = obj;
super->field_0xf = 0;
super->subtimer = 0;
CopyPosition(&gPlayerEntity, obj);
obj->z.HALF.HI = 0xfff8;
}
@@ -446,7 +446,7 @@ void sub_0809E0D4(KeyStealingTakkuriEntity* this, ScriptExecutionContext* contex
if ((varX3 < 1) && (varY3 < 1)) {
super->x.HALF.HI = varX;
super->y.HALF.HI = varY;
super->field_0xf = 1;
super->subtimer = 1;
SoundReq(SFX_102);
} else {
gActiveScriptInfo.commandSize = 0;
+3 -3
View File
@@ -12,7 +12,7 @@ void LadderUp(Entity* this) {
switch (this->action) {
case 0:
if (this->actionDelay) {
if (this->timer) {
uVar4 = 1;
} else {
#ifndef EU
@@ -43,13 +43,13 @@ void LadderUp(Entity* this) {
SoundReq(SFX_10B);
this->action = 2;
#ifndef EU
this->actionDelay = 0x3c;
this->timer = 0x3c;
#endif
}
break;
case 2:
#ifndef EU
if (--this->actionDelay) {
if (--this->timer) {
return;
}
this->action = 3;
+8 -8
View File
@@ -105,7 +105,7 @@ void sub_08092344(LavaPlatformEntity* this) {
LavaPlatform_Type1Init, LavaPlatform_Type1Action1, LavaPlatform_Type1Action2, LavaPlatform_Type1Action3,
LavaPlatform_Type1Action4, LavaPlatform_Type1Action5, LavaPlatform_Type1Action6, LavaPlatform_Type1Action7,
};
super->field_0xf = 0;
super->subtimer = 0;
LavaPlatform_Type1Actions[super->action](this);
sub_080926E4(this);
}
@@ -114,7 +114,7 @@ void LavaPlatform_Type1Init(LavaPlatformEntity* this) {
super->animationState = super->type2;
super->spritePriority.b0 = 7;
super->hurtType = 0x48;
super->field_0x3c = 7;
super->collisionFlags = 7;
super->flags2 = 0x81;
super->hitbox = (Hitbox*)&gUnk_080FD280;
sub_0809264C(this);
@@ -134,13 +134,13 @@ void LavaPlatform_Type1Action1(LavaPlatformEntity* this) {
}
void LavaPlatform_Type1Action2(LavaPlatformEntity* this) {
if (super->bitfield == 0x9d) {
if (super->contactFlags == 0x9d) {
sub_08092620(this);
} else {
if (LavaPlatform_IsPlayerOnPlatform(this)) {
super->action = 3;
super->flags &= ~ENT_COLLIDE;
super->actionDelay = 0x14;
super->timer = 0x14;
gPlayerState.field_0x3f = 0xfd;
}
}
@@ -151,7 +151,7 @@ void LavaPlatform_Type1Action3(LavaPlatformEntity* this) {
if (LavaPlatform_IsPlayerOnPlatform(this)) {
gPlayerState.field_0x3f = 0xfd;
}
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action = 4;
this->timer = this->wobbleTime;
super->spriteOffsetY = 0;
@@ -226,7 +226,7 @@ void LavaPlatform_Type1Action6(LavaPlatformEntity* this) {
}
void LavaPlatform_Type1Action7(LavaPlatformEntity* this) {
if (super->bitfield == 0x9d) {
if (super->contactFlags == 0x9d) {
sub_08092620(this);
}
}
@@ -285,7 +285,7 @@ bool32 LavaPlatform_IsPlayerOnPlatform(LavaPlatformEntity* this) {
sub_08079F8C()) {
gPlayerState.field_0x14 = 1;
if (gPlayerEntity.z.HALF.HI == 0) {
super->field_0xf = 1;
super->subtimer = 1;
return TRUE;
}
}
@@ -294,7 +294,7 @@ bool32 LavaPlatform_IsPlayerOnPlatform(LavaPlatformEntity* this) {
}
void sub_080926E4(LavaPlatformEntity* this) {
sub_080A2BE4(super, super->field_0xf);
sub_080A2BE4(super, super->subtimer);
if (super->action == 1) {
(super->parent)->x.HALF.HI = super->x.HALF.HI;
(super->parent)->y.HALF.HI = super->y.HALF.HI;
+6 -6
View File
@@ -24,7 +24,7 @@ void sub_0809EA34(Entity* this) {
this->action = 1;
COLLISION_ON(this);
this->frameIndex = 0;
this->field_0x3c = 7;
this->collisionFlags = 7;
this->hurtType = 0x48;
this->hitType = 0x28;
this->flags2 = 10;
@@ -36,7 +36,7 @@ void sub_0809EA34(Entity* this) {
void sub_0809EA80(Entity* this) {
if ((this->bitfield & 0x80) != 0) {
if ((this->contactFlags & 0x80) != 0) {
if (CheckFlags(this->field_0x86.HWORD) != 0) {
ClearFlag(this->field_0x86.HWORD);
} else {
@@ -96,7 +96,7 @@ void sub_0809EB80(Entity* this) {
this->action = 1;
COLLISION_ON(this);
this->frameIndex = 3;
this->field_0x3c = 7;
this->collisionFlags = 7;
this->hurtType = 0x48;
this->hitType = 0x28;
this->flags2 = 10;
@@ -110,9 +110,9 @@ void sub_0809EB80(Entity* this) {
}
void sub_0809EBD8(Entity* this) {
if ((this->bitfield & 0x80) != 0) {
if ((this->contactFlags & 0x80) != 0) {
this->action = 2;
this->actionDelay = 0x10;
this->timer = 0x10;
this->frameIndex = 2;
SetFlag(this->field_0x86.HWORD);
EnqueueSFX(SFX_110);
@@ -125,7 +125,7 @@ void sub_0809EC08(Entity* this) {
this->action = 3;
} else {
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
this->action = 1;
this->frameIndex = 3;
ClearFlag(this->field_0x86.HWORD);
+16 -16
View File
@@ -66,11 +66,11 @@ void sub_08085504(LilypadLargeEntity* this) {
}
}
}
if (super->actionDelay != 0) {
if (super->timer != 0) {
if (sub_080040A2(super) == 0) {
DeleteThisEntity();
}
super->actionDelay = 0;
super->timer = 0;
} else {
if (EntityHasDuplicateID(super) != 0) {
DeleteThisEntity();
@@ -81,7 +81,7 @@ void sub_08085504(LilypadLargeEntity* this) {
super->spritePriority.b0 = 6;
super->hitbox = &gUnk_08120640;
super->flags |= ENT_COLLIDE;
super->field_0x3c = 7;
super->collisionFlags = 7;
super->hitType = 1;
super->flags2 = 4;
this->unk_78.WORD = 0x1000000;
@@ -172,13 +172,13 @@ void sub_08085B40(LilypadLargeEntity* this) {
ResetCollisionLayer(&gPlayerEntity);
sub_08085F1C(this);
super->action = 1;
super->field_0xf = 4;
while (super->field_0xf != 0) {
super->subtimer = 4;
while (super->subtimer != 0) {
sub_080A2AF4(super, 8, 10);
super->field_0xf--;
super->subtimer--;
}
super->field_0xf = 1;
super->actionDelay |= 0x80;
super->subtimer = 1;
super->timer |= 0x80;
this->unk_70 = 0;
this->unk_6c = 0;
if (GetTileUnderEntity(super) == 0xd) {
@@ -338,7 +338,7 @@ void sub_08085F1C(LilypadLargeEntity* this) {
}
void sub_08085F48(LilypadLargeEntity* this) {
u32 tmp = super->actionDelay & 0x80;
u32 tmp = super->timer & 0x80;
if (tmp != 0) {
if (gPlayerState.floor_type == SURFACE_ICE) {
ResetPlayerVelocity();
@@ -348,35 +348,35 @@ void sub_08085F48(LilypadLargeEntity* this) {
if (this->unk_78.WORD_U < 0x1280000) {
this->unk_78.WORD_U += 0x80000;
} else {
super->actionDelay = 0;
super->timer = 0;
}
} else {
if ((gPlayerState.flags & PL_FLAGS2) != 0) {
if (super->actionDelay != 0) {
if (super->timer != 0) {
if (this->unk_78.WORD_U < 0x1200000) {
this->unk_78.WORD_U += 0x8000;
} else {
super->actionDelay = tmp;
super->timer = tmp;
}
} else {
if (this->unk_78.WORD_U > 0x1100000) {
this->unk_78.WORD_U -= 0x8000;
} else {
super->actionDelay = 1;
super->timer = 1;
}
}
} else {
if (super->actionDelay != 0) {
if (super->timer != 0) {
if (this->unk_78.WORD_U < 0x1100000) {
this->unk_78.WORD_U += 0x4000;
} else {
super->actionDelay = 0;
super->timer = 0;
}
} else {
if (this->unk_78.WORD_U > 0x1060000) {
this->unk_78.WORD_U -= 0x4000;
} else {
super->actionDelay = 1;
super->timer = 1;
}
}
}
+5 -5
View File
@@ -12,9 +12,9 @@ void LilypadSmall(Entity* this) {
if (this->action == 0) {
this->action = 1;
this->actionDelay = 0x5a;
this->timer = 0x5a;
rand = Random();
this->field_0xf = rand;
this->subtimer = rand;
this->frameIndex = (rand >> 0x10) & 3;
this->spriteSettings.draw = TRUE;
this->spritePriority.b0 = 7;
@@ -51,12 +51,12 @@ static void sub_08097B24(Entity* this) {
u32 temp2;
u16* temp3;
if (--this->actionDelay == 0) {
this->actionDelay = 90;
if (--this->timer == 0) {
this->timer = 90;
this->frameIndex = (this->frameIndex + 1) & 3;
}
temp3 = gUnk_08123318;
temp2 = ++this->field_0xf;
temp2 = ++this->subtimer;
temp = temp3[(temp2 >> 5) & 7];
SetAffineInfo(this, temp, temp, 0);
+5 -5
View File
@@ -15,14 +15,14 @@ void LitArea(Entity* this) {
this->spriteRendering.b0 = 3;
this->frameIndex = 3;
this->flags |= ENT_PERSIST;
this->field_0xf = gRoomControls.room;
this->actionDelay = 2;
this->subtimer = gRoomControls.room;
this->timer = 2;
this->field_0x68.HWORD = 0xfffe;
this->field_0x6a.HWORD = 0x80;
SetAffineInfo(this, 0x80, 0x80, 0);
} else {
if (--this->actionDelay == 0) {
this->actionDelay = 2;
if (--this->timer == 0) {
this->timer = 2;
this->field_0x6a.HWORD += this->field_0x68.HWORD;
if (this->field_0x6a.HWORD < 0x78) {
this->field_0x68.HWORD = 1;
@@ -37,7 +37,7 @@ void LitArea(Entity* this) {
gScreen.controls.windowOutsideControl = (gScreen.controls.windowOutsideControl & 0xff) | WINOUT_WINOBJ_BG0 |
WINOUT_WINOBJ_BG1 | WINOUT_WINOBJ_BG2 | WINOUT_WINOBJ_OBJ |
WINOUT_WINOBJ_CLR;
if ((gRoomControls.room != this->field_0xf) && (gRoomControls.reload_flags == 0)) {
if ((gRoomControls.room != this->subtimer) && (gRoomControls.reload_flags == 0)) {
DeleteThisEntity();
}
}
+7 -7
View File
@@ -141,9 +141,9 @@ void sub_08083338(Entity* this) {
}
void sub_080834B4(Entity* this) {
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
this->action = 2;
this->actionDelay = 7;
this->timer = 7;
SetTile(this->field_0x74.HWORD, this->field_0x76.HWORD, this->collisionLayer);
EnqueueSFX(SFX_10B);
}
@@ -151,7 +151,7 @@ void sub_080834B4(Entity* this) {
void sub_080834EC(Entity* this) {
LinearMoveUpdate(this);
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
if (this->type & 0x80) {
sub_08083638(this);
} else {
@@ -169,7 +169,7 @@ void sub_08083518(Entity* this) {
void sub_08083540(Entity* this) {
LinearMoveUpdate(this);
if (!--this->actionDelay) {
if (!--this->timer) {
if (this->type & 0x10) {
this->type &= ~0x10;
sub_080836A0(this);
@@ -214,7 +214,7 @@ void sub_080835F8(Entity* this) {
if (this->interactType == 0 && !CheckFlags(this->field_0x86.HWORD))
return;
this->action = 1;
this->actionDelay = 0x14;
this->timer = 0x14;
sub_08083658(this);
SetFlag(this->field_0x86.HWORD);
sub_080526F8(-1);
@@ -230,7 +230,7 @@ void sub_08083638(Entity* this) {
void sub_08083658(Entity* this) {
const struct_0811F680* tmp;
this->action = 1;
this->actionDelay = 0x14;
this->timer = 0x14;
this->direction = this->field_0x7c.BYTES.byte2 << 3;
tmp = &gUnk_0811F680[this->field_0x7c.BYTES.byte2];
this->x.HALF.HI += tmp->x;
@@ -250,7 +250,7 @@ void sub_080836A0(Entity* this) {
void sub_080836DC(Entity* this, u32 unk_0, u32 unk_1) {
const struct_0811F680* tmp;
SetTile(0x4022, unk_1, this->collisionLayer);
this->actionDelay = 7;
this->timer = 7;
this->spriteSettings.draw = 1;
this->direction = (unk_0 << 3) ^ 0x10;
tmp = &gUnk_0811F688[unk_0];
+19 -19
View File
@@ -35,8 +35,8 @@ void MacroBook(Entity* this) {
void MacroBook_Init(MacroBookEntity* this) {
super->action = 1;
super->actionDelay = 0x80;
super->field_0xf = 0;
super->timer = 0x80;
super->subtimer = 0;
super->spriteRendering.b0 = 3;
this->unk80 = 0x80;
this->playerWithinRect = 0;
@@ -46,24 +46,24 @@ void MacroBook_Init(MacroBookEntity* this) {
super->spriteRendering.b3 = 3;
SetAffineInfo(super, this->unk80, this->unk80, 0);
UpdateSpriteForCollisionLayer(super);
InitAnimationForceUpdate(super, super->field_0xf);
InitAnimationForceUpdate(super, super->subtimer);
sub_0809A958(this);
}
void MacroBook_Action1(MacroBookEntity* this) {
UpdateAnimationSingleFrame(super);
sub_0809AA00(this);
if (super->actionDelay) {
super->actionDelay--;
if (super->timer) {
super->timer--;
} else {
if ((super->frame & ANIM_DONE) != 0) {
if (super->field_0xf == 3) {
if (super->subtimer == 3) {
super->action = 2;
super->actionDelay = 90;
super->field_0xf = 0;
super->timer = 90;
super->subtimer = 0;
InitAnimationForceUpdate(super, 2);
} else {
InitAnimationForceUpdate(super, super->field_0xf);
InitAnimationForceUpdate(super, super->subtimer);
}
}
}
@@ -72,22 +72,22 @@ void MacroBook_Action1(MacroBookEntity* this) {
void MacroBook_Action2(MacroBookEntity* this) {
UpdateAnimationSingleFrame(super);
sub_0809AA00(this);
if (super->field_0xf < 2) {
if (super->subtimer < 2) {
super->action = 1;
super->actionDelay = 0;
} else if (super->actionDelay) {
super->actionDelay--;
super->timer = 0;
} else if (super->timer) {
super->timer--;
if (gPlayerClones[0] != 0) {
return;
}
super->action = 1;
super->actionDelay = 0;
super->timer = 0;
} else {
if ((super->frame & ANIM_DONE) == 0) {
return;
}
super->action = 3;
super->actionDelay = 0;
super->timer = 0;
InitAnimationForceUpdate(super, 3);
RequestPriorityDuration(super, 0x78);
}
@@ -105,7 +105,7 @@ void MacroBook_Action3(MacroBookEntity* this) {
sub_0809A9D4(this);
break;
case 0x20:
super->actionDelay++;
super->timer++;
super->frame &= 0xdf;
SetPlayerControl(0xff);
SetGlobalFlag(0x2a);
@@ -114,7 +114,7 @@ void MacroBook_Action3(MacroBookEntity* this) {
break;
}
if (super->actionDelay) {
if (super->timer) {
this->unk80 += 8;
super->x.WORD += 0x400;
SetAffineInfo(super, this->unk80, this->unk80, 0);
@@ -167,7 +167,7 @@ void sub_0809A9D4(MacroBookEntity* this) {
void sub_0809AA00(MacroBookEntity* this) {
Entity* ent;
super->field_0xf = 0;
super->subtimer = 0;
if (super->child == NULL) {
for (ent = FindEntityByID(NPC, TOWN_MINISH, 7); ent != NULL; ent = FindNextDuplicateID(ent, NPC)) {
if (ent->type == 0 && ent->type2 == 8) {
@@ -202,7 +202,7 @@ void sub_0809AA9C(MacroBookEntity* this, Entity* ent, u32 arg3) {
}
if (ent->x.HALF.HI <= gRoomControls.origin_x + 0x15a) {
super->field_0xf++;
super->subtimer++;
ent->spriteOffsetY++;
}
}
+4 -4
View File
@@ -181,7 +181,7 @@ void MacroPlayer_Type0_Action4(MacroPlayerEntity* this) {
}
} else {
super->action++;
super->actionDelay = 60;
super->timer = 60;
this->unk68.HWORD = 0xc04;
DeleteEntity(super->child);
sub_0805EC60(super);
@@ -189,9 +189,9 @@ void MacroPlayer_Type0_Action4(MacroPlayerEntity* this) {
}
void MacroPlayer_Type0_Action5(MacroPlayerEntity* this) {
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action++;
super->actionDelay = 0x10;
super->timer = 0x10;
}
}
@@ -199,7 +199,7 @@ void MacroPlayer_Type0_Action6(MacroPlayerEntity* this) {
static const u8 gUnk_081216B4[] = { 0, 0x1a, 0x2, 0x5, 0x4, 0x11, 0x6, 0x1a };
u32 uVar2;
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
uVar2 = gArea.portal_exit_dir;
super->action += 1;
super->action += uVar2;
+7 -7
View File
@@ -38,8 +38,8 @@ void sub_080929A4(Entity* this) {
this->field_0x78.HWORD = ((Random() & 7) << 10) | 0x2000;
this->field_0xf = this->actionDelay >> 1;
this->actionDelay = 0;
this->subtimer = this->timer >> 1;
this->timer = 0;
this->frameIndex = this->type2 & 0x3f;
@@ -67,8 +67,8 @@ void sub_08092A94(Entity* this) {
return;
}
if (this->x.HALF.HI - gPlayerEntity.x.HALF.HI >= this->field_0xf ||
this->x.HALF.HI - gPlayerEntity.x.HALF.HI <= -this->field_0xf) {
if (this->x.HALF.HI - gPlayerEntity.x.HALF.HI >= this->subtimer ||
this->x.HALF.HI - gPlayerEntity.x.HALF.HI <= -this->subtimer) {
return;
}
@@ -87,10 +87,10 @@ void sub_08092A94(Entity* this) {
// Probably falling down
void sub_08092B0C(Entity* this) {
if (this->actionDelay == 1) {
if (this->timer == 1) {
this->action = 3;
this->actionDelay = 0;
this->timer = 0;
switch (this->type2 & 0xC0) {
case 0x80:
EnqueueSFX(SFX_SECRET);
@@ -106,7 +106,7 @@ void sub_08092B0C(Entity* this) {
sub_080044EC(this, this->field_0x78.HWORD);
if (this->z.HALF.HI == 0) {
this->actionDelay++;
this->timer++;
}
}
}
+21 -21
View File
@@ -81,7 +81,7 @@ void MazaalBossObject_Action0(MazaalBossObjectEntity* this) {
sub_080809D4();
} else {
super->action = MAZAAL_BOSS_OBJECT_ACTION_1;
super->actionDelay = 30;
super->timer = 30;
super->frameIndex = gRoomTransition.field_0x38;
super->spritePriority.b0 = 7;
super->spriteOffsetY = 0x20;
@@ -95,27 +95,27 @@ void MazaalBossObject_Action1(MazaalBossObjectEntity* this) {
}
void MazaalBossObject_Action2(MazaalBossObjectEntity* this) {
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action = MAZAAL_BOSS_OBJECT_ACTION_3;
super->actionDelay = 120;
super->timer = 120;
gRoomControls.camera_target = super->child;
}
}
void MazaalBossObject_Action3(MazaalBossObjectEntity* this) {
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action = MAZAAL_BOSS_OBJECT_ACTION_4;
super->actionDelay = 90;
super->timer = 90;
super->child->subAction = 1;
}
}
void MazaalBossObject_Action4(MazaalBossObjectEntity* this) {
if (super->child->subAction > 2) {
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action = MAZAAL_BOSS_OBJECT_ACTION_5;
super->actionDelay = 8;
super->field_0xf = 0;
super->timer = 8;
super->subtimer = 0;
super->spriteRendering.alphaBlend = BLDALPHA_BLEND(1, 0);
gScreen.controls.layerFXControl =
@@ -128,25 +128,25 @@ void MazaalBossObject_Action4(MazaalBossObjectEntity* this) {
void MazaalBossObject_Action5(MazaalBossObjectEntity* this) {
u32 tmp;
if (--super->actionDelay == 0) {
super->actionDelay = 8;
if (--super->timer == 0) {
super->timer = 8;
tmp = ++super->field_0xf;
tmp = ++super->subtimer;
tmp &= 0xFF;
gScreen.controls.alphaBlend = BLDALPHA_BLEND((0x10 - tmp) & 0xFF, tmp);
if (super->field_0xf > 15) {
if (super->subtimer > 15) {
super->spriteRendering.alphaBlend = BLDALPHA_BLEND(4, 0);
gScreen.controls.layerFXControl = 0;
super->action = MAZAAL_BOSS_OBJECT_ACTION_6;
super->actionDelay = 15;
super->timer = 15;
super->spriteSettings.draw = 0;
}
}
}
void MazaalBossObject_Action6(MazaalBossObjectEntity* this) {
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->child->subAction = 6;
gRoomTransition.field_0x38 = 0xF1;
@@ -155,18 +155,18 @@ void MazaalBossObject_Action6(MazaalBossObjectEntity* this) {
}
void MazaalBossObject_Action7(MazaalBossObjectEntity* this) {
if (super->child->actionDelay == 1) {
if (super->child->timer == 1) {
super->action = MAZAAL_BOSS_OBJECT_ACTION_8;
super->subAction = 0;
super->actionDelay = 180;
super->timer = 180;
}
}
void MazaalBossObject_Action8(MazaalBossObjectEntity* this) {
switch (super->subAction) {
default:
if (--super->actionDelay == 0) {
super->actionDelay = 90;
if (--super->timer == 0) {
super->timer = 90;
super->subAction = 1;
SoundReq(SFX_SECRET_BIG);
SetFlag(0x31);
@@ -174,14 +174,14 @@ void MazaalBossObject_Action8(MazaalBossObjectEntity* this) {
}
break;
case 1:
if (--super->actionDelay == 0) {
super->actionDelay = 120;
if (--super->timer == 0) {
super->timer = 120;
super->subAction = 2;
sub_0809AD68(this);
}
break;
case 2:
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
gRoomControls.camera_target = &gNewPlayerEntity.base;
gPlayerState.controlMode = CONTROL_1;
DeleteThisEntity();
+4 -4
View File
@@ -37,7 +37,7 @@ void sub_080A0684(Entity* this) {
void sub_080A0718(Entity* this) {
if (sub_08083734(this, 2) != 0) {
this->action = 2;
this->actionDelay = 0xc;
this->timer = 0xc;
this->spriteSettings.draw = TRUE;
this->direction = 0;
this->y.HALF.HI += 0x24;
@@ -51,7 +51,7 @@ void sub_080A074C(Entity* this) {
LinearMoveUpdate(this);
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
this->action = 3;
this->z.HALF.HI = 0;
this->x.HALF.HI = this->field_0x70.HALF.LO;
@@ -73,7 +73,7 @@ void sub_080A074C(Entity* this) {
void sub_080A07BC(Entity* this) {
if (CheckFlags(this->field_0x86.HWORD)) {
this->action = 4;
this->actionDelay = 0xc;
this->timer = 0xc;
this->direction = 0x10;
this->y.HALF.HI += 2;
sub_080A0870(this);
@@ -85,7 +85,7 @@ void sub_080A07F0(Entity* this) {
LinearMoveUpdate(this);
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
DeleteThisEntity();
}
}
+14 -14
View File
@@ -28,11 +28,11 @@ void Minecart(Entity* this) {
sub_080916EC, sub_080917DC, sub_080918A4, sub_080919AC, sub_08091C0C, sub_08091C98, sub_08091CC8, sub_08091D90,
};
actionFuncs[this->action]((MinecartEntity*)this);
this->bitfield = 0;
this->contactFlags = 0;
}
void sub_080916EC(MinecartEntity* this) {
struct_030010EC* unk = &gRoomTransition.minecart_data[super->actionDelay];
struct_030010EC* unk = &gRoomTransition.minecart_data[super->timer];
this->minecartData = unk;
if ((gRoomControls.room != unk->room) || (gPlayerState.flags & PL_IN_MINECART) != 0) {
@@ -46,7 +46,7 @@ void sub_080916EC(MinecartEntity* this) {
super->hitbox = (Hitbox*)&gUnk_080FD310;
COLLISION_ON(super);
super->hitType = 1;
super->field_0x3c = 0x47;
super->collisionFlags = 0x47;
super->hurtType = 0x44;
super->flags2 = 0x80;
super->direction = DirectionFromAnimationState(super->animationState);
@@ -57,7 +57,7 @@ void sub_080916EC(MinecartEntity* this) {
}
void sub_080917DC(MinecartEntity* this) {
if ((super->bitfield & 0x7f) == 0x1d) {
if ((super->contactFlags & 0x7f) == 0x1d) {
super->zVelocity = Q_16_16(2.625);
super->action = 7;
InitAnimationForceUpdate(super, super->type2 + 4 + super->animationState);
@@ -66,15 +66,15 @@ void sub_080917DC(MinecartEntity* this) {
if (sub_0800445C(super) != 0) {
if (!((gPlayerState.flags & (PL_MINISH | PL_ROLLING)) || gPlayerState.field_0x1c ||
gPlayerState.heldObject || gPlayerState.jump_status)) {
super->actionDelay++;
super->timer++;
} else {
super->actionDelay = 0;
super->timer = 0;
}
} else {
super->actionDelay = 0;
super->timer = 0;
}
if (super->type2 == 0) {
if (super->actionDelay > 8) {
if (super->timer > 8) {
super->action++;
gPlayerState.jump_status = 0x81;
gPlayerState.flags |= PL_ENTER_MINECART;
@@ -86,7 +86,7 @@ void sub_080917DC(MinecartEntity* this) {
SoundReq(SFX_PLY_JUMP);
}
} else {
super->actionDelay = 0;
super->timer = 0;
}
}
}
@@ -102,10 +102,10 @@ void sub_080918A4(MinecartEntity* this) {
gPlayerEntity.animationState = super->animationState << 1;
gPlayerState.flags = (gPlayerState.flags ^ PL_ENTER_MINECART) | PL_IN_MINECART;
super->action++;
super->field_0xf = 1;
super->subtimer = 1;
super->flags |= ENT_PERSIST;
super->hitType = 0x97;
super->field_0x3c = (gPlayerEntity.field_0x3c + 1) | 0x20;
super->collisionFlags = (gPlayerEntity.collisionFlags + 1) | 0x20;
super->flags2 = gPlayerEntity.flags2;
super->hurtType = 0x18;
super->damage = 8;
@@ -152,9 +152,9 @@ void sub_080919AC(MinecartEntity* this) {
SoundReq(SFX_138);
}
if (super->field_0xf-- == 0) {
if (super->subtimer-- == 0) {
SoundReq(SFX_PLY_VO7);
super->field_0xf = 0x3c;
super->subtimer = 0x3c;
}
uVar3 = GetRelativeCollisionTile(super, gUnk_081223C8[super->animationState * 2],
@@ -168,7 +168,7 @@ void sub_080919AC(MinecartEntity* this) {
case 0x64:
super->flags &= ~ENT_PERSIST;
super->hitType = 1;
super->field_0x3c = 0x47;
super->collisionFlags = 0x47;
super->hurtType = 0x44;
super->flags2 = 0x80;
super->action = 6;
+5 -5
View File
@@ -74,7 +74,7 @@ void MinecartDoor_Init(MinecartDoorEntity* this) {
void MinecartDoor_Action1(MinecartDoorEntity* this) {
if (sub_08096CEC(this)) {
super->action = 2;
super->actionDelay = 7;
super->timer = 7;
super->direction = super->type << 3;
SetTile(this->unk_74, this->unk_76, super->collisionLayer);
EnqueueSFX(SFX_10B);
@@ -83,7 +83,7 @@ void MinecartDoor_Action1(MinecartDoorEntity* this) {
void MinecartDoor_Action2(MinecartDoorEntity* this) {
LinearMoveUpdate(super);
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
sub_08096E04(this);
super->spriteSettings.draw = 0;
super->x.HALF.HI = this->unk_70;
@@ -107,7 +107,7 @@ void MinecartDoor_Action3(MinecartDoorEntity* this) {
}
bVar3 = FALSE;
} else {
bVar3 = --super->actionDelay * 0x1000000;
bVar3 = --super->timer * 0x1000000;
}
} else {
bVar3 = sub_08096D84(this);
@@ -120,7 +120,7 @@ void MinecartDoor_Action3(MinecartDoorEntity* this) {
void MinecartDoor_Action4(MinecartDoorEntity* this) {
LinearMoveUpdate(super);
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action = 1;
super->x.HALF.HI = this->unk_70;
super->y.HALF.HI = this->unk_72;
@@ -189,5 +189,5 @@ bool32 sub_08096D84(MinecartDoorEntity* this) {
void sub_08096E04(MinecartDoorEntity* this) {
super->action = 3;
super->actionDelay = 8;
super->timer = 8;
}
+2 -2
View File
@@ -32,7 +32,7 @@ void MineralWaterSource_Init(Entity* this) {
COLLISION_ON(this);
this->field_0x3c = 7;
this->collisionFlags = 7;
this->hitType = 145;
this->flags2 = 2;
@@ -40,5 +40,5 @@ void MineralWaterSource_Init(Entity* this) {
}
void sub_080973DC(Entity* this) {
this->bitfield = 0;
this->contactFlags = 0;
}
+5 -5
View File
@@ -70,20 +70,20 @@ void sub_08082098(Entity* this) {
animIndex = origAnimIndex + 4;
if (this->animIndex != animIndex) {
this->z.WORD = 0;
this->actionDelay = 6;
} else if (this->actionDelay-- == 0) {
this->timer = 6;
} else if (this->timer-- == 0) {
switch (this->spriteOffsetY) {
case 0:
this->spriteOffsetY = -2;
this->actionDelay = 6;
this->timer = 6;
break;
case -2:
this->spriteOffsetY = -1;
this->actionDelay = 6;
this->timer = 6;
break;
case -1:
this->spriteOffsetY = 0;
this->actionDelay = 3;
this->timer = 3;
break;
}
}
+7 -7
View File
@@ -9,8 +9,8 @@ void MinishLight(Entity* this) {
void sub_0809F840(Entity* this) {
this->action = 1;
this->frameIndex = 0;
this->actionDelay = 0x20;
this->field_0xf = 0;
this->timer = 0x20;
this->subtimer = 0;
if (this->type2 != 0) {
this->spriteSettings.flipX = 1;
@@ -20,16 +20,16 @@ void sub_0809F840(Entity* this) {
}
void sub_0809F868(Entity* this) {
if (--this->actionDelay == 0) {
if (this->field_0xf == 0) {
if (--this->timer == 0) {
if (this->subtimer == 0) {
if (++this->frameIndex == 3) {
this->field_0xf = 1;
this->subtimer = 1;
}
} else {
if (--this->frameIndex == 0) {
this->field_0xf = 0;
this->subtimer = 0;
}
}
this->actionDelay = 32;
this->timer = 32;
}
}
+2 -2
View File
@@ -24,13 +24,13 @@ void sub_08090EC0(Entity* this) {
void sub_08090F00(Entity* this) {
if (this->type == 1) {
Entity* parent = this->parent;
u32 mask = 1 << this->field_0xf;
u32 mask = 1 << this->subtimer;
if (!(parent->zVelocity & mask)) {
DeleteThisEntity();
}
}
if ((gPlayerState.flags & PL_MINISH) && EntityInRectRadius(this, &gPlayerEntity, 4, 4) &&
(gPlayerEntity.z.HALF.HI == 0) && (((u16)gPlayerState.field_0x90) & gUnk_0812225C[this->type2])) {
DoExitTransition(GetCurrentRoomProperty(this->actionDelay));
DoExitTransition(GetCurrentRoomProperty(this->timer));
}
}
+9 -9
View File
@@ -60,12 +60,12 @@ void Object11_Init(Object11Entity* this) {
super->action = 2;
super->flags |= ENT_COLLIDE;
super->spriteRendering.b3 = 2;
super->field_0x1d = gUnk_08120588[super->type].unk_1;
super->field_0x1c = gUnk_08120588[super->type].unk_2;
super->gustJarTolerance = gUnk_08120588[super->type].unk_1;
super->gustJarFlags = gUnk_08120588[super->type].unk_2;
super->speed = 0x80;
super->collisionLayer = gPlayerEntity.collisionLayer;
super->health = 1;
super->field_0x3c = 7;
super->collisionFlags = 7;
super->hitType = 0x6e;
super->flags2 = 4;
super->hitbox = (Hitbox*)&gUnk_081205B4;
@@ -76,7 +76,7 @@ void Object11_Init(Object11Entity* this) {
}
void Object11_Action1(Object11Entity* this) {
if (((gPlayerState.field_0x1c & 0xf) != 1) || ((super->bitfield & 0x7f) != 0x13)) {
if (((gPlayerState.field_0x1c & 0xf) != 1) || ((super->contactFlags & 0x7f) != 0x13)) {
RestorePrevTileEntity(COORD_TO_TILE(super), super->collisionLayer);
DeleteThisEntity();
}
@@ -100,7 +100,7 @@ void Object11_Action2SubAction0(Object11Entity* this) {
void Object11_Action2SubAction1(Object11Entity* this) {
Object11_Action1(this);
sub_0806F4E8(super);
if ((super->field_0x1d != 0) && (--super->field_0x1d == 0)) {
if ((super->gustJarTolerance != 0) && (--super->gustJarTolerance == 0)) {
super->subAction = 2;
}
}
@@ -111,10 +111,10 @@ void Object11_Action2SubAction2(Object11Entity* this) {
super->spriteOffsetX = 0;
sub_0807B9B8(this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
}
if (((gPlayerState.field_0x1c & 0xf) != 1) || ((super->bitfield & 0x7f) != 0x13)) {
if (((gPlayerState.field_0x1c & 0xf) != 1) || ((super->contactFlags & 0x7f) != 0x13)) {
Object11_Action2SubAction5(this);
}
if (sub_0806F3E4(super) && ((super->field_0x1c & 0xf) == 1)) {
if (sub_0806F3E4(super) && ((super->gustJarFlags & 0xf) == 1)) {
DeleteThisEntity();
}
}
@@ -130,12 +130,12 @@ void Object11_Action2SubAction5(Object11Entity* this) {
case 0xff:
break;
case 0xf:
CreateFx(super, super->actionDelay, 0x80);
CreateFx(super, super->timer, 0x80);
break;
case 0:
break;
default:
CreateObjectWithParent(super, super->type2, super->actionDelay, 0);
CreateObjectWithParent(super, super->type2, super->timer, 0);
break;
}
DeleteThisEntity();
+6 -6
View File
@@ -41,7 +41,7 @@ void Object12_Init(Object12Entity* this) {
sub_080850FC(this);
} else {
super->action = 2;
super->actionDelay = 0xf0;
super->timer = 0xf0;
super->speed = 0x80;
super->direction = 0x18;
}
@@ -53,9 +53,9 @@ void Object12_Action1(Object12Entity* this) {
NONMATCH("asm/non_matching/object12/Object12_Action2.inc", void Object12_Action2(Object12Entity* this)) {
u32 tmp;
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action = 3;
super->actionDelay = 0x1e;
super->timer = 0x1e;
super->spriteOffsetY = 4;
gScreen.lcd.displayControl |= 0x2000;
gScreen.controls.windowInsideControl = 0x1f;
@@ -69,15 +69,15 @@ NONMATCH("asm/non_matching/object12/Object12_Action2.inc", void Object12_Action2
END_NONMATCH
void Object12_Action3(Object12Entity* this) {
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action = 4;
super->actionDelay = 0x60;
super->timer = 0x60;
}
}
void Object12_Action4(Object12Entity* this) {
LinearMoveUpdate(super);
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
gScreen.lcd.displayControl &= 0xdfff;
DeleteEntity(super);
}
+3 -3
View File
@@ -28,9 +28,9 @@ void Object15_Action1(Entity* this) {
this->spriteSettings.draw ^= 1;
}
if ((int)(this->actionDelay * 0x1000000) >= 0) {
if (this->actionDelay) {
if (--this->actionDelay == 0) {
if ((int)(this->timer * 0x1000000) >= 0) {
if (this->timer) {
if (--this->timer == 0) {
DeleteThisEntity();
}
} else {
+6 -6
View File
@@ -49,13 +49,13 @@ void Object1F_Init(Object1FEntity* this) {
super->x.HALF.HI = gUnk_08120A20[super->animationState] + super->x.HALF.HI;
super->y.HALF.HI = gUnk_08120A20[super->animationState + 1] + super->y.HALF.HI;
super->spriteVramOffset = gUnk_08120A18[super->field_0xf].spriteVramOffset;
temp = gUnk_08120A18[super->field_0xf].unk1;
super->spriteVramOffset = gUnk_08120A18[super->subtimer].spriteVramOffset;
temp = gUnk_08120A18[super->subtimer].unk1;
super->palette.b.b0 = temp;
this->unk6c = gUnk_08120A18[super->field_0xf].unk2;
this->unk6c = gUnk_08120A18[super->subtimer].unk2;
super->collisionLayer = gPlayerEntity.collisionLayer;
super->speed = 0x100;
InitializeAnimation(super, gUnk_08120A18[super->field_0xf].animationState);
InitializeAnimation(super, gUnk_08120A18[super->subtimer].animationState);
}
void Object1F_Action1(Object1FEntity* this) {
@@ -92,9 +92,9 @@ void Object1F_Action2(Object1FEntity* this) {
default:
if (super->type2 != 0) {
if (super->type2 == 15) {
CreateFx(super, super->actionDelay, 0x80);
CreateFx(super, super->timer, 0x80);
} else {
CreateObjectWithParent(super, super->type2, super->actionDelay, 0);
CreateObjectWithParent(super, super->type2, super->timer, 0);
}
}
}
+1 -1
View File
@@ -34,7 +34,7 @@ void sub_08087824(Entity* this) {
}
this->action = 1;
this->flags |= 0x80;
this->field_0x3c = 0x13;
this->collisionFlags = 0x13;
this->health = 0xff;
this->hitType = 0xa9;
this->hurtType = 0x16;
+11 -11
View File
@@ -33,8 +33,8 @@ void Object21(Object21Entity* this) {
};
gUnk_08120A68[super->action](this);
GetNextFrame(super);
if (super->actionDelay != 0) {
super->actionDelay--;
if (super->timer != 0) {
super->timer--;
} else {
if (super->animIndex == 0xa) {
InitializeAnimation(super, 0xd);
@@ -79,14 +79,14 @@ void sub_08087A10(Object21Entity* this) {
case 3:
super->flags |= ENT_COLLIDE;
super->health = 1;
super->field_0x3c = 7;
super->collisionFlags = 7;
super->hitType = 0xaa;
super->flags2 = 0x0e;
super->hitbox = (Hitbox*)&gUnk_08120A8C;
super->field_0x1c = 0;
super->gustJarFlags = 0;
case 2:
rand = Random();
super->actionDelay = gUnk_08120A7A[rand & 3];
super->timer = gUnk_08120A7A[rand & 3];
tmp = (rand >> 8) & 3;
if ((rand & 0x10) != 0) {
tmp = -tmp;
@@ -104,12 +104,12 @@ void sub_08087A10(Object21Entity* this) {
void sub_08087AFC(Object21Entity* this) {
Object21Entity* entity;
if ((super->bitfield & 0x80) == 0) {
if ((super->contactFlags & 0x80) == 0) {
return;
}
switch (super->bitfield & 0x7f) {
switch (super->contactFlags & 0x7f) {
case 0x16:
super->direction = GetFacingDirection(super->field_0x4c, super);
super->direction = GetFacingDirection(super->contactedEntity, super);
super->speed = 0x100;
break;
case 0x13:
@@ -118,7 +118,7 @@ void sub_08087AFC(Object21Entity* this) {
break;
case 0x1b:
case 0x1c:
entity = (Object21Entity*)super->field_0x4c;
entity = (Object21Entity*)super->contactedEntity;
super->direction = CalculateDirectionTo(entity->unk_84, entity->unk_80, super->x.WORD, super->y.WORD);
super->speed = 0x100;
break;
@@ -131,7 +131,7 @@ void sub_08087B58(Object21Entity* this) {
sub_08087B9C,
sub_08087B9C,
};
if ((super->bitfield & 0x80) != 0) {
if ((super->contactFlags & 0x80) != 0) {
gUnk_08120A80[super->subAction](this);
} else {
super->action = 1;
@@ -143,7 +143,7 @@ const Hitbox gUnk_08120A8C = { 0, 0, { 6, 3, 3, 6 }, 3, 3 };
void sub_08087B88(Object21Entity* this) {
super->knockbackSpeed = 0x100;
super->subAction = 1;
super->field_0x1d = 1;
super->gustJarTolerance = 1;
}
void sub_08087B9C(Object21Entity* this) {
+5 -5
View File
@@ -16,16 +16,16 @@ void Object2A_Init(Entity* this) {
this->action = 1;
this->spriteSettings.draw = TRUE;
if (this->type2 != 0) {
this->actionDelay = this->type2;
this->timer = this->type2;
}
InitializeAnimation(this, 0);
switch (this->type) {
case 1:
this->y.HALF.HI -= 8;
this->actionDelay = 0x28;
this->timer = 0x28;
break;
case 2:
this->actionDelay = 0xf;
this->timer = 0xf;
sub_08004168(this);
break;
case 3:
@@ -52,7 +52,7 @@ void sub_08089BA0(Entity* this) {
return;
case 1:
case 2:
if (this->actionDelay-- != 0)
if (this->timer-- != 0)
return;
if (this->type == 2) {
sub_0807B7D8(((u16*)this->child)[3], COORD_TO_TILE(this), this->collisionLayer);
@@ -67,7 +67,7 @@ void sub_08089BA0(Entity* this) {
if (this->parent->next == NULL) {
DeleteThisEntity();
}
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
DeleteThisEntity();
}
+3 -3
View File
@@ -89,7 +89,7 @@ void Object30_Action2(Object30Entity* this) {
}
// fallthrough
case 1:
tmp = gUnk_08121194[(super->field_0xf++ >> 3) & 7];
tmp = gUnk_08121194[(super->subtimer++ >> 3) & 7];
super->z.HALF.HI = tmp << 0x18 >> 0x18;
if (!IsCollidingPlayer(super)) {
return;
@@ -102,12 +102,12 @@ void Object30_Action2(Object30Entity* this) {
void sub_0808A968(Object30Entity* this) {
super->action = 2;
super->actionDelay = 0x1e;
super->timer = 0x1e;
super->spriteSettings.draw = 1;
super->zVelocity = 0x28000;
super->spritePriority.b1 = 3;
super->spriteSettings.shadow = 0;
super->field_0x3c |= 0x10;
super->collisionFlags |= 0x10;
super->hitbox = (Hitbox*)&gUnk_08121C58;
SetDefaultPriority(super, 2);
this->unk_70 = 0x2800;
+12 -12
View File
@@ -60,15 +60,15 @@ void Object35_Type0Init(Object35Entity* this) {
super->collisionLayer = 2;
UpdateSpriteForCollisionLayer(super);
super->spritePriority.b0 = 1;
super->actionDelay = -0x4c;
super->timer = -0x4c;
InitializeAnimation(super, super->type2);
}
void Object35_Type0Action1(Object35Entity* this) {
s8 tmp;
GetNextFrame(super);
if (--super->actionDelay == 0) {
super->actionDelay = -0x4c;
if (--super->timer == 0) {
super->timer = -0x4c;
super->type2++;
tmp = 3;
super->type2 = super->type2 % tmp;
@@ -97,22 +97,22 @@ void Object35_Type1Init(Object35Entity* this) {
super->spritePriority.b0 = 5;
this->unk_76 = COORD_TO_TILE(super);
this->unk_74 = GetTileIndex(this->unk_76, super->collisionLayer);
if (super->actionDelay == 0) {
if (super->timer == 0) {
super->action = 1;
super->field_0xf = 0x78;
super->subtimer = 0x78;
SetTile(0x4022, this->unk_76, super->collisionLayer);
} else {
super->action = 3;
super->spriteSettings.draw = 0;
super->spriteSettings.flipY = 1;
super->actionDelay = 0;
super->timer = 0;
}
}
void Object35_Type1Action1(Object35Entity* this) {
if (CheckRoomFlag(0)) {
super->action = 2;
super->actionDelay = 7;
super->timer = 7;
super->direction = 0;
SetTile(this->unk_74, this->unk_76, super->collisionLayer);
EnqueueSFX(SFX_10B);
@@ -121,9 +121,9 @@ void Object35_Type1Action1(Object35Entity* this) {
void Object35_Type1Action2(Object35Entity* this) {
LinearMoveUpdate(super);
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action = 5;
super->actionDelay = 8;
super->timer = 8;
super->spriteSettings.draw = 0;
super->x.HALF.HI = this->unk_70;
super->y.HALF.HI = this->unk_72;
@@ -139,7 +139,7 @@ void Object35_Type1Action3(Object35Entity* this) {
void Object35_Type1Action4(Object35Entity* this) {
LinearMoveUpdate(super);
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action = 5;
sub_08083814(super, 2);
EnqueueSFX(SFX_10B);
@@ -160,7 +160,7 @@ void Object35_Type2(Object35Entity* this) {
void Object35_Type2Init(Object35Entity* this) {
super->action = 1;
super->actionDelay = 0x10;
super->timer = 0x10;
super->z.HALF.HI -= 0x10;
if (super->type2 == 0) {
super->frameIndex = 2;
@@ -174,7 +174,7 @@ void Object35_Type2Init(Object35Entity* this) {
}
void Object35_Type2Action1(Object35Entity* this) {
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
DeleteThisEntity();
}
}
+20 -20
View File
@@ -38,14 +38,14 @@ void sub_0808BB30(Object36Entity* this) {
} else {
super->action = 1;
super->flags |= ENT_COLLIDE;
super->actionDelay = 0x78;
super->field_0xf = 0;
super->timer = 0x78;
super->subtimer = 0;
super->spriteRendering.b3 = 3;
super->spritePriority.b0 = 4;
super->spriteOrientation.flipY = 2;
super->speed = 0x300;
super->hitType = 1;
super->field_0x3c = 7;
super->collisionFlags = 7;
super->hurtType = 0x48;
super->flags2 = 4;
super->hitbox = (Hitbox*)&gHitbox_0;
@@ -71,7 +71,7 @@ void sub_0808BBE0(Object36Entity* this) {
ptr = &gUnk_0812144C[diff * 2];
SetAffineInfo(super, ptr[0], ptr[1], 0);
} else {
super->bitfield &= 0x7f;
super->contactFlags &= 0x7f;
}
}
@@ -81,29 +81,29 @@ void sub_0808BC3C(Object36Entity* this) {
tmp = -0x170;
super->y.HALF.HI = gRoomControls.origin_y - ((super->parent)->zVelocity + tmp);
sub_0808BBE0(this);
if (super->bitfield == 0x93) {
super->actionDelay--;
if (super->contactFlags == 0x93) {
super->timer--;
super->spriteSettings.draw = 1;
if (super->actionDelay == 0) {
if (super->timer == 0) {
SetGlobalFlag(LV1TARU_OPEN);
super->action = 2;
super->field_0xf = 0x80;
super->subtimer = 0x80;
super->spriteOffsetY = 0;
} else {
if ((super->actionDelay & 1) != 0) {
if ((super->timer & 1) != 0) {
super->x.HALF.HI += ((Random() & 3) - 2);
super->y.HALF.HI += ((Random() & 3) - 1);
}
if (super->field_0xf != 1) {
super->field_0xf = 1;
if (super->subtimer != 1) {
super->subtimer = 1;
LoadGfxGroup(0x4a);
}
}
} else {
super->actionDelay = 0x78;
super->timer = 0x78;
super->spriteSettings.draw = 0;
if (super->field_0xf != 0) {
super->field_0xf = 0;
if (super->subtimer != 0) {
super->subtimer = 0;
LoadGfxGroup(0x49);
}
}
@@ -117,11 +117,11 @@ void sub_0808BD00(Object36Entity* this) {
void sub_0808BD14(Object36Entity* this) {
if (super->field_0xf != 0) {
super->field_0xf -= 8;
SetAffineInfo(super, 0x200 - super->field_0xf, 0x200 - super->field_0xf, 0);
if (super->subtimer != 0) {
super->subtimer -= 8;
SetAffineInfo(super, 0x200 - super->subtimer, 0x200 - super->subtimer, 0);
}
if (super->bitfield == 0x93) {
if (super->contactFlags == 0x93) {
super->direction = GetFacingDirection(super, &gPlayerEntity);
LinearMoveUpdate(super);
if (EntityWithinDistance(super, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI - 6, 0x1c)) {
@@ -130,10 +130,10 @@ void sub_0808BD14(Object36Entity* this) {
} else {
if ((super->flags & ENT_COLLIDE) != 0) {
super->flags &= ~ENT_COLLIDE;
super->actionDelay = 0x1e;
super->timer = 0x1e;
} else {
super->spriteSettings.draw ^= 1;
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
sub_0808BD00(this);
}
}
+6 -6
View File
@@ -71,8 +71,8 @@ void Object3D_Action1(Object3DEntity* this) {
super->spriteOrientation.flipY = 0;
super->spriteRendering.b3 = 0;
super->spritePriority.b0 = 0;
super->actionDelay = 0x1e;
super->field_0xf = 0xff;
super->timer = 0x1e;
super->subtimer = 0xff;
super->spriteRendering.b0 = 3;
SetAffineInfo(super, 0x100, 0x100, 0);
gArea.field_0x10 = 1;
@@ -97,7 +97,7 @@ void sub_0808D030(void) {
}
void Object3D_Action2(Object3DEntity* this) {
u32 tmp = super->actionDelay--;
u32 tmp = super->timer--;
if (tmp != 0) {
if (this->unk_68 != 0) {
this->unk_68 -= 2;
@@ -105,10 +105,10 @@ void Object3D_Action2(Object3DEntity* this) {
this->unk_68 = 0;
}
sub_0801E1EC(super->x.HALF.HI, super->y.HALF.HI, this->unk_68);
if (0x80 < super->field_0xf) {
super->field_0xf -= 8;
if (0x80 < super->subtimer) {
super->subtimer -= 8;
}
SetAffineInfo(super, super->field_0xf, super->field_0xf, 0);
SetAffineInfo(super, super->subtimer, super->subtimer, 0);
} else {
gArea.filler3[0]++;
gArea.field_0x10 = 0;
+32 -32
View File
@@ -41,7 +41,7 @@ void Object3E_Type0(Object3EEntity* this) {
switch (super->action) {
case 0:
super->action = 1;
super->actionDelay = 0x40 - (Random() & 0x1f);
super->timer = 0x40 - (Random() & 0x1f);
super->frameIndex = 0;
super->animationState = 0;
super->spriteRendering.b3 = 3;
@@ -49,21 +49,21 @@ void Object3E_Type0(Object3EEntity* this) {
super->collisionLayer = 1;
break;
case 1:
if (--super->actionDelay == 0) {
super->actionDelay = 8;
super->field_0xf = 4;
if (--super->timer == 0) {
super->timer = 8;
super->subtimer = 4;
super->action = 2;
super->animationState = Random() & 3;
}
break;
case 2:
if (--super->actionDelay == 0) {
if (--super->field_0xf == 0) {
if (--super->timer == 0) {
if (--super->subtimer == 0) {
super->frameIndex = 0;
super->action = 1;
super->actionDelay = 0x40 - (Random() & 0x1f);
super->timer = 0x40 - (Random() & 0x1f);
} else {
super->actionDelay = 8;
super->timer = 8;
tmp2 = super->animationState;
if (super->frameIndex != tmp2) {
tmp = tmp2;
@@ -85,8 +85,8 @@ void Object3E_Type1(Object3EEntity* this) {
switch (super->action) {
case 0:
super->action = 1;
super->actionDelay = 8;
super->field_0xf = 0;
super->timer = 8;
super->subtimer = 0;
super->frameIndex = 0;
super->spritePriority.b0 = 7;
SetTile(0x4069, COORD_TO_TILE(super) - 0x40, 1);
@@ -104,14 +104,14 @@ void Object3E_Type1(Object3EEntity* this) {
case 1:
break;
}
if (--super->actionDelay == 0) {
super->actionDelay = 8;
if (--super->timer == 0) {
super->timer = 8;
if (super->type == 9) {
super->actionDelay = 2;
super->timer = 2;
}
ChangeObjPalette(super, gUnk_08121704[super->field_0xf++]);
if (gUnk_08121704[super->field_0xf] == 0) {
super->field_0xf = 0;
ChangeObjPalette(super, gUnk_08121704[super->subtimer++]);
if (gUnk_08121704[super->subtimer] == 0) {
super->subtimer = 0;
}
}
}
@@ -170,16 +170,16 @@ void Object3E_Type6(Object3EEntity* this) {
static const u16 gUnk_08121720[] = { 0x149, 0x14a, 0x14b, 0x14a, 0, 0 };
if (super->action == 0) {
super->action = 1;
super->actionDelay = 8;
super->timer = 8;
super->spritePriority.b0 = 7;
gScreen.controls.layerFXControl = 0x640;
gScreen.controls.alphaBlend = 0x1003;
}
if (--super->actionDelay == 0) {
super->actionDelay = 2;
sub_0801D28C(super, gUnk_08121720[super->field_0xf++]);
if (gUnk_08121720[super->field_0xf] == 0) {
super->field_0xf = 0;
if (--super->timer == 0) {
super->timer = 2;
sub_0801D28C(super, gUnk_08121720[super->subtimer++]);
if (gUnk_08121720[super->subtimer] == 0) {
super->subtimer = 0;
}
}
}
@@ -212,13 +212,13 @@ void Object3E_Type8_Init(Object3EEntity* this) {
super->action = 2;
if ((super->type2 == 0) && (CheckLocalFlag(0x7c) == 0)) {
super->action = 1;
super->actionDelay = 0;
super->timer = 0;
super->spriteRendering.alphaBlend = 1;
gScreen.controls.layerFXControl = 0x640;
gScreen.controls.alphaBlend = 0x1000;
SoundReq(SFX_179);
} else {
super->actionDelay = 8;
super->timer = 8;
tilePosition = COORD_TO_TILE(super);
if (super->type2 != 0) {
tilePosition -= 0x40;
@@ -229,11 +229,11 @@ void Object3E_Type8_Init(Object3EEntity* this) {
void Object3E_Type8_Action1(Object3EEntity* this) {
if ((gRoomTransition.frameCount & 3U) == 0) {
gScreen.controls.alphaBlend = ((0x10 - super->actionDelay) * 0x100) | super->actionDelay;
super->actionDelay++;
gScreen.controls.alphaBlend = ((0x10 - super->timer) * 0x100) | super->timer;
super->timer++;
if (gScreen.controls.alphaBlend == 0x10) {
super->action = 2;
super->actionDelay = 8;
super->timer = 8;
super->spriteRendering.alphaBlend = 0;
gScreen.controls.layerFXControl = 0;
SetTile(0x4069, COORD_TO_TILE(super), super->collisionLayer);
@@ -245,11 +245,11 @@ void Object3E_Type8_Action2(Object3EEntity* this) {
static const u16 gUnk_08121738[] = {
0x14c, 0x14d, 0x14e, 0x14f, 0x150, 0x151, 0x150, 0x14f, 0x14e, 0x14d, 0x14c, 0,
};
if (--super->actionDelay == 0) {
super->actionDelay = 8;
ChangeObjPalette(super, gUnk_08121738[super->field_0xf++]);
if (gUnk_08121738[super->field_0xf] == 0) {
super->field_0xf = 0;
if (--super->timer == 0) {
super->timer = 8;
ChangeObjPalette(super, gUnk_08121738[super->subtimer++]);
if (gUnk_08121738[super->subtimer] == 0) {
super->subtimer = 0;
}
}
}
+3 -3
View File
@@ -39,7 +39,7 @@ void Object42(Object42Entity* this) {
void sub_0808DDB4(Object42Entity* this) {
super->action = 1;
if (super->type != 0) {
super->actionDelay = 0x78;
super->timer = 0x78;
this->unk_6c = 0xf0;
InitializeAnimation(super, 0);
sub_0808DDE8(this);
@@ -55,9 +55,9 @@ void sub_0808DDE8(Object42Entity* this) {
Entity* player;
this->unk_6c--;
if (sub_0807953C()) {
super->field_0xf++;
super->subtimer++;
}
if (((0x1e < super->field_0xf) || ((gPlayerState.flags & 0x1810) != 0)) || (this->unk_6c == 0)) {
if (((0x1e < super->subtimer) || ((gPlayerState.flags & 0x1810) != 0)) || (this->unk_6c == 0)) {
gPlayerState.flags &= 0xfffffbff;
DeleteThisEntity();
}
+9 -9
View File
@@ -39,7 +39,7 @@ void Object43_Init(Object43Entity* this) {
super->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY;
super->animationState = gPlayerEntity.animationState >> 1;
super->direction = (((super->animationState + 1) & 3) << 3);
super->field_0xf = 6;
super->subtimer = 6;
super->speed = 0x140;
super->spriteVramOffset = 0x3c;
super->palette.b.b0 = 4;
@@ -48,13 +48,13 @@ void Object43_Init(Object43Entity* this) {
super->updatePriority = 6;
InitializeAnimation(super, 7);
if (super->type2 != 0) {
super->actionDelay = 0x28;
super->timer = 0x28;
} else {
super->spriteSettings.draw = 1;
if ((gPlayerState.skills & SKILL_FAST_SPIN) != 0) {
super->actionDelay = 0x28;
super->timer = 0x28;
} else {
super->actionDelay = 0x50;
super->timer = 0x50;
}
Object43_Action1(this);
@@ -99,13 +99,13 @@ void Object43_Action1(Object43Entity* this) {
if (tmp1 != 0) {
GetNextFrame(super);
if (super->actionDelay != 0) {
super->actionDelay--;
if (super->timer != 0) {
super->timer--;
tmp2 = 3;
if ((super->type2 == 0) && ((gPlayerState.skills & SKILL_FAST_SPIN) == 0)) {
tmp2 = 7;
}
if ((super->actionDelay & tmp2) == 0) {
if ((super->timer & tmp2) == 0) {
this->unk_6c++;
}
} else {
@@ -148,8 +148,8 @@ void Object43_Action1(Object43Entity* this) {
break;
}
if (--super->field_0xf == 0) {
super->field_0xf = 6;
if (--super->subtimer == 0) {
super->subtimer = 6;
super->direction ^= 0x10;
}
LinearMoveUpdate(super);
+3 -3
View File
@@ -172,7 +172,7 @@ void sub_0808F3DC(Entity* this) {
if (this->action == 0) {
this->spriteSettings.draw = 1;
this->action = 1;
this->actionDelay = 120;
this->timer = 120;
InitializeAnimation(this, this->type + 1);
// TODO: This block of code might supposed to be a switch statement.
if (this->type != 8) {
@@ -217,7 +217,7 @@ void sub_0808F498(Entity* this) {
DeleteThisEntity();
}
if (this->actionDelay-- == 0) {
if (this->timer-- == 0) {
DeleteThisEntity();
}
@@ -226,7 +226,7 @@ void sub_0808F498(Entity* this) {
}
} else {
this->action = 1;
this->actionDelay = 64;
this->timer = 64;
var0 = this->type2 != 0 ? 44 : 43;
this->x.HALF.HI -= this->parent->hitbox->width;
this->x.HALF.HI += (s32)Random() % (this->parent->hitbox->width * 2);
+9 -9
View File
@@ -34,13 +34,13 @@ void Object4B(Object4BEntity* this) {
void Object4B_Init(Object4BEntity* this) {
super->action = 1;
super->actionDelay = 0x3c;
super->timer = 0x3c;
InitializeAnimation(super, 0);
}
void Object4B_Action1(Object4BEntity* this) {
if (--super->actionDelay == 0) {
super->actionDelay = 0x78;
if (--super->timer == 0) {
super->timer = 0x78;
super->action++;
super->spriteSettings.draw = 1;
}
@@ -57,13 +57,13 @@ void Object4B_Action2(Object4BEntity* this) {
void Object4B_Action3(Object4BEntity* this) {
GetNextFrame(super);
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action++;
super->direction = 0;
super->speed = 0x100;
super->zVelocity = 0x20000;
super->spriteOrientation.flipY = 0;
super->actionDelay = 0;
super->timer = 0;
InitializeAnimation(super, 3);
SoundReq(SFX_12B);
}
@@ -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->actionDelay = 0x78;
super->timer = 0x78;
InitializeAnimation(super, 2);
}
} else if ((super->frame & ANIM_DONE) != 0) {
@@ -94,7 +94,7 @@ void Object4B_Action4(Object4BEntity* this) {
void Object4B_Action5(Object4BEntity* this) {
GetNextFrame(super);
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action++;
InitializeAnimation(super, 5);
}
@@ -104,14 +104,14 @@ void Object4B_Action6(Object4BEntity* this) {
GetNextFrame(super);
if ((super->frame & ANIM_DONE) != 0) {
super->action++;
super->actionDelay = 0x3c;
super->timer = 0x3c;
InitializeAnimation(super, 1);
}
}
void Object4B_Action7(Object4BEntity* this) {
GetNextFrame(super);
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
gMenu.overlayType++;
DeleteThisEntity();
}
+2 -2
View File
@@ -53,10 +53,10 @@ void sub_08091198(Entity* this) {
case 0xff:
break;
case 0xf:
CreateFx(this, this->actionDelay, 0x80);
CreateFx(this, this->timer, 0x80);
break;
default:
CreateObjectWithParent(this, this->type2, this->actionDelay, 0);
CreateObjectWithParent(this, this->type2, this->timer, 0);
break;
}
+7 -7
View File
@@ -73,17 +73,17 @@ void Object61_Action1Type0(Object61Entity* this) {
this->unk_72 -= 4;
break;
case 2:
if (super->field_0xf == 0) {
if (super->subtimer == 0) {
if (this->unk_72 > 0x80) {
this->unk_72 -= 0x20;
} else {
super->field_0xf += 1;
super->subtimer += 1;
SoundReq(SFX_124);
}
if (this->unk_6e < 0x120) {
this->unk_6e += 0x40;
}
} else if (super->field_0xf != 0xff) {
} else if (super->subtimer != 0xff) {
if (this->unk_72 < 0x100) {
this->unk_72 += 0x20;
} else {
@@ -95,7 +95,7 @@ void Object61_Action1Type0(Object61Entity* this) {
this->unk_6e = 0x100;
}
if (this->unk_6e == 0x100) {
super->field_0xf = 0xff;
super->subtimer = 0xff;
}
} else {
sub_080936C8(this);
@@ -146,12 +146,12 @@ void sub_080936C8(Object61Entity* this) {
s32 tmp = gNewPlayerEntity.unk_7c;
this->unk_76 = 0x138 - (gNewPlayerEntity.unk_7c >> 2);
this->unk_74 = 8 - (tmp / 0x3c);
if (super->actionDelay == 0) {
if (super->timer == 0) {
if (this->unk_76 < this->unk_6e) {
this->unk_6e -= 8;
this->unk_72 += 8;
} else {
super->actionDelay++;
super->timer++;
this->unk_6e = this->unk_76;
this->unk_72 = this->unk_76 + 0x30;
}
@@ -160,7 +160,7 @@ void sub_080936C8(Object61Entity* this) {
this->unk_6e += 8;
this->unk_72 -= 8;
} else {
super->actionDelay = 0;
super->timer = 0;
this->unk_6e = this->unk_76 + 0x30;
this->unk_72 = this->unk_76;
}
+4 -4
View File
@@ -25,7 +25,7 @@ void sub_08093D88(Entity* this) {
this->action = 1;
this->z.HALF.HI -= 8;
this->zVelocity = 0x2a000;
this->actionDelay = 32;
this->timer = 32;
switch (this->type) {
case 0:
if (CreateRandomItemDrop(this, 4) == 0) {
@@ -36,7 +36,7 @@ void sub_08093D88(Entity* this) {
case 1:
objEnt = CreateObject(0, OBJECT_BLOCKING_STAIRS, 0);
if (objEnt != NULL) {
objEnt->actionDelay = 5;
objEnt->timer = 5;
sub_08093E10(this, objEnt);
}
break;
@@ -44,11 +44,11 @@ void sub_08093D88(Entity* this) {
}
void sub_08093DE0(Entity* this) {
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
this->action = 2;
}
if ((this->actionDelay & 1) != 0) {
if ((this->timer & 1) != 0) {
this->child->y.HALF.HI++;
}
}
+8 -8
View File
@@ -45,7 +45,7 @@ typedef struct {
typedef struct {
s8 x;
s8 y;
u8 actionDelay;
u8 timer;
u8 unk3;
u8 unk4;
u8 filler[3];
@@ -118,8 +118,8 @@ void sub_08094148(Object67Entity* this) {
ptr = gUnk_081229F0 + super->type2;
super->x.HALF.HI = ptr->x + super->x.HALF.HI;
super->y.HALF.HI = ptr->y + super->y.HALF.HI;
super->actionDelay = ptr->actionDelay;
super->field_0xf = ptr->unk3;
super->timer = ptr->timer;
super->subtimer = ptr->unk3;
this->unk7c = 0xce;
this->unk74 = 0;
if ((ptr->unk4 & 0x40) != 0) {
@@ -144,7 +144,7 @@ void sub_08094148(Object67Entity* this) {
super->hitbox->height = gUnk_080FD2E8.height;
COLLISION_ON(super);
super->collisionLayer = 2;
super->field_0x3c = 7;
super->collisionFlags = 7;
super->hurtType = 0x48;
super->hitType = 0x7a;
super->flags2 = 1;
@@ -220,8 +220,8 @@ void sub_08094424(Object67Entity* this) {
super->action = 3;
this->unk7c = 0x78;
} else {
sub_0806FCF4(super, this->unk80.HALF.HI, 0x20, super->actionDelay);
sub_0806FCF4(super, this->unk84.HALF.HI, 0x20, super->field_0xf);
sub_0806FCF4(super, this->unk80.HALF.HI, 0x20, super->timer);
sub_0806FCF4(super, this->unk84.HALF.HI, 0x20, super->subtimer);
SetAffineInfo(super, this->unk80.HALF_U.HI, this->unk84.HALF_U.HI, 0);
}
@@ -271,8 +271,8 @@ void sub_08094570(Object67Entity* this) {
this->unk84.HALF.HI = this->unk84.HALF.HI + 1;
uVar3 = this->unk84.HALF_U.HI;
}
sub_0806FCF4(super, this->unk80.HALF.HI, 0x20, super->actionDelay);
sub_0806FCF4(super, this->unk84.HALF.HI, 0x20, super->field_0xf);
sub_0806FCF4(super, this->unk80.HALF.HI, 0x20, super->timer);
sub_0806FCF4(super, this->unk84.HALF.HI, 0x20, super->subtimer);
SetAffineInfo(super, this->unk80.HALF_U.HI, this->unk84.HALF_U.HI, 0);
}
+5 -5
View File
@@ -58,7 +58,7 @@ void sub_08094774(Object68Entity* this) {
}
if (super->type2 == 0) {
CopyPosition(super->child, super);
super->actionDelay = 0;
super->timer = 0;
super->spritePriority.b0 = 0;
super->spriteRendering.b3 = 0;
sub_08094980(this, 0x403b, 0x403c);
@@ -70,7 +70,7 @@ void sub_08094774(Object68Entity* this) {
child = CreateGroundItem(&gPlayerEntity, ITEM_FAIRY, 0);
super->child = child;
if (child != NULL) {
child->actionDelay = 1;
child->timer = 1;
}
break;
case 3 ... 8:
@@ -88,9 +88,9 @@ void sub_080948D0(Object68Entity* this) {
}
void sub_080948E8(Object68Entity* this) {
if (super->actionDelay < 0x3c) {
if (super->timer < 0x3c) {
super->z.WORD -= 0x4000;
if ((super->actionDelay & 3) == 0) {
if ((super->timer & 3) == 0) {
super->child = CreateFx(super, FX_DASH, 0x40);
if (super->child != NULL) {
super->child->spriteRendering.b3 = super->spriteRendering.b3;
@@ -102,7 +102,7 @@ void sub_080948E8(Object68Entity* this) {
}
}
}
super->actionDelay++;
super->timer++;
} else {
DeleteThisEntity();
}
+24 -24
View File
@@ -358,7 +358,7 @@ void sub_08094E30(Object6AEntity* this) {
}
} else if (super->action == 0) {
super->action++;
switch (super->actionDelay) {
switch (super->timer) {
case 1:
InitializeAnimation(super, 2);
break;
@@ -414,7 +414,7 @@ void sub_08094FA8(Object6AEntity* this) {
if (!CheckGlobalFlag(BIN_DOGFOOD)) {
CreateItemEntity(0x1c, 0, 0);
SetGlobalFlag(BIN_DOGFOOD);
super->actionDelay = 60;
super->timer = 60;
}
#else
CreateItemEntity(0x1c, 0, 0);
@@ -423,7 +423,7 @@ void sub_08094FA8(Object6AEntity* this) {
break;
#ifndef EU
case 4:
if (!--super->actionDelay) {
if (!--super->timer) {
super->action = 5;
SetPlayerControl(1);
}
@@ -502,7 +502,7 @@ void sub_080951C4(Object6AEntity* this) {
if (super->action == 0) {
super->action++;
super->z.HALF.HI = -16;
super->actionDelay = 0;
super->timer = 0;
sub_0807DD64(super);
InitializeAnimation(super, 3);
}
@@ -512,8 +512,8 @@ void sub_080951C4(Object6AEntity* this) {
if (super->z.HALF.HI == 0) {
super->z.WORD = 0;
super->parent = NULL;
if (super->actionDelay == 0) {
super->actionDelay++;
if (super->timer == 0) {
super->timer++;
SoundReq(230);
}
}
@@ -550,8 +550,8 @@ void sub_08095288(Object6AEntity* this) {
super->subAction = 0;
SetAffineInfo(super, 0x100, 0x100, 0xC000);
} else {
SetAffineInfo(super, 0x100, 0x100, super->actionDelay << 8);
super->actionDelay += 10;
SetAffineInfo(super, 0x100, 0x100, super->timer << 8);
super->timer += 10;
LinearMoveUpdate(super);
}
}
@@ -653,8 +653,8 @@ void sub_080954AC(Object6AEntity* this, u32 arg2) {
void sub_080954DC(Object6AEntity* this) {
switch (super->action) {
case 0:
if (super->actionDelay != 0) {
super->actionDelay--;
if (super->timer != 0) {
super->timer--;
} else {
super->action++;
super->subAction = 0;
@@ -810,7 +810,7 @@ void sub_0809584C(Object6AEntity* this) {
idx = super->health;
if ((idx & 0x7F) != 0 && !ReadBit((u32*)gArea.filler5, idx - 1))
DeleteThisEntity();
if (super->actionDelay != 0 && CheckKinstoneFused(super->type2))
if (super->timer != 0 && CheckKinstoneFused(super->type2))
DeleteThisEntity();
if (super->action == 0) {
super->action++;
@@ -916,20 +916,20 @@ void sub_08095A8C(Object6AEntity* this) {
break;
case 2:
super->action++;
super->actionDelay = 120;
super->timer = 120;
case 3:
super->spriteSettings.draw ^= 1;
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action = 1;
super->spriteSettings.draw = 1;
}
break;
case 4:
super->action++;
super->actionDelay = 120;
super->timer = 120;
case 5:
super->spriteSettings.draw ^= 1;
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action = 1;
super->spriteSettings.draw = 0;
}
@@ -1006,11 +1006,11 @@ void sub_08095C68(Object6AEntity* this) {
super->action++;
sub_080042D0(super, super->frameIndex, (u16)super->spriteIndex);
}
if (super->actionDelay != 0) {
if (--super->actionDelay < 8) {
if (super->timer != 0) {
if (--super->timer < 8) {
super->spriteSettings.draw ^= 1;
}
if (super->actionDelay != 0) {
if (super->timer != 0) {
return;
}
}
@@ -1023,7 +1023,7 @@ void sub_08095CB0(Object6AEntity* this) {
super->child = e;
e->parent = super;
CopyPosition(super, e);
e->actionDelay = 16;
e->timer = 16;
e->frameIndex = super->frameIndex;
e->lastFrameIndex = super->frameIndex;
}
@@ -1153,12 +1153,12 @@ void sub_08095F38(Object6AEntity* this) {
ChangeObjPalette(super, pal);
if ((gPlayerEntity.frame & 1) == 0) {
local->anim = 0x8BF;
super->actionDelay = 52;
super->field_0xf = -75;
super->timer = 52;
super->subtimer = -75;
} else {
local->anim = 0x8E3;
super->actionDelay = 85;
super->field_0xf = -42;
super->timer = 85;
super->subtimer = -42;
}
CopyPosition(&gPlayerEntity, super);
super->spritePriority.b0 = 3;
@@ -1169,7 +1169,7 @@ void sub_08095F38(Object6AEntity* this) {
}
if ((u16)gPlayerEntity.spriteIndex != local->anim >> 8 || gPlayerEntity.animIndex != (u8)local->anim)
DeleteThisEntity();
tmp = gPlayerEntity.frameIndex - super->actionDelay + super->field_0xf;
tmp = gPlayerEntity.frameIndex - super->timer + super->subtimer;
if (tmp != super->frameIndex) {
super->frameIndex = tmp;
sub_080042D0(super, super->frameIndex, (u16)super->spriteIndex);
+5 -5
View File
@@ -70,9 +70,9 @@ void sub_08097C20(Object74Entity* this) {
SetPriorityTimer(0x1e);
sub_0800445C(super);
CreateMagicSparkles(super->x.HALF.HI, super->y.HALF.HI, super->collisionLayer);
if (--super->actionDelay == 0) {
super->actionDelay = 8;
tmp = ++super->field_0xf;
if (--super->timer == 0) {
super->timer = 8;
tmp = ++super->subtimer;
gScreen.controls.alphaBlend = (((0x10 - tmp) * 0x100)) | tmp;
if (gScreen.controls.alphaBlend == 0x10) {
SetPlayerControl(CONTROL_ENABLED);
@@ -95,8 +95,8 @@ void sub_08097CB4(Object74Entity* this) {
super->action = 3;
super->spriteSettings.draw = 1;
super->spriteRendering.alphaBlend = 1;
super->actionDelay = 0x1e;
super->field_0xf = 0;
super->timer = 0x1e;
super->subtimer = 0;
gScreen.controls.layerFXControl = 0xf40;
gScreen.controls.alphaBlend = 0x1000;
SoundReq(SFX_14A);
+6 -6
View File
@@ -42,8 +42,8 @@ void Object79_Init(Object79Entity* this) {
super->speed = 0;
this->unk6c = 0;
this->unk7a = 0x1200;
super->actionDelay = 0;
super->field_0xf = 30;
super->timer = 0;
super->subtimer = 30;
this->objDir.HALF.HI = Object79_Directions[super->type];
this->unk74 = 0x2000;
SetDefaultPriority(super, 6);
@@ -64,7 +64,7 @@ void Object79_Action1(Object79Entity* this) {
if (super->type == 0) {
UpdateAnimationSingleFrame(super);
if (super->type2 != 0) {
gPlayerEntity.field_0xf = 0;
gPlayerEntity.subtimer = 0;
super->action++;
InitAnimationForceUpdate(super, 1);
SoundReq(SFX_178);
@@ -95,9 +95,9 @@ 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-- == 0) {
super->field_0xf = 30;
super->actionDelay ^= 1;
if (super->subtimer-- == 0) {
super->subtimer = 30;
super->timer ^= 1;
}
sub_08098130(this);
}
+1 -1
View File
@@ -24,7 +24,7 @@ void Object81(Entity* this) {
void Object81_Init(Object81Entity* this) {
super->action = 1;
super->actionDelay = 0;
super->timer = 0;
this->tilePos = COORD_TO_TILE(super);
if (gPlayerState.flags & PL_MINISH) {
super->collisionLayer = 2;
+2 -2
View File
@@ -42,8 +42,8 @@ void sub_08099E58(Entity* this) {
GetNextFrame(this);
if (this->frame & ANIM_DONE) {
this->frame &= ~0x80;
this->actionDelay++;
if (this->actionDelay == 3) {
this->timer++;
if (this->timer == 3) {
this->action = 3;
this->frameIndex = 4;
}
+37 -37
View File
@@ -40,8 +40,8 @@ void Object8E_Type0(Object8EEntity* this) {
switch (super->action) {
case 0:
super->action = 1;
super->actionDelay = 0x3c;
super->field_0xf = 0;
super->timer = 0x3c;
super->subtimer = 0;
gRoomControls.camera_target = super;
gRoomControls.unk5 = 1;
if (super->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
@@ -55,19 +55,19 @@ void Object8E_Type0(Object8EEntity* this) {
gScreen.controls.window0VerticalDimensions = 0xa0;
break;
case 1:
if (super->actionDelay != 0) {
super->actionDelay--;
if (super->timer != 0) {
super->timer--;
} else {
if (super->field_0xf < 0x20) {
if (super->subtimer < 0x20) {
if ((gRoomTransition.frameCount & 0x1fU) == 0) {
SoundReq(SFX_133);
}
if ((gRoomTransition.frameCount & 3U) == 0) {
sub_0809B97C(this, ++super->field_0xf);
sub_0809B97C(this, ++super->subtimer);
}
} else {
super->action = 2;
super->actionDelay = 0x3c;
super->timer = 0x3c;
gScreen.lcd.displayControl &= 0xdfff;
gRoomControls.camera_target = &gPlayerEntity;
SoundReq(SFX_134);
@@ -75,7 +75,7 @@ void Object8E_Type0(Object8EEntity* this) {
}
break;
case 2:
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
gScreen.lcd.displayControl |= 0x4800;
gRoomControls.unk5 = 4;
(super->parent)->subAction = 1;
@@ -114,8 +114,8 @@ void Object8E_Type1(Object8EEntity* this) {
switch (super->action) {
case 0:
super->action = 1;
super->actionDelay = 0x3c;
super->field_0xf = 0x20;
super->timer = 0x3c;
super->subtimer = 0x20;
gRoomControls.camera_target = super;
gRoomControls.unk5 = 1;
if (super->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
@@ -129,26 +129,26 @@ void Object8E_Type1(Object8EEntity* this) {
gScreen.controls.window0VerticalDimensions = 0xa0;
break;
case 1:
if (super->actionDelay != 0) {
super->actionDelay--;
if (super->timer != 0) {
super->timer--;
} else {
if (super->field_0xf != 0) {
if (super->subtimer != 0) {
if ((gRoomTransition.frameCount & 0x1fU) == 0) {
SoundReq(SFX_133);
}
if ((gRoomTransition.frameCount & 3U) == 0) {
sub_0809B97C(this, --super->field_0xf);
sub_0809B97C(this, --super->subtimer);
}
} else {
super->action = 2;
super->actionDelay = 0x3c;
super->timer = 0x3c;
gRoomControls.camera_target = &gPlayerEntity;
SoundReq(SFX_134);
}
}
break;
case 2:
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
gRoomControls.unk5 = 4;
gScreen.lcd.displayControl &= 0xd7ff;
(super->parent)->subAction = 1;
@@ -165,8 +165,8 @@ void Object8E_Type2(Object8EEntity* this) {
switch (super->action) {
case 0:
super->action++;
super->actionDelay = 0x3c;
super->field_0xf = 0;
super->timer = 0x3c;
super->subtimer = 0;
gRoomControls.camera_target = super;
gRoomControls.unk5 = 1;
if (super->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
@@ -180,8 +180,8 @@ void Object8E_Type2(Object8EEntity* this) {
break;
case 1:
if (sub_0809BE78(this)) {
if (super->actionDelay != 0) {
if (--super->actionDelay == 0) {
if (super->timer != 0) {
if (--super->timer == 0) {
gScreen.lcd.displayControl = (gScreen.lcd.displayControl & 0xbfff) | 0x2800;
}
} else {
@@ -194,7 +194,7 @@ void Object8E_Type2(Object8EEntity* this) {
}
} else {
super->action = 2;
super->actionDelay = 0x1e;
super->timer = 0x1e;
gScreen.lcd.displayControl = (gScreen.lcd.displayControl & 0xdfff) | 0x4800;
super->x.HALF.HI += 0x68;
super->y.HALF.HI += 0x28;
@@ -204,15 +204,15 @@ void Object8E_Type2(Object8EEntity* this) {
}
break;
case 2:
if (sub_0809BE78(this) && (--super->actionDelay == 0)) {
super->actionDelay = 0x78;
if (sub_0809BE78(this) && (--super->timer == 0)) {
super->timer = 0x78;
super->action = 3;
SetLocalFlag(0x35);
SoundReq(SFX_SECRET);
}
break;
case 3:
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
super->action = 4;
gRoomControls.camera_target = &gPlayerEntity;
gRoomControls.unk5 = 2;
@@ -235,8 +235,8 @@ void Object8E_Type3(Object8EEntity* this) {
switch (super->action) {
case 0:
super->action = 1;
super->actionDelay = 0x3c;
super->field_0xf = 0;
super->timer = 0x3c;
super->subtimer = 0;
gRoomControls.camera_target = super;
gRoomControls.unk5 = 1;
if (super->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
@@ -251,8 +251,8 @@ void Object8E_Type3(Object8EEntity* this) {
break;
case 1:
if (sub_0809BE78(this)) {
if (super->actionDelay != 0) {
if (--super->actionDelay == 0) {
if (super->timer != 0) {
if (--super->timer == 0) {
SetFade(6, 8);
sub_0805AAF0(3);
gScreen.lcd.displayControl = (gScreen.lcd.displayControl & 0xbfff) | 0x2800;
@@ -268,7 +268,7 @@ void Object8E_Type3(Object8EEntity* this) {
}
} else {
super->action = 2;
super->actionDelay = 0x78;
super->timer = 0x78;
gScreen.lcd.displayControl = (gScreen.lcd.displayControl & 0xdfff) | 0x4800;
SetLocalFlag(0x37);
SoundReq(SFX_134);
@@ -277,7 +277,7 @@ void Object8E_Type3(Object8EEntity* this) {
}
break;
case 2:
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
(super->parent)->subAction = 1;
DeleteThisEntity();
}
@@ -291,8 +291,8 @@ void Object8E_Type4(Object8EEntity* this) {
switch (super->action) {
case 0:
super->action = 1;
super->actionDelay = 0x3c;
super->field_0xf = 0x80;
super->timer = 0x3c;
super->subtimer = 0x80;
gRoomControls.camera_target = super;
gRoomControls.unk5 = 1;
if (super->x.HALF.HI > gPlayerEntity.x.HALF.HI) {
@@ -303,23 +303,23 @@ void Object8E_Type4(Object8EEntity* this) {
gPlayerEntity.animationState = tmp;
break;
case 1:
if (super->actionDelay != 0) {
super->actionDelay--;
if (super->timer != 0) {
super->timer--;
} else {
if (--super->field_0xf != 0) {
if (--super->subtimer != 0) {
if ((gRoomTransition.frameCount & 0x1fU) == 0) {
SoundReq(SFX_133);
}
} else {
super->action = 2;
super->actionDelay = 0x3c;
super->timer = 0x3c;
gRoomControls.camera_target = &gPlayerEntity;
SoundReq(SFX_134);
}
}
break;
case 2:
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
gRoomControls.unk5 = 4;
(super->parent)->subAction = 1;
DeleteThisEntity();
+3 -3
View File
@@ -71,7 +71,7 @@ void sub_080838DC(Entity* this) {
this->spriteOrientation.flipY = 1;
this->spriteRendering.b3 = 0;
this->spritePriority.b0 = 0;
this->actionDelay = 4;
this->timer = 4;
this->child = NULL;
this->action = 0;
}
@@ -93,8 +93,8 @@ void Object9_Init(Entity* this) {
}
void Object9_Action1(Entity* this) {
if (this->actionDelay) {
this->actionDelay--;
if (this->timer) {
this->timer--;
} else {
if ((*(Entity**)(gUnk_03003DF0.unk_4 + 8) != NULL) && ((u8)(gUnk_03003DF0.unk_4[3] - 1) < 100)) {
this->child = *(Entity**)(gUnk_03003DF0.unk_4 + 8);
+4 -4
View File
@@ -24,7 +24,7 @@ typedef struct _struct_gUnk_08123FB0 {
s16 speed;
s16 y;
u16 flag;
u8 actionDelay;
u8 timer;
u8 unk1f;
} struct_gUnk_08123FB0;
@@ -77,7 +77,7 @@ void Object96_Init(Entity* this, const struct_gUnk_08123FB0* param_2) {
this->speed = param_2->speed;
this->y.HALF.HI -= param_2->y;
this->z.WORD = 0;
this->actionDelay = param_2->actionDelay;
this->timer = param_2->timer;
if ((this->direction & 0x80)) {
dir = this->direction;
if (dir == 0x81) {
@@ -114,8 +114,8 @@ void Object96_Action2(Entity* this, const struct_gUnk_08123FB0* param_2) {
LinearMoveUpdate(this);
if (sub_080044EC(this, param_2->unk14) < 2) {
if (this->actionDelay) {
this->actionDelay--;
if (this->timer) {
this->timer--;
this->zVelocity = param_2->unk14 << 3;
} else {
this->action++;
+5 -5
View File
@@ -30,14 +30,14 @@ void sub_0809E360(Object98Entity* this) {
Entity* projEnt;
u32 index;
if (8 < super->actionDelay) {
super->actionDelay = 8;
if (8 < super->timer) {
super->timer = 8;
}
if (0x48 - super->actionDelay > gEntCount) {
for (index = 0; index < super->actionDelay; index++) {
if (0x48 - super->timer > gEntCount) {
for (index = 0; index < super->timer; index++) {
projEnt = CreateProjectile(GURUGURU_BAR_PROJECTILE);
projEnt->actionDelay = 14 + 12 * index;
projEnt->timer = 14 + 12 * index;
projEnt->parent = super;
}
+5 -5
View File
@@ -51,20 +51,20 @@ void sub_0809F374(Entity* this) {
InitializeAnimation(this, 1);
SoundReq(SFX_186);
} else {
this->actionDelay++;
this->timer++;
}
} else {
#endif
switch (sub_080044EC(this, 0x2000)) {
default:
this->actionDelay++;
this->timer++;
break;
case 0:
this->action = 2;
InitializeAnimation(this, 1);
// fall through
case 1:
this->actionDelay = 0;
this->timer = 0;
sub_0809F448(this);
SoundReq(SFX_186);
}
@@ -96,8 +96,8 @@ void sub_0809F408(Entity* this) {
void sub_0809F448(Entity* this) {
s32 tmp;
int rand = Random();
const struct_08124708* tmp2 = &gUnk_08124708[this->field_0xf];
this->field_0xf++;
const struct_08124708* tmp2 = &gUnk_08124708[this->subtimer];
this->subtimer++;
tmp = 0x280000 - this->x.WORD;
switch (tmp2->unk_0) {
case 0:
+2 -2
View File
@@ -29,7 +29,7 @@ void sub_0809F920(ObjectA6Entity* this) {
super->action = 1;
COLLISION_ON(super);
super->field_0x3c = 7;
super->collisionFlags = 7;
super->hurtType = 0x48;
super->hitType = 1;
super->flags2 = 2;
@@ -39,7 +39,7 @@ void sub_0809F920(ObjectA6Entity* this) {
void sub_0809F964(ObjectA6Entity* this) {
Entity* fxEnt;
if (super->bitfield == 0xa1) {
if (super->contactFlags == 0xa1) {
fxEnt = CreateFx(super, FX_MAGIC_STORM, 0);
if (fxEnt != NULL) {
fxEnt->spritePriority.b0 = 3;
+23 -23
View File
@@ -39,8 +39,8 @@ void ObjectA8(ObjectA8Entity* this) {
ObjectA8_Init, ObjectA8_Action1, ObjectA8_Action2, ObjectA8_Action3,
ObjectA8_Action4, ObjectA8_Action5, ObjectA8_Action6,
};
if ((super->bitfield & 0x80) != 0) {
switch (super->bitfield & 0x7f) {
if ((super->contactFlags & 0x80) != 0) {
switch (super->contactFlags & 0x7f) {
case 0:
case 1:
case 4:
@@ -74,12 +74,12 @@ void ObjectA8_Init(ObjectA8Entity* this) {
return;
}
super->collisionLayer = 3;
super->field_0x3c = 0x17;
super->collisionFlags = 0x17;
super->hurtType = 0x48;
super->hitType = 7;
super->flags2 = 0x17;
super->hitbox = (Hitbox*)&gUnk_080FD1A8;
super->field_0x1c = 1;
super->gustJarFlags = 1;
this->unk_74 = super->x.HALF.HI;
this->unk_76 = super->y.HALF.HI;
SetDefaultPriority(super, 3);
@@ -89,13 +89,13 @@ void ObjectA8_Init(ObjectA8Entity* this) {
void ObjectA8_Action1(ObjectA8Entity* this) {
super->z.WORD -= 0xe000;
if (super->frame != 0) {
if (super->actionDelay != 0) {
super->actionDelay *= 0x1e;
if (super->timer != 0) {
super->timer *= 0x1e;
} else {
super->actionDelay = 0xf0;
super->timer = 0xf0;
}
super->action = 3;
super->field_0xf = 1;
super->subtimer = 1;
super->speed = 0x80;
}
}
@@ -111,12 +111,12 @@ void ObjectA8_Action2(ObjectA8Entity* this) {
void ObjectA8_Action2Subaction0(ObjectA8Entity* this) {
super->subAction = 1;
super->field_0x1d = 1;
super->gustJarTolerance = 1;
super->spriteSettings.draw = 1;
}
void ObjectA8_Action2Subaction1(ObjectA8Entity* this) {
if ((gPlayerState.field_0x1c & 0xf) != 1 || (super->bitfield & 0x7f) != 0x13) {
if ((gPlayerState.field_0x1c & 0xf) != 1 || (super->contactFlags & 0x7f) != 0x13) {
super->action = 3;
} else {
sub_0806F4E8(super);
@@ -124,7 +124,7 @@ void ObjectA8_Action2Subaction1(ObjectA8Entity* this) {
}
void ObjectA8_Action2Subaction2(ObjectA8Entity* this) {
if ((gPlayerState.field_0x1c & 0xf) != 1 || (super->bitfield & 0x7f) != 0x13) {
if ((gPlayerState.field_0x1c & 0xf) != 1 || (super->contactFlags & 0x7f) != 0x13) {
super->action = 3;
} else {
if (sub_0806F3E4(super)) {
@@ -143,10 +143,10 @@ void ObjectA8_Action3(ObjectA8Entity* this) {
0,
0,
};
if (--super->field_0xf == 0) {
if (--super->subtimer == 0) {
u32 rand = Random();
super->flags |= ENT_COLLIDE;
super->field_0xf = 0x20;
super->subtimer = 0x20;
super->speed = gUnk_0812484C[rand >> 8 & 1];
if (sub_0809FE9C(this)) {
super->direction = rand & 0x1f;
@@ -159,10 +159,10 @@ void ObjectA8_Action3(ObjectA8Entity* this) {
}
ProcessMovement1(super);
if ((AnyPrioritySet() == 0) && (super->type == 0)) {
if (((gRoomTransition.frameCount & 1) != 0) && (--super->actionDelay == 0)) {
if (((gRoomTransition.frameCount & 1) != 0) && (--super->timer == 0)) {
sub_08081404(super, 0);
}
if (super->actionDelay < 0x3c) {
if (super->timer < 0x3c) {
super->spriteSettings.draw ^= 1;
}
}
@@ -183,8 +183,8 @@ void ObjectA8_Action4(ObjectA8Entity* this) {
void ObjectA8_Action5(ObjectA8Entity* this) {
super->action = 6;
super->actionDelay = 0x80;
super->field_0xf = 6;
super->timer = 0x80;
super->subtimer = 6;
super->flags &= ~ENT_COLLIDE;
super->spriteSettings.draw = 1;
super->spritePriority.b1 = 2;
@@ -195,27 +195,27 @@ void ObjectA8_Action5(ObjectA8Entity* this) {
void ObjectA8_Action6(ObjectA8Entity* this) {
s32 tmp;
Entity* child = super->child;
tmp = gSineTable[super->actionDelay] * 0xa00;
tmp = gSineTable[super->timer] * 0xa00;
if (tmp < 0) {
tmp += 0xffff;
}
super->x.HALF.HI = (s16)(tmp >> 0x10) + child->x.HALF.HI;
tmp = gSineTable[super->actionDelay + 0x40] * 0x500;
tmp = gSineTable[super->timer + 0x40] * 0x500;
if (tmp < 0) {
tmp += 0xffff;
}
super->y.HALF.HI = super->child->y.HALF.HI - (tmp >> 0x10);
super->actionDelay += 8;
super->timer += 8;
super->z.HALF.HI = super->child->z.HALF.HI;
super->spriteOrientation.flipY = super->child->spriteOrientation.flipY;
super->spriteRendering.b3 = super->child->spriteRendering.b3;
if ((u8)(super->actionDelay - 0x41) < 0x7f) {
if ((u8)(super->timer - 0x41) < 0x7f) {
super->spritePriority.b0 = 3;
} else {
super->spritePriority.b0 = 5;
}
if (--super->field_0xf == 0) {
super->field_0xf = 6;
if (--super->subtimer == 0) {
super->subtimer = 6;
if (((--super->spriteOffsetY) * 0x1000000) >> 0x18 < -0x16) {
sub_08081404(super, 1);
}
+2 -2
View File
@@ -30,8 +30,8 @@ void sub_0809FF28(Entity* this) {
if (this->frame & 0x80) {
this->action = 2;
pEVar1 = this->parent;
pEVar1->flags = this->actionDelay;
pEVar1->spriteSettings.draw = this->field_0xf;
pEVar1->flags = this->timer;
pEVar1->spriteSettings.draw = this->subtimer;
((GenericEntity*)pEVar1)->field_0x6c.HALF.HI &= 0xef;
}
}
+1 -1
View File
@@ -19,7 +19,7 @@ void ObjectAD(Entity* this) {
void sub_080A04A4(Entity* this) {
this->action = 1;
this->frameIndex = 4;
this->actionDelay = 0;
this->timer = 0;
this->spriteRendering.b3 = 3;
this->spritePriority.b0 = 7;
this->z.WORD = 0;
+3 -3
View File
@@ -58,7 +58,7 @@ void ObjectB_Action1(ObjectBEntity* this) {
return;
}
super->action = 2;
switch (super->actionDelay) {
switch (super->timer) {
case 0:
case 1:
this->unk_68 = GiveItem(super->type, super->type2);
@@ -98,7 +98,7 @@ void ObjectB_Action2(ObjectBEntity* this) {
u32 messageIndex;
if ((super->parent)->frame == 0x42) {
super->action = 3;
switch (super->actionDelay) {
switch (super->timer) {
case 1:
case 3:
case 4:
@@ -135,7 +135,7 @@ void ObjectB_Action3(ObjectBEntity* this) {
if ((super->parent)->action == 8) {
return;
}
switch (super->actionDelay) {
switch (super->timer) {
case 0:
case 1:
case 2:
+2 -2
View File
@@ -10,7 +10,7 @@ void ObjectB2(Entity* this) {
if (this->action == 0) {
this->action = 1;
this->actionDelay = 0x10;
this->timer = 0x10;
this->direction = this->type << 3;
if (this->collisionLayer == 2) {
layer = gUnk_0200D654;
@@ -28,7 +28,7 @@ void ObjectB2(Entity* this) {
if (this->speed < 0x41) {
this->spriteSettings.draw ^= 1;
if (--this->actionDelay == 0) {
if (--this->timer == 0) {
DeleteThisEntity();
}
}
+17 -17
View File
@@ -33,23 +33,23 @@ void ObjectB4_Type0(Entity* this) {
this->action = 1;
this->spriteSettings.draw = 2;
this->frameIndex = 9;
this->actionDelay = 8;
this->field_0xf = 0;
this->timer = 8;
this->subtimer = 0;
this->spriteRendering.b3 = 1;
this->spritePriority.b0 = 4;
this->spriteOrientation.flipY = 1;
sub_0806FB00(this, 0xbf, 0x48, 0x1e);
break;
case 1:
if ((this->field_0xf < 7) && (--this->actionDelay == 0)) {
this->actionDelay = 1;
pEVar3 = CreateObject(OBJECT_B4, 1, this->field_0xf);
if ((this->subtimer < 7) && (--this->timer == 0)) {
this->timer = 1;
pEVar3 = CreateObject(OBJECT_B4, 1, this->subtimer);
if (pEVar3 != NULL) {
CopyPosition(this, pEVar3);
pEVar3->y.HALF.HI = 0x68;
SortEntityBelow(this, pEVar3);
}
this->field_0xf++;
this->subtimer++;
}
if (sub_0806FB38(this) || (1 < gMenu.menuType)) {
@@ -57,14 +57,14 @@ void ObjectB4_Type0(Entity* this) {
this->y.HALF.HI = 0x48;
this->frameIndex = 10;
this->action = 2;
while (this->field_0xf < 7) {
pEVar3 = CreateObject(OBJECT_B4, 1, this->field_0xf);
while (this->subtimer < 7) {
pEVar3 = CreateObject(OBJECT_B4, 1, this->subtimer);
if (pEVar3 != NULL) {
CopyPosition(this, pEVar3);
pEVar3->y.HALF.HI = 0x68;
SortEntityBelow(this, pEVar3);
}
this->field_0xf++;
this->subtimer++;
}
pEVar3 = CreateObject(OBJECT_B4, 2, 0);
@@ -112,16 +112,16 @@ void ObjectB4_Type2(Entity* this) {
this->spritePriority.b0 = 0;
this->spriteOrientation.flipY = 1;
this->frameIndex = 11;
this->actionDelay = (Random() & 0x3f) + 0x40;
this->field_0xf = 0;
this->timer = (Random() & 0x3f) + 0x40;
this->subtimer = 0;
}
if (--this->actionDelay == 0) {
this->actionDelay = 4;
this->frameIndex = gUnk_08124B30[this->field_0xf++] + 2;
if (gUnk_08124B30[this->field_0xf] == 0xff) {
this->actionDelay = (Random() & 0x3f) + 0x40;
this->field_0xf = 0;
if (--this->timer == 0) {
this->timer = 4;
this->frameIndex = gUnk_08124B30[this->subtimer++] + 2;
if (gUnk_08124B30[this->subtimer] == 0xff) {
this->timer = (Random() & 0x3f) + 0x40;
this->subtimer = 0;
}
}
}
+5 -5
View File
@@ -68,8 +68,8 @@ NONMATCH("asm/non_matching/objectBD/sub_080A22C4.inc", void sub_080A22C4(Entity*
switch (this->action) {
case 0:
sub_080A2340(this);
this->actionDelay = 8;
this->field_0xf = 0;
this->timer = 8;
this->subtimer = 0;
this->subAction = this->frameIndex;
this->speed = (Random() & 3) * 0x10 + 0x1e;
break;
@@ -81,11 +81,11 @@ NONMATCH("asm/non_matching/objectBD/sub_080A22C4.inc", void sub_080A22C4(Entity*
this->action = 2;
break;
default:
if (--this->actionDelay != 0) {
if (--this->timer != 0) {
return;
}
this->actionDelay = 8;
this->field_0xf = tmp2 = (this->field_0xf + 1) & 3;
this->timer = 8;
this->subtimer = tmp2 = (this->subtimer + 1) & 3;
tmp3 = this->subAction;
tmp1 = tmp3 + tmp2;
this->frameIndex = tmp1;
+12 -12
View File
@@ -59,9 +59,9 @@ void ObjectBlockingStairs_Init(ObjectBlockingStairsEntity* this) {
default:
super->action = 1;
super->speed = 0x80;
super->field_0x16 = 1;
super->actionDelay = 0;
super->field_0xf = 0;
super->carryFlags = 1;
super->timer = 0;
super->subtimer = 0;
this->unk7a = 0x20;
this->unk7b = 0x80;
if (super->type == 0) {
@@ -114,7 +114,7 @@ void ObjectBlockingStairs_Action1(ObjectBlockingStairsEntity* this) {
super->action = 3;
super->direction = Direction8FromAnimationState(gPlayerEntity.animationState);
super->speed = 0x80;
super->actionDelay = 0x40;
super->timer = 0x40;
RequestPriorityDuration(super, 0x50);
EnqueueSFX(SFX_10F);
sub_08093248(this);
@@ -151,24 +151,24 @@ void ObjectBlockingStairs_Action1(ObjectBlockingStairsEntity* this) {
}
void ObjectBlockingStairs_Action2(ObjectBlockingStairsEntity* this) {
if (super->actionDelay) {
if (super->timer) {
sub_08093280(this);
} else {
if (gPlayerState.heldObject == 0x12) {
if ((gPlayerEntity.frame & 2) != 0 && ++super->field_0xf > 8) {
if ((gPlayerEntity.frame & 2) != 0 && ++super->subtimer > 8) {
gPlayerState.queued_action = 16;
gPlayerState.field_0x38 = 0x40;
gPlayerState.flags |= PL_BUSY;
gPlayerEntity.x.HALF.LO = 0;
gPlayerEntity.y.HALF.LO = 0;
super->direction = (gPlayerEntity.animationState ^ 4) << 2;
super->actionDelay = 0x40;
super->timer = 0x40;
EnqueueSFX(SFX_10F);
sub_08093248(this);
}
} else if (super->subAction == 6) {
super->action = 1;
super->field_0xf = 0;
super->subtimer = 0;
}
}
}
@@ -176,7 +176,7 @@ void ObjectBlockingStairs_Action2(ObjectBlockingStairsEntity* this) {
void ObjectBlockingStairs_Action3(ObjectBlockingStairsEntity* this) {
sub_0800445C(super);
LinearMoveUpdate(super);
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
sub_08093334(this);
}
sub_08093364(this);
@@ -255,7 +255,7 @@ void sub_08093248(ObjectBlockingStairsEntity* this) {
void sub_08093280(ObjectBlockingStairsEntity* this) {
sub_0800445C(super);
LinearMoveUpdate(super);
if (--super->actionDelay == 0) {
if (--super->timer == 0) {
sub_08093334(this);
}
sub_08093364(this);
@@ -328,7 +328,7 @@ void sub_08093364(ObjectBlockingStairsEntity* this) {
s32 sVar1;
Entity* dashEffectEnt;
if ((super->actionDelay & 3) == 0) {
if ((super->timer & 3) == 0) {
dashEffectEnt = CreateObject(SPECIAL_FX, FX_DASH, 0);
if (dashEffectEnt != NULL) {
dashEffectEnt->parent = super;
@@ -340,7 +340,7 @@ void sub_08093364(ObjectBlockingStairsEntity* this) {
}
sVar1 = dashEffectEnt->y.HALF.HI;
if (super->actionDelay & 8) {
if (super->timer & 8) {
dashEffectEnt->y.HALF.HI = sVar1 + 8;
} else {
dashEffectEnt->y.HALF.HI = sVar1 - 8;

Some files were not shown because too many files have changed in this diff Show More