mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 22:39:53 +00:00
canvas_invisible option
This commit is contained in:
parent
9b95ad23c5
commit
ad93e77bcc
@ -109,8 +109,10 @@ int arg::readCommon() {
|
|||||||
PHASE(2);
|
PHASE(2);
|
||||||
firstland = specialland = laCanvas;
|
firstland = specialland = laCanvas;
|
||||||
shift();
|
shift();
|
||||||
if(args().size() == 1) patterns::whichCanvas = args()[0];
|
if(args() == "i") canvas_invisible = !canvas_invisible;
|
||||||
|
else if(args().size() == 1) patterns::whichCanvas = args()[0];
|
||||||
else patterns::canvasback = arghex();
|
else patterns::canvasback = arghex();
|
||||||
|
if(curphase == 3) restartGame();
|
||||||
}
|
}
|
||||||
else if(argis("-noplayer"))
|
else if(argis("-noplayer"))
|
||||||
mapeditor::drawplayer = !mapeditor::drawplayer;
|
mapeditor::drawplayer = !mapeditor::drawplayer;
|
||||||
|
1
hyper.h
1
hyper.h
@ -3264,3 +3264,4 @@ ld master_to_c7_angle();
|
|||||||
|
|
||||||
extern int mutantphase;
|
extern int mutantphase;
|
||||||
void resize_screen_to(int x, int y);
|
void resize_screen_to(int x, int y);
|
||||||
|
extern bool canvas_invisible;
|
||||||
|
@ -2343,6 +2343,8 @@ void setdist(cell *c, int d, cell *from) {
|
|||||||
|
|
||||||
if(d == BARLEV && c->land == laCanvas) {
|
if(d == BARLEV && c->land == laCanvas) {
|
||||||
c->landparam = patterns::generateCanvas(c);
|
c->landparam = patterns::generateCanvas(c);
|
||||||
|
if(canvas_invisible)
|
||||||
|
c->wall = waInvisibleFloor;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(d >= BARLEV-1 && c->land == laPrairie)
|
if(d >= BARLEV-1 && c->land == laPrairie)
|
||||||
|
@ -1283,6 +1283,9 @@ namespace patterns {
|
|||||||
dialog::addSelItem(XLAT("field pattern S"), "field", 'S');
|
dialog::addSelItem(XLAT("field pattern S"), "field", 'S');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dialog::addBreak(100);
|
||||||
|
dialog::addBoolItem(XLATN(winf[waInvisibleFloor].name), canvas_invisible, 'i');
|
||||||
|
|
||||||
dialog::display();
|
dialog::display();
|
||||||
|
|
||||||
keyhandler = [] (int sym, int uni) {
|
keyhandler = [] (int sym, int uni) {
|
||||||
@ -1301,6 +1304,12 @@ namespace patterns {
|
|||||||
restartGame(0, false, true);
|
restartGame(0, false, true);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
else if(uni == 'i') {
|
||||||
|
canvas_invisible = !canvas_invisible;
|
||||||
|
firstland = specialland = laCanvas;
|
||||||
|
randomPatternsMode = false;
|
||||||
|
restartGame(0, false, true);
|
||||||
|
}
|
||||||
else if((uni >= 'a' && uni <= 'z') || (uni >= 'A' && uni <= 'Z')) {
|
else if((uni >= 'a' && uni <= 'z') || (uni >= 'A' && uni <= 'Z')) {
|
||||||
whichCanvas = uni;
|
whichCanvas = uni;
|
||||||
subcanvas = rand();
|
subcanvas = rand();
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
bool cblind;
|
bool cblind;
|
||||||
bool autocheat;
|
bool autocheat;
|
||||||
|
bool canvas_invisible;
|
||||||
|
|
||||||
int truelotus;
|
int truelotus;
|
||||||
int gamecount;
|
int gamecount;
|
||||||
|
Loading…
Reference in New Issue
Block a user