[Super-tux-commit] supertux/lib/video surface.cpp,1.9,1.10
Brought to you by:
wkendrick
From: Ricardo C. <rm...@us...> - 2004-09-16 11:26:24
|
Update of /cvsroot/super-tux/supertux/lib/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2973/lib/video Modified Files: surface.cpp Log Message: Fixed draw_part() when alpha != 255. This fixes the displaying of level statistics. Index: surface.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/video/surface.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- surface.cpp 5 Sep 2004 09:27:24 -0000 1.9 +++ surface.cpp 16 Sep 2004 11:26:14 -0000 1.10 @@ -995,10 +995,10 @@ /* Create a Surface, make it using colorkey, blit surface into temp, apply alpha to temp sur, blit the temp into the screen */ /* Note: this has to be done, since SDL doesn't allow to set alpha to surfaces that - already have an alpha mask yet... */ + already have an alpha mask, yet... */ SDL_Surface* sdl_surface_copy = SDL_CreateRGBSurface (sdl_surface->flags, - sdl_surface->w, sdl_surface->h, sdl_surface->format->BitsPerPixel, + (int)w, (int)h, sdl_surface->format->BitsPerPixel, sdl_surface->format->Rmask, sdl_surface->format->Gmask, sdl_surface->format->Bmask, 0); @@ -1007,7 +1007,7 @@ SDL_SetColorKey(sdl_surface_copy, SDL_SRCCOLORKEY, colorkey); - SDL_BlitSurface(sdl_surface, NULL, sdl_surface_copy, NULL); + SDL_BlitSurface(sdl_surface, &src, sdl_surface_copy, NULL); SDL_SetAlpha(sdl_surface_copy ,SDL_SRCALPHA,alpha); int ret = SDL_BlitSurface(sdl_surface_copy, NULL, screen, &dest); |