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