mirror of
https://github.com/zeldaret/tmc
synced 2026-07-26 14:40:04 -04:00
cleanup
This commit is contained in:
@@ -55,7 +55,7 @@ void AngryStatue_Action2(Entity* this) {
|
||||
EnqueueSFX(SFX_EC);
|
||||
}
|
||||
|
||||
} else if ((this->frame & 0x80) != 0) {
|
||||
} else if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->action = 1;
|
||||
InitializeAnimation(this, this->type);
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ void Beanstalk_Action1Type0(BeanstalkEntity* this) {
|
||||
|
||||
void Beanstalk_Action1Type0SubAction0(BeanstalkEntity* this) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
if (super->actionDelay < 2) {
|
||||
super->actionDelay++;
|
||||
} else {
|
||||
@@ -186,7 +186,7 @@ void Beanstalk_Action1Type0SubAction1(BeanstalkEntity* this) {
|
||||
SoundReq(SFX_198);
|
||||
}
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
Entity* entity = CreateObject(BEANSTALK, 1, 0);
|
||||
super->child = entity;
|
||||
if (entity != NULL) {
|
||||
@@ -228,7 +228,7 @@ void Beanstalk_Action1Type2(BeanstalkEntity* this) {
|
||||
super->actionDelay = 0;
|
||||
}
|
||||
}
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->child = CreateObject(BEANSTALK, 3, 0);
|
||||
if (super->child != NULL) {
|
||||
super->child->x.HALF.HI = super->x.HALF.HI;
|
||||
@@ -242,7 +242,7 @@ void Beanstalk_Action1Type2(BeanstalkEntity* this) {
|
||||
}
|
||||
|
||||
void Beanstalk_Action1Type4(BeanstalkEntity* this) {
|
||||
if ((super->frame & 0x80) == 0) {
|
||||
if ((super->frame & ANIM_DONE) == 0) {
|
||||
GetNextFrame(super);
|
||||
}
|
||||
}
|
||||
@@ -290,7 +290,7 @@ void Beanstalk_Action1Type7(BeanstalkEntity* this) {
|
||||
super->actionDelay = 0;
|
||||
}
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
InitializeAnimation(super, (super->type2 - 1) * 3 + 1);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -87,7 +87,7 @@ void BigIceBlock_Action2(BigIceBlockEntity* this) {
|
||||
super->actionDelay += 1;
|
||||
}
|
||||
tmp = gUnk_081237B0[super->actionDelay >> 5];
|
||||
sub_0805EC9C(super, 0x100, tmp, 0);
|
||||
SetAffineInfo(super, 0x100, tmp, 0);
|
||||
if (super->type != 1) {
|
||||
if (super->type != 2) {
|
||||
SetFlag(this->unk_86);
|
||||
@@ -114,7 +114,7 @@ void sub_08099880(BigIceBlockEntity* this) {
|
||||
sub_08099C18(this);
|
||||
}
|
||||
uVar4 = (0x3c - super->actionDelay) * 0x20 + 0x100;
|
||||
sub_0805EC9C(super, 0x100, uVar4, 0);
|
||||
SetAffineInfo(super, 0x100, uVar4, 0);
|
||||
sub_0806FCF4(super, uVar4, 2, 0);
|
||||
obj = CreateObject(SPECIAL_FX, 0x11, 0x40);
|
||||
if (obj != NULL) {
|
||||
|
||||
@@ -70,7 +70,7 @@ void BigPushableLever_Idle(BigPushableLeverEntity* this) {
|
||||
|
||||
void BigPushableLever_Pushing(BigPushableLeverEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
if (super->type2 == 0) {
|
||||
SetFlag(this->pushedFlag);
|
||||
} else {
|
||||
|
||||
@@ -91,7 +91,7 @@ void sub_08098E3C(Entity* this) {
|
||||
InitAnimationForceUpdate(this, this->type);
|
||||
}
|
||||
temp = &gUnk_08123690[this->type & 2];
|
||||
sub_0805EC9C(this, temp[0], temp[1], 0);
|
||||
SetAffineInfo(this, temp[0], temp[1], 0);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -131,7 +131,7 @@ void sub_0809D178(Entity* this) {
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
this->frame = 0x80;
|
||||
}
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
InitializeAnimation(this, Random() & 3);
|
||||
this->frameDuration = (Random() & 0xf) + 0x10;
|
||||
this->spriteSettings.flipX = FALSE;
|
||||
|
||||
@@ -59,7 +59,7 @@ void sub_0808B2CC(BollardEntity* this) {
|
||||
|
||||
void sub_0808B324(BollardEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
sub_0808B42C(this);
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ void sub_0808B344(BollardEntity* this) {
|
||||
|
||||
void sub_0808B38C(BollardEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
sub_0808B41C(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ void BossDoor_Action1(BossDoorEntity* this) {
|
||||
}
|
||||
|
||||
void BossDoor_Action2(BossDoorEntity* this) {
|
||||
if ((super->frame & 0x80) == 0) {
|
||||
if ((super->frame & ANIM_DONE) == 0) {
|
||||
if ((gRoomTransition.frameCount & 3) == 0) {
|
||||
SoundReq(SFX_185);
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ void ChestSpawner_Type2Action3(ChestSpawnerEntity* this) {
|
||||
void ChestSpawner_Type2Action4(ChestSpawnerEntity* this) {
|
||||
sub_0800445C(super);
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
if (--super->field_0xf == 0) {
|
||||
if (super->actionDelay == 0x18) {
|
||||
super->action = 6;
|
||||
|
||||
@@ -133,7 +133,7 @@ void CrenelBeanSprout_Action1(CrenelBeanSproutEntity* this) {
|
||||
u32 tmp;
|
||||
if ((super->type & 1) != 0) {
|
||||
if (super->type == 3) {
|
||||
sub_08078930(super);
|
||||
RegisterCarryEntity(super);
|
||||
sub_0800445C(super);
|
||||
} else {
|
||||
PositionRelative(super->parent, super, -0x1c0000, -0x280000);
|
||||
@@ -159,7 +159,7 @@ void CrenelBeanSprout_Action1(CrenelBeanSproutEntity* this) {
|
||||
super->spriteRendering.b3 = parent->spriteRendering.b3;
|
||||
super->spriteOrientation.flipY = parent->spriteOrientation.flipY;
|
||||
}
|
||||
sub_0805EC9C(super, 0xcc, 0xcc, 0);
|
||||
SetAffineInfo(super, 0xcc, 0xcc, 0);
|
||||
} else {
|
||||
gPlayerState.mobility |= 0x80;
|
||||
gPlayerState.heldObject = 5;
|
||||
@@ -177,7 +177,7 @@ void CrenelBeanSprout_Action1(CrenelBeanSproutEntity* this) {
|
||||
gUnk_0200AF00.unk_2f = 0;
|
||||
}
|
||||
PositionRelative(&gPlayerEntity, super, 0, 0x10000);
|
||||
if (sub_080B1AA8(super) == 0x19) {
|
||||
if (GetTileUnderEntity(super) == 0x19) {
|
||||
sub_0807BA8C(0xdc, super->collisionLayer);
|
||||
sub_08096A78(this);
|
||||
}
|
||||
@@ -228,7 +228,7 @@ void CrenelBeanSprout_Action2SubAction3(CrenelBeanSproutEntity* this) {
|
||||
|
||||
void CrenelBeanSprout_Action3(CrenelBeanSproutEntity* this) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action++;
|
||||
InitializeAnimation(super, 10);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ void DeathFx_Action0(DeathFxObject* this) {
|
||||
tmp = super->actionDelay;
|
||||
super->actionDelay = 0;
|
||||
}
|
||||
sub_0805EC9C(super, tmp, tmp, 0);
|
||||
SetAffineInfo(super, tmp, tmp, 0);
|
||||
LoadSwapGFX(super, 4, 0);
|
||||
InitAnimationForceUpdate(super, 0);
|
||||
SoundReq(SFX_BOSS_EXPLODE);
|
||||
@@ -80,7 +80,7 @@ void DeathFx_Action0(DeathFxObject* this) {
|
||||
|
||||
void DeathFx_Action1(DeathFxObject* this) {
|
||||
GetNextFrame(super);
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
sub_08081790(this);
|
||||
DeathFx_Delete(this);
|
||||
} else {
|
||||
@@ -92,7 +92,7 @@ void DeathFx_Action1(DeathFxObject* this) {
|
||||
|
||||
void DeathFx_Action2(DeathFxObject* this) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
DeathFx_Delete(this);
|
||||
} else {
|
||||
if ((super->frame & 1) != 0) {
|
||||
|
||||
@@ -56,7 +56,7 @@ void sub_08088718(EyeSwitchEntity* this) {
|
||||
|
||||
void sub_08088760(EyeSwitchEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action = 3;
|
||||
this->unk70 = super->actionDelay << 1;
|
||||
InitializeAnimation(super, super->animationState + 4);
|
||||
@@ -78,7 +78,7 @@ void sub_08088790(EyeSwitchEntity* this) {
|
||||
|
||||
void sub_080887D8(EyeSwitchEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action = 1;
|
||||
COLLISION_ON(super);
|
||||
InitializeAnimation(super, super->animationState);
|
||||
|
||||
@@ -152,7 +152,7 @@ void EzloCap_Type1Action1(EzloCapEntity* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if ((super->frame & 0x80) != 0) {
|
||||
} else if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->actionDelay = Random() & 3;
|
||||
if (super->actionDelay != 0) {
|
||||
super->spriteSettings.flipX = Random() & 1;
|
||||
@@ -203,7 +203,7 @@ void sub_08082C5C(EzloCapEntity* this) {
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
InitAnimationForceUpdate(super, gUnk_0811F18C[Random() & 3] + (Random() & 3));
|
||||
return;
|
||||
}
|
||||
@@ -292,7 +292,7 @@ void EzloCap_ScriptedAction2(EzloCapEntity* this) {
|
||||
|
||||
void EzloCap_ScriptedAction3(EzloCapEntity* this) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action = 1;
|
||||
super->subAction = 0;
|
||||
super->spriteOffsetX = 0;
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ void Fan_Action2(FanEntity* this) {
|
||||
void Fan_Action3(FanEntity* this) {
|
||||
sub_0809F08C(this);
|
||||
sub_0809EE44(this);
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
sub_0809EE34(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ void FigurineDevice_Action3(FigurineDeviceEntity* this) {
|
||||
GetNextFrame(super);
|
||||
switch (this->unk_7a) {
|
||||
case 0:
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
this->unk_7a = 1;
|
||||
super->actionDelay = 0x28;
|
||||
ChangeObjPalette(super, gUnk_08120AA8[super->type2]);
|
||||
@@ -207,7 +207,7 @@ void FigurineDevice_Action3(FigurineDeviceEntity* this) {
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (((super->frame & 0x80) != 0) && (--super->actionDelay == 0)) {
|
||||
if (((super->frame & ANIM_DONE) != 0) && (--super->actionDelay == 0)) {
|
||||
this->unk_7a = 2;
|
||||
SetRoomFlag(2);
|
||||
MenuFadeIn(7, super->field_0xf);
|
||||
|
||||
@@ -47,12 +47,12 @@ void sub_0809BECC(FrozenWaterElementEntity* this) {
|
||||
super->frameIndex = 0;
|
||||
super->spriteRendering.b0 = 3;
|
||||
sub_0809C0A8(this);
|
||||
sub_0805EC9C(super, 0xcc, 0xcc, 0);
|
||||
SetAffineInfo(super, 0xcc, 0xcc, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0809BF1C(FrozenWaterElementEntity* this) {
|
||||
sub_0805EC9C(super, 0xcc, 0xcc, 0);
|
||||
SetAffineInfo(super, 0xcc, 0xcc, 0);
|
||||
if (CheckFlags(OUGONTEKI_G)) {
|
||||
Entity* obj = CreateObject(OBJECT_90, 0, 0);
|
||||
if (obj != NULL) {
|
||||
@@ -88,7 +88,7 @@ void sub_0809BF74(FrozenWaterElementEntity* this) {
|
||||
if (this->unk_74 < 0x78) {
|
||||
tmp2 = ((0x78 - this->unk_74) << 5);
|
||||
tmp2 += 0xcc;
|
||||
sub_0805EC9C(super, ((0x78 - this->unk_74) << 4) + 0xcc, tmp2, 0);
|
||||
SetAffineInfo(super, ((0x78 - this->unk_74) << 4) + 0xcc, tmp2, 0);
|
||||
sub_0806FCF4(super, tmp2, 8, 0);
|
||||
super->spriteOffsetY += 8;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ void sub_080921F0(GentariCurtainEntity* this);
|
||||
void sub_08092214(GentariCurtainEntity* this);
|
||||
|
||||
extern Entity gUnk_030011E8[7];
|
||||
extern Entity gUnk_03003BE0;
|
||||
extern Entity gCarryEntities;
|
||||
|
||||
void GentariCurtain(Entity* this) {
|
||||
static void (*const actionFuncs[])(GentariCurtainEntity*) = {
|
||||
@@ -76,7 +76,7 @@ void sub_0809214C(GentariCurtainEntity* this) {
|
||||
|
||||
void sub_08092164(GentariCurtainEntity* this) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action = 3;
|
||||
SetTile(this->tileIndex, this->tile, 1);
|
||||
SetTile(this->tileIndex2, this->tile2, 1);
|
||||
|
||||
@@ -173,7 +173,7 @@ void GreatFairy_WingsInit(Entity* this) {
|
||||
gScreen.controls.layerFXControl = 0xF40;
|
||||
gScreen.controls.alphaBlend = BLDALPHA_BLEND(9, 8);
|
||||
this->speed = 1024;
|
||||
sub_0805EC9C(this, 1024, 256, 0);
|
||||
SetAffineInfo(this, 1024, 256, 0);
|
||||
}
|
||||
|
||||
void GreatFairy_WingsUpdate(Entity* this) {
|
||||
@@ -184,7 +184,7 @@ void GreatFairy_WingsUpdate(Entity* this) {
|
||||
gRoomVars.animFlags |= 32;
|
||||
gActiveScriptInfo.syncFlags |= 4;
|
||||
} else {
|
||||
sub_0805EC9C(this, this->speed, 256, 0);
|
||||
SetAffineInfo(this, this->speed, 256, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ void GreatFairy_MiniAffineInit2(Entity* this) {
|
||||
this->actionDelay = 90;
|
||||
this->speed = 4096;
|
||||
this->spriteRendering.b0 = 3;
|
||||
sub_0805EC9C(this, 256, 256, 0);
|
||||
SetAffineInfo(this, 256, 256, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ void GreatFairy_MiniAffineUpdate(Entity* this) {
|
||||
sub_0805EC60(this);
|
||||
} else {
|
||||
this->speed -= 24;
|
||||
sub_0805EC9C(this, 256, this->speed >> 4, 0);
|
||||
SetAffineInfo(this, 256, this->speed >> 4, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ void GreatFairy_DropletInit(Entity* this) {
|
||||
|
||||
void GreatFairy_DropletUpdate(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
DeleteEntity(this);
|
||||
}
|
||||
}
|
||||
@@ -370,7 +370,7 @@ void GreatFairy_EnergyInit(Entity* this) {
|
||||
|
||||
void GreatFairy_EnergyUpdate(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
DeleteEntity(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ static void sub_0808E714(Entity* this) {
|
||||
int var0 = 0x400 - this->field_0xf * 8;
|
||||
if (var0 > 0x100) {
|
||||
this->field_0xf++;
|
||||
sub_0805EC9C(this, var0, var0, 0);
|
||||
SetAffineInfo(this, var0, var0, 0);
|
||||
} else {
|
||||
this->action = 3;
|
||||
this->field_0x3c |= 0x10;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "sound.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern void sub_080A0960(Entity*, u32);
|
||||
static void SetJailBarTiles(Entity*, u32);
|
||||
|
||||
extern void (*const gUnk_08124950[])(Entity*);
|
||||
extern u16 gUnk_08124960[];
|
||||
@@ -18,11 +18,11 @@ void JailBars(Entity* this) {
|
||||
void sub_080A08C4(Entity* this) {
|
||||
if (CheckFlags(this->field_0x86.HWORD) == 0) {
|
||||
this->action = 1;
|
||||
sub_080A0960(this, 0);
|
||||
SetJailBarTiles(this, 0);
|
||||
} else {
|
||||
this->action = 3;
|
||||
InitializeAnimation(this, 1);
|
||||
sub_080A0960(this, 1);
|
||||
SetJailBarTiles(this, 1);
|
||||
}
|
||||
this->spriteSettings.draw = 3; // ???
|
||||
this->collisionLayer = 1;
|
||||
@@ -32,14 +32,14 @@ void sub_080A08C4(Entity* this) {
|
||||
void sub_080A0910(Entity* this) {
|
||||
if (CheckFlags(this->field_0x86.HWORD) != 0) {
|
||||
this->action = 2;
|
||||
sub_080A0960(this, 1);
|
||||
SetJailBarTiles(this, 1);
|
||||
SoundReq(SFX_10B);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080A0938(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 3;
|
||||
InitializeAnimation(this, 1);
|
||||
}
|
||||
@@ -48,7 +48,7 @@ void sub_080A0938(Entity* this) {
|
||||
void nullsub_127(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_080A0960(Entity* this, u32 arg1) {
|
||||
static void SetJailBarTiles(Entity* this, u32 arg1) {
|
||||
u16* puVar1;
|
||||
|
||||
puVar1 = gUnk_08124960;
|
||||
|
||||
@@ -95,7 +95,7 @@ void LavaPlatform_Type0Action2(LavaPlatformEntity* this) {
|
||||
(super->child)->spriteOffsetY = 0;
|
||||
InitializeAnimation(super->child, super->child->animationState);
|
||||
CreateFx(super, FX_LAVA_SPLASH_HUGE, 0);
|
||||
} else if ((super->zVelocity < 0x18000) && ((super->frame & 0x80) == 0)) {
|
||||
} else if ((super->zVelocity < 0x18000) && ((super->frame & ANIM_DONE) == 0)) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
}
|
||||
}
|
||||
@@ -169,7 +169,7 @@ void LavaPlatform_Type1Action4(LavaPlatformEntity* this) {
|
||||
}
|
||||
if (this->timer < 0x8d) {
|
||||
GetNextFrame(super);
|
||||
tmp = super->frame & 0x80;
|
||||
tmp = super->frame & ANIM_DONE;
|
||||
if (tmp) {
|
||||
// Platform sank
|
||||
super->action = 5;
|
||||
@@ -216,7 +216,7 @@ void LavaPlatform_Type1Action6(LavaPlatformEntity* this) {
|
||||
super->flags |= ENT_COLLIDE;
|
||||
super->hitType = 0xac;
|
||||
} else {
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
sub_0809264C(this);
|
||||
if (tmp) {
|
||||
gPlayerState.field_0x3f = 0xfd;
|
||||
|
||||
@@ -124,7 +124,7 @@ void sub_08085A98(LilypadLargeEntity* this) {
|
||||
sub_08085F1C(this);
|
||||
if (0x7fffff < (u32)this->unk_78.WORD) {
|
||||
this->unk_78.WORD -= 0x20000;
|
||||
sub_0805EC9C(super, this->unk_78.HALF_U.HI, this->unk_78.HALF_U.HI, this->unk_7c.HALF_U.HI);
|
||||
SetAffineInfo(super, this->unk_78.HALF_U.HI, this->unk_78.HALF_U.HI, this->unk_7c.HALF_U.HI);
|
||||
}
|
||||
if (sub_080B1A8C(super, 0, 0x18) != 0x11) {
|
||||
super->subAction = 2;
|
||||
@@ -148,7 +148,7 @@ void sub_08085B40(LilypadLargeEntity* this) {
|
||||
if (GravityUpdate(super, 0x2000) != 0) {
|
||||
if ((u32)this->unk_78.WORD < 0x1200000) {
|
||||
this->unk_78.WORD += 0x100000;
|
||||
sub_0805EC9C(super, this->unk_78.HALF_U.HI, this->unk_78.HALF_U.HI, this->unk_7c.HALF_U.HI);
|
||||
SetAffineInfo(super, this->unk_78.HALF_U.HI, this->unk_78.HALF_U.HI, this->unk_7c.HALF_U.HI);
|
||||
}
|
||||
gPlayerEntity.y.HALF.HI = (super->y.HALF.HI + super->z.HALF.HI) - this->unk_74;
|
||||
if (gArea.locationIndex == 0x1b) {
|
||||
@@ -159,7 +159,7 @@ void sub_08085B40(LilypadLargeEntity* this) {
|
||||
}
|
||||
} else {
|
||||
ResetCollisionLayer(super);
|
||||
if (sub_080B1AA8(super) == 0xd) {
|
||||
if (GetTileUnderEntity(super) == 0xd) {
|
||||
ResetCollisionLayer(&gPlayerEntity);
|
||||
sub_08085CDC(this);
|
||||
super->direction = GetFacingDirection(&gPlayerEntity, super);
|
||||
@@ -181,7 +181,7 @@ void sub_08085B40(LilypadLargeEntity* this) {
|
||||
super->actionDelay |= 0x80;
|
||||
this->unk_70 = 0;
|
||||
this->unk_6c = 0;
|
||||
if (sub_080B1AA8(super) == 0xd) {
|
||||
if (GetTileUnderEntity(super) == 0xd) {
|
||||
super->action = 4;
|
||||
}
|
||||
}
|
||||
@@ -214,7 +214,7 @@ void sub_08085C5C(LilypadLargeEntity* this) {
|
||||
void sub_08085CDC(LilypadLargeEntity* this) {
|
||||
this->unk_78.WORD += 0x100000;
|
||||
if (this->unk_78.WORD_U < 0x4000000) {
|
||||
sub_0805EC9C(super, this->unk_78.HALF_U.HI, this->unk_78.HALF_U.HI, this->unk_7c.HALF_U.HI);
|
||||
SetAffineInfo(super, this->unk_78.HALF_U.HI, this->unk_78.HALF_U.HI, this->unk_7c.HALF_U.HI);
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -381,5 +381,5 @@ void sub_08085F48(LilypadLargeEntity* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
sub_0805EC9C(super, this->unk_78.HALF_U.HI, this->unk_78.HALF_U.HI, this->unk_7c.HALF_U.HI);
|
||||
SetAffineInfo(super, this->unk_78.HALF_U.HI, this->unk_78.HALF_U.HI, this->unk_7c.HALF_U.HI);
|
||||
}
|
||||
|
||||
@@ -59,5 +59,5 @@ static void sub_08097B24(Entity* this) {
|
||||
temp2 = ++this->field_0xf;
|
||||
|
||||
temp = temp3[(temp2 >> 5) & 7];
|
||||
sub_0805EC9C(this, temp, temp, 0);
|
||||
SetAffineInfo(this, temp, temp, 0);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ void LitArea(Entity* this) {
|
||||
this->actionDelay = 2;
|
||||
this->field_0x68.HWORD = 0xfffe;
|
||||
this->field_0x6a.HWORD = 0x80;
|
||||
sub_0805EC9C(this, 0x80, 0x80, 0);
|
||||
SetAffineInfo(this, 0x80, 0x80, 0);
|
||||
} else {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->actionDelay = 2;
|
||||
@@ -30,7 +30,7 @@ void LitArea(Entity* this) {
|
||||
if (0x88 < this->field_0x6a.HWORD) {
|
||||
this->field_0x68.HWORD = 0xffff;
|
||||
}
|
||||
sub_0805EC9C(this, this->field_0x6a.HWORD, this->field_0x6a.HWORD, 0);
|
||||
SetAffineInfo(this, this->field_0x6a.HWORD, this->field_0x6a.HWORD, 0);
|
||||
}
|
||||
}
|
||||
gScreen.lcd.displayControl |= DISPCNT_OBJWIN_ON;
|
||||
|
||||
@@ -44,7 +44,7 @@ void MacroBook_Init(MacroBookEntity* this) {
|
||||
super->spriteOffsetY = -4;
|
||||
super->spritePriority.b0 = 7;
|
||||
super->spriteRendering.b3 = 3;
|
||||
sub_0805EC9C(super, this->unk80, this->unk80, 0);
|
||||
SetAffineInfo(super, this->unk80, this->unk80, 0);
|
||||
UpdateSpriteForCollisionLayer(super);
|
||||
InitAnimationForceUpdate(super, super->field_0xf);
|
||||
sub_0809A958(this);
|
||||
@@ -56,7 +56,7 @@ void MacroBook_Action1(MacroBookEntity* this) {
|
||||
if (super->actionDelay) {
|
||||
super->actionDelay--;
|
||||
} else {
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
if (super->field_0xf == 3) {
|
||||
super->action = 2;
|
||||
super->actionDelay = 90;
|
||||
@@ -83,7 +83,7 @@ void MacroBook_Action2(MacroBookEntity* this) {
|
||||
super->action = 1;
|
||||
super->actionDelay = 0;
|
||||
} else {
|
||||
if ((super->frame & 0x80) == 0) {
|
||||
if ((super->frame & ANIM_DONE) == 0) {
|
||||
return;
|
||||
}
|
||||
super->action = 3;
|
||||
@@ -117,7 +117,7 @@ void MacroBook_Action3(MacroBookEntity* this) {
|
||||
if (super->actionDelay) {
|
||||
this->unk80 += 8;
|
||||
super->x.WORD += 0x400;
|
||||
sub_0805EC9C(super, this->unk80, this->unk80, 0);
|
||||
SetAffineInfo(super, this->unk80, this->unk80, 0);
|
||||
} else {
|
||||
sub_0809AA9C(this, super->child, 0);
|
||||
sub_0809AA9C(this, &gPlayerEntity, 1);
|
||||
|
||||
@@ -111,7 +111,7 @@ void MacroPlayer_Type0_Init(MacroPlayerEntity* this) {
|
||||
super->z.HALF.HI = 0xff50;
|
||||
this->unk6a = 4;
|
||||
super->spriteRendering.b0 = 3;
|
||||
sub_0805EC9C(super, 4, 4, 0);
|
||||
SetAffineInfo(super, 4, 4, 0);
|
||||
ptr = gUnk_02018EB0;
|
||||
*(Entity**)&ptr[0x14] = super;
|
||||
ChangeObjPalette(super, sub_0807A094(0));
|
||||
@@ -125,7 +125,7 @@ void MacroPlayer_Type0_Init(MacroPlayerEntity* this) {
|
||||
void sub_0808CC88(MacroPlayerEntity* this) {
|
||||
if (this->unk6a < 0x400) {
|
||||
this->unk6a += 4;
|
||||
sub_0805EC9C(super, this->unk6a, this->unk6a, 0);
|
||||
SetAffineInfo(super, this->unk6a, this->unk6a, 0);
|
||||
sub_0806FCF4(super, this->unk6a, 8, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ void sub_080919AC(Entity* this) {
|
||||
iVar2 = sub_08007DD6(uVar3, gUnk_081223D8[this->animationState]);
|
||||
if (iVar2 == 0) {
|
||||
this->direction = DirectionTurnAround(this->direction);
|
||||
this->animationState = this->animationState ^ 2;
|
||||
this->animationState = AnimationStateFlip90(this->animationState);
|
||||
} else {
|
||||
switch (uVar3) {
|
||||
case 0x64:
|
||||
@@ -177,7 +177,7 @@ void sub_080919AC(Entity* this) {
|
||||
case 0x6d:
|
||||
case 0x6e:
|
||||
case 0x6f:
|
||||
if (uVar3 == sub_080B1AA8(this)) {
|
||||
if (uVar3 == GetTileUnderEntity(this)) {
|
||||
sub_08091C0C(this);
|
||||
gPlayerEntity.animationState = this->animationState << 1;
|
||||
return;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "object.h"
|
||||
|
||||
extern void (*MineralWaterSourceActionFuncs[])(Entity*);
|
||||
|
||||
@@ -12,8 +11,6 @@ typedef struct {
|
||||
|
||||
extern UnkStruct_MineralWater MineralWaterSourceParameters[];
|
||||
|
||||
extern bool32 AllocMutableHitbox(Entity*);
|
||||
|
||||
void MineralWaterSource(Entity* this) {
|
||||
MineralWaterSourceActionFuncs[this->action](this);
|
||||
}
|
||||
@@ -21,7 +18,7 @@ void MineralWaterSource(Entity* this) {
|
||||
void MineralWaterSource_Init(Entity* this) {
|
||||
UnkStruct_MineralWater* unknownParameters;
|
||||
|
||||
if (!AllocMutableHitbox(this)) {
|
||||
if (AllocMutableHitbox(this) == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ void Object15_Action1(Entity* this) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
} else {
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ END_NONMATCH
|
||||
|
||||
void sub_080875F4(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (this->type2 != 0) {
|
||||
|
||||
@@ -48,7 +48,7 @@ void sub_08087824(Entity* this) {
|
||||
|
||||
void sub_08087888(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
if (this->frame < 5) {
|
||||
|
||||
@@ -38,7 +38,7 @@ void Object21(Object21Entity* this) {
|
||||
} else {
|
||||
if (super->animIndex == 0xa) {
|
||||
InitializeAnimation(super, 0xd);
|
||||
} else if ((super->frame & 0x80) != 0) {
|
||||
} else if ((super->frame & ANIM_DONE) != 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,6 @@ void Object2B(Entity* object) {
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
int position = 0x120 - parent->z.HALF.HI;
|
||||
sub_0805EC9C(object, position, position, parent->field_0x7c.HALF_U.HI);
|
||||
SetAffineInfo(object, position, position, parent->field_0x7c.HALF_U.HI);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ void sub_0808BBE0(Object36Entity* this) {
|
||||
diff /= 0x10;
|
||||
super->spriteOffsetY = gUnk_08121474[diff];
|
||||
ptr = &gUnk_0812144C[diff * 2];
|
||||
sub_0805EC9C(super, ptr[0], ptr[1], 0);
|
||||
SetAffineInfo(super, ptr[0], ptr[1], 0);
|
||||
} else {
|
||||
super->bitfield &= 0x7f;
|
||||
}
|
||||
@@ -119,7 +119,7 @@ void sub_0808BD14(Object36Entity* this) {
|
||||
|
||||
if (super->field_0xf != 0) {
|
||||
super->field_0xf -= 8;
|
||||
sub_0805EC9C(super, 0x200 - super->field_0xf, 0x200 - super->field_0xf, 0);
|
||||
SetAffineInfo(super, 0x200 - super->field_0xf, 0x200 - super->field_0xf, 0);
|
||||
}
|
||||
if (super->bitfield == 0x93) {
|
||||
super->direction = GetFacingDirection(super, &gPlayerEntity);
|
||||
|
||||
@@ -74,7 +74,7 @@ void Object3D_Action1(Object3DEntity* this) {
|
||||
super->actionDelay = 0x1e;
|
||||
super->field_0xf = 0xff;
|
||||
super->spriteRendering.b0 = 3;
|
||||
sub_0805EC9C(super, 0x100, 0x100, 0);
|
||||
SetAffineInfo(super, 0x100, 0x100, 0);
|
||||
gArea.field_0x10 = 1;
|
||||
SetFade(5, 8);
|
||||
}
|
||||
@@ -108,7 +108,7 @@ void Object3D_Action2(Object3DEntity* this) {
|
||||
if (0x80 < super->field_0xf) {
|
||||
super->field_0xf -= 8;
|
||||
}
|
||||
sub_0805EC9C(super, super->field_0xf, super->field_0xf, 0);
|
||||
SetAffineInfo(super, super->field_0xf, super->field_0xf, 0);
|
||||
} else {
|
||||
gArea.filler3[0]++;
|
||||
gArea.field_0x10 = 0;
|
||||
|
||||
@@ -191,7 +191,7 @@ void Object3E_Type7(Object3EEntity* this) {
|
||||
super->spritePriority.b0 = 7;
|
||||
super->spriteRendering.alphaBlend = 1;
|
||||
super->frameIndex = super->type2;
|
||||
sub_0805EC9C(super, (1 - super->type2) * 0x200 + 0x100, 0xffffff40, 0);
|
||||
SetAffineInfo(super, (1 - super->type2) * 0x200 + 0x100, 0xffffff40, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ void Object43_Action3(Object43Entity* this) {
|
||||
|
||||
void Object43_Action4(Object43Entity* this) {
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ void sub_0808E298(Entity* this) {
|
||||
|
||||
void sub_0808E318(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
sub_0808E354(this, 0x343);
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
|
||||
@@ -111,7 +111,7 @@ void sub_0808F244(Entity* this) {
|
||||
}
|
||||
|
||||
static void sub_0808F2B0(Entity* this) {
|
||||
sub_0805EC9C(this, *(u32*)&this->field_0x74, *(u32*)&this->field_0x78, this->field_0x70.WORD);
|
||||
SetAffineInfo(this, *(u32*)&this->field_0x74, *(u32*)&this->field_0x78, this->field_0x70.WORD);
|
||||
}
|
||||
|
||||
void sub_0808F2C0(Entity* this) {
|
||||
|
||||
@@ -48,7 +48,7 @@ void Object4B_Action1(Object4BEntity* this) {
|
||||
|
||||
void Object4B_Action2(Object4BEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action++;
|
||||
super->spritePriority.b1 = 3;
|
||||
InitializeAnimation(super, 2);
|
||||
@@ -80,12 +80,12 @@ void Object4B_Action4(Object4BEntity* this) {
|
||||
}
|
||||
if ((super->y.HALF.HI - gRoomControls.origin_y) < 0x231) {
|
||||
super->y.HALF.HI = gRoomControls.origin_y + 0x230;
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action++;
|
||||
super->actionDelay = 0x78;
|
||||
InitializeAnimation(super, 2);
|
||||
}
|
||||
} else if ((super->frame & 0x80) != 0) {
|
||||
} else if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->zVelocity = 0x20000;
|
||||
InitializeAnimation(super, 3);
|
||||
SoundReq(SFX_12B);
|
||||
@@ -102,7 +102,7 @@ void Object4B_Action5(Object4BEntity* this) {
|
||||
|
||||
void Object4B_Action6(Object4BEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action++;
|
||||
super->actionDelay = 0x3c;
|
||||
InitializeAnimation(super, 1);
|
||||
|
||||
@@ -124,7 +124,7 @@ void Object61_Action1Type0(Object61Entity* this) {
|
||||
super->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY;
|
||||
super->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3;
|
||||
sub_0806FCF4(super, this->unk_72, 10, 2);
|
||||
sub_0805EC9C(super, this->unk_6e, this->unk_72, 0);
|
||||
SetAffineInfo(super, this->unk_6e, this->unk_72, 0);
|
||||
sub_0806FEBC(&gPlayerEntity, 1, super);
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ void sub_08093EAC(Object64Entity* this) {
|
||||
|
||||
void sub_08093ED0(Object64Entity* this) {
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
DeleteEntity(super);
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ void sub_08093EF0(Object64Entity* this) {
|
||||
return;
|
||||
}
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) == 0) {
|
||||
if ((super->frame & ANIM_DONE) == 0) {
|
||||
return;
|
||||
}
|
||||
object = CreateObject(OBJECT_64, 1, 0);
|
||||
@@ -100,7 +100,7 @@ void sub_08093EF0(Object64Entity* this) {
|
||||
CopyPosition(super, object);
|
||||
}
|
||||
}
|
||||
if ((super->frame & 0x80) == 0) {
|
||||
if ((super->frame & ANIM_DONE) == 0) {
|
||||
return;
|
||||
}
|
||||
if (super->parent == &gPlayerEntity) {
|
||||
@@ -111,7 +111,7 @@ void sub_08093EF0(Object64Entity* this) {
|
||||
break;
|
||||
case 2:
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) == 0) {
|
||||
if ((super->frame & ANIM_DONE) == 0) {
|
||||
return;
|
||||
}
|
||||
DeleteThisEntity();
|
||||
|
||||
@@ -27,7 +27,7 @@ void Object66(Entity* this) {
|
||||
iVar2 = 0x100 - 2 * (parent->z.HALF.HI + 0x40);
|
||||
iVar4 = 0x200 - 4 * (parent->z.HALF.HI + 0x40);
|
||||
}
|
||||
sub_0805EC9C(this, iVar2, iVar4, 0);
|
||||
SetAffineInfo(this, iVar2, iVar4, 0);
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -27,8 +27,6 @@ void sub_08094570(Object67Entity*);
|
||||
void sub_08094660(Object67Entity*);
|
||||
void sub_08094708(Object67Entity*, u32, u32);
|
||||
|
||||
extern bool32 AllocMutableHitbox(Entity*);
|
||||
|
||||
void Object67(Entity* this) {
|
||||
static void (*const actionFuncs[])(Object67Entity*) = {
|
||||
sub_08094148, sub_08094398, sub_08094424, sub_08094540, sub_08094570,
|
||||
@@ -135,7 +133,7 @@ void sub_08094148(Object67Entity* this) {
|
||||
this->unk84.HALF.HI = 0x100;
|
||||
}
|
||||
|
||||
if (AllocMutableHitbox(super)) {
|
||||
if (AllocMutableHitbox(super) != NULL) {
|
||||
super->hitbox->offset_x = gUnk_080FD2E8.offset_x;
|
||||
super->hitbox->offset_y = gUnk_080FD2E8.offset_y;
|
||||
super->hitbox->unk2[0] = gUnk_080FD2E8.unk2[0];
|
||||
@@ -181,7 +179,7 @@ void sub_08094398(Object67Entity* this) {
|
||||
this->unk7c = 600;
|
||||
super->action = 2;
|
||||
}
|
||||
sub_0805EC9C(super, this->unk80.HALF_U.HI, this->unk84.HALF_U.HI, 0);
|
||||
SetAffineInfo(super, this->unk80.HALF_U.HI, this->unk84.HALF_U.HI, 0);
|
||||
} else {
|
||||
if ((((GenericEntity*)super->child)->field_0x78.HALF.HI & 0x80) == 0) {
|
||||
DeleteThisEntity();
|
||||
@@ -224,7 +222,7 @@ void sub_08094424(Object67Entity* this) {
|
||||
} else {
|
||||
sub_0806FCF4(super, this->unk80.HALF.HI, 0x20, super->actionDelay);
|
||||
sub_0806FCF4(super, this->unk84.HALF.HI, 0x20, super->field_0xf);
|
||||
sub_0805EC9C(super, this->unk80.HALF_U.HI, this->unk84.HALF_U.HI, 0);
|
||||
SetAffineInfo(super, this->unk80.HALF_U.HI, this->unk84.HALF_U.HI, 0);
|
||||
}
|
||||
|
||||
if (super->hitbox != NULL) {
|
||||
@@ -241,7 +239,7 @@ void sub_08094540(Object67Entity* this) {
|
||||
super->action = 4;
|
||||
this->unk7c = 2;
|
||||
}
|
||||
sub_0805EC9C(super, this->unk80.HALF_U.HI, this->unk84.HALF_U.HI, 0);
|
||||
SetAffineInfo(super, this->unk80.HALF_U.HI, this->unk84.HALF_U.HI, 0);
|
||||
}
|
||||
|
||||
void sub_08094570(Object67Entity* this) {
|
||||
@@ -275,7 +273,7 @@ void sub_08094570(Object67Entity* this) {
|
||||
}
|
||||
sub_0806FCF4(super, this->unk80.HALF.HI, 0x20, super->actionDelay);
|
||||
sub_0806FCF4(super, this->unk84.HALF.HI, 0x20, super->field_0xf);
|
||||
sub_0805EC9C(super, this->unk80.HALF_U.HI, this->unk84.HALF_U.HI, 0);
|
||||
SetAffineInfo(super, this->unk80.HALF_U.HI, this->unk84.HALF_U.HI, 0);
|
||||
}
|
||||
|
||||
if (super->hitbox != NULL) {
|
||||
|
||||
@@ -327,7 +327,7 @@ void sub_08094E30(Object6AEntity* this) {
|
||||
super->zVelocity = 0;
|
||||
SetDefaultPriority(super, PRIO_PLAYER_EVENT);
|
||||
InitializeAnimation(super, 0);
|
||||
if (sub_080B1AA8(super) == 13) {
|
||||
if (GetTileUnderEntity(super) == 13) {
|
||||
super->action = 3;
|
||||
}
|
||||
break;
|
||||
@@ -344,7 +344,7 @@ void sub_08094E30(Object6AEntity* this) {
|
||||
break;
|
||||
case 2:
|
||||
GetNextFrame(super);
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
break;
|
||||
@@ -548,9 +548,9 @@ void sub_08095288(Object6AEntity* this) {
|
||||
if (super->subAction != 0) {
|
||||
if ((u32)sub_080044EC(super, 0x1800) <= 1) {
|
||||
super->subAction = 0;
|
||||
sub_0805EC9C(super, 0x100, 0x100, 0xC000);
|
||||
SetAffineInfo(super, 0x100, 0x100, 0xC000);
|
||||
} else {
|
||||
sub_0805EC9C(super, 0x100, 0x100, super->actionDelay << 8);
|
||||
SetAffineInfo(super, 0x100, 0x100, super->actionDelay << 8);
|
||||
super->actionDelay += 10;
|
||||
LinearMoveUpdate(super);
|
||||
}
|
||||
@@ -770,7 +770,7 @@ void sub_0809577C(Object6AEntity* this) {
|
||||
InitializeAnimation(super, 1);
|
||||
}
|
||||
GetNextFrame(super);
|
||||
if (super->frame & 0x80)
|
||||
if (super->frame & ANIM_DONE)
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -951,7 +951,7 @@ void sub_08095B48(Object6AEntity* this) {
|
||||
p = super->parent;
|
||||
if (p != NULL) {
|
||||
if ((p->frame & 0x40) == 0) {
|
||||
if (p->frame & 0x80) {
|
||||
if (p->frame & ANIM_DONE) {
|
||||
DeleteThisEntity();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ void sub_08099E10(Entity* this) {
|
||||
this->frame = 0;
|
||||
sub_08099ECC(this);
|
||||
}
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 2;
|
||||
InitializeAnimation(this, 1);
|
||||
}
|
||||
@@ -40,7 +40,7 @@ void sub_08099E10(Entity* this) {
|
||||
|
||||
void sub_08099E58(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->frame &= ~0x80;
|
||||
this->actionDelay++;
|
||||
if (this->actionDelay == 3) {
|
||||
@@ -70,5 +70,5 @@ void sub_08099ECC(Entity* this) {
|
||||
CopyPosition(this, &gPlayerEntity);
|
||||
gPlayerState.queued_action = PLAYER_FALL;
|
||||
gPlayerState.field_0x38 = 0;
|
||||
gPlayerState.flags |= PL_FLAGS8000;
|
||||
gPlayerState.flags |= PL_PIT_IS_EXIT;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ void sub_0809E7C0(Entity* this) {
|
||||
|
||||
void sub_0809E7E0(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ void sub_0809F374(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0809F3E8(Entity* this) {
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
this->action = 3;
|
||||
InitializeAnimation(this, 2);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ void sub_080A05F4(Entity* this) {
|
||||
|
||||
void sub_080A0624(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ void sub_080A0AF0(Entity* this) {
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
GetNextFrame(this);
|
||||
if (this->animIndex == 5) {
|
||||
if ((this->frame & 0x80) != 0) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ void ObjectC1_Action8(ObjectC1Entity* this) {
|
||||
if ((gMessage.doTextBox & 0x7f) != 0) {
|
||||
return;
|
||||
}
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action = 1;
|
||||
gPlayerEntity.flags = this->unk_69;
|
||||
gPlayerEntity.spriteSettings.draw = this->unk_68;
|
||||
|
||||
@@ -99,7 +99,7 @@ void ObjectOnPillar_Action1(ObjectOnPillarEntity* this) {
|
||||
if (sub_08097008(this)) {
|
||||
super->action = 3;
|
||||
} else {
|
||||
sub_08078930(super);
|
||||
RegisterCarryEntity(super);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -211,7 +211,7 @@ void sub_080970F4(ObjectOnPillarEntity* this) {
|
||||
bool32 sub_08097144(ObjectOnPillarEntity* this) {
|
||||
LinearMoveUpdate(super);
|
||||
sub_0800445C(super);
|
||||
if (sub_080B1AA8(super) == 0x19) {
|
||||
if (GetTileUnderEntity(super) == 0x19) {
|
||||
super->spriteOffsetY = 2;
|
||||
}
|
||||
if ((--this->unk_76 == 0) && sub_08097194(this) == FALSE) {
|
||||
|
||||
@@ -120,7 +120,7 @@ void ObjectOnSpinyBeetle_Action1(ObjectOnSpinyBeetleEntity* this) {
|
||||
}
|
||||
} else {
|
||||
sub_08098918(this);
|
||||
sub_08078930(super);
|
||||
RegisterCarryEntity(super);
|
||||
}
|
||||
} else {
|
||||
sub_080989C0(this);
|
||||
|
||||
@@ -111,7 +111,7 @@ void OctorokBossObject_Init(Entity* this) {
|
||||
((-(u32)this->parent->field_0x7a.HALF.HI << 0x18) >> 0x18) +
|
||||
(u32)gUnk_0812388C[(u32)this->type2 * 2 + 1],
|
||||
(u32)gUnk_0812388C[(u32)this->type2 * 2]);
|
||||
sub_0805EC9C(this, this->field_0x76.HWORD, this->field_0x74.HWORD, this->field_0x7a.HWORD);
|
||||
SetAffineInfo(this, this->field_0x76.HWORD, this->field_0x74.HWORD, this->field_0x7a.HWORD);
|
||||
InitializeAnimation(this, 7);
|
||||
break;
|
||||
case 7:
|
||||
@@ -239,8 +239,8 @@ NONMATCH("asm/non_matching/octorokBossObject/OctorokBossObject_Action1.inc",
|
||||
this->field_0x76.HWORD -= 0x20;
|
||||
this->field_0x74.HWORD -= 0x20;
|
||||
}
|
||||
sub_0805EC9C(this, (u32)this->field_0x76.HWORD, (u32)(u16)this->field_0x74.HWORD,
|
||||
(u32)(u16)this->field_0x7a.HWORD);
|
||||
SetAffineInfo(this, (u32)this->field_0x76.HWORD, (u32)(u16)this->field_0x74.HWORD,
|
||||
(u32)(u16)this->field_0x7a.HWORD);
|
||||
} else {
|
||||
*(int*)&this->field_0x78 -= 1;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ void PlayerClone_Action2(PlayerCloneEntity* this) {
|
||||
if (gPlayerEntity.iframes >= 1) {
|
||||
gPlayerState.chargeState.action = 1;
|
||||
} else {
|
||||
sub_080B1AA8(super);
|
||||
GetTileUnderEntity(super);
|
||||
sub_08084B1C(this);
|
||||
super->x.HALF.HI = gPlayerEntity.x.HALF.HI + this->unk78;
|
||||
super->y.HALF.HI = gPlayerEntity.y.HALF.HI + this->unk7a;
|
||||
|
||||
+4
-4
@@ -16,7 +16,7 @@ extern void (*const gUnk_0811F090[])(Entity*);
|
||||
extern void (*const gUnk_0811F0A8[])(Entity*);
|
||||
extern void (*const gUnk_0811F0C4[])(Entity*);
|
||||
|
||||
extern void sub_08078930(Entity*);
|
||||
extern void RegisterCarryEntity(Entity*);
|
||||
extern void sub_08016A6C(Entity*);
|
||||
|
||||
void Pot(Entity* this) {
|
||||
@@ -94,7 +94,7 @@ void sub_08082310(Entity* this) {
|
||||
DeleteThisEntity();
|
||||
break;
|
||||
default:
|
||||
if (sub_080B1AA8(this) == 13) {
|
||||
if (GetTileUnderEntity(this) == 13) {
|
||||
CreateFx(this, FX_FALL_DOWN, 0);
|
||||
} else if (tileType == 0x4005) {
|
||||
gPlayerState.field_0xab = 4;
|
||||
@@ -104,7 +104,7 @@ void sub_08082310(Entity* this) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
sub_08078930(this);
|
||||
RegisterCarryEntity(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -194,7 +194,7 @@ void sub_08082614(Entity* this) {
|
||||
break;
|
||||
default:
|
||||
SetTile(0x4000, COORD_TO_TILE(this), this->collisionLayer);
|
||||
sub_08078930(this);
|
||||
RegisterCarryEntity(this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ void PullableLever_HandleInit(PullableLeverEntity* this) {
|
||||
}
|
||||
|
||||
void PullableLever_HandleAction1(PullableLeverEntity* this) {
|
||||
sub_08078930(super);
|
||||
RegisterCarryEntity(super);
|
||||
if (this->pullLength != 0) {
|
||||
super->direction = super->type2 << 3;
|
||||
LinearMoveUpdate(super);
|
||||
|
||||
@@ -162,7 +162,7 @@ void sub_0808ACEC(PullableMushroomEntity* this) {
|
||||
default:
|
||||
super->field_0xf = 0;
|
||||
super->actionDelay = 0;
|
||||
sub_08078930(super);
|
||||
RegisterCarryEntity(super);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -171,7 +171,7 @@ void sub_0808ADA0(PullableMushroomEntity* this) {
|
||||
if ((sub_0808B1F0(this, super->child) < 8) || (super->child == NULL)) {
|
||||
super->subAction += 1;
|
||||
super->actionDelay = 2;
|
||||
super->flags |= 0x80;
|
||||
super->flags |= ENT_COLLIDE;
|
||||
super->animationState ^= 2;
|
||||
super->spritePriority.b0 = 4;
|
||||
} else {
|
||||
@@ -182,9 +182,9 @@ void sub_0808ADA0(PullableMushroomEntity* this) {
|
||||
|
||||
void sub_0808ADF0(PullableMushroomEntity* this) {
|
||||
if (super->animationState + 0xd == super->animIndex) {
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->subAction = 0;
|
||||
super->flags |= 0x80;
|
||||
super->flags |= ENT_COLLIDE;
|
||||
} else {
|
||||
GetNextFrame(super);
|
||||
}
|
||||
@@ -199,7 +199,7 @@ void sub_0808ADF0(PullableMushroomEntity* this) {
|
||||
SoundReq(SFX_12E);
|
||||
} else {
|
||||
GetNextFrame(super);
|
||||
if (((super->frame & 0x80) != 0) && (--super->actionDelay == 0xff)) {
|
||||
if (((super->frame & ANIM_DONE) != 0) && (--super->actionDelay == 0xff)) {
|
||||
InitializeAnimation(super, super->animationState + 0xd);
|
||||
}
|
||||
}
|
||||
@@ -245,7 +245,7 @@ void sub_0808AEB0(PullableMushroomEntity* this) {
|
||||
} else {
|
||||
super->actionDelay = 1;
|
||||
this->unk_7c = 1;
|
||||
super->animationState = gPlayerEntity.animationState >> 1 ^ 2;
|
||||
super->animationState = AnimationStateFlip90(gPlayerEntity.animationState >> 1);
|
||||
super->direction = (super->animationState << 3);
|
||||
super->flags &= 0x7f;
|
||||
super->spriteSettings.flipX = gPlayerEntity.spriteSettings.flipX;
|
||||
@@ -264,7 +264,7 @@ void sub_0808AEB0(PullableMushroomEntity* this) {
|
||||
void sub_0808AFD4(PullableMushroomEntity* this) {
|
||||
super->action = 1;
|
||||
super->subAction = 1;
|
||||
(super->child)->direction = super->direction ^ 0x10;
|
||||
(super->child)->direction = DirectionTurnAround(super->direction);
|
||||
SoundReq(SFX_130);
|
||||
}
|
||||
|
||||
@@ -278,9 +278,9 @@ void PullableMushroom_Action3(PullableMushroomEntity* this) {
|
||||
if ((((gPlayerState.field_0x1c & 0xf) != 1) || ((super->bitfield & 0x7f) != 0x13)) && (super->type == 1)) {
|
||||
(super->parent)->action = 1;
|
||||
(super->parent)->subAction = 1;
|
||||
super->direction = super->parent->direction ^ 0x10;
|
||||
super->parent->flags &= 0x7f;
|
||||
super->flags &= 0x7f;
|
||||
super->direction = DirectionTurnAround(super->parent->direction);
|
||||
super->parent->flags &= ~ENT_COLLIDE;
|
||||
super->flags &= ~ENT_COLLIDE;
|
||||
super->action = 1;
|
||||
SoundReq(SFX_130);
|
||||
}
|
||||
@@ -288,7 +288,7 @@ void PullableMushroom_Action3(PullableMushroomEntity* this) {
|
||||
|
||||
void sub_0808B05C(PullableMushroomEntity* this) {
|
||||
if (super->type == 0) {
|
||||
super->animationState = gPlayerEntity.animationState >> 1 ^ 2;
|
||||
super->animationState = AnimationStateFlip90(gPlayerEntity.animationState >> 1);
|
||||
super->direction = super->animationState << 3;
|
||||
super->spriteSettings.flipX = gPlayerEntity.spriteSettings.flipX;
|
||||
super->flags &= 0x7f;
|
||||
@@ -346,7 +346,7 @@ void sub_0808B168(PullableMushroomEntity* this, u32 param_2) {
|
||||
Entity* pEVar6;
|
||||
|
||||
if (param_2 != 0) {
|
||||
iVar2 = (super->animationState ^ 2) * 2;
|
||||
iVar2 = AnimationStateFlip90(super->animationState) * 2;
|
||||
pcVar5 = (gUnk_081211F4 + iVar2);
|
||||
pcVar3 = pcVar5 + 1;
|
||||
pEVar5 = super->parent;
|
||||
@@ -356,11 +356,11 @@ void sub_0808B168(PullableMushroomEntity* this, u32 param_2) {
|
||||
pEVar6 = &gPlayerEntity;
|
||||
pEVar5 = super->parent;
|
||||
pcVar5 = (gUnk_081211FC + super->animationState * 2);
|
||||
pcVar3 = (gUnk_081211F4 + 1 + (super->animationState ^ 2) * 2);
|
||||
pcVar3 = (gUnk_081211F4 + 1 + AnimationStateFlip90(super->animationState) * 2);
|
||||
} else {
|
||||
pEVar6 = super->parent;
|
||||
pEVar5 = &gPlayerEntity;
|
||||
pcVar5 = (gUnk_081211F4 + (super->animationState ^ 2) * 2);
|
||||
pcVar5 = (gUnk_081211F4 + AnimationStateFlip90(super->animationState) * 2);
|
||||
pcVar3 = (gUnk_081211FC + 1 + super->animationState * 2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ void PushableLever_Idle(PushableLeverEntity* this) {
|
||||
|
||||
void PushableLever_Pushing(PushableLeverEntity* this) {
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) != 0) {
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
if (super->type2 == 0) {
|
||||
SetFlag(this->pushedFlag);
|
||||
} else {
|
||||
|
||||
@@ -75,13 +75,13 @@ void PushableRock_Action2(PushableRockEntity* this) {
|
||||
super->speed = PushableRock_Speeds[super->frame & 0xf];
|
||||
LinearMoveUpdate(super);
|
||||
GetNextFrame(super);
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
super->action = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void PushableRock_Action3(PushableRockEntity* this) {
|
||||
if ((super->frame & 0x80) == 0) {
|
||||
if ((super->frame & ANIM_DONE) == 0) {
|
||||
GetNextFrame(super);
|
||||
} else {
|
||||
super->spritePriority.b0 = 7;
|
||||
|
||||
@@ -83,7 +83,7 @@ void PushableStatue_Action1(PushableStatueEntity* this) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
sub_08078930(super);
|
||||
RegisterCarryEntity(super);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ void SmallIceBlock_Action3(SmallIceBlockEntity* this) {
|
||||
} else {
|
||||
super->actionDelay++;
|
||||
}
|
||||
sub_0805EC9C(super, 0x100, gUnk_08123748[super->actionDelay >> 5], 0);
|
||||
SetAffineInfo(super, 0x100, gUnk_08123748[super->actionDelay >> 5], 0);
|
||||
if (super->type == 1) {
|
||||
CreateGroundItemWithFlags(super, ITEM_SMALL_KEY, 0, this->unk_86);
|
||||
SoundReq(SFX_SECRET);
|
||||
@@ -162,7 +162,7 @@ void SmallIceBlock_Action4(SmallIceBlockEntity* this) {
|
||||
if (super->actionDelay == 0x30) {
|
||||
SetTile(this->unk_6c, this->unk_70, super->collisionLayer);
|
||||
}
|
||||
sub_0805EC9C(super, 0x100, (0x3c - super->actionDelay) * 0x20 + 0x100, 0);
|
||||
SetAffineInfo(super, 0x100, (0x3c - super->actionDelay) * 0x20 + 0x100, 0);
|
||||
if ((super->actionDelay & 1) != 0) {
|
||||
obj = CreateObject(SPECIAL_FX, 0x11, 0x40);
|
||||
if (obj != NULL) {
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ void sub_0808A484(Entity* this) {
|
||||
void sub_0808A4D0(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
LinearMoveUpdate(this);
|
||||
if (this->frame & 0x80) {
|
||||
if (this->frame & ANIM_DONE) {
|
||||
DeleteEntity(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ void sub_080845B8(SpecialFxObject* this) {
|
||||
|
||||
void sub_080845DC(SpecialFxObject* this) {
|
||||
GetNextFrame(super);
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
@@ -202,7 +202,7 @@ void sub_080845F8(SpecialFxObject* this) {
|
||||
|
||||
void sub_08084630(SpecialFxObject* this) {
|
||||
GetNextFrame(super);
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
if ((super->type2 & 1) && (super->child != 0)) {
|
||||
((GenericEntity*)super->child)->field_0x6a.HWORD--;
|
||||
if (this->unk_68 != 0) {
|
||||
@@ -254,7 +254,7 @@ void sub_080846B0(SpecialFxObject* this) {
|
||||
void sub_0808471C(SpecialFxObject* this) {
|
||||
static const s8 gUnk_0811FB08[] = { -8, -8, 8, -8, -8, 8, 8, 8 };
|
||||
GetNextFrame(super);
|
||||
if (super->frame & 0x80) {
|
||||
if (super->frame & ANIM_DONE) {
|
||||
u32 i;
|
||||
for (i = 0; i < 4; i++) {
|
||||
Entity* fx = CreateFx(super, 0x24, 0);
|
||||
@@ -280,7 +280,7 @@ void sub_08084784(SpecialFxObject* this) {
|
||||
|
||||
void sub_08084798(SpecialFxObject* this) {
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & 0x80) || !super->child->next) {
|
||||
if ((super->frame & ANIM_DONE) || !super->child->next) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user