1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

added some missing guards

This commit is contained in:
Zeno Rogue 2021-02-07 20:42:09 +01:00
parent 1307790d46
commit e4fd468d8d
2 changed files with 6 additions and 0 deletions

View File

@ -234,6 +234,7 @@ int read_args() {
auto ah = addHook(hooks_args, 0, read_args); auto ah = addHook(hooks_args, 0, read_args);
#endif #endif
auto ah2 = addHook(hooks_configfile, 100, [] { auto ah2 = addHook(hooks_configfile, 100, [] {
#if CAP_CONFIG
addsaver(shot::shotx, "shotx"); addsaver(shot::shotx, "shotx");
addsaver(shot::shoty, "shoty"); addsaver(shot::shoty, "shoty");
addsaverenum(shot::format, "shotsvg"); addsaverenum(shot::format, "shotsvg");
@ -241,6 +242,7 @@ auto ah2 = addHook(hooks_configfile, 100, [] {
param_f(shot::gamma, "shotgamma"); param_f(shot::gamma, "shotgamma");
addsaver(shot::caption, "shotcaption"); addsaver(shot::caption, "shotcaption");
param_f(shot::fade, "shotfade"); param_f(shot::fade, "shotfade");
#endif
}); });
#endif #endif
@ -1778,6 +1780,7 @@ auto animhook = addHook(hooks_frame, 100, display_animation)
+ addHook(hooks_args, 100, readArgs) + addHook(hooks_args, 100, readArgs)
#endif #endif
+ addHook(hooks_config, 100, [] { + addHook(hooks_config, 100, [] {
#if CAP_CONFIG
param_f(anims::period, "aperiod", "animation period"); param_f(anims::period, "aperiod", "animation period");
addsaver(anims::noframes, "animation frames"); addsaver(anims::noframes, "animation frames");
param_f(anims::cycle_length, "acycle", "animation cycle length"); param_f(anims::cycle_length, "acycle", "animation cycle length");
@ -1790,6 +1793,7 @@ auto animhook = addHook(hooks_frame, 100, display_animation)
addsaver(anims::rug_shift_angle, "rug forward shift angle", 0); addsaver(anims::rug_shift_angle, "rug forward shift angle", 0);
addsaver(anims::a, "a", 0); addsaver(anims::a, "a", 0);
addsaver(anims::b, "b", 0); addsaver(anims::b, "b", 0);
#endif
}); });
EX bool any_animation() { EX bool any_animation() {

2
vr.cpp
View File

@ -1144,6 +1144,7 @@ EX void show_vr_demos() {
popScreenAll(); popScreenAll();
}); });
#if CAP_RUG
dialog::addItem("Hypersian Rug", 'c'); dialog::addItem("Hypersian Rug", 'c');
dialog::add_action([] { dialog::add_action([] {
if(rug::rugged) rug::close(); if(rug::rugged) rug::close();
@ -1165,6 +1166,7 @@ EX void show_vr_demos() {
rug::init(); rug::init();
popScreenAll(); popScreenAll();
}); });
#endif
dialog::addItem("sphere from the inside", 'd'); dialog::addItem("sphere from the inside", 'd');
dialog::add_action([] { dialog::add_action([] {