[Scummvm-cvs-logs] SF.net SVN: scummvm: [26665] scummvm/trunk/engines/gob
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Sat Apr 28 23:16:14 CEST 2007
Revision: 26665
http://scummvm.svn.sourceforge.net/scummvm/?rev=26665&view=rev
Author: drmccoy
Date: 2007-04-28 14:16:13 -0700 (Sat, 28 Apr 2007)
Log Message:
-----------
Possible fix for bug #1709124 ("GOB3: (dos/russian) just dont run")
Modified Paths:
--------------
scummvm/trunk/engines/gob/dataio.cpp
scummvm/trunk/engines/gob/util.cpp
scummvm/trunk/engines/gob/util.h
Modified: scummvm/trunk/engines/gob/dataio.cpp
===================================================================
--- scummvm/trunk/engines/gob/dataio.cpp 2007-04-28 17:57:44 UTC (rev 26664)
+++ scummvm/trunk/engines/gob/dataio.cpp 2007-04-28 21:16:13 UTC (rev 26665)
@@ -27,6 +27,7 @@
#include "gob/gob.h"
#include "gob/dataio.h"
#include "gob/global.h"
+#include "gob/util.h"
namespace Gob {
@@ -305,6 +306,13 @@
dataDesc[i].size = file_getHandle(_dataFileHandles[file])->readUint32LE();
dataDesc[i].offset = file_getHandle(_dataFileHandles[file])->readUint32LE();
dataDesc[i].packed = file_getHandle(_dataFileHandles[file])->readByte();
+
+ // Replacing cyrillic characters
+ Util::replaceChar(dataDesc[i].chunkName, (char) 0x85, 'E');
+ Util::replaceChar(dataDesc[i].chunkName, (char) 0x8A, 'K');
+ Util::replaceChar(dataDesc[i].chunkName, (char) 0x8E, 'O');
+ Util::replaceChar(dataDesc[i].chunkName, (char) 0x91, 'C');
+ Util::replaceChar(dataDesc[i].chunkName, (char) 0x92, 'T');
}
for (int i = 0; i < _numDataChunks[file]; i++)
Modified: scummvm/trunk/engines/gob/util.cpp
===================================================================
--- scummvm/trunk/engines/gob/util.cpp 2007-04-28 17:57:44 UTC (rev 26664)
+++ scummvm/trunk/engines/gob/util.cpp 2007-04-28 21:16:13 UTC (rev 26665)
@@ -393,6 +393,11 @@
} while (str[i] != 0);
}
+void Util::replaceChar(char *str, char c1, char c2) {
+ while ((str = strchr(str, c1)))
+ *str = c2;
+}
+
static const char trStr1[] =
" ' + - :0123456789: <=> abcdefghijklmnopqrstuvwxyz "
"abcdefghijklmnopqrstuvwxyz ";
Modified: scummvm/trunk/engines/gob/util.h
===================================================================
--- scummvm/trunk/engines/gob/util.h 2007-04-28 17:57:44 UTC (rev 26664)
+++ scummvm/trunk/engines/gob/util.h 2007-04-28 21:16:13 UTC (rev 26665)
@@ -77,6 +77,7 @@
static void insertStr(const char *str1, char *str2, int16 pos);
static void cutFromStr(char *str, int16 from, int16 cutlen);
static void prepareStr(char *str);
+ static void replaceChar(char *str, char c1, char c2);
static void listInsertFront(List *list, void *data);
static void listInsertBack(List *list, void *data);
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