1
0
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:
Zeno Rogue 2022-07-23 16:33:11 +02:00
parent 8e094e93a5
commit 8a58604371

View File

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