changed chamfered to bitruncated

This commit is contained in:
Zeno Rogue 2018-01-06 22:34:03 +01:00
parent 1427147fbc
commit 5bf6d54c7d
40 changed files with 357 additions and 357 deletions

View File

@ -84,7 +84,7 @@ vector<string> achievementsReceived;
bool wrongMode(char flags) {
if(cheater) return true;
if(flags == 'x') return false;
if(nonchamfered != (flags == '7')) return true;
if(nonbitrunc != (flags == '7')) return true;
if(euclid != (flags == 'e')) return true;
if(flags == 'E' && S7 < 5) return false;
if(sphere != (flags == 'E')) return true;
@ -496,7 +496,7 @@ void achievement_score(int cat, int number) {
if(sphere && cat != LB_HALLOWEEN) return;
if(quotient) return;
if(elliptic && cat != LB_HALLOWEEN) return;
if(nonchamfered) return;
if(nonbitrunc) return;
if(randomPatternsMode) return;
if(shmup::on && cat != LB_PURE_TACTICS_SHMUP && cat != LB_PURE_TACTICS_COOP) return;
if(yendor::on && cat != LB_YENDOR_CHALLENGE) return;
@ -584,7 +584,7 @@ void achievement_final(bool really_final) {
}
if(sphere && specialland == laHalloween) {
if(shmup::on || chaosmode || nonchamfered || numplayers() > 1 || tactic::on || randomPatternsMode)
if(shmup::on || chaosmode || nonbitrunc || numplayers() > 1 || tactic::on || randomPatternsMode)
return;
achievement_score(LB_HALLOWEEN, items[itTreat]);
}
@ -598,21 +598,21 @@ void achievement_final(bool really_final) {
int specials = 0;
if(shmup::on) specials++;
if(chaosmode) specials++;
if(nonchamfered) specials++;
if(nonbitrunc) specials++;
if(inv::on) specials++;
if(specials > 1) return;
if(numplayers() > 1 && chaosmode) return;
if(numplayers() > 1 && nonchamfered) return;
if(numplayers() > 1 && nonbitrunc) return;
if(numplayers() > 1 && inv::on) return;
int total_improved = 0;
specific_improved = 0;
specific_what = 0;
if(!shmup::on && !chaosmode && !nonchamfered && numplayers() == 1 && !inv::on) improveItemScores();
if(!shmup::on && !chaosmode && !nonbitrunc && numplayers() == 1 && !inv::on) improveItemScores();
int sid = nonchamfered ? 57 : chaosmode ? 53 : shmup::on ? (numplayers() > 1 ? 44 : 28) :
int sid = nonbitrunc ? 57 : chaosmode ? 53 : shmup::on ? (numplayers() > 1 ? 44 : 28) :
inv::on ? 69 :
(numplayers() > 1 ? 61 : 0);
@ -671,7 +671,7 @@ void achievement_victory(bool hyper) {
if(euclid) return;
if(sphere) return;
if(quotient) return;
if(nonchamfered) return;
if(nonbitrunc) return;
if(randomPatternsMode) return;
if(hyper && shmup::on) return;
if(yendor::on) return;

View File

@ -8,20 +8,20 @@ bool checkBarriersFront(cellwalker bb, int q, bool cross) {
if(bb.c->mpdist < BARLEV) return false;
if(bb.c->mpdist == BUGLEV) return false;
if(bb.c->bardir != NODIR) return false;
if(bb.spin == (nonchamfered ? 3 : 0)) {q--; if(!q) return true; }
if(bb.spin == (nonbitrunc ? 3 : 0)) {q--; if(!q) return true; }
if(!cross) for(int i=0; i<7; i++) {
cellwalker bb2 = bb;
cwspin(bb2, i); cwstep(bb2);
if(bb2.c->bardir != NODIR) return false;
if(!nonchamfered) {
if(!nonbitrunc) {
cwspin(bb2, 4); cwstep(bb2);
if(bb2.c->bardir != NODIR) return false;
}
}
cwstep(bb);
if(!nonchamfered) { cwspin(bb, 3); cwstep(bb); cwspin(bb, 3); cwstep(bb); }
if(!nonbitrunc) { cwspin(bb, 3); cwstep(bb); cwspin(bb, 3); cwstep(bb); }
return checkBarriersBack(bb, q);
}
@ -48,13 +48,13 @@ bool checkBarriersBack(cellwalker bb, int q, bool cross) {
cellwalker bb2 = bb;
cwspin(bb2, i); cwstep(bb2);
if(bb2.c->bardir != NODIR) return false;
if(!nonchamfered) {
if(!nonbitrunc) {
cwspin(bb2, 4); cwstep(bb2);
if(bb2.c->bardir != NODIR) return false;
}
}
cwspin(bb, 3); cwstep(bb); cwspin(bb, nonchamfered ? 5 : 4);
cwspin(bb, 3); cwstep(bb); cwspin(bb, nonbitrunc ? 5 : 4);
// bool create = cwstepcreates(bb);
cwstep(bb); cwspin(bb, 3);
// if(create && bb.spin == 0) return true;
@ -87,12 +87,12 @@ bool checkBarriersNowall(cellwalker bb, int q, int dir, eLand l1=laNone, eLand l
}
}
if(nonchamfered && S3==4) {
if(nonbitrunc && S3==4) {
cwspin(bb, dir);
cwstep(bb);
cwspin(bb, dir);
}
else if(nonchamfered) {
else if(nonbitrunc) {
cwspin(bb, 3*dir);
cwstep(bb);
cwspin(bb, -3*dir);
@ -158,7 +158,7 @@ void setland(cell *c, eLand l) {
void extendcheck(cell *c) {
return;
if(!nonchamfered && c->landparam == 0 && c->barleft != NOWALLSEP) {
if(!nonbitrunc && c->landparam == 0 && c->barleft != NOWALLSEP) {
raiseBuggyGeneration(c, "extend error");
}
}
@ -176,7 +176,7 @@ void extendBarrierFront(cell *c) {
cellwalker bb(c, c->bardir); setbarrier(bb.c);
cwstep(bb);
if(!nonchamfered) {
if(!nonbitrunc) {
bb.c->barleft = c->barleft;
bb.c->barright = c->barright;
setbarrier(bb.c);
@ -212,7 +212,7 @@ void extendBarrierFront(cell *c) {
extendBarrier(bb.c);
for(int a=-3; a<=3; a++) if(a) {
bb.c = c; bb.spin = c->bardir; cwspin(bb, nonchamfered?-a:a); cwstep(bb);
bb.c = c; bb.spin = c->bardir; cwspin(bb, nonbitrunc?-a:a); cwstep(bb);
setland(bb.c, a > 0 ? c->barright : c->barleft);
}
}
@ -224,8 +224,8 @@ void extendBarrierBack(cell *c) {
extendcheck(c);
cellwalker bb(c, c->bardir); setbarrier(bb.c);
cwspin(bb, 3); cwstep(bb); cwspin(bb, nonchamfered?5:4);
setland(bb.c, nonchamfered ? c->barleft : c->barright);
cwspin(bb, 3); cwstep(bb); cwspin(bb, nonbitrunc?5:4);
setland(bb.c, nonbitrunc ? c->barleft : c->barright);
cwstep(bb); cwspin(bb, 3);
bb.c->bardir = bb.spin;
bb.c->barleft = c->barright;
@ -236,7 +236,7 @@ void extendBarrierBack(cell *c) {
//printf("[D heat %d]\n", (ht^11));
// needed for CR2 to work
if(!nonchamfered) {
if(!nonbitrunc) {
cwstep(bb);
bb.c->barleft = c->barright;
bb.c->barright = c->barleft;
@ -255,12 +255,12 @@ void extendNowall(cell *c) {
c->barleft = NOWALLSEP_USED;
cellwalker cw(c, c->bardir);
if(!nonchamfered) {
if(!nonbitrunc) {
cwstep(cw);
setland(cw.c, c->barright);
}
if(nonchamfered && S3 == 4) {
if(nonbitrunc && S3 == 4) {
cwstep(cw);
setland(cw.c, c->barright);
cw.c->barleft = NOWALLSEP_USED;
@ -270,12 +270,12 @@ void extendNowall(cell *c) {
}
for(int i=-1; i<2; i+=2) {
if(nonchamfered && S3==4) {
if(nonbitrunc && S3==4) {
cwspin(cw, i);
cwstep(cw);
cwspin(cw, i);
}
else if(nonchamfered) {
else if(nonbitrunc) {
cwspin(cw, 3*i);
cwstep(cw);
cwspin(cw, -3*i);
@ -286,7 +286,7 @@ void extendNowall(cell *c) {
}
if(cw.c->barleft != NOWALLSEP_USED) {
cw.c->barleft = NOWALLSEP;
if(S3 == 4 && nonchamfered) {
if(S3 == 4 && nonbitrunc) {
cw.c->barright = c->barright;
cw.c->bardir = cw.spin;
setland(cw.c, c->land);
@ -298,19 +298,19 @@ void extendNowall(cell *c) {
printf("barright\n");
}// NONEDEBUG
setland(cw.c, c->barright);
if(!nonchamfered) cwspin(cw, i);
if(!nonbitrunc) cwspin(cw, i);
cw.c->bardir = cw.spin;
if(!nonchamfered) cwspin(cw, -i);
if(!nonbitrunc) cwspin(cw, -i);
}
extendcheck(cw.c);
extendBarrier(cw.c);
}
if(nonchamfered && S3==4) {
if(nonbitrunc && S3==4) {
cwspin(cw, -i);
cwstep(cw);
cwspin(cw, -i);
}
else if(nonchamfered) {
else if(nonbitrunc) {
cwspin(cw, 3*i);
cwstep(cw);
cwspin(cw, -3*i);
@ -325,7 +325,7 @@ void extendNowall(cell *c) {
bool gotit = false;
void extendCR5(cell *c) {
if(nonchamfered) return;
if(nonbitrunc) return;
// if(c->barright == laCrossroads5) extendCR5(c);
eLand forbidden = c->barleft;
eLand forbidden2 = laNone;
@ -391,14 +391,14 @@ void extendBarrier(cell *c) {
if(firstmirror && c->barleft == laMirror && hrand(100) < 60) {
cellwalker cw(c, c->bardir);
if(!nonchamfered) cwstep(cw);
if(!nonbitrunc) cwstep(cw);
if(cw.c->land != laMirrorWall)
if(buildBarrier6(cw, 1)) return;
}
if(firstmirror && (nonchamfered?c->barleft == laMirror : c->barright == laMirror) && hrand(100) < 60) {
if(firstmirror && (nonbitrunc?c->barleft == laMirror : c->barright == laMirror) && hrand(100) < 60) {
cellwalker cw(c, c->bardir);
if(nonchamfered) {
if(nonbitrunc) {
cwspin(cw, -3); cwstep(cw); cwspin(cw, -3);
// cwspin(cw, 3); cwstep(cw); cwspin(cw, -2); cwstep(cw); cwspin(cw, 3);
}
@ -414,7 +414,7 @@ void extendBarrier(cell *c) {
) {
cellwalker cw(c, c->bardir);
if(nonchamfered) {
if(nonbitrunc) {
cwstep(cw);
if(isbar4(cw.c)) {
cwstep(cw); cwspin(cw, 3); cwstep(cw); cwspin(cw, -1); cwstep(cw);
@ -478,7 +478,7 @@ bool buildBarrier6(cellwalker cw, int type) {
if(buggyGeneration) return true;
if(!nonchamfered) {
if(!nonbitrunc) {
cwstep(b[0]);
cwspin(b[1], 1); cwstep(b[1]); cwspin(b[1], 3); cwstep(b[1]);
cwspin(b[2], 4); cwstep(b[2]);
@ -506,18 +506,18 @@ bool buildBarrier6(cellwalker cw, int type) {
}
if(type == 1) {
if(!(nonchamfered?checkBarriersFront:checkBarriersBack)(b[1], 6, true)) return false;
if(!(nonchamfered?checkBarriersFront:checkBarriersBack)(b[2], 6, true)) return false;
if(!(nonbitrunc?checkBarriersFront:checkBarriersBack)(b[1], 6, true)) return false;
if(!(nonbitrunc?checkBarriersFront:checkBarriersBack)(b[2], 6, true)) return false;
}
else {
if(!(nonchamfered?checkBarriersFront:checkBarriersBack)(b[0], 6, true)) return false;
if(!(nonchamfered?checkBarriersFront:checkBarriersBack)(b[3], 6, true)) return false;
if(!(nonbitrunc?checkBarriersFront:checkBarriersBack)(b[0], 6, true)) return false;
if(!(nonbitrunc?checkBarriersFront:checkBarriersBack)(b[3], 6, true)) return false;
}
for(int d=0; d<4; d++) {
b[d].c->bardir = b[d].spin;
if(nonchamfered) {
if(nonbitrunc) {
b[0].c->barleft = laMirrored, b[0].c->barright = laMirrored2;
b[1].c->barleft = laMirror, b[1].c->barright = laMirrored;
b[2].c->barleft = laMirrored2, b[2].c->barright = laMirrored;
@ -530,17 +530,17 @@ bool buildBarrier6(cellwalker cw, int type) {
b[3].c->barleft = laMirrored2, b[3].c->barright = laMirrored;
}
(nonchamfered?extendBarrierFront:extendBarrierBack)(b[d].c);
(nonbitrunc?extendBarrierFront:extendBarrierBack)(b[d].c);
}
if(nonchamfered && false) {
if(nonbitrunc && false) {
for(int z=0; z<4; z++)
b[z].c->item = eItem(1+z+4*type);
for(int a=0; a<4; a++)
extendBarrierBack(cwpeek(b[a],0));
}
if(!nonchamfered) {
if(!nonbitrunc) {
setland(cwpeek(cw, 1), laMirrorWall);
setland(cwpeek(cw, 2), laMirrored);
setland(cwpeek(cw, 3), laMirrorWall2);
@ -594,11 +594,11 @@ bool buildBarrier4(cell *c, int d, int mode, eLand ll, eLand lr) {
cellwalker b1(c, d);
cellwalker b2(c, d);
if(nonchamfered) cwstep(b2);
if(nonbitrunc) cwstep(b2);
else { cwstep(b2); cwspin(b2, 3); cwstep(b2); cwspin(b2, 3); cwstep(b2); }
cellwalker b3(c, d);
if(nonchamfered) {
if(nonbitrunc) {
cwspin(b3, -1); cwstep(b3); cwspin(b3, 3);
}
else {
@ -606,7 +606,7 @@ bool buildBarrier4(cell *c, int d, int mode, eLand ll, eLand lr) {
}
cellwalker b4(c, d);
if(nonchamfered) {
if(nonbitrunc) {
cwspin(b4, 1); cwstep(b4); cwspin(b4, -3);
}
else {
@ -642,16 +642,16 @@ bool buildBarrier4(cell *c, int d, int mode, eLand ll, eLand lr) {
c= b4.c; d=b4.spin;
c->bardir = d, c->barleft = ll, c->barright = xr; extendBarrierFront(c);
if(!nonchamfered) for(int a=-3; a<=3; a++) if(a) {
if(!nonbitrunc) for(int a=-3; a<=3; a++) if(a) {
setland(cwpeek(b1, a), a > 0 ? lr : ll);
setland(cwpeek(b2, a), a > 0 ? xr : xl);
setland(cwpeek(b3, a), a > 0 ? lr : xl);
setland(cwpeek(b4, a), a > 0 ? xr : ll);
}
if(nonchamfered) setbarrier(b1.c), setbarrier(b2.c), setbarrier(b3.c), setbarrier(b4.c);
if(nonbitrunc) setbarrier(b1.c), setbarrier(b2.c), setbarrier(b3.c), setbarrier(b4.c);
if(!nonchamfered) {
if(!nonbitrunc) {
cell *cp;
cp = cwpeek(b1, 0);
cp->barleft = ll; cp->barright = lr; setbarrier(cp);
@ -782,7 +782,7 @@ bool buildBarrierNowall(cell *c, eLand l2, bool force) {
}
for(int i=0; i<3; i++) {
int d = (S3>3 && nonchamfered) ? (2+(i&1)) : dtab[i];
int d = (S3>3 && nonbitrunc) ? (2+(i&1)) : dtab[i];
if(force) d=1;
cellwalker cw(c, d);

View File

@ -44,7 +44,7 @@ int euclidAlt(short x, short y) {
if(specialland == laTemple || specialland == laClearing) {
if(euclid6)
return max(int(x), x+y);
else if(nonchamfered)
else if(nonbitrunc)
return x + abs(y);
else
return max(x, y);
@ -57,7 +57,7 @@ int euclidAlt(short x, short y) {
max(int(x+y), int(y)) + 3),
max(int(x), int(-y)) + 3
);
else if(nonchamfered)
else if(nonbitrunc)
return 3 - min(abs(x-y), abs(x+y));
else
return 3 - min(abs(x), abs(y));
@ -594,7 +594,7 @@ void buildEquidistant(cell *c) {
if(c->landparam > 30 && b == laOcean && !generatingEquidistant && hrand(10) < 5)
buildAnotherEquidistant(c);
if(c->landparam > HAUNTED_RADIUS+5 && b == laGraveyard && !generatingEquidistant && hrand(100) < (nonchamfered?25:5) && items[itBone] >= 10)
if(c->landparam > HAUNTED_RADIUS+5 && b == laGraveyard && !generatingEquidistant && hrand(100) < (nonbitrunc?25:5) && items[itBone] >= 10)
buildAnotherEquidistant(c);
}
@ -971,7 +971,7 @@ void buildBigStuff(cell *c, cell *from) {
else if(weirdhyperbolic) ; // non-Nowall barriers not implemented yet in weird hyperbolic
else if(c->land == laCrossroads2 && !nonchamfered)
else if(c->land == laCrossroads2 && !nonbitrunc)
buildCrossroads2(c);
else if(c->land == laPrairie && c->LHU.fi.walldist == 0) {
@ -1010,7 +1010,7 @@ void buildBigStuff(cell *c, cell *from) {
c->land == laHaunted ? 0 :
(c->land == laGraveyard && !deepOcean) ? 0 :
(c->land == laGraveyard && items[itBone] >= 10) ? 120 :
c->land == laOcean ? (deepOcean ? (nonchamfered ? 250 : 2000) : 0) :
c->land == laOcean ? (deepOcean ? (nonbitrunc ? 250 : 2000) : 0) :
c->land == laDragon ? 120 :
50))
{
@ -1065,7 +1065,7 @@ void buildBigStuff(cell *c, cell *from) {
if(c->land == laOcean && ctof(c) && deepOcean && !generatingEquidistant && !peace::on &&
(quickfind(laWhirlpool) || (
hrand(2000) < (nonchamfered ? 500 : 1000) && !tactic::on && !yendor::on)))
hrand(2000) < (nonbitrunc ? 500 : 1000) && !tactic::on && !yendor::on)))
createAlternateMap(c, 2, hsA);
if(c->land == laCaribbean && ctof(c))
@ -1178,7 +1178,7 @@ void moreBigStuff(cell *c) {
}
if(q == 1) buildCamelotWall(c);
// towers of Camelot
if(q == 0 && !nonchamfered) {
if(q == 0 && !nonbitrunc) {
c->monst = moKnight;
c->wall = waTower;
forCellEx(c2, c) {
@ -1203,7 +1203,7 @@ void moreBigStuff(cell *c) {
}
if(d == 1) {
// roughly as many knights as table cells
if(hrand(nonchamfered ? 2618 : 1720) < 1000)
if(hrand(nonbitrunc ? 2618 : 1720) < 1000)
c->monst = moKnight;
if(!euclid) for(int i=0; i<S7; i++) generateAlts(c->master->move[i]);
for(int i=0; i<c->type; i++)
@ -1237,7 +1237,7 @@ void moreBigStuff(cell *c) {
c->land = laTemple, c->wall = waNone, c->monst = moNone, c->item = itNone;
}
if(d % TEMPLE_EACH==0) {
if((weirdhyperbolic && nonchamfered) ? hrand(100) < 50 : pseudohept(c))
if((weirdhyperbolic && nonbitrunc) ? hrand(100) < 50 : pseudohept(c))
c->wall = waColumn;
else {
if(!euclid) for(int i=0; i<S7; i++) generateAlts(c->master->move[i]);

View File

@ -1,7 +1,7 @@
double randd() { return (rand() % 1000000) / 1000000. + .0000005; }
double cellgfxdist(cell *c, int i) {
return nonchamfered ? tessf : (c->type == 6 && (i&1)) ? hexhexdist : crossf;
return nonbitrunc ? tessf : (c->type == 6 && (i&1)) ? hexhexdist : crossf;
}
transmatrix cellrelmatrix(cell *c, int i) {
@ -13,7 +13,7 @@ hyperpoint randomPointIn(int t) {
while(true) {
hyperpoint h = spin(2*M_PI*(randd()-.5)/t) * tC0(xpush(asinh(randd())));
double d =
nonchamfered ? tessf : t == 6 ? hexhexdist : crossf;
nonbitrunc ? tessf : t == 6 ? hexhexdist : crossf;
if(hdist0(h) < hdist0(xpush(-d) * h))
return spin(2*M_PI/t * (rand() % t)) * h;
}

View File

@ -70,7 +70,7 @@ hrmap_hyperbolic::hrmap_hyperbolic() {
h.spintable = 0;
h.alt = NULL;
h.distance = 0;
isnonchamfered = nonchamfered;
isnonbitrunc = nonbitrunc;
h.c7 = newCell(S7, origin);
}
@ -89,10 +89,10 @@ vector<int> siblings;
struct hrmap_spherical : hrmap {
heptagon *dodecahedron[12];
bool isnonchamfered;
bool isnonbitrunc;
hrmap_spherical() {
isnonchamfered = nonchamfered;
isnonbitrunc = nonbitrunc;
for(int i=0; i<spherecells(); i++) {
heptagon& h = *(dodecahedron[i] = new heptagon);
h.s = hsOrigin;
@ -162,7 +162,7 @@ struct hrmap_spherical : hrmap {
heptagon *getOrigin() { return dodecahedron[0]; }
~hrmap_spherical() {
dynamicval<bool> ph(nonchamfered, isnonchamfered);
dynamicval<bool> ph(nonbitrunc, isnonbitrunc);
for(int i=0; i<spherecells(); i++) clearHexes(dodecahedron[i]);
for(int i=0; i<spherecells(); i++) delete dodecahedron[i];
}
@ -365,10 +365,10 @@ int euclid_getvec(int dx, int dy) {
template<class T> void build_euclidean_moves(cell *c, int vec, const T& builder) {
int x, y;
tie(x,y) = vec_to_pair(vec);
c->type = a4 ? (nonchamfered || ((x^y^1) & 1) ? 4 : 8) : 6;
c->type = a4 ? (nonbitrunc || ((x^y^1) & 1) ? 4 : 8) : 6;
if(c->type == 4) {
int m = nonchamfered ? 1 : 2;
int m = nonbitrunc ? 1 : 2;
builder(euclid_getvec(+1,+0), 0, 2 * m);
builder(euclid_getvec(+0,+1), 1, 3 * m);
builder(euclid_getvec(-1,+0), 2, 0 * m);
@ -726,7 +726,7 @@ cell *createMov(cell *c, int d) {
}
if(c->mov[d]) return c->mov[d];
else if(nonchamfered) {
else if(nonbitrunc) {
heptagon *h2 = createStep(c->master, d);
merge(c,d,h2->c7,c->master->spin(d),false);
}
@ -840,7 +840,7 @@ heptagon deletion_marker;
void clearHexes(heptagon *at) {
if(at->c7) {
if(!nonchamfered) for(int i=0; i<7; i++)
if(!nonbitrunc) for(int i=0; i<7; i++)
clearcell(at->c7->mov[i]);
clearcell(at->c7);
}
@ -880,7 +880,7 @@ void verifycell(cell *c) {
for(int i=0; i<t; i++) {
cell *c2 = c->mov[i];
if(c2) {
if(!euclid && !nonchamfered && c == c->master->c7) verifycell(c2);
if(!euclid && !nonbitrunc && c == c->master->c7) verifycell(c2);
if(c2->mov[c->spn(i)] && c2->mov[c->spn(i)] != c) {
printf("cell error %p:%d [%d] %p:%d [%d]\n", c, i, c->type, c2, c->spn(i), c2->type);
exit(1);
@ -1341,7 +1341,7 @@ int celldistance(cell *c1, cell *c2) {
if(ac == xtgt) return d;
ac = chosenDown(ac, 1, 1, celldist);
if(ac == tgt) return d+2;
if(!nonchamfered) {
if(!nonbitrunc) {
ac = chosenDown(ac, 1, 1, celldist);
if(ac == tgt) {
if(chosenDown(ac0, 1, 0, celldist) ==

View File

@ -205,8 +205,8 @@ struct geometryinfo {
int vertex;
int quotientstyle;
eGeometryClass cclass;
array<int,2> distlimit; // chamfered, non-chamfered
int xcode;
array<int,2> distlimit; // bitrunc, non-bitrunc
};
static const int qZEBRA = 1;

View File

@ -182,7 +182,7 @@ else if(args()[0] == '-' && args()[1] == x && args()[2] == '0') { showstartmenu
TOGGLE('o', vid.usingGL, switchGL())
TOGGLE('C', chaosmode, restartGame('C'))
TOGGLE('7', nonchamfered, restartGame('7'))
TOGGLE('7', nonbitrunc, restartGame('7'))
TOGGLE('f', vid.full, switchFullscreen())
TOGGLE('T', tactic::on, restartGame('t'))
TOGGLE('S', shmup::on, restartGame('s'))

View File

@ -747,7 +747,7 @@ namespace clearing {
}
int d = celldistAlt(c);
if(nonchamfered) {
if(nonbitrunc) {
for(int i=0; i<S7; i++) {
cell *c2 = createMov(c, i);
if(!pseudohept(c2) && celldistAlt(c2) == d-1)
@ -1111,7 +1111,7 @@ namespace mirror {
}
void createMirages(cellwalker cw, int cpid) {
if(nonchamfered) {
if(nonbitrunc) {
for(int i=0; i<cw.c->type; i++) {
cellwalker C2 = cw;
cwstep(C2);
@ -1321,9 +1321,9 @@ namespace mirror {
v.push_back(1);
stepcount++; if(stepcount > 10000) { printf("failhep\n"); return cw; }
}
if(nonchamfered && cwpeek(cw,0) == cwcopy.c)
if(nonbitrunc && cwpeek(cw,0) == cwcopy.c)
v.pop_back();
if(nonchamfered && cwpeek(cw,3)->land == laMirrored && cwpeek(cw,2)->land == laMirrorWall) {
if(nonbitrunc && cwpeek(cw,3)->land == laMirrored && cwpeek(cw,2)->land == laMirrorWall) {
cw.mirrored = !cw.mirrored;
auto p = traceback(v, cw);
if(p.first) return p.second;
@ -1828,7 +1828,7 @@ namespace heat {
cell *c = playerpos(i);
if(!c) continue;
double xrate = (c->land == laCocytus && shmup::on) ? rate/3 : rate;
if(nonchamfered) xrate *= 1.7;
if(nonbitrunc) xrate *= 1.7;
if(!shmup::on) xrate /= FIX94;
if(isIcyLand(c))
HEAT(c) += (markOrb(itOrbWinter) ? -1.2 : 1.2) * xrate;
@ -1843,7 +1843,7 @@ namespace heat {
for(int i=0; i<dcs; i++) {
cell *c = allcells[i];
double xrate = (c->land == laCocytus && shmup::on) ? 1/3. : 1;
if(nonchamfered) xrate *= 1.7;
if(nonbitrunc) xrate *= 1.7;
if(!shmup::on) xrate /= FIX94;
if(c->cpdist > 7 && !doall) break;
@ -2524,7 +2524,7 @@ namespace sword {
}
void shuffle(int i) {
sword::angle[i] = euclid ? S7*hrand(6) : nonchamfered ? 3*hrand(S14)+1 : hrand(S42);
sword::angle[i] = euclid ? S7*hrand(6) : nonbitrunc ? 3*hrand(S14)+1 : hrand(S42);
}
void reset() {
@ -2709,7 +2709,7 @@ namespace prairie {
c->LHU.fi.rval = (y&15);
}
else if(sphere) {
c->LHU.fi.rval = celldistance(c, cwt.c) + 8 - (nonchamfered ? 2 : 3);
c->LHU.fi.rval = celldistance(c, cwt.c) + 8 - (nonbitrunc ? 2 : 3);
}
else if(weirdhyperbolic) {
c->LHU.fi.rval = max(celldist(c), 15);
@ -2771,8 +2771,8 @@ namespace prairie {
}
}
#define RLOW (sphere?(nonchamfered?7:6):nonchamfered?4:2)
#define RHIGH (sphere?(nonchamfered?8:9):nonchamfered?11:13)
#define RLOW (sphere?(nonbitrunc?7:6):nonbitrunc?4:2)
#define RHIGH (sphere?(nonbitrunc?8:9):nonbitrunc?11:13)
bool isriver(cell *c) {
return c->land == laPrairie && c->LHU.fi.rval <= RHIGH && c->LHU.fi.rval >= RLOW;
@ -2934,7 +2934,7 @@ namespace prairie {
else if(!enter && isriver(cwt.c)) enter = cwt.c;
if(size(tchoices)) {
if(lasttreasure && lasttreasure->item == itGreenGrass) {
if(celldistance(lasttreasure, cwt.c) >= (nonchamfered ? 7 : 10)) {
if(celldistance(lasttreasure, cwt.c) >= (nonbitrunc ? 7 : 10)) {
lasttreasure->item = itNone;
forCellEx(c2, lasttreasure) if(c2->item == itGreenGrass) c2->item = itNone;
}
@ -3310,7 +3310,7 @@ namespace halloween {
else if(CHANCE(5) && itr >= 60) {
dragoncount++;
}
else if(dragoncount && !nonchamfered && !mcount) {
else if(dragoncount && !nonbitrunc && !mcount) {
bool fill = false;
for(int i=0; i<4; i++)
if(!dragoncells[i] || dragoncells[i]->monst)

View File

@ -321,7 +321,7 @@ void initConfig() {
addsaver(hardcore, "mode-hardcore", false);
addsaver(chaosmode, "mode-chaos");
addsaver(inv::on, "mode-Orb Strategy");
addsaver(nonchamfered, "mode-heptagonal", false);
addsaver(nonbitrunc, "mode-heptagonal", false);
addsaver(peace::on, "mode-peace");
addsaver(peace::otherpuzzles, "mode-peace-submode");
addsaverenum(specialland, "land for special modes");
@ -337,7 +337,7 @@ void initConfig() {
}
bool inSpecialMode() {
return chaosmode || nonchamfered || peace::on || tour::on ||
return chaosmode || nonbitrunc || peace::on || tour::on ||
yendor::on || tactic::on || randomPatternsMode ||
geometry != gNormal || pmodel != mdDisk || vid.alpha != 1 || vid.scale != 1 ||
rug::rugged || vid.monmode != DEFAULT_MONMODE ||
@ -350,7 +350,7 @@ void resetModes(char leave = 'c') {
if(shmup::on != (leave == 's')) restartGame('s');
if(inv::on != (leave == 'i')) restartGame('i');
if(chaosmode != (leave == 'C')) restartGame('C');
if(nonchamfered != (leave == '7')) restartGame('7');
if(nonbitrunc != (leave == '7')) restartGame('7');
if(peace::on != (leave == 'P')) restartGame('P');
#if CAP_TOUR
if(tour::on != (leave == 'T')) restartGame('T');
@ -454,11 +454,11 @@ void loadOldConfig(FILE *f) {
shmup::loadConfig(f);
aa = rug::renderonce; bb = rug::rendernogl; cc = nonchamfered; dd = chaosmode;
aa = rug::renderonce; bb = rug::rendernogl; cc = nonbitrunc; dd = chaosmode;
int ee = vid.steamscore;
double rs = 2/rug::model_distance;
err=fscanf(f, "%d%d%d%d%lf%d%d", &aa, &bb, &rug::texturesize, &cc, &rs, &ee, &dd);
rug::renderonce = aa; rug::rendernogl = bb; nonchamfered = cc; chaosmode = dd; vid.steamscore = ee;
rug::renderonce = aa; rug::rendernogl = bb; nonbitrunc = cc; chaosmode = dd; vid.steamscore = ee;
rug::model_distance = 2/rs;
aa=conformal::autobandhistory;

View File

@ -383,7 +383,7 @@ struct fpattern {
dists[at] = i;
for(int q=0; q<S7; q++) {
dists[at] = i;
if(nonchamfered)
if(nonbitrunc)
indist[i+1].push_back(connections[at]);
else {
indist[i+2].push_back(connections[at]);
@ -397,7 +397,7 @@ struct fpattern {
void analyze() {
DEBB(DF_FIELD, (debugfile, "nonchamfered = %d\n", nonchamfered));
DEBB(DF_FIELD, (debugfile, "nonbitrunc = %d\n", nonbitrunc));
int N = connections.size();
markers.resize(N);
@ -512,7 +512,7 @@ struct fpattern {
W = mmul(Wall, W);
}
}
dijkstra(nonchamfered ? distriver : distflower, indist);
dijkstra(nonbitrunc ? distriver : distflower, indist);
W = matrices[riverid];
for(int i=0; i<wallorder; i++) {
@ -534,7 +534,7 @@ struct fpattern {
SETDIST(W, 1, itGold)
W = mmul(W, Wall);
}
int riverdist = dijkstra(nonchamfered ? distflower : distriver, indist);
int riverdist = dijkstra(nonbitrunc ? distflower : distriver, indist);
DEBB(DF_FIELD, (debugfile, "river dist = %d\n", riverdist));
for(int i=0; i<size(currfp.matrices); i++)
@ -543,7 +543,7 @@ struct fpattern {
break;
}
if(!nonchamfered) {
if(!nonbitrunc) {
W = matrices[riverid];
for(int i=0; i<wallorder; i++) {
SETDIST(W, 0, itStatue)

View File

@ -2136,7 +2136,7 @@ void killMonster(cell *c, eMonster who, flagtype deathflags) {
for(int i=0; i<c->type; i++) {
cell *c2 = c->mov[i];
if(c2 && c2->item == itCompass) toomany = true;
if(c2 && !nonchamfered) for(int j=0; j<c2->type; j++)
if(c2 && !nonbitrunc) for(int j=0; j<c2->type; j++)
if(c2->mov[j] && c2->mov[j]->item == itCompass)
toomany = true;
}
@ -2684,7 +2684,7 @@ void buildRosemap() {
}
int getDistLimit() { return ginf[geometry].distlimit[nonchamfered]; }
int getDistLimit() { return ginf[geometry].distlimit[nonbitrunc]; }
bool nogoSlow(cell *to, cell *from) {
if(cellEdgeUnstable(to) && gravityLevel(to) >= gravityLevel(from)) return true;
@ -3084,7 +3084,7 @@ void toggleGates(cell *ct, eWall type, int rad) {
void toggleGates(cell *ct, eWall type) {
playSound(ct, "click");
numgates = 0;
if(type == waClosePlate && nonchamfered)
if(type == waClosePlate && nonbitrunc)
toggleGates(ct, type, 2);
else
toggleGates(ct, type, 3);
@ -6786,11 +6786,11 @@ ld circlesizeD[10000];
int lastsize;
void computeSizes() {
lastsize = nonchamfered ? 44 : 76;
lastsize = nonbitrunc ? 44 : 76;
circlesize[0] = 1;
if(!nonchamfered) {
if(!nonbitrunc) {
circlesize[1] = 1*7;
circlesize[2] = 2*7;
circlesize[3] = 4*7;
@ -7542,7 +7542,7 @@ bool movepcto(int d, int subdir, bool checkonly) {
if(checkonly) return false;
if(nonAdjacent(cwt.c,c2))
addMessage(XLAT(
nonchamfered ?
nonbitrunc ?
"You cannot move between the cells without dots here!" :
"You cannot move between the triangular cells here!"
));

View File

@ -10,7 +10,7 @@ string euchelp =
"You can try many different geometries here. We start by gluing "
"n-gons in such a way that k of them meet in every vertex. "
"Depending on n and k, this either folds into a sphere, unfolds into a plane, "
"or requires a hyperbolic space. The result may be then 'chamfered' by "
"or requires a hyperbolic space. The result may be then 'bitrunc' by "
"replacing each vertex by a 2k-gon. Furthermore, you can play "
"with quotient geometries. For example, the elliptic geometry is "
"obtained from the sphere by making the antipodes be the same point, "
@ -18,7 +18,7 @@ string euchelp =
"Have fun experimenting! "
"Achievements and leaderboards do not work in geometry experiments, "
"except some specific ones.\n\n"
"In standard geometry (chamfered or not), you can play the full game, but in other geometries "
"In standard geometry (bitrunc or not), you can play the full game, but in other geometries "
"you select a particular land. Lands are unlocked by visiting them in this "
"session, or permanently by collecting 25 treasure. Try Crossroads in Euclidean "
"or chaos mode in non-standard non-quotient hyperbolic to visit many lands. "
@ -41,7 +41,7 @@ void showQuotientConfig() {
nextPrimes(gxcur);
for(int i=0; i<size(gxcur.primes); i++) {
auto& p = gxcur.primes[i];
dialog::addBoolItem(XLAT("order %1%2 (non-chamfered cells: %3)", its(p.p), p.squared ? "²" : "", its(p.cells)), i == gxcur.current_prime_id, 'A'+i);
dialog::addBoolItem(XLAT("order %1%2 (non-bitrunc cells: %3)", its(p.p), p.squared ? "²" : "", its(p.cells)), i == gxcur.current_prime_id, 'A'+i);
}
if(size(gxcur.primes) < 6) {
@ -84,7 +84,7 @@ void showQuotientConfig() {
dialog::display();
}
bool torus_chamfer;
bool torus_bitrunc;
void showTorusConfig() {
cmode = sm::SIDE | sm::TORUSCONFIG;
@ -114,7 +114,7 @@ void showTorusConfig() {
dialog::addSelItem(XLAT("height (y)"), its(torusconfig::newsdy), 'y');
}
if(square) dialog::addBoolItem(XLAT("chamfering"), !torus_chamfer, 't');
if(square) dialog::addBoolItem(XLAT("bitruncated"), !torus_bitrunc, 't');
else dialog::addInfo("", 100);
int valid = 2;
@ -122,8 +122,8 @@ void showTorusConfig() {
if(single) {
if(square) {
dialog::addInfo("this mode has bad patterns", 0x808080), valid = 1;
if(!torus_chamfer && valid == 1)
dialog::addInfo("incompatible with chamfering", 0x808080), valid = 0;
if(!torus_bitrunc && valid == 1)
dialog::addInfo("incompatible with bitruncating", 0x808080), valid = 0;
}
else {
if(torusconfig::newqty % 3)
@ -138,8 +138,8 @@ void showTorusConfig() {
dialog::addInfo(XLAT("best if %1 is divisible by %2", "x", "2"), 0x808080), valid = 1;
if(torusconfig::newsdy & 1)
dialog::addInfo(XLAT("best if %1 is divisible by %2", "y", "2"), 0x808080), valid = 1;
if(!torus_chamfer && valid == 1)
dialog::addInfo("incompatible with chamfering", 0x808080), valid = 0;
if(!torus_bitrunc && valid == 1)
dialog::addInfo("incompatible with bitruncating", 0x808080), valid = 0;
}
else if(simple) {
if(torusconfig::newsdx & 1)
@ -179,7 +179,7 @@ void showTorusConfig() {
else if(uni == 'y' && !single)
dialog::editNumber(torusconfig::newsdy, 0, 1000, square ? 2 : simple ? 3 : 2, 12, XLAT("height (y)"), "");
else if(uni == 't')
torus_chamfer = !torus_chamfer;
torus_bitrunc = !torus_bitrunc;
else if((uni == 'a' || uni == '\n') && torusconfig::newqty >= 3 && valid) {
targetgeometry = gNormal; restartGame('g', false, true);
torusconfig::torus_mode = torusconfig::newmode;
@ -188,7 +188,7 @@ void showTorusConfig() {
torusconfig::sdx = torusconfig::newsdx;
torusconfig::sdy = torusconfig::newsdy;
torusconfig::activate();
if((square && torus_chamfer) != nonchamfered) restartGame('7', false, true);
if((square && torus_bitrunc) != nonbitrunc) restartGame('7', false, true);
targetgeometry = gTorus; restartGame('g', false, true);
}
else if(uni == 'c') {
@ -209,7 +209,7 @@ void showTorusConfig() {
dialog::display();
}
string chamfernames[2] = {" (c)", " (n)"};
string bitruncnames[2] = {" (b)", " (n)"};
void showEuclideanMenu() {
cmode = sm::SIDE;
@ -237,7 +237,7 @@ void showEuclideanMenu() {
int ts = ginf[geometry].sides;
int tv = ginf[geometry].vertex;
int tq = ginf[geometry].quotientstyle;
int nom = (nonchamfered ? tv : tv+ts) * ((tq & qELLIP) ? 2 : 4);
int nom = (nonbitrunc ? tv : tv+ts) * ((tq & qELLIP) ? 2 : 4);
int denom = (2*ts + 2*tv - ts * tv);
dialog::addSelItem(XLAT("land"), XLAT1(linf[specialland].name), '5');
@ -249,18 +249,18 @@ void showEuclideanMenu() {
dialog::addBreak(50);
if(ts == 6 && tv == 3)
dialog::addSelItem(XLAT("chamfered"), XLAT("does not matter"), 't');
dialog::addSelItem(XLAT("bitrunc"), XLAT("does not matter"), 't');
else
dialog::addBoolItem(XLAT("chamfered"), !nonchamfered, 't');
dialog::addBoolItem(XLAT("bitrunc"), !nonbitrunc, 't');
dialog::addBreak(50);
int worldsize = denom ? nom/denom : 0;
if(tq & qTORUS) worldsize = torusconfig::qty;
if(tq & qZEBRA) worldsize = nonchamfered ? 12 : 40;
if(tq & qZEBRA) worldsize = nonbitrunc ? 12 : 40;
if(tq & qFIELD) {
worldsize = size(currfp.matrices) / ts;
if(!nonchamfered) worldsize = ((ts+tv)*worldsize) / tv;
if(!nonbitrunc) worldsize = ((ts+tv)*worldsize) / tv;
}
dialog::addSelItem(XLAT("sides per face"), its(ts), 0);
@ -341,7 +341,7 @@ void showEuclideanMenu() {
torusconfig::newsdx = torusconfig::sdx,
torusconfig::newsdy = torusconfig::sdy,
torusconfig::newmode = torusconfig::torus_mode,
torus_chamfer = nonchamfered,
torus_bitrunc = nonbitrunc,
pushScreen(showTorusConfig);
if(quotient==2) pushScreen(showQuotientConfig);
}
@ -352,7 +352,7 @@ void showEuclideanMenu() {
else {
dialog::init(XLAT("experiment with geometry"));
dialog::addSelItem(XLAT("geometry"), XLAT(ginf[geometry].name) + XLAT(chamfernames[nonchamfered]), '5');
dialog::addSelItem(XLAT("geometry"), XLAT(ginf[geometry].name) + XLAT(bitruncnames[nonbitrunc]), '5');
dialog::addBreak(50);
generateLandList(isLandValid);

View File

@ -53,7 +53,7 @@ void precalc() {
// dynamicval<eGeometry> g(geometry, gNormal);
// precalc(); }
// for(int i=0; i<S84; i++) spinmatrix[i] = spin(i * M_PI / S42);
if(a4 && nonchamfered) {
if(a4 && nonbitrunc) {
crossf = .5;
hexf = .5;
hcrossf = crossf * sqrt(2) / 2;
@ -119,7 +119,7 @@ void precalc() {
else {
hcrossf = hdist(xpush(tessf) * C0, spin(2*M_PI/S7) * xpush(tessf) * C0) / 2;
}
crossf = nonchamfered ? tessf : hcrossf;
crossf = nonbitrunc ? tessf : hcrossf;
fmin = 0, fmax = tessf;
for(int p=0; p<100; p++) {
@ -132,9 +132,9 @@ void precalc() {
}
hexf = fmin;
rhexf = nonchamfered ? hcrossf : hexf;
rhexf = nonbitrunc ? hcrossf : hexf;
if(!euclid && !nonchamfered && !(S7&1))
if(!euclid && !nonbitrunc && !(S7&1))
hexshift = ALPHA/2 + ALPHA * ((S7-1)/2) + M_PI;
finish:

View File

@ -157,7 +157,7 @@ void drawSpeed(const transmatrix& V) {
}
int ctof(cell *c) {
if(nonchamfered) return 1;
if(nonbitrunc) return 1;
// if(euclid) return 0;
return ishept(c) ? 1 : 0;
// c->type == 6 ? 0 : 1;
@ -238,8 +238,8 @@ int displaydir(cell *c, int d) {
}
double hexshiftat(cell *c) {
if(ctof(c) && S7==6 && S3 == 4 && !nonchamfered) return hexshift + 2*M_PI/S7;
if(ctof(c) && (S7==8 || S7 == 4) && S3 == 3 && !nonchamfered) return hexshift + 2*M_PI/S7;
if(ctof(c) && S7==6 && S3 == 4 && !nonbitrunc) return hexshift + 2*M_PI/S7;
if(ctof(c) && (S7==8 || S7 == 4) && S3 == 3 && !nonbitrunc) return hexshift + 2*M_PI/S7;
if(hexshift && ctof(c)) return hexshift;
return 0;
}
@ -291,11 +291,11 @@ void drawPlayerEffects(const transmatrix& V, cell *c, bool onplayer) {
if(!euclid) for(int a=0; a<S42; a++) {
int dda = S42 + (-1-2*a);
if(a == ang && items[itOrbSword]) continue;
if(nonchamfered && a%3 != ang%3) continue;
if(nonbitrunc && a%3 != ang%3) continue;
if((a+S21)%S42 == ang && items[itOrbSword2]) continue;
bool longer = sword::pos(cwt.c, a-1) != sword::pos(cwt.c, a+1);
int col = darkena(0xC0C0C0, 0, 0xFF);
queueline(Vnow*ddi0(dda, nonchamfered ? 0.6 : longer ? 0.36 : 0.4), Vnow*ddi0(dda, nonchamfered ? 0.7 : longer ? 0.44 : 0.42), col, 1);
queueline(Vnow*ddi0(dda, nonbitrunc ? 0.6 : longer ? 0.36 : 0.4), Vnow*ddi0(dda, nonbitrunc ? 0.7 : longer ? 0.44 : 0.42), col, 1);
}
#endif
@ -2289,7 +2289,7 @@ void drawTowerFloor(const transmatrix& V, cell *c, int col, cellfunction *cf = c
if(i == 9) j = 4;
if(i == 10) j = 5;
if(i == 13) j = 6;
if(nonchamfered) {
if(nonbitrunc) {
if(i == 7) j = 7;
if(i == 11) j = 8;
if(i == 15) j = 9;
@ -2313,7 +2313,7 @@ void drawZebraFloor(const transmatrix& V, cell *c, int col) {
auto si = patterns::getpatterninfo(c, 'z', patterns::SPF_SYM0123);
int j;
if(nonchamfered) j = 4;
if(nonbitrunc) j = 4;
else if(si.id >=4 && si.id < 16) j = 2;
else if(si.id >= 16 && si.id < 28) j = 1;
else if(si.id >= 28 && si.id < 40) j = 3;
@ -2335,7 +2335,7 @@ void drawReptileFloor(const transmatrix& V, cell *c, int col, bool usefloor) {
int j;
if(!wmescher) j = 4;
else if(nonchamfered) j = 0;
else if(nonbitrunc) j = 0;
else if(si.id < 4) j = 0;
else if(si.id >=4 && si.id < 16) j = 1;
else if(si.id >= 16 && si.id < 28) j = 2;
@ -2393,7 +2393,7 @@ void drawReptileFloor(const transmatrix& V, cell *c, int col, bool usefloor) {
}
void drawEmeraldFloor(const transmatrix& V, cell *c, int col) {
if(!euclid && !nonchamfered) {
if(!euclid && !nonbitrunc) {
auto si = patterns::getpatterninfo(c, 'f', patterns::SPF_SYM0123);
int j = -1;
@ -2933,7 +2933,7 @@ bool noAdjacentChasms(cell *c) {
void floorShadow(cell *c, const transmatrix& V, int col, bool warp) {
if(pmodel == mdHyperboloid || pmodel == mdBall)
return; // shadows break the depth testing
if(shmup::on || nonchamfered) warp = false;
if(shmup::on || nonbitrunc) warp = false;
dynamicval<int> p(poly_outline, OUTLINE_TRANS);
if(wmescher && qfi.special) {
queuepolyat(V * qfi.spin * shadowmulmatrix, *qfi.shape, col, PPR_WALLSHADOW);
@ -2950,7 +2950,7 @@ void floorShadow(cell *c, const transmatrix& V, int col, bool warp) {
queuepolyat(V * applyPatterndir(c, si), shTriheptaFloorShadow[ctof(c)], col, PPR_WALLSHADOW);
}
}
else if(c->land == laDual && !nonchamfered) {
else if(c->land == laDual && !nonbitrunc) {
if(euclid && !a4 && ishex1(c))
queuepolyat(V * pispin, shBigTriShadow, col, PPR_WALLSHADOW);
else
@ -2974,7 +2974,7 @@ void plainfloor(cell *c, bool warp, const transmatrix &V, int col, int prio) {
queuepolyat(V * applyPatterndir(c, si), shTriheptaFloor[sphere ? ctof(c) : si.id], col, prio);
}
}
else if(c->land == laDual && !nonchamfered) {
else if(c->land == laDual && !nonbitrunc) {
if(euclid && !a4 && ishex1(c))
queuepolyat(V * pispin, shBigTriangle, col, prio);
else
@ -2992,7 +2992,7 @@ void qplainfloor(cell *c, bool warp, const transmatrix &V, int col) {
auto si = patterns::getpatterninfo(c, 0, 0);
qfloor(c, V, applyPatterndir(c, si), shTriheptaFloor[si.id], col);
}
else if(c->land == laDual && !nonchamfered)
else if(c->land == laDual && !nonbitrunc)
qfloor_eswap(c, V, shBigTriangle, col);
else {
qfloor(c, V, shFloor[ctof(c)], col);
@ -3002,7 +3002,7 @@ void qplainfloor(cell *c, bool warp, const transmatrix &V, int col) {
int wavephase;
void warpfloor(cell *c, const transmatrix& V, int col, int prio, bool warp) {
if(shmup::on || nonchamfered) warp = false;
if(shmup::on || nonbitrunc) warp = false;
#if CAP_TEXTURE
if(qfi.tinf) {
queuetable(V*qfi.spin, &qfi.tinf->vertices[0], size(qfi.tinf->vertices) / 3, 0, texture::recolor(col), prio);
@ -3054,9 +3054,9 @@ void escherSidewall(cell *c, int sidepar, const transmatrix& V, int col) {
}
void placeSidewall(cell *c, int i, int sidepar, const transmatrix& V, bool warp, bool mirr, int col) {
if(shmup::on || nonchamfered) warp = false;
if(shmup::on || nonbitrunc) warp = false;
if(warp && !ishept(c) && (!c->mov[i] || !ishept(c->mov[i]))) return;
if(c->land == laDual && !nonchamfered) {
if(c->land == laDual && !nonbitrunc) {
if(ctof(c)) return;
if((euclid && !a4) ? (ishex1(c) ? !(i&1) : (i&1)) : !(i&1)) return;
}
@ -3081,7 +3081,7 @@ void placeSidewall(cell *c, int i, int sidepar, const transmatrix& V, bool warp,
// prio += c->cpdist - c->mov[i]->cpdist;
queuepolyat(V2,
(qfi.tinf?shFullFloorSide:mirr?shMFloorSide:warp?shTriheptaSide:(c->land == laDual&&!nonchamfered)?shBigTriSide:shFloorSide)[sidepar][ctof(c)], col, prio);
(qfi.tinf?shFullFloorSide:mirr?shMFloorSide:warp?shTriheptaSide:(c->land == laDual&&!nonbitrunc)?shBigTriSide:shFloorSide)[sidepar][ctof(c)], col, prio);
}
bool openorsafe(cell *c) {
@ -3609,7 +3609,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
auto si = patterns::getpatterninfo0(c);
#endif
bool eoh = euclid || nonchamfered;
bool eoh = euclid || nonbitrunc;
if(c->wall == waChasm) {
if(c->land == laZebra) fd++;
@ -3655,7 +3655,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
onleft = !onleft;
if(c->type == 6 && c->mov[d]->barleft == laMirror)
onleft = !onleft;
if(nonchamfered) onleft = !onleft;
if(nonbitrunc) onleft = !onleft;
if(d == -1) {
for(d=0; d<6; d++)
@ -3775,11 +3775,11 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
else if(isWarped(c) && euclid)
qfloor_eswap(c, Vf, shTriheptaFloor[ctof(c)], darkena(fcol, fd, 0xFF));
else if(c->land == laDual && !nonchamfered && !ctof(c)) {
else if(c->land == laDual && !nonbitrunc && !ctof(c)) {
qfloor_eswap(c, Vf, shBigTriangle, darkena(fcol, fd, 0xFF));
}
else if(isWarped(c) && !nonchamfered && !shmup::on) {
else if(isWarped(c) && !nonbitrunc && !shmup::on) {
auto si = patterns::getpatterninfo(c, 0, 0);
if(si.id < 13)
qfloor(c, Vf, applyPatterndir(c, si), shTriheptaFloor[si.id], darkena(fcol, fd, 0xFF));
@ -3874,7 +3874,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
else if(c->land == laTortoise)
qfloor_eswap(c, Vf, TURTLEFLOOR, darkena(fcol, fd, 0xFF));
else if(c->land == laDragon && !nonchamfered) {
else if(c->land == laDragon && !nonbitrunc) {
/* if(!wmspatial || noAdjacentChasms(c)) */
qfloor(c, Vf, DRAGONFLOOR, darkena(fcol, fd, 0xFF));
/* if(wmspatial)
@ -4063,7 +4063,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
if(pseudohept(c) && (
c->land == laRedRock ||
vid.darkhepta ||
(c->land == laClearing && nonchamfered))) {
(c->land == laClearing && nonbitrunc))) {
queuepoly((*Vdp), shHeptaMarker, wmblack ? 0x80808080 : 0x00000080);
}
@ -4548,7 +4548,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
calcAirdir(c2); // printf("airdir = %d\n", airdir);
transmatrix V0 = ddspin(c, i, S42);
double ph = ticks / (nonchamfered?150:75.0) + airdir * M_PI / (S21+.0);
double ph = ticks / (nonbitrunc?150:75.0) + airdir * M_PI / (S21+.0);
int aircol = 0x8080FF00 | int(32 + 32 * -cos(ph));
@ -4593,7 +4593,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
transmatrix V0 = spin((hdir) * M_PI / S42);
double ldist = nonchamfered ? crossf : c->type == 6 ? .2840 : 0.3399;
double ldist = nonbitrunc ? crossf : c->type == 6 ? .2840 : 0.3399;
poly_outline = OUTLINE_TRANS;
queuepoly((*Vdp)*V0*xpush(ldist*(2*ph1-1)), shDisk, aircol);
@ -4618,7 +4618,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
int prec = sphere ? 3 : 1;
if(nonchamfered) {
if(nonbitrunc) {
double x = hcrossf;
for(int t=0; t<S7; t++)
if(c->mov[t] && c->mov[t] < c)
@ -5017,7 +5017,7 @@ void drawthemap() {
mmspatial = vid.monmode == 4 || vid.monmode == 5;
DEBB(DF_GRAPH, (debugfile,"draw the map\n"));
fanframe = ticks / (nonchamfered ? 300 : 150.0) / M_PI;
fanframe = ticks / (nonbitrunc ? 300 : 150.0) / M_PI;
for(int m=0; m<motypes; m++) if(isPrincess(eMonster(m)))
minf[m].name = princessgender() ? "Princess" : "Prince";
@ -5624,6 +5624,6 @@ cell *viewcenter() {
}
bool inscreenrange(cell *c) {
return celldistance(viewcenter(), c) <= (euclid ? sightrange : nonchamfered ? 9 : 13);
return celldistance(viewcenter(), c) <= (euclid ? sightrange : nonbitrunc ? 9 : 13);
}

View File

@ -347,7 +347,7 @@ string generateHelpForWall(eWall w) {
if(w == waMineMine || w == waMineUnknown || w == waMineOpen)
addMinefieldExplanation(s);
if(isThumper(w)) s += pushtext(w);
if((w == waClosePlate || w == waOpenPlate) && nonchamfered)
if((w == waClosePlate || w == waOpenPlate) && nonbitrunc)
s += "\n\n(For the heptagonal mode, the radius has been reduced to 2 for closing plates.)";
return s;
}

View File

@ -95,7 +95,7 @@ heptagon *buildHeptagon(heptagon *parent, int d, hstate s, int pard = 0, int fix
if(pard == 0) {
h->dm4 = parent->dm4+1;
if(fixdistance != COMPUTE) h->distance = fixdistance;
else if(nonchamfered) h->distance = parent->distance + 1;
else if(nonbitrunc) h->distance = parent->distance + 1;
else if(parent->s == hsOrigin) h->distance = parent->distance + 2;
else if(S3 == 4) {
h->distance = parent->distance + 2;
@ -127,7 +127,7 @@ heptagon *buildHeptagon(heptagon *parent, int d, hstate s, int pard = 0, int fix
else h->distance = parent->distance + 2;
}
else {
h->distance = parent->distance - (nonchamfered?1:2);
h->distance = parent->distance - (nonbitrunc?1:2);
if(S3 == 4 && S7 == 5) {
if(h->s == hsOrigin) {
printf("had to cheat!\n");

View File

@ -343,21 +343,21 @@ void drawStats() {
if(d >= 0 && d < 64) qty[d]++;
}
if(geometry == gNormal)
for(int i=nonchamfered?6:8; i<=15; i++)
for(int i=nonbitrunc?6:8; i<=15; i++)
qty[i] =
nonchamfered ?
nonbitrunc ?
3*qty[i-1] - qty[i-2]
: qty[i-1] + qty[i-2] + qty[i-3] - qty[i-4];
if(geometry == gEuclid)
for(int i=8; i<=15; i++) qty[i] = 6*i;
for(int i=0; i<64; i++) if(qty[i])
dialog::addInfo(its(qty[i]), distcolors[i&7]);
if(geometry == gNormal && !nonchamfered) {
if(geometry == gNormal && !nonbitrunc) {
dialog::addBreak(200);
dialog::addHelp("a(d+4) = a(d+3) + a(d+2) + a(d+1) - a(d)");
dialog::addInfo("a(d) ~ 1.72208ᵈ", forecolor);
}
if(geometry == gNormal && nonchamfered) {
if(geometry == gNormal && nonbitrunc) {
dialog::addBreak(200);
dialog::addHelp("a(d+2) = 3a(d+1) - a(d+2)");
dialog::addInfo("a(d) ~ 2.61803ᵈ", forecolor);

View File

@ -1201,7 +1201,7 @@ void checkStunKill(cell *dest);
void clearMessages();
void resetGeometry();
extern bool nonchamfered;
extern bool nonbitrunc;
namespace svg {
void circle(int x, int y, int size, int col);
@ -2191,13 +2191,13 @@ struct hrmap {
struct hrmap_hyperbolic : hrmap {
heptagon *origin;
bool isnonchamfered;
bool isnonbitrunc;
hrmap_hyperbolic();
heptagon *getOrigin() { return origin; }
~hrmap_hyperbolic() {
DEBMEM ( verifycells(origin); )
// printf("Deleting hyperbolic map: %p\n", this);
dynamicval<bool> ph(nonchamfered, isnonchamfered);
dynamicval<bool> ph(nonbitrunc, isnonbitrunc);
clearfrom(origin);
}
void verify() { verifycells(origin); }
@ -2431,7 +2431,7 @@ inline hyperpoint tC0(const transmatrix &T) {
transmatrix actualV(const heptspin& hs, const transmatrix& V);
transmatrix cview();
extern string chamfernames[2];
extern string bitruncnames[2];
extern bool need_mouseh;
extern int whateveri, whateveri2;

View File

@ -4,7 +4,7 @@
eGeometry geometry, targetgeometry;
// for the pure heptagonal grid
bool nonchamfered = false;
bool nonbitrunc = false;
// hyperbolic points and matrices

View File

@ -330,7 +330,7 @@ bool confusingGeometry() {
}
transmatrix actualV(const heptspin& hs, const transmatrix& V) {
return (hs.spin || nonchamfered) ? V * spin(hs.spin*2*M_PI/S7 + (nonchamfered ? M_PI:0)) : V;
return (hs.spin || nonbitrunc) ? V * spin(hs.spin*2*M_PI/S7 + (nonbitrunc ? M_PI:0)) : V;
}
void drawrec(const heptspin& hs, int lev, hstate s, const transmatrix& V) {
@ -349,7 +349,7 @@ void drawrec(const heptspin& hs, int lev, hstate s, const transmatrix& V) {
if(lev <= 0) return;
if(!nonchamfered) for(int d=0; d<S7; d++) {
if(!nonbitrunc) for(int d=0; d<S7; d++) {
int ds = fixrot(hs.spin + d);
reclevel = maxreclevel - lev + 1;
// createMov(c, ds);

View File

@ -378,7 +378,7 @@ void addMessage(string s, char spamtype = 0);
#define stdeuc (geometry == gNormal || geometry == gEuclid || geometry == gEuclidSquare)
#define smallsphere (S7 < 5)
#define bigsphere (S7 == 5)
#define ap4 (a4 && nonchamfered)
#define ap4 (a4 && nonbitrunc)
#define euclid4 (euclid && a4)
#define euclid6 (euclid && !a4)

View File

@ -532,7 +532,7 @@ void sominit(int initto) {
targetGeometry = gQuotient1;
restartGame('g');
}
if(!nonchamfered) restartGame('7'); */
if(!nonbitrunc) restartGame('7'); */
printf("Initializing SOM (1)\n");

View File

@ -186,7 +186,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
if(gs == 1)
c->wall = waPalace;
if(gs == 3)
c->wall = nonchamfered ? waOpenGate : waClosedGate;
c->wall = nonbitrunc ? waOpenGate : waClosedGate;
if(gs == 4 && hrand(100) < 40)
c->wall = waClosePlate;
if(gs == 6)
@ -203,7 +203,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
bool lookingForPrincess = !euclid && c->master->alt && !princess::challenge;
bool pgate = false;
if(nonchamfered) {
if(nonbitrunc) {
int i = fiftyval049(c);
if(i >= 8 && i <= 14 && !polarb50(c)) pgate = true;
}
@ -239,9 +239,9 @@ void giantLandSwitch(cell *c, int d, cell *from) {
}
}
}
else if((hrand(100) < (lookingForPrincess ? (nonchamfered ? 11 : 7) : 5) && cdist50(c)) ||
else if((hrand(100) < (lookingForPrincess ? (nonbitrunc ? 11 : 7) : 5) && cdist50(c)) ||
(cdist50(c) == 0 && polarb50(c) && hrand(100) < 60)) {
c->wall = hrand(100) < (lookingForPrincess ? (nonchamfered ? 25 : 30):50) ? waClosePlate : waOpenPlate;
c->wall = hrand(100) < (lookingForPrincess ? (nonbitrunc ? 25 : 30):50) ? waClosePlate : waOpenPlate;
}
else if(hrand(100) < (lookingForPrincess ? 3 : 5))
c->wall = waTrapdoor;
@ -256,9 +256,9 @@ void giantLandSwitch(cell *c, int d, cell *from) {
if(princess::generating) {
// no Opening Plates nearby
if(d <= 7 && c->wall == waOpenPlate && !nonchamfered)
if(d <= 7 && c->wall == waOpenPlate && !nonbitrunc)
c->wall = waNone;
if(d <= 7 && c->wall == waClosePlate && nonchamfered)
if(d <= 7 && c->wall == waClosePlate && nonbitrunc)
c->wall = waOpenPlate;
// no monsters nearby
if(d>0) c->monst = moNone;
@ -357,7 +357,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
c->wall = waCavewall;
else c->wall = waCavefloor;
}
else if(nonchamfered) {
else if(nonbitrunc) {
if(polarb50(c))
c->wall = waCavewall;
else c->wall = waCavefloor;
@ -378,7 +378,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
c->monst = moSeep;
ONEMPTY {
if(hrand(nonchamfered?400:1000) < PT(100 + 2 * (kills[moMiner] + kills[moLancer] + kills[moFlailer]), 200) && notDippingFor(itEmerald)) {
if(hrand(nonbitrunc?400:1000) < PT(100 + 2 * (kills[moMiner] + kills[moLancer] + kills[moFlailer]), 200) && notDippingFor(itEmerald)) {
// do not destroy walls!
bool ok = true;
for(int i=0; i<c->type; i++) if(c->mov[i]->wall == waCavewall) ok = false;
@ -977,7 +977,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
case laHalloween:
if(d == 9) {
if(nonchamfered) {
if(nonbitrunc) {
int fv = c->master->fiftyval;
if(fv == 1 || fv == 4 || fv == 2)
c->wall = waChasm;
@ -1086,7 +1086,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
if(ctof(c)) {
int id = c->master->fiftyval;
if(id == 1) c->wall = waCharged;
if(id == (elliptic && !nonchamfered ? 3 : 9)) c->wall = waGrounded;
if(id == (elliptic && !nonbitrunc ? 3 : 9)) c->wall = waGrounded;
}
}
else if(S7 == 4) {
@ -1108,7 +1108,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
}
}
}
else if(nonchamfered) {
else if(nonbitrunc) {
int i = zebra40(c);
if((i == 5 || i == 8) && hrand(100) < 20) c->wall = hrand(2) ? waCharged : waGrounded;
else if(i == 15) c->wall = waSandstone;
@ -1232,7 +1232,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
case laHell:
if(d == 9) {
if(hrand(1000) < (nonchamfered ? 16 : 36) && celldist(c) >= 3) {
if(hrand(1000) < (nonbitrunc ? 16 : 36) && celldist(c) >= 3) {
for(int i=0; i<c->type; i++) {
cell *c2 = createMov(c, i);
setdist(c2, d+1, c);
@ -1284,7 +1284,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
case laHive:
if(d == 9) {
if(hrand(2000) < (chaosmode ? 1000 : nonchamfered?200:2) && !safety)
if(hrand(2000) < (chaosmode ? 1000 : nonbitrunc?200:2) && !safety)
hive::createBugArmy(c);
if(hrand(2000) < 100 && !c->wall && !c->item && !c->monst) {
int nww = 0;
@ -1504,14 +1504,14 @@ void giantLandSwitch(cell *c, int d, cell *from) {
if(d == 7 && c->wall == waNone)
buildPrizeMirror(c, 1000);
ONEMPTY {
if(hrand((doCross && celldist(c) <= 5) ?450:16000) < 30+items[itRedGem]+yendor::hardness() && !pseudohept(c) && !c->monst && !c->wall && !(nonchamfered && S3==4)) {
if(hrand((doCross && celldist(c) <= 5) ?450:16000) < 30+items[itRedGem]+yendor::hardness() && !pseudohept(c) && !c->monst && !c->wall && !(nonbitrunc && S3==4)) {
int i = -1;
for(int t=0; t<c->type; t++) if(c->mov[t]->mpdist > c->mpdist && !pseudohept(c->mov[t]))
i = t;
if(i != -1 && !peace::on)
generateSnake(c, i);
}
else if(hrand(16000) < 50+items[itRedGem]+yendor::hardness() && (nonchamfered?hrand(10)<3:!ishept(c)) && !c->monst)
else if(hrand(16000) < 50+items[itRedGem]+yendor::hardness() && (nonbitrunc?hrand(10)<3:!ishept(c)) && !c->monst)
c->monst = moRedTroll,
c->mondir = NODIR;
}
@ -1541,7 +1541,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
if(hrand(1000) < 150 && celldist(c) >= 3 && !pseudohept(c))
c->wall = waSmallTree;
int q = 0;
if(!nonchamfered && !chaosmode) for(int i=0; i<c->type; i++)
if(!nonbitrunc && !chaosmode) for(int i=0; i<c->type; i++)
if(c->mov[i] && !isWarped(c->mov[i]->land) && c->mov[i]->land != laCrossroads4)
q++;
if(q == 1) c->wall = waWarpGate;
@ -1550,7 +1550,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
if(c->land == laWarpSea) {
c->wall = waSea;
int q = 0;
if(!nonchamfered && !chaosmode) for(int i=0; i<c->type; i++)
if(!nonbitrunc && !chaosmode) for(int i=0; i<c->type; i++)
if(c->mov[i] && !isWarped(c->mov[i]->land)) q++;
if(q == 1) c->wall = waWarpGate;
}
@ -1671,7 +1671,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
}
else if(items[itHunting] < 10) {
vector<cell*> next;
forCellEx(c2, c) if(c2->mpdist > 7 && (nonchamfered || !ctof(c2))) next.push_back(c2);
forCellEx(c2, c) if(c2->mpdist > 7 && (nonbitrunc || !ctof(c2))) next.push_back(c2);
if(size(next)) {
c->item = itHunting;
cell *c3 = next[hrand(size(next))];
@ -1851,7 +1851,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
case laMirrorOld:
ONEMPTY {
if((nonchamfered?pseudohept(c):!ishept(c)) && hrand(5000) < 120 && (peace::on || notDippingFor(itShard)))
if((nonbitrunc?pseudohept(c):!ishept(c)) && hrand(5000) < 120 && (peace::on || notDippingFor(itShard)))
c->wall = hrand(2) ? waMirror : waCloud;
else if(ishept(c) && hrand(5000) < 10 * PRIZEMUL)
placePrizeOrb(c);
@ -1864,7 +1864,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
case laMirror:
ONEMPTY {
if((nonchamfered?pseudohept(c):!ishept(c)) && hrand(1250) < 120 && (peace::on || notDippingFor(itShard)))
if((nonbitrunc?pseudohept(c):!ishept(c)) && hrand(1250) < 120 && (peace::on || notDippingFor(itShard)))
c->wall = hrand(2) ? waMirror : waCloud;
else if(ishept(c) && hrand(5000) < 10 * PRIZEMUL)
placePrizeOrb(c);
@ -1968,7 +1968,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
else
si.id = (zebra40(c)&2) ? 0 : zebra40(c) == 4 ? 8 : 1;
c->wall = waSea;
if(among(si.id, 0, 4, 16, nonchamfered ? -1 : 24))
if(among(si.id, 0, 4, 16, nonbitrunc ? -1 : 24))
c->wall = waDock;
if(si.id == 8 && hrand(100) < 75) {
c->wall = waBoat;
@ -2039,7 +2039,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
case laCrossroads5:
if(c->wall == waTower) c->land = laCamelot;
ONEMPTY {
if(nonchamfered && c->land == laCrossroads5 && hrand(100) < 60)
if(nonbitrunc && c->land == laCrossroads5 && hrand(100) < 60)
c->wall = waBarrier;
else if(!ctof(c) && !inv::on && items[itShard] >= 10 && hrand(8000) < 120*orbcrossfun(items[itShard]))
c->wall = hrand(2) ? waMirror : waCloud;
@ -2251,7 +2251,7 @@ void setdist(cell *c, int d, cell *from) {
if(buggyGeneration) {
if(d < BARLEV) for(int i=0; i<c->type; i++) {
setdist(createMov(c, i), d+(nonchamfered?2:1), c);
setdist(createMov(c, i), d+(nonbitrunc?2:1), c);
}
if(d >= BARLEV) c->item = itBuggy2;
return;
@ -2336,7 +2336,7 @@ void setdist(cell *c, int d, cell *from) {
placeLocalOrbs(c);
}
if(nonchamfered && c->wall == waMirrorWall && c->land == laMirror)
if(nonbitrunc && c->wall == waMirrorWall && c->land == laMirror)
c->land = laMirrorWall; // , c->item = itPirate; // not really a proper bugfix
if(d == 7) playSeenSound(c);

View File

@ -1023,10 +1023,10 @@ int isLandValid(eLand l) {
return 1;
// not enough space
if(l == laStorms && nonchamfered && elliptic)
if(l == laStorms && nonbitrunc && elliptic)
return 0;
if(l == laStorms && nonchamfered && S3 == 3)
if(l == laStorms && nonbitrunc && S3 == 3)
return 0;
// available only in weird geometries
@ -1046,8 +1046,8 @@ int isLandValid(eLand l) {
if((l == laWildWest || l == laDual) && normalgame)
return 0;
// Crystal World is designed for chamfered geometries
if(l == laDual && nonchamfered)
// Crystal World is designed for bitrunc geometries
if(l == laDual && nonbitrunc)
return 0;
if(l == laHaunted && chaosmode)
@ -1096,11 +1096,11 @@ int isLandValid(eLand l) {
// works correctly only in some geometries
if(l == laClearing)
if(chaosmode || !(stdeuc || a38 || (a45 && !nonchamfered) || (a47 && !nonchamfered)))
if(chaosmode || !(stdeuc || a38 || (a45 && !nonbitrunc) || (a47 && !nonbitrunc)))
return 0;
// does not work in non-chamfered a4
if(l == laOvergrown && a4 && nonchamfered)
// does not work in non-bitrunc a4
if(l == laOvergrown && a4 && nonbitrunc)
return 0;
// does not work in bounded either
@ -1119,9 +1119,9 @@ int isLandValid(eLand l) {
if((l == laBlizzard || l == laVolcano) && elliptic && S7 < 5)
return 0;
// Kraken does not really work in odd non-chamfered geometries
// Kraken does not really work in odd non-bitrunc geometries
// (but we do have to allow it in Standard)
if(l == laKraken && nonchamfered && (S7&1)) {
if(l == laKraken && nonbitrunc && (S7&1)) {
if(!geometry) return 1;
return 0;
}
@ -1132,7 +1132,7 @@ int isLandValid(eLand l) {
// works in most spheres, Zebra quotient, and stdeuc
if(l == laWhirlwind)
if(!(stdeuc || quotient == 1 || (S7 == 4 && !nonchamfered) || (bigsphere && nonchamfered && !elliptic)))
if(!(stdeuc || quotient == 1 || (S7 == 4 && !nonbitrunc) || (bigsphere && nonbitrunc && !elliptic)))
return 0;
// needs standard/Euclidean (needs fractal landscape)
@ -1154,12 +1154,12 @@ int isLandValid(eLand l) {
if(l == laDragon && bounded)
return 0;
// Graveyard pattern does not work on non-chamfered weird geometries
// Graveyard pattern does not work on non-bitrunc weird geometries
if(l == laGraveyard)
return geosupport_graveyard();
// Warped Coast does not work on non-chamfered S3s (except standard heptagonal where we have to keep it)
if(l == laWarpCoast && (S3==3) && nonchamfered) {
// Warped Coast does not work on non-bitrunc S3s (except standard heptagonal where we have to keep it)
if(l == laWarpCoast && (S3==3) && nonbitrunc) {
if(!geometry) return 1;
return 0;
}
@ -1177,7 +1177,7 @@ int isLandValid(eLand l) {
if(l == laTrollheim && !stdeuc)
return 1;
if(l == laReptile && (!stdeuc || nonchamfered))
if(l == laReptile && (!stdeuc || nonbitrunc))
return 1;
if(l == laCrossroads && weirdhyperbolic)
@ -1193,14 +1193,14 @@ int isLandValid(eLand l) {
if(l == laCrossroads4 && !(stdeuc || smallbounded))
return 0;
if(l == laZebra && !(stdeuc || (a4 && nonchamfered) || a46 || quotient == 1))
if(l == laZebra && !(stdeuc || (a4 && nonbitrunc) || a46 || quotient == 1))
return 0;
if(l == laCrossroads3 && euclid)
return 1; // because it is not accurate
if(l == laPrairie) {
if(stdeuc || (bigsphere && !nonchamfered && !elliptic) || (quotient == 2)) ;
if(stdeuc || (bigsphere && !nonbitrunc && !elliptic) || (quotient == 2)) ;
else if(!bounded) return 1;
else return 0;
}

View File

@ -6354,7 +6354,7 @@ S(
"You can try many different geometries here. We start by gluing "
"n-gons in such a way that k of them meet in every vertex. "
"Depending on n and k, this either folds into a sphere, unfolds into a plane, "
"or requires a hyperbolic space. The result may be then 'chamfered' by "
"or requires a hyperbolic space. The result may be then 'bitruncated' by "
"replacing each vertex by a 2k-gon. Furthermore, you can play "
"with quotient geometries. For example, the elliptic geometry is "
"obtained from the sphere by making the antipodes be the same point, "
@ -6362,7 +6362,7 @@ S(
"Have fun experimenting! "
"Achievements and leaderboards do not work in geometry experiments, "
"except some specific ones.\n\n"
"In standard geometry (chamfered or not), you can play the full game, but in other geometries "
"In standard geometry (bitruncated or not), you can play the full game, but in other geometries "
"you select a particular land. Lands are unlocked by visiting them in this "
"session, or permanently by collecting 25 treasure. Try Crossroads in Euclidean "
"or chaos mode in non-standard non-quotient hyperbolic to visit many lands. "
@ -6407,7 +6407,7 @@ S("tetrahedron (buggy)", "čtyřstěn (problémový)")
S("tetrahedron", "čtyřstěn") // in case if it gets better
S("land", "kraj")
S("chamfered", "seříznutí")
S("bitruncated", "seříznutí")
S("does not matter", "nehraje roli")
S("sides per face", "počet stran")
S("faces per vertex", "stupeň vrcholů")
@ -6418,7 +6418,7 @@ S("quotient space", "kvocientový prostor")
S("size of the world", "velikost světa")
S("flat", "placka")
// chamfered or not chamfered
// bitruncated or not bitrunc
S(" (c)", " (s)")
S(" (n)", " (n)")

View File

@ -6206,7 +6206,7 @@ S(
"You can try many different geometries here. We start by gluing "
"n-gons in such a way that k of them meet in every vertex. "
"Depending on n and k, this either folds into a sphere, unfolds into a plane, "
"or requires a hyperbolic space. The result may be then 'chamfered' by "
"or requires a hyperbolic space. The result may be then 'bitruncated' by "
"replacing each vertex by a 2k-gon. Furthermore, you can play "
"with quotient geometries. For example, the elliptic geometry is "
"obtained from the sphere by making the antipodes be the same point, "
@ -6214,7 +6214,7 @@ S(
"Have fun experimenting! "
"Achievements and leaderboards do not work in geometry experiments, "
"except some specific ones.\n\n"
"In standard geometry (chamfered or not), you can play the full game, but in other geometries "
"In standard geometry (bitruncated or not), you can play the full game, but in other geometries "
"you select a particular land. Lands are unlocked by visiting them in this "
"session, or permanently by collecting 25 treasure. Try Crossroads in Euclidean "
"or chaos mode in non-standard non-quotient hyperbolic to visit many lands. "
@ -6257,7 +6257,7 @@ S("tetrahedron (buggy)", "czworościan (bugi)")
S("tetrahedron", "czworościan") // in case if it gets better
S("land", "kraina")
S("chamfered", "przycięte")
S("bitruncated", "przycięte")
S("does not matter", "bez znaczenia")
S("sides per face", "boki ścian")
S("faces per vertex", "wierzchołki")
@ -6268,8 +6268,8 @@ S("quotient space", "przestrzeń ilorazowa")
S("size of the world", "wielkość świata")
S("flat", "płaska")
// chamfered or not chamfered
S(" (c)", " (p)")
// bitruncated or not bitrunc
S(" (b)", " (b)")
S(" (n)", " (n)")
S("(locked)", "(blok)")
@ -6328,7 +6328,7 @@ S(
S("find the next prime", "znajdź następną liczbę pierwszą")
S("activate", "uruchom")
S("order %1%2 (non-chamfered cells: %3)", "rząd %1%2 (nieprzyciętych pól: %3)")
S("order %1%2 (non-bitrunc cells: %3)", "rząd %1%2 (nieprzyciętych pól: %3)")
// Torus/Klein bottle, Euclidean Squares, and their advanced configuration
//-------------------------------------------------------------------------
@ -6347,7 +6347,7 @@ S("Klein bottle (squares)", "butelka Kleina (kwadraty)")
S("Klein bottle (hex)", "butelka Kleina (heksy)")
S("this mode has bad patterns", "nieprawidłowe wzorki dla tego trybu")
S("incompatible with chamfering", "niekompatybilne z przycinaniem")
S("incompatible with bitruncating", "niekompatybilne z przycinaniem")
S("best if %1 is divisible by %2", "najlepiej gdy %1 jest podzielne przez %2")
S("number of cells (n)", "liczba pól (n)")

View File

@ -6429,7 +6429,7 @@ S(
"You can try many different geometries here. We start by gluing "
"n-gons in such a way that k of them meet in every vertex. "
"Depending on n and k, this either folds into a sphere, unfolds into a plane, "
"or requires a hyperbolic space. The result may be then 'chamfered' by "
"or requires a hyperbolic space. The result may be then 'bitruncated' by "
"replacing each vertex by a 2k-gon. Furthermore, you can play "
"with quotient geometries. For example, the elliptic geometry is "
"obtained from the sphere by making the antipodes be the same point, "
@ -6437,7 +6437,7 @@ S(
"Have fun experimenting! "
"Achievements and leaderboards do not work in geometry experiments, "
"except some specific ones.\n\n"
"In standard geometry (chamfered or not), you can play the full game, but in other geometries "
"In standard geometry (bitruncated or not), you can play the full game, but in other geometries "
"you select a particular land. Lands are unlocked by visiting them in this "
"session, or permanently by collecting 25 treasure. Try Crossroads in Euclidean "
"or chaos mode in non-standard non-quotient hyperbolic to visit many lands. "
@ -6478,7 +6478,7 @@ S("tetrahedron (buggy)", "тетраэдр (ошибки)")
S("tetrahedron", "тетраэдр") // in case if it gets better
S("land", "земля")
S("chamfered", "усеченный")
S("bitruncated", "усеченный")
S("does not matter", "не важно")
S("sides per face", "сторон у клетка")
S("faces per vertex", "клеток в вершине")
@ -6489,7 +6489,7 @@ S("quotient space", "факторпространство")
S("size of the world", "размер мира")
S("flat", "плоскость")
// chamfered or not chamfered
// bitruncated or not bitrunc
S(" (c)", " (у)")
S(" (n)", " (н)")

View File

@ -88,7 +88,7 @@ namespace mapstream {
int32_t i = VERNUM; save(i);
save(patterns::whichPattern);
save(geometry);
save(nonchamfered);
save(nonbitrunc);
if(geometry == gTorus) {
save(torusconfig::qty);
save(torusconfig::dx);
@ -173,7 +173,7 @@ namespace mapstream {
if(vernum >= 10203) {
load(geometry);
load(nonchamfered);
load(nonbitrunc);
if(geometry == gTorus) {
load(torusconfig::qty);
load(torusconfig::dx);
@ -631,7 +631,7 @@ namespace mapeditor {
if(painttype == 4 && radius) {
if(where.c->type != copysource.c->type) return;
if(where.spin<0) where.spin=0;
if(!nonchamfered && !ctof(mouseover) && ((where.spin&1) != (copysource.spin&1)))
if(!nonbitrunc && !ctof(mouseover) && ((where.spin&1) != (copysource.spin&1)))
cwspin(where, 1);
}
if(painttype != 4) copysource.c = NULL;
@ -1280,7 +1280,7 @@ namespace mapeditor {
fscanf(f, "%d%d%d%d\n", &tg, &nt, &wp, &patterns::subpattern_flags);
patterns::whichPattern = wp;
if(tg != geometry) { targetgeometry = eGeometry(tg); restartGame('g', 0, true); }
if(nt != nonchamfered) { restartGame('7', 0, true); }
if(nt != nonbitrunc) { restartGame('7', 0, true); }
}
while(true) {
@ -1324,7 +1324,7 @@ namespace mapeditor {
fprintf(f, "HyperRogue saved picture\n");
fprintf(f, "%x\n", VERNUM_HEX);
if(VERNUM_HEX >= 0xA0A0)
fprintf(f, "%d %d %d %d\n", geometry, nonchamfered, patterns::whichPattern, patterns::subpattern_flags);
fprintf(f, "%d %d %d %d\n", geometry, nonbitrunc, patterns::whichPattern, patterns::subpattern_flags);
for(int i=0; i<USERSHAPEGROUPS; i++) for(int j=0; j<USERSHAPEIDS; j++) {
usershape *us = usershapes[i][j];
if(!us) continue;

View File

@ -431,7 +431,7 @@ void showChangeMode() {
dialog::addBoolItem(XLAT("Tutorial"), tour::on, 'T');
#endif
dialog::addBoolItem(XLAT("experiment with geometry"), geometry || nonchamfered || viewdists, 'e');
dialog::addBoolItem(XLAT("experiment with geometry"), geometry || nonbitrunc || viewdists, 'e');
dialog::addBoolItem(XLAT(SHMUPTITLE), (shmup::on || multi::players > 1), 's');
if(!shmup::on) dialog::addSelItem(XLAT("hardcore mode"),
hardcore && !pureHardcore() ? XLAT("PARTIAL") : ONOFF(hardcore), 'h');

View File

@ -641,7 +641,7 @@ void generateSnake(cell *c, int i) {
c->monst = moHexSnake;
int cpair = (1<<pattern_threecolor(c)) | (1<<pattern_threecolor(c->mov[i]));
preventbarriers(c);
int len = nonchamfered ? 2 : ROCKSNAKELENGTH;
int len = nonbitrunc ? 2 : ROCKSNAKELENGTH;
cell *c2 = c;
vector<cell*> rocksnake;
while(--len) {
@ -665,7 +665,7 @@ void generateSnake(cell *c, int i) {
i = goodsteps[hrand(size(goodsteps))];
}
}
if(size(rocksnake) < ROCKSNAKELENGTH/2 && !nonchamfered) {
if(size(rocksnake) < ROCKSNAKELENGTH/2 && !nonbitrunc) {
for(int i=0; i<size(rocksnake); i++)
rocksnake[i]->monst = moNone;
}

View File

@ -378,7 +378,7 @@ ld orbcrossfun(int tr) {
bool buildPrizeMirror(cell *c, int freq) {
if(inv::on) return false;
if(c->type == 7 && !nonchamfered) return false;
if(c->type == 7 && !nonbitrunc) return false;
if(items[itShard] < 25) return false;
if(freq && hrand(freq * 100 / orbprizefun(items[itShard])) >= 100)
return false;

View File

@ -205,7 +205,7 @@ int fiftyval200(cell *c) {
// zebraval
int dir_chamfered457(cell *c) {
int dir_bitrunc457(cell *c) {
int wset = 0;
int has1 = 0;
for(int i=0; i<4; i++) {
@ -233,7 +233,7 @@ int zebra40(cell *c) {
}
else if(ctof(c)) return (c->master->zebraval/10);
else if(a4) {
int ws = dir_chamfered457(c);
int ws = dir_bitrunc457(c);
if(ws < 0) return -ws;
int tot = 0;
array<int, 4> zebras;
@ -526,7 +526,7 @@ namespace patterns {
si.dir = i;
}
else {
int d = dir_chamfered457(c);
int d = dir_bitrunc457(c);
if(d >= 0) si.dir = d;
else si.dir = (zebra40(createMov(c, 0)) & 4) ? 2 : 0;
}
@ -540,11 +540,11 @@ namespace patterns {
si.id = (c->master->fiftyval >> 1) & 3;
else
si.id = 0;
if(nonchamfered)
if(nonbitrunc)
si.id *= 4;
else
si.id += 4;
si.dir = (pat == PAT_COLORING && !nonchamfered ? 1 : 0) + (c->master->fiftyval | (c->master->fiftyval & 8 ? 0 : 2));
si.dir = (pat == PAT_COLORING && !nonbitrunc ? 1 : 0) + (c->master->fiftyval | (c->master->fiftyval & 8 ? 0 : 2));
si.symmetries = 2;
si.id += 8;
si.id %= 12;
@ -687,13 +687,13 @@ namespace patterns {
if(subpattern_flags & SPF_FULLSYM)
si.symmetries = 1;
}
if(sphere && !(nonchamfered) && !(S7 == 3))
if(sphere && !(nonbitrunc) && !(S7 == 3))
si.symmetries = ctof(c) ? 1 : 2;
if(sphere && (sub & SPF_EXTRASYM)) {
si.symmetries = ctof(c) ? 1 : 2;
}
if(a38)
si.symmetries = (ctof(c) && !nonchamfered) ? 1 : 2;
si.symmetries = (ctof(c) && !nonbitrunc) ? 1 : 2;
if(a457) {
si.symmetries = ctof(c) ? 1 : 2;
if(!ctof(c)) si.dir = 0;
@ -746,7 +746,7 @@ namespace patterns {
si.id = zebra40(c); // 4 to 43
int t4 = si.id>>2, tcdir = 0;
if(nonchamfered) tcdir = si.id^1;
if(nonbitrunc) tcdir = si.id^1;
else if(t4 == 10) tcdir = si.id-20;
else if(t4 >= 4 && t4 < 7) tcdir = 40 + (si.id&3);
@ -801,11 +801,11 @@ namespace patterns {
int look_for = -1;
int shft = 0;
if(inr(si.id, 0, 4)) {
look_for = si.id + (nonchamfered ? 4 : 60);
look_for = si.id + (nonbitrunc ? 4 : 60);
if(symRotation) si.symmetries = 1;
}
else if(inr(si.id, 4, 32)) look_for = si.id + (nonchamfered ? 28 : 168);
else if(inr(si.id, 32, 60)) look_for = si.id + (nonchamfered ? -28 : 112);
else if(inr(si.id, 4, 32)) look_for = si.id + (nonbitrunc ? 28 : 168);
else if(inr(si.id, 32, 60)) look_for = si.id + (nonbitrunc ? -28 : 112);
else if(inr(si.id, 60, 88)) look_for = si.id - 56, shft = si.reflect ? 1 : 5;
else if(inr(si.id, 88, 116)) look_for = si.id - 84, shft = 3;
else if(inr(si.id, 116, 144)) look_for = si.id + 56;
@ -849,7 +849,7 @@ namespace patterns {
if(euclid)
// use the torus ID
si.id = fieldpattern::fieldval_uniq(c);
else if(nonchamfered)
else if(nonbitrunc)
// use the actual field codes
si.id = fieldpattern::fieldval(c).first;
else
@ -888,7 +888,7 @@ namespace patterns {
}
int geosupport_threecolor() {
if(!nonchamfered) {
if(!nonbitrunc) {
if(S7 % 2) return 1;
return 2;
}
@ -898,8 +898,8 @@ int geosupport_threecolor() {
}
int geosupport_graveyard() {
// always works in chamfered geometries
if(!nonchamfered) return 2;
// always works in bitrunc geometries
if(!nonbitrunc) return 2;
// always works in patterns supporting three-color
return geosupport_threecolor();
@ -911,19 +911,19 @@ int pattern_threecolor(cell *c) {
patterns::val38(c, si, patterns::SPF_ROT, patterns::PAT_COLORING);
return si.id >> 2;
}
if(a46 && !nonchamfered) {
if(a46 && !nonbitrunc) {
patterns::patterninfo si;
patterns::val46(c, si, 0, patterns::PAT_COLORING);
int i = si.id;
return i >> 2;
}
if(euclid) {
if(a4 && nonchamfered) return eupattern4(c);
if(a4 && nonbitrunc) return eupattern4(c);
return eupattern(c) % 3;
}
if(S7 == 4 && S3 == 3) {
int codesN[6] = {0,1,2,1,2,0};
if(nonchamfered)
if(nonbitrunc)
return codesN[c->master->fiftyval];
if(ctof(c))
return 0;
@ -935,7 +935,7 @@ int pattern_threecolor(cell *c) {
return 2 - (c->spin(i)&1);
}
}
if(stdhyperbolic && nonchamfered) {
if(stdhyperbolic && nonbitrunc) {
int z = zebra40(c);
if(z == 5 || z == 8 || z == 15) return 0;
if(z == 10 || z == 12 || z == 7) return 2;
@ -943,16 +943,16 @@ int pattern_threecolor(cell *c) {
if(z == 14 || z == 11) return 4;
return 1;
}
if(a46 && nonchamfered) {
if(a46 && nonbitrunc) {
patterns::patterninfo si;
patterns::val46(c, si, 0, patterns::PAT_COLORING);
return si.id;
}
if(S7 == 5 && nonchamfered) {
if(S7 == 5 && nonbitrunc) {
const int codes[12] = {1, 2, 0, 3, 2, 0, 0, 1, 3, 1, 2, 3};
return codes[c->master->fiftyval];
}
if(S7 == 3 && nonchamfered)
if(S7 == 3 && nonbitrunc)
return c->master->fiftyval;
return !ishept(c);
}
@ -965,7 +965,7 @@ bool pseudohept(cell *c) {
}
bool warptype(cell *c) {
if(a4 && nonchamfered) {
if(a4 && nonbitrunc) {
if(euclid)
return among(eupattern4(c), 1, 2);
else
@ -1123,7 +1123,7 @@ namespace patterns {
}
dialog::addItem(XLAT("football"), 'F');
if(S3 == 4 && nonchamfered)
if(S3 == 4 && nonbitrunc)
dialog::addItem(XLAT("chessboard"), 'c');
dialog::addItem(XLAT("nice coloring"), 'T');
@ -1205,7 +1205,7 @@ namespace patterns {
if(stdhyperbolic || euclid)
dialog::addBoolItem(XLAT("Palace Pattern"), (whichPattern == PAT_PALACE), PAT_PALACE);
if(nonchamfered && S3 == 4)
if(nonbitrunc && S3 == 4)
dialog::addBoolItem(XLAT("chessboard"), (whichPattern == PAT_CHESS), PAT_CHESS);
if(a38 || a46 || euclid || S3 == 4)
@ -1232,7 +1232,7 @@ namespace patterns {
if((euclid && whichPattern == PAT_COLORING) ||
(a38 && whichPattern == PAT_COLORING) ||
(a4 && nonchamfered && whichPattern == PAT_COLORING && !a46))
(a4 && nonbitrunc && whichPattern == PAT_COLORING && !a46))
dialog::addBoolItem(XLAT("edit all three colors"), subpattern_flags & SPF_ROT, '0');
if(euclid && whichPattern == PAT_COLORING)
@ -1241,8 +1241,8 @@ namespace patterns {
if(a46 && whichPattern == PAT_COLORING)
dialog::addBoolItem(XLAT("rotate the color groups"), subpattern_flags & SPF_CHANGEROT, '4');
if(a46 && whichPattern == PAT_COLORING && !nonchamfered)
dialog::addBoolItem(XLAT("edit both chamfered colors"), subpattern_flags & SPF_TWOCOL, '5');
if(a46 && whichPattern == PAT_COLORING && !nonbitrunc)
dialog::addBoolItem(XLAT("edit both bitrunc colors"), subpattern_flags & SPF_TWOCOL, '5');
if(
(whichPattern == PAT_EMERALD && (stdhyperbolic || a38)) ||
@ -1261,15 +1261,15 @@ namespace patterns {
if(euclid && among(whichPattern, PAT_COLORING, 0))
dialog::addBoolItem(XLAT("full symmetry"), subpattern_flags & SPF_FULLSYM, '!');
if(a38 && nonchamfered && whichPattern == 0) {
if(a38 && nonbitrunc && whichPattern == 0) {
dialog::addBoolItem(XLAT("extra symmetries"), subpattern_flags & SPF_EXTRASYM, '=');
}
if(a46 && nonchamfered && whichPattern == PAT_COLORING) {
if(a46 && nonbitrunc && whichPattern == PAT_COLORING) {
dialog::addBoolItem(XLAT("extra symmetries"), subpattern_flags & SPF_EXTRASYM, '=');
}
if((a38 || (sphere && S7 == 4) || euclid4 || a46) && !nonchamfered) {
if((a38 || (sphere && S7 == 4) || euclid4 || a46) && !nonbitrunc) {
dialog::addBoolItem(XLAT("alternate coloring"), subpattern_flags & SPF_ALTERNATE, '\'');
dialog::addBoolItem(XLAT("football pattern"), subpattern_flags & SPF_FOOTBALL, '*');
}
@ -1350,7 +1350,7 @@ namespace patterns {
struct changeable_pattern_geometry {
eGeometry geo;
bool nonchamf;
bool nonbitru;
char whichPattern;
int subpattern_flags;
};
@ -1445,7 +1445,7 @@ namespace patterns {
for(int j=0; j<size(cpatterns[cgroup].geometries); j++) {
auto &g = cpatterns[cgroup].geometries[j];
string s = XLAT(ginf[g.geo].name);
s += chamfernames[g.nonchamf];
s += bitruncnames[g.nonbitru];
if(g.subpattern_flags & SPF_ALTERNATE) s += " (alt)";
if(g.subpattern_flags & SPF_DOCKS) s += " (Docks)";
if(cgroup == cpZebra) {
@ -1453,7 +1453,7 @@ namespace patterns {
else if(g.whichPattern == PAT_EMERALD) s += " (Emerald)";
else s += " (Zebra)";
}
dialog::addBoolItem(s, geometry == g.geo && nonchamfered == g.nonchamf && whichPattern == g.whichPattern && subpattern_flags == g.subpattern_flags, 'a'+j);
dialog::addBoolItem(s, geometry == g.geo && nonbitrunc == g.nonbitru && whichPattern == g.whichPattern && subpattern_flags == g.subpattern_flags, 'a'+j);
}
dialog::addBreak(100);
dialog::addItem("more tuning", 'r');
@ -1471,7 +1471,7 @@ namespace patterns {
#endif
auto &g = cpatterns[cgroup].geometries[uni - 'a'];
if(g.geo != geometry) { targetgeometry = g.geo; restartGame('g', false, true); }
if(g.nonchamf != nonchamfered) restartGame('7', false, true);
if(g.nonbitru != nonbitrunc) restartGame('7', false, true);
whichPattern = g.whichPattern;
subpattern_flags = g.subpattern_flags;
#if CAP_TEXTURE
@ -1488,7 +1488,7 @@ namespace patterns {
for(int i=0; i<size(cpatterns); i++)
for(int j=0; j<size(cpatterns[i].geometries); j++) {
auto &g = cpatterns[i].geometries[j];
if(geometry == g.geo && nonchamfered == g.nonchamf && whichPattern == g.whichPattern && subpattern_flags == g.subpattern_flags)
if(geometry == g.geo && nonbitrunc == g.nonbitru && whichPattern == g.whichPattern && subpattern_flags == g.subpattern_flags)
cgroup = cpatterntype(i);
}
old_cgroup = cgroup;
@ -1672,7 +1672,7 @@ namespace linepatterns {
case patBigTriangles: {
if(pseudohept(c) && !euclid) for(int i=0; i<S7; i++)
if(c->master->move[i] < c->master) {
queueline(tC0(V), V*xspinpush0((nonchamfered?M_PI:0) -2*M_PI*i/S7, tessf), col, 2);
queueline(tC0(V), V*xspinpush0((nonbitrunc?M_PI:0) -2*M_PI*i/S7, tessf), col, 2);
}
break;
}
@ -1680,20 +1680,20 @@ namespace linepatterns {
case patBigRings: {
if(pseudohept(c) && !euclid) for(int i=0; i<S7; i++)
if(c->master->move[i] && c->master->move[i] < c->master && c->master->move[i]->dm4 == c->master->dm4)
queueline(tC0(V), V*xspinpush0((nonchamfered?M_PI:0) -2*M_PI*i/S7, tessf), col, 2);
queueline(tC0(V), V*xspinpush0((nonbitrunc?M_PI:0) -2*M_PI*i/S7, tessf), col, 2);
break;
}
case patTree:
if(ctof(c) && !euclid)
queueline(tC0(V), V*ddi0(nonchamfered?S42:0, tessf), col, 2);
queueline(tC0(V), V*ddi0(nonbitrunc?S42:0, tessf), col, 2);
break;
case patAltTree:
if(ctof(c) && !euclid && c->master->alt) {
for(int i=0; i<S7; i++)
if(c->master->move[i] && c->master->move[i]->alt == c->master->alt->move[0])
queueline(tC0(V), V*xspinpush0((nonchamfered?M_PI:0) -2*M_PI*i/S7, tessf), col, 2);
queueline(tC0(V), V*xspinpush0((nonbitrunc?M_PI:0) -2*M_PI*i/S7, tessf), col, 2);
}
break;

View File

@ -1098,12 +1098,12 @@ hyperpoint hpxd(ld d, ld x, ld y, ld z) {
double scalef;
hyperpoint hpxyzsc(double x, double y, double z) {
if(nonchamfered) return hpxd(scalef, x, y, z);
if(nonbitrunc) return hpxd(scalef, x, y, z);
else return hpxyz(x,y,z);
}
hyperpoint turtlevertex(int u, double x, double y, double z) {
ld scale = nonchamfered ? scalef : 1;
ld scale = nonbitrunc ? scalef : 1;
if(u) scale /= 2;
return hpxd(scale, x, y, z);
}
@ -1148,7 +1148,7 @@ void bshape(hpcshape& sh, int p, double shzoom, int shapeid, double bonus = 0) {
while(polydata[whereis + 2*qty] != NEWSHAPE) qty++;
double shzoomx = shzoom;
double shzoomy = shzoom;
if(shzoom == WOLF) shzoomx = 1.5 * (nonchamfered ? crossf / hcrossf : 1), shzoomy = 1.6 * (nonchamfered ? crossf / hcrossf : 1);
if(shzoom == WOLF) shzoomx = 1.5 * (nonbitrunc ? crossf / hcrossf : 1), shzoomy = 1.6 * (nonbitrunc ? crossf / hcrossf : 1);
int rots2 = rots;
// shapes 368..370 are specially designed
if(!(shapeid >= 368 && shapeid <= 370)) {
@ -1267,21 +1267,21 @@ void buildpolys() {
}
// scales
scalef = nonchamfered ? crossf / hcrossf7 : hcrossf / hcrossf7;
scalef = nonbitrunc ? crossf / hcrossf7 : hcrossf / hcrossf7;
if(euclid) scalef *= .52/crossf;
double scalef2 = nonchamfered ? crossf / hcrossf7 * .88 : euclid ? scalef : hcrossf / hcrossf7;
double scalef2 = nonbitrunc ? crossf / hcrossf7 * .88 : euclid ? scalef : hcrossf / hcrossf7;
double spzoom = sphere ? 1.4375 : 1;
double spzoom6 = sphere ? 1.2375 : 1;
double spzoom7 = sphere ? .8 : 1;
double spzoomd7 = (nonchamfered && sphere) ? 1 : spzoom7;
double spzoomd7 = (nonbitrunc && sphere) ? 1 : spzoom7;
double fac80 = a45 ? 1.4 : a46 ? 1.2 : (a38) ? .7 : .8;
double fac94 = euclid ? .8 : a4 ? (nonchamfered ? 1.1 : .9) : .94;
double fac94 = euclid ? .8 : a4 ? (nonbitrunc ? 1.1 : .9) : .94;
if(euclid) fac80 = fac94 = .9;
@ -1296,11 +1296,11 @@ void buildpolys() {
#define SHADMUL (S3==4 ? 1.05 : 1.3)
// procedural floors
double shexf = nonchamfered ? crossf* .55 : hexf;
double shexf = nonbitrunc ? crossf* .55 : hexf;
double p = -.006;
int td = ((nonchamfered || euclid) && !(S7&1)) ? S42+S6 : 0;
int td = ((nonbitrunc || euclid) && !(S7&1)) ? S42+S6 : 0;
double trihepta0 = scalef*spzoom6*(.2776+p) * gsca(a4, 1.3, a46, .975, a47, .85, a38, .9) * bscale6;
double trihepta1 = (sphere ? .54 : scalef*spzoom6*(.5273-2*p)) * gsca(a4, .8, a46, 1.075, sphere4, 1.3) * bscale7;
@ -1353,16 +1353,16 @@ void buildpolys() {
bool strict = false;
if(a4 && nonchamfered) fac94 *= 1.1;
if(a4 && nonbitrunc) fac94 *= 1.1;
if(a46 && nonchamfered) fac94 *= .9;
if(a46 && nonbitrunc) fac94 *= .9;
double floorrad0 = shexf*fac80*spzoom;
double floorrad1 = strict ? hcrossf : euclid ? shexf*fac80*spzoom : shexf*fac94;
if(euclid4) {
if(nonchamfered)
if(nonbitrunc)
floorrad0 = floorrad1 = rhexf * .94;
else
floorrad0 = hexvdist * .9,
@ -1513,7 +1513,7 @@ void buildpolys() {
hpcpush(ddi(0, -shexf*2.4) * C0);
bshape(shMirror, PPR_WALL);
if(nonchamfered) {
if(nonbitrunc) {
for(int t=0; t<=S7; t++) hpcpush(ddi(t*12, shexf*MF(fac80,7)) * C0);
}
else {
@ -1577,9 +1577,9 @@ void buildpolys() {
}
double disksize = crossf;
if(nonchamfered && a38) disksize *= 2;
if(nonbitrunc && a38) disksize *= 2;
else if(a38) disksize *= 1.5;
else if(nonchamfered && S6 == 8) disksize *= 1.5;
else if(nonbitrunc && S6 == 8) disksize *= 1.5;
bshape(shDisk, PPR_ITEM);
for(int i=0; i<=S84; i+=S3)
@ -1793,9 +1793,9 @@ void buildpolys() {
if(a38) spzoom6 *= .9;
if(a4 && !nonchamfered) spzoom6 *= 1.9, spzoom7 *= .9, spzoomd7 *= .9;
if(a46 && !nonchamfered) spzoom6 *= .9;
if(a47 && !nonchamfered) spzoom6 *= .85;
if(a4 && !nonbitrunc) spzoom6 *= 1.9, spzoom7 *= .9, spzoomd7 *= .9;
if(a46 && !nonbitrunc) spzoom6 *= .9;
if(a47 && !nonbitrunc) spzoom6 *= .85;
double espzoom6 = spzoom6, espzoomd7 = spzoomd7;
@ -1823,18 +1823,18 @@ void buildpolys() {
bshape(shCrossFloor[0], PPR_FLOOR, scalef*espzoom6*gsca(sphere,.9)*ffscale2, 5, ffspin2);
bshape(shCrossFloor[1], PPR_FLOOR, scalef*espzoomd7*gsca(sphere,.9)*ffscale2 * gsca(a47,1.3), 6, octroll);
double ntscale = gsca(nonchamfered, gsca(a38, 1.4, a47, 2, a46, 1.525));
double ntrot = grot(a46&&nonchamfered, .25, a38&&nonchamfered, -.2);
double ntscale = gsca(nonbitrunc, gsca(a38, 1.4, a47, 2, a46, 1.525));
double ntrot = grot(a46&&nonbitrunc, .25, a38&&nonbitrunc, -.2);
bshape(shChargedFloor[0], PPR_FLOOR, scalef*espzoom6*gsca(sphere,.9)*ffscale2, 7, ffspin2);
bshape(shChargedFloor[1], PPR_FLOOR, scalef*spzoomd7, 9);
bshape(shChargedFloor[2], PPR_FLOOR, scalef*espzoom6, 7);
bshape(shChargedFloor[3], 12, spzoomd7 * gsca(a4 && euclid, .4, a4,1.2,sphere&&nonchamfered,.9)* ntscale, 10, ntrot + grot(euclid4 && nonchamfered, M_PI/4 + .1)); // nonchamfered variant
bshape(shChargedFloor[3], 12, spzoomd7 * gsca(a4 && euclid, .4, a4,1.2,sphere&&nonbitrunc,.9)* ntscale, 10, ntrot + grot(euclid4 && nonbitrunc, M_PI/4 + .1)); // nonbitrunc variant
bshape(shSStarFloor[0], PPR_FLOOR, scalef*spzoom6*gsca(sphere,.8)*ffscale2, 11, grot(a4,.775));
bshape(shSStarFloor[1], PPR_FLOOR, scalef*spzoomd7*gsca(a4,.85), 12, octroll);
bshape(shOverFloor[0], PPR_FLOOR, scalef*spzoom * gsca(a47,1.3, a45,1.3, a46,1.1), 13, grot(a47,-.75, a45,-.7, a46,.9));
if(nonchamfered) {
if(nonbitrunc) {
if(a4) bshape(shOverFloor[1], PPR_FLOOR, 1, 368 + S7 - 5, 0);
else bshape(shOverFloor[1], PPR_FLOOR, gsca(a38,1.3, sphere, .83), 14, octroll + grot(a38,.4));
}
@ -1843,12 +1843,12 @@ void buildpolys() {
bshape(shTriFloor[0], PPR_FLOOR, scalef*espzoom6*gsca(sphere,.9, a4,.9)*ffscale2, 17, ffspin2 + grot(a47,.1));
bshape(shTriFloor[1], PPR_FLOOR, scalef*espzoomd7*ffscale2*gsca(a4,1.2, a47,1.5), 18, octroll + grot(a4,.25, a47,-.1, sphere4,.7) + grot(euclid&&a4, M_PI/8));
bshape(shFeatherFloor[0], PPR_FLOOR, scalef*spzoom6*ffscale2, 19, ffspin2);
if(nonchamfered) bshape(shFeatherFloor[1], PPR_FLOOR, sphere ? .83 : gsca(ap4,1.1) * ntscale, 20, ntrot);
if(nonbitrunc) bshape(shFeatherFloor[1], PPR_FLOOR, sphere ? .83 : gsca(ap4,1.1) * ntscale, 20, ntrot);
else bshape(shFeatherFloor[1], PPR_FLOOR, scalef*spzoom7*gsca(sphere,1.1,a4,1.1)*ffscale2*ntscale, 21, sphere?1.3:ntrot);
bshape(shFeatherFloor[2], PPR_FLOOR, scalef*1.1, 22); // Euclidean variant
bshape(shBarrowFloor[0], PPR_FLOOR, gsca(euclid,.9) * spzoom6 * gsca(a467,1.7, a46,.8, a38,1.4) * gsca(euclid&&a4, .7), 23);
bshape(shBarrowFloor[1], PPR_FLOOR, spzoomd7 * gsca(a4,1.15, a467,1.9, a46,.8, a38,1.5, sphere&&nonchamfered,.9) * gsca(euclid&&a4, .5), 24, octroll - grot(a47,.1));
bshape(shBarrowFloor[2], PPR_FLOOR, ntscale*gsca(sphere||euclid,.9) * gsca(euclid&&a4&&nonchamfered, .5), 25, ntrot + grot(euclid&&a4&&nonchamfered, M_PI/4));
bshape(shBarrowFloor[1], PPR_FLOOR, spzoomd7 * gsca(a4,1.15, a467,1.9, a46,.8, a38,1.5, sphere&&nonbitrunc,.9) * gsca(euclid&&a4, .5), 24, octroll - grot(a47,.1));
bshape(shBarrowFloor[2], PPR_FLOOR, ntscale*gsca(sphere||euclid,.9) * gsca(euclid&&a4&&nonbitrunc, .5), 25, ntrot + grot(euclid&&a4&&nonbitrunc, M_PI/4));
bshape(shNewFloor[0], PPR_FLOOR, scalef*espzoom6 * ffscale2, 26, ffspin2);
bshape(shNewFloor[1], PPR_FLOOR, scalef*espzoomd7 * ffscale2, 27, octroll);
@ -1930,7 +1930,7 @@ void buildpolys() {
zoomShape(shDesertFloor[j], shRedRockFloor[i-1][j], 1 - .1 * i, PPR_FLOORa+i);
bshape(shPowerFloor[0], PPR_FLOOR_DRAGON, scalef*espzoom6*gsca(sphere,.8)*ffscale2, 57, ffspin2);
bshape(shPowerFloor[1], PPR_FLOOR_DRAGON, scalef*espzoomd7*ffscale2, 58, octroll);
bshape(shRoseFloor[2], PPR_FLOOR, 1, 173); // nonchamfered
bshape(shRoseFloor[2], PPR_FLOOR, 1, 173); // nonbitrunc
bshape(shRoseFloor[0], PPR_FLOOR, gsca(euclid,.9), 174);
bshape(shRoseFloor[1], PPR_FLOOR, gsca(euclid,.9) * scalef * gsca(ap4,.85), 175, grot(ap4, M_PI/8));
@ -1942,7 +1942,7 @@ void buildpolys() {
bshape(shTurtleFloor[0], PPR_FLOOR, gsca(euclid,.9, sphere, .9*1.3, a4, 1.6, a38, 1.3, a467, 1.4) * gsca(euclid&&a4, .9), 176);
bshape(shTurtleFloor[1], PPR_FLOOR, scalef * gsca(euclid,.9, a4, .9, a47,1.3) * gsca(euclid&&a4, .8), 177, octroll - grot(a47,.1));
bshape(shTurtleFloor[2], PPR_FLOOR, ntscale * gsca(sphere && nonchamfered, .9) * gsca(euclid&&a4&&nonchamfered, .5), 178, ntrot + grot(euclid&&a4&&nonchamfered, M_PI/4)); // nonchamfered
bshape(shTurtleFloor[2], PPR_FLOOR, ntscale * gsca(sphere && nonbitrunc, .9) * gsca(euclid&&a4&&nonbitrunc, .5), 178, ntrot + grot(euclid&&a4&&nonbitrunc, M_PI/4)); // nonbitrunc
bshape(shDragonFloor[0], PPR_FLOOR_DRAGON, gsca(a4,1.6, a38, 1.3) * gsca(euclid&&a4, .5), 181, ffspin2);
bshape(shDragonFloor[1], PPR_FLOOR_DRAGON, gsca(sphere, .9, a38, 1.1, a4,.9) * scalef, 182, octroll);
@ -1951,7 +1951,7 @@ void buildpolys() {
bshape(shZebra[1], PPR_FLOOR, scalef, 163);
bshape(shZebra[2], PPR_FLOOR, scalef, 164);
bshape(shZebra[3], PPR_FLOOR, scalef, 165);
bshape(shZebra[4], PPR_FLOOR, 1, 166); // for nonchamfered
bshape(shZebra[4], PPR_FLOOR, 1, 166); // for nonbitrunc
bshape(shEmeraldFloor[0], PPR_FLOOR, scalef, 167); // 4
bshape(shEmeraldFloor[1], PPR_FLOOR, scalef, 168); // 12
bshape(shEmeraldFloor[2], PPR_FLOOR, scalef, 169); // 16
@ -1965,9 +1965,9 @@ void buildpolys() {
bshape(shTower[4], PPR_FLOOR_TOWER, scalef, 200); // 9
bshape(shTower[5], PPR_FLOOR_TOWER, scalef, 201); // 10
bshape(shTower[6], PPR_FLOOR_TOWER, scalef, 202); // 10
bshape(shTower[7], PPR_FLOOR_TOWER, 1, 203); // nonchamfered 7
bshape(shTower[8], PPR_FLOOR_TOWER, 1, 204); // nonchamfered 11
bshape(shTower[9], PPR_FLOOR_TOWER, 1, 205); // nonchamfered 15
bshape(shTower[7], PPR_FLOOR_TOWER, 1, 203); // nonbitrunc 7
bshape(shTower[8], PPR_FLOOR_TOWER, 1, 204); // nonbitrunc 11
bshape(shTower[9], PPR_FLOOR_TOWER, 1, 205); // nonbitrunc 15
bshape(shTower[10], PPR_FLOOR_TOWER, scalef, 206); // Euclidean
// structures & walls
@ -2000,17 +2000,17 @@ void buildpolys() {
copyshape(shJoint, shDisk, PPR_ONTENTACLE);
bshape(shTentHead, PPR_ONTENTACLE, scalef, 79);
bshape(shWormHead, PPR_ONTENTACLE, scalef, 80);
if(nonchamfered) bshape(shDragonSegment, PPR_TENTACLE1, 1, 233);
if(nonbitrunc) bshape(shDragonSegment, PPR_TENTACLE1, 1, 233);
else bshape(shDragonSegment, PPR_TENTACLE1, scalef, 234);
bshape(shDragonWings, PPR_ONTENTACLE, scalef, 237);
bshape(shDragonLegs, PPR_TENTACLE0, scalef, 238);
if(nonchamfered) bshape(shDragonTail, PPR_TENTACLE1, 1, 239);
if(nonbitrunc) bshape(shDragonTail, PPR_TENTACLE1, 1, 239);
else bshape(shDragonTail, PPR_TENTACLE1, scalef, 240);
bshape(shDragonNostril, PPR_ONTENTACLE_EYES, scalef, 241);
bshape(shDragonHead, PPR_ONTENTACLE, scalef, 242);
if(nonchamfered) bshape(shSeaTentacle, PPR_TENTACLE1, 1, 245);
if(nonbitrunc) bshape(shSeaTentacle, PPR_TENTACLE1, 1, 245);
else bshape(shSeaTentacle, PPR_TENTACLE1, 1, 246);
ld ksc = nonchamfered ? 1.8 : 1.5;
ld ksc = nonbitrunc ? 1.8 : 1.5;
bshape(shKrakenHead, PPR_ONTENTACLE, ksc, 247);
bshape(shKrakenEye, PPR_ONTENTACLE_EYES, ksc, 248);
bshape(shKrakenEye2, PPR_ONTENTACLE_EYES2, ksc, 249);
@ -2241,10 +2241,10 @@ void buildpolys() {
for(int v=0; v<13; v++) for(int z=0; z<2; z++)
copyshape(shTortoise[v][4+z], shTortoise[v][2+z], shTortoise[v][2+z].prio + (PPR_CARRIED-PPR_ITEM));
if(nonchamfered) bshape(shMagicSword, PPR_MAGICSWORD, 1, 243);
if(nonbitrunc) bshape(shMagicSword, PPR_MAGICSWORD, 1, 243);
else bshape(shMagicSword, PPR_MAGICSWORD, 1, 244);
if(nonchamfered) bshape(shMagicShovel, PPR_MAGICSWORD, 1, 333);
if(nonbitrunc) bshape(shMagicShovel, PPR_MAGICSWORD, 1, 333);
else bshape(shMagicShovel, PPR_MAGICSWORD, 1, 333);
bshape(shBead0, 20, 1, 250);
@ -2378,7 +2378,7 @@ bool isSpecial(const hpcshape &h) {
const hpcshape& getSeabed(const hpcshape& c) {
if(&c == &shCloudFloor[2]) return shCloudSeabed[2];
if(&c == &shCaveFloor[2]) return shCaveSeabed[2];
if(nonchamfered || euclid || sphere) return c;
if(nonbitrunc || euclid || sphere) return c;
if(&c == &shFloor[0]) return shFullFloor[0];
if(&c == &shFloor[1]) return shFullFloor[1];
if(&c == &shCaveFloor[0]) return shCaveSeabed[0];
@ -3430,7 +3430,7 @@ NEWSHAPE, 366, 1, 2, 0.120242,0.202432, 0.476077,0.202192,
NEWSHAPE, 367, 1, 2, -0.096569,0.019944, 0.040859,0.019906, 0.037742,0.058710, 0.116624,-0.000000,
// overgrown for 4-5 to 4-7 non-chamfered
// overgrown for 4-5 to 4-7 non-bitrunc
NEWSHAPE, 368, 5, 1, -0.722750,-0.522024, -0.310675,-0.189104, -0.809015,-0.052887, -0.464722,0.060902, -1.057795,0.207750,
NEWSHAPE, 369, 6, 1, 1.125689,-0.648796, 0.574166,-0.456509, 0.822679,-1.131184, 0.174168,-0.605003, 0.411340,-1.336854,
NEWSHAPE, 370, 7, 1, 1.034599,-1.366924, 0.528060,-0.892063, 0.490794,-1.701844, 0.081991,-0.819912, 0.042928,-1.637383,
@ -3457,20 +3457,20 @@ NEWSHAPE
/* floors */
// need eswap
#define DESERTFLOOR (nonchamfered ? shCloudFloor : shDesertFloor)[ct6]
#define BUTTERFLYFLOOR (nonchamfered ? shFloor : shButterflyFloor)[ct6]
#define PALACEFLOOR (nonchamfered?shFloor:shPalaceFloor)[ct6]
#define SSTARFLOOR (nonchamfered ? shCloudFloor : shSStarFloor)[ct6]
#define POWERFLOOR (nonchamfered ? shStarFloor : shPowerFloor)[ct6]
#define CHARGEDFLOOR (nonchamfered ? shChargedFloor[3] : ct6 ? shFloor[1] : shChargedFloor[0])
#define DESERTFLOOR (nonbitrunc ? shCloudFloor : shDesertFloor)[ct6]
#define BUTTERFLYFLOOR (nonbitrunc ? shFloor : shButterflyFloor)[ct6]
#define PALACEFLOOR (nonbitrunc?shFloor:shPalaceFloor)[ct6]
#define SSTARFLOOR (nonbitrunc ? shCloudFloor : shSStarFloor)[ct6]
#define POWERFLOOR (nonbitrunc ? shStarFloor : shPowerFloor)[ct6]
#define CHARGEDFLOOR (nonbitrunc ? shChargedFloor[3] : ct6 ? shFloor[1] : shChargedFloor[0])
#define DEMONFLOOR shDemonFloor[ct6]
#define NEWFLOOR (nonchamfered ? shCloudFloor : shNewFloor)[ct6]
#define CROSSFLOOR (nonchamfered ? shFloor : shCrossFloor)[ct6]
#define NEWFLOOR (nonbitrunc ? shCloudFloor : shNewFloor)[ct6]
#define CROSSFLOOR (nonbitrunc ? shFloor : shCrossFloor)[ct6]
#define TROLLFLOOR shTrollFloor[ct6]
#define BARROWFLOOR shBarrowFloor[(euclid&&!a4)?0:nonchamfered?2:ct6]
#define LAVAFLOOR (nonchamfered ? shFloor : shLavaFloor)[ct6]
#define TRIFLOOR ((nonchamfered ? shFloor : shTriFloor)[ct6])
#define TURTLEFLOOR shTurtleFloor[nonchamfered ? 2 : ct6]
#define BARROWFLOOR shBarrowFloor[(euclid&&!a4)?0:nonbitrunc?2:ct6]
#define LAVAFLOOR (nonbitrunc ? shFloor : shLavaFloor)[ct6]
#define TRIFLOOR ((nonbitrunc ? shFloor : shTriFloor)[ct6])
#define TURTLEFLOOR shTurtleFloor[nonbitrunc ? 2 : ct6]
#define ROSEFLOOR shRoseFloor[ct6]
#define ECT ((euclid&&!a4)?2:ct6)
@ -3479,14 +3479,14 @@ NEWSHAPE
#define PLAINFLOOR shFloor[ct6]
#define FULLFLOOR shFullFloor[ct6]
#define CAVEFLOOR shCaveFloor[ECT]
#define OVERFLOOR shOverFloor[euclid&&a4&&nonchamfered?2:ECT]
#define OVERFLOOR shOverFloor[euclid&&a4&&nonbitrunc?2:ECT]
#define CLOUDFLOOR shCloudFloor[ECT]
#define FEATHERFLOOR shFeatherFloor[euclid&&a4&&nonchamfered?2:ECT]
#define FEATHERFLOOR shFeatherFloor[euclid&&a4&&nonbitrunc?2:ECT]
#define MFLOOR1 shMFloor[ct6]
#define MFLOOR2 shMFloor2[ct6]
#define STARFLOOR shStarFloor[ECT]
#define DRAGONFLOOR shDragonFloor[ECT]
#define SWITCHFLOOR shSwitchFloor[nonchamfered?2:ct6]
#define SWITCHFLOOR shSwitchFloor[nonbitrunc?2:ct6]
// fix Warp
// fix Kraken

View File

@ -520,7 +520,7 @@ namespace sag {
}
void initSnake(int n) {
if(sphere && nonchamfered) n = 12;
if(sphere && nonbitrunc) n = 12;
else if(sphere) n = 32;
numsnake = n;
snakecells.resize(numsnake);
@ -1127,7 +1127,7 @@ void drawVertex(const transmatrix &V, cell *c, shmup::monster *m) {
}
hyperpoint h = tC0(V * m->at);
transmatrix V2 = rgpushxto0(h) * ypush(nonchamfered ? .3 : .2);
transmatrix V2 = rgpushxto0(h) * ypush(nonbitrunc ? .3 : .2);
if(doshow) queuestr(V2, (svg::in ? .28 : .2) * crossf / hcrossf, vd.name, backcolor ? 0x000000 : 0xFFFF00, svg::in ? 0 : 1);
lastptd().info = vd.info;
}
@ -1768,7 +1768,7 @@ using namespace tour;
string cname() {
if(euclid) return "coord-6.txt";
if(nonchamfered) return "coord-7.txt";
if(nonbitrunc) return "coord-7.txt";
return "coord-67.txt";
}

View File

@ -43,7 +43,7 @@ int modediff(score *S) {
if(S->box[238]) g = gSphere;
if(S->box[239]) g = gElliptic;
if(max(S->box[197], 1) != multi::players) diff += 8;
if(S->box[186] != nonchamfered) diff += 16;
if(S->box[186] != nonbitrunc) diff += 16;
if(S->box[196] != chaosmode) diff += 32;
if(S->box[119] != shmup::on) diff += 64;
if(pureHardcore() && !isHardcore(S)) diff += 128;

View File

@ -3344,7 +3344,7 @@ transmatrix calc_relative_matrix_help(cell *c, heptagon *h1) {
transmatrix gm = Id;
heptagon *h2 = c->master;
transmatrix where = Id;
if(!nonchamfered) for(int d=0; d<S7; d++) if(h2->c7->mov[d] == c)
if(!nonbitrunc) for(int d=0; d<S7; d++) if(h2->c7->mov[d] == c)
where = hexmove[d];
// always add to last!
while(h1 != h2) {
@ -3413,8 +3413,8 @@ void virtualRebase(cell*& base, transmatrix& at, bool tohex) {
hs.h = h;
hs.spin = d;
heptspin hs2 = hsstep(hs, 0);
transmatrix V2 = spin((nonchamfered?M_PI:0)-hs2.spin*2*M_PI/S7) * invheptmove[d];
if(nonchamfered) V2 = V2 * spin(M_PI);
transmatrix V2 = spin((nonbitrunc?M_PI:0)-hs2.spin*2*M_PI/S7) * invheptmove[d];
if(nonbitrunc) V2 = V2 * spin(M_PI);
double newz = (V2 * at * C0) [2];
if(newz < currz) {
currz = newz;
@ -3424,7 +3424,7 @@ void virtualRebase(cell*& base, transmatrix& at, bool tohex) {
}
if(!newbase) {
if(tohex && !nonchamfered) for(int d=0; d<S7; d++) {
if(tohex && !nonbitrunc) for(int d=0; d<S7; d++) {
cell *c = createMov(base, d);
transmatrix V2 = spin(-base->spn(d)*2*M_PI/S6) * invhexmove[d];
double newz = (V2 *at * C0) [2];

View File

@ -114,7 +114,7 @@ void initgame() {
if(firstland == laElementalWall) cwt.c->land = randomElementalLand();
if(tactic::on && (isGravityLand(firstland) || firstland == laOcean) && firstland != laMountain)
cwt.c->land = nonchamfered ? laCrossroads : laCrossroads2;
cwt.c->land = nonbitrunc ? laCrossroads : laCrossroads2;
createMov(cwt.c, 0);
setdist(cwt.c, BARLEV, NULL);
@ -547,7 +547,7 @@ void applyBoxes() {
applyBoxBool(survivalist);
if(loadingHi) applyBoxI(itLotus);
else applyBoxNum(truelotus, "lotus/escape");
applyBoxBool(nonchamfered, "heptagons only");
applyBoxBool(nonbitrunc, "heptagons only");
applyBoxI(itRose);
applyBoxOrb(itOrbBeauty);
applyBoxI(itCoral);
@ -686,7 +686,7 @@ void loadBoxHigh() {
dynamicval<eGeometry> sp2(geometry, (eGeometry) savebox[116]);
dynamicval<bool> sp3(shmup::on, savebox[119]);
dynamicval<bool> sp4(chaosmode, savebox[196]);
dynamicval<bool> sp5(nonchamfered, savebox[186]);
dynamicval<bool> sp5(nonbitrunc, savebox[186]);
if(savebox[238]) geometry = gSphere;
if(savebox[239]) geometry = gElliptic;
@ -823,7 +823,7 @@ void saveStats(bool emergency = false) {
fprintf(f, "Total enemies killed: %d\n", tkills());
fprintf(f, "cells generated: %d\n", cellcount);
if(pureHardcore()) fprintf(f, "Pure hardcore mode\n");
if(nonchamfered) fprintf(f, "Heptagons only mode\n");
if(nonbitrunc) fprintf(f, "Heptagons only mode\n");
if(chaosmode) fprintf(f, "Chaos mode\n");
if(shmup::on) fprintf(f, "Shoot-em up mode\n");
if(inv::on) fprintf(f, "Inventory mode\n");
@ -1021,7 +1021,7 @@ namespace gamestack {
gdn.View = View;
gdn.geometry = geometry;
gdn.shmup = shmup::on;
gdn.hepta = nonchamfered;
gdn.hepta = nonbitrunc;
gd.push_back(gdn);
}
@ -1032,7 +1032,7 @@ namespace gamestack {
viewctr = gdn.viewctr;
View = gdn.View;
geometry = gdn.geometry;
nonchamfered = gdn.hepta;
nonbitrunc = gdn.hepta;
if(shmup::on) shmup::clearMonsters();
shmup::on = gdn.shmup;
resetGeometry();
@ -1113,7 +1113,7 @@ void restartGame(char switchWhat, bool push, bool keep_screens) {
if(switchWhat == 'T') {
geometry = gNormal;
yendor::on = tactic::on = princess::challenge = peace::on = inv::on = false;
chaosmode = nonchamfered = randomPatternsMode = false;
chaosmode = nonbitrunc = randomPatternsMode = false;
shmup::on = false;
resetGeometry();
tour::on = !tour::on;
@ -1121,7 +1121,7 @@ void restartGame(char switchWhat, bool push, bool keep_screens) {
#endif
if(switchWhat == '7') {
if(euclid6) geometry = gNormal;
nonchamfered = !nonchamfered;
nonbitrunc = !nonbitrunc;
resetGeometry();
#if CAP_TEXTURE
if(texture::tstate == texture::tsActive)
@ -1134,7 +1134,7 @@ void restartGame(char switchWhat, bool push, bool keep_screens) {
if(geometry == targetgeometry) geometry = gNormal;
else geometry = targetgeometry;
if(chaosmode && (euclid || sphere || quotient)) chaosmode = false;
if(nonchamfered && euclid6) nonchamfered = false;
if(nonbitrunc && euclid6) nonbitrunc = false;
resetGeometry();
#if CAP_TEXTURE

View File

@ -373,7 +373,7 @@ bool apply(cell *c, const transmatrix &V, int col) {
typedef tuple<eGeometry, bool, char, int, eModel, ld, ld> texture_parameters;
static const auto current_texture_parameters = tie(geometry, nonchamfered, patterns::whichPattern, patterns::subpattern_flags, pmodel, vid.scale, vid.alpha);
static const auto current_texture_parameters = tie(geometry, nonbitrunc, patterns::whichPattern, patterns::subpattern_flags, pmodel, vid.scale, vid.alpha);
texture_parameters orig_texture_parameters;
@ -661,7 +661,7 @@ patterns::patterninfo si_save;
saverlist texturesavers;
bool target_nonchamf;
bool target_nonbitru;
void init_textureconfig() {
texturesavers = move(savers);
@ -679,7 +679,7 @@ void init_textureconfig() {
addsaver(vid.yposition, "Y position", 0);
addsaver(vid.xposition, "X position", 0);
addsaver(vid.camera_angle, "camera angle", 0);
addsaverenum(target_nonchamf, "chamfering", false);
addsaverenum(target_nonbitru, "bitruncated", false);
// ... geometry parameters
addsaver(patterns::whichPattern, "pattern", 0);
@ -713,7 +713,7 @@ bool save_textureconfig() {
if(!f) return false;
targetgeometry = geometry;
target_nonchamf = nonchamfered;
target_nonbitru = nonbitrunc;
for(auto s: texturesavers) if(s->dosave())
fprintf(f, "%s=%s\n", s->name.c_str(), s->save().c_str());
@ -742,7 +742,7 @@ bool load_textureconfig() {
return load_textureconfig();
}
if(nonchamfered != target_nonchamf) {
if(nonbitrunc != target_nonbitru) {
restartGame('7');
}
}

View File

@ -79,7 +79,7 @@ bool handleKeyTour(int sym, int uni) {
int flags = slides[currentslide].flags;
if((sym == SDLK_RETURN || sym == SDLK_KP_ENTER) && (!inhelp || (flags & QUICKSKIP))) {
popScreenAll();
if(geometry || nonchamfered) {
if(geometry || nonbitrunc) {
popGame();
if(!(flags & QUICKGEO)) return true;
}
@ -91,7 +91,7 @@ bool handleKeyTour(int sym, int uni) {
return true;
}
if(sym == SDLK_BACKSPACE) {
if(geometry || nonchamfered) {
if(geometry || nonbitrunc) {
popGame();
if(!(flags & QUICKGEO)) return true;
}
@ -139,7 +139,7 @@ bool handleKeyTour(int sym, int uni) {
}
}
if(geometry || nonchamfered) {
if(geometry || nonbitrunc) {
popGame();
presentation(pmGeometryReset);
return true;
@ -253,7 +253,7 @@ namespace ss {
dialog::display();
keyhandler = [] (int sym, int uni) {
if(uni >= 'a' && uni < 'a' + sssize) {
if(geometry || nonchamfered) {
if(geometry || nonbitrunc) {
popGame();
presentation(pmGeometryReset);
}

View File

@ -817,12 +817,12 @@ int modecode() {
else if(pureHardcore()) xcode ++;
if(euclid) xcode += 6;
else if(nonchamfered) xcode += 3;
else if(nonbitrunc) xcode += 3;
if(sphere) {
xcode += 9;
if(elliptic) xcode += 6;
if(nonchamfered) xcode += 3;
if(nonbitrunc) xcode += 3;
}
if(chaosmode) xcode += 21;
@ -860,7 +860,7 @@ void buildmodetable() {
extern bool hardcore;
hardcore = (b%3 == 1);
shmup::on = (b%3 == 2);
nonchamfered = (b/3)%7 == 1 || (b/3)%7 == 4 || (b/3)%7 == 6;
nonbitrunc = (b/3)%7 == 1 || (b/3)%7 == 4 || (b/3)%7 == 6;
geometry = gNormal;
if((b/3)%7 == 2) geometry = gEuclid;
if((b/3)%7 >= 3) geometry = gSphere;
@ -879,7 +879,7 @@ void buildmodetable() {
if(hardcore) printf(" hardcore");
else if(shmup::on) printf(" shmup");
else printf(" softcore");
if(nonchamfered) printf(" heptagonal");
if(nonbitrunc) printf(" heptagonal");
if(euclid) printf(" euclidean");
else if(elliptic) printf(" elliptic");
else if(sphere) printf(" spherical");