1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

configuration of type colors

This commit is contained in:
Zeno Rogue 2019-07-03 04:56:30 +02:00
parent 75dd6bbc02
commit 664ca63acc
2 changed files with 6 additions and 2 deletions

View File

@ -524,9 +524,12 @@ bool viewdists = false, use_color_codes = true, use_analyzer = true, show_distan
int first_distance = 0, scrolltime = 0;
bool scrolling_distances = false;
map<int, color_t> expcolors;
color_t distribute_color(int id) {
color_t v = 0xFFFFFF;
for(int z=0; z<24; z++) if(id & (1<<z)) part(v, (z%3)) &=~ (1<<(7-(z/3)));
if(expcolors.count(id)) return expcolors[id];
color_t v = forecolor; // 0xFFFFFF;
for(int z=0; z<24; z++) if(id & (1<<z)) part(v, (z%3)) ^= (1<<(7-(z/3)));
return v;
}

View File

@ -2552,6 +2552,7 @@ int read_pattern_args() {
if(c == 't') ct = &nestcolors;
else if(c == 'd') ct = &distcolors;
else if(c == 'm') ct = &minecolors;
else if(c == 'E') { shift(); int d = argi(); shift(); expcolors[d] = arghex(); }
else ct = &(colortables[patterns::whichCanvas]);
shift();
}