1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-03-01 01:10:10 +00:00

rogueviz::fundamental:: special for Zebra

This commit is contained in:
Zeno Rogue 2025-02-24 08:56:32 +01:00
parent 2775a120af
commit 976fe48d94

View File

@ -122,20 +122,37 @@ void fundamental_marker() {
int tree_edges = 0; int tree_edges = 0;
int face_edges = 0; int face_edges = 0;
bool first_zebra_phase = geometry == gZebraQuotient && funmode == 3 && PURE;
bool second_zebra_phase = false;
again:
for(int k=0; k<isize(cells); k++) { for(int k=0; k<isize(cells); k++) {
cell *c = cells[k]; cell *c = cells[k];
for(int i=0; i<c->type; i++) { for(int i=0; i<c->type; i++) {
cellwalker cw(c, i); cellwalker cw(c, i);
cell *c2 = cw.cpeek(); cell *c2 = cw.cpeek();
if(gm.count(c2)) continue; if(gm.count(c2)) continue;
if(first_zebra_phase && (zebra40(c) % 4) != (zebra40(c2) % 4))
continue;
if(second_zebra_phase) {
int j = 0;
for(; j<c->type; j++) if(zebra40(c->move(j)) == 4 + zebra40(c) % 12) break;
int v = gmod(i-j+2, 7); if(v < 5) continue;
}
gm[c2] = gm[c] * rel(cw); gm[c2] = gm[c] * rel(cw);
// queueline(gm[c2] * C0, gm[c2] * xspinpush0(ticks, 0.2), 0xFFFFFFFF, 3);
be_connected(cw); be_connected(cw);
tree_edges++; tree_edges++;
cells.push_back(c2); cells.push_back(c2);
} }
} }
if(first_zebra_phase) {
first_zebra_phase = false;
second_zebra_phase = true;
goto again;
}
while(fill_faces) { while(fill_faces) {
int f = face_edges; int f = face_edges;