summaryrefslogtreecommitdiff
path: root/src/render/graphics.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/graphics.h')
-rw-r--r--src/render/graphics.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/render/graphics.h b/src/render/graphics.h
index 7d4d7c524..cb009291b 100644
--- a/src/render/graphics.h
+++ b/src/render/graphics.h
@@ -47,6 +47,15 @@ struct SDL_Window;
static const int defaultScreenWidth = 800;
static const int defaultScreenHeight = 600;
+#define DRAW_IMAGE(graphics, image, x, y) \
+ { \
+ if (image) \
+ { \
+ (graphics)->drawImage2(image, 0, 0, x, y, \
+ (image)->mBounds.w, (image)->mBounds.h, false); \
+ } \
+ }
+
/**
* 9 images defining a rectangle. 4 corners, 4 sides and a middle area. The
* topology is as follows:
@@ -370,14 +379,6 @@ class Graphics : public gcn::Graphics
virtual void setRendererFlags(const uint32_t flags A_UNUSED)
{ }
#endif
- int mWidth;
- int mHeight;
-
- protected:
- /**
- * Constructor.
- */
- Graphics();
/**
* Blits an image onto the screen.
@@ -391,6 +392,14 @@ class Graphics : public gcn::Graphics
const int width, const int height,
const bool useColor) = 0;
+ int mWidth;
+ int mHeight;
+
+ protected:
+ /**
+ * Constructor.
+ */
+ Graphics();
void setMainFlags(const int w, const int h, const int bpp,
const bool fs, const bool hwaccel,