From 119b7126b9162eb0adefaff7a2f002f23472824b Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Wed, 28 May 2008 14:27:22 +0000 Subject: InterfaceManager core implemented. svn-id: r32339 --- graphics/VectorRenderer.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'graphics/VectorRenderer.h') diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h index 1b315f46b4..65d0cce417 100644 --- a/graphics/VectorRenderer.h +++ b/graphics/VectorRenderer.h @@ -32,10 +32,10 @@ #include "common/system.h" namespace Graphics { - -void vector_renderer_test(OSystem *_system); class VectorRenderer; +VectorRenderer *createRenderer(int mode); + /** Specifies the way in which a shape is filled */ enum FillMode { kFillMode_Disabled = 0, @@ -297,6 +297,8 @@ public: virtual void drawStep(DrawStep *step); + virtual void copyFrame(OSystem *sys) = 0; + protected: Surface *_activeSurface; /** Pointer to the surface currently being drawn */ @@ -403,6 +405,17 @@ public: } } + virtual void copyFrame(OSystem *sys) { +#ifdef OVERLAY_MULTIPLE_DEPTHS + sys->copyRectToOverlay((const PixelType*)_activeSurface->getBasePtr(0, 0), + _activeSurface->w, 0, 0, _activeSurface->w, _activeSurface->w); +#else + sys->copyRectToOverlay((const OverlayColor*)_activeSurface->getBasePtr(0, 0), + _activeSurface->w, 0, 0, _activeSurface->w, _activeSurface->w); +#endif + sys->updateScreen(); + } + protected: /** @@ -598,7 +611,7 @@ protected: * * @see VectorRenderer::drawLineAlg() */ - void drawLineAlg(int x1, int y1, int x2, int y2, int dx, int dy, PixelType color); + virtual void drawLineAlg(int x1, int y1, int x2, int y2, int dx, int dy, PixelType color); /** * "Wu's Circle Antialiasing Algorithm" as published by Xiaolin Wu, July 1991 -- cgit v1.2.3