Skip to content

Latest commit

 

History

History
22 lines (12 loc) · 1.35 KB

drawing.rst

File metadata and controls

22 lines (12 loc) · 1.35 KB

Drawing

Convert a character to an integer index using the mapping in the char_index_assoc map in the cr_config struct.

Draws a tile char or tile image depending on bit zero of the tilemap flags. 0 means draw the tile as a character, 1 means draw the tile as an image. Bit one of the tilemap flags is used if drawing as an image to determine if the direct index of the tile should be used, or if the char-to-index association should be used.

Draws the given tile as a character with the given font at the given size, the given position, and with the given transparency from the mask.

Draws the given tile as an image with the given font at the given size, the given position, and with the given transparency from the mask.

Iterate through every tile in a layer's grid and draw it to the screen, masking as necessary. Afterward, draw the entity tiles if any, also masking as needed.