TileLayer class for tile-based map layers.
|
| template<typename T> |
| T ** | create2DArray (Sint32 height, Sint32 width) |
| | Template: dynamic 2D array of a given data type.
|
| template<typename T> |
| Sint32 | free2DArray (T **Array) |
| | Template: delete a dynamic 2D array.
|
| Sint32 | getCellWidth () const |
| | Get cell width.
|
| bool | setCellWidth (Sint32 size) |
| | Set cell width.
|
| Sint32 | getCellHeight () const |
| | Get cell height.
|
| bool | setCellHeight (Sint32 size) |
| | Set tile height.
|
| Sint32 | getWidth () const |
| | Get map width.
|
| Sint32 | getHeight () const |
| | Get map height.
|
| bool | allocateCells (Sint32 height, Sint32 width, Uint32 value=0) |
| | Allocate the 2D array for the cells.
|
| bool | freeCells () |
| | Free the 2D array of cells.
|
| bool | setCellValue (Sint32 y, Sint32 x, Uint32 value) |
| | Set arbitrary values on 2D array of cells.
|
| bool | clone (SceneLayerTile *dest) |
| | Copy the current values of the 2D array iCellMap to the given TileLayer.
|
| bool | isValid () |
| | Map validation.
|
| Sint32 | info (Sint8 iTilesetReady, eLogLevel eLL) |
| | Request TileLayer object information.
|
| Sint32 | cellRender (Sint32 x_cell, Sint32 y_cell, float x_dst, float y_dst, Sint32 iAlpha, Sint32 idTileset, Uint32 idTile, Sint32 idRes) |
| | Render a cell.
|
| eSceneLayerType | getType () const override |
| | Get the layer type.
|
| VisibleRange | calculateVisibleRange (const SDL_Rect &viewport, 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.
|
| | SceneLayerTile (const string &sName, Sint32 height, Sint32 width) |
| | Constructor.
|
| void | setOnUpdateCallback (SCENE_OnLayerCallback callback) |
| | Set the callback for update events.
|
| void | setOnRenderCallback (SCENE_OnLayerCallback callback) |
| | Set the callback for render events.
|
| SCENE_OnLayerCallback | getOnUpdateCallback () const |
| | Get the update callback.
|
| SCENE_OnLayerCallback | getOnRenderCallback () const |
| | Get the render callback.
|