Subject says it all, really. The problem is in SDL_CreateRGBSurface
(snip from SDL 1.2.8 source):
— 8< —
/* Make sure the size requested doesn’t overflow our datatypes /
/ Next time I write a library like SDL, I’ll use int for size.
*/
if ( width > 16384 || height > 16384 ) {
SDL_SetError(“Width or height is too large”);
return(NULL);
}
— 8< —
I can understand why there’s a limit for the width (the 16-bit surface
pitch could overflow), but why is the height limit so low ? This breaks
a game I’m working on (I’m the Linux porter of Deadly Rooms Of Death;
the new version uses a surface of height 27302). As I said in the
subject, it worked without any trouble with SDL 1.2.7.
By the way, shouldn’t the width limit in the if above be “> 16383” ?
16384 * 4 = 65536 -> pitch = 0… Also, I think it could be increased
if the bpp is lower than 32, at least for software surfaces.
- Gerry