diff options
author | Paul Gilbert | 2013-12-28 14:01:06 +1100 |
---|---|---|
committer | Paul Gilbert | 2013-12-28 14:01:06 +1100 |
commit | 9eccf91aea8dc8f8ebbaa61c04152d0e1f70902e (patch) | |
tree | 988be1b5bf2f427118f70f2c622662be3d124078 /engines/voyeur | |
parent | 3b9cdf48eec9afc3664d04fa1ecbd71c94eb8cf5 (diff) | |
download | scummvm-rg350-9eccf91aea8dc8f8ebbaa61c04152d0e1f70902e.tar.gz scummvm-rg350-9eccf91aea8dc8f8ebbaa61c04152d0e1f70902e.tar.bz2 scummvm-rg350-9eccf91aea8dc8f8ebbaa61c04152d0e1f70902e.zip |
VOYEUR: Implemented startCursorBlink and drawDot
Diffstat (limited to 'engines/voyeur')
-rw-r--r-- | engines/voyeur/events.cpp | 10 | ||||
-rw-r--r-- | engines/voyeur/graphics.cpp | 8 | ||||
-rw-r--r-- | engines/voyeur/graphics.h | 1 | ||||
-rw-r--r-- | engines/voyeur/staticres.cpp | 10 | ||||
-rw-r--r-- | engines/voyeur/staticres.h | 4 |
5 files changed, 32 insertions, 1 deletions
diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp index 4d5c03ce60..d622a6d00f 100644 --- a/engines/voyeur/events.cpp +++ b/engines/voyeur/events.cpp @@ -451,7 +451,15 @@ void EventsManager::checkForKey() { } void EventsManager::startCursorBlink() { - error("TODO: startCursorBlink"); + if (_vm->_voy._field478 & 0x10) { + _vm->_graphicsManager.setOneColor(128, 55, 5, 5); + _vm->_graphicsManager.setColor(128, 220, 20, 20); + _intPtr.field38 = true; + _intPtr._hasPalette = true; + + _vm->_graphicsManager.drawDot(); + //copySection(); + } } void EventsManager::incrementTime(int amt) { diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp index f07616bb36..47c7293322 100644 --- a/engines/voyeur/graphics.cpp +++ b/engines/voyeur/graphics.cpp @@ -22,6 +22,7 @@ #include "voyeur/graphics.h" #include "voyeur/voyeur.h" +#include "voyeur/staticres.h" #include "engines/util.h" #include "graphics/palette.h" #include "graphics/surface.h" @@ -735,4 +736,11 @@ void GraphicsManager::fadeDownICF(int steps) { _vm->_voy._field4378 = 0; } +void GraphicsManager::drawDot() { + for (int y = 0; y < 9; ++y) { + byte *pDest = (byte *)_screenSurface.getPixels() + DOT_LINE_START[y] + DOT_LINE_OFFSET[y]; + Common::fill(pDest, pDest + DOT_LINE_LENGTH[y], 0x80); + } +} + } // End of namespace Voyeur diff --git a/engines/voyeur/graphics.h b/engines/voyeur/graphics.h index 3bfef0ee81..92b3e51453 100644 --- a/engines/voyeur/graphics.h +++ b/engines/voyeur/graphics.h @@ -115,6 +115,7 @@ public: void fadeDownICF1(int steps); void fadeUpICF1(int steps); void fadeDownICF(int steps); + void drawDot(); }; } // End of namespace Voyeur diff --git a/engines/voyeur/staticres.cpp b/engines/voyeur/staticres.cpp index 294a1676b4..1ce8a74141 100644 --- a/engines/voyeur/staticres.cpp +++ b/engines/voyeur/staticres.cpp @@ -116,4 +116,14 @@ const char *const END_OF_MESSAGE = "*** End of Message ***"; const char *const EVENT_TYPE_STRINGS[4] = { "Video", "Audio" "Evidence", "Computer" }; +int DOT_LINE_START[9] = { + 0E880, 0xE9C0, 0xEB00, 0xEC40, 0xED80, 0xEEC0, 0xF000, 0xF140, 0xF280 +}; +int DOT_LINE_OFFSET[9] = { + 144, 143, 142, 141, 141, 141, 142, 143, 144 +}; +int DOT_LINE_LENGTH[9] = { + 5, 7, 9, 11, 11, 11, 9, 7, 5 +}; + } // End of namespace Voyeur diff --git a/engines/voyeur/staticres.h b/engines/voyeur/staticres.h index 8c97af72a8..a6b81f06d6 100644 --- a/engines/voyeur/staticres.h +++ b/engines/voyeur/staticres.h @@ -52,6 +52,10 @@ extern const char *const END_OF_MESSAGE; extern const char *const EVENT_TYPE_STRINGS[4]; +extern int DOT_LINE_START[9]; +extern int DOT_LINE_OFFSET[9]; +extern int DOT_LINE_LENGTH[9]; + } // End of namespace Voyeur #endif |