diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-22 11:59:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-24 21:08:15 +0300 |
commit | 2480ea4cc668ff99007dd6fb8b44911eea5d5287 (patch) | |
tree | c8fc22a9612d30474cddd6d40da5269ffd7f55a5 /src/resources/atlasmanager.cpp | |
parent | 07390a4c8dcde85602c1a91d3773061d67d169ab (diff) | |
download | ManaVerse-2480ea4cc668ff99007dd6fb8b44911eea5d5287.tar.gz ManaVerse-2480ea4cc668ff99007dd6fb8b44911eea5d5287.tar.bz2 ManaVerse-2480ea4cc668ff99007dd6fb8b44911eea5d5287.tar.xz ManaVerse-2480ea4cc668ff99007dd6fb8b44911eea5d5287.zip |
store window size into rectangle.
Diffstat (limited to 'src/resources/atlasmanager.cpp')
-rw-r--r-- | src/resources/atlasmanager.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/resources/atlasmanager.cpp b/src/resources/atlasmanager.cpp index f6cd23de4..2388856c1 100644 --- a/src/resources/atlasmanager.cpp +++ b/src/resources/atlasmanager.cpp @@ -224,14 +224,16 @@ SDL_Surface *AtlasManager::createSDLAtlas(TextureAtlas *const atlas) atlas->width = powerOfTwo(atlas->width); atlas->height = powerOfTwo(atlas->height); + const int width = atlas->width; + const int height = atlas->height; // temp SDL surface for atlas SDL_Surface *const surface = SDL_CreateRGBSurface(SDL_SWSURFACE, - atlas->width, atlas->height, 32, rmask, gmask, bmask, amask); + width, height, 32, rmask, gmask, bmask, amask); if (!surface) return nullptr; SDLGraphics *const graphics = new SDLGraphics(); - graphics->setWindow(surface); + graphics->setWindow(surface, width, height); graphics->_beginDraw(); // drawing SDL images to surface |