diff options
| author | Alyssa Milburn | 2010-12-02 21:25:15 +0000 | 
|---|---|---|
| committer | Alyssa Milburn | 2010-12-02 21:25:15 +0000 | 
| commit | 27799e354e073cc2db6160fdf25b4da321d343e7 (patch) | |
| tree | def5097b0736d9e348fd55efc26fb773756d7c2b /engines/mohawk/graphics.h | |
| parent | eb729b5f2e5178a652c87fcdc7493eda88c1bddc (diff) | |
| download | scummvm-rg350-27799e354e073cc2db6160fdf25b4da321d343e7.tar.gz scummvm-rg350-27799e354e073cc2db6160fdf25b4da321d343e7.tar.bz2 scummvm-rg350-27799e354e073cc2db6160fdf25b4da321d343e7.zip | |
MOHAWK: move shared setPalette/copyImage routines into GraphicsManager
svn-id: r54743
Diffstat (limited to 'engines/mohawk/graphics.h')
| -rw-r--r-- | engines/mohawk/graphics.h | 15 | 
1 files changed, 12 insertions, 3 deletions
| diff --git a/engines/mohawk/graphics.h b/engines/mohawk/graphics.h index ffb7143686..e872291d4d 100644 --- a/engines/mohawk/graphics.h +++ b/engines/mohawk/graphics.h @@ -35,6 +35,7 @@  namespace Mohawk { +class MohawkEngine;  class MohawkEngine_Myst;  class MohawkEngine_Riven;  class MohawkEngine_LivingBooks; @@ -83,6 +84,11 @@ public:  	// Free all surfaces in the cache  	void clearCache(); +	void preloadImage(uint16 image); +	virtual void setPalette(uint16 id); +	void copyAnimImageToScreen(uint16 image, int left = 0, int top = 0); +	void copyAnimImageSectionToScreen(uint16 image, Common::Rect src, Common::Rect dest); +  protected:  	// findImage will search the cache to find the image.  	// If not found, it will call decodeImage to get a new one. @@ -91,6 +97,8 @@ protected:  	// decodeImage will always return a new image.  	virtual MohawkSurface *decodeImage(uint16 id) = 0; +	virtual MohawkEngine *getVM() = 0; +  private:  	// An image cache that stores images until clearCache() is called  	Common::HashMap<uint16, MohawkSurface*> _cache; @@ -110,6 +118,7 @@ public:  protected:  	MohawkSurface *decodeImage(uint16 id); +	MohawkEngine *getVM() { return (MohawkEngine *)_vm; }  private:  	MohawkEngine_Myst *_vm; @@ -177,6 +186,7 @@ public:  protected:  	MohawkSurface *decodeImage(uint16 id); +	MohawkEngine *getVM() { return (MohawkEngine *)_vm; }  private:  	MohawkEngine_Riven *_vm; @@ -205,14 +215,13 @@ public:  	LBGraphics(MohawkEngine_LivingBooks *vm, uint16 width, uint16 height);  	~LBGraphics(); -	void preloadImage(uint16 image); -	void copyImageToScreen(uint16 image, bool useOffsets = false, int left = 0, int top = 0); -	void copyImageSectionToScreen(uint16 image, Common::Rect src, Common::Rect dest);  	void setPalette(uint16 id); +	void copyOffsetAnimImageToScreen(uint16 image, int left = 0, int top = 0);  	bool imageIsTransparentAt(uint16 image, bool useOffsets, int x, int y);  protected:  	MohawkSurface *decodeImage(uint16 id); +	MohawkEngine *getVM() { return (MohawkEngine *)_vm; }  private:  	MohawkBitmap *_bmpDecoder; | 
