Merge pull request #521 from EllipticEllipsis/decimal

This commit is contained in:
notyourav
2022-06-28 23:04:34 -07:00
committed by GitHub
218 changed files with 1230 additions and 1237 deletions
-1
View File
@@ -578,7 +578,6 @@ void LoadBgAnimations(u16* param_1) {
while (param_1[0] != 0xffff) {
animation->currentFrame = gUnk_080B7278[param_1[0]];
animation->timer = GetBgAnimationTimer(&animation->currentFrame->unk_4);
;
animation++;
param_1++;
}
+7 -6
View File
@@ -165,9 +165,10 @@ void AcroBandit_Type0Action0(Entity* this) {
void AcroBandit_Type0Action1(Entity* this) {
u32 rand;
s32 x, y;
s32 x;
s32 y;
if (this->timer) {
if (this->timer != 0) {
this->timer--;
} else {
if (sub_08049FDC(this, 1)) {
@@ -302,12 +303,12 @@ void AcroBandit_Type0Action6(Entity* this) {
}
void AcroBandit_Type0Action7(Entity* this) {
if ((this->timer & 0xf) == 0) {
if (this->timer == 0x50) {
if ((this->timer & 0xF) == 0) {
if (this->timer == 80) {
DeleteEntity(this);
} else {
this->action = 1;
this->timer = 0xb4;
this->timer = 180;
}
}
}
@@ -315,7 +316,7 @@ void AcroBandit_Type0Action7(Entity* this) {
void AcroBandit_Type0Action8(Entity* this) {
if (this->frame & ANIM_DONE) {
this->action = 1;
this->timer = 0xb4;
this->timer = 180;
this->spriteSettings.draw = 0;
} else {
GetNextFrame(this);
+3 -3
View File
@@ -199,7 +199,7 @@ void sub_08030338(ArmosEntity* this) {
return;
}
super->action = 6;
super->timer = 0x1a;
super->timer = 26;
super->speed = 0x300;
super->direction = 0x10;
return;
@@ -367,7 +367,7 @@ void sub_080306C4(ArmosEntity* this) {
if (sub_08049FDC(super, 1) && this->unk_7a != 0) {
super->timer = 0x18;
super->timer = 24;
uVar3 = sub_0800132C(super, gUnk_020000B0);
if (uVar3 != 0xff) {
var = 0;
@@ -390,7 +390,7 @@ void sub_080306C4(ArmosEntity* this) {
}
} else {
super->action = 4;
super->timer = 0x78;
super->timer = 120;
super->speed = 0xa0;
}
}
+4 -4
View File
@@ -133,7 +133,7 @@ void sub_0803E6E0(BallChainSoldierEntity* this) {
if ((s8)this->unk_7e <= 0) {
this->unk_7e = 0;
super->action = 6;
super->timer = 0x1e;
super->timer = 30;
InitAnimationForceUpdate(super, super->animationState + 0x20);
}
}
@@ -162,7 +162,7 @@ void sub_0803E75C(BallChainSoldierEntity* this) {
this->unk_7e += 5;
} else {
super->action = 8;
super->timer = 0x1e;
super->timer = 30;
InitScreenShake(8, 0);
}
}
@@ -178,7 +178,7 @@ void sub_0803E7CC(BallChainSoldierEntity* this) {
this->unk_7e -= 2;
if (this->unk_7e <= 0xa) {
super->action = 0xa;
super->timer = 0x5a;
super->timer = 90;
super->direction = DirectionFromAnimationState(super->animationState);
this->unk_7c = 0;
this->unk_7f = 0xfe;
@@ -189,7 +189,7 @@ void sub_0803E7CC(BallChainSoldierEntity* this) {
}
void sub_0803E818(BallChainSoldierEntity* this) {
if (super->timer) {
if (super->timer != 0) {
if (--super->timer == 0) {
COLLISION_ON(super->child);
sub_0803E94C(this, 0);
+6 -5
View File
@@ -34,7 +34,7 @@ void Beetle_OnCollision(Entity* this) {
Beetle_OnTick(this);
} else {
this->action = 5;
this->timer = 0xb4;
this->timer = 180;
this->subtimer = 0;
COLLISION_OFF(this);
this->spritePriority.b0 = 3;
@@ -166,7 +166,7 @@ void sub_08021A64(Entity* this) {
if (!sub_08021D00(this)) {
if (--this->timer == 0) {
this->action = 2;
this->timer = (Random() & 0x1f) + 0x1e;
this->timer = (Random() & 0x1F) + 30;
InitializeAnimation(this, 0);
}
@@ -190,14 +190,14 @@ void sub_08021A64(Entity* this) {
void sub_08021AD8(Entity* this) {
GetNextFrame(this);
if (this->frame & 1) {
if (this->timer) {
if (this->timer != 0) {
u32 tmp;
this->timer = 0;
tmp = sub_08049F84(this, 1);
if (tmp == 0xff) {
this->action = 2;
this->timer = '\b';
this->timer = 8;
InitializeAnimation(this, 0);
return;
}
@@ -223,7 +223,8 @@ void sub_08021B64(Entity* this) {
this->z.WORD = 0;
InitializeAnimation(this, 2);
} else {
int iVar4 = 1;
s32 iVar4 = 1;
if (gPlayerState.framestate != PL_STATE_JUMP && gPlayerState.framestate != PL_STATE_CAPE) {
if (sub_0807953C())
iVar4 = this->type * 3 + 8;
+2 -2
View File
@@ -145,7 +145,7 @@ void Bobomb_OnDeath(Entity* this) {
void sub_0802C8D8(Entity* this) {
this->action = 1;
this->timer = 0x3c;
this->timer = 60;
this->subtimer = 0;
this->direction = (Random() & 0x18) | 4;
this->carryFlags = 0;
@@ -271,7 +271,7 @@ void sub_0802CB68(Entity* this) {
this->speed = 0x200;
InitializeAnimation(this, (this->direction >> 4) | 2);
} else {
this->timer = 0x3c;
this->timer = 60;
this->speed = 0x80;
InitializeAnimation(this, this->direction >> 4);
}
+17 -17
View File
@@ -126,11 +126,11 @@ void sub_0802A9A8(Entity* this) {
if (this->subtimer) {
this->subtimer--;
} else {
if (this->timer) {
if (this->timer != 0) {
if (--this->timer == 0) {
this->action = 2;
this->subAction = 0;
this->timer = 0x40;
this->timer = 64;
sub_0802ACDC(this, 8);
}
} else {
@@ -147,7 +147,7 @@ void sub_0802A9A8(Entity* this) {
this->direction = 0x18;
}
this->y.HALF.HI = gRoomControls.scroll_y + 0x40;
this->timer = 0x80;
this->timer = 128;
sub_0802ADDC(this);
}
sub_0802AC40(this);
@@ -160,7 +160,7 @@ void sub_0802AA40(Entity* this) {
sub_0802ACDC(this, 8);
this->field_0x7a.HALF.HI++;
}
if (this->timer) {
if (this->timer != 0) {
this->timer--;
} else {
Entity* ent = this->child;
@@ -178,7 +178,7 @@ void sub_0802AA40(Entity* this) {
this->speed = 0x180;
this->field_0x7a.HALF.HI = 0;
ent->field_0x80.HALF.LO = 1;
ent->timer = 0x96;
ent->timer = 150;
}
}
}
@@ -215,7 +215,7 @@ void sub_0802AAC0(Entity* this) {
#endif
} else {
this->action = 4;
this->timer = 0xc0;
this->timer = 192;
this->subtimer = 4;
this->field_0x80.HALF.LO ^= 1;
#ifndef EU
@@ -236,8 +236,8 @@ void sub_0802AB40(Entity* this) {
this->speed = 0;
InitializeAnimation(this, this->type + 1);
} else {
this->timer = 0xc0;
this->subtimer = 0x4;
this->timer = 192;
this->subtimer = 4;
this->field_0x80.HALF.LO ^= 1;
}
} else if (--this->subtimer == 0) {
@@ -289,7 +289,7 @@ void sub_0802AC08(Entity* this) {
if (this->frame & ANIM_DONE) {
this->action = 2;
this->subAction = 0;
this->timer = 0x40;
this->timer = 64;
this->speed = 0xc0;
sub_0802ACDC(this, 8);
sub_0802ADDC(this);
@@ -373,7 +373,7 @@ void sub_0802AD54(Entity* this) {
if (this->field_0x80.HALF.HI) {
if (this->child == NULL || this->child->next == NULL) {
this->action = 4;
this->timer = 0xc0;
this->timer = 192;
this->subtimer = 4;
this->field_0x80.HALF.LO ^= 1;
}
@@ -399,7 +399,7 @@ void sub_0802ADDC(Entity* this) {
void sub_0802AE24(Entity* this) {
this->action = 1;
this->timer = 0xf0;
this->timer = 240;
this->zVelocity = Q_16_16(0.5);
this->hitbox = (Hitbox*)&gUnk_080CD174;
this->collisionFlags = 3;
@@ -564,9 +564,9 @@ void sub_0802B048(Entity* this) {
action = this->action;
if (action != 4 && this->field_0x80.HALF.LO) {
if (this->timer) {
if (this->timer != 0) {
if (--this->timer == 0) {
this->subtimer = 0x50;
this->subtimer = 80;
this->field_0x82.HWORD = 0;
this->spriteRendering.b0 = 3;
SetAffineInfo(this, 0x100, 0x100, 0);
@@ -580,7 +580,7 @@ void sub_0802B048(Entity* this) {
sub_0805EC60(this);
this->action = 4;
this->hitbox = (Hitbox*)&gUnk_080CD17C;
this->timer = 0xf;
this->timer = 15;
this->spriteSettings.draw = 0;
COLLISION_ON(this);
this->field_0x7a.HALF.HI = 0;
@@ -605,7 +605,7 @@ void sub_0802B048(Entity* this) {
void sub_0802B1A0(Entity* this) {
this->action = 1;
this->timer = 0;
this->subtimer = 0x4f;
this->subtimer = 79;
this->field_0x80.HALF.HI = 1;
InitializeAnimation(this, 0);
}
@@ -614,7 +614,7 @@ void sub_0802B1A0(Entity* this) {
void sub_0802B1BC(Entity* this) {
Entity* ent;
if (this->timer) {
if (this->timer != 0) {
this->timer--;
}
@@ -643,7 +643,7 @@ void sub_0802B1BC(Entity* this) {
void sub_0802B1BC(Entity* this) {
Entity* ent;
if (this->timer) {
if (this->timer != 0) {
this->timer--;
}
+19 -19
View File
@@ -32,7 +32,7 @@ void sub_0803C6DC(BowMoblinEntity*);
void sub_0803C714(BowMoblinEntity*);
void sub_0803C634(BowMoblinEntity*);
u32 sub_0803C6F8(BowMoblinEntity*);
u32 sub_0803C568(BowMoblinEntity*);
bool32 sub_0803C568(BowMoblinEntity*);
void sub_0803C664(BowMoblinEntity*);
void (*const BowMoblin_Functions[])(Entity*);
@@ -82,9 +82,9 @@ void sub_0803C1E0(BowMoblinEntity* this) {
this->unk_0x7a = 0;
this->unk_0x82 = 1;
if (super->timer) {
if (super->timer != 0) {
super->animationState = super->type2 << 1;
super->timer = 0x1e;
super->timer = 30;
super->speed = 0x80;
super->direction = super->type2 << 3;
sub_0803C690(this);
@@ -111,7 +111,7 @@ void sub_0803C234(BowMoblinEntity* this) {
sub_0803C4B0(this);
}
} else if (sub_0803C6F8(this)) {
} else if (sub_0803C6F8(this) != 0) {
sub_0800417E(super, super->collisions);
super->animationState = ((super->direction + 4) & 0x18) >> 2;
this->unk_0x83++;
@@ -124,7 +124,6 @@ void sub_0803C234(BowMoblinEntity* this) {
}
void sub_0803C2DC(BowMoblinEntity* this) {
u32 res;
u32 timer = --super->timer;
if (timer == 0) {
super->action = 3;
@@ -132,11 +131,11 @@ void sub_0803C2DC(BowMoblinEntity* this) {
this->unk_0x80 = timer;
super->animationState = 0x10;
sub_0803C4B0(this);
} else if (res = sub_0803C568(this), res) {
} else if (sub_0803C568(this)) {
this->unk_0x7b |= 0x1;
}
if (super->subtimer > 0xb) {
if (super->subtimer > 11) {
if (this->unk_0x7b != 0) {
sub_0803C5F0(this);
}
@@ -166,7 +165,7 @@ void sub_0803C344(BowMoblinEntity* this) {
super->action = 2;
super->speed = 0;
tmp = Random() & 0x7;
super->timer = (tmp << 1) + tmp + 0x40;
super->timer = 3 * tmp + 64;
break;
}
case 4: {
@@ -180,7 +179,7 @@ void sub_0803C344(BowMoblinEntity* this) {
this->unk_0x82 = 1;
super->speed = 0x80;
tmp = (Random() & 0x7);
super->timer = (tmp << 1) + tmp + 0x22;
super->timer = 3 * tmp + 34;
break;
}
}
@@ -213,6 +212,7 @@ void sub_0803C400(BowMoblinEntity* this) {
}
} else {
Entity* projectile;
switch (++super->timer) {
case 1:
super->direction = super->animationState << 2;
@@ -225,7 +225,7 @@ void sub_0803C400(BowMoblinEntity* this) {
break;
case 24:
super->timer = 0;
super->subtimer = 0x20;
super->subtimer = 32;
break;
}
@@ -252,13 +252,13 @@ void sub_0803C4B0(BowMoblinEntity* this) {
dir += gUnk_080CFFAC[Random() & 0xf];
} else {
dir += gUnk_080CFFAC[Random() & 0x7];
super->timer += 0x10;
super->timer += 16;
this->unk_0x83--;
}
dir = (super->direction = (dir + 4) & 0x18) >> 2;
}
} else {
super->timer = 0xc;
super->timer = 12;
super->speed = super->subtimer;
dir = super->direction >> 2;
}
@@ -268,13 +268,13 @@ void sub_0803C4B0(BowMoblinEntity* this) {
}
}
u32 sub_0803C568(BowMoblinEntity* this) {
bool32 sub_0803C568(BowMoblinEntity* this) {
if (this->unk_0x81 == 0) {
Entity* ent = sub_08049DF4(1);
if (ent != NULL) {
if (this->unk_0x82 == 2) {
if (sub_0806FC80(super, ent, 0x30)) {
return 1;
return TRUE;
}
}
@@ -282,13 +282,13 @@ u32 sub_0803C568(BowMoblinEntity* this) {
u32 direction = (GetFacingDirection(super, ent) + 4) & 0x18;
direction = direction >> 2;
if (direction == super->animationState) {
return 1;
return TRUE;
}
}
}
}
return 0;
return FALSE;
}
void sub_0803C5C4(BowMoblinEntity* this) {
@@ -319,13 +319,13 @@ void sub_0803C634(BowMoblinEntity* this) {
super->direction = super->animationState << 2;
this->unk_0x83 = 0;
sub_0803C664(this);
super->timer <<= 1;
super->timer *= 2;
this->unk_0x82 = 4;
}
void sub_0803C664(BowMoblinEntity* this) {
super->action = 3;
super->timer = 0x20;
super->timer = 32;
super->subtimer = 0;
this->unk_0x80 = 0;
this->unk_0x7b = 0;
@@ -402,7 +402,7 @@ void (*const gUnk_080CFF90[])(BowMoblinEntity*) = {
};
const s8 gUnk_080CFFA4[8] = {
0x18, 0x20, 0x30, 0x40, 0x60, 0x6c, 0x78, 0x91,
24, 32, 48, 64, 96, 108, 120, 145,
};
const s8 gUnk_080CFFAC[16] = {
+22 -21
View File
@@ -58,7 +58,7 @@ void BusinessScrub_OnCollision(Entity* this) {
if (this->hitType == 1 && (this->contactFlags & 0x7f) == 0x42) {
this->action = 3;
this->subAction = 0;
this->timer = 0x28;
this->timer = 40;
COLLISION_OFF(this);
sub_080290E0(this, 4);
pEVar1 = CreateFx(this, FX_BUSH, 0);
@@ -82,7 +82,7 @@ void sub_08028994(Entity* this) {
sub_08028E9C(this);
if ((*(u8*)this->field_0x7c.WORD & 1) || CheckFlags(this->field_0x86.HWORD)) {
this->action = 4;
this->timer = 0x78;
this->timer = 120;
this->spritePriority.b1 = 1;
sub_0802925C(this);
sub_080290E0(this, 0);
@@ -96,7 +96,7 @@ void sub_08028994(Entity* this) {
}
void sub_08028A48(Entity* this) {
if (this->timer) {
if (this->timer != 0) {
this->timer--;
} else if (sub_08028F98(this, 0)) {
sub_08029078(this);
@@ -114,8 +114,8 @@ void sub_08028A74(Entity* this) {
unk = 1;
if (this->frame & ANIM_DONE) {
this->subAction = 1;
this->timer = 0x3c;
this->subtimer = 0x10;
this->timer = 60;
this->subtimer = 16;
sub_08028FDC(this);
sub_080290E0(this, 1);
}
@@ -124,7 +124,7 @@ void sub_08028A74(Entity* this) {
unk = 1;
if (--this->timer == 0) {
this->subAction = 2;
this->timer = 0x20;
this->timer = 32;
this->subtimer = 0;
sub_08028FDC(this);
sub_080290E0(this, 2);
@@ -132,7 +132,7 @@ void sub_08028A74(Entity* this) {
if (sub_08028FDC(this)) {
sub_080290E0(this, 1);
}
this->subtimer = 0x10;
this->subtimer = 16;
}
break;
case 2:
@@ -152,7 +152,7 @@ void sub_08028A74(Entity* this) {
unk = 2;
if (this->frame & ANIM_DONE) {
this->subAction = 4;
this->timer = 0x50;
this->timer = 80;
sub_080290E0(this, 1);
}
break;
@@ -161,13 +161,13 @@ void sub_08028A74(Entity* this) {
if (--this->timer == 0) {
if (sub_08028F98(this, 0)) {
this->subAction = 1;
this->timer = 0x3c;
this->subtimer = 0x10;
this->timer = 60;
this->subtimer = 16;
sub_08028FDC(this);
} else {
sub_08028FFC(this);
this->subAction = 0;
this->timer = 0x50;
this->timer = 80;
this->subtimer = 0;
}
return;
@@ -178,7 +178,7 @@ void sub_08028A74(Entity* this) {
if (!sub_08028F98(this, unk)) {
sub_08028FFC(this);
this->subAction = 0;
this->timer = 0x50;
this->timer = 80;
this->subtimer = 0;
}
}
@@ -203,7 +203,7 @@ void sub_08028BC4(Entity* this) {
if (this->frame & ANIM_DONE) {
this->action = 4;
this->subAction = 0;
this->timer = 0x1e;
this->timer = 30;
this->subtimer = 5;
sub_080290E0(this, 0);
iVar1 = Create0x68FX(this, FX_STARS);
@@ -227,7 +227,7 @@ void sub_08028F0C(Entity*);
void sub_08028C84(Entity* this) {
if (--this->timer == 0) {
this->timer = 0x30;
this->timer = 48;
if (this->subtimer) {
if (--this->subtimer == 0) {
sub_0804AA1C(this);
@@ -292,7 +292,7 @@ void sub_08028CE8(Entity* this) {
sub_0800445C(this);
this->action = 4;
this->timer = 0x30;
this->timer = 48;
sub_080290E0(this, 0);
}
@@ -370,7 +370,7 @@ void sub_08028F0C(Entity* this) {
this->direction = (GetAnimationState(this) << 3);
sub_080290E0(this, 3);
this->field_0x80.HALF.LO = 1;
this->timer = 0x20;
this->timer = 32;
this->subtimer = 0;
if (sub_08029198(offer)) {
dialog = offer->field_0x6;
@@ -452,12 +452,13 @@ void sub_080290E0(Entity* this, u32 param_2) {
void sub_080290FC(Entity* this) {
if (this->timer != 0) {
if (--this->timer < 0x10 && (this->timer & 1) == 0) {
s32 sVar3 = (this->direction & 0x10) ? -1 : 1;
if ((this->direction & 8)) {
this->x.HALF.HI += (this->timer & 8) ? -sVar3 : sVar3;
this->timer--;
if ((this->timer < 16) && ((this->timer & 1) == 0)) {
s32 sVar3 = ((this->direction & 0x10) != 0) ? -1 : 1;
if ((this->direction & 8) != 0) {
this->x.HALF.HI += ((this->timer & 8) != 0) ? -sVar3 : sVar3;
} else {
this->y.HALF.HI += (this->timer & 8) ? sVar3 : -sVar3;
this->y.HALF.HI += ((this->timer & 8) != 0) ? sVar3 : -sVar3;
}
}
}
+13 -13
View File
@@ -44,7 +44,7 @@ void BusinessScrubPrologue_OnCollision(BusinessScrubPrologueEntity* this) {
if ((super->contactFlags & 0x7f) == 0x42) {
super->action = 4;
super->subAction = 0;
super->timer = 0x28;
super->timer = 40;
super->flags &= ~ENT_COLLIDE;
sub_08046030(this, 4);
ent = CreateFx(super, FX_BUSH, 0);
@@ -69,7 +69,7 @@ void sub_08045C3C(BusinessScrubPrologueEntity* this) {
super->animationState = 0;
super->direction = 0x10;
super->action = 5;
super->timer = 0x78;
super->timer = 120;
super->spritePriority.b1 = 1;
super->spriteSettings.draw = 1;
sub_08046030(this, 0);
@@ -80,7 +80,7 @@ void sub_08045C3C(BusinessScrubPrologueEntity* this) {
void sub_08045CA4(BusinessScrubPrologueEntity* this) {
super->spriteSettings.draw = 0;
if (super->timer) {
if (super->timer != 0) {
super->timer--;
} else if (sub_08045F54(this, 0)) {
sub_08045FF0(this);
@@ -102,8 +102,8 @@ void sub_08045CE0(BusinessScrubPrologueEntity* this) {
r6 = 1;
if (super->frame & ANIM_DONE) {
super->subAction = 1;
super->timer = 0x3c;
super->subtimer = 0x10;
super->timer = 60;
super->subtimer = 16;
sub_08045F98(this);
sub_08046030(this, 1);
}
@@ -112,7 +112,7 @@ void sub_08045CE0(BusinessScrubPrologueEntity* this) {
r6 = 1;
if (--super->timer == 0) {
super->subAction = 2;
super->timer = 0x20;
super->timer = 32;
super->subtimer = 0;
sub_08045F98(this);
sub_08046030(this, 2);
@@ -135,7 +135,7 @@ void sub_08045CE0(BusinessScrubPrologueEntity* this) {
r6 = 2;
if (super->frame & ANIM_DONE) {
super->subAction = 4;
super->timer = 0x50;
super->timer = 80;
sub_08046030(this, 1);
}
break;
@@ -144,12 +144,12 @@ void sub_08045CE0(BusinessScrubPrologueEntity* this) {
if (--super->timer == 0) {
if (sub_08045F54(this, 0)) {
super->subAction = 1;
super->timer = 0x3c;
super->subtimer = 0x10;
super->timer = 60;
super->subtimer = 16;
sub_08045F98(this);
} else {
sub_08045FA0(this);
super->timer = 0x50;
super->timer = 80;
super->subtimer = 0;
}
}
@@ -210,7 +210,7 @@ void sub_08045ED4(BusinessScrubPrologueEntity* this) {
void sub_08045EDC(BusinessScrubPrologueEntity* this) {
if (super->subAction == 0) {
super->subAction++;
super->timer = 0x20;
super->timer = 32;
super->subtimer = 0;
sub_08045F98(this);
sub_08046030(this, 2);
@@ -283,8 +283,8 @@ void sub_08046030(BusinessScrubPrologueEntity* this, u32 arg2) {
}
void sub_0804604C(BusinessScrubPrologueEntity* this) {
if (super->timer) {
if (--super->timer <= 0xf) {
if (super->timer != 0) {
if (--super->timer <= 15) {
super->spriteOffsetY = gUnk_080D1A3E[super->timer];
}
}
+1 -1
View File
@@ -30,7 +30,7 @@ void sub_0802B530(Entity* this) {
}
void sub_0802B540(Entity* this) {
if (this->timer) {
if (this->timer != 0) {
this->timer--;
} else {
u32 direction = sub_0804A024(this, 1, 0xc);
+4 -4
View File
@@ -174,7 +174,7 @@ void sub_0801F0C8(Entity* this) {
GetNextFrame(this);
if (this->frame & ANIM_DONE) {
this->action = 3;
this->timer = (Random() & 3) + 0xc;
this->timer = (Random() & 3) + 12;
this->subtimer = Random();
this->direction = sub_08049F84(this, 1);
COLLISION_ON(this);
@@ -198,7 +198,7 @@ void sub_0801F12C(Entity* this) {
this->action = 4;
Chuchu_JumpAtPlayer(this);
} else if (PlayerInRange(this, 1, 0x48)) {
this->timer = (Random() & 3) + 0xc;
this->timer = (Random() & 3) + 12;
} else {
sub_0801F328(this);
}
@@ -253,7 +253,7 @@ void sub_0801F270(Entity* this) {
if (sub_0801FBD0(this))
return;
if (--this->timer)
if (--this->timer != 0)
return;
if (this->field_0x80.HALF.HI == 0) {
@@ -298,7 +298,7 @@ void sub_0801F340(Entity* this) {
void sub_0801F360(Entity* this) {
this->action = 7;
this->timer = (Random() & 0x38) + 0xb4;
this->timer = (Random() & 0x38) + 180;
this->subtimer = Random();
this->direction = sub_08049F84(this, 1);
this->spritePriority.b1 = 2;
+7 -7
View File
@@ -90,7 +90,7 @@ void CloudPiranha_Init(CloudPiranhaEntity* this) {
super->animationState = super->direction >> 2;
super->flags |= ENT_COLLIDE;
super->timer = 0;
super->subtimer = 0x20;
super->subtimer = 32;
this->unk_82 = 0;
this->unk_80 = Random() & 1;
this->unk_81 = 0;
@@ -103,7 +103,7 @@ void CloudPiranha_Action1(CloudPiranhaEntity* this) {
sub_080387F0(this);
if (--super->subtimer == 0) {
super->timer = 0;
super->subtimer = 0x20;
super->subtimer = 32;
if (sub_08049FA0(super)) {
u32 tmp = super->animationState;
if (this->unk_80 != 0) {
@@ -120,7 +120,7 @@ void CloudPiranha_Action1(CloudPiranhaEntity* this) {
InitializeAnimation(super, (u32)super->animationState);
} else if ((super->timer == 0) && sub_0803872C(this, 0x80)) {
super->action = 2;
super->subtimer = 0x10;
super->subtimer = 16;
super->speed = 0x40;
super->animationState = sub_0806FCAC(super, super->child);
super->direction = super->animationState << 2;
@@ -133,14 +133,14 @@ void sub_080385CC(CloudPiranhaEntity* this) {
sub_080387F0(this);
if (sub_0803872C(this, 0x60)) {
super->action = 3;
super->subtimer = 0xc;
super->subtimer = 12;
super->speed = 0x80;
super->animationState = sub_0806FCAC(super, super->child);
super->direction = super->animationState << 2;
InitializeAnimation(super, super->animationState);
} else {
if (--super->subtimer == 0) {
super->subtimer = 0x10;
super->subtimer = 16;
if (super->child != NULL) {
super->animationState = sub_0806FCAC(super, super->child);
} else {
@@ -160,7 +160,7 @@ void CloudPiranha_Action3(CloudPiranhaEntity* this) {
sub_08038754(this);
} else {
if (--super->subtimer == 0) {
super->subtimer = 0xa;
super->subtimer = 10;
if (this->unk_81 == 0) {
tmp = super->speed += 0x40;
if (0x2000000 < (tmp * 0x10000)) {
@@ -182,7 +182,7 @@ void CloudPiranha_Action4(CloudPiranhaEntity* this) {
super->action = 1;
super->hitType = 0x72;
super->timer = 1;
super->subtimer = 0x80;
super->subtimer = 128;
super->speed = 0x80;
super->spritePriority.b1 = 2;
EnqueueSFX(SFX_124);
+5 -5
View File
@@ -42,7 +42,7 @@ void Crow_OnCollision(CrowEntity* this) {
if (super->contactFlags & 0x80) {
if ((super->contactFlags & 0x3f) == 0) {
COLLISION_OFF(super);
super->subtimer = 0x10;
super->subtimer = 16;
if (DirectionIsHorizontal(DirectionRoundUp(super->direction)) == 0) {
if (DirectionIsVertical(super->direction)) {
super->direction += 2;
@@ -125,7 +125,7 @@ void sub_0803298C(CrowEntity* this) {
super->action = 2;
this->unk_84 = 0;
super->timer = 0x10;
super->timer = 16;
this->unk_81 = 2;
sub_08032AF4(this);
}
@@ -168,7 +168,7 @@ void sub_08032A48(CrowEntity* this) {
void sub_08032AB0(CrowEntity* this) {
u32 dir;
if (--super->timer)
if (--super->timer != 0)
return;
this->unk_80 = super->direction;
@@ -200,13 +200,13 @@ void sub_08032B38(CrowEntity* this) {
u32 temp;
switch (this->unk_84) {
case 0:
if (super->timer & 1) {
if ((super->timer & 1) != 0) {
super->z.HALF.HI--;
}
if (--super->timer == 0) {
this->unk_84 = 1;
super->timer = 0x18;
super->timer = 24;
COLLISION_ON(super);
this->unk_81 = 2;
sub_08032AF4(this);
+2 -2
View File
@@ -103,7 +103,7 @@ void sub_08038DC0(CuccoAggrEntity* this) {
void sub_08038DD8(CuccoAggrEntity* this) {
super->subAction = 1;
super->timer = 0x10;
super->timer = 16;
super->subtimer = gUnk_080CF7BC[super->type];
COLLISION_OFF(super);
super->spritePriority.b1 = 0;
@@ -126,7 +126,7 @@ void sub_08038E18(CuccoAggrEntity* this) {
}
if (--super->timer == 0) {
super->timer = 0x10;
super->timer = 16;
super->spriteSettings.flipX ^= (Random() & 1);
CuccoAggr_CreateFx(this);
}
+4 -4
View File
@@ -60,11 +60,11 @@ void sub_0802209C(Entity* this) {
if (this->timer == 0) {
if (CheckPlayerProximity(this->field_0x78.HWORD, this->field_0x7a.HWORD, 0x10, 0x10)) {
this->action = 2;
this->timer = 0x12;
this->timer = 18;
InitializeAnimation(this, this->type2 + 4);
}
} else {
this->timer = this->timer - 1;
this->timer--;
}
}
@@ -80,7 +80,7 @@ void sub_080220F0(Entity* this) {
u32 i;
this->action = 4;
this->timer = 0x78;
this->timer = 120;
this->damage = 0;
off = gUnk_080CB76C[this->type2];
for (i = 0; i < 6; i++, off++) {
@@ -109,7 +109,7 @@ void sub_08022198(Entity* this) {
GetNextFrame(this);
if (this->frame & ANIM_DONE) {
this->action = 1;
this->timer = 0x5a;
this->timer = 90;
}
}
+3 -3
View File
@@ -184,7 +184,7 @@ void Enemy4D_Action5(Enemy4DEntity* this) {
if ((tmp * 0x1000000) < 1) {
this->unk_7e = 0;
super->action = 6;
super->timer = 0x0f;
super->timer = 15;
InitAnimationForceUpdate(super, super->animationState + 0x20);
}
}
@@ -218,7 +218,7 @@ void Enemy4D_Action7(Enemy4DEntity* this) {
this->unk_7e += 5;
} else {
super->action = 8;
super->timer = 0x1e;
super->timer = 30;
InitScreenShake(8, 0);
}
}
@@ -235,7 +235,7 @@ void Enemy4D_Action9(Enemy4DEntity* this) {
tmp = this->unk_7e = this->unk_7e - 2;
if (tmp < 0xb) {
super->action = 0xa;
super->timer = 0x3c;
super->timer = 60;
super->direction = super->animationState << 3;
this->unk_7c = 0;
this->unk_7f = 0xfe;
+3 -3
View File
@@ -111,7 +111,7 @@ void sub_08040B9C(Enemy50Entity* this) {
super->flags |= 0x80;
super->health = 0xff;
super->action = 0xa;
super->timer = 0x3c;
super->timer = 60;
}
this->unk_7a = super->health;
}
@@ -210,7 +210,7 @@ void Enemy50_Init(Enemy50Entity* this) {
void Enemy50_Action1(Enemy50Entity* this) {
if (sub_080411E8(this)) {
super->action = 2;
super->timer = 0x0f;
super->timer = 15;
}
}
@@ -276,7 +276,7 @@ void Enemy50_Action6(Enemy50Entity* this) {
ProcessMovement1(super);
} else {
super->action = 7;
super->timer = 0x1e;
super->timer = 30;
}
}
}
+16 -16
View File
@@ -85,7 +85,7 @@ void Enemy64_Init(Enemy64Entity* this) {
super->child = tail;
super->action = 1;
super->subAction = 0;
super->timer = 0x3c;
super->timer = 60;
super->direction = 0xc0;
super->animationState = 0xc0;
super->speed = 0x300;
@@ -193,7 +193,7 @@ void Enemy64_Action2_SubAction2(Enemy64Entity* this) {
gRoomControls.origin_y + 0x80),
((((uVar3 + 2) & 0x1c) - (super->direction >> 3)) & 0xf) == 8)) {
super->subAction = 4;
super->timer = 0x3c;
super->timer = 60;
super->subtimer = 7;
}
sub_08049944(this);
@@ -210,7 +210,7 @@ void Enemy64_Action2_SubAction3(Enemy64Entity* this) {
if (super->timer == 0) {
if ((uVar2 >> 0x18 & 0x1f) == 0) {
super->subAction = 4;
super->timer = 0x5a;
super->timer = 90;
}
} else {
if (sub_08049A8C(this)) {
@@ -234,9 +234,9 @@ void Enemy64_Action2_SubAction4(Enemy64Entity* this) {
super->speed += 0x40;
} else {
super->subAction = 3;
super->timer = 0xa;
super->timer = 10;
}
} else if (super->timer == 0x50) {
} else if (super->timer == 80) {
Entity* enemy = CreateEnemy(GYORG_MALE_EYE, Random() & 3);
if (enemy != NULL) {
enemy->parent = super;
@@ -277,7 +277,7 @@ void Enemy64_Action3_SubAction0(Enemy64Entity* this) {
void Enemy64_Action3_SubAction1(Enemy64Entity* this) {
if (EntityWithinDistance(super, gRoomControls.origin_x + 0xa8, gRoomControls.origin_y + 0x80, 0x28)) {
super->subAction = 2;
super->timer = 0x2d;
super->timer = 45;
this->unk_74 = gUnk_080D29B8[Random() & 7] << 0x18 >> 0x18;
this->unk_76 = super->direction << 8;
}
@@ -290,7 +290,7 @@ void Enemy64_Action3_SubAction2(Enemy64Entity* this) {
sub_08049998(this, ((0x100 - super->direction) & 0xff) << 8);
if (--super->timer == 0) {
super->subAction = 3;
super->timer = 0x1e;
super->timer = 30;
}
}
@@ -312,7 +312,7 @@ void Enemy64_Action4_SubAction0(Enemy64Entity* this) {
if (PlayerCanBeMoved() && gPlayerEntity.z.HALF.HI == 0) {
SetPlayerControl(CONTROL_2);
super->subAction = 2;
super->timer = 0x1e;
super->timer = 30;
} else {
super->subAction = 1;
}
@@ -331,7 +331,7 @@ void Enemy64_Action4_SubAction1(Enemy64Entity* this) {
void Enemy64_Action4_SubAction2(Enemy64Entity* this) {
if (--super->timer == 0) {
super->subAction = 3;
super->timer = 0xb4;
super->timer = 180;
super->speed = 0x100;
super->direction -= 0x40;
}
@@ -341,7 +341,7 @@ void Enemy64_Action4_SubAction2(Enemy64Entity* this) {
void Enemy64_Action4_SubAction3(Enemy64Entity* this) {
sub_08049AB0(this);
if (--super->timer == 0) {
super->timer = 0x1e;
super->timer = 30;
super->subAction = 4;
super->speed = 0x400;
super->direction = super->animationState;
@@ -389,7 +389,7 @@ void Enemy64_Action4_SubAction5(Enemy64Entity* this) {
void Enemy64_Action4_SubAction6(Enemy64Entity* this) {
if (gFadeControl.active == 0) {
super->subAction = 7;
super->timer = 0xa0;
super->timer = 160;
SoundReq(SFX_SECRET);
SetFlag(0x7c);
SetPlayerControl(CONTROL_1);
@@ -399,19 +399,19 @@ void Enemy64_Action4_SubAction6(Enemy64Entity* this) {
void Enemy64_Action4_SubAction7(Enemy64Entity* this) {
if (--super->timer == 0) {
DeleteThisEntity();
} else if (super->timer == 0x10) {
} else if (super->timer == 16) {
sub_0807B7D8(0x36, 0xca, 1);
SetTile(0x4081, 0xca, 2);
SoundReq(SFX_HEART_GET);
} else if (super->timer == 0x18) {
} else if (super->timer == 24) {
sub_0807B7D8(0x36, 0x8a, 1);
SetTile(0x4081, 0x8a, 2);
SoundReq(SFX_HEART_GET);
} else if (super->timer == 0x20) {
} else if (super->timer == 32) {
sub_0807B7D8(0x36, 0x4a, 1);
SetTile(0x4081, 0x4a, 2);
SoundReq(SFX_HEART_GET);
} else if (super->timer == 0x28) {
} else if (super->timer == 40) {
sub_0807B7D8(0x36, 10, 1);
SetTile(0x4081, 10, 2);
SoundReq(SFX_HEART_GET);
@@ -461,7 +461,7 @@ void sub_080499F0(Enemy64Entity* this) {
}
bool32 sub_08049A8C(Enemy64Entity* this) {
if (--super->timer == 0 && (Random() & 0xf) != 0) {
if ((--super->timer == 0) && ((Random() & 0xf) != 0)) {
return TRUE;
} else {
return FALSE;
+2 -2
View File
@@ -174,7 +174,7 @@ void Eyegore_Action2(EyegoreEntity* this) {
} else {
if (sub_08049FDC(super, 1)) {
super->action = 3;
super->timer = 0x3c;
super->timer = 60;
super->direction = (CalculateDirectionTo(super->x.HALF.HI + super->hitbox->offset_x,
super->y.HALF.HI + super->hitbox->offset_y,
gUnk_020000B0->x.HALF.HI, gUnk_020000B0->y.HALF.HI) +
@@ -469,7 +469,7 @@ void sub_08031250(EyegoreEntity* this) {
void sub_08031320(EyegoreEntity* this) {
super->action = 2;
super->flags &= ~ENT_COLLIDE;
super->timer = 0x1e;
super->timer = 30;
super->hitbox = (Hitbox*)&gUnk_080FD308;
InitializeAnimation(super, 10);
}
+1 -1
View File
@@ -121,7 +121,7 @@ void sub_08045524(Entity* this) {
this->timer = Random() & 3;
this->direction = DirectionRound(tmp);
} else {
if (this->timer) {
if (this->timer != 0) {
this->timer--;
return;
}
+1 -1
View File
@@ -136,7 +136,7 @@ void sub_08039DD8(FlyingSkullEntity* this) {
if (EntityWithinDistance(super, ent->x.HALF.HI, ent->y.HALF.HI, 0x30)) {
if (super->type == 1) {
super->action = 3;
super->timer = 0x1e;
super->timer = 30;
} else {
ent = CreateEnemy(STALFOS, super->type - 2);
if (ent != NULL) {
+25 -31
View File
@@ -172,18 +172,16 @@ void Ghini_Action1(GhiniEntity* this) {
void Ghini_Action2(GhiniEntity* this) {
if (sub_0803F5A8(this) == 0) {
sub_0803F50C(this);
} else {
if (--super->timer == 0) {
super->action = 3;
super->timer = 0x1e;
if (sub_08049DF4(1) != NULL) {
super->direction = GetFacingDirection(super, gUnk_020000B0);
} else {
super->direction = Random() & 0x1f;
}
super->animationState = super->direction >> 4;
InitializeAnimation(super, super->animationState + 1);
} else if (--super->timer == 0) {
super->action = 3;
super->timer = 30;
if (sub_08049DF4(1) != NULL) {
super->direction = GetFacingDirection(super, gUnk_020000B0);
} else {
super->direction = Random() & 0x1f;
}
super->animationState = super->direction >> 4;
InitializeAnimation(super, super->animationState + 1);
}
}
@@ -223,20 +221,18 @@ void Ghini_Action6(GhiniEntity* this) {
if (sub_0803F5A8(this) == 0) {
sub_0803F51C(this);
} else {
if (sub_08049DF4(1) != NULL) {
tmp = super->timer + 1;
super->timer = tmp;
if ((tmp & gUnk_080D0970[tmp * 0x1000000 >> 0x1e]) == 0) {
sub_08004596(super, GetFacingDirection(super, gUnk_020000B0));
}
sub_0803F66C(this);
ProcessMovement1(super);
GetNextFrame(super);
} else {
super->action = 7;
super->timer = 0x1e;
} else if (sub_08049DF4(1) != NULL) {
tmp = super->timer + 1;
super->timer = tmp;
if ((tmp & gUnk_080D0970[tmp * 0x1000000 >> 0x1e]) == 0) {
sub_08004596(super, GetFacingDirection(super, gUnk_020000B0));
}
sub_0803F66C(this);
ProcessMovement1(super);
GetNextFrame(super);
} else {
super->action = 7;
super->timer = 30;
}
}
@@ -331,13 +327,11 @@ bool32 sub_0803F5A8(GhiniEntity* this) {
bool32 sub_0803F5D4(GhiniEntity* this) {
if (this->unk_7c != 0) {
this->unk_7c--;
} else {
if ((sub_08049FDC(super, 1)) &&
((sub_0806FD54(super) ||
((0xf < (s16)gArea.lightLevel && (EntityInRectRadius(super, gUnk_020000B0, 0x70, 0x48))))))) {
sub_0803F630(this);
return TRUE;
}
} else if ((sub_08049FDC(super, 1)) &&
((sub_0806FD54(super) ||
((0xf < (s16)gArea.lightLevel && (EntityInRectRadius(super, gUnk_020000B0, 0x70, 0x48))))))) {
sub_0803F630(this);
return TRUE;
}
return FALSE;
}
+140 -144
View File
@@ -20,8 +20,7 @@ typedef struct {
u16 field_0x78;
u16 field_0x7a;
u8 field_0x7c;
u8 field_0x7d;
u8 filler2[2];
u8 filler2[3];
Entity* field_0x80;
Entity* field_0x84;
} GibdoEntity;
@@ -32,11 +31,11 @@ void sub_08037B10(GibdoEntity*);
void sub_0803797C(GibdoEntity*);
void sub_080379BC(GibdoEntity*);
void Gibdo_MoveObjectsToStalfos(GibdoEntity*, Entity*);
u32 sub_08037810(GibdoEntity*);
bool32 sub_08037810(GibdoEntity*);
void sub_080377B0(GibdoEntity*);
u32 sub_080378B0(GibdoEntity*);
u32 sub_08037914(GibdoEntity*);
u32 sub_080379EC(GibdoEntity*);
bool32 sub_080378B0(GibdoEntity*);
bool32 sub_08037914(GibdoEntity*);
bool32 sub_080379EC(GibdoEntity*);
void sub_08037A58(GibdoEntity*);
void sub_08037ACC(GibdoEntity*);
void Gibdo_CreateObjects(GibdoEntity*);
@@ -56,13 +55,12 @@ void Gibdo_OnTick(GibdoEntity* this) {
}
void Gibdo_OnCollision(GibdoEntity* this) {
u8 x;
if (super->contactFlags == 0x87) {
if (super->action == 0x6) {
sub_08037ACC(this);
}
super->action = 0x8;
super->timer = 0x3c;
super->timer = 60;
COLLISION_OFF(super);
Gibdo_CreateObjects(this);
} else {
@@ -71,12 +69,14 @@ void Gibdo_OnCollision(GibdoEntity* this) {
sub_08037A14(this);
} else {
if ((u8)(super->action - 1) < 2) {
u8 dir;
super->action = 1;
x = DirectionRoundUp(DirectionTurnAround(super->knockbackDirection));
super->direction = x;
super->animationState = x >> 3;
dir = DirectionRoundUp(DirectionTurnAround(super->knockbackDirection));
super->direction = dir;
super->animationState = dir >> 3;
InitAnimationForceUpdate(super, super->animationState);
if (sub_08037810(this) != 0) {
if (sub_08037810(this)) {
super->timer = 4;
}
}
@@ -103,24 +103,22 @@ void sub_08037558(GibdoEntity* this) {
}
void sub_08037580(GibdoEntity* this) {
if (sub_08037810(this) == 0) {
if (!(--this->field_0x74)) {
if (!sub_08037810(this)) {
if (--this->field_0x74 == 0) {
sub_080377B0(this);
}
}
}
void sub_080375A4(GibdoEntity* this) {
if (sub_080378B0(this) == 0) {
if (sub_08037810(this) == 0) {
if (!(--this->field_0x74)) {
sub_08037794(this);
} else {
UpdateAnimationSingleFrame(super);
if (ProcessMovement0(super) == 0) {
if (!(--super->subtimer)) {
sub_080379BC(this);
}
if (!sub_080378B0(this) && !sub_08037810(this)) {
if (--this->field_0x74 == 0) {
sub_08037794(this);
} else {
UpdateAnimationSingleFrame(super);
if (!ProcessMovement0(super)) {
if (--super->subtimer == 0) {
sub_080379BC(this);
}
}
}
@@ -128,32 +126,26 @@ void sub_080375A4(GibdoEntity* this) {
}
void sub_080375F8(GibdoEntity* this) {
if (sub_080378B0(this) == 0) {
if (!(--super->timer)) {
super->action = 4;
super->timer = 0x18;
InitAnimationForceUpdate(super, super->animationState + 4);
}
if (!sub_080378B0(this) && (--super->timer == 0)) {
super->action = 4;
super->timer = 24;
InitAnimationForceUpdate(super, super->animationState + 4);
}
}
void sub_08037624(GibdoEntity* this) {
if (sub_080378B0(this) == 0) {
if (sub_08037914(this) == 0) {
if (!(--this->field_0x74)) {
sub_08037794(this);
} else {
UpdateAnimationSingleFrame(super);
UpdateAnimationSingleFrame(super);
if (ProcessMovement0(super) == 0) {
if (!(--super->subtimer)) {
sub_080379BC(this);
}
} else {
if (!(--super->timer)) {
sub_0803797C(this);
}
if (!sub_080378B0(this) && !sub_08037914(this)) {
if (--this->field_0x74 == 0) {
sub_08037794(this);
} else {
UpdateAnimationSingleFrame(super);
UpdateAnimationSingleFrame(super);
if (!ProcessMovement0(super)) {
if (--super->subtimer == 0) {
sub_080379BC(this);
}
} else if (--super->timer == 0) {
sub_0803797C(this);
}
}
}
@@ -162,7 +154,7 @@ void sub_08037624(GibdoEntity* this) {
void sub_08037690(GibdoEntity* this) {
UpdateAnimationSingleFrame(super);
if ((super->frame & ANIM_DONE) != 0) {
this->field_0x77 = 0x14;
this->field_0x77 = 20;
sub_08037794(this);
} else {
if ((super->frame & 1) != 0) {
@@ -173,14 +165,13 @@ void sub_08037690(GibdoEntity* this) {
}
void sub_080376D0(GibdoEntity* this) {
u8* x;
if (sub_080379EC(this) == 0) {
if (!sub_080379EC(this)) {
ResetPlayerItem();
gPlayerState.mobility = gPlayerState.mobility | 0x80;
gPlayerState.field_0xa = gPlayerState.field_0xa | 0x80;
CopyPositionAndSpriteOffset(&gPlayerEntity, super);
UpdateAnimationSingleFrame(super);
if ((super->frame & 0x1) != 0) {
if ((super->frame & 1) != 0) {
if (--this->field_0x7c == 0) {
sub_08037A58(this);
} else {
@@ -200,12 +191,12 @@ void sub_0803773C(GibdoEntity* this) {
// Turn into Stalfos
void sub_0803775C(GibdoEntity* this) {
Entity* x;
if (!(--super->timer)) {
x = CreateEnemy(STALFOS, 0);
if (x != 0) {
sub_0804A4E4(super, x);
Gibdo_MoveObjectsToStalfos(this, x);
Entity* stalfos;
if (--super->timer == 0) {
stalfos = CreateEnemy(STALFOS, 0);
if (stalfos != NULL) {
sub_0804A4E4(super, stalfos);
Gibdo_MoveObjectsToStalfos(this, stalfos);
}
DeleteEntity(super);
}
@@ -213,99 +204,99 @@ void sub_0803775C(GibdoEntity* this) {
void sub_08037794(GibdoEntity* this) {
super->action = 1;
this->field_0x74 = 0x1e;
this->field_0x74 = 30;
super->hitType = 0x26;
InitAnimationForceUpdate(super, super->animationState);
}
void sub_080377B0(GibdoEntity* this) {
u32 r1;
u32 r2;
u32 rand1;
u32 rand2;
super->action = 2;
super->subtimer = 8;
r1 = Random();
this->field_0x74 = (r1 & 0x38) + 0x78;
rand1 = Random();
this->field_0x74 = (rand1 & 0x38) + 120;
super->speed = 0x40;
r2 = Random();
if (!sub_08049FA0(super) && (r2 & 3)) {
rand2 = Random();
if (!sub_08049FA0(super) && ((rand2 & 3) != 0)) {
super->direction = DirectionRoundUp(sub_08049EE4(super));
} else {
super->direction = DirectionRound(r2);
super->direction = DirectionRound(rand2);
}
super->animationState = super->direction / 8;
InitAnimationForceUpdate(super, super->animationState + 4);
}
u32 sub_08037810(GibdoEntity* this) {
u32 x;
u32 y;
bool32 sub_08037810(GibdoEntity* this) {
u32 dir;
if (this->field_0x76 == 0) {
if (sub_08049FDC(super, 1) != 0) {
if (EntityWithinDistance(super, gUnk_020000B0->x.HALF.HI, gUnk_020000B0->y.HALF.HI, 0x40) != 0) {
x = GetFacingDirection(super, gUnk_020000B0);
if (((x - super->direction + 6) & 0x1f) <= 0xc) {
super->action = 3;
super->timer = 0x18;
super->subtimer = 0x8;
super->speed = 0xc0;
super->direction = DirectionRoundUp(GetFacingDirection(super, gUnk_020000B0));
super->animationState = super->direction >> 3;
this->field_0x74 = 300;
this->field_0x78 = gUnk_020000B0->x.HALF.HI;
this->field_0x7a = gUnk_020000B0->y.HALF.HI;
InitAnimationForceUpdate(super, super->animationState);
return 1;
}
if (sub_08049FDC(super, 1) &&
EntityWithinDistance(super, gUnk_020000B0->x.HALF.HI, gUnk_020000B0->y.HALF.HI, 0x40)) {
dir = GetFacingDirection(super, gUnk_020000B0);
if (((dir - super->direction + 6) & 0x1f) <= 0xc) {
super->action = 3;
super->timer = 24;
super->subtimer = 8;
super->speed = 0xc0;
super->direction = DirectionRoundUp(GetFacingDirection(super, gUnk_020000B0));
super->animationState = super->direction >> 3;
this->field_0x74 = 300;
this->field_0x78 = gUnk_020000B0->x.HALF.HI;
this->field_0x7a = gUnk_020000B0->y.HALF.HI;
InitAnimationForceUpdate(super, super->animationState);
return TRUE;
}
}
} else {
this->field_0x76--;
}
return 0;
return FALSE;
}
u32 sub_080378B0(GibdoEntity* this) {
bool32 sub_080378B0(GibdoEntity* this) {
if (this->field_0x77 == 0) {
if (sub_08049DF4(1) != 0) {
if (sub_08049DF4(1) != NULL) {
if (sub_0804A044(super, gUnk_020000B0, 0xa) == super->direction)
if (EntityWithinDistance(super, gUnk_020000B0->x.HALF.HI, gUnk_020000B0->y.HALF.HI, 0x18) != 0) {
if (EntityWithinDistance(super, gUnk_020000B0->x.HALF.HI, gUnk_020000B0->y.HALF.HI, 0x18)) {
super->action = 5;
super->speed = 0x100;
InitAnimationForceUpdate(super, super->animationState + 8);
return 1;
return TRUE;
}
}
} else {
this->field_0x77--;
}
return 0;
return FALSE;
}
u32 sub_08037914(GibdoEntity* this) {
if (sub_08049FDC(super, 1) != 0) {
if (EntityWithinDistance(gUnk_020000B0, this->field_0x78, this->field_0x7a, 0x28) == 0) {
bool32 sub_08037914(GibdoEntity* this) {
if (sub_08049FDC(super, 1)) {
if (!EntityWithinDistance(gUnk_020000B0, this->field_0x78, this->field_0x7a, 0x28)) {
this->field_0x78 = gUnk_020000B0->x.HALF_U.HI;
this->field_0x7a = gUnk_020000B0->y.HALF_U.HI;
sub_0803797C(this);
return 0;
return FALSE;
}
if (EntityWithinDistance(super, this->field_0x78, this->field_0x7a, 0x8) == 0) {
return 0;
if (!EntityWithinDistance(super, this->field_0x78, this->field_0x7a, 0x8)) {
return FALSE;
}
this->field_0x76 = 0x3c;
this->field_0x76 = 60;
}
sub_08037794(this);
return 1;
return TRUE;
}
void sub_0803797C(GibdoEntity* this) {
u32 m;
super->timer = 0x18;
super->timer = 24;
super->subtimer = 8;
m = super->direction =
(CalculateDirectionTo(super->x.HALF.HI, super->y.HALF.HI, this->field_0x78, this->field_0x7a) + 4) & 0x18;
;
m = m / 8;
m >>= 3;
if (m != super->animationState) {
super->animationState = m;
InitAnimationForceUpdate(super, m + 4);
@@ -313,29 +304,30 @@ void sub_0803797C(GibdoEntity* this) {
}
void sub_080379BC(GibdoEntity* this) {
u32 r;
super->timer = 0x18;
super->subtimer = 0x8;
r = Random();
super->animationState = ((super->animationState + (r & 2)) - 1) & 3;
u32 rand;
super->timer = 24;
super->subtimer = 8;
rand = Random();
super->animationState = ((super->animationState + (rand & 2)) - 1) & 3;
super->direction = DirectionFromAnimationState(super->animationState);
InitAnimationForceUpdate(super, super->animationState + 4);
}
u32 sub_080379EC(GibdoEntity* this) {
bool32 sub_080379EC(GibdoEntity* this) {
if (sub_0807953C() != 0) {
if (!(--super->timer)) {
if (--super->timer == 0) {
sub_08037A58(this);
return 1;
return TRUE;
}
}
return 0;
return FALSE;
}
void sub_08037A14(GibdoEntity* this) {
super->action = 6;
super->timer = 0x18;
super->spritePriority.b0 = (super->spritePriority.b0 & (super->timer - 0x20));
super->timer = 24;
super->spritePriority.b0 &= super->timer - 32;
super->spritePriority.b0 |= 3;
super->flags2 &= 0xfe;
this->field_0x7c = 5;
@@ -357,14 +349,14 @@ void sub_08037A58(GibdoEntity* this) {
super->knockbackDirection = DirectionFromAnimationState(super->animationState) ^ 0x10;
super->knockbackDuration = 8;
super->knockbackSpeed = 0x180;
this->field_0x76 = 0x3c;
this->field_0x76 = 60;
InitAnimationForceUpdate(super, super->animationState + 0x10);
}
void sub_08037ACC(GibdoEntity* this) {
gPlayerState.flags &= ~PL_DISABLE_ITEMS;
COLLISION_ON(&gPlayerEntity);
gPlayerEntity.iframes = 0x1e;
gPlayerEntity.iframes = 30;
gPlayerEntity.knockbackDirection = DirectionFromAnimationState(super->animationState);
gPlayerEntity.knockbackDuration = 4;
gPlayerEntity.knockbackSpeed = 0x180;
@@ -372,63 +364,67 @@ void sub_08037ACC(GibdoEntity* this) {
// Damage player maybe?
void sub_08037B10(GibdoEntity* this) {
u32 h;
u32 health;
gPlayerEntity.iframes = 0xc;
h = ModHealth(-8);
health = ModHealth(-8);
SoundReqClipped(&gPlayerEntity, SFX_PLY_VO6);
if (h == 0) {
if (health == 0) {
sub_08037A58(this);
this->field_0x76 = 0xf0;
this->field_0x76 = 240;
}
}
void Gibdo_CreateObjects(GibdoEntity* this) {
Entity* E;
E = CreateObject(OBJECT_2A, 3, 0);
if (E != 0) {
E->type2 = super->timer;
E->spritePriority.b0 = 3;
E->spriteOffsetX = 0;
E->spriteOffsetY = 0xfc;
E->parent = super;
Entity* object;
object = CreateObject(OBJECT_2A, 3, 0);
if (object != NULL) {
object->type2 = super->timer;
object->spritePriority.b0 = 3;
object->spriteOffsetX = 0;
object->spriteOffsetY = 0xfc;
object->parent = super;
}
this->field_0x80 = E;
E = CreateObject(OBJECT_2A, 3, 0);
if (E != 0) {
E->type2 = super->timer;
E->spritePriority.b0 = 3;
E->spriteOffsetX = 0xfd;
E->spriteOffsetY = 0xf8;
E->parent = super;
this->field_0x80 = object;
object = CreateObject(OBJECT_2A, 3, 0);
if (object != NULL) {
object->type2 = super->timer;
object->spritePriority.b0 = 3;
object->spriteOffsetX = 0xfd;
object->spriteOffsetY = 0xf8;
object->parent = super;
}
this->field_0x84 = E;
E = CreateObject(OBJECT_2A, 3, 0);
if (E != 0) {
E->type2 = super->timer;
E->spritePriority.b0 = 3;
E->spriteOffsetX = 0x5;
E->spriteOffsetY = 0xf5;
E->parent = super;
this->field_0x84 = object;
object = CreateObject(OBJECT_2A, 3, 0);
if (object != NULL) {
object->type2 = super->timer;
object->spritePriority.b0 = 3;
object->spriteOffsetX = 0x5;
object->spriteOffsetY = 0xf5;
object->parent = super;
}
super->child = E;
super->child = object;
}
void Gibdo_MoveObjectsToStalfos(GibdoEntity* this, Entity* that) {
Entity* ent = this->field_0x80;
if (ent != NULL) {
ent->timer = 0xf;
ent->timer = 15;
ent->parent = that;
}
ent = this->field_0x84;
if (ent != NULL) {
ent->timer = 0xf;
ent->timer = 15;
ent->parent = that;
}
ent = super->child;
if (ent != NULL) {
ent->timer = 0xf;
ent->timer = 15;
ent->parent = that;
}
}
+17 -17
View File
@@ -80,15 +80,15 @@ void Gleerok_OnDeath(GleerokEntity* this) {
if (super->type2 == 0) {
super->type2 = 1;
super->timer = 0;
super->subtimer = 0x3c;
super->subtimer = 60;
this->unk_74 = 0x10;
this->unk_75 = 0;
gScreen.controls.alphaBlend = this->unk_74;
gScreen.controls.layerFXControl = 0x1442;
SoundReq(SFX_EVAPORATE);
} else {
++super->timer;
if ((super->timer & 0xf) == 0) {
super->timer++;
if ((super->timer & 0xF) == 0) {
this->unk_75++;
this->unk_74--;
gScreen.controls.alphaBlend = this->unk_74 | (this->unk_75 << 8);
@@ -148,7 +148,7 @@ void sub_0802D170(GleerokEntity* this) {
} else {
super->action = 3;
this->unk_80 = 0;
((Entity*)this->unk_84)->parent->timer = 0x18;
((Entity*)this->unk_84)->parent->timer = 24;
this->unk_84->filler[0x19] = 0;
}
}
@@ -161,7 +161,7 @@ void sub_0802D218(GleerokEntity* this) {
super->timer = 0;
super->subtimer = 0;
this->unk_7c.HALF_U.LO = 0xb4;
((Entity*)(this->unk_84))->parent->timer = 0xc;
((Entity*)(this->unk_84))->parent->timer = 12;
CreateObjectWithParent(super, 0x67, 0x2, this->unk_7c.HALF_U.LO);
}
@@ -403,7 +403,7 @@ void sub_0802D6F0(GleerokEntity* this) {
if (--this->unk_7c.WORD == -1) {
super->subAction = 2;
this->unk_7c.WORD = 0x5a;
InitScreenShake(0x96, 0);
InitScreenShake(150, 0);
}
}
@@ -434,7 +434,7 @@ void sub_0802D714(GleerokEntity* this) {
((GleerokEntity*)(super->child))->unk_84 = heap;
}
heap->ent2->timer = 0x18;
heap->ent2->timer = 24;
}
void sub_0802D77C(GleerokEntity* this) {
@@ -449,7 +449,7 @@ void sub_0802D77C(GleerokEntity* this) {
super->subtimer = 0;
super->timer = 0;
super->subAction = 4;
this->unk_84->ent2->timer = 0xc;
this->unk_84->ent2->timer = 12;
}
void sub_0802D7B4(GleerokEntity* this) {
@@ -459,7 +459,7 @@ void sub_0802D7B4(GleerokEntity* this) {
super->timer = 0;
super->action = 1;
super->subAction = 0;
this->unk_84->ent2->timer = 0x18;
this->unk_84->ent2->timer = 24;
gRoomControls.camera_target = &gPlayerEntity;
#ifndef EU
gPlayerState.controlMode = CONTROL_1;
@@ -730,10 +730,10 @@ void sub_0802DC1C(GleerokEntity* this) {
}
void sub_0802DCE0(GleerokEntity* this) {
if (this->unk_84->ent2->timer != 0xc) {
if (this->unk_84->ent2->timer != 12) {
super->direction = GetFacingDirection(super, &gPlayerEntity);
if (this->unk_84->filler[0x15] == super->direction) {
this->unk_84->ent2->timer = 0xc;
this->unk_84->ent2->timer = 12;
this->unk_82 = 4;
super->subtimer = 0;
} else {
@@ -870,7 +870,7 @@ void sub_0802DDD8(GleerokEntity* this) {
super->timer &= 0xfe;
}
this->unk_84->ent2->timer = 0xc;
this->unk_84->ent2->timer = 12;
} else {
super->subAction = 0;
this->unk_84->ent2->timer = 0;
@@ -903,7 +903,7 @@ void sub_0802DFC0(GleerokEntity* this) {
if (this->unk_7b) {
COLLISION_ON(super);
super->type2 = 1;
this->unk_84->ent2->timer = 0x18;
this->unk_84->ent2->timer = 24;
SoundReq(SFX_BOSS_HIT);
}
}
@@ -1018,7 +1018,7 @@ void sub_0802E1D0(GleerokEntity* this) {
if (i == 5) {
if (!(this->unk_79 & 0x80)) {
this->unk_7c.HALF_U.LO = 0xF0;
InitScreenShake(0xF0, 0);
InitScreenShake(240, 0);
} else {
for (this->unk_7c.HALF_U.LO = 0; this->unk_7c.HALF_U.LO < 4; this->unk_7c.HALF_U.LO++) {
CreateObjectWithParent(super, OBJECT_67, 1, this->unk_7c.HALF_U.LO);
@@ -1028,7 +1028,7 @@ void sub_0802E1D0(GleerokEntity* this) {
this->unk_7c.HALF_U.LO = 0xB;
gScreen.controls.alphaBlend = this->unk_74 | (this->unk_75 << 8);
gScreen.controls.layerFXControl = 0x240;
InitScreenShake(0x1e, 0);
InitScreenShake(30, 0);
}
super->type2 = 5;
}
@@ -1100,7 +1100,7 @@ void sub_0802E300(GleerokEntity* this) {
((GleerokEntity*)super->child)->unk_84 = heap;
}
heap->ent2->timer = 0x18;
heap->ent2->timer = 24;
} else {
if ((gRoomTransition.frameCount & 0xf) == 0) {
CreateProjectileWithParent(super, GLEEROK_PROJECTILE, 0x3);
@@ -1202,7 +1202,7 @@ NONMATCH("asm/non_matching/gleerok/sub_0802E518.inc", void sub_0802E518(GleerokE
heap->entities[index]->y.WORD -= result << 8;
}
if (heap->ent2->timer == 0x18) {
if (heap->ent2->timer == 24) {
r7 = (heap->filler[0x15] >> 3) << 2;
if (heap->filler[0x2d] > 0xc) {
r7 += 3;
+1 -2
View File
@@ -77,8 +77,7 @@ void GyorgChild_OnGrabbed_Action3(GyorgChildEntity* this) {
void GyorgChild_Action0(GyorgChildEntity* this) {
static const s8 gUnk_080D1EA0[] = {
0x50, 0x1, 0x40, 0x1, 0x30, 0x1, 0x20, 0x1, 0x10, 0x1, 0,
0, 0x10, -0x1, 0x20, -0x1, 0x30, -0x1, 0x40, -0x1, 0x50, -0x1,
80, 1, 64, 1, 48, 1, 32, 1, 16, 1, 0, 0, 16, -1, 32, -1, 48, -1, 64, -1, 80, -1,
};
super->gustJarFlags = 1;
super->spriteOrientation.flipY = 3;
+8 -8
View File
@@ -84,7 +84,7 @@ void GyorgFemale_Setup(GyorgFemaleEntity* this) {
super->collisionLayer = 2;
this->eyesVulnerable = 0;
this->unk_79 = 0;
this->childrenSpawnTimer = 0x3C;
this->childrenSpawnTimer = 60;
MemClear(&gMapDataBottomSpecial, 0x8000);
MemClear(&gMapDataTopSpecial, 0x8000);
sub_0804660C(this, 0);
@@ -116,13 +116,13 @@ void GyorgFemale_Action1(GyorgFemaleEntity* this) {
this->eyeTimer = 0;
this->eyesHitFrame = 0;
this->eyesHit = 0;
this->childrenSpawnTimer = 0x3c;
this->childrenSpawnTimer = 60;
this->unk_80 = 0;
return;
}
if (((GyorgHeap*)super->myHeap)->boss->unk_6c & 0x40) {
super->action = 3;
this->childrenSpawnTimer = 0x3c;
this->childrenSpawnTimer = 60;
super->timer = 0;
this->eyeTimer = 0;
this->eyesHitFrame = 0;
@@ -132,7 +132,7 @@ void GyorgFemale_Action1(GyorgFemaleEntity* this) {
}
if (((GyorgHeap*)super->myHeap)->boss->unk_6c & 0x100) {
if (--this->childrenSpawnTimer == 0) {
this->childrenSpawnTimer = 0x168;
this->childrenSpawnTimer = 360;
GyorgFemale_SpawnChildren(this, TRUE);
}
}
@@ -160,12 +160,12 @@ void GyorgFemale_Action2(GyorgFemaleEntity* this) {
}
}
if (((GyorgHeap*)super->myHeap)->boss->unk_6c & 0x80 && --this->childrenSpawnTimer == 0) {
this->childrenSpawnTimer = 0x168;
this->childrenSpawnTimer = 360;
GyorgFemale_SpawnChildren(this, 0);
}
if ((((GyorgHeap*)super->myHeap)->boss->unk_6c & 0x38) == 0) {
super->action = 1;
this->childrenSpawnTimer = 0x3c;
this->childrenSpawnTimer = 60;
#ifndef EU
this->eyesVulnerable = 0;
#endif
@@ -176,7 +176,7 @@ void GyorgFemale_Action2(GyorgFemaleEntity* this) {
void GyorgFemale_Action3(GyorgFemaleEntity* this) {
sub_080465C8();
if (--this->childrenSpawnTimer == 0) {
this->childrenSpawnTimer = 0x168;
this->childrenSpawnTimer = 360;
GyorgFemale_SpawnChildren(this, 1);
}
GyorgFemale_ProcessEyeHit(this);
@@ -203,7 +203,7 @@ void GyorgFemale_Action3(GyorgFemaleEntity* this) {
#ifdef EU
this->eyesVulnerable = 0;
#endif
this->childrenSpawnTimer = 0x3c;
this->childrenSpawnTimer = 60;
#ifndef EU
this->eyesVulnerable = 0;
#endif
+7 -7
View File
@@ -392,7 +392,7 @@ void sub_08046E68(GyorgMaleEntity* this) {
sub_08047EA4(this, ((0x100 - super->direction) & 0xFF) << 8);
} else {
super->subAction = 4;
super->timer = 0x3F;
super->timer = 63;
super->subtimer = 1;
super->direction = (gUnk_080D1B70[Random() & 1] + tmp) & 0xC0;
sub_08047D88(this);
@@ -404,13 +404,13 @@ const u16 gUnk_080D1B74[0x10] = { 0x20, 0x40, 0x60, 0x80, 0xA0, 0xC0, 0xE0, 0x1
void sub_08046EF4(GyorgMaleEntity* this) {
if (--super->timer == 0) {
super->timer = 0x7F;
super->timer = 127;
super->direction ^= 0x80;
}
super->speed = gUnk_080D1B74[(super->timer >> 3) & 0xF];
if (--super->subtimer == 0) {
Entity* tmp;
super->subtimer = (Random() & 0x38) + 0x78;
super->subtimer = (Random() & 0x38) + 120;
tmp = CreateProjectile(GYORG_MALE_ENERGY_PROJECTILE);
if (tmp) {
tmp->collisionLayer = 2;
@@ -926,7 +926,7 @@ void sub_08047B84(GyorgMaleEntity* this) {
void sub_08047BA4(GyorgMaleEntity* this) {
super->subAction = 1;
super->timer = 0x78;
super->timer = 120;
super->subtimer = 0;
if (gRoomControls.origin_x + 0x200 < super->x.HALF.HI) {
this->unk_76 = 0x78;
@@ -968,17 +968,17 @@ void sub_08047BF0(GyorgMaleEntity* this) {
}
} else {
super->timer--;
if (super->timer == 0x5A) {
if (super->timer == 90) {
tmp = super->child;
tmp->spriteSettings.draw = 0;
CreateFx(tmp, FX_GIANT_EXPLOSION4, 0);
} else {
if (super->timer == 0x3C) {
if (super->timer == 60) {
tmp = super->child->child;
tmp->spriteSettings.draw = 0;
CreateFx(tmp, FX_GIANT_EXPLOSION4, 0);
} else {
if (super->timer == 0x1E) {
if (super->timer == 30) {
tmp = super->child->child->child;
tmp->spriteSettings.draw = 0;
CreateFx(tmp, FX_GIANT_EXPLOSION4, 0);
+2 -2
View File
@@ -53,7 +53,7 @@ void GyorgMaleEye_OnCollision(GyorgMaleEyeEntity* this) {
} else {
entity->health = 0;
SoundReq(SFX_BOSS_DIE);
InitScreenShake(0x28, 0);
InitScreenShake(40, 0);
}
if (super->iframes > 0) {
entity->iframes = super->iframes;
@@ -82,7 +82,7 @@ void GyorgMaleEye_Action1(GyorgMaleEyeEntity* this) {
if ((super->frame & ANIM_DONE) != 0) {
super->action = 2;
super->flags |= 0x80;
super->timer = 0x2d;
super->timer = 45;
}
}
+4 -4
View File
@@ -170,7 +170,7 @@ void sub_0802BDE0(Entity* this) {
this->field_0x78.HALF.HI = 0xff;
} else {
this->action = 1;
this->timer = (Random() & 0xf) + 0xf;
this->timer = (Random() & 0xf) + 15;
this->field_0x78.HALF.HI = this->direction;
}
}
@@ -179,7 +179,7 @@ void sub_0802BE18(Entity* this) {
UpdateAnimationVariableFrames(this, 2);
if (--this->timer == 0) {
this->action = 4;
this->timer = 0x1e;
this->timer = 30;
this->speed = 0x300;
} else {
sub_0802C18C(this);
@@ -224,8 +224,8 @@ void sub_0802BEBC(Entity* this) {
}
void sub_0802BEEC(Entity* this) {
if (this->timer) {
if ((--this->timer & 0x1f) == 0) {
if (this->timer != 0) {
if ((--this->timer & 0x1F) == 0) {
this->animationState ^= 2;
this->direction = this->animationState << 3;
InitializeAnimation(this, this->animationState + 4);
+27 -30
View File
@@ -23,11 +23,11 @@ static void (*const Keaton_Functions[])(Entity*) = {
Keaton_OnTick, Keaton_OnCollision, GenericKnockback, GenericDeath, GenericConfused, Keaton_OnGrabbed,
};
u32 sub_080325E8(Entity* this);
bool32 sub_080325E8(Entity* this);
void sub_08032650(Entity* this);
void sub_0803269C(Entity* this, u32 direction);
void sub_080326FC(Entity* this);
u32 sub_0803271C(Entity* this);
bool32 sub_0803271C(Entity* this);
void sub_08032740(Entity* this);
void sub_0803275C(Entity* this);
void sub_08032784(Entity* this);
@@ -52,7 +52,7 @@ void Keaton_OnCollision(Entity* this) {
if (this->action != 3 && this->action != 4) {
this->action = 3;
this->timer = 0xC;
this->timer = 12;
this->direction = DirectionTurnAround(DirectionRoundUp(this->knockbackDirection));
InitAnimationForceUpdate(this, this->direction >> 3);
} else if (this->contactFlags == 0xCC) {
@@ -78,22 +78,20 @@ void sub_08032468(Entity* this) {
}
void sub_0803248C(Entity* this) {
if (sub_080325E8(this) == 0) {
if (sub_0803271C(this) == 0) {
this->timer--;
if (this->timer == 0) {
sub_08032650(this);
}
if (ProcessMovement0(this) == 0) {
this->timer = 1;
}
UpdateAnimationSingleFrame(this);
if (!sub_080325E8(this) && !sub_0803271C(this)) {
this->timer--;
if (this->timer == 0) {
sub_08032650(this);
}
if (!ProcessMovement0(this)) {
this->timer = 1;
}
UpdateAnimationSingleFrame(this);
}
}
void sub_080324CC(Entity* this) {
if (sub_080325E8(this) == 0) {
if (!sub_080325E8(this)) {
UpdateAnimationSingleFrame(this);
if (this->frame & ANIM_DONE) {
sub_080326FC(this);
@@ -106,7 +104,7 @@ void sub_080324FC(Entity* this) {
if (this->timer != 0) {
this->timer--;
if (this->timer == 0) {
this->subtimer = 0x1E;
this->subtimer = 30;
this->animationState = this->direction / 8;
InitAnimationForceUpdate(this, this->animationState + 4);
} else {
@@ -149,32 +147,30 @@ void sub_08032574(Entity* this) {
void sub_080325C4(Entity* this) {
this->timer--;
if ((this->timer == 0) && (sub_080325E8(this) == 0)) {
if ((this->timer == 0) && !sub_080325E8(this)) {
sub_08032784(this);
}
}
u32 sub_080325E8(Entity* this) {
if (((sub_08049FA0(this) != 0) && (sub_08049FDC(this, 1) != 0)) &&
(EntityInRectRadius(this, gUnk_020000B0, 0x68, 0x40) != 0)) {
if ((sub_08049FA0(this) && sub_08049FDC(this, 1)) && (EntityInRectRadius(this, gUnk_020000B0, 0x68, 0x40) != 0)) {
if (((GetFacingDirection(this, gUnk_020000B0) - (DirectionRound(this->frame)) + 2) & 0x1F) < 5) {
this->action = 3;
this->timer = 0xC;
this->timer = 12;
this->direction = DirectionRound(this->frame);
return 1;
return TRUE;
}
}
return 0;
return FALSE;
}
void sub_08032650(Entity* this) {
static const u8 gUnk_080CE7E0[] = { 60, 60, 90, 90, 90, 90, 120, 120, 120, 120, 120, 120, 120, 120, 150, 150 };
u32 uVar3;
u32 rand = Random();
uVar3 = Random();
this->timer = gUnk_080CE7E0[uVar3 & 0xf];
if (!((sub_08049FA0(this) == 0) && ((uVar3 >> 8 & 1) == 0))) {
this->direction = DirectionRound(uVar3 >> 0x10);
this->timer = gUnk_080CE7E0[rand & 0xF];
if (!((sub_08049FA0(this) == 0) && ((rand >> 8 & 1) == 0))) {
this->direction = DirectionRound(rand >> 0x10);
} else {
this->direction = DirectionRoundUp(sub_08049EE4(this));
}
@@ -205,13 +201,14 @@ void sub_080326FC(Entity* this) {
this->field_0x74.HWORD = gUnk_080CE7F0[Random() & 0xF];
}
u32 sub_0803271C(Entity* this) {
bool32 sub_0803271C(Entity* this) {
this->field_0x74.HWORD--;
if (this->field_0x74.HWORD == 0) {
sub_08032784(this);
return 1;
return TRUE;
} else {
return FALSE;
}
return 0;
}
void sub_08032740(Entity* this) {
@@ -223,7 +220,7 @@ void sub_08032740(Entity* this) {
void sub_0803275C(Entity* this) {
this->action = 5;
this->timer = 0x2D;
this->timer = 45;
this->speed = 0x80;
InitAnimationForceUpdate(this, this->animationState);
sub_0803269C(this, this->direction);
+123 -110
View File
@@ -5,165 +5,178 @@
* @brief Keese enemy
*/
#define NENT_DEPRECATED
#include "enemy.h"
#include "physics.h"
#include "player.h"
extern void GenericKnockback2(Entity*);
extern void Keese_StartFly(Entity*);
extern void sub_08021F24(Entity*);
typedef struct {
/* 0x00 */ Entity base;
/* 0x68 */ u8 filler[0x10];
/* 0x78 */ u16 flyTimer;
/* 0x7a */ u16 sleepTimer;
} KeeseEntity;
extern void (*const Keese_Functions[])(Entity*);
extern void (*const gKeeseActions[])(Entity*);
extern void (*const gUnk_080CB6C4[])(Entity*);
typedef enum {
/* 0 */ KeeseAnimation_Fly,
/* 1 */ KeeseAnimation_Rest
} KeeseAnimations;
extern const s8 gKeeseSpriteOffsets[];
extern const u16 gKeeseFlyDurations[];
extern const u8 gKeeseRestDurations[];
typedef enum {
/* 0 */ KEESE_ACTION_INITIALIZE,
/* 1 */ KEESE_ACTION_FLY,
/* 2 */ KEESE_ACTION_REST,
/* 3 */ KEESE_ACTION_SLEEP
} KeeseActions;
enum {
KeeseAnimation_Fly,
KeeseAnimation_Rest,
void Keese_OnTick(Entity*);
void Keese_OnCollision(Entity*);
void Keese_OnGrabbed(Entity*);
void Keese_Initialize(KeeseEntity*);
void Keese_Fly(KeeseEntity*);
void Keese_Rest(KeeseEntity*);
void Keese_Sleep(KeeseEntity*);
void Keese_StartFly(KeeseEntity*);
void sub_08021F24(KeeseEntity*);
void sub_08021DCC(KeeseEntity*);
void sub_08021DD4(KeeseEntity*);
void sub_08021DDC(KeeseEntity*);
void (*const Keese_Functions[])(Entity*) = {
Keese_OnTick, Keese_OnCollision, GenericKnockback2, GenericDeath, GenericConfused, Keese_OnGrabbed,
};
void Keese(Entity* this) {
Keese_Functions[GetNextFunction(this)](this);
void Keese(Entity* thisx) {
Keese_Functions[GetNextFunction(thisx)](thisx);
}
void Keese_OnTick(Entity* this) {
gKeeseActions[this->action](this);
void Keese_OnTick(Entity* thisx) {
static void (*const gKeeseActions[])(KeeseEntity*) = {
Keese_Initialize,
Keese_Fly,
Keese_Rest,
Keese_Sleep,
};
KeeseEntity* this = (KeeseEntity*)thisx;
gKeeseActions[super->action](this);
}
void Keese_OnCollision(Entity* this) {
EnemyFunctionHandlerAfterCollision(this, Keese_Functions);
void Keese_OnCollision(Entity* thisx) {
EnemyFunctionHandlerAfterCollision(thisx, Keese_Functions);
}
void Keese_OnGrabbed(Entity* this) {
if (sub_0806F520(this)) {
gUnk_080CB6C4[this->subAction](this);
void Keese_OnGrabbed(Entity* thisx) {
static void (*const gUnk_080CB6C4[])(KeeseEntity*) = {
sub_08021DCC,
sub_08021DD4,
sub_08021DDC,
};
KeeseEntity* this = (KeeseEntity*)thisx;
if (sub_0806F520(super)) {
gUnk_080CB6C4[super->subAction](this);
}
}
void sub_08021DCC(Entity* this) {
this->subAction = 2;
void sub_08021DCC(KeeseEntity* this) {
super->subAction = 2;
}
void sub_08021DD4(Entity* this) {
sub_0806F4E8(this);
void sub_08021DD4(KeeseEntity* this) {
sub_0806F4E8(super);
}
void sub_08021DDC(Entity* this) {
if (sub_0806F3E4(this)) {
GenericDeath(this);
void sub_08021DDC(KeeseEntity* this) {
if (sub_0806F3E4(super)) {
GenericDeath(super);
}
}
void Keese_Initialize(Entity* this) {
sub_0804A720(this);
if (this->type != 0) {
this->spritePriority.b1 = 1;
this->z.HALF.HI = -0x10;
void Keese_Initialize(KeeseEntity* this) {
sub_0804A720(super);
if (super->type != 0) {
super->spritePriority.b1 = 1;
super->z.HALF.HI = -0x10;
}
this->direction = Random() & 0x1f;
this->gustJarFlags = 1;
this->spritePriority.b0 = 3;
this->collisionLayer = 3;
UpdateSpriteForCollisionLayer(this);
super->direction = Random() & 0x1F;
super->gustJarFlags = 1;
super->spritePriority.b0 = 3;
super->collisionLayer = 3;
UpdateSpriteForCollisionLayer(super);
Keese_StartFly(this);
}
void Keese_Fly(Entity* this) {
if (this->field_0x78.HWORD != 0) {
this->field_0x78.HWORD--;
void Keese_Fly(KeeseEntity* this) {
static const s8 gKeeseSpriteOffsets[] = {
1, -2, -5, -2, 1, 0,
};
if (this->flyTimer != 0) {
this->flyTimer--;
}
if (this->field_0x7a.HWORD != 0) {
this->field_0x7a.HWORD--;
if (this->sleepTimer != 0) {
this->sleepTimer--;
}
GetNextFrame(this);
if (this->frame & ANIM_DONE) {
GetNextFrame(super);
if (super->frame & ANIM_DONE) {
sub_08021F24(this);
} else {
ProcessMovement1(this);
ProcessMovement1(super);
}
this->spriteOffsetY = gKeeseSpriteOffsets[this->frame];
super->spriteOffsetY = gKeeseSpriteOffsets[super->frame];
}
void Keese_Rest(Entity* this) {
if (--this->timer == 0) {
void Keese_Rest(KeeseEntity* this) {
if (--super->timer == 0) {
Keese_StartFly(this);
}
}
void Keese_Sleep(Entity* this) {
if (this->timer != 0) {
this->timer--;
void Keese_Sleep(KeeseEntity* this) {
if (super->timer != 0) {
super->timer--;
} else {
if (EntityWithinDistance(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x70))
if (EntityWithinDistance(super, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x70))
Keese_StartFly(this);
}
}
void Keese_StartFly(Entity* this) {
this->action = 1;
this->field_0x78.HWORD = gKeeseFlyDurations[Random() & 0xf];
this->field_0x7a.HWORD = 60;
InitializeAnimation(this, KeeseAnimation_Fly);
void Keese_StartFly(KeeseEntity* this) {
static const u16 gKeeseFlyDurations[] = {
180, 180, 300, 300, 300, 300, 300, 300, 480, 480, 480, 480, 480, 480, 720, 720,
};
super->action = KEESE_ACTION_FLY;
this->flyTimer = gKeeseFlyDurations[Random() & 0xF];
this->sleepTimer = 60;
InitializeAnimation(super, KeeseAnimation_Fly);
}
void sub_08021F24(Entity* this) {
if (this->field_0x78.HWORD == 0) {
this->action = 2;
this->timer = gKeeseRestDurations[Random() & 0xf];
InitializeAnimation(this, KeeseAnimation_Rest);
} else if (!this->field_0x7a.HWORD &&
!(EntityWithinDistance(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x70))) {
this->action = 3;
this->timer = 30;
InitializeAnimation(this, KeeseAnimation_Rest);
void sub_08021F24(KeeseEntity* this) {
static const u8 gKeeseRestDurations[] = {
30, 30, 45, 45, 45, 45, 45, 45, 60, 60, 60, 60, 60, 60, 75, 75,
};
if (this->flyTimer == 0) {
super->action = KEESE_ACTION_REST;
super->timer = gKeeseRestDurations[Random() & 0xF];
InitializeAnimation(super, KeeseAnimation_Rest);
} else if ((this->sleepTimer == 0) &&
!(EntityWithinDistance(super, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x70))) {
super->action = KEESE_ACTION_SLEEP;
super->timer = 30;
InitializeAnimation(super, KeeseAnimation_Rest);
} else {
if (sub_08049FA0(this) != 0) {
this->direction = Random() & 0x1f;
if (sub_08049FA0(super)) {
super->direction = Random() & 0x1f;
} else {
this->direction = sub_08049EE4(this);
super->direction = sub_08049EE4(super);
}
InitializeAnimation(this, KeeseAnimation_Fly);
InitializeAnimation(super, KeeseAnimation_Fly);
}
}
// clang-format off
void (*const Keese_Functions[])(Entity*) = {
Keese_OnTick,
Keese_OnCollision,
GenericKnockback2,
GenericDeath,
GenericConfused,
Keese_OnGrabbed,
};
void (*const gKeeseActions[])(Entity*) = {
Keese_Initialize,
Keese_Fly,
Keese_Rest,
Keese_Sleep,
};
void (*const gUnk_080CB6C4[])(Entity*) = {
sub_08021DCC,
sub_08021DD4,
sub_08021DDC,
};
const s8 gKeeseSpriteOffsets[] = {
1, -2, -5, -2, 1, 0,
};
const u16 gKeeseFlyDurations[] = {
180, 180, 300, 300, 300, 300, 300, 300,
480, 480, 480, 480, 480, 480, 720, 720,
};
const u8 gKeeseRestDurations[] = {
30, 30, 45, 45, 45, 45, 45, 45,
60, 60, 60, 60, 60, 60, 75, 75,
};
// clang-format on
+13 -13
View File
@@ -145,7 +145,7 @@ void Lakitu_Hide(Entity* this) {
sub_0803CA84(this, 0);
if (sub_0803CA4C(this)) {
this->action = 2;
this->action = END_HIDE;
this->spriteSettings.draw = 1;
}
}
@@ -155,7 +155,7 @@ void Lakitu_EndHide(Entity* this) {
if (this->frame & ANIM_DONE) {
this->action = IDLE;
this->timer = 0x3c;
this->timer = 60;
this->hitType = 0x42;
@@ -182,7 +182,7 @@ void Lakitu_BeginHide(Entity* this) {
UpdateAnimationSingleFrame(this);
if (this->frame & ANIM_DONE) {
this->action = 1;
this->action = HIDDEN;
this->spriteSettings.draw = 0;
InitAnimationForceUpdate(this, this->animationState);
@@ -202,11 +202,11 @@ void Lakitu_Lightning(Entity* this) {
this->hitType = 0x42;
if ((Random() & 1) && !this->field_0x78.HALF.HI) {
this->timer = 0xf;
this->timer = 15;
this->field_0x78.HALF.HI = TRUE;
} else {
this->timer = 0x1e;
this->timer = 30;
this->field_0x78.HALF.HI = FALSE;
@@ -225,7 +225,7 @@ void Lakitu_LightningDelay(Entity* this) {
sub_0803CB34(this);
} else {
this->action = IDLE;
this->timer = 0xb4;
this->timer = 180;
InitAnimationForceUpdate(this, this->animationState + 4);
}
@@ -245,11 +245,11 @@ void Lakitu_Cloudless(Entity* this) {
bool32 sub_0803CA4C(Entity* this) {
if (EntityWithinDistance(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x28) == 0) {
if (EntityInRectRadius(this, &gPlayerEntity, 0x70, 0x50)) {
return 1;
return TRUE;
}
}
return 0;
return FALSE;
}
void sub_0803CA84(Entity* this, u32 unkParameter) {
@@ -268,7 +268,7 @@ void sub_0803CA84(Entity* this, u32 unkParameter) {
}
void sub_0803CAD0(Entity* this) {
if (EntityWithinDistance(this, this->field_0x74.HWORD, this->field_0x76.HWORD, 1) == 0) {
if (!EntityWithinDistance(this, this->field_0x74.HWORD, this->field_0x76.HWORD, 1)) {
this->direction =
CalculateDirectionTo(this->x.HALF.HI, this->y.HALF.HI, this->field_0x74.HWORD, this->field_0x76.HWORD);
@@ -277,21 +277,21 @@ void sub_0803CAD0(Entity* this) {
}
bool32 sub_0803CB04(Entity* this) {
bool32 returnValue;
bool32 ret;
u8 delay;
delay = --this->timer;
if (delay != 0) {
returnValue = 0;
ret = FALSE;
} else {
sub_0803CB34(this);
this->field_0x78.HALF.HI = delay;
InitAnimationForceUpdate(this->child, this->animationState + 4);
returnValue = 1;
ret = TRUE;
}
return returnValue;
return ret;
}
void sub_0803CB34(Entity* this) {
+1 -1
View File
@@ -115,7 +115,7 @@ void Leever_DigDown(Entity* this) {
GetNextFrame(this);
if (this->frame & ANIM_DONE) {
this->action = 1;
this->timer = 0xf0;
this->timer = 240;
this->spriteSettings.draw = FALSE;
}
}
+5 -5
View File
@@ -40,9 +40,9 @@ void LikeLike_OnCollision(Entity* this) {
sub_0802810C(this);
} else if (this->contactFlags & 0x80) {
u8 tmp = this->contactFlags & ~0x80;
if (!tmp) {
if (tmp == 0) {
this->action = 7;
this->timer = 0x5f;
this->timer = 95;
this->subtimer = tmp;
this->flags2 &= 0xfc;
this->field_0x82.HALF.HI = gPlayerEntity.spritePriority.b1;
@@ -51,7 +51,7 @@ void LikeLike_OnCollision(Entity* this) {
}
if (this->health == 0) {
this->timer = 0x20;
this->timer = 32;
}
if (this->confusedTime) {
@@ -221,7 +221,7 @@ NONMATCH("asm/non_matching/likeLike/sub_0802810C.inc", void sub_0802810C(Entity*
gPlayerEntity.z.HALF.HI = gPlayerEntity.spriteOffsetY;
gPlayerEntity.spriteOffsetY = 0;
this->action = 4;
this->timer = 0x50;
this->timer = 80;
this->subtimer = 0;
this->flags2 |= 2;
if (this->iframes == 0) {
@@ -231,7 +231,7 @@ NONMATCH("asm/non_matching/likeLike/sub_0802810C.inc", void sub_0802810C(Entity*
END_NONMATCH
void sub_080281A0(Entity* this) {
this->subtimer = 0x19;
this->subtimer = 25;
if (sub_080281E0(ITEM_MIRROR_SHIELD)) {
this->field_0x80.HALF.LO = ITEM_MIRROR_SHIELD;
MessageFromTarget(TEXT_INDEX(TEXT_ITEM_GET, 0x78));
+4 -4
View File
@@ -265,11 +265,11 @@ void sub_08029CF0(Entity* this) {
void sub_08029D08(Entity* this) {
this->action = 3;
this->timer = 0x47;
this->timer = 71;
}
void sub_08029D14(Entity* this) {
if (this->timer) {
if (this->timer != 0) {
if (--this->timer == 0) {
InitializeAnimation(this, this->animationState + 0xc);
ChangeObjPalette(this, 0x7f);
@@ -279,7 +279,7 @@ void sub_08029D14(Entity* this) {
GetNextFrame(this);
if (this->frame & ANIM_DONE) {
this->action = 4;
this->timer = 0x78;
this->timer = 120;
this->hitType = 0x6c;
this->hitbox = (Hitbox*)&gUnk_080FD298;
EnqueueSFX(SFX_6B);
@@ -471,7 +471,7 @@ void sub_0802A0F8(Entity* this) {
} else {
this->parent->flags &= ~ENT_COLLIDE;
this->parent->health = 0;
this->parent->subtimer = 0x69;
this->parent->subtimer = 105;
}
}
+20 -20
View File
@@ -250,7 +250,7 @@ void sub_0803A364(Entity* this) {
this->type2 = 0;
uVar1 = 6;
this->subAction = uVar1;
this->timer = 0x1e;
this->timer = 30;
break;
case 6:
this->timer--;
@@ -275,7 +275,7 @@ void sub_0803A364(Entity* this) {
}
uVar1 = 9;
this->subAction = uVar1;
this->timer = 0x1e;
this->timer = 30;
break;
case 9:
this->timer--;
@@ -300,7 +300,7 @@ void sub_0803A364(Entity* this) {
if (this->type2 != 0) {
uVar1 = 0xc;
this->subAction = uVar1;
this->timer = 0x1e;
this->timer = 30;
} else {
this->type2 = 1;
this->subAction = 6;
@@ -508,7 +508,7 @@ void sub_0803A8B8(Entity* this) {
u32 index;
this->action = 0x10;
this->timer = 0x1e;
this->timer = 30;
this->direction = 0;
this->speed = 0x80;
@@ -621,7 +621,7 @@ void sub_0803AB10(Entity* this) {
sub_0803B55C(this);
if ((this->child->frame & ANIM_DONE) != 0) {
this->action = 0x15;
this->timer = 0xf;
this->timer = 15;
}
}
@@ -684,12 +684,12 @@ void sub_0803AC60(Entity* this) {
if (sub_0803B4E4(this) != 0) {
this->action = 0x19;
this->subAction = 0;
this->timer = 0x1e;
this->timer = 30;
} else {
LinearMoveUpdate(this);
}
} else {
this->timer = this->timer - 1;
this->timer--;
}
sub_0803B824(this);
}
@@ -712,7 +712,7 @@ void sub_0803ACC0(Entity* this) {
uVar2 = this->z.HALF.HI += 4;
if (-1 < (uVar2 * 0x10000)) {
this->z.HALF.HI = 0;
this->timer = 0xc;
this->timer = 12;
this->subAction = 3;
InitScreenShake(8, 0);
SoundReq(SFX_158);
@@ -735,8 +735,8 @@ void sub_0803ACC0(Entity* this) {
if (-1 < (uVar2 * 0x10000)) {
this->z.HALF.HI = 0;
this->action = 0x1a;
this->timer = 0x3c;
InitScreenShake(0x1e, 0);
this->timer = 60;
InitScreenShake(30, 0);
SoundReq(SFX_158);
sub_0803B804(this);
return;
@@ -770,7 +770,7 @@ void sub_0803ADF4(Entity* this) {
GetNextFrame(this);
if ((this->frame & ANIM_DONE) != 0) {
this->action = 0x1c;
this->timer = 0x1e;
this->timer = 30;
this->spriteSettings.draw = 0;
}
}
@@ -829,7 +829,7 @@ void sub_0803AF7C(Entity* this) {
sub_0803B55C(this);
if ((this->child->frame & ANIM_DONE) != 0) {
this->action = 0x21;
this->timer = 0xf;
this->timer = 15;
}
}
@@ -857,10 +857,10 @@ void sub_0803AFE0(Entity* this) {
this->z.HALF.HI += 4;
} else {
this->action = 0x24;
this->timer = 0xf0;
this->timer = 240;
*(u8*)&this->cutsceneBeh = 3;
this->z.HALF.HI = 0;
InitScreenShake(0xa0, 0);
InitScreenShake(160, 0);
SoundReq(SFX_158);
}
}
@@ -869,7 +869,7 @@ void sub_0803B01C(Entity* this) {
if (--this->timer == 0) {
this->action = 0x25;
} else {
if ((0x46 < this->timer) && ((this->timer & 0xf) == 0)) {
if ((this->timer > 70) && ((this->timer & 0xF) == 0)) {
sub_0803B724(this);
}
}
@@ -978,7 +978,7 @@ void sub_0803B1B8(Entity* this) {
temp->field_0x80.HALF.LO |= (this->type == 0) ? 4 : 8;
if ((temp->field_0x80.HALF.LO & 0xc) == 0xc) {
temp->action = 0xb;
temp->timer = 0x78;
temp->timer = 120;
temp->zVelocity = 0;
(*(Entity**)&temp->field_0x74)->field_0x7c.HALF_U.HI = 0x708;
(*(Entity**)&temp->field_0x78)->field_0x7c.HALF_U.HI = 0x708;
@@ -1021,7 +1021,7 @@ void sub_0803B338(Entity* this) {
this->z.HALF.HI--;
} else {
this->action = 0x2f;
this->timer = 0xf;
this->timer = 15;
}
}
@@ -1172,7 +1172,7 @@ void sub_0803B63C(Entity* this) {
x = gPlayerEntity.x.HALF.HI;
x += gUnk_080CFD19[this->type];
y = gPlayerEntity.y.HALF.HI - 0xc;
if (this->timer++ >= 0xb5) {
if (this->timer++ > 180) {
this->direction = CalculateDirectionTo(this->x.HALF.HI, this->y.HALF.HI, x, y);
} else {
sub_08004596(this, CalculateDirectionTo(this->x.HALF.HI, this->y.HALF.HI, x, y));
@@ -1257,7 +1257,7 @@ u32 sub_0803B870(Entity* this) {
entity = this->child;
if ((entity->contactFlags & 0x80) != 0 && (gPlayerState.flags & PL_CAPTURED)) {
this->action = 0x18;
this->timer = 0x44;
this->timer = 68;
this->spriteSettings.draw = 0;
gPlayerEntity.flags &= ~ENT_COLLIDE;
gPlayerEntity.iframes = -0x10;
@@ -1306,7 +1306,7 @@ void sub_0803B978(Entity* this) {
case 1:
this->subAction = 2;
this->timer = 2;
this->subtimer = 0x1e;
this->subtimer = 30;
this->field_0x74.HALF.LO = 0;
SoundReq(SFX_1A9);
case 2:
+7 -7
View File
@@ -143,7 +143,7 @@ void sub_08033F3C(Entity* this) {
if (gRoomTransition.field_0x39 == 0) {
this->action = 0xd;
this->subAction = 0;
this->timer = 0xfc;
this->timer = 252;
COLLISION_OFF(this);
} else {
pEVar2 = CreateEnemy(MAZAAL_BRACELET, 0);
@@ -170,7 +170,7 @@ void sub_08033FFC(Entity* this) {
break;
case 1:
this->subAction = 2;
this->timer = 0x1e;
this->timer = 30;
entity = *(Entity**)&(*(Entity**)&this->field_0x74)->field_0x74;
entity->subAction = 1;
entity = *(Entity**)&(*(Entity**)&this->field_0x78)->field_0x74;
@@ -206,7 +206,7 @@ void sub_08033FFC(Entity* this) {
case 7:
temp = ++this->timer >> 1;
gScreen.controls.alphaBlend = (temp) | (0x10 - (temp)) * 0x100;
if (0x1f < (this->timer & 0xff)) {
if (this->timer > 31) {
this->subAction = 8;
entity = *(Entity**)&this->field_0x74;
entity->subAction = 3;
@@ -325,7 +325,7 @@ void sub_080342C8(Entity* this) {
this->field_0x7c.HALF.HI = 0x708;
this->field_0x7c.BYTES.byte1 = 0;
this->field_0x80.HALF.HI = 0;
InitScreenShake(0x1e, 0);
InitScreenShake(30, 0);
SoundReq(SFX_1A1);
}
}
@@ -354,7 +354,7 @@ void sub_0803438C(Entity* this) {
this->health = 0;
} else {
this->timer--;
if (this->timer > 0xc0) {
if (this->timer > 192) {
this->spriteOffsetX = gUnk_080CED06[this->timer & 3];
} else {
if ((this->timer & 0x1f) == 0) {
@@ -747,7 +747,7 @@ void sub_08034AC4(Entity* this) {
void sub_08034AEC(Entity* this) {
this->action = 1;
this->timer = 0x1e;
this->timer = 30;
InitializeAnimation(this, this->type + 1);
SoundReq(SFX_151);
}
@@ -761,7 +761,7 @@ void sub_08034B0C(Entity* this) {
return;
}
this->action = 2;
this->timer = 0x50;
this->timer = 80;
}
}
+1 -1
View File
@@ -202,7 +202,7 @@ void sub_08034F70(Entity* this) {
void sub_08034FA0(Entity* this) {
if (0 < this->iframes) {
this->child->iframes = this->iframes;
InitScreenShake(0xc, 1);
InitScreenShake(12, 1);
}
switch (this->type2) {
case 0:
+1 -1
View File
@@ -88,7 +88,7 @@ void sub_080452FC(Entity* this) {
this->action = 3;
this->timer = 1;
if (0 < this->speed)
this->timer = FixedDiv(0x1000, this->speed) >> 0x8;
this->timer = FixedDiv(0x1000, this->speed) >> 8;
if (sub_08049FA0(this) == 0 && (Random() & 3)) {
cVar2 = sub_08049EE4(this);
+2 -2
View File
@@ -137,7 +137,7 @@ void sub_080231BC(Entity* this) {
ent->child = NULL;
sub_0804A720(this);
this->action = 6;
this->timer = 0x1e;
this->timer = 30;
this->parent = this;
this->field_0x78.HWORD = 0x1e;
this->palette.b.b0 = 5;
@@ -172,7 +172,7 @@ void sub_08023330(Entity* this) {
GetNextFrame(this);
if (this->frame & ANIM_DONE) {
this->action = 4;
this->timer = 0x19;
this->timer = 25;
COLLISION_ON(this);
this->field_0x78.HWORD = 600;
this->direction = Random() & 0x1c;
+14 -13
View File
@@ -63,11 +63,11 @@ void sub_08032CAC(MulldozerEntity* this) {
case 2:
case 3:
super->action = 6;
super->timer = (super->type != 0) ? 0x5a : 200;
super->timer = (super->type != 0) ? 90 : 200;
super->subtimer = 2;
this->unk_80 = 3;
super->direction = super->knockbackDirection;
super->direction += ((Random() & 0x40) != 0) ? 4 : 0x1c;
super->direction += ((Random() & 0x40) != 0) ? 4 : 0x1C;
super->direction &= 0x1f;
super->speed = 0;
break;
@@ -211,7 +211,7 @@ void sub_08032F64(MulldozerEntity* this) {
void sub_08032F90(MulldozerEntity* this) {
if (super->type == 0) {
if (super->timer == 0x10) {
if (super->timer == 16) {
this->unk_80 = 2;
}
if (--super->subtimer == 0) {
@@ -234,7 +234,7 @@ void sub_08032F90(MulldozerEntity* this) {
void sub_08033000(MulldozerEntity* this) {
if (--super->subtimer == 0) {
super->subtimer = 0x10;
super->subtimer = 16;
if ((this->unk_82 & 0x80) != 0) {
super->direction = (super->direction + 0x18) & 0x1c;
this->unk_82 &= 0x7f;
@@ -270,7 +270,7 @@ void sub_080330C0(MulldozerEntity* this) {
super->action = 2;
this->unk_80 = 0;
if (super->type == 0) {
super->timer = (Random() & 0x38) + 0x18;
super->timer = (Random() & 0x38) + 24;
} else {
super->timer = 6;
}
@@ -284,14 +284,14 @@ void sub_08033100(MulldozerEntity* this) {
super->action = 3;
if (super->type == 0) {
this->unk_80 = 1;
super->timer = 0x30;
super->timer = 48;
super->subtimer = 8;
super->speed = 0;
super->direction = (sub_08049F84(super, 1) + 2) & 0x1c;
} else {
this->unk_80 = 2;
sub_080331B4(this);
super->timer += 0x10;
super->timer += 16;
super->subtimer = 4;
super->speed = 0x160;
}
@@ -307,9 +307,9 @@ void sub_08033174(MulldozerEntity* this) {
this->unk_82 = 0;
this->unk_83 = 0;
if (super->type == 0) {
super->timer = (Random() & 0x18) + 0x18;
super->timer = (Random() & 0x18) + 24;
} else {
super->timer = 0xc;
super->timer = 12;
}
super->speed = 0xa0;
sub_08032F24(this);
@@ -317,15 +317,16 @@ void sub_08033174(MulldozerEntity* this) {
void sub_080331B4(MulldozerEntity* this) {
u32 rand = Random() & 0xf0;
u8 timer = 0x1e;
u8 timer = 30;
if ((rand & 0x80) != 0) {
timer = 0x3c;
timer = 60;
} else {
if ((rand & 0x40) != 0) {
timer = 0x2d;
timer = 45;
}
if ((rand & 0x20) != 0) {
timer = 0x4b;
timer = 75;
}
}
super->timer = timer;
+22 -22
View File
@@ -141,13 +141,13 @@ void OctorokBoss_Hit_SubAction0(OctorokBossEntity* this) {
} else {
if (IS_FROZEN(this) == FALSE) {
super->type2 = 0;
this->timer = 0x3c;
this->timer = 60;
} else {
if (this->heap->tailCount > 3) {
this->heap->tailCount--;
}
this->heap->tailObjects[0]->currentAttack = 0;
this->timer = 0x78;
this->timer = 120;
}
super->subAction = 1;
}
@@ -228,7 +228,7 @@ void OctorokBoss_Hit_SubAction2(OctorokBossEntity* this) {
this->heap->tailObjects[0]->currentAttack++;
} else {
super->subAction = 3;
this->timer = 0x96;
this->timer = 150;
gRoomControls.camera_target = &gPlayerEntity;
}
}
@@ -258,7 +258,7 @@ void OctorokBoss_Hit_SubAction4(OctorokBossEntity* this) {
void OctorokBoss_Hit_SubAction5(OctorokBossEntity* this) {
super->subAction = 6;
this->timer = 0x78;
this->timer = 120;
this->unk_80 = 0;
this->angularSpeed.HALF.LO = 0;
}
@@ -343,7 +343,7 @@ void OctorokBoss_Intro_SubAction0(OctorokBossEntity* this) {
void OctorokBoss_Intro_SubAction1(OctorokBossEntity* this) {
// Rotate Octorok to player
if (this->angle.HALF.HI == 0x80) {
this->timer = 0x3c;
this->timer = 60;
super->subAction = 2;
this->heap->unk_0 = 0;
// Octorok scream
@@ -358,7 +358,7 @@ void OctorokBoss_Intro_SubAction2(OctorokBossEntity* this) {
// Wait for scream end
if (this->timer-- == 0) {
super->subAction = 3;
this->timer = 0x3c;
this->timer = 60;
gPlayerEntity.spriteSettings.draw |= 1;
gRoomControls.camera_target = &gPlayerEntity;
gRoomControls.unk5 = 1;
@@ -372,7 +372,7 @@ void OctorokBoss_Intro_SubAction3(OctorokBossEntity* this) {
gPlayerEntity.direction = 0x10;
gPlayerEntity.animationState = 4;
sub_08078AC0(0x1e, 0, 0);
this->timer = 0x3c;
this->timer = 60;
super->subAction = 4;
}
}
@@ -380,7 +380,7 @@ void OctorokBoss_Intro_SubAction3(OctorokBossEntity* this) {
void OctorokBoss_Intro_SubAction4(OctorokBossEntity* this) {
if (this->timer-- == 0) {
super->subAction = 5;
this->timer = 0x2d;
this->timer = 45;
// Make the player look towards the exit
gPlayerEntity.animationState = 0;
} else {
@@ -652,9 +652,9 @@ void OctorokBoss_Action1_ChargeAttack(OctorokBossEntity* this) {
super->knockbackDuration = 0x20;
super->knockbackSpeed = 0x200;
super->knockbackDirection = super->direction ^ 0x10;
this->heap->fallingStonesTimer += 0x3c;
this->heap->fallingStonesTimer += 60;
OctorokBoss_SetAttackTimer(this);
InitScreenShake(0x3c, 0);
InitScreenShake(60, 0);
SoundReq(SFX_158);
SoundReq(SFX_14C);
}
@@ -692,7 +692,7 @@ void OctorokBoss_Action1_Attack_Type2_0(OctorokBossEntity* this) {
this->angularSpeed.HWORD = 0x100;
super->type2 = 1;
if (IS_FROZEN(this) == FALSE) {
this->timer = 0x16;
this->timer = 22;
} else {
this->timer = 0;
}
@@ -708,14 +708,14 @@ void OctorokBoss_Action1_Attack_Type2_1(OctorokBossEntity* this) {
if (this->currentAttack == ATTACK_VACUUM) {
super->type2 = 3;
if (IS_FROZEN(this)) {
this->timer = 0x3c;
this->timer = 60;
} else {
this->timer = 0x78;
this->timer = 120;
}
this->heap->targetAngle = this->angle.HALF.HI;
} else {
super->type2 = 2;
this->timer = 0x2d;
this->timer = 45;
}
SoundReq(SFX_155);
}
@@ -731,7 +731,7 @@ void OctorokBoss_Action1_Attack_Type2_2(OctorokBossEntity* this) {
super->type2 = 3;
this->unk_74 = this->unk_76;
if (this->currentAttack != ATTACK_SMOKE) {
this->timer = 0x3c;
this->timer = 60;
} else {
this->timer = 0;
CreateObjectWithParent(super, OCTOROK_BOSS_OBJECT, 4, 0);
@@ -813,7 +813,7 @@ void OctorokBoss_ExecuteAttackVacuum(OctorokBossEntity* this) {
if (this->unk_80 == 1) {
this->unk_80 = 2;
super->type2 = 2;
this->timer = 0x2d;
this->timer = 45;
this->angularSpeed.HWORD = 0x100;
this->heap->field_0x2 = 0;
return;
@@ -864,7 +864,7 @@ void OctorokBoss_ExecuteAttackSmoke(OctorokBossEntity* this) {
if (this->timer == 0xff) {
super->type2 = 0;
OctorokBoss_SetAttackTimer(this);
this->timer = 0x78;
this->timer = 120;
} else {
this->timer++;
ChangeLightLevel(-1);
@@ -915,7 +915,7 @@ void OctorokBoss_Burning_SubAction0(OctorokBossEntity* this) {
super->speed = 0x200;
super->collisions = COL_NONE;
super->direction = (u8)(-this->angle.HALF.HI ^ 0x80U) >> 3;
this->timer = 0x78;
this->timer = 120;
this->angularSpeed.HWORD = 0x180;
this->heap->unk_0 = 4;
sub_080368D8(this);
@@ -936,8 +936,8 @@ void OctorokBoss_Burning_SubAction1(OctorokBossEntity* this) {
super->knockbackDuration = 0x18;
super->knockbackSpeed = 0x200;
super->knockbackDirection = super->direction ^ 0x10;
this->heap->fallingStonesTimer += 0x1e;
InitScreenShake(0x1e, 0);
this->heap->fallingStonesTimer += 30;
InitScreenShake(30, 0);
SoundReq(SFX_158);
SoundReq(SFX_14C);
}
@@ -1162,7 +1162,7 @@ void OctorokBoss_StartRegularAttack(OctorokBossEntity* this) {
if (((Random() & 3) == 0) || ((s16)gRoomVars.lightLevel != 0x100)) {
super->subAction = ACTION1_SUBACTION2;
super->speed = 0x200;
this->timer = 0x3c;
this->timer = 60;
super->collisions = COL_NONE;
this->heap->unk_0 = 4;
SoundReq(SFX_159);
@@ -1217,7 +1217,7 @@ void sub_08036F60(OctorokBossEntity* this) {
super->timer = 1;
} else {
if (this->unk_76 > 0xa4) {
super->timer = 0xff;
super->timer = 255;
}
}
}
+2 -2
View File
@@ -91,7 +91,7 @@ static void sub_08037D54(Entity* this) {
} else if (this->frame & ANIM_DONE) {
if (--this->timer == 0) {
this->action = 1;
this->subtimer = 0x3c;
this->subtimer = 60;
this->animationState |= 0xff;
sub_08037E14(this);
} else {
@@ -108,7 +108,7 @@ void sub_08037E14(Entity* this) {
u8* layer;
const s8* ptr;
s32 x, y;
this->timer = 0x8;
this->timer = 8;
dir = (GetFacingDirection(this, &gPlayerEntity) + 4) & 0x18;
layer = (u8*)GetLayerByIndex(this->collisionLayer)->collisionData;
ptr = gUnk_080CF498 + (dir >> 2);
+21 -23
View File
@@ -196,7 +196,7 @@ void Peahat_ChargeTarget(Entity* this) {
if (--this->timer == 0) {
sub_080205F8(this);
}
if (60 < this->timer) {
if (this->timer > 60) {
if (this->timer & 1)
this->speed += 4;
@@ -255,33 +255,31 @@ void Peahat_Stunned(Entity* this) {
}
void Peahat_RepairPropeller(Entity* this) {
if (this->subtimer)
if (--this->subtimer == 0)
Create0x68FX(this, FX_STARS);
if ((this->subtimer != 0) && (--this->subtimer == 0)) {
Create0x68FX(this, FX_STARS);
}
if (!sub_0800442E(this) && --this->timer)
return;
this->action = 9;
this->zVelocity = Q_16_16(1.5);
this->direction = Random() & 0x1f;
sub_0804AA1C(this);
this->animationState = PeahatAnimation_RepairPropeller;
InitializeAnimation(this, this->animationState);
if (sub_0800442E(this) || (--this->timer == 0)) {
this->action = 9;
this->zVelocity = Q_16_16(1.5);
this->direction = Random() & 0x1f;
sub_0804AA1C(this);
this->animationState = PeahatAnimation_RepairPropeller;
InitializeAnimation(this, this->animationState);
}
}
void Peahat_Recover(Entity* this) {
if (this->subtimer)
if (--this->subtimer == 0)
Create0x68FX(this, FX_STARS);
if ((this->subtimer != 0) && (--this->subtimer == 0)) {
Create0x68FX(this, FX_STARS);
}
if (!sub_0800442E(this) && --this->timer)
return;
this->action = 8;
this->timer = 240;
this->direction = Random() & 0x1f;
sub_0804AA1C(this);
if (sub_0800442E(this) || (--this->timer == 0)) {
this->action = 8;
this->timer = 240;
this->direction = Random() & 0x1f;
sub_0804AA1C(this);
}
}
void Peahat_Hop(Entity* this) {
+23 -23
View File
@@ -159,7 +159,7 @@ void sub_080240B8(Entity* this) {
this->field_0x86.HALF.LO = 0;
this->field_0x86.HALF.HI = 0;
this->timer = 0;
this->subtimer = 0x20;
this->subtimer = 32;
this->collisionFlags |= 0x10;
this->gustJarFlags = 2;
this->direction = direction;
@@ -236,7 +236,7 @@ void sub_080242A0(Entity* this) {
if (sub_08049F1C(this, gUnk_020000B0, 0x20) && sub_08049FDC(this, 3)) {
this->action = 4;
this->field_0x80.HALF.LO = 0;
this->timer = 0x10;
this->timer = 16;
this->speed = 0;
}
}
@@ -258,7 +258,7 @@ void sub_0802433C(Entity* this) {
this->action = 5;
this->field_0x80.HALF.LO = 0;
this->speed = 0x140;
this->timer = 0xc0;
this->timer = 192;
this->subtimer = 8;
} else {
if (--this->subtimer == 0)
@@ -275,16 +275,16 @@ void sub_080243B8(Entity* this) {
if (sub_08024C48(this, TRUE)) {
if (this->child == NULL || this->child->next == NULL) {
this->field_0x80.HALF.LO = 2;
this->timer = 0x20;
this->timer = 32;
this->speed = 0x80;
this->field_0x82.HALF.HI = 0x80;
} else if (sub_08049F1C(this, gUnk_020000B0, 0xe)) {
this->field_0x80.HALF.LO++;
this->timer = 0x1e;
this->timer = 30;
this->speed = 0x100;
this->field_0x82.HALF.HI = 0x80;
this->child->action = 2;
} else if (--this->timer) {
} else if (--this->timer != 0) {
if (--this->subtimer == 0) {
sub_08024A14(this, 2, (this->timer >> 6) + 1);
}
@@ -298,7 +298,7 @@ void sub_080243B8(Entity* this) {
case 1:
if (--this->timer == 0) {
this->field_0x80.HALF.LO++;
this->timer = 0x20;
this->timer = 32;
this->speed = 0x80;
}
break;
@@ -315,15 +315,15 @@ void sub_080243B8(Entity* this) {
this->timer = 4;
break;
case 1:
this->timer = 0x14;
this->timer = 20;
break;
default:
this->timer = 0x30;
this->timer = 48;
break;
}
sub_08024A14(this, 2, 8);
} else {
this->timer = 0x40;
this->timer = 64;
sub_08024A14(this, 0, 8);
}
}
@@ -342,7 +342,7 @@ void sub_080244E8(Entity* this) {
this->subtimer = 0;
this->speed = 0;
} else {
this->timer = 0x30;
this->timer = 48;
this->subtimer = 4;
}
break;
@@ -386,7 +386,7 @@ void sub_080244E8(Entity* this) {
tmp = this->field_0x82.HALF.HI & 0x80;
if (tmp == 0) {
this->field_0x80.HALF.LO++;
this->timer = 0xc;
this->timer = 12;
this->direction = 0x10;
this->speed = tmp;
this->cutsceneBeh.HALF.LO = 0;
@@ -405,8 +405,8 @@ void sub_080244E8(Entity* this) {
if (EntityInRectRadius(this, this->child, 6, 6)) {
Entity* ent;
this->field_0x80.HALF.LO += 1;
this->timer = 0xc;
this->field_0x80.HALF.LO++;
this->timer = 12;
this->field_0x82.HALF.HI &= ~0x80;
CopyPosition(this->child, this);
this->z.HALF.HI -= 0xe;
@@ -427,7 +427,7 @@ void sub_080244E8(Entity* this) {
Entity* ent;
this->field_0x80.HALF.LO += 1;
this->timer = 0xc;
this->timer = 12;
this->field_0x82.HALF.HI &= ~0x80;
ent = this->child;
SetTile((u16)ent->field_0x70.HALF.LO, COORD_TO_TILE(ent), ent->collisionLayer);
@@ -481,7 +481,7 @@ void sub_080244E8(Entity* this) {
break;
case 1 ... 2:
this->field_0x80.HALF.LO += 1;
this->timer = 0xc0;
this->timer = 192;
this->subtimer = 8;
this->speed = 0x80;
sub_080249DC(this);
@@ -498,11 +498,11 @@ void sub_080244E8(Entity* this) {
this->field_0x82.HALF.HI = 0xc0;
this->field_0x80.HALF.LO = 0;
this->speed = 0x40;
this->timer = 0x40;
this->timer = 64;
this->subtimer = 8;
sub_08024A14(this, 0, 8);
} else {
this->timer = 0x40;
this->timer = 64;
this->subtimer = 8;
}
} else if (--this->subtimer == 0) {
@@ -709,7 +709,7 @@ void sub_08024C7C(Entity* this) {
void sub_08024C94(Entity* this) {
this->action = 2;
this->field_0x80.HALF.LO = 0;
this->timer = 0x40;
this->timer = 64;
this->subtimer = 0;
this->speed = 0xc0;
this->field_0x82.HALF.HI = 0x80;
@@ -745,7 +745,7 @@ void sub_08024D00(Entity* this) {
case 0:
if (--this->timer == 0) {
this->field_0x80.HALF.LO++;
this->timer = (Random() & 0xf) + 0x20;
this->timer = (Random() & 0xf) + 32;
this->direction += this->field_0x80.HALF.HI ? 4 : 0x1c;
this->direction &= 0x1f;
@@ -757,13 +757,13 @@ void sub_08024D00(Entity* this) {
case 1:
if (--this->timer == 0) {
this->field_0x80.HALF.LO = 0;
this->timer = (Random() & 0x1f) + 0x20;
this->timer = (Random() & 0x1f) + 32;
} else {
if (--this->subtimer == 0) {
this->direction += this->field_0x80.HALF.HI ? 1 : 0x1f;
this->direction &= 0x1f;
this->subtimer = 0x10;
this->subtimer = 16;
sub_080249DC(this);
}
}
@@ -800,7 +800,7 @@ void sub_08024E4C(Entity* this) {
sub_08024F50(this);
this->field_0x80.HALF.LO = 0;
this->speed = 0x40;
this->timer = 0x40;
this->timer = 64;
this->subtimer = 8;
sub_08024A14(this, 0, 8);
} else {
+5 -5
View File
@@ -69,7 +69,7 @@ void Puffstool_OnCollide(Entity* this) {
ChangeObjPalette(this, 0x7c);
}
this->action = 7;
this->timer = 0x3c;
this->timer = 60;
if (0 < this->zVelocity) {
this->zVelocity = 0;
}
@@ -196,7 +196,7 @@ void sub_080252E0(Entity* this) {
if (this->x.HALF.HI == (u16)this->field_0x7c.HALF.LO && this->y.HALF.HI == (u16)this->field_0x7c.HALF.HI) {
this->action = 3;
this->timer = 0x1e;
this->timer = 30;
this->subtimer = 0;
this->zVelocity = Q_16_16(1.5);
InitializeAnimation(this, 1);
@@ -227,7 +227,7 @@ void sub_080253D4(Entity* this) {
InitializeAnimation(this, 3);
} else {
this->action = 6;
this->timer = 0x1e;
this->timer = 30;
InitializeAnimation(this, 3);
sub_08025A54(this);
sub_08025AE8(this);
@@ -295,7 +295,7 @@ void sub_08025514(Entity* this) {
this->field_0x80.HALF.HI = 120;
} else if (3 < this->timer) {
this->action = 10;
this->timer = 0x20;
this->timer = 32;
}
}
@@ -378,7 +378,7 @@ void sub_0802563C(Entity* this) {
void sub_080256B4(Entity* this) {
this->action = 1;
this->timer = (Random() & 3) + 4;
this->subtimer = 0x1e;
this->subtimer = 30;
this->direction = (this->direction + 7 + ((s32)Random() % 7) * 4) & 0x1c;
this->field_0x78.HWORD = gUnk_080CC000[Random() & 0xf];
this->field_0x7a.HALF.LO = ((s32)Random() % 0x18) << 1;
+6 -6
View File
@@ -45,7 +45,7 @@ void Rope_OnTick(Entity* this) {
void Rope_OnCollision(Entity* this) {
if (this->action == 3) {
this->subtimer = 0x1e;
this->subtimer = 30;
this->field_0x78.HALF.LO = 0x3c;
sub_08031600(this);
}
@@ -114,7 +114,7 @@ void sub_08031480(Entity* this) {
} else {
if (GravityUpdate(this, Q_8_8(24.0)) == 0) {
this->action = 2;
this->subtimer = 0xf;
this->subtimer = 15;
this->spriteSettings.draw = 1;
UpdateSpriteForCollisionLayer(this);
EnqueueSFX(SFX_WATER_SPLASH);
@@ -137,7 +137,7 @@ void sub_080314FC(Entity* this) {
u = sub_0804A044(this, gUnk_020000B0, 0xc);
if (u != 0xff) {
this->action = 3;
this->timer = 0x1e;
this->timer = 30;
this->field_0x7a.HWORD = this->speed = 0x1a0;
this->direction = u;
this->animationState = this->direction >> 3;
@@ -156,7 +156,7 @@ void sub_080314FC(Entity* this) {
}
}
}
if (!(--this->timer)) {
if (--this->timer == 0) {
sub_08031600(this);
}
sub_0803163C(this);
@@ -164,7 +164,7 @@ void sub_080314FC(Entity* this) {
}
void sub_080315BC(Entity* this) {
if (this->timer) {
if (this->timer != 0) {
this->timer--;
UpdateAnimationVariableFrames(this, 2);
} else {
@@ -182,7 +182,7 @@ void sub_080315BC(Entity* this) {
void sub_08031600(Entity* this) {
u32 r;
this->action = 2;
this->timer = (Random() & 0x30) + 0x3c;
this->timer = (Random() & 0x30) + 60;
this->speed = 0x80;
this->field_0x7a.HWORD = 0x80;
r = Random() & 0x18;
+5 -5
View File
@@ -81,17 +81,17 @@ void sub_0803827C(Entity* this) {
}
}
UpdateAnimationVariableFrames(this, 0x2);
if (ProcessMovement0(this) == 0) {
if (!ProcessMovement0(this)) {
sub_080383AC(this);
} else {
if (!(--this->timer)) {
if (--this->timer == 0) {
sub_080383AC(this);
}
}
}
void sub_080382EC(Entity* this) {
if (!(--this->timer)) {
if (--this->timer == 0) {
this->action = 3;
}
}
@@ -101,7 +101,7 @@ ASM_FUNC("asm/non_matching/ropeGolden/sub_08038304.inc", void sub_08038304(Entit
void sub_080383AC(Entity* this) {
u32 v;
this->action = 1;
this->timer = 0x8;
this->timer = 8;
this->speed = 0x100;
this->direction = DirectionRoundUp(GetFacingDirection(this, &gPlayerEntity));
v = this->direction >> 3;
@@ -114,7 +114,7 @@ void sub_080383AC(Entity* this) {
void sub_080383E4(Entity* this) {
u32 v;
this->action = 2;
this->timer = 0x8;
this->timer = 8;
this->speed = 0x280;
v = DirectionRoundUp(GetFacingDirection(this, &gPlayerEntity));
this->direction = v;
+3 -3
View File
@@ -64,7 +64,7 @@ void RupeeLike_OnCollision(Entity* this) {
InitializeAnimation(this->child, 4);
}
this->action = 4;
this->timer = 0x3c;
this->timer = 60;
this->subtimer = 0;
this->field_0x82.HALF.HI = 0x41;
this->flags2 &= 0xfc;
@@ -246,7 +246,7 @@ void sub_080296D8(Entity* this) {
gPlayerEntity.spriteOffsetY = 0;
gPlayerEntity.speed = 0x140;
this->action = 5;
this->subtimer = 0x3c;
this->subtimer = 60;
this->flags2 |= 3;
if ((s8)this->iframes == 0) {
this->iframes = 0xf4;
@@ -274,7 +274,7 @@ void sub_08029770(Entity* this) {
void sub_080297F0(Entity* this) {
u32 temp;
this->action = 1;
this->timer = 0x78;
this->timer = 120;
COLLISION_ON(this);
this->spriteSettings.draw = TRUE;
this->hitType = 0x8e;
+5 -5
View File
@@ -93,7 +93,7 @@ void sub_080389E8(ScissorsBeetleEntity* this) {
} else if (super->timer) {
super->timer--;
} else if (super->collisions != COL_NONE) {
super->timer = 0xc;
super->timer = 12;
if ((child->animationState & 1) == 0) {
child->animationState += Random() & 0x20 ? 1 : 7;
child->animationState &= 7;
@@ -112,18 +112,18 @@ void sub_08038A70(ScissorsBeetleEntity* this) {
super->action = 3;
this->unk_82 = 4;
super->speed = 0x80;
super->subtimer = 0x20;
super->subtimer = 32;
child->action = 3;
((ScissorsBeetleEntity*)child)->unk_82 = 2;
child->animationState = 0xff;
sub_08038C84(this, 0);
sub_08038C2C((ScissorsBeetleEntity*)child);
child->subtimer = 0x20;
child->subtimer = 32;
child->parent = NULL;
child->child = super;
} else if (--super->subtimer == 0) {
u32 dir;
super->subtimer = 0x10;
super->subtimer = 16;
super->direction = sub_08049F84(super, 0);
dir = (super->direction + 4) & 0x1c;
child->animationState = dir >> 2;
@@ -145,7 +145,7 @@ void sub_08038B08(ScissorsBeetleEntity* this) {
if (super->frame & ANIM_DONE) {
super->action = 4;
this->unk_82 = 3;
super->timer = 0x32;
super->timer = 50;
super->subtimer = 2;
super->direction = ((super->animationState << 2) + 0x10) & 0x1f;
super->speed = 0x80;
+2 -2
View File
@@ -66,7 +66,7 @@ void sub_08044FC8(Entity* this) {
void sub_08044FF8(Entity* this) {
this->action = 2;
this->timer = (Random() & 31) + 30;
this->timer = (Random() & 0x1F) + 30;
this->cutsceneBeh.HALF.LO = this->health;
}
@@ -76,7 +76,7 @@ void sub_08045018(Entity* this) {
this->action = 3;
this->timer = 1;
if (0 < this->speed) {
this->timer = FixedDiv(4096, this->speed) >> 8;
this->timer = FixedDiv(0x1000, this->speed) >> 8;
}
if (sub_08049FA0(this) == 0 && (Random() & 3)) {
this->direction = (sub_08049EE4(this) + 0xfc + (Random() & 8)) & 24;
+2 -2
View File
@@ -63,7 +63,7 @@ void Sluggula_OnGrabbed(Entity* this) {
void sub_08023C5C(Entity* this) {
sub_0804A720(this);
this->action = 1;
this->timer = (Random() & 0x30) + 0xb4;
this->timer = (Random() & 0x30) + 180;
this->direction = DirectionRound(Random());
this->animationState = this->direction >> 3;
InitializeAnimation(this, this->animationState);
@@ -77,7 +77,7 @@ void sub_08023C8C(Entity* this) {
if (this->frame != 1) {
this->timer = 8;
} else {
this->timer = (Random() & 0x30) + 0xb4;
this->timer = (Random() & 0x30) + 180;
sub_08023E9C(this);
this->animationState = this->direction >> 3;
InitializeAnimation(this, this->animationState);
+2 -2
View File
@@ -87,7 +87,7 @@ void sub_08031704(Entity* this) {
void sub_08031714(Entity* this) {
sub_080317B4(this);
if (--this->subtimer == 0) {
this->subtimer = (Random() & 0xf) + 0x10;
this->subtimer = (Random() & 0xf) + 16;
if (sub_08049FA0(this) == 0 && (this->subtimer & 1) != 0) {
this->direction = sub_08049EE4(this);
} else {
@@ -135,7 +135,7 @@ void sub_080317F8(Entity* this) {
this->hitbox = (Hitbox*)&gUnk_080CE560;
sub_080317E0(this);
this->timer = 0;
this->subtimer = 0x20;
this->subtimer = 32;
}
void sub_08031840(Entity* this) {
+3 -3
View File
@@ -46,7 +46,7 @@ void sub_0802B33C(Entity* this) {
sub_0804A720(this);
this->action = 1;
this->direction = this->type2;
this->subtimer = 0x78;
this->subtimer = 120;
InitializeAnimation(this, 0);
}
@@ -58,13 +58,13 @@ void sub_0802B35C(Entity* this) {
is_head = this->type == 0;
if (this->collisions == COL_NONE) {
if (--this->subtimer == 0) {
this->subtimer = 0x78;
this->subtimer = 120;
this->direction += is_head ? 0x08 : 0x18;
this->direction = DirectionRound(this->direction);
}
} else {
this->subtimer = 0x78;
this->subtimer = 120;
switch (DirectionRound(this->direction)) {
case DirectionNorth:
if ((this->collisions & COL_NORTH_ANY) != COL_NONE) {
+5 -5
View File
@@ -87,7 +87,7 @@ void sub_08028314(Entity* this) {
if (this->timer) {
this->animationState = this->type2 << 1;
this->timer = 0x1e;
this->timer = 30;
this->speed = 0x80;
this->direction = this->animationState << 2;
sub_080287E0(this);
@@ -173,7 +173,7 @@ void sub_08028488(Entity* this) {
case 2:
this->action = 2;
this->speed = 0;
this->timer = (Random() & 7) * 3 + 0x40;
this->timer = (Random() & 7) * 3 + 64;
break;
case 4:
this->direction = (this->direction + 0x10) & 0x18;
@@ -256,13 +256,13 @@ NONMATCH("asm/non_matching/spearMoblin/sub_08028604.inc", void sub_08028604(Enti
uVar1 = gUnk_080CC7C0[Random() & 0xf];
} else {
uVar1 = gUnk_080CC7C0[Random() & 7];
this->timer = this->timer + 0x10;
this->timer = this->timer + 16;
this->field_0x82.HALF.HI--;
}
this->direction = iVar3 + uVar1 + (4U & 0x18);
}
} else {
this->timer = 0xc;
this->timer = 12;
this->speed = 0;
}
@@ -316,7 +316,7 @@ void sub_08028784(Entity* this) {
void sub_080287B4(Entity* this) {
this->action = 3;
this->timer = 0x20;
this->timer = 32;
this->subtimer = 0;
this->field_0x80.HALF.LO = 0;
this->field_0x7a.HALF.HI = 0;
+6 -6
View File
@@ -86,13 +86,13 @@ void sub_0802B744(Entity* this) {
GetNextFrame(this);
if (sub_08049FDC(this, 1) && (direction = sub_0804A024(this, 1, 0xc), direction != 0xff)) {
this->action = 3;
this->timer = 0x1e;
this->timer = 30;
this->direction = DirectionRound(direction);
InitializeAnimation(this, 8);
} else {
if (--this->timer == 0) {
this->action = 2;
this->timer = 0x1e;
this->timer = 30;
} else {
if (!ProcessMovement0(this)) {
this->timer = 1;
@@ -121,7 +121,7 @@ void sub_0802B7FC(Entity* this) {
GetNextFrame(this);
if (--this->timer == 0) {
this->action = 4;
this->timer = 0x78;
this->timer = 120;
this->speed = 0x1c0;
}
}
@@ -145,7 +145,7 @@ void sub_0802B820(Entity* this) {
void sub_0802B880(Entity* this) {
if (--this->timer == 0) {
this->action = 2;
this->timer = 0x3c;
this->timer = 60;
this->animationState = DirectionToAnimationState(this->direction);
InitializeAnimation(this, this->animationState);
}
@@ -156,7 +156,7 @@ void sub_0802B8B0(Entity* this) {
switch (sub_080044EC(this, 0x1800)) {
case 0:
this->action = 7;
this->timer = 0x96;
this->timer = 150;
/* fallthrough */
case 1:
EnqueueSFX(SFX_12B);
@@ -204,7 +204,7 @@ void sub_0802B960(Entity* this) {
void sub_0802B9B4(Entity* this) {
this->action = 5;
this->timer = 0x3c;
this->timer = 60;
this->animationState = (this->direction >> 3) & 3;
InitializeAnimation(this, this->animationState + 4);
}
+8 -8
View File
@@ -51,8 +51,8 @@ void SpinyBeetle_OnCollision(SpinyBeetleEntity* this) {
if ((super->contactFlags & 0x3f) == 0x14 && super->action != 5) {
super->action = 3;
super->timer = 0x5a;
super->subtimer = 0x10;
super->timer = 90;
super->subtimer = 16;
super->spritePriority.b1 = 1;
super->direction = DirectionRoundUp(sub_08049F84(super, 1));
sub_08033D78(this);
@@ -175,8 +175,8 @@ void sub_08033A7C(SpinyBeetleEntity* this) {
return;
super->action = 3;
super->timer = 0x78;
super->subtimer = 0x20;
super->timer = 120;
super->subtimer = 32;
super->spritePriority.b1 = 1;
InitializeAnimation(super, 3);
}
@@ -197,7 +197,7 @@ void sub_08033ACC(SpinyBeetleEntity* this) {
if (--super->timer == 0) {
super->action = 4;
super->timer = 0x78;
super->timer = 120;
super->x.WORD = (super->x.WORD & 0xfff00000) | 0x80000;
super->y.WORD = (super->y.WORD & 0xfff00000) | 0xC0000;
this->unk_7c = super->x.WORD;
@@ -270,7 +270,7 @@ void sub_08033C94(SpinyBeetleEntity* this) {
if (--super->timer)
return;
this->unk_79 = 2;
super->timer = 0x78;
super->timer = 120;
super->spriteOffsetY = 0;
super->direction = sub_08049F84(super, 1) + 0x14;
@@ -294,7 +294,7 @@ void sub_08033C94(SpinyBeetleEntity* this) {
if (--super->timer)
return;
super->timer = (Random() & 0x1f) + 0x20;
super->timer = (Random() & 0x1f) + 32;
super->direction = sub_08049F84(super, 1) + 0x14;
switch (Random() & 3) {
case 1:
@@ -361,7 +361,7 @@ void sub_08033E1C(SpinyBeetleEntity* this) {
super->y.WORD = (super->y.WORD & 0xfff00000) | 0xC0000;
super->hitType = 0x19;
super->spritePriority.b1 = 1;
super->timer = 0x30;
super->timer = 48;
super->subtimer = 0;
super->speed = 0x100;
super->child = NULL;
+2 -2
View File
@@ -35,7 +35,7 @@ void SpinyChuchu_OnCollision(Entity* this) {
case 2:
case 3:
this->action = 2;
this->subtimer = 0x3c;
this->subtimer = 60;
this->hitType = 0x5c;
this->hitbox = (Hitbox*)&gHitbox_23;
InitializeAnimation(this, 0);
@@ -106,7 +106,7 @@ void sub_080225EC(Entity* this) {
InitializeAnimation(this, 0);
} else {
this->action = 1;
this->subtimer = 0x3c;
this->subtimer = 60;
this->spriteSettings.draw = 3;
this->spriteRendering.b3 = 1;
this->spriteOrientation.flipY = 1;
+6 -7
View File
@@ -176,7 +176,7 @@ void Stalfos_Init(StalfosEntity* this) {
void Stalfos_Action1(StalfosEntity* this) {
if (GravityUpdate(super, Q_8_8(24.0)) == 0 && sub_08039758(this) == 0 && --this->unk_78 == 0) {
super->action = 2;
super->timer = 0xa;
super->timer = 10;
sub_08039858(this);
}
}
@@ -215,20 +215,19 @@ void Stalfos_Action5(StalfosEntity* this) {
GravityUpdate(super, Q_8_8(24.0));
if (super->zVelocity < 0) {
super->action = 6;
super->timer = 0x0f;
super->timer = 15;
}
}
void Stalfos_Action6(StalfosEntity* this) {
u16 tmp;
if (super->timer != 0) {
super->timer--;
} else {
tmp = super->z.HALF.HI += 4;
u16 tmp = super->z.HALF.HI += 4;
if (-1 < (tmp * 0x10000)) {
super->action = 7;
super->timer = 0xa;
super->timer = 10;
super->z.HALF.HI = 0;
this->unk_7a = 0x78;
this->unk_7c = 0x3c;
@@ -303,7 +302,7 @@ bool32 sub_08039758(StalfosEntity* this) {
} else {
if (EntityWithinDistance(super, gUnk_020000B0->x.HALF.HI, gUnk_020000B0->y.HALF.HI, 0x48)) {
super->action = 8;
super->timer = 0x3c;
super->timer = 60;
super->direction = GetFacingDirection(super, gUnk_020000B0);
InitAnimationForceUpdate(super, super->animationState + 0xc);
return TRUE;
+4 -4
View File
@@ -137,7 +137,7 @@ void sub_0803BD08(TakkuriEntity* this) {
if (gUnk_020000B0->y.HALF.HI > super->y.HALF.HI + 8) {
super->action = 2;
this->unk_0x84 = 0;
super->timer = 0x10;
super->timer = 16;
this->unk_0x81 = 2;
sub_0803BF2C(this);
}
@@ -183,7 +183,7 @@ void sub_0803BDD8(TakkuriEntity* this) {
COLLISION_ON(super);
super->action = 2;
this->unk_0x84 = 1;
super->timer = 0x18;
super->timer = 24;
this->unk_0x82 = 0x12c;
super->speed = 0x12c + 0x94;
this->unk_0x81 = 4;
@@ -199,7 +199,7 @@ void sub_0803BE7C(TakkuriEntity* this) {
super->action = 1;
super->spriteSettings.draw = 1;
COLLISION_OFF(super);
super->timer = 0x8;
super->timer = 8;
super->subtimer = 1;
super->direction = sub_08049F84(super, 1);
this->unk_0x80 = 0;
@@ -246,7 +246,7 @@ void sub_0803BF70(TakkuriEntity* this) {
}
if (--super->timer == 0) {
this->unk_0x84 = 1;
super->timer = 0x18;
super->timer = 24;
COLLISION_ON(super);
this->unk_0x81 = 2;
sub_0803BF2C(this);
+7 -7
View File
@@ -59,7 +59,7 @@ void Tektite_OnCollision(Entity* this) {
this->action = 1;
this->subAction = 0;
if (this->type != 0) {
this->timer = 0xc0;
this->timer = 192;
} else {
this->timer = gUnk_080CDEF8[Random() & 3];
}
@@ -98,7 +98,7 @@ void sub_0802F210(Entity* this) {
this->action = 1;
this->subAction = 0;
this->timer = gUnk_080CDEF8[Random() & 3];
this->timer = (Random() & 0x1f) + this->timer;
this->timer += (Random() & 0x1f);
this->subtimer = 0;
*(u8*)&this->field_0x7c = 0;
@@ -120,14 +120,14 @@ void sub_0802F284(Entity* this) {
} else if (this->subtimer != 0) {
if (this->frame & ANIM_DONE) {
this->action = 2;
this->timer = 0x10;
this->timer = 16;
this->subtimer = this->type;
this->zVelocity = this->field_0x82.HWORD << 4;
sub_0802F45C(this);
InitializeAnimation(this, 2);
}
} else if (this->frame & ANIM_DONE) {
this->subtimer = 0x40;
this->subtimer = 64;
InitializeAnimation(this, 1);
}
}
@@ -149,7 +149,7 @@ void sub_0802F300(Entity* this) {
}
if (rand == 0) {
this->timer = 0xc0;
this->timer = 192;
} else {
this->timer = gUnk_080CDEF8[rand & 3] + rand;
}
@@ -163,7 +163,7 @@ void sub_0802F300(Entity* this) {
}
if (--this->timer == 0) {
this->timer = 0x10;
this->timer = 16;
if (this->subtimer != 0) {
this->subtimer--;
sub_0802F45C(this);
@@ -191,7 +191,7 @@ void sub_0802F3F4(Entity* this) {
if (this->frame & ANIM_DONE) {
if ((*(u8*)&this->field_0x7c.HALF.LO < 2) && ((this->type % 2) != 0)) {
this->action = 2;
this->timer = 0x10;
this->timer = 16;
this->subtimer = this->type;
this->zVelocity = this->field_0x82.HWORD << 4;
(*(u8*)&this->field_0x7c.HALF.LO)++;
+6 -6
View File
@@ -50,7 +50,7 @@ void TektiteGolden_OnCollision(Entity* this) {
if (this->contactFlags == 0x94) {
this->action = 1;
this->subAction = 0;
this->timer = 0x14;
this->timer = 20;
this->subtimer = 0;
this->field_0x80.HALF.LO = 0;
if (this->z.HALF.HI != 0) {
@@ -92,7 +92,7 @@ void sub_08037FA0(Entity* this) {
sub_0804A720(this);
this->action = 1;
this->subAction = 0;
this->timer = (Random() & 0x1f) + 0x20;
this->timer = (Random() & 0x1f) + 32;
this->subtimer = 0;
this->field_0x80.HALF.LO = 0;
InitializeAnimation(this, 0);
@@ -112,7 +112,7 @@ void sub_08037Fe0(Entity* this) {
InitializeAnimation(this, 2);
}
} else if (this->frame & ANIM_DONE) {
this->subtimer = 0x40;
this->subtimer = 64;
InitializeAnimation(this, 1);
}
}
@@ -129,7 +129,7 @@ void sub_08038048(Entity* this) {
if (sub_080044EC(this, 0x3000) == 1) {
this->action = 3;
this->subAction = 0;
this->timer = 0x14;
this->timer = 20;
InitializeAnimation(this, 3);
return;
} else if (this->collisions != COL_NONE) {
@@ -139,7 +139,7 @@ void sub_08038048(Entity* this) {
}
if (--this->timer == 0) {
this->timer = rand + 0x10;
this->timer = rand + 16;
sub_08038168(this);
}
@@ -169,7 +169,7 @@ void sub_08038110(Entity* this) {
} else {
this->action = 1;
this->field_0x80.HALF.LO = 0;
this->timer = 0xc0;
this->timer = 192;
InitializeAnimation(this, 0);
}
}
+17 -17
View File
@@ -269,7 +269,7 @@ static void sub_08042654(Entity* this) {
if ((((VaatiArm_HeapStruct*)this->myHeap)->s1[4].unk0c += 2) < 0x1c)
break;
this->subAction = 5;
this->timer = 0x5a;
this->timer = 90;
((VaatiArm_HeapStruct*)this->myHeap)->entities[0]->flags |= ENT_COLLIDE;
((VaatiArm_HeapStruct*)this->myHeap)->entities[0]->spritePriority.b0 = 4;
((VaatiArm_HeapStruct*)this->myHeap)->entities[1]->flags |= ENT_COLLIDE;
@@ -338,7 +338,7 @@ static void sub_080428AC(Entity* this) {
pVVar3->unk00.HWORD += pVVar3->unk08;
} else {
this->subAction = 2;
this->timer = 0x1e;
this->timer = 30;
}
sub_08043BF0(this);
}
@@ -383,7 +383,7 @@ static void sub_08042970(Entity* this) {
pVVar3->unk00.HWORD += pVVar3->unk08;
} else {
this->subAction = 5;
this->timer = 0x3c;
this->timer = 60;
uVar2 = 0;
do {
((VaatiArm_HeapStruct*)this->myHeap)->entities[uVar2]->hitType = 0x39;
@@ -451,7 +451,7 @@ static void sub_08042A88(Entity* this) {
pVVar4->unk04.HWORD = 0;
pVVar4->unk08 = gUnk_080D12CA[this->type2];
this->subAction = 2;
this->timer = 0x1e;
this->timer = 30;
}
}
@@ -506,7 +506,7 @@ static void sub_08042B20(Entity* this) {
if (--this->timer == 0) {
this->action = 5;
this->subAction = 0;
this->timer = 0x1e;
this->timer = 30;
this->hitType = 0x39;
((VaatiArm_HeapStruct*)this->myHeap)->entities[1]->hitType = 0x39;
}
@@ -529,7 +529,7 @@ static void sub_08042C34(Entity* this) {
VaatiArm_HeapStruct1* ptr;
if (--this->timer == 0) {
this->timer = 0x3c;
this->timer = 60;
this->subtimer = 3;
this->subAction = 1;
random = Random() & 6;
@@ -615,7 +615,7 @@ static void sub_08042D6C(Entity* this) {
((VaatiArm_HeapStruct*)this->myHeap)->s1[0].unk08 = gUnk_080D1300[this->type2];
((VaatiArm_HeapStruct*)this->myHeap)->s1[0].unk0a = 0xc0;
this->subAction = 3;
this->timer = 0x1e;
this->timer = 30;
this->hitType = 0x39;
this->field_0x7c.BYTES.byte3 = 0x2d;
InitAnimationForceUpdate(this, 0);
@@ -640,7 +640,7 @@ static void sub_08042E30(Entity* this) {
pVVar9 = &((VaatiArm_HeapStruct*)this->myHeap)->s1[0];
if (--this->timer == 0) {
this->subAction = 4;
this->timer = (Random() & 0x38) + 0x28;
this->timer = (Random() & 0x38) + 40;
this->speed = 0x200;
this->direction = pVVar9->unk00.HALF.HI >> 3;
uVar6 = CalculateDirectionTo(this->x.HALF.HI, this->y.HALF.HI, gRoomControls.origin_x + 0x110,
@@ -674,7 +674,7 @@ static void sub_08042EF4(Entity* this) {
if (--this->timer == 0) {
if (EntityWithinDistance(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 0x50)) {
this->subAction = 6;
this->timer = 0x28;
this->timer = 40;
} else {
this->subAction = 5;
InitAnimationForceUpdate(this, 0xf);
@@ -719,10 +719,10 @@ static void sub_08042FD8(Entity* this) {
if (this->frame & ANIM_DONE) {
if (--this->subtimer == 0) {
this->subAction = 8;
this->timer = 0x3c;
this->timer = 60;
} else {
this->subAction = 3;
this->timer = 0x3c;
this->timer = 60;
InitAnimationForceUpdate(this, 0);
}
}
@@ -767,10 +767,10 @@ static void sub_080430D0(Entity* this) {
if (ptr[0].unk04.HALF.HI < 0x18) {
if (--this->subtimer == 0) {
this->subAction = 8;
this->timer = 0x3c;
this->timer = 60;
} else {
this->subAction = 3;
this->timer = 0x3c;
this->timer = 60;
ptr[0].unk0a = -0xc0;
InitAnimationForceUpdate(this, 0);
}
@@ -813,7 +813,7 @@ static void sub_08043130(Entity* this) {
}
if (this->spriteSettings.draw == 0) {
this->subAction = 9;
this->timer = 0x3c;
this->timer = 60;
sub_0804AA1C(this);
}
}
@@ -1007,7 +1007,7 @@ static void sub_08043580(Entity* this) {
}
if ((this->spriteSettings.draw & 3) == 0) {
this->subAction = 5;
this->timer = 0x3c;
this->timer = 60;
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
entity->collisionFlags = entity->collisionFlags | 0x10;
entity->hitType = 0x39;
@@ -1050,7 +1050,7 @@ static void sub_08043698(Entity* this) {
u32 i;
this->subAction = 1;
this->timer = 0x3c;
this->timer = 60;
for (i = 0; i < 5; i++) {
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[i];
entity->flags = entity->flags & ~ENT_COLLIDE;
@@ -1059,7 +1059,7 @@ static void sub_08043698(Entity* this) {
static inline void deleteThing(Entity* this, const u32 index) {
if (--this->timer == 0) {
this->timer = 0x14;
this->timer = 20;
this->subAction = index + 1;
if (index == 1) {
this->spriteSettings.draw = 0;
+2 -2
View File
@@ -156,7 +156,7 @@ void VaatiProjectileFunction0Action3(Entity* this) {
if (this->child->frame & ANIM_DONE) {
if (--this->z.HALF.HI <= -0x18) {
this->action = 4;
this->timer = (Random() & 0xf) + 0xf;
this->timer = (Random() & 0xf) + 15;
InitializeAnimation(this->child, 1);
}
GetNextFrame(this);
@@ -180,7 +180,7 @@ void VaatiProjectileFunction0Action5(Entity* this) {
return;
}
this->action = 6;
this->timer = 0x14;
this->timer = 20;
}
}
+16 -16
View File
@@ -148,7 +148,7 @@ void VaatiRebornEnemyType0Action1(Entity* this) {
if (this->field_0x74.HALF.HI != 0) {
this->action = 2;
this->field_0x74.HALF.LO = 0;
this->timer = 0x10;
this->timer = 16;
this->direction = 0xff;
} else {
if ((this->field_0x86.HALF.LO != 0) || (this->field_0x80.HALF.LO != 0)) {
@@ -164,7 +164,7 @@ void VaatiRebornEnemyType0Action1(Entity* this) {
this->action = 3;
this->field_0x74.HALF.HI = this->field_0x74.HALF.LO & 0x80;
this->field_0x74.HALF.LO = 0;
this->timer = 0xc0;
this->timer = 192;
this->direction = 0xff;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 0);
@@ -175,7 +175,7 @@ void VaatiRebornEnemyType0Action1(Entity* this) {
switch (sub_0803DEE0(this)) {
case 0:
this->action = 4;
this->timer = 0xa0;
this->timer = 160;
this->direction = 0xff;
this->cutsceneBeh.HALF.LO = 0xff;
InitAnimationForceUpdate(this, 1);
@@ -189,12 +189,12 @@ void VaatiRebornEnemyType0Action1(Entity* this) {
case 3:
this->action = 5;
this->field_0x74.HALF.LO = 0;
this->subtimer = 0x20;
this->subtimer = 32;
this->direction = 0xff;
break;
case 2:
this->field_0x74.HALF.LO = 0;
this->timer = 0x20;
this->timer = 32;
if ((this->field_0x86.HALF.LO != 0) || (this->field_0x80.HALF.LO != 0)) {
this->direction = ((Random() & 0x80) >> 3) | 8;
} else {
@@ -229,7 +229,7 @@ void VaatiRebornEnemyType0Action2(Entity* this) {
case 0:
if (--this->timer == 0) {
this->field_0x74.HALF.LO++;
this->timer = 0x20;
this->timer = 32;
InitAnimationForceUpdate(this, 3);
SoundReq(SFX_19B);
}
@@ -238,7 +238,7 @@ void VaatiRebornEnemyType0Action2(Entity* this) {
if ((this->frame & ANIM_DONE) != 0) {
this->field_0x74.HALF.LO = 2;
this->spriteSettings.draw = 0;
this->timer = 0x10;
this->timer = 16;
}
break;
case 2:
@@ -254,7 +254,7 @@ void VaatiRebornEnemyType0Action2(Entity* this) {
this->y.HALF.HI = gRoomControls.origin_y + ptr->HALF.y + 0x10;
}
this->spriteSettings.draw = 1;
this->timer = 0x20;
this->timer = 32;
InitAnimationForceUpdate(this, 4);
SoundReq(SFX_F5);
}
@@ -271,7 +271,7 @@ void VaatiRebornEnemyType0Action2(Entity* this) {
this->timer = 1;
} else {
this->field_0x74.HALF.LO = 0;
this->timer = 0x10;
this->timer = 16;
}
InitAnimationForceUpdate(this, 0);
}
@@ -384,7 +384,7 @@ void VaatiRebornEnemyType0Action5(Entity* this) {
case 1:
if ((this->frame & 0x10) != 0) {
this->field_0x74.HALF.LO = 2;
this->subtimer = (Random() & 0x3f) + 0x40;
this->subtimer = (Random() & 0x3f) + 64;
SoundReq(SFX_SUMMON);
}
break;
@@ -392,13 +392,13 @@ void VaatiRebornEnemyType0Action5(Entity* this) {
if (--this->subtimer == 0) {
if (!((this->field_0x86.HALF.LO < 2) || (3 < this->field_0x86.HALF.HI)) && (Random() & 0x10) != 0) {
this->field_0x86.HALF.HI++;
this->subtimer = (Random() & 0x3f) + 0x40;
this->subtimer = (Random() & 0x3f) + 64;
uVar3 = GetFacingDirection(this, &gPlayerEntity);
this->direction = (uVar3 & 0x10) | 8;
} else {
this->field_0x74.HALF.LO++;
this->field_0x86.HALF.HI = 0;
this->subtimer = 0x30;
this->subtimer = 48;
InitAnimationForceUpdate(this, 0);
}
}
@@ -432,7 +432,7 @@ void VaatiRebornEnemyType0Action6(Entity* this) {
case 0:
if (this->timer != 0) {
this->field_0x74.HALF.LO = 1;
this->timer = 0x70;
this->timer = 112;
}
break;
case 1:
@@ -654,7 +654,7 @@ void VaatiRebornEnemyType1PreAction(Entity* this) {
COLLISION_OFF(this);
parent->action = 7;
parent->flags &= ~ENT_COLLIDE;
parent->timer = 0x80;
parent->timer = 128;
parent->spriteOffsetX = 0;
parent->direction = -1;
this->timer = 0;
@@ -667,9 +667,9 @@ void VaatiRebornEnemyType1PreAction(Entity* this) {
}
if (0 < this->iframes) {
SoundReq(SFX_BOSS_HIT);
InitScreenShake(0xc, 1);
InitScreenShake(12, 1);
if (this->timer == 0)
this->timer = 0x48;
this->timer = 72;
}
}
if (this->timer != 0) {
+25 -25
View File
@@ -188,7 +188,7 @@ void VaatiTransfiguredType0Action1(Entity* this) {
if (--this->timer == 0) {
this->field_0x80.HALF.LO += 1;
this->speed = 0x180;
this->timer = 0x14;
this->timer = 20;
}
break;
case 1:
@@ -203,7 +203,7 @@ void VaatiTransfiguredType0Action1(Entity* this) {
this->field_0x80.HALF.LO += 1;
this->speed = 0;
if (this->animationState < 2) {
this->timer = (Random() & 0x7f) + 0x40;
this->timer = (Random() & 0x7f) + 64;
} else {
this->timer = 8;
}
@@ -269,10 +269,10 @@ void VaatiTransfiguredType0Action3(Entity* this) {
if (uVar4 != 1)
break;
this->field_0x80.HALF.LO = 1;
this->timer = 0xc0;
this->timer = 192;
COLLISION_ON(this);
SoundReq(SFX_14C);
InitScreenShake(0x14, 4);
InitScreenShake(20, 4);
break;
case 1:
if (--this->timer == 0) {
@@ -293,7 +293,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
this->animationState++;
if (this->animationState > 2) {
this->action = 7;
this->timer = 0xe0;
this->timer = 224;
DeleteClones();
SoundReq(SFX_BOSS_HIT);
return;
@@ -304,10 +304,10 @@ void VaatiTransfiguredType0Action3(Entity* this) {
this->child->field_0x74.HALF.LO = 0x10;
if (this->timer) {
this->field_0x80.HALF.LO = 3;
this->timer = 0x40;
this->timer = 64;
} else {
this->field_0x80.HALF.LO = 4;
this->timer = 0x50;
this->timer = 80;
}
break;
case 3:
@@ -315,19 +315,19 @@ void VaatiTransfiguredType0Action3(Entity* this) {
if (--this->timer == 0) {
COLLISION_OFF(this);
this->zVelocity = Q_16_16(3.5);
this->subtimer = 0x10;
this->subtimer = 16;
}
break;
}
if (GravityUpdate(this, Q_8_8(40.0)) == 0) {
this->field_0x80.HALF.LO = 5;
this->timer = 0x10;
this->timer = 16;
COLLISION_ON(this);
this->health = 0xff;
this->field_0x86.HALF.LO = 0;
sub_080408EC(this);
SoundReq(SFX_14C);
InitScreenShake(0x1e, 4);
InitScreenShake(30, 4);
} else {
if (this->subtimer != 0) {
if (--this->subtimer == 0) {
@@ -343,7 +343,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
case 4:
if (--this->timer == 0) {
this->field_0x80.HALF.LO = 5;
this->timer = 0x10;
this->timer = 16;
this->field_0x86.HALF.LO = 0;
sub_080408EC(this);
} else {
@@ -378,7 +378,7 @@ void VaatiTransfiguredType0Action4(Entity* this) {
if (--this->timer == 0) {
this->field_0x80.HALF.LO += 1;
this->field_0x74.HALF.LO = 0;
this->timer = 0x80;
this->timer = 128;
this->subtimer = 0;
this->zVelocity = Q_16_16(2.25);
SoundReq(SFX_12B);
@@ -405,7 +405,7 @@ void VaatiTransfiguredType0Action4(Entity* this) {
this->subtimer = 1;
}
SoundReq(SFX_14C);
InitScreenShake(0x1e, 4);
InitScreenShake(30, 4);
break;
case 2:
if (--this->timer == 0) {
@@ -416,7 +416,7 @@ void VaatiTransfiguredType0Action4(Entity* this) {
CreateProjectileWithParent(this, V2_PROJECTILE, this->subtimer);
}
if (((this->subtimer != 0) && (1 < this->animationState)) && (this->timer < 6)) {
this->timer = 0x80;
this->timer = 128;
this->subtimer = 0;
}
}
@@ -445,9 +445,9 @@ void VaatiTransfiguredType0Action5(Entity* this) {
case 0:
if (--this->timer == 0) {
this->field_0x80.HALF.LO += 1;
this->timer = 0x40;
this->timer = 64;
if (1 < this->animationState) {
this->timer = 0x80;
this->timer = 128;
this->subtimer = 1;
}
}
@@ -462,7 +462,7 @@ void VaatiTransfiguredType0Action5(Entity* this) {
CreateProjectileWithParent(this, V2_PROJECTILE, this->subtimer);
}
if (this->timer < 6) {
this->timer = 0x40;
this->timer = 64;
this->subtimer = 0;
}
} else {
@@ -498,7 +498,7 @@ void VaatiTransfiguredType0Action6(Entity* this) {
case 0:
if (--this->timer == 0) {
this->field_0x80.HALF.LO += 1;
this->timer = 0x80;
this->timer = 128;
if (1 < this->animationState) {
this->subtimer = 1;
}
@@ -514,7 +514,7 @@ void VaatiTransfiguredType0Action6(Entity* this) {
CreateProjectileWithParent(this, V2_PROJECTILE, this->subtimer);
}
if (this->timer < 6) {
this->timer = 0x80;
this->timer = 128;
this->subtimer = 0;
}
} else {
@@ -634,7 +634,7 @@ void VaatiTransfiguredType2Action0(Entity* this) {
sub_08040648(this, 2, 2);
this->action = 1;
this->timer = 0;
this->subtimer = (Random() & 0x7f) + 0x17;
this->subtimer = (Random() & 0x7f) + 23;
this->field_0x74.HALF.LO = 0;
InitAnimationForceUpdate(this, 0);
}
@@ -667,7 +667,7 @@ void VaatiTransfiguredType2Action1(Entity* this) {
switch (this->field_0x74.HALF.LO) {
case 0:
if (--this->subtimer == 0) {
this->subtimer = (Random() & 0x7f) + 0x27;
this->subtimer = (Random() & 0x7f) + 39;
if ((this->subtimer & 1) != 0) {
this->field_0x74.HALF.LO = 1;
InitAnimationForceUpdate(this, 8);
@@ -677,19 +677,19 @@ void VaatiTransfiguredType2Action1(Entity* this) {
case 1:
if ((this->frame & ANIM_DONE) != 0) {
this->field_0x74.HALF.LO = 0;
this->subtimer = (Random() & 0x7f) + 0x17;
this->subtimer = (Random() & 0x7f) + 23;
InitAnimationForceUpdate(this, 0);
}
break;
case 0x10:
InitAnimationForceUpdate(this, 7);
this->field_0x74.HALF.LO = 0x11;
this->subtimer = 0x50;
this->subtimer = 80;
break;
case 0x11:
if (--this->subtimer == 0) {
this->field_0x74.HALF.LO = 1;
this->subtimer = 0x30;
this->subtimer = 48;
InitAnimationForceUpdate(this, 8);
}
}
@@ -1075,7 +1075,7 @@ void sub_080409B0(Entity* this) {
}
} else {
if (((this->contactFlags & 0x80) != 0) && (0 < this->iframes)) {
InitScreenShake(0xc, 1);
InitScreenShake(12, 1);
SoundReq(SFX_BOSS_HIT);
}
if ((this->contactFlags == 0x8a) && (gPlayerState.chargeState.action == 5)) {
+1 -1
View File
@@ -188,7 +188,7 @@ void VaatiTransfiguredEyeFunction0Action4(Entity* this) {
sub_08045A28(this);
if (this->subtimer == 0) {
if ((this->frame & ANIM_DONE) != 0) {
this->subtimer = 0x20;
this->subtimer = 32;
}
} else {
parent = this->parent;
+14 -14
View File
@@ -134,7 +134,7 @@ void VaatiWrathType0Action0(Entity* this) {
this->subAction = 1;
} else {
this->action = 2;
this->timer = 0x3c;
this->timer = 60;
}
this->x.HALF.HI = gRoomTransition.hurtType;
this->y.HALF.HI = gRoomTransition.field_0x42;
@@ -185,7 +185,7 @@ void VaatiWrathType0Action1(Entity* this) {
return;
}
this->subAction = 3;
this->timer = 0x3c;
this->timer = 60;
}
break;
case 3:
@@ -215,7 +215,7 @@ void VaatiWrathType0Action1(Entity* this) {
case 5:
sub_08042004(this);
this->subAction = 6;
this->timer = 0x1e;
this->timer = 30;
gRoomTransition.field_0x38 |= 1;
gRoomControls.camera_target = &gPlayerEntity;
gPlayerState.controlMode = CONTROL_1;
@@ -226,7 +226,7 @@ void VaatiWrathType0Action1(Entity* this) {
return;
}
this->action = 2;
this->timer = 0x3c;
this->timer = 60;
break;
}
}
@@ -333,13 +333,13 @@ void VaatiWrathType0Action5(Entity* this) {
((VaatiWrathHeapStruct*)this->myHeap)->object5b = object;
gRoomControls.camera_target = object;
this->action = 6;
this->timer = 0x1e;
this->timer = 30;
((VaatiWrathHeapStruct*)this->myHeap)->type1->subAction = 1;
InitializeAnimation(((VaatiWrathHeapStruct*)this->myHeap)->type1, 0xe);
}
} else {
this->action = 2;
this->timer = 0x3c;
this->timer = 60;
}
}
}
@@ -403,7 +403,7 @@ void VaatiWrathType0Action8(Entity* this) {
}
if (--this->timer == 0) {
this->action = 9;
this->timer = 0x3c;
this->timer = 60;
} else {
if (this->timer < 0x1e) {
this->speed -= 0xc;
@@ -431,7 +431,7 @@ void VaatiWrathType0Action9(Entity* this) {
((VaatiWrathHeapStruct*)this->myHeap)->eyes[3]->timer = 1;
} else {
this->action = 7;
this->timer = 0x1e;
this->timer = 30;
this->field_0x78.HALF.HI = 0;
}
}
@@ -475,10 +475,10 @@ void VaatiWrathType0ActionB(Entity* this) {
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2);
if (GravityUpdate(this, Q_8_8(32.0)) == 0) {
this->subAction = 1;
this->timer = 0xf0;
this->timer = 240;
this->health = 8;
this->hitType = 0x38;
InitScreenShake(0x14, 0);
InitScreenShake(20, 0);
InitAnimationForceUpdate(this, 6);
InitializeAnimation(((VaatiWrathHeapStruct*)this->myHeap)->type2, 0x16);
}
@@ -488,7 +488,7 @@ void VaatiWrathType0ActionB(Entity* this) {
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2);
if (--this->timer == 0) {
this->subAction = 2;
this->timer = 0x3c;
this->timer = 60;
this->hitType = 0x39;
this->health = 0xff;
}
@@ -622,7 +622,7 @@ void sub_08041CD0(Entity* this) {
this->timer--;
} else {
this->subAction = 2;
this->timer = 0x3c;
this->timer = 60;
MessageFromTarget(TEXT_INDEX(TEXT_VAATI2, 0x51));
}
} else {
@@ -645,7 +645,7 @@ void sub_08041D14(Entity* this) {
pEVar1 = CreateObject(OBJECT_B6, 1, 0);
pEVar1->parent = this;
this->subAction = 3;
this->timer = 0x96;
this->timer = 150;
this->subtimer = 0;
this->spriteSettings.draw = 0;
SoundReq(SFX_1C4);
@@ -685,7 +685,7 @@ void sub_08041E20(Entity* this) {
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2);
if (gFadeControl.active == 0) {
this->subAction = 5;
this->timer = 0x5a;
this->timer = 90;
}
}
+4 -4
View File
@@ -92,7 +92,7 @@ void VaatiWrathEyeAction3(Entity* this) {
this->z.HALF.HI = this->parent->z.HALF.HI;
if ((this->x.HALF.HI == x) && (this->y.HALF.HI == y)) {
this->action = 4;
this->timer = 0x3c;
this->timer = 60;
}
}
}
@@ -118,7 +118,7 @@ void VaatiWrathEyeAction5(Entity* this) {
if (this->parent->health >= 0x15) {
this->timer = 120;
} else {
this->timer = 0x3c;
this->timer = 60;
}
this->child = NULL;
InitializeAnimation(this, 5);
@@ -160,7 +160,7 @@ void VaatiWrathEyeAction7(Entity* this) {
GetNextFrame(this);
if (this->subtimer != 0) {
this->action = 8;
this->timer = 0x3c;
this->timer = 60;
COLLISION_OFF(this);
this->spriteSettings.draw = 0;
CreateFx(this, FX_REFLECT2, 0x40);
@@ -177,7 +177,7 @@ void VaatiWrathEyeAction7(Entity* this) {
void VaatiWrathEyeAction8(Entity* this) {
if (this->parent->action == 0xb) {
this->timer = 0x3c;
this->timer = 60;
} else {
if (--this->timer == 0) {
this->action = 9;
+3 -3
View File
@@ -74,7 +74,7 @@ void sub_0802A534(Entity* this) {
Entity* ent = sub_08049DF4(1);
if (ent != NULL) {
this->action = 2;
this->timer = 0x5a;
this->timer = 90;
COLLISION_ON(this);
this->spriteSettings.draw = 3;
this->x.HALF.HI = ent->x.HALF.HI;
@@ -115,7 +115,7 @@ void sub_0802A610(Entity* this) {
flags = this->frame & ANIM_DONE;
if (flags) {
this->action = 4;
this->timer = 0x1e;
this->timer = 30;
} else if (this->frame & 1) {
this->frame = flags;
this->hitType = 0x75;
@@ -157,7 +157,7 @@ void sub_0802A69C(Entity* this) {
flags = this->frame & ANIM_DONE;
if (flags) {
this->action = 6;
this->timer = 0x1e;
this->timer = 30;
} else if (this->frame & 0x1) {
this->frame = flags;
this->spriteOffsetY = 3;
+1 -1
View File
@@ -73,7 +73,7 @@ void Wisp_OnCollision(Entity* this) {
ent = CreateFx(this, FX_DEATH, 0);
if (ent != NULL) {
this->child = ent;
this->timer = 0xe;
this->timer = 14;
CopyPosition(this, ent);
}
DeleteThisEntity();
+10 -10
View File
@@ -40,8 +40,8 @@ void WizzrobeFire_Init(WizzrobeEntity* this) {
super->action = 1;
this->timer2 = 0xff;
this->timer1 = 0x28;
super->timer = 0x28;
super->subtimer = 0x60;
super->timer = 40;
super->subtimer = 96;
sub_0802F888(this);
projectile = CreateProjectileWithParent(super, FIRE_PROJECTILE, 0);
if (projectile != NULL) {
@@ -64,8 +64,8 @@ void WizzrobeFire_Action1(WizzrobeEntity* this) {
break;
case 0:
if (--super->timer == 0) {
this->timer2 += 1;
super->timer = 0x0e;
this->timer2++;
super->timer = 14;
super->flags |= 0x80;
}
break;
@@ -73,7 +73,7 @@ void WizzrobeFire_Action1(WizzrobeEntity* this) {
if (--super->timer == 0) {
super->action = 2;
this->timer2 = 0;
super->timer = 0x20;
super->timer = 32;
tmp = super->direction >> 3;
child = super->child;
child->timer = 1;
@@ -92,8 +92,8 @@ void WizzrobeFire_Action2(WizzrobeEntity* this) {
case 0:
switch (--super->timer) {
case 0:
this->timer2 += 1;
super->timer = 0x38;
this->timer2++;
super->timer = 56;
super->subtimer = 0;
super->child->spriteSettings.draw = 0;
break;
@@ -111,7 +111,7 @@ void WizzrobeFire_Action2(WizzrobeEntity* this) {
if (--super->timer == 0) {
this->timer2++;
this->timer1 = 0x28;
super->timer = 0x28;
super->timer = 40;
super->subtimer = 0;
super->flags &= 0x7f;
SetTile(this->tileIndex, this->tilePosition, super->collisionLayer);
@@ -123,7 +123,7 @@ void WizzrobeFire_Action2(WizzrobeEntity* this) {
case 2:
if (--super->timer == 0) {
this->timer2++;
super->timer = (Random() & 0x3f) + 0x1c;
super->timer = (Random() & 0x3f) + 28;
super->spriteSettings.draw = 0;
}
break;
@@ -132,7 +132,7 @@ void WizzrobeFire_Action2(WizzrobeEntity* this) {
super->action = 1;
this->timer2 = 0;
this->timer1 = 0x28;
super->timer = 0x28;
super->timer = 40;
EnqueueSFX(SFX_156);
sub_0802F8E4(this);
InitializeAnimation(super, super->direction >> 3);
+8 -8
View File
@@ -49,8 +49,8 @@ void WizzrobeIce_Init(WizzrobeEntity* this) {
super->action = 1;
this->timer2 = 0xff;
this->timer1 = 0x28;
super->timer = 0x28;
super->subtimer = 0x60;
super->timer = 40;
super->subtimer = 96;
sub_0802F888(this);
projectile = CreateProjectileWithParent(super, ICE_PROJECTILE, 0);
if (projectile != NULL) {
@@ -73,7 +73,7 @@ void WizzrobeIce_Action1(WizzrobeEntity* this) {
case 0:
if (--super->timer == 0) {
this->timer2++;
super->timer = 0xc;
super->timer = 12;
super->flags |= 0x80;
}
@@ -82,7 +82,7 @@ void WizzrobeIce_Action1(WizzrobeEntity* this) {
if (--super->timer == 0) {
super->action = 2;
this->timer2 = 0;
super->timer = 0x20;
super->timer = 32;
tmp = super->direction >> 3;
child = super->child;
child->timer = 1;
@@ -100,7 +100,7 @@ void WizzrobeIce_Action2(WizzrobeEntity* this) {
switch (--super->timer) {
case 0:
this->timer2 += 1;
super->timer = 0x38;
super->timer = 56;
super->subtimer = 0;
super->child->spriteSettings.draw = 0;
break;
@@ -118,7 +118,7 @@ void WizzrobeIce_Action2(WizzrobeEntity* this) {
if (--super->timer == 0) {
this->timer2++;
this->timer1 = 0x28;
super->timer = 0x28;
super->timer = 40;
super->subtimer = 0;
super->flags &= 0x7f;
SetTile(this->tileIndex, this->tilePosition, super->collisionLayer);
@@ -129,7 +129,7 @@ void WizzrobeIce_Action2(WizzrobeEntity* this) {
case 2:
if (--super->timer == 0) {
this->timer2++;
super->timer = (Random() & 0x3f) + 0x18;
super->timer = (Random() & 0x3f) + 24;
super->spriteSettings.draw = 0;
}
break;
@@ -138,7 +138,7 @@ void WizzrobeIce_Action2(WizzrobeEntity* this) {
super->action = 1;
this->timer2 = 0;
this->timer1 = 0x28;
super->timer = 0x28;
super->timer = 40;
EnqueueSFX(SFX_156);
sub_0802F8E4(this);
InitializeAnimation(super, super->direction >> 3);
+11 -11
View File
@@ -65,8 +65,8 @@ void WizzrobeWind_Init(WizzrobeEntity* this) {
super->action = 1;
this->timer2 = 0xff;
this->timer1 = 0x28;
super->timer = 0x28;
super->subtimer = 0x60;
super->timer = 40;
super->subtimer = 96;
sub_0802F888(this);
}
projectile = CreateProjectileWithParent(super, WIND_PROJECTILE, 0);
@@ -90,7 +90,7 @@ void WizzrobeWind_Action1(WizzrobeEntity* this) {
case 0:
if (--super->timer == 0) {
this->timer2++;
super->timer = 0x10;
super->timer = 16;
super->flags |= 0x80;
}
break;
@@ -98,7 +98,7 @@ void WizzrobeWind_Action1(WizzrobeEntity* this) {
if (--super->timer == 0) {
super->action = 2;
this->timer2 = 0;
super->timer = 0x28;
super->timer = 40;
tmp = super->direction >> 3;
parent = super->parent;
parent->timer = 1;
@@ -116,7 +116,7 @@ void WizzrobeWind_Action2(WizzrobeEntity* this) {
switch (--super->timer) {
case 0:
this->timer2++;
super->timer = 0x38;
super->timer = 56;
super->subtimer = 0;
super->parent->spriteSettings.draw = 0;
break;
@@ -134,7 +134,7 @@ void WizzrobeWind_Action2(WizzrobeEntity* this) {
if (--super->timer == 0) {
this->timer2++;
this->timer1 = 0x28;
super->timer = 0x28;
super->timer = 40;
super->subtimer = 0;
super->flags &= 0x7f;
EnqueueSFX(SFX_156);
@@ -145,7 +145,7 @@ void WizzrobeWind_Action2(WizzrobeEntity* this) {
case 2:
if (--super->timer == 0) {
this->timer2++;
super->timer = (Random() & 0x3f) + 0x20;
super->timer = (Random() & 0x3f) + 32;
super->spriteSettings.draw = 0;
}
break;
@@ -154,7 +154,7 @@ void WizzrobeWind_Action2(WizzrobeEntity* this) {
super->action = 1;
this->timer2 = 0;
this->timer1 = 0x28;
super->timer = 0x28;
super->timer = 40;
EnqueueSFX(SFX_156);
sub_0802F8E4(this);
InitializeAnimation(super, super->direction >> 3);
@@ -174,14 +174,14 @@ void WizzrobeWind_Action3(WizzrobeEntity* this) {
switch (this->timer2) {
case 0:
this->timer2 = 1;
super->timer = 0x40;
super->timer = 64;
break;
case 1:
if (--super->timer != 0) {
return;
}
this->timer2++;
super->timer = 0x28;
super->timer = 40;
parent->timer = 1;
parent->spriteSettings.draw = 1;
InitializeAnimation(super, super->animationState >> 1 | 4);
@@ -189,7 +189,7 @@ void WizzrobeWind_Action3(WizzrobeEntity* this) {
case 2:
if (--super->timer == 0) {
this->timer2++;
super->timer = (Random() & 0x1f) + 0x30;
super->timer = (Random() & 0x1f) + 48;
parent->spriteSettings.draw = 0;
InitializeAnimation(super, super->animationState >> 1);
} else if (super->timer == 8) {
+1 -1
View File
@@ -130,7 +130,7 @@ void CreateDeathFx(GenericEntity* parent, u32 parentId, u32 fixedItem) {
sub_08049CF4(&(parent->base));
gSave.unk50 += 1;
parent->base.gustJarState |= 2;
parent->base.timer = 0xff;
parent->base.timer = 255;
SetDefaultPriority(&(parent->base), 3);
deathFx2 = (DeathFxObject*)CreateObject(DEATH_FX, parent->base.id, 0);
if (deathFx2 != NULL) {
+6 -6
View File
@@ -632,7 +632,7 @@ void sub_08050C54(void) {
if (column_idx == 0) {
SoundReq(SONG_VOL_FADE_OUT);
}
gMenu.transitionTimer = 0xf;
gMenu.transitionTimer = 15;
SetMenuType(1);
SoundReq(SFX_TEXTBOX_SELECT);
break;
@@ -753,7 +753,7 @@ void sub_08050EB8(void) {
gMapDataBottomSpecial.unk4 = save->msg_speed;
gMapDataBottomSpecial.unk5 = save->brightness;
gMenu.column_idx = 0;
gMenu.transitionTimer = 0xff;
gMenu.transitionTimer = 255;
SetMenuType(1);
}
@@ -836,7 +836,7 @@ END_NONMATCH
void sub_08050FFC(void) {
switch (HandleSave(0)) {
case SAVE_ERROR:
gMenu.transitionTimer = 0x1e;
gMenu.transitionTimer = 30;
sub_0805194C(gMapDataBottomSpecial.unk6);
CreateDialogBox(9, 0);
case SAVE_OK:
@@ -908,7 +908,7 @@ void sub_080513C0(void) {
case -1:
sub_0805194C(gMapDataBottomSpecial.unk6);
CreateDialogBox(6, 0);
gMenu.transitionTimer = 0x1e;
gMenu.transitionTimer = 30;
gMenu.overlayType = 2;
break;
}
@@ -1121,7 +1121,7 @@ void sub_08051738(void) {
gGenericMenu.unk10.a[i] = val;
}
if (uVar3 == 0) {
gMenu.transitionTimer = 0x3c;
gMenu.transitionTimer = 60;
CreateDialogBox(1, 0);
SetMenuType(3);
} else {
@@ -1197,7 +1197,7 @@ void sub_08051874(void) {
case -1:
sub_0805194C(gMapDataBottomSpecial.unk7);
CreateDialogBox(3, 0);
gMenu.transitionTimer = 0x1e;
gMenu.transitionTimer = 30;
SetMenuType(3);
break;
}
+9 -9
View File
@@ -830,7 +830,7 @@ static void GameOver_TextMove(void) {
static void GameOver_Update(void) {
switch (gMenu.menuType) {
case 0x0:
gMenu.transitionTimer = 0x1e;
gMenu.transitionTimer = 30;
gMenu.field_0x3 = 0;
SetMenuType(1);
SetPopupState(1, 0);
@@ -1792,7 +1792,7 @@ void CutsceneMain_Init(void) {
void sub_080535AC(void) {
gMenu.overlayType = 1;
gMenu.transitionTimer = 0x78;
gMenu.transitionTimer = 120;
gUI.field_0x6 = 1;
gUpdateVisibleTiles = 1;
gScreen.lcd.displayControl &= 0xfeff;
@@ -1873,7 +1873,7 @@ void sub_0805373C(void) {
void sub_08053758(void) {
gMenu.overlayType = 1;
gMenu.transitionTimer = 0x78;
gMenu.transitionTimer = 120;
gMenu.field_0xa = 0x1e;
*((u8*)&gMenu + 0x10) = 0; // TODO
gUI.field_0x6 = 1;
@@ -1987,7 +1987,7 @@ void sub_080539F4(void) {
if (gFadeControl.active == 0) {
DispReset(1);
gMenu.overlayType++;
gMenu.transitionTimer = 0x3c;
gMenu.transitionTimer = 60;
}
}
@@ -2082,7 +2082,7 @@ void sub_08053C04(void) {
void sub_08053C20(void) {
gMenu.overlayType = 1;
gMenu.transitionTimer = 0x78;
gMenu.transitionTimer = 120;
gUpdateVisibleTiles = 1;
sub_08051FF0();
sub_0805B4D0(4);
@@ -2140,7 +2140,7 @@ void sub_08053D34(void) {
}
}
if (gFadeControl.active == 0) {
gMenu.transitionTimer = 0x78;
gMenu.transitionTimer = 120;
gMenu.overlayType++;
}
}
@@ -2164,7 +2164,7 @@ void sub_08053DB4(void) {
LoadRoomEntityList(*(EntityData**)ptr);
LoadRoomEntityList((EntityData*)GetRoomProperty(ptr[4], ptr[5], 1));
LoadRoomEntityList((EntityData*)GetRoomProperty(ptr[4], ptr[5], 2));
gMenu.transitionTimer = 0x78;
gMenu.transitionTimer = 120;
gMenu.overlayType++;
SetFadeInverted(0x10);
}
@@ -2184,7 +2184,7 @@ void sub_08053E74(void) {
const EntityData** ptr = gUnk_080FCFB8;
gMenu.field_0xc = (u8*)ptr;
LoadRoomEntityList((EntityData*)ptr[0]);
gMenu.transitionTimer = 0x78;
gMenu.transitionTimer = 120;
gMenu.field_0xa = 0x3c;
gMenu.overlayType++;
gScreen.lcd.displayControl &= 0xfeff;
@@ -2221,7 +2221,7 @@ void sub_08053F20(void) {
gRoomControls.scroll_x = (s8)ptr[10] + gRoomControls.scroll_x;
gRoomControls.scroll_y = (s8)ptr[0xb] + gRoomControls.scroll_y;
LoadRoomEntityList(*(EntityData**)ptr);
gMenu.transitionTimer = 0x78;
gMenu.transitionTimer = 120;
gMenu.field_0xa = 0x3c;
gMenu.overlayType++;
SetFadeInverted(8);
+2 -2
View File
@@ -45,14 +45,14 @@ void AngryStatueManager_Init(AngryStatueManager* this) {
objectData += 3;
}
super->action = 1;
super->subtimer = 0x3c;
super->subtimer = 60;
this->field_0x36 = 0;
}
}
void AngryStatueManager_Action1(AngryStatueManager* this) {
if (--super->subtimer == 0) {
super->subtimer = 0xb4;
super->subtimer = 180;
}
if (this->field_0x36 == 0xf) {
super->action = 2;
+1 -3
View File
@@ -53,11 +53,9 @@ void ArmosInteriorManager_Action1(ArmosInteriorManager* this) {
void ArmosInteriorManager_Action2(ArmosInteriorManager* this) {
static const u8 gUnk_08108D20[] = { 0x6F, 0x70, 0x71, 0x72, 0x71, 0x70 };
u8 bVar1;
int iVar2;
if (--super->timer == 0) {
super->timer = 0x14;
super->timer = 20;
if (++super->subtimer > 5) {
super->subtimer = 0;
+1 -1
View File
@@ -49,7 +49,7 @@ void BombableWallManager_Init(BombableWallManager* this) {
void BombableWallManager_Action1(BombableWallManager* this) {
if (sub_080B1AE0(this->tile, this->field_0x35) != 0x2e) {
super->action = 2;
super->timer = 0x5a;
super->timer = 90;
sub_0805C02C(this);
SetLocalFlag(this->field_0x3e);
}
+1 -1
View File
@@ -40,7 +40,7 @@ void BridgeManager_Init(BridgeManager* this) {
this->unk_2c = gUnk_08108034[tmp];
this->unk_2e = gUnk_08108034[tmp + 1];
this->unk_32 = ((super->type2 >> 2) & 0xF) + 1;
super->timer = 0x1C;
super->timer = 28;
super->subtimer = 0;
super->action = (super->type2 & 0x80) ? 2 : 1;
if (super->action != 2 || !CheckFlags(this->flags))
+2 -2
View File
@@ -42,7 +42,7 @@ void CameraTargetManager_Action1(CameraTargetManager* this) {
super->action = 2;
super->timer = this->field_0x35;
if (super->timer == 0) {
super->timer = 0x1e;
super->timer = 30;
}
super->parent = gRoomControls.camera_target;
object = CreateObject(OBJECT_69, 0, 0);
@@ -51,7 +51,7 @@ void CameraTargetManager_Action1(CameraTargetManager* this) {
object->y.HALF.HI = this->field_0x3a + gRoomControls.origin_y;
super->child = object;
gRoomControls.camera_target = object;
RequestPriorityDuration(object, 0x1e);
RequestPriorityDuration(object, 30);
}
}
}
+2 -2
View File
@@ -38,8 +38,8 @@ void sub_0805E140(EnterRoomTextboxManager* this) {
super->flags |= ENT_PERSIST;
super->action = 1;
this->unk_20 = gRoomControls.room;
super->timer = 0x78;
super->subtimer = 0x3c;
super->timer = 120;
super->subtimer = 60;
SetDefaultPriority((Entity*)this, PRIO_HIGHEST);
sub_0805E1F8(gUnk_08108DE8[gArea.locationIndex], AreaIsDungeon());
}
+1 -1
View File
@@ -32,7 +32,7 @@ void FloatingPlatformManager_Init(FloatingPlatformManager* this) {
while (*(u8*)entityData != 0xff) {
entity = LoadRoomEntity(entityData++);
entity->parent = (Entity*)this;
entity->timer = 0xff;
entity->timer = 255;
}
}
+1 -1
View File
@@ -19,7 +19,7 @@ void HyruleTownBellManager_Main(HyruleTownBellManager* this) {
if (super->action == 0) {
if (x < 0x20 && y < 0x20 && gPlayerEntity.z.HALF.HI < -0x18 && gPlayerState.framestate == PL_STATE_CAPE) {
super->action++;
super->timer = 0x5a;
super->timer = 90;
SoundReq(SFX_10A);
}
} else {
+4 -4
View File
@@ -32,7 +32,7 @@ void LightLevelSetManager_Main(Manager* this) {
void LightLevelSetManager_Type0(LightLevelSetManager* this) {
if (super->action == 0) {
super->action = 1;
super->subtimer = 0x1e;
super->subtimer = 30;
if (CheckFlags(this->field_0x3e) != 0) {
sub_0805BE94(this);
}
@@ -47,7 +47,7 @@ void LightLevelSetManager_Type1(LightLevelSetManager* this) {
switch (super->action) {
case 0:
super->action = 1;
super->subtimer = 0x1e;
super->subtimer = 30;
if (CheckFlags(this->field_0x3e) != 0) {
sub_0805BE70(this, 0x75);
super->action = 2;
@@ -55,14 +55,14 @@ void LightLevelSetManager_Type1(LightLevelSetManager* this) {
break;
case 1:
if (CheckFlags(this->field_0x3e) != 0 && --super->subtimer == 0) {
super->subtimer = 0x1e;
super->subtimer = 30;
sub_0805BEC4(this);
sub_0805BE70(this, 0x76);
}
break;
case 2:
if (CheckFlags(this->field_0x3e) == 0 && --super->subtimer == 0) {
super->subtimer = 0x1e;
super->subtimer = 30;
sub_0805BE70(this, 0x75);
}
break;
+1 -1
View File
@@ -62,7 +62,7 @@ void LightManager_Main(LightManager* this) {
sub_0801E154(uVar3);
this->unk20 = 0;
} else if ((gRoomTransition.frameCount & 3) == 0) {
super->subtimer += 0x10;
super->subtimer += 16;
sVar1 = gSineTable[super->subtimer];
this->unk20 = sVar1 >> 7;
sub_0801E154(uVar3 + this->unk20);
+3 -3
View File
@@ -155,7 +155,7 @@ void MiscManager_Type1(MiscManager* this) {
if (CheckFlags(this->unk_3e)) {
super->action = 2;
super->timer = 120;
RequestPriorityDuration((Entity*)this, 0xF0);
RequestPriorityDuration((Entity*)this, 240);
sub_08059064(this);
}
break;
@@ -245,8 +245,8 @@ void MiscManager_Type5(MiscManager* this) {
break;
case 1:
if (CheckFlags(this->unk_3e)) {
RequestPriorityDuration((Entity*)this, 0x4b);
super->timer = 0x2d;
RequestPriorityDuration((Entity*)this, 75);
super->timer = 45;
super->action++;
}
}
+1 -1
View File
@@ -33,7 +33,7 @@ void RainfallManager_Action1(RainfallManager* this) {
if (--super->timer == 0) {
Entity* waterDrop;
super->timer = 0xf;
super->timer = 15;
waterDrop = CreateEnemy(WATER_DROP, 0);
if (waterDrop != NULL) {
waterDrop->x.HALF.HI = gRoomControls.scroll_x + 0x78 + gUnk_08108C6C[Random() & 7];
+1 -1
View File
@@ -78,7 +78,7 @@ void sub_080588F8(RollingBarrelManager* this) {
case 0xa0:
case 0xf0:
this->unk_28 = this->unk_24.HALF.HI;
super->subtimer = 0x2D;
super->subtimer = 45;
SoundReq(SFX_BARREL_ROLL_STOP);
}
}
+2 -2
View File
@@ -49,7 +49,7 @@ void SecretManager_Type0_Init(SecretManager* this) {
}
super->action = 1;
if (super->timer == 0) {
super->timer = 0x1e;
super->timer = 30;
}
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
}
@@ -91,7 +91,7 @@ void SecretManager_Type1_Init(SecretManager* this) {
CheckFlags(this->field_0x3e);
super->action = 1;
if (super->timer == 0) {
super->timer = 0x1e;
super->timer = 30;
}
super->subtimer = super->timer;
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
+2 -2
View File
@@ -406,7 +406,7 @@ void sub_0805A89C(TempleOfDropletsManager* this) {
super->action = 1;
super->flags |= ENT_PERSIST;
super->timer = 8;
super->subtimer = 0x10;
super->subtimer = 16;
this->unk_21 = 0;
this->unk_22 = 0;
this->unk_20 = gRoomControls.room;
@@ -498,7 +498,7 @@ void sub_0805AA58(TempleOfDropletsManager* this) {
LoadPalettes(gUnk_085A97A0[this->unk_21].unk_00, 5, 1);
}
if (--super->subtimer == 0) {
super->subtimer = 0x10;
super->subtimer = 16;
this->unk_22 += 1;
this->unk_22 &= 0xF;
gScreen.controls.alphaBlend = gUnk_081085B8[this->unk_22];
+1 -1
View File
@@ -40,7 +40,7 @@ void TileChangeObserveManager_Init(TileChangeObserveManager* this) {
void TileChangeObserveManager_Action1(TileChangeObserveManager* this) {
if (this->initialTile != this->observedTile[0]) {
super->action++;
super->timer = 0xf;
super->timer = 15;
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ void TilePuzzleManager_Main(TilePuzzleManager* this) {
if (--super->timer == 0) {
super->action = SUCCEEDED;
// set up delay for setting the flag/playing the success sfx
super->timer = 0x40;
super->timer = 64;
}
break;
}
+3 -3
View File
@@ -47,11 +47,11 @@ void sub_0805DBF0(Vaati3InsideArmManager* this) {
sub_0805DC70();
} else {
if (this->field_0x20 == 0x78) {
InitScreenShake(0x78, 2);
InitScreenShake(120, 2);
} else if (this->field_0x20 == 0xd2) {
InitScreenShake(0x5a, 1);
InitScreenShake(90, 1);
} else if (this->field_0x20 == 0x12c) {
InitScreenShake(0x5a, 0);
InitScreenShake(90, 0);
}
if (this->field_0x20 < 0x78) {
+2 -2
View File
@@ -69,7 +69,7 @@ void Vaati3StartManager_Type0_Action1(Vaati3StartManager* this) {
if (distX * distX + distY * distY < 0x901) {
super->action = 2;
super->subAction = 0;
super->timer = 0x78;
super->timer = 120;
SetPlayerControl(2);
sub_08078B48();
object = CreateObject(OBJECT_64, 0, 0);
@@ -94,7 +94,7 @@ void Vaati3StartManager_Type0_Action2(Vaati3StartManager* this) {
} else {
if (--super->timer == 0) {
super->action = 3;
super->timer = 0x1e;
super->timer = 30;
MessageFromTarget(TEXT_INDEX(TEXT_VAATI2, 0x4f));
}
}
+4 -4
View File
@@ -83,7 +83,7 @@ void VaatiAppearingManager_Action1(VaatiAppearingManager* this) {
case 1:
if (--this->field_0x20 == 0x10) {
super->subAction = 2;
super->timer = 0x2d;
super->timer = 45;
}
break;
case 2:
@@ -94,7 +94,7 @@ void VaatiAppearingManager_Action1(VaatiAppearingManager* this) {
case 3:
if (--this->field_0x20 == 0) {
super->subAction = 4;
super->timer = 0x3c;
super->timer = 60;
}
break;
default:
@@ -110,14 +110,14 @@ void VaatiAppearingManager_Action2(VaatiAppearingManager* this) {
switch (super->subAction) {
case 0:
super->subAction = 1;
super->timer = 0x2d;
super->timer = 45;
this->field_0x20 = 1;
gScreen.lcd.displayControl |= DISPCNT_BG3_ON;
break;
case 1:
if (--super->timer == 0) {
super->subAction = 2;
super->timer = 0x14;
super->timer = 20;
}
break;
case 2:
+3 -3
View File
@@ -255,7 +255,7 @@ void KinstoneMenu_Type3_Overlay1(void) {
SetMenuType(4);
} else {
gMenu.overlayType = 2;
gMenu.transitionTimer = 0x14;
gMenu.transitionTimer = 20;
gScreen.lcd.displayControl |= 0x2000;
gScreen.controls.window0HorizontalDimensions = 0x6887;
gScreen.controls.window0VerticalDimensions = 0x405f;
@@ -313,7 +313,7 @@ void KinstoneMenu_Type5_Overlay0(void) {
SoundReq(SFX_TASK_COMPLETE);
MessageAtHeight(TEXT_INDEX(TEXT_WINDCRESTS, 0x2), 0xe);
gMenu.overlayType = 1;
gMenu.transitionTimer = 0x78;
gMenu.transitionTimer = 120;
}
void KinstoneMenu_Type5_Overlay1(void) {
@@ -331,7 +331,7 @@ void KinstoneMenu_Type5_Overlay2(void) {
} else {
gMenu.column_idx = 6;
gMenu.overlayType = 3;
gMenu.transitionTimer = 0x4f;
gMenu.transitionTimer = 79;
CreateObject(OBJECT_B3, 1, 0);
SoundReq(SFX_1CA);
}
+2 -2
View File
@@ -182,7 +182,7 @@ void sub_0806D1D0(Entity* this) {
this->spritePriority.b0 = 7;
this->spriteSettings.draw = 3;
this->frameIndex = 0;
this->timer = 0x1e;
this->timer = 30;
SetDefaultPriority(this, PRIO_MESSAGE);
}
@@ -190,7 +190,7 @@ void sub_0806D1D0(Entity* this) {
case 0:
default:
if (--this->timer == 0) {
this->timer = (Random() & 0x7f) + 0x30;
this->timer = (Random() & 0x7f) + 48;
this->subtimer = 8;
this->frameIndex = 1;
}

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