mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +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;
|
||||
}
|
||||
|
||||
void draw() override {
|
||||
void draw_at(cell *at, const shiftmatrix& where) override {
|
||||
|
||||
dq::visited_by_matrix.clear();
|
||||
dq::enqueue_by_matrix(centerover->master, cview() * master_relative(centerover, true));
|
||||
dq::clear_all();
|
||||
dq::enqueue_by_matrix(at->master, where * master_relative(centerover, true));
|
||||
|
||||
while(!dq::drawqueue.empty()) {
|
||||
auto& p = dq::drawqueue.front();
|
||||
heptagon *h = get<0>(p);
|
||||
transmatrix V = get<1>(p);
|
||||
dynamicval<ld> b(band_shift, get<2>(p));
|
||||
bandfixer bf(V);
|
||||
shiftmatrix V = get<1>(p);
|
||||
dq::drawqueue.pop();
|
||||
|
||||
cell *c = h->c7;
|
||||
@ -419,19 +417,19 @@ struct hrmap_grigorchuk : hrmap_standard {
|
||||
drawcell(c, V * master_relative(c, false));
|
||||
|
||||
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 {
|
||||
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;
|
||||
}
|
||||
|
||||
transmatrix relative_matrix(cell *c2, cell *c1, const struct hyperpoint& hint) override {
|
||||
if(gmatrix0.count(c2) && gmatrix0.count(c1))
|
||||
return inverse(gmatrix0[c1]) * gmatrix0[c2];
|
||||
return inverse_shift(gmatrix0[c1], gmatrix0[c2]);
|
||||
return Id;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user