I'm working on loading a tile set into a single bitmap, and then drawing regions of this bitmap as required. It was the simplest and most straightforward approach.
But I seem to be having a problem. I've saved the tile set into a custom format made with TileStudio (which is awesome by the way), and so I've written code that loads it into an Allegro5 bitmap structure. I do this by creating a new bitmap, and then loading the pixel colour components from the file and using al_put_pixel. Now I know this all works, because I've seen it.
But it gets to when I'm actually creating the bitmap. Sometimes (most of the time but not all) al_create_bitmap will cause a weird exception to be thrown elsewhere in the program. That is, the code will execute until al_create_bitmap, and then it'll throw an exception. But the call stack will in fact point to a different part of the program (some where inside the NSApplication object - I'm using Mac OS X).
I've concluded, but I'm not entirely sure, that this is being caused by me asking for a massive bitmap. 48 tiles, each tile 32x32x32bits. So I was curious if there is an upper limit on the permitted size of a bitmap (independent of the available memory).
Let me know