mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 01:20:37 +00:00
3d:: nice fire
This commit is contained in:
parent
321a709f91
commit
0c125efb15
17
graph.cpp
17
graph.cpp
@ -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)
|
||||||
|
1
hyper.h
1
hyper.h
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user