mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
minecolors and distcolors now accept less/more colors in table
This commit is contained in:
parent
fe937cf20a
commit
a1cbf8c906
@ -1615,14 +1615,14 @@ void celldrawer::draw_features() {
|
||||
if(numerical_minefield) {
|
||||
if(mines) {
|
||||
string label = its(mines);
|
||||
queuestr(V, mines >= 10 ? .5 : 1, label, darkened(minecolors[mines%10]), 8);
|
||||
queuestr(V, mines >= 10 ? .5 : 1, label, darkened(minecolors[mines]), 8);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(mines >= 10)
|
||||
queuepoly(V, cgi.shBigMineMark[ct6], darkena(minecolors[(mines/10) % 10], 0, 0xFF));
|
||||
if(mines >= isize(minecolors))
|
||||
queuepoly(V, cgi.shBigMineMark[ct6], darkena(minecolors[mines/isize(minecolors)], 0, 0xFF));
|
||||
if(mines)
|
||||
queuepoly(V, cgi.shMineMark[ct6], darkena(minecolors[mines%10], 0, 0xFF));
|
||||
queuepoly(V, cgi.shMineMark[ct6], darkena(minecolors[mines], 0, 0xFF));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1833,9 +1833,9 @@ void celldrawer::draw_features_and_walls_3d() {
|
||||
}
|
||||
else {
|
||||
int mines = countMinesAround(c);
|
||||
if(mines >= 10)
|
||||
queuepoly(face_the_player(V), cgi.shBigMineMark[0], darkena(minecolors[(mines/10)%10], 0, 0xFF));
|
||||
queuepoly(face_the_player(V), cgi.shMineMark[0], darkena(minecolors[mines%10], 0, 0xFF));
|
||||
if(mines >= isize(minecolors))
|
||||
queuepoly(face_the_player(V), cgi.shBigMineMark[0], darkena(minecolors[mines/isize(minecolors)], 0, 0xFF));
|
||||
queuepoly(face_the_player(V), cgi.shMineMark[0], darkena(minecolors[mines], 0, 0xFF));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2326,10 +2326,10 @@ void celldrawer::draw_wall_full() {
|
||||
int mines = countMinesAround(c);
|
||||
if(asciichar == '.') {
|
||||
if(mines == 0) asciichar = ' ';
|
||||
else asciichar = '0' + mines, asciicol = minecolors[mines%10];
|
||||
else asciichar = '0' + mines, asciicol = minecolors[mines];
|
||||
}
|
||||
else if(asciichar == '@') {
|
||||
asciicol = minecolors[mines%10];
|
||||
asciicol = minecolors[mines];
|
||||
}
|
||||
}
|
||||
if(wmascii && !((c->item && !itemHiddenFromSight(c)) || c->monst || c->cpdist == 0)) error = true;
|
||||
@ -2740,15 +2740,7 @@ void celldrawer::draw() {
|
||||
return;
|
||||
}
|
||||
|
||||
// color_t col = 0xFFFFFF - 0x20 * c->maxdist - 0x2000 * c->cpdist;
|
||||
|
||||
if(!buggyGeneration && c->mpdist > 8 && !cheater && !autocheat) return; // not yet generated
|
||||
/* if(!buggyGeneration && c->mpdist > 7 && !cheater) {
|
||||
int cd = c->mpdist;
|
||||
string label = its(cd);
|
||||
int dc = distcolors[cd&7];
|
||||
queuestr(V, (cd > 9 ? .6 : 1) * .2, label, 0xFF000000 + dc, 1);
|
||||
} */
|
||||
|
||||
#if CAP_SHAPES
|
||||
ct6 = ctof(c);
|
||||
|
@ -625,9 +625,6 @@ void celldrawer::do_viewdist() {
|
||||
|
||||
if(!dist_label_colored) dc = dist_label_color;
|
||||
|
||||
// string label = its(fieldpattern::getriverdistleft(c)) + its(fieldpattern::getriverdistright(c));
|
||||
/* queuepolyat(V, shFloor[ct6], darkena(gradient(0, distcolors[cd&7], 0, .25, 1), fd, 0xC0),
|
||||
PPR::TEXT); */
|
||||
if(label != "")
|
||||
queuestr(V, (isize(label) > 1 ? .6 : 1), label, 0xFF000000 + dc, 1);
|
||||
}
|
||||
|
@ -5783,7 +5783,7 @@ EX void drawscreen() {
|
||||
if((minefieldNearby || tmines) && !items[itOrbAether] && !last_gravity_state && darken == 0 && normal) {
|
||||
string s;
|
||||
if(tmines > 9) tmines = 9;
|
||||
color_t col = minecolors[tmines%10];
|
||||
color_t col = minecolors[tmines];
|
||||
|
||||
if(tmines == 7) seenSevenMines = true;
|
||||
|
||||
@ -5791,7 +5791,7 @@ EX void drawscreen() {
|
||||
displayfr(vid.xres * (p+.5) / numplayers(),
|
||||
current_display->ycenter - current_display->radius * 3/4, 2,
|
||||
vid.fsize,
|
||||
mines[p] > 7 ? its(mines[p]) : XLAT(minetexts[mines[p]]), minecolors[mines[p]%10], 8);
|
||||
mines[p] > 7 ? its(mines[p]) : XLAT(minetexts[mines[p]]), minecolors[mines[p]], 8);
|
||||
|
||||
if(minefieldNearby && !shmup::on && cwt.at->land != laMinefield && cwt.peek()->land != laMinefield && !dont_display_minecount) {
|
||||
displayfr(vid.xres/2, current_display->ycenter - current_display->radius * 3/4 - vid.fsize*3/2, 2,
|
||||
|
Loading…
Reference in New Issue
Block a user