Hi,
Using the C SDK, I’m trying to create a bitmap table on the fly with the following code:
// Create a new table bitmap with 4 16x16 cells
LCDBitmapTable* tableBitmap = pd->graphics->newBitmapTable(4, 16, 16);
// Get the first bitmap from the new table and get its data
int w, h;
LCDBitmap* singleBitmap = pd->graphics->getTableBitmap(tableBitmap, 0);
pd->graphics->getBitmapData(singleBitmap, &w, &h, 0, 0, 0);
The table is successfully created, but when I check the width and height of the first bitmap in the table I get 65535 x 65535, so I guess they’re uninitialised.
How do I initialise each bitmap in the new table? I was hoping there would be a setTableBitmap function to complement getTableBitmap, but there isn’t. I did try…
singleBitmap = pd->graphics->newBitmap(16, 16, kColorClear);
…but when I get the bitmap again using getTableBitmap, it’s back to 65535 x 65535.
The Lua API seems to have what I need, but not the C API…
I’m a bit stumped by this, any help appreciated.
Cheers,
Rich.
