diff --git a/demo2.cpp b/demo2.cpp index cd2adcf..83ca4b7 100644 --- a/demo2.cpp +++ b/demo2.cpp @@ -520,6 +520,93 @@ const unsigned char texture5[] = ,0x09,0x12,0x09,0x09 }; +const unsigned char texture6[] = +{ 32, 36 // width, height + ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0x63,0x1a,0x1a,0x63 + ,0x6c,0xb5,0xb6,0xb6,0xac,0xac,0xac,0xab,0xac,0xa3,0x9e,0x9d,0xa5,0x9c + ,0x5b,0x5a,0xa3,0x5a,0x5a,0xa3,0x5a,0xa3,0xa3,0xa3,0x5a,0x63,0x5b,0x9a + ,0x5a,0x00,0x00,0xbf,0x74,0x1a,0x1a,0x63,0xbd,0xb5,0xb6,0xad,0xad,0xa3 + ,0xa3,0xa3,0xac,0xac,0x9d,0x9c,0xa4,0x9c,0xa3,0x5a,0x5a,0xa3,0x5a,0x5a + ,0x5a,0x5a,0xa3,0x5a,0x52,0x5a,0x5b,0x9a,0x11,0x00,0x00,0xbd,0x73,0x09 + ,0x11,0x11,0x11,0x5a,0x11,0x11,0x11,0x09,0x11,0x12,0x11,0x09,0x08,0x09 + ,0x08,0x09,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x52,0x52,0x51,0x09 + ,0x11,0x51,0x09,0x00,0x00,0x63,0x5a,0x09,0x08,0x09,0x09,0x51,0x51,0x51 + ,0x51,0x51,0x5a,0x51,0x5a,0x51,0x4b,0x4a,0x52,0x4a,0x51,0x5a,0x5a,0x51 + ,0x51,0x51,0x5a,0x5a,0x11,0x51,0x51,0x51,0x09,0x52,0x09,0x00,0x00,0x6b + ,0x63,0x09,0x08,0x09,0x08,0x09,0x51,0x51,0x51,0x51,0x51,0x51,0x52,0x51 + ,0x4a,0x4a,0x4a,0x4a,0x5a,0x5a,0x5a,0x5a,0x51,0x51,0x51,0x51,0x11,0x52 + ,0x51,0x51,0x09,0x51,0x09,0x00,0x00,0x63,0x1a,0x08,0x08,0x08,0x08,0x09 + ,0x09,0x09,0x09,0x49,0x49,0x49,0x49,0x49,0x01,0x02,0x09,0x09,0x49,0x49 + ,0x49,0x51,0x49,0x51,0x49,0x49,0x09,0x51,0x51,0x51,0x09,0x51,0x09,0x00 + ,0x00,0x63,0x1a,0x00,0x00,0x08,0x08,0x09,0x08,0x09,0x49,0x49,0x49,0x49 + ,0x49,0x49,0x02,0x02,0x09,0x09,0x49,0x51,0x49,0x49,0x51,0x49,0x51,0x51 + ,0x11,0xa3,0x51,0x52,0x09,0x51,0x09,0x00,0x00,0x7d,0x62,0x00,0x08,0x09 + ,0x08,0x09,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x4a,0x4a,0x49,0x4a + ,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x63,0xac,0x52,0x09,0x09,0x51 + ,0x09,0x00,0x00,0x74,0x11,0x00,0x08,0x09,0x08,0x09,0x51,0x51,0x1b,0x13 + ,0x1b,0x13,0x51,0x13,0x4a,0x13,0x4a,0x13,0x5a,0x13,0x5a,0x13,0x1b,0x13 + ,0x13,0x51,0x63,0xac,0x52,0x51,0x09,0x51,0x09,0x00,0x00,0x1a,0x1a,0x00 + ,0x09,0x09,0x00,0x09,0x51,0x51,0x1b,0x1b,0x13,0x51,0x5a,0x51,0x4a,0x4a + ,0x52,0x4a,0x5a,0x5a,0x51,0x51,0x13,0x1b,0x13,0x5a,0x5a,0xac,0x51,0x51 + ,0x09,0x51,0x09,0x00,0x00,0x1a,0x62,0x08,0x09,0x09,0x08,0x09,0x51,0x51 + ,0x1b,0x13,0x5a,0x51,0x5a,0x51,0x4b,0x4a,0x52,0x4a,0x5a,0x51,0x51,0x5a + ,0x5a,0x13,0x13,0x51,0x63,0xac,0x52,0x09,0x09,0x51,0x09,0x00,0x00,0x6b + ,0x1a,0x00,0x08,0x09,0x08,0x09,0x51,0x5a,0x13,0x5a,0x51,0x51,0x51,0x51 + ,0x4a,0x4a,0x4a,0x4a,0x51,0x5a,0x5a,0x5a,0x51,0x51,0x13,0x51,0x5a,0xa3 + ,0x51,0x52,0x09,0x51,0x09,0x00,0x00,0x5a,0x11,0x08,0x08,0x09,0x08,0x09 + ,0x51,0x52,0x51,0x51,0x51,0x5a,0x51,0x5a,0x4a,0x4b,0x4a,0x4a,0x51,0x5a + ,0x51,0x51,0x5a,0x5a,0x5a,0x5a,0x63,0xac,0x51,0x51,0x11,0x51,0x09,0x00 + ,0x00,0x63,0x11,0x08,0x08,0x08,0x08,0x09,0x51,0x51,0x5a,0x51,0x5a,0x51 + ,0x5a,0x51,0x4b,0x4a,0x52,0x4a,0x51,0x5a,0x51,0x51,0x51,0x51,0x5a,0x51 + ,0x63,0x5a,0x52,0x09,0x09,0x51,0x08,0x00,0x00,0x1a,0x1a,0x08,0x08,0x09 + ,0x00,0x08,0x51,0x52,0x5a,0x52,0x5a,0x51,0x52,0x51,0x53,0x4a,0x52,0x4a + ,0x51,0x52,0x52,0x5a,0x51,0x52,0x5a,0x52,0x63,0xa3,0x51,0x52,0x09,0x51 + ,0x09,0x00,0x00,0x11,0x11,0x00,0x08,0x09,0x08,0x09,0x51,0x51,0x5a,0x51 + ,0x5a,0x51,0x51,0x51,0x4b,0x4a,0x4a,0x4a,0x51,0x51,0x51,0x5a,0x5a,0x51 + ,0x51,0x52,0xac,0xb6,0x51,0x51,0x11,0x51,0x09,0x00,0x00,0x1a,0x09,0x08 + ,0x08,0x09,0x08,0x09,0x51,0x5a,0x51,0x51,0x51,0x51,0x5a,0x5a,0x4a,0x4a + ,0x52,0x4a,0x51,0x5a,0x5a,0x51,0x5a,0x5a,0x51,0x51,0x6c,0xb6,0x52,0x52 + ,0x09,0x52,0x08,0x00,0x00,0x1a,0x11,0x00,0x08,0x09,0x08,0x09,0x51,0x5a + ,0x5a,0x51,0x5a,0x5a,0x5a,0x51,0x4b,0x4b,0x52,0x4a,0x5a,0x51,0x51,0x5a + ,0x5a,0x51,0x5a,0x5a,0x6c,0xb6,0x52,0x09,0x09,0x51,0x08,0x00,0x00,0x5a + ,0x11,0x00,0x08,0x09,0x08,0x09,0x51,0x5a,0x13,0x51,0x51,0x51,0x51,0x51 + ,0x4a,0x4a,0x49,0x49,0x5a,0x51,0x5a,0x51,0x5a,0x51,0x1b,0x5a,0xb5,0xad + ,0x52,0x52,0x09,0x51,0x09,0x00,0x00,0x12,0x1a,0x00,0x08,0x11,0x08,0x09 + ,0x51,0x51,0x13,0x13,0x5a,0x51,0x51,0x51,0x53,0x4a,0x4a,0x49,0x51,0x5a + ,0x5a,0x51,0x5a,0x1b,0x1b,0x5a,0xbe,0xb6,0x52,0x51,0x09,0x51,0x08,0x00 + ,0x00,0x5a,0x09,0x00,0x08,0x09,0x08,0x09,0x51,0x51,0x13,0x13,0x13,0x51 + ,0x5a,0x5a,0x4a,0x4a,0x52,0x52,0x51,0x51,0x51,0x5a,0x13,0x1b,0x1b,0x51 + ,0x6c,0xbf,0x52,0x09,0x11,0x51,0x09,0x00,0x00,0x5a,0x09,0x00,0x08,0x09 + ,0x08,0x09,0x51,0x51,0x13,0x1b,0x13,0x1b,0x51,0x13,0x4a,0x13,0x4a,0x13 + ,0x51,0x13,0x51,0x13,0x1b,0x13,0x1b,0x5a,0x63,0xac,0x52,0x11,0x09,0x51 + ,0x09,0x00,0x00,0x5a,0x11,0x00,0x09,0x09,0x08,0x09,0x51,0x5a,0x51,0x51 + ,0x5a,0x51,0x5a,0x51,0x4b,0x4a,0x52,0x4a,0x51,0x51,0x5a,0x5a,0x51,0x51 + ,0x5a,0x5a,0xbd,0xb6,0x52,0x51,0x09,0x51,0x09,0x00,0x00,0x1a,0x1a,0x08 + ,0x08,0x11,0x08,0x52,0x5a,0xa3,0x5a,0xa3,0xac,0xab,0xac,0xa3,0x9e,0x9d + ,0x9c,0x9b,0xac,0xad,0xab,0xa3,0xa3,0xac,0xac,0xb5,0xac,0xbf,0x52,0x51 + ,0x11,0x51,0x09,0x00,0x00,0x5a,0x11,0x08,0x08,0x09,0x09,0x5a,0xa3,0xac + ,0x9a,0x5a,0xa3,0xac,0xab,0xa3,0x54,0x9e,0x9c,0x9c,0xa3,0xad,0xbf,0xbf + ,0xab,0xac,0xab,0xbf,0xbd,0xac,0x52,0x52,0x09,0x51,0x09,0x00,0x00,0x1a + ,0x09,0x00,0x08,0x11,0x09,0x11,0x51,0x5a,0x51,0x51,0x51,0x51,0x5a,0x51 + ,0x4a,0x4a,0x52,0x4a,0x51,0x5a,0x5a,0x5a,0x52,0x52,0x52,0x5a,0x11,0x49 + ,0x51,0x51,0x09,0x51,0x09,0x00,0x00,0x1a,0x09,0x00,0x09,0x09,0x09,0x51 + ,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x4a,0x4a,0x49,0x4a,0x5a,0x51 + ,0x51,0x51,0x51,0x5a,0x51,0x51,0x11,0x51,0x51,0x52,0x11,0x51,0x09,0x00 + ,0x00,0x11,0x11,0x00,0x08,0x09,0x09,0x09,0x11,0x09,0x11,0x11,0x11,0x09 + ,0x09,0x08,0x08,0x08,0x08,0x08,0x11,0x11,0x11,0x09,0x11,0x11,0x11,0x11 + ,0x52,0x51,0x51,0x09,0x09,0x51,0x09,0x00,0x00,0x5a,0x11,0x08,0x08,0x09 + ,0x11,0x51,0x51,0x51,0x5a,0x51,0x52,0x52,0x51,0x51,0x4a,0x4a,0x49,0x09 + ,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x51,0x11,0x11,0x51 + ,0x09,0x00,0x00,0x1a,0x08,0x00,0x00,0x08,0x09,0x09,0x51,0x49,0x49,0x49 + ,0x49,0x49,0x49,0x49,0x02,0x02,0x09,0x09,0x49,0x49,0x09,0x09,0x09,0x09 + ,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x49,0x09,0x00,0x00,0x00,0x00,0x00 + ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + ,0x00,0x00,0x00,0x00 +}; + const unsigned char imageBar[] = { 110, 21 // width, height ,0x00,0xb6,0xb6,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad @@ -767,10 +854,10 @@ const unsigned char spritePlasma[] = ,0x48,0x07 }; -#define TEXTURES 5 +#define TEXTURES 6 const unsigned char *textures[TEXTURES] = - {texture1, texture2, texture3, texture4, texture5}; + {texture1, texture2, texture3, texture4, texture5, texture6}; unsigned char textureAverageColors[TEXTURES]; @@ -806,8 +893,6 @@ Unit textureAt(int16_t x, int16_t y) if (x >= 0 && x < LEVEL_X_RES && y >= 0 && y < LEVEL_Y_RES) t = max(level[(LEVEL_Y_RES - y -1) * LEVEL_X_RES + x] - 1,0); - t = t == 5 ? 1 : t; // square 6 has the same texture as 1 - return t; }