aboutsummaryrefslogtreecommitdiff
path: root/engines/supernova/supernova.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/supernova/supernova.cpp')
-rw-r--r--engines/supernova/supernova.cpp19
1 files changed, 19 insertions, 0 deletions
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() {