1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-15 14:27:37 +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

@@ -63,6 +63,14 @@
#define ISMINI 0
#endif
#ifndef CAP_NCONF
#define CAP_NCONF 0
#endif
#ifndef CAP_DRAW
#define CAP_DRAW 0
#endif
#ifndef CAP_XGD
#define CAP_XGD (ISANDROID || ISFAKEMOBILE)
#endif
@@ -85,6 +93,10 @@
#define NOLICENSE ISSTEAM
#endif
#ifndef CAP_VERTEXBUFFER
#define CAP_VERTEXBUFFER (ISWEB)
#endif
#ifndef CAP_SHADER
#define CAP_SHADER CAP_GL
#endif
@@ -153,6 +165,10 @@
#define CAP_SURFACE CAP_RUG
#endif
#ifndef CAP_KUEN_MAP
#define CAP_KUEN_MAP 0
#endif
#ifndef CAP_EDIT
#define CAP_EDIT (CAP_FILES && !ISWEB && !ISMINI)
#endif
@@ -197,6 +213,10 @@
#define CAP_ROGUEVIZ 0
#endif
#ifndef CAP_RVSLIDES
#define CAP_RVSLIDES (CAP_TOUR && !ISWEB)
#endif
#ifndef CAP_PROFILING
#define CAP_PROFILING 0
#endif
@@ -210,7 +230,7 @@
#endif
#ifndef CAP_ORIENTATION
#define CAP_ORIENTATION ISMOBILE
#define CAP_ORIENTATION (ISMOBILE || ISWEB)
#endif
#ifndef CAP_MOUSEGRAB