diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/winexe_ne.cpp | 7 | ||||
-rw-r--r-- | common/winexe_ne.h | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/common/winexe_ne.cpp b/common/winexe_ne.cpp index 8a2b07b4d0..3149528566 100644 --- a/common/winexe_ne.cpp +++ b/common/winexe_ne.cpp @@ -38,6 +38,7 @@ NECursor::NECursor() { _hotspotX = 0; _hotspotY = 0; _surface = 0; + _keyColor = 0; memset(_palette, 0, 256 * 3); } @@ -61,6 +62,10 @@ uint16 NECursor::getHotspotY() const { return _hotspotY; } +byte NECursor::getKeyColor() const { + return _keyColor; +} + void NECursor::setDimensions(uint16 width, uint16 height) { _width = width; _height = height; @@ -156,7 +161,7 @@ bool NECursor::readCursor(SeekableReadStream &stream, uint32 count) { else *rowDest = 1; } else - *rowDest = 0; + *rowDest = _keyColor; } } diff --git a/common/winexe_ne.h b/common/winexe_ne.h index 0c3d5293ab..562c8f72da 100644 --- a/common/winexe_ne.h +++ b/common/winexe_ne.h @@ -50,6 +50,8 @@ public: uint16 getHotspotX() const; /** Return the cursor's hotspot's y coordinate. */ uint16 getHotspotY() const; + /** Return the cursor's transparent key. */ + byte getKeyColor() const; const byte *getSurface() const { return _surface; } const byte *getPalette() const { return _palette; } @@ -70,6 +72,7 @@ private: uint16 _height; ///< The cursor's height. uint16 _hotspotX; ///< The cursor's hotspot's x coordinate. uint16 _hotspotY; ///< The cursor's hotspot's y coordinate. + byte _keyColor; ///< The cursor's transparent key /** Clear the cursor. */ void clear(); |