1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-03-25 05:59:43 +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

@@ -417,26 +417,6 @@ EX namespace bt {
return NULL;
}
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();
cell *c = h->c7;
if(!do_draw(c, V)) continue;
drawcell(c, V);
for(int i=0; i<h->type; i++)
dq::enqueue(h->cmove(i), optimized_shift(V * adj(h, i)));
}
}
int updir_at(heptagon *h) {
if(geometry != gBinaryTiling) return updir();
else if(type_of(h) == 6) return bd_down;