clean up linkAnimation.c

This commit is contained in:
theo3
2023-12-28 19:05:06 -08:00
parent 7c1c612c9b
commit a030120a0c
95 changed files with 245 additions and 216 deletions
+1 -1
View File
@@ -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) {
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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);
}
+4 -4
View File
@@ -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) {
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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) {
+11 -11
View File
@@ -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);
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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) {
+2 -2
View File
@@ -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;
}
}
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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) {
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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 {
+57 -61
View File
@@ -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];
}
}
+1 -1
View File
@@ -38,7 +38,7 @@ void LinkHoldingItem(LinkHoldingItemEntity* this) {
}
void LinkHoldingItem_Init(LinkHoldingItemEntity* this) {
SetDefaultPriority(super, 6);
SetEntityPriority(super, 6);
super->action = 1;
}
+1 -1
View File
@@ -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);
}
}
+1 -1
View File
@@ -63,7 +63,7 @@ void MoleMittsParticle_Init(Entity* this) {
break;
}
}
SetDefaultPriority(this, 3);
SetEntityPriority(this, 3);
InitializeAnimation(this, this->type2 * 4 + this->animationState);
}
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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;