1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-22 01:17:39 +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

@@ -157,18 +157,11 @@ struct hrmap_kite : hrmap {
}
heptagon *newtile(pshape s, int dist) {
heptagon *h = tailored_alloc<heptagon> (8);
heptagon *h = init_heptagon(8);
h->s = hstate(s);
h->dm4 = h->distance = dist;
if(bt::in() || dist == 0)
h->c7 = newCell(euclid ? 4 : s == pKite ? 12 : 10, h);
else
h->c7 = NULL;
h->zebraval = 0;
h->emeraldval = 0;
h->fieldval = 0;
h->cdata = NULL;
h->alt = NULL;
return h;
}