aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/supernova/msn_def.h1
-rw-r--r--engines/supernova/supernova.cpp19
-rw-r--r--engines/supernova/supernova.h2
3 files changed, 22 insertions, 0 deletions
diff --git a/engines/supernova/msn_def.h b/engines/supernova/msn_def.h
index 23516a72b7..8e524043bb 100644
--- a/engines/supernova/msn_def.h
+++ b/engines/supernova/msn_def.h
@@ -95,6 +95,7 @@ const int kColorLightBlue = 12;
const int kColorLightGreen = 13;
const int kColorLightYellow = 14;
const int kColorLightRed = 15;
+const int kColorCursorTransparent = kColorWhite25;
#define HGR_BEF kColorWhite25
#define COL_BEF kColorDarkGreen
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp
index 297365513c..4d5da92819 100644
--- a/engines/supernova/supernova.cpp
+++ b/engines/supernova/supernova.cpp
@@ -129,6 +129,8 @@ Common::Error SupernovaEngine::run() {
initPalette();
paletteFadeIn();
+ CursorMan.replaceCursor(_mouseWait, 16, 16, 0, 0, kColorCursorTransparent);
+ CursorMan.replaceCursorPalette(initVGAPalette, 0, 16);
CursorMan.showMouse(true);
while (_gameRunning) {
@@ -211,6 +213,23 @@ void SupernovaEngine::initData() {
file.read(_soundSamples[i]._buffer, _soundSamples[i]._length);
file.close();
}
+
+ // Cursor
+ const uint16 *bufferNormal = reinterpret_cast<const uint16 *>(mouseNormal);
+ const uint16 *bufferWait = reinterpret_cast<const uint16 *>(mouseWait);
+ for (uint i = 0; i < sizeof(mouseNormal) / 4; ++i) {
+ for (uint bit = 0; bit < 16; ++bit) {
+ uint mask = 0x8000 >> bit;
+ uint bitIndex = i * 16 + bit;
+
+ _mouseNormal[bitIndex] = (bufferNormal[i] & mask) ? kColorCursorTransparent : kColorBlack;
+ if (bufferNormal[i + 16] & mask)
+ _mouseNormal[bitIndex] = kColorLightRed;
+ _mouseWait[bitIndex] = (bufferWait[i] & mask) ? kColorCursorTransparent : kColorBlack;
+ if (bufferWait[i + 16] & mask)
+ _mouseWait[bitIndex] = kColorLightRed;
+ }
+ }
}
void SupernovaEngine::initPalette() {
diff --git a/engines/supernova/supernova.h b/engines/supernova/supernova.h
index db9919ecc4..8ff849f09f 100644
--- a/engines/supernova/supernova.h
+++ b/engines/supernova/supernova.h
@@ -80,6 +80,8 @@ public:
Console *_console;
Audio::SoundHandle _soundHandle;
ScreenBufferStack _screenBuffer;
+ byte _mouseNormal[256];
+ byte _mouseWait[256];
MSNImageDecoder _images[44];
MSNImageDecoder *_currentImage;
struct SoundSample {