diff options
author | johndoe123 | 2014-04-08 19:43:17 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | 67366aa04b723fadec300cc6ce1d5c6ee9241af7 (patch) | |
tree | bd4783f6b6ebb6c25d52a1349a60c2fd10034e0b /engines/illusions/screen.h | |
parent | 3f15233f78a264e45ce74ecd2db9ed3119b1b654 (diff) | |
download | scummvm-rg350-67366aa04b723fadec300cc6ce1d5c6ee9241af7.tar.gz scummvm-rg350-67366aa04b723fadec300cc6ce1d5c6ee9241af7.tar.bz2 scummvm-rg350-67366aa04b723fadec300cc6ce1d5c6ee9241af7.zip |
ILLUSIONS: More work on Duckman
Diffstat (limited to 'engines/illusions/screen.h')
-rw-r--r-- | engines/illusions/screen.h | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/engines/illusions/screen.h b/engines/illusions/screen.h index cfeaba63bc..5bd5eb79ce 100644 --- a/engines/illusions/screen.h +++ b/engines/illusions/screen.h @@ -44,7 +44,7 @@ struct SpriteDecompressQueueItem { class SpriteDecompressQueue { public: - SpriteDecompressQueue(); + SpriteDecompressQueue(Screen *screen); ~SpriteDecompressQueue(); void insert(byte *drawFlags, uint32 flags, uint32 field8, WidthHeight &dimensions, byte *compressedPixels, Graphics::Surface *surface); @@ -52,6 +52,7 @@ public: protected: typedef Common::List<SpriteDecompressQueueItem*> SpriteDecompressQueueList; typedef SpriteDecompressQueueList::iterator SpriteDecompressQueueListIterator; + Screen *_screen; SpriteDecompressQueueList _queue; void decompress(SpriteDecompressQueueItem *item); }; @@ -96,9 +97,11 @@ protected: bool calcItemRect(SpriteDrawQueueItem *item, Common::Rect &srcRect, Common::Rect &dstRect); }; +// TODO Split into two classes (8bit and 16bit)? + class Screen { public: - Screen(IllusionsEngine *vm); + Screen(IllusionsEngine *vm, int16 width, int16 height, int bpp); ~Screen(); Graphics::Surface *allocSurface(int16 width, int16 height); Graphics::Surface *allocSurface(SurfInfo &surfInfo); @@ -106,11 +109,13 @@ public: void setDisplayOn(bool isOn); uint16 getColorKey2(); void updateSprites(); + void decompressSprite(SpriteDecompressQueueItem *item); void drawSurface(Common::Rect &dstRect, Graphics::Surface *surface, Common::Rect &srcRect, int16 scale, uint32 flags); - void drawSurface10(int16 destX, int16 destY, Graphics::Surface *surface, Common::Rect &srcRect, uint16 colorKey); - void drawSurface11(int16 destX, int16 destY, Graphics::Surface *surface, Common::Rect &srcRect); - void drawSurface20(Common::Rect &dstRect, Graphics::Surface *surface, Common::Rect &srcRect, uint16 colorKey); - void drawSurface21(Common::Rect &dstRect, Graphics::Surface *surface, Common::Rect &srcRect); + void setPalette(byte *colors, uint start, uint count); + void getPalette(byte *colors); + void updatePalette(); + int16 getScreenWidth() const { return _backSurface->w; } + int16 getScreenHeight() const { return _backSurface->h; } public: IllusionsEngine *_vm; bool _displayOn; @@ -119,6 +124,23 @@ public: SpriteDecompressQueue *_decompressQueue; SpriteDrawQueue *_drawQueue; Graphics::Surface *_backSurface; + + bool _needRefreshPalette; + byte _mainPalette[768]; + + void setSystemPalette(byte *palette); + + void decompressSprite8(SpriteDecompressQueueItem *item); + void drawSurface8(Common::Rect &dstRect, Graphics::Surface *surface, Common::Rect &srcRect, int16 scale, uint32 flags); + void drawSurface81(int16 destX, int16 destY, Graphics::Surface *surface, Common::Rect &srcRect); + void drawSurface82(Common::Rect &dstRect, Graphics::Surface *surface, Common::Rect &srcRect); + + void decompressSprite16(SpriteDecompressQueueItem *item); + void drawSurface16(Common::Rect &dstRect, Graphics::Surface *surface, Common::Rect &srcRect, int16 scale, uint32 flags); + void drawSurface10(int16 destX, int16 destY, Graphics::Surface *surface, Common::Rect &srcRect, uint16 colorKey); + void drawSurface11(int16 destX, int16 destY, Graphics::Surface *surface, Common::Rect &srcRect); + void drawSurface20(Common::Rect &dstRect, Graphics::Surface *surface, Common::Rect &srcRect, uint16 colorKey); + void drawSurface21(Common::Rect &dstRect, Graphics::Surface *surface, Common::Rect &srcRect); }; } // End of namespace Illusions |