/* Keep these headers */ #include #include #include #include /* Standard headers - it's recommended to leave them included */ #include #include #include #include #include "tiles.h" #include "tilesmap.h" #include "mem.h" #include "rle.h" #include "screen8bpp.h" uint8_t* tiles[NTILES] = {0}; /* Your code here */ void initTiles(uint8_t** tiles) { uint8_t i, backcolid; // tiles data is RLE-compressed // bits 0-2 : color ID (3-bits) // bits 3-7 : number (5-bits) // 0 value for end of data uint8_t tiles_C[] = { 254,166,29,46,29,254,70,21,54,21,254,254,54,29,46,29,254,70,21,54,21,142,0, 174,12,118,28,62,12,46,28,54,20,46,36,46,20,38,44,38,28,38,44,38,36,22,52,38,36,22,61,30,37,14,69,22,45,14,77,14,133,14,133,14,133,14,21,254,14,0, 190,10,62,10,22,10,30,10,30,10,30,10,30,18,14,18,30,18,14,18,38,26,46,26,54,10,62,10,254,222,10,62,10,22,10,30,10,30,10,30,10,30,18,14,18,30,18,14,18,38,26,46,26,54,10,62,10,254,38,0, 254,46,12,62,12,54,12,14,12,46,12,14,12,38,12,62,12,254,254,222,12,62,12,54,12,14,12,46,12,14,12,38,12,62,12,254,182,0, 254,254,46,35,38,35,30,51,22,51,14,59,14,187,254,254,46,35,38,35,30,51,22,51,14,59,14,187,0, 254,38,18,110,34,54,10,38,50,38,26,30,50,30,42,22,50,30,42,30,34,30,58,30,21,54,29,46,21,54,29,46,21,54,29,46,21,118,21,254,230,0, 254,254,46,17,54,9,54,33,38,25,38,49,30,9,14,9,30,65,14,41,30,52,22,44,30,12,14,20,14,12,22,20,14,20,30,52,22,20,14,20,30,20,22,20,86,20,22,20,254,214,0, 254,166,16,22,16,22,16,54,16,22,16,22,16,54,80,54,80,54,24,14,24,14,16,54,24,14,24,14,16,54,80,54,80,54,32,14,40,54,24,30,32,54,24,30,32,54,24,30,32,54,24,30,32,30,0}; uint8_t* ptr_in = tiles_C; for(i=0; i