Maybe I should post some more code:
//This is the function I'd like to implement (the parameters type is probably wrong)
void DrawTiles(const uint16_t* palette, const uint8_t *image, int8_t textColor)
{
//other stuff here
//Draw image
g.display.drawBitmap(xo+x,yo+y,image[index_from_somewhere]);
}
int main ()
{
DrawTiles(City_pal,City, 7); //<< how pass City?
}
and
gfx.h
//Total colors 16
const uint16_t City_pal[] = {
0,6474,31018,1066,43654,25289,50712,65437,59594,64771,63333,24009,21819,33715,62388,65141,
};
//Sprite sheet:4x4
const uint8_t City [][802] ={
//[0] cell:0x0
{
40,40,
85,85,85,85,85,85,85,85,85,86,102,102,118,101,85,85,85,85,102,102,
85,85,85,85,85,85,85,85,85,86,102,102,118,101,85,85,85,85,102,102,
85,85,85,85,85,85,85,85,85,85,86,102,101,85,85,85,85,85,85,102,
102,102,102,102,102,221,102,102,102,102,101,85,85,102,102,102,102,102,101,85,
102,102,102,102,102,221,102,102,102,102,96,0,6,102,102,102,102,102,102,0,
17,17,17,17,17,17,17,17,17,17,17,0,0,0,0,0,0,0,0,0,
221,221,221,221,221,221,221,221,221,221,221,0,5,221,221,0,13,221,213,0,
221,221,221,221,221,221,221,221,221,221,221,0,5,221,221,0,13,221,213,0,
221,221,221,221,221,221,221,221,221,221,221,0,208,0,29,0,13,16,0,208,
221,221,221,221,221,221,221,221,221,221,221,221,221,221,80,0,0,85,221,221,
221,221,221,221,221,221,221,221,221,221,221,221,221,221,80,0,0,85,221,221,
102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,0,5,221,102,102,
85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,0,0,85,85,85,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,0,5,85,85,85,
85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,0,5,85,85,85,
17,17,17,17,17,17,17,17,17,81,17,17,17,17,17,0,1,17,17,17,
17,17,17,17,17,17,17,17,17,209,17,17,17,17,17,0,1,17,17,17,
17,17,17,17,17,17,17,17,17,209,17,17,17,17,17,0,1,17,17,17,
17,17,17,17,17,17,17,17,17,209,17,17,17,17,17,0,1,17,17,17,
221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,0,13,221,221,221,
85,85,85,85,85,85,85,85,85,213,85,85,85,85,85,0,5,85,85,85,
17,17,17,17,17,17,17,17,17,81,17,17,17,17,17,0,1,17,17,17,
17,17,17,17,17,17,17,17,17,209,17,17,17,17,17,0,1,17,17,17,
17,17,17,17,17,17,17,17,17,209,17,17,17,17,17,0,1,17,17,17,
17,17,17,17,17,17,17,17,17,209,17,17,17,17,17,0,1,17,17,17,
17,17,17,17,17,17,17,17,17,209,17,17,17,17,17,0,1,17,17,17,
17,17,17,17,17,17,17,17,17,209,17,17,17,17,17,0,1,17,17,17,
49,17,17,17,17,17,17,17,17,209,17,17,17,17,17,0,1,17,17,17,
49,17,17,17,17,17,17,17,17,209,17,17,17,17,17,0,1,17,17,17,
49,17,17,17,17,17,17,17,17,209,17,17,17,17,17,0,1,17,17,17,
17,19,17,17,17,17,17,17,17,209,17,17,17,17,17,0,1,17,17,17,
49,17,17,49,17,17,17,17,17,209,17,17,17,17,17,0,1,17,17,17,
49,17,17,49,17,17,17,17,17,209,17,17,17,17,17,0,1,17,17,17,
49,19,17,17,17,17,17,17,17,209,17,17,17,17,17,0,1,17,17,17,
19,51,17,49,17,17,17,17,17,81,17,17,17,17,17,0,1,17,17,17,
19,51,17,49,17,17,17,17,17,81,17,17,17,17,17,0,1,17,17,17,
17,17,17,61,221,221,221,221,221,221,221,221,221,221,221,0,13,221,221,221,
19,51,17,0,0,0,0,0,0,80,0,0,0,0,0,0,0,0,0,0,
19,51,17,0,0,0,0,0,0,80,0,0,0,0,0,0,0,0,0,0,
},
//[1] cell:1x0
{
40,40,
103,102,85,85,85,85,85,85,85,85,85,85,85,81,148,68,68,68,68,73,
103,102,85,85,85,85,85,85,85,85,85,85,85,81,148,68,68,68,68,73,
102,85,85,85,85,85,85,85,85,85,85,85,85,85,228,68,68,68,68,78,
85,102,102,102,102,102,102,102,102,102,102,102,102,102,148,68,68,68,68,73,
0,102,102,102,102,102,102,102,102,102,102,102,102,103,148,68,68,68,68,73,
1,17,17,17,17,17,17,17,17,17,17,17,17,17,228,68,68,68,68,78,
13,221,221,221,221,221,221,221,221,221,221,221,221,209,148,68,68,68,68,73,
13,221,221,221,221,221,221,221,221,221,221,221,221,209,148,68,68,68,68,73,
13,221,221,221,221,221,221,221,221,221,221,221,213,81,228,68,68,68,68,78,
221,221,221,221,221,221,221,221,221,221,221,213,93,81,148,68,68,68,68,73,
221,221,221,221,221,221,221,221,221,221,221,213,93,209,148,68,68,68,68,73,
102,102,102,102,102,102,102,102,102,102,102,109,214,101,228,68,68,68,68,78,
85,85,85,85,85,85,85,85,85,85,85,85,85,85,68,68,68,68,68,68,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,148,68,68,68,68,73,
85,85,85,85,85,85,85,85,85,85,85,85,80,0,228,68,68,68,68,78,
85,85,85,85,85,85,85,85,85,85,85,85,80,0,228,68,68,68,68,78,
17,21,81,17,17,17,17,17,17,17,17,21,80,0,148,68,68,68,66,36,
17,21,209,17,17,17,17,17,17,17,17,21,208,0,228,68,68,68,66,36,
17,21,209,17,17,17,17,17,17,17,17,21,208,0,148,68,68,68,68,73,
17,21,209,17,17,17,17,17,17,17,17,21,208,0,148,68,68,68,68,73,
221,221,221,221,221,221,221,221,221,221,221,221,208,0,228,68,68,34,34,36,
85,85,213,85,85,85,85,85,85,85,85,85,208,0,68,68,68,34,34,36,
17,21,81,17,17,17,17,17,17,17,17,21,80,0,148,68,68,34,34,36,
17,21,209,17,17,17,17,17,17,17,17,21,208,0,228,68,68,68,68,78,
17,21,209,17,17,17,17,17,17,17,17,21,208,0,228,68,68,68,68,78,
17,21,209,17,17,17,17,17,17,17,17,21,208,0,148,68,68,68,68,73,
17,21,209,17,17,17,17,17,17,17,17,21,208,0,228,68,68,68,68,78,
17,21,209,17,17,17,17,17,17,17,17,21,208,0,228,68,68,68,68,78,
17,21,209,17,17,17,17,17,17,17,17,21,208,0,148,68,68,68,68,73,
17,21,209,17,17,17,17,17,17,17,17,21,208,0,68,68,68,68,68,78,
17,21,209,17,17,17,17,17,17,17,17,21,208,0,68,68,68,68,68,78,
17,21,209,17,17,17,17,17,17,17,17,21,208,0,68,68,68,68,68,73,
17,21,209,17,17,17,17,17,17,17,17,21,208,0,228,68,68,68,68,78,
17,21,209,17,17,17,17,17,17,17,17,21,208,0,228,68,68,68,68,78,
17,21,209,17,17,17,17,17,17,17,17,21,208,0,66,34,36,68,68,73,
17,21,81,17,17,17,17,17,17,17,17,21,80,0,66,34,36,68,68,78,
17,21,81,17,17,17,17,17,17,17,17,21,80,0,66,34,36,68,68,78,
221,221,221,221,221,221,221,221,221,221,221,221,208,0,148,68,68,68,68,73,
0,5,80,0,0,0,0,0,0,0,0,5,80,0,226,34,34,34,36,68,
0,0,80,0,0,0,0,0,0,0,0,5,80,0,226,34,34,34,36,68,
},
//[2] cell:2x0
{
40,40,
17,21,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
17,21,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
17,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
119,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
21,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,
17,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,
17,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,
17,221,221,221,221,221,221,213,93,221,221,221,221,221,221,221,221,221,221,221,
17,221,221,221,221,221,221,213,93,221,221,221,221,221,221,221,221,221,221,221,
85,102,102,102,102,102,102,93,214,102,102,102,102,102,102,102,102,102,102,102,
5,85,85,85,85,85,85,5,85,85,85,85,85,85,85,85,85,85,85,85,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,17,17,17,17,17,17,17,17,17,17,17,18,0,0,0,0,0,0,0,
0,17,17,17,17,17,17,17,17,17,17,17,18,0,0,0,0,0,0,0,
0,1,17,17,17,17,34,34,34,34,34,34,36,1,17,17,17,16,0,17,
0,1,17,17,17,17,34,34,34,34,34,34,36,1,17,17,17,16,0,17,
0,17,17,17,17,17,34,34,34,34,34,34,36,0,0,0,0,80,0,85,
0,17,17,17,17,17,34,34,34,34,34,34,36,0,0,0,0,80,0,85,
0,0,0,0,17,17,34,34,34,34,34,34,36,1,17,17,17,16,0,17,
0,0,0,0,17,17,34,34,34,34,34,34,36,1,17,17,17,16,0,17,
0,0,0,0,17,17,34,34,34,34,34,34,36,1,17,17,17,16,0,17,
0,17,17,17,17,17,34,34,34,34,34,34,36,1,17,17,17,16,0,17,
0,17,17,17,17,17,34,34,34,34,34,34,36,1,17,17,17,16,0,17,
etc etc