aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorChristopher Page2008-07-21 22:46:39 +0000
committerChristopher Page2008-07-21 22:46:39 +0000
commit09f4fd946ee4b3fd6d9780e080b9bc95fbcd0a69 (patch)
treee4aae52f4e6872f8cd6bed9ddab5de6d0521f7d2 /engines/scumm
parent0cae5552db214a7e11c552205e03fd5c0c38f6fd (diff)
parente09eb75ef77d6e76b763b3a47540a530013a887f (diff)
downloadscummvm-rg350-09f4fd946ee4b3fd6d9780e080b9bc95fbcd0a69.tar.gz
scummvm-rg350-09f4fd946ee4b3fd6d9780e080b9bc95fbcd0a69.tar.bz2
scummvm-rg350-09f4fd946ee4b3fd6d9780e080b9bc95fbcd0a69.zip
Merged revisions 33052-33053,33056-33058,33061-33064,33068,33070,33072,33075,33078-33079,33083,33086-33087,33089,33094-33096,33098-33099,33104,33108-33109,33114-33117,33120,33135-33146,33160,33162,33165,33167-33169 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk svn-id: r33183
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/detection.cpp2
-rw-r--r--engines/scumm/dialogs.cpp27
-rw-r--r--engines/scumm/dialogs.h2
-rw-r--r--engines/scumm/imuse_digi/dimuse_sndmgr.cpp6
4 files changed, 22 insertions, 15 deletions
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 753ad45212..68d3010199 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -949,7 +949,7 @@ SaveStateList ScummMetaEngine::listSaves(const char *target) const {
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
- for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++) {
+ for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Obtain the last 2 digits of the filename, since they correspond to the save slot
int slotNum = atoi(file->c_str() + file->size() - 2);
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 310cfc50a6..cb9113fe65 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -297,7 +297,7 @@ void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 da
break;
case GUI::kListSelectionChangedCmd: {
if (_gfxWidget) {
- updateInfos();
+ updateInfos(true);
}
if (_saveMode) {
@@ -350,7 +350,7 @@ void SaveLoadChooser::reflowLayout() {
_fillR = g_gui.evaluator()->getVar("scummsaveload_thumbnail.fillR");
_fillG = g_gui.evaluator()->getVar("scummsaveload_thumbnail.fillG");
_fillB = g_gui.evaluator()->getVar("scummsaveload_thumbnail.fillB");
- updateInfos();
+ updateInfos(false);
} else {
_container->setFlags(GUI::WIDGET_INVISIBLE);
_gfxWidget->setFlags(GUI::WIDGET_INVISIBLE);
@@ -362,7 +362,7 @@ void SaveLoadChooser::reflowLayout() {
Dialog::reflowLayout();
}
-void SaveLoadChooser::updateInfos() {
+void SaveLoadChooser::updateInfos(bool redraw) {
int selItem = _list->getSelected();
Graphics::Surface *thumb;
thumb = _vm->loadThumbnailFromSlot(_saveMode ? selItem + 1 : selItem);
@@ -376,7 +376,8 @@ void SaveLoadChooser::updateInfos() {
}
delete thumb;
- _gfxWidget->draw();
+ if (redraw)
+ _gfxWidget->draw();
InfoStuff infos;
memset(&infos, 0, sizeof(InfoStuff));
@@ -386,12 +387,14 @@ void SaveLoadChooser::updateInfos() {
(infos.date >> 24) & 0xFF, (infos.date >> 16) & 0xFF,
infos.date & 0xFFFF);
_date->setLabel(buffer);
- _date->draw();
+ if (redraw)
+ _date->draw();
snprintf(buffer, 32, "Time: %.2d:%.2d",
(infos.time >> 8) & 0xFF, infos.time & 0xFF);
_time->setLabel(buffer);
- _time->draw();
+ if (redraw)
+ _time->draw();
int minutes = infos.playtime / 60;
int hours = minutes / 60;
@@ -400,19 +403,23 @@ void SaveLoadChooser::updateInfos() {
snprintf(buffer, 32, "Playtime: %.2d:%.2d",
hours & 0xFF, minutes & 0xFF);
_playtime->setLabel(buffer);
- _playtime->draw();
+ if (redraw)
+ _playtime->draw();
} else {
snprintf(buffer, 32, "No date saved");
_date->setLabel(buffer);
- _date->draw();
+ if (redraw)
+ _date->draw();
snprintf(buffer, 32, "No time saved");
_time->setLabel(buffer);
- _time->draw();
+ if (redraw)
+ _time->draw();
snprintf(buffer, 32, "No playtime saved");
_playtime->setLabel(buffer);
- _playtime->draw();
+ if (redraw)
+ _playtime->draw();
}
}
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 192bb8d0e1..3837787a3b 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -69,7 +69,7 @@ protected:
uint8 _fillR, _fillG, _fillB;
- void updateInfos();
+ void updateInfos(bool redraw);
public:
SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode, ScummEngine *engine);
~SaveLoadChooser();
diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
index 1511b9aefc..b18b0ba70f 100644
--- a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
+++ b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
@@ -102,10 +102,10 @@ void ImuseDigiSndMgr::prepareSoundFromRMAP(Common::File *file, SoundDesc *sound,
int32 version = file->readUint32BE();
if (version != 3) {
if (version == 2) {
- warning("ImuseDigiSndMgr::prepareSoundFromRMAP: Wrong version of compressed *.bun file, expected 3, but it's 2.");
- warning("Suggested to recompress with latest tool from daily builds.");
+ warning("ImuseDigiSndMgr::prepareSoundFromRMAP: Wrong version of compressed *.bun file, expected 3, but it's 2");
+ warning("Suggested to recompress with latest tool from daily builds");
} else
- error("ImuseDigiSndMgr::prepareSoundFromRMAP: Wrong version number, expected 3, but it's: %d.", version);
+ error("ImuseDigiSndMgr::prepareSoundFromRMAP: Wrong version number, expected 3, but it's: %d", version);
}
sound->bits = file->readUint32BE();
sound->freq = file->readUint32BE();