mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 13:07:16 +00:00
enabling canvas now automatically enables ls::single
This commit is contained in:
parent
e681357206
commit
056419288c
@ -119,7 +119,7 @@ void ensure_geometry(eGeometryClass c) {
|
||||
canvas_default_wall = waInvisibleFloor;
|
||||
patterns::whichCanvas = 'g';
|
||||
patterns::canvasback = 0xFFFFFF;
|
||||
firstland = specialland = laCanvas;
|
||||
enable_canvas();
|
||||
}
|
||||
start_game();
|
||||
}
|
||||
|
@ -1201,7 +1201,7 @@ EX void enable(archimedean_tiling& arct) {
|
||||
function<void()> setcanvas(char c) {
|
||||
return [c] () {
|
||||
stop_game();
|
||||
firstland = specialland = laCanvas;
|
||||
enable_canvas();
|
||||
patterns::whichCanvas = c;
|
||||
start_game();
|
||||
};
|
||||
|
@ -64,11 +64,11 @@ void launch(int seed, int elimit, int hlimit) {
|
||||
dual::enable();
|
||||
stop_game();
|
||||
dual::switch_to(0);
|
||||
specialland = firstland = laCanvas;
|
||||
enable_canvas();
|
||||
canvas_default_wall = waSea;
|
||||
pconf.scale = .5;
|
||||
dual::switch_to(1);
|
||||
specialland = firstland = laCanvas;
|
||||
enable_canvas();
|
||||
shrand(seed);
|
||||
start_game();
|
||||
in = true;
|
||||
|
@ -2374,7 +2374,7 @@ EX namespace mapeditor {
|
||||
if(sym == SDLK_F5) {
|
||||
dialog::push_confirm_dialog([] {
|
||||
stop_game();
|
||||
firstland = specialland = laCanvas;
|
||||
enable_canvas();
|
||||
canvas_default_wall = waInvisibleFloor;
|
||||
patterns::whichCanvas = 'g';
|
||||
patterns::canvasback = 0xFFFFFF;
|
||||
|
@ -977,7 +977,7 @@ EX void showStartMenu() {
|
||||
pushScreen(texture::showMenu);
|
||||
resetModes('c');
|
||||
stop_game();
|
||||
firstland = specialland = laCanvas;
|
||||
enable_canvas();
|
||||
cheater = true;
|
||||
patterns::canvasback = 0xFFFFFF;
|
||||
mapeditor::drawplayer = false;
|
||||
|
24
pattern2.cpp
24
pattern2.cpp
@ -17,6 +17,12 @@ enum cpatterntype {
|
||||
};
|
||||
#endif
|
||||
|
||||
EX void enable_canvas() {
|
||||
firstland = specialland = laCanvas;
|
||||
randomPatternsMode = false;
|
||||
land_structure = lsSingle;
|
||||
}
|
||||
|
||||
EX int ctof(cell *c) {
|
||||
#if CAP_IRR
|
||||
if(IRREGULAR) return irr::ctof(c);
|
||||
@ -2057,8 +2063,7 @@ EX namespace patterns {
|
||||
stop_game();
|
||||
whichCanvas = 'g';
|
||||
canvasback = c >> 8;
|
||||
firstland = specialland = laCanvas;
|
||||
randomPatternsMode = false;
|
||||
enable_canvas();
|
||||
start_game();
|
||||
}
|
||||
else {
|
||||
@ -2079,8 +2084,7 @@ EX namespace patterns {
|
||||
break;
|
||||
}
|
||||
if(instant) {
|
||||
firstland = specialland = laCanvas;
|
||||
randomPatternsMode = false;
|
||||
enable_canvas();
|
||||
start_game();
|
||||
}
|
||||
}
|
||||
@ -2115,8 +2119,7 @@ EX namespace patterns {
|
||||
if(instant) stop_game();
|
||||
whichCanvas = 'f';
|
||||
if(instant) {
|
||||
firstland = specialland = laCanvas;
|
||||
randomPatternsMode = false;
|
||||
enable_canvas();
|
||||
start_game();
|
||||
}
|
||||
};
|
||||
@ -2128,8 +2131,7 @@ EX namespace patterns {
|
||||
whichCanvas = uni;
|
||||
subcanvas = rand();
|
||||
if(instant) {
|
||||
firstland = specialland = laCanvas;
|
||||
randomPatternsMode = false;
|
||||
enable_canvas();
|
||||
start_game();
|
||||
}
|
||||
if(uni == 'r')
|
||||
@ -3107,7 +3109,7 @@ int read_pattern_args() {
|
||||
else if(argis("-canvas")) {
|
||||
PHASEFROM(2);
|
||||
stop_game();
|
||||
firstland = specialland = laCanvas;
|
||||
enable_canvas();
|
||||
shift();
|
||||
if(args() == "i") canvas_default_wall = waInvisibleFloor;
|
||||
else if(args().size() == 1) patterns::whichCanvas = args()[0];
|
||||
@ -3117,14 +3119,14 @@ int read_pattern_args() {
|
||||
else if(argis("-canvas-random")) {
|
||||
PHASEFROM(2);
|
||||
stop_game();
|
||||
firstland = specialland = laCanvas;
|
||||
enable_canvas();
|
||||
patterns::whichCanvas = 'r';
|
||||
shift(); patterns::rwalls = argi();
|
||||
}
|
||||
else if(argis("-cformula")) {
|
||||
PHASEFROM(2);
|
||||
stop_game();
|
||||
firstland = specialland = laCanvas;
|
||||
enable_canvas();
|
||||
patterns::whichCanvas = 'f';
|
||||
shift(); patterns::color_formula = args();
|
||||
}
|
||||
|
@ -899,11 +899,11 @@ void init(flagtype _vizflags) {
|
||||
#if !ISWEB
|
||||
mapeditor::drawplayer = false;
|
||||
stop_game();
|
||||
firstland = specialland = laCanvas;
|
||||
enable_canvas();
|
||||
restart_game(shmup::on ? rg::shmup : rg::nothing);
|
||||
#else
|
||||
stop_game();
|
||||
firstland = specialland = laCanvas;
|
||||
enable_canvas();
|
||||
restart_game(rg::nothing);
|
||||
#endif
|
||||
autocheat = true;
|
||||
|
@ -1326,7 +1326,7 @@ EX void showMenu() {
|
||||
pushScreen(patterns::showPrePattern);
|
||||
else {
|
||||
stop_game();
|
||||
firstland = specialland = laCanvas;
|
||||
enable_canvas();
|
||||
patterns::whichCanvas = 'g';
|
||||
patterns::canvasback = 0xFFFFFF;
|
||||
start_game();
|
||||
|
3
tour.cpp
3
tour.cpp
@ -110,6 +110,9 @@ EX void setCanvas(presmode mode, char canv) {
|
||||
slide_backup(patterns::whichCanvas, canv);
|
||||
slide_backup(firstland, laCanvas);
|
||||
slide_backup(specialland, laCanvas);
|
||||
slide_backup(land_structure);
|
||||
slide_backup(randomPatternsMode);
|
||||
enable_canvas();
|
||||
start_game();
|
||||
resetview();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user