diff --git a/config.cpp b/config.cpp index 8c554d3b..c4209977 100644 --- a/config.cpp +++ b/config.cpp @@ -1872,14 +1872,24 @@ EX void refresh_canvas() { } } -EX void edit_color_table(colortable& ct, const reaction_t& r IS(reaction_t())) { +EX void edit_color_table(colortable& ct, const reaction_t& r IS(reaction_t()), bool has_bit IS(false)) { cmode = sm::SIDE; gamescreen(0); dialog::init(XLAT("colors & aura")); for(int i=0; iland == laMinefield) { diff --git a/landgen.cpp b/landgen.cpp index ef80f51c..03fd3ae2 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -2663,9 +2663,11 @@ EX void setdist(cell *c, int d, cell *from) { } if(d == BARLEV && c->land == laCanvas) { - c->landparam = patterns::generateCanvas(c); + color_t col = patterns::generateCanvas(c); + c->landparam = col; if(canvas_invisible) c->wall = waInvisibleFloor; + if(WDIM == 3 && (col & 0x1000000)) c->wall = waWaxWall; } #if CAP_FIELD diff --git a/pattern2.cpp b/pattern2.cpp index f513998e..2a5a5d84 100644 --- a/pattern2.cpp +++ b/pattern2.cpp @@ -1451,14 +1451,14 @@ EX map colortables = { 0x404040, 0x606060, 0x808080 }}, {'a', {0x800000, 0x503000, 0x206000, 0x007010, 0x004040, 0x001070, 0x200060, 0x500030}}, - {'e', {0x404040, 0x800000, 0x008000, 0x000080 }}, - {'b', {0x404040, 0x800000, 0x008000, 0x000080 }}, - {'z', {0xC0C0C0, 0xE0E0E0, 0x404040, 0x606060 }}, - {'x', {0xC0C0C0, 0x800000, 0x008000, 0x000080 }}, - {'t', {0x804040, 0x408040, 0x404080, 0x808040 }}, - {'c', {0x202020, 0xC0C0C0}}, - {'F', {0xC0C0C0, 0x202020}}, - {'w', {0x303030, 0xC0C0C0}}, + {'e', {0x404040, 0x1800000, 0x1008000, 0x000080 }}, + {'b', {0x404040, 0x1800000, 0x1008000, 0x000080 }}, + {'z', {0x1C0C0C0, 0x1E0E0E0, 0x404040, 0x606060 }}, + {'x', {0xC0C0C0, 0x1800000, 0x1008000, 0x000080 }}, + {'t', {0x804040, 0x1408040, 0x404080, 0x1808040 }}, + {'c', {0x202020, 0x1C0C0C0}}, + {'F', {0x1C0C0C0, 0x202020}}, + {'w', {0x303030, 0x1C0C0C0}}, {'v', {0xC00000, 0xC08000, 0xC0C000, 0x00C000, 0xC0C0, 0x00C0, 0xC000C0}}, }; @@ -1475,7 +1475,9 @@ color_t random_landscape(cell *c, int mul, int div, int step, color_t base) { col[1] /= div; col[2] /= div; if(ISWEB) for(int a=0; a<3; a++) col[a] = (col[a] + step/2) / step * step; - return (base + col[0] + (col[1] << 8) + (col[2] << 16)); + color_t res = base + col[0] + (col[1] << 8) + (col[2] << 16); + if(WDIM == 3 && (getBits(c) & 1)) res |= 0x1000000; + return res; } EX namespace patterns { @@ -1579,7 +1581,7 @@ EX namespace patterns { case 'g': return canvasback; case 'r': - return hrand(0xFFFFFF + 1); + return hrand(0x1FFFFFF + 1); case 'e': return colortables['e'][emeraldval(c)]; case 'a': { @@ -1637,7 +1639,7 @@ EX namespace patterns { gamescreen(0); dialog::init("predesigned patterns"); - dialog::addItem(XLAT("single color"), 'g'); + dialog::addItem(WDIM == 3 ? XLAT("empty") : XLAT("single color"), 'g'); dialog::addItem(XLAT("random colors"), 'r'); dialog::addItem(XLAT("distance from origin"), 'M');