Tiles
Tiles are the basic building blocks of the CRGA engine. A layer is built up of a sequence of tiles that are in turn drawn on screen. For more information, read about the CRTile struct.
Generates a default tile configuration, using the provided index as the tile’s index.
Shift: 0
Foreground: default foreground from cr_config
Background: default background from cr_config
Visibility: default visibility from cr_config
Generates a tile from a utf8 character string. Calls CRDefaultTileConfig() passing in 0, and then fills the character index with the provided string.
Generates a tile from an integer. Calls CRDefaultTileConfig passing in the provided index.
Checks that the position is possible given the provided width and height of the grid, then sets that element of the grid to the provided tile.
Sets the tile on a specified point on a layer’s grid to be the provided tile.
Creates a new default tile using the provided string, then sets the specified point on the layer’s grid to be that tile.
Creates a new default tile using the provided integer, then sets the specified point on the layer’s grid to be that tile.
As CRSetLayerTile() but for world layer 0. Useful when you’re starting out and you only want to work with a single world layer.
As CRSetLayerTile() but for UI layer 0. Useful when you’re starting out and you only want to work with a single UI layer.
-
void CRSetWorldTileChar(char *character, Vector2 position)
As CRSetLayerTileChar() but for world layer 0.
-
void CRSetUITileChar(char *character, Vector2 position)
As CRSetLayerTileChar() but for UI layer 0.
-
void CRSetWorldTileIndex(int index, Vector2 position)
As CRSetLayerTileIndex() but for world layer 0.
-
void CRSetUITileIndex(int index, Vector2 position)
As CRSetLayerTileIndex() but for UI layer 0.
As CRSetWorldTile() but on a layer provided by the index.
As CRSetUITile() but on a layer provided by the index.