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

@@ -291,16 +291,11 @@ EX heptagon *createAlternateMap(cell *c, int rad, hstate firststate, int special
if(!polarb50(c)) return NULL;
}
heptagon *alt = tailored_alloc<heptagon> (h->type);
heptagon *alt = init_heptagon(h->type);
allmaps.push_back(newAltMap(alt));
//printf("new alt {%p}\n", hr::voidp(alt));
alt->s = firststate;
alt->emeraldval = 0;
alt->zebraval = 0;
alt->distance = 0;
alt->fieldval = 0;
if(hybri) alt->fieldval = hybrid::get_where(centerover).second;
alt->c7 = NULL;
alt->alt = alt;
#if MAXMDIM >= 4
if(reg3::in_rule()) {