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

strict_tree_rules() added

This commit is contained in:
Zeno Rogue 2021-06-16 12:45:16 +02:00
parent 0a6746f296
commit 2320619b86
4 changed files with 15 additions and 1 deletions

View File

@ -1376,6 +1376,7 @@ EX int wallchance(cell *c, bool deepOcean) {
/** \brief should we generate the horocycles in the current geometry? */ /** \brief should we generate the horocycles in the current geometry? */
EX bool horo_ok() { EX bool horo_ok() {
if(INVERSE) return false; if(INVERSE) return false;
if(currentmap->strict_tree_rules()) return false;
return hyperbolic && !bt::in() && !arcm::in() && !kite::in() && !experimental && !hybri && !arb::in() && !quotient; return hyperbolic && !bt::in() && !arcm::in() && !kite::in() && !experimental && !hybri && !arb::in() && !quotient;
} }
@ -1929,6 +1930,7 @@ EX void gen_temple(cell *c) {
} }
EX void moreBigStuff(cell *c) { EX void moreBigStuff(cell *c) {
if(currentmap->strict_tree_rules()) return;
if((bearsCamelot(c->land) && !euclid && !quotient && !nil) || c->land == laCamelot) if((bearsCamelot(c->land) && !euclid && !quotient && !nil) || c->land == laCamelot)
if(have_alt(c)) if(!(bt::in() && specialland != laCamelot)) if(have_alt(c)) if(!(bt::in() && specialland != laCamelot))

View File

@ -60,6 +60,8 @@ struct hrmap {
virtual double spacedist(cell *c, int i) { return hdist0(tC0(adj(c, i))); } virtual double spacedist(cell *c, int i) { return hdist0(tC0(adj(c, i))); }
virtual bool strict_tree_rules() { return false; }
virtual void find_cell_connection(cell *c, int d); virtual void find_cell_connection(cell *c, int d);
virtual int shvid(cell *c) { return 0; } virtual int shvid(cell *c) { return 0; }
virtual hyperpoint get_corner(cell *c, int cid, ld cf=3) { return C0; } virtual hyperpoint get_corner(cell *c, int cid, ld cf=3) { return C0; }

View File

@ -974,6 +974,8 @@ EX struct dqi_poly *draw_shapevec(cell *c, const shiftmatrix& V, const vector<hp
if(no_wall_rendering) return NULL; if(no_wall_rendering) return NULL;
if(!c) return &queuepolyat(V, shv[0], col, prio); if(!c) return &queuepolyat(V, shv[0], col, prio);
else if(WDIM == 3) return NULL; else if(WDIM == 3) return NULL;
else if(currentmap->strict_tree_rules()) return &queuepolyat(V, shv[shvid(c)], col, prio);
#if CAP_GP #if CAP_GP
else if(GOLDBERG) { else if(GOLDBERG) {
int id = gp::get_plainshape_id(c); int id = gp::get_plainshape_id(c);

View File

@ -895,7 +895,7 @@ EX namespace patterns {
} }
void val_all(cell *c, patterninfo &si, int sub, int pat) { void val_all(cell *c, patterninfo &si, int sub, int pat) {
if(IRREGULAR || arcm::in() || bt::in() || arb::in() || WDIM == 3) si.symmetries = c->type; if(IRREGULAR || arcm::in() || bt::in() || arb::in() || WDIM == 3 || currentmap->strict_tree_rules()) si.symmetries = c->type;
else if(a46) val46(c, si, sub, pat); else if(a46) val46(c, si, sub, pat);
else if(a38) val38(c, si, sub, pat); else if(a38) val38(c, si, sub, pat);
else if(S7 < 6 && S3 == 3 && !INVERSE && !kite::in()) valSibling(c, si, sub, pat); else if(S7 < 6 && S3 == 3 && !INVERSE && !kite::in()) valSibling(c, si, sub, pat);
@ -1089,6 +1089,8 @@ EX namespace patterns {
return si; return si;
} }
if(currentmap->strict_tree_rules()) return si;
if(arb::in()) { if(arb::in()) {
si.id = arb::id_of(c->master); si.id = arb::id_of(c->master);
si.dir = 0; si.dir = 0;
@ -2680,6 +2682,12 @@ EX namespace linepatterns {
linepattern patTree("underlying tree", 0x00d0d000, cheating, linepattern patTree("underlying tree", 0x00d0d000, cheating,
ALLCELLS( ALLCELLS(
if(currentmap->strict_tree_rules()) {
gridlinef(V, C0, V * currentmap->adj(c, 0), C0, col, 2 + vid.linequality); continue;
return;
}
if(is_master(c)) { if(is_master(c)) {
int dir = updir(c->master); int dir = updir(c->master);
if(dir == -1) continue; if(dir == -1) continue;