diff options
author | Paul Gilbert | 2014-03-17 21:53:22 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-03-17 21:53:22 -0400 |
commit | 0c8a3a47e28075bd559be43bde910587af35d8ab (patch) | |
tree | 70f5dee3600fd38e1919553f9e44a7b77f7a9a8e /engines/mads/screen.h | |
parent | d57d4b876e90d1d043bd171c9de46d93c9e014f4 (diff) | |
download | scummvm-rg350-0c8a3a47e28075bd559be43bde910587af35d8ab.tar.gz scummvm-rg350-0c8a3a47e28075bd559be43bde910587af35d8ab.tar.bz2 scummvm-rg350-0c8a3a47e28075bd559be43bde910587af35d8ab.zip |
MADS: Transformed ImageInterEntries to be User Interface UISlots
Diffstat (limited to 'engines/mads/screen.h')
-rw-r--r-- | engines/mads/screen.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/engines/mads/screen.h b/engines/mads/screen.h index e101020fc8..2860462ff1 100644 --- a/engines/mads/screen.h +++ b/engines/mads/screen.h @@ -45,6 +45,64 @@ enum ScreenTransition { kVertTransition7, kCenterVertTransition }; +class SpriteSlot; +class TextDisplay; + +class DirtyArea { +private: + static MADSEngine *_vm; + friend class DirtyAreas; +public: + Common::Rect _bounds; + Common::Rect _bounds2; + bool _textActive; + bool _active; + + DirtyArea(); + + void setArea(int width, int height, int maxWidth, int maxHeight); + + void setSpriteSlot(const SpriteSlot *spriteSlot); + + /** + * Set up a dirty area for a text display + */ + void setTextDisplay(const TextDisplay *textDisplay); +}; + +class DirtyAreas : public Common::Array<DirtyArea> { +private: + MADSEngine *_vm; +public: + DirtyAreas(MADSEngine *vm); + + /** + * Merge together any designated dirty areas that overlap + * @param startIndex 1-based starting dirty area starting index + * @param count Number of entries to process + */ + void merge(int startIndex, int count); + + bool intersects(int idx1, int idx2); + void mergeAreas(int idx1, int idx2); + + /** + * Copy the data specified by the dirty rect list between surfaces + * @param srcSurface Source surface + * @param destSurface Dest surface + * @param posAdjust Position adjustment + */ + void copy(MSurface *srcSurface, MSurface *destSurface, const Common::Point &posAdjust); + + /** + * Use the lsit of dirty areas to copy areas of the screen surface to + * the physical screen + * @param posAdjust Position adjustment */ + void copyToScreen(const Common::Point &posAdjust); + + void reset(); +}; + class ScreenSurface : public MSurface { private: /** |