1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-01-10 05:19:04 +00:00

rewritten shvid using OOP

This commit is contained in:
Zeno Rogue
2021-06-12 23:34:50 +02:00
parent 8d18946450
commit 42fc2c44a7
8 changed files with 44 additions and 27 deletions

View File

@@ -61,6 +61,7 @@ struct hrmap {
virtual double spacedist(cell *c, int i) { return hdist0(tC0(adj(c, i))); }
virtual void find_cell_connection(cell *c, int d);
virtual int shvid(cell *c) { return 0; }
};
/** hrmaps which are based on regular non-Euclidean 2D tilings, possibly quotient
@@ -78,6 +79,7 @@ struct hrmap_standard : hrmap {
ld spin_angle(cell *c, int d) override;
double spacedist(cell *c, int i) override;
void find_cell_connection(cell *c, int d) override;
virtual int shvid(cell *c);
};
void clearfrom(heptagon*);
@@ -216,9 +218,6 @@ void hrmap_standard::find_cell_connection(cell *c, int d) {
}
hybrid::link();
}
else if(INVERSE) {
gp::inverse_move(c, d);
}
#endif
else if(PURE) {
hrmap::find_cell_connection(c, d);