13 const uint32_t
RBITS(5);
14 const uint32_t
SBITS(5);
30 inline int32_t
GETREG(
const int32_t x)
47 std::vector<Block *> blocks[2];
61 inline const std::vector<Block *> &
GetBlocks(
unsigned int index) {
return blocks[index]; }
70 std::vector<Cell> cells;
79 if (cells.size() == 0) {
85 cells[c].region =
this;
int32_t GETSREG(const int32_t x)
Definition: region.hh:34
Region * region
Definition: region.hh:62
World class
Definition: stage.hh:764
Region()
Definition: region.cc:11
The Stage library uses its own namespace.
Definition: canvas.hh:8
const uint32_t SRBITS(RBITS+SBITS)
int32_t GETREG(const int32_t x)
Definition: region.hh:30
void DrawVoxels(unsigned int layer) const
Definition: region.cc:212
Cell()
Definition: region.hh:50
const int32_t REGIONMASK(~((~0x00u)<< SRBITS))
void AddBlock(Block *b, unsigned int index)
Definition: region.cc:274
SuperRegion * superregion
Definition: region.hh:94
void DrawOccupancy(void) const
Definition: region.cc:57
const int32_t REGIONSIZE(REGIONWIDTH *REGIONWIDTH)
void RemoveBlock()
Definition: region.cc:52
void RemoveBlock()
Definition: region.cc:25
~SuperRegion()
Definition: region.cc:43
Definition: stage.hh:1128
void RemoveBlock(Block *b, unsigned int index)
Definition: region.cc:313
Region * GetRegion(int32_t x, int32_t y)
Definition: region.hh:109
const int32_t CELLMASK(~((~0x00u)<< RBITS))
const int32_t REGIONWIDTH(1<< RBITS)
Cell * GetCell(int32_t x, int32_t y)
Definition: region.hh:77
const int32_t SUPERREGIONSIZE(SUPERREGIONWIDTH *SUPERREGIONWIDTH)
void AddBlock()
Definition: region.cc:19
void AddBlock()
Definition: region.cc:47
const std::vector< Block * > & GetBlocks(unsigned int index)
Definition: region.hh:61
int32_t GETCELL(const int32_t x)
Definition: region.hh:26
SuperRegion(World *world, point_int_t origin)
Definition: region.cc:36
const point_int_t & GetOrigin() const
Definition: region.hh:116
const int32_t SUPERREGIONWIDTH(1<< SBITS)
~Region()
Definition: region.cc:15