From e39691c5cc6e28efc9dee3d46e7bb31118b4ad1d Mon Sep 17 00:00:00 2001 From: Geoffray Levasseur Date: Tue, 3 Nov 2026 11:50:50 +0100 Subject: [PATCH] add missing global declaration --- game/localplayer/ClientTools.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/game/localplayer/ClientTools.h b/game/localplayer/ClientTools.h index df6115d..8feaa4f 100644 --- a/game/localplayer/ClientTools.h +++ b/game/localplayer/ClientTools.h @@ -43,6 +43,24 @@ constexpr std::uint32_t OfferedResourceWeights[nOfferedResourceWeights] = { rwOff, rwMaxScience, rwForceScience, rwMaxGrowth, rwForceProd, rwMaxProd, }; +// TMapOption/TMapOptions: each enumerator is a BIT POSITION within the +// MapOptions bitset (not a sequential ordinal) - mirrors Pascal's `set of +// TMapOption` membership test via hasMapOption()/(1u << option). +enum MapOption { + moPolitical = 0, + moCityNames = 1, + moGreatWall = 4, + moGrid = 5, + moBareTerrain = 6, + moEditMode = 16, + moLocCodes = 17, +}; +using MapOptions = std::uint32_t; +inline bool hasMapOption(MapOptions options, MapOption option) +{ + return (options & (1u << option)) != 0; +} + using TImpOrder = std::array; using TEnhancementJobs = std::uint8_t[12][8]; // Pascal's `set of 0..39`; bit i set means "treat Server() result code i as