summaryrefslogtreecommitdiff
path: root/src/graphics/RasterGraphics.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-07-06 15:06:26 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-07-06 15:06:26 (GMT)
commitadc9cc08167946927fa21f86d70ce0a0b9630baa (patch)
tree009ec84f4398cac18d89283bc6d80193085b39af /src/graphics/RasterGraphics.cpp
parent94c9603d0ce7597cfe987bf211610ca7d325ddaa (diff)
downloadpowder-adc9cc08167946927fa21f86d70ce0a0b9630baa.zip
powder-adc9cc08167946927fa21f86d70ce0a0b9630baa.tar.gz
Move graphics into seperate folder
Diffstat (limited to 'src/graphics/RasterGraphics.cpp')
-rw-r--r--src/graphics/RasterGraphics.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/graphics/RasterGraphics.cpp b/src/graphics/RasterGraphics.cpp
new file mode 100644
index 0000000..7567b9d
--- /dev/null
+++ b/src/graphics/RasterGraphics.cpp
@@ -0,0 +1,35 @@
+#include "Graphics.h"
+
+#ifndef OGLI
+
+Graphics::Graphics():
+sdl_scale(1)
+{
+ vid = (pixel *)malloc(PIXELSIZE * ((XRES+BARSIZE) * (YRES+MENUSIZE)));
+
+}
+
+Graphics::~Graphics()
+{
+ free(vid);
+}
+
+void Graphics::Clear()
+{
+ memset(vid, 0, PIXELSIZE * ((XRES+BARSIZE) * (YRES+MENUSIZE)));
+}
+
+void Graphics::Finalise()
+{
+
+}
+
+#define VIDXRES XRES+BARSIZE
+#define VIDYRES YRES+MENUSIZE
+#define PIXELMETHODS_CLASS Graphics
+#include "RasterDrawMethods.inc"
+#undef VIDYRES
+#undef VIDXRES
+#undef PIXELMETHODS_CLASS
+
+#endif