mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 06:27:17 +00:00
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 vector<cell*>& 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) {
|
||||
|
16
euclid.cpp
16
euclid.cpp
@ -131,6 +131,17 @@ EX namespace euc {
|
||||
|
||||
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*>& allcells() override {
|
||||
if(bounded) {
|
||||
@ -144,10 +155,7 @@ EX namespace euc {
|
||||
}
|
||||
|
||||
hrmap_euclidean() {
|
||||
shifttable = get_shifttable();
|
||||
tmatrix.resize(S7);
|
||||
for(int i=0; i<S7; i++)
|
||||
tmatrix[i] = eumove(shifttable[i]);
|
||||
compute_tmatrix();
|
||||
camelot_center = NULL;
|
||||
build_torus3(geometry);
|
||||
#if CAP_IRR
|
||||
|
2
fake.cpp
2
fake.cpp
@ -23,6 +23,8 @@ EX namespace fake {
|
||||
|
||||
EX bool in() { return geometry == gFake; }
|
||||
|
||||
EX void on_dim_change() { pmap->on_dim_change(); }
|
||||
|
||||
/** like in() but takes slided arb into account */
|
||||
EX bool split() { return in() || arb::in_slided(); }
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user