[Scummvm-git-logs] scummvm master -> b09968768a857ddad658bd0b0e9cfa557e292972
eriktorbjorn
eriktorbjorn at telia.com
Fri Jun 11 06:19:46 UTC 2021
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:
b09968768a TITANIC: Make Esc at the start-up dialog quit the game
Commit: b09968768a857ddad658bd0b0e9cfa557e292972
https://github.com/scummvm/scummvm/commit/b09968768a857ddad658bd0b0e9cfa557e292972
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-06-11T08:18:49+02:00
Commit Message:
TITANIC: Make Esc at the start-up dialog quit the game
I.e. the dialog you get if you have saved games, where the game asks you
if you want to load or start a new game. Before, it would just make the
dialog unresponsive if you pressed Esc.
Changed paths:
engines/titanic/main_game_window.cpp
engines/titanic/main_game_window.h
engines/titanic/titanic.cpp
diff --git a/engines/titanic/main_game_window.cpp b/engines/titanic/main_game_window.cpp
index 4f7276ea8b..b592ff735c 100644
--- a/engines/titanic/main_game_window.cpp
+++ b/engines/titanic/main_game_window.cpp
@@ -54,7 +54,7 @@ CMainGameWindow::~CMainGameWindow() {
delete _project;
}
-void CMainGameWindow::applicationStarting() {
+bool CMainGameWindow::applicationStarting() {
// Set the video mode
CScreenManager *screenManager = CScreenManager::setCurrent();
screenManager->setMode(640, 480, 16, 0, true);
@@ -79,8 +79,8 @@ void CMainGameWindow::applicationStarting() {
// Set up the game project, and get game slot
int saveSlot = getSavegameSlot();
- if (saveSlot == -2)
- return;
+ if (saveSlot == EXIT_GAME)
+ return false;
// Create game view and manager
_gameView = new CSTGameView(this);
@@ -107,6 +107,7 @@ void CMainGameWindow::applicationStarting() {
enterRoomMsg.execute(room, nullptr, MSGFLAG_SCAN);
_gameManager->markAllDirty();
+ return true;
}
int CMainGameWindow::getSavegameSlot() {
diff --git a/engines/titanic/main_game_window.h b/engines/titanic/main_game_window.h
index 3797283b8c..cef147c486 100644
--- a/engines/titanic/main_game_window.h
+++ b/engines/titanic/main_game_window.h
@@ -114,7 +114,7 @@ public:
/**
* Called when the application starts
*/
- void applicationStarting();
+ bool applicationStarting();
/**
* Sets the view to be shown
diff --git a/engines/titanic/titanic.cpp b/engines/titanic/titanic.cpp
index 435f9f1885..b33ccc0951 100644
--- a/engines/titanic/titanic.cpp
+++ b/engines/titanic/titanic.cpp
@@ -115,8 +115,7 @@ bool TitanicEngine::initialize() {
syncSoundSettings();
- _window->applicationStarting();
- return true;
+ return _window->applicationStarting();
}
void TitanicEngine::deinitialize() {
More information about the Scummvm-git-logs
mailing list