mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 13:07:16 +00:00
added missing CAP_COMMANDLINE guards, and other fixes for non-CAP_COMMANDLINE
This commit is contained in:
parent
83070fe50c
commit
334bf12292
@ -865,8 +865,10 @@ EX namespace bt {
|
||||
ld co = vid.binary_width / log(2) / 8;
|
||||
return point3(log(2) + log(-h[0]), h[1] / co, h[2] / co);
|
||||
}
|
||||
|
||||
|
||||
#if CAP_COMMANDLINE
|
||||
auto bt_config = arg::add2("-btwidth", [] {arg::shift_arg_formula(vid.binary_width); });
|
||||
#endif
|
||||
|
||||
EX bool pseudohept(cell *c) {
|
||||
if(WDIM == 2)
|
||||
|
@ -428,9 +428,9 @@ EX }
|
||||
|
||||
#if !CAP_COMMANDLINE
|
||||
EX namespace arg {
|
||||
EX int add1(const string& s, const reaction_t& r) { }
|
||||
EX int add2(const string& s, const reaction_t& r) { }
|
||||
EX int add3(const string& s, const reaction_t& r) { }
|
||||
EX int add1(const string& s, const reaction_t& r) { return 0; }
|
||||
EX int add2(const string& s, const reaction_t& r) { return 0; }
|
||||
EX int add3(const string& s, const reaction_t& r) { return 0; }
|
||||
EX }
|
||||
#endif
|
||||
}
|
||||
|
@ -238,6 +238,7 @@ EX modecode_t legacy_modecode() {
|
||||
return mct;
|
||||
}
|
||||
|
||||
#if CAP_COMMANDLINE
|
||||
/* legacy options */
|
||||
int read_legacy_args() {
|
||||
using namespace arg;
|
||||
@ -272,6 +273,7 @@ int read_legacy_args() {
|
||||
}
|
||||
|
||||
auto ah_legacy = addHook(hooks_args, 0, read_legacy_args);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
@ -1807,7 +1807,7 @@ auto animhook = addHook(hooks_frame, 100, display_animation)
|
||||
#if CAP_COMMANDLINE
|
||||
+ addHook(hooks_args, 100, readArgs)
|
||||
#endif
|
||||
+ addHook(hooks_config, 100, [] {
|
||||
+ addHook(hooks_configfile, 100, [] {
|
||||
#if CAP_CONFIG
|
||||
param_f(anims::period, "aperiod", "animation period");
|
||||
addsaver(anims::noframes, "animation frames");
|
||||
|
Loading…
Reference in New Issue
Block a user