mirror of https://github.com/zeldaret/mm.git
OK (#1040)
This commit is contained in:
parent
77be902c25
commit
71a18d70cf
|
|
@ -2552,7 +2552,7 @@ void func_80168DAC(PlayState* play);
|
||||||
void Play_Main(PlayState* play);
|
void Play_Main(PlayState* play);
|
||||||
s32 Play_InCsMode(PlayState* play);
|
s32 Play_InCsMode(PlayState* play);
|
||||||
f32 func_80169100(PlayState* play, MtxF* mtx, CollisionPoly** arg2, s32* arg3, Vec3f* feetPosPtr);
|
f32 func_80169100(PlayState* play, MtxF* mtx, CollisionPoly** arg2, s32* arg3, Vec3f* feetPosPtr);
|
||||||
// void func_801691F0(void);
|
void func_801691F0(PlayState* play, MtxF* mtx, Vec3f* arg2);
|
||||||
void* Play_LoadScene(PlayState* play, RomFile* entry);
|
void* Play_LoadScene(PlayState* play, RomFile* entry);
|
||||||
void func_8016927C(PlayState* play, s16 sParm2);
|
void func_8016927C(PlayState* play, s16 sParm2);
|
||||||
// void func_801692C4(PlayState* play, UNK_TYPE1 uParm2);
|
// void func_801692C4(PlayState* play, UNK_TYPE1 uParm2);
|
||||||
|
|
|
||||||
3
spec
3
spec
|
|
@ -1758,8 +1758,7 @@ beginseg
|
||||||
name "ovl_Effect_Ss_Blast"
|
name "ovl_Effect_Ss_Blast"
|
||||||
compress
|
compress
|
||||||
include "build/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.o"
|
include "build/src/overlays/effects/ovl_Effect_Ss_Blast/z_eff_ss_blast.o"
|
||||||
include "build/data/ovl_Effect_Ss_Blast/ovl_Effect_Ss_Blast.data.o"
|
include "build/src/overlays/effects/ovl_Effect_Ss_Blast/ovl_Effect_Ss_Blast_reloc.o"
|
||||||
include "build/data/ovl_Effect_Ss_Blast/ovl_Effect_Ss_Blast.reloc.o"
|
|
||||||
endseg
|
endseg
|
||||||
|
|
||||||
beginseg
|
beginseg
|
||||||
|
|
|
||||||
|
|
@ -298,7 +298,7 @@ void EffectSsBomb2_SpawnLayered(PlayState* play, Vec3f* pos, Vec3f* velocity, Ve
|
||||||
// EffectSsBlast Spawn Functions
|
// EffectSsBlast Spawn Functions
|
||||||
|
|
||||||
void EffectSsBlast_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
|
void EffectSsBlast_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor,
|
||||||
Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 sclaeStepDecay, s16 life) {
|
Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 scaleStepDecay, s16 life) {
|
||||||
EffectSsBlastInitParams initParams;
|
EffectSsBlastInitParams initParams;
|
||||||
|
|
||||||
Math_Vec3f_Copy(&initParams.pos, pos);
|
Math_Vec3f_Copy(&initParams.pos, pos);
|
||||||
|
|
@ -308,7 +308,7 @@ void EffectSsBlast_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* ac
|
||||||
Color_RGBA8_Copy(&initParams.envColor, envColor);
|
Color_RGBA8_Copy(&initParams.envColor, envColor);
|
||||||
initParams.scale = scale;
|
initParams.scale = scale;
|
||||||
initParams.scaleStep = scaleStep;
|
initParams.scaleStep = scaleStep;
|
||||||
initParams.sclaeStepDecay = sclaeStepDecay;
|
initParams.scaleStepDecay = scaleStepDecay;
|
||||||
initParams.life = life;
|
initParams.life = life;
|
||||||
|
|
||||||
EffectSs_Spawn(play, EFFECT_SS_BLAST, 128, &initParams);
|
EffectSs_Spawn(play, EFFECT_SS_BLAST, 128, &initParams);
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,90 @@
|
||||||
/*
|
/*
|
||||||
* File: z_eff_ss_blast.c
|
* File: z_eff_ss_blast.c
|
||||||
* Overlay: ovl_Effect_Ss_Blast
|
* Overlay: ovl_Effect_Ss_Blast
|
||||||
* Description:
|
* Description: Shockwave Effect
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "z_eff_ss_blast.h"
|
#include "z_eff_ss_blast.h"
|
||||||
|
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||||
|
|
||||||
|
#define rPrimColorR regs[0]
|
||||||
|
#define rPrimColorG regs[1]
|
||||||
|
#define rPrimColorB regs[2]
|
||||||
|
#define rPrimColorA regs[3]
|
||||||
|
#define rEnvColorR regs[4]
|
||||||
|
#define rEnvColorG regs[5]
|
||||||
|
#define rEnvColorB regs[6]
|
||||||
|
#define rEnvColorA regs[7]
|
||||||
|
#define rAlphaStep regs[8]
|
||||||
|
#define rScale regs[9]
|
||||||
|
#define rScaleStep regs[10]
|
||||||
|
#define rScaleStepDecay regs[11]
|
||||||
|
|
||||||
#define PARAMS ((EffectSsBlastInitParams*)initParamsx)
|
#define PARAMS ((EffectSsBlastInitParams*)initParamsx)
|
||||||
|
|
||||||
s32 EffectSsBlast_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx);
|
u32 EffectSsBlast_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx);
|
||||||
void EffectSsBlast_Update(PlayState* play, u32 index, EffectSs* this);
|
void EffectSsBlast_Update(PlayState* play, u32 index, EffectSs* this);
|
||||||
void EffectSsBlast_Draw(PlayState* play, u32 index, EffectSs* this);
|
void EffectSsBlast_Draw(PlayState* play, u32 index, EffectSs* this);
|
||||||
|
|
||||||
#if 0
|
|
||||||
const EffectSsInit Effect_Ss_Blast_InitVars = {
|
const EffectSsInit Effect_Ss_Blast_InitVars = {
|
||||||
EFFECT_SS_BLAST,
|
EFFECT_SS_BLAST,
|
||||||
EffectSsBlast_Init,
|
EffectSsBlast_Init,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
u32 EffectSsBlast_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx) {
|
||||||
|
EffectSsBlastInitParams* initParams = PARAMS;
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Blast/EffectSsBlast_Init.s")
|
this->pos = initParams->pos;
|
||||||
|
this->pos.y += 5.0f;
|
||||||
|
this->velocity = initParams->velocity;
|
||||||
|
this->accel = initParams->accel;
|
||||||
|
this->gfx = gEffShockwaveDL;
|
||||||
|
this->life = initParams->life;
|
||||||
|
this->draw = EffectSsBlast_Draw;
|
||||||
|
this->update = EffectSsBlast_Update;
|
||||||
|
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->rEnvColorA = initParams->envColor.a;
|
||||||
|
this->rAlphaStep = initParams->primColor.a / initParams->life;
|
||||||
|
this->rScale = initParams->scale;
|
||||||
|
this->rScaleStep = initParams->scaleStep;
|
||||||
|
this->rScaleStepDecay = initParams->scaleStepDecay;
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Blast/EffectSsBlast_Draw.s")
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Blast/EffectSsBlast_Update.s")
|
void EffectSsBlast_Draw(PlayState* play, u32 index, EffectSs* this) {
|
||||||
|
GraphicsContext* gfxCtx = play->state.gfxCtx;
|
||||||
|
MtxF mf;
|
||||||
|
s32 pad;
|
||||||
|
f32 radius;
|
||||||
|
|
||||||
|
OPEN_DISPS(gfxCtx);
|
||||||
|
|
||||||
|
radius = this->rScale * 0.0025f;
|
||||||
|
|
||||||
|
func_8012C2DC(play->state.gfxCtx);
|
||||||
|
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA);
|
||||||
|
func_801691F0(play, &mf, &this->pos);
|
||||||
|
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA);
|
||||||
|
Matrix_Put(&mf);
|
||||||
|
Matrix_Scale(radius, radius, radius, MTXMODE_APPLY);
|
||||||
|
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
gSPDisplayList(POLY_XLU_DISP++, this->gfx);
|
||||||
|
|
||||||
|
CLOSE_DISPS(gfxCtx);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EffectSsBlast_Update(PlayState* play, u32 index, EffectSs* this) {
|
||||||
|
Math_StepToS(&this->rPrimColorA, 0, this->rAlphaStep);
|
||||||
|
this->rScale += this->rScaleStep;
|
||||||
|
|
||||||
|
if (this->rScaleStep != 0) {
|
||||||
|
this->rScaleStep -= this->rScaleStepDecay;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ typedef struct {
|
||||||
/* 0x28 */ Color_RGBA8 envColor;
|
/* 0x28 */ Color_RGBA8 envColor;
|
||||||
/* 0x2C */ s16 scale;
|
/* 0x2C */ s16 scale;
|
||||||
/* 0x2E */ s16 scaleStep;
|
/* 0x2E */ s16 scaleStep;
|
||||||
/* 0x30 */ s16 sclaeStepDecay;
|
/* 0x30 */ s16 scaleStepDecay;
|
||||||
/* 0x32 */ s16 life;
|
/* 0x32 */ s16 life;
|
||||||
} EffectSsBlastInitParams; // size = 0x34
|
} EffectSsBlastInitParams; // size = 0x34
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue