mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 13:07:16 +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
@ -130,6 +130,17 @@ EX namespace euc {
|
||||
cell *camelot_center;
|
||||
|
||||
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 {
|
||||
@ -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
@ -22,6 +22,8 @@ EX namespace fake {
|
||||
EX int ordered_mode = 0;
|
||||
|
||||
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