1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-31 05:52:59 +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

@@ -42,9 +42,8 @@ struct hrmap {
transmatrix iadj(heptagon *h, int d) {
heptagon *h1 = h->cmove(d); return adj(h1, h->c.spin(d));
}
virtual void draw() {
printf("undrawable\n");
}
virtual void draw_all();
virtual void draw_at(cell *at, const shiftmatrix& where);
virtual vector<hyperpoint> get_vertices(cell*);
virtual void virtualRebase(heptagon*& base, transmatrix& at) {
@@ -67,7 +66,7 @@ struct hrmap {
* (e.g. Euclidean and Crystal) also inherit from hrmap_standard
**/
struct hrmap_standard : hrmap {
void draw() override;
void draw_at(cell *at, const shiftmatrix& where) override;
transmatrix relative_matrix(heptagon *h2, heptagon *h1, const hyperpoint& hint) override;
transmatrix relative_matrix(cell *c2, cell *c1, const hyperpoint& hint) override;
heptagon *create_step(heptagon *h, int direction) override;