{{htmlmetatags>metatag-robots=() metatag-title=(About the sources - MCTILE tutorial) metatag-keywords=(Tutorial,C,library,Midres,MCTILE,Tiles,Commodore 64,Commodore VIC20,Commodore 16,Atari) metatag-description=(What is contained in the generated sources?) metatag-media-og:image=(:mctiles_tutorial_03d.png) metatag-og:title=(About the sources - MCTILE tutorial) metatag-og:description=(What is contained in the generated sources?) }} ====== TUTORIAL: MULTICOLOR TILE ====== ===== ABOUT THE GENERATED SOURCES ===== 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 (4x4 = 16 pixels) and 2 tiles high (2x8 = 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 (4x4 = 16 pixels) wide by 2 tiles (2x8 = 16 pixels). #define TILE_COUNT 16   This is the total number of generated tiles. [[midres_library:tutorial:mctile|Return to the tutorial]].