aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle
diff options
context:
space:
mode:
authorPaul Gilbert2012-01-20 16:31:15 +1100
committerStrangerke2012-04-06 08:20:11 +0200
commit3caa20a61879e683b834521be0110941ae9dce47 (patch)
tree579c31160315dc6ecb39fc56d2b85605a686c22d /engines/mortevielle
parent5ecb0d4eea46fa89b89152d33c9c95ee87be60c0 (diff)
downloadscummvm-rg350-3caa20a61879e683b834521be0110941ae9dce47.tar.gz
scummvm-rg350-3caa20a61879e683b834521be0110941ae9dce47.tar.bz2
scummvm-rg350-3caa20a61879e683b834521be0110941ae9dce47.zip
MORTEVIELLE: Set up default mouse cursor
Diffstat (limited to 'engines/mortevielle')
-rw-r--r--engines/mortevielle/mortevielle.cpp43
-rw-r--r--engines/mortevielle/mortevielle.h1
2 files changed, 40 insertions, 4 deletions
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp
index 6797a7e649..97d36e9a34 100644
--- a/engines/mortevielle/mortevielle.cpp
+++ b/engines/mortevielle/mortevielle.cpp
@@ -24,6 +24,7 @@
#include "common/debug-channels.h"
#include "engines/util.h"
#include "engines/engine.h"
+#include "graphics/cursorman.h"
#include "graphics/palette.h"
#include "graphics/pixelformat.h"
#include "mortevielle/mortevielle.h"
@@ -64,7 +65,17 @@ Common::ErrorCode MortevielleEngine::initialise() {
res = 2;
// Load the mort.dat resource
- return loadMortDat();
+ Common::ErrorCode result = loadMortDat();
+ if (result != Common::kNoError)
+ return result;
+
+ // Set default EGA palette
+ _paletteManager.setDefaultPalette();
+
+ // Setup the mouse cursor
+ initMouse();
+
+ return Common::kNoError;
}
/**
@@ -187,6 +198,33 @@ void MortevielleEngine::addKeypress(Common::Event &evt) {
}
}
+static byte CURSOR_ARROW_DATA[16 * 16] = {
+ 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x0f, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x0f, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x0f, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x0f, 0x00, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x0f, 0x0f, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
+};
+
+/**
+ * Initialise the mouse
+ */
+void MortevielleEngine::initMouse() {
+ CursorMan.replaceCursor(CURSOR_ARROW_DATA, 16, 16, 0, 0, 0xff);
+ CursorMan.showMouse(true);
+}
+
/*-------------------------------------------------------------------------*/
Common::Error MortevielleEngine::run() {
@@ -195,9 +233,6 @@ Common::Error MortevielleEngine::run() {
if (err != Common::kNoError)
return err;
- // Set default palette
- _paletteManager.setDefaultPalette();
-
// Dispatch to the game's main routine
mortevielle_main();
diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h
index c00561d54d..2ea48c63b8 100644
--- a/engines/mortevielle/mortevielle.h
+++ b/engines/mortevielle/mortevielle.h
@@ -57,6 +57,7 @@ private:
void loadFont(Common::File &f);
bool handleEvents();
void addKeypress(Common::Event &evt);
+ void initMouse();
public:
ScreenSurface _screenSurface;
PaletteManager _paletteManager;