From eafd5a1eabea2535a8fdc3152059ea12a1e36fc2 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 30 Mar 2018 00:20:33 +0200 Subject: [PATCH] options -W3 and -top --- barriers.cpp | 7 +++++-- bigstuff.cpp | 6 +++++- commandline.cpp | 7 +++++++ surface.cpp | 6 ++++++ system.cpp | 4 +++- 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/barriers.cpp b/barriers.cpp index 687e3b05..c79ec494 100644 --- a/barriers.cpp +++ b/barriers.cpp @@ -607,13 +607,12 @@ bool buildBarrier4(cell *c, int d, int mode, eLand ll, eLand lr) { return true; } -void buildBarrierStrong(cell *c, int d, bool oldleft) { +void buildBarrierStrong(cell *c, int d, bool oldleft, eLand newland) { d %= 7; cellwalker bb(c, d); c->bardir = d; eLand oldland = c->land; - eLand newland = getNewLand(oldland); landcount[newland]++; if(oldleft) c->barleft = oldland, c->barright = newland; @@ -621,6 +620,10 @@ void buildBarrierStrong(cell *c, int d, bool oldleft) { extendcheck(bb.c); } +void buildBarrierStrong(cell *c, int d, bool oldleft) { + buildBarrierStrong(c, d, oldleft, getNewLand(c->land)); + } + void buildCrossroads2(cell *c) { if(buggyGeneration) return; diff --git a/bigstuff.cpp b/bigstuff.cpp index 24aa3bb9..eb75638e 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -985,7 +985,11 @@ void buildBigStuff(cell *c, cell *from) { // buildgreatwalls - if(celldist(c) < 3) ; + if(celldist(c) < 3) { + if(c == cwt.c->master->move[3]->c7 && top_land) { + buildBarrierStrong(c, 6, true, top_land); + } + } else if(chaosmode) { if(ctof(c) && hrand(10000) < 9000 && c->land && !inmirror(c) && buildBarrierNowall(c, getNewLand(c->land))) diff --git a/commandline.cpp b/commandline.cpp index 58952bfb..6d899922 100644 --- a/commandline.cpp +++ b/commandline.cpp @@ -163,6 +163,13 @@ int arg::readCommon() { shift(); cheatdest = readland(args()); autocheat = true; showstartmenu = false; } + else if(argis("-W3")) { + shift(); top_land = readland(args()); autocheat = true; + showstartmenu = false; + } + else if(argis("-top")) { + PHASE(3); View = View * spin(-M_PI/2); + } else if(argis("-W") && curphase <= 2) { PHASE(2); shift(); diff --git a/surface.cpp b/surface.cpp index 89759f99..99850650 100644 --- a/surface.cpp +++ b/surface.cpp @@ -777,11 +777,13 @@ int surface_args() { if(0) ; else if(argis("-kuen")) { + PHASE(3); calcparam(); run_shape(dsKuen); } else if(argis("-dini")) { + PHASE(3); calcparam(); shift(); dini_b = argf(); @@ -789,6 +791,7 @@ int surface_args() { } else if(argis("-barrel")) { + PHASE(3); calcparam(); shift(); hyper_b = argf(); @@ -796,16 +799,19 @@ int surface_args() { } else if(argis("-tractricoid")) { + PHASE(3); calcparam(); run_shape(dsTractricoid); } else if(argis("-hemi")) { + PHASE(3); calcparam(); run_shape(dsHemisphere); } else if(argis("-hyperb")) { + PHASE(3); calcparam(); run_shape(dsHyperboloid); } diff --git a/system.cpp b/system.cpp index f73194dd..4abe4c45 100644 --- a/system.cpp +++ b/system.cpp @@ -15,6 +15,8 @@ bool timerstopped; int savecount; bool showoff = false, doCross = false; +eLand top_land; + bool verless(string v, string cmp) { if(isdigit(v[0]) && isdigit(v[1])) v = "A" + v; @@ -176,7 +178,7 @@ void initgame() { if(tactic::trailer && cwt.c->land != laClearing) safety = trailer_safety; setdist(cwt.c, i, NULL); if(tactic::trailer) safety = false; - + currentmap->verify(); }