From ae5938e1a40d369b7fa9d0426fcca14539f7d488 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 30 Oct 2017 12:24:41 +0100 Subject: [PATCH] renamed the variable 'purehepta' to 'nontruncated' --- achievement.cpp | 16 ++++----- barriers.cpp | 86 ++++++++++++++++++++++---------------------- bigstuff.cpp | 14 ++++---- blizzard.cpp | 4 +-- cell.cpp | 20 +++++------ complex.cpp | 24 ++++++------- config.cpp | 8 ++--- fieldpattern.cpp | 10 +++--- game.cpp | 14 ++++---- geometry.cpp | 6 ++-- graph.cpp | 58 +++++++++++++++--------------- help.cpp | 2 +- heptagon.cpp | 4 +-- hud.cpp | 8 ++--- hyper.cpp | 2 +- hyperpoint.cpp | 2 +- hypgraph.cpp | 4 +-- kohonen.cpp | 2 +- landgen.cpp | 48 ++++++++++++------------- mapeditor.cpp | 10 +++--- menus.cpp | 10 +++--- orbgen.cpp | 2 +- polygons.cpp | 92 ++++++++++++++++++++++++------------------------ rogueviz.cpp | 6 ++-- scores.cpp | 2 +- shmup.cpp | 10 +++--- system.cpp | 18 +++++----- tour.cpp | 8 ++--- yendor.cpp | 8 ++--- 29 files changed, 249 insertions(+), 249 deletions(-) diff --git a/achievement.cpp b/achievement.cpp index 6ffcab7a..b70a14df 100644 --- a/achievement.cpp +++ b/achievement.cpp @@ -82,7 +82,7 @@ vector achievementsReceived; bool wrongMode(char flags) { if(cheater) return true; if(flags == 'x') return false; - if(purehepta != (flags == '7')) return true; + if(nontruncated != (flags == '7')) return true; if(euclid != (flags == 'e')) return true; if(flags == 'E' && S7 < 5) return false; if(sphere != (flags == 'E')) return true; @@ -482,7 +482,7 @@ void achievement_score(int cat, int number) { if(sphere && cat != LB_HALLOWEEN) return; if(quotient) return; if(elliptic && cat != LB_HALLOWEEN) return; - if(purehepta) return; + if(nontruncated) 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; @@ -567,7 +567,7 @@ void achievement_final(bool really_final) { } if(sphere && specialland == laHalloween) { - if(shmup::on || chaosmode || purehepta || numplayers() > 1 || tactic::on || randomPatternsMode) + if(shmup::on || chaosmode || nontruncated || numplayers() > 1 || tactic::on || randomPatternsMode) return; achievement_score(LB_HALLOWEEN, items[itTreat]); } @@ -581,21 +581,21 @@ void achievement_final(bool really_final) { int specials = 0; if(shmup::on) specials++; if(chaosmode) specials++; - if(purehepta) specials++; + if(nontruncated) specials++; if(inv::on) specials++; if(specials > 1) return; if(numplayers() > 1 && chaosmode) return; - if(numplayers() > 1 && purehepta) return; + if(numplayers() > 1 && nontruncated) return; if(numplayers() > 1 && inv::on) return; int total_improved = 0; specific_improved = 0; specific_what = 0; - if(!shmup::on && !chaosmode && !purehepta && numplayers() == 1 && !inv::on) improveItemScores(); + if(!shmup::on && !chaosmode && !nontruncated && numplayers() == 1 && !inv::on) improveItemScores(); - int sid = purehepta ? 57 : chaosmode ? 53 : shmup::on ? (numplayers() > 1 ? 44 : 28) : + int sid = nontruncated ? 57 : chaosmode ? 53 : shmup::on ? (numplayers() > 1 ? 44 : 28) : inv::on ? 69 : (numplayers() > 1 ? 61 : 0); @@ -654,7 +654,7 @@ void achievement_victory(bool hyper) { if(euclid) return; if(sphere) return; if(quotient) return; - if(purehepta) return; + if(nontruncated) return; if(randomPatternsMode) return; if(hyper && shmup::on) return; if(yendor::on) return; diff --git a/barriers.cpp b/barriers.cpp index 6dddce6c..14c159d5 100644 --- a/barriers.cpp +++ b/barriers.cpp @@ -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 == (purehepta ? 3 : 0)) {q--; if(!q) return true; } + if(bb.spin == (nontruncated ? 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(!purehepta) { + if(!nontruncated) { cwspin(bb2, 4); cwstep(bb2); if(bb2.c->bardir != NODIR) return false; } } cwstep(bb); - if(!purehepta) { cwspin(bb, 3); cwstep(bb); cwspin(bb, 3); cwstep(bb); } + if(!nontruncated) { 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(!purehepta) { + if(!nontruncated) { cwspin(bb2, 4); cwstep(bb2); if(bb2.c->bardir != NODIR) return false; } } - cwspin(bb, 3); cwstep(bb); cwspin(bb, purehepta ? 5 : 4); + cwspin(bb, 3); cwstep(bb); cwspin(bb, nontruncated ? 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(purehepta && S3==4) { + if(nontruncated && S3==4) { cwspin(bb, dir); cwstep(bb); cwspin(bb, dir); } - else if(purehepta) { + else if(nontruncated) { 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(!purehepta && c->landparam == 0 && c->barleft != NOWALLSEP) { + if(!nontruncated && 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(!purehepta) { + if(!nontruncated) { 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, purehepta?-a:a); cwstep(bb); + bb.c = c; bb.spin = c->bardir; cwspin(bb, nontruncated?-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, purehepta?5:4); - setland(bb.c, purehepta ? c->barleft : c->barright); + cwspin(bb, 3); cwstep(bb); cwspin(bb, nontruncated?5:4); + setland(bb.c, nontruncated ? 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(!purehepta) { + if(!nontruncated) { 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(!purehepta) { + if(!nontruncated) { cwstep(cw); setland(cw.c, c->barright); } - if(purehepta && S3 == 4) { + if(nontruncated && 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(purehepta && S3==4) { + if(nontruncated && S3==4) { cwspin(cw, i); cwstep(cw); cwspin(cw, i); } - else if(purehepta) { + else if(nontruncated) { 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 && purehepta) { + if(S3 == 4 && nontruncated) { 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(!purehepta) cwspin(cw, i); + if(!nontruncated) cwspin(cw, i); cw.c->bardir = cw.spin; - if(!purehepta) cwspin(cw, -i); + if(!nontruncated) cwspin(cw, -i); } extendcheck(cw.c); extendBarrier(cw.c); } - if(purehepta && S3==4) { + if(nontruncated && S3==4) { cwspin(cw, -i); cwstep(cw); cwspin(cw, -i); } - else if(purehepta) { + else if(nontruncated) { 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(purehepta) return; + if(nontruncated) 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(!purehepta) cwstep(cw); + if(!nontruncated) cwstep(cw); if(cw.c->land != laMirrorWall) if(buildBarrier6(cw, 1)) return; } - if(firstmirror && (purehepta?c->barleft == laMirror : c->barright == laMirror) && hrand(100) < 60) { + if(firstmirror && (nontruncated?c->barleft == laMirror : c->barright == laMirror) && hrand(100) < 60) { cellwalker cw(c, c->bardir); - if(purehepta) { + if(nontruncated) { 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(purehepta) { + if(nontruncated) { 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(!purehepta) { + if(!nontruncated) { 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(!(purehepta?checkBarriersFront:checkBarriersBack)(b[1], 6, true)) return false; - if(!(purehepta?checkBarriersFront:checkBarriersBack)(b[2], 6, true)) return false; + if(!(nontruncated?checkBarriersFront:checkBarriersBack)(b[1], 6, true)) return false; + if(!(nontruncated?checkBarriersFront:checkBarriersBack)(b[2], 6, true)) return false; } else { - if(!(purehepta?checkBarriersFront:checkBarriersBack)(b[0], 6, true)) return false; - if(!(purehepta?checkBarriersFront:checkBarriersBack)(b[3], 6, true)) return false; + if(!(nontruncated?checkBarriersFront:checkBarriersBack)(b[0], 6, true)) return false; + if(!(nontruncated?checkBarriersFront:checkBarriersBack)(b[3], 6, true)) return false; } for(int d=0; d<4; d++) { b[d].c->bardir = b[d].spin; - if(purehepta) { + if(nontruncated) { 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; } - (purehepta?extendBarrierFront:extendBarrierBack)(b[d].c); + (nontruncated?extendBarrierFront:extendBarrierBack)(b[d].c); } - if(purehepta && false) { + if(nontruncated && 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(!purehepta) { + if(!nontruncated) { 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(purehepta) cwstep(b2); + if(nontruncated) cwstep(b2); else { cwstep(b2); cwspin(b2, 3); cwstep(b2); cwspin(b2, 3); cwstep(b2); } cellwalker b3(c, d); - if(purehepta) { + if(nontruncated) { 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(purehepta) { + if(nontruncated) { 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(!purehepta) for(int a=-3; a<=3; a++) if(a) { + if(!nontruncated) 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(purehepta) setbarrier(b1.c), setbarrier(b2.c), setbarrier(b3.c), setbarrier(b4.c); + if(nontruncated) setbarrier(b1.c), setbarrier(b2.c), setbarrier(b3.c), setbarrier(b4.c); - if(!purehepta) { + if(!nontruncated) { cell *cp; cp = cwpeek(b1, 0); cp->barleft = ll; cp->barright = lr; setbarrier(cp); @@ -780,7 +780,7 @@ bool buildBarrierNowall(cell *c, eLand l2, bool force) { } for(int i=0; i<3; i++) { - int d = (S3>3 && purehepta) ? (2+(i&1)) : dtab[i]; + int d = (S3>3 && nontruncated) ? (2+(i&1)) : dtab[i]; if(force) d=1; cellwalker cw(c, d); diff --git a/bigstuff.cpp b/bigstuff.cpp index 4a76ec0d..62384e96 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -579,7 +579,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) < (purehepta?25:5) && items[itBone] >= 10) + if(c->landparam > HAUNTED_RADIUS+5 && b == laGraveyard && !generatingEquidistant && hrand(100) < (nontruncated?25:5) && items[itBone] >= 10) buildAnotherEquidistant(c); } @@ -913,7 +913,7 @@ void buildBigStuff(cell *c, cell *from) { else if(weirdhyperbolic) ; // non-Nowall barriers not implemented yet in weird hyperbolic - else if(c->land == laCrossroads2 && !purehepta) + else if(c->land == laCrossroads2 && !nontruncated) buildCrossroads2(c); else if(c->land == laPrairie && c->LHU.fi.walldist == 0) { @@ -952,7 +952,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 ? (purehepta ? 250 : 2000) : 0) : + c->land == laOcean ? (deepOcean ? (nontruncated ? 250 : 2000) : 0) : c->land == laDragon ? 120 : 50)) { @@ -1006,7 +1006,7 @@ void buildBigStuff(cell *c, cell *from) { if(c->land == laOcean && ctof(c) && deepOcean && !generatingEquidistant && !peace::on && (quickfind(laWhirlpool) || ( - hrand(2000) < (purehepta ? 500 : 1000) && !tactic::on && !yendor::on))) + hrand(2000) < (nontruncated ? 500 : 1000) && !tactic::on && !yendor::on))) createAlternateMap(c, 2, hsA); if(c->land == laCaribbean && ctof(c)) @@ -1117,7 +1117,7 @@ void moreBigStuff(cell *c) { } if(q == 1) buildCamelotWall(c); // towers of Camelot - if(q == 0 && !purehepta) { + if(q == 0 && !nontruncated) { c->monst = moKnight; c->wall = waTower; forCellEx(c2, c) { @@ -1142,7 +1142,7 @@ void moreBigStuff(cell *c) { } if(d == 1) { // roughly as many knights as table cells - if(hrand(purehepta ? 2618 : 1720) < 1000) + if(hrand(nontruncated ? 2618 : 1720) < 1000) c->monst = moKnight; if(!euclid) for(int i=0; imaster->move[i]); for(int i=0; itype; i++) @@ -1176,7 +1176,7 @@ void moreBigStuff(cell *c) { c->land = laTemple, c->wall = waNone, c->monst = moNone, c->item = itNone; } if(d % TEMPLE_EACH==0) { - if((weirdhyperbolic && purehepta) ? hrand(100) < 50 : pseudohept(c)) + if((weirdhyperbolic && nontruncated) ? hrand(100) < 50 : pseudohept(c)) c->wall = waColumn; else { if(!euclid) for(int i=0; imaster->move[i]); diff --git a/blizzard.cpp b/blizzard.cpp index dbb1dce7..87a23f32 100644 --- a/blizzard.cpp +++ b/blizzard.cpp @@ -1,7 +1,7 @@ double randd() { return (rand() % 1000000) / 1000000. + .0000005; } double cellgfxdist(cell *c, int i) { - return purehepta ? tessf : (c->type == 6 && (i&1)) ? hexhexdist : crossf; + return nontruncated ? 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 = - purehepta ? tessf : t == 6 ? hexhexdist : crossf; + nontruncated ? tessf : t == 6 ? hexhexdist : crossf; if(hdist0(h) < hdist0(xpush(-d) * h)) return spin(2*M_PI/t * (rand() % t)) * h; } diff --git a/cell.cpp b/cell.cpp index 01de36e6..6c155c1c 100644 --- a/cell.cpp +++ b/cell.cpp @@ -68,7 +68,7 @@ hrmap *newAltMap(heptagon *o) { return new hrmap_alternate(o); } struct hrmap_hyperbolic : hrmap { heptagon *origin; - bool ispurehepta; + bool isnontruncated; hrmap_hyperbolic() { // printf("Creating hyperbolic map: %p\n", this); origin = new heptagon; @@ -84,14 +84,14 @@ struct hrmap_hyperbolic : hrmap { h.spintable = 0; h.alt = NULL; h.distance = 0; - ispurehepta = purehepta; + isnontruncated = nontruncated; h.c7 = newCell(S7, origin); } heptagon *getOrigin() { return origin; } ~hrmap_hyperbolic() { DEBMEM ( verifycells(origin); ) // printf("Deleting hyperbolic map: %p\n", this); - dynamicval ph(purehepta, ispurehepta); + dynamicval ph(nontruncated, isnontruncated); clearfrom(origin); } void verify() { verifycells(origin); } @@ -110,10 +110,10 @@ int spherecells() { struct hrmap_spherical : hrmap { heptagon *dodecahedron[12]; - bool ispurehepta; + bool isnontruncated; hrmap_spherical() { - ispurehepta = purehepta; + isnontruncated = nontruncated; for(int i=0; i ph(purehepta, ispurehepta); + dynamicval ph(nontruncated, isnontruncated); for(int i=0; imov[d]) return c->mov[d]; - else if(purehepta) { + else if(nontruncated) { heptagon *h2 = createStep(c->master, d); merge(c,d,h2->c7,c->master->spin(d),false); } @@ -659,7 +659,7 @@ heptagon deletion_marker; void clearHexes(heptagon *at) { if(at->c7) { - if(!purehepta) for(int i=0; i<7; i++) + if(!nontruncated) for(int i=0; i<7; i++) clearcell(at->c7->mov[i]); clearcell(at->c7); } @@ -699,7 +699,7 @@ void verifycell(cell *c) { for(int i=0; imov[i]; if(c2) { - if(!euclid && !purehepta && c == c->master->c7) verifycell(c2); + if(!euclid && !nontruncated && 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); @@ -1434,7 +1434,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(!purehepta) { + if(!nontruncated) { ac = chosenDown(ac, 1, 1, celldist); if(ac == tgt) { if(chosenDown(ac0, 1, 0, celldist) == diff --git a/complex.cpp b/complex.cpp index 45be3122..92dd68ca 100644 --- a/complex.cpp +++ b/complex.cpp @@ -739,7 +739,7 @@ namespace clearing { generateAlts(c->master->move[i]); int d = celldistAlt(c); - if(purehepta) { + if(nontruncated) { for(int i=0; i<7; i++) { cell *c2 = createMov(c, i); if(!pseudohept(c2) && celldistAlt(c2) == d-1) @@ -1086,7 +1086,7 @@ namespace mirror { } void createMirages(cellwalker cw, int cpid) { - if(purehepta) { + if(nontruncated) { for(int i=0; itype; i++) { cellwalker C2 = cw; cwstep(C2); @@ -1296,9 +1296,9 @@ namespace mirror { v.push_back(1); stepcount++; if(stepcount > 10000) { printf("failhep\n"); return cw; } } - if(purehepta && cwpeek(cw,0) == cwcopy.c) + if(nontruncated && cwpeek(cw,0) == cwcopy.c) v.pop_back(); - if(purehepta && cwpeek(cw,3)->land == laMirrored && cwpeek(cw,2)->land == laMirrorWall) { + if(nontruncated && 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; @@ -1799,7 +1799,7 @@ namespace heat { cell *c = playerpos(i); if(!c) continue; double xrate = (c->land == laCocytus && shmup::on) ? rate/3 : rate; - if(purehepta) xrate *= 1.7; + if(nontruncated) xrate *= 1.7; if(!shmup::on) xrate /= FIX94; if(isIcyLand(c)) HEAT(c) += (markOrb(itOrbWinter) ? -1.2 : 1.2) * xrate; @@ -1814,7 +1814,7 @@ namespace heat { for(int i=0; iland == laCocytus && shmup::on) ? 1/3. : 1; - if(purehepta) xrate *= 1.7; + if(nontruncated) xrate *= 1.7; if(!shmup::on) xrate /= FIX94; if(c->cpdist > 7 && !doall) break; @@ -2492,7 +2492,7 @@ namespace sword { } void shuffle(int i) { - sword::angle[i] = euclid ? S7*hrand(6) : purehepta ? 3*hrand(S14)+1 : hrand(S42); + sword::angle[i] = euclid ? S7*hrand(6) : nontruncated ? 3*hrand(S14)+1 : hrand(S42); } void reset() { @@ -2677,7 +2677,7 @@ namespace prairie { c->LHU.fi.rval = (y&15); } else if(sphere) { - c->LHU.fi.rval = celldistance(c, cwt.c) + 8 - (purehepta ? 2 : 3); + c->LHU.fi.rval = celldistance(c, cwt.c) + 8 - (nontruncated ? 2 : 3); } else { if(!from) { @@ -2738,8 +2738,8 @@ namespace prairie { } } - #define RLOW (sphere?(purehepta?7:6):purehepta?4:2) - #define RHIGH (sphere?(purehepta?8:9):purehepta?11:13) + #define RLOW (sphere?(nontruncated?7:6):nontruncated?4:2) + #define RHIGH (sphere?(nontruncated?8:9):nontruncated?11:13) bool isriver(cell *c) { return c->land == laPrairie && c->LHU.fi.rval <= RHIGH && c->LHU.fi.rval >= RLOW; @@ -2901,7 +2901,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) >= (purehepta ? 7 : 10)) { + if(celldistance(lasttreasure, cwt.c) >= (nontruncated ? 7 : 10)) { lasttreasure->item = itNone; forCellEx(c2, lasttreasure) if(c2->item == itGreenGrass) c2->item = itNone; } @@ -3277,7 +3277,7 @@ namespace halloween { else if(CHANCE(5) && itr >= 60) { dragoncount++; } - else if(dragoncount && !purehepta && !mcount) { + else if(dragoncount && !nontruncated && !mcount) { bool fill = false; for(int i=0; i<4; i++) if(!dragoncells[i] || dragoncells[i]->monst) diff --git a/config.cpp b/config.cpp index 55fc4668..9ab73081 100644 --- a/config.cpp +++ b/config.cpp @@ -304,7 +304,7 @@ void initConfig() { addsaver(hardcore, "mode-hardcore", false); addsaver(chaosmode, "mode-chaos"); addsaver(inv::on, "mode-Orb Strategy"); - addsaver(purehepta, "mode-heptagonal", false); + addsaver(nontruncated, "mode-heptagonal", false); addsaver(peace::on, "mode-peace"); addsaver(peace::otherpuzzles, "mode-peace-submode"); addsaverenum(specialland, "land for special modes"); @@ -322,7 +322,7 @@ void resetModes() { if(shmup::on) restartGame('s'); if(inv::on) restartGame('i'); if(chaosmode) restartGame('C'); - if(purehepta) restartGame('7'); + if(nontruncated) restartGame('7'); if(peace::on) restartGame('P'); #if CAP_TOUR if(tour::on) restartGame('T'); @@ -415,11 +415,11 @@ void loadOldConfig(FILE *f) { shmup::loadConfig(f); - aa = rug::renderonce; bb = rug::rendernogl; cc = purehepta; dd = chaosmode; + aa = rug::renderonce; bb = rug::rendernogl; cc = nontruncated; dd = chaosmode; int ee = vid.steamscore; double rs = rug::scale; err=fscanf(f, "%d%d%d%d%lf%d%d", &aa, &bb, &rug::texturesize, &cc, &rs, &ee, &dd); - rug::renderonce = aa; rug::rendernogl = bb; purehepta = cc; chaosmode = dd; vid.steamscore = ee; + rug::renderonce = aa; rug::rendernogl = bb; nontruncated = cc; chaosmode = dd; vid.steamscore = ee; rug::scale = rs; aa=conformal::autobandhistory; diff --git a/fieldpattern.cpp b/fieldpattern.cpp index b95e71c5..85b1cd52 100644 --- a/fieldpattern.cpp +++ b/fieldpattern.cpp @@ -382,7 +382,7 @@ struct fpattern { dists[at] = i; for(int q=0; qmaster == getDodecahedron(3) || @@ -2035,7 +2035,7 @@ void killMonster(cell *c, eMonster who, flagtype deathflags) { for(int i=0; itype; i++) { cell *c2 = c->mov[i]; if(c2 && c2->item == itCompass) toomany = true; - if(c2 && !purehepta) for(int j=0; jtype; j++) + if(c2 && !nontruncated) for(int j=0; jtype; j++) if(c2->mov[j] && c2->mov[j]->item == itCompass) toomany = true; } @@ -2580,7 +2580,7 @@ void buildRosemap() { } -int getDistLimit() { return ginf[geometry].distlimit[purehepta]; } +int getDistLimit() { return ginf[geometry].distlimit[nontruncated]; } bool nogoSlow(cell *to, cell *from) { if(cellEdgeUnstable(to) && gravityLevel(to) >= gravityLevel(from)) return true; @@ -2968,7 +2968,7 @@ void toggleGates(cell *ct, eWall type, int rad) { void toggleGates(cell *ct, eWall type) { playSound(ct, "click"); numgates = 0; - if(type == waClosePlate && purehepta) + if(type == waClosePlate && nontruncated) toggleGates(ct, type, 2); else toggleGates(ct, type, 3); @@ -6518,11 +6518,11 @@ ld circlesizeD[10000]; int lastsize; void computeSizes() { - lastsize = purehepta ? 44 : 76; + lastsize = nontruncated ? 44 : 76; circlesize[0] = 1; - if(!purehepta) { + if(!nontruncated) { circlesize[1] = 1*7; circlesize[2] = 2*7; circlesize[3] = 4*7; @@ -7260,7 +7260,7 @@ bool movepcto(int d, int subdir, bool checkonly) { if(checkonly) return false; if(nonAdjacent(cwt.c,c2)) addMessage(XLAT( - purehepta ? + nontruncated ? "You cannot move between the cells without dots here!" : "You cannot move between the triangular cells here!" )); diff --git a/geometry.cpp b/geometry.cpp index 964e8010..0f83edea 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -97,7 +97,7 @@ void precalc() { else { hcrossf = hdist(xpush(tessf) * C0, spin(2*M_PI/S7) * xpush(tessf) * C0) / 2; } - crossf = purehepta ? tessf : hcrossf; + crossf = nontruncated ? tessf : hcrossf; fmin = 0, fmax = tessf; for(int p=0; p<100; p++) { @@ -110,9 +110,9 @@ void precalc() { } hexf = fmin; - rhexf = purehepta ? hcrossf : hexf; + rhexf = nontruncated ? hcrossf : hexf; - if(!euclid && !purehepta && !(S7&1)) + if(!euclid && !nontruncated && !(S7&1)) hexshift = ALPHA/2 + ALPHA * ((S7-1)/2) + M_PI; finish: diff --git a/graph.cpp b/graph.cpp index c381a509..13d3a3f8 100644 --- a/graph.cpp +++ b/graph.cpp @@ -153,7 +153,7 @@ void drawSpeed(const transmatrix& V) { } int ctof(cell *c) { - if(purehepta) return 1; + if(nontruncated) return 1; // if(euclid) return 0; return ishept(c) ? 1 : 0; // c->type == 6 ? 0 : 1; @@ -224,8 +224,8 @@ int displaydir(cell *c, int d) { } double hexshiftat(cell *c) { - if(ctof(c) && S7==6 && S3 == 4 && !purehepta) return hexshift + 2*M_PI/S7; - if(ctof(c) && (S7==8 || S7 == 4) && S3 == 3 && !purehepta) return hexshift + 2*M_PI/S7; + if(ctof(c) && S7==6 && S3 == 4 && !nontruncated) return hexshift + 2*M_PI/S7; + if(ctof(c) && (S7==8 || S7 == 4) && S3 == 3 && !nontruncated) return hexshift + 2*M_PI/S7; if(hexshift && ctof(c)) return hexshift; return 0; } @@ -274,11 +274,11 @@ void drawPlayerEffects(const transmatrix& V, cell *c, bool onplayer) { if(!euclid) for(int a=0; a=4 && i < 16) j = 2; else if(i >= 16 && i < 28) j = 1; else if(i >= 28 && i < 40) j = 3; @@ -2205,7 +2205,7 @@ void drawReptileFloor(const transmatrix& V, cell *c, int col, bool usefloor) { int j; if(!wmescher) j = 4; - else if(purehepta) j = 0; + else if(nontruncated) j = 0; else if(i < 4) j = 0; else if(i >=4 && i < 16) j = 1; else if(i >= 16 && i < 28) j = 2; @@ -2262,7 +2262,7 @@ void drawReptileFloor(const transmatrix& V, cell *c, int col, bool usefloor) { void drawEmeraldFloor(const transmatrix& V, cell *c, int col) { int j = -1; - if(!euclid && !purehepta) { + if(!euclid && !nontruncated) { int i = emeraldval(c) & ~3; if(i == 8) j = 0; else if(i == 12) j = 1; @@ -2809,7 +2809,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 || purehepta) warp = false; + if(shmup::on || nontruncated) warp = false; dynamicval p(poly_outline, OUTLINE_TRANS); if(wmescher && qfi.special) { queuepolyat(V * qfi.spin * shadowmulmatrix, *qfi.shape, col, PPR_WALLSHADOW); @@ -2824,7 +2824,7 @@ void floorShadow(cell *c, const transmatrix& V, int col, bool warp) { else queuepolyat(V * applyPatterndir(c), shTriheptaFloorShadow[ctof(c)], col, PPR_WALLSHADOW); } - else if(c->land == laDual && !purehepta) { + else if(c->land == laDual && !nontruncated) { if(euclid && ishex1(c)) queuepolyat(V * pispin, shBigTriShadow, col, PPR_WALLSHADOW); else @@ -2850,7 +2850,7 @@ void plainfloor(cell *c, bool warp, const transmatrix &V, int col, int prio) { else queuepolyat(V * applyPatterndir(c), shTriheptaFloor[sphere ? ctof(c) : mapeditor::nopattern(c)], col, prio); } - else if(c->land == laDual && !purehepta) { + else if(c->land == laDual && !nontruncated) { if(euclid && ishex1(c)) queuepolyat(V * pispin, shBigTriangle, col, prio); else @@ -2872,7 +2872,7 @@ void fullplainfloor(cell *c, bool warp, const transmatrix &V, int col, int prio) else queuepolyat(V * applyPatterndir(c), shTriheptaFloor[sphere ? ctof(c) : mapeditor::nopattern(c)], col, prio); } - else if(c->land == laDual && !purehepta) { + else if(c->land == laDual && !nontruncated) { if(euclid && ishex1(c)) queuepolyat(V * pispin, shBigTriangle, col, prio); else @@ -2896,7 +2896,7 @@ void qplainfloor(cell *c, bool warp, const transmatrix &V, int col) { else qfloor(c, V, applyPatterndir(c), shTriheptaFloor[sphere ? ctof(c) : mapeditor::nopattern(c)], col); } - else if(c->land == laDual && !purehepta) + else if(c->land == laDual && !nontruncated) qfloor_eswap(c, V, shBigTriangle, col); else { qfloor(c, V, shFloor[ctof(c)], col); @@ -2906,7 +2906,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 || purehepta) warp = false; + if(shmup::on || nontruncated) warp = false; if(wmescher && qfi.special) queuepolyat(V*qfi.spin, *qfi.shape, col, prio); else plainfloor(c, warp, V, col, prio); @@ -2951,9 +2951,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 || purehepta) warp = false; + if(shmup::on || nontruncated) warp = false; if(warp && !ishept(c) && (!c->mov[i] || !ishept(c->mov[i]))) return; - if(c->land == laDual && !purehepta) { + if(c->land == laDual && !nontruncated) { if(ctof(c)) return; if(euclid ? (ishex1(c) ? !(i&1) : (i&1)) : !(i&1)) return; } @@ -2978,7 +2978,7 @@ void placeSidewall(cell *c, int i, int sidepar, const transmatrix& V, bool warp, // prio += c->cpdist - c->mov[i]->cpdist; queuepolyat(V2, - (mirr?shMFloorSide:warp?shTriheptaSide:(c->land == laDual&&!purehepta)?shBigTriSide:shFloorSide)[sidepar][ctof(c)], col, prio); + (mirr?shMFloorSide:warp?shTriheptaSide:(c->land == laDual&&!nontruncated)?shBigTriSide:shFloorSide)[sidepar][ctof(c)], col, prio); } bool openorsafe(cell *c) { @@ -3462,7 +3462,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { transmatrix Vpdir = V * applyPatterndir(c); #endif - bool eoh = euclid || purehepta; + bool eoh = euclid || nontruncated; if(c->wall == waChasm) { if(c->land == laZebra) fd++; @@ -3504,7 +3504,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(purehepta) onleft = !onleft; + if(nontruncated) onleft = !onleft; if(d == -1) { for(d=0; d<6; d++) @@ -3624,11 +3624,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 && !purehepta && !ctof(c)) { + else if(c->land == laDual && !nontruncated && !ctof(c)) { qfloor_eswap(c, Vf, shBigTriangle, darkena(fcol, fd, 0xFF)); } - else if(isWarped(c) && !purehepta && !shmup::on) { + else if(isWarped(c) && !nontruncated && !shmup::on) { int np = mapeditor::nopattern(c); if(c->landparam == 1337) np = 0; // for the achievement screenshot if(np < 11) @@ -3722,7 +3722,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 && !purehepta) { + else if(c->land == laDragon && !nontruncated) { /* if(!wmspatial || noAdjacentChasms(c)) */ qfloor(c, Vf, DRAGONFLOOR, darkena(fcol, fd, 0xFF)); /* if(wmspatial) @@ -3901,7 +3901,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { if(pseudohept(c) && ( c->land == laRedRock || vid.darkhepta || - (c->land == laClearing && purehepta))) { + (c->land == laClearing && nontruncated))) { queuepoly((*Vdp), shHeptaMarker, wmblack ? 0x80808080 : 0x00000080); } @@ -4384,7 +4384,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 / (purehepta?150:75.0) + airdir * M_PI / (S21+.0); + double ph = ticks / (nontruncated?150:75.0) + airdir * M_PI / (S21+.0); int aircol = 0x8080FF00 | int(32 + 32 * -cos(ph)); @@ -4427,7 +4427,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { transmatrix V0 = spin((hdir) * M_PI / S42); - double ldist = purehepta ? crossf : c->type == 6 ? .2840 : 0.3399; + double ldist = nontruncated ? crossf : c->type == 6 ? .2840 : 0.3399; poly_outline = OUTLINE_TRANS; queuepoly((*Vdp)*V0*xpush(ldist*(2*ph1-1)), shDisk, aircol); @@ -4452,7 +4452,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { int prec = sphere ? 3 : 1; - if(purehepta) { + if(nontruncated) { double x = hcrossf; for(int t=0; tmov[t] && c->mov[t] < c) @@ -4851,7 +4851,7 @@ void drawthemap() { mmspatial = vid.monmode == 4 || vid.monmode == 5; DEBB(DF_GRAPH, (debugfile,"draw the map\n")); - fanframe = ticks / (purehepta ? 300 : 150.0) / M_PI; + fanframe = ticks / (nontruncated ? 300 : 150.0) / M_PI; for(int m=0; mdm4 = parent->dm4+1; if(fixdistance != COMPUTE) h->distance = fixdistance; - else if(purehepta) h->distance = parent->distance + 1; + else if(nontruncated) h->distance = parent->distance + 1; else if(parent->s == hsOrigin) h->distance = parent->distance + 2; else if(S3 == 4) { h->distance = parent->distance + 2; @@ -123,7 +123,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 - (purehepta?1:2); + h->distance = parent->distance - (nontruncated?1:2); if(S3 == 4 && S7 == 5) { if(h->s == hsOrigin) { printf("had to cheat!\n"); diff --git a/hud.cpp b/hud.cpp index 86c1f441..f14c1f9b 100644 --- a/hud.cpp +++ b/hud.cpp @@ -312,21 +312,21 @@ void drawStats() { if(d >= 0 && d < 64) qty[d]++; } if(geometry == gNormal) - for(int i=purehepta?6:8; i<=15; i++) + for(int i=nontruncated?6:8; i<=15; i++) qty[i] = - purehepta ? + nontruncated ? 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 && !purehepta) { + if(geometry == gNormal && !nontruncated) { 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 && purehepta) { + if(geometry == gNormal && nontruncated) { dialog::addBreak(200); dialog::addHelp("a(d+2) = 3a(d+1) - a(d+2)"); dialog::addInfo("a(d) ~ 2.61803ᵈ", forecolor); diff --git a/hyper.cpp b/hyper.cpp index ed6196ff..50090f62 100644 --- a/hyper.cpp +++ b/hyper.cpp @@ -193,7 +193,7 @@ else if(args()[0] == '-' && args()[1] == x && args()[2] == '0') { showstartmenu TOGGLE('o', vid.usingGL, switchGL()) TOGGLE('C', chaosmode, restartGame('C')) - TOGGLE('7', purehepta, restartGame('7')) + TOGGLE('7', nontruncated, restartGame('7')) TOGGLE('f', vid.full, switchFullscreen()) TOGGLE('T', tactic::on, restartGame('t')) TOGGLE('S', shmup::on, restartGame('s')) diff --git a/hyperpoint.cpp b/hyperpoint.cpp index 9b427211..4f9778e4 100644 --- a/hyperpoint.cpp +++ b/hyperpoint.cpp @@ -4,7 +4,7 @@ eGeometry geometry, targetgeometry; // for the pure heptagonal grid -bool purehepta = false; +bool nontruncated = false; // hyperbolic points and matrices diff --git a/hypgraph.cpp b/hypgraph.cpp index 9404be29..ca609e61 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -335,13 +335,13 @@ void drawrec(const heptspin& hs, int lev, hstate s, const transmatrix& V) { if(dodrawcell(c)) { reclevel = maxreclevel - lev; - drawcell(c, (hs.spin || purehepta) ? V1 * spin(hs.spin*2*M_PI/S7 + (purehepta ? M_PI:0)) : V1, 0, + drawcell(c, (hs.spin || nontruncated) ? V1 * spin(hs.spin*2*M_PI/S7 + (nontruncated ? M_PI:0)) : V1, 0, hs.mirrored); } if(lev <= 0) return; - if(!purehepta) for(int d=0; dwall = waPalace; if(getHemisphere(c,0) == 3) - c->wall = purehepta ? waOpenGate : waClosedGate; + c->wall = nontruncated ? waOpenGate : waClosedGate; if(getHemisphere(c,0) == 4 && hrand(100) < 40) c->wall = waClosePlate; if(getHemisphere(c,0) == 6) @@ -154,7 +154,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { bool lookingForPrincess = !euclid && c->master->alt && !princess::challenge; bool pgate = false; - if(purehepta) { + if(nontruncated) { int i = fiftyval049(c); if(i >= 8 && i <= 14 && !polarb50(c)) pgate = true; } @@ -190,9 +190,9 @@ void giantLandSwitch(cell *c, int d, cell *from) { } } } - else if((hrand(100) < (lookingForPrincess ? (purehepta ? 11 : 7) : 5) && cdist50(c)) || + else if((hrand(100) < (lookingForPrincess ? (nontruncated ? 11 : 7) : 5) && cdist50(c)) || (cdist50(c) == 0 && polarb50(c) && hrand(100) < 60)) { - c->wall = hrand(100) < (lookingForPrincess ? (purehepta ? 25 : 30):50) ? waClosePlate : waOpenPlate; + c->wall = hrand(100) < (lookingForPrincess ? (nontruncated ? 25 : 30):50) ? waClosePlate : waOpenPlate; } else if(hrand(100) < (lookingForPrincess ? 3 : 5)) c->wall = waTrapdoor; @@ -207,9 +207,9 @@ void giantLandSwitch(cell *c, int d, cell *from) { if(princess::generating) { // no Opening Plates nearby - if(d <= 7 && c->wall == waOpenPlate && !purehepta) + if(d <= 7 && c->wall == waOpenPlate && !nontruncated) c->wall = waNone; - if(d <= 7 && c->wall == waClosePlate && purehepta) + if(d <= 7 && c->wall == waClosePlate && nontruncated) c->wall = waOpenPlate; // no monsters nearby if(d>0) c->monst = moNone; @@ -306,7 +306,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { c->wall = waCavewall; else c->wall = waCavefloor; } - else if(purehepta) { + else if(nontruncated) { if(polarb50(c)) c->wall = waCavewall; else c->wall = waCavefloor; @@ -324,7 +324,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { c->monst = moSeep; ONEMPTY { - if(hrand(purehepta?400:1000) < PT(100 + 2 * (kills[moMiner] + kills[moLancer] + kills[moFlailer]), 200) && notDippingFor(itEmerald)) { + if(hrand(nontruncated?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; itype; i++) if(c->mov[i]->wall == waCavewall) ok = false; @@ -904,7 +904,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { case laHalloween: if(d == 9) { - if(purehepta) { + if(nontruncated) { int fv = c->master->fiftyval; if(fv == 1 || fv == 4 || fv == 2) c->wall = waChasm; @@ -998,10 +998,10 @@ void giantLandSwitch(cell *c, int d, cell *from) { if(c->type != 6) { int id = c->master->fiftyval; if(id == 1) c->wall = waCharged; - if(id == (elliptic && !purehepta ? 3 : 9)) c->wall = waGrounded; + if(id == (elliptic && !nontruncated ? 3 : 9)) c->wall = waGrounded; } } - else if(purehepta) { + else if(nontruncated) { 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; @@ -1118,7 +1118,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { case laHell: if(d == 9) { - if(hrand(1000) < (purehepta ? 16 : 36) && celldist(c) >= 3) { + if(hrand(1000) < (nontruncated ? 16 : 36) && celldist(c) >= 3) { for(int i=0; itype; i++) { cell *c2 = createMov(c, i); setdist(c2, d+1, c); @@ -1170,7 +1170,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { case laHive: if(d == 9) { - if(hrand(2000) < (chaosmode ? 1000 : purehepta?200:2) && !safety) + if(hrand(2000) < (chaosmode ? 1000 : nontruncated?200:2) && !safety) hive::createBugArmy(c); if(hrand(2000) < 100 && !c->wall && !c->item && !c->monst) { int nww = 0; @@ -1390,14 +1390,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 && !(purehepta && S3==4)) { + if(hrand((doCross && celldist(c) <= 5) ?450:16000) < 30+items[itRedGem]+yendor::hardness() && !pseudohept(c) && !c->monst && !c->wall && !(nontruncated && S3==4)) { int i = -1; for(int t=0; ttype; t++) if(c->mov[t]->mpdist > c->mpdist && !pseudohept(c->mov[t])) i = t; if(i != -1 && !peace::on) { c->monst = moHexSnake; preventbarriers(c); - int len = purehepta ? 2 : ROCKSNAKELENGTH; + int len = nontruncated ? 2 : ROCKSNAKELENGTH; cell *c2 = c; vector rocksnake; while(--len) { @@ -1412,14 +1412,14 @@ void giantLandSwitch(cell *c, int d, cell *from) { c2->monst = moHexSnakeTail; i = (j + (S6==8 ? 4 : (len%2 ? 2 : 4))) % S6; } - if(size(rocksnake) < ROCKSNAKELENGTH/2 && !purehepta) { + if(size(rocksnake) < ROCKSNAKELENGTH/2 && !nontruncated) { for(int i=0; imonst = moNone; } else c2->mondir = NODIR; } } - else if(hrand(16000) < 50+items[itRedGem]+yendor::hardness() && (purehepta?hrand(10)<3:!ishept(c)) && !c->monst) + else if(hrand(16000) < 50+items[itRedGem]+yendor::hardness() && (nontruncated?hrand(10)<3:!ishept(c)) && !c->monst) c->monst = moRedTroll, c->mondir = NODIR; } @@ -1435,7 +1435,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(!purehepta && !chaosmode) for(int i=0; itype; i++) + if(!nontruncated && !chaosmode) for(int i=0; itype; i++) if(c->mov[i] && !isWarped(c->mov[i]->land) && c->mov[i]->land != laCrossroads4) q++; if(q == 1) c->wall = waWarpGate; @@ -1444,7 +1444,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { if(c->land == laWarpSea) { c->wall = waSea; int q = 0; - if(!purehepta && !chaosmode) for(int i=0; itype; i++) + if(!nontruncated && !chaosmode) for(int i=0; itype; i++) if(c->mov[i] && !isWarped(c->mov[i]->land)) q++; if(q == 1) c->wall = waWarpGate; } @@ -1744,7 +1744,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { case laMirrorOld: ONEMPTY { - if((purehepta?pseudohept(c):!ishept(c)) && hrand(5000) < 120 && (peace::on || notDippingFor(itShard))) + if((nontruncated?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); @@ -1757,7 +1757,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { case laMirror: ONEMPTY { - if((purehepta?pseudohept(c):!ishept(c)) && hrand(1250) < 120 && (peace::on || notDippingFor(itShard))) + if((nontruncated?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); @@ -1846,7 +1846,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { case laCrossroads5: if(c->wall == waTower) c->land = laCamelot; ONEMPTY { - if(purehepta && c->land == laCrossroads5 && hrand(100) < 60) + if(nontruncated && 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; @@ -2058,7 +2058,7 @@ void setdist(cell *c, int d, cell *from) { if(buggyGeneration) { if(d < BARLEV) for(int i=0; itype; i++) { - setdist(createMov(c, i), d+(purehepta?2:1), c); + setdist(createMov(c, i), d+(nontruncated?2:1), c); } if(d >= BARLEV) c->item = itBuggy2; return; @@ -2142,7 +2142,7 @@ void setdist(cell *c, int d, cell *from) { placeLocalOrbs(c); } - if(purehepta && c->wall == waMirrorWall && c->land == laMirror) + if(nontruncated && c->wall == waMirrorWall && c->land == laMirror) c->land = laMirrorWall; // , c->item = itPirate; // not really a proper bugfix if(d == 7) playSeenSound(c); diff --git a/mapeditor.cpp b/mapeditor.cpp index 635e930c..2fa183db 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -316,7 +316,7 @@ namespace mapeditor { int t4 = t>>2, tcdir = 0; - if(purehepta) tcdir = t^1; + if(nontruncated) tcdir = t^1; else if(t4 == 10) tcdir = t-20; else if(t4 >= 4 && t4 < 7) tcdir = 40 + (t&3); @@ -2181,7 +2181,7 @@ lessalphaif(col, behindsphere(V), behindsphere(gmatrix[c2])) case patBigTriangles: { if(pseudohept(c) && !euclid) for(int i=0; imaster->move[i] < c->master) { - queueline(tC0(V), V*xspinpush0((purehepta?M_PI:0) -2*M_PI*i/S7, tessf), col1, 2); + queueline(tC0(V), V*xspinpush0((nontruncated?M_PI:0) -2*M_PI*i/S7, tessf), col1, 2); } break; } @@ -2190,21 +2190,21 @@ lessalphaif(col, behindsphere(V), behindsphere(gmatrix[c2])) if(pseudohept(c) && !euclid) for(int i=0; imaster->move[i] && c->master->move[i] < c->master && c->master->move[i]->dm4 == c->master->dm4) { cell *c2 = c->master->move[i]->c7; - queueline(tC0(V), V*xspinpush0((purehepta?M_PI:0) -2*M_PI*i/S7, tessf), col2, 2); + queueline(tC0(V), V*xspinpush0((nontruncated?M_PI:0) -2*M_PI*i/S7, tessf), col2, 2); } break; } case patTree: if(ctof(c) && !euclid) - queueline(tC0(V), V*ddi0(purehepta?S42:0, tessf), col1, 2); + queueline(tC0(V), V*ddi0(nontruncated?S42:0, tessf), col1, 2); break; case patAltTree: if(ctof(c) && !euclid && c->master->alt) { for(int i=0; imaster->move[i] && c->master->move[i]->alt == c->master->alt->move[0]) - queueline(tC0(V), V*xspinpush0((purehepta?M_PI:0) -2*M_PI*i/S7, tessf), col, 2); + queueline(tC0(V), V*xspinpush0((nontruncated?M_PI:0) -2*M_PI*i/S7, tessf), col, 2); } break; diff --git a/menus.cpp b/menus.cpp index b43d2269..f974f678 100644 --- a/menus.cpp +++ b/menus.cpp @@ -647,7 +647,7 @@ void showEuclideanMenu() { int ts = ginf[geometry].sides; int tv = ginf[geometry].vertex; int tq = ginf[geometry].quotientstyle; - int nom = (purehepta ? tv : tv+ts) * ((tq & qELLIP) ? 2 : 4); + int nom = (nontruncated ? tv : tv+ts) * ((tq & qELLIP) ? 2 : 4); int denom = (2*ts + 2*tv - ts * tv); dialog::addSelItem(XLAT("land"), XLAT1(linf[specialland].name), '5'); @@ -661,16 +661,16 @@ void showEuclideanMenu() { if(ts == 6 && tv == 3) dialog::addSelItem("truncated", "does not matter", 't'); else - dialog::addBoolItem("truncated", !purehepta, 't'); + dialog::addBoolItem("truncated", !nontruncated, 't'); dialog::addBreak(50); int worldsize = denom ? nom/denom : 0; if(tq & qTORUS) worldsize = torusconfig::qty; - if(tq & qZEBRA) worldsize = purehepta ? 12 : 40; + if(tq & qZEBRA) worldsize = nontruncated ? 12 : 40; if(tq & qFIELD) { worldsize = size(currfp.matrices) / ts; - if(!purehepta) worldsize = ((ts+tv)*worldsize) / tv; + if(!nontruncated) worldsize = ((ts+tv)*worldsize) / tv; } dialog::addSelItem("sides per face", its(ts), 0); @@ -750,7 +750,7 @@ void showEuclideanMenu() { dialog::init(XLAT("use this where?")); string truncatenames[2] = {" (t)", " (n)"}; - dialog::addSelItem(XLAT("geometry"), XLAT(ginf[geometry].name) + truncatenames[purehepta], '5'); + dialog::addSelItem(XLAT("geometry"), XLAT(ginf[geometry].name) + truncatenames[nontruncated], '5'); dialog::addBreak(50); for(int i=0; itype == 7 && !purehepta) return false; + if(c->type == 7 && !nontruncated) return false; if(items[itShard] < 25) return false; if(freq && hrand(freq * 100 / orbprizefun(items[itShard])) >= 100) return false; diff --git a/polygons.cpp b/polygons.cpp index b87fc2e0..bf151f1c 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -718,12 +718,12 @@ hyperpoint hpxd(ld d, ld x, ld y, ld z) { double scalef; hyperpoint hpxyzsc(double x, double y, double z) { - if(purehepta) return hpxd(scalef, x, y, z); + if(nontruncated) return hpxd(scalef, x, y, z); else return hpxyz(x,y,z); } hyperpoint turtlevertex(int u, double x, double y, double z) { - ld scale = purehepta ? scalef : 1; + ld scale = nontruncated ? scalef : 1; if(u) scale /= 2; return hpxd(scale, x, y, z); } @@ -756,7 +756,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 * (purehepta ? crossf / hcrossf : 1), shzoomy = 1.6 * (purehepta ? crossf / hcrossf : 1); + if(shzoom == WOLF) shzoomx = 1.5 * (nontruncated ? crossf / hcrossf : 1), shzoomy = 1.6 * (nontruncated ? crossf / hcrossf : 1); int rots2 = rots; // shapes 368..370 are specially designed if(!(shapeid >= 368 && shapeid <= 370)) { @@ -862,21 +862,21 @@ void buildpolys() { } // scales - scalef = purehepta ? crossf / hcrossf7 : hcrossf / hcrossf7; + scalef = nontruncated ? crossf / hcrossf7 : hcrossf / hcrossf7; if(euclid) scalef *= .52/crossf; - double scalef2 = purehepta ? crossf / hcrossf7 * .88 : euclid ? scalef : hcrossf / hcrossf7; + double scalef2 = nontruncated ? 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 = (purehepta && sphere) ? 1 : spzoom7; + double spzoomd7 = (nontruncated && sphere) ? 1 : spzoom7; double fac80 = geometry == g45 ? 1.4 : geometry == g46 ? 1.2 : geometry == gOctagon ? .7 : .8; - double fac94 = euclid ? .8 : (S6==4) ? (purehepta ? 1.1 : .9) : .94; + double fac94 = euclid ? .8 : (S6==4) ? (nontruncated ? 1.1 : .9) : .94; if(euclid) fac80 = fac94 = .9; @@ -891,11 +891,11 @@ void buildpolys() { #define SHADMUL (S3==4 ? 1.05 : 1.3) // procedural floors - double shexf = purehepta ? crossf* .55 : hexf; + double shexf = nontruncated ? crossf* .55 : hexf; double p = -.006; - int td = ((purehepta || euclid) && !(S7&1)) ? S42+S6 : 0; + int td = ((nontruncated || euclid) && !(S7&1)) ? S42+S6 : 0; bool a4 = S6 == 8; @@ -915,7 +915,7 @@ void buildpolys() { #define ROTS4(x) (sphere && S7 == 4?x:0) #define ROT38(x) (S7 == 8 ? x:0) -#define SCAP4(x) (a4&&purehepta?x:1) +#define SCAP4(x) (a4&&nontruncated?x:1) double trihepta0 = scalef*spzoom6*(.2776+p) * SCA4(1.3) * SCA46(.975) * SCA47(.85) * bscale6 * (S7==8?.9:1); double trihepta1 = (sphere ? .54 : scalef*spzoom6*(.5273-2*p) * SCA4(.8) * SCA46(1.075)) * (sphere&&S7==4?1.3:1) * bscale7; @@ -954,7 +954,7 @@ void buildpolys() { bool strict = false; - if(a4 && purehepta) fac94 *= 1.1; + if(a4 && nontruncated) fac94 *= 1.1; double floorrad0 = shexf*fac80*spzoom; @@ -1096,7 +1096,7 @@ void buildpolys() { hpcpush(ddi(0, -shexf*2.4) * C0); bshape(shMirror, PPR_WALL); - if(purehepta) { + if(nontruncated) { for(int t=0; t<=S7; t++) hpcpush(ddi(t*12, shexf*MF(fac80,7)) * C0); } else { @@ -1160,9 +1160,9 @@ void buildpolys() { } double disksize = crossf; - if(purehepta && S7 == 8) disksize *= 2; + if(nontruncated && S7 == 8) disksize *= 2; else if(S7 == 8) disksize *= 1.5; - else if(purehepta && S6 == 8) disksize *= 1.5; + else if(nontruncated && S6 == 8) disksize *= 1.5; bshape(shDisk, PPR_ITEM); for(int i=0; i<=S84; i+=S3) @@ -1369,9 +1369,9 @@ void buildpolys() { if(S7 == 8) spzoom6 *= .9; - if(a4 && !purehepta) spzoom6 *= 1.9, spzoom7 *= .9, spzoomd7 *= .9; - if(a4 && !purehepta && S7 == 6) spzoom6 *= .9; - if(a4 && !purehepta && S7 == 7) spzoom6 *= .85; + if(a4 && !nontruncated) spzoom6 *= 1.9, spzoom7 *= .9, spzoomd7 *= .9; + if(a4 && !nontruncated && S7 == 6) spzoom6 *= .9; + if(a4 && !nontruncated && S7 == 7) spzoom6 *= .85; double espzoom6 = spzoom6, espzoomd7 = spzoomd7; @@ -1401,12 +1401,12 @@ void buildpolys() { bshape(shChargedFloor[0], PPR_FLOOR, scalef*espzoom6*(sphere?.9:1)*ffscale2, 7, ffspin2); bshape(shChargedFloor[1], PPR_FLOOR, scalef*spzoomd7, 9); bshape(shChargedFloor[2], PPR_FLOOR, scalef*espzoom6, 7); - bshape(shChargedFloor[3], 12, spzoomd7 * (sphere&&purehepta?.9:1) * SCA4(1.2), 10); // purehepta variant + bshape(shChargedFloor[3], 12, spzoomd7 * (sphere&&nontruncated?.9:1) * SCA4(1.2), 10); // nontruncated variant bshape(shSStarFloor[0], PPR_FLOOR, scalef*spzoom6*(sphere?.8:1)*ffscale2, 11, ROT4(.775)); bshape(shSStarFloor[1], PPR_FLOOR, scalef*spzoomd7*SCA4(.85), 12, octroll); bshape(shOverFloor[0], PPR_FLOOR, scalef*spzoom * SCA47(1.3) * SCA45(1.3) * SCA46(1.1), 13, ROT47(-.75) + ROT45(-.7)+ROT46(.9)); - if(purehepta) { + if(nontruncated) { if(a4) bshape(shOverFloor[1], PPR_FLOOR, 1, 368 + S7 - 5, 0); else bshape(shOverFloor[1], PPR_FLOOR, (sphere ? .83 : 1) * SCA38(1.3), 14, octroll + ROT38(.4)); } @@ -1415,11 +1415,11 @@ void buildpolys() { bshape(shTriFloor[0], PPR_FLOOR, scalef*espzoom6*(sphere?.9:1)*ffscale2*SCA4(0.9), 17, ffspin2 + ROT47(.1)); bshape(shTriFloor[1], PPR_FLOOR, scalef*espzoomd7*ffscale2*SCA4(1.2)*SCA47(1.5), 18, octroll + ROT4(.25) - ROT47(.1) + ROTS4(.7)); bshape(shFeatherFloor[0], PPR_FLOOR, scalef*spzoom6*ffscale2, 19, ffspin2); - if(purehepta) bshape(shFeatherFloor[1], PPR_FLOOR, sphere ? .83 : SCAP4(1.1), 20); + if(nontruncated) bshape(shFeatherFloor[1], PPR_FLOOR, sphere ? .83 : SCAP4(1.1), 20); else bshape(shFeatherFloor[1], PPR_FLOOR, scalef*spzoom7*(sphere?1.1:1)*ffscale2*(a4?1.1:1), 21, sphere?1.3:0); bshape(shFeatherFloor[2], PPR_FLOOR, scalef*1.1, 22); // Euclidean variant bshape(shBarrowFloor[0], PPR_FLOOR, (euclid?.9:1) * spzoom6 * (S7==8?1.4:1) * SCA467(1.7) * SCA46(.8), 23); - bshape(shBarrowFloor[1], PPR_FLOOR, (sphere&&purehepta?.9:1) * spzoomd7 * (S7==8?1.5:1) * SCA4(1.15) * SCA467(1.9) * SCA46(.8), 24, octroll - ROT47(.1)); + bshape(shBarrowFloor[1], PPR_FLOOR, (sphere&&nontruncated?.9:1) * spzoomd7 * (S7==8?1.5:1) * SCA4(1.15) * SCA467(1.9) * SCA46(.8), 24, octroll - ROT47(.1)); bshape(shBarrowFloor[2], PPR_FLOOR, (sphere||euclid)?.9:1, 25); bshape(shNewFloor[0], PPR_FLOOR, scalef*espzoom6 * ffscale2, 26, ffspin2); bshape(shNewFloor[1], PPR_FLOOR, scalef*espzoomd7 * ffscale2, 27, octroll); @@ -1498,12 +1498,12 @@ void buildpolys() { zoomShape(shDesertFloor[j], shRedRockFloor[i-1][j], 1 - .1 * i, PPR_FLOORa+i); bshape(shPowerFloor[0], PPR_FLOOR_DRAGON, scalef*espzoom6*(sphere?.8:1)*ffscale2, 57, ffspin2); bshape(shPowerFloor[1], PPR_FLOOR_DRAGON, scalef*espzoomd7*ffscale2, 58, octroll); - bshape(shRoseFloor[2], PPR_FLOOR, 1, 173); // purehepta + bshape(shRoseFloor[2], PPR_FLOOR, 1, 173); // nontruncated bshape(shRoseFloor[0], PPR_FLOOR, (euclid?.9:1), 174); - bshape(shRoseFloor[1], PPR_FLOOR, (euclid?.9:1) * scalef * SCAP4(.85), 175, (purehepta && a4 ? M_PI/8 : 0)); + bshape(shRoseFloor[1], PPR_FLOOR, (euclid?.9:1) * scalef * SCAP4(.85), 175, (nontruncated && a4 ? M_PI/8 : 0)); bshape(shTurtleFloor[0], PPR_FLOOR, (euclid?.9:1) * (sphere?.9*1.3: a4 ? 1.6 : S7==8 ? 1.3 : 1) * SCA46(1.4) * SCA47(1.4), 176); bshape(shTurtleFloor[1], PPR_FLOOR, (euclid?.9:1) * scalef * (a4?.9:1) * SCA47(1.3), 177, octroll - ROT47(.1)); - bshape(shTurtleFloor[2], PPR_FLOOR, sphere && purehepta ? .9 : 1, 178); // purehepta + bshape(shTurtleFloor[2], PPR_FLOOR, sphere && nontruncated ? .9 : 1, 178); // nontruncated bshape(shDragonFloor[0], PPR_FLOOR_DRAGON, (S7==8?1.3:1) * SCA4(1.6), 181, ffspin2); bshape(shDragonFloor[1], PPR_FLOOR_DRAGON, (sphere ? .9:1) * (S7==8?1.1:1) * SCA4(.9) * scalef, 182, octroll); bshape(shDragonFloor[2], PPR_FLOOR, scalef * 1.1, 183); @@ -1511,7 +1511,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 purehepta + bshape(shZebra[4], PPR_FLOOR, 1, 166); // for nontruncated bshape(shEmeraldFloor[0], PPR_FLOOR, scalef, 167); // 4 bshape(shEmeraldFloor[1], PPR_FLOOR, scalef, 168); // 12 bshape(shEmeraldFloor[2], PPR_FLOOR, scalef, 169); // 16 @@ -1525,9 +1525,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); // purehepta 7 - bshape(shTower[8], PPR_FLOOR_TOWER, 1, 204); // purehepta 11 - bshape(shTower[9], PPR_FLOOR_TOWER, 1, 205); // purehepta 15 + bshape(shTower[7], PPR_FLOOR_TOWER, 1, 203); // nontruncated 7 + bshape(shTower[8], PPR_FLOOR_TOWER, 1, 204); // nontruncated 11 + bshape(shTower[9], PPR_FLOOR_TOWER, 1, 205); // nontruncated 15 bshape(shTower[10], PPR_FLOOR_TOWER, scalef, 206); // Euclidean // structures & walls @@ -1560,17 +1560,17 @@ void buildpolys() { copyshape(shJoint, shDisk, PPR_ONTENTACLE); bshape(shTentHead, PPR_ONTENTACLE, scalef, 79); bshape(shWormHead, PPR_ONTENTACLE, scalef, 80); - if(purehepta) bshape(shDragonSegment, PPR_TENTACLE1, 1, 233); + if(nontruncated) 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(purehepta) bshape(shDragonTail, PPR_TENTACLE1, 1, 239); + if(nontruncated) 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(purehepta) bshape(shSeaTentacle, PPR_TENTACLE1, 1, 245); + if(nontruncated) bshape(shSeaTentacle, PPR_TENTACLE1, 1, 245); else bshape(shSeaTentacle, PPR_TENTACLE1, 1, 246); - ld ksc = purehepta ? 1.8 : 1.5; + ld ksc = nontruncated ? 1.8 : 1.5; bshape(shKrakenHead, PPR_ONTENTACLE, ksc, 247); bshape(shKrakenEye, PPR_ONTENTACLE_EYES, ksc, 248); bshape(shKrakenEye2, PPR_ONTENTACLE_EYES2, ksc, 249); @@ -1796,10 +1796,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(purehepta) bshape(shMagicSword, PPR_MAGICSWORD, 1, 243); + if(nontruncated) bshape(shMagicSword, PPR_MAGICSWORD, 1, 243); else bshape(shMagicSword, PPR_MAGICSWORD, 1, 244); - if(purehepta) bshape(shMagicShovel, PPR_MAGICSWORD, 1, 333); + if(nontruncated) bshape(shMagicShovel, PPR_MAGICSWORD, 1, 333); else bshape(shMagicShovel, PPR_MAGICSWORD, 1, 333); bshape(shBead0, 20, 1, 250); @@ -1933,7 +1933,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(purehepta || euclid || sphere) return c; + if(nontruncated || 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]; @@ -2994,19 +2994,19 @@ NEWSHAPE /* floors */ // need eswap -#define DESERTFLOOR (purehepta ? shCloudFloor : shDesertFloor)[ct6] -#define BUTTERFLYFLOOR (purehepta ? shFloor : shButterflyFloor)[ct6] -#define PALACEFLOOR (purehepta?shFloor:shPalaceFloor)[ct6] -#define SSTARFLOOR (purehepta ? shCloudFloor : shSStarFloor)[ct6] // untested -#define POWERFLOOR (purehepta ? shStarFloor : shPowerFloor)[ct6] // untested -#define CHARGEDFLOOR (purehepta ? shChargedFloor[3] : ct6 ? shFloor[1] : shChargedFloor[0]) // scale! +#define DESERTFLOOR (nontruncated ? shCloudFloor : shDesertFloor)[ct6] +#define BUTTERFLYFLOOR (nontruncated ? shFloor : shButterflyFloor)[ct6] +#define PALACEFLOOR (nontruncated?shFloor:shPalaceFloor)[ct6] +#define SSTARFLOOR (nontruncated ? shCloudFloor : shSStarFloor)[ct6] // untested +#define POWERFLOOR (nontruncated ? shStarFloor : shPowerFloor)[ct6] // untested +#define CHARGEDFLOOR (nontruncated ? shChargedFloor[3] : ct6 ? shFloor[1] : shChargedFloor[0]) // scale! #define DEMONFLOOR shDemonFloor[ct6] // untested -#define NEWFLOOR (purehepta ? shCloudFloor : shNewFloor)[ct6] // untested -#define CROSSFLOOR (purehepta ? shFloor : shCrossFloor)[ct6] // untested +#define NEWFLOOR (nontruncated ? shCloudFloor : shNewFloor)[ct6] // untested +#define CROSSFLOOR (nontruncated ? shFloor : shCrossFloor)[ct6] // untested #define TROLLFLOOR shTrollFloor[ct6] // tested? -#define BARROWFLOOR shBarrowFloor[euclid?0:purehepta?2:ct6] -#define LAVAFLOOR (purehepta ? shFloor : shLavaFloor)[ct6] -#define TRIFLOOR ((purehepta ? shFloor : shTriFloor)[ct6]) +#define BARROWFLOOR shBarrowFloor[euclid?0:nontruncated?2:ct6] +#define LAVAFLOOR (nontruncated ? shFloor : shLavaFloor)[ct6] +#define TRIFLOOR ((nontruncated ? shFloor : shTriFloor)[ct6]) #define TURTLEFLOOR shTurtleFloor[ct6] #define ROSEFLOOR shRoseFloor[ct6] diff --git a/rogueviz.cpp b/rogueviz.cpp index c85fc8a7..8b49ba10 100644 --- a/rogueviz.cpp +++ b/rogueviz.cpp @@ -547,7 +547,7 @@ namespace sag { } void initSnake(int n) { - if(sphere && purehepta) n = 12; + if(sphere && nontruncated) n = 12; else if(sphere) n = 32; numsnake = n; snakecells.resize(numsnake); @@ -1154,7 +1154,7 @@ void drawVertex(const transmatrix &V, cell *c, shmup::monster *m) { } hyperpoint h = tC0(V * m->at); - transmatrix V2 = rgpushxto0(h) * ypush(purehepta ? .3 : .2); + transmatrix V2 = rgpushxto0(h) * ypush(nontruncated ? .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; } @@ -1797,7 +1797,7 @@ using namespace tour; string cname() { if(euclid) return "coord-6.txt"; - if(purehepta) return "coord-7.txt"; + if(nontruncated) return "coord-7.txt"; return "coord-67.txt"; } diff --git a/scores.cpp b/scores.cpp index 44d0b6a2..594b6124 100644 --- a/scores.cpp +++ b/scores.cpp @@ -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] != purehepta) diff += 16; + if(S->box[186] != nontruncated) diff += 16; if(S->box[196] != chaosmode) diff += 32; if(S->box[119] != shmup::on) diff += 64; if(pureHardcore() && !isHardcore(S)) diff += 128; diff --git a/shmup.cpp b/shmup.cpp index ac83b61f..8adcdce1 100644 --- a/shmup.cpp +++ b/shmup.cpp @@ -3410,7 +3410,7 @@ transmatrix &ggmatrix(cell *c) { else { t = View * spin(viewctr.spin * 2 * M_PI / S7) * calc_relative_matrix(c, viewctr.h); - if(purehepta) t = t * pispin; + if(nontruncated) t = t * pispin; } } return t; @@ -3420,7 +3420,7 @@ transmatrix calc_relative_matrix_help(cell *c, heptagon *h1) { transmatrix gm = Id; heptagon *h2 = c->master; transmatrix where = Id; - if(!purehepta) for(int d=0; d<7; d++) if(h2->c7->mov[d] == c) + if(!nontruncated) for(int d=0; d<7; d++) if(h2->c7->mov[d] == c) where = hexmove[d]; // always add to last! while(h1 != h2) { @@ -3489,8 +3489,8 @@ void virtualRebase(cell*& base, transmatrix& at, bool tohex) { hs.h = h; hs.spin = d; heptspin hs2 = hsstep(hs, 0); - transmatrix V2 = spin((purehepta?M_PI:0)-hs2.spin*2*M_PI/7) * invheptmove[d]; - if(purehepta) V2 = V2 * spin(M_PI); + transmatrix V2 = spin((nontruncated?M_PI:0)-hs2.spin*2*M_PI/7) * invheptmove[d]; + if(nontruncated) V2 = V2 * spin(M_PI); double newz = (V2 * at * C0) [2]; if(newz < currz) { currz = newz; @@ -3500,7 +3500,7 @@ void virtualRebase(cell*& base, transmatrix& at, bool tohex) { } if(!newbase) { - if(tohex && !purehepta) for(int d=0; d<7; d++) { + if(tohex && !nontruncated) for(int d=0; d<7; d++) { cell *c = createMov(base, d); transmatrix V2 = spin(-base->spn(d)*2*M_PI/6) * invhexmove[d]; double newz = (V2 *at * C0) [2]; diff --git a/system.cpp b/system.cpp index 66b0443f..22c44d7c 100644 --- a/system.cpp +++ b/system.cpp @@ -110,7 +110,7 @@ void initgame() { if(firstland == laElementalWall) cwt.c->land = randomElementalLand(); if(tactic::on && (isGravityLand(firstland) || firstland == laOcean) && firstland != laMountain) - cwt.c->land = purehepta ? laCrossroads : laCrossroads2; + cwt.c->land = nontruncated ? laCrossroads : laCrossroads2; createMov(cwt.c, 0); setdist(cwt.c, BARLEV, NULL); @@ -541,7 +541,7 @@ void applyBoxes() { applyBoxBool(survivalist); if(loadingHi) applyBoxI(itLotus); else applyBoxNum(truelotus, "lotus/escape"); - applyBoxBool(purehepta, "heptagons only"); + applyBoxBool(nontruncated, "heptagons only"); applyBoxI(itRose); applyBoxOrb(itOrbBeauty); applyBoxI(itCoral); @@ -662,7 +662,7 @@ void loadBoxHigh() { dynamicval sp2(geometry, (eGeometry) savebox[116]); dynamicval sp3(shmup::on, savebox[119]); dynamicval sp4(chaosmode, savebox[196]); - dynamicval sp5(purehepta, savebox[186]); + dynamicval sp5(nontruncated, savebox[186]); if(savebox[238]) geometry = gSphere; if(savebox[239]) geometry = gElliptic; @@ -798,7 +798,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(purehepta) fprintf(f, "Heptagons only mode\n"); + if(nontruncated) 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"); @@ -989,7 +989,7 @@ namespace gamestack { gdn.View = View; gdn.geometry = geometry; gdn.shmup = shmup::on; - gdn.hepta = purehepta; + gdn.hepta = nontruncated; gd.push_back(gdn); } @@ -1000,7 +1000,7 @@ namespace gamestack { viewctr = gdn.viewctr; View = gdn.View; geometry = gdn.geometry; - purehepta = gdn.hepta; + nontruncated = gdn.hepta; if(shmup::on) shmup::clearMonsters(); shmup::on = gdn.shmup; resetGeometry(); @@ -1082,7 +1082,7 @@ void restartGame(char switchWhat, bool push) { if(switchWhat == 'T') { geometry = gNormal; yendor::on = tactic::on = princess::challenge = peace::on = inv::on = false; - chaosmode = purehepta = randomPatternsMode = false; + chaosmode = nontruncated = randomPatternsMode = false; shmup::on = false; resetGeometry(); tour::on = !tour::on; @@ -1090,14 +1090,14 @@ void restartGame(char switchWhat, bool push) { #endif if(switchWhat == '7') { if(euclid) geometry = gNormal; - purehepta = !purehepta; + nontruncated = !nontruncated; resetGeometry(); } if(switchWhat == 'g') { if(geometry == targetgeometry) geometry = gNormal; else geometry = targetgeometry; if(chaosmode && (euclid || sphere || quotient)) chaosmode = false; - if(purehepta && euclid) purehepta = false; + if(nontruncated && euclid) nontruncated = false; resetGeometry(); } if(switchWhat == 'y') { diff --git a/tour.cpp b/tour.cpp index 4b13e272..445064c5 100644 --- a/tour.cpp +++ b/tour.cpp @@ -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 || purehepta) { + if(geometry || nontruncated) { popGame(); if(!(flags & QUICKGEO)) return true; } @@ -91,7 +91,7 @@ bool handleKeyTour(int sym, int uni) { return true; } if(sym == SDLK_BACKSPACE) { - if(geometry || purehepta) { + if(geometry || nontruncated) { popGame(); if(!(flags & QUICKGEO)) return true; } @@ -141,7 +141,7 @@ bool handleKeyTour(int sym, int uni) { } } - if(geometry || purehepta) { + if(geometry || nontruncated) { popGame(); presentation(pmGeometryReset); return true; @@ -255,7 +255,7 @@ namespace ss { dialog::display(); keyhandler = [] (int sym, int uni) { if(uni >= 'a' && uni < 'a' + sssize) { - if(geometry || purehepta) { + if(geometry || nontruncated) { popGame(); presentation(pmGeometryReset); } diff --git a/yendor.cpp b/yendor.cpp index 42be989f..635e600a 100644 --- a/yendor.cpp +++ b/yendor.cpp @@ -825,12 +825,12 @@ int modecode() { else if(pureHardcore()) xcode ++; if(euclid) xcode += 6; - else if(purehepta) xcode += 3; + else if(nontruncated) xcode += 3; if(sphere) { xcode += 9; if(elliptic) xcode += 6; - if(purehepta) xcode += 3; + if(nontruncated) xcode += 3; } if(chaosmode) xcode += 21; @@ -865,7 +865,7 @@ void buildmodetable() { extern bool hardcore; hardcore = (b%3 == 1); shmup::on = (b%3 == 2); - purehepta = (b/3)%7 == 1 || (b/3)%7 == 4 || (b/3)%7 == 6; + nontruncated = (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; @@ -884,7 +884,7 @@ void buildmodetable() { if(hardcore) printf(" hardcore"); else if(shmup::on) printf(" shmup"); else printf(" softcore"); - if(purehepta) printf(" heptagonal"); + if(nontruncated) printf(" heptagonal"); if(euclid) printf(" euclidean"); else if(elliptic) printf(" elliptic"); else if(sphere) printf(" spherical");