From 56a7d3943fd31ec95645ecea14b240f03428648c Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 4 Mar 2025 22:00:09 +0100 Subject: [PATCH] get_portal and mirror moved here --- rogueviz/seuphorica.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/rogueviz/seuphorica.cpp b/rogueviz/seuphorica.cpp index fc2301b5..cf27ed7b 100644 --- a/rogueviz/seuphorica.cpp +++ b/rogueviz/seuphorica.cpp @@ -79,6 +79,9 @@ vector get_path(coord c) { return {0,0,0,co.first,0,0,0,co.second,0,0,0}; } +coord get_portal(coord x); +void mirror(coord& at, vect2& prev); + void snapshot(); void from_map(coord co, struct tile& t); void is_clone(struct tile& orig, struct tile& clone); @@ -90,6 +93,26 @@ void is_clone(struct tile& orig, struct tile& clone); namespace seuphorica { +coord get_portal(coord x) { + if(get_gigantic(x) != x) { + auto x1 = get_gigantic(x); + auto v = gigacover(x1); + for(int i=0; i reindex = {0,3,6,1,4,7,2,5,8}; + for(int i=0; i<9; i++) if(v[i] == at) { at = v[reindex[i]]; prev.at = at; break; } + } + prev = get_mirror(prev); + } + void compute_score(); void compute_size() {}