aboutsummaryrefslogtreecommitdiff
path: root/engines/access/asurface.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/access/asurface.h')
-rw-r--r--engines/access/asurface.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/engines/access/asurface.h b/engines/access/asurface.h
index ec18ec09c3..64ddf3d0ee 100644
--- a/engines/access/asurface.h
+++ b/engines/access/asurface.h
@@ -27,7 +27,7 @@
#include "common/array.h"
#include "common/memstream.h"
#include "common/rect.h"
-#include "graphics/managed_surface.h"
+#include "graphics/screen.h"
#include "access/data.h"
namespace Access {
@@ -35,11 +35,16 @@ namespace Access {
class SpriteResource;
class SpriteFrame;
-class ASurface : virtual public Graphics::ManagedSurface {
+/**
+ * Base Access surface class. This derivces from Graphics::Screen
+ * because it has logic we'll need for our own Screen class that
+ * derives from this one
+ */
+class BaseSurface : virtual public Graphics::Screen {
private:
Graphics::Surface _savedBlock;
- void flipHorizontal(ASurface &dest);
+ void flipHorizontal(BaseSurface &dest);
protected:
Common::Rect _savedBounds;
public:
@@ -57,9 +62,9 @@ public:
public:
static int _clipWidth, _clipHeight;
public:
- ASurface();
+ BaseSurface();
- virtual ~ASurface();
+ virtual ~BaseSurface();
void clearBuffer();
@@ -85,7 +90,7 @@ public:
*/
void plotB(SpriteFrame *frame, const Common::Point &pt);
- virtual void copyBlock(ASurface *src, const Common::Rect &bounds);
+ virtual void copyBlock(BaseSurface *src, const Common::Rect &bounds);
virtual void restoreBlock();
@@ -99,7 +104,7 @@ public:
virtual void copyBuffer(Graphics::ManagedSurface *src);
- void copyTo(ASurface *dest);
+ void copyTo(BaseSurface *dest);
void saveBlock(const Common::Rect &bounds);
@@ -114,6 +119,17 @@ public:
bool clip(Common::Rect &r);
};
+class ASurface : public BaseSurface {
+protected:
+ /**
+ * Override the addDirtyRect from Graphics::Screen, since for standard
+ * surfaces we don't need dirty rects to be tracked
+ */
+ virtual void addDirtyRect(const Common::Rect &r) {}
+public:
+ ASurface() : BaseSurface() {}
+};
+
class SpriteFrame : public ASurface {
public:
SpriteFrame(AccessEngine *vm, Common::SeekableReadStream *stream, int frameSize);