well this code do not work…the blitsurface returns 0 but the tmp00000.bmp has null size,
i suppose that SDL_BlitSurface(background, &take , tspr, &take) take a part of background and put it in tspr…
You will need to initialize your new surface “tspr” with a size before
blitting on to it. "New"ing a surface doesn’t create a canvas for you to
paint on, it just gets your easel set up.
You need to call SDL_CreateRGBSurface with all of the necessary settings
to initialize tspr.
You will need to initialize your new surface “tspr” with a size before
blitting on to it. "New"ing a surface doesn’t create a canvas for you to
paint on, it just gets your easel set up.
You need to call SDL_CreateRGBSurface with all of the necessary settings
to initialize tspr.