From 37bace6c487525408cfc1706eacf8f31dc6124dc Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 6 Mar 2025 12:48:23 +0100 Subject: [PATCH] fixed forward_steps, added 'bidirectional' flag (will be settable in geometry setting) --- rogueviz/seuphorica.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/rogueviz/seuphorica.cpp b/rogueviz/seuphorica.cpp index 4a0ce03a..748e3475 100644 --- a/rogueviz/seuphorica.cpp +++ b/rogueviz/seuphorica.cpp @@ -18,6 +18,8 @@ using std::ostream; using coord = cell*; using vect2 = cellwalker; +bool bidirectional; + bool in_board(coord co) { return true; } bool euclid_only() { @@ -51,7 +53,15 @@ void set_orientation(cell *c, cellwalker cw) { tile_orientation[c] = cw; } -vector forward_steps(coord c) { return {cellwalker(c, 2), cellwalker(c, 3)}; } +vector forward_steps(coord c) { + if(euclid_only() && !bidirectional) + return {cellwalker(c, 2), cellwalker(c, 3)}; + else { + vector vs; + for(int i=0; itype; i++) vs.push_back(cellwalker(c, i)); + return vs; + } + } struct xy { int x; int y; }; @@ -103,11 +113,10 @@ void from_map(coord co, struct tile& t); void is_clone(struct tile& orig, struct tile& clone); bool gok_hv() { return euclid_only(); } -/* geometry supports default orientation */ -bool gok_rev() { return euclid_only(); } -/* geometry supports gigantic mirrors and gigantic portals */ bool gok_gigacombo() { return euclid_only(); } +bool gok_rev() { return euclid_only() || bidirectional; } + } #define NONJS