typedef enum
{
- pt_static, pt_rain, pt_bubble, pt_blood
+ pt_static, pt_rain, pt_bubble, pt_blood, pt_grow
}
ptype_t;
// these must match r_part.c's textures
static const int tex_smoke[8] = {0, 1, 2, 3, 4, 5, 6, 7};
-static const int tex_rainsplash[16] = {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};
+//static const int tex_rainsplash[16] = {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23};
static const int tex_particle = 24;
-static const int tex_rain = 25;
+//static const int tex_rain = 25;
static const int tex_bubble = 26;
static int cl_maxparticles;
k = count / 4;
while(k--)
{
- particle(pt_static, PARTICLE_BILLBOARD, 0x101010, 0x202020, tex_smoke[rand()&7], true, true, 4, 4, 255, 1024, 9999, -0.2, 0, org[0] + 0.125f * lhrandom(-count, count), org[1] + 0.125f * lhrandom (-count, count), org[2] + 0.125f * lhrandom(-count, count), lhrandom(-8, 8), lhrandom(-8, 8), lhrandom(0, 16), 0, 0, 0, 0, 0, 0);
+ particle(pt_grow, PARTICLE_BILLBOARD, 0x101010, 0x202020, tex_smoke[rand()&7], true, true, 3, 3, 255, 1024, 9999, -0.2, 0, org[0] + 0.125f * lhrandom(-count, count), org[1] + 0.125f * lhrandom (-count, count), org[2] + 0.125f * lhrandom(-count, count), lhrandom(-8, 8), lhrandom(-8, 8), lhrandom(0, 16), 15, 0, 0, 0, 0, 0);
}
}
dec = 3;
if (smoke)
{
- particle(pt_static, PARTICLE_BILLBOARD, 0x303030, 0x606060, tex_smoke[rand()&7], false, true, dec, dec, 32, 64, 9999, 0, 0, pos[0], pos[1], pos[2], lhrandom(-5, 5), lhrandom(-5, 5), lhrandom(-5, 5), 0, 0, 0, 0, 0, 0);
+ particle(pt_grow, PARTICLE_BILLBOARD, 0x303030, 0x606060, tex_smoke[rand()&7], false, true, dec, dec, 32, 64, 9999, 0, 0, pos[0], pos[1], pos[2], lhrandom(-5, 5), lhrandom(-5, 5), lhrandom(-5, 5), 6, 0, 0, 0, 0, 0);
particle(pt_static, PARTICLE_BILLBOARD, 0x801010, 0xFFA020, tex_smoke[rand()&7], false, true, dec, dec, 128, 768, 9999, 0, 0, pos[0], pos[1], pos[2], lhrandom(-20, 20), lhrandom(-20, 20), lhrandom(-20, 20), 0, 0, 0, 0, 0, 0);
}
if (bubbles)
if (a != CONTENTS_EMPTY && a != CONTENTS_SKY)
p->die = -1;
break;
+ case pt_grow:
+ p->scalex += frametime * p->time2;
+ p->scaley += frametime * p->time2;
+ break;
default:
printf("unknown particle type %i\n", p->type);
p->die = -1;
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
#else
- particlefonttexture = R_LoadTexture (particletexturepool, "particlefont", 256, 256, particletexturedata, TEXTYPE_RGBA, TEXF_ALPHA | TEXF_PRECACHE);
+ particlefonttexture = R_LoadTexture2D(particletexturepool, "particlefont", 256, 256, particletexturedata, TEXTYPE_RGBA, TEXF_ALPHA | TEXF_PRECACHE, NULL);
#endif
}
cb *= r_colorscale;
varray_texcoord[0][0] = tex->s2;varray_texcoord[0][1] = tex->t1;
- varray_texcoord[0][2] = tex->s1;varray_texcoord[0][3] = tex->t1;
- varray_texcoord[0][4] = tex->s1;varray_texcoord[0][5] = tex->t2;
- varray_texcoord[0][6] = tex->s2;varray_texcoord[0][7] = tex->t2;
+ varray_texcoord[0][4] = tex->s1;varray_texcoord[0][5] = tex->t1;
+ varray_texcoord[0][8] = tex->s1;varray_texcoord[0][9] = tex->t2;
+ varray_texcoord[0][12] = tex->s2;varray_texcoord[0][13] = tex->t2;
#endif
if (orientation == PARTICLE_BEAM)