summaryrefslogtreecommitdiff
path: root/src/graphics.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-06-03 16:52:06 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-06-03 16:52:06 +0000
commit6276c1ff96e449e73e84977110334cd8957c31b6 (patch)
tree66988ea8a28fd9de6c2f31d20a38a4efafee9a99 /src/graphics.cpp
parent9b53cd51fdf193c8748909479ec6c356fa7a1731 (diff)
downloadmana-6276c1ff96e449e73e84977110334cd8957c31b6.tar.gz
mana-6276c1ff96e449e73e84977110334cd8957c31b6.tar.bz2
mana-6276c1ff96e449e73e84977110334cd8957c31b6.tar.xz
mana-6276c1ff96e449e73e84977110334cd8957c31b6.zip
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.
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r--src/graphics.cpp13
1 files changed, 0 insertions, 13 deletions
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();