aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/picture.h
diff options
context:
space:
mode:
authorPaul Gilbert2019-01-05 17:16:42 -0800
committerPaul Gilbert2019-01-05 17:16:42 -0800
commit81541a5f049c4dd8ec10a9c13b163cf478bdc921 (patch)
tree5e2beb823694ddb2c9b3d882d998ac0a0a4b59d9 /engines/glk/picture.h
parentbde504281311953bd99db087471b798da39ed143 (diff)
downloadscummvm-rg350-81541a5f049c4dd8ec10a9c13b163cf478bdc921.tar.gz
scummvm-rg350-81541a5f049c4dd8ec10a9c13b163cf478bdc921.tar.bz2
scummvm-rg350-81541a5f049c4dd8ec10a9c13b163cf478bdc921.zip
GLK: FROTZ: Properly handle picture transparency
Diffstat (limited to 'engines/glk/picture.h')
-rw-r--r--engines/glk/picture.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/engines/glk/picture.h b/engines/glk/picture.h
index 7c9bcc67d7..e3b65602a2 100644
--- a/engines/glk/picture.h
+++ b/engines/glk/picture.h
@@ -32,6 +32,8 @@ namespace Glk {
* Picture/image class
*/
struct Picture : Graphics::ManagedSurface {
+private:
+ int _transColor;
public:
int _refCount;
uint _id;
@@ -40,14 +42,12 @@ public:
/**
* Constructor
*/
- Picture() : Graphics::ManagedSurface(), _refCount(0), _id(0), _scaled(false) {}
+ Picture() : Graphics::ManagedSurface(), _refCount(0), _id(0), _scaled(false), _transColor(0x7777) {}
/**
* Constructor
*/
- Picture(int width, int height, const Graphics::PixelFormat &fmt) :
- Graphics::ManagedSurface(width, height, fmt), _refCount(0), _id(0), _scaled(false) {}
-
+ Picture(int width, int height, const Graphics::PixelFormat &fmt);
/**
* Increment reference counter
*/
@@ -62,6 +62,16 @@ public:
* Draw the picture
*/
void drawPicture(const Common::Point &destPos, const Common::Rect &box);
+
+ /**
+ * Get the transparency color
+ */
+ uint getTransparentColor() const { return _transColor; }
+
+ /**
+ * Set the transparency color
+ */
+ void setTransparentColor(uint color) { _transColor = color; }
};
/**