[Scummvm-cvs-logs] SF.net SVN: scummvm:[52171] scummvm/trunk/engines/sci/engine
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Tue Aug 17 22:33:22 CEST 2010
Revision: 52171
http://scummvm.svn.sourceforge.net/scummvm/?rev=52171&view=rev
Author: thebluegr
Date: 2010-08-17 20:33:22 +0000 (Tue, 17 Aug 2010)
Log Message:
-----------
SCI: added a wrapper for GUI::MessageDialog
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kgraphics.cpp
scummvm/trunk/engines/sci/engine/savegame.cpp
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2010-08-17 19:50:23 UTC (rev 52170)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2010-08-17 20:33:22 UTC (rev 52171)
@@ -57,6 +57,11 @@
namespace Sci {
+void showScummVMDialog(const Common::String &message) {
+ GUI::MessageDialog dialog(message, "OK");
+ dialog.runModal();
+}
+
void _k_dirloop(reg_t object, uint16 angle, EngineState *s, int argc, reg_t *argv) {
GuiResourceId viewId = readSelectorValue(s->_segMan, object, SELECTOR(view));
uint16 signal = readSelectorValue(s->_segMan, object, SELECTOR(signal));
@@ -922,14 +927,12 @@
if (!changeDirButton.isNull()) {
// check if checkDirButton is still enabled, in that case we are called the first time during that room
if (!(readSelectorValue(s->_segMan, changeDirButton, SELECTOR(state)) & SCI_CONTROLS_STYLE_DISABLED)) {
- GUI::MessageDialog dialog("Characters saved inside ScummVM are shown "
+ showScummVMDialog("Characters saved inside ScummVM are shown "
"automatically. Character files saved in the original "
"interpreter need to be put inside ScummVM's saved games "
"directory and a prefix needs to be added depending on which "
"game it was saved in: 'qfg1-' for Quest for Glory 1, 'qfg2-' "
- "for Quest for Glory 2. Example: 'qfg2-thief.sav'.",
- "OK");
- dialog.runModal();
+ "for Quest for Glory 2. Example: 'qfg2-thief.sav'.");
}
}
}
Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp 2010-08-17 19:50:23 UTC (rev 52170)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp 2010-08-17 20:33:22 UTC (rev 52171)
@@ -45,8 +45,6 @@
#include "sci/sound/audio.h"
#include "sci/sound/music.h"
-#include "gui/message.h"
-
namespace Sci {
@@ -701,6 +699,8 @@
return true;
}
+extern void showScummVMDialog(const Common::String &message);
+
void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
SavegameMetadata meta;
@@ -721,8 +721,7 @@
warning("Savegame version is %d, maximum supported is %0d", meta.savegame_version, CURRENT_SAVEGAME_VERSION);
*/
- GUI::MessageDialog dialog("The format of this saved game is obsolete, unable to load it", "OK");
- dialog.runModal();
+ showScummVMDialog("The format of this saved game is obsolete, unable to load it");
s->r_acc = make_reg(0, 1); // signal failure
return;
@@ -733,8 +732,7 @@
if (script0->size != meta.script0_size || g_sci->getGameObject().offset != meta.game_object_offset) {
//warning("This saved game was created with a different version of the game, unable to load it");
- GUI::MessageDialog dialog("This saved game was created with a different version of the game, unable to load it", "OK");
- dialog.runModal();
+ showScummVMDialog("This saved game was created with a different version of the game, unable to load it");
s->r_acc = make_reg(0, 1); // signal failure
return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list