SDL Tile Surface - Problem

Recommended Posts

Hello! I am implementing a tile function for using SDL. It takes a source image and tiles it to the size specified using SDL_BlitSurface(). However, when I save the tiled image it is always black. SDL_BlitSurface() returns successfully every time, and SDL_CreateRGBSurface() returns non-null.
What could be going wrong? Here is the function:

Share this post

Link to post

Share on other sites

SDL_TileSurface() and saving the resulting image work fine on my computer. You didn't provide code for shrinkSurface (and so I commented that out). I'd take a look at that function and see if anything dodgy is going on in there.