[Scummvm-cvs-logs] scummvm master -> f959a461a9a7bb01ada167e637c4249f70ea717c

dreammaster dreammaster at scummvm.org
Thu Oct 15 01:44:38 CEST 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f959a461a9 SHERLOCK: RT: Hook up fast speed to the Ctrl+S toggle


Commit: f959a461a9a7bb01ada167e637c4249f70ea717c
    https://github.com/scummvm/scummvm/commit/f959a461a9a7bb01ada167e637c4249f70ea717c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-10-14T19:42:18-04:00

Commit Message:
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

Changed paths:
    engines/sherlock/events.cpp
    engines/sherlock/events.h
    engines/sherlock/tattoo/tattoo_scene.cpp
    engines/sherlock/tattoo/tattoo_talk.cpp
    engines/sherlock/tattoo/tattoo_user_interface.cpp



diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp
index c6a223b..1cd6a06 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 c3fa147..711804d 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 3b3e10d..aec80ba 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 dd5c821..a4ceca0 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 623fb8d..6e18c3f 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






More information about the Scummvm-git-logs mailing list