remove redundant unions

This commit is contained in:
theo3
2021-11-12 01:34:34 -08:00
parent f70c95f037
commit ecc8a1439d
257 changed files with 1894 additions and 1923 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ void Anju(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->animationState = this->actionDelay;
sub_0807DD50(this);
return;
@@ -39,7 +39,7 @@ void sub_0806C354(Entity* this) {
void Anju_Fusion(Entity* this) {
if (this->action == 0) {
this->action++;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 6);
} else {
UpdateAnimationSingleFrame(this);
+3 -3
View File
@@ -41,7 +41,7 @@ void sub_080632E0(Entity* this) {
if (LoadExtraSpriteData(this, &gUnk_0810C8D4) != 0) {
InitializeAnimation(this, 0);
sub_08078778(this);
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->action = 1;
}
}
@@ -68,7 +68,7 @@ void sub_0806336C(Entity* this) {
void sub_08063390(Entity* this) {
GetNextFrame(this);
if (this->frames.b.f3 != 0) {
if (this->frame & 0x80) {
this->action = 1;
InitializeAnimation(this, GetAnimationState(this));
sub_08078778(this);
@@ -87,7 +87,7 @@ s32 sub_080633C8(Entity* this) {
}
void Beedle_Head(Entity* this) {
SetExtraSpriteFrame(this, 0, this->frames.all & 0x3F);
SetExtraSpriteFrame(this, 0, this->frame & 0x3F);
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
+9 -9
View File
@@ -130,7 +130,7 @@ void sub_0806D1D0(Entity* this) {
this->spriteOrientation.flipY = 3;
this->spriteRendering.b3 = 3;
this->spritePriority.b0 = 7;
this->spriteSettings.b.draw = 3;
this->spriteSettings.draw = 3;
this->frameIndex = 0;
this->actionDelay = 0x1e;
sub_0805E3A0(this, 2);
@@ -154,7 +154,7 @@ void sub_0806D1D0(Entity* this) {
this->frameIndex = this->subAction;
break;
case 2:
this->spriteSettings.b.draw = 0;
this->spriteSettings.draw = 0;
break;
}
this->x.HALF.HI = this->parent->x.HALF.HI;
@@ -177,7 +177,7 @@ void sub_0806D274(Entity* this) {
sub_0805E3A0(this, 2);
npc = CreateNPC(0x4c, 3, 0);
if (npc != NULL) {
npc->attachedEntity = this;
npc->child = this;
}
}
switch (this->subAction) {
@@ -219,14 +219,14 @@ void sub_0806D348(Entity* this) {
this->spriteOrientation.flipY = 3;
this->spriteRendering.b3 = 3;
this->spritePriority.b0 = 6;
this->spriteSettings.b.draw = 0;
this->spriteSettings.draw = 0;
this->frameIndex = 5;
sub_0805E3A0(this, 2);
}
if (this->attachedEntity->frameIndex == 4) {
this->spriteSettings.b.draw = 3;
if (this->child->frameIndex == 4) {
this->spriteSettings.draw = 3;
} else {
this->spriteSettings.b.draw = 0;
this->spriteSettings.draw = 0;
}
this->x.HALF.HI = this->parent->x.HALF.HI;
this->y.HALF.HI = this->parent->y.HALF.HI;
@@ -249,7 +249,7 @@ void sub_0806D3C0(Entity* this) {
}
void sub_0806D40C(Entity* this) {
this->spriteSettings.b.flipX = 1;
this->spriteSettings.flipX = 1;
sub_0806D41C(this);
}
@@ -376,7 +376,7 @@ void sub_0806D70C(void) {
entity = FindEntity(7, 0x4c, 7, 1, 0);
if (entity != NULL) {
entity->subAction = 0;
entity->spriteSettings.b.draw = 3;
entity->spriteSettings.draw = 3;
}
}
+7 -7
View File
@@ -41,8 +41,8 @@ void BladeBrothers(Entity* this) {
gUnk_081115C0[this->action](this);
sub_0806ED78(this);
}
if ((this->frames.all & 1) != 0) {
this->frames.all &= 0xfe;
if ((this->frame & 1) != 0) {
this->frame &= 0xfe;
sub_08068BEC(this, 0);
}
}
@@ -114,7 +114,7 @@ void sub_08068ADC(Entity* this) {
void sub_08068AFC(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
sub_0807DD50(this);
@@ -388,14 +388,14 @@ void sub_08068F3C(Entity* this) {
void BladeBrothers_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 0;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 0;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 4);
} else {
UpdateAnimationSingleFrame(this);
}
if ((this->frames.all & 1) != 0) {
this->frames.all &= 0xfe;
if ((this->frame & 1) != 0) {
this->frame &= 0xfe;
sub_08068BEC(this, 0);
}
}
+3 -3
View File
@@ -26,7 +26,7 @@ void sub_08063544(Entity* this) {
void sub_0806355C(Entity* this) {
this->action = this->action + 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 4);
sub_08078778(this);
}
@@ -46,7 +46,7 @@ void sub_0806362C(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->field_0x68.HALF.HI = 0;
sub_0807DD64(this);
case 1:
@@ -84,7 +84,7 @@ void sub_080636F4(Entity* this) {
void Brocco_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->y.HALF.HI -= 4;
InitAnimationForceUpdate(this, 2);
} else {
+4 -4
View File
@@ -12,13 +12,13 @@ void Carlov(Entity* this) {
} else {
sub_0807DD94(this, 0);
}
if ((this->frames.all & 0x10) != 0) {
this->frames.all = this->frames.all & 0xef;
if ((this->frame & 0x10) != 0) {
this->frame = this->frame & 0xef;
EnqueueSFX(0x104);
sub_08080964(0x10, 0);
}
if ((this->frames.all & 0x20) != 0) {
this->frames.all = this->frames.all & 0xdf;
if ((this->frame & 0x20) != 0) {
this->frame = this->frame & 0xdf;
EnqueueSFX(0x7c);
}
}
+3 -3
View File
@@ -52,14 +52,14 @@ void Carpenter(Entity* this) {
void Carpenter_Head(Entity* this) {
if (this->type < 2) {
SetExtraSpriteFrame(this, 0, this->frames.all & 0xffffff7f);
SetExtraSpriteFrame(this, 0, this->frame & 0xffffff7f);
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetExtraSpriteFrame(this, 2, this->frameSpriteSettings & 0x3f);
SetSpriteSubEntryOffsetData1(this, 1, 0);
SetSpriteSubEntryOffsetData2(this, 1, 2);
sub_0807000C(this);
} else {
SetExtraSpriteFrame(this, 0, this->frames.all & 0xffffff7f);
SetExtraSpriteFrame(this, 0, this->frame & 0xffffff7f);
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
@@ -93,7 +93,7 @@ void Carpenter_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08110CA8[this->type * 4]) != 0) {
this->action = this->action + 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
InitializeAnimation(this, (u32)this->type * 8 + 2);
}
+3 -3
View File
@@ -26,14 +26,14 @@ void Maid_Head(Entity* this) {
u32 uVar2;
u32 uVar3;
uVar2 = this->frames.all & 0x7f;
uVar2 = this->frame & 0x7f;
uVar3 = this->frameIndex;
if (this->id == 0x16) {
if ((this->frames.all & 0x7f) != 0) {
if ((this->frame & 0x7f) != 0) {
uVar2 += 10;
}
} else {
if ((this->frames.all & 0x7f) != 0) {
if ((this->frame & 0x7f) != 0) {
uVar2 += 0x1a;
}
uVar3 += 0x10;
+1 -1
View File
@@ -123,7 +123,7 @@ ASM_FUNC("asm/non_matching/castorWildsStatue/sub_080676E0.inc",
void CastorWildsStatue_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->y.HALF.HI -= 0x18;
InitializeAnimation(this, 1);
sub_0801D2B4(this, 0x17b);
+25 -34
View File
@@ -62,7 +62,7 @@ void sub_080677EC(Entity* this) {
u8 bVar1;
u32 uVar2;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->direction = 8;
this->speed = 0x80;
this->field_0x3c = 7;
@@ -71,9 +71,9 @@ void sub_080677EC(Entity* this) {
this->flags2 = 1;
this->field_0x68.HALF.HI = 0xff;
if (this->x.HALF.HI < gPlayerEntity.x.HALF.HI) {
this->spriteSettings.b.flipX = 1;
this->spriteSettings.flipX = 1;
} else {
this->spriteSettings.b.flipX = 0;
this->spriteSettings.flipX = 0;
}
this->field_0x68.HALF.LO = sub_0801E99C(this);
@@ -105,11 +105,11 @@ void sub_080678AC(Entity* this) {
if (*psVar2 != 0) {
*psVar2 = *psVar2 - 1;
}
if ((this->frames.all == 1) && (*psVar2 == 0)) {
if ((this->frame == 1) && (*psVar2 == 0)) {
sub_08067AAC(this);
} else {
UpdateAnimationSingleFrame(this);
if ((this->frames.all & 0x80) != 0) {
if ((this->frame & 0x80) != 0) {
sub_08067B34(this);
}
}
@@ -130,12 +130,12 @@ void sub_08067904(Entity* this) {
if (this->direction == 8) {
if (this->x.HALF.HI > this->field_0x6e.HWORD) {
this->direction = 0x18;
this->spriteSettings.b.flipX = 0;
this->spriteSettings.flipX = 0;
}
} else {
if (this->x.HALF.HI < this->field_0x6c.HWORD) {
this->direction = 8;
this->spriteSettings.b.flipX = 1;
this->spriteSettings.flipX = 1;
}
}
sub_0806F69C(this);
@@ -144,7 +144,7 @@ void sub_08067904(Entity* this) {
void sub_0806797C(Entity* this) {
UpdateAnimationSingleFrame(this);
if (this->frames.b.f3 != 0) {
if (this->frame & 0x80) {
sub_08067B08(this);
}
}
@@ -173,7 +173,7 @@ void sub_08067A0C(Entity* this) {
u8 tmp;
UpdateAnimationSingleFrame(this);
if (this->frames.b.f3 != 0) {
if (this->frame & 0x80) {
if (sub_08067D20(this) != 0) {
sub_08067B80(this, 5);
this->actionDelay = this->actionDelay + 0x14;
@@ -181,10 +181,10 @@ void sub_08067A0C(Entity* this) {
sub_08067C24(this);
}
} else {
tmp = (this->frames.all & 7);
tmp = (this->frame & 7);
if (tmp != 0) {
COLLISION_ON(this);
this->hitbox = gUnk_08111154[tmp - 1 + ((this->spriteSettings.b.flipX << 2))];
this->hitbox = gUnk_08111154[tmp - 1 + ((this->spriteSettings.flipX << 2))];
} else {
sub_08067DDC(this);
}
@@ -193,7 +193,7 @@ void sub_08067A0C(Entity* this) {
void sub_08067A78(Entity* this) {
UpdateAnimationSingleFrame(this);
if (this->frames.b.f3 != 0) {
if (this->frame & 0x80) {
sub_08067AAC(this);
}
}
@@ -208,7 +208,7 @@ void sub_08067AAC(Entity* this) {
this->action = 2;
this->field_0x70.HALF.HI = gUnk_081110FC[(Random() & 3)];
this->spriteSettings.b.flipX = this->direction >> 4 ^ 1;
this->spriteSettings.flipX = this->direction >> 4 ^ 1;
sub_08067DCC(this, 3);
sub_08078850(this, 0, gUnk_0811110C[2], &gUnk_0811110F);
@@ -223,7 +223,7 @@ void sub_08067B08(Entity* this) {
void sub_08067B34(Entity* this) {
sub_08067DCC(this, 0);
this->frameDuration = (Random() & 0x30) + 0xb4;
sub_08078850(this, 0, gUnk_0811110C[this->spriteSettings.b.flipX], &gUnk_0811110F);
sub_08078850(this, 0, gUnk_0811110C[this->spriteSettings.flipX], &gUnk_0811110F);
}
void sub_08067B70(Entity* this) {
@@ -238,20 +238,20 @@ void sub_08067B80(Entity* this, u32 param) {
InitAnimationForceUpdate(this, param);
sub_08067DDC(this);
if (this->x.HALF.HI < gPlayerEntity.x.HALF.HI) {
this->spriteSettings.b.flipX = 1;
this->spriteSettings.flipX = 1;
} else {
this->spriteSettings.b.flipX = 0;
this->spriteSettings.flipX = 0;
}
}
void sub_08067BD4(Entity* this) {
if (this->spriteSettings.b.flipX > 0) {
if (this->spriteSettings.flipX > 0) {
if (this->x.HALF.HI - 4 > gPlayerEntity.x.HALF.HI) {
this->spriteSettings.b.flipX = 0;
this->spriteSettings.flipX = 0;
}
} else {
if (this->x.HALF.HI + 4 < gPlayerEntity.x.HALF.HI) {
this->spriteSettings.b.flipX = 1;
this->spriteSettings.flipX = 1;
}
}
}
@@ -299,10 +299,10 @@ void sub_08067C44(Entity* this) {
break;
case 3:
if (iVar4 == 1) {
this->spriteSettings.b.flipX = 1;
this->spriteSettings.flipX = 1;
} else {
if (this->spriteSettings.b.flipX == 3) { // TODO 3 ???
this->spriteSettings.b.flipX = 0;
if (this->spriteSettings.flipX == 3) { // TODO 3 ???
this->spriteSettings.flipX = 0;
}
}
if (iVar4 != 2) {
@@ -334,12 +334,7 @@ u32 sub_08067D20(Entity* this) {
} else {
entity = sub_08049DF4(2);
if (entity != NULL) {
tmp = this->spriteSettings.raw * 0x2000000; // TODO maybe convert to ternary?
iVar4 = 0x28;
if (tmp < 0) {
iVar4 = 0x10;
}
iVar4 = this->spriteSettings.flipX ? 0x10 : 0x28;
if (((u32)(entity->x.HALF.HI - (this->x.HALF.HI - iVar4)) < 0x31) &&
((((u32)entity->y.HALF.HI) - (this->y.HALF.HI - 4)) < 0x39)) {
return 1;
@@ -360,11 +355,7 @@ u32 sub_08067D74(Entity* this) {
}
entity = sub_08049DF4(2);
if (entity != NULL) {
tmp = (this->spriteSettings.raw * 0x2000000); // TODO convert to ternary?
iVar2 = 0x18;
if (tmp < 0) {
iVar2 = 8;
}
iVar2 = this->spriteSettings.flipX ? 0x8 : 0x18;
if ((((u32)(entity->x.HALF.HI - (this->x.HALF.HI - iVar2)) < 0x1f) &&
((u32)(entity->y.HALF.HI - this->y.HALF.HI) < 0x17)) &&
(this->actionDelay == 0)) {
@@ -390,7 +381,7 @@ void sub_08067DDC(Entity* this) {
void Cat_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 5);
} else {
UpdateAnimationSingleFrame(this);
+5 -5
View File
@@ -142,16 +142,16 @@ void sub_08069148(Entity* ent) {
}
void sub_08069168(Entity* ent) {
if ((s8)ent->frames.all < 0) {
if ((s8)ent->frame < 0) {
ent->subAction = 2;
InitAnimationForceUpdate(ent, ent->animationState + 12);
}
}
void sub_08069188(Entity* ent) {
if (ent->frames.b.f0 == 0)
if ((ent->frame & 1) == 0)
return;
ent->frames.all = 0;
ent->frame = 0;
if (((s8)--ent->field_0xf) != 0)
return;
@@ -160,7 +160,7 @@ void sub_08069188(Entity* ent) {
}
void sub_080691BC(Entity* ent) {
if ((s8)ent->frames.all < 0) {
if ((s8)ent->frame < 0) {
ent->action = 1;
ent->subAction = 0;
InitAnimationForceUpdate(ent, ent->animationState + 4);
@@ -219,7 +219,7 @@ void sub_0806924C(Entity* ent) {
void Cow_Fusion(Entity* ent) {
if (ent->action == 0) {
ent->action++;
ent->spriteSettings.b.draw = 1;
ent->spriteSettings.draw = 1;
InitAnimationForceUpdate(ent, 15);
} else {
UpdateAnimationSingleFrame(ent);
+1 -1
View File
@@ -79,7 +79,7 @@ ASM_FUNC("asm/non_matching/cucco/sub_0806E6A8.inc", void sub_0806E6A8(Entity* th
void Cucco_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 1);
} else {
UpdateAnimationSingleFrame(this);
+2 -2
View File
@@ -75,11 +75,11 @@ void sub_0806E884(Entity* this) {
void CuccoChick_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->frameIndex = 1;
} else {
if (sub_08003FC4(this, 0x3000) == 0) {
this->hVelocity = 0x10000;
this->zVelocity = 0x10000;
}
}
}
+2 -2
View File
@@ -15,7 +15,7 @@ void Dampe(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
sub_0807DD50(this);
return;
@@ -45,7 +45,7 @@ void sub_0806BE3C(Entity* this) {
void Dampe_Fusion(Entity* this) {
if (this->action == 0) {
this->action++;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 2);
} else {
UpdateAnimationSingleFrame(this);
+2 -2
View File
@@ -9,7 +9,7 @@ void Din(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
sub_0807DD50(this);
break;
case 1:
@@ -43,7 +43,7 @@ void sub_08064828(Entity* this) {
void Din_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 6);
} else {
UpdateAnimationSingleFrame(this);
+4 -4
View File
@@ -123,7 +123,7 @@ void sub_08069D00(Entity* this) {
this->field_0x6a.HALF.HI = 8;
sub_0806A028(this);
if (0x1f < this->animIndex) {
if ((this->frames.all & 0x80) == 0) {
if ((this->frame & 0x80) == 0) {
return;
}
this->field_0x6a.HALF.HI = 8;
@@ -201,7 +201,7 @@ void sub_08069E50(Entity* this) {
sub_0806A028(this);
UpdateAnimationSingleFrame(this);
if (this->animIndex > 0x1f) {
if ((this->frames.all & 0x80) == 0) {
if ((this->frame & 0x80) == 0) {
return;
}
this->field_0x6a.HALF.HI = 8;
@@ -252,7 +252,7 @@ u32 sub_08069EF0(Entity* this) {
void Dog_Head(Entity* this) {
u32 frame;
frame = this->frames.all & 0xffffff7f;
frame = this->frame & 0xffffff7f;
if (frame != 0) {
frame = frame + this->field_0x68.HWORD;
}
@@ -386,7 +386,7 @@ void Dog_Fusion(Entity* this) {
if (this->action == 0) {
if (sub_08069EF0(this) != 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
InitializeAnimation(this, 0x23);
}
+1 -1
View File
@@ -45,7 +45,7 @@ void sub_0806BFD8(Entity* this) {
}
void sub_0806C00C(Entity* this, ScriptExecutionContext* context) {
if ((this->frames.all & 0x80) != 0) {
if ((this->frame & 0x80) != 0) {
context->condition = 1;
} else {
context->condition = 0;
+2 -2
View File
@@ -20,7 +20,7 @@ void Epona(Entity* this) {
void sub_080659B8(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->animationState = 6;
this->field_0x68.HALF.HI = -1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
@@ -93,7 +93,7 @@ void sub_08065AA4(Entity* this) {
void Epona_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 7);
} else {
UpdateAnimationSingleFrame(this);
+5 -5
View File
@@ -28,7 +28,7 @@ void sub_0806D8A0(Entity* this, ScriptExecutionContext* context) {
context->postScriptActions |= 2;
context->condition = 0;
xOffset = 16;
if (this->spriteSettings.b.flipX) {
if (this->spriteSettings.flipX) {
xOffset = -xOffset;
}
xOffset += gPlayerEntity.x.HALF.HI;
@@ -48,9 +48,9 @@ void sub_0806D908(Entity* this) {
// called when talk to ezlo, also when ezlo moves after you
void sub_0806D944(Entity* this) {
this->spriteSettings.b.flipX = 0;
this->spriteSettings.flipX = 0;
if (this->x.WORD <= gPlayerEntity.x.WORD) {
this->spriteSettings.b.flipX = 1;
this->spriteSettings.flipX = 1;
}
}
@@ -65,9 +65,9 @@ void sub_0806D96C(Entity* this) {
void sub_0806D9A4(Entity* this) {
if (this->x.WORD <= gPlayerEntity.x.WORD) {
gPlayerEntity.spriteSettings.b.flipX = 0;
gPlayerEntity.spriteSettings.flipX = 0;
} else {
gPlayerEntity.spriteSettings.b.flipX = 1;
gPlayerEntity.spriteSettings.flipX = 1;
}
gPlayerEntity.animationState = 4;
}
+4 -4
View File
@@ -16,14 +16,14 @@ void sub_0806BC58(Entity* this) {
}
void Farmers_Head(Entity* this) {
SetExtraSpriteFrame(this, 0, this->frames.all & 0x7f);
SetExtraSpriteFrame(this, 0, this->frame & 0x7f);
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
}
void sub_0806BC94(Entity* this, ScriptExecutionContext* context) {
InitializeAnimation(this, context->intVariable + (BOOLCAST(this->spriteSettings.b.flipX) & 8U) +
InitializeAnimation(this, context->intVariable + (BOOLCAST(this->spriteSettings.flipX) & 8U) +
(this->animationState >> 1));
}
@@ -50,8 +50,8 @@ void Farmers_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08113140[this->type * 3]) != 0) {
this->action = this->action + 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.b.flipX = 0;
this->spriteSettings.draw = 1;
this->spriteSettings.flipX = 0;
sub_0806BC58(this);
InitAnimationForceUpdate(this, 3);
}
+2 -2
View File
@@ -11,7 +11,7 @@ void Farore(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
sub_0807DD50(this);
break;
case 1:
@@ -45,7 +45,7 @@ void sub_08064A28(Entity* this) {
void Farore_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 6);
} else {
UpdateAnimationSingleFrame(this);
+3 -3
View File
@@ -17,7 +17,7 @@ void Festari(Entity* this) {
void sub_0805FE10(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
sub_0805E3A0(this, 2);
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
@@ -52,7 +52,7 @@ void sub_0805FE48(Entity* this) {
}
UpdateAnimationSingleFrame(this);
if (this->frames.b.f3) {
if (this->frame & 0x80) {
switch (this->animIndex) {
case 8:
case 10:
@@ -112,7 +112,7 @@ void sub_0805FF2C(Entity* this, ScriptExecutionContext* context) {
void Festari_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
InitAnimationForceUpdate(this, 8);
} else {
+5 -5
View File
@@ -29,7 +29,7 @@ void ForestMinish(Entity* this) {
case 0:
if (LoadExtraSpriteData(this, &gUnk_0810A348)) {
this->action = 1;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
this->field_0x68.HALF.HI = this->animationState = this->actionDelay << 1;
this->actionDelay = 0;
sub_0805E3A0(this, 2);
@@ -65,8 +65,8 @@ void sub_08060090(Entity* this) {
void ForestMinish_Head(Entity* this) {
u32 pbVar1;
pbVar1 = this->frames.all;
if (this->frames.all != 0xff) {
pbVar1 = this->frame;
if (this->frame != 0xff) {
pbVar1 &= -0x81;
}
if ((this->frameSpriteSettings & 1) == 0) {
@@ -131,7 +131,7 @@ void sub_08060158(Entity* this) {
this->animationState = sub_0806F5B0(index);
}
tmp2 &= 0x7f;
this->frames.all = tmp1;
this->frame = tmp1;
this->frameIndex = tmp2;
this->frameSpriteSettings = 1;
this->animIndex = 0;
@@ -266,7 +266,7 @@ void ForestMinish_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_0810A348)) {
this->action++;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
sub_0805E3A0(this, 2);
InitializeAnimation(this, 6);
}
+2 -2
View File
@@ -9,7 +9,7 @@ void Gentari(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
sub_0805E3A0(this, 2);
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
@@ -35,7 +35,7 @@ void Gentari(Entity* this) {
void Gentari_Fusion(Entity* this) {
if (this->action == 0) {
this->action++;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
sub_0805E3A0(this, 2);
InitAnimationForceUpdate(this, 10);
} else {
+4 -4
View File
@@ -32,7 +32,7 @@ NONMATCH("asm/non_matching/ghostBrothers/sub_08065C0C.inc", void sub_08065C0C(En
switch (this->action) {
case 0:
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
sub_0807DD50(this);
break;
case 1:
@@ -65,7 +65,7 @@ NONMATCH("asm/non_matching/ghostBrothers/sub_08065C0C.inc", void sub_08065C0C(En
return;
}
this->spriteSettings.b.draw = 0;
this->spriteSettings.draw = 0;
this->action = 1;
break;
@@ -91,7 +91,7 @@ void sub_08065D18(Entity* this) {
this->action = 1;
this->actionDelay = 0x1e;
this->field_0xf = 0;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->spriteRendering.alphaBlend = 1;
*(u32**)&this->field_0x6c = &gUnk_08110188;
sub_0805E3A0(this, 2);
@@ -135,7 +135,7 @@ void sub_08065F64(Entity* this) {
void GhostBrothers_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 2);
} else {
UpdateAnimationSingleFrame(this);
+2 -2
View File
@@ -10,7 +10,7 @@ void Gina(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
@@ -40,7 +40,7 @@ void Gina(Entity* this) {
void Gina_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 2);
} else {
UpdateAnimationSingleFrame(this);
+1 -1
View File
@@ -131,7 +131,7 @@ void sub_08069ACC(Entity* this, ScriptExecutionContext* context) {
}
void Gorman_Head(Entity* this) {
SetExtraSpriteFrame(this, 0, (this->frames.all & 7) + 0xf);
SetExtraSpriteFrame(this, 0, (this->frame & 7) + 0xf);
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
+5 -5
View File
@@ -68,12 +68,12 @@ void sub_080693D0(Entity* this) {
u32 var0 = this->field_0x82.HWORD & 0xF;
bool32 createFx65 = BOOLCAST(var0); // = !var0
if (this->frames.all == 1) {
this->frames.all = 0;
if (this->frame == 1) {
this->frame = 0;
sub_08069428(this, 0xFFF80000, createFx65);
}
if (this->frames.all == 2) {
this->frames.all = 0;
if (this->frame == 2) {
this->frame = 0;
sub_08069428(this, 0x80 << 12, createFx65);
}
}
@@ -129,7 +129,7 @@ void sub_080694EC(Entity* this) {
void Goron_Fusion(Entity* this) {
if (this->action == 0) {
this->action++;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 2);
} else {
UpdateAnimationSingleFrame(this);
+1 -1
View File
@@ -69,7 +69,7 @@ void sub_0806961C(Entity* this) {
void sub_0806963C(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
sub_0807DD50(this);
}
+7 -7
View File
@@ -49,7 +49,7 @@ void sub_0806CB80(Entity* this) {
sub_0805E3A0(this, 2);
}
if (this->parent != NULL) {
this->frameIndex = (this->parent->frames.all & 3) + 0x21;
this->frameIndex = (this->parent->frame & 3) + 0x21;
}
}
@@ -62,9 +62,9 @@ void sub_0806CBB4(Entity* this) {
}
GetNextFrame(this);
if (this->parent != NULL) {
this->spriteSettings.b.draw = 0;
if ((this->parent->frames.all & 4) != 0) {
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 0;
if ((this->parent->frame & 4) != 0) {
this->spriteSettings.draw = 1;
}
}
}
@@ -73,7 +73,7 @@ void sub_0806CC08(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
sub_0807DD64(this);
case 1:
@@ -100,7 +100,7 @@ void sub_0806CC08(Entity* this) {
}
void sub_0806CCB4(Entity* this, ScriptExecutionContext* context) {
if ((this->frames.all & 0x80) != 0) {
if ((this->frame & 0x80) != 0) {
context->condition = 1;
} else {
context->condition = 0;
@@ -153,7 +153,7 @@ void sub_0806CD58(Entity* this) {
void Gregal_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
InitAnimationForceUpdate(this, 6);
} else {
+1 -1
View File
@@ -173,7 +173,7 @@ void Guard_Head(Entity* this) {
u32 uVar4;
u32 pbVar5;
uVar2 = this->frames.all & 0x3f;
uVar2 = this->frame & 0x3f;
pbVar5 = (this->frameIndex & 0x3f);
uVar4 = this->frameSpriteSettings & 0x3f;
if (this->id == 0x15) {
+2 -2
View File
@@ -52,7 +52,7 @@ void HurdyGurdyMan(Entity* this) {
}
void HurdyGurdyMan_Head(Entity* this) {
SetExtraSpriteFrame(this, 0, (this->frames.all & 0xffffff7f) + 8);
SetExtraSpriteFrame(this, 0, (this->frame & 0xffffff7f) + 8);
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
@@ -78,7 +78,7 @@ void HurdyGurdyMan_Fusion(Entity* this) {
uVar1 = LoadExtraSpriteData(this, &gUnk_081144F0);
if (uVar1 != 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
InitializeAnimation(this, 10);
}
+3 -3
View File
@@ -174,7 +174,7 @@ NONMATCH("asm/non_matching/kid/sub_0806252C.inc", void sub_0806252C(Entity* this
s32 iVar11;
uVar4 = gPlayerState.field_0xa8;
uVar3 = gPlayerEntity.height.HALF.HI;
uVar3 = gPlayerEntity.z.HALF.HI;
sVar2 = gPlayerEntity.y.HALF.HI;
sVar1 = gPlayerEntity.x.HALF.HI;
r0 = gPlayerEntity.y.HALF.HI - this->y.HALF.HI;
@@ -291,7 +291,7 @@ NONMATCH("asm/non_matching/kid/Kid_Head.inc", void Kid_Head(Entity* this)) {
u32 uVar4;
iVar1 = (u32)this->type * 4;
uVar3 = ((u8)this->frames.all & 0x1f) + (u32)gUnk_0810C0A0[iVar1];
uVar3 = ((u8)this->frame & 0x1f) + (u32)gUnk_0810C0A0[iVar1];
uVar4 = (this->frameIndex & 0x1f) + (u32)gUnk_0810C0A0[iVar1 + 1];
switch (this->type) {
case 0:
@@ -416,7 +416,7 @@ void Kid_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, gUnk_0810BDC4[this->type]) != 0) {
this->action = this->action + 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->y.HALF.HI = this->y.HALF.HI + -8;
tmp = 6;
if (this->type == 6) {
+3 -3
View File
@@ -27,7 +27,7 @@ void KingDaltus(Entity* this) {
void sub_08066654(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
InitAnimationForceUpdate(this, 2);
@@ -60,7 +60,7 @@ void sub_080666DC(Entity* this) {
void sub_080666E4(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_0807DD50(this);
}
@@ -96,7 +96,7 @@ void sub_0806673C(Entity* this) {
void KingDaltus_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 6);
} else {
UpdateAnimationSingleFrame(this);
+2 -2
View File
@@ -16,12 +16,12 @@ void KingGustaf(Entity* this) {
gScreen.controls.layerFXControl = 0x3f40;
gScreen.controls.alphaBlend = 0x1000;
this->speed = 0x1000;
this->hVelocity = 0;
this->zVelocity = 0;
} else {
sub_0807DD94(this, 0);
speed = 0x100;
speed *= this->speed;
speed += this->hVelocity;
speed += this->zVelocity;
speed >>= 0x10;
if (speed > 0x10) {
speed = 0x10;
+2 -2
View File
@@ -12,7 +12,7 @@ void Librari(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
this->animationState = this->actionDelay;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
@@ -88,7 +88,7 @@ void sub_0806B2B4(Entity* this) {
void Librari_Fusion(Entity* this) {
if (this->action == 0) {
this->action++;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
InitAnimationForceUpdate(this, 9);
} else {
UpdateAnimationSingleFrame(this);
+3 -3
View File
@@ -40,7 +40,7 @@ void sub_08063220(Entity* this) {
void sub_08063254(Entity* this, u32 unused) {
sub_08063280(this, unused);
if ((this->frames.all & 0x80) != 0) {
if ((this->frame & 0x80) != 0) {
this->action = 3;
MessageFromTarget(0);
}
@@ -56,8 +56,8 @@ void sub_08063280(Entity* this, u32 unused) {
e = this;
UpdateAnimationSingleFrame(e);
var = e->frames.all & 0x7F;
e->frames.all ^= var;
var = e->frame & 0x7F;
e->frame ^= var;
if (var == 2)
CreateFx(e, FX_MAILBOX_UNUSED, 0);
}
+3 -3
View File
@@ -20,7 +20,7 @@ void Malon(Entity* this) {
void sub_08065864(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 0xC);
}
@@ -30,7 +30,7 @@ void sub_08065880(Entity* this) {
void sub_08065888(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->animationState = 4;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
@@ -72,7 +72,7 @@ void sub_08065914(Entity* this) {
void Malon_Fusion(Entity* this) {
if (this->action == 0) {
this->action++;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 0xC);
} else {
UpdateAnimationSingleFrame(this);
+4 -4
View File
@@ -15,7 +15,7 @@ void Mama(Entity* this) {
case 0:
if (sub_0806C454(this) != 0) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->animationState = this->actionDelay;
this->field_0x68.HALF.HI = 0;
sub_0807DD50(this);
@@ -54,7 +54,7 @@ bool32 sub_0806C454(Entity* this) {
}
void Mama_Head(Entity* this) {
SetExtraSpriteFrame(this, 0, this->frames.all & 0x7f);
SetExtraSpriteFrame(this, 0, this->frame & 0x7f);
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
@@ -62,7 +62,7 @@ void Mama_Head(Entity* this) {
void sub_0806C4A8(Entity* this, ScriptExecutionContext* context) {
s32 tmp;
if ((this->frames.all & 0x80) != 0) {
if ((this->frame & 0x80) != 0) {
tmp = GetAnimationState(this);
if (tmp < 0) {
tmp = 3;
@@ -88,7 +88,7 @@ void Mama_Fusion(Entity* this) {
if (this->action == 0) {
if (sub_0806C454(this) != 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->y.HALF.HI -= 4;
InitializeAnimation(this, 2);
}
+1 -1
View File
@@ -83,7 +83,7 @@ void sub_0806CE80(Entity* this) {
void MayorHagen_Fusion(Entity* this) {
if (this->action == 0) {
this->action++;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 8);
} else {
UpdateAnimationSingleFrame(this);
+6 -6
View File
@@ -63,7 +63,7 @@ void sub_08068780(Entity* this) {
return;
}
this->action = 1;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
this->animationState = this->type;
sub_0805E3A0(this, 2);
sub_0807DD50(this);
@@ -85,8 +85,8 @@ void sub_08068780(Entity* this) {
}
}
if ((this->frames.b.f2) != 0) {
this->frames.all &= 0xbf;
if (this->frame & 0x40) {
this->frame &= 0xbf;
if (sub_080040A8(this) == 0) {
SoundReq(gUnk_0811153E[(s32)Random() % 3]);
} else {
@@ -107,7 +107,7 @@ void sub_08068884(Entity* this) {
void Melari_Head(Entity* this) {
u32 bVar1;
bVar1 = this->frames.all;
bVar1 = this->frame;
bVar1 &= -0xc1;
SetExtraSpriteFrame(this, 1, this->frameIndex);
if ((bVar1 & 0x20) != 0) {
@@ -129,7 +129,7 @@ void sub_08068910(Entity* this) {
this->actionDelay--;
} else {
this->actionDelay = 0x10;
if ((this->frames.all & 0x20) != 0) {
if ((this->frame & 0x20) != 0) {
iVar1 = sub_0806EDD8(this, 0x30, 0x30);
if (iVar1 < 0) {
iVar1 = 0x10;
@@ -150,7 +150,7 @@ void Melari_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08111520)) {
this->action++;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
InitializeAnimation(this, 6);
}
} else {
+1 -1
View File
@@ -11,7 +11,7 @@ void MilkCart(Entity* ent) {
void sub_08065B6C(Entity* ent) {
ent->action++;
ent->spriteSettings.b.draw = 1;
ent->spriteSettings.draw = 1;
ent->y.HALF.LO += -0x8000;
ent->animationState = 6;
InitAnimationForceUpdate(ent, 3);
+3 -3
View File
@@ -21,7 +21,7 @@ void MinisterPotho(Entity* this) {
void sub_080667E4(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 2);
sub_08078778(this);
}
@@ -55,7 +55,7 @@ void sub_08066864(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_0807DD50(this);
break;
@@ -98,7 +98,7 @@ void sub_08066904(Entity* this) {
void MinisterPotho_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 6);
} else {
UpdateAnimationSingleFrame(this);
+1 -1
View File
@@ -100,7 +100,7 @@ void MountainMinish_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08111358) != 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitializeAnimation(this, 6);
}
} else {
+3 -3
View File
@@ -22,7 +22,7 @@ void Mutoh(Entity* this) {
case 0:
if (LoadExtraSpriteData(this, &gUnk_08110C00)) {
this->action = 1;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
sub_0805E3A0(this, 2);
sub_0807DD50(this);
}
@@ -45,7 +45,7 @@ void Mutoh(Entity* this) {
}
void Mutoh_Head(Entity* this) {
SetExtraSpriteFrame(this, 0, (this->frames.all & -0x81));
SetExtraSpriteFrame(this, 0, (this->frame & -0x81));
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
@@ -76,7 +76,7 @@ void Mutoh_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08110C00) != 0) {
this->action++;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
InitializeAnimation(this, 2);
}
} else {
+2 -2
View File
@@ -11,7 +11,7 @@ void Nayru(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
sub_0807DD50(this);
break;
case 1:
@@ -45,7 +45,7 @@ void sub_08064928(Entity* this) {
void Nayru_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 6);
} else {
UpdateAnimationSingleFrame(this);
+1 -1
View File
@@ -23,7 +23,7 @@ void NPC23(Entity* this) {
void sub_080662F8(Entity* this) {
this->action = 1;
this->subAction = 0;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->animationState = this->type << 1;
InitializeAnimation(this, this->type);
this->field_0x7c.HALF.HI = this->x.HALF.HI;
+2 -2
View File
@@ -17,7 +17,7 @@ void NPC26(Entity* this) {
static void sub_080669B8(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 2);
sub_08078778(this);
}
@@ -53,7 +53,7 @@ static void sub_08066A30(Entity* this) {
static void sub_08066A38(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
sub_0807DD50(this);
}
+1 -1
View File
@@ -34,7 +34,7 @@ extern void sub_08096260(Entity*);
void NPC4E(Entity* this) {
if (this->action == 0) {
this->action = 1;
this->spriteSettings.b.draw = 4;
this->spriteSettings.draw = 4;
this->hitbox = &gUnk_080FD170;
sub_0807DD50(this);
} else {
+13 -13
View File
@@ -103,7 +103,7 @@ void sub_08060A00(Entity* this) {
}
}
if ((this->action == 0) || (this->spriteSettings.b.draw != 0)) {
if ((this->action == 0) || (this->spriteSettings.draw != 0)) {
gUnk_0810AC2C[this->action](this);
}
@@ -115,7 +115,7 @@ void sub_08060A00(Entity* this) {
this->field_0x74.HWORD = gRoomControls.roomID;
CopyPosition(&gPlayerEntity, this);
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->speed = 0x120;
tmp = gRoomControls.unk_10;
this->animationState = tmp * 2;
@@ -241,11 +241,11 @@ void sub_08060D78(Entity* this) {
sub_08061358(this);
if (sub_08060F80(this) != 0) {
if ((u32)this->animIndex - 0x20 < 0x10) {
if ((this->frames.all & 7) != 0) {
if ((this->frame & 7) != 0) {
this->frameDuration = 1;
UpdateAnimationSingleFrame(this);
}
this->animationState = this->frames.all & 0x18;
this->animationState = this->frame & 0x18;
this->field_0x6c.HALF.LO = 0xff;
}
this->action = 1;
@@ -255,7 +255,7 @@ void sub_08060D78(Entity* this) {
void sub_08060DD0(Entity* this) {
UpdateAnimationSingleFrame(this);
if ((this->frames.all & 0x80) != 0) {
if ((this->frame & 0x80) != 0) {
this->action = 1;
sub_08060E70(this, 0);
}
@@ -281,7 +281,7 @@ void sub_08060DFC(Entity* this) {
void sub_08060E34(Entity* this) {
UpdateAnimationSingleFrame(this);
if ((this->frames.all & 0x80) != 0) {
if ((this->frame & 0x80) != 0) {
this->action = 2;
this->animationState = DirectionToAnimationState(GetFacingDirection(this, &gPlayerEntity)) * 2;
sub_08060E70(this, 8);
@@ -308,7 +308,7 @@ void sub_08060E94(Entity* this) {
void sub_08060EDC(Entity* this) {
s32 tmp;
if (((u32)this->animIndex - 0x20 < 0x10) && ((this->frames.all & 0x80) == 0)) {
if (((u32)this->animIndex - 0x20 < 0x10) && ((this->frame & 0x80) == 0)) {
UpdateAnimationSingleFrame(this);
} else {
tmp = GetFacingDirection(this, &gPlayerEntity) + this->animationState * -4;
@@ -322,7 +322,7 @@ void sub_08060EDC(Entity* this) {
}
} else {
if ((this->animationState & 1) == 0) {
if (((this->frames.all & 0x80) != 0) && (0xf >= (u32)this->animIndex - 0x20)) {
if (((this->frame & 0x80) != 0) && (0xf >= (u32)this->animIndex - 0x20)) {
sub_08060E70(this, 0);
} else {
sub_08060E94(this);
@@ -392,7 +392,7 @@ NONMATCH("asm/non_matching/npc5/sub_08061170.inc", bool32 sub_08061170(Entity* t
this->action = 6;
tmp = (sub_08079FD4(this, 1) * 0x10 - 4);
// tmp <<= 0xc;
this->hVelocity = tmp;
this->zVelocity = tmp;
this->speed = 0x100;
this->direction = direction;
this->animationState = direction >> 2;
@@ -464,7 +464,7 @@ u32 sub_08061230(Entity* this) {
}
} else {
UpdateAnimationSingleFrame(this);
if ((this->frames.all & 0x80) == 0) {
if ((this->frame & 0x80) == 0) {
return 1;
}
((UnkHeap*)this->myHeap)->unk_0 &= 0xfe;
@@ -489,7 +489,7 @@ NONMATCH("asm/non_matching/npc5/sub_08061358.inc", void sub_08061358(Entity* thi
switch (this->subAction) {
case 0:
UpdateAnimationSingleFrame(this);
if ((this->frames.all & 0x80) == 0) {
if ((this->frame & 0x80) == 0) {
return;
}
this->subAction = 1;
@@ -512,10 +512,10 @@ NONMATCH("asm/non_matching/npc5/sub_08061358.inc", void sub_08061358(Entity* thi
break;
case 2:
UpdateAnimationSingleFrame(this);
if ((this->frames.all & 0x80) == 0) {
if ((this->frame & 0x80) == 0) {
return;
}
this->animationState = (u8)(((u8)this->frames.all & 0x18) >> 2);
this->animationState = (u8)(((u8)this->frame & 0x18) >> 2);
uVar2 = Random();
if ((uVar2 & 1) == 0) {
this->subAction = 0;
+1 -1
View File
@@ -16,7 +16,7 @@ void NPC58(Entity* this) {
return;
}
this->action += 1;
this->spriteSettings.b.draw = 2;
this->spriteSettings.draw = 2;
this->spriteRendering.b3 = 0;
this->spritePriority.b0 = 0;
this->spriteOrientation.flipY = 1;
+2 -2
View File
@@ -11,7 +11,7 @@ void NPC9(Entity* this) {
void sub_08062AF0(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
InitializeAnimation(this, 0);
sub_08078778(this);
}
@@ -29,7 +29,7 @@ void sub_08062B14(Entity* this) {
void sub_08062B48(Entity* this) {
GetNextFrame(this);
if ((this->frames.b.f3) != 0) {
if (this->frame & 0x80) {
MessageFromTarget(0xa01);
this->action++;
}
+3 -3
View File
@@ -22,7 +22,7 @@ extern SpriteLoadData gUnk_08112E1C;
void Percy_Head(Entity* this) {
SetExtraSpriteFrame(this, 0, (this->frameSpriteSettings & 0x3f) + 0x13);
SetExtraSpriteFrame(this, 1, (this->frames.all & 0x7f) + 0xb);
SetExtraSpriteFrame(this, 1, (this->frame & 0x7f) + 0xb);
SetExtraSpriteFrame(this, 2, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 2, 1);
SetSpriteSubEntryOffsetData2(this, 2, 0);
@@ -62,7 +62,7 @@ void sub_0806B41C(Entity* this) {
case 0:
if (LoadExtraSpriteData(this, &gUnk_08112E1C)) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
if (this->type2 == 2) {
CreateFx(this, FX_SWEAT, 0);
}
@@ -160,7 +160,7 @@ void Percy_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08112E1C) != 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitializeAnimation(this, 2);
}
} else {
+1 -1
View File
@@ -12,7 +12,7 @@ extern u16 gBG0Settings[];
void Phonograph(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->field_0x68.HWORD = 1;
this->field_0x6a.HWORD = 0xffff;
sub_0807DD64(this);
+4 -4
View File
@@ -63,7 +63,7 @@ void sub_0806DFB4(Entity* this) {
obj = CreateObject(0x35, 2, this->field_0xf);
if (obj != NULL) {
obj->parent = this;
this->attachedEntity = obj;
this->child = obj;
CopyPosition(this, obj);
}
sub_080788E0(this);
@@ -82,9 +82,9 @@ void sub_0806E0DC(Entity* this) {
if (this->field_0xf != 0xff) {
this->action = 2;
this->field_0x76.HWORD = TILE(this->x.HALF.HI, this->y.HALF.HI);
if (this->attachedEntity != NULL) {
DeleteEntity(this->attachedEntity);
this->attachedEntity = NULL;
if (this->child != NULL) {
DeleteEntity(this->child);
this->child = NULL;
}
sub_08078828(this);
sub_0807B7D8(0x73, this->field_0x76.HWORD, 2);
+3 -3
View File
@@ -28,7 +28,7 @@ void sub_08063A80(Entity* this) {
void sub_08063A98(Entity* this) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 4);
sub_08078778(this);
}
@@ -48,7 +48,7 @@ void sub_08063B68(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->field_0x68.HALF.HI = 0;
sub_0807DD64(this);
case 1:
@@ -121,7 +121,7 @@ void sub_08063CAC(Entity* this) {
void Pina_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->y.HALF.HI -= 4;
InitAnimationForceUpdate(this, 2);
} else {
+1 -1
View File
@@ -21,7 +21,7 @@ void Pita(Entity* this) {
sub_0807DD64(this);
}
sub_0807DD94(this, NULL);
if ((this->frames.all & 1) != 0) {
if ((this->frame & 1) != 0) {
InitAnimationForceUpdate(this, (u32)(this->animationState >> 1));
this->field_0x80.HWORD = this->animIndex;
}
+9 -9
View File
@@ -97,10 +97,10 @@ void sub_080604DC(Entity* this) {
int iVar2;
Entity* ent;
if (((u32)(this->spriteSettings.raw << 0x1e) >> 0x1e == 1) && sub_080040A8(this)) {
if ((this->frames.all & 1) != 0) {
this->frames.all &= 0xfe;
ent = CreateFx(this, FX_DASH, 0x40);
if (this->spriteSettings.draw == 1 && sub_080040A8(this)) {
if ((this->frame & 1) != 0) {
this->frame &= 0xfe;
ent = CreateFx(this, 17, 0x40);
if (ent != NULL) {
ent->y.HALF.HI++;
sub_0805E3A0(ent, 3);
@@ -113,7 +113,7 @@ void sub_08060528(Entity* this) {
switch (this->action) {
case 0:
this->action = 1;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
this->field_0x68.HALF.LO = 0;
this->field_0x68.HALF.HI = 0;
this->field_0x6a.HWORD = 0;
@@ -156,7 +156,7 @@ void sub_08060528(Entity* this) {
if (0 < (s16)this->field_0x6a.HWORD) {
if ((s16)this->field_0x6a.HWORD > 0x12b) {
this->field_0x6a.HWORD = 0;
this->hVelocity = 0x20000;
this->zVelocity = 0x20000;
this->field_0x6c.HALF.HI = 1;
sub_080788E0(this);
EnqueueSFX(0x7c);
@@ -165,11 +165,11 @@ void sub_08060528(Entity* this) {
}
}
sub_08003FC4(this, 0x1800);
if (((this->field_0x6c.HALF.HI != 0) && (this->hVelocity == 0)) && this->height.WORD == 0) {
if (((this->field_0x6c.HALF.HI != 0) && (this->zVelocity == 0)) && this->z.WORD == 0) {
this->field_0x6c.HALF.HI = 0;
sub_080606C0(this);
}
if ((-1 < this->height.WORD) &&
if ((-1 < this->z.WORD) &&
((gPlayerEntity.collisionLayer == 0 || (this->collisionLayer == gPlayerEntity.collisionLayer)))) {
sub_0806ED78(this);
}
@@ -212,7 +212,7 @@ ASM_FUNC("asm/non_matching/postman/sub_080608E4.inc", void sub_080608E4(Entity*
void Postman_Fusion(Entity* this) {
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 2);
} else {
UpdateAnimationSingleFrame(this);
+15 -15
View File
@@ -38,7 +38,7 @@ void sub_0806a370(Entity* this) {
UpdateAnimationSingleFrame(this);
sub_0806ED78(this);
if (this->animIndex == 0xf) {
pbVar1 = &this->frames.all;
pbVar1 = &this->frame;
if (*pbVar1 == 1) {
*pbVar1 = 0;
SoundReq(SFX_218);
@@ -71,7 +71,7 @@ void sub_0806A410(Entity* this) {
}
break;
case 1:
if (((this->frames.all & 0x80) != 0)) {
if (((this->frame & 0x80) != 0)) {
sub_0806A9B0(this, *(ScriptExecutionContext**)&this->cutsceneBeh);
}
break;
@@ -86,14 +86,14 @@ void sub_0806A458(Entity* this) {
}
break;
case 1:
if ((this->frames.all & 0x80) != 0) {
if ((this->frame & 0x80) != 0) {
this->subAction = 2;
InitializeAnimation(this, 10);
ClearLocalFlag(0x62);
}
break;
case 2:
if (((this->frames.all & 0x80) != 0)) {
if (((this->frame & 0x80) != 0)) {
this->action = 1;
this->subAction = 0;
this->actionDelay = 0x3c;
@@ -106,7 +106,7 @@ void sub_0806A458(Entity* this) {
void sub_0806A4CC(Entity* this) {
switch (this->subAction) {
case 0:
if ((this->frames.all & 0x80) != 0) {
if ((this->frame & 0x80) != 0) {
if ((u8)(this->animIndex - 8) < 2) {
this->subAction = 1;
this->field_0x6a.HWORD = 1;
@@ -118,7 +118,7 @@ void sub_0806A4CC(Entity* this) {
}
break;
case 1:
if ((this->frames.all & 0x80) != 0) {
if ((this->frame & 0x80) != 0) {
this->subAction = 2;
InitializeAnimation(this, GetAnimationState(this));
}
@@ -135,13 +135,13 @@ void sub_0806A550(Entity* this) {
this->subAction = 1;
InitializeAnimation(this, 0xc);
} else {
if (this->frames.all == 1) {
this->frames.all = 0;
if (this->frame == 1) {
this->frame = 0;
sub_08080964(8, 2);
gActiveScriptInfo.unk_00 |= 0x100;
SoundReq(SFX_11B);
}
if ((this->frames.all & 0x80) != 0) {
if ((this->frame & 0x80) != 0) {
this->action = 5;
this->subAction = 0;
InitializeAnimation(this, 0xd);
@@ -155,7 +155,7 @@ void nullsub_503(void) {
void sub_0806A5C0(Entity* this) {
GetNextFrame(this);
if ((this->frames.all & 0x80) != 0) {
if ((this->frame & 0x80) != 0) {
InitializeAnimation(this, (Random() & 3) + 4);
}
}
@@ -182,8 +182,8 @@ void sub_0806A630(Entity* this) {
if ((gActiveScriptInfo.unk_00 & 0x100) != 0) {
GetNextFrame(this);
}
if (this->frames.all == 1) {
this->frames.all = 0;
if (this->frame == 1) {
this->frame = 0;
SoundReq(SFX_SECRET);
}
}
@@ -202,8 +202,8 @@ void sub_0806A830(Entity* this) {
DeleteThisEntity();
}
GetNextFrame(this);
if (this->frames.all == 1) {
this->frames.all = 0;
if (this->frame == 1) {
this->frame = 0;
npc = CreateNPC(0x37, 5, 0);
if (npc != NULL) {
PositionEntityOnTop(this, npc);
@@ -218,7 +218,7 @@ void sub_0806A890(Entity* this) {
sub_0805E3A0(this, 2);
}
GetNextFrame(this);
if ((this->frames.all & 0x80) != 0) {
if ((this->frame & 0x80) != 0) {
DeleteThisEntity();
}
}
+4 -6
View File
@@ -26,9 +26,7 @@ void sub_080637B8(Entity* this) {
this->interactType = 0;
this->field_0x68.HALF.HI = this->animIndex;
tmp = sub_0806F5A4(GetFacingDirection(this, &gPlayerEntity));
if ((this->spriteSettings.raw * 0x2000000) < 0) {
tmp += 4;
}
tmp += this->spriteSettings.flipX ? 4 : 0;
InitializeAnimation(this, tmp);
sub_0806F118(this);
} else {
@@ -49,7 +47,7 @@ void sub_08063830(Entity* this) {
}
void sub_08063850(Entity* this, ScriptExecutionContext* context) {
InitializeAnimation(this, context->intVariable + (BOOLCAST(this->spriteSettings.b.flipX) & 4U) +
InitializeAnimation(this, context->intVariable + (BOOLCAST(this->spriteSettings.flipX) & 4U) +
(this->animationState >> 1));
}
@@ -83,8 +81,8 @@ void SittingPerson_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_0810CB78[this->type * 3]) != 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.b.flipX = 0;
this->spriteSettings.draw = 1;
this->spriteSettings.flipX = 0;
this->y.HALF.HI -= 4;
InitializeAnimation(this, 2);
sub_08096208(this, this->type);
+2 -2
View File
@@ -21,9 +21,9 @@ void SmallTownMinish(Entity* this) {
sub_0807DD94(this, NULL);
}
if ((gPlayerState.flags & 0x80) != 0) {
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
} else {
this->spriteSettings.b.draw = 0;
this->spriteSettings.draw = 0;
}
}
+6 -6
View File
@@ -42,8 +42,8 @@ void Smith(Entity* this) {
} else {
this->spritePriority.b1 = 1;
}
if ((this->frames.all & 1) != 0) {
this->frames.all &= 0xfe;
if ((this->frame & 1) != 0) {
this->frame &= 0xfe;
CreateFx(this, FX_STARS2, 0x20);
SoundReq(gUnk_08110380[(Random() & 7)]);
}
@@ -52,7 +52,7 @@ void Smith(Entity* this) {
void Smith_Head(Entity* this) {
u8 bVar1;
bVar1 = this->frames.all;
bVar1 = this->frame;
SetExtraSpriteFrame(this, 0, this->frameIndex);
if ((bVar1 & 0x40) != 0) {
SetExtraSpriteFrame(this, 1, 0x16);
@@ -102,7 +102,7 @@ void sub_08066170(Entity* this) {
void sub_08066178(Entity* this) {
if (LoadExtraSpriteData(this, &gUnk_08110354) != 0) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_0807DD50(this);
}
@@ -117,7 +117,7 @@ void sub_080661BC(Entity* this) {
if (this->animIndex == 0xc) {
UpdateAnimationSingleFrame(this);
if ((this->frames.b.f3) != 0) {
if (this->frame & 0x80) {
this->field_0x80.HWORD = GetAnimationState(this) + 8;
InitAnimationForceUpdate(this, this->field_0x80.HWORD);
}
@@ -168,7 +168,7 @@ void Smith_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08110354) != 0) {
this->action++;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 6);
}
} else {
+2 -2
View File
@@ -22,7 +22,7 @@ void Stamp(Entity* ent) {
void sub_08062BD4(Entity* ent) {
ent->action = 1;
ent->spriteSettings.b.draw = 1;
ent->spriteSettings.draw = 1;
InitializeAnimation(ent, 0);
sub_08078778(ent);
}
@@ -39,7 +39,7 @@ void sub_08062BF8(Entity* ent) {
void sub_08062C24(Entity* ent) {
GetNextFrame(ent);
if ((ent->frames.all & 128) != 0) {
if ((ent->frame & 128) != 0) {
InitializeAnimation(ent, 4);
MessageFromTarget(2561);
ent->action++;
+3 -3
View File
@@ -27,7 +27,7 @@ void sub_08065080(Entity* this) {
ScriptExecutionContext* context;
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
sub_0805E3A0(this, 2);
InitializeAnimation(this, 4);
sub_08078778(this);
@@ -55,7 +55,7 @@ void sub_080651D8(Entity* this) {
}
void sub_080651F8(Entity* this) {
if ((this->frames.all & 0x20) == 0) {
if ((this->frame & 0x20) == 0) {
this->subAction = 1;
this->actionDelay = 0x3c;
InitializeAnimation(this, 1);
@@ -146,7 +146,7 @@ void sub_080654EC(Entity* this) {
}
void sub_080654FC(Entity* this) {
if ((this->frames.all & 0x20) != 0) {
if ((this->frame & 0x20) != 0) {
gActiveScriptInfo.commandSize = 0;
} else {
gActiveScriptInfo.flags |= 1;
+3 -3
View File
@@ -59,7 +59,7 @@ void sub_08064B44(Entity* this) {
sub_08064CC0(this);
this->action = 1;
this->subAction = 0;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
}
}
@@ -80,7 +80,7 @@ void sub_08064C50(Entity* this) {
}
void Sturgeon_Head(Entity* this) {
SetExtraSpriteFrame(this, 0, (u8)this->frames.all & 0x3f);
SetExtraSpriteFrame(this, 0, (u8)this->frame & 0x3f);
SetExtraSpriteFrame(this, 1, (u32)this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
@@ -119,7 +119,7 @@ void Sturgeon_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_0810FA38) != 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitializeAnimation(this, 6);
}
} else {
+3 -3
View File
@@ -66,7 +66,7 @@ void sub_0806559C(Entity* this) {
void sub_08065608(Entity* this) {
if (LoadExtraSpriteData(this, &gUnk_0810FEB0) != 0) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
sub_08078784(this, this->field_0x68.HALF.LO);
sub_0807DD50(this);
@@ -145,7 +145,7 @@ void sub_08065780(Entity* this, ScriptExecutionContext* context) {
}
void Talon_Head(Entity* this) {
SetExtraSpriteFrame(this, 0, ((this->frames.all & 7) + 0xB));
SetExtraSpriteFrame(this, 0, ((this->frame & 7) + 0xB));
SetExtraSpriteFrame(this, 1, this->frameIndex);
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
@@ -155,7 +155,7 @@ void Talon_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_0810FEB0) != 0) {
this->action++;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitializeAnimation(this, 6);
}
} else {
+3 -3
View File
@@ -15,7 +15,7 @@ void Teachers(Entity* this) {
case 0:
if (LoadExtraSpriteData(this, &gUnk_08113910[this->type * 4])) {
this->action = 1;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
this->animationState = this->actionDelay;
this->field_0x68.HALF.HI = 0;
sub_0805E3A0(this, 2);
@@ -52,7 +52,7 @@ void Teachers_Head(Entity* this) {
u8 bVar2;
u32 uVar3;
uVar3 = this->frames.all & -0x81;
uVar3 = this->frame & -0x81;
bVar1 = this->frameIndex;
bVar2 = this->frameSpriteSettings & 0x3f;
if (this->type == 0) {
@@ -84,7 +84,7 @@ void Teachers_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08113910[this->type * 4])) {
this->action++;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
InitializeAnimation(this, 2);
}
} else {
+4 -4
View File
@@ -70,13 +70,13 @@ void sub_08064DE4(Entity* this) {
break;
}
{
u8 bVar1 = this->frames.all;
u8 bVar1 = this->frame;
u8 bVar5 = bVar1 & 0xf;
this->frames.all = bVar5 ^ bVar1;
this->frame = bVar5 ^ bVar1;
if (bVar1 & 0xf) {
Entity* fx = CreateFx(this, bVar5 == 3 ? 0x2a : 0x29, 0);
if (fx && bVar5 == 2) {
fx->spriteSettings.b.flipX = 1;
fx->spriteSettings.flipX = 1;
}
}
}
@@ -111,7 +111,7 @@ void TingleSiblings_Fusion(Entity* this) {
u32 tmp;
if (this->action == 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
tmp = 6;
if (this->type == 0) {
tmp = 10;
+6 -6
View File
@@ -157,7 +157,7 @@ void TownMinish_Head(Entity* this) {
SetSpriteSubEntryOffsetData1(this, 1, 0);
sub_0807000C(this);
} else {
frames = this->frames.all;
frames = this->frame;
if (frames != 0xff) {
frames &= ~0x80;
}
@@ -210,7 +210,7 @@ void sub_0806AEE4(Entity* this) {
this->animationState = sub_0806F5B0(index);
}
tmp2 &= 0x7f;
this->frames.all = tmp1;
this->frame = tmp1;
this->frameIndex = tmp2;
this->frameSpriteSettings = 1;
this->animIndex = 0;
@@ -223,13 +223,13 @@ void sub_0806AF60(Entity* this, ScriptExecutionContext* context) {
}
void sub_0806AF70(Entity* this, ScriptExecutionContext* context) {
this->hVelocity = 0x24000;
this->zVelocity = 0x24000;
}
void sub_0806AF78(Entity* this, ScriptExecutionContext* context) {
sub_08003FC4(this, 0x1800);
if (0 <= this->height.WORD && this->hVelocity < 1) {
this->height.WORD = 0;
if (0 <= this->z.WORD && this->zVelocity < 1) {
this->z.WORD = 0;
sub_0806AF70(this, context);
}
}
@@ -336,7 +336,7 @@ void TownMinish_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08112674[this->type * 4])) {
this->action++;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitializeAnimation(this, 6);
}
} else {
+11 -11
View File
@@ -98,7 +98,7 @@ void sub_08061CEC(Entity* this) {
if (LoadExtraSpriteData(this, gUnk_0810B6EC[this->type])) {
this->action = 1;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
this->animationState = this->actionDelay;
this->field_0x68.HALF.HI = 0xff;
uVar2 = sub_0805ACC0(this);
@@ -164,13 +164,13 @@ void sub_08061E70(Entity* this) {
}
// FIXME this is actually (Entity* this, ScriptExecutionContext* context)
void sub_08061E90(Entity* this, Entity* arg1) {
void sub_08061E90(Entity* this, ScriptExecutionContext* arg1) {
u32 animIndex;
s32 iVar4;
if (arg1->spriteSettings.raw == 0) {
arg1->spriteSettings.raw++;
arg1->spriteIndex = (Random() & 0x3f) + 0x20;
if (arg1->unk_18 == 0) {
arg1->unk_18++;
arg1->unk_12 = (Random() & 0x3f) + 0x20;
animIndex = DirectionRound(Random());
switch (this->direction) {
case 0x0:
@@ -205,23 +205,23 @@ void sub_08061E90(Entity* this, Entity* arg1) {
iVar4 = this->x.HALF.HI - *(s16*)&this->field_0x6a.HWORD;
if (0x10 < iVar4) {
this->x.HALF.HI = this->field_0x6a.HWORD + 0x10;
arg1->spriteIndex = 1;
arg1->unk_12 = 1;
}
if (iVar4 < -0x10) {
this->x.HALF.HI = *(s16*)&this->field_0x6a.HWORD - 0x10;
arg1->spriteIndex = 1;
arg1->unk_12 = 1;
}
iVar4 = this->y.HALF.HI - *(s16*)&this->field_0x6c;
if (0x10 < iVar4) {
this->y.HALF.HI = *(s16*)&this->field_0x6c + 0x10;
arg1->spriteIndex = 1;
arg1->unk_12 = 1;
}
if (iVar4 < -0x10) {
this->y.HALF.HI = *(s16*)&this->field_0x6c - 0x10;
arg1->spriteIndex = 1;
arg1->unk_12 = 1;
}
if (--arg1->spriteIndex != 0) {
if (--arg1->unk_12 != 0) {
gActiveScriptInfo.commandSize = 0;
}
}
@@ -293,7 +293,7 @@ void Townsperson_Fusion(Entity* this) {
return;
}
this->action++;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
}
sub_08061CB4(this, 6);
}
+4 -4
View File
@@ -24,7 +24,7 @@ void Vaati(Entity* this) {
void VaatiAction0(Entity* this) {
this->action = 1;
this->subAction = 0;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = 0;
this->field_0x68.HALF.HI = 0;
sub_0805E3A0(this, 2);
@@ -39,8 +39,8 @@ void VaatiAction1(Entity* this) {
sub_08095CB0(this);
}
if ((this->frames.all & ~0x80) != 0) {
switch (this->frames.all & ~0x80u) {
if ((this->frame & ~0x80) != 0) {
switch (this->frame & ~0x80u) {
case 1:
EnqueueSFX(SFX_21C);
break;
@@ -59,7 +59,7 @@ void VaatiAction1(Entity* this) {
EnqueueSFX(SFX_21D);
break;
}
this->frames.b.f3 = 0;
this->frame &= ~0x80;
}
}
+6 -6
View File
@@ -57,7 +57,7 @@ void VaatiRebornAction0(Entity* this) {
break;
case 2:
if ((this->type2 & 2) != 0) {
this->spriteSettings.b.flipX = 1;
this->spriteSettings.flipX = 1;
}
sub_0806B96C(this);
InitAnimationForceUpdate(this, 0);
@@ -134,15 +134,15 @@ void VaatiRebornAction1(Entity* this) {
}
break;
case 1:
if (this->frames.b.f3 != 0) {
if (this->frame & 0x80) {
this->subAction = 2;
sub_0801D2B4(this, 0x13f);
InitAnimationForceUpdate(this, this->subAction - 1);
}
break;
case 2:
if ((this->frames.all & 0x10) != 0) {
this->frames.all &= 0xef;
if ((this->frame & 0x10) != 0) {
this->frame &= 0xef;
switch (++this->actionDelay) {
case 1:
@@ -157,7 +157,7 @@ void VaatiRebornAction1(Entity* this) {
}
break;
case 3:
if (this->frames.b.f3 != 0) {
if (this->frame & 0x80) {
SetRoomFlag(0);
DeleteThisEntity();
}
@@ -197,7 +197,7 @@ void sub_0806B96C(Entity* this) {
DeleteThisEntity();
}
ptr = &gUnk_08112F80[this->type2];
this->spriteSettings.b.draw = entity->spriteSettings.b.draw;
this->spriteSettings.draw = entity->spriteSettings.draw;
PositionRelative(entity, this, ptr->x << 0x10, (ptr->y + 0x21) << 0x10);
UpdateAnimationSingleFrame(this);
}
+4 -4
View File
@@ -44,7 +44,7 @@ void sub_0806C798(Entity* this) {
iVar1 = LoadExtraSpriteData(this, gUnk_08113A1C + (this->type * 4));
if (iVar1 != 0) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
this->animationState = this->actionDelay;
sub_0807DD50(this);
sub_0806C7D4(this);
@@ -94,7 +94,7 @@ void WindTribespeople_Head(Entity* this) {
u32 uVar2;
u8 pbVar3;
pbVar3 = (this->frames.all & 0x3F);
pbVar3 = (this->frame & 0x3F);
if (this->type == 4) {
SetExtraSpriteFrame(this, 0, 9);
SetExtraSpriteFrame(this, 1, pbVar3);
@@ -103,7 +103,7 @@ void WindTribespeople_Head(Entity* this) {
SetSpriteSubEntryOffsetData1(this, 2, 1);
sub_0807000C(this);
} else {
if (this->frames.b.f2 != 0) {
if (this->frame & 0x40) {
uVar2 = 1;
uVar1 = 0;
} else {
@@ -209,7 +209,7 @@ void WindTribespeople_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08113A1C[this->type * 4]) != 0) {
this->action += 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
InitializeAnimation(this, 6);
}
} else {
+10 -10
View File
@@ -21,7 +21,7 @@ void Zelda(Entity* this) {
void sub_08066CCC(Entity* this) {
this->action = 1;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
PrependEntityToList(this, 7);
sub_0805E3A0(this, 2);
sub_0807DD50(this);
@@ -41,7 +41,7 @@ void sub_08066D14(Entity* this, ScriptExecutionContext* context) {
parent = this->parent;
if (parent != NULL) {
this->animationState = parent->animationState;
this->spriteSettings.b.draw = 1;
this->spriteSettings.draw = 1;
CopyPosition(parent, this);
sub_08068680(this, this->parent);
context->condition = 1;
@@ -56,9 +56,9 @@ void sub_08066D4C(Entity* this, ScriptExecutionContext* context) {
parent = this->parent;
if (this->parent != NULL) {
CopyPosition(this, parent);
this->parent->spriteSettings.b.draw = 1;
this->parent->spriteSettings.draw = 1;
this->parent->animationState = this->animationState;
this->spriteSettings.b.draw = 0;
this->spriteSettings.draw = 0;
this->field_0x17 &= 0xFE;
sub_08068694(this, this->parent);
context->condition = 1;
@@ -127,20 +127,20 @@ void sub_08066E80(Entity* this, ScriptExecutionContext* context) {
break;
case 1:
UpdateAnimationSingleFrame(this);
if (this->frames.all & 1) {
if (this->frame & 1) {
context->unk_18++;
this->hVelocity = 0x20000;
this->frames.all &= 0xFE;
this->zVelocity = 0x20000;
this->frame &= 0xFE;
SoundReq(SFX_PLY_JUMP);
}
break;
case 2:
sub_0806F62C(this, 0x100, 0x80);
sub_08003FC4(this, 0x2000);
if (!(this->frames.all & 1)) {
if (!(this->frame & 1)) {
UpdateAnimationSingleFrame(this);
}
if (this->hVelocity < 0) {
if (this->zVelocity < 0) {
context->unk_18++;
}
break;
@@ -154,7 +154,7 @@ void sub_08066E80(Entity* this, ScriptExecutionContext* context) {
break;
case 4:
UpdateAnimationSingleFrame(this);
if (this->frames.b.f3) {
if (this->frame & 0x80) {
gActiveScriptInfo.flags |= 1;
return;
}
+4 -4
View File
@@ -12,7 +12,7 @@ void sub_08068578(Entity* this);
void ZeldaFollower(Entity* this) {
if (this->action == 0) {
this->action++;
this->spriteSettings.b.draw = TRUE;
this->spriteSettings.draw = TRUE;
this->animationState = 4;
this->field_0x68.HALF.LO = 0;
this->field_0x68.HALF.HI = 0;
@@ -23,7 +23,7 @@ void ZeldaFollower(Entity* this) {
if ((s8)this->field_0x68.HALF.LO != 0) {
sub_08068318(this);
} else {
this->spriteSettings.b.draw = FALSE;
this->spriteSettings.draw = FALSE;
}
}
@@ -43,12 +43,12 @@ ASM_FUNC("asm/non_matching/zeldaFollower/sub_08068578.inc", void sub_08068578(En
void sub_08068680(Entity* this, Entity* entity) {
entity->field_0x68.HALF.LO = 0;
entity->spriteSettings.b.draw = 0;
entity->spriteSettings.draw = 0;
}
void sub_08068694(Entity* this, Entity* entity) {
entity->field_0x68.HALF.LO = 1;
entity->spriteSettings.b.draw = 1;
entity->spriteSettings.draw = 1;
entity->animationState = this->animationState;
sub_08068578(entity);
InitAnimationForceUpdate(entity, entity->animationState / 2);