From de498da1d173700a077d20305bee2258fc3cf4d8 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 6 Feb 2021 12:25:30 +0100 Subject: [PATCH] fixed bugs when switching FPP in E2 torus --- cell.cpp | 1 + euclid.cpp | 16 ++++++++++++---- fake.cpp | 2 ++ geometry.cpp | 2 ++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/cell.cpp b/cell.cpp index 5fd578c9..51d9037d 100644 --- a/cell.cpp +++ b/cell.cpp @@ -19,6 +19,7 @@ struct hrmap { virtual ~hrmap() { }; virtual vector& allcells(); virtual void verify() { } + virtual void on_dim_change() { } virtual void link_alt(const cellwalker& hs) { } virtual void generateAlts(heptagon *h, int levs = default_levs(), bool link_cdata = true); heptagon *may_create_step(heptagon *h, int direction) { diff --git a/euclid.cpp b/euclid.cpp index d8b4c6ba..4ad76f9d 100644 --- a/euclid.cpp +++ b/euclid.cpp @@ -130,6 +130,17 @@ EX namespace euc { cell *camelot_center; map eucdata; + + void compute_tmatrix() { + shifttable = get_shifttable(); + tmatrix.resize(S7); + for(int i=0; i toruscells; vector& allcells() override { @@ -144,10 +155,7 @@ EX namespace euc { } hrmap_euclidean() { - shifttable = get_shifttable(); - tmatrix.resize(S7); - for(int i=0; ion_dim_change(); } /** like in() but takes slided arb into account */ EX bool split() { return in() || arb::in_slided(); } diff --git a/geometry.cpp b/geometry.cpp index 8cf49153..0ffc1192 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -975,6 +975,7 @@ EX void switch_always3() { if(pmodel == mdDisk) pmodel = mdPerspective; swapmatrix(View); callhooks(hooks_swapdim); + for(auto m: allmaps) m->on_dim_change(); if(cgflags & qIDEAL && vid.texture_step < 32) vid.texture_step = 32; #if CAP_RACING @@ -991,6 +992,7 @@ EX void switch_always3() { if(pmodel == mdPerspective) pmodel = mdDisk; swapmatrix(View); callhooks(hooks_swapdim); + for(auto m: allmaps) m->on_dim_change(); } View = models::rotmatrix() * View; #endif