summaryrefslogtreecommitdiff
path: root/src/graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r--src/graphics.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp
index 1e31f903..5ece979d 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -21,11 +21,13 @@
* $Id$
*/
+#include <cassert>
+
#include "graphics.h"
#include "log.h"
-
#include "resources/image.h"
+#include "resources/imageloader.h"
Graphics::Graphics():
mScreen(0)
@@ -146,6 +148,15 @@ bool Graphics::drawImage(Image *image, int srcX, int srcY, int dstX, int dstY,
return !(SDL_BlitSurface(image->mImage, &srcRect, mScreen, &dstRect) < 0);
}
+void Graphics::drawImage(gcn::Image const *image, int srcX, int srcY,
+ int dstX, int dstY, int width, int height)
+{
+ ProxyImage const *srcImage =
+ dynamic_cast< ProxyImage const * >(image);
+ assert(srcImage);
+ drawImage(srcImage->getImage(), srcX, srcY, dstX, dstY, width, height);
+}
+
void Graphics::drawImagePattern(Image *image, int x, int y, int w, int h)
{
int iw = image->getWidth();