Apply the new ground_level method.
[crawl.git] / crawl-ref / source / bitary.h
blobc8411d7e2df2268698b3d62eb21a66dbb211a32b
1 /*
2 * File: bitary.h
3 * Summary: Bit array data type.
4 * Created by: Robert Vollmert
6 * Just contains the operations required by los.cc
7 * for the moment.
8 */
10 #ifndef BITARY_H
11 #define BITARY_H
13 class bit_array
15 public:
16 bit_array(unsigned long size = 0);
17 ~bit_array();
19 void reset();
21 bool get(unsigned long index) const;
22 void set(unsigned long index, bool value = true);
24 bit_array& operator |= (const bit_array& other);
25 bit_array& operator &= (const bit_array& other);
26 bit_array operator & (const bit_array& other) const;
28 protected:
29 unsigned long size;
30 int nwords;
31 unsigned long *data;
34 #endif