fixed bugs when switching FPP in E2 torus
This commit is contained in:
parent
c57566f9da
commit
de498da1d1
1
cell.cpp
1
cell.cpp
|
@ -19,6 +19,7 @@ struct hrmap {
|
||||||
virtual ~hrmap() { };
|
virtual ~hrmap() { };
|
||||||
virtual vector<cell*>& allcells();
|
virtual vector<cell*>& allcells();
|
||||||
virtual void verify() { }
|
virtual void verify() { }
|
||||||
|
virtual void on_dim_change() { }
|
||||||
virtual void link_alt(const cellwalker& hs) { }
|
virtual void link_alt(const cellwalker& hs) { }
|
||||||
virtual void generateAlts(heptagon *h, int levs = default_levs(), bool link_cdata = true);
|
virtual void generateAlts(heptagon *h, int levs = default_levs(), bool link_cdata = true);
|
||||||
heptagon *may_create_step(heptagon *h, int direction) {
|
heptagon *may_create_step(heptagon *h, int direction) {
|
||||||
|
|
16
euclid.cpp
16
euclid.cpp
|
@ -130,6 +130,17 @@ EX namespace euc {
|
||||||
cell *camelot_center;
|
cell *camelot_center;
|
||||||
|
|
||||||
map<gp::loc, struct cdata> eucdata;
|
map<gp::loc, struct cdata> eucdata;
|
||||||
|
|
||||||
|
void compute_tmatrix() {
|
||||||
|
shifttable = get_shifttable();
|
||||||
|
tmatrix.resize(S7);
|
||||||
|
for(int i=0; i<S7; i++)
|
||||||
|
tmatrix[i] = eumove(shifttable[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
void on_dim_change() override {
|
||||||
|
compute_tmatrix();
|
||||||
|
}
|
||||||
|
|
||||||
vector<cell*> toruscells;
|
vector<cell*> toruscells;
|
||||||
vector<cell*>& allcells() override {
|
vector<cell*>& allcells() override {
|
||||||
|
@ -144,10 +155,7 @@ EX namespace euc {
|
||||||
}
|
}
|
||||||
|
|
||||||
hrmap_euclidean() {
|
hrmap_euclidean() {
|
||||||
shifttable = get_shifttable();
|
compute_tmatrix();
|
||||||
tmatrix.resize(S7);
|
|
||||||
for(int i=0; i<S7; i++)
|
|
||||||
tmatrix[i] = eumove(shifttable[i]);
|
|
||||||
camelot_center = NULL;
|
camelot_center = NULL;
|
||||||
build_torus3(geometry);
|
build_torus3(geometry);
|
||||||
#if CAP_IRR
|
#if CAP_IRR
|
||||||
|
|
2
fake.cpp
2
fake.cpp
|
@ -22,6 +22,8 @@ EX namespace fake {
|
||||||
EX int ordered_mode = 0;
|
EX int ordered_mode = 0;
|
||||||
|
|
||||||
EX bool in() { return geometry == gFake; }
|
EX bool in() { return geometry == gFake; }
|
||||||
|
|
||||||
|
EX void on_dim_change() { pmap->on_dim_change(); }
|
||||||
|
|
||||||
/** like in() but takes slided arb into account */
|
/** like in() but takes slided arb into account */
|
||||||
EX bool split() { return in() || arb::in_slided(); }
|
EX bool split() { return in() || arb::in_slided(); }
|
||||||
|
|
|
@ -975,6 +975,7 @@ EX void switch_always3() {
|
||||||
if(pmodel == mdDisk) pmodel = mdPerspective;
|
if(pmodel == mdDisk) pmodel = mdPerspective;
|
||||||
swapmatrix(View);
|
swapmatrix(View);
|
||||||
callhooks(hooks_swapdim);
|
callhooks(hooks_swapdim);
|
||||||
|
for(auto m: allmaps) m->on_dim_change();
|
||||||
if(cgflags & qIDEAL && vid.texture_step < 32)
|
if(cgflags & qIDEAL && vid.texture_step < 32)
|
||||||
vid.texture_step = 32;
|
vid.texture_step = 32;
|
||||||
#if CAP_RACING
|
#if CAP_RACING
|
||||||
|
@ -991,6 +992,7 @@ EX void switch_always3() {
|
||||||
if(pmodel == mdPerspective) pmodel = mdDisk;
|
if(pmodel == mdPerspective) pmodel = mdDisk;
|
||||||
swapmatrix(View);
|
swapmatrix(View);
|
||||||
callhooks(hooks_swapdim);
|
callhooks(hooks_swapdim);
|
||||||
|
for(auto m: allmaps) m->on_dim_change();
|
||||||
}
|
}
|
||||||
View = models::rotmatrix() * View;
|
View = models::rotmatrix() * View;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue