14 const int32_t
RBITS( 5 );
15 const int32_t
SBITS( 5 );
40 std::vector<Block*> blocks[2];
51 inline const std::vector<Block*>&
GetBlocks(
unsigned int index )
52 {
return blocks[index]; }
63 std::vector<Cell> cells;
72 if( cells.size() == 0 )
79 cells[c].region =
this;
int32_t GETSREG(const int32_t x)
Definition: region.hh:29
Region * region
Definition: region.hh:54
World class
Definition: stage.hh:814
Region()
Definition: region.cc:11
The Stage library uses its own namespace.
Definition: canvas.hh:8
const int32_t SRBITS(RBITS+SBITS)
int32_t GETREG(const int32_t x)
Definition: region.hh:28
Cell()
Definition: region.hh:43
const std::vector< Block * > & GetBlocks(unsigned int index)
Definition: region.hh:51
void AddBlock(Block *b, unsigned int index)
Definition: region.cc:267
SuperRegion * superregion
Definition: region.hh:88
const point_int_t & GetOrigin() const
Definition: region.hh:115
const int32_t REGIONSIZE(REGIONWIDTH *REGIONWIDTH)
void RemoveBlock()
Definition: region.cc:62
void RemoveBlock()
Definition: region.cc:29
~SuperRegion()
Definition: region.cc:51
Definition: stage.hh:1197
void DrawVoxels(unsigned int layer) const
Definition: region.cc:199
void RemoveBlock(Block *b, unsigned int index)
Definition: region.cc:274
Region * GetRegion(int32_t x, int32_t y)
Definition: region.hh:104
const int32_t REGIONWIDTH(1<< RBITS)
Cell * GetCell(int32_t x, int32_t y)
Definition: region.hh:70
const int32_t SUPERREGIONSIZE(SUPERREGIONWIDTH *SUPERREGIONWIDTH)
void AddBlock()
Definition: region.cc:22
void DrawOccupancy(void) const
Definition: region.cc:69
const int32_t REGIONMASK(~((~0x00)<< SRBITS))
void AddBlock()
Definition: region.cc:56
int32_t GETCELL(const int32_t x)
Definition: region.hh:27
const int32_t CELLMASK(~((~0x00)<< RBITS))
SuperRegion(World *world, point_int_t origin)
Definition: region.cc:41
const int32_t SUPERREGIONWIDTH(1<< SBITS)
~Region()
Definition: region.cc:18