options -W3 and -top

This commit is contained in:
Zeno Rogue 2018-03-30 00:20:33 +02:00
parent 21a7c8fca9
commit eafd5a1eab
5 changed files with 26 additions and 4 deletions

View File

@ -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;

View File

@ -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)))

View File

@ -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();

View File

@ -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);
}

View File

@ -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();
}