mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
factored enable_canvas_backup
This commit is contained in:
parent
8e094e93a5
commit
8a58604371
12
tour.cpp
12
tour.cpp
@ -108,16 +108,20 @@ EX void slide_action(presmode mode, char key, string text, reaction_t act) {
|
||||
help_extensions.push_back(help_extension{key, text, act});
|
||||
}
|
||||
|
||||
/** \brief an auxiliary function to enable a visualization in the Canvas land */
|
||||
EX void setCanvas(presmode mode, char canv) {
|
||||
if(mode == pmStart) {
|
||||
gamestack::push();
|
||||
EX void enable_canvas_backup(char canv) {
|
||||
slide_backup(patterns::whichCanvas, canv);
|
||||
slide_backup(firstland, laCanvas);
|
||||
slide_backup(specialland, laCanvas);
|
||||
slide_backup(land_structure);
|
||||
slide_backup(randomPatternsMode);
|
||||
enable_canvas();
|
||||
}
|
||||
|
||||
/** \brief an auxiliary function to enable a visualization in the Canvas land */
|
||||
EX void setCanvas(presmode mode, char canv) {
|
||||
if(mode == pmStart) {
|
||||
gamestack::push();
|
||||
enable_canvas_backup(canv);
|
||||
start_game();
|
||||
resetview();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user