diff options
Diffstat (limited to 'engines/scumm/dialogs.cpp')
-rw-r--r-- | engines/scumm/dialogs.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index b590bba65e..7f87a9e623 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -395,8 +395,7 @@ void SaveLoadChooser::updateInfos(bool redraw) { int hours = minutes / 60; minutes %= 60; - snprintf(buffer, 32, "Playtime: %.2d:%.2d", - hours & 0xFF, minutes & 0xFF); + snprintf(buffer, 32, "Playtime: %.2d:%.2d", hours, minutes); _playtime->setLabel(buffer); } else { _date->setLabel("No date saved"); @@ -431,7 +430,7 @@ Common::StringList generateSavegameList(ScummEngine *scumm, bool saveMode) { return descriptions; } -ScummMenuDialog::ScummMenuDialog(ScummEngine *scumm) +MainMenuDialog::MainMenuDialog(ScummEngine *scumm) : ScummDialog("scummmain"), _vm(scumm) { new GUI::ButtonWidget(this, "scummmain_resume", "Resume", kPlayCmd, 'P'); @@ -459,7 +458,7 @@ ScummMenuDialog::ScummMenuDialog(ScummEngine *scumm) _loadDialog = new SaveLoadChooser("Load game:", "Load", false, scumm); } -ScummMenuDialog::~ScummMenuDialog() { +MainMenuDialog::~MainMenuDialog() { delete _aboutDialog; delete _optionsDialog; #ifndef DISABLE_HELP @@ -469,7 +468,7 @@ ScummMenuDialog::~ScummMenuDialog() { delete _loadDialog; } -void ScummMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { +void MainMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kSaveCmd: save(); @@ -492,7 +491,7 @@ void ScummMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 da break; #endif case kQuitCmd: - _vm->quitGame(); + _vm->_quit = true; close(); break; default: @@ -500,7 +499,7 @@ void ScummMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 da } } -void ScummMenuDialog::save() { +void MainMenuDialog::save() { int idx; _saveDialog->setList(generateSavegameList(_vm, true)); idx = _saveDialog->runModal(); @@ -519,7 +518,7 @@ void ScummMenuDialog::save() { } } -void ScummMenuDialog::load() { +void MainMenuDialog::load() { int idx; _loadDialog->setList(generateSavegameList(_vm, false)); idx = _loadDialog->runModal(); |