summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-24 16:12:12 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:17 +0300
commit889ea19ddd5b4240375793d5030a04ed4642ec66 (patch)
treed1694423834f8d4be86383ad28702845dfdadf2f /src/resources
parentb70bbf075a20524e6c1859fb18db0865c65182ca (diff)
downloadmanaverse-889ea19ddd5b4240375793d5030a04ed4642ec66.tar.gz
manaverse-889ea19ddd5b4240375793d5030a04ed4642ec66.tar.bz2
manaverse-889ea19ddd5b4240375793d5030a04ed4642ec66.tar.xz
manaverse-889ea19ddd5b4240375793d5030a04ed4642ec66.zip
extract surface draw into surfacegraphics class.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/atlasmanager.cpp6
-rw-r--r--src/resources/image.h1
2 files changed, 4 insertions, 3 deletions
diff --git a/src/resources/atlasmanager.cpp b/src/resources/atlasmanager.cpp
index 5f4897147..853f79743 100644
--- a/src/resources/atlasmanager.cpp
+++ b/src/resources/atlasmanager.cpp
@@ -27,7 +27,7 @@
#include "client.h"
#include "graphicsmanager.h"
#include "logger.h"
-#include "sdlgraphics.h"
+#include "surfacegraphics.h"
#include "utils/mathutils.h"
#include "utils/physfsrwops.h"
@@ -232,8 +232,8 @@ SDL_Surface *AtlasManager::createSDLAtlas(TextureAtlas *const atlas)
if (!surface)
return nullptr;
- SDLGraphics *const graphics = new SDLGraphics();
- graphics->setWindow(surface, width, height);
+ SurfaceGraphics *const graphics = new SurfaceGraphics();
+ graphics->setTarget(surface);
graphics->_beginDraw();
// drawing SDL images to surface
diff --git a/src/resources/image.h b/src/resources/image.h
index a0df54926..b31ecb29e 100644
--- a/src/resources/image.h
+++ b/src/resources/image.h
@@ -57,6 +57,7 @@ class Image : public Resource
friend class OpenGLImageHelper;
friend class SDLGraphics;
friend class SDLImageHelper;
+ friend class SurfaceGraphics;
friend class TestLauncher;
#ifdef USE_OPENGL
friend class AtlasManager;