mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-13 04:13:03 +00:00
Move all defaulting-of-CAP_FOO to sysconfig.h.
- The phrase `#ifdef CAP_` should never appear anywhere.
- The phrase `#ifndef CAP_` should appear only in sysconfig.h.
- The phrases `#if CAP_` and `#if !CAP_` may appear wherever,
as long as "sysconfig.h" is included first.
The rules for `CAP_FOO` equally apply to `ISFOO`.
There are many one-off macros still tested with `#ifdef`,
including `HAVE_ACHIEVEMENTS`, `PRINT_ACHIEVEMENTS`,
`FAKEWEB`, `FAKE_SDL`, `EASY`, and `WHATEVER`. I don't
have much grasp on what these are used for or how they're
configured, so I'm leaving them alone.
This commit is contained in:
18
config.cpp
18
config.cpp
@@ -800,7 +800,7 @@ EX void saveConfig() {
|
||||
fprintf(f, "%s=%s\n", s->name.c_str(), s->save().c_str());
|
||||
|
||||
fclose(f);
|
||||
#if ISMOBILE==0
|
||||
#if !ISMOBILE
|
||||
addMessage(s0 + "Configuration saved to: " + conffile);
|
||||
#else
|
||||
addMessage(s0 + "Configuration saved");
|
||||
@@ -1642,12 +1642,12 @@ EX void show3D() {
|
||||
gamescreen(0);
|
||||
dialog::init(XLAT("3D configuration"));
|
||||
|
||||
#if MAXMDIM >= 4
|
||||
#if MAXMDIM >= 4
|
||||
if(WDIM == 2) {
|
||||
dialog::addBoolItem(XLAT("use the full 3D models"), vid.always3, 'U');
|
||||
dialog::add_action(geom3::switch_always3);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
if(vid.use_smart_range == 0 && GDIM == 2) {
|
||||
dialog::addSelItem(XLAT("High detail range"), fts(vid.highdetail), 'n');
|
||||
dialog::addSelItem(XLAT("Mid detail range"), fts(vid.middetail), 'm');
|
||||
@@ -1749,12 +1749,12 @@ EX void show3D() {
|
||||
dialog::add_action(geom3::switch_tpp);
|
||||
}
|
||||
|
||||
#if MAXMDIM >=4
|
||||
#if MAXMDIM >=4
|
||||
if(WDIM == 2) {
|
||||
dialog::addBoolItem(XLAT("configure FPP automatically"), GDIM == 3, 'F');
|
||||
dialog::add_action(geom3::switch_fpp);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if(0);
|
||||
#if CAP_RUG
|
||||
@@ -2422,22 +2422,22 @@ EX int read_config_args() {
|
||||
PHASEFROM(2);
|
||||
nomenukey = true;
|
||||
}
|
||||
#if MAXMDIM >= 4
|
||||
#if MAXMDIM >= 4
|
||||
else if(argis("-switch-fpp")) {
|
||||
PHASEFROM(2);
|
||||
geom3::switch_fpp();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
else if(argis("-switch-tpp")) {
|
||||
PHASEFROM(2);
|
||||
geom3::switch_tpp();
|
||||
}
|
||||
#if MAXMDIM >= 4
|
||||
#if MAXMDIM >= 4
|
||||
else if(argis("-switch-3d")) {
|
||||
PHASEFROM(2);
|
||||
geom3::switch_always3();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
else if(argis("-nohelp")) {
|
||||
PHASEFROM(2);
|
||||
nohelp = true;
|
||||
|
||||
Reference in New Issue
Block a user