Tile(const unsigned char texture[]) {
memcpy(tileTexture, texture, sizeof(texture));
}
You seem to have changed this from your original post. I think the original post was correct in using the member variable tileTexture for the sizeof. When an array is passed as a parameter to a function, the size information is lost and a sizeof will just return the size of a pointer.
arduarn:
"Is this definitely the problem? I ask because if I remove the PROGMEM command entirely, I still can't get the correct result."
It's definitely a problem, but may well not be the only problem.
Oops, definitely was too strong a word...the Arduboy2 library that you are using seems to be expecting the bitmaps to be in flash and uses the appropriate helper functions.
unsigned char tileTexture[10];
Tile(const unsigned char texture[]) {
memcpy(tileTexture, texture, sizeof(texture));
}
The tile bitmaps are constant and are stored in flash (they have to be by the looks of things), so I think you are wrong to try to copy them into RAM (you would have to use a pgm_* function to do so anyway).
Make the bitmaps PROGMEM again. Remove the memcpy() and just store a pointer to the const bitmap data in the Tile.
See if that makes any difference.