aboutsummaryrefslogtreecommitdiff
path: root/src/feature.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/feature.h')
-rw-r--r--src/feature.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/feature.h b/src/feature.h
index aa3ab9d..af593cf 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -39,15 +39,19 @@
/*
* Declares that this feature should only be loaded for games matching the given
- * gametype tag (see gametype.h). Console variables and commands created using
- * DEF_FEAT_* macros will not be registered if SST is loaded by some other game.
- *
- * As an optimisation, REQUIRE_GAMEDATA() checks (see below) can also be elided
- * in cases where gamedata is always present for this particular game. As such,
- * it is wise to still specify gamedata dependencies correctly, so that the
- * definitions can be changed in the data files without breaking code.
+ * gametype tag. gametype.h must be included to use this as it defines the tag
+ * values. Console variables and commands created using DEF_FEAT_* macros will
+ * not be registered if SST is loaded by some other game.
+ *
+ * This also enables a build-time optimisation to elide REQUIRE_GAMEDATA()
+ * checks as well as has_* conditionals. As such, it is wise to still specify
+ * gamedata dependencies correctly, so that the definitions can be changed in
+ * the data files without breaking code.
*/
-#define GAMESPECIFIC(tag)
+#define GAMESPECIFIC(tag) \
+ /* impl note: see comment in gamedata.h */ \
+ __attribute((unused)) \
+ static const int _gamedata_feattags = _gametype_tag_##tag;
/*
* Indicates that the specified feature is required for this feature to