aboutsummaryrefslogtreecommitdiff
path: root/engines/dm
diff options
context:
space:
mode:
authorBendegúz Nagy2016-06-15 18:22:32 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commitde3bb231d703a5f19c21e643f19506a27ab53255 (patch)
treea557ab33da938fde3b8d525253a2e2bbe3154d86 /engines/dm
parentad8fbaa118e26cb57d3d77ddb7a597c2b37a9f76 (diff)
downloadscummvm-rg350-de3bb231d703a5f19c21e643f19506a27ab53255.tar.gz
scummvm-rg350-de3bb231d703a5f19c21e643f19506a27ab53255.tar.bz2
scummvm-rg350-de3bb231d703a5f19c21e643f19506a27ab53255.zip
DM: Add dummy cursor display
Diffstat (limited to 'engines/dm')
-rw-r--r--engines/dm/dm.cpp1
-rw-r--r--engines/dm/eventman.cpp37
-rw-r--r--engines/dm/eventman.h3
3 files changed, 36 insertions, 5 deletions
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index df6629c3f9..a86e7850b9 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -80,6 +80,7 @@ Common::Error DMEngine::run() {
_displayMan->loadPalette(gPalCredits);
_eventMan->initMouse();
+ _eventMan->showMouse(true);
while (true) {
_eventMan->processInput();
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp
index 44ea32795f..96a6bf570a 100644
--- a/engines/dm/eventman.cpp
+++ b/engines/dm/eventman.cpp
@@ -2,23 +2,52 @@
#include "dm.h"
#include "common/system.h"
#include "dungeonman.h"
+#include "graphics/cursorman.h"
+#include "gfx.h"
using namespace DM;
-EventManager::EventManager(DMEngine *vm) : _vm(vm) {}
+EventManager::EventManager(DMEngine *vm) : _vm(vm) {
+ _dummyMapIndex = 0;
+}
+
+
+// dummy data
+static const byte mouseData[] = {
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 7, 1, 0, 0, 0, 0, 0, 0, 0,
+ 1, 7, 7, 1, 0, 0, 0, 0, 0, 0,
+ 1, 7, 7, 7, 1, 0, 0, 0, 0, 0,
+ 1, 7, 7, 7, 7, 1, 0, 0, 0, 0,
+ 1, 7, 7, 7, 7, 7, 1, 0, 0, 0,
+ 1, 7, 7, 7, 7, 7, 7, 1, 0, 0,
+ 1, 7, 7, 7, 7, 7, 7, 7, 1, 0,
+ 1, 7, 7, 7, 7, 7, 1, 1, 1, 1,
+ 1, 7, 7, 1, 7, 7, 1, 0, 0, 0,
+ 1, 7, 1, 0, 1, 7, 7, 1, 0, 0,
+ 1, 1, 0, 0, 1, 7, 7, 1, 0, 0,
+ 0, 0, 0, 0, 0, 1, 7, 7, 1, 0,
+ 0, 0, 0, 0, 0, 1, 7, 7, 1, 0,
+ 0, 0, 0, 0, 0, 0, 1, 1, 0, 0
+};
+#define MOUSE_WIDTH 10
+#define MOUSE_HEIGHT 15
void EventManager::initMouse() {
_mousePos = Common::Point(0, 0);
- _dummyMapIndex = 0;
+ CursorMan.pushCursor(mouseData, MOUSE_WIDTH, MOUSE_HEIGHT, 0, 0, 0);
+ CursorMan.showMouse(false);
+
+ setMousePos(Common::Point(320/2, 200/2));
// TODO: add cursor creatin, set to hidden
}
-void showMouse(bool visibility) {
- // TODO: add code
+void EventManager::showMouse(bool visibility) {
+ CursorMan.showMouse(visibility);
}
void EventManager::setMousePos(Common::Point pos) {
diff --git a/engines/dm/eventman.h b/engines/dm/eventman.h
index eabff49a2b..ccce4c46b7 100644
--- a/engines/dm/eventman.h
+++ b/engines/dm/eventman.h
@@ -17,12 +17,13 @@ class EventManager {
public:
EventManager(DMEngine *vm);
void initMouse();
+ void showMouse(bool visibility);
void setMousePos(Common::Point pos);
void processInput();
};
-};
+}
#endif DM_EVENTMAN_H