mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-23 06:20:09 +00:00
bubbles react to neon
This commit is contained in:
parent
7396024c38
commit
c4528bf954
12
drawing.cpp
12
drawing.cpp
@ -2015,9 +2015,19 @@ template<class T, class... U> T& queuea(PPR prio, U... u) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CAP_SHAPES
|
||||
EX int neon_mode = 0;
|
||||
|
||||
EX void apply_neon(color_t& col, int& r) {
|
||||
switch(neon_mode) {
|
||||
case 0: break;
|
||||
case 1: poly_outline = col << 8; col = 0; break;
|
||||
case 2: r = 0; break;
|
||||
case 3: poly_outline = col << 8; col &= 0xFEFEFE; col >>= 1; break;
|
||||
}
|
||||
}
|
||||
|
||||
#if CAP_SHAPES
|
||||
|
||||
EX dqi_poly& queuepolyat(const transmatrix& V, const hpcshape& h, color_t col, PPR prio) {
|
||||
if(prio == PPR::DEFAULT) prio = h.prio;
|
||||
|
||||
|
@ -4147,13 +4147,17 @@ EX void draw_flash(struct flashdata& f, const transmatrix& V, bool& kill) {
|
||||
if(tim <= f.size && !f.spd) kill = false;
|
||||
|
||||
if(f.text != "") {
|
||||
color_t col = f.color;
|
||||
dynamicval<color_t> p(poly_outline, poly_outline);
|
||||
int r = 2;
|
||||
apply_neon(col, r);
|
||||
if(GDIM == 3 || sphere)
|
||||
queuestr(V, (1 - tim * 1. / f.size) * f.angle, f.text, f.color);
|
||||
queuestr(V, (1 - tim * 1. / f.size) * f.angle, f.text, col, r);
|
||||
else if(!kill) {
|
||||
hyperpoint h = tC0(V);
|
||||
if(hdist0(h) > .1) {
|
||||
transmatrix V2 = rspintox(h) * xpush(hdist0(h) * (1 / (1 - tim * 1. / f.size)));
|
||||
queuestr(V2, f.angle, f.text, f.color);
|
||||
queuestr(V2, f.angle, f.text, col, r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user