ITileLayer

Tile interface, defines common functions.

Members

Functions

addTile
void addTile(ABitmap tile, wchar id, ubyte paletteSh)

Adds a tile.

getMX
int getMX()

Returns the width of the mapping.

getMY
int getMY()

Returns the height of the mapping.

getMapping
MappingElement[] getMapping()

Retrieves the mapping from the tile layer. Can be used to retrieve data, e.g. for editors, saving game states

getTX
size_t getTX()

Returns the total width of the tile layer.

getTY
size_t getTY()

Returns the total height of the tile layer.

getTile
ABitmap getTile(wchar id)

Returns the tile.

getTileHeight
int getTileHeight()

Returns the height of the tiles.

getTileWidth
int getTileWidth()

Returns the width of the tiles.

getWarpMode
WarpMode getWarpMode()

Returns the currently used warp mode.

loadMapping
void loadMapping(int x, int y, MappingElement[] mapping)

Loads the mapping, primarily used for deserialization.

readMapping
MappingElement readMapping(int x, int y)

Reads the mapping element from the given area.

removeTile
void removeTile(wchar id)

Removes the tile from the display list with the given ID.

setWarpMode
WarpMode setWarpMode(WarpMode mode)

Sets the warp mode. Returns the new warp mode that is being used.

tileByPixel
MappingElement tileByPixel(int x, int y)

Returns the tile ID from the location by pixel.

writeMapping
void writeMapping(int x, int y, MappingElement w)

Writes the given element into the mapping at the given location.

Meta