summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorfig02 <fig02srl@gmail.com>2020-09-29 20:18:46 -0400
committerGitHub <noreply@github.com>2020-09-29 20:18:46 -0400
commit82968a7381dc9e851487175174ea19750f060beb (patch)
tree6e60b15191080441f89f80ff5b2417fce6f94925 /src/code
parenta506801cd73d0aa6a071d61ab95f0c427e458000 (diff)
All Effect Overlays and z_effect_soft_sprite_old_init.c OK (#396)
* fix colliderinit typo * dead sound done * deadsound documentation * blast done * progress * spk init * progress * spark done * ss bomb ok * bomb done * cleanup * progress * progress * almost done with bomb2 * clean up gossip stone * more * cleanup and format * remove unused asm file * nonmatching reloc * done i think * mistakes * fix headers * idk how that got in here * EffectSsStick OK * progress * fix conflicting name * progress * splash OK * uname fields * progress * lightning OK * remove unwanted files * kirakira ok * kirakira done * magma OK * remove files * ss_g_fire OK * name funcs * progress * progress * magma2 and kakera OK * eff_ss_dead_dd OK * fcircle OK * stone1 OK * sibuki2 OK * dt_bubble OK * deaddb OK * sibuki OK * dead_ds OK * ice_smoke OK * hitmark OK * hahen OK * k_fire OK * en_fire OK * starting colors * color changes 1 * color switch done * init file data migrated * data cleanup * ice_piece OK * en_ice OK * progress * progress * docs progress * fix blast color names * documentation pass 1 * progress * cleanup pass 2 * touchups * added to functions.h * small changes * fix functions.h * renaming progress * name progress * color enum * more cleanups * enice changes * final cleanups * remove unwanted file * lightning -> shock * pr suggestions * fix comment * remove unwanted comments
Diffstat (limited to 'src/code')
-rw-r--r--src/code/PreRender.c32
-rw-r--r--src/code/sys_math3d.c8
-rw-r--r--src/code/z_actor.c21
-rw-r--r--src/code/z_collision_check.c18
-rw-r--r--src/code/z_eff_shield_particle.c6
-rw-r--r--src/code/z_effect_soft_sprite.c8
-rw-r--r--src/code/z_effect_soft_sprite_old_init.c945
-rw-r--r--src/code/z_en_item00.c14
-rw-r--r--src/code/z_fbdemo_fade.c2
-rw-r--r--src/code/z_lights.c6
-rw-r--r--src/code/z_play.c5
-rw-r--r--src/code/z_player_lib.c12
12 files changed, 874 insertions, 203 deletions
diff --git a/src/code/PreRender.c b/src/code/PreRender.c
index bc577353d..c0d0eb923 100644
--- a/src/code/PreRender.c
+++ b/src/code/PreRender.c
@@ -70,11 +70,11 @@ void func_800C0F28(PreRenderContext* this, Gfx** gfxp, void* buf, void* bufSave)
lrt = (ult + add) - 1;
if (1) {}
- gDPLoadTextureTile(gfx++, buf, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width, this->height, uls, ult, lrs, lrt,
- 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
- G_TX_NOLOD, G_TX_NOLOD);
- gSPTextureRectangle(gfx++, uls << 2, ult << 2, lrs << 2, lrt << 2, G_TX_RENDERTILE, uls << 5, ult << 5,
- 4 << 10, 1 << 10);
+ gDPLoadTextureTile(gfx++, buf, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width, this->height, uls, ult, lrs, lrt, 0,
+ G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
+ G_TX_NOLOD);
+ gSPTextureRectangle(gfx++, uls << 2, ult << 2, lrs << 2, lrt << 2, G_TX_RENDERTILE, uls << 5, ult << 5, 4 << 10,
+ 1 << 10);
x -= add;
x2 += add;
@@ -125,8 +125,8 @@ void func_800C1258(PreRenderContext* this, Gfx** gfxp) {
gDPLoadTextureTile(gfx++, this->fbufSave, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->widthSave, this->height - 1,
this->ulxSave, ult, this->lrxSave, lrt, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
- gSPTextureRectangle(gfx++, this->ulx << 2, uly << 2, this->lrx << 2, (uly + add - 1) << 2,
- G_TX_RENDERTILE, this->ulxSave << 5, ult << 5, 4 << 10, 1 << 10);
+ gSPTextureRectangle(gfx++, this->ulx << 2, uly << 2, this->lrx << 2, (uly + add - 1) << 2, G_TX_RENDERTILE,
+ this->ulxSave << 5, ult << 5, 4 << 10, 1 << 10);
y -= add;
y2 += add;
@@ -180,9 +180,9 @@ void func_800C170C(PreRenderContext* this, Gfx** gfxp, void* fbuf, void* fbufSav
ult = x2;
lrt = (x2 + add - 1);
- gDPLoadTextureTile(gfx++, fbuf, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width, this->height, uls, ult, lrs,
- lrt, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
- G_TX_NOLOD, G_TX_NOLOD);
+ gDPLoadTextureTile(gfx++, fbuf, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width, this->height, uls, ult, lrs, lrt, 0,
+ G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
+ G_TX_NOLOD);
if (1) {}
gSPTextureRectangle(gfx++, uls << 2, ult << 2, (lrs + 1) << 2, (lrt + 1) << 2, G_TX_RENDERTILE, uls << 5,
ult << 5, 1 << 10, 1 << 10);
@@ -237,9 +237,9 @@ void func_800C1B24(PreRenderContext* this, Gfx** gfxp, void* fbuf, void* cvgSave
ult = x2;
lrt = (x2 + add) - 1;
- gDPLoadTextureTile(gfx++, fbuf, G_IM_FMT_IA, G_IM_SIZ_16b, this->width, this->height, uls, ult, lrs, lrt,
- 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
- G_TX_NOLOD, G_TX_NOLOD);
+ gDPLoadTextureTile(gfx++, fbuf, G_IM_FMT_IA, G_IM_SIZ_16b, this->width, this->height, uls, ult, lrs, lrt, 0,
+ G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
+ G_TX_NOLOD);
if (1) {}
gSPTextureRectangle(gfx++, uls << 2, ult << 2, (lrs + 1) << 2, (lrt + 1) << 2, G_TX_RENDERTILE, uls << 5,
ult << 5, 1 << 10, 1 << 10);
@@ -356,9 +356,9 @@ void func_800C213C(PreRenderContext* this, Gfx** gfxp) {
gDPLoadMultiTile(gfx++, this->fbufSave, 0x0000, G_TX_RENDERTILE, G_IM_FMT_RGBA, G_IM_SIZ_16b, this->width,
this->height, uls, ult, lrx, lry, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
- gDPLoadMultiTile(gfx++, this->cvgSave, 0x0160, 1, G_IM_FMT_I, G_IM_SIZ_8b, this->width, this->height, uls,
- ult, lrx, lry, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
- G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
+ gDPLoadMultiTile(gfx++, this->cvgSave, 0x0160, 1, G_IM_FMT_I, G_IM_SIZ_8b, this->width, this->height, uls, ult,
+ lrx, lry, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
+ G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gfx++, uls << 2, ult << 2, (lrx + 1) << 2, (lry + 1) << 2, G_TX_RENDERTILE, uls << 5,
ult << 5, 1 << 10, 1 << 10);
diff --git a/src/code/sys_math3d.c b/src/code/sys_math3d.c
index 296135b84..141b27fd4 100644
--- a/src/code/sys_math3d.c
+++ b/src/code/sys_math3d.c
@@ -212,7 +212,7 @@ s32 Math3D_PlaneVsPlaneVsLineClosestPoint(f32 planeAA, f32 planeAB, f32 planeAC,
* Finds a point on the line from starting point `v0`, and directional vector `dir`
* which is `dist` length from the starting point. Result is placed in `ret`
*/
-void Math3D_PointOnInfinteLine(Vec3f* v0, Vec3f* dir, f32 dist, Vec3f* ret) {
+void Math3D_PointOnInfiniteLine(Vec3f* v0, Vec3f* dir, f32 dist, Vec3f* ret) {
ret->x = (dir->x * dist) + v0->x;
ret->y = (dir->y * dist) + v0->y;
ret->z = (dir->z * dist) + v0->z;
@@ -226,7 +226,7 @@ void Math3D_LineSplitRatio(Vec3f* v0, Vec3f* v1, f32 ratio, Vec3f* ret) {
Vec3f diff;
Math_Vec3f_Diff(v1, v0, &diff);
- Math3D_PointOnInfinteLine(v0, &diff, ratio, ret);
+ Math3D_PointOnInfiniteLine(v0, &diff, ratio, ret);
}
/**
@@ -1922,8 +1922,8 @@ s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect) {
}
radiusTodistFromCylYIntersectTov0v1 = cyl->radius / distFromCylYIntersectTov0v1;
- Math3D_PointOnInfinteLine(&cylIntersectCenter, &diffMidpointIntersect, radiusTodistFromCylYIntersectTov0v1,
- intersect);
+ Math3D_PointOnInfiniteLine(&cylIntersectCenter, &diffMidpointIntersect, radiusTodistFromCylYIntersectTov0v1,
+ intersect);
return true;
}
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index 3db868799..118f226d8 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -1210,7 +1210,7 @@ void func_8002E4B4(GlobalContext* globalCtx, Actor* actor, f32 arg2, f32 arg3, f
f32 sp58;
UNK_TYPE sp54;
f32 sp50;
- Vec3f sp44;
+ Vec3f ripplePos;
sp74 = actor->posRot.pos.y - actor->pos4.y;
@@ -1258,12 +1258,12 @@ void func_8002E4B4(GlobalContext* globalCtx, Actor* actor, f32 arg2, f32 arg3, f
if (!(actor->bgCheckFlags & 0x20)) {
actor->bgCheckFlags |= 0x40;
if (!(arg5 & 0x40)) {
- sp44.x = actor->posRot.pos.x;
- sp44.y = sp50;
- sp44.z = actor->posRot.pos.z;
- func_80029444(globalCtx, &sp44, 100, 500, 0);
- func_80029444(globalCtx, &sp44, 100, 500, 4);
- func_80029444(globalCtx, &sp44, 100, 500, 8);
+ ripplePos.x = actor->posRot.pos.x;
+ ripplePos.y = sp50;
+ ripplePos.z = actor->posRot.pos.z;
+ EffectSsGRipple_Spawn(globalCtx, &ripplePos, 100, 500, 0);
+ EffectSsGRipple_Spawn(globalCtx, &ripplePos, 100, 500, 4);
+ EffectSsGRipple_Spawn(globalCtx, &ripplePos, 100, 500, 8);
}
}
actor->bgCheckFlags |= 0x20;
@@ -1850,7 +1850,8 @@ void func_8002FBAC(GlobalContext* globalCtx) {
spA4.y = Math_Rand_ZeroOne() * 6.0f + gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y + 80.0f;
spA4.z = Math_Rand_CenteredFloat(6.0f) + gSaveContext.respawn[RESPAWN_MODE_TOP].pos.z;
- func_80028BB0(globalCtx, &spA4, &D_80116048, &D_80116054, &D_80116060, &D_80116064, 1000, 0x10);
+ EffectSsKiraKira_SpawnDispersed(globalCtx, &spA4, &D_80116048, &D_80116054, &D_80116060, &D_80116064, 1000,
+ 16);
if (D_8015BC18 == 0.0f) {
gSaveContext.respawn[RESPAWN_MODE_TOP] = gSaveContext.respawn[RESPAWN_MODE_DOWN];
@@ -2184,8 +2185,8 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) {
gSPSegment(oGfxCtx->polyXlu.p++, 0x06, globalCtx->objectCtx.status[actor->objBankIndex].segment);
if (actor->dmgEffectTimer != 0) {
- // Must be inline data to match
Color_RGBA8 sp2C = { 0, 0, 0, 255 };
+
if (actor->dmgEffectParams & 0x8000) {
sp2C.r = sp2C.g = sp2C.b = ((actor->dmgEffectParams & 0x1F00) >> 5) | 7;
} else if (actor->dmgEffectParams & 0x4000) {
@@ -3966,7 +3967,7 @@ void func_8003555C(GlobalContext* globalCtx, Vec3f* arg1, Vec3f* arg2, Vec3f* ar
color2.g = 90;
color2.b = 50;
- func_80028B74(globalCtx, arg1, arg2, arg3, &color1, &color2);
+ EffectSsKiraKira_SpawnSmall(globalCtx, arg1, arg2, arg3, &color1, &color2);
}
Vec3f D_80116268 = { 0.0f, -1.5f, 0.0f };
diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c
index 2b5b1cced..36aeadf5f 100644
--- a/src/code/z_collision_check.c
+++ b/src/code/z_collision_check.c
@@ -1327,9 +1327,9 @@ void func_8005E10C(GlobalContext* globalCtx, Collider* collider, Vec3f* v) {
Effect_Add(globalCtx, &sp24, EFFECT_SPARK, 0, 1, &D_8015DD68);
}
-void func_8005E26C(GlobalContext* globalCtx, Collider* collider, Vec3f* v) {
- func_800299AC(globalCtx, v);
- func_80062B80(globalCtx, v);
+void func_8005E26C(GlobalContext* globalCtx, Collider* collider, Vec3f* pos) {
+ EffectSsSibuki_SpawnBurst(globalCtx, pos);
+ func_80062B80(globalCtx, pos);
}
void func_8005E2A4(GlobalContext* globalCtx, Collider* collider, Vec3f* v) {
@@ -1345,7 +1345,7 @@ void func_8005E2EC(GlobalContext* globalCtx, ColliderBody* colliderBody, Collide
flags = colliderBody->toucherFlags & 0x18;
if (flags == 0 && collider->type != COLTYPE_METAL_SHIELD) {
- func_80029CA4(globalCtx, 0, arg3);
+ EffectSsHitMark_SpawnFixedScale(globalCtx, 0, arg3);
if (collider->actor == NULL) {
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
return;
@@ -1355,7 +1355,7 @@ void func_8005E2EC(GlobalContext* globalCtx, ColliderBody* colliderBody, Collide
return;
}
if (flags == 0) {
- func_80029CA4(globalCtx, 3, arg3);
+ EffectSsHitMark_SpawnFixedScale(globalCtx, 3, arg3);
if (collider->actor == NULL) {
func_80062D60(globalCtx, arg3);
return;
@@ -1364,7 +1364,7 @@ void func_8005E2EC(GlobalContext* globalCtx, ColliderBody* colliderBody, Collide
return;
}
if (flags == 8) {
- func_80029CA4(globalCtx, 0, arg3);
+ EffectSsHitMark_SpawnFixedScale(globalCtx, 0, arg3);
if (collider->actor == NULL) {
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
return;
@@ -1374,7 +1374,7 @@ void func_8005E2EC(GlobalContext* globalCtx, ColliderBody* colliderBody, Collide
return;
}
if (flags == 0x10) {
- func_80029CA4(globalCtx, 1, arg3);
+ EffectSsHitMark_SpawnFixedScale(globalCtx, 1, arg3);
if (collider->actor == NULL) {
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
return;
@@ -1443,13 +1443,13 @@ void func_8005E604(GlobalContext* globalCtx, Collider* left, ColliderBody* leftB
func_80062E14(globalCtx, arg5, &left->actor->projectedPos);
}
} else if (D_8011DF40[right->type].unk01 != 5) {
- func_80029CA4(globalCtx, D_8011DF40[right->type].unk01, arg5);
+ EffectSsHitMark_SpawnFixedScale(globalCtx, D_8011DF40[right->type].unk01, arg5);
if ((rightBody->bumperFlags & 0x20) == 0) {
func_8005E4F8(left, rightBody);
}
}
} else {
- func_80029CA4(globalCtx, 0, arg5);
+ EffectSsHitMark_SpawnFixedScale(globalCtx, 0, arg5);
if (right->actor == NULL) {
Audio_PlaySoundGeneral(NA_SE_IT_SHIELD_BOUND, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
} else {
diff --git a/src/code/z_eff_shield_particle.c b/src/code/z_eff_shield_particle.c
index 42e3cde6c..2d6763da1 100644
--- a/src/code/z_eff_shield_particle.c
+++ b/src/code/z_eff_shield_particle.c
@@ -113,7 +113,7 @@ s32 EffectShieldParticle_Update(void* thisx) {
return 0;
}
-void EffectShieldParticle_GetColors(EffectShieldParticle* this, Color_RGBA8_n* primColor, Color_RGBA8_n* envColor) {
+void EffectShieldParticle_GetColors(EffectShieldParticle* this, Color_RGBA8* primColor, Color_RGBA8* envColor) {
s32 halfDuration;
f32 ratio;
@@ -153,8 +153,8 @@ void EffectShieldParticle_GetColors(EffectShieldParticle* this, Color_RGBA8_n* p
void EffectShieldParticle_Draw(void* thisx, GraphicsContext* gfxCtx) {
EffectShieldParticle* this = (EffectShieldParticle*)thisx;
EffectShieldParticleElement* elem;
- Color_RGBA8_n primColor;
- Color_RGBA8_n envColor;
+ Color_RGBA8 primColor;
+ Color_RGBA8 envColor;
OPEN_DISPS(gfxCtx, "../z_eff_shield_particle.c", 272);
diff --git a/src/code/z_effect_soft_sprite.c b/src/code/z_effect_soft_sprite.c
index 6f9a16f89..4fa2abb88 100644
--- a/src/code/z_effect_soft_sprite.c
+++ b/src/code/z_effect_soft_sprite.c
@@ -69,7 +69,7 @@ void EffectSs_Delete(EffectSs* effectSs) {
}
if (effectSs->flags & 4) {
- func_800F89E8(&effectSs->unk_2C);
+ func_800F89E8(&effectSs->vec);
}
EffectSs_Reset(effectSs);
@@ -81,15 +81,15 @@ void EffectSs_Reset(EffectSs* effectSs) {
effectSs->type = EFFECT_SS_TYPE_MAX;
effectSs->accel.x = effectSs->accel.y = effectSs->accel.z = 0;
effectSs->velocity.x = effectSs->velocity.y = effectSs->velocity.z = 0;
- effectSs->unk_2C.x = effectSs->unk_2C.y = effectSs->unk_2C.z = 0;
+ effectSs->vec.x = effectSs->vec.y = effectSs->vec.z = 0;
effectSs->pos.x = effectSs->pos.y = effectSs->pos.z = 0;
effectSs->life = -1;
effectSs->flags = 0;
effectSs->priority = 128;
effectSs->draw = NULL;
effectSs->update = NULL;
- effectSs->displayList = NULL;
- effectSs->unk_3C = NULL;
+ effectSs->gfx = NULL;
+ effectSs->actor = NULL;
for (i = 0; i < ARRAY_COUNT(effectSs->regs); i++) {
effectSs->regs[i] = 0;
diff --git a/src/code/z_effect_soft_sprite_old_init.c b/src/code/z_effect_soft_sprite_old_init.c
index 86855420d..4fd31db0f 100644
--- a/src/code/z_effect_soft_sprite_old_init.c
+++ b/src/code/z_effect_soft_sprite_old_init.c
@@ -1,38 +1,89 @@
#include <ultra64.h>
#include <global.h>
#include "overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.h"
+#include "overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.h"
#include "overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.h"
#include "overlays/effects/ovl_Effect_Ss_Bomb2/z_eff_ss_bomb2.h"
#include "overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.h"
-#include "overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.h"
#include "overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.h"
-#include "overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.h"
+#include "overlays/effects/ovl_Effect_Ss_D_Fire/z_eff_ss_d_fire.h"
+#include "overlays/effects/ovl_Effect_Ss_Bubble/z_eff_ss_bubble.h"
+#include "overlays/effects/ovl_Effect_Ss_G_Ripple/z_eff_ss_g_ripple.h"
+#include "overlays/effects/ovl_Effect_Ss_G_Splash/z_eff_ss_g_splash.h"
+#include "overlays/effects/ovl_Effect_Ss_G_Magma/z_eff_ss_g_magma.h"
+#include "overlays/effects/ovl_Effect_Ss_G_Fire/z_eff_ss_g_fire.h"
+#include "overlays/effects/ovl_Effect_Ss_Lightning/z_eff_ss_lightning.h"
+#include "overlays/effects/ovl_Effect_Ss_Dt_Bubble/z_eff_ss_dt_bubble.h"
+#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
+#include "overlays/effects/ovl_Effect_Ss_Stick/z_eff_ss_stick.h"
+#include "overlays/effects/ovl_Effect_Ss_Sibuki/z_eff_ss_sibuki.h"
+#include "overlays/effects/ovl_Effect_Ss_Sibuki2/z_eff_ss_sibuki2.h"
+#include "overlays/effects/ovl_Effect_Ss_G_Magma2/z_eff_ss_g_magma2.h"
+#include "overlays/effects/ovl_Effect_Ss_Stone1/z_eff_ss_stone1.h"
+#include "overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h"
#include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h"
+#include "overlays/effects/ovl_Effect_Ss_K_Fire/z_eff_ss_k_fire.h"
+#include "overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.h"
+#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
+#include "overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.h"
+#include "overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.h"
+#include "overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.h"
+#include "overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.h"
+#include "overlays/effects/ovl_Effect_Ss_Extra/z_eff_ss_extra.h"
+#include "overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.h"
+#include "overlays/effects/ovl_Effect_Ss_Dead_Db/z_eff_ss_dead_db.h"
+#include "overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.h"
+#include "overlays/effects/ovl_Effect_Ss_Dead_Ds/z_eff_ss_dead_ds.h"
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
+#include "overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.h"
+
+static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f };
+
+// effects that use this draw function are responsible for making sure their regs line up with the usage here
+
+void EffectSs_DrawGEffect(GlobalContext* globalCtx, EffectSs* this, void* texture) {
+ GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
+ f32 scale;
+ MtxF mfTrans;
+ MtxF mfScale;
+ MtxF mfResult;
+ MtxF mfTrans11DA0;
+ s32 pad1;
+ Mtx* mtx;
+ void* object;
+
+ object = globalCtx->objectCtx.status[this->rgObjBankIdx].segment;
+
+ OPEN_DISPS(gfxCtx, "../z_effect_soft_sprite_old_init.c", 196);
+
+ scale = this->rgScale * 0.0025f;
+ SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z);
+ SkinMatrix_SetScale(&mfScale, scale, scale, scale);
+ SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->mf_11DA0, &mfTrans11DA0);
+ SkinMatrix_MtxFMtxFMult(&mfTrans11DA0, &mfScale, &mfResult);
+ gSegments[6] = VIRTUAL_TO_PHYSICAL(object);
+ gSPSegment(oGfxCtx->polyXlu.p++, 0x06, object);
+
+ mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);
+
+ if (mtx != NULL) {
+ gSPMatrix(oGfxCtx->polyXlu.p++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(texture));
+ func_80094C50(gfxCtx);
+ gDPSetPrimColor(oGfxCtx->polyXlu.p++, 0, 0, this->rgPrimColorR, this->rgPrimColorG, this->rgPrimColorB,
+ this->rgPrimColorA);
+ gDPSetEnvColor(oGfxCtx->polyXlu.p++, this->rgEnvColorR, this->rgEnvColorG, this->rgEnvColorB,
+ this->rgEnvColorA);
+ gSPDisplayList(oGfxCtx->polyXlu.p++, this->gfx);
+ }
-extern Color_RGBA8 D_801158DC;
-extern Color_RGBA8 D_801158E0;
-extern Color_RGBA8 D_801158E4;
-extern Color_RGBA8 D_801158E8;
-extern Color_RGBA8 D_801158EC;
-extern Color_RGBA8 D_801158F0;
-extern Color_RGBA8 D_801158F4;
-extern Color_RGBA8 D_801158F8;
-
-// sEmptyVec
-extern Vec3f D_801158C0; // empty vector that seems to be used as a dummy when a specific field isnt needed
-
-extern Color_RGBA8_n D_801158CC;
-extern Color_RGBA8_n D_801158D0;
-
-// Draw utility for some G effects
-
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80027F80.s")
+ CLOSE_DISPS(gfxCtx, "../z_effect_soft_sprite_old_init.c", 243);
+}
// EffectSsDust Spawn Functions
void EffectSsDust_Spawn(GlobalContext* globalCtx, u16 drawFlags, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
- Color_RGBA8_n* primColor, Color_RGBA8_n* envColor, s16 scale, s16 scaleStep, s16 life,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life,
u8 updateMode) {
EffectSsDustInitParams initParams;
@@ -46,81 +97,86 @@ void EffectSsDust_Spawn(GlobalContext* globalCtx, u16 drawFlags, Vec3f* pos, Vec
initParams.scaleStep = scaleStep;
initParams.life = life;
initParams.updateMode = updateMode;
+
EffectSs_Spawn(globalCtx, EFFECT_SS_DUST, 128, &initParams);
}
-void func_8002829C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8_n* primColor,
- Color_RGBA8_n* envColor, s16 scale, s16 scaleStep) {
+void func_8002829C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor, s16 scale, s16 scaleStep) {
EffectSsDust_Spawn(globalCtx, 0, pos, velocity, accel, primColor, envColor, scale, scaleStep, 10, 0);
}
-void func_80028304(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8_n* primColor,
- Color_RGBA8_n* envColor, s16 scale, s16 scaleStep) {
+void func_80028304(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor, s16 scale, s16 scaleStep) {
EffectSsDust_Spawn(globalCtx, 1, pos, velocity, accel, primColor, envColor, scale, scaleStep, 10, 0);
}
-void func_8002836C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8_n* primColor,
- Color_RGBA8_n* envColor, s16 scale, s16 scaleStep, s16 life) {
+void func_8002836C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life) {
EffectSsDust_Spawn(globalCtx, 0, pos, velocity, accel, primColor, envColor, scale, scaleStep, life, 0);
}
-void func_800283D4(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8_n* primColor,
- Color_RGBA8_n* envColor, s16 scale, s16 scaleStep, s16 life) {
+void func_800283D4(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life) {
EffectSsDust_Spawn(globalCtx, 1, pos, velocity, accel, primColor, envColor, scale, scaleStep, life, 0);
}
-void func_8002843C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8_n* primColor,
- Color_RGBA8_n* envColor, s16 scale, s16 scaleStep, s16 life) {
+void func_8002843C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life) {
EffectSsDust_Spawn(globalCtx, 2, pos, velocity, accel, primColor, envColor, scale, scaleStep, life, 0);
}
// unused
-void func_800284A4(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8_n* primColor,
- Color_RGBA8_n* envColor, s16 scale, s16 scaleStep) {
+void func_800284A4(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor, s16 scale, s16 scaleStep) {
EffectSsDust_Spawn(globalCtx, 0, pos, velocity, accel, primColor, envColor, scale, scaleStep, 10, 1);
}
// unused
-void func_80028510(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8_n* primColor,
- Color_RGBA8_n* envColor, s16 scale, s16 scaleStep) {
+void func_80028510(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor, s16 scale, s16 scaleStep) {
EffectSsDust_Spawn(globalCtx, 1, pos, velocity, accel, primColor, envColor, scale, scaleStep, 10, 1);
}
+static Color_RGBA8 sDustBrownPrim = { 170, 130, 90, 255 };
+static Color_RGBA8 sDustBrownEnv = { 100, 60, 20, 255 };
+
void func_8002857C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
- EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &D_801158CC, &D_801158D0, 100, 5, 10, 0);
+ EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, 100, 5, 10, 0);
}
// unused
void func_800285EC(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
- EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &D_801158CC, &D_801158D0, 100, 5, 10, 0);
+ EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, 100, 5, 10, 0);
}
void func_8002865C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep) {
- EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &D_801158CC, &D_801158D0, scale, scaleStep, 10, 0);
+ EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, scale, scaleStep, 10, 0);
}
void func_800286CC(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep) {
- EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &D_801158CC, &D_801158D0, scale, scaleStep, 10, 0);
+ EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, scale, scaleStep, 10, 0);
}
void func_8002873C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 life) {
- EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &D_801158CC, &D_801158D0, scale, scaleStep, life, 0);
+ EffectSsDust_Spawn(globalCtx, 4, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, scale, scaleStep, life, 0);
}
void func_800287AC(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
s16 life) {
- EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &D_801158CC, &D_801158D0, scale, scaleStep, life, 0);
+ EffectSsDust_Spawn(globalCtx, 5, pos, velocity, accel, &sDustBrownPrim, &sDustBrownEnv, scale, scaleStep, life, 0);
}
-void func_8002881C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8_n* primColor,
- Color_RGBA8_n* envColor) {
+// unused
+void func_8002881C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor) {
func_8002829C(globalCtx, pos, velocity, accel, primColor, envColor, 100, 5);
}
// unused
-void func_80028858(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8_n* primColor,
- Color_RGBA8_n* envColor) {
+void func_80028858(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor) {
func_80028304(globalCtx, pos, velocity, accel, primColor, envColor, 100, 5);
}
@@ -171,26 +227,73 @@ void func_80028A54(GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos) {
// EffectSsKiraKira Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80028B18.s")
+void EffectSsKiraKira_SpawnSmallYellow(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
+ Color_RGBA8 primColor = { 255, 255, 200, 255 };
+ Color_RGBA8 envColor = { 255, 200, 0, 0 };
+
+ EffectSsKiraKira_SpawnDispersed(globalCtx, pos, velocity, accel, &primColor, &envColor, 1000, 16);
+}
+
+void EffectSsKiraKira_SpawnSmall(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor) {
+ EffectSsKiraKira_SpawnDispersed(globalCtx, pos, velocity, accel, primColor, envColor, 1000, 16);
+}
+
+void EffectSsKiraKira_SpawnDispersed(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life) {
+ EffectSsKiraKiraInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ initParams.velocity.y = ((Math_Rand_ZeroOne() * initParams.velocity.y) + initParams.velocity.y) * 0.5f;
+ Math_Vec3f_Copy(&initParams.accel, accel);
+ initParams.accel.y = ((Math_Rand_ZeroOne() * initParams.accel.y) + initParams.accel.y) * 0.5f;
+ initParams.life = life;
+ initParams.updateMode = 0;
+ initParams.rotSpeed = 0x1518;
+ initParams.yaw = Math_Rand_ZeroOne() * 16384.0f;
+ initParams.scale = scale;
+ initParams.primColor = *primColor;
+ initParams.envColor = *envColor;
+ initParams.alphaStep = (-(255.0f / initParams.life)) + (-(255.0f / initParams.life));
+
+ EffectSs_Spawn(globalCtx, 1, 128, &initParams);
+}
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80028B74.s")
+void EffectSsKiraKira_SpawnFocused(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life) {
+ EffectSsKiraKiraInitParams initParams;
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80028BB0.s")
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ Math_Vec3f_Copy(&initParams.accel, accel);
+ initParams.life = life;
+ initParams.updateMode = 1;
+ initParams.rotSpeed = 0x1518;
+ initParams.yaw = Math_Rand_ZeroOne() * 16384.0f;
+ initParams.scale = scale;
+ Color_RGBA8_Copy(&initParams.primColor, primColor);
+ Color_RGBA8_Copy(&initParams.envColor, envColor);
+ initParams.alphaStep = (-(255.0f / initParams.life)) + (-(255.0f / initParams.life));
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80028CEC.s")
+ EffectSs_Spawn(globalCtx, 1, 128, &initParams);
+}
// EffectSsBomb Spawn Functions
+// unused
void EffectSsBomb_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
EffectSsBombInitParams initParams;
Math_Vec3f_Copy(&initParams.pos, pos);
Math_Vec3f_Copy(&initParams.velocity, velocity);
Math_Vec3f_Copy(&initParams.accel, accel);
+
EffectSs_Spawn(globalCtx, EFFECT_SS_BOMB, 128, &initParams);
}
// EffectSsBomb2 Spawn Functions
+
// unused
void EffectSsBomb2_SpawnFade(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
EffectSsBomb2InitParams initParams;
@@ -201,6 +304,7 @@ void EffectSsBomb2_SpawnFade(GlobalContext* globalCtx, Vec3f* pos, Vec3f* veloci
initParams.scale = 100;
initParams.scaleStep = 0;
initParams.drawMode = 0;
+
EffectSs_Spawn(globalCtx, EFFECT_SS_BOMB2, 10, &initParams);
}
@@ -214,219 +318,487 @@ void EffectSsBomb2_SpawnLayered(GlobalContext* globalCtx, Vec3f* pos, Vec3f* vel
initParams.scale = scale;
initParams.scaleStep = scaleStep;
initParams.drawMode = 1;
+
EffectSs_Spawn(globalCtx, EFFECT_SS_BOMB2, 10, &initParams);
}
// EffectSsBlast Spawn Functions
-void EffectSsBlast_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* envColor,
- Color_RGBA8* primColor, s16 radius, s16 radiusStep, s16 radiusStepDecr, s16 life) {
+void EffectSsBlast_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
+ Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 sclaeStepDecay, s16 life) {
EffectSsBlastParams initParams;
Math_Vec3f_Copy(&initParams.pos, pos);
Math_Vec3f_Copy(&initParams.velocity, velocity);
Math_Vec3f_Copy(&initParams.accel, accel);
- Color_RGBA8_Copy(&initParams.envColor, envColor);
Color_RGBA8_Copy(&initParams.primColor, primColor);
- initParams.radius = radius;
- initParams.radiusStep = radiusStep;
- initParams.radiusStepDecr = radiusStepDecr;
+ Color_RGBA8_Copy(&initParams.envColor, envColor);
+ initParams.scale = scale;
+ initParams.scaleStep = scaleStep;
+ initParams.sclaeStepDecay = sclaeStepDecay;
initParams.life = life;
+
EffectSs_Spawn(globalCtx, EFFECT_SS_BLAST, 128, &initParams);
}
-void func_80028F84(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 radius, s16 radiusStep,
- s16 life) {
- EffectSsBlast_Spawn(globalCtx, pos, velocity, accel, &D_801158DC, &D_801158E0, radius, radiusStep, 35, life);
+void EffectSsBlast_SpawnWhiteCustomScale(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
+ s16 scaleStep, s16 life) {
+ static Color_RGBA8 primColor = { 255, 255, 255, 255 };
+ static Color_RGBA8 envColor = { 200, 200, 200, 0 };
+
+ EffectSsBlast_Spawn(globalCtx, pos, velocity, accel, &primColor, &envColor, scale, scaleStep, 35, life);
}
-void func_80028FD8(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* envColor,
- Color_RGBA8* primColor, s16 life) {
- EffectSsBlast_Spawn(globalCtx, pos, velocity, accel, envColor, primColor, 100, 375, 35, life);
+void EffectSsBlast_SpawnShockwave(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s16 life) {
+ EffectSsBlast_Spawn(globalCtx, pos, velocity, accel, primColor, envColor, 100, 375, 35, life);
}
-void func_80029024(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
- func_80028FD8(globalCtx, pos, velocity, accel, &D_801158E4, &D_801158E8, 10);
+void EffectSsBlast_SpawnWhiteShockwave(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
+ static Color_RGBA8 primColor = { 255, 255, 255, 255 };
+ static Color_RGBA8 envColor = { 200, 200, 200, 0 };
+
+ EffectSsBlast_SpawnShockwave(globalCtx, pos, velocity, accel, &primColor, &envColor, 10);
}
// EffectSsGSpk Spawn Functions
-void func_80029060(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
- Color_RGBA8* envColor, Color_RGBA8* primColor, s16 scale, s16 scaleStep) {
+void EffectSsGSpk_SpawnAccel(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep) {
EffectSsGSpkInitParams initParams;
Math_Vec3f_Copy(&initParams.pos, pos);
Math_Vec3f_Copy(&initParams.velocity, velocity);
Math_Vec3f_Copy(&initParams.accel, accel);
- Color_RGBA8_Copy(&initParams.primColor, envColor);
- Color_RGBA8_Copy(&initParams.envColor, primColor);
+ Color_RGBA8_Copy(&initParams.primColor, primColor);
+ Color_RGBA8_Copy(&initParams.envColor, envColor);
initParams.actor = actor;
initParams.scale = scale;
initParams.scaleStep = scaleStep;
initParams.updateMode = 0;
+
EffectSs_Spawn(globalCtx, EFFECT_SS_G_SPK, 128, &initParams);
}
// unused
-void func_800290F0(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
- Color_RGBA8* envColor, Color_RGBA8* primColor, s16 scale, s16 scaleStep) {
+void EffectSsGSpk_SpawnNoAccel(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep) {
EffectSsGSpkInitParams initParams;
Math_Vec3f_Copy(&initParams.pos, pos);
Math_Vec3f_Copy(&initParams.velocity, velocity);
Math_Vec3f_Copy(&initParams.accel, accel);
- Color_RGBA8_Copy(&initParams.primColor, envColor);
- Color_RGBA8_Copy(&initParams.envColor, primColor);
+ Color_RGBA8_Copy(&initParams.primColor, primColor);
+ Color_RGBA8_Copy(&initParams.envColor, envColor);
initParams.actor = actor;
initParams.scale = scale;
initParams.scaleStep = scaleStep;
initParams.updateMode = 1;
+
EffectSs_Spawn(globalCtx, EFFECT_SS_G_SPK, 128, &initParams);
}
-void func_80029184(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
- Color_RGBA8 envColor = D_801158EC; // probably inline when data is migrated
- Color_RGBA8 primColor = D_801158F0; // probably inline when data is migrated
+void EffectSsGSpk_SpawnFuse(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
+ Color_RGBA8 primColor = { 255, 255, 150, 255 };
+ Color_RGBA8 envColor = { 255, 0, 0, 0 };
- func_800292DC(globalCtx, actor, pos, velocity, accel, &envColor, &primColor);
+ EffectSsGSpk_SpawnSmall(globalCtx, actor, pos, velocity, accel, &primColor, &envColor);
}
// unused
-void func_800291D8(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
- s16 scaleStep) {
- Color_RGBA8 envColor = D_801158F4; // probably inline when data is migrated
- Color_RGBA8 primColor = D_801158F8; // probably inline when data is migrated
+void EffectSsGSpk_SpawnRandColor(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ s16 scale, s16 scaleStep) {
+ Color_RGBA8 primColor = { 255, 255, 150, 255 };
+ Color_RGBA8 envColor = { 255, 0, 0, 0 };
s32 randOffset;
randOffset = (Math_Rand_ZeroOne() * 20.0f) - 10.0f;
- envColor.r += randOffset;
- envColor.g += randOffset;
- envColor.b += randOffset;
- envColor.a += randOffset;
primColor.r += randOffset;
primColor.g += randOffset;
primColor.b += randOffset;
primColor.a += randOffset;
+ envColor.r += randOffset;
+ envColor.g += randOffset;
+ envColor.b += randOffset;
+ envColor.a += randOffset;
- func_80029060(globalCtx, actor, pos, velocity, accel, &envColor, &primColor, scale, scaleStep);
+ EffectSsGSpk_SpawnAccel(globalCtx, actor, pos, velocity, accel, &primColor, &envColor, scale, scaleStep);
}
-void func_800292DC(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
- Color_RGBA8* envColor, Color_RGBA8* primColor) {
- func_80029060(globalCtx, actor, pos, velocity, accel, envColor, primColor, 100, 5);
+void EffectSsGSpk_SpawnSmall(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor) {
+ EffectSsGSpk_SpawnAccel(globalCtx, actor, pos, velocity, accel, primColor, envColor, 100, 5);
}
// EffectSsDFire Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029320.s")
+void EffectSsDFire_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
+ s16 alpha, s16 fadeDelay, s32 life) {
+ EffectSsDFireInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ Math_Vec3f_Copy(&initParams.accel, accel);
+ initParams.scale = scale;
+ initParams.scaleStep = scaleStep;
+ initParams.alpha = alpha;
+ initParams.fadeDelay = fadeDelay;
+ initParams.life = life;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_D_FIRE, 128, &initParams);
+}
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_800293A0.s")
+void EffectSsDFire_SpawnFixedScale(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 alpha,
+ s16 fadeDelay) {
+ EffectSsDFire_Spawn(globalCtx, pos, velocity, accel, 100, 35, alpha, fadeDelay, 8);
+}
// EffectSsBubble Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_800293E4.s")
+void EffectSsBubble_Spawn(GlobalContext* globalCtx, Vec3f* pos, f32 yPosOffset, f32 yPosRandScale, f32 xzPosRandScale,
+ f32 scale) {
+ EffectSsBubbleInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ initParams.yPosOffset = yPosOffset;
+ initParams.yPosRandScale = yPosRandScale;
+ initParams.xzPosRandScale = xzPosRandScale;
+ initParams.scale = scale;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_BUBBLE, 128, &initParams);
+}
// EffectSsGRipple Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029444.s")
+void EffectSsGRipple_Spawn(GlobalContext* globalCtx, Vec3f* pos, s16 radius, s16 radiusMax, s16 life) {
+ EffectSsGRippleInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ initParams.radius = radius;
+ initParams.radiusMax = radiusMax;
+ initParams.life = life;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_G_RIPPLE, 128, &initParams);
+}
// EffectSsGSplash Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002949C.s")
+void EffectSsGSplash_Spawn(GlobalContext* globalCtx, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor,
+ s16 type, s16 scale) {
+ EffectSsGSplashInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ initParams.type = type;
+ initParams.scale = scale;
+
+ if (primColor != NULL) {
+ initParams.primColor = *primColor;
+ initParams.envColor = *envColor;
+ initParams.customColor = true;
+ } else {
+ initParams.customColor = false;
+ }
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_G_SPLASH, 128, &initParams);
+}
// EffectSsGMagma Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029530.s")
+void EffectSsGMagma_Spawn(GlobalContext* globalCtx, Vec3f* pos) {
+ EffectSsGMagmaInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_G_MAGMA, 128, &initParams);
+}
// EffectSsGFire Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029568.s")
+void EffectSsGFire_Spawn(GlobalContext* globalCtx, Vec3f* pos) {
+ EffectSsGFireInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_G_FIRE, 128, &initParams);
+}
// EffectSsLightning Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_800295A0.s")
+void EffectSsLightning_Spawn(GlobalContext* globalCtx, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor,
+ s16 scale, s16 yaw, s16 life, s16 numBolts) {
+ EffectSsLightningInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Color_RGBA8_Copy(&initParams.primColor, primColor);
+ Color_RGBA8_Copy(&initParams.envColor, envColor);
+ initParams.scale = scale;
+ initParams.yaw = yaw;
+ initParams.life = life;
+ initParams.numBolts = numBolts;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_LIGHTNING, 128, &initParams);
+}
// EffectSsDtBubble Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029618.s")
+void EffectSsDtBubble_SpawnColorProfile(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
+ s16 life, s16 colorProfile, s16 randXZ) {
+ EffectSsDtBubbleInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ Math_Vec3f_Copy(&initParams.accel, accel);
+ initParams.customColor = false;
+ initParams.colorProfile = colorProfile;
+ initParams.scale = scale;
+ initParams.life = life;
+ initParams.randXZ = randXZ;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_DT_BUBBLE, 128, &initParams);
+}
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029694.s")
+void EffectSsDtBubble_SpawnCustomColor(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 life, s16 randXZ) {
+ EffectSsDtBubbleInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ Math_Vec3f_Copy(&initParams.accel, accel);
+ Color_RGBA8_Copy(&initParams.primColor, primColor);
+ Color_RGBA8_Copy(&initParams.envColor, envColor);
+ initParams.scale = scale;
+ initParams.life = life;
+ initParams.randXZ = randXZ;
+ initParams.customColor = true;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_DT_BUBBLE, 128, &initParams);
+}
// EffectSsHahen Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029724.s")
+/**
+ * Spawn a single fragment
+ *
+ * Notes:
+ * - if a display list is not provided, D_0400C0D0 (wilted deku fragment) will be used as default
+ * - the unused arg does not do anything, any value can be passed here
+ * - 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(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16 scale,
+ s16 objId, s16 life, Gfx* dList) {
+ EffectSsHahenInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ Math_Vec3f_Copy(&initParams.accel, accel);
+ initParams.dList = dList;
+ initParams.unused = unused;
+ initParams.scale = scale;
+ initParams.objId = objId;
+ initParams.life = life;
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_800297A4.s")
+ EffectSs_Spawn(globalCtx, EFFECT_SS_HAHEN, 128, &initParams);
+}
+
+/**
+ * Spawn a burst of fragments, with the amount of fragments specifed by count and burst speed set by <arg2>
+ *
+ * Notes:
+ * - if a display list is not provided, D_0400C0D0 (wilted deku fragment) will be used as default
+ * - the unused arg does not do anything, any value can be passed here
+ * - 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(GlobalContext* globalCtx, Vec3f* pos, f32 burstScale, s16 unused, s16 scale,
+ s16 randScaleRange, s16 count, s16 objId, s16 life, Gfx* dList) {
+ s32 i;
+ Vec3f velocity;
+ Vec3f accel;
+
+ accel.y = -0.07f * burstScale;
+ accel.x = accel.z = 0.0f;
+
+ for (i = 0; i < count; i++) {
+ velocity.x = (Math_Rand_ZeroOne() - 0.5f) * burstScale;
+ velocity.z = (Math_Rand_ZeroOne() - 0.5f) * burstScale;
+ velocity.y = ((Math_Rand_ZeroOne() * 0.5f) + 0.5f) * burstScale;
+
+ EffectSsHahen_Spawn(globalCtx, pos, &velocity, &accel, unused, Math_Rand_S16Offset(scale, randScaleRange),
+ objId, life, dList);
+ }
+}
// EffectSsStick Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_800298EC.s")
+/**
+ * As child, spawn a broken stick fragment
+ * As adult, spawn a broken sword fragment
+ */
+void EffectSsStick_Spawn(GlobalContext* globalCtx, Vec3f* pos, s16 yaw) {
+ EffectSsStickInitParams initParams;
+
+ initParams.pos = *pos;
+ initParams.yaw = yaw;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_STICK, 128, &initParams);
+}
// EffectSsSibuki Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002993C.s")
+void EffectSsSibuki_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 moveDelay,
+ s16 direction, s16 scale) {
+ EffectSsSibukiInitParams initParams;
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_800299AC.s")
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ Math_Vec3f_Copy(&initParams.accel, accel);
+ initParams.moveDelay = moveDelay;
+ initParams.direction = direction;
+ initParams.scale = scale;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_SIBUKI, 128, &initParams);
+}
+
+void EffectSsSibuki_SpawnBurst(GlobalContext* globalCtx, Vec3f* pos) {
+ s16 i;
+ Vec3f unusedZeroVec1 = { 0.0f, 0.0f, 0.0f };
+ Vec3f unusedZeroVec2 = { 0.0f, 0.0f, 0.0f };
+ Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
+ s16 randDirection = Math_Rand_ZeroOne() * 1.99f;
+
+ for (i = 0; i < KREG(19) + 30; i++) {
+ EffectSsSibuki_Spawn(globalCtx, pos, &zeroVec, &zeroVec, i / (KREG(27) + 6), randDirection, KREG(18) + 40);
+ }
+}
// EffectSsSibuki2 Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029B30.s")
+// unused
+void EffectSsSibuki2_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale) {
+ EffectSsSibuki2InitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ Math_Vec3f_Copy(&initParams.accel, accel);
+ initParams.scale = scale;
+ EffectSs_Spawn(globalCtx, EFFECT_SS_SIBUKI2, 128, &initParams);
+}
// EffectSsGMagma2 Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029B90.s")
+void EffectSsGMagma2_Spawn(GlobalContext* globalCtx, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor,
+ s16 updateRate, s16 drawMode, s16 scale) {
+ EffectSsGMagma2InitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Color_RGBA8_Copy(&initParams.primColor, primColor);
+ Color_RGBA8_Copy(&initParams.envColor, envColor);
+ initParams.updateRate = updateRate;
+ initParams.drawMode = drawMode;
+ initParams.scale = scale;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_G_MAGMA2, 128, &initParams);
+}
// EffectSsStone1 Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029C00.s")
+void EffectSsStone1_Spawn(GlobalContext* globalCtx, Vec3f* pos, s32 arg2) {
+ EffectSsStone1InitParams initParams;
+
+ initParams.pos = *pos;
+ initParams.unk_C = arg2;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_STONE1, 128, &initParams);
+}
// EffectSsHitMark Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029C50.s")
+void EffectSsHitMark_Spawn(GlobalContext* globalCtx, s32 type, s16 scale, Vec3f* pos) {
+ EffectSsHitMarkInitParams initParams;
+
+ initParams.type = type;
+ initParams.scale = scale;
+ Math_Vec3f_Copy(&initParams.pos, pos);
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_HITMARK, 128, &initParams);
+}
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029CA4.s")
+void EffectSsHitMark_SpawnFixedScale(GlobalContext* globalCtx, s32 type, Vec3f* pos) {
+ EffectSsHitMark_Spawn(globalCtx, type, 300, pos);
+}
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029CC8.s")
+void EffectSsHitMark_SpawnCustomScale(GlobalContext* globalCtx, s32 type, s16 scale, Vec3f* pos) {
+ EffectSsHitMark_Spawn(globalCtx, type, scale, pos);
+}
-void EffectSsFhgFlash_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 arg4, u8 arg5) {
+// EffectSsFhgFlash Spawn Functions
+
+/**
+ * Spawn a light ball effect
+ *
+ * param changes the color of the ball. Refer to FhgFlashLightBallParam for the options.
+ * Note: this type requires OBJECT_FHG to be loaded
+ */
+void EffectSsFhgFlash_SpawnLightBall(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale,
+ u8 param) {
EffectSsFhgFlashInitParams initParams;
Math_Vec3f_Copy(&initParams.pos, pos);
Math_Vec3f_Copy(&initParams.velocity, velocity);
Math_Vec3f_Copy(&initParams.accel, accel);
- initParams.unk_24 = arg4;
- initParams.unk_26 = arg5;
- initParams.unk_2C = 0;
+ initParams.scale = scale;
+ initParams.param = param;
+ initParams.type = FHGFLASH_LIGHTBALL;
EffectSs_Spawn(globalCtx, EFFECT_SS_FHG_FLASH, 128, &initParams);
}
-void EffectSsFhgFlash_Spawn2(GlobalContext* globalCtx, Actor* arg1, Vec3f* pos, s16 arg3, u8 arg4) {
+/**
+ * Spawn a shock effect
+ *
+ * param determines where the ligntning should go
+ * 0: dont attach to any actor. spawns at the position specified by pos
+ * 1: spawn at one of Player's body parts, chosen at random
+ * 2: spawn at one of Phantom Ganon's body parts, chosen at random
+ */
+void EffectSsFhgFlash_SpawnShock(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, s16 scale, u8 param) {
EffectSsFhgFlashInitParams initParams;
- initParams.unk_28 = arg1;
+ initParams.actor = actor;
Math_Vec3f_Copy(&initParams.pos, pos);
- initParams.unk_24 = arg3;
- initParams.unk_26 = arg4;
- initParams.unk_2C = 1;
+ initParams.scale = scale;
+ initParams.param = param;
+ initParams.type = FHGFLASH_SHOCK;
+
EffectSs_Spawn(globalCtx, EFFECT_SS_FHG_FLASH, 128, &initParams);
}
// EffectSsKFire Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029DBC.s")
+void EffectSsKFire_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scaleMax, u8 type) {
+ EffectSsKFireInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ Math_Vec3f_Copy(&initParams.accel, accel);
+ initParams.scaleMax = scaleMax;
+ initParams.type = type;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_K_FIRE, 128, &initParams);
+}
// EffectSsSolderSrchBall Spawn Functions
-void EffectSsSolderSrchBall_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 arg4,
+void EffectSsSolderSrchBall_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused,
s16* linkDetected) {
EffectSsSolderSrchBallInitParams initParams;
Math_Vec3f_Copy(&initParams.pos, pos);
Math_Vec3f_Copy(&initParams.velocity, velocity);
Math_Vec3f_Copy(&initParams.accel, accel);
- initParams.unk_24 = arg4;
+ initParams.unused = unused;
initParams.linkDetected = linkDetected;
EffectSs_Spawn(globalCtx, EFFECT_SS_SOLDER_SRCH_BALL, 128, &initParams);
@@ -434,35 +806,231 @@ void EffectSsSolderSrchBall_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* v
// EffectSsKakera Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029E8C.s")
+void EffectSsKakera_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* arg3, s16 gravity, s16 arg5,
+ s16 arg6, s16 arg7, s16 arg8, s16 scale, s16 arg10, s16 arg11, s32 life, s16 colorIdx,
+ s16 objId, Gfx* dList) {
+ EffectSsKakeraInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ Math_Vec3f_Copy(&initParams.unk_18, arg3);
+ initParams.gravity = gravity;
+ initParams.unk_26 = arg5;
+ initParams.unk_28 = arg6;
+ initParams.unk_2A = arg7;
+ initParams.unk_2C = arg8;
+ initParams.scale = scale;
+ initParams.unk_30 = arg10;
+ initParams.unk_32 = arg11;
+ initParams.life = life;
+ initParams.colorIdx = colorIdx;
+ initParams.objId = objId;
+ initParams.dList = dList;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_KAKERA, 101, &initParams);
+}
// EffectSsIcePiece Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029F44.s")
+void EffectSsIcePiece_Spawn(GlobalContext* globalCtx, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel, s32 life) {
+ EffectSsIcePieceInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ Math_Vec3f_Copy(&initParams.accel, accel);
+ initParams.scale = scale;
+ initParams.life = life;
+ EffectSs_Spawn(globalCtx, 0x1A, 0x80, &initParams);
+}
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_80029FAC.s")
+void EffectSsIcePiece_SpawnBurst(GlobalContext* globalCtx, Vec3f* refPos, f32 scale) {
+ static Vec3f accel = { 0.0f, 0.0f, 0.0f };
+ static Vec3f vecScales[] = {
+ { 0.0f, 70.0f, 0.0f },
+ { 0.0f, 45.0f, 20.0f },
+ { 17.320474f, 45.0f, 9.999695f },
+ { 17.320474f, 45.0f, -9.999695f },
+ { 0.0f, 45.0f, -20.0f },
+ { -17.320474f, 45.0f, -9.999695f },
+ { -17.320474f, 45.0f, 9.999695f },
+ { 0.0f, 20.0f, 20.0f },
+ { 17.320474f, 20.0f, -9.999695f },
+ { -17.320474f, 20.0f, -9.999695f },
+ };
+ s32 i;
+ Vec3f velocity;
+ Vec3f pos;
+ f32 velocityScale;
+
+ accel.y = -0.2f;
+
+ for (i = 0; i < ARRAY_COUNT(vecScales); i++) {
+ pos = *refPos;
+ velocityScale = Math_Rand_ZeroFloat(1.0f) + 0.5f;
+ velocity.x = (vecScales[i].x * 0.18f) * velocityScale;
+ velocity.y = (vecScales[i].y * 0.18f) * velocityScale;
+ velocity.z = (vecScales[i].z * 0.18f) * velocityScale;
+ pos.x += vecScales[i].x;
+ pos.y += vecScales[i].y;
+ pos.z += vecScales[i].z;
+
+ EffectSsIcePiece_Spawn(globalCtx, &pos, (Math_Rand_ZeroFloat(1.0f) + 0.5f) * ((scale * 1.3f) * 100.0f),
+ &velocity, &accel, 25);
+ }
+}
// EffectSsEnIce Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A140.s")
+void EffectSsEnIce_SpawnFlyingVec3f(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, s16 primR, s16 primG, s16 primB,
+ s16 primA, s16 envR, s16 envG, s16 envB, f32 scale) {
+
+ EffectSsEnIceInitParams initParams;
+
+ initParams.actor = actor;
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ initParams.type = 0;
+ initParams.primColor.r = primR;
+ initParams.primColor.g = primG;
+ initParams.primColor.b = primB;
+ initParams.primColor.a = primA;
+ initParams.envColor.r = envR;
+ initParams.envColor.g = envG;
+ initParams.envColor.b = envB;
+ initParams.scale = scale;
+
+ if (actor != NULL) {
+ Audio_PlayActorSound2(actor, NA_SE_PL_FREEZE_S);
+ }
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_EN_ICE, 80, &initParams);
+}
+
+void EffectSsEnIce_SpawnFlyingVec3s(GlobalContext* globalCtx, Actor* actor, Vec3s* pos, s16 primR, s16 primG, s16 primB,
+ s16 primA, s16 envR, s16 envG, s16 envB, f32 scale) {
+
+ EffectSsEnIceInitParams initParams;
+
+ initParams.actor = actor;
+ initParams.pos.x = pos->x;
+ initParams.pos.y = pos->y;
+ initParams.pos.z = pos->z;
+ initParams.primColor.r = primR;
+ initParams.primColor.g = primG;
+ initParams.primColor.b = primB;
+ initParams.primColor.a = primA;
+ initParams.envColor.r = envR;
+ initParams.envColor.g = envG;
+ initParams.envColor.b = envB;
+ initParams.type = 0;
+ initParams.scale = scale;
+
+ if (actor != NULL) {
+ Audio_PlayActorSound2(actor, NA_SE_PL_FREEZE_S);
+ }
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_EN_ICE, 80, &initParams);
+}
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A1DC.s")
+void EffectSsEnIce_Spawn(GlobalContext* globalCtx, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s32 life) {
+ EffectSsEnIceInitParams initParams;
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A2A4.s")
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ Math_Vec3f_Copy(&initParams.accel, accel);
+ Color_RGBA8_Copy(&initParams.primColor, primColor);
+ Color_RGBA8_Copy(&initParams.envColor, envColor);
+ initParams.scale = scale;
+ initParams.life = life;
+ initParams.type = 1;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_EN_ICE, 128, &initParams);
+}
// EffectSsFireTail Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A32C.s")
+void EffectSsFireTail_Spawn(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, f32 scale, Vec3f* arg4, s16 arg5,
+ Color_RGBA8* primColor, Color_RGBA8* envColor, s16 type, s16 bodyPart, s32 life) {
+ EffectSsFireTailInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.unk_14, arg4);
+ Color_RGBA8_Copy(&initParams.primColor, primColor);
+ Color_RGBA8_Copy(&initParams.envColor, envColor);
+ initParams.unk_20 = arg5;
+ initParams.actor = actor;
+ initParams.scale = scale;
+ initParams.type = type;
+ initParams.bodyPart = bodyPart;
+ initParams.life = life;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_FIRE_TAIL, 128, &initParams);
+}
+
+void EffectSsFireTail_SpawnFlame(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, f32 arg3, s16 bodyPart,
+ f32 colorIntensity) {
+ static Color_RGBA8 primColor = { 255, 255, 0, 255 };
+ static Color_RGBA8 envColor = { 255, 0, 0, 255 };
+
+ primColor.g = (s32)(255.0f * colorIntensity);
+ primColor.b = 0;
+
+ envColor.g = 0;
+ envColor.b = 0;
+ primColor.r = envColor.r = (s32)(255.0f * colorIntensity);
+
+ EffectSsFireTail_Spawn(globalCtx, actor, pos, arg3, &actor->velocity, 15, &primColor, &envColor,
+ (colorIntensity == 1.0f) ? 0 : 1, bodyPart, 1);
+}
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A3C4.s")
+void EffectSsFireTail_SpawnFlameOnPlayer(GlobalContext* globalCtx, f32 scale, s16 bodyPart, f32 colorIntensity) {
+ Player* player = PLAYER;
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A484.s")
+ EffectSsFireTail_SpawnFlame(globalCtx, &player->actor, &player->bodyPartsPos[bodyPart], scale, bodyPart,
+ colorIntensity);
+}
// EffectSsEnFire Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A4D4.s")
+// note: if bodyPart is greater than -1 the actor MUST have a table of Vec3f positions at offset 0x14C in the instance
+void EffectSsEnFire_SpawnVec3f(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, s16 scale, s16 arg4, s16 flags,
+ s16 bodyPart) {
+ EffectSsEnFireInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ initParams.actor = actor;
+ initParams.scale = scale;
+ initParams.unk_12 = arg4;
+ initParams.flags = flags;
+ initParams.bodyPart = bodyPart;
+
+ if (actor != NULL) {
+ Audio_PlayActorSound2(actor, NA_SE_EV_FLAME_IGNITION);
+ }
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_EN_FIRE, 128, &initParams);
+}
+
+// note: if bodyPart is greater than -1 the actor MUST have a table of Vec3s positions at offset 0x14C in the instance
+void EffectSsEnFire_SpawnVec3s(GlobalContext* globalCtx, Actor* actor, Vec3s* pos, s16 scale, s16 arg4, s16 flags,
+ s16 bodyPart) {
+ EffectSsEnFireInitParams initParams;
+
+ initParams.pos.x = pos->x;
+ initParams.pos.y = pos->y;
+ initParams.pos.z = pos->z;
+ initParams.actor = actor;
+ initParams.scale = scale;
+ initParams.unk_12 = arg4;
+ initParams.flags = flags | 0x8000;
+ initParams.bodyPart = bodyPart;
+
+ if (actor != NULL) {
+ Audio_PlayActorSound2(actor, NA_SE_EV_FLAME_IGNITION);
+ }
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A54C.s")
+ EffectSs_Spawn(globalCtx, EFFECT_SS_EN_FIRE, 128, &initParams);
+}
// EffectSsExtra Spawn Functions
@@ -474,28 +1042,111 @@ void EffectSsExtra_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity,
Math_Vec3f_Copy(&initParams.accel, accel);
initParams.scale = scale;
initParams.scoreIdx = scoreIdx;
+
EffectSs_Spawn(globalCtx, EFFECT_SS_EXTRA, 100, &initParams);
}
// EffectSsFCircle Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A65C.s")
+void EffectSsFCircle_Spawn(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, s16 radius, s16 height) {
+ EffectSsFcircleInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ initParams.actor = actor;
+ initParams.radius = radius;
+ initParams.height = height;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_FCIRCLE, 128, &initParams);
+}
-// EffectSsDeadBb Spawn Functions
+// EffectSsDeadDb Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A6B8.s")
+void EffectSsDeadDb_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
+ s16 primR, s16 primG, s16 primB, s16 primA, s16 envR, s16 envG, s16 envB, s16 unused,
+ s32 arg14, s16 playSound) {
+ EffectSsDeadDbInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ Math_Vec3f_Copy(&initParams.accel, accel);
+ initParams.scale = scale;
+ initParams.scaleStep = scaleStep;
+ initParams.primColor.r = primR;
+ initParams.primColor.g = primG;
+ initParams.primColor.b = primB;
+ initParams.primColor.a = primA;
+ initParams.envColor.r = envR;
+ initParams.envColor.g = envG;
+ initParams.envColor.b = envB;
+ initParams.unused = unused;
+ initParams.unk_34 = arg14;
+ initParams.playSound = playSound;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_DEAD_DB, 120, &initParams);
+}
// EffectSsDeadDd Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A770.s")
+void EffectSsDeadDd_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
+ s16 primR, s16 primG, s16 primB, s16 alpha, s16 envR, s16 envG, s16 envB, s16 alphaStep,
+ s32 life) {
+ EffectSsDeadDdInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ Math_Vec3f_Copy(&initParams.accel, accel);
+ initParams.scale = scale;
+ initParams.type = 0;
+ initParams.scaleStep = scaleStep;
+ initParams.primColor.r = primR;
+ initParams.primColor.g = primG;
+ initParams.primColor.b = primB;
+ initParams.alpha = alpha;
+ initParams.envColor.r = envR;
+ initParams.envColor.g = envG;
+ initParams.envColor.b = envB;
+ initParams.alphaStep = alphaStep;
+ initParams.life = life;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_DEAD_DD, 120, &initParams);
+}
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A824.s")
+// unused
+void EffectSsDeadDd_SpawnRandYellow(GlobalContext* globalCtx, Vec3f* pos, s16 scale, s16 scaleStep, f32 randPosScale,
+ s32 randIter, s32 life) {
+ EffectSsDeadDdInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ initParams.scale = scale;
+ initParams.scaleStep = scaleStep;
+ initParams.randPosScale = randPosScale;
+ initParams.randIter = randIter;
+ initParams.life = life;
+ initParams.type = 1;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_DEAD_DD, 120, &initParams);
+}
// EffectSsDeadDs Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A894.s")
+void EffectSsDeadDs_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep,
+ s16 alpha, s32 life) {
+ EffectSsDeadDsInitParams initParams;
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002A90C.s")
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ Math_Vec3f_Copy(&initParams.accel, accel);
+ initParams.scale = scale;
+ initParams.scaleStep = scaleStep;
+ initParams.alpha = alpha;
+ initParams.life = life;
+ EffectSs_Spawn(globalCtx, EFFECT_SS_DEAD_DS, 100, &initParams);
+}
+
+void EffectSsDeadDs_SpawnStationary(GlobalContext* globalCtx, Vec3f* pos, s16 scale, s16 scaleStep, s16 alpha,
+ s32 life) {
+ EffectSsDeadDs_Spawn(globalCtx, pos, &sZeroVec, &sZeroVec, scale, scaleStep, alpha, life);
+}
// EffectSsDeadSound Spawn Functions
@@ -520,9 +1171,23 @@ void EffectSsDeadSound_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* veloci
void EffectSsDeadSound_SpawnStationary(GlobalContext* globalCtx, Vec3f* pos, u16 sfxId, s16 lowerPriority,
s16 repeatMode, s32 life) {
- EffectSsDeadSound_Spawn(globalCtx, pos, &D_801158C0, &D_801158C0, sfxId, lowerPriority, repeatMode, life);
+ EffectSsDeadSound_Spawn(globalCtx, pos, &sZeroVec, &sZeroVec, sfxId, lowerPriority, repeatMode, life);
}
// EffectSsIceSmoke Spawn Functions
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_effect_soft_sprite_old_init/func_8002AA44.s")
+/**
+ * Spawn an Ice Smoke effect
+ *
+ * Note: this effect requires OBJECT_FZ to be loaded
+ */
+void EffectSsIceSmoke_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale) {
+ EffectSsIceSmokeInitParams initParams;
+
+ Math_Vec3f_Copy(&initParams.pos, pos);
+ Math_Vec3f_Copy(&initParams.velocity, velocity);
+ Math_Vec3f_Copy(&initParams.accel, accel);
+ initParams.scale = scale;
+
+ EffectSs_Spawn(globalCtx, EFFECT_SS_ICE_SMOKE, 128, &initParams);
+}
diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c
index 22436eace..64a8dc4dc 100644
--- a/src/code/z_en_item00.c
+++ b/src/code/z_en_item00.c
@@ -1,5 +1,6 @@
#include <ultra64.h>
#include <global.h>
+#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"
#define FLAGS 0x00000000
@@ -336,7 +337,7 @@ void func_8001E1C8(EnItem00* this, GlobalContext* globalCtx) {
pos.x = this->actor.posRot.pos.x + Math_Rand_CenteredFloat(10.0f);
pos.y = this->actor.posRot.pos.y + Math_Rand_CenteredFloat(10.0f);
pos.z = this->actor.posRot.pos.z + Math_Rand_CenteredFloat(10.0f);
- func_80028B74(globalCtx, &pos, &D_80115518, &D_80115524, &D_80115510, &D_80115514);
+ EffectSsKiraKira_SpawnSmall(globalCtx, &pos, &D_80115518, &D_80115524, &D_80115510, &D_80115514);
}
if (this->actor.bgCheckFlags & 0x0003) {
@@ -394,7 +395,7 @@ void func_8001E304(EnItem00* this, GlobalContext* globalCtx) {
pos.x = this->actor.posRot.pos.x + (Math_Rand_ZeroOne() - 0.5f) * 10.0f;
pos.y = this->actor.posRot.pos.y + (Math_Rand_ZeroOne() - 0.5f) * 10.0f;
pos.z = this->actor.posRot.pos.z + (Math_Rand_ZeroOne() - 0.5f) * 10.0f;
- func_80028B74(globalCtx, &pos, &D_80115518, &D_80115524, &D_80115510, &D_80115514);
+ EffectSsKiraKira_SpawnSmall(globalCtx, &pos, &D_80115518, &D_80115524, &D_80115510, &D_80115514);
}
if (this->actor.bgCheckFlags & 0x0003) {
@@ -877,7 +878,8 @@ EnItem00* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, s16 pa
// TODO: Prevent the cast to EnItem00 here since this is a different actor (En_Elf)
spawnedActor = (EnItem00*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x,
spawnPos->y + 40.0f, spawnPos->z, 0, 0, 0, 0x0002);
- EffectSsDeadSound_SpawnStationary(globalCtx, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, 1, 1, 40);
+ EffectSsDeadSound_SpawnStationary(globalCtx, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true,
+ DEADSOUND_REPEAT_MODE_OFF, 40);
} else {
if (!param8000) {
params = func_8001F404(params & 0x00FF);
@@ -920,7 +922,8 @@ EnItem00* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s16 p
// TODO: Prevent the cast to EnItem00 here since this is a different actor (En_Elf)
spawnedActor = (EnItem00*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x,
spawnPos->y + 40.0f, spawnPos->z, 0, 0, 0, 0x0002);
- EffectSsDeadSound_SpawnStationary(globalCtx, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, 1, 1, 40);
+ EffectSsDeadSound_SpawnStationary(globalCtx, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true,
+ DEADSOUND_REPEAT_MODE_OFF, 40);
} else {
params = func_8001F404(params & 0x00FF);
if (params != -1) {
@@ -989,7 +992,8 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3
if (gSaveContext.health <= 0x10) { // 1 heart or less
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f, spawnPos->z, 0,
0, 0, 0x0002);
- EffectSsDeadSound_SpawnStationary(globalCtx, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, 1, 1, 40);
+ EffectSsDeadSound_SpawnStationary(globalCtx, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true,
+ DEADSOUND_REPEAT_MODE_OFF, 40);
return;
} else if (gSaveContext.health <= 0x30) { // 3 hearts or less
params = 0xB * 0x10;
diff --git a/src/code/z_fbdemo_fade.c b/src/code/z_fbdemo_fade.c
index f93719f20..74d218caa 100644
--- a/src/code/z_fbdemo_fade.c
+++ b/src/code/z_fbdemo_fade.c
@@ -82,7 +82,7 @@ void TransitionFade_Update(TransitionFade* this, s32 updateRate) {
void TransitionFade_Draw(TransitionFade* this, Gfx** gfxP) {
Gfx* gfx;
- Color_RGBA8* color;
+ Color_RGBA8_u32* color;
if (this->fadeColor.a > 0) {
color = &this->fadeColor;
gfx = *gfxP;
diff --git a/src/code/z_lights.c b/src/code/z_lights.c
index 50e351aa4..5fc5b1b0d 100644
--- a/src/code/z_lights.c
+++ b/src/code/z_lights.c
@@ -142,7 +142,7 @@ void Lights_BindDirectional(Lights* lights, LightParams* params, Vec3f* vec) {
}
}
-/*
+/**
* For every light in a provided list, try to find a free slot in the provided Lights group and bind
* a light to it. Then apply color and positional/directional info for each light
* based on the parameters supplied by the node.
@@ -216,7 +216,7 @@ void func_8007A698(LightContext* lightCtx, u8 arg1, u8 arg2, u8 arg3, s16 numLig
lightCtx->unk_0C = arg5;
}
-/*
+/**
* Allocate a new Lights group and initilize the ambient color with that provided by LightContext
*/
Lights* LightContext_NewLights(LightContext* lightCtx, GraphicsContext* gfxCtx) {
@@ -234,7 +234,7 @@ void LightContext_DestroyList(GlobalContext* globalCtx, LightContext* lightCtx)
}
}
-/*
+/**
* Insert a new light into the list pointed to by LightContext
*
* Note: Due to the limited number of slots in a Lights group, inserting too many lights in the
diff --git a/src/code/z_play.c b/src/code/z_play.c
index 20b04d86c..20c2567bd 100644
--- a/src/code/z_play.c
+++ b/src/code/z_play.c
@@ -9,7 +9,7 @@ Input* D_8012D1F8 = NULL;
TransitionUnk sTrnsnUnk;
s32 gTrnsnUnkState;
VisMono D_80161498;
-Color_RGBA8 D_801614B0;
+Color_RGBA8_u32 D_801614B0;
FaultClient D_801614B8;
s16 D_801614C8;
u64 D_801614D0[0xA00];
@@ -1158,7 +1158,8 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
oGfxCtx->polyOpa.p = sp88;
goto Gameplay_Draw_DrawOverlayElements;
} else {
- PreRender_SetValues(&globalCtx->preRenderCtx, SCREEN_WIDTH, SCREEN_HEIGHT, gfxCtx->curFrameBuffer, gZBuffer);
+ PreRender_SetValues(&globalCtx->preRenderCtx, SCREEN_WIDTH, SCREEN_HEIGHT, gfxCtx->curFrameBuffer,
+ gZBuffer);
if (R_PAUSE_MENU_MODE == 2) {
MsgEvent_SendNullTask();
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c
index ba65241a6..7bdacf68b 100644
--- a/src/code/z_player_lib.c
+++ b/src/code/z_player_lib.c
@@ -703,7 +703,7 @@ void func_8008F87C(GlobalContext* globalCtx, Player* this, SkelAnime* skelAnime,
s32 thighLimbIndex, s32 shinLimbIndex, s32 footLimbIndex) {
Vec3f spA4;
Vec3f sp98;
- Vec3f sp8C;
+ Vec3f footprintPos;
CollisionPoly* sp88;
UNK_TYPE sp84;
f32 sp80;
@@ -737,12 +737,12 @@ void func_8008F87C(GlobalContext* globalCtx, Player* this, SkelAnime* skelAnime,
Matrix_JointPosition(&D_80126038[(void)0, gSaveContext.linkAge], &skelAnime->limbDrawTbl[shinLimbIndex]);
Matrix_Translate(D_80126050[(void)0, gSaveContext.linkAge], 0.0f, 0.0f, MTXMODE_APPLY);
Matrix_MultVec3f(&D_8012602C, &sp98);
- Matrix_MultVec3f(&D_80126070, &sp8C);
+ Matrix_MultVec3f(&D_80126070, &footprintPos);
Matrix_Pull();
- sp8C.y += 15.0f;
+ footprintPos.y += 15.0f;
- sp80 = func_8003C9A4(&globalCtx->colCtx, &sp88, &sp84, &this->actor, &sp8C) + sp74;
+ sp80 = func_8003C9A4(&globalCtx->colCtx, &sp88, &sp84, &this->actor, &footprintPos) + sp74;
if (sp98.y < sp80) {
sp70 = sp98.x - spA4.x;
@@ -786,8 +786,8 @@ void func_8008F87C(GlobalContext* globalCtx, Player* this, SkelAnime* skelAnime,
temp3 = func_80041D4C(&globalCtx->colCtx, sp88, sp84);
if ((temp3 >= 2) && (temp3 < 4) && !func_80042108(&globalCtx->colCtx, sp88, sp84)) {
- sp8C.y = sp80;
- func_80029568(globalCtx, &sp8C);
+ footprintPos.y = sp80;
+ EffectSsGFire_Spawn(globalCtx, &footprintPos);
}
}
}