1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-18 07:27:40 +00:00

redone hrmap::draw() function to keep DRY

This commit is contained in:
Zeno Rogue
2020-07-27 19:36:19 +02:00
parent 42446f1925
commit 67595a4ed3
15 changed files with 61 additions and 322 deletions

View File

@@ -794,27 +794,6 @@ struct hrmap_arbi : hrmap {
return h1;
}
void draw() override {
dq::clear_all();
dq::enqueue(centerover->master, cview());
while(!dq::drawqueue.empty()) {
auto& p = dq::drawqueue.front();
heptagon *h = p.first;
shiftmatrix V = p.second;
dq::drawqueue.pop();
if(do_draw(h->c7, V)) drawcell(h->c7, V);
else continue;
for(int i=0; i<h->type; i++) {
shiftmatrix V1 = V * adj(h, i);
optimize_shift(V1);
dq::enqueue(h->move(i), V1);
}
}
}
transmatrix relative_matrix(heptagon *h2, heptagon *h1, const hyperpoint& hint) override {
return relative_matrix_recursive(h2, h1);
}