[Scummvm-git-logs] scummvm master -> 2cca542d7480a5e175f1d2415a33541330ee5d77

dreammaster paulfgilbert at gmail.com
Sat Jul 4 04:18:00 UTC 2020


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:
2cca542d74 GLK: COMPREHEND: Fix restarting CC from disk 2


Commit: 2cca542d7480a5e175f1d2415a33541330ee5d77
    https://github.com/scummvm/scummvm/commit/2cca542d7480a5e175f1d2415a33541330ee5d77
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-07-03T21:17:45-07:00

Commit Message:
GLK: COMPREHEND: Fix restarting CC from disk 2

Changed paths:
    engines/glk/comprehend/game.h
    engines/glk/comprehend/game_cc.cpp
    engines/glk/comprehend/game_cc.h


diff --git a/engines/glk/comprehend/game.h b/engines/glk/comprehend/game.h
index a6632ba51f..78ab24bd14 100644
--- a/engines/glk/comprehend/game.h
+++ b/engines/glk/comprehend/game.h
@@ -70,7 +70,7 @@ protected:
 	void game_restart() {
 		_ended = true;
 	}
-	bool handle_restart();
+	virtual bool handle_restart();
 	int console_get_key();
 	void console_println(const char *text);
 	void move_object(Item *item, int new_room);
diff --git a/engines/glk/comprehend/game_cc.cpp b/engines/glk/comprehend/game_cc.cpp
index 7a29ea4ef5..7545994bea 100644
--- a/engines/glk/comprehend/game_cc.cpp
+++ b/engines/glk/comprehend/game_cc.cpp
@@ -151,5 +151,14 @@ void CrimsonCrownGame::beforeTurn() {
 	}
 }
 
+bool CrimsonCrownGame::handle_restart() {
+	if (_diskNum != 1) {
+		setupDisk(1);
+		loadGame();
+	}
+
+	return ComprehendGame::handle_restart();
+}
+
 } // namespace Comprehend
 } // namespace Glk
diff --git a/engines/glk/comprehend/game_cc.h b/engines/glk/comprehend/game_cc.h
index 553b6d238f..1f4a8882c7 100644
--- a/engines/glk/comprehend/game_cc.h
+++ b/engines/glk/comprehend/game_cc.h
@@ -39,6 +39,8 @@ private:
 	 */
 	void crystalBallCutscene();
 
+protected:
+	bool handle_restart() override;
 public:
 	CrimsonCrownGame();
 	~CrimsonCrownGame() override {}




More information about the Scummvm-git-logs mailing list