From 5fc24ac17a3256bbd086602188a8268fd30e134c Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 7 Jun 2019 17:51:50 +0200 Subject: [PATCH] a bit higher sky, and Great Walls with more elements --- geometry.cpp | 4 ++-- graph.cpp | 8 +++++--- polygons.cpp | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index ba5c0885..55bada45 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -347,9 +347,9 @@ namespace geom3 { LAKE = lev_to_factor(-vid.lake_top); HELLSPIKE = lev_to_factor(-(vid.lake_top+vid.lake_bottom)/2); BOTTOM = lev_to_factor(-vid.lake_bottom); - LOWSKY = lev_to_factor((1 + vid.rock_wall_ratio) * wh); + LOWSKY = lev_to_factor(2 * wh); HIGH = LOWSKY; - HIGH2 = lev_to_factor((2 + vid.rock_wall_ratio) * wh); + HIGH2 = lev_to_factor(3 * wh); SKY = LOWSKY - 5; } } diff --git a/graph.cpp b/graph.cpp index e915e39d..d18fd585 100644 --- a/graph.cpp +++ b/graph.cpp @@ -4761,12 +4761,12 @@ void draw_ceiling(cell *c, const transmatrix& V, int fd, color_t& fcol, color_t& case 1: { if(euclid) return; if(fieldpattern::fieldval_uniq(c) % 3 == 0) { - queuepolyat(V * zpush(cgi.SKY+0.5), cgi.shNightStar, 0xFFFFFFFF, PPR::SKY); + queuepolyat(V * zpush(cgi.SKY+1), cgi.shNightStar, 0xFFFFFFFF, PPR::SKY); } sky->sky.emplace_back(sky_item{c, V, 0x00000F}); if(c->land == laAsteroids) { if(fieldpattern::fieldval_uniq(c) % 9 < 3) { - queuepolyat(V * zpush(-0.5-cgi.SKY), cgi.shNightStar, 0xFFFFFFFF, PPR::SKY); + queuepolyat(V * zpush(-1-cgi.SKY), cgi.shNightStar, 0xFFFFFFFF, PPR::SKY); } int sk = get_skybrightness(-1); auto sky = draw_shapevec(c, V * MirrorZ, cgi.shFullFloor.levels[SIDE_SKY], 0x000000FF + 0x100 * (sk/17), PPR::SKY); @@ -4783,7 +4783,7 @@ void draw_ceiling(cell *c, const transmatrix& V, int fd, color_t& fcol, color_t& case laWineyard: col = 0x4040FF; if(emeraldval(c) / 4 == 11) { - queuepolyat(V * zpush(cgi.SKY+0.5), cgi.shSun, 0xFFFF00FF, PPR::SKY); + queuepolyat(V * zpush(cgi.SKY+1), cgi.shSun, 0xFFFF00FF, PPR::SKY); } break; @@ -4824,6 +4824,8 @@ void draw_ceiling(cell *c, const transmatrix& V, int fd, color_t& fcol, color_t& forCellIdEx(c2, i, c) if(ceiling_category(c2) != 3) { color_t wcol2 = gradient(0, wcol, 0, .8, 1); + placeSidewall(c, i, SIDE_HIGH, V, darkena(wcol2, fd, 0xFF)); + placeSidewall(c, i, SIDE_HIGH2, V, darkena(wcol2, fd, 0xFF)); placeSidewall(c, i, SIDE_SKY, V, darkena(wcol2, fd, 0xFF)); } if(!euclid) sky->sky.emplace_back(c, V, 0); diff --git a/polygons.cpp b/polygons.cpp index d1df0488..54a32b3e 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -312,7 +312,7 @@ void geometry_information::make_sidewalls() { else if(k==SIDE_WTS3) dlow = SLEV[3], dhi = WALL; else if(k==SIDE_HIGH) dlow = WALL, dhi = HIGH; else if(k==SIDE_HIGH2) dlow = HIGH, dhi = HIGH2; - else if(k==SIDE_SKY) dlow = WALL, dhi = LOWSKY; + else if(k==SIDE_SKY) dlow = HIGH2, dhi = SKY; else dlow = SLEV[k-SIDE_SLEV], dhi = SLEV[k-SIDE_SLEV+1]; dlow_table[k] = dlow; dhi_table[k] = dhi;