mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
configuration of type colors
This commit is contained in:
parent
75dd6bbc02
commit
664ca63acc
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user