- floatification of p_3dfloors, p_3dmidtex and p_acs.cpp plus some leftovers.

- removed all references to Doom specific headers from xs_Float.h and cmath.h.
This commit is contained in:
Christoph Oelckers 2016-03-26 12:36:15 +01:00
commit dabed04d2a
26 changed files with 319 additions and 335 deletions

View file

@ -313,26 +313,27 @@ void P_ThinkParticles ()
}
}
void P_SpawnParticle(fixed_t x, fixed_t y, fixed_t z, fixed_t vx, fixed_t vy, fixed_t vz, PalEntry color, bool fullbright, BYTE startalpha, BYTE lifetime, int size, int fadestep, fixed_t accelx, fixed_t accely, fixed_t accelz)
void P_SpawnParticle(const DVector3 &pos, const DVector3 &vel, const DVector3 &accel, PalEntry color, bool fullbright, double startalpha, int lifetime, WORD size, double fadestep)
{
particle_t *particle = NewParticle();
if (particle)
{
particle->x = x;
particle->y = y;
particle->z = z;
particle->vel.x = vx;
particle->vel.y = vy;
particle->vel.z = vz;
particle->x = FLOAT2FIXED(pos.X);
particle->y = FLOAT2FIXED(pos.Y);
particle->z = FLOAT2FIXED(pos.Z);
particle->vel.x = FLOAT2FIXED(vel.X);
particle->vel.y = FLOAT2FIXED(vel.Y);
particle->vel.z = FLOAT2FIXED(vel.Z);
particle->color = ParticleColor(color);
particle->trans = startalpha;
if (fadestep < 0) fadestep = FADEFROMTTL(lifetime);
particle->fade = fadestep;
particle->trans = BYTE(startalpha*255);
if (fadestep < 0) particle->fade = FADEFROMTTL(lifetime);
else particle->fade = int(fadestep * 255);
particle->ttl = lifetime;
particle->accx = accelx;
particle->accy = accely;
particle->accz = accelz;
particle->accx = FLOAT2FIXED(accel.X);
particle->accy = FLOAT2FIXED(accel.Y);
particle->accz = FLOAT2FIXED(accel.Z);
particle->bright = fullbright;
particle->size = (WORD)size;
}