From 3f005908c4ec7de10caa2063b5ada2f3bfa8709e Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 14 Sep 2022 21:14:44 +0200 Subject: [PATCH] shape editor: shift+S also saves in the simpler format --- mapeditor.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/mapeditor.cpp b/mapeditor.cpp index a8c36f3a..b120335d 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -2887,6 +2887,32 @@ EX namespace mapeditor { println(hlog); } } + + for(int i=0; id[l].list)) { + usershapelayer& ds(us->d[l]); + println(hlog, spaced("//", i, usp.first, l, "[", ds.color, double(ds.zlevel), "]")); + print(hlog, "{"); + + for(int r=0; rd[l].rots; r++) { + for(int i=0; id[l].list); i++) { + hyperpoint h = us->d[l].list[i]; + h = spin(360 * degree * r / us->d[l].rots) * h; + for(int d=0; dd[l].sym) for(int i=isize(us->d[l].list)-1; i>=0; i--) { + hyperpoint h = us->d[l].list[i]; + h[1] = -h[1]; + h = spin(360 * degree * r / us->d[l].rots) * h; + for(int d=0; d