1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-04-28 03:21:23 +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:
Arthur O'Dwyer
2020-05-03 14:56:41 -04:00
parent f56e0fe2e3
commit f2b7746c1b
23 changed files with 64 additions and 67 deletions

View File

@@ -230,7 +230,7 @@ EX void showMainMenu() {
dialog::addItem(XLAT(inSpecialMode() ? "reset special modes" : "back to the start menu"), 'R');
string q;
#if ISMOBILE==1
#if ISMOBILE
dialog::addItem(XLAT("visit the website"), 'q');
#else
q = quitsaves() ? "save" : "quit";
@@ -248,7 +248,7 @@ EX void showMainMenu() {
if(inv::on)
dialog::addItem(XLAT("inventory"), 'i');
#if ISMOBILE==1
#if ISMOBILE
#if CAP_ACHIEVE
dialog::addItem(XLAT("leaderboards/achievements"), '3');
#endif
@@ -305,7 +305,7 @@ EX void showMainMenu() {
#endif
else if(sym == SDLK_ESCAPE)
showMissionScreen();
#if ISMOBILE==1
#if ISMOBILE
#ifdef HAVE_ACHIEVEMENTS
else if(NUMBERKEY == '3') {
achievement_final(false);
@@ -382,7 +382,7 @@ EX void enable_cheat() {
else if(!cheater) dialog::cheat_if_confirmed([] {
cheater++;
addMessage(XLAT("You activate your demonic powers!"));
#if ISMOBILE==0
#if !ISMOBILE
addMessage(XLAT("Shift+F, Shift+O, Shift+T, Shift+L, Shift+U, etc."));
#endif
popScreen();