TileLayer class for tile-based map layers.
|
| template<typename T> |
| T ** | create2DArray (Sint32 iHeight, Sint32 iWidth) |
| | Template: dynamic 2D array of a given data type.
|
| template<typename T> |
| Sint32 | free2DArray (T **ppArray) |
| | Template: delete a dynamic 2D array.
|
| Sint32 | getCellWidth () const |
| | Get cell width.
|
| bool | setCellWidth (Sint32 iSize) |
| | Set cell width.
|
| Sint32 | getCellHeight () const |
| | Get cell height.
|
| bool | setCellHeight (Sint32 iSize) |
| | Set cell height.
|
| Sint32 | getWidth () const |
| | Get map width.
|
| Sint32 | getHeight () const |
| | Get map height.
|
| bool | allocateCells (Sint32 iHeight, Sint32 iWidth, Uint32 iValue=0) |
| | Allocate the 2D array for the cells.
|
| bool | freeCells () |
| | Free the 2D array of cells.
|
| bool | setCellValue (Sint32 iY, Sint32 iX, Uint32 iValue) |
| | Set arbitrary values on 2D array of cells.
|
| bool | clone (SceneLayerTile *pDest) |
| | Copy the current values of the 2D array iCellMap to the given TileLayer.
|
| bool | isValid () const |
| | Map validation.
|
| Sint32 | info (Sint8 iTilesetReady, eLogLevel eLL) |
| | Request TileLayer object information.
|
| Sint32 | cellRender (Sint32 iCellX, Sint32 iCellY, float fDstX, float fDstY, Sint32 iAlpha, Sint32 idTileset, Uint32 idTile, Sint32 idRes) |
| | Render a cell.
|
| eSceneLayerType | getType () const override |
| | Get the layer type.
|
| VisibleRange | calculateVisibleRange (const SDL_Rect &rViewport, float fOffsetX, float fOffsetY) |
| | Calculate visible range of tiles for a given viewport and offset.
|
| float | getTotalWidth () const override |
| | Get layer total width in pixels.
|
| float | getTotalHeight () const override |
| | Get layer total height in pixels.
|
| void | setOnUpdateCallback (SceneLayerCallback fnCallback) |
| | Set the callback for update events.
|
| void | setOnRenderCallback (SceneLayerCallback fnCallback) |
| | Set the callback for render events.
|
| SceneLayerCallback | getOnUpdateCallback () const |
| | Get the update callback.
|
| SceneLayerCallback | getOnRenderCallback () const |
| | Get the render callback.
|
| Uint32** CRM64Pro::SceneLayerTile::iCellMap |
Direct mutable 2D cell map.
Public access is provided for fast tile-layer editing and direct row/column traversal. The pointer is owned by SceneLayerTile and must not be freed, reallocated, or replaced by user code. Direct writes bypass setCellValue() validation, bounds checks, and future cache or validation hooks; use setCellValue() when validation is required. Valid indices are [0, getHeight() - 1] for rows and [0, getWidth() - 1] for columns when the map is allocated.