-
Notifications
You must be signed in to change notification settings - Fork 2
TileImage
sirrandalot edited this page Aug 19, 2018
·
1 revision
A TileImage is a rectangular set of tiles which can be drawn to the screen. The tile values, foreground and background colours can be set. If one of the colours is set to -1, it will behave the same way as drawing a tile after setting the foreground or background colour to -1, that is, it will use the most recently used colour on that tile on the screen. If the tile value is set to -1, no tile will be drawn at that position. This allows for a primitive sort of transparency.
- The width of the TileImage.
- The height of the TileImage.
- Takes an image width and height (in number of tiles).
- Takes an image width and height (in number of tiles), an array of tile values, and an array of colours in the form of {background, foreground}.
- Sets the value and colours of a tile at a given position.
- Sets the value of a tile at a given position.
- Sets the colours of a tile at a given position.
- Returns the tile value at a specified position.
- Returns the colours of a tile at a specified position in the form of {background, foreground}.