In the file tutorial_mctile.h
, generated by img2tile
, you will find a series of useful information to use the file tutorial_mctile.bin
by the functions of the MIDRES library.
#define TILE_COLOR0 MR_COLOR_BLACK #define TILE_COLOR1 MR_COLOR_RED #define TILE_COLOR2 MR_COLOR_WHITE #define TILE_COLOR3 MR_COLOR_LIGHT_BLUE
These are the colors detected by the software. The symbols MR_COLOR_…
are internal to the MIDRES library, and they automatically adapt to the color of the target compilation platform.
#define TILE_EMPTY 0 #define TILE_EMPTY_WIDTH 4 #define TILE_EMPTY_HEIGHT 2
This is the definition for the empty multicolored macrotile (mctile_empty.png
). As you can see, it starts from index 0 and is 4 tiles wide (4×4 = 16 pixels) and 2 tiles high (2×8 = 16 pixels)
#define TILE_GHOST 8 #define TILE_GHOST_WIDTH 4 #define TILE_GHOST_HEIGHT 2
The definition for the empty multicolored macrotile (mctile_ghost.png
) is also given. As you can see, it starts from index 8 and is always 4 tiles (4×4 = 16 pixels) wide by 2 tiles (2×8 = 16 pixels).
#define TILE_COUNT 16
This is the total number of generated tiles.