From 6276c1ff96e449e73e84977110334cd8957c31b6 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 3 Jun 2007 16:52:06 +0000 Subject: Fixed image loading in software mode to not check for alpha layer with images aren't 32-bit and removed drawImageTransparent from Graphics class, should be set on image. --- src/graphics.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/graphics.cpp') diff --git a/src/graphics.cpp b/src/graphics.cpp index 4ea75a93..1e31f903 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -136,8 +136,6 @@ bool Graphics::drawImage(Image *image, int srcX, int srcY, int dstX, int dstY, srcX += image->mBounds.x; srcY += image->mBounds.y; - - SDL_Rect dstRect; SDL_Rect srcRect; dstRect.x = dstX; dstRect.y = dstY; @@ -148,17 +146,6 @@ bool Graphics::drawImage(Image *image, int srcX, int srcY, int dstX, int dstY, return !(SDL_BlitSurface(image->mImage, &srcRect, mScreen, &dstRect) < 0); } -bool Graphics::drawImageTransparent(Image *image, int x, int y, float opacity) -{ - if (!image) return false; - - float oldalpha = image->getAlpha(); - image->setAlpha(opacity * oldalpha); - bool retval = drawImage(image, x, y); - image->setAlpha(oldalpha); - return retval; -} - void Graphics::drawImagePattern(Image *image, int x, int y, int w, int h) { int iw = image->getWidth(); -- cgit v1.2.3-70-g09d2