1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 01:20:37 +00:00

fixed wrong degree() in binary tiling root

This commit is contained in:
Zeno Rogue 2019-07-21 22:53:53 +02:00
parent bb1fb4bd74
commit a5dc6d40e6

View File

@ -46,7 +46,8 @@ hrmap_hyperbolic::hrmap_hyperbolic(heptagon *o) { origin = o; }
hrmap_hyperbolic::hrmap_hyperbolic() { hrmap_hyperbolic::hrmap_hyperbolic() {
// printf("Creating hyperbolic map: %p\n", this); // printf("Creating hyperbolic map: %p\n", this);
origin = tailored_alloc<heptagon> (S7); int odegree = (WDIM == 2 && binarytiling) ? 6 : S7;
origin = tailored_alloc<heptagon> (odegree);
heptagon& h = *origin; heptagon& h = *origin;
h.s = hsOrigin; h.s = hsOrigin;
h.emeraldval = a46 ? 0 : 98; h.emeraldval = a46 ? 0 : 98;
@ -68,7 +69,7 @@ hrmap_hyperbolic::hrmap_hyperbolic() {
binary::rxcode[1<<16] = &h; binary::rxcode[1<<16] = &h;
#endif #endif
h.zebraval = 0, h.emeraldval = 0, h.zebraval = 0, h.emeraldval = 0,
h.c7 = newCell(WDIM == 3 ? S7 : 6, origin); h.c7 = newCell(odegree, origin);
} }
#endif #endif
#if CAP_IRR #if CAP_IRR
@ -356,7 +357,7 @@ void verifycell(cell *c) {
void verifycells(heptagon *at) { void verifycells(heptagon *at) {
if(GOLDBERG || IRREGULAR || archimedean) return; if(GOLDBERG || IRREGULAR || archimedean) return;
for(int i=0; i<S7; i++) if(at->move(i) && at->move(i)->move(at->c.spin(i)) && at->move(i)->move(at->c.spin(i)) != at) { for(int i=0; i<at->type; i++) if(at->move(i) && at->move(i)->move(at->c.spin(i)) && at->move(i)->move(at->c.spin(i)) != at) {
printf("hexmix error %p [%d s=%d] %p %p\n", at, i, at->c.spin(i), at->move(i), at->move(i)->move(at->c.spin(i))); printf("hexmix error %p [%d s=%d] %p %p\n", at, i, at->c.spin(i), at->move(i), at->move(i)->move(at->c.spin(i)));
} }
if(!sphere && !quotient) if(!sphere && !quotient)