mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 09:50:34 +00:00
more patterns
This commit is contained in:
parent
4fa4f2061c
commit
c37a72ddd3
11
pattern2.cpp
11
pattern2.cpp
@ -49,6 +49,13 @@ bool ishex2(cell *c) {
|
||||
else return c->type != S6;
|
||||
}
|
||||
|
||||
int chessvalue(cell *c) {
|
||||
if(syntetic)
|
||||
return synt::chessvalue(c);
|
||||
else
|
||||
return celldist(c) & 1;
|
||||
}
|
||||
|
||||
int emeraldval(heptagon *h) { return h->emeraldval >> 3; }
|
||||
|
||||
int emeraldval(cell *c) {
|
||||
@ -723,7 +730,7 @@ namespace patterns {
|
||||
}
|
||||
|
||||
void val_all(cell *c, patterninfo &si, int sub, int pat) {
|
||||
if(irr::on) si.symmetries = 1;
|
||||
if(irr::on || syntetic || binarytiling) si.symmetries = 1;
|
||||
else if(a46) val46(c, si, sub, pat);
|
||||
else if(a38) val38(c, si, sub, pat);
|
||||
else if(sphere) valSibling(c, si, sub, pat);
|
||||
@ -1038,7 +1045,7 @@ namespace patterns {
|
||||
|
||||
else if(pat == PAT_CHESS) {
|
||||
val_nopattern(c, si, sub);
|
||||
si.id = celldist(c) & 1;
|
||||
si.id = chessvalue(c);
|
||||
}
|
||||
|
||||
else
|
||||
|
@ -6,6 +6,8 @@ namespace synt {
|
||||
|
||||
static const int sfPH = 1;
|
||||
static const int sfLINE = 2;
|
||||
static const int sfCHESS = 4;
|
||||
static const int sfTHREE = 8;
|
||||
|
||||
// Marek-snub
|
||||
vector<int> faces = {3, 6, 6, 6};
|
||||
@ -13,7 +15,7 @@ vector<int> adj = {1, 0, 2, 3};
|
||||
vector<bool> invert = {false, false, true, false};
|
||||
vector<int> nflags = {sfPH | sfLINE, 0, 0, 0};
|
||||
|
||||
bool have_ph, have_line, have_symmetry;
|
||||
bool have_ph, have_line, have_symmetry, have_chessboard;
|
||||
|
||||
int repetition = 1;
|
||||
int N;
|
||||
@ -597,6 +599,10 @@ bool pseudohept(int id) {
|
||||
return flags[id] & synt::sfPH;
|
||||
}
|
||||
|
||||
bool chessvalue(cell *c) {
|
||||
return flags[id_of(c->master)] & synt::sfCHESS;
|
||||
}
|
||||
|
||||
bool linespattern(cell *c) {
|
||||
return flags[id_of(c->master)] & synt::sfLINE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user