mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-02 19:45:57 -04:00
@@ -1,27 +1,59 @@
|
||||
/*
|
||||
* File: z_eff_ss_g_fire.c
|
||||
* Overlay: ovl_Effect_Ss_G_Fire
|
||||
* Description:
|
||||
* Description: Flame Footprints
|
||||
*/
|
||||
|
||||
#include "z_eff_ss_g_fire.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
#define PARAMS ((EffectSsGFireInitParams*)initParamsx)
|
||||
|
||||
s32 EffectSsGFire_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx);
|
||||
u32 EffectSsGFire_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx);
|
||||
void EffectSsGFire_Update(PlayState* play, u32 index, EffectSs* this);
|
||||
void EffectSsGFire_Draw(PlayState* play, u32 index, EffectSs* this);
|
||||
|
||||
#if 0
|
||||
const EffectSsInit Effect_Ss_G_Fire_InitVars = {
|
||||
EFFECT_SS_G_FIRE,
|
||||
EffectSsGFire_Init,
|
||||
};
|
||||
|
||||
#endif
|
||||
u32 EffectSsGFire_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx) {
|
||||
EffectSsGFireInitParams* initParams = PARAMS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_G_Fire/EffectSsGFire_Init.s")
|
||||
Math_Vec3f_Copy(&this->velocity, &gZeroVec3f);
|
||||
Math_Vec3f_Copy(&this->accel, &gZeroVec3f);
|
||||
Math_Vec3f_Copy(&this->pos, &initParams->pos);
|
||||
this->draw = EffectSsGFire_Draw;
|
||||
this->update = EffectSsGFire_Update;
|
||||
this->gfx = gEffFireFootprintDL;
|
||||
this->life = 8;
|
||||
this->flags = 0;
|
||||
this->rgScale = 200;
|
||||
this->rgTexIndex = 0;
|
||||
this->rgTexIndexStep = 50;
|
||||
this->rgPrimColorR = 255;
|
||||
this->rgPrimColorG = 220;
|
||||
this->rgPrimColorB = 80;
|
||||
this->rgPrimColorA = 255;
|
||||
this->rgEnvColorR = 130;
|
||||
this->rgEnvColorG = 30;
|
||||
this->rgEnvColorB = 0;
|
||||
this->rgEnvColorA = 0;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_G_Fire/EffectSsGFire_Draw.s")
|
||||
return 1;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_G_Fire/EffectSsGFire_Update.s")
|
||||
void EffectSsGFire_Draw(PlayState* play, u32 index, EffectSs* this) {
|
||||
TexturePtr fireFootprintTextures[] = {
|
||||
gEffFireFootprint1Tex, gEffFireFootprint2Tex, gEffFireFootprint3Tex, gEffFireFootprint4Tex,
|
||||
gEffFireFootprint5Tex, gEffFireFootprint6Tex, gEffFireFootprint7Tex, gEffFireFootprint8Tex,
|
||||
};
|
||||
s16 texIndex = (this->rgTexIndex / 100) % 7;
|
||||
|
||||
EffectSs_DrawGEffect(play, this, fireFootprintTextures[texIndex]);
|
||||
}
|
||||
|
||||
void EffectSsGFire_Update(PlayState* play, u32 index, EffectSs* this) {
|
||||
this->rgTexIndex += this->rgTexIndexStep;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user