aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNipun Garg2019-08-12 12:57:35 +0530
committerEugene Sandulenko2019-09-03 17:17:33 +0200
commit24da0a245c11d7ff6ac1d331610d6879e12beb71 (patch)
treee02e78170537045bf99cc4e58aef71509ecb554c /engines
parentbbbeaec131d51da6b1cc0690b96e8f96c4506b62 (diff)
downloadscummvm-rg350-24da0a245c11d7ff6ac1d331610d6879e12beb71.tar.gz
scummvm-rg350-24da0a245c11d7ff6ac1d331610d6879e12beb71.tar.bz2
scummvm-rg350-24da0a245c11d7ff6ac1d331610d6879e12beb71.zip
HDB: Add PPC cursor
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/gfx.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp
index e44b96e835..869790b316 100644
--- a/engines/hdb/gfx.cpp
+++ b/engines/hdb/gfx.cpp
@@ -24,6 +24,9 @@
#include "common/sinetables.h"
#include "common/random.h"
#include "common/memstream.h"
+#include "graphics/cursor.h"
+#include "graphics/wincursor.h"
+#include "graphics/cursorman.h"
#include "hdb/hdb.h"
#include "hdb/ai.h"
@@ -87,6 +90,14 @@ bool Gfx::init() {
// Set the default cursor pos & char clipping
setCursor(0, 0);
+ if (g_hdb->isPPC()) {
+ Graphics::Cursor *cursor = Graphics::makeDefaultWinCursor();
+
+ CursorMan.replaceCursor(cursor->getSurface(), cursor->getWidth(), cursor->getHeight(), cursor->getHotspotX(), cursor->getHotspotY(), cursor->getKeyColor());
+ CursorMan.replaceCursorPalette(cursor->getPalette(), cursor->getPaletteStartIndex(), cursor->getPaletteCount());
+ delete cursor;
+ }
+
_eLeft = 0;
_eRight = g_hdb->_screenWidth;
_eTop = 0;
@@ -289,11 +300,12 @@ void Gfx::drawPointer() {
return;
// If we are in game and the cursor should be displayed, draw it
- if (g_hdb->isPPC()) {
- debug(9, "STUB: Draw Pointer in PPC");
- } else {
- if (_showCursor || g_hdb->getGameState() != GAME_PLAY)
+ if (_showCursor || g_hdb->getGameState() != GAME_PLAY) {
+ if (g_hdb->isPPC()) {
+ CursorMan.showMouse(true);
+ } else {
_mousePointer[anim]->drawMasked(g_hdb->_input->getMouseX() - 16, g_hdb->_input->getMouseY() - 16);
+ }
}
}