From 90977aacaf950ba8241b641c36c6f7b7065c78d6 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 15 Dec 2022 21:18:39 +0100 Subject: [PATCH] minor style changes --- floorshapes.cpp | 2 +- polygons.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/floorshapes.cpp b/floorshapes.cpp index 44f055a1..d3f4c54e 100644 --- a/floorshapes.cpp +++ b/floorshapes.cpp @@ -665,7 +665,7 @@ void geometry_information::generate_floorshapes_for(int id, cell *c, int siid, i } #if MAXMDIM >= 4 - if(WDIM == 2 && GDIM == 3) { + if(embedded_plane) { finishshape(); for(auto pfsh: all_plain_floorshapes) { auto& fsh = *pfsh; diff --git a/polygons.cpp b/polygons.cpp index d25850b4..70af6ab5 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -111,7 +111,10 @@ void geometry_information::chasmifyPoly(double fol, double fol2, int k) { int zf = int(x); if(zf == isize(points)-1) zf--; x -= zf; - hpcpush(orthogonal_move(normalize_flat(points[zf] + (points[zf+1] - points[zf]) * x), fol + (fol2-fol) * y)); + auto hp = points[zf] + (points[zf+1] - points[zf]) * x; + auto hf = normalize_flat(hp); + auto ho = orthogonal_move(hf, fol + (fol2-fol) * y); + hpcpush(ho); }; texture_order([&] (ld x, ld y) { at((1-x+y)/2, (1-x-y)/2); }); texture_order([&] (ld x, ld y) { at((1-x-y)/2, (1+x-y)/2); });