1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-07 04:47:56 +00:00

refactored map functions: ddspin, iddspin, spacedist, spin_angle, virtualRebase[simple], adj

This commit is contained in:
Zeno Rogue
2019-11-14 16:51:50 +01:00
parent 4e534261f0
commit aeaaf7586a
15 changed files with 279 additions and 365 deletions

View File

@@ -24,10 +24,8 @@ EX vector<int> siblings;
struct hrmap_spherical : hrmap_standard {
heptagon *dodecahedron[12];
eVariation mvar;
hrmap_spherical() {
mvar = variation;
for(int i=0; i<spherecells(); i++) {
heptagon& h = *(dodecahedron[i] = tailored_alloc<heptagon> (S7));
h.s = hsOrigin;
@@ -147,7 +145,6 @@ struct hrmap_spherical : hrmap_standard {
heptagon *getOrigin() { return dodecahedron[0]; }
~hrmap_spherical() {
dynamicval<eVariation> ph(variation, mvar);
for(int i=0; i<spherecells(); i++) clearHexes(dodecahedron[i]);
for(int i=0; i<spherecells(); i++) tailored_delete(dodecahedron[i]);
}