diff --git a/assets/xml/objects/gameplay_keep.xml b/assets/xml/objects/gameplay_keep.xml
index a7f5e075a3..8317b3ee7f 100644
--- a/assets/xml/objects/gameplay_keep.xml
+++ b/assets/xml/objects/gameplay_keep.xml
@@ -854,8 +854,8 @@
-
-
+
+
@@ -871,7 +871,7 @@
-
+
diff --git a/include/functions.h b/include/functions.h
index 43aef01816..1fc1935091 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -546,8 +546,8 @@ void EffectSsGSplash_Spawn(PlayState* play, Vec3f* pos, Color_RGBA8* primColor,
// void EffectSsLightning_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Color_RGBA8* pzParm3, Color_RGBA8* pzParm4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7, UNK_TYPE2 param_8);
// void EffectSsDtBubble_SpawnColorProfile(UNK_TYPE4 param_1, Vec3f* param_2, Vec3f* param_3, Vec3f* param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7, UNK_TYPE2 param_8);
void EffectSsDtBubble_SpawnCustomColor(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 life, s16 randXZ);
-void EffectSsHahen_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16 scale, s16 objId, s16 life, Gfx* dList);
-void EffectSsHahen_SpawnBurst(PlayState* play, Vec3f* pos, f32 burstScale, s16 unused, s16 scale, s16 randScaleRange, s16 count, s16 objId, s16 life, Gfx* dList);
+void EffectSsHahen_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 flags, s16 scale, s16 objId, s16 life, Gfx* dList);
+void EffectSsHahen_SpawnBurst(PlayState* play, Vec3f* pos, f32 burstScale, s16 flags, s16 scale, s16 randScaleRange, s16 count, s16 objId, s16 life, Gfx* dList);
// void func_800B2364(void);
// void EffectSsStick_Spawn(UNK_TYPE4 uParm1, UNK_PTR puParm2, UNK_TYPE2 uParm3);
// void EffectSsSibuki_Spawn(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
diff --git a/spec b/spec
index effe4fa26a..5bc560efa3 100644
--- a/spec
+++ b/spec
@@ -1859,8 +1859,7 @@ beginseg
name "ovl_Effect_Ss_Hahen"
compress
include "build/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.o"
- include "build/data/ovl_Effect_Ss_Hahen/ovl_Effect_Ss_Hahen.data.o"
- include "build/data/ovl_Effect_Ss_Hahen/ovl_Effect_Ss_Hahen.reloc.o"
+ include "build/src/overlays/effects/ovl_Effect_Ss_Hahen/ovl_Effect_Ss_Hahen_reloc.o"
endseg
beginseg
diff --git a/src/code/z_effect_soft_sprite_old_init.c b/src/code/z_effect_soft_sprite_old_init.c
index b573fec608..2608d22e5e 100644
--- a/src/code/z_effect_soft_sprite_old_init.c
+++ b/src/code/z_effect_soft_sprite_old_init.c
@@ -529,7 +529,7 @@ void EffectSsDtBubble_SpawnCustomColor(PlayState* play, Vec3f* pos, Vec3f* veloc
* - due to how life is implemented it is capped at 200. Any value over 200 is accepted, but the fragment will
* only live for 200 frames
*/
-void EffectSsHahen_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16 scale, s16 objId,
+void EffectSsHahen_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 flags, s16 scale, s16 objId,
s16 life, Gfx* dList) {
EffectSsHahenInitParams initParams;
@@ -537,7 +537,7 @@ void EffectSsHahen_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* ac
Math_Vec3f_Copy(&initParams.velocity, velocity);
Math_Vec3f_Copy(&initParams.accel, accel);
initParams.dList = dList;
- initParams.unused = unused;
+ initParams.flags = flags;
initParams.scale = scale;
initParams.objId = objId;
initParams.life = life;
@@ -554,7 +554,7 @@ void EffectSsHahen_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* ac
* - due to how life is implemented it is capped at 200. Any value over 200 is accepted, but the fragment will
* only live for 200 frames
*/
-void EffectSsHahen_SpawnBurst(PlayState* play, Vec3f* pos, f32 burstScale, s16 unused, s16 scale, s16 randScaleRange,
+void EffectSsHahen_SpawnBurst(PlayState* play, Vec3f* pos, f32 burstScale, s16 flags, s16 scale, s16 randScaleRange,
s16 count, s16 objId, s16 life, Gfx* dList) {
s32 i;
Vec3f velocity;
@@ -568,7 +568,7 @@ void EffectSsHahen_SpawnBurst(PlayState* play, Vec3f* pos, f32 burstScale, s16 u
velocity.z = (Rand_ZeroOne() - 0.5f) * burstScale;
velocity.y = ((Rand_ZeroOne() * 0.5f) + 0.5f) * burstScale;
- EffectSsHahen_Spawn(play, pos, &velocity, &accel, unused, Rand_S16Offset(scale, randScaleRange), objId, life,
+ EffectSsHahen_Spawn(play, pos, &velocity, &accel, flags, Rand_S16Offset(scale, randScaleRange), objId, life,
dList);
}
}
@@ -576,7 +576,7 @@ void EffectSsHahen_SpawnBurst(PlayState* play, Vec3f* pos, f32 burstScale, s16 u
void func_800B2364(PlayState* play, Vec3f* pos, Gfx* dList) {
Vec3f accel = { 0.0f, -2.0f, 0.0f };
- EffectSsHahen_Spawn(play, pos, &gZeroVec3f, &accel, 1, 5, 1, 10, dList);
+ EffectSsHahen_Spawn(play, pos, &gZeroVec3f, &accel, HAHEN_SMALL, 5, GAMEPLAY_KEEP, 10, dList);
}
// EffectSsStick Spawn Functions
diff --git a/src/overlays/actors/ovl_Boss_02/z_boss_02.c b/src/overlays/actors/ovl_Boss_02/z_boss_02.c
index d096989817..6150da5d44 100644
--- a/src/overlays/actors/ovl_Boss_02/z_boss_02.c
+++ b/src/overlays/actors/ovl_Boss_02/z_boss_02.c
@@ -1566,7 +1566,7 @@ void func_809DD2F8(PlayState* play) {
MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_01A620);
+ gSPDisplayList(POLY_OPA_DISP++, gEffFragments1DL);
}
}
diff --git a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c
index 868c3c0d55..e29ac86a87 100644
--- a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c
+++ b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c
@@ -540,7 +540,8 @@ void func_808BE4D4(EnDekunuts* this, PlayState* play) {
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xE0);
Actor_Spawn(&play->actorCtx, play, ACTOR_OBJ_ETCETERA, this->actor.home.pos.x, this->actor.home.pos.y,
this->actor.home.pos.z, 0, this->actor.home.rot.y, 0, 0x80);
- EffectSsHahen_SpawnBurst(play, &this->actor.home.pos, 6.0f, 0, 6, 2, 15, 64, 10, gDekuScrubFlowerFragmentDL);
+ EffectSsHahen_SpawnBurst(play, &this->actor.home.pos, 6.0f, 0, 6, 2, 15, OBJECT_DEKUNUTS, 10,
+ gDekuScrubFlowerFragmentDL);
Actor_MarkForDeath(&this->actor);
}
}
diff --git a/src/overlays/actors/ovl_En_Fu_Kago/z_en_fu_kago.c b/src/overlays/actors/ovl_En_Fu_Kago/z_en_fu_kago.c
index 6ee121a163..a2fc00b223 100644
--- a/src/overlays/actors/ovl_En_Fu_Kago/z_en_fu_kago.c
+++ b/src/overlays/actors/ovl_En_Fu_Kago/z_en_fu_kago.c
@@ -7,6 +7,7 @@
#include "z_en_fu_kago.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "overlays/actors/ovl_En_Fu/z_en_fu.h"
+#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "objects/object_fu_mato/object_fu_mato.h"
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20)
@@ -221,7 +222,7 @@ void func_80ACFA78(EnFuKago* this, PlayState* play) {
}
this->dyna.actor.freezeTimer = 2;
- EffectSsHahen_SpawnBurst(play, &this->dyna.actor.world.pos, 17.0f, 0, 15, 13, 20, -1, 10, NULL);
+ EffectSsHahen_SpawnBurst(play, &this->dyna.actor.world.pos, 17.0f, 0, 15, 13, 20, HAHEN_OBJECT_DEFAULT, 10, NULL);
this->unk_338 = 60;
this->unk_33A = 1;
diff --git a/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c b/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c
index 9fa1353140..19aa9dd2a8 100644
--- a/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c
+++ b/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c
@@ -6,6 +6,7 @@
#include "z_en_fu_mato.h"
#include "overlays/actors/ovl_En_Fu/z_en_fu.h"
+#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "objects/object_fu_mato/object_fu_mato.h"
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20)
@@ -239,7 +240,7 @@ void func_80ACE850(EnFuMato* this, PlayState* play) {
}
this->dyna.actor.freezeTimer = 2;
- EffectSsHahen_SpawnBurst(play, &this->dyna.actor.world.pos, 13.0f, 0, 7, 8, 20, -1, 10, NULL);
+ EffectSsHahen_SpawnBurst(play, &this->dyna.actor.world.pos, 13.0f, 0, 7, 8, 20, HAHEN_OBJECT_DEFAULT, 10, NULL);
Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WOODPLATE_BROKEN);
this->actionFunc = func_80ACECFC;
}
diff --git a/src/overlays/actors/ovl_En_Geg/z_en_geg.c b/src/overlays/actors/ovl_En_Geg/z_en_geg.c
index 8ccb969da4..a104dfcea3 100644
--- a/src/overlays/actors/ovl_En_Geg/z_en_geg.c
+++ b/src/overlays/actors/ovl_En_Geg/z_en_geg.c
@@ -6,6 +6,7 @@
#include "z_en_geg.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
+#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "objects/object_oF1d_map/object_oF1d_map.h"
#include "objects/object_taisou/object_taisou.h"
#include "objects/object_hakugin_demo/object_hakugin_demo.h"
@@ -692,8 +693,8 @@ void func_80BB2B1C(EnGeg* this, PlayState* play) {
this->unk_4C0[i].x *= temp_f20;
this->unk_4C0[i].y *= temp_f20;
this->unk_4C0[i].z *= temp_f20;
- EffectSsHahen_Spawn(play, &this->unk_4B4, &this->unk_4C0[i], &sp74, 1, sp68, 1, 15,
- gameplay_keep_DL_06AB30);
+ EffectSsHahen_Spawn(play, &this->unk_4B4, &this->unk_4C0[i], &sp74, HAHEN_SMALL, sp68, GAMEPLAY_KEEP,
+ 15, gameplay_keep_DL_06AB30);
}
}
this->unk_4E0--;
diff --git a/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c b/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c
index d2d447db51..d4dc9a17ed 100644
--- a/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c
+++ b/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c
@@ -5,6 +5,7 @@
*/
#include "z_en_guard_nuts.h"
+#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_100000 | ACTOR_FLAG_80000000)
@@ -273,7 +274,7 @@ void EnGuardNuts_Burrow(EnGuardNuts* this, PlayState* play) {
EnGuardNuts_ChangeAnim(this, DIG_ANIM);
Math_Vec3f_Copy(&digPos, &this->actor.world.pos);
digPos.y = this->actor.floorHeight;
- EffectSsHahen_SpawnBurst(play, &digPos, 4.0f, 0, 10, 3, 15, -1, 10, NULL);
+ EffectSsHahen_SpawnBurst(play, &digPos, 4.0f, 0, 10, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
this->targetHeadPos.y = 0;
this->actor.flags |= ACTOR_FLAG_8000000;
this->targetHeadPos.x = this->targetHeadPos.y;
@@ -304,7 +305,7 @@ void EnGuardNuts_Unburrow(EnGuardNuts* this, PlayState* play) {
if ((yawDiff < 0x4000) && ((D_80ABBE20 == 0) || (this->actor.xzDistToPlayer > 150.0f))) {
Math_Vec3f_Copy(&digPos, &this->actor.world.pos);
digPos.y = this->actor.floorHeight;
- EffectSsHahen_SpawnBurst(play, &digPos, 4.0f, 0, 10, 3, 15, -1, 10, NULL);
+ EffectSsHahen_SpawnBurst(play, &digPos, 4.0f, 0, 10, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_UP);
D_80ABBE20 = 0;
if (this->guardTextIndex == 9) {
diff --git a/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c b/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c
index a4bd59c848..9df183a9ee 100644
--- a/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c
+++ b/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c
@@ -5,6 +5,7 @@
*/
#include "z_en_hidden_nuts.h"
+#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "objects/object_hintnuts/object_hintnuts.h"
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_2000000)
@@ -257,7 +258,7 @@ void func_80BDB7E8(EnHiddenNuts* this, PlayState* play) {
Math_Vec3f_Copy(&sp3C, &this->actor.world.pos);
sp3C.y = this->actor.floorHeight + 30.0f;
- EffectSsHahen_SpawnBurst(play, &sp3C, 4.0f, 0, 10, 3, 15, -1, 10, NULL);
+ EffectSsHahen_SpawnBurst(play, &sp3C, 4.0f, 0, 10, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_UP);
func_80BDB1B4(this, 7);
@@ -304,7 +305,7 @@ void func_80BDBA28(EnHiddenNuts* this, PlayState* play) {
Math_Vec3f_Copy(&sp44, &this->actor.world.pos);
sp44.y = this->actor.floorHeight + 30.0f;
- EffectSsHahen_SpawnBurst(play, &sp44, 4.0f, 0, 10, 3, 15, -1, 10, NULL);
+ EffectSsHahen_SpawnBurst(play, &sp44, 4.0f, 0, 10, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_UP);
this->unk_208 = 1;
@@ -398,7 +399,7 @@ void func_80BDBED4(EnHiddenNuts* this, PlayState* play) {
sp38.y = this->actor.floorHeight;
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN);
- EffectSsHahen_SpawnBurst(play, &sp38, 4.0f, 0, 10, 3, 15, -1, 10, NULL);
+ EffectSsHahen_SpawnBurst(play, &sp38, 4.0f, 0, 10, 3, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
Actor_MarkForDeath(&this->actor);
}
}
diff --git a/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c b/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c
index 71194f79c1..afe2057433 100644
--- a/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c
+++ b/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c
@@ -5,6 +5,7 @@
*/
#include "z_en_hint_skb.h"
+#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "objects/object_skb/object_skb.h"
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10)
@@ -816,7 +817,8 @@ void func_80C215E4(PlayState* play, EnHintSkb* this, Vec3f* arg2) {
sp50.y += (Rand_ZeroOne() - 0.5f) * 4.0f;
- EffectSsHahen_Spawn(play, &sp5C, &sp50, &sp44, 0, ((Rand_ZeroOne() * 5.0f) + 12.0f) * 0.8f, -1, 10, NULL);
+ EffectSsHahen_Spawn(play, &sp5C, &sp50, &sp44, 0, ((Rand_ZeroOne() * 5.0f) + 12.0f) * 0.8f, HAHEN_OBJECT_DEFAULT,
+ 10, NULL);
func_800BBFB0(play, &sp5C, 10.0f, 1, 150, 0, 1);
}
diff --git a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c
index 228fad0534..94d5c36f51 100644
--- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c
+++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c
@@ -5,6 +5,7 @@
*/
#include "z_en_karebaba.h"
+#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_dekubaba/object_dekubaba.h"
@@ -275,7 +276,7 @@ void func_808F1778(EnKarebaba* this, PlayState* play) {
}
this->actor.shape.rot.y += 0x1999;
- EffectSsHahen_SpawnBurst(play, &this->actor.home.pos, 3.0f, 0, 12, 5, 1, -1, 10, NULL);
+ EffectSsHahen_SpawnBurst(play, &this->actor.home.pos, 3.0f, 0, 12, 5, 1, HAHEN_OBJECT_DEFAULT, 10, NULL);
}
void func_808F1878(EnKarebaba* this) {
@@ -407,7 +408,7 @@ void func_808F1C84(EnKarebaba* this, PlayState* play) {
if (this->unk_1EE == 0) {
Math_ScaledStepToS(&this->actor.shape.rot.x, 0x4800, 0x71C);
- EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 3.0f, 0, 12, 5, 1, -1, 10, NULL);
+ EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 3.0f, 0, 12, 5, 1, HAHEN_OBJECT_DEFAULT, 10, NULL);
if ((this->actor.scale.x > 0.005f) && ((this->actor.bgCheckFlags & 2) || (this->actor.bgCheckFlags & 8))) {
this->actor.scale.z = 0.0f;
@@ -415,7 +416,8 @@ void func_808F1C84(EnKarebaba* this, PlayState* play) {
this->actor.scale.x = 0.0f;
this->actor.speedXZ = 0.0f;
this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_4);
- EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 3.0f, 0, 12, 5, 15, -1, 10, NULL);
+ EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 3.0f, 0, 12, 5, 15, HAHEN_OBJECT_DEFAULT, 10,
+ NULL);
}
if (this->actor.bgCheckFlags & 2) {
@@ -463,7 +465,7 @@ void func_808F200C(EnKarebaba* this, PlayState* play) {
Item_DropCollectible(play, &this->actor.world.pos, ITEM00_NUTS_1);
func_808F238C(this);
} else {
- EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 3.0f, 0, 12, 5, 1, -1, 10, NULL);
+ EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 3.0f, 0, 12, 5, 1, HAHEN_OBJECT_DEFAULT, 10, NULL);
Math_StepToF(&this->actor.world.pos.y, this->actor.home.pos.y, 1.0f);
}
this->actor.scale.y = this->actor.scale.x;
@@ -520,7 +522,7 @@ void func_808F228C(EnKarebaba* this, PlayState* play) {
}
this->actor.shape.rot.y += 0x1999;
- EffectSsHahen_SpawnBurst(play, &this->actor.home.pos, 3.0f, 0, 12, 5, 1, -1, 10, NULL);
+ EffectSsHahen_SpawnBurst(play, &this->actor.home.pos, 3.0f, 0, 12, 5, 1, HAHEN_OBJECT_DEFAULT, 10, NULL);
}
void func_808F238C(EnKarebaba* this) {
diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c
index a19b484fd0..53106890bd 100644
--- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c
+++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c
@@ -6,6 +6,7 @@
#include "z_en_peehat.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
+#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "objects/object_ph/object_ph.h"
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10)
@@ -260,7 +261,8 @@ void func_80897258(PlayState* play, EnPeehat* this, Vec3f* arg2, f32 arg3, f32 a
D_80899564.z = randPlusMinusPoint5Scaled(1.05f);
D_80899558.y = randPlusMinusPoint5Scaled(4.0f) + 8.0f;
- EffectSsHahen_Spawn(play, &sp44, &D_80899558, &D_80899564, 0, (Rand_ZeroFloat(5.0f) + 12.0f) * arg4, -1, 10, NULL);
+ EffectSsHahen_Spawn(play, &sp44, &D_80899558, &D_80899564, 0, (Rand_ZeroFloat(5.0f) + 12.0f) * arg4,
+ HAHEN_OBJECT_DEFAULT, 10, NULL);
}
void func_80897390(EnPeehat* this, PlayState* play) {
diff --git a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c
index 6365bac8b0..a35dff0645 100644
--- a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c
+++ b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c
@@ -4,8 +4,8 @@
* Description: Ikana Graveyard - Circle of Stalchildren
*/
-#include "overlays/actors/ovl_Obj_Hakaisi/z_obj_hakaisi.h"
#include "z_en_rail_skb.h"
+#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "objects/object_skb/object_skb.h"
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10)
@@ -848,7 +848,7 @@ void func_80B72430(EnRailSkb* this, PlayState* play, s32 arg2) {
sp50.y += Rand_Centered() * 4.0f;
- EffectSsHahen_Spawn(play, &sp5C, &sp50, &sp44, 0, (Rand_Next() & 7) + 10, -1, 10, NULL);
+ EffectSsHahen_Spawn(play, &sp5C, &sp50, &sp44, 0, (Rand_Next() & 7) + 10, HAHEN_OBJECT_DEFAULT, 10, NULL);
func_800BBFB0(play, &sp5C, 10.0f, 1, 150, 0, 1);
}
}
diff --git a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.h b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.h
index db170806cf..09d3b4c4c9 100644
--- a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.h
+++ b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.h
@@ -2,6 +2,7 @@
#define Z_EN_RAIL_SKB_H
#include "global.h"
+#include "overlays/actors/ovl_Obj_Hakaisi/z_obj_hakaisi.h"
struct EnRailSkb;
diff --git a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c
index b634d3e0ff..5da1d95b0e 100644
--- a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c
+++ b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c
@@ -6,7 +6,7 @@
#include "z_en_railgibud.h"
#include "z64rumble.h"
-#include "objects/object_rd/object_rd.h"
+#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_10 | ACTOR_FLAG_400)
@@ -674,7 +674,7 @@ void EnRailgibud_SpawnEffectsForSinkingIntoTheGround(EnRailgibud* this, PlayStat
rockFragmentAccel.z = Rand_Centered();
rockFragmentVelocity.y += Rand_Centered() * 4.0f;
EffectSsHahen_Spawn(play, &rockFragmentPos, &rockFragmentVelocity, &rockFragmentAccel, 0,
- (Rand_Next() & 7) + 10, -1, 10, NULL);
+ (Rand_Next() & 7) + 10, HAHEN_OBJECT_DEFAULT, 10, NULL);
EnRailgibud_SpawnDust(play, &rockFragmentPos, 10.0f, 10, 150, 0);
}
}
@@ -1112,6 +1112,7 @@ void EnRailgibud_InitCutsceneGibdo(EnRailgibud* this, PlayState* play) {
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
+
if (gSaveContext.save.entranceIndex != 0x2090) { // NOT Cutscene: Music Box House Opens
Actor_MarkForDeath(&this->actor);
}
diff --git a/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c b/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c
index 4c119e341f..e161325b9b 100644
--- a/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c
+++ b/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c
@@ -121,7 +121,7 @@ void func_80BCAC40(EnScopenuts* this, PlayState* play) {
sp54.x = Rand_Centered() * 10.0f;
sp54.y = 2.0f * Rand_Centered();
sp54.z = Rand_Centered() * 10.0f;
- EffectSsHahen_Spawn(play, &sp60, &sp54, &D_80BCCCE4, 0, 0x96, 1, 0x10, D_80BCCCDC[i & 1]);
+ EffectSsHahen_Spawn(play, &sp60, &sp54, &D_80BCCCE4, 0, 150, GAMEPLAY_KEEP, 16, D_80BCCCDC[i & 1]);
}
}
diff --git a/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c b/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c
index 5d656af954..b07a1667e8 100644
--- a/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c
+++ b/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c
@@ -328,7 +328,7 @@ void EnSnowman_SpawnBigSnowballFragmentEffects(EnSnowman* this, PlayState* play)
pos.y = (Rand_ZeroFloat(8.0f) * velocity.y) + this->snowballPos.y;
pos.z = (Rand_ZeroFloat(10.0f) * velocity.z) + this->snowballPos.z;
EffectSsHahen_Spawn(play, &pos, &velocity, &sAccel, 0,
- Rand_S16Offset((((i % 3) * 50) + 50), (((i % 3) * 25) + 25)), 452, 20,
+ Rand_S16Offset((((i % 3) * 50) + 50), (((i % 3) * 25) + 25)), OBJECT_SNOWMAN, 20,
sSnowballFragmentDLs[i % 3]);
}
@@ -755,7 +755,7 @@ void EnSnowman_Dead(EnSnowman* this, PlayState* play) {
pos.y = (Rand_ZeroFloat(3.0f) * velocity.y) + this->actor.world.pos.y;
pos.z = (Rand_ZeroFloat(6.0f) * velocity.z) + this->actor.world.pos.z;
EffectSsHahen_Spawn(play, &pos, &velocity, &sAccel, 0,
- Rand_S16Offset((((i % 3) * 20) + 20), (((i % 3) * 10) + 10)), 452, 20,
+ Rand_S16Offset((((i % 3) * 20) + 20), (((i % 3) * 10) + 10)), OBJECT_SNOWMAN, 20,
sSnowballFragmentDLs[i % 3]);
}
@@ -1086,7 +1086,7 @@ void EnSnowman_UpdateSnowball(Actor* thisx, PlayState* play) {
if (EN_SNOWMAN_GET_TYPE(&this->actor) == EN_SNOWMAN_TYPE_SMALL_SNOWBALL) {
scale = 10;
for (i = 0; i < 3; i++) {
- EffectSsHahen_SpawnBurst(play, &thisx->world.pos, 5.0f, 0, scale, scale >> 1, 3, 452, 20,
+ EffectSsHahen_SpawnBurst(play, &thisx->world.pos, 5.0f, 0, scale, scale >> 1, 3, OBJECT_SNOWMAN, 20,
sSnowballFragmentDLs[i]);
scale *= 2;
}
diff --git a/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c b/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c
index e1edaf0f76..7f59fe5795 100644
--- a/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c
+++ b/src/overlays/actors/ovl_Obj_Bigicicle/z_obj_bigicicle.c
@@ -6,6 +6,7 @@
#include "z_obj_bigicicle.h"
#include "overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.h"
+#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "objects/object_bigicicle/object_bigicicle.h"
#define FLAGS 0x00000000
@@ -166,8 +167,8 @@ void func_80AE8DE4(ObjBigicicle* this, PlayState* play) {
sp8C.y = Rand_ZeroFloat(2.0f);
sp8C.z = randPlusMinusPoint5Scaled(13.0f);
- EffectSsHahen_Spawn(play, &sp98, &sp8C, &D_80AE987C, 2, (Rand_ZeroFloat(20.0f) + 30.0f) * temp_f20,
- OBJECT_BIGICICLE, 0x28, object_bigicicle_DL_0009B0);
+ EffectSsHahen_Spawn(play, &sp98, &sp8C, &D_80AE987C, HAHEN_XLU, (Rand_ZeroFloat(20.0f) + 30.0f) * temp_f20,
+ OBJECT_BIGICICLE, 40, object_bigicicle_DL_0009B0);
}
sp98.x = this->actor.world.pos.x;
@@ -278,7 +279,7 @@ void func_80AE939C(ObjBigicicle* this, PlayState* play) {
sp98.y = this->actor.world.pos.y + (sp8C.y * 7.0f * temp_f20);
sp98.z = this->actor.world.pos.z + (sp8C.z * 5.0f * temp_f20);
- EffectSsHahen_Spawn(play, &sp98, &sp8C, &D_80AE987C, 2, (Rand_ZeroFloat(30.0f) + 40.0f) * temp_f20,
+ EffectSsHahen_Spawn(play, &sp98, &sp8C, &D_80AE987C, HAHEN_XLU, (Rand_ZeroFloat(30.0f) + 40.0f) * temp_f20,
OBJECT_BIGICICLE, 30, object_bigicicle_DL_0009B0);
}
diff --git a/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c b/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c
index 3a2f75606d..b4d9ae6fbe 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.c
@@ -1,33 +1,131 @@
/*
* File: z_eff_ss_hahen.c
* Overlay: ovl_Effect_Ss_Hahen
- * Description:
+ * Description: Fragments
*/
#include "z_eff_ss_hahen.h"
+#include "objects/gameplay_keep/gameplay_keep.h"
+
+#define rPitch regs[0]
+#define rYaw regs[1]
+#define rFlags regs[2]
+#define rScale regs[3]
+#define rObjId regs[4]
+#define rObjBankIndex regs[5]
+#define rMinLife regs[6]
#define PARAMS ((EffectSsHahenInitParams*)initParamsx)
-s32 EffectSsHahen_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx);
+u32 EffectSsHahen_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx);
void EffectSsHahen_Update(PlayState* play, u32 index, EffectSs* this);
void EffectSsHahen_Draw(PlayState* play, u32 index, EffectSs* this);
-#if 0
const EffectSsInit Effect_Ss_Hahen_InitVars = {
EFFECT_SS_HAHEN,
EffectSsHahen_Init,
};
-#endif
+void EffectSsHahen_CheckForObject(EffectSs* this, PlayState* play) {
+ if (((this->rObjBankIndex = Object_GetIndex(&play->objectCtx, this->rObjId)) < 0) ||
+ !Object_IsLoaded(&play->objectCtx, this->rObjBankIndex)) {
+ this->life = -1;
+ this->draw = NULL;
+ }
+}
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Hahen/func_8097B270.s")
+u32 EffectSsHahen_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx) {
+ EffectSsHahenInitParams* initParams = PARAMS;
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Hahen/EffectSsHahen_Init.s")
+ this->pos = initParams->pos;
+ this->velocity = initParams->velocity;
+ this->accel = initParams->accel;
+ this->life = 200;
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Hahen/func_8097B424.s")
+ if (initParams->dList != NULL) {
+ this->gfx = initParams->dList;
+ this->rObjId = initParams->objId;
+ EffectSsHahen_CheckForObject(this, play);
+ } else {
+ this->gfx = gEffFragments1DL;
+ this->rObjId = HAHEN_OBJECT_DEFAULT;
+ }
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Hahen/func_8097B504.s")
+ this->draw = EffectSsHahen_Draw;
+ this->update = EffectSsHahen_Update;
+ this->rFlags = initParams->flags;
+ this->rScale = initParams->scale;
+ this->rPitch = Rand_ZeroOne() * 314.0f;
+ this->rYaw = Rand_ZeroOne() * 314.0f;
+ this->rMinLife = 200 - initParams->life;
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Hahen/EffectSsHahen_Draw.s")
+ return 1;
+}
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Hahen/EffectSsHahen_Update.s")
+void EffectSsHahen_DrawOpa(PlayState* play, EffectSs* this) {
+ GraphicsContext* gfxCtx = play->state.gfxCtx;
+ s32 pad;
+
+ OPEN_DISPS(gfxCtx);
+
+ if (this->rObjId != HAHEN_OBJECT_DEFAULT) {
+ gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.status[this->rObjBankIndex].segment);
+ }
+ gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ func_8012C28C(play->state.gfxCtx);
+ gSPDisplayList(POLY_OPA_DISP++, this->gfx);
+
+ CLOSE_DISPS(gfxCtx);
+}
+
+void EffectSsHahen_DrawXlu(PlayState* play, EffectSs* this) {
+ GraphicsContext* gfxCtx = play->state.gfxCtx;
+ s32 pad;
+
+ OPEN_DISPS(gfxCtx);
+
+ if (this->rObjId != -1) {
+ gSPSegment(POLY_XLU_DISP++, 0x06, play->objectCtx.status[this->rObjBankIndex].segment);
+ }
+ gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ func_8012C2DC(play->state.gfxCtx);
+ gSPDisplayList(POLY_XLU_DISP++, this->gfx);
+
+ CLOSE_DISPS(gfxCtx);
+}
+
+void EffectSsHahen_Draw(PlayState* play, u32 index, EffectSs* this) {
+ f32 scale;
+
+ if (this->rFlags & HAHEN_SMALL) {
+ scale = this->rScale * (0.001f * 0.1f);
+ } else {
+ scale = this->rScale * 0.001f;
+ }
+
+ Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
+ Matrix_RotateYF(this->rYaw * 0.01f, MTXMODE_APPLY);
+ Matrix_RotateXFApply(this->rPitch * 0.01f);
+ Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
+
+ if (this->rFlags & HAHEN_XLU) {
+ EffectSsHahen_DrawXlu(play, this);
+ } else {
+ EffectSsHahen_DrawOpa(play, this);
+ }
+}
+
+void EffectSsHahen_Update(PlayState* play, u32 index, EffectSs* this) {
+ Player* player = GET_PLAYER(play);
+
+ this->rPitch += 0x37;
+ this->rYaw += 0xA;
+
+ if ((this->pos.y <= player->actor.floorHeight) && (this->life < this->rMinLife)) {
+ this->life = 0;
+ }
+
+ if (this->rObjId != HAHEN_OBJECT_DEFAULT) {
+ EffectSsHahen_CheckForObject(this, play);
+ }
+}
diff --git a/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h b/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h
index d7a160b4f8..9a73ac664f 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h
+++ b/src/overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h
@@ -5,12 +5,15 @@
#define HAHEN_OBJECT_DEFAULT -1
+#define HAHEN_SMALL (1 << 0)
+#define HAHEN_XLU (1 << 1)
+
typedef struct {
/* 0x00 */ Vec3f pos;
/* 0x0C */ Vec3f velocity;
/* 0x18 */ Vec3f accel;
/* 0x24 */ Gfx* dList;
- /* 0x28 */ s16 unused;
+ /* 0x28 */ s16 flags;
/* 0x2A */ s16 scale;
/* 0x2C */ s16 objId;
/* 0x2C */ s16 life;
diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt
index 6809b2052b..3b0b15b8f1 100644
--- a/tools/disasm/functions.txt
+++ b/tools/disasm/functions.txt
@@ -8171,10 +8171,10 @@
0x8097AD60:("EffectSsDtBubble_Init",),
0x8097AF50:("EffectSsDtBubble_Draw",),
0x8097B160:("EffectSsDtBubble_Update",),
- 0x8097B270:("func_8097B270",),
+ 0x8097B270:("EffectSsHahen_CheckForObject",),
0x8097B2E4:("EffectSsHahen_Init",),
- 0x8097B424:("func_8097B424",),
- 0x8097B504:("func_8097B504",),
+ 0x8097B424:("EffectSsHahen_DrawOpa",),
+ 0x8097B504:("EffectSsHahen_DrawXlu",),
0x8097B5E4:("EffectSsHahen_Draw",),
0x8097B708:("EffectSsHahen_Update",),
0x8097B810:("EffectSsStick_Init",),
diff --git a/undefined_syms.txt b/undefined_syms.txt
index 8fff643698..148e952d60 100644
--- a/undefined_syms.txt
+++ b/undefined_syms.txt
@@ -388,7 +388,6 @@ D_04016360 = 0x04016360;
D_0401A4D0 = 0x0401A4D0;
D_0401A538 = 0x0401A538;
D_0401A590 = 0x0401A590;
-D_0401A620 = 0x0401A620;
D_0401ACF0 = 0x0401ACF0;
D_0401ED00 = 0x0401ED00;
D_0401F0F0 = 0x0401F0F0;