All animation references now auto-generate from gfx.txt. All animation references in code have been updated. Safemaps now have the ability to reset their contents (currently used for GFX map unloading) since Renderables must be deleted before the engine uninitializes. Slime King jump now has knockback.

This commit is contained in:
2023-09-16 07:00:38 -05:00
parent ba8a1bd091
commit 465fb0b6c2
33 changed files with 203 additions and 208 deletions
+7 -7
View File
@@ -25,7 +25,7 @@ bool PulsatingFire::Update(float fElapsedTime){
float randomRange=12*size.x*(1-util::random("Wizard.Ability 3.FireRingParticleRandomVariance"_F))*(1-util::random("Wizard.Ability 3.FireRingParticleRandomVariance"_F));
float randomColorTintG=128*(1-util::random("Wizard.Ability 3.FireRingParticleColorGVariance"_F))*(1-util::random("Wizard.Ability 3.FireRingParticleColorGVariance"_F));
float randomColorTint="Wizard.Ability 3.FireRingParticleColorBlueRange"_FRange;
game->AddEffect(std::make_unique<Effect>(pos+vf2d{cos(randomAngle),sin(randomAngle)}*randomRange,0,"DOT_PARTICLE",OnUpperLevel(),vf2d{"Wizard.Ability 3.FireRingParticleXSizeRange"_FRange,"Wizard.Ability 3.FireRingParticleYSizeRange"_FRange},"Wizard.Ability 3.FireRingParticleFadeoutTimeRange"_FRange,vf2d{"Wizard.Ability 3.FireRingParticleXSpeedRange"_FRange,"Wizard.Ability 3.FireRingParticleYSpeedRange"_FRange},Pixel{128,uint8_t(randomColorTintG),uint8_t(randomColorTint),uint8_t("Wizard.Ability 3.FireRingParticleAlphaRange"_FRange)}));
game->AddEffect(std::make_unique<Effect>(pos+vf2d{cos(randomAngle),sin(randomAngle)}*randomRange,0,"circle.png",OnUpperLevel(),vf2d{"Wizard.Ability 3.FireRingParticleXSizeRange"_FRange,"Wizard.Ability 3.FireRingParticleYSizeRange"_FRange},"Wizard.Ability 3.FireRingParticleFadeoutTimeRange"_FRange,vf2d{"Wizard.Ability 3.FireRingParticleXSpeedRange"_FRange,"Wizard.Ability 3.FireRingParticleYSpeedRange"_FRange},Pixel{128,uint8_t(randomColorTintG),uint8_t(randomColorTint),uint8_t("Wizard.Ability 3.FireRingParticleAlphaRange"_FRange)}));
}
lastParticleTimer="Wizard.Ability 3.FireRingParticleFreqRange"_FRange;
}
@@ -41,22 +41,22 @@ void PulsatingFire::Draw(){
Animate2D::FrameSequence*effectSpr=nullptr;
switch(int(pulsatingFireValues[i]*5)){
case 0:{
effectSpr=&ANIMATION_DATA["FIRE_RING1"];
effectSpr=&ANIMATION_DATA["fire_ring0.png"];
}break;
case 1:{
effectSpr=&ANIMATION_DATA["FIRE_RING2"];
effectSpr=&ANIMATION_DATA["fire_ring1.png"];
}break;
case 2:{
effectSpr=&ANIMATION_DATA["FIRE_RING3"];
effectSpr=&ANIMATION_DATA["fire_ring2.png"];
}break;
case 3:{
effectSpr=&ANIMATION_DATA["FIRE_RING4"];
effectSpr=&ANIMATION_DATA["fire_ring3.png"];
}break;
case 4:{
effectSpr=&ANIMATION_DATA["FIRE_RING5"];
effectSpr=&ANIMATION_DATA["fire_ring4.png"];
}break;
default:
effectSpr=&ANIMATION_DATA["FIRE_RING1"];
effectSpr=&ANIMATION_DATA["fire_ring0.png"];
}
const Renderable*img=effectSpr->GetFrame(0).GetSourceImage();
game->view.DrawPartialDecal(pos-effectSpr->GetFrame(0).GetSourceRect().size/2*size,img->Decal(),effectSpr->GetFrame(0).GetSourceRect().pos,effectSpr->GetFrame(0).GetSourceRect().size,size,{255,uint8_t(pulsatingFireValues[i]*256),0,uint8_t((63*(sin("Wizard.Ability 3.FireRingOscillatingFrequency"_F*lifetime+PI*pulsatingFireValues[i]))+63)*(fadeout/original_fadeoutTime))});