aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/draw-manager.cpp22
-rw-r--r--engines/hdb/draw-manager.h8
2 files changed, 30 insertions, 0 deletions
diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp
index 57585ca7d0..1b53a5e5d6 100644
--- a/engines/hdb/draw-manager.cpp
+++ b/engines/hdb/draw-manager.cpp
@@ -146,6 +146,28 @@ void DrawMan::updateVideo() {
debug(9, "STUB: DrawMan::updateVideo incomplete");
}
+void DrawMan::drawPointer() {
+ static int anim = 0;
+ static uint32 animTime = 0;
+
+ if (animTime < g_system->getMillis()) {
+ animTime = g_system->getMillis() + 50;
+ anim = (anim + 1) & 7;
+ }
+
+ // If pointer is not displayable and we are in game, exit
+ if (!_pointerDisplayable && g_hdb->getGameState() == GAME_PLAY)
+ return;
+
+ // If we are in game and the cursor should be displayed, draw it
+ if (_showCursor || g_hdb->getGameState() != GAME_PLAY)
+ _mousePointer[anim]->drawMasked(g_hdb->_input->getMouseX() - 16, g_hdb->_input->getMouseY() - 16);
+}
+
+void DrawMan::setPointerState(int value) {
+ _pointerDisplayable = value;
+}
+
void DrawMan::setFade(bool fadeIn, bool black, int steps) {
_fadeInfo.isFadeIn = fadeIn;
_fadeInfo.isBlack = black;
diff --git a/engines/hdb/draw-manager.h b/engines/hdb/draw-manager.h
index 9f05b31c26..1ace112993 100644
--- a/engines/hdb/draw-manager.h
+++ b/engines/hdb/draw-manager.h
@@ -93,6 +93,14 @@ public:
bool init();
void fillScreen(uint32 color);
void updateVideo();
+ void setPointerState(int value);
+ void drawPointer();
+ void showPointer(bool status) {
+ _showCursor = status;
+ }
+ bool getPointer() {
+ return _showCursor;
+ }
void setFade(bool fadeIn, bool black, int steps);
void updateFade();