diff options
Diffstat (limited to 'engines/mads/screen.h')
-rw-r--r-- | engines/mads/screen.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/engines/mads/screen.h b/engines/mads/screen.h index d910e88633..eeb15453f8 100644 --- a/engines/mads/screen.h +++ b/engines/mads/screen.h @@ -117,7 +117,7 @@ public: * @param destSurface Dest surface * @param posAdjust Position adjustment */ - void copy(MSurface *srcSurface, MSurface *destSurface, const Common::Point &posAdjust); + void copy(BaseSurface *srcSurface, BaseSurface *destSurface, const Common::Point &posAdjust); /** * Use the lsit of dirty areas to copy areas of the screen surface to @@ -128,7 +128,6 @@ public: void reset(); }; - class ScreenObject { public: bool _active; @@ -207,11 +206,10 @@ public: void synchronize(Common::Serializer &s); }; -class ScreenSurface : public MSurface { +class Screen : public BaseSurface { private: uint16 _random; - byte *_surfacePixels; - Common::Rect _clipBounds; + MSurface _rawSurface; void panTransition(MSurface &newScreen, byte *palData, int entrySide, const Common::Point &srcPos, const Common::Point &destPos, @@ -226,36 +224,40 @@ public: /** * Constructor */ - ScreenSurface(); + Screen(); /** * Destructor */ - ~ScreenSurface(); + virtual ~Screen() {} /** - * Initialize the surface + * Updates the physical screen with contents of the internal surface */ - void init(); + virtual void update(); /** - * Copys an area of the screen surface to the ScmmVM physical screen buffer - * @param bounds Area of screen surface to copy + * Transition to a new screen with a given effect */ - void copyRectToScreen(const Common::Rect &bounds); + void transition(ScreenTransition transitionType, bool surfaceFlag); /** - * Updates the screen with the contents of the surface + * Set the screen drawing area to a sub-section of the real screen */ - void updateScreen(); - - void transition(ScreenTransition transitionType, bool surfaceFlag); - void setClipBounds(const Common::Rect &r); + /** + * Reset back to drawing on the entirety of the screen + */ void resetClipBounds(); - const Common::Rect &getClipBounds() { return _clipBounds; } + /** + * Return the current drawing/clip area + */ + const Common::Rect getClipBounds() const { + const Common::Point pt = getOffsetFromOwner(); + return Common::Rect(pt.x, pt.y, pt.x + this->w, pt.y + this->h); + } }; } // End of namespace MADS |