/* Keep these headers */ #include #include #include #include /* Standard headers - it's recommended to leave them included */ #include #include #include #include #include "tiles.h" #include "tilesplayer.h" #include "rle.h" #include "mem.h" #include "screen8bpp.h" uint8_t* tilesp[NTILESP] = {0}; /* Your code here */ void initTilesP(uint8_t** tilesp) { uint8_t i; // tiles data is RLE-compressed // bits 0-3 : color ID (4-bits) // bits 4-7 : number (4-bits) // 0 value for end of data uint8_t tilesp_C[] = { 240,112,18,16,18,32,18,112,34,48,34,48,18,112,50,63,16,31,112,143,112,47,32,47,32,47,96,47,32,47,32,47,96,175,96,47,16,79,16,47,112,47,64,47,96,31,32,111,32,31,80,28,32,76,32,28,112,28,32,44,32,28,144,102,160,102,160,33,32,33,80,0, // 0:defaut-anim1 80,18,32,18,16,18,16,18,112,18,16,18,32,18,16,18,144,50,63,16,31,112,143,112,47,32,47,32,47,96,47,32,47,32,47,96,31,16,111,16,31,96,47,16,79,16,47,112,47,64,47,144,111,176,76,160,28,32,44,32,28,112,22,16,102,16,22,128,102,160,38,32,38,144,33,64,33,64,0, // 1:defaut-anim2 96,18,48,50,112,34,16,18,16,18,16,18,16,18,112,63,66,128,143,112,63,32,95,80,79,32,95,80,191,96,175,112,143,144,111,192,76,208,44,160,22,16,86,176,102,144,38,48,38,16,22,112,49,32,49,48,0, // 2:gauche-anim1 240,96,34,32,34,144,18,32,18,16,18,16,34,128,63,50,144,143,112,63,32,95,80,79,32,95,80,191,96,175,112,143,144,111,176,76,160,28,32,44,192,86,176,102,144,49,16,49,80,0, // 3:gauche-anim2 96,18,48,18,144,18,32,18,16,18,16,18,112,18,16,50,79,144,143,112,111,32,47,96,111,32,63,80,191,80,175,112,143,144,111,160,76,208,44,208,86,16,22,128,102,128,22,16,38,48,38,128,49,16,33,80,0, // 4:droite-anim1 240,64,18,32,34,32,34,128,18,16,18,32,18,144,18,16,50,63,144,143,112,111,32,47,96,111,32,63,80,191,80,175,112,143,144,111,176,76,208,44,32,28,160,86,160,54,16,38,176,49,16,49,64,0, // 5:droite-anim2 80,34,32,34,144,18,32,18,16,18,16,34,112,79,50,128,159,96,191,80,191,80,191,80,191,96,159,128,127,32,31,112,92,32,28,96,44,32,44,32,28,144,102,160,134,112,38,64,33,128,33,160,0, // 6:échelle-anim1 48,18,32,34,32,18,16,18,112,18,32,18,16,18,16,18,144,63,66,128,159,96,191,80,191,80,191,80,191,96,159,80,31,32,127,112,28,32,92,144,28,32,44,32,44,128,102,128,150,128,33,64,44,224,33,64,0, // 7:échelle-anim2 48,18,32,18,16,18,16,18,144,18,32,18,16,18,16,34,128,111,144,143,112,175,96,175,96,175,96,175,48,22,31,38,143,38,31,22,16,47,32,111,32,47,48,44,32,76,32,28,96,44,32,44,16,44,144,102,160,102,160,38,32,38,160,33,32,33,80,0, // 8:corde 48,18,16,18,32,18,16,18,144,18,32,18,16,18,16,34,128,63,50,144,143,112,63,32,95,80,79,32,95,80,191,96,175,48,22,31,38,143,70,16,47,32,111,112,44,32,76,32,60,64,44,32,44,16,44,144,86,176,102,160,38,32,38,144,49,16,49,80,0, // 9:corde-gauche-anim1 240,48,18,48,18,48,18,16,18,96,34,16,34,16,18,16,18,144,63,50,144,143,112,63,32,95,80,79,32,95,80,191,48,54,175,54,64,143,32,31,96,111,32,47,32,60,32,76,32,44,80,44,32,44,16,60,112,102,160,102,176,33,32,33,80,0, // 10:corde-gauche-anim2 240,96,18,16,18,160,18,48,18,32,18,16,18,112,18,16,50,63,144,143,112,111,32,47,96,111,32,63,80,191,32,54,175,38,31,64,143,48,31,80,111,48,47,16,44,48,76,48,44,48,44,48,44,32,60,96,22,16,86,176,86,160,33,32,49,64,0, // 11:corde-droite-anim1 80,18,16,18,32,18,112,18,16,18,16,18,32,18,16,18,112,18,16,50,63,144,143,112,111,32,47,96,111,32,63,80,191,48,31,16,175,48,38,31,22,143,70,32,31,32,111,112,44,32,76,80,28,48,44,32,44,32,28,32,44,64,22,16,86,16,54,96,102,160,38,32,38,144,49,16,49,80,0, // 12:corde-droite-anim2 84,18,36,18,52,18,116,18,20,18,36,18,20,18,148,50,63,20,31,116,143,116,175,100,47,36,47,36,47,100,175,100,175,116,47,68,47,100,31,36,111,36,31,84,28,36,76,36,28,116,28,36,44,36,28,148,102,164,102,116,17,36,33,36,33,36,17,84,49,68,49,52,0, // 13:nage-anim1 68,18,20,18,36,18,20,18,148,50,63,20,31,116,143,116,175,100,47,36,47,36,47,100,175,100,175,116,63,36,63,148,111,180,76,164,28,36,44,36,28,116,22,20,102,20,22,132,102,164,33,36,33,116,81,36,81,244,52,0, // 14:nage-anim2 48,18,16,18,32,18,16,18,16,18,64,18,16,18,32,18,32,18,16,18,16,18,64,18,16,18,16,18,32,34,16,18,96,47,32,47,48,31,96,175,96,47,16,63,16,63,96,47,32,47,32,47,96,47,32,47,32,47,112,143,96,31,32,47,32,47,32,31,80,28,32,76,32,28,112,28,32,44,32,28,144,102,160,102,144,54,32,54,144,17,64,17,80,0, // 15:tombe 240,96,111,144,143,112,31,16,31,16,47,16,31,16,31,96,47,16,79,16,47,96,175,48,31,32,63,16,47,16,63,32,47,48,63,32,63,48,63,48,111,48,47,76,32,76,32,76,16,76,32,44,32,76,48,38,16,102,16,38,112,102,160,102,160,38,32,38,144,49,32,49,240,80,0, // 16:ange-anim1 240,240,112,111,144,143,112,31,16,31,16,47,16,31,16,31,96,47,16,79,16,47,96,175,96,175,112,63,32,63,144,111,112,44,32,76,32,44,48,76,32,44,32,76,32,54,16,102,16,54,16,38,48,102,48,54,64,38,32,38,64,22,17,64,33,32,33,80,0, // 17:ange-anim2 48,143,112,161,80,193,48,65,16,145,32,49,16,33,16,129,16,241,97,16,241,33,16,177,16,17,16,241,177,16,33,16,65,16,28,16,76,48,60,32,60,16,28,16,28,64,28,16,28,32,28,16,28,32,28,16,28,48,28,16,28,32,28,16,28,32,28,32,28,32,28,16,28,16,28,48,28,16,28,32,28,16,28,32,28,16,28,48,28,16,28,32,28,0, // 18:medusoide-anim1 80,95,160,113,128,145,96,33,16,129,64,81,16,113,32,193,16,33,16,49,16,17,16,17,16,113,16,241,65,16,241,209,16,33,16,65,16,17,16,65,16,28,16,44,16,28,16,60,16,28,16,28,32,28,16,28,32,28,16,28,16,28,32,28,16,28,48,28,32,28,16,28,16,28,32,28,16,28,48,28,32,28,16,28,32,28,16,28,16,28,48,28,80,44,32,28,32,28,0, // 19:medusoide-anim2 240,96,111,128,145,96,65,16,97,64,209,32,129,16,97,16,81,16,241,33,16,177,16,17,16,241,161,32,33,16,65,16,17,16,65,48,60,32,28,33,16,17,16,17,64,28,16,28,32,28,16,28,32,28,16,28,48,28,16,28,32,28,16,28,32,28,16,28,48,28,64,28,32,28,16,28,32,28,48,28,80,28,16,28,32,28,16,0, // 20:medusoide-anim3 }; uint8_t* ptr_in = tilesp_C; for(i=0; i