ITileLayer

Tile interface, defines common functions shared between tile layers.

Members

Functions

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

Adds a new tile to the layer.

clearTilemap
void clearTilemap()

Clears the tilemap

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 bitmap associated with the tile ID.

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 a mapping into the layer.

readMapping
MappingElement readMapping(int x, int y)

Reads the mapping element from the given area, while accounting for warp mode.

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)

Reads the mapping element from the given area, while accounting for warp mode.

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

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

Meta