mirror of
https://github.com/zeldaret/tmc
synced 2026-07-12 07:38:02 -04:00
cleanup
This commit is contained in:
+1
-1
@@ -55,7 +55,7 @@ void CopyOAM(void) {
|
||||
void DrawEntities(void) {
|
||||
void (*fn)(void);
|
||||
|
||||
gOAMControls._0[6] = gRoomTransition.field_0x2c[3] ? 15 : 0;
|
||||
gOAMControls._0[6] = gRoomTransition.field_0x2c[2] ? 15 : 0;
|
||||
gOAMControls._4 = gRoomControls.aff_x + gRoomControls.scroll_x;
|
||||
gOAMControls._6 = gRoomControls.aff_y + gRoomControls.scroll_y;
|
||||
gOAMControls.field_0x1++;
|
||||
|
||||
+13
-13
@@ -32,7 +32,7 @@ void sub_0805EC60(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
ASM_FUNC("asm/non_matching/sub_0805EC9C.inc", bool32 sub_0805EC9C(Entity* ent, u32 param_2, u32 param_3, u32 param_4))
|
||||
ASM_FUNC("asm/non_matching/SetAffineInfo.inc", bool32 SetAffineInfo(Entity* ent, u32 param_2, u32 param_3, u32 param_4))
|
||||
|
||||
void sub_0805ECEC(int param_1, u32 param_2, u32 param_3, u32 param_4) {
|
||||
u16* temp;
|
||||
@@ -45,46 +45,46 @@ void sub_0805ECEC(int param_1, u32 param_2, u32 param_3, u32 param_4) {
|
||||
temp[2] = param_4;
|
||||
}
|
||||
|
||||
void sub_0805ED14(u32 param_1) {
|
||||
void InitPlayerMacro(u32 param_1) {
|
||||
gPlayerState.field_0x9c = param_1;
|
||||
gPlayerState.field_0x98 = 0;
|
||||
gPlayerState.field_0x9a = 0;
|
||||
}
|
||||
|
||||
ASM_FUNC("asm/non_matching/code_0805EC04/sub_0805ED30.inc", void sub_0805ED30())
|
||||
ASM_FUNC("asm/non_matching/code_0805EC04/UpdatePlayerInput.inc", void UpdatePlayerInput())
|
||||
|
||||
u32 sub_0805EE04(u32 param_1) {
|
||||
u32 result = (s32) - (param_1 & 0x200) >> 0x1f & 0x1000;
|
||||
if ((param_1 & 0x100) != 0) {
|
||||
u32 ConvInputToState(u32 keys) {
|
||||
u32 result = (s32) - (keys & 0x200) >> 0x1f & 0x1000;
|
||||
if (keys & R_BUTTON) {
|
||||
result |= 0x20;
|
||||
result |= 0x8000;
|
||||
result |= 0x80;
|
||||
}
|
||||
if ((param_1 & 1) != 0) {
|
||||
if (keys & A_BUTTON) {
|
||||
result |= 0x8;
|
||||
result |= 0x41;
|
||||
}
|
||||
if ((param_1 & 2) != 0) {
|
||||
if (keys & B_BUTTON) {
|
||||
result |= 0x10;
|
||||
result |= 0x2;
|
||||
}
|
||||
if ((param_1 & 0x10) != 0) {
|
||||
if (keys & DPAD_RIGHT) {
|
||||
result |= 0x100;
|
||||
}
|
||||
if ((param_1 & 0x20) != 0) {
|
||||
if (keys & DPAD_LEFT) {
|
||||
result |= 0x200;
|
||||
}
|
||||
if ((param_1 & 0x40) != 0) {
|
||||
if (keys & DPAD_UP) {
|
||||
result |= 0x400;
|
||||
}
|
||||
if ((param_1 & 0x80) != 0) {
|
||||
if (keys & DPAD_DOWN) {
|
||||
result |= 0x800;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void sub_0805EE88(void) {
|
||||
if ((gRoomTransition.field_0x2c[3] != 0) && ((gRoomTransition.frameCount & 3) == 0)) {
|
||||
if ((gRoomTransition.field_0x2c[2] != 0) && ((gRoomTransition.frameCount & 3) == 0)) {
|
||||
LoadPaletteGroup((((u32)gRoomTransition.frameCount & 0xc) >> 2) + 0x2f);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -370,7 +370,7 @@ s32 sub_08017B1C(Entity* org, Entity* tgt, u32 direction, ColSettings* settings)
|
||||
s32 sub_08017B58(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
|
||||
if ((tgt->field_0x3a & 4) != 0) {
|
||||
if (tgt->field_0x1d) {
|
||||
s32 x = tgt->field_0x1d = tgt->field_0x1d - gPlayerState.field_0x1d;
|
||||
s32 x = tgt->field_0x1d = tgt->field_0x1d - gPlayerState.gustJarSpeed;
|
||||
if (x << 24 <= 0) {
|
||||
tgt->field_0x1d = 0;
|
||||
tgt->subAction = 2;
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ void sub_0801D000(u32 a1) {
|
||||
tmp = 0;
|
||||
}
|
||||
|
||||
roomTransition->field_0x2c[3] = tmp;
|
||||
roomTransition->field_0x2c[2] = tmp;
|
||||
if (a1) {
|
||||
CleanUpObjPalettes();
|
||||
sub_0801CFD0(0xf);
|
||||
|
||||
+8
-8
@@ -20,7 +20,6 @@ extern const u16 gUnk_080047F6[];
|
||||
|
||||
u32 sub_0806F58C(Entity*, Entity*);
|
||||
u32 sub_0806FCA0(Entity*, Entity*);
|
||||
void UnloadHitbox(Entity*);
|
||||
extern u32 sub_08007DD6(u32, const u16*);
|
||||
u32 PointInsideRadius(s32 x, s32 y, s32 radius);
|
||||
extern void sub_0806FEE8(struct_gUnk_020000C0_1*, u32, u32, u32);
|
||||
@@ -61,7 +60,7 @@ bool32 sub_0806F3E4(Entity* ent) {
|
||||
|
||||
if ((gPlayerState.field_0x1c & 0x7F) != 1)
|
||||
return 0;
|
||||
switch (gPlayerState.field_0x1d) {
|
||||
switch (gPlayerState.gustJarSpeed) {
|
||||
case 1:
|
||||
ent->knockbackSpeed += 64;
|
||||
break;
|
||||
@@ -329,12 +328,12 @@ void sub_0806FA90(Entity* source, Entity* target, s32 offsetX, s32 offsetY) {
|
||||
PositionRelative(source, target, Q_16_16(offsetX), Q_16_16(offsetY));
|
||||
}
|
||||
|
||||
void SortEntityAbove(Entity* param_1, Entity* param_2) {
|
||||
param_2->spritePriority.b0 = gSpriteSortAboveTable[param_1->spritePriority.b0];
|
||||
void SortEntityAbove(Entity* below_ent, Entity* above_ent) {
|
||||
above_ent->spritePriority.b0 = gSpriteSortAboveTable[below_ent->spritePriority.b0];
|
||||
}
|
||||
|
||||
void SortEntityBelow(Entity* param_1, Entity* param_2) {
|
||||
param_2->spritePriority.b0 = gSpriteSortBelowTable[param_1->spritePriority.b0];
|
||||
void SortEntityBelow(Entity* above_ent, Entity* below_ent) {
|
||||
below_ent->spritePriority.b0 = gSpriteSortBelowTable[above_ent->spritePriority.b0];
|
||||
}
|
||||
|
||||
void sub_0806FB00(Entity* ent, u32 param_1, u32 param_2, u32 param_3) {
|
||||
@@ -380,9 +379,10 @@ void sub_0806FBB4(Entity* ent) {
|
||||
}
|
||||
}
|
||||
|
||||
void AllocMutableHitbox(Entity* ent) {
|
||||
void* AllocMutableHitbox(Entity* ent) {
|
||||
UnloadHitbox(ent);
|
||||
ent->hitbox = zMalloc(sizeof(Hitbox3D));
|
||||
return ent->hitbox;
|
||||
}
|
||||
|
||||
void UnloadHitbox(Entity* ent) {
|
||||
@@ -538,7 +538,7 @@ u32 LoadExtraSpriteData(Entity* ent, const SpriteLoadData* data) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
void sub_0806FE84(Entity* ent) {
|
||||
void UnloadOBJPalette2(Entity* ent) {
|
||||
u32 index;
|
||||
u32 spriteAnimation = ent->spriteAnimation[2];
|
||||
ent->spriteAnimation[2] = 0;
|
||||
|
||||
@@ -155,7 +155,7 @@ void sub_08031B48(Entity* this) {
|
||||
this->frame = 0;
|
||||
COLLISION_ON(this);
|
||||
} else {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 0x3;
|
||||
this->actionDelay = gUnk_080CE5B0[Random() & 7];
|
||||
InitializeAnimation(this, 1);
|
||||
@@ -188,7 +188,7 @@ void sub_08031B98(Entity* this) {
|
||||
|
||||
void sub_08031C1C(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = '\x01';
|
||||
this->actionDelay = gUnk_080CE5B8[Random() & 7];
|
||||
this->spriteSettings.draw = 0;
|
||||
@@ -199,7 +199,7 @@ void sub_08031C58(Entity* this) {
|
||||
Entity *a, *b;
|
||||
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (gEntCount < 0x43) {
|
||||
u32 tmp = Random();
|
||||
tmp &= 3;
|
||||
@@ -274,7 +274,7 @@ void sub_08031DA0(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08031DC4(Entity* this) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 0xb4;
|
||||
this->spriteSettings.draw = 0;
|
||||
@@ -360,7 +360,7 @@ void sub_08031F54(Entity* this) {
|
||||
|
||||
void sub_08031FB0(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) && (this->parent || --this->actionDelay == 0)) {
|
||||
if ((this->frame & ANIM_DONE) && (this->parent || --this->actionDelay == 0)) {
|
||||
this->action = 4;
|
||||
this->direction = sub_08049F84(this, 1);
|
||||
*(u8*)&this->field_0x76 = 0;
|
||||
@@ -469,7 +469,7 @@ void sub_08032204(Entity* this) {
|
||||
this->frame = 0;
|
||||
this->frameDuration = (Random() & 0x30) + 30;
|
||||
} else {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 9;
|
||||
InitializeAnimation(this, 13);
|
||||
}
|
||||
@@ -478,7 +478,7 @@ void sub_08032204(Entity* this) {
|
||||
|
||||
void sub_08032248(Entity* this) {
|
||||
if (GravityUpdate(this, Q_8_8(24.0)) == 0) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
((Entity*)this->field_0x7c.WORD)->actionDelay--;
|
||||
|
||||
DeleteEntity(this);
|
||||
|
||||
+6
-6
@@ -113,7 +113,7 @@ void sub_080301D4(ArmosEntity* this) {
|
||||
|
||||
void sub_08030240(ArmosEntity* this) {
|
||||
if (super->animIndex == 6) {
|
||||
if ((super->frame & 0x80) == 0) {
|
||||
if ((super->frame & ANIM_DONE) == 0) {
|
||||
GetNextFrame(super);
|
||||
}
|
||||
}
|
||||
@@ -188,8 +188,8 @@ void sub_08030338(ArmosEntity* this) {
|
||||
EnqueueSFX(SFX_12A);
|
||||
return;
|
||||
}
|
||||
bVar2 = super->frame & 0x80;
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
bVar2 = super->frame & ANIM_DONE;
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
if (this->unk_80 != 2) {
|
||||
super->action = 3;
|
||||
super->animationState = 0xff;
|
||||
@@ -244,7 +244,7 @@ NONMATCH("asm/non_matching/armos/sub_080304BC.inc", void sub_080304BC(ArmosEntit
|
||||
u32 tmp;
|
||||
|
||||
sub_080309A8(this);
|
||||
tmp = super->frame & 0x80;
|
||||
tmp = super->frame & ANIM_DONE;
|
||||
if (tmp != 0) {
|
||||
sub_08030580(this);
|
||||
} else {
|
||||
@@ -267,7 +267,7 @@ void sub_080304F4(ArmosEntity* this) {
|
||||
}
|
||||
|
||||
void sub_08030524(ArmosEntity* this) {
|
||||
if ((super->frame & 0x80) == 0) {
|
||||
if ((super->frame & ANIM_DONE) == 0) {
|
||||
sub_080309A8(this);
|
||||
} else if (super->frame == 1) {
|
||||
super->frame = 0;
|
||||
@@ -277,7 +277,7 @@ void sub_08030524(ArmosEntity* this) {
|
||||
|
||||
void sub_08030554(ArmosEntity* this) {
|
||||
sub_080309A8(this);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action = 3;
|
||||
sub_080309C8(this, (u32)super->animationState);
|
||||
sub_080306C4(this);
|
||||
|
||||
@@ -150,7 +150,7 @@ void sub_0803E71C(BallChainSoldierEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0803E75C(BallChainSoldierEntity* this) {
|
||||
if ((super->frame & 0x80) == 0) {
|
||||
if ((super->frame & ANIM_DONE) == 0) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
} else {
|
||||
if (--super->actionDelay == 0) {
|
||||
|
||||
+4
-4
@@ -117,7 +117,7 @@ void sub_080218CC(Entity* this) {
|
||||
this->frameDuration = 1;
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 2;
|
||||
this->actionDelay = (Random() & 0x38) + 8;
|
||||
this->field_0xf = 1;
|
||||
@@ -209,7 +209,7 @@ void sub_08021AD8(Entity* this) {
|
||||
this->frameDuration = 1;
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 20;
|
||||
((u8*)&this->field_0x86)[0] = 60;
|
||||
@@ -268,7 +268,7 @@ void sub_08021C58(Entity* this) {
|
||||
this->frameDuration = 1;
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 60;
|
||||
this->field_0xf = 1;
|
||||
@@ -280,7 +280,7 @@ void sub_08021C58(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08021CD0(Entity* this) {
|
||||
if ((this->frame & 0x80) == 0)
|
||||
if ((this->frame & ANIM_DONE) == 0)
|
||||
GetNextFrame(this);
|
||||
|
||||
if (sub_08049F84(this, 1) == 0xff)
|
||||
|
||||
+2
-2
@@ -245,7 +245,7 @@ void sub_0802CAF8(Entity* this) {
|
||||
EnqueueSFX(SFX_104);
|
||||
}
|
||||
sub_0802CC18(this);
|
||||
sub_08078930(this);
|
||||
RegisterCarryEntity(this);
|
||||
if (this->field_0xf && this->z.HALF.HI == 0) {
|
||||
this->field_0xf = 0;
|
||||
COLLISION_ON(this);
|
||||
@@ -286,7 +286,7 @@ void sub_0802CBC4(Entity* this) {
|
||||
if (this->field_0x82.HALF.HI) {
|
||||
sub_08079184();
|
||||
}
|
||||
sub_08078954(this);
|
||||
FreeCarryEntity(this);
|
||||
|
||||
ent = CreateObjectWithParent(this, OBJECT_20, 0, 0);
|
||||
if (ent) {
|
||||
|
||||
@@ -289,7 +289,7 @@ void sub_0802AB40(Entity* this) {
|
||||
#endif
|
||||
|
||||
void sub_0802AC08(Entity* this) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 2;
|
||||
this->subAction = 0;
|
||||
this->actionDelay = 0x40;
|
||||
@@ -470,7 +470,7 @@ void sub_0802AED4(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
if (!sub_0800442E(this)) {
|
||||
sub_08078930(this);
|
||||
RegisterCarryEntity(this);
|
||||
}
|
||||
}
|
||||
if (this->type2 != 0 && this->field_0x80.HALF.HI) {
|
||||
@@ -535,7 +535,7 @@ NONMATCH("asm/non_matching/bombPeahat/sub_0802AFC8.inc", void sub_0802AFC8(Entit
|
||||
this->field_0x82.HWORD ^= 0x8000;
|
||||
}
|
||||
tmp = 0x130 - (this->field_0x82.HWORD & 0xf0);
|
||||
sub_0805EC9C(this, tmp, tmp, 0);
|
||||
SetAffineInfo(this, tmp, tmp, 0);
|
||||
}
|
||||
if (this->field_0xf & flag) {
|
||||
this->palette.b.b0 = this->palette.b.b4;
|
||||
@@ -572,7 +572,7 @@ void sub_0802B048(Entity* this) {
|
||||
this->field_0xf = 0x50;
|
||||
this->field_0x82.HWORD = 0;
|
||||
this->spriteRendering.b0 = 3;
|
||||
sub_0805EC9C(this, 0x100, 0x100, 0);
|
||||
SetAffineInfo(this, 0x100, 0x100, 0);
|
||||
}
|
||||
} else {
|
||||
if (this->field_0xf) {
|
||||
@@ -587,7 +587,7 @@ void sub_0802B048(Entity* this) {
|
||||
this->spriteSettings.draw = 0;
|
||||
COLLISION_ON(this);
|
||||
this->field_0x7a.HALF.HI = 0;
|
||||
sub_08078954(this);
|
||||
FreeCarryEntity(this);
|
||||
if (this->parent->next) {
|
||||
this->parent->field_0x80.HALF.HI = 0;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ void sub_08028A74(Entity* this) {
|
||||
switch (this->subAction) {
|
||||
case 0:
|
||||
unk = 1;
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->subAction = 1;
|
||||
this->actionDelay = 0x3c;
|
||||
this->field_0xf = 0x10;
|
||||
@@ -150,7 +150,7 @@ void sub_08028A74(Entity* this) {
|
||||
break;
|
||||
case 3:
|
||||
unk = 2;
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->subAction = 4;
|
||||
this->actionDelay = 0x50;
|
||||
sub_080290E0(this, 1);
|
||||
@@ -189,7 +189,7 @@ void sub_08028BC4(Entity* this) {
|
||||
switch (this->subAction) {
|
||||
case 0:
|
||||
if (this->actionDelay == 0) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->subAction = 1;
|
||||
sub_08028FDC(this);
|
||||
sub_080290E0(this, 5);
|
||||
@@ -200,7 +200,7 @@ void sub_08028BC4(Entity* this) {
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 4;
|
||||
this->subAction = 0;
|
||||
this->actionDelay = 0x1e;
|
||||
|
||||
@@ -100,7 +100,7 @@ void sub_08045CE0(BusinessScrubPrologueEntity* this) {
|
||||
switch (super->subAction) {
|
||||
case 0:
|
||||
r6 = 1;
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
super->subAction = 1;
|
||||
super->actionDelay = 0x3c;
|
||||
super->field_0xf = 0x10;
|
||||
@@ -133,7 +133,7 @@ void sub_08045CE0(BusinessScrubPrologueEntity* this) {
|
||||
break;
|
||||
case 3:
|
||||
r6 = 2;
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
super->subAction = 4;
|
||||
super->actionDelay = 0x50;
|
||||
sub_08046030(this, 1);
|
||||
@@ -170,7 +170,7 @@ void sub_08045E14(BusinessScrubPrologueEntity* this) {
|
||||
switch (super->subAction) {
|
||||
case 0:
|
||||
if (super->actionDelay == 0) {
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
super->subAction = 1;
|
||||
sub_08045F98(this);
|
||||
sub_08046030(this, 5);
|
||||
@@ -181,7 +181,7 @@ void sub_08045E14(BusinessScrubPrologueEntity* this) {
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
super->action = 5;
|
||||
super->subAction = 0;
|
||||
sub_08046030(this, 0);
|
||||
@@ -222,7 +222,7 @@ void sub_08045EDC(BusinessScrubPrologueEntity* this) {
|
||||
super->frame &= 0xfe;
|
||||
sub_080954AC(super, this->unk_84);
|
||||
EnqueueSFX(SFX_18D);
|
||||
} else if (super->frame & 0x80) {
|
||||
} else if (super->frame & ANIM_DONE) {
|
||||
super->action = 5;
|
||||
super->subAction = 0;
|
||||
sub_08046030(this, 1);
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ void sub_0802B56C(Entity* this) {
|
||||
|
||||
void sub_0802B5C8(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 30;
|
||||
InitializeAnimation(this, 0);
|
||||
|
||||
+17
-17
@@ -155,7 +155,7 @@ void Chuchu_OnDeath(Entity* this) {
|
||||
}
|
||||
|
||||
void Chuchu_OnConfused(Entity* this) {
|
||||
if ((this->frame & 0x80) == 0)
|
||||
if ((this->frame & ANIM_DONE) == 0)
|
||||
GetNextFrame(this);
|
||||
GenericConfused(this);
|
||||
}
|
||||
@@ -173,7 +173,7 @@ void nullsub_4(Entity* this) {
|
||||
|
||||
void sub_0801F0C8(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 3;
|
||||
this->actionDelay = (Random() & 3) + 0xc;
|
||||
this->field_0xf = Random();
|
||||
@@ -221,7 +221,7 @@ void sub_0801F1B0(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (sub_0801FBD0(this)) {
|
||||
sub_0801F328(this);
|
||||
} else {
|
||||
@@ -240,7 +240,7 @@ void sub_0801F228(Entity* this) {
|
||||
|
||||
void sub_0801F250(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_0801F360(this);
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ void sub_0801F270(Entity* this) {
|
||||
|
||||
void sub_0801F2CC(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 0;
|
||||
InitializeAnimation(this, 4);
|
||||
@@ -277,7 +277,7 @@ void sub_0801F2CC(Entity* this) {
|
||||
void sub_0801F2F8(Entity* this) {
|
||||
GravityUpdate(this, 0x1800);
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
sub_0801F340(this);
|
||||
sub_0804AA1C(this);
|
||||
}
|
||||
@@ -362,7 +362,7 @@ void sub_0801F48C(Entity* this) {
|
||||
|
||||
void sub_0801F494(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 3;
|
||||
this->field_0xf = 30;
|
||||
this->direction = sub_08049F84(this, 1);
|
||||
@@ -418,7 +418,7 @@ void sub_0801F584(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (sub_0801FBD0(this)) {
|
||||
this->field_0x82.HALF.HI = 0;
|
||||
sub_0801F730(this);
|
||||
@@ -440,7 +440,7 @@ void sub_0801F61C(Entity* this) {
|
||||
|
||||
void sub_0801F638(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 8;
|
||||
this->field_0xf = 30;
|
||||
this->direction = sub_08049F84(this, 1);
|
||||
@@ -465,7 +465,7 @@ void sub_0801F688(Entity* this) {
|
||||
|
||||
void sub_0801F6CC(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 0;
|
||||
InitializeAnimation(this, 4);
|
||||
@@ -475,7 +475,7 @@ void sub_0801F6CC(Entity* this) {
|
||||
void sub_0801F6F8(Entity* this) {
|
||||
GravityUpdate(this, 0x1800);
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 4;
|
||||
this->speed = 0x20;
|
||||
sub_0804AA1C(this);
|
||||
@@ -538,7 +538,7 @@ void sub_0801F7FC(Entity* this) {
|
||||
|
||||
void sub_0801F840(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
sub_0801FB14(this);
|
||||
COLLISION_ON(this);
|
||||
this->spritePriority.b0 = 4;
|
||||
@@ -594,7 +594,7 @@ void sub_0801F940(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (sub_0801FBD0(this)) {
|
||||
sub_0801FAE0(this);
|
||||
} else {
|
||||
@@ -614,7 +614,7 @@ void sub_0801F9C4(Entity* this) {
|
||||
|
||||
void sub_0801F9E0(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 8;
|
||||
this->field_0xf = 30;
|
||||
this->direction = sub_08049F84(this, 1);
|
||||
@@ -639,7 +639,7 @@ void sub_0801FA30(Entity* this) {
|
||||
|
||||
void sub_0801FA78(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 0;
|
||||
InitializeAnimation(this, 4);
|
||||
@@ -650,7 +650,7 @@ void sub_0801FA78(Entity* this) {
|
||||
void sub_0801FAAC(Entity* this) {
|
||||
GravityUpdate(this, 0x1800);
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
sub_0801FB14(this);
|
||||
this->speed = 0x20;
|
||||
sub_0804AA1C(this);
|
||||
@@ -705,7 +705,7 @@ void sub_0801FB68(Entity* this) {
|
||||
}
|
||||
|
||||
u32 sub_0801FBD0(Entity* this) {
|
||||
if (sub_080B1AA8(this) == 0x10) {
|
||||
if (GetTileUnderEntity(this) == 0x10) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
||||
@@ -164,7 +164,7 @@ void sub_08038F20(CuccoAggrEntity* this) {
|
||||
sub_08039298(this);
|
||||
GetNextFrame(super);
|
||||
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
sub_0803901C(this);
|
||||
}
|
||||
}
|
||||
@@ -328,7 +328,7 @@ void CuccoAggr_CreateFx(CuccoAggrEntity* this) {
|
||||
|
||||
void sub_08039298(CuccoAggrEntity* this) {
|
||||
if (super->type2 == 0) {
|
||||
sub_08078930(super);
|
||||
RegisterCarryEntity(super);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -49,7 +49,7 @@ void sub_08048268(Entity* this) {
|
||||
}
|
||||
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->actionDelay = 0;
|
||||
InitializeAnimation(this, 0);
|
||||
}
|
||||
@@ -58,7 +58,7 @@ void sub_08048268(Entity* this) {
|
||||
void sub_08048294(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 3;
|
||||
SetLocalFlag(0x72);
|
||||
InitializeAnimation(this, 1);
|
||||
|
||||
+13
-13
@@ -141,7 +141,7 @@ void sub_08020D9C(Entity* this) {
|
||||
|
||||
void sub_08020DB4(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_08021390(this);
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ void sub_08020DD4(Entity* this) {
|
||||
|
||||
void sub_08020E28(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_080213B0(this);
|
||||
}
|
||||
|
||||
@@ -170,14 +170,14 @@ void sub_08020E48(Entity* this) {
|
||||
sub_080213F0(this);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_080213B0(this);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08020E78(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_08021390(this);
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ void sub_08020E98(Entity* this) {
|
||||
|
||||
void sub_08020F28(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_08021400(this);
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ void sub_08020F48(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08020FAC(Entity* this) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (this->field_0x7a.HALF.LO) {
|
||||
this->field_0x7a.HALF.LO--;
|
||||
} else {
|
||||
@@ -264,7 +264,7 @@ void sub_08020FE4(Entity* this) {
|
||||
|
||||
void sub_08021010(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->hitType = 0x56;
|
||||
sub_080213F0(this);
|
||||
}
|
||||
@@ -280,7 +280,7 @@ void sub_08021038(Entity* this) {
|
||||
EnqueueSFX(SFX_10E);
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
sub_08021588(this);
|
||||
if (this->field_0x7c.BYTES.byte0) {
|
||||
this->field_0x7c.BYTES.byte0--;
|
||||
@@ -300,7 +300,7 @@ void sub_080210A8(Entity* this) {
|
||||
this->frame = 0;
|
||||
sub_08021588(this);
|
||||
EnqueueSFX(SFX_15D);
|
||||
} else if (this->frame & 0x80) {
|
||||
} else if (this->frame & ANIM_DONE) {
|
||||
sub_08021390(this);
|
||||
}
|
||||
}
|
||||
@@ -330,7 +330,7 @@ void sub_080210E4(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08021170(Entity* this) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (this->field_0x7a.HALF.HI) {
|
||||
this->field_0x7a.HALF.HI--;
|
||||
} else {
|
||||
@@ -346,7 +346,7 @@ void sub_080211A0(Entity* this) {
|
||||
sub_08021390(this);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_080213B0(this);
|
||||
}
|
||||
}
|
||||
@@ -357,7 +357,7 @@ void sub_080211D0(Entity* this)
|
||||
UpdateAnimationSingleFrame(this);
|
||||
sub_0802159C(this);
|
||||
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_08021390(this);
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ void sub_080211F4(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
sub_08021600(this);
|
||||
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
sub_08021390(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ void sub_080220D8(Entity* this) {
|
||||
|
||||
void sub_080220F0(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
const PosOffset* off;
|
||||
u32 i;
|
||||
|
||||
@@ -107,7 +107,7 @@ void sub_08022174(Entity* this) {
|
||||
void sub_08022198(Entity* this) {
|
||||
sub_0800445C(this);
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 0x5a;
|
||||
}
|
||||
|
||||
+1
-1
@@ -207,7 +207,7 @@ void Enemy4D_Action6(Enemy4DEntity* this) {
|
||||
}
|
||||
|
||||
void Enemy4D_Action7(Enemy4DEntity* this) {
|
||||
if ((super->frame & 0x80) == 0) {
|
||||
if ((super->frame & ANIM_DONE) == 0) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
} else {
|
||||
if (--super->actionDelay == 0) {
|
||||
|
||||
+2
-2
@@ -223,7 +223,7 @@ void Enemy50_Action2(Enemy50Entity* this) {
|
||||
|
||||
void Enemy50_Action3(Enemy50Entity* this) {
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->flags |= 0x80;
|
||||
this->unk_7c = this->unk_80 * ((Random() & 0x30) + 0x3c) + 0x78;
|
||||
sub_08041128(this);
|
||||
@@ -292,7 +292,7 @@ void Enemy50_Action7(Enemy50Entity* this) {
|
||||
void Enemy50_Action8(Enemy50Entity* this) {
|
||||
sub_0803F738(this);
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action = 9;
|
||||
this->unk_78 = 0;
|
||||
InitializeAnimation(super, 4);
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ void Enemy64(Enemy64Entity* this) {
|
||||
super->subAction = 0;
|
||||
}
|
||||
Enemy64_Actions[super->action](this);
|
||||
sub_0805EC9C(super, 0xaa, 0xaa, this->unk_78);
|
||||
SetAffineInfo(super, 0xaa, 0xaa, this->unk_78);
|
||||
super->animationState = -(this->unk_78 >> 8);
|
||||
sub_080499F0(this);
|
||||
this->unk_7d = super->spriteSettings.draw;
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ void sub_08023000(Entity* this, int frames) {
|
||||
tmp *= -1;
|
||||
|
||||
this->spriteRendering.b0 = 3;
|
||||
sub_0805EC9C(this, tmp, 0x80, 0);
|
||||
SetAffineInfo(this, tmp, 0x80, 0);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
|
||||
+6
-6
@@ -196,7 +196,7 @@ void Eyegore_Action3(EyegoreEntity* this) {
|
||||
super->spriteOffsetX = gUnk_080CE2BC[--super->actionDelay & 3];
|
||||
} else {
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->flags |= ENT_COLLIDE;
|
||||
super->animationState = 2;
|
||||
sub_08030E58(this);
|
||||
@@ -214,7 +214,7 @@ void Eyegore_Action4(EyegoreEntity* this) {
|
||||
sub_08030E3C(this);
|
||||
break;
|
||||
case 2:
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->animationState = this->unk_7f;
|
||||
InitializeAnimation(super, super->animationState + 4);
|
||||
}
|
||||
@@ -227,7 +227,7 @@ void Eyegore_Action4(EyegoreEntity* this) {
|
||||
|
||||
break;
|
||||
default:
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
InitializeAnimation(super, super->animationState);
|
||||
if ((this->unk_79 & 0x80) != 0) {
|
||||
super->action = 5;
|
||||
@@ -252,7 +252,7 @@ void Eyegore_Action5(EyegoreEntity* this) {
|
||||
sub_08030E3C(this);
|
||||
break;
|
||||
case 2:
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->animationState = this->unk_7f;
|
||||
InitializeAnimation(super, super->animationState + 4);
|
||||
}
|
||||
@@ -261,7 +261,7 @@ void Eyegore_Action5(EyegoreEntity* this) {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
InitializeAnimation(super, super->animationState);
|
||||
if (sub_08049FDC(super, 1)) {
|
||||
sub_08030E58(this);
|
||||
@@ -280,7 +280,7 @@ void Eyegore_Action5(EyegoreEntity* this) {
|
||||
|
||||
void Eyegore_Action6(EyegoreEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action = 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ void (*const gUnk_080CFBD4[])(FlyingSkullEntity*);
|
||||
const s8 gUnk_080CFBE4[4];
|
||||
|
||||
extern s32 sub_080012DC(Entity*);
|
||||
extern void sub_08078930(Entity*);
|
||||
extern void RegisterCarryEntity(Entity*);
|
||||
|
||||
void sub_0803A100(FlyingSkullEntity* this);
|
||||
void sub_0803A0E0(FlyingSkullEntity* this);
|
||||
@@ -130,7 +130,7 @@ void sub_08039DD8(FlyingSkullEntity* this) {
|
||||
sub_0803A0E0(this);
|
||||
}
|
||||
|
||||
sub_08078930(super);
|
||||
RegisterCarryEntity(super);
|
||||
} else {
|
||||
if ((gPlayerState.flags & PL_MINISH) == 0) {
|
||||
Entity* ent = &gPlayerEntity;
|
||||
|
||||
+1
-1
@@ -250,7 +250,7 @@ void Ghini_Action7(GhiniEntity* this) {
|
||||
void Ghini_Action8(GhiniEntity* this) {
|
||||
sub_0803F738(this);
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action = 9;
|
||||
super->flags |= 0x80;
|
||||
this->unk_78 = 0;
|
||||
|
||||
+2
-2
@@ -164,7 +164,7 @@ void sub_08037624(GibdoEntity* this) {
|
||||
|
||||
void sub_08037690(GibdoEntity* this) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
this->field_0x77 = 0x14;
|
||||
sub_08037794(this);
|
||||
} else {
|
||||
@@ -196,7 +196,7 @@ void sub_080376D0(GibdoEntity* this) {
|
||||
|
||||
void sub_0803773C(GibdoEntity* this) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
sub_08037794(this);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -549,7 +549,7 @@ NONMATCH("asm/non_matching/gleerok/sub_0802D86C.inc", void sub_0802D86C(GleerokE
|
||||
|
||||
UpdateAnimationSingleFrame(super);
|
||||
|
||||
if ((super->frame & 0x80) == 0)
|
||||
if ((super->frame & ANIM_DONE) == 0)
|
||||
return;
|
||||
|
||||
enemy = CreateEnemy(GLEEROK, 6);
|
||||
@@ -569,7 +569,7 @@ NONMATCH("asm/non_matching/gleerok/sub_0802D86C.inc", void sub_0802D86C(GleerokE
|
||||
|
||||
GetNextFrame(super);
|
||||
|
||||
if ((super->frame & 0x80) == 0)
|
||||
if ((super->frame & ANIM_DONE) == 0)
|
||||
return;
|
||||
|
||||
enemy = CreateEnemy(GLEEROK, 3);
|
||||
@@ -998,7 +998,7 @@ void sub_0802E0B8(GleerokEntity* this) {
|
||||
|
||||
void sub_0802E1D0(GleerokEntity* this) {
|
||||
Gleerok_HeapStruct* heap = this->unk_84;
|
||||
if (!(super->frame & 0x80)) {
|
||||
if (!(super->frame & ANIM_DONE)) {
|
||||
GetNextFrame(super);
|
||||
}
|
||||
if (super->frame & 0x3f) {
|
||||
@@ -1144,7 +1144,7 @@ void sub_0802E448(GleerokEntity* this) {
|
||||
void sub_0802E4C0(GleerokEntity* this) {
|
||||
GetNextFrame(super);
|
||||
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
if (super->action != 2) {
|
||||
this->unk_74 = 0;
|
||||
this->unk_75 = 8;
|
||||
@@ -1220,7 +1220,7 @@ NONMATCH("asm/non_matching/gleerok/sub_0802E518.inc", void sub_0802E518(GleerokE
|
||||
r7 += heap->ent2->actionDelay;
|
||||
} else {
|
||||
if (super->iframes == 0) {
|
||||
if ((super->animIndex != (heap->filler[0x15] >> 3) + 0x2f) || (super->frame & 0x80) != 0) {
|
||||
if ((super->animIndex != (heap->filler[0x15] >> 3) + 0x2f) || (super->frame & ANIM_DONE) != 0) {
|
||||
r7 = (heap->filler[0x15] >> 3) + 0x28;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -125,7 +125,7 @@ void sub_08048B2C(GyorgFemaleEyeEntity* this) {
|
||||
|
||||
void sub_08048B84(GyorgFemaleEyeEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
super->action = 3;
|
||||
super->flags |= ENT_COLLIDE;
|
||||
super->hitType = 0x1E;
|
||||
@@ -155,7 +155,7 @@ void sub_08048BB0(GyorgFemaleEyeEntity* this) {
|
||||
SoundReq(SFX_ITEM_GLOVES_KNOCKBACK);
|
||||
}
|
||||
GetNextFrame(super);
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
super->hitType = 0x1E;
|
||||
InitializeAnimation(super, gUnk_080D2010[(super->animationState << 3) + super->type]);
|
||||
UpdateAnimationVariableFrames(super, 7);
|
||||
@@ -176,7 +176,7 @@ void sub_08048BB0(GyorgFemaleEyeEntity* this) {
|
||||
|
||||
void sub_08048CEC(GyorgFemaleEyeEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
super->action = 1;
|
||||
InitializeAnimation(super, gUnk_080D2010[(super->animationState << 3) + super->type]);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ void GyorgMale(GyorgMaleEntity* this) {
|
||||
}
|
||||
gUnk_080D1AFC[super->action](this);
|
||||
if (super->action != 7) {
|
||||
sub_0805EC9C(super, 0xaa, 0xaa, this->unk_78);
|
||||
SetAffineInfo(super, 0xaa, 0xaa, this->unk_78);
|
||||
}
|
||||
super->animationState = -(this->unk_78 >> 8);
|
||||
sub_08048004(this);
|
||||
@@ -986,7 +986,7 @@ void sub_08047BF0(GyorgMaleEntity* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
sub_0805EC9C(super, 0xAA, 0xAA, this->unk_78);
|
||||
SetAffineInfo(super, 0xAA, 0xAA, this->unk_78);
|
||||
}
|
||||
|
||||
void sub_08047D24(GyorgMaleEntity* this) {
|
||||
@@ -1005,7 +1005,7 @@ void sub_08047D24(GyorgMaleEntity* this) {
|
||||
} else {
|
||||
sub_08047E58(this);
|
||||
}
|
||||
sub_0805EC9C(super, this->unk_7e, this->unk_7e, this->unk_78);
|
||||
SetAffineInfo(super, this->unk_7e, this->unk_7e, this->unk_78);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ void GyorgMaleEye_Init(GyorgMaleEyeEntity* this) {
|
||||
void GyorgMaleEye_Action1(GyorgMaleEyeEntity* this) {
|
||||
sub_08048F50(this);
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action = 2;
|
||||
super->flags |= 0x80;
|
||||
super->actionDelay = 0x2d;
|
||||
@@ -98,7 +98,7 @@ void GyorgMaleEye_Action2(GyorgMaleEyeEntity* this) {
|
||||
void GyorgMaleEye_Action3(GyorgMaleEyeEntity* this) {
|
||||
sub_08048F50(this);
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ void sub_0802BC74(Entity* this) {
|
||||
sub_0802C1C0(this);
|
||||
this->subAction = 1;
|
||||
this->field_0x1d = 60;
|
||||
this->animationState = (gPlayerEntity.animationState >> 1) ^ 2;
|
||||
this->animationState = AnimationStateFlip90(gPlayerEntity.animationState >> 1);
|
||||
InitializeAnimation(this, this->animationState);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ void sub_0802BCA8(Entity* this) {
|
||||
Entity* ent;
|
||||
|
||||
this->action = 7;
|
||||
this->actionDelay = 0x5a;
|
||||
this->actionDelay = 90;
|
||||
this->zVelocity = Q_16_16(1.5);
|
||||
this->hitType = 0x19;
|
||||
this->field_0x3a = this->field_0x3a & 0xfb;
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ void sub_0803248C(Entity* this) {
|
||||
void sub_080324CC(Entity* this) {
|
||||
if (sub_080325E8(this) == 0) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
sub_080326FC(this);
|
||||
sub_08032740(this);
|
||||
}
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ void Keese_Fly(Entity* this) {
|
||||
this->field_0x7a.HWORD--;
|
||||
}
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
sub_08021F24(this);
|
||||
} else {
|
||||
ProcessMovement1(this);
|
||||
|
||||
+3
-3
@@ -152,7 +152,7 @@ void Lakitu_Hide(Entity* this) {
|
||||
void Lakitu_EndHide(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = IDLE;
|
||||
this->actionDelay = 0x3c;
|
||||
|
||||
@@ -180,7 +180,7 @@ void Lakitu_Idle(Entity* this) {
|
||||
void Lakitu_BeginHide(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 0;
|
||||
|
||||
@@ -191,7 +191,7 @@ void Lakitu_BeginHide(Entity* this) {
|
||||
void Lakitu_Lightning(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
|
||||
if (!(this->frame & 0x80)) {
|
||||
if (!(this->frame & ANIM_DONE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -85,7 +85,7 @@ void Leever_Idle(Entity* this) {
|
||||
void Leever_DigUp(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 3;
|
||||
if (this->type == LeeverForm_Red) {
|
||||
this->field_0x74.HWORD = 180;
|
||||
@@ -113,7 +113,7 @@ void Leever_Attack(Entity* this) {
|
||||
void Leever_DigDown(Entity* this) {
|
||||
Leever_Move(this);
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 0xf0;
|
||||
this->spriteSettings.draw = FALSE;
|
||||
|
||||
@@ -277,7 +277,7 @@ void sub_08029D14(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 4;
|
||||
this->actionDelay = 0x78;
|
||||
this->hitType = 0x6c;
|
||||
@@ -299,7 +299,7 @@ void sub_08029D78(Entity* this) {
|
||||
|
||||
void sub_08029DAC(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 6;
|
||||
this->parent->field_0x76.HALF.HI = 1;
|
||||
InitializeAnimation(this, this->animationState + 8);
|
||||
|
||||
+21
-21
@@ -238,7 +238,7 @@ void sub_0803A364(Entity* this) {
|
||||
break;
|
||||
case 4:
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->subAction = 5;
|
||||
}
|
||||
break;
|
||||
@@ -261,7 +261,7 @@ void sub_0803A364(Entity* this) {
|
||||
break;
|
||||
case 7:
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->subAction = 8;
|
||||
this->spriteSettings.draw = 0;
|
||||
InitAnimationForceUpdate(this->child, 8);
|
||||
@@ -270,7 +270,7 @@ void sub_0803A364(Entity* this) {
|
||||
break;
|
||||
case 8:
|
||||
sub_0803B55C(this);
|
||||
if ((this->child->frame & 0x80) == 0) {
|
||||
if ((this->child->frame & ANIM_DONE) == 0) {
|
||||
return;
|
||||
}
|
||||
uVar1 = 9;
|
||||
@@ -286,7 +286,7 @@ void sub_0803A364(Entity* this) {
|
||||
break;
|
||||
case 10:
|
||||
sub_0803B55C(this);
|
||||
if ((this->child->frame & 0x80) != 0) {
|
||||
if ((this->child->frame & ANIM_DONE) != 0) {
|
||||
this->subAction = 0xb;
|
||||
this->spriteSettings.draw = 1;
|
||||
InitializeAnimation(this, 4);
|
||||
@@ -294,7 +294,7 @@ void sub_0803A364(Entity* this) {
|
||||
break;
|
||||
case 0xb:
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) == 0) {
|
||||
if ((this->frame & ANIM_DONE) == 0) {
|
||||
return;
|
||||
}
|
||||
if (this->type2 != 0) {
|
||||
@@ -365,7 +365,7 @@ void sub_0803A60C(Entity* this) {
|
||||
index = ((this->parent->field_0xf >> 4) + 3);
|
||||
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->action = 6;
|
||||
this->spriteSettings.draw = 0;
|
||||
InitAnimationForceUpdate(this->child, 8);
|
||||
@@ -482,7 +482,7 @@ void sub_0803A814(Entity* this) {
|
||||
index = ((this->parent->field_0xf >> 4) + 3);
|
||||
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
|
||||
sub_0803B55C(this);
|
||||
if ((this->child->frame & 0x80) != 0) {
|
||||
if ((this->child->frame & ANIM_DONE) != 0) {
|
||||
this->action = 0xe;
|
||||
this->spriteSettings.draw = 1;
|
||||
InitializeAnimation(this, 4);
|
||||
@@ -497,7 +497,7 @@ void sub_0803A86C(Entity* this) {
|
||||
index = ((this->parent->field_0xf >> 4) + 3);
|
||||
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
COLLISION_ON(this);
|
||||
sub_0803B59C(this);
|
||||
}
|
||||
@@ -619,7 +619,7 @@ void sub_0803AB10(Entity* this) {
|
||||
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
|
||||
LinearMoveUpdate(this);
|
||||
sub_0803B55C(this);
|
||||
if ((this->child->frame & 0x80) != 0) {
|
||||
if ((this->child->frame & ANIM_DONE) != 0) {
|
||||
this->action = 0x15;
|
||||
this->actionDelay = 0xf;
|
||||
}
|
||||
@@ -649,7 +649,7 @@ void sub_0803ABB4(Entity* this) {
|
||||
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
|
||||
GetNextFrame(this);
|
||||
sub_0803B55C(this);
|
||||
if ((this->child->frame & 0x80) != 0) {
|
||||
if ((this->child->frame & ANIM_DONE) != 0) {
|
||||
this->action = 0x17;
|
||||
COLLISION_ON(this);
|
||||
this->speed = 0x180;
|
||||
@@ -768,7 +768,7 @@ void sub_0803ADF4(Entity* this) {
|
||||
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
|
||||
UpdateAnimationSingleFrame(this);
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->action = 0x1c;
|
||||
this->actionDelay = 0x1e;
|
||||
this->spriteSettings.draw = 0;
|
||||
@@ -803,7 +803,7 @@ void sub_0803AEC4(Entity* this) {
|
||||
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
|
||||
UpdateAnimationSingleFrame(this);
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
COLLISION_ON(this);
|
||||
sub_0803B59C(this);
|
||||
}
|
||||
@@ -818,7 +818,7 @@ void sub_0803AF18(Entity* this) {
|
||||
|
||||
void sub_0803AF50(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->action = 0x20;
|
||||
this->spriteSettings.draw = 0;
|
||||
InitAnimationForceUpdate(this->child, 8);
|
||||
@@ -827,7 +827,7 @@ void sub_0803AF50(Entity* this) {
|
||||
|
||||
void sub_0803AF7C(Entity* this) {
|
||||
sub_0803B55C(this);
|
||||
if ((this->child->frame & 0x80) != 0) {
|
||||
if ((this->child->frame & ANIM_DONE) != 0) {
|
||||
this->action = 0x21;
|
||||
this->actionDelay = 0xf;
|
||||
}
|
||||
@@ -892,7 +892,7 @@ void sub_0803B074(Entity* this) {
|
||||
index = ((this->parent->field_0xf >> 4) + 3);
|
||||
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
|
||||
sub_0803B55C(this);
|
||||
if ((this->child->frame & 0x80) != 0) {
|
||||
if ((this->child->frame & ANIM_DONE) != 0) {
|
||||
this->action = 0x27;
|
||||
this->spriteSettings.draw = 1;
|
||||
InitializeAnimation(this, 4);
|
||||
@@ -903,7 +903,7 @@ void sub_0803B074(Entity* this) {
|
||||
void sub_0803B0D4(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
COLLISION_ON(this);
|
||||
sub_0803B59C(this);
|
||||
}
|
||||
@@ -938,7 +938,7 @@ void sub_0803B144(Entity* this) {
|
||||
|
||||
void sub_0803B17C(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->action = 0x2b;
|
||||
COLLISION_ON(this);
|
||||
this->hitType = 0x18;
|
||||
@@ -951,7 +951,7 @@ void sub_0803B1B8(Entity* this) {
|
||||
Entity* temp;
|
||||
u16 val;
|
||||
|
||||
if ((this->frame & 0x80) == 0) {
|
||||
if ((this->frame & ANIM_DONE) == 0) {
|
||||
GetNextFrame(this);
|
||||
UpdateAnimationSingleFrame(this->child);
|
||||
}
|
||||
@@ -994,7 +994,7 @@ void sub_0803B2D0(Entity* this) {
|
||||
Entity* entity;
|
||||
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->action = 0x2d;
|
||||
this->spriteSettings.draw = 0;
|
||||
entity = *(Entity**)&this->field_0x74;
|
||||
@@ -1009,7 +1009,7 @@ void sub_0803B30C(Entity* this) {
|
||||
Entity* entity;
|
||||
|
||||
entity = *(Entity**)&this->field_0x74;
|
||||
if ((entity->frame & 0x80) != 0) {
|
||||
if ((entity->frame & ANIM_DONE) != 0) {
|
||||
this->action = 0x2e;
|
||||
sub_0803B8E8(this, 0x13);
|
||||
InitializeAnimation(entity, 0);
|
||||
@@ -1064,7 +1064,7 @@ void sub_0803B3F4(Entity* this) {
|
||||
index = ((this->parent->field_0xf >> 4) + 3);
|
||||
this->z.HALF.HI = ptr[(index + (u32)this->type * 2) & 7] + 4;
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->hitType = 0x17;
|
||||
if (this->type == 0) {
|
||||
this->hitbox = (Hitbox*)&gUnk_080FD35C;
|
||||
|
||||
@@ -757,7 +757,7 @@ void sub_08034B0C(Entity* this) {
|
||||
this->actionDelay--;
|
||||
} else {
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) == 0) {
|
||||
if ((this->frame & ANIM_DONE) == 0) {
|
||||
return;
|
||||
}
|
||||
this->action = 2;
|
||||
@@ -789,7 +789,7 @@ void sub_08034B38(Entity* this) {
|
||||
|
||||
void sub_08034BA0(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->parent->field_0x7c.HALF.HI = 0xff;
|
||||
DeleteEntity(this);
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ void sub_08023288(Entity* this) {
|
||||
|
||||
void sub_08023330(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 4;
|
||||
this->actionDelay = 0x19;
|
||||
COLLISION_ON(this);
|
||||
|
||||
+3
-3
@@ -94,7 +94,7 @@ void sub_0801EB9C(Entity* this) {
|
||||
void Octorok_Initialize(Entity* this) {
|
||||
sub_0804A720(this);
|
||||
if (this->type == 2) {
|
||||
this->animationState = this->type;
|
||||
this->animationState = 2;
|
||||
} else {
|
||||
this->animationState = Random() & 3;
|
||||
}
|
||||
@@ -141,13 +141,13 @@ void Octorok_ShootNut(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
Octorok_Pause(this);
|
||||
}
|
||||
|
||||
void Octorok_Pause(Entity* this) {
|
||||
this->action = 1;
|
||||
this->actionDelay = (Random() & 0x38) + 0x18;
|
||||
this->actionDelay = (Random() & 0x38) + 24;
|
||||
}
|
||||
|
||||
void Octorok_Turn(Entity* this) {
|
||||
|
||||
@@ -125,7 +125,7 @@ void OctorokBoss_Hit(OctorokBossEntity* this) {
|
||||
sub_08078B48();
|
||||
}
|
||||
sub_0800445C(super);
|
||||
sub_0805EC9C(super, this->unk_76, this->unk_74, this->angle.HWORD);
|
||||
SetAffineInfo(super, this->unk_76, this->unk_74, this->angle.HWORD);
|
||||
}
|
||||
|
||||
void OctorokBoss_Hit_SubAction0(OctorokBossEntity* this) {
|
||||
@@ -327,7 +327,7 @@ void OctorokBoss_Intro(OctorokBossEntity* this) {
|
||||
gUnk_02034490.unk0 = 1;
|
||||
sub_08036F60(this);
|
||||
OctorokBoss_Intro_SubActions[super->subAction](this);
|
||||
sub_0805EC9C(super, this->unk_76, this->unk_74, this->angle.HWORD);
|
||||
SetAffineInfo(super, this->unk_76, this->unk_74, this->angle.HWORD);
|
||||
}
|
||||
|
||||
void OctorokBoss_Intro_SubAction0(OctorokBossEntity* this) {
|
||||
@@ -475,7 +475,7 @@ void OctorokBoss_Action1(OctorokBossEntity* this) {
|
||||
sub_08036914(super, angle, radius);
|
||||
this->angle.HALF.HI = ((OctorokBossEntity*)super->parent)->angle.HALF.HI +
|
||||
OctorokBoss_LegAngleOffset2[super->type - 1] + this->timer;
|
||||
sub_0805EC9C(super, this->unk_76, this->unk_74, this->angle.HWORD);
|
||||
SetAffineInfo(super, this->unk_76, this->unk_74, this->angle.HWORD);
|
||||
break;
|
||||
|
||||
case TAIL:
|
||||
@@ -522,7 +522,7 @@ void OctorokBoss_Action1(OctorokBossEntity* this) {
|
||||
sub_080369D0(this, GET_TAIL_RADIUS(this), 4);
|
||||
}
|
||||
super->bitfield = 0;
|
||||
sub_0805EC9C(super, this->unk_76, this->unk_74, -this->angle.HWORD ^ 0x8000);
|
||||
SetAffineInfo(super, this->unk_76, this->unk_74, -this->angle.HWORD ^ 0x8000);
|
||||
break;
|
||||
|
||||
case MOUTH:
|
||||
@@ -546,7 +546,7 @@ void OctorokBoss_Action1(OctorokBossEntity* this) {
|
||||
sub_08036914(super, angle, radius);
|
||||
|
||||
this->angle.HALF.HI = ((OctorokBossEntity*)super->parent)->angle.HALF.HI;
|
||||
sub_0805EC9C(super, this->unk_76, this->unk_74, this->angle.HWORD);
|
||||
SetAffineInfo(super, this->unk_76, this->unk_74, this->angle.HWORD);
|
||||
sub_0800445C(super);
|
||||
}
|
||||
break;
|
||||
@@ -562,7 +562,7 @@ void OctorokBoss_Action1(OctorokBossEntity* this) {
|
||||
}
|
||||
}
|
||||
OctorokBoss_Action1_SubActions[super->subAction](this);
|
||||
sub_0805EC9C(super, this->unk_76, this->unk_74, this->angle.HWORD);
|
||||
SetAffineInfo(super, this->unk_76, this->unk_74, this->angle.HWORD);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -905,7 +905,7 @@ void OctorokBoss_Burning(OctorokBossEntity* this) {
|
||||
CreateProjectileWithParent(super, OCTOROK_BOSS_PROJECTILE, 3);
|
||||
}
|
||||
}
|
||||
sub_0805EC9C(super, this->unk_76, this->unk_74, this->angle.HWORD);
|
||||
SetAffineInfo(super, this->unk_76, this->unk_74, this->angle.HWORD);
|
||||
}
|
||||
|
||||
void OctorokBoss_Burning_SubAction0(OctorokBossEntity* this) {
|
||||
|
||||
@@ -90,7 +90,7 @@ void sub_08037D54(Entity* this) {
|
||||
EnqueueSFX(SFX_124);
|
||||
}
|
||||
}
|
||||
} else if (this->frame & 0x80) {
|
||||
} else if (this->frame & ANIM_DONE) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 1;
|
||||
this->field_0xf = 0x3c;
|
||||
|
||||
+2
-2
@@ -289,7 +289,7 @@ void Peahat_Recover(Entity* this) {
|
||||
void Peahat_Hop(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (--this->actionDelay == 0) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 9;
|
||||
this->zVelocity = Q_16_16(1.5);
|
||||
this->animationState = PeahatAnimation_NewPropeller;
|
||||
@@ -313,7 +313,7 @@ void Peahat_Hop(Entity* this) {
|
||||
|
||||
void Peahat_Takeoff(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->hitType = 0x70;
|
||||
this->field_0x82.HALF.LO = 1;
|
||||
|
||||
@@ -237,7 +237,7 @@ void sub_080253D4(Entity* this) {
|
||||
|
||||
void sub_0802541C(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 3;
|
||||
this->field_0xf = 1;
|
||||
this->zVelocity = Q_16_16(2);
|
||||
@@ -270,7 +270,7 @@ void sub_0802547C(Entity* this) {
|
||||
|
||||
void sub_080254B4(Entity* this) {
|
||||
GravityUpdate(this, Q_16_16(0.125));
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (this->z.HALF.HI == 0) {
|
||||
if (this->cutsceneBeh.HWORD == 0) {
|
||||
this->hitType = 0x82;
|
||||
|
||||
@@ -21,7 +21,7 @@ void sub_08020A7C(Entity*);
|
||||
bool32 Rollobite_TryToHoleUp(Entity*);
|
||||
bool32 Rollobite_IsRolledUp(Entity*);
|
||||
|
||||
extern void sub_08078930(Entity*);
|
||||
extern void RegisterCarryEntity(Entity*);
|
||||
|
||||
void Rollobite(Entity* this) {
|
||||
EnemyFunctionHandler(this, Rollobite_Functions);
|
||||
@@ -175,7 +175,7 @@ void Rollobite_Turn(Entity* this) {
|
||||
void Rollobite_RolledUp(Entity* this) {
|
||||
u32 unk;
|
||||
|
||||
if ((this->frame & 0x80) == 0)
|
||||
if ((this->frame & ANIM_DONE) == 0)
|
||||
GetNextFrame(this);
|
||||
|
||||
unk = sub_080044EC(this, 0x2800);
|
||||
@@ -185,7 +185,7 @@ void Rollobite_RolledUp(Entity* this) {
|
||||
this->action = 5;
|
||||
InitializeAnimation(this, this->animationState + 12);
|
||||
}
|
||||
sub_08078930(this);
|
||||
RegisterCarryEntity(this);
|
||||
} else {
|
||||
if (unk == 1)
|
||||
EnqueueSFX(SFX_104);
|
||||
@@ -197,7 +197,7 @@ void Rollobite_RolledUp(Entity* this) {
|
||||
|
||||
void Rollobite_Unroll(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
COLLISION_ON(this);
|
||||
this->speed = 0x100;
|
||||
this->hitType = 34;
|
||||
@@ -206,7 +206,7 @@ void Rollobite_Unroll(Entity* this) {
|
||||
InitializeAnimation(this, this->animationState);
|
||||
} else {
|
||||
if ((this->frame & 1) == 0)
|
||||
sub_08078930(this);
|
||||
RegisterCarryEntity(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -174,7 +174,7 @@ void sub_08031600(Entity* this) {
|
||||
|
||||
u32 sub_0803163C(Entity* this) {
|
||||
u32 h;
|
||||
if (sub_080B1AA8(this) == 0x13) {
|
||||
if (GetTileUnderEntity(this) == 0x13) {
|
||||
h = this->field_0x7a.HWORD / 2;
|
||||
} else {
|
||||
h = this->field_0x7a.HWORD;
|
||||
|
||||
@@ -122,7 +122,7 @@ void sub_08029474(Entity* this) {
|
||||
u32 bVar1;
|
||||
|
||||
sub_080296C8(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 3;
|
||||
this->actionDelay = 8;
|
||||
bVar1 = GetFacingDirection(this, &gPlayerEntity);
|
||||
@@ -196,7 +196,7 @@ void sub_08029610(Entity* this) {
|
||||
|
||||
void sub_08029630(Entity* this) {
|
||||
sub_080296C8(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->field_0x80.HALF.HI = 1;
|
||||
this->child->spriteSettings.draw = FALSE;
|
||||
sub_080297F0(this);
|
||||
|
||||
@@ -142,7 +142,7 @@ void sub_08038B08(ScissorsBeetleEntity* this) {
|
||||
}
|
||||
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
super->action = 4;
|
||||
this->unk_82 = 3;
|
||||
super->actionDelay = 0x32;
|
||||
|
||||
@@ -134,7 +134,7 @@ void sub_08023CE0(Entity* this) {
|
||||
default:
|
||||
GetNextFrame(this);
|
||||
if (this->frame) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
Entity* ent = CreateEnemy(SLUGGULA, 1);
|
||||
if (ent) {
|
||||
sub_0804A4E4(this, ent);
|
||||
@@ -157,7 +157,7 @@ void sub_08023E10(Entity* this) {
|
||||
}
|
||||
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80)
|
||||
if (this->frame & ANIM_DONE)
|
||||
DeleteEntity(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ void sub_08033A7C(SpinyBeetleEntity* this) {
|
||||
}
|
||||
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) == 0)
|
||||
if ((super->frame & ANIM_DONE) == 0)
|
||||
return;
|
||||
|
||||
super->action = 3;
|
||||
|
||||
@@ -181,7 +181,7 @@ void sub_080226EC(Entity* this) {
|
||||
|
||||
void sub_08022780(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 4;
|
||||
InitializeAnimation(this, 3);
|
||||
EnqueueSFX(SFX_194);
|
||||
@@ -201,7 +201,7 @@ void sub_080227AC(Entity* this) {
|
||||
this->hitType = 0x5c;
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 2;
|
||||
this->field_0xf = gUnk_080CBA60[Random() & 3];
|
||||
InitializeAnimation(this, 0);
|
||||
@@ -211,7 +211,7 @@ void sub_080227AC(Entity* this) {
|
||||
void sub_0802281C(Entity* this) {
|
||||
GravityUpdate(this, Q_8_8(24.0));
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 2;
|
||||
this->speed = 0x20;
|
||||
InitializeAnimation(this, 0);
|
||||
@@ -234,7 +234,7 @@ void sub_08022854(Entity* this) {
|
||||
|
||||
void sub_0802289C(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 2;
|
||||
this->speed = 0x20;
|
||||
this->field_0x80.HALF.HI = 0x78;
|
||||
|
||||
+1
-1
@@ -269,7 +269,7 @@ void Stalfos_Action11(StalfosEntity* this) {
|
||||
|
||||
void Stalfos_Action12(StalfosEntity* this) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
if (super->type2 == 1) {
|
||||
sub_0803998C(this);
|
||||
DeleteEntity(super->child);
|
||||
|
||||
+4
-4
@@ -97,7 +97,7 @@ void sub_0802F284(Entity* this) {
|
||||
if (this->actionDelay != 0) {
|
||||
this->actionDelay--;
|
||||
} else if (this->field_0xf != 0) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 0x10;
|
||||
this->field_0xf = this->type;
|
||||
@@ -105,7 +105,7 @@ void sub_0802F284(Entity* this) {
|
||||
sub_0802F45C(this);
|
||||
InitializeAnimation(this, 2);
|
||||
}
|
||||
} else if (this->frame & 0x80) {
|
||||
} else if (this->frame & ANIM_DONE) {
|
||||
this->field_0xf = 0x40;
|
||||
InitializeAnimation(this, 1);
|
||||
}
|
||||
@@ -137,7 +137,7 @@ void sub_0802F300(Entity* this) {
|
||||
return;
|
||||
} else if (this->collisions != 0) {
|
||||
sub_0800417E(this, this->collisions);
|
||||
} else if ((sub_080B1AA8(this) & 0xf0) == 0x50) {
|
||||
} else if ((GetTileUnderEntity(this) & 0xf0) == 0x50) {
|
||||
this->direction = (this->direction + 0x10) & 0x1f;
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ void sub_0802F3F4(Entity* this) {
|
||||
|
||||
GetNextFrame(this);
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if ((*(u8*)&this->field_0x7c.HALF.LO < 2) && ((this->type % 2) != 0)) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 0x10;
|
||||
|
||||
@@ -85,7 +85,7 @@ void sub_08037Fe0(Entity* this) {
|
||||
if (this->actionDelay != 0) {
|
||||
this->actionDelay--;
|
||||
} else if (this->field_0xf != 0) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 6;
|
||||
this->field_0xf = 0;
|
||||
@@ -93,7 +93,7 @@ void sub_08037Fe0(Entity* this) {
|
||||
sub_08038168(this);
|
||||
InitializeAnimation(this, 2);
|
||||
}
|
||||
} else if (this->frame & 0x80) {
|
||||
} else if (this->frame & ANIM_DONE) {
|
||||
this->field_0xf = 0x40;
|
||||
InitializeAnimation(this, 1);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ void sub_08038048(Entity* this) {
|
||||
return;
|
||||
} else if (this->collisions != 0) {
|
||||
sub_0800417E(this, this->collisions);
|
||||
} else if ((sub_080B1AA8(this) & 0xf0) == 0x50) {
|
||||
} else if ((GetTileUnderEntity(this) & 0xf0) == 0x50) {
|
||||
this->direction = (this->direction + 0x10) & 0x1f;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ void sub_08038048(Entity* this) {
|
||||
|
||||
void sub_08038110(Entity* this) {
|
||||
UpdateAnimationVariableFrames(this, 2);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (this->field_0x80.HALF.LO < 5) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 8;
|
||||
|
||||
@@ -713,7 +713,7 @@ void sub_08042FD8(Entity* this) {
|
||||
this->frame = 0;
|
||||
}
|
||||
} else {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (--this->field_0xf == 0) {
|
||||
this->subAction = 8;
|
||||
this->actionDelay = 0x3c;
|
||||
|
||||
@@ -162,7 +162,7 @@ void sub_08044868(Entity* this) {
|
||||
if (this->field_0x82.HALF.HI) {
|
||||
switch (this->field_0x74.HALF.LO) {
|
||||
case 0:
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->field_0x74.HALF.LO = 1;
|
||||
this->direction = sub_080045B4(this, vaati->x.HALF.HI, vaati->y.HALF.HI - 0x10);
|
||||
this->speed = 0x180;
|
||||
|
||||
@@ -153,7 +153,7 @@ void VaatiProjectileFunction0Action2(Entity* this) {
|
||||
}
|
||||
|
||||
void VaatiProjectileFunction0Action3(Entity* this) {
|
||||
if (this->child->frame & 0x80) {
|
||||
if (this->child->frame & ANIM_DONE) {
|
||||
if (--this->z.HALF.HI <= -0x18) {
|
||||
this->action = 4;
|
||||
this->actionDelay = (Random() & 0xf) + 0xf;
|
||||
|
||||
@@ -235,7 +235,7 @@ void VaatiRebornEnemyType0Action2(Entity* this) {
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->field_0x74.HALF.LO = 2;
|
||||
this->spriteSettings.draw = 0;
|
||||
this->actionDelay = 0x10;
|
||||
@@ -260,7 +260,7 @@ void VaatiRebornEnemyType0Action2(Entity* this) {
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->spriteSettings.draw = 1;
|
||||
if (4 < this->field_0x80.HALF.HI) {
|
||||
this->x.HALF.HI = gPlayerEntity.x.HALF.HI;
|
||||
@@ -318,7 +318,7 @@ void VaatiRebornEnemyType0Action3(Entity* this) {
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->field_0x74.HALF.LO = 3;
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
}
|
||||
|
||||
@@ -675,7 +675,7 @@ void VaatiTransfiguredType2Action1(Entity* this) {
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->field_0x74.HALF.LO = 0;
|
||||
this->field_0xf = (Random() & 0x7f) + 0x17;
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
@@ -790,7 +790,7 @@ void VaatiTransfiguredType5Action1(Entity* this) {
|
||||
this->field_0x80.HALF.LO = 0;
|
||||
this->spriteSettings.draw = 0;
|
||||
} else {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->frame &= ~0x80;
|
||||
if (gEntCount < 0x47) {
|
||||
sub_08040648(this, this->type, 1);
|
||||
@@ -814,13 +814,13 @@ void VaatiTransfiguredType5Action2(Entity* this) {
|
||||
}
|
||||
if (this->field_0x80.HALF.LO == 0) {
|
||||
if (this->parent->parent->action != 6) {
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
InitializeAnimation(this, 3);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ void VaatiTransfiguredEyeFunction0Action0(Entity* this) {
|
||||
void VaatiTransfiguredEyeFunction0Action1(Entity* this) {
|
||||
sub_08045A28(this);
|
||||
if (this->field_0x82.HALF.LO == 0) {
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
if (this->type != 0) {
|
||||
COLLISION_ON(this);
|
||||
}
|
||||
@@ -169,7 +169,7 @@ void VaatiTransfiguredEyeFunction0Action2(Entity* this) {
|
||||
|
||||
void VaatiTransfiguredEyeFunction0Action3(Entity* this) {
|
||||
sub_08045A28(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->action = 2;
|
||||
if (this->type != 0) {
|
||||
if (this->actionDelay == 0) {
|
||||
@@ -187,7 +187,7 @@ void VaatiTransfiguredEyeFunction0Action4(Entity* this) {
|
||||
|
||||
sub_08045A28(this);
|
||||
if (this->field_0xf == 0) {
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->field_0xf = 0x20;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -365,7 +365,7 @@ void VaatiWrathType0Action6(Entity* this) {
|
||||
type1->frame &= 0xfd;
|
||||
}
|
||||
} else {
|
||||
if ((type1->frame & 0x80) != 0) {
|
||||
if ((type1->frame & ANIM_DONE) != 0) {
|
||||
sub_0804235C(this);
|
||||
}
|
||||
}
|
||||
@@ -546,7 +546,7 @@ void VaatiWrathType0ActionC(Entity* this) {
|
||||
entity->frame &= 0xfe;
|
||||
InitAnimationForceUpdate(this, 9);
|
||||
} else {
|
||||
if (entity->frame & 0x80) {
|
||||
if (entity->frame & ANIM_DONE) {
|
||||
sub_0804235C(this);
|
||||
}
|
||||
}
|
||||
@@ -617,7 +617,7 @@ void sub_08041BE8(Entity* this) {
|
||||
|
||||
void sub_08041CD0(Entity* this) {
|
||||
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (this->actionDelay != 0) {
|
||||
this->actionDelay--;
|
||||
} else {
|
||||
@@ -964,7 +964,7 @@ u32 sub_080422C0(Entity* this, u32 unk1) {
|
||||
type1->frame &= 0xfb;
|
||||
InitAnimationForceUpdate(this, 3);
|
||||
} else {
|
||||
if (type1->frame & 0x80) {
|
||||
if (type1->frame & ANIM_DONE) {
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
type1->subAction = 0;
|
||||
InitializeAnimation(type1, 0xc);
|
||||
|
||||
@@ -56,7 +56,7 @@ void VaatiWrathEyeAction0(Entity* this) {
|
||||
void VaatiWrathEyeAction1(Entity* this) {
|
||||
sub_080485D8(this);
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->action = 2;
|
||||
InitializeAnimation(this, 1);
|
||||
}
|
||||
@@ -105,7 +105,7 @@ void VaatiWrathEyeAction4(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->action = 5;
|
||||
this->actionDelay = 0;
|
||||
}
|
||||
@@ -137,7 +137,7 @@ void VaatiWrathEyeAction6(Entity* this) {
|
||||
InitializeAnimation(this, 6);
|
||||
}
|
||||
} else {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 7;
|
||||
this->actionDelay = 120;
|
||||
this->field_0xf = 0;
|
||||
@@ -193,7 +193,7 @@ void VaatiWrathEyeAction8(Entity* this) {
|
||||
void VaatiWrathEyeAction9(Entity* this) {
|
||||
sub_080485FC(this);
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->action = 4;
|
||||
this->actionDelay = 1;
|
||||
this->parent->field_0x7a.HALF.HI = (this->parent->field_0x7a.HALF.HI & 0xf) | (1 << this->type);
|
||||
|
||||
@@ -112,7 +112,7 @@ void sub_0802A610(Entity* this) {
|
||||
|
||||
GetNextFrame(this);
|
||||
sub_0802A7D0(this);
|
||||
flags = this->frame & 0x80;
|
||||
flags = this->frame & ANIM_DONE;
|
||||
if (flags) {
|
||||
this->action = 4;
|
||||
this->actionDelay = 0x1e;
|
||||
@@ -154,7 +154,7 @@ void sub_0802A69C(Entity* this) {
|
||||
|
||||
/* sigh... */
|
||||
GetNextFrame(this);
|
||||
flags = this->frame & 0x80;
|
||||
flags = this->frame & ANIM_DONE;
|
||||
if (flags) {
|
||||
this->action = 6;
|
||||
this->actionDelay = 0x1e;
|
||||
@@ -193,7 +193,7 @@ void sub_0802A78C(Entity* this) {
|
||||
|
||||
void sub_0802A7D0(Entity* this) {
|
||||
u32 unk = gUnk_080CD0B0[(this->field_0x7c.BYTES.byte1++ >> 3) & 7] + 0x100;
|
||||
sub_0805EC9C(this, unk, unk, 0);
|
||||
SetAffineInfo(this, unk, unk, 0);
|
||||
}
|
||||
// clang-format off
|
||||
void (*const WallMaster_Functions[])(Entity*) = {
|
||||
|
||||
@@ -131,7 +131,7 @@ void sub_0802CE68(Entity* this) {
|
||||
}
|
||||
sub_0802CFD8(this);
|
||||
GetNextFrame(this);
|
||||
frames = this->frame & 0x80;
|
||||
frames = this->frame & ANIM_DONE;
|
||||
if (frames) {
|
||||
this->action = 4;
|
||||
this->actionDelay = 30;
|
||||
@@ -169,7 +169,7 @@ ASM_FUNC("asm/non_matching/wallMaster2/sub_0802CF8C.inc", void sub_0802CF8C(Enti
|
||||
|
||||
void sub_0802CFD8(Entity* this) {
|
||||
u32 unk = gUnk_080CD740[(this->field_0x7a.HALF.LO++ >> 3) & 7];
|
||||
sub_0805EC9C(this, (s16)this->field_0x74.HWORD + unk, 0x100 + unk, this->field_0x76.HWORD);
|
||||
SetAffineInfo(this, (s16)this->field_0x74.HWORD + unk, 0x100 + unk, this->field_0x76.HWORD);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
|
||||
@@ -56,7 +56,7 @@ void sub_0802A2B4(Entity* this) {
|
||||
|
||||
void sub_0802A2FC(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
DeleteEntity(this);
|
||||
} else if (this->frame & 1) {
|
||||
COLLISION_OFF(this);
|
||||
|
||||
+14
-15
@@ -9,15 +9,14 @@ extern u8 gUnk_081091F8[];
|
||||
extern u8 gUnk_081091EE[];
|
||||
extern u8 gUpdateVisibleTiles;
|
||||
extern Manager gUnk_02033290;
|
||||
void sub_0805ED30(void);
|
||||
void UpdatePlayerInput(void);
|
||||
void ClearHitboxList(void);
|
||||
void sub_0805EE88(void);
|
||||
void ClearAllDeletedEntities(void);
|
||||
void DeleteAllEntities(void);
|
||||
void sub_0805E98C(void);
|
||||
extern void sub_0806FE84(Entity*);
|
||||
extern void UnloadOBJPalette2(Entity*);
|
||||
extern void sub_08017744(Entity*);
|
||||
extern void UnloadHitbox(Entity*);
|
||||
extern void sub_0804AA1C(Entity*);
|
||||
|
||||
void ClearDeletedEntity(Entity*);
|
||||
@@ -64,8 +63,8 @@ void sub_0805E248(void) {
|
||||
gUpdateVisibleTiles = 0;
|
||||
}
|
||||
|
||||
void sub_0805E374(Entity* e) {
|
||||
u8 r3 = gRoomTransition.player_status.field_0x24[8];
|
||||
void SetDefaultPriorityForKind(Entity* e) {
|
||||
u8 r3 = gRoomTransition.entity_update_type;
|
||||
u8* array = gUnk_081091F8;
|
||||
|
||||
if (r3 != 2) {
|
||||
@@ -201,7 +200,7 @@ void UpdateEntities(void) {
|
||||
|
||||
gRoomVars.filler1[0] = gRoomVars.field_0x4;
|
||||
gRoomVars.field_0x4 = 0;
|
||||
sub_0805ED30();
|
||||
UpdatePlayerInput();
|
||||
UpdatePriority();
|
||||
ClearHitboxList();
|
||||
sub_0806F0A4();
|
||||
@@ -232,7 +231,7 @@ void EraseAllEntities(void) {
|
||||
}
|
||||
|
||||
extern Entity gUnk_030015A0[0x48];
|
||||
extern Entity gUnk_03003BE0;
|
||||
extern Entity gCarryEntities;
|
||||
|
||||
NONMATCH("asm/non_matching/GetEmptyEntity.inc", Entity* GetEmptyEntity()) {
|
||||
u8 flags_ip;
|
||||
@@ -263,7 +262,7 @@ NONMATCH("asm/non_matching/GetEmptyEntity.inc", Entity* GetEmptyEntity()) {
|
||||
ClearDeletedEntity(ptr);
|
||||
return ptr;
|
||||
}
|
||||
} while (++ptr < &gUnk_03003BE0);
|
||||
} while (++ptr < &gCarryEntities);
|
||||
|
||||
flags_ip = 0;
|
||||
rv = NULL;
|
||||
@@ -343,9 +342,9 @@ void DeleteEntity(Entity* ent) {
|
||||
if (ent->next) {
|
||||
UnloadGFXSlots(ent);
|
||||
UnloadOBJPalette(ent);
|
||||
sub_0806FE84(ent);
|
||||
UnloadOBJPalette2(ent);
|
||||
sub_080788E0(ent);
|
||||
sub_08078954(ent);
|
||||
FreeCarryEntity(ent);
|
||||
sub_0805EC60(ent);
|
||||
sub_08017744(ent);
|
||||
ReleaseTransitionManager(ent);
|
||||
@@ -437,15 +436,15 @@ void ReleaseTransitionManager(void* mgr) {
|
||||
}
|
||||
}
|
||||
|
||||
extern Entity gUnk_020369F0;
|
||||
extern LinkedList gEntityListsBackup;
|
||||
|
||||
void sub_0805E958(void) {
|
||||
MemCopy(&gEntityLists, &gUnk_020369F0, 0x48);
|
||||
MemCopy(&gEntityLists, &gEntityListsBackup, 0x48);
|
||||
sub_0805E98C();
|
||||
}
|
||||
|
||||
void sub_0805E974(void) {
|
||||
MemCopy(&gUnk_020369F0, &gEntityLists, 0x48);
|
||||
MemCopy(&gEntityListsBackup, &gEntityLists, 0x48);
|
||||
}
|
||||
|
||||
void sub_0805E98C(void) {
|
||||
@@ -479,7 +478,7 @@ void DeleteSleepingEntities(void) {
|
||||
|
||||
list = &gEntityLists[0];
|
||||
do {
|
||||
for (ent = list->first; (u32)ent != (u32)list; ent = next) {
|
||||
for (ent = list->first; (intptr_t)ent != (intptr_t)list; ent = next) {
|
||||
next = ent->next;
|
||||
if (ent->flags & ENT_DELETED)
|
||||
DeleteEntityAny(ent);
|
||||
@@ -501,7 +500,7 @@ void AppendEntityToList(Entity* entity, u32 listIndex) {
|
||||
} else {
|
||||
gManagerCount++;
|
||||
}
|
||||
sub_0805E374(entity);
|
||||
SetDefaultPriorityForKind(entity);
|
||||
}
|
||||
|
||||
void PrependEntityToList(Entity* entity, u32 listIndex) {
|
||||
|
||||
+1
-1
@@ -407,7 +407,7 @@ static void GameMain_ChangeRoom(void) {
|
||||
sub_0801855C();
|
||||
}
|
||||
#elif defined(DEMO_JP)
|
||||
if (gRoomTransition.field_0x2c[5])
|
||||
if (gRoomTransition.field_0x2c[4])
|
||||
CheckAreaDiscovery();
|
||||
if (gArea.inventoryGfxIdx != 0xff) {
|
||||
sub_0801855C();
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ extern u8 gUnk_03003DE0;
|
||||
extern u8 gUnk_03000C30;
|
||||
|
||||
extern u8 gUpdateVisibleTiles;
|
||||
extern Entity gUnk_03003BE0;
|
||||
extern Entity gCarryEntities;
|
||||
extern Entity* gPlayerClones[3];
|
||||
extern u16 gUnk_080B2CD8[];
|
||||
|
||||
@@ -334,7 +334,7 @@ void sub_080171F0(void) {
|
||||
gPlayerState.mobility = 0;
|
||||
gPlayerState.speed_modifier = 0;
|
||||
gPlayerState.field_0xaa = 0;
|
||||
MemClear(&gUnk_03003BE0, 0x8c);
|
||||
MemClear(&gCarryEntities, 0x8c);
|
||||
gPlayerEntity.spriteOffsetY = gPlayerState.field_0x3f;
|
||||
gPlayerState.field_0x3f = 0;
|
||||
sub_0807B0C8();
|
||||
|
||||
+3
-3
@@ -29,7 +29,7 @@ void sub_08075FF8(ItemBehavior* this, u32 arg1) {
|
||||
}
|
||||
maxBombs = this->behaviorID == 7 ? 3 : 1;
|
||||
if (maxBombs > bombCount) {
|
||||
entity = CreatePlayerBomb(this, 2);
|
||||
entity = CreatePlayerItemWithParent(this, 2);
|
||||
if (entity != NULL) {
|
||||
tmp = &gUnk_0811BDAC[gPlayerEntity.animationState & 6];
|
||||
// TODO fix array access
|
||||
@@ -41,8 +41,8 @@ void sub_08075FF8(ItemBehavior* this, u32 arg1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
|
||||
// TODO arg1 type not yet known, called by sub_080761C0 and sub_080762D8
|
||||
// TODO arg1 type not yet known, called by ItemPickupCheck and sub_080762D8
|
||||
ASM_FUNC("asm/non_matching/itemBomb/sub_08076088.inc", void sub_08076088(ItemBehavior* this, void* arg1))
|
||||
|
||||
@@ -15,7 +15,7 @@ void sub_08075D2C(ItemBehavior* this, u32 arg1) {
|
||||
sub_08077D38(this, arg1);
|
||||
gPlayerState.field_0x3[1] |= 8;
|
||||
} else {
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,5 +30,5 @@ void sub_08075D88(ItemBehavior* this, u32 arg1) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
|
||||
+5
-5
@@ -16,7 +16,7 @@ void sub_08075DF4(ItemBehavior* this, u32 arg1) {
|
||||
sub_08077D38(this, arg1);
|
||||
gPlayerState.field_0x1f[2] = 1;
|
||||
} else {
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ void sub_08075E40(ItemBehavior* this, u32 arg1) {
|
||||
}
|
||||
}
|
||||
gPlayerState.field_0x1f[2] = 0;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
|
||||
void sub_08075EC0(ItemBehavior* this, u32 arg1) {
|
||||
@@ -51,7 +51,7 @@ void sub_08075EC0(ItemBehavior* this, u32 arg1) {
|
||||
if (iVar2 != 0 && arrowCount != 0) {
|
||||
if (((gPlayerState.field_0x3[1] & 0x80) != 0) || (gPlayerState.field_0x1f[2] == 0)) {
|
||||
gPlayerState.field_0x1f[2] = 0;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
} else {
|
||||
gPlayerState.field_0xa = (8 >> arg1) | gPlayerState.field_0xa;
|
||||
@@ -70,7 +70,7 @@ void sub_08075F38(ItemBehavior* this, u32 arg1) {
|
||||
}
|
||||
} else {
|
||||
gPlayerState.field_0x1f[2] = 0;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,5 +86,5 @@ void sub_08075F84(ItemBehavior* this, u32 arg1) {
|
||||
}
|
||||
}
|
||||
gPlayerState.field_0x1f[2] = 0;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#include "item.h"
|
||||
|
||||
extern Entity* sub_08077BD4(ItemBehavior*);
|
||||
extern void sub_08077E78(ItemBehavior*, u32);
|
||||
extern void DeletePlayerItem(ItemBehavior*, u32);
|
||||
|
||||
void ItemDebug(ItemBehavior* beh, u32 arg1) {
|
||||
sub_08077BD4(beh);
|
||||
sub_08077E78(beh, arg1);
|
||||
DeletePlayerItem(beh, arg1);
|
||||
}
|
||||
|
||||
+11
-11
@@ -18,12 +18,12 @@ void sub_08076DF4(ItemBehavior* this, u32 arg1) {
|
||||
this->field_0x5[5] = gPlayerEntity.animationState;
|
||||
this->field_0x5[4] |= 0x80;
|
||||
this->field_0x5[4]++;
|
||||
gPlayerState.field_0x1d = 1;
|
||||
gPlayerState.gustJarSpeed = 1;
|
||||
*(u32*)&gPlayerEntity.field_0x74 = 0;
|
||||
gPlayerState.field_0x1c = 1;
|
||||
sub_08077BB8(this);
|
||||
} else {
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ void sub_08076E60(ItemBehavior* this, u32 arg1) {
|
||||
Entity* playerItem;
|
||||
|
||||
if ((gPlayerState.field_0x1c & 0xf) == 0) {
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
if ((this->field_0x5[9] & 0x80) != 0) {
|
||||
this->stateID = 2;
|
||||
@@ -48,18 +48,18 @@ void sub_08076E60(ItemBehavior* this, u32 arg1) {
|
||||
|
||||
void sub_08076EC8(ItemBehavior* this, u32 arg1) {
|
||||
if ((gPlayerState.field_0x1c & 0xf) == 0) {
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (sub_08077EFC(this)) {
|
||||
u32 val;
|
||||
if (this->field_0x5[2] > 0xef) {
|
||||
gPlayerState.field_0x1d = 3;
|
||||
gPlayerState.gustJarSpeed = 3;
|
||||
} else if (++this->field_0x5[2] > 0x77) {
|
||||
gPlayerState.field_0x1d = 2;
|
||||
gPlayerState.gustJarSpeed = 2;
|
||||
} else {
|
||||
gPlayerState.field_0x1d = 1;
|
||||
gPlayerState.gustJarSpeed = 1;
|
||||
}
|
||||
|
||||
if (gPlayerEntity.subAction == 0x1b) {
|
||||
@@ -93,7 +93,7 @@ void sub_08076F64(ItemBehavior* this, u32 arg1) {
|
||||
if (this->field_0x5[3]) {
|
||||
this->field_0x5[3] = 0;
|
||||
this->field_0x5[2] = 0;
|
||||
gPlayerState.field_0x1d = 1;
|
||||
gPlayerState.gustJarSpeed = 1;
|
||||
player = &gPlayerEntity;
|
||||
*(u32*)&player->field_0x74 = 0;
|
||||
gPlayerState.field_0x1c = 1;
|
||||
@@ -137,7 +137,7 @@ void sub_08076F64(ItemBehavior* this, u32 arg1) {
|
||||
if (this->field_0x5[9] & 1) {
|
||||
gPlayerState.field_0x1c = 5;
|
||||
gPlayerEntity.field_0x70.WORD = 0;
|
||||
if (gPlayerState.field_0x1d) {
|
||||
if (gPlayerState.gustJarSpeed) {
|
||||
CreatePlayerItem(0x11, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
@@ -157,7 +157,7 @@ void sub_08076F64(ItemBehavior* this, u32 arg1) {
|
||||
case 7:
|
||||
sub_08077DF4(this, 0x514);
|
||||
gPlayerState.field_0x1c = 3;
|
||||
gPlayerState.field_0x1d = 0;
|
||||
gPlayerState.gustJarSpeed = 0;
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
@@ -169,7 +169,7 @@ void sub_08076F64(ItemBehavior* this, u32 arg1) {
|
||||
case0:
|
||||
gPlayerState.field_0x1c = 0;
|
||||
gPlayerEntity.field_0x70.WORD = 0;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ void sub_08077640(ItemBehavior* this, u32 arg1) {
|
||||
UpdateItemAnim(this);
|
||||
if ((this->field_0x5[9] & 0x80) != 0) {
|
||||
gPlayerEntity.flags |= ENT_COLLIDE;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +70,6 @@ void sub_0807766C(ItemBehavior* this, u32 arg1) {
|
||||
UpdateItemAnim(this);
|
||||
if ((this->field_0x5[9] & 0x80) != 0) {
|
||||
gPlayerEntity.flags |= ENT_COLLIDE;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ void sub_08075A0C(ItemBehavior* this, u32 arg1) {
|
||||
ForceEquipItem(ITEM_LANTERN_OFF, itemSlot);
|
||||
gPlayerState.flags &= ~PL_USE_LANTERN;
|
||||
ForceEquipItem(ITEM_LANTERN_OFF, itemSlot);
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
} else {
|
||||
this->field_0x5[4] |= 0x80;
|
||||
sub_08077D38(this, arg1);
|
||||
@@ -79,7 +79,7 @@ void sub_08075B54(ItemBehavior* this, u32 arg1) {
|
||||
if (!(((sub_08077F10(this) == 0) && (itemSlot < 2)) || (gPlayerState.jump_status != 0))) {
|
||||
ForceEquipItem(ITEM_LANTERN_OFF, itemSlot);
|
||||
gPlayerState.flags &= ~PL_USE_LANTERN;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
SoundReq(SFX_ITEM_LANTERN_OFF);
|
||||
} else {
|
||||
if (((gPlayerState.queued_action != PLAYER_ROLL) && (gPlayerEntity.frameIndex < 0x37)) &&
|
||||
@@ -100,8 +100,8 @@ void sub_08075B54(ItemBehavior* this, u32 arg1) {
|
||||
}
|
||||
sub_08077DF4(this, 0x60c);
|
||||
bVar1 = (8 >> (arg1));
|
||||
gPlayerState.field_0xa = bVar1 | gPlayerState.field_0xa;
|
||||
gPlayerState.keepFacing = bVar1 | gPlayerState.keepFacing;
|
||||
gPlayerState.field_0xa |= bVar1;
|
||||
gPlayerState.keepFacing |= bVar1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ void sub_08077130(ItemBehavior* this, u32 arg1) {
|
||||
this->stateID = 1;
|
||||
}
|
||||
} else {
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
gPlayerState.field_0x3c[1] = 0;
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ void sub_080771C8(ItemBehavior* this, u32 arg1) {
|
||||
|
||||
UpdateItemAnim(this);
|
||||
if ((this->field_0x5[9] & 0x80) != 0) {
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
gPlayerState.field_0x3c[1] = 0;
|
||||
} else {
|
||||
if (((this->field_0x5[9] & 0x20) != 0) && (this->field_0x5[3] == 0xff)) {
|
||||
@@ -94,7 +94,7 @@ void sub_08077448(ItemBehavior* this, u32 arg1) {
|
||||
UpdateItemAnim(this);
|
||||
if ((this->field_0x5[9] & 0x80) != 0) {
|
||||
gPlayerState.field_0x3c[1] = 0;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ void ItemOcarina(ItemBehavior* this, u32 arg1) {
|
||||
|
||||
void OcarinaUse(ItemBehavior* this, u32 arg1) {
|
||||
if (gPlayerState.queued_action == PLAYER_ROLL) {
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
} else {
|
||||
this->field_0x5[4] |= 0xf;
|
||||
gPlayerEntity.animationState = 0x04;
|
||||
@@ -44,7 +44,7 @@ NONMATCH("asm/non_matching/ocarina/OcarinaUpdate.inc", void OcarinaUpdate(ItemBe
|
||||
gUnk_02034490.unk0 = 0;
|
||||
CreateBird();
|
||||
ResetPlayerEventPriority();
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
@@ -18,10 +18,10 @@ void sub_08076C98(ItemBehavior* beh, u32 arg1) {
|
||||
|
||||
void sub_08076CBC(ItemBehavior* beh, u32 arg1) {
|
||||
if ((beh->field_0x5[9] & 0x80) != 0) {
|
||||
sub_08077E78(beh, arg1);
|
||||
DeletePlayerItem(beh, arg1);
|
||||
} else {
|
||||
if ((beh->field_0x5[9] & 0x40) != 0) {
|
||||
CreatePlayerBomb(beh, 0x12);
|
||||
CreatePlayerItemWithParent(beh, 0x12);
|
||||
}
|
||||
UpdateItemAnim(beh);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ void ItemPegasusBoots(ItemBehavior* this, u32 arg1) {
|
||||
if (gPlayerEntity.field_0x7a.HWORD != 0) {
|
||||
gPlayerState.dash_state = 0;
|
||||
gPlayerState.field_0xe = 0;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
} else {
|
||||
bVar1 = this->field_0x5[2] - 1;
|
||||
this->field_0x5[2] = bVar1;
|
||||
@@ -78,7 +78,7 @@ void sub_080768F8(ItemBehavior* this, u32 arg1) {
|
||||
} else {
|
||||
gPlayerState.dash_state = 0;
|
||||
gPlayerState.field_0xe = 0;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ void sub_08076964(ItemBehavior* this, u32 arg1) {
|
||||
if ((++gPlayerState.dash_state) == 0x1e) {
|
||||
if ((gPlayerState.flags & PL_FLAGS2) != 0) {
|
||||
gPlayerState.dash_state = 0;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
return;
|
||||
}
|
||||
gPlayerState.dash_state = 0x40;
|
||||
@@ -105,7 +105,7 @@ void sub_08076964(ItemBehavior* this, u32 arg1) {
|
||||
(gPlayerState.skills & SKILL_DASH_ATTACK) != 0) {
|
||||
gPlayerState.field_0xab = 3;
|
||||
sub_08077DF4(this, 0x298);
|
||||
bombEntity = CreatePlayerBomb(this, 0xc);
|
||||
bombEntity = CreatePlayerItemWithParent(this, 0xc);
|
||||
if (bombEntity != NULL) {
|
||||
if (ItemIsSword(gSave.stats.itemButtons[SLOT_A]) != 0) {
|
||||
uVar3 = gSave.stats.itemButtons[SLOT_A];
|
||||
@@ -127,7 +127,7 @@ void sub_08076964(ItemBehavior* this, u32 arg1) {
|
||||
}
|
||||
}
|
||||
gPlayerState.dash_state = 0;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
|
||||
void sub_08076A88(ItemBehavior* this, u32 arg1) {
|
||||
@@ -170,5 +170,5 @@ void sub_08076A88(ItemBehavior* this, u32 arg1) {
|
||||
}
|
||||
}
|
||||
gPlayerState.dash_state = 0;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ void ItemRocsCape(ItemBehavior* this, u32 arg1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
|
||||
void sub_08076758(ItemBehavior* this, u32 arg1) {
|
||||
@@ -84,6 +84,6 @@ void sub_08076758(ItemBehavior* this, u32 arg1) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ void sub_08076D34(ItemBehavior* beh, u32 arg1) {
|
||||
}
|
||||
} else {
|
||||
gPlayerState.field_0x3[0] = 0;
|
||||
sub_08077E78(beh, arg1);
|
||||
DeletePlayerItem(beh, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,6 @@ void sub_08076D94(ItemBehavior* beh, u32 arg1) {
|
||||
UpdateItemAnim(beh);
|
||||
} else {
|
||||
gPlayerState.field_0x3[0] = 0;
|
||||
sub_08077E78(beh, arg1);
|
||||
DeletePlayerItem(beh, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ void sub_080754B8(ItemBehavior* this, u32 arg1) {
|
||||
if (gPlayerEntity.frameSpriteSettings & 1) {
|
||||
iVar1 = sub_0807B014();
|
||||
if (iVar1 && FindEntityByID(PLAYER_ITEM, PLAYER_ITEM_SWORD_BEAM1, 2) == 0) {
|
||||
CreatePlayerBomb(this, 0xf);
|
||||
CreatePlayerItemWithParent(this, 0xf);
|
||||
if (iVar1 == 0xf) {
|
||||
gPlayerState.field_0xab = 5;
|
||||
} else {
|
||||
@@ -228,7 +228,7 @@ void sub_08075738(ItemBehavior* this, u32 arg1) {
|
||||
} else {
|
||||
if (((((gPlayerEntity.frameSpriteSettings & 1) != 0) && ((gPlayerState.sword_state & 0x80) == 0)) &&
|
||||
((gPlayerState.skills & SKILL_FOURSWORD) != 0))) {
|
||||
Entity* bombEnt = CreatePlayerBomb(this, 0x14);
|
||||
Entity* bombEnt = CreatePlayerItemWithParent(this, 0x14);
|
||||
if (bombEnt) {
|
||||
bombEnt->animationState = (gPlayerEntity.animationState & 6) | 0x80;
|
||||
}
|
||||
@@ -313,5 +313,5 @@ void sub_080759B8(ItemBehavior* this, u32 arg1) {
|
||||
gPlayerState.flags &= ~PL_SWORD_THRUST;
|
||||
gPlayerState.sword_state = 0;
|
||||
gPlayerState.item = NULL;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ void ItemTryPickupObject(ItemBehavior* this, u32 arg1) {
|
||||
gUnk_0811BDB4[this->stateID](this, arg1);
|
||||
}
|
||||
|
||||
ASM_FUNC("asm/non_matching/itemTryPickupObject/sub_080761C0.inc", void sub_080761C0(ItemBehavior* this, u32 arg1))
|
||||
ASM_FUNC("asm/non_matching/itemTryPickupObject/ItemPickupCheck.inc", void ItemPickupCheck(ItemBehavior* this, u32 arg1))
|
||||
|
||||
void sub_080762C4(ItemBehavior* this, u32 arg1, u8 arg2, u32 arg3) {
|
||||
this->field_0x18 = arg1;
|
||||
@@ -61,6 +61,6 @@ void sub_0807660C(ItemBehavior* this, u32 arg1) {
|
||||
UpdateItemAnim(this);
|
||||
if ((--this->field_0x5[2] == 0xff) || (gPlayerState.field_0x0[1] == 0)) {
|
||||
gPlayerState.field_0x0[1] = 0;
|
||||
sub_08077E78(this, arg1);
|
||||
DeletePlayerItem(this, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,8 +137,8 @@ u32 sub_0805B1CC(Manager1A* this) {
|
||||
u32 re = 0;
|
||||
if (CheckPlayerProximity(this->unk_20, this->unk_22, this->unk_24, this->unk_26)) {
|
||||
if ((gPlayerState.flags & PL_DROWNING) && (gPlayerState.flags & PL_BUSY)) {
|
||||
gPlayerState.flags |= PL_FLAGS8000;
|
||||
} else if (gPlayerState.flags & PL_FLAGS8000) {
|
||||
gPlayerState.flags |= PL_PIT_IS_EXIT;
|
||||
} else if (gPlayerState.flags & PL_PIT_IS_EXIT) {
|
||||
re = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ void Subtask_KinstoneMenu(void) {
|
||||
KinstoneMenu_Type3, KinstoneMenu_Type4, KinstoneMenu_Type5,
|
||||
};
|
||||
#if !(defined(DEMO_USA) || defined(DEMO_JP))
|
||||
gRoomTransition.player_status.field_0x24[8] = 2;
|
||||
gRoomTransition.entity_update_type = 2;
|
||||
FlushSprites();
|
||||
kinstoneMenuTypes[gMenu.menuType]();
|
||||
sub_080A3B74();
|
||||
@@ -90,7 +90,7 @@ void Subtask_KinstoneMenu(void) {
|
||||
UpdateEntities();
|
||||
DrawEntities();
|
||||
CopyOAM();
|
||||
gRoomTransition.player_status.field_0x24[8] = 0;
|
||||
gRoomTransition.entity_update_type = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ void sub_0806336C(Entity* this) {
|
||||
|
||||
void sub_08063390(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
InitializeAnimation(this, GetAnimationState(this));
|
||||
sub_08078778(this);
|
||||
|
||||
@@ -53,7 +53,7 @@ void sub_08068A1C(Entity* this) {
|
||||
int offset;
|
||||
|
||||
this->type2 = this->type;
|
||||
if (gRoomTransition.player_status.field_0x24[8] != 0) {
|
||||
if (gRoomTransition.entity_update_type != 0) {
|
||||
offset = 6;
|
||||
bVar1 = 3;
|
||||
|
||||
@@ -105,7 +105,7 @@ void sub_08068AA4(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08068ADC(Entity* this) {
|
||||
if (gRoomTransition.player_status.field_0x24[8] == 2) {
|
||||
if (gRoomTransition.entity_update_type == 2) {
|
||||
GetNextFrame(this);
|
||||
}
|
||||
sub_0806FD3C(this);
|
||||
@@ -146,7 +146,7 @@ void sub_08068B84(Entity* this) {
|
||||
if (p = this->actionDelay, gUnk_08111618[p]) {
|
||||
ForceEquipItem(gUnk_08111618[this->actionDelay], 0);
|
||||
}
|
||||
sub_0805ED14(gUnk_081115EC[this->actionDelay]);
|
||||
InitPlayerMacro(gUnk_081115EC[this->actionDelay]);
|
||||
}
|
||||
|
||||
void sub_08068BB4(Entity* this) {
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ void sub_08063584(Entity* this) {
|
||||
|
||||
if (this->field_0xf != 0) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->field_0xf = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ void CastorWildsStatue(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_080673C0(Entity* this) {
|
||||
if (gRoomTransition.player_status.field_0x24[8] != 0) {
|
||||
if (gRoomTransition.entity_update_type != 0) {
|
||||
this->action = 3;
|
||||
} else {
|
||||
this->action = 1;
|
||||
|
||||
+4
-4
@@ -102,7 +102,7 @@ void sub_080678AC(Entity* this) {
|
||||
sub_08067AAC(this);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
sub_08067B34(this);
|
||||
}
|
||||
}
|
||||
@@ -137,7 +137,7 @@ void sub_08067904(Entity* this) {
|
||||
|
||||
void sub_0806797C(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
sub_08067B08(this);
|
||||
}
|
||||
}
|
||||
@@ -166,7 +166,7 @@ void sub_08067A0C(Entity* this) {
|
||||
u8 tmp;
|
||||
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
if (sub_08067D20(this) != 0) {
|
||||
sub_08067B80(this, 5);
|
||||
this->actionDelay = this->actionDelay + 0x14;
|
||||
@@ -186,7 +186,7 @@ void sub_08067A0C(Entity* this) {
|
||||
|
||||
void sub_08067A78(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
sub_08067AAC(this);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ void Cucco_Idle(Entity* this) {
|
||||
InitAnimationForceUpdate(this, (Random() & 1) + 2);
|
||||
}
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 1;
|
||||
this->subAction = 0;
|
||||
}
|
||||
|
||||
+2
-2
@@ -119,7 +119,7 @@ void sub_08069D00(Entity* this) {
|
||||
this->field_0x6a.HALF.HI = 8;
|
||||
sub_0806A028(this);
|
||||
if (0x1f < this->animIndex) {
|
||||
if ((this->frame & 0x80) == 0) {
|
||||
if ((this->frame & ANIM_DONE) == 0) {
|
||||
return;
|
||||
}
|
||||
this->field_0x6a.HALF.HI = 8;
|
||||
@@ -197,7 +197,7 @@ void sub_08069E50(Entity* this) {
|
||||
sub_0806A028(this);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->animIndex > 0x1f) {
|
||||
if ((this->frame & 0x80) == 0) {
|
||||
if ((this->frame & ANIM_DONE) == 0) {
|
||||
return;
|
||||
}
|
||||
this->field_0x6a.HALF.HI = 8;
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ void sub_0806BFD8(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0806C00C(Entity* this, ScriptExecutionContext* context) {
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
context->condition = 1;
|
||||
} else {
|
||||
context->condition = 0;
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ void sub_0805FE48(Entity* this) {
|
||||
}
|
||||
UpdateAnimationSingleFrame(this);
|
||||
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
switch (this->animIndex) {
|
||||
case 8:
|
||||
case 10:
|
||||
|
||||
@@ -25,7 +25,7 @@ void GoronMerchant(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08069584(Entity* this) {
|
||||
if (gRoomTransition.player_status.field_0x24[8] != 0) {
|
||||
if (gRoomTransition.entity_update_type != 0) {
|
||||
this->action = 3;
|
||||
} else {
|
||||
this->action = 1;
|
||||
@@ -59,7 +59,7 @@ void sub_080695E8(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0806961C(Entity* this) {
|
||||
if (gRoomTransition.player_status.field_0x24[8] == 2) {
|
||||
if (gRoomTransition.entity_update_type == 2) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
sub_0806FD3C(this);
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ void sub_0806CC08(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0806CCB4(Entity* this, ScriptExecutionContext* context) {
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
context->condition = 1;
|
||||
} else {
|
||||
context->condition = 0;
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ void sub_08063220(Entity* this) {
|
||||
|
||||
void sub_08063254(Entity* this, u32 unused) {
|
||||
sub_08063280(this, unused);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->action = 3;
|
||||
MessageFromTarget(0);
|
||||
}
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ void Mama_Head(Entity* this) {
|
||||
|
||||
void sub_0806C4A8(Entity* this, ScriptExecutionContext* context) {
|
||||
s32 tmp;
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
tmp = GetAnimationState(this);
|
||||
if (tmp < 0) {
|
||||
tmp = 3;
|
||||
|
||||
@@ -34,7 +34,7 @@ void sub_0806305C(Entity* this) {
|
||||
this->spriteRendering.b0 = 3;
|
||||
*(u32*)&this->field_0x6c = 0x100;
|
||||
this->field_0x70.WORD = 0x100;
|
||||
sub_0805EC9C(this, 0x100, 0x100, 0x0);
|
||||
SetAffineInfo(this, 0x100, 0x100, 0x0);
|
||||
InitAnimationForceUpdate(this, 0x10);
|
||||
this->field_0x80.HWORD = 0x10;
|
||||
SoundReq(SFX_PLY_SHRINKING);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user