[SDL] Tiles
Salvo Di Fazio
salvodif at libero.it
Sat Mar 22 11:48:05 PST 2003
Hi guys,
I have a little problem.
I would like to make a program to cut tiles from a bitmap.
So, I created two SDL_Surface, the first is bitmap and the second is tiles.
Now I want to copy a part of bitmap into tiles... but I couldn't do it
Following you will find my code... tnx
SDL_Surface *bitmap, *tiles;
SDL_Rect src, dst;
bitmap = SDL_LoadBMP(argv[1]);
src.x = 0;
src.y = 0;
src.h = 32;
src.w = 32
dst = src;
SDL_BlitSurface(bitmap, &src, tiles, &dst);
SDL_SaveBMP(tiles, file);
More information about the SDL
mailing list