summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/arena.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-04-09 03:20:40 +0200
committerAdam Borowski <kilobyte@angband.pl>2013-04-09 11:02:10 +0200
commit8bf01c43c17c1111a580daa0e3906cae1cccef6a (patch)
tree4dac3070de755a493361e782829304da26d26531 /crawl-ref/source/arena.cc
parent441f6435328c8c2e68de689e1a4c7dc687a0760c (diff)
downloadcrawl-ref-8bf01c43c17c1111a580daa0e3906cae1cccef6a.tar.gz
crawl-ref-8bf01c43c17c1111a580daa0e3906cae1cccef6a.zip
Use FixedBitArray instead of large arrays of bools.
The only cost is having assignments be a function, as you can't overload operator[] to have separate bits be lvalues.
Diffstat (limited to 'crawl-ref/source/arena.cc')
-rw-r--r--crawl-ref/source/arena.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/arena.cc b/crawl-ref/source/arena.cc
index 6100ac4567..1f861e7b25 100644
--- a/crawl-ref/source/arena.cc
+++ b/crawl-ref/source/arena.cc
@@ -411,7 +411,7 @@ namespace arena
for (int i = 0; i < MAX_MONSTERS; i++)
to_respawn[i] = -1;
- unwind_var< FixedVector<bool, NUM_MONSTERS> >
+ unwind_var< FixedBitVector<NUM_MONSTERS> >
uniq(you.unique_creatures);
place_a = dgn_find_feature_marker(DNGN_STONE_STAIRS_UP_I);
@@ -1024,7 +1024,7 @@ monster_type arena_pick_random_monster(const level_id &place)
const vector<monster_type> &uniques = arena::uniques_list;
const monster_type type = uniques[random2(uniques.size())];
- you.unique_creatures[type] = false;
+ you.unique_creatures.set(type, false);
return type;
}