aboutsummaryrefslogtreecommitdiff
path: root/graphics/cursorman.h
diff options
context:
space:
mode:
authorJody Northup2009-06-13 10:24:52 +0000
committerJody Northup2009-06-13 10:24:52 +0000
commit350dc4290fd5dd8f28af9e63713b48ef2c131f09 (patch)
treeaf86a10ccd48c275b362ca0407ddfd16180a8c0c /graphics/cursorman.h
parent2ee51a8fa189fc7817fd6d78533664ec870fca48 (diff)
downloadscummvm-rg350-350dc4290fd5dd8f28af9e63713b48ef2c131f09.tar.gz
scummvm-rg350-350dc4290fd5dd8f28af9e63713b48ef2c131f09.tar.bz2
scummvm-rg350-350dc4290fd5dd8f28af9e63713b48ef2c131f09.zip
Fixed cursor code to keep track of cursor formats so that ThemeEngine and/or GuiManager cursors will render properly over the game (on spacebar hit, for instance)
svn-id: r41491
Diffstat (limited to 'graphics/cursorman.h')
-rw-r--r--graphics/cursorman.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/graphics/cursorman.h b/graphics/cursorman.h
index 0c02292818..834d0d2b02 100644
--- a/graphics/cursorman.h
+++ b/graphics/cursorman.h
@@ -142,6 +142,31 @@ public:
*/
void replaceCursorPalette(const byte *colors, uint start, uint num);
+#ifdef ENABLE_16BIT
+ /**
+ * Push a new cursor pixel format onto the stack, and set it in the backend.
+ *
+ * @param format the new format data, in a Graphics::PixelFormat
+ */
+ void pushCursorFormat(PixelFormat format);
+
+ /**
+ * Pop a cursor pixel format from the stack, and restore the previous one to
+ * the backend. If there is no previous format, the screen format is
+ * used instead.
+ */
+ void popCursorFormat();
+
+ /**
+ * Replace the current cursor pixel format on the stack. If the stack is
+ * empty, the format is pushed instead. It's a slightly more optimized
+ * way of popping the old format before pushing the new one.
+ *
+ * @param format the new format data, in a Graphics::PixelFormat
+ */
+ void replaceCursorFormat(PixelFormat format);
+#endif
+
private:
friend class Common::Singleton<SingletonBaseType>;
CursorManager();
@@ -216,9 +241,11 @@ private:
delete[] _data;
}
};
-
Common::Stack<Cursor *> _cursorStack;
Common::Stack<Palette *> _cursorPaletteStack;
+#ifdef ENABLE_16BIT
+ Common::Stack<Graphics::PixelFormat *> _cursorFormatStack;
+#endif
};
} // End of namespace Graphics