mirror of https://github.com/zeldaret/mm.git
parent
12b995093f
commit
e1477702ca
|
|
@ -1180,7 +1180,7 @@
|
|||
<Texture Name="gameplay_keep_Tex_054140" OutName="tex_054140" Format="i4" Width="64" Height="64" Offset="0x54140" />
|
||||
<DList Name="gameplay_keep_DL_054940" Offset="0x54940" />
|
||||
<DList Name="gameplay_keep_DL_0549A8" Offset="0x549A8" />
|
||||
<DList Name="gameplay_keep_DL_054A90" Offset="0x54A90" />
|
||||
<DList Name="gEffSparklesDL" Offset="0x54A90" />
|
||||
<Texture Name="gameplay_keep_Tex_054AF0" OutName="tex_054AF0" Format="i4" Width="16" Height="16" Offset="0x54AF0" />
|
||||
<DList Name="gameplay_keep_DL_054C90" Offset="0x54C90" />
|
||||
<Texture Name="gameplay_keep_Tex_054D90" OutName="tex_054D90" Format="i4" Width="16" Height="16" Offset="0x54D90" />
|
||||
|
|
|
|||
|
|
@ -541,11 +541,11 @@ void func_800B139C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f*
|
|||
void func_800B13D8(Vec3f* srcPos, f32 randScale, Vec3f* newPos, Vec3f* velocity, Vec3f* accel);
|
||||
void func_800B14D4(GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos);
|
||||
void func_800B1598(GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos);
|
||||
void EffectSsKiraKira_SpawnSmallYellow(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void EffectSsKiraKira_SpawnSmall(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
||||
void EffectSsKirakira_SpawnSmallYellow(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void EffectSsKirakira_SpawnSmall(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
||||
void EffectSsGSpk_SpawnSmall(GlobalContext* globalCtx, Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
||||
void EffectSsKiraKira_SpawnDispersed(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
|
||||
// void EffectSsKiraKira_SpawnFocused(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE2 param_7, UNK_TYPE4 param_8);
|
||||
void EffectSsKirakira_SpawnDispersed(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
|
||||
// void EffectSsKirakira_SpawnFocused(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE2 param_7, UNK_TYPE4 param_8);
|
||||
// void EffectSsBomb2_SpawnFade(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4);
|
||||
void EffectSsBomb2_SpawnLayered(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
||||
// void EffectSsBlast_Spawn(UNK_TYPE4 uParm1, Vec3f* pzParm2, Vec3f* pzParm3, Vec3f* pzParm4, Color_RGBA8* param_5, Color_RGBA8* param_6, UNK_TYPE2 param_7, UNK_TYPE2 param_8, UNK_TYPE2 param_9, UNK_TYPE2 param_10);
|
||||
|
|
|
|||
3
spec
3
spec
|
|
@ -1784,8 +1784,7 @@ beginseg
|
|||
name "ovl_Effect_Ss_Kirakira"
|
||||
compress
|
||||
include "build/src/overlays/effects/ovl_Effect_Ss_Kirakira/z_eff_ss_kirakira.o"
|
||||
include "build/data/ovl_Effect_Ss_Kirakira/ovl_Effect_Ss_Kirakira.data.o"
|
||||
include "build/data/ovl_Effect_Ss_Kirakira/ovl_Effect_Ss_Kirakira.reloc.o"
|
||||
include "build/src/overlays/effects/ovl_Effect_Ss_Kirakira/ovl_Effect_Ss_Kirakira_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
|||
|
|
@ -206,21 +206,21 @@ void func_800B1598(GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos) {
|
|||
}
|
||||
}
|
||||
|
||||
void EffectSsKiraKira_SpawnSmallYellow(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
|
||||
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);
|
||||
EffectSsKirakira_SpawnDispersed(globalCtx, pos, velocity, accel, &primColor, &envColor, 1000, 16);
|
||||
}
|
||||
|
||||
void EffectSsKiraKira_SpawnSmall(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
|
||||
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);
|
||||
EffectSsKirakira_SpawnDispersed(globalCtx, pos, velocity, accel, primColor, envColor, 1000, 16);
|
||||
}
|
||||
|
||||
void EffectSsKiraKira_SpawnDispersed(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
|
||||
void EffectSsKirakira_SpawnDispersed(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
|
||||
Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life) {
|
||||
EffectSsKiraKiraInitParams initParams;
|
||||
EffectSsKirakiraInitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
Math_Vec3f_Copy(&initParams.velocity, velocity);
|
||||
|
|
@ -239,9 +239,9 @@ void EffectSsKiraKira_SpawnDispersed(GlobalContext* globalCtx, Vec3f* pos, Vec3f
|
|||
EffectSs_Spawn(globalCtx, EFFECT_SS_KIRAKIRA, 128, &initParams);
|
||||
}
|
||||
|
||||
void EffectSsKiraKira_SpawnFocused(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
|
||||
void EffectSsKirakira_SpawnFocused(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
|
||||
Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life) {
|
||||
EffectSsKiraKiraInitParams initParams;
|
||||
EffectSsKirakiraInitParams initParams;
|
||||
|
||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||
Math_Vec3f_Copy(&initParams.velocity, velocity);
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ void func_800A6650(EnItem00* this, GlobalContext* globalCtx) {
|
|||
pos.x = this->actor.world.pos.x + randPlusMinusPoint5Scaled(10.0f);
|
||||
pos.y = this->actor.world.pos.y + randPlusMinusPoint5Scaled(10.0f);
|
||||
pos.z = this->actor.world.pos.z + randPlusMinusPoint5Scaled(10.0f);
|
||||
EffectSsKiraKira_SpawnSmall(globalCtx, &pos, &D_801ADF18, &D_801ADF24, &D_801ADF10, &D_801ADF14);
|
||||
EffectSsKirakira_SpawnSmall(globalCtx, &pos, &D_801ADF18, &D_801ADF24, &D_801ADF10, &D_801ADF14);
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 3) != 0) {
|
||||
if (this->actor.velocity.y > -2.0f) {
|
||||
|
|
@ -403,7 +403,7 @@ void func_800A6780(EnItem00* this, GlobalContext* globalCtx) {
|
|||
pos.x = this->actor.world.pos.x + ((Rand_ZeroOne() - 0.5f) * 10.0f);
|
||||
pos.y = this->actor.world.pos.y + ((Rand_ZeroOne() - 0.5f) * 10.0f);
|
||||
pos.z = this->actor.world.pos.z + ((Rand_ZeroOne() - 0.5f) * 10.0f);
|
||||
EffectSsKiraKira_SpawnSmall(globalCtx, &pos, &D_801ADF18, &D_801ADF24, &D_801ADF10, &D_801ADF14);
|
||||
EffectSsKirakira_SpawnSmall(globalCtx, &pos, &D_801ADF18, &D_801ADF24, &D_801ADF10, &D_801ADF14);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 0x0003) {
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ void BgKin2Fence_SpawnEyeSparkles(BgKin2Fence* this, GlobalContext* globalCtx, s
|
|||
|
||||
for (i = 0; i < 2; i++) {
|
||||
Matrix_MultiplyVector3fByState(&eyeSparkleSpawnPositions[mask][i], &sp58);
|
||||
EffectSsKiraKira_SpawnDispersed(globalCtx, &sp58, &gZeroVec3f, &gZeroVec3f, &primColor, &envColor, 6000, -10);
|
||||
EffectSsKirakira_SpawnDispersed(globalCtx, &sp58, &gZeroVec3f, &gZeroVec3f, &primColor, &envColor, 6000, -10);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1148,6 +1148,6 @@ void func_808BB8D4(DoorWarp1* this, GlobalContext* globalCtx, s32 arg2) {
|
|||
sVelocity.x = -Math_SinS(rand - 0x8000) * 5.0f;
|
||||
sVelocity.z = Math_CosS(rand - 0x8000) * 5.0f;
|
||||
}
|
||||
EffectSsKiraKira_SpawnDispersed(globalCtx, &pos, &sVelocity, &sAccel, &primColor, &envColor, scale, life);
|
||||
EffectSsKirakira_SpawnDispersed(globalCtx, &pos, &sVelocity, &sAccel, &primColor, &envColor, scale, life);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ void func_80919768(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
|
||||
gSPClearGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_054A90);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffSparklesDL);
|
||||
|
||||
gSPSetGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
||||
}
|
||||
|
|
@ -352,7 +352,7 @@ void func_809199FC(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPClearGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_054A90);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffSparklesDL);
|
||||
gSPSetGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ void EnAm_SpawnEffects(EnAm* this, GlobalContext* globalCtx) {
|
|||
effectPos.x = randPlusMinusPoint5Scaled(65.0f) + this->actor.world.pos.x;
|
||||
effectPos.y = randPlusMinusPoint5Scaled(10.0f) + (this->actor.world.pos.y + 40.0f);
|
||||
effectPos.z = randPlusMinusPoint5Scaled(65.0f) + this->actor.world.pos.z;
|
||||
EffectSsKiraKira_SpawnSmall(globalCtx, &effectPos, &sVelocity, &sAccel, &D_808B1118, &D_808B111C);
|
||||
EffectSsKirakira_SpawnSmall(globalCtx, &effectPos, &sVelocity, &sAccel, &D_808B1118, &D_808B111C);
|
||||
}
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_AMOS_WALK);
|
||||
Actor_SpawnFloorDustRing(globalCtx, &this->actor, &this->actor.world.pos, 4.0f, 3, 8.0f, 300, 15, 0);
|
||||
|
|
|
|||
|
|
@ -731,7 +731,7 @@ void EnArrow_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Matrix_Scale(sp5C, sp5C, sp5C, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_054A90);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffSparklesDL);
|
||||
|
||||
Matrix_StatePop();
|
||||
Matrix_RotateY(this->actor.world.rot.y, MTXMODE_APPLY);
|
||||
|
|
|
|||
|
|
@ -1259,7 +1259,7 @@ void func_8088F5F4(EnElf* this, GlobalContext* globalCtx, s32 sparkleLife) {
|
|||
envColor.g = this->outerColor.g;
|
||||
envColor.b = this->outerColor.b;
|
||||
|
||||
EffectSsKiraKira_SpawnDispersed(globalCtx, &sparklePos, &sparkleVelocity, &sparkleAccel, &primColor, &envColor,
|
||||
EffectSsKirakira_SpawnDispersed(globalCtx, &sparklePos, &sparkleVelocity, &sparkleAccel, &primColor, &envColor,
|
||||
1000, sparkleLife);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ void EnElforg_SpawnSparkles(EnElforg* this, GlobalContext* globalCtx, s32 life)
|
|||
index = (this->area < STRAY_FAIRY_AREA_CLOCK_TOWN || this->area >= STRAY_FAIRY_AREA_MAX)
|
||||
? STRAY_FAIRY_AREA_CLOCK_TOWN
|
||||
: this->area;
|
||||
EffectSsKiraKira_SpawnDispersed(globalCtx, &pos, &sVelocity, &sAcceleration, &sPrimColors[index],
|
||||
EffectSsKirakira_SpawnDispersed(globalCtx, &pos, &sVelocity, &sAcceleration, &sPrimColors[index],
|
||||
&sEnvColors[index], 1000, life);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ void func_80B3B4B0(EnGg2* this, GlobalContext* globalCtx) {
|
|||
sp64.x = (Rand_Centered() * 50.0f) + this->unk_304.x;
|
||||
sp64.y = this->unk_304.y;
|
||||
sp64.z = (Rand_Centered() * 50.0f) + this->unk_304.z;
|
||||
EffectSsKiraKira_SpawnDispersed(globalCtx, &sp64, &D_80B3C088, &D_80B3C094, &sp60, &sp5C, 3000, 40);
|
||||
EffectSsKirakira_SpawnDispersed(globalCtx, &sp64, &D_80B3C088, &D_80B3C094, &sp60, &sp5C, 3000, 40);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1577,7 +1577,7 @@ void func_80B45EC8(EnInvadepoh* this, GlobalContext* globalCtx, s32 arg2) {
|
|||
spA8.y = ((Rand_ZeroOne() * 180.0f) + this->actor.world.pos.y) - 90.0f;
|
||||
spA8.z = (spA8.z * 100.0f) + this->actor.world.pos.z;
|
||||
|
||||
EffectSsKiraKira_SpawnDispersed(globalCtx, &spA8, &sp9C, &sp90, &D_80B4EC18, &D_80B4EC1C, 6000, -40);
|
||||
EffectSsKirakira_SpawnDispersed(globalCtx, &spA8, &sp9C, &sp90, &D_80B4EC18, &D_80B4EC1C, 6000, -40);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ void func_80A90D34(EnTest6* this, GlobalContext* globalCtx, EnTest6Struct* ptr)
|
|||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 210, 210, 230, 128);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 255, 255, 0);
|
||||
gSPClearGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_054A90);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffSparklesDL);
|
||||
gSPSetGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
|
|
@ -289,7 +289,7 @@ void func_80A90FC0(EnTest6* this, GlobalContext* globalCtx, EnTest6Struct* ptr)
|
|||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 220, 220, 230, 192);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 0);
|
||||
gSPClearGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_054A90);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffSparklesDL);
|
||||
gSPSetGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ void func_80B93DE8(Vec3f* arg0, GlobalContext* globalCtx, s32 arg2) {
|
|||
sp2C.x = randPlusMinusPoint5Scaled(30.0f) + arg0->x;
|
||||
sp2C.y = arg0->y + 3.0f;
|
||||
sp2C.z = randPlusMinusPoint5Scaled(30.0f) + arg0->z;
|
||||
EffectSsKiraKira_SpawnDispersed(globalCtx, &sp2C, &D_80B9598C, &D_80B95998, &D_80B959A4, &D_80B959A8, 1000, arg2);
|
||||
EffectSsKirakira_SpawnDispersed(globalCtx, &sp2C, &D_80B9598C, &D_80B95998, &D_80B959A4, &D_80B959A8, 1000, arg2);
|
||||
}
|
||||
|
||||
s32 func_80B93EA0(EnZog* this, GlobalContext* globalCtx) {
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ void ObjBigicicle_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
sp44.z = (((215.0f + Rand_ZeroFloat(65.0f)) * ((Rand_ZeroOne() < 0.5f) ? -1 : 1)) * this->actor.scale.z) +
|
||||
this->actor.world.pos.z;
|
||||
|
||||
EffectSsKiraKira_SpawnDispersed(globalCtx, &sp44, &gZeroVec3f, &gZeroVec3f, &D_80AE9894, &D_80AE9898, 2000, 5);
|
||||
EffectSsKirakira_SpawnDispersed(globalCtx, &sp44, &gZeroVec3f, &gZeroVec3f, &D_80AE9894, &D_80AE9898, 2000, 5);
|
||||
}
|
||||
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider1.base);
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ void func_80931A38(ObjIcePoly* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
sp6C.z = (phi_v0 * (15.0f + (sp58 * 15.0f)) * this->actor.scale.z) + this->actor.world.pos.z;
|
||||
|
||||
EffectSsKiraKira_SpawnDispersed(globalCtx, &sp6C, &gZeroVec3f, &gZeroVec3f, &D_80932378, &D_8093237C, 2000, 5);
|
||||
EffectSsKirakira_SpawnDispersed(globalCtx, &sp6C, &gZeroVec3f, &gZeroVec3f, &D_80932378, &D_8093237C, 2000, 5);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,33 +1,159 @@
|
|||
/*
|
||||
* File: z_eff_ss_kirakira.c
|
||||
* Overlay: ovl_Effect_Ss_Kirakira
|
||||
* Description:
|
||||
* Description: Sparkles
|
||||
*/
|
||||
|
||||
#include "z_eff_ss_kirakira.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
#define rRotSpeed regs[0]
|
||||
#define rYaw regs[1]
|
||||
#define rPrimColorR regs[2]
|
||||
#define rPrimColorG regs[3]
|
||||
#define rPrimColorB regs[4]
|
||||
#define rPrimColorA regs[5]
|
||||
#define rEnvColorR regs[6]
|
||||
#define rEnvColorG regs[7]
|
||||
#define rEnvColorB regs[8]
|
||||
#define rEnvColorA regs[9]
|
||||
#define rAlphaStep regs[10]
|
||||
#define rScale regs[11]
|
||||
#define rLifespan regs[12]
|
||||
|
||||
#define PARAMS ((EffectSsKirakiraInitParams*)initParamsx)
|
||||
|
||||
s32 EffectSsKirakira_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx);
|
||||
u32 EffectSsKirakira_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx);
|
||||
void func_80977DB4(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
void func_80977E6C(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
void func_80977F28(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
void EffectSsKirakira_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
|
||||
#if 0
|
||||
const EffectSsInit Effect_Ss_Kirakira_InitVars = {
|
||||
EFFECT_SS_KIRAKIRA,
|
||||
EffectSsKirakira_Init,
|
||||
};
|
||||
|
||||
#endif
|
||||
u32 EffectSsKirakira_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
|
||||
EffectSsKirakiraInitParams* initParams = PARAMS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Kirakira/EffectSsKirakira_Init.s")
|
||||
this->pos = initParams->pos;
|
||||
this->velocity = initParams->velocity;
|
||||
this->accel = initParams->accel;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Kirakira/EffectSsKirakira_Draw.s")
|
||||
if ((this->life = initParams->life) < 0) {
|
||||
this->life = -this->life;
|
||||
this->gfx = gEffSparklesDL;
|
||||
this->update = func_80977F28;
|
||||
this->rEnvColorA = initParams->scale;
|
||||
this->rScale = 0;
|
||||
} else {
|
||||
this->gfx = gEffSparklesDL;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Kirakira/func_80977DB4.s")
|
||||
if (initParams->updateMode == 0) {
|
||||
this->update = func_80977DB4;
|
||||
} else {
|
||||
this->update = func_80977E6C;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Kirakira/func_80977E6C.s")
|
||||
this->rEnvColorA = initParams->envColor.a;
|
||||
this->rScale = initParams->scale;
|
||||
if (this->rScale < 0) {
|
||||
this->gfx = gameplay_keep_DL_06A800;
|
||||
this->rScale = -this->rScale;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Kirakira/func_80977F28.s")
|
||||
this->draw = EffectSsKirakira_Draw;
|
||||
this->rRotSpeed = initParams->rotSpeed;
|
||||
this->rYaw = initParams->yaw;
|
||||
this->rPrimColorR = initParams->primColor.r;
|
||||
this->rPrimColorG = initParams->primColor.g;
|
||||
this->rPrimColorB = initParams->primColor.b;
|
||||
this->rPrimColorA = initParams->primColor.a;
|
||||
this->rEnvColorR = initParams->envColor.r;
|
||||
this->rEnvColorG = initParams->envColor.g;
|
||||
this->rEnvColorB = initParams->envColor.b;
|
||||
this->rAlphaStep = initParams->alphaStep;
|
||||
this->rLifespan = initParams->life;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void EffectSsKirakira_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
GraphicsContext* gfxCtx;
|
||||
f32 scale = this->rScale / 10000.0f;
|
||||
s32 pad;
|
||||
MtxF mfTrans;
|
||||
MtxF mfRot;
|
||||
MtxF mfScale;
|
||||
MtxF mfTransBillboard;
|
||||
MtxF mfTransBillboardRot;
|
||||
MtxF mfResult;
|
||||
Mtx* mtx;
|
||||
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z);
|
||||
SkinMatrix_SetRotateRPY(&mfRot, 0, 0, this->rYaw);
|
||||
SkinMatrix_SetScale(&mfScale, scale, scale, 1.0f);
|
||||
SkinMatrix_MtxFMtxFMult(&mfTrans, &globalCtx->billboardMtxF, &mfTransBillboard);
|
||||
SkinMatrix_MtxFMtxFMult(&mfTransBillboard, &mfRot, &mfTransBillboardRot);
|
||||
SkinMatrix_MtxFMtxFMult(&mfTransBillboardRot, &mfScale, &mfResult);
|
||||
gSPMatrix(POLY_XLU_DISP++, &gIdentityMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult);
|
||||
|
||||
if (mtx != NULL) {
|
||||
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
func_8012C2DC(gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB,
|
||||
(((s8)((55.0f / this->rLifespan) * this->life) + 200)));
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA);
|
||||
gSPClearGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
||||
gSPDisplayList(POLY_XLU_DISP++, this->gfx);
|
||||
gSPSetGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
void func_80977DB4(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
this->accel.x = (Rand_ZeroOne() * 0.4f) - 0.2f;
|
||||
this->accel.z = (Rand_ZeroOne() * 0.4f) - 0.2f;
|
||||
this->rEnvColorA += this->rAlphaStep;
|
||||
|
||||
if (this->rEnvColorA < 0) {
|
||||
this->rEnvColorA = 0;
|
||||
this->rAlphaStep = -this->rAlphaStep;
|
||||
} else if (this->rEnvColorA > 255) {
|
||||
this->rEnvColorA = 255;
|
||||
this->rAlphaStep = -this->rAlphaStep;
|
||||
}
|
||||
|
||||
this->rYaw += this->rRotSpeed;
|
||||
}
|
||||
|
||||
void func_80977E6C(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
this->velocity.x *= 0.95f;
|
||||
this->velocity.z *= 0.95f;
|
||||
this->accel.x = randPlusMinusPoint5Scaled(0.2f);
|
||||
this->accel.z = randPlusMinusPoint5Scaled(0.2f);
|
||||
this->rEnvColorA += this->rAlphaStep;
|
||||
|
||||
if (this->rEnvColorA < 0) {
|
||||
this->rEnvColorA = 0;
|
||||
this->rAlphaStep = -this->rAlphaStep;
|
||||
} else if (this->rEnvColorA > 255) {
|
||||
this->rEnvColorA = 255;
|
||||
this->rAlphaStep = -this->rAlphaStep;
|
||||
}
|
||||
|
||||
this->rYaw += this->rRotSpeed;
|
||||
}
|
||||
|
||||
void func_80977F28(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
this->rScale = this->rEnvColorA * Math_SinS((32768.0f / this->rLifespan) * this->life);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ typedef struct {
|
|||
/* 0x34 */ s16 rotSpeed;
|
||||
/* 0x36 */ s16 yaw;
|
||||
/* 0x38 */ u8 updateMode;
|
||||
} EffectSsKiraKiraInitParams; // size = 0x3C
|
||||
} EffectSsKirakiraInitParams; // size = 0x3C
|
||||
|
||||
extern const EffectSsInit Effect_Ss_Kirakira_InitVars;
|
||||
|
||||
|
|
|
|||
|
|
@ -596,10 +596,10 @@
|
|||
0x800B13D8:("func_800B13D8",),
|
||||
0x800B14D4:("func_800B14D4",),
|
||||
0x800B1598:("func_800B1598",),
|
||||
0x800B165C:("EffectSsKiraKira_SpawnSmallYellow",),
|
||||
0x800B16B8:("EffectSsKiraKira_SpawnSmall",),
|
||||
0x800B16F4:("EffectSsKiraKira_SpawnDispersed",),
|
||||
0x800B1830:("EffectSsKiraKira_SpawnFocused",),
|
||||
0x800B165C:("EffectSsKirakira_SpawnSmallYellow",),
|
||||
0x800B16B8:("EffectSsKirakira_SpawnSmall",),
|
||||
0x800B16F4:("EffectSsKirakira_SpawnDispersed",),
|
||||
0x800B1830:("EffectSsKirakira_SpawnFocused",),
|
||||
0x800B1908:("EffectSsBomb2_SpawnFade",),
|
||||
0x800B1970:("EffectSsBomb2_SpawnLayered",),
|
||||
0x800B19E0:("EffectSsBlast_Spawn",),
|
||||
|
|
|
|||
|
|
@ -499,6 +499,11 @@ wordReplace = {
|
|||
"func_8015E750": "Message_FindCreditsMessage",
|
||||
"func_80133038": "Schedule_RunScript",
|
||||
|
||||
"EffectSsKiraKira_SpawnSmallYellow": "EffectSsKirakira_SpawnSmallYellow",
|
||||
"EffectSsKiraKira_SpawnSmall": "EffectSsKirakira_SpawnSmall",
|
||||
"EffectSsKiraKira_SpawnDispersed": "EffectSsKirakira_SpawnDispersed",
|
||||
"EffectSsKiraKira_SpawnFocused": "EffectSsKirakira_SpawnFocused",
|
||||
|
||||
# Struct members
|
||||
"skelAnime.unk03": "skelAnime.taper",
|
||||
"skelAnime.animCurrentSeg": "skelAnime.animation",
|
||||
|
|
|
|||
|
|
@ -110,10 +110,10 @@ asm/non_matchings/code/z_effect_soft_sprite_old_init/func_800B139C.s,func_800B13
|
|||
asm/non_matchings/code/z_effect_soft_sprite_old_init/func_800B13D8.s,func_800B13D8,0x800B13D8,0x3F
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/func_800B14D4.s,func_800B14D4,0x800B14D4,0x31
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/func_800B1598.s,func_800B1598,0x800B1598,0x31
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsKiraKira_SpawnSmallYellow.s,EffectSsKiraKira_SpawnSmallYellow,0x800B165C,0x17
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsKiraKira_SpawnSmall.s,EffectSsKiraKira_SpawnSmall,0x800B16B8,0xF
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsKiraKira_SpawnDispersed.s,EffectSsKiraKira_SpawnDispersed,0x800B16F4,0x4F
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsKiraKira_SpawnFocused.s,EffectSsKiraKira_SpawnFocused,0x800B1830,0x36
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsKirakira_SpawnSmallYellow.s,EffectSsKirakira_SpawnSmallYellow,0x800B165C,0x17
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsKirakira_SpawnSmall.s,EffectSsKirakira_SpawnSmall,0x800B16B8,0xF
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsKirakira_SpawnDispersed.s,EffectSsKirakira_SpawnDispersed,0x800B16F4,0x4F
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsKirakira_SpawnFocused.s,EffectSsKirakira_SpawnFocused,0x800B1830,0x36
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsBomb2_SpawnFade.s,EffectSsBomb2_SpawnFade,0x800B1908,0x1A
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsBomb2_SpawnLayered.s,EffectSsBomb2_SpawnLayered,0x800B1970,0x1C
|
||||
asm/non_matchings/code/z_effect_soft_sprite_old_init/EffectSsBlast_Spawn.s,EffectSsBlast_Spawn,0x800B19E0,0x24
|
||||
|
|
|
|||
|
Loading…
Reference in New Issue