/** @file assets.h This file containts assets to be used in the game. Textures are stored by columns for cache friendliness (as rendering also happens by columns), 4 bits per pixel, which means an index to 16 color subpalette stored at the beginning of the image. Images can be converted to this format with the provided pything script: python img2array.py -t -c -x32 -y32 -ppalette565.png image.png by Miloslav Ciz (drummyfish), 2019 Released under CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/) plus a waiver of all other intellectual property. The goal of this work is be and remain completely in the public domain forever, available for any use whatsoever. */ #ifndef _SFG_RESOURCES_H #define _SFG_RESOURCES_H #define SFG_TEXTURE_SIZE 32 #define SFG_TEXTURE_STORE_SIZE (16 + (SFG_TEXTURE_SIZE * SFG_TEXTURE_SIZE) / 2) /** Color index which will in textures and sprites be considered transparent. */ #define SFG_TRANSPARENT_COLOR 175 /** Special index of an implicit texture that consists of only transparent pixels. */ #define SFG_TRANSPARENT_TEXTURE 255 static inline uint8_t SFG_getTexel(const uint8_t *texture, uint8_t x, uint8_t y) { x &= 0x1f; y &= 0x1f; return texture[ (texture[16 + (x * SFG_TEXTURE_SIZE + y) / 2] >> (4 * (y % 2 == 0))) & 0x0f]; } SFG_PROGRAM_MEMORY uint8_t SFG_texturesWall[][SFG_TEXTURE_STORE_SIZE] = { { // 0: white wooden planks 4,21,5,3,20,0,2,26,6,18,57,65,1,16,17,49,0,1,0,3,32,1,33,0,161,64,1,16,64,3,3, 32,0,17,16,9,32,1,17,1,161,65,1,16,78,132,35,32,0,17,16,7,32,1,32,17,240,49,0, 16,57,99,87,206,0,18,16,6,33,0,16,1,177,48,0,0,97,0,2,0,0,17,32,6,32,1,0,1,178, 48,0,0,48,0,2,0,0,17,32,7,32,17,1,0,178,48,1,0,49,0,1,0,0,1,16,3,32,18,0,0,194, 48,0,0,48,0,18,4,64,17,32,4,35,0,3,0,194,48,0,0,49,0,34,4,0,17,32,6,130,50,32, 40,242,48,1,0,49,0,18,0,0,2,32,12,85,85,85,85,81,48,2,0,49,0,33,3,0,2,16,3,32,0, 32,2,98,48,1,0,49,0,34,19,0,18,17,3,32,0,32,0,194,48,2,0,0,0,34,3,4,2,16,3,16,0, 32,32,226,48,2,0,48,0,33,19,0,18,33,3,0,16,32,32,178,48,1,1,50,1,34,3,4,17,16,3, 0,16,32,16,162,48,1,64,50,1,34,7,3,1,17,3,0,16,32,16,184,2,2,2,2,48,18,3,0,0,17, 3,0,17,32,16,94,93,93,89,112,0,18,3,0,0,16,3,0,2,32,16,48,48,48,3,0,0,17,4,0,0, 17,3,0,1,32,16,48,48,0,3,1,1,18,3,0,0,32,7,16,1,32,16,48,0,1,0,1,50,34,3,0,1,33, 3,16,1,20,32,112,48,0,16,1,49,34,3,64,16,33,3,4,2,4,16,48,49,0,16,0,49,34,3,64, 0,32,3,16,1,0,0,48,49,0,16,65,48,34,3,49,0,17,3,16,2,0,0,48,49,1,32,0,49,34,3, 64,0,16,19,16,2,1,0,113,49,17,16,0,48,32,3,0,0,16,19,16,1,2,0,97,66,17,32,64,48, 33,19,34,2,0,137,16,1,18,0,97,49,17,16,66,64,32,3,84,212,105,69,16,1,17,0,97,49, 18,16,50,48,16,19,51,48,51,51,16,1,16,0,98,50,1,19,66,48,32,3,0,1,0,3,32,1,33,0, 177,49,2,16,66,64,16,3,0,1,0,7,32,1,16,1,82,64,1,16,50,0,16,35,0,1,0,9,33,2,32, 0,161,64,1,20,48,0,0,32 }, { // 1: skyscraper window 4,5,3,6,2,81,0,59,48,128,138,131,66,44,137,129,16,176,208,176,44,33,0,0,1,43,1, 13,0,32,29,0,0,176,0,0,12,64,0,17,0,32,0,17,1,32,13,11,0,176,0,208,4,65,0,0,0, 34,1,16,1,32,16,0,23,32,0,2,40,66,2,194,230,140,34,208,2,176,17,0,119,76,66,34, 34,34,34,34,34,34,34,34,34,116,64,0,72,194,51,51,51,51,17,49,51,19,19,49,51,12, 34,36,17,210,49,17,16,17,1,17,17,16,17,1,17,42,1,17,17,2,49,154,116,244,229,164, 233,85,49,16,17,14,1,16,2,69,17,104,79,117,149,88,94,137,49,17,17,36,0,0,196,69, 48,137,119,69,84,79,88,85,49,17,1,4,92,244,0,34,0,69,85,95,127,116,86,89,49,17, 17,36,0,0,17,32,1,169,88,229,228,74,85,85,49,19,1,4,0,0,0,2,49,90,153,85,85,169, 95,85,49,16,17,4,2,0,0,39,48,68,85,233,138,37,133,136,49,17,17,36,0,32,0,4,17, 122,150,84,133,230,136,136,49,1,17,10,0,0,0,44,48,35,51,51,51,51,51,35,49,17,1, 66,0,13,0,4,17,51,3,211,3,3,35,2,49,17,17,34,0,0,0,37,49,167,42,70,106,69,102, 102,49,0,17,36,2,34,68,244,48,39,119,79,69,150,102,102,49,17,17,68,64,34,16,76, 49,119,2,127,120,102,102,102,49,17,19,5,0,1,1,74,49,114,119,4,152,102,104,102, 49,17,17,75,0,0,208,28,49,119,39,116,248,104,134,102,49,16,17,34,0,0,0,10,17,39, 114,37,169,104,136,86,49,16,17,4,0,0,1,43,49,114,126,232,74,102,104,134,49,1,0, 34,0,32,0,116,17,119,122,102,88,102,102,102,49,16,17,66,0,0,1,36,49,17,17,17,17, 17,17,17,1,1,1,64,0,0,32,184,49,17,49,17,17,19,51,17,17,17,19,178,0,34,44,66,34, 71,39,34,180,36,66,34,2,32,32,192,17,19,66,192,0,16,176,66,34,34,34,200,36,34, 34,36,68,44,221,192,0,0,10,32,0,16,1,34,16,16,0,11,0,16,13,64,0,0,10,0,0,0,1,34, 0,1,1,2,16,0,1,176,27,0,11,33,0,17,0,112,0,1,17,113,16,0 }, { // 2: pink high-tech wall 83,4,12,5,84,20,61,85,13,6,11,3,7,14,15,0,34,32,34,0,32,2,170,34,170,160,170, 160,17,17,17,17,34,34,32,34,42,34,170,2,42,42,170,170,17,17,17,17,34,34,34,36, 34,160,36,32,160,160,42,10,49,17,17,17,34,34,34,42,34,0,0,0,0,0,0,4,49,49,17,17, 34,34,2,10,36,32,17,17,81,17,81,23,59,59,59,17,0,0,0,0,2,0,84,84,96,0,0,0,59,59, 49,19,102,102,102,102,96,32,20,86,0,102,102,102,145,59,59,19,34,34,34,36,96,32, 21,86,5,85,85,23,59,59,49,19,34,34,34,42,96,64,21,86,5,85,69,71,145,155,49,49, 34,34,66,37,96,128,84,86,5,85,91,23,49,49,49,19,34,34,0,0,0,0,0,0,4,84,69,87, 145,155,49,49,34,38,6,102,102,102,102,96,68,84,84,23,145,145,145,51,34,38,2,37, 88,32,68,69,69,85,85,71,49,145,49,51,40,134,2,34,130,64,21,69,85,84,21,23,145, 145,147,51,36,38,4,68,68,64,84,85,85,84,20,71,145,145,49,51,37,38,2,66,68,32,69, 85,85,85,69,87,145,145,147,51,40,134,5,84,72,64,20,65,69,68,20,71,145,193,147, 51,36,70,2,72,136,112,68,65,20,84,20,87,145,145,51,57,40,134,8,133,132,32,84,84, 17,84,68,87,195,147,147,51,40,134,8,88,136,112,21,17,17,68,17,23,147,51,51,51, 36,134,4,133,136,112,81,17,17,68,65,87,147,147,51,57,40,134,0,0,0,0,0,0,65,20, 68,71,147,57,147,57,39,120,102,102,102,102,102,102,1,17,84,71,153,51,57,57,40, 119,135,119,96,112,17,22,1,17,68,183,147,57,51,51,37,120,135,120,96,112,177,22, 1,17,17,87,153,147,57,57,37,136,136,135,96,32,65,22,1,20,91,71,60,57,57,57,0,0, 0,0,96,112,84,22,96,0,0,0,57,57,60,57,102,102,102,102,104,128,75,181,102,102, 102,102,60,57,51,60,39,119,135,119,120,112,180,84,180,181,75,183,57,60,57,57,34, 136,135,215,231,116,119,119,119,119,119,119,60,51,60,60,37,120,135,114,119,135, 125,120,116,212,68,114,60,60,57,57,34,117,136,135,135,120,132,136,136,136,136, 71,57,57,57,153 }, { // 3: partly mossy concrete wall 4,3,5,36,20,37,76,12,11,19,77,130,13,35,2,0,2,0,0,80,32,0,0,1,5,37,1,64,4,25,19, 145,0,32,96,32,0,16,48,24,115,48,65,53,48,16,113,11,2,0,0,0,0,0,0,152,3,48,49, 48,51,19,1,17,0,32,16,48,0,16,0,8,0,0,1,67,0,23,19,17,2,0,5,48,0,16,0,24,115,65, 113,85,67,16,0,17,2,0,18,0,0,0,0,6,4,0,0,67,48,19,145,17,0,0,3,80,80,0,0,1,3,80, 19,3,83,16,9,1,2,0,210,0,0,16,0,1,148,3,1,48,51,16,17,17,19,0,16,48,0,16,0,24,5, 64,113,51,3,49,1,11,2,0,0,34,0,0,0,8,85,3,1,67,84,3,112,17,0,36,5,4,32,96,0,8,4, 4,3,52,83,16,17,1,34,0,2,32,0,0,7,1,3,32,49,3,51,119,49,113,4,32,96,66,0,0,0,7, 5,84,1,51,67,112,0,30,2,32,98,32,10,0,0,8,68,32,64,5,3,49,0,14,2,2,96,0,0,96,0, 6,5,80,49,48,51,112,1,27,0,32,2,0,1,96,0,1,51,0,1,3,51,27,0,27,2,0,96,32,0,0,6, 8,0,48,3,3,48,208,24,1,2,32,98,4,32,0,0,6,4,36,3,0,51,0,16,17,34,194,96,34,0,96, 0,6,50,48,1,83,67,144,0,8,0,42,2,36,0,0,162,8,5,32,65,64,48,23,1,1,2,32,100,34, 6,0,12,8,68,50,1,0,3,16,112,1,36,34,2,0,0,0,0,8,0,0,0,48,0,23,7,17,2,42,4,32,42, 0,0,8,5,64,64,35,0,135,0,1,2,64,98,44,6,0,32,8,48,48,1,85,0,17,0,49,2,32,3,2,0, 4,0,8,5,64,0,0,4,0,112,1,4,34,98,2,6,98,32,8,85,36,48,67,5,1,0,11,2,32,98,192, 160,4,52,8,4,0,1,4,0,0,112,113,2,194,2,0,0,0,2,1,5,85,64,211,4,48,0,1,2,32,0,42, 0,21,4,8,64,68,45,4,48,0,23,27,2,32,96,0,0,16,0,1,5,80,0,85,3,16,0,1,2,194,0,0, 0,16,48,17,84,85,0,48,64,144,25,17,0,32,96,0,0,0,64,13,3,68,0,5,48,16,0,17 }, { // 4: wooden chess pattern 20,12,11,21,2,43,19,73,1,83,81,10,9,34,42,65,86,82,91,85,89,249,149,153,66,34, 40,34,34,114,34,36,0,0,0,48,48,35,0,2,33,18,39,17,17,66,17,18,0,0,5,48,3,96,3, 50,33,34,40,33,33,113,17,18,96,0,6,48,3,99,3,50,33,34,23,33,18,129,17,18,80,3,5, 48,3,99,3,54,33,33,23,18,17,114,17,18,80,0,5,48,3,99,0,54,33,34,20,34,33,114,33, 18,80,0,2,48,51,163,3,54,65,34,20,34,33,65,33,18,80,3,2,48,0,163,0,54,33,34,20, 34,17,66,33,18,0,0,2,3,0,67,0,53,177,34,20,34,17,130,33,18,0,0,2,51,0,211,0,5, 33,34,36,34,17,114,18,18,80,0,6,3,0,99,0,53,33,34,20,18,33,113,17,18,0,3,2,48,3, 99,0,6,65,33,20,18,33,65,17,18,0,0,2,0,0,96,0,6,34,34,20,17,33,129,17,18,0,0,5, 0,0,99,0,1,33,34,36,17,33,130,17,18,3,3,53,48,0,35,0,6,65,17,20,17,17,66,17,18, 80,85,86,5,85,224,85,85,68,68,72,66,68,132,68,36,66,34,20,34,34,66,34,36,96,0,5, 5,80,80,85,82,65,34,20,33,34,65,18,18,3,3,53,48,3,83,0,5,65,34,20,18,34,65,18, 34,51,51,54,51,3,80,5,5,66,34,20,18,34,65,18,18,51,51,53,51,3,80,5,5,66,34,20, 17,33,65,17,18,0,51,54,51,3,80,5,5,65,34,20,17,17,65,17,34,51,51,53,51,3,80,0,0, 65,34,20,17,17,65,17,18,0,51,54,48,51,80,0,0,66,34,20,17,18,65,17,18,3,51,54,48, 51,80,5,5,65,34,20,17,33,65,17,18,3,51,54,51,51,32,0,5,65,34,20,17,33,65,17,18, 3,51,54,51,51,80,1,5,65,34,20,17,33,65,34,34,3,51,59,48,51,80,5,85,65,34,20,17, 17,66,34,36,3,51,52,48,3,83,1,5,65,34,20,17,17,68,17,20,3,51,54,48,48,35,48,5, 65,33,20,34,17,66,17,18,3,0,52,51,51,35,48,5,65,33,20,17,17,65,18,18,3,51,54,51, 0,35,48,5,32,80,106,0,80,101,6,2,85,85,92,86,86,160,5,82 }, { // 5: red brick wall 13,5,6,21,93,101,4,100,11,7,19,3,106,178,0,0,33,17,22,37,48,8,33,3,54,33,64,0,1, 20,5,70,37,0,88,37,85,88,32,64,4,17,64,0,65,20,0,70,32,51,56,37,85,8,33,0,4,17, 83,51,81,20,96,70,32,3,52,38,51,8,33,3,4,18,83,51,81,20,85,70,38,6,4,32,51,8,33, 3,4,18,64,51,81,20,85,69,38,0,4,38,3,52,33,83,5,17,67,51,81,20,101,70,38,0,4,38, 83,4,17,83,0,17,67,51,81,20,101,68,38,0,4,38,69,68,17,86,80,18,69,85,65,36,101, 68,32,85,4,34,17,17,33,86,83,18,18,34,34,36,0,88,33,0,4,34,34,18,33,83,0,18,17, 17,17,36,0,84,35,3,56,34,64,76,17,83,48,98,112,0,119,36,0,68,35,0,4,34,133,4,18, 3,48,98,113,0,17,36,0,85,33,0,4,34,133,100,17,81,48,98,112,0,1,36,0,86,35,0,8, 33,165,68,17,67,53,98,113,0,1,36,85,86,35,0,4,33,69,106,17,64,53,98,112,0,1,20, 85,86,35,0,4,33,133,68,17,64,53,18,112,0,1,20,5,86,35,0,4,33,166,84,17,64,53,18, 112,0,1,20,5,86,35,3,4,33,69,10,17,80,53,18,112,0,1,36,85,86,35,0,52,34,69,100, 33,83,5,18,112,0,113,40,5,84,33,64,8,33,69,4,33,69,68,18,112,0,1,36,0,22,33,0,4, 33,0,52,17,34,34,18,112,0,1,34,34,145,34,41,146,33,0,4,17,17,17,18,113,17,1,36, 99,22,38,80,49,33,69,4,32,0,4,98,112,17,17,36,51,6,32,80,4,33,69,106,35,3,53,98, 112,0,17,36,51,6,33,3,52,33,69,72,35,51,53,18,16,0,17,37,51,6,33,3,52,17,69,84, 35,51,53,98,112,0,17,37,51,6,33,1,52,17,69,100,35,51,48,98,113,17,17,21,3,6,35, 3,52,17,67,4,35,51,48,98,112,0,17,16,51,6,35,3,53,17,69,100,33,49,19,97,112,0, 17,37,51,6,35,3,4,17,212,4,33,3,51,98,1,0,1,36,3,6,35,3,52,18,34,34,33,3,48,177, 34,153,146,36,51,54,33,3,52,34,49,17,33,3,48,98,70,102,17,36,0,6 }, { // 6: grass-covered concrete wall, tiles with skyscraper window 36,37,43,35,4,3,107,34,131,50,42,5,106,110,114,26,3,131,51,128,58,52,0,5,84,56, 84,2,0,48,66,0,48,128,5,5,10,112,0,68,0,48,85,68,4,144,32,1,6,32,17,0,7,116,80, 0,85,153,36,13,0,1,0,0,16,1,1,0,54,115,3,160,110,234,55,1,208,40,1,0,170,96,0, 39,115,51,51,144,0,51,144,0,0,16,0,2,17,16,17,208,11,187,20,0,2,43,64,32,17,16, 0,44,17,1,0,16,3,1,0,2,0,3,64,0,0,32,32,0,1,16,17,0,1,3,2,96,32,37,64,0,2,0,2, 32,17,16,1,1,0,0,34,128,32,0,1,16,16,32,0,32,1,0,0,0,16,8,0,2,2,2,2,0,32,2,32,0, 34,1,19,48,5,96,0,2,0,32,0,17,1,2,0,16,1,18,16,65,16,0,32,0,1,2,2,4,0,8,32,2,1, 39,18,4,1,32,0,208,0,0,0,1,16,0,2,0,0,18,19,48,0,16,13,0,1,0,32,18,16,0,0,0,16, 1,0,0,16,65,16,0,0,33,1,16,0,54,0,38,0,6,64,0,129,0,0,0,0,1,0,0,0,9,63,50,2,2,8, 2,32,0,18,0,17,0,1,17,96,0,5,80,32,0,0,0,0,18,69,80,0,1,16,48,1,0,32,153,206,32, 2,2,32,17,4,64,96,32,0,17,0,224,0,131,64,0,0,0,1,0,4,8,0,0,16,16,1,18,96,0,2,2, 0,34,32,2,0,0,5,0,0,96,2,0,32,0,2,0,2,0,17,0,0,0,85,34,32,0,0,0,0,0,2,0,1,16,48, 0,33,2,68,0,2,2,0,16,0,32,32,32,38,1,32,0,0,34,6,0,0,48,3,0,8,0,0,0,18,16,0,0, 98,0,32,0,0,0,33,32,0,32,0,17,17,0,0,0,33,32,0,0,4,49,18,0,2,16,2,1,66,0,98,2,0, 0,0,34,0,17,1,0,0,0,17,0,17,33,2,0,12,126,199,112,39,0,16,6,21,0,16,16,0,16,32, 32,167,51,63,62,172,151,113,0,0,2,0,1,17,48,16,16,48,69,4,51,64,64,0,16,8,96,27, 16,16,16,62,57,149,0,4,51,0,1,4,7,80,2,0,17,1,51,8,52,0,68,0,32,0,4,68,36,16,32 }, { // 7: steel door 4,80,3,17,5,59,6,69,58,50,60,2,68,74,70,67,1,17,17,17,17,17,17,17,17,17,17,17, 17,17,17,17,22,102,70,102,70,102,70,102,70,100,102,100,102,100,102,97,16,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,1,16,0,32,0,32,0,32,0,32,2,0,2,0,2,0,1,19,189,187,221,189, 219,219,219,187,187,187,219,189,189,189,177,17,51,51,51,51,51,51,51,51,51,51,51, 51,51,51,49,19,136,136,136,133,133,85,95,34,34,44,47,34,194,34,40,19,136,34,34, 34,2,34,34,34,32,34,32,2,2,2,34,19,130,40,140,136,192,197,192,112,112,64,0,0,7, 4,7,19,146,136,200,92,80,122,90,160,0,64,0,7,0,4,0,19,146,149,136,200,84,122, 202,0,0,64,0,0,7,14,0,19,146,153,153,197,94,170,80,112,0,64,0,112,0,4,0,19,146, 37,156,133,112,5,0,0,224,224,0,112,112,4,0,19,146,153,153,87,160,0,7,160,0,64,0, 0,0,4,4,19,146,149,41,149,4,7,80,160,10,71,0,0,7,4,0,19,146,153,146,87,0,170,87, 0,7,64,0,7,0,4,4,19,146,89,204,87,4,167,80,7,0,224,0,0,0,4,0,19,146,153,156,90, 160,122,80,0,14,64,0,0,112,116,4,19,146,149,153,85,116,170,192,0,112,64,112,0,0, 4,0,19,146,41,92,138,84,122,90,0,0,71,0,7,0,4,4,19,146,153,204,80,126,90,202, 224,0,64,0,0,0,4,0,19,146,143,85,32,4,170,90,160,0,71,0,7,7,14,0,19,130,136,140, 128,116,122,202,112,10,64,0,112,0,4,0,19,130,40,200,92,14,170,80,0,170,74,112,0, 112,116,0,19,136,34,34,34,2,2,0,0,32,34,34,34,34,2,34,19,136,136,136,133,34,85, 85,85,37,194,47,34,242,34,34,17,51,51,51,51,51,51,51,51,51,51,51,51,51,51,49,27, 189,221,187,219,219,219,187,221,187,187,221,189,189,189,177,22,102,70,102,70, 102,70,102,70,102,70,100,102,100,102,97,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16,0, 32,0,32,0,32,0,32,0,32,2,0,2,0,1,1,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 }, { // 8: white skull on blue 6,5,4,59,60,62,218,14,3,13,85,139,74,63,12,15,17,17,17,17,17,18,147,69,72,17,17, 17,17,17,17,17,16,16,1,1,16,18,35,51,50,17,1,1,16,16,1,17,16,0,0,0,0,18,36,99, 82,16,16,0,0,0,0,17,0,0,0,0,0,18,37,51,82,17,0,0,0,0,0,1,16,0,0,0,0,18,35,179, 50,17,16,0,0,0,0,1,0,0,0,0,0,18,35,51,66,17,16,0,0,0,0,17,16,0,0,0,1,226,37,67, 84,40,17,0,0,0,0,1,0,0,0,17,42,34,85,83,85,67,33,16,0,0,0,17,0,0,1,18,34,51,34, 34,68,75,98,129,16,0,0,17,16,0,17,162,51,130,34,34,38,198,52,66,129,0,1,17,17, 17,42,36,98,33,17,17,34,51,51,68,98,33,17,17,130,34,36,68,33,17,17,23,121,34,52, 68,51,66,34,34,68,84,53,85,33,0,0,121,151,34,37,85,67,69,221,51,51,68,52,82,16, 0,0,126,151,18,34,133,91,69,84,99,51,107,52,66,0,16,16,247,119,17,34,40,60,67, 51,68,83,99,51,50,1,1,17,0,1,33,18,40,51,51,52,85,75,52,52,66,0,17,17,0,1,33,18, 40,51,68,51,69,51,84,53,82,1,0,16,247,119,17,34,40,70,69,51,51,85,84,52,82,16,0, 0,126,151,18,34,132,70,69,84,99,85,68,52,52,33,0,0,121,151,34,36,52,60,52,85,51, 130,34,35,107,33,17,17,23,121,34,99,107,195,66,34,34,17,17,42,102,98,33,17,17, 34,54,102,102,98,33,17,17,16,0,17,162,68,130,34,34,36,76,102,98,33,0,1,17,0,0,1, 18,35,69,34,34,85,67,194,161,16,0,0,17,16,0,0,17,42,35,69,67,68,75,33,16,0,0,0, 17,0,0,0,0,1,226,35,99,54,42,17,0,0,0,0,1,0,0,0,0,0,18,35,51,66,17,16,0,0,0,0, 17,16,0,0,0,0,18,37,51,82,17,16,0,0,0,0,1,0,0,0,0,0,18,45,51,66,17,0,0,0,0,0,1, 16,0,0,0,0,18,36,99,50,16,16,0,0,0,0,17,16,16,1,1,16,18,35,68,50,17,16,16,16,16, 1,17,17,17,17,17,17,18,148,85,88,17,17,17,17,17,17,17 }, { // 9: red lava with stones 3,4,12,11,83,94,102,92,91,14,93,15,19,20,100,0,3,82,2,83,32,67,84,1,17,17,16,5, 32,17,20,0,2,48,0,67,117,118,36,0,33,33,0,5,33,17,17,19,69,64,17,20,67,86,82,36, 17,1,0,53,1,17,17,64,56,1,17,17,0,130,50,117,131,64,4,39,0,17,17,0,32,1,17,17,3, 82,4,68,39,85,34,98,36,16,0,3,0,0,1,16,3,82,1,16,0,35,53,106,83,51,51,54,85,68, 36,3,53,32,49,17,16,0,54,34,66,35,37,86,67,85,85,34,38,66,1,17,17,0,82,64,64,0, 3,101,0,32,3,34,102,103,65,1,17,3,84,1,17,0,3,83,18,17,0,67,34,68,85,52,0,69,48, 17,17,19,69,0,17,17,20,3,112,0,2,53,51,114,1,17,17,16,69,65,17,17,16,3,80,3,0,4, 46,98,64,17,17,32,115,1,17,18,0,53,64,17,17,16,50,86,34,0,0,0,35,1,0,0,0,37,65, 17,17,17,2,34,119,85,67,66,34,0,51,130,50,98,64,17,17,17,2,35,68,51,85,102,98, 35,51,50,86,102,35,34,2,16,3,132,0,0,4,34,82,35,20,0,66,85,39,120,34,4,2,80,1, 17,4,53,52,0,17,4,3,83,64,2,37,81,69,16,77,17,16,69,16,0,18,16,0,84,16,0,67,66, 38,49,17,17,32,53,32,17,17,17,0,82,0,33,16,3,102,32,0,0,4,84,0,18,17,17,0,84,1, 17,17,4,182,98,64,0,3,84,1,17,17,17,0,83,1,17,17,4,99,37,83,50,50,32,0,33,17,16, 0,83,1,17,33,2,36,0,34,114,118,84,16,17,0,0,3,83,1,17,16,67,49,1,16,4,38,103,51, 64,84,68,53,32,0,17,0,55,32,17,17,0,39,50,39,85,37,82,166,98,36,16,64,34,1,17, 17,16,55,32,0,36,0,4,54,34,117,66,51,84,1,17,17,16,82,0,0,2,17,4,39,64,18,82, 118,98,64,1,17,4,84,16,17,17,18,4,84,4,0,20,53,102,82,32,0,4,84,0,33,17,16,2,32, 1,17,64,39,51,69,85,117,53,156,65,1,18,50,38,36,17,17,16,34,0,0,20,67,102,101, 115,51,51,130,101,101,32,17,4,84,1,17,33,16,38,148,19,56,56 }, { // 10: transparent window 4,175,5,3,59,49,13,60,74,61,50,83,2,12,69,52,2,0,0,2,0,6,0,0,2,0,0,0,0,34,34,0, 96,51,160,0,0,0,0,0,0,0,0,10,0,34,98,32,0,3,51,51,51,51,51,51,51,51,51,51,160, 34,32,0,0,3,10,85,85,85,85,85,85,85,85,160,32,34,34,32,0,3,49,17,17,17,23,64,17, 17,17,147,32,34,34,32,2,3,49,17,17,17,23,64,17,17,17,147,32,34,6,32,0,3,49,17, 17,17,22,64,17,17,17,147,32,211,51,52,0,3,49,17,17,17,16,64,17,17,17,147,32,0,0, 6,13,3,49,17,17,17,16,66,17,17,17,147,32,48,96,0,2,3,49,17,17,17,23,71,17,17,17, 3,32,0,112,0,96,3,48,35,56,184,180,244,136,184,139,131,32,48,0,224,0,3,48,36,68, 68,71,151,68,68,68,115,32,2,2,0,2,3,49,17,17,17,28,76,17,17,17,179,32,38,34,0, 32,3,49,17,17,17,16,64,17,17,17,35,32,2,38,14,208,3,49,17,17,17,23,66,17,17,17, 35,32,34,34,32,32,3,49,17,17,17,23,64,17,17,17,35,32,34,2,0,0,3,49,17,17,17,23, 64,17,17,17,147,32,38,32,2,0,3,49,17,17,17,23,64,17,17,17,147,32,32,2,224,2,3, 49,17,17,17,16,64,17,17,17,147,32,2,0,6,0,3,49,17,17,17,28,76,17,17,17,195,32, 38,2,0,6,3,48,36,68,68,71,151,68,68,68,115,32,34,32,0,0,3,48,35,187,136,180,244, 184,136,139,131,32,34,96,14,32,3,49,17,17,17,29,64,17,17,17,3,32,34,32,0,0,3,49, 17,17,17,16,66,17,17,17,147,32,2,0,0,0,3,49,17,17,17,23,66,17,17,17,35,32,211, 51,52,0,3,49,17,17,17,16,64,17,17,17,147,32,0,0,0,0,3,49,17,17,17,22,64,17,17, 17,147,32,0,32,13,2,3,49,17,17,17,23,64,17,17,17,35,32,0,0,0,38,3,10,85,85,85, 85,85,85,85,85,162,32,38,0,0,32,0,51,34,34,34,34,34,34,34,34,34,48,34,0,0,0,3, 162,34,34,34,34,34,34,34,34,42,0,2,96,6,0,0,0,0,0,2,0,0,0,0,96,0,0,34,34,2 }, { // 11: broken grey brick wall with transparency 4,5,3,175,13,100,20,99,19,21,6,18,12,98,177,168,17,4,16,4,18,33,0,16,0,0,0,17,0, 4,16,18,16,1,16,1,0,42,17,65,192,1,12,28,0,17,4,2,16,16,0,16,16,10,16,17,1,0,2, 169,16,0,0,0,16,1,4,17,1,33,16,16,4,0,2,16,65,1,1,0,16,64,17,12,17,10,0,1,0,16, 18,169,16,20,0,0,17,16,17,17,17,42,16,64,1,65,2,164,0,0,0,0,16,17,65,17,65,10, 16,0,0,4,18,16,0,1,12,0,16,17,16,1,17,0,2,34,32,34,0,17,0,0,0,18,17,65,20,17,17, 194,34,34,34,34,32,20,16,0,0,192,17,17,17,16,65,34,216,230,149,51,16,16,1,65,0, 18,17,17,17,17,17,2,119,184,149,99,113,16,0,16,16,0,17,145,65,1,0,194,123,189, 149,85,209,160,0,65,1,2,17,17,17,65,17,34,125,190,247,143,26,18,32,0,64,2,160, 17,17,17,20,2,221,243,56,181,218,160,17,16,40,32,17,145,1,20,17,34,239,63,229, 86,239,16,1,17,17,17,17,16,193,17,16,34,51,226,121,110,49,16,17,16,0,12,17,17, 16,20,0,194,62,119,106,111,49,16,64,0,0,0,20,17,65,0,16,34,248,141,153,95,49,16, 17,64,0,0,34,0,34,34,194,32,150,110,153,101,1,160,16,17,64,0,0,0,0,0,0,249,134, 136,137,101,81,16,17,16,16,98,48,102,136,135,215,104,136,136,217,101,81,160,4,0, 0,0,57,93,187,187,119,119,120,187,230,150,81,160,0,0,0,64,239,238,120,187,215, 120,142,239,150,219,80,16,0,12,0,0,51,55,103,119,93,139,227,233,150,101,176,16, 0,0,16,0,51,233,109,51,253,241,17,17,17,17,28,16,64,1,0,2,51,121,91,51,51,17,16, 0,0,0,2,16,0,0,16,194,59,150,91,51,51,17,10,0,0,0,2,16,0,0,0,0,59,153,93,51,50, 26,64,1,0,0,2,16,0,192,16,2,51,137,85,222,231,17,16,64,0,4,2,160,0,4,0,66,51, 250,101,85,85,26,0,0,0,16,2,16,2,2,1,2,51,53,150,85,88,42,0,2,0,2,2,16,34,34,34, 34,51,251,185,103,221,33,2,0,0,32,2,17,17,17,17,17 }, { // 12: gray square-tiled wall 4,5,3,13,50,6,12,21,85,20,14,11,19,22,84,0,17,17,17,17,17,17,17,18,17,17,17,17, 17,17,17,20,17,3,16,8,17,16,0,18,17,16,1,1,0,3,16,18,16,1,16,1,0,49,17,48,17,1, 3,6,0,17,3,2,16,16,0,16,16,24,16,16,17,0,0,23,16,0,0,2,16,1,3,17,1,16,16,18,19, 0,0,0,49,1,1,2,16,48,17,6,17,17,0,0,16,16,16,119,16,19,0,2,17,16,17,17,17,26,16, 50,17,49,0,19,0,0,0,2,16,17,49,17,129,17,16,2,16,3,16,0,0,1,6,2,16,17,16,1,17, 17,16,2,17,0,17,1,0,0,0,18,17,49,24,17,17,129,16,6,16,113,49,3,16,0,0,98,17,17, 17,16,49,0,96,9,16,16,0,0,1,49,0,18,17,17,17,17,17,16,1,2,81,1,0,32,0,16,16,2, 17,161,129,1,0,48,0,4,16,0,48,16,0,49,1,2,17,17,17,49,17,0,0,16,16,0,16,16,0,0, 48,2,80,17,17,17,19,17,48,0,16,16,0,0,0,17,6,2,32,48,32,6,0,34,32,98,2,34,34,38, 2,34,34,34,21,81,21,85,81,21,81,86,85,21,17,17,21,81,17,27,17,17,16,19,0,48,1,0, 16,0,0,0,48,0,0,2,19,17,49,0,17,1,17,2,22,1,0,1,1,48,0,2,16,17,0,0,48,0,49,2,80, 6,0,0,16,1,48,2,16,48,0,0,16,16,112,50,16,0,0,1,0,16,16,148,17,1,49,0,0,49,0,28, 16,0,0,48,3,0,0,2,16,0,3,1,0,0,17,18,16,3,0,0,0,0,0,50,17,113,1,3,0,0,48,2,16,0, 0,0,0,6,0,2,16,0,0,0,0,48,0,18,16,0,0,0,0,0,0,2,17,0,0,0,0,0,3,2,208,0,3,0,48,0, 0,4,17,112,48,19,16,0,0,18,17,0,0,0,0,0,16,100,16,17,9,1,1,16,1,2,22,0,0,0,0,0, 0,2,16,1,0,16,3,0,48,0,16,0,0,0,0,224,0,4,16,48,3,1,0,0,16,50,16,3,0,48,0,3,0, 52,16,16,1,16,0,0,0,2,16,16,0,0,2,2,1,4,68,66,32,34,36,34,34,36,34,36,34,34,68, 68,68,68 } }; SFG_PROGRAM_MEMORY uint8_t SFG_sprites[][SFG_TEXTURE_STORE_SIZE] = { { // 0: barrel 175,6,84,15,11,19,13,7,176,22,2,0,5,20,83,93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,136,0,0,0,0,0,0,8, 128,0,0,0,0,0,0,136,136,136,139,139,139,187,187,139,139,187,184,187,187,139,136, 136,136,136,136,136,168,168,168,170,136,170,138,170,138,138,168,168,170,20,170, 170,133,170,84,84,132,85,85,84,84,164,20,90,164,20,68,164,69,37,69,36,37,68,68, 85,69,84,20,90,68,68,244,85,82,68,232,136,170,34,85,68,84,66,93,42,212,68,101, 102,34,228,228,34,110,174,38,34,36,84,66,100,252,98,98,34,46,226,34,98,34,110, 162,34,34,34,37,205,44,20,34,34,78,38,78,133,136,226,238,34,34,34,20,29,33,20, 38,34,241,194,28,37,132,170,26,38,18,98,20,18,33,145,18,18,225,17,33,36,133,133, 226,34,18,25,18,29,33,17,17,31,17,17,18,69,66,49,33,241,17,17,25,18,33,49,17,31, 50,74,165,95,209,17,49,241,49,17,49,29,33,49,19,122,113,122,68,252,147,115,17, 247,49,19,19,29,33,18,119,114,119,119,116,66,39,55,199,241,23,19,18,18,33,18,23, 124,199,119,245,68,68,255,76,199,113,119,21,109,33,119,119,19,247,20,84,255,85, 77,114,113,119,115,115,98,33,55,55,51,198,55,60,47,229,214,198,51,115,49,25,29, 241,51,51,51,61,195,49,51,145,22,211,19,17,51,17,205,76,147,51,51,51,109,99,19, 102,242,17,17,145,25,41,196,66,51,147,51,17,57,100,85,66,193,50,49,25,18,25,202, 162,21,105,150,57,49,17,49,145,17,17,25,18,19,25,106,162,21,105,150,57,49,17,49, 145,17,17,17,18,19,22,106,162,57,102,153,145,145,145,17,99,33,17,145,97,34,54, 40,130,68,111,246,98,102,18,97,34,146,34,34,34,34,34,40,130,0,0,0,0,0,0,2,32,0, 0,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } }; SFG_PROGRAM_MEMORY uint8_t SFG_backgrounds[][SFG_TEXTURE_STORE_SIZE] = { { // 0, city 64,73,10,168,19,12,14,13,80,101,0,100,136,57,59,63,34,34,34,68,87,119,119,119, 118,8,0,16,0,28,17,17,34,34,36,85,84,85,119,118,102,96,0,129,129,1,17,17,34,34, 36,66,68,69,119,102,99,48,48,0,1,16,17,17,34,34,34,34,68,68,87,118,102,102,104, 0,1,12,17,17,34,34,34,36,69,69,51,51,0,8,0,192,1,16,17,17,34,34,34,36,85,87,58, 170,163,51,0,0,0,1,17,17,34,34,34,68,85,119,218,170,51,192,48,0,0,16,17,193,34, 34,34,68,85,119,51,51,48,3,0,0,129,17,17,17,34,34,68,68,85,119,119,102,102,104, 48,24,16,16,17,17,34,34,36,69,87,119,119,102,102,102,128,128,0,1,17,17,34,34,34, 69,87,51,51,51,0,8,48,24,16,16,17,17,34,34,34,36,87,58,250,250,227,51,0,0,128,1, 17,17,226,34,34,36,85,58,170,170,51,48,48,0,16,16,17,17,34,34,34,68,85,51,61,51, 48,51,8,129,129,1,17,17,34,34,36,69,103,149,85,95,102,0,56,0,0,28,17,17,34,34, 34,69,85,153,85,89,111,3,13,0,0,1,17,17,34,34,34,68,85,153,51,51,0,8,8,0,0,16, 17,17,34,34,34,68,75,153,51,51,48,0,140,0,0,1,17,17,34,34,34,68,75,185,51,51,0, 8,48,0,0,16,17,17,34,34,66,69,51,51,58,170,163,51,192,0,0,1,17,17,34,34,68,69, 63,207,170,170,51,48,192,0,0,16,17,17,34,34,78,69,51,51,51,51,48,208,136,128,12, 1,17,17,238,34,78,68,85,187,153,185,144,8,48,24,16,28,17,17,34,34,36,68,69,91, 185,179,48,0,0,0,0,1,28,17,34,34,68,68,75,185,187,179,0,8,48,0,192,16,17,17,226, 36,69,85,84,185,187,147,48,0,136,128,0,1,17,17,34,68,69,85,119,121,187,185,150, 104,8,16,0,16,17,17,34,34,68,69,87,105,187,153,246,102,102,128,0,1,17,17,34,34, 36,85,87,105,185,156,0,8,8,0,0,16,17,17,34,34,36,84,86,105,150,102,102,3,192,0, 1,1,17,17,34,34,36,68,71,103,118,108,0,8,0,24,17,16,17,17,34,34,34,68,71,102, 103,102,246,102,248,128,0,1,17,17 } }; SFG_PROGRAM_MEMORY uint8_t SFG_weaponImages[][SFG_TEXTURE_STORE_SIZE] = { { // 0, knife 175,0,5,2,6,4,3,83,1,77,85,61,60,62,63,75,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,1,153,163,16,0,0,0,0,0,0,0,0,0,0,0,0,1,170, 167,16,0,0,0,0,0,0,0,0,0,0,0,0,1,154,151,16,0,0,0,0,0,0,0,0,0,0,0,0,0,26,119,16, 0,0,0,0,0,0,0,0,0,0,1,17,17,58,119,16,0,0,0,0,0,0,0,0,1,17,20,78,219,57,115,16, 0,0,0,0,0,0,0,17,29,68,68,68,219,57,49,17,17,0,0,0,0,0,17,34,68,238,68,68,219, 57,131,102,102,0,0,0,0,17,85,34,68,68,68,68,43,63,134,102,102,0,0,0,17,34,85,36, 68,78,66,34,37,63,54,102,102,0,0,17,34,36,34,34,36,68,213,188,86,63,54,51,51,0, 1,34,36,43,181,82,34,34,43,44,86,63,51,51,51,0,18,36,69,204,205,34,68,66,34,85, 86,63,51,51,51,1,34,75,204,85,180,68,68,68,37,82,86,63,51,51,51,1,36,188,181,91, 45,222,238,210,85,34,86,63,131,51,136,22,102,102,101,101,82,46,66,34,85,85,86, 57,136,136,136,17,17,17,129,17,17,18,82,38,85,101,86,57,56,136,136,0,0,0,0,0,0, 1,18,83,92,133,83,57,120,17,17,0,0,0,0,0,0,0,8,136,83,22,83,58,119,128,0,0,0,0, 0,0,0,0,0,0,17,1,104,57,119,128,0,0,0,0,0,0,0,0,0,0,0,0,17,58,119,128,0,0,0,0,0, 0,0,0,0,0,0,0,0,26,119,16,0,0,0,0,0,0,0,0,0,0,0,0,1,154,151,16,0,0,0,0,0,0,0,0, 0,0,0,0,1,170,167,16,0,0,0,0,0,0,0,0,0,0,0,0,1,153,163,16,0,0,0,0,0,0,0,0,0,0,0, 0,0,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, { // 1, shotgun 175,1,3,4,6,101,5,17,7,100,2,99,19,21,25,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,17,0, 0,0,0,0,0,0,0,0,0,0,0,17,17,121,153,0,0,0,0,0,0,0,0,0,0,1,17,100,55,149,85,0,0, 0,0,0,0,0,0,1,17,22,67,70,121,85,221,0,0,0,0,0,0,0,17,19,52,136,65,38,123,85, 221,0,0,0,0,0,17,17,102,104,132,68,97,38,123,149,93,0,0,0,0,17,70,68,136,68,52, 136,52,70,123,149,93,0,0,0,1,68,36,132,72,131,100,67,54,99,123,185,93,0,0,0,20, 68,36,136,136,67,54,34,97,35,126,185,85,0,0,0,24,138,72,132,102,102,34,163,49, 35,126,235,85,0,0,1,68,74,68,70,102,102,51,51,51,51,39,170,85,0,0,1,68,67,67,51, 51,51,50,34,34,33,42,126,149,0,0,113,19,51,163,34,34,34,34,34,34,33,42,119,149, 0,5,190,225,47,162,242,255,255,255,250,250,175,167,113,233,0,7,119,238,238,119, 119,119,23,23,17,17,17,113,17,238,0,0,1,238,239,255,204,204,204,204,204,204,255, 167,113,233,0,7,119,238,236,153,149,85,85,85,85,85,153,204,113,149,0,5,190,225, 51,242,34,34,34,34,34,34,33,34,119,149,0,0,113,20,67,52,68,136,68,70,102,51,49, 34,123,85,0,0,1,136,138,72,136,136,136,132,68,136,136,98,121,85,0,0,1,68,74,100, 68,68,132,72,136,65,40,103,185,93,0,0,0,19,58,52,102,102,68,51,52,65,38,55,149, 93,0,0,0,22,102,166,51,51,58,35,34,100,70,123,85,221,0,0,0,1,102,51,51,35,58, 162,42,163,51,123,85,221,0,0,0,0,17,34,102,50,34,175,34,161,34,123,149,93,0,0,0, 0,0,17,17,38,102,99,50,161,42,123,149,93,0,0,0,0,0,0,0,17,19,50,102,106,42,123, 185,85,0,0,0,0,0,0,0,0,1,17,18,58,58,126,185,85,0,0,0,0,0,0,0,0,0,0,1,17,51,167, 235,85,0,0,0,0,0,0,0,0,0,0,0,0,17,17,122,153,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,17, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, { // 2, rocket launcher 175,2,0,115,7,117,116,6,37,114,5,38,39,1,25,33,0,0,0,0,0,0,0,0,0,0,0,0,0,2,34, 32,0,0,0,0,0,0,0,0,0,0,0,2,34,42,129,18,0,0,0,0,0,0,0,0,0,0,0,39,119,168,26,18, 0,0,0,0,0,0,0,0,0,0,0,40,136,136,26,18,0,0,0,0,0,0,0,0,0,0,0,33,17,17,17,210,0, 0,0,0,0,34,34,0,0,0,2,45,221,221,221,221,0,0,0,2,34,17,17,34,2,34,37,85,109,217, 153,217,0,0,2,42,161,17,17,17,37,85,85,102,57,217,152,136,0,0,42,161,17,17,54, 102,86,102,51,51,99,118,101,85,0,2,138,17,17,51,51,51,51,102,102,101,103,85,85, 85,0,40,113,17,19,102,86,102,102,101,85,136,135,136,187,187,0,39,113,17,85,85, 85,85,85,136,187,168,123,203,188,187,0,36,17,19,88,136,136,136,136,119,119,120, 71,119,119,119,2,116,17,21,184,138,170,119,119,119,119,200,71,204,204,204,2,68, 17,21,204,204,68,68,68,68,68,74,68,68,68,238,2,68,17,21,204,68,68,68,68,68,68, 74,68,68,78,187,2,116,17,21,136,136,139,187,187,187,188,200,76,204,229,186,2, 164,17,19,56,136,136,136,85,85,88,136,123,187,235,168,2,167,17,19,51,51,51,102, 102,102,85,134,120,136,229,88,0,39,17,17,51,51,51,51,51,51,54,99,118,104,229, 168,0,42,129,17,249,153,51,51,51,51,51,51,115,51,229,168,0,42,161,17,31,249,153, 153,153,147,51,51,55,51,229,168,0,2,170,17,17,253,223,255,255,153,153,153,55,51, 235,168,0,0,42,161,17,17,253,223,17,255,255,249,147,121,235,168,0,0,2,42,161,17, 17,17,45,241,255,255,243,121,229,168,0,0,0,2,34,17,17,34,2,34,47,255,241,247, 235,168,0,0,0,0,0,34,34,0,0,0,2,34,47,22,229,168,0,0,0,0,0,0,0,0,0,0,0,0,2,34, 234,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,53,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,2,227,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34 } }; /* TODO: ENEMIES: create a functions that will take enemy ID and frame type (idle, attacking, ...) and will return pointer to sprite representing it -- allows reusing sprites and saving memory (e.g. a fyling monster can have same frame for idle and walking, some enemies can share the same dead sprite etc.). Also: add flip option to sprite drawing function so that some frames can be reused flipped (good for walk anims). */ SFG_PROGRAM_MEMORY uint8_t SFG_monsterSprites[][SFG_TEXTURE_STORE_SIZE] = { { // 0, spider idle 175,0,4,3,5,6,223,1,7,10,2,20,62,95,120,18,0,1,17,16,0,0,0,0,0,0,0,0,1,17,16,0, 0,20,45,65,0,0,0,0,0,0,0,0,21,52,33,0,1,65,170,20,16,0,0,0,0,0,0,17,133,50,51, 16,1,218,211,162,16,0,0,0,0,0,17,133,84,17,17,17,1,42,61,173,16,1,0,0,0,1,133, 84,33,0,0,0,1,65,170,20,17,1,16,0,1,24,85,73,16,0,0,0,0,20,210,71,119,19,81,0,0, 1,19,146,16,0,0,0,1,115,17,115,115,68,65,0,0,0,1,66,49,0,0,0,20,36,119,41,37,69, 85,16,0,0,1,66,49,17,17,0,18,50,115,21,85,68,68,33,0,1,17,51,133,52,66,16,20,45, 113,28,197,66,66,65,1,24,136,85,85,50,35,49,1,17,37,86,198,196,34,33,0,1,85,85, 68,153,153,145,0,21,85,70,140,102,34,34,16,0,147,57,147,51,35,16,0,17,119,60, 104,102,98,34,46,238,191,66,243,17,17,17,1,57,115,115,38,108,198,34,231,243,187, 116,33,0,0,0,18,49,153,151,34,104,198,62,255,59,180,51,112,0,0,0,18,49,51,55,34, 104,198,62,255,59,180,51,112,0,0,0,1,57,121,115,38,108,198,34,231,243,187,116, 33,0,0,0,0,17,119,60,104,102,98,34,46,238,191,66,147,17,17,17,0,21,85,70,140, 102,34,34,16,0,148,41,147,51,35,16,1,17,37,86,198,196,34,33,0,1,136,136,133,153, 153,145,20,45,113,28,197,66,66,65,1,21,85,85,85,52,66,49,18,50,115,21,85,84,68, 33,0,1,17,51,133,50,35,16,20,36,119,41,37,85,85,16,0,0,1,66,55,17,17,0,1,115,17, 115,115,68,65,0,0,0,1,66,49,0,0,0,0,20,45,71,119,19,81,0,0,1,19,50,16,0,0,0,1, 65,170,20,17,1,16,0,1,24,136,137,16,0,0,0,1,218,61,162,16,1,0,0,0,1,133,85,129, 0,0,0,1,42,211,173,16,0,0,0,0,0,17,69,85,17,17,17,1,65,170,20,16,0,0,0,0,0,0,17, 69,50,35,16,0,20,210,65,0,0,0,0,0,0,0,0,20,50,49,0,0,1,17,16,0,0,0,0,0,0,0,0,1, 17,16,0 }, { // 1, spider attacking 175,0,183,3,4,1,191,5,31,6,7,22,10,223,20,18,0,34,37,85,43,176,0,0,0,0,0,0,17, 17,16,0,0,34,98,34,38,102,0,0,0,0,0,1,148,71,65,16,0,2,98,34,102,98,0,0,0,0,0, 89,169,52,51,49,0,2,104,40,102,32,0,0,0,0,5,170,145,17,17,16,2,38,104,136,98,32, 80,0,0,0,90,167,65,0,0,0,2,102,102,102,102,34,85,0,0,5,184,124,16,0,0,0,2,102, 34,34,102,102,232,80,0,91,139,76,16,0,0,0,2,34,46,34,38,102,187,113,0,85,84,196, 49,17,17,0,0,91,235,85,34,107,136,145,0,0,5,115,19,71,116,16,0,94,238,94,88,139, 139,116,80,0,85,58,169,52,67,49,0,23,75,85,91,184,231,71,80,5,170,153,119,60, 204,17,0,1,21,232,141,141,116,68,16,88,137,119,204,195,49,0,0,1,153,136,189,169, 212,68,65,1,195,60,51,51,67,16,0,1,17,85,55,218,221,212,68,85,95,116,243,49,17, 17,0,19,197,51,83,77,217,125,69,95,62,87,65,16,0,0,1,67,49,204,197,68,218,157, 95,243,235,51,80,0,0,0,1,67,193,51,53,68,218,157,95,243,235,51,80,0,0,0,0,19, 197,204,83,77,217,125,69,95,62,87,65,16,0,0,0,1,17,85,55,218,221,212,68,85,95, 116,243,49,17,17,0,1,153,153,125,168,221,68,65,5,51,60,51,51,67,16,0,1,17,232, 141,141,190,68,16,90,170,170,204,195,49,0,0,23,75,85,91,184,235,71,85,5,183,153, 170,60,204,17,0,94,238,94,88,184,187,116,80,0,85,55,153,52,67,49,2,43,235,82,34, 136,136,145,0,0,1,115,19,71,116,16,2,34,82,34,98,46,187,113,0,85,83,196,49,17, 17,0,2,98,34,38,102,44,232,16,0,91,170,124,16,0,0,0,2,102,102,102,98,37,85,0,0, 5,185,172,16,0,0,0,2,38,136,134,34,80,80,0,0,0,88,167,65,0,0,0,0,182,136,134,98, 80,0,0,0,0,5,185,145,17,17,16,0,34,102,102,102,32,0,0,0,0,0,87,153,52,51,49,0,2, 98,34,102,107,0,0,0,0,0,1,116,71,65,16,0,2,37,82,43,32,0,0,0,0,0,0,17,17,16,0 } }; SFG_PROGRAM_MEMORY uint8_t SFG_effects[][SFG_TEXTURE_STORE_SIZE] = { { // 0, explostion 175,103,95,183,191,7,111,255,31,254,173,87,15,102,23,190,0,0,0,0,0,0,0,0,16,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,1,16,0,0,16,0,0,0,0,0,0,0,0,0,16,0,1,17,0,1,16,0,0,1,16, 0,17,0,0,0,17,0,17,17,16,17,0,0,1,17,0,0,17,17,16,0,1,18,34,50,17,17,0,1,17,17, 0,0,1,23,17,17,187,34,35,241,33,16,1,17,33,16,0,0,1,23,113,18,43,33,19,65,17,16, 17,18,49,16,0,0,1,17,115,146,34,17,115,65,17,17,17,51,17,0,0,0,0,17,19,57,42,17, 35,102,17,19,114,52,16,0,0,0,0,17,34,58,161,23,42,194,35,34,34,68,16,0,0,1,16,1, 34,35,33,18,157,194,50,35,51,65,17,17,0,0,17,18,34,18,19,217,38,85,109,212,68, 34,17,0,0,0,0,18,33,17,51,54,120,85,102,51,68,18,32,0,0,0,1,34,23,34,51,68,133, 85,86,51,65,50,35,16,0,1,17,18,33,68,54,72,85,85,86,99,67,18,33,17,16,17,17,19, 54,104,181,85,85,85,85,91,134,67,51,19,51,0,17,18,33,20,54,104,85,85,88,225,102, 99,35,51,48,0,0,17,33,19,36,69,85,85,88,22,98,41,35,48,0,0,0,0,19,51,52,88,83, 70,88,102,119,50,32,0,0,0,0,17,17,51,51,69,35,68,136,102,114,34,17,0,0,0,1,16,1, 18,52,66,116,68,104,129,18,34,17,16,0,0,0,0,17,114,51,55,68,68,54,102,114,35,16, 17,0,0,0,1,17,115,19,51,52,65,19,145,18,147,48,0,0,0,0,1,17,33,44,50,51,67,34, 169,51,35,49,0,0,0,0,17,18,34,49,50,35,202,34,42,35,114,51,0,0,0,1,17,50,49,17, 17,51,146,34,34,17,23,35,16,0,0,1,19,49,17,17,17,57,34,33,177,17,19,35,16,0,0, 17,17,17,16,1,1,19,17,1,16,1,19,50,48,0,0,17,17,0,0,17,1,19,17,0,16,0,17,17,49, 0,0,0,0,0,0,16,0,17,16,0,17,0,0,17,17,0,0,0,0,0,0,0,0,17,16,0,1,0,0,0,0,0,0,0,0, 0,0,0,0,1,0,0,0,0,0,0,0,0 }, { // 1, fireball 175,103,183,7,191,111,254,31,95,180,173,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,17,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,23,17,17,24,0,0,0,0,0,0,0,0,0,0,0,1,23,85,87,81,24,16,16,0,0, 0,0,0,0,0,8,17,119,115,55,119,17,129,17,0,0,0,0,0,0,0,129,23,119,51,51,55,113, 24,23,16,0,0,0,0,0,8,17,17,113,83,51,85,119,23,113,16,0,0,0,0,0,1,21,113,81,19, 53,81,17,119,129,0,0,0,0,0,1,17,19,53,17,19,50,17,17,113,16,0,0,0,0,0,17,33,83, 49,17,19,66,34,17,17,18,0,0,0,0,0,1,33,85,53,21,19,18,34,34,24,18,0,0,0,0,0,1, 33,85,85,84,68,20,34,35,66,98,0,0,0,0,0,0,33,83,53,20,68,51,51,51,70,34,0,0,0,0, 0,0,33,19,49,66,36,67,52,41,40,98,0,0,0,0,0,0,33,19,84,34,36,36,70,38,134,34,0, 0,0,0,0,0,8,21,81,18,36,66,98,102,166,32,0,0,0,0,0,0,2,21,81,18,68,68,38,134, 105,33,0,0,0,0,0,0,0,18,33,18,68,51,73,102,98,17,0,0,0,0,0,0,0,18,18,34,68,51, 74,102,102,17,0,0,0,0,0,0,1,17,17,18,34,36,38,38,129,16,0,0,0,0,0,0,1,16,8,134, 38,34,34,104,0,0,0,0,0,0,0,0,0,16,0,2,34,102,96,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0 } }; uint8_t SFG_charToFontIndex(char c) { if (c >= 'a' && c <= 'z') return c - 'a'; if (c >= 'A' && c <= 'Z') return c - 'A'; if (c >= '0' && c <= '9') return c - '0' + 31; switch (c) { case ' ': return 26; break; case '.': return 27; break; case ',': return 28; break; case '!': return 29; break; case '/': return 41; break; case '-': return 42; break; case '+': return 43; break; case '(': return 44; break; case ')': return 45; break; case '%': return 46; break; default: return 30; break; // "?" } } #define SFG_FONT_CHARACTER_SIZE 4 /** 4x4 font, each character stored as 16 bits. */ SFG_PROGRAM_MEMORY uint16_t SFG_font[47] = { 0xfaf0, // 0 "A" 0xfd70, // 1 "B" 0x6990, // 2 "C" 0xf960, // 3 "D" 0xfd90, // 4 "E" 0xfa80, // 5 "F" 0x69b0, // 6 "G" 0xf4f0, // 7 "H" 0x9f90, // 8 "I" 0x31f0, // 9 "J" 0xf4b0, // 10 "K" 0xf110, // 11 "L" 0xfc4f, // 12 "M" 0xf42f, // 13 "N" 0x6996, // 14 "O" 0xfae0, // 15 "P" 0x69b7, // 16 "Q" 0xfad0, // 17 "R" 0x5da0, // 18 "S" 0x8f80, // 19 "T" 0xf1f0, // 20 "U" 0xe1e0, // 21 "V" 0xf32f, // 22 "W" 0x9690, // 23 "X" 0xc7c0, // 24 "Y" 0xbd90, // 25 "Z" 0x0000, // 26 " " 0x0100, // 27 "." 0x0300, // 28 "," 0x0d00, // 29 "!" 0x48b4, // 30 "?" 0xf9f0, // 31 "0" 0x9f10, // 32 "1" 0xbdd0, // 33 "2" 0x9da0, // 34 "3" 0xe2f0, // 35 "4" 0xdbb0, // 36 "5" 0xfbb0, // 37 "6" 0x8bc0, // 38 "7" 0xfdf0, // 39 "8" 0xddf0, // 40 "9" 0x1680, // 41 "/" 0x2220, // 42 "-" 0x2720, // 43 "+" 0x0690, // 44 "(" 0x0960, // 45 ")" 0x9249 // 46 "%" }; #endif // guard