From bf9df148326971550dc58c65e5e9dd5c7f734228 Mon Sep 17 00:00:00 2001 From: Tal Hayon Date: Mon, 21 Nov 2022 19:17:21 +0200 Subject: Use FX enum and add another sparkle to the enum --- src/object/bigIceBlock.c | 2 +- src/object/frozenWaterElement.c | 4 ++-- src/object/gyorgBossObject.c | 2 +- src/object/objectOnPillar.c | 6 +++--- src/object/pushableStatue.c | 6 +++--- src/object/smallIceBlock.c | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/object') diff --git a/src/object/bigIceBlock.c b/src/object/bigIceBlock.c index 8814fe63..b52fe780 100644 --- a/src/object/bigIceBlock.c +++ b/src/object/bigIceBlock.c @@ -116,7 +116,7 @@ void sub_08099880(BigIceBlockEntity* this) { uVar4 = (0x3c - super->timer) * 0x20 + 0x100; SetAffineInfo(super, 0x100, uVar4, 0); sub_0806FCF4(super, uVar4, 2, 0); - obj = CreateObject(SPECIAL_FX, 0x11, 0x40); + obj = CreateObject(SPECIAL_FX, FX_DASH, 0x40); if (obj != NULL) { rand = Random(); x = ((rand >> 0x10) % 0x21) - 0x10; diff --git a/src/object/frozenWaterElement.c b/src/object/frozenWaterElement.c index f23a76a2..377dd87c 100644 --- a/src/object/frozenWaterElement.c +++ b/src/object/frozenWaterElement.c @@ -92,7 +92,7 @@ void FrozenWaterElement_Action2(FrozenWaterElementEntity* this) { super->spriteOffsetY += 8; } value = gUnk_08123DC0[this->unk_74 >> 5]; - effect = CreateObject(SPECIAL_FX, 0x11, 0x40); + effect = CreateObject(SPECIAL_FX, FX_DASH, 0x40); if (effect != NULL) { rand = Random(); tmp = (((rand >> 0x10) & value) - ((value + 1) >> 1)); @@ -101,7 +101,7 @@ void FrozenWaterElement_Action2(FrozenWaterElementEntity* this) { effect->x.HALF.HI = this->unk_80 + gRoomControls.origin_x + tmp; effect->y.HALF.HI = this->unk_82 + gRoomControls.origin_y + tmp2; } - effect = CreateObject(SPECIAL_FX, 2, 0x40); + effect = CreateObject(SPECIAL_FX, FX_DEATH, 0x40); if (effect != NULL) { rand = Random(); tmp = (((rand >> 0x10) & value) - ((value + 1) >> 1)); diff --git a/src/object/gyorgBossObject.c b/src/object/gyorgBossObject.c index 647f05fe..103352ce 100644 --- a/src/object/gyorgBossObject.c +++ b/src/object/gyorgBossObject.c @@ -437,7 +437,7 @@ void GyorgBossObject_SpawnChildren(u32 unk0, bool32 fromBlue, u32 animationState } if (fromBlue == FALSE) { Entity* tmp; - tmp = CreateObject(SPECIAL_FX, 2, 0); + tmp = CreateObject(SPECIAL_FX, FX_DEATH, 0); if (tmp) { tmp->x.HALF.HI = x; tmp->y.HALF.HI = y; diff --git a/src/object/objectOnPillar.c b/src/object/objectOnPillar.c index 371d8ec2..5b617169 100644 --- a/src/object/objectOnPillar.c +++ b/src/object/objectOnPillar.c @@ -166,7 +166,7 @@ bool32 sub_08097008(ObjectOnPillarEntity* this) { this->tileIndex = tileType; break; default: - effect = CreateObject(SPECIAL_FX, 4, 0); + effect = CreateObject(SPECIAL_FX, FX_ROCK, 0); if (effect != NULL) { CopyPosition(super, effect); } @@ -244,11 +244,11 @@ void sub_080971E0(ObjectOnPillarEntity* this) { EntityWithHitFlag* entity; u32 tilePosition; - entity = (EntityWithHitFlag*)CreateObject(SPECIAL_FX, 0x11, 0x40); + entity = (EntityWithHitFlag*)CreateObject(SPECIAL_FX, FX_DASH, 0x40); if (entity != NULL) { PositionRelative(super, &entity->base, -0x80000, 0x20000); } - entity = (EntityWithHitFlag*)CreateObject(SPECIAL_FX, 0x11, 0x40); + entity = (EntityWithHitFlag*)CreateObject(SPECIAL_FX, FX_DASH, 0x40); if (entity != NULL) { PositionRelative(super, &entity->base, 0x80000, 0x20000); } diff --git a/src/object/pushableStatue.c b/src/object/pushableStatue.c index d24e44c7..efca1ea6 100644 --- a/src/object/pushableStatue.c +++ b/src/object/pushableStatue.c @@ -71,7 +71,7 @@ void PushableStatue_Action1(PushableStatueEntity* this) { sub_08089538(this); break; case 0: - obj = CreateObject(SPECIAL_FX, 4, 0); + obj = CreateObject(SPECIAL_FX, FX_ROCK, 0); if (obj != NULL) { CopyPosition(super, obj); } @@ -118,7 +118,7 @@ void PushableStatue_SubAction0(PushableStatueEntity* this) { sub_08089538(this); break; case 0: - obj = CreateObject(SPECIAL_FX, 4, 0); + obj = CreateObject(SPECIAL_FX, FX_ROCK, 0); if (obj != NULL) { CopyPosition(super, obj); } @@ -216,7 +216,7 @@ bool32 sub_080895C0(PushableStatueEntity* this) { sub_08089454(this); return TRUE; } - obj = CreateObject(SPECIAL_FX, 4, 0); + obj = CreateObject(SPECIAL_FX, FX_ROCK, 0); if (obj != NULL) { CopyPosition(super, obj); } diff --git a/src/object/smallIceBlock.c b/src/object/smallIceBlock.c index edd3aac5..1c5e048a 100644 --- a/src/object/smallIceBlock.c +++ b/src/object/smallIceBlock.c @@ -98,7 +98,7 @@ void SmallIceBlock_Action1(SmallIceBlockEntity* this) { sub_080994B8(this); break; case 0: - obj = CreateObject(SPECIAL_FX, 0xd, 0); + obj = CreateObject(SPECIAL_FX, FX_ICE, 0); if (obj != NULL) { CopyPosition(super, obj); } @@ -165,7 +165,7 @@ void SmallIceBlock_Action4(SmallIceBlockEntity* this) { } SetAffineInfo(super, 0x100, (0x3c - super->timer) * 0x20 + 0x100, 0); if ((super->timer & 1) != 0) { - obj = CreateObject(SPECIAL_FX, 0x11, 0x40); + obj = CreateObject(SPECIAL_FX, FX_DASH, 0x40); if (obj != NULL) { rand = Random(); x = ((rand >> 0x10) % 9) - 4; -- cgit v1.2.3 From 44e4b69cdbf2925ae82fe6e6a7336b8ba90b67f0 Mon Sep 17 00:00:00 2001 From: Tal Hayon Date: Mon, 21 Nov 2022 19:18:07 +0200 Subject: =?UTF-8?q?Matches=20from=20site(Henny022p,octorock,L=C3=A9o=20Lam?= =?UTF-8?q?,ThothWhatsThis)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/object/frozenOctorok.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/object') diff --git a/src/object/frozenOctorok.c b/src/object/frozenOctorok.c index 7805839c..682e0ae0 100644 --- a/src/object/frozenOctorok.c +++ b/src/object/frozenOctorok.c @@ -55,13 +55,11 @@ const u8 gUnk_08123DDC[] = { 9, 4, 0, 0, 1, 5, 0, 0, 1, 4, 0, 0, 1, 3, 0, 0, 1, 2, 0, 0, 2, 1, 0, 0, 10, 4, 0, 0, }; -NONMATCH("asm/non_matching/frozenOctorok/FrozenOctorok_Init.inc", void FrozenOctorok_Init(FrozenOctorokEntity* this)) { +void FrozenOctorok_Init(FrozenOctorokEntity* this) { OctorokBossHeap* heap; - Entity*** pppEVar2; - FrozenOctorokEntity* pEVar3; FrozenOctorokEntity* obj1; FrozenOctorokEntity* obj2; - u32 uVar3; + u32 i; u32 type; super->action = 1; @@ -89,13 +87,15 @@ NONMATCH("asm/non_matching/frozenOctorok/FrozenOctorok_Init.inc", void FrozenOct return; } super->myHeap = heap; + MEMORY_BARRIER; this->heap->tailCount = 5; - for (uVar3 = 0; uVar3 < 4; uVar3++) { - super->child = CreateObjectWithParent(super, FROZEN_OCTOROK, uVar3 + 1, 0); + for (i = 0; i < 4; i++) { + super->child = CreateObjectWithParent(super, FROZEN_OCTOROK, i + 1, 0); if (super->child != NULL) { ((FrozenOctorokEntity*)super->child)->heap = this->heap; - this->heap->legObjects[uVar3] = (OctorokBossEntity*)super->child; + MEMORY_BARRIER; + this->heap->legObjects[i] = (OctorokBossEntity*)super->child; } } obj1 = (FrozenOctorokEntity*)CreateObjectWithParent(super, FROZEN_OCTOROK, 5, 0); @@ -143,7 +143,6 @@ NONMATCH("asm/non_matching/frozenOctorok/FrozenOctorok_Init.inc", void FrozenOct InitializeAnimation(super, gUnk_08123DDC[super->type * 4]); FrozenOctorok_Action1(this); } -END_NONMATCH void (*const FrozenOctorok_Action1SubActions[])(FrozenOctorokEntity*) = { FrozenOctorok_Action1SubAction0, FrozenOctorok_Action1SubAction1, FrozenOctorok_Action1SubAction2, -- cgit v1.2.3