diff options
author | Paul Gilbert | 2016-03-20 14:49:30 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-03-20 14:49:30 -0400 |
commit | 509a00109e79156e91c062f145ac3aa86ec8584e (patch) | |
tree | e625fd93b3b21feabae1eff92e3efbf23a7d7a83 /engines/access/screen.h | |
parent | f6c3363cf54af1c01efc12a98ab27a8af52aad3e (diff) | |
parent | 390487aa43e5507d4d0fb4ae57e7cf726a94f4c1 (diff) | |
download | scummvm-rg350-509a00109e79156e91c062f145ac3aa86ec8584e.tar.gz scummvm-rg350-509a00109e79156e91c062f145ac3aa86ec8584e.tar.bz2 scummvm-rg350-509a00109e79156e91c062f145ac3aa86ec8584e.zip |
Merge pull request #652 from dreammaster/screen
ALL: Removing code duplication via new managed surface & screen classes
Diffstat (limited to 'engines/access/screen.h')
-rw-r--r-- | engines/access/screen.h | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/engines/access/screen.h b/engines/access/screen.h index 6fa0fe3812..a022741f91 100644 --- a/engines/access/screen.h +++ b/engines/access/screen.h @@ -26,15 +26,13 @@ #include "common/scummsys.h" #include "common/rect.h" #include "common/stream.h" +#include "graphics/screen.h" #include "access/asurface.h" namespace Access { class AccessEngine; -#define PALETTE_COUNT 256 -#define PALETTE_SIZE (256 * 3) - struct ScreenSave { int _clipWidth; int _clipHeight; @@ -47,7 +45,7 @@ struct ScreenSave { int _screenYOff; }; -class Screen : public ASurface { +class Screen : public virtual ASurface, public virtual Graphics::Screen { private: AccessEngine *_vm; byte _tempPalette[PALETTE_SIZE]; @@ -66,10 +64,6 @@ private: Common::List<Common::Rect> _dirtyRects; void updatePalette(); - - void mergeDirtyRects(); - - bool unionRectangle(Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2); public: int _vesaMode; int _startColor, _numColors; @@ -87,6 +81,11 @@ public: bool _screenChangeFlag; bool _fadeIn; public: + /** + * Updates the screen + */ + virtual void update(); + virtual void copyBlock(ASurface *src, const Common::Rect &bounds); virtual void restoreBlock(); @@ -95,15 +94,7 @@ public: virtual void drawBox(); - virtual void transBlitFrom(ASurface *src, const Common::Point &destPos); - - virtual void transBlitFrom(ASurface *src, const Common::Rect &bounds); - - virtual void blitFrom(const Graphics::Surface &src); - - virtual void copyBuffer(Graphics::Surface *src); - - virtual void addDirtyRect(const Common::Rect &r); + virtual void copyBuffer(Graphics::ManagedSurface *src); public: Screen(AccessEngine *vm); @@ -114,11 +105,6 @@ public: void setPanel(int num); /** - * Update the underlying screen - */ - void updateScreen(); - - /** * Fade out screen */ void forceFadeOut(); |