aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
authorPaul Gilbert2015-10-14 19:42:18 -0400
committerPaul Gilbert2015-10-14 19:42:18 -0400
commitf959a461a9a7bb01ada167e637c4249f70ea717c (patch)
treedfeab66f70d5efa87072113893452d8f32f81a12 /engines/sherlock
parent8ee889beb44cf828abe5d3a7479ba544b9fc86dd (diff)
downloadscummvm-rg350-f959a461a9a7bb01ada167e637c4249f70ea717c.tar.gz
scummvm-rg350-f959a461a9a7bb01ada167e637c4249f70ea717c.tar.bz2
scummvm-rg350-f959a461a9a7bb01ada167e637c4249f70ea717c.zip
SHERLOCK: RT: Hook up fast speed to the Ctrl+S toggle
This reverts back to the original slower speed by default, but allows the Ctrl+S toggle from Scalpel to work in Rose Tattoo to increase the play speed
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/events.cpp4
-rw-r--r--engines/sherlock/events.h7
-rw-r--r--engines/sherlock/tattoo/tattoo_scene.cpp5
-rw-r--r--engines/sherlock/tattoo/tattoo_talk.cpp5
-rw-r--r--engines/sherlock/tattoo/tattoo_user_interface.cpp2
5 files changed, 11 insertions, 12 deletions
diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp
index c6a223b6d9..1cd6a06729 100644
--- a/engines/sherlock/events.cpp
+++ b/engines/sherlock/events.cpp
@@ -263,6 +263,10 @@ void Events::setFrameRate(int newRate) {
_frameRate = newRate;
}
+void Events::toggleSpeed() {
+ _frameRate = (_frameRate == GAME_FRAME_RATE) ? GAME_FRAME_RATE * 2 : GAME_FRAME_RATE;
+}
+
bool Events::checkForNextFrameCounter() {
// Check for next game frame
uint32 milli = g_system->getMillis();
diff --git a/engines/sherlock/events.h b/engines/sherlock/events.h
index c3fa147399..711804dfdf 100644
--- a/engines/sherlock/events.h
+++ b/engines/sherlock/events.h
@@ -30,7 +30,7 @@
namespace Sherlock {
-#define GAME_FRAME_RATE 40
+#define GAME_FRAME_RATE 30
#define GAME_FRAME_TIME (1000 / GAME_FRAME_RATE)
enum CursorId { ARROW = 0, MAGNIFY = 1, WAIT = 2, EXIT_ZONES_START = 5, INVALID_CURSOR = -1 };
@@ -149,6 +149,11 @@ public:
void setFrameRate(int newRate);
/**
+ * Toggle between standard game speed and an "extra fast" mode
+ */
+ void toggleSpeed();
+
+ /**
* Return the current game frame number
*/
uint32 getFrameCounter() const { return _frameCounter; }
diff --git a/engines/sherlock/tattoo/tattoo_scene.cpp b/engines/sherlock/tattoo/tattoo_scene.cpp
index 3b3e10d814..aec80ba34f 100644
--- a/engines/sherlock/tattoo/tattoo_scene.cpp
+++ b/engines/sherlock/tattoo/tattoo_scene.cpp
@@ -655,10 +655,6 @@ int TattooScene::startCAnim(int cAnimNum, int playRate) {
if (ui._windowOpen)
ui.banishWindow();
- if (_currentScene == 3 && cAnimNum == 21)
- // Set framerate for correct playing of violin in Holmes' bedroom
- events.setFrameRate(30);
-
// Open up the room resource file and get the data for the animation
Common::SeekableReadStream *stream = res.load(_roomFilename);
stream->seek(44 + cAnimNum * 4);
@@ -721,7 +717,6 @@ int TattooScene::startCAnim(int cAnimNum, int playRate) {
_activeCAnim._zPlacement = REMOVE;
_activeCAnim._removeBounds = _activeCAnim._oldBounds;
_vm->_ui->_bgFound = -1;
- events.setFrameRate(GAME_FRAME_RATE);
// Free up the animation
_activeCAnim.close();
diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp
index dd5c821d22..a4ceca042b 100644
--- a/engines/sherlock/tattoo/tattoo_talk.cpp
+++ b/engines/sherlock/tattoo/tattoo_talk.cpp
@@ -192,9 +192,6 @@ void TattooTalk::talkTo(const Common::String filename) {
if (filename == "wilb29a")
events.incWaitCounter();
- if (filename == "keys33d")
- events.setFrameRate(30);
-
Talk::talkTo(filename);
if (filename == "wilb29a")
@@ -203,8 +200,6 @@ void TattooTalk::talkTo(const Common::String filename) {
events.decWaitCounter();
events.setCursor(ARROW);
}
- if (filename == "keys33d")
- events.setFrameRate(GAME_FRAME_RATE);
}
void TattooTalk::talkInterface(const byte *&str) {
diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp
index 623fb8dbf5..6e18c3fb02 100644
--- a/engines/sherlock/tattoo/tattoo_user_interface.cpp
+++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp
@@ -277,7 +277,7 @@ void TattooUserInterface::handleInput() {
scene._goToScene = STARTING_GAME_SCENE;
} else if (_menuMode == STD_MODE) {
if (_keyState.keycode == Common::KEYCODE_s && vm._allowFastMode) {
- vm._fastMode = !vm._fastMode;
+ events.toggleSpeed();
} else if (_keyState.keycode == Common::KEYCODE_l && _bgFound != -1) {
// Beging used for testing that Look dialogs work