1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-09-29 22:40:41 +00:00

rogueviz::qtm:: fixed after moving rainbow_color

This commit is contained in:
Zeno Rogue 2021-03-25 14:31:02 +01:00
parent 6151859380
commit 9fb616c943

View File

@ -23,7 +23,7 @@ namespace qtm {
int mode; int mode;
color_t rainbow_color(hyperpoint h) { color_t rainbow_color_at(hyperpoint h) {
ld sat = 1 - 1 / h[2]; ld sat = 1 - 1 / h[2];
ld hue = atan2(h[0], h[1]) / (2 * M_PI); ld hue = atan2(h[0], h[1]) / (2 * M_PI);
return rainbow_color(sat, hue); return rainbow_color(sat, hue);
@ -52,7 +52,7 @@ void set_cell(cell *c) {
color_t col; color_t col;
if(hyperbolic) { if(hyperbolic) {
hyperpoint h = calc_relative_matrix(c, currentmap->gamestart(), C0) * C0; hyperpoint h = calc_relative_matrix(c, currentmap->gamestart(), C0) * C0;
col = rainbow_color(h); col = rainbow_color_at(h);
} }
else if(nil) { else if(nil) {
part(col, 0) = 128 + c->master->zebraval * 50; part(col, 0) = 128 + c->master->zebraval * 50;