mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-05-19 15:44:08 +00:00
adjusted grigorchuk to shiftmatrix
This commit is contained in:
parent
c1ac290491
commit
e99251e70c
@ -393,17 +393,15 @@ struct hrmap_grigorchuk : hrmap_standard {
|
|||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw() override {
|
void draw_at(cell *at, const shiftmatrix& where) override {
|
||||||
|
|
||||||
dq::visited_by_matrix.clear();
|
dq::clear_all();
|
||||||
dq::enqueue_by_matrix(centerover->master, cview() * master_relative(centerover, true));
|
dq::enqueue_by_matrix(at->master, where * master_relative(centerover, true));
|
||||||
|
|
||||||
while(!dq::drawqueue.empty()) {
|
while(!dq::drawqueue.empty()) {
|
||||||
auto& p = dq::drawqueue.front();
|
auto& p = dq::drawqueue.front();
|
||||||
heptagon *h = get<0>(p);
|
heptagon *h = get<0>(p);
|
||||||
transmatrix V = get<1>(p);
|
shiftmatrix V = get<1>(p);
|
||||||
dynamicval<ld> b(band_shift, get<2>(p));
|
|
||||||
bandfixer bf(V);
|
|
||||||
dq::drawqueue.pop();
|
dq::drawqueue.pop();
|
||||||
|
|
||||||
cell *c = h->c7;
|
cell *c = h->c7;
|
||||||
@ -419,19 +417,19 @@ struct hrmap_grigorchuk : hrmap_standard {
|
|||||||
drawcell(c, V * master_relative(c, false));
|
drawcell(c, V * master_relative(c, false));
|
||||||
|
|
||||||
for(int i=0; i<3; i++) if(c->move(i))
|
for(int i=0; i<3; i++) if(c->move(i))
|
||||||
dq::enqueue_by_matrix(h->cmove(i), V * adj(h, i));
|
dq::enqueue_by_matrix(h->cmove(i), optimized_shift(V * adj(h, i)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
transmatrix relative_matrix(heptagon *h2, heptagon *h1, const hyperpoint& hint) override {
|
transmatrix relative_matrix(heptagon *h2, heptagon *h1, const hyperpoint& hint) override {
|
||||||
if(gmatrix0.count(h2->c7) && gmatrix0.count(h1->c7))
|
if(gmatrix0.count(h2->c7) && gmatrix0.count(h1->c7))
|
||||||
return inverse(gmatrix0[h1->c7]) * gmatrix0[h2->c7];
|
return inverse_shift(gmatrix0[h1->c7], gmatrix0[h2->c7]);
|
||||||
return Id;
|
return Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
transmatrix relative_matrix(cell *c2, cell *c1, const struct hyperpoint& hint) override {
|
transmatrix relative_matrix(cell *c2, cell *c1, const struct hyperpoint& hint) override {
|
||||||
if(gmatrix0.count(c2) && gmatrix0.count(c1))
|
if(gmatrix0.count(c2) && gmatrix0.count(c1))
|
||||||
return inverse(gmatrix0[c1]) * gmatrix0[c2];
|
return inverse_shift(gmatrix0[c1], gmatrix0[c2]);
|
||||||
return Id;
|
return Id;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user