From 2236039af6f52c4053b225ede43b446a76b13114 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 11 Mar 2025 11:09:49 +0100 Subject: [PATCH] rogueviz::seuphorica::more fixes for nonorientable spaces --- rogueviz/seuphorica.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rogueviz/seuphorica.cpp b/rogueviz/seuphorica.cpp index 8cb698e6..ead25d5b 100644 --- a/rogueviz/seuphorica.cpp +++ b/rogueviz/seuphorica.cpp @@ -228,6 +228,7 @@ void thru_portal(coord& x, vect2& v) { } auto x1 = portals.at(x); v -= tile_orientation[x].spin; + if(tile_orientation[x].mirrored != tile_orientation[x1].mirrored) v.spin = -v.spin; v += tile_orientation[x1].spin; v.at = x1; x = x1; @@ -381,7 +382,7 @@ void render_tile(shiftmatrix V, tile& t, cell *c, vector* origbox, int box auto pt0 = [&] (int id, ld r) { if(gig) r /= 3; - if(c) return currentmap->get_corner(c, cw.spin+id+1+c->type/2, r); + if(c) return currentmap->get_corner(c, (cw+id+(cw.mirrored?0:1)+c->type/2).spin, r); return spin(-90._deg * id) * eupoint(-3/r, -3/r); }; @@ -575,7 +576,7 @@ bool draw(cell *c, const shiftmatrix& V) { auto pt0 = [&] (cellwalker cw, int id, ld r = 4) { r /= gigscale; - return currentmap->get_corner(cw.at, cw.spin+id+1+c->type/2, r); + return currentmap->get_corner(cw.at, (cw+id+(cw.mirrored?0:1)+c->type/2).spin, r); }; int j = 1 + c->type / 2;