mirror of https://github.com/zeldaret/mm.git
parent
9831e5e063
commit
1a37ef95d1
|
|
@ -1114,8 +1114,8 @@
|
|||
<DList Name="gFrozenIceDL" Offset="0x50648" />
|
||||
<DList Name="gFrozenIceVtxDL" Offset="0x506E0" />
|
||||
<DList Name="gameplay_keep_DL_050D10" Offset="0x50D10" />
|
||||
<Texture Name="gameplay_keep_Tex_050E80" OutName="tex_050E80" Format="i4" Width="32" Height="32" Offset="0x50E80" />
|
||||
<DList Name="gameplay_keep_DL_0510B0" Offset="0x510B0" />
|
||||
<Texture Name="gEffIceSmokeTex" OutName="eff_ice_smoke" Format="i4" Width="32" Height="32" Offset="0x50E80" />
|
||||
<DList Name="gEffIceSmokeDL" Offset="0x510B0" />
|
||||
<DList Name="gFrozenSteamDL" Offset="0x51180" />
|
||||
<DList Name="gFrozenSteamVtxDL" Offset="0x51238" />
|
||||
<Animation Name="gameplay_keep_Anim_05140C" Offset="0x5140C" />
|
||||
|
|
|
|||
3
spec
3
spec
|
|
@ -2152,8 +2152,7 @@ beginseg
|
|||
name "ovl_Effect_Ss_Ice_Smoke"
|
||||
compress
|
||||
include "build/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/z_eff_ss_ice_smoke.o"
|
||||
include "build/data/ovl_Effect_Ss_Ice_Smoke/ovl_Effect_Ss_Ice_Smoke.data.o"
|
||||
include "build/data/ovl_Effect_Ss_Ice_Smoke/ovl_Effect_Ss_Ice_Smoke.reloc.o"
|
||||
include "build/src/overlays/effects/ovl_Effect_Ss_Ice_Smoke/ovl_Effect_Ss_Ice_Smoke_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
|||
|
|
@ -1,27 +1,79 @@
|
|||
/*
|
||||
* File: z_eff_ss_ice_smoke.c
|
||||
* Overlay: ovl_Effect_Ss_Ice_Smoke
|
||||
* Description:
|
||||
* Description: Ice Smoke
|
||||
*/
|
||||
|
||||
#include "z_eff_ss_ice_smoke.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
#define rAlpha regs[0]
|
||||
#define rScale regs[1]
|
||||
#define rScrollX regs[2]
|
||||
#define rScrollY regs[3]
|
||||
|
||||
#define PARAMS ((EffectSsIceSmokeInitParams*)initParamsx)
|
||||
|
||||
s32 EffectSsIceSmoke_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx);
|
||||
u32 EffectSsIceSmoke_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx);
|
||||
void EffectSsIceSmoke_Update(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
void EffectSsIceSmoke_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this);
|
||||
|
||||
#if 0
|
||||
const EffectSsInit Effect_Ss_Ice_Smoke_InitVars = {
|
||||
EFFECT_SS_ICE_SMOKE,
|
||||
EffectSsIceSmoke_Init,
|
||||
};
|
||||
|
||||
#endif
|
||||
u32 EffectSsIceSmoke_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
|
||||
EffectSsIceSmokeInitParams* initParams = PARAMS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Ice_Smoke/EffectSsIceSmoke_Init.s")
|
||||
Math_Vec3f_Copy(&this->pos, &initParams->pos);
|
||||
Math_Vec3f_Copy(&this->velocity, &initParams->velocity);
|
||||
Math_Vec3f_Copy(&this->accel, &initParams->accel);
|
||||
this->rAlpha = 0;
|
||||
this->rScale = ABS_ALT(initParams->scale);
|
||||
if (initParams->scale < 0) {
|
||||
this->rScrollX = 1;
|
||||
this->rScrollY = 2;
|
||||
} else {
|
||||
this->rScrollX = 3;
|
||||
this->rScrollY = 15;
|
||||
}
|
||||
this->life = 50;
|
||||
this->draw = EffectSsIceSmoke_Draw;
|
||||
this->update = EffectSsIceSmoke_Update;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Ice_Smoke/EffectSsIceSmoke_Draw.s")
|
||||
return 1;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Ice_Smoke/EffectSsIceSmoke_Update.s")
|
||||
void EffectSsIceSmoke_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
s32 pad;
|
||||
Mtx* mtx;
|
||||
f32 scale;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
func_8012C2DC(globalCtx->state.gfxCtx);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 195, 235, 235, this->rAlpha);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, this->rScrollX * this->life, this->rScrollY * this->life,
|
||||
0x20, 0x40, 1, 0, 0, 0x20, 0x20));
|
||||
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
|
||||
Matrix_ReplaceRotation(&globalCtx->billboardMtxF);
|
||||
scale = this->rScale * 0.0001f;
|
||||
Matrix_Scale(scale, scale, 1.0f, MTXMODE_APPLY);
|
||||
mtx = Matrix_NewMtx(globalCtx->state.gfxCtx);
|
||||
if (mtx != NULL) {
|
||||
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffIceSmokeDL);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
}
|
||||
|
||||
void EffectSsIceSmoke_Update(GlobalContext* globalCtx, u32 index, EffectSs* this) {
|
||||
if (this->life < 10) {
|
||||
Math_StepToS(&this->rAlpha, 0, 10);
|
||||
} else if (this->rAlpha < 100) {
|
||||
this->rAlpha += 10;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue