![]() |
CRM64Pro GDK v0.11.0
A free cross-platform game development kit built on top of SDL 3.0
|
MapBase class. Minimum mapdata to be used with the TileEngine. Inherit from it your own custom MapData. More...
Public Member Functions | |
TE_MapBase () | |
MapBase default constructor. | |
TE_MapBase (Sint32 height, Sint32 width) | |
MapBase mandatory constructor. | |
~TE_MapBase () | |
MapBase destructor. | |
Sint32 | checkMap () |
Map validation. | |
Sint32 | info (Sint8, eLogMessageLevel eLML) |
Request MapBase object information. | |
Sint32 | cellUpdate (Sint32, Sint32, void *, void *) |
Update a cell. | |
Sint32 | cellRender (Sint32, Sint32, Sint32, Sint32, Sint32, Sint32, Sint32, Sint32) |
Render a cell. | |
Sint32 | saveMapdataNode (Sint32 idXML, Sint32 iOutput) |
Save the mapdata base type to a XML node of a TEL or TMX file. | |
Sint32 | loadMapdataNode (Sint32 idXML, Sint32 iInput) |
Load the mapdata base type from a node inside a TEL or TMX file. | |
Sint32 | createMapBase (Sint32 height, Sint32 width, Sint16 value=-1) |
Create the 2D array for the tiles allocation(mapbase). | |
Sint32 | deleteMapBase () |
Delete the 2D array(mapbase). | |
Sint32 | setMapBaseValue (Sint32 y, Sint32 x, Sint16 value) |
Set arbitrary values on 2D array(mapbase). | |
Sint32 | cloneMapBase (TE_MapBase *) |
Copy the current values of the 2D array iTilemap to the given MapBase. | |
![]() | |
template<typename T > | |
T ** | create2DArray (Sint32 height, Sint32 width) |
Template: dynamic 2D array of a given data type. | |
template<typename T > | |
Sint32 | delete2DArray (T **Array) |
Template: delete a dynamic 2D array. | |
Sint32 | getMapType (string &sMT) |
Get map type. | |
Sint32 | getCellWidth () |
Get cell width. | |
Sint32 | setCellWidth (Sint32 size) |
Set cell width. | |
Sint32 | getCellHeight () |
Get cell height. | |
Sint32 | setCellHeight (Sint32 size) |
Set tile height. | |
Sint32 | getMapWidth () |
Get map width. | |
Sint32 | getMapHeight () |
Get map height. | |
Static Public Member Functions | |
static TE_MapBase * | createInstance (Sint32 height, Sint32 width) |
Create an instance of this class. | |
Protected Member Functions | |
Sint32 | A2DtoCSV (Uint32 **Array2D, Sint32 w, Sint32 h, char *&szOutput) |
Convert a 2D integers array to a CSV formatted string (SerializeOut). | |
Sint32 | CSVtoA2D (Uint32 **Array2D, Sint32 w, Sint32 h, const string &sInput) |
Convert a CSV formatted string to a 2D integers array (SerializeIn). | |
Sint32 | stringtoA2D (Uint32 **Array2D, Sint32 w, Sint32 h, const char *szInput) |
Convert a string to a 2D integers array (SerializeIn). | |
MapBase class. Minimum mapdata to be used with the TileEngine. Inherit from it your own custom MapData.