summaryrefslogtreecommitdiffstats
path: root/src/render/Particle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/Particle.cpp')
-rw-r--r--src/render/Particle.cpp39
1 files changed, 38 insertions, 1 deletions
diff --git a/src/render/Particle.cpp b/src/render/Particle.cpp
index f175c264..08137d0c 100644
--- a/src/render/Particle.cpp
+++ b/src/render/Particle.cpp
@@ -3,6 +3,7 @@
#include "General.h"
#include "Timer.h"
#include "TxdStore.h"
+#include "Entity.h"
#include "Sprite.h"
#include "Camera.h"
#include "Collision.h"
@@ -388,9 +389,11 @@ void CParticle::Initialise()
gpFlame5Tex = RwTextureRead("flame5", nil);
-#ifdef FIX_BUGS
+//#ifdef FIX_BUGS
+#if 0
gpFlame5Raster = RwTextureGetRaster(gpFlame5Tex);
#else
+ // this seems to have become more of a design choice
gpFlame5Raster = RwTextureGetRaster(gpFlame1Tex); // copy-paste bug ?
#endif
@@ -583,6 +586,40 @@ void CParticle::Initialise()
debug("CParticle ready");
}
+void
+CEntity::AddSteamsFromGround(CVector *unused)
+{
+ int i, n;
+ C2dEffect *effect;
+ CVector pos;
+
+ n = CModelInfo::GetModelInfo(GetModelIndex())->GetNum2dEffects();
+ for(i = 0; i < n; i++){
+ effect = CModelInfo::GetModelInfo(GetModelIndex())->Get2dEffect(i);
+ if(effect->type != EFFECT_PARTICLE)
+ continue;
+
+ pos = GetMatrix() * effect->pos;
+ switch(effect->particle.particleType){
+ case 0:
+ CParticleObject::AddObject(POBJECT_PAVEMENT_STEAM, pos, effect->particle.dir, effect->particle.scale, false);
+ break;
+ case 1:
+ CParticleObject::AddObject(POBJECT_WALL_STEAM, pos, effect->particle.dir, effect->particle.scale, false);
+ break;
+ case 2:
+ CParticleObject::AddObject(POBJECT_DRY_ICE, pos, effect->particle.scale, false);
+ break;
+ case 3:
+ CParticleObject::AddObject(POBJECT_SMALL_FIRE, pos, effect->particle.dir, effect->particle.scale, false);
+ break;
+ case 4:
+ CParticleObject::AddObject(POBJECT_DARK_SMOKE, pos, effect->particle.dir, effect->particle.scale, false);
+ break;
+ }
+ }
+}
+
void CParticle::Shutdown()
{
debug("Shutting down CParticle...");