1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-03 11:17:56 +00:00

created a function init_heptagon which does tailored_alloc and clears the data

This commit is contained in:
Zeno Rogue
2021-07-04 10:36:16 +02:00
parent adb9bd75ee
commit 74486309a6
13 changed files with 37 additions and 121 deletions

View File

@@ -176,15 +176,12 @@ struct hrmap_asonov : hrmap {
heptagon *get_at(coord c) {
auto& h = at[c];
if(h) return h;
h = tailored_alloc<heptagon> (S7);
h = init_heptagon(S7);
h->c7 = newCell(S7, h);
coords[h] = c;
h->dm4 = 0;
h->distance = c[2];
h->zebraval = c[0];
h->emeraldval = c[1];
h->cdata = NULL;
h->alt = NULL;
return h;
}