From d2235e29a0aea252fcab57bdbdeba49e59158809 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 25 Mar 2021 11:18:13 +0100 Subject: [PATCH] notknot:: fog now uses rainbow colors --- rogueviz/notknot.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/rogueviz/notknot.cpp b/rogueviz/notknot.cpp index 984596f0..072e6b70 100644 --- a/rogueviz/notknot.cpp +++ b/rogueviz/notknot.cpp @@ -1098,10 +1098,32 @@ struct hrmap_notknot : hrmap { } }; + int qty = 0; for(int i=0; iresult) - if(all[i]->where->c7->wall == waFloorA) - color(all[i]->result->c7, cols[(id++) % isize(cols)], 0); + if(all[i]->where->c7->wall == waFloorA) + qty++; + + for(int i=0; iresult) + if(all[i]->where->c7->wall == waFloorA) { + cell *c = all[i]->result->c7; + if(dist.count(c)) continue; + int idd = (id++) % isize(cols); + color_t col = rainbow_color(1, idd * 1. / qty); + col <<= 8; col |= 1; + + color(c, cols[idd], 0); + /*for(int i=0; i<8; i++) + c = c->move(4); + color(c, cols[idd], 0); + for(int i=0; i<8; i++) + c = c->move(5); + color(c, cols[idd], 0); + for(int i=0; i<8; i++) + c = c->move(4); + color(c, cols[idd], 0); */ + } for(int i=0; i