mirror of
https://github.com/zeldaret/tmc
synced 2026-08-15 12:59:16 -04:00
name remaining entity fields
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ void Anju(Entity* this) {
|
||||
case 0:
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
this->animationState = this->actionDelay;
|
||||
this->animationState = this->timer;
|
||||
sub_0807DD50(this);
|
||||
return;
|
||||
case 1:
|
||||
|
||||
+2
-2
@@ -48,11 +48,11 @@ void sub_080632E0(Entity* this) {
|
||||
void sub_08063314(Entity* this) {
|
||||
u32 offset;
|
||||
|
||||
if (((++this->field_0xf & 0xF) == 0) && (offset = sub_080633C8(this), this->animIndex != offset)) {
|
||||
if (((++this->subtimer & 0xF) == 0) && (offset = sub_080633C8(this), this->animIndex != offset)) {
|
||||
InitializeAnimation(this, offset);
|
||||
}
|
||||
if (this->interactType != 0) {
|
||||
MessageFromTarget(this->actionDelay + 0xA01);
|
||||
MessageFromTarget(this->timer + 0xA01);
|
||||
this->action++;
|
||||
}
|
||||
sub_0806ED78(this);
|
||||
|
||||
+23
-23
@@ -75,11 +75,11 @@ void sub_0806CF30(Entity* this) {
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
u32 uVar2 = Random();
|
||||
SoundReq(gUnk_081140CC[uVar2 % 4]);
|
||||
this->actionDelay = ((u8)uVar2 & 7) * 16;
|
||||
this->actionDelay += 128;
|
||||
this->timer = ((u8)uVar2 & 7) * 16;
|
||||
this->timer += 128;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
@@ -167,20 +167,20 @@ void sub_0806D1D0(Entity* this) {
|
||||
this->spritePriority.b0 = 7;
|
||||
this->spriteSettings.draw = 3;
|
||||
this->frameIndex = 0;
|
||||
this->actionDelay = 0x1e;
|
||||
this->timer = 0x1e;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
}
|
||||
|
||||
switch (this->subAction) {
|
||||
case 0:
|
||||
default:
|
||||
if (--this->actionDelay == 0) {
|
||||
this->actionDelay = (Random() & 0x7f) + 0x30;
|
||||
this->field_0xf = 8;
|
||||
if (--this->timer == 0) {
|
||||
this->timer = (Random() & 0x7f) + 0x30;
|
||||
this->subtimer = 8;
|
||||
this->frameIndex = 1;
|
||||
}
|
||||
if (this->field_0xf != 0) {
|
||||
if (--this->field_0xf == 0) {
|
||||
if (this->subtimer != 0) {
|
||||
if (--this->subtimer == 0) {
|
||||
this->frameIndex = 0;
|
||||
}
|
||||
}
|
||||
@@ -208,7 +208,7 @@ void sub_0806D274(Entity* this) {
|
||||
this->spriteRendering.b3 = 3;
|
||||
this->spritePriority.b0 = 7;
|
||||
this->frameIndex = 2;
|
||||
this->actionDelay = 8;
|
||||
this->timer = 8;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
npc = CreateNPC(BIG_GORON, 3, 0);
|
||||
if (npc != NULL) {
|
||||
@@ -223,14 +223,14 @@ void sub_0806D274(Entity* this) {
|
||||
this->frameIndex = 2;
|
||||
break;
|
||||
}
|
||||
if (--this->actionDelay == 0) {
|
||||
this->actionDelay = 8;
|
||||
if (--this->timer == 0) {
|
||||
this->timer = 8;
|
||||
this->frameIndex ^= 1;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (--this->actionDelay == 0) {
|
||||
this->actionDelay = 8;
|
||||
if (--this->timer == 0) {
|
||||
this->timer = 8;
|
||||
this->frameIndex ^= 1;
|
||||
}
|
||||
break;
|
||||
@@ -344,9 +344,9 @@ void sub_0806D514(Entity* this) {
|
||||
void sub_0806D520(Entity* this, u32 param_2) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
this->field_0xf = gUnk_08114100[param_2] + 6;
|
||||
this->frameIndex = this->field_0xf;
|
||||
this->actionDelay = 8;
|
||||
this->subtimer = gUnk_08114100[param_2] + 6;
|
||||
this->frameIndex = this->subtimer;
|
||||
this->timer = 8;
|
||||
}
|
||||
this->x.HALF.HI = this->parent->x.HALF.HI;
|
||||
this->y.HALF.HI = this->parent->y.HALF.HI;
|
||||
@@ -355,22 +355,22 @@ void sub_0806D520(Entity* this, u32 param_2) {
|
||||
this->spriteOrientation.flipY = this->parent->spriteOrientation.flipY;
|
||||
if (this->subAction != 0 ||
|
||||
CheckPlayerProximity(this->x.HALF.HI + param_2 * -0x10 + 0xc, this->y.HALF.HI, 0x18, 0x40)) {
|
||||
if (this->frameIndex >= this->field_0xf + 2) {
|
||||
if (this->frameIndex >= this->subtimer + 2) {
|
||||
return;
|
||||
}
|
||||
if (--this->actionDelay != 0) {
|
||||
if (--this->timer != 0) {
|
||||
return;
|
||||
}
|
||||
this->actionDelay = 8;
|
||||
this->timer = 8;
|
||||
this->frameIndex++;
|
||||
} else {
|
||||
if (this->frameIndex <= this->field_0xf) {
|
||||
if (this->frameIndex <= this->subtimer) {
|
||||
return;
|
||||
}
|
||||
if (--this->actionDelay != 0) {
|
||||
if (--this->timer != 0) {
|
||||
return;
|
||||
}
|
||||
this->actionDelay = 8;
|
||||
this->timer = 8;
|
||||
this->frameIndex--;
|
||||
}
|
||||
}
|
||||
|
||||
+30
-30
@@ -74,10 +74,10 @@ void sub_08068A4C(Entity* this) {
|
||||
if (uVar1 < 0) {
|
||||
uVar1 = 2;
|
||||
} else {
|
||||
if (this->field_0xf == 0) {
|
||||
this->field_0xf = 0x10;
|
||||
if (this->subtimer == 0) {
|
||||
this->subtimer = 0x10;
|
||||
} else {
|
||||
this->field_0xf--;
|
||||
this->subtimer--;
|
||||
uVar1 = (u32)this->animIndex;
|
||||
}
|
||||
}
|
||||
@@ -143,10 +143,10 @@ void sub_08068B84(Entity* this) {
|
||||
u8 p;
|
||||
|
||||
if (gUnk_08111618) {}
|
||||
if (p = this->actionDelay, gUnk_08111618[p]) {
|
||||
ForceEquipItem(gUnk_08111618[this->actionDelay], 0);
|
||||
if (p = this->timer, gUnk_08111618[p]) {
|
||||
ForceEquipItem(gUnk_08111618[this->timer], 0);
|
||||
}
|
||||
InitPlayerMacro(gUnk_081115EC[this->actionDelay]);
|
||||
InitPlayerMacro(gUnk_081115EC[this->timer]);
|
||||
}
|
||||
|
||||
void sub_08068BB4(Entity* this) {
|
||||
@@ -174,16 +174,16 @@ static void sub_08068BEC(Entity* this, u32 unused) {
|
||||
}
|
||||
|
||||
void sub_08068C28(Entity* this) {
|
||||
this->actionDelay = gUnk_08111623[this->type];
|
||||
this->timer = gUnk_08111623[this->type];
|
||||
if (this->type == 1) {
|
||||
if (GetInventoryValue(ITEM_SKILL_SPIN_ATTACK)) {
|
||||
if (!GetInventoryValue(ITEM_SKILL_ROCK_BREAKER)) {
|
||||
this->actionDelay = 1;
|
||||
this->timer = 1;
|
||||
} else {
|
||||
if (!GetInventoryValue(ITEM_SKILL_DASH_ATTACK)) {
|
||||
this->actionDelay = 2;
|
||||
this->timer = 2;
|
||||
} else {
|
||||
this->actionDelay = 3;
|
||||
this->timer = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -191,12 +191,12 @@ void sub_08068C28(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08068C6C(Entity* this) {
|
||||
InitItemGetSequence(gUnk_0811162B[this->actionDelay] & 0xffffff7f, 0, 0);
|
||||
InitItemGetSequence(gUnk_0811162B[this->timer] & 0xffffff7f, 0, 0);
|
||||
}
|
||||
|
||||
void sub_08068C8C(Entity* this, ScriptExecutionContext* context) {
|
||||
u8* arr = gUnk_0811162B + 0xd;
|
||||
context->condition = *(u32*)(arr + this->actionDelay * 4);
|
||||
context->condition = *(u32*)(arr + this->timer * 4);
|
||||
}
|
||||
|
||||
void sub_08068CA0(Entity* this, ScriptExecutionContext* context) {
|
||||
@@ -223,7 +223,7 @@ void sub_08068CA0(Entity* this, ScriptExecutionContext* context) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
uVar2 = GetInventoryValue(gUnk_0811162B[this->actionDelay] & -0x81);
|
||||
uVar2 = GetInventoryValue(gUnk_0811162B[this->timer] & -0x81);
|
||||
if (uVar2 != 0) {
|
||||
uVar2 = 1;
|
||||
}
|
||||
@@ -236,7 +236,7 @@ void sub_08068CFC(Entity* this, ScriptExecutionContext* context) {
|
||||
u8 itemID;
|
||||
|
||||
context->condition = 0;
|
||||
bVar1 = this->actionDelay;
|
||||
bVar1 = this->timer;
|
||||
if (bVar1 > 10)
|
||||
return;
|
||||
|
||||
@@ -299,48 +299,48 @@ void sub_08068CFC(Entity* this, ScriptExecutionContext* context) {
|
||||
|
||||
// Introduction dialoague
|
||||
void sub_08068DB8(Entity* this) {
|
||||
MessageNoOverlap(gUnk_08111664[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_08111664[this->timer], this);
|
||||
}
|
||||
|
||||
// Ask to teach dialoague
|
||||
void sub_08068DD0(Entity* this) {
|
||||
MessageNoOverlap(gUnk_0811167A[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_0811167A[this->timer], this);
|
||||
}
|
||||
|
||||
// Technique Dialogue
|
||||
void sub_08068DE8(Entity* this) {
|
||||
MessageNoOverlap(gUnk_08111690[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_08111690[this->timer], this);
|
||||
}
|
||||
|
||||
// Posession dialogue
|
||||
void sub_08068E00(Entity* this) {
|
||||
MessageNoOverlap(gUnk_081116A6[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_081116A6[this->timer], this);
|
||||
}
|
||||
|
||||
void sub_08068E18(Entity* this) {
|
||||
MessageNoOverlap(gUnk_081116BC[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_081116BC[this->timer], this);
|
||||
}
|
||||
|
||||
void sub_08068E30(Entity* this) {
|
||||
MessageNoOverlap(gUnk_081116D2[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_081116D2[this->timer], this);
|
||||
}
|
||||
|
||||
void sub_08068E48(Entity* this) {
|
||||
MessageNoOverlap(gUnk_081116E8[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_081116E8[this->timer], this);
|
||||
}
|
||||
|
||||
void sub_08068E60(Entity* this) {
|
||||
MessageNoOverlap(gUnk_081116FE[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_081116FE[this->timer], this);
|
||||
}
|
||||
|
||||
void sub_08068E78(Entity* this) {
|
||||
MessageNoOverlap(gUnk_08111714[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_08111714[this->timer], this);
|
||||
}
|
||||
|
||||
void sub_08068E90(Entity* this) {
|
||||
// Learn a skill.
|
||||
PlayerState* s = &gPlayerState;
|
||||
*(u16*)&s->skills = (1 << (gUnk_08111740[this->actionDelay] - 1)) | *(u16*)&s->skills;
|
||||
*(u16*)&s->skills = (1 << (gUnk_08111740[this->timer] - 1)) | *(u16*)&s->skills;
|
||||
}
|
||||
|
||||
void sub_08068EB4(void) {
|
||||
@@ -348,8 +348,8 @@ void sub_08068EB4(void) {
|
||||
}
|
||||
|
||||
void sub_08068EC4(Entity* this, ScriptExecutionContext* context) {
|
||||
if (gUnk_08111740[this->actionDelay] == gPlayerState.field_0xab) {
|
||||
context->wait = gUnk_0811172A[this->actionDelay];
|
||||
if (gUnk_08111740[this->timer] == gPlayerState.field_0xab) {
|
||||
context->wait = gUnk_0811172A[this->timer];
|
||||
context->condition = 1;
|
||||
} else {
|
||||
context->condition = 0;
|
||||
@@ -357,23 +357,23 @@ void sub_08068EC4(Entity* this, ScriptExecutionContext* context) {
|
||||
}
|
||||
|
||||
void sub_08068F00(Entity* this) {
|
||||
if (this->actionDelay == 1) {
|
||||
if (this->timer == 1) {
|
||||
LoadRoomEntityList(&gUnk_080F3494);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08068F14(Entity* this) {
|
||||
if (this->actionDelay == 5) {
|
||||
if (this->timer == 5) {
|
||||
ModHealth(160);
|
||||
}
|
||||
if (this->actionDelay == 6) {
|
||||
if (this->timer == 6) {
|
||||
ModHealth(-160);
|
||||
ModHealth(2);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08068F3C(Entity* this) {
|
||||
if (this->actionDelay == 6) {
|
||||
if (this->timer == 6) {
|
||||
ModHealth(160);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -37,25 +37,25 @@ void sub_0806355C(Entity* this) {
|
||||
|
||||
void sub_08063584(Entity* this) {
|
||||
if (GetAnimationStateInRectRadius(this, 0x20, 0x20) >= 0) {
|
||||
if (this->field_0xf == 0) {
|
||||
if (this->subtimer == 0) {
|
||||
if ((Random() & 0x3f) == 0) {
|
||||
this->field_0xf = 1;
|
||||
this->subtimer = 1;
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this->field_0xf != 0) {
|
||||
if (this->subtimer != 0) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->field_0xf = 0;
|
||||
this->subtimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->interactType != 0) {
|
||||
this->action = 2;
|
||||
InitAnimationForceUpdate(this, GetAnimationState(this) + 4);
|
||||
MessageFromTarget(this->actionDelay + 0xa01);
|
||||
MessageFromTarget(this->timer + 0xa01);
|
||||
}
|
||||
sub_0806ED78(this);
|
||||
}
|
||||
@@ -64,7 +64,7 @@ void sub_08063608(Entity* this) {
|
||||
u8 tmp = gMessage.doTextBox & 0x7f;
|
||||
if (tmp == 0) {
|
||||
this->action = 1;
|
||||
this->field_0xf = tmp;
|
||||
this->subtimer = tmp;
|
||||
InitAnimationForceUpdate(this, 4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ void sub_08064570(Entity* this) {
|
||||
return;
|
||||
}
|
||||
this->action += 1;
|
||||
this->actionDelay = 0;
|
||||
this->timer = 0;
|
||||
tmp2 = sub_0805ACC0(this);
|
||||
if (tmp2 == 0) {
|
||||
this->field_0x6c.HWORD = this->x.HALF.HI;
|
||||
|
||||
+9
-9
@@ -58,7 +58,7 @@ void sub_080677EC(Entity* this) {
|
||||
this->spriteSettings.draw = 1;
|
||||
this->direction = 8;
|
||||
this->speed = 0x80;
|
||||
this->field_0x3c = 7;
|
||||
this->collisionFlags = 7;
|
||||
this->hurtType = 0x48;
|
||||
this->hitType = -0x58;
|
||||
this->flags2 = 1;
|
||||
@@ -78,8 +78,8 @@ void sub_080677EC(Entity* this) {
|
||||
uVar2 >>= 0x10;
|
||||
}
|
||||
this->field_0x6c.HWORD = uVar2;
|
||||
this->field_0x6e.HWORD = this->actionDelay + uVar2;
|
||||
this->actionDelay = 0;
|
||||
this->field_0x6e.HWORD = this->timer + uVar2;
|
||||
this->timer = 0;
|
||||
this->field_0x74.HALF.HI = 0;
|
||||
this->field_0x74.HALF.LO = (Random() & 0x7f) + 0x1e;
|
||||
this->field_0x68.HALF.HI = 0xff;
|
||||
@@ -169,7 +169,7 @@ void sub_08067A0C(Entity* this) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (sub_08067D20(this) != 0) {
|
||||
sub_08067B80(this, 5);
|
||||
this->actionDelay = this->actionDelay + 0x14;
|
||||
this->timer = this->timer + 0x14;
|
||||
} else {
|
||||
sub_08067C24(this);
|
||||
}
|
||||
@@ -226,7 +226,7 @@ void sub_08067B70(Entity* this) {
|
||||
|
||||
void sub_08067B80(Entity* this, u32 param) {
|
||||
this->action = 5;
|
||||
this->actionDelay = 0x14;
|
||||
this->timer = 0x14;
|
||||
this->field_0x74.HALF.LO = (Random() & 0x7f) + 0x1e;
|
||||
InitAnimationForceUpdate(this, param);
|
||||
sub_08067DDC(this);
|
||||
@@ -342,15 +342,15 @@ u32 sub_08067D74(Entity* this) {
|
||||
int iVar2;
|
||||
|
||||
if (this->type != 5) {
|
||||
if (this->actionDelay != 0) {
|
||||
this->actionDelay -= 1;
|
||||
if (this->timer != 0) {
|
||||
this->timer -= 1;
|
||||
}
|
||||
entity = sub_08049DF4(2);
|
||||
if (entity != NULL) {
|
||||
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)) {
|
||||
(this->timer == 0)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -365,7 +365,7 @@ void sub_08067DCC(Entity* this, u32 param) {
|
||||
|
||||
void sub_08067DDC(Entity* this) {
|
||||
COLLISION_OFF(this);
|
||||
this->bitfield = 0;
|
||||
this->contactFlags = 0;
|
||||
this->iframes = 0;
|
||||
this->hitbox = &gUnk_08110EF0;
|
||||
}
|
||||
|
||||
+11
-11
@@ -52,14 +52,14 @@ void sub_08069018(Entity* ent) {
|
||||
|
||||
if (ent->subAction == 0) {
|
||||
ent->subAction++;
|
||||
ent->field_0xf = (Random() & 0x3F) + 0x3C;
|
||||
ent->subtimer = (Random() & 0x3F) + 0x3C;
|
||||
InitAnimationForceUpdate(ent, ent->animationState);
|
||||
}
|
||||
|
||||
UpdateAnimationSingleFrame(ent);
|
||||
var0 = --ent->field_0xf;
|
||||
var0 = --ent->subtimer;
|
||||
if (var0 == 0) {
|
||||
if (ent->actionDelay == 0) {
|
||||
if (ent->timer == 0) {
|
||||
ent->action = 2;
|
||||
} else {
|
||||
ent->action = 3;
|
||||
@@ -83,7 +83,7 @@ void sub_08069068(Entity* ent) {
|
||||
ent->animationState = anim;
|
||||
ent->direction = anim <<= 3;
|
||||
|
||||
ent->field_0xf = (Random() & 0x3F) + 0x3C;
|
||||
ent->subtimer = (Random() & 0x3F) + 0x3C;
|
||||
InitAnimationForceUpdate(ent, ent->animationState + 4);
|
||||
}
|
||||
|
||||
@@ -96,11 +96,11 @@ void sub_08069068(Entity* ent) {
|
||||
x -= *x2;
|
||||
if (x > 16) {
|
||||
ent->x.HALF.HI = *x2 + 16;
|
||||
ent->field_0xf = 1;
|
||||
ent->subtimer = 1;
|
||||
}
|
||||
if (x < -16) {
|
||||
ent->x.HALF.HI = *x2 - 16;
|
||||
ent->field_0xf = 1;
|
||||
ent->subtimer = 1;
|
||||
}
|
||||
}
|
||||
{
|
||||
@@ -109,15 +109,15 @@ void sub_08069068(Entity* ent) {
|
||||
y -= *y2;
|
||||
if (y > 16) {
|
||||
ent->y.HALF.HI = *y2 + 16;
|
||||
ent->field_0xf = 1;
|
||||
ent->subtimer = 1;
|
||||
}
|
||||
if (y < -16) {
|
||||
ent->y.HALF.HI = *y2 - 16;
|
||||
ent->field_0xf = 1;
|
||||
ent->subtimer = 1;
|
||||
}
|
||||
}
|
||||
|
||||
var0 = --ent->field_0xf;
|
||||
var0 = --ent->subtimer;
|
||||
if (var0 == 0) {
|
||||
ent->action = 3;
|
||||
ent->subAction = var0;
|
||||
@@ -135,7 +135,7 @@ void sub_08069124(Entity* ent) {
|
||||
void sub_08069148(Entity* ent) {
|
||||
u32 var0 = Random() & 3;
|
||||
var0 += 3;
|
||||
ent->field_0xf = var0;
|
||||
ent->subtimer = var0;
|
||||
ent->subAction = 1;
|
||||
InitAnimationForceUpdate(ent, ent->animationState + 8);
|
||||
}
|
||||
@@ -152,7 +152,7 @@ void sub_08069188(Entity* ent) {
|
||||
return;
|
||||
ent->frame = 0;
|
||||
|
||||
if (((s8)--ent->field_0xf) != 0)
|
||||
if (((s8)--ent->subtimer) != 0)
|
||||
return;
|
||||
ent->subAction = 3;
|
||||
InitAnimationForceUpdate(ent, ent->animationState + 16);
|
||||
|
||||
+4
-4
@@ -25,10 +25,10 @@ void Cucco_Init(Entity* this) {
|
||||
void sub_0806E4EC(Entity* this) {
|
||||
if (this->subAction == 0) {
|
||||
this->subAction += 1;
|
||||
this->actionDelay = (Random() & 0x1f) + 0x3c;
|
||||
this->timer = (Random() & 0x1f) + 0x3c;
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
}
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
if ((Random() & 1) != 0) {
|
||||
this->action = 3;
|
||||
} else {
|
||||
@@ -50,13 +50,13 @@ void Cucco_Fly(Entity* this) {
|
||||
this->spriteSettings.flipX ^= 1;
|
||||
}
|
||||
|
||||
this->actionDelay = (Random() & 1) + 1;
|
||||
this->timer = (Random() & 1) + 1;
|
||||
this->zVelocity = 0x18000;
|
||||
InitAnimationForceUpdate(this, 1);
|
||||
}
|
||||
|
||||
if (GravityUpdate(this, 0x2800) == 0) {
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
this->action = 1;
|
||||
this->subAction = 0;
|
||||
} else {
|
||||
|
||||
@@ -33,10 +33,10 @@ void CuccoChick_Init(Entity* this) {
|
||||
void sub_0806E764(Entity* this) {
|
||||
if (this->subAction == 0) {
|
||||
this->subAction += 1;
|
||||
this->actionDelay = (Random() & 0x1f) + 0x1e;
|
||||
this->timer = (Random() & 0x1f) + 0x1e;
|
||||
this->frameIndex = 0;
|
||||
}
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
this->action = 2;
|
||||
this->subAction = 0;
|
||||
if ((Random() & 1) != 0) {
|
||||
@@ -52,12 +52,12 @@ void CuccoChick_Fly(Entity* this) {
|
||||
if ((Random() & 1) != 0) {
|
||||
this->spriteSettings.flipX ^= 1;
|
||||
}
|
||||
this->actionDelay = (Random() & 3) + 1;
|
||||
this->timer = (Random() & 3) + 1;
|
||||
this->zVelocity = 0x10000;
|
||||
this->frameIndex = 1;
|
||||
}
|
||||
if (GravityUpdate(this, 0x3000) == 0) {
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
this->action = 1;
|
||||
this->subAction = 0;
|
||||
} else {
|
||||
|
||||
+12
-12
@@ -51,14 +51,14 @@ void sub_08069B44(Entity* this) {
|
||||
uVar2 = uVar5;
|
||||
}
|
||||
|
||||
uVar4 = this->actionDelay == 0 ? 0x20 : this->actionDelay;
|
||||
uVar4 = this->timer == 0 ? 0x20 : this->timer;
|
||||
|
||||
this->field_0x6e.HWORD = sVar3 - uVar4;
|
||||
this->field_0x6c.HWORD = sVar3 + uVar4;
|
||||
this->field_0x70.HALF.LO = uVar2 - 8;
|
||||
this->field_0x70.HALF.HI = uVar2 + 8;
|
||||
this->speed = 0x100;
|
||||
this->actionDelay = 0x1e;
|
||||
this->timer = 0x1e;
|
||||
this->animationState = 2;
|
||||
this->field_0x6a.HALF.LO = 0xff;
|
||||
this->field_0x74.HALF.LO = sub_0801E99C(this);
|
||||
@@ -90,12 +90,12 @@ void sub_08069C40(Entity* this) {
|
||||
this->animationState = GetAnimationState(this);
|
||||
sub_08069D00(this);
|
||||
}
|
||||
this->actionDelay = 0x1e;
|
||||
this->timer = 0x1e;
|
||||
} else {
|
||||
this->actionDelay -= 1;
|
||||
if (this->actionDelay == 0) {
|
||||
this->timer -= 1;
|
||||
if (this->timer == 0) {
|
||||
this->action = 2;
|
||||
this->actionDelay = (Random() & 0x1f) + 0x1e;
|
||||
this->timer = (Random() & 0x1f) + 0x1e;
|
||||
this->direction = gUnk_08111DA8[Random() & 7];
|
||||
sub_08069F6C(this);
|
||||
}
|
||||
@@ -136,8 +136,8 @@ void sub_08069D00(Entity* this) {
|
||||
void sub_08069D54(Entity* this) {
|
||||
u16 collisions;
|
||||
if (sub_08069F90(this) == 0) {
|
||||
this->actionDelay -= 1;
|
||||
if (this->actionDelay != 0) {
|
||||
this->timer -= 1;
|
||||
if (this->timer != 0) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
ProcessMovement0(this);
|
||||
collisions = this->collisions;
|
||||
@@ -166,7 +166,7 @@ void sub_08069D54(Entity* this) {
|
||||
} else {
|
||||
this->action = 3;
|
||||
}
|
||||
this->actionDelay = (Random() & 0x1f) + 0x1e;
|
||||
this->timer = (Random() & 0x1f) + 0x1e;
|
||||
}
|
||||
|
||||
void sub_08069DF8(Entity* this) {
|
||||
@@ -174,8 +174,8 @@ void sub_08069DF8(Entity* this) {
|
||||
if (sub_08069F90(this) != 0) {
|
||||
this->action = 1;
|
||||
} else {
|
||||
this->actionDelay -= 1;
|
||||
if (this->actionDelay != 0) {
|
||||
this->timer -= 1;
|
||||
if (this->timer != 0) {
|
||||
sub_08069D00(this);
|
||||
return;
|
||||
}
|
||||
@@ -185,7 +185,7 @@ void sub_08069DF8(Entity* this) {
|
||||
this->action = 3;
|
||||
}
|
||||
}
|
||||
this->actionDelay = (Random() & 0x1f) + 0x1e;
|
||||
this->timer = (Random() & 0x1f) + 0x1e;
|
||||
}
|
||||
|
||||
void sub_08069E44(Entity* this) {
|
||||
|
||||
+3
-3
@@ -14,13 +14,13 @@ void Farmers(Entity* this) {
|
||||
return;
|
||||
}
|
||||
this->action++;
|
||||
this->spriteSettings.flipX = this->actionDelay;
|
||||
this->spriteSettings.flipX = this->timer;
|
||||
if (this->spriteSettings.flipX == 0) {
|
||||
this->animationState = 6;
|
||||
} else {
|
||||
this->animationState = 2;
|
||||
}
|
||||
this->actionDelay = this->animationState;
|
||||
this->timer = this->animationState;
|
||||
sub_0806BC58(this);
|
||||
sub_0807DD64(this);
|
||||
}
|
||||
@@ -49,7 +49,7 @@ void sub_0806BC94(Entity* this, ScriptExecutionContext* context) {
|
||||
}
|
||||
|
||||
void sub_0806BCB8(Entity* this) {
|
||||
this->animationState = this->actionDelay;
|
||||
this->animationState = this->timer;
|
||||
}
|
||||
|
||||
void sub_0806BCC0(Entity* this) {
|
||||
|
||||
+2
-2
@@ -34,10 +34,10 @@ void sub_0805FE48(Entity* this) {
|
||||
uVar4 = this->field_0x80.HWORD;
|
||||
if (uVar4 < 8) {
|
||||
if ((this->field_0x82.HWORD & 1) != 0) {
|
||||
uVar4 = (uVar4 & 0xfc) + (this->field_0xf >> 1);
|
||||
uVar4 = (uVar4 & 0xfc) + (this->subtimer >> 1);
|
||||
} else {
|
||||
uVar4 = (uVar4 & 0xfc) + (this->animationState >> 1);
|
||||
this->field_0xf = this->animationState;
|
||||
this->subtimer = this->animationState;
|
||||
}
|
||||
}
|
||||
if (uVar4 != this->animIndex) {
|
||||
|
||||
@@ -18,8 +18,8 @@ void ForestMinish(Entity* this) {
|
||||
if (LoadExtraSpriteData(this, &gUnk_0810A348)) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
this->field_0x68.HALF.HI = this->animationState = this->actionDelay << 1;
|
||||
this->actionDelay = 0;
|
||||
this->field_0x68.HALF.HI = this->animationState = this->timer << 1;
|
||||
this->timer = 0;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
StartCutscene(this, (u16*)gUnk_08109D18[this->type2]);
|
||||
sub_0807DD50(this);
|
||||
@@ -73,10 +73,10 @@ void sub_080600F0(Entity* this) {
|
||||
uVar2 = this->field_0x80.HWORD;
|
||||
if (this->field_0x80.HWORD < 8) {
|
||||
if ((this->field_0x82.HWORD & 1) != 0) {
|
||||
uVar2 = (uVar2 & 0xfc) + (this->field_0xf >> 1);
|
||||
uVar2 = (uVar2 & 0xfc) + (this->subtimer >> 1);
|
||||
} else {
|
||||
uVar2 = (uVar2 & 0xfc) + (this->animationState >> 1);
|
||||
this->field_0xf = this->animationState;
|
||||
this->subtimer = this->animationState;
|
||||
}
|
||||
}
|
||||
if (uVar2 != this->animIndex) {
|
||||
@@ -91,7 +91,7 @@ void sub_080600F0(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0806014C(Entity* this) {
|
||||
this->actionDelay = 0;
|
||||
this->timer = 0;
|
||||
sub_08060158(this);
|
||||
}
|
||||
|
||||
@@ -100,10 +100,10 @@ void sub_08060158(Entity* this) {
|
||||
u8* idx3;
|
||||
u8 tmp1, tmp2;
|
||||
|
||||
if (this->actionDelay) {
|
||||
this->actionDelay--;
|
||||
if (this->timer) {
|
||||
this->timer--;
|
||||
} else {
|
||||
this->actionDelay = 2;
|
||||
this->timer = 2;
|
||||
index = GetFacingDirectionInRectRadius(this, 0x20, 0x20);
|
||||
if (index < 0) {
|
||||
int state = this->field_0x68.HALF.HI;
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
#include "npc.h"
|
||||
|
||||
void FusionMenuNPC(Entity* this) {
|
||||
if (gNPCFunctions[this->field_0xf][2] != NULL) {
|
||||
gNPCFunctions[this->field_0xf][2](this);
|
||||
if (gNPCFunctions[this->subtimer][2] != NULL) {
|
||||
gNPCFunctions[this->subtimer][2](this);
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
void FusionMenuNPC_Head(Entity* this) {
|
||||
if (gNPCFunctions[this->field_0xf][1] != NULL) {
|
||||
gNPCFunctions[this->field_0xf][1](this);
|
||||
if (gNPCFunctions[this->subtimer][1] != NULL) {
|
||||
gNPCFunctions[this->subtimer][1](this);
|
||||
}
|
||||
}
|
||||
|
||||
+18
-18
@@ -30,8 +30,8 @@ void GhostBrothers(Entity* this) {
|
||||
|
||||
if (this->type < 3) {
|
||||
s8* ptr = gUnk_0811015C;
|
||||
u32 field_0xf = this->field_0xf++;
|
||||
this->z.HALF_U.HI = *(ptr + (((field_0xf << 0x18) >> 0x1b) & 0x7));
|
||||
u32 subtimer = this->subtimer++;
|
||||
this->z.HALF_U.HI = *(ptr + (((subtimer << 0x18) >> 0x1b) & 0x7));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,14 +67,14 @@ void sub_08065C0C(Entity* this) {
|
||||
this->action = 1;
|
||||
break;
|
||||
case 3:
|
||||
if (--this->actionDelay != 0) {
|
||||
if (--this->timer != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
puVar3 = *(u16**)&this->field_0x6c.HWORD;
|
||||
if (*puVar3 != 0xffff) {
|
||||
gScreen.controls.alphaBlend = *puVar3;
|
||||
this->actionDelay = (u8) * (++puVar3);
|
||||
this->timer = (u8) * (++puVar3);
|
||||
*(u16**)&this->field_0x6c = ++puVar3;
|
||||
return;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ void sub_08065C0C(Entity* this) {
|
||||
|
||||
void sub_08065CCC(Entity* this) {
|
||||
this->action = 3;
|
||||
this->actionDelay = 0x1e;
|
||||
this->timer = 0x1e;
|
||||
this->spriteRendering.alphaBlend = 1;
|
||||
*(u32**)&this->field_0x6c = (u32*)gUnk_0811022E;
|
||||
gScreen.controls.layerFXControl = 0x3f40;
|
||||
@@ -102,8 +102,8 @@ void sub_08065D00(Entity* this) {
|
||||
|
||||
void sub_08065D18(Entity* this) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 0x1e;
|
||||
this->field_0xf = 0;
|
||||
this->timer = 0x1e;
|
||||
this->subtimer = 0;
|
||||
this->spriteSettings.draw = 1;
|
||||
this->spriteRendering.alphaBlend = 1;
|
||||
*(u32**)&this->field_0x6c = &gUnk_08110188;
|
||||
@@ -115,14 +115,14 @@ void sub_08065D18(Entity* this) {
|
||||
|
||||
void sub_08065D74(Entity* this) {
|
||||
u16* ptr;
|
||||
if (--this->actionDelay) {
|
||||
if (--this->timer) {
|
||||
return;
|
||||
}
|
||||
|
||||
ptr = *(u16**)&this->field_0x6c;
|
||||
if (*ptr != 0xffff) {
|
||||
gScreen.controls.alphaBlend = *ptr;
|
||||
this->actionDelay = *(ptr + 1);
|
||||
this->timer = *(ptr + 1);
|
||||
*(u32*)&this->field_0x6c = (u32)(ptr + 2);
|
||||
} else {
|
||||
this->action++;
|
||||
@@ -135,15 +135,15 @@ void sub_08065DB8(Entity* this) {
|
||||
case 0: {
|
||||
if ((gMessage.doTextBox & 0x7f) == 0) {
|
||||
this->subAction++;
|
||||
this->actionDelay = 0x3c;
|
||||
this->timer = 0x3c;
|
||||
InitAnimationForceUpdate(this, 4);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
this->subAction++;
|
||||
this->actionDelay = 0xb4;
|
||||
this->timer = 0xb4;
|
||||
gUnk_02018EB0[1]++;
|
||||
InitAnimationForceUpdate(this, 2);
|
||||
}
|
||||
@@ -152,7 +152,7 @@ void sub_08065DB8(Entity* this) {
|
||||
case 2:
|
||||
break;
|
||||
case 3: {
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
MessageFromTarget(0);
|
||||
this->subAction++;
|
||||
}
|
||||
@@ -161,17 +161,17 @@ void sub_08065DB8(Entity* this) {
|
||||
case 4: {
|
||||
if ((gMessage.doTextBox & 0x7f) == 0) {
|
||||
this->subAction++;
|
||||
this->actionDelay = 0x1e;
|
||||
this->timer = 0x1e;
|
||||
*(u8**)&this->field_0x6c = gUnk_0811022E;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
u16* puVar3 = *(u16**)&this->field_0x6c.HWORD;
|
||||
if (*puVar3 != 0xffff) {
|
||||
gScreen.controls.alphaBlend = *puVar3;
|
||||
this->actionDelay = (u8) * (puVar3 + 1);
|
||||
this->timer = (u8) * (puVar3 + 1);
|
||||
*(u16**)&this->field_0x6c = (puVar3 + 2);
|
||||
} else {
|
||||
gUnk_02018EB0[0]++;
|
||||
@@ -191,11 +191,11 @@ void sub_08065EBC(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08065EDC(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
u16* puVar3 = *(u16**)&this->field_0x6c.HWORD;
|
||||
if (*puVar3 != 0xffff) {
|
||||
gScreen.controls.alphaBlend = *puVar3;
|
||||
this->actionDelay = (u8) * (++puVar3);
|
||||
this->timer = (u8) * (++puVar3);
|
||||
*(u16**)&this->field_0x6c = (++puVar3);
|
||||
} else {
|
||||
this->action++;
|
||||
|
||||
+3
-3
@@ -46,13 +46,13 @@ void sub_080697EC(Entity* this) {
|
||||
|
||||
tmp = GetAnimationStateInRectRadius(this, 0x20, 0x20);
|
||||
if (tmp >= 0) {
|
||||
if (this->field_0xf == 0) {
|
||||
this->field_0xf = 0x10;
|
||||
if (this->subtimer == 0) {
|
||||
this->subtimer = 0x10;
|
||||
if (this->animIndex != tmp) {
|
||||
InitializeAnimation(this, tmp);
|
||||
}
|
||||
} else {
|
||||
this->field_0xf -= 1;
|
||||
this->subtimer -= 1;
|
||||
}
|
||||
}
|
||||
if (this->interactType != 0) {
|
||||
|
||||
+3
-3
@@ -25,10 +25,10 @@ void sub_08069310(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08069328(Entity* this) {
|
||||
if (((u32)(++this->field_0xf << 24) >> 24) > 16) {
|
||||
if (((u32)(++this->subtimer << 24) >> 24) > 16) {
|
||||
int action;
|
||||
|
||||
this->field_0xf = 0;
|
||||
this->subtimer = 0;
|
||||
action = GetAnimationStateInRectRadius(this, 40, 40);
|
||||
if (action >= 0) {
|
||||
this->animationState = action;
|
||||
@@ -41,7 +41,7 @@ void sub_08069328(Entity* this) {
|
||||
this->action = 2;
|
||||
RequestPriority(this);
|
||||
InitAnimationForceUpdate(this, 8);
|
||||
MessageFromTarget(this->actionDelay + (0x90 << 5));
|
||||
MessageFromTarget(this->timer + (0x90 << 5));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ void sub_08069584(Entity* this) {
|
||||
void sub_080695AC(Entity* this) {
|
||||
s32 iVar2;
|
||||
|
||||
if (++this->field_0xf > 0x10) {
|
||||
this->field_0xf = 0;
|
||||
if (++this->subtimer > 0x10) {
|
||||
this->subtimer = 0;
|
||||
iVar2 = GetAnimationStateInRectRadius(this, 0x28, 0x28);
|
||||
if (iVar2 > -1) {
|
||||
this->animationState = iVar2;
|
||||
|
||||
+5
-5
@@ -61,7 +61,7 @@ void sub_08063D44(Entity* this) {
|
||||
case 0 ... 3:
|
||||
ent = CreateProjectile(GUARD_LINE_OF_SIGHT);
|
||||
ent->parent = this;
|
||||
ent->field_0xf = 0x3c;
|
||||
ent->subtimer = 0x3c;
|
||||
break;
|
||||
case 4 ... 5:
|
||||
sub_08078778(this);
|
||||
@@ -75,7 +75,7 @@ void sub_08063D44(Entity* this) {
|
||||
void sub_08063DC8(Entity* this) {
|
||||
if (this->type == 0xff) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 0x1e;
|
||||
this->timer = 0x1e;
|
||||
this->animationState = sub_0806F5A4(GetFacingDirection(this, &gPlayerEntity));
|
||||
InitAnimationForceUpdate(this, this->animationState + 4);
|
||||
} else {
|
||||
@@ -96,7 +96,7 @@ void sub_08063DC8(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08063E54(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
SetRoomFlag(0xf);
|
||||
}
|
||||
}
|
||||
@@ -117,12 +117,12 @@ void sub_08063E90(Entity* this) {
|
||||
return;
|
||||
|
||||
this->action++;
|
||||
if (this->actionDelay) {
|
||||
if (this->timer) {
|
||||
this->field_0x70.BYTES.byte0 = 8;
|
||||
} else {
|
||||
this->field_0x70.BYTES.byte0 = 0;
|
||||
}
|
||||
this->actionDelay = 0;
|
||||
this->timer = 0;
|
||||
|
||||
unk = sub_0805ACC0(this);
|
||||
if (unk == 0) {
|
||||
|
||||
+9
-9
@@ -49,13 +49,13 @@ void sub_08062130(Entity* this) {
|
||||
this->action = 2;
|
||||
InitAnimationForceUpdate(this, GetAnimationState(this));
|
||||
}
|
||||
if (this->field_0xf++ >= 0x79) {
|
||||
this->field_0xf = 0;
|
||||
this->actionDelay = (this->actionDelay + 1) & 7;
|
||||
if (this->subtimer++ >= 0x79) {
|
||||
this->subtimer = 0;
|
||||
this->timer = (this->timer + 1) & 7;
|
||||
if (this->type == 6) {
|
||||
this->actionDelay = this->actionDelay + 0x10;
|
||||
this->timer = this->timer + 0x10;
|
||||
}
|
||||
InitAnimationForceUpdate(this, this->actionDelay);
|
||||
InitAnimationForceUpdate(this, this->timer);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
@@ -75,8 +75,8 @@ void sub_080621AC(Entity* this) {
|
||||
case 0:
|
||||
if (LoadExtraSpriteData(this, gUnk_0810BDC4[this->type]) != 0) {
|
||||
this->action = 1;
|
||||
this->animationState = this->actionDelay;
|
||||
this->actionDelay = 0;
|
||||
this->animationState = this->timer;
|
||||
this->timer = 0;
|
||||
this->field_0x68.HALF.LO = 0;
|
||||
this->field_0x68.HALF.HI = 0;
|
||||
this->field_0x6a.HALF.HI = 0xff;
|
||||
@@ -213,12 +213,12 @@ void sub_08062698(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_080626AC(Entity* this) {
|
||||
this->actionDelay = (Random() & 0x1f) + 0x40;
|
||||
this->timer = (Random() & 0x1f) + 0x40;
|
||||
}
|
||||
|
||||
void sub_080626C0(Entity* this, ScriptExecutionContext* context) {
|
||||
context->condition = 0;
|
||||
if ((this->actionDelay != 0) && (--this->actionDelay == 0)) {
|
||||
if ((this->timer != 0) && (--this->timer == 0)) {
|
||||
context->condition = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,10 +37,10 @@ void sub_08066688(Entity* this) {
|
||||
if (tmp < 0) {
|
||||
tmp = 2;
|
||||
} else {
|
||||
if (this->field_0xf == 0) {
|
||||
this->field_0xf = 0x10;
|
||||
if (this->subtimer == 0) {
|
||||
this->subtimer = 0x10;
|
||||
} else {
|
||||
this->field_0xf -= 1;
|
||||
this->subtimer -= 1;
|
||||
tmp = this->animIndex;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ void Librari(Entity* this) {
|
||||
case 0:
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
this->animationState = this->actionDelay;
|
||||
this->animationState = this->timer;
|
||||
this->field_0x68.HALF.LO = sub_0801E99C(this);
|
||||
sub_08078784(this, this->field_0x68.HALF.LO);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ void Mama(Entity* this) {
|
||||
if (sub_0806C454(this) != 0) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
this->animationState = this->actionDelay;
|
||||
this->animationState = this->timer;
|
||||
this->field_0x68.HALF.HI = 0;
|
||||
sub_0807DD50(this);
|
||||
}
|
||||
|
||||
+7
-7
@@ -32,18 +32,18 @@ void sub_08068730(Entity* this) {
|
||||
|
||||
animIndex = GetAnimationStateInRectRadius(this, 0x20, 0x20);
|
||||
if (-1 < animIndex) {
|
||||
if (this->field_0xf == 0) {
|
||||
this->field_0xf = 0x10;
|
||||
if (this->subtimer == 0) {
|
||||
this->subtimer = 0x10;
|
||||
if (this->animIndex != animIndex) {
|
||||
InitializeAnimation(this, animIndex);
|
||||
}
|
||||
} else {
|
||||
this->field_0xf--;
|
||||
this->subtimer--;
|
||||
}
|
||||
}
|
||||
if (this->interactType != 0) {
|
||||
this->interactType = 0;
|
||||
MessageFromTarget(this->actionDelay + 0x1200);
|
||||
MessageFromTarget(this->timer + 0x1200);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,10 +118,10 @@ void Melari_Head(Entity* this) {
|
||||
void sub_08068910(Entity* this) {
|
||||
s32 iVar1;
|
||||
|
||||
if (this->actionDelay != 0) {
|
||||
this->actionDelay--;
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
} else {
|
||||
this->actionDelay = 0x10;
|
||||
this->timer = 0x10;
|
||||
if ((this->frame & 0x20) != 0) {
|
||||
iVar1 = GetFacingDirectionInRectRadius(this, 0x30, 0x30);
|
||||
if (iVar1 < 0) {
|
||||
|
||||
@@ -10,7 +10,7 @@ void MinishEzlo(Entity* this) {
|
||||
return;
|
||||
}
|
||||
this->action += 1;
|
||||
this->animationState = this->actionDelay * 2;
|
||||
this->animationState = this->timer * 2;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
}
|
||||
|
||||
@@ -30,10 +30,10 @@ void sub_08066808(Entity* this) {
|
||||
if (tmp < 0) {
|
||||
tmp = 2;
|
||||
} else {
|
||||
if (this->field_0xf == 0) {
|
||||
this->field_0xf = 0x10;
|
||||
if (this->subtimer == 0) {
|
||||
this->subtimer = 0x10;
|
||||
} else {
|
||||
this->field_0xf -= 1;
|
||||
this->subtimer -= 1;
|
||||
tmp = this->animIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,10 +69,10 @@ void sub_08067E88(Entity* this) {
|
||||
if (tmp < 0) {
|
||||
tmp = 2;
|
||||
} else {
|
||||
if (this->field_0xf == 0) {
|
||||
this->field_0xf = 0x10;
|
||||
if (this->subtimer == 0) {
|
||||
this->subtimer = 0x10;
|
||||
} else {
|
||||
this->field_0xf = this->field_0xf - 1;
|
||||
this->subtimer = this->subtimer - 1;
|
||||
tmp = this->animIndex;
|
||||
}
|
||||
}
|
||||
@@ -82,7 +82,7 @@ void sub_08067E88(Entity* this) {
|
||||
if (this->interactType != 0) {
|
||||
this->interactType = 0;
|
||||
this->action = 2;
|
||||
MessageFromTarget(this->actionDelay + 0x1200);
|
||||
MessageFromTarget(this->timer + 0x1200);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,10 +191,10 @@ void sub_0806811C(Entity* this) {
|
||||
int iVar4;
|
||||
const u8* ptr;
|
||||
|
||||
if (this->actionDelay) {
|
||||
this->actionDelay--;
|
||||
if (this->timer) {
|
||||
this->timer--;
|
||||
} else {
|
||||
this->actionDelay = 2;
|
||||
this->timer = 2;
|
||||
iVar4 = GetFacingDirectionInRectRadius(this, 0x20, 0x20);
|
||||
if (iVar4 < 0) {
|
||||
type = this->type;
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ void sub_080662F8(Entity* this) {
|
||||
this->field_0x7c.HALF.HI = this->x.HALF.HI;
|
||||
this->field_0x80.HWORD = this->y.HALF.HI;
|
||||
this->field_0x86.HWORD = 0;
|
||||
this->field_0x82.HWORD = this->actionDelay;
|
||||
this->field_0x82.HWORD = this->timer;
|
||||
this->parent = &gPlayerEntity;
|
||||
this->cutsceneBeh.HWORD = 0;
|
||||
sub_08066490(this, this->parent);
|
||||
|
||||
+3
-3
@@ -29,10 +29,10 @@ static void sub_080669DC(Entity* this) {
|
||||
if (sVar1 < 0) {
|
||||
sVar1 = 2;
|
||||
} else {
|
||||
if (this->field_0xf == 0) {
|
||||
this->field_0xf = 0x10;
|
||||
if (this->subtimer == 0) {
|
||||
this->subtimer = 0x10;
|
||||
} else {
|
||||
this->field_0xf = this->field_0xf - 1;
|
||||
this->subtimer = this->subtimer - 1;
|
||||
sVar1 = this->animIndex;
|
||||
}
|
||||
}
|
||||
|
||||
+20
-20
@@ -147,12 +147,12 @@ void sub_08060AE0(Entity* this) {
|
||||
this->action = 1;
|
||||
COLLISION_ON(this);
|
||||
this->animationState &= 3;
|
||||
this->field_0x3c = 7;
|
||||
this->collisionFlags = 7;
|
||||
this->hurtType = 0x48;
|
||||
this->hitType = 0x49;
|
||||
this->flags2 = 3;
|
||||
this->hitbox = (Hitbox*)&gHitbox_0;
|
||||
this->field_0x17 &= 0xfe;
|
||||
this->followerFlag &= 0xfe;
|
||||
this->field_0x6c.HALF.LO = 0xff;
|
||||
sub_08060E70(this, this->animationState);
|
||||
otherNpc = CreateNPC(NPC_UNK_5, 2, 0);
|
||||
@@ -168,7 +168,7 @@ void sub_08060B5C(Entity* this) {
|
||||
if ((sub_08060F80(this) == 0) &&
|
||||
(((GetFacingDirection(this, &gPlayerEntity) + (this->animationState * -4) + 4) & 0x1f)) < 9) {
|
||||
this->action = 2;
|
||||
this->field_0xf = 0;
|
||||
this->subtimer = 0;
|
||||
return;
|
||||
}
|
||||
sub_08060EDC(this);
|
||||
@@ -492,24 +492,24 @@ u32 sub_080611D4(Entity* this) {
|
||||
continue;
|
||||
}
|
||||
|
||||
++this->field_0xf;
|
||||
++this->subtimer;
|
||||
|
||||
if (this->field_0xf < 8) {
|
||||
if (this->subtimer < 8) {
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
return ptr2[1];
|
||||
} while (ptr2 += 2, *ptr2 != 0);
|
||||
|
||||
this->field_0xf = 0;
|
||||
this->subtimer = 0;
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
u32 sub_08061230(Entity* this) {
|
||||
if ((((UnkHeap*)this->myHeap)->unk_0 & 1) == 0) {
|
||||
if ((this->bitfield & 0x80) != 0) {
|
||||
switch (this->bitfield & 0x7f) {
|
||||
if ((this->contactFlags & 0x80) != 0) {
|
||||
switch (this->contactFlags & 0x7f) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
@@ -534,7 +534,7 @@ u32 sub_08061230(Entity* this) {
|
||||
((UnkHeap*)this->myHeap)->unk_0 &= 0xfe;
|
||||
InitAnimationForceUpdate(this, this->field_0x6c.HALF.LO + (this->animationState >> 1));
|
||||
}
|
||||
this->bitfield = this->bitfield & 0x7f;
|
||||
this->contactFlags = this->contactFlags & 0x7f;
|
||||
if (this->iframes != 0) {
|
||||
this->iframes += 1;
|
||||
}
|
||||
@@ -555,19 +555,19 @@ void sub_08061358(Entity* this) {
|
||||
return;
|
||||
}
|
||||
this->subAction = 1;
|
||||
this->actionDelay = 0xf;
|
||||
this->timer = 0xf;
|
||||
sub_08060E70(this, 0);
|
||||
break;
|
||||
case 1:
|
||||
this->actionDelay -= 1;
|
||||
if (this->actionDelay != 0) {
|
||||
this->timer -= 1;
|
||||
if (this->timer != 0) {
|
||||
return;
|
||||
}
|
||||
uVar2 = Random();
|
||||
bVar4 = uVar2;
|
||||
if ((uVar2 & 1) == 0) {
|
||||
this->subAction = 3;
|
||||
this->actionDelay = (bVar4 & 0x18) + 0x1e;
|
||||
this->timer = (bVar4 & 0x18) + 0x1e;
|
||||
sub_08060E70(this, 4);
|
||||
return;
|
||||
}
|
||||
@@ -582,7 +582,7 @@ void sub_08061358(Entity* this) {
|
||||
this->animationState = ((this->frame & 0x18) >> 2);
|
||||
if ((Random() & 1)) {
|
||||
this->subAction = 3;
|
||||
this->actionDelay = (bVar4 & 0x18) + 0x1e;
|
||||
this->timer = (bVar4 & 0x18) + 0x1e;
|
||||
sub_08060E70(this, 4);
|
||||
return;
|
||||
}
|
||||
@@ -597,7 +597,7 @@ void sub_08061358(Entity* this) {
|
||||
InitAnimationForceUpdate(this, gUnk_0810AC5D[this->animationState * 2 + (bVar4 >> 4 & 3)]);
|
||||
return;
|
||||
}
|
||||
if (--this->actionDelay != 0) {
|
||||
if (--this->timer != 0) {
|
||||
return;
|
||||
}
|
||||
this->subAction = 0;
|
||||
@@ -875,8 +875,8 @@ void sub_08061ACC(Entity* this) {
|
||||
this->flags = this->flags | ENT_PERSIST;
|
||||
this->action = 1;
|
||||
this->subAction = 0xff;
|
||||
this->actionDelay = 0;
|
||||
this->field_0x17 = this->field_0x17 & 0xfe;
|
||||
this->timer = 0;
|
||||
this->followerFlag = this->followerFlag & 0xfe;
|
||||
sub_08078778(this);
|
||||
sub_08061AFC(this);
|
||||
}
|
||||
@@ -886,7 +886,7 @@ void sub_08061AFC(Entity* this) {
|
||||
if (this->subAction != 0) {
|
||||
this->subAction = tmp;
|
||||
*((u16**)&this->field_0x68) = gUnk_0810B660[0];
|
||||
this->actionDelay = 0;
|
||||
this->timer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -900,9 +900,9 @@ void sub_08061B18(Entity* this) {
|
||||
this->interactType = 0;
|
||||
sub_08061AFC(this);
|
||||
puVar2 = *(u16**)&this->field_0x68;
|
||||
puVar2 += (this->actionDelay++);
|
||||
puVar2 += (this->timer++);
|
||||
if (puVar2[1] == 0) {
|
||||
this->actionDelay = 0;
|
||||
this->timer = 0;
|
||||
}
|
||||
MessageNoOverlap(puVar2[0], this);
|
||||
break;
|
||||
|
||||
+19
-19
@@ -70,13 +70,13 @@ void PicolyteBottle_Init(PicolyteBottleEntity* this) {
|
||||
|
||||
void PicolyteBottle_Action1(PicolyteBottleEntity* this) {
|
||||
sub_0807DD94(super, 0);
|
||||
if (super->actionDelay != 0xff) {
|
||||
if (super->timer != 0xff) {
|
||||
if (super->damage != 0) {
|
||||
this->ent3->actionDelay++;
|
||||
this->ent3->timer++;
|
||||
}
|
||||
this->ent1->actionDelay++;
|
||||
this->ent2->actionDelay++;
|
||||
super->actionDelay = 0xff;
|
||||
this->ent1->timer++;
|
||||
this->ent2->timer++;
|
||||
super->timer = 0xff;
|
||||
SetRoomFlag(0);
|
||||
}
|
||||
}
|
||||
@@ -86,12 +86,12 @@ void PicolyteBottle_Action2(PicolyteBottleEntity* this) {
|
||||
|
||||
if (super->interactType != 0) {
|
||||
super->interactType = 0;
|
||||
super->parent->actionDelay = super->type2;
|
||||
super->parent->type2 = super->field_0xf;
|
||||
super->parent->timer = super->type2;
|
||||
super->parent->type2 = super->subtimer;
|
||||
} else {
|
||||
if (super->actionDelay != 0) {
|
||||
super->actionDelay = 0;
|
||||
obj = CreateObject(OBJECT_35, 2, super->field_0xf);
|
||||
if (super->timer != 0) {
|
||||
super->timer = 0;
|
||||
obj = CreateObject(OBJECT_35, 2, super->subtimer);
|
||||
if (obj != NULL) {
|
||||
obj->parent = super;
|
||||
super->child = obj;
|
||||
@@ -116,33 +116,33 @@ void sub_0806E014(PicolyteBottleEntity* this) {
|
||||
|
||||
uVar1 = (Random() & 0x70) >> 4;
|
||||
super->type2 = 0xff;
|
||||
super->actionDelay = 0xff;
|
||||
super->timer = 0xff;
|
||||
if (CheckLocalFlag(0x93) == 0) {
|
||||
super->damage = 0;
|
||||
iVar2 = uVar1 * 2;
|
||||
ptr = &gUnk_081142CC[iVar2];
|
||||
this->ent1->field_0xf = ptr[0];
|
||||
this->ent1->subtimer = ptr[0];
|
||||
PositionRelative(super, this->ent1, 0x480000, 0x480000);
|
||||
this->ent2->field_0xf = ptr[1];
|
||||
this->ent2->subtimer = ptr[1];
|
||||
PositionRelative(super, this->ent2, 0x680000, 0x480000);
|
||||
this->ent3->field_0xf = 0xff;
|
||||
this->ent3->subtimer = 0xff;
|
||||
CopyPosition(super, this->ent3);
|
||||
} else {
|
||||
super->damage = 1;
|
||||
iVar2 = uVar1 * 4;
|
||||
ptr = &gUnk_081142DC[iVar2];
|
||||
this->ent1->field_0xf = ptr[0];
|
||||
this->ent1->subtimer = ptr[0];
|
||||
PositionRelative(super, this->ent1, 0x380000, 0x480000);
|
||||
this->ent2->field_0xf = ptr[1];
|
||||
this->ent2->subtimer = ptr[1];
|
||||
PositionRelative(super, this->ent2, 0x580000, 0x480000);
|
||||
this->ent3->field_0xf = ptr[2];
|
||||
this->ent3->subtimer = ptr[2];
|
||||
PositionRelative(super, this->ent3, 0x780000, 0x480000);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0806E0DC(PicolyteBottleEntity* this) {
|
||||
super->actionDelay = 0;
|
||||
if (super->field_0xf != 0xff) {
|
||||
super->timer = 0;
|
||||
if (super->subtimer != 0xff) {
|
||||
super->action = 2;
|
||||
this->unk76 = TILE(super->x.HALF.HI, super->y.HALF.HI);
|
||||
if (super->child != NULL) {
|
||||
|
||||
+6
-6
@@ -39,25 +39,25 @@ void sub_08063A98(Entity* this) {
|
||||
|
||||
void sub_08063AC0(Entity* this) {
|
||||
if (GetAnimationStateInRectRadius(this, 0x20, 0x20) >= 0) {
|
||||
if (this->field_0xf == 0) {
|
||||
if (this->subtimer == 0) {
|
||||
if ((Random() & 0x3f) == 0) {
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
this->field_0xf = 1;
|
||||
this->subtimer = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this->field_0xf != 0) {
|
||||
if (this->subtimer != 0) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->field_0xf = 0;
|
||||
this->subtimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->interactType != 0) {
|
||||
this->action = 2;
|
||||
InitAnimationForceUpdate(this, GetAnimationState(this) + 4);
|
||||
MessageFromTarget(this->actionDelay + 0xa01);
|
||||
MessageFromTarget(this->timer + 0xa01);
|
||||
}
|
||||
sub_0806ED78(this);
|
||||
}
|
||||
@@ -66,7 +66,7 @@ void sub_08063B44(Entity* this) {
|
||||
u8 tmp = gMessage.doTextBox & 0x7f;
|
||||
if (tmp == 0) {
|
||||
this->action = 1;
|
||||
this->field_0xf = tmp;
|
||||
this->subtimer = tmp;
|
||||
InitAnimationForceUpdate(this, 4);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ void Postman(Entity* this) {
|
||||
void sub_08060428(Entity* this) {
|
||||
void* data;
|
||||
|
||||
this->actionDelay = 0x5a;
|
||||
this->timer = 0x5a;
|
||||
this->speed = 0x180;
|
||||
if (this->type2 != 0) {
|
||||
data = GetCurrentRoomProperty(this->type2);
|
||||
|
||||
+16
-16
@@ -57,7 +57,7 @@ void sub_0806a370(Entity* this) {
|
||||
|
||||
void sub_0806A3D8(Entity* this) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 0xb4;
|
||||
this->timer = 0xb4;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0806A8C8(this);
|
||||
*(ScriptExecutionContext**)&this->cutsceneBeh = StartCutscene(this, &script_Rem);
|
||||
@@ -67,7 +67,7 @@ void sub_0806A3D8(Entity* this) {
|
||||
void sub_0806A410(Entity* this) {
|
||||
switch (this->subAction) {
|
||||
case 0:
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
this->subAction++;
|
||||
InitializeAnimation(this, 8);
|
||||
}
|
||||
@@ -83,7 +83,7 @@ void sub_0806A410(Entity* this) {
|
||||
void sub_0806A458(Entity* this) {
|
||||
switch (this->subAction) {
|
||||
case 0:
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
this->subAction += 1;
|
||||
}
|
||||
break;
|
||||
@@ -98,7 +98,7 @@ void sub_0806A458(Entity* this) {
|
||||
if (((this->frame & ANIM_DONE) != 0)) {
|
||||
this->action = 1;
|
||||
this->subAction = 0;
|
||||
this->actionDelay = 0x3c;
|
||||
this->timer = 0x3c;
|
||||
InitializeAnimation(this, 2);
|
||||
}
|
||||
break;
|
||||
@@ -126,7 +126,7 @@ void sub_0806A4CC(Entity* this) {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
this->actionDelay = 0xb4;
|
||||
this->timer = 0xb4;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -166,11 +166,11 @@ void sub_0806A5E8(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action = 1;
|
||||
InitializeAnimation(this, 0x10);
|
||||
this->actionDelay = (Random() & 0x3f) + 0x3c;
|
||||
this->timer = (Random() & 0x3f) + 0x3c;
|
||||
}
|
||||
this->actionDelay -= 1;
|
||||
if (this->actionDelay == 0) {
|
||||
this->actionDelay = (Random() & 0x3f) + 0x78;
|
||||
this->timer -= 1;
|
||||
if (this->timer == 0) {
|
||||
this->timer = (Random() & 0x3f) + 0x78;
|
||||
SoundReq(SFX_REM_SLEEP);
|
||||
}
|
||||
GetNextFrame(this);
|
||||
@@ -211,12 +211,12 @@ void sub_0806A674(Entity* this) {
|
||||
if (this->parent->animIndex == 9) {
|
||||
this->spritePriority.b0 = 3;
|
||||
|
||||
if (this->actionDelay == 0) {
|
||||
if (this->timer == 0) {
|
||||
rand = Random();
|
||||
this->actionDelay = rand & 7;
|
||||
this->timer = rand & 7;
|
||||
this->field_0x68.HALF.LO = auStack16[rand >> 8 & 7];
|
||||
} else if ((gRoomTransition.frameCount & 3U) == 0) {
|
||||
this->actionDelay--;
|
||||
this->timer--;
|
||||
if ((s8)this->spriteOffsetX < 1) {
|
||||
this->field_0x68.HALF.LO = 1;
|
||||
}
|
||||
@@ -227,12 +227,12 @@ void sub_0806A674(Entity* this) {
|
||||
this->spriteOffsetX += this->field_0x68.HALF.LO;
|
||||
}
|
||||
|
||||
if (this->field_0xf == 0) {
|
||||
if (this->subtimer == 0) {
|
||||
rand = Random();
|
||||
this->field_0xf = rand & 7;
|
||||
this->subtimer = rand & 7;
|
||||
this->field_0x68.HALF.HI = auStack16[rand >> 8 & 7];
|
||||
} else if (((u32)gRoomTransition.frameCount >> 4 & 3) == 0) {
|
||||
this->field_0xf--;
|
||||
this->subtimer--;
|
||||
if (-1 < this->spriteOffsetY) {
|
||||
this->field_0x68.HALF.HI = -1;
|
||||
}
|
||||
@@ -360,7 +360,7 @@ void sub_0806A9B0(Entity* this, ScriptExecutionContext* context) {
|
||||
static const u8 gUnk_081122A0[] = { 60, 100, 200, 60, 100, 200, 80, 80 };
|
||||
this->action = 2;
|
||||
this->subAction = 0;
|
||||
this->actionDelay = gUnk_081122A0[Random() & 7];
|
||||
this->timer = gUnk_081122A0[Random() & 7];
|
||||
this->field_0x80.HWORD = 9;
|
||||
InitializeAnimation(this, 9);
|
||||
SetLocalFlag(NPC37_REM_SLEEP);
|
||||
|
||||
@@ -23,7 +23,7 @@ void SittingPerson(Entity* this) {
|
||||
void SittingPersion_Init(Entity* this) {
|
||||
if (LoadExtraSpriteData(this, &gUnk_0810CB78[this->type * 3])) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.flipX = this->actionDelay;
|
||||
this->spriteSettings.flipX = this->timer;
|
||||
|
||||
if (this->spriteSettings.flipX == 0) {
|
||||
this->animationState = 6;
|
||||
@@ -31,7 +31,7 @@ void SittingPersion_Init(Entity* this) {
|
||||
this->animationState = 2;
|
||||
}
|
||||
|
||||
this->actionDelay = this->animationState;
|
||||
this->timer = this->animationState;
|
||||
this->field_0x68.HALF.HI = 0;
|
||||
sub_0807DD50(this);
|
||||
sub_080637B8(this);
|
||||
@@ -75,7 +75,7 @@ void sub_08063850(Entity* this, ScriptExecutionContext* context) {
|
||||
}
|
||||
|
||||
void sub_08063874(Entity* this) {
|
||||
this->animationState = this->actionDelay;
|
||||
this->animationState = this->timer;
|
||||
}
|
||||
|
||||
#if defined(EU) || defined(DEMO_JP) || defined(JP)
|
||||
|
||||
+3
-3
@@ -68,10 +68,10 @@ void sub_08066118(Entity* this) {
|
||||
if (uVar1 < 0) {
|
||||
uVar1 = 2;
|
||||
} else {
|
||||
if (this->field_0xf == 0) {
|
||||
this->field_0xf = 0x10;
|
||||
if (this->subtimer == 0) {
|
||||
this->subtimer = 0x10;
|
||||
} else {
|
||||
--this->field_0xf;
|
||||
--this->subtimer;
|
||||
uVar1 = this->animIndex;
|
||||
}
|
||||
}
|
||||
|
||||
+12
-12
@@ -92,7 +92,7 @@ void sub_080651D8(Entity* this) {
|
||||
void sub_080651F8(Entity* this) {
|
||||
if ((this->frame & 0x20) == 0) {
|
||||
this->subAction = 1;
|
||||
this->actionDelay = 0x3c;
|
||||
this->timer = 0x3c;
|
||||
InitializeAnimation(this, 1);
|
||||
CreateSpeechBubbleExclamationMark(this, 8, 0xffffffe8);
|
||||
SetPlayerControl(1);
|
||||
@@ -100,7 +100,7 @@ void sub_080651F8(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0806522C(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
++this->subAction;
|
||||
MessageNoOverlap(0x2c16, this);
|
||||
}
|
||||
@@ -110,20 +110,20 @@ void sub_08065250(Entity* this) {
|
||||
switch (sub_08056338()) {
|
||||
case 0:
|
||||
this->subAction += 1;
|
||||
this->actionDelay = 0x1e;
|
||||
this->field_0xf = 0;
|
||||
this->timer = 0x1e;
|
||||
this->subtimer = 0;
|
||||
CreateSpeechBubbleExclamationMark(this, 8, 0xffffffe8);
|
||||
break;
|
||||
case 1:
|
||||
this->subAction = 7;
|
||||
this->actionDelay = 0;
|
||||
this->field_0xf = 2;
|
||||
this->timer = 0;
|
||||
this->subtimer = 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0806528C(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
++this->subAction;
|
||||
MessageNoOverlap(0x2c18, this);
|
||||
}
|
||||
@@ -132,15 +132,15 @@ void sub_0806528C(Entity* this) {
|
||||
void sub_080652B0(Entity* this) {
|
||||
if ((gMessage.doTextBox & 0x7f) == 0) {
|
||||
this->subAction += 1;
|
||||
this->actionDelay = 10;
|
||||
gRoomVars.animFlags = this->field_0xf;
|
||||
this->timer = 10;
|
||||
gRoomVars.animFlags = this->subtimer;
|
||||
CreateItemEntity(ITEM_QST_DOGFOOD, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080652E4(Entity* this) {
|
||||
if (this->actionDelay != 0) {
|
||||
this->actionDelay -= 1;
|
||||
if (this->timer != 0) {
|
||||
this->timer -= 1;
|
||||
} else {
|
||||
if (gPlayerEntity.action != PLAYER_ITEMGET) {
|
||||
this->subAction += 1;
|
||||
@@ -160,7 +160,7 @@ void sub_08065338(Entity* this) {
|
||||
if ((gMessage.doTextBox & 0x7f) == 0) {
|
||||
this->action = 1;
|
||||
this->subAction = gMessage.doTextBox & 0x7f;
|
||||
gRoomVars.animFlags = this->field_0xf;
|
||||
gRoomVars.animFlags = this->subtimer;
|
||||
InitializeAnimation(this, 4);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -22,7 +22,7 @@ void Sturgeon(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
if (LoadExtraSpriteData(this, &gUnk_0810FA38) != 0) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 0;
|
||||
this->timer = 0;
|
||||
sub_0807DD50(this);
|
||||
}
|
||||
} else {
|
||||
@@ -62,14 +62,14 @@ ASM_FUNC("asm/non_matching/sturgeon/sub_08064B88.inc", void sub_08064B88(Entity*
|
||||
void sub_08064C2C(Entity* this) {
|
||||
if ((gMessage.doTextBox & 0x7f) == 0) {
|
||||
this->action = 1;
|
||||
InitializeAnimation(this, (u32)this->field_0xf);
|
||||
InitializeAnimation(this, (u32)this->subtimer);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08064C50(Entity* this) {
|
||||
if (UpdateFuseInteraction(this) != 0) {
|
||||
this->action = 1;
|
||||
InitializeAnimation(this, this->field_0xf);
|
||||
InitializeAnimation(this, this->subtimer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ void Sturgeon_Head(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08064C9C(Entity* this) {
|
||||
if ((this->actionDelay != 0) && ((gRoomTransition.frameCount & 3U) == 0)) {
|
||||
if ((this->timer != 0) && ((gRoomTransition.frameCount & 3U) == 0)) {
|
||||
CreateDust(this);
|
||||
}
|
||||
}
|
||||
@@ -105,11 +105,11 @@ void sub_08064CD8(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08064D08(Entity* this) {
|
||||
this->actionDelay = 1;
|
||||
this->timer = 1;
|
||||
}
|
||||
|
||||
void sub_08064D10(Entity* this) {
|
||||
this->actionDelay = 0;
|
||||
this->timer = 0;
|
||||
}
|
||||
|
||||
void Sturgeon_Fusion(Entity* this) {
|
||||
|
||||
+4
-4
@@ -23,7 +23,7 @@ void sub_08065570(Entity* this) {
|
||||
InitializeAnimation(this, 0);
|
||||
sub_08078778(this);
|
||||
this->action = 1;
|
||||
this->field_0xf = 1;
|
||||
this->subtimer = 1;
|
||||
this->animationState = 2;
|
||||
}
|
||||
}
|
||||
@@ -32,9 +32,9 @@ void sub_0806559C(Entity* this) {
|
||||
s32 offset;
|
||||
s32 result;
|
||||
|
||||
this->actionDelay++;
|
||||
if (this->actionDelay >= 9) {
|
||||
this->actionDelay = 0;
|
||||
this->timer++;
|
||||
if (this->timer >= 9) {
|
||||
this->timer = 0;
|
||||
result = GetAnimationStateInRectRadius(this, 0x20, 0x20);
|
||||
if (result < 0) {
|
||||
offset = this->animationState + 4;
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ void Teachers(Entity* this) {
|
||||
if (LoadExtraSpriteData(this, &gUnk_08113910[this->type * 4])) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
this->animationState = this->actionDelay;
|
||||
this->animationState = this->timer;
|
||||
this->field_0x68.HALF.HI = 0;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD50(this);
|
||||
|
||||
@@ -26,7 +26,7 @@ void sub_08064D78(Entity* this) {
|
||||
|
||||
void sub_08064D90(Entity* this) {
|
||||
InitAnimationForceUpdate(this, 2);
|
||||
this->field_0xf = 1;
|
||||
this->subtimer = 1;
|
||||
}
|
||||
|
||||
void sub_08064DA0(Entity* this) {
|
||||
|
||||
@@ -40,12 +40,12 @@ void sub_0806ABFC(Entity* this) {
|
||||
|
||||
InitializeAnimation(this, 2);
|
||||
this->action = 1;
|
||||
this->field_0x6a.HALF.LO = this->actionDelay;
|
||||
this->field_0x6a.HALF.LO = this->timer;
|
||||
|
||||
this->animationState = this->field_0x6a.HALF.LO << 1;
|
||||
this->field_0x68.HALF.HI = this->animationState * 4;
|
||||
|
||||
this->actionDelay = 0;
|
||||
this->timer = 0;
|
||||
}
|
||||
|
||||
void sub_0806AC3C(Entity* this) {
|
||||
@@ -85,10 +85,10 @@ void sub_0806ACC4(Entity* this) {
|
||||
return;
|
||||
|
||||
this->action = 1;
|
||||
delay = this->actionDelay;
|
||||
delay = this->timer;
|
||||
this->field_0x6a.HALF.LO = delay;
|
||||
this->animationState = delay * 2;
|
||||
this->actionDelay = 0;
|
||||
this->timer = 0;
|
||||
|
||||
this->field_0x68.HALF.LO = sub_0801E99C(this);
|
||||
sub_0807DD50(this);
|
||||
@@ -175,7 +175,7 @@ void sub_0806AEA8(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0806AED8(Entity* this) {
|
||||
this->actionDelay = 0;
|
||||
this->timer = 0;
|
||||
sub_0806AEE4(this);
|
||||
}
|
||||
|
||||
@@ -184,10 +184,10 @@ void sub_0806AEE4(Entity* this) {
|
||||
u8* idx3;
|
||||
u8 tmp1, tmp2;
|
||||
|
||||
if (this->actionDelay) {
|
||||
this->actionDelay--;
|
||||
if (this->timer) {
|
||||
this->timer--;
|
||||
} else {
|
||||
this->actionDelay = 2;
|
||||
this->timer = 2;
|
||||
index = GetFacingDirectionInRectRadius(this, 0x20, 0x20);
|
||||
if (index < 0) {
|
||||
int state = this->field_0x6a.HALF.LO;
|
||||
|
||||
@@ -36,7 +36,7 @@ void Townsperson(Entity* this) {
|
||||
void sub_08061BC8(Entity* this) {
|
||||
if (LoadExtraSpriteData(this, gUnk_0810B6EC[this->type])) {
|
||||
this->animationState = 2;
|
||||
this->field_0xf = this->type + 1;
|
||||
this->subtimer = this->type + 1;
|
||||
this->action++;
|
||||
sub_08061CB4(this, 2);
|
||||
}
|
||||
@@ -49,10 +49,10 @@ void sub_08061C00(Entity* this) {
|
||||
if (uVar1 < 0) {
|
||||
uVar1 = this->animationState + 4;
|
||||
} else {
|
||||
if (this->field_0xf == 0) {
|
||||
this->field_0xf = 0x10;
|
||||
if (this->subtimer == 0) {
|
||||
this->subtimer = 0x10;
|
||||
} else {
|
||||
this->field_0xf--;
|
||||
this->subtimer--;
|
||||
uVar1 = this->animIndex & 3;
|
||||
}
|
||||
}
|
||||
@@ -89,7 +89,7 @@ void sub_08061CEC(Entity* this) {
|
||||
if (LoadExtraSpriteData(this, gUnk_0810B6EC[this->type])) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
this->animationState = this->actionDelay;
|
||||
this->animationState = this->timer;
|
||||
this->field_0x68.HALF.HI = 0xff;
|
||||
uVar2 = sub_0805ACC0(this);
|
||||
if (uVar2 == 0) {
|
||||
|
||||
+13
-13
@@ -28,12 +28,12 @@ void VaatiRebornAction0(Entity* this) {
|
||||
|
||||
this->action = 1;
|
||||
this->subAction = 0;
|
||||
this->actionDelay = 0;
|
||||
this->timer = 0;
|
||||
switch (this->type) {
|
||||
case 0:
|
||||
this->y.HALF.HI -= 0xa0;
|
||||
this->actionDelay = 0xa0;
|
||||
this->field_0xf = 0x20;
|
||||
this->timer = 0xa0;
|
||||
this->subtimer = 0x20;
|
||||
this->spriteOffsetY = 0x20;
|
||||
for (i = 0; i < 4; i++) {
|
||||
entity = CreateNPC(VAATI_REBORN, 2, i);
|
||||
@@ -59,8 +59,8 @@ void VaatiRebornAction0(Entity* this) {
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
break;
|
||||
case 3:
|
||||
this->actionDelay = 1;
|
||||
this->field_0xf = 0x20;
|
||||
this->timer = 1;
|
||||
this->subtimer = 0x20;
|
||||
entity = CreateNPC(VAATI_REBORN, 4, 0);
|
||||
if (entity != NULL) {
|
||||
CopyPosition(this, entity);
|
||||
@@ -93,7 +93,7 @@ void VaatiRebornAction1(Entity* this) {
|
||||
switch (this->type) {
|
||||
case 0:
|
||||
this->y.HALF.HI++;
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
entity = CreateNPC(VAATI_REBORN, 3, 0);
|
||||
if (entity == NULL) {
|
||||
break;
|
||||
@@ -104,8 +104,8 @@ void VaatiRebornAction1(Entity* this) {
|
||||
DeleteThisEntity();
|
||||
return;
|
||||
}
|
||||
if (this->field_0xf-- == 1) {
|
||||
this->field_0xf = 0x20;
|
||||
if (this->subtimer-- == 1) {
|
||||
this->subtimer = 0x20;
|
||||
SoundReq(SFX_1A9);
|
||||
}
|
||||
UpdateAnimationSingleFrame(this);
|
||||
@@ -125,7 +125,7 @@ void VaatiRebornAction1(Entity* this) {
|
||||
case 3:
|
||||
switch (this->subAction) {
|
||||
case 0:
|
||||
if (--this->actionDelay == 0) {
|
||||
if (--this->timer == 0) {
|
||||
this->subAction += 1;
|
||||
}
|
||||
break;
|
||||
@@ -140,13 +140,13 @@ void VaatiRebornAction1(Entity* this) {
|
||||
if ((this->frame & 0x10) != 0) {
|
||||
this->frame &= 0xef;
|
||||
|
||||
switch (++this->actionDelay) {
|
||||
switch (++this->timer) {
|
||||
case 1:
|
||||
break;
|
||||
case 10:
|
||||
this->subAction++;
|
||||
EnqueueSFX(SFX_SUMMON);
|
||||
this->actionDelay = 0;
|
||||
this->timer = 0;
|
||||
InitAnimationForceUpdate(this, this->subAction - 1);
|
||||
break;
|
||||
}
|
||||
@@ -160,8 +160,8 @@ void VaatiRebornAction1(Entity* this) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (--this->field_0xf == 0) {
|
||||
this->field_0xf = 0x20;
|
||||
if (--this->subtimer == 0) {
|
||||
this->subtimer = 0x20;
|
||||
SoundReq(SFX_1A9);
|
||||
}
|
||||
UpdateAnimationSingleFrame(this);
|
||||
|
||||
@@ -38,7 +38,7 @@ void sub_0806C798(Entity* this) {
|
||||
if (iVar1 != 0) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
this->animationState = this->actionDelay;
|
||||
this->animationState = this->timer;
|
||||
sub_0807DD50(this);
|
||||
sub_0806C7D4(this);
|
||||
}
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ void sub_08066D4C(Entity* this, ScriptExecutionContext* context) {
|
||||
this->parent->spriteSettings.draw = 1;
|
||||
this->parent->animationState = this->animationState;
|
||||
this->spriteSettings.draw = 0;
|
||||
this->field_0x17 &= 0xFE;
|
||||
this->followerFlag &= 0xFE;
|
||||
sub_08068694(this, this->parent);
|
||||
context->condition = 1;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user