diff options
Diffstat (limited to 'crawl-ref/source/main.cc')
-rw-r--r-- | crawl-ref/source/main.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc index 9a46737ce1..7de3206765 100644 --- a/crawl-ref/source/main.cc +++ b/crawl-ref/source/main.cc @@ -4588,6 +4588,12 @@ static void _compile_time_asserts() // item.special, so make sure they don't overlap. COMPILE_CHECK((int) NUM_SPECIAL_WEAPONS < (int) UNRAND_START, c10); + // We have space for 32 brands in the bitfield. + COMPILE_CHECK((int) SP_UNKNOWN_BRAND < 8*sizeof(you.seen_weapon[0]), c11); + COMPILE_CHECK((int) SP_UNKNOWN_BRAND < 8*sizeof(you.seen_armour[0]), c12); + COMPILE_CHECK(NUM_SPECIAL_WEAPONS <= SP_UNKNOWN_BRAND, c13); + COMPILE_CHECK(NUM_SPECIAL_ARMOURS <= SP_UNKNOWN_BRAND, c14); + // Also some runtime stuff; I don't know if the order of branches[] // needs to match the enum, but it currently does. for (int i = 0; i < NUM_BRANCHES; ++i) |