diff options
| author | 2025-10-11 03:09:35 +0100 | |
|---|---|---|
| committer | 2025-10-11 03:13:18 +0100 | |
| commit | 74f1309af5310fbfa346048f8ecfc7fe1e8a4571 (patch) | |
| tree | f2c8eb715e0caea090fb69abfeaeee1ca55d6d8a /src/gamedata.h | |
| parent | b447f5879d0c4c49d72f167ed2cf0f1e44a52123 (diff) | |
| download | sst-74f1309af5310fbfa346048f8ecfc7fe1e8a4571.tar.gz sst-74f1309af5310fbfa346048f8ecfc7fe1e8a4571.zip | |
Improve gamedata codegen and fix spurious cases
The old GAMESPECIFIC mechanism had worked in practice but was
technically a little bit incorrect, oops.
Diffstat (limited to 'src/gamedata.h')
| -rw-r--r-- | src/gamedata.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gamedata.h b/src/gamedata.h index 7d91373..c14c83c 100644 --- a/src/gamedata.h +++ b/src/gamedata.h @@ -17,6 +17,15 @@ #ifndef INC_GAMEDATA_H #define INC_GAMEDATA_H +#include "gametype.h" + +// this defaults to zero (tentative definition), but gets defined to a value by +// GAMESPECIFIC() in feature.h. static const int variables get constant-folded +// even in -O0. so, this lets us short-circuit has_ checks inside features. +// we also check if a gamedata entry's +__attribute((unused)) +static const int _gamedata_feattags; + // STUPID HACK to avoid pollution if abi.h not already included (only because // generated gamedata stuff relies on this being defined) #ifndef NVDTOR |
