1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 17:10:36 +00:00

3d:: nice fire

This commit is contained in:
? 2019-02-26 20:19:19 +01:00 committed by Zeno Rogue
parent 321a709f91
commit 0c125efb15
2 changed files with 16 additions and 2 deletions

View File

@ -4621,6 +4621,15 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
} }
} }
else if(c->wall == waNone) ; else if(c->wall == waNone) ;
else if(isFire(c)) {
int r = ticks - lastt;
r += rand() % 5 + 1;
r /= 5;
while(r--) {
drawParticleSpeed(c, wcol, 75 + rand() % 75);
}
}
else error = true; else error = true;
} }
@ -5290,9 +5299,13 @@ void drawFlash(cell *c) {
void drawBigFlash(cell *c) { void drawBigFlash(cell *c) {
flashes.push_back(flashdata(ticks, 2000, c, 0xC0FF00, 0)); flashes.push_back(flashdata(ticks, 2000, c, 0xC0FF00, 0));
} }
void drawParticle(cell *c, color_t col, int maxspeed) {
void drawParticleSpeed(cell *c, color_t col, int speed) {
if(vid.particles && !confusingGeometry()) if(vid.particles && !confusingGeometry())
flashes.push_back(flashdata(ticks, rand() % 16, c, col, 1+rand() % maxspeed)); flashes.push_back(flashdata(ticks, rand() % 16, c, col, speed));
}
void drawParticle(cell *c, color_t col, int maxspeed) {
drawParticleSpeed(c, col, 1 + rand() % maxspeed);
} }
void drawParticles(cell *c, color_t col, int qty, int maxspeed) { void drawParticles(cell *c, color_t col, int qty, int maxspeed) {
if(vid.particles) if(vid.particles)

View File

@ -967,6 +967,7 @@ void resetmusic();
void drawFlash(cell* c); void drawFlash(cell* c);
void drawBigFlash(cell* c); void drawBigFlash(cell* c);
void drawParticleSpeed(cell *c, color_t col, int speed);
void drawParticle(cell *c, color_t col, int maxspeed = 100); void drawParticle(cell *c, color_t col, int maxspeed = 100);
void drawParticles(cell *c, color_t col, int qty, int maxspeed = 100); void drawParticles(cell *c, color_t col, int qty, int maxspeed = 100);
void drawFireParticles(cell *c, int qty, int maxspeed = 100); void drawFireParticles(cell *c, int qty, int maxspeed = 100);