stmm-games-doc  0.32.0
Public Member Functions | List of all members
stmg::TileBuffer Class Reference
Inheritance diagram for stmg::TileBuffer:
Inheritance graph
[legend]

Public Member Functions

 TileBuffer (NSize oWH) noexcept
 
 TileBuffer (NSize oWH, const Tile &oTile) noexcept
 
void reInit (NSize oWH) noexcept
 
void reInit (NSize oWH, const Tile &oTile) noexcept
 
int32_t getW () const noexcept override
 The width in tiles. More...
 
int32_t getH () const noexcept override
 The height in tiles. More...
 
const Tileget (NPoint oXY) const noexcept override
 The tile at a certain position. More...
 
Tileget (NPoint oXY) noexcept
 
void set (NPoint oXY, const Tile &oTile) noexcept
 
void setAll (const Tile &oTile) noexcept
 
void dump (int32_t nIndentSpaces) const noexcept
 
void dump () const noexcept
 
- Public Member Functions inherited from stmg::TileRect
virtual ~TileRect () noexcept=default
 

Additional Inherited Members

- Static Public Member Functions inherited from stmg::TileRect
static bool isAllEmptyTiles (const TileRect &oTiles) noexcept
 Whether an instance has all empty tiles. More...
 

Constructor & Destructor Documentation

◆ TileBuffer() [1/2]

stmg::TileBuffer::TileBuffer ( NSize  oWH)
inlineexplicitnoexcept

◆ TileBuffer() [2/2]

stmg::TileBuffer::TileBuffer ( NSize  oWH,
const Tile oTile 
)
inlinenoexcept

Member Function Documentation

◆ dump() [1/2]

void stmg::TileBuffer::dump ( int32_t  nIndentSpaces) const
noexcept

◆ dump() [2/2]

void stmg::TileBuffer::dump ( ) const
noexcept

◆ get() [1/2]

const Tile& stmg::TileBuffer::get ( NPoint  oXY) const
inlineoverridevirtualnoexcept

The tile at a certain position.

Parameters
oXYThe position. Must be >= 0 and oXY.m_nX < getW() and oXY.m_nY < getH().
Returns
The tile.

Implements stmg::TileRect.

◆ get() [2/2]

Tile& stmg::TileBuffer::get ( NPoint  oXY)
inlinenoexcept

◆ getH()

int32_t stmg::TileBuffer::getH ( ) const
inlineoverridevirtualnoexcept

The height in tiles.

Returns
The height. Must be >= 0.

Implements stmg::TileRect.

◆ getW()

int32_t stmg::TileBuffer::getW ( ) const
inlineoverridevirtualnoexcept

The width in tiles.

Returns
The width. Must be >= 0.

Implements stmg::TileRect.

◆ reInit() [1/2]

void stmg::TileBuffer::reInit ( NSize  oWH)
inlinenoexcept

◆ reInit() [2/2]

void stmg::TileBuffer::reInit ( NSize  oWH,
const Tile oTile 
)
inlinenoexcept

◆ set()

void stmg::TileBuffer::set ( NPoint  oXY,
const Tile oTile 
)
inlinenoexcept

◆ setAll()

void stmg::TileBuffer::setAll ( const Tile oTile)
inlinenoexcept