[Scummvm-cvs-logs] SF.net SVN: scummvm:[35886] scummvm/trunk/engines/tinsel
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat Jan 17 23:29:56 CET 2009
Revision: 35886
http://scummvm.svn.sourceforge.net/scummvm/?rev=35886&view=rev
Author: thebluegr
Date: 2009-01-17 22:29:55 +0000 (Sat, 17 Jan 2009)
Log Message:
-----------
Since users need to rename the sound and index files in DW2, throw nice GUI error messages when these files are not found before dying with an error
Modified Paths:
--------------
scummvm/trunk/engines/tinsel/sound.cpp
scummvm/trunk/engines/tinsel/strres.cpp
Modified: scummvm/trunk/engines/tinsel/sound.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/sound.cpp 2009-01-17 22:28:40 UTC (rev 35885)
+++ scummvm/trunk/engines/tinsel/sound.cpp 2009-01-17 22:29:55 UTC (rev 35886)
@@ -41,6 +41,8 @@
#include "sound/mixer.h"
#include "sound/adpcm.h"
+#include "gui/message.h"
+
namespace Tinsel {
extern LANGUAGE sampleLanguage;
@@ -439,12 +441,24 @@
// convert file size to size in DWORDs
_sampleIndexLen /= sizeof(uint32);
- } else
+ } else {
+ char buf[50];
+ sprintf(buf, CANNOT_FIND_FILE, _vm->getSampleIndex(sampleLanguage));
+ GUI::MessageDialog dialog(buf, "OK");
+ dialog.runModal();
+
error(CANNOT_FIND_FILE, _vm->getSampleIndex(sampleLanguage));
+ }
// open sample file in binary mode
- if (!_sampleStream.open(_vm->getSampleFile(sampleLanguage)))
+ if (!_sampleStream.open(_vm->getSampleFile(sampleLanguage))) {
+ char buf[50];
+ sprintf(buf, CANNOT_FIND_FILE, _vm->getSampleFile(sampleLanguage));
+ GUI::MessageDialog dialog(buf, "OK");
+ dialog.runModal();
+
error(CANNOT_FIND_FILE, _vm->getSampleFile(sampleLanguage));
+ }
/*
// gen length of the largest sample
Modified: scummvm/trunk/engines/tinsel/strres.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/strres.cpp 2009-01-17 22:28:40 UTC (rev 35885)
+++ scummvm/trunk/engines/tinsel/strres.cpp 2009-01-17 22:29:55 UTC (rev 35886)
@@ -30,6 +30,8 @@
#include "common/file.h"
#include "common/endian.h"
+#include "gui/message.h"
+
namespace Tinsel {
#ifdef DEBUG
@@ -94,8 +96,14 @@
// isn't English, try falling back on opening 'english.txt' - some foreign
// language versions reused it rather than their proper filename
if (!f.open(_vm->getTextFile(newLang))) {
- if ((newLang == TXT_ENGLISH) || !f.open(_vm->getTextFile(TXT_ENGLISH)))
+ if ((newLang == TXT_ENGLISH) || !f.open(_vm->getTextFile(TXT_ENGLISH))) {
+ char buf[50];
+ sprintf(buf, CANNOT_FIND_FILE, _vm->getTextFile(newLang));
+ GUI::MessageDialog dialog(buf, "OK");
+ dialog.runModal();
+
error(CANNOT_FIND_FILE, _vm->getTextFile(newLang));
+ }
}
// Check whether the file is compressed or not - for compressed files the
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