summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-03 04:59:10 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-03 04:59:10 +0300
commitd34bee39f28fdc14a0a1c493b4f6c5c8552f5357 (patch)
treeda6c40158dc5b476037ecbc6355f048d9cac1c43 /src/resources
parente1ec49e1934dfc25f21af7b9fa0a8f06fbea8aa3 (diff)
downloadplus-d34bee39f28fdc14a0a1c493b4f6c5c8552f5357.tar.gz
plus-d34bee39f28fdc14a0a1c493b4f6c5c8552f5357.tar.bz2
plus-d34bee39f28fdc14a0a1c493b4f6c5c8552f5357.tar.xz
plus-d34bee39f28fdc14a0a1c493b4f6c5c8552f5357.zip
Small optimisation in loading images in software mode.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/image.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index 6bb0a9faa..b1f83e258 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -664,16 +664,18 @@ Image *Image::_SDLload(SDL_Surface *tmpImage)
{
if (SDL_ALPHA_OPAQUE != 255)
hasAlpha = true;
- for (int i = 0; i < sz; ++ i)
- alphaChannel[i] = SDL_ALPHA_OPAQUE;
+ memset(alphaChannel, SDL_ALPHA_OPAQUE, sz);
+// for (int i = 0; i < sz; ++ i)
+// alphaChannel[i] = SDL_ALPHA_OPAQUE;
}
}
else
{
if (SDL_ALPHA_OPAQUE != 255)
hasAlpha = true;
- for (int i = 0; i < sz; ++ i)
- alphaChannel[i] = SDL_ALPHA_OPAQUE;
+ memset(alphaChannel, SDL_ALPHA_OPAQUE, sz);
+// for (int i = 0; i < sz; ++ i)
+// alphaChannel[i] = SDL_ALPHA_OPAQUE;
}
SDL_Surface *image;