summaryrefslogtreecommitdiff
path: root/src/object
diff options
context:
space:
mode:
authornotyourav <65437533+notyourav@users.noreply.github.com>2022-11-21 10:05:33 -0800
committerGitHub <noreply@github.com>2022-11-21 10:05:33 -0800
commit03408debcd86ef85aa02a85680b4ebc26e53efb9 (patch)
treee9f679da3a024029733a6dfd1e5897c930aa4dc3 /src/object
parent1ceeac3c8498a84db73f9441d8aae4d3f84d4885 (diff)
parent44e4b69cdbf2925ae82fe6e6a7336b8ba90b67f0 (diff)
Merge pull request #584 from hatal175/LatestPrs
Diffstat (limited to 'src/object')
-rw-r--r--src/object/bigIceBlock.c2
-rw-r--r--src/object/frozenOctorok.c15
-rw-r--r--src/object/frozenWaterElement.c4
-rw-r--r--src/object/gyorgBossObject.c2
-rw-r--r--src/object/objectOnPillar.c6
-rw-r--r--src/object/pushableStatue.c6
-rw-r--r--src/object/smallIceBlock.c4
7 files changed, 19 insertions, 20 deletions
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/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,
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;