added missing CAP_COMMANDLINE guards

This commit is contained in:
Zeno Rogue 2020-04-06 08:38:05 +02:00
parent 9a84dfb497
commit 1b9cdab98c
5 changed files with 12 additions and 2 deletions

View File

@ -557,6 +557,7 @@ EX void viewall() {
}
}
#if CAP_COMMANDLINE
/** perform a move for the -cmove command */
int cheat_move_gen = 7;
@ -582,6 +583,7 @@ void cheat_move(char c) {
else if(c == 'g') cheat_move_gen = -1;
else println(hlog, "unknown move command: ", c);
}
#endif
/** launch a debugging screen, and continue normal working only after this screen is closed */
EX void modalDebug(cell *c) {

View File

@ -234,6 +234,7 @@ EX void show_menu() {
dialog::display();
}
#if CAP_COMMANDLINE
auto sbhook = addHook(hooks_args, 100, [] {
using namespace arg;
@ -261,6 +262,7 @@ auto sbhook = addHook(hooks_args, 100, [] {
if(in) return named_dialog(XLAT("select a puzzle"), show_menu);
else return named_functionality();
});
#endif
EX }
}

View File

@ -1301,6 +1301,7 @@ int hk =
discoveries.clear();
})
#endif
#if CAP_COMMANDLINE
+ addHook(hooks_args, 0, [] {
using namespace arg;
if(0) ;
@ -1309,7 +1310,9 @@ int hk =
else if(argis("-q3-limitv")) { shift(); limitv = argi(); }
else return 1;
return 0;
});
})
#endif
+ 0;
EX purehookset on_geometry_change;

View File

@ -2065,6 +2065,7 @@ EX namespace nisot {
return NULL;
}
#if CAP_COMMANDLINE
auto config = addHook(hooks_args, 0, [] () {
using namespace arg;
#if CAP_SOLV
@ -2161,7 +2162,7 @@ EX namespace nisot {
}
return 1;
});
#endif
}
}

View File

@ -266,6 +266,7 @@ EX void wfc_menu() {
dialog::display();
}
#if CAP_COMMANDLINE
auto wfc_hook =
// addHook(hooks_handleKey, 100, wfc_handleKey) +
addHook(hooks_args, 100, [] {
@ -285,6 +286,7 @@ auto wfc_hook =
else return 1;
return 0;
});
#endif
auto cgm = addHook(clearmemory, 40, [] () { centers.clear(); }) + addHook(hooks_removecells, 0, [] () { eliminate_if(centers, is_cell_removed); });