aboutsummaryrefslogtreecommitdiff
path: root/graphics/wincursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/wincursor.cpp')
-rw-r--r--graphics/wincursor.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/graphics/wincursor.cpp b/graphics/wincursor.cpp
index 2db72a2874..1d599f7130 100644
--- a/graphics/wincursor.cpp
+++ b/graphics/wincursor.cpp
@@ -30,6 +30,46 @@
namespace Graphics {
+/** A Windows cursor. */
+class WinCursor : public Cursor {
+public:
+ WinCursor();
+ ~WinCursor();
+
+ /** Return the cursor's width. */
+ uint16 getWidth() const;
+ /** Return the cursor's height. */
+ uint16 getHeight() const;
+ /** Return the cursor's hotspot's x coordinate. */
+ 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; }
+ byte getPaletteStartIndex() const { return 0; }
+ uint16 getPaletteCount() const { return 256; }
+
+ /** Read the cursor's data out of a stream. */
+ bool readFromStream(Common::SeekableReadStream &stream);
+
+private:
+ byte *_surface;
+ byte _palette[256 * 3];
+
+ uint16 _width; ///< The cursor's width.
+ 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();
+};
+
WinCursor::WinCursor() {
_width = 0;
_height = 0;