El dl 23 de 02 de 2009 a les 00:59 +0100, en/na Pere Pujal i Carabantes
> Hi all!
> I think this patch is enouth to get puzzle working.
Sorry, the previous patch is wrong, it random removes parts of the
canvas and duplicates others. Really the problem with current cvs puzzle
version is the use of snapshot in the drag function as an auxiliar
canvas, hence the creation of canvas_backup.
This one seems to work.
cvs diff puzzle.c
Enter passphrase for key '/home/pere/.ssh/id_dsa':
RCS file: /cvsroot/tuxpaint/tuxpaint/magic/src/puzzle.c,v
retrieving revision 1.6
diff -r1.6 puzzle.c
> SDL_Surface * canvas_backup;
> canvas_backup=SDL_CreateRGBSurface(SDL_ANYFORMAT, canvas->w, canvas->h, canvas->format->BitsPerPixel,
> canvas->format->Rmask, canvas->format->Gmask, canvas->format->Bmask, canvas->format->Amask);
> SDL_FreeSurface (canvas_backup);
> SDL_BlitSurface(canvas, 0, canvas_backup, 0);
< SDL_BlitSurface(canvas, NULL, snapshot, NULL);
< SDL_BlitSurface(snapshot, &rect_that, canvas, &rect_this);
> SDL_BlitSurface(canvas_backup, &rect_that, canvas, &rect_this);
Hope this helps