diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-08-03 04:59:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-08-03 04:59:10 +0300 |
commit | d34bee39f28fdc14a0a1c493b4f6c5c8552f5357 (patch) | |
tree | da6c40158dc5b476037ecbc6355f048d9cac1c43 | |
parent | e1ec49e1934dfc25f21af7b9fa0a8f06fbea8aa3 (diff) | |
download | mv-d34bee39f28fdc14a0a1c493b4f6c5c8552f5357.tar.gz mv-d34bee39f28fdc14a0a1c493b4f6c5c8552f5357.tar.bz2 mv-d34bee39f28fdc14a0a1c493b4f6c5c8552f5357.tar.xz mv-d34bee39f28fdc14a0a1c493b4f6c5c8552f5357.zip |
Small optimisation in loading images in software mode.
-rw-r--r-- | src/resources/image.cpp | 10 |
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; |