From: <bal...@us...> - 2003-10-17 22:30:37
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/SDLVideo In directory sc8-pr-cvs1:/tmp/cvs-serv28042/gemrb/plugins/SDLVideo Modified Files: SDLVideoDriver.cpp Log Message: Corrected a Bug with Clipping Sprites Index: SDLVideoDriver.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/SDLVideo/SDLVideoDriver.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SDLVideoDriver.cpp 17 Oct 2003 09:33:56 -0000 1.6 --- SDLVideoDriver.cpp 17 Oct 2003 18:02:03 -0000 1.7 *************** *** 228,232 **** return; t.x = 0; ! t.w = spr->Width; } if(drect.y < clip->y) { --- 228,235 ---- return; t.x = 0; ! if((drect.x+spr->Width) > (clip->x+clip->w)) ! t.w = (clip->x+clip->w)-drect.x; ! else ! t.w = spr->Width; } if(drect.y < clip->y) { *************** *** 234,238 **** return; t.y = clip->y-drect.y; ! t.h = spr->Height-t.y; } else { --- 237,244 ---- return; t.y = clip->y-drect.y; ! if((drect.y+spr->Height) > (clip->y+clip->h)) ! t.h = (clip->y+clip->h)-drect.y; ! else ! t.h = spr->Height-t.y; } else { |