summaryrefslogtreecommitdiff
path: root/src/resources/image.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-24 00:05:26 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-24 00:05:26 +0000
commit166e9864f97275b1539edd8e89b271105f2fa04a (patch)
tree062a3a6e1251dfbe0fd5be98fbb405d2a422e6b3 /src/resources/image.cpp
parent1e6f5283eceff138873ec54159ad8f716ed39b45 (diff)
downloadmana-166e9864f97275b1539edd8e89b271105f2fa04a.tar.gz
mana-166e9864f97275b1539edd8e89b271105f2fa04a.tar.bz2
mana-166e9864f97275b1539edd8e89b271105f2fa04a.tar.xz
mana-166e9864f97275b1539edd8e89b271105f2fa04a.zip
Major rendering performance increase in software mode, by not using RLE
compression on loaded images while most of the time, we're only drawing a small subimage of them. Also, don't try to draw an icon when it is not defined or failed to load properly.
Diffstat (limited to 'src/resources/image.cpp')
-rw-r--r--src/resources/image.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index 48818f6f..9398e06b 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -153,10 +153,10 @@ Image* Image::load(void *buffer, unsigned int bufferSize,
SDL_FreeSurface(image);
if (hasPink && !hasAlpha) {
- SDL_SetColorKey(tmpImage, SDL_SRCCOLORKEY | SDL_RLEACCEL,
+ SDL_SetColorKey(tmpImage, SDL_SRCCOLORKEY,
SDL_MapRGB(tmpImage->format, 255, 0, 255));
} else if (hasAlpha) {
- SDL_SetAlpha(tmpImage, SDL_SRCALPHA | SDL_RLEACCEL, SDL_ALPHA_OPAQUE);
+ SDL_SetAlpha(tmpImage, SDL_SRCALPHA, SDL_ALPHA_OPAQUE);
}
#ifdef USE_OPENGL
@@ -305,7 +305,7 @@ void Image::setAlpha(float a)
if (mImage) {
// Set the alpha value this image is drawn at
- SDL_SetAlpha(mImage, SDL_SRCALPHA | SDL_RLEACCEL, (int)(255 * mAlpha));
+ SDL_SetAlpha(mImage, SDL_SRCALPHA, (int) (255 * mAlpha));
}
}