mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-13 20:27:10 +00:00
generalized the slide backup template
This commit is contained in:
4
tour.cpp
4
tour.cpp
@@ -62,12 +62,14 @@ static const flagtype QUICKGEO=32;
|
|||||||
static const flagtype SIDESCREEN = 64;
|
static const flagtype SIDESCREEN = 64;
|
||||||
/** \brief When changing geometries, show the name of the slide, instead of the current land */
|
/** \brief When changing geometries, show the name of the slide, instead of the current land */
|
||||||
static const flagtype USE_SLIDE_NAME = 128;
|
static const flagtype USE_SLIDE_NAME = 128;
|
||||||
|
/** \brief do not display any help line */
|
||||||
|
static const flagtype NOTITLE = 256;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EX vector<reaction_t> restorers;
|
EX vector<reaction_t> restorers;
|
||||||
|
|
||||||
#if HDR
|
#if HDR
|
||||||
template<class T> void slide_backup(T& what, T value) {
|
template<class T, class U> void slide_backup(T& what, U value) {
|
||||||
T backup = what;
|
T backup = what;
|
||||||
restorers.push_back([&what, backup] { what = backup; });
|
restorers.push_back([&what, backup] { what = backup; });
|
||||||
what = value;
|
what = value;
|
||||||
|
|||||||
Reference in New Issue
Block a user