1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-17 18:54:48 +00:00

made allcells work correctly in S^3

This commit is contained in:
Zeno Rogue 2019-04-03 20:34:22 +02:00
parent ac1c588d7d
commit 4c5a9091c2

View File

@ -516,6 +516,13 @@ namespace reg3 {
unordered_map<heptagon*, pair<heptagon*, transmatrix>> reg_gmatrix; unordered_map<heptagon*, pair<heptagon*, transmatrix>> reg_gmatrix;
unordered_map<heptagon*, vector<pair<heptagon*, transmatrix> > > altmap; unordered_map<heptagon*, vector<pair<heptagon*, transmatrix> > > altmap;
vector<cell*> spherecells;
vector<cell*>& allcells() override {
if(sphere) return spherecells;
return hrmap::allcells();
}
hrmap_reg3() { hrmap_reg3() {
generate(); generate();
origin = tailored_alloc<heptagon> (S7); origin = tailored_alloc<heptagon> (S7);
@ -526,6 +533,7 @@ namespace reg3 {
h.distance = 0; h.distance = 0;
h.fieldval = 0; h.fieldval = 0;
h.c7 = newCell(S7, origin); h.c7 = newCell(S7, origin);
if(sphere) spherecells.push_back(h.c7);
worst_error1 = 0, worst_error2 = 0; worst_error1 = 0, worst_error2 = 0;
dynamicval<hrmap*> cr(currentmap, this); dynamicval<hrmap*> cr(currentmap, this);
@ -680,6 +688,7 @@ namespace reg3 {
#endif #endif
heptagon *created = tailored_alloc<heptagon> (S7); heptagon *created = tailored_alloc<heptagon> (S7);
created->c7 = newCell(S7, created); created->c7 = newCell(S7, created);
if(sphere) spherecells.push_back(created->c7);
created->alt = NULL; created->alt = NULL;
created->cdata = NULL; created->cdata = NULL;
#if CAP_FIELD #if CAP_FIELD