EasyTilemaps

Summary
EasyTilemaps
Macros
cpct_etm_drawTilemap2x4This macro uses cpct_etm_drawTileBox2x4 to draw a complete tilemap.

Macros

cpct_etm_drawTilemap2x4

This macro uses cpct_etm_drawTileBox2x4 to draw a complete tilemap.

C Definition

#define cpct_etm_drawTilemap2x4 (W, H, SCR, TM)

Parameters (1 byte)

(1B) WWidth of the tilemap in tiles
(1B) HHeight of the tilemap in tiles
(2B) SCRPointer to the screen or backbuffer location where tilemap will be drawn
(2B) TMPointer to the tilemap

Details

This macro draws a complete tilemap TM of size W, H, at the location SCR in video memory or a backbuffer.  It’s main purpose is to simplify this operation, while saving some space, as no other function is required for drawing the full tilemap.

Drawing a full tilemap could also be done much faster with cpct_etm_drawTilemap2x4_f, but that will include the code for that function in the final binary.  If speed is not a great concern when drawing the full tilemap, using this macro is prefered to save some space.

Draws (or redraws) a determined rectangle of tiles inside a tilemap.
This macro uses cpct_etm_drawTileBox2x4 to draw a complete tilemap.
Draws a complete tilemap made of 2x4-bytes tiles.
Close