summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/main.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-01-04 13:31:34 +0100
committerAdam Borowski <kilobyte@angband.pl>2010-01-04 13:34:04 +0100
commit351147f56190d73b347c906e6ab30ddf30387a68 (patch)
treeffbf967d96fdb76ca17e5c8ee728f7400d888105 /crawl-ref/source/main.cc
parent21e755bcfd70b2683ada62dfdb6cd67695db0f7a (diff)
downloadcrawl-ref-351147f56190d73b347c906e6ab30ddf30387a68.tar.gz
crawl-ref-351147f56190d73b347c906e6ab30ddf30387a68.zip
Track all seen weapon/armour base types and their brands, for acq purposes.
Diffstat (limited to 'crawl-ref/source/main.cc')
-rw-r--r--crawl-ref/source/main.cc6
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)