From: Willem J. P. <wjp...@us...> - 2006-01-27 22:20:32
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/SDLVideo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27288 Modified Files: SDLVideoDriver.cpp Log Message: fix palette-related crash Index: SDLVideoDriver.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/SDLVideo/SDLVideoDriver.cpp,v retrieving revision 1.131 retrieving revision 1.132 diff -C2 -d -r1.131 -r1.132 *** SDLVideoDriver.cpp 27 Jan 2006 17:31:01 -0000 1.131 --- SDLVideoDriver.cpp 27 Jan 2006 22:20:19 -0000 1.132 *************** *** 1297,1301 **** if (!spr->vptr) return; Sprite2D_BAM_Internal* data = (Sprite2D_BAM_Internal*)spr->vptr; ! memcpy(data->pal, pal, 256*sizeof(data->pal[0])); } } --- 1297,1301 ---- if (!spr->vptr) return; Sprite2D_BAM_Internal* data = (Sprite2D_BAM_Internal*)spr->vptr; ! memcpy(data->pal->col, pal, 256*sizeof(data->pal->col[0])); } } *************** *** 1943,1947 **** memcpy(rledata, sprite->pixels, data->datasize); dest = CreateSpriteBAM8(sprite->Width, sprite->Height, data->RLE, ! rledata, data->datasize, data->pal, data->transindex); Sprite2D_BAM_Internal* destdata = (Sprite2D_BAM_Internal*)dest->vptr; --- 1943,1947 ---- memcpy(rledata, sprite->pixels, data->datasize); dest = CreateSpriteBAM8(sprite->Width, sprite->Height, data->RLE, ! rledata, data->datasize, data->pal->col, data->transindex); Sprite2D_BAM_Internal* destdata = (Sprite2D_BAM_Internal*)dest->vptr; *************** *** 1993,1997 **** memcpy(rledata, sprite->pixels, data->datasize); dest = CreateSpriteBAM8(sprite->Width, sprite->Height, data->RLE, ! rledata, data->datasize, data->pal, data->transindex); Sprite2D_BAM_Internal* destdata = (Sprite2D_BAM_Internal*)dest->vptr; --- 1993,1997 ---- memcpy(rledata, sprite->pixels, data->datasize); dest = CreateSpriteBAM8(sprite->Width, sprite->Height, data->RLE, ! rledata, data->datasize, data->pal->col, data->transindex); Sprite2D_BAM_Internal* destdata = (Sprite2D_BAM_Internal*)dest->vptr; |