based on the documentation, bitmapTable is a bit confusing to me. First, it is not explained at all what it is.
void playdate->graphics->loadIntoBitmapTable(const char* path, LCDBitmapTable* table, const char** outerr);
Loads the imagetable at path into the previously allocated table .
What is an imagetable? It is'n mentionned elsewhere.
LCDBitmapTable* playdate->graphics->loadBitmapTable(const char* path, const char** outerr);
Allocates and returns a new LCDBitmap from the file at path . If there is no file at path , the function returns null.
There's an error I think: it returns a new LCDBitmapTable instead.
I tried to use it without success.:
LCDBitmapTable* bitmapTable = pd->graphics->newBitmapTable(64, 16, 16);
pd->graphics->loadIntoBitmapTable("bitmap16x1024.png", bitmapTable, &err);
/* error handling - no error was reported */
LCDBitmap* testbitmap = pd->graphics->getTableBitmap(bitmapTable, 0);
The resulting testbitmap have the following properties: 65535x65535 (width x height), and 0 as rowbytes.
I expected to have a bitmapTable which holds 64 bitmaps, 16x16 px each. I also expected that the getTableBitmap returns a bitmap which is 16x16 px with a rowbytes equal to 2.
Can someone explain me how bitmapTable is expected to work, and what an imagetable is?