1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-05-07 15:51:22 +00:00

backed-map:: access as a method

This commit is contained in:
Zeno Rogue
2026-04-18 19:02:03 +02:00
parent c7e18a7a1d
commit 97ca275b70
3 changed files with 6 additions and 0 deletions

View File

@@ -1529,6 +1529,8 @@ struct hrmap_arbi : hrmap {
heptagon *origin;
heptagon *getOrigin() override { return origin; }
backed_map* get_backmap() override { return &bm; }
hrmap_arbi() {
dynamicval<hrmap*> curmap(currentmap, this);
origin = init_heptagon(current.shapes[0].size());

View File

@@ -577,6 +577,8 @@ struct hrmap_archimedean : hrmap {
heptagon *origin;
heptagon *getOrigin() override { return origin; }
backed_map* get_backmap() override { return &bm; }
hrmap_archimedean() {
dynamicval<hrmap*> curmap(currentmap, this);
int id = DUAL ? current.N * 2 : 0;;

View File

@@ -97,6 +97,8 @@ public:
/** this takes a large closed manifold M that is a quotient of this, and returns a unique identifier of the cell corresponding to M
* returns PATTERN_INVALID if not implemented or impossible */
virtual int pattern_value(cell *c) { return PATTERN_INVALID; }
virtual struct backed_map* get_backmap() { return nullptr; }
};
/** hrmaps which are based on regular non-Euclidean 2D tilings, possibly quotient