Permalink
Browse files

Remove ignit and douse spell particle effects

  • Loading branch information...
Eli2 committed Jun 12, 2014
1 parent e8c324c commit f824b6f7398edbac040f822f985129879edef740
@@ -88,11 +88,6 @@ void CSpellFx::Update(float _fParam) {
Update(checked_range_cast<unsigned long>(_fParam));
}
void Draw3DLineTex2(Vec3f s, Vec3f e, float fSize, Color color, Color color2) {
Draw3DLineTexNew(s, e, color, color2, fSize, fSize);
}
void Draw3DLineTexNew(Vec3f startPos, Vec3f endPos, Color startColor, Color endColor, float startSize, float endSize) {
float fBeta = MAKEANGLE(player.angle.getPitch());
@@ -96,7 +96,6 @@ class CSpellFx
#define frand2() (1.0f - (2.0f * rnd()))
void Draw3DLineTex2(Vec3f s, Vec3f e, float fSize, Color color, Color color2);
void Draw3DLineTexNew(Vec3f startPos, Vec3f endPos, Color startColor, Color endColor, float startSize, float endSize);
void Split(TexturedVertex * v, int a, int b, float fX, float fMulX, float fY, float fMulY, float fZ, float fMulZ);
@@ -891,29 +891,6 @@ void MagFX(const Vec3f & pos) {
pd->is2D = true;
}
void createSphericalSparks(const Vec3f & pos, float r, TextureContainer * tc,
const Color3f & color, int mask) {
int nb = Random::get(0, 31);
for(int i = 0; i < nb; i++) {
PARTICLE_DEF * pd = createParticle(true);
if(!pd) {
return;
}
float a = radians(rnd() * 360.f);
float b = radians(rnd() * 360.f);
pd->special = GRAVITY | PARTICLE_SPARK2;
pd->ov = pd->oldpos = pos;
pd->move = Vec3f(std::sin(a) * std::cos(b), std::sin(a) * std::sin(b), std::cos(a)) * r;
pd->tolive = Random::get(1000, 1500);
pd->rgb = color;
pd->tc = tc;
pd->mask = mask;
}
}
void ARX_PARTICLES_Spawn_Splat(const Vec3f & pos, float dmgs, Color col) {
float power = (dmgs * (1.f / 60)) + .9f;
@@ -1257,7 +1234,6 @@ void ARX_PARTICLES_Update(EERIE_CAMERA * cam) {
continue;
}
Vec3f op = part->oldpos;
if(!arxtime.is_paused()) {
part->oldpos = in.p;
}
@@ -1321,15 +1297,6 @@ void ARX_PARTICLES_Update(EERIE_CAMERA * cam) {
float siz2 = part->siz + part->scale.y * fd;
EERIEAddBitmap(mat, in.p.x, in.p.y, siz, siz2, in.p.z, tc, color);
} else if(part->special & PARTICLE_SPARK2) {
Vec3f pos = in.p;
Color col = (part->rgb * r).to<u8>();
Vec3f end = pos - (pos - op) * 2.5f;
Color masked = Color::fromBGRA(col.toBGRA() & part->mask);
Draw3DLineTex2(end, pos, 2.f, masked, col);
EERIEAddSprite(mat, in, 0.7f, col, 2.f);
} else {
float temp = (part->zdec) ? 0.0001f : 2.f;
@@ -73,7 +73,7 @@ enum ParticlesTypeFlag {
GRAVITY = 0x00000020,
SUBSTRACT = 0x00000040,
FIRE_TO_SMOKE2 = 0x00000080,
PARTICLE_SPARK2 = 0x00000100,
PARTICLE_SPARK2 = 0x00000100, //TODO unused
FOLLOW_SOURCE = 0x00000200,
FOLLOW_SOURCE2 = 0x00000400,
DELAY_FOLLOW_SOURCE = 0x00000800,
@@ -177,8 +177,6 @@ void AddRandomSmoke(Entity * io, long amount = 1);
void LaunchDummyParticle();
void ManageTorch();
void createSphericalSparks(const Vec3f & pos, float r, TextureContainer * tc,
const Color3f & color, int mask);
void MakePlayerAppearsFX(Entity * io);
void MakeCoolFx(const Vec3f & pos);
void SpawnGroundSplat(const Sphere & sp, const Color3f & col, long flags);
@@ -645,10 +645,7 @@ CIgnit::CIgnit()
, m_active(false)
, duration(0)
, currduration(0)
, interp(0.f)
, tp(NULL)
, rgb(0.f, 0.f, 0.f)
, mask(0)
{}
CIgnit::~CIgnit()
@@ -675,10 +672,7 @@ void CIgnit::Create(Vec3f * posc, int speed)
currduration = 0;
m_active = true;
tp = TextureContainer::Load("graph/particles/fire_hit");
rgb = Color3f(1.f, 1.f, 1.f);
mask = Color(255, 200, 0).toBGRA();
}
void CIgnit::Action(bool enable)
@@ -746,8 +740,6 @@ void CIgnit::Update(unsigned long _ulTime)
light->pos = itr->posfx;
}
}
interp = a;
}
if(!arxtime.is_paused())
@@ -756,10 +748,8 @@ void CIgnit::Update(unsigned long _ulTime)
void CDoze::CreateDoze(Vec3f * posc, int speed) {
Create(posc, speed);
tp = TextureContainer::Load("graph/particles/doze_hit");
rgb = Color3f(0.f, .7f, 1.f);
mask = 0xFF0000FF;
}
void CDoze::AddLightDoze(int aiLight)
@@ -777,17 +767,7 @@ void CDoze::AddLightDoze(int aiLight)
}
void CIgnit::Render() {
if(m_active) {
float unsuri = (1.f - interp);
std::vector<T_LINKLIGHTTOFX>::const_iterator itr;
for(itr = tablight.begin(); itr != tablight.end(); ++itr) {
if(rnd() > .5f) {
createSphericalSparks(itr->posfx, rnd() * 20.f * unsuri, tp, rgb, mask);
}
}
}
}
//-----------------------------------------------------------------------------
@@ -109,11 +109,8 @@ class CIgnit : public CSpellFx {
bool m_active;
int duration;
int currduration;
float interp;
TextureContainer * tp;
Color3f rgb;
int mask;
struct T_LINKLIGHTTOFX {
Vec3f poslight;

0 comments on commit f824b6f

Please sign in to comment.