diff options
| author | xolatile | 2025-08-10 00:19:46 +0200 |
|---|---|---|
| committer | xolatile | 2025-08-10 00:19:46 +0200 |
| commit | 757096e7df15c14b9b10352fa91663483f9e34f8 (patch) | |
| tree | dcad789d0abd8be76463277dc01bf32c4e6a527b /src/engine/renderparticles.cpp | |
| parent | b2c89d7060e99a36c8c7ac897b7386686c74deac (diff) | |
| download | xolatile-badassbug-757096e7df15c14b9b10352fa91663483f9e34f8.tar.xz xolatile-badassbug-757096e7df15c14b9b10352fa91663483f9e34f8.tar.zst | |
all
Diffstat (limited to 'src/engine/renderparticles.cpp')
| -rw-r--r-- | src/engine/renderparticles.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/engine/renderparticles.cpp b/src/engine/renderparticles.cpp index dbdf855..637dcb2 100644 --- a/src/engine/renderparticles.cpp +++ b/src/engine/renderparticles.cpp @@ -146,7 +146,7 @@ struct partrenderer { virtual void render() = 0; virtual bool haswork() = 0; virtual void cleanup() {} - virtual void seedemitter(particleemitter &pe, const vec &o, const vec &d, int fade, float size, int gravity) { + virtual void seedemitter(particleemitter &, const vec &, const vec &, int , float , int ) { } //blend = 0 => remove it void calc(particle *p, int &blend, int &ts, vec &o, vec &d, bool step = true) { @@ -409,16 +409,8 @@ struct texticonrenderer : listrenderer { static texticonrenderer texticons("packages/hud/items.png", PT_TEXTICON|PT_LERP); template<int T> -static inline void modifyblend(const vec &o, int &blend) { - blend = min(blend<<2, 255); -} - -template<> -inline void modifyblend<PT_TAPE>(const vec &o, int &blend) { -} - -template<int T> static inline void genpos(const vec &o, const vec &d, float size, int grav, int ts, partvert *vs) { + (void) o; (void) size; (void) d; (void) grav; (void) ts; (void) vs; vec udir = vec(camup).sub(camright).mul(size); vec vdir = vec(camup).add(camright).mul(size); vs[0].pos = vec(o.x + udir.x, o.y + udir.y, o.z + udir.z); @@ -429,6 +421,7 @@ static inline void genpos(const vec &o, const vec &d, float size, int grav, int template<> inline void genpos<PT_TAPE>(const vec &o, const vec &d, float size, int ts, int grav, partvert *vs) { + (void) o; (void) size; (void) d; (void) grav; (void) ts; (void) vs; vec dir1 = d, dir2 = d, c; dir1.sub(o); dir2.sub(camera1->o); @@ -441,6 +434,7 @@ inline void genpos<PT_TAPE>(const vec &o, const vec &d, float size, int ts, int template<> inline void genpos<PT_TRAIL>(const vec &o, const vec &d, float size, int ts, int grav, partvert *vs) { + (void) o; (void) size; (void) d; (void) grav; (void) ts; (void) vs; vec e = d; if(grav) e.z -= float(ts)/grav; e.div(-75.0f).add(o); @@ -449,6 +443,7 @@ inline void genpos<PT_TRAIL>(const vec &o, const vec &d, float size, int ts, int template<int T> static inline void genrotpos(const vec &o, const vec &d, float size, int grav, int ts, partvert *vs, int rot) { + (void) o; (void) size; (void) d; (void) grav; (void) ts; (void) vs; (void) rot; genpos<T>(o, d, size, grav, ts, vs); } @@ -467,6 +462,7 @@ static const vec rotcoeffs[32][4] = { template<> inline void genrotpos<PT_PART>(const vec &o, const vec &d, float size, int grav, int ts, partvert *vs, int rot) { + (void) o; (void) size; (void) d; (void) grav; (void) ts; (void) vs; (void) rot; const vec *coeffs = rotcoeffs[rot]; (vs[0].pos = o).add(vec(camright).mul(coeffs[0].x*size)).add(vec(camup).mul(coeffs[0].y*size)); (vs[1].pos = o).add(vec(camright).mul(coeffs[1].x*size)).add(vec(camup).mul(coeffs[1].y*size)); @@ -577,7 +573,7 @@ struct varenderer : partrenderer { int blend, ts; calc(p, blend, ts, o, d); if(blend <= 1 || p->fade <= 5) p->fade = -1; //mark to remove on next pass (i.e. after render) - modifyblend<T>(o, blend); + blend = min(blend<<2, 255); if(regen) { p->flags &= ~0x80; #define SETTEXCOORDS(u1c, u2c, v1c, v2c, body) { \ |
