mirror of https://github.com/zeldaret/tmc.git
clean up linkAnimation.c
This commit is contained in:
parent
7c1c612c9b
commit
a030120a0c
|
@ -386,7 +386,7 @@ Entity* FindEntity(u32 kind, u32 id, u32 listIndex, u32 type, u32 type2);
|
|||
* @param entity Entity to set the priority of.
|
||||
* @param prio #Priority level.
|
||||
*/
|
||||
void SetDefaultPriority(Entity* entity, u32 prio);
|
||||
void SetEntityPriority(Entity* entity, u32 prio);
|
||||
|
||||
/**
|
||||
* Check if entity will be deleted next frame.
|
||||
|
|
|
@ -83,7 +83,7 @@ extern void sub_08030118(u32);
|
|||
extern void sub_0803C0AC(Entity*);
|
||||
extern void sub_08049CF4(Entity*);
|
||||
extern u32 sub_0804A024(Entity*, u32, u32);
|
||||
extern u32 sub_080542AC(u32);
|
||||
extern u32 IsMinishItem(u32);
|
||||
extern void DisableRandomDrops();
|
||||
extern void EnableRandomDrops(void);
|
||||
extern s32 sub_08056338(void);
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef LINKANIMATION_H
|
||||
#define LINKANIMATION_H
|
||||
|
||||
#ifndef NENT_DEPRECATED
|
||||
#error "linkAnimtion.h requires new entities"
|
||||
#endif
|
||||
#include "entity.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u8 storeDrawFlags;
|
||||
/*0x69*/ u8 storeFlags;
|
||||
/*0x6a*/ u8 storeIFrames;
|
||||
/*0x6b*/ u8 storeField7;
|
||||
/*0x6c*/ u8 storeKeepFacing;
|
||||
/*0x6d*/ u8 storeFieldA;
|
||||
/*0x6e*/ u8 storeField27;
|
||||
/*0x6f*/ u8 storeMobility;
|
||||
/*0x70*/ u32 storeStateFlags;
|
||||
/*0x74*/ u8 store8A;
|
||||
} LinkAnimationEntity;
|
||||
|
||||
#endif // LINKANIMATION_H
|
|
@ -263,7 +263,7 @@ typedef enum {
|
|||
typedef struct {
|
||||
/*0x0*/ u16 heldInput; /**< Input currently held @see PlayerInputState */
|
||||
/*0x2*/ u16 newInput; /**< New input this frame @see PlayerInputState */
|
||||
/*0x4*/ u32 field_0x94;
|
||||
/*0x4*/ u32 unused;
|
||||
/*0x8*/ u16 playerMacroWaiting;
|
||||
/*0xa*/ u16 playerMacroHeldKeys;
|
||||
/*0xc*/ PlayerMacroEntry* playerMacro;
|
||||
|
|
|
@ -211,7 +211,7 @@ void BusinessScrub_Action3(Entity* this) {
|
|||
if (iVar1 != NULL) {
|
||||
iVar1->spritePriority.b0 = 3;
|
||||
iVar1->z.HALF.HI -= 12;
|
||||
SetDefaultPriority(iVar1, PRIO_MESSAGE);
|
||||
SetEntityPriority(iVar1, PRIO_MESSAGE);
|
||||
}
|
||||
SetFlag(this->field_0x86.HWORD);
|
||||
sub_0802925C(this);
|
||||
|
|
|
@ -54,7 +54,7 @@ void BusinessScrubPrologue_OnCollision(BusinessScrubPrologueEntity* this) {
|
|||
|
||||
gPlayerState.field_0x27[0] = 0xff;
|
||||
EnqueueSFX(SFX_EM_DEKUSCRUB_HIT);
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ void sub_08045E14(BusinessScrubPrologueEntity* this) {
|
|||
if (ent != NULL) {
|
||||
ent->spritePriority.b0 = 3;
|
||||
ent->z.HALF.HI -= 0xc;
|
||||
SetDefaultPriority(ent, PRIO_MESSAGE);
|
||||
SetEntityPriority(ent, PRIO_MESSAGE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -73,7 +73,7 @@ void LikeLike_OnCollision(LikeLikeEntity* this) {
|
|||
|
||||
void LikeLike_OnDeath(LikeLikeEntity* this) {
|
||||
if (super->timer == 2 && this->stolenItem != 0xff) {
|
||||
SetDefaultPriority(super, PRIO_NO_BLOCK);
|
||||
SetEntityPriority(super, PRIO_NO_BLOCK);
|
||||
LikeLike_ReturnStolenItem(this->stolenItem);
|
||||
}
|
||||
GenericDeath(super);
|
||||
|
|
|
@ -195,7 +195,7 @@ void CreateDeathFx(GenericEntity* parent, u32 parentId, u32 fixedItem) {
|
|||
gSave.enemies_killed++;
|
||||
parent->base.gustJarState |= 2;
|
||||
parent->base.timer = 255;
|
||||
SetDefaultPriority(&(parent->base), 3);
|
||||
SetEntityPriority(&(parent->base), 3);
|
||||
deathFx2 = (DeathFxObject*)CreateObject(DEATH_FX, parent->base.id, 0);
|
||||
if (deathFx2 != NULL) {
|
||||
deathFx2->unk6c = tmp;
|
||||
|
@ -232,7 +232,7 @@ void CreateDeathFx(GenericEntity* parent, u32 parentId, u32 fixedItem) {
|
|||
} else {
|
||||
if (--parent->base.timer == 0) {
|
||||
parent->base.spriteSettings.draw = 0;
|
||||
SetDefaultPriority(&(parent->base), 0);
|
||||
SetEntityPriority(&(parent->base), 0);
|
||||
} else {
|
||||
if (parent->base.timer < 9) {
|
||||
if (parent->base.spriteSettings.draw) {
|
||||
|
|
|
@ -74,17 +74,17 @@ const u8 gUnk_081091F8[] = {
|
|||
0, 3, 0, 3, 3, 0, 3, 3, 3, 3,
|
||||
};
|
||||
|
||||
void SetDefaultPriorityForKind(Entity* e) {
|
||||
void SetEntityPriorityForKind(Entity* e) {
|
||||
u8 r3 = gRoomTransition.entity_update_type;
|
||||
const u8* array = gUnk_081091F8;
|
||||
|
||||
if (r3 != 2) {
|
||||
array = gUnk_081091EE;
|
||||
}
|
||||
SetDefaultPriority(e, array[e->kind]);
|
||||
SetEntityPriority(e, array[e->kind]);
|
||||
}
|
||||
|
||||
void SetDefaultPriority(Entity* ent, u32 prio) {
|
||||
void SetEntityPriority(Entity* ent, u32 prio) {
|
||||
ent->updatePriorityPrev = prio;
|
||||
ent->updatePriority = prio;
|
||||
}
|
||||
|
@ -508,7 +508,7 @@ void AppendEntityToList(Entity* entity, u32 listIndex) {
|
|||
} else {
|
||||
gManagerCount++;
|
||||
}
|
||||
SetDefaultPriorityForKind(entity);
|
||||
SetEntityPriorityForKind(entity);
|
||||
}
|
||||
|
||||
void PrependEntityToList(Entity* entity, u32 listIndex) {
|
||||
|
|
|
@ -200,7 +200,7 @@ u32 getItemMetaDataGetTextIndex(s32 itemIndex) {
|
|||
return ptr[2];
|
||||
}
|
||||
|
||||
u32 sub_080542AC(u32 param_1) {
|
||||
u32 IsMinishItem(u32 param_1) {
|
||||
const ItemMetaData* ptr1 = gItemMetaData;
|
||||
u8* ptr = (u8*)&((ptr1)[param_1]);
|
||||
return ptr[3] & 1;
|
||||
|
|
|
@ -27,7 +27,7 @@ void CloudOverlayManager_Main(CloudOverlayManager* this) {
|
|||
super->timer = 0;
|
||||
super->subtimer = 8;
|
||||
this->field_0x20 = gUnk_0810865C[0];
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (gArea.onEnter == NULL) {
|
||||
RegisterTransitionManager(this, sub_0805AEDC, sub_0805AF3C);
|
||||
} else {
|
||||
|
|
|
@ -37,7 +37,7 @@ void DelayedEntityLoadManager_Main(DelayedEntityLoadManager* this) {
|
|||
if (super->action == 0) {
|
||||
super->action++;
|
||||
this->unk_20 = gArea.filler[1];
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetEntityPriority((Entity*)this, 6);
|
||||
npcPtr = gNPCData;
|
||||
npcPtr += (super->type2 + this->unk_20);
|
||||
index1 = 0;
|
||||
|
|
|
@ -45,7 +45,7 @@ void sub_0805E140(EnterRoomTextboxManager* this) {
|
|||
this->unk_20 = gRoomControls.room;
|
||||
super->timer = 120;
|
||||
super->subtimer = 60;
|
||||
SetDefaultPriority((Entity*)this, PRIO_HIGHEST);
|
||||
SetEntityPriority((Entity*)this, PRIO_HIGHEST);
|
||||
sub_0805E1F8(gUnk_08108DE8[gArea.locationIndex], AreaIsDungeon());
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ static void EzloHintManager_Init(EzloHintManager* this) {
|
|||
this->ry = this->ry_raw << 3;
|
||||
this->x = this->rx + (this->x_raw << 4);
|
||||
this->y = this->ry + (this->y_raw << 4);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (this->flag2 == 0) {
|
||||
super->action = 2;
|
||||
} else {
|
||||
|
|
|
@ -55,7 +55,7 @@ void FightManager_Init(FightManager* this) {
|
|||
if (!this->fightStartFlag) {
|
||||
FightManager_LoadFight(this);
|
||||
}
|
||||
SetDefaultPriority((Entity*)this, PRIO_NO_BLOCK);
|
||||
SetEntityPriority((Entity*)this, PRIO_NO_BLOCK);
|
||||
} else {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ void FightManagerHelper_Main(FightManagerHelper* this) {
|
|||
|
||||
if (super->action == 0) {
|
||||
super->action = 1;
|
||||
SetDefaultPriority((Entity*)this, PRIO_NO_BLOCK);
|
||||
SetEntityPriority((Entity*)this, PRIO_NO_BLOCK);
|
||||
}
|
||||
// go through and check all monitored enemies.
|
||||
anyRemaining = FALSE;
|
||||
|
|
|
@ -57,7 +57,7 @@ void sub_0805B328(HoleManager*);
|
|||
void sub_0805B048(HoleManager* this) {
|
||||
struct_08108764* tmp;
|
||||
Entity* obj;
|
||||
SetDefaultPriority((Entity*)super, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority((Entity*)super, PRIO_PLAYER_EVENT);
|
||||
MemClear(&this->unk_20, 0x20);
|
||||
super->action = 1;
|
||||
this->unk_3f = gRoomControls.room;
|
||||
|
|
|
@ -66,7 +66,7 @@ void HyruleTownTilesetManager_Main(HyruleTownTilesetManager* this) {
|
|||
this->field_0x21 = 0xff;
|
||||
this->field_0x20 = 0xff;
|
||||
RegisterTransitionManager(this, sub_08059A2C, NULL);
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
sub_08059A58(this);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ void LightManager_Main(LightManager* this) {
|
|||
super->flags |= ENT_PERSIST;
|
||||
super->timer = 17;
|
||||
this->unk20 = 0;
|
||||
SetDefaultPriority((Entity*)this, 6);
|
||||
SetEntityPriority((Entity*)this, 6);
|
||||
sub_0801E120();
|
||||
sub_0801E154(super->timer);
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ void MinishVillageTilesetManager_Main(MinishVillageTilesetManager* this) {
|
|||
super->timer = 8;
|
||||
this->unk_20 = 0xFF;
|
||||
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
RegisterTransitionManager(this, sub_08057E30, 0);
|
||||
}
|
||||
if (sub_08057E40(this)) {
|
||||
|
|
|
@ -212,7 +212,7 @@ void MiscManager_Type3(MiscManager* this) {
|
|||
void MiscManager_Type4(MiscManager* this) {
|
||||
if (super->action == 0) {
|
||||
super->action = 1;
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
if (CheckLocalFlag(0x6c)) {
|
||||
if (CheckLocalFlag(0x4b)) {
|
||||
|
@ -430,7 +430,7 @@ void MiscManager_TypeE(MiscManager* this) {
|
|||
|
||||
#if defined(USA) || defined(DEMO_USA) || defined(DEMO_JP)
|
||||
void MiscManager_TypeF(MiscManager* this) {
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (gPlayerEntity.action == PLAYER_TALKEZLO) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ void PowBackgroundManager_Main(PowBackgroundManager* this) {
|
|||
if (super->action == 0) {
|
||||
super->action = 1;
|
||||
super->flags |= ENT_PERSIST;
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (gArea.onEnter == NULL) {
|
||||
RegisterTransitionManager(this, sub_0805AFFC, NULL);
|
||||
} else {
|
||||
|
|
|
@ -37,7 +37,7 @@ void CreateRepeatedSoundManager(Entity* entity, ScriptExecutionContext* context)
|
|||
manager->id = REPEATED_SOUND_MANAGER;
|
||||
manager->type = context->intVariable;
|
||||
AppendEntityToList((Entity*)manager, 6);
|
||||
SetDefaultPriority((Entity*)manager, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority((Entity*)manager, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ void SecretManager_Type0_Init(SecretManager* this) {
|
|||
if (super->timer == 0) {
|
||||
super->timer = 30;
|
||||
}
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
|
||||
void SecretManager_Type0_Action1(SecretManager* this) {
|
||||
|
@ -94,7 +94,7 @@ void SecretManager_Type1_Init(SecretManager* this) {
|
|||
super->timer = 30;
|
||||
}
|
||||
super->subtimer = super->timer;
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
|
||||
void SecretManager_Type1_Action1(SecretManager* this) {
|
||||
|
|
|
@ -35,7 +35,7 @@ void StaticBackgroundManager_Main(StaticBackgroundManager* this) {
|
|||
if (super->action == 0) {
|
||||
super->action = 1;
|
||||
super->flags |= ENT_PERSIST;
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (super->type != 0) {
|
||||
RegisterTransitionManager(this, sub_0805B4B4, NULL);
|
||||
}
|
||||
|
|
|
@ -370,7 +370,7 @@ void TempleOfDropletsManager_Type7(TempleOfDropletsManager* this) {
|
|||
}
|
||||
super->subAction = 1;
|
||||
super->flags |= ENT_PERSIST;
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
break;
|
||||
case 1:
|
||||
if (CheckLocalFlag(this->unk_3e))
|
||||
|
@ -402,7 +402,7 @@ void TempleOfDropletsManager_Type7(TempleOfDropletsManager* this) {
|
|||
void sub_0805AAC8(TempleOfDropletsManager*);
|
||||
|
||||
void sub_0805A89C(TempleOfDropletsManager* this) {
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
super->action = 1;
|
||||
super->flags |= ENT_PERSIST;
|
||||
super->timer = 8;
|
||||
|
|
|
@ -22,7 +22,7 @@ void Vaati3BackgroundManager_Main(Vaati3BackgroundManager* this) {
|
|||
if (super->action == 0) {
|
||||
super->action = 1;
|
||||
super->flags |= ENT_PERSIST;
|
||||
SetDefaultPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority((Entity*)this, PRIO_PLAYER_EVENT);
|
||||
if (gArea.onEnter == NULL) {
|
||||
RegisterTransitionManager(this, sub_0805D470, NULL);
|
||||
} else {
|
||||
|
|
|
@ -81,7 +81,7 @@ void sub_0806CF30(BigGoronEntity* this) {
|
|||
super->action = 1;
|
||||
super->subAction = 1;
|
||||
this->originalX = super->x.HALF.HI;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
sub_0806D0B0(super);
|
||||
sub_0807DD64(super);
|
||||
} else {
|
||||
|
@ -215,7 +215,7 @@ void sub_0806D1D0(BigGoronEntity* this) {
|
|||
super->spriteSettings.draw = 3;
|
||||
super->frameIndex = 0;
|
||||
super->timer = 30;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
}
|
||||
|
||||
switch (super->subAction) {
|
||||
|
@ -256,7 +256,7 @@ void sub_0806D274(BigGoronEntity* this) {
|
|||
super->spritePriority.b0 = 7;
|
||||
super->frameIndex = 2;
|
||||
super->timer = 8;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
npc = CreateNPC(BIG_GORON, 3, 0);
|
||||
if (npc != NULL) {
|
||||
npc->child = super;
|
||||
|
@ -303,7 +303,7 @@ void sub_0806D348(BigGoronEntity* this) {
|
|||
super->spritePriority.b0 = 6;
|
||||
super->spriteSettings.draw = 0;
|
||||
super->frameIndex = 5;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
}
|
||||
if (super->child->frameIndex == 4) {
|
||||
super->spriteSettings.draw = 3;
|
||||
|
@ -321,7 +321,7 @@ void sub_0806D3C0(BigGoronEntity* this) {
|
|||
}
|
||||
super->action = 1;
|
||||
super->hitbox = (Hitbox*)&gHitbox_3;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
sub_0807DD64(super);
|
||||
} else {
|
||||
super->x.HALF.HI = super->parent->x.HALF.HI;
|
||||
|
@ -344,7 +344,7 @@ void sub_0806D41C(BigGoronEntity* this) {
|
|||
sub_0806D4C0(this, 1);
|
||||
sub_0806D4C0(this, 2);
|
||||
sub_0806D4C0(this, 3);
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
} else {
|
||||
ExecuteScriptForEntity(super, NULL);
|
||||
HandleEntity0x82Actions(super);
|
||||
|
@ -368,7 +368,7 @@ void sub_0806D4C0(BigGoronEntity* this, u32 type) {
|
|||
npc->parent = super;
|
||||
CopyPosition(super, npc);
|
||||
SortEntityAbove(super, npc);
|
||||
SetDefaultPriority(npc, PRIO_MESSAGE);
|
||||
SetEntityPriority(npc, PRIO_MESSAGE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ void Carpenter(CarpenterEntity* this) {
|
|||
break;
|
||||
super->action = 1;
|
||||
this->animIndex = 0;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
sub_0807DD64(super);
|
||||
|
||||
case 1:
|
||||
|
@ -115,7 +115,7 @@ void Carpenter_Fusion(Entity* this) {
|
|||
if (LoadExtraSpriteData(this, &gUnk_08110CA8[this->type * 4])) {
|
||||
this->action++;
|
||||
this->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
InitializeAnimation(this, (u32)this->type * 8 + 2);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -221,7 +221,7 @@ void sub_0806799C(CatEntity* this) {
|
|||
UpdateAnimationSingleFrame(super);
|
||||
if ((gMessage.doTextBox & 0x7f) == 0) {
|
||||
sub_08067B08(this);
|
||||
SetDefaultPriority(super, PRIO_PLAYER);
|
||||
SetEntityPriority(super, PRIO_PLAYER);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -409,7 +409,7 @@ void sub_08067C44(CatEntity* this) {
|
|||
} else {
|
||||
super->action = 4;
|
||||
sub_08067790(super);
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
}
|
||||
super->interactType = INTERACTION_NONE;
|
||||
SoundReq(SFX_VO_CAT);
|
||||
|
|
|
@ -30,7 +30,7 @@ void Cucco_Init(CuccoEntity* this) {
|
|||
super->action++;
|
||||
this->fusionOffer = GetFusionToOffer(super);
|
||||
AddInteractableAsMinishFuser(super, this->fusionOffer);
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
super->subAction = 0;
|
||||
sub_0806E4EC(this);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ void CuccoChick_Init(CuccoChickEntity* this) {
|
|||
super->action++;
|
||||
this->fusionOffer = GetFusionToOffer(super);
|
||||
AddInteractableAsMinishFuser(super, this->fusionOffer);
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
super->subAction = 0;
|
||||
sub_0806E764(this);
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ void Dampe(Entity* this) {
|
|||
case 0:
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
InitScriptForNPC(this);
|
||||
return;
|
||||
case 1:
|
||||
|
|
|
@ -226,7 +226,7 @@ void sub_08069B44(DogEntity* this) {
|
|||
super->animationState = 2;
|
||||
this->unk_6a = 0xff;
|
||||
this->unk_74 = GetFusionToOffer(super);
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
InitAnimationForceUpdate(super, 10);
|
||||
if ((super->flags & ENT_SCRIPTED) != 0) {
|
||||
InitScriptForNPC(super);
|
||||
|
@ -525,7 +525,7 @@ void Dog_Fusion(DogEntity* this) {
|
|||
if (sub_08069EF0(this)) {
|
||||
super->action++;
|
||||
super->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
InitializeAnimation(super, 0x23);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -15,7 +15,7 @@ void DrLeft(Entity* this) {
|
|||
if (this->type == 0) {
|
||||
if (this->action == 0) {
|
||||
this->action++;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
InitScriptForNPC(this);
|
||||
}
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
void Emma(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action++;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
InitScriptForNPC(this);
|
||||
} else {
|
||||
ExecuteScriptAndHandleAnimation(this, NULL);
|
||||
|
|
|
@ -101,7 +101,7 @@ void sub_08065AA4(EponaEntity* this) {
|
|||
InitializeNPCFusion(super);
|
||||
} else {
|
||||
super->action = 3;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
sub_08065A50(this);
|
||||
}
|
||||
InitAnimationForceUpdate(super, GetAnimationStateForDirection4(GetFacingDirection(super, &gPlayerEntity)));
|
||||
|
|
|
@ -14,7 +14,7 @@ const u8 gUnk_08114144[];
|
|||
void Ezlo(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action++;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
InitScriptForNPC(this);
|
||||
}
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
|
|
|
@ -38,7 +38,7 @@ void Farmers(Entity* this) {
|
|||
}
|
||||
|
||||
void sub_0806BC58(Entity* this) {
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
}
|
||||
|
||||
void Farmers_Head(Entity* this) {
|
||||
|
|
|
@ -35,7 +35,7 @@ void Festari(FestariEntity* this) {
|
|||
void sub_0805FE10(FestariEntity* this) {
|
||||
super->action = 1;
|
||||
super->spriteSettings.draw = TRUE;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
this->fusionOffer = GetFusionToOffer(super);
|
||||
AddInteractableWhenBigFuser(super, this->fusionOffer);
|
||||
InitScriptForNPC(super);
|
||||
|
@ -127,7 +127,7 @@ void Festari_Fusion(FestariEntity* this) {
|
|||
if (super->action == 0) {
|
||||
super->action++;
|
||||
super->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
InitAnimationForceUpdate(super, 8);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
|
|
|
@ -526,7 +526,7 @@ void ForestMinish(ForestMinishEntity* this) {
|
|||
super->spriteSettings.draw = TRUE;
|
||||
this->animIndex = super->animationState = super->timer << 1;
|
||||
super->timer = 0;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
StartCutscene(super, (u16*)gUnk_08109D18[super->type2]);
|
||||
InitScriptForNPC(super);
|
||||
}
|
||||
|
@ -755,7 +755,7 @@ void ForestMinish_Fusion(Entity* this) {
|
|||
if (LoadExtraSpriteData(this, gUnk_0810A348)) {
|
||||
this->action++;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
InitializeAnimation(this, 6);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -18,7 +18,7 @@ void Gentari(GentariEntity* this) {
|
|||
case 0:
|
||||
super->action = 1;
|
||||
super->spriteSettings.draw = TRUE;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
this->fusionOffer = GetFusionToOffer(super);
|
||||
AddInteractableWhenBigFuser(super, this->fusionOffer);
|
||||
InitScriptForNPC(super);
|
||||
|
@ -45,7 +45,7 @@ void Gentari_Fusion(Entity* this) {
|
|||
if (this->action == 0) {
|
||||
this->action++;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
InitAnimationForceUpdate(this, 10);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
|
|
|
@ -136,7 +136,7 @@ void sub_08065D18(GhostBrothersEntity* this) {
|
|||
super->spriteSettings.draw = 1;
|
||||
super->spriteRendering.alphaBlend = 1;
|
||||
this->unk_6c = gUnk_08110188;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
InitAnimationForceUpdate(super, 2);
|
||||
gScreen.controls.layerFXControl = 0x3f40;
|
||||
gScreen.controls.alphaBlend = 0x1000;
|
||||
|
|
|
@ -41,7 +41,7 @@ void sub_0806CAF4(GregalEntity* this) {
|
|||
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
npc = CreateNPC(GREGAL, 1, 0);
|
||||
if (npc != NULL) {
|
||||
npc->parent = super;
|
||||
|
@ -68,7 +68,7 @@ void sub_0806CB80(GregalEntity* this) {
|
|||
super->action++;
|
||||
super->animationState = 2;
|
||||
super->frameIndex = 0;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
}
|
||||
if (super->parent != NULL) {
|
||||
super->frameIndex = (super->parent->frame & 3) + 0x21;
|
||||
|
@ -79,7 +79,7 @@ void sub_0806CBB4(GregalEntity* this) {
|
|||
if (super->action == 0) {
|
||||
super->action++;
|
||||
super->animationState = 2;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
InitializeAnimation(super, 0x11);
|
||||
}
|
||||
GetNextFrame(super);
|
||||
|
@ -96,7 +96,7 @@ void sub_0806CC08(GregalEntity* this) {
|
|||
case 0:
|
||||
super->action = 1;
|
||||
super->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
sub_0807DD64(super);
|
||||
case 1:
|
||||
if (super->interactType == INTERACTION_FUSE) {
|
||||
|
@ -177,7 +177,7 @@ void Gregal_Fusion(Entity* this) {
|
|||
if (this->action == 0) {
|
||||
this->action++;
|
||||
this->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
InitAnimationForceUpdate(this, 6);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
|
|
|
@ -29,7 +29,7 @@ void HurdyGurdyMan(HurdyGurdyManEntity* this) {
|
|||
if (LoadExtraSpriteData(super, gUnk_081144F0)) {
|
||||
super->action = 1;
|
||||
this->unk_69 = 0;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
InitScriptForNPC(super);
|
||||
}
|
||||
break;
|
||||
|
@ -123,7 +123,7 @@ void HurdyGurdyMan_Fusion(Entity* this) {
|
|||
if (LoadExtraSpriteData(this, gUnk_081144F0)) {
|
||||
this->action++;
|
||||
this->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
InitializeAnimation(this, 10);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -16,7 +16,7 @@ void KingGustaf(Entity* this) {
|
|||
this->action++;
|
||||
this->spriteRendering.alphaBlend = 1;
|
||||
this->collisionLayer = 2;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
InitScriptForNPC(this);
|
||||
gScreen.controls.layerFXControl = 0x3f40;
|
||||
gScreen.controls.alphaBlend = 0x1000;
|
||||
|
|
|
@ -22,7 +22,7 @@ void Librari(LibrariEntity* this) {
|
|||
super->animationState = super->timer;
|
||||
this->fusionOffer = GetFusionToOffer(super);
|
||||
AddInteractableWhenBigFuser(super, this->fusionOffer);
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
InitScriptForNPC(super);
|
||||
break;
|
||||
case 1:
|
||||
|
|
|
@ -62,7 +62,7 @@ bool32 sub_0806C454(Entity* this) {
|
|||
if (!LoadExtraSpriteData(this, gUnk_08113754)) {
|
||||
return FALSE;
|
||||
} else {
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
void Marcy(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
this->action++;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
sub_0807DD64(this);
|
||||
}
|
||||
ExecuteScriptAndHandleAnimation(this, NULL);
|
||||
|
|
|
@ -24,7 +24,7 @@ void MayorHagen(MayorHagenEntity* this) {
|
|||
super->action = 1;
|
||||
this->animIndex = 0;
|
||||
this->fusionOffer = GetFusionToOffer(super);
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
InitScriptForNPC(super);
|
||||
break;
|
||||
case 1:
|
||||
|
|
|
@ -78,7 +78,7 @@ void sub_08068780(Entity* this) {
|
|||
this->action = 1;
|
||||
this->spriteSettings.draw = TRUE;
|
||||
this->animationState = this->type;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
InitScriptForNPC(this);
|
||||
break;
|
||||
case 1:
|
||||
|
|
|
@ -33,7 +33,7 @@ void MinishEzlo(Entity* this) {
|
|||
}
|
||||
this->action++;
|
||||
this->animationState = this->timer * 2;
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
InitScriptForNPC(this);
|
||||
}
|
||||
ExecuteScriptForEntity(this, NULL);
|
||||
|
|
|
@ -126,7 +126,7 @@ void sub_08067EF0(MountainMinishEntity* this) {
|
|||
super->spriteSettings.draw = 1;
|
||||
super->animationState = super->type;
|
||||
this->animIndex = 0;
|
||||
SetDefaultPriority(super, 2);
|
||||
SetEntityPriority(super, 2);
|
||||
InitScriptForNPC(super);
|
||||
InitializeAnimation(super, gUnk_08111304[super->type2]);
|
||||
break;
|
||||
|
|
|
@ -36,7 +36,7 @@ void Mutoh(MutohEntity* this) {
|
|||
if (LoadExtraSpriteData(super, gUnk_08110C00)) {
|
||||
super->action = 1;
|
||||
super->spriteSettings.draw = TRUE;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
InitScriptForNPC(super);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -28,7 +28,7 @@ void Pita(PitaEntity* this) {
|
|||
};
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
SortEntityAbove(super, super);
|
||||
super->hitbox = (Hitbox*)&gUnk_0810C428;
|
||||
sub_0807DD64(super);
|
||||
|
|
|
@ -234,7 +234,7 @@ void sub_080604DC(Entity* this) {
|
|||
ent = CreateFx(this, FX_DASH, 0x40);
|
||||
if (ent != NULL) {
|
||||
ent->y.HALF.HI++;
|
||||
SetDefaultPriority(ent, 3);
|
||||
SetEntityPriority(ent, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ void sub_0806a370(RemEntity* this) {
|
|||
void sub_0806A3D8(RemEntity* this) {
|
||||
super->action = 1;
|
||||
super->timer = 180;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
sub_0806A8C8(super);
|
||||
this->context = StartCutscene(super, &script_Rem);
|
||||
ExecuteScriptAndHandleAnimation(super, NULL);
|
||||
|
@ -297,7 +297,7 @@ void sub_0806A830(RemEntity* this) {
|
|||
if (super->action == 0) {
|
||||
super->action = 1;
|
||||
InitializeAnimation(super, 0x14);
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
}
|
||||
if ((gActiveScriptInfo.syncFlags & 0x200) != 0) {
|
||||
DeleteThisEntity();
|
||||
|
@ -316,7 +316,7 @@ void sub_0806A890(RemEntity* this) {
|
|||
if (super->action == 0) {
|
||||
super->action = 1;
|
||||
InitializeAnimation(super, 0x15);
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
}
|
||||
GetNextFrame(super);
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
|
|
|
@ -59,7 +59,7 @@ void sub_08065080(StockwellEntity* this) {
|
|||
|
||||
super->action = 1;
|
||||
super->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
InitializeAnimation(super, 4);
|
||||
AddInteractableWhenBigObject(super);
|
||||
#ifndef EU
|
||||
|
|
|
@ -48,7 +48,7 @@ void sub_0806A1F8(SyrupEntity* this) {
|
|||
|
||||
if (LoadExtraSpriteData(super, paVar2)) {
|
||||
super->action = 1;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
InitScriptForNPC(super);
|
||||
InitializeAnimation(super, 0);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ void Teachers(TeachersEntity* this) {
|
|||
super->spriteSettings.draw = TRUE;
|
||||
super->animationState = super->timer;
|
||||
this->animIndex = 0;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
InitScriptForNPC(super);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -42,7 +42,7 @@ void VaatiAction0(VaatiEntity* this) {
|
|||
super->spriteSettings.draw = 1;
|
||||
this->unk_68 = 0;
|
||||
this->unk_69 = 0;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
sub_0807DD64(super);
|
||||
VaatiAction1(this);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ void Wheaton(Entity* this) {
|
|||
if (this->action == 0) {
|
||||
this->action++;
|
||||
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
SortEntityAbove(this, this);
|
||||
this->hitbox = (Hitbox*)&gUnk_0810C3C0;
|
||||
this->spriteOffsetY = 0xfe;
|
||||
|
|
|
@ -31,7 +31,7 @@ void sub_08066CCC(Entity* this) {
|
|||
this->action = 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
PrependEntityToList(this, 7);
|
||||
SetDefaultPriority(this, PRIO_MESSAGE);
|
||||
SetEntityPriority(this, PRIO_MESSAGE);
|
||||
InitScriptForNPC(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ void ZeldaFollower(ZeldaFollowerEntity* this) {
|
|||
super->animationState = 4;
|
||||
this->unk_68 = 0;
|
||||
this->unk_69 = 0;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
InitAnimationForceUpdate(super, 0);
|
||||
sub_0806854C(this, NULL);
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ void Beanstalk_Init(BeanstalkEntity* this) {
|
|||
|
||||
super->spriteRendering.b3 = 2;
|
||||
super->spriteOrientation.flipY = 1;
|
||||
SetDefaultPriority(super, 4);
|
||||
SetEntityPriority(super, 4);
|
||||
if (super->type == 7) {
|
||||
#ifndef EU
|
||||
if ((super->flags & ENT_DID_INIT) == 0) {
|
||||
|
|
|
@ -208,7 +208,7 @@ void BigBarrel_Type2(BigBarrelEntity* this) {
|
|||
super->spriteSettings.draw = 1;
|
||||
super->frameIndex = super->type2 * 4 + 6;
|
||||
super->collisionLayer = 2;
|
||||
SetDefaultPriority(super, 3);
|
||||
SetEntityPriority(super, 3);
|
||||
super->type2 = super->type2 == 0 ? 0x15 : 0x16;
|
||||
UpdateSpriteForCollisionLayer(super);
|
||||
break;
|
||||
|
@ -346,7 +346,7 @@ void sub_08089094(BigBarrelEntity* this) {
|
|||
void sub_080890EC(BigBarrelEntity* this, const s16* offsets, s32 yOffset) {
|
||||
Entity* pEVar1 = CreateObject(BIG_BARREL, 3, 0);
|
||||
if (pEVar1) {
|
||||
SetDefaultPriority(pEVar1, 3);
|
||||
SetEntityPriority(pEVar1, 3);
|
||||
pEVar1->x.HALF.HI = super->x.HALF.HI;
|
||||
pEVar1->y.HALF.HI = super->y.HALF.HI + yOffset;
|
||||
pEVar1->parent = super;
|
||||
|
|
|
@ -49,7 +49,7 @@ void BigVortex_Init(BigVortexEntity* this) {
|
|||
super->spriteSettings.draw = TRUE;
|
||||
sub_08098E88(super);
|
||||
}
|
||||
SetDefaultPriority(super, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority(super, PRIO_PLAYER_EVENT);
|
||||
InitAnimationForceUpdate(super, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ void Bird_Type8(BirdEntity* this) {
|
|||
super->x.HALF.HI = gRoomControls.scroll_x;
|
||||
super->y.HALF.HI = gPlayerEntity.y.HALF.HI;
|
||||
super->child = NULL;
|
||||
SetDefaultPriority(super, 6);
|
||||
SetEntityPriority(super, 6);
|
||||
InitAnimationForceUpdate(super, 0);
|
||||
SoundReq(0x123);
|
||||
break;
|
||||
|
@ -307,7 +307,7 @@ void Bird_Type9(BirdEntity* this) {
|
|||
super->spritePriority.b0 = 0;
|
||||
super->spriteRendering.b3 = 0;
|
||||
super->spriteOrientation.flipY = 1;
|
||||
SetDefaultPriority(super, 6);
|
||||
SetEntityPriority(super, 6);
|
||||
super->x.HALF.HI = gRoomControls.scroll_x;
|
||||
super->y.HALF.HI = gPlayerEntity.y.HALF.HI;
|
||||
SoundReq(SFX_123);
|
||||
|
@ -364,7 +364,7 @@ void Bird_Type10(BirdEntity* this) {
|
|||
super->spritePriority.b0 = 0;
|
||||
super->spriteRendering.b3 = 0;
|
||||
super->spriteOrientation.flipY = 1;
|
||||
SetDefaultPriority(super, 6);
|
||||
SetEntityPriority(super, 6);
|
||||
InitAnimationForceUpdate(super, 0xe0);
|
||||
case 1:
|
||||
UpdateAnimationSingleFrame(super);
|
||||
|
@ -400,7 +400,7 @@ void sub_0809D738(void) {
|
|||
pEVar1 = CreateObject(BIRD, 9, 0);
|
||||
if (pEVar1 != NULL) {
|
||||
gRoomControls.camera_target = NULL;
|
||||
SetDefaultPriority(pEVar1, 6);
|
||||
SetEntityPriority(pEVar1, 6);
|
||||
SetPlayerEventPriority();
|
||||
pEVar2 = CreateObject(BIRD, 10, 0);
|
||||
if (pEVar2 != NULL) {
|
||||
|
|
|
@ -96,7 +96,7 @@ void CameraTarget_Init(Entity* this) {
|
|||
}
|
||||
this->action = 1;
|
||||
this->flags |= ENT_PERSIST;
|
||||
SetDefaultPriority(this, 6);
|
||||
SetEntityPriority(this, 6);
|
||||
}
|
||||
|
||||
void CameraTarget_Action1(Entity* this) {
|
||||
|
|
|
@ -100,7 +100,7 @@ void CrenelBeanSprout_Init(CrenelBeanSproutEntity* this) {
|
|||
break;
|
||||
case 1:
|
||||
super->spriteRendering.b0 = 3;
|
||||
SetDefaultPriority(super, 6);
|
||||
SetEntityPriority(super, 6);
|
||||
break;
|
||||
case 2:
|
||||
if (CheckLocalFlag((u32)super->type2) == 0) {
|
||||
|
|
|
@ -212,7 +212,7 @@ void CutsceneMiscObject_Type2(CutsceneMiscObjectEntity* this) {
|
|||
DeleteThisEntity();
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
super->spriteRendering.b3 = gUnk_08114F30[p->spriteRendering.b3];
|
||||
InitAnimationForceUpdate(super, 1);
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ void CutsceneMiscObject_Type3(CutsceneMiscObjectEntity* this) {
|
|||
} else {
|
||||
super->action++;
|
||||
super->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(super, PRIO_NO_BLOCK);
|
||||
SetEntityPriority(super, PRIO_NO_BLOCK);
|
||||
switch (super->type2) {
|
||||
case 0x40:
|
||||
case 0x41:
|
||||
|
@ -290,7 +290,7 @@ void CutsceneMiscObject_Type4(CutsceneMiscObjectEntity* this) {
|
|||
} else {
|
||||
super->action++;
|
||||
super->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(super, PRIO_NO_BLOCK);
|
||||
SetEntityPriority(super, PRIO_NO_BLOCK);
|
||||
InitAnimationForceUpdate(super, 0);
|
||||
}
|
||||
UpdateAnimationSingleFrame(super);
|
||||
|
@ -330,7 +330,7 @@ void CutsceneMiscObject_Type5(CutsceneMiscObjectEntity* this) {
|
|||
super->action++;
|
||||
super->z.WORD = Q_16_16(-160.0);
|
||||
super->zVelocity = 0;
|
||||
SetDefaultPriority(super, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority(super, PRIO_PLAYER_EVENT);
|
||||
InitializeAnimation(super, 0);
|
||||
if (GetTileUnderEntity(super) == 13) {
|
||||
super->action = 3;
|
||||
|
@ -472,7 +472,7 @@ void CutsceneMiscObject_Type7(CutsceneMiscObjectEntity* this) {
|
|||
void CutsceneMiscObject_Type8(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action = 1;
|
||||
SetDefaultPriority(super, PRIO_NO_BLOCK);
|
||||
SetEntityPriority(super, PRIO_NO_BLOCK);
|
||||
SortEntityBelow(super, super);
|
||||
sub_0807DD64(super);
|
||||
InitAnimationForceUpdate(super, 2);
|
||||
|
@ -492,7 +492,7 @@ void sub_08095164(CutsceneMiscObjectEntity* this) {
|
|||
void CutsceneMiscObject_Type9(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action = 1;
|
||||
SetDefaultPriority(super, PRIO_NO_BLOCK);
|
||||
SetEntityPriority(super, PRIO_NO_BLOCK);
|
||||
SortEntityBelow(super, super);
|
||||
sub_0807DD64(super);
|
||||
InitAnimationForceUpdate(super, 0);
|
||||
|
@ -547,7 +547,7 @@ void CutsceneMiscObject_Type11(CutsceneMiscObjectEntity* this) {
|
|||
if (super->action == 0) {
|
||||
super->action++;
|
||||
super->subAction = 0;
|
||||
SetDefaultPriority(super, PRIO_NO_BLOCK);
|
||||
SetEntityPriority(super, PRIO_NO_BLOCK);
|
||||
InitAnimationForceUpdate(super, 0);
|
||||
}
|
||||
if (super->subAction != 0) {
|
||||
|
@ -607,7 +607,7 @@ void CutsceneMiscObject_Type12(CutsceneMiscObjectEntity* this) {
|
|||
if (super->action == 0) {
|
||||
super->action++;
|
||||
super->z.HALF.HI = -16;
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
super->spriteRendering.b3 = gUnk_08114F30[super->spriteRendering.b3];
|
||||
SortEntityAbove(super, super);
|
||||
sub_0807DD64(super);
|
||||
|
@ -844,7 +844,7 @@ void CutsceneMiscObject_Type19(CutsceneMiscObjectEntity* this) {
|
|||
void CutsceneMiscObject_Type20(CutsceneMiscObjectEntity* this) {
|
||||
if (super->action == 0) {
|
||||
super->action++;
|
||||
SetDefaultPriority(super, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority(super, PRIO_PLAYER_EVENT);
|
||||
sub_0807DD64(super);
|
||||
InitializeAnimation(super, 0);
|
||||
}
|
||||
|
@ -879,7 +879,7 @@ void CutsceneMiscObject_Type22(CutsceneMiscObjectEntity* this) {
|
|||
if (super->action == 0) {
|
||||
super->action++;
|
||||
super->spriteSettings.draw = 0;
|
||||
SetDefaultPriority(super, PRIO_NO_BLOCK);
|
||||
SetEntityPriority(super, PRIO_NO_BLOCK);
|
||||
sub_0807DD64(super);
|
||||
}
|
||||
ExecuteScriptForEntity(super, 0);
|
||||
|
@ -1035,7 +1035,7 @@ void CutsceneMiscObject_Type28(CutsceneMiscObjectEntity* this) {
|
|||
if (super->action == 0) {
|
||||
super->action++;
|
||||
super->spriteSettings.draw = 0;
|
||||
SetDefaultPriority(super, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority(super, PRIO_PLAYER_EVENT);
|
||||
sub_0807DD64(super);
|
||||
}
|
||||
ExecuteScriptForEntity(super, 0);
|
||||
|
|
|
@ -81,7 +81,7 @@ void DeathFx_Action0(DeathFxObject* this) {
|
|||
super->action = 1;
|
||||
EnqueueSFX(SFX_FF);
|
||||
}
|
||||
SetDefaultPriority(super, 3);
|
||||
SetEntityPriority(super, 3);
|
||||
}
|
||||
|
||||
void DeathFx_Action1(DeathFxObject* this) {
|
||||
|
|
|
@ -110,7 +110,7 @@ void Fairy_Init(FairyEntity* this) {
|
|||
super->gustJarFlags = 1;
|
||||
this->unk_74 = super->x.HALF.HI;
|
||||
this->unk_76 = super->y.HALF.HI;
|
||||
SetDefaultPriority(super, 6);
|
||||
SetEntityPriority(super, 6);
|
||||
EnqueueSFX(SFX_136);
|
||||
|
||||
switch (super->type2) {
|
||||
|
|
|
@ -102,7 +102,7 @@ void FigurineDevice_Init(FigurineDeviceEntity* this) {
|
|||
|
||||
case 2:
|
||||
this->unk_7a = 0;
|
||||
SetDefaultPriority(super, 7);
|
||||
SetEntityPriority(super, 7);
|
||||
InitializeAnimation(super, 1);
|
||||
break;
|
||||
case 3:
|
||||
|
@ -113,7 +113,7 @@ void FigurineDevice_Init(FigurineDeviceEntity* this) {
|
|||
this->unk_7b = 0;
|
||||
this->unk_80 = 0;
|
||||
sub_0808804C(this);
|
||||
SetDefaultPriority(super, 6);
|
||||
SetEntityPriority(super, 6);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ void FourElements_Action3(FourElementsEntity* this) {
|
|||
if (super->timer != 0) {
|
||||
sub_080A0424(this);
|
||||
if (--super->timer == 0) {
|
||||
SetDefaultPriority(&gPlayerEntity, 0);
|
||||
SetEntityPriority(&gPlayerEntity, 0);
|
||||
}
|
||||
} else {
|
||||
RequestPriorityDuration(NULL, 60);
|
||||
|
|
|
@ -64,7 +64,7 @@ void FrozenOctorok_Init(FrozenOctorokEntity* this) {
|
|||
super->action = 1;
|
||||
switch (super->type) {
|
||||
case 0:
|
||||
SetDefaultPriority(super, 6);
|
||||
SetEntityPriority(super, 6);
|
||||
this->unk_7e = 0;
|
||||
case 6:
|
||||
super->timer = 1;
|
||||
|
|
|
@ -497,7 +497,7 @@ void GreatFairy_InitializeAnimation(GreatFairyEntity* this) {
|
|||
super->type2 = super->type % temp;
|
||||
super->collisionLayer = 2;
|
||||
InitializeAnimation(super, super->type2);
|
||||
SetDefaultPriority(super, PRIO_MESSAGE);
|
||||
SetEntityPriority(super, PRIO_MESSAGE);
|
||||
}
|
||||
|
||||
Entity* GreatFairy_CreateForm(GreatFairyEntity* this, u32 curForm, u32 parameter) {
|
||||
|
@ -544,7 +544,7 @@ void sub_08087424(GreatFairyEntity* this, ScriptExecutionContext* context) {
|
|||
if (ent != NULL) {
|
||||
ent->parent = &gPlayerEntity;
|
||||
CopyPosition(&gPlayerEntity, ent);
|
||||
SetDefaultPriority(ent, PRIO_MESSAGE);
|
||||
SetEntityPriority(ent, PRIO_MESSAGE);
|
||||
}
|
||||
|
||||
switch (context->intVariable) {
|
||||
|
|
|
@ -52,7 +52,7 @@ void GuruguruBar_Init(GuruguruBarEntity* this) {
|
|||
bVar1 = this->unk7e;
|
||||
this->unk76 = bVar1 << 8;
|
||||
super->animationState = bVar1 << 6;
|
||||
SetDefaultPriority(super, 0);
|
||||
SetEntityPriority(super, 0);
|
||||
if (super->type != 0) {
|
||||
super->child = (Entity*)GetCurrentRoomProperty(super->type);
|
||||
UpdateRailMovement(super, (u16**)&super->child, &this->unk74);
|
||||
|
|
|
@ -62,7 +62,7 @@ void HouseDoorExterior_Type0(HouseDoorExteriorEntity* this) {
|
|||
super->action = 1;
|
||||
*((u32*)(&this->unk_68)) = 0;
|
||||
this->unk_6c = super->timer;
|
||||
SetDefaultPriority(super, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority(super, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
|
||||
prop = GetCurrentRoomProperty(this->unk_6c);
|
||||
|
|
|
@ -66,7 +66,7 @@ void ItemForSale_Init(ItemForSaleEntity* this) {
|
|||
super->spritePriority.b1 = 0;
|
||||
super->carryFlags = 0;
|
||||
#ifdef EU
|
||||
SetDefaultPriority(super, 6);
|
||||
SetEntityPriority(super, 6);
|
||||
#endif
|
||||
super->child = super;
|
||||
ItemForSale_MakeInteractable(this);
|
||||
|
|
|
@ -143,7 +143,7 @@ void ItemOnGround_Init(ItemOnGroundEntity* this) {
|
|||
this->unk_6c = 0;
|
||||
this->unk_68 = 0;
|
||||
super->timer = 0;
|
||||
SetDefaultPriority(super, PRIO_NO_BLOCK);
|
||||
SetEntityPriority(super, PRIO_NO_BLOCK);
|
||||
super->gustJarFlags = sub_0808147C(super->type);
|
||||
gUnk_0811E7E8[this->unk_69](this);
|
||||
} else {
|
||||
|
@ -370,7 +370,7 @@ void sub_08081404(ItemOnGroundEntity* this, u32 arg1) {
|
|||
|
||||
bool32 sub_08081420(ItemOnGroundEntity* this) {
|
||||
if (CheckShouldPlayItemGetCutscene(this)) {
|
||||
SetDefaultPriority(super, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority(super, PRIO_PLAYER_EVENT);
|
||||
CreateItemEntity(super->type, super->type2, 0);
|
||||
return TRUE;
|
||||
} else {
|
||||
|
|
|
@ -2,126 +2,122 @@
|
|||
* @file linkAnimation.c
|
||||
* @ingroup Objects
|
||||
*
|
||||
* @brief Link Animation object
|
||||
* @brief Link Animation object. This is used during "item get" sequences and
|
||||
* replaces the player entity for the duration.
|
||||
*/
|
||||
#define NENT_DEPRECATED
|
||||
#include "functions.h"
|
||||
#include "message.h"
|
||||
#include "object.h"
|
||||
#include "object/linkAnimation.h"
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u8 unk_68;
|
||||
/*0x69*/ u8 unk_69;
|
||||
/*0x6a*/ u8 unk_6a;
|
||||
/*0x6b*/ u8 unk_6b;
|
||||
/*0x6c*/ u8 unk_6c;
|
||||
/*0x6d*/ u8 unk_6d;
|
||||
/*0x6e*/ u8 unk_6e;
|
||||
/*0x6f*/ u8 unk_6f;
|
||||
/*0x70*/ u32 unk_70;
|
||||
/*0x74*/ u8 unk_74;
|
||||
} LinkAnimationEntity;
|
||||
typedef enum {
|
||||
ITEMGET_INIT,
|
||||
ITEMGET_UPDATE,
|
||||
ITEMGET_WAIT,
|
||||
} ItemGetState;
|
||||
|
||||
void LinkAnimation_Init(LinkAnimationEntity*);
|
||||
void LinkAnimation_Action1(LinkAnimationEntity*);
|
||||
void LinkAnimation_Action8(LinkAnimationEntity*);
|
||||
void LinkAnimation_Default(LinkAnimationEntity*);
|
||||
void LinkAnimation_ItemGet(LinkAnimationEntity*);
|
||||
|
||||
void LinkAnimation(LinkAnimationEntity* this) {
|
||||
static void (*const LinkAnimation_Actions[])(LinkAnimationEntity*) = {
|
||||
LinkAnimation_Init, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
LinkAnimation_Action8, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1, LinkAnimation_Action1,
|
||||
LinkAnimation_Init, LinkAnimation_Default, LinkAnimation_Default, LinkAnimation_Default,
|
||||
LinkAnimation_Default, LinkAnimation_Default, LinkAnimation_Default, LinkAnimation_Default,
|
||||
LinkAnimation_ItemGet, LinkAnimation_Default, LinkAnimation_Default, LinkAnimation_Default,
|
||||
LinkAnimation_Default, LinkAnimation_Default, LinkAnimation_Default, LinkAnimation_Default,
|
||||
LinkAnimation_Default, LinkAnimation_Default, LinkAnimation_Default, LinkAnimation_Default,
|
||||
LinkAnimation_Default, LinkAnimation_Default, LinkAnimation_Default, LinkAnimation_Default,
|
||||
LinkAnimation_Default, LinkAnimation_Default, LinkAnimation_Default, LinkAnimation_Default,
|
||||
LinkAnimation_Default, LinkAnimation_Default, LinkAnimation_Default, LinkAnimation_Default,
|
||||
};
|
||||
LinkAnimation_Actions[super->action](this);
|
||||
}
|
||||
|
||||
void LinkAnimation_Init(LinkAnimationEntity* this) {
|
||||
super->action = 8;
|
||||
LinkAnimation_Action8(this);
|
||||
super->action = PLAYER_ITEMGET;
|
||||
LinkAnimation_ItemGet(this);
|
||||
}
|
||||
|
||||
void LinkAnimation_Action1(LinkAnimationEntity* this) {
|
||||
void LinkAnimation_Default(LinkAnimationEntity* this) {
|
||||
ResetPlayerEventPriority();
|
||||
gPauseMenuOptions.disabled = 0;
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
void LinkAnimation_Action8(LinkAnimationEntity* this) {
|
||||
void LinkAnimation_ItemGet(LinkAnimationEntity* this) {
|
||||
u32 one;
|
||||
u32 tmp;
|
||||
Entity* parent;
|
||||
u32 sprite;
|
||||
Entity* held_obj;
|
||||
u8* ptr;
|
||||
|
||||
// hide player entity
|
||||
gPlayerEntity.flags &= ~ENT_COLLIDE;
|
||||
gPlayerEntity.spriteSettings.draw = 0;
|
||||
|
||||
super->palette.b.b0 = gPlayerEntity.palette.b.b0;
|
||||
switch (super->subAction) {
|
||||
case 0:
|
||||
case ITEMGET_INIT:
|
||||
one = 1;
|
||||
super->subAction = one;
|
||||
super->spriteSettings.draw = one;
|
||||
super->collisionLayer = gPlayerEntity.collisionLayer;
|
||||
super->spritePriority.b0 = gPlayerEntity.spritePriority.b0;
|
||||
|
||||
super->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3;
|
||||
super->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY;
|
||||
super->spriteSettings.flipX = 0;
|
||||
super->animationState = 4;
|
||||
SetDefaultPriority(super, 6);
|
||||
if ((gPlayerState.flags & PL_NO_CAP) != 0) {
|
||||
if (sub_080542AC(super->type)) {
|
||||
tmp = 0x45e;
|
||||
SetEntityPriority(super, PRIO_PLAYER_EVENT);
|
||||
if (gPlayerState.flags & PL_NO_CAP) {
|
||||
if (IsMinishItem(super->type)) {
|
||||
sprite = ANIM_GET_ITEM_SMALL_NOCAP;
|
||||
} else {
|
||||
tmp = 0x45b;
|
||||
sprite = ANIM_GET_ITEM_BIG_NOCAP;
|
||||
}
|
||||
} else {
|
||||
if (sub_080542AC(super->type)) {
|
||||
tmp = 0x2e0;
|
||||
if (IsMinishItem(super->type)) {
|
||||
sprite = ANIM_GET_ITEM_SMALL;
|
||||
} else {
|
||||
tmp = 0x1b9;
|
||||
sprite = ANIM_GET_ITEM_BIG;
|
||||
}
|
||||
}
|
||||
super->spriteIndex = (tmp >> 8);
|
||||
InitAnimationForceUpdate(super, tmp & 0xff);
|
||||
super->spriteIndex = (sprite >> 8);
|
||||
InitAnimationForceUpdate(super, sprite & 0xff);
|
||||
break;
|
||||
case 1:
|
||||
case ITEMGET_UPDATE:
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if (super->frame != 0) {
|
||||
super->subAction++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case ITEMGET_WAIT:
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if ((gMessage.doTextBox & 0x7f) != 0) {
|
||||
return;
|
||||
}
|
||||
if ((super->frame & ANIM_DONE) != 0) {
|
||||
super->action = 1;
|
||||
gPlayerEntity.flags = this->unk_69;
|
||||
gPlayerEntity.spriteSettings.draw = this->unk_68;
|
||||
gPlayerEntity.iframes = this->unk_6a;
|
||||
gPlayerState.field_0x7 = this->unk_6b;
|
||||
gPlayerState.keepFacing = this->unk_6c;
|
||||
gPlayerState.field_0xa = this->unk_6d;
|
||||
gPlayerState.field_0x27[0] = this->unk_6e;
|
||||
gPlayerState.mobility = this->unk_6f;
|
||||
gPlayerState.flags = this->unk_70;
|
||||
gPlayerState.field_0x8a = this->unk_74;
|
||||
if (super->frame & ANIM_DONE) {
|
||||
super->action = PLAYER_NORMAL;
|
||||
// restore player state
|
||||
gPlayerEntity.flags = this->storeFlags;
|
||||
gPlayerEntity.spriteSettings.draw = this->storeDrawFlags;
|
||||
gPlayerEntity.iframes = this->storeIFrames;
|
||||
gPlayerState.field_0x7 = this->storeField7;
|
||||
gPlayerState.keepFacing = this->storeKeepFacing;
|
||||
gPlayerState.field_0xa = this->storeFieldA;
|
||||
gPlayerState.field_0x27[0] = this->storeField27;
|
||||
gPlayerState.mobility = this->storeMobility;
|
||||
gPlayerState.flags = this->storeStateFlags;
|
||||
gPlayerState.field_0x8a = this->store8A;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
parent = super->parent;
|
||||
if (parent != NULL) {
|
||||
PositionEntityOnTop(super, parent);
|
||||
held_obj = super->parent;
|
||||
if (held_obj != NULL) {
|
||||
PositionEntityOnTop(super, held_obj);
|
||||
ptr = GetSpriteSubEntryOffsetDataPointer((u16)super->spriteIndex, super->frameIndex);
|
||||
parent->spriteOffsetX = *ptr;
|
||||
parent->spriteOffsetY = ptr[1];
|
||||
held_obj->spriteOffsetX = ptr[0];
|
||||
held_obj->spriteOffsetY = ptr[1];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ void LinkHoldingItem(LinkHoldingItemEntity* this) {
|
|||
}
|
||||
|
||||
void LinkHoldingItem_Init(LinkHoldingItemEntity* this) {
|
||||
SetDefaultPriority(super, 6);
|
||||
SetEntityPriority(super, 6);
|
||||
super->action = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ void sub_0808D2CC(void) {
|
|||
Entity* obj = FindEntity(6, MINISH_VILLAGE_OBJECT, 6, 1, 0);
|
||||
if (obj != NULL) {
|
||||
obj->type = 9;
|
||||
SetDefaultPriority(obj, 2);
|
||||
SetEntityPriority(obj, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ void MoleMittsParticle_Init(Entity* this) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
SetDefaultPriority(this, 3);
|
||||
SetEntityPriority(this, 3);
|
||||
InitializeAnimation(this, this->type2 * 4 + this->animationState);
|
||||
}
|
||||
|
||||
|
|
|
@ -106,6 +106,6 @@ void sub_0808A968(Object30Entity* this) {
|
|||
super->spriteSettings.shadow = 0;
|
||||
super->collisionFlags |= 0x10;
|
||||
super->hitbox = (Hitbox*)&gUnk_08121C58;
|
||||
SetDefaultPriority(super, 2);
|
||||
SetEntityPriority(super, 2);
|
||||
this->gravity = Q_8_8(40.0);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ void ObjectA2_Init(Entity* this) {
|
|||
this->spriteOrientation.flipY = 2;
|
||||
this->action = 1;
|
||||
ChangeObjPalette(this, gUnk_08124704[this->type]);
|
||||
SetDefaultPriority(this, PRIO_HIGHEST);
|
||||
SetEntityPriority(this, PRIO_HIGHEST);
|
||||
}
|
||||
|
||||
void ObjectA2_Action1(Entity* this) {
|
||||
|
|
|
@ -83,7 +83,7 @@ void ObjectA8_Init(ObjectA8Entity* this) {
|
|||
super->gustJarFlags = 1;
|
||||
this->unk_74 = super->x.HALF.HI;
|
||||
this->unk_76 = super->y.HALF.HI;
|
||||
SetDefaultPriority(super, 3);
|
||||
SetEntityPriority(super, 3);
|
||||
EnqueueSFX(SFX_136);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ void ParallaxRoomView(ParallaxRoomViewEntity* this) {
|
|||
}
|
||||
this->unk_68 = super->x.HALF.HI;
|
||||
this->unk_6a = super->y.HALF.HI;
|
||||
SetDefaultPriority(super, 6);
|
||||
SetEntityPriority(super, 6);
|
||||
}
|
||||
if ((super->flags & 0x10) == 0) {
|
||||
iVar4 = super->x.HALF.HI - gRoomControls.scroll_x;
|
||||
|
|
|
@ -52,7 +52,7 @@ void ShrinkingHieroglyphs_Init(ShrinkingHieroglyphsEntity* this) {
|
|||
super->subtimer = 30;
|
||||
this->objDir.HALF.HI = ShrinkingHieroglyphs_Directions[super->type];
|
||||
this->unk74 = 0x2000;
|
||||
SetDefaultPriority(super, 6);
|
||||
SetEntityPriority(super, 6);
|
||||
if (super->type == 0) {
|
||||
this->unk7e = 0x40;
|
||||
LoadSwapGFX(super, 1, 0);
|
||||
|
|
|
@ -153,7 +153,7 @@ void SpecialFx_Init(SpecialFxObject* this) {
|
|||
super->action = 1;
|
||||
super->flags &= ~0x80;
|
||||
super->spriteSettings.draw = 1;
|
||||
SetDefaultPriority(super, 6);
|
||||
SetEntityPriority(super, 6);
|
||||
if (super->collisionLayer == 0) {
|
||||
ResolveCollisionLayer(super);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ void WindTribeTeleporter_Init(WindTribeTeleporterEntity* this) {
|
|||
super->frameDuration = 8;
|
||||
super->spritePriority.b0 = 7;
|
||||
super->hitbox = (Hitbox*)&gHitbox_22;
|
||||
SetDefaultPriority(super, 6);
|
||||
SetEntityPriority(super, 6);
|
||||
if (sub_080A11C0(this)) {
|
||||
gPlayerEntity.x.HALF.HI = super->x.HALF.HI;
|
||||
gPlayerEntity.y.HALF.HI = super->y.HALF.HI;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#define NENT_DEPRECATED
|
||||
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "physics.h"
|
||||
|
@ -5,6 +7,8 @@
|
|||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "definitions.h"
|
||||
#include "object/linkAnimation.h"
|
||||
#include "object/itemOnGround.h"
|
||||
|
||||
extern const Hitbox* const gObjectHitboxes[];
|
||||
|
||||
|
@ -29,6 +33,7 @@ const s8 gUnk_08126EEC[] = {
|
|||
Entity* CreateLinkAnimation(Entity* parent, u32 type, u32 type2) {
|
||||
Entity* e = CreateItemGetEntity();
|
||||
if (e != NULL) {
|
||||
LinkAnimationEntity* this = (LinkAnimationEntity*)e;
|
||||
e->id = LINK_ANIMATION;
|
||||
e->kind = OBJECT;
|
||||
e->type = type;
|
||||
|
@ -39,16 +44,20 @@ Entity* CreateLinkAnimation(Entity* parent, u32 type, u32 type2) {
|
|||
CopyPosition(&gPlayerEntity, e);
|
||||
gPriorityHandler.sys_priority = 6;
|
||||
gPauseMenuOptions.disabled = 1;
|
||||
e->field_0x68.HALF.HI = gPlayerEntity.flags;
|
||||
e->field_0x68.HALF.LO = gPlayerEntity.spriteSettings.draw;
|
||||
e->field_0x6a.HALF.LO = gPlayerEntity.iframes;
|
||||
e->field_0x6a.HALF.HI = gPlayerState.field_0x7;
|
||||
e->field_0x6c.HALF.LO = gPlayerState.keepFacing;
|
||||
e->field_0x6c.HALF.HI = gPlayerState.field_0xa;
|
||||
e->field_0x6e.HALF.LO = gPlayerState.field_0x27[0];
|
||||
e->field_0x6e.HALF.HI = gPlayerState.mobility;
|
||||
e->field_0x70.WORD = gPlayerState.flags;
|
||||
e->field_0x74.HALF.LO = gPlayerState.field_0x8a;
|
||||
|
||||
// store player state
|
||||
this->storeFlags = gPlayerEntity.flags;
|
||||
this->storeDrawFlags = gPlayerEntity.spriteSettings.draw;
|
||||
this->storeIFrames = gPlayerEntity.iframes;
|
||||
this->storeField7 = gPlayerState.field_0x7;
|
||||
this->storeKeepFacing = gPlayerState.keepFacing;
|
||||
this->storeFieldA = gPlayerState.field_0xa;
|
||||
this->storeField27 = gPlayerState.field_0x27[0];
|
||||
this->storeMobility = gPlayerState.mobility;
|
||||
this->storeStateFlags = gPlayerState.flags;
|
||||
this->store8A = gPlayerState.field_0x8a;
|
||||
|
||||
// redundant, this is done by the LinkAnimation object
|
||||
gPlayerEntity.flags &= ~ENT_COLLIDE;
|
||||
gPlayerEntity.spriteSettings.draw = 0;
|
||||
}
|
||||
|
@ -179,8 +188,9 @@ Entity* CreateGroundItemWithFlags(Entity* parent, u32 form, u32 subtype, u32 fla
|
|||
|
||||
ent = CreateObjectWithParent(parent, GROUND_ITEM, form, subtype);
|
||||
if (ent != NULL) {
|
||||
ItemOnGroundEntity* this = (ItemOnGroundEntity*)ent;
|
||||
ent->timer = 5;
|
||||
ent->field_0x86.HWORD = flags;
|
||||
this->unk_86 = flags;
|
||||
}
|
||||
return ent;
|
||||
}
|
||||
|
@ -352,7 +362,7 @@ static Entity* CreateSpeechBubble(Entity* parent, u32 type2, s32 xOffset, s32 yO
|
|||
obj->parent = parent;
|
||||
obj->spriteOffsetX = xOffset;
|
||||
obj->spriteOffsetY = yOffset;
|
||||
SetDefaultPriority(obj, parent->updatePriority);
|
||||
SetEntityPriority(obj, parent->updatePriority);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -778,13 +778,13 @@ static void PlayerItemGetInit(Entity* this) {
|
|||
if ((gPlayerState.flags & PL_MINISH) == 0) {
|
||||
u32 anim;
|
||||
if (gPlayerState.flags & PL_NO_CAP) {
|
||||
if (sub_080542AC(gPlayerState.field_0x38)) {
|
||||
if (IsMinishItem(gPlayerState.field_0x38)) {
|
||||
anim = ANIM_GET_ITEM_SMALL_NOCAP;
|
||||
} else {
|
||||
anim = ANIM_GET_ITEM_BIG_NOCAP;
|
||||
}
|
||||
} else {
|
||||
if (sub_080542AC(gPlayerState.field_0x38)) {
|
||||
if (IsMinishItem(gPlayerState.field_0x38)) {
|
||||
anim = ANIM_GET_ITEM_SMALL;
|
||||
} else {
|
||||
anim = ANIM_GET_ITEM_BIG;
|
||||
|
@ -4094,7 +4094,7 @@ void sub_080751E8(u32 a1, u32 a2, void* script) {
|
|||
e2 = CreateSpeechBubbleSleep(&gPlayerEntity, -14, -28);
|
||||
*(Entity**)&gPlayerEntity.field_0x6c.HWORD = e2;
|
||||
if (e2 != NULL) {
|
||||
SetDefaultPriority(e2, PRIO_NO_BLOCK);
|
||||
SetEntityPriority(e2, PRIO_NO_BLOCK);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
static void sub_08077E54(ItemBehavior* beh);
|
||||
|
||||
extern void sub_0800857C(Entity*);
|
||||
extern void SetDefaultPriorityForKind(Entity*);
|
||||
extern void SetEntityPriorityForKind(Entity*);
|
||||
extern void sub_0809D738(Entity*);
|
||||
extern s32 Mod(s32, s32);
|
||||
extern u32 sub_08003FDE(Entity*, Entity*, u32, u32);
|
||||
|
@ -1853,7 +1853,7 @@ void PlayerSetNormalAndCollide(void) {
|
|||
PL_MOLDWORM_RELEASED | PL_PARACHUTE);
|
||||
ResolvePlayerAnimation();
|
||||
SetPlayerActionNormal();
|
||||
SetDefaultPriorityForKind(&gPlayerEntity);
|
||||
SetEntityPriorityForKind(&gPlayerEntity);
|
||||
}
|
||||
|
||||
void PlayerMinishSetNormalAndCollide(void) {
|
||||
|
@ -1869,7 +1869,7 @@ void PlayerMinishSetNormalAndCollide(void) {
|
|||
~(PL_BUSY | PL_DROWNING | PL_DISABLE_ITEMS | PL_IN_HOLE | PL_MOLDWORM_RELEASED | PL_PARACHUTE);
|
||||
gPlayerState.swim_state = 0;
|
||||
gPlayerState.queued_action = PLAYER_INIT;
|
||||
SetDefaultPriorityForKind(&gPlayerEntity);
|
||||
SetEntityPriorityForKind(&gPlayerEntity);
|
||||
}
|
||||
|
||||
void sub_080792BC(s32 speed, u32 direction, u32 field_0x38) {
|
||||
|
|
|
@ -1671,15 +1671,15 @@ void DeleteHitbox(Entity* entity, ScriptExecutionContext* context) {
|
|||
}
|
||||
|
||||
void SetPriorityMessage(Entity* entity, ScriptExecutionContext* context) {
|
||||
SetDefaultPriority(entity, PRIO_MESSAGE);
|
||||
SetEntityPriority(entity, PRIO_MESSAGE);
|
||||
}
|
||||
|
||||
void SetPriorityPlayerEvent(Entity* entity, ScriptExecutionContext* context) {
|
||||
SetDefaultPriority(entity, PRIO_PLAYER_EVENT);
|
||||
SetEntityPriority(entity, PRIO_PLAYER_EVENT);
|
||||
}
|
||||
|
||||
void SetPriorityHighest(Entity* entity, ScriptExecutionContext* context) {
|
||||
SetDefaultPriority(entity, PRIO_NO_BLOCK);
|
||||
SetEntityPriority(entity, PRIO_NO_BLOCK);
|
||||
}
|
||||
|
||||
void sub_0807F36C(Entity* entity, ScriptExecutionContext* context) {
|
||||
|
|
Loading…
Reference in New Issue