summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/bitary.h
Commit message (Collapse)AuthorAgeFilesLines
* Recalculate cache of equipped unrands with world_reacts on save loadEduardo Gonzalez2014-05-091-0/+5
| | | | | | This allows us to more easily add or remove those hooks on existing unrands. The data type has also been changed to FixedBitVector from unsigned short, allowing the expanded ring slots to be referenced.
* Expose bitset's count function through FixedBitVector...Eduardo Gonzalez2014-05-091-0/+5
| | | | | and use it to speed up counting runes in a few places. Vaults and Zot entrances report activated runes by name, so weren't updated.
* Indendation & brace fixes.Adam Borowski2013-07-311-5/+1
|
* Dispatch to std::bitset for FixedBitVector.Brendan Hickey2013-07-281-30/+24
| | | | | | | | | | This patch reimplements 1D and 2D FixedBitVectors in terms of std::bitset. The 1D FixedBitVector can probably be deleted in its entirety. bit_vector could be replaced with boost::dynamic_bitset, if we were willing to introduce a dependency on Boost. Stress tests demonstrate a tiny improvement in timings.
* Add a copy constructor to bit_vector (xFleury)Pete Hurst2013-05-191-0/+1
| | | | | This caused an error with clouds and LOS due to an implicit copy having undefined behaviour and not working properly in MSVC.
* Include debug.h earlier.Adam Borowski2013-04-261-1/+0
| | | | | Via externs.h -> bitary.h, it was effectively included by everything anyway, and this way simplifies include chains.
* Use FixedBitArray instead of large arrays of bools.Adam Borowski2013-04-091-0/+7
| | | | | The only cost is having assignments be a function, as you can't overload operator[] to have separate bits be lvalues.
* Fix windows compilation.Raphael Langella2012-08-211-0/+1
| | | | | | Not sure why, but I was getting this: bitary.h:47: error: 'ARRAYSZ' was not declared in this scope
* Change abyss_genlevel_mask from a map_mask to a map_bitmask.Raphael Langella2012-08-211-0/+14
|
* Allow indexing FixedBitArrays with any struct that has fields "x" and "y".Adam Borowski2012-07-261-4/+4
|
* Allow reading FixedBitArray(...) without having to type ".get".Adam Borowski2012-07-261-0/+10
| | | | | | | This works only for reading, as we can't return a reference to a single bit. Also, [x][y] doesn't work either: FixedArray can return a column vector which then can be dereferenced further, bit arrays here are packed so returning a slice would require a whole new class.
* Add FixedBitArray::set(coord_def, [bool]).Adam Borowski2012-07-261-0/+5
| | | | There was get() but not set().
* Rename bit_array to bit_vector.Adam Borowski2012-07-261-6/+6
|
* A two-dimensional FixedBitArray template.Adam Borowski2012-07-261-0/+60
|
* Rename FixedBitArray to FixedBitVector.Adam Borowski2012-07-261-6/+6
|
* Use ARRAYSZ() instead of sizeof division, for readability.Adam Borowski2012-06-191-3/+3
| | | | Also, it's not vulnerable to changes to the underlying types.
* Allow more than 64 mon_info flags.Adam Borowski2011-05-261-1/+15
|
* Fixed-width bit arrays, a good deal faster than dynamic ones.Adam Borowski2011-04-071-0/+48
|
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-5/+4
| | | | | | | "File:" is shown in your editor's status bar. "Written by:" was used only for the first person who changed a file. We got git for that now, and pre-DCSS history is so woefully inaccurate it doesn't really matter.
* Changed structs that acted like classes to classesIxtli2010-05-041-1/+1
| | | | | Anything that had more than constructors, const or static member functions, or operator definitions were considered acting like classes.
* Fix newlines at end of file.Adam Borowski2010-01-211-1/+0
|
* Implement bit array class.Robert Vollmert2009-10-101-0/+35